This patch should be applied to an un-modified XFree86 version 4.2.0 source tree. It is the third of four patches that will will convert the source tree to XFree86 version 4.3.0. To apply this patch, run the following from the directory containing your 'xc' directory: patch -p0 -E < 4.2.0-4.3.0.diff1 patch -p0 -E < 4.2.0-4.3.0.diff2 patch -p0 -E < 4.2.0-4.3.0.diff3 patch -p0 -E < 4.2.0-4.3.0.diff4 rm -f xc/doc/hardcopy/Xext/mit-shm.PS.gz rm -f xc/doc/hardcopy/saver/saver.PS.gz rm -fr xc/fonts/scaled/Ethiopic rm -fr xc/fonts/scaled/Meltho rm -fr xc/programs/Xserver/hw/darwin/bundle rm -f xc/programs/Xserver/hw/hp/input/drivers/XHPKeymaps rm -f xc/programs/Xserver/hw/hp/ngle/ngledoblt.o.8.07 rm -f xc/programs/Xserver/hw/xwin/X.ico rm -fr xc/programs/xcursorgen/redglass rm -fr xc/programs/xcursorgen/whiteglass touch xc/extras/Mesa/src/Trace/tr_attrib.c touch xc/lib/fontconfig/NEWS gzip -d < 4.3.0.tgz | tar vxf - ------------------------------------------------------------------------------- Index: xc/include/XF86keysym.h diff -u xc/include/XF86keysym.h:1.12 xc/include/XF86keysym.h:1.17 --- xc/include/XF86keysym.h:1.12 Wed Dec 26 17:28:25 2001 +++ xc/include/XF86keysym.h Fri Feb 14 17:02:26 2003 @@ -1,9 +1,9 @@ -/* $XFree86: xc/include/XF86keysym.h,v 1.12 2001/12/26 22:28:25 dawes Exp $ */ +/* $XFree86: xc/include/XF86keysym.h,v 1.17 2003/02/14 22:02:26 dawes Exp $ */ /* * XFree86 vendor specific keysyms. * - * The XFree86 keysym range is 0x1008FF01 - 0x1008FFFF. + * The XFree86 keysym range is 0x10080001 - 0x1008FFFF. * * When adding new entries, the xc/lib/XKeysymDB file should also be * updated to make the new entries visible to Xlib. @@ -21,6 +21,12 @@ /* * Note, 0x1008FF02 - 0x1008FF0F are free and should be used for misc new * keysyms that don't fit into any of the groups below. + * + * 0x1008FF64, 0x1008FF6F, 0x1008FF71, 0x1008FF83 are no longer used, + * and should be used first for new keysyms. + * + * Check in keysymdef.h for generic symbols before adding new XFree86-specific + * symbols here. */ @@ -77,7 +83,8 @@ #define XF86XK_BrightnessAdjust 0x1008FF3B #define XF86XK_Finance 0x1008FF3C #define XF86XK_Community 0x1008FF3D -/* Allocate 0x1008FF3E-F next */ +#define XF86XK_AudioRewind 0x1008FF3E +#define XF86XK_XF86BackForward 0x1008FF3F #define XF86XK_Launch0 0x1008FF40 #define XF86XK_Launch1 0x1008FF41 #define XF86XK_Launch2 0x1008FF42 @@ -95,4 +102,87 @@ #define XF86XK_LaunchE 0x1008FF4E #define XF86XK_LaunchF 0x1008FF4F +#define XF86XK_ApplicationLeft 0x1008FF50 +#define XF86XK_ApplicationRight 0x1008FF51 +#define XF86XK_Book 0x1008FF52 +#define XF86XK_CD 0x1008FF53 +#define XF86XK_Calculater 0x1008FF54 +#define XF86XK_Clear 0x1008FF55 +#define XF86XK_Close 0x1008FF56 +#define XF86XK_Copy 0x1008FF57 +#define XF86XK_Cut 0x1008FF58 +#define XF86XK_Display 0x1008FF59 +#define XF86XK_DOS 0x1008FF5A +#define XF86XK_Documents 0x1008FF5B +#define XF86XK_Excel 0x1008FF5C +#define XF86XK_Explorer 0x1008FF5D +#define XF86XK_Game 0x1008FF5E +#define XF86XK_Go 0x1008FF5F +#define XF86XK_iTouch 0x1008FF60 +#define XF86XK_LogOff 0x1008FF61 +#define XF86XK_Market 0x1008FF62 +#define XF86XK_Meeting 0x1008FF63 +#define XF86XK_MenuKB 0x1008FF65 +#define XF86XK_MenuPB 0x1008FF66 +#define XF86XK_MySites 0x1008FF67 +#define XF86XK_New 0x1008FF68 +#define XF86XK_News 0x1008FF69 +#define XF86XK_OfficeHome 0x1008FF6A +#define XF86XK_Open 0x1008FF6B +#define XF86XK_Option 0x1008FF6C +#define XF86XK_Paste 0x1008FF6D +#define XF86XK_Phone 0x1008FF6E +#define XF86XK_Q 0x1008FF70 +#define XF86XK_Reply 0x1008FF72 +#define XF86XK_Reload 0x1008FF73 +#define XF86XK_RotateWindows 0x1008FF74 +#define XF86XK_RotationPB 0x1008FF75 +#define XF86XK_RotationKB 0x1008FF76 +#define XF86XK_Save 0x1008FF77 +#define XF86XK_ScrollUp 0x1008FF78 +#define XF86XK_ScrollDown 0x1008FF79 +#define XF86XK_ScrollClick 0x1008FF7A +#define XF86XK_Send 0x1008FF7B +#define XF86XK_Spell 0x1008FF7C +#define XF86XK_SplitScreen 0x1008FF7D +#define XF86XK_Support 0x1008FF7E +#define XF86XK_TaskPane 0x1008FF7F +#define XF86XK_Terminal 0x1008FF80 +#define XF86XK_Tools 0x1008FF81 +#define XF86XK_Travel 0x1008FF82 +#define XF86XK_UserPB 0x1008FF84 +#define XF86XK_User1KB 0x1008FF85 +#define XF86XK_User2KB 0x1008FF86 +#define XF86XK_Video 0x1008FF87 +#define XF86XK_WheelButton 0x1008FF88 +#define XF86XK_Word 0x1008FF89 +#define XF86XK_Xfer 0x1008FF8A +#define XF86XK_ZoomIn 0x1008FF8B +#define XF86XK_ZoomOut 0x1008FF8C + +#define XF86XK_Away 0x1008FF8D +#define XF86XK_Messenger 0x1008FF8E +#define XF86XK_WebCam 0x1008FF8F +#define XF86XK_MailForward 0x1008FF90 +#define XF86XK_Pictures 0x1008FF91 +#define XF86XK_Music 0x1008FF92 + +/* Keys for special action keys (hot keys) */ +#define XF86XK_Switch_VT_1 0x1008FE01 +#define XF86XK_Switch_VT_2 0x1008FE02 +#define XF86XK_Switch_VT_3 0x1008FE03 +#define XF86XK_Switch_VT_4 0x1008FE04 +#define XF86XK_Switch_VT_5 0x1008FE05 +#define XF86XK_Switch_VT_6 0x1008FE06 +#define XF86XK_Switch_VT_7 0x1008FE07 +#define XF86XK_Switch_VT_8 0x1008FE08 +#define XF86XK_Switch_VT_9 0x1008FE09 +#define XF86XK_Switch_VT_10 0x1008FE0A +#define XF86XK_Switch_VT_11 0x1008FE0B +#define XF86XK_Switch_VT_12 0x1008FE0C + +#define XF86XK_Ungrab 0x1008FE20 +#define XF86XK_ClearGrab 0x1008FE21 +#define XF86XK_Next_VMode 0x1008FE22 +#define XF86XK_Prev_VMode 0x1008FE23 Index: xc/include/Xalloca.h diff -u xc/include/Xalloca.h:3.10 xc/include/Xalloca.h:3.11 --- xc/include/Xalloca.h:3.10 Fri Dec 14 14:53:25 2001 +++ xc/include/Xalloca.h Sun Dec 1 15:08:41 2002 @@ -27,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/include/Xalloca.h,v 3.10 2001/12/14 19:53:25 dawes Exp $ */ +/* $XFree86: xc/include/Xalloca.h,v 3.11 2002/12/01 20:08:41 tsi Exp $ */ /* * The purpose of this header is to define the macros ALLOCATE_LOCAL and @@ -83,7 +83,6 @@ # else /* NCR */ # define ALLOCATE_LOCAL(size) alloca(size) # endif -# define DEALLOCATE_LOCAL(ptr) /* as nothing */ # endif /* defined(__HIGHC__) */ @@ -92,7 +91,6 @@ # define alloca __builtin_alloca # endif /* !alloca */ # define ALLOCATE_LOCAL(size) alloca((int)(size)) -# define DEALLOCATE_LOCAL(ptr) /* as nothing */ # else /* ! __GNUC__ */ /* @@ -118,7 +116,6 @@ # endif /* __QNX__ */ # endif /* __sgi */ # define ALLOCATE_LOCAL(size) alloca((int)(size)) -# define DEALLOCATE_LOCAL(ptr) /* as nothing */ # endif /* who does alloca */ # endif /* NCR */ # endif /* __GNUC__ */ @@ -133,6 +130,10 @@ # define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined! # define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined! # endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */ -#endif /* !defined(ALLOCATE_LOCAL) */ +#else +# if !defined(DEALLOCATE_LOCAL) +# define DEALLOCATE_LOCAL(_ptr) do {} while(0) +# endif +#endif /* defined(ALLOCATE_LOCAL) */ #endif /* XALLOCA_H */ Index: xc/include/Xfuncs.h diff -u xc/include/Xfuncs.h:3.9 xc/include/Xfuncs.h:3.10 --- xc/include/Xfuncs.h:3.9 Fri Dec 14 14:53:25 2001 +++ xc/include/Xfuncs.h Fri May 31 14:45:38 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. * */ -/* $XFree86: xc/include/Xfuncs.h,v 3.9 2001/12/14 19:53:25 dawes Exp $ */ +/* $XFree86: xc/include/Xfuncs.h,v 3.10 2002/05/31 18:45:38 dawes Exp $ */ #ifndef _XFUNCS_H_ #define _XFUNCS_H_ @@ -45,10 +45,6 @@ void bcopy(); #define bzero(b,len) memset(b, 0, len) #define bcmp(b1,b2,len) memcmp(b1, b2, len) -#elif defined(__EMX__) -#include -/* bcopy, bcmp, bzero declared */ -#define _XFUNCS_H_INCLUDED_STRING_H #else #include #define _XFUNCS_H_INCLUDED_STRING_H Index: xc/include/Xmd.h diff -u xc/include/Xmd.h:3.14 xc/include/Xmd.h:3.16 --- xc/include/Xmd.h:3.14 Fri Dec 14 14:53:25 2001 +++ xc/include/Xmd.h Fri May 31 14:45:39 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/Xmd.h,v 3.14 2001/12/14 19:53:25 dawes Exp $ */ +/* $XFree86: xc/include/Xmd.h,v 3.16 2002/05/31 18:45:39 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -62,7 +62,8 @@ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \ defined(__s390x__) || \ - (defined(__hppa__) && defined(__LP64__)) + (defined(__hppa__) && defined(__LP64__)) || \ + defined(__x86_64__) || defined(x86_64) #define LONG64 /* 32/64-bit architecture */ #endif #ifdef __sgi @@ -153,17 +154,13 @@ typedef CARD32 BITS32; typedef CARD16 BITS16; -#ifndef __EMX__ +#ifndef I_NEED_OS2_H typedef CARD8 BYTE; -typedef CARD8 BOOL; -#else /* __EMX__ */ -/* - * This is bad style, but the central include file declares them - * as well - */ -#define BYTE CARD8 -#define BOOL CARD8 -#endif /* __EMX__ */ +typedef CARD8 BOOL; +#else +#define BYTE CARD8 +#define BOOL CARD8 +#endif /* * definitions for sign-extending bitfields on 64-bit architectures Index: xc/include/Xos.h diff -u xc/include/Xos.h:3.36 xc/include/Xos.h:3.38 --- xc/include/Xos.h:3.36 Fri Dec 14 14:53:26 2001 +++ xc/include/Xos.h Fri May 31 14:45:39 2002 @@ -27,7 +27,7 @@ * The X Window System is a Trademark of The Open Group. * */ -/* $XFree86: xc/include/Xos.h,v 3.36 2001/12/14 19:53:26 dawes Exp $ */ +/* $XFree86: xc/include/Xos.h,v 3.38 2002/05/31 18:45:39 dawes Exp $ */ /* This is a collection of things to try and minimize system dependencies * in a "signficant" number of source files. @@ -155,11 +155,6 @@ #endif #endif /* X_NOT_POSIX else */ -#ifdef CSRG_BASED -#include -#include -#endif /* CSRG_BASED */ - /* * Get struct timeval and struct tm */ @@ -243,7 +238,7 @@ #endif #endif /* XPG4 else */ -#ifdef __EMX__ +#ifdef __UNIXOS2__ typedef unsigned long fd_mask; #include #define MAX_PATH _POSIX_PATH_MAX Index: xc/include/Xos_r.h diff -u xc/include/Xos_r.h:1.15 xc/include/Xos_r.h:1.18 --- xc/include/Xos_r.h:1.15 Fri Dec 14 14:53:26 2001 +++ xc/include/Xos_r.h Wed Aug 28 19:08:22 2002 @@ -22,7 +22,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.15 2001/12/14 19:53:26 dawes Exp $ */ +/* $XFree86: xc/include/Xos_r.h,v 1.18 2002/08/28 23:08:22 torrey Exp $ */ /* * Various and sundry Thread-Safe functions used by X11, Motif, and CDE. @@ -228,6 +228,7 @@ # endif #endif +#undef X_NEEDS_PWPARAMS #if !defined(X_INCLUDE_PWD_H) || defined(_XOS_INCLUDED_PWD_H) /* Do nothing */ @@ -242,6 +243,7 @@ #elif !defined(XOS_USE_MTSAFE_PWDAPI) || defined(XNO_MTSAFE_PWDAPI) /* UnixWare 2.0, or other systems with thread support but no _r API. */ +# define X_NEEDS_PWPARAMS typedef struct { struct passwd pws; char pwbuf[1024]; @@ -254,7 +256,8 @@ * fields. */ -#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ + defined(__APPLE__) static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) { memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)); @@ -324,8 +327,9 @@ (_Xos_processUnlock), \ (p).pwp ) -#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) +#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__) /* SVR4 threads, AIX 4.2.0 and earlier and OSF/1 3.2 and earlier pthreads */ +# define X_NEEDS_PWPARAMS typedef struct { struct passwd pws; char pwbuf[X_LINE_MAX]; @@ -356,6 +360,7 @@ extern int _Pgetpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **); extern int _Pgetpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **); # endif +# define X_NEEDS_PWPARAMS typedef struct { struct passwd pws; char pwbuf[X_LINE_MAX]; @@ -614,7 +619,8 @@ # endif } _Xreaddirparams; -# if defined(AIXV3) || defined(AIXV4) || defined(_POSIX_THREAD_SAFE_FUNCTIONS) +# if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(AIXV3) || \ + defined(AIXV4) || defined(__APPLE__) /* AIX defines the draft POSIX symbol, but uses the final API. */ /* POSIX final API, returns (int)0 on success. */ # if defined(__osf__) Index: xc/include/Xosdefs.h diff -u xc/include/Xosdefs.h:3.19 xc/include/Xosdefs.h:3.20 --- xc/include/Xosdefs.h:3.19 Wed Dec 19 16:37:28 2001 +++ xc/include/Xosdefs.h Fri May 31 14:45:39 2002 @@ -25,7 +25,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.19 2001/12/19 21:37:28 dawes Exp $ */ +/* $XFree86: xc/include/Xosdefs.h,v 3.20 2002/05/31 18:45:39 dawes Exp $ */ #ifndef _XOSDEFS_H_ #define _XOSDEFS_H_ @@ -120,7 +120,7 @@ #define X_NOT_STDC_ENV #endif -#ifdef __EMX__ +#ifdef __UNIXOS2__ #define USGISH #define NULL_NOT_ZERO #endif Index: xc/include/DPS/dpsconfig.h diff -u xc/include/DPS/dpsconfig.h:1.5 xc/include/DPS/dpsconfig.h:1.6 --- xc/include/DPS/dpsconfig.h:1.5 Thu Nov 1 18:35:26 2001 +++ xc/include/DPS/dpsconfig.h Thu Apr 4 09:05:35 2002 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/include/DPS/dpsconfig.h,v 1.5 2001/11/01 23:35:26 dawes Exp $ */ +/* $XFree86: xc/include/DPS/dpsconfig.h,v 1.6 2002/04/04 14:05:35 eich Exp $ */ #ifndef DPSCONFIG_H #define DPSCONFIG_H @@ -88,9 +88,10 @@ #if defined(__alpha) || defined(__alpha__) || \ defined(__ia64__) || defined(ia64) || \ - defined(__s390x__) + defined(__s390x__) || \ + defined(__x86_64__) || defined(x86_64) #define IEEEFLOAT 1 -#endif /* __alpha */ +#endif #ifdef __i386__ #define IEEEFLOAT 1 Index: xc/include/DPS/dpsfriends.h diff -u xc/include/DPS/dpsfriends.h:1.4 xc/include/DPS/dpsfriends.h:1.5 --- xc/include/DPS/dpsfriends.h:1.4 Tue Jul 31 20:44:34 2001 +++ xc/include/DPS/dpsfriends.h Tue Aug 20 05:48:18 2002 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/include/DPS/dpsfriends.h,v 1.4 2001/08/01 00:44:34 tsi Exp $ */ +/* $XFree86: xc/include/DPS/dpsfriends.h,v 1.5 2002/08/20 09:48:18 herrb Exp $ */ #ifndef DPSFRIENDS_H #define DPSFRIENDS_H @@ -392,7 +392,7 @@ #ifndef NeXTSTEP #define DPSSYNCHOOK(ctxt) \ - if ((ctxt)->contextFlags && DPS_FLAG_SYNC) DPSWaitContext(ctxt); + if ((ctxt)->contextFlags & DPS_FLAG_SYNC) DPSWaitContext(ctxt); #endif /* NeXT */ /*=== PROCEDURES ===*/ Index: xc/include/GL/Imakefile diff -u xc/include/GL/Imakefile:1.13 xc/include/GL/Imakefile:1.14 --- xc/include/GL/Imakefile:1.13 Mon Apr 30 10:58:48 2001 +++ xc/include/GL/Imakefile Fri Feb 22 16:32:50 2002 @@ -1,11 +1,12 @@ -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.14 2002/02/22 21:32:50 dawes Exp $ LinkSourceFile(gl.h, ../../extras/Mesa/include/GL) LinkSourceFile(glext.h, ../../extras/Mesa/include/GL) +LinkSourceFile(glxext.h, ../../extras/Mesa/include/GL) LinkSourceFile(osmesa.h, ../../extras/Mesa/include/GL) GLXHEADERS = gl.h glext.h glu.h glx.h glxint.h glxmd.h glxproto.h \ - glxtokens.h osmesa.h + glxtokens.h osmesa.h glxext.h HEADERS = $(GLXHEADERS) Index: xc/include/GL/glx.h diff -u xc/include/GL/glx.h:1.8 xc/include/GL/glx.h:1.10 --- xc/include/GL/glx.h:1.8 Wed Mar 21 10:51:38 2001 +++ xc/include/GL/glx.h Wed Oct 30 03:52:36 2002 @@ -1,7 +1,7 @@ #ifndef __GLX_glx_h__ #define __GLX_glx_h__ -/* $XFree86: xc/include/GL/glx.h,v 1.8 2001/03/21 15:51:38 dawes Exp $ */ +/* $XFree86: xc/include/GL/glx.h,v 1.10 2002/10/30 08:52:36 alanh Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -108,14 +108,65 @@ extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask); extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask); -/*** SGI GLX extensions */ +/* GLX 1.4 and later */ +extern void (*glXGetProcAddress(const GLubyte *procname))(void); + + +#ifndef GLX_GLXEXT_LEGACY + +#include + +#else + +/* GLX extensions */ +#define GLX_EXT_import_context 1 +#define GLX_EXT_visual_info 1 +#define GLX_EXT_visual_rating 1 +#define GLX_ARB_get_proc_address 1 extern GLXContextID glXGetContextIDEXT (const GLXContext ctx); -extern GLXDrawable glXGetCurrentDrawableEXT (void); extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID); extern void glXFreeContextEXT (Display *dpy, GLXContext ctx); extern int glXQueryContextInfoEXT (Display *dpy, GLXContext ctx, int attribute, int *value); - +extern Display * glXGetCurrentDisplayEXT (void); extern void (*glXGetProcAddressARB(const GLubyte *procName))( void ); + + + +#endif /* GLX_GLXEXT_LEGACY */ + + +/** + ** The following aren't in glxext.h yet. + **/ + + +/* + * ???. GLX_NV_vertex_array_range + */ +#ifndef GLX_NV_vertex_array_range +#define GLX_NV_vertex_array_range + +extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +extern void glXFreeMemoryNV(GLvoid *pointer); +typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer); + +#endif /* GLX_NV_vertex_array_range */ + + + +/* + * ???. GLX_MESA_agp_offset + */ +#ifndef GLX_MESA_agp_offset +#define GLX_MESA_agp_offset 1 + +extern GLuint glXGetAGPOffsetMESA(const GLvoid *pointer); +typedef GLuint (* PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *pointer); + +#endif /* GLX_MESA_agp_offset */ + + /*** Should these go here, or in another header? */ /* Index: xc/include/GL/glxtokens.h diff -u xc/include/GL/glxtokens.h:1.5 xc/include/GL/glxtokens.h:1.6 --- xc/include/GL/glxtokens.h:1.5 Wed Mar 21 10:51:38 2001 +++ xc/include/GL/glxtokens.h Fri Feb 22 16:32:50 2002 @@ -1,7 +1,7 @@ #ifndef __GLX_glxtokens_h__ #define __GLX_glxtokens_h__ -/* $XFree86: xc/include/GL/glxtokens.h,v 1.5 2001/03/21 15:51:38 dawes Exp $ */ +/* $XFree86: xc/include/GL/glxtokens.h,v 1.6 2002/02/22 21:32:50 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 @@ -43,6 +43,7 @@ #define GLX_VERSION_1_1 1 #define GLX_VERSION_1_2 1 #define GLX_VERSION_1_3 1 +#define GLX_VERSION_1_4 1 /* ** Visual Config Attributes (glXGetConfig, glXGetFBConfigAttrib) @@ -217,11 +218,11 @@ #define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */ #define GLX_SCREEN_EXT 0x800C /* screen number */ -/* GLX Extension Strings */ -#define GLX_EXT_import_context 1 -#define GLX_EXT_visual_info 1 -#define GLX_EXT_visual_rating 1 -#define GLX_ARB_get_proc_address 1 +/* + * GLX 1.4 and later: + */ +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 #ifdef __cplusplus } Index: xc/include/extensions/Imakefile diff -u xc/include/extensions/Imakefile:3.47 xc/include/extensions/Imakefile:3.53 --- xc/include/extensions/Imakefile:3.47 Sun Dec 16 13:19:50 2001 +++ xc/include/extensions/Imakefile Mon Dec 16 11:18:49 2002 @@ -3,9 +3,9 @@ -XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.47 2001/12/16 18:19:50 keithp Exp $ +XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.53 2002/12/16 16:18:49 dawes Exp $ -#if BuildScreenSaverExt || BuildScreenSaveLibrary +#if BuildScreenSaverExt || BuildScreenSaverLibrary SCREENSAVERHEADERS = saver.h saverproto.h scrnsaver.h #endif @@ -48,27 +48,36 @@ XTRAPHEADERS = xtrapbits.h xtrapddmi.h xtrapdi.h xtrapemacros.h xtraplib.h \ xtraplibp.h xtrapproto.h #endif +#if BuildXResExt || BuildXResLibrary +XRESHEADERS = XRes.h XResproto.h +#endif EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \ $(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XINERAMAHEADERS) \ $(LBXHEADERS) $(XVHEADERS) $(XVMCHEADERS) $(XF86RUSHHEADERS) \ $(FONTCACHEHEADERS) $(RENDERHEADERS) $(RANDRHEADERS) \ - $(XTRAPHEADERS) + $(XTRAPHEADERS) $(XRESHEADERS) -HEADERS = Xext.h multibuf.h shape.h sync.h XShm.h MITMisc.h \ +HEADERS = Xext.h \ + xcmiscstr.h \ + MITMisc.h mitmiscstr.h \ + bigreqstr.h \ + extutil.h \ XI.h XInput.h XIproto.h \ - XTest.h xtestext1.h \ + XTest.h xtestext1.h xteststr.h \ XIE.h XIEproto.h XIEprotost.h \ XKB.h XKBgeom.h XKBproto.h XKBstr.h XKBsrv.h \ Xdbe.h Xdbeproto.h \ Xag.h Xagstr.h Xagsrv.h \ + XShm.h shmstr.h \ $(EXTRAHEADERS) \ + multibuf.h multibufst.h \ record.h recordstr.h \ - lbxbuf.h lbxbufstr.h lbxdeltastr.h lbximage.h \ - lbxopts.h lbxstr.h lbxzlib.h \ security.h securstr.h \ + shape.h shapestr.h \ + sync.h syncstr.h \ Print.h Printstr.h \ Xcup.h Xcupstr.h \ dpms.h dpmsstr.h \ Index: xc/include/extensions/XKB.h diff -u xc/include/extensions/XKB.h:1.4 xc/include/extensions/XKB.h:1.5 --- xc/include/extensions/XKB.h:1.4 Wed Jan 17 12:53:17 2001 +++ xc/include/extensions/XKB.h Tue Nov 19 23:49:01 2002 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XKB.h,v 1.4 2001/01/17 17:53:17 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XKB.h,v 1.5 2002/11/20 04:49:01 dawes Exp $ */ #ifndef _XKB_H_ #define _XKB_H_ @@ -501,6 +501,10 @@ #define XkbSA_DeviceValuator 0x14 #define XkbSA_LastAction XkbSA_DeviceValuator #define XkbSA_NumActions (XkbSA_LastAction+1) + +#if defined(XF86DDXACTIONS) || defined(XFree86Server) +#define XkbSA_XFree86Private 0x86 +#endif /* * Specifies the key actions that clear latched groups or modifiers. Index: xc/include/extensions/XKBgeom.h diff -u xc/include/extensions/XKBgeom.h:3.8 xc/include/extensions/XKBgeom.h:3.9 --- xc/include/extensions/XKBgeom.h:3.8 Tue Jul 31 20:44:35 2001 +++ xc/include/extensions/XKBgeom.h Wed Sep 18 13:11:40 2002 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XKBgeom.h,v 3.8 2001/08/01 00:44:35 tsi Exp $ */ +/* $XFree86: xc/include/extensions/XKBgeom.h,v 3.9 2002/09/18 17:11:40 tsi Exp $ */ #ifndef _XKBGEOM_H_ #define _XKBGEOM_H_ @@ -113,7 +113,7 @@ XkbOutlinePtr primary; XkbBoundsRec bounds; } XkbShapeRec, *XkbShapePtr; -#define XkbOutlineIndex(s,o) ((o)-&(s)->outlines[0]) +#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0])) typedef struct _XkbShapeDoodad { Atom name; @@ -295,7 +295,7 @@ XkbDoodadPtr doodads; XkbKeyAliasPtr key_aliases; } XkbGeometryRec; -#define XkbGeomColorIndex(g,c) ((c)-&(g)->colors[0]) +#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0])) #define XkbGeomPropertiesMask (1<<0) #define XkbGeomColorsMask (1<<1) Index: xc/include/extensions/XKBsrv.h diff -u xc/include/extensions/XKBsrv.h:3.21 xc/include/extensions/XKBsrv.h:3.22 --- xc/include/extensions/XKBsrv.h:3.21 Thu Aug 23 10:46:27 2001 +++ xc/include/extensions/XKBsrv.h Tue Nov 19 23:49:01 2002 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.21 2001/08/23 14:46:27 alanh Exp $ */ +/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.22 2002/11/20 04:49:01 dawes Exp $ */ #ifndef _XKBSRV_H_ #define _XKBSRV_H_ @@ -1060,6 +1060,14 @@ ); extern int XkbDDXSwitchScreen( +#if NeedFunctionPrototypes + DeviceIntPtr /* dev */, + KeyCode /* key */, + XkbAction * /* act */ +#endif +); + +extern int XkbDDXPrivate( #if NeedFunctionPrototypes DeviceIntPtr /* dev */, KeyCode /* key */, Index: xc/include/extensions/XLbx.h diff -u xc/include/extensions/XLbx.h:1.2 xc/include/extensions/XLbx.h:1.3 --- xc/include/extensions/XLbx.h:1.2 Tue Jul 31 20:44:35 2001 +++ xc/include/extensions/XLbx.h Tue Oct 15 21:59:55 2002 @@ -20,7 +20,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/include/extensions/XLbx.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ +/* $XFree86: xc/include/extensions/XLbx.h,v 1.3 2002/10/16 01:59:55 dawes Exp $ */ #ifndef _XLBX_H_ #define _XLBX_H_ @@ -149,6 +149,8 @@ int* /* minorVersion */ #endif ); + +int XLbxGetEventBase(Display *dpy); _XFUNCPROTOEND Index: xc/include/extensions/XRes.h diff -u /dev/null xc/include/extensions/XRes.h:1.3 --- /dev/null Thu Feb 27 12:26:00 2003 +++ xc/include/extensions/XRes.h Sun Mar 10 17:05:51 2002 @@ -0,0 +1,57 @@ +/* + Copyright (c) 2002 XFree86 Inc +*/ +/* $XFree86: xc/include/extensions/XRes.h,v 1.3 2002/03/10 22:05:51 mvojkovi Exp $ */ + +#ifndef _XRES_H +#define _XRES_H + +#include + +typedef struct { + XID resource_base; + XID resource_mask; +} XResClient; + +typedef struct { + Atom resource_type; + unsigned int count; +} XResType; + +_XFUNCPROTOBEGIN + + +Bool XResQueryExtension ( + Display *dpy, + int *event_base, + int *error_base +); + +Status XResQueryVersion ( + Display *dpy, + int *major, + int *minor +); + +Status XResQueryClients ( + Display *dpy, + int *num_clients, + XResClient **clients +); + +Status XResQueryClientResources ( + Display *dpy, + XID xid, + int *num_types, + XResType **types +); + +Status XResQueryClientPixmapBytes ( + Display *dpy, + XID xid, + unsigned long *bytes +); + +_XFUNCPROTOEND + +#endif /* _XRES_H */ Index: xc/include/extensions/XResproto.h diff -u /dev/null xc/include/extensions/XResproto.h:1.2 --- /dev/null Thu Feb 27 12:26:00 2003 +++ xc/include/extensions/XResproto.h Sun Mar 10 17:05:51 2002 @@ -0,0 +1,130 @@ +/* + Copyright (c) 2002 XFree86 Inc +*/ +/* $XFree86: xc/include/extensions/XResproto.h,v 1.2 2002/03/10 22:05:51 mvojkovi Exp $ */ + +#ifndef _XRESPROTO_H +#define _XRESPROTO_H + +#define XRES_MAJOR_VERSION 1 +#define XRES_MINOR_VERSION 0 + +#define XRES_NAME "X-Resource" + +#define X_XResQueryVersion 0 +#define X_XResQueryClients 1 +#define X_XResQueryClientResources 2 +#define X_XResQueryClientPixmapBytes 3 + +typedef struct { + CARD32 resource_base; + CARD32 resource_mask; +} xXResClient; +#define sz_xXResClient 8 + +typedef struct { + CARD32 resource_type; + CARD32 count; +} xXResType; +#define sz_xXResType 8 + +/* XResQueryVersion */ + +typedef struct _XResQueryVersion { + CARD8 reqType; + CARD8 XResReqType; + CARD16 length B16; + CARD8 client_major; + CARD8 client_minor; + CARD16 unused B16; +} xXResQueryVersionReq; +#define sz_xXResQueryVersionReq 8 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 server_major B16; + CARD16 server_minor B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXResQueryVersionReply; +#define sz_xXResQueryVersionReply 32 + +/* XResQueryClients */ + +typedef struct _XResQueryClients { + CARD8 reqType; + CARD8 XResReqType; + CARD16 length B16; +} xXResQueryClientsReq; +#define sz_xXResQueryClientsReq 4 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 num_clients B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXResQueryClientsReply; +#define sz_xXResQueryClientsReply 32 + +/* XResQueryClientResources */ + +typedef struct _XResQueryClientResources { + CARD8 reqType; + CARD8 XResReqType; + CARD16 length B16; + CARD32 xid B32; +} xXResQueryClientResourcesReq; +#define sz_xXResQueryClientResourcesReq 8 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 num_types B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXResQueryClientResourcesReply; +#define sz_xXResQueryClientResourcesReply 32 + +/* XResQueryClientPixmapBytes */ + +typedef struct _XResQueryClientPixmapBytes { + CARD8 reqType; + CARD8 XResReqType; + CARD16 length B16; + CARD32 xid B32; +} xXResQueryClientPixmapBytesReq; +#define sz_xXResQueryClientPixmapBytesReq 8 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 bytes B32; + CARD32 bytes_overflow B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXResQueryClientPixmapBytesReply; +#define sz_xXResQueryClientPixmapBytesReply 32 + + +#endif /* _XRESPROTO_H */ Index: xc/include/extensions/XShm.h diff -u xc/include/extensions/XShm.h:1.8 xc/include/extensions/XShm.h:1.10 --- xc/include/extensions/XShm.h:1.8 Fri Dec 14 14:53:28 2001 +++ xc/include/extensions/XShm.h Thu Nov 7 19:46:27 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/XShm.h,v 1.8 2001/12/14 19:53:28 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XShm.h,v 1.10 2002/11/08 00:46:27 alanh Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -73,7 +73,13 @@ Bool XShmQueryExtension( #if NeedFunctionPrototypes - Display* /* dpy */ + Display* /* dpy */ +#endif +); + +int XShmGetEventBase( +#if NeedFunctionPrototypes + Display* /* dpy */ #endif ); @@ -169,6 +175,8 @@ #else /* _XSHM_SERVER_ */ #include "screenint.h" +#include "pixmap.h" +#include "gc.h" extern void ShmRegisterFbFuncs( #if NeedFunctionPrototypes Index: xc/include/extensions/Xinerama.h diff -u xc/include/extensions/Xinerama.h:3.2 xc/include/extensions/Xinerama.h:3.3 --- xc/include/extensions/Xinerama.h:3.2 Tue Feb 29 20:04:20 2000 +++ xc/include/extensions/Xinerama.h Mon Sep 16 14:05:19 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/Xinerama.h,v 3.2 2000/03/01 01:04:20 dawes Exp $ */ +/* $XFree86: xc/include/extensions/Xinerama.h,v 3.3 2002/09/16 18:05:19 eich Exp $ */ #ifndef _Xinerama_h #define _Xinerama_h @@ -11,6 +11,8 @@ short height; } XineramaScreenInfo; +_XFUNCPROTOBEGIN + Bool XineramaQueryExtension ( Display *dpy, int *event_base, @@ -39,6 +41,8 @@ Display *dpy, int *number ); + +_XFUNCPROTOEND #endif /* _Xinerama_h */ Index: xc/include/extensions/randr.h diff -u xc/include/extensions/randr.h:1.4 xc/include/extensions/randr.h:1.6 --- xc/include/extensions/randr.h:1.4 Sat Nov 24 02:24:58 2001 +++ xc/include/extensions/randr.h Mon Oct 14 14:01:38 2002 @@ -1,54 +1,70 @@ /* - * $XFree86: xc/include/extensions/randr.h,v 1.4 2001/11/24 07:24:58 keithp Exp $ + * $XFree86: xc/include/extensions/randr.h,v 1.6 2002/10/14 18:01:38 keithp Exp $ * - * Copyright © 2000 Compaq Computer Corporation, Inc. + * Copyright © 2000, Compaq Computer Corporation, + * Copyright © 2002, Hewlett Packard, 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 Compaq not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Compaq makes no representations about the + * documentation, and that the name of Compaq or HP not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. HP makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * - * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ + * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP * 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. * - * Author: Jim Gettys, Compaq Computer Corporation, Inc. + * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. */ #ifndef _RANDR_H_ #define _RANDR_H_ typedef unsigned short Rotation; -typedef unsigned short VisualGroupID; -typedef unsigned short GroupOfVisualGroupID; typedef unsigned short SizeID; +typedef unsigned short SubpixelOrder; #define RANDR_NAME "RANDR" -#define RANDR_MAJOR 0 -#define RANDR_MINOR 0 +#define RANDR_MAJOR 1 +#define RANDR_MINOR 1 #define RRNumberErrors 0 #define RRNumberEvents 1 #define X_RRQueryVersion 0 -#define X_RRGetScreenInfo 1 +/* we skip 1 to make old clients fail pretty immediately */ +#define X_RROldGetScreenInfo 1 +#define X_RR1_0SetScreenConfig 2 +/* V1.0 apps share the same set screen config request id */ #define X_RRSetScreenConfig 2 -#define X_RRScreenChangeSelectInput 3 +#define X_RROldScreenChangeSelectInput 3 +/* 3 used to be ScreenChangeSelectInput; deprecated */ +#define X_RRSelectInput 4 +#define X_RRGetScreenInfo 5 +/* used in XRRSelectInput */ + +#define RRScreenChangeNotifyMask (1L << 0) + #define RRScreenChangeNotify 0 +/* used in the rotation field; rotation and reflection in 0.1 proto. */ #define RR_Rotate_0 1 #define RR_Rotate_90 2 #define RR_Rotate_180 4 #define RR_Rotate_270 8 + +/* new in 1.0 protocol, to allow reflection of screen */ + +#define RR_Reflect_X 16 +#define RR_Reflect_Y 32 #define RRSetConfigSuccess 0 #define RRSetConfigInvalidConfigTime 1 Index: xc/include/extensions/randrproto.h diff -u xc/include/extensions/randrproto.h:1.5 xc/include/extensions/randrproto.h:1.8 --- xc/include/extensions/randrproto.h:1.5 Tue Jul 31 20:44:35 2001 +++ xc/include/extensions/randrproto.h Mon Oct 14 14:01:38 2002 @@ -1,28 +1,31 @@ /* - * $XFree86: xc/include/extensions/randrproto.h,v 1.5 2001/08/01 00:44:35 tsi Exp $ + * $XFree86: xc/include/extensions/randrproto.h,v 1.8 2002/10/14 18:01:38 keithp Exp $ * * Copyright © 2000 Compaq Computer Corporation + * Copyright © 2002 Hewlett-Packard Company * * 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 Compaq not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Compaq makes no representations about the + * documentation, and that the name of Compaq or HP not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. Compaq and HP makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * - * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ * 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. * - * Author: Jim Gettys, Compaq Computer Corporation, Inc. + * Author: Jim Gettys, Hewlett-Packard Company, Inc. */ +/* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */ +/* V1.0 removes depth switching from the protocol */ #ifndef _XRANDRP_H_ #define _XRANDRP_H_ @@ -36,15 +39,13 @@ #define Colormap CARD32 #define GContext CARD32 #define Atom CARD32 -#define VisualID CARD32 #define Time CARD32 #define KeyCode CARD8 #define KeySym CARD32 #define Rotation CARD16 -#define VisualGroupID CARD16 -#define GroupOfVisualGroupID CARD16 #define SizeID CARD16 +#define SubpixelOrder CARD16 /* * data structures @@ -55,13 +56,9 @@ CARD16 heightInPixels B16; CARD16 widthInMillimeters B16; CARD16 heightInMillimeters B16; - GroupOfVisualGroupID visualGroup B16; - CARD16 pad1 B16; } xScreenSizes; -#define sz_xScreenSizes 12 +#define sz_xScreenSizes 8 - - /* * requests and replies */ @@ -97,6 +94,13 @@ } xRRGetScreenInfoReq; #define sz_xRRGetScreenInfoReq 8 +/* + * the xRRScreenInfoReply structure is followed by: + * + * the size information + */ + + typedef struct { BYTE type; /* X_Reply */ BYTE setOfRotations; @@ -105,12 +109,12 @@ Window root B32; Time timestamp B32; Time configTimestamp B32; - CARD16 nVisualGroups B16; - CARD16 nGroupsOfVisualGroups B16; CARD16 nSizes B16; SizeID sizeID B16; - VisualGroupID visualGroupID B16; Rotation rotation B16; + CARD16 rate B16; + CARD16 nrateEnts B16; + CARD16 pad B16; } xRRGetScreenInfoReply; #define sz_xRRGetScreenInfoReply 32 @@ -122,8 +126,20 @@ Time timestamp B32; Time configTimestamp B32; SizeID sizeID B16; + Rotation rotation B16; +} xRR1_0SetScreenConfigReq; +#define sz_xRR1_0SetScreenConfigReq 20 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Drawable drawable B32; + Time timestamp B32; + Time configTimestamp B32; + SizeID sizeID B16; Rotation rotation B16; - VisualGroupID visualGroupID B16; + CARD16 rate B16; CARD16 pad B16; } xRRSetScreenConfigReq; #define sz_xRRSetScreenConfigReq 24 @@ -136,7 +152,8 @@ Time newTimestamp B32; Time newConfigTimestamp B32; Window root; - CARD32 pad4 B32; + CARD16 subpixelOrder B16; + CARD16 pad4 B16; CARD32 pad5 B32; CARD32 pad6 B32; } xRRSetScreenConfigReply; @@ -147,11 +164,12 @@ CARD8 randrReqType; CARD16 length B16; Window window B32; - BYTE enable; /* xTrue -> send events */ - BYTE pad1; + CARD16 enable B16; CARD16 pad2 B16; -} xRRScreenChangeSelectInputReq; -#define sz_xRRScreenChangeSelectInputReq 12 +} xRRSelectInputReq; +#define sz_xRRSelectInputReq 12 + +#define sz_xRRSelectInputReq 12 /* * event @@ -165,7 +183,7 @@ Window root B32; /* root window */ Window window B32; /* window requesting notification */ SizeID sizeID B16; /* new size ID */ - VisualGroupID visualGroupID B16; /* new visual group ID */ + CARD16 subpixelOrder B16; /* subpixel order */ CARD16 widthInPixels B16; /* new size */ CARD16 heightInPixels B16; CARD16 widthInMillimeters B16; @@ -181,13 +199,11 @@ #undef Colormap #undef GContext #undef Atom -#undef VisualID #undef Time #undef KeyCode #undef KeySym #undef Rotation -#undef VisualGroupID -#undef GroupOfVisualGroupID #undef SizeID +#undef SubpixelOrder #endif /* _XRANDRP_H_ */ Index: xc/include/extensions/render.h diff -u xc/include/extensions/render.h:1.4 xc/include/extensions/render.h:1.11 --- xc/include/extensions/render.h:1.4 Thu Aug 16 04:03:25 2001 +++ xc/include/extensions/render.h Fri Nov 22 21:34:45 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/include/extensions/render.h,v 1.4 2001/08/16 08:03:25 keithp Exp $ + * $XFree86: xc/include/extensions/render.h,v 1.11 2002/11/23 02:34:45 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -33,11 +33,11 @@ #define RENDER_NAME "RENDER" #define RENDER_MAJOR 0 -#define RENDER_MINOR 2 +#define RENDER_MINOR 8 #define X_RenderQueryVersion 0 #define X_RenderQueryPictFormats 1 -#define X_RenderQueryPictIndexValues 2 +#define X_RenderQueryPictIndexValues 2 /* 0.7 */ #define X_RenderQueryDithers 3 #define X_RenderCreatePicture 4 #define X_RenderChangePicture 5 @@ -51,7 +51,7 @@ #define X_RenderTriFan 13 #define X_RenderColorTrapezoids 14 #define X_RenderColorTriangles 15 -#define X_RenderTransform 16 +/* #define X_RenderTransform 16 */ #define X_RenderCreateGlyphSet 17 #define X_RenderReferenceGlyphSet 18 #define X_RenderFreeGlyphSet 19 @@ -62,6 +62,14 @@ #define X_RenderCompositeGlyphs16 24 #define X_RenderCompositeGlyphs32 25 #define X_RenderFillRectangles 26 +/* 0.5 */ +#define X_RenderCreateCursor 27 +/* 0.6 */ +#define X_RenderSetPictureTransform 28 +#define X_RenderQueryFilters 29 +#define X_RenderSetPictureFilter 30 +#define X_RenderCreateAnimCursor 31 +#define RenderNumberRequests (X_RenderCreateAnimCursor+1) #define BadPictFormat 0 #define BadPicture 1 @@ -143,5 +151,23 @@ #define CPDither (1 << 11) #define CPComponentAlpha (1 << 12) #define CPLastBit 11 + +/* Filters included in 0.6 */ +#define FilterNearest "nearest" +#define FilterBilinear "bilinear" + +#define FilterFast "fast" +#define FilterGood "good" +#define FilterBest "best" + +#define FilterAliasNone -1 + +/* Subpixel orders included in 0.6 */ +#define SubPixelUnknown 0 +#define SubPixelHorizontalRGB 1 +#define SubPixelHorizontalBGR 2 +#define SubPixelVerticalRGB 3 +#define SubPixelVerticalBGR 4 +#define SubPixelNone 5 #endif /* _RENDER_H_ */ Index: xc/include/extensions/renderproto.h diff -u xc/include/extensions/renderproto.h:1.9 xc/include/extensions/renderproto.h:1.13 --- xc/include/extensions/renderproto.h:1.9 Fri Sep 7 12:21:15 2001 +++ xc/include/extensions/renderproto.h Fri Nov 22 21:34:45 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/include/extensions/renderproto.h,v 1.9 2001/09/07 16:21:15 keithp Exp $ + * $XFree86: xc/include/extensions/renderproto.h,v 1.13 2002/11/23 02:34:45 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -126,12 +126,28 @@ #define sz_xPointFixed 8 typedef struct { + xPointFixed p1; + xPointFixed p2; +} xLineFixed; + +#define sz_xLineFixed 16 + +typedef struct { xPointFixed p1, p2, p3; } xTriangle; #define sz_xTriangle 24 typedef struct { + Fixed top B32; + Fixed bottom B32; + xLineFixed left; + xLineFixed right; +} xTrapezoid; + +#define sz_xTrapezoid 40 + +typedef struct { CARD16 width B16; CARD16 height B16; INT16 x B16; @@ -197,7 +213,7 @@ CARD32 numScreens B32; CARD32 numDepths B32; CARD32 numVisuals B32; - CARD32 pad4 B32; + CARD32 numSubpixel B32; /* Version 0.6 */ CARD32 pad5 B32; } xRenderQueryPictFormatsReply; @@ -313,18 +329,70 @@ CARD8 reqType; CARD8 renderReqType; CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture src B32; + Picture dst B32; + PictFormat maskFormat B32; + INT16 xSrc B16; + INT16 ySrc B16; +} xRenderTrapezoidsReq; + +#define sz_xRenderTrapezoidsReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; Picture src B32; Picture dst B32; + PictFormat maskFormat B32; INT16 xSrc B16; INT16 ySrc B16; } xRenderTrianglesReq; + +#define sz_xRenderTrianglesReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture src B32; + Picture dst B32; + PictFormat maskFormat B32; + INT16 xSrc B16; + INT16 ySrc B16; +} xRenderTriStripReq; -#define sz_xRenderTrianglesReq 16 +#define sz_xRenderTriStripReq 24 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture src B32; + Picture dst B32; + PictFormat maskFormat B32; + INT16 xSrc B16; + INT16 ySrc B16; +} xRenderTriFanReq; + +#define sz_xRenderTriFanReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; Glyphset gsid B32; PictFormat format B32; } xRenderCreateGlyphSetReq; @@ -403,6 +471,102 @@ } xRenderFillRectanglesReq; #define sz_xRenderFillRectanglesReq 20 + +/* 0.5 and higher */ + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Cursor cid B32; + Picture src B32; + CARD16 x B16; + CARD16 y B16; +} xRenderCreateCursorReq; + +#define sz_xRenderCreateCursorReq 16 + +/* 0.6 and higher */ + +/* + * This can't use an array because 32-bit values may be in bitfields + */ +typedef struct { + Fixed matrix11 B32; + Fixed matrix12 B32; + Fixed matrix13 B32; + Fixed matrix21 B32; + Fixed matrix22 B32; + Fixed matrix23 B32; + Fixed matrix31 B32; + Fixed matrix32 B32; + Fixed matrix33 B32; +} xRenderTransform; + +#define sz_xRenderTransform 36 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture picture B32; + xRenderTransform transform; +} xRenderSetPictureTransformReq; + +#define sz_xRenderSetPictureTransformReq 44 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Drawable drawable B32; +} xRenderQueryFiltersReq; + +#define sz_xRenderQueryFiltersReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numAliases B32; /* LISTofCARD16 */ + CARD32 numFilters B32; /* LISTofSTRING8 */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRenderQueryFiltersReply; + +#define sz_xRenderQueryFiltersReply 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture picture B32; + CARD16 nbytes B16; /* number of bytes in name */ + CARD16 pad B16; +} xRenderSetPictureFilterReq; + +#define sz_xRenderSetPictureFilterReq 12 + +/* 0.8 and higher */ + +typedef struct { + Cursor cursor B32; + CARD32 delay B32; +} xAnimCursorElt; + +#define sz_xAnimCursorElt 8 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Cursor cid B32; +} xRenderCreateAnimCursorReq; + +#define sz_xRenderCreateAnimCursorReq 8 #undef Window #undef Drawable Index: xc/include/extensions/saverproto.h diff -u xc/include/extensions/saverproto.h:3.1 xc/include/extensions/saverproto.h:3.2 --- xc/include/extensions/saverproto.h:3.1 Tue Jul 31 20:44:35 2001 +++ xc/include/extensions/saverproto.h Mon Sep 16 14:05:19 2002 @@ -26,13 +26,26 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/include/extensions/saverproto.h,v 3.1 2001/08/01 00:44:35 tsi Exp $ */ +/* $XFree86: xc/include/extensions/saverproto.h,v 3.2 2002/09/16 18:05:19 eich Exp $ */ #ifndef _SAVERPROTO_H_ #define _SAVERPROTO_H_ #include +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + #define X_ScreenSaverQueryVersion 0 typedef struct _ScreenSaverQueryVersion { @@ -138,5 +151,18 @@ CARD32 pad3 B32; } xScreenSaverNotifyEvent; #define sz_xScreenSaverNotifyEvent 32 + +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym #endif /* _SAVERPROTO_H_ */ Index: xc/include/extensions/security.h diff -u xc/include/extensions/security.h:1.3 xc/include/extensions/security.h:1.4 --- xc/include/extensions/security.h:1.3 Fri Dec 14 14:53:29 2001 +++ xc/include/extensions/security.h Thu Nov 7 19:46:27 2002 @@ -24,7 +24,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/extensions/security.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ +/* $XFree86: xc/include/extensions/security.h,v 1.4 2002/11/08 00:46:27 alanh Exp $ */ #ifndef _SECURITY_H #define _SECURITY_H @@ -110,6 +110,8 @@ #include "input.h" /* for DeviceIntPtr */ #include "property.h" /* for PropertyPtr */ +#include "pixmap.h" /* for DrawablePtr */ +#include "resource.h" /* for RESTYPE */ /* resource type to pass in LookupIDByType for authorizations */ extern RESTYPE SecurityAuthorizationResType; Index: xc/include/extensions/xf86misc.h diff -u xc/include/extensions/xf86misc.h:3.14 xc/include/extensions/xf86misc.h:3.16 --- xc/include/extensions/xf86misc.h:3.14 Wed Aug 15 12:25:20 2001 +++ xc/include/extensions/xf86misc.h Tue Nov 19 23:04:56 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86misc.h,v 3.14 2001/08/15 16:25:20 paulo Exp $ */ +/* $XFree86: xc/include/extensions/xf86misc.h,v 3.16 2002/11/20 04:04:56 dawes Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc @@ -21,6 +21,8 @@ #define X_XF86MiscSetMouseSettings 5 #define X_XF86MiscSetKbdSettings 6 #define X_XF86MiscSetGrabKeysState 7 +#define X_XF86MiscSetClientVersion 8 +#define X_XF86MiscGetFilePaths 9 #define XF86MiscNumberEvents 0 @@ -32,7 +34,7 @@ #define XF86MiscModInDevDisabled 5 #define XF86MiscModInDevClientNotLocal 6 #define XF86MiscNoModule 7 -#define XF86MiscNumberErrors (XF86MiscModInDevClientNotLocal + 1) +#define XF86MiscNumberErrors (XF86MiscNoModule + 1) /* Never renumber these */ #define MTYPE_MICROSOFT 0 @@ -102,6 +104,12 @@ Bool servnumlock; } XF86MiscKbdSettings; +typedef struct { + char* configfile; + char* modulepath; + char* logfile; +} XF86MiscFilePaths; + Bool XF86MiscQueryVersion( Display* /* dpy */, int* /* majorVersion */, @@ -114,6 +122,10 @@ int* /* error_base */ ); +Bool XF86MiscSetClientVersion( + Display *dpy /* dpy */ +); + Status XF86MiscGetMouseSettings( Display* /* dpy */, XF86MiscMouseSettings* /* mouse info */ @@ -137,6 +149,11 @@ int XF86MiscSetGrabKeysState( Display* /* dpy */, Bool /* enabled */ +); + +Status XF86MiscGetFilePaths( + Display* /* dpy */, + XF86MiscFilePaths* /* file paths/locations */ ); _XFUNCPROTOEND Index: xc/include/extensions/xf86mscstr.h diff -u xc/include/extensions/xf86mscstr.h:3.10 xc/include/extensions/xf86mscstr.h:3.12 --- xc/include/extensions/xf86mscstr.h:3.10 Wed Aug 15 12:25:20 2001 +++ xc/include/extensions/xf86mscstr.h Tue Nov 19 23:04:56 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86mscstr.h,v 3.10 2001/08/15 16:25:20 paulo Exp $ */ +/* $XFree86: xc/include/extensions/xf86mscstr.h,v 3.12 2002/11/20 04:04:56 dawes Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc @@ -14,7 +14,7 @@ #define XF86MISCNAME "XFree86-Misc" #define XF86MISC_MAJOR_VERSION 0 /* current version numbers */ -#define XF86MISC_MINOR_VERSION 5 +#define XF86MISC_MINOR_VERSION 7 typedef struct _XF86MiscQueryVersion { CARD8 reqType; /* always XF86MiscReqCode */ @@ -134,7 +134,7 @@ CARD32 buttons B32; BOOL emulate3buttons; BOOL chordmiddle; - CARD16 pad2 B16; + CARD16 devnamelen B16; CARD32 emulate3timeout B32; CARD32 flags B32; } xXF86MiscSetMouseSettingsReq; @@ -176,5 +176,37 @@ CARD32 pad6 B32; } xXF86MiscSetGrabKeysStateReply; #define sz_xXF86MiscSetGrabKeysStateReply 32 + +typedef struct _XF86MiscSetClientVersion { + CARD8 reqType; /* always XF86MiscReqCode */ + CARD8 xf86miscReqType; + CARD16 length B16; + CARD16 major B16; + CARD16 minor B16; +} xXF86MiscSetClientVersionReq; +#define sz_xXF86MiscSetClientVersionReq 8 + +typedef struct _XF86MiscGetFilePaths { + CARD8 reqType; /* always XF86MiscReqCode */ + CARD8 xf86miscReqType; /* always X_XF86MiscGetFilePaths */ + CARD16 length B16; +} xXF86MiscGetFilePathsReq; +#define sz_xXF86MiscGetFilePathsReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 configlen B16; + CARD16 modulelen B16; + CARD16 loglen B16; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXF86MiscGetFilePathsReply; +#define sz_xXF86MiscGetFilePathsReply 32 #endif /* _XF86MISCSTR_H_ */ Index: xc/include/extensions/xf86vmode.h diff -u xc/include/extensions/xf86vmode.h:3.30 xc/include/extensions/xf86vmode.h:3.31 --- xc/include/extensions/xf86vmode.h:3.30 Mon May 7 16:09:50 2001 +++ xc/include/extensions/xf86vmode.h Sat Dec 21 19:46:50 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ */ +/* $XFree86: xc/include/extensions/xf86vmode.h,v 3.31 2002/12/22 00:46:50 dawes Exp $ */ /* Copyright 1995 Kaleb S. KEITHLEY @@ -59,6 +59,7 @@ #define X_XF86VidModeGetGammaRamp 17 #define X_XF86VidModeSetGammaRamp 18 #define X_XF86VidModeGetGammaRampSize 19 +#define X_XF86VidModeGetPermissions 20 #define CLKFLAG_PROGRAMABLE 1 @@ -83,6 +84,9 @@ #define XF86VidModeZoomLocked 6 #define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1) +#define XF86VM_READ_PERMISSION 1 +#define XF86VM_WRITE_PERMISSION 2 + #ifndef _XF86VIDMODE_SERVER_ typedef struct { @@ -305,6 +309,11 @@ int* /* size */ ); +Bool XF86VidModeGetPermissions( + Display* /* dpy */, + int /* screen */, + int* /* permissions */ +); _XFUNCPROTOEND Index: xc/include/extensions/xf86vmstr.h diff -u xc/include/extensions/xf86vmstr.h:3.27 xc/include/extensions/xf86vmstr.h:3.28 --- xc/include/extensions/xf86vmstr.h:3.27 Tue Jul 31 20:44:36 2001 +++ xc/include/extensions/xf86vmstr.h Sat Dec 21 19:46:50 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.27 2001/08/01 00:44:36 tsi Exp $ */ +/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.28 2002/12/22 00:46:50 dawes Exp $ */ /* Copyright 1995 Kaleb S. KEITHLEY @@ -40,7 +40,7 @@ #define XF86VIDMODENAME "XFree86-VidModeExtension" #define XF86VIDMODE_MAJOR_VERSION 2 /* current version numbers */ -#define XF86VIDMODE_MINOR_VERSION 1 +#define XF86VIDMODE_MINOR_VERSION 2 /* * major version 0 == uses parameter-to-wire functions in XFree86 libXxf86vm. * major version 1 == uses parameter-to-wire functions hard-coded in xvidtune @@ -80,12 +80,14 @@ xXF86VidModeGetAllModeLinesReq, xXF86VidModeGetMonitorReq, xXF86VidModeGetViewPortReq, - xXF86VidModeGetDotClocksReq; + xXF86VidModeGetDotClocksReq, + xXF86VidModeGetPermissionsReq; #define sz_xXF86VidModeGetModeLineReq 8 #define sz_xXF86VidModeGetAllModeLinesReq 8 #define sz_xXF86VidModeGetMonitorReq 8 #define sz_xXF86VidModeGetViewPortReq 8 #define sz_xXF86VidModeGetDotClocksReq 8 +#define sz_xXF86VidModeGetPermissionsReq 8 typedef struct { BYTE type; /* X_Reply */ @@ -540,6 +542,20 @@ CARD32 pad5 B32; } xXF86VidModeGetGammaRampSizeReply; #define sz_xXF86VidModeGetGammaRampSizeReply 32 + +typedef struct { + BYTE type; + BOOL pad; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 permissions B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXF86VidModeGetPermissionsReply; +#define sz_xXF86VidModeGetPermissionsReply 32 #endif /* _XF86VIDMODESTR_H_ */ Index: xc/include/extensions/xtrapproto.h diff -u xc/include/extensions/xtrapproto.h:1.1 xc/include/extensions/xtrapproto.h:1.2 --- xc/include/extensions/xtrapproto.h:1.1 Fri Nov 2 18:29:26 2001 +++ xc/include/extensions/xtrapproto.h Fri Feb 22 16:32:51 2002 @@ -1,8 +1,7 @@ -/* $XFree86: xc/include/extensions/xtrapproto.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ +/* $XFree86: xc/include/extensions/xtrapproto.h,v 1.2 2002/02/22 21:32:51 dawes Exp $ */ #ifndef __XTRAPPROTO__ #define __XTRAPPROTO__ -/* RCSID = $Header$" */ /***************************************************************************** Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA Index: xc/lib/Imakefile diff -u xc/lib/Imakefile:3.58 xc/lib/Imakefile:3.73 --- xc/lib/Imakefile:3.58 Fri Nov 2 18:29:26 2001 +++ xc/lib/Imakefile Tue Jan 28 17:07:30 2003 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/Imakefile,v 3.58 2001/11/02 23:29:26 dawes Exp $ +XCOMM $XFree86: xc/lib/Imakefile,v 3.73 2003/01/28 22:07:30 alanh Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -73,6 +73,10 @@ XINERAMADIR=Xinerama #endif +#if BuildXResLibrary +XRESLIBDIR = XRes +#endif + #if BuildGLXLibrary GLXLIBDIR = GL #endif @@ -101,18 +105,34 @@ RENDERLIBDIR = Xrender #endif -#if BuildXftLibrary -XFTLIBDIR = Xft +#if BuildExpatLibrary +EXPATBUILDDIR = expat #endif #if BuildFreetype2Library FREETYPE2BUILDDIR = freetype2 #endif +#if BuildFontconfigLibrary +FONTCONFIGBUILDDIR = fontconfig +#endif + +#if BuildXftLibrary +XFTLIBDIR = Xft +#endif + +#if BuildXft1Library +XFT1LIBDIR = Xft1 +#endif + #if BuildRandRLibrary RANDRLIBDIR = Xrandr #endif +#if BuildXcursorLibrary +XCURSORLIBDIR = Xcursor +#endif + #if BuildXTrapLibrary XTRAPLIBDIR = XTrap #endif @@ -181,19 +201,21 @@ 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) $(RANDRLIBDIR) $(XTRAPLIBDIR) + $(OLDXLIBDIR) $(ICELIBDIR) $(SMLIBDIR) $(XEXTLIBDIR) $(XTLIBDIR) \ + $(SSLIBDIR) $(XF86MISCLIBDIR) $(XF86VMLIBDIR) $(XF86DGALIBDIR) \ + $(XF86RUSHLIBDIR) $(XMULIBDIR) $(XMUULIBDIR) $(XPMLIBDIR) \ + $(XAW6LIBDIR) $(XAWLIBDIR) $(XIELIBDIR) $(XINPUTLIBDIR) \ + $(XTSTLIBDIR) $(FSLIBDIR) $(PEX5LIBDIR) $(XKBLIBDIR) \ + $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) $(XPRINTLIBDIR) \ + $(XVLIBDIR) $(GLXLIBDIR) $(GLULIBDIR) $(GLWLIBDIR) \ + $(DPSLIBDIR) $(DPSTKLIBDIR) $(PSRESLIBDIR) $(XINERAMADIR) \ + $(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) $(FREETYPE2BUILDDIR) \ + $(LIBXML2BUILDDIR) $(EXPATBUILDDIR) $(FONTCONFIGBUILDDIR) \ + $(XFT1LIBDIR) $(XFTLIBDIR) $(XVMCLIBDIR) $(RANDRLIBDIR) \ + $(XTRAPLIBDIR) $(XRESLIBDIR) $(XCURSORLIBDIR) SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTENCSUBDIR) \ - $(FONTCACHELIBDIR) + $(FONTCACHELIBDIR) MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) Index: xc/lib/FS/FSlibos.h diff -u xc/lib/FS/FSlibos.h:3.8 xc/lib/FS/FSlibos.h:3.9 --- xc/lib/FS/FSlibos.h:3.8 Fri Dec 14 14:53:33 2001 +++ xc/lib/FS/FSlibos.h Fri May 31 14:45:39 2002 @@ -50,7 +50,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/FS/FSlibos.h,v 3.8 2001/12/14 19:53:33 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSlibos.h,v 3.9 2002/05/31 18:45:39 dawes Exp $ */ /* * FSlib networking & os include file @@ -88,15 +88,15 @@ #ifdef NOFILE #define OPEN_MAX NOFILE #else -#if !defined(__EMX__) && !defined(__QNX__) +#if !defined(__UNIXOS2__) && !defined(__QNX__) #ifdef __GNU__ #define OPEN_MAX (sysconf(_SC_OPEN_MAX)) #else /* !__GNU__ */ #define OPEN_MAX NOFILES_MAX #endif /* __GNU__ */ -#else /* __EMX__ */ +#else /* !__UNIXOS2__ && !__QNX__ */ #define OPEN_MAX 256 -#endif /* __EMX__ */ +#endif /* __UNIXOS2__ */ #endif #endif #endif Index: xc/lib/GL/Imakefile diff -u xc/lib/GL/Imakefile:1.37 xc/lib/GL/Imakefile:1.41 --- xc/lib/GL/Imakefile:1.37 Fri Mar 23 15:56:28 2001 +++ xc/lib/GL/Imakefile Fri Nov 22 17:55:57 2002 @@ -1,5 +1,57 @@ -XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.37 2001/03/23 20:56:28 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.41 2002/11/22 22:55:57 tsi Exp $ +XCOMM +XCOMM Imake tokens which are significant to building libGL: +XCOMM +XCOMM BuildGLXLibrary - if defined, build libs in xc/lib/GL and xc/lib/GLw +XCOMM +XCOMM BuildXF86DRI - if defined, build libGL with DRI capability +XCOMM +XCOMM Only zero or one of the following can be defined at once: +XCOMM GlxBuiltInGamma - if defined, build gamma_dri.so driver into libGL +XCOMM GlxBuiltInTdfx - if defined, build tdfx_dri.so driver into libGL +XCOMM GlxBuiltInMga - if defined, build mga_dri.so driver into libGL +XCOMM GlxBuiltInI810 - if defined, build i810_dri.so driver into libGL +XCOMM GlxBuiltInR128 - if defined, build r128_dri.so driver into libGL +XCOMM GlxBuiltInRadeon - if defined, build radeon_dri.so driver into libGL +XCOMM GlxBuiltInR200 - if defined, build r200_dri.so driver into libGL +XCOMM GlxBuiltInFfb - if defined, build ffb_dri.so driver into libGL +XCOMM GlxBuiltInSIS - if defined, build sis_dri.so driver into libGL +XCOMM +XCOMM GlxUseBuiltInDRIDriver - automatically defined if any of the +XCOMM GlxBuiltIn[Gamma,Tdfx,Mga,I810,R128,Radeon,R200,Ffb,SIS] tokens is +XCOMM defined +XCOMM +XCOMM GlxBuiltInXMesa - if defined, build XMesa (Xlib Mesa driver) into libGL +XCOMM to enable rendering to displays that lack the GLX extension. +XCOMM +XCOMM GlxDriverUsesMesa - will be defined if building a DRI driver into +XCOMM libGL and it uses Mesa. +XCOMM +XCOMM GlxUseSGISI - if defined, use the SGI OpenGL Sample Implementation +XCOMM to build the GLX server extension (not fully implemented yet). +XCOMM +XCOMM NormalLibGlx - if defined, build static libGL.a library +XCOMM +XCOMM SharedLibGlx - if defined, build dynamic libGL.so library +XCOMM +XCOMM DebugLibGlx - if defined, build libGL with debug info +XCOMM +XCOMM ProfileLibGlx - if defined, build libGL with profiling info +XCOMM +XCOMM SharedGlxRev - dynamic library version, currently defined to be "1.2" +XCOMM +XCOMM GlxSoProf - if defined, build dynamic libGL for profiling with soprof +XCOMM +XCOMM GlxStubLib - purpose??? +XCOMM +XCOMM +XCOMM Server-side tokens: +XCOMM BuildGlxExt +XCOMM GlxUseSGISI + + + #include #define IHaveSubdirs @@ -9,19 +61,49 @@ LIBGLBUILDDIR = GL GLXDIRS = glx -#if BuildXF86DRI && !GlxUseSGISI && \ - (!GlxBuiltInMesa || !defined(GlxDriverUsesMesa)) +/* + * Need to build the Mesa + XMesa source in the following cases: + * BuildXF86DRI && defined(DriDrivers) + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + */ +#if BuildOSMesaLib || \ + (BuildXF86DRI && \ + (defined(DriDrivers) || GlxDriverUsesMesa || GlxBuiltInXMesa)) MESADIRS = mesa/src +#endif + +/* + * Only need the OSmesa code in the following case: + * BuildOSMesaLib + */ +#if BuildOSMesaLib OSMESADIRS = mesa/src/OSmesa #endif +/* + * Need to build the DRI code in the following cases: + * BuildXF86DRI + */ #if BuildXF86DRI - DRIDIRS = dri mesa/dri - MESADIRS = mesa/src + DRIDIRS = dri +#endif + +/* + * Need to build the DRI drivers in the following cases: + * BuildXF86DRI && defined(DriDrivers) + */ +#if BuildXF86DRI && defined(DriDrivers) DRIVERDIRS = mesa/src/drv #endif -#if GlxUseBuiltInDRIDriver +/* + * The build order depends on whether the drivers are loaded into libGL or + * built-in to libGL. In the former case, libGL needs to be built before + * the drivers, and in the latter case, it needs to be built after the driver. + */ +#if BuildXF86DRI && GlxUseBuiltInDRIDriver SUBDIRS = $(MESADIRS) $(DRIDIRS) $(DRIVERDIRS) $(GLXDIRS) $(LIBGLBUILDDIR) $(OSMESADIRS) #else SUBDIRS = $(MESADIRS) $(GLXDIRS) $(DRIDIRS) $(LIBGLBUILDDIR) $(OSMESADIRS) $(DRIVERDIRS) Index: xc/lib/GL/GL/GLos2.def diff -u xc/lib/GL/GL/GLos2.def:1.1 xc/lib/GL/GL/GLos2.def:removed --- xc/lib/GL/GL/GLos2.def:1.1 Thu Mar 22 16:47:56 2001 +++ xc/lib/GL/GL/GLos2.def Thu Feb 27 12:26:05 2003 @@ -1,428 +0,0 @@ -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 xc/lib/GL/GL/GLos2.rsp:1.1 xc/lib/GL/GL/GLos2.rsp:removed --- xc/lib/GL/GL/GLos2.rsp:1.1 Thu Mar 22 16:47:56 2001 +++ xc/lib/GL/GL/GLos2.rsp Thu Feb 27 12:26:05 2003 @@ -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/GL/Imakefile diff -u xc/lib/GL/GL/Imakefile:1.10 xc/lib/GL/GL/Imakefile:1.16 --- xc/lib/GL/GL/Imakefile:1.10 Sat Nov 24 06:22:35 2001 +++ xc/lib/GL/GL/Imakefile Wed Dec 4 16:38:34 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/GL/Imakefile,v 1.10 2001/11/24 11:22:35 herrb Exp $ +XCOMM $XFree86: xc/lib/GL/GL/Imakefile,v 1.16 2002/12/04 21:38:34 tsi Exp $ #include @@ -8,6 +8,12 @@ #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx +#ifndef ShLibBindGlobals +#if !HasGcc2 || (GccMajorVersion > 2) || (GccMinorVersion > 7) +#define ShlibBindGlobals YES +#endif +#endif + LIBNAME = GL SOREV = $(SOGLREV) @@ -15,12 +21,19 @@ BASEREQUIREDLIBS = SharedGLReqs #endif -#define MesaBuildDir $(GLXLIBSRC)/mesa/src/ +#include "../mesa/src/array_cache/Imakefile.inc" +#include "../mesa/src/math/Imakefile.inc" +#include "../mesa/src/swrast/Imakefile.inc" +#include "../mesa/src/swrast_setup/Imakefile.inc" +#include "../mesa/src/tnl/Imakefile.inc" +#include "../mesa/src/tnl_dd/Imakefile.inc" #include "../mesa/src/Imakefile.inc" -#define MesaX86BuildDir $(GLXLIBSRC)/mesa/src/X86/ #ifdef i386Architecture #include "../mesa/src/X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../mesa/src/SPARC/Imakefile.inc" +#endif XCOMM XCOMM Not related to ProfileLibGlx - I dont know how that works. KW. @@ -182,17 +195,15 @@ DRVUOBJS = $(SISUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) $(DRMUOBJS) DRVDOBJS = $(SISDOBJS) $(MESADOBJS) $(DRIMESADOBJS) $(DRMDOBJS) DRVPOBJS = $(SISPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) $(DRMPOBJS) - -#elif GlxBuiltInMesa -#ifndef GlxDriverUsesMesa +#elif GlxBuiltInXMesa - DRVOBJS = $(MESAOBJS) - DRVUOBJS = $(MESAUOBJS) - DRVDOBJS = $(MESADOBJS) - DRVPOBJS = $(MESAPOBJS) +#include "../mesa/src/X/Imakefile.inc" -#endif + DRVOBJS = $(MESAOBJS) $(XMESA_OBJS) + DRVUOBJS = $(MESAUOBJS) $(XMESA_UOBJS) + DRVDOBJS = $(MESADOBJS) $(XMESA_DOBJS) + DRVPOBJS = $(MESAPOBJS) $(XMESA_POBJS) #else Index: xc/lib/GL/dri/Imakefile diff -u xc/lib/GL/dri/Imakefile:1.9 xc/lib/GL/dri/Imakefile:1.10 --- xc/lib/GL/dri/Imakefile:1.9 Mon Apr 2 22:29:32 2001 +++ xc/lib/GL/dri/Imakefile Fri Feb 22 16:32:51 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/dri/Imakefile,v 1.9 2001/04/03 02:29:32 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/dri/Imakefile,v 1.10 2002/02/22 21:32:51 dawes Exp $ #include @@ -17,6 +17,7 @@ DRI_OBJS = dri_glx.o DRI_INCS = -I. -I$(GLXLIBSRC)/glx -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ -I$(XINCLUDESRC) -I$(SERVERSRC)/GL/dri \ + -I$(GLXLIBSRC)/include \ -I$(MESASRCDIR)/include -I$(MESASRCDIR)/src #endif @@ -32,8 +33,8 @@ DEFINES = $(ALLOC_DEFINES) GlxDefines $(TDFX_DEFS) $(GLX_DEFS) $(PATHDEFINES) INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) -I$(XF86OSSRC) $(DRI_INCS) - SRCS = XF86dri.c dri_tmm.c $(DRI_SRCS) - OBJS = XF86dri.o dri_tmm.o $(DRI_OBJS) + SRCS = XF86dri.c dri_util.c $(DRI_SRCS) + OBJS = XF86dri.o dri_util.o $(DRI_OBJS) #include Index: xc/lib/GL/dri/XF86dri.c diff -u xc/lib/GL/dri/XF86dri.c:1.12 xc/lib/GL/dri/XF86dri.c:1.13 --- xc/lib/GL/dri/XF86dri.c:1.12 Mon Aug 27 13:40:57 2001 +++ xc/lib/GL/dri/XF86dri.c Wed Oct 30 07:51:25 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.12 2001/08/27 17:40:57 dawes Exp $ */ +/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.13 2002/10/30 12:51:25 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,7 @@ /* * Authors: * Kevin E. Martin - * Jens Owen + * Jens Owen * Rickard E. (Rik) Faith * */ @@ -86,7 +86,8 @@ *****************************************************************************/ #if 0 -#define TRACE(msg) printf("XF86DRI%s\n", msg); +#include +#define TRACE(msg) fprintf(stderr,"XF86DRI%s\n", msg); #else #define TRACE(msg) #endif Index: xc/lib/GL/dri/dri_glx.c diff -u xc/lib/GL/dri/dri_glx.c:1.10 xc/lib/GL/dri/dri_glx.c:1.12 --- xc/lib/GL/dri/dri_glx.c:1.10 Mon Aug 27 13:40:57 2001 +++ xc/lib/GL/dri/dri_glx.c Thu Feb 6 07:42:10 2003 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/dri/dri_glx.c,v 1.10 2001/08/27 17:40:57 dawes Exp $ */ +/* $XFree86: xc/lib/GL/dri/dri_glx.c,v 1.12 2003/02/06 12:42:10 alanh Exp $ */ /* * Authors: @@ -52,6 +52,7 @@ typedef void *(*CreateScreenFunc)(Display *dpy, int scrn, __DRIscreen *psc, int numConfigs, __GLXvisualConfig *config); +typedef void *(*RegisterExtensionsFunc)(void); #ifdef BUILT_IN_DRI_DRIVER @@ -68,6 +69,23 @@ #define DEFAULT_DRIVER_DIR "/usr/X11R6/lib/modules/dri" #endif +/* + * We keep a linked list of these structures, one per DRI device driver. + */ +typedef struct __DRIdriverRec { + const char *name; + void *handle; + CreateScreenFunc createScreenFunc; + RegisterExtensionsFunc registerExtensionsFunc; + struct __DRIdriverRec *next; +} __DRIdriver; + +static __DRIdriver *Drivers = NULL; + + +/* + * printf wrappers + */ static void InfoMessageF(const char *f, ...) { @@ -94,36 +112,6 @@ } } -#if 0 -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); - } -} -#endif - -static void ErrorMessage(const char *msg) -{ - if (getenv("LIBGL_DEBUG")) { - fprintf(stderr, "libGL error: %s\n", msg); - } -} - - -static void InfoMessage(const char *msg) -{ - const char *env = getenv("LIBGL_DEBUG"); - if (env && strstr(env, "verbose")) { - fprintf(stderr, "libGL: %s\n", msg); - } -} - /* * We'll save a pointer to this function when we couldn't find a @@ -194,7 +182,6 @@ } - /* * Try to dlopen() the named driver. This function adds the * "_dri.so" suffix to the driver name and searches the @@ -205,10 +192,19 @@ * Return: * handle from dlopen, or NULL if driver file not found. */ -static void *OpenDriver(const char *driverName) +static __DRIdriver *OpenDriver(const char *driverName) { char *libPaths = NULL; int i; + __DRIdriver *driver; + + /* First, search Drivers list to see if we've already opened this driver */ + for (driver = Drivers; driver; driver = driver->next) { + if (strcmp(driver->name, driverName) == 0) { + /* found it */ + return driver; + } + } if (geteuid() == getuid()) { /* don't allow setuid apps to use LIBGL_DRIVERS_PATH */ @@ -224,95 +220,112 @@ void *handle; ExtractDir(i, libPaths, 1000, libDir); if (!libDir[0]) - return NULL; + break; /* ran out of paths to search */ snprintf(realDriverName, 200, "%s/%s_dri.so", libDir, driverName); InfoMessageF("OpenDriver: trying %s\n", realDriverName); handle = dlopen(realDriverName, RTLD_NOW | RTLD_GLOBAL); if (handle) { - return handle; + /* allocate __DRIdriver struct */ + driver = (__DRIdriver *) Xmalloc(sizeof(__DRIdriver)); + if (!driver) + return NULL; /* out of memory! */ + /* init the struct */ + driver->name = __glXstrdup(driverName); + if (!driver->name) { + Xfree(driver); + return NULL; /* out of memory! */ + } + driver->createScreenFunc = (CreateScreenFunc) + dlsym(handle, "__driCreateScreen"); + if (!driver->createScreenFunc) { + /* If the driver doesn't have this symbol then something's + * really, really wrong. + */ + ErrorMessageF("__driCreateScreen() not defined in %s_dri.so!\n", + driverName); + Xfree(driver); + dlclose(handle); + continue; + } + driver->registerExtensionsFunc = (RegisterExtensionsFunc) + dlsym(handle, "__driRegisterExtensions"); + driver->handle = handle; + /* put at head of linked list */ + driver->next = Drivers; + Drivers = driver; + return driver; } else { - ErrorMessageF("dlopen failed: %s\n", dlerror()); + ErrorMessageF("dlopen %s failed (%s)\n", realDriverName, dlerror()); } } + ErrorMessageF("unable to find driver: %s_dri.so\n", driverName); return NULL; } - /* - * Initialize two arrays: an array of createScreen function pointers - * and an array of dlopen library handles. Arrays are indexed by - * screen number. - * We use the DRI in order to find the __driCreateScreen function - * exported by each screen on a display. + * Given a display pointer and screen number, determine the name of + * the DRI driver for the screen. (I.e. "r128", "tdfx", etc). + * Return True for success, False for failure. */ -static void Find_CreateScreenFuncs(Display *dpy, - CreateScreenFunc *createFuncs, - void **libraryHandles) +static Bool GetDriverName(Display *dpy, int scrNum, char **driverName) { - const int numScreens = ScreenCount(dpy); - int scrn; + int directCapable; + Bool b; + int driverMajor, driverMinor, driverPatch; - __glXRegisterExtensions(); + *driverName = NULL; - for (scrn = 0; scrn < numScreens; scrn++) { - int directCapable; - Bool b; - int driverMajor, driverMinor, driverPatch; - char *driverName = NULL; - void *handle; - - /* defaults */ - createFuncs[scrn] = DummyCreateScreen; - libraryHandles[scrn] = NULL; + if (!XF86DRIQueryDirectRenderingCapable(dpy, scrNum, &directCapable)) { + ErrorMessageF("XF86DRIQueryDirectRenderingCapable failed"); + return False; + } + if (!directCapable) { + ErrorMessageF("XF86DRIQueryDirectRenderingCapable returned false"); + return False; + } - if (!XF86DRIQueryDirectRenderingCapable(dpy, scrn, &directCapable)) { - ErrorMessage("XF86DRIQueryDirectRenderingCapable failed"); - continue; - } - if (!directCapable) { - ErrorMessage("XF86DRIQueryDirectRenderingCapable returned false"); - continue; - } + b = XF86DRIGetClientDriverName(dpy, scrNum, &driverMajor, &driverMinor, + &driverPatch, driverName); + if (!b) { + ErrorMessageF("Cannot determine driver name for screen %d\n", scrNum); + return False; + } - /* - * Use DRI to find the device driver for use on screen number 'scrn'. - */ - b = XF86DRIGetClientDriverName(dpy, scrn, &driverMajor, &driverMinor, - &driverPatch, &driverName); - if (!b) { - ErrorMessageF("Cannot determine driver name for screen %d\n", scrn); - continue; - } + InfoMessageF("XF86DRIGetClientDriverName: %d.%d.%d %s (screen %d)\n", + driverMajor, driverMinor, driverPatch, *driverName, scrNum); + + return True; +} - /* - * Open the driver module and save the pointer to its - * __driCreateScreen function. - */ - handle = OpenDriver(driverName); - if (handle) { - CreateScreenFunc createScreenFunc; - createScreenFunc = (CreateScreenFunc) dlsym(handle, "__driCreateScreen"); - if (createScreenFunc) { - /* success! */ - createFuncs[scrn] = createScreenFunc; - libraryHandles[scrn] = handle; - continue; /* onto the next screen */ - } - else { - ErrorMessage("driCreateScreen() not defined in driver!"); - dlclose(handle); - } - } - } /* for scrn */ +/* + * Given a display pointer and screen number, return a __DRIdriver handle. + * Return NULL if anything goes wrong. + */ +static __DRIdriver *GetDriver(Display *dpy, int scrNum) +{ + char *driverName; + __DRIdriver *ret; + + if (GetDriverName(dpy, scrNum, &driverName)) { + ret = OpenDriver(driverName); + if (driverName) + Xfree(driverName); + return ret; + } + + return NULL; } + #endif /* BUILT_IN_DRI_DRIVER */ +/* This function isn't currently used. + */ static void driDestroyDisplay(Display *dpy, void *private) { __DRIdisplayPrivate *pdpyp = (__DRIdisplayPrivate *)private; @@ -330,12 +343,18 @@ } +/* + * Allocate, initialize and return a __DRIdisplayPrivate object. + * This is called from __glXInitialize() when we are given a new + * display pointer. + */ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp) { const int numScreens = ScreenCount(dpy); __DRIdisplayPrivate *pdpyp; int eventBase, errorBase; int major, minor, patch; + int scrn; /* Initialize these fields to NULL in case we fail. * If we don't do this we may later get segfaults trying to free random @@ -366,101 +385,50 @@ /* allocate array of pointers to createScreen funcs */ pdisp->createScreen = (CreateScreenFunc *) Xmalloc(numScreens * sizeof(void *)); - if (!pdisp->createScreen) + if (!pdisp->createScreen) { + XFree(pdpyp); return NULL; + } /* allocate array of library handles */ pdpyp->libraryHandles = (void **) Xmalloc(numScreens * sizeof(void*)); if (!pdpyp->libraryHandles) { Xfree(pdisp->createScreen); + XFree(pdpyp); return NULL; } #ifdef BUILT_IN_DRI_DRIVER - /* we'll statically bind to the __driCreateScreen function */ - { - int i; - for (i = 0; i < numScreens; i++) { - pdisp->createScreen[i] = __driCreateScreen; - pdpyp->libraryHandles[i] = NULL; - } + /* we'll statically bind to the built-in __driCreateScreen function */ + for (scrn = 0; scrn < numScreens; scrn++) { + pdisp->createScreen[scrn] = __driCreateScreen; + pdpyp->libraryHandles[scrn] = NULL; } + #else - Find_CreateScreenFuncs(dpy, pdisp->createScreen, pdpyp->libraryHandles); + /* dynamically discover DRI drivers for all screens, saving each + * driver's "__driCreateScreen" function pointer. That's the bootstrap + * entrypoint for all DRI drivers. + */ + __glXRegisterExtensions(); + for (scrn = 0; scrn < numScreens; scrn++) { + __DRIdriver *driver = GetDriver(dpy, scrn); + if (driver) { + pdisp->createScreen[scrn] = driver->createScreenFunc; + pdpyp->libraryHandles[scrn] = driver->handle; + } + else { + pdisp->createScreen[scrn] = DummyCreateScreen; + pdpyp->libraryHandles[scrn] = NULL; + } + } #endif return (void *)pdpyp; } -#ifndef BUILT_IN_DRI_DRIVER -/* - * Use the DRI and dlopen/dlsym facilities to find the GL extensions - * possible on the given display and screen. - */ -static void -register_extensions_on_screen(Display *dpy, int scrNum) -{ - int eventBase, errorBase; - Bool b, b2; - int driMajor, driMinor, driPatch; - int driverMajor, driverMinor, driverPatch; - char *driverName = NULL; - void *handle; - /* - * Check if the DRI extension is available, check the DRI version, - * determine the 3D driver for the screen. - */ - b = XF86DRIQueryExtension(dpy, &eventBase, &errorBase); - if (!b) { - InfoMessage("XF86DRIQueryExtension failed"); - return; - } - - b = XF86DRIQueryDirectRenderingCapable(dpy, scrNum, &b2); - if (!b || !b2) { - InfoMessage("XF86DRIQueryDirectRenderingCapable failed"); - return; - } - - b = XF86DRIQueryVersion(dpy, &driMajor, &driMinor, &driPatch); - if (!b) { - InfoMessage("XF86DRIQueryVersion failed"); - } - - b = XF86DRIGetClientDriverName(dpy, scrNum, &driverMajor, &driverMinor, - &driverPatch, &driverName); - if (!b) { - InfoMessage("XF86DRIGetClientDriverName failed"); - return; - } - else { - InfoMessageF("XF86DRIGetClientDriverName: %d.%d.%d %s (screen %d)\n", - driverMajor, driverMinor, driverPatch, driverName, scrNum); - } - - /* - * OK, now we know the name of the relevant driver for this screen. - * dlopen() the driver library file, get a pointer to the driver's - * __driRegisterExtensions() function, and call it if it exists. - */ - handle = OpenDriver(driverName); - if (handle) { - typedef void *(*RegisterExtFunc)(void); - RegisterExtFunc registerExtFunc = (RegisterExtFunc) dlsym(handle, - "__driRegisterExtensions"); - if (registerExtFunc) { - (*registerExtFunc)(); - } - dlclose(handle); - return; - } -} -#endif /* !BUILT_IN_DRI_DRIVER */ - - - /* ** Here we'll query the DRI driver for each screen and let each ** driver register its GL extension functions. We only have to @@ -474,39 +442,45 @@ void __glXRegisterExtensions(void) { +#ifndef BUILT_IN_DRI_DRIVER static GLboolean alreadyCalled = GL_FALSE; + int displayNum, maxDisplays; - if (alreadyCalled) { + if (alreadyCalled) return; + alreadyCalled = GL_TRUE; + + if (getenv("LIBGL_MULTIHEAD")) { + /* we'd like to always take this path but doing so causes a second + * or more of delay while the XOpenDisplay() function times out. + */ + maxDisplays = 10; /* infinity, really */ + } + else { + /* just open the :0 display */ + maxDisplays = 1; } -#ifndef BUILT_IN_DRI_DRIVER - { - int displayNum, maxDisplays; - if (getenv("LIBGL_MULTIHEAD")) - maxDisplays = 10; /* infinity, really */ - else - maxDisplays = 1; - for (displayNum = 0; displayNum < maxDisplays; displayNum++) { - char displayName[200]; - Display *dpy; - snprintf(displayName, 199, ":%d.0", displayNum); - dpy = XOpenDisplay(displayName); - if (dpy) { - const int numScreens = ScreenCount(dpy); - int screenNum; - for (screenNum = 0; screenNum < numScreens; screenNum++) { - register_extensions_on_screen(dpy, screenNum); + for (displayNum = 0; displayNum < maxDisplays; displayNum++) { + char displayName[200]; + Display *dpy; + snprintf(displayName, 199, ":%d.0", displayNum); + dpy = XOpenDisplay(displayName); + if (dpy) { + const int numScreens = ScreenCount(dpy); + int screenNum; + for (screenNum = 0; screenNum < numScreens; screenNum++) { + __DRIdriver *driver = GetDriver(dpy, screenNum); + if (driver && driver->registerExtensionsFunc) { + (*driver->registerExtensionsFunc)(); } - XCloseDisplay(dpy); } - else { - break; - } + XCloseDisplay(dpy); } + else { + break; + } } - - alreadyCalled = GL_TRUE; #endif } Index: xc/lib/GL/dri/dri_tmm.c diff -u xc/lib/GL/dri/dri_tmm.c:1.3 xc/lib/GL/dri/dri_tmm.c:removed --- xc/lib/GL/dri/dri_tmm.c:1.3 Mon Aug 27 13:40:57 2001 +++ xc/lib/GL/dri/dri_tmm.c Thu Feb 27 12:26:10 2003 @@ -1,650 +0,0 @@ -/* dri_tmm.c -- High-level texture memory management - * Created: Mon May 10 12:58:20 1999 by faith@precisioninsight.com - * Revised: Tue May 18 00:38:49 1999 by faith@precisioninsight.com - * - * Copyright 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, 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 - * 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/dri/dri_tmm.c,v 1.3 2001/08/27 17:40:57 dawes Exp $ - * - * - * DESCRIPTION - * - * - * FUTURE ENHANCEMENTS - * - * - * REFERENCES - * - * - */ - -#include -#include -#include "xf86drm.h" - -#include "dri_tmm.h" -#define DRI_TMM_ALLOC(s) Xmalloc(s) -#define DRI_TMM_FREE(p) Xfree(p) - - -static void *driTMMAlloc(int size); -static void driTMMFree(void *p); -static void driTMMRemoveLRU(driTMMPtr tmm, driTMMAreaPtr area); -static void driTMMInsertLRU(driTMMPtr tmm, driTMMAreaPtr area); -static driTMMAreaPtr driTMMGetLRU(driTMMPtr tmm); -static void driTMMDestroyArea(driTMMAreaPtr area); -static driTMMAreaPtr driTMMCreateArea(unsigned long offset, - unsigned long size); -static int driTMMFreeArea(driTMMPtr tmm, driTMMAreaPtr area); -static driTMMAreaPtr driTMMFindFreeArea(driTMMPtr tmm, unsigned long size); -static driTMMAreaPtr driTMMBreakNewArea(driTMMPtr tmm, unsigned long size); -static driTMMAreaPtr driTMMAllocArea(driTMMPtr tmm, - unsigned long size, - driTMMImagePtr image); -static int driTMMComputePriority(driTMMPtr tmm, float priority); -#if 0 -static void driTMMDump(driTMMPtr tmm); -#endif - -static void *driTMMAlloc(int size) -{ - void *address = DRI_TMM_ALLOC(size); -#if 0 - printf("%p %d\n", address, size); -#endif - return address; -} - -static void driTMMFree(void *p) -{ -#if 0 - printf("%p\n",p); -#endif - if (p) DRI_TMM_FREE(p); -} - -static void driTMMRemoveLRU(driTMMPtr tmm, driTMMAreaPtr area) -{ - driTMMPrioPtr prio; - - prio = &tmm->priolist[area->priority]; - - /* Disconnect, if connected */ - if (area->prev) area->prev->next = area->next; - if (area->next) area->next->prev = area->prev; - if (prio->head == area) prio->head = area->next; - if (prio->tail == area) prio->tail = area->prev; - - area->next = NULL; - area->prev = NULL; - area->locked = 0; -} - -static void driTMMInsertLRU(driTMMPtr tmm, driTMMAreaPtr area) -{ - driTMMPrioPtr prio; - - prio = &tmm->priolist[area->priority]; - - /* Disconnect, if connected */ - driTMMRemoveLRU(tmm, area); - - /* Reconnect at end of list */ - if (prio->tail) prio->tail->next = area; - if (!prio->head) prio->head = area; - area->prev = prio->tail; - area->next = NULL; - prio->tail = area; -} - -static driTMMAreaPtr driTMMGetLRU(driTMMPtr tmm) -{ - int i; - driTMMAreaPtr area; - - for (i = 0; i < DRI_TMM_PRIORITIES; i++) { - for (area = tmm->priolist[i].head; area; area = area->next) { - if (!area->locked) { - driTMMRemoveLRU(tmm, area); - if (area->image) { - area->image->area = NULL; - area->image = NULL; - } - return area; - } - } - } - return NULL; -} - -static void driTMMDestroyArea(driTMMAreaPtr area) -{ - driTMMFree(area); -} - -static driTMMAreaPtr driTMMCreateArea(unsigned long offset, unsigned long size) -{ - driTMMAreaPtr area; - - area = driTMMAlloc(sizeof(*area)); - area->offset = offset; - area->size = size; - area->priority = DRI_TMM_DEFAULT_PRIORITY; - area->image = NULL; - area->locked = 0; - area->prev = NULL; - area->next = NULL; - - return area; -} - -static int driTMMFreeArea(driTMMPtr tmm, driTMMAreaPtr area) -{ - unsigned long prev_offset, next_offset; - driTMMAreaPtr prev, next; - - driTMMRemoveLRU(tmm, area); - if (area->image) { - area->image->area = NULL; - area->image = NULL; - } - - drmSLLookupNeighbors(tmm->freelist, area->offset, - &prev_offset, (void **)&prev, - &next_offset, (void **)&next); - - if (prev && prev->offset + prev->size == area->offset) { - /* Merge with previous area */ - prev->size += area->size; - driTMMDestroyArea(area); - if (next && prev->offset + prev->size == next->offset) { - /* Merge with next area */ - prev->size += next->size; - drmSLDelete(tmm->freelist, next->offset); - driTMMDestroyArea(next); - } - } else if (next && area->offset + area->size == next->offset) { - /* Merge with next area */ - drmSLDelete(tmm->freelist, next->offset); - next->offset = area->offset; - next->size += area->size; - drmSLInsert(tmm->freelist, next->offset, next); - driTMMDestroyArea(area); - } else { - /* Insert into list */ - drmSLInsert(tmm->freelist, area->offset, area); - } - return 0; -} - -static driTMMAreaPtr driTMMFindFreeArea(driTMMPtr tmm, unsigned long size) -{ - unsigned long offset; - driTMMAreaPtr area = NULL; - driTMMAreaPtr best = NULL; - unsigned long extra = 0; - - if (drmSLFirst(tmm->freelist, &offset, (void **)&area)) { - do { - if (area->size == size) { - best = area; - break; - } else if (area->size > size) { - if (!best || area->size - size < extra) { - best = area; - extra = area->size - size; - if (tmm->strategy == DRI_TMM_FIRST_FIT) break; - } - } - } while (drmSLNext(tmm->freelist, &offset, (void **)&area)); - } - if (best) { - if (best->size > size) { - /* Split */ - best->size -= size; - return driTMMCreateArea(best->offset + best->size, size); - } else { - drmSLDelete(tmm->freelist, best->offset); - return best; - } - } - - return NULL; -} - -static driTMMAreaPtr driTMMBreakNewArea(driTMMPtr tmm, unsigned long size) -{ - unsigned long offset; - - if (tmm->current + size <= tmm->end) { - offset = tmm->current; - tmm->current += size; - return driTMMCreateArea(offset, size); - } - return NULL; -} - -static driTMMAreaPtr driTMMAllocArea(driTMMPtr tmm, unsigned long size, - driTMMImagePtr image) -{ - driTMMAreaPtr area = NULL; - driTMMAreaPtr victim; - - size += (tmm->alignment - 1) & ~(tmm->alignment - 1); - - /* Is there a free area? */ - if (!area) area = driTMMFindFreeArea(tmm, size); - - /* Is there free memory? */ - if (!area) area = driTMMBreakNewArea(tmm, size); - - /* What can we evict? */ - if (!area) { - while ((victim = driTMMGetLRU(tmm))) { - driTMMFreeArea(tmm, victim); - if ((area = driTMMFindFreeArea(tmm, size))) break; - } - } - - if (area) { - area->image = image; - area->locked = 0; - if (image) { - area->priority = image->priority; - image->area = area; - } else { - area->priority = tmm->priority; - } - driTMMInsertLRU(tmm, area); - } - - - return area; -} - -static int driTMMComputePriority(driTMMPtr tmm, float priority) -{ - int p = priority * DRI_TMM_PRIORITIES; - - if (p < 0) p = 0; - if (p >= DRI_TMM_PRIORITIES) p = DRI_TMM_PRIORITIES - 1; - return p; -} - -#if 0 -static void driTMMDump(driTMMPtr tmm) -{ - driTMMAreaPtr area; - unsigned long offset; - int i; - - printf("Start = %10lu\n", tmm->start); - printf("Current = %10lu\n", tmm->current); - printf("End = %10lu\n", tmm->end); - printf("Size = %10lu\n", tmm->size); - - printf("Freelist:\n"); - if (drmSLFirst(tmm->freelist, &offset, (void **)&area)) { - do { - printf( " %10lu %10lu %3d %p %p\n", - area->offset, - area->size, - area->priority, - area->prev, - area->next); - } while (drmSLNext(tmm->freelist, &offset, (void **)&area)); - } - - for (i = 0; i < DRI_TMM_PRIORITIES; i++) { - printf("Priority %2d:\n", i); - for (area = tmm->priolist[i].head; area; area = area->next) { - printf( " %10lu %10lu %3d %p %p\n", - area->offset, - area->size, - area->priority, - area->prev, - area->next); - } - } -} -#endif - -driTMMPtr driTMMCreate(unsigned long start, - unsigned long size, - unsigned long word_size, /* in bytes */ - unsigned long alignment, - driTMMLoadImage load_image, - driTMMLoadSubImage load_subimage) -{ - driTMMPtr tmm; - int i; - - tmm = driTMMAlloc(sizeof(*tmm)); - - tmm->start = start; - tmm->current = start; - tmm->end = tmm->start + size; - tmm->size = size; - tmm->word_size = word_size; - tmm->alignment = alignment ? alignment : 1; - tmm->load_image = load_image; - tmm->load_subimage = load_subimage; - - - tmm->freelist = drmSLCreate(); - tmm->images = drmHashCreate(); - for (i = 0; i < DRI_TMM_PRIORITIES; i++) { - tmm->priolist[i].head = NULL; - tmm->priolist[i].tail = NULL; - } - tmm->priority = DRI_TMM_DEFAULT_PRIORITY; - tmm->strategy = DRI_TMM_BEST_FIT; - tmm->hits = 0; - tmm->misses = 0; - - return tmm; -} - -void driTMMDestroy(driTMMPtr tmm) -{ - driTMMImagePtr t; - unsigned long key; - - if (!tmm) return; - drmSLDestroy(tmm->freelist); - - if (drmHashFirst(tmm->images, &key, (void *)&t)) { - do { - driTMMDeleteImage(tmm, t); - } while (drmHashNext(tmm->images, &key, (void *)&t)); - } - drmHashDestroy(tmm->images); - - driTMMFree(tmm); -} - -/* NOTE: driTMMInsertImage does *NOT* make the texture image resident. */ - -extern void *driTMMInsertImage(driTMMPtr tmm, - int width, - int height, - int texel_width, - const unsigned char *image, - void *private) -{ - driTMMImagePtr t; - - if (!tmm) return NULL; - if (!(t = driTMMAlloc(sizeof(*t)))) return NULL; - - t->width = width; - t->height = height; - t->texel_width = texel_width; - t->private = private; - - t->length = width * height * (texel_width/8); - t->size = t->length / tmm->word_size; - t->priority = tmm->priority; - t->area = NULL; - - if (image) { - if (!(t->buffer = driTMMAlloc(t->length))) { - driTMMFree(t); - return NULL; - } - memcpy(t->buffer, image, t->length); - } else { - t->buffer = NULL; - } - - drmHashInsert(tmm->images, (unsigned long)t, t); - - return t; -} - -int driTMMSubImage(driTMMPtr tmm, - void *image, - int xoffset, - int yoffset, - int subimage_width, - int subimage_height, - const unsigned char *subimage) -{ - driTMMImagePtr t = (driTMMImagePtr)image; - int y; - - if (t->buffer && subimage) { - /* FIXME. This only works for texel_widths - that are a multiple of 8. */ - for (y = yoffset; y < yoffset + subimage_height; y++) { - memcpy(t->buffer + y * t->width + xoffset, - subimage + (y - yoffset) * subimage_width, - subimage_width * (t->texel_width/8)); - } - } - -#if 0 - printf("0x%08lx w%d h%d tw%d %p x%d y%d sw%d sh%d %p\n", - t->area->offset, t->width, t->height, t->texel_width, t->buffer, - xoffset, yoffset, subimage_width, subimage_height, subimage); -#endif - - /* Load subimage onto hardware, if - resident. Note that GL semantics - require that the texture be resident - when a subimage operation is - performed. */ - if (tmm->load_subimage && t->area) { - (tmm->load_subimage)(t->private, - t->area->offset, - t->width, - t->height, - t->texel_width, - xoffset, - yoffset, - subimage_width, - subimage_height, - subimage); - } - return 0; -} - -int driTMMDeleteImage(driTMMPtr tmm, void *image) -{ - driTMMImagePtr t = (driTMMImagePtr)image; - - if (!tmm) return -1; - if (!image) return 0; - if (drmHashDelete(tmm->images, (unsigned long)t)) return -1; - - if (t->area) driTMMFreeArea(tmm, t->area); - if (t->buffer) driTMMFree(t->buffer); - driTMMFree(t); - return 0; -} - -int driTMMDeleteImages(driTMMPtr tmm, int count, void **images) -{ - int i; - int retcode = 0; - - for (i = 0; i < count; i++) { - if (driTMMDeleteImage(tmm, images[i])) ++retcode; - } - return retcode ? -1 : 0; -} - -int driTMMIsImageResident(driTMMPtr tmm, void *image) -{ - driTMMImagePtr t = (driTMMImagePtr)image; - - if (!t) return 0; /* Error */ - if (t->area) return 1; /* Resident */ - return 0; /* Not resident */ -} - -/* If all the textures are resident, driTMMAreImagesResident returns 1 and - the contents of residences are not changed. If any texture is not - resident, then driTMMAreImagesResident returns 0 and the corresponding - elements in reisdences are set to 0. This behavior mimics that of the - glAreTexturesResident() function, as described in the OpenGL Programming - Guide, p. 352. This seems to conflict with the Reference, so maybe it's - wrong... */ - -int driTMMAreImagesResident(driTMMPtr tmm, int count, void **images, - int *residences) -{ - int i; - int retcode = 1; - - for (i = 0; i < count; i++) { - if (!driTMMIsImageResident(tmm, images[i])) { - residences[i] = 0; - retcode = 0; - } - } - return retcode; -} - -void driTMMPrioritizeImage(driTMMPtr tmm, void *image, float priority) -{ - driTMMImagePtr t = (driTMMImagePtr)image; - int p = driTMMComputePriority(tmm, priority); - - if (p != t->priority && t->area) { - driTMMRemoveLRU(tmm, t->area); - t->area->priority = t->priority = p; - driTMMInsertLRU(tmm, t->area); - } - t->priority = p; -} - - -void driTMMPrioritizeImages(driTMMPtr tmm, int count, void **images, - float *priorities) -{ - int i; - - for (i = 0; i < count; i++) - driTMMPrioritizeImage(tmm, images[i], priorities[i]); -} - -void driTMMSetDefaultPriority(driTMMPtr tmm, float priority) -{ - tmm->priority = driTMMComputePriority(tmm, priority); -} - -int driTMMMakeImageResident(driTMMPtr tmm, void *image, - unsigned long *address) -{ - driTMMImagePtr t = (driTMMImagePtr)image; - driTMMAreaPtr area; - - if (address) *address = 0; - - if (!tmm) return -1; /* Error */ - if (!image) return 0; /* NULL image is always loaded */ - if (t->area) { - ++tmm->hits; - if (address) *address = t->area->offset; - return 0; /* Already resident */ - } - ++tmm->misses; - - if (!(area = driTMMAllocArea(tmm, t->size, image))) return -1; /* Error*/ - - if (address) *address = area->offset; - -#if 0 - printf("0x%08lx w%d h%d tw%d %p h%lu m%lu\n", - area->offset, t->width, t->height, t->texel_width, t->buffer, - tmm->hits, tmm->misses); -#endif - - if (tmm->load_image) - tmm->load_image(t->private, area->offset, t->width, t->height, - t->texel_width, t->buffer); - return 0; -} - -int driTMMMakeImagesResident(driTMMPtr tmm, int count, void **images, - unsigned long *addresses) -{ - driTMMImagePtr t; - int i; - int retcode = 0; - - if (!tmm || !images) return -1; - - /* Lock resident images */ - for (i = 0; i < count; i++) { - t = (driTMMImagePtr)images[i]; - if (t && t->area) t->area->locked = 1; - } - - /* Make non-resident images resident */ - for (i = 0; !retcode && i < count; i++) { - t = (driTMMImagePtr)images[i]; - retcode = driTMMMakeImageResident(tmm, t, &addresses[i]); - if (t && t->area) t->area->locked = 1; - } - - if (retcode) { /* At least one image won't fit, so - clear a contiguous segment and try - again. */ - unsigned long total = 0; - - for (i = 0; i < count; i++) { - t = (driTMMImagePtr)images[i]; - if (t && t->area) driTMMFreeArea(tmm, t->area); - } - /* Find out how much room all the textures - will take. */ - for (i = 0; i < count; i++) { - t = (driTMMImagePtr)images[i]; - if (t) { - total += ((t->size + tmm->alignment - 1) - & ~(tmm->alignment - 1)); - } - } - /* Free enough room for that chunk */ - driTMMFreeArea(tmm, driTMMAllocArea(tmm, total, NULL)); - - /* Make images resident */ - for (retcode = 0, i = 0; !retcode && i < count; i++) { - t = (driTMMImagePtr)images[i]; - retcode = driTMMMakeImageResident(tmm, t, &addresses[i]); - if (t && t->area) t->area->locked = 1; - } - } - - /* Unlock resident images */ - for (i = 0; i < count; i++) { - t = (driTMMImagePtr)images[i]; - if (t && t->area) t->area->locked = 0; - } - - return retcode ? -1 : 0; -} - - Index: xc/lib/GL/dri/dri_tmm.h diff -u xc/lib/GL/dri/dri_tmm.h:1.2 xc/lib/GL/dri/dri_tmm.h:removed --- xc/lib/GL/dri/dri_tmm.h:1.2 Tue Feb 22 23:46:34 2000 +++ xc/lib/GL/dri/dri_tmm.h Thu Feb 27 12:26:10 2003 @@ -1,154 +0,0 @@ -/* dri_tmm.c -- High-level texture memory management - * Created: Sun May 16 06:58:52 1999 by faith@precisioninsight.com - * Revised: Mon May 17 22:04:50 1999 by faith@precisioninsight.com - * - * Copyright 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, 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 - * 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/dri/dri_tmm.h,v 1.2 2000/02/23 04:46:34 martin Exp $ - * - */ - -#ifndef _DRI_TMM_H_ -#define _DRI_TMM_H_ - -#define DRI_TMM_MAX_ORDER 32 -#define DRI_TMM_DEFAULT_PRIORITY 0 -#define DRI_TMM_PRIORITIES 10 - - -typedef int (*driTMMLoadImage)(void *private, - unsigned long address, - int width, - int height, - int texel_width, - const unsigned char *image); - -typedef int (*driTMMLoadSubImage)(void *private, - unsigned long address, - int width, - int height, - int texel_width, - int xoffset, - int yoffset, - int subimage_width, - int subimage_height, - const unsigned char *image); - -typedef struct driTMMImage { - int width; - int height; - int texel_width; - unsigned char *buffer; - - unsigned long length; /* Length of buffer */ - unsigned long size; /* Size of area required to hold buffer */ - int priority; /* Priority */ - void *private; /* Pointer to private area */ - struct driTMMArea *area; -} driTMMImage, *driTMMImagePtr; - -typedef struct driTMMArea { - unsigned long offset; - unsigned long size; - int priority; - driTMMImagePtr image; - int locked; /* Cannot be evicted */ - struct driTMMArea *prev; /* Previous area in LRU chain */ - struct driTMMArea *next; /* Next area in LRU chain */ -} driTMMArea, *driTMMAreaPtr; - -typedef struct driTMMPrio { - driTMMAreaPtr head; - driTMMAreaPtr tail; -} driTMMPrio, *driTMMPrioPtr; - -typedef struct driTMM { - unsigned long start; - unsigned long current; - unsigned long end; - unsigned long size; - unsigned long word_size; - unsigned long alignment; - driTMMLoadImage load_image; - driTMMLoadSubImage load_subimage; - - void *freelist; /* Skip list ordered by address */ - void *images; /* Hash table of driTMMImagePtr's */ - driTMMPrio priolist[DRI_TMM_PRIORITIES]; /* In use list */ - int priority; - - enum { - DRI_TMM_FIRST_FIT, - DRI_TMM_BEST_FIT - } strategy; - - /* Statistics */ - unsigned long hits; /* Times already resident */ - unsigned long misses; /* Times not resident */ -} driTMM, *driTMMPtr; - -extern driTMMPtr driTMMCreate(unsigned long start, - unsigned long size, - unsigned long word_size, /* in bytes */ - unsigned long alignment, - driTMMLoadImage load_image, - driTMMLoadSubImage load_subimage); -extern void driTMMDestroy(driTMMPtr tmm); -extern void *driTMMInsertImage(driTMMPtr tmm, - int width, - int height, - int texel_width, - const unsigned char *image, - void *private); -extern int driTMMSubImage(driTMMPtr tmm, - void *image, - int xoffset, - int yoffset, - int subimage_width, - int subimage_height, - const unsigned char *subimage); -extern int driTMMDeleteImage(driTMMPtr tmm, void *image); -extern int driTMMDeleteImages(driTMMPtr tmm, - int count, - void **images); -extern int driTMMIsImageResident(driTMMPtr tmm, void *image); -extern int driTMMAreImagesResident(driTMMPtr tmm, - int count, - void **images, - int *residences); -extern void driTMMPrioritizeImage(driTMMPtr tmm, - void *image, - float priority); -extern void driTMMPrioritizeImages(driTMMPtr tmm, - int count, - void **images, - float *priorities); -extern void driTMMSetDefaultPriority(driTMMPtr tmm, float priority); -extern int driTMMMakeImageResident(driTMMPtr tmm, void *image, - unsigned long *addresses); -extern int driTMMMakeImagesResident(driTMMPtr tmm, - int count, - void **images, - unsigned long *addresses); - -#endif Index: xc/lib/GL/dri/dri_util.c diff -u /dev/null xc/lib/GL/dri/dri_util.c:1.6 --- /dev/null Thu Feb 27 12:26:10 2003 +++ xc/lib/GL/dri/dri_util.c Sat Feb 15 17:12:29 2003 @@ -0,0 +1,1099 @@ +/* $XFree86: xc/lib/GL/dri/dri_util.c,v 1.6 2003/02/15 22:12:29 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Brian E. Paul + */ + +/* + * This file gets compiled into each of the DRI 3D drivers. This is + * basically just a collection of utility functions that are useful + * for most drivers. A DRI driver doesn't have to use any of this, + * but it's useful boilerplate. + * + * + * Many of 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 the current drivers, these private + * structures are the __DRIdrawablePrivateRec, __DRIcontextPrivateRec, + * __DRIscreenPrivateRec, and __DRIvisualPrivateRec structures defined + * in dri_util.h. We allocate and attach those structs here in + * this file. + */ + + +#ifdef GLX_DIRECT_RENDERING + +#include +#include +#include +#include +#include +#include +#include "glxclient.h" +#include "xf86dri.h" +#include "sarea.h" +#include "dri_util.h" + + +/* forward declarations */ +static void *driCreateDrawable(Display *dpy, int scrn, GLXDrawable draw, + GLboolean isPixmap, + VisualID vid, __DRIdrawable *pdraw); + +static void driDestroyDrawable(Display *dpy, void *drawablePrivate); + + + + +static Bool driFeatureOn(const char *name) +{ + char *env = getenv(name); + + if (!env) return GL_FALSE; + if (!strcasecmp(env, "enable")) return GL_TRUE; + if (!strcasecmp(env, "1")) return GL_TRUE; + if (!strcasecmp(env, "on")) return GL_TRUE; + if (!strcasecmp(env, "true")) return GL_TRUE; + if (!strcasecmp(env, "t")) return GL_TRUE; + if (!strcasecmp(env, "yes")) return GL_TRUE; + if (!strcasecmp(env, "y")) return GL_TRUE; + + return GL_FALSE; +} + + +/* +** Print message to stderr if LIBGL_DEBUG env var is set. +*/ +void +__driUtilMessage(const char *f, ...) +{ + va_list args; + + if (getenv("LIBGL_DEBUG")) { + fprintf(stderr, "libGL error: \n"); + va_start(args, f); + vfprintf(stderr, f, args); + va_end(args); + fprintf(stderr, "\n"); + } +} + + +/*****************************************************************/ + +/* + * Return pointer to the __GLXvisualConfig specified by dpy, scrn and vid. + * Return NULL if not found. + */ +static __GLXvisualConfig * +__driFindGlxConfig(Display *dpy, int scrn, VisualID vid) +{ + __GLXdisplayPrivate *priv; + __GLXscreenConfigs *glxScrnConfigs; + __GLXvisualConfig *glxConfigs; + int numConfigs, i; + + priv = __glXInitialize(dpy); + assert(priv); + + glxScrnConfigs = priv->screenConfigs; + assert(glxScrnConfigs); + + numConfigs = glxScrnConfigs[scrn].numConfigs; + glxConfigs = glxScrnConfigs[scrn].configs; + + for (i = 0; i < numConfigs; i++) { + if (glxConfigs[i].vid == vid) { + return glxConfigs +i; + } + } + return NULL; +} + + +/* This function comes from programs/Xserver/GL/glx/glxcmds.c + */ +static void +__glXFormatGLModes(__GLcontextModes *modes, const __GLXvisualConfig *config) +{ + /*__glXMemset(modes, 0, sizeof(__GLcontextModes));*/ + memset(modes, 0, sizeof(__GLcontextModes)); + + modes->rgbMode = (config->rgba != 0); + modes->colorIndexMode = !(modes->rgbMode); + modes->doubleBufferMode = (config->doubleBuffer != 0); + modes->stereoMode = (config->stereo != 0); + + modes->haveAccumBuffer = ((config->accumRedSize + + config->accumGreenSize + + config->accumBlueSize + + config->accumAlphaSize) > 0); + modes->haveDepthBuffer = (config->depthSize > 0); + modes->haveStencilBuffer = (config->stencilSize > 0); + + modes->redBits = config->redSize; + modes->greenBits = config->greenSize; + modes->blueBits = config->blueSize; + modes->alphaBits = config->alphaSize; + modes->redMask = config->redMask; + modes->greenMask = config->greenMask; + modes->blueMask = config->blueMask; + modes->alphaMask = config->alphaMask; + modes->rgbBits = config->bufferSize; + modes->indexBits = config->bufferSize; + + modes->accumRedBits = config->accumRedSize; + modes->accumGreenBits = config->accumGreenSize; + modes->accumBlueBits = config->accumBlueSize; + modes->accumAlphaBits = config->accumAlphaSize; + modes->depthBits = config->depthSize; + modes->stencilBits = config->stencilSize; + + modes->numAuxBuffers = 0; /* XXX: should be picked up from the visual */ + + modes->level = config->level; +} + + +/*****************************************************************/ + +/* Maintain a list of drawables */ + +static Bool __driAddDrawable(void *drawHash, __DRIdrawable *pdraw) +{ + __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; + + if (drmHashInsert(drawHash, pdp->draw, pdraw)) + return GL_FALSE; + + return GL_TRUE; +} + +static __DRIdrawable *__driFindDrawable(void *drawHash, GLXDrawable draw) +{ + int retcode; + __DRIdrawable *pdraw; + + retcode = drmHashLookup(drawHash, draw, (void **)&pdraw); + if (retcode) + return NULL; + + return pdraw; +} + +static void __driRemoveDrawable(void *drawHash, __DRIdrawable *pdraw) +{ + int retcode; + __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; + + retcode = drmHashLookup(drawHash, pdp->draw, (void **)&pdraw); + if (!retcode) { /* Found */ + drmHashDelete(drawHash, pdp->draw); + } +} + +static Bool __driWindowExistsFlag; + +static int __driWindowExistsErrorHandler(Display *dpy, XErrorEvent *xerr) +{ + if (xerr->error_code == BadWindow) { + __driWindowExistsFlag = GL_FALSE; + } + return 0; +} + +static Bool __driWindowExists(Display *dpy, GLXDrawable draw) +{ + XWindowAttributes xwa; + int (*oldXErrorHandler)(Display *, XErrorEvent *); + + __driWindowExistsFlag = GL_TRUE; + oldXErrorHandler = XSetErrorHandler(__driWindowExistsErrorHandler); + XGetWindowAttributes(dpy, draw, &xwa); /* dummy request */ + XSetErrorHandler(oldXErrorHandler); + return __driWindowExistsFlag; +} + +static void __driGarbageCollectDrawables(void *drawHash) +{ + GLXDrawable draw; + __DRIdrawable *pdraw; + Display *dpy; + + if (drmHashFirst(drawHash, &draw, (void **)&pdraw)) { + do { + __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; + dpy = pdp->driScreenPriv->display; + XSync(dpy, GL_FALSE); + if (!__driWindowExists(dpy, draw)) { + /* Destroy the local drawable data in the hash table, if the + drawable no longer exists in the Xserver */ + __driRemoveDrawable(drawHash, pdraw); + (*pdraw->destroyDrawable)(dpy, pdraw->private); + Xfree(pdraw); + } + } while (drmHashNext(drawHash, &draw, (void **)&pdraw)); + } +} + +/*****************************************************************/ + +static Bool driUnbindContext(Display *dpy, int scrn, + GLXDrawable draw, GLXContext gc, + int will_rebind) +{ + __DRIscreen *pDRIScreen; + __DRIdrawable *pdraw; + __DRIcontextPrivate *pcp; + __DRIscreenPrivate *psp; + __DRIdrawablePrivate *pdp; + + /* + ** Assume error checking is done properly in glXMakeCurrent before + ** calling driUnbindContext. + */ + + if (gc == NULL || draw == None) { + /* ERROR!!! */ + return GL_FALSE; + } + + if (!(pDRIScreen = __glXFindDRIScreen(dpy, scrn))) { + /* ERROR!!! */ + return GL_FALSE; + } else if (!(psp = (__DRIscreenPrivate *)pDRIScreen->private)) { + /* ERROR!!! */ + return GL_FALSE; + } + + pcp = (__DRIcontextPrivate *)gc->driContext.private; + + pdraw = __driFindDrawable(psp->drawHash, draw); + if (!pdraw) { + /* ERROR!!! */ + return GL_FALSE; + } + pdp = (__DRIdrawablePrivate *)pdraw->private; + + /* Don't leave fullscreen mode if the + drawable will be rebound in the next + step -- this avoids a protocol + request. */ + if (!will_rebind && psp->fullscreen) { + psp->DriverAPI.CloseFullScreen(pcp); + XF86DRICloseFullScreen(dpy, scrn, draw); + psp->fullscreen = NULL; + } + + /* Let driver unbind drawable from context */ + (*psp->DriverAPI.UnbindContext)(pcp); + + if (pdp->refcount == 0) { + /* ERROR!!! */ + return GL_FALSE; + } else if (--pdp->refcount == 0) { +#if 0 + /* + ** NOT_DONE: When a drawable is unbound from one direct + ** rendering context and then bound to another, we do not want + ** to destroy the drawable data structure each time only to + ** recreate it immediatly afterwards when binding to the next + ** context. This also causes conflicts with caching of the + ** drawable stamp. + ** + ** In addition, we don't destroy the drawable here since Mesa + ** keeps private data internally (e.g., software accumulation + ** buffers) that should not be destroyed unless the client + ** explicitly requests that the window be destroyed. + ** + ** When GLX 1.3 is integrated, the create and destroy drawable + ** functions will have user level counterparts and the memory + ** will be able to be recovered. + ** + ** Below is an example of what needs to go into the destroy + ** drawable routine to support GLX 1.3. + */ + __driRemoveDrawable(psp->drawHash, pdraw); + (*pdraw->destroyDrawable)(dpy, pdraw->private); + Xfree(pdraw); +#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; +} + + +/* + * This function takes both a read buffer and a draw buffer. + * This is needed for glXMakeCurrentReadSGI() or GLX 1.3's + * glxMakeContextCurrent() function. + */ +static Bool driBindContext2(Display *dpy, int scrn, + GLXDrawable draw, GLXDrawable read, + GLXContext gc) +{ + __DRIscreen *pDRIScreen; + __DRIdrawable *pdraw; + __DRIdrawablePrivate *pdp; + __DRIdrawable *pread; + __DRIdrawablePrivate *prp; + __DRIscreenPrivate *psp; + __DRIcontextPrivate *pcp; + static Bool envchecked = False; + static Bool checkfullscreen = False; + + /* + ** Assume error checking is done properly in glXMakeCurrent before + ** calling driBindContext. + */ + + if (gc == NULL || draw == None || read == None) { + /* ERROR!!! */ + return GL_FALSE; + } + + if (!(pDRIScreen = __glXFindDRIScreen(dpy, scrn))) { + /* ERROR!!! */ + return GL_FALSE; + } else if (!(psp = (__DRIscreenPrivate *)pDRIScreen->private)) { + /* ERROR!!! */ + return GL_FALSE; + } + + /* Find the _DRIdrawable which corresponds to the writing GLXDrawable */ + pdraw = __driFindDrawable(psp->drawHash, draw); + if (!pdraw) { + /* Allocate a new drawable */ + pdraw = (__DRIdrawable *)Xmalloc(sizeof(__DRIdrawable)); + if (!pdraw) { + /* ERROR!!! */ + return GL_FALSE; + } + + /* Create a new drawable */ + pdraw->private = driCreateDrawable(dpy, scrn, draw, GL_FALSE, + gc->vid, pdraw); + if (!pdraw->private) { + /* ERROR!!! */ + Xfree(pdraw); + return GL_FALSE; + } + + /* Add pdraw to drawable list */ + if (!__driAddDrawable(psp->drawHash, pdraw)) { + /* ERROR!!! */ + (*pdraw->destroyDrawable)(dpy, pdraw->private); + Xfree(pdraw); + return GL_FALSE; + } + } + pdp = (__DRIdrawablePrivate *) pdraw->private; + + /* Find the _DRIdrawable which corresponds to the reading GLXDrawable */ + if (read == draw) { + /* read buffer == draw buffer */ + prp = pdp; + } + else { + pread = __driFindDrawable(psp->drawHash, read); + if (!pread) { + /* Allocate a new drawable */ + pread = (__DRIdrawable *)Xmalloc(sizeof(__DRIdrawable)); + if (!pread) { + /* ERROR!!! */ + return GL_FALSE; + } + + /* Create a new drawable */ + pread->private = driCreateDrawable(dpy, scrn, read, GL_FALSE, + gc->vid, pread); + if (!pread->private) { + /* ERROR!!! */ + Xfree(pread); + return GL_FALSE; + } + + /* Add pread to drawable list */ + if (!__driAddDrawable(psp->drawHash, pread)) { + /* ERROR!!! */ + (*pread->destroyDrawable)(dpy, pread->private); + Xfree(pread); + return GL_FALSE; + } + } + prp = (__DRIdrawablePrivate *) pread->private; + } + + /* Bind the drawable to the context */ + pcp = (__DRIcontextPrivate *)gc->driContext.private; + pcp->driDrawablePriv = pdp; + pdp->driContextPriv = pcp; + pdp->refcount++; + + /* + ** Now that we have a context associated with this drawable, we can + ** initialize the drawable information if has not been done before. + ** Also, since we need it when LIBGL_DRI_FULLSCREEN, pick up any changes + ** that are outstanding. + */ + if (!pdp->pStamp || *pdp->pStamp != pdp->lastStamp) { + DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); + __driUtilUpdateDrawableInfo(dpy, scrn, pdp); + DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); + } + + /* Call device-specific MakeCurrent */ + (*psp->DriverAPI.MakeCurrent)(pcp, pdp, prp); + + /* Check for the potential to enter an automatic full-screen mode. + This may need to be moved up. */ + if (!envchecked) { + checkfullscreen = driFeatureOn("LIBGL_DRI_AUTOFULLSCREEN"); + envchecked = GL_TRUE; + } + if (checkfullscreen && pdp->numClipRects == 1) { + /* If there is valid information in the SAREA, we can use it to + avoid a protocol request. The only time when the SAREA + information won't be valid will be initially, so in the worst + case, we'll make one protocol request that we could have + avoided. */ + int try = 1; + int clw = pdp->pClipRects[0].x2 - pdp->pClipRects[0].x1; + int clh = pdp->pClipRects[0].y2 - pdp->pClipRects[0].y1; + +#if 0 + /* Useful client-side debugging message */ + fprintf(stderr, + "********************************************\n" + "********************************************\n" + "********************************************\n" + "%d @ %d,%d,%d,%d\n" + "frame %d,%d,%d,%d\n" + "win %d,%d,%d,%d\n" + "fs = %p pdp = %p sarea = %d\n" + "********************************************\n" + "********************************************\n" + "********************************************\n", + pdp->numClipRects, + pdp->pClipRects[0].x1, + pdp->pClipRects[0].y1, + pdp->pClipRects[0].x2, + pdp->pClipRects[0].y2, + psp->pSAREA->frame.x, + psp->pSAREA->frame.y, + psp->pSAREA->frame.width, + psp->pSAREA->frame.height, + pdp->x, pdp->y, pdp->w, pdp->h, + psp->fullscreen, pdp, psp->pSAREA->frame.fullscreen); +#endif + + + if (pdp->x != pdp->pClipRects[0].x1 + || pdp->y != pdp->pClipRects[0].y1 + || pdp->w != clw + || pdp->h != clh) try = 0; + + if (try && psp->pSAREA->frame.width && psp->pSAREA->frame.height) { + if (pdp->x != psp->pSAREA->frame.x + || pdp->y != psp->pSAREA->frame.y + || pdp->w != psp->pSAREA->frame.width + || pdp->h != psp->pSAREA->frame.height) try = 0; + } + + if (try) { + if (psp->fullscreen && !psp->pSAREA->frame.fullscreen) { + /* Server has closed fullscreen mode */ + __driUtilMessage("server closed fullscreen mode\n"); + psp->fullscreen = NULL; + } + if (XF86DRIOpenFullScreen(dpy, scrn, draw)) { + psp->fullscreen = pdp; + psp->DriverAPI.OpenFullScreen(pcp); + } + } + } + + return GL_TRUE; +} + + +/* + * Simply call bind with the same GLXDrawable for the read and draw buffers. + */ +static Bool driBindContext(Display *dpy, int scrn, + GLXDrawable draw, GLXContext gc) +{ + return driBindContext2(dpy, scrn, draw, draw, gc); +} + + +/*****************************************************************/ + +/* + * This function basically updates the __DRIdrawablePrivate struct's + * cliprect information by calling XF86DRIGetDrawableInfo(). This is + * usually called by the DRI_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 +__driUtilUpdateDrawableInfo(Display *dpy, int scrn, + __DRIdrawablePrivate *pdp) +{ + __DRIscreenPrivate *psp; + __DRIcontextPrivate *pcp = pdp->driContextPriv; + + if (!pcp || (pdp != pcp->driDrawablePriv)) { + /* ERROR!!! */ + return; + } + + psp = pdp->driScreenPriv; + if (!psp) { + /* ERROR!!! */ + return; + } + + if (pdp->pClipRects) { + Xfree(pdp->pClipRects); + } + + if (pdp->pBackClipRects) { + Xfree(pdp->pBackClipRects); + } + + DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); + + if (!__driFindDrawable(psp->drawHash, pdp->draw) || + !XF86DRIGetDrawableInfo(dpy, scrn, pdp->draw, + &pdp->index, &pdp->lastStamp, + &pdp->x, &pdp->y, &pdp->w, &pdp->h, + &pdp->numClipRects, &pdp->pClipRects, + &pdp->backX, + &pdp->backY, + &pdp->numBackClipRects, + &pdp->pBackClipRects + )) { + /* Error -- eg the window may have been destroyed. Keep going + * with no cliprects. + */ + pdp->pStamp = &pdp->lastStamp; /* prevent endless loop */ + pdp->numClipRects = 0; + pdp->pClipRects = NULL; + pdp->numBackClipRects = 0; + pdp->pBackClipRects = NULL; + } + else + pdp->pStamp = &(psp->pSAREA->drawableTable[pdp->index].stamp); + + DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); + +} + +/*****************************************************************/ + +/* + * This is called via __DRIscreenRec's createDrawable pointer. + * libGL doesn't use it at this time. See comments in glxclient.h. + */ +static void *driCreateDrawable_dummy(Display *dpy, int scrn, + GLXDrawable draw, + VisualID vid, __DRIdrawable *pdraw) +{ + return driCreateDrawable(dpy, scrn, draw, GL_FALSE, vid, pdraw); +} + + + +static void *driCreateDrawable(Display *dpy, int scrn, GLXDrawable draw, + GLboolean isPixmap, + VisualID vid, __DRIdrawable *pdraw) +{ + __DRIscreen *pDRIScreen; + __DRIscreenPrivate *psp; + __DRIdrawablePrivate *pdp; + __GLXvisualConfig *config; + __GLcontextModes modes; + + pdp = (__DRIdrawablePrivate *)Xmalloc(sizeof(__DRIdrawablePrivate)); + if (!pdp) { + return NULL; + } + + if (!XF86DRICreateDrawable(dpy, scrn, draw, &pdp->hHWDrawable)) { + Xfree(pdp); + return NULL; + } + + pdp->draw = draw; + pdp->refcount = 0; + pdp->pStamp = NULL; + pdp->lastStamp = 0; + pdp->index = 0; + pdp->x = 0; + pdp->y = 0; + pdp->w = 0; + pdp->h = 0; + pdp->numClipRects = 0; + pdp->numBackClipRects = 0; + pdp->pClipRects = NULL; + pdp->pBackClipRects = NULL; + + if (!(pDRIScreen = __glXFindDRIScreen(dpy, scrn))) { + (void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw); + Xfree(pdp); + return NULL; + } else if (!(psp = (__DRIscreenPrivate *)pDRIScreen->private)) { + (void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw); + Xfree(pdp); + return NULL; + } + pdp->driScreenPriv = psp; + pdp->driContextPriv = &psp->dummyContextPriv; + + config = __driFindGlxConfig(dpy, scrn, vid); + if (!config) + return NULL; + + /* convert GLXvisualConfig struct to GLcontextModes struct */ + __glXFormatGLModes(&modes, config); + + if (!(*psp->DriverAPI.CreateBuffer)(dpy, psp, pdp, &modes, isPixmap)) { + (void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw); + Xfree(pdp); + return NULL; + } + + pdraw->destroyDrawable = driDestroyDrawable; + pdraw->swapBuffers = psp->DriverAPI.SwapBuffers; + + return (void *) pdp; +} + +static __DRIdrawable *driGetDrawable(Display *dpy, GLXDrawable draw, + void *screenPrivate) +{ + __DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate; + + /* + ** Make sure this routine returns NULL if the drawable is not bound + ** to a direct rendering context! + */ + return __driFindDrawable(psp->drawHash, draw); +} + +static void driDestroyDrawable(Display *dpy, void *drawablePrivate) +{ + __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *) drawablePrivate; + __DRIscreenPrivate *psp = pdp->driScreenPriv; + int scrn = psp->myNum; + + if (pdp) { + (*psp->DriverAPI.DestroyBuffer)(pdp); + if (__driWindowExists(dpy, pdp->draw)) + (void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw); + if (pdp->pClipRects) { + Xfree(pdp->pClipRects); + pdp->pClipRects = NULL; + } + if (pdp->pBackClipRects) { + Xfree(pdp->pBackClipRects); + pdp->pBackClipRects = NULL; + } + Xfree(pdp); + } +} + +/*****************************************************************/ + +static void driDestroyContext(Display *dpy, int scrn, void *contextPrivate) +{ + __DRIcontextPrivate *pcp = (__DRIcontextPrivate *) contextPrivate; + __DRIscreenPrivate *psp; + __DRIdrawablePrivate *pdp; + + if (pcp) { + if ((pdp = pcp->driDrawablePriv)) { + /* Shut down fullscreen mode */ + if ((psp = pdp->driScreenPriv) && psp->fullscreen) { + psp->DriverAPI.CloseFullScreen(pcp); + XF86DRICloseFullScreen(dpy, scrn, pdp->draw); + psp->fullscreen = NULL; + } + } + (*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp); + __driGarbageCollectDrawables(pcp->driScreenPriv->drawHash); + (void)XF86DRIDestroyContext(dpy, scrn, pcp->contextID); + Xfree(pcp); + } +} + +static void *driCreateContext(Display *dpy, XVisualInfo *vis, + void *sharedPrivate, + __DRIcontext *pctx) +{ + __DRIscreen *pDRIScreen; + __DRIcontextPrivate *pcp; + __DRIcontextPrivate *pshare = (__DRIcontextPrivate *) sharedPrivate; + __DRIscreenPrivate *psp; + __GLXvisualConfig *config; + __GLcontextModes modes; + void *shareCtx; + + if (!(pDRIScreen = __glXFindDRIScreen(dpy, vis->screen))) { + /* ERROR!!! */ + return NULL; + } else if (!(psp = (__DRIscreenPrivate *)pDRIScreen->private)) { + /* ERROR!!! */ + 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.driDrawablePriv = NULL; + psp->dummyContextPriv.driverPrivate = NULL; + /* No other fields should be used! */ + } + + /* Create the hash table */ + if (!psp->drawHash) psp->drawHash = drmHashCreate(); + + pcp = (__DRIcontextPrivate *)Xmalloc(sizeof(__DRIcontextPrivate)); + if (!pcp) { + return NULL; + } + + pcp->display = dpy; + pcp->driScreenPriv = psp; + pcp->driDrawablePriv = NULL; + + if (!XF86DRICreateContext(dpy, vis->screen, vis->visual, + &pcp->contextID, &pcp->hHWContext)) { + Xfree(pcp); + 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.driDrawablePriv = NULL; + psp->dummyContextPriv.driverPrivate = NULL; + /* No other fields should be used! */ + } + + /* Setup a __GLcontextModes struct corresponding to vis->visualid + * and create the rendering context. + */ + config = __driFindGlxConfig(dpy, vis->screen, vis->visualid); + if (!config) + return NULL; + + __glXFormatGLModes(&modes, config); + shareCtx = pshare ? pshare->driverPrivate : NULL; + if (!(*psp->DriverAPI.CreateContext)(dpy, &modes, pcp, shareCtx)) { + (void)XF86DRIDestroyContext(dpy, vis->screen, pcp->contextID); + Xfree(pcp); + return NULL; + } + + pctx->destroyContext = driDestroyContext; + pctx->bindContext = driBindContext; + pctx->unbindContext = driUnbindContext; + + __driGarbageCollectDrawables(pcp->driScreenPriv->drawHash); + + return pcp; +} + +/*****************************************************************/ + +static void driDestroyScreen(Display *dpy, int scrn, void *screenPrivate) +{ + __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->DriverAPI.DestroyScreen) + (*psp->DriverAPI.DestroyScreen)(psp); + + (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); + (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); + Xfree(psp->pDevPriv); + (void)drmClose(psp->fd); + Xfree(psp); + +#if 0 + /* + ** NOT_DONE: Normally, we would call XF86DRICloseConnection() + ** here, but since this routine is called after the + ** XCloseDisplay() function has already shut down the connection + ** to the Display, there is no protocol stream open to the X + ** server anymore. Luckily, XF86DRICloseConnection() does not + ** really do anything (for now). + */ + (void)XF86DRICloseConnection(dpy, scrn); +#endif + } +} + + +__DRIscreenPrivate * +__driUtilCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config, + const struct __DriverAPIRec *driverAPI) +{ + int directCapable; + __DRIscreenPrivate *psp; + drmHandle hFB, hSAREA; + char *BusID, *driverName; + drmMagic magic; + + if (!XF86DRIQueryDirectRenderingCapable(dpy, scrn, &directCapable)) { + return NULL; + } + + if (!directCapable) { + return NULL; + } + + psp = (__DRIscreenPrivate *)Xmalloc(sizeof(__DRIscreenPrivate)); + if (!psp) { + return NULL; + } + psp->fullscreen = NULL; + psp->display = dpy; + psp->myNum = scrn; + + if (!XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) { + Xfree(psp); + return NULL; + } + + /* + ** NOT_DONE: This is used by the X server to detect when the client + ** has died while holding the drawable lock. The client sets the + ** drawable lock to this value. + */ + psp->drawLockID = 1; + + 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); + return NULL; + } + Xfree(BusID); /* No longer needed */ + + if (drmGetMagic(psp->fd, &magic)) { + fprintf(stderr, "libGL error: drmGetMagic failed\n"); + (void)drmClose(psp->fd); + Xfree(psp); + (void)XF86DRICloseConnection(dpy, scrn); + return NULL; + } + + { + drmVersionPtr version = drmGetVersion(psp->fd); + if (version) { + psp->drmMajor = version->version_major; + psp->drmMinor = version->version_minor; + psp->drmPatch = version->version_patchlevel; + drmFreeVersion(version); + } + else { + psp->drmMajor = -1; + psp->drmMinor = -1; + psp->drmPatch = -1; + } + } + + if (!XF86DRIAuthConnection(dpy, scrn, magic)) { + fprintf(stderr, "libGL error: XF86DRIAuthConnection failed\n"); + (void)drmClose(psp->fd); + Xfree(psp); + (void)XF86DRICloseConnection(dpy, scrn); + 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, + &psp->ddxPatch, + &driverName)) { + fprintf(stderr, "libGL error: XF86DRIGetClientDriverName failed\n"); + (void)drmClose(psp->fd); + Xfree(psp); + (void)XF86DRICloseConnection(dpy, scrn); + return NULL; + } + + /* install driver's callback functions */ + memcpy(&psp->DriverAPI, driverAPI, sizeof(struct __DriverAPIRec)); + + /* + * 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, + &psp->fbSize, + &psp->fbStride, + &psp->devPrivSize, + &psp->pDevPriv)) { + fprintf(stderr, "libGL error: XF86DRIGetDeviceInfo failed\n"); + (void)drmClose(psp->fd); + Xfree(psp); + (void)XF86DRICloseConnection(dpy, scrn); + return NULL; + } + psp->fbWidth = DisplayWidth(dpy, scrn); + 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)) { + fprintf(stderr, "libGL error: drmMap of framebuffer failed\n"); + Xfree(psp->pDevPriv); + (void)drmClose(psp->fd); + Xfree(psp); + (void)XF86DRICloseConnection(dpy, scrn); + 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)) { + fprintf(stderr, "libGL error: drmMap of sarea failed\n"); + (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); + Xfree(psp->pDevPriv); + (void)drmClose(psp->fd); + Xfree(psp); + (void)XF86DRICloseConnection(dpy, scrn); + return NULL; + } + + /* Initialize the screen specific GLX driver */ + if (psp->DriverAPI.InitDriver) { + if (!(*psp->DriverAPI.InitDriver)(psp)) { + fprintf(stderr, "libGL error: InitDriver failed\n"); + (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); + (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); + Xfree(psp->pDevPriv); + (void)drmClose(psp->fd); + Xfree(psp); + (void)XF86DRICloseConnection(dpy, scrn); + return NULL; + } + } + + /* + ** Do not init dummy context here; actual initialization will be + ** done when the first DRI context is created. Init screen priv ptr + ** to NULL to let CreateContext routine that it needs to be inited. + */ + psp->dummyContextPriv.driScreenPriv = NULL; + + /* Initialize the drawHash when the first context is created */ + psp->drawHash = NULL; + + psc->destroyScreen = driDestroyScreen; + psc->createContext = driCreateContext; + psc->createDrawable = driCreateDrawable_dummy; + psc->getDrawable = driGetDrawable; + + return psp; +} + + +#endif Index: xc/lib/GL/dri/dri_util.h diff -u /dev/null xc/lib/GL/dri/dri_util.h:1.1 --- /dev/null Thu Feb 27 12:26:10 2003 +++ xc/lib/GL/dri/dri_util.h Fri Feb 22 16:32:52 2002 @@ -0,0 +1,333 @@ +/* $XFree86: xc/lib/GL/dri/dri_util.h,v 1.1 2002/02/22 21:32:52 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Brian Paul + */ + +#ifndef _DRI_UTIL_H_ +#define _DRI_UTIL_H_ + +#ifdef GLX_DIRECT_RENDERING + +#define CAPI /* XXX this should be globally defined somewhere */ + +#include +#include "glxclient.h" +#include "xf86dri.h" +#include "sarea.h" +#include "GL/internal/glcore.h" + + +typedef struct __DRIdisplayPrivateRec __DRIdisplayPrivate; +typedef struct __DRIscreenPrivateRec __DRIscreenPrivate; +typedef struct __DRIcontextPrivateRec __DRIcontextPrivate; +typedef struct __DRIdrawablePrivateRec __DRIdrawablePrivate; + + +#define DRI_VALIDATE_DRAWABLE_INFO_ONCE(dpy, scrn, pDrawPriv) \ + do { \ + if (*(pDrawPriv->pStamp) != pDrawPriv->lastStamp) { \ + __driUtilUpdateDrawableInfo(dpy, scrn, pDrawPriv); \ + } \ + } while (0) + + +#define DRI_VALIDATE_DRAWABLE_INFO(dpy, psp, pdp) \ +do { \ + while (*(pdp->pStamp) != pdp->lastStamp) { \ + DRM_UNLOCK(psp->fd, &psp->pSAREA->lock, \ + pdp->driContextPriv->hHWContext); \ + \ + DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ + DRI_VALIDATE_DRAWABLE_INFO_ONCE(dpy, psp->myNum, pdp); \ + DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ + \ + DRM_LIGHT_LOCK(psp->fd, &psp->pSAREA->lock, \ + pdp->driContextPriv->hHWContext); \ + } \ +} while (0) + + +struct __DriverAPIRec { + GLboolean (*InitDriver)(__DRIscreenPrivate *driScrnPriv); + void (*DestroyScreen)(__DRIscreenPrivate *driScrnPriv); + GLboolean (*CreateContext)(Display *dpy, + const __GLcontextModes *glVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate); + void (*DestroyContext)(__DRIcontextPrivate *driContextPriv); + GLboolean (*CreateBuffer)(Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *glVis, + GLboolean pixmapBuffer); + void (*DestroyBuffer)(__DRIdrawablePrivate *driDrawPriv); + void (*SwapBuffers)(Display *dpy, void *drawablePrivate); + GLboolean (*MakeCurrent)(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv); + GLboolean (*UnbindContext)(__DRIcontextPrivate *driContextPriv); + GLboolean (*OpenFullScreen)(__DRIcontextPrivate *driContextPriv); + GLboolean (*CloseFullScreen)(__DRIcontextPrivate *driContextPriv); +}; + + +struct __DRIdrawablePrivateRec { + /* + ** Kernel drawable handle (not currently used). + */ + drmDrawable hHWDrawable; + + /* + ** Driver's private drawable information. This structure is opaque. + */ + void *driverPrivate; + + /* + ** X's drawable ID associated with this private drawable. + */ + GLXDrawable draw; + + /* + ** Reference count for number of context's currently bound to this + ** drawable. Once the refcount reaches 0, the drawable can be + ** destroyed. This behavior will change with GLX 1.3. + */ + int refcount; + + /* + ** Index of this drawable's information in the SAREA. + */ + unsigned int index; + + /* + ** Pointer to the "drawable has changed ID" stamp in the SAREA. + */ + unsigned int *pStamp; + + /* + ** Last value of the stamp. If this differs from the value stored + ** at *pStamp, then the drawable information has been modified by + ** the X server, and the drawable information (below) should be + ** retrieved from the X server. + */ + unsigned int lastStamp; + + /* + ** Drawable information used in software fallbacks. + */ + int x; + int y; + int w; + int h; + int numClipRects; + XF86DRIClipRectPtr pClipRects; + + /* + ** Information about the back and depthbuffer where different + ** from above. + */ + int backX; + int backY; + int backClipRectType; + int numBackClipRects; + XF86DRIClipRectPtr pBackClipRects; + + /* + ** Pointer to context to which this drawable is currently bound. + */ + __DRIcontextPrivate *driContextPriv; + + /* + ** Pointer to screen on which this drawable was created. + */ + __DRIscreenPrivate *driScreenPriv; +}; + +struct __DRIcontextPrivateRec { + /* + ** Kernel context handle used to access the device lock. + */ + XID contextID; + + /* + ** Kernel context handle used to access the device lock. + */ + drmContext hHWContext; + + /* + ** Device driver's private context data. This structure is opaque. + */ + void *driverPrivate; + + /* + ** This context's display pointer. + */ + Display *display; + + /* + ** Pointer to drawable currently bound to this context. + */ + __DRIdrawablePrivate *driDrawablePriv; + + /* + ** Pointer to screen on which this context was created. + */ + __DRIscreenPrivate *driScreenPriv; +}; + +struct __DRIscreenPrivateRec { + /* + ** Display for this screen + */ + Display *display; + + /* + ** Current screen's number + */ + int myNum; + + /* + ** Callback functions into the hardware-specific DRI driver code. + */ + struct __DriverAPIRec DriverAPI; + + /* + ** DDX / 2D driver version information. + */ + int ddxMajor; + int ddxMinor; + int ddxPatch; + + /* + ** DRM version information. + */ + int drmMajor; + int drmMinor; + int drmPatch; + + /* + ** ID used when the client sets the drawable lock. The X server + ** uses this value to detect if the client has died while holding + ** the drawable lock. + */ + int drawLockID; + + /* + ** File descriptor returned when the kernel device driver is opened. + ** It is used to: + ** - authenticate client to kernel + ** - map the frame buffer, SAREA, etc. + ** - close the kernel device driver + */ + int fd; + + /* + ** SAREA pointer used to access: + ** - the device lock + ** - the device-independent per-drawable and per-context(?) information + */ + XF86DRISAREAPtr pSAREA; + + /* + ** Direct frame buffer access information used for software + ** fallbacks. + */ + unsigned char *pFB; + int fbSize; + int fbOrigin; + int fbStride; + int fbWidth; + int fbHeight; + int fbBPP; + + /* + ** Device-dependent private information (stored in the SAREA). This + ** data is accessed by the client driver only. + */ + void *pDevPriv; + int devPrivSize; + + /* + ** Dummy context to which drawables are bound when not bound to any + ** other context. A dummy hHWContext is created for this context, + ** and is used by the GL core when a HW lock is required but the + ** drawable is not currently bound (e.g., potentially during a + ** SwapBuffers request). The dummy context is created when the + ** first "real" context is created on this screen. + */ + __DRIcontextPrivate dummyContextPriv; + + /* + ** Hash table to hold the drawable information for this screen. + */ + void *drawHash; + + /* + ** Device-dependent private information (not stored in the SAREA). + ** This pointer is never touched by the DRI layer. + */ + void *private; + + /* If we're in full screen mode (via DRIOpenFullScreen), this points + to the drawable that was bound. Otherwise, this is NULL. */ + __DRIdrawablePrivate *fullscreen; +}; + + + +extern void +__driUtilMessage(const char *f, ...); + + +extern void +__driUtilUpdateDrawableInfo(Display *dpy, int scrn, + __DRIdrawablePrivate *pdp); + +extern __DRIscreenPrivate * +__driUtilCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config, + const struct __DriverAPIRec *driverAPI); + +/* This must be implemented in each driver */ +extern void * +__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config); + + +/* This is optionally implemented in each driver */ +extern void +__driRegisterExtensions( void ); + + +#endif /* GLX_DIRECT_RENDERING */ + +#endif /* _DRI_UTIL_H_ */ Index: xc/lib/GL/dri/xf86dri.h diff -u xc/lib/GL/dri/xf86dri.h:1.7 xc/lib/GL/dri/xf86dri.h:1.8 --- xc/lib/GL/dri/xf86dri.h:1.7 Thu Dec 7 15:26:02 2000 +++ xc/lib/GL/dri/xf86dri.h Wed Oct 30 07:51:25 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */ +/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.8 2002/10/30 12:51:25 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,7 @@ /* * Authors: * Kevin E. Martin - * Jens Owen + * Jens Owen * Rickard E. (Rik) Faith * */ Index: xc/lib/GL/dri/xf86dristr.h diff -u xc/lib/GL/dri/xf86dristr.h:1.9 xc/lib/GL/dri/xf86dristr.h:1.10 --- xc/lib/GL/dri/xf86dristr.h:1.9 Wed Mar 21 11:01:08 2001 +++ xc/lib/GL/dri/xf86dristr.h Wed Oct 30 07:51:25 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.9 2001/03/21 16:01:08 dawes Exp $ */ +/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.10 2002/10/30 12:51:25 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,7 @@ /* * Authors: * Kevin E. Martin - * Jens Owen + * Jens Owen * Rickard E. (Rik) Fiath * */ @@ -42,8 +42,17 @@ #define XF86DRINAME "XFree86-DRI" -#define XF86DRI_MAJOR_VERSION 4 /* current version numbers */ -#define XF86DRI_MINOR_VERSION 0 +/* The DRI version number. This was originally set to be the same of the + * XFree86 version number. However, this version is really indepedent of + * the XFree86 version. + * + * Version History: + * 4.0.0: Original + * 4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02 + * 4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02 + */ +#define XF86DRI_MAJOR_VERSION 4 +#define XF86DRI_MINOR_VERSION 1 #define XF86DRI_PATCH_VERSION 0 typedef struct _XF86DRIQueryVersion { Index: xc/lib/GL/dri/drm/Imakefile diff -u xc/lib/GL/dri/drm/Imakefile:1.18 xc/lib/GL/dri/drm/Imakefile:1.20 --- xc/lib/GL/dri/drm/Imakefile:1.18 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/dri/drm/Imakefile Wed Oct 30 07:51:25 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.18 2001/10/04 18:28:21 alanh Exp $ +XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.20 2002/10/30 12:51:25 alanh Exp $ #if GlxUseBuiltInDRIDriver #define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) @@ -24,10 +24,8 @@ -I$(XF86OSSRC)/$(OS_SUBDIR)/drm/kernel \ -I$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel \ -I$(XF86OSSRC) - SRCS = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c \ - xf86drmMga.c xf86drmR128.c xf86drmRadeon.c - OBJS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o \ - xf86drmMga.o xf86drmR128.o xf86drmRadeon.o + SRCS = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c + OBJS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o #if defined(LinuxArchitecture) OS_SUBDIR = linux @@ -43,17 +41,8 @@ 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(i830_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.14 xc/lib/GL/glx/Imakefile:1.18 --- xc/lib/GL/glx/Imakefile:1.14 Mon Apr 2 22:29:32 2001 +++ xc/lib/GL/glx/Imakefile Mon Nov 25 09:04:49 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/glx/Imakefile,v 1.14 2001/04/03 02:29:32 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/glx/Imakefile,v 1.18 2002/11/25 14:04:49 eich 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., @@ -34,9 +34,14 @@ # Files from Mesa LinkSourceFile(glapi.c, $(MESASRCDIR)/src) -LinkSourceFile(glapinoop.c, $(MESASRCDIR)/src) LinkSourceFile(glthread.c, $(MESASRCDIR)/src) +#ifdef i386Architecture LinkSourceFile(glapi_x86.S, $(MESASRCDIR)/src/X86) +#endif +#ifdef SparcArchitecture +LinkSourceFile(glapi_sparc.S, $(MESASRCDIR)/src/SPARC) +#endif + # Maybe some of these could come from # xc/extras/ogl-sample/main/glx/lib at some point. @@ -50,7 +55,6 @@ g_single.c \ g_vendpriv.c \ glapi.c \ - glapinoop.c \ glthread.c \ glxcmds.c \ glxext.c \ @@ -73,7 +77,6 @@ g_single.o \ g_vendpriv.o \ glapi.o \ - glapinoop.o \ glthread.o \ glxcmds.o \ glxext.o \ @@ -89,18 +92,34 @@ GLX_DEFS = GlxDefines +#ifdef i386Architecture + ASM_DIR = X86 +#endif +#ifdef SparcArchitecture + ASM_DIR = SPARC +#endif + #if BuildXF86DRI DRI_INCS = -I$(GLXLIBSRC)/dri -#if defined(i386Architecture) +#if defined(i386Architecture) && MesaUseX86Asm ASM_SRCS = glapi_x86.S ASM_OBJS = glapi_x86.o ASM_DEFS = -DUSE_X86_ASM #endif +#if defined(SparcArchitecture) + ASM_SRCS = glapi_sparc.S + ASM_OBJS = glapi_sparc.o + ASM_DEFS = -DUSE_SPARC_ASM #endif +#if GlxBuiltInXMesa + XMESA_DEFINES = -DGLX_BUILT_IN_XMESA +#endif +#endif + SRCS = $(GLX_SRCS) $(ASM_SRCS) OBJS = $(GLX_OBJS) $(ASM_OBJS) - DEFINES = $(GLX_DEFS) $(ASM_DEFS) + DEFINES = $(GLX_DEFS) $(ASM_DEFS) $(XMESA_DEFINES) INCLUDES = -I$(INCLUDESRC) \ -I$(XINCLUDESRC) \ @@ -108,8 +127,10 @@ -I$(INCLUDESRC)/GL \ -I$(GLXLIBSRC)/glx \ -I$(MESASRCDIR)/src \ - -I$(MESASRCDIR)/src/X86 \ + -I$(MESASRCDIR)/src/X \ + -I$(MESASRCDIR)/src/$(ASM_DIR) \ -I$(MESASRCDIR)/include \ + -I$(GLXLIBSRC)/include \ $(DRI_INCS) #include @@ -118,6 +139,10 @@ #if BuildXF86DRI && defined(i386Architecture) ObjectFromAsmSource(glapi_x86, NullParameter) +#endif +#if BuildXF86DRI && defined(SparcArchitecture) +STD_CPP_DEFINES = StandardDefines $(PROJECT_DEFINES) +ObjectFromAsmSource(glapi_sparc, NullParameter) #endif SubdirLibraryRule($(OBJS)) Index: xc/lib/GL/glx/compsize.c diff -u xc/lib/GL/glx/compsize.c:1.3 xc/lib/GL/glx/compsize.c:1.4 --- xc/lib/GL/glx/compsize.c:1.3 Wed Mar 21 11:04:39 2001 +++ xc/lib/GL/glx/compsize.c Fri Feb 22 16:32:52 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/compsize.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/compsize.c,v 1.4 2002/02/22 21:32:52 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 @@ -94,15 +94,18 @@ case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: + case GL_INTENSITY: elements = 1; break; case GL_LUMINANCE_ALPHA: 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; @@ -219,6 +222,26 @@ return 1; case GL_TEXTURE_ENV_COLOR: return 4; + /* GL_EXT_texture_env_combine */ + case GL_COMBINE_RGB_EXT: + case GL_COMBINE_ALPHA_EXT: + case GL_SOURCE0_RGB_EXT: + case GL_SOURCE1_RGB_EXT: + case GL_SOURCE2_RGB_EXT: + case GL_SOURCE0_ALPHA_EXT: + case GL_SOURCE1_ALPHA_EXT: + case GL_SOURCE2_ALPHA_EXT: + case GL_OPERAND0_RGB_EXT: + case GL_OPERAND1_RGB_EXT: + case GL_OPERAND0_ALPHA_EXT: + case GL_OPERAND1_ALPHA_EXT: + case GL_OPERAND2_RGB_EXT: + case GL_OPERAND2_ALPHA_EXT: + case GL_RGB_SCALE_EXT: + case GL_ALPHA_SCALE: + /* GL_EXT_texture_lod */ + case GL_TEXTURE_LOD_BIAS_EXT: + return 1; default: return 0; } @@ -243,15 +266,18 @@ case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: + case GL_INTENSITY: elements = 1; break; case GL_LUMINANCE_ALPHA: 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; @@ -320,15 +346,18 @@ case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: + case GL_INTENSITY: elements = 1; break; case GL_LUMINANCE_ALPHA: 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; @@ -399,15 +428,18 @@ case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: + case GL_INTENSITY: elements = 1; break; case GL_LUMINANCE_ALPHA: 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; Index: xc/lib/GL/glx/dispatch.c diff -u xc/lib/GL/glx/dispatch.c:1.3 xc/lib/GL/glx/dispatch.c:1.4 --- xc/lib/GL/glx/dispatch.c:1.3 Wed Mar 21 11:04:39 2001 +++ xc/lib/GL/glx/dispatch.c Fri Feb 22 16:32:53 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/dispatch.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/dispatch.c,v 1.4 2002/02/22 21:32:53 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -37,15 +37,21 @@ #include "glapitable.h" +/* + * NOTE: this file implements C-based dispatch of the OpenGL entrypoints + * (glAccum, glBegin, etc). + * This code IS NOT USED if we're compiling on an x86 system and using + * the glapi_x86.S assembly code. + */ + + +#if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM)) + #define KEYWORD1 #define KEYWORD2 -#if defined(USE_X86_ASM) -#define NAME(func) _glapi_fallback_##func -#else #define NAME(func) gl##func -#endif #define DISPATCH(func, args, msg) \ const struct _glapi_table *dispatch; \ @@ -59,8 +65,5 @@ #include "glapitemp.h" - - - - +#endif /* USE_X86_ASM */ Index: xc/lib/GL/glx/g_render.c diff -u xc/lib/GL/glx/g_render.c:1.3 xc/lib/GL/glx/g_render.c:1.4 --- xc/lib/GL/glx/g_render.c:1.3 Wed Mar 21 11:04:39 2001 +++ xc/lib/GL/glx/g_render.c Fri Feb 22 16:32:53 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/g_render.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/g_render.c,v 1.4 2002/02/22 21:32:53 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 @@ -3394,5 +3394,69 @@ __GLX_PUT_SHORT(12,v[2]); __GLX_PUT_SHORT(14,v[3]); __GLX_END(16); +} + +void glLoadTransposeMatrixfARB(const GLfloat *m) +{ + __GLX_DECLARE_VARIABLES(); + GLfloat t[16]; + int i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { + t[i*4+j] = m[j*4+i]; + } + } + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_LoadMatrixf,68); + __GLX_PUT_FLOAT_ARRAY(4,t,16); + __GLX_END(68); +} + +void glMultTransposeMatrixfARB(const GLfloat *m) +{ + __GLX_DECLARE_VARIABLES(); + GLfloat t[16]; + int i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { + t[i*4+j] = m[j*4+i]; + } + } + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultMatrixf,68); + __GLX_PUT_FLOAT_ARRAY(4,t,16); + __GLX_END(68); +} + +void glLoadTransposeMatrixdARB(const GLdouble *m) +{ + __GLX_DECLARE_VARIABLES(); + GLdouble t[16]; + int i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { + t[i*4+j] = m[j*4+i]; + } + } + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_LoadMatrixd,132); + __GLX_PUT_DOUBLE_ARRAY(4,t,16); + __GLX_END(132); +} + +void glMultTransposeMatrixdARB(const GLdouble *m) +{ + __GLX_DECLARE_VARIABLES(); + GLdouble t[16]; + int i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < 4; j++) { + t[i*4+j] = m[j*4+i]; + } + } + __GLX_LOAD_VARIABLES(); + __GLX_BEGIN(X_GLrop_MultMatrixd,132); + __GLX_PUT_DOUBLE_ARRAY(4,t,16); + __GLX_END(132); } Index: xc/lib/GL/glx/glxclient.h diff -u xc/lib/GL/glx/glxclient.h:1.13 xc/lib/GL/glx/glxclient.h:1.15 --- xc/lib/GL/glx/glxclient.h:1.13 Tue Apr 10 12:07:49 2001 +++ xc/lib/GL/glx/glxclient.h Wed Oct 30 07:51:26 2002 @@ -31,7 +31,7 @@ ** 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.13 2001/04/10 16:07:49 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/glxclient.h,v 1.15 2002/10/30 12:51:26 alanh Exp $ */ /* * Direct rendering support added by Precision Insight, Inc. @@ -47,11 +47,12 @@ #define NEED_EVENTS #include #include +#define GLX_GLXEXT_PROTOTYPES #include #include #include -#include "glxint.h" -#include "glxproto.h" +#include "GL/glxint.h" +#include "GL/glxproto.h" #include "glapitable.h" #ifdef NEED_GL_FUNCS_WRAPPED #include "indirect.h" @@ -59,7 +60,9 @@ #ifdef XTHREADS #include "Xthreads.h" #endif - +#ifdef GLX_BUILT_IN_XMESA +#include "realglx.h" /* just silences prototype warnings */ +#endif #define GLX_MAJOR_VERSION 1 /* current version numbers */ #define GLX_MINOR_VERSION 2 @@ -95,7 +98,7 @@ /* ** Method to destroy the private DRI display data. */ - void (*destroyDisplay)(Display *dpy, void *private); + void (*destroyDisplay)(Display *dpy, void *displayPrivate); /* ** Methods to create the private DRI screen data and initialize the @@ -108,7 +111,7 @@ /* ** Opaque pointer to private per display direct rendering data. ** NULL if direct rendering is not supported on this display. Never - ** dereference by this code. + ** dereferenced in libGL. */ void *private; }; @@ -121,13 +124,13 @@ /* ** Method to destroy the private DRI screen data. */ - void (*destroyScreen)(Display *dpy, int scrn, void *private); + void (*destroyScreen)(Display *dpy, int scrn, void *screenPrivate); /* ** Method to create the private DRI context data and initialize the ** context dependent methods. */ - void *(*createContext)(Display *dpy, XVisualInfo *vis, void *shared, + void *(*createContext)(Display *dpy, XVisualInfo *vis, void *sharedPrivate, __DRIcontext *pctx); /* @@ -141,12 +144,18 @@ ** Method to return a pointer to the DRI drawable data. */ __DRIdrawable *(*getDrawable)(Display *dpy, GLXDrawable draw, - void *private); + void *drawablePrivate); + + /* + ** XXX in the future, implement this: + void *(*createPBuffer)(Display *dpy, int scrn, GLXPbuffer pbuffer, + GLXFBConfig config, __DRIdrawable *pdraw); + **/ /* ** Opaque pointer to private per screen direct rendering data. NULL ** if direct rendering is not supported on this screen. Never - ** dereference by this code. + ** dereferenced in libGL. */ void *private; }; @@ -159,10 +168,12 @@ /* ** Method to destroy the private DRI context data. */ - void (*destroyContext)(Display *dpy, int scrn, void *private); + void (*destroyContext)(Display *dpy, int scrn, void *contextPrivate); /* ** Method to bind a DRI drawable to a DRI graphics context. + ** XXX in the future, also pass a 'read' GLXDrawable for + ** glXMakeCurrentReadSGI() and GLX 1.3's glXMakeContextCurrent(). */ Bool (*bindContext)(Display *dpy, int scrn, GLXDrawable draw, GLXContext gc); @@ -176,33 +187,31 @@ /* ** Opaque pointer to private per context direct rendering data. ** NULL if direct rendering is not supported on the display or - ** screen used to create this context. Never dereference by this - ** code. + ** screen used to create this context. Never dereferenced in libGL. */ void *private; }; /* ** Drawable dependent methods. This structure is initialized during the -** (*createDrawable)() call. These methods are not currently called -** from GLX 1.2, but could be used in GLX 1.3. +** (*createDrawable)() call. createDrawable() is not called by libGL at +** this time. It's currently used via the dri_util.c utility code instead. */ struct __DRIdrawableRec { /* ** Method to destroy the private DRI drawable data. */ - void (*destroyDrawable)(Display *dpy, void *private); + void (*destroyDrawable)(Display *dpy, void *drawablePrivate); /* ** Method to swap the front and back buffers. */ - void (*swapBuffers)(Display *dpy, void *private); + void (*swapBuffers)(Display *dpy, void *drawablePrivate); /* ** Opaque pointer to private per drawable direct rendering data. ** NULL if direct rendering is not supported on the display or - ** screen used to create this drawable. Never dereference by this - ** code. + ** screen used to create this drawable. Never dereferenced in libGL. */ void *private; }; @@ -538,7 +547,11 @@ /* Query drivers for dynamically registered extensions */ extern void __glXRegisterExtensions(void); +/* Functions for extending the GLX API: */ +extern void *__glXRegisterGLXFunction(const char *funcName, void *funcAddr); +extern void __glXRegisterGLXExtensionString(const char *extName); + /************************************************************************/ extern int __glXDebug; @@ -560,7 +573,6 @@ */ #if defined(GLX_DIRECT_RENDERING) && defined(XTHREADS) extern xmutex_rec __glXmutex; -extern xmutex_rec __glXSwapBuffersMutex; #define __glXLock() xmutex_lock(&__glXmutex) #define __glXUnlock() xmutex_unlock(&__glXmutex) #else @@ -675,5 +687,19 @@ extern void _XRead(Display*, void*, long); extern void _XSend(Display*, const void*, long); #endif + + +/* +** GLX_BUILT_IN_XMESA controls whether libGL has a built-in verions of +** Mesa that can render to non-GLX displays. +*/ +#ifdef GLX_BUILT_IN_XMESA +#define GLX_PREFIX(function) _real_##function +#else +#define GLX_PREFIX(function) function +#endif + + +extern char *__glXstrdup(const char *str); #endif /* !__GLX_client_h__ */ Index: xc/lib/GL/glx/glxcmds.c diff -u xc/lib/GL/glx/glxcmds.c:1.15 xc/lib/GL/glx/glxcmds.c:1.19 --- xc/lib/GL/glx/glxcmds.c:1.15 Fri Apr 6 21:39:39 2001 +++ xc/lib/GL/glx/glxcmds.c Mon Jan 20 16:37:18 2003 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/glxcmds.c,v 1.15 2001/04/07 01:39:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/glxcmds.c,v 1.19 2003/01/20 21:37:18 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -45,22 +45,35 @@ #endif static const char __glXGLClientExtensions[] = - "GL_ARB_multitexture " "GL_ARB_imaging " + "GL_ARB_multitexture " + "GL_ARB_texture_border_clamp " + "GL_ARB_texture_cube_map " + "GL_ARB_texture_env_add " + "GL_ARB_texture_env_combine " + "GL_ARB_texture_env_dot3 " + "GL_ARB_transpose_matrix " "GL_EXT_abgr " "GL_EXT_blend_color " "GL_EXT_blend_minmax " "GL_EXT_blend_subtract " + "GL_EXT_texture_env_add " + "GL_EXT_texture_env_combine " + "GL_EXT_texture_env_dot3 " + "GL_EXT_texture_lod_bias " ; static const char __glXGLXClientVendorName[] = "SGI"; static const char __glXGLXClientVersion[] = "1.2"; -static const char __glXGLXClientExtensions[] = +static const char __glXGLXDefaultClientExtensions[] = "GLX_EXT_visual_info " "GLX_EXT_visual_rating " "GLX_EXT_import_context " ; +static const char *__glXGLXClientExtensions = __glXGLXDefaultClientExtensions; + + /* ** Create a new context. */ @@ -77,6 +90,9 @@ __GLXdisplayPrivate *priv; #endif + if (!dpy || !vis) + return NULL; + opcode = __glXSetupForCommand(dpy); if (!opcode) { return NULL; @@ -190,10 +206,10 @@ return gc; } -GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis, +GLXContext GLX_PREFIX(glXCreateContext)(Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool allowDirect) { - return CreateContext(dpy, vis, shareList, allowDirect, None); + return CreateContext(dpy, vis, shareList, allowDirect, None); } void __glXFreeContext(__GLXcontext *gc) @@ -263,7 +279,7 @@ SyncHandle(); } } -void glXDestroyContext(Display *dpy, GLXContext gc) +void GLX_PREFIX(glXDestroyContext)(Display *dpy, GLXContext gc) { DestroyContext(dpy, gc); } @@ -271,7 +287,7 @@ /* ** Return the major and minor version #s for the GLX extension */ -Bool glXQueryVersion(Display *dpy, int *major, int *minor) +Bool GLX_PREFIX(glXQueryVersion)(Display *dpy, int *major, int *minor) { __GLXdisplayPrivate *priv; @@ -287,7 +303,7 @@ /* ** Query the existance of the GLX extension */ -Bool glXQueryExtension(Display *dpy, int *errorBase, int *eventBase) +Bool GLX_PREFIX(glXQueryExtension)(Display *dpy, int *errorBase, int *eventBase) { int major_op, erb, evb; Bool rv; @@ -304,7 +320,7 @@ ** Put a barrier in the token stream that forces the GL to finish its ** work before X can proceed. */ -void glXWaitGL(void) +void GLX_PREFIX(glXWaitGL)(void) { xGLXWaitGLReq *req; GLXContext gc = __glXGetCurrentContext(); @@ -340,7 +356,7 @@ ** Put a barrier in the token stream that forces X to finish its ** work before GL can proceed. */ -void glXWaitX(void) +void GLX_PREFIX(glXWaitX)(void) { xGLXWaitXReq *req; GLXContext gc = __glXGetCurrentContext(); @@ -370,7 +386,7 @@ SyncHandle(); } -void glXUseXFont(Font font, int first, int count, int listBase) +void GLX_PREFIX(glXUseXFont)(Font font, int first, int count, int listBase) { xGLXUseXFontReq *req; GLXContext gc = __glXGetCurrentContext(); @@ -408,7 +424,7 @@ ** Copy the source context to the destination context using the ** attribute "mask". */ -void glXCopyContext(Display *dpy, GLXContext source, GLXContext dest, +void GLX_PREFIX(glXCopyContext)(Display *dpy, GLXContext source, GLXContext dest, unsigned long mask) { xGLXCopyContextReq *req; @@ -478,7 +494,7 @@ return reply.isDirect; } -Bool glXIsDirect(Display *dpy, GLXContext gc) +Bool GLX_PREFIX(glXIsDirect)(Display *dpy, GLXContext gc) { if (!gc) { return GL_FALSE; @@ -490,7 +506,7 @@ return __glXIsDirect(dpy, gc->xid); } -GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis, Pixmap pixmap) +GLXPixmap GLX_PREFIX(glXCreateGLXPixmap)(Display *dpy, XVisualInfo *vis, Pixmap pixmap) { xGLXCreateGLXPixmapReq *req; GLXPixmap xid; @@ -518,7 +534,7 @@ /* ** Destroy the named pixmap */ -void glXDestroyGLXPixmap(Display *dpy, GLXPixmap glxpixmap) +void GLX_PREFIX(glXDestroyGLXPixmap)(Display *dpy, GLXPixmap glxpixmap) { xGLXDestroyGLXPixmapReq *req; CARD8 opcode; @@ -538,7 +554,7 @@ SyncHandle(); } -void glXSwapBuffers(Display *dpy, GLXDrawable drawable) +void GLX_PREFIX(glXSwapBuffers)(Display *dpy, GLXDrawable drawable) { xGLXSwapBuffersReq *req; GLXContext gc = __glXGetCurrentContext(); @@ -548,10 +564,6 @@ __GLXdisplayPrivate *priv; __DRIdrawable *pdraw; -#if defined(XTHREADS) - xmutex_lock(&__glXSwapBuffersMutex); -#endif - priv = __glXInitialize(dpy); if (priv->driDisplay.private) { __GLXscreenConfigs *psc = &priv->screenConfigs[gc->screen]; @@ -564,9 +576,6 @@ psc->driScreen.private); if (pdraw) { (*pdraw->swapBuffers)(dpy, pdraw->private); -#if defined(XTHREADS) - xmutex_unlock(&__glXSwapBuffersMutex); -#endif return; } } @@ -575,9 +584,6 @@ opcode = __glXSetupForCommand(dpy); if (!opcode) { -#if defined(GLX_DIRECT_RENDERING) && defined(XTHREADS) - xmutex_unlock(&__glXSwapBuffersMutex); -#endif return; } @@ -601,16 +607,13 @@ UnlockDisplay(dpy); SyncHandle(); XFlush(dpy); -#if defined(GLX_DIRECT_RENDERING) && defined(XTHREADS) - xmutex_unlock(&__glXSwapBuffersMutex); -#endif } /* ** Return configuration information for the given display, screen and ** visual combination. */ -int glXGetConfig(Display *dpy, XVisualInfo *vis, int attribute, +int GLX_PREFIX(glXGetConfig)(Display *dpy, XVisualInfo *vis, int attribute, int *value_return) { __GLXvisualConfig *pConfig; @@ -822,7 +825,7 @@ /* Fetch a configuration value */ #define __GLX_GCONF(attrib) \ - if (glXGetConfig(dpy, thisVis, attrib, &val)) { \ + if (GLX_PREFIX(glXGetConfig)(dpy, thisVis, attrib, &val)) { \ XFree((char *)visualList); \ return NULL; \ } @@ -832,7 +835,7 @@ ** Return the visual that best matches the template. Return None if no ** visual matches the template. */ -XVisualInfo *glXChooseVisual(Display *dpy, int screen, int *attribList) +XVisualInfo *GLX_PREFIX(glXChooseVisual)(Display *dpy, int screen, int *attribList) { XVisualInfo visualTemplate; XVisualInfo *visualList; @@ -1015,6 +1018,7 @@ else score += AuxScore(auxBuffers, val); if (transparentPixel) { + __GLX_GCONF(GLX_TRANSPARENT_TYPE_EXT); if (transparentPixelValue != val) continue; if (transparentPixelValue == GLX_TRANSPARENT_TYPE_EXT) { @@ -1213,7 +1217,7 @@ */ if ( (clen = strlen( cext_string)) > (slen = strlen( sext_string)) ) { combo_string = (char *) Xmalloc( slen + 2 ); - s1 = (char *) malloc( slen + 2 ); strcpy( s1, sext_string ); + s1 = (char *) Xmalloc( slen + 2 ); strcpy( s1, sext_string ); s2 = cext_string; } else { combo_string = (char *) Xmalloc( clen + 2 ); @@ -1253,7 +1257,7 @@ return combo_string; } -const char *glXQueryExtensionsString( Display *dpy, int screen ) +const char *GLX_PREFIX(glXQueryExtensionsString)( Display *dpy, int screen ) { __GLXvisualConfig *pConfig; __GLXscreenConfigs *psc; @@ -1291,7 +1295,7 @@ return psc->effectiveGLXexts; } -const char *glXGetClientString( Display *dpy, int name ) +const char *GLX_PREFIX(glXGetClientString)( Display *dpy, int name ) { switch(name) { case GLX_VENDOR: @@ -1305,7 +1309,7 @@ } } -const char *glXQueryServerString( Display *dpy, int screen, int name ) +const char *GLX_PREFIX(glXQueryServerString)( Display *dpy, int screen, int name ) { __GLXvisualConfig *pConfig; __GLXscreenConfigs *psc; @@ -1395,6 +1399,14 @@ } +Display *glXGetCurrentDisplayEXT(void) +{ + GLXContext gc = __glXGetCurrentContext(); + if (NULL == gc) return NULL; + return gc->currentDpy; +} + + static int __glXQueryContextInfo(Display *dpy, GLXContext ctx) { xGLXVendorPrivateReq *vpreq; @@ -1402,6 +1414,7 @@ xGLXQueryContextInfoEXTReply reply; CARD8 opcode; GLuint numValues; + int retval; if (ctx == NULL) { return GLX_BAD_CONTEXT; @@ -1421,12 +1434,13 @@ req->vendorCode = X_GLXvop_QueryContextInfoEXT; req->context = (unsigned int)(ctx->xid); _XReply(dpy, (xReply*) &reply, 0, False); - UnlockDisplay(dpy); numValues = reply.n; - if (numValues == 0) return Success; - if (numValues > __GLX_MAX_CONTEXT_PROPS) return 0; - + if (numValues == 0) + retval = Success; + else if (numValues > __GLX_MAX_CONTEXT_PROPS) + retval = 0; + else { int *propList, *pProp; int nPropListBytes; @@ -1435,33 +1449,36 @@ nPropListBytes = numValues << 3; propList = (int *) Xmalloc(nPropListBytes); if (NULL == propList) { - return 0; - } - _XRead(dpy, (char *)propList, nPropListBytes); - pProp = propList; - for (i=0; i < numValues; i++) { - switch (*pProp++) { - case GLX_SHARE_CONTEXT_EXT: - ctx->share_xid = *pProp++; - break; - case GLX_VISUAL_ID_EXT: - ctx->vid = *pProp++; - break; - case GLX_SCREEN_EXT: - ctx->screen = *pProp++; - break; - default: - pProp++; - continue; + retval = 0; + } else { + _XRead(dpy, (char *)propList, nPropListBytes); + pProp = propList; + for (i=0; i < numValues; i++) { + switch (*pProp++) { + case GLX_SHARE_CONTEXT_EXT: + ctx->share_xid = *pProp++; + break; + case GLX_VISUAL_ID_EXT: + ctx->vid = *pProp++; + break; + case GLX_SCREEN_EXT: + ctx->screen = *pProp++; + break; + default: + pProp++; + continue; + } } + Xfree((char *)propList); + retval = Success; } - Xfree((char *)propList); } + UnlockDisplay(dpy); SyncHandle(); - return Success; + return retval; } -int glXQueryContextInfoEXT(Display *dpy, GLXContext ctx, +int GLX_PREFIX(glXQueryContextInfoEXT)(Display *dpy, GLXContext ctx, int attribute, int *value) { int retVal; @@ -1492,7 +1509,7 @@ return ctx->xid; } -GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID) +GLXContext GLX_PREFIX(glXImportContextEXT)(Display *dpy, GLXContextID contextID) { GLXContext ctx; @@ -1512,7 +1529,7 @@ return ctx; } -void glXFreeContextEXT(Display *dpy, GLXContext ctx) +void GLX_PREFIX(glXFreeContextEXT)(Display *dpy, GLXContext ctx) { DestroyContext(dpy, ctx); } @@ -1523,7 +1540,7 @@ * GLX 1.3 functions - these are just stubs for now! */ -GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen, const int *attribList, int *nitems) +GLXFBConfig *GLX_PREFIX(glXChooseFBConfig)(Display *dpy, int screen, const int *attribList, int *nitems) { (void) dpy; (void) screen; @@ -1533,7 +1550,7 @@ } -GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct) +GLXContext GLX_PREFIX(glXCreateNewContext)(Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct) { (void) dpy; (void) config; @@ -1544,7 +1561,7 @@ } -GLXPbuffer glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attribList) +GLXPbuffer GLX_PREFIX(glXCreatePbuffer)(Display *dpy, GLXFBConfig config, const int *attribList) { (void) dpy; (void) config; @@ -1553,7 +1570,7 @@ } -GLXPixmap glXCreatePixmap(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attribList) +GLXPixmap GLX_PREFIX(glXCreatePixmap)(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attribList) { (void) dpy; (void) config; @@ -1563,7 +1580,7 @@ } -GLXWindow glXCreateWindow(Display *dpy, GLXFBConfig config, Window win, const int *attribList) +GLXWindow GLX_PREFIX(glXCreateWindow)(Display *dpy, GLXFBConfig config, Window win, const int *attribList) { (void) dpy; (void) config; @@ -1573,21 +1590,21 @@ } -void glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf) +void GLX_PREFIX(glXDestroyPbuffer)(Display *dpy, GLXPbuffer pbuf) { (void) dpy; (void) pbuf; } -void glXDestroyPixmap(Display *dpy, GLXPixmap pixmap) +void GLX_PREFIX(glXDestroyPixmap)(Display *dpy, GLXPixmap pixmap) { (void) dpy; (void) pixmap; } -void glXDestroyWindow(Display *dpy, GLXWindow window) +void GLX_PREFIX(glXDestroyWindow)(Display *dpy, GLXWindow window) { (void) dpy; (void) window; @@ -1596,11 +1613,12 @@ GLXDrawable glXGetCurrentReadDrawable(void) { - return 0; + GLXContext gc = __glXGetCurrentContext(); + return gc->currentDrawable; } -GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements) +GLXFBConfig *GLX_PREFIX(glXGetFBConfigs)(Display *dpy, int screen, int *nelements) { (void) dpy; (void) screen; @@ -1609,7 +1627,7 @@ } -int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value) +int GLX_PREFIX(glXGetFBConfigAttrib)(Display *dpy, GLXFBConfig config, int attribute, int *value) { (void) dpy; (void) config; @@ -1619,7 +1637,7 @@ } -void glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask) +void GLX_PREFIX(glXGetSelectedEvent)(Display *dpy, GLXDrawable drawable, unsigned long *mask) { (void) dpy; (void) drawable; @@ -1627,7 +1645,7 @@ } -XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config) +XVisualInfo *GLX_PREFIX(glXGetVisualFromFBConfig)(Display *dpy, GLXFBConfig config) { (void) dpy; (void) config; @@ -1635,7 +1653,7 @@ } -Bool glXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) +Bool GLX_PREFIX(glXMakeContextCurrent)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) { (void) dpy; (void) draw; @@ -1645,7 +1663,7 @@ } -int glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value) +int GLX_PREFIX(glXQueryContext)(Display *dpy, GLXContext ctx, int attribute, int *value) { (void) dpy; (void) ctx; @@ -1655,7 +1673,7 @@ } -void glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value) +void GLX_PREFIX(glXQueryDrawable)(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value) { (void) dpy; (void) draw; @@ -1664,7 +1682,7 @@ } -void glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask) +void GLX_PREFIX(glXSelectEvent)(Display *dpy, GLXDrawable drawable, unsigned long mask) { (void) dpy; (void) drawable; @@ -1672,21 +1690,316 @@ } +/* +** GLX_SGIS_make_current_read +*/ +Bool GLX_PREFIX(glXMakeCurrentReadSGI)(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) +{ + (void) dpy; + (void) draw; + (void) read; + (void) ctx; + return False; +} + +GLXDrawable glXGetCurrentReadDrawableSGI(void) +{ + return 0; +} + + +/* +** GLX_SGI_swap_control +*/ +int GLX_PREFIX(glXSwapIntervalSGI)(int interval) +{ + (void) interval; + return 0; +} + + +/* +** GLX_SGI_video_sync +*/ +int GLX_PREFIX(glXGetVideoSyncSGI)(unsigned int *count) +{ + (void) count; + return 0; +} + +int GLX_PREFIX(glXWaitVideoSyncSGI)(int divisor, int remainder, unsigned int *count) +{ + (void) divisor; + (void) remainder; + (void) count; + return 0; +} + + +/* +** GLX_SGIS_video_source +*/ +#if defined(_VL_H) + +GLXVideoSourceSGIX GLX_PREFIX(glXCreateGLXVideoSourceSGIX)(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode) +{ + (void) dpy; + (void) screen; + (void) server; + (void) path; + (void) nodeClass; + (void) drainNode; + return 0; +} + +void GLX_PREFIX(glXDestroyGLXVideoSourceSGIX)(Display *dpy, GLXVideoSourceSGIX src) +{ + (void) dpy; + (void) src; +} + +#endif + + +/* +** GLX_SGIX_fbconfig +*/ +int GLX_PREFIX(glXGetFBConfigAttribSGIX)(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value) +{ + (void) dpy; + (void) config; + (void) attribute; + (void) value; + return 0; +} + +GLXFBConfigSGIX * GLX_PREFIX(glXChooseFBConfigSGIX)(Display *dpy, int screen, int *attrib_list, int *nelements) +{ + (void) dpy; + (void) screen; + (void) attrib_list; + (void) nelements; + return 0; +} + +GLXPixmap GLX_PREFIX(glXCreateGLXPixmapWithConfigSGIX)(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap) +{ + (void) dpy; + (void) config; + (void) pixmap; + return 0; +} + +GLXContext GLX_PREFIX(glXCreateContextWithConfigSGIX)(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct) +{ + (void) dpy; + (void) config; + (void) render_type; + (void) share_list; + (void) direct; + return 0; +} + +XVisualInfo * GLX_PREFIX(glXGetVisualFromFBConfigSGIX)(Display *dpy, GLXFBConfigSGIX config) +{ + (void) dpy; + (void) config; + return NULL; +} + +GLXFBConfigSGIX GLX_PREFIX(glXGetFBConfigFromVisualSGIX)(Display *dpy, XVisualInfo *vis) +{ + (void) dpy; + (void) vis; + return 0; +} + + +/* +** GLX_SGIX_pbuffer +*/ +GLXPbufferSGIX GLX_PREFIX(glXCreateGLXPbufferSGIX)(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list) +{ + (void) dpy; + (void) config; + (void) width; + (void) height; + (void) attrib_list; + return 0; +} + +void GLX_PREFIX(glXDestroyGLXPbufferSGIX)(Display *dpy, GLXPbufferSGIX pbuf) +{ + (void) dpy; + (void) pbuf; +} + +int GLX_PREFIX(glXQueryGLXPbufferSGIX)(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value) +{ + (void) dpy; + (void) pbuf; + (void) attribute; + (void) value; + return 0; +} + +void GLX_PREFIX(glXSelectEventSGIX)(Display *dpy, GLXDrawable drawable, unsigned long mask) +{ + (void) dpy; + (void) drawable; + (void) mask; +} + +void GLX_PREFIX(glXGetSelectedEventSGIX)(Display *dpy, GLXDrawable drawable, unsigned long *mask) +{ + (void) dpy; + (void) drawable; + (void) mask; +} + + +/* +** GLX_SGI_cushion +*/ +void GLX_PREFIX(glXCushionSGI)(Display *dpy, Window win, float cushion) +{ + (void) dpy; + (void) win; + (void) cushion; +} + + +/* +** GLX_SGIX_video_resize +*/ +int GLX_PREFIX(glXBindChannelToWindowSGIX)(Display *dpy, int screen, int channel , Window window) +{ + (void) dpy; + (void) screen; + (void) channel; + (void) window; + return 0; +} + +int GLX_PREFIX(glXChannelRectSGIX)(Display *dpy, int screen, int channel, int x, int y, int w, int h) +{ + (void) dpy; + (void) screen; + (void) channel; + (void) x; + (void) y; + (void) w; + (void) h; + return 0; +} + +int GLX_PREFIX(glXQueryChannelRectSGIX)(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h) +{ + (void) dpy; + (void) screen; + (void) channel; + (void) x; + (void) y; + (void) w; + (void) h; + return 0; +} + +int GLX_PREFIX(glXQueryChannelDeltasSGIX)(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh) +{ + (void) dpy; + (void) screen; + (void) channel; + (void) dx; + (void) dy; + (void) dw; + (void) dh; + return 0; +} + +int GLX_PREFIX(glXChannelRectSyncSGIX)(Display *dpy, int screen, int channel, GLenum synctype) +{ + (void) dpy; + (void) screen; + (void) channel; + (void) synctype; + return 0; +} + +#if defined(_DM_BUFFER_H_) + +Bool GLX_PREFIX(glXAssociateDMPbufferSGIX)(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer) +{ + (void) dpy; + (void) pbuffer; + (void) params; + (void) dmbuffer; + return False; +} + +#endif + + +/* +** GLX_SGIX_swap_group +*/ +void GLX_PREFIX(glXJoinSwapGroupSGIX)(Display *dpy, GLXDrawable drawable, GLXDrawable member) +{ + (void) dpy; + (void) drawable; + (void) member; +} + + +/* +** GLX_SGIX_swap_barrier +*/ +void GLX_PREFIX(glXBindSwapBarrierSGIX)(Display *dpy, GLXDrawable drawable, int barrier) +{ + (void) dpy; + (void) drawable; + (void) barrier; +} + +Bool GLX_PREFIX(glXQueryMaxSwapBarriersSGIX)(Display *dpy, int screen, int *max) +{ + (void) dpy; + (void) screen; + (void) max; + return False; +} + + /* +** GLX_SUN_get_transparent_index +*/ +Status GLX_PREFIX(glXGetTransparentIndexSUN)(Display *dpy, Window overlay, Window underlay, long *pTransparent) +{ + (void) dpy; + (void) overlay; + (void) underlay; + (void) pTransparent; + return 0; +} + + + +/* ** Mesa extension stubs. These will help reduce portability problems. */ -void glXReleaseBuffersMESA( Display *dpy, GLXDrawable d ) +Bool GLX_PREFIX(glXReleaseBuffersMESA)( Display *dpy, GLXDrawable d ) { (void) dpy; (void) d; - /* no-op stub */ + return False; } -GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, - Pixmap pixmap, Colormap cmap ) +GLXPixmap GLX_PREFIX(glXCreateGLXPixmapMESA)( Display *dpy, + XVisualInfo *visual, + Pixmap pixmap, Colormap cmap ) { (void) dpy; (void) visual; @@ -1696,8 +2009,8 @@ } -void glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, - int x, int y, int width, int height ) +void GLX_PREFIX(glXCopySubBufferMESA)( Display *dpy, GLXDrawable drawable, + int x, int y, int width, int height ) { (void) dpy; (void) drawable; @@ -1708,13 +2021,28 @@ } -GLboolean glXSet3DfxModeMESA( GLint mode ) +Bool GLX_PREFIX(glXSet3DfxModeMESA)( int mode ) { (void) mode; return GL_FALSE; } + +/* strdup() is actually not a standard ANSI C or POSIX routine. + * Irix will not define it if ANSI mode is in effect. + */ +char * +__glXstrdup(const char *str) +{ + char *copy; + copy = (char *) Xmalloc(strlen(str) + 1); + if (!copy) + return NULL; + strcpy(copy, str); + return copy; +} + /* ** glXGetProcAddress support */ @@ -1722,73 +2050,233 @@ struct name_address_pair { const char *Name; GLvoid *Address; + struct name_address_pair *Next; }; static struct name_address_pair GLX_functions[] = { - { "glXChooseVisual", (GLvoid *) glXChooseVisual }, - { "glXCopyContext", (GLvoid *) glXCopyContext }, - { "glXCreateContext", (GLvoid *) glXCreateContext }, - { "glXCreateGLXPixmap", (GLvoid *) glXCreateGLXPixmap }, - { "glXDestroyContext", (GLvoid *) glXDestroyContext }, - { "glXDestroyGLXPixmap", (GLvoid *) glXDestroyGLXPixmap }, - { "glXGetConfig", (GLvoid *) glXGetConfig }, - { "glXGetCurrentContext", (GLvoid *) glXGetCurrentContext }, - { "glXGetCurrentDrawable", (GLvoid *) glXGetCurrentDrawable }, - { "glXIsDirect", (GLvoid *) glXIsDirect }, - { "glXMakeCurrent", (GLvoid *) glXMakeCurrent }, - { "glXQueryExtension", (GLvoid *) glXQueryExtension }, - { "glXQueryVersion", (GLvoid *) glXQueryVersion }, - { "glXSwapBuffers", (GLvoid *) glXSwapBuffers }, - { "glXUseXFont", (GLvoid *) glXUseXFont }, - { "glXWaitGL", (GLvoid *) glXWaitGL }, - { "glXWaitX", (GLvoid *) glXWaitX }, - - { "glXGetClientString", (GLvoid *) glXGetClientString }, - { "glXQueryExtensionsString", (GLvoid *) glXQueryExtensionsString }, - { "glXQueryServerString", (GLvoid *) glXQueryServerString }, - - { "glXGetCurrentDisplay", (GLvoid *) glXGetCurrentDisplay }, - - { "glXChooseFBConfig", (GLvoid *) glXChooseFBConfig }, - { "glXCreateNewContext", (GLvoid *) glXCreateNewContext }, - { "glXCreatePbuffer", (GLvoid *) glXCreatePbuffer }, - { "glXCreatePixmap", (GLvoid *) glXCreatePixmap }, - { "glXCreateWindow", (GLvoid *) glXCreateWindow }, - { "glXDestroyPbuffer", (GLvoid *) glXDestroyPbuffer }, - { "glXDestroyPixmap", (GLvoid *) glXDestroyPixmap }, - { "glXDestroyWindow", (GLvoid *) glXDestroyWindow }, - { "glXGetCurrentReadDrawable", (GLvoid *) glXGetCurrentReadDrawable }, - { "glXGetFBConfigAttrib", (GLvoid *) glXGetFBConfigAttrib }, - { "glXGetFBConfigs", (GLvoid *) glXGetFBConfigs }, - { "glXGetSelectedEvent", (GLvoid *) glXGetSelectedEvent }, - { "glXGetVisualFromFBConfig", (GLvoid *) glXGetVisualFromFBConfig }, - { "glXMakeContextCurrent", (GLvoid *) glXMakeContextCurrent }, - { "glXQueryContext", (GLvoid *) glXQueryContext }, - { "glXQueryDrawable", (GLvoid *) glXQueryDrawable }, - { "glXSelectEvent", (GLvoid *) glXSelectEvent }, - - /* extension functions */ - { "glXGetContextIDEXT", (GLvoid *) glXGetContextIDEXT }, - { "glXGetCurrentDrawableEXT", (GLvoid *) glXGetCurrentDrawableEXT }, - { "glXImportContextEXT", (GLvoid *) glXImportContextEXT }, - { "glXFreeContextEXT", (GLvoid *) glXFreeContextEXT }, - { "glXQueryContextInfoEXT", (GLvoid *) glXQueryContextInfoEXT }, - { "glXGetProcAddressARB", (GLvoid *) glXGetProcAddressARB }, - - /* Mesa extensions */ - { "glXReleaseBuffersMESA", (GLvoid *) glXReleaseBuffersMESA }, - { "glXCreateGLXPixmapMESA", (GLvoid *) glXCreateGLXPixmapMESA }, - { "glXCopySubBufferMESA", (GLvoid *) glXCopySubBufferMESA }, - { "glXSet3DfxModeMESA", (GLvoid *) glXSet3DfxModeMESA }, + /*** GLX_VERSION_1_0 ***/ + { "glXChooseVisual", (GLvoid *) glXChooseVisual, NULL }, + { "glXCopyContext", (GLvoid *) glXCopyContext, NULL }, + { "glXCreateContext", (GLvoid *) glXCreateContext, NULL }, + { "glXCreateGLXPixmap", (GLvoid *) glXCreateGLXPixmap, NULL }, + { "glXDestroyContext", (GLvoid *) glXDestroyContext, NULL }, + { "glXDestroyGLXPixmap", (GLvoid *) glXDestroyGLXPixmap, NULL }, + { "glXGetConfig", (GLvoid *) glXGetConfig, NULL }, + { "glXGetCurrentContext", (GLvoid *) glXGetCurrentContext, NULL }, + { "glXGetCurrentDrawable", (GLvoid *) glXGetCurrentDrawable, NULL }, + { "glXIsDirect", (GLvoid *) glXIsDirect, NULL }, + { "glXMakeCurrent", (GLvoid *) glXMakeCurrent, NULL }, + { "glXQueryExtension", (GLvoid *) glXQueryExtension, NULL }, + { "glXQueryVersion", (GLvoid *) glXQueryVersion, NULL }, + { "glXSwapBuffers", (GLvoid *) glXSwapBuffers, NULL }, + { "glXUseXFont", (GLvoid *) glXUseXFont, NULL }, + { "glXWaitGL", (GLvoid *) glXWaitGL, NULL }, + { "glXWaitX", (GLvoid *) glXWaitX, NULL }, + + /*** GLX_VERSION_1_1 ***/ + { "glXGetClientString", (GLvoid *) glXGetClientString, NULL }, + { "glXQueryExtensionsString", (GLvoid *) glXQueryExtensionsString, NULL }, + { "glXQueryServerString", (GLvoid *) glXQueryServerString, NULL }, + + /*** GLX_VERSION_1_2 ***/ + { "glXGetCurrentDisplay", (GLvoid *) glXGetCurrentDisplay, NULL }, + + /*** GLX_VERSION_1_3 ***/ + { "glXChooseFBConfig", (GLvoid *) glXChooseFBConfig, NULL }, + { "glXCreateNewContext", (GLvoid *) glXCreateNewContext, NULL }, + { "glXCreatePbuffer", (GLvoid *) glXCreatePbuffer, NULL }, + { "glXCreatePixmap", (GLvoid *) glXCreatePixmap, NULL }, + { "glXCreateWindow", (GLvoid *) glXCreateWindow, NULL }, + { "glXDestroyPbuffer", (GLvoid *) glXDestroyPbuffer, NULL }, + { "glXDestroyPixmap", (GLvoid *) glXDestroyPixmap, NULL }, + { "glXDestroyWindow", (GLvoid *) glXDestroyWindow, NULL }, + { "glXGetCurrentReadDrawable", (GLvoid *) glXGetCurrentReadDrawable, NULL }, + { "glXGetFBConfigAttrib", (GLvoid *) glXGetFBConfigAttrib, NULL }, + { "glXGetFBConfigs", (GLvoid *) glXGetFBConfigs, NULL }, + { "glXGetSelectedEvent", (GLvoid *) glXGetSelectedEvent, NULL }, + { "glXGetVisualFromFBConfig", (GLvoid *) glXGetVisualFromFBConfig, NULL }, + { "glXMakeContextCurrent", (GLvoid *) glXMakeContextCurrent, NULL }, + { "glXQueryContext", (GLvoid *) glXQueryContext, NULL }, + { "glXQueryDrawable", (GLvoid *) glXQueryDrawable, NULL }, + { "glXSelectEvent", (GLvoid *) glXSelectEvent, NULL }, + + /*** GLX_SGI_swap_control ***/ + { "glXSwapIntervalSGI", (GLvoid *) glXSwapIntervalSGI, NULL }, + + /*** GLX_SGI_video_sync ***/ + { "glXGetVideoSyncSGI", (GLvoid *) glXGetVideoSyncSGI, NULL }, + { "glXWaitVideoSyncSGI", (GLvoid *) glXWaitVideoSyncSGI, NULL }, + + /*** GLX_SGI_make_current_read ***/ + { "glXMakeCurrentReadSGI", (GLvoid *) glXMakeCurrentReadSGI, NULL }, + { "glXGetCurrentReadDrawableSGI", (GLvoid *) glXGetCurrentReadDrawableSGI, NULL }, + + /*** GLX_SGIX_video_source ***/ +#if defined(_VL_H) + { "glXCreateGLXVideoSourceSGIX", (GLvoid *) glXCreateGLXVideoSourceSGIX, NULL }, + { "glXDestroyGLXVideoSourceSGIX", (GLvoid *) glXDestroyGLXVideoSourceSGIX, NULL }, +#endif + + /*** GLX_EXT_import_context ***/ + { "glXFreeContextEXT", (GLvoid *) glXFreeContextEXT, NULL }, + { "glXGetContextIDEXT", (GLvoid *) glXGetContextIDEXT, NULL }, + { "glXGetCurrentDisplayEXT", (GLvoid *) glXGetCurrentDisplayEXT, NULL }, + { "glXImportContextEXT", (GLvoid *) glXImportContextEXT, NULL }, + { "glXQueryContextInfoEXT", (GLvoid *) glXQueryContextInfoEXT, NULL }, + + /*** GLX_SGIX_fbconfig ***/ + { "glXGetFBConfigAttribSGIX", (GLvoid *) glXGetFBConfigAttribSGIX, NULL }, + { "glXChooseFBConfigSGIX", (GLvoid *) glXChooseFBConfigSGIX, NULL }, + { "glXCreateGLXPixmapWithConfigSGIX", (GLvoid *) glXCreateGLXPixmapWithConfigSGIX, NULL }, + { "glXCreateContextWithConfigSGIX", (GLvoid *) glXCreateContextWithConfigSGIX, NULL }, + { "glXGetVisualFromFBConfigSGIX", (GLvoid *) glXGetVisualFromFBConfigSGIX, NULL }, + { "glXGetFBConfigFromVisualSGIX", (GLvoid *) glXGetFBConfigFromVisualSGIX, NULL }, + + /*** GLX_SGIX_pbuffer ***/ + { "glXCreateGLXPbufferSGIX", (GLvoid *) glXCreateGLXPbufferSGIX, NULL }, + { "glXDestroyGLXPbufferSGIX", (GLvoid *) glXDestroyGLXPbufferSGIX, NULL }, + { "glXQueryGLXPbufferSGIX", (GLvoid *) glXQueryGLXPbufferSGIX, NULL }, + { "glXSelectEventSGIX", (GLvoid *) glXSelectEventSGIX, NULL }, + { "glXGetSelectedEventSGIX", (GLvoid *) glXGetSelectedEventSGIX, NULL }, + + /*** GLX_SGI_cushion ***/ + { "glXCushionSGI", (GLvoid *) glXCushionSGI, NULL }, + + /*** GLX_SGIX_video_resize ***/ + { "glXBindChannelToWindowSGIX", (GLvoid *) glXBindChannelToWindowSGIX, NULL }, + { "glXChannelRectSGIX", (GLvoid *) glXChannelRectSGIX, NULL }, + { "glXQueryChannelRectSGIX", (GLvoid *) glXQueryChannelRectSGIX, NULL }, + { "glXQueryChannelDeltasSGIX", (GLvoid *) glXQueryChannelDeltasSGIX, NULL }, + { "glXChannelRectSyncSGIX", (GLvoid *) glXChannelRectSyncSGIX, NULL }, + + /*** GLX_SGIX_dmbuffer **/ +#if defined(_DM_BUFFER_H_) + { "glXAssociateDMPbufferSGIX", (GLvoid *) glXAssociateDMPbufferSGIX, NULL }, +#endif + + /*** GLX_SGIX_swap_group ***/ + { "glXJoinSwapGroupSGIX", (GLvoid *) glXJoinSwapGroupSGIX, NULL }, + + /*** GLX_SGIX_swap_barrier ***/ + { "glXBindSwapBarrierSGIX", (GLvoid *) glXBindSwapBarrierSGIX, NULL }, + { "glXQueryMaxSwapBarriersSGIX", (GLvoid *) glXQueryMaxSwapBarriersSGIX, NULL }, + + /*** GLX_SUN_get_transparent_index ***/ + { "glXGetTransparentIndexSUN", (GLvoid *) glXGetTransparentIndexSUN, NULL }, + + /*** GLX_MESA_copy_sub_buffer ***/ + { "glXCopySubBufferMESA", (GLvoid *) glXCopySubBufferMESA, NULL }, + + /*** GLX_MESA_pixmap_colormap ***/ + { "glXCreateGLXPixmapMESA", (GLvoid *) glXCreateGLXPixmapMESA, NULL }, + + /*** GLX_MESA_release_buffers ***/ + { "glXReleaseBuffersMESA", (GLvoid *) glXReleaseBuffersMESA, NULL }, + + /*** GLX_MESA_set_3dfx_mode ***/ + { "glXSet3DfxModeMESA", (GLvoid *) glXSet3DfxModeMESA, NULL }, + + /*** GLX_ARB_get_proc_address ***/ + { "glXGetProcAddressARB", (GLvoid *) glXGetProcAddressARB, NULL }, - { NULL, NULL } /* end of list */ + /*** GLX 1.4 ***/ + { "glXGetProcAddress", (GLvoid *) glXGetProcAddress, NULL }, + + /*** GLX_???_allocate_memory ***/ + { "glXAllocateMemoryNV", (GLvoid *) glXAllocateMemoryNV, NULL }, + { "glXFreeMemoryNV", (GLvoid *) glXFreeMemoryNV, NULL }, + + /*** GLX_MESA_agp_pointer ***/ + { "glXGetAGPOffsetMESA", (GLvoid *) glXGetAGPOffsetMESA, NULL }, + + { NULL, NULL, NULL } /* end of list */ }; +static struct name_address_pair *Dynamic_GLX_functions = NULL; + + +/* + * Drivers can call this function to append the name of a new GLX + * extension string to __glXGLXClientExtensions. Then, when the user + * calls glXGetClientString() they'll see it listed. + * This is a companion to __glXRegisterGLXFunction(). + */ +void +__glXRegisterGLXExtensionString(const char *extName) +{ + char *newList; + if (!extName) + return; + newList = Xmalloc(strlen(__glXGLXClientExtensions) + + strlen(extName) + 2); /* 2 for ' ' and '\0' */ + if (!newList) + return; + strcpy(newList, __glXGLXClientExtensions); + strcat(newList, " "); + strcat(newList, extName); + if (__glXGLXClientExtensions != __glXGLXDefaultClientExtensions) + Xfree((void *) __glXGLXClientExtensions); + __glXGLXClientExtensions = newList; +} + + +/* + * DRI drivers should call this function if they want to extend + * the GLX API. After registering a new GLX function, the user + * can query and use it by calling glXGetProcAddress(). + * Input: funcName - name of new GLX function + * funcAddr - pointer to the function. + * Return: address of previously registered function with this + * name, or NULL. + */ +void * +__glXRegisterGLXFunction(const char *funcName, void *funcAddr) +{ + struct name_address_pair *ext; + + /* look if the function is already registered */ + for (ext = Dynamic_GLX_functions; ext; ext = ext->Next) { + if (strcmp(ext->Name, funcName) == 0) { + /* It's up the caller to use this return value if he wants + * to chain-call or wrap the previously registered function. + */ + void *prevAddr = ext->Address; + ext->Address = funcAddr; + return prevAddr; + } + } + + /* add new function */ + ext = Xmalloc(sizeof(struct name_address_pair)); + if (!ext) + return NULL; + ext->Name = __glXstrdup(funcName); + if (!ext->Name) { + Xfree(ext); + return NULL; + } + ext->Address = funcAddr; + ext->Next = Dynamic_GLX_functions; + Dynamic_GLX_functions = ext; + return NULL; +} + + static const GLvoid * get_glx_proc_address(const char *funcName) { + const struct name_address_pair *ext; GLuint i; + + /* try dynamic functions */ + for (ext = Dynamic_GLX_functions; ext; ext = ext->Next) { + if (strcmp(ext->Name, funcName) == 0) { + return ext->Address; + } + } + + /* try static functions */ for (i = 0; GLX_functions[i].Name; i++) { if (strcmp(GLX_functions[i].Name, funcName) == 0) return GLX_functions[i].Address; @@ -1797,9 +2285,10 @@ } -void (*glXGetProcAddressARB(const GLubyte *procName))() +#ifndef GLX_BUILT_IN_XMESA +void (*glXGetProcAddressARB(const GLubyte *procName))( void ) { - typedef void (*gl_function)(); + typedef void (*gl_function)( void ); gl_function f; #if defined(GLX_DIRECT_RENDERING) @@ -1813,4 +2302,95 @@ f = (gl_function) _glapi_get_proc_address((const char *) procName); return f; +} + +/* GLX 1.4 */ +void (*glXGetProcAddress(const GLubyte *procName))( void ) +{ + return glXGetProcAddressARB(procName); +} +#endif + + +/* + * AGP memory allocation + */ +void *GLX_PREFIX(glXAllocateMemoryNV)(GLsizei size, + GLfloat readFrequency, + GLfloat writeFrequency, + GLfloat priority) +{ + /* This is special - search the list of dynamically-added functions + * and call the allocator if present. + * More typically, the user will have gotten a pointer to + * glXAllocateMemoryNV() via glXGetProcAddress() so we won't be + * doing this. + */ + typedef void * (*allocFunc)(GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); + const struct name_address_pair *ext; + static allocFunc f = (allocFunc) NULL; + + if (!f) { + for (ext = Dynamic_GLX_functions; ext; ext = ext->Next) { + if (strcmp(ext->Name, "glXAllocateMemoryNV") == 0) { + f = (allocFunc) ext->Address; + break; + } + } + } + if (f) + return (*f)(size, readFrequency, writeFrequency, priority); + return NULL; +} + + +void GLX_PREFIX(glXFreeMemoryNV)(GLvoid *pointer) +{ + /* This is special - search the list of dynamically-added functions + * and call the free func if present. + * More typically, the user will have gotten a pointer to + * glXFreeMemoryNV() via glXGetProcAddress() so we won't be + * doing this. + */ + typedef void * (*freeFunc)(GLvoid *pointer); + const struct name_address_pair *ext; + static freeFunc f = (freeFunc) NULL; + + if (!f) { + for (ext = Dynamic_GLX_functions; ext; ext = ext->Next) { + if (strcmp(ext->Name, "glXFreeMemoryNV") == 0) { + f = (freeFunc) ext->Address; + break; + } + } + } + if (f) + (*f)(pointer); +} + + +GLuint GLX_PREFIX(glXGetAGPOffsetMESA)( const GLvoid *pointer ) +{ + /* This is special - search the list of dynamically-added functions + * and call the free func if present. + * More typically, the user will have gotten a pointer to + * glXGetAGPOffsetMESA() via glXGetProcAddress() so we won't be + * doing this. + */ + typedef GLuint (*getAGPOffsetFunc)(const GLvoid *pointer); + const struct name_address_pair *ext; + static getAGPOffsetFunc f = (getAGPOffsetFunc) NULL; + + if (!f) { + for (ext = Dynamic_GLX_functions; ext; ext = ext->Next) { + if (strcmp(ext->Name, "glXGetAGPOffsetMESA") == 0) { + f = (getAGPOffsetFunc) ext->Address; + break; + } + } + } + if (f) + return (*f)(pointer); + else + return ~0; } Index: xc/lib/GL/glx/glxext.c diff -u xc/lib/GL/glx/glxext.c:1.13 xc/lib/GL/glx/glxext.c:1.16 --- xc/lib/GL/glx/glxext.c:1.13 Tue Apr 10 12:07:49 2001 +++ xc/lib/GL/glx/glxext.c Mon Jan 20 16:37:19 2003 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/glxext.c,v 1.13 2001/04/10 16:07:49 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/glxext.c,v 1.16 2003/01/20 21:37:19 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are @@ -125,7 +125,6 @@ /* Used by the __glXLock() and __glXUnlock() macros */ xmutex_rec __glXmutex; -xmutex_rec __glXSwapBuffersMutex; #else @@ -345,12 +344,13 @@ if (!_XReply(dpy, (xReply*) &reply, 0, False)) { /* Something is busted. Punt. */ UnlockDisplay(dpy); + SyncHandle(); FreeScreenConfigs(priv); return GL_FALSE; } - UnlockDisplay(dpy); if (!reply.numVisuals) { /* This screen does not support GL rendering */ + UnlockDisplay(dpy); continue; } @@ -359,6 +359,8 @@ if ((nprops < __GLX_MIN_CONFIG_PROPS) || (nprops > __GLX_MAX_CONFIG_PROPS)) { /* Huh? Not in protocol defined limits. Punt */ + UnlockDisplay(dpy); + SyncHandle(); FreeScreenConfigs(priv); return GL_FALSE; } @@ -368,6 +370,8 @@ Xmalloc(reply.numVisuals * sizeof(__GLXvisualConfig)); psc->numConfigs = reply.numVisuals; if (!psc->configs) { + UnlockDisplay(dpy); + SyncHandle(); FreeScreenConfigs(priv); return GL_FALSE; } @@ -445,6 +449,7 @@ if (props != buf) { Xfree((char *)props); } + UnlockDisplay(dpy); #ifdef GLX_DIRECT_RENDERING /* Initialize the direct rendering per screen data and functions */ @@ -479,7 +484,6 @@ if (firstCall) { /* initialize the GLX mutexes */ xmutex_init(&__glXmutex); - xmutex_init(&__glXSwapBuffersMutex); firstCall = 0; } } @@ -726,10 +730,6 @@ return gc->currentDrawable; } -GLXDrawable glXGetCurrentDrawableEXT(void) -{ - return glXGetCurrentDrawable(); -} /************************************************************************/ @@ -764,7 +764,7 @@ ** Make a particular context current. ** NOTE: this is in this file so that it can access dummyContext. */ -Bool glXMakeCurrent(Display *dpy, GLXDrawable draw, GLXContext gc) +Bool GLX_PREFIX(glXMakeCurrent)(Display *dpy, GLXDrawable draw, GLXContext gc) { xGLXMakeCurrentReq *req; xGLXMakeCurrentReply reply; @@ -874,7 +874,7 @@ if (!bindReturnValue) { /* The make current failed. */ - if (!gc->isDirect) { + if (gc && !gc->isDirect) { SyncHandle(); } Index: xc/lib/GL/glx/indirect.h diff -u xc/lib/GL/glx/indirect.h:1.3 xc/lib/GL/glx/indirect.h:1.4 --- xc/lib/GL/glx/indirect.h:1.3 Wed Mar 21 11:04:39 2001 +++ xc/lib/GL/glx/indirect.h Fri Feb 22 16:32:54 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/indirect.h,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/indirect.h,v 1.4 2002/02/22 21:32:54 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -381,7 +381,7 @@ 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_glTexImage3D(GLenum target, GLint level, GLenum 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); @@ -454,5 +454,10 @@ void __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); void __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort *v); + +void __indirect_glLoadTransposeMatrixfARB(const GLfloat *m); +void __indirect_glMultTransposeMatrixfARB(const GLfloat *m); +void __indirect_glLoadTransposeMatrixdARB(const GLdouble *m); +void __indirect_glMultTransposeMatrixdARB(const GLdouble *m); #endif /* _INDIRECT_H_ */ Index: xc/lib/GL/glx/indirect_init.c diff -u xc/lib/GL/glx/indirect_init.c:1.6 xc/lib/GL/glx/indirect_init.c:1.7 --- xc/lib/GL/glx/indirect_init.c:1.6 Wed Mar 21 11:04:39 2001 +++ xc/lib/GL/glx/indirect_init.c Fri Feb 22 16:32:54 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/indirect_init.c,v 1.6 2001/03/21 16:04:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/indirect_init.c,v 1.7 2002/02/22 21:32:54 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -486,6 +486,12 @@ glAPI->MultiTexCoord4ivARB = __indirect_glMultiTexCoord4ivARB; glAPI->MultiTexCoord4sARB = __indirect_glMultiTexCoord4sARB; glAPI->MultiTexCoord4svARB = __indirect_glMultiTexCoord4svARB; + + /* ARB 3. GL_ARB_transpose_matrix */ + glAPI->LoadTransposeMatrixdARB = __indirect_glLoadTransposeMatrixdARB; + glAPI->LoadTransposeMatrixfARB = __indirect_glLoadTransposeMatrixfARB; + glAPI->MultTransposeMatrixdARB = __indirect_glMultTransposeMatrixdARB; + glAPI->MultTransposeMatrixfARB = __indirect_glMultTransposeMatrixfARB; return glAPI; } Index: xc/lib/GL/glx/packrender.h diff -u xc/lib/GL/glx/packrender.h:1.6 xc/lib/GL/glx/packrender.h:1.7 --- xc/lib/GL/glx/packrender.h:1.6 Wed Mar 21 11:04:39 2001 +++ xc/lib/GL/glx/packrender.h Wed Oct 30 07:51:26 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/packrender.h,v 1.6 2001/03/21 16:04:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/packrender.h,v 1.7 2002/10/30 12:51:26 alanh Exp $ */ #ifndef __GLX_packrender_h__ #define __GLX_packrender_h__ @@ -156,7 +156,8 @@ /* Array copy macros */ #define __GLX_MEM_COPY(dest,src,bytes) \ - memcpy(dest, src, bytes) + if (src && dest) \ + memcpy(dest, src, bytes) /* Single item copy macros */ #define __GLX_PUT_CHAR(offset,a) \ Index: xc/lib/GL/glx/pixel.c diff -u xc/lib/GL/glx/pixel.c:1.5 xc/lib/GL/glx/pixel.c:1.7 --- xc/lib/GL/glx/pixel.c:1.5 Sat Oct 27 23:32:27 2001 +++ xc/lib/GL/glx/pixel.c Wed Oct 30 07:51:26 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/pixel.c,v 1.5 2001/10/28 03:32:27 tsi Exp $ */ +/* $XFree86: xc/lib/GL/glx/pixel.c,v 1.7 2002/10/30 12:51:26 alanh Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -124,6 +124,7 @@ case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: + case GL_INTENSITY: return 1; default: return 0; @@ -182,7 +183,11 @@ */ components = ElementsPerGroup(format,type); if (type == GL_BITMAP) { - bytes_per_row = (width + 7) >> 3; + if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) { + bytes_per_row = (width + 7) >> 3; + } else { + return 0; + } } else { bytes_per_row = BytesPerElement(type) * width; } Index: xc/lib/GL/glx/renderpix.c diff -u xc/lib/GL/glx/renderpix.c:1.3 xc/lib/GL/glx/renderpix.c:1.4 --- xc/lib/GL/glx/renderpix.c:1.3 Wed Mar 21 11:04:39 2001 +++ xc/lib/GL/glx/renderpix.c Fri Feb 22 16:32:54 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/renderpix.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/renderpix.c,v 1.4 2002/02/22 21:32:54 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 @@ -260,7 +260,8 @@ { __GLX_DECLARE_VARIABLES(); - if (target == GL_PROXY_TEXTURE_2D) { + if (target == GL_PROXY_TEXTURE_2D || + target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { compsize = 0; } else { compsize = __glImageSize(width, height, 1, format, type); @@ -478,6 +479,7 @@ case GL_PROXY_COLOR_TABLE: case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_PROXY_TEXTURE_CUBE_MAP_ARB: compsize = 0; break; default: @@ -741,7 +743,7 @@ } } -void glTexImage3D(GLenum target, GLint level, GLint internalformat, +void glTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *image) { Index: xc/lib/GL/glx/single2.c diff -u xc/lib/GL/glx/single2.c:1.3 xc/lib/GL/glx/single2.c:1.4 --- xc/lib/GL/glx/single2.c:1.3 Wed Mar 21 11:04:39 2001 +++ xc/lib/GL/glx/single2.c Fri Feb 22 16:32:54 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/single2.c,v 1.3 2001/03/21 16:04:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/single2.c,v 1.4 2002/02/22 21:32:54 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 @@ -38,6 +38,58 @@ #include "glxclient.h" #include "packsingle.h" +/* Used for GL_ARB_transpose_matrix */ +static void TransposeMatrixf(GLfloat m[16]) +{ + int i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < i; j++) { + GLfloat tmp = m[i*4+j]; + m[i*4+j] = m[j*4+i]; + m[j*4+i] = tmp; + } + } +} + +/* Used for GL_ARB_transpose_matrix */ +static void TransposeMatrixb(GLboolean m[16]) +{ + int i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < i; j++) { + GLboolean tmp = m[i*4+j]; + m[i*4+j] = m[j*4+i]; + m[j*4+i] = tmp; + } + } +} + +/* Used for GL_ARB_transpose_matrix */ +static void TransposeMatrixd(GLdouble m[16]) +{ + int i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < i; j++) { + GLdouble tmp = m[i*4+j]; + m[i*4+j] = m[j*4+i]; + m[j*4+i] = tmp; + } + } +} + +/* Used for GL_ARB_transpose_matrix */ +static void TransposeMatrixi(GLint m[16]) +{ + int i, j; + for (i = 0; i < 4; i++) { + for (j = 0; j < i; j++) { + GLint tmp = m[i*4+j]; + m[i*4+j] = m[j*4+i]; + m[j*4+i] = tmp; + } + } +} + GLenum glGetError(void) { __GLX_SINGLE_DECLARE_VARIABLES(); @@ -76,9 +128,23 @@ void glGetBooleanv(GLenum val, GLboolean *b) { + const GLenum origVal = val; __GLX_SINGLE_DECLARE_VARIABLES(); xGLXSingleReply reply; + if (val == GL_TRANSPOSE_MODELVIEW_MATRIX_ARB) { + val = GL_MODELVIEW_MATRIX; + } + else if (val == GL_TRANSPOSE_PROJECTION_MATRIX_ARB) { + val = GL_PROJECTION_MATRIX; + } + else if (val == GL_TRANSPOSE_TEXTURE_MATRIX_ARB) { + val = GL_TEXTURE_MATRIX; + } + else if (val == GL_TRANSPOSE_COLOR_MATRIX_ARB) { + val = GL_COLOR_MATRIX; + } + __GLX_SINGLE_LOAD_VARIABLES(); __GLX_SINGLE_BEGIN(X_GLsop_GetBooleanv,4); __GLX_SINGLE_PUT_LONG(0,val); @@ -226,6 +292,10 @@ __GLX_SINGLE_GET_CHAR(b); } else { __GLX_SINGLE_GET_CHAR_ARRAY(b,compsize); + if (val != origVal) { + /* matrix transpose */ + TransposeMatrixb(b); + } } } } @@ -234,9 +304,23 @@ void glGetDoublev(GLenum val, GLdouble *d) { + const GLenum origVal = val; __GLX_SINGLE_DECLARE_VARIABLES(); xGLXSingleReply reply; + if (val == GL_TRANSPOSE_MODELVIEW_MATRIX_ARB) { + val = GL_MODELVIEW_MATRIX; + } + else if (val == GL_TRANSPOSE_PROJECTION_MATRIX_ARB) { + val = GL_PROJECTION_MATRIX; + } + else if (val == GL_TRANSPOSE_TEXTURE_MATRIX_ARB) { + val = GL_TEXTURE_MATRIX; + } + else if (val == GL_TRANSPOSE_COLOR_MATRIX_ARB) { + val = GL_COLOR_MATRIX; + } + __GLX_SINGLE_LOAD_VARIABLES(); __GLX_SINGLE_BEGIN(X_GLsop_GetDoublev,4); __GLX_SINGLE_PUT_LONG(0,val); @@ -384,6 +468,10 @@ __GLX_SINGLE_GET_DOUBLE(d); } else { __GLX_SINGLE_GET_DOUBLE_ARRAY(d,compsize); + if (val != origVal) { + /* matrix transpose */ + TransposeMatrixd(d); + } } } } @@ -392,9 +480,23 @@ void glGetFloatv(GLenum val, GLfloat *f) { + const GLenum origVal = val; __GLX_SINGLE_DECLARE_VARIABLES(); xGLXSingleReply reply; + if (val == GL_TRANSPOSE_MODELVIEW_MATRIX_ARB) { + val = GL_MODELVIEW_MATRIX; + } + else if (val == GL_TRANSPOSE_PROJECTION_MATRIX_ARB) { + val = GL_PROJECTION_MATRIX; + } + else if (val == GL_TRANSPOSE_TEXTURE_MATRIX_ARB) { + val = GL_TEXTURE_MATRIX; + } + else if (val == GL_TRANSPOSE_COLOR_MATRIX_ARB) { + val = GL_COLOR_MATRIX; + } + __GLX_SINGLE_LOAD_VARIABLES(); __GLX_SINGLE_BEGIN(X_GLsop_GetFloatv,4); __GLX_SINGLE_PUT_LONG(0,val); @@ -542,6 +644,10 @@ __GLX_SINGLE_GET_FLOAT(f); } else { __GLX_SINGLE_GET_FLOAT_ARRAY(f,compsize); + if (val != origVal) { + /* matrix transpose */ + TransposeMatrixf(f); + } } } } @@ -550,9 +656,23 @@ void glGetIntegerv(GLenum val, GLint *i) { + const GLenum origVal = val; __GLX_SINGLE_DECLARE_VARIABLES(); xGLXSingleReply reply; + if (val == GL_TRANSPOSE_MODELVIEW_MATRIX_ARB) { + val = GL_MODELVIEW_MATRIX; + } + else if (val == GL_TRANSPOSE_PROJECTION_MATRIX_ARB) { + val = GL_PROJECTION_MATRIX; + } + else if (val == GL_TRANSPOSE_TEXTURE_MATRIX_ARB) { + val = GL_TEXTURE_MATRIX; + } + else if (val == GL_TRANSPOSE_COLOR_MATRIX_ARB) { + val = GL_COLOR_MATRIX; + } + __GLX_SINGLE_LOAD_VARIABLES(); __GLX_SINGLE_BEGIN(X_GLsop_GetIntegerv,4); __GLX_SINGLE_PUT_LONG(0,val); @@ -700,6 +820,10 @@ __GLX_SINGLE_GET_LONG(i); } else { __GLX_SINGLE_GET_LONG_ARRAY(i,compsize); + if (val != origVal) { + /* matrix transpose */ + TransposeMatrixi(i); + } } } } Index: xc/lib/GL/include/GL/internal/glcore.h diff -u xc/lib/GL/include/GL/internal/glcore.h:1.7 xc/lib/GL/include/GL/internal/glcore.h:1.9 --- xc/lib/GL/include/GL/internal/glcore.h:1.7 Sun Mar 25 00:32:00 2001 +++ xc/lib/GL/include/GL/internal/glcore.h Wed Aug 28 02:41:25 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */ +/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.9 2002/08/28 06:41:25 torrey Exp $ */ #ifndef __gl_core_h_ #define __gl_core_h_ @@ -48,6 +48,7 @@ #define GL_CORE_SGI 1 #define GL_CORE_MESA 2 +#define GL_CORE_AQUA 3 typedef struct __GLcontextRec __GLcontext; typedef struct __GLinterfaceRec __GLinterface; @@ -383,7 +384,8 @@ /* Context management (return GL_FALSE on failure) */ GLboolean (*destroyContext)(__GLcontext *gc); GLboolean (*loseCurrent)(__GLcontext *gc); - GLboolean (*makeCurrent)(__GLcontext *gc, __GLdrawablePrivate *glPriv); + /* oldglPriv isn't used anymore, kept for backwards compatibility */ + GLboolean (*makeCurrent)(__GLcontext *gc, __GLdrawablePrivate *oldglPriv); GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare); GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask); GLboolean (*forceCurrent)(__GLcontext *gc); Index: xc/lib/GL/mesa/dri/Imakefile diff -u xc/lib/GL/mesa/dri/Imakefile:1.5 xc/lib/GL/mesa/dri/Imakefile:removed --- xc/lib/GL/mesa/dri/Imakefile:1.5 Mon Apr 2 22:29:33 2001 +++ xc/lib/GL/mesa/dri/Imakefile Thu Feb 27 12:26:12 2003 @@ -1,43 +0,0 @@ -XCOMM $XFree86: xc/lib/GL/mesa/dri/Imakefile,v 1.5 2001/04/03 02:29:33 dawes Exp $ - -#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 - -#if BuildXF86DRI - DRI_DEFINES = GlxDefines - DRI_INCLUDES = -I$(GLXLIBSRC)/glx -I$(GLXLIBSRC)/dri \ - -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ - -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri -#endif - -MESA_INCLUDES = -I. -I$(MESASRCDIR)/src -I$(MESASRCDIR)/include - - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) - INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) $(DRI_INCLUDES) $(MESA_INCLUDES) - SRCS = dri_mesa.c - OBJS = dri_mesa.o - -#include - -LibraryObjectRule() - -SubdirLibraryRule($(OBJS)) -NormalLintTarget($(SRCS)) - -DependTarget() - Index: xc/lib/GL/mesa/dri/dri_mesa.c diff -u xc/lib/GL/mesa/dri/dri_mesa.c:1.17 xc/lib/GL/mesa/dri/dri_mesa.c:removed --- xc/lib/GL/mesa/dri/dri_mesa.c:1.17 Mon Aug 27 13:40:57 2001 +++ xc/lib/GL/mesa/dri/dri_mesa.c Thu Feb 27 12:26:12 2003 @@ -1,1056 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.c,v 1.17 2001/08/27 17:40:57 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. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * 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 -#include -#include -#include "extutil.h" -#include "glxclient.h" -#include "xf86dri.h" -#include "sarea.h" -#include "dri_mesaint.h" -#include "dri_xmesaapi.h" -#include "context.h" -#include "mmath.h" - - -/* Context binding */ -static Bool driMesaBindContext(Display *dpy, int scrn, - GLXDrawable draw, GLXContext gc); -static Bool driMesaUnbindContext(Display *dpy, int scrn, - GLXDrawable draw, GLXContext gc, - int will_rebind); - -/* Drawable methods */ -static void *driMesaCreateDrawable(Display *dpy, int scrn, GLXDrawable draw, - VisualID vid, __DRIdrawable *pdraw); -static __DRIdrawable *driMesaGetDrawable(Display *dpy, GLXDrawable draw, - 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 *screenPrivate); - -/* Screen methods */ -static void *driMesaCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, - int numConfigs, __GLXvisualConfig *config); -static void driMesaDestroyScreen(Display *dpy, int scrn, void *screenPrivate); - -static Bool driFeatureOn(const char *name) -{ - char *env = getenv(name); - - if (!env) return GL_FALSE; - if (!strcasecmp(env, "enable")) return GL_TRUE; - if (!strcasecmp(env, "1")) return GL_TRUE; - if (!strcasecmp(env, "on")) return GL_TRUE; - if (!strcasecmp(env, "true")) return GL_TRUE; - if (!strcasecmp(env, "t")) return GL_TRUE; - if (!strcasecmp(env, "yes")) return GL_TRUE; - if (!strcasecmp(env, "y")) return GL_TRUE; - - return GL_FALSE; -} - - -/* -** Print message to stderr if LIBGL_DEBUG env var is set. -*/ -void -__driMesaMessage(const char *msg) -{ - if (getenv("LIBGL_DEBUG")) { - fprintf(stderr, "libGL error: %s\n", msg); - } -} - - -/*****************************************************************/ - -/* Maintain a list of drawables */ - -static Bool __driMesaAddDrawable(void *drawHash, __DRIdrawable *pdraw) -{ - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; - - if (drmHashInsert(drawHash, pdp->draw, pdraw)) - return GL_FALSE; - - return GL_TRUE; -} - -static __DRIdrawable *__driMesaFindDrawable(void *drawHash, GLXDrawable draw) -{ - int retcode; - __DRIdrawable *pdraw; - - retcode = drmHashLookup(drawHash, draw, (void **)&pdraw); - if (retcode) - return NULL; - - return pdraw; -} - -static void __driMesaRemoveDrawable(void *drawHash, __DRIdrawable *pdraw) -{ - int retcode; - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; - - retcode = drmHashLookup(drawHash, pdp->draw, (void **)&pdraw); - if (!retcode) { /* Found */ - drmHashDelete(drawHash, pdp->draw); - } -} - -static Bool __driMesaWindowExistsFlag; - -static int __driMesaWindowExistsErrorHandler(Display *dpy, XErrorEvent *xerr) -{ - if (xerr->error_code == BadWindow) { - __driMesaWindowExistsFlag = GL_FALSE; - } - return 0; -} - -static Bool __driMesaWindowExists(Display *dpy, GLXDrawable draw) -{ - XWindowAttributes xwa; - int (*oldXErrorHandler)(Display *, XErrorEvent *); - - __driMesaWindowExistsFlag = GL_TRUE; - oldXErrorHandler = XSetErrorHandler(__driMesaWindowExistsErrorHandler); - XGetWindowAttributes(dpy, draw, &xwa); /* dummy request */ - XSetErrorHandler(oldXErrorHandler); - return __driMesaWindowExistsFlag; -} - -static void __driMesaGarbageCollectDrawables(void *drawHash) -{ - GLXDrawable draw; - __DRIdrawable *pdraw; - Display *dpy; - - if (drmHashFirst(drawHash, &draw, (void **)&pdraw)) { - do { - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private; - dpy = pdp->driScreenPriv->display; - XSync(dpy, GL_FALSE); - if (!__driMesaWindowExists(dpy, draw)) { - /* Destroy the local drawable data in the hash table, if the - drawable no longer exists in the Xserver */ - __driMesaRemoveDrawable(drawHash, pdraw); - (*pdraw->destroyDrawable)(dpy, pdraw->private); - Xfree(pdraw); - } - } while (drmHashNext(drawHash, &draw, (void **)&pdraw)); - } -} - -/*****************************************************************/ - -/* - * 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; /* XXX rename as CreateScreen? */ - MesaAPI->ResetDriver = XMesaResetDriver; /* rename as DestroyScreen? */ - MesaAPI->CreateVisual = XMesaCreateVisual; - MesaAPI->CreateContext = XMesaCreateContext; - MesaAPI->DestroyContext = XMesaDestroyContext; - MesaAPI->CreateWindowBuffer = XMesaCreateWindowBuffer; - MesaAPI->CreatePixmapBuffer = XMesaCreatePixmapBuffer; - MesaAPI->SwapBuffers = XMesaSwapBuffers; - MesaAPI->MakeCurrent = XMesaMakeCurrent; - MesaAPI->UnbindContext = XMesaUnbindContext; - MesaAPI->OpenFullScreen = XMesaOpenFullScreen; - MesaAPI->CloseFullScreen = XMesaCloseFullScreen; -} - -/*****************************************************************/ - -static Bool driMesaUnbindContext(Display *dpy, int scrn, - GLXDrawable draw, GLXContext gc, - int will_rebind) -{ - __DRIscreen *pDRIScreen; - __DRIdrawable *pdraw; - __DRIcontextPrivate *pcp; - __DRIscreenPrivate *psp; - __DRIdrawablePrivate *pdp; - - /* - ** Assume error checking is done properly in glXMakeCurrent before - ** calling driMesaUnbindContext. - */ - - if (gc == NULL || draw == None) { - /* ERROR!!! */ - return GL_FALSE; - } - - if (!(pDRIScreen = __glXFindDRIScreen(dpy, scrn))) { - /* ERROR!!! */ - return GL_FALSE; - } else if (!(psp = (__DRIscreenPrivate *)pDRIScreen->private)) { - /* ERROR!!! */ - return GL_FALSE; - } - - pcp = (__DRIcontextPrivate *)gc->driContext.private; - - pdraw = __driMesaFindDrawable(psp->drawHash, draw); - if (!pdraw) { - /* ERROR!!! */ - return GL_FALSE; - } - pdp = (__DRIdrawablePrivate *)pdraw->private; - - /* Don't leave fullscreen mode if the - drawable will be rebound in the next - step -- this avoids a protocol - request. */ - if (!will_rebind && psp->fullscreen) { - psp->MesaAPI.CloseFullScreen(pcp); - XF86DRICloseFullScreen(dpy, scrn, draw); - psp->fullscreen = NULL; - } - - /* Unbind Mesa's drawable from Mesa's context */ - (*psp->MesaAPI.UnbindContext)(pcp); - - if (pdp->refcount == 0) { - /* ERROR!!! */ - return GL_FALSE; - } else if (--pdp->refcount == 0) { -#if 0 - /* - ** NOT_DONE: When a drawable is unbound from one direct - ** rendering context and then bound to another, we do not want - ** to destroy the drawable data structure each time only to - ** recreate it immediatly afterwards when binding to the next - ** context. This also causes conflicts with caching of the - ** drawable stamp. - ** - ** In addition, we don't destroy the drawable here since Mesa - ** keeps private data internally (e.g., software accumulation - ** buffers) that should not be destroyed unless the client - ** explicitly requests that the window be destroyed. - ** - ** When GLX 1.3 is integrated, the create and destroy drawable - ** functions will have user level counterparts and the memory - ** will be able to be recovered. - ** - ** Below is an example of what needs to go into the destroy - ** drawable routine to support GLX 1.3. - */ - __driMesaRemoveDrawable(psp->drawHash, pdraw); - (*pdraw->destroyDrawable)(dpy, pdraw->private); - Xfree(pdraw); -#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; -} - -static Bool driMesaBindContext(Display *dpy, int scrn, - GLXDrawable draw, GLXContext gc) -{ - __DRIscreen *pDRIScreen; - __DRIdrawable *pdraw; - __DRIdrawablePrivate *pdp; - __DRIscreenPrivate *psp; - __DRIcontextPrivate *pcp; - static Bool envchecked = False; - static Bool checkfullscreen = False; - - /* - ** Assume error checking is done properly in glXMakeCurrent before - ** calling driMesaBindContext. - */ - - if (gc == NULL || draw == None) { - /* ERROR!!! */ - return GL_FALSE; - } - - if (!(pDRIScreen = __glXFindDRIScreen(dpy, scrn))) { - /* ERROR!!! */ - return GL_FALSE; - } else if (!(psp = (__DRIscreenPrivate *)pDRIScreen->private)) { - /* ERROR!!! */ - return GL_FALSE; - } - - pdraw = __driMesaFindDrawable(psp->drawHash, draw); - if (!pdraw) { - /* Allocate a new drawable */ - pdraw = (__DRIdrawable *)Xmalloc(sizeof(__DRIdrawable)); - if (!pdraw) { - /* ERROR!!! */ - return GL_FALSE; - } - - /* Create a new drawable */ - pdraw->private = driMesaCreateDrawable(dpy, scrn, draw, gc->vid, - pdraw); - if (!pdraw->private) { - /* ERROR!!! */ - Xfree(pdraw); - return GL_FALSE; - } - - /* Add pdraw to drawable list */ - if (!__driMesaAddDrawable(psp->drawHash, pdraw)) { - /* ERROR!!! */ - (*pdraw->destroyDrawable)(dpy, pdraw->private); - Xfree(pdraw); - return GL_FALSE; - } - } - - pdp = (__DRIdrawablePrivate *)pdraw->private; - - /* Bind the drawable to the context */ - pcp = (__DRIcontextPrivate *)gc->driContext.private; - pcp->driDrawablePriv = pdp; - pdp->driContextPriv = pcp; - pdp->refcount++; - - /* - ** Now that we have a context associated with this drawable, we can - ** initialize the drawable information if has not been done before. - ** Also, since we need it when LIBGL_DRI_FULLSCREEN, pick up any changes - ** that are outstanding. - */ - if (!pdp->pStamp || *pdp->pStamp != pdp->lastStamp) { - DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); - driMesaUpdateDrawableInfo(dpy, scrn, pdp); - DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); - } - - /* Call device-specific MakeCurrent */ - (*psp->MesaAPI.MakeCurrent)(pcp, pdp, pdp); - - /* Check for the potential to enter an automatic full-screen mode. - This may need to be moved up. */ - if (!envchecked) { - checkfullscreen = driFeatureOn("LIBGL_DRI_AUTOFULLSCREEN"); - envchecked = GL_TRUE; - } - if (checkfullscreen && pdp->numClipRects == 1) { - /* If there is valid information in the SAREA, we can use it to - avoid a protocol request. The only time when the SAREA - information won't be valid will be initially, so in the worst - case, we'll make one protocol request that we could have - avoided. */ - int try = 1; - int clw = pdp->pClipRects[0].x2 - pdp->pClipRects[0].x1; - int clh = pdp->pClipRects[0].y2 - pdp->pClipRects[0].y1; - -#if 0 - /* Useful client-side debugging message */ - fprintf(stderr, - "********************************************\n" - "********************************************\n" - "********************************************\n" - "%d @ %d,%d,%d,%d\n" - "frame %d,%d,%d,%d\n" - "win %d,%d,%d,%d\n" - "fs = %p pdp = %p sarea = %d\n" - "********************************************\n" - "********************************************\n" - "********************************************\n", - pdp->numClipRects, - pdp->pClipRects[0].x1, - pdp->pClipRects[0].y1, - pdp->pClipRects[0].x2, - pdp->pClipRects[0].y2, - psp->pSAREA->frame.x, - psp->pSAREA->frame.y, - psp->pSAREA->frame.width, - psp->pSAREA->frame.height, - pdp->x, pdp->y, pdp->w, pdp->h, - psp->fullscreen, pdp, psp->pSAREA->frame.fullscreen); -#endif - - - if (pdp->x != pdp->pClipRects[0].x1 - || pdp->y != pdp->pClipRects[0].y1 - || pdp->w != clw - || pdp->h != clh) try = 0; - - if (try && psp->pSAREA->frame.width && psp->pSAREA->frame.height) { - if (pdp->x != psp->pSAREA->frame.x - || pdp->y != psp->pSAREA->frame.y - || pdp->w != psp->pSAREA->frame.width - || pdp->h != psp->pSAREA->frame.height) try = 0; - } - - if (try) { - if (psp->fullscreen && !psp->pSAREA->frame.fullscreen) { - /* Server has closed fullscreen mode */ - __driMesaMessage("server closed fullscreen mode"); - psp->fullscreen = NULL; - } - if (XF86DRIOpenFullScreen(dpy, scrn, draw)) { - psp->fullscreen = pdp; - psp->MesaAPI.OpenFullScreen(pcp); - } - } - } - - return GL_TRUE; -} - -/*****************************************************************/ - -/* - * This function basically updates the __DRIdrawablePrivate struct's - * 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) -{ - __DRIscreenPrivate *psp; - __DRIcontextPrivate *pcp = pdp->driContextPriv; - - if (!pcp || (pdp != pcp->driDrawablePriv)) { - /* ERROR!!! */ - return; - } - - psp = pdp->driScreenPriv; - if (!psp) { - /* ERROR!!! */ - return; - } - - if (pdp->pClipRects) { - Xfree(pdp->pClipRects); - } - - if (pdp->pBackClipRects) { - Xfree(pdp->pBackClipRects); - } - - DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); - - if (!XF86DRIGetDrawableInfo(dpy, scrn, pdp->draw, - &pdp->index, &pdp->lastStamp, - &pdp->x, &pdp->y, &pdp->w, &pdp->h, - &pdp->numClipRects, &pdp->pClipRects, - &pdp->backX, - &pdp->backY, - &pdp->numBackClipRects, - &pdp->pBackClipRects - )) { - pdp->numClipRects = 0; - pdp->pClipRects = NULL; - pdp->numBackClipRects = 0; - pdp->pBackClipRects = 0; - /* ERROR!!! */ - } - - DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); - - pdp->pStamp = &(psp->pSAREA->drawableTable[pdp->index].stamp); -} - -/*****************************************************************/ - -static void *driMesaCreateDrawable(Display *dpy, int scrn, GLXDrawable draw, - VisualID vid, __DRIdrawable *pdraw) -{ - __DRIscreen *pDRIScreen; - __DRIscreenPrivate *psp; - __DRIdrawablePrivate *pdp; - int i; - GLvisual *mesaVis = NULL; - - pdp = (__DRIdrawablePrivate *)Xmalloc(sizeof(__DRIdrawablePrivate)); - if (!pdp) { - return NULL; - } - - if (!XF86DRICreateDrawable(dpy, scrn, draw, &pdp->hHWDrawable)) { - Xfree(pdp); - return NULL; - } - - pdp->draw = draw; - pdp->refcount = 0; - pdp->pStamp = NULL; - pdp->lastStamp = 0; - pdp->index = 0; - pdp->x = 0; - pdp->y = 0; - pdp->w = 0; - pdp->h = 0; - pdp->numClipRects = 0; - pdp->numBackClipRects = 0; - pdp->pClipRects = NULL; - pdp->pBackClipRects = NULL; - - if (!(pDRIScreen = __glXFindDRIScreen(dpy, scrn))) { - (void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw); - Xfree(pdp); - return NULL; - } else if (!(psp = (__DRIscreenPrivate *)pDRIScreen->private)) { - (void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw); - Xfree(pdp); - return NULL; - } - pdp->driScreenPriv = psp; - pdp->driContextPriv = &psp->dummyContextPriv; - - for (i = 0; i < psp->numVisuals; i++) { - if (vid == psp->visuals[i].vid) { - mesaVis = psp->visuals[i].mesaVisual; - break; - } - } - - /* XXX pixmap rendering not implemented yet */ - if (1) { - pdp->mesaBuffer = (*psp->MesaAPI.CreateWindowBuffer)(dpy, psp, pdp, mesaVis); - } - else { - pdp->mesaBuffer = (*psp->MesaAPI.CreatePixmapBuffer)(dpy, psp, pdp, mesaVis); - } - if (!pdp->mesaBuffer) { - (void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw); - Xfree(pdp); - return NULL; - } - - pdraw->destroyDrawable = driMesaDestroyDrawable; - pdraw->swapBuffers = driMesaSwapBuffers; - - return (void *)pdp; -} - -static __DRIdrawable *driMesaGetDrawable(Display *dpy, GLXDrawable draw, - void *screenPrivate) -{ - __DRIscreenPrivate *psp = (__DRIscreenPrivate *) screenPrivate; - - /* - ** Make sure this routine returns NULL if the drawable is not bound - ** to a direct rendering context! - */ - return __driMesaFindDrawable(psp->drawHash, draw); -} - -/* - * 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 *) drawPrivate; - __DRIscreenPrivate *psp = pdp->driScreenPriv; - - (*psp->MesaAPI.SwapBuffers)(pdp); -} - -static void driMesaDestroyDrawable(Display *dpy, void *drawPrivate) -{ - __DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)drawPrivate; - __DRIscreenPrivate *psp = pdp->driScreenPriv; - int scrn = psp->myNum; - - if (pdp) { - gl_destroy_framebuffer(pdp->mesaBuffer); - if (__driMesaWindowExists(dpy, pdp->draw)) - (void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw); - if (pdp->pClipRects) - Xfree(pdp->pClipRects); - Xfree(pdp); - } -} - -/*****************************************************************/ - -static void *driMesaCreateContext(Display *dpy, XVisualInfo *vis, void *shared, - __DRIcontext *pctx) -{ - __DRIscreen *pDRIScreen; - __DRIcontextPrivate *pcp; - __DRIcontextPrivate *pshare = (__DRIcontextPrivate *)shared; - __DRIscreenPrivate *psp; - int i; - - if (!(pDRIScreen = __glXFindDRIScreen(dpy, vis->screen))) { - /* ERROR!!! */ - return NULL; - } else if (!(psp = (__DRIscreenPrivate *)pDRIScreen->private)) { - /* ERROR!!! */ - return NULL; - } - - /* Create the hash table */ - if (!psp->drawHash) psp->drawHash = drmHashCreate(); - - pcp = (__DRIcontextPrivate *)Xmalloc(sizeof(__DRIcontextPrivate)); - if (!pcp) { - return NULL; - } - - pcp->display = dpy; - pcp->driScreenPriv = psp; - pcp->mesaContext = NULL; - pcp->driDrawablePriv = NULL; - - if (!XF86DRICreateContext(dpy, vis->screen, vis->visual, - &pcp->contextID, &pcp->hHWContext)) { - Xfree(pcp); - 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; - GLcontext *sharedMesaCtx = pshare ? pshare->mesaContext : NULL; - pcp->mesaContext = gl_create_context(mesaVis, - sharedMesaCtx, - NULL, /* set below */ - GL_TRUE); - if (pcp->mesaContext) { - /* Driver now creates its private context data */ - if ((*psp->MesaAPI.CreateContext)(dpy, mesaVis, pcp)) { - pcp->mesaContext->DriverCtx = pcp->driverPrivate; - } - else { - gl_destroy_context(pcp->mesaContext); - pcp->mesaContext = NULL; - pcp->driverPrivate = NULL; - } - } - } - } - - if (!pcp->mesaContext) { - (void)XF86DRIDestroyContext(dpy, vis->screen, pcp->contextID); - Xfree(pcp); - return NULL; - } - - pctx->destroyContext = driMesaDestroyContext; - pctx->bindContext = driMesaBindContext; - pctx->unbindContext = driMesaUnbindContext; - - __driMesaGarbageCollectDrawables(pcp->driScreenPriv->drawHash); - - return pcp; -} - -static void driMesaDestroyContext(Display *dpy, int scrn, void *contextPrivate) -{ - __DRIcontextPrivate *pcp = (__DRIcontextPrivate *) contextPrivate; - __DRIscreenPrivate *psp; - __DRIdrawablePrivate *pdp; - - if (pcp) { - if ((pdp = pcp->driDrawablePriv)) { - /* Shut down fullscreen mode */ - if ((psp = pdp->driScreenPriv) && psp->fullscreen) { - psp->MesaAPI.CloseFullScreen(pcp); - XF86DRICloseFullScreen(dpy, scrn, pdp->draw); - psp->fullscreen = NULL; - } - } - __driMesaGarbageCollectDrawables(pcp->driScreenPriv->drawHash); - (*pcp->driScreenPriv->MesaAPI.DestroyContext)(pcp); - gl_destroy_context(pcp->mesaContext); - (void)XF86DRIDestroyContext(dpy, scrn, pcp->contextID); - Xfree(pcp); - } -} - -/*****************************************************************/ - -static void *driMesaCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, - int numConfigs, __GLXvisualConfig *config) -{ - int directCapable, i, n; - __DRIscreenPrivate *psp; - XVisualInfo visTmpl, *visinfo; - drmHandle hFB, hSAREA; - char *BusID, *driverName; - drmMagic magic; - - if (!XF86DRIQueryDirectRenderingCapable(dpy, scrn, &directCapable)) { - return NULL; - } - - if (!directCapable) { - return NULL; - } - - psp = (__DRIscreenPrivate *)Xmalloc(sizeof(__DRIscreenPrivate)); - if (!psp) { - return NULL; - } - - psp->display = dpy; - psp->myNum = scrn; - - if (!XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) { - Xfree(psp); - return NULL; - } - - /* - ** NOT_DONE: This is used by the X server to detect when the client - ** has died while holding the drawable lock. The client sets the - ** drawable lock to this value. - */ - psp->drawLockID = 1; - - 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); - return NULL; - } - Xfree(BusID); /* No longer needed */ - - if (drmGetMagic(psp->fd, &magic)) { - (void)drmClose(psp->fd); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - return NULL; - } - - { - drmVersionPtr version = drmGetVersion(psp->fd); - if (version) { - psp->drmMajor = version->version_major; - psp->drmMinor = version->version_minor; - psp->drmPatch = version->version_patchlevel; - drmFreeVersion(version); - } - else { - psp->drmMajor = -1; - psp->drmMinor = -1; - psp->drmPatch = -1; - } - } - - if (!XF86DRIAuthConnection(dpy, scrn, magic)) { - (void)drmClose(psp->fd); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - 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, - &psp->ddxPatch, - &driverName)) { - (void)drmClose(psp->fd); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - 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, - &psp->fbSize, - &psp->fbStride, - &psp->devPrivSize, - &psp->pDevPriv)) { - (void)drmClose(psp->fd); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - return NULL; - } - psp->fbWidth = DisplayWidth(dpy, scrn); - 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); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - 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); - (void)drmClose(psp->fd); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - return NULL; - } - - /* - * Allocate space for an array of visual records and initialize them. - */ - psp->numVisuals = numConfigs; - psp->visuals = (__DRIvisualPrivate *)Xmalloc(numConfigs * - sizeof(__DRIvisualPrivate)); - if (!psp->visuals) { - (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); - (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); - Xfree(psp->pDevPriv); - (void)drmClose(psp->fd); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - return NULL; - } - - visTmpl.screen = scrn; - visinfo = XGetVisualInfo(dpy, VisualScreenMask, &visTmpl, &n); - if (n != numConfigs) { - (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); - (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); - Xfree(psp->pDevPriv); - (void)drmClose(psp->fd); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - return NULL; - } - - for (i = 0; i < numConfigs; i++, config++) { - psp->visuals[i].vid = visinfo[i].visualid; - psp->visuals[i].mesaVisual = - (*psp->MesaAPI.CreateVisual) (dpy, psp, &visinfo[i], config); - - if (!psp->visuals[i].mesaVisual) { - /* Free the visuals so far created */ - while (--i >= 0) { - _mesa_destroy_visual(psp->visuals[i].mesaVisual); - } - Xfree(psp->visuals); - XFree(visinfo); - (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); - (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); - Xfree(psp->pDevPriv); - (void)drmClose(psp->fd); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - return NULL; - } - } - XFree(visinfo); - - /* Initialize the screen specific GLX driver */ - if (psp->MesaAPI.InitDriver) { - if (!(*psp->MesaAPI.InitDriver)(psp)) { - while (--psp->numVisuals >= 0) { - _mesa_destroy_visual(psp->visuals[psp->numVisuals].mesaVisual); - } - Xfree(psp->visuals); - (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); - (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); - Xfree(psp->pDevPriv); - (void)drmClose(psp->fd); - Xfree(psp); - (void)XF86DRICloseConnection(dpy, scrn); - return NULL; - } - } - - /* - ** Do not init dummy context here; actual initialization will be - ** done when the first DRI context is created. Init screen priv ptr - ** to NULL to let CreateContext routine that it needs to be inited. - */ - psp->dummyContextPriv.driScreenPriv = NULL; - - /* Initialize the drawHash when the first context is created */ - psp->drawHash = NULL; - - psc->destroyScreen = driMesaDestroyScreen; - psc->createContext = driMesaCreateContext; - psc->createDrawable = driMesaCreateDrawable; - psc->getDrawable = driMesaGetDrawable; - - return (void *)psp; -} - -static void driMesaDestroyScreen(Display *dpy, int scrn, void *screenPrivate) -{ - __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) { - _mesa_destroy_visual(psp->visuals[psp->numVisuals].mesaVisual); - } - Xfree(psp->visuals); - (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); - (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); - Xfree(psp->pDevPriv); - (void)drmClose(psp->fd); - Xfree(psp); - -#if 0 - /* - ** NOT_DONE: Normally, we would call XF86DRICloseConnection() - ** here, but since this routine is called after the - ** XCloseDisplay() function has already shut down the connection - ** to the Display, there is no protocol stream open to the X - ** server anymore. Luckily, XF86DRICloseConnection() does not - ** really do anything (for now). - */ - (void)XF86DRICloseConnection(dpy, scrn); -#endif - } -} - - -/* - * 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); -} - - - -#endif Index: xc/lib/GL/mesa/dri/dri_mesa.h diff -u xc/lib/GL/mesa/dri/dri_mesa.h:1.4 xc/lib/GL/mesa/dri/dri_mesa.h:removed --- xc/lib/GL/mesa/dri/dri_mesa.h:1.4 Fri Jun 16 20:02:50 2000 +++ xc/lib/GL/mesa/dri/dri_mesa.h Thu Feb 27 12:26:12 2003 @@ -1,50 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.h,v 1.4 2000/06/17 00:02:50 martin 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: - * Kevin E. Martin - * Brian Paul - */ - -#ifndef _DRI_MESA_H_ -#define _DRI_MESA_H_ - -#ifdef GLX_DIRECT_RENDERING - -typedef struct __DRIdisplayPrivateRec __DRIdisplayPrivate; -typedef struct __DRIscreenPrivateRec __DRIscreenPrivate; -typedef struct __DRIvisualPrivateRec __DRIvisualPrivate; -typedef struct __DRIcontextPrivateRec __DRIcontextPrivate; -typedef struct __DRIdrawablePrivateRec __DRIdrawablePrivate; - -extern void __driMesaMessage(const char *msg); - -#endif - -#endif /* _DRI_MESA_H_ */ Index: xc/lib/GL/mesa/dri/dri_mesaint.h diff -u xc/lib/GL/mesa/dri/dri_mesaint.h:1.9 xc/lib/GL/mesa/dri/dri_mesaint.h:removed --- xc/lib/GL/mesa/dri/dri_mesaint.h:1.9 Thu Dec 7 15:26:04 2000 +++ xc/lib/GL/mesa/dri/dri_mesaint.h Thu Feb 27 12:26:12 2003 @@ -1,287 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_mesaint.h,v 1.9 2000/12/07 20:26:04 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. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Brian E. Paul - * - */ - -#ifndef _DRI_MESAINT_H_ -#define _DRI_MESAINT_H_ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include "xf86dri.h" -#include "sarea.h" -#include "dri_mesa.h" -#include "dri_xmesaapi.h" - - -#define DRI_MESA_VALIDATE_DRAWABLE_INFO(dpy,scrn,pDrawPriv) \ - do { \ - if (*(pDrawPriv->pStamp) != pDrawPriv->lastStamp) { \ - driMesaUpdateDrawableInfo(dpy,scrn,pDrawPriv); \ - } \ - } while (0) - - -struct __DRIdrawablePrivateRec { - /* - ** Kernel drawable handle (not currently used). - */ - drmDrawable hHWDrawable; - - /* - ** Mesa's private frame buffer information. This structure is opaque. - */ - GLframebuffer *mesaBuffer; - - /* - ** X's drawable ID associated with this private drawable. - */ - GLXDrawable draw; - - /* - ** Reference count for number of context's currently bound to this - ** drawable. Once the refcount reaches 0, the drawable can be - ** destroyed. This behavior will change with GLX 1.3. - */ - int refcount; - - /* - ** Index of this drawable's information in the SAREA. - */ - unsigned int index; - - /* - ** Pointer to the "drawable has changed ID" stamp in the SAREA. - */ - unsigned int *pStamp; - - /* - ** Last value of the stamp. If this differs from the value stored - ** at *pStamp, then the drawable information has been modified by - ** the X server, and the drawable information (below) should be - ** retrieved from the X server. - */ - unsigned int lastStamp; - - /* - ** Drawable information used in software fallbacks. - */ - int x; - int y; - int w; - int h; - int numClipRects; - XF86DRIClipRectPtr pClipRects; - - /* - ** Information about the back and depthbuffer where different - ** from above. - */ - int backX; - int backY; - int backClipRectType; - int numBackClipRects; - XF86DRIClipRectPtr pBackClipRects; - - /* - ** Pointer to context to which this drawable is currently bound. - */ - __DRIcontextPrivate *driContextPriv; - - /* - ** Pointer to screen on which this drawable was created. - */ - __DRIscreenPrivate *driScreenPriv; -}; - -struct __DRIcontextPrivateRec { - /* - ** Kernel context handle used to access the device lock. - */ - XID contextID; - - /* - ** Kernel context handle used to access the device lock. - */ - drmContext hHWContext; - - /* - ** Mesa's private context information. This structure is opaque. - */ - GLcontext *mesaContext; - - /* - ** Device driver's private context data. This structure is opaque. - */ - void *driverPrivate; - - /* - ** This context's display pointer. - */ - Display *display; - - /* - ** Pointer to drawable currently bound to this context. - */ - __DRIdrawablePrivate *driDrawablePriv; - - /* - ** Pointer to screen on which this context was created. - */ - __DRIscreenPrivate *driScreenPriv; -}; - -struct __DRIvisualPrivateRec { - /* - ** Mesa's private visual information. This structure is opaque. - */ - GLvisual *mesaVisual; - - /* - ** X's visual ID associated with this private visual. - */ - VisualID vid; -}; - -struct __DRIscreenPrivateRec { - /* - ** Display for this screen - */ - Display *display; - - /* - ** Current screen's number - */ - int myNum; - - /* - ** Core rendering library's visuals associated with the current - ** screen. - */ - __DRIvisualPrivate *visuals; - int numVisuals; - - /* - ** Function pointers associated with Mesa's GLX functions. - */ - __MesaAPI MesaAPI; - - /* - ** DDX / 2D driver version information. - */ - int ddxMajor; - int ddxMinor; - int ddxPatch; - - /* - ** DRM version information. - */ - int drmMajor; - int drmMinor; - int drmPatch; - - /* - ** ID used when the client sets the drawable lock. The X server - ** uses this value to detect if the client has died while holding - ** the drawable lock. - */ - int drawLockID; - - /* - ** File descriptor returned when the kernel device driver is opened. - ** It is used to: - ** - authenticate client to kernel - ** - map the frame buffer, SAREA, etc. - ** - close the kernel device driver - */ - int fd; - - /* - ** SAREA pointer used to access: - ** - the device lock - ** - the device-independent per-drawable and per-context(?) information - */ - XF86DRISAREAPtr pSAREA; - - /* - ** Direct frame buffer access information used for software - ** fallbacks. - */ - unsigned char *pFB; - int fbSize; - int fbOrigin; - int fbStride; - int fbWidth; - int fbHeight; - int fbBPP; - - /* - ** Device-dependent private information (stored in the SAREA). This - ** data is accessed by the client driver only. - */ - void *pDevPriv; - int devPrivSize; - - /* - ** Dummy context to which drawables are bound when not bound to any - ** other context. A dummy hHWContext is created for this context, - ** and is used by the GL core when a HW lock is required but the - ** drawable is not currently bound (e.g., potentially during a - ** SwapBuffers request). The dummy context is created when the - ** first "real" context is created on this screen. - */ - __DRIcontextPrivate dummyContextPriv; - - /* - ** Hash table to hold the drawable information for this screen. - */ - void *drawHash; - - /* - ** Device-dependent private information (not stored in the SAREA). - ** This pointer is never touched by the DRI layer. - */ - void *private; - - /* If we're in full screen mode (via DRIOpenFullScreen), this points - to the drawable that was bound. Otherwise, this is NULL. */ - __DRIdrawablePrivate *fullscreen; -}; - - -extern void driMesaUpdateDrawableInfo(Display *dpy, int scrn, - __DRIdrawablePrivate *pdp); - -#endif -#endif /* _DRI_MESAINT_H_ */ Index: xc/lib/GL/mesa/dri/dri_xmesaapi.h diff -u xc/lib/GL/mesa/dri/dri_xmesaapi.h:1.5 xc/lib/GL/mesa/dri/dri_xmesaapi.h:removed --- xc/lib/GL/mesa/dri/dri_xmesaapi.h:1.5 Thu Dec 7 15:26:04 2000 +++ xc/lib/GL/mesa/dri/dri_xmesaapi.h Thu Feb 27 12:26:12 2003 @@ -1,142 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_xmesaapi.h,v 1.5 2000/12/07 20:26:04 dawes Exp $ */ -/************************************************************************** - -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. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Brian E. Paul - */ - - -#ifndef _DRI_XMESAAPI_H_ -#define _DRI_XMESAAPI_H_ - -#include "glxclient.h" -#include "dri_mesa.h" -#include "../src/types.h" - - -extern GLboolean XMesaInitDriver( __DRIscreenPrivate *driScrnPriv ); - -extern void XMesaResetDriver( __DRIscreenPrivate *driScrnPriv ); - -/* Driver creates a GLvisual and returns pointer to it. - */ -extern GLvisual *XMesaCreateVisual(Display *dpy, - __DRIscreenPrivate *driScrnPriv, - const XVisualInfo *visinfo, - const __GLXvisualConfig *config); - -/* Driver creates its private context struct and hooks it into - * the driContextPriv->driverPrivate field. Return true/false for - * success/error. - */ -extern GLboolean XMesaCreateContext( Display *dpy, GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv ); - -/* Driver frees data attached to driContextPriv->driverPrivate pointer. - */ -extern void XMesaDestroyContext( __DRIcontextPrivate *driContextPriv ); - -/* Driver creates a GLframebuffer struct indicating which ancillary - * buffers are in hardware or software. - */ -extern GLframebuffer *XMesaCreateWindowBuffer( Display *dpy, - __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis); - -extern GLframebuffer *XMesaCreatePixmapBuffer( Display *dpy, - __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis); - -extern GLboolean XMesaMakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ); - -extern GLboolean XMesaUnbindContext( __DRIcontextPrivate *driContextPriv ); - -extern void XMesaSwapBuffers( __DRIdrawablePrivate *driDrawPriv ); - -extern GLboolean XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv); -extern GLboolean XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv); - - - -#define XMESA_VALIDATE_DRAWABLE_INFO(dpy, psp, pdp) \ -do { \ - while (*(pdp->pStamp) != pdp->lastStamp) { \ - DRM_UNLOCK(psp->fd, &psp->pSAREA->lock, \ - pdp->driContextPriv->hHWContext); \ - \ - DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ - DRI_MESA_VALIDATE_DRAWABLE_INFO(dpy, psp->myNum, pdp); \ - DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ - \ - DRM_LIGHT_LOCK(psp->fd, &psp->pSAREA->lock, \ - pdp->driContextPriv->hHWContext); \ - } \ -} while (0) - - - -typedef struct __MesaAPIRec __MesaAPI; - -struct __MesaAPIRec { - /* XMESA Functions */ - GLboolean (*InitDriver)(__DRIscreenPrivate *driScrnPriv); - void (*ResetDriver)(__DRIscreenPrivate *driScrnPriv); - GLvisual * (*CreateVisual)(Display *display, - __DRIscreenPrivate *driScrnPriv, - const XVisualInfo *visinfo, - const __GLXvisualConfig *config); - GLboolean (*CreateContext)(Display *dpy, GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv); - void (*DestroyContext)(__DRIcontextPrivate *driContextPriv); - GLframebuffer * (*CreateWindowBuffer)(Display *dpy, - __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis); - GLframebuffer * (*CreatePixmapBuffer)(Display *dpy, - __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis); - void (*SwapBuffers)(__DRIdrawablePrivate *driDrawPriv); - GLboolean (*MakeCurrent)(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv); - GLboolean (*UnbindContext)(__DRIcontextPrivate *driContextPriv); - GLboolean (*OpenFullScreen)(__DRIcontextPrivate *driContextPriv); - GLboolean (*CloseFullScreen)(__DRIcontextPrivate *driContextPriv); -}; - - - -#endif /* _DRI_XMESAAPI_H_ */ Index: xc/lib/GL/mesa/src/Imakefile diff -u xc/lib/GL/mesa/src/Imakefile:1.26 xc/lib/GL/mesa/src/Imakefile:1.32 --- xc/lib/GL/mesa/src/Imakefile:1.26 Wed May 2 11:06:02 2001 +++ xc/lib/GL/mesa/src/Imakefile Mon Nov 25 09:04:50 2002 @@ -1,14 +1,18 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.26 2001/05/02 15:06:02 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile,v 1.32 2002/11/25 14:04:50 eich Exp $ #include /* - * Only need SharedLib build unless OSMesa lib is built, or driver is built - * in to libGL + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. */ -#if BuildXF86DRI && !GlxUseSGISI && \ - (GlxUseBuiltInDRIDriver || \ - !GlxBuiltInMesa || !defined(GlxDriverUsesMesa)) + +#if BuildOSMesaLib || (BuildXF86DRI && (GlxDriverUsesMesa || GlxBuiltInXMesa)) #define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) #define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx @@ -25,14 +29,16 @@ #if Malloc0ReturnsNull ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL #endif - -#if GlxBuiltInTdfx - TDFX_DEFINES = -DFX -#endif -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #define MesaX86BuildDir /**/ #include "X86/Imakefile.inc" +ASM_SUBDIRS = X86 +#endif +#ifdef SparcArchitecture +#define MesaSparcBuildDir /**/ +#include "SPARC/Imakefile.inc" +ASM_SUBDIRS = SPARC #endif #define MesaBuildDir /**/ #define NeedToLinkMesaSrc @@ -42,12 +48,13 @@ MATH_DEFINES = -DCCPML #endif - DEFINES = $(ALLOC_DEFINES) GlxDefines $(TDFX_DEFINES) \ + DEFINES = $(ALLOC_DEFINES) GlxDefines \ $(MESA_ASM_DEFINES) $(MATH_DEFINES) INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - -I$(MESASRCDIR)/src -I$(GLXLIBSRC)/dri - SRCS = $(COREMESASRCS) - OBJS = $(COREMESAOBJS) + -I$(MESASRCDIR)/src -I$(GLXLIBSRC)/dri \ + -I$(MESASRCDIR)/include -I$(GLXLIBSRC)/include + SRCS = $(COREMESABASESRCS) + OBJS = $(COREMESABASEOBJS) #include @@ -56,16 +63,14 @@ SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) -#ifdef i386Architecture - #define IHaveSubdirs #define PassCDebugFlags + +SUBDIRS = $(ASM_SUBDIRS) math array_cache swrast swrast_setup tnl /*tnl_dd*/ X -SUBDIRS = X86 MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) -#endif DependTarget() Index: xc/lib/GL/mesa/src/Imakefile.inc diff -u xc/lib/GL/mesa/src/Imakefile.inc:1.5 xc/lib/GL/mesa/src/Imakefile.inc:1.8 --- xc/lib/GL/mesa/src/Imakefile.inc:1.5 Mon Apr 2 18:15:47 2001 +++ xc/lib/GL/mesa/src/Imakefile.inc Thu Nov 14 16:01:16 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile.inc,v 1.5 2001/04/02 22:15:47 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/Imakefile.inc,v 1.8 2002/11/14 21:01:16 tsi Exp $ #ifndef MesaBuildDir #define MesaBuildDir $(GLXLIBSRC)/mesa/src/ @@ -13,22 +13,28 @@ GLTHREADSRCS = $(MESABUILDDIR)glthread.c #endif -COREMESASRCS = $(MESABUILDDIR)aatriangle.c \ +MESA_CORE_INCLUDES = -I$(MESASRCDIR)/src/array_cache \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/src/swrast -I$(MESASRCDIR)/src/swrast_setup \ + -I$(MESASRCDIR)/src/tnl -I$(MESASRCDIR)/src/tnl_dd + + +COREMESABASESRCS = \ $(MESABUILDDIR)accum.c \ - $(MESABUILDDIR)alpha.c \ - $(MESABUILDDIR)alphabuf.c \ + $(MESABUILDDIR)api_arrayelt.c \ + $(MESABUILDDIR)api_eval.c \ + $(MESABUILDDIR)api_loopback.c \ + $(MESABUILDDIR)api_noop.c \ + $(MESABUILDDIR)api_validate.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)convolve.c \ + $(MESABUILDDIR)debug.c \ $(MESABUILDDIR)depth.c \ $(DISPATCHSRCS) \ $(MESABUILDDIR)dlist.c \ @@ -41,73 +47,116 @@ $(MESABUILDDIR)fog.c \ $(MESABUILDDIR)get.c \ $(GLAPISRCS) \ - $(GLAPINOOPSRCS) \ $(GLTHREADSRCS) \ $(MESABUILDDIR)hash.c \ $(MESABUILDDIR)hint.c \ + $(MESABUILDDIR)histogram.c \ $(MESABUILDDIR)image.c \ - $(MESABUILDDIR)imaging.c \ + $(MESABUILDDIR)imports.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)texstore.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 + $(MESABUILDDIR)vtxfmt.c + +COREMESASRCS = $(COREMESABASESRCS) \ + $(MESABUILDDIR)array_cache/ac_context.c \ + $(MESABUILDDIR)array_cache/ac_import.c \ + $(MESABUILDDIR)math/m_debug_clip.c \ + $(MESABUILDDIR)math/m_debug_norm.c \ + $(MESABUILDDIR)math/m_debug_vertex.c \ + $(MESABUILDDIR)math/m_debug_xform.c \ + $(MESABUILDDIR)math/m_eval.c \ + $(MESABUILDDIR)math/m_matrix.c \ + $(MESABUILDDIR)math/m_translate.c \ + $(MESABUILDDIR)math/m_vector.c \ + $(MESABUILDDIR)math/m_vertices.c \ + $(MESABUILDDIR)math/m_xform.c \ + $(MESABUILDDIR)swrast/s_aaline.c \ + $(MESABUILDDIR)swrast/s_aatriangle.c \ + $(MESABUILDDIR)swrast/s_accum.c \ + $(MESABUILDDIR)swrast/s_alpha.c \ + $(MESABUILDDIR)swrast/s_alphabuf.c \ + $(MESABUILDDIR)swrast/s_bitmap.c \ + $(MESABUILDDIR)swrast/s_blend.c \ + $(MESABUILDDIR)swrast/s_buffers.c \ + $(MESABUILDDIR)swrast/s_copypix.c \ + $(MESABUILDDIR)swrast/s_context.c \ + $(MESABUILDDIR)swrast/s_depth.c \ + $(MESABUILDDIR)swrast/s_drawpix.c \ + $(MESABUILDDIR)swrast/s_feedback.c \ + $(MESABUILDDIR)swrast/s_fog.c \ + $(MESABUILDDIR)swrast/s_histogram.c \ + $(MESABUILDDIR)swrast/s_imaging.c \ + $(MESABUILDDIR)swrast/s_lines.c \ + $(MESABUILDDIR)swrast/s_logic.c \ + $(MESABUILDDIR)swrast/s_masking.c \ + $(MESABUILDDIR)swrast/s_pb.c \ + $(MESABUILDDIR)swrast/s_pixeltex.c \ + $(MESABUILDDIR)swrast/s_points.c \ + $(MESABUILDDIR)swrast/s_readpix.c \ + $(MESABUILDDIR)swrast/s_scissor.c \ + $(MESABUILDDIR)swrast/s_span.c \ + $(MESABUILDDIR)swrast/s_stencil.c \ + $(MESABUILDDIR)swrast/s_texture.c \ + $(MESABUILDDIR)swrast/s_texstore.c \ + $(MESABUILDDIR)swrast/s_triangle.c \ + $(MESABUILDDIR)swrast/s_zoom.c \ + $(MESABUILDDIR)swrast_setup/ss_context.c \ + $(MESABUILDDIR)swrast_setup/ss_triangle.c \ + $(MESABUILDDIR)swrast_setup/ss_vb.c \ + $(MESABUILDDIR)tnl/t_array_api.c \ + $(MESABUILDDIR)tnl/t_array_import.c \ + $(MESABUILDDIR)tnl/t_context.c \ + $(MESABUILDDIR)tnl/t_eval_api.c \ + $(MESABUILDDIR)tnl/t_imm_alloc.c \ + $(MESABUILDDIR)tnl/t_imm_api.c \ + $(MESABUILDDIR)tnl/t_imm_debug.c \ + $(MESABUILDDIR)tnl/t_imm_dlist.c \ + $(MESABUILDDIR)tnl/t_imm_elt.c \ + $(MESABUILDDIR)tnl/t_imm_eval.c \ + $(MESABUILDDIR)tnl/t_imm_exec.c \ + $(MESABUILDDIR)tnl/t_imm_fixup.c \ + $(MESABUILDDIR)tnl/t_pipeline.c \ + $(MESABUILDDIR)tnl/t_vb_fog.c \ + $(MESABUILDDIR)tnl/t_vb_light.c \ + $(MESABUILDDIR)tnl/t_vb_normals.c \ + $(MESABUILDDIR)tnl/t_vb_points.c \ + $(MESABUILDDIR)tnl/t_vb_render.c \ + $(MESABUILDDIR)tnl/t_vb_texgen.c \ + $(MESABUILDDIR)tnl/t_vb_texmat.c \ + $(MESABUILDDIR)tnl/t_vb_vertex.c #ifdef NeedToLinkMesaSrc -LinkSourceFile(aatriangle.c, $(MESASRCDIR)/src) LinkSourceFile(accum.c, $(MESASRCDIR)/src) -LinkSourceFile(alpha.c, $(MESASRCDIR)/src) -LinkSourceFile(alphabuf.c, $(MESASRCDIR)/src) +LinkSourceFile(api_arrayelt.c, $(MESASRCDIR)/src) +LinkSourceFile(api_eval.c, $(MESASRCDIR)/src) +LinkSourceFile(api_loopback.c, $(MESASRCDIR)/src) +LinkSourceFile(api_noop.c, $(MESASRCDIR)/src) +LinkSourceFile(api_validate.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(convolve.c, $(MESASRCDIR)/src) +LinkSourceFile(debug.c, $(MESASRCDIR)/src) LinkSourceFile(depth.c, $(MESASRCDIR)/src) #ifdef NeedAllMesaSrc LinkSourceFile(dispatch.c, $(MESASRCDIR)/src) @@ -123,56 +172,32 @@ 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(histogram.c, $(MESASRCDIR)/src) LinkSourceFile(image.c, $(MESASRCDIR)/src) -LinkSourceFile(imaging.c, $(MESASRCDIR)/src) +LinkSourceFile(imports.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(texstore.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) +LinkSourceFile(vtxfmt.c, $(MESASRCDIR)/src) #endif #ifdef NeedAllMesaSrc @@ -182,25 +207,25 @@ GLTHREADOBJS = $(MESABUILDDIR)glthread.o #endif -COREMESAOBJS = $(MESABUILDDIR)aatriangle.o \ +COREMESABASEOBJS = \ $(MESABUILDDIR)accum.o \ - $(MESABUILDDIR)alpha.o \ - $(MESABUILDDIR)alphabuf.o \ + $(MESABUILDDIR)api_arrayelt.o \ + $(MESABUILDDIR)api_eval.o \ + $(MESABUILDDIR)api_loopback.o \ + $(MESABUILDDIR)api_noop.o \ + $(MESABUILDDIR)api_validate.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)convolve.o \ + $(MESABUILDDIR)debug.o \ $(MESABUILDDIR)depth.o \ - $(MESABUILDDIR)dlist.o \ $(DISPATCHOBJS) \ + $(MESABUILDDIR)dlist.o \ $(MESABUILDDIR)drawpix.o \ $(MESABUILDDIR)enable.o \ $(MESABUILDDIR)enums.o \ @@ -210,55 +235,38 @@ $(MESABUILDDIR)fog.o \ $(MESABUILDDIR)get.o \ $(GLAPIOBJS) \ - $(GLAPINOOPOBJS) \ $(GLTHREADOBJS) \ $(MESABUILDDIR)hash.o \ $(MESABUILDDIR)hint.o \ + $(MESABUILDDIR)histogram.o \ $(MESABUILDDIR)image.o \ - $(MESABUILDDIR)imaging.o \ + $(MESABUILDDIR)imports.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)texstore.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 + $(MESABUILDDIR)vtxfmt.o + +COREMESAOBJS = $(COREMESABASEOBJS) \ + $(MESA_AC_OBJS) \ + $(MESA_MATH_OBJS) \ + $(MESA_SWRAST_OBJS) \ + $(MESA_SWR_SETUP_OBJS) \ + $(MESA_TNL_OBJS) #ifdef NeedAllMesaSrc DISPATCHUOBJS = $(MESABUILDDIR)unshared/dispatch.o @@ -267,22 +275,22 @@ GLTHREADUOBJS = $(MESABUILDDIR)unshared/glthread.o #endif -COREMESAUOBJS = $(MESABUILDDIR)unshared/aatriangle.o \ - $(MESABUILDDIR)unshared/accum.o \ - $(MESABUILDDIR)unshared/alpha.o \ - $(MESABUILDDIR)unshared/alphabuf.o \ +#if defined(DoSharedLib) && DoSharedLib +COREMESABASEUOBJS = $(MESABUILDDIR)unshared/accum.o \ + $(MESABUILDDIR)unshared/api_arrayelt.o \ + $(MESABUILDDIR)unshared/api_eval.o \ + $(MESABUILDDIR)unshared/api_loopback.o \ + $(MESABUILDDIR)unshared/api_noop.o \ + $(MESABUILDDIR)unshared/api_validate.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/convolve.o \ + $(MESABUILDDIR)unshared/debug.o \ $(MESABUILDDIR)unshared/depth.o \ $(DISPATCHUOBJS) \ $(MESABUILDDIR)unshared/dlist.o \ @@ -295,55 +303,41 @@ $(MESABUILDDIR)unshared/fog.o \ $(MESABUILDDIR)unshared/get.o \ $(GLAPIUOBJS) \ - $(GLAPINOOPUOBJS) \ $(GLTHREADUOBJS) \ $(MESABUILDDIR)unshared/hash.o \ $(MESABUILDDIR)unshared/hint.o \ + $(MESABUILDDIR)unshared/histogram.o \ $(MESABUILDDIR)unshared/image.o \ - $(MESABUILDDIR)unshared/imaging.o \ + $(MESABUILDDIR)unshared/imports.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/texstore.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 + $(MESABUILDDIR)unshared/vtxfmt.o \ +#else +COREMESABASEUOBJS = $(COREMESABASEOBJS) +#endif + +COREMESAUOBJS = $(COREMESABASEUOBJS) \ + $(MESA_AC_UOBJS) \ + $(MESA_MATH_UOBJS) \ + $(MESA_SWRAST_UOBJS) \ + $(MESA_SWR_SETUP_UOBJS) \ + $(MESA_TNL_UOBJS) #ifdef NeedAllMesaSrc DISPATCHDOBJS = $(MESABUILDDIR)debugger/dispatch.o @@ -352,22 +346,21 @@ GLTHREADDOBJS = $(MESABUILDDIR)debugger/glthread.o #endif -COREMESADOBJS = $(MESABUILDDIR)debugger/aatriangle.o \ - $(MESABUILDDIR)debugger/unshared/accum.o \ - $(MESABUILDDIR)debugger/alpha.o \ - $(MESABUILDDIR)debugger/alphabuf.o \ +COREMESABASEDOBJS = $(MESABUILDDIR)debugger/accum.o \ + $(MESABUILDDIR)debugger/api_arrayelt.o \ + $(MESABUILDDIR)debugger/api_eval.o \ + $(MESABUILDDIR)debugger/api_loopback.o \ + $(MESABUILDDIR)debugger/api_noop.o \ + $(MESABUILDDIR)debugger/api_validate.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/convolve.o \ + $(MESABUILDDIR)debugger/debug.o \ $(MESABUILDDIR)debugger/depth.o \ $(DISPATCHDOBJS) \ $(MESABUILDDIR)debugger/dlist.o \ @@ -379,56 +372,39 @@ $(MESABUILDDIR)debugger/feedback.o \ $(MESABUILDDIR)debugger/fog.o \ $(MESABUILDDIR)debugger/get.o \ - $(GLAPIUOBJS) \ - $(GLAPINOOPUOBJS) \ - $(GLTHREADUOBJS) \ + $(GLAPIDOBJS) \ + $(GLTHREADDOBJS) \ $(MESABUILDDIR)debugger/hash.o \ $(MESABUILDDIR)debugger/hint.o \ + $(MESABUILDDIR)debugger/histogram.o \ $(MESABUILDDIR)debugger/image.o \ - $(MESABUILDDIR)debugger/imaging.o \ + $(MESABUILDDIR)debugger/imports.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/texstore.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 + $(MESABUILDDIR)debugger/vtxfmt.o \ + +COREMESADOBJS = $(COREMESABASEDOBJS) \ + $(MESA_AC_DOBJS) \ + $(MESA_MATH_DOBJS) \ + $(MESA_SWRAST_DOBJS) \ + $(MESA_SWR_SETUP_DOBJS) \ + $(MESA_TNL_DOBJS) #ifdef NeedAllMesaSrc DISPATCHPOBJS = $(MESABUILDDIR)profiled/dispatch.o @@ -437,22 +413,21 @@ GLTHREADPOBJS = $(MESABUILDDIR)profiled/glthread.o #endif -COREMESAPOBJS = $(MESABUILDDIR)profiled/aatriangle.o \ - $(MESABUILDDIR)profiled/unshared/accum.o \ - $(MESABUILDDIR)profiled/alpha.o \ - $(MESABUILDDIR)profiled/alphabuf.o \ +COREMESABASEPOBJS = $(MESABUILDDIR)profiled/accum.o \ + $(MESABUILDDIR)profiled/api_arrayelt.o \ + $(MESABUILDDIR)profiled/api_eval.o \ + $(MESABUILDDIR)profiled/api_loopback.o \ + $(MESABUILDDIR)profiled/api_noop.o \ + $(MESABUILDDIR)profiled/api_validate.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/convolve.o \ + $(MESABUILDDIR)profiled/debug.o \ $(MESABUILDDIR)profiled/depth.o \ $(DISPATCHPOBJS) \ $(MESABUILDDIR)profiled/dlist.o \ @@ -465,53 +440,36 @@ $(MESABUILDDIR)profiled/fog.o \ $(MESABUILDDIR)profiled/get.o \ $(GLAPIPOBJS) \ - $(GLAPINOOPPOBJS) \ $(GLTHREADPOBJS) \ $(MESABUILDDIR)profiled/hash.o \ $(MESABUILDDIR)profiled/hint.o \ + $(MESABUILDDIR)profiled/histogram.o \ $(MESABUILDDIR)profiled/image.o \ - $(MESABUILDDIR)profiled/imaging.o \ + $(MESABUILDDIR)profiled/imports.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/texstore.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 + $(MESABUILDDIR)profiled/vtxfmt.o \ + +COREMESAPOBJS = $(COREMESABASEPOBJS) \ + $(MESA_AC_POBJS) \ + $(MESA_MATH_POBJS) \ + $(MESA_SWRAST_POBJS) \ + $(MESA_SWR_SETUP_POBJS) \ + $(MESA_TNL_POBJS) Index: xc/lib/GL/mesa/src/OSmesa/Imakefile diff -u xc/lib/GL/mesa/src/OSmesa/Imakefile:1.11 xc/lib/GL/mesa/src/OSmesa/Imakefile:1.17 --- xc/lib/GL/mesa/src/OSmesa/Imakefile:1.11 Mon Jun 4 16:43:30 2001 +++ xc/lib/GL/mesa/src/OSmesa/Imakefile Wed Nov 27 13:28:02 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/OSmesa/Imakefile,v 1.11 2001/06/04 20:43:30 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/OSmesa/Imakefile,v 1.17 2002/11/27 18:28:02 tsi Exp $ #include @@ -8,10 +8,19 @@ #define DoDebugLib DebugLibGlx #define DoProfileLib ProfileLibGlx +#include "../array_cache/Imakefile.inc" +#include "../math/Imakefile.inc" +#include "../swrast/Imakefile.inc" +#include "../swrast_setup/Imakefile.inc" +#include "../tnl/Imakefile.inc" +#include "../tnl_dd/Imakefile.inc" #include "../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && !SystemV4 && MesaUseX86Asm #include "../X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../SPARC/Imakefile.inc" +#endif LinkSourceFile(osmesa.c, $(MESASRCDIR)/src/OSmesa) @@ -20,10 +29,11 @@ #endif MESA_INCLUDES = -I$(MESASRCDIR)/src/OSmesa -I$(MESASRCDIR)/src \ - -I$(MESASRCDIR)/include + -I$(MESASRCDIR)/include DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) - INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES) + INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) $(MESA_INCLUDES) \ + $(DRI_INCLUDES) -I$(GLXLIBSRC)/include MESAOBJS = $(COREMESAOBJS) $(MESA_ASM_OBJS) MESAUOBJS = $(COREMESAUOBJS) $(MESA_ASM_UOBJS) @@ -56,7 +66,7 @@ NormalLintTarget($(SRCS)) LIBNAME = OSMesa -SOREV = 3.3 +SOREV = 4.0 #if DoNormalLib Index: xc/lib/GL/mesa/src/OSmesa/OSMesa-def.cpp diff -u /dev/null xc/lib/GL/mesa/src/OSmesa/OSMesa-def.cpp:1.1 --- /dev/null Thu Feb 27 12:26:18 2003 +++ xc/lib/GL/mesa/src/OSmesa/OSMesa-def.cpp Sun Apr 7 11:19:45 2002 @@ -0,0 +1,25 @@ +LIBRARY libOSmesa +VERSION LIBRARY_VERSION +EXPORTS + OSMesaCreateContext + OSMesaDestroyContext + OSMesaGetColorBuffer + OSMesaGetCurrentContext + OSMesaGetDepthBuffer + OSMesaGetIntegerv + OSMesaMakeCurrent + OSMesaPixelStore + _glapi_Context + _glapi_noop_enable_warnings + _glapi_add_entrypoint + _glapi_get_dispatch_table_size + _glapi_set_dispatch + _glapi_check_multithread + _glapi_set_context + glTexCoordPointer + glColorPointer + glNormalPointer + glVertexPointer + glDrawElements + +/* $XFree86: xc/lib/GL/mesa/src/OSmesa/OSMesa-def.cpp,v 1.1 2002/04/07 15:19:45 alanh Exp $ */ Index: xc/lib/GL/mesa/src/OSmesa/OSmesa-def.cpp diff -u xc/lib/GL/mesa/src/OSmesa/OSmesa-def.cpp:1.1 xc/lib/GL/mesa/src/OSmesa/OSmesa-def.cpp:removed --- xc/lib/GL/mesa/src/OSmesa/OSmesa-def.cpp:1.1 Wed Aug 9 19:40:12 2000 +++ xc/lib/GL/mesa/src/OSmesa/OSmesa-def.cpp Thu Feb 27 12:26:18 2003 @@ -1,25 +0,0 @@ -LIBRARY libOSmesa -VERSION LIBRARY_VERSION -EXPORTS - OSMesaCreateContext - OSMesaDestroyContext - OSMesaGetColorBuffer - OSMesaGetCurrentContext - OSMesaGetDepthBuffer - OSMesaGetIntegerv - OSMesaMakeCurrent - OSMesaPixelStore - _glapi_Context - _glapi_noop_enable_warnings - _glapi_add_entrypoint - _glapi_get_dispatch_table_size - _glapi_set_dispatch - _glapi_check_multithread - _glapi_set_context - glTexCoordPointer - glColorPointer - glNormalPointer - glVertexPointer - glDrawElements - -/* $XFree86: xc/lib/GL/mesa/src/OSmesa/OSmesa-def.cpp,v 1.1 2000/08/09 23:40:12 dawes Exp $ */ Index: xc/lib/GL/mesa/src/SPARC/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/SPARC/Imakefile:1.3 --- /dev/null Thu Feb 27 12:26:18 2003 +++ xc/lib/GL/mesa/src/SPARC/Imakefile Fri Nov 22 17:55:58 2002 @@ -0,0 +1,57 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/SPARC/Imakefile,v 1.3 2002/11/22 22:55:58 tsi Exp $ + +/* + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. + */ + +#if BuildOSMesaLib || (BuildXF86DRI && (GlxDriverUsesMesa || GlxBuiltInXMesa)) +#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 + +#define MesaSPARCBuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" + + DEFINES = $(ALLOC_DEFINES) GlxDefines $(MESA_ASM_DEFINES) + INCLUDES = -I$(INCLUDESRC) -I$(EXTINCSRC) -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/SPARC \ + -I../../../include + + SRCS = $(MESA_ASM_SRCS) + OBJS = $(MESA_ASM_OBJS) + +#include + +LibraryObjectRule() + +STD_CPP_DEFINES = StandardDefines $(PROJECT_DEFINES) + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +ObjectFromAsmSource(xform, NullParameter) +ObjectFromAsmSource(clip, NullParameter) +ObjectFromAsmSource(norm, NullParameter) + +DependTarget() Index: xc/lib/GL/mesa/src/SPARC/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/SPARC/Imakefile.inc:1.2 --- /dev/null Thu Feb 27 12:26:18 2003 +++ xc/lib/GL/mesa/src/SPARC/Imakefile.inc Thu Nov 14 16:01:16 2002 @@ -0,0 +1,58 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/SPARC/Imakefile.inc,v 1.2 2002/11/14 21:01:16 tsi Exp $ + +#ifndef MesaSPARCBuildDir +#define MesaSPARCBuildDir $(GLXLIBSRC)/mesa/src/SPARC/ +#endif + +MESASPARCBUILDDIR = MesaSPARCBuildDir + +MESA_SPARC_SRCS = $(MESASPARCBUILDDIR)sparc.c \ + $(MESASPARCBUILDDIR)xform.S \ + $(MESASPARCBUILDDIR)clip.S + +#ifdef NeedToLinkMesaSrc +/* If $(MESASRCDIR)/src/SPARC isn't in the INCLUDES, it should be. */ +LinkSourceFile(sparc.c, $(MESASRCDIR)/src/SPARC) +LinkSourceFile(xform.S, $(MESASRCDIR)/src/SPARC) +LinkSourceFile(clip.S, $(MESASRCDIR)/src/SPARC) +LinkSourceFile(norm.S, $(MESASRCDIR)/src/SPARC) +#endif + +MESA_SPARC_OBJS = $(MESASPARCBUILDDIR)sparc.o \ + $(MESASPARCBUILDDIR)xform.o \ + $(MESASPARCBUILDDIR)clip.o \ + $(MESASPARCBUILDDIR)norm.o + +#if defined(DoSharedLib) && DoSharedLib +MESA_SPARC_UOBJS = $(MESASPARCBUILDDIR)unshared/sparc.o \ + $(MESASPARCBUILDDIR)xform.o \ + $(MESASPARCBUILDDIR)clip.o \ + $(MESASPARCBUILDDIR)norm.o +#else +MESA_SPARC_UOBJS = $(MESA_SPARC_OBJS) +#endif + +MESA_SPARC_DOBJS = $(MESASPARCBUILDDIR)debugger/sparc.o \ + $(MESASPARCBUILDDIR)xform.o \ + $(MESASPARCBUILDDIR)clip.o \ + $(MESASPARCBUILDDIR)norm.o + +MESA_SPARC_POBJS = $(MESAX86BUILDDIR)profiled/sparc.o \ + $(MESAX86BUILDDIR)xform.o \ + $(MESAX86BUILDDIR)clip.o \ + $(MESAX86BUILDDIR)norm.o + +MESA_SPARC_DEFS = -DUSE_SPARC_ASM + +MESA_ASM_SRCS = $(MESA_SPARC_SRCS) + +MESA_ASM_OBJS = $(MESA_SPARC_OBJS) + +MESA_ASM_UOBJS = $(MESA_SPARC_UOBJS) + +MESA_ASM_DOBJS = $(MESA_SPARC_DOBJS) + +MESA_ASM_POBJS = $(MESA_SPARC_POBJS) + +MESA_ASM_DEFINES = $(MESA_SPARC_DEFS) + Index: xc/lib/GL/mesa/src/X/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/X/Imakefile:1.13 --- /dev/null Thu Feb 27 12:26:18 2003 +++ xc/lib/GL/mesa/src/X/Imakefile Fri Nov 22 17:55:59 2002 @@ -0,0 +1,70 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/X/Imakefile,v 1.13 2002/11/22 22:55:59 tsi Exp $ + +#include + +/* + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. + */ + +#if BuildOSMesaLib || (BuildXF86DRI && (GlxDriverUsesMesa || GlxBuiltInXMesa)) +#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 + + +#define MesaXBuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I../../../dri -I../../../glx -I../../dri -I.. \ + -I$(INCLUDESRC)/GL -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/X \ + -I$(MESASRCDIR)/include \ + -I../../../include -I$(XINCLUDESRC) + + INCLUDES = $(MESA_INCLUDES) $(DRI_INCLUDES) + +#ifdef UseCompaqMathLibrary + MATHDEF = -DCCPML +#endif + +#if BuildXF86DRI && GlxBuiltInXMesa + XMESA_DEFINES = -DGLX_BUILT_IN_XMESA +#endif + + SRCS = $(XMESA_SRCS) + OBJS = $(XMESA_OBJS) + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MATHDEF) $(XMESA_DEFINES) + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(XMESA_OBJS)) +NormalLintTarget($(XMESA_SRCS)) + +DependTarget() Index: xc/lib/GL/mesa/src/X/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/X/Imakefile.inc:1.4 --- /dev/null Thu Feb 27 12:26:18 2003 +++ xc/lib/GL/mesa/src/X/Imakefile.inc Thu Nov 14 16:01:16 2002 @@ -0,0 +1,98 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/X/Imakefile.inc,v 1.4 2002/11/14 21:01:16 tsi Exp $ + +#ifndef MesaXBuildDir +#define MesaXBuildDir $(GLXLIBSRC)/mesa/src/X/ +#endif + +MESAXBUILDDIR = MesaXBuildDir + +#ifndef MesaInXServer +XMESA_GLX_SRCS = $(MESAXBUILDDIR)fakeglx.c \ + $(MESAXBUILDDIR)glxapi.c \ + $(MESAXBUILDDIR)realglx.c \ + $(MESAXBUILDDIR)xfonts.c +#endif + + XMESA_SRCS = $(XMESA_GLX_SRCS) \ + $(MESAXBUILDDIR)xm_api.c \ + $(MESAXBUILDDIR)xm_dd.c \ + $(MESAXBUILDDIR)xm_line.c \ + $(MESAXBUILDDIR)xm_span.c \ + $(MESAXBUILDDIR)xm_tri.c + +#ifdef NeedToLinkMesaSrc +#ifndef MesaInXServer +LinkSourceFile(fakeglx.c, $(MESASRCDIR)/src/X) +LinkSourceFile(glxapi.c, $(MESASRCDIR)/src/X) +LinkSourceFile(glxapi.h, $(MESASRCDIR)/src/X) +LinkSourceFile(realglx.c, $(MESASRCDIR)/src/X) +LinkSourceFile(xfonts.c, $(MESASRCDIR)/src/X) +#endif +LinkSourceFile(xm_api.c, $(MESASRCDIR)/src/X) +LinkSourceFile(xm_dd.c, $(MESASRCDIR)/src/X) +LinkSourceFile(xm_line.c, $(MESASRCDIR)/src/X) +LinkSourceFile(xm_span.c, $(MESASRCDIR)/src/X) +LinkSourceFile(xm_tri.c, $(MESASRCDIR)/src/X) +#endif + +#ifndef MesaInXServer +XMESA_GLX_OBJS = $(MESAXBUILDDIR)fakeglx.o \ + $(MESAXBUILDDIR)glxapi.o \ + $(MESAXBUILDDIR)realglx.o \ + $(MESAXBUILDDIR)xfonts.o +#endif + + XMESA_OBJS = $(XMESA_GLX_OBJS) \ + $(MESAXBUILDDIR)xm_api.o \ + $(MESAXBUILDDIR)xm_dd.o \ + $(MESAXBUILDDIR)xm_line.o \ + $(MESAXBUILDDIR)xm_span.o \ + $(MESAXBUILDDIR)xm_tri.o + +#if defined(DoSharedLib) && DoSharedLib +#ifndef MesaInXServer +XMESA_GLX_UOBJS = $(MESAXBUILDDIR)unshared/fakeglx.o \ + $(MESAXBUILDDIR)unshared/glxapi.o \ + $(MESAXBUILDDIR)unshared/realglx.o \ + $(MESAXBUILDDIR)unshared/xfonts.o +#endif + + XMESA_UOBJS = $(XMESA_GLX_UOBJS) \ + $(MESAXBUILDDIR)unshared/xm_api.o \ + $(MESAXBUILDDIR)unshared/xm_dd.o \ + $(MESAXBUILDDIR)unshared/xm_line.o \ + $(MESAXBUILDDIR)unshared/xm_span.o \ + $(MESAXBUILDDIR)unshared/xm_tri.o +#else +XMESA_GLX_UOBJS = $(XMESA_GLX_OBJS) + XMESA_UOBJS = $(XMESA_OBJS) +#endif + +#ifndef MesaInXServer +XMESA_GLX_DOBJS = $(MESAXBUILDDIR)debugger/fakeglx.o \ + $(MESAXBUILDDIR)debugger/glxapi.o \ + $(MESAXBUILDDIR)debugger/realglx.o \ + $(MESAXBUILDDIR)debugger/xfonts.o +#endif + + XMESA_DOBJS = $(XMESA_GLX_DOBJS) \ + $(MESAXBUILDDIR)debugger/xm_api.o \ + $(MESAXBUILDDIR)debugger/xm_dd.o \ + $(MESAXBUILDDIR)debugger/xm_line.o \ + $(MESAXBUILDDIR)debugger/xm_span.o \ + $(MESAXBUILDDIR)debugger/xm_tri.o + +#ifndef MesaInXServer +XMESA_GLX_POBJS = $(MESAXBUILDDIR)profiled/fakeglx.o \ + $(MESAXBUILDDIR)profiled/glxapi.o \ + $(MESAXBUILDDIR)profiled/realglx.o \ + $(MESAXBUILDDIR)profiled/xfonts.o +#endif + + XMESA_POBJS = $(XMESA_GLX_POBJS) \ + $(MESAXBUILDDIR)profiled/xm_api.o \ + $(MESAXBUILDDIR)profiled/xm_dd.o \ + $(MESAXBUILDDIR)profiled/xm_line.o \ + $(MESAXBUILDDIR)profiled/xm_span.o \ + $(MESAXBUILDDIR)profiled/xm_tri.o + Index: xc/lib/GL/mesa/src/X/xdri.c diff -u xc/lib/GL/mesa/src/X/xdri.c:1.1 xc/lib/GL/mesa/src/X/xdri.c:removed --- xc/lib/GL/mesa/src/X/xdri.c:1.1 Mon Dec 13 20:49:18 1999 +++ xc/lib/GL/mesa/src/X/xdri.c Thu Feb 27 12:26:18 2003 @@ -1,111 +0,0 @@ - -#if defined(GLX_DIRECT_RENDERING) - -/* Mesa includes - */ -#ifdef HAVE_CONFIG_H -#include "conf.h" -#endif - -#include "GL/xmesa.h" -#include "xmesaP.h" -#include "context.h" -#include "macros.h" -#include "matrix.h" -#include "types.h" - -/* Direct rendering includes - */ -#include "dri_mesaint.h" - - -void XMesaDriSwapBuffers( XMesaBuffer b ) -{ - __DRIdrawablePrivate *pdp = b->driDrawPriv; - __DRIscreenPrivate *psp = pdp->driScreenPriv; - drmContext hHWContext = pdp->driContextPriv->hHWContext; - - /* - ** Grab the lock and make sure drawable info is still - ** up to date. - */ - DRM_LIGHT_LOCK(psp->fd, &psp->pSAREA->lock, hHWContext); - XMESA_VALIDATE_DRAWABLE_INFO(b->display, psp, pdp); - - /* Copy back image to front buffer */ - if (pdp->numClipRects) { - int numClipRects = pdp->numClipRects; - XF86DRIClipRectPtr pRect = pdp->pClipRects; - int y; - GLbyte *s8, *d8; - GLuint *s32, *d32; - - while (numClipRects--) { - int w = pRect->x2-pRect->x1; - - switch (psp->fbBPP) { - case 8: - for (y = pRect->y1; y < pRect->y2; y++) { - s8 = (GLbyte *)b->backimage->data + - y*b->backimage->bytes_per_line + - pRect->x1; - d8 = (GLbyte *)psp->pFB + psp->fbOrigin + - (pdp->y + y)*psp->fbStride + - pdp->x + pRect->x1; - memcpy(d8, s8, w); - } - break; - case 15: - case 16: - break; - case 24: - break; - case 32: - for (y = pRect->y1; y < pRect->y2; y++) { - /* These are calculated in GLbytes */ - s8 = (GLbyte *)b->backimage->data + - (y - pdp->y)*b->backimage->bytes_per_line; - d8 = (GLbyte *)psp->pFB + psp->fbOrigin + - y*psp->fbStride; - s32 = (GLuint *)s8; - d32 = (GLuint *)d8; - /* These are calculated in GLuints */ - s32 += (pRect->x1 - pdp->x); - d32 += pRect->x1; - memcpy(d32, s32, w<<2); - } - break; - } - - pRect++; - } - } - /* Unlock the screen */ - DRM_UNLOCK(psp->fd, &psp->pSAREA->lock, hHWContext); -} - - - -/* - * Initialize the XMesa driver. - */ -GLboolean XMesaInitDriver( __DRIscreenPrivate *driScrnPriv ) -{ - return GL_TRUE; -} - -/* - * Reset the XMesa driver when the X server resets. - */ -void XMesaResetDriver( __DRIscreenPrivate *driScrnPriv ) -{ -} - -#else - -extern void i_hate_these_stupid_dummy_functions(); -void i_hate_these_stupid_dummy_functions() -{ -} - -#endif Index: xc/lib/GL/mesa/src/X/xdriP.h diff -u xc/lib/GL/mesa/src/X/xdriP.h:1.1 xc/lib/GL/mesa/src/X/xdriP.h:removed --- xc/lib/GL/mesa/src/X/xdriP.h:1.1 Mon Dec 13 20:49:18 1999 +++ xc/lib/GL/mesa/src/X/xdriP.h Thu Feb 27 12:26:18 2003 @@ -1,37 +0,0 @@ -#ifndef _XDRI_P_H -#define _XDRI_P_H - -/* Direct rendering includes - */ -#include "dri_mesaint.h" - - -/* - * Direct rendering macros: - */ -#define XMESA_VALIDATE_DRAWABLE_INFO(dpy, psp, pdp) \ -do { \ - while (*(pdp->pStamp) != pdp->lastStamp) { \ - DRM_UNLOCK(psp->fd, &psp->pSAREA->lock, \ - pdp->driContextPriv->hHWContext); \ - \ - DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ - DRI_MESA_VALIDATE_DRAWABLE_INFO(dpy, psp->myNum, pdp); \ - DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ - \ - DRM_LIGHT_LOCK(psp->fd, &psp->pSAREA->lock, \ - pdp->driContextPriv->hHWContext); \ - } \ -} while (0) - - - -#define DRI_DRAWABLE_ARG , __DRIdrawablePrivate *driDrawPriv -#define DRI_DRAWABLE_PARM , driDrawPriv - -#define DRI_CTX_ARG , __DRIcontextPrivate *driContextPriv - - -extern void XMesaDriSwapBuffers( XMesaBuffer b ); - -#endif Index: xc/lib/GL/mesa/src/X86/Imakefile diff -u xc/lib/GL/mesa/src/X86/Imakefile:1.18 xc/lib/GL/mesa/src/X86/Imakefile:1.24 --- xc/lib/GL/mesa/src/X86/Imakefile:1.18 Wed May 2 11:06:03 2001 +++ xc/lib/GL/mesa/src/X86/Imakefile Mon Nov 25 07:58:55 2002 @@ -1,12 +1,16 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.18 2001/05/02 15:06:03 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile,v 1.24 2002/11/25 12:58:55 tsi Exp $ /* - * Only need SharedLib build unless OSMesa lib is built, or driver is built - * in to libGL + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. */ -#if BuildXF86DRI && !GlxUseSGISI && \ - (GlxUseBuiltInDRIDriver || \ - !GlxBuiltInMesa || !defined(GlxDriverUsesMesa)) + +#if GlxDriverUsesMesa || GlxBuiltInXMesa || BuildOSMesaLib #define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) #define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) #define DoExtraLib SharedLibGlx @@ -20,6 +24,7 @@ #define DoProfileLib NO #endif + #if Malloc0ReturnsNull ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL #endif @@ -30,9 +35,10 @@ DEFINES = $(ALLOC_DEFINES) GlxDefines $(MESA_ASM_DEFINES) INCLUDES = -I$(INCLUDESRC) -I$(EXTINCSRC) -I$(MESASRCDIR)/src \ - -I$(MESASRCDIR)/src/X86 + -I$(MESASRCDIR)/src/X86 \ + -I../../../include - SRCS = $(MESA_ASM_SRCS) + SRCS = $(MESA_ASM_SRCS) gen_matypes.c OBJS = $(MESA_ASM_OBJS) #include @@ -48,41 +54,48 @@ ObjectFromAsmSource(x86_cliptest, NullParameter) ObjectFromAsmSource(x86_vertex, NullParameter) -ObjectFromAsmSource(x86_xform_masked2, NullParameter) -ObjectFromAsmSource(x86_xform_masked3, NullParameter) -ObjectFromAsmSource(x86_xform_masked4, NullParameter) -ObjectFromAsmSource(x86_xform_raw2, NullParameter) -ObjectFromAsmSource(x86_xform_raw3, NullParameter) -ObjectFromAsmSource(x86_xform_raw4, NullParameter) +ObjectFromAsmSource(x86_xform2, NullParameter) +ObjectFromAsmSource(x86_xform3, NullParameter) +ObjectFromAsmSource(x86_xform4, NullParameter) #if MesaUseMMX ObjectFromAsmSource(mmx_blend, NullParameter) #endif #if MesaUse3DNow -ObjectFromAsmSource(3dnow_norm_raw, NullParameter) +ObjectFromAsmSource(3dnow_normal, NullParameter) ObjectFromAsmSource(3dnow_vertex, NullParameter) -ObjectFromAsmSource(3dnow_xform_masked1, NullParameter) -ObjectFromAsmSource(3dnow_xform_masked2, NullParameter) -ObjectFromAsmSource(3dnow_xform_masked3, NullParameter) -ObjectFromAsmSource(3dnow_xform_masked4, NullParameter) -ObjectFromAsmSource(3dnow_xform_raw1, NullParameter) -ObjectFromAsmSource(3dnow_xform_raw2, NullParameter) -ObjectFromAsmSource(3dnow_xform_raw3, NullParameter) -ObjectFromAsmSource(3dnow_xform_raw4, NullParameter) +ObjectFromAsmSource(3dnow_xform1, NullParameter) +ObjectFromAsmSource(3dnow_xform2, NullParameter) +ObjectFromAsmSource(3dnow_xform3, NullParameter) +ObjectFromAsmSource(3dnow_xform4, NullParameter) #endif -#if MesaUseKatmai -ObjectFromAsmSource(katmai_norm_raw, NullParameter) -ObjectFromAsmSource(katmai_vertex, NullParameter) -ObjectFromAsmSource(katmai_xform_masked1, NullParameter) -ObjectFromAsmSource(katmai_xform_masked2, NullParameter) -ObjectFromAsmSource(katmai_xform_masked3, NullParameter) -ObjectFromAsmSource(katmai_xform_masked4, NullParameter) -ObjectFromAsmSource(katmai_xform_raw1, NullParameter) -ObjectFromAsmSource(katmai_xform_raw2, NullParameter) -ObjectFromAsmSource(katmai_xform_raw3, NullParameter) -ObjectFromAsmSource(katmai_xform_raw4, NullParameter) +#if MesaUseSSE +ObjectFromAsmSource(sse_normal, NullParameter) +ObjectFromAsmSource(sse_vertex, NullParameter) +ObjectFromAsmSource(sse_xform1, NullParameter) +ObjectFromAsmSource(sse_xform2, NullParameter) +ObjectFromAsmSource(sse_xform3, NullParameter) +ObjectFromAsmSource(sse_xform4, NullParameter) #endif + +LinkSourceFile(gen_matypes.c, $(MESASRCDIR)/src/X86) + +MATYPES = ./gen_matypes + +matypes.h: gen_matypes.c + RemoveFiles($@ HostProgramTargetName(gen_matypes)) + -HostLinkRule(HostProgramTargetName(gen_matypes),$(CFLAGS) $(LOCAL_LDFLAGS),gen_matypes.c,$(LDLIBS)) + RunProgram(MATYPES,> matypes_h) + $(MV) matypes_h $@ + RemoveFiles(HostProgramTargetName(gen_matypes)) + +includes:: matypes.h + +depend:: matypes.h + +clean:: + RemoveFiles(matypes.h HostProgramTargetName(gen_matypes)) DependTarget() Index: xc/lib/GL/mesa/src/X86/Imakefile.inc diff -u xc/lib/GL/mesa/src/X86/Imakefile.inc:1.2 xc/lib/GL/mesa/src/X86/Imakefile.inc:1.6 --- xc/lib/GL/mesa/src/X86/Imakefile.inc:1.2 Wed May 2 11:06:03 2001 +++ xc/lib/GL/mesa/src/X86/Imakefile.inc Mon Nov 25 07:58:55 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/X86/Imakefile.inc,v 1.6 2002/11/25 12:58:55 tsi Exp $ #ifndef MesaX86BuildDir #define MesaX86BuildDir $(GLXLIBSRC)/mesa/src/X86/ @@ -12,12 +12,9 @@ $(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 + $(MESAX86BUILDDIR)x86_xform2.S \ + $(MESAX86BUILDDIR)x86_xform3.S \ + $(MESAX86BUILDDIR)x86_xform4.S #ifdef NeedToLinkMesaSrc LinkSourceFile(common_x86.c, $(MESASRCDIR)/src/X86) @@ -26,12 +23,9 @@ 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) +LinkSourceFile(x86_xform2.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_xform3.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(x86_xform4.S, $(MESASRCDIR)/src/X86) #endif MESA_X86_OBJS = $(MESAX86BUILDDIR)common_x86.o \ @@ -39,25 +33,19 @@ $(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 + $(MESAX86BUILDDIR)x86_xform2.o \ + $(MESAX86BUILDDIR)x86_xform3.o \ + $(MESAX86BUILDDIR)x86_xform4.o -#if DoSharedLib +#if defined(DoSharedLib) && 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 + $(MESAX86BUILDDIR)x86_xform2.o \ + $(MESAX86BUILDDIR)x86_xform3.o \ + $(MESAX86BUILDDIR)x86_xform4.o #else MESA_X86_UOBJS = $(MESA_X86_OBJS) #endif @@ -67,24 +55,18 @@ $(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 + $(MESAX86BUILDDIR)x86_xform2.o \ + $(MESAX86BUILDDIR)x86_xform3.o \ + $(MESAX86BUILDDIR)x86_xform4.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 + $(MESAX86BUILDDIR)x86_xform2.o \ + $(MESAX86BUILDDIR)x86_xform3.o \ + $(MESAX86BUILDDIR)x86_xform4.o MESA_X86_DEFS = -DUSE_X86_ASM @@ -107,181 +89,133 @@ #if MesaUse3DNow MESA_3DNOW_SRCS = $(MESAX86BUILDDIR)3dnow.c \ - $(MESAX86BUILDDIR)3dnow_norm_raw.S \ + $(MESAX86BUILDDIR)3dnow_normal.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 + $(MESAX86BUILDDIR)3dnow_xform1.S \ + $(MESAX86BUILDDIR)3dnow_xform2.S \ + $(MESAX86BUILDDIR)3dnow_xform3.S \ + $(MESAX86BUILDDIR)3dnow_xform4.S #ifdef NeedToLinkMesaSrc LinkSourceFile(3dnow.c, $(MESASRCDIR)/src/X86) -LinkSourceFile(3dnow_norm_raw.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_normal.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(3dnow_xform1.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform2.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform3.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(3dnow_xform4.S, $(MESASRCDIR)/src/X86) #endif MESA_3DNOW_OBJS = $(MESAX86BUILDDIR)3dnow.o \ - $(MESAX86BUILDDIR)3dnow_norm_raw.o \ + $(MESAX86BUILDDIR)3dnow_normal.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 + $(MESAX86BUILDDIR)3dnow_xform1.o \ + $(MESAX86BUILDDIR)3dnow_xform2.o \ + $(MESAX86BUILDDIR)3dnow_xform3.o \ + $(MESAX86BUILDDIR)3dnow_xform4.o -#ifdef DoSharedLib +#if defined(DoSharedLib) && DoSharedLib MESA_3DNOW_UOBJS = $(MESAX86BUILDDIR)unshared/3dnow.o \ - $(MESAX86BUILDDIR)3dnow_norm_raw.o \ + $(MESAX86BUILDDIR)3dnow_normal.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 + $(MESAX86BUILDDIR)3dnow_xform1.o \ + $(MESAX86BUILDDIR)3dnow_xform2.o \ + $(MESAX86BUILDDIR)3dnow_xform3.o \ + $(MESAX86BUILDDIR)3dnow_xform4.o #else MESA_3DNOW_UOBJS = $(MESA_3DNOW_OBJS) #endif MESA_3DNOW_DOBJS = $(MESAX86BUILDDIR)debugger/3dnow.o \ - $(MESAX86BUILDDIR)3dnow_norm_raw.o \ + $(MESAX86BUILDDIR)3dnow_normal.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 + $(MESAX86BUILDDIR)3dnow_xform1.o \ + $(MESAX86BUILDDIR)3dnow_xform2.o \ + $(MESAX86BUILDDIR)3dnow_xform3.o \ + $(MESAX86BUILDDIR)3dnow_xform4.o MESA_3DNOW_POBJS = $(MESAX86BUILDDIR)profiled/3dnow.o \ - $(MESAX86BUILDDIR)3dnow_norm_raw.o \ + $(MESAX86BUILDDIR)3dnow_normal.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 + $(MESAX86BUILDDIR)3dnow_xform1.o \ + $(MESAX86BUILDDIR)3dnow_xform2.o \ + $(MESAX86BUILDDIR)3dnow_xform3.o \ + $(MESAX86BUILDDIR)3dnow_xform4.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 +#if MesaUseSSE +MESA_SSE_SRCS = $(MESAX86BUILDDIR)sse.c \ + $(MESAX86BUILDDIR)sse_normal.S \ + $(MESAX86BUILDDIR)sse_vertex.S \ + $(MESAX86BUILDDIR)sse_xform1.S \ + $(MESAX86BUILDDIR)sse_xform2.S \ + $(MESAX86BUILDDIR)sse_xform3.S \ + $(MESAX86BUILDDIR)sse_xform4.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 +LinkSourceFile(sse.c, $(MESASRCDIR)/src/X86) +LinkSourceFile(sse_normal.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(sse_vertex.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(sse_xform1.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(sse_xform2.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(sse_xform3.S, $(MESASRCDIR)/src/X86) +LinkSourceFile(sse_xform4.S, $(MESASRCDIR)/src/X86) +#endif + +MESA_SSE_OBJS = $(MESAX86BUILDDIR)sse.o \ + $(MESAX86BUILDDIR)sse_normal.o \ + $(MESAX86BUILDDIR)sse_vertex.o \ + $(MESAX86BUILDDIR)sse_xform1.o \ + $(MESAX86BUILDDIR)sse_xform2.o \ + $(MESAX86BUILDDIR)sse_xform3.o \ + $(MESAX86BUILDDIR)sse_xform4.o + +#if defined(DoSharedLib) && DoSharedLib +MESA_SSE_UOBJS = $(MESAX86BUILDDIR)unshared/sse.o \ + $(MESAX86BUILDDIR)sse_normal.o \ + $(MESAX86BUILDDIR)sse_vertex.o \ + $(MESAX86BUILDDIR)sse_xform1.o \ + $(MESAX86BUILDDIR)sse_xform2.o \ + $(MESAX86BUILDDIR)sse_xform3.o \ + $(MESAX86BUILDDIR)sse_xform4.o #else -MESA_KATMAI_UOBJS = $(MESA_KATMAI_OBJS) +MESA_SSE_UOBJS = $(MESA_SSE_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_SSE_DOBJS = $(MESAX86BUILDDIR)debugger/sse.o \ + $(MESAX86BUILDDIR)sse_normal.o \ + $(MESAX86BUILDDIR)sse_vertex.o \ + $(MESAX86BUILDDIR)sse_xform1.o \ + $(MESAX86BUILDDIR)sse_xform2.o \ + $(MESAX86BUILDDIR)sse_xform3.o \ + $(MESAX86BUILDDIR)sse_xform4.o + +MESA_SSE_POBJS = $(MESAX86BUILDDIR)profiled/sse.o \ + $(MESAX86BUILDDIR)sse_normal.o \ + $(MESAX86BUILDDIR)sse_vertex.o \ + $(MESAX86BUILDDIR)sse_xform1.o \ + $(MESAX86BUILDDIR)sse_xform2.o \ + $(MESAX86BUILDDIR)sse_xform3.o \ + $(MESAX86BUILDDIR)sse_xform4.o -MESA_KATMAI_DEFS = -DUSE_KATMAI_ASM +MESA_SSE_DEFS = -DUSE_SSE_ASM #endif MESA_ASM_SRCS = $(MESA_X86_SRCS) $(MESA_MMX_SRCS) $(MESA_3DNOW_SRCS) \ - $(MESA_KATMAI_SRCS) + $(MESA_SSE_SRCS) MESA_ASM_OBJS = $(MESA_X86_OBJS) $(MESA_MMX_OBJS) $(MESA_3DNOW_OBJS) \ - $(MESA_KATMAI_OBJS) + $(MESA_SSE_OBJS) MESA_ASM_UOBJS = $(MESA_X86_UOBJS) $(MESA_MMX_UOBJS) $(MESA_3DNOW_UOBJS) \ - $(MESA_KATMAI_UOBJS) + $(MESA_SSE_UOBJS) MESA_ASM_DOBJS = $(MESA_X86_DOBJS) $(MESA_MMX_DOBJS) $(MESA_3DNOW_DOBJS) \ - $(MESA_KATMAI_DOBJS) + $(MESA_SSE_DOBJS) MESA_ASM_POBJS = $(MESA_X86_POBJS) $(MESA_MMX_POBJS) $(MESA_3DNOW_POBJS) \ - $(MESA_KATMAI_POBJS) + $(MESA_SSE_POBJS) -MESA_ASM_DEFINES = -DUSE_X86_ASM $(MESA_MMX_DEFS) $(MESA_3DNOW_DEFS) $(MESA_KATMAI_DEFS) +MESA_ASM_DEFINES = $(MESA_X86_DEFS) $(MESA_MMX_DEFS) $(MESA_3DNOW_DEFS) $(MESA_SSE_DEFS) Index: xc/lib/GL/mesa/src/array_cache/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/array_cache/Imakefile:1.9 --- /dev/null Thu Feb 27 12:26:19 2003 +++ xc/lib/GL/mesa/src/array_cache/Imakefile Mon Nov 25 09:04:50 2002 @@ -0,0 +1,89 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/array_cache/Imakefile,v 1.9 2002/11/25 14:04:50 eich Exp $ + +#include + +/* + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. + */ + +#if BuildOSMesaLib || (BuildXF86DRI && (GlxDriverUsesMesa || GlxBuiltInXMesa)) +#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 + + +#define MesaACBuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I../../../dri -I../../../glx -I../../dri -I../../../include \ + -I$(INCLUDESRC)/GL -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/array_cache \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/include \ + -I../../../include -I$(XINCLUDESRC) + + INCLUDES = $(MESA_INCLUDES) $(DRI_INCLUDES) + SRCS = $(MESA_AC_SRCS) + OBJS = $(MESA_AC_OBJS) + + +#if defined(i386Architecture) && MesaUseX86Asm + ASM_SRCS = + ASM_OBJS = +#if MesaUseMMX + MMX_DEFS = -DUSE_MMX_ASM +#endif +#if MesaUse3DNow + 3DNOW_DEFS = -DUSE_3DNOW_ASM +#endif +#if MesaUseSSE + SSE_DEFS = -DUSE_SSE_ASM +#endif + ASM_DEFS = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(SSE_DEFS) +#endif + +#ifdef SparcArchitecture + ASM_SRCS = + ASM_OBJS = + ASM_DEFS = -DUSE_SPARC_ASM +#endif + +#ifdef UseCompaqMathLibrary + MATHDEF = -DCCPML +#endif + + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFS) $(MATHDEF) + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +DependTarget() Index: xc/lib/GL/mesa/src/array_cache/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/array_cache/Imakefile.inc:1.2 --- /dev/null Thu Feb 27 12:26:19 2003 +++ xc/lib/GL/mesa/src/array_cache/Imakefile.inc Thu Nov 14 16:01:16 2002 @@ -0,0 +1,32 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/array_cache/Imakefile.inc,v 1.2 2002/11/14 21:01:16 tsi Exp $ + +#ifndef MesaACBuildDir +#define MesaACBuildDir $(GLXLIBSRC)/mesa/src/array_cache/ +#endif + +MESAACBUILDDIR = MesaACBuildDir + + MESA_AC_SRCS = $(MESAACBUILDDIR)ac_context.c \ + $(MESAACBUILDDIR)ac_import.c + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(ac_context.c, $(MESASRCDIR)/src/array_cache) +LinkSourceFile(ac_import.c, $(MESASRCDIR)/src/array_cache) +#endif + + MESA_AC_OBJS = $(MESAACBUILDDIR)ac_context.o \ + $(MESAACBUILDDIR)ac_import.o + +#if defined(DoSharedLib) && DoSharedLib + MESA_AC_UOBJS = $(MESAACBUILDDIR)unshared/ac_context.o \ + $(MESAACBUILDDIR)unshared/ac_import.o +#else + MESA_AC_UOBJS = $(MESA_AC_OBJS) +#endif + + MESA_AC_DOBJS = $(MESAACBUILDDIR)debugger/ac_context.o \ + $(MESAACBUILDDIR)debugger/ac_import.o + + MESA_AC_POBJS = $(MESAACBUILDDIR)profiled/ac_context.o \ + $(MESAACBUILDDIR)profiled/ac_import.o + Index: xc/lib/GL/mesa/src/drv/common/mm.c diff -u xc/lib/GL/mesa/src/drv/common/mm.c:1.3 xc/lib/GL/mesa/src/drv/common/mm.c:1.4 --- xc/lib/GL/mesa/src/drv/common/mm.c:1.3 Fri Aug 17 22:51:03 2001 +++ xc/lib/GL/mesa/src/drv/common/mm.c Wed Oct 30 07:51:27 2002 @@ -21,7 +21,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/common/mm.c,v 1.3 2001/08/18 02:51:03 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/common/mm.c,v 1.4 2002/10/30 12:51:27 alanh Exp $ */ #include #include @@ -29,27 +29,27 @@ #include "mm.h" #include "hwlog.h" -#define ISFREE(bptr) ((bptr)->free) -/* #define PRINTF hwMsg(1, */ -#define PRINTF fprintf(stderr, +/* KW: I don't know who the author of this code is, but it wasn't me + * despite what the copyright says... + */ void mmDumpMemInfo( memHeap_t *heap ) { - TMemBlock *p; + TMemBlock *p; - PRINTF "Memory heap %p:\n", heap); - if (heap == 0) { - PRINTF " heap == 0\n"); - } else { - p = (TMemBlock *)heap; - while (p) { - PRINTF " Offset:%08x, Size:%08x, %c%c\n",p->ofs,p->size, - p->free ? '.':'U', - p->reserved ? 'R':'.'); - p = p->next; - } - } - PRINTF "End of memory blocks\n"); + fprintf(stderr, "Memory heap %p:\n", heap); + if (heap == 0) { + fprintf(stderr, " heap == 0\n"); + } else { + p = (TMemBlock *)heap; + while (p) { + fprintf(stderr, " Offset:%08x, Size:%08x, %c%c\n",p->ofs,p->size, + p->free ? '.':'U', + p->reserved ? 'R':'.'); + p = p->next; + } + } + fprintf(stderr, "End of memory blocks\n"); } memHeap_t *mmInit(int ofs, @@ -70,197 +70,131 @@ return 0; } -/* Kludgey workaround for existing i810 server. Remove soon. - */ -memHeap_t *mmAddRange( memHeap_t *heap, - int ofs, - int size ) -{ - PMemBlock blocks; - blocks = (TMemBlock *) calloc(2,sizeof(TMemBlock)); - if (blocks) { - blocks[0].size = size; - blocks[0].free = 1; - blocks[0].ofs = ofs; - blocks[0].next = &blocks[1]; - - /* Discontinuity - stops JoinBlock from trying to join non-adjacent - * ranges. - */ - blocks[1].size = 0; - blocks[1].free = 0; - blocks[1].ofs = ofs+size; - blocks[1].next = (PMemBlock) heap; - return (memHeap_t *)blocks; - } - else - return heap; -} static TMemBlock* SliceBlock(TMemBlock *p, int startofs, int size, int reserved, int alignment) { - TMemBlock *newblock; + TMemBlock *newblock; + + /* break left */ + if (startofs > p->ofs) { + newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock)); + if (!newblock) + return NULL; + newblock->ofs = startofs; + newblock->size = p->size - (startofs - p->ofs); + newblock->free = 1; + newblock->next = p->next; + p->size -= newblock->size; + p->next = newblock; + p = newblock; + } - /* break left */ - if (startofs > p->ofs) { - newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock)); - if (!newblock) - return NULL; - newblock->ofs = startofs; - newblock->size = p->size - (startofs - p->ofs); - newblock->free = 1; - newblock->next = p->next; - p->size -= newblock->size; - p->next = newblock; - p = newblock; - } - - /* break right */ - if (size < p->size) { - newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock)); - if (!newblock) - return NULL; - newblock->ofs = startofs + size; - newblock->size = p->size - size; - newblock->free = 1; - newblock->next = p->next; - p->size = size; - p->next = newblock; - } - - /* p = middle block */ - p->align = alignment; - p->free = 0; - p->reserved = reserved; - return p; + /* break right */ + if (size < p->size) { + newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock)); + if (!newblock) + return NULL; + newblock->ofs = startofs + size; + newblock->size = p->size - size; + newblock->free = 1; + newblock->next = p->next; + p->size = size; + p->next = newblock; + } + + /* p = middle block */ + p->align = alignment; + p->free = 0; + p->reserved = reserved; + return p; } PMemBlock mmAllocMem( memHeap_t *heap, int size, int align2, int startSearch) { - int mask,startofs,endofs; - TMemBlock *p; + int mask,startofs,endofs; + TMemBlock *p; - if (!heap || align2 < 0 || size <= 0) - return NULL; - mask = (1 << align2)-1; - startofs = 0; - p = (TMemBlock *)heap; - while (p) { - if (ISFREE(p)) { - startofs = (p->ofs + mask) & ~mask; - if ( startofs < startSearch ) { - startofs = startSearch; + if (!heap || align2 < 0 || size <= 0) + return NULL; + mask = (1 << align2)-1; + startofs = 0; + p = (TMemBlock *)heap; + while (p) { + if ((p)->free) { + startofs = (p->ofs + mask) & ~mask; + if ( startofs < startSearch ) { + startofs = startSearch; + } + endofs = startofs+size; + if (endofs <= (p->ofs+p->size)) + break; } - endofs = startofs+size; - if (endofs <= (p->ofs+p->size)) - break; - } - p = p->next; - } - if (!p) - return NULL; - p = SliceBlock(p,startofs,size,0,mask+1); - p->heap = heap; - return p; + p = p->next; + } + if (!p) + return NULL; + p = SliceBlock(p,startofs,size,0,mask+1); + p->heap = heap; + return p; } static __inline__ int Join2Blocks(TMemBlock *p) { - if (p->free && p->next && p->next->free) { - TMemBlock *q = p->next; - p->size += q->size; - p->next = q->next; - free(q); - return 1; - } - return 0; + if (p->free && p->next && p->next->free) { + TMemBlock *q = p->next; + p->size += q->size; + p->next = q->next; + free(q); + return 1; + } + return 0; } int mmFreeMem(PMemBlock b) { - TMemBlock *p,*prev; + TMemBlock *p,*prev; - if (!b) - return 0; - if (!b->heap) { - fprintf(stderr, "no heap\n"); - return -1; - } - p = b->heap; - prev = NULL; - while (p && p != b) { - prev = p; - p = p->next; - } - if (!p || p->free || p->reserved) { - if (!p) - fprintf(stderr, "block not found in heap\n"); - else if (p->free) - fprintf(stderr, "block already free\n"); - else - fprintf(stderr, "block is reserved\n"); - return -1; - } - p->free = 1; - Join2Blocks(p); - if (prev) - Join2Blocks(prev); - return 0; -} - -int mmReserveMem(memHeap_t *heap, int offset,int size) -{ - int endofs; - TMemBlock *p; - - if (!heap || size <= 0) - return -1; - endofs = offset+size; - p = (TMemBlock *)heap; - while (p && p->ofs <= offset) { - if (ISFREE(p) && endofs <= (p->ofs+p->size)) { - SliceBlock(p,offset,size,1,1); + if (!b) return 0; - } - p = p->next; - } - return -1; -} - -int mmFreeReserved(memHeap_t *heap, int offset) -{ - TMemBlock *p,*prev; - - if (!heap) - return -1; - p = (TMemBlock *)heap; - prev = NULL; - while (p && p->ofs != offset) { - prev = p; - p = p->next; - } - if (!p || !p->reserved) - return -1; - p->free = 1; - p->reserved = 0; - Join2Blocks(p); - if (prev) - Join2Blocks(prev); - return 0; + if (!b->heap) { + fprintf(stderr, "no heap\n"); + return -1; + } + p = b->heap; + prev = NULL; + while (p && p != b) { + prev = p; + p = p->next; + } + if (!p || p->free || p->reserved) { + if (!p) + fprintf(stderr, "block not found in heap\n"); + else if (p->free) + fprintf(stderr, "block already free\n"); + else + fprintf(stderr, "block is reserved\n"); + return -1; + } + p->free = 1; + Join2Blocks(p); + if (prev) + Join2Blocks(prev); + return 0; } + void mmDestroy(memHeap_t *heap) { - TMemBlock *p,*q; + TMemBlock *p,*q; - if (!heap) - return; - p = (TMemBlock *)heap; - while (p) { - q = p->next; - free(p); - p = q; - } + if (!heap) + return; + p = (TMemBlock *)heap; + while (p) { + q = p->next; + free(p); + p = q; + } } Index: xc/lib/GL/mesa/src/drv/common/mm.h diff -u xc/lib/GL/mesa/src/drv/common/mm.h:1.1 xc/lib/GL/mesa/src/drv/common/mm.h:1.2 --- xc/lib/GL/mesa/src/drv/common/mm.h:1.1 Fri Feb 11 12:25:26 2000 +++ xc/lib/GL/mesa/src/drv/common/mm.h Wed Oct 30 07:51:27 2002 @@ -45,22 +45,12 @@ static __inline__ int mmOffset(PMemBlock b) { return b->ofs; } -static __inline__ void mmMarkReserved(PMemBlock b) -{ b->reserved = 1; } - /* * input: total size in bytes * return: a heap pointer if OK, NULL if error */ memHeap_t *mmInit( int ofs, int size ); - - -memHeap_t *mmAddRange( memHeap_t *heap, - int ofs, - int size ); - - /* * Allocate 'size' bytes with 2^align2 bytes alignment, * restrict the search to free memory after 'startSearch' @@ -71,7 +61,8 @@ * startSearch = linear offset from start of heap to begin search * return: pointer to the allocated block, 0 if error */ -PMemBlock mmAllocMem( memHeap_t *heap, int size, int align2, int startSearch ); +PMemBlock mmAllocMem( memHeap_t *heap, int size, int align2, + int startSearch ); /* * Free block starts at offset @@ -79,16 +70,6 @@ * return: 0 if OK, -1 if error */ int mmFreeMem( PMemBlock b ); - -/* - * Reserve 'size' bytes block start at offset - * This is used to prevent allocation of memory already used - * by the X server for the front buffer, pixmaps, and cursor - * input: size, offset - * output: 0 if OK, -1 if error - */ -int mmReserveMem( memHeap_t *heap, int offset,int size ); -int mmFreeReserved( memHeap_t *heap, int offset ); /* * destroy MM Index: xc/lib/GL/mesa/src/drv/common/shared_texture_lru.c diff -u xc/lib/GL/mesa/src/drv/common/shared_texture_lru.c:1.1 xc/lib/GL/mesa/src/drv/common/shared_texture_lru.c:removed --- xc/lib/GL/mesa/src/drv/common/shared_texture_lru.c:1.1 Fri Jun 16 20:02:54 2000 +++ xc/lib/GL/mesa/src/drv/common/shared_texture_lru.c Thu Feb 27 12:26:19 2003 @@ -1,88 +0,0 @@ -#include -#include "shared_texture_lru.h" - -/* (Re)initialize the global circular LRU list. The last element - * in the array (heap->nrRegions) is the sentinal. Keeping it - * at the end of the array allows the other elements of the array - * to be addressed rationally when looking up objects at a - * particular location in texture memory. - */ -static void resetGlobalLRU( driHeapPtr heap ) -{ - driTexRegion *list = heap->shared->list; - int sz = 1 << heap->logGranularity; - int i; - - heap->localAge = ++heap->shared->texAge; - - for (i = 0 ; (i+1) * sz <= heap->size ; i++) { - list[i].prev = i-1; - list[i].next = i+1; - list[i].age = heap->shared->texAge; - } - - i--; - list[0].prev = heap->nrRegions; - list[i].prev = i-1; - list[i].next = heap->nrRegions; - list[heap->nrRegions].prev = i; - list[heap->nrRegions].next = 0; -} - -/* Called by the client whenever it touches a local texture. - */ -void driUpdateHeap( driHeapPtr heap, int start, int end ) -{ - driTexRegion *list = heap->shared->list; - int i; - - heap->localAge = ++heap->shared->globalAge; - - for (i = start ; i <= end ; i++) - { - list[i].in_use = 1; - list[i].age = heap->localAge; - - /* remove_from_list(i) - */ - 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 = heap->nrRegions; - list[i].next = list[heap->nrRegions].next; - list[(unsigned)list[heap->nrRegions].next].prev = i; - list[heap->nrRegions].next = i; - } -} - - -/* Called by the client on lock contention to determine whether - * textures have been stolen - */ -void driAgeTextures( driHeapPtr heap ) -{ - driTexRegion *list = heap->shared->list; - int sz = 1 << (heap->logGranularity); - int i, nr = 0; - - /* Have to go right round from the back to ensure stuff ends up - * LRU in the local list... Fix with a cursor pointer. - */ - for (i = list[heap->nrRegions].prev ; - i != heap->nrRegions && nr < heap->nrRegions ; - i = list[i].prev, nr++) - { - if (list[i].age > heap->localAge) - heap->texturesGone( heap->driverContext, heap->heapId, i * sz, sz, 1); - } - - /* Loop or uninitialized heap detected. Reset. - */ - if (nr == heap->nrRegions) { - heap->texturesGone( heap->driverContext, heap->heapId, 0, heap->size, 0); - resetGlobalLRU( heap ); - } -} - Index: xc/lib/GL/mesa/src/drv/common/shared_texture_lru.h diff -u xc/lib/GL/mesa/src/drv/common/shared_texture_lru.h:1.1 xc/lib/GL/mesa/src/drv/common/shared_texture_lru.h:removed --- xc/lib/GL/mesa/src/drv/common/shared_texture_lru.h:1.1 Fri Jun 16 20:02:54 2000 +++ xc/lib/GL/mesa/src/drv/common/shared_texture_lru.h Thu Feb 27 12:26:19 2003 @@ -1,76 +0,0 @@ -#ifndef DRI_TEX_HEAP_H -#define DRI_TEX_HEAP_H - - -/* Private struct. - */ -typedef struct { - unsigned char next, prev; /* indices to form a circular LRU */ - unsigned char in_use; /* owned by a client, or free? */ - int age; /* tracked by clients to update local LRU's */ -} driTexRegion; - - -/* This is the global part of the shared texture mechanism. - * - * Do not use this struct directly - declare an equivalent one with a - * larger list[] array, tuned to suit your application. - * - * Your expanded struct should be placed in the driver-specific - * portion of the sarea. - */ -struct { - int globalAge; - driTexRegion list[1]; /* drivers will want to define a larger list */ -} driGlobalList; - - -/* This is the client-private part of the mechanism. - * - * Clients will place one or more of these structs in their driver - * context struct to manage one or more global texture heaps. All - * fields except print_local_lru must be filled in. - */ -struct dri_tex_heap_t { - - int heapId; /* client-supplied identifier */ - void *driverContext; /* pointer to the client's context private */ - int size; /* heap size in bytes */ - int logGranularity; /* log base 2 of size of single heap region */ - int nrRegions; /* number of elements in global list */ - driGlobalList *shared; /* pointer to sarea driGlobalList struct */ - int localAge; /* initialize to zero */ - - /* Callback to the client to let it know a region of texture - * space has changed age. The client must integrate this - * information with its local texture knowledge, in particular - * checking whether any of its own textures have been - * invalidated. - */ - void (*textures_gone)( void *driverContext, - int heapId, - int offset, - int size, - int inUse ); - - /* Optional hook for debugging. - */ - void (*print_local_lru)( void *driverContext, - int heapId ); -} driTexHeap; - - -#define DRI_AGE_TEXTURES( heap ) \ - if ((heap)->localAge > (heap)->shared->globalAge) \ - driAgeTextures( heap ); - - -/* This should be called whenever there has been contention on the - * hardware lock. Clients can shortcircuit this slightly by using - * DRI_AGE_TEXTURES, above. - */ -void driAgeTextures( driTexHeap *heap ); - -#endif - - Index: xc/lib/GL/mesa/src/drv/common/spantmp.h diff -u xc/lib/GL/mesa/src/drv/common/spantmp.h:1.3 xc/lib/GL/mesa/src/drv/common/spantmp.h:1.4 --- xc/lib/GL/mesa/src/drv/common/spantmp.h:1.3 Wed Mar 21 11:14:20 2001 +++ xc/lib/GL/mesa/src/drv/common/spantmp.h Fri Feb 22 16:32:57 2002 @@ -140,8 +140,9 @@ } -static void TAG(WriteMonoRGBASpan)( const GLcontext *ctx, - GLuint n, GLint x, GLint y, +static void TAG(WriteMonoRGBASpan)( const GLcontext *ctx, + GLuint n, GLint x, GLint y, + const GLchan color[4], const GLubyte mask[] ) { HW_WRITE_LOCK() @@ -149,7 +150,7 @@ GLint x1; GLint n1; LOCAL_VARS; - INIT_MONO_PIXEL(p); + INIT_MONO_PIXEL(p, color); y = Y_FLIP( y ); @@ -172,13 +173,14 @@ static void TAG(WriteMonoRGBAPixels)( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], - const GLubyte mask[] ) + const GLchan color[], + const GLubyte mask[] ) { HW_WRITE_LOCK() { GLint i; LOCAL_VARS; - INIT_MONO_PIXEL(p); + INIT_MONO_PIXEL(p, color); if (DBG) fprintf(stderr, "WriteMonoRGBAPixels\n"); Index: xc/lib/GL/mesa/src/drv/ffb/Imakefile diff -u xc/lib/GL/mesa/src/drv/ffb/Imakefile:1.12 xc/lib/GL/mesa/src/drv/ffb/Imakefile:1.17 --- xc/lib/GL/mesa/src/drv/ffb/Imakefile:1.12 Thu May 10 12:56:10 2001 +++ xc/lib/GL/mesa/src/drv/ffb/Imakefile Mon Nov 25 09:04:50 2002 @@ -1,8 +1,7 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile,v 1.12 2001/05/10 16:56:10 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile,v 1.17 2002/11/25 14:04:50 eich Exp $ #include - #if GlxUseBuiltInDRIDriver #define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) #define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) @@ -19,36 +18,62 @@ #include "../common/Imakefile.inc" #include "Imakefile.inc" +#include "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" #include "../../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #include "../../X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../../SPARC/Imakefile.inc" +#endif DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) - INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) \ + -I$(XF86DRIVERSRC)/sunffb - DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ - $(GLXLIBSRC)/dri/dri_tmm.o + DRIOBJS = $(GLXLIBSRC)/dri/dri_util.o 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 + HISRCS = ../../../../highpc.c + + LOOBJS = ../../../../lowpc.o + HIOBJS = ../../../../highpc.o +#endif - SRCS = $(FFBSRCS) - OBJS = $(FFBOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) + SRCS = $(FFBSRCS) + OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(COMMONOBJS) $(FFBOBJS) $(HIOBJS) -REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) #include + +LibraryObjectRule() -SubdirLibraryRule($(OBJS)) +SubdirLibraryRule($(FFBOBJS)) NormalLintTarget($(SRCS)) #if !GlxUseBuiltInDRIDriver LIBNAME = ffb_dri.so SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) + +#ifdef GlxSoProf +SOPROF_LIBNAME = _ffb_dri_p +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) +InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) +#endif #endif DependTarget() Index: xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc diff -u xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc:1.2 xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc:1.4 --- xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc:1.2 Wed May 2 11:06:03 2001 +++ xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc Tue Feb 26 18:37:33 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/ffb/Imakefile.inc,v 1.4 2002/02/26 23:37:33 tsi Exp $ #ifndef MesaDrvSrcDir #define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv @@ -16,98 +16,112 @@ #endif #if BuildXF86DRI - DRI_DEFINES = GlxDefines - DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ - -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ - -I$(GLXLIBSRC)/mesa/dri \ + DRI_DEFINES = GlxDefines -DX_BYTE_ORDER=ByteOrder + DRI_INCLUDES = -I$(GLXLIBSRC)/dri \ + -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) \ + -I$(INCLUDESRC)/GL \ -I$(SERVERSRC)/GL/dri \ -I$(XF86OSSRC) \ - -I$(XF86DRIVERSRC)/sunffb \ - -I$(GLXLIBSRC)/dri/drm + -I$(XF86DRIVERSRC)/ati \ + -I$(XF86COMSRC) \ + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/include #endif -MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ +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 \ + FFBSRCS = $(MESADRVFFBBUILDDIR)ffb_bitmap.c \ $(MESADRVFFBBUILDDIR)ffb_clear.c \ - $(MESADRVFFBBUILDDIR)ffb_vb.c \ + $(MESADRVFFBBUILDDIR)ffb_dd.c \ + $(MESADRVFFBBUILDDIR)ffb_depth.c \ + /* $(MESADRVFFBBUILDDIR)ffb_fog.c */ \ $(MESADRVFFBBUILDDIR)ffb_lines.c \ $(MESADRVFFBBUILDDIR)ffb_points.c \ - $(MESADRVFFBBUILDDIR)ffb_tris.c \ - $(MESADRVFFBBUILDDIR)ffb_pipeline.c \ + $(MESADRVFFBBUILDDIR)ffb_span.c \ + $(MESADRVFFBBUILDDIR)ffb_state.c \ $(MESADRVFFBBUILDDIR)ffb_stencil.c \ + $(MESADRVFFBBUILDDIR)ffb_tex.c \ + $(MESADRVFFBBUILDDIR)ffb_tris.c \ + $(MESADRVFFBBUILDDIR)ffb_vb.c \ $(MESADRVFFBBUILDDIR)ffb_xmesa.c - FFBOBJS = $(MESADRVFFBBUILDDIR)ffb_dd.o \ - $(MESADRVFFBBUILDDIR)ffb_span.o \ - $(MESADRVFFBBUILDDIR)ffb_depth.o \ - $(MESADRVFFBBUILDDIR)ffb_state.o \ + FFBOBJS = $(MESADRVFFBBUILDDIR)ffb_bitmap.o \ $(MESADRVFFBBUILDDIR)ffb_clear.o \ - $(MESADRVFFBBUILDDIR)ffb_vb.o \ + $(MESADRVFFBBUILDDIR)ffb_dd.o \ + $(MESADRVFFBBUILDDIR)ffb_depth.o \ + /* $(MESADRVFFBBUILDDIR)ffb_fog.o */ \ $(MESADRVFFBBUILDDIR)ffb_lines.o \ $(MESADRVFFBBUILDDIR)ffb_points.o \ - $(MESADRVFFBBUILDDIR)ffb_tris.o \ - $(MESADRVFFBBUILDDIR)ffb_pipeline.o \ + $(MESADRVFFBBUILDDIR)ffb_span.o \ + $(MESADRVFFBBUILDDIR)ffb_state.o \ $(MESADRVFFBBUILDDIR)ffb_stencil.o \ + $(MESADRVFFBBUILDDIR)ffb_tex.o \ + $(MESADRVFFBBUILDDIR)ffb_tris.o \ + $(MESADRVFFBBUILDDIR)ffb_vb.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 \ + FFBUOBJS = $(MESADRVFFBBUILDDIR)unshared/ffb_bitmap.o \ $(MESADRVFFBBUILDDIR)unshared/ffb_clear.o \ - $(MESADRVFFBBUILDDIR)unshared/ffb_vb.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_dd.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_depth.o \ + /* $(MESADRVFFBBUILDDIR)unshared/ffb_fog.o */ \ $(MESADRVFFBBUILDDIR)unshared/ffb_lines.o \ $(MESADRVFFBBUILDDIR)unshared/ffb_points.o \ - $(MESADRVFFBBUILDDIR)unshared/ffb_tris.o \ - $(MESADRVFFBBUILDDIR)unshared/ffb_pipeline.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_span.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_state.o \ $(MESADRVFFBBUILDDIR)unshared/ffb_stencil.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_tex.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_tris.o \ + $(MESADRVFFBBUILDDIR)unshared/ffb_vb.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 \ + FFBDOBJS = $(MESADRVFFBBUILDDIR)debugger/ffb_bitmap.o \ $(MESADRVFFBBUILDDIR)debugger/ffb_clear.o \ - $(MESADRVFFBBUILDDIR)debugger/ffb_vb.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_dd.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_depth.o \ + /* $(MESADRVFFBBUILDDIR)debugger/ffb_fog.o */ \ $(MESADRVFFBBUILDDIR)debugger/ffb_lines.o \ $(MESADRVFFBBUILDDIR)debugger/ffb_points.o \ - $(MESADRVFFBBUILDDIR)debugger/ffb_tris.o \ - $(MESADRVFFBBUILDDIR)debugger/ffb_pipeline.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_span.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_state.o \ $(MESADRVFFBBUILDDIR)debugger/ffb_stencil.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_tex.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_tris.o \ + $(MESADRVFFBBUILDDIR)debugger/ffb_vb.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 \ + FFBPOBJS = $(MESADRVFFBBUILDDIR)profiled/ffb_bitmap.o \ $(MESADRVFFBBUILDDIR)profiled/ffb_clear.o \ - $(MESADRVFFBBUILDDIR)profiled/ffb_vb.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_dd.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_depth.o \ + /* $(MESADRVFFBBUILDDIR)profiled/ffb_fog.o */ \ $(MESADRVFFBBUILDDIR)profiled/ffb_lines.o \ $(MESADRVFFBBUILDDIR)profiled/ffb_points.o \ - $(MESADRVFFBBUILDDIR)profiled/ffb_tris.o \ - $(MESADRVFFBBUILDDIR)profiled/ffb_pipeline.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_span.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_state.o \ $(MESADRVFFBBUILDDIR)profiled/ffb_stencil.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_tex.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_tris.o \ + $(MESADRVFFBBUILDDIR)profiled/ffb_vb.o \ $(MESADRVFFBBUILDDIR)profiled/ffb_xmesa.o #ifdef NeedToLinkMesaSrc +LinkSourceFile(ffb_bitmap.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_clear.c, $(MESADRVSRCDIR)/ffb) 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_fog.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_span.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_state.c, $(MESADRVSRCDIR)/ffb) LinkSourceFile(ffb_stencil.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_tex.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_tris.c, $(MESADRVSRCDIR)/ffb) +LinkSourceFile(ffb_vb.c, $(MESADRVSRCDIR)/ffb) LinkSourceFile(ffb_xmesa.c, $(MESADRVSRCDIR)/ffb) #endif - Index: xc/lib/GL/mesa/src/drv/ffb/ffb_bitmap.c diff -u /dev/null xc/lib/GL/mesa/src/drv/ffb/ffb_bitmap.c:1.1 --- /dev/null Thu Feb 27 12:26:19 2003 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_bitmap.c Fri Feb 22 16:32:58 2002 @@ -0,0 +1,156 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_bitmap.c,v 1.1 2002/02/22 21:32:58 dawes Exp $ + * + * GLX Hardware Device Driver for Sun Creator/Creator3D + * Copyright (C) 2001 David S. Miller + * + * 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 + * 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. + * + * + * David S. Miller + */ + +#include "ffb_context.h" +#include "ffb_state.h" +#include "ffb_lock.h" +#include "ffb_bitmap.h" +#include "swrast/swrast.h" +#include "image.h" +#include "macros.h" + +#undef FFB_BITMAP_TRACE + +static void +ffb_bitmap(GLcontext *ctx, GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + ffb_fbcPtr ffb = fmesa->regs; + __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + unsigned int ppc, pixel; + GLint row, col, row_stride; + const GLubyte *src; + char *buf; + + if (fmesa->bad_fragment_attrs != 0) + _swrast_Bitmap(ctx, px, py, width, + height, unpack, bitmap); + + pixel = (((((GLuint)(ctx->Current.RasterColor[0] * 255.0f)) & 0xff) << 0) | + ((((GLuint)(ctx->Current.RasterColor[1] * 255.0f)) & 0xff) << 8) | + ((((GLuint)(ctx->Current.RasterColor[2] * 255.0f)) & 0xff) << 16) | + ((((GLuint)(ctx->Current.RasterColor[3] * 255.0f)) & 0xff) << 24)); + +#ifdef FFB_BITMAP_TRACE + fprintf(stderr, "ffb_bitmap: ppc(%08x) fbc(%08x) cmp(%08x) pixel(%08x)\n", + fmesa->ppc, fmesa->fbc, fmesa->cmp, pixel); +#endif + + LOCK_HARDWARE(fmesa); + fmesa->hw_locked = 1; + + if (fmesa->state_dirty) + ffbSyncHardware(fmesa); + + ppc = fmesa->ppc; + + FFBFifo(fmesa, 4); + ffb->ppc = ((ppc & + ~(FFB_PPC_TBE_MASK | FFB_PPC_ZS_MASK | FFB_PPC_CS_MASK | FFB_PPC_XS_MASK)) + | (FFB_PPC_TBE_TRANSPARENT | FFB_PPC_ZS_CONST | FFB_PPC_CS_CONST | + (ctx->Color.BlendEnabled ? FFB_PPC_XS_CONST : FFB_PPC_XS_WID))); + ffb->constz = ((GLuint) (ctx->Current.RasterPos[2] * 0x0fffffff)); + ffb->fg = pixel; + ffb->fontinc = (0 << 16) | 32; + + buf = (char *)(fmesa->sfb32 + (dPriv->x << 2) + (dPriv->y << 13)); + + row_stride = (unpack->Alignment * CEILING(width, 8 * unpack->Alignment)); + src = (const GLubyte *) (bitmap + + (unpack->SkipRows * row_stride) + + (unpack->SkipPixels / 8)); + if (unpack->LsbFirst == GL_TRUE) { + for (row = 0; row < height; row++, src += row_stride) { + const GLubyte *row_src = src; + GLuint base_x, base_y; + + base_x = dPriv->x + px; + base_y = dPriv->y + (dPriv->h - (py + row)); + + FFBFifo(fmesa, 1); + ffb->fontxy = (base_y << 16) | base_x; + + for (col = 0; col < width; col += 32, row_src += 4) { + GLint bitnum, font_w = (width - col); + GLuint font_data; + + if (font_w > 32) + font_w = 32; + font_data = 0; + for (bitnum = 0; bitnum < 32; bitnum++) { + const GLubyte val = row_src[bitnum >> 3]; + + if (val & (1 << (bitnum & (8 - 1)))) + font_data |= (1 << (31 - bitnum)); + } + + FFBFifo(fmesa, 2); + ffb->fontw = font_w; + ffb->font = font_data; + } + } + } else { + for (row = 0; row < height; row++, src += row_stride) { + const GLubyte *row_src = src; + GLuint base_x, base_y; + + base_x = dPriv->x + px; + base_y = dPriv->y + (dPriv->h - (py + row)); + + FFBFifo(fmesa, 1); + ffb->fontxy = (base_y << 16) | base_x; + + for (col = 0; col < width; col += 32, row_src += 4) { + GLint font_w = (width - col); + + if (font_w > 32) + font_w = 32; + FFBFifo(fmesa, 2); + ffb->fontw = font_w; + ffb->font = (((unsigned int)row_src[0]) << 24 | + ((unsigned int)row_src[1]) << 16 | + ((unsigned int)row_src[2]) << 8 | + ((unsigned int)row_src[3]) << 0); + } + } + } + + FFBFifo(fmesa, 1); + ffb->ppc = ppc; + fmesa->ffbScreen->rp_active = 1; + + UNLOCK_HARDWARE(fmesa); + fmesa->hw_locked = 0; +} + +void ffbDDInitBitmapFuncs(GLcontext *ctx) +{ + ctx->Driver.Bitmap = ffb_bitmap; +} Index: xc/lib/GL/mesa/src/drv/ffb/ffb_bitmap.h diff -u /dev/null xc/lib/GL/mesa/src/drv/ffb/ffb_bitmap.h:1.1 --- /dev/null Thu Feb 27 12:26:19 2003 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_bitmap.h Fri Feb 22 16:32:58 2002 @@ -0,0 +1,8 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_bitmap.h,v 1.1 2002/02/22 21:32:58 dawes Exp $ */ + +#ifndef _FFB_BITMAP_H +#define _FFB_BITMAP_H + +extern void ffbDDInitBitmapFuncs(GLcontext *); + +#endif /* !(_FFB_BITMAP_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_clear.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_clear.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_clear.c:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_clear.c:1.1 Tue Jun 20 01:08:37 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_clear.c Fri Feb 22 16:32:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_clear.c,v 1.1 2000/06/20 05:08:37 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_clear.c,v 1.2 2002/02/22 21:32:58 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller @@ -25,8 +25,8 @@ * David S. Miller */ -#include "types.h" -#include "vbrender.h" +#include "mtypes.h" +#include "extensions.h" #include "mm.h" #include "ffb_dd.h" @@ -37,10 +37,9 @@ #include "ffb_tris.h" #include "ffb_clear.h" #include "ffb_lock.h" -#include "extensions.h" -#include "vb.h" -#include "dd.h" +#undef CLEAR_TRACE + #define BOX_AREA(__w, __h) ((int)(__w) * (int)(__h)) /* Compute the page aligned box for a page mode fast fill. @@ -263,13 +262,18 @@ } } -GLbitfield ffbDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cwidth, GLint cheight) +void ffbDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cwidth, GLint cheight) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = fmesa->driDrawable; unsigned int stcmask = DD_STENCIL_BIT; +#ifdef CLEAR_TRACE + fprintf(stderr, "ffbDDClear: mask(%08x) all(%d) " + "[x(%x)y(%x)w(%x)h(%x)]\n", + mask, (int) all, cx, cy, cwidth, cheight); +#endif if (!(fmesa->ffb_sarea->flags & FFB_DRI_FFB2PLUS)) stcmask = 0; @@ -344,5 +348,7 @@ DD_DEPTH_BIT | stcmask); } - return mask; + if (mask) + _swrast_Clear(ctx, mask, all, cx, cy, cwidth, cheight); } + Index: xc/lib/GL/mesa/src/drv/ffb/ffb_clear.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_clear.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_clear.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_clear.h:1.1 Tue Jun 20 01:08:38 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_clear.h Fri Feb 22 16:32:58 2002 @@ -1,9 +1,9 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_clear.h,v 1.1 2000/06/20 05:08:38 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_clear.h,v 1.2 2002/02/22 21:32:58 dawes Exp $ */ #ifndef _FFB_CLEAR_H #define _FFB_CLEAR_H -extern GLbitfield ffbDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cwidth, GLint cheight); +extern void ffbDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cwidth, GLint cheight); #endif /* !(_FFB_CLEAR_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_context.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_context.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_context.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_context.h:1.1 Tue Jun 20 01:08:38 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_context.h Fri Feb 22 16:32:58 2002 @@ -1,47 +1,157 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_context.h,v 1.2 2002/02/22 21:32:58 dawes Exp $ */ + #ifndef _FFB_CONTEXT_H #define _FFB_CONTEXT_H #include -#include "dri_mesaint.h" -#include "dri_mesa.h" +#include "dri_util.h" -#include "types.h" +#include "mtypes.h" #include "ffb_xmesa.h" +typedef struct { + GLfloat alpha; + GLfloat red; + GLfloat green; + GLfloat blue; +} ffb_color; + +#define FFB_GET_ALPHA(VTX) \ + FFB_COLOR_FROM_FLOAT((VTX)->color[0].alpha) +#define FFB_GET_RED(VTX) \ + FFB_COLOR_FROM_FLOAT((VTX)->color[0].red) +#define FFB_GET_GREEN(VTX) \ + FFB_COLOR_FROM_FLOAT((VTX)->color[0].green) +#define FFB_GET_BLUE(VTX) \ + FFB_COLOR_FROM_FLOAT((VTX)->color[0].blue) + +typedef struct { + GLfloat x, y, z; + ffb_color color[2]; +} ffb_vertex; + +#define FFB_DELAYED_VIEWPORT_VARS \ + GLfloat VP_SX = fmesa->hw_viewport[MAT_SX]; \ + GLfloat VP_TX = fmesa->hw_viewport[MAT_TX]; \ + GLfloat VP_SY = fmesa->hw_viewport[MAT_SY]; \ + GLfloat VP_TY = fmesa->hw_viewport[MAT_TY]; \ + GLfloat VP_SZ = fmesa->hw_viewport[MAT_SZ]; \ + GLfloat VP_TZ = fmesa->hw_viewport[MAT_TZ]; \ + (void) VP_SX; (void) VP_SY; (void) VP_SZ; \ + (void) VP_TX; (void) VP_TY; (void) VP_TZ + +#define FFB_GET_Z(VTX) \ + FFB_Z_FROM_FLOAT(VP_SZ * (VTX)->z + VP_TZ) +#define FFB_GET_Y(VTX) \ + FFB_XY_FROM_FLOAT(VP_SY * (VTX)->y + VP_TY) +#define FFB_GET_X(VTX) \ + FFB_XY_FROM_FLOAT(VP_SX * (VTX)->x + VP_TX) + +typedef void (*ffb_point_func)(GLcontext *, ffb_vertex *); +typedef void (*ffb_line_func)(GLcontext *, ffb_vertex *, ffb_vertex *); +typedef void (*ffb_tri_func)(GLcontext *, ffb_vertex *, ffb_vertex *, + ffb_vertex *); +typedef void (*ffb_quad_func)(GLcontext *, ffb_vertex *, ffb_vertex *, + ffb_vertex *, ffb_vertex *); + +/* Immediate mode fast-path support. */ +typedef struct { + GLfloat obj[4]; + GLfloat normal[4]; + GLfloat clip[4]; + GLuint mask; + GLfloat color[4]; + GLfloat win[4]; + GLfloat eye[4]; +} ffbTnlVertex, *ffbTnlVertexPtr; + +typedef void (*ffb_interp_func)(GLfloat t, + ffbTnlVertex *O, + const ffbTnlVertex *I, + const ffbTnlVertex *J); + +struct ffb_current_state { + GLfloat color[4]; + GLfloat normal[4]; + GLfloat specular[4]; +}; + +struct ffb_light_state { + GLfloat base_color[3]; + GLfloat base_alpha; +}; + +struct ffb_vertex_state { + struct ffb_current_state current; + struct ffb_light_state light; +}; + +struct ffb_imm_vertex { + ffbTnlVertex vertices[8]; + ffbTnlVertex *v0; + ffbTnlVertex *v1; + ffbTnlVertex *v2; + ffbTnlVertex *v3; + + void (*save_vertex)(GLcontext *ctx, ffbTnlVertex *v); + void (*flush_vertex)(GLcontext *ctx, ffbTnlVertex *v); + + ffb_interp_func interp; + + GLuint prim, format; + + GLvertexformat vtxfmt; +}; + typedef struct ffb_context_t { GLcontext *glCtx; - GLuint MonoColor; GLframebuffer *glBuffer; + /* Temporaries for translating to float colors. */ + struct gl_client_array FloatColor; + struct gl_client_array FloatSecondaryColor; + ffb_fbcPtr regs; volatile char *sfb32; int hw_locked; - int SWrender; int back_buffer; /* 0 = bufferA, 1 = bufferB */ - /* Because MESA does not send us the raw primitives, - * we send everything to the chip as independant lines, - * points, tris, and quads. If we could get the real - * primitive being used by the user, we can optimize - * things a lot. This is particularly useful for - * tri strips/fans, and quad strips/fans as FFB - * specifically can optimize these cases. - * - * I suspect MESA does not preserve things to make it's - * transformation/clip/cull optimizations simpler. - * - * Anyways, to try and get around this, we record the - * vertices used in the most recent primitive and we - * detect tri strips/fans and quad strips/fans this - * way. Actually, we only need to record the ffb_vertex - * pointers, and this makes the tests cheaper and the - * flushing faster (at VB updates and reduced primitive - * changes). - */ - void *vtx_cache[4]; + /* Viewport matrix. */ + GLfloat hw_viewport[16]; +#define SUBPIXEL_X (-0.5F) +#define SUBPIXEL_Y (-0.5F + 0.125) + + /* Vertices in driver format. */ + ffb_vertex *verts; + + /* Rasterization functions. */ + ffb_point_func draw_point; + ffb_line_func draw_line; + ffb_tri_func draw_tri; + ffb_quad_func draw_quad; + + GLenum raster_primitive; + GLenum render_primitive; + + GLfloat backface_sign; + GLfloat depth_scale; + + GLfloat ffb_2_30_fixed_scale; + GLfloat ffb_one_over_2_30_fixed_scale; + GLfloat ffb_16_16_fixed_scale; + GLfloat ffb_one_over_16_16_fixed_scale; + GLfloat ffb_ubyte_color_scale; + GLfloat ffb_zero; + + /* Immediate mode state. */ + struct ffb_vertex_state vtx_state; + struct ffb_imm_vertex imm; + + /* Debugging knobs. */ + GLboolean debugFallbacks; /* This records state bits when a per-fragment attribute has * been set which prevents us from rendering in hardware. @@ -56,6 +166,8 @@ #define FFB_BADATTR_BLENDROP 0x00000004 /* Blend enabled and LogicOP != GL_COPY */ #define FFB_BADATTR_BLENDEQN 0x00000008 /* Blend equation other than ADD */ #define FFB_BADATTR_STENCIL 0x00000010 /* Stencil enabled when < FFB2+ */ +#define FFB_BADATTR_TEXTURE 0x00000020 /* Texture enabled */ +#define FFB_BADATTR_SWONLY 0x00000040 /* Environment var set */ unsigned int state_dirty; unsigned int state_fifo_ents; @@ -84,6 +196,13 @@ unsigned int state_all_fifo_ents; +#define FFB_MAKE_DIRTY(FMESA, STATE_MASK, FIFO_ENTS) \ +do { if ((STATE_MASK) & ~((FMESA)->state_dirty)) { \ + (FMESA)->state_dirty |= (STATE_MASK); \ + (FMESA)->state_fifo_ents += FIFO_ENTS; \ + } \ +} while (0) + /* General hw reg state. */ unsigned int fbc; unsigned int ppc; @@ -92,7 +211,7 @@ unsigned int lpat; #define FFB_LPAT_BAD 0xffffffff - + unsigned int wid; unsigned int pmask; unsigned int xpmask; @@ -157,13 +276,8 @@ unsigned int clear_stencil; unsigned int setupindex; - unsigned int setupdone; - - /* Rendering functions. */ - points_func PointsFunc; - line_func LineFunc; - triangle_func TriangleFunc; - quad_func QuadFunc; + unsigned int setupnewinputs; + unsigned int new_gl_state; __DRIdrawablePrivate *driDrawable; __DRIscreenPrivate *driScreen; @@ -192,6 +306,6 @@ * we tell the hw to discard those top 4 bits). */ #define Z_TO_MESA(VAL) ((GLdepth)(((VAL) & 0x0fffffff) << (32 - 28))) -#define Z_FROM_MESA(VAL) (((GLuint)(VAL)) >> (32 - 28)) +#define Z_FROM_MESA(VAL) (((GLuint)((GLdouble)(VAL))) >> (32 - 28)) #endif /* !(_FFB_CONTEXT_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c:1.2 xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c:1.4 --- xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c:1.2 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c Wed Sep 11 15:49:07 2002 @@ -1,7 +1,7 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c,v 1.2 2001/04/10 16:07:50 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_dd.c,v 1.4 2002/09/11 19:49:07 tsi Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D - * Copyright (C) 2000 David S. Miller + * Copyright (C) 2000, 2001 David S. Miller * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,8 +25,7 @@ * David S. Miller */ -#include "types.h" -#include "vbrender.h" +#include "mtypes.h" #include #include @@ -39,50 +38,55 @@ #include "ffb_vb.h" #include "ffb_tris.h" #include "ffb_clear.h" -#include "ffb_pipeline.h" #include "ffb_lock.h" #include "extensions.h" -#include "vb.h" -#include "dd.h" +#define FFB_DATE "20010624" + /* Mesa's Driver Functions */ static const GLubyte *ffbDDGetString(GLcontext *ctx, GLenum name) { + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + static char buffer[128]; + switch (name) { case GL_VENDOR: return (GLubyte *) "David S. Miller"; + case GL_RENDERER: - return (GLubyte *) "Mesa DRI FFB 20010321"; + sprintf(buffer, "Mesa DRI FFB " FFB_DATE); + + if (fmesa->ffb_sarea->flags & FFB_DRI_FFB2) + strncat(buffer, " FFB2", 5); + if (fmesa->ffb_sarea->flags & FFB_DRI_FFB2PLUS) + strncat(buffer, " FFB2PLUS", 9); + if (fmesa->ffb_sarea->flags & FFB_DRI_PAC1) + strncat(buffer, " PAC1", 5); + if (fmesa->ffb_sarea->flags & FFB_DRI_PAC2) + strncat(buffer, " PAC2", 5); + +#ifdef USE_SPARC_ASM + strncat(buffer, " Sparc", 6); +#endif + + return (GLubyte *) buffer; + default: return NULL; }; } -static GLint ffbGetParameteri(const GLcontext *ctx, GLint param) -{ - switch (param) { - case DD_HAVE_HARDWARE_FOG: - /* XXX We have per-fragment fog, once fog code is done, - * XXX set this. - */ - return 0; - default: -#if 0 - ffbError("ffbGetParameteri(): unknown parameter!\n"); -#endif - return 0; - }; -} -static void ffbBufferSize(GLcontext *ctx, GLuint *width, GLuint *height) +static void ffbBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height) { + GET_CURRENT_CONTEXT(ctx); ffbContextPtr fmesa = FFB_CONTEXT(ctx); -/* LOCK_HARDWARE(fmesa); */ + LOCK_HARDWARE(fmesa); *width = fmesa->driDrawable->w; *height = fmesa->driDrawable->h; -/* UNLOCK_HARDWARE(fmesa); */ + UNLOCK_HARDWARE(fmesa); } void ffbDDExtensionsInit(GLcontext *ctx) @@ -110,14 +114,7 @@ { ctx->Driver.GetBufferSize = ffbBufferSize; ctx->Driver.GetString = ffbDDGetString; - ctx->Driver.GetParameteri = ffbGetParameteri; ctx->Driver.Clear = ffbDDClear; ctx->Driver.Finish = ffbDDFinish; - - /* VB hooks */ - ctx->Driver.RegisterVB = ffbDDRegisterVB; - ctx->Driver.UnregisterVB = ffbDDUnregisterVB; - - ctx->Driver.BuildPrecalcPipeline = ffbDDBuildPrecalcPipeline; } Index: xc/lib/GL/mesa/src/drv/ffb/ffb_depth.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_depth.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_depth.c:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_depth.c:1.1 Tue Jun 20 01:08:38 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_depth.c Fri Feb 22 16:32:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_depth.c,v 1.1 2000/06/20 05:08:38 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_depth.c,v 1.2 2002/02/22 21:32:58 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller @@ -25,17 +25,26 @@ * David S. Miller */ -#include "types.h" +#include "mtypes.h" +#include "swrast/swrast.h" #include "ffb_dd.h" #include "ffb_span.h" #include "ffb_context.h" #include "ffb_depth.h" #include "ffb_lock.h" +#include "swrast/swrast.h" + +#undef DEPTH_TRACE + static void FFBWriteDepthSpan(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth depth[], const GLubyte mask[]) { +#ifdef DEPTH_TRACE + fprintf(stderr, "FFBWriteDepthSpan: n(%d) x(%d) y(%d)\n", + (int) n, x, y); +#endif if (ctx->Depth.Mask) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = fmesa->driDrawable; @@ -76,6 +85,9 @@ FFBWriteDepthPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLdepth depth[], const GLubyte mask[]) { +#ifdef DEPTH_TRACE + fprintf(stderr, "FFBWriteDepthPixels: n(%d)\n", (int) n); +#endif if (ctx->Depth.Mask) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = fmesa->driDrawable; @@ -122,6 +134,10 @@ GLuint *zptr; GLuint i; +#ifdef DEPTH_TRACE + fprintf(stderr, "FFBReadDepthSpan: n(%d) x(%d) y(%d)\n", + (int) n, x, y); +#endif if (!fmesa->hw_locked) LOCK_HARDWARE(fmesa); FFBFifo(fmesa, 1); @@ -156,6 +172,9 @@ char *zbase; GLuint i; +#ifdef DEPTH_TRACE + fprintf(stderr, "FFBReadDepthPixels: n(%d)\n", (int) n); +#endif if (!fmesa->hw_locked) LOCK_HARDWARE(fmesa); FFBFifo(fmesa, 1); @@ -185,8 +204,11 @@ void ffbDDInitDepthFuncs(GLcontext *ctx) { - ctx->Driver.WriteDepthSpan = FFBWriteDepthSpan; - ctx->Driver.ReadDepthSpan = FFBReadDepthSpan; - ctx->Driver.WriteDepthPixels = FFBWriteDepthPixels; - ctx->Driver.ReadDepthPixels = FFBReadDepthPixels; + struct swrast_device_driver *swdd = + _swrast_GetDeviceDriverReference(ctx); + + swdd->WriteDepthSpan = FFBWriteDepthSpan; + swdd->ReadDepthSpan = FFBReadDepthSpan; + swdd->WriteDepthPixels = FFBWriteDepthPixels; + swdd->ReadDepthPixels = FFBReadDepthPixels; } Index: xc/lib/GL/mesa/src/drv/ffb/ffb_fifo.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_fifo.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_fifo.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_fifo.h:1.1 Tue Jun 20 01:08:38 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_fifo.h Fri Feb 22 16:32:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_fifo.h,v 1.1 2000/06/20 05:08:38 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_fifo.h,v 1.2 2002/02/22 21:32:58 dawes Exp $ */ #ifndef _FFB_FIFO_H #define _FFB_FIFO_H @@ -17,7 +17,7 @@ do { ffbScreenPrivate *__fScrn = (__fmesa)->ffbScreen; \ if (__fScrn->rp_active) { \ unsigned int __regval = (__ffb)->ucsr; \ - while((__regval & FFB_UCSR_RP_BUSY) != 0) { \ + while((__regval & FFB_UCSR_ALL_BUSY) != 0) { \ __regval = (__ffb)->ucsr; \ } \ __fScrn->fifo_cache = ((int)(__regval & FFB_UCSR_FIFO_MASK)) - 4; \ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_lines.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_lines.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_lines.c:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_lines.c:1.1 Tue Jun 20 01:08:38 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_lines.c Fri Feb 22 16:32:58 2002 @@ -1,7 +1,7 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_lines.c,v 1.1 2000/06/20 05:08:38 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_lines.c,v 1.2 2002/02/22 21:32:58 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D - * Copyright (C) 2000 David S. Miller + * Copyright (C) 2000, 2001 David S. Miller * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,8 +25,7 @@ * David S. Miller */ -#include "types.h" -#include "vbrender.h" +#include "mtypes.h" #include #include @@ -38,29 +37,20 @@ #include "ffb_context.h" #include "ffb_vb.h" #include "ffb_lines.h" +#include "ffb_tris.h" #include "ffb_lock.h" #include "extensions.h" -#include "vb.h" -#include "dd.h" -#include "pipeline.h" +#undef FFB_LINE_TRACE + #define FFB_LINE_FLAT_BIT 0x01 -#define FFB_LINE_TWOSIDE_BIT 0x02 -#define FFB_LINE_OFFSET_BIT 0x04 -#define FFB_LINE_WIDE_BIT 0x08 -#define FFB_LINE_ALPHA_BIT 0x10 -#define FFB_LINE_FALLBACK_BIT 0x20 +#define FFB_LINE_ALPHA_BIT 0x02 +#define MAX_FFB_LINE_FUNCS 0x04 -static line_func ffb_line_tab[0x40]; +static ffb_line_func ffb_line_tab[MAX_FFB_LINE_FUNCS]; /* If the line is not wide, we can support all of the line * patterning and smooth shading features of OpenGL fully. - * If it is wide we use triangles to render them and as such - * we lose the capability to do the patterning+shading in HW. - * - * XXX Actually, with the triangle method we can probably do - * XXX the shading/antialiasing too if we are careful. It might - * XXX not work, need to investigate this. -DaveM */ #define IND (0) @@ -71,62 +61,6 @@ #define TAG(x) x##_flat #include "ffb_linetmp.h" -#define IND (FFB_LINE_OFFSET_BIT) -#define TAG(x) x##_offset -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_OFFSET_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_offset_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_TWOSIDE_BIT) -#define TAG(x) x##_twoside -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_TWOSIDE_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_twoside_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_TWOSIDE_BIT|FFB_LINE_OFFSET_BIT) -#define TAG(x) x##_twoside_offset -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_TWOSIDE_BIT|FFB_LINE_OFFSET_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_twoside_offset_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_WIDE_BIT) -#define TAG(x) x##_wide -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_WIDE_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_wide_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_WIDE_BIT|FFB_LINE_OFFSET_BIT) -#define TAG(x) x##_wide_offset -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_WIDE_BIT|FFB_LINE_OFFSET_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_wide_offset_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_WIDE_BIT|FFB_LINE_TWOSIDE_BIT) -#define TAG(x) x##_wide_twoside -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_WIDE_BIT|FFB_LINE_TWOSIDE_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_wide_twoside_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_WIDE_BIT|FFB_LINE_TWOSIDE_BIT|FFB_LINE_OFFSET_BIT) -#define TAG(x) x##_wide_twoside_offset -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_WIDE_BIT|FFB_LINE_TWOSIDE_BIT|FFB_LINE_OFFSET_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_wide_twoside_offset_flat -#include "ffb_linetmp.h" - #define IND (FFB_LINE_ALPHA_BIT) #define TAG(x) x##_alpha #include "ffb_linetmp.h" @@ -135,132 +69,38 @@ #define TAG(x) x##_alpha_flat #include "ffb_linetmp.h" -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_OFFSET_BIT) -#define TAG(x) x##_alpha_offset -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_OFFSET_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_alpha_offset_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_TWOSIDE_BIT) -#define TAG(x) x##_alpha_twoside -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_TWOSIDE_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_alpha_twoside_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_TWOSIDE_BIT|FFB_LINE_OFFSET_BIT) -#define TAG(x) x##_alpha_twoside_offset -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_TWOSIDE_BIT|FFB_LINE_OFFSET_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_alpha_twoside_offset_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_WIDE_BIT) -#define TAG(x) x##_alpha_wide -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_WIDE_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_alpha_wide_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_WIDE_BIT|FFB_LINE_OFFSET_BIT) -#define TAG(x) x##_alpha_wide_offset -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_WIDE_BIT|FFB_LINE_OFFSET_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_alpha_wide_offset_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_WIDE_BIT|FFB_LINE_TWOSIDE_BIT) -#define TAG(x) x##_alpha_wide_twoside -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_WIDE_BIT|FFB_LINE_TWOSIDE_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_alpha_wide_twoside_flat -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_WIDE_BIT|FFB_LINE_TWOSIDE_BIT|FFB_LINE_OFFSET_BIT) -#define TAG(x) x##_alpha_wide_twoside_offset -#include "ffb_linetmp.h" - -#define IND (FFB_LINE_ALPHA_BIT|FFB_LINE_WIDE_BIT|FFB_LINE_TWOSIDE_BIT|FFB_LINE_OFFSET_BIT|FFB_LINE_FLAT_BIT) -#define TAG(x) x##_alpha_wide_twoside_offset_flat -#include "ffb_linetmp.h" - void ffbDDLinefuncInit(void) { init(); init_flat(); - init_offset(); - init_offset_flat(); - init_twoside(); - init_twoside_flat(); - init_twoside_offset(); - init_twoside_offset_flat(); - init_wide(); - init_wide_flat(); - init_wide_offset(); - init_wide_offset_flat(); - init_wide_twoside(); - init_wide_twoside_flat(); - init_wide_twoside_offset(); - init_wide_twoside_offset_flat(); init_alpha(); init_alpha_flat(); - init_alpha_offset(); - init_alpha_offset_flat(); - init_alpha_twoside(); - init_alpha_twoside_flat(); - init_alpha_twoside_offset(); - init_alpha_twoside_offset_flat(); - init_alpha_wide(); - init_alpha_wide_flat(); - init_alpha_wide_offset(); - init_alpha_wide_offset_flat(); - init_alpha_wide_twoside(); - init_alpha_wide_twoside_flat(); - init_alpha_wide_twoside_offset(); - init_alpha_wide_twoside_offset_flat(); } -/* Our caller makes sure TriangleCaps is non-zero and that - * we are not doing feedback/selection (Mesa handles those - * cases). - */ -void ffbDDChooseLineRenderState(GLcontext *ctx) +static void ffb_dd_line( GLcontext *ctx, GLuint e0, GLuint e1 ) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - GLuint flags = ctx->TriangleCaps; + ffb_vertex *v0 = &fmesa->verts[e0]; + ffb_vertex *v1 = &fmesa->verts[e1]; + fmesa->draw_line( ctx, v0, v1 ); +} + +void ffbChooseLineState(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; GLuint ind = 0; - if (!flags) { - fmesa->LineFunc = ffb_line_tab[0]; - return; - } + tnl->Driver.Render.Line = ffb_dd_line; if (flags & DD_FLATSHADE) ind |= FFB_LINE_FLAT_BIT; - if (flags & DD_TRI_OFFSET) - ind |= FFB_LINE_OFFSET_BIT; - if (flags & DD_TRI_LIGHT_TWOSIDE) - ind |= FFB_LINE_TWOSIDE_BIT; - if (flags & DD_LINE_WIDTH) { - /* We cannot currently do wide lines with stipples - * or antialiased in HW. - */ - if ((flags & DD_LINE_STIPPLE) != 0 || - ctx->Line.SmoothFlag) - ind |= FFB_LINE_FALLBACK_BIT; - else - ind |= FFB_LINE_WIDE_BIT; - } else { - if ((flags & DD_LINE_STIPPLE) != 0 && - fmesa->lpat == FFB_LPAT_BAD) - ind |= FFB_LINE_FALLBACK_BIT; + + if ((flags & DD_LINE_STIPPLE) != 0 && + fmesa->lpat == FFB_LPAT_BAD) { + fmesa->draw_line = ffb_fallback_line; + return; } /* If blending or the alpha test is enabled we need to @@ -271,5 +111,5 @@ if (ctx->Color.BlendEnabled || ctx->Color.AlphaEnabled) ind |= FFB_LINE_ALPHA_BIT; - fmesa->LineFunc = ffb_line_tab[ind]; + fmesa->draw_line = ffb_line_tab[ind]; } Index: xc/lib/GL/mesa/src/drv/ffb/ffb_lines.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_lines.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_lines.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_lines.h:1.1 Tue Jun 20 01:08:38 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_lines.h Fri Feb 22 16:32:58 2002 @@ -1,9 +1,18 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_lines.h,v 1.1 2000/06/20 05:08:38 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_lines.h,v 1.2 2002/02/22 21:32:58 dawes Exp $ */ #ifndef _FFB_LINES_H #define _FFB_LINES_H +#include "ffb_context.h" + +#define _FFB_NEW_LINE (_DD_NEW_FLATSHADE | \ + _DD_NEW_LINE_WIDTH | \ + _DD_NEW_LINE_STIPPLE | \ + _DD_NEW_LINE_SMOOTH | \ + _NEW_COLOR) + extern void ffbDDLinefuncInit(void); -extern void ffbDDChooseLineRenderState(GLcontext *); +extern void ffbChooseLineState(GLcontext *); +extern void ffb_fallback_line( GLcontext *ctx, ffb_vertex *v0, ffb_vertex *v1 ); #endif /* !(_FFB_LINES_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_linetmp.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_linetmp.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_linetmp.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_linetmp.h:1.1 Tue Jun 20 01:08:38 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_linetmp.h Fri Feb 22 16:32:58 2002 @@ -1,85 +1,38 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_linetmp.h,v 1.1 2000/06/20 05:08:38 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_linetmp.h,v 1.2 2002/02/22 21:32:58 dawes Exp $ */ -static void TAG(ffb_line)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint pv) +static __inline void TAG(ffb_line)(GLcontext *ctx, ffb_vertex *v0, + ffb_vertex *v1 ) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); ffb_fbcPtr ffb = fmesa->regs; - struct vertex_buffer *VB = ctx->VB; - ffb_vertex *ffbVB = FFB_DRIVER_DATA(VB)->verts; - const ffb_vertex *v0 = &ffbVB[e0]; - const ffb_vertex *v1 = &ffbVB[e1]; -#if (IND & FFB_LINE_OFFSET_BIT) - GLuint ffb_zoffset = FFB_Z_FROM_FLOAT(ctx->LineZoffset); -#endif -#if (IND & FFB_LINE_TWOSIDE_BIT) - const int which_color = (VB->ColorPtr == VB->Color[0]) ? 0 : 1; -#else - const int which_color = 0; -#endif #if (IND & FFB_LINE_FLAT_BIT) - const GLuint const_fg = (((GLuint)VB->Color[which_color]->data[pv][0] << 0) | - ((GLuint)VB->Color[which_color]->data[pv][1] << 8) | - ((GLuint)VB->Color[which_color]->data[pv][2] << 16) | - ((GLuint)VB->Color[which_color]->data[pv][3] << 24)); + const GLuint const_fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR( v1->color[0] ); #endif + FFB_DELAYED_VIEWPORT_VARS; +#ifdef FFB_LINE_TRACE + fprintf(stderr, "FFB: ffb_line [" #if (IND & FFB_LINE_FLAT_BIT) - FFBFifo(fmesa, 1); - ffb->fg = const_fg; + " FLAT" #endif - -#if !(IND & FFB_LINE_WIDE_BIT) - /* We actually need to do the LINE_LOOP/LINE_STRIP optimization - * in this case so that the line pattern works out correctly. - * Really, Mesa should be fixed so it sends us the real primitive. - */ - if (v0 == fmesa->vtx_cache[1] && - v1 != fmesa->vtx_cache[0]) { -#if (IND & FFB_LINE_FLAT_BIT) - FFBFifo(fmesa, 3); -#else #if (IND & FFB_LINE_ALPHA_BIT) - FFBFifo(fmesa, 7); -#else - FFBFifo(fmesa, 6); -#endif + " ALPHA" #endif -#if !(IND & FFB_LINE_FLAT_BIT) -#if (IND & FFB_LINE_ALPHA_BIT) - ffb->alpha = v1->color[which_color].alpha; -#endif - ffb->red = v1->color[which_color].red; - ffb->green = v1->color[which_color].green; - ffb->blue = v1->color[which_color].blue; -#endif -#if (IND & FFB_LINE_OFFSET_BIT) - ffb->z = v1->z + ffb_zoffset; -#else - ffb->z = v1->z; + " ]\n"); #endif - ffb->y = v1->y; - ffb->x = v1->x; - fmesa->vtx_cache[0] = (void *)v0; - fmesa->vtx_cache[1] = (void *)v1; - fmesa->ffbScreen->rp_active = 1; - return; - } else { - fmesa->vtx_cache[0] = (void *)v0; - fmesa->vtx_cache[1] = (void *)v1; - } +#if (IND & FFB_LINE_FLAT_BIT) + FFBFifo(fmesa, 1); + ffb->fg = const_fg; +#ifdef FFB_LINE_TRACE + fprintf(stderr, "FFB: ffb_line confg_fg[%08x]\n", const_fg); +#endif #endif #if (IND & FFB_LINE_FLAT_BIT) -#if !(IND & FFB_LINE_WIDE_BIT) /* (2 * 3) + 1 */ FFBFifo(fmesa, 7); #else - /* (4 * 3) */ - FFBFifo(fmesa, 12); -#endif -#else -#if !(IND & FFB_LINE_WIDE_BIT) #if (IND & FFB_LINE_ALPHA_BIT) /* (2 * 7) + 1 */ FFBFifo(fmesa, 15); @@ -87,167 +40,34 @@ /* (2 * 6) + 1 */ FFBFifo(fmesa, 13); #endif -#else -#if (IND & FFB_LINE_ALPHA_BIT) - /* (4 * 7) */ - FFBFifo(fmesa, 28); -#else - /* (4 * 6) */ - FFBFifo(fmesa, 24); -#endif #endif -#endif -#if !(IND & FFB_LINE_WIDE_BIT) /* Using DDLINE or AALINE, init the line pattern state. */ ffb->lpat = fmesa->lpat; #if !(IND & FFB_LINE_FLAT_BIT) #if (IND & FFB_LINE_ALPHA_BIT) - ffb->alpha = v0->color[which_color].alpha; + ffb->alpha = FFB_GET_ALPHA(v0); #endif - ffb->red = v0->color[which_color].red; - ffb->green = v0->color[which_color].green; - ffb->blue = v0->color[which_color].blue; + ffb->red = FFB_GET_RED(v0); + ffb->green = FFB_GET_GREEN(v0); + ffb->blue = FFB_GET_BLUE(v0); #endif -#if (IND & FFB_LINE_OFFSET_BIT) - ffb->z = v0->z + ffb_zoffset; -#else - ffb->z = v0->z; -#endif - ffb->ryf = v0->y; - ffb->rxf = v0->x; + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); #if !(IND & FFB_LINE_FLAT_BIT) #if (IND & FFB_LINE_ALPHA_BIT) - ffb->alpha = v1->color[which_color].alpha; -#endif - ffb->red = v1->color[which_color].red; - ffb->green = v1->color[which_color].green; - ffb->blue = v1->color[which_color].blue; + ffb->alpha = FFB_GET_ALPHA(v1); #endif -#if (IND & FFB_LINE_OFFSET_BIT) - ffb->z = v1->z + ffb_zoffset; -#else - ffb->z = v1->z; -#endif - ffb->y = v1->y; - ffb->x = v1->x; - -#else /* FFB_LINE_WIDE_BIT */ - /* Doing wide lines via triangles. */ - { - float width = ctx->Line.Width; - float dx, dy; - GLuint ix, iy; - - /* It might be possible to precalculate this stuff in - * our vertex-buffer code. That code works with - * screen coordinates so it might work. One problem - * could be that due to potentially drawing polygons - * as lines, it would be very difficult to really - * determine if the calculations were necessary or not. - */ - dx = VB->Win.data[e0][0] - VB->Win.data[e1][0]; - dy = VB->Win.data[e0][1] - VB->Win.data[e1][1]; - ix = FFB_COORD_FROM_FLOAT(width * 0.5f); - iy = 0; - if ((dx * dx) > (dy * dy)) { - iy = ix; - ix = 0; - } - - /* The vertex sequence using isolated triangles would - * be: - * - * Vertex0: line vertex0 - I RXF/RYF - * Vertex1: line vertex1 + I DOXF/DOYF - * Vertex2: line vertex0 + I DOXF/DOYF - * Vertex3: line vertex0 - I RXF/RYF - * Vertex4: line vertex1 - I DOXF/DOYF - * Vertex5: line vertex1 + I DOXF/DOYF - * - * Using star chaining we can optimize this into a - * four vertex sequence, as follows: - * - * Vertex0: line vertex0 - I RXF/RYF - * Vertex1: line vertex0 + I DOXF/DOYF - * Vertex2: line vertex1 + I DOXF/DOYF - * Vertex3: line vertex1 - I DMXF/DMYF - * - * The DMXF/DMYF vertex means "replace middle vertex - * with new vertex and draw". - */ - - /* Vertex0: line vertex0 - I, RXF/RYF */ -#if !(IND & FFB_LINE_FLAT_BIT) -#if (IND & FFB_LINE_ALPHA_BIT) - ffb->alpha = v0->color[which_color].alpha; -#endif - ffb->red = v0->color[which_color].red; - ffb->green = v0->color[which_color].green; - ffb->blue = v0->color[which_color].blue; -#endif -#if (IND & FFB_LINE_OFFSET_BIT) - ffb->z = v0->z + ffb_zoffset; -#else - ffb->z = v0->z; -#endif - ffb->ryf = v0->y - iy; - ffb->rxf = v0->x - ix; - - /* Vertex1: line vertex0 + I, DOXF/DOYF */ -#if !(IND & FFB_LINE_FLAT_BIT) -#if (IND & FFB_LINE_ALPHA_BIT) - ffb->alpha = v0->color[which_color].alpha; -#endif - ffb->red = v0->color[which_color].red; - ffb->green = v0->color[which_color].green; - ffb->blue = v0->color[which_color].blue; -#endif -#if (IND & FFB_LINE_OFFSET_BIT) - ffb->z = v0->z + ffb_zoffset; -#else - ffb->z = v0->z; -#endif - ffb->y = v0->y + iy; - ffb->x = v0->x + ix; - - /* Vertex2: line vertex1 + I, DOXF/DOYF */ -#if !(IND & FFB_LINE_FLAT_BIT) -#if (IND & FFB_LINE_ALPHA_BIT) - ffb->alpha = v1->color[which_color].alpha; -#endif - ffb->red = v1->color[which_color].red; - ffb->green = v1->color[which_color].green; - ffb->blue = v1->color[which_color].blue; -#endif -#if (IND & FFB_LINE_OFFSET_BIT) - ffb->z = v1->z + ffb_zoffset; -#else - ffb->z = v1->z; -#endif - ffb->y = v1->y + iy; - ffb->x = v1->x + ix; - - /* Vertex3: line vertex1 - I, DMXF/DMYF */ -#if !(IND & FFB_LINE_FLAT_BIT) -#if (IND & FFB_LINE_ALPHA_BIT) - ffb->alpha = v1->color[which_color].alpha; -#endif - ffb->red = v1->color[which_color].red; - ffb->green = v1->color[which_color].green; - ffb->blue = v1->color[which_color].blue; -#endif -#if (IND & FFB_LINE_OFFSET_BIT) - ffb->z = v1->z + ffb_zoffset; -#else - ffb->z = v1->z; + ffb->red = FFB_GET_RED(v1); + ffb->green = FFB_GET_GREEN(v1); + ffb->blue = FFB_GET_BLUE(v1); #endif - ffb->dmyf = v1->y - iy; - ffb->dmxf = v1->x - ix; - } -#endif /* !(FFB_LINE_WIDE_BIT) */ + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); fmesa->ffbScreen->rp_active = 1; } Index: xc/lib/GL/mesa/src/drv/ffb/ffb_lock.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_lock.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_lock.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_lock.h:1.1 Tue Jun 20 01:08:38 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_lock.h Fri Feb 22 16:32:59 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_lock.h,v 1.1 2000/06/20 05:08:38 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_lock.h,v 1.2 2002/02/22 21:32:59 dawes Exp $ */ #ifndef _FFB_LOCK_H #define _FFB_LOCK_H @@ -9,6 +9,10 @@ #define FFB_UPDATE_STATE(fmesa) ffbXMesaUpdateState(fmesa) /* Lock the hardware and validate our state. */ +#if defined(__i386__) +#define LOCK_HARDWARE(fmesa) +#define UNLOCK_HARDWARE(fmesa) +#else #define LOCK_HARDWARE(fmesa) \ do { \ int __ret=0; \ @@ -24,5 +28,6 @@ /* Unlock the hardware. */ #define UNLOCK_HARDWARE(fmesa) \ DRM_UNLOCK(fmesa->driFd, fmesa->driHwLock, fmesa->hHWContext); +#endif #endif /* !(_FFB_LOCK_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.c:removed --- xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.c:1.1 Tue Jun 20 01:08:39 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.c Thu Feb 27 12:26:20 2003 @@ -1,84 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.c,v 1.1 2000/06/20 05:08:39 dawes Exp $ - * - * GLX Hardware Device Driver for Sun Creator/Creator3D - * Copyright (C) 2000 David S. Miller - * - * 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 - * 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. - * - * - * David S. Miller - */ - -#include "ffb_xmesa.h" -#include "ffb_context.h" -#include "ffb_vb.h" -#include "ffb_pipeline.h" - -#include "stages.h" -#include "pipeline.h" - -GLboolean ffbDDBuildPrecalcPipeline(GLcontext *ctx) -{ - /* This doesn't do anything interesting yet. */ - return 0; -} - -static void ffbDDCheckRasterSetup(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; -} - -GLuint ffbDDRegisterPipelineStages(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_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 = ffbDDCheckPartialRasterSetup; - out[o].run = ffbDDPartialRasterSetup; - o++; - break; - - case PIPE_OP_RAST_SETUP_0|PIPE_OP_RAST_SETUP_1: - out[o] = in[i]; - out[o].check = ffbDDCheckRasterSetup; - out[o].run = ffbDDDoRasterSetup; - o++; - break; - - default: - out[o++] = in[i]; - break; - }; - } - - return o; -} Index: xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.h:removed --- xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.h:1.1 Tue Jun 20 01:08:39 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.h Thu Feb 27 12:26:20 2003 @@ -1,11 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_pipeline.h,v 1.1 2000/06/20 05:08:39 dawes Exp $ */ - -#ifndef _FFB_PIPELINE_H -#define _FFB_PIPELINE_H - -extern GLboolean ffbDDBuildPrecalcPipeline(GLcontext *); -extern GLuint ffbDDRegisterPipelineStages(struct gl_pipeline_stage *, - const struct gl_pipeline_stage *, - GLuint); - -#endif /* !(_FFB_PIPELINE_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_points.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_points.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_points.c:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_points.c:1.1 Tue Jun 20 01:08:39 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_points.c Fri Feb 22 16:32:59 2002 @@ -1,7 +1,7 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_points.c,v 1.1 2000/06/20 05:08:39 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_points.c,v 1.2 2002/02/22 21:32:59 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D - * Copyright (C) 2000 David S. Miller + * Copyright (C) 2000, 2001 David S. Miller * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,8 +25,7 @@ * David S. Miller */ -#include "types.h" -#include "vbrender.h" +#include "mtypes.h" #include #include @@ -39,117 +38,64 @@ #include "ffb_vb.h" #include "ffb_lines.h" #include "ffb_points.h" +#include "ffb_tris.h" #include "ffb_lock.h" #include "extensions.h" -#include "vb.h" -#include "dd.h" -#include "pipeline.h" - -#define FFB_POINT_OFFSET_BIT 0x01 -#define FFB_POINT_AA_BIT 0x02 -#define FFB_POINT_BIG_BIT 0x04 -#define FFB_POINT_ALPHA_BIT 0x08 -#define FFB_POINT_FALLBACK_BIT 0x10 -static points_func ffb_points_tab[0x20]; +#undef FFB_POINT_TRACE +#define FFB_POINT_AA_BIT 0x01 + +static ffb_point_func ffb_point_tab[0x08]; + #define IND (0) #define TAG(x) x #include "ffb_pointtmp.h" -#define IND (FFB_POINT_OFFSET_BIT) -#define TAG(x) x##_offset -#include "ffb_pointtmp.h" - #define IND (FFB_POINT_AA_BIT) #define TAG(x) x##_aa #include "ffb_pointtmp.h" -#define IND (FFB_POINT_OFFSET_BIT|FFB_POINT_AA_BIT) -#define TAG(x) x##_offset_aa -#include "ffb_pointtmp.h" - -#define IND (FFB_POINT_BIG_BIT) -#define TAG(x) x##_big -#include "ffb_pointtmp.h" - -#define IND (FFB_POINT_BIG_BIT|FFB_POINT_OFFSET_BIT) -#define TAG(x) x##_big_offset -#include "ffb_pointtmp.h" - -#define IND (FFB_POINT_ALPHA_BIT) -#define TAG(x) x##_alpha -#include "ffb_pointtmp.h" - -#define IND (FFB_POINT_ALPHA_BIT|FFB_POINT_OFFSET_BIT) -#define TAG(x) x##_alpha_offset -#include "ffb_pointtmp.h" - -#define IND (FFB_POINT_ALPHA_BIT|FFB_POINT_AA_BIT) -#define TAG(x) x##_alpha_aa -#include "ffb_pointtmp.h" - -#define IND (FFB_POINT_ALPHA_BIT|FFB_POINT_OFFSET_BIT|FFB_POINT_AA_BIT) -#define TAG(x) x##_alpha_offset_aa -#include "ffb_pointtmp.h" - -#define IND (FFB_POINT_ALPHA_BIT|FFB_POINT_BIG_BIT) -#define TAG(x) x##_alpha_big -#include "ffb_pointtmp.h" - -#define IND (FFB_POINT_ALPHA_BIT|FFB_POINT_BIG_BIT|FFB_POINT_OFFSET_BIT) -#define TAG(x) x##_alpha_big_offset -#include "ffb_pointtmp.h" - void ffbDDPointfuncInit(void) { init(); - init_offset(); init_aa(); - init_offset_aa(); - init_big(); - init_big_offset(); - init_alpha(); - init_alpha_offset(); - init_alpha_aa(); - init_alpha_offset_aa(); - init_alpha_big(); - init_alpha_big_offset(); } -/* Our caller makes sure TriangleCaps is non-zero and that - * we are not doing feedback/selection (Mesa handles those - * cases). - */ -void ffbDDChoosePointRenderState(GLcontext *ctx) +static void ffb_dd_points( GLcontext *ctx, GLuint first, GLuint last ) { + struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb; ffbContextPtr fmesa = FFB_CONTEXT(ctx); - GLuint flags = ctx->TriangleCaps; - GLuint ind = 0; + ffb_vertex *fverts = fmesa->verts; + int i; - if (!flags) { - fmesa->PointsFunc = ffb_points_tab[0]; - return; + if (VB->Elts == 0) { + for ( i = first ; i < last ; i++ ) { + if ( VB->ClipMask[i] == 0 ) { + fmesa->draw_point( ctx, &fverts[i] ); + } + } + } else { + for ( i = first ; i < last ; i++ ) { + GLuint e = VB->Elts[i]; + if ( VB->ClipMask[e] == 0 ) { + fmesa->draw_point( ctx, &fverts[e] ); + } + } } +} - if (flags & DD_TRI_OFFSET) - ind |= FFB_POINT_OFFSET_BIT; - if (flags & DD_POINT_SIZE) { - if (ctx->Point.SmoothFlag) - ind |= FFB_POINT_FALLBACK_BIT; - else - ind |= FFB_POINT_BIG_BIT; - } else if (ctx->Point.SmoothFlag) { - ind |= FFB_POINT_AA_BIT; - } +void ffbChoosePointState(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint ind = 0; - /* If blending or the alpha test is enabled we need to - * provide alpha components to the chip, else we can - * do without it and thus feed vertex data to the chip - * more efficiently. - */ - if (ctx->Color.BlendEnabled || ctx->Color.AlphaEnabled) - ind |= FFB_POINT_ALPHA_BIT; + tnl->Driver.Render.Points = ffb_dd_points; + + if (flags & DD_POINT_SMOOTH) + ind |= FFB_POINT_AA_BIT; - fmesa->PointsFunc = ffb_points_tab[ind]; + fmesa->draw_point = ffb_point_tab[ind]; } Index: xc/lib/GL/mesa/src/drv/ffb/ffb_points.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_points.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_points.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_points.h:1.1 Tue Jun 20 01:08:39 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_points.h Fri Feb 22 16:32:59 2002 @@ -1,9 +1,15 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_points.h,v 1.1 2000/06/20 05:08:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_points.h,v 1.2 2002/02/22 21:32:59 dawes Exp $ */ #ifndef _FFB_POINTS_H #define _FFB_POINTS_H extern void ffbDDPointfuncInit(void); -extern void ffbDDChoosePointRenderState(GLcontext *); + +#define _FFB_NEW_POINT (_DD_NEW_POINT_SIZE | \ + _DD_NEW_POINT_SMOOTH | \ + _NEW_COLOR) + +extern void ffbChoosePointState(GLcontext *); +extern void ffb_fallback_point( GLcontext *ctx, ffb_vertex *v0 ); #endif /* !(_FFB_POINTS_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_pointtmp.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_pointtmp.h:1.2 xc/lib/GL/mesa/src/drv/ffb/ffb_pointtmp.h:1.3 --- xc/lib/GL/mesa/src/drv/ffb/ffb_pointtmp.h:1.2 Tue Dec 5 16:18:33 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_pointtmp.h Fri Feb 22 16:32:59 2002 @@ -1,113 +1,54 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_pointtmp.h,v 1.2 2000/12/05 21:18:33 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_pointtmp.h,v 1.3 2002/02/22 21:32:59 dawes Exp $ */ -static void TAG(ffb_points)(GLcontext *ctx, GLuint first, GLuint last) +static __inline void TAG(ffb_draw_point)(GLcontext *ctx, ffb_vertex *tmp ) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); ffb_fbcPtr ffb = fmesa->regs; - struct vertex_buffer *VB = ctx->VB; - ffb_vertex *ffbVB = FFB_DRIVER_DATA(VB)->verts; -#if (IND & FFB_POINT_OFFSET_BIT) + FFB_DELAYED_VIEWPORT_VARS; + +#ifdef FFB_POINT_TRACE + fprintf(stderr, "FFB: ffb_point [" #if (IND & FFB_POINT_AA_BIT) - GLuint ffb_zoffset = FFB_Z_FROM_FLOAT(ctx->PointZoffset); -#else - GLuint ffb_zoffset = Z_FROM_MESA(ctx->PointZoffset); -#endif + "AA" #endif -#if (IND & FFB_POINT_BIG_BIT) - GLuint sz = FFB_COORD_FROM_FLOAT(ctx->Point.Size * 0.5f); + "] X(%f) Y(%f) Z(%f)\n", + tmp->x, tmp->y, tmp->z); #endif - int i; - for (i = first; i < last; i++) { - if (VB->ClipMask[i] == 0) { - ffb_vertex *tmp = &ffbVB[i]; -#if !(IND & FFB_POINT_BIG_BIT) #if (IND & FFB_POINT_AA_BIT) - FFBFifo(fmesa, 4); - ffb->fg = (((GLuint)VB->Color[0]->data[i][0] << 0) | - ((GLuint)VB->Color[0]->data[i][1] << 8) | - ((GLuint)VB->Color[0]->data[i][2] << 16) | - ((GLuint)VB->Color[0]->data[i][3] << 24)); -#if (IND & FFB_POINT_OFFSET_BIT) - ffb->z = tmp->z + ffb_zoffset; -#else - ffb->z = tmp->z; -#endif - ffb->y = tmp->y + 0x8000; - ffb->x = tmp->x + 0x8000; -#else - FFBFifo(fmesa, 4); - ffb->fg = (((GLuint)VB->Color[0]->data[i][0] << 0) | - ((GLuint)VB->Color[0]->data[i][1] << 8) | - ((GLuint)VB->Color[0]->data[i][2] << 16) | - ((GLuint)VB->Color[0]->data[i][3] << 24)); -#if (IND & FFB_POINT_OFFSET_BIT) - ffb->constz = - (Z_FROM_MESA(VB->Win.data[i][2]) + ffb_zoffset); + FFBFifo(fmesa, 4); + + ffb->fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR( tmp->color[0] ); + ffb->z = FFB_GET_Z(tmp); + ffb->y = FFB_GET_Y(tmp) + 0x8000 /* FIX ME */; + ffb->x = FFB_GET_X(tmp) + 0x8000 /* FIX ME */; #else - ffb->constz = Z_FROM_MESA(VB->Win.data[i][2]); -#endif - ffb->bh = tmp->y >> 16; - ffb->bw = tmp->x >> 16; -#endif -#else /* FFB_POINT_BIG_BIT */ - /* Doing big points via triangles. */ - FFBFifo(fmesa, 10); - - ffb->fg = (((GLuint)VB->Color[0]->data[i][0] << 0) | - ((GLuint)VB->Color[0]->data[i][1] << 8) | - ((GLuint)VB->Color[0]->data[i][2] << 16) | - ((GLuint)VB->Color[0]->data[i][3] << 24)); -#if (IND & FFB_POINT_OFFSET_BIT) - ffb->constz = - (Z_FROM_MESA(VB->Win.data[i][2]) + ffb_zoffset); -#else - ffb->constz = Z_FROM_MESA(VB->Win.data[i][2]); -#endif + { + unsigned int const_fg, const_z, h, w; - /* The vertex sequence using isolated triangles would - * be: - * Vertex0: VX - sz, VY - sz RXF/RYF - * Vertex1: VX + sz, VY - sz DOXF/DOYF - * Vertex2: VX + sz, VY + sz DOXF/DOYF - * Vertex3: VX + sz, VY + sz RXF/RYF - * Vertex4: VX - sz, VY + sz DOXF/DOYF - * Vertex5: VX - sz, VY - sz DOXF/DOYF - * - * Using star chaining we can optimize this into a - * four vertex sequence, as follows: - * - * Vertex0: VX - sz, VY - sz RXF/RYF - * Vertex1: VX + sz, VY - sz DOXF/DOYF - * Vertex2: VX + sz, VY + sz DOXF/DOYF - * Vertex3: VX - sz, VY + sz DMXF/DMYF - */ - - /* Vertex0: VX - sz, VY - sz, RXF/RYF */ - ffb->ryf = tmp->y - sz; - ffb->rxf = tmp->x - sz; - - /* Vertex1: VX + sz, VY - sz, DOXF/DOYF */ - ffb->y = tmp->y - sz; - ffb->x = tmp->x + sz; - - /* Vertex2: VX + sz, VY + sz, DOXF/DOYF */ - ffb->y = tmp->y + sz; - ffb->x = tmp->x + sz; - - /* Vertex3: VX - sz, VY + sz, DMXF/DMYF */ - ffb->dmyf = tmp->y + sz; - ffb->dmxf = tmp->x - sz; -#endif /* !(FFB_POINT_BIG_BIT) */ - } + const_fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR( tmp->color[0] ); + const_z = Z_FROM_MESA(FFB_Z_TO_FLOAT(FFB_GET_Z(tmp))); + h = FFB_GET_Y(tmp) >> 16; + w = FFB_GET_X(tmp) >> 16; +#ifdef FFB_POINT_TRACE + fprintf(stderr, "FFB: ffb_point fg(%08x) z(%08x) h(%08x) w(%08x)\n", + const_fg, const_z, h, w); +#endif + FFBFifo(fmesa, 4); + ffb->fg = const_fg; + ffb->constz = const_z; + ffb->bh = h; + ffb->bw = w; } +#endif fmesa->ffbScreen->rp_active = 1; } + static void TAG(init)(void) { - ffb_points_tab[IND] = TAG(ffb_points); + ffb_point_tab[IND] = TAG(ffb_draw_point); } #undef IND Index: xc/lib/GL/mesa/src/drv/ffb/ffb_rendertmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/ffb/ffb_rendertmp.h:1.2 --- /dev/null Thu Feb 27 12:26:20 2003 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_rendertmp.h Wed Jan 29 18:00:40 2003 @@ -0,0 +1,648 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_rendertmp.h,v 1.2 2003/01/29 23:00:40 dawes Exp $ */ + +#define IMPL_LOCAL_VARS \ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); \ + ffb_fbcPtr ffb = fmesa->regs; \ + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ + FFB_DELAYED_VIEWPORT_VARS; \ + (void) fmesa; (void) ffb; (void) elt + +#if (IND & FFB_FLAT_BIT) +#define FFB_DECLARE_CACHED_COLOR(NAME) \ + unsigned int NAME; +#define FFB_COMPUTE_CACHED_COLOR(NAME, VTX) \ + NAME = FFB_PACK_CONST_UBYTE_ARGB_COLOR((VTX)->color[0]) +#define FFB_CACHED_COLOR_SAME(NAME1, NAME2) \ + ((NAME1) == (NAME2)) +#define FFB_CACHED_COLOR_SET(NAME) \ + ffb->fg = (NAME) +#define FFB_CACHED_COLOR_UPDATE(NAME1, NAME2) \ + ffb->fg = (NAME1) = (NAME2) +#define FFB_SET_PRIM_COLOR(COLOR_VERTEX) \ + ffb->fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR((COLOR_VERTEX)->color[0]) +#define FFB_PRIM_COLOR_COST 1 +#define FFB_SET_VERTEX_COLOR(VTX) /**/ +#define FFB_VERTEX_COLOR_COST 0 +#else +#define FFB_DECLARE_CACHED_COLOR(NAME) /**/ +#define FFB_COMPUTE_CACHED_COLOR(NAME, VTX) /**/ +#define FFB_CACHED_COLOR_SAME(NAME1, NAME2) 0 +#define FFB_CACHED_COLOR_SET(NAME1) /**/ +#define FFB_CACHED_COLOR_UPDATE(NAME1, NAME2) /**/ +#define FFB_SET_PRIM_COLOR(COLOR_VERTEX) /**/ +#define FFB_PRIM_COLOR_COST 0 +#if (IND & FFB_ALPHA_BIT) +#define FFB_SET_VERTEX_COLOR(VTX) \ + ffb->alpha = FFB_GET_ALPHA(VTX); \ + ffb->red = FFB_GET_RED(VTX); \ + ffb->green = FFB_GET_GREEN(VTX); \ + ffb->blue = FFB_GET_BLUE(VTX) +#define FFB_VERTEX_COLOR_COST 4 +#else +#define FFB_SET_VERTEX_COLOR(VTX) \ + ffb->red = FFB_GET_RED(VTX); \ + ffb->green = FFB_GET_GREEN(VTX); \ + ffb->blue = FFB_GET_BLUE(VTX) +#define FFB_VERTEX_COLOR_COST 3 +#endif +#endif + +#define RESET_STIPPLE ffb->lpat = fmesa->lpat; + +#if !(IND & (FFB_TRI_CULL_BIT)) +static void TAG(ffb_vb_points)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_POINTS); + if (ctx->_TriangleCaps & DD_POINT_SMOOTH) { + for (i = start; i < count; i++) { + ffb_vertex *v0 = &fmesa->verts[ELT(i)]; + + FFBFifo(fmesa, 4); + ffb->fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR(v0->color[0]); + ffb->z = FFB_GET_Z(v0); + ffb->y = FFB_GET_Y(v0) + 0x8000 /* FIX ME */; + ffb->x = FFB_GET_X(v0) + 0x8000 /* FIX ME */; + } + } else { + for (i = start; i < count; i++) { + ffb_vertex *v0 = &fmesa->verts[ELT(i)]; + FFBFifo(fmesa, 4); + ffb->fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR(v0->color[0]); + ffb->constz = Z_FROM_MESA(FFB_Z_TO_FLOAT(FFB_GET_Z(v0))); + ffb->bh = FFB_GET_Y(v0) >> 16; + ffb->bw = FFB_GET_X(v0) >> 16; + } + } + + fmesa->ffbScreen->rp_active = 1; +} + +static void TAG(ffb_vb_lines)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_LINES); + for (i = start + 1; i < count; i += 2) { + ffb_vertex *v0 = &fmesa->verts[i - 1]; + ffb_vertex *v1 = &fmesa->verts[i - 0]; + + FFBFifo(fmesa, (1 + FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 2) + 6)); + + RESET_STIPPLE; + + FFB_SET_PRIM_COLOR(v1); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); + + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + } +} + +static void TAG(ffb_vb_line_loop)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_LINE_LOOP); + if ((flags & PRIM_BEGIN) != 0) { + ffb_vertex *v0 = &fmesa->verts[ELT(start + 0)]; + ffb_vertex *v1 = &fmesa->verts[ELT(start + 1)]; + + FFBFifo(fmesa, (1 + FFB_PRIM_COLOR_COST + + ((FFB_VERTEX_COLOR_COST * 2) + (3 * 2)))); + + RESET_STIPPLE; + + FFB_SET_PRIM_COLOR(v1); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); + + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + } + for (i = start + 2; i < count; i++) { + ffb_vertex *v0 = &fmesa->verts[ELT(i)]; + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST + 3))); + + FFB_SET_PRIM_COLOR(v0); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->y = FFB_GET_Y(v0); + ffb->x = FFB_GET_X(v0); + } + if ((flags & PRIM_END) != 0) { + ffb_vertex *v0 = &fmesa->verts[ELT(start)]; + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST + 3))); + + FFB_SET_PRIM_COLOR(v0); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->y = FFB_GET_Y(v0); + ffb->x = FFB_GET_X(v0); + } + + fmesa->ffbScreen->rp_active = 1; +} + +static void TAG(ffb_vb_line_strip)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + FFB_DECLARE_CACHED_COLOR(cached_fg) + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_LINE_STRIP); + FFBFifo(fmesa, (1 + FFB_PRIM_COLOR_COST + + ((FFB_VERTEX_COLOR_COST * 2) + (3 * 2)))); + + RESET_STIPPLE; + + { + ffb_vertex *v0 = &fmesa->verts[ELT(start + 0)]; + ffb_vertex *v1 = &fmesa->verts[ELT(start + 1)]; + + FFB_COMPUTE_CACHED_COLOR(cached_fg, v0); + FFB_CACHED_COLOR_SET(cached_fg); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); + + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + } + + for (i = start + 2; i < count; i++) { + ffb_vertex *v1 = &fmesa->verts[ELT(i - 0)]; + FFB_DECLARE_CACHED_COLOR(new_fg) + + FFB_COMPUTE_CACHED_COLOR(new_fg, v1); + if (FFB_CACHED_COLOR_SAME(cached_fg, new_fg)) { + FFBFifo(fmesa, ((FFB_VERTEX_COLOR_COST * 1) + (3 * 1))); + } else { + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 1) + (3 * 1))); + FFB_CACHED_COLOR_UPDATE(cached_fg, new_fg); + } + + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + } + + fmesa->ffbScreen->rp_active = 1; +} +#endif /* !(IND & (FFB_TRI_CULL_BIT)) */ + +/* OK, now things start getting fun :-) */ +#if (IND & (FFB_TRI_CULL_BIT)) +#define FFB_AREA_DECLARE GLfloat cc, ex, ey, fx, fy; +#define FFB_COMPUTE_AREA_TRI(V0, V1, V2) \ +{ ex = (V1)->x - (V0)->x; \ + ey = (V1)->y - (V0)->y; \ + fx = (V2)->x - (V0)->x; \ + fy = (V2)->y - (V0)->y; \ + cc = ex*fy-ey*fx; \ +} +#define FFB_COMPUTE_AREA_QUAD(V0, V1, V2, V3) \ +{ ex = (V2)->x - (V0)->x; \ + ey = (V2)->y - (V0)->y; \ + fx = (V3)->x - (V1)->x; \ + fy = (V3)->y - (V1)->y; \ + cc = ex*fy-ey*fx; \ +} +#else +#define FFB_AREA_DECLARE /**/ +#define FFB_COMPUTE_AREA_TRI(V0, V1, V2) do { } while(0) +#define FFB_COMPUTE_AREA_QUAD(V0, V1, V2, V3) do { } while(0) +#endif + +#if (IND & FFB_TRI_CULL_BIT) +#define FFB_CULL_TRI(CULL_ACTION) \ + if (cc * fmesa->backface_sign > fmesa->ffb_zero) { \ + CULL_ACTION \ + } +#define FFB_CULL_QUAD(CULL_ACTION) \ + if (cc * fmesa->backface_sign > fmesa->ffb_zero) { \ + CULL_ACTION \ + } +#else +#define FFB_CULL_TRI(CULL_ACTION) do { } while (0) +#define FFB_CULL_QUAD(CULL_ACTION) do { } while (0) +#endif + +static void TAG(ffb_vb_triangles)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_TRIANGLES); + for (i = start + 2; i < count; i += 3) { + ffb_vertex *v0 = &fmesa->verts[ELT(i - 2)]; + ffb_vertex *v1 = &fmesa->verts[ELT(i - 1)]; + ffb_vertex *v2 = &fmesa->verts[ELT(i - 0)]; + FFB_AREA_DECLARE + + FFB_COMPUTE_AREA_TRI(v0, v1, v2); + FFB_CULL_TRI(continue;); + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 3) + 9)); + FFB_SET_PRIM_COLOR(v2); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); + + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + + FFB_SET_VERTEX_COLOR(v2); + ffb->z = FFB_GET_Z(v2); + ffb->y = FFB_GET_Y(v2); + ffb->x = FFB_GET_X(v2); + } + + fmesa->ffbScreen->rp_active = 1; +} + +static void TAG(ffb_vb_tri_strip)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + GLint parity = 0; + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_TRIANGLE_STRIP); + if ((flags & PRIM_PARITY) != 0) + parity = 1; + + i = start + 2; + goto something_clipped; + + something_clipped: + for (; i < count; i++, parity ^= 1) { + ffb_vertex *v0 = &fmesa->verts[ELT(i - 2 + parity)]; + ffb_vertex *v1 = &fmesa->verts[ELT(i - 1 - parity)]; + ffb_vertex *v2 = &fmesa->verts[ELT(i - 0)]; + FFB_AREA_DECLARE + + FFB_COMPUTE_AREA_TRI(v0, v1, v2); + FFB_CULL_TRI(continue;); + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 3) + 9)); + FFB_SET_PRIM_COLOR(v2); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); + + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + + FFB_SET_VERTEX_COLOR(v2); + ffb->z = FFB_GET_Z(v2); + ffb->y = FFB_GET_Y(v2); + ffb->x = FFB_GET_X(v2); + + i++; + parity ^= 1; + break; + } + + for (; i < count; i++, parity ^= 1) { + ffb_vertex *v0 = &fmesa->verts[ELT(i - 2 + parity)]; + ffb_vertex *v1 = &fmesa->verts[ELT(i - 1 - parity)]; + ffb_vertex *v2 = &fmesa->verts[ELT(i - 0)]; + FFB_AREA_DECLARE + (void) v0; (void) v1; + + FFB_COMPUTE_AREA_TRI(v0, v1, v2); + FFB_CULL_TRI(i++; parity^=1; goto something_clipped;); + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 1) + 3)); + FFB_SET_PRIM_COLOR(v2); + + FFB_SET_VERTEX_COLOR(v2); + ffb->z = FFB_GET_Z(v2); + ffb->y = FFB_GET_Y(v2); + ffb->x = FFB_GET_X(v2); + } + + fmesa->ffbScreen->rp_active = 1; +} + +static void TAG(ffb_vb_tri_fan)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_TRIANGLE_FAN); + + i = start + 2; + goto something_clipped; + + something_clipped: + for ( ; i < count; i++) { + ffb_vertex *v0 = &fmesa->verts[ELT(start)]; + ffb_vertex *v1 = &fmesa->verts[ELT(i - 1)]; + ffb_vertex *v2 = &fmesa->verts[ELT(i - 0)]; + FFB_AREA_DECLARE + + FFB_COMPUTE_AREA_TRI(v0, v1, v2); + FFB_CULL_TRI(continue;); + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 3) + 9)); + FFB_SET_PRIM_COLOR(v2); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); + + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + + FFB_SET_VERTEX_COLOR(v2); + ffb->z = FFB_GET_Z(v2); + ffb->y = FFB_GET_Y(v2); + ffb->x = FFB_GET_X(v2); + + i++; + break; + } + + for (; i < count; i++) { + ffb_vertex *v0 = &fmesa->verts[ELT(start)]; + ffb_vertex *v1 = &fmesa->verts[ELT(i - 1)]; + ffb_vertex *v2 = &fmesa->verts[ELT(i - 0)]; + FFB_AREA_DECLARE + (void) v0; (void) v1; + + FFB_COMPUTE_AREA_TRI(v0, v1, v2); + FFB_CULL_TRI(i++; goto something_clipped;); + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 1) + 3)); + FFB_SET_PRIM_COLOR(v2); + + FFB_SET_VERTEX_COLOR(v2); + ffb->z = FFB_GET_Z(v2); + ffb->dmyf = FFB_GET_Y(v2); + ffb->dmxf = FFB_GET_X(v2); + } + + fmesa->ffbScreen->rp_active = 1; +} + +static void TAG(ffb_vb_poly)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_POLYGON); + + /* XXX Optimize XXX */ + for (i = start + 2; i < count; i++) { + ffb_vertex *v0 = &fmesa->verts[ELT(i - 1)]; + ffb_vertex *v1 = &fmesa->verts[ELT(i)]; + ffb_vertex *v2 = &fmesa->verts[ELT(start)]; + FFB_AREA_DECLARE + + FFB_COMPUTE_AREA_TRI(v0, v1, v2); + FFB_CULL_TRI(continue;); + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 3) + 9)); + FFB_SET_PRIM_COLOR(v2); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); + + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + + FFB_SET_VERTEX_COLOR(v2); + ffb->z = FFB_GET_Z(v2); + ffb->y = FFB_GET_Y(v2); + ffb->x = FFB_GET_X(v2); + } + + fmesa->ffbScreen->rp_active = 1; +} + +static void TAG(ffb_vb_quads)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_QUADS); + + for (i = start + 3; i < count; i += 4) { + ffb_vertex *v0 = &fmesa->verts[ELT(i - 3)]; + ffb_vertex *v1 = &fmesa->verts[ELT(i - 2)]; + ffb_vertex *v2 = &fmesa->verts[ELT(i - 1)]; + ffb_vertex *v3 = &fmesa->verts[ELT(i - 0)]; + FFB_AREA_DECLARE + + FFB_COMPUTE_AREA_QUAD(v0, v1, v2, v3); + FFB_CULL_QUAD(continue;); + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 4) + 12)); + FFB_SET_PRIM_COLOR(v3); + + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); + + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + + FFB_SET_VERTEX_COLOR(v2); + ffb->z = FFB_GET_Z(v2); + ffb->y = FFB_GET_Y(v2); + ffb->x = FFB_GET_X(v2); + + FFB_SET_VERTEX_COLOR(v3); + ffb->z = FFB_GET_Z(v3); + ffb->dmyf = FFB_GET_Y(v3); + ffb->dmxf = FFB_GET_X(v3); + } + + fmesa->ffbScreen->rp_active = 1; +} + +static void TAG(ffb_vb_quad_strip)(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + GLint i; + IMPL_LOCAL_VARS; + +#ifdef FFB_RENDER_TRACE + fprintf(stderr, "%s: start(%d) count(%d) flags(%x)\n", + __FUNCTION__, start, count, flags); +#endif + ffbRenderPrimitive(ctx, GL_QUAD_STRIP); + + /* XXX Optimize XXX */ + for (i = start + 3; i < count; i += 2) { + ffb_vertex *v0 = &fmesa->verts[ELT(i - 1)]; + ffb_vertex *v1 = &fmesa->verts[ELT(i - 3)]; + ffb_vertex *v2 = &fmesa->verts[ELT(i - 2)]; + ffb_vertex *v3 = &fmesa->verts[ELT(i - 0)]; + FFB_AREA_DECLARE + + FFB_COMPUTE_AREA_QUAD(v0, v1, v2, v3); + FFB_CULL_QUAD(continue;); + + FFBFifo(fmesa, (FFB_PRIM_COLOR_COST + + (FFB_VERTEX_COLOR_COST * 4) + 12)); + FFB_SET_PRIM_COLOR(v3); + + FFB_DUMP_VERTEX(v0); + FFB_SET_VERTEX_COLOR(v0); + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); + + FFB_DUMP_VERTEX(v1); + FFB_SET_VERTEX_COLOR(v1); + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); + + FFB_DUMP_VERTEX(v2); + FFB_SET_VERTEX_COLOR(v2); + ffb->z = FFB_GET_Z(v2); + ffb->y = FFB_GET_Y(v2); + ffb->x = FFB_GET_X(v2); + + FFB_DUMP_VERTEX(v3); + FFB_SET_VERTEX_COLOR(v3); + ffb->z = FFB_GET_Z(v3); + ffb->dmyf = FFB_GET_Y(v3); + ffb->dmxf = FFB_GET_X(v3); + } + + fmesa->ffbScreen->rp_active = 1; +} + +static void (*TAG(render_tab)[GL_POLYGON + 2])(GLcontext *, GLuint, GLuint, GLuint) = +{ +#if !(IND & (FFB_TRI_CULL_BIT)) + TAG(ffb_vb_points), + TAG(ffb_vb_lines), + TAG(ffb_vb_line_loop), + TAG(ffb_vb_line_strip), +#else + NULL, + NULL, + NULL, + NULL, +#endif + TAG(ffb_vb_triangles), + TAG(ffb_vb_tri_strip), + TAG(ffb_vb_tri_fan), + TAG(ffb_vb_quads), + TAG(ffb_vb_quad_strip), + TAG(ffb_vb_poly), + ffb_vb_noop, +}; + +#undef IND +#undef TAG + +#undef IMPL_LOCAL_VARS +#undef FFB_DECLARE_CACHED_COLOR +#undef FFB_COMPUTE_CACHED_COLOR +#undef FFB_CACHED_COLOR_SAME +#undef FFB_CACHED_COLOR_SET +#undef FFB_CACHED_COLOR_UPDATE +#undef FFB_SET_PRIM_COLOR +#undef FFB_PRIM_COLOR_COST +#undef FFB_SET_VERTEX_COLOR +#undef FFB_VERTEX_COLOR_COST +#undef RESET_STIPPLE +#undef FFB_AREA_DECLARE +#undef FFB_COMPUTE_AREA_TRI +#undef FFB_COMPUTE_AREA_QUAD +#undef FFB_CULL_TRI +#undef FFB_CULL_QUAD Index: xc/lib/GL/mesa/src/drv/ffb/ffb_span.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_span.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_span.c:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_span.c:1.1 Tue Jun 20 01:08:39 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_span.c Fri Feb 22 16:32:59 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_span.c,v 1.1 2000/06/20 05:08:39 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_span.c,v 1.2 2002/02/22 21:32:59 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller @@ -25,12 +25,14 @@ * David S. Miller */ -#include "types.h" +#include "mtypes.h" #include "ffb_dd.h" #include "ffb_span.h" #include "ffb_context.h" #include "ffb_lock.h" +#include "swrast/swrast.h" + #define DBG 0 #define HW_LOCK() \ @@ -45,10 +47,14 @@ #define LOCAL_VARS \ __DRIdrawablePrivate *dPriv = fmesa->driDrawable; \ GLuint height = dPriv->h; \ - char *buf - -#define INIT_MONO_PIXEL(p) \ - GLuint p = fmesa->MonoColor; + GLuint p; \ + char *buf; \ + (void) p + +#define INIT_MONO_PIXEL(p, color) \ + p = ((color[0] << 0) | \ + (color[1] << 8) | \ + (color[2] << 16)) /* We use WID clipping, so this test always passes. */ #define CLIPPIXEL(__x, __y) (1) @@ -112,22 +118,25 @@ void ffbDDInitSpanFuncs(GLcontext *ctx) { - ctx->Driver.WriteRGBASpan = ffbWriteRGBASpan_888; - ctx->Driver.WriteRGBSpan = ffbWriteRGBSpan_888; - ctx->Driver.WriteRGBAPixels = ffbWriteRGBAPixels_888; - ctx->Driver.WriteMonoRGBASpan = ffbWriteMonoRGBASpan_888; - ctx->Driver.WriteMonoRGBAPixels = ffbWriteMonoRGBAPixels_888; - ctx->Driver.ReadRGBASpan = ffbReadRGBASpan_888; - ctx->Driver.ReadRGBAPixels = ffbReadRGBAPixels_888; + struct swrast_device_driver *swdd = + _swrast_GetDeviceDriverReference(ctx); + + swdd->WriteRGBASpan = ffbWriteRGBASpan_888; + swdd->WriteRGBSpan = ffbWriteRGBSpan_888; + swdd->WriteRGBAPixels = ffbWriteRGBAPixels_888; + swdd->WriteMonoRGBASpan = ffbWriteMonoRGBASpan_888; + swdd->WriteMonoRGBAPixels = ffbWriteMonoRGBAPixels_888; + swdd->ReadRGBASpan = ffbReadRGBASpan_888; + swdd->ReadRGBAPixels = ffbReadRGBAPixels_888; /* We don't support color index mode yet, but it will be * very easy to do. -DaveM */ - 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; + swdd->WriteCI8Span = NULL; + swdd->WriteCI32Span = NULL; + swdd->WriteMonoCISpan = NULL; + swdd->WriteCI32Pixels = NULL; + swdd->WriteMonoCIPixels = NULL; + swdd->ReadCI32Span = NULL; + swdd->ReadCI32Pixels = 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.2 xc/lib/GL/mesa/src/drv/ffb/ffb_state.c:1.5 --- xc/lib/GL/mesa/src/drv/ffb/ffb_state.c:1.2 Thu May 24 12:34:49 2001 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_state.c Wed Oct 30 07:51:27 2002 @@ -1,7 +1,7 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c,v 1.2 2001/05/24 16:34:49 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c,v 1.5 2002/10/30 12:51:27 alanh Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D - * Copyright (C) 2000 David S. Miller + * Copyright (C) 2000, 2001 David S. Miller * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,8 +25,7 @@ * David S. Miller */ -#include "types.h" -#include "vbrender.h" +#include "mtypes.h" #include #include @@ -43,12 +42,15 @@ #include "ffb_state.h" #include "ffb_lock.h" #include "extensions.h" -#include "vb.h" -#include "dd.h" #include "enums.h" -#include "pipeline.h" -#include "pb.h" +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "swrast_setup/swrast_setup.h" + +#include "tnl/t_pipeline.h" + #undef STATE_TRACE static unsigned int ffbComputeAlphaFunc(GLcontext *ctx) @@ -57,7 +59,7 @@ #ifdef STATE_TRACE fprintf(stderr, "ffbDDAlphaFunc: func(%s) ref(%02x)\n", - gl_lookup_enum_by_nr(ctx->Color.AlphaFunc), + _mesa_lookup_enum_by_nr(ctx->Color.AlphaFunc), ctx->Color.AlphaRef & 0xff); #endif @@ -80,7 +82,7 @@ return xclip; } -static void ffbDDAlphaFunc(GLcontext *ctx, GLenum func, GLclampf ref) +static void ffbDDAlphaFunc(GLcontext *ctx, GLenum func, GLchan ref) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); @@ -89,23 +91,18 @@ if (fmesa->xclip != xclip) { fmesa->xclip = xclip; - fmesa->state_dirty |= FFB_STATE_XCLIP; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_XCLIP, 1); } } } static void ffbDDBlendEquation(GLcontext *ctx, GLenum mode) { - ffbContextPtr fmesa = FFB_CONTEXT(ctx); #ifdef STATE_TRACE - fprintf(stderr, "ffbDDBlendEquation: mode(%s)\n", gl_lookup_enum_by_nr(mode)); + fprintf(stderr, "ffbDDBlendEquation: mode(%s)\n", _mesa_lookup_enum_by_nr(mode)); #endif - if (mode != GL_FUNC_ADD_EXT) - fmesa->bad_fragment_attrs |= FFB_BADATTR_BLENDEQN; - else - fmesa->bad_fragment_attrs &= ~FFB_BADATTR_BLENDEQN; + FALLBACK( ctx, (mode != GL_FUNC_ADD_EXT), FFB_BADATTR_BLENDEQN); } static void ffbDDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor) @@ -115,7 +112,7 @@ #ifdef STATE_TRACE fprintf(stderr, "ffbDDBlendFunc: sfactor(%s) dfactor(%s)\n", - gl_lookup_enum_by_nr(sfactor), gl_lookup_enum_by_nr(dfactor)); + _mesa_lookup_enum_by_nr(sfactor), _mesa_lookup_enum_by_nr(dfactor)); #endif switch (ctx->Color.BlendSrcRGB) { case GL_ZERO: @@ -136,7 +133,7 @@ default: if (ctx->Color.BlendEnabled) - fmesa->bad_fragment_attrs |= FFB_BADATTR_BLENDFUNC; + FALLBACK( ctx, FFB_BADATTR_BLENDFUNC, GL_TRUE ); return; }; @@ -159,7 +156,7 @@ default: if (ctx->Color.BlendEnabled) - fmesa->bad_fragment_attrs |= FFB_BADATTR_BLENDFUNC; + FALLBACK( ctx, FFB_BADATTR_BLENDFUNC, GL_TRUE ); return; }; @@ -173,17 +170,15 @@ * also it would add more state tracking to a lot * of the code in this file. */ - fmesa->bad_fragment_attrs |= FFB_BADATTR_BLENDROP; + FALLBACK(ctx, FFB_BADATTR_BLENDROP, GL_TRUE); return; } - fmesa->bad_fragment_attrs &= ~(FFB_BADATTR_BLENDFUNC | - FFB_BADATTR_BLENDROP); + FALLBACK( ctx, (FFB_BADATTR_BLENDFUNC|FFB_BADATTR_BLENDROP), GL_FALSE ); if (blendc != fmesa->blendc) { fmesa->blendc = blendc; - fmesa->state_dirty |= FFB_STATE_BLEND; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_BLEND, 1); } } @@ -193,10 +188,10 @@ { #ifdef STATE_TRACE fprintf(stderr, "ffbDDBlendFuncSeparate: sRGB(%s) dRGB(%s) sA(%s) dA(%s)\n", - gl_lookup_enum_by_nr(sfactorRGB), - gl_lookup_enum_by_nr(dfactorRGB), - gl_lookup_enum_by_nr(sfactorA), - gl_lookup_enum_by_nr(dfactorA)); + _mesa_lookup_enum_by_nr(sfactorRGB), + _mesa_lookup_enum_by_nr(dfactorRGB), + _mesa_lookup_enum_by_nr(sfactorA), + _mesa_lookup_enum_by_nr(dfactorA)); #endif ffbDDBlendFunc(ctx, sfactorRGB, dfactorRGB); @@ -209,7 +204,7 @@ #ifdef STATE_TRACE fprintf(stderr, "ffbDDDepthFunc: func(%s)\n", - gl_lookup_enum_by_nr(func)); + _mesa_lookup_enum_by_nr(func)); #endif switch (func) { @@ -248,8 +243,7 @@ cmp = (fmesa->cmp & ~(0xff<<16)) | cmp; if (cmp != fmesa->cmp) { fmesa->cmp = cmp; - fmesa->state_dirty |= FFB_STATE_CMP; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_CMP, 1); } } @@ -277,8 +271,7 @@ fbc &= ~FFB_FBC_WB_C; } fmesa->fbc = fbc; - fmesa->state_dirty |= FFB_STATE_FBC; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_FBC, 1); } } @@ -322,8 +315,7 @@ fmesa->stencil = stencil; fmesa->stencilctl = stencilctl; fmesa->consty = consty; - fmesa->state_dirty |= FFB_STATE_STENCIL; - fmesa->state_fifo_ents += 6; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_STENCIL, 6); } } @@ -334,8 +326,7 @@ mask &= 0xf; if (fmesa->ypmask != mask) { fmesa->ypmask = mask; - fmesa->state_dirty |= FFB_STATE_YPMASK; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_YPMASK, 1); } } @@ -391,60 +382,115 @@ if (fmesa->stencilctl != stencilctl) { fmesa->stencilctl = stencilctl; - fmesa->state_dirty |= FFB_STATE_STENCIL; - fmesa->state_fifo_ents += 6; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_STENCIL, 6); } } -void ffbDDScissor(GLcontext *ctx, GLint cx, GLint cy, - GLsizei cw, GLsizei ch) +static void ffbCalcViewportRegs(GLcontext *ctx) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = fmesa->driDrawable; - GLint x, y; + GLuint xmin, xmax, ymin, ymax, zmin, zmax; unsigned int vcmin, vcmax; -#ifdef STATE_TRACE - fprintf(stderr, "ffbDDScissor: x(%x) y(%x) w(%x) h(%x)\n", - cx, cy, cw, ch); -#endif - x = cx + dPriv->x; - y = dPriv->y + (cy - ch); - vcmin = ((y & 0xffff) << 16) | (x & 0xffff); - vcmax = ((((y + ch) & 0xffff) << 16) | - (((x + cw) & 0xffff))); + xmin = ctx->Viewport.X + dPriv->x; + xmax = xmin + ctx->Viewport.Width; + ymax = dPriv->y + dPriv->h - ctx->Viewport.Y; + ymin = ymax - ctx->Viewport.Height; + if (ctx->Scissor.Enabled) { + GLuint sc_xmin, sc_xmax, sc_ymin, sc_ymax; + + sc_xmin = ctx->Viewport.X + dPriv->x; + sc_xmax = sc_xmin + ctx->Viewport.Width; + sc_ymax = dPriv->y + dPriv->h - ctx->Viewport.Y; + sc_ymin = sc_ymax - ctx->Viewport.Height; + if (sc_xmin > xmin) + xmin = sc_xmin; + if (sc_xmax < xmax) + xmax = sc_xmax; + if (sc_ymin > ymin) + ymin = sc_ymin; + if (sc_ymax < ymax) + ymax = sc_ymax; + } + zmin = ((GLdouble)ctx->Viewport.Near * 0x0fffffff); + zmax = ((GLdouble)ctx->Viewport.Far * 0x0fffffff); + + vcmin = ((ymin & 0xffff) << 16) | (xmin & 0xffff); + vcmax = ((ymax & 0xffff) << 16) | (xmax & 0xffff); if (fmesa->vclipmin != vcmin || - fmesa->vclipmax != vcmax) { + fmesa->vclipmax != vcmax || + fmesa->vclipzmin != zmin || + fmesa->vclipzmax != zmax) { fmesa->vclipmin = vcmin; fmesa->vclipmax = vcmax; - fmesa->state_dirty |= FFB_STATE_CLIP; - fmesa->state_fifo_ents += 4 + (4 * 2); + fmesa->vclipzmin = zmin; + fmesa->vclipzmax = zmax; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_CLIP, (4 + (4 * 2))); } } + +void ffbCalcViewport(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + const GLfloat *v = ctx->Viewport._WindowMap.m; + GLfloat *m = fmesa->hw_viewport; + __DRIdrawablePrivate *dPriv = fmesa->driDrawable; + + m[MAT_SX] = v[MAT_SX]; + m[MAT_TX] = v[MAT_TX] + dPriv->x + SUBPIXEL_X; + m[MAT_SY] = - v[MAT_SY]; + m[MAT_TY] = - v[MAT_TY] + dPriv->h + dPriv->y + SUBPIXEL_Y; + m[MAT_SZ] = v[MAT_SZ] * ((GLdouble)1.0 / (GLdouble)0x0fffffff); + m[MAT_TZ] = v[MAT_TZ] * ((GLdouble)1.0 / (GLdouble)0x0fffffff); + + fmesa->depth_scale = ((GLdouble)1.0 / (GLdouble)0x0fffffff); + + ffbCalcViewportRegs(ctx); + + fmesa->setupnewinputs |= VERT_CLIP; +} + +static void ffbDDViewport(GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height) +{ + ffbCalcViewport(ctx); +} + +static void ffbDDDepthRange(GLcontext *ctx, GLclampd nearval, GLclampd farval) +{ + ffbCalcViewport(ctx); +} -static GLboolean ffbDDSetDrawBuffer(GLcontext *ctx, GLenum buffer) +static void ffbDDScissor(GLcontext *ctx, GLint cx, GLint cy, + GLsizei cw, GLsizei ch) +{ + ffbCalcViewport(ctx); +} + +static void ffbDDSetDrawBuffer(GLcontext *ctx, GLenum buffer) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); unsigned int fbc = fmesa->fbc; #ifdef STATE_TRACE fprintf(stderr, "ffbDDSetDrawBuffer: mode(%s)\n", - gl_lookup_enum_by_nr(buffer)); + _mesa_lookup_enum_by_nr(buffer)); #endif - fbc &= ~(FFB_FBC_WB_AB); + fbc &= ~(FFB_FBC_WB_AB | FFB_FBC_RB_MASK); switch (buffer) { case GL_FRONT_LEFT: if (fmesa->back_buffer == 0) - fbc |= FFB_FBC_WB_B; + fbc |= FFB_FBC_WB_B | FFB_FBC_RB_B; else - fbc |= FFB_FBC_WB_A; + fbc |= FFB_FBC_WB_A | FFB_FBC_RB_A; break; case GL_BACK_LEFT: if (fmesa->back_buffer == 0) - fbc |= FFB_FBC_WB_A; + fbc |= FFB_FBC_WB_A | FFB_FBC_RB_A; else - fbc |= FFB_FBC_WB_B; + fbc |= FFB_FBC_WB_B | FFB_FBC_RB_B; break; case GL_FRONT_AND_BACK: @@ -452,16 +498,13 @@ break; default: - return GL_FALSE; + return; }; if (fbc != fmesa->fbc) { fmesa->fbc = fbc; - fmesa->state_dirty |= FFB_STATE_FBC; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_FBC, 1); } - - return GL_TRUE; } static void ffbDDSetReadBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, @@ -472,7 +515,7 @@ #ifdef STATE_TRACE fprintf(stderr, "ffbDDSetReadBuffer: mode(%s)\n", - gl_lookup_enum_by_nr(buffer)); + _mesa_lookup_enum_by_nr(buffer)); #endif fbc &= ~(FFB_FBC_RB_MASK); switch (buffer) { @@ -496,27 +539,17 @@ if (fbc != fmesa->fbc) { fmesa->fbc = fbc; - fmesa->state_dirty |= FFB_STATE_FBC; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_FBC, 1); } } - -static void ffbDDSetColor(GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a) -{ - ffbContextPtr fmesa = FFB_CONTEXT(ctx); - - fmesa->MonoColor = ((r << 0) | - (g << 8) | - (b << 16)); -} -static void ffbDDClearColor(GLcontext *ctx, GLubyte r, GLubyte g, GLubyte b, GLubyte a) +static void ffbDDClearColor(GLcontext *ctx, const GLchan color[4]) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - fmesa->clear_pixel = ((r << 0) | - (g << 8) | - (b << 16)); + fmesa->clear_pixel = ((color[0] << 0) | + (color[1] << 8) | + (color[2] << 16)); } static void ffbDDClearDepth(GLcontext *ctx, GLclampd depth) @@ -533,149 +566,10 @@ fmesa->clear_stencil = stencil & 0xf; } -static void ffbDDReducedPrimitiveChange(GLcontext *ctx, GLenum prim) -{ - ffbContextPtr fmesa = FFB_CONTEXT(ctx); - GLuint drawop, fbc, ppc; - int do_sw = 0; - - drawop = fmesa->drawop; - fbc = fmesa->fbc; - ppc = fmesa->ppc & ~(FFB_PPC_ZS_MASK | FFB_PPC_CS_MASK); - -#ifdef STATE_TRACE - fprintf(stderr, - "ffbDDReducedPrimitiveChange: prim(%d) ", prim); -#endif - switch(prim) { - case GL_POINT: - case GL_POINTS: -#ifdef STATE_TRACE - fprintf(stderr, "GL_POINTS "); -#endif - if (ctx->IndirectTriangles & DD_POINT_SW_RASTERIZE) { - do_sw = 1; - break; - } - - if (ctx->TriangleCaps & DD_POINT_SIZE) { - ppc |= FFB_PPC_ZS_CONST | FFB_PPC_CS_CONST; - drawop = FFB_DRAWOP_TRIANGLE; - } else { - if (ctx->Point.SmoothFlag) { - ppc |= (FFB_PPC_ZS_VAR | FFB_PPC_CS_CONST); - drawop = FFB_DRAWOP_AADOT; - } else { - ppc |= (FFB_PPC_ZS_CONST | FFB_PPC_CS_CONST); - drawop = FFB_DRAWOP_DOT; - } - } - break; - - case GL_LINE: - case GL_LINES: -#ifdef STATE_TRACE - fprintf(stderr, "GL_LINES "); -#endif - if (ctx->IndirectTriangles & DD_LINE_SW_RASTERIZE) { - do_sw = 1; - break; - } - - if (ctx->TriangleCaps & DD_FLATSHADE) { - ppc |= FFB_PPC_ZS_VAR | FFB_PPC_CS_CONST; - } else { - ppc |= FFB_PPC_ZS_VAR | FFB_PPC_CS_VAR; - } - if (ctx->TriangleCaps & DD_LINE_WIDTH) { - drawop = FFB_DRAWOP_TRIANGLE; - } else { - if (ctx->Line.SmoothFlag) - drawop = FFB_DRAWOP_AALINE; - else - drawop = FFB_DRAWOP_DDLINE; - } - break; - - case GL_POLYGON: -#ifdef STATE_TRACE - fprintf(stderr, "GL_POLYGON "); -#endif - if (ctx->IndirectTriangles & DD_TRI_SW_RASTERIZE) { - do_sw = 1; - break; - } - - ppc &= ~FFB_PPC_APE_MASK; - if (ctx->Polygon.StippleFlag) - ppc |= FFB_PPC_APE_ENABLE; - else - ppc |= FFB_PPC_APE_DISABLE; - - if (ctx->TriangleCaps & DD_FLATSHADE) { - ppc |= FFB_PPC_ZS_VAR | FFB_PPC_CS_CONST; - } else { - ppc |= FFB_PPC_ZS_VAR | FFB_PPC_CS_VAR; - } - drawop = FFB_DRAWOP_TRIANGLE; - break; - - default: -#ifdef STATE_TRACE - fprintf(stderr, "unknown %d!\n", prim); -#endif - return; - }; - -#ifdef STATE_TRACE - fprintf(stderr, "do_sw(%d) ", do_sw); -#endif - if (do_sw != 0) { - fbc &= ~(FFB_FBC_WB_C); - fbc &= ~(FFB_FBC_ZE_MASK | FFB_FBC_RGBE_MASK); - fbc |= FFB_FBC_ZE_OFF | FFB_FBC_RGBE_MASK; - ppc &= ~(FFB_PPC_XS_MASK | FFB_PPC_ABE_MASK | - FFB_PPC_DCE_MASK | FFB_PPC_APE_MASK); - ppc |= (FFB_PPC_ZS_VAR | FFB_PPC_CS_VAR | FFB_PPC_XS_WID | - FFB_PPC_ABE_DISABLE | FFB_PPC_DCE_DISABLE | - FFB_PPC_APE_DISABLE); - } else { - fbc |= FFB_FBC_WB_C; - fbc &= ~(FFB_FBC_RGBE_MASK); - fbc |= FFB_FBC_RGBE_MASK; - ppc &= ~(FFB_PPC_ABE_MASK | FFB_PPC_XS_MASK); - if (ctx->Color.BlendEnabled) { - ppc |= FFB_PPC_ABE_ENABLE | FFB_PPC_XS_VAR; - } else { - ppc |= FFB_PPC_ABE_DISABLE | FFB_PPC_XS_WID; - } - } -#ifdef STATE_TRACE - fprintf(stderr, "fbc(%08x) ppc(%08x)\n", fbc, ppc); -#endif - - FFBFifo(fmesa, 4); - if (fmesa->drawop != drawop) - fmesa->regs->drawop = fmesa->drawop = drawop; - if (fmesa->fbc != fbc) - fmesa->regs->fbc = fmesa->fbc = fbc; - if (fmesa->ppc != ppc) - fmesa->regs->ppc = fmesa->ppc = ppc; - if (do_sw != 0) { - fmesa->regs->cmp = - (fmesa->cmp & ~(0xff<<16)) | (0x80 << 16); - } else - fmesa->regs->cmp = fmesa->cmp; - - /* Flush the vertex cache. */ - fmesa->vtx_cache[0] = fmesa->vtx_cache[1] = - fmesa->vtx_cache[2] = fmesa->vtx_cache[3] = NULL; -} - /* XXX Actually, should I be using FBC controls for this? -DaveM */ -static GLboolean ffbDDColorMask(GLcontext *ctx, - GLboolean r, GLboolean g, - GLboolean b, GLboolean a) +static void ffbDDColorMask(GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); unsigned int new_pmask = 0x0; @@ -693,21 +587,18 @@ if (fmesa->pmask != new_pmask) { fmesa->pmask = new_pmask; - fmesa->state_dirty |= FFB_STATE_PMASK; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_PMASK, 1); } - - return GL_TRUE; } -static GLboolean ffbDDLogicOp(GLcontext *ctx, GLenum op) +static void ffbDDLogicOp(GLcontext *ctx, GLenum op) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); unsigned int rop; #ifdef STATE_TRACE fprintf(stderr, "ffbDDLogicOp: op(%s)\n", - gl_lookup_enum_by_nr(op)); + _mesa_lookup_enum_by_nr(op)); #endif switch (op) { case GL_CLEAR: rop = FFB_ROP_ZERO; break; @@ -728,20 +619,17 @@ case GL_OR_INVERTED: rop = FFB_ROP_NNEW_OR_OLD; break; default: - return GL_FALSE; + return; }; rop |= fmesa->rop & ~0xff; if (rop != fmesa->rop) { fmesa->rop = rop; - fmesa->state_dirty |= FFB_STATE_ROP; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_ROP, 1); if (op == GL_COPY) - fmesa->bad_fragment_attrs &= ~FFB_BADATTR_BLENDROP; + FALLBACK( ctx, FFB_BADATTR_BLENDROP, GL_FALSE ); } - - return GL_TRUE; } #if 0 @@ -824,7 +712,7 @@ static void ffbDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) { #ifdef STATE_TRACE - fprintf(stderr, "ffbDDFogfv: pname(%s)\n", gl_lookup_enum_by_nr(pname)); + fprintf(stderr, "ffbDDFogfv: pname(%s)\n", _mesa_lookup_enum_by_nr(pname)); #endif } @@ -839,11 +727,9 @@ if (ctx->Line.StippleFlag) { factor = ctx->Line.StippleFactor; pattern = ctx->Line.StipplePattern; - if ((GLuint) factor > 15) { - ctx->Driver.TriangleCaps &= ~DD_LINE_STIPPLE; + if ((GLuint) factor > 15) { fmesa->lpat = FFB_LPAT_BAD; } else { - ctx->Driver.TriangleCaps |= DD_LINE_STIPPLE; fmesa->lpat = ((factor << FFB_LPAT_SCALEVAL_SHIFT) | (0 << FFB_LPAT_PATLEN_SHIFT) | ((pattern & 0xffff) << FFB_LPAT_PATTERN_SHIFT)); @@ -874,8 +760,7 @@ mask += 4; } - fmesa->state_dirty |= FFB_STATE_APAT; - fmesa->state_fifo_ents += 32; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_APAT, 32); } static void ffbDDPolygonStipple(GLcontext *ctx, const GLubyte *mask) @@ -886,11 +771,6 @@ fprintf(stderr, "ffbDDPolygonStipple: state(%d)\n", ctx->Polygon.StippleFlag); #endif - if (ctx->Polygon.StippleFlag) { - ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; - } else { - ctx->Driver.TriangleCaps &= ~DD_TRI_STIPPLE; - } ffbXformAreaPattern(fmesa, mask); } @@ -901,7 +781,7 @@ #ifdef STATE_TRACE fprintf(stderr, "ffbDDEnable: %s state(%d)\n", - gl_lookup_enum_by_nr(cap), state); + _mesa_lookup_enum_by_nr(cap), state); #endif switch (cap) { case GL_ALPHA_TEST: @@ -912,8 +792,7 @@ if (tmp != fmesa->xclip) { fmesa->xclip = tmp; - fmesa->state_dirty |= FFB_STATE_XCLIP; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_XCLIP, 1); } break; @@ -926,8 +805,7 @@ } if (fmesa->ppc != tmp) { fmesa->ppc = tmp; - fmesa->state_dirty |= FFB_STATE_PPC; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_PPC, 1); ffbDDBlendFunc(ctx, 0, 0); } break; @@ -947,29 +825,18 @@ fmesa->fbc = fbc; ffbDDDepthFunc(ctx, ctx->Depth.Func); fmesa->magnc = tmp; - fmesa->state_dirty |= FFB_STATE_MAGNC | FFB_STATE_FBC; - fmesa->state_fifo_ents += 2; + FFB_MAKE_DIRTY(fmesa, (FFB_STATE_MAGNC | FFB_STATE_FBC), 2); } break; case GL_SCISSOR_TEST: - tmp = fmesa->ppc & ~FFB_PPC_VCE_MASK; - if (state) { - ffbDDScissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, - ctx->Scissor.Width, ctx->Scissor.Height); - tmp |= FFB_PPC_VCE_2D; - } else { - tmp |= FFB_PPC_VCE_DISABLE; - } + ffbDDScissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.Height); break; case GL_STENCIL_TEST: if (!(fmesa->ffb_sarea->flags & FFB_DRI_FFB2PLUS)) { - if (state) - fmesa->bad_fragment_attrs |= FFB_BADATTR_STENCIL; - else - fmesa->bad_fragment_attrs &= ~FFB_BADATTR_STENCIL; - break; + FALLBACK( ctx, FFB_BADATTR_STENCIL, state ); } tmp = fmesa->fbc & ~FFB_FBC_YE_MASK; @@ -987,23 +854,18 @@ } else { fmesa->stencil = 0xf0000000; fmesa->stencilctl = 0x33300000; - fmesa->state_dirty |= FFB_STATE_STENCIL; - fmesa->state_fifo_ents += 6; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_STENCIL, 6); tmp |= FFB_FBC_YE_OFF; } if (tmp != fmesa->fbc) { fmesa->fbc = tmp; - fmesa->state_dirty |= FFB_STATE_FBC; - fmesa->state_fifo_ents += 1; + FFB_MAKE_DIRTY(fmesa, FFB_STATE_FBC, 1); } break; case GL_FOG: /* Until I implement the fog support... */ - if (state) - fmesa->bad_fragment_attrs |= FFB_BADATTR_FOG; - else - fmesa->bad_fragment_attrs &= ~FFB_BADATTR_FOG; + FALLBACK( ctx, FFB_BADATTR_FOG, state ); break; case GL_LINE_STIPPLE: @@ -1137,59 +999,36 @@ fmesa->ffbScreen->rp_active = 1; } -static void ffbDDRenderStart(GLcontext *ctx) +static void ffbDDUpdateState(GLcontext *ctx, GLuint newstate) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - - LOCK_HARDWARE(fmesa); - fmesa->hw_locked = 1; - - if (fmesa->state_dirty != 0) - ffbSyncHardware(fmesa); -} -static void ffbDDRenderFinish(GLcontext *ctx) -{ - ffbContextPtr fmesa = FFB_CONTEXT(ctx); + /* When we are hw rendering, changing certain kinds of + * state does not require flushing all of our context. + */ + if (fmesa->bad_fragment_attrs == 0 && + (newstate & ~_NEW_COLOR) == 0) + return; - UNLOCK_HARDWARE(fmesa); - fmesa->hw_locked = 0; -} + _swrast_InvalidateState( ctx, newstate ); + _swsetup_InvalidateState( ctx, newstate ); + _ac_InvalidateState( ctx, newstate ); + _tnl_InvalidateState( ctx, newstate ); -#define INTERESTED (~(NEW_MODELVIEW|NEW_PROJECTION|\ - NEW_TEXTURE_MATRIX|\ - NEW_USER_CLIP|NEW_CLIENT_STATE|\ - NEW_TEXTURE_ENABLE)) - -static void ffbDDUpdateState(GLcontext *ctx) -{ - ffbContextPtr fmesa = FFB_CONTEXT(ctx); - unsigned int flags; - - if (ctx->NewState & INTERESTED) { - if (fmesa->SWrender || - fmesa->bad_fragment_attrs != 0) { - /* Force SW rendering. */ - fmesa->PointsFunc = NULL; - fmesa->LineFunc = NULL; - fmesa->TriangleFunc = NULL; - fmesa->QuadFunc = NULL; - } else { - ffbDDChooseTriRenderState(ctx); - ffbDDChooseLineRenderState(ctx); - ffbDDChoosePointRenderState(ctx); - } + if (newstate & _NEW_TEXTURE) + FALLBACK( ctx, FFB_BADATTR_TEXTURE, + (ctx->Texture._ReallyEnabled != 0)); - if (0) - gl_print_tri_caps("tricaps", ctx->TriangleCaps); +#ifdef STATE_TRACE + fprintf(stderr, "ffbDDUpdateState: newstate(%08x)\n", newstate); +#endif - ffbChooseRasterSetupFunc(ctx); + fmesa->new_gl_state |= newstate; - /* Force a reduced primitive change next rendering - * pass. - */ - ctx->PB->primitive = GL_POLYGON + 1; - } + /* Force a reduced primitive change next rendering + * pass. + */ + fmesa->raster_primitive = GL_POLYGON + 1; #if 0 /* When the modelview matrix changes, this changes what @@ -1198,45 +1037,18 @@ * * XXX DD_HAVE_HARDWARE_FOG. */ - if (ctx->Fog.Enabled && (ctx->NewState & NEW_MODELVIEW)) + if (ctx->Fog.Enabled && (newstate & _NEW_MODELVIEW)) ffb_update_fog(); #endif - - /* XXX It may be possible to eliminate all of Mesa's sw clip - * XXX processing using the hw clip registers we have. If - * XXX this is correct, it is just a matter of verifying the - * XXX FFB coordinate overflow rules in ffb_vb.c and if they - * XXX are not violated we clear CLIP_MASK_ACTIVE in - * XXX VB->CullMode. - * XXX - * XXX We would specify the xyz min/max values in the primary - * XXX viewport clip registers, and the user specified - * XXX scissor clip can go into one of the auxilliary viewport - * XXX clips. - */ - flags = ctx->IndirectTriangles; - if (fmesa->PointsFunc != NULL) { - ctx->Driver.PointsFunc = fmesa->PointsFunc; - flags &= ~DD_POINT_SW_RASTERIZE; - } - if (fmesa->LineFunc != NULL) { - ctx->Driver.LineFunc = fmesa->LineFunc; - flags &= ~DD_LINE_SW_RASTERIZE; - } - if (fmesa->TriangleFunc != NULL) { - ctx->Driver.TriangleFunc = fmesa->TriangleFunc; - ctx->Driver.QuadFunc = fmesa->QuadFunc; - flags &= ~(DD_TRI_SW_RASTERIZE | - DD_QUAD_SW_RASTERIZE); - } - ctx->IndirectTriangles = flags; } + void ffbDDInitStateFuncs(GLcontext *ctx) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); ctx->Driver.UpdateState = ffbDDUpdateState; + ctx->Driver.Enable = ffbDDEnable; ctx->Driver.LightModelfv = NULL; ctx->Driver.AlphaFunc = ffbDDAlphaFunc; @@ -1252,10 +1064,9 @@ ctx->Driver.CullFace = NULL; ctx->Driver.FrontFace = NULL; ctx->Driver.ColorMask = ffbDDColorMask; - ctx->Driver.LogicOp = ffbDDLogicOp; - ctx->Driver.ReducedPrimitiveChange = ffbDDReducedPrimitiveChange; - ctx->Driver.RenderStart = ffbDDRenderStart; - ctx->Driver.RenderFinish = ffbDDRenderFinish; + ctx->Driver.LogicOpcode = ffbDDLogicOp; + ctx->Driver.Viewport = ffbDDViewport; + ctx->Driver.DepthRange = ffbDDDepthRange; if (fmesa->ffb_sarea->flags & FFB_DRI_FFB2PLUS) { ctx->Driver.StencilFunc = ffbDDStencilFunc; @@ -1268,17 +1079,38 @@ } ctx->Driver.SetDrawBuffer = ffbDDSetDrawBuffer; - ctx->Driver.SetReadBuffer = ffbDDSetReadBuffer; - ctx->Driver.Color = ffbDDSetColor; ctx->Driver.ClearColor = ffbDDClearColor; ctx->Driver.ClearDepth = ffbDDClearDepth; ctx->Driver.ClearStencil = ffbDDClearStencil; - ctx->Driver.Dither = NULL; /* We will support color index modes later... -DaveM */ - ctx->Driver.Index = 0; ctx->Driver.ClearIndex = 0; ctx->Driver.IndexMask = 0; + + + + /* Pixel path fallbacks. + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; + + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; + + { + struct swrast_device_driver *swdd = + _swrast_GetDeviceDriverReference(ctx); + swdd->SetReadBuffer = ffbDDSetReadBuffer; + } + + } void ffbDDInitContextHwState(GLcontext *ctx) @@ -1291,13 +1123,14 @@ fmesa->bad_fragment_attrs = 0; fmesa->state_dirty = FFB_STATE_ALL; + fmesa->new_gl_state = ~0; fifo_count = 1; fmesa->fbc = (FFB_FBC_WE_FORCEON | FFB_FBC_WM_COMBINED | FFB_FBC_SB_BOTH | FFB_FBC_ZE_MASK | FFB_FBC_YE_OFF | FFB_FBC_XE_OFF | FFB_FBC_RGBE_MASK); - if (ctx->Visual->DBflag) { + if (ctx->Visual.doubleBufferMode) { /* Buffer B is the initial back buffer. */ fmesa->back_buffer = 1; fmesa->fbc |= FFB_FBC_WB_BC | FFB_FBC_RB_B; @@ -1308,7 +1141,7 @@ fifo_count += 1; fmesa->ppc = (FFB_PPC_ACE_DISABLE | FFB_PPC_DCE_DISABLE | - FFB_PPC_ABE_DISABLE | FFB_PPC_VCE_DISABLE | + FFB_PPC_ABE_DISABLE | FFB_PPC_VCE_3D | FFB_PPC_APE_DISABLE | FFB_PPC_TBE_OPAQUE | FFB_PPC_ZS_CONST | FFB_PPC_YS_CONST | FFB_PPC_XS_WID | FFB_PPC_CS_VAR); @@ -1378,9 +1211,9 @@ /* ViewPort clip state. */ fifo_count += 4 + (4 * 2); fmesa->vclipmin = 0x00000000; - fmesa->vclipmax = 0x00000000; + fmesa->vclipmax = 0xffffffff; fmesa->vclipzmin = 0x00000000; - fmesa->vclipzmax = 0x00000000; + fmesa->vclipzmax = 0x0fffffff; for (i = 0; i < 4; i++) { fmesa->aux_clips[0].min = 0x00000000; fmesa->aux_clips[0].max = 0x00000000; Index: xc/lib/GL/mesa/src/drv/ffb/ffb_state.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_state.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_state.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_state.h:1.1 Tue Jun 20 01:08:39 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_state.h Fri Feb 22 16:32:59 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.h,v 1.1 2000/06/20 05:08:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.h,v 1.2 2002/02/22 21:32:59 dawes Exp $ */ #ifndef _FFB_STATE_H #define _FFB_STATE_H @@ -6,7 +6,7 @@ extern void ffbDDInitStateFuncs(GLcontext *); extern void ffbDDInitContextHwState(GLcontext *); -extern void ffbDDScissor(GLcontext *, GLint, GLint, GLint, GLint); +extern void ffbCalcViewport(GLcontext *); extern void ffbXformAreaPattern(ffbContextPtr, const GLubyte *); extern void ffbSyncHardware(ffbContextPtr fmesa); Index: xc/lib/GL/mesa/src/drv/ffb/ffb_stencil.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_stencil.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_stencil.c:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_stencil.c:1.1 Tue Jun 20 01:08:39 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_stencil.c Fri Feb 22 16:32:59 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_stencil.c,v 1.1 2000/06/20 05:08:39 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_stencil.c,v 1.2 2002/02/22 21:32:59 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller @@ -25,17 +25,25 @@ * David S. Miller */ -#include "types.h" +#include "mtypes.h" #include "ffb_dd.h" #include "ffb_span.h" #include "ffb_context.h" #include "ffb_stencil.h" #include "ffb_lock.h" +#include "swrast/swrast.h" + +#undef STENCIL_TRACE + static void FFBWriteStencilSpan(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLstencil stencil[], const GLubyte mask[]) { +#ifdef STENCIL_TRACE + fprintf(stderr, "FFBWriteStencilSpan: n(%d) x(%d) y(%d)\n", + (int) n, x, y); +#endif if (ctx->Depth.Mask) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = fmesa->driDrawable; @@ -75,6 +83,9 @@ FFBWriteStencilPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLstencil stencil[], const GLubyte mask[]) { +#ifdef STENCIL_TRACE + fprintf(stderr, "FFBWriteStencilPixels: n(%d)\n", (int) n); +#endif if (ctx->Depth.Mask) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = fmesa->driDrawable; @@ -121,6 +132,10 @@ GLuint *zptr; GLuint i; +#ifdef STENCIL_TRACE + fprintf(stderr, "FFBReadStencilSpan: n(%d) x(%d) y(%d)\n", + (int) n, x, y); +#endif if (!fmesa->hw_locked) LOCK_HARDWARE(fmesa); FFBFifo(fmesa, 1); @@ -155,6 +170,9 @@ char *zbase; GLuint i; +#ifdef STENCIL_TRACE + fprintf(stderr, "FFBReadStencilPixels: n(%d)\n", (int) n); +#endif if (!fmesa->hw_locked) LOCK_HARDWARE(fmesa); FFBFifo(fmesa, 1); @@ -186,15 +204,18 @@ { ffbContextPtr fmesa = FFB_CONTEXT(ctx); + struct swrast_device_driver *swdd = + _swrast_GetDeviceDriverReference(ctx); + if (fmesa->ffb_sarea->flags & FFB_DRI_FFB2PLUS) { - ctx->Driver.WriteStencilSpan = FFBWriteStencilSpan; - ctx->Driver.ReadStencilSpan = FFBReadStencilSpan; - ctx->Driver.WriteStencilPixels = FFBWriteStencilPixels; - ctx->Driver.ReadStencilPixels = FFBReadStencilPixels; + swdd->WriteStencilSpan = FFBWriteStencilSpan; + swdd->ReadStencilSpan = FFBReadStencilSpan; + swdd->WriteStencilPixels = FFBWriteStencilPixels; + swdd->ReadStencilPixels = FFBReadStencilPixels; } else { - ctx->Driver.WriteStencilSpan = NULL; - ctx->Driver.ReadStencilSpan = NULL; - ctx->Driver.WriteStencilPixels = NULL; - ctx->Driver.ReadStencilPixels = NULL; + swdd->WriteStencilSpan = NULL; + swdd->ReadStencilSpan = NULL; + swdd->WriteStencilPixels = NULL; + swdd->ReadStencilPixels = NULL; } } Index: xc/lib/GL/mesa/src/drv/ffb/ffb_tex.c diff -u /dev/null xc/lib/GL/mesa/src/drv/ffb/ffb_tex.c:1.1 --- /dev/null Thu Feb 27 12:26:20 2003 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_tex.c Fri Feb 22 16:32:59 2002 @@ -0,0 +1,51 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_tex.c,v 1.1 2002/02/22 21:32:59 dawes Exp $ + * + * GLX Hardware Device Driver for Sun Creator/Creator3D + * Copyright (C) 2001 David S. Miller + * + * 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 + * 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. + * + * + * David S. Miller + */ + +#include +#include "texformat.h" +#include "texstore.h" +#include "swrast/swrast.h" + +#include "ffb_tex.h" + +/* No texture unit, all software. */ +void ffbDDInitTexFuncs(GLcontext *ctx) +{ + ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format; + ctx->Driver.TexImage1D = _mesa_store_teximage1d; + ctx->Driver.TexImage2D = _mesa_store_teximage2d; + ctx->Driver.TexImage3D = _mesa_store_teximage3d; + ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d; + ctx->Driver.TexSubImage2D = _mesa_store_texsubimage2d; + ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; + ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; + ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; + ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; + ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; + ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; + ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; +} Index: xc/lib/GL/mesa/src/drv/ffb/ffb_tex.h diff -u /dev/null xc/lib/GL/mesa/src/drv/ffb/ffb_tex.h:1.1 --- /dev/null Thu Feb 27 12:26:20 2003 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_tex.h Fri Feb 22 16:32:59 2002 @@ -0,0 +1,34 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_tex.h,v 1.1 2002/02/22 21:32:59 dawes Exp $ + * + * GLX Hardware Device Driver for Sun Creator/Creator3D. + * Copyright (C) 2001 David S. Miller + * + * 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 + * 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. + * + * + * David S. Miller + */ + +#ifndef _FFB_TEX_H +#define _FFB_TEX_H + +extern void ffbDDInitTexFuncs(GLcontext *ctx); + +#endif /* !(_FFB_DD_H) */ + Index: xc/lib/GL/mesa/src/drv/ffb/ffb_tris.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_tris.c:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_tris.c:1.3 --- xc/lib/GL/mesa/src/drv/ffb/ffb_tris.c:1.1 Tue Jun 20 01:08:40 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_tris.c Wed Oct 30 07:51:28 2002 @@ -1,7 +1,7 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_tris.c,v 1.1 2000/06/20 05:08:40 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_tris.c,v 1.3 2002/10/30 12:51:28 alanh Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D - * Copyright (C) 2000 David S. Miller + * Copyright (C) 2000, 2001 David S. Miller * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,66 +25,65 @@ * David S. Miller */ -#include "types.h" -#include "vbrender.h" - #include #include + +#include "glheader.h" +#include "mtypes.h" +#include "macros.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "swrast/s_context.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" -#include "mm.h" -#include "ffb_dd.h" -#include "ffb_span.h" -#include "ffb_depth.h" #include "ffb_context.h" -#include "ffb_vb.h" #include "ffb_tris.h" +#include "ffb_lines.h" #include "ffb_lock.h" -#include "extensions.h" -#include "vb.h" -#include "dd.h" +#include "ffb_points.h" +#include "ffb_state.h" +#include "ffb_vb.h" #undef TRI_DEBUG +#undef FFB_RENDER_TRACE +#undef STATE_TRACE #ifdef TRI_DEBUG -#define FFB_DUMP_PRIM(name) \ - fprintf(stderr, "FFB: Begin primitive %s%s%s" #name ".\n", \ - (IND & FFB_TRI_OFFSET_BIT) ? "OFFSET " : "", \ - (IND & FFB_TRI_FLAT_BIT) ? "FLAT " : "", \ - (IND & FFB_TRI_TWOSIDE_BIT) ? "TWOSIDE " : "") -#define FFB_DUMP_VERTEX(V) \ - fprintf(stderr, "FFB: VERTEX ARGB(%c%x.%08x:%c%x.%08x:%c%x.%08x:%c%x.%08x) " \ - "XYZ(%04x.%04x:%04x.%04x:%c%x.%08x)\n", \ - (((V)->color[which_color].alpha & (1 << 31)) ? '-' : ' '), \ - (((V)->color[which_color].alpha & (1 << 30)) >> 30), \ - (((V)->color[which_color].alpha & ((1 << 30) - 1))), \ - (((V)->color[which_color].red & (1 << 31)) ? '-' : ' '), \ - (((V)->color[which_color].red & (1 << 30)) >> 30), \ - (((V)->color[which_color].red & ((1 << 30) - 1))), \ - (((V)->color[which_color].green & (1 << 31)) ? '-' : ' '), \ - (((V)->color[which_color].green & (1 << 30)) >> 30), \ - (((V)->color[which_color].green & ((1 << 30) - 1))), \ - (((V)->color[which_color].blue & (1 << 31)) ? '-' : ' '), \ - (((V)->color[which_color].blue & (1 << 30)) >> 30), \ - (((V)->color[which_color].blue & ((1 << 30) - 1))), \ - (((V)->x >> 16)), (((V)->x & ((1 << 16) - 1))), \ - (((V)->y >> 16)), (((V)->y & ((1 << 16) - 1))), \ - (((V)->z & (1 << 31)) ? '-' : ' '), \ - (((V)->z & (1 << 30)) >> 30), \ - (((V)->z & ((1 << 30) - 1)))) +static void ffb_print_vertex(const ffb_vertex *v) +{ + fprintf(stderr, "Vertex @(%p): " + "X[%f] Y[%f] Z[%f]\n", + v, v->x, v->y, v->z); + fprintf(stderr, "Vertex @(%p): " + "A[%f] R[%f] G[%f] B[%f]\n", + v, + v->color[0].alpha, + v->color[0].red, + v->color[0].green, + v->color[0].blue); +} +#define FFB_DUMP_VERTEX(V) ffb_print_vertex(V) #else -#define FFB_DUMP_PRIM(name) do { } while(0) #define FFB_DUMP_VERTEX(V) do { } while(0) #endif +#define FFB_ALPHA_BIT 0x01 +#define FFB_FLAT_BIT 0x02 +#define FFB_TRI_CULL_BIT 0x04 +#define MAX_FFB_RENDER_FUNCS 0x08 + +/*********************************************************************** + * Build low-level triangle/quad rasterize functions * + ***********************************************************************/ + #define FFB_TRI_FLAT_BIT 0x01 -#define FFB_TRI_TWOSIDE_BIT 0x02 -#define FFB_TRI_OFFSET_BIT 0x04 -#define FFB_TRI_CULL_BIT 0x08 -#define FFB_TRI_ALPHA_BIT 0x10 -#define FFB_TRI_FALLBACK_BIT 0x20 +#define FFB_TRI_ALPHA_BIT 0x02 +/*#define FFB_TRI_CULL_BIT 0x04*/ -static triangle_func ffb_tri_tab[0x40]; -static quad_func ffb_quad_tab[0x40]; +static ffb_tri_func ffb_tri_tab[0x8]; +static ffb_quad_func ffb_quad_tab[0x8]; #define IND (0) #define TAG(x) x @@ -94,30 +93,6 @@ #define TAG(x) x##_flat #include "ffb_tritmp.h" -#define IND (FFB_TRI_OFFSET_BIT) -#define TAG(x) x##_offset -#include "ffb_tritmp.h" - -#define IND (FFB_TRI_OFFSET_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_offset_flat -#include "ffb_tritmp.h" - -#define IND (FFB_TRI_TWOSIDE_BIT) -#define TAG(x) x##_twoside -#include "ffb_tritmp.h" - -#define IND (FFB_TRI_TWOSIDE_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_twoside_flat -#include "ffb_tritmp.h" - -#define IND (FFB_TRI_TWOSIDE_BIT|FFB_TRI_OFFSET_BIT) -#define TAG(x) x##_twoside_offset -#include "ffb_tritmp.h" - -#define IND (FFB_TRI_TWOSIDE_BIT|FFB_TRI_OFFSET_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_twoside_offset_flat -#include "ffb_tritmp.h" - #define IND (FFB_TRI_CULL_BIT) #define TAG(x) x##_cull #include "ffb_tritmp.h" @@ -126,159 +101,177 @@ #define TAG(x) x##_cull_flat #include "ffb_tritmp.h" -#define IND (FFB_TRI_CULL_BIT|FFB_TRI_OFFSET_BIT) -#define TAG(x) x##_cull_offset +#define IND (FFB_TRI_ALPHA_BIT) +#define TAG(x) x##_alpha #include "ffb_tritmp.h" -#define IND (FFB_TRI_CULL_BIT|FFB_TRI_OFFSET_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_cull_offset_flat +#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_FLAT_BIT) +#define TAG(x) x##_alpha_flat #include "ffb_tritmp.h" -#define IND (FFB_TRI_CULL_BIT|FFB_TRI_TWOSIDE_BIT) -#define TAG(x) x##_cull_twoside +#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT) +#define TAG(x) x##_alpha_cull #include "ffb_tritmp.h" -#define IND (FFB_TRI_CULL_BIT|FFB_TRI_TWOSIDE_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_cull_twoside_flat +#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT|FFB_TRI_FLAT_BIT) +#define TAG(x) x##_alpha_cull_flat #include "ffb_tritmp.h" -#define IND (FFB_TRI_CULL_BIT|FFB_TRI_TWOSIDE_BIT|FFB_TRI_OFFSET_BIT) -#define TAG(x) x##_cull_twoside_offset -#include "ffb_tritmp.h" +static void init_tri_tab(void) +{ + ffb_init(); + ffb_init_flat(); + ffb_init_cull(); + ffb_init_cull_flat(); + ffb_init_alpha(); + ffb_init_alpha_flat(); + ffb_init_alpha_cull(); + ffb_init_alpha_cull_flat(); +} -#define IND (FFB_TRI_CULL_BIT|FFB_TRI_TWOSIDE_BIT|FFB_TRI_OFFSET_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_cull_twoside_offset_flat -#include "ffb_tritmp.h" +/* Build a SWvertex from a hardware vertex. */ +static void ffb_translate_vertex(GLcontext *ctx, const ffb_vertex *src, + SWvertex *dst) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + GLfloat *m = ctx->Viewport._WindowMap.m; + const GLfloat sx = m[0]; + const GLfloat sy = m[5]; + const GLfloat sz = m[10]; + const GLfloat tx = m[12]; + const GLfloat ty = m[13]; + const GLfloat tz = m[14]; + + dst->win[0] = sx * src->x + tx; + dst->win[1] = sy * src->y + ty; + dst->win[2] = sz * src->z + tz; + dst->win[3] = 1.0; + + dst->color[0] = FFB_UBYTE_FROM_COLOR(src->color[0].red); + dst->color[1] = FFB_UBYTE_FROM_COLOR(src->color[0].green); + dst->color[2] = FFB_UBYTE_FROM_COLOR(src->color[0].blue); + dst->color[3] = FFB_UBYTE_FROM_COLOR(src->color[0].alpha); +} -#define IND (FFB_TRI_ALPHA_BIT) -#define TAG(x) x##_alpha -#include "ffb_tritmp.h" +/*********************************************************************** + * Build fallback triangle/quad rasterize functions * + ***********************************************************************/ -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_alpha_flat -#include "ffb_tritmp.h" +static void ffb_fallback_triangle(GLcontext *ctx, ffb_vertex *v0, + ffb_vertex *v1, ffb_vertex *v2) +{ + SWvertex v[3]; -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_OFFSET_BIT) -#define TAG(x) x##_alpha_offset -#include "ffb_tritmp.h" + ffb_translate_vertex(ctx, v0, &v[0]); + ffb_translate_vertex(ctx, v1, &v[1]); + ffb_translate_vertex(ctx, v2, &v[2]); -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_OFFSET_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_alpha_offset_flat -#include "ffb_tritmp.h" + _swrast_Triangle(ctx, &v[0], &v[1], &v[2]); +} -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_TWOSIDE_BIT) -#define TAG(x) x##_alpha_twoside -#include "ffb_tritmp.h" +static void ffb_fallback_quad(GLcontext *ctx, + ffb_vertex *v0, ffb_vertex *v1, + ffb_vertex *v2, ffb_vertex *v3) +{ + SWvertex v[4]; -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_TWOSIDE_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_alpha_twoside_flat -#include "ffb_tritmp.h" + ffb_translate_vertex(ctx, v0, &v[0]); + ffb_translate_vertex(ctx, v1, &v[1]); + ffb_translate_vertex(ctx, v2, &v[2]); + ffb_translate_vertex(ctx, v3, &v[3]); -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_TWOSIDE_BIT|FFB_TRI_OFFSET_BIT) -#define TAG(x) x##_alpha_twoside_offset -#include "ffb_tritmp.h" + _swrast_Quad(ctx, &v[0], &v[1], &v[2], &v[3]); +} -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_TWOSIDE_BIT|FFB_TRI_OFFSET_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_alpha_twoside_offset_flat -#include "ffb_tritmp.h" +void ffb_fallback_line(GLcontext *ctx, ffb_vertex *v0, ffb_vertex *v1) +{ + SWvertex v[2]; -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT) -#define TAG(x) x##_alpha_cull -#include "ffb_tritmp.h" + ffb_translate_vertex(ctx, v0, &v[0]); + ffb_translate_vertex(ctx, v1, &v[1]); -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_alpha_cull_flat -#include "ffb_tritmp.h" + _swrast_Line(ctx, &v[0], &v[1]); +} -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT|FFB_TRI_OFFSET_BIT) -#define TAG(x) x##_alpha_cull_offset -#include "ffb_tritmp.h" +void ffb_fallback_point(GLcontext *ctx, ffb_vertex *v0) +{ + SWvertex v[1]; -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT|FFB_TRI_OFFSET_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_alpha_cull_offset_flat -#include "ffb_tritmp.h" + ffb_translate_vertex(ctx, v0, &v[0]); -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT|FFB_TRI_TWOSIDE_BIT) -#define TAG(x) x##_alpha_cull_twoside -#include "ffb_tritmp.h" + _swrast_Point(ctx, &v[0]); +} -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT|FFB_TRI_TWOSIDE_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_alpha_cull_twoside_flat -#include "ffb_tritmp.h" +/*********************************************************************** + * Rasterization functions for culled tris/quads * + ***********************************************************************/ -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT|FFB_TRI_TWOSIDE_BIT|FFB_TRI_OFFSET_BIT) -#define TAG(x) x##_alpha_cull_twoside_offset -#include "ffb_tritmp.h" +static void ffb_nodraw_triangle(GLcontext *ctx, ffb_vertex *v0, + ffb_vertex *v1, ffb_vertex *v2) +{ + (void) (ctx && v0 && v1 && v2); +} -#define IND (FFB_TRI_ALPHA_BIT|FFB_TRI_CULL_BIT|FFB_TRI_TWOSIDE_BIT|FFB_TRI_OFFSET_BIT|FFB_TRI_FLAT_BIT) -#define TAG(x) x##_alpha_cull_twoside_offset_flat -#include "ffb_tritmp.h" +static void ffb_nodraw_quad(GLcontext *ctx, + ffb_vertex *v0, ffb_vertex *v1, + ffb_vertex *v2, ffb_vertex *v3) +{ + (void) (ctx && v0 && v1 && v2 && v3); +} -void ffbDDTrifuncInit() +static void ffb_update_cullsign(GLcontext *ctx) { - init(); - init_flat(); - init_offset(); - init_offset_flat(); - init_twoside(); - init_twoside_flat(); - init_twoside_offset(); - init_twoside_offset_flat(); - init_cull(); - init_cull_flat(); - init_cull_offset(); - init_cull_offset_flat(); - init_cull_twoside(); - init_cull_twoside_flat(); - init_cull_twoside_offset(); - init_cull_twoside_offset_flat(); - init_alpha(); - init_alpha_flat(); - init_alpha_offset(); - init_alpha_offset_flat(); - init_alpha_twoside(); - init_alpha_twoside_flat(); - init_alpha_twoside_offset(); - init_alpha_twoside_offset_flat(); - init_alpha_cull(); - init_alpha_cull_flat(); - init_alpha_cull_offset(); - init_alpha_cull_offset_flat(); - init_alpha_cull_twoside(); - init_alpha_cull_twoside_flat(); - init_alpha_cull_twoside_offset(); - init_alpha_cull_twoside_offset_flat(); + GLfloat backface_sign = 1; + + switch (ctx->Polygon.CullFaceMode) { + case GL_BACK: + if (ctx->Polygon.FrontFace==GL_CCW) + backface_sign = -1; + break; + + case GL_FRONT: + if (ctx->Polygon.FrontFace!=GL_CCW) + backface_sign = -1; + break; + + default: + break; + }; + + FFB_CONTEXT(ctx)->backface_sign = backface_sign; } -void ffbDDChooseTriRenderState(GLcontext *ctx) +/*********************************************************************** + * Choose triangle/quad rasterize functions * + ***********************************************************************/ + +void ffbChooseTriangleState(GLcontext *ctx) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); - GLuint flags = ctx->TriangleCaps; + GLuint flags = ctx->_TriangleCaps; GLuint ind = 0; - - if (!flags) { - fmesa->TriangleFunc = ffb_tri_tab[0]; - fmesa->QuadFunc = ffb_quad_tab[0]; - return; - } - if (ctx->Texture.ReallyEnabled) { - fmesa->TriangleFunc = NULL; - fmesa->QuadFunc = NULL; + if (flags & DD_TRI_SMOOTH) { + fmesa->draw_tri = ffb_fallback_triangle; + fmesa->draw_quad = ffb_fallback_quad; return; } if (flags & DD_FLATSHADE) ind |= FFB_TRI_FLAT_BIT; - if (flags & DD_TRI_CULL) - ind |= FFB_TRI_CULL_BIT; - if (ctx->Polygon.SmoothFlag) - ind |= FFB_TRI_FALLBACK_BIT; - if (flags & DD_TRI_OFFSET) - ind |= FFB_TRI_OFFSET_BIT; - if (flags & DD_TRI_LIGHT_TWOSIDE) - ind |= FFB_TRI_TWOSIDE_BIT; + if (ctx->Polygon.CullFlag) { + if (ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) { + fmesa->draw_tri = ffb_nodraw_triangle; + fmesa->draw_quad = ffb_nodraw_quad; + return; + } + + ind |= FFB_TRI_CULL_BIT; + ffb_update_cullsign(ctx); + } else + FFB_CONTEXT(ctx)->backface_sign = 0; + /* If blending or the alpha test is enabled we need to * provide alpha components to the chip, else we can * do without it and thus feed vertex data to the chip @@ -286,7 +279,671 @@ */ if (ctx->Color.BlendEnabled || ctx->Color.AlphaEnabled) ind |= FFB_TRI_ALPHA_BIT; + + fmesa->draw_tri = ffb_tri_tab[ind]; + fmesa->draw_quad = ffb_quad_tab[ind]; +} + +static const GLenum reduced_prim[GL_POLYGON+1] = { + GL_POINTS, + GL_LINES, + GL_LINES, + GL_LINES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES +}; + +static void ffbRenderPrimitive(GLcontext *ctx, GLenum prim); +static void ffbRasterPrimitive(GLcontext *ctx, GLenum rprim); + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define FFB_OFFSET_BIT 0x01 +#define FFB_TWOSIDE_BIT 0x02 +#define FFB_UNFILLED_BIT 0x04 +#define FFB_MAX_TRIFUNC 0x08 + +static struct { + triangle_func triangle; + quad_func quad; +} rast_tab[FFB_MAX_TRIFUNC]; + +#define DO_OFFSET (IND & FFB_OFFSET_BIT) +#define DO_UNFILLED (IND & FFB_UNFILLED_BIT) +#define DO_TWOSIDE (IND & FFB_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_QUAD 1 +#define DO_FULL_QUAD 1 +#define DO_TRI 1 +#define DO_LINE 0 +#define DO_POINTS 0 + +#define QUAD( a, b, c, d ) fmesa->draw_quad( ctx, a, b, c, d ) +#define TRI( a, b, c ) fmesa->draw_tri( ctx, a, b, c ) +#define LINE( a, b ) fmesa->draw_line( ctx, a, b ) +#define POINT( a ) fmesa->draw_point( ctx, a ) + +#define HAVE_BACK_COLORS 1 +#define HAVE_RGBA 1 +#define HAVE_SPEC 0 +#define HAVE_HW_FLATSHADE 1 +#define VERTEX ffb_vertex +#define TAB rast_tab + +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define DEPTH_SCALE (fmesa->depth_scale) +#define VERT_X(_v) (_v->x) +#define VERT_Y(_v) (_v->y) +#define VERT_Z(_v) (_v->z) +#define AREA_IS_CCW( a ) (a < fmesa->ffb_zero) +#define GET_VERTEX(e) (&fmesa->verts[e]) +#define INSANE_VERTICES +#define VERT_SET_Z(v,val) ((v)->z = (val)) +#define VERT_Z_ADD(v,val) ((v)->z += (val)) + +#define VERT_COPY_RGBA1( _v ) _v->color[0] = _v->color[1] +#define VERT_COPY_RGBA( v0, v1 ) v0->color[0] = v1->color[0] +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->color[0] +#define VERT_RESTORE_RGBA( idx ) v[idx]->color[0] = color[idx] + +#define LOCAL_VARS(n) \ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); \ + __DRIdrawablePrivate *dPriv = fmesa->driDrawable; \ + ffb_color color[n]; \ + (void) color; (void) dPriv; + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +#define RASTERIZE(x) if (fmesa->raster_primitive != reduced_prim[x]) \ + ffbRasterPrimitive( ctx, reduced_prim[x] ) +#define RENDER_PRIMITIVE fmesa->render_primitive +#define TAG(x) x +#include "tnl_dd/t_dd_unfilled.h" + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (FFB_OFFSET_BIT) +#define TAG(x) x##_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (FFB_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (FFB_TWOSIDE_BIT|FFB_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (FFB_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (FFB_OFFSET_BIT|FFB_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (FFB_TWOSIDE_BIT|FFB_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (FFB_TWOSIDE_BIT|FFB_OFFSET_BIT|FFB_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +static void init_rast_tab( void ) +{ + init(); + init_offset(); + init_twoside(); + init_twoside_offset(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); +} + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + +static void ffbRenderClippedPolygon(GLcontext *ctx, const GLuint *elts, GLuint n) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint prim = fmesa->render_primitive; + + /* Render the new vertices as an unclipped polygon. */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON](ctx, 0, n, PRIM_BEGIN|PRIM_END); + VB->Elts = tmp; + } + + /* Restore the render primitive. */ + if (prim != GL_POLYGON) + tnl->Driver.Render.PrimitiveNotify(ctx, prim); +} + +static void ffbRenderClippedLine(GLcontext *ctx, GLuint ii, GLuint jj) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line(ctx, ii, jj); +} + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ + +static void ffb_vb_noop(GLcontext *ctx, GLuint start, GLuint count, GLuint flags) +{ + (void)(ctx && start && count && flags); +} + +#define ELT(x) x + +#define IND 0 +#define TAG(x) x +#include "ffb_rendertmp.h" + +#define IND (FFB_FLAT_BIT) +#define TAG(x) x##_flat +#include "ffb_rendertmp.h" + +#define IND (FFB_ALPHA_BIT) +#define TAG(x) x##_alpha +#include "ffb_rendertmp.h" + +#define IND (FFB_FLAT_BIT | FFB_ALPHA_BIT) +#define TAG(x) x##_flat_alpha +#include "ffb_rendertmp.h" + +#define IND (FFB_TRI_CULL_BIT) +#define TAG(x) x##_tricull +#include "ffb_rendertmp.h" + +#define IND (FFB_FLAT_BIT | FFB_TRI_CULL_BIT) +#define TAG(x) x##_flat_tricull +#include "ffb_rendertmp.h" + +#define IND (FFB_ALPHA_BIT | FFB_TRI_CULL_BIT) +#define TAG(x) x##_alpha_tricull +#include "ffb_rendertmp.h" + +#define IND (FFB_FLAT_BIT | FFB_ALPHA_BIT | FFB_TRI_CULL_BIT) +#define TAG(x) x##_flat_alpha_tricull +#include "ffb_rendertmp.h" + +#undef ELT +#define ELT(x) elt[x] + +#define IND 0 +#define TAG(x) x##_elt +#include "ffb_rendertmp.h" + +#define IND (FFB_FLAT_BIT) +#define TAG(x) x##_flat_elt +#include "ffb_rendertmp.h" + +#define IND (FFB_ALPHA_BIT) +#define TAG(x) x##_alpha_elt +#include "ffb_rendertmp.h" + +#define IND (FFB_FLAT_BIT | FFB_ALPHA_BIT) +#define TAG(x) x##_flat_alpha_elt +#include "ffb_rendertmp.h" + +#define IND (FFB_TRI_CULL_BIT) +#define TAG(x) x##_tricull_elt +#include "ffb_rendertmp.h" + +#define IND (FFB_FLAT_BIT | FFB_TRI_CULL_BIT) +#define TAG(x) x##_flat_tricull_elt +#include "ffb_rendertmp.h" + +#define IND (FFB_ALPHA_BIT | FFB_TRI_CULL_BIT) +#define TAG(x) x##_alpha_tricull_elt +#include "ffb_rendertmp.h" + +#define IND (FFB_FLAT_BIT | FFB_ALPHA_BIT | FFB_TRI_CULL_BIT) +#define TAG(x) x##_flat_alpha_tricull_elt +#include "ffb_rendertmp.h" + +static void *render_tabs[MAX_FFB_RENDER_FUNCS]; +static void *render_tabs_elt[MAX_FFB_RENDER_FUNCS]; + +static void init_render_tab(void) +{ + int i; + + render_tabs[0] = render_tab; + render_tabs[FFB_FLAT_BIT] = render_tab_flat; + render_tabs[FFB_ALPHA_BIT] = render_tab_alpha; + render_tabs[FFB_FLAT_BIT|FFB_ALPHA_BIT] = render_tab_flat_alpha; + render_tabs[FFB_TRI_CULL_BIT] = render_tab_tricull; + render_tabs[FFB_FLAT_BIT|FFB_TRI_CULL_BIT] = render_tab_flat_tricull; + render_tabs[FFB_ALPHA_BIT|FFB_TRI_CULL_BIT] = render_tab_alpha_tricull; + render_tabs[FFB_FLAT_BIT|FFB_ALPHA_BIT|FFB_TRI_CULL_BIT] = + render_tab_flat_alpha_tricull; + + render_tabs_elt[0] = render_tab_elt; + render_tabs_elt[FFB_FLAT_BIT] = render_tab_flat_elt; + render_tabs_elt[FFB_ALPHA_BIT] = render_tab_alpha_elt; + render_tabs_elt[FFB_FLAT_BIT|FFB_ALPHA_BIT] = render_tab_flat_alpha_elt; + render_tabs_elt[FFB_TRI_CULL_BIT] = render_tab_tricull_elt; + render_tabs_elt[FFB_FLAT_BIT|FFB_TRI_CULL_BIT] = render_tab_flat_tricull_elt; + render_tabs_elt[FFB_ALPHA_BIT|FFB_TRI_CULL_BIT] = render_tab_alpha_tricull_elt; + render_tabs_elt[FFB_FLAT_BIT|FFB_ALPHA_BIT|FFB_TRI_CULL_BIT] = + render_tab_flat_alpha_tricull_elt; + + for (i = 0; i < MAX_FFB_RENDER_FUNCS; i++) { + render_func *rf = render_tabs[i]; + render_func *rfe = render_tabs_elt[i]; + + if (i & FFB_TRI_CULL_BIT) { + int from_idx = (i & ~FFB_TRI_CULL_BIT); + render_func *rf_from = render_tabs[from_idx]; + render_func *rfe_from = render_tabs_elt[from_idx]; + int j; + + for (j = GL_POINTS; j < GL_TRIANGLES; j++) { + rf[j] = rf_from[j]; + rfe[j] = rfe_from[j]; + } + } + } +} + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + +#ifdef FFB_RENDER_TRACE +static void ffbPrintRenderFlags(GLuint index, GLuint render_index) +{ + fprintf(stderr, + "ffbChooseRenderState: " + "index(%s%s%s) " + "render_index(%s%s%s)\n", + ((index & FFB_TWOSIDE_BIT) ? "twoside " : ""), + ((index & FFB_OFFSET_BIT) ? "offset " : ""), + ((index & FFB_UNFILLED_BIT) ? "unfilled " : ""), + ((render_index & FFB_FLAT_BIT) ? "flat " : ""), + ((render_index & FFB_ALPHA_BIT) ? "alpha " : ""), + ((render_index & FFB_TRI_CULL_BIT) ? "tricull " : "")); +} +#endif + +void ffbChooseRenderState(GLcontext *ctx) +{ + GLuint flags = ctx->_TriangleCaps; + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint index = 0; + + /* Per-primitive fallbacks and the selection of fmesa->draw_* are + * handled elsewhere. + */ + if (flags & DD_TRI_LIGHT_TWOSIDE) + index |= FFB_TWOSIDE_BIT; + + if (flags & DD_TRI_OFFSET) + index |= FFB_OFFSET_BIT; + + if (flags & DD_TRI_UNFILLED) + index |= FFB_UNFILLED_BIT; + + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + GLuint render_index = 0; + + if (flags & DD_FLATSHADE) + render_index |= FFB_FLAT_BIT; + + if (ctx->Color.BlendEnabled || ctx->Color.AlphaEnabled) + render_index |= FFB_ALPHA_BIT; + + if (ctx->Polygon.CullFlag) + render_index |= FFB_TRI_CULL_BIT; + +#ifdef FFB_RENDER_TRACE + ffbPrintRenderFlags(index, render_index); +#endif + tnl->Driver.Render.PrimTabVerts = render_tabs[render_index]; + tnl->Driver.Render.PrimTabElts = render_tabs_elt[render_index]; + } else { +#ifdef FFB_RENDER_TRACE + ffbPrintRenderFlags(index, 0); +#endif + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + } + + tnl->Driver.Render.ClippedPolygon = ffbRenderClippedPolygon; + tnl->Driver.Render.ClippedLine = ffbRenderClippedLine; +} + +static void ffbRunPipeline(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + + if (fmesa->bad_fragment_attrs == 0 && + fmesa->new_gl_state) { + if (fmesa->new_gl_state & _FFB_NEW_TRIANGLE) + ffbChooseTriangleState(ctx); + if (fmesa->new_gl_state & _FFB_NEW_LINE) + ffbChooseLineState(ctx); + if (fmesa->new_gl_state & _FFB_NEW_POINT) + ffbChoosePointState(ctx); + if (fmesa->new_gl_state & _FFB_NEW_RENDER) + ffbChooseRenderState(ctx); + if (fmesa->new_gl_state & _FFB_NEW_VERTEX) + ffbChooseVertexState(ctx); + + fmesa->new_gl_state = 0; + } + + _tnl_run_pipeline(ctx); +} + +static void ffbRenderStart(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + + LOCK_HARDWARE(fmesa); + fmesa->hw_locked = 1; + + if (fmesa->state_dirty != 0) + ffbSyncHardware(fmesa); +} + +static void ffbRenderFinish(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + + UNLOCK_HARDWARE(fmesa); + fmesa->hw_locked = 0; +} + +/* Even when doing full software rendering we need to + * wrap render{start,finish} so that the hardware is kept + * in sync (because multipass rendering changes the write + * buffer etc.) + */ +static void ffbSWRenderStart(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + + LOCK_HARDWARE(fmesa); + fmesa->hw_locked = 1; + + if (fmesa->state_dirty != 0) + ffbSyncHardware(fmesa); +} + +static void ffbSWRenderFinish(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + + UNLOCK_HARDWARE(fmesa); + fmesa->hw_locked = 0; +} + +static void ffbRasterPrimitive(GLcontext *ctx, GLenum rprim) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + GLuint drawop, fbc, ppc; + int do_sw = 0; + + fmesa->raster_primitive = rprim; + + drawop = fmesa->drawop; + fbc = fmesa->fbc; + ppc = fmesa->ppc & ~(FFB_PPC_ZS_MASK | FFB_PPC_CS_MASK); + +#ifdef STATE_TRACE + fprintf(stderr, + "ffbReducedPrimitiveChange: rprim(%d) ", rprim); +#endif + switch(rprim) { + case GL_POINTS: +#ifdef STATE_TRACE + fprintf(stderr, "GL_POINTS "); +#endif + if (fmesa->draw_point == ffb_fallback_point) { + do_sw = 1; + break; + } + + if (ctx->Point.SmoothFlag) { + ppc |= (FFB_PPC_ZS_VAR | FFB_PPC_CS_CONST); + drawop = FFB_DRAWOP_AADOT; + } else { + ppc |= (FFB_PPC_ZS_CONST | FFB_PPC_CS_CONST); + drawop = FFB_DRAWOP_DOT; + } + break; + + case GL_LINES: +#ifdef STATE_TRACE + fprintf(stderr, "GL_LINES "); +#endif + if (fmesa->draw_line == ffb_fallback_line) { + do_sw = 1; + break; + } + + if (ctx->_TriangleCaps & DD_FLATSHADE) { + ppc |= FFB_PPC_ZS_VAR | FFB_PPC_CS_CONST; + } else { + ppc |= FFB_PPC_ZS_VAR | FFB_PPC_CS_VAR; + } + if (ctx->Line.SmoothFlag) + drawop = FFB_DRAWOP_AALINE; + else + drawop = FFB_DRAWOP_DDLINE; + break; + + case GL_TRIANGLES: +#ifdef STATE_TRACE + fprintf(stderr, "GL_POLYGON "); +#endif + if (fmesa->draw_tri == ffb_fallback_triangle) { + do_sw = 1; + break; + } + + ppc &= ~FFB_PPC_APE_MASK; + if (ctx->Polygon.StippleFlag) + ppc |= FFB_PPC_APE_ENABLE; + else + ppc |= FFB_PPC_APE_DISABLE; + + if (ctx->_TriangleCaps & DD_FLATSHADE) { + ppc |= FFB_PPC_ZS_VAR | FFB_PPC_CS_CONST; + } else { + ppc |= FFB_PPC_ZS_VAR | FFB_PPC_CS_VAR; + } + drawop = FFB_DRAWOP_TRIANGLE; + break; + + default: +#ifdef STATE_TRACE + fprintf(stderr, "unknown %d!\n", rprim); +#endif + return; + }; + +#ifdef STATE_TRACE + fprintf(stderr, "do_sw(%d) ", do_sw); +#endif + if (do_sw != 0) { + fbc &= ~(FFB_FBC_WB_C); + fbc &= ~(FFB_FBC_ZE_MASK | FFB_FBC_RGBE_MASK); + fbc |= FFB_FBC_ZE_OFF | FFB_FBC_RGBE_MASK; + ppc &= ~(FFB_PPC_XS_MASK | FFB_PPC_ABE_MASK | + FFB_PPC_DCE_MASK | FFB_PPC_APE_MASK); + ppc |= (FFB_PPC_ZS_VAR | FFB_PPC_CS_VAR | FFB_PPC_XS_WID | + FFB_PPC_ABE_DISABLE | FFB_PPC_DCE_DISABLE | + FFB_PPC_APE_DISABLE); + } else { + fbc |= FFB_FBC_WB_C; + fbc &= ~(FFB_FBC_RGBE_MASK); + fbc |= FFB_FBC_RGBE_MASK; + ppc &= ~(FFB_PPC_ABE_MASK | FFB_PPC_XS_MASK); + if (ctx->Color.BlendEnabled) { + if ((rprim == GL_POINTS && !ctx->Point.SmoothFlag) || + (rprim != GL_POINTS && ctx->_TriangleCaps & DD_FLATSHADE)) + ppc |= FFB_PPC_ABE_ENABLE | FFB_PPC_XS_CONST; + else + ppc |= FFB_PPC_ABE_ENABLE | FFB_PPC_XS_VAR; + } else { + ppc |= FFB_PPC_ABE_DISABLE | FFB_PPC_XS_WID; + } + } +#ifdef STATE_TRACE + fprintf(stderr, "fbc(%08x) ppc(%08x)\n", fbc, ppc); +#endif + + FFBFifo(fmesa, 4); + if (fmesa->drawop != drawop) + fmesa->regs->drawop = fmesa->drawop = drawop; + if (fmesa->fbc != fbc) + fmesa->regs->fbc = fmesa->fbc = fbc; + if (fmesa->ppc != ppc) + fmesa->regs->ppc = fmesa->ppc = ppc; + if (do_sw != 0) { + fmesa->regs->cmp = + (fmesa->cmp & ~(0xff<<16)) | (0x80 << 16); + } else + fmesa->regs->cmp = fmesa->cmp; +} + +static void ffbRenderPrimitive(GLcontext *ctx, GLenum prim) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + GLuint rprim = reduced_prim[prim]; + + fmesa->render_primitive = prim; + + if (rprim == GL_TRIANGLES && (ctx->_TriangleCaps & DD_TRI_UNFILLED)) + return; + + if (fmesa->raster_primitive != rprim) { + ffbRasterPrimitive( ctx, rprim ); + } +} + + + + +/**********************************************************************/ +/* Transition to/from hardware rasterization. */ +/**********************************************************************/ + +static char *fallbackStrings[] = { + "Fog enabled", + "Blend function", + "Blend ROP", + "Blend equation", + "Stencil", + "Texture", + "LIBGL_SOFTWARE_RENDERING" +}; + +static char *getFallbackString(GLuint bit) +{ + int i = 0; + + while (bit > 1) { + i++; + bit >>= 1; + } + return fallbackStrings[i]; +} + +void ffbFallback( GLcontext *ctx, GLuint bit, GLboolean mode ) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint oldfallback = fmesa->bad_fragment_attrs; + + if (mode) { + fmesa->bad_fragment_attrs |= bit; + if (oldfallback == 0) { +/* FFB_FIREVERTICES(fmesa); */ + _swsetup_Wakeup( ctx ); + if (fmesa->debugFallbacks) + fprintf(stderr, "FFB begin software fallback: 0x%x %s\n", + bit, getFallbackString(bit)); + } + } else { + fmesa->bad_fragment_attrs &= ~bit; + if (oldfallback == bit) { + _swrast_flush( ctx ); + + tnl->Driver.Render.Start = ffbRenderStart; + tnl->Driver.Render.PrimitiveNotify = ffbRenderPrimitive; + tnl->Driver.Render.Finish = ffbRenderFinish; + fmesa->new_gl_state = ~0; + + /* Just re-choose everything: + */ + ffbChooseVertexState(ctx); + ffbChooseRenderState(ctx); + ffbChooseTriangleState(ctx); + ffbChooseLineState(ctx); + ffbChoosePointState(ctx); + + if (fmesa->debugFallbacks) + fprintf(stderr, "FFB end software fallback: 0x%x %s\n", + bit, getFallbackString(bit)); + } + } +} + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + +void ffbDDInitRenderFuncs( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + SWcontext *swrast = SWRAST_CONTEXT(ctx); + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + init_tri_tab(); + init_render_tab(); + firsttime = 0; + } + + tnl->Driver.RunPipeline = ffbRunPipeline; + tnl->Driver.Render.Start = ffbRenderStart; + tnl->Driver.Render.Finish = ffbRenderFinish; + tnl->Driver.Render.PrimitiveNotify = ffbRenderPrimitive; + tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; - fmesa->TriangleFunc = ffb_tri_tab[ind]; - fmesa->QuadFunc = ffb_quad_tab[ind]; + swrast->Driver.SpanRenderStart = ffbSWRenderStart; + swrast->Driver.SpanRenderFinish = ffbSWRenderFinish; } Index: xc/lib/GL/mesa/src/drv/ffb/ffb_tris.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_tris.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_tris.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_tris.h:1.1 Tue Jun 20 01:08:40 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_tris.h Fri Feb 22 16:32:59 2002 @@ -1,9 +1,29 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_tris.h,v 1.1 2000/06/20 05:08:40 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_tris.h,v 1.2 2002/02/22 21:32:59 dawes Exp $ */ #ifndef _FFB_TRIS_H #define _FFB_TRIS_H -extern void ffbDDTrifuncInit(void); -extern void ffbDDChooseTriRenderState(GLcontext *); +extern void ffbDDInitRenderFuncs( GLcontext *ctx ); + + +#define _FFB_NEW_RENDER (_DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET | \ + _DD_NEW_TRI_UNFILLED) + +extern void ffbChooseRenderState(GLcontext *ctx); + + +#define _FFB_NEW_TRIANGLE (_DD_NEW_TRI_SMOOTH | \ + _DD_NEW_FLATSHADE | \ + _NEW_POLYGON | \ + _NEW_COLOR) + +extern void ffbChooseTriangleState(GLcontext *ctx); + +extern void ffbFallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( ctx, bit, mode ) ffbFallback( ctx, bit, mode ) + +extern void ffb_fallback_line(GLcontext *, ffb_vertex *, ffb_vertex *); +extern void ffb_fallback_point(GLcontext *, ffb_vertex *); #endif /* !(_FFB_TRIS_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_tritmp.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_tritmp.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_tritmp.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_tritmp.h:1.1 Tue Jun 20 01:08:40 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_tritmp.h Fri Feb 22 16:32:59 2002 @@ -1,122 +1,63 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_tritmp.h,v 1.1 2000/06/20 05:08:40 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_tritmp.h,v 1.2 2002/02/22 21:32:59 dawes Exp $ */ -static void TAG(ffb_triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2, GLuint pv) +static void TAG(ffb_triangle)( GLcontext *ctx, + ffb_vertex *v0, + ffb_vertex *v1, + ffb_vertex *v2 ) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); ffb_fbcPtr ffb = fmesa->regs; - struct vertex_buffer *VB = ctx->VB; - ffb_vertex *ffbVB = FFB_DRIVER_DATA(VB)->verts; - const ffb_vertex *v0 = &ffbVB[e0]; - const ffb_vertex *v1 = &ffbVB[e1]; - const ffb_vertex *v2 = &ffbVB[e2]; -#if (IND & FFB_TRI_OFFSET_BIT) - GLuint ffb_zoffset = FFB_Z_FROM_FLOAT(ctx->PolygonZoffset); -#endif #if (IND & FFB_TRI_FLAT_BIT) GLuint const_fg; #endif -#if (IND & FFB_TRI_TWOSIDE_BIT) - int which_color = (VB->ColorPtr == VB->Color[0]) ? 0 : 1; -#else - const int which_color = 0; + FFB_DELAYED_VIEWPORT_VARS; + +#ifdef TRI_DEBUG + fprintf(stderr, "FFB: ffb_triangle [" +#if (IND & FFB_TRI_CULL_BIT) + " CULL" +#endif +#if (IND & FFB_TRI_FLAT_BIT) + " FLAT" +#endif +#if (IND & FFB_TRI_ALPHA_BIT) + " ALPHA" +#endif + " ]\n"); #endif #if (IND & FFB_TRI_CULL_BIT) - { - GLfloat (*win)[4] = VB->Win.data; - GLfloat ex = win[e1][0] - win[e0][0]; - GLfloat ey = win[e1][1] - win[e0][1]; - GLfloat fx = win[e2][0] - win[e0][0]; - GLfloat fy = win[e2][1] - win[e0][1]; + { /* NOTE: These are not viewport transformed yet. */ + GLfloat ex = v1->x - v0->x; + GLfloat ey = v1->y - v0->y; + GLfloat fx = v2->x - v0->x; + GLfloat fy = v2->y - v0->y; GLfloat c = ex*fy-ey*fx; /* Culled... */ - if (c * ctx->backface_sign > 0) + if (c * fmesa->backface_sign > fmesa->ffb_zero) return; } #endif #if (IND & FFB_TRI_FLAT_BIT) - const_fg = (((GLuint)VB->Color[which_color]->data[pv][0] << 0) | - ((GLuint)VB->Color[which_color]->data[pv][1] << 8) | - ((GLuint)VB->Color[which_color]->data[pv][2] << 16) | - ((GLuint)VB->Color[which_color]->data[pv][3] << 24)); + const_fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR( v2->color[0] ); +#ifdef TRI_DEBUG + fprintf(stderr, "FFB_tri: const_fg %08x (B[%f] G[%f] R[%f])\n", + const_fg, + FFB_2_30_FIXED_TO_FLOAT(v2->color[0].blue), + FFB_2_30_FIXED_TO_FLOAT(v2->color[0].green), + FFB_2_30_FIXED_TO_FLOAT(v2->color[0].red)); #endif +#endif - FFB_DUMP_PRIM(TRIANGLE); #if (IND & FFB_TRI_FLAT_BIT) FFBFifo(fmesa, 1); ffb->fg = const_fg; #endif - /* First, check for a triangle strip/fan sequences. - * These checks rely on how MESA sends these primitives - * down to us in render_tmp.h - */ - if (v0 == fmesa->vtx_cache[1] && - v1 == fmesa->vtx_cache[2] && - v2 != fmesa->vtx_cache[0]) { #if (IND & FFB_TRI_FLAT_BIT) - FFBFifo(fmesa, 3); -#else -#if (IND & FFB_TRI_ALPHA_BIT) - FFBFifo(fmesa, 7); -#else - FFBFifo(fmesa, 6); -#endif -#endif - FFB_DUMP_VERTEX(v2); -#if !(IND & FFB_TRI_FLAT_BIT) -#if (IND & FFB_TRI_ALPHA_BIT) - ffb->alpha = v2->color[which_color].alpha; -#endif - ffb->red = v2->color[which_color].red; - ffb->green = v2->color[which_color].green; - ffb->blue = v2->color[which_color].blue; -#endif -#if (IND & FFB_TRI_OFFSET_BIT) - ffb->z = v2->z + ffb_zoffset; -#else - ffb->z = v2->z; -#endif - ffb->y = v2->y; - ffb->x = v2->x; - - goto update_vcache; - } else if (v0 == fmesa->vtx_cache[0] && - v1 == fmesa->vtx_cache[2] && - v2 != fmesa->vtx_cache[1]) { -#if (IND & FFB_TRI_FLAT_BIT) - FFBFifo(fmesa, 3); -#else -#if (IND & FFB_TRI_ALPHA_BIT) - FFBFifo(fmesa, 7); -#else - FFBFifo(fmesa, 6); -#endif -#endif - FFB_DUMP_VERTEX(v2); -#if !(IND & FFB_TRI_FLAT_BIT) -#if (IND & FFB_TRI_ALPHA_BIT) - ffb->alpha = v2->color[which_color].alpha; -#endif - ffb->red = v2->color[which_color].red; - ffb->green = v2->color[which_color].green; - ffb->blue = v2->color[which_color].blue; -#endif -#if (IND & FFB_TRI_OFFSET_BIT) - ffb->z = v2->z + ffb_zoffset; -#else - ffb->z = v2->z; -#endif - ffb->dmyf = v2->y; - ffb->dmxf = v2->x; - - goto update_vcache; - } - -#if (IND & FFB_TRI_FLAT_BIT) FFBFifo(fmesa, 9); #else #if (IND & FFB_TRI_ALPHA_BIT) @@ -129,108 +70,98 @@ FFB_DUMP_VERTEX(v0); #if !(IND & FFB_TRI_FLAT_BIT) #if (IND & FFB_TRI_ALPHA_BIT) - ffb->alpha = v0->color[which_color].alpha; + ffb->alpha = FFB_GET_ALPHA(v0); #endif - ffb->red = v0->color[which_color].red; - ffb->green = v0->color[which_color].green; - ffb->blue = v0->color[which_color].blue; -#endif -#if (IND & FFB_TRI_OFFSET_BIT) - ffb->z = v0->z + ffb_zoffset; -#else - ffb->z = v0->z; -#endif - ffb->ryf = v0->y; - ffb->rxf = v0->x; + ffb->red = FFB_GET_RED(v0); + ffb->green = FFB_GET_GREEN(v0); + ffb->blue = FFB_GET_BLUE(v0); +#endif + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); FFB_DUMP_VERTEX(v1); #if !(IND & FFB_TRI_FLAT_BIT) #if (IND & FFB_TRI_ALPHA_BIT) - ffb->alpha = v1->color[which_color].alpha; -#endif - ffb->red = v1->color[which_color].red; - ffb->green = v1->color[which_color].green; - ffb->blue = v1->color[which_color].blue; -#endif -#if (IND & FFB_TRI_OFFSET_BIT) - ffb->z = v1->z + ffb_zoffset; -#else - ffb->z = v1->z; + ffb->alpha = FFB_GET_ALPHA(v1); #endif - ffb->y = v1->y; - ffb->x = v1->x; + ffb->red = FFB_GET_RED(v1); + ffb->green = FFB_GET_GREEN(v1); + ffb->blue = FFB_GET_BLUE(v1); +#endif + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); FFB_DUMP_VERTEX(v2); #if !(IND & FFB_TRI_FLAT_BIT) #if (IND & FFB_TRI_ALPHA_BIT) - ffb->alpha = v2->color[which_color].alpha; + ffb->alpha = FFB_GET_ALPHA(v2); #endif - ffb->red = v2->color[which_color].red; - ffb->green = v2->color[which_color].green; - ffb->blue = v2->color[which_color].blue; -#endif -#if (IND & FFB_TRI_OFFSET_BIT) - ffb->z = v2->z + ffb_zoffset; -#else - ffb->z = v2->z; -#endif - ffb->y = v2->y; - ffb->x = v2->x; - -update_vcache: - fmesa->vtx_cache[0] = (void *)v0; - fmesa->vtx_cache[1] = (void *)v1; - fmesa->vtx_cache[2] = (void *)v2; + ffb->red = FFB_GET_RED(v2); + ffb->green = FFB_GET_GREEN(v2); + ffb->blue = FFB_GET_BLUE(v2); +#endif + ffb->z = FFB_GET_Z(v2); + ffb->y = FFB_GET_Y(v2); + ffb->x = FFB_GET_X(v2); fmesa->ffbScreen->rp_active = 1; } -static void TAG(ffb_quad)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2, GLuint e3, GLuint pv) +static void TAG(ffb_quad)(GLcontext *ctx, + ffb_vertex *v0, + ffb_vertex *v1, + ffb_vertex *v2, + ffb_vertex *v3 ) { ffbContextPtr fmesa = FFB_CONTEXT(ctx); ffb_fbcPtr ffb = fmesa->regs; - struct vertex_buffer *VB = ctx->VB; - ffb_vertex *ffbVB = FFB_DRIVER_DATA(VB)->verts; - const ffb_vertex *v0 = &ffbVB[e0]; - const ffb_vertex *v1 = &ffbVB[e1]; - const ffb_vertex *v2 = &ffbVB[e2]; - const ffb_vertex *v3 = &ffbVB[e3]; -#if (IND & FFB_TRI_OFFSET_BIT) - GLuint ffb_zoffset = FFB_Z_FROM_FLOAT(ctx->PolygonZoffset); -#endif #if (IND & FFB_TRI_FLAT_BIT) GLuint const_fg; #endif -#if (IND & FFB_TRI_TWOSIDE_BIT) - int which_color = (VB->ColorPtr == VB->Color[0]) ? 0 : 1; -#else - const int which_color = 0; + FFB_DELAYED_VIEWPORT_VARS; + +#ifdef TRI_DEBUG + fprintf(stderr, "FFB: ffb_quad [" +#if (IND & FFB_TRI_CULL_BIT) + " CULL" #endif +#if (IND & FFB_TRI_FLAT_BIT) + " FLAT" +#endif +#if (IND & FFB_TRI_ALPHA_BIT) + " ALPHA" +#endif + " ]\n"); +#endif /* TRI_DEBUG */ #if (IND & FFB_TRI_CULL_BIT) - { - GLfloat (*win)[4] = VB->Win.data; - GLfloat ex = win[e2][0] - win[e0][0]; - GLfloat ey = win[e2][1] - win[e0][1]; - GLfloat fx = win[e3][0] - win[e1][0]; - GLfloat fy = win[e3][1] - win[e1][1]; + { /* NOTE: These are not viewport transformed yet. */ + GLfloat ex = v2->x - v0->x; + GLfloat ey = v2->y - v0->y; + GLfloat fx = v3->x - v1->x; + GLfloat fy = v3->y - v1->y; GLfloat c = ex*fy-ey*fx; /* Culled... */ - if (c * ctx->backface_sign > 0) + if (c * fmesa->backface_sign > fmesa->ffb_zero) return; } #endif #if (IND & FFB_TRI_FLAT_BIT) - const_fg = (((GLuint)VB->Color[which_color]->data[pv][0] << 0) | - ((GLuint)VB->Color[which_color]->data[pv][1] << 8) | - ((GLuint)VB->Color[which_color]->data[pv][2] << 16) | - ((GLuint)VB->Color[which_color]->data[pv][3] << 24)); + const_fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR( v3->color[0] ); +#ifdef TRI_DEBUG + fprintf(stderr, "FFB_quad: const_fg %08x (B[%f] G[%f] R[%f])\n", + const_fg, + FFB_2_30_FIXED_TO_FLOAT(v3->color[0].blue), + FFB_2_30_FIXED_TO_FLOAT(v3->color[0].green), + FFB_2_30_FIXED_TO_FLOAT(v3->color[0].red)); +#endif #endif - FFB_DUMP_PRIM(QUAD); #if (IND & FFB_TRI_FLAT_BIT) FFBFifo(fmesa, 13); @@ -246,75 +177,59 @@ FFB_DUMP_VERTEX(v0); #if !(IND & FFB_TRI_FLAT_BIT) #if (IND & FFB_TRI_ALPHA_BIT) - ffb->alpha = v0->color[which_color].alpha; + ffb->alpha = FFB_GET_ALPHA(v0); #endif - ffb->red = v0->color[which_color].red; - ffb->green = v0->color[which_color].green; - ffb->blue = v0->color[which_color].blue; -#endif -#if (IND & FFB_TRI_OFFSET_BIT) - ffb->z = v0->z + ffb_zoffset; -#else - ffb->z = v0->z; -#endif - ffb->ryf = v0->y; - ffb->rxf = v0->x; + ffb->red = FFB_GET_RED(v0); + ffb->green = FFB_GET_GREEN(v0); + ffb->blue = FFB_GET_BLUE(v0); +#endif + ffb->z = FFB_GET_Z(v0); + ffb->ryf = FFB_GET_Y(v0); + ffb->rxf = FFB_GET_X(v0); FFB_DUMP_VERTEX(v1); #if !(IND & FFB_TRI_FLAT_BIT) #if (IND & FFB_TRI_ALPHA_BIT) - ffb->alpha = v1->color[which_color].alpha; -#endif - ffb->red = v1->color[which_color].red; - ffb->green = v1->color[which_color].green; - ffb->blue = v1->color[which_color].blue; + ffb->alpha = FFB_GET_ALPHA(v1); #endif -#if (IND & FFB_TRI_OFFSET_BIT) - ffb->z = v1->z + ffb_zoffset; -#else - ffb->z = v1->z; -#endif - ffb->y = v1->y; - ffb->x = v1->x; + ffb->red = FFB_GET_RED(v1); + ffb->green = FFB_GET_GREEN(v1); + ffb->blue = FFB_GET_BLUE(v1); +#endif + ffb->z = FFB_GET_Z(v1); + ffb->y = FFB_GET_Y(v1); + ffb->x = FFB_GET_X(v1); FFB_DUMP_VERTEX(v2); #if !(IND & FFB_TRI_FLAT_BIT) #if (IND & FFB_TRI_ALPHA_BIT) - ffb->alpha = v2->color[which_color].alpha; -#endif - ffb->red = v2->color[which_color].red; - ffb->green = v2->color[which_color].green; - ffb->blue = v2->color[which_color].blue; -#endif -#if (IND & FFB_TRI_OFFSET_BIT) - ffb->z = v2->z + ffb_zoffset; -#else - ffb->z = v2->z; + ffb->alpha = FFB_GET_ALPHA(v2); #endif - ffb->y = v2->y; - ffb->x = v2->x; + ffb->red = FFB_GET_RED(v2); + ffb->green = FFB_GET_GREEN(v2); + ffb->blue = FFB_GET_BLUE(v2); +#endif + ffb->z = FFB_GET_Z(v2); + ffb->y = FFB_GET_Y(v2); + ffb->x = FFB_GET_X(v2); FFB_DUMP_VERTEX(v3); #if !(IND & FFB_TRI_FLAT_BIT) #if (IND & FFB_TRI_ALPHA_BIT) - ffb->alpha = v3->color[which_color].alpha; -#endif - ffb->red = v3->color[which_color].red; - ffb->green = v3->color[which_color].green; - ffb->blue = v3->color[which_color].blue; -#endif -#if (IND & FFB_TRI_OFFSET_BIT) - ffb->z = v3->z + ffb_zoffset; -#else - ffb->z = v3->z; + ffb->alpha = FFB_GET_ALPHA(v3); #endif - ffb->dmyf = v3->y; - ffb->dmxf = v3->x; + ffb->red = FFB_GET_RED(v3); + ffb->green = FFB_GET_GREEN(v3); + ffb->blue = FFB_GET_BLUE(v3); +#endif + ffb->z = FFB_GET_Z(v3); + ffb->dmyf = FFB_GET_Y(v3); + ffb->dmxf = FFB_GET_X(v3); fmesa->ffbScreen->rp_active = 1; } -static void TAG(init)(void) +static void TAG(ffb_init)(void) { ffb_tri_tab[IND] = TAG(ffb_triangle); ffb_quad_tab[IND] = TAG(ffb_quad); Index: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c:1.3 xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c:1.4 --- xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c:1.3 Wed Nov 7 23:00:12 2001 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c Fri Feb 22 16:32:59 2002 @@ -1,7 +1,7 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c,v 1.3 2001/11/08 04:00:12 tsi Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c,v 1.4 2002/02/22 21:32:59 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D - * Copyright (C) 2000 David S. Miller + * Copyright (C) 2000, 2001 David S. Miller * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -29,292 +29,212 @@ #include "ffb_context.h" #include "ffb_vb.h" #include "mem.h" -#include "stages.h" +#include "tnl/t_context.h" +#include "swrast_setup/swrast_setup.h" +#include "math/m_translate.h" -#define COL { \ - GLubyte *col = &(VB->Color[0]->data[i][0]); \ - v->color[0].alpha = FFB_COLOR_FROM_UBYTE(col[3]); \ - v->color[0].red = FFB_COLOR_FROM_UBYTE(col[0]); \ - v->color[0].green = FFB_COLOR_FROM_UBYTE(col[1]); \ - v->color[0].blue = FFB_COLOR_FROM_UBYTE(col[2]); \ -} +#undef VB_DEBUG -#define COL2 { \ - GLubyte *col = &(VB->Color[0]->data[i][0]); \ - v->color[0].alpha = FFB_COLOR_FROM_UBYTE(col[3]); \ - v->color[0].red = FFB_COLOR_FROM_UBYTE(col[0]); \ - v->color[0].green = FFB_COLOR_FROM_UBYTE(col[1]); \ - v->color[0].blue = FFB_COLOR_FROM_UBYTE(col[2]); \ - \ - col = &(VB->Color[1]->data[i][0]); \ - v->color[1].alpha = FFB_COLOR_FROM_UBYTE(col[3]); \ - v->color[1].red = FFB_COLOR_FROM_UBYTE(col[0]); \ - v->color[1].green = FFB_COLOR_FROM_UBYTE(col[1]); \ - v->color[1].blue = FFB_COLOR_FROM_UBYTE(col[2]); \ -} +static void ffb_copy_pv_oneside(GLcontext *ctx, GLuint edst, GLuint esrc) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + ffb_vertex *dst = &fmesa->verts[edst]; + ffb_vertex *src = &fmesa->verts[esrc]; -#define COORD { \ - GLfloat *win = VB->Win.data[i]; \ - GLfloat tmp; \ - tmp = win[0] + ffbxoff; \ - v->x = FFB_COORD_FROM_FLOAT(tmp); \ - tmp = - win[1] + ffbyoff; \ - v->y = FFB_COORD_FROM_FLOAT(tmp); \ - tmp = win[2] * (1.0f / 65536.0f); \ - v->z = FFB_Z_FROM_FLOAT(tmp); \ -} - -#define NOP - -#define SETUPFUNC(name,win,col) \ -static void name(struct vertex_buffer *VB, GLuint start, GLuint end) \ -{ \ - ffbContextPtr fmesa = FFB_CONTEXT(VB->ctx); \ - __DRIdrawablePrivate *dPriv = fmesa->driDrawable; \ - ffb_vertex *v; \ - GLfloat ffbxoff = dPriv->x - 0.5; \ - GLfloat ffbyoff = dPriv->h - 0.5 + dPriv->y; \ - int i; \ - (void) fmesa; (void) ffbxoff; (void) ffbyoff; \ - \ - if (0) \ - fprintf(stderr, #name ": VB(%p) start(%d) end(%d)\n", \ - VB, start, end); \ - /* Flush the vertex cache. */ \ - fmesa->vtx_cache[0] = fmesa->vtx_cache[1] = \ - fmesa->vtx_cache[2] = fmesa->vtx_cache[3] = NULL; \ - gl_import_client_data(VB, VB->ctx->RenderFlags, \ - (VB->ClipOrMask \ - ? VEC_WRITABLE | VEC_GOOD_STRIDE \ - : VEC_GOOD_STRIDE)); \ - \ - v = &(FFB_DRIVER_DATA(VB)->verts[start]); \ - \ - if (VB->ClipOrMask == 0) { \ - for (i = start; i < end; i++, v++) { \ - win; \ - col; \ - } \ - } else { \ - for (i = start; i < end; i++, v++) { \ - if (VB->ClipMask[i] == 0) { \ - win; \ - } \ - col; \ - } \ - } \ +#ifdef VB_DEBUG + fprintf(stderr, "ffb_copy_pv_oneside: edst(%d) esrc(%d)\n", edst, esrc); +#endif + dst->color[0].alpha = src->color[0].alpha; + dst->color[0].red = src->color[0].red; + dst->color[0].green = src->color[0].green; + dst->color[0].blue = src->color[0].blue; } - -SETUPFUNC(rs_w, COORD,NOP) -SETUPFUNC(rs_g, NOP,COL) -SETUPFUNC(rs_g2, NOP,COL2) -SETUPFUNC(rs_wg, COORD,COL) -SETUPFUNC(rs_wg2, COORD,COL2) -static void rs_invalid(struct vertex_buffer *VB, GLuint start, GLuint end) +static void ffb_copy_pv_twoside(GLcontext *ctx, GLuint edst, GLuint esrc) { - fprintf(stderr, "ffbRasterSetup(): invalid setup function\n"); + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + ffb_vertex *dst = &fmesa->verts[edst]; + ffb_vertex *src = &fmesa->verts[esrc]; + +#ifdef VB_DEBUG + fprintf(stderr, "ffb_copy_pv_twoside: edst(%d) esrc(%d)\n", edst, esrc); +#endif + dst->color[0].alpha = src->color[0].alpha; + dst->color[0].red = src->color[0].red; + dst->color[0].green = src->color[0].green; + dst->color[0].blue = src->color[0].blue; + dst->color[1].alpha = src->color[1].alpha; + dst->color[1].red = src->color[1].red; + dst->color[1].green = src->color[1].green; + dst->color[1].blue = src->color[1].blue; } -typedef void (*setupFunc)(struct vertex_buffer *, GLuint, GLuint); +#define FFB_VB_RGBA_BIT 0x01 +#define FFB_VB_XYZ_BIT 0x02 +#define FFB_VB_TWOSIDE_BIT 0x04 +#define FFB_VB_MAX 0x08 -static setupFunc setup_func[8]; +typedef void (*emit_func)(GLcontext *, GLuint, GLuint); -void ffbDDSetupInit(void) +static struct { + emit_func emit; + interp_func interp; +} setup_tab[FFB_VB_MAX]; + +static void do_import(struct vertex_buffer *VB, + struct gl_client_array *to, + struct gl_client_array *from) { - int i; + GLuint count = VB->Count; - for (i = 0; i < 4; i++) - setup_func[i] = rs_invalid; + if (!to->Ptr) { + to->Ptr = ALIGN_MALLOC( VB->Size * 4 * sizeof(GLfloat), 32 ); + to->Type = GL_FLOAT; + } - setup_func[FFB_VB_WIN_BIT] = rs_w; - setup_func[FFB_VB_RGBA_BIT] = rs_g; - setup_func[FFB_VB_RGBA_BIT|FFB_VB_TWOSIDE_BIT] = rs_g2; - setup_func[FFB_VB_WIN_BIT|FFB_VB_RGBA_BIT] = rs_wg; - setup_func[FFB_VB_WIN_BIT|FFB_VB_RGBA_BIT|FFB_VB_TWOSIDE_BIT] = rs_wg2; + /* No need to transform the same value 3000 times. */ + if (!from->StrideB) { + to->StrideB = 0; + count = 1; + } else + to->StrideB = 4 * sizeof(GLfloat); + + _math_trans_4f((GLfloat (*)[4]) to->Ptr, + from->Ptr, from->StrideB, + from->Type, from->Size, + 0, count); } -static void ffbPrintSetupFlags(char *msg, GLuint flags) +static __inline__ void ffbImportColors(ffbContextPtr fmesa, GLcontext *ctx, int index) { - fprintf(stderr, "%s: %x %s%s%s\n", - msg, flags, - (flags & FFB_VB_WIN_BIT) ? " xyz," : "", - (flags & FFB_VB_TWOSIDE_BIT) ? " twoside," : "", - (flags & FFB_VB_RGBA_BIT) ? " rgba," : ""); + struct gl_client_array *to = &fmesa->FloatColor; + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + do_import(VB, to, VB->ColorPtr[index]); + VB->ColorPtr[index] = to; } - -void ffbChooseRasterSetupFunc(GLcontext *ctx) -{ - ffbContextPtr fmesa = FFB_CONTEXT(ctx); - int funcindex; - /* Currently just one full vertex setup type. */ - funcindex = FFB_VB_WIN_BIT | FFB_VB_RGBA_BIT; +#define IND (FFB_VB_XYZ_BIT) +#define TAG(x) x##_w +#include "ffb_vbtmp.h" - if (ctx->TriangleCaps & DD_TRI_LIGHT_TWOSIDE) - funcindex |= FFB_VB_TWOSIDE_BIT; +#define IND (FFB_VB_RGBA_BIT) +#define TAG(x) x##_g +#include "ffb_vbtmp.h" - if (MESA_VERBOSE) - ffbPrintSetupFlags("ffb: full setup function", funcindex); +#define IND (FFB_VB_XYZ_BIT | FFB_VB_RGBA_BIT) +#define TAG(x) x##_wg +#include "ffb_vbtmp.h" - fmesa->setupindex = funcindex; - ctx->Driver.RasterSetup = setup_func[funcindex]; -} +#define IND (FFB_VB_TWOSIDE_BIT) +#define TAG(x) x##_t +#include "ffb_vbtmp.h" -void ffbDDCheckPartialRasterSetup(GLcontext *ctx, struct gl_pipeline_stage *d) -{ - ffbContextPtr fmesa = FFB_CONTEXT(ctx); - GLuint tmp = fmesa->setupdone; +#define IND (FFB_VB_XYZ_BIT | FFB_VB_TWOSIDE_BIT) +#define TAG(x) x##_wt +#include "ffb_vbtmp.h" - d->type = 0; - fmesa->setupdone = 0; +#define IND (FFB_VB_RGBA_BIT | FFB_VB_TWOSIDE_BIT) +#define TAG(x) x##_gt +#include "ffb_vbtmp.h" - if ((ctx->Array.Summary & VERT_OBJ_ANY) == 0) - return; - - if (ctx->IndirectTriangles) - return; +#define IND (FFB_VB_XYZ_BIT | FFB_VB_RGBA_BIT | FFB_VB_TWOSIDE_BIT) +#define TAG(x) x##_wgt +#include "ffb_vbtmp.h" - fmesa->setupdone = tmp; +static void init_setup_tab( void ) +{ + init_w(); + init_g(); + init_wg(); + init_t(); + init_wt(); + init_gt(); + init_wgt(); } -void ffbDDPartialRasterSetup(struct vertex_buffer *VB) +#ifdef VB_DEBUG +static void ffbPrintSetupFlags(char *msg, GLuint flags) { -#if 0 - ffbContextPtr fmesa = FFB_CONTEXT(VB->ctx); - GLuint new = VB->pipeline->new_outputs; - GLuint available = VB->pipeline->outputs; + fprintf(stderr, "%s(%x): %s%s%s\n", + msg, + (int)flags, + (flags & FFB_VB_XYZ_BIT) ? " xyz," : "", + (flags & FFB_VB_RGBA_BIT) ? " rgba," : "", + (flags & FFB_VB_TWOSIDE_BIT) ? " twoside," : ""); +} #endif - GLuint ind = 0; -#if 1 - ind = FFB_VB_WIN_BIT | FFB_VB_RGBA_BIT; - if (VB->ctx->TriangleCaps & DD_TRI_LIGHT_TWOSIDE) - ind |= FFB_VB_TWOSIDE_BIT; -#else - if (new & VERT_WIN) { - new = available; - ind |= FFB_VB_WIN_BIT; - } - if (new & VERT_RGBA) - ind |= FFB_VB_RGBA_BIT; -#endif +static void ffbDDBuildVertices(GLcontext *ctx, GLuint start, GLuint count, + GLuint newinputs) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); -#if 0 - fmesa->setupdone &= ~ind; - ind &= fmesa->setupindex; - fmesa->setupdone |= ind; -#endif + newinputs |= fmesa->setupnewinputs; + fmesa->setupnewinputs = 0; - if (MESA_VERBOSE) - ffbPrintSetupFlags("ffb: partial setup function", ind); + if (!newinputs) + return; - if (ind) - setup_func[ind](VB, VB->Start, VB->Count); -} + if (newinputs & VERT_CLIP) { + setup_tab[fmesa->setupindex].emit(ctx, start, count); + } else { + GLuint ind = 0; -void ffbDDDoRasterSetup(struct vertex_buffer *VB) -{ - GLcontext *ctx = VB->ctx; + if (newinputs & VERT_RGBA) + ind |= (FFB_VB_RGBA_BIT | FFB_VB_TWOSIDE_BIT); + + ind &= fmesa->setupindex; - if (VB->Type == VB_CVA_PRECALC) - ffbDDPartialRasterSetup(VB); - else if (ctx->Driver.RasterSetup) - ctx->Driver.RasterSetup(VB, VB->CopyStart, VB->Count); + if (ind) + setup_tab[ind].emit(ctx, start, count); + } } -void ffbDDResizeVB(struct vertex_buffer *VB, GLuint size) +void ffbChooseVertexState( GLcontext *ctx ) { - FFBVertexBufferPtr mvb = FFB_DRIVER_DATA(VB); - - while (mvb->size < size) - mvb->size *= 2; + TNLcontext *tnl = TNL_CONTEXT(ctx); + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + int ind = FFB_VB_XYZ_BIT | FFB_VB_RGBA_BIT; - free(mvb->verts); - mvb->verts = (ffb_vertex *)malloc(sizeof(ffb_vertex) * mvb->size); - if (!mvb->verts) { - fprintf(stderr, "ffb-glx: out of memory !\n"); - exit(1); - } + if (ctx->_TriangleCaps & DD_TRI_LIGHT_TWOSIDE) + ind |= FFB_VB_TWOSIDE_BIT; - gl_vector1ui_free(&mvb->clipped_elements); - gl_vector1ui_alloc(&mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32); - if (!mvb->clipped_elements.start) { - fprintf(stderr, "ffb-glx: out of memory !\n"); - exit(1); - } +#ifdef VB_DEBUG + ffbPrintSetupFlags("ffb: full setup function", ind); +#endif - ALIGN_FREE(VB->ClipMask); - VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 4); - if (!VB->ClipMask) { - fprintf(stderr, "ffb-glx: out of memory !\n"); - exit(1); - } + fmesa->setupindex = ind; - if (VB->Type == VB_IMMEDIATE) { - free(mvb->primitive); - free(mvb->next_primitive); - mvb->primitive = (GLuint *)malloc(sizeof(GLuint) * mvb->size); - mvb->next_primitive = (GLuint *)malloc(sizeof(GLuint) * mvb->size); - if (!mvb->primitive || !mvb->next_primitive) { - fprintf(stderr, "ffb-glx: out of memory !\n"); - exit(1); - } - } + tnl->Driver.Render.BuildVertices = ffbDDBuildVertices; + tnl->Driver.Render.Interp = setup_tab[ind].interp; + if (ind & FFB_VB_TWOSIDE_BIT) + tnl->Driver.Render.CopyPV = ffb_copy_pv_twoside; + else + tnl->Driver.Render.CopyPV = ffb_copy_pv_oneside; } -void ffbDDRegisterVB(struct vertex_buffer *VB) +void ffbInitVB( GLcontext *ctx ) { - FFBVertexBufferPtr mvb; - - mvb = (FFBVertexBufferPtr) calloc(1, sizeof(*mvb)); - if (!mvb) { - fprintf(stderr, "ffb-glx: out of memory !\n"); - exit(1); - } - mvb->size = VB->Size * 2; - mvb->verts = (ffb_vertex *) malloc(sizeof(ffb_vertex) * mvb->size); - if (!mvb->verts) { - fprintf(stderr, "ffb-glx: out of memory !\n"); - exit(1); - } - - gl_vector1ui_alloc(&mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32); - if (!mvb->clipped_elements.start) { - fprintf(stderr, "ffb-glx: out of memory !\n"); - exit(1); - } + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + GLuint size = TNL_CONTEXT(ctx)->vb.Size; - ALIGN_FREE(VB->ClipMask); - VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 4); - if (!VB->ClipMask) { - fprintf(stderr, "ffb-glx: out of memory !\n"); - exit(1); - } + fmesa->verts = (ffb_vertex *)ALIGN_MALLOC(size * sizeof(ffb_vertex), 32); - mvb->primitive = (GLuint *)malloc(sizeof(GLuint) * mvb->size); - mvb->next_primitive = (GLuint *)malloc(sizeof(GLuint) * mvb->size); - if (!mvb->primitive || !mvb->next_primitive) { - fprintf(stderr, "ffb-glx: out of memory !\n"); - exit(1); + { + static int firsttime = 1; + if (firsttime) { + init_setup_tab(); + firsttime = 0; + } } - - VB->driver_data = mvb; } -void ffbDDUnregisterVB(struct vertex_buffer *VB) -{ - FFBVertexBufferPtr mvb = FFB_DRIVER_DATA(VB); - if (mvb) { - if (mvb->verts) - free(mvb->verts); - if (mvb->primitive) - free(mvb->primitive); - if (mvb->next_primitive) - free(mvb->next_primitive); - gl_vector1ui_free(&mvb->clipped_elements); - free(mvb); - VB->driver_data = 0; +void ffbFreeVB( GLcontext *ctx ) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + if (fmesa->verts) { + ALIGN_FREE(fmesa->verts); + fmesa->verts = 0; } } Index: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_vb.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_vb.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_vb.h:1.1 Tue Jun 20 01:08:40 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_vb.h Fri Feb 22 16:32:59 2002 @@ -1,63 +1,46 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.h,v 1.1 2000/06/20 05:08:40 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.h,v 1.2 2002/02/22 21:32:59 dawes Exp $ */ #ifndef _FFB_VB_H #define _FFB_VB_H -#include "vb.h" -#include "types.h" +#include "mtypes.h" +#include "macros.h" +#include "mmath.h" +#include "tnl/t_context.h" +#include "swrast/swrast.h" + +#define __FFB_2_30_FIXED_SCALE 1073741824.0f +#define FFB_2_30_FLOAT_TO_FIXED(X) \ + (IROUND((X) * fmesa->ffb_2_30_fixed_scale)) +#define FFB_2_30_FIXED_TO_FLOAT(X) \ + (((GLfloat)(X)) * fmesa->ffb_one_over_2_30_fixed_scale) + +#define __FFB_16_16_FIXED_SCALE 65536.0f +#define FFB_16_16_FLOAT_TO_FIXED(X) \ + (IROUND((X) * fmesa->ffb_16_16_fixed_scale)) +#define FFB_16_16_FIXED_TO_FLOAT(X) \ + (((GLfloat)(X)) * fmesa->ffb_one_over_16_16_fixed_scale) + +#define FFB_Z_FROM_FLOAT(VAL) FFB_2_30_FLOAT_TO_FIXED(VAL) +#define FFB_Z_TO_FLOAT(VAL) FFB_2_30_FIXED_TO_FLOAT(VAL) +#define FFB_XY_FROM_FLOAT(VAL) FFB_16_16_FLOAT_TO_FIXED(VAL) +#define FFB_XY_TO_FLOAT(VAL) FFB_16_16_FIXED_TO_FLOAT(VAL) + +#define FFB_UBYTE_FROM_COLOR(VAL) ((IROUND((VAL) * fmesa->ffb_ubyte_color_scale))) + +#define FFB_PACK_CONST_UBYTE_ARGB_COLOR(C) \ + ((FFB_UBYTE_FROM_COLOR(C.alpha) << 24) | \ + (FFB_UBYTE_FROM_COLOR(C.blue) << 16) | \ + (FFB_UBYTE_FROM_COLOR(C.green) << 8) | \ + (FFB_UBYTE_FROM_COLOR(C.red) << 0)) -/* Use this to disable ffb VB processing, presumable to try - * and isolate bugs. - */ -#undef FFB_VB_DISABLE - -/* These are all in 2:30 signed fixed point format. */ -typedef struct { - GLuint alpha; - GLuint red; - GLuint green; - GLuint blue; -} ffb_color; - -#define FFB_COLOR_FROM_UBYTE(VAL) (((((GLuint)(VAL)) + 1) & (255 << 1)) << (30 - 8)) - -typedef struct { - /* As for colors, this is in 2:30 signed fixed point. */ - GLint z; - - /* These are in 16:16 fixed point. */ - GLuint y, x; - - ffb_color color[2]; -} ffb_vertex; - -#define FFB_Z_FROM_FLOAT(VAL) ((GLint)((VAL) * 1073741824.0f)) -#define FFB_COORD_FROM_FLOAT(VAL) ((GLuint)((VAL) * 65536.0f)) - -struct ffb_vertex_buffer_t { - GLvector1ui clipped_elements; - ffb_vertex *verts; - int last_virt; - GLuint *primitive; - GLuint *next_primitive; - GLuint size; -}; - -typedef struct ffb_vertex_buffer_t *FFBVertexBufferPtr; - -#define FFB_DRIVER_DATA(vb) ((FFBVertexBufferPtr)((vb)->driver_data)) - -#define FFB_VB_RGBA_BIT 0x01 -#define FFB_VB_WIN_BIT 0x02 -#define FFB_VB_TWOSIDE_BIT 0x04 +#define FFB_COLOR_FROM_FLOAT(VAL) FFB_2_30_FLOAT_TO_FIXED(VAL) +#define _FFB_NEW_VERTEX (_DD_NEW_TRI_LIGHT_TWOSIDE) + extern void ffbDDSetupInit(void); -extern void ffbChooseRasterSetupFunc(GLcontext *); -extern void ffbDDCheckPartialRasterSetup(GLcontext *, struct gl_pipeline_stage *); -extern void ffbDDPartialRasterSetup(struct vertex_buffer *); -extern void ffbDDDoRasterSetup(struct vertex_buffer *); -extern void ffbDDResizeVB(struct vertex_buffer *, GLuint); -extern void ffbDDRegisterVB(struct vertex_buffer *); -extern void ffbDDUnregisterVB(struct vertex_buffer *); +extern void ffbChooseVertexState(GLcontext *); +extern void ffbInitVB( GLcontext *ctx ); +extern void ffbFreeVB( GLcontext *ctx ); #endif /* !(_FFB_VB_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_vbtmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/ffb/ffb_vbtmp.h:1.1 --- /dev/null Thu Feb 27 12:26:20 2003 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_vbtmp.h Fri Feb 22 16:32:59 2002 @@ -0,0 +1,177 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vbtmp.h,v 1.1 2002/02/22 21:32:59 dawes Exp $ */ + +static void TAG(emit)(GLcontext *ctx, GLuint start, GLuint end) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; +#if (IND & (FFB_VB_RGBA_BIT)) + GLfloat (*col0)[4]; + GLuint col0_stride; +#if (IND & (FFB_VB_TWOSIDE_BIT)) + GLfloat (*col1)[4]; + GLuint col1_stride; +#endif +#endif +#if (IND & FFB_VB_XYZ_BIT) + GLfloat (*proj)[4] = VB->ProjectedClipPtr->data; + GLuint proj_stride = VB->ProjectedClipPtr->stride; + const GLubyte *mask = VB->ClipMask; +#endif + ffb_vertex *v = &fmesa->verts[start]; + int i; + +#ifdef VB_DEBUG + fprintf(stderr, "FFB: ffb_emit [" +#if (IND & (FFB_VB_XYZ_BIT)) + " XYZ" +#endif +#if (IND & (FFB_VB_RGBA_BIT)) + " RGBA" +#endif +#if (IND & (FFB_VB_TWOSIDE_BIT)) + " TWOSIDE" +#endif + "] start(%d) end(%d) import(%d)\n", + start, end, + VB->importable_data); +#endif + +#if (IND & (FFB_VB_RGBA_BIT)) + if (VB->ColorPtr[0]->Type != GL_FLOAT) + ffbImportColors(fmesa, ctx, 0); +#if (IND & (FFB_VB_TWOSIDE_BIT)) + if (VB->ColorPtr[1]->Type != GL_FLOAT) + ffbImportColors(fmesa, ctx, 1); +#endif + col0 = (GLfloat (*)[4]) VB->ColorPtr[0]->Ptr; + col0_stride = VB->ColorPtr[0]->StrideB; +#if (IND & (FFB_VB_TWOSIDE_BIT)) + col1 = (GLfloat (*)[4]) VB->ColorPtr[1]->Ptr; + col1_stride = VB->ColorPtr[1]->StrideB; +#endif +#endif + + if (VB->importable_data) { + if (start) { +#if (IND & (FFB_VB_XYZ_BIT)) + proj = (GLfloat (*)[4])((GLubyte *)proj + start * proj_stride); +#endif +#if (IND & (FFB_VB_RGBA_BIT)) + col0 = (GLfloat (*)[4])((GLubyte *)col0 + start * col0_stride); +#if (IND & (FFB_VB_TWOSIDE_BIT)) + col1 = (GLfloat (*)[4])((GLubyte *)col1 + start * col1_stride); +#endif +#endif + } + for (i = start; i < end; i++, v++) { +#if (IND & (FFB_VB_XYZ_BIT)) + if (mask[i] == 0) { + v->x = proj[0][0]; + v->y = proj[0][1]; + v->z = proj[0][2]; + } + proj = (GLfloat (*)[4])((GLubyte *)proj + proj_stride); +#endif +#if (IND & (FFB_VB_RGBA_BIT)) + v->color[0].alpha = CLAMP(col0[0][3], 0.0f, 1.0f); + v->color[0].red = CLAMP(col0[0][0], 0.0f, 1.0f); + v->color[0].green = CLAMP(col0[0][1], 0.0f, 1.0f); + v->color[0].blue = CLAMP(col0[0][2], 0.0f, 1.0f); + col0 = (GLfloat (*)[4])((GLubyte *)col0 + col0_stride); +#if (IND & (FFB_VB_TWOSIDE_BIT)) + v->color[1].alpha = CLAMP(col1[0][3], 0.0f, 1.0f); + v->color[1].red = CLAMP(col1[0][0], 0.0f, 1.0f); + v->color[1].green = CLAMP(col1[0][1], 0.0f, 1.0f); + v->color[1].blue = CLAMP(col1[0][2], 0.0f, 1.0f); + col1 = (GLfloat (*)[4])((GLubyte *)col1 + col1_stride); +#endif +#endif + } + } else { + for (i = start; i < end; i++, v++) { +#if (IND & (FFB_VB_XYZ_BIT)) + if (mask[i] == 0) { + v->x = proj[i][0]; + v->y = proj[i][1]; + v->z = proj[i][2]; + } +#endif +#if (IND & (FFB_VB_RGBA_BIT)) + v->color[0].alpha = CLAMP(col0[i][3], 0.0f, 1.0f); + v->color[0].red = CLAMP(col0[i][0], 0.0f, 1.0f); + v->color[0].green = CLAMP(col0[i][1], 0.0f, 1.0f); + v->color[0].blue = CLAMP(col0[i][2], 0.0f, 1.0f); +#if (IND & (FFB_VB_TWOSIDE_BIT)) + v->color[1].alpha = CLAMP(col1[i][3], 0.0f, 1.0f); + v->color[1].red = CLAMP(col1[i][0], 0.0f, 1.0f); + v->color[1].green = CLAMP(col1[i][1], 0.0f, 1.0f); + v->color[1].blue = CLAMP(col1[i][2], 0.0f, 1.0f); +#endif +#endif + } + } +} + +static void TAG(interp)(GLcontext *ctx, GLfloat t, + GLuint edst, GLuint eout, GLuint ein, + GLboolean force_boundary) +{ +#if (IND & (FFB_VB_XYZ_BIT | FFB_VB_RGBA_BIT)) + ffbContextPtr fmesa = FFB_CONTEXT(ctx); +#endif +#if (IND & (FFB_VB_XYZ_BIT)) + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + const GLfloat *dstclip = VB->ClipPtr->data[edst]; + GLfloat oow = 1.0 / dstclip[3]; +#endif +#if (IND & (FFB_VB_XYZ_BIT | FFB_VB_RGBA_BIT)) + ffb_vertex *dst = &fmesa->verts[edst]; +#endif +#if (IND & (FFB_VB_RGBA_BIT)) + ffb_vertex *in = &fmesa->verts[eout]; + ffb_vertex *out = &fmesa->verts[ein]; +#endif + +#ifdef VB_DEBUG + fprintf(stderr, "FFB: ffb_interp [" +#if (IND & (FFB_VB_XYZ_BIT)) + " XYZ" +#endif +#if (IND & (FFB_VB_RGBA_BIT)) + " RGBA" +#endif +#if (IND & (FFB_VB_TWOSIDE_BIT)) + " TWOSIDE" +#endif + "] edst(%d) eout(%d) ein(%d)\n", + edst, eout, ein); +#endif + +#if (IND & (FFB_VB_XYZ_BIT)) + dst->x = dstclip[0] * oow; + dst->y = dstclip[1] * oow; + dst->z = dstclip[2] * oow; +#endif + +#if (IND & (FFB_VB_RGBA_BIT)) + INTERP_F(t, dst->color[0].alpha, out->color[0].alpha, in->color[0].alpha); + INTERP_F(t, dst->color[0].red, out->color[0].red, in->color[0].red); + INTERP_F(t, dst->color[0].green, out->color[0].green, in->color[0].green); + INTERP_F(t, dst->color[0].blue, out->color[0].blue, in->color[0].blue); +#if (IND & (FFB_VB_TWOSIDE_BIT)) + INTERP_F(t, dst->color[1].alpha, out->color[1].alpha, in->color[1].alpha); + INTERP_F(t, dst->color[1].red, out->color[1].red, in->color[1].red); + INTERP_F(t, dst->color[1].green, out->color[1].green, in->color[1].green); + INTERP_F(t, dst->color[1].blue, out->color[1].blue, in->color[1].blue); +#endif +#endif +} + +static void TAG(init)(void) +{ + setup_tab[IND].emit = TAG(emit); + setup_tab[IND].interp = TAG(interp); +} + +#undef IND +#undef TAG Index: xc/lib/GL/mesa/src/drv/ffb/ffb_vtxfmt.c diff -u /dev/null xc/lib/GL/mesa/src/drv/ffb/ffb_vtxfmt.c:1.1 --- /dev/null Thu Feb 27 12:26:20 2003 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_vtxfmt.c Fri Feb 22 16:32:59 2002 @@ -0,0 +1,429 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vtxfmt.c,v 1.1 2002/02/22 21:32:59 dawes Exp $ + * + * GLX Hardware Device Driver for Sun Creator/Creator3D + * Copyright (C) 2001 David S. Miller + * + * 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 + * 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. + * + * + * David S. Miller + */ + +#include "glheader.h" +#include "api_noop.h" +#include "context.h" +#include "light.h" +#include "macros.h" +#include "mem.h" +#include "mmath.h" +#include "mtypes.h" +#include "simple_list.h" +#include "vtxfmt.h" +#include "ffb_xmesa.h" +#include "ffb_context.h" +#include "ffb_vb.h" +#include "tnl/tnl.h" +#include "tnl/t_context.h" + +#include "ffb_vtxfmt.h" + +#ifndef __GNUC__ +#define __inline /**/ +#endif + +#define TNL_VERTEX ffbTnlVertex + +#define LINTERP( T, A, B ) ((A) + (T) * ((B) - (A))) + +#define INTERP_RGBA(t, out, a, b) \ +do { \ + GLint i; \ + for ( i = 0 ; i < 4 ; i++ ) { \ + GLfloat fa = a[i]; \ + GLfloat fb = b[i]; \ + out[i] = LINTERP( t, fa, fb ); \ + } \ +} while (0) + +/* Color functions: */ + +static __inline void ffb_recalc_base_color(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + struct gl_light *light; + + COPY_3V(fmesa->vtx_state.light.base_color, ctx->Light._BaseColor[0]); + foreach (light, &ctx->Light.EnabledList) { + ACC_3V(fmesa->vtx_state.light.base_color, + light->_MatAmbient[0]); + } + + fmesa->vtx_state.light.base_alpha = ctx->Light._BaseAlpha[0]; +} + +#define GET_CURRENT \ + GET_CURRENT_CONTEXT(ctx); \ + ffbContextPtr fmesa = FFB_CONTEXT(ctx) + +#define CURRENT_COLOR(COMP) fmesa->vtx_state.current.color[COMP] +#define CURRENT_SPECULAR(COMP) fmesa->vtx_state.current.specular[COMP] +#define COLOR_IS_FLOAT +#define RECALC_BASE_COLOR(ctx) ffb_recalc_base_color(ctx) + +#define TAG(x) ffb_##x +#include "tnl_dd/t_dd_imm_capi.h" + +/* Normal functions: */ + +struct ffb_norm_tab { + void (*normal3f_multi)(GLfloat x, GLfloat y, GLfloat z); + void (*normal3fv_multi)(const GLfloat *v); + void (*normal3f_single)(GLfloat x, GLfloat y, GLfloat z); + void (*normal3fv_single)(const GLfloat *v); +}; + +static struct ffb_norm_tab norm_tab[0x4]; + +#define HAVE_HW_LIGHTING 0 +#define GET_CURRENT_VERTEX \ + GET_CURRENT_CONTEXT(ctx); \ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); \ + ffbTnlVertexPtr v = fmesa->imm.v0 + +#define CURRENT_NORMAL fmesa->vtx_state.current.normal +#define BASE_COLOR fmesa->vtx_state.light.base_color +#define BASE_ALPHA fmesa->vtx_state.light.base_alpha +#define VERT_COLOR( COMP ) v->color[COMP] +#define VERT_COLOR_IS_FLOAT + +#define IND (0) +#define TAG(x) ffb_##x +#define PRESERVE_NORMAL_DEFS +#include "tnl_dd/t_dd_imm_napi.h" + +#define IND (NORM_RESCALE) +#define TAG(x) ffb_##x##_rescale +#define PRESERVE_NORMAL_DEFS +#include "tnl_dd/t_dd_imm_napi.h" + +#define IND (NORM_NORMALIZE) +#define TAG(x) ffb_##x##_normalize +#include "tnl_dd/t_dd_imm_napi.h" + +static void ffb_init_norm_funcs(void) +{ + ffb_init_norm(); + ffb_init_norm_rescale(); + ffb_init_norm_normalize(); +} + +static void choose_normals(void) +{ + GET_CURRENT_CONTEXT(ctx); + GLuint index; + + if (ctx->Light.Enabled) { + if (ctx->Transform.Normalize) { + index = NORM_NORMALIZE; + } else if (!ctx->Transform.RescaleNormals && + ctx->_ModelViewInvScale != 1.0) { + index = NORM_RESCALE; + } else { + index = 0; + } + + if (ctx->Light.EnabledList.next == ctx->Light.EnabledList.prev) { + ctx->Exec->Normal3f = norm_tab[index].normal3f_single; + ctx->Exec->Normal3fv = norm_tab[index].normal3fv_single; + } else { + ctx->Exec->Normal3f = norm_tab[index].normal3f_multi; + ctx->Exec->Normal3fv = norm_tab[index].normal3fv_multi; + } + } else { + ctx->Exec->Normal3f = _mesa_noop_Normal3f; + ctx->Exec->Normal3fv = _mesa_noop_Normal3fv; + } +} + +static void ffb_choose_Normal3f(GLfloat x, GLfloat y, GLfloat z) +{ + choose_normals(); + glNormal3f(x, y, z); +} + +static void ffb_choose_Normal3fv(const GLfloat *v) +{ + choose_normals(); + glNormal3fv(v); +} + +/* Vertex functions: */ + +#define GET_CURRENT_VERTEX \ + GET_CURRENT_CONTEXT(ctx); \ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); \ + ffbTnlVertexPtr v = fmesa->imm.v0 + +#define CURRENT_VERTEX v->obj +#define SAVE_VERTEX fmesa->imm.save_vertex(ctx, v) + +#define TAG(x) ffb_##x +#include "tnl_dd/t_dd_imm_vapi.h" + +struct ffb_vert_tab { + void (*save_vertex)(GLcontext *ctx, ffbTnlVertexPtr v); + void (*interpolate_vertex)(GLfloat t, + ffbTnlVertex *O, + const ffbTnlVertex *I, + const ffbTnlVertex *J); +}; + +static struct ffb_vert_tab vert_tab[0xf]; + +#define VTX_NORMAL 0x0 +#define VTX_RGBA 0x1 + +#define LOCAL_VARS \ + ffbContextPtr fmesa = FFB_CONTEXT(ctx) + +#define CURRENT_COLOR fmesa->vtx_state.current.color +#define COLOR_IS_FLOAT +#define FLUSH_VERTEX fmesa->imm.flush_vertex( ctx, v ); + +#define IND (VTX_NORMAL) +#define TAG(x) ffb_##x##_NORMAL +#define PRESERVE_VERTEX_DEFS +#include "tnl_dd/t_dd_imm_vertex.h" + +#define IND (VTX_RGBA) +#define TAG(x) ffb_##x##_RGBA +#include "tnl_dd/t_dd_imm_vertex.h" + +static void ffb_init_vert_funcs( void ) +{ + ffb_init_vert_NORMAL(); + ffb_init_vert_RGBA(); +} + +#define LOCAL_VARS \ + ffbContextPtr fmesa = FFB_CONTEXT(ctx) + +#define GET_INTERP_FUNC \ + ffb_interp_func interp = fmesa->imm.interp + +#define FLUSH_VERTEX fmesa->imm.flush_vertex +#define IMM_VERTEX( V ) fmesa->imm.V +#define IMM_VERTICES( n ) fmesa->imm.vertices[n] + +#define EMIT_VERTEX_USES_HWREGS + +/* XXX Implement me XXX */ +#define EMIT_VERTEX_TRI(VTX0, VTX1, VTX2) \ + do { } while (0) +#define EMIT_VERTEX_LINE(VTX0, VTX1) \ + do { } while (0) +#define EMIT_VERTEX_POINT(VTX0) \ + do { } while (0) + +#define TAG(x) ffb_##x +#include "tnl_dd/t_dd_imm_primtmp.h" + +/* Bzzt: Material changes are lost on fallback. */ +static void ffb_Materialfv(GLenum face, GLenum pname, + const GLfloat *params) +{ + GET_CURRENT_CONTEXT(ctx); + + _mesa_noop_Materialfv( face, pname, params ); + ffb_recalc_base_color( ctx ); +} + +/* Fallback functions: */ + +static void ffb_do_fallback(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + struct ffb_current_state *current = &fmesa->vtx_state.current; + + /* Tell tnl to restore its exec vtxfmt, rehook its driver callbacks + * and revive internal state that depended on those callbacks: + */ + _tnl_wakeup_exec(ctx); + + /* Replay enough vertices that the current primitive is continued + * correctly: + */ + if (fmesa->imm.prim != PRIM_OUTSIDE_BEGIN_END ) + glBegin(fmesa->imm.prim); + + if (ctx->Light.Enabled) { + glColor4fv(ctx->Current.Color); /* Catch ColorMaterial */ + glNormal3fv(current->normal); + } else { + glColor4fv(current->color); + } +} + +#define PRE_LOOPBACK( FUNC ) do { \ + GET_CURRENT_CONTEXT(ctx); \ + ffb_do_fallback( ctx ); \ +} while (0) + +#define TAG(x) ffb_fallback_##x +#include "vtxfmt_tmp.h" + +static void ffb_Begin(GLenum prim) +{ + GET_CURRENT_CONTEXT(ctx); + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + + if (prim > GL_POLYGON) { + _mesa_error( ctx, GL_INVALID_ENUM, "glBegin" ); + return; + } + + if (fmesa->imm.prim != PRIM_OUTSIDE_BEGIN_END) { + _mesa_error( ctx, GL_INVALID_OPERATION, "glBegin" ); + return; + } + + ctx->Driver.NeedFlush |= (FLUSH_STORED_VERTICES | + FLUSH_UPDATE_CURRENT); + + fmesa->imm.prim = prim; + fmesa->imm.v0 = &fmesa->imm.vertices[0]; + fmesa->imm.save_vertex = ffb_save_vertex_RGBA; + fmesa->imm.flush_vertex = ffb_flush_tab[prim]; + + /* XXX Lock hardware, update FBC, PPC, DRAWOP, etc. XXX */ +} + +static void ffb_End(void) +{ + GET_CURRENT_CONTEXT(ctx); + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + + if (fmesa->imm.prim == PRIM_OUTSIDE_BEGIN_END) { + _mesa_error( ctx, GL_INVALID_OPERATION, "glEnd" ); + return; + } + + fmesa->imm.prim = PRIM_OUTSIDE_BEGIN_END; + + ctx->Driver.NeedFlush &= ~(FLUSH_STORED_VERTICES | + FLUSH_UPDATE_CURRENT); + + /* XXX Unlock hardware, etc. */ +} + +void ffbInitTnlModule(GLcontext *ctx) +{ + ffbContextPtr fmesa = FFB_CONTEXT(ctx); + GLvertexformat *vfmt = &(fmesa->imm.vtxfmt); + + /* Work in progress... */ + return; + + ffb_init_norm_funcs(); + ffb_init_vert_funcs(); + + MEMSET(vfmt, 0, sizeof(GLvertexformat)); + + /* Handled fully in supported states: */ + vfmt->ArrayElement = NULL; /* FIXME: ... */ + vfmt->Color3f = ffb_choose_Color3f; + vfmt->Color3fv = ffb_choose_Color3fv; + vfmt->Color3ub = ffb_choose_Color3ub; + vfmt->Color3ubv = ffb_choose_Color3ubv; + vfmt->Color4f = ffb_choose_Color4f; + vfmt->Color4fv = ffb_choose_Color4fv; + vfmt->Color4ub = ffb_choose_Color4ub; + vfmt->Color4ubv = ffb_choose_Color4ubv; + vfmt->FogCoordfvEXT = ffb_FogCoordfvEXT; + vfmt->FogCoordfEXT = ffb_FogCoordfEXT; + vfmt->Materialfv = ffb_Materialfv; + vfmt->MultiTexCoord1fARB = ffb_fallback_MultiTexCoord1fARB; + vfmt->MultiTexCoord1fvARB = ffb_fallback_MultiTexCoord1fvARB; + vfmt->MultiTexCoord2fARB = ffb_fallback_MultiTexCoord2fARB; + vfmt->MultiTexCoord2fvARB = ffb_fallback_MultiTexCoord2fvARB; + vfmt->MultiTexCoord3fARB = ffb_fallback_MultiTexCoord3fARB; + vfmt->MultiTexCoord3fvARB = ffb_fallback_MultiTexCoord3fvARB; + vfmt->MultiTexCoord4fARB = ffb_fallback_MultiTexCoord4fARB; + vfmt->MultiTexCoord4fvARB = ffb_fallback_MultiTexCoord4fvARB; + vfmt->Normal3f = ffb_choose_Normal3f; + vfmt->Normal3fv = ffb_choose_Normal3fv; + vfmt->SecondaryColor3ubEXT = ffb_SecondaryColor3ubEXT; + vfmt->SecondaryColor3ubvEXT = ffb_SecondaryColor3ubvEXT; + vfmt->SecondaryColor3fEXT = ffb_SecondaryColor3fEXT; + vfmt->SecondaryColor3fvEXT = ffb_SecondaryColor3fvEXT; + vfmt->TexCoord1f = ffb_fallback_TexCoord1f; + vfmt->TexCoord1fv = ffb_fallback_TexCoord1fv; + vfmt->TexCoord2f = ffb_fallback_TexCoord2f; + vfmt->TexCoord2fv = ffb_fallback_TexCoord2fv; + vfmt->TexCoord3f = ffb_fallback_TexCoord3f; + vfmt->TexCoord3fv = ffb_fallback_TexCoord3fv; + vfmt->TexCoord4f = ffb_fallback_TexCoord4f; + vfmt->TexCoord4fv = ffb_fallback_TexCoord4fv; + + vfmt->Vertex2f = ffb_Vertex2f; + vfmt->Vertex2fv = ffb_Vertex2fv; + vfmt->Vertex3f = ffb_Vertex3f; + vfmt->Vertex3fv = ffb_Vertex3fv; + vfmt->Vertex4f = ffb_Vertex4f; + vfmt->Vertex4fv = ffb_Vertex4fv; + + vfmt->Begin = ffb_Begin; + vfmt->End = ffb_End; + + vfmt->Rectf = _mesa_noop_Rectf; /* generic helper */ + + vfmt->DrawArrays = NULL; + vfmt->DrawElements = NULL; + vfmt->DrawRangeElements = _mesa_noop_DrawRangeElements; /* discard range */ + + + /* Not active in supported states; just keep ctx->Current uptodate: */ + vfmt->EdgeFlag = _mesa_noop_EdgeFlag; + vfmt->EdgeFlagv = _mesa_noop_EdgeFlagv; + vfmt->Indexi = _mesa_noop_Indexi; + vfmt->Indexiv = _mesa_noop_Indexiv; + + /* Active but unsupported -- fallback if we receive these: + * + * All of these fallbacks can be fixed with additional code, except + * CallList, unless we build a play_immediate_noop() command which + * turns an immediate back into glBegin/glEnd commands... + */ + vfmt->CallList = ffb_fallback_CallList; + vfmt->EvalCoord1f = ffb_fallback_EvalCoord1f; + vfmt->EvalCoord1fv = ffb_fallback_EvalCoord1fv; + vfmt->EvalCoord2f = ffb_fallback_EvalCoord2f; + vfmt->EvalCoord2fv = ffb_fallback_EvalCoord2fv; + vfmt->EvalMesh1 = ffb_fallback_EvalMesh1; + vfmt->EvalMesh2 = ffb_fallback_EvalMesh2; + vfmt->EvalPoint1 = ffb_fallback_EvalPoint1; + vfmt->EvalPoint2 = ffb_fallback_EvalPoint2; + + vfmt->prefer_float_colors = GL_TRUE; + + fmesa->imm.prim = PRIM_OUTSIDE_BEGIN_END; + + /* THIS IS A HACK! */ + _mesa_install_exec_vtxfmt( ctx, vfmt ); +} Index: xc/lib/GL/mesa/src/drv/ffb/ffb_vtxfmt.h diff -u /dev/null xc/lib/GL/mesa/src/drv/ffb/ffb_vtxfmt.h:1.1 --- /dev/null Thu Feb 27 12:26:20 2003 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_vtxfmt.h Fri Feb 22 16:32:59 2002 @@ -0,0 +1,8 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vtxfmt.h,v 1.1 2002/02/22 21:32:59 dawes Exp $ */ + +#ifndef _FFB_VTXFMT_H +#define _FFB_VTXFMT_H + +extern void ffbInitTnlModule(GLcontext *); + +#endif /* !(_FFB_VTXFMT_H) */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c:1.3 xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c:1.4 --- xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c:1.3 Tue May 29 18:24:01 2001 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c Fri Feb 22 16:32:59 2002 @@ -1,7 +1,7 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c,v 1.3 2001/05/29 22:24:01 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c,v 1.4 2002/02/22 21:32:59 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D - * Copyright (C) 2000 David S. Miller + * Copyright (C) 2000, 2001 David S. Miller * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,11 +32,18 @@ #include "ffb_xmesa.h" #include "context.h" -#include "vbxform.h" #include "matrix.h" #include "simple_list.h" #include "mmath.h" +#include "mem.h" +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" +#include "array_cache/acache.h" + + #include "xf86dri.h" #include "ffb_context.h" @@ -50,41 +57,20 @@ #include "ffb_lines.h" #include "ffb_points.h" #include "ffb_state.h" -#include "ffb_pipeline.h" +#include "ffb_tex.h" #include "ffb_lock.h" - -#if 0 -#include "xmesaP.h" -#endif - -static ffbContextPtr ffbCtx = NULL; +#include "ffb_vtxfmt.h" +#include "ffb_bitmap.h" -/* These functions are accessed by dlsym from dri_mesa_init.c: - * - * XMesaInitDriver - * XMesaResetDriver - * XMesaCreateVisual - * XMesaDestroyVisual - * XMesaCreateContext - * XMesaDestroyContext - * XMesaCreateWindowBuffer - * XMesaCreatePixmapBuffer - * XMesaDestroyBuffer - * XMesaSwapBuffers - * XMesaMakeCurrent - * - * So this is kind of the public interface to the driver. The driver - * uses the X11 mesa driver context as a kind of wrapper around its - * own driver context - but there isn't much justificiation for doing - * it that way - the DRI might as well use a (void *) to refer to the - * driver contexts. Nothing in the X context really gets used. - */ - -GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv) +static GLboolean +ffbInitDriver(__DRIscreenPrivate *sPriv) { ffbScreenPrivate *ffbScreen; FFBDRIPtr gDRIPriv = (FFBDRIPtr) sPriv->pDevPriv; + if (getenv("LIBGL_FORCE_XSERVER")) + return GL_FALSE; + /* Allocate the private area. */ ffbScreen = (ffbScreenPrivate *) Xmalloc(sizeof(ffbScreenPrivate)); if (!ffbScreen) @@ -154,16 +140,15 @@ ffbScreen->sPriv = sPriv; sPriv->private = (void *) ffbScreen; - ffbDDSetupInit(); - ffbDDTrifuncInit(); ffbDDLinefuncInit(); ffbDDPointfuncInit(); return GL_TRUE; } -/* Accessed by dlsym from dri_mesa_init.c */ -void XMesaResetDriver(__DRIscreenPrivate *sPriv) + +static void +ffbDestroyScreen(__DRIscreenPrivate *sPriv) { ffbScreenPrivate *ffbScreen = sPriv->private; FFBDRIPtr gDRIPriv = (FFBDRIPtr) sPriv->pDevPriv; @@ -177,56 +162,51 @@ Xfree(ffbScreen); } -/* Accessed by dlsym from dri_mesa_init.c */ -GLvisual *XMesaCreateVisual(Display *dpy, - __DRIscreenPrivate *driScrnPriv, - const XVisualInfo *visinfo, - const __GLXvisualConfig *config) -{ - /* Only RGB visuals (for now) in this FFB driver. */ - if (!config->rgba) - return NULL; +static const struct gl_pipeline_stage *ffb_pipeline[] = { + &_tnl_vertex_transform_stage, + &_tnl_normal_transform_stage, + &_tnl_lighting_stage, + /* REMOVE: fog coord stage */ + &_tnl_texgen_stage, + &_tnl_texture_transform_stage, + /* REMOVE: point attenuation stage */ + &_tnl_render_stage, + 0, +}; - /* 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) +static GLboolean +ffbCreateContext(Display *dpy, const __GLcontextModes *mesaVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate) { ffbContextPtr fmesa; - GLcontext *glCtx; + GLcontext *ctx, *shareCtx; __DRIscreenPrivate *sPriv; ffbScreenPrivate *ffbScreen; + char *debug; - fmesa = (ffbContextPtr) Xmalloc(sizeof(ffbContextRec)); + /* Allocate ffb context */ + fmesa = (ffbContextPtr) CALLOC(sizeof(ffbContextRec)); if (!fmesa) return GL_FALSE; + + /* Allocate Mesa context */ + if (sharedContextPrivate) + shareCtx = ((ffbContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + fmesa->glCtx = _mesa_create_context(mesaVis, shareCtx, fmesa, GL_TRUE); + if (!fmesa->glCtx) { + FREE(fmesa); + return GL_FALSE; + } + driContextPriv->driverPrivate = fmesa; + ctx = fmesa->glCtx; - glCtx = driContextPriv->mesaContext; sPriv = driContextPriv->driScreenPriv; ffbScreen = (ffbScreenPrivate *) sPriv->private; - fmesa->glCtx = glCtx; - glCtx->DriverCtx = (void *) fmesa; - /* Dri stuff. */ fmesa->display = dpy; fmesa->hHWContext = driContextPriv->hHWContext; @@ -240,115 +220,156 @@ /* Register and framebuffer hw pointers. */ fmesa->regs = ffbScreen->regs; fmesa->sfb32 = ffbScreen->sfb32; - - fmesa->SWrender = 0; - if (getenv("LIBGL_SOFTWARE_RENDERING")) - fmesa->SWrender = 1; - ffbDDInitContextHwState(glCtx); + ffbDDInitContextHwState(ctx); /* Default clear and depth colors. */ { - GLubyte r = (GLint) (glCtx->Color.ClearColor[0] * 255.0F); - GLubyte g = (GLint) (glCtx->Color.ClearColor[1] * 255.0F); - GLubyte b = (GLint) (glCtx->Color.ClearColor[2] * 255.0F); + GLubyte r = (GLint) (ctx->Color.ClearColor[0] * 255.0F); + GLubyte g = (GLint) (ctx->Color.ClearColor[1] * 255.0F); + GLubyte b = (GLint) (ctx->Color.ClearColor[2] * 255.0F); fmesa->clear_pixel = ((r << 0) | (g << 8) | (b << 16)); } - fmesa->clear_depth = Z_FROM_MESA(glCtx->Depth.Clear * 4294967295.0f); - fmesa->clear_stencil = glCtx->Stencil.Clear & 0xf; + fmesa->clear_depth = Z_FROM_MESA(ctx->Depth.Clear * 4294967295.0f); + fmesa->clear_stencil = ctx->Stencil.Clear & 0xf; - /* All of this need only be done once for a new context. */ - ffbDDExtensionsInit(glCtx); - ffbDDInitDriverFuncs(glCtx); - ffbDDInitStateFuncs(glCtx); - ffbDDInitSpanFuncs(glCtx); - ffbDDInitDepthFuncs(glCtx); - ffbDDInitStencilFuncs(glCtx); - - /* Actually we do the culling in software. The problem is - * that there is apparently some bug in generic MESA if you - * provide a driver triangle rendering function when culling - * is enabled. - * - * Generic MESA in such a case does the culling in it's very - * own software triangle rasterizers (ie. when the driver indicates - * it cannot do it). Perhaps this is a clue. + /* No wide points. */ + ctx->Const.MinPointSize = 1.0; + ctx->Const.MinPointSizeAA = 1.0; + ctx->Const.MaxPointSize = 1.0; + ctx->Const.MaxPointSizeAA = 1.0; + + /* Disable wide lines as we can't antialias them correctly in + * hardware. */ - glCtx->Driver.TriangleCaps = DD_TRI_CULL; + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 1.0; + ctx->Const.MaxLineWidthAA = 1.0; + ctx->Const.LineWidthGranularity = 1.0; - if (glCtx->VB) - ffbDDRegisterVB(glCtx->VB); + /* Instead of having GCC emit these constants a zillion times + * everywhere in the driver, put them here. + */ + fmesa->ffb_2_30_fixed_scale = __FFB_2_30_FIXED_SCALE; + fmesa->ffb_one_over_2_30_fixed_scale = (1.0 / __FFB_2_30_FIXED_SCALE); + fmesa->ffb_16_16_fixed_scale = __FFB_16_16_FIXED_SCALE; + fmesa->ffb_one_over_16_16_fixed_scale = (1.0 / __FFB_16_16_FIXED_SCALE); + fmesa->ffb_ubyte_color_scale = 255.0f; + fmesa->ffb_zero = 0.0f; + + fmesa->debugFallbacks = GL_FALSE; + debug = getenv("LIBGL_DEBUG"); + if (debug && strstr(debug, "fallbacks")) + fmesa->debugFallbacks = GL_TRUE; + + /* Initialize the software rasterizer and helper modules. */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); - if (glCtx->NrPipelineStages) - glCtx->NrPipelineStages = - ffbDDRegisterPipelineStages(glCtx->PipelineStage, - glCtx->PipelineStage, - glCtx->NrPipelineStages); + /* All of this need only be done once for a new context. */ + ffbDDExtensionsInit(ctx); + ffbDDInitDriverFuncs(ctx); + ffbDDInitStateFuncs(ctx); + ffbDDInitSpanFuncs(ctx); + ffbDDInitDepthFuncs(ctx); + ffbDDInitStencilFuncs(ctx); + ffbDDInitRenderFuncs(ctx); + ffbDDInitTexFuncs(ctx); + ffbDDInitBitmapFuncs(ctx); + ffbInitVB(ctx); + + ffbInitTnlModule(ctx); - driContextPriv->driverPrivate = (void *) fmesa; + _tnl_destroy_pipeline(ctx); + _tnl_install_pipeline(ctx, ffb_pipeline); return GL_TRUE; } -void XMesaDestroyContext(__DRIcontextPrivate *driContextPriv) +static void +ffbDestroyContext(__DRIcontextPrivate *driContextPriv) { ffbContextPtr fmesa = (ffbContextPtr) driContextPriv->driverPrivate; + + if (fmesa) { + ffbFreeVB(fmesa->glCtx); - if (fmesa == ffbCtx) - ffbCtx = NULL; + _swsetup_DestroyContext( fmesa->glCtx ); + _tnl_DestroyContext( fmesa->glCtx ); + _ac_DestroyContext( fmesa->glCtx ); + _swrast_DestroyContext( fmesa->glCtx ); + + /* free the Mesa context */ + fmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context(fmesa->glCtx); - if (fmesa) - Xfree(fmesa); + FREE(fmesa); + } } /* 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); +static GLboolean +ffbCreateBuffer(Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap ) +{ + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } + else { + driDrawPriv->driverPrivate = (void *) + _mesa_create_framebuffer(mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->stencilBits > 0, + mesaVis->accumRedBits > 0, + mesaVis->alphaBits > 0); + return (driDrawPriv->driverPrivate != NULL); + } } -/* Create and initialize the Mesa and driver specific pixmap buffer data */ -GLframebuffer *XMesaCreatePixmapBuffer( Display *dpy, - __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis) + +static void +ffbDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) { - return NULL; /* not implemented yet */ + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); } + #define USE_FAST_SWAP -void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) +static void +ffbSwapBuffers(Display *dpy, void *drawablePrivate) { + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + ffbContextPtr fmesa = (ffbContextPtr) dPriv->driContextPriv->driverPrivate; unsigned int fbc, wid, wid_reg_val, dac_db_bit; unsigned int shadow_dac_addr, active_dac_addr; ffb_fbcPtr ffb; ffb_dacPtr dac; - if (ffbCtx == NULL || - ffbCtx->glCtx->Visual->DBflag == 0) + if (fmesa == NULL || + fmesa->glCtx->Visual.doubleBufferMode == 0) return; - FLUSH_VB(ffbCtx->glCtx, "swap buffers"); + /* Flush pending rendering commands */ + _mesa_swapbuffers(fmesa->glCtx); - ffb = ffbCtx->regs; - dac = ffbCtx->ffbScreen->dac; + ffb = fmesa->regs; + dac = fmesa->ffbScreen->dac; - fbc = ffbCtx->fbc; - wid = ffbCtx->wid; + fbc = fmesa->fbc; + wid = fmesa->wid; /* Swap the buffer we render into and read pixels from. */ - ffbCtx->back_buffer ^= 1; + fmesa->back_buffer ^= 1; /* If we are writing into both buffers, don't mess with * the WB setting. @@ -366,16 +387,16 @@ else fbc = (fbc & ~FFB_FBC_RB_B) | FFB_FBC_RB_A; - LOCK_HARDWARE(ffbCtx); + LOCK_HARDWARE(fmesa); - if (ffbCtx->fbc != fbc) { - FFBFifo(ffbCtx, 1); - ffb->fbc = ffbCtx->fbc = fbc; - ffbCtx->ffbScreen->rp_active = 1; + if (fmesa->fbc != fbc) { + FFBFifo(fmesa, 1); + ffb->fbc = fmesa->fbc = fbc; + fmesa->ffbScreen->rp_active = 1; } /* And swap the buffer displayed in the WID. */ - if (ffbCtx->ffb_sarea->flags & FFB_DRI_PAC1) { + if (fmesa->ffb_sarea->flags & FFB_DRI_PAC1) { shadow_dac_addr = FFBDAC_PAC1_SPWLUT(wid); active_dac_addr = FFBDAC_PAC1_APWLUT(wid); dac_db_bit = FFBDAC_PAC1_WLUT_DB; @@ -385,10 +406,10 @@ dac_db_bit = FFBDAC_PAC2_WLUT_DB; } - FFBWait(ffbCtx, ffb); + FFBWait(fmesa, ffb); wid_reg_val = DACCFG_READ(dac, active_dac_addr); - if (ffbCtx->back_buffer == 0) + if (fmesa->back_buffer == 0) wid_reg_val |= dac_db_bit; else wid_reg_val &= ~dac_db_bit; @@ -412,16 +433,16 @@ } #endif - UNLOCK_HARDWARE(ffbCtx); + UNLOCK_HARDWARE(fmesa); } -static void ffb_init_wid(unsigned int wid) +static void ffb_init_wid(ffbContextPtr fmesa, unsigned int wid) { - ffb_dacPtr dac = ffbCtx->ffbScreen->dac; + ffb_dacPtr dac = fmesa->ffbScreen->dac; unsigned int wid_reg_val, dac_db_bit, active_dac_addr; unsigned int shadow_dac_addr; - if (ffbCtx->ffb_sarea->flags & FFB_DRI_PAC1) { + if (fmesa->ffb_sarea->flags & FFB_DRI_PAC1) { shadow_dac_addr = FFBDAC_PAC1_SPWLUT(wid); active_dac_addr = FFBDAC_PAC1_APWLUT(wid); dac_db_bit = FFBDAC_PAC1_WLUT_DB; @@ -456,77 +477,76 @@ /* Force the context `c' to be the current context and associate with it buffer `b' */ -GLboolean XMesaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) +static GLboolean +ffbMakeCurrent(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv) { if (driContextPriv) { ffbContextPtr fmesa = (ffbContextPtr) driContextPriv->driverPrivate; int first_time; - if (ffbCtx != NULL && - fmesa == ffbCtx && - driDrawPriv == fmesa->driDrawable) - return GL_TRUE; - - ffbCtx = fmesa; fmesa->driDrawable = driDrawPriv; - - gl_make_current2(ffbCtx->glCtx, - driDrawPriv->mesaBuffer, driReadPriv->mesaBuffer); - - if (!ffbCtx->glCtx->Viewport.Width) - gl_Viewport(ffbCtx->glCtx, - 0, 0, - driDrawPriv->w, driDrawPriv->h); + _mesa_make_current2(fmesa->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate); + + if (!fmesa->glCtx->Viewport.Width) + _mesa_set_viewport(fmesa->glCtx, + 0, 0, + driDrawPriv->w, + driDrawPriv->h); + first_time = 0; - if (ffbCtx->wid == ~0) + if (fmesa->wid == ~0) { first_time = 1; + if (getenv("LIBGL_SOFTWARE_RENDERING")) + FALLBACK( fmesa->glCtx, FFB_BADATTR_SWONLY, GL_TRUE ); + } - LOCK_HARDWARE(ffbCtx); + LOCK_HARDWARE(fmesa); if (first_time) { - ffbCtx->wid = ffbCtx->ffb_sarea->wid_table[driDrawPriv->index]; - ffbCtx->state_dirty |= FFB_STATE_WID; - ffb_init_wid(ffbCtx->wid); + fmesa->wid = fmesa->ffb_sarea->wid_table[driDrawPriv->index]; + ffb_init_wid(fmesa, fmesa->wid); } - ffbCtx->state_dirty |= FFB_STATE_ALL; - ffbCtx->state_fifo_ents = ffbCtx->state_all_fifo_ents; - ffbSyncHardware(ffbCtx); - UNLOCK_HARDWARE(ffbCtx); + fmesa->state_dirty |= FFB_STATE_ALL; + fmesa->state_fifo_ents = fmesa->state_all_fifo_ents; + ffbSyncHardware(fmesa); + UNLOCK_HARDWARE(fmesa); if (first_time) { /* Also, at the first switch to a new context, * we need to clear all the hw buffers. */ - ffbDDClear(ffbCtx->glCtx, + ffbDDClear(fmesa->glCtx, (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | DD_DEPTH_BIT | DD_STENCIL_BIT), 1, 0, 0, 0, 0); } } else { - gl_make_current(0,0); - ffbCtx = NULL; + _mesa_make_current(NULL, NULL); } return GL_TRUE; } /* Force the context `c' to be unbound from its buffer */ -GLboolean XMesaUnbindContext(__DRIcontextPrivate *driContextPriv) +static GLboolean +ffbUnbindContext(__DRIcontextPrivate *driContextPriv) { return GL_TRUE; } -GLboolean -XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) +static GLboolean +ffbOpenFullScreen(__DRIcontextPrivate *driContextPriv) { return GL_TRUE; } -GLboolean -XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) +static GLboolean +ffbCloseFullScreen(__DRIcontextPrivate *driContextPriv) { return GL_TRUE; } @@ -537,14 +557,12 @@ __DRIscreenPrivate *sPriv = fmesa->driScreen; int stamp = dPriv->lastStamp; - XMESA_VALIDATE_DRAWABLE_INFO(fmesa->display, sPriv, dPriv); + DRI_VALIDATE_DRAWABLE_INFO(fmesa->display, sPriv, dPriv); if (dPriv->lastStamp != stamp) { GLcontext *ctx = fmesa->glCtx; - if (ctx->Scissor.Enabled) - ffbDDScissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, - ctx->Scissor.Width, ctx->Scissor.Height); + ffbCalcViewport(ctx); if (ctx->Polygon.StippleFlag) ffbXformAreaPattern(fmesa, (const GLubyte *)ctx->PolygonStipple); @@ -557,5 +575,36 @@ void __driRegisterExtensions(void) { } + + +static struct __DriverAPIRec ffbAPI = { + ffbInitDriver, + ffbDestroyScreen, + ffbCreateContext, + ffbDestroyContext, + ffbCreateBuffer, + ffbDestroyBuffer, + ffbSwapBuffers, + ffbMakeCurrent, + ffbUnbindContext, + ffbOpenFullScreen, + ffbCloseFullScreen +}; + + + +/* + * This is the bootstrap function for the driver. + * The __driCreateScreen name is the symbol that libGL.so fetches. + * Return: pointer to a __DRIscreenPrivate. + */ +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) +{ + __DRIscreenPrivate *psp; + psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &ffbAPI); + return (void *) psp; +} + #endif /* GLX_DIRECT_RENDERING */ Index: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.h diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.h:1.1 xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.h:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.h:1.1 Tue Jun 20 01:08:40 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.h Fri Feb 22 16:32:59 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.h,v 1.1 2000/06/20 05:08:40 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.h,v 1.2 2002/02/22 21:32:59 dawes Exp $ */ #ifndef _FFB_XMESA_H_ #define _FFB_XMESA_H_ @@ -6,9 +6,8 @@ #ifdef GLX_DIRECT_RENDERING #include -#include "dri_mesaint.h" -#include "dri_mesa.h" -#include "types.h" +#include "dri_util.h" +#include "mtypes.h" #include "ffb_drishare.h" #include "ffb_regs.h" #include "ffb_dac.h" Index: xc/lib/GL/mesa/src/drv/gamma/Imakefile diff -u xc/lib/GL/mesa/src/drv/gamma/Imakefile:1.23 xc/lib/GL/mesa/src/drv/gamma/Imakefile:1.27 --- xc/lib/GL/mesa/src/drv/gamma/Imakefile:1.23 Thu May 10 12:56:11 2001 +++ xc/lib/GL/mesa/src/drv/gamma/Imakefile Mon Nov 25 09:04:50 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.23 2001/05/10 16:56:11 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile,v 1.27 2002/11/25 14:04:50 eich Exp $ #include @@ -18,16 +18,25 @@ #include "../common/Imakefile.inc" #include "Imakefile.inc" +#include "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" #include "../../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #include "../../X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../../SPARC/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 + DRIOBJS = $(GLXLIBSRC)/dri/dri_util.o DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ @@ -43,10 +52,10 @@ #endif SRCS = $(GAMMASRCS) - OBJS = $(LOWOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ - $(MESA_ASM_OBJS) $(GAMMAOBJS) $(HIOBJS) + OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(COMMONOBJS) $(GAMMAOBJS) $(HIOBJS) -REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) #include Index: xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc diff -u xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc:1.2 xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc:1.3 --- xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc:1.2 Wed May 2 11:06:03 2001 +++ xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc Fri Feb 22 16:33:00 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/gamma/Imakefile.inc,v 1.3 2002/02/22 21:33:00 dawes Exp $ #ifndef MesaDrvSrcDir #define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv @@ -16,58 +16,99 @@ #endif #if BuildXF86DRI - DRI_DEFINES = GlxDefines - DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ - -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ - -I$(GLXLIBSRC)/mesa/dri \ + DRI_DEFINES = GlxDefines -DX_BYTE_ORDER=ByteOrder + DRI_INCLUDES = -I$(GLXLIBSRC)/dri \ + -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) \ + -I$(INCLUDESRC)/GL \ -I$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ -I$(XF86DRIVERSRC)/glint \ - -I$(XF86OSSRC) + -I$(XF86COMSRC) \ + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/include #endif -MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/gamma +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESADRVSRCDIR)/common \ + -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 \ + GAMMASRCS = $(MESADRVGAMMABUILDDIR)gamma_context.c \ + $(MESADRVGAMMABUILDDIR)gamma_dd.c \ $(MESADRVGAMMABUILDDIR)gamma_inithw.c \ - $(MESADRVGAMMABUILDDIR)gamma_texture.c \ - $(MESADRVGAMMABUILDDIR)gamma_dlist.c + $(MESADRVGAMMABUILDDIR)gamma_lock.c \ + $(MESADRVGAMMABUILDDIR)gamma_render.c \ + $(MESADRVGAMMABUILDDIR)gamma_screen.c \ + $(MESADRVGAMMABUILDDIR)gamma_span.c \ + $(MESADRVGAMMABUILDDIR)gamma_state.c \ + $(MESADRVGAMMABUILDDIR)gamma_tex.c \ + $(MESADRVGAMMABUILDDIR)gamma_texmem.c \ + $(MESADRVGAMMABUILDDIR)gamma_texstate.c \ + $(MESADRVGAMMABUILDDIR)gamma_tris.c \ + $(MESADRVGAMMABUILDDIR)gamma_vb.c \ + $(MESADRVGAMMABUILDDIR)gamma_xmesa.c - GAMMAOBJS = $(MESADRVGAMMABUILDDIR)gamma_gl.o \ - $(MESADRVGAMMABUILDDIR)gamma_xmesa.o \ - $(MESADRVGAMMABUILDDIR)gamma_init.o \ - $(MESADRVGAMMABUILDDIR)gamma_matrix.o \ + GAMMAOBJS = $(MESADRVGAMMABUILDDIR)gamma_context.o \ + $(MESADRVGAMMABUILDDIR)gamma_dd.o \ $(MESADRVGAMMABUILDDIR)gamma_inithw.o \ - $(MESADRVGAMMABUILDDIR)gamma_texture.o \ - $(MESADRVGAMMABUILDDIR)gamma_dlist.o + $(MESADRVGAMMABUILDDIR)gamma_lock.o \ + $(MESADRVGAMMABUILDDIR)gamma_render.o \ + $(MESADRVGAMMABUILDDIR)gamma_screen.o \ + $(MESADRVGAMMABUILDDIR)gamma_span.o \ + $(MESADRVGAMMABUILDDIR)gamma_state.o \ + $(MESADRVGAMMABUILDDIR)gamma_tex.o \ + $(MESADRVGAMMABUILDDIR)gamma_texmem.o \ + $(MESADRVGAMMABUILDDIR)gamma_texstate.o \ + $(MESADRVGAMMABUILDDIR)gamma_tris.o \ + $(MESADRVGAMMABUILDDIR)gamma_vb.o \ + $(MESADRVGAMMABUILDDIR)gamma_xmesa.o - GAMMAUOBJS = $(MESADRVGAMMABUILDDIR)unshared/gamma_gl.o \ - $(MESADRVGAMMABUILDDIR)unshared/gamma_xmesa.o \ - $(MESADRVGAMMABUILDDIR)unshared/gamma_init.o \ - $(MESADRVGAMMABUILDDIR)unshared/gamma_matrix.o \ + GAMMAUOBJS = $(MESADRVGAMMABUILDDIR)unshared/gamma_context.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_dd.o \ $(MESADRVGAMMABUILDDIR)unshared/gamma_inithw.o \ - $(MESADRVGAMMABUILDDIR)unshared/gamma_texture.o \ - $(MESADRVGAMMABUILDDIR)unshared/gamma_dlist.o + $(MESADRVGAMMABUILDDIR)unshared/gamma_lock.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_render.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_screen.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_span.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_state.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_tex.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_texmem.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_texstate.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_tris.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_vb.o \ + $(MESADRVGAMMABUILDDIR)unshared/gamma_xmesa.o - GAMMADOBJS = $(MESADRVGAMMABUILDDIR)debugger/gamma_gl.o \ - $(MESADRVGAMMABUILDDIR)debugger/gamma_xmesa.o \ - $(MESADRVGAMMABUILDDIR)debugger/gamma_init.o \ - $(MESADRVGAMMABUILDDIR)debugger/gamma_matrix.o \ + GAMMADOBJS = $(MESADRVGAMMABUILDDIR)debugger/gamma_context.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_dd.o \ $(MESADRVGAMMABUILDDIR)debugger/gamma_inithw.o \ - $(MESADRVGAMMABUILDDIR)debugger/gamma_texture.o \ - $(MESADRVGAMMABUILDDIR)debugger/gamma_dlist.o + $(MESADRVGAMMABUILDDIR)debugger/gamma_lock.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_render.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_screen.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_span.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_state.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_tex.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_texmem.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_texstate.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_tris.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_vb.o \ + $(MESADRVGAMMABUILDDIR)debugger/gamma_xmesa.o - GAMMAPOBJS = $(MESADRVGAMMABUILDDIR)profiled/gamma_gl.o \ - $(MESADRVGAMMABUILDDIR)profiled/gamma_xmesa.o \ - $(MESADRVGAMMABUILDDIR)profiled/gamma_init.o \ - $(MESADRVGAMMABUILDDIR)profiled/gamma_matrix.o \ + GAMMAPOBJS = $(MESADRVGAMMABUILDDIR)profiled/gamma_context.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_dd.o \ $(MESADRVGAMMABUILDDIR)profiled/gamma_inithw.o \ - $(MESADRVGAMMABUILDDIR)profiled/gamma_texture.o \ - $(MESADRVGAMMABUILDDIR)profiled/gamma_dlist.o + $(MESADRVGAMMABUILDDIR)profiled/gamma_lock.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_render.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_screen.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_span.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_state.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_tex.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_texmem.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_texstate.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_tris.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_vb.o \ + $(MESADRVGAMMABUILDDIR)profiled/gamma_xmesa.o #ifdef NeedToLinkMesaSrc LinkSourceFile(gamma_gl.c, $(MESADRVSRCDIR)/gamma) Index: xc/lib/GL/mesa/src/drv/gamma/gamma_client.h diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_client.h:1.2 xc/lib/GL/mesa/src/drv/gamma/gamma_client.h:1.3 --- xc/lib/GL/mesa/src/drv/gamma/gamma_client.h:1.2 Tue Feb 22 23:46:41 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_client.h Fri Feb 22 16:33:00 2002 @@ -31,13 +31,13 @@ * 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/gamma/gamma_client.h,v 1.2 2000/02/23 04:46:41 martin Exp $ + * $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_client.h,v 1.3 2002/02/22 21:33:00 dawes Exp $ * */ #define AreaStippleEnable 0x00001 #define LineStippleEnable 0x00002 -#define ResetLineStipple 0x00004 +#define GResetLineStipple 0x00004 #define FastFillEnable 0x00008 #define PrimitiveLine 0x00000 #define PrimitiveTrapezoid 0x00040 Index: xc/lib/GL/mesa/src/drv/gamma/gamma_context.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_context.c:1.2 --- /dev/null Thu Feb 27 12:26:21 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_context.c Wed Oct 30 07:51:28 2002 @@ -0,0 +1,212 @@ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * + * 3DLabs Gamma driver. + * + */ +#include "gamma_context.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "array_cache/acache.h" + +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" + +#include "context.h" +#include "simple_list.h" +#include "mem.h" +#include "matrix.h" +#include "extensions.h" +#if defined(USE_X86_ASM) +#include "X86/common_x86_asm.h" +#endif +#include "simple_list.h" +#include "mem.h" +#include "mm.h" + + +#include "gamma_vb.h" +#include "gamma_tris.h" + +extern const struct gl_pipeline_stage _gamma_render_stage; + +static const struct gl_pipeline_stage *gamma_pipeline[] = { + &_tnl_vertex_transform_stage, + &_tnl_normal_transform_stage, + &_tnl_lighting_stage, + &_tnl_fog_coordinate_stage, + &_tnl_texgen_stage, + &_tnl_texture_transform_stage, + /* REMOVE: point attenuation stage */ +#if 1 + &_gamma_render_stage, /* ADD: unclipped rastersetup-to-dma */ +#endif + &_tnl_render_stage, + 0, +}; + +GLboolean gammaCreateContext( Display *dpy, const __GLcontextModes *glVisual, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate) +{ + GLcontext *ctx, *shareCtx; + __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + gammaContextPtr gmesa; + gammaScreenPtr gammascrn; + GLINTSAREADRIPtr saPriv=(GLINTSAREADRIPtr)(((char*)sPriv->pSAREA)+ + sizeof(XF86DRISAREARec)); + + gmesa = (gammaContextPtr) CALLOC( sizeof(*gmesa) ); + if ( !gmesa ) return GL_FALSE; + + /* Allocate the Mesa context */ + if (sharedContextPrivate) + shareCtx = ((gammaContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + + gmesa->glCtx = _mesa_create_context(glVisual, shareCtx, gmesa, GL_TRUE); + if (!gmesa->glCtx) { + FREE(gmesa); + return GL_FALSE; + } + + gmesa->display = dpy; + + gmesa->driContext = driContextPriv; + gmesa->driScreen = sPriv; + gmesa->driDrawable = NULL; /* Set by XMesaMakeCurrent */ + + gmesa->hHWContext = driContextPriv->hHWContext; + gmesa->driHwLock = &sPriv->pSAREA->lock; + gmesa->driFd = sPriv->fd; + gmesa->sarea = saPriv; + + gammascrn = gmesa->gammaScreen = (gammaScreenPtr)(sPriv->private); + + ctx = gmesa->glCtx; + + ctx->Const.MaxTextureLevels = 13; /* 4K by 4K? Is that right? */ + ctx->Const.MaxTextureUnits = 1; /* Permedia 3 */ + + ctx->Const.MinLineWidth = 0.0; + ctx->Const.MaxLineWidth = 255.0; + + ctx->Const.MinLineWidthAA = 0.0; + ctx->Const.MaxLineWidthAA = 65536.0; + + ctx->Const.MinPointSize = 0.0; + ctx->Const.MaxPointSize = 255.0; + + ctx->Const.MinPointSizeAA = 0.5; /* 4x4 quality mode */ + ctx->Const.MaxPointSizeAA = 16.0; + ctx->Const.PointSizeGranularity = 0.25; + + gmesa->texHeap = mmInit( 0, gmesa->gammaScreen->textureSize ); + + make_empty_list(&gmesa->TexObjList); + make_empty_list(&gmesa->SwappedOut); + + gmesa->CurrentTexObj[0] = 0; + gmesa->CurrentTexObj[1] = 0; /* Permedia 3, second texture */ + + gmesa->RenderIndex = ~0; + + + /* Initialize the software rasterizer and helper modules. + */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); + + /* Install the customized pipeline: + */ + _tnl_destroy_pipeline( ctx ); + _tnl_install_pipeline( ctx, gamma_pipeline ); + + /* Configure swrast to match hardware characteristics: + */ + _swrast_allow_pixel_fog( ctx, GL_FALSE ); + _swrast_allow_vertex_fog( ctx, GL_TRUE ); + + gammaInitVB( ctx ); + gammaDDInitExtensions( ctx ); + gammaDDInitDriverFuncs( ctx ); + gammaDDInitStateFuncs( ctx ); + gammaDDInitSpanFuncs( ctx ); + gammaDDInitTextureFuncs( ctx ); + gammaDDInitTriFuncs( ctx ); + gammaDDInitState( gmesa ); + + driContextPriv->driverPrivate = (void *)gmesa; + + GET_FIRST_DMA(gmesa->driFd, gmesa->hHWContext, + 1, &gmesa->bufIndex, &gmesa->bufSize, + &gmesa->buf, &gmesa->bufCount, gammascrn); + +#ifdef DO_VALIDATE + GET_FIRST_DMA(gmesa->driFd, gmesa->hHWContext, + 1, &gmesa->WCbufIndex, &gmesa->WCbufSize, + &gmesa->WCbuf, &gmesa->WCbufCount, gammascrn); +#endif + + switch (glVisual->depthBits) { + case 16: + gmesa->DeltaMode = DM_Depth16; + gmesa->depth_scale = 1.0f / 0xffff; + break; + case 24: + gmesa->DeltaMode = DM_Depth24; + gmesa->depth_scale = 1.0f / 0xffffff; + break; + case 32: + gmesa->DeltaMode = DM_Depth32; + gmesa->depth_scale = 1.0f / 0xffffffff; + break; + default: + break; + } + + gmesa->DepthSize = glVisual->depthBits; + gmesa->Flags = GAMMA_FRONT_BUFFER; + gmesa->Flags |= (glVisual->doubleBufferMode ? GAMMA_BACK_BUFFER : 0); + gmesa->Flags |= (gmesa->DepthSize > 0 ? GAMMA_DEPTH_BUFFER : 0); + + gmesa->EnabledFlags = GAMMA_FRONT_BUFFER; + gmesa->EnabledFlags |= (glVisual->doubleBufferMode ? GAMMA_BACK_BUFFER : 0); + + + if (gmesa->Flags & GAMMA_BACK_BUFFER) { + gmesa->readOffset = gmesa->drawOffset = gmesa->driScreen->fbHeight * gmesa->driScreen->fbWidth * gmesa->gammaScreen->cpp; + } else { + gmesa->readOffset = gmesa->drawOffset = 0; + } + + gammaInitHW( gmesa ); + + driContextPriv->driverPrivate = (void *)gmesa; + + return GL_TRUE; +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_context.h diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_context.h:1.6 --- /dev/null Thu Feb 27 12:26:21 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_context.h Mon Dec 16 11:18:50 2002 @@ -0,0 +1,409 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_context.h,v 1.6 2002/12/16 16:18:50 dawes Exp $ */ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * + */ + +#ifndef _GAMMA_CONTEXT_H_ +#define _GAMMA_CONTEXT_H_ + +#include "dri_util.h" + +#include "gamma_regs.h" +#include "gamma_macros.h" +#include "gamma_screen.h" +#include "macros.h" +#include "mtypes.h" +#include "glint_dri.h" +#include "mm.h" + +typedef union { + unsigned int i; + float f; +} dmaBufRec, *dmaBuf; + +/* Flags for context */ +#define GAMMA_FRONT_BUFFER 0x00000001 +#define GAMMA_BACK_BUFFER 0x00000002 +#define GAMMA_DEPTH_BUFFER 0x00000004 +#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 + +extern void gammaDDUpdateHWState(GLcontext *ctx); +extern gammaScreenPtr gammaCreateScreen(__DRIscreenPrivate *sPriv); +extern void gammaDestroyScreen(__DRIscreenPrivate *sPriv); +extern GLboolean gammaCreateContext( Display *dpy, + const __GLcontextModes *glVisual, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate); + +#define GAMMA_UPLOAD_ALL 0xffffffff +#define GAMMA_UPLOAD_CLIPRECTS 0x00000002 +#define GAMMA_UPLOAD_ALPHA 0x00000004 +#define GAMMA_UPLOAD_BLEND 0x00000008 +#define GAMMA_UPLOAD_DEPTH 0x00000010 +#define GAMMA_UPLOAD_VIEWPORT 0x00000020 +#define GAMMA_UPLOAD_SHADE 0x00000040 +#define GAMMA_UPLOAD_CLIP 0x00000080 +#define GAMMA_UPLOAD_MASKS 0x00000100 +#define GAMMA_UPLOAD_WINDOW 0x00000200 /* defunct */ +#define GAMMA_UPLOAD_GEOMETRY 0x00000400 +#define GAMMA_UPLOAD_POLYGON 0x00000800 +#define GAMMA_UPLOAD_DITHER 0x00001000 +#define GAMMA_UPLOAD_LOGICOP 0x00002000 +#define GAMMA_UPLOAD_FOG 0x00004000 +#define GAMMA_UPLOAD_LIGHT 0x00008000 +#define GAMMA_UPLOAD_CONTEXT 0x00010000 +#define GAMMA_UPLOAD_TEX0 0x00020000 +#define GAMMA_UPLOAD_STIPPLE 0x00040000 +#define GAMMA_UPLOAD_TRANSFORM 0x00080000 +#define GAMMA_UPLOAD_LINEMODE 0x00100000 +#define GAMMA_UPLOAD_POINTMODE 0x00200000 +#define GAMMA_UPLOAD_TRIMODE 0x00400000 + +#define GAMMA_NEW_CLIP 0x00000001 +#define GAMMA_NEW_WINDOW 0x00000002 +#define GAMMA_NEW_CONTEXT 0x00000004 +#define GAMMA_NEW_TEXTURE 0x00000008 /* defunct */ +#define GAMMA_NEW_ALPHA 0x00000010 +#define GAMMA_NEW_DEPTH 0x00000020 +#define GAMMA_NEW_MASKS 0x00000040 +#define GAMMA_NEW_POLYGON 0x00000080 +#define GAMMA_NEW_CULL 0x00000100 +#define GAMMA_NEW_LOGICOP 0x00000200 +#define GAMMA_NEW_FOG 0x00000400 +#define GAMMA_NEW_LIGHT 0x00000800 +#define GAMMA_NEW_STIPPLE 0x00001000 +#define GAMMA_NEW_ALL 0xffffffff + +#define GAMMA_FALLBACK_TRI 0x00000001 +#define GAMMA_FALLBACK_TEXTURE 0x00000002 + +#define FLUSH_BATCH(gmesa) do { \ + /*FLUSH_DMA_BUFFER(gmesa);*/ \ +} while(0) + +struct gamma_context; +typedef struct gamma_context gammaContextRec; +typedef struct gamma_context *gammaContextPtr; +typedef struct gamma_texture_object_t *gammaTextureObjectPtr; + +#define VALID_GAMMA_TEXTURE_OBJECT(tobj) (tobj) + +#define GAMMA_TEX_MAXLEVELS 12 + +/* For shared texture space managment, these texture objects may also + * be used as proxies for regions of texture memory containing other + * client's textures. Such proxy textures (not to be confused with GL + * proxy textures) are subject to the same LRU aging we use for our + * own private textures, and thus we have a mechanism where we can + * fairly decide between kicking out our own textures and those of + * other clients. + * + * Non-local texture objects have a valid MemBlock to describe the + * region managed by the other client, and can be identified by + * 't->globj == 0' + */ +struct gamma_texture_object_t { + struct gamma_texture_object_t *next, *prev; + + GLuint age; + struct gl_texture_object *globj; + + int Pitch; + int Height; + int texelBytes; + int totalSize; + int bound; + + PMemBlock MemBlock; + char * BufAddr; + + GLuint min_level; + GLuint max_level; + GLuint dirty_images; + + GLint firstLevel, lastLevel; /* upload tObj->Image[first .. lastLevel] */ + + struct { + const struct gl_texture_image *image; + int offset; /* into BufAddr */ + int height; + int internalFormat; + } image[GAMMA_TEX_MAXLEVELS]; + + CARD32 TextureBaseAddr[GAMMA_TEX_MAXLEVELS]; + CARD32 TextureAddressMode; + CARD32 TextureColorMode; + CARD32 TextureFilterMode; + CARD32 TextureFormat; + CARD32 TextureReadMode; + CARD32 TextureBorderColor; +}; + +#define GAMMA_NO_PALETTE 0x0 +#define GAMMA_USE_PALETTE 0x1 +#define GAMMA_UPDATE_PALETTE 0x2 +#define GAMMA_FALLBACK_PALETTE 0x4 + +void gammaUpdateTextureState( GLcontext *ctx ); + +void gammaDestroyTexObj( gammaContextPtr gmesa, gammaTextureObjectPtr t ); +void gammaSwapOutTexObj( gammaContextPtr gmesa, gammaTextureObjectPtr t ); +void gammaUploadTexImages( gammaContextPtr gmesa, gammaTextureObjectPtr t ); + +void gammaResetGlobalLRU( gammaContextPtr gmesa ); +void gammaUpdateTexLRU( gammaContextPtr gmesa, gammaTextureObjectPtr t ); +void gammaTexturesGone( gammaContextPtr gmesa, + GLuint start, GLuint end, + GLuint in_use ); + +void gammaEmitHwState( gammaContextPtr gmesa ); +void gammaGetLock( gammaContextPtr gmesa, GLuint flags ); +void gammaDDInitExtensions( GLcontext *ctx ); +void gammaDDInitDriverFuncs( GLcontext *ctx ); +void gammaDDInitSpanFuncs( GLcontext *ctx ); +void gammaDDInitState( gammaContextPtr gmesa ); +void gammaInitHW( gammaContextPtr gmesa ); +void gammaDDInitStateFuncs( GLcontext *ctx ); +void gammaDDInitTextureFuncs( GLcontext *ctx ); +void gammaDDInitTriFuncs( GLcontext *ctx ); + +void gammaUpdateWindow( GLcontext *ctx ); +void gammaUpdateViewportOffset( GLcontext *ctx ); + +void gammaPrintLocalLRU( gammaContextPtr gmesa ); +void gammaPrintGlobalLRU( gammaContextPtr gmesa ); + +extern void gammaFallback( gammaContextPtr gmesa, GLuint bit, GLboolean mode ); +#define FALLBACK( imesa, bit, mode ) gammaFallback( imesa, bit, mode ) + +/* Use the templated vertex formats. Only one of these is used in gamma. + */ +#define TAG(x) gamma##x +#include "tnl_dd/t_dd_vertex.h" +#undef TAG + +typedef void (*gamma_quad_func)( gammaContextPtr, + const gammaVertex *, + const gammaVertex *, + const gammaVertex *, + const gammaVertex * ); +typedef void (*gamma_tri_func)( gammaContextPtr, + const gammaVertex *, + const gammaVertex *, + const gammaVertex * ); +typedef void (*gamma_line_func)( gammaContextPtr, + const gammaVertex *, + const gammaVertex * ); +typedef void (*gamma_point_func)( gammaContextPtr, + const gammaVertex * ); + + +struct gamma_context { + GLcontext *glCtx; /* Mesa context */ + + __DRIcontextPrivate *driContext; + __DRIscreenPrivate *driScreen; + __DRIdrawablePrivate *driDrawable; + + GLuint new_gl_state; + GLuint new_state; + GLuint dirty; + + GLINTSAREADRIPtr sarea; + + /* Temporaries for translating away float colors: + */ + struct gl_client_array UbyteColor; + struct gl_client_array UbyteSecondaryColor; + + /* Mirrors of some DRI state + */ + Display *display; /* X server display */ + + drmContext hHWContext; + drmLock *driHwLock; + int driFd; + + GLuint numClipRects; /* Cliprects for the draw buffer */ + XF86DRIClipRectPtr pClipRects; + + dmaBuf buf; /* DMA buffer for regular cmds */ + int bufIndex; + int bufSize; + int bufCount; + + dmaBuf WCbuf; /* DMA buffer for window changed cmds */ + int WCbufIndex; + int WCbufSize; + int WCbufCount; + + gammaScreenPtr gammaScreen; /* Screen private DRI data */ + + int drawOffset; + int readOffset; + + gamma_point_func draw_point; + gamma_line_func draw_line; + gamma_tri_func draw_tri; + gamma_quad_func draw_quad; + + GLuint Fallback; + GLuint RenderIndex; + GLuint SetupNewInputs; + GLuint SetupIndex; + + GLuint vertex_format; + GLuint vertex_size; + GLuint vertex_stride_shift; + char *verts; + + GLfloat hw_viewport[16]; + GLuint hw_primitive; + GLenum render_primitive; + + GLfloat depth_scale; + + gammaTextureObjectPtr CurrentTexObj[2]; + struct gamma_texture_object_t TexObjList; + struct gamma_texture_object_t SwappedOut; + GLenum TexEnvImageFmt[2]; + + memHeap_t *texHeap; + + unsigned int lastSwap; + int texAge; + int ctxAge; + int dirtyAge; + unsigned int lastStamp; + + + CARD32 ClearColor; + CARD32 Color; + CARD32 DitherMode; + CARD32 ClearDepth; + CARD32 FogMode; + CARD32 AreaStippleMode; + CARD32 LBReadFormat; + CARD32 LBWriteFormat; + CARD32 LineMode; + CARD32 PointMode; + CARD32 TriangleMode; + CARD32 AntialiasMode; + GLfloat ViewportScaleX; + GLfloat ViewportScaleY; + GLfloat ViewportScaleZ; + GLfloat ViewportOffsetX; + GLfloat ViewportOffsetY; + GLfloat ViewportOffsetZ; + int MatrixMode; + int DepthMode; + int TransformMode; + int LBReadMode; + int FBReadMode; + int FBWindowBase; + int LBWindowBase; + int ColorDDAMode; + int GeometryMode; + int AlphaTestMode; + int AlphaBlendMode; + int AB_FBReadMode; + int AB_FBReadMode_Save; + int DeltaMode; + int ColorMaterialMode; + int FBHardwareWriteMask; + 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 ScissorMaxXY; + int ScissorMinXY; + int Window; /* GID part probably should be in draw priv */ + int WindowOrigin; + int x, y, w, h; /* Probably should be in drawable priv */ + int FrameCount; /* Probably should be in drawable priv */ + int NotClipped; /* Probably should be in drawable priv */ + int WindowChanged; /* Probably should be in drawabl... */ + int Flags; + int EnabledFlags; + int DepthSize; + int Begin; + GLenum ErrorValue; + int Texture1DEnabled; + int Texture2DEnabled; + + float ModelView[16]; + float Proj[16]; + float ModelViewProj[16]; + float Texture[16]; + + float ModelViewStack[(MAX_MODELVIEW_STACK-1)*16]; + int ModelViewCount; + float ProjStack[(MAX_PROJECTION_STACK-1)*16]; + int ProjCount; + float TextureStack[(MAX_TEXTURE_STACK-1)*16]; + int TextureCount; +}; + +static __inline GLuint gammaPackColor( GLuint cpp, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) +{ + switch ( cpp ) { + case 2: + return PACK_COLOR_565( r, g, b ); + case 4: + return PACK_COLOR_8888( a, r, g, b ); + default: + return 0; + } +} + +#define GAMMA_CONTEXT(ctx) ((gammaContextPtr)(ctx->DriverCtx)) + +#endif /* _GAMMA_CONTEXT_H_ */ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_dd.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_dd.c:1.3 --- /dev/null Thu Feb 27 12:26:21 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_dd.c Wed Oct 30 07:51:29 2002 @@ -0,0 +1,128 @@ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * + */ + +#include "gamma_context.h" +#include "gamma_vb.h" +#include "gamma_lock.h" +#if defined(USE_X86_ASM) +#include "X86/common_x86_asm.h" +#endif + +#include "context.h" +#include "swrast/swrast.h" + +#define GAMMA_DATE "20010624" + + +/* Return the width and height of the current color buffer. + */ +static void gammaDDGetBufferSize( GLframebuffer *buffer, + GLuint *width, GLuint *height ) +{ + GET_CURRENT_CONTEXT(ctx); + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + GAMMAHW_LOCK( gmesa ); + *width = gmesa->driDrawable->w; + *height = gmesa->driDrawable->h; + GAMMAHW_UNLOCK( gmesa ); +} + + +/* Return various strings for glGetString(). + */ +static const GLubyte *gammaDDGetString( GLcontext *ctx, GLenum name ) +{ + static char buffer[128]; + + switch ( name ) { + case GL_VENDOR: + return (GLubyte *)"VA Linux Systems, Inc."; + + case GL_RENDERER: + sprintf( buffer, "Mesa DRI Gamma " GAMMA_DATE ); + + /* Append any CPU-specific information. + */ +#ifdef USE_X86_ASM + if ( _mesa_x86_cpu_features ) { + strncat( buffer, " x86", 4 ); + } +#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_SSE_ASM + if ( cpu_has_xmm ) { + strncat( buffer, "/SSE", 4 ); + } +#endif +#endif + return (GLubyte *)buffer; + + default: + return NULL; + } +} + +/* Enable the extensions supported by this driver. + */ +void gammaDDInitExtensions( GLcontext *ctx ) +{ + /* None... */ +} + +/* Initialize the driver's misc functions. + */ +void gammaDDInitDriverFuncs( GLcontext *ctx ) +{ + ctx->Driver.GetBufferSize = gammaDDGetBufferSize; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; + ctx->Driver.GetString = gammaDDGetString; + + ctx->Driver.Error = NULL; + + /* Pixel path fallbacks + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.Bitmap = _swrast_Bitmap; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; + + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.c:1.3 xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.c:removed --- xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.c:1.3 Sun Feb 11 20:11:24 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.c Thu Feb 27 12:26:21 2003 @@ -1,3314 +0,0 @@ -/* - * 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 xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.h:1.3 xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.h:removed --- xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.h:1.3 Sun Feb 11 20:11:25 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_dlist.h Thu Feb 27 12:26:21 2003 @@ -1,381 +0,0 @@ -/* - * 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.10 xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c:removed --- xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c:1.10 Fri Aug 17 22:51:04 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c Thu Feb 27 12:26:21 2003 @@ -1,5312 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c,v 1.10 2001/08/18 02:51:04 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. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Brian Paul - * Alan Hourihane - */ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include -#include "gamma_gl.h" -#include "gamma_init.h" -#include "gamma_dlist.h" -#include "glint_dri.h" - -/* 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) { - const char *errstr; - - switch (error) { - case GL_NO_ERROR: - errstr = "GL_NO_ERROR"; - break; - case GL_INVALID_VALUE: - errstr = "GL_INVALID_VALUE"; - break; - case GL_INVALID_ENUM: - errstr = "GL_INVALID_ENUM"; - break; - case GL_INVALID_OPERATION: - errstr = "GL_INVALID_OPERATION"; - break; - case GL_STACK_OVERFLOW: - errstr = "GL_STACK_OVERFLOW"; - break; - case GL_STACK_UNDERFLOW: - errstr = "GL_STACK_UNDERFLOW"; - break; - case GL_OUT_OF_MEMORY: - errstr = "GL_OUT_OF_MEMORY"; - break; - default: - 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) -{ - unsigned char r = ref * 255.0; - - DEBUG_GLCMDS(("AlphaFunc: %d %f\n", (int)func, (float)ref)); - - gCCPriv->AlphaTestMode &= ~(AT_CompareMask | AT_RefValueMask); - - switch (func) { - case GL_NEVER: - gCCPriv->AlphaTestMode |= AT_Never; - break; - case GL_LESS: - gCCPriv->AlphaTestMode |= AT_Less; - break; - case GL_EQUAL: - gCCPriv->AlphaTestMode |= AT_Equal; - break; - case GL_LEQUAL: - gCCPriv->AlphaTestMode |= AT_LessEqual; - break; - case GL_GREATER: - gCCPriv->AlphaTestMode |= AT_Greater; - break; - case GL_NOTEQUAL: - gCCPriv->AlphaTestMode |= AT_NotEqual; - break; - case GL_GEQUAL: - gCCPriv->AlphaTestMode |= AT_GreaterEqual; - break; - case GL_ALWAYS: - gCCPriv->AlphaTestMode |= AT_Always; - break; - default: - /* ERROR!! */ - break; - } - - gCCPriv->AlphaTestMode |= r << 4; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, AlphaTestMode, gCCPriv->AlphaTestMode); -} - -GLboolean _gamma_AreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences) -{ - DEBUG_GLCMDS(("AreTexturesResident: %d\n", (int)n)); -#ifdef DEBUG_VERBOSE_EXTRA - { - int t; - for (t = 0; t < n; t++) - printf("\t%d\n", (int)textures[t]); - } -#endif - - return GL_TRUE; -} - -void _gamma_ArrayElement(GLint i) -{ - DEBUG_GLCMDS(("ArrayElement: %d\n", (int)i)); -} - -void _gamma_Begin(GLenum mode) -{ - DEBUG_GLCMDS(("Begin: %04x\n", (int)mode)); - - if ((gCCPriv->Begin & B_PrimType_Mask) != B_PrimType_Null) { - DEBUG_ERROR(("Begin: Error\n")); - return; - } - - gCCPriv->Begin &= ~B_PrimType_Mask; - switch (mode) { - case GL_POINTS: - gCCPriv->Begin |= B_PrimType_Points; - break; - case GL_LINES: - gCCPriv->Begin |= B_PrimType_Lines; - break; - case GL_LINE_LOOP: - gCCPriv->Begin |= B_PrimType_LineLoop; - break; - case GL_LINE_STRIP: - gCCPriv->Begin |= B_PrimType_LineStrip; - break; - case GL_TRIANGLES: - gCCPriv->Begin |= B_PrimType_Triangles; - break; - case GL_TRIANGLE_STRIP: - gCCPriv->Begin |= B_PrimType_TriangleStrip; - break; - case GL_TRIANGLE_FAN: - gCCPriv->Begin |= B_PrimType_TriangleFan; - break; - case GL_QUADS: - gCCPriv->Begin |= B_PrimType_Quads; - break; - case GL_QUAD_STRIP: - gCCPriv->Begin |= B_PrimType_QuadStrip; - break; - case GL_POLYGON: - gCCPriv->Begin |= B_PrimType_Polygon; - break; - default: - /* ERROR!! */ - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, Begin, gCCPriv->Begin); -} - -void _gamma_BindTexture(GLenum target, GLuint texture) -{ - unsigned long addrs[MIPMAP_LEVELS]; - int i; - - DEBUG_GLCMDS(("BindTexture: %04x %d\n", - (int)target, (unsigned int)texture)); - - /* Disable all of the units in the previous bind */ - gCCPriv->curTexObj->TextureAddressMode &= ~TextureAddressModeEnable; - gCCPriv->curTexObj->TextureReadMode &= ~TextureReadModeEnable; - gCCPriv->curTexObj->TextureColorMode &= ~TextureColorModeEnable; - gCCPriv->curTexObj->TextureFilterMode &= ~TextureFilterModeEnable; - - /* Find the texture (create it, if necessary) */ - gCCPriv->curTexObj = gammaTOFind(texture); - - /* Make the new texture images resident */ - if (driTMMMakeImagesResident(gCCPriv->tmm, MIPMAP_LEVELS, - gCCPriv->curTexObj->image, addrs) < 0) { - DEBUG_ERROR(("BindTexture: unable\n")); - /* NOT_DONE: Handle error */ - } - - for (i = 0; i < MIPMAP_LEVELS; i++) - gCCPriv->curTexObj->TextureBaseAddr[i] = addrs[i] << 5; - - /* Set the target */ - gCCPriv->curTexObj->TextureAddressMode &= ~TAM_TexMapType_Mask; - gCCPriv->curTexObj->TextureReadMode &= ~TRM_TexMapType_Mask; - switch (target) { - case GL_TEXTURE_1D: - gCCPriv->curTexObj1D = gCCPriv->curTexObj; - gCCPriv->curTexObj->TextureAddressMode |= TAM_TexMapType_1D; - gCCPriv->curTexObj->TextureReadMode |= TRM_TexMapType_1D; - break; - case GL_TEXTURE_2D: - gCCPriv->curTexObj2D = gCCPriv->curTexObj; - gCCPriv->curTexObj->TextureAddressMode |= TAM_TexMapType_2D; - gCCPriv->curTexObj->TextureReadMode |= TRM_TexMapType_2D; - break; - default: - break; - } - - /* Enable the units if texturing is enabled */ - if (target == GL_TEXTURE_1D && gCCPriv->Texture1DEnabled) { - gCCPriv->curTexObj->TextureAddressMode |= TextureAddressModeEnable; - gCCPriv->curTexObj->TextureReadMode |= TextureReadModeEnable; - gCCPriv->curTexObj->TextureColorMode |= TextureColorModeEnable; - gCCPriv->curTexObj->TextureFilterMode |= TextureFilterModeEnable; - } else if (target == GL_TEXTURE_2D && gCCPriv->Texture2DEnabled) { - gCCPriv->curTexObj->TextureAddressMode |= TextureAddressModeEnable; - gCCPriv->curTexObj->TextureReadMode |= TextureReadModeEnable; - gCCPriv->curTexObj->TextureColorMode |= TextureColorModeEnable; - gCCPriv->curTexObj->TextureFilterMode |= TextureFilterModeEnable; - } - - /* Restore the units */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 18); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj->TextureAddressMode); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj->TextureReadMode); - WRITE(gCCPriv->buf, TextureColorMode, - gCCPriv->curTexObj->TextureColorMode); - WRITE(gCCPriv->buf, TextureFilterMode, - gCCPriv->curTexObj->TextureFilterMode); - WRITE(gCCPriv->buf, TextureFormat, - gCCPriv->curTexObj->TextureFormat); - WRITE(gCCPriv->buf, TxBaseAddr0, gCCPriv->curTexObj->TextureBaseAddr[ 0]); - WRITE(gCCPriv->buf, TxBaseAddr1, gCCPriv->curTexObj->TextureBaseAddr[ 1]); - WRITE(gCCPriv->buf, TxBaseAddr2, gCCPriv->curTexObj->TextureBaseAddr[ 2]); - WRITE(gCCPriv->buf, TxBaseAddr3, gCCPriv->curTexObj->TextureBaseAddr[ 3]); - WRITE(gCCPriv->buf, TxBaseAddr4, gCCPriv->curTexObj->TextureBaseAddr[ 4]); - WRITE(gCCPriv->buf, TxBaseAddr5, gCCPriv->curTexObj->TextureBaseAddr[ 5]); - WRITE(gCCPriv->buf, TxBaseAddr6, gCCPriv->curTexObj->TextureBaseAddr[ 6]); - WRITE(gCCPriv->buf, TxBaseAddr7, gCCPriv->curTexObj->TextureBaseAddr[ 7]); - WRITE(gCCPriv->buf, TxBaseAddr8, gCCPriv->curTexObj->TextureBaseAddr[ 8]); - WRITE(gCCPriv->buf, TxBaseAddr9, gCCPriv->curTexObj->TextureBaseAddr[ 9]); - WRITE(gCCPriv->buf, TxBaseAddr10, gCCPriv->curTexObj->TextureBaseAddr[10]); - WRITE(gCCPriv->buf, TxBaseAddr11, gCCPriv->curTexObj->TextureBaseAddr[11]); - WRITE(gCCPriv->buf, TextureCacheControl, (TCC_Enable | TCC_Invalidate)); -} - -void _gamma_Bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) -{ - DEBUG_GLCMDS(("Bitmap: \n")); -} - -void _gamma_BlendFunc(GLenum sfactor, GLenum dfactor) -{ - DEBUG_GLCMDS(("BlendFunc: %04x %04x\n", (int)sfactor, (int)dfactor)); - - gCCPriv->AB_FBReadMode_Save = 0; - gCCPriv->AlphaBlendMode &= ~(AB_SrcBlendMask | AB_DstBlendMask); - - switch (sfactor) { - case GL_ZERO: - gCCPriv->AlphaBlendMode |= AB_Src_Zero; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_ONE: - gCCPriv->AlphaBlendMode |= AB_Src_One; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_DST_COLOR: - gCCPriv->AlphaBlendMode |= AB_Src_DstColor; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_ONE_MINUS_DST_COLOR: - gCCPriv->AlphaBlendMode |= AB_Src_OneMinusDstColor; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_SRC_ALPHA: - gCCPriv->AlphaBlendMode |= AB_Src_SrcAlpha; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_ONE_MINUS_SRC_ALPHA: - gCCPriv->AlphaBlendMode |= AB_Src_OneMinusSrcAlpha; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_DST_ALPHA: - gCCPriv->AlphaBlendMode |= AB_Src_DstAlpha; - gCCPriv->AB_FBReadMode_Save |= (FBReadSrcEnable | FBReadDstEnable); - break; - case GL_ONE_MINUS_DST_ALPHA: - gCCPriv->AlphaBlendMode |= AB_Src_OneMinusDstAlpha; - gCCPriv->AB_FBReadMode_Save |= (FBReadSrcEnable | FBReadDstEnable); - break; - case GL_SRC_ALPHA_SATURATE: - gCCPriv->AlphaBlendMode |= AB_Src_SrcAlphaSaturate; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - default: - /* ERROR!! */ - break; - } - - switch (dfactor) { - case GL_ZERO: - gCCPriv->AlphaBlendMode |= AB_Dst_Zero; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_ONE: - gCCPriv->AlphaBlendMode |= AB_Dst_One; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_SRC_COLOR: - gCCPriv->AlphaBlendMode |= AB_Dst_SrcColor; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_ONE_MINUS_SRC_COLOR: - gCCPriv->AlphaBlendMode |= AB_Dst_OneMinusSrcColor; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_SRC_ALPHA: - gCCPriv->AlphaBlendMode |= AB_Dst_SrcAlpha; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_ONE_MINUS_SRC_ALPHA: - gCCPriv->AlphaBlendMode |= AB_Dst_OneMinusSrcAlpha; - gCCPriv->AB_FBReadMode_Save |= (FBReadDstEnable); - break; - case GL_DST_ALPHA: - gCCPriv->AlphaBlendMode |= AB_Dst_DstAlpha; - gCCPriv->AB_FBReadMode_Save |= (FBReadSrcEnable | FBReadDstEnable); - break; - case GL_ONE_MINUS_DST_ALPHA: - gCCPriv->AlphaBlendMode |= AB_Dst_OneMinusDstAlpha; - gCCPriv->AB_FBReadMode_Save |= (FBReadSrcEnable | FBReadDstEnable); - break; - default: - /* ERROR!! */ - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, AlphaBlendMode, gCCPriv->AlphaBlendMode); - - if (gCCPriv->AlphaBlendMode & AlphaBlendModeEnable) { - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - gCCPriv->AB_FBReadMode = gCCPriv->AB_FBReadMode_Save; - WRITE(gCCPriv->buf, FBReadMode, (gCCPriv->FBReadMode | - gCCPriv->AB_FBReadMode)); - } -} - -#if 0 /* Now in dlist.c */ -void _gamma_CallList(GLuint list) -{ - DEBUG_GLCMDS(("CallList: %d\n", (unsigned int)list)); -} - -void _gamma_CallLists(GLsizei n, GLenum type, const GLvoid *lists) -{ - DEBUG_GLCMDS(("CallLists: %d %04x\n", (int)n, (int)type)); -} -#endif - -void _gamma_Clear(GLbitfield mask) -{ - int temp; - unsigned int depth = 0; - int do_clear = 0; - GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)gCC->driScreenPriv->pDevPriv; -#ifdef DO_VALIDATE - __DRIscreenPrivate *driScrnPriv = gCC->driScreenPriv; -#endif - - DEBUG_GLCMDS(("Clear: %04x\n", (int)mask)); - -#ifdef TURN_OFF_CLEARS - { - static int done_first_clear = 0; - if (done_first_clear) - return; - done_first_clear = 1; - } -#endif - -#ifdef DO_VALIDATE - /* Flush any partially filled buffers */ - FLUSH_DMA_BUFFER(gCC,gCCPriv); - - DRM_SPINLOCK(&driScrnPriv->pSAREA->drawable_lock, - driScrnPriv->drawLockID); - VALIDATE_DRAWABLE_INFO_NO_LOCK(gCC,gCCPriv); -#endif - - if ((mask & GL_DEPTH_BUFFER_BIT) && - (gCCPriv->Flags & GAMMA_DEPTH_BUFFER)) { - double d = (((double)gCCPriv->ClearDepth-gCCPriv->zNear)/ - (gCCPriv->zFar-gCCPriv->zNear)); - - if (d > 1.0) d = 1.0; - else if (d < 0.0) d = 0.0; - - switch (gCCPriv->DepthSize) { - case 16: - depth = d * 65535.0; /* 2^16-1 */ - break; - case 24: - depth = d * 16777215.0; /* 2^24-1 */ - break; - case 32: - depth = d * 4294967295.0; /* 2^32-1 */ - break; - } - -#ifdef TURN_OFF_CLEARS - depth = 0; -#endif - - /* Turn off writes the FB */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, FBWriteMode, FBWriteModeDisable); - - /* - * Turn Rectangle2DControl off when the window is not clipped - * (i.e., the GID tests are not necessary). This dramatically - * increases the performance of the depth clears. - */ - if (!gCCPriv->NotClipped) { - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, Rectangle2DControl, 1); - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, DepthMode, (DepthModeEnable | - DM_Always | - DM_SourceDepthRegister | - DM_WriteMask)); - WRITE(gCCPriv->buf, GLINTDepth, depth); - - /* Increment the frame count */ - gCCPriv->FrameCount++; -#ifdef FAST_CLEAR_4 - gCCPriv->FrameCount &= 0x0f; -#else - gCCPriv->FrameCount &= 0xff; -#endif - - temp = (gCCPriv->LBReadMode & LBPartialProdMask) | LBWindowOriginBot; - /* UGH - move this later ! */ - if (gDRIPriv->numMultiDevices == 2) temp |= LBScanLineInt2; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, LBReadMode, temp); - - /* Force FCP to be written */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, GLINTWindow, (WindowEnable | - W_PassIfEqual | - (gCCPriv->Window & W_GIDMask) | - W_DepthFCP | - W_LBUpdateFromRegisters | - W_OverrideWriteFiltering | - (gCCPriv->FrameCount << 9))); - - /* Clear part of the depth and FCP buffers */ - { - int y = gCCPriv->y; - int h = gCCPriv->h; -#ifndef TURN_OFF_FCP - float hsub = h; - - if (gCCPriv->WindowChanged) { - gCCPriv->WindowChanged = GL_FALSE; - } else { -#ifdef FAST_CLEAR_4 - hsub /= 16; -#else - hsub /= 256; -#endif - - /* Handle the case where the height < # of FCPs */ - if (hsub < 1.0) { - if (gCCPriv->FrameCount > h) - gCCPriv->FrameCount = 0; - h = 1; - y += gCCPriv->FrameCount; - } else { - h = (gCCPriv->FrameCount+1)*hsub; - h -= (int)(gCCPriv->FrameCount*hsub); - y += gCCPriv->FrameCount*hsub; - } - } -#endif - - if (h) { - CHECK_DMA_BUFFER(gCC, gCCPriv, 8); - WRITE(gCCPriv->buf, StartXDom, gCCPriv->x<<16); - WRITE(gCCPriv->buf, StartY, y<<16); - WRITE(gCCPriv->buf, StartXSub, (gCCPriv->x+gCCPriv->w)<<16); - WRITE(gCCPriv->buf, GLINTCount, h); - WRITE(gCCPriv->buf, dY, 1<<16); - WRITE(gCCPriv->buf, dXDom, 0<<16); - WRITE(gCCPriv->buf, dXSub, 0<<16); - WRITE(gCCPriv->buf, Render, 0x00000040); /* NOT_DONE */ - } - } - - /* Restore modes */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 5); - WRITE(gCCPriv->buf, FBWriteMode, FBWriteModeEnable); - WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); - WRITE(gCCPriv->buf, LBReadMode, gCCPriv->LBReadMode); - WRITE(gCCPriv->buf, GLINTWindow, gCCPriv->Window); - WRITE(gCCPriv->buf, FastClearDepth, depth); - - /* Turn on Depth FCP */ - if (gCCPriv->Window & W_DepthFCP) { - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, WindowOr, (gCCPriv->FrameCount << 9)); - } - - /* Turn off GID clipping if window is not clipped */ - if (gCCPriv->NotClipped) { - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, Rectangle2DControl, 0); - } - } - - if (mask & GL_COLOR_BUFFER_BIT) { - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITE(gCCPriv->buf, ConstantColor, - (((GLuint)(gCCPriv->ClearColor[3]*255.0) << 24) | - ((GLuint)(gCCPriv->ClearColor[2]*255.0) << 16) | - ((GLuint)(gCCPriv->ClearColor[1]*255.0) << 8) | - ((GLuint)(gCCPriv->ClearColor[0]*255.0)))); - WRITE(gCCPriv->buf, FBBlockColor, - (((GLuint)(gCCPriv->ClearColor[3]*255.0) << 24) | - ((GLuint)(gCCPriv->ClearColor[0]*255.0) << 16) | - ((GLuint)(gCCPriv->ClearColor[1]*255.0) << 8) | - ((GLuint)(gCCPriv->ClearColor[2]*255.0)))); - WRITE(gCCPriv->buf, ColorDDAMode, (ColorDDAEnable | - ColorDDAFlat)); - do_clear = 1; - } else { - /* Turn off writes the FB */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, FBWriteMode, FBWriteModeDisable); - } - - if (do_clear) { - /* Turn on GID clipping if window is not clipped */ - if (!gCCPriv->NotClipped) { - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, Rectangle2DControl, 1); - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 6); - WRITE(gCCPriv->buf, DepthMode, 0); - WRITE(gCCPriv->buf, AlphaBlendMode, 0); - WRITE(gCCPriv->buf, Rectangle2DMode, (((gCCPriv->h & 0xfff)<<12) | - (gCCPriv->w & 0xfff))); - WRITE(gCCPriv->buf, DrawRectangle2D, (((gCCPriv->y & 0xffff)<<16) | - (gCCPriv->x & 0xffff))); - WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); - WRITE(gCCPriv->buf, AlphaBlendMode, gCCPriv->AlphaBlendMode); - - /* Turn off GID clipping if window is not clipped */ - if (gCCPriv->NotClipped) { - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, Rectangle2DControl, 0); - } - } - - if (mask & GL_COLOR_BUFFER_BIT) { - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, ColorDDAMode, gCCPriv->ColorDDAMode); - } else { - /* Turn on writes the FB */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, FBWriteMode, FBWriteModeEnable); - } - -#ifdef DO_VALIDATE - PROCESS_DMA_BUFFER_TOP_HALF(gCCPriv); - - DRM_SPINUNLOCK(&driScrnPriv->pSAREA->drawable_lock, - driScrnPriv->drawLockID); - VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gCC,gCCPriv); - - PROCESS_DMA_BUFFER_BOTTOM_HALF(gCCPriv); -#endif - -#if 0 - FLUSH_DMA_BUFFER(gCC,gCCPriv); -#endif -} - -void _gamma_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - DEBUG_GLCMDS(("ClearAccum: %f %f %f %f\n", red, green, blue, alpha)); -} - -void _gamma_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - DEBUG_GLCMDS(("ClearColor: %f %f %f %f\n", - (float)red, (float)green, (float)blue, (float)alpha)); - - gCCPriv->ClearColor[0] = red; - gCCPriv->ClearColor[1] = green; - gCCPriv->ClearColor[2] = blue; - gCCPriv->ClearColor[3] = alpha; -} - -void _gamma_ClearDepth(GLclampd depth) -{ - DEBUG_GLCMDS(("ClearDepth: %f\n", (float)depth)); - - gCCPriv->ClearDepth = depth; -} - -void _gamma_ClearIndex(GLfloat c) -{ - DEBUG_GLCMDS(("ClearIndex: %f\n", c)); -} - -void _gamma_ClearStencil(GLint s) -{ - DEBUG_GLCMDS(("ClearStencil: %d\n", (int)s)); -} - -void _gamma_ClipPlane(GLenum plane, const GLdouble *equation) -{ - DEBUG_GLCMDS(("ClipPlane: %04x %f %f %f %f\n", (int)plane, - equation[0], equation[1], equation[2], equation[3])); -} - -void _gamma_Color3b(GLbyte red, GLbyte green, GLbyte blue) -{ - DEBUG_GLCMDS(("Color3b: %d %d %d\n", red, green, blue)); - - _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); -} - -void _gamma_Color3bv(const GLbyte *v) -{ - DEBUG_GLCMDS(("Color3bv: %d %d %d\n", v[0], v[1], v[2])); - - _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Color3d(GLdouble red, GLdouble green, GLdouble blue) -{ - DEBUG_GLCMDS(("Color3d: %f %f %f\n", red, green, blue)); - - _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); -} - -void _gamma_Color3dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("Color3dv: %f %f %f\n", v[0], v[1], v[2])); - - _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); - WRITEF(gCCPriv->buf, Cr3, red); -} - -void _gamma_Color3fv(const GLfloat *v) -{ - DEBUG_GLCMDS(("Color3fv: %f %f %f\n", v[0], v[1], v[2])); - - _gamma_Color3f(v[0],v[1],v[2]); -} - -void _gamma_Color3i(GLint red, GLint green, GLint blue) -{ - DEBUG_GLCMDS(("Color3i: %d %d %d\n", (int)red, (int)green, (int)blue)); - - _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); -} - -void _gamma_Color3iv(const GLint *v) -{ - DEBUG_GLCMDS(("Color3iv: %d %d %d\n", (int)v[0], (int)v[1], (int)v[2])); - - _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Color3s(GLshort red, GLshort green, GLshort blue) -{ - DEBUG_GLCMDS(("Color3s: %d %d %d\n", red, green, blue)); - - _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); -} - -void _gamma_Color3sv(const GLshort *v) -{ - DEBUG_GLCMDS(("Color3sv: %d %d %d\n", v[0], v[1], v[2])); - - _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Color3ub(GLubyte red, GLubyte green, GLubyte blue) -{ - GLuint c; - - DEBUG_GLCMDS(("Color3ub: %d %d %d\n", red, green, blue)); - - c = (blue << 16) | (green << 8) | red; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, PackedColor3, c); -} - -void _gamma_Color3ubv(const GLubyte *v) -{ - GLuint c; - - DEBUG_GLCMDS(("Color3ubv: %d %d %d\n", v[0], v[1], v[2])); - - c = (v[2] << 16) | (v[1] << 8) | v[0]; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, PackedColor3, c); -} - -void _gamma_Color3ui(GLuint red, GLuint green, GLuint blue) -{ - DEBUG_GLCMDS(("Color3ui: %d %d %d\n", - (unsigned int)red, (unsigned int)green, (unsigned int)blue)); - - _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); -} - -void _gamma_Color3uiv(const GLuint *v) -{ - DEBUG_GLCMDS(("Color3uiv: %d %d %d\n", - (unsigned int)v[0], (unsigned int)v[1], (unsigned int)v[2])); - - _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Color3us(GLushort red, GLushort green, GLushort blue) -{ - DEBUG_GLCMDS(("Color3us: %d %d %d\n", red, green, blue)); - - _gamma_Color3f((GLfloat)red,(GLfloat)green,(GLfloat)blue); -} - -void _gamma_Color3usv(const GLushort *v) -{ - DEBUG_GLCMDS(("Color3usv: %d %d %d\n", v[0], v[1], v[2])); - - _gamma_Color3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) -{ - GLfloat r,g,b,a; - - DEBUG_GLCMDS(("Color4b: %d %d %d %d\n", red, green, blue, alpha)); - - r = BYTE_TO_FLOAT(red); - g = BYTE_TO_FLOAT(green); - b = BYTE_TO_FLOAT(blue); - a = BYTE_TO_FLOAT(alpha); - - _gamma_Color4f(r,g,b,a); -} - -void _gamma_Color4bv(const GLbyte *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("Color4bv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); - - p[0] = BYTE_TO_FLOAT(v[0]); - p[1] = BYTE_TO_FLOAT(v[1]); - p[2] = BYTE_TO_FLOAT(v[2]); - p[3] = BYTE_TO_FLOAT(v[3]); - - _gamma_Color4fv(p); -} - -void _gamma_Color4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) -{ - DEBUG_GLCMDS(("Color4d: %f %f %f %f\n", red, green, blue, alpha)); - - _gamma_Color4f((GLfloat)red,(GLfloat)green,(GLfloat)blue,(GLfloat)alpha); -} - -void _gamma_Color4dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("Color4dv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); - - _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); - WRITEF(gCCPriv->buf, Cg, green); - WRITEF(gCCPriv->buf, Cr4, red); -} - -void _gamma_Color4fv(const GLfloat *v) -{ - 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]); - WRITEF(gCCPriv->buf, Cg, v[1]); - WRITEF(gCCPriv->buf, Cr4, v[0]); -} - -void _gamma_Color4i(GLint red, GLint green, GLint blue, GLint alpha) -{ - GLfloat r,g,b,a; - - DEBUG_GLCMDS(("Color4i: %d %d %d %d\n", (int)red, (int)green, (int)blue, - (int)alpha)); - - r = INT_TO_FLOAT(red); - g = INT_TO_FLOAT(green); - b = INT_TO_FLOAT(blue); - a = INT_TO_FLOAT(alpha); - - _gamma_Color4f(r,g,b,a); -} - -void _gamma_Color4iv(const GLint *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("Color4iv: %d %d %d %d\n", (int)v[0], (int)v[1], (int)v[2], - (int)v[3])); - - p[0] = INT_TO_FLOAT(v[0]); - p[1] = INT_TO_FLOAT(v[1]); - p[2] = INT_TO_FLOAT(v[2]); - p[3] = INT_TO_FLOAT(v[3]); - - _gamma_Color4fv(p); -} - -void _gamma_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) -{ - GLfloat r,g,b,a; - - DEBUG_GLCMDS(("Color4s: %d %d %d %d\n", red, green, blue, alpha)); - - r = SHORT_TO_FLOAT(red); - g = SHORT_TO_FLOAT(green); - b = SHORT_TO_FLOAT(blue); - a = SHORT_TO_FLOAT(alpha); - - _gamma_Color4f(r,g,b,a); -} - -void _gamma_Color4sv(const GLshort *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("Color4sv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); - - p[0] = SHORT_TO_FLOAT(v[0]); - p[1] = SHORT_TO_FLOAT(v[1]); - p[2] = SHORT_TO_FLOAT(v[2]); - p[3] = SHORT_TO_FLOAT(v[3]); - - _gamma_Color4fv(p); -} - -void _gamma_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -{ - GLuint c; - - DEBUG_GLCMDS(("Color4ub: %d %d %d %d\n", red, green, blue, alpha)); - - c = (alpha << 24) | (blue << 16) | (green << 8) | red; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, PackedColor4, c); -} - -void _gamma_Color4ubv(const GLubyte *v) -{ - GLuint c; - - DEBUG_GLCMDS(("Color4ubv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); - - c = (v[3] << 24) | (v[2] << 16) | (v[1] << 8) | v[0]; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, PackedColor4, c); -} - -void _gamma_Color4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) -{ - GLfloat r,g,b,a; - - DEBUG_GLCMDS(("Color4ui: %d %d %d %d\n", - (unsigned int)red, (unsigned int)green, - (unsigned int)blue, (unsigned int)alpha)); - - r = UINT_TO_FLOAT(red); - g = UINT_TO_FLOAT(green); - b = UINT_TO_FLOAT(blue); - a = UINT_TO_FLOAT(alpha); - - _gamma_Color4f(r,g,b,a); -} - -void _gamma_Color4uiv(const GLuint *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("Color4uiv: %d %d %d %d\n", - (unsigned int)v[0], (unsigned int)v[1], - (unsigned int)v[2], (unsigned int)v[3])); - - p[0] = UINT_TO_FLOAT(v[0]); - p[1] = UINT_TO_FLOAT(v[1]); - p[2] = UINT_TO_FLOAT(v[2]); - p[3] = UINT_TO_FLOAT(v[3]); - - _gamma_Color4fv(p); -} - -void _gamma_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) -{ - GLfloat r,g,b,a; - - DEBUG_GLCMDS(("Color4us: %d %d %d %d\n", red, green, blue, alpha)); - - r = USHORT_TO_FLOAT(red); - g = USHORT_TO_FLOAT(green); - b = USHORT_TO_FLOAT(blue); - a = USHORT_TO_FLOAT(alpha); - - _gamma_Color4f(r,g,b,a); -} - -void _gamma_Color4usv(const GLushort *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("Color4usv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); - - p[0] = USHORT_TO_FLOAT(v[0]); - p[1] = USHORT_TO_FLOAT(v[1]); - p[2] = USHORT_TO_FLOAT(v[2]); - p[3] = USHORT_TO_FLOAT(v[3]); - - _gamma_Color4fv(p); -} - -void _gamma_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ - DEBUG_GLCMDS(("ColorMask: %d %d %d %d\n", red, green, blue, alpha)); -} - -void _gamma_ColorMaterial(GLenum face, GLenum mode) -{ - DEBUG_GLCMDS(("ColorMaterial: %04x %04x\n", (int)face, (int)mode)); - - gCCPriv->ColorMaterialMode &= ~ColorMaterialModeMask; - - switch (face) { - case GL_FRONT: - gCCPriv->ColorMaterialMode |= ColorMaterialModeFront; - break; - case GL_BACK: - gCCPriv->ColorMaterialMode |= ColorMaterialModeBack; - break; - case GL_FRONT_AND_BACK: - gCCPriv->ColorMaterialMode |= ColorMaterialModeFrontAndBack; - break; - } - - switch (mode) { - case GL_AMBIENT: - gCCPriv->ColorMaterialMode |= ColorMaterialModeAmbient; - break; - case GL_EMISSION: - gCCPriv->ColorMaterialMode |= ColorMaterialModeEmission; - break; - case GL_DIFFUSE: - gCCPriv->ColorMaterialMode |= ColorMaterialModeDiffuse; - break; - case GL_SPECULAR: - gCCPriv->ColorMaterialMode |= ColorMaterialModeSpecular; - break; - case GL_AMBIENT_AND_DIFFUSE: - gCCPriv->ColorMaterialMode |= ColorMaterialModeAmbAndDiff; - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, ColorMaterialMode, gCCPriv->ColorMaterialMode); -} - -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) -{ - DEBUG_GLCMDS(("CopyPixels: %d %d %d %d %04x\n", (int)x, (int)y, - (int)width, (int)height, (int)type)); -} - -void _gamma_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) -{ - DEBUG_GLCMDS(("CopyTexImage1D: %04x %d %04x %d %d %d %d\n", - (int)target, (int)level, (int)internalformat, - (int)x, (int)y, (int)width, (int)border)); -} - -void _gamma_CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - DEBUG_GLCMDS(("CopyTexImage2D: %04x %d %04x %d %d %d %d %d\n", - (int)target, (int)level, (int)internalformat, - (int)x, (int)y, (int)width, (int)height, (int)border)); -} - -void _gamma_CopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - DEBUG_GLCMDS(("CopyTexSubImage1D: %04x %d %d %d %d %d\n", - (int)target, (int)level, - (int)xoffset, (int)x, (int)y, (int)width)); -} - -void _gamma_CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - DEBUG_GLCMDS(("CopyTexSubImage2D: %04x %d %d %d %d %d %d %d\n", - (int)target, (int)level, (int)xoffset, (int)yoffset, - (int)x, (int)y, (int)width, (int)height)); -} - -void _gamma_CullFace(GLenum mode) -{ - DEBUG_GLCMDS(("CullFace: %04x\n", (int)mode)); - - gCCPriv->GeometryMode &= ~GM_PolyCullMask; - - switch (mode) { - case GL_FRONT: - gCCPriv->GeometryMode |= GM_PolyCullFront; - break; - case GL_BACK: - gCCPriv->GeometryMode |= GM_PolyCullBack; - break; - case GL_FRONT_AND_BACK: - gCCPriv->GeometryMode |= GM_PolyCullBoth; - break; - default: - /* ERROR!! */ - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - 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) -{ - int i; - - DEBUG_GLCMDS(("DeleteTextures: %d\n", (int)n)); -#ifdef DEBUG_VERBOSE_EXTRA - { - int t; - for (t = 0; t < n; t++) - printf("\t%d\n", (unsigned int)textures[t]); - } -#endif - - for (i = 0; i < n; i++) { - gammaTexObj *t = gammaTOFind(textures[i]); - if (driTMMDeleteImages(gCCPriv->tmm, MIPMAP_LEVELS, t->image) < 0) { - DEBUG_ERROR(("DeleteTextures: unable\n")); - /* NOT_DONE: Handle error */ - } - gammaTODelete(textures[i]); - } - - gCCPriv->curTexObj = gammaTOFind(0); - gCCPriv->curTexObj1D = gCCPriv->curTexObj; - gCCPriv->curTexObj2D = gCCPriv->curTexObj; -} - -void _gamma_DepthFunc(GLenum func) -{ - DEBUG_GLCMDS(("DepthFunc: %04x\n", (int)func)); - - gCCPriv->DepthMode &= ~DM_CompareMask; - - switch (func) { - case GL_NEVER: - gCCPriv->DepthMode |= DM_Never; - break; - case GL_LESS: - gCCPriv->DepthMode |= DM_Less; - break; - case GL_EQUAL: - gCCPriv->DepthMode |= DM_Equal; - break; - case GL_LEQUAL: - gCCPriv->DepthMode |= DM_LessEqual; - break; - case GL_GREATER: - gCCPriv->DepthMode |= DM_Greater; - break; - case GL_NOTEQUAL: - gCCPriv->DepthMode |= DM_NotEqual; - break; - case GL_GEQUAL: - gCCPriv->DepthMode |= DM_GreaterEqual; - break; - case GL_ALWAYS: - gCCPriv->DepthMode |= DM_Always; - break; - default: - /* ERROR!! */ - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); -} - -void _gamma_DepthMask(GLboolean flag) -{ - DEBUG_GLCMDS(("DepthMask: %d\n", flag)); - - if (flag) { - gCCPriv->DepthMode |= DM_WriteMask; - } else { - gCCPriv->DepthMode &= ~DM_WriteMask; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); -} - -void _gamma_DepthRange(GLclampd zNear, GLclampd zFar) -{ - GLfloat sz, oz; - - DEBUG_GLCMDS(("DepthRange: %f %f\n", (float)zNear, (float)zFar)); - - gCCPriv->zNear = zNear; - gCCPriv->zFar = zFar; - - oz = (zFar+zNear)/2.0; - sz = (zFar-zNear)/2.0; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITEF(gCCPriv->buf, ViewPortScaleZ, sz); - WRITEF(gCCPriv->buf, ViewPortOffsetZ, oz); -} - -void _gamma_Disable(GLenum cap) -{ - DEBUG_GLCMDS(("Disable %04x\n", (int)cap)); - - switch (cap) { - case GL_CULL_FACE: - gCCPriv->GeometryMode &= ~GM_PolyCullEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); - break; - case GL_DEPTH_TEST: - if (gCCPriv->Flags & GAMMA_DEPTH_BUFFER) { - gCCPriv->EnabledFlags &= ~GAMMA_DEPTH_BUFFER; - gCCPriv->DepthMode &= ~DepthModeEnable; - gCCPriv->LBReadMode &= ~LBReadDstEnable; - gCCPriv->DeltaMode &= ~DM_DepthEnable; - gCCPriv->Window &= ~W_DepthFCP; - - /* Turn depth mode off */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); - WRITE(gCCPriv->buf, DeltaMode, gCCPriv->DeltaMode); - WRITE(gCCPriv->buf, LBReadModeAnd, ~LBReadDstEnable); - WRITE(gCCPriv->buf, WindowAnd, ~W_DepthFCP); - } - break; - case GL_ALPHA_TEST: - /* Do I need to verify that alpha is enabled? */ - gCCPriv->AlphaTestMode &= ~AlphaTestModeEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, AlphaTestMode, gCCPriv->AlphaTestMode); - WRITE(gCCPriv->buf, RouterMode, R_Order_DepthTexture); - break; - case GL_BLEND: - /* Do I need to verify that alpha is enabled? */ - gCCPriv->AlphaBlendMode &= ~AlphaBlendModeEnable; - gCCPriv->AB_FBReadMode = 0; - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, AlphaBlendMode, gCCPriv->AlphaBlendMode); - WRITE(gCCPriv->buf, FBReadMode, (gCCPriv->FBReadMode | - gCCPriv->AB_FBReadMode)); - break; - case GL_COLOR_MATERIAL: - gCCPriv->ColorMaterialMode &= ~ColorMaterialModeEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, ColorMaterialMode, gCCPriv->ColorMaterialMode); - break; - case GL_FOG: - gCCPriv->Begin &= ~B_FogEnable; - gCCPriv->GeometryMode &= ~GM_FogEnable; - gCCPriv->DeltaMode &= ~DM_FogEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); - WRITE(gCCPriv->buf, DeltaMode, gCCPriv->DeltaMode); - WRITE(gCCPriv->buf, FogMode, FogModeDisable); - break; - case GL_LIGHTING: - gCCPriv->LightingMode &= ~LightingModeEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, LightingMode, gCCPriv->LightingMode); - break; - case GL_LIGHT0: - gCCPriv->Light0Mode &= ~LNM_On; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, Light0Mode, gCCPriv->Light0Mode); - break; - case GL_LIGHT1: - gCCPriv->Light1Mode &= ~LNM_On; - 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; - gCCPriv->GeometryMode &= ~GM_TextureEnable; - gCCPriv->DeltaMode &= ~DM_TextureEnable; - gCCPriv->curTexObj->TextureAddressMode &= ~TextureAddressModeEnable; - gCCPriv->curTexObj->TextureReadMode &= ~TextureReadModeEnable; - gCCPriv->curTexObj->TextureColorMode &= ~TextureColorModeEnable; - gCCPriv->curTexObj->TextureFilterMode &= ~TextureFilterModeEnable; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 6); - WRITE(gCCPriv->buf, GeometryModeAnd, ~GM_TextureEnable); - WRITE(gCCPriv->buf, DeltaModeAnd, ~DM_TextureEnable); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj->TextureAddressMode); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj->TextureReadMode); - WRITE(gCCPriv->buf, TextureColorMode, - gCCPriv->curTexObj->TextureColorMode); - WRITE(gCCPriv->buf, TextureFilterMode, - gCCPriv->curTexObj->TextureFilterMode); - break; - default: - break; - } -} - -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) -{ - DEBUG_GLCMDS(("DrawArrays: %04x %d %d\n", (int)mode, (int)first, - (int)count)); -} - -void _gamma_DrawBuffer(GLenum mode) -{ - DEBUG_GLCMDS(("DrawBuffer: %04x\n", (int)mode)); -} - -void _gamma_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) -{ - DEBUG_GLCMDS(("DrawElements: %04x %d %04x\n", (int)mode, (int)count, - (int)type)); -} - -void _gamma_DrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) -{ - DEBUG_GLCMDS(("DrawPixels: %d %d %04x %04x\n", (int)width, (int)height, - (int)format, (int)type)); -} - -void _gamma_EdgeFlag(GLboolean flag) -{ - DEBUG_GLCMDS(("EdgeFlag: %d\n", flag)); -} - -void _gamma_EdgeFlagPointer(GLsizei stride, const GLvoid *pointer) -{ - DEBUG_GLCMDS(("EdgeFlagPointer: %d\n", (int)stride)); -} - -void _gamma_EdgeFlagv(const GLboolean *flag) -{ - DEBUG_GLCMDS(("EdgeFlagv: \n")); -} - -void _gamma_Enable(GLenum cap) -{ - DEBUG_GLCMDS(("Enable %04x\n", (int)cap)); - - switch (cap) { - case GL_CULL_FACE: - gCCPriv->GeometryMode |= GM_PolyCullEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); - break; - case GL_DEPTH_TEST: - if (gCCPriv->Flags & GAMMA_DEPTH_BUFFER) { - gCCPriv->EnabledFlags |= GAMMA_DEPTH_BUFFER; -#ifndef TURN_OFF_DEPTH - gCCPriv->DepthMode |= DepthModeEnable; - gCCPriv->LBReadMode |= LBReadDstEnable; - gCCPriv->DeltaMode |= DM_DepthEnable; -#ifndef TURN_OFF_FCP - gCCPriv->Window |= W_DepthFCP; -#endif - - /* Turn depth mode on */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITE(gCCPriv->buf, DepthMode, gCCPriv->DepthMode); - WRITE(gCCPriv->buf, DeltaMode, gCCPriv->DeltaMode); - WRITE(gCCPriv->buf, LBReadModeOr, LBReadDstEnable); -#ifndef TURN_OFF_FCP - WRITE(gCCPriv->buf, WindowOr, (W_DepthFCP | - (gCCPriv->FrameCount << 9))); -#else - WRITE(gCCPriv->buf, WindowOr, (gCCPriv->FrameCount << 9)); -#endif -#endif - } - break; - case GL_ALPHA_TEST: - gCCPriv->AlphaTestMode |= AlphaTestModeEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, AlphaTestMode, gCCPriv->AlphaTestMode); - WRITE(gCCPriv->buf, RouterMode, R_Order_TextureDepth); - break; - case GL_BLEND: -#ifndef TURN_OFF_BLEND - gCCPriv->AlphaBlendMode |= AlphaBlendModeEnable; - gCCPriv->AB_FBReadMode = gCCPriv->AB_FBReadMode_Save; -#endif - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, AlphaBlendMode, gCCPriv->AlphaBlendMode); - WRITE(gCCPriv->buf, FBReadMode, (gCCPriv->FBReadMode | - gCCPriv->AB_FBReadMode)); - break; - case GL_COLOR_MATERIAL: - gCCPriv->ColorMaterialMode |= ColorMaterialModeEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, ColorMaterialMode, gCCPriv->ColorMaterialMode); - break; - case GL_FOG: - gCCPriv->Begin |= B_FogEnable; - gCCPriv->GeometryMode |= GM_FogEnable; - gCCPriv->DeltaMode |= DM_FogEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); - WRITE(gCCPriv->buf, DeltaMode, gCCPriv->DeltaMode); - WRITE(gCCPriv->buf, FogMode, FogModeEnable); - break; - case GL_LIGHTING: - gCCPriv->LightingMode |= LightingModeEnable | 16<<6; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, LightingMode, gCCPriv->LightingMode); - break; - case GL_LIGHT0: - gCCPriv->Light0Mode |= LNM_On; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, Light0Mode, gCCPriv->Light0Mode); - break; - case GL_LIGHT1: - gCCPriv->Light1Mode |= LNM_On; - 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 - gCCPriv->Begin |= B_TextureEnable; -#endif - gCCPriv->GeometryMode |= GM_TextureEnable; - gCCPriv->DeltaMode |= DM_TextureEnable; - gCCPriv->curTexObj->TextureAddressMode |= TextureAddressModeEnable; - gCCPriv->curTexObj->TextureReadMode |= TextureReadModeEnable; - gCCPriv->curTexObj->TextureColorMode |= TextureColorModeEnable; - gCCPriv->curTexObj->TextureFilterMode |= TextureFilterModeEnable; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 6); - WRITE(gCCPriv->buf, GeometryModeOr, GM_TextureEnable); - WRITE(gCCPriv->buf, DeltaModeOr, DM_TextureEnable); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj->TextureAddressMode); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj->TextureReadMode); - WRITE(gCCPriv->buf, TextureColorMode, - gCCPriv->curTexObj->TextureColorMode); - WRITE(gCCPriv->buf, TextureFilterMode, - gCCPriv->curTexObj->TextureFilterMode); - break; - default: - break; - } -} - -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) -{ - DEBUG_GLCMDS(("End\n")); - - if ((gCCPriv->Begin & B_PrimType_Mask) == B_PrimType_Null) { - /* ERROR!!! */ - return; - } - - /* No longer inside of Begin/End */ - gCCPriv->Begin &= ~B_PrimType_Mask; - gCCPriv->Begin |= B_PrimType_Null; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, End, 0); -#if 0 - /* To force creation of smaller buffers */ - FLUSH_DMA_BUFFER(gCC,gCCPriv); -#endif -} - -#if 0 /* Now in dlist.c */ -void _gamma_EndList(void) -{ - DEBUG_GLCMDS(("EndList\n")); -} -#endif - -void _gamma_EvalCoord1d(GLdouble u) -{ - DEBUG_GLCMDS(("EvalCoord1d: %f\n", u)); -} - -void _gamma_EvalCoord1dv(const GLdouble *u) -{ - DEBUG_GLCMDS(("EvalCoord1dv: %f\n", *u)); -} - -void _gamma_EvalCoord1f(GLfloat u) -{ - DEBUG_GLCMDS(("EvalCoord1f: %f\n", u)); -} - -void _gamma_EvalCoord1fv(const GLfloat *u) -{ - DEBUG_GLCMDS(("EvalCoord1fv: %f\n", *u)); -} - -void _gamma_EvalCoord2d(GLdouble u, GLdouble v) -{ - DEBUG_GLCMDS(("EvalCoord2d: %f %f\n", u, v)); -} - -void _gamma_EvalCoord2dv(const GLdouble *u) -{ - DEBUG_GLCMDS(("EvalCoord2dv: %f %f\n", u[0], u[1])); -} - -void _gamma_EvalCoord2f(GLfloat u, GLfloat v) -{ - DEBUG_GLCMDS(("EvalCoord2f: %f %f\n", u, v)); -} - -void _gamma_EvalCoord2fv(const GLfloat *u) -{ - DEBUG_GLCMDS(("EvalCoord1fv: %f %f\n", u[0], u[1])); -} - -void _gamma_EvalMesh1(GLenum mode, GLint i1, GLint i2) -{ - DEBUG_GLCMDS(("EvalMesh1: %d %d %d\n", mode, i1, i2)); -} - -void _gamma_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) -{ -} - -void _gamma_EvalPoint1(GLint i) -{ -} - -void _gamma_EvalPoint2(GLint i, GLint j) -{ -} - -void _gamma_FeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer) -{ - DEBUG_GLCMDS(("FeedbackBuffer: %d %04x\n", (int)size, (int)type)); -} - -void _gamma_Finish(void) -{ - DEBUG_GLCMDS(("Finish\n")); - - FLUSH_DMA_BUFFER(gCC,gCCPriv); -} - -void _gamma_Flush(void) -{ - DEBUG_GLCMDS(("Flush\n")); - - FLUSH_DMA_BUFFER(gCC,gCCPriv); -} - -void _gamma_Fogf(GLenum pname, GLfloat param) -{ - DEBUG_GLCMDS(("Fogf: %04x %f\n", (int)pname, param)); - - switch (pname) { - case GL_FOG_DENSITY: - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITEF(gCCPriv->buf, FogDensity, param); - break; - } -} - -void _gamma_Fogfv(GLenum pname, const GLfloat *params) -{ - int color; - - DEBUG_GLCMDS(("Fogfv: %04x %f\n", (int)pname, *params)); - - switch (pname) { - case GL_FOG_COLOR: - 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; - } -} - -void _gamma_Fogi(GLenum pname, GLint param) -{ - DEBUG_GLCMDS(("Fogi: %04x %d\n", (int)pname, (int)param)); - - gCCPriv->GeometryMode &= ~GM_FogMask; - - switch (pname) { - case GL_FOG_MODE: - switch (param) { - case GL_EXP: - gCCPriv->GeometryMode |= GM_FogExp; - break; - case GL_EXP2: - gCCPriv->GeometryMode |= GM_FogExpSquared; - break; - case GL_LINEAR: - gCCPriv->GeometryMode |= GM_FogLinear; - break; - } - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); -} - -void _gamma_Fogiv(GLenum pname, const GLint *params) -{ - DEBUG_GLCMDS(("Fogiv: %04x %d\n", (int)pname, (int)*params)); -} - -void _gamma_FrontFace(GLenum mode) -{ - DEBUG_GLCMDS(("FrontFace: %04x\n", (int)mode)); - - gCCPriv->GeometryMode &= ~GM_FFMask; - - if (mode == GL_CCW) - gCCPriv->GeometryMode |= GM_FrontFaceCCW; - else - gCCPriv->GeometryMode |= GM_FrontFaceCW; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); -} - -void _gamma_Frustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ -#define FRUSTUM_X() ((GLfloat)((2.0*zNear)/(right-left))) -#define FRUSTUM_Y() ((GLfloat)((2.0*zNear)/(top-bottom))) - -#define FRUSTUM_A() ((GLfloat)( (right+left)/(right-left))) -#define FRUSTUM_B() ((GLfloat)( (top+bottom)/(top-bottom))) -#define FRUSTUM_C() ((GLfloat)( -((zFar+zNear)/(zFar-zNear)))) -#define FRUSTUM_D() ((GLfloat)(-((2.0*zFar*zNear)/(zFar-zNear)))) - - GLfloat m[16]; - int i; - - DEBUG_GLCMDS(("Frustum: %f %f %f %f %f %f\n", - left, right, bottom, top, zNear, zFar)); - - for (i = 0; i < 16; i++) m[i] = 0.0; - - m[0] = FRUSTUM_X(); - m[5] = FRUSTUM_Y(); - m[8] = FRUSTUM_A(); - m[9] = FRUSTUM_B(); - m[10] = FRUSTUM_C(); - m[11] = -1.0; - m[14] = FRUSTUM_D(); - - gammaMultMatrix(m); - 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) -{ - DEBUG_GLCMDS(("GenTextures: %d\n", (int)n)); -} - -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) -{ - DEBUG_GLCMDS(("GetClipPlane: %04x %f %f %f %f\n", (int)plane, - equation[0], equation[1], equation[2], equation[3])); -} - -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 gCCPriv->ErrorValue; -} - -void _gamma_GetFloatv(GLenum val, GLfloat *f) -{ - 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 (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; - } -} - -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 = 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; - } -} - -void _gamma_GetLightfv(GLenum light, GLenum pname, GLfloat *params) -{ - DEBUG_GLCMDS(("GetLightfv: %04x %04x %f\n", - (int)light, (int)pname, *params)); -} - -void _gamma_GetLightiv(GLenum light, GLenum pname, GLint *params) -{ - DEBUG_GLCMDS(("GetLightiv: %04x %04x %d\n", - (int)light, (int)pname, *params)); -} - -void _gamma_GetMapdv(GLenum target, GLenum query, GLdouble *v) -{ -} - -void _gamma_GetMapfv(GLenum target, GLenum query, GLfloat *v) -{ -} - -void _gamma_GetMapiv(GLenum target, GLenum query, GLint *v) -{ -} - -void _gamma_GetMaterialfv(GLenum face, GLenum pname, GLfloat *params) -{ -} - -void _gamma_GetMaterialiv(GLenum face, GLenum pname, GLint *params) -{ -} - -void _gamma_GetPixelMapfv(GLenum map, GLfloat *values) -{ -} - -void _gamma_GetPixelMapuiv(GLenum map, GLuint *values) -{ -} - -void _gamma_GetPixelMapusv(GLenum map, GLushort *values) -{ -} - -void _gamma_GetPointerv(GLenum pname, void **params) -{ - DEBUG_GLCMDS(("GetPointerv: %04x\n", (int)pname)); -} - -void _gamma_GetPolygonStipple(GLubyte *mask) -{ -} - -const GLubyte *_gamma_GetString(GLenum name) -{ - static unsigned char vendor[] = "Precision Insight, Inc."; - static unsigned char renderer[] = "DRI Glint-Gamma 20000605"; - static unsigned char version[] = "1.1"; - static unsigned char ext[] = ""; - - switch (name) { - case GL_VENDOR: - return vendor; - case GL_RENDERER: - return renderer; - case GL_VERSION: - return version; - case GL_EXTENSIONS: - return ext; - } - - return NULL; -} - -void _gamma_GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params) -{ -} - -void _gamma_GetTexEnviv(GLenum target, GLenum pname, GLint *params) -{ -} - -void _gamma_GetTexGendv(GLenum coord, GLenum pname, GLdouble *params) -{ -} - -void _gamma_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params) -{ -} - -void _gamma_GetTexGeniv(GLenum coord, GLenum pname, GLint *params) -{ -} - -void _gamma_GetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *texels) -{ -} - -void _gamma_GetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params) -{ -} - -void _gamma_GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params) -{ -} - -void _gamma_GetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) -{ -} - -void _gamma_GetTexParameteriv(GLenum target, GLenum pname, GLint *params) -{ -} - -void _gamma_Hint(GLenum target, GLenum mode) -{ - DEBUG_GLCMDS(("Hint: %04x %04x\n", (int)target, (int)mode)); -} - -void _gamma_IndexMask(GLuint mask) -{ - DEBUG_GLCMDS(("Hint: %d\n", (unsigned int)mask)); -} - -void _gamma_IndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer) -{ - DEBUG_GLCMDS(("IndexPointer: %04x %d\n", (int)type, (int)stride)); -} - -void _gamma_Indexd(GLdouble c) -{ - DEBUG_GLCMDS(("Indexd: %f\n", c)); -} - -void _gamma_Indexdv(const GLdouble *c) -{ - DEBUG_GLCMDS(("Indexdv: %f\n", *c)); -} - -void _gamma_Indexf(GLfloat c) -{ - DEBUG_GLCMDS(("Indexf: %f\n", c)); -} - -void _gamma_Indexfv(const GLfloat *c) -{ - DEBUG_GLCMDS(("Indexdv: %f\n", *c)); -} - -void _gamma_Indexi(GLint c) -{ - DEBUG_GLCMDS(("Indexi: %d\n", (int)c)); -} - -void _gamma_Indexiv(const GLint *c) -{ - DEBUG_GLCMDS(("Indexiv: %d\n", (int)*c)); -} - -void _gamma_Indexs(GLshort c) -{ - DEBUG_GLCMDS(("Indexs: %d\n", c)); -} - -void _gamma_Indexsv(const GLshort *c) -{ - DEBUG_GLCMDS(("Indexsv: %d\n", *c)); -} - -void _gamma_Indexub(GLubyte c) -{ - DEBUG_GLCMDS(("Indexub: %d\n", c)); -} - -void _gamma_Indexubv(const GLubyte *c) -{ - DEBUG_GLCMDS(("Indexubv: %d\n", *c)); -} - -void _gamma_InitNames(void) -{ - DEBUG_GLCMDS(("InitNames\n")); -} - -void _gamma_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer) -{ - DEBUG_GLCMDS(("InterleavedArrays: %04x %d\n", (int)format, (int)stride)); -} - -GLboolean _gamma_IsEnabled(GLenum cap) -{ - DEBUG_GLCMDS(("IsEnabled: %04x\n", (int)cap)); - - switch (cap) { - case GL_LIGHTING: - return ((gCCPriv->LightingMode & LightingModeEnable)?GL_TRUE:GL_FALSE); - break; - } - - 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) -{ - DEBUG_GLCMDS(("IsTexture: %04x\n", (unsigned int)texture)); - - return GL_TRUE; -} - -void _gamma_LightModelf(GLenum pname, GLfloat param) -{ - DEBUG_GLCMDS(("LightModelf: %04x %f\n", - (int)pname, param)); -} - -void _gamma_LightModelfv(GLenum pname, const GLfloat *params) -{ - DEBUG_GLCMDS(("LightModelfv: %04x %f\n", - (int)pname, *params)); - - switch (pname) { - case GL_LIGHT_MODEL_AMBIENT: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - /* We don't do alpha */ - WRITEF(gCCPriv->buf, SceneAmbientColorBlue, params[2]); - WRITEF(gCCPriv->buf, SceneAmbientColorGreen, params[1]); - WRITEF(gCCPriv->buf, SceneAmbientColorRed, params[0]); - break; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - if (params[0] != 0.0) - gCCPriv->LightingMode |= LightingModeLocalViewer; - else - gCCPriv->LightingMode &= ~LightingModeLocalViewer; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, LightingMode, gCCPriv->LightingMode); - break; - case GL_LIGHT_MODEL_TWO_SIDE: - if (params[0] == 1.0f) { - gCCPriv->LightingMode |= LightingModeTwoSides; - gCCPriv->MaterialMode |= MaterialModeTwoSides; - } else { - gCCPriv->LightingMode &= ~LightingModeTwoSides; - gCCPriv->MaterialMode &= ~MaterialModeTwoSides; - } - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, LightingMode, gCCPriv->LightingMode); - WRITE(gCCPriv->buf, MaterialMode, gCCPriv->MaterialMode); - break; - } -} - -void _gamma_LightModeli(GLenum pname, GLint param) -{ -} - -void _gamma_LightModeliv(GLenum pname, const GLint *params) -{ -} - -void _gamma_Lightf(GLenum light, GLenum pname, GLfloat param) -{ - DEBUG_GLCMDS(("Lightf: %04x %04x %f\n", - (int)light, (int)pname, param)); -} - -void _gamma_Lightfv(GLenum light, GLenum pname, const GLfloat *params) -{ - GLfloat l,x,y,z,w; - DEBUG_GLCMDS(("Lightfv: %04x %04x %f\n", - (int)light, (int)pname, *params)); - - switch(light) { - case GL_LIGHT0: - switch (pname) { - case GL_AMBIENT: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - /* We don't do alpha */ - WRITEF(gCCPriv->buf, Light0AmbientIntensityBlue, params[2]); - WRITEF(gCCPriv->buf, Light0AmbientIntensityGreen, params[1]); - WRITEF(gCCPriv->buf, Light0AmbientIntensityRed, params[0]); - break; - case GL_DIFFUSE: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - /* We don't do alpha */ - WRITEF(gCCPriv->buf, Light0DiffuseIntensityBlue, params[2]); - WRITEF(gCCPriv->buf, Light0DiffuseIntensityGreen, params[1]); - WRITEF(gCCPriv->buf, Light0DiffuseIntensityRed, params[0]); - break; - case GL_SPECULAR: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - /* We don't do alpha */ - WRITEF(gCCPriv->buf, Light0SpecularIntensityBlue, params[2]); - WRITEF(gCCPriv->buf, Light0SpecularIntensityGreen, params[1]); - WRITEF(gCCPriv->buf, Light0SpecularIntensityRed, params[0]); - break; - case GL_POSITION: - /* Normalize */ - 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 (params[3] != 0.0) { - gCCPriv->Light0Mode |= Light0ModeAttenuation; - gCCPriv->Light0Mode |= Light0ModeLocal; - } else { - gCCPriv->Light0Mode &= ~Light0ModeAttenuation; - gCCPriv->Light0Mode &= ~Light0ModeLocal; - } - CHECK_DMA_BUFFER(gCC, gCCPriv, 5); - WRITE(gCCPriv->buf, Light0Mode, gCCPriv->Light0Mode); - 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, 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 (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, cos(params[0]*DEG2RAD)); - break; - case GL_CONSTANT_ATTENUATION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITEF(gCCPriv->buf, Light0ConstantAttenuation, params[0]); - break; - case GL_LINEAR_ATTENUATION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITEF(gCCPriv->buf, Light0LinearAttenuation, params[0]); - break; - case GL_QUADRATIC_ATTENUATION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITEF(gCCPriv->buf, Light0QuadraticAttenuation, params[0]); - break; - } - break; - case GL_LIGHT1: - switch (pname) { - case GL_AMBIENT: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - /* We don't do alpha */ - WRITEF(gCCPriv->buf, Light1AmbientIntensityBlue, params[2]); - WRITEF(gCCPriv->buf, Light1AmbientIntensityGreen, params[1]); - WRITEF(gCCPriv->buf, Light1AmbientIntensityRed, params[0]); - break; - case GL_DIFFUSE: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - /* We don't do alpha */ - WRITEF(gCCPriv->buf, Light1DiffuseIntensityBlue, params[2]); - WRITEF(gCCPriv->buf, Light1DiffuseIntensityGreen, params[1]); - WRITEF(gCCPriv->buf, Light1DiffuseIntensityRed, params[0]); - break; - case GL_SPECULAR: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - /* We don't do alpha */ - WRITEF(gCCPriv->buf, Light1SpecularIntensityBlue, params[2]); - WRITEF(gCCPriv->buf, Light1SpecularIntensityGreen, params[1]); - WRITEF(gCCPriv->buf, Light1SpecularIntensityRed, params[0]); - break; - case GL_POSITION: - /* Normalize */ - x = params[0]; y = params[1]; z = params[2]; - l = sqrt(x*x + y*y + z*z); - x /= l; - y /= l; - z /= l; - if (params[3] != 0.0) { - gCCPriv->Light1Mode |= Light1ModeAttenuation; - gCCPriv->Light1Mode |= Light1ModeLocal; - } else { - gCCPriv->Light0Mode &= ~Light0ModeAttenuation; - gCCPriv->Light0Mode &= ~Light0ModeLocal; - } - CHECK_DMA_BUFFER(gCC, gCCPriv, 5); - WRITE(gCCPriv->buf, Light1Mode, gCCPriv->Light1Mode); - WRITEF(gCCPriv->buf, Light1PositionW, params[3]); - WRITEF(gCCPriv->buf, Light1PositionZ, z); - WRITEF(gCCPriv->buf, Light1PositionY, y); - WRITEF(gCCPriv->buf, Light1PositionX, x); - break; - case GL_SPOT_DIRECTION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - /* 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 (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, cos(params[0]*DEG2RAD)); - break; - case GL_CONSTANT_ATTENUATION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITEF(gCCPriv->buf, Light1ConstantAttenuation, params[0]); - break; - case GL_LINEAR_ATTENUATION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITEF(gCCPriv->buf, Light1LinearAttenuation, params[0]); - break; - case GL_QUADRATIC_ATTENUATION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITEF(gCCPriv->buf, Light1QuadraticAttenuation, params[0]); - break; - } - } -} - -void _gamma_Lighti(GLenum light, GLenum pname, GLint param) -{ -} - -void _gamma_Lightiv(GLenum light, GLenum pname, const GLint *params) -{ -} - -void _gamma_LineStipple(GLint factor, GLushort pattern) -{ - DEBUG_GLCMDS(("LineStipple: %d %d\n", (int)factor, pattern)); -} - -void _gamma_LineWidth(GLfloat width) -{ - 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) -{ - DEBUG_GLCMDS(("LoadIdentity: %04x\n", gCCPriv->MatrixMode)); - - gammaSetMatrix(IdentityMatrix); - gammaLoadHWMatrix(); -} - -void _gamma_LoadMatrixd(const GLdouble *m) -{ - GLfloat f[16]; - int i; - - DEBUG_GLCMDS(("LoadMatrixd: %04x\n", gCCPriv->MatrixMode)); - - for (i = 0; i < 16; i++) f[i] = m[i]; - gammaSetMatrix(f); - gammaLoadHWMatrix(); -} - -void _gamma_LoadMatrixf(const GLfloat *m) -{ - DEBUG_GLCMDS(("LoadMatrixf: %04x\n", gCCPriv->MatrixMode)); - - gammaSetMatrix((GLfloat *)m); - gammaLoadHWMatrix(); -} - -void _gamma_LoadName(GLuint name) -{ - DEBUG_GLCMDS(("LoadName: %d\n", (unsigned int)name)); -} - -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) -{ - DEBUG_GLCMDS(("Map1d: %04x %f %f %d %d\n", (int)target, u1, u2, - (int)stride, (int)order)); -} - -void _gamma_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *pnts) -{ - DEBUG_GLCMDS(("Map1f: %04x %f %f %d %d\n", (int)target, u1, u2, - (int)stride, (int)order)); -} - -void _gamma_Map2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr, GLint uord, GLdouble v1, GLdouble v2, GLint vstr, GLint vord, const GLdouble *pnts) -{ - DEBUG_GLCMDS(("Map2d: %04x %f %f %d %d %f %f %d %d\n", - (int)target, - u1, u2, (int)ustr, (int)uord, - v1, v2, (int)vstr, (int)vord)); -} - -void _gamma_Map2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr, GLint uord, GLfloat v1, GLfloat v2, GLint vstr, GLint vord, const GLfloat *pnts) -{ - DEBUG_GLCMDS(("Map2f: %04x %f %f %d %d %f %f %d %d\n", - (int)target, - u1, u2, (int)ustr, (int)uord, - v1, v2, (int)vstr, (int)vord)); -} - -void _gamma_MapGrid1d(GLint un, GLdouble u1, GLdouble u2) -{ - DEBUG_GLCMDS(("MapGrid1d: %d %f %f\n", (int)un, u1, u2)); -} - -void _gamma_MapGrid1f(GLint un, GLfloat u1, GLfloat u2) -{ - DEBUG_GLCMDS(("MapGrid1f: %d %f %f\n", (int)un, u1, u2)); -} - -void _gamma_MapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) -{ - DEBUG_GLCMDS(("MapGrid2d: %d %f %f %d %f %f\n", - (int)un, u1, u2, - (int)vn, v1, v2)); -} - -void _gamma_MapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) -{ - DEBUG_GLCMDS(("MapGrid2f: %d %f %f %d %f %f\n", - (int)un, u1, u2, - (int)vn, v1, v2)); -} - -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) -{ - DEBUG_GLCMDS(("Materialfv: %04x %04x %f\n", - (int)face, (int)pname, *params)); - - gCCPriv->MaterialMode |= MaterialModeEnable; - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, MaterialMode, gCCPriv->MaterialMode); - - if ((face == GL_FRONT) || (face == GL_FRONT_AND_BACK)) { - switch (pname) { - case GL_AMBIENT: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, FrontAmbientColorBlue, params[2]); - WRITEF(gCCPriv->buf, FrontAmbientColorGreen, params[1]); - WRITEF(gCCPriv->buf, FrontAmbientColorRed, params[0]); - break; - case GL_DIFFUSE: - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, FrontAlpha, params[3]); - WRITEF(gCCPriv->buf, FrontDiffuseColorBlue, params[2]); - WRITEF(gCCPriv->buf, FrontDiffuseColorGreen, params[1]); - WRITEF(gCCPriv->buf, FrontDiffuseColorRed, params[0]); - break; - case GL_SPECULAR: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, FrontSpecularColorBlue, params[2]); - WRITEF(gCCPriv->buf, FrontSpecularColorGreen, params[1]); - WRITEF(gCCPriv->buf, FrontSpecularColorRed, params[0]); - break; - case GL_EMISSION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, FrontEmissiveColorBlue, params[2]); - WRITEF(gCCPriv->buf, FrontEmissiveColorGreen, params[1]); - WRITEF(gCCPriv->buf, FrontEmissiveColorRed, params[0]); - break; - case GL_SHININESS: - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITEF(gCCPriv->buf, FrontSpecularExponent, params[0]); - break; - case GL_AMBIENT_AND_DIFFUSE: - CHECK_DMA_BUFFER(gCC, gCCPriv, 7); - WRITEF(gCCPriv->buf, FrontAmbientColorBlue, params[2]); - WRITEF(gCCPriv->buf, FrontAmbientColorGreen, params[1]); - WRITEF(gCCPriv->buf, FrontAmbientColorRed, params[0]); - WRITEF(gCCPriv->buf, FrontAlpha, params[3]); - WRITEF(gCCPriv->buf, FrontDiffuseColorBlue, params[2]); - WRITEF(gCCPriv->buf, FrontDiffuseColorGreen, params[1]); - WRITEF(gCCPriv->buf, FrontDiffuseColorRed, params[0]); - break; - case GL_COLOR_INDEXES: - /* NOT_DONE */ - break; - } - } - - if ((face == GL_BACK) || (face == GL_FRONT_AND_BACK)) { - switch (pname) { - case GL_AMBIENT: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, BackAmbientColorBlue, params[2]); - WRITEF(gCCPriv->buf, BackAmbientColorGreen, params[1]); - WRITEF(gCCPriv->buf, BackAmbientColorRed, params[0]); - break; - case GL_DIFFUSE: - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, BackAlpha, params[3]); - WRITEF(gCCPriv->buf, BackDiffuseColorBlue, params[2]); - WRITEF(gCCPriv->buf, BackDiffuseColorGreen, params[1]); - WRITEF(gCCPriv->buf, BackDiffuseColorRed, params[0]); - break; - case GL_SPECULAR: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, BackSpecularColorBlue, params[2]); - WRITEF(gCCPriv->buf, BackSpecularColorGreen, params[1]); - WRITEF(gCCPriv->buf, BackSpecularColorRed, params[0]); - break; - case GL_EMISSION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, BackEmissiveColorBlue, params[2]); - WRITEF(gCCPriv->buf, BackEmissiveColorGreen, params[1]); - WRITEF(gCCPriv->buf, BackEmissiveColorRed, params[0]); - break; - case GL_SHININESS: - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITEF(gCCPriv->buf, BackSpecularExponent, params[0]); - break; - case GL_AMBIENT_AND_DIFFUSE: - CHECK_DMA_BUFFER(gCC, gCCPriv, 7); - WRITEF(gCCPriv->buf, BackAmbientColorBlue, params[2]); - WRITEF(gCCPriv->buf, BackAmbientColorGreen, params[1]); - WRITEF(gCCPriv->buf, BackAmbientColorRed, params[0]); - WRITEF(gCCPriv->buf, BackAlpha, params[3]); - WRITEF(gCCPriv->buf, BackDiffuseColorBlue, params[2]); - WRITEF(gCCPriv->buf, BackDiffuseColorGreen, params[1]); - WRITEF(gCCPriv->buf, BackDiffuseColorRed, params[0]); - break; - case GL_COLOR_INDEXES: - /* NOT_DONE */ - break; - } - } -} - -void _gamma_Materiali(GLenum face, GLenum pname, GLint param) -{ - DEBUG_GLCMDS(("Materiali: %04x %04x %d\n", - (int)face, (int)pname, (int)param)); -} - -void _gamma_Materialiv(GLenum face, GLenum pname, const GLint *params) -{ - DEBUG_GLCMDS(("Materialiv: %04x %04x %d\n", - (int)face, (int)pname, (int)*params)); -} - -void _gamma_MatrixMode(GLenum mode) -{ - DEBUG_GLCMDS(("MatrixMode: %04x\n", (int)mode)); - - switch (mode) { - case GL_TEXTURE: - /* Enable the Texture transform */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, TransformModeOr, XM_XformTexture); - case GL_MODELVIEW: - case GL_PROJECTION: - gCCPriv->MatrixMode = mode; - break; - default: - /* ERROR!!! */ - break; - } -} - -void _gamma_MultMatrixd(const GLdouble *m) -{ - GLfloat f[16]; - int i; - - DEBUG_GLCMDS(("MatrixMultd\n")); - - for (i = 0; i < 16; i++) f[i] = m[i]; - gammaMultMatrix(f); - gammaLoadHWMatrix(); -} - -void _gamma_MultMatrixf(const GLfloat *m) -{ - DEBUG_GLCMDS(("MatrixMultf\n")); - - gammaMultMatrix((GLfloat *)m); - 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) -{ - DEBUG_GLCMDS(("Normal3b: %d %d %d\n", nx, ny, nz)); - - _gamma_Normal3f((GLfloat)nx,(GLfloat)ny,(GLfloat)nz); -} - -void _gamma_Normal3bv(const GLbyte *v) -{ - DEBUG_GLCMDS(("Normal3bv: %d %d %d\n", v[0], v[1], v[2])); - - _gamma_Normal3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Normal3d(GLdouble nx, GLdouble ny, GLdouble nz) -{ - DEBUG_GLCMDS(("Normal3d: %f %f %f\n", nx, ny, nz)); - - _gamma_Normal3f((GLfloat)nx,(GLfloat)ny,(GLfloat)nz); -} - -void _gamma_Normal3dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("Normal3dv: %f %f %f\n", v[0], v[1], v[2])); - - _gamma_Normal3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz) -{ - 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); - WRITEF(gCCPriv->buf, Nx, nx); -} - -void _gamma_Normal3fv(const GLfloat *v) -{ - DEBUG_GLCMDS(("Normal3fv: %f %f %f\n", v[0], v[1], v[2])); - - _gamma_Normal3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Normal3i(GLint nx, GLint ny, GLint nz) -{ - DEBUG_GLCMDS(("Normal3i: %d %d %d\n", (int)nx, (int)ny, (int)nz)); - - _gamma_Normal3f((GLfloat)nx,(GLfloat)ny,(GLfloat)nz); -} - -void _gamma_Normal3iv(const GLint *v) -{ - 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]); -} - -void _gamma_Normal3s(GLshort nx, GLshort ny, GLshort nz) -{ - DEBUG_GLCMDS(("Normal3s: %d %d %d\n", nx, ny, nz)); - - _gamma_Normal3f((GLfloat)nx,(GLfloat)ny,(GLfloat)nz); -} - -void _gamma_Normal3sv(const GLshort *v) -{ - DEBUG_GLCMDS(("Normal3sv: %d %d %d\n", v[0], v[1], v[2])); - - _gamma_Normal3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -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) -{ -#define ORTHO_X() ((GLfloat)( 2.0/(right-left))) -#define ORTHO_Y() ((GLfloat)( 2.0/(top-bottom))) -#define ORTHO_Z() ((GLfloat)(-2.0/(zFar-zNear))) - -#define ORTHO_TX() ((GLfloat)(-((right+left)/(right-left)))) -#define ORTHO_TY() ((GLfloat)(-((top+bottom)/(top-bottom)))) -#define ORTHO_TZ() ((GLfloat)(-((zFar+zNear)/(zFar-zNear)))) - - GLfloat m[16]; - int i; - - DEBUG_GLCMDS(("Ortho: %f %f %f %f %f %f\n", - left, right, bottom, top, zNear, zFar)); - - for (i = 0; i < 16; i++) m[i] = 0.0; - - m[0] = ORTHO_X(); - m[5] = ORTHO_Y(); - m[10] = ORTHO_Z(); - m[12] = ORTHO_TX(); - m[13] = ORTHO_TY(); - m[14] = ORTHO_TZ(); - m[15] = 1.0; - - gammaMultMatrix(m); - gammaLoadHWMatrix(); -} - -void _gamma_PassThrough(GLfloat token) -{ - DEBUG_GLCMDS(("PassThrough: %f\n", token)); -} - -void _gamma_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values) -{ - DEBUG_GLCMDS(("PixelMapfv: %04x %d\n", (int)map, (int)mapsize)); -} - -void _gamma_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values) -{ - DEBUG_GLCMDS(("PixelMapiv: %04x %d\n", (int)map, (int)mapsize)); -} - -void _gamma_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values) -{ - DEBUG_GLCMDS(("PixelMapusv: %04x %d\n", (int)map, (int)mapsize)); -} - -void _gamma_PixelStoref(GLenum pname, GLfloat param) -{ - DEBUG_GLCMDS(("PixelStoref: %04x %f\n", (int)pname, param)); -} - -void _gamma_PixelStorei(GLenum pname, GLint param) -{ - DEBUG_GLCMDS(("PixelStorei: %04x %d\n", (int)pname, (int)param)); -} - -void _gamma_PixelTransferf(GLenum pname, GLfloat param) -{ - DEBUG_GLCMDS(("PixelTransferf: %04x %f\n", (int)pname, param)); -} - -void _gamma_PixelTransferi(GLenum pname, GLint param) -{ - DEBUG_GLCMDS(("PixelTransferi: %04x %d\n", (int)pname, (int)param)); -} - -void _gamma_PixelZoom(GLfloat xfactor, GLfloat yfactor) -{ - DEBUG_GLCMDS(("PixelZoom: %f %f\n", xfactor, yfactor)); -} - -void _gamma_PointSize(GLfloat size) -{ - unsigned char s = size; - - DEBUG_GLCMDS(("PointSize: %f\n", size)); - - /* NOT_DONE: Needs to handle AAPoints also */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, PointSize, s); -} - -void _gamma_PolygonMode(GLenum face, GLenum mode) -{ - DEBUG_GLCMDS(("PolygonMode: %04x %04x\n", (int)face, (int)mode)); - - gCCPriv->GeometryMode &= ~GM_FB_PolyMask; - - switch (mode) { - case GL_FILL: - switch (face) { - case GL_FRONT: - gCCPriv->GeometryMode |= GM_FrontPolyFill; - break; - case GL_BACK: - gCCPriv->GeometryMode |= GM_BackPolyFill; - break; - case GL_FRONT_AND_BACK: - gCCPriv->GeometryMode |= GM_FrontPolyFill; - gCCPriv->GeometryMode |= GM_BackPolyFill; - break; - } - break; - case GL_LINE: - switch (face) { - case GL_FRONT: - gCCPriv->GeometryMode |= GM_FrontPolyLine; - break; - case GL_BACK: - gCCPriv->GeometryMode |= GM_BackPolyLine; - break; - case GL_FRONT_AND_BACK: - gCCPriv->GeometryMode |= GM_FrontPolyLine; - gCCPriv->GeometryMode |= GM_BackPolyLine; - break; - } - break; - case GL_POINT: - switch (face) { - case GL_FRONT: - gCCPriv->GeometryMode |= GM_FrontPolyPoint; - break; - case GL_BACK: - gCCPriv->GeometryMode |= GM_BackPolyPoint; - break; - case GL_FRONT_AND_BACK: - gCCPriv->GeometryMode |= GM_FrontPolyPoint; - gCCPriv->GeometryMode |= GM_BackPolyPoint; - break; - } - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); -} - -void _gamma_PolygonOffset(GLfloat factor, GLfloat units) -{ - DEBUG_GLCMDS(("PolygonOffset: %f %f\n", factor, units)); -} - -void _gamma_PolygonStipple(const GLubyte *mask) -{ - DEBUG_GLCMDS(("PolygonStipple: \n")); -} - -void _gamma_PopAttrib(void) -{ - DEBUG_GLCMDS(("PopAttrib\n")); -} - -void _gamma_PopClientAttrib(void) -{ - DEBUG_GLCMDS(("PopClientAttrib\n")); -} - -void _gamma_PopMatrix(void) -{ - DEBUG_GLCMDS(("PopMatrix: %04x\n", gCCPriv->MatrixMode)); - - switch (gCCPriv->MatrixMode) { - case GL_TEXTURE: - if (gCCPriv->TextureCount == 0) { - /* ERROR!!! */ - } else { - gCCPriv->TextureCount--; - memcpy(gCCPriv->Texture, - &gCCPriv->TextureStack[gCCPriv->TextureCount*16], - 16*sizeof(*gCCPriv->Texture)); - gammaLoadHWMatrix(); - } - break; - case GL_MODELVIEW: - if (gCCPriv->ModelViewCount == 0) { - /* ERROR!!! */ - } else { - gCCPriv->ModelViewCount--; - memcpy(gCCPriv->ModelView, - &gCCPriv->ModelViewStack[gCCPriv->ModelViewCount*16], - 16*sizeof(*gCCPriv->ModelView)); - gammaLoadHWMatrix(); - } - break; - case GL_PROJECTION: - if (gCCPriv->ProjCount == 0) { - /* ERROR!!! */ - } else { - gCCPriv->ProjCount--; - memcpy(gCCPriv->Proj, - &gCCPriv->ProjStack[gCCPriv->ProjCount*16], - 16*sizeof(*gCCPriv->Proj)); - gammaLoadHWMatrix(); - } - break; - default: - /* ERROR!!! */ - break; - } -} - -void _gamma_PopName(void) -{ - DEBUG_GLCMDS(("PopName\n")); -} - -void _gamma_PrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities) -{ - DEBUG_GLCMDS(("PrioritizeTextures: %d\n", (int)n)); -} - -void _gamma_PushAttrib(GLbitfield mask) -{ - DEBUG_GLCMDS(("PushAttrib: %04x\n", (int)mask)); -} - -void _gamma_PushClientAttrib(GLuint mask) -{ - DEBUG_GLCMDS(("PushClientAttrib: %04x\n", (unsigned int)mask)); -} - -void _gamma_PushMatrix(void) -{ - DEBUG_GLCMDS(("PushMatrix: %04x\n", gCCPriv->MatrixMode)); - - switch (gCCPriv->MatrixMode) { - case GL_TEXTURE: - if (gCCPriv->TextureCount >= MAX_TEXTURE_STACK-1) { - /* ERROR!!! */ - } else { - memcpy(&gCCPriv->TextureStack[gCCPriv->TextureCount*16], - gCCPriv->Texture, - 16*sizeof(*gCCPriv->Texture)); - gCCPriv->TextureCount++; - } - break; - case GL_MODELVIEW: - if (gCCPriv->ModelViewCount >= MAX_MODELVIEW_STACK-1) { - /* ERROR!!! */ - } else { - memcpy(&gCCPriv->ModelViewStack[gCCPriv->ModelViewCount*16], - gCCPriv->ModelView, - 16*sizeof(*gCCPriv->ModelView)); - gCCPriv->ModelViewCount++; - } - break; - case GL_PROJECTION: - if (gCCPriv->ProjCount >= MAX_PROJECTION_STACK-1) { - /* ERROR!!! */ - } else { - memcpy(&gCCPriv->ProjStack[gCCPriv->ProjCount*16], - gCCPriv->Proj, - 16*sizeof(*gCCPriv->Proj)); - gCCPriv->ProjCount++; - } - break; - default: - /* ERROR!!! */ - break; - } -} - -void _gamma_PushName(GLuint name) -{ - DEBUG_GLCMDS(("PushName: %d\n", (int)name)); -} - -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) -{ -} - -void _gamma_RasterPos2s(GLshort x, GLshort y) -{ -} - -void _gamma_RasterPos2sv(const GLshort *v) -{ -} - -void _gamma_RasterPos3d(GLdouble x, GLdouble y, GLdouble z) -{ -} - -void _gamma_RasterPos3dv(const GLdouble *v) -{ -} - -void _gamma_RasterPos3f(GLfloat x, GLfloat y, GLfloat z) -{ -} - -void _gamma_RasterPos3fv(const GLfloat *v) -{ -} - -void _gamma_RasterPos3i(GLint x, GLint y, GLint z) -{ -} - -void _gamma_RasterPos3iv(const GLint *v) -{ -} - -void _gamma_RasterPos3s(GLshort x, GLshort y, GLshort z) -{ -} - -void _gamma_RasterPos3sv(const GLshort *v) -{ -} - -void _gamma_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ -} - -void _gamma_RasterPos4dv(const GLdouble *v) -{ -} - -void _gamma_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ -} - -void _gamma_RasterPos4fv(const GLfloat *v) -{ -} - -void _gamma_RasterPos4i(GLint x, GLint y, GLint z, GLint w) -{ -} - -void _gamma_RasterPos4iv(const GLint *v) -{ -} - -void _gamma_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ -} - -void _gamma_RasterPos4sv(const GLshort *v) -{ -} - -void _gamma_ReadBuffer(GLenum mode) -{ - DEBUG_GLCMDS(("ReadBuffer: %04x\n", (int)mode)); -} - -void _gamma_ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) -{ - DEBUG_GLCMDS(("ReadPixels: %d %d %d %d %04x %04x\n", (int)x, (int)y, - (int)width, (int)height, (int)format, (int)type)); -} - -void _gamma_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) -{ - DEBUG_GLCMDS(("Rectd: %f %f %f %f\n", x1, y1, x2, y2)); -} - -void _gamma_Rectdv(const GLdouble *v1, const GLdouble *v2) -{ - DEBUG_GLCMDS(("Rectdv: %f %f %f %f\n", v1[0], v1[1], v2[0], v2[1])); -} - -void _gamma_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) -{ - DEBUG_GLCMDS(("Rectf: %f %f %f %f\n", x1, y1, x2, y2)); - - /* This should be done with Gamma's Rectangle engine - later */ - - _gamma_Begin(GL_POLYGON); - _gamma_Vertex2f(x1,y1); - _gamma_Vertex2f(x2,y1); - _gamma_Vertex2f(x2,y2); - _gamma_Vertex2f(x1,y2); - _gamma_End(); -} - -void _gamma_Rectfv(const GLfloat *v1, const GLfloat *v2) -{ - DEBUG_GLCMDS(("Rectfv: %f %f %f %f\n", v1[0], v1[1], v2[0], v2[1])); -} - -void _gamma_Recti(GLint x1, GLint y1, GLint x2, GLint y2) -{ - DEBUG_GLCMDS(("Recti: %d %d %d %d\n", (int)x1, (int)y1, (int)x2, (int)y2)); -} - -void _gamma_Rectiv(const GLint *v1, const GLint *v2) -{ - DEBUG_GLCMDS(("Rectiv: %d %d %d %d\n", - (int)v1[0], (int)v1[1], (int)v2[0], (int)v2[1])); -} - -void _gamma_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) -{ - DEBUG_GLCMDS(("Rects: %d %d %d %d\n", x1, y1, x2, y2)); -} - -void _gamma_Rectsv(const GLshort *v1, const GLshort *v2) -{ - DEBUG_GLCMDS(("Rectsv: %d %d %d %d\n", v1[0], v1[1], v2[0], v2[1])); -} - -GLint _gamma_RenderMode(GLenum mode) -{ - DEBUG_GLCMDS(("RenderMode: %04x\n", (int)mode)); - - return GL_TRUE; -} - -void _gamma_Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) -{ - GLfloat m[16]; - GLfloat l, c, s; - - DEBUG_GLCMDS(("Rotated: %f %f %f %f\n", angle, x, y, z)); - - /* Normalize */ - l = sqrt(x*x + y*y + z*z); - x /= l; - y /= l; - z /= l; - - c = cos(angle * M_PI/180.0); - s = sin(angle * M_PI/180.0); - - m[0] = x * x * (1 - c) + c; - m[1] = y * x * (1 - c) + z * s; - m[2] = x * z * (1 - c) - y * s; - m[3] = 0.0; - m[4] = x * y * (1 - c) - z * s; - m[5] = y * y * (1 - c) + c; - m[6] = y * z * (1 - c) + x * s; - m[7] = 0.0; - m[8] = x * z * (1 - c) + y * s; - m[9] = y * z * (1 - c) - x * s; - m[10] = z * z * (1 - c) + c; - m[11] = 0.0; - m[12] = 0.0; - m[13] = 0.0; - m[14] = 0.0; - m[15] = 1.0; - - gammaMultMatrix(m); - gammaLoadHWMatrix(); -} - -void _gamma_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -{ - GLfloat m[16]; - GLfloat l, c, s; - - DEBUG_GLCMDS(("Rotatef: %f %f %f %f\n", angle, x, y, z)); - - /* Normalize */ - l = sqrt(x*x + y*y + z*z); - x /= l; - y /= l; - z /= l; - - c = cos((double)angle * M_PI/180.0); - s = sin((double)angle * M_PI/180.0); - - m[0] = x * x * (1 - c) + c; - m[1] = y * x * (1 - c) + z * s; - m[2] = x * z * (1 - c) - y * s; - m[3] = 0.0; - m[4] = x * y * (1 - c) - z * s; - m[5] = y * y * (1 - c) + c; - m[6] = y * z * (1 - c) + x * s; - m[7] = 0.0; - m[8] = x * z * (1 - c) + y * s; - m[9] = y * z * (1 - c) - x * s; - m[10] = z * z * (1 - c) + c; - m[11] = 0.0; - m[12] = 0.0; - m[13] = 0.0; - m[14] = 0.0; - m[15] = 1.0; - - gammaMultMatrix(m); - gammaLoadHWMatrix(); -} - -void _gamma_Scaled(GLdouble x, GLdouble y, GLdouble z) -{ - GLfloat m[16]; - int i; - - DEBUG_GLCMDS(("scaled: %f %f %f\n", x, y, z)); - - for (i = 0; i < 16; i++) m[i] = 0.0; - - m[0] = x; - m[5] = y; - m[10] = z; - m[15] = 1.0; - - gammaMultMatrix(m); - gammaLoadHWMatrix(); -} - -void _gamma_Scalef(GLfloat x, GLfloat y, GLfloat z) -{ - GLfloat m[16]; - int i; - - DEBUG_GLCMDS(("scalef: %f %f %f\n", x, y, z)); - - for (i = 0; i < 16; i++) m[i] = 0.0; - - m[0] = x; - m[5] = y; - m[10] = z; - m[15] = 1.0; - - gammaMultMatrix(m); - gammaLoadHWMatrix(); -} - -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) -{ - DEBUG_GLCMDS(("SelectBuffer: %d\n", (int)numnames)); -} - -void _gamma_ShadeModel(GLenum mode) -{ - DEBUG_GLCMDS(("ShadeModel: %04x\n", (int)mode)); - - gCCPriv->GeometryMode &= ~GM_ShadingMask; - gCCPriv->ColorDDAMode &= ~ColorDDAShadingMask; - - switch (mode) { - case GL_FLAT: - gCCPriv->ColorDDAMode |= ColorDDAFlat; - gCCPriv->GeometryMode |= GM_FlatShading; - break; - case GL_SMOOTH: - gCCPriv->ColorDDAMode |= ColorDDAGouraud; - gCCPriv->GeometryMode |= GM_GouraudShading; - break; - default: - /* ERROR!!! */ - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, GeometryMode, gCCPriv->GeometryMode); - WRITE(gCCPriv->buf, ColorDDAMode, gCCPriv->ColorDDAMode); -} - -void _gamma_StencilFunc(GLenum func, GLint ref, GLuint mask) -{ - DEBUG_GLCMDS(("StencilFunc: %04x %d %d\n", - (int)func, (int)ref, (unsigned int)mask)); -} - -void _gamma_StencilMask(GLuint mask) -{ - DEBUG_GLCMDS(("StencilMask: %d\n", (unsigned int)mask)); -} - -void _gamma_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) -{ - DEBUG_GLCMDS(("StencilOp: %04x %04x %04x\n", - (int)fail, (int)zfail, (int)zpass)); -} - -void _gamma_TexCoord1d(GLdouble s) -{ - DEBUG_GLCMDS(("TexCoord1d: %f\n", s)); - - _gamma_TexCoord1f((GLfloat)s); -} - -void _gamma_TexCoord1dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("TexCoord1dv: %f\n", *v)); - - _gamma_TexCoord1fv((GLfloat*)v); -} - -void _gamma_TexCoord1f(GLfloat s) -{ - 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); -} - -void _gamma_TexCoord1fv(const GLfloat *v) -{ - 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]); -} - -void _gamma_TexCoord1i(GLint s) -{ - GLfloat x; - - DEBUG_GLCMDS(("TexCoord1i: %d\n", (int)s)); - - x = INT_TO_FLOAT(s); - - _gamma_TexCoord1f(x); -} - -void _gamma_TexCoord1iv(const GLint *v) -{ - GLfloat p[1]; - - DEBUG_GLCMDS(("TexCoord1iv: %d\n", (int)*v)); - - p[0] = INT_TO_FLOAT(v[0]); - - _gamma_TexCoord1fv(p); -} - -void _gamma_TexCoord1s(GLshort s) -{ - GLfloat x; - - DEBUG_GLCMDS(("TexCoord1s: %d\n", s)); - - x = SHORT_TO_FLOAT(s); - - _gamma_TexCoord1f(x); -} - -void _gamma_TexCoord1sv(const GLshort *v) -{ - GLfloat p[1]; - - DEBUG_GLCMDS(("TexCoord1sv: %d\n", *v)); - - p[0] = SHORT_TO_FLOAT(v[0]); - - _gamma_TexCoord1fv(p); -} - -void _gamma_TexCoord2d(GLdouble s, GLdouble t) -{ - DEBUG_GLCMDS(("TexCoord2d: %f %f\n", s, t)); - - _gamma_TexCoord2f((GLfloat)s,(GLfloat)t); -} - -void _gamma_TexCoord2dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("TexCoord2dv: %f %f\n", v[0], v[1])); - - _gamma_TexCoord2fv((GLfloat*)v); -} - -void _gamma_TexCoord2f(GLfloat s, GLfloat t) -{ - 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); -} - -void _gamma_TexCoord2fv(const GLfloat *v) -{ - 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]); -} - -void _gamma_TexCoord2i(GLint s, GLint t) -{ - GLfloat x,y; - - DEBUG_GLCMDS(("TexCoord2i: %d %d\n", (int)s, (int)t)); - - x = INT_TO_FLOAT(s); - y = INT_TO_FLOAT(t); - - _gamma_TexCoord2f(x,y); -} - -void _gamma_TexCoord2iv(const GLint *v) -{ - GLfloat p[2]; - - DEBUG_GLCMDS(("TexCoord2iv: %d %d\n", (int)v[0], (int)v[1])); - - p[0] = INT_TO_FLOAT(v[0]); - p[1] = INT_TO_FLOAT(v[1]); - - _gamma_TexCoord2fv(p); -} - -void _gamma_TexCoord2s(GLshort s, GLshort t) -{ - GLfloat x,y; - - DEBUG_GLCMDS(("TexCoord2s: %d %d\n", s, t)); - - x = SHORT_TO_FLOAT(s); - y = SHORT_TO_FLOAT(t); - - _gamma_TexCoord2f(x,y); -} - -void _gamma_TexCoord2sv(const GLshort *v) -{ - GLfloat p[2]; - - DEBUG_GLCMDS(("TexCoord2sv: %d %d\n", v[0], v[1])); - - p[0] = SHORT_TO_FLOAT(v[0]); - p[1] = SHORT_TO_FLOAT(v[1]); - - _gamma_TexCoord2fv(p); -} - -void _gamma_TexCoord3d(GLdouble s, GLdouble t, GLdouble r) -{ - DEBUG_GLCMDS(("TexCoord3d: %f %f %f\n", s, t, r)); - - _gamma_TexCoord3f((GLfloat)s,(GLfloat)t,(GLfloat)r); -} - -void _gamma_TexCoord3dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("TexCoord3dv: %f %f %f\n", v[0], v[1], v[2])); - - _gamma_TexCoord3fv((GLfloat*)v); -} - -void _gamma_TexCoord3f(GLfloat s, GLfloat t, GLfloat r) -{ - DEBUG_GLCMDS(("TexCoord3f: %f %f %f\n", s, t, r)); - - _gamma_TexCoord4f(s,t,r,1.0f); -} - -void _gamma_TexCoord3fv(const GLfloat *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("TexCoord3fv: %f %f %f\n", v[0], v[1], v[2])); - - p[0] = v[0]; - p[1] = v[1]; - p[2] = v[2]; - p[3] = 1.0f; - - _gamma_TexCoord4fv(p); -} - -void _gamma_TexCoord3i(GLint s, GLint t, GLint r) -{ - GLfloat x,y,z; - - DEBUG_GLCMDS(("TexCoord3i: %d %d %d\n", (int)s, (int)t, (int)r)); - - x = INT_TO_FLOAT(s); - y = INT_TO_FLOAT(t); - z = INT_TO_FLOAT(r); - - _gamma_TexCoord4f(x,y,z,1.0f); -} - -void _gamma_TexCoord3iv(const GLint *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("TexCoord3iv: %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]); - p[3] = 1.0f; - - _gamma_TexCoord4fv(p); -} - -void _gamma_TexCoord3s(GLshort s, GLshort t, GLshort r) -{ - GLfloat x,y,z; - - DEBUG_GLCMDS(("TexCoord3s: %d %d %d\n", s, t, r)); - - x = SHORT_TO_FLOAT(s); - y = SHORT_TO_FLOAT(t); - z = SHORT_TO_FLOAT(r); - - _gamma_TexCoord4f(x,y,z,1.0f); -} - -void _gamma_TexCoord3sv(const GLshort *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("TexCoord3sv: %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]); - p[3] = 1.0f; - - _gamma_TexCoord4fv(p); -} - -void _gamma_TexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - DEBUG_GLCMDS(("TexCoord4d: %f %f %f %f\n", s, t, r, q)); - - _gamma_TexCoord4f((GLfloat)s,(GLfloat)t,(GLfloat)r,(GLfloat)q); -} - -void _gamma_TexCoord4dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("TexCoord4dv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); - - _gamma_TexCoord4fv((GLfloat*)v); -} - -void _gamma_TexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - 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); - WRITEF(gCCPriv->buf, Tt4, t); - WRITEF(gCCPriv->buf, Ts4, s); -} - -void _gamma_TexCoord4fv(const GLfloat *v) -{ - 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]); - WRITEF(gCCPriv->buf, Tt4, v[1]); - WRITEF(gCCPriv->buf, Ts4, v[0]); -} - -void _gamma_TexCoord4i(GLint s, GLint t, GLint r, GLint q) -{ - GLfloat x,y,z,a; - - DEBUG_GLCMDS(("TexCoord4i: %d %d %d %d\n", (int)s, (int)t, (int)r, (int)q)); - - x = INT_TO_FLOAT(s); - y = INT_TO_FLOAT(t); - z = INT_TO_FLOAT(r); - a = INT_TO_FLOAT(q); - - _gamma_TexCoord4f(x,y,z,a); -} - -void _gamma_TexCoord4iv(const GLint *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("TexCoord4iv: %d %d %d %d\n", - (int)v[0], (int)v[1], (int)v[2], (int)v[3])); - - p[0] = INT_TO_FLOAT(v[0]); - p[1] = INT_TO_FLOAT(v[1]); - p[2] = INT_TO_FLOAT(v[2]); - p[3] = INT_TO_FLOAT(v[3]); - - _gamma_TexCoord4fv(p); -} - -void _gamma_TexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) -{ - GLfloat x,y,z,a; - - DEBUG_GLCMDS(("TexCoord4s: %d %d %d %d\n", s, t, r, q)); - - x = SHORT_TO_FLOAT(s); - y = SHORT_TO_FLOAT(t); - z = SHORT_TO_FLOAT(r); - a = SHORT_TO_FLOAT(q); - - _gamma_TexCoord4f(s,t,r,q); -} - -void _gamma_TexCoord4sv(const GLshort *v) -{ - GLfloat p[4]; - - DEBUG_GLCMDS(("TexCoord4sv: %d %d %d %d\n", v[0], v[1], v[2], v[3])); - - p[0] = SHORT_TO_FLOAT(v[0]); - p[1] = SHORT_TO_FLOAT(v[1]); - p[2] = SHORT_TO_FLOAT(v[2]); - p[3] = SHORT_TO_FLOAT(v[3]); - - _gamma_TexCoord4fv(p); -} - -void _gamma_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - 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) -{ - DEBUG_GLCMDS(("TexEnvf: %04x %04x %f\n", (int)target, (int)pname, param)); - - if (target != GL_TEXTURE_ENV || pname != GL_TEXTURE_ENV_MODE) { - /* ERROR !! */ - } - - gCCPriv->curTexObj->TextureColorMode &= ~TCM_ApplicationMask; - - switch ((int)param) { - case GL_MODULATE: - gCCPriv->curTexObj->TextureColorMode |= TCM_Modulate; - break; - case GL_DECAL: - gCCPriv->curTexObj->TextureColorMode |= TCM_Decal; - break; - case GL_BLEND: - gCCPriv->curTexObj->TextureColorMode |= TCM_Blend; - break; - case GL_REPLACE: - gCCPriv->curTexObj->TextureColorMode |= TCM_Replace; - break; - default: - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, TextureColorMode, - gCCPriv->curTexObj->TextureColorMode); -} - -void _gamma_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params) -{ - DEBUG_GLCMDS(("TexEnvfv: %04x %04x %f\n", - (int)target, (int)pname, *params)); - - if (target != GL_TEXTURE_ENV) { - /* ERROR !! */ - } - - switch (pname) { - case GL_TEXTURE_ENV_MODE: - gCCPriv->curTexObj->TextureColorMode &= ~TCM_ApplicationMask; - switch ((int)params[0]) { - case GL_MODULATE: - gCCPriv->curTexObj->TextureColorMode |= TCM_Modulate; - break; - case GL_DECAL: - gCCPriv->curTexObj->TextureColorMode |= TCM_Decal; - break; - case GL_BLEND: - gCCPriv->curTexObj->TextureColorMode |= TCM_Blend; - break; - case GL_REPLACE: - gCCPriv->curTexObj->TextureColorMode |= TCM_Replace; - break; - } - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, TextureColorMode, - gCCPriv->curTexObj->TextureColorMode); -} - -void _gamma_TexEnvi(GLenum target, GLenum pname, GLint param) -{ - DEBUG_GLCMDS(("TexEnvi: %04x %04x %d\n", - (int)target, (int)pname, (int)param)); -} - -void _gamma_TexEnviv(GLenum target, GLenum pname, const GLint *params) -{ - DEBUG_GLCMDS(("TexEnviv: %04x %04x %d\n", - (int)target, (int)pname, (int)*params)); -} - -void _gamma_TexGend(GLenum coord, GLenum pname, GLdouble param) -{ - DEBUG_GLCMDS(("TexGend: %04x %04x %f\n", (int)coord, (int)pname, param)); -} - -void _gamma_TexGendv(GLenum coord, GLenum pname, const GLdouble *params) -{ - DEBUG_GLCMDS(("TexGendv: %04x %04x %f\n", (int)coord, (int)pname, *params)); -} - -void _gamma_TexGenf(GLenum coord, GLenum pname, GLfloat param) -{ - DEBUG_GLCMDS(("TexGenf: %04x %04x %f\n", (int)coord, (int)pname, param)); -} - -void _gamma_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params) -{ - DEBUG_GLCMDS(("TexGenfv: %04x %04x %f\n", (int)coord, (int)pname, *params)); -} - -void _gamma_TexGeni(GLenum coord, GLenum pname, GLint param) -{ - DEBUG_GLCMDS(("TexGeni: %04x %04x %d\n", - (int)coord, (int)pname, (int)param)); -} - -void _gamma_TexGeniv(GLenum coord, GLenum pname, const GLint *params) -{ - DEBUG_GLCMDS(("TexGeniv: %04x %04x %d\n", - (int)coord, (int)pname, (int)*params)); -} - -void _gamma_TexImage1D(GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *image) -{ - DEBUG_GLCMDS(("TexImage1D: %04x %d %d %d %d %04x %04x\n", - (int)target, (int)level, (int)components, - (int)width, (int)border, (int)format, (int)type)); -} - -void _gamma_TexImage2D(GLenum target, GLint level, GLint components, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *image) -{ - unsigned long addrs[MIPMAP_LEVELS]; - int l2w, l2h, l2d; - gammaTexObj *t; - int i; - - DEBUG_GLCMDS(("TexImage2D: %04x %d %d %d %d %d %04x %04x\n", - (int)target, (int)level, (int)components, - (int)width, (int)height, (int)border, - (int)format, (int)type)); - - if (target == GL_TEXTURE_1D) { - /* NOT_DONE */ - DEBUG_ERROR(("TexImage2D: 1D requested - ERROR\n")); - } else if (target == GL_TEXTURE_2D) { - /* NOT_DONE: The follow are not currently supported... */ - if (border != 0 /* || format != GL_RGBA */ || type != GL_UNSIGNED_BYTE || - (components != 3 && components != 4)) { - DEBUG_ERROR(("TexImage2D: 2D op not supported - ERROR\n")); - return; - } - - if (width > 2048 || height > 2048) return; /* ERROR !! */ - if (level < 0 || level > 11) return; /* ERROR !! */ - - /* Calculate the log2width, log2height and log2depth */ - CALC_LOG2(l2w, width); - CALC_LOG2(l2h, height); - l2d = 5; - - t = gCCPriv->curTexObj2D; - - /* Set the texture params for level 0 only */ - if (level == 0) { - t->TextureAddressMode &= ~(TAM_WidthMask | - TAM_HeightMask); - t->TextureAddressMode |= (l2w << 9); - t->TextureAddressMode |= (l2h << 13); - - /* NOT_DONE: Support patch mode */ - t->TextureReadMode &= ~(TRM_WidthMask | - TRM_HeightMask | - TRM_DepthMask | - TRM_Border | - TRM_Patch); - t->TextureReadMode |= (l2w << 1); - t->TextureReadMode |= (l2h << 5); - t->TextureReadMode |= (l2d << 9); - - t->TextureColorMode &= ~(TCM_BaseFormatMask); - - switch (components) { - case 3: - t->TextureColorMode |= TCM_BaseFormat_RGB; - break; - case 4: - t->TextureColorMode |= TCM_BaseFormat_RGBA; - break; - } - -#if X_BYTE_ORDER == X_LITTLE_ENDIAN - t->TextureFormat = (TF_LittleEndian | -#else - t->TextureFormat = (TF_BigEndian | -#endif - TF_ColorOrder_BGR | - TF_Compnents_4 | - TF_OutputFmt_Texel); - } - - /* Remove the old image */ - if (t->image[level]) - driTMMDeleteImage(gCCPriv->tmm, t->image[level]); - - /* Insert the new image */ - t->image[level] = driTMMInsertImage(gCCPriv->tmm, - width, height, 1<image[level]) { - /* NOT_DONE: Handle error */ - DEBUG_ERROR(("TexImage2D: unable1\n")); - } - - /* Make the new image resident (and all of the other mipmaps) */ - if (driTMMMakeImagesResident(gCCPriv->tmm, MIPMAP_LEVELS, - t->image, addrs) < 0) { - /* NOT_DONE: Handle error */ - DEBUG_ERROR(("TexImage2D: unable2\n")); - } - - for (i = 0; i < MIPMAP_LEVELS; i++) - t->TextureBaseAddr[i] = addrs[i] << 5; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj2D->TextureAddressMode); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj2D->TextureReadMode); - WRITE(gCCPriv->buf, TextureColorMode, - gCCPriv->curTexObj2D->TextureColorMode); - WRITE(gCCPriv->buf, TextureFormat, - gCCPriv->curTexObj2D->TextureFormat); - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - switch (level) { - case 0: - WRITE(gCCPriv->buf, TxBaseAddr0, - gCCPriv->curTexObj2D->TextureBaseAddr[0]); - break; - case 1: - WRITE(gCCPriv->buf, TxBaseAddr1, - gCCPriv->curTexObj2D->TextureBaseAddr[1]); - break; - case 2: - WRITE(gCCPriv->buf, TxBaseAddr2, - gCCPriv->curTexObj2D->TextureBaseAddr[2]); - break; - case 3: - WRITE(gCCPriv->buf, TxBaseAddr3, - gCCPriv->curTexObj2D->TextureBaseAddr[3]); - break; - case 4: - WRITE(gCCPriv->buf, TxBaseAddr4, - gCCPriv->curTexObj2D->TextureBaseAddr[4]); - break; - case 5: - WRITE(gCCPriv->buf, TxBaseAddr5, - gCCPriv->curTexObj2D->TextureBaseAddr[5]); - break; - case 6: - WRITE(gCCPriv->buf, TxBaseAddr6, - gCCPriv->curTexObj2D->TextureBaseAddr[6]); - break; - case 7: - WRITE(gCCPriv->buf, TxBaseAddr7, - gCCPriv->curTexObj2D->TextureBaseAddr[7]); - break; - case 8: - WRITE(gCCPriv->buf, TxBaseAddr8, - gCCPriv->curTexObj2D->TextureBaseAddr[8]); - break; - case 9: - WRITE(gCCPriv->buf, TxBaseAddr9, - gCCPriv->curTexObj2D->TextureBaseAddr[9]); - break; - case 10: - WRITE(gCCPriv->buf, TxBaseAddr10, - gCCPriv->curTexObj2D->TextureBaseAddr[10]); - break; - case 11: - WRITE(gCCPriv->buf, TxBaseAddr11, - gCCPriv->curTexObj2D->TextureBaseAddr[11]); - break; - } - } else { - /* ERROR !! */ - } -} - -void _gamma_TexParameterf(GLenum target, GLenum pname, GLfloat param) -{ - DEBUG_GLCMDS(("TexParameterf: %04x %04x %f\n", - (int)target, (int)pname, param)); - - if (target == GL_TEXTURE_1D) { - /* NOT_DONE */ - } else if (target == GL_TEXTURE_2D) { - switch (pname) { - case GL_TEXTURE_MAG_FILTER: - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_Mag_Mask; - switch ((int)param) { - case GL_NEAREST: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Mag_Nearest; - break; - case GL_LINEAR: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Mag_Linear; - break; - default: - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj2D->TextureReadMode); - break; - case GL_TEXTURE_MIN_FILTER: - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_Min_Mask; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_MipMapEnable; - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_LODEnable; - switch ((int)param) { - case GL_NEAREST: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_Nearest; - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_MipMapEnable; - gCCPriv->curTexObj2D->TextureAddressMode &= ~TAM_LODEnable; - break; - case GL_LINEAR: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_Linear; - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_MipMapEnable; - gCCPriv->curTexObj2D->TextureAddressMode &= ~TAM_LODEnable; - break; - case GL_NEAREST_MIPMAP_NEAREST: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_NearestMMNearest; - break; - case GL_LINEAR_MIPMAP_NEAREST: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_NearestMMLinear; - break; - case GL_NEAREST_MIPMAP_LINEAR: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_LinearMMNearest; - break; - case GL_LINEAR_MIPMAP_LINEAR: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_LinearMMLinear; - break; - default: - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj2D->TextureReadMode); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj2D->TextureAddressMode); - break; - case GL_TEXTURE_WRAP_S: - gCCPriv->curTexObj2D->TextureAddressMode &= ~TAM_SWrap_Mask; - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_UWrap_Mask; - switch ((int)param) { - case GL_CLAMP: - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_SWrap_Clamp; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_UWrap_Clamp; - break; - case GL_REPEAT: - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_SWrap_Repeat; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_UWrap_Repeat; - break; - default: - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj2D->TextureReadMode); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj2D->TextureAddressMode); - break; - case GL_TEXTURE_WRAP_T: - gCCPriv->curTexObj2D->TextureAddressMode &= ~TAM_TWrap_Mask; - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_VWrap_Mask; - switch ((int)param) { - case GL_CLAMP: - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_TWrap_Clamp; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_VWrap_Clamp; - break; - case GL_REPEAT: - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_TWrap_Repeat; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_VWrap_Repeat; - break; - default: - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj2D->TextureReadMode); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj2D->TextureAddressMode); - break; - default: - break; - } - } else { - /* ERROR !! */ - } -} - -void _gamma_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) -{ - DEBUG_GLCMDS(("TexParameterfv: %04x %04x %f\n", - (int)target, (int)pname, *params)); - - if (target == GL_TEXTURE_1D) { - /* NOT_DONE */ - } else if (target == GL_TEXTURE_2D) { - switch (pname) { - case GL_TEXTURE_MAG_FILTER: - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_Mag_Mask; - switch ((int)params[0]) { - case GL_NEAREST: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Mag_Nearest; - break; - case GL_LINEAR: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Mag_Linear; - break; - default: - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj2D->TextureReadMode); - break; - case GL_TEXTURE_MIN_FILTER: - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_Min_Mask; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_MipMapEnable; - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_LODEnable; - switch ((int)params[0]) { - case GL_NEAREST: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_Nearest; - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_MipMapEnable; - gCCPriv->curTexObj2D->TextureAddressMode &= ~TAM_LODEnable; - break; - case GL_LINEAR: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_Linear; - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_MipMapEnable; - gCCPriv->curTexObj2D->TextureAddressMode &= ~TAM_LODEnable; - break; - case GL_NEAREST_MIPMAP_NEAREST: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_NearestMMNearest; - break; - case GL_LINEAR_MIPMAP_NEAREST: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_NearestMMLinear; - break; - case GL_NEAREST_MIPMAP_LINEAR: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_LinearMMNearest; - break; - case GL_LINEAR_MIPMAP_LINEAR: - gCCPriv->curTexObj2D->TextureReadMode |= - TRM_Min_LinearMMLinear; - break; - default: - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj2D->TextureReadMode); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj2D->TextureAddressMode); - break; - case GL_TEXTURE_WRAP_S: - gCCPriv->curTexObj2D->TextureAddressMode &= ~TAM_SWrap_Mask; - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_UWrap_Mask; - switch ((int)params[0]) { - case GL_CLAMP: - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_SWrap_Clamp; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_UWrap_Clamp; - break; - case GL_REPEAT: - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_SWrap_Repeat; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_UWrap_Repeat; - break; - default: - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj2D->TextureReadMode); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj2D->TextureAddressMode); - break; - case GL_TEXTURE_WRAP_T: - gCCPriv->curTexObj2D->TextureAddressMode &= ~TAM_TWrap_Mask; - gCCPriv->curTexObj2D->TextureReadMode &= ~TRM_VWrap_Mask; - switch ((int)params[0]) { - case GL_CLAMP: - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_TWrap_Clamp; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_VWrap_Clamp; - break; - case GL_REPEAT: - gCCPriv->curTexObj2D->TextureAddressMode |= TAM_TWrap_Repeat; - gCCPriv->curTexObj2D->TextureReadMode |= TRM_VWrap_Repeat; - break; - default: - break; - } - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, TextureReadMode, - gCCPriv->curTexObj2D->TextureReadMode); - WRITE(gCCPriv->buf, TextureAddressMode, - gCCPriv->curTexObj2D->TextureAddressMode); - break; - default: - break; - } - } else { - /* ERROR !! */ - } -} - -void _gamma_TexParameteri(GLenum target, GLenum pname, GLint param) -{ - DEBUG_GLCMDS(("TexParameteri: %04x %04x %d\n", - (int)target, (int)pname, (int)param)); -} - -void _gamma_TexParameteriv(GLenum target, GLenum pname, const GLint *params) -{ - DEBUG_GLCMDS(("TexParameteriv: %04x %04x %d\n", - (int)target, (int)pname, (int)*params)); -} - -void _gamma_TexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *image) -{ - DEBUG_GLCMDS(("TexSubImage1D: %04x %d %d %d %04x %04x\n", - (int)target, (int)level, - (int)xoffset, (int)width, (int)format, (int)type)); -} - -void _gamma_TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) -{ - DEBUG_GLCMDS(("TexSubImage2D: %04x %d %d %d %d %d %04x %04x\n", - (int)target, (int)level, - (int)xoffset, (int)yoffset, (int)width, (int)height, - (int)format, (int)type)); - - if (target == GL_TEXTURE_1D) { - /* NOT_DONE */ - } else if (target == GL_TEXTURE_2D) { - /* NOT_DONE: The follow are not currently supported... */ - if (format != GL_RGBA || type != GL_UNSIGNED_BYTE) { - return; - } - - if (width > 2048 || height > 2048) return; /* ERROR !! */ - if (level < 0 || level > 11) return; /* ERROR !! */ - - /* - ** NOT_DONE: This should convert the image into the internal - ** format for the image that it is replacing. - */ - - if (driTMMSubImage(gCCPriv->tmm, gCCPriv->curTexObj2D->image[level], - xoffset, yoffset, width, height, image) < 0) { - /* NOT_DONE: Handle error */ - } - } else { - /* ERROR !! */ - } -} - -void _gamma_Translated(GLdouble x, GLdouble y, GLdouble z) -{ - GLfloat m[16]; - int i; - - DEBUG_GLCMDS(("Translated: %f %f %f\n", x, y, z)); - - for (i = 0; i < 16; i++) - if (i % 5 == 0) - m[i] = 1.0; - else - m[i] = 0.0; - - m[12] = x; - m[13] = y; - m[14] = z; - - gammaMultMatrix(m); - gammaLoadHWMatrix(); -} - -void _gamma_Translatef(GLfloat x, GLfloat y, GLfloat z) -{ - GLfloat m[16]; - int i; - - DEBUG_GLCMDS(("Translatef: %f %f %f\n", x, y, z)); - - for (i = 0; i < 16; i++) - if (i % 5 == 0) - m[i] = 1.0; - else - m[i] = 0.0; - - m[12] = x; - m[13] = y; - m[14] = z; - - gammaMultMatrix(m); - gammaLoadHWMatrix(); -} - -void _gamma_Vertex2d(GLdouble x, GLdouble y) -{ - DEBUG_GLCMDS(("Vertex2d: %f %f\n", x, y)); - - _gamma_Vertex2f((GLfloat)x,(GLfloat)y); -} - -void _gamma_Vertex2dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("Vertex2dv: %f %f\n", v[0], v[1])); - - _gamma_Vertex2f((GLfloat)v[0],(GLfloat)v[1]); -} - -void _gamma_Vertex2f(GLfloat x, GLfloat y) -{ - DEBUG_GLCMDS(("Vertex2f: %f %f\n", x, y)); - - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITEF(gCCPriv->buf, Vy, y); - WRITEF(gCCPriv->buf, Vx2, x); -} - -void _gamma_Vertex2fv(const GLfloat *v) -{ - DEBUG_GLCMDS(("Vertex2fv: %f %f\n", v[0], v[1])); - - _gamma_Vertex2f(v[0],v[1]); -} - -void _gamma_Vertex2i(GLint x, GLint y) -{ - DEBUG_GLCMDS(("Vertex2i: %d %d\n", (int)x, (int)y)); - - _gamma_Vertex2f((GLfloat)x,(GLfloat)y); -} - -void _gamma_Vertex2iv(const GLint *v) -{ - DEBUG_GLCMDS(("Vertex2iv: %d %d\n", (int)v[0], (int)v[1])); - - _gamma_Vertex2f((GLfloat)v[0],(GLfloat)v[1]); -} - -void _gamma_Vertex2s(GLshort x, GLshort y) -{ - DEBUG_GLCMDS(("Vertex2s: %d %d\n", x, y)); - - _gamma_Vertex2f((GLfloat)x,(GLfloat)y); -} - -void _gamma_Vertex2sv(const GLshort *v) -{ - DEBUG_GLCMDS(("Vertex2sv: %d %d\n", v[0], v[1])); - - _gamma_Vertex2f((GLfloat)v[0],(GLfloat)v[1]); -} - -void _gamma_Vertex3d(GLdouble x, GLdouble y, GLdouble z) -{ - DEBUG_GLCMDS(("Vertex3d: %f %f %f\n", x, y, z)); - - _gamma_Vertex3f((GLfloat)x,(GLfloat)y,(GLfloat)z); -} - -void _gamma_Vertex3dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("Vertex2fv: %f %f %f\n", v[0], v[1], v[2])); - - _gamma_Vertex3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Vertex3f(GLfloat x, GLfloat y, GLfloat z) -{ - DEBUG_GLCMDS(("Vertex3f: %f %f %f\n", x, y, z)); - - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITEF(gCCPriv->buf, Vz, z); - WRITEF(gCCPriv->buf, Vy, y); - WRITEF(gCCPriv->buf, Vx3, x); -} - -void _gamma_Vertex3fv(const GLfloat *v) -{ - DEBUG_GLCMDS(("Vertex3fv: %f %f %f\n", v[0], v[1], v[2])); - - _gamma_Vertex3f(v[0],v[1],v[2]); -} - -void _gamma_Vertex3i(GLint x, GLint y, GLint z) -{ - DEBUG_GLCMDS(("Vertex3i: %d %d %d\n", (int)x, (int)y, (int)z)); - - _gamma_Vertex3f((GLfloat)x,(GLfloat)y,(GLfloat)z); -} - -void _gamma_Vertex3iv(const GLint *v) -{ - 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]); -} - -void _gamma_Vertex3s(GLshort x, GLshort y, GLshort z) -{ - DEBUG_GLCMDS(("Vertex3s: %d %d %d\n", x, y, z)); - - _gamma_Vertex3f((GLfloat)x,(GLfloat)y,(GLfloat)z); -} - -void _gamma_Vertex3sv(const GLshort *v) -{ - DEBUG_GLCMDS(("Vertex3sv: %d %d %d\n", v[0], v[1], v[2])); - - _gamma_Vertex3f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2]); -} - -void _gamma_Vertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - DEBUG_GLCMDS(("Vertex4d: %f %f %f %f\n", x, y, z, w)); - - _gamma_Vertex4f((GLfloat)x,(GLfloat)y,(GLfloat)z,(GLfloat)w); -} - -void _gamma_Vertex4dv(const GLdouble *v) -{ - DEBUG_GLCMDS(("Vertex4dv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); - - _gamma_Vertex4f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2],(GLfloat)v[3]); -} - -void _gamma_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - DEBUG_GLCMDS(("Vertex4f: %f %f %f %f\n", x, y, z, w)); - - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - WRITEF(gCCPriv->buf, Vw, w); - WRITEF(gCCPriv->buf, Vz, z); - WRITEF(gCCPriv->buf, Vy, y); - WRITEF(gCCPriv->buf, Vx4, x); -} - -void _gamma_Vertex4fv(const GLfloat *v) -{ - DEBUG_GLCMDS(("Vertex4fv: %f %f %f %f\n", v[0], v[1], v[2], v[3])); - - _gamma_Vertex4f(v[0],v[1],v[2],v[3]); -} - -void _gamma_Vertex4i(GLint x, GLint y, GLint z, GLint w) -{ - 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); -} - -void _gamma_Vertex4iv(const GLint *v) -{ - DEBUG_GLCMDS(("Vertex4iv: %d %d %d %d\n", - (int)v[0], (int)v[1], (int)v[2], (int)v[3])); - - _gamma_Vertex4f((GLfloat)v[0],(GLfloat)v[1],(GLfloat)v[2],(GLfloat)v[3]); -} - -void _gamma_Vertex4s(GLshort x, GLshort y, GLshort z, GLshort w) -{ - DEBUG_GLCMDS(("Vertex4s: %d %d %d %d\n", x, y, z, w)); - - _gamma_Vertex4f((GLfloat)x,(GLfloat)y,(GLfloat)z,(GLfloat)w); -} - -void _gamma_Vertex4sv(const GLshort *v) -{ - 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]); -} - -void _gamma_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - 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) -{ - GLfloat sx, sy, ox, oy; - - DEBUG_GLCMDS(("Viewport: %d %d %d %d\n", - (int)x, (int)y, (int)width, (int)height)); - - gCCPriv->x = gCC->driDrawablePriv->x + x; - gCCPriv->y = gCC->driScreenPriv->fbHeight - - (gCC->driDrawablePriv->y + - gCC->driDrawablePriv->h) + y; - gCCPriv->w = width; - gCCPriv->h = height; - - x = gCCPriv->x; - y = gCCPriv->y; - - sx = width/2.0f; - sy = height/2.0f; - ox = x + sx; - oy = y + sy; - - CHECK_DMA_BUFFER(gCC, gCCPriv, 4); - 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 -} - - -static GLint -generic_noop(void) -{ - DEBUG_GLCMDS(("OOPS GENERIC NOOP CALLED\n")); - - return 0; -} - - -static void -init_no_op_table(struct _glapi_table *table) -{ - /* Check to be sure the dispatcher's table is at least as big as Mesa's. */ - const GLuint size = sizeof(struct _glapi_table) / sizeof(void *); - assert(_glapi_get_dispatch_table_size() >= size); - - { - const GLuint n = _glapi_get_dispatch_table_size(); - GLuint i; - void **dispatch = (void **) table; - for (i = 0; i < n; i++) { - dispatch[i] = (void *) generic_noop; - } - } -} - - -void -_gamma_init_exec(struct _glapi_table *dispatch) -{ - init_no_op_table(dispatch); - - /* 1.0 */ - dispatch->Accum = _gamma_Accum; - dispatch->AlphaFunc = _gamma_AlphaFunc; - dispatch->Begin = _gamma_Begin; - dispatch->Bitmap = _gamma_Bitmap; - dispatch->BlendFunc = _gamma_BlendFunc; - dispatch->CallList = _gamma_CallList; - dispatch->CallLists = _gamma_CallLists; - dispatch->Clear = _gamma_Clear; - dispatch->ClearAccum = _gamma_ClearAccum; - dispatch->ClearColor = _gamma_ClearColor; - dispatch->ClearDepth = _gamma_ClearDepth; - dispatch->ClearIndex = _gamma_ClearIndex; - dispatch->ClearStencil = _gamma_ClearStencil; - dispatch->ClipPlane = _gamma_ClipPlane; - dispatch->Color3b = _gamma_Color3b; - dispatch->Color3bv = _gamma_Color3bv; - dispatch->Color3d = _gamma_Color3d; - dispatch->Color3dv = _gamma_Color3dv; - dispatch->Color3f = _gamma_Color3f; - dispatch->Color3fv = _gamma_Color3fv; - dispatch->Color3i = _gamma_Color3i; - dispatch->Color3iv = _gamma_Color3iv; - dispatch->Color3s = _gamma_Color3s; - dispatch->Color3sv = _gamma_Color3sv; - dispatch->Color3ub = _gamma_Color3ub; - dispatch->Color3ubv = _gamma_Color3ubv; - dispatch->Color3ui = _gamma_Color3ui; - dispatch->Color3uiv = _gamma_Color3uiv; - dispatch->Color3us = _gamma_Color3us; - dispatch->Color3usv = _gamma_Color3usv; - dispatch->Color4b = _gamma_Color4b; - dispatch->Color4bv = _gamma_Color4bv; - dispatch->Color4d = _gamma_Color4d; - dispatch->Color4dv = _gamma_Color4dv; - dispatch->Color4f = _gamma_Color4f; - dispatch->Color4fv = _gamma_Color4fv; - dispatch->Color4i = _gamma_Color4i; - dispatch->Color4iv = _gamma_Color4iv; - dispatch->Color4s = _gamma_Color4s; - dispatch->Color4sv = _gamma_Color4sv; - dispatch->Color4ub = _gamma_Color4ub; - dispatch->Color4ubv = _gamma_Color4ubv; - dispatch->Color4ui = _gamma_Color4ui; - dispatch->Color4uiv = _gamma_Color4uiv; - dispatch->Color4us = _gamma_Color4us; - dispatch->Color4usv = _gamma_Color4usv; - dispatch->ColorMask = _gamma_ColorMask; - dispatch->ColorMaterial = _gamma_ColorMaterial; - dispatch->CopyPixels = _gamma_CopyPixels; - dispatch->CullFace = _gamma_CullFace; - dispatch->DeleteLists = _gamma_DeleteLists; - dispatch->DepthFunc = _gamma_DepthFunc; - dispatch->DepthMask = _gamma_DepthMask; - dispatch->DepthRange = _gamma_DepthRange; - dispatch->Disable = _gamma_Disable; - dispatch->DrawBuffer = _gamma_DrawBuffer; - dispatch->DrawPixels = _gamma_DrawPixels; - dispatch->EdgeFlag = _gamma_EdgeFlag; - dispatch->EdgeFlagv = _gamma_EdgeFlagv; - dispatch->Enable = _gamma_Enable; - dispatch->End = _gamma_End; - dispatch->EndList = _gamma_EndList; - dispatch->EvalCoord1d = _gamma_EvalCoord1d; - dispatch->EvalCoord1dv = _gamma_EvalCoord1dv; - dispatch->EvalCoord1f = _gamma_EvalCoord1f; - dispatch->EvalCoord1fv = _gamma_EvalCoord1fv; - dispatch->EvalCoord2d = _gamma_EvalCoord2d; - dispatch->EvalCoord2dv = _gamma_EvalCoord2dv; - dispatch->EvalCoord2f = _gamma_EvalCoord2f; - dispatch->EvalCoord2fv = _gamma_EvalCoord2fv; - dispatch->EvalMesh1 = _gamma_EvalMesh1; - dispatch->EvalMesh2 = _gamma_EvalMesh2; - dispatch->EvalPoint1 = _gamma_EvalPoint1; - dispatch->EvalPoint2 = _gamma_EvalPoint2; - dispatch->FeedbackBuffer = _gamma_FeedbackBuffer; - dispatch->Finish = _gamma_Finish; - dispatch->Flush = _gamma_Flush; - dispatch->Fogf = _gamma_Fogf; - dispatch->Fogfv = _gamma_Fogfv; - dispatch->Fogi = _gamma_Fogi; - dispatch->Fogiv = _gamma_Fogiv; - dispatch->FrontFace = _gamma_FrontFace; - dispatch->Frustum = _gamma_Frustum; - dispatch->GenLists = _gamma_GenLists; - dispatch->GetBooleanv = _gamma_GetBooleanv; - dispatch->GetClipPlane = _gamma_GetClipPlane; - dispatch->GetDoublev = _gamma_GetDoublev; - dispatch->GetError = _gamma_GetError; - dispatch->GetFloatv = _gamma_GetFloatv; - dispatch->GetIntegerv = _gamma_GetIntegerv; - dispatch->GetLightfv = _gamma_GetLightfv; - dispatch->GetLightiv = _gamma_GetLightiv; - dispatch->GetMapdv = _gamma_GetMapdv; - dispatch->GetMapfv = _gamma_GetMapfv; - dispatch->GetMapiv = _gamma_GetMapiv; - dispatch->GetMaterialfv = _gamma_GetMaterialfv; - dispatch->GetMaterialiv = _gamma_GetMaterialiv; - dispatch->GetPixelMapfv = _gamma_GetPixelMapfv; - dispatch->GetPixelMapuiv = _gamma_GetPixelMapuiv; - dispatch->GetPixelMapusv = _gamma_GetPixelMapusv; - dispatch->GetPolygonStipple = _gamma_GetPolygonStipple; - dispatch->GetString = _gamma_GetString; - dispatch->GetTexEnvfv = _gamma_GetTexEnvfv; - dispatch->GetTexEnviv = _gamma_GetTexEnviv; - dispatch->GetTexGendv = _gamma_GetTexGendv; - dispatch->GetTexGenfv = _gamma_GetTexGenfv; - dispatch->GetTexGeniv = _gamma_GetTexGeniv; - dispatch->GetTexImage = _gamma_GetTexImage; - dispatch->GetTexLevelParameterfv = _gamma_GetTexLevelParameterfv; - dispatch->GetTexLevelParameteriv = _gamma_GetTexLevelParameteriv; - dispatch->GetTexParameterfv = _gamma_GetTexParameterfv; - dispatch->GetTexParameteriv = _gamma_GetTexParameteriv; - dispatch->Hint = _gamma_Hint; - dispatch->IndexMask = _gamma_IndexMask; - dispatch->Indexd = _gamma_Indexd; - dispatch->Indexdv = _gamma_Indexdv; - dispatch->Indexf = _gamma_Indexf; - dispatch->Indexfv = _gamma_Indexfv; - dispatch->Indexi = _gamma_Indexi; - dispatch->Indexiv = _gamma_Indexiv; - dispatch->Indexs = _gamma_Indexs; - dispatch->Indexsv = _gamma_Indexsv; - dispatch->InitNames = _gamma_InitNames; - dispatch->IsEnabled = _gamma_IsEnabled; - dispatch->IsList = _gamma_IsList; - dispatch->LightModelf = _gamma_LightModelf; - dispatch->LightModelfv = _gamma_LightModelfv; - dispatch->LightModeli = _gamma_LightModeli; - dispatch->LightModeliv = _gamma_LightModeliv; - dispatch->Lightf = _gamma_Lightf; - dispatch->Lightfv = _gamma_Lightfv; - dispatch->Lighti = _gamma_Lighti; - dispatch->Lightiv = _gamma_Lightiv; - dispatch->LineStipple = _gamma_LineStipple; - dispatch->LineWidth = _gamma_LineWidth; - dispatch->ListBase = _gamma_ListBase; - dispatch->LoadIdentity = _gamma_LoadIdentity; - dispatch->LoadMatrixd = _gamma_LoadMatrixd; - dispatch->LoadMatrixf = _gamma_LoadMatrixf; - dispatch->LoadName = _gamma_LoadName; - dispatch->LogicOp = _gamma_LogicOp; - dispatch->Map1d = _gamma_Map1d; - dispatch->Map1f = _gamma_Map1f; - dispatch->Map2d = _gamma_Map2d; - dispatch->Map2f = _gamma_Map2f; - dispatch->MapGrid1d = _gamma_MapGrid1d; - dispatch->MapGrid1f = _gamma_MapGrid1f; - dispatch->MapGrid2d = _gamma_MapGrid2d; - dispatch->MapGrid2f = _gamma_MapGrid2f; - dispatch->Materialf = _gamma_Materialf; - dispatch->Materialfv = _gamma_Materialfv; - dispatch->Materiali = _gamma_Materiali; - dispatch->Materialiv = _gamma_Materialiv; - dispatch->MatrixMode = _gamma_MatrixMode; - dispatch->MultMatrixd = _gamma_MultMatrixd; - dispatch->MultMatrixf = _gamma_MultMatrixf; - dispatch->NewList = _gamma_NewList; - dispatch->Normal3b = _gamma_Normal3b; - dispatch->Normal3bv = _gamma_Normal3bv; - dispatch->Normal3d = _gamma_Normal3d; - dispatch->Normal3dv = _gamma_Normal3dv; - dispatch->Normal3f = _gamma_Normal3f; - dispatch->Normal3fv = _gamma_Normal3fv; - dispatch->Normal3i = _gamma_Normal3i; - dispatch->Normal3iv = _gamma_Normal3iv; - dispatch->Normal3s = _gamma_Normal3s; - dispatch->Normal3sv = _gamma_Normal3sv; - dispatch->Ortho = _gamma_Ortho; - dispatch->PassThrough = _gamma_PassThrough; - dispatch->PixelMapfv = _gamma_PixelMapfv; - dispatch->PixelMapuiv = _gamma_PixelMapuiv; - dispatch->PixelMapusv = _gamma_PixelMapusv; - dispatch->PixelStoref = _gamma_PixelStoref; - dispatch->PixelStorei = _gamma_PixelStorei; - dispatch->PixelTransferf = _gamma_PixelTransferf; - dispatch->PixelTransferi = _gamma_PixelTransferi; - dispatch->PixelZoom = _gamma_PixelZoom; - dispatch->PointSize = _gamma_PointSize; - dispatch->PolygonMode = _gamma_PolygonMode; - dispatch->PolygonOffset = _gamma_PolygonOffset; - dispatch->PolygonStipple = _gamma_PolygonStipple; - dispatch->PopAttrib = _gamma_PopAttrib; - dispatch->PopMatrix = _gamma_PopMatrix; - dispatch->PopName = _gamma_PopName; - dispatch->PushAttrib = _gamma_PushAttrib; - dispatch->PushMatrix = _gamma_PushMatrix; - dispatch->PushName = _gamma_PushName; - dispatch->RasterPos2d = _gamma_RasterPos2d; - dispatch->RasterPos2dv = _gamma_RasterPos2dv; - dispatch->RasterPos2f = _gamma_RasterPos2f; - dispatch->RasterPos2fv = _gamma_RasterPos2fv; - dispatch->RasterPos2i = _gamma_RasterPos2i; - dispatch->RasterPos2iv = _gamma_RasterPos2iv; - dispatch->RasterPos2s = _gamma_RasterPos2s; - dispatch->RasterPos2sv = _gamma_RasterPos2sv; - dispatch->RasterPos3d = _gamma_RasterPos3d; - dispatch->RasterPos3dv = _gamma_RasterPos3dv; - dispatch->RasterPos3f = _gamma_RasterPos3f; - dispatch->RasterPos3fv = _gamma_RasterPos3fv; - dispatch->RasterPos3i = _gamma_RasterPos3i; - dispatch->RasterPos3iv = _gamma_RasterPos3iv; - dispatch->RasterPos3s = _gamma_RasterPos3s; - dispatch->RasterPos3sv = _gamma_RasterPos3sv; - dispatch->RasterPos4d = _gamma_RasterPos4d; - dispatch->RasterPos4dv = _gamma_RasterPos4dv; - dispatch->RasterPos4f = _gamma_RasterPos4f; - dispatch->RasterPos4fv = _gamma_RasterPos4fv; - dispatch->RasterPos4i = _gamma_RasterPos4i; - dispatch->RasterPos4iv = _gamma_RasterPos4iv; - dispatch->RasterPos4s = _gamma_RasterPos4s; - dispatch->RasterPos4sv = _gamma_RasterPos4sv; - dispatch->ReadBuffer = _gamma_ReadBuffer; - dispatch->ReadPixels = _gamma_ReadPixels; - dispatch->Rectd = _gamma_Rectd; - dispatch->Rectdv = _gamma_Rectdv; - dispatch->Rectf = _gamma_Rectf; - dispatch->Rectfv = _gamma_Rectfv; - dispatch->Recti = _gamma_Recti; - dispatch->Rectiv = _gamma_Rectiv; - dispatch->Rects = _gamma_Rects; - dispatch->Rectsv = _gamma_Rectsv; - dispatch->RenderMode = _gamma_RenderMode; - dispatch->Rotated = _gamma_Rotated; - dispatch->Rotatef = _gamma_Rotatef; - dispatch->Scaled = _gamma_Scaled; - dispatch->Scalef = _gamma_Scalef; - dispatch->Scissor = _gamma_Scissor; - dispatch->SelectBuffer = _gamma_SelectBuffer; - dispatch->ShadeModel = _gamma_ShadeModel; - dispatch->StencilFunc = _gamma_StencilFunc; - dispatch->StencilMask = _gamma_StencilMask; - dispatch->StencilOp = _gamma_StencilOp; - dispatch->TexCoord1d = _gamma_TexCoord1d; - dispatch->TexCoord1dv = _gamma_TexCoord1dv; - dispatch->TexCoord1f = _gamma_TexCoord1f; - dispatch->TexCoord1fv = _gamma_TexCoord1fv; - dispatch->TexCoord1i = _gamma_TexCoord1i; - dispatch->TexCoord1iv = _gamma_TexCoord1iv; - dispatch->TexCoord1s = _gamma_TexCoord1s; - dispatch->TexCoord1sv = _gamma_TexCoord1sv; - dispatch->TexCoord2d = _gamma_TexCoord2d; - dispatch->TexCoord2dv = _gamma_TexCoord2dv; - dispatch->TexCoord2f = _gamma_TexCoord2f; - dispatch->TexCoord2fv = _gamma_TexCoord2fv; - dispatch->TexCoord2i = _gamma_TexCoord2i; - dispatch->TexCoord2iv = _gamma_TexCoord2iv; - dispatch->TexCoord2s = _gamma_TexCoord2s; - dispatch->TexCoord2sv = _gamma_TexCoord2sv; - dispatch->TexCoord3d = _gamma_TexCoord3d; - dispatch->TexCoord3dv = _gamma_TexCoord3dv; - dispatch->TexCoord3f = _gamma_TexCoord3f; - dispatch->TexCoord3fv = _gamma_TexCoord3fv; - dispatch->TexCoord3i = _gamma_TexCoord3i; - dispatch->TexCoord3iv = _gamma_TexCoord3iv; - dispatch->TexCoord3s = _gamma_TexCoord3s; - dispatch->TexCoord3sv = _gamma_TexCoord3sv; - dispatch->TexCoord4d = _gamma_TexCoord4d; - dispatch->TexCoord4dv = _gamma_TexCoord4dv; - dispatch->TexCoord4f = _gamma_TexCoord4f; - dispatch->TexCoord4fv = _gamma_TexCoord4fv; - dispatch->TexCoord4i = _gamma_TexCoord4i; - dispatch->TexCoord4iv = _gamma_TexCoord4iv; - dispatch->TexCoord4s = _gamma_TexCoord4s; - dispatch->TexCoord4sv = _gamma_TexCoord4sv; - dispatch->TexEnvf = _gamma_TexEnvf; - dispatch->TexEnvfv = _gamma_TexEnvfv; - dispatch->TexEnvi = _gamma_TexEnvi; - dispatch->TexEnviv = _gamma_TexEnviv; - dispatch->TexGend = _gamma_TexGend; - dispatch->TexGendv = _gamma_TexGendv; - dispatch->TexGenf = _gamma_TexGenf; - dispatch->TexGenfv = _gamma_TexGenfv; - dispatch->TexGeni = _gamma_TexGeni; - dispatch->TexGeniv = _gamma_TexGeniv; - dispatch->TexImage1D = _gamma_TexImage1D; - dispatch->TexImage2D = _gamma_TexImage2D; - dispatch->TexParameterf = _gamma_TexParameterf; - dispatch->TexParameterfv = _gamma_TexParameterfv; - dispatch->TexParameteri = _gamma_TexParameteri; - dispatch->TexParameteriv = _gamma_TexParameteriv; - dispatch->Translated = _gamma_Translated; - dispatch->Translatef = _gamma_Translatef; - dispatch->Vertex2d = _gamma_Vertex2d; - dispatch->Vertex2dv = _gamma_Vertex2dv; - dispatch->Vertex2f = _gamma_Vertex2f; - dispatch->Vertex2fv = _gamma_Vertex2fv; - dispatch->Vertex2i = _gamma_Vertex2i; - dispatch->Vertex2iv = _gamma_Vertex2iv; - dispatch->Vertex2s = _gamma_Vertex2s; - dispatch->Vertex2sv = _gamma_Vertex2sv; - dispatch->Vertex3d = _gamma_Vertex3d; - dispatch->Vertex3dv = _gamma_Vertex3dv; - dispatch->Vertex3f = _gamma_Vertex3f; - dispatch->Vertex3fv = _gamma_Vertex3fv; - dispatch->Vertex3i = _gamma_Vertex3i; - dispatch->Vertex3iv = _gamma_Vertex3iv; - dispatch->Vertex3s = _gamma_Vertex3s; - dispatch->Vertex3sv = _gamma_Vertex3sv; - dispatch->Vertex4d = _gamma_Vertex4d; - dispatch->Vertex4dv = _gamma_Vertex4dv; - dispatch->Vertex4f = _gamma_Vertex4f; - dispatch->Vertex4fv = _gamma_Vertex4fv; - dispatch->Vertex4i = _gamma_Vertex4i; - dispatch->Vertex4iv = _gamma_Vertex4iv; - dispatch->Vertex4s = _gamma_Vertex4s; - dispatch->Vertex4sv = _gamma_Vertex4sv; - dispatch->Viewport = _gamma_Viewport; - - /* 1.1 */ - dispatch->AreTexturesResident = _gamma_AreTexturesResident; - dispatch->ArrayElement = gl_save_ArrayElement; /*_gamma_ArrayElement;*/ - dispatch->BindTexture = _gamma_BindTexture; - dispatch->ColorPointer = _gamma_ColorPointer; - dispatch->CopyTexImage1D = _gamma_CopyTexImage1D; - dispatch->CopyTexImage2D = _gamma_CopyTexImage2D; - dispatch->CopyTexSubImage1D = _gamma_CopyTexSubImage1D; - dispatch->CopyTexSubImage2D = _gamma_CopyTexSubImage2D; - dispatch->DeleteTextures = _gamma_DeleteTextures; - dispatch->DisableClientState = _gamma_DisableClientState; - dispatch->DrawArrays = _gamma_DrawArrays; - dispatch->DrawElements = _gamma_DrawElements; - dispatch->EdgeFlagPointer = _gamma_EdgeFlagPointer; - dispatch->EnableClientState = _gamma_EnableClientState; - dispatch->GenTextures = _gamma_GenTextures; - dispatch->GetPointerv = _gamma_GetPointerv; - dispatch->IndexPointer = _gamma_IndexPointer; - dispatch->Indexub = _gamma_Indexub; - dispatch->Indexubv = _gamma_Indexubv; - dispatch->InterleavedArrays = _gamma_InterleavedArrays; - dispatch->IsTexture = _gamma_IsTexture; - dispatch->NormalPointer = _gamma_NormalPointer; - dispatch->PopClientAttrib = _gamma_PopClientAttrib; - dispatch->PrioritizeTextures = _gamma_PrioritizeTextures; - dispatch->PushClientAttrib = _gamma_PushClientAttrib; - dispatch->TexCoordPointer = _gamma_TexCoordPointer; - dispatch->TexSubImage1D = _gamma_TexSubImage1D; - dispatch->TexSubImage2D = _gamma_TexSubImage2D; - 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.5 xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h:removed --- xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h:1.5 Wed Feb 7 08:26:16 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_gl.h Thu Feb 27 12:26:22 2003 @@ -1,384 +0,0 @@ -/* $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. -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: - * Kevin E. Martin - * Brian Paul - */ - -#ifndef _GAMMA_GL_H_ -#define _GAMMA_GL_H_ - -#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); -extern void _gamma_ArrayElement(GLint i); -extern void _gamma_Begin(GLenum mode); -extern void _gamma_BindTexture(GLenum target, GLuint texture); -extern void _gamma_Bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); -extern void _gamma_BlendFunc(GLenum sfactor, GLenum dfactor); -extern void _gamma_CallList(GLuint list); -extern void _gamma_CallLists(GLsizei n, GLenum type, const GLvoid *lists); -extern void _gamma_Clear(GLbitfield mask); -extern void _gamma_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -extern void _gamma_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -extern void _gamma_ClearDepth(GLclampd depth); -extern void _gamma_ClearIndex(GLfloat c); -extern void _gamma_ClearStencil(GLint s); -extern void _gamma_ClipPlane(GLenum plane, const GLdouble *equation); -extern void _gamma_Color3b(GLbyte red, GLbyte green, GLbyte blue); -extern void _gamma_Color3bv(const GLbyte *v); -extern void _gamma_Color3d(GLdouble red, GLdouble green, GLdouble blue); -extern void _gamma_Color3dv(const GLdouble *v); -extern void _gamma_Color3f(GLfloat red, GLfloat green, GLfloat blue); -extern void _gamma_Color3fv(const GLfloat *v); -extern void _gamma_Color3i(GLint red, GLint green, GLint blue); -extern void _gamma_Color3iv(const GLint *v); -extern void _gamma_Color3s(GLshort red, GLshort green, GLshort blue); -extern void _gamma_Color3sv(const GLshort *v); -extern void _gamma_Color3ub(GLubyte red, GLubyte green, GLubyte blue); -extern void _gamma_Color3ubv(const GLubyte *v); -extern void _gamma_Color3ui(GLuint red, GLuint green, GLuint blue); -extern void _gamma_Color3uiv(const GLuint *v); -extern void _gamma_Color3us(GLushort red, GLushort green, GLushort blue); -extern void _gamma_Color3usv(const GLushort *v); -extern void _gamma_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -extern void _gamma_Color4bv(const GLbyte *v); -extern void _gamma_Color4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -extern void _gamma_Color4dv(const GLdouble *v); -extern void _gamma_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -extern void _gamma_Color4fv(const GLfloat *v); -extern void _gamma_Color4i(GLint red, GLint green, GLint blue, GLint alpha); -extern void _gamma_Color4iv(const GLint *v); -extern void _gamma_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha); -extern void _gamma_Color4sv(const GLshort *v); -extern void _gamma_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -extern void _gamma_Color4ubv(const GLubyte *v); -extern void _gamma_Color4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha); -extern void _gamma_Color4uiv(const GLuint *v); -extern void _gamma_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha); -extern void _gamma_Color4usv(const GLushort *v); -extern void _gamma_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -extern void _gamma_ColorMaterial(GLenum face, GLenum mode); -extern void _gamma_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -extern void _gamma_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -extern void _gamma_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -extern void _gamma_CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -extern void _gamma_CopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -extern void _gamma_CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -extern void _gamma_CullFace(GLenum mode); -extern void _gamma_DeleteLists(GLuint list, GLsizei range); -extern void _gamma_DeleteTextures(GLsizei n, const GLuint *textures); -extern void _gamma_DepthFunc(GLenum func); -extern void _gamma_DepthMask(GLboolean flag); -extern void _gamma_DepthRange(GLclampd zNear, GLclampd zFar); -extern void _gamma_Disable(GLenum cap); -extern void _gamma_DisableClientState(GLenum array); -extern void _gamma_DrawArrays(GLenum mode, GLint first, GLsizei count); -extern void _gamma_DrawBuffer(GLenum mode); -extern void _gamma_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -extern void _gamma_DrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -extern void _gamma_EdgeFlag(GLboolean flag); -extern void _gamma_EdgeFlagPointer(GLsizei stride, const GLvoid *pointer); -extern void _gamma_EdgeFlagv(const GLboolean *flag); -extern void _gamma_Enable(GLenum cap); -extern void _gamma_EnableClientState(GLenum array); -extern void _gamma_End(void); -extern void _gamma_EndList(void); -extern void _gamma_EvalCoord1d(GLdouble u); -extern void _gamma_EvalCoord1dv(const GLdouble *u); -extern void _gamma_EvalCoord1f(GLfloat u); -extern void _gamma_EvalCoord1fv(const GLfloat *u); -extern void _gamma_EvalCoord2d(GLdouble u, GLdouble v); -extern void _gamma_EvalCoord2dv(const GLdouble *u); -extern void _gamma_EvalCoord2f(GLfloat u, GLfloat v); -extern void _gamma_EvalCoord2fv(const GLfloat *u); -extern void _gamma_EvalMesh1(GLenum mode, GLint i1, GLint i2); -extern void _gamma_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -extern void _gamma_EvalPoint1(GLint i); -extern void _gamma_EvalPoint2(GLint i, GLint j); -extern void _gamma_FeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer); -extern void _gamma_Finish(void); -extern void _gamma_Flush(void); -extern void _gamma_Fogf(GLenum pname, GLfloat param); -extern void _gamma_Fogfv(GLenum pname, const GLfloat *params); -extern void _gamma_Fogi(GLenum pname, GLint param); -extern void _gamma_Fogiv(GLenum pname, const GLint *params); -extern void _gamma_FrontFace(GLenum mode); -extern void _gamma_Frustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -extern GLuint _gamma_GenLists(GLsizei range); -extern void _gamma_GenTextures(GLsizei n, GLuint *textures); -extern void _gamma_GetBooleanv(GLenum val, GLboolean *b); -extern void _gamma_GetClipPlane(GLenum plane, GLdouble *equation); -extern void _gamma_GetDoublev(GLenum val, GLdouble *d); -extern GLenum _gamma_GetError(void); -extern void _gamma_GetFloatv(GLenum val, GLfloat *f); -extern void _gamma_GetIntegerv(GLenum val, GLint *i); -extern void _gamma_GetLightfv(GLenum light, GLenum pname, GLfloat *params); -extern void _gamma_GetLightiv(GLenum light, GLenum pname, GLint *params); -extern void _gamma_GetMapdv(GLenum target, GLenum query, GLdouble *v); -extern void _gamma_GetMapfv(GLenum target, GLenum query, GLfloat *v); -extern void _gamma_GetMapiv(GLenum target, GLenum query, GLint *v); -extern void _gamma_GetMaterialfv(GLenum face, GLenum pname, GLfloat *params); -extern void _gamma_GetMaterialiv(GLenum face, GLenum pname, GLint *params); -extern void _gamma_GetPixelMapfv(GLenum map, GLfloat *values); -extern void _gamma_GetPixelMapuiv(GLenum map, GLuint *values); -extern void _gamma_GetPixelMapusv(GLenum map, GLushort *values); -extern void _gamma_GetPointerv(GLenum pname, void **params); -extern void _gamma_GetPolygonStipple(GLubyte *mask); -extern const GLubyte *_gamma_GetString(GLenum name); -extern void _gamma_GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params); -extern void _gamma_GetTexEnviv(GLenum target, GLenum pname, GLint *params); -extern void _gamma_GetTexGendv(GLenum coord, GLenum pname, GLdouble *params); -extern void _gamma_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params); -extern void _gamma_GetTexGeniv(GLenum coord, GLenum pname, GLint *params); -extern void _gamma_GetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *texels); -extern void _gamma_GetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params); -extern void _gamma_GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params); -extern void _gamma_GetTexParameterfv(GLenum target, GLenum pname, GLfloat *params); -extern void _gamma_GetTexParameteriv(GLenum target, GLenum pname, GLint *params); -extern void _gamma_Hint(GLenum target, GLenum mode); -extern void _gamma_IndexMask(GLuint mask); -extern void _gamma_IndexPointer(GLenum type, GLsizei stride, const GLvoid *pointer); -extern void _gamma_Indexd(GLdouble c); -extern void _gamma_Indexdv(const GLdouble *c); -extern void _gamma_Indexf(GLfloat c); -extern void _gamma_Indexfv(const GLfloat *c); -extern void _gamma_Indexi(GLint c); -extern void _gamma_Indexiv(const GLint *c); -extern void _gamma_Indexs(GLshort c); -extern void _gamma_Indexsv(const GLshort *c); -extern void _gamma_Indexub(GLubyte c); -extern void _gamma_Indexubv(const GLubyte *c); -extern void _gamma_InitNames(void); -extern void _gamma_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer); -extern GLboolean _gamma_IsEnabled(GLenum cap); -extern GLboolean _gamma_IsList(GLuint list); -extern GLboolean _gamma_IsTexture(GLuint texture); -extern void _gamma_LightModelf(GLenum pname, GLfloat param); -extern void _gamma_LightModelfv(GLenum pname, const GLfloat *params); -extern void _gamma_LightModeli(GLenum pname, GLint param); -extern void _gamma_LightModeliv(GLenum pname, const GLint *params); -extern void _gamma_Lightf(GLenum light, GLenum pname, GLfloat param); -extern void _gamma_Lightfv(GLenum light, GLenum pname, const GLfloat *params); -extern void _gamma_Lighti(GLenum light, GLenum pname, GLint param); -extern void _gamma_Lightiv(GLenum light, GLenum pname, const GLint *params); -extern void _gamma_LineStipple(GLint factor, GLushort pattern); -extern void _gamma_LineWidth(GLfloat width); -extern void _gamma_ListBase(GLuint base); -extern void _gamma_LoadIdentity(void); -extern void _gamma_LoadMatrixd(const GLdouble *m); -extern void _gamma_LoadMatrixf(const GLfloat *m); -extern void _gamma_LoadName(GLuint name); -extern void _gamma_LogicOp(GLenum opcode); -extern void _gamma_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *pnts); -extern void _gamma_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *pnts); -extern void _gamma_Map2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustr, GLint uord, GLdouble v1, GLdouble v2, GLint vstr, GLint vord, const GLdouble *pnts); -extern void _gamma_Map2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustr, GLint uord, GLfloat v1, GLfloat v2, GLint vstr, GLint vord, const GLfloat *pnts); -extern void _gamma_MapGrid1d(GLint un, GLdouble u1, GLdouble u2); -extern void _gamma_MapGrid1f(GLint un, GLfloat u1, GLfloat u2); -extern void _gamma_MapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -extern void _gamma_MapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -extern void _gamma_Materialf(GLenum face, GLenum pname, GLfloat param); -extern void _gamma_Materialfv(GLenum face, GLenum pname, const GLfloat *params); -extern void _gamma_Materiali(GLenum face, GLenum pname, GLint param); -extern void _gamma_Materialiv(GLenum face, GLenum pname, const GLint *params); -extern void _gamma_MatrixMode(GLenum mode); -extern void _gamma_MultMatrixd(const GLdouble *m); -extern void _gamma_MultMatrixf(const GLfloat *m); -extern void _gamma_NewList(GLuint list, GLenum mode); -extern void _gamma_Normal3b(GLbyte nx, GLbyte ny, GLbyte nz); -extern void _gamma_Normal3bv(const GLbyte *v); -extern void _gamma_Normal3d(GLdouble nx, GLdouble ny, GLdouble nz); -extern void _gamma_Normal3dv(const GLdouble *v); -extern void _gamma_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz); -extern void _gamma_Normal3fv(const GLfloat *v); -extern void _gamma_Normal3i(GLint nx, GLint ny, GLint nz); -extern void _gamma_Normal3iv(const GLint *v); -extern void _gamma_Normal3s(GLshort nx, GLshort ny, GLshort nz); -extern void _gamma_Normal3sv(const GLshort *v); -extern void _gamma_NormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer); -extern void _gamma_Ortho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -extern void _gamma_PassThrough(GLfloat token); -extern void _gamma_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values); -extern void _gamma_PixelMapuiv(GLenum map, GLint mapsize, const GLuint *values); -extern void _gamma_PixelMapusv(GLenum map, GLint mapsize, const GLushort *values); -extern void _gamma_PixelStoref(GLenum pname, GLfloat param); -extern void _gamma_PixelStorei(GLenum pname, GLint param); -extern void _gamma_PixelTransferf(GLenum pname, GLfloat param); -extern void _gamma_PixelTransferi(GLenum pname, GLint param); -extern void _gamma_PixelZoom(GLfloat xfactor, GLfloat yfactor); -extern void _gamma_PointSize(GLfloat size); -extern void _gamma_PolygonMode(GLenum face, GLenum mode); -extern void _gamma_PolygonOffset(GLfloat factor, GLfloat units); -extern void _gamma_PolygonStipple(const GLubyte *mask); -extern void _gamma_PopAttrib(void); -extern void _gamma_PopClientAttrib(void); -extern void _gamma_PopMatrix(void); -extern void _gamma_PopName(void); -extern void _gamma_PrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities); -extern void _gamma_PushAttrib(GLbitfield mask); -extern void _gamma_PushClientAttrib(GLuint mask); -extern void _gamma_PushMatrix(void); -extern void _gamma_PushName(GLuint name); -extern void _gamma_RasterPos2d(GLdouble x, GLdouble y); -extern void _gamma_RasterPos2dv(const GLdouble *v); -extern void _gamma_RasterPos2f(GLfloat x, GLfloat y); -extern void _gamma_RasterPos2fv(const GLfloat *v); -extern void _gamma_RasterPos2i(GLint x, GLint y); -extern void _gamma_RasterPos2iv(const GLint *v); -extern void _gamma_RasterPos2s(GLshort x, GLshort y); -extern void _gamma_RasterPos2sv(const GLshort *v); -extern void _gamma_RasterPos3d(GLdouble x, GLdouble y, GLdouble z); -extern void _gamma_RasterPos3dv(const GLdouble *v); -extern void _gamma_RasterPos3f(GLfloat x, GLfloat y, GLfloat z); -extern void _gamma_RasterPos3fv(const GLfloat *v); -extern void _gamma_RasterPos3i(GLint x, GLint y, GLint z); -extern void _gamma_RasterPos3iv(const GLint *v); -extern void _gamma_RasterPos3s(GLshort x, GLshort y, GLshort z); -extern void _gamma_RasterPos3sv(const GLshort *v); -extern void _gamma_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern void _gamma_RasterPos4dv(const GLdouble *v); -extern void _gamma_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern void _gamma_RasterPos4fv(const GLfloat *v); -extern void _gamma_RasterPos4i(GLint x, GLint y, GLint z, GLint w); -extern void _gamma_RasterPos4iv(const GLint *v); -extern void _gamma_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w); -extern void _gamma_RasterPos4sv(const GLshort *v); -extern void _gamma_ReadBuffer(GLenum mode); -extern void _gamma_ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -extern void _gamma_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -extern void _gamma_Rectdv(const GLdouble *v1, const GLdouble *v2); -extern void _gamma_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -extern void _gamma_Rectfv(const GLfloat *v1, const GLfloat *v2); -extern void _gamma_Recti(GLint x1, GLint y1, GLint x2, GLint y2); -extern void _gamma_Rectiv(const GLint *v1, const GLint *v2); -extern void _gamma_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2); -extern void _gamma_Rectsv(const GLshort *v1, const GLshort *v2); -extern GLint _gamma_RenderMode(GLenum mode); -extern void _gamma_Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -extern void _gamma_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -extern void _gamma_Scaled(GLdouble x, GLdouble y, GLdouble z); -extern void _gamma_Scalef(GLfloat x, GLfloat y, GLfloat z); -extern void _gamma_Scissor(GLint x, GLint y, GLsizei width, GLsizei height); -extern void _gamma_SelectBuffer(GLsizei numnames, GLuint *buffer); -extern void _gamma_ShadeModel(GLenum mode); -extern void _gamma_StencilFunc(GLenum func, GLint ref, GLuint mask); -extern void _gamma_StencilMask(GLuint mask); -extern void _gamma_StencilOp(GLenum fail, GLenum zfail, GLenum zpass); -extern void _gamma_TexCoord1d(GLdouble s); -extern void _gamma_TexCoord1dv(const GLdouble *v); -extern void _gamma_TexCoord1f(GLfloat s); -extern void _gamma_TexCoord1fv(const GLfloat *v); -extern void _gamma_TexCoord1i(GLint s); -extern void _gamma_TexCoord1iv(const GLint *v); -extern void _gamma_TexCoord1s(GLshort s); -extern void _gamma_TexCoord1sv(const GLshort *v); -extern void _gamma_TexCoord2d(GLdouble s, GLdouble t); -extern void _gamma_TexCoord2dv(const GLdouble *v); -extern void _gamma_TexCoord2f(GLfloat s, GLfloat t); -extern void _gamma_TexCoord2fv(const GLfloat *v); -extern void _gamma_TexCoord2i(GLint s, GLint t); -extern void _gamma_TexCoord2iv(const GLint *v); -extern void _gamma_TexCoord2s(GLshort s, GLshort t); -extern void _gamma_TexCoord2sv(const GLshort *v); -extern void _gamma_TexCoord3d(GLdouble s, GLdouble t, GLdouble r); -extern void _gamma_TexCoord3dv(const GLdouble *v); -extern void _gamma_TexCoord3f(GLfloat s, GLfloat t, GLfloat r); -extern void _gamma_TexCoord3fv(const GLfloat *v); -extern void _gamma_TexCoord3i(GLint s, GLint t, GLint r); -extern void _gamma_TexCoord3iv(const GLint *v); -extern void _gamma_TexCoord3s(GLshort s, GLshort t, GLshort r); -extern void _gamma_TexCoord3sv(const GLshort *v); -extern void _gamma_TexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q); -extern void _gamma_TexCoord4dv(const GLdouble *v); -extern void _gamma_TexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q); -extern void _gamma_TexCoord4fv(const GLfloat *v); -extern void _gamma_TexCoord4i(GLint s, GLint t, GLint r, GLint q); -extern void _gamma_TexCoord4iv(const GLint *v); -extern void _gamma_TexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q); -extern void _gamma_TexCoord4sv(const GLshort *v); -extern void _gamma_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -extern void _gamma_TexEnvf(GLenum target, GLenum pname, GLfloat param); -extern void _gamma_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params); -extern void _gamma_TexEnvi(GLenum target, GLenum pname, GLint param); -extern void _gamma_TexEnviv(GLenum target, GLenum pname, const GLint *params); -extern void _gamma_TexGend(GLenum coord, GLenum pname, GLdouble param); -extern void _gamma_TexGendv(GLenum coord, GLenum pname, const GLdouble *params); -extern void _gamma_TexGenf(GLenum coord, GLenum pname, GLfloat param); -extern void _gamma_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params); -extern void _gamma_TexGeni(GLenum coord, GLenum pname, GLint param); -extern void _gamma_TexGeniv(GLenum coord, GLenum pname, const GLint *params); -extern void _gamma_TexImage1D(GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *image); -extern void _gamma_TexImage2D(GLenum target, GLint level, GLint components, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *image); -extern void _gamma_TexParameterf(GLenum target, GLenum pname, GLfloat param); -extern void _gamma_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params); -extern void _gamma_TexParameteri(GLenum target, GLenum pname, GLint param); -extern void _gamma_TexParameteriv(GLenum target, GLenum pname, const GLint *params); -extern void _gamma_TexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -extern void _gamma_TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -extern void _gamma_Translated(GLdouble x, GLdouble y, GLdouble z); -extern void _gamma_Translatef(GLfloat x, GLfloat y, GLfloat z); -extern void _gamma_Vertex2d(GLdouble x, GLdouble y); -extern void _gamma_Vertex2dv(const GLdouble *v); -extern void _gamma_Vertex2f(GLfloat x, GLfloat y); -extern void _gamma_Vertex2fv(const GLfloat *v); -extern void _gamma_Vertex2i(GLint x, GLint y); -extern void _gamma_Vertex2iv(const GLint *v); -extern void _gamma_Vertex2s(GLshort x, GLshort y); -extern void _gamma_Vertex2sv(const GLshort *v); -extern void _gamma_Vertex3d(GLdouble x, GLdouble y, GLdouble z); -extern void _gamma_Vertex3dv(const GLdouble *v); -extern void _gamma_Vertex3f(GLfloat x, GLfloat y, GLfloat z); -extern void _gamma_Vertex3fv(const GLfloat *v); -extern void _gamma_Vertex3i(GLint x, GLint y, GLint z); -extern void _gamma_Vertex3iv(const GLint *v); -extern void _gamma_Vertex3s(GLshort x, GLshort y, GLshort z); -extern void _gamma_Vertex3sv(const GLshort *v); -extern void _gamma_Vertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -extern void _gamma_Vertex4dv(const GLdouble *v); -extern void _gamma_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -extern void _gamma_Vertex4fv(const GLfloat *v); -extern void _gamma_Vertex4i(GLint x, GLint y, GLint z, GLint w); -extern void _gamma_Vertex4iv(const GLint *v); -extern void _gamma_Vertex4s(GLshort x, GLshort y, GLshort z, GLshort w); -extern void _gamma_Vertex4sv(const GLshort *v); -extern void _gamma_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -extern void _gamma_Viewport(GLint x, GLint y, GLsizei width, GLsizei height); - - -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.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_init.c:1.2 xc/lib/GL/mesa/src/drv/gamma/gamma_init.c:removed --- xc/lib/GL/mesa/src/drv/gamma/gamma_init.c:1.2 Tue Feb 22 23:46:43 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_init.c Thu Feb 27 12:26:22 2003 @@ -1,112 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_init.c,v 1.2 2000/02/23 04:46:43 martin 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: - * Kevin E. Martin - * - */ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include "xf86dri.h" -#include "glint_dri.h" -#include "gamma_init.h" - -static void performMagic(__DRIscreenPrivate *driScrnPriv) -{ - gammaScreenPrivate *gPriv = (gammaScreenPrivate *)driScrnPriv->private; - GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)driScrnPriv->pDevPriv; - - gPriv->regionCount = 4; /* Magic number. Can we fix this? */ - - gPriv->regions = Xmalloc(gPriv->regionCount * sizeof(gammaRegion)); - - gPriv->regions[0].handle = gDRIPriv->hControlRegs0; - gPriv->regions[0].size = gDRIPriv->sizeControlRegs0; - gPriv->regions[1].handle = gDRIPriv->hControlRegs1; - gPriv->regions[1].size = gDRIPriv->sizeControlRegs1; - gPriv->regions[2].handle = gDRIPriv->hControlRegs2; - gPriv->regions[2].size = gDRIPriv->sizeControlRegs2; - gPriv->regions[3].handle = gDRIPriv->hControlRegs3; - gPriv->regions[3].size = gDRIPriv->sizeControlRegs3; -} - -GLboolean gammaMapAllRegions(__DRIscreenPrivate *driScrnPriv) -{ - gammaScreenPrivate *gPriv = (gammaScreenPrivate *)driScrnPriv->private; - int i; - - /* First, pick apart pDevPriv & friends */ - performMagic(driScrnPriv); - - /* Next, map all the regions */ - for (i = 0; i < gPriv->regionCount; i++) { - if (drmMap(driScrnPriv->fd, - gPriv->regions[i].handle, - gPriv->regions[i].size, - &gPriv->regions[i].map)) { - while (--i > 0) { - (void)drmUnmap(gPriv->regions[i].map, gPriv->regions[i].size); - } - return GL_FALSE; - } - } - - /* Get the list of dma buffers */ - gPriv->bufs = drmMapBufs(driScrnPriv->fd); - if (!gPriv->bufs) { - while (gPriv->regionCount > 0) { - (void)drmUnmap(gPriv->regions[gPriv->regionCount].map, - gPriv->regions[gPriv->regionCount].size); - gPriv->regionCount--; - } - return GL_FALSE; - } - - return GL_TRUE; -} - -void gammaUnmapAllRegions(__DRIscreenPrivate *driScrnPriv) -{ - gammaScreenPrivate *gPriv = (gammaScreenPrivate *)driScrnPriv->private; - - /* First, unmap the dma buffers */ - drmUnmapBufs(gPriv->bufs); - - /* Next, unmap all the regions */ - while (gPriv->regionCount > 0) { - (void)drmUnmap(gPriv->regions[gPriv->regionCount].map, - gPriv->regions[gPriv->regionCount].size); - gPriv->regionCount--; - } - Xfree(gPriv->regions); -} - -#endif Index: xc/lib/GL/mesa/src/drv/gamma/gamma_init.h diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_init.h:1.4 xc/lib/GL/mesa/src/drv/gamma/gamma_init.h:removed --- xc/lib/GL/mesa/src/drv/gamma/gamma_init.h:1.4 Wed Feb 7 08:26:16 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_init.h Thu Feb 27 12:26:22 2003 @@ -1,251 +0,0 @@ -/* $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. -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: - * Kevin E. Martin - * - */ - -#ifndef _GAMMA_INIT_H_ -#define _GAMMA_INIT_H_ - -#ifdef GLX_DIRECT_RENDERING - -#include "dri_tmm.h" -#include "dri_mesaint.h" -#include "gamma_region.h" -#include "gamma_regs.h" -#include "gamma_macros.h" -#include "gamma_texture.h" - -typedef struct { - int regionCount; /* Count of register regions */ - gammaRegion *regions; /* Vector of mapped region info */ - drmBufMapPtr bufs; /* Map of DMA buffers */ - __DRIscreenPrivate *driScrnPriv; /* Back pointer to DRI screen */ -} gammaScreenPrivate; - -typedef union { - unsigned int i; - float f; -} dmaBufRec, *dmaBuf; - -/* Flags for context */ -#define GAMMA_FRONT_BUFFER 0x00000001 -#define GAMMA_BACK_BUFFER 0x00000002 -#define GAMMA_DEPTH_BUFFER 0x00000004 -#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; - - dmaBuf buf; /* DMA buffer for regular cmds */ - int bufIndex; - int bufSize; - int bufCount; - - dmaBuf WCbuf; /* DMA buffer for window changed cmds */ - int WCbufIndex; - int WCbufSize; - int WCbufCount; - - gammaScreenPrivate *gammaScrnPriv; - - int x, y, w, h; /* Probably should be in drawable priv */ - int FrameCount; /* Probably should be in drawable priv */ - int NotClipped; /* Probably should be in drawable priv */ - int WindowChanged; /* Probably should be in drawabl... */ - int Flags; - 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; - int FBWindowBase; - int LBWindowBase; - int ColorDDAMode; - int GeometryMode; - int AlphaTestMode; - int AlphaBlendMode; - int AB_FBReadMode; - int AB_FBReadMode_Save; - 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 */ - - gammaTexObj *curTexObj; - gammaTexObj *curTexObj1D; - gammaTexObj *curTexObj2D; - int Texture1DEnabled; - int Texture2DEnabled; - - driTMMPtr tmm; - - float ModelView[16]; - float Proj[16]; - float ModelViewProj[16]; - float Texture[16]; - - float ModelViewStack[(MAX_MODELVIEW_STACK-1)*16]; - int ModelViewCount; - float ProjStack[(MAX_PROJECTION_STACK-1)*16]; - int ProjCount; - float TextureStack[(MAX_TEXTURE_STACK-1)*16]; - int TextureCount; -} gammaContextPrivate; - -extern GLboolean gammaMapAllRegions(__DRIscreenPrivate *driScrnPriv); -extern void gammaUnmapAllRegions(__DRIscreenPrivate *driScrnPriv); -extern void gammaSetMatrix(GLfloat m[16]); -extern void gammaMultMatrix(GLfloat m[16]); -extern void gammaLoadHWMatrix(void); -extern void gammaInitHW(gammaContextPrivate *gcp); - -extern float IdentityMatrix[16]; -extern __DRIcontextPrivate *nullCC; -extern __DRIcontextPrivate *gCC; -extern gammaContextPrivate *gCCPriv; - -#endif - -#endif /* _GAMMA_INIT_H_ */ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c:1.7 xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c:1.9 --- xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c:1.7 Wed Jan 31 11:15:37 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c Wed Oct 30 07:51:29 2002 @@ -1,371 +1,551 @@ -/* $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. -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: - * Kevin E. Martin - * Alan Hourihane + * Copyright 2001 by Alan Hourihane. * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * Kevin E. Martin + * */ - -#ifdef GLX_DIRECT_RENDERING +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_inithw.c,v 1.9 2002/10/30 12:51:29 alanh Exp $ */ -#include "gamma_init.h" +#include "gamma_context.h" #include "glint_dri.h" -void gammaInitHW(gammaContextPrivate *gcp) +void gammaInitHW( gammaContextPtr gmesa ) { - __DRIscreenPrivate *driScrnPriv = gcp->gammaScrnPriv->driScrnPriv; - GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)driScrnPriv->pDevPriv; + GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)gmesa->driScreen->pDevPriv; + int i; if (gDRIPriv->numMultiDevices == 2) { /* Set up each MX's ScanLineOwnership for OpenGL */ - CHECK_DMA_BUFFER(nullCC, gcp, 4); - WRITE(gcp->buf, BroadcastMask, 1); - WRITE(gcp->buf, ScanLineOwnership, 5); /* Use bottom left as [0,0] */ - WRITE(gcp->buf, BroadcastMask, 2); - WRITE(gcp->buf, ScanLineOwnership, 1); /* Use bottom left as [0,0] */ - + CHECK_DMA_BUFFER(gmesa, 5); + WRITE(gmesa->buf, BroadcastMask, 1); + WRITE(gmesa->buf, ScanLineOwnership, 5); /* Use bottom left as [0,0] */ + WRITE(gmesa->buf, BroadcastMask, 2); + WRITE(gmesa->buf, ScanLineOwnership, 1); /* Use bottom left as [0,0] */ /* Broadcast to both MX's */ - CHECK_DMA_BUFFER(nullCC, gcp, 1); - WRITE(gcp->buf, BroadcastMask, 3); + WRITE(gmesa->buf, BroadcastMask, 3); + FLUSH_DMA_BUFFER(gmesa); } - /* Set MXs to known state */ - CHECK_DMA_BUFFER(nullCC, gcp, 27); - WRITE(gcp->buf, RasterizerMode, 0); - WRITE(gcp->buf, AreaStippleMode, 0); - WRITE(gcp->buf, LineStippleMode, 0); - WRITE(gcp->buf, ScissorMode, 0); - WRITE(gcp->buf, RouterMode, 0); - WRITE(gcp->buf, TextureAddressMode, 0); - WRITE(gcp->buf, TextureReadMode, 0); - WRITE(gcp->buf, TextureFilterMode, 0); - WRITE(gcp->buf, ColorDDAMode, 0); - WRITE(gcp->buf, TextureColorMode, 0); - WRITE(gcp->buf, FogMode, 0); - WRITE(gcp->buf, AntialiasMode, 0); - WRITE(gcp->buf, AlphaTestMode, 0); - WRITE(gcp->buf, LBReadMode, 0); - WRITE(gcp->buf, GLINTWindow, 0); - WRITE(gcp->buf, StencilMode, 0); - WRITE(gcp->buf, DepthMode, 0); - WRITE(gcp->buf, LBWriteMode, 0); - WRITE(gcp->buf, FBReadMode, 0); - WRITE(gcp->buf, PatternRamMode, 0); - WRITE(gcp->buf, AlphaBlendMode, 0); - WRITE(gcp->buf, ChromaTestMode, 0); - WRITE(gcp->buf, DitherMode, 0); - WRITE(gcp->buf, LogicalOpMode, 0); - WRITE(gcp->buf, FBWriteMode, 0); - WRITE(gcp->buf, StatisticMode, 0); - WRITE(gcp->buf, PixelSize, 0); - - /* Set Gamma to known state */ - CHECK_DMA_BUFFER(nullCC, gcp, 10); - WRITE(gcp->buf, TriangleMode, 0); - WRITE(gcp->buf, GeometryMode, 0); - WRITE(gcp->buf, NormalizeMode, 0); - WRITE(gcp->buf, LightingMode, 0); - WRITE(gcp->buf, ColorMaterialMode, 0); - WRITE(gcp->buf, MaterialMode, 0); - WRITE(gcp->buf, PointMode, 0); - WRITE(gcp->buf, LineMode, 0); - WRITE(gcp->buf, TransformMode, 0); - WRITE(gcp->buf, DeltaMode, 0); - -#ifdef FORCE_DEPTH32 - CHECK_DMA_BUFFER(nullCC, gcp, 2); - WRITE(gcp->buf, LBWriteFormat, 0x00000d4a); - WRITE(gcp->buf, LBReadFormat, 0x00000d4a); -#endif + gmesa->AlphaBlendMode = (AlphaBlendModeDisable | + AB_Src_One | + AB_Dst_Zero | + AB_NoAlphaBufferPresent | + AB_ColorFmt_8888 | + AB_ColorOrder_RGB | + AB_OpenGLType | + AB_AlphaDst_FBData | + AB_ColorConversionScale | + AB_AlphaConversionScale); + + gmesa->DitherMode = DitherModeEnable | DM_ColorOrder_RGB; + + switch (gmesa->gammaScreen->cpp) { + case 2: + gmesa->DitherMode |= DM_ColorFmt_5555; + gmesa->AlphaBlendMode |= AB_ColorFmt_5555; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PixelSize, 1); + break; + case 4: + gmesa->DitherMode |= DM_ColorFmt_8888; + gmesa->AlphaBlendMode |= AB_ColorFmt_8888; + WRITE(gmesa->buf, PixelSize, 0); + break; + } - /* Framebuffer initialization */ - CHECK_DMA_BUFFER(nullCC, gcp, 10); - WRITE(gcp->buf, FBSourceData, 0); - WRITE(gcp->buf, FBReadMode, gcp->FBReadMode); - if (gcp->EnabledFlags & GAMMA_BACK_BUFFER) - WRITE(gcp->buf, FBPixelOffset, - (driScrnPriv->fbHeight/2)*driScrnPriv->fbWidth); - else - WRITE(gcp->buf, FBPixelOffset, 0); - WRITE(gcp->buf, FBSourceOffset, 0); - WRITE(gcp->buf, FBHardwareWriteMask, 0xffffffff); - WRITE(gcp->buf, FBSoftwareWriteMask, 0xffffffff); - WRITE(gcp->buf, FBWriteMode, FBWriteModeEnable); - WRITE(gcp->buf, FBWindowBase, gcp->FBWindowBase); - WRITE(gcp->buf, ScreenSize, ((driScrnPriv->fbHeight << 16) | - (driScrnPriv->fbWidth))); - WRITE(gcp->buf, WindowOrigin, 0x00000000); + /* FIXME for stencil, gid, etc */ + switch (gmesa->DepthSize) { + case 16: + gmesa->LBReadFormat = + (LBRF_DepthWidth16 | + LBRF_StencilWidth8 | + LBRF_StencilPos16 | + LBRF_FrameCount8 | + LBRF_FrameCountPos24 | + LBRF_GIDWidth4 | + LBRF_GIDPos32 ); + gmesa->LBWriteFormat = + (LBRF_DepthWidth16 | + LBRF_StencilWidth8 | + LBRF_StencilPos16 | + LBRF_FrameCount8 | + LBRF_FrameCountPos24 | + LBRF_GIDWidth4 | + LBRF_GIDPos32 ); + break; + case 24: + gmesa->LBReadFormat = + (LBRF_DepthWidth24 | + LBRF_StencilWidth8 | + LBRF_StencilPos24 | + LBRF_FrameCount8 | + LBRF_FrameCountPos32 | + LBRF_GIDWidth4 | + LBRF_GIDPos36 ); + gmesa->LBWriteFormat = + (LBRF_DepthWidth24 | + LBRF_StencilWidth8 | + LBRF_StencilPos24 | + LBRF_FrameCount8 | + LBRF_FrameCountPos32 | + LBRF_GIDWidth4 | + LBRF_GIDPos36 ); + break; + case 32: + gmesa->LBReadFormat = + (LBRF_DepthWidth32 | + LBRF_StencilWidth8 | + LBRF_StencilPos32 | + LBRF_FrameCount8 | + LBRF_FrameCountPos40 | + LBRF_GIDWidth4 | + LBRF_GIDPos44 ); + gmesa->LBWriteFormat = + (LBRF_DepthWidth32 | + LBRF_StencilWidth8 | + LBRF_StencilPos32 | + LBRF_FrameCount8 | + LBRF_FrameCountPos40 | + LBRF_GIDWidth4 | + LBRF_GIDPos44 ); + break; + } - /* Localbuffer initialization */ - CHECK_DMA_BUFFER(nullCC, gcp, 5); - WRITE(gcp->buf, LBReadMode, gcp->LBReadMode); - WRITE(gcp->buf, LBSourceOffset, 0); - WRITE(gcp->buf, LBWriteMode, LBWriteModeEnable); - WRITE(gcp->buf, LBWindowOffset, 0); - WRITE(gcp->buf, LBWindowBase, gcp->LBWindowBase); - - CHECK_DMA_BUFFER(nullCC, gcp, 1); - WRITE(gcp->buf, Rectangle2DControl, 1); - - CHECK_DMA_BUFFER(nullCC, gcp, 11); - WRITE(gcp->buf, DepthMode, gcp->DepthMode); - WRITE(gcp->buf, ColorDDAMode, gcp->ColorDDAMode); - WRITE(gcp->buf, FBBlockColor, 0x00000000); - WRITE(gcp->buf, ConstantColor, 0x00000000); - WRITE(gcp->buf, AlphaTestMode, gcp->AlphaTestMode); - WRITE(gcp->buf, AlphaBlendMode, gcp->AlphaBlendMode); - WRITE(gcp->buf, DitherMode, DitherModeEnable | DM_ColorOrder_RGB); - if (gDRIPriv->numMultiDevices == 2) - WRITE(gcp->buf, RasterizerMode, RM_MultiGLINT | RM_BiasCoordNearHalf); - else - WRITE(gcp->buf, RasterizerMode, RM_BiasCoordNearHalf); - WRITE(gcp->buf, GLINTWindow, gcp->Window); - WRITE(gcp->buf, FastClearDepth, 0xffffffff); - WRITE(gcp->buf, GLINTDepth, 0xffffffff); - - CHECK_DMA_BUFFER(nullCC, gcp, 1); - WRITE(gcp->buf, TextureColorMode, gcp->curTexObj->TextureColorMode); - - CHECK_DMA_BUFFER(nullCC, gcp, 1); - WRITE(gcp->buf, EdgeFlag, EdgeFlagEnable); - - CHECK_DMA_BUFFER(nullCC, gcp, 16); - WRITEF(gcp->buf, ModelViewMatrix0, 1.0); - WRITEF(gcp->buf, ModelViewMatrix1, 0.0); - WRITEF(gcp->buf, ModelViewMatrix2, 0.0); - WRITEF(gcp->buf, ModelViewMatrix3, 0.0); - WRITEF(gcp->buf, ModelViewMatrix4, 0.0); - WRITEF(gcp->buf, ModelViewMatrix5, 1.0); - WRITEF(gcp->buf, ModelViewMatrix6, 0.0); - WRITEF(gcp->buf, ModelViewMatrix7, 0.0); - WRITEF(gcp->buf, ModelViewMatrix8, 0.0); - WRITEF(gcp->buf, ModelViewMatrix9, 0.0); - WRITEF(gcp->buf, ModelViewMatrix10, 1.0); - WRITEF(gcp->buf, ModelViewMatrix11, 0.0); - WRITEF(gcp->buf, ModelViewMatrix12, 0.0); - WRITEF(gcp->buf, ModelViewMatrix13, 0.0); - WRITEF(gcp->buf, ModelViewMatrix14, 0.0); - WRITEF(gcp->buf, ModelViewMatrix15, 1.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 16); - WRITEF(gcp->buf, ModelViewProjectionMatrix0, 1.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix1, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix2, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix3, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix4, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix5, 1.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix6, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix7, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix8, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix9, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix10, 1.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix11, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix12, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix13, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix14, 0.0); - WRITEF(gcp->buf, ModelViewProjectionMatrix15, 1.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 16); - WRITEF(gcp->buf, TextureMatrix0, 1.0); - WRITEF(gcp->buf, TextureMatrix1, 0.0); - WRITEF(gcp->buf, TextureMatrix2, 0.0); - WRITEF(gcp->buf, TextureMatrix3, 0.0); - WRITEF(gcp->buf, TextureMatrix4, 0.0); - WRITEF(gcp->buf, TextureMatrix5, 1.0); - WRITEF(gcp->buf, TextureMatrix6, 0.0); - WRITEF(gcp->buf, TextureMatrix7, 0.0); - WRITEF(gcp->buf, TextureMatrix8, 0.0); - WRITEF(gcp->buf, TextureMatrix9, 0.0); - WRITEF(gcp->buf, TextureMatrix10, 1.0); - WRITEF(gcp->buf, TextureMatrix11, 0.0); - WRITEF(gcp->buf, TextureMatrix12, 0.0); - WRITEF(gcp->buf, TextureMatrix13, 0.0); - WRITEF(gcp->buf, TextureMatrix14, 0.0); - WRITEF(gcp->buf, TextureMatrix15, 1.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 16); - WRITEF(gcp->buf, TexGen0, 0.0); - WRITEF(gcp->buf, TexGen1, 0.0); - WRITEF(gcp->buf, TexGen2, 0.0); - WRITEF(gcp->buf, TexGen3, 0.0); - WRITEF(gcp->buf, TexGen4, 0.0); - WRITEF(gcp->buf, TexGen5, 0.0); - WRITEF(gcp->buf, TexGen6, 0.0); - WRITEF(gcp->buf, TexGen7, 0.0); - WRITEF(gcp->buf, TexGen8, 0.0); - WRITEF(gcp->buf, TexGen9, 0.0); - WRITEF(gcp->buf, TexGen10, 0.0); - WRITEF(gcp->buf, TexGen11, 0.0); - WRITEF(gcp->buf, TexGen12, 0.0); - WRITEF(gcp->buf, TexGen13, 0.0); - WRITEF(gcp->buf, TexGen14, 0.0); - WRITEF(gcp->buf, TexGen15, 0.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 9); - WRITEF(gcp->buf, NormalMatrix0, 1.0); - WRITEF(gcp->buf, NormalMatrix1, 0.0); - WRITEF(gcp->buf, NormalMatrix2, 0.0); - WRITEF(gcp->buf, NormalMatrix3, 0.0); - WRITEF(gcp->buf, NormalMatrix4, 1.0); - WRITEF(gcp->buf, NormalMatrix5, 0.0); - WRITEF(gcp->buf, NormalMatrix6, 0.0); - WRITEF(gcp->buf, NormalMatrix7, 0.0); - WRITEF(gcp->buf, NormalMatrix8, 1.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 3); - WRITEF(gcp->buf, FogDensity, 0.0); - WRITEF(gcp->buf, FogEnd, 0.0); - WRITEF(gcp->buf, FogScale, 0.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 2); - WRITEF(gcp->buf, LineClipLengthThreshold, 0.0); - WRITEF(gcp->buf, TriangleClipAreaThreshold, 0.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 5); - WRITE(gcp->buf, GeometryMode, gcp->GeometryMode); - WRITE(gcp->buf, NormalizeMode, NormalizeModeDisable); - WRITE(gcp->buf, LightingMode, gcp->LightingMode); - WRITE(gcp->buf, ColorMaterialMode, ColorMaterialModeDisable); - WRITE(gcp->buf, MaterialMode, MaterialModeDisable); - - CHECK_DMA_BUFFER(nullCC, gcp, 2); - WRITE(gcp->buf, FrontSpecularExponent, 0); /* fixed point */ - WRITE(gcp->buf, BackSpecularExponent, 0); /* fixed point */ - - CHECK_DMA_BUFFER(nullCC, gcp, 29); - WRITEF(gcp->buf, FrontAmbientColorRed, 0.2); - WRITEF(gcp->buf, FrontAmbientColorGreen, 0.2); - WRITEF(gcp->buf, FrontAmbientColorBlue, 0.2); - WRITEF(gcp->buf, BackAmbientColorRed, 0.2); - WRITEF(gcp->buf, BackAmbientColorGreen, 0.2); - WRITEF(gcp->buf, BackAmbientColorBlue, 0.2); - WRITEF(gcp->buf, FrontDiffuseColorRed, 0.8); - WRITEF(gcp->buf, FrontDiffuseColorGreen, 0.8); - WRITEF(gcp->buf, FrontDiffuseColorBlue, 0.8); - WRITEF(gcp->buf, BackDiffuseColorRed, 0.8); - WRITEF(gcp->buf, BackDiffuseColorGreen, 0.8); - WRITEF(gcp->buf, BackDiffuseColorBlue, 0.8); - WRITEF(gcp->buf, FrontSpecularColorRed, 0.0); - WRITEF(gcp->buf, FrontSpecularColorGreen, 0.0); - WRITEF(gcp->buf, FrontSpecularColorBlue, 0.0); - WRITEF(gcp->buf, BackSpecularColorRed, 0.0); - WRITEF(gcp->buf, BackSpecularColorGreen, 0.0); - WRITEF(gcp->buf, BackSpecularColorBlue, 0.0); - WRITEF(gcp->buf, FrontEmissiveColorRed, 0.0); - WRITEF(gcp->buf, FrontEmissiveColorGreen, 0.0); - WRITEF(gcp->buf, FrontEmissiveColorBlue, 0.0); - WRITEF(gcp->buf, BackEmissiveColorRed, 0.0); - WRITEF(gcp->buf, BackEmissiveColorGreen, 0.0); - WRITEF(gcp->buf, BackEmissiveColorBlue, 0.0); - WRITEF(gcp->buf, SceneAmbientColorRed, 0.2); - WRITEF(gcp->buf, SceneAmbientColorGreen, 0.2); - WRITEF(gcp->buf, SceneAmbientColorBlue, 0.2); - WRITEF(gcp->buf, FrontAlpha, 1.0); - WRITEF(gcp->buf, BackAlpha, 1.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 8); - WRITE(gcp->buf, PointMode, (PM_AntialiasDisable | - PM_AntialiasQuality_4x4)); - WRITE(gcp->buf, PointSize, 1); - WRITE(gcp->buf, LineMode, (LM_StippleDisable | - LM_MirrorDisable | - LM_AntialiasDisable | - LM_AntialiasQuality_4x4)); - WRITE(gcp->buf, LineWidth, 1); - WRITE(gcp->buf, LineWidthOffset, 0); - WRITE(gcp->buf, TriangleMode, (TM_AntialiasDisable | - TM_AntialiasQuality_4x4 | - TM_UseTriPacketInterface)); - WRITE(gcp->buf, TransformMode, (XM_UseModelViewProjMatrix | + gmesa->FBHardwareWriteMask = 0xffffffff; + gmesa->FogMode = FogModeDisable; + gmesa->ClearDepth = 0xffffffff; + gmesa->AreaStippleMode = AreaStippleModeDisable; + gmesa->x = 0; + gmesa->y = 0; + gmesa->w = 0; + gmesa->h = 0; + gmesa->FrameCount = 0; + gmesa->MatrixMode = GL_MODELVIEW; + gmesa->ModelViewCount = 0; + gmesa->ProjCount = 0; + gmesa->TextureCount = 0; + gmesa->PointMode = PM_AntialiasQuality_4x4; + gmesa->LineMode = LM_AntialiasQuality_4x4; + gmesa->TriangleMode = TM_AntialiasQuality_4x4; + gmesa->AntialiasMode = AntialiasModeDisable; + + for (i = 0; i < 16; i++) + if (i % 5 == 0) + gmesa->ModelView[i] = + gmesa->Proj[i] = + gmesa->ModelViewProj[i] = + gmesa->Texture[i] = 1.0; + else + gmesa->ModelView[i] = + gmesa->Proj[i] = + gmesa->ModelViewProj[i] = + gmesa->Texture[i] = 0.0; + + gmesa->LBReadMode = (LBReadSrcDisable | + LBReadDstDisable | + LBDataTypeDefault | + LBWindowOriginBot | + gDRIPriv->pprod); + gmesa->FBReadMode = (FBReadSrcDisable | + FBReadDstDisable | + FBDataTypeDefault | + FBWindowOriginBot | + gDRIPriv->pprod); + + if (gDRIPriv->numMultiDevices == 2) { + gmesa->LBReadMode |= LBScanLineInt2; + gmesa->FBReadMode |= FBScanLineInt2; + gmesa->LBWindowBase = gmesa->driScreen->fbWidth * + (gmesa->driScreen->fbHeight/2 - 1); + gmesa->FBWindowBase = gmesa->driScreen->fbWidth * + (gmesa->driScreen->fbHeight/2 - 1); + } else { + gmesa->LBWindowBase = gmesa->driScreen->fbWidth * + (gmesa->driScreen->fbHeight - 1); + gmesa->FBWindowBase = gmesa->driScreen->fbWidth * + (gmesa->driScreen->fbHeight - 1); + } + + gmesa->Begin = (B_AreaStippleDisable | + B_LineStippleDisable | + B_AntiAliasDisable | + B_TextureDisable | + B_FogDisable | + B_SubPixelCorrectEnable | + B_PrimType_Null); + + gmesa->ColorDDAMode = (ColorDDAEnable | + ColorDDAGouraud); + + gmesa->GeometryMode = (GM_TextureDisable | + GM_FogDisable | + GM_FogExp | + GM_FrontPolyFill | + GM_BackPolyFill | + GM_FrontFaceCCW | + GM_PolyCullDisable | + GM_PolyCullBack | + GM_ClipShortLinesDisable | + GM_ClipSmallTrisDisable | + GM_RenderMode | + GM_Feedback2D | + GM_CullFaceNormDisable | + GM_AutoFaceNormDisable | + GM_GouraudShading | + GM_UserClipNone | + GM_PolyOffsetPointDisable | + GM_PolyOffsetLineDisable | + GM_PolyOffsetFillDisable | + GM_InvertFaceNormCullDisable); + + gmesa->AlphaTestMode = (AlphaTestModeDisable | + AT_Always); + + gmesa->AB_FBReadMode_Save = gmesa->AB_FBReadMode = 0; + + gmesa->Window = (WindowEnable | /* For GID testing */ + W_PassIfEqual | + (0 << 5)); /* GID part is set from draw priv (below) */ + + gmesa->NotClipped = GL_FALSE; + gmesa->WindowChanged = GL_TRUE; + + gmesa->Texture1DEnabled = GL_FALSE; + gmesa->Texture2DEnabled = GL_FALSE; + + gmesa->DepthMode |= (DepthModeDisable | + DM_WriteMask | + DM_Less); + + gmesa->DeltaMode |= (DM_SubPixlCorrectionEnable | + DM_SmoothShadingEnable | + DM_Target500TXMX); + + gmesa->LightingMode = LightingModeDisable | LightingModeSpecularEnable; + gmesa->Light0Mode = LNM_Off; + gmesa->Light1Mode = LNM_Off; + gmesa->Light2Mode = LNM_Off; + gmesa->Light3Mode = LNM_Off; + gmesa->Light4Mode = LNM_Off; + gmesa->Light5Mode = LNM_Off; + gmesa->Light6Mode = LNM_Off; + gmesa->Light7Mode = LNM_Off; + gmesa->Light8Mode = LNM_Off; + gmesa->Light9Mode = LNM_Off; + gmesa->Light10Mode = LNM_Off; + gmesa->Light11Mode = LNM_Off; + gmesa->Light12Mode = LNM_Off; + gmesa->Light13Mode = LNM_Off; + gmesa->Light14Mode = LNM_Off; + gmesa->Light15Mode = LNM_Off; + + gmesa->LogicalOpMode = LogicalOpModeDisable; + + gmesa->MaterialMode = MaterialModeDisable; + + gmesa->ScissorMode = UserScissorDisable | ScreenScissorDisable; + + gmesa->TransformMode = XM_UseModelViewProjMatrix | XM_TexGenModeS_None | XM_TexGenModeT_None | XM_TexGenModeR_None | - XM_TexGenModeQ_None)); - WRITE(gcp->buf, DeltaMode, gcp->DeltaMode); + XM_TexGenModeQ_None; - CHECK_DMA_BUFFER(nullCC, gcp, 16); - WRITE(gcp->buf, Light0Mode, LNM_Off); - WRITE(gcp->buf, Light1Mode, LNM_Off); - WRITE(gcp->buf, Light2Mode, LNM_Off); - WRITE(gcp->buf, Light3Mode, LNM_Off); - WRITE(gcp->buf, Light4Mode, LNM_Off); - WRITE(gcp->buf, Light5Mode, LNM_Off); - WRITE(gcp->buf, Light6Mode, LNM_Off); - WRITE(gcp->buf, Light7Mode, LNM_Off); - WRITE(gcp->buf, Light8Mode, LNM_Off); - WRITE(gcp->buf, Light9Mode, LNM_Off); - WRITE(gcp->buf, Light10Mode, LNM_Off); - WRITE(gcp->buf, Light11Mode, LNM_Off); - WRITE(gcp->buf, Light12Mode, LNM_Off); - WRITE(gcp->buf, Light13Mode, LNM_Off); - WRITE(gcp->buf, Light14Mode, LNM_Off); - WRITE(gcp->buf, Light15Mode, LNM_Off); - - CHECK_DMA_BUFFER(nullCC, gcp, 22); - WRITEF(gcp->buf, Light0AmbientIntensityBlue, 0.0); - WRITEF(gcp->buf, Light0AmbientIntensityGreen, 0.0); - WRITEF(gcp->buf, Light0AmbientIntensityRed, 0.0); - WRITEF(gcp->buf, Light0DiffuseIntensityBlue, 1.0); - WRITEF(gcp->buf, Light0DiffuseIntensityGreen, 1.0); - WRITEF(gcp->buf, Light0DiffuseIntensityRed, 1.0); - WRITEF(gcp->buf, Light0SpecularIntensityBlue, 1.0); - WRITEF(gcp->buf, Light0SpecularIntensityGreen, 1.0); - WRITEF(gcp->buf, Light0SpecularIntensityRed, 1.0); - WRITEF(gcp->buf, Light0SpotlightDirectionZ, 0.0); - WRITEF(gcp->buf, Light0SpotlightDirectionY, 0.0); - WRITEF(gcp->buf, Light0SpotlightDirectionX, -1.0); - WRITEF(gcp->buf, Light0SpotlightExponent, 0.0); - WRITEF(gcp->buf, Light0PositionZ, 0.0); - WRITEF(gcp->buf, Light0PositionY, 0.0); - WRITEF(gcp->buf, Light0PositionX, 1.0); - WRITEF(gcp->buf, Light0PositionW, 0.0); - WRITEF(gcp->buf, Light0CosSpotlightCutoffAngle, -1.0); - WRITEF(gcp->buf, Light0ConstantAttenuation, 1.0); - WRITEF(gcp->buf, Light0LinearAttenuation, 0.0); - WRITEF(gcp->buf, Light0QuadraticAttenuation,0.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 6); - WRITEF(gcp->buf, ViewPortScaleX, (gcp->w)/2.0); - WRITEF(gcp->buf, ViewPortScaleY, (gcp->h)/2.0); - WRITEF(gcp->buf, ViewPortScaleZ, (gcp->zFar-gcp->zNear)/2.0); - WRITEF(gcp->buf, ViewPortOffsetX, gcp->x); - WRITEF(gcp->buf, ViewPortOffsetY, gcp->y); - WRITEF(gcp->buf, ViewPortOffsetZ, (gcp->zFar+gcp->zNear)/2.0); - - CHECK_DMA_BUFFER(nullCC, gcp, 3); - WRITEF(gcp->buf, Nz, 1.0); - WRITEF(gcp->buf, Ny, 0.0); - WRITEF(gcp->buf, Nx, 0.0); + CHECK_DMA_BUFFER(gmesa, 20); + WRITE(gmesa->buf, LineStippleMode, 0); + WRITE(gmesa->buf, RouterMode, 0); + WRITE(gmesa->buf, TextureAddressMode, 0); + WRITE(gmesa->buf, TextureReadMode, 0); + WRITE(gmesa->buf, TextureFilterMode, 0); + WRITE(gmesa->buf, TextureColorMode, 0); + WRITE(gmesa->buf, StencilMode, 0); + WRITE(gmesa->buf, PatternRamMode, 0); + WRITE(gmesa->buf, ChromaTestMode, 0); + WRITE(gmesa->buf, StatisticMode, 0); + WRITE(gmesa->buf, AreaStippleMode, gmesa->AreaStippleMode); + WRITE(gmesa->buf, ScissorMode, gmesa->ScissorMode); + WRITE(gmesa->buf, FogMode, gmesa->FogMode); + WRITE(gmesa->buf, AntialiasMode, gmesa->AntialiasMode); + WRITE(gmesa->buf, LogicalOpMode, gmesa->LogicalOpMode); + WRITE(gmesa->buf, TriangleMode, gmesa->TriangleMode); + WRITE(gmesa->buf, PointMode, gmesa->PointMode); + WRITE(gmesa->buf, LineMode, gmesa->LineMode); + WRITE(gmesa->buf, LBWriteFormat, gmesa->LBWriteFormat); + WRITE(gmesa->buf, LBReadFormat, gmesa->LBReadFormat); + /* Framebuffer initialization */ + CHECK_DMA_BUFFER(gmesa, 10); + WRITE(gmesa->buf, FBSourceData, 0); + WRITE(gmesa->buf, FBReadMode, gmesa->FBReadMode); + if (gmesa->EnabledFlags & GAMMA_BACK_BUFFER) { + if (gDRIPriv->numMultiDevices == 2) { + WRITE(gmesa->buf, FBPixelOffset, + (gmesa->driScreen->fbHeight/2)*gmesa->driScreen->fbWidth); + } else { + WRITE(gmesa->buf, FBPixelOffset, + gmesa->driScreen->fbHeight*gmesa->driScreen->fbWidth); + } + } else + WRITE(gmesa->buf, FBPixelOffset, 0); + WRITE(gmesa->buf, FBSourceOffset, 0); + WRITE(gmesa->buf, FBHardwareWriteMask, 0xffffffff); + WRITE(gmesa->buf, FBSoftwareWriteMask, 0xffffffff); + WRITE(gmesa->buf, FBWriteMode, FBWriteModeEnable); + WRITE(gmesa->buf, FBWindowBase, gmesa->FBWindowBase); + WRITE(gmesa->buf, ScreenSize, ((gmesa->driScreen->fbHeight << 16) | + (gmesa->driScreen->fbWidth))); + WRITE(gmesa->buf, WindowOrigin, 0x00000000); + + /* Localbuffer initialization */ + CHECK_DMA_BUFFER(gmesa, 5); + WRITE(gmesa->buf, LBReadMode, gmesa->LBReadMode); + WRITE(gmesa->buf, LBSourceOffset, 0); + WRITE(gmesa->buf, LBWriteMode, LBWriteModeEnable); + WRITE(gmesa->buf, LBWindowOffset, 0); + WRITE(gmesa->buf, LBWindowBase, gmesa->LBWindowBase); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Rectangle2DControl, 1); + + CHECK_DMA_BUFFER(gmesa, 11); + WRITE(gmesa->buf, DepthMode, gmesa->DepthMode); + WRITE(gmesa->buf, ColorDDAMode, gmesa->ColorDDAMode); + WRITE(gmesa->buf, FBBlockColor, 0x00000000); + WRITE(gmesa->buf, ConstantColor, 0x00000000); + WRITE(gmesa->buf, AlphaTestMode, gmesa->AlphaTestMode); + WRITE(gmesa->buf, AlphaBlendMode, gmesa->AlphaBlendMode); + WRITE(gmesa->buf, DitherMode, gmesa->DitherMode); + if (gDRIPriv->numMultiDevices == 2) + WRITE(gmesa->buf, RasterizerMode, RM_MultiGLINT | RM_BiasCoordNearHalf); + else + WRITE(gmesa->buf, RasterizerMode, RM_BiasCoordNearHalf); + WRITE(gmesa->buf, GLINTWindow, gmesa->Window); + WRITE(gmesa->buf, FastClearDepth, gmesa->ClearDepth); + WRITE(gmesa->buf, GLINTDepth, gmesa->ClearDepth); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, EdgeFlag, EdgeFlagEnable); + + CHECK_DMA_BUFFER(gmesa, 16); + WRITEF(gmesa->buf, ModelViewMatrix0, 1.0); + WRITEF(gmesa->buf, ModelViewMatrix1, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix2, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix3, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix4, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix5, 1.0); + WRITEF(gmesa->buf, ModelViewMatrix6, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix7, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix8, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix9, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix10, 1.0); + WRITEF(gmesa->buf, ModelViewMatrix11, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix12, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix13, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix14, 0.0); + WRITEF(gmesa->buf, ModelViewMatrix15, 1.0); + + CHECK_DMA_BUFFER(gmesa, 16); + WRITEF(gmesa->buf, ModelViewProjectionMatrix0, 1.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix1, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix2, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix3, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix4, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix5, 1.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix6, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix7, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix8, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix9, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix10, 1.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix11, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix12, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix13, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix14, 0.0); + WRITEF(gmesa->buf, ModelViewProjectionMatrix15, 1.0); + + CHECK_DMA_BUFFER(gmesa, 16); + WRITEF(gmesa->buf, TextureMatrix0, 1.0); + WRITEF(gmesa->buf, TextureMatrix1, 0.0); + WRITEF(gmesa->buf, TextureMatrix2, 0.0); + WRITEF(gmesa->buf, TextureMatrix3, 0.0); + WRITEF(gmesa->buf, TextureMatrix4, 0.0); + WRITEF(gmesa->buf, TextureMatrix5, 1.0); + WRITEF(gmesa->buf, TextureMatrix6, 0.0); + WRITEF(gmesa->buf, TextureMatrix7, 0.0); + WRITEF(gmesa->buf, TextureMatrix8, 0.0); + WRITEF(gmesa->buf, TextureMatrix9, 0.0); + WRITEF(gmesa->buf, TextureMatrix10, 1.0); + WRITEF(gmesa->buf, TextureMatrix11, 0.0); + WRITEF(gmesa->buf, TextureMatrix12, 0.0); + WRITEF(gmesa->buf, TextureMatrix13, 0.0); + WRITEF(gmesa->buf, TextureMatrix14, 0.0); + WRITEF(gmesa->buf, TextureMatrix15, 1.0); + + CHECK_DMA_BUFFER(gmesa, 16); + WRITEF(gmesa->buf, TexGen0, 0.0); + WRITEF(gmesa->buf, TexGen1, 0.0); + WRITEF(gmesa->buf, TexGen2, 0.0); + WRITEF(gmesa->buf, TexGen3, 0.0); + WRITEF(gmesa->buf, TexGen4, 0.0); + WRITEF(gmesa->buf, TexGen5, 0.0); + WRITEF(gmesa->buf, TexGen6, 0.0); + WRITEF(gmesa->buf, TexGen7, 0.0); + WRITEF(gmesa->buf, TexGen8, 0.0); + WRITEF(gmesa->buf, TexGen9, 0.0); + WRITEF(gmesa->buf, TexGen10, 0.0); + WRITEF(gmesa->buf, TexGen11, 0.0); + WRITEF(gmesa->buf, TexGen12, 0.0); + WRITEF(gmesa->buf, TexGen13, 0.0); + WRITEF(gmesa->buf, TexGen14, 0.0); + WRITEF(gmesa->buf, TexGen15, 0.0); + + CHECK_DMA_BUFFER(gmesa, 9); + WRITEF(gmesa->buf, NormalMatrix0, 1.0); + WRITEF(gmesa->buf, NormalMatrix1, 0.0); + WRITEF(gmesa->buf, NormalMatrix2, 0.0); + WRITEF(gmesa->buf, NormalMatrix3, 0.0); + WRITEF(gmesa->buf, NormalMatrix4, 1.0); + WRITEF(gmesa->buf, NormalMatrix5, 0.0); + WRITEF(gmesa->buf, NormalMatrix6, 0.0); + WRITEF(gmesa->buf, NormalMatrix7, 0.0); + WRITEF(gmesa->buf, NormalMatrix8, 1.0); + + CHECK_DMA_BUFFER(gmesa, 3); + WRITEF(gmesa->buf, FogDensity, 0.0); + WRITEF(gmesa->buf, FogEnd, 0.0); + WRITEF(gmesa->buf, FogScale, 0.0); + + CHECK_DMA_BUFFER(gmesa, 2); + WRITEF(gmesa->buf, LineClipLengthThreshold, 0.0); + WRITEF(gmesa->buf, TriangleClipAreaThreshold, 0.0); + + CHECK_DMA_BUFFER(gmesa, 5); + WRITE(gmesa->buf, GeometryMode, gmesa->GeometryMode); + WRITE(gmesa->buf, NormalizeMode, NormalizeModeDisable); + WRITE(gmesa->buf, LightingMode, gmesa->LightingMode); + WRITE(gmesa->buf, ColorMaterialMode, ColorMaterialModeDisable); + WRITE(gmesa->buf, MaterialMode, MaterialModeDisable); + + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, FrontSpecularExponent, 0); /* fixed point */ + WRITE(gmesa->buf, BackSpecularExponent, 0); /* fixed point */ + + CHECK_DMA_BUFFER(gmesa, 29); + WRITEF(gmesa->buf, FrontAmbientColorRed, 0.2); + WRITEF(gmesa->buf, FrontAmbientColorGreen, 0.2); + WRITEF(gmesa->buf, FrontAmbientColorBlue, 0.2); + WRITEF(gmesa->buf, BackAmbientColorRed, 0.2); + WRITEF(gmesa->buf, BackAmbientColorGreen, 0.2); + WRITEF(gmesa->buf, BackAmbientColorBlue, 0.2); + WRITEF(gmesa->buf, FrontDiffuseColorRed, 0.8); + WRITEF(gmesa->buf, FrontDiffuseColorGreen, 0.8); + WRITEF(gmesa->buf, FrontDiffuseColorBlue, 0.8); + WRITEF(gmesa->buf, BackDiffuseColorRed, 0.8); + WRITEF(gmesa->buf, BackDiffuseColorGreen, 0.8); + WRITEF(gmesa->buf, BackDiffuseColorBlue, 0.8); + WRITEF(gmesa->buf, FrontSpecularColorRed, 0.0); + WRITEF(gmesa->buf, FrontSpecularColorGreen, 0.0); + WRITEF(gmesa->buf, FrontSpecularColorBlue, 0.0); + WRITEF(gmesa->buf, BackSpecularColorRed, 0.0); + WRITEF(gmesa->buf, BackSpecularColorGreen, 0.0); + WRITEF(gmesa->buf, BackSpecularColorBlue, 0.0); + WRITEF(gmesa->buf, FrontEmissiveColorRed, 0.0); + WRITEF(gmesa->buf, FrontEmissiveColorGreen, 0.0); + WRITEF(gmesa->buf, FrontEmissiveColorBlue, 0.0); + WRITEF(gmesa->buf, BackEmissiveColorRed, 0.0); + WRITEF(gmesa->buf, BackEmissiveColorGreen, 0.0); + WRITEF(gmesa->buf, BackEmissiveColorBlue, 0.0); + WRITEF(gmesa->buf, SceneAmbientColorRed, 0.2); + WRITEF(gmesa->buf, SceneAmbientColorGreen, 0.2); + WRITEF(gmesa->buf, SceneAmbientColorBlue, 0.2); + WRITEF(gmesa->buf, FrontAlpha, 1.0); + WRITEF(gmesa->buf, BackAlpha, 1.0); + + CHECK_DMA_BUFFER(gmesa, 7); + WRITE(gmesa->buf, PointSize, 1); + WRITEF(gmesa->buf, AApointSize, 1.0); + WRITE(gmesa->buf, LineWidth, 1); + WRITEF(gmesa->buf, AAlineWidth, 1.0); + WRITE(gmesa->buf, LineWidthOffset, 0); + WRITE(gmesa->buf, TransformMode, gmesa->TransformMode); + WRITE(gmesa->buf, DeltaMode, gmesa->DeltaMode); + + CHECK_DMA_BUFFER(gmesa, 16); + WRITE(gmesa->buf, Light0Mode, LNM_Off); + WRITE(gmesa->buf, Light1Mode, LNM_Off); + WRITE(gmesa->buf, Light2Mode, LNM_Off); + WRITE(gmesa->buf, Light3Mode, LNM_Off); + WRITE(gmesa->buf, Light4Mode, LNM_Off); + WRITE(gmesa->buf, Light5Mode, LNM_Off); + WRITE(gmesa->buf, Light6Mode, LNM_Off); + WRITE(gmesa->buf, Light7Mode, LNM_Off); + WRITE(gmesa->buf, Light8Mode, LNM_Off); + WRITE(gmesa->buf, Light9Mode, LNM_Off); + WRITE(gmesa->buf, Light10Mode, LNM_Off); + WRITE(gmesa->buf, Light11Mode, LNM_Off); + WRITE(gmesa->buf, Light12Mode, LNM_Off); + WRITE(gmesa->buf, Light13Mode, LNM_Off); + WRITE(gmesa->buf, Light14Mode, LNM_Off); + WRITE(gmesa->buf, Light15Mode, LNM_Off); + + CHECK_DMA_BUFFER(gmesa, 22); + WRITEF(gmesa->buf, Light0AmbientIntensityBlue, 0.0); + WRITEF(gmesa->buf, Light0AmbientIntensityGreen, 0.0); + WRITEF(gmesa->buf, Light0AmbientIntensityRed, 0.0); + WRITEF(gmesa->buf, Light0DiffuseIntensityBlue, 1.0); + WRITEF(gmesa->buf, Light0DiffuseIntensityGreen, 1.0); + WRITEF(gmesa->buf, Light0DiffuseIntensityRed, 1.0); + WRITEF(gmesa->buf, Light0SpecularIntensityBlue, 1.0); + WRITEF(gmesa->buf, Light0SpecularIntensityGreen, 1.0); + WRITEF(gmesa->buf, Light0SpecularIntensityRed, 1.0); + WRITEF(gmesa->buf, Light0SpotlightDirectionZ, 0.0); + WRITEF(gmesa->buf, Light0SpotlightDirectionY, 0.0); + WRITEF(gmesa->buf, Light0SpotlightDirectionX, -1.0); + WRITEF(gmesa->buf, Light0SpotlightExponent, 0.0); + WRITEF(gmesa->buf, Light0PositionZ, 0.0); + WRITEF(gmesa->buf, Light0PositionY, 0.0); + WRITEF(gmesa->buf, Light0PositionX, 1.0); + WRITEF(gmesa->buf, Light0PositionW, 0.0); + WRITEF(gmesa->buf, Light0CosSpotlightCutoffAngle, -1.0); + WRITEF(gmesa->buf, Light0ConstantAttenuation, 1.0); + WRITEF(gmesa->buf, Light0LinearAttenuation, 0.0); + WRITEF(gmesa->buf, Light0QuadraticAttenuation,0.0); + + CHECK_DMA_BUFFER(gmesa, 2); + WRITEF(gmesa->buf, XBias, 0.0); + WRITEF(gmesa->buf, YBias, 0.0); + + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, ViewPortScaleX, gmesa->driScreen->fbWidth/4); + WRITEF(gmesa->buf, ViewPortScaleY, gmesa->driScreen->fbHeight/4); + WRITEF(gmesa->buf, ViewPortScaleZ, 1.0f); + WRITEF(gmesa->buf, ViewPortOffsetX, gmesa->x); + WRITEF(gmesa->buf, ViewPortOffsetY, gmesa->y); + WRITEF(gmesa->buf, ViewPortOffsetZ, 0.0f); + + CHECK_DMA_BUFFER(gmesa, 3); + WRITEF(gmesa->buf, Nz, 1.0); + WRITEF(gmesa->buf, Ny, 0.0); + WRITEF(gmesa->buf, Nx, 0.0); + /* Send the initialization commands to the HW */ - FLUSH_DMA_BUFFER(nullCC, gcp); + FLUSH_DMA_BUFFER(gmesa); } - -#endif Index: xc/lib/GL/mesa/src/drv/gamma/gamma_lock.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_lock.c:1.4 --- /dev/null Thu Feb 27 12:26:22 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_lock.c Tue Nov 5 12:46:07 2002 @@ -0,0 +1,58 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_lock.c,v 1.4 2002/11/05 17:46:07 tsi Exp $ */ + +#include "gamma_context.h" + +#ifdef 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 gammaGetLock( gammaContextPtr gmesa, GLuint flags ) +{ + __DRIdrawablePrivate *dPriv = gmesa->driDrawable; + __DRIscreenPrivate *sPriv = gmesa->driScreen; + + drmGetLock( gmesa->driFd, gmesa->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. + */ + DRI_VALIDATE_DRAWABLE_INFO( gmesa->display, sPriv, dPriv ); + + if ( gmesa->lastStamp != dPriv->lastStamp ) { + gmesa->lastStamp = dPriv->lastStamp; + gmesa->new_state |= GAMMA_NEW_WINDOW | GAMMA_NEW_CLIP; + } + + gmesa->numClipRects = dPriv->numClipRects; + gmesa->pClipRects = dPriv->pClipRects; + +#if 0 + gmesa->dirty = ~0; + + if ( sarea->ctxOwner != gmesa->hHWContext ) { + sarea->ctxOwner = gmesa->hHWContext; + gmesa->dirty = GAMMA_UPLOAD_ALL; + } + + for ( i = 0 ; i < gmesa->lastTexHeap ; i++ ) { + if ( sarea->texAge[i] != gmesa->lastTexAge[i] ) { + gammaAgeTextures( gmesa, i ); + } + } +#endif +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_lock.h diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_lock.h:1.1 --- /dev/null Thu Feb 27 12:26:22 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_lock.h Fri Feb 22 16:33:02 2002 @@ -0,0 +1,88 @@ +#ifndef __GAMMA_LOCK_H__ +#define __GAMMA_LOCK_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern void gammaGetLock( gammaContextPtr gmesa, 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( gmesa ) \ + do { \ + char __ret = 0; \ + DEBUG_CHECK_LOCK(); \ + DRM_CAS( gmesa->driHwLock, gmesa->hHWContext, \ + (DRM_LOCK_HELD | gmesa->hHWContext), __ret ); \ + if ( __ret ) \ + gammaGetLock( gmesa, 0 ); \ + DEBUG_LOCK(); \ + } while (0) + +/* Unlock the hardware. + */ +#define UNLOCK_HARDWARE( gmesa ) \ + do { \ + DRM_UNLOCK( gmesa->driFd, \ + gmesa->driHwLock, \ + gmesa->hHWContext ); \ + DEBUG_RESET(); \ + } while (0) + +#endif + +#define GAMMAHW_LOCK( gmesa ) \ + DRM_UNLOCK(gmesa->driFd, gmesa->driHwLock, gmesa->hHWContext); \ + DRM_SPINLOCK(&gmesa->driScreen->pSAREA->drawable_lock, \ + gmesa->driScreen->drawLockID); \ + VALIDATE_DRAWABLE_INFO_NO_LOCK(gmesa); + +#define GAMMAHW_UNLOCK( gmesa ) \ + DRM_SPINUNLOCK(&gmesa->driScreen->pSAREA->drawable_lock, \ + gmesa->driScreen->drawLockID); \ + VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gmesa); + +#endif /* __GAMMA_LOCK_H__ */ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h:1.4 xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h:1.5 --- xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h:1.4 Fri Jun 16 20:02:56 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h Fri Feb 22 16:33:02 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h,v 1.4 2000/06/17 00:02:56 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_macros.h,v 1.5 2002/02/22 21:33:02 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -55,6 +55,8 @@ #define TURN_OFF_TEXTURES_NOT #define DO_VALIDATE +#define GAMMA_DMA_BUFFER_SIZE 4096 + #if 0 #define GAMMA_DMA_SEND_FLAGS DRM_DMA_PRIORITY #define GAMMA_DMA_SEND_FLAGS DRM_DMA_BLOCK @@ -63,10 +65,12 @@ #define GAMMA_DMA_SEND_FLAGS 0 #endif +#if 0 #define GAMMA_DMA_GET_FLAGS \ (DRM_DMA_SMALLER_OK | DRM_DMA_LARGER_OK | DRM_DMA_WAIT) - -#define GAMMA_DMA_BUFFER_SIZE 4096 +#else +#define GAMMA_DMA_GET_FLAGS DRM_DMA_WAIT +#endif #if defined(DEBUG_DRMDMA) || defined(DEBUG_COMMANDS) || defined(DEBUG_VERBOSE) #include @@ -100,6 +104,15 @@ #define DEBUG_ERROR(s) #endif +#define WRITEV(buf,val1,val2,val3,val4) \ +do { \ + buf++->i = 0x9C008300; \ + buf++->f = val1; \ + buf++->f = val2; \ + buf++->f = val3; \ + buf++->f = val4; \ +} while (0) + #define WRITE(buf,reg,val) \ do { \ buf++->i = Glint##reg##Tag; \ @@ -114,22 +127,29 @@ DEBUG_WRITE(("WRITEF(buf, %s, %f);\n", #reg, (float)val)); \ } while (0) -#define CHECK_DMA_BUFFER(gcc,gcp,n) \ +#define CHECK_WC_DMA_BUFFER(gcp,n) \ do { \ + (gcp)->WCbufCount += (n<<1); \ +} while (0) + +#define CHECK_DMA_BUFFER(gcp,n) \ +do { \ if ((gcp)->bufCount+(n<<1) >= (gcp)->bufSize) \ - PROCESS_DMA_BUFFER(gcc,gcp); \ + PROCESS_DMA_BUFFER(gcp); \ (gcp)->bufCount += (n<<1); \ } while (0) -#define CHECK_WC_DMA_BUFFER(gcp,n) \ +#define CHECK_DMA_BUFFER2(gcp,n) \ do { \ - (gcp)->WCbufCount += (n<<1); \ + if ((gcp)->bufCount+n >= (gcp)->bufSize) \ + PROCESS_DMA_BUFFER(gcp); \ + (gcp)->bufCount += n; \ } while (0) -#define FLUSH_DMA_BUFFER(gcc,gcp) \ +#define FLUSH_DMA_BUFFER(gcp) \ do { \ - if (gcp->bufCount) \ - PROCESS_DMA_BUFFER(gcc,gcp); \ + if (gcp->bufCount) \ + PROCESS_DMA_BUFFER(gcp); \ } while (0) #ifdef DONT_SEND_DMA @@ -205,64 +225,45 @@ #define PROCESS_DMA_BUFFER_TOP_HALF(gcp) \ do { \ - SEND_DMA((gcp)->gammaScrnPriv->driScrnPriv->fd, \ + SEND_DMA((gcp)->driFd, \ (gcp)->hHWContext, 1, &(gcp)->bufIndex, &(gcp)->bufCount); \ } while (0) #define PROCESS_DMA_BUFFER_BOTTOM_HALF(gcp) \ do { \ - GET_DMA((gcp)->gammaScrnPriv->driScrnPriv->fd, \ + GET_DMA((gcp)->driFd, \ (gcp)->hHWContext, 1, &(gcp)->bufIndex, &(gcp)->bufSize); \ \ (gcp)->buf = \ - (dmaBuf)(gcp)->gammaScrnPriv->bufs->list[(gcp)->bufIndex].address; \ + (dmaBuf)(gcp)->gammaScreen->bufs->list[(gcp)->bufIndex].address; \ } while (0) -#define PROCESS_DMA_BUFFER(gcc,gcp) \ +#define PROCESS_DMA_BUFFER(gcp) \ do { \ - if (gcc) VALIDATE_DRAWABLE_INFO(gcc, gcp); \ + VALIDATE_DRAWABLE_INFO(gcp); \ PROCESS_DMA_BUFFER_TOP_HALF(gcp); \ PROCESS_DMA_BUFFER_BOTTOM_HALF(gcp); \ } while (0) #ifdef DO_VALIDATE -#define VALIDATE_DRAWABLE_INFO_NO_LOCK(gcc,gcp) \ +#define VALIDATE_DRAWABLE_INFO_NO_LOCK(gcp) \ do { \ - __DRIcontextPrivate *pcp = gcc; \ - __DRIscreenPrivate *psp = pcp->driScreenPriv; \ - __DRIdrawablePrivate *pdp = pcp->driDrawablePriv; \ + __DRIscreenPrivate *psp = gcp->driScreen; \ + __DRIdrawablePrivate *pdp = gcp->driDrawable; \ \ if (*(pdp->pStamp) != pdp->lastStamp) { \ int old_index = pdp->index; \ while (*(pdp->pStamp) != pdp->lastStamp) { \ - DRI_MESA_VALIDATE_DRAWABLE_INFO(pcp->display, psp->myNum, pdp);\ + DRI_VALIDATE_DRAWABLE_INFO_ONCE(gcp->display, psp->myNum, pdp);\ } \ - \ if (pdp->index != old_index) { \ gcp->Window &= ~W_GIDMask; \ gcp->Window |= (pdp->index << 5); \ CHECK_WC_DMA_BUFFER(gcp, 1); \ - WRITEF(gcp->WCbuf, GLINTWindow, gcp->Window); \ - } \ - \ - if (pdp->x != gcp->x || \ - pdp->y != gcp->y) { \ - GLfloat sx, sy, ox, oy; \ - \ - gcp->x = pdp->x; \ - gcp->y = psp->fbHeight - (pdp->y+pdp->h); \ - \ - sx = gcp->w/2.0f; \ - sy = gcp->h/2.0f; \ - ox = gcp->x + sx; \ - oy = gcp->y + sy; \ - \ - CHECK_WC_DMA_BUFFER(gcp, 4); \ - WRITEF(gcp->WCbuf, ViewPortOffsetX, ox); \ - WRITEF(gcp->WCbuf, ViewPortOffsetY, oy); \ - WRITEF(gcp->WCbuf, ViewPortScaleX, sx); \ - WRITEF(gcp->WCbuf, ViewPortScaleY, sy); \ + WRITE(gcp->WCbuf, GLINTWindow, gcp->Window|(gcp->FrameCount<<9));\ } \ + \ + gammaUpdateViewportOffset( gcp->glCtx); \ \ if (pdp->numClipRects == 1 && \ pdp->pClipRects->x1 == pdp->x && \ @@ -270,17 +271,17 @@ pdp->pClipRects->y1 == pdp->y && \ pdp->pClipRects->y2 == (pdp->y+pdp->h)) { \ CHECK_WC_DMA_BUFFER(gcp, 1); \ - WRITEF(gcp->WCbuf, Rectangle2DControl, 0); \ + WRITE(gcp->WCbuf, Rectangle2DControl, 0); \ gcp->NotClipped = GL_TRUE; \ } else { \ CHECK_WC_DMA_BUFFER(gcp, 1); \ - WRITEF(gcp->WCbuf, Rectangle2DControl, 1); \ + WRITE(gcp->WCbuf, Rectangle2DControl, 1); \ gcp->NotClipped = GL_FALSE; \ } \ gcp->WindowChanged = GL_TRUE; \ \ if (gcp->WCbufCount) { \ - SEND_DMA((gcp)->gammaScrnPriv->driScrnPriv->fd, \ + SEND_DMA((gcp)->gammaScreen->driScreen->fd, \ (gcp)->hHWContext, 1, &(gcp)->WCbufIndex, \ &(gcp)->WCbufCount); \ (gcp)->WCbufIndex = -1; \ @@ -288,31 +289,31 @@ } \ } while (0) -#define VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gcc,gcp) \ +#define VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gcp) \ do { \ if ((gcp)->WCbufIndex < 0) { \ - GET_DMA((gcp)->gammaScrnPriv->driScrnPriv->fd, \ + GET_DMA((gcp)->gammaScreen->driScreen->fd, \ (gcp)->hHWContext, 1, &(gcp)->WCbufIndex, \ &(gcp)->WCbufSize); \ \ (gcp)->WCbuf = \ - (dmaBuf)(gcp)->gammaScrnPriv->bufs-> \ + (dmaBuf)(gcp)->gammaScreen->bufs-> \ list[(gcp)->WCbufIndex].address; \ } \ } while (0) -#define VALIDATE_DRAWABLE_INFO(gcc,gcp) \ +#define VALIDATE_DRAWABLE_INFO(gcp) \ do { \ - __DRIcontextPrivate *pcp = gcc; \ - __DRIscreenPrivate *psp = pcp->driScreenPriv; \ - \ + __DRIscreenPrivate *psp = gcp->driScreen; \ +if (gcp->driDrawable) { \ DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ - VALIDATE_DRAWABLE_INFO_NO_LOCK(gcc,gcp); \ + VALIDATE_DRAWABLE_INFO_NO_LOCK(gcp); \ DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \ - VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gcc,gcp); \ + VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gcp); \ +} \ } while (0) #else -#define VALIDATE_DRAWABLE_INFO(gcc,gcp) +#define VALIDATE_DRAWABLE_INFO(gcp) #endif #define CALC_LOG2(l2,s) \ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c:1.3 xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c:removed --- xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c:1.3 Fri Jun 16 20:02:56 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c Thu Feb 27 12:26:22 2003 @@ -1,229 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_matrix.c,v 1.3 2000/06/17 00:02:56 martin 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: - * Kevin E. Martin - * - */ - -#ifdef GLX_DIRECT_RENDERING - -#include "gamma_init.h" - -float IdentityMatrix[16] = -{ - 1.0, 0.0, 0.0, 0.0, - 0.0, 1.0, 0.0, 0.0, - 0.0, 0.0, 1.0, 0.0, - 0.0, 0.0, 0.0, 1.0 -}; - -static void doMultMatrix(GLfloat *p, GLfloat *a, GLfloat *b) -{ -/* Column-major order multiply */ -#define MATRIX_MULT(__p, __a, __b) \ -do { \ - GLint __row; \ - for (__row = 0; __row < 4; __row++) { \ - GLfloat __t[4]; \ - __t[0] = __a[__row]; \ - __t[1] = __a[__row+4]; \ - __t[2] = __a[__row+8]; \ - __t[3] = __a[__row+12]; \ - __p[__row] = (__t[0] * __b[0] + \ - __t[1] * __b[1] + \ - __t[2] * __b[2] + \ - __t[3] * __b[3]); \ - __p[__row+4] = (__t[0] * __b[4] + \ - __t[1] * __b[5] + \ - __t[2] * __b[6] + \ - __t[3] * __b[7]); \ - __p[__row+8] = (__t[0] * __b[8] + \ - __t[1] * __b[9] + \ - __t[2] * __b[10] + \ - __t[3] * __b[11]); \ - __p[__row+12] = (__t[0] * __b[12] + \ - __t[1] * __b[13] + \ - __t[2] * __b[14] + \ - __t[3] * __b[15]); \ - } \ -} while(0) - - if (p == a || p == b) { - GLfloat t[16]; - int i; - - MATRIX_MULT(t,a,b); - for (i = 0; i < 16; i++) p[i] = t[i]; - } else { - MATRIX_MULT(p,a,b); - } - -} - -void gammaSetMatrix(GLfloat m[16]) -{ - int i; - - switch (gCCPriv->MatrixMode) { - case GL_MODELVIEW: - for (i = 0; i < 16; i++) gCCPriv->ModelView[i] = m[i]; - doMultMatrix(gCCPriv->ModelViewProj, - gCCPriv->Proj, gCCPriv->ModelView); - break; - - case GL_PROJECTION: - for (i = 0; i < 16; i++) gCCPriv->Proj[i] = m[i]; - doMultMatrix(gCCPriv->ModelViewProj, gCCPriv->Proj, - gCCPriv->ModelView); - break; - - case GL_TEXTURE: - for (i = 0; i < 16; i++) gCCPriv->Texture[i] = m[i]; - break; - - default: - /* ERROR!!! -- how did this happen? */ - return; - } - -} - -void gammaMultMatrix(GLfloat *m) -{ - switch (gCCPriv->MatrixMode) { - case GL_MODELVIEW: - doMultMatrix(gCCPriv->ModelView, gCCPriv->ModelView, m); - doMultMatrix(gCCPriv->ModelViewProj, - gCCPriv->Proj, gCCPriv->ModelView); - break; - - case GL_PROJECTION: - doMultMatrix(gCCPriv->Proj, gCCPriv->Proj, m); - doMultMatrix(gCCPriv->ModelViewProj, - gCCPriv->Proj, gCCPriv->ModelView); - break; - - case GL_TEXTURE: - doMultMatrix(gCCPriv->Texture, gCCPriv->Texture, m); - break; - - default: - /* ERROR!!! -- how did this happen? */ - break; - } -} - -void gammaLoadHWMatrix(void) -{ - switch (gCCPriv->MatrixMode) { - case GL_MODELVIEW: -#if 0 - /* The ModelView matrix is not currently used */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 16); - WRITEF(gCCPriv->buf, ModelViewMatrix0, gCCPriv->ModelView[0]); - WRITEF(gCCPriv->buf, ModelViewMatrix1, gCCPriv->ModelView[1]); - WRITEF(gCCPriv->buf, ModelViewMatrix2, gCCPriv->ModelView[2]); - WRITEF(gCCPriv->buf, ModelViewMatrix3, gCCPriv->ModelView[3]); - WRITEF(gCCPriv->buf, ModelViewMatrix4, gCCPriv->ModelView[4]); - WRITEF(gCCPriv->buf, ModelViewMatrix5, gCCPriv->ModelView[5]); - WRITEF(gCCPriv->buf, ModelViewMatrix6, gCCPriv->ModelView[6]); - WRITEF(gCCPriv->buf, ModelViewMatrix7, gCCPriv->ModelView[7]); - WRITEF(gCCPriv->buf, ModelViewMatrix8, gCCPriv->ModelView[8]); - WRITEF(gCCPriv->buf, ModelViewMatrix9, gCCPriv->ModelView[9]); - WRITEF(gCCPriv->buf, ModelViewMatrix10, gCCPriv->ModelView[10]); - WRITEF(gCCPriv->buf, ModelViewMatrix11, gCCPriv->ModelView[11]); - WRITEF(gCCPriv->buf, ModelViewMatrix12, gCCPriv->ModelView[12]); - WRITEF(gCCPriv->buf, ModelViewMatrix13, gCCPriv->ModelView[13]); - WRITEF(gCCPriv->buf, ModelViewMatrix14, gCCPriv->ModelView[14]); - WRITEF(gCCPriv->buf, ModelViewMatrix15, gCCPriv->ModelView[15]); -#endif - case GL_PROJECTION: - CHECK_DMA_BUFFER(gCC, gCCPriv, 16); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix0, gCCPriv->ModelViewProj[0]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix1, gCCPriv->ModelViewProj[1]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix2, gCCPriv->ModelViewProj[2]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix3, gCCPriv->ModelViewProj[3]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix4, gCCPriv->ModelViewProj[4]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix5, gCCPriv->ModelViewProj[5]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix6, gCCPriv->ModelViewProj[6]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix7, gCCPriv->ModelViewProj[7]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix8, gCCPriv->ModelViewProj[8]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix9, gCCPriv->ModelViewProj[9]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix10, gCCPriv->ModelViewProj[10]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix11, gCCPriv->ModelViewProj[11]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix12, gCCPriv->ModelViewProj[12]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix13, gCCPriv->ModelViewProj[13]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix14, gCCPriv->ModelViewProj[14]); - WRITEF(gCCPriv->buf, - ModelViewProjectionMatrix15, gCCPriv->ModelViewProj[15]); - break; - - case GL_TEXTURE: - CHECK_DMA_BUFFER(gCC, gCCPriv, 16); - WRITEF(gCCPriv->buf, TextureMatrix0, gCCPriv->Texture[0]); - WRITEF(gCCPriv->buf, TextureMatrix1, gCCPriv->Texture[1]); - WRITEF(gCCPriv->buf, TextureMatrix2, gCCPriv->Texture[2]); - WRITEF(gCCPriv->buf, TextureMatrix3, gCCPriv->Texture[3]); - WRITEF(gCCPriv->buf, TextureMatrix4, gCCPriv->Texture[4]); - WRITEF(gCCPriv->buf, TextureMatrix5, gCCPriv->Texture[5]); - WRITEF(gCCPriv->buf, TextureMatrix6, gCCPriv->Texture[6]); - WRITEF(gCCPriv->buf, TextureMatrix7, gCCPriv->Texture[7]); - WRITEF(gCCPriv->buf, TextureMatrix8, gCCPriv->Texture[8]); - WRITEF(gCCPriv->buf, TextureMatrix9, gCCPriv->Texture[9]); - WRITEF(gCCPriv->buf, TextureMatrix10, gCCPriv->Texture[10]); - WRITEF(gCCPriv->buf, TextureMatrix11, gCCPriv->Texture[11]); - WRITEF(gCCPriv->buf, TextureMatrix12, gCCPriv->Texture[12]); - WRITEF(gCCPriv->buf, TextureMatrix13, gCCPriv->Texture[13]); - WRITEF(gCCPriv->buf, TextureMatrix14, gCCPriv->Texture[14]); - WRITEF(gCCPriv->buf, TextureMatrix15, gCCPriv->Texture[15]); - break; - - default: - /* ERROR!!! -- how did this happen? */ - break; - } -} - -#endif Index: xc/lib/GL/mesa/src/drv/gamma/gamma_region.h diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_region.h:1.2 xc/lib/GL/mesa/src/drv/gamma/gamma_region.h:removed --- xc/lib/GL/mesa/src/drv/gamma/gamma_region.h:1.2 Tue Feb 22 23:46:45 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_region.h Thu Feb 27 12:26:22 2003 @@ -1,45 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_region.h,v 1.2 2000/02/23 04:46:45 martin 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: - * Rik Faith - * Kevin E. Martin - * - */ - -#ifndef _GAMMA_REGION_H_ -#define _GAMMA_REGION_H_ - -typedef struct _gammaRegion { - drmHandle handle; - drmSize size; - drmAddress map; -} gammaRegion, *gammaRegionPtr; - -#endif /* _GAMMA_REGION_H_ */ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h:1.4 xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h:1.5 --- xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h:1.4 Wed Feb 7 08:26:17 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h Fri Feb 22 16:33:02 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h,v 1.4 2001/02/07 13:26:17 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_regs.h,v 1.5 2002/02/22 21:33:02 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -139,6 +139,16 @@ #define AB_AlphaConversionScale 0x00000000 #define AB_AlphaConversionShift 0x00020000 +/* AntialiasMode */ +#define AntialiasModeDisable 0x00000000 +#define AntialiasModeEnable 0x00000001 + +/* AreaStippleMode */ +#define AreaStippleModeDisable 0x00000000 +#define AreaStippleModeEnable 0x00000001 +#define ASM_X32 0x00000008 +#define ASM_Y32 0x00000040 + /* DepthMode */ #define DepthModeDisable 0x00000000 #define DepthModeEnable 0x00000001 @@ -174,6 +184,42 @@ #define LBW_UploadDepth 0x00000002 #define LBW_UploadStencil 0x00000004 +/* LBRead/Write Format */ +#define LBRF_DepthWidth15 0x03 /* only permedia */ +#define LBRF_DepthWidth16 0x00 +#define LBRF_DepthWidth24 0x01 +#define LBRF_DepthWidth32 0x02 +#define LBRF_StencilWidth0 (0 << 2) +#define LBRF_StencilWidth4 (1 << 2) +#define LBRF_StencilWidth8 (2 << 2) +#define LBRF_StencilPos16 (0 << 4) +#define LBRF_StencilPos20 (1 << 4) +#define LBRF_StencilPos24 (2 << 4) +#define LBRF_StencilPos28 (3 << 4) +#define LBRF_StencilPos32 (4 << 4) +#define LBRF_FrameCount0 (0 << 7) +#define LBRF_FrameCount4 (1 << 7) +#define LBRF_FrameCount8 (2 << 7) +#define LBRF_FrameCountPos16 (0 << 9) +#define LBRF_FrameCountPos20 (1 << 9) +#define LBRF_FrameCountPos24 (2 << 9) +#define LBRF_FrameCountPos28 (3 << 9) +#define LBRF_FrameCountPos32 (4 << 9) +#define LBRF_FrameCountPos36 (5 << 9) +#define LBRF_FrameCountPos40 (6 << 9) +#define LBRF_GIDWidth0 (0 << 12) +#define LBRF_GIDWidth4 (1 << 12) +#define LBRF_GIDPos16 (0 << 13) +#define LBRF_GIDPos20 (1 << 13) +#define LBRF_GIDPos24 (2 << 13) +#define LBRF_GIDPos28 (3 << 13) +#define LBRF_GIDPos32 (4 << 13) +#define LBRF_GIDPos36 (5 << 13) +#define LBRF_GIDPos40 (6 << 13) +#define LBRF_GIDPos44 (7 << 13) +#define LBRF_GIDPos48 (8 << 13) +#define LBRF_Compact32 (1 << 17) + /* StencilMode */ #define StencilDisable 0x00000000 #define StencilEnable 0x00000001 @@ -382,7 +428,7 @@ #define TF_LUTOffsetMask 0x0003fc00 #define TF_OneCompFmt_Lum 0x00000000 #define TF_OneCompFmt_Alpha 0x00040000 -#define TF_OneCompFmt_Intesity 0x00080000 +#define TF_OneCompFmt_Intensity 0x00080000 #define TF_OneCompFmt_Mask 0x000c0000 /**************** MX FLAGS ****************/ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_render.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_render.c:1.2 --- /dev/null Thu Feb 27 12:26:22 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_render.c Wed Oct 30 07:51:29 2002 @@ -0,0 +1,317 @@ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * + * 3DLabs Gamma driver. + * + */ + +#include "glheader.h" +#include "context.h" +#include "macros.h" +#include "mem.h" +#include "mtypes.h" +#include "mmath.h" + +#include "tnl/t_context.h" + +#include "gamma_context.h" +#include "gamma_tris.h" +#include "gamma_vb.h" + + +/* !! Should template this eventually !! */ + +static void gamma_emit( GLcontext *ctx, GLuint start, GLuint end) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLfloat (*coord)[4]; + GLuint coord_stride; + GLubyte (*col)[4]; + GLuint col_stride; + int i; + GLuint tc0_stride = 0; + GLfloat (*tc0)[4] = 0; + GLuint tc0_size = 0; + + if (VB->ColorPtr[0]->Type != GL_UNSIGNED_BYTE) + gamma_import_float_colors( ctx ); + + col = VB->ColorPtr[0]->Ptr; + col_stride = VB->ColorPtr[0]->StrideB; + + if (ctx->Texture.Unit[0]._ReallyEnabled) { + tc0_stride = VB->TexCoordPtr[0]->stride; + tc0 = VB->TexCoordPtr[0]->data; + tc0_size = VB->TexCoordPtr[0]->size; + coord = VB->ClipPtr->data; + coord_stride = VB->ClipPtr->stride; + } else { + coord = VB->ProjectedClipPtr->data; + coord_stride = VB->ProjectedClipPtr->stride; + } + + if (VB->importable_data) { + if (start) { + coord = (GLfloat (*)[4])((GLubyte *)coord + start * coord_stride); + STRIDE_4UB(col, start * col_stride); + if (ctx->Texture.Unit[0]._ReallyEnabled) + tc0 = (GLfloat (*)[4])((GLubyte *)tc0 + start * tc0_stride); + } + + if (ctx->Texture.Unit[0]._ReallyEnabled && tc0_size == 4) { + for (i=start; i < end; i++) { + CHECK_DMA_BUFFER(gmesa, 9); + WRITEF(gmesa->buf, Tq4, tc0[0][3]); + WRITEF(gmesa->buf, Tr4, tc0[0][2]); + WRITEF(gmesa->buf, Tt4, tc0[0][0]); + WRITEF(gmesa->buf, Ts4, tc0[0][1]); + WRITE(gmesa->buf, PackedColor4, *(CARD32*)col[0]); + WRITEF(gmesa->buf, Vw, coord[0][3]); + WRITEF(gmesa->buf, Vz, coord[0][2]); + WRITEF(gmesa->buf, Vy, coord[0][1]); + WRITEF(gmesa->buf, Vx4, coord[0][0]); + STRIDE_4UB(col, col_stride); + tc0 = (GLfloat (*)[4])((GLubyte *)tc0 + tc0_stride); + coord = (GLfloat (*)[4])((GLubyte *)coord + coord_stride); + } + } else if (ctx->Texture.Unit[0]._ReallyEnabled && tc0_size == 2) { + for (i=start; i < end; i++) { + CHECK_DMA_BUFFER(gmesa, 7); + WRITEF(gmesa->buf, Tt2, tc0[0][0]); + WRITEF(gmesa->buf, Ts2, tc0[0][1]); + WRITE(gmesa->buf, PackedColor4, *(CARD32*)col[0]); + WRITEF(gmesa->buf, Vw, coord[0][3]); + WRITEF(gmesa->buf, Vz, coord[0][2]); + WRITEF(gmesa->buf, Vy, coord[0][1]); + WRITEF(gmesa->buf, Vx4, coord[0][0]); + STRIDE_4UB(col, col_stride); + tc0 = (GLfloat (*)[4])((GLubyte *)tc0 + tc0_stride); + coord = (GLfloat (*)[4])((GLubyte *)coord + coord_stride); + } + } else { + for (i=start; i < end; i++) { + CHECK_DMA_BUFFER(gmesa, 4); + WRITE(gmesa->buf, PackedColor4, *(CARD32*)col[0]); + WRITEF(gmesa->buf, Vz, coord[0][2]); + WRITEF(gmesa->buf, Vy, coord[0][1]); + WRITEF(gmesa->buf, Vx3, coord[0][0]); + STRIDE_4UB(col, col_stride); + coord = (GLfloat (*)[4])((GLubyte *)coord + coord_stride); + } + } + } else { + if (ctx->Texture.Unit[0]._ReallyEnabled && tc0_size == 4) { + for (i=start; i < end; i++) { + CHECK_DMA_BUFFER(gmesa, 9); + WRITEF(gmesa->buf, Tq4, tc0[i][3]); + WRITEF(gmesa->buf, Tr4, tc0[i][2]); + WRITEF(gmesa->buf, Tt4, tc0[i][0]); + WRITEF(gmesa->buf, Ts4, tc0[i][1]); + WRITE(gmesa->buf, PackedColor4, *(CARD32*)col[i]); + WRITEF(gmesa->buf, Vw, coord[i][3]); + WRITEF(gmesa->buf, Vz, coord[i][2]); + WRITEF(gmesa->buf, Vy, coord[i][1]); + WRITEF(gmesa->buf, Vx4, coord[i][0]); + } + } else if (ctx->Texture.Unit[0]._ReallyEnabled && tc0_size == 2) { + for (i=start; i < end; i++) { + CHECK_DMA_BUFFER(gmesa, 7); + WRITEF(gmesa->buf, Tt2, tc0[i][0]); + WRITEF(gmesa->buf, Ts2, tc0[i][1]); + WRITE(gmesa->buf, PackedColor4, *(CARD32*)col[i]); + WRITEF(gmesa->buf, Vw, coord[i][3]); + WRITEF(gmesa->buf, Vz, coord[i][2]); + WRITEF(gmesa->buf, Vy, coord[i][1]); + WRITEF(gmesa->buf, Vx4, coord[i][0]); + } + } else { + for (i=start; i < end; i++) { + CHECK_DMA_BUFFER(gmesa, 4); + WRITE(gmesa->buf, PackedColor4, *(CARD32*)col[i]); + WRITEF(gmesa->buf, Vz, coord[i][2]); + WRITEF(gmesa->buf, Vy, coord[i][1]); + WRITEF(gmesa->buf, Vx3, coord[i][0]); + } + } + } +} + +#define HAVE_POINTS 1 +#define HAVE_LINES 1 +#define HAVE_LINE_STRIPS 1 +#define HAVE_TRIANGLES 1 +#define HAVE_TRI_STRIPS 1 +#define HAVE_TRI_STRIP_1 0 +#define HAVE_TRI_FANS 1 +#define HAVE_QUADS 1 +#define HAVE_QUAD_STRIPS 1 +#define HAVE_POLYGONS 1 + +#define HAVE_ELTS 0 + +static void VERT_FALLBACK( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.PrimitiveNotify( ctx, flags & PRIM_MODE_MASK ); + tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 ); + tnl->Driver.Render.PrimTabVerts[flags&PRIM_MODE_MASK]( ctx, start, count, flags ); + GAMMA_CONTEXT(ctx)->SetupNewInputs = VERT_CLIP; +} + +static const GLuint hw_prim[GL_POLYGON+1] = { + B_PrimType_Points, + B_PrimType_Lines, + B_PrimType_LineLoop, + B_PrimType_LineStrip, + B_PrimType_Triangles, + B_PrimType_TriangleStrip, + B_PrimType_TriangleFan, + B_PrimType_Quads, + B_PrimType_QuadStrip, + B_PrimType_Polygon +}; + +static __inline void gammaStartPrimitive( gammaContextPtr gmesa, GLenum prim ) +{ + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Begin, gmesa->Begin | hw_prim[prim]); +} + +static __inline void gammaEndPrimitive( gammaContextPtr gmesa ) +{ + GLcontext *ctx = gmesa->glCtx; + + if ( ctx->Line.SmoothFlag || + ctx->Polygon.SmoothFlag || + ctx->Point.SmoothFlag ) { + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, FlushSpan, 0); + } + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, End, 0); +} + +#define LOCAL_VARS gammaContextPtr gmesa = GAMMA_CONTEXT(ctx) +#define INIT( prim ) gammaStartPrimitive( gmesa, prim ) +#define FINISH gammaEndPrimitive( gmesa ) +#define NEW_PRIMITIVE() /* GAMMA_STATECHANGE( gmesa, 0 ) */ +#define NEW_BUFFER() /* GAMMA_FIREVERTICES( gmesa ) */ +#define GET_CURRENT_VB_MAX_VERTS() \ + (gmesa->bufSize - gmesa->bufCount) / 2 +#define GET_SUBSEQUENT_VB_MAX_VERTS() \ + GAMMA_DMA_BUFFER_SIZE / 2 +#define EMIT_VERTS( ctx, j, nr ) gamma_emit(ctx, j, (j)+(nr)) + +#define TAG(x) gamma_##x +#include "tnl_dd/t_dd_dmatmp.h" + + +/**********************************************************************/ +/* Render pipeline stage */ +/**********************************************************************/ + + +static GLboolean gamma_run_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint i, length, flags = 0; + render_func *tab; + + /* GH: THIS IS A HACK!!! */ + if (VB->ClipOrMask || gmesa->RenderIndex != 0) + return GL_TRUE; /* don't handle clipping here */ + + /* We don't do elts */ + if (VB->Elts) + return GL_TRUE; + + tab = TAG(render_tab_verts); + + tnl->Driver.Render.Start( ctx ); + + for (i = VB->FirstPrimitive ; !(flags & PRIM_LAST) ; i += length) + { + flags = VB->Primitive[i]; + length = VB->PrimitiveLength[i]; + if (length) + tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags ); + } + + tnl->Driver.Render.Finish( ctx ); + + return GL_FALSE; /* finished the pipe */ +} + + +static void gamma_check_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + GLuint inputs = VERT_CLIP|VERT_RGBA; + + if (ctx->RenderMode == GL_RENDER) { + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + inputs |= VERT_SPEC_RGB; + + if (ctx->Texture.Unit[0]._ReallyEnabled) + inputs |= VERT_TEX(0); + + if (ctx->Texture.Unit[1]._ReallyEnabled) + inputs |= VERT_TEX(1); + + if (ctx->Fog.Enabled) + inputs |= VERT_FOG_COORD; + } + + stage->inputs = inputs; +} + + +static void dtr( struct gl_pipeline_stage *stage ) +{ + (void)stage; +} + + +const struct gl_pipeline_stage _gamma_render_stage = +{ + "gamma render", + (_DD_NEW_SEPARATE_SPECULAR | + _NEW_TEXTURE| + _NEW_FOG| + _NEW_RENDERMODE), /* re-check (new inputs) */ + 0, /* re-run (always runs) */ + GL_TRUE, /* active */ + 0, 0, /* inputs (set in check_render), outputs */ + 0, 0, /* changed_inputs, private */ + dtr, /* destructor */ + gamma_check_render, /* check - initially set to alloc data */ + gamma_run_render /* run */ +}; Index: xc/lib/GL/mesa/src/drv/gamma/gamma_screen.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_screen.c:1.2 --- /dev/null Thu Feb 27 12:26:22 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_screen.c Wed Oct 30 07:51:29 2002 @@ -0,0 +1,145 @@ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * + */ + +#include "gamma_context.h" +#include "gamma_vb.h" +#include "glint_dri.h" + +#include "mem.h" + +gammaScreenPtr gammaCreateScreen( __DRIscreenPrivate *sPriv ) +{ + gammaScreenPtr gammaScreen; + GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)sPriv->pDevPriv; + int i; + +#if 0 + /* Check the DRI version */ + { + int major, minor, patch; + if ( XF86DRIQueryVersion( sPriv->display, &major, &minor, &patch ) ) { + if ( major != 3 || minor != 1 || patch < 0 ) { + __driUtilMessage( "r128 DRI driver expected DRI version 3.1.x but got version %d.%d.%d", major, minor, patch ); + return GL_FALSE; + } + } + } + + /* Check that the DDX driver version is compatible */ + if ( sPriv->ddxMajor != 4 || + sPriv->ddxMinor != 0 || + sPriv->ddxPatch < 0 ) { + __driUtilMessage( "r128 DRI driver expected DDX driver version 4.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch ); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if ( sPriv->drmMajor != 2 || + sPriv->drmMinor != 1 || + sPriv->drmPatch < 0 ) { + __driUtilMessage( "r128 DRI driver expected DRM driver version 2.1.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + return GL_FALSE; + } +#endif + + /* Allocate the private area */ + gammaScreen = (gammaScreenPtr) CALLOC( sizeof(*gammaScreen) ); + if ( !gammaScreen ) return NULL; + + gammaScreen->regionCount = 4; /* Magic number. Can we fix this? */ + + gammaScreen->regions = Xmalloc(gammaScreen->regionCount * + sizeof(gammaRegion)); + + gammaScreen->regions[0].handle = gDRIPriv->registers0.handle; + gammaScreen->regions[0].size = gDRIPriv->registers0.size; + gammaScreen->regions[1].handle = gDRIPriv->registers1.handle; + gammaScreen->regions[1].size = gDRIPriv->registers1.size; + gammaScreen->regions[2].handle = gDRIPriv->registers2.handle; + gammaScreen->regions[2].size = gDRIPriv->registers2.size; + gammaScreen->regions[3].handle = gDRIPriv->registers3.handle; + gammaScreen->regions[3].size = gDRIPriv->registers3.size; + + /* Next, map all the regions */ + for (i = 0; i < gammaScreen->regionCount; i++) { + if (drmMap(sPriv->fd, + gammaScreen->regions[i].handle, + gammaScreen->regions[i].size, + &gammaScreen->regions[i].map)) { + while (--i > 0) { + (void)drmUnmap(gammaScreen->regions[i].map, + gammaScreen->regions[i].size); + } + return GL_FALSE; + } + } + + /* Get the list of dma buffers */ + gammaScreen->bufs = drmMapBufs(sPriv->fd); + + if (!gammaScreen->bufs) { + while (gammaScreen->regionCount > 0) { + (void)drmUnmap(gammaScreen->regions[gammaScreen->regionCount].map, + gammaScreen->regions[gammaScreen->regionCount].size); + gammaScreen->regionCount--; + } + return GL_FALSE; + } + + gammaScreen->textureSize = gDRIPriv->textureSize; + gammaScreen->logTextureGranularity = gDRIPriv->logTextureGranularity; + gammaScreen->cpp = gDRIPriv->cpp; + gammaScreen->frontOffset = gDRIPriv->frontOffset; + gammaScreen->frontPitch = gDRIPriv->frontPitch; + gammaScreen->backOffset = gDRIPriv->backOffset; + gammaScreen->backPitch = gDRIPriv->backPitch; + gammaScreen->backX = gDRIPriv->backX; + gammaScreen->backY = gDRIPriv->backY; + gammaScreen->depthOffset = gDRIPriv->depthOffset; + gammaScreen->depthPitch = gDRIPriv->depthPitch; + + gammaScreen->driScreen = sPriv; + + return gammaScreen; +} + +/* Destroy the device specific screen private data struct. + */ +void gammaDestroyScreen( __DRIscreenPrivate *sPriv ) +{ + gammaScreenPtr gammaScreen = (gammaScreenPtr)sPriv->private; + + /* First, unmap the dma buffers */ + drmUnmapBufs( gammaScreen->bufs ); + + /* Next, unmap all the regions */ + while (gammaScreen->regionCount > 0) { + (void)drmUnmap(gammaScreen->regions[gammaScreen->regionCount].map, + gammaScreen->regions[gammaScreen->regionCount].size); + gammaScreen->regionCount--; + } + FREE(gammaScreen->regions); + FREE(gammaScreen); +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_screen.h diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_screen.h:1.1 --- /dev/null Thu Feb 27 12:26:22 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_screen.h Fri Feb 22 16:33:02 2002 @@ -0,0 +1,30 @@ +typedef struct _gammaRegion { + drmHandle handle; + drmSize size; + drmAddress map; +} gammaRegion, *gammaRegionPtr; + +typedef struct { + + int regionCount; /* Count of register regions */ + gammaRegion *regions; /* Vector of mapped region info */ + + drmBufMapPtr bufs; /* Map of DMA buffers */ + + __DRIscreenPrivate *driScreen; /* Back pointer to DRI screen */ + + int cpp; + int frontPitch; + int frontOffset; + + int backPitch; + int backOffset; + int backX; + int backY; + + int depthOffset; + int depthPitch; + + int textureSize; + int logTextureGranularity; +} gammaScreenRec, *gammaScreenPtr; Index: xc/lib/GL/mesa/src/drv/gamma/gamma_span.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_span.c:1.4 --- /dev/null Thu Feb 27 12:26:22 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_span.c Tue Nov 5 12:46:07 2002 @@ -0,0 +1,341 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_span.c,v 1.4 2002/11/05 17:46:07 tsi Exp $ */ + +#include "gamma_context.h" +#include "gamma_lock.h" + +#include "swrast/swrast.h" + +#define DBG 0 + +#define LOCAL_VARS \ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); \ + gammaScreenPtr gammascrn = gmesa->gammaScreen; \ + __DRIscreenPrivate *sPriv = gmesa->driScreen; \ + __DRIdrawablePrivate *dPriv = gmesa->driDrawable; \ + GLuint pitch = sPriv->fbWidth * gammascrn->cpp; \ + GLuint height = dPriv->h; \ + char *buf = (char *)(sPriv->pFB + \ + gmesa->drawOffset + \ + (dPriv->x * gammascrn->cpp) + \ + (dPriv->y * pitch)); \ + char *read_buf = (char *)(sPriv->pFB + \ + gmesa->readOffset + \ + (dPriv->x * gammascrn->cpp) + \ + (dPriv->y * pitch)); \ + GLuint p; \ + (void) read_buf; (void) buf; (void) p + +/* FIXME! Depth/Stencil read/writes don't work ! */ +#define LOCAL_DEPTH_VARS \ + gammaScreenPtr gammascrn = gmesa->gammaScreen; \ + __DRIdrawablePrivate *dPriv = gmesa->driDrawable; \ + __DRIscreenPrivate *sPriv = gmesa->driScreen; \ + GLuint pitch = gammascrn->depthPitch; \ + GLuint height = dPriv->h; \ + char *buf = (char *)(sPriv->pFB + \ + gammascrn->depthOffset + \ + dPriv->x * gammascrn->cpp + \ + dPriv->y * pitch) + +#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS + + +#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() \ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); \ + FLUSH_DMA_BUFFER(gmesa); \ + gammaGetLock( gmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT ); \ + GAMMAHW_LOCK( gmesa ); + +#define HW_CLIPLOOP() \ + do { \ + __DRIdrawablePrivate *dPriv = gmesa->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() GAMMAHW_UNLOCK( gmesa ) + + + +/* ================================================================ + * Color buffer + */ + +/* 16 bit, RGB565 color spanline and pixel functions + */ +#define INIT_MONO_PIXEL(p, color) \ + p = PACK_COLOR_565( color[0], color[1], color[2] ) + +#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) gamma##x##_RGB565 +#include "spantmp.h" + + +/* 32 bit, ARGB8888 color spanline and pixel functions + */ + +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = PACK_COLOR_8888( color[3], color[0], color[1], color[2] ) + +#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) gamma##x##_ARGB8888 +#include "spantmp.h" + + +/* 16 bit depthbuffer functions. + */ +#define WRITE_DEPTH( _x, _y, d ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = d; + +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLushort *)(buf + _x*2 + _y*pitch); + +#define TAG(x) gamma##x##_16 +#include "depthtmp.h" + + + +#if 0 /* Unused */ +/* 32 bit depthbuffer functions. + */ +#define WRITE_DEPTH( _x, _y, d ) \ + *(GLuint *)(buf + _x*4 + _y*pitch) = d; + +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLuint *)(buf + _x*4 + _y*pitch); + +#define TAG(x) gamma##x##_32 +#include "depthtmp.h" +#endif + + +/* 24/8 bit interleaved depth/stencil functions + */ +#define WRITE_DEPTH( _x, _y, d ) { \ + GLuint tmp = *(GLuint *)(buf + _x*4 + _y*pitch); \ + tmp &= 0xff; \ + tmp |= (d) & 0xffffff00; \ + *(GLuint *)(buf + _x*4 + _y*pitch) = tmp; \ +} + +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLuint *)(buf + _x*4 + _y*pitch) & ~0xff; + + +#define TAG(x) gamma##x##_24_8 +#include "depthtmp.h" + +#if 0 +#define WRITE_STENCIL( _x, _y, d ) { \ + GLuint tmp = *(GLuint *)(buf + _x*4 + _y*pitch); \ + tmp &= 0xffffff00; \ + tmp |= d & 0xff; \ + *(GLuint *)(buf + _x*4 + _y*pitch) = tmp; \ +} + +#define READ_STENCIL( d, _x, _y ) \ + d = *(GLuint *)(buf + _x*4 + _y*pitch) & 0xff; + +#define TAG(x) gamma##x##_24_8 +#include "stenciltmp.h" + +static void gammaReadRGBASpan8888( const GLcontext *ctx, + GLuint n, GLint x, GLint y, + GLubyte rgba[][4]) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + gammaScreenPtr gammascrn = gmesa->gammaScreen; + CARD32 dwords1, dwords2, i = 0; + char *src = (char *)rgba[0]; + GLuint read = n * gammascrn->cpp; /* Number of bytes we are expecting */ + CARD32 data; + + FLUSH_DMA_BUFFER(gmesa); + CHECK_DMA_BUFFER(gmesa, 16); + WRITE(gmesa->buf, LBReadMode, gmesa->LBReadMode & ~(LBReadSrcEnable | LBReadDstEnable)); + WRITE(gmesa->buf, ColorDDAMode, ColorDDAEnable); + WRITE(gmesa->buf, LBWriteMode, LBWriteModeDisable); + WRITE(gmesa->buf, FBReadMode, (gmesa->FBReadMode & ~FBReadSrcEnable) | FBReadDstEnable | FBDataTypeColor); + WRITE(gmesa->buf, FilterMode, 0x200); /* Pass FBColorData */ + WRITE(gmesa->buf, FBWriteMode, FBW_UploadColorData | FBWriteModeDisable); + WRITE(gmesa->buf, StartXSub, (x+n)<<16); + WRITE(gmesa->buf, StartXDom, x<<16); + WRITE(gmesa->buf, StartY, y<<16); + WRITE(gmesa->buf, GLINTCount, 1); + WRITE(gmesa->buf, dXDom, 0<<16); + WRITE(gmesa->buf, dXSub, 0<<16); + WRITE(gmesa->buf, dY, 1<<16); + WRITE(gmesa->buf, Render, PrimitiveTrapezoid); + FLUSH_DMA_BUFFER(gmesa); + +moredata: + + dwords1 = *(volatile CARD32*)(void *)(((CARD8*)gammascrn->regions[0].map) + (GlintOutFIFOWords)); + dwords2 = *(volatile CARD32*)(void *)(((CARD8*)gammascrn->regions[2].map) + (GlintOutFIFOWords)); + + if (dwords1) { + memcpy(src, (char*)gammascrn->regions[1].map + 0x1000, dwords1 << 2); + src += dwords1 << 2; + read -= dwords1 << 2; + } + if (dwords2) { + memcpy(src, (char*)gammascrn->regions[3].map + 0x1000, dwords2 << 2); + src += dwords2 << 2; + read -= dwords2 << 2; + } + + if (read) + goto moredata; + +done: + + CHECK_DMA_BUFFER(gmesa, 6); + WRITE(gmesa->buf, ColorDDAMode, gmesa->ColorDDAMode); + WRITE(gmesa->buf, LBWriteMode, LBWriteModeEnable); + WRITE(gmesa->buf, LBReadMode, gmesa->LBReadMode); + WRITE(gmesa->buf, FBReadMode, gmesa->FBReadMode); + WRITE(gmesa->buf, FBWriteMode, FBWriteModeEnable); + WRITE(gmesa->buf, FilterMode, 0x400); +} +#endif + +static void gammaSetReadBuffer( GLcontext *ctx, + GLframebuffer *colorBuffer, + GLenum mode ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + switch ( mode ) { + case GL_FRONT_LEFT: + gmesa->readOffset = 0; + break; + case GL_BACK_LEFT: + gmesa->readOffset = gmesa->driScreen->fbHeight * gmesa->driScreen->fbWidth * gmesa->gammaScreen->cpp; + break; + } +} + + +void gammaDDInitSpanFuncs( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); + + swdd->SetReadBuffer = gammaSetReadBuffer; + + switch ( gmesa->gammaScreen->cpp ) { + case 2: + swdd->WriteRGBASpan = gammaWriteRGBASpan_RGB565; + swdd->WriteRGBSpan = gammaWriteRGBSpan_RGB565; + swdd->WriteMonoRGBASpan = gammaWriteMonoRGBASpan_RGB565; + swdd->WriteRGBAPixels = gammaWriteRGBAPixels_RGB565; + swdd->WriteMonoRGBAPixels = gammaWriteMonoRGBAPixels_RGB565; + swdd->ReadRGBASpan = gammaReadRGBASpan_RGB565; + swdd->ReadRGBAPixels = gammaReadRGBAPixels_RGB565; + break; + + case 4: + swdd->WriteRGBASpan = gammaWriteRGBASpan_ARGB8888; + swdd->WriteRGBSpan = gammaWriteRGBSpan_ARGB8888; + swdd->WriteMonoRGBASpan = gammaWriteMonoRGBASpan_ARGB8888; + swdd->WriteRGBAPixels = gammaWriteRGBAPixels_ARGB8888; + swdd->WriteMonoRGBAPixels = gammaWriteMonoRGBAPixels_ARGB8888; +#if 1 + swdd->ReadRGBASpan = gammaReadRGBASpan_ARGB8888; +#else + swdd->ReadRGBASpan = gammaReadRGBASpan8888; +#endif + swdd->ReadRGBAPixels = gammaReadRGBAPixels_ARGB8888; + break; + + default: + break; + } + + switch ( gmesa->glCtx->Visual.depthBits ) { + case 16: + swdd->ReadDepthSpan = gammaReadDepthSpan_16; + swdd->WriteDepthSpan = gammaWriteDepthSpan_16; + swdd->ReadDepthPixels = gammaReadDepthPixels_16; + swdd->WriteDepthPixels = gammaWriteDepthPixels_16; + break; + + case 24: + swdd->ReadDepthSpan = gammaReadDepthSpan_24_8; + swdd->WriteDepthSpan = gammaWriteDepthSpan_24_8; + swdd->ReadDepthPixels = gammaReadDepthPixels_24_8; + swdd->WriteDepthPixels = gammaWriteDepthPixels_24_8; + +#if 0 + swdd->ReadStencilSpan = gammaReadStencilSpan_24_8; + swdd->WriteStencilSpan = gammaWriteStencilSpan_24_8; + swdd->ReadStencilPixels = gammaReadStencilPixels_24_8; + swdd->WriteStencilPixels = gammaWriteStencilPixels_24_8; +#endif + break; + + default: + break; + } +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_state.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_state.c:1.5 --- /dev/null Thu Feb 27 12:26:22 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_state.c Tue Nov 5 12:46:07 2002 @@ -0,0 +1,1734 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_state.c,v 1.5 2002/11/05 17:46:07 tsi Exp $ */ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * + * 3DLabs Gamma driver + */ + +#include +#include "gamma_context.h" +#include "gamma_macros.h" +#include "macros.h" +#include "glint_dri.h" +#include "colormac.h" +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" + +#define ENABLELIGHTING 0 + +/* ============================================================= + * Alpha blending + */ + +static void gammaUpdateAlphaMode( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + CARD32 a = gmesa->AlphaTestMode; + CARD32 b = gmesa->AlphaBlendMode; + CARD32 f = gmesa->AB_FBReadMode_Save = 0; + + a &= ~(AT_CompareMask | AT_RefValueMask); + b &= ~(AB_SrcBlendMask | AB_DstBlendMask); + + a |= ctx->Color.AlphaRef << 4; + + switch ( ctx->Color.AlphaFunc ) { + case GL_NEVER: + a |= AT_Never; + break; + case GL_LESS: + a |= AT_Less; + break; + case GL_EQUAL: + a |= AT_Equal; + break; + case GL_LEQUAL: + a |= AT_LessEqual; + break; + case GL_GEQUAL: + a |= AT_GreaterEqual; + break; + case GL_GREATER: + a |= AT_Greater; + break; + case GL_NOTEQUAL: + a |= AT_NotEqual; + break; + case GL_ALWAYS: + a |= AT_Always; + break; + } + + if ( ctx->Color.AlphaEnabled ) { + f |= FBReadDstEnable; + a |= AlphaTestModeEnable; + } else { + a &= ~AlphaTestModeEnable; + } + + switch ( ctx->Color.BlendSrcRGB ) { + case GL_ZERO: + b |= AB_Src_Zero; + break; + case GL_ONE: + b |= AB_Src_One; + break; + case GL_DST_COLOR: + b |= AB_Src_DstColor; + break; + case GL_ONE_MINUS_DST_COLOR: + b |= AB_Src_OneMinusDstColor; + break; + case GL_SRC_ALPHA: + b |= AB_Src_SrcAlpha; + break; + case GL_ONE_MINUS_SRC_ALPHA: + b |= AB_Src_OneMinusSrcAlpha; + break; + case GL_DST_ALPHA: + b |= AB_Src_DstAlpha; + f |= FBReadSrcEnable; + break; + case GL_ONE_MINUS_DST_ALPHA: + b |= AB_Src_OneMinusDstAlpha; + f |= FBReadSrcEnable; + break; + case GL_SRC_ALPHA_SATURATE: + b |= AB_Src_SrcAlphaSaturate; + break; + } + + switch ( ctx->Color.BlendDstRGB ) { + case GL_ZERO: + b |= AB_Dst_Zero; + break; + case GL_ONE: + b |= AB_Dst_One; + break; + case GL_SRC_COLOR: + b |= AB_Dst_SrcColor; + break; + case GL_ONE_MINUS_SRC_COLOR: + b |= AB_Dst_OneMinusSrcColor; + break; + case GL_SRC_ALPHA: + b |= AB_Dst_SrcAlpha; + break; + case GL_ONE_MINUS_SRC_ALPHA: + b |= AB_Dst_OneMinusSrcAlpha; + break; + case GL_DST_ALPHA: + b |= AB_Dst_DstAlpha; + f |= FBReadSrcEnable; + break; + case GL_ONE_MINUS_DST_ALPHA: + b |= AB_Dst_OneMinusDstAlpha; + f |= FBReadSrcEnable; + break; + } + + if ( ctx->Color.BlendEnabled ) { + f |= FBReadDstEnable; + b |= AlphaBlendModeEnable; + } else { + b &= ~AlphaBlendModeEnable; + } + + if ( gmesa->AlphaTestMode != a ) { + gmesa->AlphaTestMode = a; + gmesa->dirty |= GAMMA_UPLOAD_ALPHA; + } + if ( gmesa->AlphaBlendMode != b) { + gmesa->AlphaBlendMode = b; + gmesa->dirty |= GAMMA_UPLOAD_BLEND; + } + gmesa->AB_FBReadMode_Save = f; +} + +static void gammaDDAlphaFunc( GLcontext *ctx, GLenum func, GLchan ref ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + + gmesa->new_state |= GAMMA_NEW_ALPHA; +} + +static void gammaDDBlendEquation( GLcontext *ctx, GLenum mode ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + + gmesa->new_state |= GAMMA_NEW_ALPHA; +} + +static void gammaDDBlendFunc( GLcontext *ctx, GLenum sfactor, GLenum dfactor ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + + gmesa->new_state |= GAMMA_NEW_ALPHA; +} + +static void gammaDDBlendFuncSeparate( GLcontext *ctx, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + + gmesa->new_state |= GAMMA_NEW_ALPHA; +} + + +/* ================================================================ + * Buffer clear + */ + +static void gammaDDClear( GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)gmesa->driScreen->pDevPriv; + GLuint temp = 0; + + FLUSH_BATCH( gmesa ); + + /* Update and emit any new state. We need to do this here to catch + * changes to the masks. + * FIXME: Just update the masks? + */ + if ( gmesa->new_state ) + gammaDDUpdateHWState( ctx ); + +#ifdef DO_VALIDATE + /* Flush any partially filled buffers */ + FLUSH_DMA_BUFFER(gmesa); + + DRM_SPINLOCK(&gmesa->driScreen->pSAREA->drawable_lock, + gmesa->driScreen->drawLockID); + VALIDATE_DRAWABLE_INFO_NO_LOCK(gmesa); +#endif + + if (mask & DD_DEPTH_BIT) { + /* Turn off writes the FB */ + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, FBWriteMode, FBWriteModeDisable); + + mask &= ~DD_DEPTH_BIT; + + /* + * Turn Rectangle2DControl off when the window is not clipped + * (i.e., the GID tests are not necessary). This dramatically + * increases the performance of the depth clears. + */ + if (!gmesa->NotClipped) { + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Rectangle2DControl, 1); + } + + temp = (gmesa->LBReadMode & LBPartialProdMask) | LBWindowOriginBot; + if (gDRIPriv->numMultiDevices == 2) temp |= LBScanLineInt2; + + CHECK_DMA_BUFFER(gmesa, 5); + WRITE(gmesa->buf, LBReadMode, temp); + WRITE(gmesa->buf, DeltaMode, DM_DepthEnable); + WRITE(gmesa->buf, DepthMode, (DepthModeEnable | + DM_Always | + DM_SourceDepthRegister | + DM_WriteMask)); + WRITE(gmesa->buf, GLINTDepth, gmesa->ClearDepth); + + /* Increment the frame count */ + gmesa->FrameCount++; +#ifdef FAST_CLEAR_4 + gmesa->FrameCount &= 0x0f; +#else + gmesa->FrameCount &= 0xff; +#endif + + /* Force FCP to be written */ + WRITE(gmesa->buf, GLINTWindow, (WindowEnable | + W_PassIfEqual | + (gmesa->Window & W_GIDMask) | + W_DepthFCP | + W_LBUpdateFromRegisters | + W_OverrideWriteFiltering | + (gmesa->FrameCount << 9))); + + /* Clear part of the depth and FCP buffers */ + { + int y = gmesa->driScreen->fbHeight - gmesa->driDrawable->y - gmesa->driDrawable->h; + int x = gmesa->driDrawable->x; + int w = gmesa->driDrawable->w; + int h = gmesa->driDrawable->h; +#ifndef TURN_OFF_FCP + float hsub = h; + + if (gmesa->WindowChanged) { + gmesa->WindowChanged = GL_FALSE; + } else { +#ifdef FAST_CLEAR_4 + hsub /= 16; +#else + hsub /= 256; +#endif + + /* Handle the case where the height < # of FCPs */ + if (hsub < 1.0) { + if (gmesa->FrameCount > h) + gmesa->FrameCount = 0; + h = 1; + y += gmesa->FrameCount; + } else { + h = (gmesa->FrameCount+1)*hsub; + h -= (int)(gmesa->FrameCount*hsub); + y += gmesa->FrameCount*hsub; + } + } +#endif + if (h && w) { +#if 0 + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, Rectangle2DMode, ((h & 0xfff)<<12) | + (w & 0xfff) ); + WRITE(gmesa->buf, DrawRectangle2D, ((y & 0xffff)<<16) | + (x & 0xffff) ); +#else + CHECK_DMA_BUFFER(gmesa, 8); + WRITE(gmesa->buf, StartXDom, x<<16); + WRITE(gmesa->buf, StartY, y<<16); + WRITE(gmesa->buf, StartXSub, (x+w)<<16); + WRITE(gmesa->buf, GLINTCount, h); + WRITE(gmesa->buf, dY, 1<<16); + WRITE(gmesa->buf, dXDom, 0<<16); + WRITE(gmesa->buf, dXSub, 0<<16); + WRITE(gmesa->buf, Render, 0x00000040); /* NOT_DONE */ +#endif + } + } + + CHECK_DMA_BUFFER(gmesa, 6); + WRITE(gmesa->buf, DepthMode, gmesa->DepthMode); + WRITE(gmesa->buf, DeltaMode, gmesa->DeltaMode); + WRITE(gmesa->buf, LBReadMode, gmesa->LBReadMode); + WRITE(gmesa->buf, GLINTWindow, gmesa->Window); + WRITE(gmesa->buf, FastClearDepth, gmesa->ClearDepth); + WRITE(gmesa->buf, FBWriteMode, FBWriteModeEnable); + + /* Turn on Depth FCP */ + if (gmesa->Window & W_DepthFCP) { + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, WindowOr, (gmesa->FrameCount << 9)); + } + + /* Turn off GID clipping if window is not clipped */ + if (gmesa->NotClipped) { + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Rectangle2DControl, 0); + } + } + + if (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)) { + int y = gmesa->driScreen->fbHeight - gmesa->driDrawable->y - gmesa->driDrawable->h; + int x = gmesa->driDrawable->x; + int w = gmesa->driDrawable->w; + int h = gmesa->driDrawable->h; + + mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT); + + if (x < 0) { w -= -x; x = 0; } + + /* Turn on GID clipping if window is clipped */ + if (!gmesa->NotClipped) { + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Rectangle2DControl, 1); + } + + CHECK_DMA_BUFFER(gmesa, 18); + WRITE(gmesa->buf, FBBlockColor, gmesa->ClearColor); + WRITE(gmesa->buf, ColorDDAMode, ColorDDADisable); + WRITE(gmesa->buf, FBWriteMode, FBWriteModeEnable); + WRITE(gmesa->buf, DepthMode, 0); + WRITE(gmesa->buf, DeltaMode, 0); + WRITE(gmesa->buf, AlphaBlendMode, 0); +#if 1 + WRITE(gmesa->buf, dY, 1<<16); + WRITE(gmesa->buf, dXDom, 0<<16); + WRITE(gmesa->buf, dXSub, 0<<16); + WRITE(gmesa->buf, StartXSub, (x+w)<<16); + WRITE(gmesa->buf, GLINTCount, h); + WRITE(gmesa->buf, StartXDom, x<<16); + WRITE(gmesa->buf, StartY, y<<16); + WRITE(gmesa->buf, Render, 0x00000048); /* NOT_DONE */ +#else + WRITE(gmesa->buf, Rectangle2DMode, (((h & 0xfff)<<12) | + (w & 0xfff))); + WRITE(gmesa->buf, DrawRectangle2D, (((y & 0xffff)<<16) | + (x & 0xffff))); +#endif + WRITE(gmesa->buf, DepthMode, gmesa->DepthMode); + WRITE(gmesa->buf, DeltaMode, gmesa->DeltaMode); + WRITE(gmesa->buf, AlphaBlendMode, gmesa->AlphaBlendMode); + WRITE(gmesa->buf, ColorDDAMode, gmesa->ColorDDAMode); + + /* Turn off GID clipping if window is clipped */ + if (gmesa->NotClipped) { + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Rectangle2DControl, 0); + } + } + +#ifdef DO_VALIDATE + PROCESS_DMA_BUFFER_TOP_HALF(gmesa); + + DRM_SPINUNLOCK(&gmesa->driScreen->pSAREA->drawable_lock, + gmesa->driScreen->drawLockID); + VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gmesa); + + PROCESS_DMA_BUFFER_BOTTOM_HALF(gmesa); +#endif + + if ( mask ) + _swrast_Clear( ctx, mask, all, cx, cy, cw, ch ); +} + +/* ============================================================= + * Depth testing + */ + +static void gammaUpdateZMode( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + CARD32 z = gmesa->DepthMode; + CARD32 delta = gmesa->DeltaMode; + CARD32 window = gmesa->Window; + CARD32 lbread = gmesa->LBReadMode; + + z &= ~DM_CompareMask; + + switch ( ctx->Depth.Func ) { + case GL_NEVER: + z |= DM_Never; + break; + case GL_ALWAYS: + z |= DM_Always; + break; + case GL_LESS: + z |= DM_Less; + break; + case GL_LEQUAL: + z |= DM_LessEqual; + break; + case GL_EQUAL: + z |= DM_Equal; + break; + case GL_GEQUAL: + z |= DM_GreaterEqual; + break; + case GL_GREATER: + z |= DM_Greater; + break; + case GL_NOTEQUAL: + z |= DM_NotEqual; + break; + } + + if ( ctx->Depth.Test ) { + z |= DepthModeEnable; + delta |= DM_DepthEnable; + window |= W_DepthFCP; + lbread |= LBReadDstEnable; + } else { + z &= ~DepthModeEnable; + delta &= ~DM_DepthEnable; + window &= ~W_DepthFCP; + lbread &= ~LBReadDstEnable; + } + + if ( ctx->Depth.Mask ) { + z |= DM_WriteMask; + } else { + z &= ~DM_WriteMask; + } + +#if 0 + if ( gmesa->DepthMode != z ){ +#endif + gmesa->DepthMode = z; + gmesa->DeltaMode = delta; + gmesa->Window = window; + gmesa->LBReadMode = lbread; + gmesa->dirty |= GAMMA_UPLOAD_DEPTH; +#if 0 + } +#endif +} + +static void gammaDDDepthFunc( GLcontext *ctx, GLenum func ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_DEPTH; +} + +static void gammaDDDepthMask( GLcontext *ctx, GLboolean flag ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_DEPTH; +} + +static void gammaDDClearDepth( GLcontext *ctx, GLclampd d ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + switch ( gmesa->DepthSize ) { + case 16: + gmesa->ClearDepth = d * 0x0000ffff; + break; + case 24: + gmesa->ClearDepth = d * 0x00ffffff; + break; + case 32: + gmesa->ClearDepth = d * 0xffffffff; + break; + } +} + +static void gammaDDFinish( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_DMA_BUFFER(gmesa); +} + +static void gammaDDFlush( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_DMA_BUFFER(gmesa); +} + +/* ============================================================= + * Fog + */ + +static void gammaUpdateFogAttrib( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + CARD32 f = gmesa->FogMode; + CARD32 g = gmesa->GeometryMode; + CARD32 d = gmesa->DeltaMode; + + if (ctx->Fog.Enabled) { + f |= FogModeEnable; + g |= GM_FogEnable; + d |= DM_FogEnable; + } else { + f &= ~FogModeEnable; + g &= ~GM_FogEnable; + d &= ~DM_FogEnable; + } + + g &= ~GM_FogMask; + + switch (ctx->Fog.Mode) { + case GL_LINEAR: + g |= GM_FogLinear; + break; + case GL_EXP: + g |= GM_FogExp; + break; + case GL_EXP2: + g |= GM_FogExpSquared; + break; + } + + if ( gmesa->FogMode != f ) { + gmesa->FogMode = f; + gmesa->dirty |= GAMMA_UPLOAD_FOG; + } + + if ( gmesa->GeometryMode != g ) { + gmesa->GeometryMode = g; + gmesa->dirty |= GAMMA_UPLOAD_GEOMETRY; + } + + if ( gmesa->DeltaMode != d ) { + gmesa->DeltaMode = d; + gmesa->dirty |= GAMMA_UPLOAD_DEPTH; + } +} + +static void gammaDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_FOG; +} + +/* ============================================================= + * Lines + */ +static void gammaDDLineWidth( GLcontext *ctx, GLfloat width ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + CHECK_DMA_BUFFER(gmesa, 3); + WRITE(gmesa->buf, LineWidth, (GLuint)width); + WRITEF(gmesa->buf, AAlineWidth, width); + WRITE(gmesa->buf, LineWidthOffset, (GLuint)(width-1)/2); +} + +static void gammaDDLineStipple( GLcontext *ctx, GLint factor, GLushort pattern ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + gmesa->LineMode &= ~(LM_StippleMask | LM_RepeatFactorMask); + gmesa->LineMode |= ((GLuint)(factor - 1) << 1) | ((GLuint)pattern << 10); + + gmesa->dirty |= GAMMA_UPLOAD_LINEMODE; +} + + + +/* ============================================================= + * Points + */ +static void gammaDDPointSize( GLcontext *ctx, GLfloat size ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, PointSize, (GLuint)size); + WRITEF(gmesa->buf, AApointSize, size); +} + +/* ============================================================= + * Polygon + */ + +static void gammaUpdatePolygon( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + CARD32 g = gmesa->GeometryMode; + + g &= ~(GM_PolyOffsetFillEnable | GM_PolyOffsetPointEnable | + GM_PolyOffsetLineEnable); + + if (ctx->Polygon.OffsetFill) g |= GM_PolyOffsetFillEnable; + if (ctx->Polygon.OffsetPoint) g |= GM_PolyOffsetPointEnable; + if (ctx->Polygon.OffsetLine) g |= GM_PolyOffsetLineEnable; + + g &= ~GM_FB_PolyMask; + + switch (ctx->Polygon.FrontMode) { + case GL_FILL: + g |= GM_FrontPolyFill; + break; + case GL_LINE: + g |= GM_FrontPolyLine; + break; + case GL_POINT: + g |= GM_FrontPolyPoint; + break; + } + + switch (ctx->Polygon.BackMode) { + case GL_FILL: + g |= GM_BackPolyFill; + break; + case GL_LINE: + g |= GM_BackPolyLine; + break; + case GL_POINT: + g |= GM_BackPolyPoint; + break; + } + + if ( gmesa->GeometryMode != g ) { + gmesa->GeometryMode = g; + gmesa->dirty |= GAMMA_UPLOAD_GEOMETRY; + } + + gmesa->dirty |= GAMMA_UPLOAD_POLYGON; +} + +static void gammaDDPolygonMode( GLcontext *ctx, GLenum face, GLenum mode) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + + gmesa->new_state |= GAMMA_NEW_POLYGON; +} + +static void gammaUpdateStipple( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + + if (ctx->Polygon.StippleFlag) { + gmesa->AreaStippleMode |= AreaStippleModeEnable/* | ASM_X32 | ASM_Y32*/; + } else { + gmesa->AreaStippleMode &= ~AreaStippleModeEnable; + } + + gmesa->dirty |= GAMMA_UPLOAD_STIPPLE; +} + +static void gammaDDPolygonStipple( GLcontext *ctx, const GLubyte *mask) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_STIPPLE; +} + +/* ============================================================= + * Clipping + */ + +static void gammaUpdateClipping( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + GLint x1, y1, x2, y2; + + if ( gmesa->driDrawable ) { + x1 = gmesa->driDrawable->x + ctx->Scissor.X; + y1 = gmesa->driScreen->fbHeight - + (gmesa->driDrawable->y + + gmesa->driDrawable->h) + ctx->Scissor.Y; + x2 = x1 + ctx->Scissor.Width; + y2 = y1 + ctx->Scissor.Height; + + gmesa->ScissorMinXY = x1 | (y1 << 16); + gmesa->ScissorMaxXY = x2 | (y2 << 16); + if (ctx->Scissor.Enabled) + gmesa->ScissorMode |= UserScissorEnable; + else + gmesa->ScissorMode &= ~UserScissorEnable; + + gmesa->dirty |= GAMMA_UPLOAD_CLIP; + } +} + +static void gammaDDScissor( GLcontext *ctx, + GLint x, GLint y, GLsizei w, GLsizei h ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_CLIP; +} + +/* ============================================================= + * Culling + */ + +static void gammaUpdateCull( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + CARD32 g = gmesa->GeometryMode; + + g &= ~(GM_PolyCullMask | GM_FFMask); + + if (ctx->Polygon.FrontFace == GL_CCW) { + g |= GM_FrontFaceCCW; + } else { + g |= GM_FrontFaceCW; + } + + switch ( ctx->Polygon.CullFaceMode ) { + case GL_FRONT: + g |= GM_PolyCullFront; + break; + case GL_BACK: + g |= GM_PolyCullBack; + break; + case GL_FRONT_AND_BACK: + g |= GM_PolyCullBoth; + break; + } + + if ( ctx->Polygon.CullFlag ) { + g |= GM_PolyCullEnable; + } else { + g &= ~GM_PolyCullEnable; + } + + if ( gmesa->GeometryMode != g ) { + gmesa->GeometryMode = g; + gmesa->dirty |= GAMMA_UPLOAD_GEOMETRY; + } +} + +static void gammaDDCullFace( GLcontext *ctx, GLenum mode ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_CULL; +} + +static void gammaDDFrontFace( GLcontext *ctx, GLenum mode ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_CULL; +} + +/* ============================================================= + * Masks + */ + +static void gammaUpdateMasks( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + + GLuint mask = gammaPackColor( gmesa->gammaScreen->cpp, + ctx->Color.ColorMask[RCOMP], + ctx->Color.ColorMask[GCOMP], + ctx->Color.ColorMask[BCOMP], + ctx->Color.ColorMask[ACOMP] ); + + if (gmesa->gammaScreen->cpp == 2) mask |= mask << 16; + + if ( gmesa->FBHardwareWriteMask != mask ) { + gmesa->FBHardwareWriteMask = mask; + gmesa->dirty |= GAMMA_UPLOAD_MASKS; + } +} + +static void gammaDDColorMask( GLcontext *ctx, GLboolean r, GLboolean g, + GLboolean b, GLboolean a) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_MASKS; +} + +/* ============================================================= + * 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. + */ + +#if ENABLELIGHTING +static void gammaDDLightfv(GLcontext *ctx, GLenum light, GLenum pname, + const GLfloat *params, GLint nParams) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + GLfloat l,x,y,z,w; + + switch(light) { + case GL_LIGHT0: + switch (pname) { + case GL_AMBIENT: + CHECK_DMA_BUFFER(gmesa, 3); + /* We don't do alpha */ + WRITEF(gmesa->buf, Light0AmbientIntensityBlue, params[2]); + WRITEF(gmesa->buf, Light0AmbientIntensityGreen, params[1]); + WRITEF(gmesa->buf, Light0AmbientIntensityRed, params[0]); + break; + case GL_DIFFUSE: + CHECK_DMA_BUFFER(gmesa, 3); + /* We don't do alpha */ + WRITEF(gmesa->buf, Light0DiffuseIntensityBlue, params[2]); + WRITEF(gmesa->buf, Light0DiffuseIntensityGreen, params[1]); + WRITEF(gmesa->buf, Light0DiffuseIntensityRed, params[0]); + break; + case GL_SPECULAR: + CHECK_DMA_BUFFER(gmesa, 3); + /* We don't do alpha */ + WRITEF(gmesa->buf, Light0SpecularIntensityBlue, params[2]); + WRITEF(gmesa->buf, Light0SpecularIntensityGreen, params[1]); + WRITEF(gmesa->buf, Light0SpecularIntensityRed, params[0]); + break; + case GL_POSITION: + /* Normalize */ + 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 (params[3] != 0.0) { + gmesa->Light0Mode |= Light0ModeAttenuation; + gmesa->Light0Mode |= Light0ModeLocal; + } else { + gmesa->Light0Mode &= ~Light0ModeAttenuation; + gmesa->Light0Mode &= ~Light0ModeLocal; + } + CHECK_DMA_BUFFER(gmesa, 5); + WRITE(gmesa->buf, Light0Mode, gmesa->Light0Mode); + WRITEF(gmesa->buf, Light0PositionW, w); + WRITEF(gmesa->buf, Light0PositionZ, z); + WRITEF(gmesa->buf, Light0PositionY, y); + WRITEF(gmesa->buf, Light0PositionX, x); + break; + case GL_SPOT_DIRECTION: + CHECK_DMA_BUFFER(gmesa, 3); + /* WRITEF(gmesa->buf, Light0SpotlightDirectionW, params[3]); */ + WRITEF(gmesa->buf, Light0SpotlightDirectionZ, params[2]); + WRITEF(gmesa->buf, Light0SpotlightDirectionY, params[1]); + WRITEF(gmesa->buf, Light0SpotlightDirectionX, params[0]); + break; + case GL_SPOT_EXPONENT: + CHECK_DMA_BUFFER(gmesa, 1); + WRITEF(gmesa->buf, Light0SpotlightExponent, params[0]); + break; + case GL_SPOT_CUTOFF: + if (params[0] != 180.0) + gmesa->Light0Mode |= Light0ModeSpotLight; + else + gmesa->Light0Mode &= ~Light0ModeSpotLight; + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, Light0Mode, gmesa->Light0Mode); + WRITEF(gmesa->buf, Light0CosSpotlightCutoffAngle, cos(params[0]*DEG2RAD)); + break; + case GL_CONSTANT_ATTENUATION: + CHECK_DMA_BUFFER(gmesa, 1); + WRITEF(gmesa->buf, Light0ConstantAttenuation, params[0]); + break; + case GL_LINEAR_ATTENUATION: + CHECK_DMA_BUFFER(gmesa, 1); + WRITEF(gmesa->buf, Light0LinearAttenuation, params[0]); + break; + case GL_QUADRATIC_ATTENUATION: + CHECK_DMA_BUFFER(gmesa, 1); + WRITEF(gmesa->buf, Light0QuadraticAttenuation, params[0]); + break; + } + break; + } +} + +static void gammaDDLightModelfv( GLcontext *ctx, GLenum pname, + const GLfloat *params ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + switch (pname) { + case GL_LIGHT_MODEL_AMBIENT: + CHECK_DMA_BUFFER(gmesa, 3); + /* We don't do alpha */ + WRITEF(gmesa->buf, SceneAmbientColorBlue, params[2]); + WRITEF(gmesa->buf, SceneAmbientColorGreen, params[1]); + WRITEF(gmesa->buf, SceneAmbientColorRed, params[0]); + break; + case GL_LIGHT_MODEL_LOCAL_VIEWER: + if (params[0] != 0.0) + gmesa->LightingMode |= LightingModeLocalViewer; + else + gmesa->LightingMode &= ~LightingModeLocalViewer; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, LightingMode, gmesa->LightingMode); + break; + case GL_LIGHT_MODEL_TWO_SIDE: + if (params[0] == 1.0f) { + gmesa->LightingMode |= LightingModeTwoSides; + gmesa->MaterialMode |= MaterialModeTwoSides; + } else { + gmesa->LightingMode &= ~LightingModeTwoSides; + gmesa->MaterialMode &= ~MaterialModeTwoSides; + } + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, LightingMode, gmesa->LightingMode); + WRITE(gmesa->buf, MaterialMode, gmesa->MaterialMode); + break; + } +} +#endif + +static void gammaDDShadeModel( GLcontext *ctx, GLenum mode ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + CARD32 g = gmesa->GeometryMode; + CARD32 c = gmesa->ColorDDAMode; + + g &= ~GM_ShadingMask; + c &= ~ColorDDAShadingMask; + + switch ( mode ) { + case GL_FLAT: + g |= GM_FlatShading; + c |= ColorDDAFlat; + break; + case GL_SMOOTH: + g |= GM_GouraudShading; + c |= ColorDDAGouraud; + break; + default: + return; + } + + if ( gmesa->ColorDDAMode != c ) { + FLUSH_BATCH( gmesa ); + gmesa->ColorDDAMode = c; + + gmesa->dirty |= GAMMA_UPLOAD_SHADE; + } + + if ( gmesa->GeometryMode != g ) { + FLUSH_BATCH( gmesa ); + gmesa->GeometryMode = g; + + gmesa->dirty |= GAMMA_UPLOAD_GEOMETRY; + } +} + +/* ============================================================= + * Miscellaneous + */ + +static void gammaDDClearColor( GLcontext *ctx, const GLchan color[4]) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + gmesa->ClearColor = gammaPackColor( gmesa->gammaScreen->cpp, + color[0], color[1], color[2], color[3] ); + + if (gmesa->gammaScreen->cpp == 2) gmesa->ClearColor |= gmesa->ClearColor<<16; +} + + +static void gammaDDLogicalOpcode( GLcontext *ctx, GLenum opcode ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + + if ( ctx->Color.ColorLogicOpEnabled ) { + gmesa->LogicalOpMode = opcode << 1 | LogicalOpModeEnable; + } else { + gmesa->LogicalOpMode = LogicalOpModeDisable; + } + + gmesa->dirty |= GAMMA_UPLOAD_LOGICOP; +} + +static void gammaDDSetDrawBuffer( GLcontext *ctx, GLenum mode ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + FLUSH_BATCH( gmesa ); + + switch ( mode ) { + case GL_FRONT_LEFT: + gmesa->drawOffset = gmesa->readOffset = 0; + break; + case GL_BACK_LEFT: + gmesa->drawOffset = gmesa->readOffset = gmesa->driScreen->fbHeight * gmesa->driScreen->fbWidth * gmesa->gammaScreen->cpp; + break; + } +} + +/* ============================================================= + * Window position and viewport transformation + */ + +void gammaUpdateWindow( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = gmesa->driDrawable; + GLfloat xoffset = (GLfloat)dPriv->x; + GLfloat yoffset = gmesa->driScreen->fbHeight - (GLfloat)dPriv->y - dPriv->h; + const GLfloat *v = ctx->Viewport._WindowMap.m; + + GLfloat sx = v[MAT_SX]; + GLfloat tx = v[MAT_TX] + xoffset; + GLfloat sy = v[MAT_SY]; + GLfloat ty = v[MAT_TY] + yoffset; + GLfloat sz = v[MAT_SZ] * gmesa->depth_scale; + GLfloat tz = v[MAT_TZ] * gmesa->depth_scale; + + gmesa->dirty |= GAMMA_UPLOAD_VIEWPORT; + + gmesa->ViewportScaleX = sx; + gmesa->ViewportScaleY = sy; + gmesa->ViewportScaleZ = sz; + gmesa->ViewportOffsetX = tx; + gmesa->ViewportOffsetY = ty; + gmesa->ViewportOffsetZ = tz; +} + + + +static void gammaDDViewport( GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height ) +{ + gammaUpdateWindow( ctx ); +} + +static void gammaDDDepthRange( GLcontext *ctx, GLclampd nearval, + GLclampd farval ) +{ + gammaUpdateWindow( ctx ); +} + +void gammaUpdateViewportOffset( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = gmesa->driDrawable; + GLfloat xoffset = (GLfloat)dPriv->x; + GLfloat yoffset = gmesa->driScreen->fbHeight - (GLfloat)dPriv->y - dPriv->h; + const GLfloat *v = ctx->Viewport._WindowMap.m; + + GLfloat tx = v[MAT_TX] + xoffset; + GLfloat ty = v[MAT_TY] + yoffset; + + if ( gmesa->ViewportOffsetX != tx || + gmesa->ViewportOffsetY != ty ) + { + gmesa->ViewportOffsetX = tx; + gmesa->ViewportOffsetY = ty; + + gmesa->new_state |= GAMMA_NEW_WINDOW; + } + + gmesa->new_state |= GAMMA_NEW_CLIP; +} + +#if 0 +/* + * Matrix + */ + +static void gammaLoadHWMatrix(GLcontext *ctx) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + gmesa->TransformMode &= ~XM_XformTexture; + + switch (ctx->Transform.MatrixMode) { + case GL_MODELVIEW: + gmesa->TransformMode |= XM_UseModelViewMatrix; + CHECK_DMA_BUFFER(gmesa, 16); + WRITEF(gmesa->buf, ModelViewMatrix0, ctx->ModelView.m[0]); + WRITEF(gmesa->buf, ModelViewMatrix1, ctx->ModelView.m[1]); + WRITEF(gmesa->buf, ModelViewMatrix2, ctx->ModelView.m[2]); + WRITEF(gmesa->buf, ModelViewMatrix3, ctx->ModelView.m[3]); + WRITEF(gmesa->buf, ModelViewMatrix4, ctx->ModelView.m[4]); + WRITEF(gmesa->buf, ModelViewMatrix5, ctx->ModelView.m[5]); + WRITEF(gmesa->buf, ModelViewMatrix6, ctx->ModelView.m[6]); + WRITEF(gmesa->buf, ModelViewMatrix7, ctx->ModelView.m[7]); + WRITEF(gmesa->buf, ModelViewMatrix8, ctx->ModelView.m[8]); + WRITEF(gmesa->buf, ModelViewMatrix9, ctx->ModelView.m[9]); + WRITEF(gmesa->buf, ModelViewMatrix10, ctx->ModelView.m[10]); + WRITEF(gmesa->buf, ModelViewMatrix11, ctx->ModelView.m[11]); + WRITEF(gmesa->buf, ModelViewMatrix12, ctx->ModelView.m[12]); + WRITEF(gmesa->buf, ModelViewMatrix13, ctx->ModelView.m[13]); + WRITEF(gmesa->buf, ModelViewMatrix14, ctx->ModelView.m[14]); + WRITEF(gmesa->buf, ModelViewMatrix15, ctx->ModelView.m[15]); + break; + case GL_PROJECTION: + CHECK_DMA_BUFFER(gmesa, 16); + WRITEF(gmesa->buf, ModelViewProjectionMatrix0, + ctx->ProjectionMatrix.m[0]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix1, + ctx->ProjectionMatrix.m[1]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix2, + ctx->ProjectionMatrix.m[2]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix3, + ctx->ProjectionMatrix.m[3]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix4, + ctx->ProjectionMatrix.m[4]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix5, + ctx->ProjectionMatrix.m[5]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix6, + ctx->ProjectionMatrix.m[6]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix7, + ctx->ProjectionMatrix.m[7]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix8, + ctx->ProjectionMatrix.m[8]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix9, + ctx->ProjectionMatrix.m[9]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix10, + ctx->ProjectionMatrix.m[10]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix11, + ctx->ProjectionMatrix.m[11]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix12, + ctx->ProjectionMatrix.m[12]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix13, + ctx->ProjectionMatrix.m[13]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix14, + ctx->ProjectionMatrix.m[14]); + WRITEF(gmesa->buf, ModelViewProjectionMatrix15, + ctx->ProjectionMatrix.m[15]); + break; + case GL_TEXTURE: + CHECK_DMA_BUFFER(gmesa, 16); + gmesa->TransformMode |= XM_XformTexture; + WRITEF(gmesa->buf, TextureMatrix0, ctx->TextureMatrix[0].m[0]); + WRITEF(gmesa->buf, TextureMatrix1, ctx->TextureMatrix[0].m[1]); + WRITEF(gmesa->buf, TextureMatrix2, ctx->TextureMatrix[0].m[2]); + WRITEF(gmesa->buf, TextureMatrix3, ctx->TextureMatrix[0].m[3]); + WRITEF(gmesa->buf, TextureMatrix4, ctx->TextureMatrix[0].m[4]); + WRITEF(gmesa->buf, TextureMatrix5, ctx->TextureMatrix[0].m[5]); + WRITEF(gmesa->buf, TextureMatrix6, ctx->TextureMatrix[0].m[6]); + WRITEF(gmesa->buf, TextureMatrix7, ctx->TextureMatrix[0].m[7]); + WRITEF(gmesa->buf, TextureMatrix8, ctx->TextureMatrix[0].m[8]); + WRITEF(gmesa->buf, TextureMatrix9, ctx->TextureMatrix[0].m[9]); + WRITEF(gmesa->buf, TextureMatrix10, ctx->TextureMatrix[0].m[10]); + WRITEF(gmesa->buf, TextureMatrix11, ctx->TextureMatrix[0].m[11]); + WRITEF(gmesa->buf, TextureMatrix12, ctx->TextureMatrix[0].m[12]); + WRITEF(gmesa->buf, TextureMatrix13, ctx->TextureMatrix[0].m[13]); + WRITEF(gmesa->buf, TextureMatrix14, ctx->TextureMatrix[0].m[14]); + WRITEF(gmesa->buf, TextureMatrix15, ctx->TextureMatrix[0].m[15]); + break; + + default: + /* ERROR!!! -- how did this happen? */ + break; + } + + gmesa->dirty |= GAMMA_UPLOAD_TRANSFORM; +} +#endif + +/* ============================================================= + * State enable/disable + */ + +static void gammaDDEnable( GLcontext *ctx, GLenum cap, GLboolean state ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + switch ( cap ) { + case GL_ALPHA_TEST: + case GL_BLEND: + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_ALPHA; + break; + + case GL_CULL_FACE: + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_CULL; + break; + + case GL_DEPTH_TEST: + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_DEPTH; + break; + + case GL_DITHER: + do { + CARD32 d = gmesa->DitherMode; + FLUSH_BATCH( gmesa ); + + if ( state ) { + d |= DM_DitherEnable; + } else { + d &= ~DM_DitherEnable; + } + + if ( gmesa->DitherMode != d ) { + gmesa->DitherMode = d; + gmesa->dirty |= GAMMA_UPLOAD_DITHER; + } + } while (0); + break; + +#if 0 + case GL_FOG: + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_FOG; + break; +#endif + + case GL_INDEX_LOGIC_OP: + case GL_COLOR_LOGIC_OP: + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_LOGICOP; + break; + +#if ENABLELIGHTING + case GL_LIGHTING: + do { + CARD32 l = gmesa->LightingMode; + FLUSH_BATCH( gmesa ); + + if ( state ) { + l |= LightingModeEnable; + } else { + l &= ~LightingModeEnable; + } + + if ( gmesa->LightingMode != l ) { + gmesa->LightingMode = l; + gmesa->dirty |= GAMMA_UPLOAD_LIGHT; + } + } while (0); + break; + + case GL_COLOR_MATERIAL: + do { + CARD32 m = gmesa->MaterialMode; + FLUSH_BATCH( gmesa ); + + if ( state ) { + m |= MaterialModeEnable; + } else { + m &= ~MaterialModeEnable; + } + + if ( gmesa->MaterialMode != m ) { + gmesa->MaterialMode = m; + gmesa->dirty |= GAMMA_UPLOAD_LIGHT; + } + } while (0); + break; +#endif + + case GL_LINE_SMOOTH: + FLUSH_BATCH( gmesa ); + if ( state ) { + gmesa->AntialiasMode |= AntialiasModeEnable; + gmesa->LineMode |= LM_AntialiasEnable; + } else { + gmesa->AntialiasMode &= ~AntialiasModeEnable; + gmesa->LineMode &= ~LM_AntialiasEnable; + } + gmesa->dirty |= GAMMA_UPLOAD_LINEMODE; + break; + + case GL_POINT_SMOOTH: + FLUSH_BATCH( gmesa ); + if ( state ) { + gmesa->AntialiasMode |= AntialiasModeEnable; + gmesa->PointMode |= PM_AntialiasEnable; + } else { + gmesa->AntialiasMode &= ~AntialiasModeEnable; + gmesa->PointMode &= ~PM_AntialiasEnable; + } + gmesa->dirty |= GAMMA_UPLOAD_POINTMODE; + break; + + case GL_POLYGON_SMOOTH: + FLUSH_BATCH( gmesa ); + if ( state ) { + gmesa->AntialiasMode |= AntialiasModeEnable; + gmesa->TriangleMode |= TM_AntialiasEnable; + } else { + gmesa->AntialiasMode &= ~AntialiasModeEnable; + gmesa->TriangleMode &= ~TM_AntialiasEnable; + } + gmesa->dirty |= GAMMA_UPLOAD_TRIMODE; + break; + + case GL_SCISSOR_TEST: + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_CLIP; + break; + + case GL_POLYGON_OFFSET_FILL: + case GL_POLYGON_OFFSET_POINT: + case GL_POLYGON_OFFSET_LINE: + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_POLYGON; + break; + + case GL_LINE_STIPPLE: + FLUSH_BATCH( gmesa ); + if ( state ) + gmesa->LineMode |= LM_StippleEnable; + else + gmesa->LineMode &= ~LM_StippleEnable; + gmesa->dirty |= GAMMA_UPLOAD_LINEMODE; + break; + + case GL_POLYGON_STIPPLE: + FLUSH_BATCH( gmesa ); + gmesa->new_state |= GAMMA_NEW_STIPPLE; + break; + + default: + return; + } +} + +/* ============================================================= + * State initialization, management + */ + + +/* + * 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 gammaEmitHwState( gammaContextPtr gmesa ) +{ + if (!gmesa->driDrawable) return; + + if (!gmesa->dirty) return; + +#ifdef DO_VALIDATE + /* Flush any partially filled buffers */ + FLUSH_DMA_BUFFER(gmesa); + + DRM_SPINLOCK(&gmesa->driScreen->pSAREA->drawable_lock, + gmesa->driScreen->drawLockID); + VALIDATE_DRAWABLE_INFO_NO_LOCK(gmesa); +#endif + + if (gmesa->dirty & GAMMA_UPLOAD_VIEWPORT) { + gmesa->dirty &= ~GAMMA_UPLOAD_VIEWPORT; + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, ViewPortOffsetX, gmesa->ViewportOffsetX); + WRITEF(gmesa->buf, ViewPortOffsetY, gmesa->ViewportOffsetY); + WRITEF(gmesa->buf, ViewPortOffsetZ, gmesa->ViewportOffsetZ); + WRITEF(gmesa->buf, ViewPortScaleX, gmesa->ViewportScaleX); + WRITEF(gmesa->buf, ViewPortScaleY, gmesa->ViewportScaleY); + WRITEF(gmesa->buf, ViewPortScaleZ, gmesa->ViewportScaleZ); + } + if ( (gmesa->dirty & GAMMA_UPLOAD_POINTMODE) || + (gmesa->dirty & GAMMA_UPLOAD_LINEMODE) || + (gmesa->dirty & GAMMA_UPLOAD_TRIMODE) ) { + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, AntialiasMode, gmesa->AntialiasMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_POINTMODE) { + gmesa->dirty &= ~GAMMA_UPLOAD_POINTMODE; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PointMode, gmesa->PointMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_LINEMODE) { + gmesa->dirty &= ~GAMMA_UPLOAD_LINEMODE; + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, LineMode, gmesa->LineMode); + WRITE(gmesa->buf, LineStippleMode, gmesa->LineMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_TRIMODE) { + gmesa->dirty &= ~GAMMA_UPLOAD_TRIMODE; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TriangleMode, gmesa->TriangleMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_FOG) { + GLchan c[3], col; + UNCLAMPED_FLOAT_TO_RGB_CHAN( c, gmesa->glCtx->Fog.Color ); + col = gammaPackColor(4, c[0], c[1], c[2], 0); + gmesa->dirty &= ~GAMMA_UPLOAD_FOG; + CHECK_DMA_BUFFER(gmesa, 5); +#if 0 + WRITE(gmesa->buf, FogMode, gmesa->FogMode); + WRITE(gmesa->buf, FogColor, col); + WRITEF(gmesa->buf, FStart, gmesa->glCtx->Fog.Start); +#endif + WRITEF(gmesa->buf, FogEnd, gmesa->glCtx->Fog.End); + WRITEF(gmesa->buf, FogDensity, gmesa->glCtx->Fog.Density); + WRITEF(gmesa->buf, FogScale, + 1.0f/(gmesa->glCtx->Fog.End - gmesa->glCtx->Fog.Start)); + } + if (gmesa->dirty & GAMMA_UPLOAD_DITHER) { + gmesa->dirty &= ~GAMMA_UPLOAD_DITHER; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, DitherMode, gmesa->DitherMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_LOGICOP) { + gmesa->dirty &= ~GAMMA_UPLOAD_LOGICOP; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, LogicalOpMode, gmesa->LogicalOpMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_CLIP) { + gmesa->dirty &= ~GAMMA_UPLOAD_CLIP; + CHECK_DMA_BUFFER(gmesa, 3); + WRITE(gmesa->buf, ScissorMinXY, gmesa->ScissorMinXY); + WRITE(gmesa->buf, ScissorMaxXY, gmesa->ScissorMaxXY); + WRITE(gmesa->buf, ScissorMode, gmesa->ScissorMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_MASKS) { + gmesa->dirty &= ~GAMMA_UPLOAD_MASKS; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, FBHardwareWriteMask, gmesa->FBHardwareWriteMask); + } + if (gmesa->dirty & GAMMA_UPLOAD_ALPHA) { + gmesa->dirty &= ~GAMMA_UPLOAD_ALPHA; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, AlphaTestMode, gmesa->AlphaTestMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_BLEND) { + gmesa->dirty &= ~GAMMA_UPLOAD_BLEND; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, AlphaBlendMode, gmesa->AlphaBlendMode); + } + CHECK_DMA_BUFFER(gmesa, 1); + if (gmesa->glCtx->Color.BlendEnabled || gmesa->glCtx->Color.AlphaEnabled) { + WRITE(gmesa->buf, FBReadMode, gmesa->FBReadMode | gmesa->AB_FBReadMode_Save); + } else { + WRITE(gmesa->buf, FBReadMode, gmesa->FBReadMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_LIGHT) { + gmesa->dirty &= ~GAMMA_UPLOAD_LIGHT; + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, LightingMode, gmesa->LightingMode); + WRITE(gmesa->buf, MaterialMode, gmesa->MaterialMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_SHADE) { + gmesa->dirty &= ~GAMMA_UPLOAD_SHADE; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, ColorDDAMode, gmesa->ColorDDAMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_POLYGON) { + gmesa->dirty &= ~GAMMA_UPLOAD_POLYGON; + CHECK_DMA_BUFFER(gmesa, 2); + WRITEF(gmesa->buf, PolygonOffsetBias, gmesa->glCtx->Polygon.OffsetUnits); + WRITEF(gmesa->buf, PolygonOffsetFactor, gmesa->glCtx->Polygon.OffsetFactor); + } + if (gmesa->dirty & GAMMA_UPLOAD_STIPPLE) { + gmesa->dirty &= ~GAMMA_UPLOAD_STIPPLE; + CHECK_DMA_BUFFER(gmesa, 33); + WRITE(gmesa->buf, AreaStippleMode, gmesa->AreaStippleMode); + WRITE(gmesa->buf, AreaStipplePattern0, gmesa->glCtx->PolygonStipple[0]); + WRITE(gmesa->buf, AreaStipplePattern1, gmesa->glCtx->PolygonStipple[1]); + WRITE(gmesa->buf, AreaStipplePattern2, gmesa->glCtx->PolygonStipple[2]); + WRITE(gmesa->buf, AreaStipplePattern3, gmesa->glCtx->PolygonStipple[3]); + WRITE(gmesa->buf, AreaStipplePattern4, gmesa->glCtx->PolygonStipple[4]); + WRITE(gmesa->buf, AreaStipplePattern5, gmesa->glCtx->PolygonStipple[5]); + WRITE(gmesa->buf, AreaStipplePattern6, gmesa->glCtx->PolygonStipple[6]); + WRITE(gmesa->buf, AreaStipplePattern7, gmesa->glCtx->PolygonStipple[7]); + WRITE(gmesa->buf, AreaStipplePattern8, gmesa->glCtx->PolygonStipple[8]); + WRITE(gmesa->buf, AreaStipplePattern9, gmesa->glCtx->PolygonStipple[9]); + WRITE(gmesa->buf, AreaStipplePattern10, gmesa->glCtx->PolygonStipple[10]); + WRITE(gmesa->buf, AreaStipplePattern11, gmesa->glCtx->PolygonStipple[11]); + WRITE(gmesa->buf, AreaStipplePattern12, gmesa->glCtx->PolygonStipple[12]); + WRITE(gmesa->buf, AreaStipplePattern13, gmesa->glCtx->PolygonStipple[13]); + WRITE(gmesa->buf, AreaStipplePattern14, gmesa->glCtx->PolygonStipple[14]); + WRITE(gmesa->buf, AreaStipplePattern15, gmesa->glCtx->PolygonStipple[15]); + WRITE(gmesa->buf, AreaStipplePattern16, gmesa->glCtx->PolygonStipple[16]); + WRITE(gmesa->buf, AreaStipplePattern17, gmesa->glCtx->PolygonStipple[17]); + WRITE(gmesa->buf, AreaStipplePattern18, gmesa->glCtx->PolygonStipple[18]); + WRITE(gmesa->buf, AreaStipplePattern19, gmesa->glCtx->PolygonStipple[19]); + WRITE(gmesa->buf, AreaStipplePattern20, gmesa->glCtx->PolygonStipple[20]); + WRITE(gmesa->buf, AreaStipplePattern21, gmesa->glCtx->PolygonStipple[21]); + WRITE(gmesa->buf, AreaStipplePattern22, gmesa->glCtx->PolygonStipple[22]); + WRITE(gmesa->buf, AreaStipplePattern23, gmesa->glCtx->PolygonStipple[23]); + WRITE(gmesa->buf, AreaStipplePattern24, gmesa->glCtx->PolygonStipple[24]); + WRITE(gmesa->buf, AreaStipplePattern25, gmesa->glCtx->PolygonStipple[25]); + WRITE(gmesa->buf, AreaStipplePattern26, gmesa->glCtx->PolygonStipple[26]); + WRITE(gmesa->buf, AreaStipplePattern27, gmesa->glCtx->PolygonStipple[27]); + WRITE(gmesa->buf, AreaStipplePattern28, gmesa->glCtx->PolygonStipple[28]); + WRITE(gmesa->buf, AreaStipplePattern29, gmesa->glCtx->PolygonStipple[29]); + WRITE(gmesa->buf, AreaStipplePattern30, gmesa->glCtx->PolygonStipple[30]); + WRITE(gmesa->buf, AreaStipplePattern31, gmesa->glCtx->PolygonStipple[31]); + } + if (gmesa->dirty & GAMMA_UPLOAD_DEPTH) { + gmesa->dirty &= ~GAMMA_UPLOAD_DEPTH; + CHECK_DMA_BUFFER(gmesa, 4); + WRITE(gmesa->buf, DepthMode, gmesa->DepthMode); + WRITE(gmesa->buf, DeltaMode, gmesa->DeltaMode); + WRITE(gmesa->buf, GLINTWindow,gmesa->Window | (gmesa->FrameCount << 9)); + WRITE(gmesa->buf, LBReadMode, gmesa->LBReadMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_GEOMETRY) { + gmesa->dirty &= ~GAMMA_UPLOAD_GEOMETRY; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, GeometryMode, gmesa->GeometryMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_TRANSFORM) { + gmesa->dirty &= ~GAMMA_UPLOAD_TRANSFORM; + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TransformMode, gmesa->TransformMode); + } + if (gmesa->dirty & GAMMA_UPLOAD_TEX0) { + gammaTextureObjectPtr curTex = gmesa->CurrentTexObj[0]; + gmesa->dirty &= ~GAMMA_UPLOAD_TEX0; + if (curTex) { + CHECK_DMA_BUFFER(gmesa, 21); + WRITE(gmesa->buf, GeometryMode, gmesa->GeometryMode | GM_TextureEnable); + WRITE(gmesa->buf, DeltaMode, gmesa->DeltaMode | DM_TextureEnable); + WRITE(gmesa->buf, TextureAddressMode, curTex->TextureAddressMode); + WRITE(gmesa->buf, TextureReadMode, curTex->TextureReadMode); + WRITE(gmesa->buf, TextureColorMode, curTex->TextureColorMode); + WRITE(gmesa->buf, TextureFilterMode, curTex->TextureFilterMode); + WRITE(gmesa->buf, TextureFormat, curTex->TextureFormat); + WRITE(gmesa->buf, GLINTBorderColor, curTex->TextureBorderColor); + WRITE(gmesa->buf, TxBaseAddr0, curTex->TextureBaseAddr[0]); + WRITE(gmesa->buf, TxBaseAddr1, curTex->TextureBaseAddr[1]); + WRITE(gmesa->buf, TxBaseAddr2, curTex->TextureBaseAddr[2]); + WRITE(gmesa->buf, TxBaseAddr3, curTex->TextureBaseAddr[3]); + WRITE(gmesa->buf, TxBaseAddr4, curTex->TextureBaseAddr[4]); + WRITE(gmesa->buf, TxBaseAddr5, curTex->TextureBaseAddr[5]); + WRITE(gmesa->buf, TxBaseAddr6, curTex->TextureBaseAddr[6]); + WRITE(gmesa->buf, TxBaseAddr7, curTex->TextureBaseAddr[7]); + WRITE(gmesa->buf, TxBaseAddr8, curTex->TextureBaseAddr[8]); + WRITE(gmesa->buf, TxBaseAddr9, curTex->TextureBaseAddr[9]); + WRITE(gmesa->buf, TxBaseAddr10, curTex->TextureBaseAddr[10]); + WRITE(gmesa->buf, TxBaseAddr11, curTex->TextureBaseAddr[11]); + WRITE(gmesa->buf, TxBaseAddr12, curTex->TextureBaseAddr[12]); + WRITE(gmesa->buf, TextureCacheControl, (TCC_Enable | TCC_Invalidate)); + } else { + CHECK_DMA_BUFFER(gmesa, 6); + WRITE(gmesa->buf, GeometryMode, gmesa->GeometryMode); + WRITE(gmesa->buf, DeltaMode, gmesa->DeltaMode); + WRITE(gmesa->buf, TextureAddressMode, TextureAddressModeDisable); + WRITE(gmesa->buf, TextureReadMode, TextureReadModeDisable); + WRITE(gmesa->buf, TextureFilterMode, TextureFilterModeDisable); + WRITE(gmesa->buf, TextureColorMode, TextureColorModeDisable); + } + } +#ifdef DO_VALIDATE + PROCESS_DMA_BUFFER_TOP_HALF(gmesa); + + DRM_SPINUNLOCK(&gmesa->driScreen->pSAREA->drawable_lock, + gmesa->driScreen->drawLockID); + VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gmesa); + + PROCESS_DMA_BUFFER_BOTTOM_HALF(gmesa); +#endif +} + +void gammaDDUpdateHWState( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + int new_state = gmesa->new_state; + + if ( new_state ) + { + FLUSH_BATCH( gmesa ); + + gmesa->new_state = 0; + + /* Update the various parts of the context's state. + */ + if ( new_state & GAMMA_NEW_ALPHA ) + gammaUpdateAlphaMode( ctx ); + + if ( new_state & GAMMA_NEW_DEPTH ) + gammaUpdateZMode( ctx ); + + if ( new_state & GAMMA_NEW_FOG ) + gammaUpdateFogAttrib( ctx ); + + if ( new_state & GAMMA_NEW_CLIP ) + gammaUpdateClipping( ctx ); + + if ( new_state & GAMMA_NEW_POLYGON ) + gammaUpdatePolygon( ctx ); + + if ( new_state & GAMMA_NEW_CULL ) + gammaUpdateCull( ctx ); + + if ( new_state & GAMMA_NEW_MASKS ) + gammaUpdateMasks( ctx ); + + if ( new_state & GAMMA_NEW_WINDOW ) + gammaUpdateWindow( ctx ); + + if ( new_state & GAMMA_NEW_STIPPLE ) + gammaUpdateStipple( ctx ); + } + + /* HACK ! */ + + gammaEmitHwState( gmesa ); +} + + +void gammaDDUpdateState( GLcontext *ctx, GLuint new_state ) +{ + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + GAMMA_CONTEXT(ctx)->new_gl_state |= new_state; +} + + +/* Initialize the context's hardware state. + */ +void gammaDDInitState( gammaContextPtr gmesa ) +{ + gmesa->new_state = 0; +} + +/* Initialize the driver's state functions. + */ +void gammaDDInitStateFuncs( GLcontext *ctx ) +{ + ctx->Driver.UpdateState = gammaDDUpdateState; + + ctx->Driver.Clear = gammaDDClear; + ctx->Driver.ClearIndex = NULL; + ctx->Driver.ClearColor = gammaDDClearColor; + ctx->Driver.SetDrawBuffer = gammaDDSetDrawBuffer; + + ctx->Driver.IndexMask = NULL; + ctx->Driver.ColorMask = gammaDDColorMask; + + ctx->Driver.AlphaFunc = gammaDDAlphaFunc; + ctx->Driver.BlendEquation = gammaDDBlendEquation; + ctx->Driver.BlendFunc = gammaDDBlendFunc; + ctx->Driver.BlendFuncSeparate = gammaDDBlendFuncSeparate; + ctx->Driver.ClearDepth = gammaDDClearDepth; + ctx->Driver.CullFace = gammaDDCullFace; + ctx->Driver.FrontFace = gammaDDFrontFace; + ctx->Driver.DepthFunc = gammaDDDepthFunc; + ctx->Driver.DepthMask = gammaDDDepthMask; + ctx->Driver.DepthRange = gammaDDDepthRange; + ctx->Driver.Enable = gammaDDEnable; + ctx->Driver.Finish = gammaDDFinish; + ctx->Driver.Flush = gammaDDFlush; +#if 0 + ctx->Driver.Fogfv = gammaDDFogfv; +#endif + ctx->Driver.Hint = NULL; + ctx->Driver.LineWidth = gammaDDLineWidth; + ctx->Driver.LineStipple = gammaDDLineStipple; +#if ENABLELIGHTING + ctx->Driver.Lightfv = gammaDDLightfv; + ctx->Driver.LightModelfv = gammaDDLightModelfv; +#endif + ctx->Driver.LogicOpcode = gammaDDLogicalOpcode; + ctx->Driver.PointSize = gammaDDPointSize; + ctx->Driver.PolygonMode = gammaDDPolygonMode; + ctx->Driver.PolygonStipple = gammaDDPolygonStipple; + ctx->Driver.Scissor = gammaDDScissor; + ctx->Driver.ShadeModel = gammaDDShadeModel; + ctx->Driver.ClearStencil = NULL; + ctx->Driver.StencilFunc = NULL; + ctx->Driver.StencilMask = NULL; + ctx->Driver.StencilOp = NULL; + ctx->Driver.Viewport = gammaDDViewport; +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_tex.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_tex.c:1.4 --- /dev/null Thu Feb 27 12:26:22 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_tex.c Tue Nov 5 12:46:07 2002 @@ -0,0 +1,421 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_tex.c,v 1.4 2002/11/05 17:46:07 tsi Exp $ */ + +#include +#include + +#include "glheader.h" +#include "mtypes.h" +#include "mem.h" +#include "simple_list.h" +#include "enums.h" +#include "texstore.h" +#include "texformat.h" +#include "swrast/swrast.h" + +#include "mm.h" +#include "gamma_context.h" +#include "mmath.h" + + +/* + * Compute the 'S2.4' lod bias factor from the floating point OpenGL bias. + */ +static GLuint gammaComputeLodBias(GLfloat bias) +{ + return bias; +} + + +static void gammaSetTexWrapping(gammaTextureObjectPtr t, + GLenum wraps, GLenum wrapt) +{ + CARD32 t1 = t->TextureAddressMode; + CARD32 t2 = t->TextureReadMode; + + t1 &= ~(TAM_SWrap_Mask | TAM_TWrap_Mask); + t2 &= ~(TRM_UWrap_Mask | TRM_VWrap_Mask); + + if (wraps != GL_CLAMP) { + t1 |= TAM_SWrap_Repeat; + t2 |= TRM_UWrap_Repeat; + } + + if (wrapt != GL_CLAMP) { + t1 |= TAM_TWrap_Repeat; + t2 |= TRM_VWrap_Repeat; + } + + t->TextureAddressMode = t1; + t->TextureReadMode = t2; +} + + +static void gammaSetTexFilter(gammaContextPtr gmesa, + gammaTextureObjectPtr t, + GLenum minf, GLenum magf, + GLfloat bias) +{ + CARD32 t1 = t->TextureAddressMode; + CARD32 t2 = t->TextureReadMode; + + t2 &= ~(TRM_Mag_Mask | TRM_Min_Mask); + + switch (minf) { + case GL_NEAREST: + t1 &= ~TAM_LODEnable; + t2 &= ~TRM_MipMapEnable; + t2 |= TRM_Min_Nearest; + break; + case GL_LINEAR: + t1 &= ~TAM_LODEnable; + t2 &= ~TRM_MipMapEnable; + t2 |= TRM_Min_Linear; + break; + case GL_NEAREST_MIPMAP_NEAREST: + t2 |= TRM_Min_NearestMMNearest; + break; + case GL_LINEAR_MIPMAP_NEAREST: + t2 |= TRM_Min_LinearMMNearest; + break; + case GL_NEAREST_MIPMAP_LINEAR: + t2 |= TRM_Min_NearestMMLinear; + break; + case GL_LINEAR_MIPMAP_LINEAR: + t2 |= TRM_Min_LinearMMLinear; + break; + default: + break; + } + + switch (magf) { + case GL_NEAREST: + t2 |= TRM_Mag_Nearest; + break; + case GL_LINEAR: + t2 |= TRM_Mag_Linear; + break; + default: + break; + } + + t->TextureAddressMode = t1; + t->TextureReadMode = t2; +} + + +static void gammaSetTexBorderColor(gammaContextPtr gmesa, + gammaTextureObjectPtr t, + GLubyte color[4]) +{ + t->TextureBorderColor = PACK_COLOR_8888(color[0], color[1], color[2], color[3]); +} + + +static void gammaTexParameter( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj, + GLenum pname, const GLfloat *params ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + gammaTextureObjectPtr t = (gammaTextureObjectPtr) tObj->DriverData; + if (!t) + return; + + /* Can't do the update now as we don't know whether to flush + * vertices or not. Setting gmesa->new_state means that + * gammaUpdateTextureState() will be called before any triangles are + * rendered. If a statechange has occurred, it will be detected at + * that point, and buffered vertices flushed. + */ + switch (pname) { + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_MAG_FILTER: + { + GLfloat bias = ctx->Texture.Unit[ctx->Texture.CurrentUnit].LodBias; + gammaSetTexFilter( gmesa, t, tObj->MinFilter, tObj->MagFilter, bias ); + } + break; + + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + gammaSetTexWrapping( t, tObj->WrapS, tObj->WrapT ); + break; + + case GL_TEXTURE_BORDER_COLOR: + gammaSetTexBorderColor( gmesa, t, tObj->BorderColor ); + break; + + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + /* This isn't the most efficient solution but there doesn't appear to + * be a nice alternative for Radeon. Since there's no LOD clamping, + * we just have to rely on loading the right subset of mipmap levels + * to simulate a clamped LOD. + */ + gammaSwapOutTexObj( gmesa, t ); + break; + + default: + return; + } + + if (t == gmesa->CurrentTexObj[0]) + gmesa->dirty |= GAMMA_UPLOAD_TEX0; + +#if 0 + if (t == gmesa->CurrentTexObj[1]) { + gmesa->dirty |= GAMMA_UPLOAD_TEX1; + } +#endif +} + + +static void gammaTexEnv( GLcontext *ctx, GLenum target, + GLenum pname, const GLfloat *param ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT( ctx ); + GLuint unit = ctx->Texture.CurrentUnit; + + /* Only one env color. Need a fallback if env colors are different + * and texture setup references env color in both units. + */ + switch (pname) { + case GL_TEXTURE_ENV_COLOR: { + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + GLfloat *fc = texUnit->EnvColor; + GLuint r, g, b, a, col; + CLAMPED_FLOAT_TO_UBYTE(r, fc[0]); + CLAMPED_FLOAT_TO_UBYTE(g, fc[1]); + CLAMPED_FLOAT_TO_UBYTE(b, fc[2]); + CLAMPED_FLOAT_TO_UBYTE(a, fc[3]); + + col = ((a << 24) | + (r << 16) | + (g << 8) | + (b << 0)); + + break; + } + case GL_TEXTURE_ENV_MODE: + gmesa->TexEnvImageFmt[unit] = 0; /* force recalc of env state */ + break; + + case GL_TEXTURE_LOD_BIAS_EXT: +#if 0 /* ?!?!?! */ + { + struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current; + gammaTextureObjectPtr t = (gammaTextureObjectPtr) tObj->DriverData; + /* XXX Looks like there's something missing here */ + } +#endif + break; + + default: + break; + } +} + +static void gammaTexImage1D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *pack, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + gammaTextureObjectPtr t = (gammaTextureObjectPtr) texObj->DriverData; + if (t) { + gammaSwapOutTexObj( GAMMA_CONTEXT(ctx), t ); + } + _mesa_store_teximage1d( ctx, target, level, internalFormat, + width, border, format, type, + pixels, pack, texObj, texImage ); +} + +static void gammaTexSubImage1D( GLcontext *ctx, + GLenum target, + GLint level, + GLint xoffset, + GLsizei width, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *pack, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + gammaTextureObjectPtr t = (gammaTextureObjectPtr) texObj->DriverData; + if (t) { + gammaSwapOutTexObj( GAMMA_CONTEXT(ctx), t ); + } + _mesa_store_texsubimage1d(ctx, target, level, xoffset, width, + format, type, pixels, pack, texObj, + texImage); +} + +static void gammaTexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + gammaTextureObjectPtr t = (gammaTextureObjectPtr) texObj->DriverData; + if (t) { + gammaSwapOutTexObj( GAMMA_CONTEXT(ctx), t ); + } + _mesa_store_teximage2d( ctx, target, level, internalFormat, + width, height, border, format, type, + pixels, packing, texObj, texImage ); +} + +static void gammaTexSubImage2D( 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 ) +{ + gammaTextureObjectPtr t = (gammaTextureObjectPtr) texObj->DriverData; + if (t) { + gammaSwapOutTexObj( GAMMA_CONTEXT(ctx), t ); + } + _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, + height, format, type, pixels, packing, texObj, + texImage); +} + + +static void gammaBindTexture( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT( ctx ); + gammaTextureObjectPtr t = (gammaTextureObjectPtr) tObj->DriverData; + + if (!t) { + GLfloat bias = ctx->Texture.Unit[ctx->Texture.CurrentUnit].LodBias; + t = CALLOC_STRUCT(gamma_texture_object_t); + + /* Initialize non-image-dependent parts of the state: + */ + t->globj = tObj; + + t->TextureAddressMode = TextureAddressModeEnable | TAM_Operation_3D | + TAM_DY_Enable | TAM_LODEnable; + t->TextureReadMode = TextureReadModeEnable | TRM_PrimaryCacheEnable | + TRM_MipMapEnable | TRM_BorderClamp | TRM_Border; + t->TextureColorMode = TextureColorModeEnable; + t->TextureFilterMode = TextureFilterModeEnable; + + if (target == GL_TEXTURE_2D) { + t->TextureAddressMode |= TAM_TexMapType_2D; + t->TextureReadMode |= TRM_TexMapType_2D; + } else + if (target == GL_TEXTURE_1D) { + t->TextureAddressMode |= TAM_TexMapType_1D; + t->TextureReadMode |= TRM_TexMapType_1D; + } + + t->TextureColorMode = TextureColorModeEnable; + + t->TextureFilterMode = TextureFilterModeEnable; + +#ifdef MESA_LITTLE_ENDIAN + t->TextureFormat = (TF_LittleEndian | +#else + t->TextureFormat = (TF_BigEndian | +#endif + TF_ColorOrder_RGB | + TF_OutputFmt_Texel); + + t->dirty_images = ~0; + + tObj->DriverData = t; + make_empty_list( t ); + + gammaSetTexWrapping( t, tObj->WrapS, tObj->WrapT ); + gammaSetTexFilter( gmesa, t, tObj->MinFilter, tObj->MagFilter, bias ); + gammaSetTexBorderColor( gmesa, t, tObj->BorderColor ); + } +} + + +static void gammaDeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) +{ + gammaTextureObjectPtr t = (gammaTextureObjectPtr)tObj->DriverData; + + if (t) { + gammaContextPtr gmesa = GAMMA_CONTEXT( ctx ); +#if 0 + if (gmesa) + GAMMA_FIREVERTICES( gmesa ); +#endif + gammaDestroyTexObj( gmesa, t ); + tObj->DriverData = 0; + } +} + +static GLboolean gammaIsTextureResident( GLcontext *ctx, + struct gl_texture_object *tObj ) +{ + gammaTextureObjectPtr t = (gammaTextureObjectPtr)tObj->DriverData; + return t && t->MemBlock; +} + +static void gammaInitTextureObjects( GLcontext *ctx ) +{ + struct gl_texture_object *texObj; + GLuint tmp = ctx->Texture.CurrentUnit; + + ctx->Texture.CurrentUnit = 0; + + texObj = ctx->Texture.Unit[0].Current1D; + gammaBindTexture( ctx, GL_TEXTURE_1D, texObj ); + + texObj = ctx->Texture.Unit[0].Current2D; + gammaBindTexture( ctx, GL_TEXTURE_2D, texObj ); + +#if 0 + ctx->Texture.CurrentUnit = 1; + + texObj = ctx->Texture.Unit[1].Current1D; + gammaBindTexture( ctx, GL_TEXTURE_1D, texObj ); + + texObj = ctx->Texture.Unit[1].Current2D; + gammaBindTexture( ctx, GL_TEXTURE_2D, texObj ); +#endif + + ctx->Texture.CurrentUnit = tmp; +} + + +void gammaDDInitTextureFuncs( GLcontext *ctx ) +{ + ctx->Driver.TexEnv = gammaTexEnv; + ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format; + ctx->Driver.TexImage1D = _mesa_store_teximage1d; + ctx->Driver.TexImage2D = gammaTexImage2D; + ctx->Driver.TexImage3D = _mesa_store_teximage3d; + ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d; + ctx->Driver.TexSubImage2D = gammaTexSubImage2D; + ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; + ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; + ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; + ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; + ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; + ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; + ctx->Driver.BindTexture = gammaBindTexture; + ctx->Driver.DeleteTexture = gammaDeleteTexture; + ctx->Driver.TexParameter = gammaTexParameter; + ctx->Driver.UpdateTexturePalette = 0; + ctx->Driver.IsTextureResident = gammaIsTextureResident; + ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; + + gammaInitTextureObjects( ctx ); +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_texmem.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_texmem.c:1.5 --- /dev/null Thu Feb 27 12:26:22 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_texmem.c Tue Nov 5 12:46:07 2002 @@ -0,0 +1,534 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_texmem.c,v 1.5 2002/11/05 17:46:07 tsi Exp $ */ + +#include +#include + +#include "glheader.h" +#include "macros.h" +#include "mtypes.h" +#include "simple_list.h" +#include "enums.h" + +#include "mm.h" +#include "glint_dri.h" +#include "gamma_context.h" +#include "gamma_lock.h" + +void gammaDestroyTexObj(gammaContextPtr gmesa, gammaTextureObjectPtr t) +{ + if (!t) return; + + /* This is sad - need to sync *in case* we upload a texture + * to this newly free memory... + */ + if (t->MemBlock) { + mmFreeMem(t->MemBlock); + t->MemBlock = 0; + + if (gmesa && t->age > gmesa->dirtyAge) + gmesa->dirtyAge = t->age; + } + + if (t->globj) + t->globj->DriverData = 0; + + if (gmesa) { + if (gmesa->CurrentTexObj[0] == t) { + gmesa->CurrentTexObj[0] = 0; + gmesa->dirty &= ~GAMMA_UPLOAD_TEX0; + } + +#if 0 + if (gmesa->CurrentTexObj[1] == t) { + gmesa->CurrentTexObj[1] = 0; + gmesa->dirty &= ~GAMMA_UPLOAD_TEX1; + } +#endif + } + + remove_from_list(t); + free(t); +} + + +void gammaSwapOutTexObj(gammaContextPtr gmesa, gammaTextureObjectPtr t) +{ +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + if (t->MemBlock) { + mmFreeMem(t->MemBlock); + t->MemBlock = 0; + + if (t->age > gmesa->dirtyAge) + gmesa->dirtyAge = t->age; + } + + t->dirty_images = ~0; + move_to_tail(&(gmesa->SwappedOut), t); +} + + + +/* Upload an image from mesa's internal copy. + */ +static void gammaUploadTexLevel( gammaContextPtr gmesa, gammaTextureObjectPtr t, int level ) +{ + const struct gl_texture_image *image = t->image[level].image; + int i,j; + int l2d; +#if 0 + int offset = 0; +#endif + int words, depthLog2; + + /* fprintf(stderr, "%s\n", __FUNCTION__); */ + + l2d = 5; /* 32bits per texel == 1<<5 */ + + if (level == 0) { + t->TextureAddressMode &= ~(TAM_WidthMask | TAM_HeightMask); + t->TextureAddressMode |= (image->WidthLog2 << 9) | + (image->HeightLog2 << 13); + t->TextureReadMode &= ~(TRM_WidthMask | TRM_HeightMask | + TRM_DepthMask | TRM_Border | + TRM_Patch); + t->TextureReadMode |= (image->WidthLog2 << 1) | + (image->HeightLog2 << 5) | + (l2d << 9); + t->TextureFormat &= ~(TF_CompnentsMask | TF_OneCompFmt_Mask); + } + + t->TextureBaseAddr[level] = /* ??? */ + (unsigned long)(t->image[level].offset + t->BufAddr) << 5; + + CALC_LOG2(depthLog2, 1<Width * image->Height) >> (5-depthLog2); + + CHECK_DMA_BUFFER(gmesa, 3); + WRITE(gmesa->buf, LBWindowBase, t->TextureBaseAddr[level] >> 5); + WRITE(gmesa->buf, TextureCacheControl, (TCC_Enable | TCC_Invalidate)); + WRITE(gmesa->buf, WaitForCompletion, 0); + FLUSH_DMA_BUFFER(gmesa); + + switch (t->image[level].internalFormat) { + case GL_RGB: + case 3: + { + GLubyte *src = (GLubyte *)image->Data; + + if (level == 0) + t->TextureFormat |= TF_Compnents_3; + +#if 0 /* This is the texture download code we SHOULD be using */ + /* In the routines below, but this causes an DMA overrun - WHY ? */ + while (offset < words) { + int count = gmesa->bufSize; + int i; + count -= 3; + if (count > words-offset) count = words-offset; + + gmesa->buf->i = GlintTextureDownloadOffsetTag; + gmesa->buf++; + gmesa->buf->i = offset; + gmesa->buf++; + gmesa->buf->i = (GlintTextureDataTag | ((count-1) << 16)); + gmesa->buf++; + + for (i = 0; i < count; i++) { + gmesa->buf->i = PACK_COLOR_565(src[0],src[1],src[2]); + gmesa->buf++; + src += 3; + } + + gmesa->bufCount = count+3; /* texture data + 3 values */ + offset += count; + + FLUSH_DMA_BUFFER(gmesa); + } +#else + /* The UGLY way, and SLOW !, but the above sometimes causes + * a DMA overrun error ??? FIXME ! */ + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureDownloadOffset, 0); + for (i = 0; i < words; i++) { + unsigned int data; + data = PACK_COLOR_565(src[0],src[1],src[2]); + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureData, data); + src += 3; + } + FLUSH_DMA_BUFFER(gmesa); +#endif + } + break; + + case GL_RGBA: + case 4: + { + GLubyte *src = (GLubyte *)image->Data; + + if (level == 0) + t->TextureFormat |= TF_Compnents_4; + + /* The UGLY way, and SLOW !, but the above sometimes causes + * a DMA overrun error ??? FIXME ! */ + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureDownloadOffset, 0); + for (i = 0; i < words; i++) { + unsigned int data; + data = PACK_COLOR_8888(src[0],src[1],src[2],src[3]); + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureData, data); + src += 4; + } + FLUSH_DMA_BUFFER(gmesa); + } + break; + + case GL_LUMINANCE: + { + GLubyte *src = (GLubyte *)image->Data; + + if (level == 0) + t->TextureFormat |= TF_Compnents_1 | TF_OneCompFmt_Lum; + + /* The UGLY way, and SLOW !, but the above sometimes causes + * a DMA overrun error ??? FIXME ! */ + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureDownloadOffset, 0); + for (i = 0; i < words; i++) { + unsigned int data; + data = PACK_COLOR_888(src[0],src[0],src[0]); + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureData, data); + src ++; + } + FLUSH_DMA_BUFFER(gmesa); + } + break; + + case GL_INTENSITY: + { + GLubyte *src = (GLubyte *)image->Data; + + if (level == 0) + t->TextureFormat |= TF_Compnents_1 | TF_OneCompFmt_Intensity; + + /* The UGLY way, and SLOW !, but the above sometimes causes + * a DMA overrun error ??? FIXME ! */ + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureDownloadOffset, 0); + for (i = 0; i < words; i++) { + unsigned int data; + data = PACK_COLOR_8888(src[0],src[0],src[0],src[0]); + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureData, data); + src ++; + } + FLUSH_DMA_BUFFER(gmesa); + } + break; + + case GL_LUMINANCE_ALPHA: + { + GLubyte *src = (GLubyte *)image->Data; + + if (level == 0) + t->TextureFormat |= TF_Compnents_2; + + /* The UGLY way, and SLOW !, but the above sometimes causes + * a DMA overrun error ??? FIXME ! */ + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureDownloadOffset, 0); + for (i = 0; i < words; i++) { + unsigned int data; + data = PACK_COLOR_8888(src[0],src[0],src[0],src[1]); + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureData, data); + src += 2; + } + FLUSH_DMA_BUFFER(gmesa); + } + break; + + case GL_ALPHA: + { + GLubyte *src = (GLubyte *)image->Data; + + if (level == 0) + t->TextureFormat |= TF_Compnents_1 | TF_OneCompFmt_Alpha; + + /* The UGLY way, and SLOW !, but the above sometimes causes + * a DMA overrun error ??? FIXME ! */ + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureDownloadOffset, 0); + for (i = 0; i < words; i++) { + unsigned int data; + data = PACK_COLOR_8888(255,255,255,src[0]); + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, TextureData, data); + src += 1; + } + FLUSH_DMA_BUFFER(gmesa); + } + break; + + /* TODO: Translate color indices *now*: + */ + case GL_COLOR_INDEX: + { + GLubyte *dst = (GLubyte *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += t->Pitch) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = src[0]; + src += 1; + } + } + } + break; + + default: + fprintf(stderr, "Not supported texture format %s\n", + _mesa_lookup_enum_by_nr(image->Format)); + } + + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, WaitForCompletion, 0); + WRITE(gmesa->buf, LBWindowBase, gmesa->LBWindowBase); +} + +void gammaPrintLocalLRU( gammaContextPtr gmesa ) +{ + gammaTextureObjectPtr t; + int sz = 1 << (gmesa->gammaScreen->logTextureGranularity); + + foreach( t, &gmesa->TexObjList ) { + if (!t->globj) + fprintf(stderr, "Placeholder %d at %x sz %x\n", + t->MemBlock->ofs / sz, + t->MemBlock->ofs, + t->MemBlock->size); + else + fprintf(stderr, "Texture at %x sz %x\n", + t->MemBlock->ofs, + t->MemBlock->size); + + } +} + +void gammaPrintGlobalLRU( gammaContextPtr gmesa ) +{ + int i, j; + GAMMATextureRegionPtr list = gmesa->sarea->texList; + + for (i = 0, j = GAMMA_NR_TEX_REGIONS ; i < GAMMA_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 == GAMMA_NR_TEX_REGIONS) break; + } + + if (j != GAMMA_NR_TEX_REGIONS) + fprintf(stderr, "Loop detected in global LRU\n"); +} + + +void gammaResetGlobalLRU( gammaContextPtr gmesa ) +{ + GAMMATextureRegionPtr list = gmesa->sarea->texList; + int sz = 1 << gmesa->gammaScreen->logTextureGranularity; + int i; + + /* (Re)initialize the global circular LRU list. The last element + * in the array (GAMMA_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 <= gmesa->gammaScreen->textureSize ; i++) { + list[i].prev = i-1; + list[i].next = i+1; + list[i].age = 0; + } + + i--; + list[0].prev = GAMMA_NR_TEX_REGIONS; + list[i].prev = i-1; + list[i].next = GAMMA_NR_TEX_REGIONS; + list[GAMMA_NR_TEX_REGIONS].prev = i; + list[GAMMA_NR_TEX_REGIONS].next = 0; + gmesa->sarea->texAge = 0; +} + + +void gammaUpdateTexLRU( gammaContextPtr gmesa, gammaTextureObjectPtr t ) +{ + int i; + int logsz = gmesa->gammaScreen->logTextureGranularity; + int start = t->MemBlock->ofs >> logsz; + int end = (t->MemBlock->ofs + t->MemBlock->size - 1) >> logsz; + GAMMATextureRegionPtr list = gmesa->sarea->texList; + + gmesa->texAge = ++gmesa->sarea->texAge; + + /* Update our local LRU + */ + move_to_head( &(gmesa->TexObjList), t ); + + /* Update the global LRU + */ + for (i = start ; i <= end ; i++) { + + list[i].in_use = 1; + list[i].age = gmesa->texAge; + + /* remove_from_list(i) + */ + 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 = GAMMA_NR_TEX_REGIONS; + list[i].next = list[GAMMA_NR_TEX_REGIONS].next; + list[(unsigned)list[GAMMA_NR_TEX_REGIONS].next].prev = i; + list[GAMMA_NR_TEX_REGIONS].next = i; + } +} + + +/* Called for every shared texture region which has increased in age + * 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. + */ +void gammaTexturesGone( gammaContextPtr gmesa, + GLuint offset, + GLuint size, + GLuint in_use ) +{ + gammaTextureObjectPtr t, tmp; + + foreach_s ( t, tmp, &gmesa->TexObjList ) { + + if (t->MemBlock->ofs >= offset + size || + t->MemBlock->ofs + t->MemBlock->size <= offset) + continue; + + /* It overlaps - kick it off. Need to hold onto the currently bound + * objects, however. + */ + gammaSwapOutTexObj( gmesa, t ); + } + + if (in_use) { + t = (gammaTextureObjectPtr) calloc(1,sizeof(*t)); + if (!t) return; + + t->MemBlock = mmAllocMem( gmesa->texHeap, size, 0, offset); + insert_at_head( &gmesa->TexObjList, t ); + } + + /* Reload any lost textures referenced by current vertex buffer. + */ +#if 0 + if (gmesa->vertex_buffer) { + int i, j; + + fprintf(stderr, "\n\nreload tex\n"); + + for (i = 0 ; i < gmesa->statenr ; i++) { + for (j = 0 ; j < 2 ; j++) { + gammaTextureObjectPtr t = gmesa->state_tex[j][i]; + if (t) { + if (t->MemBlock == 0) + gammaUploadTexImages( gmesa, t ); + } + } + } + + /* Hard to do this with the lock held: + */ +/* GAMMA_FIREVERTICES( gmesa ); */ + } +#endif +} + + + + + +/* This is called with the lock held. May have to eject our own and/or + * other client's texture objects to make room for the upload. + */ +void gammaUploadTexImages( gammaContextPtr gmesa, gammaTextureObjectPtr t ) +{ + int i; + int ofs; + int numLevels; + + /* /fprintf(stderr, "%s\n", __FUNCTION__); */ +#if 0 + LOCK_HARDWARE( gmesa ); +#endif + + /* Do we need to eject LRU texture objects? + */ + if (!t->MemBlock) { + while (1) + { + t->MemBlock = mmAllocMem( gmesa->texHeap, t->totalSize, 12, 0 ); + if (t->MemBlock) + break; + + if (gmesa->TexObjList.prev == gmesa->CurrentTexObj[0] || + gmesa->TexObjList.prev == gmesa->CurrentTexObj[1]) { + fprintf(stderr, "Hit bound texture in upload\n"); + gammaPrintLocalLRU( gmesa ); + return; + } + + if (gmesa->TexObjList.prev == &(gmesa->TexObjList)) { + fprintf(stderr, "Failed to upload texture, sz %d\n", t->totalSize); + mmDumpMemInfo( gmesa->texHeap ); + return; + } + + gammaSwapOutTexObj( gmesa, gmesa->TexObjList.prev ); + } + + ofs = t->MemBlock->ofs; + t->BufAddr = (char *)(unsigned long)(gmesa->LBWindowBase + ofs); /* ??? */ + + if (t == gmesa->CurrentTexObj[0]) + gmesa->dirty |= GAMMA_UPLOAD_TEX0; + +#if 0 + if (t == gmesa->CurrentTexObj[1]) + gmesa->dirty |= GAMMA_UPLOAD_TEX1; +#endif + + gammaUpdateTexLRU( gmesa, t ); + } + +#if 0 + if (gmesa->dirtyAge >= GET_DISPATCH_AGE(gmesa)) + gammaWaitAgeLocked( gmesa, gmesa->dirtyAge ); +#endif + + numLevels = t->lastLevel - t->firstLevel + 1; + for (i = 0 ; i < numLevels ; i++) + if (t->dirty_images & (1<dirty_images = 0; + +#if 0 + UNLOCK_HARDWARE( gmesa ); +#endif +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_texstate.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_texstate.c:1.5 --- /dev/null Thu Feb 27 12:26:23 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_texstate.c Tue Nov 5 12:46:07 2002 @@ -0,0 +1,216 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_texstate.c,v 1.5 2002/11/05 17:46:07 tsi Exp $ */ + +#include +#include + +#include "glheader.h" +#include "macros.h" +#include "mtypes.h" +#include "simple_list.h" +#include "enums.h" + +#include "mm.h" +#include "gamma_context.h" + +static void gammaSetTexImages( gammaContextPtr gmesa, + struct gl_texture_object *tObj ) +{ + GLuint height, width, pitch, i, log_pitch; + gammaTextureObjectPtr t = (gammaTextureObjectPtr) tObj->DriverData; + const struct gl_texture_image *baseImage = tObj->Image[tObj->BaseLevel]; + GLint firstLevel, lastLevel, numLevels; + GLint log2Width, log2Height; + + /* fprintf(stderr, "%s\n", __FUNCTION__); */ + + t->texelBytes = 2; + + /* Compute which mipmap levels we really want to send to the hardware. + * This depends on the base image size, GL_TEXTURE_MIN_LOD, + * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. + * Yes, this looks overly complicated, but it's all needed. + */ + if (tObj->MinFilter == GL_LINEAR || tObj->MinFilter == GL_NEAREST) { + firstLevel = lastLevel = tObj->BaseLevel; + } + else { + firstLevel = tObj->BaseLevel + (GLint) (tObj->MinLod + 0.5); + firstLevel = MAX2(firstLevel, tObj->BaseLevel); + lastLevel = tObj->BaseLevel + (GLint) (tObj->MaxLod + 0.5); + lastLevel = MAX2(lastLevel, tObj->BaseLevel); + lastLevel = MIN2(lastLevel, tObj->BaseLevel + baseImage->MaxLog2); + lastLevel = MIN2(lastLevel, tObj->MaxLevel); + lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */ + } + + /* save these values */ + t->firstLevel = firstLevel; + t->lastLevel = lastLevel; + + numLevels = lastLevel - firstLevel + 1; + + log2Width = tObj->Image[firstLevel]->WidthLog2; + log2Height = tObj->Image[firstLevel]->HeightLog2; + + + /* Figure out the amount of memory required to hold all the mipmap + * levels. Choose the smallest pitch to accomodate the largest + * mipmap: + */ + width = tObj->Image[firstLevel]->Width * t->texelBytes; + for (pitch = 32, log_pitch=2 ; pitch < width ; pitch *= 2 ) + log_pitch++; + + /* All images must be loaded at this pitch. Count the number of + * lines required: + */ + for ( height = i = 0 ; i < numLevels ; i++ ) { + t->image[i].image = tObj->Image[firstLevel + i]; + t->image[i].offset = height * pitch; + t->image[i].internalFormat = baseImage->Format; + height += t->image[i].image->Height; + t->TextureBaseAddr[i] = /* ??? */ + (unsigned long)(t->image[i].offset + t->BufAddr) << 5; + + } + + t->Pitch = pitch; + t->totalSize = height*pitch; + t->max_level = i-1; + gmesa->dirty |= GAMMA_UPLOAD_TEX0 /* | GAMMA_UPLOAD_TEX1*/; + + gammaUploadTexImages( gmesa, t ); +} + +static void gammaUpdateTexEnv( GLcontext *ctx, GLuint unit ) +{ + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + const struct gl_texture_object *tObj = texUnit->_Current; + const GLuint format = tObj->Image[tObj->BaseLevel]->Format; + gammaTextureObjectPtr t = (gammaTextureObjectPtr)tObj->DriverData; + GLuint tc; + + /* fprintf(stderr, "%s\n", __FUNCTION__); */ + + tc = t->TextureColorMode & ~(TCM_BaseFormatMask | TCM_ApplicationMask); + + switch (format) { + case GL_RGB: + tc |= TCM_BaseFormat_RGB; + break; + case GL_LUMINANCE: + tc |= TCM_BaseFormat_Lum; + break; + case GL_ALPHA: + tc |= TCM_BaseFormat_Alpha; + break; + case GL_LUMINANCE_ALPHA: + tc |= TCM_BaseFormat_LumAlpha; + break; + case GL_INTENSITY: + tc |= TCM_BaseFormat_Intensity; + break; + case GL_RGBA: + tc |= TCM_BaseFormat_RGBA; + break; + case GL_COLOR_INDEX: + break; + } + + switch (texUnit->EnvMode) { + case GL_REPLACE: + tc |= TCM_Replace; + break; + case GL_MODULATE: + tc |= TCM_Modulate; + break; + case GL_ADD: + /* do nothing ???*/ + break; + case GL_DECAL: + tc |= TCM_Decal; + break; + case GL_BLEND: + tc |= TCM_Blend; + break; + default: + fprintf(stderr, "unknown tex env mode"); + return; + } + + t->TextureColorMode = tc; +} + + + + +static void gammaUpdateTexUnit( GLcontext *ctx, GLuint unit ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + + /* fprintf(stderr, "%s\n", __FUNCTION__); */ + + if (texUnit->_ReallyEnabled == TEXTURE0_2D) + { + struct gl_texture_object *tObj = texUnit->_Current; + gammaTextureObjectPtr t = (gammaTextureObjectPtr)tObj->DriverData; + + /* Upload teximages (not pipelined) + */ + if (t->dirty_images) { + gammaSetTexImages( gmesa, tObj ); + if (!t->MemBlock) { + FALLBACK( gmesa, GAMMA_FALLBACK_TEXTURE, GL_TRUE ); + return; + } + } + +#if 0 + if (tObj->Image[tObj->BaseLevel]->Border > 0) { + FALLBACK( gmesa, GAMMA_FALLBACK_TEXTURE, GL_TRUE ); + return; + } +#endif + + /* Update state if this is a different texture object to last + * time. + */ + if (gmesa->CurrentTexObj[unit] != t) { + gmesa->dirty |= GAMMA_UPLOAD_TEX0 /* << unit */; + gmesa->CurrentTexObj[unit] = t; + gammaUpdateTexLRU( gmesa, t ); /* done too often */ + } + + /* Update texture environment if texture object image format or + * texture environment state has changed. + */ + if (tObj->Image[tObj->BaseLevel]->Format != gmesa->TexEnvImageFmt[unit]) { + gmesa->TexEnvImageFmt[unit] = tObj->Image[tObj->BaseLevel]->Format; + gammaUpdateTexEnv( ctx, unit ); + } + } + else if (texUnit->_ReallyEnabled) { + FALLBACK( gmesa, GAMMA_FALLBACK_TEXTURE, GL_TRUE ); + } + else /*if (gmesa->CurrentTexObj[unit])*/ { + gmesa->CurrentTexObj[unit] = 0; + gmesa->TexEnvImageFmt[unit] = 0; + gmesa->dirty &= ~(GAMMA_UPLOAD_TEX0< - * - */ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include -#include "gamma_init.h" -#include - -extern void gammaTOInit(gammaTexObj *t); -void *texHash = NULL; /* Hash table to hold texture objects */ - -void gammaTOInit(gammaTexObj *t) -{ - int i; - - t->TextureAddressMode = (TextureAddressModeDisable | - TAM_SWrap_Repeat | - TAM_TWrap_Repeat | - TAM_Operation_3D | - TAM_LODEnable | - TAM_DY_Enable | - TAM_TexMapType_2D); - - t->TextureReadMode = (TextureReadModeDisable | - TRM_Mag_Linear | - TRM_Min_NearestMMLinear | - TRM_UWrap_Repeat | - TRM_VWrap_Repeat | - TRM_TexMapType_2D | - TRM_MipMapEnable | - TRM_PrimaryCacheEnable | - TRM_FBSourceAddr_None | - TRM_BorderClamp); - - t->TextureColorMode = (TextureColorModeDisable | - TCM_Modulate | - TCM_OpenGLType | - TCM_KdDDA_Disable | - TCM_KsDDA_Disable | - TCM_BaseFormat_RGBA | - TCM_LoadMode_None); - - t->TextureFilterMode = (TextureFilterModeDisable); - -#if X_BYTE_ORDER == X_LITTLE_ENDIAN - t->TextureFormat = (TF_LittleEndian | -#else - t->TextureFormat = (TF_BigEndian | -#endif - TF_16Bit_565 | - TF_ColorOrder_RGB | - TF_Compnents_4 | - TF_OutputFmt_Texel); - - for (i = 0; i < MIPMAP_LEVELS; i++) { - t->image[i] = NULL; - t->TextureBaseAddr[i] = 0; - } -} - -gammaTexObj *gammaTOFind(GLuint ID) -{ - gammaTexObj *texObj; - int retcode; - - /* Create the hash table */ - if (!texHash) texHash = drmHashCreate(); - - retcode = drmHashLookup(texHash, ID, (void **)&texObj); - if (retcode > 0) { /* Not Found */ - texObj = Xmalloc(sizeof(gammaTexObj)); - gammaTOInit(texObj); - drmHashInsert(texHash, ID, texObj); - } else if (retcode < 0) { - /* NOT_DONE: Error!!! */ - } - - return texObj; -} - -void gammaTODelete(GLuint ID) -{ - int retcode; - gammaTexObj *texObj; - - /* Create the hash table */ - if (!texHash) texHash = drmHashCreate(); - - retcode = drmHashLookup(texHash, ID, (void **)&texObj); - if (!retcode) { /* Found */ - drmHashDelete(texHash, ID); - Xfree(texObj); - } else if (retcode < 0) { - /* NOT_DONE: Error!!! */ - } -} - -int gammaTOLoad(void *private, unsigned long address, - int width, int height, int texel_width, - const unsigned char *image) -{ - unsigned int *wdata = (unsigned int *)image; - int offset = 0; - int words, depthLog2; - - CALC_LOG2(depthLog2, texel_width); - words = (width*height) << (depthLog2-5); - - /* NOT_DONE: Use patch mode, if possible */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITE(gCCPriv->buf, LBWindowBase, address); - WRITE(gCCPriv->buf, TextureCacheControl, (TCC_Enable | TCC_Invalidate)); - WRITE(gCCPriv->buf, WaitForCompletion, 0); - - /* Send the old DMA buffer to the HW, and get a clean DMA buffer */ - FLUSH_DMA_BUFFER(nullCC, gCCPriv); - - while (offset < words) { - int count = gCCPriv->bufSize; /* Buf size in words */ - count -= 3; /* 3 is for TDO(Tag+Data) & TD(Tag) */ - if (count > words-offset) count = words-offset; - - WRITE(gCCPriv->buf, TextureDownloadOffset, offset); - gCCPriv->buf++->i = GlintTextureDataTag | ((count-1) << 16); - - if (wdata) - memcpy(gCCPriv->buf, wdata, count*4); - else - memset(gCCPriv->buf, 0, count*4); - - gCCPriv->buf += count; - gCCPriv->bufCount = count+3; /* 3 is for TDO(Tag+Data) & TD(Tag) */ - FLUSH_DMA_BUFFER(nullCC, gCCPriv); - - offset += count; - wdata += count; - } - - /* Make sure the texture has been completely written */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, WaitForCompletion, 0); - WRITE(gCCPriv->buf, LBWindowBase, gCCPriv->LBWindowBase); - FLUSH_DMA_BUFFER(nullCC, gCCPriv); - - return 0; -} - -int gammaTOLoadSub(void *private, unsigned long address, - int width, int height, int texel_width, - int xoffset, int yoffset, - int subimage_width, int subimage_height, - const unsigned char *image) -{ - unsigned int *wdata = (unsigned int *)image; - int depthLog2; - int h; - - if (!wdata) - return 0; - - CALC_LOG2(depthLog2, texel_width); - - /* NOT_DONE: Use patch mode, if possible */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 3); - WRITE(gCCPriv->buf, LBWindowBase, address); - WRITE(gCCPriv->buf, TextureCacheControl, (TCC_Enable | TCC_Invalidate)); - WRITE(gCCPriv->buf, WaitForCompletion, 0); - - /* Send the old DMA buffer to the HW, and get a clean DMA buffer */ - FLUSH_DMA_BUFFER(nullCC, gCCPriv); - - /* Make sure we are in bounds */ - if (xoffset < 0) xoffset = 0; - if (yoffset < 0) yoffset = 0; - if (subimage_width > width) subimage_width = width; - if (subimage_height > height) subimage_height = height; - - /* NOT_DONE: Must handle starting in the middle of a word properly */ - for (h = yoffset; h < yoffset+subimage_height; h++) { - int start = (h*width + xoffset) << (depthLog2-5); - int words = subimage_width << (depthLog2-5); - int offset = 0; - - while (offset < words) { - int count = gCCPriv->bufSize; /* Buf size in words */ - count -= 3; /* 3 is for TDO(Tag+Data) & TD(Tag) */ - if (count > words-offset) count = words-offset; - - WRITE(gCCPriv->buf, TextureDownloadOffset, start+offset); - gCCPriv->buf++->i = GlintTextureDataTag | ((count-1) << 16); - - memcpy(gCCPriv->buf, wdata, count*4); - - gCCPriv->buf += count; - gCCPriv->bufCount = count+3; /* 3 is for TDO(Tag+Data) & TD(Tag) */ - FLUSH_DMA_BUFFER(nullCC, gCCPriv); - - offset += count; - wdata += count; - } - } - - /* Make sure the texture has been completely written */ - CHECK_DMA_BUFFER(gCC, gCCPriv, 2); - WRITE(gCCPriv->buf, WaitForCompletion, 0); - WRITE(gCCPriv->buf, LBWindowBase, gCCPriv->LBWindowBase); - FLUSH_DMA_BUFFER(nullCC, gCCPriv); - - return 0; -} - -#endif Index: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h:1.2 xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h:removed --- xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h:1.2 Tue Feb 22 23:46:45 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h Thu Feb 27 12:26:23 2003 @@ -1,67 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.h,v 1.2 2000/02/23 04:46:45 martin 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: - * Kevin E. Martin - * - */ - -#ifndef _GAMMA_TEXTURE_H_ -#define _GAMMA_TEXTURE_H_ - -#ifdef GLX_DIRECT_RENDERING - -#define MIPMAP_LEVELS 12 - -typedef struct { - GLuint ID; - void *image[MIPMAP_LEVELS]; - int TextureAddressMode; - int TextureReadMode; - int TextureColorMode; - int TextureFilterMode; - int TextureFormat; - unsigned long TextureBaseAddr[MIPMAP_LEVELS]; -} gammaTexObj; - -extern gammaTexObj *gammaTOFind(GLuint ID); -extern void gammaTODelete(GLuint ID); - -extern int gammaTOLoad(void *private, unsigned long address, - int width, int height, int texel_width, - const unsigned char *image); -extern int gammaTOLoadSub(void *private, unsigned long address, - int width, int height, int texel_width, - int xoffset, int yoffset, - int subimage_width, int subimage_height, - const unsigned char *image); - -#endif - -#endif /* _GAMMA_INIT_H_ */ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_tris.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_tris.c:1.2 --- /dev/null Thu Feb 27 12:26:23 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_tris.c Wed Oct 30 07:51:30 2002 @@ -0,0 +1,654 @@ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * Keith Whitwell, + * + * 3DLabs Gamma driver. + */ + +#include +#include + +#include "gamma_context.h" +#include "gamma_vb.h" +#include "gamma_tris.h" + +#include "glheader.h" +#include "mtypes.h" +#include "macros.h" +#include "colormac.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + + +/*********************************************************************** + * Build hardware rasterization functions * + ***********************************************************************/ + +#define GAMMA_RAST_ALPHA_BIT 0x01 +#define GAMMA_RAST_TEX_BIT 0x02 +#define GAMMA_RAST_FLAT_BIT 0x04 + +static gamma_point_func gamma_point_tab[0x8]; +static gamma_line_func gamma_line_tab[0x8]; +static gamma_tri_func gamma_tri_tab[0x8]; +static gamma_quad_func gamma_quad_tab[0x8]; + +#define IND (0) +#define TAG(x) x +#include "gamma_tritmp.h" + +#define IND (GAMMA_RAST_ALPHA_BIT) +#define TAG(x) x##_alpha +#include "gamma_tritmp.h" + +#define IND (GAMMA_RAST_TEX_BIT) +#define TAG(x) x##_tex +#include "gamma_tritmp.h" + +#define IND (GAMMA_RAST_ALPHA_BIT|GAMMA_RAST_TEX_BIT) +#define TAG(x) x##_alpha_tex +#include "gamma_tritmp.h" + +#define IND (GAMMA_RAST_FLAT_BIT) +#define TAG(x) x##_flat +#include "gamma_tritmp.h" + +#define IND (GAMMA_RAST_ALPHA_BIT|GAMMA_RAST_FLAT_BIT) +#define TAG(x) x##_alpha_flat +#include "gamma_tritmp.h" + +#define IND (GAMMA_RAST_TEX_BIT|GAMMA_RAST_FLAT_BIT) +#define TAG(x) x##_tex_flat +#include "gamma_tritmp.h" + +#define IND (GAMMA_RAST_ALPHA_BIT|GAMMA_RAST_TEX_BIT|GAMMA_RAST_FLAT_BIT) +#define TAG(x) x##_alpha_tex_flat +#include "gamma_tritmp.h" + + +static void init_rast_tab( void ) +{ + gamma_init(); + gamma_init_alpha(); + gamma_init_tex(); + gamma_init_alpha_tex(); + gamma_init_flat(); + gamma_init_alpha_flat(); + gamma_init_tex_flat(); + gamma_init_alpha_tex_flat(); +} + +/*********************************************************************** + * Rasterization fallback helpers * + ***********************************************************************/ + + +/* This code is hit only when a mix of accelerated and unaccelerated + * primitives are being drawn, and only for the unaccelerated + * primitives. + */ +static void +gamma_fallback_quad( gammaContextPtr gmesa, + const gammaVertex *v0, + const gammaVertex *v1, + const gammaVertex *v2, + const gammaVertex *v3 ) +{ + GLcontext *ctx = gmesa->glCtx; + SWvertex v[4]; + gamma_translate_vertex( ctx, v0, &v[0] ); + gamma_translate_vertex( ctx, v1, &v[1] ); + gamma_translate_vertex( ctx, v2, &v[2] ); + gamma_translate_vertex( ctx, v3, &v[3] ); + _swrast_Quad( ctx, &v[0], &v[1], &v[2], &v[3] ); +} + +static void +gamma_fallback_tri( gammaContextPtr gmesa, + const gammaVertex *v0, + const gammaVertex *v1, + const gammaVertex *v2 ) +{ + GLcontext *ctx = gmesa->glCtx; + SWvertex v[3]; + gamma_translate_vertex( ctx, v0, &v[0] ); + gamma_translate_vertex( ctx, v1, &v[1] ); + gamma_translate_vertex( ctx, v2, &v[2] ); + _swrast_Triangle( ctx, &v[0], &v[1], &v[2] ); +} + +static void +gamma_fallback_line( gammaContextPtr gmesa, + const gammaVertex *v0, + const gammaVertex *v1 ) +{ + GLcontext *ctx = gmesa->glCtx; + SWvertex v[2]; + gamma_translate_vertex( ctx, v0, &v[0] ); + gamma_translate_vertex( ctx, v1, &v[1] ); + _swrast_Line( ctx, &v[0], &v[1] ); +} + + +static void +gamma_fallback_point( gammaContextPtr gmesa, + const gammaVertex *v0 ) +{ + GLcontext *ctx = gmesa->glCtx; + SWvertex v[1]; + gamma_translate_vertex( ctx, v0, &v[0] ); + _swrast_Point( ctx, &v[0] ); +} + + +/*********************************************************************** + * Choose rasterization functions * + ***********************************************************************/ + +#define _GAMMA_NEW_RASTER_STATE (_NEW_FOG | \ + _NEW_TEXTURE | \ + _DD_NEW_TRI_SMOOTH | \ + _DD_NEW_LINE_SMOOTH | \ + _DD_NEW_POINT_SMOOTH | \ + _DD_NEW_TRI_STIPPLE | \ + _DD_NEW_LINE_STIPPLE) + +#define LINE_FALLBACK (0) +#define TRI_FALLBACK (0) + +void gammaChooseRasterState(GLcontext *ctx) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint ind = 0; + + if ( ctx->Line.SmoothFlag || + ctx->Polygon.SmoothFlag || + ctx->Point.SmoothFlag ) + gmesa->Begin |= B_AntiAliasEnable; + else + gmesa->Begin &= ~B_AntiAliasEnable; + + if ( ctx->Texture._ReallyEnabled ) { + ind |= GAMMA_RAST_TEX_BIT; + gmesa->Begin |= B_TextureEnable; + } else + gmesa->Begin &= ~B_TextureEnable; + + if (flags & DD_LINE_STIPPLE) + gmesa->Begin |= B_LineStippleEnable; + else + gmesa->Begin &= ~B_LineStippleEnable; + + if (flags & DD_TRI_STIPPLE) + gmesa->Begin |= B_AreaStippleEnable; + else + gmesa->Begin &= ~B_AreaStippleEnable; + + if (ctx->Fog.Enabled) + gmesa->Begin |= B_FogEnable; + else + gmesa->Begin &= ~B_FogEnable; + + if (ctx->Color.BlendEnabled || ctx->Color.AlphaEnabled) + ind |= GAMMA_RAST_ALPHA_BIT; + + if ( flags & DD_FLATSHADE ) + ind |= GAMMA_RAST_FLAT_BIT; + + gmesa->draw_line = gamma_line_tab[ind]; + gmesa->draw_tri = gamma_tri_tab[ind]; + gmesa->draw_quad = gamma_quad_tab[ind]; + gmesa->draw_point = gamma_point_tab[ind]; + + /* Hook in fallbacks for specific primitives. CURRENTLY DISABLED + */ + if (flags & LINE_FALLBACK) + gmesa->draw_line = gamma_fallback_line; + + if (flags & TRI_FALLBACK) { + gmesa->draw_tri = gamma_fallback_tri; + gmesa->draw_quad = gamma_fallback_quad; + } +} + + + + +/*********************************************************************** + * Macros for t_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI( a, b, c ) \ +do { \ + gmesa->draw_tri( gmesa, a, b, c ); \ +} while (0) + +#define QUAD( a, b, c, d ) \ +do { \ + gmesa->draw_quad( gmesa, a, b, c, d ); \ +} while (0) + +#define LINE( v0, v1 ) \ +do { \ + gmesa->draw_line( gmesa, v0, v1 ); \ +} while (0) + +#define POINT( v0 ) \ +do { \ + gmesa->draw_point( gmesa, v0 ); \ +} while (0) + + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define GAMMA_OFFSET_BIT 0x01 +#define GAMMA_TWOSIDE_BIT 0x02 +#define GAMMA_UNFILLED_BIT 0x04 +#define GAMMA_FALLBACK_BIT 0x08 +#define GAMMA_MAX_TRIFUNC 0x10 + + +static struct { + points_func points; + line_func line; + triangle_func triangle; + quad_func quad; +} rast_tab[GAMMA_MAX_TRIFUNC]; + + +#define DO_FALLBACK (IND & GAMMA_FALLBACK_BIT) +#define DO_OFFSET 0 /* (IND & GAMMA_OFFSET_BIT) */ +#define DO_UNFILLED 0 /* (IND & GAMMA_UNFILLED_BIT) */ +#define DO_TWOSIDE (IND & GAMMA_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 0 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define VERTEX gammaVertex +#define TAB rast_tab + +#define DEPTH_SCALE 1.0 +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW( a ) (a > 0) +#define GET_VERTEX(e) (gmesa->verts + (e<vertex_stride_shift)) + +#define VERT_SET_RGBA( v, c ) COPY_4V( v->ub4[4], c) +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[4] = v1->ui[4] +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[4] +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[4] = color[idx] + +#define LOCAL_VARS(n) \ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); \ + GLuint color[n]; \ + (void) color; + + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +static const GLuint hw_prim[GL_POLYGON+1] = { + B_PrimType_Points, + B_PrimType_Lines, + B_PrimType_Lines, + B_PrimType_Lines, + B_PrimType_Triangles, + B_PrimType_Triangles, + B_PrimType_Triangles, + B_PrimType_Triangles, + B_PrimType_Triangles, + B_PrimType_Triangles +}; + +static void gammaResetLineStipple( GLcontext *ctx ); +static void gammaRasterPrimitive( GLcontext *ctx, GLuint hwprim ); +static void gammaRenderPrimitive( GLcontext *ctx, GLenum prim ); + +#define RASTERIZE(x) if (gmesa->hw_primitive != hw_prim[x]) \ + gammaRasterPrimitive( ctx, hw_prim[x] ) +#define RENDER_PRIMITIVE gmesa->render_primitive +#define TAG(x) x +#define IND GAMMA_FALLBACK_BIT +#include "tnl_dd/t_dd_unfilled.h" +#undef IND + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (GAMMA_OFFSET_BIT) +#define TAG(x) x##_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (GAMMA_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (GAMMA_TWOSIDE_BIT|GAMMA_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (GAMMA_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (GAMMA_OFFSET_BIT|GAMMA_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (GAMMA_TWOSIDE_BIT|GAMMA_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (GAMMA_TWOSIDE_BIT|GAMMA_OFFSET_BIT|GAMMA_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + + + +static void init_render_tab( void ) +{ + init(); + init_offset(); + init_twoside(); + init_twoside_offset(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); +} + + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ + +#define VERT(x) (gammaVertex *)(gammaverts + (x << shift)) +#define RENDER_POINTS( start, count ) \ + for ( ; start < count ; start++) \ + gmesa->draw_point( gmesa, VERT(start) ) +#define RENDER_LINE( v0, v1 ) \ + gmesa->draw_line( gmesa, VERT(v0), VERT(v1) ) +#define RENDER_TRI( v0, v1, v2 ) \ + gmesa->draw_tri( gmesa, VERT(v0), VERT(v1), VERT(v2) ) +#define RENDER_QUAD( v0, v1, v2, v3 ) \ + gmesa->draw_quad( gmesa, VERT(v0), VERT(v1), VERT(v2), VERT(v3) ) +#define INIT(x) gammaRenderPrimitive( ctx, x ); +#undef LOCAL_VARS +#define LOCAL_VARS \ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); \ + const GLuint shift = gmesa->vertex_stride_shift; \ + const char *gammaverts = (char *)gmesa->verts; \ + const GLboolean stipple = ctx->Line.StippleFlag; \ + (void) stipple; +#define RESET_STIPPLE if ( stipple ) gammaResetLineStipple( ctx ); +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) (x) +#define TAG(x) gamma_##x##_verts +#include "tnl/t_vb_rendertmp.h" + + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + +static void gammaRenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint prim = gmesa->render_primitive; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON]( ctx, 0, n, PRIM_BEGIN|PRIM_END ); + VB->Elts = tmp; + } + + /* Restore the render primitive + */ + if (prim != GL_POLYGON) + tnl->Driver.Render.PrimitiveNotify( ctx, prim ); +} + +static void gammaRenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line( ctx, ii, jj ); +} + + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + + + +#define _GAMMA_NEW_RENDERSTATE (_DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET) + +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) + +static void gammaChooseRenderState(GLcontext *ctx) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint index = 0; + + if (flags & ANY_RASTER_FLAGS) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= GAMMA_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= GAMMA_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= GAMMA_UNFILLED_BIT; + } + + if (gmesa->RenderIndex != index) { + gmesa->RenderIndex = index; + + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (gmesa->RenderIndex == 0) + tnl->Driver.Render.PrimTabVerts = gamma_render_tab_verts; + else + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = gammaRenderClippedLine; + tnl->Driver.Render.ClippedPolygon = gammaRenderClippedPoly; + } +} + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + + +/* Determine the rasterized primitive when not drawing unfilled + * polygons. + * + * Used only for the default render stage which always decomposes + * primitives to trianges/lines/points. For the accelerated stage, + * which renders strips as strips, the equivalent calculations are + * performed in gammarender.c. + */ + +static void gammaRasterPrimitive( GLcontext *ctx, GLuint hwprim ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + if (gmesa->hw_primitive != hwprim) + gmesa->hw_primitive = hwprim; +} + +static void gammaRenderPrimitive( GLcontext *ctx, GLenum prim ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + gmesa->render_primitive = prim; +} + +static void gammaRunPipeline( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + if ( gmesa->new_state ) + gammaDDUpdateHWState( ctx ); + + if (gmesa->new_gl_state) { + if (gmesa->new_gl_state & _NEW_TEXTURE) + gammaUpdateTextureState( ctx ); + + if (!gmesa->Fallback) { + if (gmesa->new_gl_state & _GAMMA_NEW_VERTEX) + gammaChooseVertexState( ctx ); + + if (gmesa->new_gl_state & _GAMMA_NEW_RASTER_STATE) + gammaChooseRasterState( ctx ); + + if (gmesa->new_gl_state & _GAMMA_NEW_RENDERSTATE) + gammaChooseRenderState( ctx ); + } + + gmesa->new_gl_state = 0; + } + + _tnl_run_pipeline( ctx ); +} + +static void gammaRenderStart( GLcontext *ctx ) +{ + /* Check for projective texturing. Make sure all texcoord + * pointers point to something. (fix in mesa?) + */ + gammaCheckTexSizes( ctx ); +} + +static void gammaRenderFinish( GLcontext *ctx ) +{ + if (0) + _swrast_flush( ctx ); /* never needed */ +} + +static void gammaResetLineStipple( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + + /* Reset the hardware stipple counter. + */ + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, UpdateLineStippleCounters, 0); +} + + +/**********************************************************************/ +/* Transition to/from hardware rasterization. */ +/**********************************************************************/ + + +void gammaFallback( gammaContextPtr gmesa, GLuint bit, GLboolean mode ) +{ + GLcontext *ctx = gmesa->glCtx; + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint oldfallback = gmesa->Fallback; + + if (mode) { + gmesa->Fallback |= bit; + if (oldfallback == 0) { + _swsetup_Wakeup( ctx ); + _tnl_need_projected_coords( ctx, GL_TRUE ); + gmesa->RenderIndex = ~0; + } + } + else { + gmesa->Fallback &= ~bit; + if (oldfallback == bit) { + _swrast_flush( ctx ); + tnl->Driver.Render.Start = gammaRenderStart; + tnl->Driver.Render.PrimitiveNotify = gammaRenderPrimitive; + tnl->Driver.Render.Finish = gammaRenderFinish; + tnl->Driver.Render.BuildVertices = gammaBuildVertices; + tnl->Driver.Render.ResetLineStipple = gammaResetLineStipple; + gmesa->new_gl_state |= (_GAMMA_NEW_RENDERSTATE| + _GAMMA_NEW_RASTER_STATE| + _GAMMA_NEW_VERTEX); + } + } +} + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + + +void gammaDDInitTriFuncs( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + init_render_tab(); + firsttime = 0; + } + + gmesa->RenderIndex = ~0; + + tnl->Driver.RunPipeline = gammaRunPipeline; + tnl->Driver.Render.Start = gammaRenderStart; + tnl->Driver.Render.Finish = gammaRenderFinish; + tnl->Driver.Render.PrimitiveNotify = gammaRenderPrimitive; + tnl->Driver.Render.ResetLineStipple = gammaResetLineStipple; + tnl->Driver.Render.BuildVertices = gammaBuildVertices; +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_tris.h diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_tris.h:1.2 --- /dev/null Thu Feb 27 12:26:23 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_tris.h Wed Oct 30 07:51:30 2002 @@ -0,0 +1,36 @@ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * Keith Whitwell, + * + * 3DLabs Gamma driver. + */ + +#ifndef _GAMMA_TRIS_H +#define _GAMMA_TRIS_H + +extern void gammaDDTrifuncInit(void); +extern void gammaDDChooseTriRenderState(GLcontext *); + + + +#endif /* !(_GAMMA_TRIS_H) */ Index: xc/lib/GL/mesa/src/drv/gamma/gamma_tritmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_tritmp.h:1.1 --- /dev/null Thu Feb 27 12:26:23 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_tritmp.h Fri Feb 22 16:33:02 2002 @@ -0,0 +1,495 @@ +static void TAG(gamma_point)( gammaContextPtr gmesa, + const gammaVertex *v0 ) +{ + CARD32 vColor; + CARD32 vBegin; + + vBegin = gmesa->Begin | B_PrimType_Points; + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Begin, vBegin); + +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v0->v.color.alpha << 24) | + (v0->v.color.blue << 16) | + (v0->v.color.green << 8) | + (v0->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v0->v.color.blue << 16) | + (v0->v.color.green << 8) | + (v0->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v0->v.u0); + WRITEF(gmesa->buf, Ts2, v0->v.v0); + WRITEF(gmesa->buf, Vw, v0->v.w); + WRITEF(gmesa->buf, Vz, v0->v.z); + WRITEF(gmesa->buf, Vy, v0->v.y); + WRITEF(gmesa->buf, Vx4, v0->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v0->v.w); + WRITEF(gmesa->buf, Vz, v0->v.z); + WRITEF(gmesa->buf, Vy, v0->v.y); + WRITEF(gmesa->buf, Vx4, v0->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, FlushSpan, 0); +#endif + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, End, 0); +} + +static void TAG(gamma_line)( gammaContextPtr gmesa, + const gammaVertex *v0, + const gammaVertex *v1 ) +{ + CARD32 vColor; + CARD32 vBegin; + + vBegin = gmesa->Begin | B_PrimType_Lines; + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Begin, vBegin); + +#if !(IND & GAMMA_RAST_FLAT_BIT) +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v0->v.color.alpha << 24) | + (v0->v.color.blue << 16) | + (v0->v.color.green << 8) | + (v0->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v0->v.color.blue << 16) | + (v0->v.color.green << 8) | + (v0->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#else +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v1->v.color.alpha << 24) | + (v1->v.color.blue << 16) | + (v1->v.color.green << 8) | + (v1->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v1->v.color.blue << 16) | + (v1->v.color.green << 8) | + (v1->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v0->v.u0); + WRITEF(gmesa->buf, Ts2, v0->v.v0); + WRITEF(gmesa->buf, Vw, v0->v.w); + WRITEF(gmesa->buf, Vz, v0->v.z); + WRITEF(gmesa->buf, Vy, v0->v.y); + WRITEF(gmesa->buf, Vx4, v0->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v0->v.w); + WRITEF(gmesa->buf, Vz, v0->v.z); + WRITEF(gmesa->buf, Vy, v0->v.y); + WRITEF(gmesa->buf, Vx4, v0->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v1->v.color.alpha << 24) | + (v1->v.color.blue << 16) | + (v1->v.color.green << 8) | + (v1->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v1->v.color.blue << 16) | + (v1->v.color.green << 8) | + (v1->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v1->v.u0); + WRITEF(gmesa->buf, Ts2, v1->v.v0); + WRITEF(gmesa->buf, Vw, v1->v.w); + WRITEF(gmesa->buf, Vz, v1->v.z); + WRITEF(gmesa->buf, Vy, v1->v.y); + WRITEF(gmesa->buf, Vx4, v1->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v1->v.w); + WRITEF(gmesa->buf, Vz, v1->v.z); + WRITEF(gmesa->buf, Vy, v1->v.y); + WRITEF(gmesa->buf, Vx4, v1->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, FlushSpan, 0); +#endif + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, End, 0); +} + +static void TAG(gamma_triangle)( gammaContextPtr gmesa, + const gammaVertex *v0, + const gammaVertex *v1, + const gammaVertex *v2 ) +{ + CARD32 vColor; + CARD32 vBegin; + + vBegin = gmesa->Begin | B_PrimType_Triangles; + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Begin, vBegin); + +#if !(IND & GAMMA_RAST_FLAT_BIT) +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v0->v.color.alpha << 24) | + (v0->v.color.blue << 16) | + (v0->v.color.green << 8) | + (v0->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v0->v.color.blue << 16) | + (v0->v.color.green << 8) | + (v0->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#else +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v2->v.color.alpha << 24) | + (v2->v.color.blue << 16) | + (v2->v.color.green << 8) | + (v2->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v2->v.color.blue << 16) | + (v2->v.color.green << 8) | + (v2->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v0->v.u0); + WRITEF(gmesa->buf, Ts2, v0->v.v0); + WRITEF(gmesa->buf, Vw, v0->v.w); + WRITEF(gmesa->buf, Vz, v0->v.z); + WRITEF(gmesa->buf, Vy, v0->v.y); + WRITEF(gmesa->buf, Vx4, v0->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v0->v.w); + WRITEF(gmesa->buf, Vz, v0->v.z); + WRITEF(gmesa->buf, Vy, v0->v.y); + WRITEF(gmesa->buf, Vx4, v0->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v1->v.color.alpha << 24) | + (v1->v.color.blue << 16) | + (v1->v.color.green << 8) | + (v1->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v1->v.color.blue << 16) | + (v1->v.color.green << 8) | + (v1->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v1->v.u0); + WRITEF(gmesa->buf, Ts2, v1->v.v0); + WRITEF(gmesa->buf, Vw, v1->v.w); + WRITEF(gmesa->buf, Vz, v1->v.z); + WRITEF(gmesa->buf, Vy, v1->v.y); + WRITEF(gmesa->buf, Vx4, v1->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v1->v.w); + WRITEF(gmesa->buf, Vz, v1->v.z); + WRITEF(gmesa->buf, Vy, v1->v.y); + WRITEF(gmesa->buf, Vx4, v1->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v2->v.color.alpha << 24) | + (v2->v.color.blue << 16) | + (v2->v.color.green << 8) | + (v2->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v2->v.color.blue << 16) | + (v2->v.color.green << 8) | + (v2->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v2->v.u0); + WRITEF(gmesa->buf, Ts2, v2->v.v0); + WRITEF(gmesa->buf, Vw, v2->v.w); + WRITEF(gmesa->buf, Vz, v2->v.z); + WRITEF(gmesa->buf, Vy, v2->v.y); + WRITEF(gmesa->buf, Vx4, v2->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v2->v.w); + WRITEF(gmesa->buf, Vz, v2->v.z); + WRITEF(gmesa->buf, Vy, v2->v.y); + WRITEF(gmesa->buf, Vx4, v2->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, FlushSpan, 0); +#endif + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, End, 0); +} + +static void TAG(gamma_quad)( gammaContextPtr gmesa, + const gammaVertex *v0, + const gammaVertex *v1, + const gammaVertex *v2, + const gammaVertex *v3 ) +{ + CARD32 vColor; + CARD32 vBegin; + + vBegin = gmesa->Begin | B_PrimType_Quads; + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, Begin, vBegin); + +#if !(IND & GAMMA_RAST_FLAT_BIT) +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v0->v.color.alpha << 24) | + (v0->v.color.blue << 16) | + (v0->v.color.green << 8) | + (v0->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v0->v.color.blue << 16) | + (v0->v.color.green << 8) | + (v0->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#else +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v3->v.color.alpha << 24) | + (v3->v.color.blue << 16) | + (v3->v.color.green << 8) | + (v3->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v3->v.color.blue << 16) | + (v3->v.color.green << 8) | + (v3->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v0->v.u0); + WRITEF(gmesa->buf, Ts2, v0->v.v0); + WRITEF(gmesa->buf, Vw, v0->v.w); + WRITEF(gmesa->buf, Vz, v0->v.z); + WRITEF(gmesa->buf, Vy, v0->v.y); + WRITEF(gmesa->buf, Vx4, v0->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v0->v.w); + WRITEF(gmesa->buf, Vz, v0->v.z); + WRITEF(gmesa->buf, Vy, v0->v.y); + WRITEF(gmesa->buf, Vx4, v0->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v1->v.color.alpha << 24) | + (v1->v.color.blue << 16) | + (v1->v.color.green << 8) | + (v1->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v1->v.color.blue << 16) | + (v1->v.color.green << 8) | + (v1->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v1->v.u0); + WRITEF(gmesa->buf, Ts2, v1->v.v0); + WRITEF(gmesa->buf, Vw, v1->v.w); + WRITEF(gmesa->buf, Vz, v1->v.z); + WRITEF(gmesa->buf, Vy, v1->v.y); + WRITEF(gmesa->buf, Vx4, v1->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v1->v.w); + WRITEF(gmesa->buf, Vz, v1->v.z); + WRITEF(gmesa->buf, Vy, v1->v.y); + WRITEF(gmesa->buf, Vx4, v1->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v2->v.color.alpha << 24) | + (v2->v.color.blue << 16) | + (v2->v.color.green << 8) | + (v2->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v2->v.color.blue << 16) | + (v2->v.color.green << 8) | + (v2->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v2->v.u0); + WRITEF(gmesa->buf, Ts2, v2->v.v0); + WRITEF(gmesa->buf, Vw, v2->v.w); + WRITEF(gmesa->buf, Vz, v2->v.z); + WRITEF(gmesa->buf, Vy, v2->v.y); + WRITEF(gmesa->buf, Vx4, v2->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v2->v.w); + WRITEF(gmesa->buf, Vz, v2->v.z); + WRITEF(gmesa->buf, Vy, v2->v.y); + WRITEF(gmesa->buf, Vx4, v2->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) +#if (IND & GAMMA_RAST_ALPHA_BIT) + vColor = (v3->v.color.alpha << 24) | + (v3->v.color.blue << 16) | + (v3->v.color.green << 8) | + (v3->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor4, vColor); +#else + vColor = (v3->v.color.blue << 16) | + (v3->v.color.green << 8) | + (v3->v.color.red << 0); + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, PackedColor3, vColor); +#endif +#endif + +#if (IND & GAMMA_RAST_TEX_BIT) + CHECK_DMA_BUFFER(gmesa, 6); + WRITEF(gmesa->buf, Tt2, v3->v.u0); + WRITEF(gmesa->buf, Ts2, v3->v.v0); + WRITEF(gmesa->buf, Vw, v3->v.w); + WRITEF(gmesa->buf, Vz, v3->v.z); + WRITEF(gmesa->buf, Vy, v3->v.y); + WRITEF(gmesa->buf, Vx4, v3->v.x); +#else + CHECK_DMA_BUFFER(gmesa, 4); + WRITEF(gmesa->buf, Vw, v3->v.w); + WRITEF(gmesa->buf, Vz, v3->v.z); + WRITEF(gmesa->buf, Vy, v3->v.y); + WRITEF(gmesa->buf, Vx4, v3->v.x); +#endif + +#if !(IND & GAMMA_RAST_FLAT_BIT) + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, FlushSpan, 0); +#endif + + CHECK_DMA_BUFFER(gmesa, 1); + WRITE(gmesa->buf, End, 0); +} + +static void TAG(gamma_init)(void) +{ + gamma_point_tab[IND] = TAG(gamma_point); + gamma_line_tab[IND] = TAG(gamma_line); + gamma_tri_tab[IND] = TAG(gamma_triangle); + gamma_quad_tab[IND] = TAG(gamma_quad); +} + +#undef IND +#undef TAG Index: xc/lib/GL/mesa/src/drv/gamma/gamma_vb.c diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_vb.c:1.3 --- /dev/null Thu Feb 27 12:26:23 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_vb.c Wed Oct 30 07:51:30 2002 @@ -0,0 +1,381 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_vb.c,v 1.3 2002/10/30 12:51:30 alanh Exp $ */ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * Keith Whitwell, + * + * 3DLabs Gamma driver. + */ + +#include "glheader.h" +#include "mtypes.h" +#include "mem.h" +#include "macros.h" +#include "colormac.h" +#include "mmath.h" + +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" +#include "tnl/tnl.h" + +#include "gamma_context.h" +#include "gamma_vb.h" +#include "gamma_tris.h" + + +#define GAMMA_TEX0_BIT 0x1 +#define GAMMA_RGBA_BIT 0x2 +#define GAMMA_XYZW_BIT 0x4 +#define GAMMA_PTEX_BIT 0x8 +#define GAMMA_FOG_BIT 0x10 +#define GAMMA_SPEC_BIT 0x20 +#define GAMMA_MAX_SETUP 0x40 + +static struct { + void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint ); + interp_func interp; + copy_pv_func copy_pv; + GLboolean (*check_tex_sizes)( GLcontext *ctx ); + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; +} setup_tab[GAMMA_MAX_SETUP]; + +#define TINY_VERTEX_FORMAT 1 +#define NOTEX_VERTEX_FORMAT 2 +#define TEX0_VERTEX_FORMAT 3 +#define TEX1_VERTEX_FORMAT 0 +#define PROJ_TEX1_VERTEX_FORMAT 0 +#define TEX2_VERTEX_FORMAT 0 +#define TEX3_VERTEX_FORMAT 0 +#define PROJ_TEX3_VERTEX_FORMAT 0 + +#define DO_XYZW (IND & GAMMA_XYZW_BIT) +#define DO_RGBA (IND & GAMMA_RGBA_BIT) +#define DO_SPEC (IND & GAMMA_SPEC_BIT) +#define DO_FOG (IND & GAMMA_FOG_BIT) +#define DO_TEX0 (IND & GAMMA_TEX0_BIT) +#define DO_TEX1 0 +#define DO_TEX2 0 +#define DO_TEX3 0 +#define DO_PTEX (IND & GAMMA_PTEX_BIT) + +#define VERTEX gammaVertex +#define VERTEX_COLOR gamma_color_t +#define GET_VIEWPORT_MAT() 0 +#define GET_TEXSOURCE(n) n +#define GET_VERTEX_FORMAT() GAMMA_CONTEXT(ctx)->vertex_format +#define GET_VERTEX_STORE() GAMMA_CONTEXT(ctx)->verts +#define GET_VERTEX_STRIDE_SHIFT() GAMMA_CONTEXT(ctx)->vertex_stride_shift +#define INVALIDATE_STORED_VERTICES() +#define GET_UBYTE_COLOR_STORE() &GAMMA_CONTEXT(ctx)->UbyteColor +#define GET_UBYTE_SPEC_COLOR_STORE() &GAMMA_CONTEXT(ctx)->UbyteSecondaryColor + +#define HAVE_HW_VIEWPORT 1 +#define HAVE_HW_DIVIDE 1 +#define HAVE_RGBA_COLOR 0 /* we're BGRA */ +#define HAVE_TINY_VERTICES 1 +#define HAVE_NOTEX_VERTICES 1 +#define HAVE_TEX0_VERTICES 1 +#define HAVE_TEX1_VERTICES 0 +#define HAVE_TEX2_VERTICES 0 +#define HAVE_TEX3_VERTICES 0 +#define HAVE_PTEX_VERTICES 1 + +#define PTEX_FALLBACK() /* never needed */ + +#define IMPORT_QUALIFIER +#define IMPORT_FLOAT_COLORS gamma_import_float_colors +#define IMPORT_FLOAT_SPEC_COLORS gamma_import_float_spec_colors + +#define INTERP_VERTEX setup_tab[GAMMA_CONTEXT(ctx)->SetupIndex].interp +#define COPY_PV_VERTEX setup_tab[GAMMA_CONTEXT(ctx)->SetupIndex].copy_pv + + + +/*********************************************************************** + * Generate pv-copying and translation functions * + ***********************************************************************/ + +#define TAG(x) gamma_##x +#include "tnl_dd/t_dd_vb.c" + +/*********************************************************************** + * Generate vertex emit and interp functions * + ***********************************************************************/ + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT) +#define TAG(x) x##_wg +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_SPEC_BIT) +#define TAG(x) x##_wgs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_wgt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_TEX0_BIT|GAMMA_PTEX_BIT) +#define TAG(x) x##_wgpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_SPEC_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_wgst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_SPEC_BIT|GAMMA_TEX0_BIT|\ + GAMMA_PTEX_BIT) +#define TAG(x) x##_wgspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT) +#define TAG(x) x##_wgf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT) +#define TAG(x) x##_wgfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_wgft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_TEX0_BIT|\ + GAMMA_PTEX_BIT) +#define TAG(x) x##_wgfpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT|\ + GAMMA_TEX0_BIT) +#define TAG(x) x##_wgfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_XYZW_BIT|GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT|\ + GAMMA_TEX0_BIT|GAMMA_PTEX_BIT) +#define TAG(x) x##_wgfspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_TEX0_BIT) +#define TAG(x) x##_t0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_FOG_BIT) +#define TAG(x) x##_f +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_FOG_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_ft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT) +#define TAG(x) x##_g +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_SPEC_BIT) +#define TAG(x) x##_gs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_gt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_SPEC_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_gst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_FOG_BIT) +#define TAG(x) x##_gf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT) +#define TAG(x) x##_gfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_gft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (GAMMA_RGBA_BIT|GAMMA_FOG_BIT|GAMMA_SPEC_BIT|GAMMA_TEX0_BIT) +#define TAG(x) x##_gfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +static void init_setup_tab( void ) +{ + init_wg(); + init_wgs(); + init_wgt0(); + init_wgpt0(); + init_wgst0(); + init_wgspt0(); + init_wgf(); + init_wgfs(); + init_wgft0(); + init_wgfpt0(); + init_wgfst0(); + init_wgfspt0(); + init_t0(); + init_f(); + init_ft0(); + init_g(); + init_gs(); + init_gt0(); + init_gst0(); + init_gf(); + init_gfs(); + init_gft0(); + init_gfst0(); +} + +void gammaCheckTexSizes( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + gammaContextPtr gmesa = GAMMA_CONTEXT( ctx ); + + if (!setup_tab[gmesa->SetupIndex].check_tex_sizes(ctx)) { + /* Invalidate stored verts + */ + gmesa->SetupNewInputs = ~0; + gmesa->SetupIndex |= GAMMA_PTEX_BIT; + + if (!(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { + tnl->Driver.Render.Interp = setup_tab[gmesa->SetupIndex].interp; + tnl->Driver.Render.CopyPV = setup_tab[gmesa->SetupIndex].copy_pv; + } + } +} + +void gammaBuildVertices( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint newinputs ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT( ctx ); + GLubyte *v = ((GLubyte *)gmesa->verts + (start<vertex_stride_shift)); + GLuint stride = 1<vertex_stride_shift; + + newinputs |= gmesa->SetupNewInputs; + gmesa->SetupNewInputs = 0; + + if (!newinputs) + return; + + if (newinputs & VERT_CLIP) { + setup_tab[gmesa->SetupIndex].emit( ctx, start, count, v, stride ); + } else { + GLuint ind = 0; + + if (newinputs & VERT_RGBA) + ind |= GAMMA_RGBA_BIT; + + if (newinputs & VERT_SPEC_RGB) + ind |= GAMMA_SPEC_BIT; + + if (newinputs & VERT_TEX0) + ind |= GAMMA_TEX0_BIT; + + if (newinputs & VERT_FOG_COORD) + ind |= GAMMA_FOG_BIT; + + if (gmesa->SetupIndex & GAMMA_PTEX_BIT) + ind = ~0; + + ind &= gmesa->SetupIndex; + + if (ind) { + setup_tab[ind].emit( ctx, start, count, v, stride ); + } + } +} + +void gammaChooseVertexState( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT( ctx ); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint ind = GAMMA_XYZW_BIT|GAMMA_RGBA_BIT; + + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + ind |= GAMMA_SPEC_BIT; + + if (ctx->Fog.Enabled) + ind |= GAMMA_FOG_BIT; + + if (ctx->Texture._ReallyEnabled) { + _tnl_need_projected_coords( ctx, GL_FALSE ); + ind |= GAMMA_TEX0_BIT; + } else + _tnl_need_projected_coords( ctx, GL_FALSE ); + + gmesa->SetupIndex = ind; + + if (setup_tab[ind].vertex_format != gmesa->vertex_format) { + gmesa->vertex_format = setup_tab[ind].vertex_format; + gmesa->vertex_size = setup_tab[ind].vertex_size; + gmesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; + } + + if (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED)) { + tnl->Driver.Render.Interp = gamma_interp_extras; + tnl->Driver.Render.CopyPV = gamma_copy_pv_extras; + } else { + tnl->Driver.Render.Interp = setup_tab[ind].interp; + tnl->Driver.Render.CopyPV = setup_tab[ind].copy_pv; + } +} + + +void gammaInitVB( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + GLuint size = TNL_CONTEXT(ctx)->vb.Size; + + gmesa->verts = (char *)ALIGN_MALLOC(size * 4 * 16, 32); + + { + static int firsttime = 1; + if (firsttime) { + init_setup_tab(); + firsttime = 0; + gmesa->vertex_stride_shift = 6; /* FIXME - only one vertex setup */ + } + } +} + + +void gammaFreeVB( GLcontext *ctx ) +{ + gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); + if (gmesa->verts) { + ALIGN_FREE(gmesa->verts); + gmesa->verts = 0; + } + + if (gmesa->UbyteSecondaryColor.Ptr) { + ALIGN_FREE(gmesa->UbyteSecondaryColor.Ptr); + gmesa->UbyteSecondaryColor.Ptr = 0; + } + + if (gmesa->UbyteColor.Ptr) { + ALIGN_FREE(gmesa->UbyteColor.Ptr); + gmesa->UbyteColor.Ptr = 0; + } +} Index: xc/lib/GL/mesa/src/drv/gamma/gamma_vb.h diff -u /dev/null xc/lib/GL/mesa/src/drv/gamma/gamma_vb.h:1.2 --- /dev/null Thu Feb 27 12:26:23 2003 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_vb.h Wed Oct 30 07:51:30 2002 @@ -0,0 +1,60 @@ +/* + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * Keith Whitwell, + * + * 3DLabs Gamma driver. + */ + +#ifndef GAMMAVB_INC +#define GAMMAVB_INC + +#include "mtypes.h" +#include "swrast/swrast.h" + +#define _GAMMA_NEW_VERTEX (_NEW_TEXTURE | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE) + + +extern void gammaChooseVertexState( GLcontext *ctx ); +extern void gammaCheckTexSizes( GLcontext *ctx ); +extern void gammaBuildVertices( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint newinputs ); + + +extern void gamma_import_float_colors( GLcontext *ctx ); +extern void gamma_import_float_spec_colors( GLcontext *ctx ); + +extern void gamma_translate_vertex( GLcontext *ctx, + const gammaVertex *src, + SWvertex *dst ); + +extern void gammaInitVB( GLcontext *ctx ); +extern void gammaFreeVB( GLcontext *ctx ); + +extern void gamma_print_vertex( GLcontext *ctx, const gammaVertex *v ); +extern void gammaPrintSetupFlags(char *msg, GLuint flags ); + +#endif Index: xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c:1.12 xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c:1.14 --- xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c:1.12 Wed Mar 21 11:14:20 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c Wed Oct 30 07:51:30 2002 @@ -1,545 +1,171 @@ -/* $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. -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/gamma/gamma_xmesa.c,v 1.14 2002/10/30 12:51:30 alanh Exp $ */ /* - * Authors: - * Kevin E. Martin - * Brian Paul - * Alan Hourihane + * Copyright 2001 by Alan Hourihane. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, + * + * 3DLabs Gamma driver */ - -#ifdef GLX_DIRECT_RENDERING -#include -#include "gamma_init.h" -#include "gamma_gl.h" -#include "glapi.h" -#include "glint_dri.h" -#include "gamma_dlist.h" +#include "gamma_context.h" +#include "gamma_vb.h" #include "context.h" #include "mmath.h" -#include "hash.h" - +#include "matrix.h" +#include "glint_dri.h" -__DRIcontextPrivate *nullCC = NULL; -__DRIcontextPrivate *gCC = NULL; -gammaContextPrivate *gCCPriv = NULL; +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/tnl.h" +#include "array_cache/acache.h" -GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv) +static GLboolean +gammaInitDriver(__DRIscreenPrivate *sPriv) { - gammaScreenPrivate *gsp; - -#if 0 - /* 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, "gamma DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); - __driMesaMessage(msg); - return GL_FALSE; - } - } - } + sPriv->private = (void *) gammaCreateScreen( sPriv ); - /* Check that the DDX driver version is compatible */ - if (sPriv->ddxMajor != 1 || - 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); - return GL_FALSE; - } - - /* Check that the DRM driver version is compatible */ - if (sPriv->drmMajor != 1 || - 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)); - if (!gsp) { + if (!sPriv->private) { + gammaDestroyScreen( sPriv ); return GL_FALSE; } - gsp->driScrnPriv = sPriv; - sPriv->private = (void *)gsp; - - if (!gammaMapAllRegions(sPriv)) { - Xfree(sPriv->private); - return GL_FALSE; - } - return GL_TRUE; } -void XMesaResetDriver(__DRIscreenPrivate *sPriv) +static void +gammaDestroyContext(__DRIcontextPrivate *driContextPriv) { - gammaUnmapAllRegions(sPriv); - Xfree(sPriv->private); - sPriv->private = NULL; -} - -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 */ ); -} + gammaContextPtr gmesa = (gammaContextPtr)driContextPriv->driverPrivate; + if (gmesa) { + _swsetup_DestroyContext( gmesa->glCtx ); + _tnl_DestroyContext( gmesa->glCtx ); + _ac_DestroyContext( gmesa->glCtx ); + _swrast_DestroyContext( gmesa->glCtx ); -GLboolean XMesaCreateContext( Display *dpy, - GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv ) -{ - int i; - gammaContextPrivate *cPriv; - __DRIscreenPrivate *driScrnPriv = driContextPriv->driScreenPriv; - gammaScreenPrivate *gPriv = (gammaScreenPrivate *)driScrnPriv->private; - GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)driScrnPriv->pDevPriv; + gammaFreeVB( gmesa->glCtx ); - 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, - &cPriv->buf, &cPriv->bufCount, gPriv); - -#ifdef DO_VALIDATE - GET_FIRST_DMA(driScrnPriv->fd, cPriv->hHWContext, - 1, &cPriv->WCbufIndex, &cPriv->WCbufSize, - &cPriv->WCbuf, &cPriv->WCbufCount, gPriv); -#endif - - gamma_init_lists(); + /* free the Mesa context */ + gmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context(gmesa->glCtx); - /* 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; - cPriv->ClearColor[3] = 1.0; - cPriv->ClearDepth = 1.0; - cPriv->x = 0; - cPriv->y = 0; - cPriv->w = 0; - cPriv->h = 0; - cPriv->FrameCount = 0; - cPriv->MatrixMode = GL_MODELVIEW; - cPriv->ModelViewCount = 0; - cPriv->ProjCount = 0; - cPriv->TextureCount = 0; - - for (i = 0; i < 16; i++) - if (i % 5 == 0) - cPriv->ModelView[i] = - cPriv->Proj[i] = - cPriv->ModelViewProj[i] = - cPriv->Texture[i] = 1.0; - else - cPriv->ModelView[i] = - cPriv->Proj[i] = - cPriv->ModelViewProj[i] = - cPriv->Texture[i] = 0.0; - - cPriv->LBReadMode = (LBReadSrcDisable | - LBReadDstDisable | - LBDataTypeDefault | - LBWindowOriginBot | - gDRIPriv->pprod); - cPriv->FBReadMode = (FBReadSrcDisable | - FBReadDstDisable | - FBDataTypeDefault | - FBWindowOriginBot | - gDRIPriv->pprod); - - if (gDRIPriv->numMultiDevices == 2) { - cPriv->LBReadMode |= LBScanLineInt2; - cPriv->FBReadMode |= FBScanLineInt2; - cPriv->FBWindowBase =driScrnPriv->fbWidth*(driScrnPriv->fbHeight/2 - 1); - cPriv->LBWindowBase =driScrnPriv->fbWidth*(driScrnPriv->fbHeight/2 - 1); - } else { - cPriv->FBWindowBase = driScrnPriv->fbWidth * driScrnPriv->fbHeight; - cPriv->LBWindowBase = driScrnPriv->fbWidth * driScrnPriv->fbHeight; - } - - cPriv->Begin = (B_AreaStippleDisable | - B_LineStippleDisable | - B_AntiAliasDisable | - B_TextureDisable | - B_FogDisable | - B_SubPixelCorrectEnable | - B_PrimType_Null); - - cPriv->ColorDDAMode = (ColorDDAEnable | - ColorDDAGouraud); - -#ifdef CULL_ALL_PRIMS - cPriv->GeometryMode = (GM_TextureDisable | - GM_FogDisable | - GM_FogExp | - GM_FrontPolyFill | - GM_BackPolyFill | - GM_FrontFaceCCW | - GM_PolyCullDisable | - GM_PolyCullBoth | - GM_ClipShortLinesDisable | - GM_ClipSmallTrisDisable | - GM_RenderMode | - GM_Feedback2D | - GM_CullFaceNormDisable | - GM_AutoFaceNormDisable | - GM_GouraudShading | - GM_UserClipNone | - GM_PolyOffsetPointDisable | - GM_PolyOffsetLineDisable | - GM_PolyOffsetFillDisable | - GM_InvertFaceNormCullDisable); -#else - cPriv->GeometryMode = (GM_TextureDisable | - GM_FogDisable | - GM_FogExp | - GM_FrontPolyFill | - GM_BackPolyFill | - GM_FrontFaceCCW | - GM_PolyCullDisable | - GM_PolyCullBack | - GM_ClipShortLinesDisable | - GM_ClipSmallTrisDisable | - GM_RenderMode | - GM_Feedback2D | - GM_CullFaceNormDisable | - GM_AutoFaceNormDisable | - GM_GouraudShading | - GM_UserClipNone | - GM_PolyOffsetPointDisable | - GM_PolyOffsetLineDisable | - GM_PolyOffsetFillDisable | - GM_InvertFaceNormCullDisable); -#endif - - cPriv->AlphaTestMode = (AlphaTestModeDisable | - AT_Always); - - cPriv->AlphaBlendMode = (AlphaBlendModeDisable | - AB_Src_One | - AB_Dst_Zero | - AB_ColorFmt_8888 | - AB_NoAlphaBufferPresent | - AB_ColorOrder_RGB | - AB_OpenGLType | - AB_AlphaDst_FBData | - AB_ColorConversionScale | - AB_AlphaConversionScale); - - cPriv->AB_FBReadMode_Save = cPriv->AB_FBReadMode = 0; - - cPriv->Window = (WindowEnable | /* For GID testing */ - W_PassIfEqual | - (0 << 5)); /* GID part is set from draw priv (below) */ - - cPriv->NotClipped = GL_FALSE; - cPriv->WindowChanged = GL_TRUE; - - /* - ** NOT_DONE: - ** 1. These values should be calculated from the registers. - ** 2. Only one client can use texture memory at this time. - ** 3. A two-tiered texture allocation routine is needed to properly - ** handle texture management. - */ - cPriv->tmm = driTMMCreate(0x00080000, - 0x00800000 - 0x00080000, - 4, 1, - gammaTOLoad, - gammaTOLoadSub); - - cPriv->curTexObj = gammaTOFind(0); - cPriv->curTexObj1D = cPriv->curTexObj; - cPriv->curTexObj2D = cPriv->curTexObj; - cPriv->Texture1DEnabled = GL_FALSE; - cPriv->Texture2DEnabled = GL_FALSE; - -#ifdef FORCE_DEPTH32 - cPriv->DepthSize = 32; -#else - cPriv->DepthSize = mesaVis->DepthBits; -#endif - cPriv->zNear = 0.0; - cPriv->zFar = 1.0; - - cPriv->Flags = GAMMA_FRONT_BUFFER; - cPriv->Flags |= (mesaVis->DBflag ? GAMMA_BACK_BUFFER : 0); - cPriv->Flags |= (cPriv->DepthSize > 0 ? GAMMA_DEPTH_BUFFER : 0); - - cPriv->EnabledFlags = GAMMA_FRONT_BUFFER; - cPriv->EnabledFlags |= (mesaVis->DBflag ? GAMMA_BACK_BUFFER : 0); - - cPriv->DepthMode = (DepthModeDisable | - DM_WriteMask | - DM_Less); - - cPriv->DeltaMode = (DM_SubPixlCorrectionEnable | - DM_SmoothShadingEnable | - DM_Target500TXMX); - - switch (cPriv->DepthSize) { - case 16: - cPriv->DeltaMode |= DM_Depth16; - break; - case 24: - cPriv->DeltaMode |= DM_Depth24; - break; - case 32: - cPriv->DeltaMode |= DM_Depth32; - break; - default: - break; + Xfree(gmesa); + driContextPriv->driverPrivate = NULL; } - - cPriv->gammaScrnPriv = gPriv; - - 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 */ - gammaInitHW(cPriv); - - return GL_TRUE; } + -void XMesaDestroyContext(__DRIcontextPrivate *driContextPriv) +static GLboolean +gammaCreateBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap ) { - gammaContextPrivate *cPriv; - cPriv = (gammaContextPrivate *) driContextPriv->driverPrivate; - if (cPriv) { - /* XXX free driver context data? */ - } + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } + else { + driDrawPriv->driverPrivate = (void *) + _mesa_create_framebuffer(mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->stencilBits > 0, + mesaVis->accumRedBits > 0, + mesaVis->alphaBits > 0 + ); + return (driDrawPriv->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, - mesaVis->AlphaBits > 0 - ); +static void +gammaDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +{ + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); } - -GLframebuffer *XMesaCreatePixmapBuffer( Display *dpy, - __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis) +static void +gammaSwapBuffers(Display *dpy, void *drawablePrivate) { -#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 -} + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + (void) dpy; + if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { + gammaContextPtr gmesa; + __DRIscreenPrivate *driScrnPriv; + GLcontext *ctx; -void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) -{ - /* - ** NOT_DONE: This assumes buffer is currently bound to a context. - ** This needs to be able to swap buffers when not currently bound. - */ - if (gCC == NULL || gCCPriv == NULL) - return; + gmesa = (gammaContextPtr) dPriv->driContextPriv->driverPrivate; + ctx = gmesa->glCtx; + driScrnPriv = gmesa->driScreen; - VALIDATE_DRAWABLE_INFO(gCC,gCCPriv); + VALIDATE_DRAWABLE_INFO(gmesa); /* Flush any partially filled buffers */ - FLUSH_DMA_BUFFER(gCC, gCCPriv); + FLUSH_DMA_BUFFER(gmesa); + + DRM_SPINLOCK(&driScrnPriv->pSAREA->drawable_lock, + driScrnPriv->drawLockID); + VALIDATE_DRAWABLE_INFO_NO_LOCK(gmesa); - if (gCCPriv->EnabledFlags & GAMMA_BACK_BUFFER) { + if (gmesa->EnabledFlags & GAMMA_BACK_BUFFER) { int src, dst, x0, y0, x1, h; int i; - int nRect = driDrawPriv->numClipRects; - XF86DRIClipRectPtr pRect = driDrawPriv->pClipRects; - __DRIscreenPrivate *driScrnPriv = gCC->driScreenPriv; + int nRect = dPriv->numClipRects; + XF86DRIClipRectPtr pRect = dPriv->pClipRects; + __DRIscreenPrivate *driScrnPriv = gmesa->driScreen; + GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)driScrnPriv->pDevPriv; -#ifdef DO_VALIDATE - DRM_SPINLOCK(&driScrnPriv->pSAREA->drawable_lock, - driScrnPriv->drawLockID); - VALIDATE_DRAWABLE_INFO_NO_LOCK(gCC,gCCPriv); -#endif - - CHECK_DMA_BUFFER(nullCC, gCCPriv, 2); - WRITE(gCCPriv->buf, FBReadMode, (gCCPriv->FBReadMode | + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, FBReadMode, (gmesa->FBReadMode | FBReadSrcEnable)); - WRITE(gCCPriv->buf, LBWriteMode, LBWriteModeDisable); + WRITE(gmesa->buf, LBWriteMode, LBWriteModeDisable); for (i = 0; i < nRect; i++, pRect++) { x0 = pRect->x1; x1 = pRect->x2; h = pRect->y2 - pRect->y1; + y0 = driScrnPriv->fbHeight - (pRect->y1+h); + if (gDRIPriv->numMultiDevices == 2) + src = (y0/2)*driScrnPriv->fbWidth+x0; + else + src = y0*driScrnPriv->fbWidth+x0; - src = (y0/2)*driScrnPriv->fbWidth+x0; y0 += driScrnPriv->fbHeight; - dst = (y0/2)*driScrnPriv->fbWidth+x0; - - CHECK_DMA_BUFFER(nullCC, gCCPriv, 9); - WRITE(gCCPriv->buf, StartXDom, x0<<16); /* X0dest */ - WRITE(gCCPriv->buf, StartY, y0<<16); /* Y0dest */ - WRITE(gCCPriv->buf, StartXSub, x1<<16); /* X1dest */ - WRITE(gCCPriv->buf, GLINTCount, h); /* H */ - WRITE(gCCPriv->buf, dY, 1<<16); /* ydir */ - WRITE(gCCPriv->buf, dXDom, 0<<16); - WRITE(gCCPriv->buf, dXSub, 0<<16); - WRITE(gCCPriv->buf, FBSourceOffset, (dst-src)); - WRITE(gCCPriv->buf, Render, 0x00040048); /* NOT_DONE */ + if (gDRIPriv->numMultiDevices == 2) + dst = (y0/2)*driScrnPriv->fbWidth+x0; + else + dst = y0*driScrnPriv->fbWidth+x0; + + CHECK_DMA_BUFFER(gmesa, 9); + WRITE(gmesa->buf, StartXDom, x0<<16); /* X0dest */ + WRITE(gmesa->buf, StartY, y0<<16); /* Y0dest */ + WRITE(gmesa->buf, StartXSub, x1<<16); /* X1dest */ + WRITE(gmesa->buf, GLINTCount, h); /* H */ + WRITE(gmesa->buf, dY, 1<<16); /* ydir */ + WRITE(gmesa->buf, dXDom, 0<<16); + WRITE(gmesa->buf, dXSub, 0<<16); + WRITE(gmesa->buf, FBSourceOffset, (dst-src)); + WRITE(gmesa->buf, Render, 0x00040048); /* NOT_DONE */ } /* @@ -550,74 +176,121 @@ */ /* Restore FBReadMode */ - CHECK_DMA_BUFFER(nullCC, gCCPriv, 2); - WRITE(gCCPriv->buf, FBReadMode, (gCCPriv->FBReadMode | - gCCPriv->AB_FBReadMode)); - WRITE(gCCPriv->buf, LBWriteMode, LBWriteModeEnable); + CHECK_DMA_BUFFER(gmesa, 2); + WRITE(gmesa->buf, FBReadMode, (gmesa->FBReadMode | + gmesa->AB_FBReadMode)); + WRITE(gmesa->buf, LBWriteMode, LBWriteModeEnable); + } -#ifdef DO_VALIDATE - PROCESS_DMA_BUFFER_TOP_HALF(gCCPriv); + if (gmesa->EnabledFlags & GAMMA_BACK_BUFFER) + PROCESS_DMA_BUFFER_TOP_HALF(gmesa); - DRM_SPINUNLOCK(&driScrnPriv->pSAREA->drawable_lock, + DRM_SPINUNLOCK(&driScrnPriv->pSAREA->drawable_lock, driScrnPriv->drawLockID); - VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gCC,gCCPriv); + VALIDATE_DRAWABLE_INFO_NO_LOCK_POST(gmesa); - PROCESS_DMA_BUFFER_BOTTOM_HALF(gCCPriv); -#else - FLUSH_DMA_BUFFER(gCC,gCCPriv); -#endif - - } + if (gmesa->EnabledFlags & GAMMA_BACK_BUFFER) + PROCESS_DMA_BUFFER_BOTTOM_HALF(gmesa); + } else { + _mesa_problem(NULL, "gammaSwapBuffers: drawable has no context!\n"); + } } -GLboolean XMesaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) +static GLboolean +gammaMakeCurrent(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv) { if (driContextPriv) { - gCC = driContextPriv; - gCCPriv = (gammaContextPrivate *) driContextPriv->driverPrivate; + GET_CURRENT_CONTEXT(ctx); + gammaContextPtr oldGammaCtx = ctx ? GAMMA_CONTEXT(ctx) : NULL; + gammaContextPtr newGammaCtx = (gammaContextPtr) driContextPriv->driverPrivate; - gCCPriv->Window &= ~W_GIDMask; - gCCPriv->Window |= (driDrawPriv->index << 5); + if ( newGammaCtx != oldGammaCtx ) { + newGammaCtx->dirty = ~0; + } + + if (newGammaCtx->driDrawable != driDrawPriv) { + newGammaCtx->driDrawable = driDrawPriv; + gammaUpdateWindow ( newGammaCtx->glCtx ); + gammaUpdateViewportOffset( newGammaCtx->glCtx ); + } - CHECK_DMA_BUFFER(gCC, gCCPriv, 1); - WRITE(gCCPriv->buf, GLINTWindow, gCCPriv->Window); +#if 0 + newGammaCtx->Window &= ~W_GIDMask; + newGammaCtx->Window |= (driDrawPriv->index << 5); + CHECK_DMA_BUFFER(newGammaCtx,1); + WRITE(newGammaCtx->buf, GLINTWindow, newGammaCtx->Window); +#endif - _glapi_set_dispatch(gCCPriv->API); +newGammaCtx->new_state |= GAMMA_NEW_WINDOW; /* FIXME */ - _gamma_Viewport(0, 0, driDrawPriv->w, driDrawPriv->h); + _mesa_make_current2( newGammaCtx->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate ); + + if (!newGammaCtx->glCtx->Viewport.Width) { + _mesa_set_viewport(newGammaCtx->glCtx, 0, 0, + driDrawPriv->w, driDrawPriv->h); + } } else { - gCC = NULL; - gCCPriv = NULL; + _mesa_make_current( 0, 0 ); } return GL_TRUE; } -GLboolean XMesaUnbindContext( __DRIcontextPrivate *driContextPriv ) +static GLboolean +gammaUnbindContext( __DRIcontextPrivate *driContextPriv ) { - /* XXX not 100% sure what's supposed to be done here */ return GL_TRUE; } -GLboolean -XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) +static GLboolean +gammaOpenFullScreen(__DRIcontextPrivate *driContextPriv) { return GL_TRUE; } -GLboolean -XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) +static GLboolean +gammaCloseFullScreen(__DRIcontextPrivate *driContextPriv) { return GL_TRUE; } +static struct __DriverAPIRec gammaAPI = { + gammaInitDriver, + gammaDestroyScreen, + gammaCreateContext, + gammaDestroyContext, + gammaCreateBuffer, + gammaDestroyBuffer, + gammaSwapBuffers, + gammaMakeCurrent, + gammaUnbindContext, + gammaOpenFullScreen, + gammaCloseFullScreen +}; + + + +/* + * This is the bootstrap function for the driver. + * The __driCreateScreen name is the symbol that libGL.so fetches. + * Return: pointer to a __DRIscreenPrivate. + */ +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) +{ + __DRIscreenPrivate *psp; + psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &gammaAPI); + return (void *) psp; +} + void __driRegisterExtensions(void) { /* No extensions */ } -#endif Index: xc/lib/GL/mesa/src/drv/i810/Imakefile diff -u xc/lib/GL/mesa/src/drv/i810/Imakefile:1.19 xc/lib/GL/mesa/src/drv/i810/Imakefile:1.25 --- xc/lib/GL/mesa/src/drv/i810/Imakefile:1.19 Thu May 10 12:56:11 2001 +++ xc/lib/GL/mesa/src/drv/i810/Imakefile Mon Nov 25 09:04:51 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile,v 1.19 2001/05/10 16:56:11 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile,v 1.25 2002/11/25 14:04:51 eich Exp $ #include @@ -18,16 +18,25 @@ #include "../common/Imakefile.inc" #include "Imakefile.inc" +#include "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" #include "../../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #include "../../X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../../SPARC/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 + DRIOBJS = $(GLXLIBSRC)/dri/dri_util.o DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ @@ -46,7 +55,7 @@ OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ $(MESA_ASM_OBJS) $(COMMONOBJS) $(I810OBJS) $(HIOBJS) -REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) #include @@ -62,7 +71,7 @@ #ifdef GlxSoProf SOPROF_LIBNAME = _i810_dri_p -NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(ALL_OBJS)) +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) #endif #endif Index: xc/lib/GL/mesa/src/drv/i810/Imakefile.inc diff -u xc/lib/GL/mesa/src/drv/i810/Imakefile.inc:1.2 xc/lib/GL/mesa/src/drv/i810/Imakefile.inc:1.3 --- xc/lib/GL/mesa/src/drv/i810/Imakefile.inc:1.2 Wed May 2 11:06:03 2001 +++ xc/lib/GL/mesa/src/drv/i810/Imakefile.inc Fri Feb 22 16:33:03 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i810/Imakefile.inc,v 1.3 2002/02/22 21:33:03 dawes Exp $ #ifndef MesaDrvSrcDir #define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv @@ -16,85 +16,95 @@ #endif #if BuildXF86DRI - DRI_DEFINES = GlxDefines - DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ - -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ - -I$(GLXLIBSRC)/mesa/dri \ + DRI_DEFINES = GlxDefines -DX_BYTE_ORDER=ByteOrder + DRI_INCLUDES = -I$(GLXLIBSRC)/dri \ + -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) \ + -I$(INCLUDESRC)/GL \ -I$(SERVERSRC)/GL/dri \ -I$(XF86OSSRC) \ -I$(XF86DRIVERSRC)/i810 \ - -I$(GLXLIBSRC)/dri/drm + -I$(XF86COMSRC) \ + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/include #endif -MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ +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 \ + I810SRCS = $(MESADRVI810BUILDDIR)i810context.c \ + $(MESADRVI810BUILDDIR)i810ioctl.c \ + $(MESADRVI810BUILDDIR)i810render.c \ + $(MESADRVI810BUILDDIR)i810screen.c \ $(MESADRVI810BUILDDIR)i810span.c \ $(MESADRVI810BUILDDIR)i810state.c \ $(MESADRVI810BUILDDIR)i810tex.c \ + $(MESADRVI810BUILDDIR)i810texmem.c \ + $(MESADRVI810BUILDDIR)i810texstate.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)i810vb.c + + I810OBJS = $(MESADRVI810BUILDDIR)i810context.o \ + $(MESADRVI810BUILDDIR)i810ioctl.o \ + $(MESADRVI810BUILDDIR)i810render.o \ + $(MESADRVI810BUILDDIR)i810screen.o \ $(MESADRVI810BUILDDIR)i810span.o \ $(MESADRVI810BUILDDIR)i810state.o \ $(MESADRVI810BUILDDIR)i810tex.o \ + $(MESADRVI810BUILDDIR)i810texmem.o \ + $(MESADRVI810BUILDDIR)i810texstate.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)i810vb.o + + I810UOBJS = $(MESADRVI810BUILDDIR)unshared/i810context.o \ + $(MESADRVI810BUILDDIR)unshared/i810ioctl.o \ + $(MESADRVI810BUILDDIR)unshared/i810render.o \ + $(MESADRVI810BUILDDIR)unshared/i810screen.o \ $(MESADRVI810BUILDDIR)unshared/i810span.o \ $(MESADRVI810BUILDDIR)unshared/i810state.o \ $(MESADRVI810BUILDDIR)unshared/i810tex.o \ + $(MESADRVI810BUILDDIR)unshared/i810texmem.o \ + $(MESADRVI810BUILDDIR)unshared/i810texstate.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)unshared/i810vb.o + + I810DOBJS = $(MESADRVI810BUILDDIR)debugger/i810context.o \ + $(MESADRVI810BUILDDIR)debugger/i810ioctl.o \ + $(MESADRVI810BUILDDIR)debugger/i810render.o \ + $(MESADRVI810BUILDDIR)debugger/i810screen.o \ $(MESADRVI810BUILDDIR)debugger/i810span.o \ $(MESADRVI810BUILDDIR)debugger/i810state.o \ $(MESADRVI810BUILDDIR)debugger/i810tex.o \ + $(MESADRVI810BUILDDIR)debugger/i810texmem.o \ + $(MESADRVI810BUILDDIR)debugger/i810texstate.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)debugger/i810vb.o + + I810POBJS = $(MESADRVI810BUILDDIR)profiled/i810context.o \ + $(MESADRVI810BUILDDIR)profiled/i810ioctl.o \ + $(MESADRVI810BUILDDIR)profiled/i810render.o \ + $(MESADRVI810BUILDDIR)profiled/i810screen.o \ $(MESADRVI810BUILDDIR)profiled/i810span.o \ $(MESADRVI810BUILDDIR)profiled/i810state.o \ $(MESADRVI810BUILDDIR)profiled/i810tex.o \ + $(MESADRVI810BUILDDIR)profiled/i810texmem.o \ + $(MESADRVI810BUILDDIR)profiled/i810texstate.o \ $(MESADRVI810BUILDDIR)profiled/i810tris.o \ - $(MESADRVI810BUILDDIR)profiled/i810vb.o \ - $(MESADRVI810BUILDDIR)profiled/i810fastpath.o \ - $(MESADRVI810BUILDDIR)profiled/i810ioctl.o + $(MESADRVI810BUILDDIR)profiled/i810vb.o #ifdef NeedToLinkMesaSrc -LinkSourceFile(i810_xmesa.c, $(MESADRVSRCDIR)/i810) -LinkSourceFile(i810dd.c, $(MESADRVSRCDIR)/i810) -LinkSourceFile(i810pipeline.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810context.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810ioctl.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810render.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810screen.c, $(MESADRVSRCDIR)/i810) LinkSourceFile(i810span.c, $(MESADRVSRCDIR)/i810) LinkSourceFile(i810state.c, $(MESADRVSRCDIR)/i810) LinkSourceFile(i810tex.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810texmem.c, $(MESADRVSRCDIR)/i810) +LinkSourceFile(i810texstate.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.6 xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h:1.7 --- xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h:1.6 Wed Mar 21 11:14:21 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h Fri Feb 22 16:33:03 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h,v 1.6 2001/03/21 16:14:21 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_3d_reg.h,v 1.7 2002/02/22 21:33:03 dawes Exp $ */ #ifndef I810_3D_REG_H #define I810_3D_REG_H @@ -88,7 +88,7 @@ #define DR4_YORG_MASK (0x3ff<<16) #define DR4_XORG_MASK (0x7ff<<0) - + /* GFXRENDERSTATE_LINEWIDTH_CULL_SHADE_MODE, p140 * * Format: @@ -135,7 +135,7 @@ #define LCS_UPDATE_INTERP (LCS_UPDATE_ALPHA_INTERP| \ LCS_UPDATE_RGB_INTERP| \ LCS_UPDATE_SPEC_INTERP) - + /* GFXRENDERSTATE_BOOLEAN_ENA_1, p142 * @@ -350,7 +350,7 @@ #define MC_OP_SUBTRACT (0x14) /* GFXRENDERSTATE_MAP_PALETTE_LOAD, p128 - * + * * Format: * 0: GFX_OP_MAP_PALETTE_LOAD * 1: 16bpp color[0] @@ -534,21 +534,9 @@ float tu1; float tv1; } i810_full_vertex; - -/* GFX_PRIMITIVE, p106 - */ -#define GFX_OP_PRIMITIVE ((0x3<<29)|(0x1f<<24)) -#define PR_TRIANGLES (0x0<<18) -#define PR_TRISTRIP_0 (0x1<<18) -#define PR_TRISTRIP_1 (0x2<<18) -#define PR_TRIFAN (0x3<<18) -#define PR_POLYGON (0x4<<18) -#define PR_LINES (0x5<<18) -#define PR_LINESTRIP (0x6<<18) -#define PR_RECTS (0x7<<18) -#define PR_DWORD_COUNT_SHIFT 0 + /* GFXCMDPARSER_BATCH_BUFFER, p105 * * Not clear whether start address must be shifted or not. Not clear @@ -609,7 +597,7 @@ * * Format: * 0: GFX_OP_DESTBUFFER_VARS - * 1: DEST_* + * 1: DEST_* */ #define GFX_OP_DESTBUFFER_VARS ((0x3<<29)|(0x1d<<24)|(0x85<<16)|0x0) #define DV_HORG_BIAS_MASK (0xf<<20) @@ -644,29 +632,5 @@ #define ST1_MASK (0xffff) #define I810_SET_FIELD( var, mask, value ) (var &= ~(mask), var |= value) - -#define I810PACKCOLOR4444(r,g,b,a) \ - ((((a) & 0xf0) << 8) | (((r) & 0xf0) << 4) | ((g) & 0xf0) | ((b) >> 4)) - -#define I810PACKCOLOR1555(r,g,b,a) \ - ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \ - ((a) ? 0x8000 : 0)) - -#define I810PACKCOLOR565(r,g,b) \ - ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3)) - - -#define I810_VFMT_T0 (GFX_OP_VERTEX_FMT | \ - VF_TEXCOORD_COUNT_1 | \ - VF_SPEC_FOG_ENABLE | \ - VF_RGBA_ENABLE | \ - VF_XYZW) - -#define I810_VFMT_T0T1 (GFX_OP_VERTEX_FMT | \ - VF_TEXCOORD_COUNT_2 | \ - VF_SPEC_FOG_ENABLE | \ - VF_RGBA_ENABLE | \ - VF_XYZW) - #endif Index: xc/lib/GL/mesa/src/drv/i810/i810_init.h diff -u xc/lib/GL/mesa/src/drv/i810/i810_init.h:1.5 xc/lib/GL/mesa/src/drv/i810/i810_init.h:removed --- xc/lib/GL/mesa/src/drv/i810/i810_init.h:1.5 Wed Mar 21 11:14:21 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810_init.h Thu Feb 27 12:26:23 2003 @@ -1,131 +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. - -**************************************************************************/ - -/* - * Authors: - * Keith Whitwell - * - */ - -#ifndef _I810_INIT_H_ -#define _I810_INIT_H_ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include "dri_tmm.h" -#include "dri_mesaint.h" -#include "dri_mesa.h" -#include "types.h" - -typedef struct { - drmHandle handle; - drmSize size; - char *map; -} i810Region, *i810RegionPtr; - -typedef struct { - i810Region front; - i810Region back; - i810Region depth; - i810Region tex; - - int deviceID; - int width; - int height; - int mem; - - int cpp; /* for front and back buffers */ - int bitsPerPixel; - - int fbFormat; - int fbOffset; - int fbStride; - - int backOffset; - int depthOffset; - - int backPitch; - int backPitchBits; - - int textureOffset; - int textureSize; - int logTextureGranularity; - - __DRIscreenPrivate *driScrnPriv; - drmBufMapPtr bufs; - int use_copy_buf; - unsigned int sarea_priv_offset; -} i810ScreenPrivate; - - -#include "i810context.h" - -extern void i810GetLock( i810ContextPtr imesa, GLuint flags ); -extern void i810EmitHwStateLocked( i810ContextPtr imesa ); -extern void i810EmitScissorValues( i810ContextPtr imesa, int box_nr, int emit ); -extern void i810EmitDrawingRectangle( i810ContextPtr imesa ); -extern void i810XMesaSetBackClipRects( i810ContextPtr imesa ); -extern void i810XMesaSetFrontClipRects( i810ContextPtr imesa ); - - -#define GET_DISPATCH_AGE( imesa ) imesa->sarea->last_dispatch -#define GET_ENQUEUE_AGE( imesa ) imesa->sarea->last_enqueue - - -/* Lock the hardware and validate our state. - */ -#define LOCK_HARDWARE( imesa ) \ - do { \ - char __ret=0; \ - DRM_CAS(imesa->driHwLock, imesa->hHWContext, \ - (DRM_LOCK_HELD|imesa->hHWContext), __ret); \ - if (__ret) \ - i810GetLock( imesa, 0 ); \ - } while (0) - - - -/* Unlock the hardware using the global current context - */ -#define UNLOCK_HARDWARE(imesa) \ - DRM_UNLOCK(imesa->driFd, imesa->driHwLock, imesa->hHWContext); - - -/* This is the wrong way to do it, I'm sure. Otherwise the drm - * bitches that I've already got the heavyweight lock. At worst, - * this is 3 ioctls. The best solution probably only gets me down - * to 2 ioctls in the worst case. - */ -#define LOCK_HARDWARE_QUIESCENT( imesa ) do { \ - LOCK_HARDWARE( imesa ); \ - i810RegetLockQuiescent( imesa ); \ -} while(0) - - -#endif -#endif Index: xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c diff -u xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c:1.14 xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c:removed --- xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c:1.14 Tue Oct 2 07:44:13 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c Thu Feb 27 12:26:23 2003 @@ -1,684 +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/i810/i810_xmesa.c,v 1.14 2001/10/02 11:44:13 alanh Exp $ */ - -/* - * Authors: - * Keith Whitwell - * - */ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include - -#include "i810_init.h" -#include "context.h" -#include "vbxform.h" -#include "matrix.h" -#include "simple_list.h" - -#include "i810dd.h" -#include "i810state.h" -#include "i810tex.h" -#include "i810span.h" -#include "i810tris.h" -#include "i810pipeline.h" -#include "i810ioctl.h" - -#include "i810_dri.h" - - - -#ifndef I810_DEBUG -int I810_DEBUG = (0 -/* | DEBUG_ALWAYS_SYNC */ -/* | DEBUG_VERBOSE_RING */ -/* | DEBUG_VERBOSE_OUTREG */ -/* | DEBUG_VERBOSE_MSG */ -/* | DEBUG_NO_OUTRING */ -/* | DEBUG_NO_OUTREG */ -/* | DEBUG_VERBOSE_API */ -/* | DEBUG_VERBOSE_2D */ -/* | DEBUG_VERBOSE_DRI */ -/* | DEBUG_VALIDATE_RING */ -/* | DEBUG_VERBOSE_IOCTL */ - ); -#endif - - -static i810ContextPtr i810Ctx = 0; - - -/* These functions are accessed externally to the driver: - * - * XMesaInitDriver - * XMesaResetDriver - * XMesaCreateVisual - * XMesaDestroyVisual - * XMesaCreateContext - * XMesaDestroyContext - * XMesaCreateWindowBuffer - * XMesaCreatePixmapBuffer - * XMesaDestroyBuffer - * XMesaSwapBuffers - * XMesaMakeCurrent - * - */ - - -static int i810_malloc_proxy_buf(drmBufMapPtr buffers) -{ - char *buffer; - drmBufPtr buf; - int i; - - buffer = Xmalloc(I810_DMA_BUF_SZ); - if(buffer == NULL) return -1; - for(i = 0; i < I810_DMA_BUF_NR; i++) { - buf = &(buffers->list[i]); - buf->address = (drmAddress)buffer; - } - return 0; -} - -static drmBufMapPtr i810_create_empty_buffers(void) -{ - drmBufMapPtr retval; - - retval = (drmBufMapPtr)Xmalloc(sizeof(drmBufMap)); - if(retval == NULL) return NULL; - memset(retval, 0, sizeof(drmBufMap)); - retval->list = (drmBufPtr)Xmalloc(sizeof(drmBuf) * I810_DMA_BUF_NR); - if(retval->list == NULL) { - Xfree(retval); - return NULL; - } - memset(retval->list, 0, sizeof(drmBuf) * I810_DMA_BUF_NR); - /* - fprintf(stderr, "retval : %p, retval->list : %p\n", retval, retval->list); - */ - return retval; -} - -GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv) -{ - i810ScreenPrivate *i810Screen; - I810DRIPtr gDRIPriv = (I810DRIPtr)sPriv->pDevPriv; - - /* 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, "i810 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) { - 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); - return GL_FALSE; - } - - /* Check that the DRM driver version is compatible */ - if (sPriv->drmMajor != 1 || - sPriv->drmMinor < 2) { - char msg[1000]; - sprintf(msg, "i810 DRI driver expected DRM driver version 1.2 or greater but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); - __driMesaMessage(msg); - return GL_FALSE; - } - - /* Allocate the private area */ - i810Screen = (i810ScreenPrivate *)Xmalloc(sizeof(i810ScreenPrivate)); - if (!i810Screen) - return GL_FALSE; - - i810Screen->driScrnPriv = sPriv; - sPriv->private = (void *)i810Screen; - - i810Screen->deviceID=gDRIPriv->deviceID; - i810Screen->width=gDRIPriv->width; - i810Screen->height=gDRIPriv->height; - i810Screen->mem=gDRIPriv->mem; - i810Screen->cpp=gDRIPriv->cpp; - i810Screen->fbStride=gDRIPriv->fbStride; - i810Screen->fbOffset=gDRIPriv->fbOffset; - - if (gDRIPriv->bitsPerPixel == 15) - i810Screen->fbFormat = DV_PF_555; - else - i810Screen->fbFormat = DV_PF_565; - - i810Screen->backOffset=gDRIPriv->backOffset; - i810Screen->depthOffset=gDRIPriv->depthOffset; - i810Screen->backPitch = gDRIPriv->auxPitch; - i810Screen->backPitchBits = gDRIPriv->auxPitchBits; - i810Screen->textureOffset=gDRIPriv->textureOffset; - i810Screen->textureSize=gDRIPriv->textureSize; - i810Screen->logTextureGranularity = gDRIPriv->logTextureGranularity; - - if (0) - fprintf(stderr, "Tex heap size %x, granularity %x bytes\n", - i810Screen->textureSize, 1<<(i810Screen->logTextureGranularity)); - - i810Screen->bufs = i810_create_empty_buffers(); - if(i810Screen->bufs == NULL) - { - Xfree(i810Screen); - return GL_FALSE; - } - - /* Check if you need to create a fake buffer */ - if(i810_check_copy(sPriv->fd) == 1) - { - i810_malloc_proxy_buf(i810Screen->bufs); - i810Screen->use_copy_buf = 1; - } - else - { - i810Screen->use_copy_buf = 0; - } - - i810Screen->back.handle = gDRIPriv->backbuffer; - i810Screen->back.size = gDRIPriv->backbufferSize; - - if (drmMap(sPriv->fd, - i810Screen->back.handle, - i810Screen->back.size, - (drmAddress *)&i810Screen->back.map) != 0) - { - Xfree(i810Screen); - sPriv->private = NULL; - return GL_FALSE; - } - - i810Screen->depth.handle = gDRIPriv->depthbuffer; - i810Screen->depth.size = gDRIPriv->depthbufferSize; - - if (drmMap(sPriv->fd, - i810Screen->depth.handle, - i810Screen->depth.size, - (drmAddress *)&i810Screen->depth.map) != 0) - { - Xfree(i810Screen); - drmUnmap(i810Screen->back.map, i810Screen->back.size); - sPriv->private = NULL; - return GL_FALSE; - } - - 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, - i810Screen->tex.size, - (drmAddress *)&i810Screen->tex.map) != 0) - { - Xfree(i810Screen); - drmUnmap(i810Screen->back.map, i810Screen->back.size); - drmUnmap(i810Screen->depth.map, i810Screen->depth.size); - sPriv->private = NULL; - return GL_FALSE; - } - - - i810DDFastPathInit(); - i810DDTrifuncInit(); - i810DDSetupInit(); - - return GL_TRUE; -} - -/* Accessed by dlsym from dri_mesa_init.c - */ -void XMesaResetDriver(__DRIscreenPrivate *sPriv) -{ - i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private; - - /* Need to unmap all the bufs and maps here: - */ - drmUnmap(i810Screen->back.map, i810Screen->back.size); - drmUnmap(i810Screen->depth.map, i810Screen->depth.size); - drmUnmap(i810Screen->tex.map, i810Screen->tex.size); - - Xfree(i810Screen); - sPriv->private = NULL; -} - - -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 */ ); -} - - -GLboolean XMesaCreateContext( Display *dpy, GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv ) -{ - GLcontext *ctx = driContextPriv->mesaContext; - i810ContextPtr imesa; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; - i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private; - drm_i810_sarea_t *saPriv=(drm_i810_sarea_t *)(((char*)sPriv->pSAREA)+ - i810Screen->sarea_priv_offset); - - imesa = (i810ContextPtr)Xcalloc(sizeof(i810Context), 1); - if (!imesa) { - return GL_FALSE; - } - - - /* Set the maximum texture size small enough that we can guarentee - * that both texture units can bind a maximal texture and have them - * in memory at once. - */ - if (i810Screen->textureSize < 2*1024*1024) { - ctx->Const.MaxTextureLevels = 9; - ctx->Const.MaxTextureSize = 1<<8; - } else if (i810Screen->textureSize < 8*1024*1024) { - ctx->Const.MaxTextureLevels = 10; - ctx->Const.MaxTextureSize = 1<<9; - } else { - ctx->Const.MaxTextureLevels = 11; - ctx->Const.MaxTextureSize = 1<<10; - } - - ctx->Const.MinLineWidth = 1.0; - ctx->Const.MinLineWidthAA = 1.0; - ctx->Const.MaxLineWidth = 3.0; - ctx->Const.MaxLineWidthAA = 3.0; - ctx->Const.LineWidthGranularity = 1.0; - - - /* Dri stuff - */ - imesa->display = dpy; - imesa->hHWContext = driContextPriv->hHWContext; - imesa->driFd = sPriv->fd; - imesa->driHwLock = &sPriv->pSAREA->lock; - - imesa->i810Screen = i810Screen; - imesa->driScreen = sPriv; - imesa->sarea = saPriv; - imesa->glBuffer = NULL; - - imesa->texHeap = mmInit( 0, i810Screen->textureSize ); - - - /* Utah stuff - */ - imesa->renderindex = -1; /* impossible value */ - imesa->new_state = ~0; - imesa->dirty = ~0; - - make_empty_list(&imesa->TexObjList); - make_empty_list(&imesa->SwappedOut); - - imesa->TextureMode = ctx->Texture.Unit[0].EnvMode; - imesa->CurrentTexObj[0] = 0; - imesa->CurrentTexObj[1] = 0; - - ctx->DriverCtx = (void *) imesa; - imesa->glCtx = ctx; - - i810DDExtensionsInit( ctx ); - - i810DDInitStateFuncs( ctx ); - i810DDInitTextureFuncs( ctx ); - i810DDInitSpanFuncs( ctx ); - i810DDInitDriverFuncs( ctx ); - i810DDInitIoctlFuncs( 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) - i810DDRegisterVB( ctx->VB ); - - if (ctx->NrPipelineStages) - ctx->NrPipelineStages = - i810DDRegisterPipelineStages(ctx->PipelineStage, - ctx->PipelineStage, - ctx->NrPipelineStages); - - i810DDInitState( imesa ); - - driContextPriv->driverPrivate = (void *) imesa; - - return GL_TRUE; -} - -void XMesaDestroyContext(__DRIcontextPrivate *driContextPriv) -{ - i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate; - - if (imesa) { - i810TextureObjectPtr next_t, t; - - foreach_s (t, next_t, &(imesa->TexObjList)) - i810DestroyTexObj(imesa, t); - - foreach_s (t, next_t, &(imesa->SwappedOut)) - i810DestroyTexObj(imesa, t); - - Xfree(imesa); - } -} - -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 - ); -} - - -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 -} - - -void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) -{ - /* XXX should do swap according to the buffer, not the context! */ - i810ContextPtr imesa = i810Ctx; - - FLUSH_VB( imesa->glCtx, "swap buffers" ); - i810SwapBuffers(imesa); -} - - - -void i810XMesaSetFrontClipRects( i810ContextPtr imesa ) -{ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; - - imesa->numClipRects = dPriv->numClipRects; - imesa->pClipRects = dPriv->pClipRects; - imesa->dirty |= I810_UPLOAD_CLIPRECTS; - imesa->drawX = dPriv->x; - imesa->drawY = dPriv->y; - - i810EmitDrawingRectangle( imesa ); -} - - -void i810XMesaSetBackClipRects( i810ContextPtr imesa ) -{ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; - int i; - - if (dPriv->numBackClipRects == 0) - { - if (I810_DEBUG & DEBUG_VERBOSE_DRI) - fprintf(stderr, "FRONT_CLIPRECTS, %d rects\n", - dPriv->numClipRects); - - imesa->numClipRects = dPriv->numClipRects; - imesa->pClipRects = dPriv->pClipRects; - imesa->drawX = dPriv->x; - imesa->drawY = dPriv->y; - } else { - if (I810_DEBUG & DEBUG_VERBOSE_DRI) - fprintf(stderr, "BACK_RECTS, %d rects\n", - dPriv->numBackClipRects); - - imesa->numClipRects = dPriv->numBackClipRects; - imesa->pClipRects = dPriv->pBackClipRects; - imesa->drawX = dPriv->backX; - imesa->drawY = dPriv->backY; - } - - i810EmitDrawingRectangle( imesa ); - imesa->dirty |= I810_UPLOAD_CLIPRECTS; - - if (I810_DEBUG & DEBUG_VERBOSE_DRI) - for (i = 0 ; i < imesa->numClipRects ; i++) - fprintf(stderr, "cliprect %d: %d,%d - %d,%d\n", - i, - imesa->pClipRects[i].x1, - imesa->pClipRects[i].y1, - imesa->pClipRects[i].x2, - imesa->pClipRects[i].y2); -} - - -static void i810XMesaWindowMoved( i810ContextPtr imesa ) -{ - if (0) - fprintf(stderr, "i810XMesaWindowMoved\n\n"); - - switch (imesa->glCtx->Color.DriverDrawBuffer) { - case GL_FRONT_LEFT: - i810XMesaSetFrontClipRects( imesa ); - break; - case GL_BACK_LEFT: - i810XMesaSetBackClipRects( imesa ); - break; - default: - /*fprintf(stderr, "fallback buffer\n");*/ - break; - } -} - - -GLboolean XMesaUnbindContext(__DRIcontextPrivate *driContextPriv) -{ - i810ContextPtr i810 = (i810ContextPtr) driContextPriv->driverPrivate; - if (i810) - i810->dirty = ~0; - - return GL_TRUE; -} - -GLboolean -XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) -{ - return GL_TRUE; -} - -GLboolean -XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) -{ - return GL_TRUE; -} - - -GLboolean XMesaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) -{ - if (driContextPriv) { - i810Ctx = (i810ContextPtr) driContextPriv->driverPrivate; - - gl_make_current2(i810Ctx->glCtx, driDrawPriv->mesaBuffer, - driReadPriv->mesaBuffer); - - - i810Ctx->driDrawable = driDrawPriv; - i810Ctx->dirty = ~0; - - i810XMesaWindowMoved( i810Ctx ); - - if (!i810Ctx->glCtx->Viewport.Width) - gl_Viewport(i810Ctx->glCtx, 0, 0, driDrawPriv->w, driDrawPriv->h); - } - else - { - gl_make_current(0,0); - i810Ctx = NULL; - } - return GL_TRUE; -} - - -void i810GetLock( i810ContextPtr imesa, GLuint flags ) -{ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; - __DRIscreenPrivate *sPriv = imesa->driScreen; - drm_i810_sarea_t *sarea = imesa->sarea; - int me = imesa->hHWContext; - int stamp = dPriv->lastStamp; - - - if (0) fprintf(stderr, ".\n"); - - /* We know there has been contention. - */ - drmGetLock(imesa->driFd, imesa->hHWContext, flags); - - - /* Note contention for throttling hint - */ - imesa->any_contend = 1; - - /* If the window moved, may need to set a new cliprect now. - * - * NOTE: This releases and regains the hw lock, so all state - * checking must be done *after* this call: - */ - XMESA_VALIDATE_DRAWABLE_INFO(imesa->display, sPriv, dPriv); - - - if (0) - fprintf(stderr, "i810GetLock, last enque: %d last dispatch: %d\n", - sarea->last_enqueue, - sarea->last_dispatch); - - /* If we lost context, need to dump all registers to hardware. - * Note that we don't care about 2d contexts, even if they perform - * accelerated commands, so the DRI locking in the X server is even - * more broken than usual. - */ - if (sarea->ctxOwner != me) { - imesa->dirty |= (I810_UPLOAD_CTX | - I810_UPLOAD_CLIPRECTS | - I810_UPLOAD_BUFFERS | - I810_UPLOAD_TEX0 | - I810_UPLOAD_TEX1); - sarea->ctxOwner = me; - } - - /* Shared texture managment - if another client has played with - * texture space, figure out which if any of our textures have been - * ejected, and update our global LRU. - */ - if (sarea->texAge != imesa->texAge) { - int sz = 1 << (imesa->i810Screen->logTextureGranularity); - int idx, nr = 0; - - /* Have to go right round from the back to ensure stuff ends up - * LRU in our local list... - */ - for (idx = sarea->texList[I810_NR_TEX_REGIONS].prev ; - idx != I810_NR_TEX_REGIONS && nr < I810_NR_TEX_REGIONS ; - idx = sarea->texList[idx].prev, nr++) - { - if (sarea->texList[idx].age > imesa->texAge) - i810TexturesGone(imesa, idx * sz, sz, sarea->texList[idx].in_use); - } - - if (nr == I810_NR_TEX_REGIONS) { - i810TexturesGone(imesa, 0, imesa->i810Screen->textureSize, 0); - i810ResetGlobalLRU( imesa ); - } - - if (0) fprintf(stderr, "imesa %d sarea %d\n", imesa->texAge, sarea->texAge); - imesa->dirty |= I810_UPLOAD_TEX0IMAGE; - imesa->dirty |= I810_UPLOAD_TEX1IMAGE; - imesa->texAge = sarea->texAge; - } - - - if (dPriv->lastStamp != stamp) - i810XMesaWindowMoved( imesa ); - - - sarea->last_quiescent = -1; /* just kill it for now */ -} - - -#endif Index: xc/lib/GL/mesa/src/drv/i810/i810context.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i810/i810context.c:1.3 --- /dev/null Thu Feb 27 12:26:23 2003 +++ xc/lib/GL/mesa/src/drv/i810/i810context.c Wed Oct 30 07:51:33 2002 @@ -0,0 +1,449 @@ +/************************************************************************** + +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/i810/i810context.c,v 1.3 2002/10/30 12:51:33 alanh Exp $ */ + +/* + * Authors: + * Keith Whitwell + * + */ + + +#include "glheader.h" +#include "context.h" +#include "matrix.h" +#include "simple_list.h" +#include "extensions.h" +#include "mem.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/tnl.h" +#include "array_cache/acache.h" + +#include "tnl/t_pipeline.h" + +#include "i810screen.h" +#include "i810_dri.h" + +#include "i810state.h" +#include "i810tex.h" +#include "i810span.h" +#include "i810tris.h" +#include "i810vb.h" +#include "i810ioctl.h" + +#include +#include + + +static const GLubyte *i810GetString( GLcontext *ctx, GLenum name ) +{ + switch (name) { + case GL_VENDOR: + return (GLubyte *)"Keith Whitwell"; + case GL_RENDERER: + return (GLubyte *)"Mesa DRI I810 20020221"; + default: + return 0; + } +} + +static void i810BufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height) +{ + GET_CURRENT_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 + * to be correct. + */ + LOCK_HARDWARE(imesa); + *width = imesa->driDrawable->w; + *height = imesa->driDrawable->h; + UNLOCK_HARDWARE(imesa); +} + +static void i810InitExtensions( GLcontext *ctx ) +{ + _mesa_enable_imaging_extensions( ctx); + _mesa_enable_extension( ctx, "GL_ARB_multitexture" ); + _mesa_enable_extension( ctx, "GL_ARB_texture_env_add" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_env_add" ); + _mesa_enable_extension( ctx, "GL_EXT_stencil_wrap" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_lod_bias" ); +} + +extern const struct gl_pipeline_stage _i810_render_stage; + +static const struct gl_pipeline_stage *i810_pipeline[] = { + &_tnl_vertex_transform_stage, + &_tnl_normal_transform_stage, + &_tnl_lighting_stage, + &_tnl_fog_coordinate_stage, + &_tnl_texgen_stage, + &_tnl_texture_transform_stage, + /* REMOVE: point attenuation stage */ +#if 1 + &_i810_render_stage, /* ADD: unclipped rastersetup-to-dma */ +#endif + &_tnl_render_stage, + 0, +}; + + +GLboolean +i810CreateContext( Display *dpy, const __GLcontextModes *mesaVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ) +{ + GLcontext *ctx, *shareCtx; + i810ContextPtr imesa; + __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private; + I810SAREAPtr saPriv = (I810SAREAPtr) + (((GLubyte *)sPriv->pSAREA) + i810Screen->sarea_priv_offset); + + /* Allocate i810 context */ + imesa = (i810ContextPtr) CALLOC_STRUCT(i810_context_t); + if (!imesa) { + return GL_FALSE; + } + + /* Allocate the Mesa context */ + if (sharedContextPrivate) + shareCtx = ((i810ContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + imesa->glCtx = _mesa_create_context(mesaVis, shareCtx, imesa, GL_TRUE); + if (!imesa->glCtx) { + FREE(imesa); + return GL_FALSE; + } + driContextPriv->driverPrivate = imesa; + + + /* Set the maximum texture size small enough that we can guarentee + * that both texture units can bind a maximal texture and have them + * in memory at once. + */ + ctx = imesa->glCtx; + if (i810Screen->textureSize < 2*1024*1024) { + ctx->Const.MaxTextureLevels = 9; + } else if (i810Screen->textureSize < 8*1024*1024) { + ctx->Const.MaxTextureLevels = 10; + } else { + ctx->Const.MaxTextureLevels = 11; + } + ctx->Const.MaxTextureUnits = 2; + + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 3.0; + ctx->Const.MaxLineWidthAA = 3.0; + ctx->Const.LineWidthGranularity = 1.0; + + ctx->Const.MinPointSize = 1.0; + ctx->Const.MinPointSizeAA = 1.0; + ctx->Const.MaxPointSize = 3.0; + ctx->Const.MaxPointSizeAA = 3.0; + ctx->Const.PointSizeGranularity = 1.0; + + ctx->Driver.GetBufferSize = i810BufferSize; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; + ctx->Driver.GetString = i810GetString; + + /* Who owns who? + */ + ctx->DriverCtx = (void *) imesa; + imesa->glCtx = ctx; + + /* Initialize the software rasterizer and helper modules. + */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); + + /* Install the customized pipeline: + */ + _tnl_destroy_pipeline( ctx ); + _tnl_install_pipeline( ctx, i810_pipeline ); + + /* Configure swrast to match hardware characteristics: + */ + _swrast_allow_pixel_fog( ctx, GL_FALSE ); + _swrast_allow_vertex_fog( ctx, GL_TRUE ); + + /* Dri stuff + */ + imesa->display = dpy; + imesa->hHWContext = driContextPriv->hHWContext; + imesa->driFd = sPriv->fd; + imesa->driHwLock = &sPriv->pSAREA->lock; + + imesa->i810Screen = i810Screen; + imesa->driScreen = sPriv; + imesa->sarea = saPriv; + imesa->glBuffer = NULL; + + imesa->texHeap = mmInit( 0, i810Screen->textureSize ); + imesa->stipple_in_hw = 1; + imesa->RenderIndex = ~0; + imesa->dirty = I810_UPLOAD_CTX|I810_UPLOAD_BUFFERS; + imesa->upload_cliprects = GL_TRUE; + + make_empty_list(&imesa->TexObjList); + make_empty_list(&imesa->SwappedOut); + + imesa->CurrentTexObj[0] = 0; + imesa->CurrentTexObj[1] = 0; + + _math_matrix_ctr( &imesa->ViewportMatrix ); + + i810InitExtensions( ctx ); + i810InitStateFuncs( ctx ); + i810InitTextureFuncs( ctx ); + i810InitTriFuncs( ctx ); + i810InitSpanFuncs( ctx ); + i810InitIoctlFuncs( ctx ); + i810InitVB( ctx ); + i810InitState( ctx ); + + return GL_TRUE; +} + +void +i810DestroyContext(__DRIcontextPrivate *driContextPriv) +{ + i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate; + + assert(imesa); /* should never be null */ + if (imesa) { + + _swsetup_DestroyContext( imesa->glCtx ); + _tnl_DestroyContext( imesa->glCtx ); + _ac_DestroyContext( imesa->glCtx ); + _swrast_DestroyContext( imesa->glCtx ); + + i810FreeVB( imesa->glCtx ); + + /* free the Mesa context */ + imesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context(imesa->glCtx); + + Xfree(imesa); + } +} + + +void i810XMesaSetFrontClipRects( i810ContextPtr imesa ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + + imesa->numClipRects = dPriv->numClipRects; + imesa->pClipRects = dPriv->pClipRects; + imesa->drawX = dPriv->x; + imesa->drawY = dPriv->y; + + i810EmitDrawingRectangle( imesa ); + imesa->upload_cliprects = GL_TRUE; +} + + +void i810XMesaSetBackClipRects( i810ContextPtr imesa ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + + if (dPriv->numBackClipRects == 0) + { + imesa->numClipRects = dPriv->numClipRects; + imesa->pClipRects = dPriv->pClipRects; + imesa->drawX = dPriv->x; + imesa->drawY = dPriv->y; + } else { + imesa->numClipRects = dPriv->numBackClipRects; + imesa->pClipRects = dPriv->pBackClipRects; + imesa->drawX = dPriv->backX; + imesa->drawY = dPriv->backY; + } + + i810EmitDrawingRectangle( imesa ); + imesa->upload_cliprects = GL_TRUE; +} + + +static void i810XMesaWindowMoved( i810ContextPtr imesa ) +{ + switch (imesa->glCtx->Color.DriverDrawBuffer) { + case GL_BACK_LEFT: + i810XMesaSetBackClipRects( imesa ); + break; + case GL_FRONT_LEFT: + default: + i810XMesaSetFrontClipRects( imesa ); + break; + } + +} + + +GLboolean +i810UnbindContext(__DRIcontextPrivate *driContextPriv) +{ + i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate; + if (imesa) { + imesa->dirty = I810_UPLOAD_CTX|I810_UPLOAD_BUFFERS; + if (imesa->CurrentTexObj[0]) imesa->dirty |= I810_UPLOAD_TEX0; + if (imesa->CurrentTexObj[1]) imesa->dirty |= I810_UPLOAD_TEX1; + } + + return GL_TRUE; +} + + +GLboolean +i810MakeCurrent(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv) +{ + if (driContextPriv) { + i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate; + + /* Shouldn't the readbuffer be stored also? + */ + imesa->driDrawable = driDrawPriv; + + _mesa_make_current2(imesa->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate); + + /* Are these necessary? + */ + i810XMesaWindowMoved( imesa ); + if (!imesa->glCtx->Viewport.Width) + _mesa_set_viewport(imesa->glCtx, 0, 0, + driDrawPriv->w, driDrawPriv->h); + } + else { + _mesa_make_current(0,0); + } + + return GL_TRUE; +} + + +void i810GetLock( i810ContextPtr imesa, GLuint flags ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIscreenPrivate *sPriv = imesa->driScreen; + I810SAREAPtr sarea = imesa->sarea; + int me = imesa->hHWContext; + + drmGetLock(imesa->driFd, imesa->hHWContext, flags); + + /* If the window moved, may need to set a new cliprect now. + * + * NOTE: This releases and regains the hw lock, so all state + * checking must be done *after* this call: + */ + DRI_VALIDATE_DRAWABLE_INFO(imesa->display, sPriv, dPriv); + + + /* If we lost context, need to dump all registers to hardware. + * Note that we don't care about 2d contexts, even if they perform + * accelerated commands, so the DRI locking in the X server is even + * more broken than usual. + */ + if (sarea->ctxOwner != me) { + imesa->upload_cliprects = GL_TRUE; + imesa->dirty = I810_UPLOAD_CTX|I810_UPLOAD_BUFFERS; + if (imesa->CurrentTexObj[0]) imesa->dirty |= I810_UPLOAD_TEX0; + if (imesa->CurrentTexObj[1]) imesa->dirty |= I810_UPLOAD_TEX1; + sarea->ctxOwner = me; + } + + /* Shared texture managment - if another client has played with + * texture space, figure out which if any of our textures have been + * ejected, and update our global LRU. + */ + if (sarea->texAge != imesa->texAge) { + int sz = 1 << (imesa->i810Screen->logTextureGranularity); + int idx, nr = 0; + + /* Have to go right round from the back to ensure stuff ends up + * LRU in our local list... + */ + for (idx = sarea->texList[I810_NR_TEX_REGIONS].prev ; + idx != I810_NR_TEX_REGIONS && nr < I810_NR_TEX_REGIONS ; + idx = sarea->texList[idx].prev, nr++) + { + if (sarea->texList[idx].age > imesa->texAge) + i810TexturesGone(imesa, idx * sz, sz, sarea->texList[idx].in_use); + } + + if (nr == I810_NR_TEX_REGIONS) { + i810TexturesGone(imesa, 0, imesa->i810Screen->textureSize, 0); + i810ResetGlobalLRU( imesa ); + } + + imesa->texAge = sarea->texAge; + } + + if (imesa->lastStamp != dPriv->lastStamp) { + i810XMesaWindowMoved( imesa ); + imesa->lastStamp = dPriv->lastStamp; + } +} + + +void +i810SwapBuffers(Display *dpy, void *drawablePrivate) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + (void) dpy; + + if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { + i810ContextPtr imesa; + GLcontext *ctx; + imesa = (i810ContextPtr) dPriv->driContextPriv->driverPrivate; + ctx = imesa->glCtx; + if (ctx->Visual.doubleBufferMode) { + _mesa_swapbuffers( ctx ); /* flush pending rendering comands */ + if ( imesa->doPageFlip ) { + i810PageFlip( dPriv ); + } + else { + i810CopyBuffer( dPriv ); + } + } + } + else { + /* XXX this shouldn't be an error but we can't handle it for now */ + _mesa_problem(NULL, "i810SwapBuffers: drawable has no context!\n"); + } +} Index: xc/lib/GL/mesa/src/drv/i810/i810context.h diff -u xc/lib/GL/mesa/src/drv/i810/i810context.h:1.6 xc/lib/GL/mesa/src/drv/i810/i810context.h:1.9 --- xc/lib/GL/mesa/src/drv/i810/i810context.h:1.6 Mon Aug 27 17:12:19 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810context.h Mon Dec 16 11:18:51 2002 @@ -21,7 +21,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810context.h,v 1.6 2001/08/27 21:12:19 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810context.h,v 1.9 2002/12/16 16:18:51 dawes Exp $ */ #ifndef I810CONTEXT_INC #define I810CONTEXT_INC @@ -31,43 +31,28 @@ typedef struct i810_texture_object_t *i810TextureObjectPtr; #include -#include "dri_tmm.h" -#include "dri_mesaint.h" -#include "dri_mesa.h" - -#include "types.h" -#include "i810_init.h" -#include "drm.h" + +#include "mtypes.h" #include "mm.h" -#include "i810log.h" +#include "i810screen.h" #include "i810tex.h" -#include "i810vb.h" -/* Reasons to fallback on all primitives. (see also - * imesa->IndirectTriangles). +/* Reasons to disable hardware rasterization. */ #define I810_FALLBACK_TEXTURE 0x1 #define I810_FALLBACK_DRAW_BUFFER 0x2 #define I810_FALLBACK_READ_BUFFER 0x4 #define I810_FALLBACK_COLORMASK 0x8 -#define I810_FALLBACK_STIPPLE 0x10 #define I810_FALLBACK_SPECULAR 0x20 #define I810_FALLBACK_LOGICOP 0x40 +#define I810_FALLBACK_RENDERMODE 0x80 +#define I810_FALLBACK_STENCIL 0x100 +#define I810_FALLBACK_BLEND_EQ 0x200 +#define I810_FALLBACK_BLEND_FUNC 0x400 - -/* for i810ctx.new_state - manage GL->driver state changes - */ -#define I810_NEW_TEXTURE 0x1 - - -typedef void (*i810_interp_func)( GLfloat t, - GLfloat *result, - const GLfloat *in, - const GLfloat *out ); - #ifndef PCI_CHIP_I810 #define PCI_CHIP_I810 0x7121 #define PCI_CHIP_I810_DC100 0x7123 @@ -81,71 +66,93 @@ #define IS_I815(imesa) (imesa->i810Screen->deviceID == PCI_CHIP_I815) -struct i810_context_t { - GLint refcount; +#define I810_UPLOAD_TEX(i) (I810_UPLOAD_TEX0<<(i)) + +/* Use the templated vertex formats: + */ +#define TAG(x) i810##x +#include "tnl_dd/t_dd_vertex.h" +#undef TAG + +typedef void (*i810_tri_func)( i810ContextPtr, i810Vertex *, i810Vertex *, + i810Vertex * ); +typedef void (*i810_line_func)( i810ContextPtr, i810Vertex *, i810Vertex * ); +typedef void (*i810_point_func)( i810ContextPtr, i810Vertex * ); +struct i810_context_t { + GLint refcount; GLcontext *glCtx; + /* Textures + */ i810TextureObjectPtr CurrentTexObj[2]; - struct i810_texture_object_t TexObjList; struct i810_texture_object_t SwappedOut; + memHeap_t *texHeap; - int TextureMode; + /* Bit flag to keep track of fallbacks. + */ + GLuint Fallback; - /* Hardware state + /* Temporaries for translating away float colors: */ - GLuint Setup[I810_CTX_SETUP_SIZE]; - GLuint BufferSetup[I810_DEST_SETUP_SIZE]; - int vertsize; + struct gl_client_array UbyteColor; + struct gl_client_array UbyteSecondaryColor; + + /* State for i810vb.c and i810tris.c. + */ + GLuint new_state; /* _NEW_* flags */ + GLuint SetupNewInputs; + GLuint SetupIndex; + GLuint RenderIndex; + GLmatrix ViewportMatrix; + GLenum render_primitive; + GLenum reduced_primitive; + GLuint hw_primitive; + char *verts; + + drmBufPtr vertex_buffer; + char *vertex_addr; + GLuint vertex_low; + GLuint vertex_high; + GLuint vertex_last_prim; + GLboolean upload_cliprects; + - /* Support for CVA and the fast paths. + /* Fallback rasterization functions */ - GLuint setupdone; - GLuint setupindex; - GLuint renderindex; - GLuint using_fast_path; - i810_interp_func interp; - - /* Shortcircuit some state changes. - */ - points_func PointsFunc; - line_func LineFunc; - triangle_func TriangleFunc; - quad_func QuadFunc; + i810_point_func draw_point; + i810_line_func draw_line; + i810_tri_func draw_tri; - /* Manage our own state */ - GLuint new_state; + /* Hardware state + */ + GLuint dirty; /* I810_UPLOAD_* */ + GLuint Setup[I810_CTX_SETUP_SIZE]; + GLuint BufferSetup[I810_DEST_SETUP_SIZE]; + int vertex_size; + int vertex_stride_shift; + unsigned int lastStamp; + GLboolean stipple_in_hw; - /* Manage hardware state */ - GLuint dirty; - memHeap_t *texHeap; + GLenum TexEnvImageFmt[2]; - /* One of the few bits of hardware state that can't be calculated - * completely on the fly: + /* State which can't be computed completely on the fly: */ GLuint LcsCullMode; + GLuint LcsLineWidth; + GLuint LcsPointSize; /* Funny mesa mirrors */ - GLushort MonoColor; GLushort ClearColor; /* DRI stuff */ - drmBufPtr vertex_dma_buffer; - GLuint vertex_prim; - - GLframebuffer *glBuffer; - - /* Two flags to keep track of fallbacks. - */ - GLuint IndirectTriangles; - GLuint Fallback; - - GLuint needClip; + GLframebuffer *glBuffer; + GLboolean doPageFlip; /* These refer to the current draw (front vs. back) buffer: */ @@ -157,15 +164,13 @@ XF86DRIClipRectPtr pClipRects; int lastSwap; - int secondLastSwap; int texAge; int ctxAge; int dirtyAge; - int any_contend; /* throttle me harder */ - int scissor; - drm_clip_rect_t draw_rect; - drm_clip_rect_t scissor_rect; + GLboolean scissor; + XF86DRIClipRectRec draw_rect; + XF86DRIClipRectRec scissor_rect; drmContext hHWContext; drmLock *driHwLock; @@ -175,31 +180,55 @@ __DRIdrawablePrivate *driDrawable; __DRIscreenPrivate *driScreen; i810ScreenPrivate *i810Screen; - drm_i810_sarea_t *sarea; + I810SAREAPtr sarea; }; + +#define I810_CONTEXT(ctx) ((i810ContextPtr)(ctx->DriverCtx)) + +#define GET_DISPATCH_AGE( imesa ) imesa->sarea->last_dispatch +#define GET_ENQUEUE_AGE( imesa ) imesa->sarea->last_enqueue -/* To remove all debugging, make sure I810_DEBUG is defined as a - * preprocessor symbol, and equal to zero. + +/* Lock the hardware and validate our state. */ -#define I810_DEBUG 0 -#ifndef I810_DEBUG -#warning "Debugging enabled - expect reduced performance" -extern int I810_DEBUG; -#endif +#define LOCK_HARDWARE( imesa ) \ + do { \ + char __ret=0; \ + DRM_CAS(imesa->driHwLock, imesa->hHWContext, \ + (DRM_LOCK_HELD|imesa->hHWContext), __ret); \ + if (__ret) \ + i810GetLock( imesa, 0 ); \ + } while (0) + + + +/* Release the kernel lock. + */ +#define UNLOCK_HARDWARE(imesa) \ + DRM_UNLOCK(imesa->driFd, imesa->driHwLock, imesa->hHWContext); + + +/* This is the wrong way to do it, I'm sure. Otherwise the drm + * bitches that I've already got the heavyweight lock. At worst, + * this is 3 ioctls. The best solution probably only gets me down + * to 2 ioctls in the worst case. + */ +#define LOCK_HARDWARE_QUIESCENT( imesa ) do { \ + LOCK_HARDWARE( imesa ); \ + i810RegetLockQuiescent( imesa ); \ +} while(0) + + +extern void i810GetLock( i810ContextPtr imesa, GLuint flags ); +extern void i810EmitHwStateLocked( i810ContextPtr imesa ); +extern void i810EmitScissorValues( i810ContextPtr imesa, int box_nr, int emit ); +extern void i810EmitDrawingRectangle( i810ContextPtr imesa ); +extern void i810XMesaSetBackClipRects( i810ContextPtr imesa ); +extern void i810XMesaSetFrontClipRects( i810ContextPtr imesa ); -#define DEBUG_VERBOSE_2D 0x1 -#define DEBUG_VERBOSE_RING 0x8 -#define DEBUG_VERBOSE_OUTREG 0x10 -#define DEBUG_ALWAYS_SYNC 0x40 -#define DEBUG_VERBOSE_MSG 0x80 -#define DEBUG_NO_OUTRING 0x100 -#define DEBUG_NO_OUTREG 0x200 -#define DEBUG_VERBOSE_API 0x400 -#define DEBUG_VALIDATE_RING 0x800 -#define DEBUG_VERBOSE_LRU 0x1000 -#define DEBUG_VERBOSE_DRI 0x2000 -#define DEBUG_VERBOSE_IOCTL 0x4000 +#define SUBPIXEL_X -.5 +#define SUBPIXEL_Y -.5 #endif Index: xc/lib/GL/mesa/src/drv/i810/i810dd.c diff -u xc/lib/GL/mesa/src/drv/i810/i810dd.c:1.5 xc/lib/GL/mesa/src/drv/i810/i810dd.c:removed --- xc/lib/GL/mesa/src/drv/i810/i810dd.c:1.5 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810dd.c Thu Feb 27 12:26:23 2003 @@ -1,140 +0,0 @@ -/* - * GLX Hardware Device Driver for Intel i810 - * 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: - * - * 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. - * - */ -/* $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" - -#include - -#include "mm.h" -#include "i810dd.h" -#include "i810log.h" -#include "i810state.h" -#include "i810span.h" -#include "i810tex.h" -#include "i810tris.h" -#include "i810vb.h" -#include "i810pipeline.h" -#include "extensions.h" -#include "vb.h" -#include "dd.h" - - -extern int xf86VTSema; - - -/*************************************** - * Mesa's Driver Functions - ***************************************/ - - -static const GLubyte *i810DDGetString( GLcontext *ctx, GLenum name ) -{ - switch (name) { - case GL_VENDOR: - return (GLubyte *)"Keith Whitwell, Precision Insight Inc."; - case GL_RENDERER: - return (GLubyte *)"Mesa DRI I810 20010321"; - default: - return 0; - } -} - -static GLint i810GetParameteri(const GLcontext *ctx, GLint param) -{ - switch (param) { - case DD_HAVE_HARDWARE_FOG: - return 1; - default: - return 0; - } -} - - - -static void i810BufferSize(GLcontext *ctx, GLuint *width, GLuint *height) -{ - 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 - * to be correct. - */ - LOCK_HARDWARE(imesa); - *width = imesa->driDrawable->w; - *height = imesa->driDrawable->h; - UNLOCK_HARDWARE(imesa); -} - - - - -void i810DDExtensionsInit( GLcontext *ctx ) -{ - /* paletted_textures currently doesn't work. - */ - gl_extensions_disable( ctx, "GL_EXT_shared_texture_palette" ); - gl_extensions_disable( ctx, "GL_EXT_paletted_texture" ); - - /* we don't support point parameters in hardware yet */ - gl_extensions_disable( ctx, "GL_EXT_point_parameters" ); - - /* 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_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_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" ); - - /* We do support tex_env_add, however - */ - gl_extensions_enable( ctx, "GL_EXT_texture_env_add" ); -} - - - - -void i810DDInitDriverFuncs( GLcontext *ctx ) -{ - ctx->Driver.GetBufferSize = i810BufferSize; - ctx->Driver.GetString = i810DDGetString; - ctx->Driver.GetParameteri = i810GetParameteri; - ctx->Driver.RegisterVB = i810DDRegisterVB; - ctx->Driver.UnregisterVB = i810DDUnregisterVB; - ctx->Driver.Clear = i810Clear; - - - ctx->Driver.BuildPrecalcPipeline = i810DDBuildPrecalcPipeline; -} Index: xc/lib/GL/mesa/src/drv/i810/i810dd.h diff -u xc/lib/GL/mesa/src/drv/i810/i810dd.h:1.1 xc/lib/GL/mesa/src/drv/i810/i810dd.h:removed --- xc/lib/GL/mesa/src/drv/i810/i810dd.h:1.1 Fri Feb 11 12:25:29 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810dd.h Thu Feb 27 12:26:23 2003 @@ -1,33 +0,0 @@ -/* - * GLX Hardware Device Driver for Intel i810 - * 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: - * - * 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. - * - */ - -#ifndef I810DD_INC -#define I810DD_INC - -#include "context.h" - -void i810DDExtensionsInit( GLcontext *ctx ); -void i810DDInitDriverFuncs( GLcontext *ctx ); - -#endif Index: xc/lib/GL/mesa/src/drv/i810/i810fastpath.c diff -u xc/lib/GL/mesa/src/drv/i810/i810fastpath.c:1.6 xc/lib/GL/mesa/src/drv/i810/i810fastpath.c:removed --- xc/lib/GL/mesa/src/drv/i810/i810fastpath.c:1.6 Mon Aug 27 17:12:19 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810fastpath.c Thu Feb 27 12:26:24 2003 @@ -1,523 +0,0 @@ -/* - * GLX Hardware Device Driver for Intel i810 - * 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: - * - * 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. - * - */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810fastpath.c,v 1.6 2001/08/27 21:12:19 dawes Exp $ */ - -#include - -#include "types.h" -#include "enums.h" -#include "cva.h" -#include "vertices.h" - -/* #include "mmath.h" */ - -#include "i810context.h" -#include "i810pipeline.h" -#include "i810tris.h" -#include "i810state.h" -#include "i810vb.h" -#include "vbcull.h" - - -struct i810_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) i810_draw_point(imesa, &ivert[x], psize) -#define LINE(x,y) i810_draw_line(imesa, &ivert[x], &ivert[y] ) -#define TRI(x,y,z) i810_draw_triangle(imesa, &ivert[x], &ivert[y], &ivert[z]) - - - - -/* Direct, and no clipping required. I haven't written the clip funcs - * yet, so this is only useful for the fast path. - */ -#define RENDER_POINTS( start, count ) \ -do { \ - GLuint e; \ - for(e=start;everts; \ - const GLuint *elt = VB->EltPtr->data; \ - GLcontext *ctx = VB->ctx; \ - i810ContextPtr imesa = I810_CONTEXT(ctx); \ - const GLfloat psize = ctx->Point.Size; \ - (void)psize; (void) ivert; - - -#define TAG(x) x##_i810_smooth_indirect -#include "render_tmp.h" - - - -static void i810_render_elements_direct( struct vertex_buffer *VB ) -{ - GLcontext *ctx = VB->ctx; - i810ContextPtr imesa = I810_CONTEXT( ctx ); - GLenum prim = ctx->CVA.elt_mode; - GLuint nr = VB->EltPtr->count; - render_func func = render_tab_i810_smooth_indirect[prim]; - GLuint p = 0; - - if (imesa->new_state) - i810DDUpdateHwState( ctx ); - - do { - func( VB, 0, nr, 0 ); - } while (ctx->Driver.MultipassFunc && - ctx->Driver.MultipassFunc( VB, ++p )); -} - - - -#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 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[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; \ -} - -#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); \ - \ - 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; \ -} - - -static __inline void i810_tri_clip( GLuint **p_elts, - i810Vertex *verts, - GLubyte *clipmask, - GLuint *p_next_vert, - GLubyte mask, - i810_interp_func interp ) -{ - 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 i810_line_clip( GLuint **p_elts, - i810Vertex *verts, - GLubyte *clipmask, - GLuint *p_next_vert, - GLubyte mask, - i810_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 ) \ - 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])) { \ - i810_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])) { \ - i810_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 \ - i810ContextPtr imesa = I810_CONTEXT( VB->ctx ); \ - GLuint *elt = VB->EltPtr->data; \ - i810Vertex *verts = I810_DRIVER_DATA(VB)->verts; \ - GLuint next_vert = I810_DRIVER_DATA(VB)->last_vert; \ - GLuint *out = I810_DRIVER_DATA(VB)->clipped_elements.data; \ - GLubyte *mask = VB->ClipMask; \ - i810_interp_func interp = imesa->interp; \ - (void) interp; (void) verts; - -#define POSTFIX \ - I810_DRIVER_DATA(VB)->clipped_elements.count = \ - out - I810_DRIVER_DATA(VB)->clipped_elements.data; \ - I810_DRIVER_DATA(VB)->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) \ - CLIP_LINE(elt[i1], elt[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) i810_clip_##x##_elt -#include "render_tmp.h" - - - -static void i810_project_vertices( struct vertex_buffer *VB ) -{ - i810VertexBufferPtr i810VB = I810_DRIVER_DATA(VB); - GLcontext *ctx = VB->ctx; - GLmatrix *mat = &ctx->Viewport.WindowMap; - GLfloat m[16]; - - m[MAT_SX] = mat->m[MAT_SX]; - m[MAT_TX] = mat->m[MAT_TX] - .5; - m[MAT_SY] = (- mat->m[MAT_SY]); - m[MAT_TY] = (- mat->m[MAT_TY]) + I810_CONTEXT(ctx)->driDrawable->h - .5; - m[MAT_SZ] = mat->m[MAT_SZ] * (1.0 / 0x10000); - m[MAT_TZ] = mat->m[MAT_TZ] * (1.0 / 0x10000); - - gl_project_v16( i810VB->verts[VB->CopyStart].f, - i810VB->verts[i810VB->last_vert].f, - m, - 16 * 4 ); -} - -static void i810_project_clipped_vertices( struct vertex_buffer *VB ) -{ - i810VertexBufferPtr i810VB = I810_DRIVER_DATA(VB); - GLcontext *ctx = VB->ctx; - GLmatrix *mat = &ctx->Viewport.WindowMap; - GLfloat m[16]; - - m[MAT_SX] = mat->m[MAT_SX]; - m[MAT_TX] = mat->m[MAT_TX] - .5; - m[MAT_SY] = (- mat->m[MAT_SY]); - m[MAT_TY] = (- mat->m[MAT_TY]) + I810_CONTEXT(ctx)->driDrawable->h - .5; - m[MAT_SZ] = mat->m[MAT_SZ] * (1.0 / 0x10000); - m[MAT_TZ] = mat->m[MAT_TZ] * (1.0 / 0x10000); - - gl_project_clipped_v16( i810VB->verts[VB->CopyStart].f, - i810VB->verts[i810VB->last_vert].f, - m, - 16 * 4, - VB->ClipMask + VB->CopyStart ); -} - - -/* 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 "i810fasttmp.h" - -#define TYPE (I810_RGBA_BIT) -#define TAG(x) x##_RGBA -#include "i810fasttmp.h" - -#define TYPE (I810_TEX0_BIT) -#define TAG(x) x##_TEX0 -#include "i810fasttmp.h" - -#define TYPE (I810_RGBA_BIT|I810_TEX0_BIT) -#define TAG(x) x##_RGBA_TEX0 -#include "i810fasttmp.h" - -#define TYPE (I810_RGBA_BIT|I810_TEX0_BIT|I810_TEX1_BIT) -#define TAG(x) x##_RGBA_TEX0_TEX1 -#include "i810fasttmp.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 (I810_TEX0_BIT|I810_TEX1_BIT) -#define TAG(x) x##_TEX0_TEX1 -#include "i810fasttmp.h" - - -/* Very sparsely popluated array - fix the indices. - */ -static struct i810_fast_tab i810FastTab[0x80]; - -void i810DDFastPathInit( void ) -{ - i810_clip_render_init_elt(); - render_init_i810_smooth_indirect(); - - i810_init_fastpath( &i810FastTab[0] ); - i810_init_fastpath_RGBA( &i810FastTab[I810_RGBA_BIT] ); - i810_init_fastpath_TEX0( &i810FastTab[I810_TEX0_BIT] ); - i810_init_fastpath_RGBA_TEX0( &i810FastTab[I810_RGBA_BIT|I810_TEX0_BIT] ); - i810_init_fastpath_TEX0_TEX1( &i810FastTab[I810_TEX0_BIT|I810_TEX1_BIT] ); - i810_init_fastpath_RGBA_TEX0_TEX1( &i810FastTab[I810_RGBA_BIT|I810_TEX0_BIT| - I810_TEX1_BIT] ); -} - -#define VALID_SETUP (I810_RGBA_BIT|I810_TEX0_BIT|I810_TEX1_BIT) - - -void i810DDFastPath( struct vertex_buffer *VB ) -{ - GLcontext *ctx = VB->ctx; - GLenum prim = ctx->CVA.elt_mode; - i810ContextPtr imesa = I810_CONTEXT( ctx ); - struct i810_fast_tab *tab = &i810FastTab[imesa->setupindex & VALID_SETUP]; - GLuint do_cliptest = 1; - - gl_prepare_arrays_cva( VB ); /* still need this */ - - /* Reserve enough space for the pathological case. - */ - if (VB->EltPtr->count * 12 > I810_DRIVER_DATA(VB)->size) { - i810DDResizeVB( VB, VB->EltPtr->count * 12 ); - do_cliptest = 1; - } - - tab->build_vertices( VB, do_cliptest ); /* object->clip space */ - - if (imesa->new_state) - i810DDUpdateHwState( ctx ); - - if (VB->ClipOrMask) { - if (!VB->ClipAndMask) { - render_func *clip = i810_clip_render_tab_elt; - - imesa->interp = tab->interp; - - clip[prim]( VB, 0, VB->EltPtr->count, 0 ); /* build new elts */ - - ctx->CVA.elt_mode = gl_reduce_prim[prim]; - VB->EltPtr = &(I810_DRIVER_DATA(VB)->clipped_elements); - - i810_project_clipped_vertices( VB ); /* clip->device space */ - i810_render_elements_direct( VB ); /* render using new list */ - } - } else { - i810_project_vertices( VB ); /* clip->device space */ - i810_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/i810/i810fasttmp.h diff -u xc/lib/GL/mesa/src/drv/i810/i810fasttmp.h:1.1 xc/lib/GL/mesa/src/drv/i810/i810fasttmp.h:removed --- xc/lib/GL/mesa/src/drv/i810/i810fasttmp.h:1.1 Fri Feb 11 12:25:30 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810fasttmp.h Thu Feb 27 12:26:24 2003 @@ -1,143 +0,0 @@ -/* - * GLX Hardware Device Driver for Intel i810 - * 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: - * - * 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. - * - */ - - - -/* 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(i810_setup_full)( struct vertex_buffer *VB, GLuint do_cliptest ) -{ - GLcontext *ctx = VB->ctx; - const GLfloat * const m = ctx->ModelProjectMatrix.m; - GLuint start = VB->CopyStart; - GLuint count = VB->Count; - GLuint i; - - gl_xform_points3_v16_general(I810_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(I810_DRIVER_DATA(VB)->verts[start].f, - I810_DRIVER_DATA(VB)->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 = I810_DRIVER_DATA(VB)->verts[start].f; - - for (i = start ; i < count ; i++, f += 16) { - if (TYPE & I810_RGBA_BIT) { - GLubyte *b = (GLubyte *)&f[CLIP_UBYTE_COLOR]; - GLubyte *col = color; color += color_stride; - b[CLIP_UBYTE_R] = col[0]; - b[CLIP_UBYTE_G] = col[1]; - b[CLIP_UBYTE_B] = col[2]; - b[CLIP_UBYTE_A] = col[3]; - } - if (TYPE & I810_TEX0_BIT) { - f[CLIP_S0] = tex0_data[0]; - f[CLIP_T0] = tex0_data[1]; - STRIDE_F(tex0_data, tex0_stride); - } - if (TYPE & I810_TEX1_BIT) { - f[CLIP_S1] = tex1_data[0]; - f[CLIP_T1] = tex1_data[1]; - STRIDE_F(tex1_data, tex1_stride); - } - } - } - - I810_DRIVER_DATA(VB)->clipped_elements.count = start; - I810_DRIVER_DATA(VB)->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(i810_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 & I810_RGBA_BIT) { - INTERP_RGBA(t, - ((GLubyte *)&(O[4])), - ((GLubyte *)&(I[4])), - ((GLubyte *)&(J[4]))); - } - - if (TYPE & I810_TEX0_BIT) { - O[6] = LINTERP(t, I[6], J[6]); - O[7] = LINTERP(t, I[7], J[7]); - } - - if (TYPE & I810_TEX1_BIT) { - O[8] = LINTERP(t, I[8], J[8]); - O[9] = LINTERP(t, I[9], J[9]); - } -} - - -static void TAG(i810_init_fastpath)( struct i810_fast_tab *tab ) -{ - tab->interp = TAG(i810_interp_vert); - tab->build_vertices = TAG(i810_setup_full); -} - -#undef TYPE -#undef TAG -#undef SIZE Index: xc/lib/GL/mesa/src/drv/i810/i810ioctl.c diff -u xc/lib/GL/mesa/src/drv/i810/i810ioctl.c:1.5 xc/lib/GL/mesa/src/drv/i810/i810ioctl.c:1.7 --- xc/lib/GL/mesa/src/drv/i810/i810ioctl.c:1.5 Wed Mar 21 11:14:21 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810ioctl.c Wed Oct 30 07:51:33 2002 @@ -1,54 +1,47 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810ioctl.c,v 1.5 2001/03/21 16:14:21 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810ioctl.c,v 1.7 2002/10/30 12:51:33 alanh Exp $ */ #include #include -#include "types.h" -#include "pb.h" +#include "glheader.h" +#include "mtypes.h" +#include "macros.h" #include "dd.h" - +#include "swrast/swrast.h" #include "mm.h" + +#include "i810screen.h" +#include "i810_dri.h" + #include "i810context.h" -#include "i810log.h" #include "i810ioctl.h" - -#include "drm.h" -#include +#include "i810state.h" -drmBufPtr i810_get_buffer_ioctl( i810ContextPtr imesa ) +static drmBufPtr i810_get_buffer_ioctl( i810ContextPtr imesa ) { - drm_i810_dma_t dma; + drmI810DMA dma; drmBufPtr buf; - int retcode; + int retcode, i = 0; - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "Getting dma buffer\n"); - while (1) { - retcode = ioctl(imesa->driFd, DRM_IOCTL_I810_GETBUF, &dma); + retcode = drmCommandWriteRead(imesa->driFd, DRM_I810_GETBUF, + &dma, sizeof(drmI810DMA)); if (dma.granted == 1 && retcode == 0) break; - - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "Retcode : %d, granted : %d\n", retcode, dma.granted); - - ioctl(imesa->driFd, DRM_IOCTL_I810_FLUSH); + + if (++i > 1000) { + drmCommandNone(imesa->driFd, DRM_I810_FLUSH); + i = 0; + } } - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, - "imesa->i810Screen->bufs->list : %p, " - "dma.request_idx : %d\n", - imesa->i810Screen->bufs->list, dma.request_idx); - buf = &(imesa->i810Screen->bufs->list[dma.request_idx]); buf->idx = dma.request_idx; - buf->used = 4; /* leave room for instruction header */ + buf->used = 0; buf->total = dma.request_size; + buf->address = (drmAddress)dma.virtual; - if(imesa->i810Screen->use_copy_buf != 1) - buf->address = (drmAddress)dma.virtual; return buf; } @@ -56,20 +49,20 @@ #define DEPTH_SCALE ((1<<16)-1) -GLbitfield i810Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ) +static void i810Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); __DRIdrawablePrivate *dPriv = imesa->driDrawable; const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask); - drm_i810_clear_t clear; + drmI810Clear clear; int i; clear.flags = 0; clear.clear_color = imesa->ClearColor; clear.clear_depth = (GLuint) (ctx->Depth.Clear * DEPTH_SCALE); - FLUSH_BATCH( imesa ); + I810_FIREVERTICES( imesa ); if ((mask & DD_FRONT_LEFT_BIT) && colorMask == ~0) { clear.flags |= I810_FRONT; @@ -81,68 +74,66 @@ mask &= ~DD_BACK_LEFT_BIT; } - if ((mask & DD_DEPTH_BIT) && ctx->Depth.Mask) { - clear.flags |= I810_DEPTH; + if (mask & DD_DEPTH_BIT) { + if (ctx->Depth.Mask) + clear.flags |= I810_DEPTH; mask &= ~DD_DEPTH_BIT; } - if (!clear.flags) - return mask; + if (clear.flags) { + LOCK_HARDWARE( imesa ); - LOCK_HARDWARE( imesa ); + /* flip top to bottom */ + cy = dPriv->h-cy-ch; + cx += imesa->drawX; + cy += imesa->drawY; + + for (i = 0 ; i < imesa->numClipRects ; ) + { + int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, imesa->numClipRects); + XF86DRIClipRectPtr box = imesa->pClipRects; + XF86DRIClipRectPtr b = imesa->sarea->boxes; + int n = 0; - /* flip top to bottom */ - cy = dPriv->h-cy-ch; - cx += imesa->drawX; - cy += imesa->drawY; - - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "Clear, bufs %x nbox %d\n", - (int)clear.flags, (int)imesa->numClipRects); - - for (i = 0 ; i < imesa->numClipRects ; ) - { - int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, imesa->numClipRects); - XF86DRIClipRectRec *box = imesa->pClipRects; - drm_clip_rect_t *b = imesa->sarea->boxes; - int 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++ = *(drm_clip_rect_t *)&box[i]; - n++; + 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++; + } } + + imesa->sarea->nbox = n; + drmCommandWrite(imesa->driFd, DRM_I810_CLEAR, + &clear, sizeof(drmI810Clear)); } - imesa->sarea->nbox = n; - ioctl(imesa->driFd, DRM_IOCTL_I810_CLEAR, &clear); + UNLOCK_HARDWARE( imesa ); + imesa->upload_cliprects = GL_TRUE; } - - UNLOCK_HARDWARE( imesa ); - imesa->dirty |= I810_UPLOAD_CLIPRECTS; - return mask; + if (mask) + _swrast_Clear( ctx, mask, all, cx, cy, cw, ch ); } @@ -151,15 +142,19 @@ /* * Copy the back buffer to the front buffer. */ -void i810SwapBuffers( i810ContextPtr imesa ) +void i810CopyBuffer( const __DRIdrawablePrivate *dPriv ) { - __DRIdrawablePrivate *dPriv = imesa->driDrawable; + i810ContextPtr imesa; XF86DRIClipRectPtr pbox; - int nbox; - int i; - int tmp; + int nbox, i, tmp; + + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); - FLUSH_BATCH( imesa ); + imesa = (i810ContextPtr) dPriv->driContextPriv->driverPrivate; + + I810_FIREVERTICES( imesa ); LOCK_HARDWARE( imesa ); pbox = dPriv->pClipRects; @@ -175,218 +170,207 @@ for ( ; i < nr ; i++) *b++ = pbox[i]; - ioctl(imesa->driFd, DRM_IOCTL_I810_SWAP); + drmCommandNone(imesa->driFd, DRM_I810_SWAP); } tmp = GET_ENQUEUE_AGE(imesa); UNLOCK_HARDWARE( imesa ); - if (GET_DISPATCH_AGE(imesa) < imesa->lastSwap) + /* multiarb will suck the life out of the server without this throttle: + */ + if (GET_DISPATCH_AGE(imesa) < imesa->lastSwap) { i810WaitAge(imesa, imesa->lastSwap); + } imesa->lastSwap = tmp; - imesa->dirty |= I810_UPLOAD_CLIPRECTS; + imesa->upload_cliprects = GL_TRUE; } - - +/* + * XXX implement when full-screen extension is done. + */ +void i810PageFlip( const __DRIdrawablePrivate *dPriv ) +{ + (void) dPriv; +/* _mesa_problem(NULL, "i810PageFlip should not be called!\n"); */ + return; +} /* This waits for *everybody* to finish rendering -- overkill. */ void i810DmaFinish( i810ContextPtr imesa ) { - FLUSH_BATCH( imesa ); + I810_FIREVERTICES( imesa ); - if (imesa->sarea->last_quiescent != imesa->sarea->last_enqueue) { - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "i810DmaFinish\n"); - - LOCK_HARDWARE( imesa ); - i810RegetLockQuiescent( imesa ); - UNLOCK_HARDWARE( imesa ); - imesa->sarea->last_quiescent = imesa->sarea->last_enqueue; - } + LOCK_HARDWARE( imesa ); + i810RegetLockQuiescent( imesa ); + UNLOCK_HARDWARE( imesa ); } 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; - /* - } - */ + drmUnlock(imesa->driFd, imesa->hHWContext); + i810GetLock( imesa, DRM_LOCK_QUIESCENT ); } void i810WaitAgeLocked( i810ContextPtr imesa, int age ) { - int i = 0; - + int i = 0, j; - while (++i < 500000 && GET_DISPATCH_AGE(imesa) < age) { - ioctl(imesa->driFd, DRM_IOCTL_I810_GETAGE); + while (++i < 5000) { + drmCommandNone(imesa->driFd, DRM_I810_GETAGE); + if (GET_DISPATCH_AGE(imesa) >= age) + return; + for (j = 0 ; j < 1000 ; j++) + ; } - if (GET_DISPATCH_AGE(imesa) < age) { - if (0) - fprintf(stderr, "wait locked %d %d\n", age, GET_DISPATCH_AGE(imesa)); - ioctl(imesa->driFd, DRM_IOCTL_I810_FLUSH); - } + drmCommandNone(imesa->driFd, DRM_I810_FLUSH); } void i810WaitAge( i810ContextPtr imesa, int age ) { - int i = 0; + int i = 0, j; - while (++i < 500000 && GET_DISPATCH_AGE(imesa) < age) { - ioctl(imesa->driFd, DRM_IOCTL_I810_GETAGE); + while (++i < 5000) { + drmCommandNone(imesa->driFd, DRM_I810_GETAGE); + if (GET_DISPATCH_AGE(imesa) >= age) + return; + for (j = 0 ; j < 1000 ; j++) + ; } - if (GET_DISPATCH_AGE(imesa) >= age) - return; - i = 0; - while (++i < 1000 && GET_DISPATCH_AGE(imesa) < age) { - ioctl(imesa->driFd, DRM_IOCTL_I810_GETAGE); + while (++i < 1000) { + drmCommandNone(imesa->driFd, DRM_I810_GETAGE); + if (GET_DISPATCH_AGE(imesa) >= age) + return; usleep(1000); } - - /* To be effective at letting other clients at the hardware, - * particularly the X server which regularly needs quiescence to - * touch the framebuffer, we really need to sleep *beyond* the - * point where our last buffer clears the hardware. - */ - if (imesa->any_contend) { - usleep(3000); - } - - imesa->any_contend = 0; - if (GET_DISPATCH_AGE(imesa) < age) { - LOCK_HARDWARE(imesa); - if (GET_DISPATCH_AGE(imesa) < age) - ioctl(imesa->driFd, DRM_IOCTL_I810_FLUSH); - UNLOCK_HARDWARE(imesa); - } + LOCK_HARDWARE(imesa); + drmCommandNone(imesa->driFd, DRM_I810_FLUSH); + UNLOCK_HARDWARE(imesa); } -void i810FlushVertices( i810ContextPtr imesa ) -{ - if (!imesa->vertex_dma_buffer) return; - - LOCK_HARDWARE( imesa ); - i810FlushVerticesLocked( imesa ); - UNLOCK_HARDWARE( imesa ); -} - -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 (b->y1 > out->y1) out->y1 = b->y1; + if (b->y2 < out->y2) out->y2 = b->y2; if (out->y1 >= out->y2) return 0; return 1; } +static void emit_state( i810ContextPtr imesa ) +{ + GLuint dirty = imesa->dirty; + I810SAREAPtr sarea = imesa->sarea; + + if (dirty & I810_UPLOAD_BUFFERS) { + memcpy( sarea->BufferState, imesa->BufferSetup, + sizeof(imesa->BufferSetup) ); + } + + if (dirty & I810_UPLOAD_CTX) { + memcpy( sarea->ContextState, imesa->Setup, + sizeof(imesa->Setup) ); + } + + if (dirty & I810_UPLOAD_TEX0) { + memcpy(sarea->TexState[0], + imesa->CurrentTexObj[0]->Setup, + sizeof(imesa->CurrentTexObj[0]->Setup)); + } + + if (dirty & I810_UPLOAD_TEX1) { + GLuint *setup = sarea->TexState[1]; + + memcpy( setup, + imesa->CurrentTexObj[1]->Setup, + sizeof(imesa->CurrentTexObj[1]->Setup)); + + /* Need this for the case where both units are bound to the same + * texobj. + */ + setup[I810_TEXREG_MI1] ^= (MI1_MAP_0 ^ MI1_MAP_1); + setup[I810_TEXREG_MLC] ^= (MLC_MAP_0 ^ MLC_MAP_1); + setup[I810_TEXREG_MLL] ^= (MLL_MAP_0 ^ MLL_MAP_1); + setup[I810_TEXREG_MCS] ^= (MCS_COORD_0 ^ MCS_COORD_1); + setup[I810_TEXREG_MF] ^= (MF_MAP_0 ^ MF_MAP_1); + } + + sarea->dirty = dirty; + imesa->dirty = 0; +} + + static void age_imesa( i810ContextPtr imesa, int age ) { if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->age = age; if (imesa->CurrentTexObj[1]) imesa->CurrentTexObj[1]->age = age; } + -void i810FlushVerticesLocked( i810ContextPtr imesa ) +void i810FlushPrimsLocked( i810ContextPtr imesa ) { - drm_clip_rect_t *pbox = (drm_clip_rect_t *)imesa->pClipRects; + XF86DRIClipRectPtr pbox = (XF86DRIClipRectPtr)imesa->pClipRects; int nbox = imesa->numClipRects; - drmBufPtr buffer = imesa->vertex_dma_buffer; - drm_i810_vertex_t vertex; + drmBufPtr buffer = imesa->vertex_buffer; + I810SAREAPtr sarea = imesa->sarea; + drmI810Vertex vertex; int i; - - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "i810FlushVerticesLocked, buf->used %d\n", - buffer->used); - - if (!buffer) - return; - - if (imesa->dirty & ~I810_UPLOAD_CLIPRECTS) - i810EmitHwStateLocked( imesa ); - - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "i810FlushVerticesLocked, used %d\n", - buffer->used); - - imesa->vertex_dma_buffer = 0; + + if (imesa->dirty) + emit_state( imesa ); vertex.idx = buffer->idx; - vertex.used = buffer->used; + vertex.used = imesa->vertex_low; vertex.discard = 0; + sarea->vertex_prim = imesa->hw_primitive; - if (!nbox) + if (!nbox) { vertex.used = 0; - - if (nbox > I810_NR_SAREA_CLIPRECTS) - imesa->dirty |= I810_UPLOAD_CLIPRECTS; - - if(imesa->i810Screen->use_copy_buf == 1 && vertex.used) { - drm_i810_copy_t copy; - - copy.idx = buffer->idx; - copy.used = buffer->used; - copy.address = buffer->address; - ioctl(imesa->driFd, DRM_IOCTL_I810_COPY, ©); } - - - imesa->sarea->vertex_prim = imesa->vertex_prim; + else if (nbox > I810_NR_SAREA_CLIPRECTS) { + imesa->upload_cliprects = GL_TRUE; + } - if (!nbox || !(imesa->dirty & I810_UPLOAD_CLIPRECTS)) + if (!nbox || !imesa->upload_cliprects) { if (nbox == 1) - imesa->sarea->nbox = 0; + sarea->nbox = 0; else - imesa->sarea->nbox = nbox; + sarea->nbox = nbox; - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "DRM_IOCTL_I810_VERTEX CASE1 nbox %d used %d\n", - nbox, vertex.used); - - vertex.discard = 1; - ioctl(imesa->driFd, DRM_IOCTL_I810_VERTEX, &vertex); - age_imesa(imesa, imesa->sarea->last_enqueue); + vertex.discard = 1; + drmCommandWrite(imesa->driFd, DRM_I810_VERTEX, + &vertex, sizeof(drmI810Vertex)); + age_imesa(imesa, sarea->last_enqueue); } else { for (i = 0 ; i < nbox ; ) { int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, nbox); - drm_clip_rect_t *b = imesa->sarea->boxes; + XF86DRIClipRectPtr b = sarea->boxes; if (imesa->scissor) { - imesa->sarea->nbox = 0; + sarea->nbox = 0; for ( ; i < nr ; i++) { b->x1 = pbox[i].x1 - imesa->drawX; @@ -395,19 +379,19 @@ b->y2 = pbox[i].y2 - imesa->drawY; if (intersect_rect(b, b, &imesa->scissor_rect)) { - imesa->sarea->nbox++; + sarea->nbox++; b++; } } /* Culled? */ - if (!imesa->sarea->nbox) { + if (!sarea->nbox) { if (nr < nbox) continue; vertex.used = 0; } } else { - imesa->sarea->nbox = nr - i; + sarea->nbox = nr - i; for ( ; i < nr ; i++, b++) { b->x1 = pbox[i].x1 - imesa->drawX; b->y1 = pbox[i].y1 - imesa->drawY; @@ -420,67 +404,71 @@ */ if (nr == nbox) vertex.discard = 1; - - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "DRM_IOCTL_I810_VERTEX nbox %d used %d\n", - nbox, vertex.used); - ioctl(imesa->driFd, DRM_IOCTL_I810_VERTEX, &vertex); + drmCommandWrite(imesa->driFd, DRM_I810_VERTEX, + &vertex, sizeof(drmI810Vertex)); age_imesa(imesa, imesa->sarea->last_enqueue); } } + /* Reset imesa vars: + */ + imesa->vertex_buffer = 0; + imesa->vertex_addr = 0; + imesa->vertex_low = 0; + imesa->vertex_high = 0; + imesa->vertex_last_prim = 0; imesa->dirty = 0; - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "finished i810FlushVerticesLocked\n"); + imesa->upload_cliprects = GL_FALSE; } - -GLuint *i810AllocDwords( i810ContextPtr imesa, int dwords ) +void i810FlushPrimsGetBuffer( i810ContextPtr imesa ) { - GLuint *start; + LOCK_HARDWARE(imesa); - if (!imesa->vertex_dma_buffer) - { - LOCK_HARDWARE(imesa); - imesa->vertex_dma_buffer = i810_get_buffer_ioctl( imesa ); - UNLOCK_HARDWARE(imesa); - } - else if (imesa->vertex_dma_buffer->used + dwords * 4 > - imesa->vertex_dma_buffer->total) - { - LOCK_HARDWARE(imesa); - i810FlushVerticesLocked( imesa ); - imesa->vertex_dma_buffer = i810_get_buffer_ioctl( imesa ); - UNLOCK_HARDWARE(imesa); - } + if (imesa->vertex_buffer) + i810FlushPrimsLocked( imesa ); + + imesa->vertex_buffer = i810_get_buffer_ioctl( imesa ); + imesa->vertex_high = imesa->vertex_buffer->total; + imesa->vertex_addr = (char *)imesa->vertex_buffer->address; + imesa->vertex_low = 4; /* leave room for instruction header */ + imesa->vertex_last_prim = imesa->vertex_low; + UNLOCK_HARDWARE(imesa); +} - start = (GLuint *)((char *)imesa->vertex_dma_buffer->address + - imesa->vertex_dma_buffer->used); - imesa->vertex_dma_buffer->used += dwords * 4; - return start; +void i810FlushPrims( i810ContextPtr imesa ) +{ + if (imesa->vertex_buffer) { + LOCK_HARDWARE( imesa ); + i810FlushPrimsLocked( imesa ); + UNLOCK_HARDWARE( imesa ); + } } + + int i810_check_copy(int fd) { - return(ioctl(fd, DRM_IOCTL_I810_DOCOPY)); + return(drmCommandNone(fd, DRM_I810_DOCOPY)); } -static void i810DDFlush( GLcontext *ctx ) +static void i810Flush( GLcontext *ctx ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); - FLUSH_BATCH( imesa ); + I810_FIREVERTICES( imesa ); } -static void i810DDFinish( GLcontext *ctx ) +static void i810Finish( GLcontext *ctx ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); i810DmaFinish( imesa ); } -void i810DDInitIoctlFuncs( GLcontext *ctx ) +void i810InitIoctlFuncs( GLcontext *ctx ) { - ctx->Driver.Flush = i810DDFlush; - ctx->Driver.Finish = i810DDFinish; + ctx->Driver.Flush = i810Flush; + ctx->Driver.Clear = i810Clear; + ctx->Driver.Finish = i810Finish; } Index: xc/lib/GL/mesa/src/drv/i810/i810ioctl.h diff -u xc/lib/GL/mesa/src/drv/i810/i810ioctl.h:1.5 xc/lib/GL/mesa/src/drv/i810/i810ioctl.h:1.7 --- xc/lib/GL/mesa/src/drv/i810/i810ioctl.h:1.5 Tue Oct 24 18:45:01 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810ioctl.h Wed Oct 30 07:51:33 2002 @@ -1,69 +1,49 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810ioctl.h,v 1.5 2000/10/24 22:45:01 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810ioctl.h,v 1.7 2002/10/30 12:51:33 alanh Exp $ */ #ifndef I810_IOCTL_H #define I810_IOCTL_H #include "i810context.h" +void i810EmitPrim( i810ContextPtr imesa ); +void i810FlushPrims( i810ContextPtr mmesa ); +void i810FlushPrimsLocked( i810ContextPtr mmesa ); +void i810FlushPrimsGetBuffer( i810ContextPtr imesa ); -GLuint *i810AllocDwords( i810ContextPtr imesa, int dwords ); - -void i810GetGeneralDmaBufferLocked( i810ContextPtr mmesa ); - -void i810FlushVertices( i810ContextPtr mmesa ); -void i810FlushVerticesLocked( i810ContextPtr mmesa ); - -void i810FlushGeneralLocked( i810ContextPtr imesa ); void i810WaitAgeLocked( i810ContextPtr imesa, int age ); void i810WaitAge( i810ContextPtr imesa, int age ); - void i810DmaFinish( i810ContextPtr imesa ); - void i810RegetLockQuiescent( i810ContextPtr imesa ); - -void i810DDInitIoctlFuncs( GLcontext *ctx ); - -void i810SwapBuffers( i810ContextPtr imesa ); - +void i810InitIoctlFuncs( GLcontext *ctx ); +void i810CopyBuffer( const __DRIdrawablePrivate *dpriv ); +void i810PageFlip( const __DRIdrawablePrivate *dpriv ); int i810_check_copy(int fd); -GLbitfield i810Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ); +#define I810_STATECHANGE(imesa, flag) \ +do { \ + if (imesa->vertex_low != imesa->vertex_last_prim) \ + i810FlushPrims(imesa); \ + imesa->dirty |= flag; \ +} while (0) \ -#define FLUSH_BATCH(imesa) do { \ - if (I810_DEBUG&DEBUG_VERBOSE_IOCTL) \ - fprintf(stderr, "FLUSH_BATCH in %s\n", __FUNCTION__); \ - if (imesa->vertex_dma_buffer) i810FlushVertices(imesa); \ -} while (0) -extern drmBufPtr i810_get_buffer_ioctl( i810ContextPtr imesa ); +#define I810_FIREVERTICES(imesa) \ +do { \ + if (imesa->vertex_buffer) { \ + i810FlushPrims(imesa); \ + } \ +} while (0) -static __inline -GLuint *i810AllocDwordsInline( i810ContextPtr imesa, int dwords ) +static __inline GLuint *i810AllocDmaLow( i810ContextPtr imesa, int bytes ) { - int bytes = dwords * 4; - GLuint *start; + if (imesa->vertex_low + bytes > imesa->vertex_high) + i810FlushPrimsGetBuffer( imesa ); - if (!imesa->vertex_dma_buffer) { - LOCK_HARDWARE(imesa); - imesa->vertex_dma_buffer = i810_get_buffer_ioctl( imesa ); - UNLOCK_HARDWARE(imesa); - } - else if (imesa->vertex_dma_buffer->used + bytes > - imesa->vertex_dma_buffer->total) - { - LOCK_HARDWARE(imesa); - i810FlushVerticesLocked( imesa ); - imesa->vertex_dma_buffer = i810_get_buffer_ioctl( imesa ); - UNLOCK_HARDWARE(imesa); + GLuint *start = (GLuint *)(imesa->vertex_addr + imesa->vertex_low); + imesa->vertex_low += bytes; + return start; } - - start = (GLuint *)((char *)imesa->vertex_dma_buffer->address + - imesa->vertex_dma_buffer->used); - - imesa->vertex_dma_buffer->used += bytes; - return start; } #endif Index: xc/lib/GL/mesa/src/drv/i810/i810log.h diff -u xc/lib/GL/mesa/src/drv/i810/i810log.h:1.1 xc/lib/GL/mesa/src/drv/i810/i810log.h:removed --- xc/lib/GL/mesa/src/drv/i810/i810log.h:1.1 Fri Feb 11 12:25:30 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810log.h Thu Feb 27 12:26:24 2003 @@ -1,47 +0,0 @@ -/* - * GLX Hardware Device Driver for Matrox Millenium G200 - * Copyright (C) 1999 Wittawat Yamwong - * - * 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 - * 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. - * - * - * Wittawat Yamwong - */ - -/* Usage: - * - use i810Error for error messages. Always write to X error and log file. - * - use i810Msg for debugging. Can be disabled by undefining I810_LOG_ENABLED. - */ - -#ifndef I810LOG_INC -#define I810LOG_INC -#include "hwlog.h" - -/* Mapping between old function names and new common code: */ -/* (Feel free to replace all i810Msg with hwMsg etc. in all *.c - * files, I was to lazy to do this...) */ -#define i810OpenLog(f) hwOpenLog(f,"[i810] ") -#define i810CloseLog hwCloseLog -#define i810IsLogReady hwIsLogReady -#define i810SetLogLevel hwSetLogLevel -#define i810GetLogLevel hwGetLogLevel -#define i810Msg hwMsg -#define i810Error hwError - -#endif Index: xc/lib/GL/mesa/src/drv/i810/i810pipeline.c diff -u xc/lib/GL/mesa/src/drv/i810/i810pipeline.c:1.2 xc/lib/GL/mesa/src/drv/i810/i810pipeline.c:removed --- xc/lib/GL/mesa/src/drv/i810/i810pipeline.c:1.2 Fri Jun 16 20:02:59 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810pipeline.c Thu Feb 27 12:26:24 2003 @@ -1,114 +0,0 @@ -/* #include "i810pipeline.h" */ - -#include - -#include "types.h" -#include "fog.h" - -#include "i810vb.h" -#include "i810dd.h" -#include "i810tris.h" -#include "i810pipeline.h" - - -static struct gl_pipeline_stage i810_fast_stage = { - "I810 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, - i810DDFastPath -}; - - -#define ILLEGAL_ENABLES (TEXTURE0_3D| \ - TEXTURE1_3D| \ - ENABLE_TEXMAT0 | \ - ENABLE_TEXMAT1 | \ - ENABLE_TEXGEN0 | \ - ENABLE_TEXGEN1 | \ - 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 i810DDBuildPrecalcPipeline( GLcontext *ctx ) -{ - i810ContextPtr imesa = I810_CONTEXT( ctx ); - struct gl_pipeline *pipe = &ctx->CVA.pre; - - if (imesa->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] = &i810_fast_stage; - pipe->stages[1] = 0; - pipe->new_inputs = ctx->RenderFlags & VERT_DATA; - pipe->ops = pipe->stages[0]->ops; - imesa->using_fast_path = 1; - return 1; - } - - if (imesa->using_fast_path) - { - imesa->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; -} - - - -GLuint i810DDRegisterPipelineStages( 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_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 = i810DDCheckPartialRasterSetup; - out[o].run = i810DDPartialRasterSetup; - o++; - break; - - case PIPE_OP_RAST_SETUP_0|PIPE_OP_RAST_SETUP_1: - out[o] = in[i]; - out[o].run = i810DDDoRasterSetup; - o++; - break; - - /* 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; - - - default: - out[o++] = in[i]; - break; - } - } - - return o; -} - - Index: xc/lib/GL/mesa/src/drv/i810/i810pipeline.h diff -u xc/lib/GL/mesa/src/drv/i810/i810pipeline.h:1.1 xc/lib/GL/mesa/src/drv/i810/i810pipeline.h:removed --- xc/lib/GL/mesa/src/drv/i810/i810pipeline.h:1.1 Fri Feb 11 12:25:31 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810pipeline.h Thu Feb 27 12:26:24 2003 @@ -1,14 +0,0 @@ -#ifndef _I810_PIPELINE_H -#define _I810_PIPELINE_H - -extern GLuint i810DDRegisterPipelineStages( struct gl_pipeline_stage *out, - const struct gl_pipeline_stage *in, - GLuint nr ); - -extern GLboolean i810DDBuildPrecalcPipeline( GLcontext *ctx ); - -extern void i810DDFastPath( struct vertex_buffer *VB ); -extern void i810DDFastPathInit( void ); - - -#endif Index: xc/lib/GL/mesa/src/drv/i810/i810render.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i810/i810render.c:1.2 --- /dev/null Thu Feb 27 12:26:24 2003 +++ xc/lib/GL/mesa/src/drv/i810/i810render.c Wed Oct 30 07:51:33 2002 @@ -0,0 +1,215 @@ +/* + * Intel i810 DRI driver for Mesa 3.5 + * + * Copyright (C) 1999-2000 Keith Whitwell 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 KEITH WHITWELL 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. + * + * Author: + * Keith Whitwell + */ + + +/* + * Render unclipped vertex buffers by emitting vertices directly to + * dma buffers. Use strip/fan hardware acceleration where possible. + * + */ +#include "glheader.h" +#include "context.h" +#include "macros.h" +#include "mem.h" +#include "mtypes.h" +#include "mmath.h" + +#include "tnl/t_context.h" + +#include "i810screen.h" +#include "i810_dri.h" + +#include "i810context.h" +#include "i810tris.h" +#include "i810state.h" +#include "i810vb.h" +#include "i810ioctl.h" + +/* + * Render unclipped vertex buffers by emitting vertices directly to + * dma buffers. Use strip/fan hardware primitives where possible. + * Try to simulate missing primitives with indexed vertices. + */ +#define HAVE_POINTS 0 +#define HAVE_LINES 1 +#define HAVE_LINE_STRIPS 1 +#define HAVE_TRIANGLES 1 +#define HAVE_TRI_STRIPS 1 +#define HAVE_TRI_STRIP_1 0 /* has it, template can't use it yet */ +#define HAVE_TRI_FANS 1 +#define HAVE_POLYGONS 1 +#define HAVE_QUADS 0 +#define HAVE_QUAD_STRIPS 0 + +#define HAVE_ELTS 0 + + +static GLuint hw_prim[GL_POLYGON+1] = { + 0, + PR_LINES, + 0, + PR_LINESTRIP, + PR_TRIANGLES, + PR_TRISTRIP_0, + PR_TRIFAN, + 0, + 0, + PR_POLYGON +}; + +static const GLenum reduced_prim[GL_POLYGON+1] = { + GL_POINTS, + GL_LINES, + GL_LINES, + GL_LINES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES +}; + +/* Fallback to normal rendering. + */ +static void VERT_FALLBACK( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.PrimitiveNotify( ctx, flags & PRIM_MODE_MASK ); + tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 ); + tnl->Driver.Render.PrimTabVerts[flags&PRIM_MODE_MASK]( ctx, start, + count, flags ); + I810_CONTEXT(ctx)->SetupNewInputs = VERT_CLIP; +} + + + +#define LOCAL_VARS i810ContextPtr imesa = I810_CONTEXT(ctx) +#define INIT( prim ) do { \ + I810_STATECHANGE(imesa, 0); \ + i810RasterPrimitive( ctx, reduced_prim[prim], hw_prim[prim] ); \ +} while (0) +#define NEW_PRIMITIVE() I810_STATECHANGE( imesa, 0 ) +#define NEW_BUFFER() I810_FIREVERTICES( imesa ) +#define GET_CURRENT_VB_MAX_VERTS() \ + (((int)imesa->vertex_high - (int)imesa->vertex_low) / (imesa->vertex_size*4)) +#define GET_SUBSEQUENT_VB_MAX_VERTS() \ + (I810_DMA_BUF_SZ-4) / (imesa->vertex_size * 4) + + +#define EMIT_VERTS( ctx, j, nr ) \ + i810_emit_contiguous_verts(ctx, j, (j)+(nr)) + + +#define TAG(x) i810_##x +#include "tnl_dd/t_dd_dmatmp.h" + + +/**********************************************************************/ +/* Render pipeline stage */ +/**********************************************************************/ + + +static GLboolean i810_run_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint i, length, flags = 0; + + /* Don't handle clipping or indexed vertices. + */ + if (VB->ClipOrMask || imesa->RenderIndex != 0 || VB->Elts) { + return GL_TRUE; + } + + imesa->SetupNewInputs = VERT_CLIP; + + tnl->Driver.Render.Start( ctx ); + + for (i = VB->FirstPrimitive ; !(flags & PRIM_LAST) ; i += length) + { + flags = VB->Primitive[i]; + length= VB->PrimitiveLength[i]; + if (length) + i810_render_tab_verts[flags & PRIM_MODE_MASK]( ctx, i, i + length, + flags ); + } + + tnl->Driver.Render.Finish( ctx ); + + return GL_FALSE; /* finished the pipe */ +} + + +static void i810_check_render( GLcontext *ctx, struct gl_pipeline_stage *stage ) +{ + GLuint inputs = VERT_CLIP|VERT_RGBA; + + if (ctx->RenderMode == GL_RENDER) { + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + inputs |= VERT_SPEC_RGB; + + if (ctx->Texture.Unit[0]._ReallyEnabled) + inputs |= VERT_TEX(0); + + if (ctx->Texture.Unit[1]._ReallyEnabled) + inputs |= VERT_TEX(1); + + if (ctx->Fog.Enabled) + inputs |= VERT_FOG_COORD; + } + + stage->inputs = inputs; +} + + +static void dtr( struct gl_pipeline_stage *stage ) +{ + (void)stage; +} + + +const struct gl_pipeline_stage _i810_render_stage = +{ + "i810 render", + (_DD_NEW_SEPARATE_SPECULAR | + _NEW_TEXTURE| + _NEW_FOG| + _NEW_RENDERMODE), /* re-check (new inputs) */ + 0, /* re-run (always runs) */ + GL_TRUE, /* active */ + 0, 0, /* inputs (set in check_render), outputs */ + 0, 0, /* changed_inputs, private */ + dtr, /* destructor */ + i810_check_render, /* check - initially set to alloc data */ + i810_run_render /* run */ +}; Index: xc/lib/GL/mesa/src/drv/i810/i810screen.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i810/i810screen.c:1.2 --- /dev/null Thu Feb 27 12:26:24 2003 +++ xc/lib/GL/mesa/src/drv/i810/i810screen.c Wed Oct 30 07:51:33 2002 @@ -0,0 +1,322 @@ +/************************************************************************** + +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/i810/i810screen.c,v 1.2 2002/10/30 12:51:33 alanh Exp $ */ + +/* + * Authors: + * Keith Whitwell + * + */ + + +#include +#include + +#include "glheader.h" +#include "context.h" +#include "matrix.h" +#include "simple_list.h" + +#include "i810screen.h" +#include "i810_dri.h" + +#include "i810state.h" +#include "i810tex.h" +#include "i810span.h" +#include "i810tris.h" +#include "i810ioctl.h" + + + +/* static int i810_malloc_proxy_buf(drmBufMapPtr buffers) */ +/* { */ +/* char *buffer; */ +/* drmBufPtr buf; */ +/* int i; */ + +/* buffer = Xmalloc(I810_DMA_BUF_SZ); */ +/* if(buffer == NULL) return -1; */ +/* for(i = 0; i < I810_DMA_BUF_NR; i++) { */ +/* buf = &(buffers->list[i]); */ +/* buf->address = (drmAddress)buffer; */ +/* } */ +/* return 0; */ +/* } */ + +static drmBufMapPtr i810_create_empty_buffers(void) +{ + drmBufMapPtr retval; + + retval = (drmBufMapPtr)Xmalloc(sizeof(drmBufMap)); + if(retval == NULL) return NULL; + memset(retval, 0, sizeof(drmBufMap)); + retval->list = (drmBufPtr)Xmalloc(sizeof(drmBuf) * I810_DMA_BUF_NR); + if(retval->list == NULL) { + Xfree(retval); + return NULL; + } + memset(retval->list, 0, sizeof(drmBuf) * I810_DMA_BUF_NR); + return retval; +} + + +static GLboolean +i810InitDriver(__DRIscreenPrivate *sPriv) +{ + i810ScreenPrivate *i810Screen; + I810DRIPtr gDRIPriv = (I810DRIPtr)sPriv->pDevPriv; + + /* Check the DRI version */ + { + int major, minor, patch; + if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) { + if (major != 4 || minor < 0) { + __driUtilMessage("i810 DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); + return GL_FALSE; + } + } + } + + /* Check that the DDX driver version is compatible */ + if (sPriv->ddxMajor != 1 || + sPriv->ddxMinor < 0) { + __driUtilMessage("i810 DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if (sPriv->drmMajor != 1 || + sPriv->drmMinor < 2) { + __driUtilMessage("i810 DRI driver expected DRM driver version 1.2.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); + return GL_FALSE; + } + + /* Allocate the private area */ + i810Screen = (i810ScreenPrivate *)Xmalloc(sizeof(i810ScreenPrivate)); + if (!i810Screen) { + __driUtilMessage("i810InitDriver: alloc i810ScreenPrivate struct failed"); + return GL_FALSE; + } + + i810Screen->driScrnPriv = sPriv; + sPriv->private = (void *)i810Screen; + + i810Screen->deviceID=gDRIPriv->deviceID; + i810Screen->width=gDRIPriv->width; + i810Screen->height=gDRIPriv->height; + i810Screen->mem=gDRIPriv->mem; + i810Screen->cpp=gDRIPriv->cpp; + i810Screen->fbStride=gDRIPriv->fbStride; + i810Screen->fbOffset=gDRIPriv->fbOffset; + + if (gDRIPriv->bitsPerPixel == 15) + i810Screen->fbFormat = DV_PF_555; + else + i810Screen->fbFormat = DV_PF_565; + + i810Screen->backOffset=gDRIPriv->backOffset; + i810Screen->depthOffset=gDRIPriv->depthOffset; + i810Screen->backPitch = gDRIPriv->auxPitch; + i810Screen->backPitchBits = gDRIPriv->auxPitchBits; + i810Screen->textureOffset=gDRIPriv->textureOffset; + i810Screen->textureSize=gDRIPriv->textureSize; + i810Screen->logTextureGranularity = gDRIPriv->logTextureGranularity; + + i810Screen->bufs = i810_create_empty_buffers(); + if (i810Screen->bufs == NULL) { + __driUtilMessage("i810InitDriver: i810_create_empty_buffers() failed"); + Xfree(i810Screen); + return GL_FALSE; + } + + i810Screen->back.handle = gDRIPriv->backbuffer; + i810Screen->back.size = gDRIPriv->backbufferSize; + + if (drmMap(sPriv->fd, + i810Screen->back.handle, + i810Screen->back.size, + (drmAddress *)&i810Screen->back.map) != 0) { + Xfree(i810Screen); + sPriv->private = NULL; + __driUtilMessage("i810InitDriver: drmMap failed"); + return GL_FALSE; + } + + i810Screen->depth.handle = gDRIPriv->depthbuffer; + i810Screen->depth.size = gDRIPriv->depthbufferSize; + + if (drmMap(sPriv->fd, + i810Screen->depth.handle, + i810Screen->depth.size, + (drmAddress *)&i810Screen->depth.map) != 0) { + Xfree(i810Screen); + drmUnmap(i810Screen->back.map, i810Screen->back.size); + sPriv->private = NULL; + __driUtilMessage("i810InitDriver: drmMap (2) failed"); + return GL_FALSE; + } + + i810Screen->tex.handle = gDRIPriv->textures; + i810Screen->tex.size = gDRIPriv->textureSize; + + if (drmMap(sPriv->fd, + i810Screen->tex.handle, + i810Screen->tex.size, + (drmAddress *)&i810Screen->tex.map) != 0) { + Xfree(i810Screen); + drmUnmap(i810Screen->back.map, i810Screen->back.size); + drmUnmap(i810Screen->depth.map, i810Screen->depth.size); + sPriv->private = NULL; + __driUtilMessage("i810InitDriver: drmMap (3) failed"); + return GL_FALSE; + } + + i810Screen->sarea_priv_offset = gDRIPriv->sarea_priv_offset; + + return GL_TRUE; +} + +static void +i810DestroyScreen(__DRIscreenPrivate *sPriv) +{ + i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private; + + /* Need to unmap all the bufs and maps here: + */ + drmUnmap(i810Screen->back.map, i810Screen->back.size); + drmUnmap(i810Screen->depth.map, i810Screen->depth.size); + drmUnmap(i810Screen->tex.map, i810Screen->tex.size); + + Xfree(i810Screen); + sPriv->private = NULL; +} + + +static GLboolean +i810CreateBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap ) +{ + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } + else { + driDrawPriv->driverPrivate = (void *) + _mesa_create_framebuffer(mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->stencilBits > 0, + mesaVis->accumRedBits > 0, + GL_FALSE /* s/w alpha planes */); + return (driDrawPriv->driverPrivate != NULL); + } +} + + +static void +i810DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +{ + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); +} + + +#if 0 +/* Initialize the fullscreen mode. + */ +GLboolean +XMesaOpenFullScreen( __DRIcontextPrivate *driContextPriv ) +{ + i810ContextPtr imesa = (i810ContextPtr)driContextPriv->driverPrivate; + imesa->doPageFlip = 1; + imesa->currentPage = 0; + return GL_TRUE; +} + +/* Shut down the fullscreen mode. + */ +GLboolean +XMesaCloseFullScreen( __DRIcontextPrivate *driContextPriv ) +{ + i810ContextPtr imesa = (i810ContextPtr)driContextPriv->driverPrivate; + + if (imesa->currentPage == 1) { + /* Move the frontbuffer image to page zero? */ +/* i810SwapBuffers( imesa ); */ + i810PageFlip( imesa ); + imesa->currentPage = 0; + } + + imesa->doPageFlip = GL_FALSE; + imesa->Setup[I810_DESTREG_DI0] = imesa->driScreen->front_offset; + return GL_TRUE; +} + +#else + +static GLboolean +i810OpenFullScreen(__DRIcontextPrivate *driContextPriv) +{ + return GL_TRUE; +} + +static GLboolean +i810CloseFullScreen(__DRIcontextPrivate *driContextPriv) +{ + return GL_TRUE; +} + +#endif + + +static struct __DriverAPIRec i810API = { + i810InitDriver, + i810DestroyScreen, + i810CreateContext, + i810DestroyContext, + i810CreateBuffer, + i810DestroyBuffer, + i810SwapBuffers, + i810MakeCurrent, + i810UnbindContext, + i810OpenFullScreen, + i810CloseFullScreen +}; + + +/* + * This is the bootstrap function for the driver. + * The __driCreateScreen name is the symbol that libGL.so fetches. + * Return: pointer to a __DRIscreenPrivate. + */ +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) +{ + __DRIscreenPrivate *psp; + psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &i810API); + return (void *) psp; +} Index: xc/lib/GL/mesa/src/drv/i810/i810screen.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i810/i810screen.h:1.2 --- /dev/null Thu Feb 27 12:26:24 2003 +++ xc/lib/GL/mesa/src/drv/i810/i810screen.h Wed Oct 30 07:51:33 2002 @@ -0,0 +1,99 @@ +/************************************************************************** + +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: + * Keith Whitwell + * + */ + +#ifndef _I810_INIT_H_ +#define _I810_INIT_H_ + +#include +#include "dri_util.h" + +typedef struct { + drmHandle handle; + drmSize size; + char *map; +} i810Region, *i810RegionPtr; + +typedef struct { + i810Region front; + i810Region back; + i810Region depth; + i810Region tex; + + int deviceID; + int width; + int height; + int mem; + + int cpp; /* for front and back buffers */ + int bitsPerPixel; + + int fbFormat; + int fbOffset; + int fbStride; + + int backOffset; + int depthOffset; + + int backPitch; + int backPitchBits; + + int textureOffset; + int textureSize; + int logTextureGranularity; + + __DRIscreenPrivate *driScrnPriv; + drmBufMapPtr bufs; + unsigned int sarea_priv_offset; +} i810ScreenPrivate; + + +extern GLboolean +i810CreateContext( Display *dpy, const __GLcontextModes *mesaVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ); + +extern void +i810DestroyContext(__DRIcontextPrivate *driContextPriv); + +extern GLboolean +i810UnbindContext(__DRIcontextPrivate *driContextPriv); + +extern GLboolean +i810MakeCurrent(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv); + +extern void +i810SwapBuffers(Display *dpy, void *drawablePrivate); + +#endif Index: xc/lib/GL/mesa/src/drv/i810/i810span.c diff -u xc/lib/GL/mesa/src/drv/i810/i810span.c:1.3 xc/lib/GL/mesa/src/drv/i810/i810span.c:1.5 --- xc/lib/GL/mesa/src/drv/i810/i810span.c:1.3 Wed Mar 21 11:14:21 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810span.c Wed Oct 30 07:51:33 2002 @@ -1,8 +1,13 @@ -#include "types.h" -#include "i810dd.h" -#include "i810log.h" +#include "glheader.h" +#include "macros.h" +#include "mtypes.h" + +#include "i810screen.h" +#include "i810_dri.h" + #include "i810span.h" #include "i810ioctl.h" +#include "swrast/swrast.h" #define DBG 0 @@ -12,13 +17,13 @@ i810ScreenPrivate *i810Screen = imesa->i810Screen; \ GLuint pitch = i810Screen->backPitch; \ GLuint height = dPriv->h; \ + GLushort p; \ char *buf = (char *)(imesa->drawMap + \ dPriv->x * 2 + \ dPriv->y * pitch); \ char *read_buf = (char *)(imesa->readMap + \ dPriv->x * 2 + \ - dPriv->y * pitch); \ - GLushort p = I810_CONTEXT( ctx )->MonoColor; \ + dPriv->y * pitch); \ (void) read_buf; (void) buf; (void) p #define LOCAL_DEPTH_VARS \ @@ -30,7 +35,8 @@ dPriv->x * 2 + \ dPriv->y * pitch) -#define INIT_MONO_PIXEL(p) +#define INIT_MONO_PIXEL(p, color) \ + p = PACK_COLOR_565( color[0], color[1], color[2] ) #define CLIPPIXEL(_x,_y) (_x >= minx && _x < maxx && \ _y >= miny && _y < maxy) @@ -50,7 +56,7 @@ #define HW_LOCK() \ i810ContextPtr imesa = I810_CONTEXT(ctx); \ - FLUSH_BATCH(imesa); \ + I810_FIREVERTICES(imesa); \ i810DmaFinish(imesa); \ LOCK_HARDWARE_QUIESCENT(imesa); @@ -84,13 +90,13 @@ #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 >> 11) & 0x1f) * 255) / 31; \ - rgba[1] = (((p >> 5) & 0x3f) * 255) / 63; \ - rgba[2] = (((p >> 0) & 0x1f) * 255) / 31; \ - rgba[3] = 255; \ +#define READ_RGBA( rgba, _x, _y ) \ +do { \ + GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \ + rgba[0] = ((p >> 8) & 0xf8) * 255 / 0xf8; \ + rgba[1] = ((p >> 3) & 0xfc) * 255 / 0xfc; \ + rgba[2] = ((p << 3) & 0xf8) * 255 / 0xf8; \ + rgba[3] = 255; \ } while(0) #define TAG(x) i810##x##_565 @@ -98,32 +104,6 @@ - -/* 15 bit, 555 rgb color spanline and pixel functions - */ -#define WRITE_RGBA( _x, _y, r, g, b, a ) \ - *(GLushort *)(buf + _x*2 + _y*pitch) = (((r & 0xf8) << 7) | \ - ((g & 0xf8) << 3) | \ - ((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 >> 7) & 0xf8; \ - rgba[1] = (p >> 3) & 0xf8; \ - rgba[2] = (p << 3) & 0xf8; \ - rgba[3] = 255; \ -} while(0) - -#define TAG(x) i810##x##_555 -#include "spantmp.h" - - - - /* 16 bit depthbuffer functions. */ #define WRITE_DEPTH( _x, _y, d ) \ @@ -132,43 +112,43 @@ #define READ_DEPTH( d, _x, _y ) \ d = *(GLushort *)(buf + _x*2 + _y*pitch); -/* d = 0xffff; */ - #define TAG(x) i810##x##_16 #include "depthtmp.h" - -void i810DDInitSpanFuncs( GLcontext *ctx ) +static void i810SetReadBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, + GLenum mode ) { - if (1) { - ctx->Driver.WriteRGBASpan = i810WriteRGBASpan_565; - ctx->Driver.WriteRGBSpan = i810WriteRGBSpan_565; - ctx->Driver.WriteMonoRGBASpan = i810WriteMonoRGBASpan_565; - ctx->Driver.WriteRGBAPixels = i810WriteRGBAPixels_565; - ctx->Driver.WriteMonoRGBAPixels = i810WriteMonoRGBAPixels_565; - ctx->Driver.ReadRGBASpan = i810ReadRGBASpan_565; - ctx->Driver.ReadRGBAPixels = i810ReadRGBAPixels_565; - } else { - ctx->Driver.WriteRGBASpan = i810WriteRGBASpan_555; - ctx->Driver.WriteRGBSpan = i810WriteRGBSpan_555; - ctx->Driver.WriteMonoRGBASpan = i810WriteMonoRGBASpan_555; - ctx->Driver.WriteRGBAPixels = i810WriteRGBAPixels_555; - ctx->Driver.WriteMonoRGBAPixels = i810WriteMonoRGBAPixels_555; - ctx->Driver.ReadRGBASpan = i810ReadRGBASpan_555; - ctx->Driver.ReadRGBAPixels = i810ReadRGBAPixels_555; + i810ContextPtr imesa = I810_CONTEXT(ctx); + + if (mode == GL_FRONT_LEFT) { + imesa->readMap = (char *)imesa->driScreen->pFB; + } + else if (mode == GL_BACK_LEFT) { + imesa->readMap = imesa->i810Screen->back.map; } + else { + ASSERT(0); + } +} + + +void i810InitSpanFuncs( GLcontext *ctx ) +{ + struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); + + swdd->SetReadBuffer = i810SetReadBuffer; - ctx->Driver.ReadDepthSpan = i810ReadDepthSpan_16; - ctx->Driver.WriteDepthSpan = i810WriteDepthSpan_16; - ctx->Driver.ReadDepthPixels = i810ReadDepthPixels_16; - ctx->Driver.WriteDepthPixels = i810WriteDepthPixels_16; - - 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; + swdd->WriteRGBASpan = i810WriteRGBASpan_565; + swdd->WriteRGBSpan = i810WriteRGBSpan_565; + swdd->WriteMonoRGBASpan = i810WriteMonoRGBASpan_565; + swdd->WriteRGBAPixels = i810WriteRGBAPixels_565; + swdd->WriteMonoRGBAPixels = i810WriteMonoRGBAPixels_565; + swdd->ReadRGBASpan = i810ReadRGBASpan_565; + swdd->ReadRGBAPixels = i810ReadRGBAPixels_565; + + swdd->ReadDepthSpan = i810ReadDepthSpan_16; + swdd->WriteDepthSpan = i810WriteDepthSpan_16; + swdd->ReadDepthPixels = i810ReadDepthPixels_16; + swdd->WriteDepthPixels = i810WriteDepthPixels_16; } Index: xc/lib/GL/mesa/src/drv/i810/i810span.h diff -u xc/lib/GL/mesa/src/drv/i810/i810span.h:1.1 xc/lib/GL/mesa/src/drv/i810/i810span.h:1.2 --- xc/lib/GL/mesa/src/drv/i810/i810span.h:1.1 Fri Feb 11 12:25:31 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810span.h Fri Feb 22 16:33:04 2002 @@ -1,6 +1,6 @@ #ifndef _I810_SPAN_H #define _I810_SPAN_H -extern void i810DDInitSpanFuncs( GLcontext *ctx ); +extern void i810InitSpanFuncs( GLcontext *ctx ); #endif Index: xc/lib/GL/mesa/src/drv/i810/i810state.c diff -u xc/lib/GL/mesa/src/drv/i810/i810state.c:1.6 xc/lib/GL/mesa/src/drv/i810/i810state.c:1.9 --- xc/lib/GL/mesa/src/drv/i810/i810state.c:1.6 Wed Mar 21 11:14:21 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810state.c Wed Oct 30 07:51:33 2002 @@ -1,33 +1,41 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810state.c,v 1.6 2001/03/21 16:14:21 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810state.c,v 1.9 2002/10/30 12:51:33 alanh Exp $ */ #include -#include "types.h" +#include "glheader.h" +#include "context.h" +#include "macros.h" #include "enums.h" -#include "pb.h" #include "dd.h" #include "mm.h" -#include "i810dd.h" + +#include "i810screen.h" +#include "i810_dri.h" + #include "i810context.h" #include "i810state.h" #include "i810tex.h" -#include "i810log.h" #include "i810vb.h" #include "i810tris.h" #include "i810ioctl.h" + +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "swrast_setup/swrast_setup.h" - +#include "tnl/t_pipeline.h" -static __inline__ GLuint i810PackColor(GLuint format, - GLubyte r, GLubyte g, +static __inline__ GLuint i810PackColor(GLuint format, + GLubyte r, GLubyte g, GLubyte b, GLubyte a) { switch (format) { case DV_PF_555: - return I810PACKCOLOR1555(r,g,b,a); + return PACK_COLOR_1555( a, r, g, b ); case DV_PF_565: - return I810PACKCOLOR565(r,g,b); + return PACK_COLOR_565( r, g, b ); default: fprintf(stderr, "unknown format %d\n", (int)format); return 0; @@ -35,13 +43,11 @@ } -static void i810DDAlphaFunc(GLcontext *ctx, GLenum func, GLclampf ref) +static void i810AlphaFunc(GLcontext *ctx, GLenum func, GLchan ref) { i810ContextPtr imesa = I810_CONTEXT(ctx); - CARD32 a = (ZA_UPDATE_ALPHAFUNC|ZA_UPDATE_ALPHAREF); + GLuint a = (ZA_UPDATE_ALPHAFUNC|ZA_UPDATE_ALPHAREF); - FLUSH_BATCH(imesa); - switch (ctx->Color.AlphaFunc) { case GL_NEVER: a |= ZA_ALPHA_NEVER; break; case GL_LESS: a |= ZA_ALPHA_LESS; break; @@ -54,34 +60,31 @@ default: return; } - a |= ctx->Color.AlphaRef << ZA_ALPHAREF_SHIFT; + a |= ((ref & 0xfc) << ZA_ALPHAREF_SHIFT); - imesa->dirty |= I810_UPLOAD_CTX; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_ZA] &= ~(ZA_ALPHA_MASK|ZA_ALPHAREF_MASK); imesa->Setup[I810_CTXREG_ZA] |= a; } -static void i810DDBlendEquation(GLcontext *ctx, GLenum mode) +static void i810BlendEquation(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)); - } + /* Can only do GL_ADD equation in hardware */ + FALLBACK( I810_CONTEXT(ctx), I810_FALLBACK_BLEND_EQ, mode != GL_FUNC_ADD_EXT); - if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) - imesa->Fallback |= I810_FALLBACK_LOGICOP; - else - imesa->Fallback &= ~I810_FALLBACK_LOGICOP; + /* BlendEquation sets ColorLogicOpEnabled in an unexpected + * manner. + */ + FALLBACK( I810_CONTEXT(ctx), I810_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && + ctx->Color.LogicOp != GL_COPY)); } -static void i810DDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor) +static void i810BlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor) { i810ContextPtr imesa = I810_CONTEXT(ctx); GLuint a = SDM_UPDATE_SRC_BLEND | SDM_UPDATE_DST_BLEND; - FLUSH_BATCH(imesa); + GLboolean fallback = GL_FALSE; switch (ctx->Color.BlendSrcRGB) { case GL_ZERO: a |= SDM_SRC_ZERO; break; @@ -92,8 +95,15 @@ case GL_ONE_MINUS_SRC_ALPHA: a |= SDM_SRC_INV_SRC_ALPHA; break; case GL_DST_ALPHA: a |= SDM_SRC_ONE; break; case GL_ONE_MINUS_DST_ALPHA: a |= SDM_SRC_ZERO; break; - case GL_SRC_ALPHA_SATURATE: a |= SDM_SRC_SRC_ALPHA; break; - default: return; + case GL_SRC_ALPHA_SATURATE: /*a |= SDM_SRC_SRC_ALPHA; break;*/ + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + fallback = GL_TRUE; + break; + default: + return; } switch (ctx->Color.BlendDstRGB) { @@ -105,41 +115,49 @@ case GL_ONE_MINUS_SRC_COLOR: a |= SDM_DST_INV_SRC_COLOR; break; case GL_DST_ALPHA: a |= SDM_DST_ONE; break; case GL_ONE_MINUS_DST_ALPHA: a |= SDM_DST_ZERO; break; - default: return; - } + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + fallback = GL_TRUE; + break; + default: + return; + } - imesa->dirty |= I810_UPLOAD_CTX; - imesa->Setup[I810_CTXREG_SDM] &= ~(SDM_SRC_MASK|SDM_DST_MASK); - imesa->Setup[I810_CTXREG_SDM] |= a; + FALLBACK( imesa, I810_FALLBACK_BLEND_FUNC, fallback); + if (!fallback) { + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); + imesa->Setup[I810_CTXREG_SDM] &= ~(SDM_SRC_MASK|SDM_DST_MASK); + imesa->Setup[I810_CTXREG_SDM] |= a; + } } /* Shouldn't be called as the extension is disabled. */ -static void i810DDBlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB, +static void i810BlendFuncSeparate( GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA ) { if (dfactorRGB != dfactorA || sfactorRGB != sfactorA) { - gl_error( ctx, GL_INVALID_OPERATION, "glBlendEquation (disabled)"); + _mesa_error( ctx, GL_INVALID_OPERATION, "glBlendEquation (disabled)"); } - i810DDBlendFunc( ctx, sfactorRGB, dfactorRGB ); + i810BlendFunc( ctx, sfactorRGB, dfactorRGB ); } -static void i810DDDepthFunc(GLcontext *ctx, GLenum func) +static void i810DepthFunc(GLcontext *ctx, GLenum func) { i810ContextPtr imesa = I810_CONTEXT(ctx); int zmode; - FLUSH_BATCH(imesa); - - switch(func) { + switch(func) { case GL_NEVER: zmode = LCS_Z_NEVER; break; case GL_ALWAYS: zmode = LCS_Z_ALWAYS; break; - case GL_LESS: zmode = LCS_Z_LESS; break; + case GL_LESS: zmode = LCS_Z_LESS; break; case GL_LEQUAL: zmode = LCS_Z_LEQUAL; break; case GL_EQUAL: zmode = LCS_Z_EQUAL; break; case GL_GREATER: zmode = LCS_Z_GREATER; break; @@ -147,48 +165,42 @@ case GL_NOTEQUAL: zmode = LCS_Z_NOTEQUAL; break; default: return; } - + + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_LCS] &= ~LCS_Z_MASK; - imesa->Setup[I810_CTXREG_LCS] |= LCS_UPDATE_ZMODE | zmode; - imesa->dirty |= I810_UPLOAD_CTX; + imesa->Setup[I810_CTXREG_LCS] |= zmode; } -static void i810DDDepthMask(GLcontext *ctx, GLboolean flag) +static void i810DepthMask(GLcontext *ctx, GLboolean flag) { i810ContextPtr imesa = I810_CONTEXT(ctx); + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); - FLUSH_BATCH(imesa); - - imesa->dirty |= I810_UPLOAD_CTX; - imesa->Setup[I810_CTXREG_B2] &= ~B2_ZB_WRITE_ENABLE; - if (flag) - imesa->Setup[I810_CTXREG_B2] |= B2_ZB_WRITE_ENABLE; + imesa->Setup[I810_CTXREG_B2] |= B2_ZB_WRITE_ENABLE; + else + imesa->Setup[I810_CTXREG_B2] &= ~B2_ZB_WRITE_ENABLE; } /* ============================================================= - * Polygon stipple - * - * The i810 supports a 4x4 stipple natively, GL wants 32x32. - * Fortunately stipple is usually a repeating pattern. Could - * also consider using a multitexturing mechanism for this, but - * that has real issues, too. + * Polygon stipple + * + * The i810 supports a 4x4 stipple natively, GL wants 32x32. + * Fortunately stipple is usually a repeating pattern. */ -static void i810DDPolygonStipple( GLcontext *ctx, const GLubyte *mask ) +static void i810PolygonStipple( GLcontext *ctx, const GLubyte *mask ) { i810ContextPtr imesa = I810_CONTEXT(ctx); const GLubyte *m = mask; GLubyte p[4]; int i,j,k; - int active = (ctx->Polygon.StippleFlag && ctx->PB->primitive == GL_POLYGON); + int active = (ctx->Polygon.StippleFlag && + imesa->reduced_primitive == GL_TRIANGLES); GLuint newMask; - FLUSH_BATCH(imesa); - ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; - if (active) { - imesa->dirty |= I810_UPLOAD_CTX; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_ST1] &= ~ST1_ENABLE; } @@ -198,10 +210,10 @@ p[3] = mask[0] & 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; + imesa->stipple_in_hw = 0; return; } @@ -209,14 +221,16 @@ ((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; + /* this is needed to make conform pass */ + imesa->stipple_in_hw = 0; return; } imesa->Setup[I810_CTXREG_ST1] &= ~0xffff; imesa->Setup[I810_CTXREG_ST1] |= newMask; + imesa->stipple_in_hw = 1; if (active) imesa->Setup[I810_CTXREG_ST1] |= ST1_ENABLE; @@ -229,133 +243,89 @@ */ -static void i810DDScissor( GLcontext *ctx, GLint x, GLint y, - GLsizei w, GLsizei h ) -{ +static void i810Scissor( GLcontext *ctx, GLint x, GLint y, + GLsizei w, GLsizei h ) +{ i810ContextPtr imesa = I810_CONTEXT(ctx); + + if (ctx->Scissor.Enabled) { + I810_FIREVERTICES(imesa); /* don't pipeline cliprect changes */ + imesa->upload_cliprects = GL_TRUE; + } - FLUSH_BATCH(imesa); imesa->scissor_rect.x1 = x; - imesa->scissor_rect.y1 = imesa->driDrawable->h - (y+h); - imesa->scissor_rect.x2 = x+w; + imesa->scissor_rect.y1 = imesa->driDrawable->h - (y + h); + imesa->scissor_rect.x2 = x + w; imesa->scissor_rect.y2 = imesa->driDrawable->h - y; - - - if (I810_DEBUG&DEBUG_VERBOSE_2D) - fprintf(stderr, "SET SCISSOR %d,%d-%d,%d\n", - imesa->scissor_rect.x1, - imesa->scissor_rect.y1, - imesa->scissor_rect.x2, - imesa->scissor_rect.y2); - - - imesa->dirty |= I810_UPLOAD_CLIPRECTS; } -static void i810DDDither(GLcontext *ctx, GLboolean enable) +static void i810LogicOp( GLcontext *ctx, GLenum opcode ) { + i810ContextPtr imesa = I810_CONTEXT(ctx); + FALLBACK( imesa, I810_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && opcode != GL_COPY) ); } -static void i810DDLogicOp( GLcontext *ctx, GLenum opcode ) +/* Fallback to swrast for select and feedback. + */ +static void i810RenderMode( GLcontext *ctx, GLenum mode ) { i810ContextPtr imesa = I810_CONTEXT(ctx); - - if (ctx->Color.ColorLogicOpEnabled) - { - FLUSH_BATCH( imesa ); - - if (opcode == GL_COPY) - imesa->Fallback &= ~I810_FALLBACK_LOGICOP; - else - imesa->Fallback |= I810_FALLBACK_LOGICOP; - } - else - imesa->Fallback &= ~I810_FALLBACK_LOGICOP; + FALLBACK( imesa, I810_FALLBACK_RENDERMODE, (mode != GL_RENDER) ); } + -static GLboolean i810DDSetDrawBuffer(GLcontext *ctx, GLenum mode ) +static void i810SetDrawBuffer(GLcontext *ctx, GLenum mode ) { i810ContextPtr imesa = I810_CONTEXT(ctx); - - FLUSH_BATCH(imesa); - imesa->Fallback &= ~I810_FALLBACK_DRAW_BUFFER; - - if (mode == GL_FRONT_LEFT) + if (mode == GL_FRONT_LEFT) { + I810_FIREVERTICES(imesa); + I810_STATECHANGE(imesa, I810_UPLOAD_BUFFERS); + imesa->BufferSetup[I810_DESTREG_DI1] = (imesa->i810Screen->fbOffset | + imesa->i810Screen->backPitchBits); imesa->drawMap = (char *)imesa->driScreen->pFB; imesa->readMap = (char *)imesa->driScreen->pFB; - imesa->BufferSetup[I810_DESTREG_DI1] = (imesa->i810Screen->fbOffset | - imesa->i810Screen->backPitchBits); - imesa->dirty |= I810_UPLOAD_BUFFERS; i810XMesaSetFrontClipRects( imesa ); - return GL_TRUE; - } - else if (mode == GL_BACK_LEFT) + FALLBACK( imesa, I810_FALLBACK_DRAW_BUFFER, GL_FALSE ); + } + else if (mode == GL_BACK_LEFT) { + I810_FIREVERTICES(imesa); + I810_STATECHANGE(imesa, I810_UPLOAD_BUFFERS); + imesa->BufferSetup[I810_DESTREG_DI1] = (imesa->i810Screen->backOffset | + imesa->i810Screen->backPitchBits); imesa->drawMap = imesa->i810Screen->back.map; imesa->readMap = imesa->i810Screen->back.map; - imesa->BufferSetup[I810_DESTREG_DI1] = (imesa->i810Screen->backOffset | - imesa->i810Screen->backPitchBits); - imesa->dirty |= I810_UPLOAD_BUFFERS; i810XMesaSetBackClipRects( imesa ); - return GL_TRUE; + FALLBACK( imesa, I810_FALLBACK_DRAW_BUFFER, GL_FALSE ); } - - imesa->Fallback |= I810_FALLBACK_DRAW_BUFFER; - return GL_FALSE; -} - -static void i810DDSetReadBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, - GLenum mode ) -{ - i810ContextPtr imesa = I810_CONTEXT(ctx); - - if (mode == GL_FRONT_LEFT) - { - imesa->readMap = (char *)imesa->driScreen->pFB; - imesa->Fallback &= ~I810_FALLBACK_READ_BUFFER; - } - else if (mode == GL_BACK_LEFT) - { - imesa->readMap = imesa->i810Screen->back.map; - imesa->Fallback &= ~I810_FALLBACK_READ_BUFFER; + else { + FALLBACK( imesa, I810_FALLBACK_DRAW_BUFFER, GL_TRUE ); } - else - imesa->Fallback |= I810_FALLBACK_READ_BUFFER; } -static void i810DDSetColor(GLcontext *ctx, - GLubyte r, GLubyte g, - GLubyte b, GLubyte a ) +static void i810ClearColor(GLcontext *ctx, const GLchan color[4] ) { i810ContextPtr imesa = I810_CONTEXT(ctx); - imesa->MonoColor = i810PackColor( imesa->i810Screen->fbFormat, r, g, b, a ); + imesa->ClearColor = i810PackColor( imesa->i810Screen->fbFormat, + color[0], color[1], + color[2], color[3] ); } -static void i810DDClearColor(GLcontext *ctx, - GLubyte r, GLubyte g, - GLubyte b, GLubyte a ) -{ - i810ContextPtr imesa = I810_CONTEXT(ctx); - imesa->ClearColor = i810PackColor( imesa->i810Screen->fbFormat, r, g, b, a ); -} - - /* ============================================================= * Culling - the i810 isn't quite as clean here as the rest of * its interfaces, but it's not bad. */ -static void i810DDCullFaceFrontFace(GLcontext *ctx, GLenum unused) +static void i810CullFaceFrontFace(GLcontext *ctx, GLenum unused) { i810ContextPtr imesa = I810_CONTEXT(ctx); GLuint mode = LCS_CULL_BOTH; - - FLUSH_BATCH(imesa); if (ctx->Polygon.CullFaceMode != GL_FRONT_AND_BACK) { mode = LCS_CULL_CW; @@ -367,146 +337,125 @@ imesa->LcsCullMode = mode; - if (ctx->Polygon.CullFlag && ctx->PB->primitive == GL_POLYGON) + if (ctx->Polygon.CullFlag) { - imesa->dirty |= I810_UPLOAD_CTX; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_LCS] &= ~LCS_CULL_MASK; imesa->Setup[I810_CTXREG_LCS] |= mode; } } -static void i810DDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ) +static void i810LineWidth( GLcontext *ctx, GLfloat widthf ) { - i810ContextPtr imesa = I810_CONTEXT(ctx); - FLUSH_BATCH(imesa); + i810ContextPtr imesa = I810_CONTEXT( ctx ); + int width = (int)ctx->Line._Width; - imesa->dirty |= I810_UPLOAD_CTX; - imesa->Setup[I810_CTXREG_LCS] &= ~LCS_CULL_MASK; - imesa->Setup[I810_CTXREG_ST1] &= ~ST1_ENABLE; - imesa->Setup[I810_CTXREG_AA] &= ~AA_ENABLE; - imesa->vertex_prim = PR_TRIANGLES; - - switch (ctx->PB->primitive) { - case GL_POLYGON: - if (ctx->Polygon.StippleFlag && - (ctx->Driver.TriangleCaps & DD_TRI_STIPPLE)) - imesa->Setup[I810_CTXREG_ST1] |= ST1_ENABLE; - if (ctx->Polygon.CullFlag) - imesa->Setup[I810_CTXREG_LCS] |= imesa->LcsCullMode; - else - imesa->Setup[I810_CTXREG_LCS] |= LCS_CULL_DISABLE; - if (ctx->Polygon.SmoothFlag) - imesa->Setup[I810_CTXREG_AA] |= AA_ENABLE; - break; - case GL_LINES: - if (ctx->Line.SmoothFlag) - imesa->Setup[I810_CTXREG_AA] |= AA_ENABLE; - imesa->Setup[I810_CTXREG_LCS] |= LCS_CULL_DISABLE; - imesa->vertex_prim = PR_LINES; - break; - case GL_POINTS: - if (ctx->Point.SmoothFlag) - imesa->Setup[I810_CTXREG_AA] |= AA_ENABLE; - imesa->Setup[I810_CTXREG_LCS] |= LCS_CULL_DISABLE; - break; - default: - imesa->Setup[I810_CTXREG_LCS] |= LCS_CULL_DISABLE; - break; + imesa->LcsLineWidth = 0; + if (width & 1) imesa->LcsLineWidth |= LCS_LINEWIDTH_1_0; + if (width & 2) imesa->LcsLineWidth |= LCS_LINEWIDTH_2_0; + + if (imesa->reduced_primitive == GL_LINES) { + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); + imesa->Setup[I810_CTXREG_LCS] &= ~LCS_LINEWIDTH_3_0; + imesa->Setup[I810_CTXREG_LCS] |= imesa->LcsLineWidth; } } - -static void i810DDLineWidth( GLcontext *ctx, GLfloat widthf ) +static void i810PointSize( GLcontext *ctx, GLfloat sz ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); - int width = (int)widthf; + int size = (int)ctx->Point._Size; - if (width > 3) width = 3; - if (width < 1) width = 1; - - imesa->Setup[I810_CTXREG_LCS] &= ~LCS_LINEWIDTH_3_0; - - if (width & 1) imesa->Setup[I810_CTXREG_LCS] |= LCS_LINEWIDTH_1_0; - if (width & 2) imesa->Setup[I810_CTXREG_LCS] |= LCS_LINEWIDTH_2_0; - - imesa->dirty |= I810_UPLOAD_CTX; + imesa->LcsPointSize = 0; + if (size & 1) imesa->LcsPointSize |= LCS_LINEWIDTH_1_0; + if (size & 2) imesa->LcsPointSize |= LCS_LINEWIDTH_2_0; + + if (imesa->reduced_primitive == GL_POINTS) { + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); + imesa->Setup[I810_CTXREG_LCS] &= ~LCS_LINEWIDTH_3_0; + imesa->Setup[I810_CTXREG_LCS] |= imesa->LcsPointSize; + } } /* ============================================================= * Color masks */ -/* Mesa calls this from the wrong place - it is called a very large - * number of redundant times. - * - * Colormask can be simulated by multipass or multitexture techniques. - */ -static GLboolean i810DDColorMask(GLcontext *ctx, - GLboolean r, GLboolean g, - GLboolean b, GLboolean a ) +static void i810ColorMask(GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); - GLuint tmp; + GLuint tmp = 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 (r && g && b) { + tmp = imesa->Setup[I810_CTXREG_B2] | B2_FB_WRITE_ENABLE; + FALLBACK( imesa, I810_FALLBACK_COLORMASK, GL_FALSE ); + } else if (!r && !g && !b) { + tmp = imesa->Setup[I810_CTXREG_B2] & ~B2_FB_WRITE_ENABLE; + FALLBACK( imesa, I810_FALLBACK_COLORMASK, GL_FALSE ); + } else { + FALLBACK( imesa, I810_FALLBACK_COLORMASK, GL_TRUE ); + return; + } if (tmp != imesa->Setup[I810_CTXREG_B2]) { - FLUSH_BATCH(imesa); + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_B2] = tmp; imesa->dirty |= I810_UPLOAD_CTX; } - - return GL_FALSE; /* makes s/w path always do s/w masking */ } -/* Seperate specular not fully implemented in hardware... Needs - * some interaction with material state? Just punt to software - * in all cases? +/* Seperate specular not fully implemented on the i810. */ -static void i810DDLightModelfv(GLcontext *ctx, GLenum pname, - const GLfloat *param) +static void i810LightModelfv(GLcontext *ctx, GLenum pname, + const GLfloat *param) { - if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) - { + if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) + { i810ContextPtr imesa = I810_CONTEXT( ctx ); - FLUSH_BATCH(imesa); - - imesa->Fallback &= ~I810_FALLBACK_SPECULAR; - if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - imesa->Fallback |= I810_FALLBACK_SPECULAR; + FALLBACK( imesa, I810_FALLBACK_SPECULAR, + (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)); } } -/* The 815 has it... +/* But the 815 has it... */ -static void i810DDLightModelfv_i815(GLcontext *ctx, GLenum pname, - const GLfloat *param) +static void i810LightModelfv_i815(GLcontext *ctx, GLenum pname, + const GLfloat *param) { - if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) - { + if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) + { i810ContextPtr imesa = I810_CONTEXT( ctx ); - FLUSH_BATCH(imesa); - - imesa->Setup[I810_CTXREG_B1] &= ~B1_SPEC_ENABLE; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) imesa->Setup[I810_CTXREG_B1] |= B1_SPEC_ENABLE; + else + imesa->Setup[I810_CTXREG_B1] &= ~B1_SPEC_ENABLE; } } - +/* In Mesa 3.5 we can reliably do native flatshading. + */ +static void i810ShadeModel(GLcontext *ctx, GLenum mode) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); + if (mode == GL_FLAT) + imesa->Setup[I810_CTXREG_LCS] |= LCS_INTERP_FLAT; + else + imesa->Setup[I810_CTXREG_LCS] &= ~LCS_INTERP_FLAT; +} + + + /* ============================================================= * Fog */ - -static void i810DDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) +static void i810Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) { i810ContextPtr imesa = I810_CONTEXT(ctx); @@ -515,7 +464,7 @@ ((GLubyte)(ctx->Fog.Color[1]*255.0F) << 8) | ((GLubyte)(ctx->Fog.Color[2]*255.0F) << 0)); - imesa->dirty |= I810_UPLOAD_CTX; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_FOG] = ((GFX_OP_FOG_COLOR | color) & ~FOG_RESERVED_MASK); } @@ -524,60 +473,57 @@ /* ============================================================= */ - -static void i810DDEnable(GLcontext *ctx, GLenum cap, GLboolean state) +static void i810Enable(GLcontext *ctx, GLenum cap, GLboolean state) { i810ContextPtr imesa = I810_CONTEXT(ctx); switch(cap) { case GL_ALPHA_TEST: - FLUSH_BATCH(imesa); - imesa->dirty |= I810_UPLOAD_CTX; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_B1] &= ~B1_ALPHA_TEST_ENABLE; if (state) imesa->Setup[I810_CTXREG_B1] |= B1_ALPHA_TEST_ENABLE; break; case GL_BLEND: - FLUSH_BATCH(imesa); - imesa->dirty |= I810_UPLOAD_CTX; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); 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; + FALLBACK( imesa, I810_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && + ctx->Color.LogicOp != GL_COPY)); break; case GL_DEPTH_TEST: - FLUSH_BATCH(imesa); - imesa->dirty |= I810_UPLOAD_CTX; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_B1] &= ~B1_Z_TEST_ENABLE; if (state) imesa->Setup[I810_CTXREG_B1] |= B1_Z_TEST_ENABLE; break; case GL_SCISSOR_TEST: - FLUSH_BATCH(imesa); + /* XXX without these next two lines, conform's scissor test fails */ + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); + I810_STATECHANGE(imesa, I810_UPLOAD_BUFFERS); + I810_FIREVERTICES(imesa); /* don't pipeline cliprect changes */ + imesa->upload_cliprects = GL_TRUE; imesa->scissor = state; - imesa->dirty |= I810_UPLOAD_CLIPRECTS; break; - case GL_POLYGON_STIPPLE: - if ((ctx->Driver.TriangleCaps & DD_TRI_STIPPLE) && - ctx->PB->primitive == GL_POLYGON) + case GL_POLYGON_STIPPLE: + if (imesa->stipple_in_hw && imesa->reduced_primitive == GL_TRIANGLES) { - FLUSH_BATCH(imesa); - imesa->dirty |= I810_UPLOAD_CTX; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_ST1] &= ~ST1_ENABLE; if (state) imesa->Setup[I810_CTXREG_ST1] |= ST1_ENABLE; } break; case GL_LINE_SMOOTH: - if (ctx->PB->primitive == GL_LINE) { - FLUSH_BATCH(imesa); - imesa->dirty |= I810_UPLOAD_CTX; + /* Need to fatten the lines by .5, or they disappear... + */ + if (imesa->reduced_primitive == GL_LINES) { + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_AA] &= ~AA_ENABLE; imesa->Setup[I810_CTXREG_LCS] &= ~LCS_LINEWIDTH_0_5; if (state) { @@ -587,96 +533,90 @@ } break; case GL_POINT_SMOOTH: - if (ctx->PB->primitive == GL_POINT) { - FLUSH_BATCH(imesa); - imesa->dirty |= I810_UPLOAD_CTX; + if (imesa->reduced_primitive == GL_POINTS) { + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_AA] &= ~AA_ENABLE; - if (state) + imesa->Setup[I810_CTXREG_LCS] &= ~LCS_LINEWIDTH_0_5; + if (state) { imesa->Setup[I810_CTXREG_AA] |= AA_ENABLE; + imesa->Setup[I810_CTXREG_LCS] |= LCS_LINEWIDTH_0_5; + } } break; case GL_POLYGON_SMOOTH: - if (ctx->PB->primitive == GL_POLYGON) { - FLUSH_BATCH(imesa); - imesa->dirty |= I810_UPLOAD_CTX; + if (imesa->reduced_primitive == GL_TRIANGLES) { + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_AA] &= ~AA_ENABLE; - if (state) + if (state) imesa->Setup[I810_CTXREG_AA] |= AA_ENABLE; } break; case GL_FOG: - FLUSH_BATCH(imesa); - imesa->dirty |= I810_UPLOAD_CTX; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_B1] &= ~B1_FOG_ENABLE; if (state) imesa->Setup[I810_CTXREG_B1] |= B1_FOG_ENABLE; break; case GL_CULL_FACE: - if (ctx->PB->primitive == GL_POLYGON) { - FLUSH_BATCH(imesa); - imesa->dirty |= I810_UPLOAD_CTX; - imesa->Setup[I810_CTXREG_LCS] &= ~LCS_CULL_MASK; + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); + imesa->Setup[I810_CTXREG_LCS] &= ~LCS_CULL_MASK; + if (state) + imesa->Setup[I810_CTXREG_LCS] |= imesa->LcsCullMode; + else + imesa->Setup[I810_CTXREG_LCS] |= LCS_CULL_DISABLE; + break; + case GL_TEXTURE_2D: + I810_STATECHANGE(imesa, 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_LCS] |= imesa->LcsCullMode; - else - imesa->Setup[I810_CTXREG_LCS] |= LCS_CULL_DISABLE; + imesa->Setup[I810_CTXREG_MT] |= MT_TEXEL1_ENABLE; } break; - case GL_TEXTURE_1D: - case GL_TEXTURE_3D: - FLUSH_BATCH(imesa); - imesa->new_state |= I810_NEW_TEXTURE; - break; - case GL_TEXTURE_2D: - FLUSH_BATCH(imesa); - imesa->new_state |= I810_NEW_TEXTURE; - break; case GL_COLOR_LOGIC_OP: - FLUSH_BATCH( imesa ); - imesa->Fallback &= ~I810_FALLBACK_LOGICOP; - if (state && ctx->Color.LogicOp != GL_COPY) - imesa->Fallback |= I810_FALLBACK_LOGICOP; + FALLBACK( imesa, I810_FALLBACK_LOGICOP, + (state && ctx->Color.LogicOp != GL_COPY)); + break; + case GL_STENCIL_TEST: + FALLBACK( imesa, I810_FALLBACK_STENCIL, state ); break; default: - ; - } + ; + } } -/* ============================================================= - */ -void i810DDUpdateHwState( GLcontext *ctx ) -{ - i810ContextPtr imesa = I810_CONTEXT(ctx); - if (imesa->new_state & I810_NEW_TEXTURE) { - FLUSH_BATCH(imesa); - i810UpdateTextureState( ctx ); - } - imesa->new_state = 0; -} +/* ============================================================= + */ + + void i810EmitDrawingRectangle( i810ContextPtr imesa ) { __DRIdrawablePrivate *dPriv = imesa->driDrawable; i810ScreenPrivate *i810Screen = imesa->i810Screen; - int x0 = imesa->drawX; int y0 = imesa->drawY; int x1 = x0 + dPriv->w; int y1 = y0 + dPriv->h; + GLuint dr2, dr3, dr4; /* Coordinate origin of the window - may be offscreen. */ - imesa->BufferSetup[I810_DESTREG_DR4] = ((y0<<16) | - (((unsigned)x0)&0xFFFF)); - + dr4 = imesa->BufferSetup[I810_DESTREG_DR4] = ((y0<<16) | + (((unsigned)x0)&0xFFFF)); + /* Clip to screen. */ if (x0 < 0) x0 = 0; @@ -687,80 +627,69 @@ /* Onscreen drawing rectangle. */ - imesa->BufferSetup[I810_DESTREG_DR2] = ((y0<<16) | x0); - imesa->BufferSetup[I810_DESTREG_DR3] = (((y1+1)<<16) | (x1+1)); + dr2 = imesa->BufferSetup[I810_DESTREG_DR2] = ((y0<<16) | x0); + dr3 = imesa->BufferSetup[I810_DESTREG_DR3] = (((y1+1)<<16) | (x1+1)); + + imesa->dirty |= I810_UPLOAD_BUFFERS; } -static void i810DDPrintDirty( const char *msg, GLuint state ) + +static void i810CalcViewport( GLcontext *ctx ) { - fprintf(stderr, "%s (0x%x): %s%s%s%s%s\n", - msg, - (unsigned int) state, - (state & I810_UPLOAD_TEX0IMAGE) ? "upload-tex0, " : "", - (state & I810_UPLOAD_TEX1IMAGE) ? "upload-tex1, " : "", - (state & I810_UPLOAD_CTX) ? "upload-ctx, " : "", - (state & I810_UPLOAD_BUFFERS) ? "upload-bufs, " : "", - (state & I810_UPLOAD_CLIPRECTS) ? "upload-cliprects, " : "" - ); + i810ContextPtr imesa = I810_CONTEXT(ctx); + const GLfloat *v = ctx->Viewport._WindowMap.m; + GLfloat *m = imesa->ViewportMatrix.m; + + /* See also i810_translate_vertex. SUBPIXEL adjustments can be done + * via state vars, too. + */ + m[MAT_SX] = v[MAT_SX]; + m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X; + m[MAT_SY] = - v[MAT_SY]; + m[MAT_TY] = - v[MAT_TY] + imesa->driDrawable->h + SUBPIXEL_Y; + m[MAT_SZ] = v[MAT_SZ] * (1.0 / 0xffff); + m[MAT_TZ] = v[MAT_TZ] * (1.0 / 0xffff); } +static void i810Viewport( GLcontext *ctx, + GLint x, GLint y, + GLsizei width, GLsizei height ) +{ + i810CalcViewport( ctx ); +} -/* Push the state into the sarea and/or texture memory. - */ -void i810EmitHwStateLocked( i810ContextPtr imesa ) +static void i810DepthRange( GLcontext *ctx, + GLclampd nearval, GLclampd farval ) { - if (I810_DEBUG & DEBUG_VERBOSE_API) - i810DDPrintDirty( "\n\n\ni810EmitHwStateLocked", imesa->dirty ); + i810CalcViewport( ctx ); +} - if (imesa->dirty & ~I810_UPLOAD_CLIPRECTS) - { - if ((imesa->dirty & I810_UPLOAD_TEX0IMAGE) && imesa->CurrentTexObj[0]) - i810UploadTexImages(imesa, imesa->CurrentTexObj[0]); - - if ((imesa->dirty & I810_UPLOAD_TEX1IMAGE) && imesa->CurrentTexObj[1]) - i810UploadTexImages(imesa, imesa->CurrentTexObj[1]); - - if (imesa->dirty & I810_UPLOAD_CTX) - memcpy( imesa->sarea->ContextState, - imesa->Setup, - sizeof(imesa->Setup) ); - - if ((imesa->dirty & I810_UPLOAD_TEX0) && imesa->CurrentTexObj[0]) { - imesa->sarea->dirty |= I810_UPLOAD_TEX0; - memcpy(imesa->sarea->TexState[0], - imesa->CurrentTexObj[0]->Setup, - sizeof(imesa->sarea->TexState[0])); - } - if ((imesa->dirty & I810_UPLOAD_TEX1) && imesa->CurrentTexObj[1]) { - imesa->sarea->dirty |= I810_UPLOAD_TEX1; - memcpy(imesa->sarea->TexState[1], - imesa->CurrentTexObj[1]->Setup, - sizeof(imesa->sarea->TexState[1])); - } - - if (imesa->dirty & I810_UPLOAD_BUFFERS) - memcpy( imesa->sarea->BufferState, - imesa->BufferSetup, - sizeof(imesa->BufferSetup) ); - imesa->sarea->dirty |= (imesa->dirty & - ~(I810_UPLOAD_TEX1|I810_UPLOAD_TEX0)); - imesa->dirty &= I810_UPLOAD_CLIPRECTS; - } +void i810PrintDirty( const char *msg, GLuint state ) +{ + fprintf(stderr, "%s (0x%x): %s%s%s%s\n", + msg, + (unsigned int) state, + (state & I810_UPLOAD_TEX0) ? "upload-tex0, " : "", + (state & I810_UPLOAD_TEX1) ? "upload-tex1, " : "", + (state & I810_UPLOAD_CTX) ? "upload-ctx, " : "", + (state & I810_UPLOAD_BUFFERS) ? "upload-bufs, " : "" + ); } -void i810DDInitState( i810ContextPtr imesa ) +void i810InitState( GLcontext *ctx ) { + i810ContextPtr imesa = I810_CONTEXT(ctx); i810ScreenPrivate *i810Screen = imesa->i810Screen; memset(imesa->Setup, 0, sizeof(imesa->Setup)); - imesa->Setup[I810_CTXREG_VF] = I810_VFMT_T0; + imesa->Setup[I810_CTXREG_VF] = 0; imesa->Setup[I810_CTXREG_MT] = (GFX_OP_MAP_TEXELS | MT_UPDATE_TEXEL1_STATE | @@ -777,7 +706,7 @@ MC_UPDATE_DEST | MC_DEST_CURRENT | MC_UPDATE_ARG1 | - MC_ARG1_ITERATED_COLOR | + MC_ARG1_ITERATED_COLOR | MC_ARG1_DONT_REPLICATE_ALPHA | MC_ARG1_DONT_INVERT | MC_UPDATE_ARG2 | @@ -786,13 +715,13 @@ MC_ARG2_DONT_INVERT | MC_UPDATE_OP | MC_OP_ARG1 ); - + 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_ONE | MC_ARG1_DONT_REPLICATE_ALPHA | MC_ARG1_DONT_INVERT | MC_UPDATE_ARG2 | @@ -801,14 +730,14 @@ MC_ARG2_DONT_INVERT | MC_UPDATE_OP | MC_OP_DISABLE ); - + imesa->Setup[I810_CTXREG_MC2] = ( GFX_OP_MAP_COLOR_STAGES | MC_STAGE_2 | MC_UPDATE_DEST | MC_DEST_CURRENT | MC_UPDATE_ARG1 | - MC_ARG1_CURRENT_COLOR | + MC_ARG1_CURRENT_COLOR | MC_ARG1_REPLICATE_ALPHA | MC_ARG1_DONT_INVERT | MC_UPDATE_ARG2 | @@ -817,12 +746,12 @@ MC_ARG2_DONT_INVERT | MC_UPDATE_OP | MC_OP_DISABLE ); - + imesa->Setup[I810_CTXREG_MA0] = ( GFX_OP_MAP_ALPHA_STAGES | MA_STAGE_0 | MA_UPDATE_ARG1 | - MA_ARG1_CURRENT_ALPHA | + MA_ARG1_ITERATED_ALPHA | MA_ARG1_DONT_INVERT | MA_UPDATE_ARG2 | MA_ARG2_CURRENT_ALPHA | @@ -858,7 +787,7 @@ imesa->Setup[I810_CTXREG_SDM] = ( GFX_OP_SRC_DEST_MONO | SDM_UPDATE_MONO_ENABLE | 0 | - SDM_UPDATE_SRC_BLEND | + SDM_UPDATE_SRC_BLEND | SDM_SRC_ONE | SDM_UPDATE_DST_BLEND | SDM_DST_ZERO ); @@ -876,7 +805,7 @@ ZA_UPDATE_ALPHAREF | 0x0); - imesa->Setup[I810_CTXREG_FOG] = (GFX_OP_FOG_COLOR | + imesa->Setup[I810_CTXREG_FOG] = (GFX_OP_FOG_COLOR | (0xffffff & ~FOG_RESERVED_MASK)); /* Choose a pipe @@ -936,16 +865,18 @@ LCS_CULL_DISABLE); imesa->LcsCullMode = LCS_CULL_CW; - + imesa->LcsLineWidth = LCS_LINEWIDTH_1_0; + imesa->LcsPointSize = LCS_LINEWIDTH_1_0; + imesa->Setup[I810_CTXREG_PV] = ( GFX_OP_PV_RULE | PV_UPDATE_PIXRULE | PV_PIXRULE_ENABLE | PV_UPDATE_LINELIST | - PV_LINELIST_PV0 | + PV_LINELIST_PV1 | PV_UPDATE_TRIFAN | - PV_TRIFAN_PV0 | + PV_TRIFAN_PV2 | PV_UPDATE_TRISTRIP | - PV_TRISTRIP_PV0 ); + PV_TRISTRIP_PV2 ); imesa->Setup[I810_CTXREG_ST0] = GFX_OP_STIPPLE; @@ -953,7 +884,7 @@ imesa->Setup[I810_CTXREG_AA] = ( GFX_OP_ANTIALIAS | AA_UPDATE_EDGEFLAG | - AA_ENABLE_EDGEFLAG | /* ? */ + 0 | AA_UPDATE_POLYWIDTH | AA_POLYWIDTH_05 | AA_UPDATE_LINEWIDTH | @@ -969,12 +900,12 @@ if (imesa->glCtx->Color.DriverDrawBuffer == GL_BACK_LEFT) { imesa->drawMap = i810Screen->back.map; imesa->readMap = i810Screen->back.map; - imesa->BufferSetup[I810_DESTREG_DI1] = (i810Screen->backOffset | + imesa->BufferSetup[I810_DESTREG_DI1] = (i810Screen->backOffset | i810Screen->backPitchBits); } else { imesa->drawMap = (char *)imesa->driScreen->pFB; imesa->readMap = (char *)imesa->driScreen->pFB; - imesa->BufferSetup[I810_DESTREG_DI1] = (i810Screen->fbOffset | + imesa->BufferSetup[I810_DESTREG_DI1] = (i810Screen->fbOffset | i810Screen->backPitchBits); } @@ -988,77 +919,65 @@ } -#define INTERESTED (~(NEW_MODELVIEW|NEW_PROJECTION|\ - NEW_TEXTURE_MATRIX|\ - NEW_USER_CLIP|NEW_CLIENT_STATE)) +static void i810InvalidateState( GLcontext *ctx, GLuint new_state ) +{ + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + I810_CONTEXT(ctx)->new_state |= new_state; +} -void i810DDUpdateState( GLcontext *ctx ) +void i810InitStateFuncs(GLcontext *ctx) { - i810ContextPtr imesa = I810_CONTEXT( ctx ); - - /* Have to do this here to detect texture fallbacks in time: + /* Callbacks for internal Mesa events. */ - if (I810_CONTEXT(ctx)->new_state & I810_NEW_TEXTURE) - i810DDUpdateHwState( ctx ); - - - if (ctx->NewState & INTERESTED) { - i810DDChooseRenderState(ctx); - i810ChooseRasterSetupFunc(ctx); - } + ctx->Driver.UpdateState = i810InvalidateState; - if (0) - fprintf(stderr, "IndirectTriangles %x Fallback %x\n", - imesa->IndirectTriangles, imesa->Fallback); - - if (!imesa->Fallback) - { - ctx->IndirectTriangles &= ~DD_SW_RASTERIZE; - ctx->IndirectTriangles |= imesa->IndirectTriangles; - - ctx->Driver.PointsFunc=imesa->PointsFunc; - ctx->Driver.LineFunc=imesa->LineFunc; - ctx->Driver.TriangleFunc=imesa->TriangleFunc; - ctx->Driver.QuadFunc=imesa->QuadFunc; - } -} - - -void i810DDInitStateFuncs(GLcontext *ctx) -{ - ctx->Driver.UpdateState = i810DDUpdateState; - ctx->Driver.Enable = i810DDEnable; - ctx->Driver.AlphaFunc = i810DDAlphaFunc; - ctx->Driver.BlendEquation = i810DDBlendEquation; - ctx->Driver.BlendFunc = i810DDBlendFunc; - ctx->Driver.BlendFuncSeparate = i810DDBlendFuncSeparate; - ctx->Driver.DepthFunc = i810DDDepthFunc; - ctx->Driver.DepthMask = i810DDDepthMask; - ctx->Driver.Fogfv = i810DDFogfv; - ctx->Driver.Scissor = i810DDScissor; - ctx->Driver.CullFace = i810DDCullFaceFrontFace; - ctx->Driver.FrontFace = i810DDCullFaceFrontFace; - ctx->Driver.ColorMask = i810DDColorMask; - ctx->Driver.ReducedPrimitiveChange = i810DDReducedPrimitiveChange; - ctx->Driver.RenderStart = i810DDUpdateHwState; - ctx->Driver.RenderFinish = 0; - ctx->Driver.PolygonStipple = i810DDPolygonStipple; - ctx->Driver.LineStipple = 0; - ctx->Driver.LineWidth = i810DDLineWidth; - ctx->Driver.LogicOpcode = i810DDLogicOp; - ctx->Driver.SetReadBuffer = i810DDSetReadBuffer; - ctx->Driver.SetDrawBuffer = i810DDSetDrawBuffer; - ctx->Driver.Color = i810DDSetColor; - ctx->Driver.ClearColor = i810DDClearColor; - ctx->Driver.Dither = i810DDDither; - ctx->Driver.Index = 0; - ctx->Driver.ClearIndex = 0; - ctx->Driver.IndexMask = 0; + /* API callbacks + */ + ctx->Driver.AlphaFunc = i810AlphaFunc; + ctx->Driver.BlendEquation = i810BlendEquation; + ctx->Driver.BlendFunc = i810BlendFunc; + ctx->Driver.BlendFuncSeparate = i810BlendFuncSeparate; + ctx->Driver.ClearColor = i810ClearColor; + ctx->Driver.ColorMask = i810ColorMask; + ctx->Driver.CullFace = i810CullFaceFrontFace; + ctx->Driver.DepthFunc = i810DepthFunc; + ctx->Driver.DepthMask = i810DepthMask; + ctx->Driver.Enable = i810Enable; + ctx->Driver.Fogfv = i810Fogfv; + ctx->Driver.FrontFace = i810CullFaceFrontFace; + ctx->Driver.LineWidth = i810LineWidth; + ctx->Driver.LogicOpcode = i810LogicOp; + ctx->Driver.PolygonStipple = i810PolygonStipple; + ctx->Driver.RenderMode = i810RenderMode; + ctx->Driver.Scissor = i810Scissor; + ctx->Driver.SetDrawBuffer = i810SetDrawBuffer; + ctx->Driver.ShadeModel = i810ShadeModel; + ctx->Driver.DepthRange = i810DepthRange; + ctx->Driver.Viewport = i810Viewport; + ctx->Driver.PointSize = i810PointSize; if (IS_I815(I810_CONTEXT(ctx))) { - ctx->Driver.LightModelfv = i810DDLightModelfv_i815; + ctx->Driver.LightModelfv = i810LightModelfv_i815; } else { - ctx->Driver.LightModelfv = i810DDLightModelfv; + ctx->Driver.LightModelfv = i810LightModelfv; } + + /* Pixel path fallbacks. + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.Bitmap = _swrast_Bitmap; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; + + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; } Index: xc/lib/GL/mesa/src/drv/i810/i810state.h diff -u xc/lib/GL/mesa/src/drv/i810/i810state.h:1.2 xc/lib/GL/mesa/src/drv/i810/i810state.h:1.3 --- xc/lib/GL/mesa/src/drv/i810/i810state.h:1.2 Fri Jun 16 20:03:00 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810state.h Fri Feb 22 16:33:04 2002 @@ -3,10 +3,12 @@ #include "i810context.h" -extern void i810DDUpdateHwState( GLcontext *ctx ); -extern void i810DDUpdateState( GLcontext *ctx ); -extern void i810DDInitState( i810ContextPtr imesa ); -extern void i810DDInitStateFuncs( GLcontext *ctx ); +extern void i810InitState( GLcontext *ctx ); +extern void i810InitStateFuncs( GLcontext *ctx ); +extern void i810PrintDirty( const char *msg, GLuint state ); + +extern void i810Fallback( i810ContextPtr imesa, GLuint bit, GLboolean mode ); +#define FALLBACK( imesa, bit, mode ) i810Fallback( imesa, bit, mode ) #endif Index: xc/lib/GL/mesa/src/drv/i810/i810tex.c diff -u xc/lib/GL/mesa/src/drv/i810/i810tex.c:1.7 xc/lib/GL/mesa/src/drv/i810/i810tex.c:1.9 --- xc/lib/GL/mesa/src/drv/i810/i810tex.c:1.7 Wed Oct 31 17:50:24 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810tex.c Wed Oct 30 07:51:33 2002 @@ -21,1410 +21,410 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tex.c,v 1.7 2001/10/31 22:50:24 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tex.c,v 1.9 2002/10/30 12:51:33 alanh Exp $ */ #include #include -#include +#include "glheader.h" +#include "mtypes.h" +#include "mem.h" +#include "simple_list.h" +#include "enums.h" +#include "texstore.h" +#include "texformat.h" +#include "swrast/swrast.h" #include "mm.h" + +#include "i810screen.h" +#include "i810_dri.h" + #include "i810context.h" #include "i810tex.h" -#include "i810log.h" +#include "i810state.h" #include "i810ioctl.h" -#include "simple_list.h" -#include "enums.h" -static void i810SetTexWrapping(i810TextureObjectPtr tex, GLenum s, GLenum t) + +/* + * Compute the 'S2.4' lod bias factor from the floating point OpenGL bias. + */ +static GLuint i810ComputeLodBias(GLfloat bias) { - unsigned int val = tex->Setup[I810_TEXREG_MCS]; + int b = (int) (bias * 16.0) + 12; + if (b > 63) + b = 63; + else if (b < -64) + b = -64; + return (GLuint) (b & MLC_LOD_BIAS_MASK); +} - val &= ~(MCS_U_STATE_MASK|MCS_V_STATE_MASK); - val |= (MCS_U_WRAP|MCS_V_WRAP); - - if (s != GL_REPEAT) - val ^= (MCS_U_WRAP^MCS_U_CLAMP); + +static void i810SetTexWrapping(i810TextureObjectPtr t, + GLenum wraps, GLenum wrapt) +{ + t->Setup[I810_TEXREG_MCS] &= ~(MCS_U_STATE_MASK| MCS_V_STATE_MASK); + t->Setup[I810_TEXREG_MCS] |= (MCS_U_WRAP|MCS_V_WRAP); - if (t != GL_REPEAT) - val ^= (MCS_V_WRAP^MCS_V_CLAMP); + if (wraps != GL_REPEAT) + t->Setup[I810_TEXREG_MCS] ^= (MCS_U_WRAP^MCS_U_CLAMP); - tex->Setup[I810_TEXREG_MCS] = val; + if (wrapt != GL_REPEAT) + t->Setup[I810_TEXREG_MCS] ^= (MCS_V_WRAP^MCS_V_CLAMP); + } + static void i810SetTexFilter(i810ContextPtr imesa, i810TextureObjectPtr t, - GLenum minf, GLenum magf) + GLenum minf, GLenum magf, + GLfloat bias) { - GLuint LastLevel; + t->Setup[I810_TEXREG_MF] &= ~(MF_MIN_MASK| + MF_MAG_MASK| + MF_MIP_MASK); + t->Setup[I810_TEXREG_MLC] &= ~(MLC_LOD_BIAS_MASK); switch (minf) { case GL_NEAREST: - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MIN_MASK | MF_MIP_MASK, - MF_MIN_NEAREST | MF_MIP_NONE); + t->Setup[I810_TEXREG_MF] |= MF_MIN_NEAREST | MF_MIP_NONE; break; case GL_LINEAR: - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MIN_MASK | MF_MIP_MASK, - MF_MIN_LINEAR | MF_MIP_NONE); + t->Setup[I810_TEXREG_MF] |= MF_MIN_LINEAR | MF_MIP_NONE; break; case GL_NEAREST_MIPMAP_NEAREST: - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MIN_MASK | MF_MIP_MASK, - MF_MIN_NEAREST | MF_MIP_NEAREST); + t->Setup[I810_TEXREG_MF] |= MF_MIN_NEAREST | MF_MIP_NEAREST; + if (magf == GL_LINEAR) { + /*bias -= 0.5;*/ /* this doesn't work too good */ + } break; case GL_LINEAR_MIPMAP_NEAREST: - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MIN_MASK | MF_MIP_MASK, - MF_MIN_LINEAR | MF_MIP_NEAREST); + t->Setup[I810_TEXREG_MF] |= MF_MIN_LINEAR | MF_MIP_NEAREST; break; case GL_NEAREST_MIPMAP_LINEAR: - /* This is quite a performance hit - may want to make this - * choice user-configurable, otherwise the 815 may look slower - * than the 810 (despite having much better image quality). - */ - if (IS_I815(imesa)) { - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MIN_MASK | MF_MIP_MASK, - MF_MIN_NEAREST | MF_MIP_LINEAR ); - } else { - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MIN_MASK | MF_MIP_MASK, - MF_MIN_NEAREST | MF_MIP_DITHER ); + if (IS_I815(imesa)) + t->Setup[I810_TEXREG_MF] |= MF_MIN_NEAREST | MF_MIP_LINEAR; + else + t->Setup[I810_TEXREG_MF] |= MF_MIN_NEAREST | MF_MIP_DITHER; + /* + if (magf == GL_LINEAR) { + bias -= 0.5; } + */ + bias -= 0.5; /* always biasing here looks better */ break; case GL_LINEAR_MIPMAP_LINEAR: - if (IS_I815(imesa)) { - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MIN_MASK | MF_MIP_MASK, - MF_MIN_LINEAR | MF_MIP_LINEAR ); - } else { - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MIN_MASK | MF_MIP_MASK, - MF_MIN_LINEAR | MF_MIP_DITHER ); - } + if (IS_I815(imesa)) + t->Setup[I810_TEXREG_MF] |= MF_MIN_LINEAR | MF_MIP_LINEAR; + else + t->Setup[I810_TEXREG_MF] |= MF_MIN_LINEAR | MF_MIP_DITHER; break; default: - i810Error("i810SetTexFilter(): not supported min. filter %d\n",(int)minf); - break; + return; } switch (magf) { - case GL_NEAREST: - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MAG_MASK,MF_MAG_NEAREST); - break; - case GL_LINEAR: - I810_SET_FIELD(t->Setup[I810_TEXREG_MF], - MF_MAG_MASK,MF_MAG_LINEAR); - break; - default: - i810Error("i810SetTexFilter(): not supported mag. filter %d\n",(int)magf); - break; - } - - if (t->globj->MinFilter != GL_NEAREST && - t->globj->MinFilter != GL_LINEAR) { - LastLevel = t->max_level; - } else { - LastLevel = t->min_level; - } - - I810_SET_FIELD(t->Setup[I810_TEXREG_MLL], - MLL_MAX_MIP_MASK, - (t->min_level << (MLL_MAX_MIP_SHIFT+4))); - - I810_SET_FIELD(t->Setup[I810_TEXREG_MLL], - MLL_MIN_MIP_MASK, - (LastLevel << MLL_MIN_MIP_SHIFT)); - - /* See OpenGL 1.2 specification */ - if (magf == GL_LINEAR && (minf == GL_NEAREST_MIPMAP_NEAREST || - minf == GL_NEAREST_MIPMAP_LINEAR)) - { - /* c = 0.5 */ - I810_SET_FIELD(t->Setup[I810_TEXREG_MLC], - MLC_LOD_BIAS_MASK, - 0x10); - } else { - /* c = 0 */ - I810_SET_FIELD(t->Setup[I810_TEXREG_MLC], - MLC_LOD_BIAS_MASK, - 0x0); - } -} - - -/* Need a fallback ? - */ -static void i810SetTexBorderColor(i810TextureObjectPtr t, GLubyte color[4]) -{ -/* t->Setup[I810_TEXREG_TEXBORDERCOL] = */ -/* I810PACKCOLOR8888(color[0],color[1],color[2],color[3]); */ -} - - - -static void ReplicateMesaTexState(i810ContextPtr imesa, - i810TextureObjectPtr t, - struct gl_texture_object *mesatex) -{ - i810SetTexWrapping(t,mesatex->WrapS,mesatex->WrapT); - i810SetTexFilter(imesa, t,mesatex->MinFilter,mesatex->MagFilter); - i810SetTexBorderColor(t,mesatex->BorderColor); -} - -static i810TextureObjectPtr i810CreateTexObj(i810ContextPtr imesa, - struct gl_texture_object *tObj) -{ - i810TextureObjectPtr t; - GLuint height, width, pitch, i, textureFormat, log_pitch; - struct gl_texture_image *image; - - image = tObj->Image[ 0 ]; - if ( !image ) { - fprintf(stderr, "no image at level zero - not creating texobj\n"); - return 0; - } - - t = (i810TextureObjectPtr) calloc(1,sizeof(*t)); - if (!t) - return 0; - - switch( image->Format ) { - case GL_RGB: - case GL_LUMINANCE: - 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: - t->texelBytes = 2; - textureFormat = MI1_FMT_16BPP | MI1_PF_16BPP_ARGB4444; + case GL_NEAREST: + t->Setup[I810_TEXREG_MF] |= MF_MAG_NEAREST; break; - case GL_COLOR_INDEX: - textureFormat = MI1_FMT_8CI | MI1_PF_8CI_ARGB4444; - t->texelBytes = 1; + case GL_LINEAR: + t->Setup[I810_TEXREG_MF] |= MF_MAG_LINEAR; break; - default: - i810Error( "i810CreateTexObj: bad image->Format\n" ); - free( t ); - return 0; - } - - - /* Figure out the size now (and count the levels). Upload won't be done - * until later. - */ - width = image->Width * t->texelBytes; - for (pitch = 32, log_pitch=2 ; pitch < width ; pitch *= 2 ) - log_pitch++; - - t->dirty_images = 0; - t->bound = 0; - - for ( height = i = 0 ; i < I810_TEX_MAXLEVELS && tObj->Image[i] ; i++ ) { - t->image[i].image = tObj->Image[i]; - t->image[i].offset = height * pitch; - t->image[i].internalFormat = image->Format; - t->dirty_images |= (1<image[i].image->Height; - } - - t->Pitch = pitch; - t->totalSize = height*pitch; - t->max_level = i-1; - t->min_level = 0; - t->globj = tObj; - t->age = 0; - - t->Setup[I810_TEXREG_MI0] = GFX_OP_MAP_INFO; - - t->Setup[I810_TEXREG_MI1] = (MI1_MAP_0 | - textureFormat | - log_pitch); - - t->Setup[I810_TEXREG_MI2] = (MI2_DIMENSIONS_ARE_LOG2 | - (image->HeightLog2 << 16) | - (image->WidthLog2)); - - t->Setup[I810_TEXREG_MI3] = 0; - - t->Setup[I810_TEXREG_MLC] = (GFX_OP_MAP_LOD_CTL | - MLC_MAP_0 | - MLC_DITHER_WEIGHT_FULL | - MLC_UPDATE_LOD_BIAS | - 0x0); - - t->Setup[I810_TEXREG_MLL] = (GFX_OP_MAP_LOD_LIMITS | - MLL_MAP_0 | - MLL_UPDATE_MAX_MIP | - (t->min_level << MLL_MAX_MIP_SHIFT) | - MLL_UPDATE_MIN_MIP | - t->max_level); - - /* I think this is context state, really. - */ - t->Setup[I810_TEXREG_MCS] = (GFX_OP_MAP_COORD_SETS | - MCS_COORD_0 | - MCS_UPDATE_NORMALIZED | - MCS_NORMALIZED_COORDS | - MCS_UPDATE_V_STATE | - MCS_V_WRAP | - MCS_UPDATE_U_STATE | - MCS_U_WRAP); - - t->Setup[I810_TEXREG_MF] = (GFX_OP_MAP_FILTER | - MF_MAP_0 | - MF_UPDATE_ANISOTROPIC | - 0 | - MF_UPDATE_MIP_FILTER | - MF_MIP_NEAREST | - MF_UPDATE_MAG_FILTER | - MF_MAG_NEAREST | - MF_UPDATE_MIN_FILTER | - MF_MIN_NEAREST); - - t->current_unit = 0; - - ReplicateMesaTexState(imesa, t,tObj); - tObj->DriverData = t; - imesa->dirty |= I810_UPLOAD_CTX; - make_empty_list( t ); - return t; -} - -void i810DestroyTexObj(i810ContextPtr imesa, i810TextureObjectPtr t) -{ - if (!t) return; - - /* This is sad - need to sync *in case* we upload a texture - * to this newly free memory... - */ - if (t->MemBlock) { - mmFreeMem(t->MemBlock); - t->MemBlock = 0; - - if (t->age > imesa->dirtyAge) - imesa->dirtyAge = t->age; - } - - if (t->globj) - t->globj->DriverData = 0; - - if (t->bound) - imesa->CurrentTexObj[t->bound - 1] = 0; - - remove_from_list(t); - free(t); -} - - -static void i810SwapOutTexObj(i810ContextPtr imesa, i810TextureObjectPtr t) -{ - if (t->MemBlock) { - mmFreeMem(t->MemBlock); - t->MemBlock = 0; - - if (t->age > imesa->dirtyAge) - imesa->dirtyAge = t->age; - } - - t->dirty_images = ~0; - move_to_tail(&(imesa->SwappedOut), t); -} - - - -/* Upload an image from mesa's internal copy. - */ -static void i810UploadTexLevel( i810TextureObjectPtr t, int level ) -{ - const struct gl_texture_image *image = t->image[level].image; - int i,j; - - if (I810_DEBUG & DEBUG_VERBOSE_LRU) - fprintf(stderr, "i810UploadTexLevel %d, BufAddr %p offset %x\n", - level, t->BufAddr, t->image[level].offset); - - /* Need triangle (rather than pixel) fallbacks to simulate this using - * normal textured triangles. - * - * DO THIS IN DRIVER STATE MANAGMENT, not hardware state. - * - if (image->Border != 0) - i810Error("Not supported texture border %d.\n", (int) image->Border); - */ - - switch (t->image[level].internalFormat) { - case GL_RGB: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = I810PACKCOLOR565(src[0],src[1],src[2]); - src += 3; - } - } - } - break; - - case GL_RGBA: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = I810PACKCOLOR4444(src[0],src[1],src[2],src[3]); - src += 4; - } - } - } - break; - - case GL_LUMINANCE: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = I810PACKCOLOR565(src[0],src[0],src[0]); - src ++; - } - } - } - break; - - case GL_INTENSITY: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - int i; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = I810PACKCOLOR4444(src[0],src[0],src[0],src[0]); - src ++; - } - } - } - break; - - case GL_LUMINANCE_ALPHA: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = I810PACKCOLOR4444(src[0],src[0],src[0],src[1]); - src += 2; - } - } - } - break; - - case GL_ALPHA: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = I810PACKCOLOR4444(255,255,255,src[0]); - src += 1; - } - } - } - break; - - /* TODO: Translate color indices *now*: - */ - case GL_COLOR_INDEX: - { - GLubyte *dst = (GLubyte *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += t->Pitch) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = src[0]; - src += 1; - } - } - } - break; - - default: - i810Error("Not supported texture format %s\n", - gl_lookup_enum_by_nr(image->Format)); - } -} - - - -void i810PrintLocalLRU( i810ContextPtr imesa ) -{ - i810TextureObjectPtr t; - int sz = 1 << (imesa->i810Screen->logTextureGranularity); - - foreach( t, &imesa->TexObjList ) { - if (!t->globj) - fprintf(stderr, "Placeholder %d at %x sz %x\n", - t->MemBlock->ofs / sz, - t->MemBlock->ofs, - t->MemBlock->size); - else - fprintf(stderr, "Texture (bound %d) at %x sz %x\n", - t->bound, - t->MemBlock->ofs, - t->MemBlock->size); - - } -} - -void i810PrintGlobalLRU( i810ContextPtr imesa ) -{ - int i, j; - drm_i810_tex_region_t *list = imesa->sarea->texList; - - for (i = 0, j = I810_NR_TEX_REGIONS ; i < I810_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 == I810_NR_TEX_REGIONS) break; - } - - if (j != I810_NR_TEX_REGIONS) - fprintf(stderr, "Loop detected in global LRU\n"); -} - - -void i810ResetGlobalLRU( i810ContextPtr imesa ) -{ - drm_i810_tex_region_t *list = imesa->sarea->texList; - int sz = 1 << imesa->i810Screen->logTextureGranularity; - int i; - - /* (Re)initialize the global circular LRU list. The last element - * in the array (I810_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 <= imesa->i810Screen->textureSize ; i++) { - list[i].prev = i-1; - list[i].next = i+1; - list[i].age = 0; + default: + return; } - i--; - list[0].prev = I810_NR_TEX_REGIONS; - list[i].prev = i-1; - list[i].next = I810_NR_TEX_REGIONS; - list[I810_NR_TEX_REGIONS].prev = i; - list[I810_NR_TEX_REGIONS].next = 0; - imesa->sarea->texAge = 0; + t->Setup[I810_TEXREG_MLC] |= i810ComputeLodBias(bias); } -static void i810UpdateTexLRU( i810ContextPtr imesa, i810TextureObjectPtr t ) +static void i810SetTexBorderColor(i810TextureObjectPtr t, + GLubyte color[4]) { - int i; - int logsz = imesa->i810Screen->logTextureGranularity; - int start = t->MemBlock->ofs >> logsz; - int end = (t->MemBlock->ofs + t->MemBlock->size - 1) >> logsz; - drm_i810_tex_region_t *list = imesa->sarea->texList; - - imesa->texAge = ++imesa->sarea->texAge; - - /* Update our local LRU + /* Need a fallback. */ - move_to_head( &(imesa->TexObjList), t ); - - /* Update the global LRU - */ - for (i = start ; i <= end ; i++) { - - list[i].in_use = 1; - list[i].age = imesa->texAge; - - /* remove_from_list(i) - */ - 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 = I810_NR_TEX_REGIONS; - list[i].next = list[I810_NR_TEX_REGIONS].next; - list[(unsigned)list[I810_NR_TEX_REGIONS].next].prev = i; - list[I810_NR_TEX_REGIONS].next = i; - } -} - - -/* Called for every shared texture region which has increased in age - * 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. - */ -void i810TexturesGone( i810ContextPtr imesa, - GLuint offset, - GLuint size, - GLuint in_use ) -{ - i810TextureObjectPtr t, tmp; - - foreach_s ( t, tmp, &imesa->TexObjList ) { - - if (t->MemBlock->ofs >= offset + size || - t->MemBlock->ofs + t->MemBlock->size <= offset) - continue; - - /* It overlaps - kick it off. Need to hold onto the currently bound - * objects, however. - */ - if (t->bound) - i810SwapOutTexObj( imesa, t ); - else - i810DestroyTexObj( imesa, t ); - } - - - if (in_use) { - t = (i810TextureObjectPtr) calloc(1,sizeof(*t)); - if (!t) return; - - t->MemBlock = mmAllocMem( imesa->texHeap, size, 0, offset); - insert_at_head( &imesa->TexObjList, t ); - } } - - - - -/* This is called with the lock held. May have to eject our own and/or - * other client's texture objects to make room for the upload. - */ -int i810UploadTexImages( i810ContextPtr imesa, i810TextureObjectPtr t ) -{ - int i; - int ofs; - - /* Do we need to eject LRU texture objects? - */ - if (!t->MemBlock) { - while (1) - { - t->MemBlock = mmAllocMem( imesa->texHeap, t->totalSize, 12, 0 ); - if (t->MemBlock) - break; - - if (imesa->TexObjList.prev->bound) { - fprintf(stderr, "Hit bound texture in upload\n"); - i810PrintLocalLRU( imesa ); - return -1; - } - - if (imesa->TexObjList.prev == &(imesa->TexObjList)) { - fprintf(stderr, "Failed to upload texture, sz %d\n", t->totalSize); - mmDumpMemInfo( imesa->texHeap ); - return -1; - } - - i810DestroyTexObj( imesa, imesa->TexObjList.prev ); - } - - ofs = t->MemBlock->ofs; - t->Setup[I810_TEXREG_MI3] = imesa->i810Screen->textureOffset + ofs; - t->BufAddr = imesa->i810Screen->tex.map + ofs; - imesa->dirty |= I810_UPLOAD_CTX; - } - - /* Let the world know we've used this memory recently. - */ - i810UpdateTexLRU( imesa, t ); - if (I810_DEBUG & DEBUG_VERBOSE_LRU) - fprintf(stderr, "dispatch age: %d age freed memory: %d\n", - GET_DISPATCH_AGE(imesa), imesa->dirtyAge); - - if (imesa->dirtyAge >= GET_DISPATCH_AGE(imesa)) - i810WaitAgeLocked( imesa, imesa->dirtyAge ); - - - if (t->dirty_images) { - if (I810_DEBUG & DEBUG_VERBOSE_LRU) - fprintf(stderr, "*"); - - for (i = t->min_level ; i <= t->max_level ; i++) - if (t->dirty_images & (1<dirty_images = 0; - return 0; -} - -static void i810TexSetUnit( i810TextureObjectPtr t, GLuint unit ) -{ - if (t->current_unit == unit) return; - - t->Setup[I810_TEXREG_MI1] ^= (MI1_MAP_0 ^ MI1_MAP_1); - t->Setup[I810_TEXREG_MLC] ^= (MLC_MAP_0 ^ MLC_MAP_1); - t->Setup[I810_TEXREG_MLL] ^= (MLL_MAP_0 ^ MLL_MAP_1); - t->Setup[I810_TEXREG_MCS] ^= (MCS_COORD_0 ^ MCS_COORD_1); - t->Setup[I810_TEXREG_MF] ^= (MF_MAP_0 ^ MF_MAP_1); - - t->current_unit = unit; -} - - - - -static void i810UpdateTex0State( GLcontext *ctx ) +static void i810TexParameter( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj, + GLenum pname, const GLfloat *params ) { i810ContextPtr imesa = I810_CONTEXT(ctx); - struct gl_texture_object *tObj; - i810TextureObjectPtr t; - int ma_modulate_op; - int format; - - /* 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 ); - 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 ); - - if (ctx->Texture.Unit[0].ReallyEnabled == 0) { + i810TextureObjectPtr t = (i810TextureObjectPtr) tObj->DriverData; + if (!t) return; - } - 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; + if ( target != GL_TEXTURE_2D ) 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->current_unit != 0) - i810TexSetUnit( t, 0 ); - - if (t->dirty_images) - imesa->dirty |= I810_UPLOAD_TEX0IMAGE; - - imesa->CurrentTexObj[0] = t; - t->bound = 1; - - if (t->MemBlock) - i810UpdateTexLRU( imesa, t ); - - format = t->image[0].internalFormat; - - switch (ctx->Texture.Unit[0].EnvMode) { - case GL_REPLACE: - if (format == GL_ALPHA) - 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 - 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_ONE | - MC_UPDATE_OP | - MC_OP_ARG1 ); - - if (format == GL_RGB) { - ma_modulate_op = MA_OP_ARG1; - } else { - ma_modulate_op = MA_OP_ARG2; - } - - 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_modulate_op ); - break; - case GL_MODULATE: - 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_MODULATE ); - - if (format == GL_RGB) { - ma_modulate_op = MA_OP_ARG1; - } else { - ma_modulate_op = MA_OP_MODULATE; + /* Can't do the update now as we don't know whether to flush + * vertices or not. Setting imesa->new_state means that + * i810UpdateTextureState() will be called before any triangles are + * rendered. If a statechange has occurred, it will be detected at + * that point, and buffered vertices flushed. + */ + switch (pname) { + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_MAG_FILTER: + { + GLfloat bias = ctx->Texture.Unit[ctx->Texture.CurrentUnit].LodBias; + i810SetTexFilter( imesa, t, tObj->MinFilter, tObj->MagFilter, bias ); } - - 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 ); break; - case GL_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 ); - } - - /* 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 ); - } + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + i810SetTexWrapping( t, tObj->WrapS, tObj->WrapT ); break; - - case GL_DECAL: - if (format == GL_RGB) { - /* C = 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_COLOR_FACTOR | - MC_UPDATE_ARG2 | - MC_ARG2_TEX0_COLOR | - MC_UPDATE_OP | - 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_TEX0_COLOR | - MC_UPDATE_ARG2 | - 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_ITERATED_ALPHA | - MA_UPDATE_ARG2 | - MA_ARG2_ITERATED_ALPHA | - MA_UPDATE_OP | - MA_OP_ARG1 ); + + case GL_TEXTURE_BORDER_COLOR: + i810SetTexBorderColor( t, tObj->BorderColor ); break; - case GL_BLEND: - if (format == GL_ALPHA) - 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 - 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_UPDATE_ARG2 | - MC_ARG2_ITERATED_COLOR | - MC_UPDATE_OP | - MC_OP_LIN_BLEND_TEX0_COLOR ); - - /* 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 | - MA_ARG1_ALPHA_FACTOR | - MA_UPDATE_ARG2 | - MA_ARG2_ITERATED_ALPHA | - MA_UPDATE_OP | - 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_TEX0_ALPHA | - MA_UPDATE_ARG2 | - MA_ARG2_ITERATED_ALPHA | - MA_UPDATE_OP | - MA_OP_MODULATE ); - } + + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + /* This isn't the most efficient solution but there doesn't appear to + * be a nice alternative for Radeon. Since there's no LOD clamping, + * we just have to rely on loading the right subset of mipmap levels + * to simulate a clamped LOD. + */ + i810SwapOutTexObj( imesa, t ); break; default: - fprintf(stderr, "unknown tex env mode"); - exit(1); - break; - } -} - - - -static void i810UpdateTex1State( GLcontext *ctx ) -{ - i810ContextPtr imesa = I810_CONTEXT(ctx); - struct gl_texture_object *tObj; - i810TextureObjectPtr t; - 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 ); - 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 ); - - 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; + if (t == imesa->CurrentTexObj[0]) { + I810_STATECHANGE( imesa, I810_UPLOAD_TEX0 ); } - - /* 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 == imesa->CurrentTexObj[1]) { + I810_STATECHANGE( imesa, I810_UPLOAD_TEX1 ); } - - if (t->current_unit != 1) - i810TexSetUnit( t, 1 ); - - if (t->dirty_images) - imesa->dirty |= I810_UPLOAD_TEX1IMAGE; - - imesa->CurrentTexObj[1] = t; - t->bound = 2; - - 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 | - MC_STAGE_1 | - MC_UPDATE_DEST | - MC_DEST_CURRENT | - MC_UPDATE_ARG1 | - MC_ARG1_TEX1_COLOR | - MC_UPDATE_ARG2 | - MC_ARG2_ONE | - MC_UPDATE_OP | - MC_OP_ARG1 ); - - if (format == GL_RGB) { - ma_modulate_op = MA_OP_ARG1; - } else { - ma_modulate_op = MA_OP_ARG2; - } - - imesa->Setup[I810_CTXREG_MA1] = ( GFX_OP_MAP_ALPHA_STAGES | - MA_STAGE_1 | - MA_UPDATE_ARG1 | - MA_ARG1_CURRENT_ALPHA | - MA_UPDATE_ARG2 | - MA_ARG2_TEX1_ALPHA | - MA_UPDATE_OP | - ma_modulate_op ); - break; - case GL_MODULATE: - imesa->Setup[I810_CTXREG_MC1] = ( GFX_OP_MAP_COLOR_STAGES | - MC_STAGE_1 | - MC_UPDATE_DEST | - MC_DEST_CURRENT | - MC_UPDATE_ARG1 | - MC_ARG1_TEX1_COLOR | - MC_UPDATE_ARG2 | - MC_ARG2_CURRENT_COLOR | - MC_UPDATE_OP | - MC_OP_MODULATE ); - - if (format == GL_RGB) { - ma_modulate_op = MA_OP_ARG1; - } else { - ma_modulate_op = MA_OP_MODULATE; - } - - imesa->Setup[I810_CTXREG_MA1] = ( GFX_OP_MAP_ALPHA_STAGES | - MA_STAGE_1 | - MA_UPDATE_ARG1 | - MA_ARG1_CURRENT_ALPHA | - MA_UPDATE_ARG2 | - MA_ARG2_TEX1_ALPHA | - MA_UPDATE_OP | - ma_modulate_op ); - break; - - case GL_ADD: - imesa->Setup[I810_CTXREG_MC1] = ( GFX_OP_MAP_COLOR_STAGES | - MC_STAGE_1 | - MC_UPDATE_DEST | - MC_DEST_CURRENT | - MC_UPDATE_ARG1 | - MC_ARG1_TEX1_COLOR | - MC_UPDATE_ARG2 | - MC_ARG2_CURRENT_COLOR | - MC_UPDATE_OP | - MC_OP_ADD ); - - if (format == GL_RGB) { - ma_modulate_op = MA_OP_ARG1; - } else { - ma_modulate_op = MA_OP_ADD; - } - - imesa->Setup[I810_CTXREG_MA1] = ( GFX_OP_MAP_ALPHA_STAGES | - MA_STAGE_1 | - MA_UPDATE_ARG1 | - MA_ARG1_CURRENT_ALPHA | - MA_UPDATE_ARG2 | - MA_ARG2_TEX1_ALPHA | - MA_UPDATE_OP | - ma_modulate_op ); - break; - - - case GL_DECAL: - if (format == GL_RGB) { - imesa->Setup[I810_CTXREG_MC1] = ( GFX_OP_MAP_COLOR_STAGES | - MC_STAGE_1 | - MC_UPDATE_DEST | - MC_DEST_CURRENT | - MC_UPDATE_ARG1 | - MC_ARG1_COLOR_FACTOR | - MC_UPDATE_ARG2 | - MC_ARG2_TEX1_COLOR | - MC_UPDATE_OP | - MC_OP_ARG2 ); - - } else { - imesa->Setup[I810_CTXREG_MC1] = ( GFX_OP_MAP_COLOR_STAGES | - MC_STAGE_1 | - MC_UPDATE_DEST | - MC_DEST_CURRENT | - MC_UPDATE_ARG1 | - MC_ARG1_COLOR_FACTOR | - MC_UPDATE_ARG2 | - MC_ARG2_TEX1_COLOR | - MC_UPDATE_OP | - MC_OP_LIN_BLEND_TEX1_ALPHA ); - } - - imesa->Setup[I810_CTXREG_MA1] = ( GFX_OP_MAP_ALPHA_STAGES | - MA_STAGE_1 | - MA_UPDATE_ARG1 | - MA_ARG1_ALPHA_FACTOR | - MA_UPDATE_ARG2 | - MA_ARG2_ALPHA_FACTOR | - MA_UPDATE_OP | - MA_OP_ARG1 ); - break; - - case GL_BLEND: - imesa->Setup[I810_CTXREG_MC1] = ( GFX_OP_MAP_COLOR_STAGES | - MC_STAGE_1 | - MC_UPDATE_DEST | - MC_DEST_CURRENT | - MC_UPDATE_ARG1 | - MC_ARG1_COLOR_FACTOR | - MC_UPDATE_ARG2 | - MC_ARG2_CURRENT_COLOR | - MC_UPDATE_OP | - MC_OP_LIN_BLEND_TEX1_COLOR ); - - if (format == GL_RGB) { - imesa->Setup[I810_CTXREG_MA1] = ( GFX_OP_MAP_ALPHA_STAGES | - MA_STAGE_1 | - MA_UPDATE_ARG1 | - MA_ARG1_ALPHA_FACTOR | - MA_UPDATE_ARG2 | - MA_ARG2_CURRENT_ALPHA | - MA_UPDATE_OP | - MA_OP_ARG1 ); - } else { - imesa->Setup[I810_CTXREG_MA1] = ( GFX_OP_MAP_ALPHA_STAGES | - MA_STAGE_1 | - MA_UPDATE_ARG1 | - MA_ARG1_ALPHA_FACTOR | - MA_UPDATE_ARG2 | - MA_ARG2_ITERATED_ALPHA | - MA_UPDATE_OP | - MA_OP_LIN_BLEND_TEX1_ALPHA ); - } - break; - - default: - fprintf(stderr, "unkown tex 1 env mode\n"); - exit(1); - break; - } -} - - -void i810UpdateTextureState( GLcontext *ctx ) -{ - i810ContextPtr imesa = I810_CONTEXT(ctx); - if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->bound = 0; - 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); } - -/***************************************** - * DRIVER functions - *****************************************/ - static void i810TexEnv( GLcontext *ctx, GLenum target, GLenum pname, const GLfloat *param ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); - - if (pname == GL_TEXTURE_ENV_MODE) { - - FLUSH_BATCH(imesa); - imesa->new_state |= I810_NEW_TEXTURE; - - } else if (pname == GL_TEXTURE_ENV_COLOR) { + GLuint unit = ctx->Texture.CurrentUnit; - struct gl_texture_unit *texUnit = - &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - const GLfloat *fc = texUnit->EnvColor; + /* Only one env color. Need a fallback if env colors are different + * and texture setup references env color in both units. + */ + switch (pname) { + case GL_TEXTURE_ENV_COLOR: { + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + 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]); + CLAMPED_FLOAT_TO_UBYTE(r, fc[0]); + CLAMPED_FLOAT_TO_UBYTE(g, fc[1]); + CLAMPED_FLOAT_TO_UBYTE(b, fc[2]); + CLAMPED_FLOAT_TO_UBYTE(a, fc[3]); col = ((a << 24) | (r << 16) | (g << 8) | (b << 0)); - + if (imesa->Setup[I810_CTXREG_CF1] != col) { - FLUSH_BATCH(imesa); + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); imesa->Setup[I810_CTXREG_CF1] = col; - imesa->dirty |= I810_UPLOAD_CTX; } - } -} - -static void i810TexImage( GLcontext *ctx, - GLenum target, - struct gl_texture_object *tObj, - GLint level, - GLint internalFormat, - const struct gl_texture_image *image ) -{ - i810ContextPtr imesa = I810_CONTEXT( ctx ); - i810TextureObjectPtr t; - - if (target != GL_TEXTURE_2D) - return; + break; + } + case GL_TEXTURE_ENV_MODE: + imesa->TexEnvImageFmt[unit] = 0; /* force recalc of env state */ + break; - if (level >= I810_TEX_MAXLEVELS) - return; + case GL_TEXTURE_LOD_BIAS_EXT: + { + struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current; + i810TextureObjectPtr t = (i810TextureObjectPtr) tObj->DriverData; + t->Setup[I810_TEXREG_MLC] &= ~(MLC_LOD_BIAS_MASK); + t->Setup[I810_TEXREG_MLC] |= i810ComputeLodBias(*param); + } + break; - t = (i810TextureObjectPtr) tObj->DriverData; - if (t) { - if (t->bound) FLUSH_BATCH(imesa); - /* if this is the current object, it will force an update */ - i810DestroyTexObj( imesa, t ); - tObj->DriverData = 0; - imesa->new_state |= I810_NEW_TEXTURE; + default: + break; } -} +} -static void i810TexSubImage( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLint internalFormat, - const struct gl_texture_image *image ) +#if 0 +static void i810TexImage1D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *pack, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) { - i810ContextPtr imesa = I810_CONTEXT( ctx ); - i810TextureObjectPtr t; - - if ( target != GL_TEXTURE_2D ) - return; - - t = (i810TextureObjectPtr) tObj->DriverData; + i810TextureObjectPtr t = (i810TextureObjectPtr) texObj->DriverData; if (t) { - if (t->bound) FLUSH_BATCH( imesa ); - i810DestroyTexObj( imesa, t ); - tObj->DriverData = 0; - imesa->new_state |= I810_NEW_TEXTURE; + i810SwapOutTexObj( imesa, t ); } } -static void i810TexParameter( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, - GLenum pname, const GLfloat *params ) +static void i810TexSubImage1D( GLcontext *ctx, + GLenum target, + GLint level, + GLint xoffset, + GLsizei width, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *pack, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) { - i810TextureObjectPtr t = (i810TextureObjectPtr) tObj->DriverData; - i810ContextPtr imesa = I810_CONTEXT( ctx ); +} +#endif - if (!t || target != GL_TEXTURE_2D) - return; - switch (pname) { - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MAG_FILTER: - if (t->bound) FLUSH_BATCH( imesa ); - i810SetTexFilter(imesa, t,tObj->MinFilter,tObj->MagFilter); - break; - - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - if (t->bound) FLUSH_BATCH( imesa ); - i810SetTexWrapping(t,tObj->WrapS,tObj->WrapT); - break; - - case GL_TEXTURE_BORDER_COLOR: - if (t->bound) FLUSH_BATCH( imesa ); - i810SetTexBorderColor(t,tObj->BorderColor); - break; - - default: - return; +static void i810TexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + i810TextureObjectPtr t = (i810TextureObjectPtr) texObj->DriverData; + if (t) { + i810SwapOutTexObj( I810_CONTEXT(ctx), t ); } + _mesa_store_teximage2d( ctx, target, level, internalFormat, + width, height, border, format, type, + pixels, packing, texObj, texImage ); +} + +static void i810TexSubImage2D( 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 ) +{ + i810TextureObjectPtr t = (i810TextureObjectPtr) texObj->DriverData; + if (t) { + i810SwapOutTexObj( I810_CONTEXT(ctx), t ); + } + _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, + height, format, type, pixels, packing, texObj, + texImage); - imesa->new_state |= I810_NEW_TEXTURE; } + static void i810BindTexture( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj ) { - i810ContextPtr imesa = I810_CONTEXT( ctx ); - - FLUSH_BATCH(imesa); - - if (imesa->CurrentTexObj[ctx->Texture.CurrentUnit]) { - imesa->CurrentTexObj[ctx->Texture.CurrentUnit]->bound = 0; - imesa->CurrentTexObj[ctx->Texture.CurrentUnit] = 0; + if (target == GL_TEXTURE_2D) { + i810ContextPtr imesa = I810_CONTEXT( ctx ); + i810TextureObjectPtr t = (i810TextureObjectPtr) tObj->DriverData; + + if (!t) { + GLfloat bias = ctx->Texture.Unit[ctx->Texture.CurrentUnit].LodBias; + t = CALLOC_STRUCT(i810_texture_object_t); + + /* Initialize non-image-dependent parts of the state: + */ + t->globj = tObj; + t->Setup[I810_TEXREG_MI0] = GFX_OP_MAP_INFO; + t->Setup[I810_TEXREG_MI1] = MI1_MAP_0; + t->Setup[I810_TEXREG_MI2] = MI2_DIMENSIONS_ARE_LOG2; + t->Setup[I810_TEXREG_MLC] = (GFX_OP_MAP_LOD_CTL | + MLC_MAP_0 | + /*MLC_DITHER_WEIGHT_FULL |*/ + MLC_DITHER_WEIGHT_12 | + MLC_UPDATE_LOD_BIAS | + 0x0); + t->Setup[I810_TEXREG_MCS] = (GFX_OP_MAP_COORD_SETS | + MCS_COORD_0 | + MCS_UPDATE_NORMALIZED | + MCS_NORMALIZED_COORDS | + MCS_UPDATE_V_STATE | + MCS_V_WRAP | + MCS_UPDATE_U_STATE | + MCS_U_WRAP); + t->Setup[I810_TEXREG_MF] = (GFX_OP_MAP_FILTER | + MF_MAP_0 | + MF_UPDATE_ANISOTROPIC | + MF_UPDATE_MIP_FILTER | + MF_UPDATE_MAG_FILTER | + MF_UPDATE_MIN_FILTER); + + t->dirty_images = ~0; + + tObj->DriverData = t; + make_empty_list( t ); + + i810SetTexWrapping( t, tObj->WrapS, tObj->WrapT ); + i810SetTexFilter( imesa, t, tObj->MinFilter, tObj->MagFilter, bias ); + i810SetTexBorderColor( t, tObj->BorderColor ); + } } - - imesa->new_state |= I810_NEW_TEXTURE; } + static void i810DeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) { i810TextureObjectPtr t = (i810TextureObjectPtr)tObj->DriverData; - i810ContextPtr imesa = I810_CONTEXT( ctx ); if (t) { - - if (t->bound) { - FLUSH_BATCH(imesa); - imesa->CurrentTexObj[t->bound-1] = 0; - imesa->new_state |= I810_NEW_TEXTURE; - } - - i810DestroyTexObj(imesa,t); - tObj->DriverData=0; + i810ContextPtr imesa = I810_CONTEXT( ctx ); + if (imesa) + I810_FIREVERTICES( imesa ); + i810DestroyTexObj( imesa, t ); + tObj->DriverData = 0; } } - static GLboolean i810IsTextureResident( GLcontext *ctx, - struct gl_texture_object *t ) + struct gl_texture_object *tObj ) { - i810TextureObjectPtr mt; - -/* LOCK_HARDWARE; */ - mt = (i810TextureObjectPtr)t->DriverData; -/* UNLOCK_HARDWARE; */ - - return mt && mt->MemBlock; + i810TextureObjectPtr t = (i810TextureObjectPtr)tObj->DriverData; + return t && t->MemBlock; } -void i810DDInitTextureFuncs( GLcontext *ctx ) +void i810InitTextureFuncs( GLcontext *ctx ) { ctx->Driver.TexEnv = i810TexEnv; - ctx->Driver.TexImage = i810TexImage; - ctx->Driver.TexSubImage = i810TexSubImage; + ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format; + ctx->Driver.TexImage1D = _mesa_store_teximage1d; + ctx->Driver.TexImage2D = i810TexImage2D; + ctx->Driver.TexImage3D = _mesa_store_teximage3d; + ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d; + ctx->Driver.TexSubImage2D = i810TexSubImage2D; + ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; + ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; + ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; + ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; + ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; + ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; ctx->Driver.BindTexture = i810BindTexture; ctx->Driver.DeleteTexture = i810DeleteTexture; ctx->Driver.TexParameter = i810TexParameter; ctx->Driver.UpdateTexturePalette = 0; ctx->Driver.IsTextureResident = i810IsTextureResident; + ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; + + { + GLuint tmp = ctx->Texture.CurrentUnit; + ctx->Texture.CurrentUnit = 0; + i810BindTexture( ctx, GL_TEXTURE_2D, ctx->Texture.Unit[0].Current2D); + ctx->Texture.CurrentUnit = 1; + i810BindTexture( ctx, GL_TEXTURE_2D, ctx->Texture.Unit[1].Current2D); + ctx->Texture.CurrentUnit = tmp; + } } Index: xc/lib/GL/mesa/src/drv/i810/i810tex.h diff -u xc/lib/GL/mesa/src/drv/i810/i810tex.h:1.2 xc/lib/GL/mesa/src/drv/i810/i810tex.h:1.3 --- xc/lib/GL/mesa/src/drv/i810/i810tex.h:1.2 Fri Jun 16 20:03:00 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810tex.h Fri Feb 22 16:33:04 2002 @@ -26,14 +26,13 @@ #ifndef I810TEX_INC #define I810TEX_INC -#include "types.h" +#include "mtypes.h" #include "mmath.h" #include "mm.h" #include "i810context.h" #include "i810_3d_reg.h" -#define VALID_I810_TEXTURE_OBJECT(tobj) (tobj) #define I810_TEX_MAXLEVELS 10 @@ -61,12 +60,10 @@ int Height; int texelBytes; int totalSize; - int bound; PMemBlock MemBlock; char *BufAddr; - GLuint min_level; GLuint max_level; GLuint dirty_images; @@ -77,22 +74,18 @@ int internalFormat; } image[I810_TEX_MAXLEVELS]; - /* Support for multitexture. - */ - GLuint current_unit; GLuint Setup[I810_TEX_SETUP_SIZE]; -}; + GLuint dirty; -#define I810_NO_PALETTE 0x0 -#define I810_USE_PALETTE 0x1 -#define I810_UPDATE_PALETTE 0x2 -#define I810_FALLBACK_PALETTE 0x4 + GLint firstLevel, lastLevel; /* upload tObj->Image[first .. lastLevel] */ +}; void i810UpdateTextureState( GLcontext *ctx ); -void i810DDInitTextureFuncs( GLcontext *ctx ); +void i810InitTextureFuncs( GLcontext *ctx ); -void i810DestroyTexObj( i810ContextPtr imesa, i810TextureObjectPtr t); -int i810UploadTexImages( i810ContextPtr imesa, i810TextureObjectPtr t ); +void i810DestroyTexObj( i810ContextPtr imesa, i810TextureObjectPtr t ); +void i810SwapOutTexObj( i810ContextPtr imesa, i810TextureObjectPtr t ); +void i810UploadTexImages( i810ContextPtr imesa, i810TextureObjectPtr t ); void i810ResetGlobalLRU( i810ContextPtr imesa ); void i810TexturesGone( i810ContextPtr imesa, @@ -101,6 +94,7 @@ void i810PrintLocalLRU( i810ContextPtr imesa ); void i810PrintGlobalLRU( i810ContextPtr imesa ); +void i810UpdateTexLRU( i810ContextPtr imesa, i810TextureObjectPtr t ); Index: xc/lib/GL/mesa/src/drv/i810/i810texmem.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i810/i810texmem.c:1.2 --- /dev/null Thu Feb 27 12:26:25 2003 +++ xc/lib/GL/mesa/src/drv/i810/i810texmem.c Wed Oct 30 07:51:33 2002 @@ -0,0 +1,414 @@ +/* + * GLX Hardware Device Driver for Intel i810 + * 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: + * + * 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 +#include + +#include "glheader.h" +#include "macros.h" +#include "mtypes.h" +#include "simple_list.h" +#include "enums.h" + +#include "mm.h" + +#include "i810screen.h" +#include "i810_dri.h" + +#include "i810context.h" +#include "i810tex.h" +#include "i810state.h" +#include "i810ioctl.h" + + +void i810DestroyTexObj(i810ContextPtr imesa, i810TextureObjectPtr t) +{ + if (!t) return; + + /* This is sad - need to sync *in case* we upload a texture + * to this newly free memory... + */ + if (t->MemBlock) { + mmFreeMem(t->MemBlock); + t->MemBlock = 0; + + if (imesa && t->age > imesa->dirtyAge) + imesa->dirtyAge = t->age; + } + + if (t->globj) + t->globj->DriverData = 0; + + if (imesa) { + if (imesa->CurrentTexObj[0] == t) { + imesa->CurrentTexObj[0] = 0; + imesa->dirty &= ~I810_UPLOAD_TEX0; + } + + if (imesa->CurrentTexObj[1] == t) { + imesa->CurrentTexObj[1] = 0; + imesa->dirty &= ~I810_UPLOAD_TEX1; + } + } + + remove_from_list(t); + free(t); +} + + +void i810SwapOutTexObj(i810ContextPtr imesa, i810TextureObjectPtr t) +{ +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + if (t->MemBlock) { + mmFreeMem(t->MemBlock); + t->MemBlock = 0; + + if (t->age > imesa->dirtyAge) + imesa->dirtyAge = t->age; + } + + t->dirty_images = ~0; + move_to_tail(&(imesa->SwappedOut), t); +} + + + +/* Upload an image from mesa's internal copy. + */ +static void i810UploadTexLevel( i810TextureObjectPtr t, int level ) +{ + const struct gl_texture_image *image = t->image[level].image; + int i,j; + + switch (t->image[level].internalFormat) { + case GL_RGB: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = PACK_COLOR_565( src[0], src[1], src[2] ); + src += 3; + } + } + } + break; + + case GL_RGBA: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = PACK_COLOR_4444( src[3], src[0], src[1], src[2] ); + src += 4; + } + } + } + break; + + case GL_LUMINANCE: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = PACK_COLOR_565( src[0], src[0], src[0] ); + src ++; + } + } + } + break; + + case GL_INTENSITY: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + int i; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = PACK_COLOR_4444( src[0], src[0], src[0], src[0] ); + src ++; + } + } + } + break; + + case GL_LUMINANCE_ALPHA: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = PACK_COLOR_4444( src[1], src[0], src[0], src[0] ); + src += 2; + } + } + } + break; + + case GL_ALPHA: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = PACK_COLOR_4444( src[0], 255, 255, 255 ); + src += 1; + } + } + } + break; + + /* TODO: Translate color indices *now*: + */ + case GL_COLOR_INDEX: + { + GLubyte *dst = (GLubyte *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += t->Pitch) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = src[0]; + src += 1; + } + } + } + break; + + default: + fprintf(stderr, "Not supported texture format %s\n", + _mesa_lookup_enum_by_nr(image->Format)); + } +} + + + +void i810PrintLocalLRU( i810ContextPtr imesa ) +{ + i810TextureObjectPtr t; + int sz = 1 << (imesa->i810Screen->logTextureGranularity); + + foreach( t, &imesa->TexObjList ) { + if (!t->globj) + fprintf(stderr, "Placeholder %d at %x sz %x\n", + t->MemBlock->ofs / sz, + t->MemBlock->ofs, + t->MemBlock->size); + else + fprintf(stderr, "Texture at %x sz %x\n", + t->MemBlock->ofs, + t->MemBlock->size); + + } +} + +void i810PrintGlobalLRU( i810ContextPtr imesa ) +{ + int i, j; + I810TexRegionRec *list = imesa->sarea->texList; + + for (i = 0, j = I810_NR_TEX_REGIONS ; i < I810_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 == I810_NR_TEX_REGIONS) break; + } + + if (j != I810_NR_TEX_REGIONS) + fprintf(stderr, "Loop detected in global LRU\n"); +} + + +void i810ResetGlobalLRU( i810ContextPtr imesa ) +{ + I810TexRegionRec *list = imesa->sarea->texList; + int sz = 1 << imesa->i810Screen->logTextureGranularity; + int i; + + /* (Re)initialize the global circular LRU list. The last element + * in the array (I810_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 <= imesa->i810Screen->textureSize ; i++) { + list[i].prev = i-1; + list[i].next = i+1; + list[i].age = 0; + } + + i--; + list[0].prev = I810_NR_TEX_REGIONS; + list[i].prev = i-1; + list[i].next = I810_NR_TEX_REGIONS; + list[I810_NR_TEX_REGIONS].prev = i; + list[I810_NR_TEX_REGIONS].next = 0; + imesa->sarea->texAge = 0; +} + + +void i810UpdateTexLRU( i810ContextPtr imesa, i810TextureObjectPtr t ) +{ + int i; + int logsz = imesa->i810Screen->logTextureGranularity; + int start = t->MemBlock->ofs >> logsz; + int end = (t->MemBlock->ofs + t->MemBlock->size - 1) >> logsz; + I810TexRegionRec *list = imesa->sarea->texList; + + imesa->texAge = ++imesa->sarea->texAge; + + /* Update our local LRU + */ + move_to_head( &(imesa->TexObjList), t ); + + /* Update the global LRU + */ + for (i = start ; i <= end ; i++) { + + list[i].in_use = 1; + list[i].age = imesa->texAge; + + /* remove_from_list(i) + */ + 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 = I810_NR_TEX_REGIONS; + list[i].next = list[I810_NR_TEX_REGIONS].next; + list[(unsigned)list[I810_NR_TEX_REGIONS].next].prev = i; + list[I810_NR_TEX_REGIONS].next = i; + } +} + + +/* Called for every shared texture region which has increased in age + * 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. + */ +void i810TexturesGone( i810ContextPtr imesa, + GLuint offset, + GLuint size, + GLuint in_use ) +{ + i810TextureObjectPtr t, tmp; + + foreach_s ( t, tmp, &imesa->TexObjList ) { + + if (t->MemBlock->ofs >= offset + size || + t->MemBlock->ofs + t->MemBlock->size <= offset) + continue; + + /* It overlaps - kick it off. Need to hold onto the currently bound + * objects, however. + */ + i810SwapOutTexObj( imesa, t ); + } + + if (in_use) { + t = (i810TextureObjectPtr) calloc(1,sizeof(*t)); + if (!t) return; + + t->MemBlock = mmAllocMem( imesa->texHeap, size, 0, offset); + insert_at_head( &imesa->TexObjList, t ); + } +} + + + + + +/* This is called with the lock held. May have to eject our own and/or + * other client's texture objects to make room for the upload. + */ +void i810UploadTexImages( i810ContextPtr imesa, i810TextureObjectPtr t ) +{ + int i; + int ofs; + int numLevels; + + LOCK_HARDWARE( imesa ); + + /* Do we need to eject LRU texture objects? + */ + if (!t->MemBlock) { + while (1) + { + t->MemBlock = mmAllocMem( imesa->texHeap, t->totalSize, 12, 0 ); + if (t->MemBlock) + break; + + if (imesa->TexObjList.prev == imesa->CurrentTexObj[0] || + imesa->TexObjList.prev == imesa->CurrentTexObj[1]) { + fprintf(stderr, "Hit bound texture in upload\n"); + i810PrintLocalLRU( imesa ); + return; + } + + if (imesa->TexObjList.prev == &(imesa->TexObjList)) { + fprintf(stderr, "Failed to upload texture, sz %d\n", t->totalSize); + mmDumpMemInfo( imesa->texHeap ); + return; + } + + i810SwapOutTexObj( imesa, imesa->TexObjList.prev ); + } + + ofs = t->MemBlock->ofs; + t->BufAddr = imesa->i810Screen->tex.map + ofs; + t->Setup[I810_TEXREG_MI3] = imesa->i810Screen->textureOffset + ofs; + + if (t == imesa->CurrentTexObj[0]) + I810_STATECHANGE(imesa, I810_UPLOAD_TEX0); + + if (t == imesa->CurrentTexObj[1]) + I810_STATECHANGE(imesa, I810_UPLOAD_TEX1); + + i810UpdateTexLRU( imesa, t ); + } + + if (imesa->dirtyAge >= GET_DISPATCH_AGE(imesa)) + i810WaitAgeLocked( imesa, imesa->dirtyAge ); + + numLevels = t->lastLevel - t->firstLevel + 1; + for (i = 0 ; i < numLevels ; i++) + if (t->dirty_images & (1<dirty_images = 0; + + UNLOCK_HARDWARE( imesa ); +} Index: xc/lib/GL/mesa/src/drv/i810/i810texstate.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i810/i810texstate.c:1.2 --- /dev/null Thu Feb 27 12:26:25 2003 +++ xc/lib/GL/mesa/src/drv/i810/i810texstate.c Wed Oct 30 07:51:33 2002 @@ -0,0 +1,758 @@ +/* + * GLX Hardware Device Driver for Intel i810 + * 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: + * + * 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 +#include + +#include "glheader.h" +#include "macros.h" +#include "mtypes.h" +#include "simple_list.h" +#include "enums.h" + +#include "mm.h" + +#include "i810screen.h" +#include "i810_dri.h" + +#include "i810context.h" +#include "i810tex.h" +#include "i810state.h" +#include "i810ioctl.h" + + + + +static void i810SetTexImages( i810ContextPtr imesa, + struct gl_texture_object *tObj ) +{ + GLuint height, width, pitch, i, textureFormat, log_pitch; + i810TextureObjectPtr t = (i810TextureObjectPtr) tObj->DriverData; + const struct gl_texture_image *baseImage = tObj->Image[tObj->BaseLevel]; + GLint firstLevel, lastLevel, numLevels; + GLint log2Width, log2Height; + +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + switch (baseImage->Format) { + case GL_RGB: + case GL_LUMINANCE: + 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: + t->texelBytes = 2; + textureFormat = MI1_FMT_16BPP | MI1_PF_16BPP_ARGB4444; + break; + case GL_COLOR_INDEX: + textureFormat = MI1_FMT_8CI | MI1_PF_8CI_ARGB4444; + t->texelBytes = 1; + break; + default: + fprintf(stderr, "i810SetTexImages: bad image->Format\n" ); + return; + } + + /* Compute which mipmap levels we really want to send to the hardware. + * This depends on the base image size, GL_TEXTURE_MIN_LOD, + * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. + * Yes, this looks overly complicated, but it's all needed. + */ + if (tObj->MinFilter == GL_LINEAR || tObj->MinFilter == GL_NEAREST) { + firstLevel = lastLevel = tObj->BaseLevel; + } + else { + firstLevel = tObj->BaseLevel + (GLint) (tObj->MinLod + 0.5); + firstLevel = MAX2(firstLevel, tObj->BaseLevel); + lastLevel = tObj->BaseLevel + (GLint) (tObj->MaxLod + 0.5); + lastLevel = MAX2(lastLevel, tObj->BaseLevel); + lastLevel = MIN2(lastLevel, tObj->BaseLevel + baseImage->MaxLog2); + lastLevel = MIN2(lastLevel, tObj->MaxLevel); + lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */ + } + + /* save these values */ + t->firstLevel = firstLevel; + t->lastLevel = lastLevel; + + numLevels = lastLevel - firstLevel + 1; + + log2Width = tObj->Image[firstLevel]->WidthLog2; + log2Height = tObj->Image[firstLevel]->HeightLog2; + + /* Figure out the amount of memory required to hold all the mipmap + * levels. Choose the smallest pitch to accomodate the largest + * mipmap: + */ + width = tObj->Image[firstLevel]->Width * t->texelBytes; + for (pitch = 32, log_pitch=2 ; pitch < width ; pitch *= 2 ) + log_pitch++; + + /* All images must be loaded at this pitch. Count the number of + * lines required: + */ + for ( height = i = 0 ; i < numLevels ; i++ ) { + t->image[i].image = tObj->Image[firstLevel + i]; + t->image[i].offset = height * pitch; + t->image[i].internalFormat = baseImage->Format; + height += t->image[i].image->Height; + } + + t->Pitch = pitch; + t->totalSize = height*pitch; + t->max_level = i-1; + t->dirty = I810_UPLOAD_TEX0 | I810_UPLOAD_TEX1; + t->Setup[I810_TEXREG_MI1] = (MI1_MAP_0 | textureFormat | log_pitch); + t->Setup[I810_TEXREG_MI2] = (MI2_DIMENSIONS_ARE_LOG2 | + (log2Height << 16) | log2Width); + t->Setup[I810_TEXREG_MLL] = (GFX_OP_MAP_LOD_LIMITS | + MLL_MAP_0 | + MLL_UPDATE_MAX_MIP | + MLL_UPDATE_MIN_MIP | + ((numLevels - 1) << MLL_MIN_MIP_SHIFT)); + + i810UploadTexImages( imesa, t ); +} + +/* ================================================================ + * Texture combine functions + */ + +#define I810_DISABLE 0 +#define I810_PASSTHRU 1 +#define I810_REPLACE 2 +#define I810_MODULATE 3 +#define I810_DECAL 4 +#define I810_BLEND 5 +#define I810_ALPHA_BLEND 6 +#define I810_ADD 7 +#define I810_MAX_COMBFUNC 8 + + +static GLuint i810_color_combine[][I810_MAX_COMBFUNC] = +{ + /* Unit 0: + */ + { + /* Disable combiner stage + */ + ( 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 ), /* actually passthru */ + + /* Passthru + */ + ( 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 ), + + /* GL_REPLACE + */ + ( 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_ONE | + MC_UPDATE_OP | + MC_OP_ARG1 ), + + /* GL_MODULATE + */ + ( 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_MODULATE ), + + /* GL_DECAL + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_0 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_COLOR_FACTOR | + MC_UPDATE_ARG2 | + MC_ARG2_TEX0_COLOR | + MC_UPDATE_OP | + MC_OP_LIN_BLEND_TEX0_ALPHA ), + + /* GL_BLEND + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_0 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_COLOR_FACTOR | + MC_UPDATE_ARG2 | + MC_ARG2_ITERATED_COLOR | + MC_UPDATE_OP | + MC_OP_LIN_BLEND_TEX0_COLOR ), + + /* GL_BLEND according to alpha + */ + ( 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_LIN_BLEND_TEX0_ALPHA ), + + /* GL_ADD + */ + ( 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 ), + }, + + /* Unit 1: + */ + { + /* Disable combiner stage (Note: disables all subsequent stages) + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_1 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_ONE | + MC_UPDATE_ARG2 | + MC_ARG2_ONE | + MC_UPDATE_OP | + MC_OP_DISABLE ), + + + /* Passthru + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_1 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_CURRENT_COLOR | + MC_UPDATE_ARG2 | + MC_ARG2_ONE | + MC_UPDATE_OP | + MC_OP_ARG1 ), + + /* GL_REPLACE + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_1 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_TEX1_COLOR | + MC_UPDATE_ARG2 | + MC_ARG2_ONE | + MC_UPDATE_OP | + MC_OP_ARG1 ), + + /* GL_MODULATE + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_1 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_TEX1_COLOR | + MC_UPDATE_ARG2 | + MC_ARG2_CURRENT_COLOR | + MC_UPDATE_OP | + MC_OP_MODULATE ), + + /* GL_DECAL + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_1 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_COLOR_FACTOR | + MC_UPDATE_ARG2 | + MC_ARG2_TEX1_COLOR | + MC_UPDATE_OP | + MC_OP_LIN_BLEND_TEX1_ALPHA ), + + /* GL_BLEND + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_1 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_COLOR_FACTOR | + MC_UPDATE_ARG2 | + MC_ARG2_CURRENT_COLOR | + MC_UPDATE_OP | + MC_OP_LIN_BLEND_TEX1_COLOR ), + + /* GL_BLEND according to alpha + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_1 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_TEX1_COLOR | + MC_UPDATE_ARG2 | + MC_ARG2_CURRENT_COLOR | + MC_UPDATE_OP | + MC_OP_LIN_BLEND_TEX1_ALPHA ), + + /* GL_ADD + */ + ( GFX_OP_MAP_COLOR_STAGES | + MC_STAGE_1 | + MC_UPDATE_DEST | + MC_DEST_CURRENT | + MC_UPDATE_ARG1 | + MC_ARG1_TEX1_COLOR | + MC_UPDATE_ARG2 | + MC_ARG2_CURRENT_COLOR | + MC_UPDATE_OP | + MC_OP_ADD ), + } +}; + +static GLuint i810_alpha_combine[][I810_MAX_COMBFUNC] = +{ + /* Unit 0: + */ + { + /* Disable combiner stage + */ + ( 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 ), + + /* Passthru + */ + ( 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 ), + + /* GL_REPLACE + */ + ( 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_ARG2 ), + + /* GL_MODULATE + */ + ( 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 ), + + /* GL_DECAL + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_0 | + MA_UPDATE_ARG1 | + MA_ARG1_ALPHA_FACTOR | + MA_UPDATE_ARG2 | + MA_ARG2_ALPHA_FACTOR | + MA_UPDATE_OP | + MA_OP_ARG1 ), + + /* GL_BLEND + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_0 | + MA_UPDATE_ARG1 | + MA_ARG1_ALPHA_FACTOR | + MA_UPDATE_ARG2 | + MA_ARG2_ITERATED_ALPHA | + MA_UPDATE_OP | + MA_OP_LIN_BLEND_TEX0_ALPHA ), + + /* GL_BLEND according to alpha (same as above) + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_0 | + MA_UPDATE_ARG1 | + MA_ARG1_ALPHA_FACTOR | + MA_UPDATE_ARG2 | + MA_ARG2_ITERATED_ALPHA | + MA_UPDATE_OP | + MA_OP_LIN_BLEND_TEX0_ALPHA ), + + /* GL_ADD + */ + ( 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 ), + }, + + /* Unit 1: + */ + { + /* Disable combiner stage + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_1 | + MA_UPDATE_ARG1 | + MA_ARG1_CURRENT_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_CURRENT_ALPHA | + MA_UPDATE_OP | + MA_OP_ARG1 ), + + /* Passthru + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_1 | + MA_UPDATE_ARG1 | + MA_ARG1_CURRENT_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_CURRENT_ALPHA | + MA_UPDATE_OP | + MA_OP_ARG1 ), + + /* GL_REPLACE + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_1 | + MA_UPDATE_ARG1 | + MA_ARG1_CURRENT_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_TEX1_ALPHA | + MA_UPDATE_OP | + MA_OP_ARG2 ), + + /* GL_MODULATE + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_1 | + MA_UPDATE_ARG1 | + MA_ARG1_CURRENT_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_TEX1_ALPHA | + MA_UPDATE_OP | + MA_OP_MODULATE ), + + /* GL_DECAL + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_1 | + MA_UPDATE_ARG1 | + MA_ARG1_ALPHA_FACTOR | + MA_UPDATE_ARG2 | + MA_ARG2_ALPHA_FACTOR | + MA_UPDATE_OP | + MA_OP_ARG1 ), + + /* GL_BLEND + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_1 | + MA_UPDATE_ARG1 | + MA_ARG1_ALPHA_FACTOR | + MA_UPDATE_ARG2 | + MA_ARG2_ITERATED_ALPHA | + MA_UPDATE_OP | + MA_OP_LIN_BLEND_TEX1_ALPHA ), + + /* GL_BLEND according to alpha (same as above) + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_1 | + MA_UPDATE_ARG1 | + MA_ARG1_ALPHA_FACTOR | + MA_UPDATE_ARG2 | + MA_ARG2_ITERATED_ALPHA | + MA_UPDATE_OP | + MA_OP_LIN_BLEND_TEX1_ALPHA ), + + /* GL_ADD + */ + ( GFX_OP_MAP_ALPHA_STAGES | + MA_STAGE_1 | + MA_UPDATE_ARG1 | + MA_ARG1_CURRENT_ALPHA | + MA_UPDATE_ARG2 | + MA_ARG2_TEX1_ALPHA | + MA_UPDATE_OP | + MA_OP_ADD ), + } + +}; + + + +static void i810UpdateTexEnv( GLcontext *ctx, GLuint unit ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + const struct gl_texture_object *tObj = texUnit->_Current; + const GLuint format = tObj->Image[tObj->BaseLevel]->Format; + GLuint color_combine, alpha_combine; + + switch (texUnit->EnvMode) { + case GL_REPLACE: + if (format == GL_ALPHA) { + color_combine = i810_color_combine[unit][I810_PASSTHRU]; + alpha_combine = i810_alpha_combine[unit][I810_REPLACE]; + } else if (format == GL_LUMINANCE || format == GL_RGB) { + color_combine = i810_color_combine[unit][I810_REPLACE]; + alpha_combine = i810_alpha_combine[unit][I810_PASSTHRU]; + } else { + color_combine = i810_color_combine[unit][I810_REPLACE]; + alpha_combine = i810_alpha_combine[unit][I810_REPLACE]; + } + break; + + case GL_MODULATE: + if (format == GL_ALPHA) { + color_combine = i810_color_combine[unit][I810_PASSTHRU]; + alpha_combine = i810_alpha_combine[unit][I810_MODULATE]; + } else { + color_combine = i810_color_combine[unit][I810_MODULATE]; + alpha_combine = i810_alpha_combine[unit][I810_MODULATE]; + } + break; + + case GL_DECAL: + switch (format) { + case GL_RGBA: + color_combine = i810_color_combine[unit][I810_ALPHA_BLEND]; + alpha_combine = i810_alpha_combine[unit][I810_PASSTHRU]; + break; + case GL_RGB: + color_combine = i810_color_combine[unit][I810_REPLACE]; + alpha_combine = i810_alpha_combine[unit][I810_PASSTHRU]; + break; + case GL_ALPHA: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + color_combine = i810_color_combine[unit][I810_PASSTHRU]; + alpha_combine = i810_alpha_combine[unit][I810_PASSTHRU]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_BLEND: + switch (format) { + case GL_RGB: + case GL_LUMINANCE: + color_combine = i810_color_combine[unit][I810_BLEND]; + alpha_combine = i810_alpha_combine[unit][I810_PASSTHRU]; + break; + case GL_RGBA: + case GL_LUMINANCE_ALPHA: + color_combine = i810_color_combine[unit][I810_BLEND]; + alpha_combine = i810_alpha_combine[unit][I810_MODULATE]; + break; + case GL_ALPHA: + color_combine = i810_color_combine[unit][I810_PASSTHRU]; + alpha_combine = i810_alpha_combine[unit][I810_MODULATE]; + break; + case GL_INTENSITY: + color_combine = i810_color_combine[unit][I810_BLEND]; + alpha_combine = i810_alpha_combine[unit][I810_BLEND]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_ADD: + switch (format) { + case GL_RGB: + case GL_LUMINANCE: + color_combine = i810_color_combine[unit][I810_ADD]; + alpha_combine = i810_alpha_combine[unit][I810_PASSTHRU]; + break; + case GL_RGBA: + case GL_LUMINANCE_ALPHA: + color_combine = i810_color_combine[unit][I810_ADD]; + alpha_combine = i810_alpha_combine[unit][I810_MODULATE]; + break; + case GL_ALPHA: + color_combine = i810_color_combine[unit][I810_PASSTHRU]; + alpha_combine = i810_alpha_combine[unit][I810_MODULATE]; + break; + case GL_INTENSITY: + color_combine = i810_color_combine[unit][I810_ADD]; + alpha_combine = i810_alpha_combine[unit][I810_ADD]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + default: + return; + } + + if (alpha_combine != imesa->Setup[I810_CTXREG_MA0 + unit] || + color_combine != imesa->Setup[I810_CTXREG_MC0 + unit]) + { + I810_STATECHANGE( imesa, I810_UPLOAD_CTX ); + imesa->Setup[I810_CTXREG_MA0 + unit] = alpha_combine; + imesa->Setup[I810_CTXREG_MC0 + unit] = color_combine; + } +} + + + + +static void i810UpdateTexUnit( GLcontext *ctx, GLuint unit ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + + if (texUnit->_ReallyEnabled == TEXTURE0_2D) + { + struct gl_texture_object *tObj = texUnit->_Current; + i810TextureObjectPtr t = (i810TextureObjectPtr)tObj->DriverData; + + /* Upload teximages (not pipelined) + */ + if (t->dirty_images) { + I810_FIREVERTICES(imesa); + i810SetTexImages( imesa, tObj ); + if (!t->MemBlock) { + FALLBACK( imesa, I810_FALLBACK_TEXTURE, GL_TRUE ); + return; + } + } + + if (tObj->Image[tObj->BaseLevel]->Border > 0) { + FALLBACK( imesa, I810_FALLBACK_TEXTURE, GL_TRUE ); + return; + } + + /* Update state if this is a different texture object to last + * time. + */ + if (imesa->CurrentTexObj[unit] != t) { + I810_STATECHANGE(imesa, (I810_UPLOAD_TEX0<CurrentTexObj[unit] = t; + i810UpdateTexLRU( imesa, t ); /* done too often */ + } + + /* Update texture environment if texture object image format or + * texture environment state has changed. + */ + if (tObj->Image[tObj->BaseLevel]->Format != imesa->TexEnvImageFmt[unit]) { + imesa->TexEnvImageFmt[unit] = tObj->Image[tObj->BaseLevel]->Format; + i810UpdateTexEnv( ctx, unit ); + } + } + else if (texUnit->_ReallyEnabled) { + FALLBACK( imesa, I810_FALLBACK_TEXTURE, GL_TRUE ); + } + else /*if (imesa->CurrentTexObj[unit])*/ { + imesa->CurrentTexObj[unit] = 0; + imesa->TexEnvImageFmt[unit] = 0; + imesa->dirty &= ~(I810_UPLOAD_TEX0<Setup[I810_CTXREG_MA0 + unit] = + i810_alpha_combine[unit][I810_DISABLE]; + imesa->Setup[I810_CTXREG_MC0 + unit] = + i810_color_combine[unit][I810_DISABLE]; + I810_STATECHANGE( imesa, I810_UPLOAD_CTX ); + } +} + + +void i810UpdateTextureState( GLcontext *ctx ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + /* fprintf(stderr, "%s\n", __FUNCTION__); */ + FALLBACK( imesa, I810_FALLBACK_TEXTURE, GL_FALSE ); + i810UpdateTexUnit( ctx, 0 ); + i810UpdateTexUnit( ctx, 1 ); +} + + + Index: xc/lib/GL/mesa/src/drv/i810/i810tris.c diff -u xc/lib/GL/mesa/src/drv/i810/i810tris.c:1.5 xc/lib/GL/mesa/src/drv/i810/i810tris.c:1.7 --- xc/lib/GL/mesa/src/drv/i810/i810tris.c:1.5 Sun Sep 24 09:51:04 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810tris.c Wed Oct 30 07:51:33 2002 @@ -1,166 +1,811 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.c,v 1.7 2002/10/30 12:51:33 alanh Exp $ */ +/************************************************************************** + +Copyright 2001 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. + +**************************************************************************/ + /* - * GLX Hardware Device Driver for Intel i810 - * 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: - * - * 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. - * - * + * Authors: + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.c,v 1.5 2000/09/24 13:51:04 alanh Exp $ */ #include #include -#include "types.h" -#include "vb.h" -#include "pipeline.h" +#include "glheader.h" +#include "mtypes.h" +#include "macros.h" +#include "colormac.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" -#include "mm.h" +#include "i810screen.h" +#include "i810_dri.h" + #include "i810tris.h" +#include "i810state.h" #include "i810vb.h" -#include "i810log.h" +#include "i810ioctl.h" -/* Used in i810tritmp.h - */ -#define I810_COLOR(to, from) { \ - (to)[0] = (from)[2]; \ - (to)[1] = (from)[1]; \ - (to)[2] = (from)[0]; \ - (to)[3] = (from)[3]; \ +static void i810RenderPrimitive( GLcontext *ctx, GLenum prim ); + +/*********************************************************************** + * Emit primitives as inline vertices * + ***********************************************************************/ + +#if defined(USE_X86_ASM) +#define COPY_DWORDS( j, vb, vertsize, v ) \ +do { \ + int __tmp; \ + __asm__ __volatile__( "rep ; movsl" \ + : "=%c" (j), "=D" (vb), "=S" (__tmp) \ + : "0" (vertsize), \ + "D" ((long)vb), \ + "S" ((long)v) ); \ +} while (0) +#else +#define COPY_DWORDS( j, vb, vertsize, v ) \ +do { \ + for ( j = 0 ; j < vertsize ; j++ ) \ + vb[j] = ((GLuint *)v)[j]; \ + vb += vertsize; \ +} while (0) +#endif + +static void __inline__ i810_draw_triangle( i810ContextPtr imesa, + i810VertexPtr v0, + i810VertexPtr v1, + i810VertexPtr v2 ) +{ + GLuint vertsize = imesa->vertex_size; + GLuint *vb = i810AllocDmaLow( imesa, 3 * 4 * vertsize ); + int j; + + COPY_DWORDS( j, vb, vertsize, v0 ); + COPY_DWORDS( j, vb, vertsize, v1 ); + COPY_DWORDS( j, vb, vertsize, v2 ); } -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) +static void __inline__ i810_draw_quad( i810ContextPtr imesa, + i810VertexPtr v0, + i810VertexPtr v1, + i810VertexPtr v2, + i810VertexPtr v3 ) +{ + GLuint vertsize = imesa->vertex_size; + GLuint *vb = i810AllocDmaLow( imesa, 6 * 4 * vertsize ); + int j; + + COPY_DWORDS( j, vb, vertsize, v0 ); + COPY_DWORDS( j, vb, vertsize, v1 ); + COPY_DWORDS( j, vb, vertsize, v3 ); + COPY_DWORDS( j, vb, vertsize, v1 ); + COPY_DWORDS( j, vb, vertsize, v2 ); + COPY_DWORDS( j, vb, vertsize, v3 ); +} + + +static __inline__ void i810_draw_point( i810ContextPtr imesa, + i810VertexPtr tmp ) +{ + GLfloat sz = imesa->glCtx->Point._Size * .5; + int vertsize = imesa->vertex_size; + GLuint *vb = i810AllocDmaLow( imesa, 2 * 4 * vertsize ); + int j; + + /* Draw a point as a horizontal line. + */ + *(float *)&vb[0] = tmp->v.x - sz + 0.125; + for (j = 1 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; + vb += vertsize; + + *(float *)&vb[0] = tmp->v.x + sz + 0.125; + for (j = 1 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; + vb += vertsize; +} + + +static __inline__ void i810_draw_line( i810ContextPtr imesa, + i810VertexPtr v0, + i810VertexPtr v1 ) +{ + GLuint vertsize = imesa->vertex_size; + GLuint *vb = i810AllocDmaLow( imesa, 2 * 4 * vertsize ); + int j; + + COPY_DWORDS( j, vb, vertsize, v0 ); + COPY_DWORDS( j, vb, vertsize, v1 ); +} + + + +/*********************************************************************** + * Macros for t_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI( a, b, c ) \ +do { \ + if (0) fprintf(stderr, "hw TRI\n"); \ + if (DO_FALLBACK) \ + imesa->draw_tri( imesa, a, b, c ); \ + else \ + i810_draw_triangle( imesa, a, b, c ); \ +} while (0) + +#define QUAD( a, b, c, d ) \ +do { \ + if (0) fprintf(stderr, "hw QUAD\n"); \ + if (DO_FALLBACK) { \ + imesa->draw_tri( imesa, a, b, d ); \ + imesa->draw_tri( imesa, b, c, d ); \ + } else \ + i810_draw_quad( imesa, a, b, c, d ); \ +} while (0) + +#define LINE( v0, v1 ) \ +do { \ + if (0) fprintf(stderr, "hw LINE\n"); \ + if (DO_FALLBACK) \ + imesa->draw_line( imesa, v0, v1 ); \ + else \ + i810_draw_line( imesa, v0, v1 ); \ +} while (0) + +#define POINT( v0 ) \ +do { \ + if (0) fprintf(stderr, "hw POINT\n"); \ + if (DO_FALLBACK) \ + imesa->draw_point( imesa, v0 ); \ + else \ + i810_draw_point( imesa, v0 ); \ +} while (0) + + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define I810_OFFSET_BIT 0x01 +#define I810_TWOSIDE_BIT 0x02 +#define I810_UNFILLED_BIT 0x04 +#define I810_FALLBACK_BIT 0x08 +#define I810_MAX_TRIFUNC 0x10 + + +static struct { + points_func points; + line_func line; + triangle_func triangle; + quad_func quad; +} rast_tab[I810_MAX_TRIFUNC]; + + +#define DO_FALLBACK (IND & I810_FALLBACK_BIT) +#define DO_OFFSET (IND & I810_OFFSET_BIT) +#define DO_UNFILLED (IND & I810_UNFILLED_BIT) +#define DO_TWOSIDE (IND & I810_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 1 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define VERTEX i810Vertex +#define TAB rast_tab + +/* Only used to pull back colors into vertices (ie, we know color is + * floating point). + */ +#define I810_COLOR( dst, src ) \ +do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ + dst[3] = src[3]; \ +} while (0) + +#define I810_SPEC( dst, src ) \ +do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ +} while (0) + + +#define DEPTH_SCALE (1.0/0xffff) +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW( a ) (a > 0) +#define GET_VERTEX(e) (imesa->verts + (e<vertex_stride_shift)) + +#define VERT_SET_RGBA( v, c ) I810_COLOR( v->ub4[coloroffset], c ) +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[coloroffset] +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx] + +#define VERT_SET_SPEC( v, c ) if (havespec) I810_SPEC( v->ub4[5], c ) +#define VERT_COPY_SPEC( v0, v1 ) if (havespec) COPY_3V(v0->ub4[5], v1->ub4[5]) +#define VERT_SAVE_SPEC( idx ) if (havespec) spec[idx] = v[idx]->ui[5] +#define VERT_RESTORE_SPEC( idx ) if (havespec) v[idx]->ui[5] = spec[idx] + +#define LOCAL_VARS(n) \ + i810ContextPtr imesa = I810_CONTEXT(ctx); \ + GLuint color[n], spec[n]; \ + GLuint coloroffset = (imesa->vertex_size == 4 ? 3 : 4); \ + GLboolean havespec = (imesa->vertex_size > 4); \ + (void) color; (void) spec; (void) coloroffset; (void) havespec; + + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +static const GLuint hw_prim[GL_POLYGON+1] = { + PR_LINES, + PR_LINES, + PR_LINES, + PR_LINES, + PR_TRIANGLES, + PR_TRIANGLES, + PR_TRIANGLES, + PR_TRIANGLES, + PR_TRIANGLES, + PR_TRIANGLES +}; + +#define RASTERIZE(x) if (imesa->hw_primitive != hw_prim[x]) \ + i810RasterPrimitive( ctx, x, hw_prim[x] ) +#define RENDER_PRIMITIVE imesa->render_primitive #define TAG(x) x -#include "i810tritmp.h" +#define IND I810_FALLBACK_BIT +#include "tnl_dd/t_dd_unfilled.h" +#undef IND + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ -#define IND (I810_FLAT_BIT) -#define TAG(x) x##_flat -#include "i810tritmp.h" +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" -#define IND (I810_OFFSET_BIT) +#define IND (I810_OFFSET_BIT) #define TAG(x) x##_offset -#include "i810tritmp.h" - -#define IND (I810_OFFSET_BIT|I810_FLAT_BIT) -#define TAG(x) x##_offset_flat -#include "i810tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (I810_TWOSIDE_BIT) +#define IND (I810_TWOSIDE_BIT) #define TAG(x) x##_twoside -#include "i810tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (I810_TWOSIDE_BIT|I810_FLAT_BIT) -#define TAG(x) x##_twoside_flat -#include "i810tritmp.h" - -#define IND (I810_TWOSIDE_BIT|I810_OFFSET_BIT) +#define IND (I810_TWOSIDE_BIT|I810_OFFSET_BIT) #define TAG(x) x##_twoside_offset -#include "i810tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_OFFSET_BIT|I810_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_TWOSIDE_BIT|I810_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_TWOSIDE_BIT|I810_OFFSET_BIT|I810_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_FALLBACK_BIT) +#define TAG(x) x##_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_OFFSET_BIT|I810_FALLBACK_BIT) +#define TAG(x) x##_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_TWOSIDE_BIT|I810_FALLBACK_BIT) +#define TAG(x) x##_twoside_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_TWOSIDE_BIT|I810_OFFSET_BIT|I810_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_UNFILLED_BIT|I810_FALLBACK_BIT) +#define TAG(x) x##_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I810_OFFSET_BIT|I810_UNFILLED_BIT|I810_FALLBACK_BIT) +#define TAG(x) x##_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" -#define IND (I810_TWOSIDE_BIT|I810_OFFSET_BIT|I810_FLAT_BIT) -#define TAG(x) x##_twoside_offset_flat -#include "i810tritmp.h" +#define IND (I810_TWOSIDE_BIT|I810_UNFILLED_BIT|I810_FALLBACK_BIT) +#define TAG(x) x##_twoside_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" +#define IND (I810_TWOSIDE_BIT|I810_OFFSET_BIT|I810_UNFILLED_BIT| \ + I810_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" -void i810DDTrifuncInit() +static void init_rast_tab( void ) { init(); - init_flat(); init_offset(); - init_offset_flat(); init_twoside(); - init_twoside_flat(); init_twoside_offset(); - init_twoside_offset_flat(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); + init_fallback(); + init_offset_fallback(); + init_twoside_fallback(); + init_twoside_offset_fallback(); + init_unfilled_fallback(); + init_offset_unfilled_fallback(); + init_twoside_unfilled_fallback(); + init_twoside_offset_unfilled_fallback(); +} + + +/*********************************************************************** + * Rasterization fallback helpers * + ***********************************************************************/ + + +/* This code is hit only when a mix of accelerated and unaccelerated + * primitives are being drawn, and only for the unaccelerated + * primitives. + */ +static void +i810_fallback_tri( i810ContextPtr imesa, + i810Vertex *v0, + i810Vertex *v1, + i810Vertex *v2 ) +{ + GLcontext *ctx = imesa->glCtx; + SWvertex v[3]; + i810_translate_vertex( ctx, v0, &v[0] ); + i810_translate_vertex( ctx, v1, &v[1] ); + i810_translate_vertex( ctx, v2, &v[2] ); + _swrast_Triangle( ctx, &v[0], &v[1], &v[2] ); +} + + +static void +i810_fallback_line( i810ContextPtr imesa, + i810Vertex *v0, + i810Vertex *v1 ) +{ + GLcontext *ctx = imesa->glCtx; + SWvertex v[2]; + i810_translate_vertex( ctx, v0, &v[0] ); + i810_translate_vertex( ctx, v1, &v[1] ); + _swrast_Line( ctx, &v[0], &v[1] ); +} + + +static void +i810_fallback_point( i810ContextPtr imesa, + i810Vertex *v0 ) +{ + GLcontext *ctx = imesa->glCtx; + SWvertex v[1]; + i810_translate_vertex( ctx, v0, &v[0] ); + _swrast_Point( ctx, &v[0] ); +} + + + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ + +#define IND 0 +#define V(x) (i810Vertex *)(vertptr + ((x)<verts; \ + const GLuint vertshift = imesa->vertex_stride_shift; \ + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ + (void) elt; +#define RESET_STIPPLE +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) x +#define TAG(x) i810_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) i810_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + + + +static void i810RenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint prim = imesa->render_primitive; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON]( ctx, 0, n, + PRIM_BEGIN|PRIM_END ); + VB->Elts = tmp; + } + + /* Restore the render primitive + */ + if (prim != GL_POLYGON) + tnl->Driver.Render.PrimitiveNotify( ctx, prim ); +} + +static void i810RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line( ctx, ii, jj ); +} + +static void i810FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) +{ + i810ContextPtr imesa = I810_CONTEXT( ctx ); + GLuint vertsize = imesa->vertex_size; + GLuint *vb = i810AllocDmaLow( imesa, (n-2) * 3 * 4 * vertsize ); + GLubyte *vertptr = (GLubyte *)imesa->verts; + const GLuint vertshift = imesa->vertex_stride_shift; + const GLuint *start = (const GLuint *)V(elts[0]); + int i,j; + + for (i = 2 ; i < n ; i++) { + COPY_DWORDS( j, vb, vertsize, V(elts[i-1]) ); + COPY_DWORDS( j, vb, vertsize, V(elts[i]) ); + COPY_DWORDS( j, vb, vertsize, start ); + } } +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + +/*********************************************************************** + * Rasterization fallback helpers * + ***********************************************************************/ -#define ALL_FALLBACK (DD_MULTIDRAW | DD_SELECT | DD_FEEDBACK | DD_STENCIL) -#define POINT_FALLBACK (ALL_FALLBACK) -#define LINE_FALLBACK (ALL_FALLBACK | DD_LINE_STIPPLE) -#define TRI_FALLBACK (ALL_FALLBACK | 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) - -void i810DDChooseRenderState(GLcontext *ctx) -{ - i810ContextPtr imesa = I810_CONTEXT(ctx); - GLuint flags = ctx->TriangleCaps; - CARD32 index = 0; - - if (imesa->Fallback) { - imesa->renderindex = I810_FALLBACK_BIT; - return; - } - - if (flags & ANY_RASTER_FLAGS) { - if (flags & DD_FLATSHADE) index |= I810_FLAT_BIT; - if (flags & DD_TRI_LIGHT_TWOSIDE) index |= I810_TWOSIDE_BIT; - if (flags & DD_TRI_OFFSET) index |= I810_OFFSET_BIT; - } - - imesa->PointsFunc = points_tab[index]; - imesa->LineFunc = line_tab[index]; - imesa->TriangleFunc = tri_tab[index]; - imesa->QuadFunc = quad_tab[index]; - imesa->renderindex = index; - imesa->IndirectTriangles = 0; - - if (flags & ANY_FALLBACK) { - if (flags & POINT_FALLBACK) { - imesa->renderindex |= I810_FALLBACK_BIT; - imesa->PointsFunc = 0; - imesa->IndirectTriangles |= DD_POINT_SW_RASTERIZE; - } - - if (flags & LINE_FALLBACK) { - imesa->renderindex |= I810_FALLBACK_BIT; - imesa->LineFunc = 0; - imesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; - } - - if (flags & TRI_FALLBACK) { - imesa->renderindex |= I810_FALLBACK_BIT; - imesa->TriangleFunc = 0; - imesa->QuadFunc = 0; - imesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | - DD_QUAD_SW_RASTERIZE); - } - /* Special cases: - */ - if ((flags & DD_TRI_STIPPLE) && - (ctx->IndirectTriangles & DD_TRI_STIPPLE)) { - imesa->renderindex |= I810_FALLBACK_BIT; - imesa->TriangleFunc = 0; - imesa->QuadFunc = 0; - imesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | - DD_QUAD_SW_RASTERIZE); - } - } + +#define _I810_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET | \ + _DD_NEW_TRI_STIPPLE | \ + _NEW_POLYGONSTIPPLE) + +#define POINT_FALLBACK (0) +#define LINE_FALLBACK (DD_LINE_STIPPLE) +#define TRI_FALLBACK (0) +#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK|\ + DD_TRI_STIPPLE) +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) + +static void i810ChooseRenderState(GLcontext *ctx) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + i810ContextPtr imesa = I810_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint index = 0; + + if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { + if (flags & ANY_RASTER_FLAGS) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= I810_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= I810_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= I810_UNFILLED_BIT; + } + + imesa->draw_point = i810_draw_point; + imesa->draw_line = i810_draw_line; + imesa->draw_tri = i810_draw_triangle; + + /* Hook in fallbacks for specific primitives. + */ + if (flags & ANY_FALLBACK_FLAGS) + { + if (flags & POINT_FALLBACK) + imesa->draw_point = i810_fallback_point; + + if (flags & LINE_FALLBACK) + imesa->draw_line = i810_fallback_line; + + if (flags & TRI_FALLBACK) + imesa->draw_tri = i810_fallback_tri; + + if ((flags & DD_TRI_STIPPLE) && !imesa->stipple_in_hw) + imesa->draw_tri = i810_fallback_tri; + + index |= I810_FALLBACK_BIT; + } + } + + if (imesa->RenderIndex != index) { + imesa->RenderIndex = index; + + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = i810_render_tab_verts; + tnl->Driver.Render.PrimTabElts = i810_render_tab_elts; + tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ + tnl->Driver.Render.ClippedPolygon = i810FastRenderClippedPoly; + } else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = i810RenderClippedLine; + tnl->Driver.Render.ClippedPolygon = i810RenderClippedPoly; + } + } } +static const GLenum reduced_prim[GL_POLYGON+1] = { + GL_POINTS, + GL_LINES, + GL_LINES, + GL_LINES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES +}; + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + + +/* Determine the rasterized primitive when not drawing unfilled + * polygons. + * + * Used only for the default render stage which always decomposes + * primitives to trianges/lines/points. For the accelerated stage, + * which renders strips as strips, the equivalent calculations are + * performed in i810render.c. + */ +static void i810RenderPrimitive( GLcontext *ctx, GLenum prim ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + GLuint rprim = reduced_prim[prim]; + + imesa->render_primitive = prim; + + if (rprim == GL_TRIANGLES && (ctx->_TriangleCaps & DD_TRI_UNFILLED)) + return; + + if (imesa->reduced_primitive != rprim || + hw_prim[prim] != imesa->hw_primitive) { + i810RasterPrimitive( ctx, rprim, hw_prim[prim] ); + } +} + +static void i810RunPipeline( GLcontext *ctx ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + if (imesa->new_state) { + if (imesa->new_state & _NEW_TEXTURE) + i810UpdateTextureState( ctx ); /* may modify imesa->new_state */ + if (!imesa->Fallback) { + if (imesa->new_state & _I810_NEW_VERTEX) + i810ChooseVertexState( ctx ); + + if (imesa->new_state & _I810_NEW_RENDERSTATE) + i810ChooseRenderState( ctx ); + } + + imesa->new_state = 0; + } + + _tnl_run_pipeline( ctx ); +} + +static void i810RenderStart( GLcontext *ctx ) +{ + /* Check for projective textureing. Make sure all texcoord + * pointers point to something. (fix in mesa?) + */ + i810CheckTexSizes( ctx ); +} + +static void i810RenderFinish( GLcontext *ctx ) +{ + if (I810_CONTEXT(ctx)->RenderIndex & I810_FALLBACK_BIT) + _swrast_flush( ctx ); +} + + + + +/* System to flush dma and emit state changes based on the rasterized + * primitive. + */ +void i810RasterPrimitive( GLcontext *ctx, + GLenum rprim, + GLuint hwprim ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + GLuint st1 = imesa->Setup[I810_CTXREG_ST1]; + GLuint aa = imesa->Setup[I810_CTXREG_AA]; + GLuint lcs = imesa->Setup[I810_CTXREG_LCS]; + + st1 &= ~ST1_ENABLE; + aa &= ~AA_ENABLE; + + switch (rprim) { + case GL_TRIANGLES: + if (ctx->Polygon.StippleFlag) + st1 |= ST1_ENABLE; + if (ctx->Polygon.SmoothFlag) + aa |= AA_ENABLE; + break; + case GL_LINES: + lcs &= ~(LCS_LINEWIDTH_3_0|LCS_LINEWIDTH_0_5); + lcs |= imesa->LcsLineWidth; + if (ctx->Line.SmoothFlag) { + aa |= AA_ENABLE; + lcs |= LCS_LINEWIDTH_0_5; + } + break; + case GL_POINTS: + lcs &= ~(LCS_LINEWIDTH_3_0|LCS_LINEWIDTH_0_5); + lcs |= imesa->LcsPointSize; + if (ctx->Point.SmoothFlag) { + aa |= AA_ENABLE; + lcs |= LCS_LINEWIDTH_0_5; + } + break; + default: + return; + } + + imesa->reduced_primitive = rprim; + + if (st1 != imesa->Setup[I810_CTXREG_ST1] || + aa != imesa->Setup[I810_CTXREG_AA] || + lcs != imesa->Setup[I810_CTXREG_LCS]) + { + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); + imesa->hw_primitive = hwprim; + imesa->Setup[I810_CTXREG_LCS] = lcs; + imesa->Setup[I810_CTXREG_ST1] = st1; + imesa->Setup[I810_CTXREG_AA] = aa; + } + else if (hwprim != imesa->hw_primitive) { + I810_STATECHANGE(imesa, 0); + imesa->hw_primitive = hwprim; + } +} + +/**********************************************************************/ +/* Transition to/from hardware rasterization. */ +/**********************************************************************/ + + +void i810Fallback( i810ContextPtr imesa, GLuint bit, GLboolean mode ) +{ + GLcontext *ctx = imesa->glCtx; + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint oldfallback = imesa->Fallback; + + if (0) fprintf(stderr, "%s old %x bit %x mode %d\n", __FUNCTION__, + imesa->Fallback, bit, mode ); + + if (mode) { + imesa->Fallback |= bit; + if (oldfallback == 0) { + if (0) fprintf(stderr, "ENTER FALLBACK\n"); + I810_FIREVERTICES(imesa); + _swsetup_Wakeup( ctx ); + imesa->RenderIndex = ~0; + } + } + else { + imesa->Fallback &= ~bit; + if (oldfallback == bit) { + if (0) fprintf(stderr, "LEAVE FALLBACK\n"); + _swrast_flush( ctx ); + tnl->Driver.Render.Start = i810RenderStart; + tnl->Driver.Render.PrimitiveNotify = i810RenderPrimitive; + tnl->Driver.Render.Finish = i810RenderFinish; + tnl->Driver.Render.BuildVertices = i810BuildVertices; + imesa->new_state |= (_I810_NEW_RENDERSTATE|_I810_NEW_VERTEX); + } + } +} + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + + +void i810InitTriFuncs( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + firsttime = 0; + } + + tnl->Driver.RunPipeline = i810RunPipeline; + tnl->Driver.Render.Start = i810RenderStart; + tnl->Driver.Render.Finish = i810RenderFinish; + tnl->Driver.Render.PrimitiveNotify = i810RenderPrimitive; + tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; + tnl->Driver.Render.BuildVertices = i810BuildVertices; +} Index: xc/lib/GL/mesa/src/drv/i810/i810tris.h diff -u xc/lib/GL/mesa/src/drv/i810/i810tris.h:1.9 xc/lib/GL/mesa/src/drv/i810/i810tris.h:1.10 --- xc/lib/GL/mesa/src/drv/i810/i810tris.h:1.9 Wed Mar 21 11:14:21 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810tris.h Fri Feb 22 16:33:04 2002 @@ -22,158 +22,15 @@ * * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.h,v 1.9 2001/03/21 16:14:21 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tris.h,v 1.10 2002/02/22 21:33:04 dawes Exp $ */ #ifndef I810TRIS_INC #define I810TRIS_INC -#include "types.h" -#include "i810ioctl.h" -#include "i810vb.h" +#include "mtypes.h" extern void i810PrintRenderState( const char *msg, GLuint state ); -extern void i810DDChooseRenderState(GLcontext *ctx); -extern void i810DDTrifuncInit( void ); - - -#define I810_FLAT_BIT 0x1 -#define I810_OFFSET_BIT 0x2 -#define I810_TWOSIDE_BIT 0x4 -#define I810_FALLBACK_BIT 0x8 - - - - -static void __inline__ i810_draw_triangle( i810ContextPtr imesa, - i810VertexPtr v0, - i810VertexPtr v1, - i810VertexPtr v2 ) -{ - GLuint vertsize = imesa->vertsize; - GLuint *vb = i810AllocDwordsInline( imesa, 3 * vertsize ); - int j; - -#if defined(USE_X86_ASM) - __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 i810_draw_point( i810ContextPtr imesa, - i810VertexPtr tmp, - float sz ) -{ - 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] = 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]; -} - - -static __inline__ void i810_draw_line( i810ContextPtr imesa, - i810VertexPtr v0, - i810VertexPtr v1 ) -{ - GLuint vertsize = imesa->vertsize; - GLuint *vb = i810AllocDwordsInline( imesa, 2 * vertsize ); - int j; - -#if defined(USE_X86_ASM) - __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" ); -#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 -} - +extern void i810InitTriFuncs( GLcontext *ctx ); +extern void i810RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); #endif Index: xc/lib/GL/mesa/src/drv/i810/i810tritmp.h diff -u xc/lib/GL/mesa/src/drv/i810/i810tritmp.h:1.5 xc/lib/GL/mesa/src/drv/i810/i810tritmp.h:removed --- xc/lib/GL/mesa/src/drv/i810/i810tritmp.h:1.5 Tue Dec 5 16:18:33 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810tritmp.h Thu Feb 27 12:26:25 2003 @@ -1,196 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tritmp.h,v 1.5 2000/12/05 21:18:33 dawes Exp $ */ - -static __inline void TAG(triangle)(GLcontext *ctx, - GLuint e0, GLuint e1, GLuint e2, - GLuint pv) -{ - i810ContextPtr i810ctx = I810_CONTEXT(ctx); - struct vertex_buffer *VB = ctx->VB; - i810VertexPtr i810verts = I810_DRIVER_DATA(VB)->verts; - i810Vertex *v[3]; - -#if (IND & I810_OFFSET_BIT) - GLfloat offset; - GLfloat z[3]; -#endif - -#if (IND & (I810_TWOSIDE_BIT | I810_FLAT_BIT)) - GLuint c[3]; -#endif - - v[0] = &i810verts[e0]; - v[1] = &i810verts[e1]; - v[2] = &i810verts[e2]; - -#if (IND & (I810_TWOSIDE_BIT | I810_FLAT_BIT)) - c[0] = v[0]->ui[4]; - c[1] = v[1]->ui[4]; - c[2] = v[2]->ui[4]; -#endif - - -#if (IND & (I810_TWOSIDE_BIT | I810_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 & I810_TWOSIDE_BIT) - { - GLuint facing = (cc > 0.0) ^ ctx->Polygon.FrontBit; - GLubyte (*vbcolor)[4] = VB->Color[facing]->data; - if (IND & I810_FLAT_BIT) { - I810_COLOR((char *)&v[0]->ui[4], vbcolor[pv]); - v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; - } else { - I810_COLOR((char *)&v[0]->ui[4], vbcolor[e0]); - I810_COLOR((char *)&v[1]->ui[4], vbcolor[e1]); - I810_COLOR((char *)&v[2]->ui[4], vbcolor[e2]); - } - } -#endif - -#if (IND & I810_OFFSET_BIT) - { - offset = ctx->Polygon.OffsetUnits * 1.0/0x10000; - 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 & I810_FLAT_BIT) - { - GLuint color = i810verts[pv].ui[4]; - v[0]->ui[4] = color; - v[1]->ui[4] = color; - v[2]->ui[4] = color; - } -#endif - - i810_draw_triangle( i810ctx, v[0], v[1], v[2] ); - -#if (IND & I810_OFFSET_BIT) - v[0]->v.z = z[0]; - v[1]->v.z = z[1]; - v[2]->v.z = z[2]; -#endif - -#if (IND & (I810_FLAT_BIT | I810_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 v0, - GLuint v1, GLuint v2, GLuint v3, - GLuint pv ) -{ - TAG(triangle)( ctx, v0, v1, v3, pv ); - TAG(triangle)( ctx, v1, v2, v3, pv ); -} - -static void TAG(line)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv ) -{ - i810ContextPtr imesa = I810_CONTEXT( ctx ); - i810VertexPtr i810VB = I810_DRIVER_DATA(ctx->VB)->verts; - -#if (IND & (I810_TWOSIDE_BIT|I810_FLAT_BIT|I810_OFFSET_BIT)) - i810Vertex tmp0 = i810VB[v0]; - i810Vertex tmp1 = i810VB[v1]; - - if (IND & I810_TWOSIDE_BIT) { - GLubyte (*vbcolor)[4] = ctx->VB->ColorPtr->data; - - if (IND & I810_FLAT_BIT) { - I810_COLOR((char *)&tmp0.v.color,vbcolor[pv]); - *(int *)&tmp1.v.color = *(int *)&tmp0.v.color; - } else { - I810_COLOR((char *)&tmp0.v.color,vbcolor[v0]); - I810_COLOR((char *)&tmp1.v.color,vbcolor[v1]); - } - - } else if (IND & I810_FLAT_BIT) { - *(int *)&tmp0.v.color = *(int *)&i810VB[pv].v.color; - *(int *)&tmp1.v.color = *(int *)&i810VB[pv].v.color; - } - - /* Relies on precomputed LineZoffset from vbrender.c - */ - if (IND & I810_OFFSET_BIT) { - GLfloat offset = ctx->LineZoffset * (1.0 / 0x10000); - tmp0.v.z += offset; - tmp1.v.z += offset; - } - - i810_draw_line( imesa, &tmp0, &tmp1 ); -#else - i810_draw_line( imesa, &i810VB[v0], &i810VB[v1] ); -#endif -} - - -static void TAG(points)( GLcontext *ctx, GLuint first, GLuint last ) -{ - i810ContextPtr imesa = I810_CONTEXT( ctx ); - struct vertex_buffer *VB = ctx->VB; - i810VertexPtr i810VB = I810_DRIVER_DATA(VB)->verts; - GLfloat sz = ctx->Point.Size * .5; - int i; - - /* Culling is disabled automatically via. the - * ctx->Driver.ReducedPrimitiveChange() callback. - */ - - for(i=first;iClipMask[i]==0) { - if (IND & I810_TWOSIDE_BIT) { - i810Vertex tmp0 = i810VB[i]; - if (IND & I810_TWOSIDE_BIT) { - GLubyte (*vbcolor)[4] = VB->ColorPtr->data; - I810_COLOR((char *)&tmp0.v.color, vbcolor[i]); - } - if (IND & I810_OFFSET_BIT) { - GLfloat offset = ctx->PointZoffset * (1.0 / 0x10000); - tmp0.v.z += offset; - } - i810_draw_point( imesa, &tmp0, sz ); - } else - i810_draw_point( imesa, &i810VB[i], sz ); - } - } -} - - - -static void TAG(init)( void ) -{ - tri_tab[IND] = TAG(triangle); - quad_tab[IND] = TAG(quad); - line_tab[IND] = TAG(line); - points_tab[IND] = TAG(points); -} - - -#undef IND -#undef TAG Index: xc/lib/GL/mesa/src/drv/i810/i810vb.c diff -u xc/lib/GL/mesa/src/drv/i810/i810vb.c:1.8 xc/lib/GL/mesa/src/drv/i810/i810vb.c:1.12 --- xc/lib/GL/mesa/src/drv/i810/i810vb.c:1.8 Wed Mar 21 11:14:21 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810vb.c Wed Oct 30 07:51:34 2002 @@ -15,454 +15,483 @@ * 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/i810vb.c,v 1.8 2001/03/21 16:14:21 dawes Exp $ */ - -#include -#include -#include "i810context.h" -#include "i810vb.h" -#include "i810log.h" -#include "mem.h" -#include "stages.h" - - - -#define TEX0 { \ - v->v.tu0 = tc0[i][0]; \ - v->v.tv0 = tc0[i][1]; \ -} - -#define TEX1 { \ - v->v.tu1 = tc1[i][0]; \ - v->v.tv1 = tc1[i][1]; \ -} - -/* Doesn't seem to work very well (golly). - */ -#define SPC { \ - 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]; \ -} - -#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]; \ -} - -/* The vertex formats we have don't seem to support projective texturing - * in the multitexture case. (Would require another 1/w value for the - * second set of texcoords). - */ -#define TEX0_4 \ - if (VB->TexCoordPtr[0]->size == 4) \ - { \ - GLfloat (*tc)[4] = VB->TexCoordPtr[0]->data; \ - v = &(I810_DRIVER_DATA(VB)->verts[start]); \ - imesa->setupdone &= ~I810_WIN_BIT; \ - for (i=start; i < end; i++, v++) { \ - float oow = 1.0 / tc[i][3]; \ - v->v.oow *= tc[i][3]; \ - v->v.tu0 *= oow; \ - v->v.tv0 *= oow; \ - } \ - } - - -#define COORD \ - GLfloat *win = VB->Win.data[i]; \ - 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) \ -{ \ - i810ContextPtr imesa = I810_CONTEXT( VB->ctx ); \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ - i810VertexPtr v; \ - GLfloat (*tc0)[4]; \ - GLfloat (*tc1)[4]; \ - const GLfloat xoffset = SUBPIXEL_X; \ - const GLfloat yoffset = dPriv->h + SUBPIXEL_Y; \ - int i; \ - (void) xoffset; \ - (void) yoffset; \ - (void) imesa; \ - \ - \ - gl_import_client_data( VB, VB->ctx->RenderFlags, \ - (VB->ClipOrMask \ - ? VEC_WRITABLE|VEC_GOOD_STRIDE \ - : VEC_GOOD_STRIDE)); \ - \ - tc0 = VB->TexCoordPtr[0]->data; \ - tc1 = VB->TexCoordPtr[1]->data; \ - \ - v = &(I810_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; \ -} +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810vb.c,v 1.12 2002/10/30 12:51:34 alanh Exp $ */ +#include "glheader.h" +#include "mtypes.h" +#include "mem.h" +#include "macros.h" +#include "colormac.h" +#include "mmath.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" - -SETUPFUNC(rs_wt0, COORD,NOP,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wt0t1, COORD,NOP,TEX0,TEX1,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wft0, COORD,NOP,TEX0,NOP,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wft0t1, COORD,NOP,TEX0,TEX1,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wg, COORD,COL,NOP,NOP,NOP,NOP,NOP) -SETUPFUNC(rs_wgs, COORD,COL,NOP,NOP,NOP,SPC,NOP) -SETUPFUNC(rs_wgt0, COORD,COL,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wgt0t1, COORD,COL,TEX0,TEX1,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wgst0, COORD,COL,TEX0,NOP,TEX0_4,SPC,NOP) -SETUPFUNC(rs_wgst0t1, COORD,COL,TEX0,TEX1,TEX0_4,SPC,NOP) -SETUPFUNC(rs_wgf, COORD,COL,NOP,NOP,NOP,NOP,FOG) -SETUPFUNC(rs_wgfs, COORD,COL,NOP,NOP,NOP,SPC,FOG) -SETUPFUNC(rs_wgft0, COORD,COL,TEX0,NOP,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wgft0t1, COORD,COL,TEX0,TEX1,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wgfst0, COORD,COL,TEX0,NOP,TEX0_4,SPC,FOG) -SETUPFUNC(rs_wgfst0t1, COORD,COL,TEX0,TEX1,TEX0_4,SPC,FOG) - -SETUPFUNC(rs_t0, NOP,NOP,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_t0t1, NOP,NOP,TEX0,TEX1,TEX0_4,NOP,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,NOP,FOG) -SETUPFUNC(rs_g, NOP,COL,NOP,NOP,NOP,NOP,NOP) -SETUPFUNC(rs_gs, NOP,COL,NOP,NOP,NOP,SPC,NOP) -SETUPFUNC(rs_gt0, NOP,COL,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_gt0t1, NOP,COL,TEX0,TEX1,TEX0_4,NOP,NOP) -SETUPFUNC(rs_gst0, NOP,COL,TEX0,NOP,TEX0_4,SPC,NOP) -SETUPFUNC(rs_gst0t1, NOP,COL,TEX0,TEX1,TEX0_4,SPC,NOP) -SETUPFUNC(rs_gf, NOP,COL,NOP,NOP,NOP,NOP,FOG) -SETUPFUNC(rs_gfs, NOP,COL,NOP,NOP,NOP,SPC,FOG) -SETUPFUNC(rs_gft0, NOP,COL,TEX0,NOP,TEX0_4,NOP,FOG) -SETUPFUNC(rs_gft0t1, NOP,COL,TEX0,TEX1,TEX0_4,NOP,FOG) -SETUPFUNC(rs_gfst0, NOP,COL,TEX0,NOP,TEX0_4,SPC,FOG) -SETUPFUNC(rs_gfst0t1, NOP,COL,TEX0,TEX1,TEX0_4,SPC,FOG) +#include "i810screen.h" +#include "i810_dri.h" +#include "i810context.h" +#include "i810vb.h" +#include "i810ioctl.h" +#include "i810tris.h" +#include "i810state.h" + + +#define I810_TEX1_BIT 0x1 +#define I810_TEX0_BIT 0x2 +#define I810_RGBA_BIT 0x4 +#define I810_SPEC_BIT 0x8 +#define I810_FOG_BIT 0x10 +#define I810_XYZW_BIT 0x20 +#define I810_PTEX_BIT 0x40 +#define I810_MAX_SETUP 0x80 + +static struct { + void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint ); + interp_func interp; + copy_pv_func copy_pv; + GLboolean (*check_tex_sizes)( GLcontext *ctx ); + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; +} setup_tab[I810_MAX_SETUP]; + +#define TINY_VERTEX_FORMAT (GFX_OP_VERTEX_FMT | \ + VF_TEXCOORD_COUNT_0 | \ + VF_RGBA_ENABLE | \ + VF_XYZ) + +#define NOTEX_VERTEX_FORMAT (GFX_OP_VERTEX_FMT | \ + VF_TEXCOORD_COUNT_0 | \ + VF_SPEC_FOG_ENABLE | \ + VF_RGBA_ENABLE | \ + VF_XYZW) + +#define TEX0_VERTEX_FORMAT (GFX_OP_VERTEX_FMT | \ + VF_TEXCOORD_COUNT_1 | \ + VF_SPEC_FOG_ENABLE | \ + VF_RGBA_ENABLE | \ + VF_XYZW) + +#define TEX1_VERTEX_FORMAT (GFX_OP_VERTEX_FMT | \ + VF_TEXCOORD_COUNT_2 | \ + VF_SPEC_FOG_ENABLE | \ + VF_RGBA_ENABLE | \ + VF_XYZW) + +#define PROJ_TEX1_VERTEX_FORMAT 0 +#define TEX2_VERTEX_FORMAT 0 +#define TEX3_VERTEX_FORMAT 0 +#define PROJ_TEX3_VERTEX_FORMAT 0 + +#define DO_XYZW (IND & I810_XYZW_BIT) +#define DO_RGBA (IND & I810_RGBA_BIT) +#define DO_SPEC (IND & I810_SPEC_BIT) +#define DO_FOG (IND & I810_FOG_BIT) +#define DO_TEX0 (IND & I810_TEX0_BIT) +#define DO_TEX1 (IND & I810_TEX1_BIT) +#define DO_TEX2 0 +#define DO_TEX3 0 +#define DO_PTEX (IND & I810_PTEX_BIT) + +#define VERTEX i810Vertex +#define VERTEX_COLOR i810_color_t +#define GET_VIEWPORT_MAT() I810_CONTEXT(ctx)->ViewportMatrix.m +#define GET_TEXSOURCE(n) n +#define GET_VERTEX_FORMAT() I810_CONTEXT(ctx)->Setup[I810_CTXREG_VF] +#define GET_VERTEX_STORE() I810_CONTEXT(ctx)->verts +#define GET_VERTEX_STRIDE_SHIFT() I810_CONTEXT(ctx)->vertex_stride_shift +#define GET_UBYTE_COLOR_STORE() &I810_CONTEXT(ctx)->UbyteColor +#define GET_UBYTE_SPEC_COLOR_STORE() &I810_CONTEXT(ctx)->UbyteSecondaryColor +#define INVALIDATE_STORED_VERTICES() + +#define HAVE_HW_VIEWPORT 0 +#define HAVE_HW_DIVIDE 0 +#define HAVE_RGBA_COLOR 0 +#define HAVE_TINY_VERTICES 1 +#define HAVE_NOTEX_VERTICES 1 +#define HAVE_TEX0_VERTICES 1 +#define HAVE_TEX1_VERTICES 1 +#define HAVE_TEX2_VERTICES 0 +#define HAVE_TEX3_VERTICES 0 +#define HAVE_PTEX_VERTICES 0 + +#define UNVIEWPORT_VARS GLfloat h = I810_CONTEXT(ctx)->driDrawable->h +#define UNVIEWPORT_X(x) x - SUBPIXEL_X +#define UNVIEWPORT_Y(y) - y + h + SUBPIXEL_Y +#define UNVIEWPORT_Z(z) z * (float)0xffff + +#define PTEX_FALLBACK() FALLBACK(I810_CONTEXT(ctx), I810_FALLBACK_TEXTURE, 1) + +#define IMPORT_FLOAT_COLORS i810_import_float_colors +#define IMPORT_FLOAT_SPEC_COLORS i810_import_float_spec_colors + +#define INTERP_VERTEX setup_tab[I810_CONTEXT(ctx)->SetupIndex].interp +#define COPY_PV_VERTEX setup_tab[I810_CONTEXT(ctx)->SetupIndex].copy_pv + + +/*********************************************************************** + * Generate pv-copying and translation functions * + ***********************************************************************/ + +#define TAG(x) i810_##x +#include "tnl_dd/t_dd_vb.c" + +/*********************************************************************** + * Generate vertex emit and interp functions * + ***********************************************************************/ + + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT) +#define TAG(x) x##_wg +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_SPEC_BIT) +#define TAG(x) x##_wgs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_TEX0_BIT) +#define TAG(x) x##_wgt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_TEX0_BIT|I810_TEX1_BIT) +#define TAG(x) x##_wgt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_TEX0_BIT|I810_PTEX_BIT) +#define TAG(x) x##_wgpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_SPEC_BIT|I810_TEX0_BIT) +#define TAG(x) x##_wgst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_SPEC_BIT|I810_TEX0_BIT|\ + I810_TEX1_BIT) +#define TAG(x) x##_wgst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_SPEC_BIT|I810_TEX0_BIT|\ + I810_PTEX_BIT) +#define TAG(x) x##_wgspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_FOG_BIT) +#define TAG(x) x##_wgf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT) +#define TAG(x) x##_wgfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_TEX0_BIT) +#define TAG(x) x##_wgft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_TEX0_BIT|\ + I810_TEX1_BIT) +#define TAG(x) x##_wgft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_TEX0_BIT|\ + I810_PTEX_BIT) +#define TAG(x) x##_wgfpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT|\ + I810_TEX0_BIT) +#define TAG(x) x##_wgfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT|\ + I810_TEX0_BIT|I810_TEX1_BIT) +#define TAG(x) x##_wgfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_XYZW_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT|\ + I810_TEX0_BIT|I810_PTEX_BIT) +#define TAG(x) x##_wgfspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_TEX0_BIT) +#define TAG(x) x##_t0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_TEX0_BIT|I810_TEX1_BIT) +#define TAG(x) x##_t0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_FOG_BIT) +#define TAG(x) x##_f +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_FOG_BIT|I810_TEX0_BIT) +#define TAG(x) x##_ft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_FOG_BIT|I810_TEX0_BIT|I810_TEX1_BIT) +#define TAG(x) x##_ft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT) +#define TAG(x) x##_g +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_SPEC_BIT) +#define TAG(x) x##_gs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_TEX0_BIT) +#define TAG(x) x##_gt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_TEX0_BIT|I810_TEX1_BIT) +#define TAG(x) x##_gt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_SPEC_BIT|I810_TEX0_BIT) +#define TAG(x) x##_gst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_SPEC_BIT|I810_TEX0_BIT|I810_TEX1_BIT) +#define TAG(x) x##_gst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_FOG_BIT) +#define TAG(x) x##_gf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT) +#define TAG(x) x##_gfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_FOG_BIT|I810_TEX0_BIT) +#define TAG(x) x##_gft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_FOG_BIT|I810_TEX0_BIT|I810_TEX1_BIT) +#define TAG(x) x##_gft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT|I810_TEX0_BIT) +#define TAG(x) x##_gfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT|I810_TEX0_BIT|\ + I810_TEX1_BIT) +#define TAG(x) x##_gfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" -static void rs_invalid(struct vertex_buffer *VB, GLuint start, GLuint end) +static void init_setup_tab( void ) { - - fprintf(stderr, "i810RasterSetup(): invalid setup function\n"); + init_wg(); + init_wgs(); + init_wgt0(); + init_wgt0t1(); + init_wgpt0(); + init_wgst0(); + init_wgst0t1(); + init_wgspt0(); + init_wgf(); + init_wgfs(); + init_wgft0(); + init_wgft0t1(); + init_wgfpt0(); + init_wgfst0(); + init_wgfst0t1(); + init_wgfspt0(); + init_t0(); + init_t0t1(); + init_f(); + init_ft0(); + init_ft0t1(); + init_g(); + init_gs(); + init_gt0(); + init_gt0t1(); + init_gst0(); + init_gst0t1(); + init_gf(); + init_gfs(); + init_gft0(); + init_gft0t1(); + init_gfst0(); + init_gfst0t1(); } -typedef void (*setupFunc)(struct vertex_buffer *,GLuint,GLuint); - -static setupFunc setup_func[0x80]; - -void i810DDSetupInit( void ) -{ - int i; - - for (i = 0 ; i < 0x80 ; i++) - setup_func[i] = rs_invalid; - - /* Functions to build vert's from scratch */ - setup_func[I810_WIN_BIT|I810_TEX0_BIT] = rs_wt0; - setup_func[I810_WIN_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_wt0t1; - setup_func[I810_WIN_BIT|I810_FOG_BIT|I810_TEX0_BIT] = rs_wft0; - setup_func[I810_WIN_BIT|I810_FOG_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_wft0t1; - setup_func[I810_WIN_BIT|I810_RGBA_BIT] = rs_wg; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_SPEC_BIT] = rs_wgs; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_TEX0_BIT] = rs_wgt0; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_wgt0t1; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_SPEC_BIT|I810_TEX0_BIT] = rs_wgst0; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_SPEC_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_wgst0t1; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_FOG_BIT] = rs_wgf; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT] = rs_wgfs; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_TEX0_BIT] = rs_wgft0; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_wgft0t1; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT|I810_TEX0_BIT] = rs_wgfst0; - setup_func[I810_WIN_BIT|I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_wgfst0t1; - - /* Repair functions */ - setup_func[I810_TEX0_BIT] = rs_t0; - setup_func[I810_TEX0_BIT|I810_TEX1_BIT] = rs_t0t1; - setup_func[I810_FOG_BIT] = rs_f; - setup_func[I810_FOG_BIT|I810_TEX0_BIT] = rs_ft0; - setup_func[I810_FOG_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_ft0t1; - setup_func[I810_RGBA_BIT] = rs_g; - setup_func[I810_RGBA_BIT|I810_SPEC_BIT] = rs_gs; - setup_func[I810_RGBA_BIT|I810_TEX0_BIT] = rs_gt0; - setup_func[I810_RGBA_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_gt0t1; - setup_func[I810_RGBA_BIT|I810_SPEC_BIT|I810_TEX0_BIT] = rs_gst0; - setup_func[I810_RGBA_BIT|I810_SPEC_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_gst0t1; - setup_func[I810_RGBA_BIT|I810_FOG_BIT] = rs_gf; - setup_func[I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT] = rs_gfs; - setup_func[I810_RGBA_BIT|I810_FOG_BIT|I810_TEX0_BIT] = rs_gft0; - setup_func[I810_RGBA_BIT|I810_FOG_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_gft0t1; - setup_func[I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT|I810_TEX0_BIT] = rs_gfst0; - setup_func[I810_RGBA_BIT|I810_FOG_BIT|I810_SPEC_BIT|I810_TEX0_BIT|I810_TEX1_BIT] = rs_gfst0t1; - -} void i810PrintSetupFlags(char *msg, GLuint flags ) { - fprintf(stderr, "%s: %d %s%s%s%s%s%s%s\n", + fprintf(stderr, "%s(%x): %s%s%s%s%s%s\n", msg, (int)flags, - (flags & I810_WIN_BIT) ? " xyzw," : "", + (flags & I810_XYZW_BIT) ? " xyzw," : "", (flags & I810_RGBA_BIT) ? " rgba," : "", (flags & I810_SPEC_BIT) ? " spec," : "", (flags & I810_FOG_BIT) ? " fog," : "", (flags & I810_TEX0_BIT) ? " tex-0," : "", - (flags & I810_TEX1_BIT) ? " tex-1," : "", - (flags & I810_ALPHA_BIT) ? " alpha," : ""); + (flags & I810_TEX1_BIT) ? " tex-1," : ""); } - -void i810ChooseRasterSetupFunc(GLcontext *ctx) +void i810CheckTexSizes( GLcontext *ctx ) { - i810ContextPtr imesa = I810_CONTEXT( ctx ); - int funcindex = (I810_WIN_BIT | I810_RGBA_BIT); - - imesa->vertsize = 8; - imesa->Setup[I810_CTXREG_VF] = I810_VFMT_T0; - - if (ctx->Texture.ReallyEnabled & 0xf) - funcindex |= I810_TEX0_BIT; - - if (ctx->Texture.ReallyEnabled & 0xf0) { - funcindex |= (I810_TEX0_BIT | I810_TEX1_BIT); - imesa->vertsize = 10; - imesa->Setup[I810_CTXREG_VF] = I810_VFMT_T0T1; - } - - if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - funcindex |= I810_SPEC_BIT; - - if (ctx->FogMode == FOG_FRAGMENT) - funcindex |= I810_FOG_BIT; - - if (MESA_VERBOSE) - i810PrintSetupFlags("xsmesa: full setup function", funcindex); + TNLcontext *tnl = TNL_CONTEXT(ctx); + i810ContextPtr imesa = I810_CONTEXT( ctx ); - imesa->setupindex = funcindex; - ctx->Driver.RasterSetup = setup_func[funcindex]; + if (!setup_tab[imesa->SetupIndex].check_tex_sizes(ctx)) { + /* Invalidate stored verts + */ + imesa->SetupNewInputs = ~0; + imesa->SetupIndex |= I810_PTEX_BIT; + + if (!imesa->Fallback && + !(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { + tnl->Driver.Render.Interp = setup_tab[imesa->SetupIndex].interp; + tnl->Driver.Render.CopyPV = setup_tab[imesa->SetupIndex].copy_pv; + } + } } - - - -void i810DDCheckPartialRasterSetup( GLcontext *ctx, - struct gl_pipeline_stage *d ) +void i810BuildVertices( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint newinputs ) { i810ContextPtr imesa = I810_CONTEXT( ctx ); - GLuint tmp = imesa->setupdone; + GLubyte *v = ((GLubyte *)imesa->verts + (start<vertex_stride_shift)); + GLuint stride = 1<vertex_stride_shift; - d->type = 0; - imesa->setupdone = 0; /* cleared if we return */ + if (0) fprintf(stderr, "%s\n", __FUNCTION__); - if ((ctx->Array.Summary & VERT_OBJ_ANY) == 0) - return; + newinputs |= imesa->SetupNewInputs; + imesa->SetupNewInputs = 0; - if (ctx->IndirectTriangles) + if (!newinputs) return; - imesa->setupdone = tmp; + if (newinputs & VERT_CLIP) { + setup_tab[imesa->SetupIndex].emit( ctx, start, count, v, stride ); + } else { + GLuint ind = 0; - /* disabled until we have a merge&render op */ - /* d->inputs = available; */ - /* d->outputs = VERT_RAST_SETUP_PART; */ - /* d->type = PIPE_PRECALC; */ -} + if (newinputs & VERT_RGBA) + ind |= I810_RGBA_BIT; + if (newinputs & VERT_SPEC_RGB) + ind |= I810_SPEC_BIT; -/* Repair existing precalculated vertices with new data. - */ -void i810DDPartialRasterSetup( struct vertex_buffer *VB ) -{ - i810ContextPtr imesa = I810_CONTEXT( VB->ctx ); - GLuint new = VB->pipeline->new_outputs; - GLuint available = VB->pipeline->outputs; - GLuint ind = 0; - - if (new & VERT_WIN) { - new = available; - ind |= I810_WIN_BIT | I810_FOG_BIT; - } + if (newinputs & VERT_TEX0) + ind |= I810_TEX0_BIT; - if (new & VERT_RGBA) - ind |= I810_RGBA_BIT | I810_SPEC_BIT; + if (newinputs & VERT_TEX1) + ind |= I810_TEX1_BIT; - if (new & VERT_TEX0_ANY) - ind |= I810_TEX0_BIT; - - if (new & VERT_TEX1_ANY) - ind |= I810_TEX1_BIT; - - if (new & VERT_FOG_COORD) - ind |= I810_FOG_BIT; + if (newinputs & VERT_FOG_COORD) + ind |= I810_FOG_BIT; - imesa->setupdone &= ~ind; - ind &= imesa->setupindex; - imesa->setupdone |= ind; + if (imesa->SetupIndex & I810_PTEX_BIT) + ind = ~0; - if (0) i810PrintSetupFlags("xsmesa: partial setup function", ind); + ind &= imesa->SetupIndex; - if (ind) - setup_func[ind&~I810_ALPHA_BIT]( VB, VB->Start, VB->Count ); + if (ind) { + setup_tab[ind].emit( ctx, start, count, v, stride ); + } + } } - -void i810DDDoRasterSetup( struct vertex_buffer *VB ) +void i810ChooseVertexState( GLcontext *ctx ) { - GLcontext *ctx = VB->ctx; - - if (VB->Type == VB_CVA_PRECALC) - i810DDPartialRasterSetup( VB ); - else if (ctx->Driver.RasterSetup) - ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); -} - + TNLcontext *tnl = TNL_CONTEXT(ctx); + i810ContextPtr imesa = I810_CONTEXT( ctx ); + GLuint ind = I810_XYZW_BIT|I810_RGBA_BIT; + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + ind |= I810_SPEC_BIT; + if (ctx->Fog.Enabled) + ind |= I810_FOG_BIT; -void i810DDResizeVB( struct vertex_buffer *VB, GLuint size ) -{ - i810VertexBufferPtr mvb = I810_DRIVER_DATA(VB); + if (ctx->Texture._ReallyEnabled & TEXTURE1_ANY) + ind |= I810_TEX1_BIT|I810_TEX0_BIT; + else if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) + ind |= I810_TEX0_BIT; - while (mvb->size < size) - mvb->size *= 2; + imesa->SetupIndex = ind; - free( mvb->vert_store ); - mvb->vert_store = malloc( sizeof(i810Vertex) * mvb->size + 31); - if (!mvb->vert_store) { - fprintf(stderr, "i810-glx: out of memory !\n"); - exit(1); + if (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED)) { + tnl->Driver.Render.Interp = i810_interp_extras; + tnl->Driver.Render.CopyPV = i810_copy_pv_extras; + } else { + tnl->Driver.Render.Interp = setup_tab[ind].interp; + tnl->Driver.Render.CopyPV = setup_tab[ind].copy_pv; } - - mvb->verts = (i810VertexPtr)(((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) { - fprintf(stderr, "i810-glx: out of memory !\n"); - exit(1); + if (setup_tab[ind].vertex_format != imesa->Setup[I810_CTXREG_VF]) { + I810_STATECHANGE(imesa, I810_UPLOAD_CTX); + imesa->Setup[I810_CTXREG_VF] = setup_tab[ind].vertex_format; + imesa->vertex_size = setup_tab[ind].vertex_size; + imesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; } +} - ALIGN_FREE( VB->ClipMask ); - VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 4); - if (!VB->ClipMask) { - fprintf(stderr, "i810-glx: out of memory !\n"); - exit(1); - } - if (VB->Type == VB_IMMEDIATE) { - free( mvb->primitive ); - free( mvb->next_primitive ); - mvb->primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); - mvb->next_primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); - if (!mvb->primitive || !mvb->next_primitive) { - fprintf(stderr, "i810-glx: out of memory !\n"); - exit(1); - } - } +void i810_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + GLuint vertex_size = imesa->vertex_size * 4; + GLuint *dest = i810AllocDmaLow( imesa, (count-start) * vertex_size); + setup_tab[imesa->SetupIndex].emit( ctx, start, count, dest, vertex_size ); } -void i810DDRegisterVB( struct vertex_buffer *VB ) + +void i810InitVB( GLcontext *ctx ) { - i810VertexBufferPtr mvb; + i810ContextPtr imesa = I810_CONTEXT(ctx); + GLuint size = TNL_CONTEXT(ctx)->vb.Size; - mvb = (i810VertexBufferPtr)calloc( 1, sizeof(*mvb) ); + imesa->verts = (char *)ALIGN_MALLOC(size * 4 * 16, 32); - mvb->size = VB->Size * 2; - mvb->vert_store = malloc( sizeof(i810Vertex) * mvb->size + 31); - if (!mvb->vert_store) { - fprintf(stderr, "i810-glx: out of memory !\n"); - exit(1); + { + static int firsttime = 1; + if (firsttime) { + init_setup_tab(); + firsttime = 0; + } } - - mvb->verts = (i810VertexPtr)(((unsigned long)mvb->vert_store + 31) & ~31); +} - gl_vector1ui_alloc( &mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32 ); - if (!mvb->clipped_elements.start) { - fprintf(stderr, "i810-glx: out of memory !\n"); - exit(1); - } - - ALIGN_FREE( VB->ClipMask ); - VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 4); - if (!VB->ClipMask) { - fprintf(stderr, "i810-glx: out of memory !\n"); - exit(1); - } - mvb->primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); - mvb->next_primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); - if (!mvb->primitive || !mvb->next_primitive) { - fprintf(stderr, "i810-glx: out of memory !\n"); - exit(1); +void i810FreeVB( GLcontext *ctx ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + if (imesa->verts) { + ALIGN_FREE(imesa->verts); + imesa->verts = 0; } - VB->driver_data = mvb; -} - + if (imesa->UbyteSecondaryColor.Ptr) { + ALIGN_FREE(imesa->UbyteSecondaryColor.Ptr); + imesa->UbyteSecondaryColor.Ptr = 0; + } -void i810DDUnregisterVB( struct vertex_buffer *VB ) -{ - i810VertexBufferPtr mvb = I810_DRIVER_DATA(VB); - - if (mvb) { - if (mvb->vert_store) free(mvb->vert_store); - if (mvb->primitive) free(mvb->primitive); - if (mvb->next_primitive) free(mvb->next_primitive); - gl_vector1ui_free( &mvb->clipped_elements ); - free(mvb); - VB->driver_data = 0; - } + if (imesa->UbyteColor.Ptr) { + ALIGN_FREE(imesa->UbyteColor.Ptr); + imesa->UbyteColor.Ptr = 0; + } } Index: xc/lib/GL/mesa/src/drv/i810/i810vb.h diff -u xc/lib/GL/mesa/src/drv/i810/i810vb.h:1.3 xc/lib/GL/mesa/src/drv/i810/i810vb.h:1.4 --- xc/lib/GL/mesa/src/drv/i810/i810vb.h:1.3 Sun Aug 27 22:43:12 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810vb.h Fri Feb 22 16:33:04 2002 @@ -15,104 +15,48 @@ * 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/i810vb.h,v 1.3 2000/08/28 02:43:12 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810vb.h,v 1.4 2002/02/22 21:33:04 dawes Exp $ */ #ifndef I810VB_INC #define I810VB_INC -#include "vb.h" -#include "types.h" +#include "mtypes.h" +#include "swrast/swrast.h" -/* - * color type for the vertex data - * we probably want to use an internal datatype here? - */ -typedef struct { - GLubyte blue; - GLubyte green; - GLubyte red; - GLubyte alpha; -} i810_color; - - -/* A basic fixed format vertex to kick things off. Move to dynamic - * layouts later on. (see also the i810_full_vertex struct in - * i810_3d_reg.h) - */ -typedef struct { - GLfloat x,y,z; /* coordinates in screen space*/ - GLfloat oow; /* reciprocal homogeneous w */ - i810_color color; /* vertex color */ - i810_color specular; /* specular color, alpha is fog */ - GLfloat tu0,tv0; /* texture 0 */ - GLfloat tu1,tv1; /* texture 1 */ -} i810_vertex; - +#define _I810_NEW_VERTEX (_NEW_TEXTURE | \ + _DD_NEW_SEPARATE_SPECULAR | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _NEW_FOG) -/* Unfortunately only have assembly for 16-stride vertices. - */ -union i810_vertex_t { - i810_vertex v; - float f[16]; - GLuint ui[16]; -}; - -typedef union i810_vertex_t i810Vertex; -typedef union i810_vertex_t *i810VertexPtr; - -struct i810_vertex_buffer_t { - GLvector1ui clipped_elements; - i810VertexPtr verts; - int last_vert; - GLuint *primitive; - GLuint *next_primitive; - void *vert_store; - GLuint size; -}; - -typedef struct i810_vertex_buffer_t *i810VertexBufferPtr; - - -#define I810_CONTEXT(ctx) ((i810ContextPtr)(ctx->DriverCtx)) -#define I810_DRIVER_DATA(vb) ((i810VertexBufferPtr)((vb)->driver_data)) - - -#define I810_SPEC_BIT 0x1 -#define I810_FOG_BIT 0x2 -#define I810_ALPHA_BIT 0x4 /* GL_BLEND, not used */ -#define I810_TEX1_BIT 0x8 -#define I810_TEX0_BIT 0x10 -#define I810_RGBA_BIT 0x20 -#define I810_WIN_BIT 0x40 - -extern void i810ChooseRasterSetupFunc(GLcontext *ctx); -extern void i810PrintSetupFlags(char *msg, GLuint flags ); -extern void i810DDDoRasterSetup( struct vertex_buffer *VB ); -extern void i810DDPartialRasterSetup( struct vertex_buffer *VB ); -extern void i810DDCheckPartialRasterSetup( GLcontext *ctx, - struct gl_pipeline_stage *d ); +extern void i810ChooseVertexState( GLcontext *ctx ); +extern void i810CheckTexSizes( GLcontext *ctx ); +extern void i810BuildVertices( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint newinputs ); -extern void i810DDViewport( GLcontext *ctx, - GLint x, GLint y, - GLsizei width, GLsizei height ); -extern void i810DDDepthRange( GLcontext *ctx, - GLclampd nearval, GLclampd farval ); +extern void i810_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ); +extern void i810_translate_vertex( GLcontext *ctx, + const i810Vertex *src, + SWvertex *dst ); -extern void i810DDUnregisterVB( struct vertex_buffer *VB ); -extern void i810DDRegisterVB( struct vertex_buffer *VB ); -extern void i810DDResizeVB( struct vertex_buffer *VB, GLuint size ); +extern void i810InitVB( GLcontext *ctx ); +extern void i810FreeVB( GLcontext *ctx ); -extern void i810DDSetupInit( void ); - +extern void i810_print_vertex( GLcontext *ctx, const i810Vertex *v ); +extern void i810PrintSetupFlags(char *msg, GLuint flags ); #endif Index: xc/lib/GL/mesa/src/drv/i830/Imakefile diff -u xc/lib/GL/mesa/src/drv/i830/Imakefile:1.1 xc/lib/GL/mesa/src/drv/i830/Imakefile:1.7 --- xc/lib/GL/mesa/src/drv/i830/Imakefile:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/Imakefile Mon Nov 25 09:04:51 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i830/Imakefile,v 1.1 2001/10/04 18:28:21 alanh Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i830/Imakefile,v 1.7 2002/11/25 14:04:51 eich Exp $ #include @@ -18,16 +18,22 @@ #include "../common/Imakefile.inc" #include "Imakefile.inc" +#include "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" #include "../../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #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 + DRIOBJS = $(GLXLIBSRC)/dri/dri_util.o DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ @@ -57,12 +63,12 @@ #if !GlxUseBuiltInDRIDriver LIBNAME = i830_dri.so -SharedDriModuleTarget($(LIBNAME),DONE,$(OBJS)) +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #ifdef GlxSoProf SOPROF_LIBNAME = _i830_dri_p -NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE,$(ALL_OBJS)) +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) #endif #endif Index: xc/lib/GL/mesa/src/drv/i830/Imakefile.inc diff -u xc/lib/GL/mesa/src/drv/i830/Imakefile.inc:1.1 xc/lib/GL/mesa/src/drv/i830/Imakefile.inc:1.2 --- xc/lib/GL/mesa/src/drv/i830/Imakefile.inc:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/Imakefile.inc Mon Sep 9 15:18:47 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i830/Imakefile.inc,v 1.1 2001/10/04 18:28:21 alanh Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i830/Imakefile.inc,v 1.2 2002/09/09 19:18:47 dawes Exp $ #ifndef MesaDrvSrcDir #define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv @@ -17,84 +17,99 @@ #if BuildXF86DRI DRI_DEFINES = GlxDefines - DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ - -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ - -I$(GLXLIBSRC)/mesa/dri \ + DRI_INCLUDES = -I$(GLXLIBSRC)/dri \ + -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) \ + -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/dri \ -I$(SERVERSRC)/GL/dri \ -I$(XF86OSSRC) \ -I$(XF86DRIVERSRC)/i810 \ - -I$(GLXLIBSRC)/dri/drm + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/include #endif MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ -I$(MESADRVSRCDIR)/i830 X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) - I830SRCS = $(MESADRVI830BUILDDIR)i830_xmesa.c \ - $(MESADRVI830BUILDDIR)i830_dd.c \ - $(MESADRVI830BUILDDIR)i830_pipeline.c \ + I830SRCS = $(MESADRVI830BUILDDIR)i830_context.c \ + $(MESADRVI830BUILDDIR)i830_debug.c \ + $(MESADRVI830BUILDDIR)i830_ioctl.c \ + $(MESADRVI830BUILDDIR)i830_render.c \ + $(MESADRVI830BUILDDIR)i830_screen.c \ $(MESADRVI830BUILDDIR)i830_span.c \ $(MESADRVI830BUILDDIR)i830_state.c \ $(MESADRVI830BUILDDIR)i830_tex.c \ + $(MESADRVI830BUILDDIR)i830_texmem.c \ + $(MESADRVI830BUILDDIR)i830_texstate.c \ $(MESADRVI830BUILDDIR)i830_tris.c \ - $(MESADRVI830BUILDDIR)i830_vb.c \ - $(MESADRVI830BUILDDIR)i830_fastpath.c \ - $(MESADRVI830BUILDDIR)i830_ioctl.c - - I830OBJS = $(MESADRVI830BUILDDIR)i830_xmesa.o \ - $(MESADRVI830BUILDDIR)i830_dd.o \ - $(MESADRVI830BUILDDIR)i830_pipeline.o \ + $(MESADRVI830BUILDDIR)i830_vb.c + + I830OBJS = $(MESADRVI830BUILDDIR)i830_context.o \ + $(MESADRVI830BUILDDIR)i830_debug.o \ + $(MESADRVI830BUILDDIR)i830_ioctl.o \ + $(MESADRVI830BUILDDIR)i830_render.o \ + $(MESADRVI830BUILDDIR)i830_screen.o \ $(MESADRVI830BUILDDIR)i830_span.o \ $(MESADRVI830BUILDDIR)i830_state.o \ $(MESADRVI830BUILDDIR)i830_tex.o \ + $(MESADRVI830BUILDDIR)i830_texmem.o \ + $(MESADRVI830BUILDDIR)i830_texstate.o \ $(MESADRVI830BUILDDIR)i830_tris.o \ - $(MESADRVI830BUILDDIR)i830_vb.o \ - $(MESADRVI830BUILDDIR)i830_fastpath.o \ - $(MESADRVI830BUILDDIR)i830_ioctl.o - - I830UOBJS = $(MESADRVI830BUILDDIR)unshared/i830_xmesa.o \ - $(MESADRVI830BUILDDIR)unshared/i830_dd.o \ - $(MESADRVI830BUILDDIR)unshared/i830_pipeline.o \ - $(MESADRVI830BUILDDIR)unshared/i830_span.o \ - $(MESADRVI830BUILDDIR)unshared/i830_state.o \ - $(MESADRVI830BUILDDIR)unshared/i830_tex.o \ - $(MESADRVI830BUILDDIR)unshared/i830_tris.o \ - $(MESADRVI830BUILDDIR)unshared/i830_vb.o \ - $(MESADRVI830BUILDDIR)unshared/i830_fastpath.o \ - $(MESADRVI830BUILDDIR)unshared/i830_ioctl.o - - I830DOBJS = $(MESADRVI830BUILDDIR)unshared/i830_xmesa.o \ - $(MESADRVI830BUILDDIR)unshared/i830_dd.o \ - $(MESADRVI830BUILDDIR)unshared/i830_pipeline.o \ - $(MESADRVI830BUILDDIR)unshared/i830_span.o \ - $(MESADRVI830BUILDDIR)unshared/i830_state.o \ - $(MESADRVI830BUILDDIR)unshared/i830_tex.o \ - $(MESADRVI830BUILDDIR)unshared/i830_tris.o \ - $(MESADRVI830BUILDDIR)unshared/i830_vb.o \ - $(MESADRVI830BUILDDIR)unshared/i830_fastpath.o \ - $(MESADRVI830BUILDDIR)unshared/i830_ioctl.o - - I830POBJS = $(MESADRVI830BUILDDIR)unshared/i830_xmesa.o \ - $(MESADRVI830BUILDDIR)unshared/i830_dd.o \ - $(MESADRVI830BUILDDIR)unshared/i830_pipeline.o \ + $(MESADRVI830BUILDDIR)i830_vb.o + + I830UOBJS = $(MESADRVI830BUILDDIR)unshared/i830_context.o \ + $(MESADRVI830BUILDDIR)unshared/i830_debug.o \ + $(MESADRVI830BUILDDIR)unshared/i830_ioctl.o \ + $(MESADRVI830BUILDDIR)unshared/i830_render.o \ + $(MESADRVI830BUILDDIR)unshared/i830_screen.o \ $(MESADRVI830BUILDDIR)unshared/i830_span.o \ $(MESADRVI830BUILDDIR)unshared/i830_state.o \ $(MESADRVI830BUILDDIR)unshared/i830_tex.o \ + $(MESADRVI830BUILDDIR)unshared/i830_texmem.o \ + $(MESADRVI830BUILDDIR)unshared/i830_texstate.o \ $(MESADRVI830BUILDDIR)unshared/i830_tris.o \ - $(MESADRVI830BUILDDIR)unshared/i830_vb.o \ - $(MESADRVI830BUILDDIR)unshared/i830_fastpath.o \ - $(MESADRVI830BUILDDIR)unshared/i830_ioctl.o + $(MESADRVI830BUILDDIR)unshared/i830_vb.o + I830DOBJS = $(MESADRVI830BUILDDIR)debugger/i830_context.o \ + $(MESADRVI830BUILDDIR)debugger/i830_debug.o \ + $(MESADRVI830BUILDDIR)debugger/i830_ioctl.o \ + $(MESADRVI830BUILDDIR)debugger/i830_render.o \ + $(MESADRVI830BUILDDIR)debugger/i830_screen.o \ + $(MESADRVI830BUILDDIR)debugger/i830_span.o \ + $(MESADRVI830BUILDDIR)debugger/i830_state.o \ + $(MESADRVI830BUILDDIR)debugger/i830_tex.o \ + $(MESADRVI830BUILDDIR)debugger/i830_texmem.o \ + $(MESADRVI830BUILDDIR)debugger/i830_texstate.o \ + $(MESADRVI830BUILDDIR)debugger/i830_tris.o \ + $(MESADRVI830BUILDDIR)debugger/i830_vb.o + + I830POBJS = $(MESADRVI830BUILDDIR)profiled/i830_context.o \ + $(MESADRVI830BUILDDIR)profiled/i830_debug.o \ + $(MESADRVI830BUILDDIR)profiled/i830_ioctl.o \ + $(MESADRVI830BUILDDIR)profiled/i830_render.o \ + $(MESADRVI830BUILDDIR)profiled/i830_screen.o \ + $(MESADRVI830BUILDDIR)profiled/i830_span.o \ + $(MESADRVI830BUILDDIR)profiled/i830_state.o \ + $(MESADRVI830BUILDDIR)profiled/i830_tex.o \ + $(MESADRVI830BUILDDIR)profiled/i830_texmem.o \ + $(MESADRVI830BUILDDIR)profiled/i830_texstate.o \ + $(MESADRVI830BUILDDIR)profiled/i830_tris.o \ + $(MESADRVI830BUILDDIR)profiled/i830_vb.o + #ifdef NeedToLinkMesaSrc -LinkSourceFile(i830_xmesa.c, $(MESADRVSRCDIR)/i830) -LinkSourceFile(i830_dd.c, $(MESADRVSRCDIR)/i830) -LinkSourceFile(i830_pipeline.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_context.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_debug.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_ioctl.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_render.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_screen.c, $(MESADRVSRCDIR)/i830) LinkSourceFile(i830_span.c, $(MESADRVSRCDIR)/i830) LinkSourceFile(i830_state.c, $(MESADRVSRCDIR)/i830) LinkSourceFile(i830_tex.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_texmem.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_texstate.c, $(MESADRVSRCDIR)/i830) LinkSourceFile(i830_tris.c, $(MESADRVSRCDIR)/i830) LinkSourceFile(i830_vb.c, $(MESADRVSRCDIR)/i830) -LinkSourceFile(i830_fastpath.c, $(MESADRVSRCDIR)/i830) -LinkSourceFile(i830_ioctl.c, $(MESADRVSRCDIR)/i830) #endif Index: xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h diff -u xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h:1.2 xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h:1.4 --- xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h:1.2 Thu Oct 4 14:31:38 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h Mon Dec 9 20:26:53 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h,v 1.2 2001/10/04 18:31:38 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h,v 1.4 2002/12/10 01:26:53 dawes Exp $ */ #define I830_SET_FIELD( var, mask, value ) (var &= ~(mask), var |= value) #define CMD_3D (0x3<<29) @@ -325,164 +325,9 @@ /* STATE3D_MAP_CUBE, p168 TODO */ -/* STATE3D_MAP_FILTER, p169 */ -#define STATE3D_MAP_FILTER_CMD (CMD_3D|(0x1c<<24)|(0x02<<19)) -#define ENABLE_CHROMA_KEY_PARAMS (1<<15) -#define ENABLE_TEXCOLOR_KEY (1<<14) -#define ENABLE_TEXCHROMA_KEY (1<<13) -#define ENABLE_TEXKILLPIX_KEY (1<<12) -#define KEYFILTER_KILL_ON_ANY_MATCH 0 -#define KEYFILTER_KILL_ON_ANY_MISMATCH (1<<11) -#define KEYFILTER_REPLACE_BLACK 0 -#define KEYFILTER_REPLACE_NEAREST (1<<11) -#define ENABLE_MIP_MODE_FILTER (1<<9) -#define MIPFILTER_NONE 0 -#define MIPFILTER_NEAREST (1<<6) -#define MIPFILTER_LINEAR (3<<6) -#define ENABLE_MAG_MODE_FILTER (1<<5) -#define ENABLE_MIN_MODE_FILTER (1<<2) -#define MAG_FILTER(x) ((x)<<3) -#define MIN_FILTER(x) (x) -#define MIP_FILTER_MASK (0x3<<6) -#define MAG_FILTER_MASK (0x3<<3) -#define MIN_FILTER_MASK (0x3<<0) - -#define FILTER_NEAREST 0 -#define FILTER_LINEAR 1 -#define FILTER_ANISOTROPIC 2 -/* STATE3D_MAP_INFO, p172 */ -#define STATE3D_MAP_INFO_NOCOLR_CMD (CMD_3D|(0x1d<<24)|3) -#define STATE3D_MAP_INFO_COLR_CMD (CMD_3D|(0x1d<<24)|4) -/* Dword 1 */ -#define MAP_INFO_TEX(unit) ((unit)<<28) -#define MAP_INFO_MASK (3<<28) - -#define MI_FORMAT_MASK ((1<<26)|(1<<25)|(1<<24)|(1<<23)|(1<<22)|(1<<21)) - -#define MAPSURF_8BIT_INDEXED 0 -#define MAPSURF_8BIT (1<<24) -#define MAPSURF_16BIT (2<<24) -#define MAPSURF_32BIT (3<<24) -#define MAPSURF_411 (4<<24) -#define MAPSURF_422 (5<<24) -#define MAPSURF_COMPRESSED (6<<24) -#define MAPSURF_4BIT_INDEXED (7<<24) - -/* Texel formats */ -/* MAPSURF_4BIT_INDEXED */ -#define MT_4BIT_IDX_ARGB8888 (7<<21) - -/* MAPSURF_8BIT_INDEXED */ -#define MT_8BIT_IDX_RGB565 0 -#define MT_8BIT_IDX_ARGB1555 (1<<21) -#define MT_8BIT_IDX_ARGB4444 (2<<21) -#define MT_8BIT_IDX_AY88 (3<<21) -#define MT_8BIT_IDX_ABGR8888 (4<<21) -#define MT_8BIT_IDX_BUMP_88DVDU (5<<21) -#define MT_8BIT_IDX_BUMP_655LDVDU (6<<21) -#define MT_8BIT_IDX_ARGB8888 (7<<21) - -/* MAPSURF_8BIT */ -#define MT_8BIT_I8 0 -#define MT_8BIT_L8 (1<<21) - -/* MAPSURF_16BIT */ -#define MT_16BIT_RGB565 0 -#define MT_16BIT_ARGB1555 (1<<21) -#define MT_16BIT_ARGB4444 (2<<21) -#define MT_16BIT_AY88 (3<<21) -#define MT_16BIT_DIB_ARGB1555_8888 (4<<21) -#define MT_16BIT_BUMP_88DVDU (5<<21) -#define MT_16BIT_BUMP_655LDVDU (6<<21) -#define MT_16BIT_DIB_RGB565_8888 (7<<21) - -/* MAPSURF_32BIT */ -#define MT_32BIT_ARGB8888 0 -#define MT_32BIT_ABGR8888 (1<<21) -#define MT_32BIT_BUMP_XLDVDU_8888 (6<<21) -#define MT_32BIT_DIB_8888 (7<<21) - -/* MAPSURF_411 */ -#define MT_411_YUV411 0 - -/* MAPSURF_422 */ -#define MT_422_YCRCB_SWAPY 0 -#define MT_422_YCRCB_NORMAL (1<<21) -#define MT_422_YCRCB_SWAPUV (2<<21) -#define MT_422_YCRCB_SWAPUVY (3<<21) - -/* MAPSURF_COMPRESSED */ -#define MT_COMPRESS_DXT1 0 -#define MT_COMPRESS_DXT2_3 (1<<21) -#define MT_COMPRESS_DXT4_5 (2<<21) -#define MT_COMPRESS_FXT1 (3<<21) - -#define MAP_INFO_OUTMUX_F0F1F2F3 0 -#define MAP_INFO_OUTMUX_XXF0XXF3 (1<<19) -#define MAP_INFO_OUTMUX_XXF2XXF3 (2<<19) - -#define ENABLE_TEX_COLORSPACE_CONV (1<<18) -#define MAP_INFO_VERTLINESTRIDE_0 0 -#define MAP_INFO_VERTLINESTRIDE_1 (1<<17) -#define MAP_INFO_VERTLINESTRIDEOFS_0 0 -#define MAP_INFO_VERTLINESTRIDEOFS_1 (1<<16) -#define MAP_INFO_FORMAT_2D 0 -#define MAP_INFO_FORMAT_3D (1<<11) -#define MAP_INFO_USE_FENCE (1<<10) -#define MAP_INFO_IS_TILED (1<<9) -#define MAP_INFO_IS_LINEAR 0 -#define MAP_INFO_TILEWALK_XMAJOR 0 -#define MAP_INFO_TILEWALK_YMAJOR (1<<8) -#define MAP_INFO_USE_PALETTE_0 0 -#define MAP_INFO_USE_PALETTE_1 (1<<4) -#define MAP_INFO_USE_PALETTE_N(x) ((x<<4) & (1<<4)) - -/* Dword 2 */ -#define MAP_INFO_HEIGHT(x) ((x)<<16) -#define MAP_INFO_WIDTH(x) (x) - -/* Dword 3 */ -#define MAP_INFO_BASEADDR(x) ((x)&0x3) - -/* Dword 4 */ -#define MAP_INFO_DWORD_PITCH(x) ((x)<<2) - -/* Dword 5 */ -#define MAP_INFO_DFLT_COLR(x) (x) - -/* STATE3D_MAP_LOD_CONTROL, p180 */ -#define STATE3D_MAP_LOD_CNTL_CMD (CMD_3D|(0x1c<<24)|(0x04<<19)) -#define ENABLE_TEXLOD_BIAS (1<<7) -#define MAP_LOD_MASK (0x7f) -#define MAP_LOD_BIAS(x) (x) - -/* STATE3D_MAP_LOD_LIMITS, p181 */ -#define STATE3D_MAP_LOD_LIMITS_CMD (CMD_3D|(0x1c<<24)|(0x03<<19)) -#define ENABLE_MAX_MIP_LVL (1<<13) -#define ENABLE_MIN_MIP_LVL (1<<4) -#define LOD_MAX(x) ((x)<<5) -#define LOD_MIN(x) (x) -#define LOD_MAX_MASK (0x1fe0) -#define LOD_MIN_MASK (0xf) - -/* STATE3D_MAP_PALETTE_LOAD, p183 TODO */ -/* STATE3D_MAP_PALETTE_LOAD_32, p184 TODO */ -/* STATE3D_MAP_STREAM_MODIFIER, p186 TODO */ - -/* STATE3D_MAP_TEXEL_STREAM, p188 */ -#define STATE3D_MAP_TEX_STREAM_CMD (CMD_3D|(0x1c<<24)|(0x05<<19)) -#define DISABLE_TEX_STREAM_BUMP (1<<12) -#define ENABLE_TEX_STREAM_BUMP ((1<<12)|(1<<11)) -#define TEX_MODIFY_UNIT_0 0 -#define TEX_MODIFY_UNIT_1 (1<<8) -#define ENABLE_TEX_STREAM_COORD_SET (1<<7) -#define TEX_STREAM_COORD_SET(x) ((x)<<4) -#define ENABLE_TEX_STREAM_MAP_IDX (1<<3) -#define TEX_STREAM_MAP_IDX(x) (x) - /* STATE3D_MODES_1, p190 */ #define STATE3D_MODES_1_CMD (CMD_3D|(0x08<<24)) #define BLENDFUNC_MASK 0x3f0000 @@ -683,6 +528,11 @@ #define TEXCOORDFMT_4D 2 #define TEXCOORDFMT_1D 3 +/*New stuff picked up along the way */ + +#define MLC_LOD_BIAS_MASK ((1<<7)-1) + + /* STATE3D_VERTEX_TRANSFORM, p207 */ #define STATE3D_VERTEX_TRANS_CMD (CMD_3D|(0x1d<<24)|(0x8b<<16)|0) #define STATE3D_VERTEX_TRANS_MTX_CMD (CMD_3D|(0x1d<<24)|(0x8b<<16)|6) @@ -717,62 +567,111 @@ #define I830PACKCOLOR8888(r,g,b,a) \ ((a<<24) | (r<<16) | (g<<8) | b) -#if 0 -/* We wont ever use this format, since we will never be using - * more then 4 texture coords. It is here for reference. + +/* Stipple command, carried over from the i810, apparently: */ +#define GFX_OP_STIPPLE ((0x3<<29)|(0x1d<<24)|(0x83<<16)) +#define ST1_ENABLE (1<<16) +#define ST1_MASK (0xffff) + + + +#define STATE3D_LOAD_STATE_IMMEDIATE_2 ((0x3<<29)|(0x1d<<24)|(0x03<<16)) +#define LOAD_TEXTURE_MAP0 (1<<11) + +#define TM0S0_ADDRESS_MASK 0xfffffffc +#define TM0S0_USE_FENCE (1<<1) + +#define TM0S1_HEIGHT_SHIFT 21 +#define TM0S1_WIDTH_SHIFT 10 +#define TM0S1_PALETTE_SELECT (1<<9) +#define TM0S1_MAPSURF_FORMAT_MASK (0x7 << 6) +#define TM0S1_MAPSURF_FORMAT_SHIFT 6 +#define MAPSURF_8BIT_INDEXED (0<<6) +#define MAPSURF_8BIT (1<<6) +#define MAPSURF_16BIT (2<<6) +#define MAPSURF_32BIT (3<<6) +#define MAPSURF_411 (4<<6) +#define MAPSURF_422 (5<<6) +#define MAPSURF_COMPRESSED (6<<6) +#define MAPSURF_4BIT_INDEXED (7<<6) +#define TM0S1_MT_FORMAT_MASK (0x7 << 3) +#define TM0S1_MT_FORMAT_SHIFT 3 +#define MT_4BIT_IDX_ARGB8888 (7<<3) /* SURFACE_4BIT_INDEXED */ +#define MT_8BIT_IDX_RGB565 (0<<3) /* SURFACE_8BIT_INDEXED */ +#define MT_8BIT_IDX_ARGB1555 (1<<3) +#define MT_8BIT_IDX_ARGB4444 (2<<3) +#define MT_8BIT_IDX_AY88 (3<<3) +#define MT_8BIT_IDX_ABGR8888 (4<<3) +#define MT_8BIT_IDX_BUMP_88DVDU (5<<3) +#define MT_8BIT_IDX_BUMP_655LDVDU (6<<3) +#define MT_8BIT_IDX_ARGB8888 (7<<3) +#define MT_8BIT_I8 (0<<3) /* SURFACE_8BIT */ +#define MT_8BIT_L8 (1<<3) +#define MT_16BIT_RGB565 (0<<3) /* SURFACE_16BIT */ +#define MT_16BIT_ARGB1555 (1<<3) +#define MT_16BIT_ARGB4444 (2<<3) +#define MT_16BIT_AY88 (3<<3) +#define MT_16BIT_DIB_ARGB1555_8888 (4<<3) +#define MT_16BIT_BUMP_88DVDU (5<<3) +#define MT_16BIT_BUMP_655LDVDU (6<<3) +#define MT_16BIT_DIB_RGB565_8888 (7<<3) +#define MT_32BIT_ARGB8888 (0<<3) /* SURFACE_32BIT */ +#define MT_32BIT_ABGR8888 (1<<3) +#define MT_32BIT_BUMP_XLDVDU_8888 (6<<3) +#define MT_32BIT_DIB_8888 (7<<3) +#define MT_411_YUV411 (0<<3) /* SURFACE_411 */ +#define MT_422_YCRCB_SWAPY (0<<3) /* SURFACE_422 */ +#define MT_422_YCRCB_NORMAL (1<<3) +#define MT_422_YCRCB_SWAPUV (2<<3) +#define MT_422_YCRCB_SWAPUVY (3<<3) +#define MT_COMPRESS_DXT1 (0<<3) /* SURFACE_COMPRESSED */ +#define MT_COMPRESS_DXT2_3 (1<<3) +#define MT_COMPRESS_DXT4_5 (2<<3) +#define MT_COMPRESS_FXT1 (3<<3) +#define TM0S1_COLORSPACE_CONVERSION (1 << 2) +#define TM0S1_TILED_SURFACE (1 << 1) +#define TM0S1_TILE_WALK (1 << 0) + +#define TM0S2_PITCH_SHIFT 21 +#define TM0S2_CUBE_FACE_ENA_SHIFT 15 +#define TM0S2_MAP_FORMAT (1<<14) +#define TM0S2_VERTICAL_LINE_STRIDE (1<<13) +#define TM0S2_VERITCAL_LINE_STRIDE_OFF (1<<12) +#define TM0S2_OUTPUT_CHAN_SHIFT 10 +#define TM0S2_OUTPUT_CHAN_MASK (3<<10) + +#define TM0S3_MIP_FILTER_MASK (0x3<<30) +#define TM0S3_MIP_FILTER_SHIFT 30 +#define MIPFILTER_NONE 0 +#define MIPFILTER_NEAREST 1 +#define MIPFILTER_LINEAR 3 +#define TM0S3_MAG_FILTER_MASK (0x3<<28) +#define TM0S3_MAG_FILTER_SHIFT 28 +#define TM0S3_MIN_FILTER_MASK (0x3<<26) +#define TM0S3_MIN_FILTER_SHIFT 26 +#define FILTER_NEAREST 0 +#define FILTER_LINEAR 1 +#define FILTER_ANISOTROPIC 2 + +#define TM0S3_LOD_BIAS_SHIFT 17 +#define TM0S3_LOD_BIAS_MASK (0x1ff<<17) +#define TM0S3_MAX_MIP_SHIFT 9 +#define TM0S3_MAX_MIP_MASK (0xff<<9) +#define TM0S3_MIN_MIP_SHIFT 3 +#define TM0S3_MIN_MIP_MASK (0x3f<<3) +#define TM0S3_KILL_PIXEL (1<<2) +#define TM0S3_KEYED_FILTER (1<<1) +#define TM0S3_CHROMA_KEY (1<<0) -typedef struct { - float x; - float y; - float z; - float z_bias; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - float t_4_0; - - float tu1; - float tv1; - float tq1; - float t_4_1; - - float tu2; - float tv2; - float tq2; - float t_4_2; - - float tu3; - float tv3; - float tq3; - float t_4_3; - - float tu4; - float tv4; - float tq4; - float t_4_4; - - float tu5; - float tv5; - float tq5; - float t_4_5; - - float tu6; - float tv6; - float tq6; - float t_4_6; - - float tu7; - float tv7; - float tq7; - float t_4_7; -} i830_full_vertex; -#endif + +/* STATE3D_MAP_TEXEL_STREAM, p188 */ +#define STATE3D_MAP_TEX_STREAM_CMD (CMD_3D|(0x1c<<24)|(0x05<<19)) +#define DISABLE_TEX_STREAM_BUMP (1<<12) +#define ENABLE_TEX_STREAM_BUMP ((1<<12)|(1<<11)) +#define TEX_MODIFY_UNIT_0 0 +#define TEX_MODIFY_UNIT_1 (1<<8) +#define ENABLE_TEX_STREAM_COORD_SET (1<<7) +#define TEX_STREAM_COORD_SET(x) ((x)<<4) +#define ENABLE_TEX_STREAM_MAP_IDX (1<<3) +#define TEX_STREAM_MAP_IDX(x) (x) Index: xc/lib/GL/mesa/src/drv/i830/i830_context.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_context.c:1.9 --- /dev/null Thu Feb 27 12:26:25 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_context.c Wed Feb 5 23:18:00 2003 @@ -0,0 +1,628 @@ +/************************************************************************** + * + * 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/i830/i830_context.c,v 1.9 2003/02/06 04:18:00 dawes Exp $ */ + +/* + * Authors: + * Jeff Hartmann + * Graeme Fisher + * Abraham vd Merwe + * + * Heavily Based on I810 driver written by: + * Keith Whitwell + */ + +#include "glheader.h" +#include "context.h" +#include "matrix.h" +#include "simple_list.h" +#include "extensions.h" +#include "mem.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/tnl.h" +#include "array_cache/acache.h" + +#include "tnl/t_pipeline.h" + +#include "i830_screen.h" +#include "i830_dri.h" + +#include "i830_state.h" +#include "i830_tex.h" +#include "i830_span.h" +#include "i830_tris.h" +#include "i830_vb.h" +#include "i830_ioctl.h" + +#include +#include + + +#ifndef I830_DEBUG +int I830_DEBUG = (0); +#endif + +/*************************************** + * Mesa's Driver Functions + ***************************************/ + +#define DRIVER_DATE "20021115" + +static const GLubyte *i830DDGetString( GLcontext *ctx, GLenum name ) +{ + switch (I830_CONTEXT(ctx)->i830Screen->deviceID) { + case PCI_CHIP_845_G: + switch (name) { + case GL_VENDOR: + return (GLubyte *)"2d3D, Inc"; + case GL_RENDERER: + return (GLubyte *)"Mesa DRI Intel(R) 845G " DRIVER_DATE; + default: + return 0; + } + break; + case PCI_CHIP_I830_M: + switch (name) { + case GL_VENDOR: + return (GLubyte *)"VA Linux, Inc"; + case GL_RENDERER: + return (GLubyte *)"Mesa DRI Intel(R) 830M " DRIVER_DATE; + default: + return 0; + } + break; + case PCI_CHIP_I855_GM: + switch (name) { + case GL_VENDOR: + return (GLubyte *)"Tungsten Graphics, Inc"; + case GL_RENDERER: + return (GLubyte *)"Mesa DRI Intel(R) 852GM/855GM " DRIVER_DATE; + default: + return 0; + } + break; + case PCI_CHIP_I865_G: + switch (name) { + case GL_VENDOR: + return (GLubyte *)"Tungsten Graphics, Inc"; + case GL_RENDERER: + return (GLubyte *)"Mesa DRI Intel(R) 865G " DRIVER_DATE; + default: + return 0; + } + break; + default: + switch (name) { + case GL_VENDOR: + return (GLubyte *)"Tungsten Graphics, Inc"; + case GL_RENDERER: + return (GLubyte *)"Mesa DRI Unknown Intel Chipset " DRIVER_DATE; + default: + return 0; + } + break; + } +} + +static void i830BufferSize(GLframebuffer *buffer, + GLuint *width, GLuint *height) +{ + GET_CURRENT_CONTEXT(ctx); + i830ContextPtr imesa = I830_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(imesa); + *width = imesa->driDrawable->w; + *height = imesa->driDrawable->h; + UNLOCK_HARDWARE(imesa); +} + +/* Enable all the extensions we need */ +static void i830InitExtensions( GLcontext *ctx ) +{ + _mesa_enable_imaging_extensions( ctx ); + _mesa_enable_extension( ctx, "GL_ARB_multitexture" ); + _mesa_enable_extension( ctx, "GL_ARB_texture_env_add" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_env_add" ); + _mesa_enable_extension( ctx, "GL_ARB_texture_env_combine" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_env_combine" ); + _mesa_enable_extension( ctx, "GL_EXT_blend_color" ); + _mesa_enable_extension( ctx, "GL_EXT_blend_minmax" ); + _mesa_enable_extension( ctx, "GL_EXT_blend_subtract" ); + _mesa_enable_extension( ctx, "GL_EXT_blend_func_separate" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_lod_bias" ); + _mesa_enable_extension( ctx, "GL_EXT_secondary_color" ); + _mesa_enable_extension( ctx, "GL_EXT_fog_coord" ); + + /* Leave this for later */ +#if 0 + _mesa_enable_extension( ctx, "GL_EXT_stencil_wrap" ); +#endif +} + +extern const struct gl_pipeline_stage _i830_render_stage; + +static const struct gl_pipeline_stage *i830_pipeline[] = { + &_tnl_vertex_transform_stage, + &_tnl_normal_transform_stage, + &_tnl_lighting_stage, + &_tnl_fog_coordinate_stage, + &_tnl_texgen_stage, + &_tnl_texture_transform_stage, + /* REMOVE: point attenuation stage */ +#if 1 + &_i830_render_stage, /* ADD: unclipped rastersetup-to-dma */ +#endif + &_tnl_render_stage, + 0, +}; + + +#if DO_DEBUG +static void add_debug_flags( const char *debug ) +{ + if (strstr(debug, "fall")) + I830_DEBUG |= DEBUG_FALLBACKS; + + if (strstr(debug, "tex")) + I830_DEBUG |= DEBUG_TEXTURE; + + if (strstr(debug, "ioctl")) + I830_DEBUG |= DEBUG_IOCTL; + + if (strstr(debug, "prim")) + I830_DEBUG |= DEBUG_PRIMS; + + if (strstr(debug, "vert")) + I830_DEBUG |= DEBUG_VERTS; + + if (strstr(debug, "state")) + I830_DEBUG |= DEBUG_STATE; + + if (strstr(debug, "verb")) + I830_DEBUG |= DEBUG_VERBOSE; + + if (strstr(debug, "dri")) + I830_DEBUG |= DEBUG_DRI; + + if (strstr(debug, "dma")) + I830_DEBUG |= DEBUG_DMA; + + if (strstr(debug, "san")) + I830_DEBUG |= DEBUG_SANITY; + + if (strstr(debug, "sync")) + I830_DEBUG |= DEBUG_SYNC; + + if (strstr(debug, "sleep")) + I830_DEBUG |= DEBUG_SLEEP; +} +#endif + +GLboolean i830CreateContext( Display *dpy, const __GLcontextModes *mesaVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate) +{ + GLcontext *ctx , *shareCtx; + i830ContextPtr imesa; + __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + i830ScreenPrivate *i830Screen = (i830ScreenPrivate *)sPriv->private; + I830SAREAPtr saPriv=(I830SAREAPtr) + (((GLubyte *)sPriv->pSAREA)+i830Screen->sarea_priv_offset); + + /* Allocate i830 context */ + imesa = (i830ContextPtr) CALLOC_STRUCT(i830_context_t); + if (!imesa) return GL_FALSE; + + /* Allocate the Mesa context */ + if (sharedContextPrivate) + shareCtx = ((i830ContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + + imesa->glCtx = _mesa_create_context(mesaVis, shareCtx, imesa, GL_TRUE); + if (!imesa->glCtx) { + FREE(imesa); + return GL_FALSE; + } + driContextPriv->driverPrivate = imesa; + + /* Set the maximum texture size small enough that we can guarentee + * that both texture units can bind a maximal texture and have them + * in memory at once. + */ + ctx = imesa->glCtx; + if (i830Screen->textureSize < 2*1024*1024) { + ctx->Const.MaxTextureLevels = 9; + } else if (i830Screen->textureSize < 8*1024*1024) { + ctx->Const.MaxTextureLevels = 10; + } else { + ctx->Const.MaxTextureLevels = 11; + } + ctx->Const.MaxTextureUnits = 2; + + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 3.0; + ctx->Const.MaxLineWidthAA = 3.0; + ctx->Const.LineWidthGranularity = 1.0; + + ctx->Const.MinPointSize = 1.0; + ctx->Const.MinPointSizeAA = 1.0; + ctx->Const.MaxPointSize = 255.0; + ctx->Const.MaxPointSizeAA = 3.0; + ctx->Const.PointSizeGranularity = 1.0; + + ctx->Driver.GetBufferSize = i830BufferSize; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; + ctx->Driver.GetString = i830DDGetString; + + /* Who owns who? */ + ctx->DriverCtx = (void *) imesa; + imesa->glCtx = ctx; + + /* Initialize the software rasterizer and helper modules. */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); + + /* Install the customized pipeline: */ + _tnl_destroy_pipeline( ctx ); + _tnl_install_pipeline( ctx, i830_pipeline ); + + /* Configure swrast to match hardware characteristics: */ + _swrast_allow_pixel_fog( ctx, GL_FALSE ); + _swrast_allow_vertex_fog( ctx, GL_TRUE ); + + /* Dri stuff */ + imesa->display = dpy; + imesa->hHWContext = driContextPriv->hHWContext; + imesa->driFd = sPriv->fd; + imesa->driHwLock = &sPriv->pSAREA->lock; + imesa->vertex_format = 0; + + imesa->hw_stencil = mesaVis->stencilBits && mesaVis->depthBits == 24; + + switch(mesaVis->depthBits) { + case 16: + imesa->depth_scale = 1.0/0xffff; + imesa->depth_clear_mask = ~0; + imesa->ClearDepth = 0xffff; + break; + case 24: + imesa->depth_scale = 1.0/0xffffff; + imesa->depth_clear_mask = 0x00ffffff; + imesa->stencil_clear_mask = 0xff000000; + imesa->ClearDepth = 0x00ffffff; + break; + case 32: /* Not supported */ + default: + break; + } + /* Completely disable stenciling for now, there are some serious issues + * with stencil. + */ +#if 1 + imesa->hw_stencil = 0; +#endif + + imesa->i830Screen = i830Screen; + imesa->driScreen = sPriv; + imesa->sarea = saPriv; + imesa->glBuffer = NULL; + + imesa->texHeap = mmInit( 0, i830Screen->textureSize ); + imesa->RenderIndex = ~0; + imesa->dirty = ~0; + imesa->upload_cliprects = GL_TRUE; + + make_empty_list(&imesa->TexObjList); + make_empty_list(&imesa->SwappedOut); + + imesa->CurrentTexObj[0] = 0; + imesa->CurrentTexObj[1] = 0; + + imesa->do_irqs = (imesa->i830Screen->irq_active && + !getenv("I830_NO_IRQS")); + + _math_matrix_ctr (&imesa->ViewportMatrix); + + i830InitExtensions (ctx); + i830DDInitStateFuncs( ctx ); + i830DDInitTextureFuncs( ctx ); + i830InitTriFuncs (ctx); + i830DDInitSpanFuncs( ctx ); + i830DDInitIoctlFuncs( ctx ); + i830InitVB (ctx); + i830DDInitState (ctx); + +#if DO_DEBUG + if (getenv("INTEL_DEBUG")) + add_debug_flags( getenv("INTEL_DEBUG") ); + if (getenv("I830_DEBUG")) + add_debug_flags( getenv("I830_DEBUG") ); +#endif + + if (getenv("I830_NO_RAST") || + getenv("INTEL_NO_RAST")) { + fprintf(stderr, "disabling 3D rasterization\n"); + FALLBACK(imesa, I830_FALLBACK_USER, 1); + } + + + return GL_TRUE; +} + +void i830DestroyContext(__DRIcontextPrivate *driContextPriv) +{ + i830ContextPtr imesa = (i830ContextPtr) driContextPriv->driverPrivate; + + assert(imesa); /* should never be null */ + if (imesa) { + _swsetup_DestroyContext (imesa->glCtx); + _tnl_DestroyContext (imesa->glCtx); + _ac_DestroyContext (imesa->glCtx); + _swrast_DestroyContext (imesa->glCtx); + + i830FreeVB (imesa->glCtx); + + /* free the Mesa context */ + imesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context(imesa->glCtx); + + Xfree (imesa); + } +} + +void i830XMesaSetFrontClipRects( i830ContextPtr imesa ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + + imesa->numClipRects = dPriv->numClipRects; + imesa->pClipRects = dPriv->pClipRects; + imesa->drawX = dPriv->x; + imesa->drawY = dPriv->y; + + i830EmitDrawingRectangle( imesa ); + imesa->upload_cliprects = GL_TRUE; +} + +void i830XMesaSetBackClipRects( i830ContextPtr imesa ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + + if (imesa->sarea->pf_enabled == 0 && dPriv->numBackClipRects == 0) { + imesa->numClipRects = dPriv->numClipRects; + imesa->pClipRects = dPriv->pClipRects; + imesa->drawX = dPriv->x; + imesa->drawY = dPriv->y; + } else { + imesa->numClipRects = dPriv->numBackClipRects; + imesa->pClipRects = dPriv->pBackClipRects; + imesa->drawX = dPriv->backX; + imesa->drawY = dPriv->backY; + } + + i830EmitDrawingRectangle( imesa ); + imesa->upload_cliprects = GL_TRUE; +} + +static void i830XMesaWindowMoved( i830ContextPtr imesa ) +{ + switch (imesa->glCtx->Color.DriverDrawBuffer) { + case GL_FRONT_LEFT: + i830XMesaSetFrontClipRects( imesa ); + break; + case GL_BACK_LEFT: + i830XMesaSetBackClipRects( imesa ); + break; + default: + break; + } +} + +GLboolean i830UnbindContext(__DRIcontextPrivate *driContextPriv) +{ + i830ContextPtr imesa = (i830ContextPtr) driContextPriv->driverPrivate; + if (imesa) { + /* Might want to change this so texblend isn't always updated */ + imesa->dirty |= (I830_UPLOAD_CTX | + I830_UPLOAD_BUFFERS | + I830_UPLOAD_STIPPLE | + I830_UPLOAD_TEXBLEND0 | + I830_UPLOAD_TEXBLEND1); + + if (imesa->CurrentTexObj[0]) imesa->dirty |= I830_UPLOAD_TEX0; + if (imesa->CurrentTexObj[1]) imesa->dirty |= I830_UPLOAD_TEX1; + } + return GL_TRUE; +} + +GLboolean i830MakeCurrent(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv) +{ + + if (driContextPriv) { + i830ContextPtr imesa = (i830ContextPtr) driContextPriv->driverPrivate; + + if ( imesa->driDrawable != driDrawPriv ) { + /* Shouldn't the readbuffer be stored also? */ + imesa->driDrawable = driDrawPriv; + i830XMesaWindowMoved( imesa ); + } + + _mesa_make_current2(imesa->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate); + + if (!imesa->glCtx->Viewport.Width) + _mesa_set_viewport(imesa->glCtx, 0, 0, + driDrawPriv->w, driDrawPriv->h); + } else { + _mesa_make_current(0,0); + } + + return GL_TRUE; +} + +/* Turn on/off page flipping according to the flags in the sarea: + */ +static void +i830UpdatePageFlipping( i830ContextPtr imesa ) +{ + GLcontext *ctx = imesa->glCtx; + int front = 0; + + switch (ctx->Color.DriverDrawBuffer) { + case GL_FRONT_LEFT: + front = 1; + break; + case GL_BACK_LEFT: + front = 0; + break; + default: + return; + } + + if ( imesa->sarea->pf_current_page == 1 ) + front ^= 1; + + if (front) { + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = imesa->i830Screen->fbOffset; + imesa->drawMap = (char *)imesa->driScreen->pFB; + imesa->readMap = (char *)imesa->driScreen->pFB; + } else { + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = imesa->i830Screen->backOffset; + imesa->drawMap = imesa->i830Screen->back.map; + imesa->readMap = imesa->i830Screen->back.map; + } + + imesa->dirty |= I830_UPLOAD_BUFFERS; +} + +void i830GetLock( i830ContextPtr imesa, GLuint flags ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIscreenPrivate *sPriv = imesa->driScreen; + I830SAREAPtr sarea = imesa->sarea; + int me = imesa->hHWContext; + + drmGetLock(imesa->driFd, imesa->hHWContext, flags); + + /* If the window moved, may need to set a new cliprect now. + * + * NOTE: This releases and regains the hw lock, so all state + * checking must be done *after* this call: + */ + DRI_VALIDATE_DRAWABLE_INFO(imesa->display, sPriv, dPriv); + + /* If we lost context, need to dump all registers to hardware. + * Note that we don't care about 2d contexts, even if they perform + * accelerated commands, so the DRI locking in the X server is even + * more broken than usual. + */ + + if (sarea->ctxOwner != me) { + imesa->upload_cliprects = GL_TRUE; + imesa->dirty |= (I830_UPLOAD_CTX | + I830_UPLOAD_BUFFERS | + I830_UPLOAD_STIPPLE); + + if(imesa->CurrentTexObj[0]) imesa->dirty |= I830_UPLOAD_TEX0; + if(imesa->CurrentTexObj[1]) imesa->dirty |= I830_UPLOAD_TEX1; + if(imesa->TexBlendWordsUsed[0]) imesa->dirty |= I830_UPLOAD_TEXBLEND0; + if(imesa->TexBlendWordsUsed[1]) imesa->dirty |= I830_UPLOAD_TEXBLEND1; + + sarea->perf_boxes = imesa->perf_boxes | I830_BOX_LOST_CONTEXT; + sarea->ctxOwner = me; + } + + /* Shared texture managment - if another client has played with + * texture space, figure out which if any of our textures have been + * ejected, and update our global LRU. + */ + if (sarea->texAge != imesa->texAge) { + int sz = 1 << (imesa->i830Screen->logTextureGranularity); + int idx, nr = 0; + + /* Have to go right round from the back to ensure stuff ends up + * LRU in our local list... + */ + for (idx = sarea->texList[I830_NR_TEX_REGIONS].prev ; + idx != I830_NR_TEX_REGIONS && nr < I830_NR_TEX_REGIONS ; + idx = sarea->texList[idx].prev, nr++) { + if (sarea->texList[idx].age > imesa->texAge) + i830TexturesGone(imesa, idx * sz, sz, sarea->texList[idx].in_use); + } + + if (nr == I830_NR_TEX_REGIONS) { + i830TexturesGone(imesa, 0, imesa->i830Screen->textureSize, 0); + i830ResetGlobalLRU( imesa ); + } + + imesa->texAge = sarea->texAge; + } + + if (imesa->lastStamp != dPriv->lastStamp) { + i830UpdatePageFlipping( imesa ); + i830XMesaWindowMoved( imesa ); + imesa->lastStamp = dPriv->lastStamp; + } + + sarea->last_quiescent = -1; /* just kill it for now */ +} + +void i830SwapBuffers(Display *dpy, void *drawablePrivate) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + + if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { + i830ContextPtr imesa; + GLcontext *ctx; + imesa = (i830ContextPtr) dPriv->driContextPriv->driverPrivate; + ctx = imesa->glCtx; + if (ctx->Visual.doubleBufferMode) { + /* flush pending rendering comands */ + _mesa_swapbuffers( ctx ); + if ( imesa->sarea->pf_active && + (dPriv->w * dPriv->h * imesa->i830Screen->cpp) > (300*300*4) ) { + i830PageFlip( dPriv ); + } else { + i830CopyBuffer( dPriv ); + } + } + } else { + /* XXX this shouldn't be an error but we can't handle it for now */ + _mesa_problem(NULL, "i830SwapBuffers: drawable has no context!\n"); + } +} Index: xc/lib/GL/mesa/src/drv/i830/i830_context.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_context.h:1.7 --- /dev/null Thu Feb 27 12:26:25 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_context.h Wed Feb 5 23:18:01 2003 @@ -0,0 +1,309 @@ +/* + * GLX Hardware Device Driver for Intel i830 + * 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: + * + * 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. + * + */ + +/* Adapted for use in the I830M driver: + * Jeff Hartmann + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_context.h,v 1.7 2003/02/06 04:18:01 dawes Exp $ */ + +#ifndef I830CONTEXT_INC +#define I830CONTEXT_INC + +typedef struct i830_context_t i830Context; +typedef struct i830_context_t *i830ContextPtr; +typedef struct i830_texture_object_t *i830TextureObjectPtr; + + +#include "mtypes.h" +#include "drm.h" +#include "mm.h" + +#include "i830_screen.h" +#include "i830_tex.h" + +#define TAG(x) i830##x +#include "tnl_dd/t_dd_vertex.h" +#undef TAG + +#define DV_PF_555 (1<<8) +#define DV_PF_565 (2<<8) +#define DV_PF_8888 (3<<8) + +#define I830_TEX_MAXLEVELS 10 + +#define I830_CONTEXT(ctx) ((i830ContextPtr)(ctx->DriverCtx)) +#define GET_DISPATCH_AGE(imesa) imesa->sarea->last_dispatch +#define GET_ENQUEUE_AGE(imesa) imesa->sarea->last_enqueue + + +typedef void (*i830_tri_func)(i830ContextPtr, i830Vertex *, i830Vertex *, + i830Vertex *); +typedef void (*i830_line_func)(i830ContextPtr, i830Vertex *, i830Vertex *); +typedef void (*i830_point_func)(i830ContextPtr, i830Vertex *); + +#define I830_FALLBACK_TEXTURE 0x1 +#define I830_FALLBACK_DRAW_BUFFER 0x2 +#define I830_FALLBACK_READ_BUFFER 0x4 +#define I830_FALLBACK_COLORMASK 0x8 +#define I830_FALLBACK_RENDERMODE 0x10 +#define I830_FALLBACK_STENCIL 0x20 +#define I830_FALLBACK_STIPPLE 0x40 +#define I830_FALLBACK_USER 0x80 + +struct i830_context_t +{ + GLint refcount; + GLcontext *glCtx; + + /*From I830 stuff*/ + int TextureMode; + GLuint renderindex; + GLuint TexBlendWordsUsed[I830_TEXBLEND_COUNT]; + GLuint TexBlend[I830_TEXBLEND_COUNT][I830_TEXBLEND_SIZE]; + GLuint Init_TexBlend[I830_TEXBLEND_COUNT][I830_TEXBLEND_SIZE]; + GLuint Init_TexBlendWordsUsed[I830_TEXBLEND_COUNT]; + GLuint Init_TexBlendColorPipeNum[I830_TEXBLEND_COUNT]; + GLuint TexBlendColorPipeNum[I830_TEXBLEND_COUNT]; + GLuint Init_BufferSetup[I830_DEST_SETUP_SIZE]; + + GLenum palette_format; + GLuint palette[256]; + + + GLuint Init_Setup[I830_CTX_SETUP_SIZE]; + GLuint vertex_prim; + drmBufPtr vertex_dma_buffer; + + GLboolean mask_red; + GLboolean mask_green; + GLboolean mask_blue; + GLboolean mask_alpha; + + GLboolean clear_red; + GLboolean clear_green; + GLboolean clear_blue; + GLboolean clear_alpha; + + GLfloat depth_scale; + int depth_clear_mask; + int stencil_clear_mask; + int ClearDepth; + int hw_stencil; + + GLuint MonoColor; + + GLuint LastTexEnabled; + GLuint TexEnabledMask; + + /* Textures + */ + i830TextureObjectPtr CurrentTexObj[2]; + struct i830_texture_object_t TexObjList; + struct i830_texture_object_t SwappedOut; + memHeap_t *texHeap; + + /* Bit flag to keep track of fallbacks. + */ + GLuint Fallback; + + /* Temporaries for translating away float colors: + */ + struct gl_client_array UbyteColor; + struct gl_client_array UbyteSecondaryColor; + + /* State for i830vb.c and i830tris.c. + */ + GLuint new_state; /* _NEW_* flags */ + GLuint SetupNewInputs; + GLuint SetupIndex; + GLuint RenderIndex; + GLmatrix ViewportMatrix; + GLenum render_primitive; + GLenum reduced_primitive; + GLuint hw_primitive; + GLuint vertex_format; + char *verts; + + drmBufPtr vertex_buffer; + char *vertex_addr; + GLuint vertex_low; + GLuint vertex_high; + GLuint vertex_last_prim; + + GLboolean upload_cliprects; + + + /* Fallback rasterization functions + */ + i830_point_func draw_point; + i830_line_func draw_line; + i830_tri_func draw_tri; + + /* Hardware state + */ + GLuint dirty; /* I810_UPLOAD_* */ + GLuint Setup[I830_CTX_SETUP_SIZE]; + GLuint BufferSetup[I830_DEST_SETUP_SIZE]; + GLuint StippleSetup[I830_STP_SETUP_SIZE]; + int vertex_size; + int vertex_stride_shift; + unsigned int lastStamp; + GLboolean hw_stipple; + + GLenum TexEnvImageFmt[2]; + + /* State which can't be computed completely on the fly: + */ + GLuint LcsCullMode; + GLuint LcsLineWidth; + GLuint LcsPointSize; + + /* Funny mesa mirrors + */ + GLuint ClearColor; + + /* DRI stuff + */ + GLuint needClip; + GLframebuffer *glBuffer; + + /* These refer to the current draw (front vs. back) buffer: + */ + char *drawMap; /* draw buffer address in virtual mem */ + char *readMap; + int drawX; /* origin of drawable in draw buffer */ + int drawY; + GLuint numClipRects; /* cliprects for that buffer */ + XF86DRIClipRectPtr pClipRects; + + int lastSwap; + int texAge; + int ctxAge; + int dirtyAge; + int perf_boxes; + + int do_irqs; + + GLboolean scissor; + XF86DRIClipRectRec draw_rect; + XF86DRIClipRectRec scissor_rect; + + drmContext hHWContext; + drmLock *driHwLock; + int driFd; + Display *display; + + __DRIdrawablePrivate *driDrawable; + __DRIscreenPrivate *driScreen; + i830ScreenPrivate *i830Screen; + I830SAREAPtr sarea; +}; + + +#define I830_TEX_UNIT_ENABLED(unit) (1<DriverCtx)) +#define I830_DRIVER_DATA(vb) ((i830VertexBufferPtr)((vb)->driver_data)) +#define GET_DISPATCH_AGE(imesa) imesa->sarea->last_dispatch +#define GET_ENQUEUE_AGE(imesa) imesa->sarea->last_enqueue + + +/* Lock the hardware and validate our state. + */ +#define LOCK_HARDWARE( imesa ) \ +do { \ + char __ret=0; \ + DRM_CAS(imesa->driHwLock, imesa->hHWContext, \ + (DRM_LOCK_HELD|imesa->hHWContext), __ret); \ + if (__ret) \ + i830GetLock( imesa, 0 ); \ +}while (0) + + + /* Unlock the hardware using the global current context + */ +#define UNLOCK_HARDWARE(imesa) \ +do { \ + imesa->perf_boxes |= imesa->sarea->perf_boxes; \ + DRM_UNLOCK(imesa->driFd, imesa->driHwLock, imesa->hHWContext); \ +} while (0) + + /* This is the wrong way to do it, I'm sure. Otherwise the drm + * bitches that I've already got the heavyweight lock. At worst, + * this is 3 ioctls. The best solution probably only gets me down + * to 2 ioctls in the worst case. + */ +#define LOCK_HARDWARE_QUIESCENT( imesa ) do { \ + LOCK_HARDWARE( imesa ); \ + i830RegetLockQuiescent( imesa ); \ +} while(0) + + + +extern void i830GetLock(i830ContextPtr imesa, GLuint flags); +extern void i830EmitHwStateLocked(i830ContextPtr imesa); +extern void i830EmitDrawingRectangle(i830ContextPtr imesa); +extern void i830XMesaSetBackClipRects(i830ContextPtr imesa); +extern void i830XMesaSetFrontClipRects(i830ContextPtr imesa); +extern void i830DDExtensionsInit(GLcontext *ctx); +extern void i830DDInitDriverFuncs(GLcontext *ctx); +extern void i830DDUpdateHwState(GLcontext *ctx); + +#define SUBPIXEL_X 0.125 +#define SUBPIXEL_Y 0.125 + + +/* ================================================================ + * Debugging: + */ +#define DO_DEBUG 1 +#if DO_DEBUG +extern int I830_DEBUG; +#else +#define I830_DEBUG 0 +#endif + +#define DEBUG_TEXTURE 0x1 +#define DEBUG_STATE 0x2 +#define DEBUG_IOCTL 0x4 +#define DEBUG_PRIMS 0x8 +#define DEBUG_VERTS 0x10 +#define DEBUG_FALLBACKS 0x20 +#define DEBUG_VERBOSE 0x40 +#define DEBUG_DRI 0x80 +#define DEBUG_DMA 0x100 +#define DEBUG_SANITY 0x200 +#define DEBUG_SYNC 0x400 +#define DEBUG_SLEEP 0x800 + + +#define PCI_CHIP_845_G 0x2562 +#define PCI_CHIP_I830_M 0x3577 +#define PCI_CHIP_I855_GM 0x3582 +#define PCI_CHIP_I865_G 0x2572 + + +#endif + Index: xc/lib/GL/mesa/src/drv/i830/i830_dd.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_dd.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_dd.c:removed --- xc/lib/GL/mesa/src/drv/i830/i830_dd.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_dd.c Thu Feb 27 12:26:25 2003 @@ -1,158 +0,0 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_dd.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - -/* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell - */ - -#include "types.h" -#include "vbrender.h" - -#include - -#include "mm.h" -#include "extensions.h" -#include "vb.h" -#include "dd.h" - -#include "i830_drv.h" -#include "i830_ioctl.h" - -extern int xf86VTSema; - - -/*************************************** - * Mesa's Driver Functions - ***************************************/ - - -static const GLubyte *i830DDGetString( GLcontext *ctx, GLenum name ) -{ - switch (name) { - case GL_VENDOR: - return (GLubyte *)"VA Linux Systems"; - case GL_RENDERER: - return (GLubyte *)"Mesa DRI I830 20001127"; - default: - return 0; - } -} - -static GLint i830GetParameteri(const GLcontext *ctx, GLint param) -{ - switch (param) { - case DD_HAVE_HARDWARE_FOG: - return 1; - default: - return 0; - } -} - - - -static void i830BufferSize(GLcontext *ctx, GLuint *width, GLuint *height) -{ - i830ContextPtr imesa = I830_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(imesa); - *width = imesa->driDrawable->w; - *height = imesa->driDrawable->h; - UNLOCK_HARDWARE(imesa); -} - - - - -void i830DDExtensionsInit( GLcontext *ctx ) -{ - gl_extensions_enable( ctx, "GL_EXT_blend_color" ); - gl_extensions_enable( ctx, "GL_EXT_blend_minmax" ); - gl_extensions_enable( ctx, "GL_EXT_blend_subtract" ); - gl_extensions_enable( ctx, "GL_EXT_blend_logic_op" ); - - gl_extensions_enable( ctx, "GL_EXT_blend_func_separate" ); - gl_extensions_enable( ctx, "GL_ARB_texture_env_add" ); - gl_extensions_enable( ctx, "GL_EXT_texture_env_add" ); - gl_extensions_enable( ctx, "GL_EXT_texture_env_combine" ); - -#if 0 - /* These need a little work, the code is there, but some applications - * don't render correctly. - */ - - gl_extensions_enable( ctx, "GL_EXT_shared_texture_palette" ); - gl_extensions_enable( ctx, "GL_EXT_paletted_texture" ); -#else - gl_extensions_disable( ctx, "GL_EXT_shared_texture_palette" ); - gl_extensions_disable( ctx, "GL_EXT_paletted_texture" ); -#endif - - /* This should be easy to add */ - gl_extensions_disable( ctx, "GL_EXT_texture_lod_bias" ); - - /* Planned extensions */ - gl_extensions_disable( ctx, "GL_ARB_texture_compression" ); - gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" ); - - /* we don't support point parameters in hardware yet */ - gl_extensions_disable( ctx, "GL_EXT_point_parameters" ); - - /* The imaging subset of 1.2 isn't supported by any mesa driver. - */ - gl_extensions_disable( ctx, "ARB_imaging" ); - gl_extensions_disable( ctx, "GL_EXT_convolution" ); - 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" ); -} - - - - -void i830DDInitDriverFuncs( GLcontext *ctx ) -{ - ctx->Driver.GetBufferSize = i830BufferSize; - ctx->Driver.GetString = i830DDGetString; - ctx->Driver.GetParameteri = i830GetParameteri; - ctx->Driver.RegisterVB = i830DDRegisterVB; - ctx->Driver.UnregisterVB = i830DDUnregisterVB; - ctx->Driver.Clear = i830Clear; - - - ctx->Driver.BuildPrecalcPipeline = i830DDBuildPrecalcPipeline; -} Index: xc/lib/GL/mesa/src/drv/i830/i830_debug.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_debug.c:1.3 --- /dev/null Thu Feb 27 12:26:25 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_debug.c Mon Dec 9 20:26:53 2002 @@ -0,0 +1,381 @@ +/************************************************************************** + +Copyright 2001 2d3d Inc., Delray Beach, FL + +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. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_debug.c,v 1.3 2002/12/10 01:26:53 dawes Exp $ */ + +/* + * Author: + * Jeff Hartmann + */ +#include +#include + +#include "glheader.h" +#include "context.h" +#include "macros.h" +#include "enums.h" +#include "dd.h" + +#include "mm.h" + +#include "i830_screen.h" +#include "i830_dri.h" + +#include "i830_context.h" +#include "i830_state.h" +#include "i830_tex.h" +#include "i830_vb.h" +#include "i830_tris.h" +#include "i830_ioctl.h" +#include "i830_debug.h" + +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "swrast_setup/swrast_setup.h" + +#include "tnl/t_pipeline.h" + + +#define TINY_VERTEX_FORMAT (STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(0) | \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_XYZ) + +#define NOTEX_VERTEX_FORMAT (STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(0) | \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_SPEC | \ + VRTX_HAS_XYZW) + +#define TEX0_VERTEX_FORMAT (STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(1) | \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_SPEC | \ + VRTX_HAS_XYZW) + +#define TEX1_VERTEX_FORMAT (STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(2) | \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_SPEC | \ + VRTX_HAS_XYZW) + +#define PROJ_VF2 (STATE3D_VERTEX_FORMAT_2_CMD | \ + VRTX_TEX_SET_0_FMT(TEXCOORDFMT_3D) | \ + VRTX_TEX_SET_1_FMT(TEXCOORDFMT_3D) | \ + VRTX_TEX_SET_2_FMT(TEXCOORDFMT_3D) | \ + VRTX_TEX_SET_3_FMT(TEXCOORDFMT_3D)) + +#define NON_PROJ_VF2 (STATE3D_VERTEX_FORMAT_2_CMD | \ + VRTX_TEX_SET_0_FMT(TEXCOORDFMT_2D) | \ + VRTX_TEX_SET_1_FMT(TEXCOORDFMT_2D) | \ + VRTX_TEX_SET_2_FMT(TEXCOORDFMT_2D) | \ + VRTX_TEX_SET_3_FMT(TEXCOORDFMT_2D)) + +void i830DumpContextState( i830ContextPtr imesa ) +{ + GLuint *Context = imesa->Setup; + + fprintf(stderr, "%s\n", __FUNCTION__); + fprintf(stderr, "STATE1 : 0x%08x\n", Context[I830_CTXREG_STATE1]); + fprintf(stderr, "STATE2 : 0x%08x\n", Context[I830_CTXREG_STATE2]); + fprintf(stderr, "STATE3 : 0x%08x\n", Context[I830_CTXREG_STATE3]); + fprintf(stderr, "STATE4 : 0x%08x\n", Context[I830_CTXREG_STATE4]); + fprintf(stderr, "STATE5 : 0x%08x\n", Context[I830_CTXREG_STATE5]); + fprintf(stderr, "IALPHAB : 0x%08x\n", Context[I830_CTXREG_IALPHAB]); + fprintf(stderr, "STENCILTST : 0x%08x\n", Context[I830_CTXREG_STENCILTST]); + fprintf(stderr, "ENABLES_1 : 0x%08x\n", Context[I830_CTXREG_ENABLES_1]); + fprintf(stderr, "ENABLES_2 : 0x%08x\n", Context[I830_CTXREG_ENABLES_2]); + fprintf(stderr, "AA : 0x%08x\n", Context[I830_CTXREG_AA]); + fprintf(stderr, "FOGCOLOR : 0x%08x\n", Context[I830_CTXREG_FOGCOLOR]); + fprintf(stderr, "BCOLOR0 : 0x%08x\n", Context[I830_CTXREG_BLENDCOLR0]); + fprintf(stderr, "BCOLOR : 0x%08x\n", Context[I830_CTXREG_BLENDCOLR]); + fprintf(stderr, "VF : 0x%08x\n", Context[I830_CTXREG_VF]); + fprintf(stderr, "VF2 : 0x%08x\n", Context[I830_CTXREG_VF2]); + fprintf(stderr, "MCSB0 : 0x%08x\n", Context[I830_CTXREG_MCSB0]); + fprintf(stderr, "MCSB1 : 0x%08x\n", Context[I830_CTXREG_MCSB1]); +} + +void i830DumpBufferState( i830ContextPtr imesa ) +{ + GLuint *Buffer = imesa->BufferSetup; + + fprintf(stderr, "%s\n", __FUNCTION__); + fprintf(stderr, "CBUFADDR : 0x%08x\n", Buffer[I830_DESTREG_CBUFADDR]); + fprintf(stderr, "DBUFADDR : 0x%08x\n", Buffer[I830_DESTREG_DBUFADDR]); + fprintf(stderr, "DV0 : 0x%08x\n", Buffer[I830_DESTREG_DV0]); + fprintf(stderr, "DV1 : 0x%08x\n", Buffer[I830_DESTREG_DV1]); + fprintf(stderr, "SENABLE : 0x%08x\n", Buffer[I830_DESTREG_SENABLE]); + fprintf(stderr, "SR0 : 0x%08x\n", Buffer[I830_DESTREG_SR0]); + fprintf(stderr, "SR1 : 0x%08x\n", Buffer[I830_DESTREG_SR1]); + fprintf(stderr, "SR2 : 0x%08x\n", Buffer[I830_DESTREG_SR2]); + fprintf(stderr, "DR0 : 0x%08x\n", Buffer[I830_DESTREG_DR0]); + fprintf(stderr, "DR1 : 0x%08x\n", Buffer[I830_DESTREG_DR1]); + fprintf(stderr, "DR2 : 0x%08x\n", Buffer[I830_DESTREG_DR2]); + fprintf(stderr, "DR3 : 0x%08x\n", Buffer[I830_DESTREG_DR3]); + fprintf(stderr, "DR4 : 0x%08x\n", Buffer[I830_DESTREG_DR4]); +} + +void i830DumpStippleState( i830ContextPtr imesa ) +{ + GLuint *Buffer = imesa->BufferSetup; + + fprintf(stderr, "%s\n", __FUNCTION__); + fprintf(stderr, "ST1 : 0x%08x\n", Buffer[I830_STPREG_ST1]); +} + +void i830DumpTextureState( i830ContextPtr imesa, int unit ) +{ + i830TextureObjectPtr t = imesa->CurrentTexObj[unit]; + + if(t) { + fprintf(stderr, "%s : unit %d\n", __FUNCTION__, unit); + fprintf(stderr, "MI0 : 0x%08x\n", t->Setup[I830_TEXREG_MI0]); + fprintf(stderr, "MI1 : 0x%08x\n", t->Setup[I830_TEXREG_MI1]); + fprintf(stderr, "MI2 : 0x%08x\n", t->Setup[I830_TEXREG_MI2]); + fprintf(stderr, "MI3 : 0x%08x\n", t->Setup[I830_TEXREG_MI3]); + fprintf(stderr, "MI4 : 0x%08x\n", t->Setup[I830_TEXREG_MI4]); + fprintf(stderr, "MI5 : 0x%08x\n", t->Setup[I830_TEXREG_MI5]); + fprintf(stderr, "MF : 0x%08x\n", t->Setup[I830_TEXREG_MF]); + fprintf(stderr, "MLC : 0x%08x\n", t->Setup[I830_TEXREG_MLC]); + fprintf(stderr, "MLL : 0x%08x\n", t->Setup[I830_TEXREG_MLL]); + fprintf(stderr, "MCS : 0x%08x\n", t->Setup[I830_TEXREG_MCS]); + } +} + +void i830DumpTextureBlendState( i830ContextPtr imesa, int unit ) +{ + GLuint *TexBlend = imesa->TexBlend[unit]; + GLuint length = imesa->TexBlendWordsUsed[unit]; + int i; + + fprintf(stderr, "%s : unit %d : length %d\n", __FUNCTION__, unit, length); + for(i = 0; i < length; i++) { + fprintf(stderr, "[%d] : 0x%08x\n", i, TexBlend[i]); + } +} + +void i830VertexSanity( i830ContextPtr imesa, drmI830Vertex vertex ) +{ + I830SAREAPtr sarea = imesa->sarea; + char *prim_name; + int size = 0; + int vfmt_size = 0; + int hw_nr_vertex = 0; + int hw_start_vertex = 0; + + /* Do a bunch of sanity checks on the vertices sent to the hardware */ + + size = vertex.used - 4; + if(imesa->vertex_size && (size % imesa->vertex_size) != 0) { + fprintf(stderr, "\n\nVertex size does not match imesa " + "internal state\n"); + fprintf(stderr, "Buffer size : %d\n", size); + fprintf(stderr, "Vertex size : %d\n", imesa->vertex_size); + } + + /* Check to see if the vertex format is good, and get its size */ + if (sarea->ContextState[I830_CTXREG_VF] == TINY_VERTEX_FORMAT) { + vfmt_size = 16; /* 4 dwords */ + } else if (sarea->ContextState[I830_CTXREG_VF] == + NOTEX_VERTEX_FORMAT) { + vfmt_size = 24; /* 6 dwords */ + } else if (sarea->ContextState[I830_CTXREG_VF] == + TEX0_VERTEX_FORMAT) { + vfmt_size = 32; /* 8 dwords */ + if (sarea->ContextState[I830_CTXREG_VF2] != NON_PROJ_VF2) { + fprintf(stderr, "\n\nTex 0 vertex format, but proj " + "texturing\n"); + } + } else if(sarea->ContextState[I830_CTXREG_VF] == + TEX1_VERTEX_FORMAT) { + if (sarea->ContextState[I830_CTXREG_VF2] == NON_PROJ_VF2) + vfmt_size = 40; /* 10 dwords */ + else + vfmt_size = 48; /* 12 dwords */ + } else { + fprintf(stderr, "\n\nUnknown vertex format : vf : %08x " + "vf2 : %08x\n", + sarea->ContextState[I830_CTXREG_VF], + sarea->ContextState[I830_CTXREG_VF2]); + } + + if(vfmt_size && (size % vfmt_size) != 0) { + fprintf(stderr, "\n\nVertex size does not match hardware " + "internal state\n"); + fprintf(stderr, "Buffer size : %d\n", size); + fprintf(stderr, "Vertex size : %d\n", vfmt_size); + sleep(10); + } + + switch(sarea->vertex_prim) { + case PRIM3D_POINTLIST: + hw_start_vertex = 0; + hw_nr_vertex = 1; + prim_name = "PointList"; + break; + + case PRIM3D_LINELIST: + hw_start_vertex = 0; + hw_nr_vertex = 2; + prim_name = "LineList"; + break; + + case PRIM3D_LINESTRIP: + hw_start_vertex = 2; + hw_nr_vertex = 1; + prim_name = "LineStrip"; + break; + + case PRIM3D_TRILIST: + hw_start_vertex = 0; + hw_nr_vertex = 3; + prim_name = "TriList"; + break; + + case PRIM3D_TRISTRIP: + hw_start_vertex = 3; + hw_nr_vertex = 1; + prim_name = "TriStrip"; + break; + + case PRIM3D_TRIFAN: + hw_start_vertex = 3; + hw_nr_vertex = 1; + prim_name = "TriFan"; + break; + + case PRIM3D_POLY: + hw_start_vertex = 3; + hw_nr_vertex = 1; + prim_name = "Polygons"; + break; + default: + prim_name = "Unknown"; + fprintf(stderr, "\n\nUnknown primitive type : %08x\n", + sarea->vertex_prim); + } + + if (hw_nr_vertex && vfmt_size) { + int temp_size = size - (hw_start_vertex * vfmt_size); + int remaining = (temp_size % (hw_nr_vertex * vfmt_size)); + + if (remaining != 0) { + fprintf(stderr, "\n\nThis buffer contains an improper" + " multiple of vertices for this primitive : %s\n", + prim_name); + fprintf(stderr, "Number of vertices in buffer : %d\n", + size / vfmt_size); + fprintf(stderr, "temp_size : %d\n", temp_size); + fprintf(stderr, "remaining vertices : %d", + remaining / vfmt_size); + sleep(10); + } + } + if (1) { + fprintf(stderr, "\n\nPrim name (%s), vertices (%d)\n", + prim_name, + size / vfmt_size); + } +} + +void i830EmitHwStateLockedDebug( i830ContextPtr imesa ) +{ + int i; + + if ((imesa->dirty & I830_UPLOAD_TEX0_IMAGE) && imesa->CurrentTexObj[0]) { + i830UploadTexImages(imesa, imesa->CurrentTexObj[0]); + } + + if ((imesa->dirty & I830_UPLOAD_TEX1_IMAGE) && imesa->CurrentTexObj[1]) { + i830UploadTexImages(imesa, imesa->CurrentTexObj[1]); + } + + if (imesa->dirty & I830_UPLOAD_CTX) { + memcpy( imesa->sarea->ContextState, + imesa->Setup, sizeof(imesa->Setup) ); + i830DumpContextState(imesa); + } + + for(i = 0; i < I830_TEXTURE_COUNT; i++) { + if ((imesa->dirty & I830_UPLOAD_TEX_N(i)) && imesa->CurrentTexObj[i]) { + imesa->sarea->dirty |= I830_UPLOAD_TEX_N(i); + memcpy(imesa->sarea->TexState[i], + imesa->CurrentTexObj[i]->Setup, + sizeof(imesa->sarea->TexState[i])); + i830DumpTextureState(imesa, i); + } + } + /* Need to figure out if texturing state, or enable changed. */ + + for(i = 0; i < I830_TEXBLEND_COUNT; i++) { + if (imesa->dirty & I830_UPLOAD_TEXBLEND_N(i)) { + imesa->sarea->dirty |= I830_UPLOAD_TEXBLEND_N(i); + memcpy(imesa->sarea->TexBlendState[i],imesa->TexBlend[i], + imesa->TexBlendWordsUsed[i] * 4); + imesa->sarea->TexBlendStateWordsUsed[i] = + imesa->TexBlendWordsUsed[i]; + i830DumpTextureBlendState(imesa, i); + } + } + + if (imesa->dirty & I830_UPLOAD_BUFFERS) { + memcpy( imesa->sarea->BufferState,imesa->BufferSetup, + sizeof(imesa->BufferSetup) ); + i830DumpBufferState(imesa); + } + + if (imesa->dirty & I830_UPLOAD_STIPPLE) { + fprintf(stderr, "UPLOAD_STIPPLE\n"); + memcpy( imesa->sarea->StippleState,imesa->StippleSetup, + sizeof(imesa->StippleSetup) ); + i830DumpStippleState(imesa); + } + + if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_SHARED) { + memcpy( imesa->sarea->Palette[0],imesa->palette, + sizeof(imesa->sarea->Palette[0])); + } else { + i830TextureObjectPtr p; + if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_N(0)) { + p = imesa->CurrentTexObj[0]; + memcpy( imesa->sarea->Palette[0],p->palette, + sizeof(imesa->sarea->Palette[0])); + } + if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_N(1)) { + p = imesa->CurrentTexObj[1]; + memcpy( imesa->sarea->Palette[1], + p->palette, + sizeof(imesa->sarea->Palette[1])); + } + } + imesa->sarea->dirty |= (imesa->dirty & ~(I830_UPLOAD_TEX_MASK | + I830_UPLOAD_TEXBLEND_MASK)); + + imesa->upload_cliprects = GL_TRUE; + imesa->dirty = 0; +} Index: xc/lib/GL/mesa/src/drv/i830/i830_debug.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_debug.h:1.3 --- /dev/null Thu Feb 27 12:26:25 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_debug.h Mon Dec 9 20:26:53 2002 @@ -0,0 +1,48 @@ +/************************************************************************** + +Copyright 2001 2d3d Inc., Delray Beach, FL + +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. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_debug.h,v 1.3 2002/12/10 01:26:53 dawes Exp $ */ + +/* + * Author: + * Jeff Hartmann + */ + +/* Defines for sanity checking and debug output */ +#ifndef I830DEBUG_INC +#define I830DEBUG_INC + + +void i830DumpContextState( i830ContextPtr imesa ); +void i830DumpBufferState( i830ContextPtr imesa ); +void i830DumpTextureState( i830ContextPtr imesa, int unit ); +void i830DumpTextureBlendState( i830ContextPtr imesa, int unit ); +void i830DumpStippleState( i830ContextPtr imesa ); +void i830VertexSanity( i830ContextPtr imesa, drmI830Vertex vertex ); +void i830EmitHwStateLockedDebug( i830ContextPtr imesa ); + +#endif Index: xc/lib/GL/mesa/src/drv/i830/i830_drv.h diff -u xc/lib/GL/mesa/src/drv/i830/i830_drv.h:1.1 xc/lib/GL/mesa/src/drv/i830/i830_drv.h:removed --- xc/lib/GL/mesa/src/drv/i830/i830_drv.h:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_drv.h Thu Feb 27 12:26:25 2003 @@ -1,503 +0,0 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_drv.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - -/* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell - */ - -#ifndef __I830_MESA_DRV_H__ -#define __I830_MESA_DRV_H__ - -#include - -#include "dri_tmm.h" -#include "dri_mesaint.h" -#include "dri_mesa.h" - -#include "types.h" -#include "mm.h" -#include "context.h" -#include "mmath.h" -#include "vb.h" - -#include - -#include "xf86drm.h" -#include "xf86drmI830.h" -#include "i830_dri.h" - -#include "i830_3d_reg.h" - -/* To remove all debugging, make sure I830_DEBUG is defined as a - * preprocessor symbol, and equal to zero. - */ -#define I830_DEBUG 0 -#ifndef I830_DEBUG -#warning "Debugging enabled - expect reduced performance" -extern int I830_DEBUG; -#endif - -#define DEBUG_VERBOSE_2D 0x1 -#define DEBUG_VERBOSE_RING 0x8 -#define DEBUG_VERBOSE_OUTREG 0x10 -#define DEBUG_ALWAYS_SYNC 0x40 -#define DEBUG_VERBOSE_MSG 0x80 -#define DEBUG_NO_OUTRING 0x100 -#define DEBUG_NO_OUTREG 0x200 -#define DEBUG_VERBOSE_API 0x400 -#define DEBUG_VALIDATE_RING 0x800 -#define DEBUG_VERBOSE_LRU 0x1000 -#define DEBUG_VERBOSE_DRI 0x2000 -#define DEBUG_VERBOSE_IOCTL 0x4000 -#define DEBUG_VERBOSE_TRACE 0x8000 -#define DEBUG_VERBOSE_STATE 0x10000 - -#define DV_PF_555 (1<<8) -#define DV_PF_565 (2<<8) -#define DV_PF_8888 (3<<8) - -/* Reasons to fallback on all primitives. (see also - * imesa->IndirectTriangles). - */ -#define I830_FALLBACK_TEXTURE 0x1 -#define I830_FALLBACK_DRAW_BUFFER 0x2 -#define I830_FALLBACK_READ_BUFFER 0x4 -#define I830_FALLBACK_STIPPLE 0x8 -#define I830_FALLBACK_SPECULAR 0x10 -#define I830_FALLBACK_STENCIL 0x20 -#define I830_FALLBACK_COLORMASK 0x40 - - -/* for i830ctx.new_state - manage GL->driver state changes - */ -#define I830_NEW_TEXTURE 0x1 - -#define I830_TEX_MAXLEVELS 10 - - -#define I830_NO_PALETTE 0x0 -#define I830_USE_PALETTE 0x1 -#define I830_UPDATE_PALETTE 0x2 -#define I830_FALLBACK_PALETTE 0x4 - -#define I830_SPEC_BIT 0x1 -#define I830_FOG_BIT 0x2 -#define I830_ALPHA_BIT 0x4 /* GL_BLEND, not used */ -#define I830_TEX0_BIT 0x8 -#define I830_TEX1_BIT 0x10 -#define I830_RGBA_BIT 0x20 -#define I830_WIN_BIT 0x40 - -/* All structures go here */ -typedef struct { - GLubyte blue; - GLubyte green; - GLubyte red; - GLubyte alpha; -} i830_color; - -/* A basic fixed format vertex to kick things off. Move to dynamic - * layouts later on. (see also the i830_full_vertex struct in - * i830_3d_reg.h) - */ -typedef struct { - float x; - float y; - float z; - float oow; - /* float point_width; */ - i830_color color; - i830_color specular; - - float tu0; - float tv0; - /* q only if TEXCOORDTYPE_HOMOGENEOUS (projective) or _VECTOR (cube map)*/ - /* when q is desired, need to change VRTX_TEX_SET_0_FMT(TEXCOORDFMT_2D) - to VRTX_TEX_SET_0_FMT(TEXCOORDFMT_3D); same for other texcoords */ - /* float tq0; */ - - float tu1; - float tv1; - /* float tq1; */ - -#if defined(I830_ENABLE_4_TEXTURES) /* see i830_3d_reg.h */ - float tu2; - float tv2; - /* float tq2; */ - - float tu3; - float tv3; - /* float tq3; */ -#endif /* I830_ENABLE_4_TEXTURES */ -} i830_vertex; - -/* Unfortunately only have assembly for 16-stride vertices. - */ -union i830_vertex_t { - i830_vertex v; - float f[16]; - GLuint ui[16]; -}; - -typedef union i830_vertex_t i830Vertex; -typedef union i830_vertex_t *i830VertexPtr; - -struct i830_vertex_buffer_t { - GLvector1ui clipped_elements; - i830VertexPtr verts; - int last_vert; - GLuint *primitive; - GLuint *next_primitive; - void *vert_store; - GLuint size; -}; - -typedef struct i830_vertex_buffer_t *i830VertexBufferPtr; - - -/* For shared texture space managment, these texture objects may also - * be used as proxies for regions of texture memory containing other - * client's textures. Such proxy textures (not to be confused with GL - * proxy textures) are subject to the same LRU aging we use for our - * own private textures, and thus we have a mechanism where we can - * fairly decide between kicking out our own textures and those of - * other clients. - * - * Non-local texture objects have a valid MemBlock to describe the - * region managed by the other client, and can be identified by - * 't->globj == 0' - */ -#define TEX_0 1 -#define TEX_1 2 - -struct i830_texture_object_t { - struct i830_texture_object_t *next, *prev; - - GLuint age; - struct gl_texture_object *globj; - - int Pitch; - int Height; - int texelBytes; - int totalSize; - int bound; - - PMemBlock MemBlock; - char *BufAddr; - - GLuint min_level; - GLuint max_level; - GLuint dirty_images; - - GLenum palette_format; - GLuint palette[256]; - - struct { - const struct gl_texture_image *image; - int offset; /* into BufAddr */ - int height; - int internalFormat; - } image[I830_TEX_MAXLEVELS]; - - /* Support for multitexture. - */ - GLuint current_unit; - GLuint Setup[I830_TEX_SETUP_SIZE]; -}; - -typedef struct { - drmHandle handle; - drmSize size; - char *map; -} i830Region, *i830RegionPtr; - -typedef struct { - i830Region front; - i830Region back; - i830Region depth; - i830Region tex; - - int deviceID; - int width; - int height; - int mem; - - int cpp; /* for front and back buffers */ - int bitsPerPixel; - - int fbFormat; - int fbOffset; - int fbStride; - - int backOffset; - int depthOffset; - - int backPitch; - int backPitchBits; - - int textureOffset; - int textureSize; - int logTextureGranularity; - - __DRIscreenPrivate *driScrnPriv; - drmBufMapPtr bufs; - int use_copy_buf; - unsigned int sarea_priv_offset; -} i830ScreenPrivate; - -typedef struct i830_context_t i830Context; -typedef struct i830_context_t *i830ContextPtr; -typedef struct i830_texture_object_t *i830TextureObjectPtr; - -typedef void (*i830_interp_func)( GLfloat t, - GLfloat *result, - const GLfloat *in, - const GLfloat *out ); - - - -struct i830_context_t { - GLint refcount; - - GLcontext *glCtx; - - i830TextureObjectPtr CurrentTexObj[2]; - - struct i830_texture_object_t TexObjList; - struct i830_texture_object_t SwappedOut; - - int TextureMode; - - /* Hardware state - */ - GLuint Setup[I830_CTX_SETUP_SIZE]; - GLuint BufferSetup[I830_DEST_SETUP_SIZE]; - GLuint TexBlend[I830_TEXBLEND_COUNT][I830_TEXBLEND_SIZE]; - GLuint TexBlendWordsUsed[I830_TEXBLEND_COUNT]; - GLuint TexBlendColorPipeNum[I830_TEXBLEND_COUNT]; - GLuint LastTexEnabled; - GLuint TexEnabledMask; - int vertsize; - - /* Initial GL state, stored here so we can easily access it to draw - * quads to do clears. - */ - GLuint Init_Setup[I830_CTX_SETUP_SIZE]; - GLuint Init_BufferSetup[I830_DEST_SETUP_SIZE]; - GLuint Init_TexBlend[I830_TEXBLEND_COUNT][I830_TEXBLEND_SIZE]; - GLuint Init_TexBlendWordsUsed[I830_TEXBLEND_COUNT]; - GLuint Init_TexBlendColorPipeNum[I830_TEXBLEND_COUNT]; - - /* Support for CVA and the fast paths. - */ - GLuint setupdone; - GLuint setupindex; - GLuint renderindex; - GLuint using_fast_path; - i830_interp_func interp; - - /* Shortcircuit some state changes. - */ - points_func PointsFunc; - line_func LineFunc; - triangle_func TriangleFunc; - quad_func QuadFunc; - - /* Manage our own state */ - GLuint new_state; - - /* Manage hardware state */ - GLuint dirty; - memHeap_t *texHeap; - - /* One of the few bits of hardware state that can't be calculated - * completely on the fly: - */ - GLuint LcsCullMode; - - /* Funny mesa mirrors - */ - GLuint MonoColor; - GLuint ClearColor; - - /* DRI stuff - */ - drmBufPtr vertex_dma_buffer; - GLuint vertex_prim; - - GLframebuffer *glBuffer; - - /* Two flags to keep track of fallbacks. - */ - GLuint IndirectTriangles; - GLuint Fallback; - - - GLuint needClip; - - /* These refer to the current draw (front vs. back) buffer: - */ - char *drawMap; /* draw buffer address in virtual mem */ - char *readMap; - int drawX; /* origin of drawable in draw buffer */ - int drawY; - GLuint numClipRects; /* cliprects for that buffer */ - XF86DRIClipRectPtr pClipRects; - - int lastSwap; - int secondLastSwap; - int texAge; - int ctxAge; - int dirtyAge; - int any_contend; /* throttle me harder */ - - XF86DRIClipRectRec draw_rect; - - drmContext hHWContext; - drmLock *driHwLock; - int driFd; - Display *display; - - int hw_stencil; - - GLfloat depth_scale; - int depth_clear_mask; - int stencil_clear_mask; - int ClearDepth; - - GLboolean mask_red; - GLboolean mask_green; - GLboolean mask_blue; - GLboolean mask_alpha; - - GLubyte clear_red; - GLubyte clear_green; - GLubyte clear_blue; - GLubyte clear_alpha; - - GLenum palette_format; - GLuint palette[256]; - - __DRIdrawablePrivate *driDrawable; - __DRIscreenPrivate *driScreen; - i830ScreenPrivate *i830Screen; - I830SAREAPtr sarea; -}; - -extern void i830GetLock(i830ContextPtr imesa, GLuint flags); -extern void i830EmitHwStateLocked(i830ContextPtr imesa); -extern void i830EmitScissorValues(i830ContextPtr imesa, int box_nr, - int emit); -extern void i830EmitDrawingRectangle(i830ContextPtr imesa); -extern void i830XMesaSetBackClipRects(i830ContextPtr imesa); -extern void i830XMesaSetFrontClipRects(i830ContextPtr imesa); -extern void i830DestroyTexObj(i830ContextPtr imesa, - i830TextureObjectPtr t); -extern int i830UploadTexImages(i830ContextPtr imesa, - i830TextureObjectPtr t); -extern void i830ResetGlobalLRU(i830ContextPtr imesa); -extern void i830TexturesGone(i830ContextPtr imesa, - GLuint start, GLuint end, GLuint in_use); -extern void i830PrintLocalLRU(i830ContextPtr imesa); -extern void i830PrintGlobalLRU(i830ContextPtr imesa); -extern void i830ChooseRasterSetupFunc(GLcontext *ctx); -extern void i830PrintSetupFlags(char *msg, GLuint flags); -extern void i830UpdateTextureState(GLcontext *ctx); - - - -extern void i830DDFastPath(struct vertex_buffer *VB); -extern void i830DDFastPathInit(void); -extern void i830DDExtensionsInit(GLcontext *ctx); -extern void i830DDInitDriverFuncs(GLcontext *ctx); -extern void i830DDInitSpanFuncs(GLcontext *ctx); -extern void i830DDUpdateHwState(GLcontext *ctx); -extern void i830DDUpdateState(GLcontext *ctx); -extern void i830DDInitState(i830ContextPtr imesa); -extern void i830DDInitStateFuncs(GLcontext *ctx); -extern void i830DDInitTextureFuncs(GLcontext *ctx); -extern void i830DDDoRasterSetup(struct vertex_buffer *VB); -extern void i830DDPartialRasterSetup(struct vertex_buffer *VB); -extern void i830DDCheckPartialRasterSetup(GLcontext *ctx, - struct gl_pipeline_stage *d); -extern void i830DDViewport(GLcontext *ctx, GLint x, GLint y, - GLsizei width, GLsizei height); -extern void i830DDDepthRange(GLcontext *ctx, GLclampd nearval, - GLclampd farval); -extern void i830DDUnregisterVB(struct vertex_buffer *VB); -extern void i830DDRegisterVB(struct vertex_buffer *VB); -extern void i830DDResizeVB(struct vertex_buffer *VB, GLuint size); -extern void i830DDSetupInit(void); -extern GLboolean i830DDBuildPrecalcPipeline(GLcontext *ctx); -extern GLuint i830DDRegisterPipelineStages(struct gl_pipeline_stage *out, - const struct gl_pipeline_stage *in, - GLuint nr); - -#define I830_TEX_UNIT_ENABLED(unit) (1<DriverCtx)) -#define I830_DRIVER_DATA(vb) ((i830VertexBufferPtr)((vb)->driver_data)) -#define GET_DISPATCH_AGE(imesa) imesa->sarea->last_dispatch -#define GET_ENQUEUE_AGE(imesa) imesa->sarea->last_enqueue - -/* Lock the hardware and validate our state. - */ -#define LOCK_HARDWARE( imesa ) \ - do { \ - char __ret=0; \ - DRM_CAS(imesa->driHwLock, imesa->hHWContext, \ - (DRM_LOCK_HELD|imesa->hHWContext), __ret); \ - if (__ret) \ - i830GetLock( imesa, 0 ); \ - } while (0) - - - -/* Unlock the hardware using the global current context - */ -#define UNLOCK_HARDWARE(imesa) \ - DRM_UNLOCK(imesa->driFd, imesa->driHwLock, imesa->hHWContext); - - -/* This is the wrong way to do it, I'm sure. Otherwise the drm - * bitches that I've already got the heavyweight lock. At worst, - * this is 3 ioctls. The best solution probably only gets me down - * to 2 ioctls in the worst case. - */ -#define LOCK_HARDWARE_QUIESCENT( imesa ) do { \ - LOCK_HARDWARE( imesa ); \ - i830RegetLockQuiescent( imesa ); \ -} while(0) - -#endif /* __I830_MESA_DRV_H__ */ Index: xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c:removed --- xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c Thu Feb 27 12:26:25 2003 @@ -1,535 +0,0 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - -/* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell - */ - -#include - -#include "types.h" -#include "enums.h" -#include "cva.h" -#include "vertices.h" - -/* #include "mmath.h" */ - -#include "i830_drv.h" -#include "i830_tris.h" - - -extern void gl_fast_copy_vb( struct vertex_buffer *VB ); - -struct i830_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) i830_draw_point(imesa, &ivert[x], psize) -#define LINE(x,y) i830_draw_line(imesa, &ivert[x], &ivert[y] ) -#define TRI(x,y,z) i830_draw_triangle(imesa, &ivert[x], &ivert[y], &ivert[z]) - - - - -/* Direct, and no clipping required. I haven't written the clip funcs - * yet, so this is only useful for the fast path. - */ -#define RENDER_POINTS( start, count ) \ -do { \ - GLuint e; \ - for(e=start;everts; \ - const GLuint *elt = VB->EltPtr->data; \ - GLcontext *ctx = VB->ctx; \ - i830ContextPtr imesa = I830_CONTEXT(ctx); \ - const GLfloat psize = ctx->Point.Size; \ - (void)psize; (void) ivert; - - -#define TAG(x) x##_i830_smooth_indirect -#include "render_tmp.h" - - - -static void i830_render_elements_direct( struct vertex_buffer *VB ) -{ - GLcontext *ctx = VB->ctx; - i830ContextPtr imesa = I830_CONTEXT( ctx ); - GLenum prim = ctx->CVA.elt_mode; - GLuint nr = VB->EltPtr->count; - render_func func = render_tab_i830_smooth_indirect[prim]; - GLuint p = 0; - - if (imesa->new_state) - i830DDUpdateHwState( ctx ); - - do { - func( VB, 0, nr, 0 ); - } while (ctx->Driver.MultipassFunc && - ctx->Driver.MultipassFunc( VB, ++p )); -} - - - -#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 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[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; \ -} - -#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); \ - \ - 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; \ -} - - -static __inline void i830_tri_clip( GLuint **p_elts, - i830Vertex *verts, - GLubyte *clipmask, - GLuint *p_next_vert, - GLubyte mask, - i830_interp_func interp ) -{ - 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 i830_line_clip( GLuint **p_elts, - i830Vertex *verts, - GLubyte *clipmask, - GLuint *p_next_vert, - GLubyte mask, - i830_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 ) \ - 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])) { \ - i830_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])) { \ - i830_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 \ - i830ContextPtr imesa = I830_CONTEXT( VB->ctx ); \ - GLuint *elt = VB->EltPtr->data; \ - i830Vertex *verts = I830_DRIVER_DATA(VB)->verts; \ - GLuint next_vert = I830_DRIVER_DATA(VB)->last_vert; \ - GLuint *out = I830_DRIVER_DATA(VB)->clipped_elements.data; \ - GLubyte *mask = VB->ClipMask; \ - i830_interp_func interp = imesa->interp; \ - (void) interp; (void) verts; - -#define POSTFIX \ - I830_DRIVER_DATA(VB)->clipped_elements.count = \ - out - I830_DRIVER_DATA(VB)->clipped_elements.data; \ - I830_DRIVER_DATA(VB)->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) \ - CLIP_LINE(elt[i1], elt[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) i830_clip_##x##_elt -#include "render_tmp.h" - - - -static void i830_project_vertices( struct vertex_buffer *VB ) -{ - i830VertexBufferPtr i830VB = I830_DRIVER_DATA(VB); - GLcontext *ctx = VB->ctx; - i830ContextPtr imesa = I830_CONTEXT(ctx); - GLmatrix *mat = &ctx->Viewport.WindowMap; - GLfloat m[16]; - - m[MAT_SX] = mat->m[MAT_SX]; - m[MAT_TX] = mat->m[MAT_TX] - .5; - m[MAT_SY] = (- mat->m[MAT_SY]); - m[MAT_TY] = (- mat->m[MAT_TY]) + I830_CONTEXT(ctx)->driDrawable->h - .5; - m[MAT_SZ] = mat->m[MAT_SZ] * imesa->depth_scale; - m[MAT_TZ] = mat->m[MAT_TZ] * imesa->depth_scale; - - gl_project_v16( i830VB->verts[VB->CopyStart].f, - i830VB->verts[i830VB->last_vert].f, - m, - 16 * 4 ); -} - -static void i830_project_clipped_vertices( struct vertex_buffer *VB ) -{ - i830VertexBufferPtr i830VB = I830_DRIVER_DATA(VB); - GLcontext *ctx = VB->ctx; - i830ContextPtr imesa = I830_CONTEXT(ctx); - GLmatrix *mat = &ctx->Viewport.WindowMap; - GLfloat m[16]; - - m[MAT_SX] = mat->m[MAT_SX]; - m[MAT_TX] = mat->m[MAT_TX] - .5; - m[MAT_SY] = (- mat->m[MAT_SY]); - m[MAT_TY] = (- mat->m[MAT_TY]) + I830_CONTEXT(ctx)->driDrawable->h - .5; - m[MAT_SZ] = mat->m[MAT_SZ] * imesa->depth_scale; - m[MAT_TZ] = mat->m[MAT_TZ] * imesa->depth_scale; - - gl_project_clipped_v16( i830VB->verts[VB->CopyStart].f, - i830VB->verts[i830VB->last_vert].f, - m, - 16 * 4, - VB->ClipMask + VB->CopyStart ); -} - - -/* 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 "i830_fasttmp.h" - -#define TYPE (I830_RGBA_BIT) -#define TAG(x) x##_RGBA -#include "i830_fasttmp.h" - -#define TYPE (I830_TEX0_BIT) -#define TAG(x) x##_TEX0 -#include "i830_fasttmp.h" - -#define TYPE (I830_RGBA_BIT|I830_TEX0_BIT) -#define TAG(x) x##_RGBA_TEX0 -#include "i830_fasttmp.h" - -#define TYPE (I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT) -#define TAG(x) x##_RGBA_TEX0_TEX1 -#include "i830_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 (I830_TEX0_BIT|I830_TEX1_BIT) -#define TAG(x) x##_TEX0_TEX1 -#include "i830_fasttmp.h" - - -/* Very sparsely popluated array - fix the indices. - */ -static struct i830_fast_tab i830FastTab[0x80]; - -void i830DDFastPathInit( void ) -{ - i830_clip_render_init_elt(); - render_init_i830_smooth_indirect(); - - i830_init_fastpath( &i830FastTab[0] ); - i830_init_fastpath_RGBA( &i830FastTab[I830_RGBA_BIT] ); - i830_init_fastpath_TEX0( &i830FastTab[I830_TEX0_BIT] ); - i830_init_fastpath_RGBA_TEX0( &i830FastTab[I830_RGBA_BIT|I830_TEX0_BIT] ); - i830_init_fastpath_TEX0_TEX1( &i830FastTab[I830_TEX0_BIT|I830_TEX1_BIT] ); - i830_init_fastpath_RGBA_TEX0_TEX1( &i830FastTab[I830_RGBA_BIT|I830_TEX0_BIT| - I830_TEX1_BIT] ); -} - -#define VALID_SETUP (I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT) - - -void i830DDFastPath( struct vertex_buffer *VB ) -{ - GLcontext *ctx = VB->ctx; - GLenum prim = ctx->CVA.elt_mode; - i830ContextPtr imesa = I830_CONTEXT( ctx ); - struct i830_fast_tab *tab = &i830FastTab[imesa->setupindex & VALID_SETUP]; - GLuint do_cliptest = 1; - - gl_prepare_arrays_cva( VB ); /* still need this */ - - /* Reserve enough space for the pathological case. - */ - if (VB->EltPtr->count * 12 > I830_DRIVER_DATA(VB)->size) { - i830DDResizeVB( VB, VB->EltPtr->count * 12 ); - do_cliptest = 1; - } - - tab->build_vertices( VB, do_cliptest ); /* object->clip space */ - - if (imesa->new_state) - i830DDUpdateHwState( ctx ); - - if (VB->ClipOrMask) { - if (!VB->ClipAndMask) { - render_func *clip = i830_clip_render_tab_elt; - - imesa->interp = tab->interp; - - clip[prim]( VB, 0, VB->EltPtr->count, 0 ); /* build new elts */ - - ctx->CVA.elt_mode = gl_reduce_prim[prim]; - VB->EltPtr = &(I830_DRIVER_DATA(VB)->clipped_elements); - - i830_project_clipped_vertices( VB ); /* clip->device space */ - i830_render_elements_direct( VB ); /* render using new list */ - } - } else { - i830_project_vertices( VB ); /* clip->device space */ - i830_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/i830/i830_fasttmp.h diff -u xc/lib/GL/mesa/src/drv/i830/i830_fasttmp.h:1.1 xc/lib/GL/mesa/src/drv/i830/i830_fasttmp.h:removed --- xc/lib/GL/mesa/src/drv/i830/i830_fasttmp.h:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_fasttmp.h Thu Feb 27 12:26:25 2003 @@ -1,156 +0,0 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_fasttmp.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - -/* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell - */ - - - -/* 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(i830_setup_full)( struct vertex_buffer *VB, GLuint do_cliptest ) -{ - GLcontext *ctx = VB->ctx; - const GLfloat * const m = ctx->ModelProjectMatrix.m; - GLuint start = VB->CopyStart; - GLuint count = VB->Count; - GLuint i; - - gl_xform_points3_v16_general(I830_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(I830_DRIVER_DATA(VB)->verts[start].f, - I830_DRIVER_DATA(VB)->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 = I830_DRIVER_DATA(VB)->verts[start].f; - - for (i = start ; i < count ; i++, f += 16) { - if (TYPE & I830_RGBA_BIT) { - GLubyte *b = (GLubyte *)&f[CLIP_UBYTE_COLOR]; - GLubyte *col = color; color += color_stride; - b[CLIP_UBYTE_R] = col[0]; - b[CLIP_UBYTE_G] = col[1]; - b[CLIP_UBYTE_B] = col[2]; - b[CLIP_UBYTE_A] = col[3]; - } - if (TYPE & I830_TEX0_BIT) { - f[CLIP_S0] = tex0_data[0]; - f[CLIP_T0] = tex0_data[1]; - STRIDE_F(tex0_data, tex0_stride); - } - if (TYPE & I830_TEX1_BIT) { - f[CLIP_S1] = tex1_data[0]; - f[CLIP_T1] = tex1_data[1]; - STRIDE_F(tex1_data, tex1_stride); - } - } - } - - I830_DRIVER_DATA(VB)->clipped_elements.count = start; - I830_DRIVER_DATA(VB)->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(i830_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 & I830_RGBA_BIT) { - INTERP_RGBA(t, - ((GLubyte *)&(O[4])), - ((GLubyte *)&(I[4])), - ((GLubyte *)&(J[4]))); - } - - if (TYPE & I830_TEX0_BIT) { - O[6] = LINTERP(t, I[6], J[6]); - O[7] = LINTERP(t, I[7], J[7]); - } - - if (TYPE & I830_TEX1_BIT) { - O[8] = LINTERP(t, I[8], J[8]); - O[9] = LINTERP(t, I[9], J[9]); - } -} - - -static void TAG(i830_init_fastpath)( struct i830_fast_tab *tab ) -{ - tab->interp = TAG(i830_interp_vert); - tab->build_vertices = TAG(i830_setup_full); -} - -#undef TYPE -#undef TAG -#undef SIZE Index: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c:1.5 --- xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c Mon Dec 9 20:26:53 2002 @@ -1,3 +1,4 @@ + /************************************************************************** Copyright 2001 VA Linux Systems Inc., Fremont, California. @@ -25,74 +26,75 @@ **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c,v 1.5 2002/12/10 01:26:53 dawes Exp $ */ /* * Author: - * Jeff Hartmann + * Jeff Hartmann + * Graeme Fisher + * Abraham vd Merwe * * Heavily based on the I810 driver, which was written by: - * Keith Whitwell + * Keith Whitwell */ #include #include +#include -#include "types.h" -#include "pb.h" +#include "glheader.h" +#include "mtypes.h" +#include "macros.h" #include "dd.h" +#include "swrast/swrast.h" #include "mm.h" -#include "i830_drv.h" + +#include "i830_screen.h" +#include "i830_dri.h" + +#include "i830_context.h" #include "i830_ioctl.h" +#include "i830_state.h" +#include "i830_debug.h" #include "drm.h" -#include -drmBufPtr i830_get_buffer_ioctl( i830ContextPtr imesa ) +static drmBufPtr i830_get_buffer_ioctl( i830ContextPtr imesa ) { - drm_i830_dma_t dma; + drmI830DMA dma; drmBufPtr buf; - int retcode; - - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "Getting dma buffer\n"); - + int retcode,i = 0; while (1) { - retcode = ioctl(imesa->driFd, DRM_IOCTL_I830_GETBUF, &dma); - - if (dma.granted == 1 && retcode == 0) - break; - - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "Retcode : %d, granted : %d\n", retcode, dma.granted); - - ioctl(imesa->driFd, DRM_IOCTL_I830_FLUSH); + retcode = drmCommandWriteRead(imesa->driFd, + DRM_I830_GETBUF, + &dma, + sizeof(drmI830DMA)); + if (dma.granted == 1 && retcode == 0) + break; + + if (++i > 1000) { + imesa->sarea->perf_boxes |= I830_BOX_WAIT; + retcode = drmCommandNone(imesa->driFd, DRM_I830_FLUSH); + i = 0; + } } - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, - "imesa->i830Screen->bufs->list : %p, " - "dma.request_idx : %d\n", - imesa->i830Screen->bufs->list, dma.request_idx); - buf = &(imesa->i830Screen->bufs->list[dma.request_idx]); buf->idx = dma.request_idx; - buf->used = 4; /* leave room for instruction header */ + buf->used = 0; buf->total = dma.request_size; + buf->address = (drmAddress)dma.virtual; - if(imesa->i830Screen->use_copy_buf != 1) - buf->address = (drmAddress)dma.virtual; return buf; } - static void i830ClearDrawQuad(i830ContextPtr imesa, float left, float right, float bottom, float top, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) { - GLuint *vb = i830AllocDwordsInlineLocked( imesa, 32 ); + GLuint *vb = i830AllocDmaLowLocked( imesa, 128 ); i830Vertex tmp; int i; @@ -102,7 +104,7 @@ tmp.v.x = left; tmp.v.y = bottom; tmp.v.z = 1.0; - tmp.v.oow = 1.0; + tmp.v.w = 1.0; tmp.v.color.red = red; tmp.v.color.green = green; tmp.v.color.blue = blue; @@ -111,8 +113,8 @@ tmp.v.specular.green = 0; tmp.v.specular.blue = 0; tmp.v.specular.alpha = 0; - tmp.v.tu0 = 0.0f; - tmp.v.tv0 = 0.0f; + tmp.v.u0 = 0.0f; + tmp.v.v0 = 0.0f; for (i = 0 ; i < 8 ; i++) vb[i] = tmp.ui[i]; @@ -147,7 +149,7 @@ GLuint old_dirty; int x0, y0, x1, y1; - if(I830_DEBUG&DEBUG_VERBOSE_IOCTL) + if (I830_DEBUG & DEBUG_IOCTL) fprintf(stderr, "Clearing with triangles\n"); old_dirty = imesa->dirty & ~I830_UPLOAD_CLIPRECTS; @@ -179,9 +181,10 @@ memcpy(sarea->BufferState, imesa->BufferSetup, sizeof(imesa->BufferSetup) ); + sarea->StippleState[I830_STPREG_ST1] = 0; - old_vertex_prim = imesa->vertex_prim; - imesa->vertex_prim = PRIM3D_TRIFAN; + old_vertex_prim = imesa->hw_primitive; + imesa->hw_primitive = PRIM3D_TRIFAN; if(mask & DD_FRONT_LEFT_BIT) { GLuint tmp = sarea->ContextState[I830_CTXREG_ENABLES_2]; @@ -242,7 +245,7 @@ i830ClearDrawQuad(imesa, (float)x0, (float)x1, (float)y0, (float)y1, imesa->clear_red, imesa->clear_green, imesa->clear_blue, imesa->clear_alpha); - i830FlushVerticesLocked(imesa); + i830FlushPrimsLocked( imesa ); } if(mask & DD_BACK_LEFT_BIT) { @@ -305,7 +308,7 @@ i830ClearDrawQuad(imesa, (float)x0, (float)x1, (float)y0, (float)y1, imesa->clear_red, imesa->clear_green, imesa->clear_blue, imesa->clear_alpha); - i830FlushVerticesLocked(imesa); + i830FlushPrimsLocked( imesa ); } if(mask & DD_STENCIL_BIT) { @@ -387,7 +390,7 @@ i830ClearDrawQuad(imesa, (float)x0, (float)x1, (float)y0, (float)y1, 255, 255, 255, 255); - i830FlushVerticesLocked(imesa); + i830FlushPrimsLocked( imesa ); } UNLOCK_HARDWARE(imesa); @@ -396,32 +399,35 @@ I830_UPLOAD_BUFFERS | I830_UPLOAD_TEXBLEND0); - imesa->vertex_prim = old_vertex_prim; + imesa->hw_primitive = old_vertex_prim; } -GLbitfield i830Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ) +static void i830Clear(GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx1, GLint cy1, GLint cw, GLint ch) { i830ContextPtr imesa = I830_CONTEXT( ctx ); __DRIdrawablePrivate *dPriv = imesa->driDrawable; const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask); - drm_i830_clear_t clear; + drmI830Clear clear; GLbitfield tri_mask = 0; int i; + GLint cx, cy; - FLUSH_BATCH( imesa ); - /* flip top to bottom */ - cy = dPriv->h-cy-ch; - cx += imesa->drawX; + cy = dPriv->h-cy1-ch; + cx = cx1 + imesa->drawX; cy += imesa->drawY; + if(0) fprintf(stderr, "\nClearColor : 0x%08x\n", imesa->ClearColor); + clear.flags = 0; clear.clear_color = imesa->ClearColor; clear.clear_depth = 0; clear.clear_colormask = 0; clear.clear_depthmask = 0; + I830_FIREVERTICES( imesa ); + if (mask & DD_FRONT_LEFT_BIT) { if(colorMask == ~0) { clear.flags |= I830_FRONT; @@ -453,86 +459,92 @@ } else { clear.flags |= I830_DEPTH; clear.clear_depthmask |= imesa->stencil_clear_mask; - clear.clear_depth |= ((ctx->Stencil.Clear<<24) & - imesa->stencil_clear_mask); + clear.clear_depth |= imesa->stencil_clear_mask; } mask &= ~DD_STENCIL_BIT; } /* First check for clears that need to happen with triangles */ - if(tri_mask) { i830ClearWithTris(ctx, tri_mask, all, cx, cy, cw, ch); + } else { + mask |= tri_mask; } - if (!clear.flags) - return mask; + if (clear.flags) { + LOCK_HARDWARE( imesa ); - LOCK_HARDWARE( imesa ); + for (i = 0 ; i < imesa->numClipRects ; ) + { + int nr = MIN2(i + I830_NR_SAREA_CLIPRECTS, imesa->numClipRects); + XF86DRIClipRectRec *box = imesa->pClipRects; + drm_clip_rect_t *b = (drm_clip_rect_t *)imesa->sarea->boxes; + int n = 0; - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "Clear, bufs %x nbox %d\n", - (int)clear.flags, (int)imesa->numClipRects); - - for (i = 0 ; i < imesa->numClipRects ; ) - { - int nr = MIN2(i + I830_NR_SAREA_CLIPRECTS, imesa->numClipRects); - XF86DRIClipRectRec *box = imesa->pClipRects; - drm_clip_rect_t *b = (drm_clip_rect_t *)imesa->sarea->boxes; - int 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++; + 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++ = *(drm_clip_rect_t *)&box[i]; + n++; + } } - } else { - for ( ; i < nr ; i++) { - *b++ = *(drm_clip_rect_t *)&box[i]; - n++; - } + + imesa->sarea->nbox = n; + drmCommandWrite(imesa->driFd, DRM_I830_CLEAR, + &clear, sizeof(drmI830Clear)); } - imesa->sarea->nbox = n; - ioctl(imesa->driFd, DRM_IOCTL_I830_CLEAR, &clear); + UNLOCK_HARDWARE( imesa ); + imesa->upload_cliprects = GL_TRUE; } - - UNLOCK_HARDWARE( imesa ); - imesa->dirty |= I830_UPLOAD_CLIPRECTS; - return mask; + if (mask) + _swrast_Clear( ctx, mask, all, cx1, cy1, cw, ch ); } + + /* * Copy the back buffer to the front buffer. */ -void i830SwapBuffers( i830ContextPtr imesa ) +void i830CopyBuffer( const __DRIdrawablePrivate *dPriv ) { - __DRIdrawablePrivate *dPriv = imesa->driDrawable; + i830ContextPtr imesa; XF86DRIClipRectPtr pbox; - int nbox; - int i; - int tmp; + int nbox, i, tmp; + + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); - FLUSH_BATCH( imesa ); + imesa = (i830ContextPtr) dPriv->driContextPriv->driverPrivate; + + I830_FIREVERTICES( imesa ); LOCK_HARDWARE( imesa ); - + + imesa->sarea->perf_boxes |= imesa->perf_boxes; + imesa->perf_boxes = 0; + pbox = dPriv->pClipRects; nbox = dPriv->numClipRects; @@ -545,117 +557,136 @@ for ( ; i < nr ; i++) *b++ = pbox[i]; - - ioctl(imesa->driFd, DRM_IOCTL_I830_SWAP); + drmCommandNone(imesa->driFd, DRM_I830_SWAP); } tmp = GET_ENQUEUE_AGE(imesa); UNLOCK_HARDWARE( imesa ); - if (GET_DISPATCH_AGE(imesa) < imesa->lastSwap) + /* multiarb will suck the life out of the server without this throttle: + */ + if (GET_DISPATCH_AGE(imesa) < imesa->lastSwap) { i830WaitAge(imesa, imesa->lastSwap); + } imesa->lastSwap = tmp; - imesa->dirty |= I830_UPLOAD_CLIPRECTS; + imesa->upload_cliprects = GL_TRUE; } - +/* Flip the front & back buffes + */ +void i830PageFlip( const __DRIdrawablePrivate *dPriv ) +{ + i830ContextPtr imesa; + int tmp, ret; + if (I830_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s\n", __FUNCTION__); + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); + imesa = (i830ContextPtr) dPriv->driContextPriv->driverPrivate; -/* This waits for *everybody* to finish rendering -- overkill. - */ -void i830DmaFinish( i830ContextPtr imesa ) -{ - FLUSH_BATCH( imesa ); + I830_FIREVERTICES( imesa ); + LOCK_HARDWARE( imesa ); + imesa->sarea->perf_boxes |= imesa->perf_boxes; + imesa->perf_boxes = 0; - if (1 || imesa->sarea->last_quiescent != imesa->sarea->last_enqueue) { - - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "i830DmaFinish\n"); + if (dPriv->pClipRects) { + *(XF86DRIClipRectRec *)imesa->sarea->boxes = dPriv->pClipRects[0]; + imesa->sarea->nbox = 1; + } - LOCK_HARDWARE( imesa ); - i830RegetLockQuiescent( imesa ); + ret = drmCommandNone(imesa->driFd, DRM_I830_FLIP); + if (ret) { + fprintf(stderr, "%s: %d\n", __FUNCTION__, ret); UNLOCK_HARDWARE( imesa ); - imesa->sarea->last_quiescent = imesa->sarea->last_enqueue; + exit(1); } -} - -void i830RegetLockQuiescent( i830ContextPtr imesa ) -{ - if (1 || imesa->sarea->last_quiescent != imesa->sarea->last_enqueue) { - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "i830RegetLockQuiescent\n"); + tmp = GET_ENQUEUE_AGE(imesa); + UNLOCK_HARDWARE( imesa ); - drmUnlock(imesa->driFd, imesa->hHWContext); - i830GetLock( imesa, DRM_LOCK_QUIESCENT ); - imesa->sarea->last_quiescent = imesa->sarea->last_enqueue; + /* multiarb will suck the life out of the server without this throttle: + */ + if (GET_DISPATCH_AGE(imesa) < imesa->lastSwap) { + i830WaitAge(imesa, imesa->lastSwap); } + + i830SetDrawBuffer( imesa->glCtx, imesa->glCtx->Color.DriverDrawBuffer ); + imesa->upload_cliprects = GL_TRUE; + imesa->lastSwap = tmp; } -void i830WaitAgeLocked( i830ContextPtr imesa, int age ) +/* This waits for *everybody* to finish rendering -- overkill. + */ +void i830DmaFinish( i830ContextPtr imesa ) { - int i = 0; - - - while (++i < 500000 && GET_DISPATCH_AGE(imesa) < age) { - ioctl(imesa->driFd, DRM_IOCTL_I830_GETAGE); - } - - if (GET_DISPATCH_AGE(imesa) < age) { - if (0) - fprintf(stderr, "wait locked %d %d\n", age, GET_DISPATCH_AGE(imesa)); - ioctl(imesa->driFd, DRM_IOCTL_I830_FLUSH); - } + I830_FIREVERTICES( imesa ); + LOCK_HARDWARE_QUIESCENT( imesa ); + UNLOCK_HARDWARE( imesa ); } +void i830RegetLockQuiescent( i830ContextPtr imesa ) +{ + drmUnlock(imesa->driFd, imesa->hHWContext); + i830GetLock( imesa, DRM_LOCK_QUIESCENT ); +} -void i830WaitAge( i830ContextPtr imesa, int age ) +void i830WaitAgeLocked( i830ContextPtr imesa, int age ) { int i = 0; - - while (++i < 500000 && GET_DISPATCH_AGE(imesa) < age) { - ioctl(imesa->driFd, DRM_IOCTL_I830_GETAGE); - } - - if (GET_DISPATCH_AGE(imesa) >= age) - return; - - i = 0; - while (++i < 1000 && GET_DISPATCH_AGE(imesa) < age) { - ioctl(imesa->driFd, DRM_IOCTL_I830_GETAGE); - usleep(1000); + while (++i < 5000) { + drmCommandNone(imesa->driFd, DRM_I830_GETAGE); + if (GET_DISPATCH_AGE(imesa) >= age) return; + imesa->sarea->perf_boxes |= I830_BOX_WAIT; + UNLOCK_HARDWARE( imesa ); + if (I830_DEBUG & DEBUG_SLEEP) fprintf(stderr, "."); + usleep(1); + LOCK_HARDWARE( imesa ); } - - /* To be effective at letting other clients at the hardware, - * particularly the X server which regularly needs quiescence to - * touch the framebuffer, we really need to sleep *beyond* the - * point where our last buffer clears the hardware. + /* If that didn't work, just do a flush: */ - if (imesa->any_contend) { - usleep(3000); - } - - imesa->any_contend = 0; - - if (GET_DISPATCH_AGE(imesa) < age) { - LOCK_HARDWARE(imesa); - if (GET_DISPATCH_AGE(imesa) < age) - ioctl(imesa->driFd, DRM_IOCTL_I830_FLUSH); - UNLOCK_HARDWARE(imesa); - } + drmCommandNone(imesa->driFd, DRM_I830_FLUSH); } -void i830FlushVertices( i830ContextPtr imesa ) +void i830WaitAge( i830ContextPtr imesa, int age ) { - if (!imesa->vertex_dma_buffer) return; + int i = 0; + if (GET_DISPATCH_AGE(imesa) >= age) return; - LOCK_HARDWARE( imesa ); - i830FlushVerticesLocked( imesa ); - UNLOCK_HARDWARE( imesa ); + while (1) { + drmCommandNone(imesa->driFd, DRM_I830_GETAGE); + if (GET_DISPATCH_AGE(imesa) >= age) return; + imesa->perf_boxes |= I830_BOX_WAIT; + + if (imesa->do_irqs) { + drmI830IrqEmit ie; + drmI830IrqWait iw; + int ret; + + ie.irq_seq = &iw.irq_seq; + + LOCK_HARDWARE( imesa ); + ret = drmCommandWriteRead( imesa->driFd, DRM_I830_IRQ_EMIT, &ie, sizeof(ie) ); + if ( ret ) { + fprintf( stderr, "%s: drmI830IrqEmit: %d\n", __FUNCTION__, ret ); + exit(1); + } + UNLOCK_HARDWARE(imesa); + + ret = drmCommandWrite( imesa->driFd, DRM_I830_IRQ_WAIT, &iw, sizeof(iw) ); + if ( ret ) { + fprintf( stderr, "%s: drmI830IrqWait: %d\n", __FUNCTION__, ret ); + exit(1); + } + } else { + if (++i > 5000) usleep(1); + } + } } static void age_imesa( i830ContextPtr imesa, int age ) @@ -664,139 +695,130 @@ if (imesa->CurrentTexObj[1]) imesa->CurrentTexObj[1]->age = age; } -void i830FlushVerticesLocked( i830ContextPtr imesa ) +void i830FlushPrimsLocked( i830ContextPtr imesa ) { - drm_clip_rect_t *pbox = (drm_clip_rect_t *)imesa->pClipRects; + XF86DRIClipRectPtr pbox = (XF86DRIClipRectPtr)imesa->pClipRects; int nbox = imesa->numClipRects; - drmBufPtr buffer = imesa->vertex_dma_buffer; - drm_i830_vertex_t vertex; - int i; - - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "i830FlushVerticesLocked, buf->used %d\n", - buffer->used); - - if (!buffer) - return; + drmBufPtr buffer = imesa->vertex_buffer; + I830SAREAPtr sarea = imesa->sarea; + drmI830Vertex vertex; + int i, nr; - if (imesa->dirty & ~I830_UPLOAD_CLIPRECTS) - i830EmitHwStateLocked( imesa ); + if (I830_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s dirty: %08x\n", __FUNCTION__, imesa->dirty); - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "i830FlushVerticesLocked, used %d\n", - buffer->used); - - imesa->vertex_dma_buffer = 0; vertex.idx = buffer->idx; - vertex.used = buffer->used; + vertex.used = imesa->vertex_low; vertex.discard = 0; - - if (!nbox) - vertex.used = 0; - - if (nbox > I830_NR_SAREA_CLIPRECTS) - imesa->dirty |= I830_UPLOAD_CLIPRECTS; - - if(imesa->i830Screen->use_copy_buf == 1 && vertex.used) { - drm_i830_copy_t copy; - - copy.idx = buffer->idx; - copy.used = buffer->used; - copy.address = buffer->address; - ioctl(imesa->driFd, DRM_IOCTL_I830_COPY, ©); - } + sarea->vertex_prim = imesa->hw_primitive; - - imesa->sarea->vertex_prim = imesa->vertex_prim; - - if (!nbox || !(imesa->dirty & I830_UPLOAD_CLIPRECTS)) - { - if (nbox == 1) - imesa->sarea->nbox = 0; + /* Reset imesa vars: + */ + imesa->vertex_buffer = 0; + imesa->vertex_addr = 0; + imesa->vertex_low = 0; + imesa->vertex_high = 0; + imesa->vertex_last_prim = 0; + + if (imesa->dirty) { + if (I830_DEBUG & DEBUG_SANITY) + i830EmitHwStateLockedDebug(imesa); else - imesa->sarea->nbox = nbox; + i830EmitHwStateLocked(imesa); + } - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "DRM_IOCTL_I830_VERTEX CASE1 nbox %d used %d\n", - nbox, vertex.used); + if (I830_DEBUG & DEBUG_IOCTL) + fprintf(stderr,"%s: Vertex idx %d used %d discard %d\n", + __FUNCTION__, vertex.idx, vertex.used, vertex.discard); + if (!nbox) { + vertex.used = 0; vertex.discard = 1; - ioctl(imesa->driFd, DRM_IOCTL_I830_VERTEX, &vertex); - age_imesa(imesa, imesa->sarea->last_enqueue); + if (drmCommandWrite (imesa->driFd, DRM_I830_VERTEX, + &vertex, sizeof(drmI830Vertex))) { + fprintf(stderr, "DRM_I830_VERTEX: %d\n", -errno); + UNLOCK_HARDWARE(imesa); + exit(1); + } + return; } - else - { - for (i = 0 ; i < nbox ; ) - { - int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, nbox); - drm_clip_rect_t *b = (drm_clip_rect_t *)imesa->sarea->boxes; - imesa->sarea->nbox = nr - i; - for ( ; i < nr ; i++, b++) { - *b++ = pbox[i]; - if(0) fprintf(stderr, "x1: %d y1: %d x2: %d y2: %d\n", - pbox[i].x1, - pbox[i].y1, - pbox[i].x2, - pbox[i].y2); - } + for (i = 0 ; i < nbox ; i = nr ) { + XF86DRIClipRectPtr b = sarea->boxes; + int j; + + nr = MIN2(i + I830_NR_SAREA_CLIPRECTS, nbox); + sarea->nbox = nr - i; - /* Finished with the buffer? - */ - if (nr == nbox) - vertex.discard = 1; - - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "DRM_IOCTL_I830_VERTEX nbox %d used %d\n", - nbox, vertex.used); + for ( j = i ; j < nr ; j++) { + b[j-i] = pbox[j]; + } - ioctl(imesa->driFd, DRM_IOCTL_I830_VERTEX, &vertex); - age_imesa(imesa, imesa->sarea->last_enqueue); + /* Finished with the buffer? + */ + if (nr == nbox) + vertex.discard = 1; + + /* Do a bunch of sanity checks on the vertices sent to the hardware */ + if (I830_DEBUG & DEBUG_SANITY) { + i830VertexSanity(imesa, vertex); + + for ( j = 0 ; j < sarea->nbox ; j++) { + fprintf(stderr, "box %d/%d %d,%d %d,%d\n", + j, sarea->nbox, b[j].x1, b[j].y1, b[j].x2, b[j].y2); + } } + + drmCommandWrite (imesa->driFd, DRM_I830_VERTEX, + &vertex, sizeof(drmI830Vertex)); + age_imesa(imesa, imesa->sarea->last_enqueue); } imesa->dirty = 0; - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) - fprintf(stderr, "finished i830FlushVerticesLocked\n"); + imesa->upload_cliprects = GL_FALSE; } - -GLuint *i830AllocDwords( i830ContextPtr imesa, int dwords ) +void i830FlushPrimsGetBufferLocked( i830ContextPtr imesa ) { - GLuint *start; + if (imesa->vertex_buffer) + i830FlushPrimsLocked( imesa ); + imesa->vertex_buffer = i830_get_buffer_ioctl( imesa ); + imesa->vertex_addr = (char *)imesa->vertex_buffer->address; - if (!imesa->vertex_dma_buffer) - { - LOCK_HARDWARE(imesa); - imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); - UNLOCK_HARDWARE(imesa); - } - else if (imesa->vertex_dma_buffer->used + dwords * 4 > - imesa->vertex_dma_buffer->total) - { - LOCK_HARDWARE(imesa); - i830FlushVerticesLocked( imesa ); - imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); - UNLOCK_HARDWARE(imesa); - } + /* leave room for instruction header & footer: + */ + imesa->vertex_high = imesa->vertex_buffer->total - 4; + imesa->vertex_low = 4; + imesa->vertex_last_prim = imesa->vertex_low; +} - start = (GLuint *)((char *)imesa->vertex_dma_buffer->address + - imesa->vertex_dma_buffer->used); +void i830FlushPrimsGetBuffer( i830ContextPtr imesa ) +{ + LOCK_HARDWARE(imesa); + i830FlushPrimsGetBufferLocked( imesa ); + UNLOCK_HARDWARE(imesa); +} - imesa->vertex_dma_buffer->used += dwords * 4; - return start; + +void i830FlushPrims( i830ContextPtr imesa ) +{ + if (imesa->vertex_buffer) { + LOCK_HARDWARE( imesa ); + i830FlushPrimsLocked( imesa ); + UNLOCK_HARDWARE( imesa ); + } } int i830_check_copy(int fd) { - return(ioctl(fd, DRM_IOCTL_I830_DOCOPY)); + return drmCommandNone(fd, DRM_I830_DOCOPY); } static void i830DDFlush( GLcontext *ctx ) { i830ContextPtr imesa = I830_CONTEXT( ctx ); - FLUSH_BATCH( imesa ); + I830_FIREVERTICES( imesa ); } static void i830DDFinish( GLcontext *ctx ) @@ -808,5 +830,7 @@ void i830DDInitIoctlFuncs( GLcontext *ctx ) { ctx->Driver.Flush = i830DDFlush; + ctx->Driver.Clear = i830Clear; ctx->Driver.Finish = i830DDFinish; } + Index: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h diff -u xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h:1.1 xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h:1.3 --- xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h Wed Oct 30 07:51:35 2002 @@ -1,3 +1,4 @@ + /************************************************************************** Copyright 2001 VA Linux Systems Inc., Fremont, California. @@ -25,104 +26,80 @@ **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h,v 1.3 2002/10/30 12:51:35 alanh Exp $ */ /* * Author: - * Jeff Hartmann + * Jeff Hartmann + * Graeme Fisher + * Abraham vd Merwe * * Heavily based on the I810 driver, which was written by: - * Keith Whitwell + * Keith Whitwell */ #ifndef I830_IOCTL_H #define I830_IOCTL_H - -#include "i830_drv.h" - -GLuint *i830AllocDwords( i830ContextPtr imesa, int dwords ); +#include "i830_context.h" -void i830GetGeneralDmaBufferLocked( i830ContextPtr mmesa ); - -void i830FlushVertices( i830ContextPtr mmesa ); -void i830FlushVerticesLocked( i830ContextPtr mmesa ); - -void i830FlushGeneralLocked( i830ContextPtr imesa ); +GLuint *i830AllocDwords (i830ContextPtr imesa, int dwords); +void i830EmitPrim( i830ContextPtr imesa ); +void i830FlushPrims( i830ContextPtr mmesa ); +void i830FlushPrimsLocked( i830ContextPtr mmesa ); +void i830FlushPrimsGetBuffer( i830ContextPtr imesa ); +void i830FlushPrimsGetBufferLocked( i830ContextPtr imesa ); void i830WaitAgeLocked( i830ContextPtr imesa, int age ); void i830WaitAge( i830ContextPtr imesa, int age ); - void i830DmaFinish( i830ContextPtr imesa ); - void i830RegetLockQuiescent( i830ContextPtr imesa ); - void i830DDInitIoctlFuncs( GLcontext *ctx ); - -void i830SwapBuffers( i830ContextPtr imesa ); - +void i830CopyBuffer( const __DRIdrawablePrivate *dpriv ); +void i830PageFlip( const __DRIdrawablePrivate *dpriv ); int i830_check_copy(int fd); + +#define I830_STATECHANGE(imesa, flag) \ +do { \ + if (imesa->vertex_low != imesa->vertex_last_prim) \ + i830FlushPrims(imesa); \ + imesa->dirty |= flag; \ +} while (0) -GLbitfield i830Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ); -#define FLUSH_BATCH(imesa) do { \ - if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) \ - fprintf(stderr, "FLUSH_BATCH in %s\n", __FUNCTION__); \ - if (imesa->vertex_dma_buffer) i830FlushVertices(imesa); \ +#define I830_FIREVERTICES(imesa) \ +do { \ + if (imesa->vertex_buffer) { \ + i830FlushPrims(imesa); \ +} \ } while (0) -extern drmBufPtr i830_get_buffer_ioctl( i830ContextPtr imesa ); -static __inline -GLuint *i830AllocDwordsInline( i830ContextPtr imesa, int dwords ) +static __inline GLuint *i830AllocDmaLow( i830ContextPtr imesa, int bytes ) { - int bytes = dwords * 4; - GLuint *start; - - if (!imesa->vertex_dma_buffer) - { - LOCK_HARDWARE(imesa); - imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); - UNLOCK_HARDWARE(imesa); - } - else if (imesa->vertex_dma_buffer->used + bytes > - imesa->vertex_dma_buffer->total) + if (imesa->vertex_low + bytes > imesa->vertex_high) { + i830FlushPrimsGetBuffer( imesa ); + } + { - LOCK_HARDWARE(imesa); - i830FlushVerticesLocked( imesa ); - imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); - UNLOCK_HARDWARE(imesa); + GLuint *start = (GLuint *)(imesa->vertex_addr + imesa->vertex_low); + imesa->vertex_low += bytes; + return start; } - - start = (GLuint *)((char *)imesa->vertex_dma_buffer->address + - imesa->vertex_dma_buffer->used); - - imesa->vertex_dma_buffer->used += bytes; - return start; } -static __inline -GLuint *i830AllocDwordsInlineLocked( i830ContextPtr imesa, int dwords ) +static __inline GLuint *i830AllocDmaLowLocked( i830ContextPtr imesa, + int bytes ) { - int bytes = dwords * 4; - GLuint *start; - - if (!imesa->vertex_dma_buffer) - { - imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); - } - else if (imesa->vertex_dma_buffer->used + bytes > - imesa->vertex_dma_buffer->total) + if (imesa->vertex_low + bytes > imesa->vertex_high) { + i830FlushPrimsGetBufferLocked( imesa ); + } + { - i830FlushVerticesLocked( imesa ); - imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); + GLuint *start = (GLuint *)(imesa->vertex_addr + imesa->vertex_low); + imesa->vertex_low += bytes; + return start; } - - start = (GLuint *)((char *)imesa->vertex_dma_buffer->address + - imesa->vertex_dma_buffer->used); - - imesa->vertex_dma_buffer->used += bytes; - return start; } + #endif Index: xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c:removed --- xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c Thu Feb 27 12:26:26 2003 @@ -1,145 +0,0 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - -/* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell - */ - -#include - -#include "types.h" -#include "fog.h" - -#include "i830_drv.h" - -static struct gl_pipeline_stage i830_fast_stage = { - "i830 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, - i830DDFastPath -}; - - -#define ILLEGAL_ENABLES (TEXTURE0_3D| \ - TEXTURE1_3D| \ - ENABLE_TEXMAT0 | \ - ENABLE_TEXMAT1 | \ - ENABLE_TEXGEN0 | \ - ENABLE_TEXGEN1 | \ - 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 i830DDBuildPrecalcPipeline( GLcontext *ctx ) -{ - i830ContextPtr imesa = I830_CONTEXT( ctx ); - struct gl_pipeline *pipe = &ctx->CVA.pre; - - if (imesa->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] = &i830_fast_stage; - pipe->stages[1] = 0; - pipe->new_inputs = ctx->RenderFlags & VERT_DATA; - pipe->ops = pipe->stages[0]->ops; - imesa->using_fast_path = 1; - return 1; - } - - if (imesa->using_fast_path) - { - imesa->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; -} - - - -GLuint i830DDRegisterPipelineStages( 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_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 = i830DDCheckPartialRasterSetup; - out[o].run = i830DDPartialRasterSetup; - o++; - break; - - case PIPE_OP_RAST_SETUP_0|PIPE_OP_RAST_SETUP_1: - out[o] = in[i]; - out[o].run = i830DDDoRasterSetup; - o++; - break; - - /* 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; - - - default: - out[o++] = in[i]; - break; - } - } - - return o; -} - - Index: xc/lib/GL/mesa/src/drv/i830/i830_render.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_render.c:1.2 --- /dev/null Thu Feb 27 12:26:26 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_render.c Mon Dec 9 20:26:53 2002 @@ -0,0 +1,268 @@ +/* + * Intel i810 DRI driver for Mesa 3.5 + * + * Copyright (C) 1999-2000 Keith Whitwell 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 KEITH WHITWELL 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. + * + * Author: + * Keith Whitwell + * Adapted for use on the I830: + * Jeff Hartmann + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_render.c,v 1.2 2002/12/10 01:26:53 dawes Exp $ */ + +/* + * Render unclipped vertex buffers by emitting vertices directly to + * dma buffers. Use strip/fan hardware acceleration where possible. + * + */ +#include "glheader.h" +#include "context.h" +#include "macros.h" +#include "mem.h" +#include "mtypes.h" +#include "enums.h" +#include "mmath.h" + +#include "tnl/t_context.h" + +#include "i830_screen.h" +#include "i830_dri.h" + +#include "i830_context.h" +#include "i830_tris.h" +#include "i830_state.h" +#include "i830_vb.h" +#include "i830_ioctl.h" + +/* + * Render unclipped vertex buffers by emitting vertices directly to + * dma buffers. Use strip/fan hardware primitives where possible. + * Try to simulate missing primitives with indexed vertices. + */ +#define HAVE_POINTS 0 /* Has it, but can't use because subpixel has to + * be adjusted for points on the I830/I845G + */ +#define HAVE_LINES 1 +#define HAVE_LINE_STRIPS 1 +#define HAVE_TRIANGLES 1 +#define HAVE_TRI_STRIPS 1 +#define HAVE_TRI_STRIP_1 0 /* has it, template can't use it yet */ +#define HAVE_TRI_FANS 1 +#define HAVE_POLYGONS 1 +#define HAVE_QUADS 0 +#define HAVE_QUAD_STRIPS 0 + +#define HAVE_ELTS 0 + +static GLuint hw_prim[GL_POLYGON+1] = { + 0, + PRIM3D_LINELIST, + PRIM3D_LINESTRIP, + PRIM3D_LINESTRIP, + PRIM3D_TRILIST, + PRIM3D_TRISTRIP, + PRIM3D_TRIFAN, + 0, + 0, + PRIM3D_POLY +}; + +static const GLenum reduced_prim[GL_POLYGON+1] = { + GL_POINTS, + GL_LINES, + GL_LINES, + GL_LINES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES +}; + +static const int scale_prim[GL_POLYGON+1] = { + 0, /* fallback case */ + 1, + 2, + 2, + 1, + 3, + 3, + 0, /* fallback case */ + 0, /* fallback case */ + 3 +}; + +/* Fallback to normal rendering. Should now never be called. + */ +static void VERT_FALLBACK( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.PrimitiveNotify( ctx, flags & PRIM_MODE_MASK ); + tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 ); + tnl->Driver.Render.PrimTabVerts[flags&PRIM_MODE_MASK]( ctx, start, + count, flags ); + I830_CONTEXT(ctx)->SetupNewInputs = VERT_CLIP; +} + + +#define LOCAL_VARS i830ContextPtr imesa = I830_CONTEXT(ctx) +#define INIT( prim ) do { \ + I830_STATECHANGE(imesa, 0); \ + i830RasterPrimitive( ctx, reduced_prim[prim], hw_prim[prim] ); \ +} while (0) + +#define NEW_PRIMITIVE() I830_STATECHANGE( imesa, 0 ) +#define NEW_BUFFER() I830_FIREVERTICES( imesa ) +#define GET_CURRENT_VB_MAX_VERTS() \ + (((int)imesa->vertex_high - (int)imesa->vertex_low) / (imesa->vertex_size*4)) +#define GET_SUBSEQUENT_VB_MAX_VERTS() \ + (I830_DMA_BUF_SZ-8) / (imesa->vertex_size * 4) + +#define EMIT_VERTS( ctx, j, nr ) \ + i830_emit_contiguous_verts(ctx, j, (j)+(nr)) + +#define TAG(x) i830_##x +#include "tnl_dd/t_dd_dmatmp.h" + + +/**********************************************************************/ +/* Render pipeline stage */ +/**********************************************************************/ + +/* Heuristic for i830, which can only emit a single primitive per dma + * buffer, and has only a small number of dma buffers. + */ +static GLboolean choose_render( struct vertex_buffer *VB, int bufsz ) +{ + int nr_prims = 0; + int nr_rprims = 0; + int nr_rverts = 0; + int rprim = 0; + int i = 0, length, flags = 0; + + + for (i = VB->FirstPrimitive ; !(flags & PRIM_LAST) ; i += length) { + flags = VB->Primitive[i]; + length = VB->PrimitiveLength[i]; + if (!length) + continue; + + if (!hw_prim[flags & PRIM_MODE_MASK]) + return GL_FALSE; + + nr_prims++; + nr_rverts += length * scale_prim[flags & PRIM_MODE_MASK]; + + if (reduced_prim[flags&PRIM_MODE_MASK] != rprim) { + nr_rprims++; + rprim = reduced_prim[flags&PRIM_MODE_MASK]; + } + } + + nr_prims += i / bufsz; + nr_rprims += nr_rverts / bufsz; + + if ((nr_prims > nr_rprims * 2) || + (nr_prims > nr_rprims + 3)) + return GL_FALSE; + + return GL_TRUE; +} + + +static GLboolean i830_run_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint i, length, flags = 0; + /* Don't handle clipping or indexed vertices. + */ + if (VB->ClipOrMask || imesa->RenderIndex != 0 || VB->Elts || + !choose_render( VB, GET_SUBSEQUENT_VB_MAX_VERTS() )) { + return GL_TRUE; + } + + imesa->SetupNewInputs = VERT_CLIP; + + tnl->Driver.Render.Start( ctx ); + + for (i = VB->FirstPrimitive ; !(flags & PRIM_LAST) ; i += length) { + flags = VB->Primitive[i]; + length= VB->PrimitiveLength[i]; + if (length) + i830_render_tab_verts[flags & PRIM_MODE_MASK]( ctx, i, i + length, + flags ); + } + + tnl->Driver.Render.Finish( ctx ); + + return GL_FALSE; /* finished the pipe */ +} + + +static void i830_check_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + GLuint inputs = VERT_CLIP|VERT_RGBA; + if (ctx->RenderMode == GL_RENDER) { + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + inputs |= VERT_SPEC_RGB; + + if (ctx->Texture.Unit[0]._ReallyEnabled) + inputs |= VERT_TEX(0); + + if (ctx->Texture.Unit[1]._ReallyEnabled) + inputs |= VERT_TEX(1); + + if (ctx->Fog.Enabled) + inputs |= VERT_FOG_COORD; + } + + stage->inputs = inputs; +} + +static void dtr( struct gl_pipeline_stage *stage ) +{ + (void)stage; +} + + +const struct gl_pipeline_stage _i830_render_stage = +{ + "i830 render", + (_DD_NEW_SEPARATE_SPECULAR | + _NEW_TEXTURE| + _NEW_FOG| + _NEW_RENDERMODE), /* re-check (new inputs) */ + 0, /* re-run (always runs) */ + GL_TRUE, /* active */ + 0, 0, /* inputs (set in check_render), outputs */ + 0, 0, /* changed_inputs, private */ + dtr, /* destructor */ + i830_check_render, /* check - initially set to alloc data */ + i830_run_render /* run */ +}; Index: xc/lib/GL/mesa/src/drv/i830/i830_screen.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_screen.c:1.3 --- /dev/null Thu Feb 27 12:26:26 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_screen.c Mon Dec 9 20:26:53 2002 @@ -0,0 +1,393 @@ +/************************************************************************** + * + * 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/i830/i830_screen.c,v 1.3 2002/12/10 01:26:53 dawes Exp $ */ + +/* + * Authors: + * Keith Whitwell + * Adapted for use on the I830M: + * Jeff Hartmann + */ + + +#include +#include + + +#include +#include + +#include "glheader.h" +#include "context.h" +#include "matrix.h" +#include "simple_list.h" + +#include "i830_screen.h" +#include "i830_dri.h" + +#include "i830_state.h" +#include "i830_tex.h" +#include "i830_span.h" +#include "i830_tris.h" +#include "i830_ioctl.h" + +#include "i830_dri.h" + + +static int i830_malloc_proxy_buf(drmBufMapPtr buffers) +{ + char *buffer; + drmBufPtr buf; + int i; + + buffer = Xmalloc(I830_DMA_BUF_SZ); + if(buffer == NULL) return -1; + for(i = 0; i < I830_DMA_BUF_NR; i++) { + buf = &(buffers->list[i]); + buf->address = (drmAddress)buffer; + } + + return 0; +} + +static drmBufMapPtr i830_create_empty_buffers(void) +{ + drmBufMapPtr retval; + + retval = (drmBufMapPtr)Xmalloc(sizeof(drmBufMap)); + if(retval == NULL) return NULL; + memset(retval, 0, sizeof(drmBufMap)); + retval->list = (drmBufPtr)Xmalloc(sizeof(drmBuf) * I830_DMA_BUF_NR); + if(retval->list == NULL) { + Xfree(retval); + return NULL; + } + + memset(retval->list, 0, sizeof(drmBuf) * I830_DMA_BUF_NR); + return retval; +} + +static void i830PrintDRIInfo(i830ScreenPrivate *i830Screen, + __DRIscreenPrivate *sPriv, + I830DRIPtr gDRIPriv) +{ + GLuint size = (gDRIPriv->ringSize + + i830Screen->textureSize + + i830Screen->depth.size + + i830Screen->back.size + + sPriv->fbSize + + I830_DMA_BUF_NR * I830_DMA_BUF_SZ + + 32768 /* Context Memory */ + + 16*4096 /* Ring buffer */ + + 64*1024 /* Scratch buffer */ + + 4096 /* Cursor */); + GLuint size_low = (gDRIPriv->ringSize + + i830Screen->textureSize + + sPriv->fbSize + + I830_DMA_BUF_NR * I830_DMA_BUF_SZ + + 32768 /* Context Memory */ + + 16*4096 /* Ring buffer */ + + 64*1024 /* Scratch buffer */); + + fprintf(stderr, "\nFront size : 0x%x\n", sPriv->fbSize); + fprintf(stderr, "Front offset : 0x%x\n", i830Screen->fbOffset); + fprintf(stderr, "Back size : 0x%x\n", i830Screen->back.size); + fprintf(stderr, "Back offset : 0x%x\n", i830Screen->backOffset); + fprintf(stderr, "Depth size : 0x%x\n", i830Screen->depth.size); + fprintf(stderr, "Depth offset : 0x%x\n", i830Screen->depthOffset); + fprintf(stderr, "Texture size : 0x%x\n", i830Screen->textureSize); + fprintf(stderr, "Texture offset : 0x%x\n", i830Screen->textureOffset); + fprintf(stderr, "Ring offset : 0x%x\n", gDRIPriv->ringOffset); + fprintf(stderr, "Ring size : 0x%x\n", gDRIPriv->ringSize); + fprintf(stderr, "Memory : 0x%x\n", gDRIPriv->mem); + fprintf(stderr, "Used Memory : low(0x%x) high(0x%x)\n", size_low, size); +} + +static GLboolean i830InitDriver(__DRIscreenPrivate *sPriv) +{ + i830ScreenPrivate *i830Screen; + I830DRIPtr gDRIPriv = (I830DRIPtr)sPriv->pDevPriv; + + /* Check the DRI version */ + { + int major, minor, patch; + if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) { + if (major != 4 || minor < 0) { + __driUtilMessage("i830 DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); + return GL_FALSE; + } + } + } + + /* Check that the DDX driver version is compatible */ + if (sPriv->ddxMajor != 1 || sPriv->ddxMinor < 0) { + __driUtilMessage("i830 DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if (sPriv->drmMajor != 1 || sPriv->drmMinor < 3) { + __driUtilMessage("i830 DRI driver expected DRM driver version 1.3.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); + return GL_FALSE; + } + + /* Allocate the private area */ + i830Screen = (i830ScreenPrivate *)Xmalloc(sizeof(i830ScreenPrivate)); + if (!i830Screen) { + fprintf(stderr,"\nERROR! Allocating private area failed\n"); + return GL_FALSE; + } + + i830Screen->driScrnPriv = sPriv; + sPriv->private = (void *)i830Screen; + + i830Screen->deviceID = gDRIPriv->deviceID; + i830Screen->width = gDRIPriv->width; + i830Screen->height = gDRIPriv->height; + i830Screen->mem = gDRIPriv->mem; + i830Screen->cpp = gDRIPriv->cpp; + i830Screen->fbStride = gDRIPriv->fbStride; + i830Screen->fbOffset = gDRIPriv->fbOffset; + + switch (gDRIPriv->bitsPerPixel) { + case 15: i830Screen->fbFormat = DV_PF_555; break; + case 16: i830Screen->fbFormat = DV_PF_565; break; + case 32: i830Screen->fbFormat = DV_PF_8888; break; + } + + i830Screen->backOffset = gDRIPriv->backOffset; + i830Screen->depthOffset = gDRIPriv->depthOffset; + i830Screen->backPitch = gDRIPriv->auxPitch; + i830Screen->backPitchBits = gDRIPriv->auxPitchBits; + i830Screen->textureOffset = gDRIPriv->textureOffset; + i830Screen->textureSize = gDRIPriv->textureSize; + i830Screen->logTextureGranularity = gDRIPriv->logTextureGranularity; + + + i830Screen->bufs = i830_create_empty_buffers(); + if(i830Screen->bufs == NULL) { + fprintf(stderr,"\nERROR: Failed to create empty buffers in %s \n", + __FUNCTION__); + Xfree(i830Screen); + return GL_FALSE; + } + + /* Check if you need to create a fake buffer */ + if(i830_check_copy(sPriv->fd) == 1) { + i830_malloc_proxy_buf(i830Screen->bufs); + i830Screen->use_copy_buf = 1; + } else { + i830Screen->use_copy_buf = 0; + } + + i830Screen->back.handle = gDRIPriv->backbuffer; + i830Screen->back.size = gDRIPriv->backbufferSize; + + if (drmMap(sPriv->fd, + i830Screen->back.handle, + i830Screen->back.size, + (drmAddress *)&i830Screen->back.map) != 0) { + fprintf(stderr, "\nERROR: line %d, Function %s, File %s\n", + __LINE__, __FUNCTION__, __FILE__); + Xfree(i830Screen); + sPriv->private = NULL; + return GL_FALSE; + } + + i830Screen->depth.handle = gDRIPriv->depthbuffer; + i830Screen->depth.size = gDRIPriv->depthbufferSize; + + if (drmMap(sPriv->fd, + i830Screen->depth.handle, + i830Screen->depth.size, + (drmAddress *)&i830Screen->depth.map) != 0) { + fprintf(stderr, "\nERROR: line %d, Function %s, File %s\n", + __LINE__, __FUNCTION__, __FILE__); + Xfree(i830Screen); + drmUnmap(i830Screen->back.map, i830Screen->back.size); + sPriv->private = NULL; + return GL_FALSE; + } + + i830Screen->tex.handle = gDRIPriv->textures; + i830Screen->tex.size = gDRIPriv->textureSize; + + if (drmMap(sPriv->fd, + i830Screen->tex.handle, + i830Screen->tex.size, + (drmAddress *)&i830Screen->tex.map) != 0) { + fprintf(stderr, "\nERROR: line %d, Function %s, File %s\n", + __LINE__, __FUNCTION__, __FILE__); + Xfree(i830Screen); + drmUnmap(i830Screen->back.map, i830Screen->back.size); + drmUnmap(i830Screen->depth.map, i830Screen->depth.size); + sPriv->private = NULL; + return GL_FALSE; + } + + i830Screen->sarea_priv_offset = gDRIPriv->sarea_priv_offset; + + if (0) i830PrintDRIInfo(i830Screen, sPriv, gDRIPriv); + + i830Screen->drmMinor = sPriv->drmMinor; + + if (sPriv->drmMinor >= 3) { + int ret; + drmI830GetParam gp; + + gp.param = I830_PARAM_IRQ_ACTIVE; + gp.value = &i830Screen->irq_active; + + ret = drmCommandWriteRead( sPriv->fd, DRM_I830_GETPARAM, + &gp, sizeof(gp)); + if (ret) { + fprintf(stderr, "drmI830GetParam: %d\n", ret); + return GL_FALSE; + } + } + + return GL_TRUE; +} + + +static void i830DestroyScreen(__DRIscreenPrivate *sPriv) +{ + i830ScreenPrivate *i830Screen = (i830ScreenPrivate *)sPriv->private; + + /* Need to unmap all the bufs and maps here: + */ + drmUnmap(i830Screen->back.map, i830Screen->back.size); + drmUnmap(i830Screen->depth.map, i830Screen->depth.size); + drmUnmap(i830Screen->tex.map, i830Screen->tex.size); + Xfree(i830Screen); + sPriv->private = NULL; +} + +static GLboolean i830CreateBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap ) +{ + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } else { +#if 0 + GLboolean swStencil = (mesaVis->stencilBits > 0 && + mesaVis->depthBits != 24); +#else + GLboolean swStencil = mesaVis->stencilBits > 0; +#endif + driDrawPriv->driverPrivate = (void *) + _mesa_create_framebuffer(mesaVis, + GL_FALSE, /* software depth buffer? */ + swStencil, + mesaVis->accumRedBits > 0, + GL_FALSE /* s/w alpha planes */); + + return (driDrawPriv->driverPrivate != NULL); + } +} + +static void i830DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +{ + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); +} + +static GLboolean i830OpenFullScreen (__DRIcontextPrivate *driContextPriv) +{ + return GL_TRUE; +} + +static GLboolean i830CloseFullScreen (__DRIcontextPrivate *driContextPriv) +{ + return GL_TRUE; +} + +static struct __DriverAPIRec i830API = { + i830InitDriver, + i830DestroyScreen, + i830CreateContext, + i830DestroyContext, + i830CreateBuffer, + i830DestroyBuffer, + i830SwapBuffers, + i830MakeCurrent, + i830UnbindContext, + i830OpenFullScreen, + i830CloseFullScreen +}; + +/* + * This is the bootstrap function for the driver. + * The __driCreateScreen name is the symbol that libGL.so fetches. + * Return: pointer to a __DRIscreenPrivate. + */ +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) +{ + __DRIscreenPrivate *psp; + psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &i830API); + return (void *) psp; +} + + +/* 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. + * + * Note: Most of these are probably already registered - just doing + * this for the benefit of old libGL.so's out there. + */ +#include "glapioffsets.h" + +void __driRegisterExtensions( void ) +{ + int i; + static struct { const char *name; int offset; } funcs[] = { + { "glSecondaryColor3bEXT", _gloffset_SecondaryColor3bEXT }, + { "glSecondaryColor3dEXT", _gloffset_SecondaryColor3dEXT }, + { "glSecondaryColor3fEXT", _gloffset_SecondaryColor3fEXT }, + { "glSecondaryColor3iEXT", _gloffset_SecondaryColor3iEXT }, + { "glSecondaryColor3sEXT", _gloffset_SecondaryColor3sEXT }, + { "glSecondaryColor3ubEXT", _gloffset_SecondaryColor3ubEXT }, + { "glSecondaryColor3uiEXT", _gloffset_SecondaryColor3uiEXT }, + { "glSecondaryColor3usEXT", _gloffset_SecondaryColor3usEXT }, + { "glSecondaryColor3bvEXT", _gloffset_SecondaryColor3bvEXT }, + { "glSecondaryColor3dvEXT", _gloffset_SecondaryColor3dvEXT }, + { "glSecondaryColor3fvEXT", _gloffset_SecondaryColor3fvEXT }, + { "glSecondaryColor3ivEXT", _gloffset_SecondaryColor3ivEXT }, + { "glSecondaryColor3svEXT", _gloffset_SecondaryColor3svEXT }, + { "glSecondaryColor3ubvEXT", _gloffset_SecondaryColor3ubvEXT }, + { "glSecondaryColor3uivEXT", _gloffset_SecondaryColor3uivEXT }, + { "glSecondaryColor3usvEXT", _gloffset_SecondaryColor3usvEXT }, + { "glSecondaryColorPointerEXT", _gloffset_SecondaryColorPointerEXT } + }; + + for (i = 0 ; i < sizeof(funcs) / sizeof(*funcs) ; i++ ) + _glapi_add_entrypoint( funcs[i].name, funcs[i].offset ); +} + Index: xc/lib/GL/mesa/src/drv/i830/i830_screen.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_screen.h:1.2 --- /dev/null Thu Feb 27 12:26:26 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_screen.h Mon Dec 9 20:26:53 2002 @@ -0,0 +1,107 @@ +/************************************************************************** + +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: + * Keith Whitwell + * Adapted for use on the I830M: + * Jeff Hartmann + */ + +#ifndef _I830_INIT_H_ +#define _I830_INIT_H_ + +#include +#include "dri_util.h" + + +typedef struct { + drmHandle handle; + drmSize size; + char *map; +} i830Region, *i830RegionPtr; + +typedef struct +{ + + i830Region front; + i830Region back; + i830Region depth; + i830Region tex; + + int deviceID; + int width; + int height; + int mem; + + int cpp; /* for front and back buffers */ + int bitsPerPixel; + + int fbFormat; + int fbOffset; + int fbStride; + + int backOffset; + int depthOffset; + + int backPitch; + int backPitchBits; + + int textureOffset; + int textureSize; + int logTextureGranularity; + + __DRIscreenPrivate *driScrnPriv; + drmBufMapPtr bufs; + int use_copy_buf; + unsigned int sarea_priv_offset; + + int drmMinor; + int irq_active; +}i830ScreenPrivate; + + +extern GLboolean +i830CreateContext( Display *dpy, const __GLcontextModes *mesaVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ); + +extern void +i830DestroyContext(__DRIcontextPrivate *driContextPriv); + +extern GLboolean +i830UnbindContext(__DRIcontextPrivate *driContextPriv); + +extern GLboolean +i830MakeCurrent(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv); + +extern void +i830SwapBuffers(Display *dpy, void *drawablePrivate); + +#endif Index: xc/lib/GL/mesa/src/drv/i830/i830_span.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_span.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_span.c:1.4 --- xc/lib/GL/mesa/src/drv/i830/i830_span.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_span.c Mon Dec 9 20:26:53 2002 @@ -25,50 +25,59 @@ **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_span.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_span.c,v 1.4 2002/12/10 01:26:53 dawes Exp $ */ /* * Author: - * Jeff Hartmann + * Jeff Hartmann * * Heavily based on the I810 driver, which was written by: - * Keith Whitwell + * Keith Whitwell */ -#include "types.h" +#include "glheader.h" +#include "macros.h" +#include "mtypes.h" -#include "i830_drv.h" +#include "i830_screen.h" +#include "i830_dri.h" + +#include "i830_span.h" #include "i830_ioctl.h" +#include "swrast/swrast.h" #define DBG 0 -#define LOCAL_VARS \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ - i830ScreenPrivate *i830Screen = imesa->i830Screen; \ +#define LOCAL_VARS \ + i830ContextPtr imesa = I830_CONTEXT(ctx); \ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + i830ScreenPrivate *i830Screen = imesa->i830Screen; \ GLuint pitch = i830Screen->backPitch * i830Screen->cpp; \ - GLuint height = dPriv->h; \ - char *buf = (char *)(imesa->drawMap + \ - dPriv->x * i830Screen->cpp + \ - dPriv->y * pitch); \ - char *read_buf = (char *)(imesa->readMap + \ - dPriv->x * i830Screen->cpp + \ - dPriv->y * pitch); \ - GLushort p = I830_CONTEXT( ctx )->MonoColor; \ + GLuint height = dPriv->h; \ + char *buf = (char *)(imesa->drawMap + \ + dPriv->x * i830Screen->cpp + \ + dPriv->y * pitch); \ + char *read_buf = (char *)(imesa->readMap + \ + dPriv->x * i830Screen->cpp + \ + dPriv->y * pitch); \ + GLushort p; \ (void) read_buf; (void) buf; (void) p -#define LOCAL_DEPTH_VARS \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ - i830ScreenPrivate *i830Screen = imesa->i830Screen; \ +#define LOCAL_DEPTH_VARS \ + i830ContextPtr imesa = I830_CONTEXT(ctx); \ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + i830ScreenPrivate *i830Screen = imesa->i830Screen; \ GLuint pitch = i830Screen->backPitch * i830Screen->cpp; \ - GLuint height = dPriv->h; \ - char *buf = (char *)(i830Screen->depth.map + \ - dPriv->x * i830Screen->cpp + \ + GLuint height = dPriv->h; \ + char *buf = (char *)(i830Screen->depth.map + \ + dPriv->x * i830Screen->cpp + \ dPriv->y * pitch) #define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS -#define INIT_MONO_PIXEL(p) +#define INIT_MONO_PIXEL(p,color)\ + p = PACK_COLOR_565(color[0],color[1],color[2]) #define CLIPPIXEL(_x,_y) (_x >= minx && _x < maxx && \ _y >= miny && _y < maxy) @@ -86,11 +95,7 @@ #define Y_FLIP(_y) (height - _y - 1) -#define HW_LOCK() \ - i830ContextPtr imesa = I830_CONTEXT(ctx); \ - FLUSH_BATCH(imesa); \ - i830DmaFinish(imesa); \ - LOCK_HARDWARE_QUIESCENT(imesa); +#define HW_LOCK() #define HW_CLIPLOOP() \ do { \ @@ -107,12 +112,8 @@ } \ } while (0) -#define HW_UNLOCK() \ - UNLOCK_HARDWARE(imesa); +#define HW_UNLOCK() - - - /* 16 bit, 565 rgb color spanline and pixel functions */ #define WRITE_RGBA( _x, _y, r, g, b, a ) \ @@ -167,7 +168,6 @@ #define READ_DEPTH( d, _x, _y ) \ d = *(GLushort *)(buf + _x*2 + _y*pitch); -/* d = 0xffff; */ #define TAG(x) i830##x##_16 #include "depthtmp.h" @@ -175,6 +175,7 @@ #undef LOCAL_VARS #define LOCAL_VARS \ + i830ContextPtr imesa = I830_CONTEXT(ctx); \ __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ i830ScreenPrivate *i830Screen = imesa->i830Screen; \ GLuint pitch = i830Screen->backPitch * i830Screen->cpp; \ @@ -188,6 +189,9 @@ GLuint p = I830_CONTEXT( ctx )->MonoColor; \ (void) read_buf; (void) buf; (void) p +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p,color)\ + p = PACK_COLOR_888(color[0],color[1],color[2]) /* 32 bit, 8888 argb color spanline and pixel functions */ @@ -258,76 +262,116 @@ #define TAG(x) i830##x##_24_8 #include "stenciltmp.h" +static void i830SetReadBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, + GLenum mode) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + switch( mode ) { + case GL_FRONT_LEFT: + if ( imesa->sarea->pf_current_page == 1 ) + imesa->readMap = imesa->i830Screen->back.map; + else + imesa->readMap = (char*)imesa->driScreen->pFB; + break; + case GL_BACK_LEFT: + if ( imesa->sarea->pf_current_page == 1 ) + imesa->readMap = (char*)imesa->driScreen->pFB; + else + imesa->readMap = imesa->i830Screen->back.map; + break; + default: + ASSERT(0); + break; + } +} + + + +/* Move locking out to get reasonable span performance. + */ +void i830SpanRenderStart( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + I830_FIREVERTICES(imesa); + LOCK_HARDWARE(imesa); + i830RegetLockQuiescent( imesa ); +} +void i830SpanRenderFinish( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + _swrast_flush( ctx ); + UNLOCK_HARDWARE( imesa ); +} + void i830DDInitSpanFuncs( GLcontext *ctx ) { i830ContextPtr imesa = I830_CONTEXT(ctx); i830ScreenPrivate *i830Screen = imesa->i830Screen; + struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); + + swdd->SetReadBuffer = i830SetReadBuffer; + switch (i830Screen->fbFormat) { case DV_PF_555: - ctx->Driver.WriteRGBASpan = i830WriteRGBASpan_555; - ctx->Driver.WriteRGBSpan = i830WriteRGBSpan_555; - ctx->Driver.WriteMonoRGBASpan = i830WriteMonoRGBASpan_555; - ctx->Driver.WriteRGBAPixels = i830WriteRGBAPixels_555; - ctx->Driver.WriteMonoRGBAPixels = i830WriteMonoRGBAPixels_555; - ctx->Driver.ReadRGBASpan = i830ReadRGBASpan_555; - ctx->Driver.ReadRGBAPixels = i830ReadRGBAPixels_555; - - ctx->Driver.ReadDepthSpan = i830ReadDepthSpan_16; - ctx->Driver.WriteDepthSpan = i830WriteDepthSpan_16; - ctx->Driver.ReadDepthPixels = i830ReadDepthPixels_16; - ctx->Driver.WriteDepthPixels = i830WriteDepthPixels_16; + swdd->WriteRGBASpan = i830WriteRGBASpan_555; + swdd->WriteRGBSpan = i830WriteRGBSpan_555; + swdd->WriteMonoRGBASpan = i830WriteMonoRGBASpan_555; + swdd->WriteRGBAPixels = i830WriteRGBAPixels_555; + swdd->WriteMonoRGBAPixels = i830WriteMonoRGBAPixels_555; + swdd->ReadRGBASpan = i830ReadRGBASpan_555; + swdd->ReadRGBAPixels = i830ReadRGBAPixels_555; + + swdd->ReadDepthSpan = i830ReadDepthSpan_16; + swdd->WriteDepthSpan = i830WriteDepthSpan_16; + swdd->ReadDepthPixels = i830ReadDepthPixels_16; + swdd->WriteDepthPixels = i830WriteDepthPixels_16; break; case DV_PF_565: - ctx->Driver.WriteRGBASpan = i830WriteRGBASpan_565; - ctx->Driver.WriteRGBSpan = i830WriteRGBSpan_565; - ctx->Driver.WriteMonoRGBASpan = i830WriteMonoRGBASpan_565; - ctx->Driver.WriteRGBAPixels = i830WriteRGBAPixels_565; - ctx->Driver.WriteMonoRGBAPixels = i830WriteMonoRGBAPixels_565; - ctx->Driver.ReadRGBASpan = i830ReadRGBASpan_565; - ctx->Driver.ReadRGBAPixels = i830ReadRGBAPixels_565; - - ctx->Driver.ReadDepthSpan = i830ReadDepthSpan_16; - ctx->Driver.WriteDepthSpan = i830WriteDepthSpan_16; - ctx->Driver.ReadDepthPixels = i830ReadDepthPixels_16; - ctx->Driver.WriteDepthPixels = i830WriteDepthPixels_16; + swdd->WriteRGBASpan = i830WriteRGBASpan_565; + swdd->WriteRGBSpan = i830WriteRGBSpan_565; + swdd->WriteMonoRGBASpan = i830WriteMonoRGBASpan_565; + swdd->WriteRGBAPixels = i830WriteRGBAPixels_565; + swdd->WriteMonoRGBAPixels = i830WriteMonoRGBAPixels_565; + swdd->ReadRGBASpan = i830ReadRGBASpan_565; + swdd->ReadRGBAPixels = i830ReadRGBAPixels_565; + + swdd->ReadDepthSpan = i830ReadDepthSpan_16; + swdd->WriteDepthSpan = i830WriteDepthSpan_16; + swdd->ReadDepthPixels = i830ReadDepthPixels_16; + swdd->WriteDepthPixels = i830WriteDepthPixels_16; break; case DV_PF_8888: - ctx->Driver.WriteRGBASpan = i830WriteRGBASpan_8888; - ctx->Driver.WriteRGBSpan = i830WriteRGBSpan_8888; - ctx->Driver.WriteMonoRGBASpan = i830WriteMonoRGBASpan_8888; - ctx->Driver.WriteRGBAPixels = i830WriteRGBAPixels_8888; - ctx->Driver.WriteMonoRGBAPixels = i830WriteMonoRGBAPixels_8888; - ctx->Driver.ReadRGBASpan = i830ReadRGBASpan_8888; - ctx->Driver.ReadRGBAPixels = i830ReadRGBAPixels_8888; + swdd->WriteRGBASpan = i830WriteRGBASpan_8888; + swdd->WriteRGBSpan = i830WriteRGBSpan_8888; + swdd->WriteMonoRGBASpan = i830WriteMonoRGBASpan_8888; + swdd->WriteRGBAPixels = i830WriteRGBAPixels_8888; + swdd->WriteMonoRGBAPixels = i830WriteMonoRGBAPixels_8888; + swdd->ReadRGBASpan = i830ReadRGBASpan_8888; + swdd->ReadRGBAPixels = i830ReadRGBAPixels_8888; if(imesa->hw_stencil) { - ctx->Driver.ReadDepthSpan = i830ReadDepthSpan_24_8; - ctx->Driver.WriteDepthSpan = i830WriteDepthSpan_24_8; - ctx->Driver.ReadDepthPixels = i830ReadDepthPixels_24_8; - ctx->Driver.WriteDepthPixels = i830WriteDepthPixels_24_8; - - ctx->Driver.WriteStencilSpan = i830WriteStencilSpan_24_8; - ctx->Driver.ReadStencilSpan = i830ReadStencilSpan_24_8; - ctx->Driver.WriteStencilPixels = i830WriteStencilPixels_24_8; - ctx->Driver.ReadStencilPixels = i830ReadStencilPixels_24_8; + swdd->ReadDepthSpan = i830ReadDepthSpan_24_8; + swdd->WriteDepthSpan = i830WriteDepthSpan_24_8; + swdd->ReadDepthPixels = i830ReadDepthPixels_24_8; + swdd->WriteDepthPixels = i830WriteDepthPixels_24_8; + + swdd->WriteStencilSpan = i830WriteStencilSpan_24_8; + swdd->ReadStencilSpan = i830ReadStencilSpan_24_8; + swdd->WriteStencilPixels = i830WriteStencilPixels_24_8; + swdd->ReadStencilPixels = i830ReadStencilPixels_24_8; } else { - ctx->Driver.ReadDepthSpan = i830ReadDepthSpan_24; - ctx->Driver.WriteDepthSpan = i830WriteDepthSpan_24; - ctx->Driver.ReadDepthPixels = i830ReadDepthPixels_24; - ctx->Driver.WriteDepthPixels = i830WriteDepthPixels_24; + swdd->ReadDepthSpan = i830ReadDepthSpan_24; + swdd->WriteDepthSpan = i830WriteDepthSpan_24; + swdd->ReadDepthPixels = i830ReadDepthPixels_24; + swdd->WriteDepthPixels = i830WriteDepthPixels_24; } 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; + swdd->SpanRenderStart = i830SpanRenderStart; + swdd->SpanRenderFinish = i830SpanRenderFinish; } Index: xc/lib/GL/mesa/src/drv/i830/i830_span.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_span.h:1.2 --- /dev/null Thu Feb 27 12:26:26 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_span.h Tue Sep 10 20:29:26 2002 @@ -0,0 +1,46 @@ +/************************************************************************** + +Copyright 2001 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. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_span.h,v 1.2 2002/09/11 00:29:26 dawes Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#ifndef _I830_SPAN_H +#define _I830_SPAN_H + +extern void i830DDInitSpanFuncs( GLcontext *ctx ); + +extern void i830SpanRenderFinish( GLcontext *ctx ); +extern void i830SpanRenderStart( GLcontext *ctx ); + +#endif Index: xc/lib/GL/mesa/src/drv/i830/i830_state.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_state.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_state.c:1.6 --- xc/lib/GL/mesa/src/drv/i830/i830_state.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_state.c Tue Jan 28 17:47:06 2003 @@ -1,6 +1,6 @@ /************************************************************************** -Copyright 2001 VA Linux Systems Inc., Fremont, California. +Copyright 2001 2d3d Inc., Delray Beach, FL All Rights Reserved. @@ -25,36 +25,48 @@ **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_state.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_state.c,v 1.6 2003/01/28 22:47:06 dawes Exp $ */ /* * Author: - * Jeff Hartmann + * Jeff Hartmann * * Heavily based on the I810 driver, which was written by: - * Keith Whitwell + * Keith Whitwell */ - #include -#include "types.h" +#include "glheader.h" +#include "context.h" +#include "macros.h" #include "enums.h" -#include "pb.h" #include "dd.h" #include "mm.h" + +#include "i830_screen.h" +#include "i830_dri.h" -#include "i830_drv.h" +#include "i830_context.h" +#include "i830_state.h" +#include "i830_tex.h" +#include "i830_vb.h" #include "i830_tris.h" #include "i830_ioctl.h" + +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "swrast_setup/swrast_setup.h" + +#include "tnl/t_pipeline.h" -/* Need to add other formats */ static __inline__ GLuint i830PackColor(GLuint format, GLubyte r, GLubyte g, GLubyte b, GLubyte a) { - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); switch (format) { @@ -69,199 +81,208 @@ return 0; } } - -static void i830DDPointSize(GLcontext *ctx, GLfloat size) -{ - i830ContextPtr imesa = I830_CONTEXT(ctx); - GLint point_size = FloatToInt(size); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - FLUSH_BATCH(imesa); - CLAMP_SELF(point_size, 1, 256); - imesa->dirty |= I830_UPLOAD_CTX; - imesa->Setup[I830_CTXREG_STATE5] &= ~FIXED_POINT_WIDTH_MASK; - imesa->Setup[I830_CTXREG_STATE5] |= (ENABLE_FIXED_POINT_WIDTH | - FIXED_POINT_WIDTH(point_size)); -} -static void i830DDStencilFunc(GLcontext *ctx, GLenum func, GLint ref, - GLuint mask) +static void i830StencilFunc(GLcontext *ctx, GLenum func, GLint ref, + GLuint mask) { i830ContextPtr imesa = I830_CONTEXT(ctx); - GLuint v_mask, w_mask; int test = 0; + mask = mask & 0xff; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s : func: %s, ref : 0x%x, mask: 0x%x\n", __FUNCTION__, - gl_lookup_enum_by_nr(func), ref, mask); + _mesa_lookup_enum_by_nr(func), ref, mask); - FLUSH_BATCH(imesa); - - v_mask = ctx->Stencil.ValueMask & 0xff; - w_mask = ctx->Stencil.WriteMask & 0xff; - switch(func) { - case GL_NEVER: test = COMPAREFUNC_NEVER; break; - case GL_LESS: test = COMPAREFUNC_LESS; break; - case GL_EQUAL: test = COMPAREFUNC_EQUAL; break; - case GL_LEQUAL: test = COMPAREFUNC_LEQUAL; break; - case GL_GREATER: test = COMPAREFUNC_GREATER; break; - case GL_NOTEQUAL: test = COMPAREFUNC_NOTEQUAL; break; - case GL_GEQUAL: test = COMPAREFUNC_GEQUAL; break; - case GL_ALWAYS: test = COMPAREFUNC_ALWAYS; break; - default: break; + case GL_NEVER: + test = COMPAREFUNC_NEVER; + break; + case GL_LESS: + test = COMPAREFUNC_LESS; + break; + case GL_LEQUAL: + test = COMPAREFUNC_LEQUAL; + break; + case GL_GREATER: + test = COMPAREFUNC_GREATER; + break; + case GL_GEQUAL: + test = COMPAREFUNC_GEQUAL; + break; + case GL_NOTEQUAL: + test = COMPAREFUNC_NOTEQUAL; + break; + case GL_EQUAL: + test = COMPAREFUNC_EQUAL; + break; + case GL_ALWAYS: + test = COMPAREFUNC_ALWAYS; + break; + default: + return; } - imesa->dirty |= I830_UPLOAD_CTX; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_STATE4] &= ~MODE4_ENABLE_STENCIL_MASK; imesa->Setup[I830_CTXREG_STATE4] |= (ENABLE_STENCIL_TEST_MASK | - ENABLE_STENCIL_WRITE_MASK | - STENCIL_TEST_MASK(v_mask) | - STENCIL_WRITE_MASK(w_mask)); + ENABLE_STENCIL_WRITE_MASK | + STENCIL_TEST_MASK(mask) | + STENCIL_WRITE_MASK(mask)); imesa->Setup[I830_CTXREG_STENCILTST] &= ~(STENCIL_REF_VALUE_MASK | - ENABLE_STENCIL_TEST_FUNC_MASK); + ENABLE_STENCIL_TEST_FUNC_MASK); imesa->Setup[I830_CTXREG_STENCILTST] |= (ENABLE_STENCIL_REF_VALUE | - ENABLE_STENCIL_TEST_FUNC | - STENCIL_REF_VALUE(ref) | - STENCIL_TEST_FUNC(test)); - - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "%s : state4 : 0x%x, stentst : 0x%x\n", __FUNCTION__, - imesa->Setup[I830_CTXREG_STATE4], - imesa->Setup[I830_CTXREG_STENCILTST]); + ENABLE_STENCIL_TEST_FUNC | + STENCIL_REF_VALUE(ref) | + STENCIL_TEST_FUNC(test)); } -static void i830DDStencilMask(GLcontext *ctx, GLuint mask) +static void i830StencilMask(GLcontext *ctx, GLuint mask) { i830ContextPtr imesa = I830_CONTEXT(ctx); - GLuint v_mask, w_mask; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s : mask 0x%x\n", __FUNCTION__, mask); - - FLUSH_BATCH(imesa); - - v_mask = ctx->Stencil.ValueMask & 0xff; - w_mask = ctx->Stencil.WriteMask & 0xff; - imesa->dirty |= I830_UPLOAD_CTX; + mask = mask & 0xff; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_STATE4] &= ~MODE4_ENABLE_STENCIL_MASK; imesa->Setup[I830_CTXREG_STATE4] |= (ENABLE_STENCIL_TEST_MASK | - ENABLE_STENCIL_WRITE_MASK | - STENCIL_TEST_MASK(v_mask) | - STENCIL_WRITE_MASK(w_mask)); - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "%s : state4 : 0x%x\n", __FUNCTION__, - imesa->Setup[I830_CTXREG_STATE4]); + ENABLE_STENCIL_WRITE_MASK | + STENCIL_TEST_MASK(mask) | + STENCIL_WRITE_MASK(mask)); } -static void i830DDStencilOp(GLcontext *ctx, GLenum fail, GLenum zfail, - GLenum zpass) +static void i830StencilOp(GLcontext *ctx, GLenum fail, GLenum zfail, + GLenum zpass) { i830ContextPtr imesa = I830_CONTEXT(ctx); int fop, dfop, dpop; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s: fail : %s, zfail: %s, zpass : %s\n", __FUNCTION__, - gl_lookup_enum_by_nr(fail), - gl_lookup_enum_by_nr(zfail), - gl_lookup_enum_by_nr(zpass)); + _mesa_lookup_enum_by_nr(fail), + _mesa_lookup_enum_by_nr(zfail), + _mesa_lookup_enum_by_nr(zpass)); - FLUSH_BATCH(imesa); - fop = 0; dfop = 0; dpop = 0; switch(fail) { - case GL_KEEP: fop = STENCILOP_KEEP; break; - case GL_ZERO: fop = STENCILOP_ZERO; break; - case GL_REPLACE: fop = STENCILOP_REPLACE; break; - case GL_INCR: fop = STENCILOP_INCR; break; - case GL_DECR: fop = STENCILOP_DECR; break; - case GL_INVERT: fop = STENCILOP_INVERT; break; - default: break; + case GL_KEEP: + fop = STENCILOP_KEEP; + break; + case GL_ZERO: + fop = STENCILOP_ZERO; + break; + case GL_REPLACE: + fop = STENCILOP_REPLACE; + break; + case GL_INCR: + fop = STENCILOP_INCR; + break; + case GL_DECR: + fop = STENCILOP_DECR; + break; + case GL_INVERT: + fop = STENCILOP_INVERT; + break; + default: + break; } switch(zfail) { - case GL_KEEP: dfop = STENCILOP_KEEP; break; - case GL_ZERO: dfop = STENCILOP_ZERO; break; - case GL_REPLACE: dfop = STENCILOP_REPLACE; break; - case GL_INCR: dfop = STENCILOP_INCR; break; - case GL_DECR: dfop = STENCILOP_DECR; break; - case GL_INVERT: dfop = STENCILOP_INVERT; break; - default: break; + case GL_KEEP: + dfop = STENCILOP_KEEP; + break; + case GL_ZERO: + dfop = STENCILOP_ZERO; + break; + case GL_REPLACE: + dfop = STENCILOP_REPLACE; + break; + case GL_INCR: + dfop = STENCILOP_INCR; + break; + case GL_DECR: + dfop = STENCILOP_DECR; + break; + case GL_INVERT: + dfop = STENCILOP_INVERT; + break; + default: + break; } switch(zpass) { - case GL_KEEP: dpop = STENCILOP_KEEP; break; - case GL_ZERO: dpop = STENCILOP_ZERO; break; - case GL_REPLACE: dpop = STENCILOP_REPLACE; break; - case GL_INCR: dpop = STENCILOP_INCR; break; - case GL_DECR: dpop = STENCILOP_DECR; break; - case GL_INVERT: dpop = STENCILOP_INVERT; break; - default: break; + case GL_KEEP: + dpop = STENCILOP_KEEP; + break; + case GL_ZERO: + dpop = STENCILOP_ZERO; + break; + case GL_REPLACE: + dpop = STENCILOP_REPLACE; + break; + case GL_INCR: + dpop = STENCILOP_INCR; + break; + case GL_DECR: + dpop = STENCILOP_DECR; + break; + case GL_INVERT: + dpop = STENCILOP_INVERT; + break; + default: + break; } - imesa->dirty |= I830_UPLOAD_CTX; + + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_STENCILTST] &= ~(STENCIL_OPS_MASK); imesa->Setup[I830_CTXREG_STENCILTST] |= (ENABLE_STENCIL_PARMS | - STENCIL_FAIL_OP(fop) | - STENCIL_PASS_DEPTH_FAIL_OP(dfop) | - STENCIL_PASS_DEPTH_PASS_OP(dpop)); - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "%s : stentst : 0x%x\n", __FUNCTION__, - imesa->Setup[I830_CTXREG_STENCILTST]); - + STENCIL_FAIL_OP(fop) | + STENCIL_PASS_DEPTH_FAIL_OP(dfop) | + STENCIL_PASS_DEPTH_PASS_OP(dpop)); } -static void i830DDAlphaFunc(GLcontext *ctx, GLenum func, GLclampf ref) +static void i830AlphaFunc(GLcontext *ctx, GLenum func, GLchan ref) { i830ContextPtr imesa = I830_CONTEXT(ctx); int test = 0; - GLubyte tmp_ref; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s %s\n", __FUNCTION__, gl_lookup_enum_by_nr(func)); - - FLOAT_COLOR_TO_UBYTE_COLOR(tmp_ref, ref); - FLUSH_BATCH(imesa); - switch(func) { - case GL_NEVER: - test = COMPAREFUNC_NEVER; + case GL_NEVER: + test = COMPAREFUNC_NEVER; break; - case GL_LESS: - test = COMPAREFUNC_LESS; + case GL_LESS: + test = COMPAREFUNC_LESS; break; - case GL_LEQUAL: - test = COMPAREFUNC_LEQUAL; + case GL_LEQUAL: + test = COMPAREFUNC_LEQUAL; break; - case GL_GREATER: - test = COMPAREFUNC_GREATER; + case GL_GREATER: + test = COMPAREFUNC_GREATER; break; - case GL_GEQUAL: - test = COMPAREFUNC_GEQUAL; + case GL_GEQUAL: + test = COMPAREFUNC_GEQUAL; break; - case GL_NOTEQUAL: - test = COMPAREFUNC_NOTEQUAL; + case GL_NOTEQUAL: + test = COMPAREFUNC_NOTEQUAL; break; - case GL_EQUAL: - test = COMPAREFUNC_EQUAL; + case GL_EQUAL: + test = COMPAREFUNC_EQUAL; break; - case GL_ALWAYS: - test = COMPAREFUNC_ALWAYS; + case GL_ALWAYS: + test = COMPAREFUNC_ALWAYS; break; default: return; } - imesa->dirty |= I830_UPLOAD_CTX; + + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_STATE2] &= ~ALPHA_TEST_REF_MASK; imesa->Setup[I830_CTXREG_STATE2] |= (ENABLE_ALPHA_TEST_FUNC | - ENABLE_ALPHA_REF_VALUE | - ALPHA_TEST_FUNC(test) | - ALPHA_REF_VALUE(tmp_ref)); + ENABLE_ALPHA_REF_VALUE | + ALPHA_TEST_FUNC(test) | + ALPHA_REF_VALUE(ref)); } /* This function makes sure that the proper enables are @@ -274,519 +295,731 @@ { i830ContextPtr imesa = I830_CONTEXT(ctx); - FLUSH_BATCH(imesa); - imesa->dirty |= I830_UPLOAD_CTX; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); - if(ctx->Color.ColorLogicOpEnabled || ctx->Color.IndexLogicOpEnabled) { - imesa->Setup[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | - ENABLE_LOGIC_OP_MASK); - imesa->Setup[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND | - ENABLE_LOGIC_OP); - imesa->Setup[I830_CTXREG_IALPHAB] &= ~ENABLE_INDPT_ALPHA_BLEND; - imesa->Setup[I830_CTXREG_IALPHAB] |= DISABLE_INDPT_ALPHA_BLEND; - } else if(ctx->Color.BlendEnabled) { - imesa->Setup[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | - ENABLE_LOGIC_OP_MASK); - imesa->Setup[I830_CTXREG_ENABLES_1] |= (ENABLE_COLOR_BLEND | - DISABLE_LOGIC_OP); - imesa->Setup[I830_CTXREG_IALPHAB] &= ~ENABLE_INDPT_ALPHA_BLEND; - if(imesa->Setup[I830_CTXREG_IALPHAB] & SRC_DST_ABLEND_MASK) { - imesa->Setup[I830_CTXREG_IALPHAB] |= ENABLE_INDPT_ALPHA_BLEND; - } else { - imesa->Setup[I830_CTXREG_IALPHAB] |= DISABLE_INDPT_ALPHA_BLEND; - } + if (ctx->Color.ColorLogicOpEnabled) { + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | + ENABLE_LOGIC_OP_MASK); + imesa->Setup[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND | + ENABLE_LOGIC_OP); + imesa->Setup[I830_CTXREG_IALPHAB] &= ~ENABLE_INDPT_ALPHA_BLEND; + imesa->Setup[I830_CTXREG_IALPHAB] |= DISABLE_INDPT_ALPHA_BLEND; + } else if (ctx->Color.BlendEnabled) { + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | + ENABLE_LOGIC_OP_MASK); + imesa->Setup[I830_CTXREG_ENABLES_1] |= (ENABLE_COLOR_BLEND | + DISABLE_LOGIC_OP); + imesa->Setup[I830_CTXREG_IALPHAB] &= ~ENABLE_INDPT_ALPHA_BLEND; + if (imesa->Setup[I830_CTXREG_IALPHAB] & SRC_DST_ABLEND_MASK) { + imesa->Setup[I830_CTXREG_IALPHAB] |= ENABLE_INDPT_ALPHA_BLEND; + } else { + imesa->Setup[I830_CTXREG_IALPHAB] |= DISABLE_INDPT_ALPHA_BLEND; + } } else { - imesa->Setup[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | - ENABLE_LOGIC_OP_MASK); - imesa->Setup[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND | - DISABLE_LOGIC_OP); - imesa->Setup[I830_CTXREG_IALPHAB] &= ~ENABLE_INDPT_ALPHA_BLEND; - imesa->Setup[I830_CTXREG_IALPHAB] |= DISABLE_INDPT_ALPHA_BLEND; + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | + ENABLE_LOGIC_OP_MASK); + imesa->Setup[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND | + DISABLE_LOGIC_OP); + imesa->Setup[I830_CTXREG_IALPHAB] &= ~ENABLE_INDPT_ALPHA_BLEND; + imesa->Setup[I830_CTXREG_IALPHAB] |= DISABLE_INDPT_ALPHA_BLEND; } } + +static void i830BlendColor(GLcontext *ctx, const GLfloat color[4]) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLubyte r, g, b, a; + + if (I830_DEBUG&DEBUG_DRI) + fprintf(stderr, "%s\n", __FUNCTION__); + + FLOAT_COLOR_TO_UBYTE_COLOR(r, color[RCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(g, color[GCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(b, color[BCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(a, color[ACOMP]); + + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_BLENDCOLR] = ((a << 24) | + (r << 16) | + (g << 8) | + b); +} -static void i830DDBlendEquation(GLcontext *ctx, GLenum mode) +static void i830BlendEquation(GLcontext *ctx, GLenum mode) { i830ContextPtr imesa = I830_CONTEXT(ctx); int func = ENABLE_ALPHA_BLENDFUNC; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s %s\n", __FUNCTION__, - gl_lookup_enum_by_nr(mode)); + _mesa_lookup_enum_by_nr(mode)); + /* This will catch a logicop blend equation */ i830EvalLogicOpBlendState(ctx); - FLUSH_BATCH(imesa); - switch(mode) { - case GL_FUNC_ADD_EXT: func |= BLENDFUNC_ADD; break; - case GL_MIN_EXT: func |= BLENDFUNC_MIN; break; - case GL_MAX_EXT: func |= BLENDFUNC_MAX; break; - case GL_FUNC_SUBTRACT_EXT: func |= BLENDFUNC_SUB; break; - case GL_FUNC_REVERSE_SUBTRACT_EXT: func |= BLENDFUNC_RVRSE_SUB; break; + case GL_FUNC_ADD_EXT: + func |= BLENDFUNC_ADD; + break; + case GL_MIN_EXT: + func |= BLENDFUNC_MIN; + break; + case GL_MAX_EXT: + func |= BLENDFUNC_MAX; + break; + case GL_FUNC_SUBTRACT_EXT: + func |= BLENDFUNC_SUB; + break; + case GL_FUNC_REVERSE_SUBTRACT_EXT: + func |= BLENDFUNC_RVRSE_SUB; + break; default: return; } - - imesa->dirty |= I830_UPLOAD_CTX; + + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_STATE1] &= ~BLENDFUNC_MASK; imesa->Setup[I830_CTXREG_STATE1] |= func; + if (0) fprintf(stderr, "%s : STATE1 : 0x%08x\n", + __FUNCTION__, + imesa->Setup[I830_CTXREG_STATE1]); } -static void i830DDBlendConstColor(GLcontext *ctx, GLfloat red, - GLfloat green, GLfloat blue, - GLfloat alpha) +static void i830BlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor) { i830ContextPtr imesa = I830_CONTEXT(ctx); - GLubyte r, g, b, a; + int func = (ENABLE_SRC_BLND_FACTOR|ENABLE_DST_BLND_FACTOR); - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); + if (I830_DEBUG&DEBUG_DRI) + fprintf(stderr, "%s %s %s\n", __FUNCTION__, + _mesa_lookup_enum_by_nr(sfactor), + _mesa_lookup_enum_by_nr(dfactor)); - FLOAT_COLOR_TO_UBYTE_COLOR(r, red); - FLOAT_COLOR_TO_UBYTE_COLOR(g, green); - FLOAT_COLOR_TO_UBYTE_COLOR(b, blue); - FLOAT_COLOR_TO_UBYTE_COLOR(a, alpha); + switch(sfactor) { + case GL_ZERO: + func |= SRC_BLND_FACT(BLENDFACT_ZERO); + break; + case GL_SRC_ALPHA: + func |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA); + break; + case GL_ONE: + func |= SRC_BLND_FACT(BLENDFACT_ONE); + break; + case GL_DST_COLOR: + func |= SRC_BLND_FACT(BLENDFACT_DST_COLR); + break; + case GL_ONE_MINUS_DST_COLOR: + func |= SRC_BLND_FACT(BLENDFACT_INV_DST_COLR); + break; + case GL_ONE_MINUS_SRC_ALPHA: + func |= SRC_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); + break; + case GL_DST_ALPHA: + func |= SRC_BLND_FACT(BLENDFACT_DST_ALPHA); + break; + case GL_ONE_MINUS_DST_ALPHA: + func |= SRC_BLND_FACT(BLENDFACT_INV_DST_ALPHA); + break; + case GL_SRC_ALPHA_SATURATE: + func |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA_SATURATE); + break; + case GL_CONSTANT_COLOR_EXT: + func |= SRC_BLND_FACT(BLENDFACT_CONST_COLOR); + break; + case GL_ONE_MINUS_CONSTANT_COLOR_EXT: + func |= SRC_BLND_FACT(BLENDFACT_INV_CONST_COLOR); + break; + case GL_CONSTANT_ALPHA_EXT: + func |= SRC_BLND_FACT(BLENDFACT_CONST_ALPHA); + break; + case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: + func |= SRC_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; + default: + return; + } - imesa->dirty |= I830_UPLOAD_CTX; - imesa->Setup[I830_CTXREG_BLENDCOLR] = ((a << 24) | - (r << 16) | - (g << 8) | - b); + switch(dfactor) { + case GL_SRC_ALPHA: + func |= DST_BLND_FACT(BLENDFACT_SRC_ALPHA); + break; + case GL_ONE_MINUS_SRC_ALPHA: + func |= DST_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); + break; + case GL_ZERO: + func |= DST_BLND_FACT(BLENDFACT_ZERO); + break; + case GL_ONE: + func |= DST_BLND_FACT(BLENDFACT_ONE); + break; + case GL_SRC_COLOR: + func |= DST_BLND_FACT(BLENDFACT_SRC_COLR); + break; + case GL_ONE_MINUS_SRC_COLOR: + func |= DST_BLND_FACT(BLENDFACT_INV_SRC_COLR); + break; + case GL_DST_ALPHA: + func |= DST_BLND_FACT(BLENDFACT_DST_ALPHA); + break; + case GL_ONE_MINUS_DST_ALPHA: + func |= DST_BLND_FACT(BLENDFACT_INV_DST_ALPHA); + break; + case GL_CONSTANT_COLOR_EXT: + func |= DST_BLND_FACT(BLENDFACT_CONST_COLOR); + break; + case GL_ONE_MINUS_CONSTANT_COLOR_EXT: + func |= DST_BLND_FACT(BLENDFACT_INV_CONST_COLOR); + break; + case GL_CONSTANT_ALPHA_EXT: + func |= DST_BLND_FACT(BLENDFACT_CONST_ALPHA); + break; + case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: + func |= DST_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; + default: + return; + } + + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_IALPHAB] &= ~SRC_DST_ABLEND_MASK; + imesa->Setup[I830_CTXREG_STATE1] &= ~SRC_DST_BLND_MASK; + imesa->Setup[I830_CTXREG_STATE1] |= func; + /* Insure Independant Alpha Blend is really disabled. */ + i830EvalLogicOpBlendState(ctx); } -static void i830DDBlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, - GLenum dfactorRGB, GLenum sfactorA, - GLenum dfactorA ) +static void i830BlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, + GLenum dfactorRGB, GLenum sfactorA, + GLenum dfactorA ) { i830ContextPtr imesa = I830_CONTEXT(ctx); int funcA = (ENABLE_SRC_ABLEND_FACTOR|ENABLE_DST_ABLEND_FACTOR); int funcRGB = (ENABLE_SRC_BLND_FACTOR|ENABLE_DST_BLND_FACTOR); - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); - FLUSH_BATCH(imesa); - switch(sfactorA) { - case GL_ZERO: funcA |= SRC_ABLEND_FACT(BLENDFACT_ZERO); break; - case GL_SRC_ALPHA: funcA |= SRC_ABLEND_FACT(BLENDFACT_SRC_ALPHA); break; - case GL_ONE: funcA |= SRC_ABLEND_FACT(BLENDFACT_ONE); break; - case GL_DST_COLOR: funcA |= SRC_ABLEND_FACT(BLENDFACT_DST_COLR); break; + case GL_ZERO: + funcA |= SRC_ABLEND_FACT(BLENDFACT_ZERO); + break; + case GL_SRC_ALPHA: + funcA |= SRC_ABLEND_FACT(BLENDFACT_SRC_ALPHA); + break; + case GL_ONE: + funcA |= SRC_ABLEND_FACT(BLENDFACT_ONE); + break; + case GL_DST_COLOR: + funcA |= SRC_ABLEND_FACT(BLENDFACT_DST_COLR); + break; case GL_ONE_MINUS_DST_COLOR: - funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_DST_COLR); break; + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_DST_COLR); + break; case GL_ONE_MINUS_SRC_ALPHA: - funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_SRC_ALPHA); break; - case GL_DST_ALPHA: funcA |= SRC_ABLEND_FACT(BLENDFACT_DST_ALPHA); break; + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_SRC_ALPHA); + break; + case GL_DST_ALPHA: + funcA |= SRC_ABLEND_FACT(BLENDFACT_DST_ALPHA); + break; case GL_ONE_MINUS_DST_ALPHA: - funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_DST_ALPHA); break; + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_DST_ALPHA); + break; case GL_SRC_ALPHA_SATURATE: - funcA |= SRC_ABLEND_FACT(BLENDFACT_SRC_ALPHA_SATURATE); - break; + funcA |= SRC_ABLEND_FACT(BLENDFACT_SRC_ALPHA_SATURATE); + break; case GL_CONSTANT_COLOR_EXT: - funcA |= SRC_ABLEND_FACT(BLENDFACT_CONST_COLOR); break; + funcA |= SRC_ABLEND_FACT(BLENDFACT_CONST_COLOR); + break; case GL_ONE_MINUS_CONSTANT_COLOR_EXT: - funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_CONST_COLOR); break; + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_CONST_COLOR); + break; case GL_CONSTANT_ALPHA_EXT: - funcA |= SRC_ABLEND_FACT(BLENDFACT_CONST_ALPHA); break; + funcA |= SRC_ABLEND_FACT(BLENDFACT_CONST_ALPHA); + break; case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: - funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_CONST_ALPHA); - break; + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; default: return; } switch(dfactorA) { - case GL_SRC_ALPHA: funcA |= DST_ABLEND_FACT(BLENDFACT_SRC_ALPHA); break; + case GL_SRC_ALPHA: + funcA |= DST_ABLEND_FACT(BLENDFACT_SRC_ALPHA); + break; case GL_ONE_MINUS_SRC_ALPHA: - funcA |= DST_ABLEND_FACT(BLENDFACT_INV_SRC_ALPHA); break; - case GL_ZERO: funcA |= DST_ABLEND_FACT(BLENDFACT_ZERO); break; - case GL_ONE: funcA |= DST_ABLEND_FACT(BLENDFACT_ONE); break; - case GL_SRC_COLOR: funcA |= DST_ABLEND_FACT(BLENDFACT_SRC_COLR); break; + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_SRC_ALPHA); + break; + case GL_ZERO: + funcA |= DST_ABLEND_FACT(BLENDFACT_ZERO); + break; + case GL_ONE: + funcA |= DST_ABLEND_FACT(BLENDFACT_ONE); + break; + case GL_SRC_COLOR: + funcA |= DST_ABLEND_FACT(BLENDFACT_SRC_COLR); + break; case GL_ONE_MINUS_SRC_COLOR: - funcA |= DST_ABLEND_FACT(BLENDFACT_INV_SRC_COLR); break; - case GL_DST_ALPHA: funcA |= DST_ABLEND_FACT(BLENDFACT_DST_ALPHA); break; + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_SRC_COLR); + break; + case GL_DST_ALPHA: + funcA |= DST_ABLEND_FACT(BLENDFACT_DST_ALPHA); + break; case GL_ONE_MINUS_DST_ALPHA: - funcA |= DST_ABLEND_FACT(BLENDFACT_INV_DST_ALPHA); break; + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_DST_ALPHA); + break; case GL_CONSTANT_COLOR_EXT: - funcA |= DST_ABLEND_FACT(BLENDFACT_CONST_COLOR); break; + funcA |= DST_ABLEND_FACT(BLENDFACT_CONST_COLOR); + break; case GL_ONE_MINUS_CONSTANT_COLOR_EXT: - funcA |= DST_ABLEND_FACT(BLENDFACT_INV_CONST_COLOR); - break; + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_CONST_COLOR); + break; case GL_CONSTANT_ALPHA_EXT: - funcA |= DST_ABLEND_FACT(BLENDFACT_CONST_ALPHA); break; + funcA |= DST_ABLEND_FACT(BLENDFACT_CONST_ALPHA); + break; case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: - funcA |= DST_ABLEND_FACT(BLENDFACT_INV_CONST_ALPHA); - break; + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; default: return; } switch(sfactorRGB) { - case GL_ZERO: funcRGB |= SRC_BLND_FACT(BLENDFACT_ZERO); break; - case GL_SRC_ALPHA: funcRGB |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA); break; - case GL_ONE: funcRGB |= SRC_BLND_FACT(BLENDFACT_ONE); break; - case GL_DST_COLOR: funcRGB |= SRC_BLND_FACT(BLENDFACT_DST_COLR); break; + case GL_ZERO: + funcRGB |= SRC_BLND_FACT(BLENDFACT_ZERO); + break; + case GL_SRC_ALPHA: + funcRGB |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA); + break; + case GL_ONE: + funcRGB |= SRC_BLND_FACT(BLENDFACT_ONE); + break; + case GL_DST_COLOR: + funcRGB |= SRC_BLND_FACT(BLENDFACT_DST_COLR); + break; case GL_ONE_MINUS_DST_COLOR: - funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_DST_COLR); break; + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_DST_COLR); + break; case GL_ONE_MINUS_SRC_ALPHA: - funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); break; - case GL_DST_ALPHA: funcRGB |= SRC_BLND_FACT(BLENDFACT_DST_ALPHA); break; + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); + break; + case GL_DST_ALPHA: + funcRGB |= SRC_BLND_FACT(BLENDFACT_DST_ALPHA); + break; case GL_ONE_MINUS_DST_ALPHA: - funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_DST_ALPHA); break; + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_DST_ALPHA); + break; case GL_SRC_ALPHA_SATURATE: - funcRGB |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA_SATURATE); - break; + funcRGB |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA_SATURATE); + break; case GL_CONSTANT_COLOR_EXT: - funcRGB |= SRC_BLND_FACT(BLENDFACT_CONST_COLOR); break; + funcRGB |= SRC_BLND_FACT(BLENDFACT_CONST_COLOR); + break; case GL_ONE_MINUS_CONSTANT_COLOR_EXT: - funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_CONST_COLOR); - break; + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_CONST_COLOR); + break; case GL_CONSTANT_ALPHA_EXT: - funcRGB |= SRC_BLND_FACT(BLENDFACT_CONST_ALPHA); break; + funcRGB |= SRC_BLND_FACT(BLENDFACT_CONST_ALPHA); + break; case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: - funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); - break; + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; default: return; } switch(dfactorRGB) { - case GL_SRC_ALPHA: funcRGB |= DST_BLND_FACT(BLENDFACT_SRC_ALPHA); break; + case GL_SRC_ALPHA: + funcRGB |= DST_BLND_FACT(BLENDFACT_SRC_ALPHA); + break; case GL_ONE_MINUS_SRC_ALPHA: - funcRGB |= DST_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); break; - case GL_ZERO: funcRGB |= DST_BLND_FACT(BLENDFACT_ZERO); break; - case GL_ONE: funcRGB |= DST_BLND_FACT(BLENDFACT_ONE); break; - case GL_SRC_COLOR: funcRGB |= DST_BLND_FACT(BLENDFACT_SRC_COLR); break; + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); + break; + case GL_ZERO: + funcRGB |= DST_BLND_FACT(BLENDFACT_ZERO); + break; + case GL_ONE: + funcRGB |= DST_BLND_FACT(BLENDFACT_ONE); + break; + case GL_SRC_COLOR: + funcRGB |= DST_BLND_FACT(BLENDFACT_SRC_COLR); + break; case GL_ONE_MINUS_SRC_COLOR: - funcRGB |= DST_BLND_FACT(BLENDFACT_INV_SRC_COLR); break; - case GL_DST_ALPHA: funcRGB |= DST_BLND_FACT(BLENDFACT_DST_ALPHA); break; + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_SRC_COLR); + break; + case GL_DST_ALPHA: + funcRGB |= DST_BLND_FACT(BLENDFACT_DST_ALPHA); + break; case GL_ONE_MINUS_DST_ALPHA: - funcRGB |= DST_BLND_FACT(BLENDFACT_INV_DST_ALPHA); break; + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_DST_ALPHA); + break; case GL_CONSTANT_COLOR_EXT: - funcRGB |= DST_BLND_FACT(BLENDFACT_CONST_COLOR); break; + funcRGB |= DST_BLND_FACT(BLENDFACT_CONST_COLOR); + break; case GL_ONE_MINUS_CONSTANT_COLOR_EXT: - funcRGB |= DST_BLND_FACT(BLENDFACT_INV_CONST_COLOR); - break; + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_CONST_COLOR); + break; case GL_CONSTANT_ALPHA_EXT: - funcRGB |= DST_BLND_FACT(BLENDFACT_CONST_ALPHA); break; + funcRGB |= DST_BLND_FACT(BLENDFACT_CONST_ALPHA); + break; case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: - funcRGB |= DST_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); - break; + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; default: return; } - imesa->dirty |= I830_UPLOAD_CTX; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_IALPHAB] &= ~SRC_DST_ABLEND_MASK; imesa->Setup[I830_CTXREG_IALPHAB] |= funcA; imesa->Setup[I830_CTXREG_STATE1] &= ~SRC_DST_BLND_MASK; imesa->Setup[I830_CTXREG_STATE1] |= funcRGB; - /* Insure Independant Alpha Blend is really enabled if need be */ - i830EvalLogicOpBlendState(ctx); -} -static void i830DDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor) -{ - i830ContextPtr imesa = I830_CONTEXT(ctx); - int func = (ENABLE_SRC_BLND_FACTOR|ENABLE_DST_BLND_FACTOR); - - FLUSH_BATCH(imesa); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s %s %s\n", __FUNCTION__, - gl_lookup_enum_by_nr(sfactor), - gl_lookup_enum_by_nr(dfactor)); - - switch(sfactor) { - case GL_ZERO: func |= SRC_BLND_FACT(BLENDFACT_ZERO); break; - case GL_SRC_ALPHA: func |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA); break; - case GL_ONE: func |= SRC_BLND_FACT(BLENDFACT_ONE); break; - case GL_DST_COLOR: func |= SRC_BLND_FACT(BLENDFACT_DST_COLR); break; - case GL_ONE_MINUS_DST_COLOR: - func |= SRC_BLND_FACT(BLENDFACT_INV_DST_COLR); break; - case GL_ONE_MINUS_SRC_ALPHA: - func |= SRC_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); break; - case GL_DST_ALPHA: func |= SRC_BLND_FACT(BLENDFACT_DST_ALPHA); break; - case GL_ONE_MINUS_DST_ALPHA: - func |= SRC_BLND_FACT(BLENDFACT_INV_DST_ALPHA); break; - case GL_SRC_ALPHA_SATURATE: - func |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA_SATURATE); - break; - case GL_CONSTANT_COLOR_EXT: - func |= SRC_BLND_FACT(BLENDFACT_CONST_COLOR); break; - case GL_ONE_MINUS_CONSTANT_COLOR_EXT: - func |= SRC_BLND_FACT(BLENDFACT_INV_CONST_COLOR); - break; - case GL_CONSTANT_ALPHA_EXT: - func |= SRC_BLND_FACT(BLENDFACT_CONST_ALPHA); break; - case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: - func |= SRC_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); - break; - default: return; - } - - switch(dfactor) { - case GL_SRC_ALPHA: func |= DST_BLND_FACT(BLENDFACT_SRC_ALPHA); break; - case GL_ONE_MINUS_SRC_ALPHA: - func |= DST_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); break; - case GL_ZERO: func |= DST_BLND_FACT(BLENDFACT_ZERO); break; - case GL_ONE: func |= DST_BLND_FACT(BLENDFACT_ONE); break; - case GL_SRC_COLOR: func |= DST_BLND_FACT(BLENDFACT_SRC_COLR); break; - case GL_ONE_MINUS_SRC_COLOR: - func |= DST_BLND_FACT(BLENDFACT_INV_SRC_COLR); break; - case GL_DST_ALPHA: func |= DST_BLND_FACT(BLENDFACT_DST_ALPHA); break; - case GL_ONE_MINUS_DST_ALPHA: - func |= DST_BLND_FACT(BLENDFACT_INV_DST_ALPHA); break; - case GL_CONSTANT_COLOR_EXT: - func |= DST_BLND_FACT(BLENDFACT_CONST_COLOR); break; - case GL_ONE_MINUS_CONSTANT_COLOR_EXT: - func |= DST_BLND_FACT(BLENDFACT_INV_CONST_COLOR); - break; - case GL_CONSTANT_ALPHA_EXT: - func |= DST_BLND_FACT(BLENDFACT_CONST_ALPHA); break; - case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: - func |= DST_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); - break; - default: return; - } - - imesa->dirty |= I830_UPLOAD_CTX; - imesa->Setup[I830_CTXREG_IALPHAB] &= ~SRC_DST_ABLEND_MASK; - imesa->Setup[I830_CTXREG_STATE1] &= ~SRC_DST_BLND_MASK; - imesa->Setup[I830_CTXREG_STATE1] |= func; - /* Insure Independant Alpha Blend is really disabled if need be */ + /* Insure Independant Alpha Blend is really enabled if + * Blending is already enabled. + */ i830EvalLogicOpBlendState(ctx); - - if(0) fprintf(stderr, "STATE1 : 0x%x\n", imesa->Setup[I830_CTXREG_STATE1]); } -static void i830DDDepthFunc(GLcontext *ctx, GLenum func) +static void i830DepthFunc(GLcontext *ctx, GLenum func) { i830ContextPtr imesa = I830_CONTEXT(ctx); int test = 0; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); - FLUSH_BATCH(imesa); - switch(func) { - case GL_NEVER: - test = COMPAREFUNC_NEVER; + case GL_NEVER: + test = COMPAREFUNC_NEVER; break; - case GL_LESS: - test = COMPAREFUNC_LESS; + case GL_LESS: + test = COMPAREFUNC_LESS; break; - case GL_LEQUAL: - test = COMPAREFUNC_LEQUAL; + case GL_LEQUAL: + test = COMPAREFUNC_LEQUAL; break; - case GL_GREATER: - test = COMPAREFUNC_GREATER; + case GL_GREATER: + test = COMPAREFUNC_GREATER; break; - case GL_GEQUAL: - test = COMPAREFUNC_GEQUAL; + case GL_GEQUAL: + test = COMPAREFUNC_GEQUAL; break; - case GL_NOTEQUAL: - test = COMPAREFUNC_NOTEQUAL; + case GL_NOTEQUAL: + test = COMPAREFUNC_NOTEQUAL; break; - case GL_EQUAL: - test = COMPAREFUNC_EQUAL; + case GL_EQUAL: + test = COMPAREFUNC_EQUAL; break; - case GL_ALWAYS: - test = COMPAREFUNC_ALWAYS; + case GL_ALWAYS: + test = COMPAREFUNC_ALWAYS; break; default: return; } - imesa->dirty |= I830_UPLOAD_CTX; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_STATE3] &= ~DEPTH_TEST_FUNC_MASK; imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_DEPTH_TEST_FUNC | DEPTH_TEST_FUNC(test)); } -static void i830DDDepthMask(GLcontext *ctx, GLboolean flag) +static void i830DepthMask(GLcontext *ctx, GLboolean flag) { i830ContextPtr imesa = I830_CONTEXT(ctx); - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s flag (%d)\n", __FUNCTION__, flag); - FLUSH_BATCH(imesa); + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); - imesa->dirty |= I830_UPLOAD_CTX; imesa->Setup[I830_CTXREG_ENABLES_2] &= ~ENABLE_DIS_DEPTH_WRITE_MASK; - if (flag) - imesa->Setup[I830_CTXREG_ENABLES_2] |= ENABLE_DEPTH_WRITE; + if (flag && ctx->Depth.Test) + imesa->Setup[I830_CTXREG_ENABLES_2] |= ENABLE_DEPTH_WRITE; else - imesa->Setup[I830_CTXREG_ENABLES_2] |= DISABLE_DEPTH_WRITE; + imesa->Setup[I830_CTXREG_ENABLES_2] |= DISABLE_DEPTH_WRITE; } /* ============================================================= - * Hardware clipping + * Polygon stipple + * + * The i830 supports a 4x4 stipple natively, GL wants 32x32. + * Fortunately stipple is usually a repeating pattern. */ +static void i830PolygonStipple( GLcontext *ctx, const GLubyte *mask ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + const GLubyte *m = mask; + GLubyte p[4]; + int i,j,k; + int active = (ctx->Polygon.StippleFlag && + imesa->reduced_primitive == GL_TRIANGLES); + GLuint newMask; + + if (active) { + I830_STATECHANGE(imesa, I830_UPLOAD_STIPPLE); + imesa->StippleSetup[I830_STPREG_ST1] &= ~ST1_ENABLE; + } + + 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; -static void i830DDScissor( GLcontext *ctx, GLint x, GLint y, - GLsizei w, GLsizei h ) -{ + for (k = 0 ; k < 8 ; k++) + for (j = 3 ; j >= 0; j--) + for (i = 0 ; i < 4 ; i++, m++) + if (*m != p[j]) { + imesa->hw_stipple = 0; + return; + } + + newMask = (((p[0] & 0xf) << 0) | + ((p[1] & 0xf) << 4) | + ((p[2] & 0xf) << 8) | + ((p[3] & 0xf) << 12)); + + + if (newMask == 0xffff || newMask == 0x0) { + /* this is needed to make conform pass */ + imesa->hw_stipple = 0; + return; + } + + imesa->StippleSetup[I830_STPREG_ST1] &= ~0xffff; + imesa->StippleSetup[I830_STPREG_ST1] |= newMask; + imesa->hw_stipple = 1; + + if (active) + imesa->StippleSetup[I830_STPREG_ST1] |= ST1_ENABLE; +} + +static void i830PolygonStippleFallback( GLcontext *ctx, const GLubyte *mask ) +{ i830ContextPtr imesa = I830_CONTEXT(ctx); + imesa->hw_stipple = 0; + (void) i830PolygonStipple; +} + +/* ============================================================= + * Hardware clipping + */ +static void i830Scissor(GLcontext *ctx, GLint x, GLint y, + GLsizei w, GLsizei h) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); int x1 = x; int y1 = imesa->driDrawable->h - (y + h); int x2 = x + w - 1; int y2 = y1 + h - 1; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "[%s] x(%d) y(%d) w(%d) h(%d)\n", __FUNCTION__, x, y, w, h); - if(x1 < 0) x1 = 0; - if(y1 < 0) y1 = 0; - if(x2 < 0) x2 = 0; - if(y2 < 0) y2 = 0; + if (x1 < 0) x1 = 0; + if (y1 < 0) y1 = 0; + if (x2 < 0) x2 = 0; + if (y2 < 0) y2 = 0; + + if (x2 >= imesa->i830Screen->width) x2 = imesa->i830Screen->width-1; + if (y2 >= imesa->i830Screen->height) y2 = imesa->i830Screen->height-1; + if (x1 >= imesa->i830Screen->width) x1 = imesa->i830Screen->width-1; + if (y1 >= imesa->i830Screen->height) y1 = imesa->i830Screen->height-1; - FLUSH_BATCH(imesa); - imesa->dirty |= I830_UPLOAD_BUFFERS; + + I830_STATECHANGE(imesa, I830_UPLOAD_BUFFERS); imesa->BufferSetup[I830_DESTREG_SR1] = (y1 << 16) | (x1 & 0xffff); imesa->BufferSetup[I830_DESTREG_SR2] = (y2 << 16) | (x2 & 0xffff); } -static void i830DDLogicOp( GLcontext *ctx, GLenum opcode ) +static void i830LogicOp(GLcontext *ctx, GLenum opcode) { i830ContextPtr imesa = I830_CONTEXT(ctx); int tmp = 0; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); - - FLUSH_BATCH( imesa ); - switch(opcode) { - case GL_CLEAR: tmp = LOGICOP_CLEAR; break; - case GL_AND: tmp = LOGICOP_AND; break; - case GL_AND_REVERSE: tmp = LOGICOP_AND_RVRSE; break; - case GL_COPY: tmp = LOGICOP_COPY; break; - case GL_COPY_INVERTED: tmp = LOGICOP_COPY_INV; break; - case GL_AND_INVERTED: tmp = LOGICOP_AND_INV; break; - case GL_NOOP: tmp = LOGICOP_NOOP; break; - case GL_XOR: tmp = LOGICOP_XOR; break; - case GL_OR: tmp = LOGICOP_OR; break; - case GL_OR_INVERTED: tmp = LOGICOP_OR_INV; break; - case GL_NOR: tmp = LOGICOP_NOR; break; - case GL_EQUIV: tmp = LOGICOP_EQUIV; break; - case GL_INVERT: tmp = LOGICOP_INV; break; - case GL_OR_REVERSE: tmp = LOGICOP_OR_RVRSE; break; - case GL_NAND: tmp = LOGICOP_NAND; break; - case GL_SET: tmp = LOGICOP_SET; break; - default: return; + case GL_CLEAR: + tmp = LOGICOP_CLEAR; + break; + case GL_AND: + tmp = LOGICOP_AND; + break; + case GL_AND_REVERSE: + tmp = LOGICOP_AND_RVRSE; + break; + case GL_COPY: + tmp = LOGICOP_COPY; + break; + case GL_COPY_INVERTED: + tmp = LOGICOP_COPY_INV; + break; + case GL_AND_INVERTED: + tmp = LOGICOP_AND_INV; + break; + case GL_NOOP: + tmp = LOGICOP_NOOP; + break; + case GL_XOR: + tmp = LOGICOP_XOR; + break; + case GL_OR: + tmp = LOGICOP_OR; + break; + case GL_OR_INVERTED: + tmp = LOGICOP_OR_INV; + break; + case GL_NOR: + tmp = LOGICOP_NOR; + break; + case GL_EQUIV: + tmp = LOGICOP_EQUIV; + break; + case GL_INVERT: + tmp = LOGICOP_INV; + break; + case GL_OR_REVERSE: + tmp = LOGICOP_OR_RVRSE; + break; + case GL_NAND: + tmp = LOGICOP_NAND; + break; + case GL_SET: + tmp = LOGICOP_SET; + break; + default: + return; } - imesa->dirty |= I830_UPLOAD_CTX; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_STATE4] &= ~LOGICOP_MASK; imesa->Setup[I830_CTXREG_STATE4] |= LOGIC_OP_FUNC(tmp); - if(0) fprintf(stderr, "Logicop : 0x%x, state4 : 0x%x\n", tmp, imesa->Setup[I830_CTXREG_STATE4]); - /* Insure all the enables are correct */ + + /* Make sure all the enables are correct */ i830EvalLogicOpBlendState(ctx); } -static GLboolean i830DDSetDrawBuffer(GLcontext *ctx, GLenum mode ) +/* Fallback to swrast for select and feedback. + */ +static void i830RenderMode( GLcontext *ctx, GLenum mode ) { i830ContextPtr imesa = I830_CONTEXT(ctx); + FALLBACK( imesa, I830_FALLBACK_RENDERMODE, (mode != GL_RENDER) ); +} - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); +#if 0 +void i830DrawBuffer(GLcontext *ctx, GLenum mode ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int front; - FLUSH_BATCH(imesa); + /* + * _DrawDestMask is easier to cope with than . + */ + switch ( ctx->Color._DrawDestMask ) { + case FRONT_LEFT_BIT: + front = 1; + break; + case BACK_LEFT_BIT: + front = 0; + break; + default: + /* GL_NONE or GL_FRONT_AND_BACK or stereo left&right, etc */ + FALLBACK( imesa, I830_FALLBACK_DRAW_BUFFER, GL_TRUE ); + return; + } - imesa->Fallback &= ~I830_FALLBACK_DRAW_BUFFER; + if ( imesa->sarea->pf_current_page == 1 ) + front ^= 1; - if(mode == GL_FRONT_LEFT) { - imesa->readMap = (char *)imesa->driScreen->pFB; + FALLBACK( imesa, I830_FALLBACK_DRAW_BUFFER, GL_FALSE ); + I830_FIREVERTICES(imesa); + I830_STATECHANGE(imesa, I830_UPLOAD_BUFFERS); + i830XMesaSetFrontClipRects( imesa ); + + if (front) { + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = imesa->i830Screen->fbOffset; imesa->drawMap = (char *)imesa->driScreen->pFB; - imesa->BufferSetup[I830_DESTREG_CBUFADDR] = - imesa->i830Screen->fbOffset; - imesa->dirty |= I830_UPLOAD_BUFFERS; - i830XMesaSetFrontClipRects( imesa ); - return GL_TRUE; - } else if(mode == GL_BACK_LEFT) { + imesa->readMap = (char *)imesa->driScreen->pFB; + } else { + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = imesa->i830Screen->backOffset; + imesa->drawMap = imesa->i830Screen->back.map; imesa->readMap = imesa->i830Screen->back.map; - imesa->drawMap = (char *)imesa->i830Screen->back.map; - imesa->BufferSetup[I830_DESTREG_CBUFADDR] = - imesa->i830Screen->backOffset; - imesa->dirty |= I830_UPLOAD_BUFFERS; - i830XMesaSetBackClipRects( imesa ); - return GL_TRUE; } - imesa->Fallback |= I830_FALLBACK_DRAW_BUFFER; - return GL_FALSE; + /* We want to update the s/w rast state too so that i830SetBuffer() + * gets called. + */ + _swrast_DrawBuffer(ctx, mode); } -static void i830DDSetReadBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, - GLenum mode ) -{ - i830ContextPtr imesa = I830_CONTEXT(ctx); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - if(mode == GL_FRONT_LEFT) { - imesa->readMap = (char *)imesa->driScreen->pFB; - imesa->Fallback &= ~I830_FALLBACK_READ_BUFFER; - } else if(mode == GL_BACK_LEFT) { - imesa->readMap = imesa->i830Screen->back.map; - imesa->Fallback &= ~I830_FALLBACK_READ_BUFFER; - } else { - imesa->Fallback |= I830_FALLBACK_READ_BUFFER; - } +static void i830ReadBuffer(GLcontext *ctx, GLenum mode ) +{ + /* nothing, until h/w glRead/CopyPixels */ } +#endif + -static void i830DDSetColor(GLcontext *ctx, - GLubyte r, GLubyte g, - GLubyte b, GLubyte a ) +void i830SetDrawBuffer(GLcontext *ctx, GLenum mode ) { i830ContextPtr imesa = I830_CONTEXT(ctx); + int front = 0; + + switch (mode) { + case GL_FRONT_LEFT: + front = 1; + break; + case GL_BACK_LEFT: + front = 0; + break; + default: + FALLBACK( imesa, I830_FALLBACK_DRAW_BUFFER, GL_TRUE ); + return; + } - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s r(%d) g(%d) b(%d) a(%d)\n", __FUNCTION__, - r, g, b, a); + if ( imesa->sarea->pf_current_page == 1 ) + front ^= 1; + + FALLBACK( imesa, I830_FALLBACK_DRAW_BUFFER, GL_FALSE ); + I830_FIREVERTICES(imesa); + I830_STATECHANGE(imesa, I830_UPLOAD_BUFFERS); + i830XMesaSetFrontClipRects( imesa ); - imesa->MonoColor = i830PackColor( imesa->i830Screen->fbFormat, r, g, b, a ); - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "[%s] MonoColor = 0x%08x\n", __FUNCTION__, - imesa->MonoColor); + if (front) { + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = imesa->i830Screen->fbOffset; + imesa->drawMap = (char *)imesa->driScreen->pFB; + imesa->readMap = (char *)imesa->driScreen->pFB; + } else { + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = imesa->i830Screen->backOffset; + imesa->drawMap = imesa->i830Screen->back.map; + imesa->readMap = imesa->i830Screen->back.map; + } } - -static void i830DDClearColor(GLcontext *ctx, - GLubyte r, GLubyte g, - GLubyte b, GLubyte a ) +static void i830ClearColor(GLcontext *ctx, const GLchan color[4]) { i830ContextPtr imesa = I830_CONTEXT(ctx); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s r(%d) g(%d) b(%d) a(%d)\n", __FUNCTION__, - r, g, b, a); - imesa->clear_red = r; - imesa->clear_green = g; - imesa->clear_blue = b; - imesa->clear_alpha = a; + imesa->clear_red = color[RCOMP]; + imesa->clear_green = color[GCOMP]; + imesa->clear_blue = color[BCOMP]; + imesa->clear_alpha = color[ACOMP]; - imesa->ClearColor = i830PackColor( imesa->i830Screen->fbFormat, r, g, b, a ); - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "[%s] ClearColor = 0x%08x\n", __FUNCTION__, - imesa->ClearColor); - + imesa->ClearColor = i830PackColor(imesa->i830Screen->fbFormat, + color[RCOMP], + color[GCOMP], + color[BCOMP], + color[ACOMP] ); } -static void i830DDCullFaceFrontFace(GLcontext *ctx, GLenum unused) +static void i830CullFaceFrontFace(GLcontext *ctx, GLenum unused) { i830ContextPtr imesa = I830_CONTEXT(ctx); GLuint mode = CULLMODE_BOTH; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); - - FLUSH_BATCH(imesa); - if(ctx->Polygon.CullFaceMode != GL_FRONT_AND_BACK) { + if (ctx->Polygon.CullFaceMode != GL_FRONT_AND_BACK) { mode = CULLMODE_CW; if (ctx->Polygon.CullFaceMode == GL_FRONT) @@ -797,97 +1030,59 @@ imesa->LcsCullMode = mode; - if(ctx->Polygon.CullFlag && ctx->PB->primitive == GL_POLYGON) { - imesa->dirty |= I830_UPLOAD_CTX; + if (ctx->Polygon.CullFlag) { + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_STATE3] &= ~CULLMODE_MASK; imesa->Setup[I830_CTXREG_STATE3] |= ENABLE_CULL_MODE | mode; } } - -static void i830DDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ) -{ - i830ContextPtr imesa = I830_CONTEXT(ctx); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s %s\n", __FUNCTION__, gl_lookup_enum_by_nr(prim)); - - FLUSH_BATCH(imesa); - imesa->dirty |= I830_UPLOAD_CTX; - imesa->Setup[I830_CTXREG_STATE3] &= ~CULLMODE_MASK; - imesa->Setup[I830_CTXREG_AA] &= ~AA_LINE_ENABLE; - imesa->vertex_prim = PRIM3D_TRILIST; - - switch(ctx->PB->primitive) { - case GL_POLYGON: - if (ctx->Polygon.CullFlag) - imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | - imesa->LcsCullMode); - else - imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | - CULLMODE_NONE); - break; - - case GL_LINE: - case GL_LINES: - imesa->vertex_prim = PRIM3D_LINELIST; - - if(ctx->Line.SmoothFlag) - imesa->Setup[I830_CTXREG_AA] |= AA_LINE_ENABLE; - imesa->Setup[I830_CTXREG_STATE3] |= CULLMODE_NONE; - break; - - case GL_POINT: - case GL_POINTS: - imesa->vertex_prim = PRIM3D_POINTLIST; - imesa->Setup[I830_CTXREG_STATE3] |= CULLMODE_NONE; - default: - imesa->Setup[I830_CTXREG_STATE3] |= CULLMODE_NONE; - break; - } - - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "[%s] AA(0x%08x) STATE3(0x%08x) vertex_prim 0x%x\n", - __FUNCTION__, - imesa->Setup[I830_CTXREG_AA], - imesa->Setup[I830_CTXREG_STATE3], - imesa->vertex_prim); - -} -static void i830DDLineWidth( GLcontext *ctx, GLfloat widthf ) +static void i830LineWidth( GLcontext *ctx, GLfloat widthf ) { i830ContextPtr imesa = I830_CONTEXT( ctx ); int width; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); width = FloatToInt(widthf * 2); CLAMP_SELF(width, 1, 15); + + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_STATE5] &= ~FIXED_LINE_WIDTH_MASK; imesa->Setup[I830_CTXREG_STATE5] |= (ENABLE_FIXED_LINE_WIDTH | FIXED_LINE_WIDTH(width)); +} + +static void i830PointSize(GLcontext *ctx, GLfloat size) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLint point_size = FloatToInt(size); - imesa->dirty |= I830_UPLOAD_CTX; + if (I830_DEBUG&DEBUG_DRI) + fprintf(stderr, "%s\n", __FUNCTION__); + + CLAMP_SELF(point_size, 1, 256); + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_STATE5] &= ~FIXED_POINT_WIDTH_MASK; + imesa->Setup[I830_CTXREG_STATE5] |= (ENABLE_FIXED_POINT_WIDTH | + FIXED_POINT_WIDTH(point_size)); } + /* ============================================================= * Color masks */ -/* This only deals with ColorMask for rendering, clears need to update - * a planemask for the clearing blit. This is to be done. - */ - -static GLboolean i830DDColorMask(GLcontext *ctx, - GLboolean r, GLboolean g, - GLboolean b, GLboolean a ) +static void i830ColorMask(GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a) { i830ContextPtr imesa = I830_CONTEXT( ctx ); GLuint tmp = 0; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s r(%d) g(%d) b(%d) a(%d)\n", __FUNCTION__, r, g, b, a); + if (I830_DEBUG&DEBUG_DRI) + fprintf(stderr, "%s r(%d) g(%d) b(%d) a(%d)\n", __FUNCTION__, r, g, b, a); imesa->mask_red = !r; imesa->mask_green = !g; @@ -895,111 +1090,110 @@ imesa->mask_alpha = !a; tmp = (imesa->Setup[I830_CTXREG_ENABLES_2] & ~WRITEMASK_MASK) | - ENABLE_COLOR_MASK | - ENABLE_COLOR_WRITE | - ((!r) << WRITEMASK_RED_SHIFT) | - ((!g) << WRITEMASK_GREEN_SHIFT) | - ((!b) << WRITEMASK_BLUE_SHIFT) | - ((!a) << WRITEMASK_ALPHA_SHIFT); + ENABLE_COLOR_MASK | + ENABLE_COLOR_WRITE | + ((!r) << WRITEMASK_RED_SHIFT) | + ((!g) << WRITEMASK_GREEN_SHIFT) | + ((!b) << WRITEMASK_BLUE_SHIFT) | + ((!a) << WRITEMASK_ALPHA_SHIFT); - if(tmp != imesa->Setup[I830_CTXREG_ENABLES_2]) { - FLUSH_BATCH(imesa); + if (tmp != imesa->Setup[I830_CTXREG_ENABLES_2]) { + I830_FIREVERTICES(imesa); imesa->dirty |= I830_UPLOAD_CTX; imesa->Setup[I830_CTXREG_ENABLES_2] = tmp; - - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "[%s] enables 2 = 0x%08x\n", __FUNCTION__, tmp); } +} + +static void update_specular( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK; - /* Always return false so s/w fallbacks are correct */ - return GL_FALSE; + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_SPEC_ADD; + else + imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_SPEC_ADD; } -static void i830DDLightModelfv(GLcontext *ctx, GLenum pname, - const GLfloat *param) +static void i830LightModelfv(GLcontext *ctx, GLenum pname, + const GLfloat *param) { - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); - if(pname == GL_LIGHT_MODEL_COLOR_CONTROL) { - i830ContextPtr imesa = I830_CONTEXT( ctx ); - FLUSH_BATCH(imesa); - imesa->dirty |= I830_UPLOAD_CTX; - imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK; + if (pname == GL_LIGHT_MODEL_COLOR_CONTROL) { + update_specular( ctx ); + } +} - if(ctx->Texture.ReallyEnabled && - ctx->Light.Enabled && - ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_SPEC_ADD; - else - imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_SPEC_ADD; +/* In Mesa 3.5 we can reliably do native flatshading. + */ +static void i830ShadeModel(GLcontext *ctx, GLenum mode) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "[%s] Enables_1 = 0x%08x\n", __FUNCTION__, - imesa->Setup[I830_CTXREG_ENABLES_1]); +#define SHADE_MODE_MASK ((1<<10)|(1<<8)|(1<<6)|(1<<4)) + + imesa->Setup[I830_CTXREG_STATE3] &= ~SHADE_MODE_MASK; + + if (mode == GL_FLAT) { + imesa->Setup[I830_CTXREG_STATE3] |= (ALPHA_SHADE_MODE(SHADE_MODE_FLAT) | + FOG_SHADE_MODE(SHADE_MODE_FLAT) | + SPEC_SHADE_MODE(SHADE_MODE_FLAT) | + COLOR_SHADE_MODE(SHADE_MODE_FLAT)); + } else { + imesa->Setup[I830_CTXREG_STATE3] |= (ALPHA_SHADE_MODE(SHADE_MODE_LINEAR) | + FOG_SHADE_MODE(SHADE_MODE_LINEAR) | + SPEC_SHADE_MODE(SHADE_MODE_LINEAR) | + COLOR_SHADE_MODE(SHADE_MODE_LINEAR)); } } /* ============================================================= * Fog */ -static void i830DDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) +static void i830Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) { i830ContextPtr imesa = I830_CONTEXT(ctx); - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); - if(pname == GL_FOG_COLOR) { + if (pname == GL_FOG_COLOR) { GLuint color = (((GLubyte)(ctx->Fog.Color[0]*255.0F) << 16) | ((GLubyte)(ctx->Fog.Color[1]*255.0F) << 8) | ((GLubyte)(ctx->Fog.Color[2]*255.0F) << 0)); - imesa->dirty |= I830_UPLOAD_CTX; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_FOGCOLOR] = (STATE3D_FOG_COLOR_CMD | color); - - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "[%s] FogColor = 0x%08x\n", __FUNCTION__, - imesa->Setup[I830_CTXREG_FOGCOLOR]); - } } - /* ============================================================= */ -static void i830DDEnable(GLcontext *ctx, GLenum cap, GLboolean state) +static void i830Enable(GLcontext *ctx, GLenum cap, GLboolean state) { i830ContextPtr imesa = I830_CONTEXT(ctx); - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s cap(%s) state(%d)\n", __FUNCTION__, - gl_lookup_enum_by_nr(cap), state); - switch(cap) { case GL_LIGHTING: - FLUSH_BATCH(imesa); - imesa->dirty |= I830_UPLOAD_CTX; - imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK; - - if (ctx->Texture.ReallyEnabled && - ctx->Light.Enabled && - ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_SPEC_ADD; - else - imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_SPEC_ADD; - + case GL_COLOR_SUM_EXT: + update_specular( ctx ); break; + case GL_ALPHA_TEST: - FLUSH_BATCH(imesa); - imesa->dirty |= I830_UPLOAD_CTX; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_DIS_ALPHA_TEST_MASK; - if(state) - imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_ALPHA_TEST; + if (state) + imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_ALPHA_TEST; else - imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_ALPHA_TEST; + imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_ALPHA_TEST; + break; case GL_BLEND: @@ -1007,180 +1201,117 @@ case GL_INDEX_LOGIC_OP: i830EvalLogicOpBlendState(ctx); break; - case GL_DITHER: - { - unsigned int temp; - - FLUSH_BATCH(imesa); - temp = imesa->Setup[I830_CTXREG_ENABLES_2]; - - temp &= ~ENABLE_DITHER; - if(state) temp |= ENABLE_DITHER; - else temp |= DISABLE_DITHER; + case GL_DITHER: + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_ENABLES_2] &= ~ENABLE_DITHER; - if(temp != imesa->Setup[I830_CTXREG_ENABLES_2]) { - imesa->dirty |= I830_UPLOAD_CTX; - imesa->Setup[I830_CTXREG_ENABLES_2] = temp; - } - } + if (state) + imesa->Setup[I830_CTXREG_ENABLES_2] |= ENABLE_DITHER; + else + imesa->Setup[I830_CTXREG_ENABLES_2] |= DISABLE_DITHER; break; case GL_DEPTH_TEST: - FLUSH_BATCH(imesa); - imesa->dirty |= I830_UPLOAD_CTX; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_DIS_DEPTH_TEST_MASK; - - if(state) - imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_DEPTH_TEST; + + if (state) + imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_DEPTH_TEST; else - imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_DEPTH_TEST; + imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_DEPTH_TEST; + + /* Also turn off depth writes when GL_DEPTH_TEST is disabled: + */ + i830DepthMask( ctx, state ); break; case GL_SCISSOR_TEST: - FLUSH_BATCH(imesa); - - if(state) - imesa->BufferSetup[I830_DESTREG_SENABLE] = (STATE3D_SCISSOR_ENABLE_CMD | - ENABLE_SCISSOR_RECT); + I830_STATECHANGE(imesa, I830_UPLOAD_BUFFERS); + + if (state) + imesa->BufferSetup[I830_DESTREG_SENABLE] = + (STATE3D_SCISSOR_ENABLE_CMD | + ENABLE_SCISSOR_RECT); else - imesa->BufferSetup[I830_DESTREG_SENABLE] = (STATE3D_SCISSOR_ENABLE_CMD | - DISABLE_SCISSOR_RECT); - imesa->dirty |= I830_UPLOAD_BUFFERS; - break; + imesa->BufferSetup[I830_DESTREG_SENABLE] = + (STATE3D_SCISSOR_ENABLE_CMD | + DISABLE_SCISSOR_RECT); - case GL_POLYGON_STIPPLE: - if(ctx->PB->primitive == GL_POLYGON) { - FLUSH_BATCH(imesa); - /* Need a fallback here */ - } + imesa->upload_cliprects = GL_TRUE; break; case GL_LINE_SMOOTH: - if (ctx->PB->primitive == GL_LINE) { - FLUSH_BATCH(imesa); - if(0) fprintf(stderr, "Line smooth hit\n"); - imesa->dirty |= I830_UPLOAD_CTX; + if (imesa->reduced_primitive == GL_LINES) { + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_AA] &= ~AA_LINE_ENABLE; - /* imesa->Setup[I830_CTXREG_LCS] &= ~LCS_LINEWIDTH_0_5; */ - if (state) { + if (state) imesa->Setup[I830_CTXREG_AA] |= AA_LINE_ENABLE; - /* imesa->Setup[I830_CTXREG_LCS] |= LCS_LINEWIDTH_0_5; */ - } else { + else imesa->Setup[I830_CTXREG_AA] |= AA_LINE_DISABLE; - /* imesa->Setup[I830_CTXREG_LCS] |= LCS_LINEWIDTH_0_5; */ - } } break; - case GL_POINT_SMOOTH: - if (ctx->PB->primitive == GL_POINT) { - FLUSH_BATCH(imesa); - if(0) fprintf(stderr, "Point smooth hit\n"); - } - break; - - case GL_POLYGON_SMOOTH: - if (ctx->PB->primitive == GL_POLYGON) { - FLUSH_BATCH(imesa); - if(0) fprintf(stderr, "Polygon Smooth hit\n"); - } - break; - case GL_FOG: - FLUSH_BATCH(imesa); - imesa->dirty |= I830_UPLOAD_CTX; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_DIS_FOG_MASK; - if(state) - imesa->Setup[I830_CTXREG_ENABLES_1] |= I830_ENABLE_FOG; + if (state) + imesa->Setup[I830_CTXREG_ENABLES_1] |= I830_ENABLE_FOG; else - imesa->Setup[I830_CTXREG_ENABLES_1] |= I830_DISABLE_FOG; + imesa->Setup[I830_CTXREG_ENABLES_1] |= I830_DISABLE_FOG; break; case GL_CULL_FACE: - if (ctx->PB->primitive == GL_POLYGON) { - FLUSH_BATCH(imesa); - imesa->dirty |= I830_UPLOAD_CTX; - imesa->Setup[I830_CTXREG_STATE3] &= ~CULLMODE_MASK; - if (state) - imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | - imesa->LcsCullMode); - else - imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | - CULLMODE_NONE); - } - break; - case GL_TEXTURE_1D: - case GL_TEXTURE_3D: - FLUSH_BATCH(imesa); - imesa->new_state |= I830_NEW_TEXTURE; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_STATE3] &= ~CULLMODE_MASK; + if (state) + imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | + imesa->LcsCullMode); + else + imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | + CULLMODE_NONE); break; - case GL_TEXTURE_2D: - FLUSH_BATCH(imesa); - imesa->new_state |= I830_NEW_TEXTURE; - - imesa->dirty |= I830_UPLOAD_CTX; - imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK; - if (ctx->Texture.ReallyEnabled && - ctx->Light.Enabled && - ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_SPEC_ADD; - else - imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_SPEC_ADD; + case GL_TEXTURE_2D: +/* I830_STATECHANGE(imesa, I830_UPLOAD_CTX); */ +/* imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK; */ break; case GL_STENCIL_TEST: - FLUSH_BATCH(imesa); - if(imesa->hw_stencil) { - imesa->dirty |= I830_UPLOAD_CTX; + if (imesa->hw_stencil) { + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_STENCIL_TEST; - if(state) { - if(0) fprintf(stderr, "Enabling stencil test\n"); + if (state) { imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_STENCIL_TEST; } else { - if(0) fprintf(stderr, "Disabling stencil test\n"); imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_STENCIL_TEST; } - - if(I830_DEBUG&DEBUG_VERBOSE_STATE) - fprintf(stderr, "%s : state4 : 0x%x, stentst : 0x%x," - " enables_1 : 0x%x\n", __FUNCTION__, - imesa->Setup[I830_CTXREG_STATE4], - imesa->Setup[I830_CTXREG_STENCILTST], - imesa->Setup[I830_CTXREG_ENABLES_1]); - - } else if (state) { - imesa->Fallback |= I830_FALLBACK_STENCIL; } else { - imesa->Fallback &= ~I830_FALLBACK_STENCIL; + FALLBACK( imesa, I830_FALLBACK_STENCIL, state ); } - - default: - ; - } -} - - - -/* ============================================================= - */ - - -void i830DDUpdateHwState( GLcontext *ctx ) -{ - i830ContextPtr imesa = I830_CONTEXT(ctx); + break; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); + case GL_POLYGON_STIPPLE: +#if 0 + /* The stipple command worked on my 855GM box, but not my 845G. + * I'll do more testing later to find out exactly which hardware + * supports it. Disabled for now. + */ + if (imesa->hw_stipple && imesa->reduced_primitive == GL_TRIANGLES) + { + I830_STATECHANGE(imesa, I830_UPLOAD_STIPPLE); + imesa->StippleSetup[I830_STPREG_ST1] &= ~ST1_ENABLE; + if (state) + imesa->StippleSetup[I830_STPREG_ST1] |= ST1_ENABLE; + } +#endif + break; - if(imesa->new_state & I830_NEW_TEXTURE) { - FLUSH_BATCH(imesa); - i830UpdateTextureState( ctx ); + default: + ; } - - imesa->new_state = 0; } @@ -1194,7 +1325,7 @@ int y1 = y0 + dPriv->h; /* Don't set drawing rectangle */ - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if (I830_DEBUG & DEBUG_IOCTL) fprintf(stderr, "%s x0(%d) x1(%d) y0(%d) y1(%d)\n", __FUNCTION__, x0, x1, y0, y1); @@ -1215,9 +1346,13 @@ */ imesa->BufferSetup[I830_DESTREG_DR2] = ((y0<<16) | x0); imesa->BufferSetup[I830_DESTREG_DR3] = (((y1+1)<<16) | (x1+1)); + + + /* Just add in our dirty flag, since we might be called when locked */ + /* Might want to modify how this is done. */ imesa->dirty |= I830_UPLOAD_BUFFERS; - if(I830_DEBUG&DEBUG_VERBOSE_STATE) + if (0) fprintf(stderr, "[%s] DR2(0x%08x) DR3(0x%08x) DR4(0x%08x)\n", __FUNCTION__, imesa->BufferSetup[I830_DESTREG_DR2], @@ -1225,108 +1360,137 @@ imesa->BufferSetup[I830_DESTREG_DR4]); } +/* This could be done in hardware, will do once I have the driver + * up and running. + */ +static void i830CalcViewport( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + const GLfloat *v = ctx->Viewport._WindowMap.m; + GLfloat *m = imesa->ViewportMatrix.m; + + /* See also i830_translate_vertex. SUBPIXEL adjustments can be done + * via state vars, too. + */ + m[MAT_SX] = v[MAT_SX]; + m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X; + m[MAT_SY] = - v[MAT_SY]; + m[MAT_TY] = - v[MAT_TY] + imesa->driDrawable->h + SUBPIXEL_Y; + m[MAT_SZ] = v[MAT_SZ] * imesa->depth_scale; + m[MAT_TZ] = v[MAT_TZ] * imesa->depth_scale; +} +static void i830Viewport( GLcontext *ctx, + GLint x, GLint y, + GLsizei width, GLsizei height ) +{ + i830CalcViewport( ctx ); +} -static void i830DDPrintDirty( const char *msg, GLuint state ) +static void i830DepthRange( GLcontext *ctx, + GLclampd nearval, GLclampd farval ) { - fprintf(stderr, "%s (0x%x): %s%s%s%s%s\n", + i830CalcViewport( ctx ); +} + +void i830PrintDirty( const char *msg, GLuint state ) +{ + fprintf(stderr, "%s (0x%x): %s%s%s%s%s%s%s\n", msg, (unsigned int) state, - (state & I830_UPLOAD_TEX0_IMAGE) ? "upload-tex0, " : "", - (state & I830_UPLOAD_TEX1_IMAGE) ? "upload-tex1, " : "", + (state & I830_UPLOAD_TEX0) ? "upload-tex0, " : "", + (state & I830_UPLOAD_TEX1) ? "upload-tex1, " : "", (state & I830_UPLOAD_CTX) ? "upload-ctx, " : "", (state & I830_UPLOAD_BUFFERS) ? "upload-bufs, " : "", - (state & I830_UPLOAD_CLIPRECTS) ? "upload-cliprects, " : "" + (state & I830_UPLOAD_TEXBLEND0) ? "upload-blend0, " : "", + (state & I830_UPLOAD_TEXBLEND1) ? "upload-blend1, " : "", + (state & I830_UPLOAD_STIPPLE) ? "stipple, " : "" ); } - /* Push the state into the sarea and/or texture memory. */ void i830EmitHwStateLocked( i830ContextPtr imesa ) { int i; - if (I830_DEBUG & DEBUG_VERBOSE_API) - i830DDPrintDirty( "\n\n\ni830EmitHwStateLocked", imesa->dirty ); - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); + if (I830_DEBUG & DEBUG_STATE) + i830PrintDirty( __FUNCTION__, imesa->dirty ); - if (imesa->dirty & ~I830_UPLOAD_CLIPRECTS) { - if ((imesa->dirty & I830_UPLOAD_TEX0_IMAGE) && imesa->CurrentTexObj[0]) - i830UploadTexImages(imesa, imesa->CurrentTexObj[0]); - - if ((imesa->dirty & I830_UPLOAD_TEX1_IMAGE) && imesa->CurrentTexObj[1]) - i830UploadTexImages(imesa, imesa->CurrentTexObj[1]); - - if (imesa->dirty & I830_UPLOAD_CTX) - memcpy( imesa->sarea->ContextState, - imesa->Setup, - sizeof(imesa->Setup) ); - - for(i = 0; i < I830_TEXTURE_COUNT; i++) { - if ((imesa->dirty & I830_UPLOAD_TEX_N(i)) && imesa->CurrentTexObj[i]) { - imesa->sarea->dirty |= I830_UPLOAD_TEX_N(i); - memcpy(imesa->sarea->TexState[i], - imesa->CurrentTexObj[i]->Setup, - sizeof(imesa->sarea->TexState[i])); - } + if ((imesa->dirty & I830_UPLOAD_TEX0_IMAGE) && imesa->CurrentTexObj[0]) + i830UploadTexImages(imesa, imesa->CurrentTexObj[0]); + if ((imesa->dirty & I830_UPLOAD_TEX1_IMAGE) && imesa->CurrentTexObj[1]) + i830UploadTexImages(imesa, imesa->CurrentTexObj[1]); + if (imesa->dirty & I830_UPLOAD_CTX) { + memcpy( imesa->sarea->ContextState, + imesa->Setup, sizeof(imesa->Setup) ); + } + + for (i = 0; i < I830_TEXTURE_COUNT; i++) { + if ((imesa->dirty & I830_UPLOAD_TEX_N(i)) && imesa->CurrentTexObj[i]) { + imesa->sarea->dirty |= I830_UPLOAD_TEX_N(i); + memcpy(imesa->sarea->TexState[i], + imesa->CurrentTexObj[i]->Setup, + sizeof(imesa->sarea->TexState[i])); + /* Update the LRU usage */ + if (imesa->CurrentTexObj[i]->MemBlock) + i830UpdateTexLRU(imesa, imesa->CurrentTexObj[i]); } - - /* Need to figure out if texturing state, or enable changed. */ + } + /* Need to figure out if texturing state, or enable changed. */ - for(i = 0; i < I830_TEXBLEND_COUNT; i++) { - if (imesa->dirty & I830_UPLOAD_TEXBLEND_N(i)) { - imesa->sarea->dirty |= I830_UPLOAD_TEXBLEND_N(i); - memcpy(imesa->sarea->TexBlendState[i], - imesa->TexBlend[i], - imesa->TexBlendWordsUsed[i] * 4); - imesa->sarea->TexBlendStateWordsUsed[i] = - imesa->TexBlendWordsUsed[i]; - } + for (i = 0; i < I830_TEXBLEND_COUNT; i++) { + if (imesa->dirty & I830_UPLOAD_TEXBLEND_N(i)) { + imesa->sarea->dirty |= I830_UPLOAD_TEXBLEND_N(i); + memcpy(imesa->sarea->TexBlendState[i],imesa->TexBlend[i], + imesa->TexBlendWordsUsed[i] * 4); + imesa->sarea->TexBlendStateWordsUsed[i] = + imesa->TexBlendWordsUsed[i]; } + } - if (imesa->dirty & I830_UPLOAD_BUFFERS) - memcpy( imesa->sarea->BufferState, - imesa->BufferSetup, - sizeof(imesa->BufferSetup) ); - - if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_SHARED) { - memcpy( imesa->sarea->Palette[0], - imesa->palette, - sizeof(imesa->sarea->Palette[0])); - } else { - i830TextureObjectPtr p; + if (imesa->dirty & I830_UPLOAD_BUFFERS) { + memcpy( imesa->sarea->BufferState,imesa->BufferSetup, + sizeof(imesa->BufferSetup) ); + } - if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_N(0)) { - p = imesa->CurrentTexObj[0]; - memcpy( imesa->sarea->Palette[0], - p->palette, - sizeof(imesa->sarea->Palette[0])); - } - if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_N(1)) { - p = imesa->CurrentTexObj[1]; - memcpy( imesa->sarea->Palette[1], - p->palette, - sizeof(imesa->sarea->Palette[1])); - } - } + if (imesa->dirty & I830_UPLOAD_STIPPLE) { + memcpy( imesa->sarea->StippleState,imesa->StippleSetup, + sizeof(imesa->StippleSetup) ); + } - imesa->sarea->dirty |= (imesa->dirty & - ~(I830_UPLOAD_TEX_MASK | - I830_UPLOAD_TEXBLEND_MASK)); - imesa->dirty &= I830_UPLOAD_CLIPRECTS; + if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_SHARED) { + memcpy( imesa->sarea->Palette[0],imesa->palette, + sizeof(imesa->sarea->Palette[0])); + } else { + i830TextureObjectPtr p; + if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_N(0)) { + p = imesa->CurrentTexObj[0]; + memcpy( imesa->sarea->Palette[0],p->palette, + sizeof(imesa->sarea->Palette[0])); + } + if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_N(1)) { + p = imesa->CurrentTexObj[1]; + memcpy( imesa->sarea->Palette[1], + p->palette, + sizeof(imesa->sarea->Palette[1])); + } } + + imesa->sarea->dirty |= (imesa->dirty & ~(I830_UPLOAD_TEX_MASK | + I830_UPLOAD_TEXBLEND_MASK)); + + imesa->upload_cliprects = GL_TRUE; + imesa->dirty = 0; } -void i830DDInitState( i830ContextPtr imesa ) + +void i830DDInitState( GLcontext *ctx ) { + i830ContextPtr imesa = I830_CONTEXT(ctx); i830ScreenPrivate *i830Screen = imesa->i830Screen; int i, j; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - imesa->clear_red = 0; imesa->clear_green = 0; imesa->clear_blue = 0; @@ -1338,8 +1502,8 @@ imesa->mask_alpha = GL_FALSE; /* Zero all texture state */ - for(i = 0; i < I830_TEXBLEND_COUNT; i++) { - for(j = 0; j < I830_TEXBLEND_SIZE; j++) { + for (i = 0; i < I830_TEXBLEND_COUNT; i++) { + for (j = 0; j < I830_TEXBLEND_SIZE; j++) { imesa->TexBlend[i][j] = 0; imesa->Init_TexBlend[i][j] = 0; } @@ -1410,12 +1574,16 @@ imesa->Init_TexBlendColorPipeNum[0] = 0; memset(imesa->Setup, 0, sizeof(imesa->Setup)); - - imesa->Setup[I830_CTXREG_VF] = VRTX_FORMAT_NTEX(1); + imesa->Setup[I830_CTXREG_VF] = (STATE3D_VERTEX_FORMAT_CMD | + VRTX_TEX_COORD_COUNT(1) | + VRTX_HAS_DIFFUSE | + VRTX_HAS_SPEC | + VRTX_HAS_XYZW); + imesa->vertex_format = 0; imesa->Setup[I830_CTXREG_VF2] = (STATE3D_VERTEX_FORMAT_2_CMD | VRTX_TEX_SET_0_FMT(TEXCOORDFMT_2D) | - VRTX_TEX_SET_1_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_1_FMT(TEXCOORDFMT_2D) | VRTX_TEX_SET_2_FMT(TEXCOORDFMT_2D) | VRTX_TEX_SET_3_FMT(TEXCOORDFMT_2D)); @@ -1436,7 +1604,7 @@ DISABLE_COLOR_BLEND | DISABLE_DEPTH_TEST); - if(imesa->hw_stencil) { + if (imesa->hw_stencil) { imesa->Setup[I830_CTXREG_ENABLES_2] = (STATE3D_ENABLES_2_CMD | ENABLE_STENCIL_WRITE | ENABLE_TEX_CACHE | @@ -1457,41 +1625,41 @@ } imesa->Setup[I830_CTXREG_STATE1] = (STATE3D_MODES_1_CMD | - ENABLE_COLR_BLND_FUNC | - BLENDFUNC_ADD | - ENABLE_SRC_BLND_FACTOR | - SRC_BLND_FACT(BLENDFACT_ONE) | - ENABLE_DST_BLND_FACTOR | - DST_BLND_FACT(BLENDFACT_ZERO) ); + ENABLE_COLR_BLND_FUNC | + BLENDFUNC_ADD | + ENABLE_SRC_BLND_FACTOR | + SRC_BLND_FACT(BLENDFACT_ONE) | + ENABLE_DST_BLND_FACTOR | + DST_BLND_FACT(BLENDFACT_ZERO) ); imesa->Setup[I830_CTXREG_STATE2] = (STATE3D_MODES_2_CMD | - ENABLE_GLOBAL_DEPTH_BIAS | - GLOBAL_DEPTH_BIAS(0) | - ENABLE_ALPHA_TEST_FUNC | - ALPHA_TEST_FUNC(COMPAREFUNC_ALWAYS) | - ALPHA_REF_VALUE(0) ); + ENABLE_GLOBAL_DEPTH_BIAS | + GLOBAL_DEPTH_BIAS(0) | + ENABLE_ALPHA_TEST_FUNC | + ALPHA_TEST_FUNC(COMPAREFUNC_ALWAYS) | + ALPHA_REF_VALUE(0) ); imesa->Setup[I830_CTXREG_STATE3] = (STATE3D_MODES_3_CMD | - ENABLE_DEPTH_TEST_FUNC | - DEPTH_TEST_FUNC(COMPAREFUNC_LESS) | - ENABLE_ALPHA_SHADE_MODE | - ALPHA_SHADE_MODE(SHADE_MODE_LINEAR) | - ENABLE_FOG_SHADE_MODE | - FOG_SHADE_MODE(SHADE_MODE_LINEAR) | - ENABLE_SPEC_SHADE_MODE | - SPEC_SHADE_MODE(SHADE_MODE_LINEAR) | - ENABLE_COLOR_SHADE_MODE | - COLOR_SHADE_MODE(SHADE_MODE_LINEAR) | - ENABLE_CULL_MODE | - CULLMODE_NONE); + ENABLE_DEPTH_TEST_FUNC | + DEPTH_TEST_FUNC(COMPAREFUNC_LESS) | + ENABLE_ALPHA_SHADE_MODE | + ALPHA_SHADE_MODE(SHADE_MODE_LINEAR) | + ENABLE_FOG_SHADE_MODE | + FOG_SHADE_MODE(SHADE_MODE_LINEAR) | + ENABLE_SPEC_SHADE_MODE | + SPEC_SHADE_MODE(SHADE_MODE_LINEAR) | + ENABLE_COLOR_SHADE_MODE | + COLOR_SHADE_MODE(SHADE_MODE_LINEAR) | + ENABLE_CULL_MODE | + CULLMODE_NONE); imesa->Setup[I830_CTXREG_STATE4] = (STATE3D_MODES_4_CMD | - ENABLE_LOGIC_OP_FUNC | - LOGIC_OP_FUNC(LOGICOP_COPY) | - ENABLE_STENCIL_TEST_MASK | - STENCIL_TEST_MASK(0xff) | - ENABLE_STENCIL_WRITE_MASK | - STENCIL_WRITE_MASK(0xff)); + ENABLE_LOGIC_OP_FUNC | + LOGIC_OP_FUNC(LOGICOP_COPY) | + ENABLE_STENCIL_TEST_MASK | + STENCIL_TEST_MASK(0xff) | + ENABLE_STENCIL_WRITE_MASK | + STENCIL_WRITE_MASK(0xff)); imesa->Setup[I830_CTXREG_STENCILTST] = (STATE3D_STENCIL_TEST_CMD | ENABLE_STENCIL_PARMS | @@ -1513,14 +1681,14 @@ FIXED_POINT_WIDTH(1) ); imesa->Setup[I830_CTXREG_IALPHAB] = (STATE3D_INDPT_ALPHA_BLEND_CMD | - DISABLE_INDPT_ALPHA_BLEND | - ENABLE_ALPHA_BLENDFUNC | - ABLENDFUNC_ADD); + DISABLE_INDPT_ALPHA_BLEND | + ENABLE_ALPHA_BLENDFUNC | + ABLENDFUNC_ADD); imesa->Setup[I830_CTXREG_FOGCOLOR] = (STATE3D_FOG_COLOR_CMD | - FOG_COLOR_RED(0) | - FOG_COLOR_GREEN(0) | - FOG_COLOR_BLUE(0)); + FOG_COLOR_RED(0) | + FOG_COLOR_GREEN(0) | + FOG_COLOR_BLUE(0)); imesa->Setup[I830_CTXREG_BLENDCOLR0] = (STATE3D_CONST_BLEND_COLOR_CMD); @@ -1528,16 +1696,18 @@ imesa->Setup[I830_CTXREG_MCSB0] = STATE3D_MAP_COORD_SETBIND_CMD; imesa->Setup[I830_CTXREG_MCSB1] = (TEXBIND_SET3(TEXCOORDSRC_VTXSET_3) | - TEXBIND_SET2(TEXCOORDSRC_VTXSET_2) | - TEXBIND_SET1(TEXCOORDSRC_VTXSET_1) | - TEXBIND_SET0(TEXCOORDSRC_VTXSET_0)); + TEXBIND_SET2(TEXCOORDSRC_VTXSET_2) | + TEXBIND_SET1(TEXCOORDSRC_VTXSET_1) | + TEXBIND_SET0(TEXCOORDSRC_VTXSET_0)); imesa->LcsCullMode = CULLMODE_CW; /* GL default */ memset(imesa->BufferSetup, 0, sizeof(imesa->BufferSetup)); + memset(imesa->StippleSetup, 0, sizeof(imesa->StippleSetup)); - if (imesa->glCtx->Color.DriverDrawBuffer == GL_BACK_LEFT) { + if (imesa->glCtx->Visual.doubleBufferMode && + imesa->sarea->pf_current_page == 0) { imesa->drawMap = i830Screen->back.map; imesa->readMap = i830Screen->back.map; imesa->BufferSetup[I830_DESTREG_CBUFADDR] = i830Screen->backOffset; @@ -1555,21 +1725,21 @@ case DV_PF_555: case DV_PF_565: imesa->BufferSetup[I830_DESTREG_DV1] = (DSTORG_HORT_BIAS(0x8) | /* .5 */ - DSTORG_VERT_BIAS(0x8) | /* .5 */ - i830Screen->fbFormat | - DEPTH_IS_Z | - DEPTH_FRMT_16_FIXED); + DSTORG_VERT_BIAS(0x8) | /* .5 */ + i830Screen->fbFormat | + DEPTH_IS_Z | + DEPTH_FRMT_16_FIXED); break; case DV_PF_8888: imesa->BufferSetup[I830_DESTREG_DV1] = (DSTORG_HORT_BIAS(0x8) | /* .5 */ - DSTORG_VERT_BIAS(0x8) | /* .5 */ - i830Screen->fbFormat | - DEPTH_IS_Z | - DEPTH_FRMT_24_FIXED_8_OTHER); + DSTORG_VERT_BIAS(0x8) | /* .5 */ + i830Screen->fbFormat | + DEPTH_IS_Z | + DEPTH_FRMT_24_FIXED_8_OTHER); break; } imesa->BufferSetup[I830_DESTREG_SENABLE] = (STATE3D_SCISSOR_ENABLE_CMD | - DISABLE_SCISSOR_RECT); + DISABLE_SCISSOR_RECT); imesa->BufferSetup[I830_DESTREG_SR0] = STATE3D_SCISSOR_RECT_0_CMD; imesa->BufferSetup[I830_DESTREG_SR1] = 0; imesa->BufferSetup[I830_DESTREG_SR2] = 0; @@ -1590,86 +1760,64 @@ } -#define INTERESTED (~(NEW_MODELVIEW|NEW_PROJECTION|\ - NEW_TEXTURE_MATRIX|\ - NEW_USER_CLIP|NEW_CLIENT_STATE)) - -void i830DDUpdateState( GLcontext *ctx ) +static void i830InvalidateState( GLcontext *ctx, GLuint new_state ) { - i830ContextPtr imesa = I830_CONTEXT( ctx ); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - /* Have to do this here to detect texture fallbacks in time */ - if (imesa->new_state & I830_NEW_TEXTURE) - i830DDUpdateHwState( ctx ); - - - if (ctx->NewState & INTERESTED) { - i830DDChooseRenderState(ctx); - i830ChooseRasterSetupFunc(ctx); - } - - if (0) - fprintf(stderr, "IndirectTriangles %x Fallback %x\n", - imesa->IndirectTriangles, imesa->Fallback); - - if (!imesa->Fallback) { - ctx->IndirectTriangles &= ~DD_SW_RASTERIZE; - ctx->IndirectTriangles |= imesa->IndirectTriangles; - - ctx->Driver.PointsFunc=imesa->PointsFunc; - ctx->Driver.LineFunc=imesa->LineFunc; - ctx->Driver.TriangleFunc=imesa->TriangleFunc; - ctx->Driver.QuadFunc=imesa->QuadFunc; - } + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + I830_CONTEXT(ctx)->new_state |= new_state; } - void i830DDInitStateFuncs(GLcontext *ctx) { - i830ContextPtr imesa = I830_CONTEXT( ctx ); + /* Callbacks for internal Mesa events. + */ + ctx->Driver.UpdateState = i830InvalidateState; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); + /* API callbacks + */ + ctx->Driver.AlphaFunc = i830AlphaFunc; + ctx->Driver.BlendEquation = i830BlendEquation; + ctx->Driver.BlendFunc = i830BlendFunc; + ctx->Driver.BlendFuncSeparate = i830BlendFuncSeparate; + ctx->Driver.BlendColor = i830BlendColor; + ctx->Driver.ClearColor = i830ClearColor; + ctx->Driver.ColorMask = i830ColorMask; + ctx->Driver.CullFace = i830CullFaceFrontFace; + ctx->Driver.DepthFunc = i830DepthFunc; + ctx->Driver.DepthMask = i830DepthMask; + ctx->Driver.Enable = i830Enable; + ctx->Driver.Fogfv = i830Fogfv; + ctx->Driver.FrontFace = i830CullFaceFrontFace; + ctx->Driver.LineWidth = i830LineWidth; + ctx->Driver.PointSize = i830PointSize; + ctx->Driver.LogicOpcode = i830LogicOp; + ctx->Driver.PolygonStipple = i830PolygonStippleFallback; + ctx->Driver.RenderMode = i830RenderMode; + ctx->Driver.Scissor = i830Scissor; + ctx->Driver.SetDrawBuffer = i830SetDrawBuffer; + ctx->Driver.ShadeModel = i830ShadeModel; + ctx->Driver.DepthRange = i830DepthRange; + ctx->Driver.Viewport = i830Viewport; + ctx->Driver.LightModelfv = i830LightModelfv; + + ctx->Driver.StencilFunc = i830StencilFunc; + ctx->Driver.StencilMask = i830StencilMask; + ctx->Driver.StencilOp = i830StencilOp; - ctx->Driver.UpdateState = i830DDUpdateState; - ctx->Driver.Enable = i830DDEnable; - ctx->Driver.AlphaFunc = i830DDAlphaFunc; - ctx->Driver.BlendEquation = i830DDBlendEquation; - ctx->Driver.BlendFunc = i830DDBlendFunc; - ctx->Driver.BlendFuncSeparate = i830DDBlendFuncSeparate; - ctx->Driver.BlendConstColor = i830DDBlendConstColor; - ctx->Driver.DepthFunc = i830DDDepthFunc; - ctx->Driver.DepthMask = i830DDDepthMask; - ctx->Driver.Fogfv = i830DDFogfv; - ctx->Driver.Scissor = i830DDScissor; - ctx->Driver.CullFace = i830DDCullFaceFrontFace; - ctx->Driver.FrontFace = i830DDCullFaceFrontFace; - ctx->Driver.ColorMask = i830DDColorMask; - ctx->Driver.ReducedPrimitiveChange = i830DDReducedPrimitiveChange; - ctx->Driver.RenderStart = i830DDUpdateHwState; - ctx->Driver.RenderFinish = 0; - - ctx->Driver.LineStipple = 0; - ctx->Driver.LineWidth = i830DDLineWidth; - ctx->Driver.LogicOpcode = i830DDLogicOp; - ctx->Driver.SetReadBuffer = i830DDSetReadBuffer; - ctx->Driver.SetDrawBuffer = i830DDSetDrawBuffer; - ctx->Driver.Color = i830DDSetColor; - ctx->Driver.ClearColor = i830DDClearColor; - ctx->Driver.Dither = NULL; - ctx->Driver.Index = 0; - ctx->Driver.ClearIndex = 0; - ctx->Driver.IndexMask = 0; - - if(imesa->hw_stencil) { - ctx->Driver.StencilFunc = i830DDStencilFunc; - ctx->Driver.StencilMask = i830DDStencilMask; - ctx->Driver.StencilOp = i830DDStencilOp; - } + /* Pixel path fallbacks. + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.Bitmap = _swrast_Bitmap; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; - ctx->Driver.LightModelfv = i830DDLightModelfv; - ctx->Driver.PointSize = i830DDPointSize; + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; } Index: xc/lib/GL/mesa/src/drv/i830/i830_state.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_state.h:1.3 --- /dev/null Thu Feb 27 12:26:26 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_state.h Mon Dec 9 20:26:53 2002 @@ -0,0 +1,68 @@ +/************************************************************************** + +Copyright 2001 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. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_state.h,v 1.3 2002/12/10 01:26:53 dawes Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ +#ifndef _I830_STATE_H +#define _I830_STATE_H + +#include "i830_context.h" +/*Maths macros from mmath.h*/ +#define FloatToInt(F) ((int)(F)) + +/* + * * This function/macro is sensitive to precision. Test carefully + * * if you change it. + * */ +#define FLOAT_COLOR_TO_UBYTE_COLOR(b, f) \ + do { \ + union {GLfloat r; GLuint i; } tmp; \ + tmp.r = f; \ + b = ((tmp.i >= IEEE_ONE) \ + ? ((GLint)tmp.i < 0) ? (GLubyte)0 : (GLubyte)255 \ + : (tmp.r = tmp.r*(255.0F/256.0F) + 32768.0F, \ + (GLubyte)tmp.i)); \ + } while (0) + + + +extern void i830DDInitState( GLcontext *ctx ); +extern void i830DDInitStateFuncs( GLcontext *ctx ); + +extern void i830PrintDirty( const char *msg, GLuint state ); +extern void i830SetDrawBuffer(GLcontext *ctx, GLenum mode ); + +extern void i830Fallback( i830ContextPtr imesa, GLuint bit, GLboolean mode ); +#define FALLBACK( imesa, bit, mode ) i830Fallback( imesa, bit, mode ) +#endif Index: xc/lib/GL/mesa/src/drv/i830/i830_tex.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_tex.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_tex.c:1.4 --- xc/lib/GL/mesa/src/drv/i830/i830_tex.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_tex.c Mon Dec 9 20:26:53 2002 @@ -1,6 +1,6 @@ /************************************************************************** -Copyright 2001 VA Linux Systems Inc., Fremont, California. +Copyright 2001 2d3d Inc., Delray Beach, FL All Rights Reserved. @@ -25,38 +25,59 @@ **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tex.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tex.c,v 1.4 2002/12/10 01:26:53 dawes Exp $ */ /* * Author: - * Jeff Hartmann + * Jeff Hartmann * * Heavily based on the I810 driver, which was written by: - * Keith Whitwell + * Keith Whitwell */ #include #include #include - -#include "types.h" +#include "glheader.h" +#include "mtypes.h" +#include "mem.h" +#include "simple_list.h" #include "enums.h" -#include "pb.h" -#include "dd.h" +#include "texstore.h" +#include "texformat.h" +#include "swrast/swrast.h" #include "mm.h" -#include "enums.h" -#include "i830_drv.h" +#include "i830_screen.h" +#include "i830_dri.h" +#include "i830_context.h" +#include "i830_tex.h" +#include "i830_state.h" #include "i830_ioctl.h" -#include "simple_list.h" -#include "texutil.h" + +/* + * Compute the 'S2.4' lod bias factor from the floating point OpenGL bias. + */ +static void i830ComputeLodBias(i830ContextPtr imesa, + i830TextureObjectPtr t, + GLfloat bias) +{ + int b; + + b = (int) (bias * 16.0); + if(b > 63) b = 63; + else if (b < -64) b = -64; + t->Setup[I830_TEXREG_TM0S3] &= ~TM0S3_LOD_BIAS_MASK; + t->Setup[I830_TEXREG_TM0S3] |= ((b << TM0S3_LOD_BIAS_SHIFT) & + TM0S3_LOD_BIAS_MASK); +} static void i830SetTexWrapping(i830TextureObjectPtr tex, GLenum swrap, GLenum twrap) { - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if(I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); tex->Setup[I830_TEXREG_MCS] &= ~(TEXCOORD_ADDR_U_MASK|TEXCOORD_ADDR_V_MASK); @@ -72,7 +93,9 @@ tex->Setup[I830_TEXREG_MCS] |= TEXCOORD_ADDR_U_MODE(TEXCOORDMODE_CLAMP_BORDER); break; + default: break; } + switch( twrap ) { case GL_REPEAT: tex->Setup[I830_TEXREG_MCS] |= TEXCOORD_ADDR_V_MODE(TEXCOORDMODE_WRAP); @@ -84,18 +107,18 @@ tex->Setup[I830_TEXREG_MCS] |= TEXCOORD_ADDR_V_MODE(TEXCOORDMODE_CLAMP_BORDER); break; + default: break; } - } static void i830SetTexFilter(i830ContextPtr imesa, i830TextureObjectPtr t, - GLenum minf, GLenum magf) + GLenum minf, GLenum magf, + GLfloat bias) { - GLuint LastLevel; int minFilt = 0, mipFilt = 0, magFilt = 0; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if(I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); switch (minf) { @@ -110,6 +133,11 @@ case GL_NEAREST_MIPMAP_NEAREST: minFilt = FILTER_NEAREST; mipFilt = MIPFILTER_NEAREST; + +/* if(magf == GL_LINEAR && 0) { */ +/* bias -= 0.5; */ +/* } */ + break; case GL_LINEAR_MIPMAP_NEAREST: minFilt = FILTER_LINEAR; @@ -118,6 +146,11 @@ case GL_NEAREST_MIPMAP_LINEAR: minFilt = FILTER_NEAREST; mipFilt = MIPFILTER_LINEAR; + +/* if(magf == GL_LINEAR && 0) { */ +/* bias -= 0.5; */ +/* } */ + break; case GL_LINEAR_MIPMAP_LINEAR: minFilt = FILTER_LINEAR; @@ -129,10 +162,6 @@ break; } - I830_SET_FIELD(t->Setup[I830_TEXREG_MF], - MIN_FILTER_MASK | MIP_FILTER_MASK, - MIN_FILTER(minFilt) | mipFilt); - switch (magf) { case GL_NEAREST: magFilt = FILTER_NEAREST; @@ -146,2113 +175,362 @@ break; } - I830_SET_FIELD(t->Setup[I830_TEXREG_MF], - MAG_FILTER_MASK, MAG_FILTER(magFilt)); - - if (t->globj->MinFilter != GL_NEAREST && - t->globj->MinFilter != GL_LINEAR) { - LastLevel = t->max_level; - } else { - LastLevel = t->min_level; - } + t->Setup[I830_TEXREG_TM0S3] &= ~TM0S3_MIN_FILTER_MASK; + t->Setup[I830_TEXREG_TM0S3] &= ~TM0S3_MIP_FILTER_MASK; + t->Setup[I830_TEXREG_TM0S3] &= ~TM0S3_MAG_FILTER_MASK; + t->Setup[I830_TEXREG_TM0S3] |= ((minFilt << TM0S3_MIN_FILTER_SHIFT) | + (mipFilt << TM0S3_MIP_FILTER_SHIFT) | + (magFilt << TM0S3_MAG_FILTER_SHIFT)); - I830_SET_FIELD(t->Setup[I830_TEXREG_MLL], - LOD_MAX_MASK, - LOD_MAX(t->min_level << 4)); - - I830_SET_FIELD(t->Setup[I830_TEXREG_MLL], - LOD_MIN_MASK, - LOD_MIN(LastLevel)); - - /* See OpenGL 1.2 specification */ - if (magf == GL_LINEAR && (minf == GL_NEAREST_MIPMAP_NEAREST || - minf == GL_NEAREST_MIPMAP_LINEAR)) - { - /* c = 0.5 */ - I830_SET_FIELD(t->Setup[I830_TEXREG_MLC], - MAP_LOD_MASK, 0x10); - } else { - /* c = 0 */ - I830_SET_FIELD(t->Setup[I830_TEXREG_MLC], - MAP_LOD_MASK, 0x0); - } + i830ComputeLodBias(imesa, t, bias); } - -/* XXX - have to make sure MI0 has length field set to include color */ static void i830SetTexBorderColor(i830TextureObjectPtr t, GLubyte color[4]) { - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + if(I830_DEBUG&DEBUG_DRI) fprintf(stderr, "%s\n", __FUNCTION__); - t->Setup[I830_TEXREG_MI5] = + t->Setup[I830_TEXREG_TM0S4] = I830PACKCOLOR8888(color[0],color[1],color[2],color[3]); } -static void ReplicateMesaTexState(i830ContextPtr imesa, - i830TextureObjectPtr t, - struct gl_texture_object *mesatex) -{ - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - i830SetTexWrapping(t,mesatex->WrapS,mesatex->WrapT); - i830SetTexFilter(imesa, t,mesatex->MinFilter,mesatex->MagFilter); - i830SetTexBorderColor(t,mesatex->BorderColor); -} - -/* Utility function to setup the texture palette */ -static void -i830ConvertPalette(GLuint *data, const struct gl_color_table *table) +static void i830TexParameter( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj, + GLenum pname, const GLfloat *params ) { - const GLubyte *tableUB = (const GLubyte *) table->Table; - GLint width = table->Size; - GLuint r, g, b, a; - int i; + i830ContextPtr imesa = I830_CONTEXT(ctx); + i830TextureObjectPtr t = (i830TextureObjectPtr) tObj->DriverData; + GLuint unit = ctx->Texture.CurrentUnit; + if (!t) + return; - ASSERT(table->TableType == GL_UNSIGNED_BYTE); + if ( target != GL_TEXTURE_2D ) + return; - 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] = I830PACKCOLOR4444(r, g, b, a); - } - 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]; - data[i] = I830PACKCOLOR565(r, g, b); - } - break; - case GL_LUMINANCE: - for (i = 0; i < width; i++) { - r = tableUB[i]; - data[i] = (255 << 8) | r; - } - break; - case GL_ALPHA: - for (i = 0; i < width; i++) { - a = tableUB[i]; - data[i] = (a << 8) | 255; - } - break; - case GL_LUMINANCE_ALPHA: - for (i = 0; i < width; i++) { - r = tableUB[i * 2 + 0]; - a = tableUB[i * 2 + 1]; - data[i] = (a << 8) | r; - } - break; - case GL_INTENSITY: - for (i = 0; i < width; i++) { - a = tableUB[i]; - data[i] = (a << 8) | a; + /* Can't do the update now as we don't know whether to flush + * vertices or not. Setting imesa->new_state means that + * i830UpdateTextureState() will be called before any triangles are + * rendered. If a statechange has occurred, it will be detected at + * that point, and buffered vertices flushed. + */ + switch (pname) { + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_MAG_FILTER: + { + GLfloat bias = ctx->Texture.Unit[unit].LodBias; + i830SetTexFilter( imesa, t, tObj->MinFilter, tObj->MagFilter, bias ); } break; - } -} - -static i830TextureObjectPtr i830CreateTexObj(i830ContextPtr imesa, - struct gl_texture_object *tObj) -{ - i830TextureObjectPtr t; - GLuint height, width, pitch, i, textureFormat; - struct gl_texture_image *image; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - image = tObj->Image[ 0 ]; - if ( !image ) { - fprintf(stderr, "no image at level zero - not creating texobj\n"); - return 0; - } - - t = (i830TextureObjectPtr) calloc(1,sizeof(*t)); - if (!t) { - fprintf(stderr, "failed to allocate memory - not creating texobj\n"); - return 0; - } - switch( image->Format ) { - case GL_RGB: - image->TexFormat = &(_mesa_texformat_rgb565); - t->texelBytes = 2; - textureFormat = MAPSURF_16BIT | MT_16BIT_RGB565; + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + i830SetTexWrapping( t, tObj->WrapS, tObj->WrapT ); break; - case GL_RGBA: - image->TexFormat = &(_mesa_texformat_argb4444); - t->texelBytes = 2; - textureFormat = MAPSURF_16BIT | MT_16BIT_ARGB4444; + + case GL_TEXTURE_BORDER_COLOR: + i830SetTexBorderColor( t, tObj->BorderColor ); break; - case GL_ALPHA: - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - image->TexFormat = &(_mesa_texformat_al88); - t->texelBytes = 2; - textureFormat = MAPSURF_16BIT | MT_16BIT_AY88; - break; - case GL_COLOR_INDEX: - image->TexFormat = &(_mesa_texformat_ci8); - textureFormat = MAPSURF_8BIT_INDEXED; - t->texelBytes = 1; - - switch(tObj->Palette.Format) { - case GL_RGBA: - textureFormat |= MT_8BIT_IDX_ARGB4444; - break; - case GL_RGB: - textureFormat |= MT_8BIT_IDX_RGB565; - break; - case GL_LUMINANCE: - case GL_ALPHA: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - textureFormat |= MT_8BIT_IDX_AY88; break; - } - /* Insure the palette is loaded */ - i830ConvertPalette(t->palette, &tObj->Palette); - t->palette_format = tObj->Palette.Format; + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + /* The i830 and its successors can do a lot of this without + * reloading the textures. A project for someone? + */ + I830_FIREVERTICES( I830_CONTEXT(ctx) ); + i830SwapOutTexObj( imesa, t ); break; - default: - fprintf(stderr, "i830CreateTexObj: bad image->Format\n"); - free( t ); - return 0; - } - - /* Figure out the size now (and count the levels). Upload won't be done - * until later. - */ - width = image->Width * t->texelBytes; - if(width % 4) { - fprintf(stderr, "Pitch is not a multiple of dwords\n"); - } - pitch = width; /* All pitches can be used, since we are not using - * tiled surfaces. - */ - - t->dirty_images = 0; - t->bound = 0; - - for ( height = i = 0 ; i < I830_TEX_MAXLEVELS && tObj->Image[i] ; i++ ) { - t->image[i].image = tObj->Image[i]; - t->image[i].offset = height * pitch; - t->image[i].internalFormat = image->Format; - t->dirty_images |= (1<image[i].image->Height; - } - - t->Pitch = pitch; - t->totalSize = height*pitch; - t->max_level = i-1; - t->min_level = 0; - t->globj = tObj; - t->age = 0; - - t->Setup[I830_TEXREG_MI0] = STATE3D_MAP_INFO_COLR_CMD; - - t->Setup[I830_TEXREG_MI1] = MAP_INFO_TEX(0) | - textureFormat | - MAP_INFO_OUTMUX_F0F1F2F3 | - MAP_INFO_VERTLINESTRIDE_0 | - MAP_INFO_VERTLINESTRIDEOFS_0 | - MAP_INFO_FORMAT_2D | - MAP_INFO_USE_FENCE; - - t->Setup[I830_TEXREG_MI2] = (((1 << image->HeightLog2) - 1) << 16) | - ((1 << image->WidthLog2) - 1); - - t->Setup[I830_TEXREG_MI3] = 0; - - t->Setup[I830_TEXREG_MI4] = ((pitch / 4) - 1) << 2; - - t->Setup[I830_TEXREG_MI5] = 0; - - t->Setup[I830_TEXREG_MLC] = STATE3D_MAP_LOD_CNTL_CMD | MAP_UNIT(0) | - ENABLE_TEXLOD_BIAS | - MAP_LOD_BIAS(0); - - t->Setup[I830_TEXREG_MLL] = STATE3D_MAP_LOD_LIMITS_CMD | MAP_UNIT(0) | - ENABLE_MAX_MIP_LVL | - LOD_MAX(t->min_level << 4) | - ENABLE_MIN_MIP_LVL | - LOD_MIN(t->max_level); - - /* I think this is context state, really. - */ - t->Setup[I830_TEXREG_MCS] = STATE3D_MAP_COORD_SET_CMD | MAP_UNIT(0) | - ENABLE_TEXCOORD_PARAMS | - TEXCOORDS_ARE_NORMAL | - TEXCOORDTYPE_CARTESIAN | - ENABLE_ADDR_V_CNTL | - TEXCOORD_ADDR_V_MODE(TEXCOORDMODE_WRAP) | - ENABLE_ADDR_U_CNTL | - TEXCOORD_ADDR_U_MODE(TEXCOORDMODE_WRAP); - - t->Setup[I830_TEXREG_MF] = STATE3D_MAP_FILTER_CMD | MAP_UNIT(0) | - ENABLE_MIP_MODE_FILTER | - MIPFILTER_NEAREST | - ENABLE_MAG_MODE_FILTER | - MAG_FILTER(FILTER_LINEAR) | - ENABLE_MIN_MODE_FILTER | - MIN_FILTER(FILTER_LINEAR); - - t->current_unit = 0; - - ReplicateMesaTexState(imesa, t,tObj); - tObj->DriverData = t; - /* Forces tex cache flush */ - imesa->dirty |= I830_UPLOAD_CTX; - make_empty_list( t ); - return t; -} - -void i830DestroyTexObj(i830ContextPtr imesa, i830TextureObjectPtr t) -{ - if (!t) return; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - /* This is sad - need to sync *in case* we upload a texture - * to this newly free memory... - */ - if (t->MemBlock) { - mmFreeMem(t->MemBlock); - t->MemBlock = 0; - - if (t->age > imesa->dirtyAge) - imesa->dirtyAge = t->age; - } - - if (t->globj) - t->globj->DriverData = 0; - - if (t->bound) - imesa->CurrentTexObj[t->bound - 1] = 0; - - remove_from_list(t); - free(t); -} - - -static void i830SwapOutTexObj(i830ContextPtr imesa, i830TextureObjectPtr t) -{ - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - if (t->MemBlock) { - mmFreeMem(t->MemBlock); - t->MemBlock = 0; - - if (t->age > imesa->dirtyAge) - imesa->dirtyAge = t->age; - } - - t->dirty_images = ~0; - move_to_tail(&(imesa->SwappedOut), t); -} - - - -/* Upload an image from mesa's internal copy. - */ -static void i830UploadTexLevel( i830TextureObjectPtr t, int level ) -{ - const struct gl_texture_image *image = t->image[level].image; - int i,j; - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - if (I830_DEBUG & DEBUG_VERBOSE_LRU) - fprintf(stderr, "i830UploadTexLevel %d, BufAddr %p offset %x\n", - level, t->BufAddr, t->image[level].offset); - - switch (t->image[level].internalFormat) { - case GL_RGB: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = I830PACKCOLOR565(src[0],src[1],src[2]); - src += 3; - } - } - } - break; - - case GL_RGBA: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = I830PACKCOLOR4444(src[0],src[1],src[2],src[3]); - src += 4; - } - } - } - break; - - case GL_INTENSITY: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - int i; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = (src[0] << 8) | (src[0]); - src ++; - } - } - } - break; - - case GL_LUMINANCE: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = (255 << 8) | (src[0]); - src ++; - } - } - } - break; - - case GL_LUMINANCE_ALPHA: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = (src[1] << 8) | (src[0]); - src += 2; - } - } - } - break; - - case GL_ALPHA: - { - GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = (src[0] << 8) | 255; - src += 1; - } - } - } - break; - - case GL_COLOR_INDEX: - { - GLubyte *dst = (GLubyte *)(t->BufAddr + t->image[level].offset); - GLubyte *src = (GLubyte *)image->Data; - - for (j = 0 ; j < image->Height ; j++, dst += t->Pitch) { - for (i = 0 ; i < image->Width ; i++) { - dst[i] = src[0]; - src += 1; - } - } - } - break; - default: - fprintf(stderr, "Not supported texture format %s\n", - gl_lookup_enum_by_nr(image->Format)); - } -} - - - -void i830PrintLocalLRU( i830ContextPtr imesa ) -{ - i830TextureObjectPtr t; - int sz = 1 << (imesa->i830Screen->logTextureGranularity); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - foreach( t, &imesa->TexObjList ) { - if (!t->globj) - fprintf(stderr, "Placeholder %d at %x sz %x\n", - t->MemBlock->ofs / sz, - t->MemBlock->ofs, - t->MemBlock->size); - else - fprintf(stderr, "Texture (bound %d) at %x sz %x\n", - t->bound, - t->MemBlock->ofs, - t->MemBlock->size); - - } -} - -void i830PrintGlobalLRU( i830ContextPtr imesa ) -{ - int i, j; - I830TexRegion *list = imesa->sarea->texList; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - for (i = 0, j = I830_NR_TEX_REGIONS ; i < I830_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 == I830_NR_TEX_REGIONS) break; + return; } - - if (j != I830_NR_TEX_REGIONS) - fprintf(stderr, "Loop detected in global LRU\n"); -} - -void i830ResetGlobalLRU( i830ContextPtr imesa ) -{ - I830TexRegion *list = imesa->sarea->texList; - int sz = 1 << imesa->i830Screen->logTextureGranularity; - int i; - - /* (Re)initialize the global circular LRU list. The last element - * in the array (I830_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. - */ - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - for (i = 0 ; (i+1) * sz <= imesa->i830Screen->textureSize ; i++) { - list[i].prev = i-1; - list[i].next = i+1; - list[i].age = 0; + if (t == imesa->CurrentTexObj[unit]) { + I830_STATECHANGE( imesa, I830_UPLOAD_TEX0 ); } - - i--; - list[0].prev = I830_NR_TEX_REGIONS; - list[i].prev = i-1; - list[i].next = I830_NR_TEX_REGIONS; - list[I830_NR_TEX_REGIONS].prev = i; - list[I830_NR_TEX_REGIONS].next = 0; - imesa->sarea->texAge = 0; } -static void i830UpdateTexLRU( i830ContextPtr imesa, i830TextureObjectPtr t ) +static void i830TexEnv( GLcontext *ctx, GLenum target, + GLenum pname, const GLfloat *param ) { - int i; - int logsz = imesa->i830Screen->logTextureGranularity; - int start = t->MemBlock->ofs >> logsz; - int end = (t->MemBlock->ofs + t->MemBlock->size - 1) >> logsz; - I830TexRegion *list = imesa->sarea->texList; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - imesa->texAge = ++imesa->sarea->texAge; - - /* Update our local LRU - */ - move_to_head( &(imesa->TexObjList), t ); + i830ContextPtr imesa = I830_CONTEXT( ctx ); + GLuint unit = ctx->Texture.CurrentUnit; - /* Update the global LRU + /* Only one env color. Need a fallback if env colors are different + * and texture setup references env color in both units. */ - for (i = start ; i <= end ; i++) { - - list[i].in_use = 1; - list[i].age = imesa->texAge; - - /* remove_from_list(i) - */ - 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 = I830_NR_TEX_REGIONS; - list[i].next = list[I830_NR_TEX_REGIONS].next; - list[(unsigned)list[I830_NR_TEX_REGIONS].next].prev = i; - list[I830_NR_TEX_REGIONS].next = i; - } -} - - -/* Called for every shared texture region which has increased in age - * 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. - */ -void i830TexturesGone( i830ContextPtr imesa, - GLuint offset, - GLuint size, - GLuint in_use ) -{ - i830TextureObjectPtr t, tmp; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - foreach_s ( t, tmp, &imesa->TexObjList ) { - - if (t->MemBlock->ofs >= offset + size || - t->MemBlock->ofs + t->MemBlock->size <= offset) - continue; - - /* It overlaps - kick it off. Need to hold onto the currently bound - * objects, however. - */ - if (t->bound) - i830SwapOutTexObj( imesa, t ); - else - i830DestroyTexObj( imesa, t ); - } - - - if (in_use) { - t = (i830TextureObjectPtr) calloc(1,sizeof(*t)); - if (!t) return; - - t->MemBlock = mmAllocMem( imesa->texHeap, size, 0, offset); - insert_at_head( &imesa->TexObjList, t ); - } -} - -/* This is called with the lock held. May have to eject our own and/or - * other client's texture objects to make room for the upload. - */ -int i830UploadTexImages( i830ContextPtr imesa, i830TextureObjectPtr t ) -{ - int i; - int ofs; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); + switch (pname) { + case GL_TEXTURE_ENV_COLOR: + case GL_TEXTURE_ENV_MODE: + case GL_COMBINE_RGB_EXT: + case GL_COMBINE_ALPHA_EXT: + case GL_SOURCE0_RGB_EXT: + case GL_SOURCE1_RGB_EXT: + case GL_SOURCE2_RGB_EXT: + case GL_SOURCE0_ALPHA_EXT: + case GL_SOURCE1_ALPHA_EXT: + case GL_SOURCE2_ALPHA_EXT: + case GL_OPERAND0_RGB_EXT: + case GL_OPERAND1_RGB_EXT: + case GL_OPERAND2_RGB_EXT: + case GL_OPERAND0_ALPHA_EXT: + case GL_OPERAND1_ALPHA_EXT: + case GL_OPERAND2_ALPHA_EXT: + case GL_RGB_SCALE_EXT: + case GL_ALPHA_SCALE: + imesa->TexEnvImageFmt[unit] = 0; /* force recalc of env state */ + break; - /* Do we need to eject LRU texture objects? - */ - if (!t->MemBlock) { - while (1) + case GL_TEXTURE_LOD_BIAS_EXT: { - t->MemBlock = mmAllocMem( imesa->texHeap, t->totalSize, 12, 0 ); - if (t->MemBlock) - break; - - if (imesa->TexObjList.prev->bound) { - fprintf(stderr, "Hit bound texture in upload\n"); - i830PrintLocalLRU( imesa ); - return -1; - } - - if (imesa->TexObjList.prev == &(imesa->TexObjList)) { - fprintf(stderr, "Failed to upload texture, sz %d\n", t->totalSize); - mmDumpMemInfo( imesa->texHeap ); - return -1; + struct gl_texture_object *tObj = ctx->Texture.Unit[unit]._Current; + i830TextureObjectPtr t = (i830TextureObjectPtr) tObj->DriverData; + i830ComputeLodBias(imesa, t, *param); + /* Do a state change */ + if (t == imesa->CurrentTexObj[unit]) { + I830_STATECHANGE( imesa, I830_UPLOAD_TEX_N(unit) ); } - - i830DestroyTexObj( imesa, imesa->TexObjList.prev ); } - - ofs = t->MemBlock->ofs; - t->Setup[I830_TEXREG_MI3] = imesa->i830Screen->textureOffset + ofs; - t->BufAddr = imesa->i830Screen->tex.map + ofs; - imesa->dirty |= I830_UPLOAD_CTX; - } - - /* Let the world know we've used this memory recently. - */ - i830UpdateTexLRU( imesa, t ); - - if (I830_DEBUG & DEBUG_VERBOSE_LRU) - fprintf(stderr, "dispatch age: %d age freed memory: %d\n", - GET_DISPATCH_AGE(imesa), imesa->dirtyAge); - - if (imesa->dirtyAge >= GET_DISPATCH_AGE(imesa)) - i830WaitAgeLocked( imesa, imesa->dirtyAge ); - - - if (t->dirty_images) { - if (I830_DEBUG & DEBUG_VERBOSE_LRU) - fprintf(stderr, "*"); - - for (i = t->min_level ; i <= t->max_level ; i++) - if (t->dirty_images & (1<dirty_images = 0; - return 0; -} - -static void i830TexSetUnit( i830TextureObjectPtr t, GLuint unit ) -{ - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s unit(%d)\n", __FUNCTION__, unit); - - /* This will need to be changed when I support more then 2 t units */ - I830_SET_FIELD(t->Setup[I830_TEXREG_MI1], - MAP_INFO_MASK | MAP_INFO_USE_PALETTE_1, - MAP_INFO_TEX(unit) | MAP_INFO_USE_PALETTE_N(unit)); - I830_SET_FIELD(t->Setup[I830_TEXREG_MLC], MAP_UNIT_MASK, MAP_UNIT(unit)); - I830_SET_FIELD(t->Setup[I830_TEXREG_MLL], MAP_UNIT_MASK, MAP_UNIT(unit)); - I830_SET_FIELD(t->Setup[I830_TEXREG_MCS], MAP_UNIT_MASK, MAP_UNIT(unit)); - I830_SET_FIELD(t->Setup[I830_TEXREG_MF], MAP_UNIT_MASK, MAP_UNIT(unit)); - - t->current_unit = unit; -} - -static __inline__ GLuint GetTexelOp(GLint unit) -{ - switch(unit) { - case 0: return TEXBLENDARG_TEXEL0; - case 1: return TEXBLENDARG_TEXEL1; - case 2: return TEXBLENDARG_TEXEL2; - case 3: return TEXBLENDARG_TEXEL3; - default: return TEXBLENDARG_TEXEL0; - } -} - -/* Only 1.2 modes; make another func for combine, combine4, combiners */ -static void i830SetBlend_GL1_2(i830ContextPtr imesa, int curTex, - GLenum envMode, GLenum format) -{ - GLuint texel_op = GetTexelOp(curTex); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s %s %s unit (%d) texel_op(0x%x)\n", - __FUNCTION__, - gl_lookup_enum_by_nr(format), - gl_lookup_enum_by_nr(envMode), - curTex, - texel_op); - - switch(envMode) { - case GL_REPLACE: - switch(format) { - case GL_ALPHA: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; - case GL_LUMINANCE: - case GL_RGB: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; - - case GL_INTENSITY: - case GL_LUMINANCE_ALPHA: - case GL_RGBA: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; - default: - /* Always set to passthru if something is funny */ - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; - } - break; - - case GL_MODULATE: - switch(format) { - case GL_ALPHA: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_MODULATE); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 5; - break; - - case GL_LUMINANCE: - case GL_RGB: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_MODULATE); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 5; - break; - - case GL_INTENSITY: - case GL_LUMINANCE_ALPHA: - case GL_RGBA: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_MODULATE); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_MODULATE); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 6; - break; - default: - /* Always set to passthru if something is funny */ - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; - } - break; - - case GL_DECAL: - switch(format) { - case GL_RGB: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; - - case GL_RGBA: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_BLEND); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG0 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_REPLICATE_ALPHA | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 6; - break; - default: - /* Always set to passthru if something is funny */ - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; - } break; - case GL_BLEND: - switch(format) { - case GL_ALPHA: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_MODULATE); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 5; - break; - - case GL_LUMINANCE: - case GL_RGB: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_BLEND); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG0 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_FACTOR_N); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 6; - break; - - case GL_INTENSITY: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_BLEND); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_BLEND); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG0 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_FACTOR_N); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG0 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][6] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_FACTOR_N); - imesa->TexBlend[curTex][7] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 8; - break; - - case GL_LUMINANCE_ALPHA: - case GL_RGBA: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_BLEND); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_MODULATE); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG0 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_FACTOR_N); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][6] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 7; - break; - default: - /* Always set to passthru if something is funny */ - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; - } - break; - - case GL_ADD: - switch(format) { - case GL_ALPHA: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_MODULATE); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 5; - break; - case GL_LUMINANCE: - case GL_RGB: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ADD); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 5; - break; - - case GL_INTENSITY: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ADD); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ADD); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 6; - break; - - case GL_LUMINANCE_ALPHA: - case GL_RGBA: - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ADD); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_MODULATE); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - texel_op); - imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | - TEXPIPE_ALPHA | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 6; - break; - default: - /* Always set to passthru if something is funny */ - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; - } - break; default: - /* Always set to passthru if something is funny */ - imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_CURRENT); - imesa->TexBlendColorPipeNum[curTex] = 0; - imesa->TexBlendWordsUsed[curTex] = 4; - break; + break; } - - if (I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); -} +} -static void i830SetTexEnvCombine(i830ContextPtr imesa, - struct gl_texture_unit *texUnit, - GLint unit) +static void i830TexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) { - GLuint blendop; - GLuint ablendop; - GLuint args_RGB[3]; - GLuint args_A[3]; - GLuint texel_op = GetTexelOp(unit); - int i; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - switch(texUnit->CombineModeRGB) { - case GL_REPLACE: blendop = TEXBLENDOP_ARG1; break; - case GL_MODULATE: blendop = TEXBLENDOP_MODULATE; break; - case GL_ADD: blendop = TEXBLENDOP_ADD; break; - case GL_ADD_SIGNED_EXT: blendop = TEXBLENDOP_ADDSIGNED; break; - case GL_INTERPOLATE_EXT: blendop = TEXBLENDOP_BLEND; break; - default: return; - } - - switch(texUnit->CombineScaleShiftRGB) { - case 0: blendop |= TEXOP_SCALE_1X; break; - case 1: blendop |= TEXOP_SCALE_2X; break; - case 2: blendop |= TEXOP_SCALE_4X; break; - default: return; - } - - switch(texUnit->CombineModeA) { - case GL_REPLACE: ablendop = TEXBLENDOP_ARG1; break; - case GL_MODULATE: ablendop = TEXBLENDOP_MODULATE; break; - case GL_ADD: ablendop = TEXBLENDOP_ADD; break; - case GL_ADD_SIGNED_EXT: ablendop = TEXBLENDOP_ADDSIGNED; break; - case GL_INTERPOLATE_EXT: ablendop = TEXBLENDOP_BLEND; break; - default: return; - } - - switch(texUnit->CombineScaleShiftA) { - case 0: ablendop |= TEXOP_SCALE_1X; break; - case 1: ablendop |= TEXOP_SCALE_2X; break; - case 2: ablendop |= TEXOP_SCALE_4X; break; - default: return; - } - - /* Handle RGB args */ - for(i = 0; i < 3; i++) { - switch(texUnit->CombineSourceRGB[i]) { - case GL_TEXTURE: args_RGB[i] = texel_op; break; - case GL_CONSTANT_EXT: args_RGB[i] = TEXBLENDARG_FACTOR_N; break; - case GL_PRIMARY_COLOR_EXT: args_RGB[i] = TEXBLENDARG_DIFFUSE; break; - case GL_PREVIOUS_EXT: args_RGB[i] = TEXBLENDARG_CURRENT; break; - default: return; - } - - switch(texUnit->CombineOperandRGB[i]) { - case GL_SRC_COLOR: args_RGB[i] |= 0; break; - case GL_ONE_MINUS_SRC_COLOR: args_RGB[i] |= TEXBLENDARG_INV_ARG; break; - case GL_SRC_ALPHA: args_RGB[i] |= TEXBLENDARG_REPLICATE_ALPHA; break; - case GL_ONE_MINUS_SRC_ALPHA: - args_RGB[i] |= (TEXBLENDARG_REPLICATE_ALPHA | - TEXBLENDARG_INV_ARG); - break; - default: return; - } - } - - /* Handle A args */ - for(i = 0; i < 3; i++) { - switch(texUnit->CombineSourceA[i]) { - case GL_TEXTURE: args_A[i] = texel_op; break; - case GL_CONSTANT_EXT: args_A[i] = TEXBLENDARG_FACTOR_N; break; - case GL_PRIMARY_COLOR_EXT: args_A[i] = TEXBLENDARG_DIFFUSE; break; - case GL_PREVIOUS_EXT: args_A[i] = TEXBLENDARG_CURRENT; break; - default: return; - } - - switch(texUnit->CombineOperandA[i]) { - case GL_SRC_ALPHA: args_A[i] |= 0; break; - case GL_ONE_MINUS_SRC_ALPHA: args_A[i] |= TEXBLENDARG_INV_ARG; break; - default: return; - } - } - - /* Native Arg1 == Arg0 in GL_EXT_texture_env_combine spec */ - /* Native Arg2 == Arg1 in GL_EXT_texture_env_combine spec */ - /* Native Arg0 == Arg2 in GL_EXT_texture_env_combine spec */ - - /* When we render we need to figure out which is the last really enabled - * tex unit, and put last stage on it - */ - - imesa->TexBlendColorPipeNum[unit] = 0; - - /* Build color pipeline */ - - imesa->TexBlend[unit][0] = (STATE3D_MAP_BLEND_OP_CMD(unit) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_MODIFY_PARMS | - blendop); - imesa->TexBlend[unit][1] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - args_RGB[0]); - imesa->TexBlend[unit][2] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | - TEXPIPE_COLOR | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - args_RGB[1]); - imesa->TexBlend[unit][3] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | - TEXPIPE_COLOR | - TEXBLEND_ARG0 | - TEXBLENDARG_MODIFY_PARMS | - args_RGB[2]); - - /* Build Alpha pipeline */ - imesa->TexBlend[unit][4] = (STATE3D_MAP_BLEND_OP_CMD(unit) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_MODIFY_PARMS | - ablendop); - imesa->TexBlend[unit][5] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - args_A[0]); - imesa->TexBlend[unit][6] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | - TEXPIPE_ALPHA | - TEXBLEND_ARG2 | - TEXBLENDARG_MODIFY_PARMS | - args_A[1]); - imesa->TexBlend[unit][7] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | - TEXPIPE_ALPHA | - TEXBLEND_ARG0 | - TEXBLENDARG_MODIFY_PARMS | - args_A[2]); - - { - GLubyte r, g, b, a; - GLfloat *fc = texUnit->EnvColor; - - FLOAT_COLOR_TO_UBYTE_COLOR(r, fc[RCOMP]); - FLOAT_COLOR_TO_UBYTE_COLOR(g, fc[GCOMP]); - FLOAT_COLOR_TO_UBYTE_COLOR(b, fc[BCOMP]); - FLOAT_COLOR_TO_UBYTE_COLOR(a, fc[ACOMP]); - - imesa->TexBlend[unit][8] = STATE3D_COLOR_FACTOR_CMD(unit); - imesa->TexBlend[unit][9] = ((a << 24) | - (r << 16) | - (g << 8) | - b); + i830TextureObjectPtr t = (i830TextureObjectPtr) texObj->DriverData; + if (t) { + I830_FIREVERTICES( I830_CONTEXT(ctx) ); + i830SwapOutTexObj( I830_CONTEXT(ctx), t ); } - imesa->TexBlendWordsUsed[unit] = 10; -} - -static void i830UpdateTexState( GLcontext *ctx, int unit ) + _mesa_store_teximage2d( ctx, target, level, internalFormat, + width, height, border, format, type, + pixels, packing, texObj, texImage ); +} + +static void i830TexSubImage2D( 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 ) { - i830ContextPtr imesa = I830_CONTEXT(ctx); - struct gl_texture_object *tObj; - i830TextureObjectPtr t; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - tObj = ctx->Texture.Unit[unit].Current; - - if ( tObj != ctx->Texture.Unit[unit].CurrentD[2] ) - tObj = 0; - - /* XXX grantham - need to change this shift if "TEXTURE" flags change - in mesa/src/types.h */ - if (!(ctx->Texture.ReallyEnabled & (0xf << (4 * unit))) - || !tObj || !tObj->Complete) { - return; - } - - t = tObj->DriverData; - - if (!t) { - t = i830CreateTexObj( imesa, tObj ); - if (!t) return; - } - - i830TexSetUnit( t, unit ); - - if (t->dirty_images) { - if(unit == 0) imesa->dirty |= I830_UPLOAD_TEX0_IMAGE; - if(unit == 1) imesa->dirty |= I830_UPLOAD_TEX1_IMAGE; - } - - if((t->Setup[I830_TEXREG_MI1] & ((1<<26)|(1<<25)|(1<<24))) == - MAPSURF_8BIT_INDEXED) { - /* Texture palette needs updated, need to do this in a smarter - * way, since it will always be loaded each time paletted textures - * are used, and texture state is reeval'ed. - */ - if(0) fprintf(stderr, "\n\n\nUpdating texture palette\n"); - if(!ctx->Texture.SharedPalette) { - imesa->dirty |= I830_UPLOAD_TEX_PALETTE_N(unit); - if(0) fprintf(stderr, "per texobj palette\n"); - } else { - imesa->dirty |= I830_UPLOAD_TEX_PALETTE_SHARED; - if(0) fprintf(stderr, "shared palette\n"); - } + i830TextureObjectPtr t = (i830TextureObjectPtr) texObj->DriverData; + if (t) { + I830_FIREVERTICES( I830_CONTEXT(ctx) ); + i830SwapOutTexObj( I830_CONTEXT(ctx), t ); } + _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, + height, format, type, pixels, packing, texObj, + texImage); - imesa->CurrentTexObj[unit] = t; - t->bound = 1; - - imesa->TexEnabledMask |= I830_TEX_UNIT_ENABLED(unit); - /* We only want the last texture unit, so we don't or this flag */ - imesa->LastTexEnabled = I830_TEX_UNIT_ENABLED(unit); - - /* Can't do this, we aren't locked here. Causes bad bad bad things */ -#if 0 - if (t->MemBlock) - i830UpdateTexLRU( imesa, t ); -#endif - } -static void i830UpdateTexBlend(GLcontext *ctx, int unit ) +static void i830BindTexture( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj ) { - i830ContextPtr imesa = I830_CONTEXT(ctx); - struct gl_texture_unit *texUnit; - struct gl_texture_object *texObj; - i830TextureObjectPtr t; - GLuint col; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s : unit %d\n", __FUNCTION__, unit); - - texUnit = &ctx->Texture.Unit[unit]; - texObj = ctx->Texture.Unit[unit].Current; - - if (!(ctx->Texture.ReallyEnabled & (0xf << (4 * unit))) - || !texObj || !texObj->Complete) { - return; - } - - t = (i830TextureObjectPtr) texObj->DriverData; - if (!t) { - t = i830CreateTexObj( imesa, texObj ); - if (!t) return; - } - - imesa->TexBlendWordsUsed[unit] = 0; - /* Could handle texenv_combine, register_combiners, combine4, etc */ - if(texUnit->EnvMode == GL_COMBINE_EXT) { - i830SetTexEnvCombine(imesa, - texUnit, - unit); - } else { - if(t->image[0].internalFormat == GL_COLOR_INDEX) { - if(!ctx->Texture.SharedPalette) { - i830SetBlend_GL1_2(imesa, unit, texUnit->EnvMode, - t->palette_format); - } else { - i830SetBlend_GL1_2(imesa, unit, texUnit->EnvMode, - imesa->palette_format); - - } - } else { - i830SetBlend_GL1_2(imesa, unit, texUnit->EnvMode, - t->image[0].internalFormat); - } - /* This only needs emitted when neccessary, fix it later */ - - /* add blend color */ - { - GLubyte r, g, b, a; - GLfloat *fc = texUnit->EnvColor; - - FLOAT_COLOR_TO_UBYTE_COLOR(r, fc[RCOMP]); - FLOAT_COLOR_TO_UBYTE_COLOR(g, fc[GCOMP]); - FLOAT_COLOR_TO_UBYTE_COLOR(b, fc[BCOMP]); - FLOAT_COLOR_TO_UBYTE_COLOR(a, fc[ACOMP]); - - col = ((a << 24) | - (r << 16) | - (g << 8) | - b); - } - - { - int i; - - i = imesa->TexBlendWordsUsed[unit]; - imesa->TexBlend[unit][i++] = STATE3D_COLOR_FACTOR_CMD(unit); - imesa->TexBlend[unit][i++] = col; - - imesa->TexBlendWordsUsed[unit] = i; + if (target == GL_TEXTURE_2D) { + i830ContextPtr imesa = I830_CONTEXT( ctx ); + i830TextureObjectPtr t = (i830TextureObjectPtr) tObj->DriverData; + + if (!t) { + GLfloat bias = ctx->Texture.Unit[ctx->Texture.CurrentUnit].LodBias; + t = CALLOC_STRUCT(i830_texture_object_t); + + /* Initialize non-image-dependent parts of the state: + */ + t->globj = tObj; + t->Setup[I830_TEXREG_TM0LI] = STATE3D_LOAD_STATE_IMMEDIATE_2; + t->Setup[I830_TEXREG_TM0S0] = TM0S0_USE_FENCE; + t->Setup[I830_TEXREG_TM0S1] = 0; + t->Setup[I830_TEXREG_TM0S2] = 0; + t->Setup[I830_TEXREG_TM0S3] = 0; + + t->Setup[I830_TEXREG_NOP0] = 0; + t->Setup[I830_TEXREG_NOP1] = 0; + t->Setup[I830_TEXREG_NOP2] = 0; + + t->Setup[I830_TEXREG_MCS] = (STATE3D_MAP_COORD_SET_CMD | + MAP_UNIT(0) | + ENABLE_TEXCOORD_PARAMS | + TEXCOORDS_ARE_NORMAL | + TEXCOORDTYPE_CARTESIAN | + ENABLE_ADDR_V_CNTL | + TEXCOORD_ADDR_V_MODE(TEXCOORDMODE_WRAP) | + ENABLE_ADDR_U_CNTL | + TEXCOORD_ADDR_U_MODE(TEXCOORDMODE_WRAP)); + + + t->dirty_images = ~0; + + tObj->DriverData = t; + make_empty_list( t ); + + i830SetTexWrapping( t, tObj->WrapS, tObj->WrapT ); + i830SetTexFilter( imesa, t, tObj->MinFilter, tObj->MagFilter, bias ); + i830SetTexBorderColor( t, tObj->BorderColor ); } } - if(0) fprintf(stderr, "TexBlendWordsUsed : %d\n", imesa->TexBlendWordsUsed[unit]); -} - -void i830UpdateTextureState( GLcontext *ctx ) -{ - i830ContextPtr imesa = I830_CONTEXT(ctx); - int pipe_num = 0; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - if(ctx->Texture.ReallyEnabled & ~(TEXTURE0_2D|(TEXTURE0_2D<<4))) { - /* Bits are set for a fallback */ - if(0) fprintf(stderr, "Falling back to software for texturing\n"); - imesa->Fallback |= I830_FALLBACK_TEXTURE; - return; - } - imesa->LastTexEnabled = 0; - imesa->TexEnabledMask = 0; - - if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->bound = 0; - if (imesa->CurrentTexObj[1]) imesa->CurrentTexObj[1]->bound = 0; - - imesa->CurrentTexObj[0] = 0; - imesa->CurrentTexObj[1] = 0; - - i830UpdateTexState( ctx, 0 ); - i830UpdateTexState( ctx, 1 ); - - i830UpdateTexBlend( ctx, 0 ); - i830UpdateTexBlend( ctx, 1 ); - - /* Need to decide the units to set to diffuse by looking at - * the texture units that actually got enabled */ - if(!(imesa->TexEnabledMask & I830_TEX_UNIT_ENABLED(0))) { - if(0) fprintf(stderr, "Diffuse got turned on\n"); - if(imesa->LastTexEnabled == 0) - imesa->LastTexEnabled = I830_TEX_UNIT_ENABLED(0); - - imesa->TexBlend[0][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_COLOR | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - DISABLE_TEX_CNTRL_STAGE | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[0][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | - TEXPIPE_ALPHA | - ENABLE_TEXOUTPUT_WRT_SEL | - TEXOP_OUTPUT_CURRENT | - TEXOP_SCALE_1X | - TEXOP_MODIFY_PARMS | - TEXBLENDOP_ARG1); - imesa->TexBlend[0][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_COLOR | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_DIFFUSE); - imesa->TexBlend[0][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | - TEXPIPE_ALPHA | - TEXBLEND_ARG1 | - TEXBLENDARG_MODIFY_PARMS | - TEXBLENDARG_DIFFUSE); - imesa->TexBlendColorPipeNum[0] = 0; - imesa->TexBlendWordsUsed[0] = 4; - imesa->dirty |= I830_UPLOAD_TEXBLEND_N(0); - } - - switch(imesa->LastTexEnabled) { - case I830_TEX_UNIT_ENABLED(0): - if(0) fprintf(stderr, "Texture unit 0 is the last stage\n"); - pipe_num = imesa->TexBlendColorPipeNum[0]; - imesa->TexBlend[0][pipe_num] |= TEXOP_LAST_STAGE; - break; - case I830_TEX_UNIT_ENABLED(1): - if(0) fprintf(stderr, "Texture unit 1 is the last stage\n"); - pipe_num = imesa->TexBlendColorPipeNum[1]; - imesa->TexBlend[1][pipe_num] |= TEXOP_LAST_STAGE; - break; - default: break; - } - - /* Forces texture cache flush */ - imesa->dirty |= I830_UPLOAD_CTX; - if(imesa->TexEnabledMask & I830_TEX_UNIT_ENABLED(0)) { - if(0) fprintf(stderr, "Enabling Texture unit 0\n"); - imesa->dirty |= (I830_UPLOAD_TEX_N(0) | I830_UPLOAD_TEXBLEND_N(0)); - } - if(imesa->TexEnabledMask & I830_TEX_UNIT_ENABLED(1)) { - if(0) fprintf(stderr, "Enabling Texture unit 1\n"); - imesa->dirty |= (I830_UPLOAD_TEX_N(1) | I830_UPLOAD_TEXBLEND_N(1)); - } -} - - - -/***************************************** - * DRIVER functions - *****************************************/ - -/* TEXTURE_ENV_COLOR should be optimized, so we only flush when the - * color really changes - */ - -static void i830TexEnv( GLcontext *ctx, GLenum target, - GLenum pname, const GLfloat *param ) -{ - i830ContextPtr imesa = I830_CONTEXT( ctx ); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - /* Always flush texture state or texture_env_combine doesn't work */ - FLUSH_BATCH(imesa); - imesa->new_state |= I830_NEW_TEXTURE; -} - -static void i830TexImage( GLcontext *ctx, - GLenum target, - struct gl_texture_object *tObj, - GLint level, - GLint internalFormat, - const struct gl_texture_image *image ) -{ - i830ContextPtr imesa = I830_CONTEXT( ctx ); - i830TextureObjectPtr t; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - if (target != GL_TEXTURE_2D) - return; - - if (level >= I830_TEX_MAXLEVELS) - return; - - t = (i830TextureObjectPtr) tObj->DriverData; - if (t) { - if (t->bound) FLUSH_BATCH(imesa); - /* if this is the current object, it will force an update */ - i830DestroyTexObj( imesa, t ); - tObj->DriverData = 0; - imesa->new_state |= I830_NEW_TEXTURE; - } } -static void i830TexSubImage( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLint internalFormat, - const struct gl_texture_image *image ) +static void i830DeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) { - i830ContextPtr imesa = I830_CONTEXT( ctx ); - i830TextureObjectPtr t; - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); + i830TextureObjectPtr t = (i830TextureObjectPtr)tObj->DriverData; - if ( target != GL_TEXTURE_2D ) - return; - - t = (i830TextureObjectPtr) tObj->DriverData; if (t) { - if (t->bound) FLUSH_BATCH( imesa ); + i830ContextPtr imesa = I830_CONTEXT( ctx ); + if (imesa) + I830_FIREVERTICES( imesa ); i830DestroyTexObj( imesa, t ); tObj->DriverData = 0; - imesa->new_state |= I830_NEW_TEXTURE; } } - -static void i830TexParameter( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, - GLenum pname, const GLfloat *params ) -{ - i830TextureObjectPtr t = (i830TextureObjectPtr) tObj->DriverData; - i830ContextPtr imesa = I830_CONTEXT( ctx ); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - if (!t || target != GL_TEXTURE_2D) - return; - - switch (pname) { - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MAG_FILTER: - if (t->bound) FLUSH_BATCH( imesa ); - i830SetTexFilter(imesa, t,tObj->MinFilter,tObj->MagFilter); - break; - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - if (t->bound) FLUSH_BATCH( imesa ); - i830SetTexWrapping(t,tObj->WrapS,tObj->WrapT); - break; - - case GL_TEXTURE_BORDER_COLOR: - if (t->bound) FLUSH_BATCH( imesa ); - i830SetTexBorderColor(t,tObj->BorderColor); - break; - - default: - return; - } - - imesa->new_state |= I830_NEW_TEXTURE; -} - -static void i830BindTexture( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj ) +static GLboolean i830IsTextureResident( GLcontext *ctx, + struct gl_texture_object *tObj ) { - i830ContextPtr imesa = I830_CONTEXT( ctx ); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - FLUSH_BATCH(imesa); - - if (imesa->CurrentTexObj[ctx->Texture.CurrentUnit]) { - imesa->CurrentTexObj[ctx->Texture.CurrentUnit]->bound = 0; - imesa->CurrentTexObj[ctx->Texture.CurrentUnit] = 0; - } - - imesa->new_state |= I830_NEW_TEXTURE; + i830TextureObjectPtr t = (i830TextureObjectPtr)tObj->DriverData; + return t && t->MemBlock; } -static void i830DeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) +static const struct gl_texture_format * +i830ChooseTextureFormat( GLcontext *ctx, GLint internalFormat, + GLenum format, GLenum type ) { - i830TextureObjectPtr t = (i830TextureObjectPtr)tObj->DriverData; i830ContextPtr imesa = I830_CONTEXT( ctx ); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - - if (t) { + const GLboolean do32bpt = ( imesa->i830Screen->cpp == 4 && + imesa->i830Screen->textureSize > 4*1024*1024); - if (t->bound) { - FLUSH_BATCH(imesa); - imesa->CurrentTexObj[t->bound-1] = 0; - imesa->new_state |= I830_NEW_TEXTURE; + switch ( internalFormat ) { + case 4: + case GL_RGBA: + if ( format == GL_BGRA ) { + if ( type == GL_UNSIGNED_INT_8_8_8_8_REV ) { + return &_mesa_texformat_argb8888; + } + else if ( type == GL_UNSIGNED_SHORT_4_4_4_4_REV ) { + return &_mesa_texformat_argb4444; + } + else if ( type == GL_UNSIGNED_SHORT_1_5_5_5_REV ) { + return &_mesa_texformat_argb1555; + } } - - i830DestroyTexObj(imesa,t); - tObj->DriverData=0; - } -} + return do32bpt ? &_mesa_texformat_argb8888 : &_mesa_texformat_argb4444; - -static GLboolean i830IsTextureResident( GLcontext *ctx, - struct gl_texture_object *t ) -{ - i830TextureObjectPtr mt; - -/* LOCK_HARDWARE; */ - mt = (i830TextureObjectPtr)t->DriverData; -/* UNLOCK_HARDWARE; */ + case 3: + case GL_RGB: + if ( format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 ) { + return &_mesa_texformat_rgb565; + } + return do32bpt ? &_mesa_texformat_argb8888 : &_mesa_texformat_rgb565; - return mt && mt->MemBlock; -} + case GL_RGBA8: + case GL_RGB10_A2: + case GL_RGBA12: + case GL_RGBA16: + return do32bpt ? &_mesa_texformat_argb8888 : &_mesa_texformat_argb4444; + + case GL_RGBA4: + case GL_RGBA2: + return &_mesa_texformat_argb4444; + + case GL_RGB5_A1: + return &_mesa_texformat_argb1555; + + case GL_RGB8: + case GL_RGB10: + case GL_RGB12: + case GL_RGB16: + return do32bpt ? &_mesa_texformat_argb8888 : &_mesa_texformat_rgb565; + + case GL_RGB5: + case GL_RGB4: + case GL_R3_G3_B2: + return &_mesa_texformat_rgb565; -static void -i830DDTexturePalette(GLcontext *ctx, struct gl_texture_object *tObj) -{ - i830ContextPtr imesa = I830_CONTEXT(ctx); - i830TextureObjectPtr t; + case GL_ALPHA: + case GL_ALPHA4: + case GL_ALPHA8: + case GL_ALPHA12: + case GL_ALPHA16: + return &_mesa_texformat_al88; - imesa->new_state |= I830_NEW_TEXTURE; + case 1: + case GL_LUMINANCE: + case GL_LUMINANCE4: + case GL_LUMINANCE8: + case GL_LUMINANCE12: + case GL_LUMINANCE16: + return &_mesa_texformat_l8; - if(tObj) { - t = tObj->DriverData; + 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: + return &_mesa_texformat_al88; - if(!t) { - /* Will be handled elsewhere */ - return; - } + case GL_INTENSITY: + case GL_INTENSITY4: + case GL_INTENSITY8: + case GL_INTENSITY12: + case GL_INTENSITY16: + return &_mesa_texformat_i8; - i830ConvertPalette(t->palette, &tObj->Palette); - t->palette_format = tObj->Palette.Format; - } else { - i830ConvertPalette(imesa->palette, &ctx->Texture.Palette); - imesa->palette_format = ctx->Texture.Palette.Format; + default: + fprintf(stderr, "unexpected texture format in %s", __FUNCTION__); + return NULL; } + + return NULL; /* never get here */ } void i830DDInitTextureFuncs( GLcontext *ctx ) { - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); - ctx->Driver.TexEnv = i830TexEnv; - ctx->Driver.TexImage = i830TexImage; - ctx->Driver.TexSubImage = i830TexSubImage; + ctx->Driver.ChooseTextureFormat = i830ChooseTextureFormat; + ctx->Driver.TexImage1D = _mesa_store_teximage1d; + ctx->Driver.TexImage2D = i830TexImage2D; + ctx->Driver.TexImage3D = _mesa_store_teximage3d; + ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d; + ctx->Driver.TexSubImage2D = i830TexSubImage2D; + ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; + ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; + ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; + ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; + ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; + ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; ctx->Driver.BindTexture = i830BindTexture; ctx->Driver.DeleteTexture = i830DeleteTexture; ctx->Driver.TexParameter = i830TexParameter; - ctx->Driver.UpdateTexturePalette = i830DDTexturePalette; + ctx->Driver.UpdateTexturePalette = 0; ctx->Driver.IsTextureResident = i830IsTextureResident; + ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; + + { + GLuint tmp = ctx->Texture.CurrentUnit; + ctx->Texture.CurrentUnit = 0; + i830BindTexture( ctx, GL_TEXTURE_2D, ctx->Texture.Unit[0].Current2D); + ctx->Texture.CurrentUnit = 1; + i830BindTexture( ctx, GL_TEXTURE_2D, ctx->Texture.Unit[1].Current2D); + ctx->Texture.CurrentUnit = tmp; + } } Index: xc/lib/GL/mesa/src/drv/i830/i830_tex.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_tex.h:1.1 --- /dev/null Thu Feb 27 12:26:26 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_tex.h Mon Sep 9 15:18:48 2002 @@ -0,0 +1,90 @@ +/* + * GLX Hardware Device Driver for Intel i810 + * 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: + * + * 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. + * + * Adapted for use in the I830M driver: + * Jeff Hartmann + */ + +#ifndef I830TEX_INC +#define I830TEX_INC + +#include "mtypes.h" +#include "mmath.h" +#include "mm.h" +#include "i830_context.h" +#include "i830_3d_reg.h" + +#define I830_TEX_MAXLEVELS 10 + +struct i830_texture_object_t +{ + struct i830_texture_object_t *next, *prev; + GLuint age; + struct gl_texture_object *globj; + int Pitch; + int Height; + int texelBytes; + int totalSize; + int bound; + PMemBlock MemBlock; + char *BufAddr; + GLuint min_level; + GLuint max_level; + GLuint dirty_images; + GLenum palette_format; + GLuint palette[256]; + struct + { + const struct gl_texture_image *image; + int offset; /* into BufAddr */ + int height; + int internalFormat; + }image[I830_TEX_MAXLEVELS]; + + /* Support for multitexture. + * */ + GLuint current_unit; + GLuint Setup[I830_TEX_SETUP_SIZE]; + GLuint dirty; + GLuint firstLevel,lastLevel; +}; + +void i830UpdateTextureState( GLcontext *ctx ); +void i830DDInitTextureFuncs( GLcontext *ctx ); +void i830UpdateTexUnitProj( GLcontext *ctx, GLuint unit, GLboolean state ); + + +void i830DestroyTexObj( i830ContextPtr imesa, i830TextureObjectPtr t ); +void i830SwapOutTexObj( i830ContextPtr imesa, i830TextureObjectPtr t ); +int i830UploadTexImages( i830ContextPtr imesa, i830TextureObjectPtr t ); + +void i830ResetGlobalLRU( i830ContextPtr imesa ); +void i830TexturesGone( i830ContextPtr imesa, + GLuint start, GLuint end, + GLuint in_use ); + +void i830PrintLocalLRU( i830ContextPtr imesa ); +void i830PrintGlobalLRU( i830ContextPtr imesa ); +void i830UpdateTexLRU( i830ContextPtr imesa, i830TextureObjectPtr t ); + + +#endif Index: xc/lib/GL/mesa/src/drv/i830/i830_texmem.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_texmem.c:1.3 --- /dev/null Thu Feb 27 12:26:26 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_texmem.c Mon Dec 9 20:26:53 2002 @@ -0,0 +1,389 @@ +/************************************************************************** + +Copyright 2001 2d3d Inc., Delray Beach, FL + +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. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_texmem.c,v 1.3 2002/12/10 01:26:53 dawes Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include +#include + +#include "glheader.h" +#include "macros.h" +#include "mtypes.h" +#include "simple_list.h" +#include "enums.h" +#include "texformat.h" + +#include "mm.h" + +#include "i830_screen.h" +#include "i830_dri.h" + +#include "i830_context.h" +#include "i830_tex.h" +#include "i830_state.h" +#include "i830_ioctl.h" + + +void i830DestroyTexObj(i830ContextPtr imesa, i830TextureObjectPtr t) +{ + if (!t) return; + + /* This is sad - need to sync *in case* we upload a texture + * to this newly free memory... + */ + if (t->MemBlock) { + mmFreeMem(t->MemBlock); + t->MemBlock = 0; + + if (imesa && t->age > imesa->dirtyAge) + imesa->dirtyAge = t->age; + } + + if (t->globj) + t->globj->DriverData = 0; + + if (imesa) { + if (imesa->CurrentTexObj[0] == t) { + imesa->CurrentTexObj[0] = 0; + imesa->dirty &= ~I830_UPLOAD_TEX0; + } + + if (imesa->CurrentTexObj[1] == t) { + imesa->CurrentTexObj[1] = 0; + imesa->dirty &= ~I830_UPLOAD_TEX1; + } + } + + remove_from_list(t); + free(t); +} + + +void i830SwapOutTexObj(i830ContextPtr imesa, i830TextureObjectPtr t) +{ +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + if (t->MemBlock) { + mmFreeMem(t->MemBlock); + t->MemBlock = 0; + + if (t->age > imesa->dirtyAge) + imesa->dirtyAge = t->age; + } + + t->dirty_images = ~0; + move_to_tail(&(imesa->SwappedOut), t); +} + + + +/* Upload an image from mesa's internal copy. + */ +static void i830UploadTexLevel( i830TextureObjectPtr t, int hwlevel ) +{ + int level = hwlevel + t->firstLevel; + const struct gl_texture_image *image = t->image[hwlevel].image; + int i,j; + + if (!image || !image->Data) + return; + + if (0) fprintf(stderr, "Uploading level : %d\n", level); + + switch (image->TexFormat->MesaFormat) { + case MESA_FORMAT_I8: + case MESA_FORMAT_L8: + { + GLubyte *dst = (GLubyte *)(t->BufAddr + t->image[hwlevel].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += t->Pitch) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = src[0]; + src++; + } + } + } + break; + + case MESA_FORMAT_AL88: + case MESA_FORMAT_RGB565: + case MESA_FORMAT_ARGB1555: + case MESA_FORMAT_ARGB4444: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[hwlevel].offset); + GLushort *src = (GLushort *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = src[0]; + src++; + } + } + } + break; + + case MESA_FORMAT_ARGB8888: + { + GLuint *dst = (GLuint *)(t->BufAddr + t->image[hwlevel].offset); + GLuint *src = (GLuint *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/4)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = src[0]; + src++; + } + } + } + break; + + default: + fprintf(stderr, "Not supported texture format %s\n", + _mesa_lookup_enum_by_nr(image->Format)); + } +} + +void i830PrintLocalLRU( i830ContextPtr imesa ) +{ + i830TextureObjectPtr t; + int sz = 1 << (imesa->i830Screen->logTextureGranularity); + + foreach( t, &imesa->TexObjList ) { + if (!t->globj) + fprintf(stderr, "Placeholder %d at %x sz %x\n", + t->MemBlock->ofs / sz, + t->MemBlock->ofs, + t->MemBlock->size); + else + fprintf(stderr, "Texture at %x sz %x\n", + t->MemBlock->ofs, + t->MemBlock->size); + + } +} + +void i830PrintGlobalLRU( i830ContextPtr imesa ) +{ + int i, j; + I830TexRegion *list = imesa->sarea->texList; + + for (i = 0, j = I830_NR_TEX_REGIONS ; i < I830_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 == I830_NR_TEX_REGIONS) break; + } + + if (j != I830_NR_TEX_REGIONS) + fprintf(stderr, "Loop detected in global LRU\n"); +} + + +void i830ResetGlobalLRU( i830ContextPtr imesa ) +{ + I830TexRegion *list = imesa->sarea->texList; + int sz = 1 << imesa->i830Screen->logTextureGranularity; + int i; + + /* (Re)initialize the global circular LRU list. The last element + * in the array (I830_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 <= imesa->i830Screen->textureSize ; i++) { + list[i].prev = i-1; + list[i].next = i+1; + list[i].age = 0; + } + + i--; + list[0].prev = I830_NR_TEX_REGIONS; + list[i].prev = i-1; + list[i].next = I830_NR_TEX_REGIONS; + list[I830_NR_TEX_REGIONS].prev = i; + list[I830_NR_TEX_REGIONS].next = 0; + imesa->sarea->texAge = 0; +} + + +void i830UpdateTexLRU( i830ContextPtr imesa, i830TextureObjectPtr t ) +{ + int i; + int logsz = imesa->i830Screen->logTextureGranularity; + int start = t->MemBlock->ofs >> logsz; + int end = (t->MemBlock->ofs + t->MemBlock->size - 1) >> logsz; + I830TexRegion *list = imesa->sarea->texList; + + imesa->texAge = ++imesa->sarea->texAge; + + /* Update our local LRU + */ + move_to_head( &(imesa->TexObjList), t ); + + /* Update the global LRU + */ + for (i = start ; i <= end ; i++) { + + list[i].in_use = 1; + list[i].age = imesa->texAge; + + /* remove_from_list(i) + */ + 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 = I830_NR_TEX_REGIONS; + list[i].next = list[I830_NR_TEX_REGIONS].next; + list[(unsigned)list[I830_NR_TEX_REGIONS].next].prev = i; + list[I830_NR_TEX_REGIONS].next = i; + } +} + + +/* Called for every shared texture region which has increased in age + * 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. + */ +void i830TexturesGone( i830ContextPtr imesa, + GLuint offset, + GLuint size, + GLuint in_use ) +{ + i830TextureObjectPtr t, tmp; + + if (I830_DEBUG&DEBUG_TEXTURE) + fprintf(stderr, "%s\n", __FUNCTION__); + + foreach_s ( t, tmp, &imesa->TexObjList ) { + if (t->MemBlock == 0 || + t->MemBlock->ofs >= offset + size || + t->MemBlock->ofs + t->MemBlock->size <= offset) + continue; + + /* It overlaps - kick it off. Need to hold onto the currently bound + * objects, however. + */ + if (t->bound) + i830SwapOutTexObj( imesa, t ); + else + i830DestroyTexObj( imesa, t ); + } + + if (in_use) { + t = (i830TextureObjectPtr) calloc(1,sizeof(*t)); + if (!t) return; + + t->MemBlock = mmAllocMem( imesa->texHeap, size, 0, offset); + insert_at_head( &imesa->TexObjList, t ); + } +} + + +/* This is called with the lock held. May have to eject our own and/or + * other client's texture objects to make room for the upload. + */ + +int i830UploadTexImages( i830ContextPtr imesa, i830TextureObjectPtr t ) +{ + int i; + int ofs; + int numLevels; + + /* Do we need to eject LRU texture objects? + */ + if (!t->MemBlock) { + while (1) + { + t->MemBlock = mmAllocMem( imesa->texHeap, t->totalSize, 12, 0 ); + if (t->MemBlock) + break; + +/* + if (imesa->TexObjList.prev == imesa->CurrentTexObj[0] || + imesa->TexObjList.prev == imesa->CurrentTexObj[1]) { + fprintf(stderr, "Hit bound texture in upload\n"); + i830PrintLocalLRU( imesa ); + return -1; + } +*/ + if (imesa->TexObjList.prev == &(imesa->TexObjList)) { + fprintf(stderr, "Failed to upload texture, sz %d\n", t->totalSize); + mmDumpMemInfo( imesa->texHeap ); + return -1; + } + + i830SwapOutTexObj( imesa, imesa->TexObjList.prev ); + } + + ofs = t->MemBlock->ofs; + t->BufAddr = imesa->i830Screen->tex.map + ofs; + t->Setup[I830_TEXREG_TM0S0] = (TM0S0_USE_FENCE | + (imesa->i830Screen->textureOffset + ofs)); + + if (t == imesa->CurrentTexObj[0]) + imesa->dirty |= I830_UPLOAD_TEX0; + + if (t == imesa->CurrentTexObj[1]) + imesa->dirty |= I830_UPLOAD_TEX1; +#if 0 + if (t == imesa->CurrentTexObj[2]) + I830_STATECHANGE(imesa, I830_UPLOAD_TEX2); + + if (t == imesa->CurrentTexObj[3]) + I830_STATECHANGE(imesa, I830_UPLOAD_TEX3); +#endif + if (t->MemBlock) + i830UpdateTexLRU( imesa, t ); + } + + if (imesa->dirtyAge >= GET_DISPATCH_AGE(imesa)) + i830WaitAgeLocked( imesa, imesa->dirtyAge ); + + numLevels = t->lastLevel - t->firstLevel + 1; + for (i = 0 ; i < numLevels ; i++) + if (t->dirty_images & (1<<(i+t->firstLevel))) + i830UploadTexLevel( t, i ); + + t->dirty_images = 0; + imesa->sarea->perf_boxes |= I830_BOX_TEXTURE_LOAD; + + return 0; +} Index: xc/lib/GL/mesa/src/drv/i830/i830_texstate.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_texstate.c:1.3 --- /dev/null Thu Feb 27 12:26:26 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_texstate.c Mon Dec 9 20:26:53 2002 @@ -0,0 +1,1497 @@ +/************************************************************************** + +Copyright 2001 2d3d Inc., Delray Beach, FL + +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. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_texstate.c,v 1.3 2002/12/10 01:26:53 dawes Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ +#include +#include + +#include "glheader.h" +#include "macros.h" +#include "mtypes.h" +#include "simple_list.h" +#include "enums.h" +#include "texformat.h" +#include "texstore.h" +#include "texutil.h" + +#include "mm.h" + +#include "i830_screen.h" +#include "i830_dri.h" + +#include "i830_context.h" +#include "i830_tex.h" +#include "i830_state.h" +#include "i830_ioctl.h" + +#define I830_TEX_UNIT_ENABLED(unit) (1<DriverData; + const struct gl_texture_image *baseImage = tObj->Image[tObj->BaseLevel]; + GLint firstLevel, lastLevel, numLevels; + GLint log2Width, log2Height; + + switch( baseImage->TexFormat->MesaFormat ) { + case MESA_FORMAT_L8: + t->texelBytes = 1; + textureFormat = MAPSURF_8BIT | MT_8BIT_L8; + break; + + case MESA_FORMAT_I8: + t->texelBytes = 1; + textureFormat = MAPSURF_8BIT | MT_8BIT_I8; + break; + + case MESA_FORMAT_AL88: + t->texelBytes = 2; + textureFormat = MAPSURF_16BIT | MT_16BIT_AY88; + break; + + case MESA_FORMAT_RGB565: + t->texelBytes = 2; + textureFormat = MAPSURF_16BIT | MT_16BIT_RGB565; + break; + + case MESA_FORMAT_ARGB1555: + t->texelBytes = 2; + textureFormat = MAPSURF_16BIT | MT_16BIT_ARGB1555; + break; + + case MESA_FORMAT_ARGB4444: + t->texelBytes = 2; + textureFormat = MAPSURF_16BIT | MT_16BIT_ARGB4444; + break; + + case MESA_FORMAT_ARGB8888: + t->texelBytes = 4; + textureFormat = MAPSURF_32BIT | MT_32BIT_ARGB8888; + break; + + default: + fprintf(stderr, "%s: bad image format\n", __FUNCTION__); + free( t ); + return; + } + + /* Compute which mipmap levels we really want to send to the hardware. + * This depends on the base image size, GL_TEXTURE_MIN_LOD, + * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. + * Yes, this looks overly complicated, but it's all needed. + */ + firstLevel = tObj->BaseLevel + (GLint) (tObj->MinLod + 0.5); + firstLevel = MAX2(firstLevel, tObj->BaseLevel); + lastLevel = tObj->BaseLevel + (GLint) (tObj->MaxLod + 0.5); + lastLevel = MAX2(lastLevel, tObj->BaseLevel); + lastLevel = MIN2(lastLevel, tObj->BaseLevel + baseImage->MaxLog2); + lastLevel = MIN2(lastLevel, tObj->MaxLevel); + lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */ + + /* save these values */ + t->firstLevel = firstLevel; + t->lastLevel = lastLevel; + + numLevels = lastLevel - firstLevel + 1; + + if (0) fprintf(stderr, + "%s : " + "NumLevels : %d\n" + "firstLevel : %d\n" + "lastLevel : %d\n", + __FUNCTION__, + numLevels, + firstLevel, + lastLevel); + + log2Width = tObj->Image[firstLevel]->WidthLog2; + log2Height = tObj->Image[firstLevel]->HeightLog2; + + /* Figure out the amount of memory required to hold all the mipmap + * levels. Choose the smallest pitch to accomodate the largest + * mipmap: + */ + width = tObj->Image[firstLevel]->Width * t->texelBytes; + + pitch = width; + + /* All images must be loaded at this pitch. Count the number of + * lines required: + */ + for ( height = i = 0 ; i < numLevels ; i++ ) { + t->image[i].image = tObj->Image[firstLevel + i]; + if (!t->image[i].image) { + break; + } + t->image[i].offset = height * pitch; + t->image[i].internalFormat = baseImage->Format; + height += t->image[i].image->Height; + } + + t->Pitch = pitch; + t->totalSize = height*pitch; + t->max_level = i-1; + + t->Setup[I830_TEXREG_TM0S1] = + ((((1 << log2Height) - 1) << TM0S1_HEIGHT_SHIFT) | + (((1 << log2Width) - 1) << TM0S1_WIDTH_SHIFT) | + textureFormat); + t->Setup[I830_TEXREG_TM0S2] = + ((((pitch / 4) - 1) << TM0S2_PITCH_SHIFT)); + + t->Setup[I830_TEXREG_TM0S3] &= ~TM0S3_MAX_MIP_MASK; + t->Setup[I830_TEXREG_TM0S3] &= ~TM0S3_MIN_MIP_MASK; + t->Setup[I830_TEXREG_TM0S3] |= + ((numLevels - 1)*4) << TM0S3_MIN_MIP_SHIFT; + + t->dirty = I830_UPLOAD_TEX0 | I830_UPLOAD_TEX1; + LOCK_HARDWARE( imesa ); + i830UploadTexImages( imesa, t ); + UNLOCK_HARDWARE( imesa ); +} + +/* ================================================================ + * Texture combine functions + */ +static __inline__ GLuint GetTexelOp(GLint unit) +{ + switch(unit) { + case 0: return TEXBLENDARG_TEXEL0; + case 1: return TEXBLENDARG_TEXEL1; + case 2: return TEXBLENDARG_TEXEL2; + case 3: return TEXBLENDARG_TEXEL3; + default: return TEXBLENDARG_TEXEL0; + } +} + +static void i830SetBlend_GL1_2(i830ContextPtr imesa, int curTex, + GLenum envMode, GLenum format) +{ + GLuint texel_op = GetTexelOp(curTex); + + if(I830_DEBUG&DEBUG_TEXTURE) + fprintf(stderr, "%s %s %s unit (%d) texel_op(0x%x)\n", + __FUNCTION__, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(envMode), + curTex, + texel_op); + + switch(envMode) { + case GL_REPLACE: + switch(format) { + case GL_ALPHA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + case GL_LUMINANCE: + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + + case GL_INTENSITY: + case GL_LUMINANCE_ALPHA: + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + + case GL_MODULATE: + switch(format) { + case GL_ALPHA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + + case GL_LUMINANCE: + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + + case GL_INTENSITY: + case GL_LUMINANCE_ALPHA: + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + + case GL_DECAL: + switch(format) { + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_REPLICATE_ALPHA | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + + case GL_BLEND: + switch(format) { + case GL_ALPHA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + + case GL_LUMINANCE: + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_FACTOR_N); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + + case GL_INTENSITY: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_FACTOR_N); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][6] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_FACTOR_N); + imesa->TexBlend[curTex][7] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 8; + break; + + case GL_LUMINANCE_ALPHA: + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_FACTOR_N); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][6] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 7; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + + case GL_ADD: + switch(format) { + case GL_ALPHA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + case GL_LUMINANCE: + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ADD); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + + case GL_INTENSITY: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ADD); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ADD); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + + case GL_LUMINANCE_ALPHA: + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ADD); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + + if (I830_DEBUG&DEBUG_TEXTURE) + fprintf(stderr, "%s\n", __FUNCTION__); +} + +static void i830SetTexEnvCombine(i830ContextPtr imesa, + const struct gl_texture_unit *texUnit, + GLint unit) +{ + GLuint blendop; + GLuint ablendop; + GLuint args_RGB[3]; + GLuint args_A[3]; + GLuint texel_op = GetTexelOp(unit); + int i; + + if(I830_DEBUG&DEBUG_TEXTURE) + fprintf(stderr, "%s\n", __FUNCTION__); + + switch(texUnit->CombineModeRGB) { + case GL_REPLACE: + blendop = TEXBLENDOP_ARG1; + break; + case GL_MODULATE: + blendop = TEXBLENDOP_MODULATE; + break; + case GL_ADD: + blendop = TEXBLENDOP_ADD; + break; + case GL_ADD_SIGNED_ARB: + blendop = TEXBLENDOP_ADDSIGNED; + break; + case GL_INTERPOLATE_ARB: + blendop = TEXBLENDOP_BLEND; + break; + case GL_SUBTRACT_ARB: + blendop = TEXBLENDOP_SUBTRACT; + break; + default: + return; + } + + switch(texUnit->CombineScaleShiftRGB) { + case 0: + blendop |= TEXOP_SCALE_1X; + break; + case 1: + blendop |= TEXOP_SCALE_2X; + break; + case 2: + blendop |= TEXOP_SCALE_4X; + break; + default: + return; + } + + switch(texUnit->CombineModeA) { + case GL_REPLACE: + ablendop = TEXBLENDOP_ARG1; + break; + case GL_MODULATE: + ablendop = TEXBLENDOP_MODULATE; + break; + case GL_ADD: + ablendop = TEXBLENDOP_ADD; + break; + case GL_ADD_SIGNED_ARB: + ablendop = TEXBLENDOP_ADDSIGNED; + break; + case GL_INTERPOLATE_ARB: + ablendop = TEXBLENDOP_BLEND; + break; + case GL_SUBTRACT_ARB: + ablendop = TEXBLENDOP_SUBTRACT; + break; + default: + return; + } + + switch(texUnit->CombineScaleShiftA) { + case 0: + ablendop |= TEXOP_SCALE_1X; + break; + case 1: + ablendop |= TEXOP_SCALE_2X; + break; + case 2: + ablendop |= TEXOP_SCALE_4X; + break; + default: + return; + } + + /* Handle RGB args */ + for(i = 0; i < 3; i++) { + switch(texUnit->CombineSourceRGB[i]) { + case GL_TEXTURE: + args_RGB[i] = texel_op; + break; + case GL_CONSTANT_ARB: + args_RGB[i] = TEXBLENDARG_FACTOR_N; + break; + case GL_PRIMARY_COLOR_ARB: + args_RGB[i] = TEXBLENDARG_DIFFUSE; + break; + case GL_PREVIOUS_ARB: + args_RGB[i] = TEXBLENDARG_CURRENT; + break; + default: + return; + + } + + switch(texUnit->CombineOperandRGB[i]) { + case GL_SRC_COLOR: + args_RGB[i] |= 0; + break; + case GL_ONE_MINUS_SRC_COLOR: + args_RGB[i] |= TEXBLENDARG_INV_ARG; + break; + case GL_SRC_ALPHA: + args_RGB[i] |= TEXBLENDARG_REPLICATE_ALPHA; + break; + case GL_ONE_MINUS_SRC_ALPHA: + args_RGB[i] |= (TEXBLENDARG_REPLICATE_ALPHA | + TEXBLENDARG_INV_ARG); + break; + default: + return; + } + } + + /* Handle A args */ + for(i = 0; i < 3; i++) { + switch(texUnit->CombineSourceA[i]) { + case GL_TEXTURE: + args_A[i] = texel_op; + break; + case GL_CONSTANT_ARB: + args_A[i] = TEXBLENDARG_FACTOR_N; + break; + case GL_PRIMARY_COLOR_ARB: + args_A[i] = TEXBLENDARG_DIFFUSE; + break; + case GL_PREVIOUS_ARB: + args_A[i] = TEXBLENDARG_CURRENT; + break; + default: + return; + + } + + switch(texUnit->CombineOperandA[i]) { + case GL_SRC_ALPHA: + args_A[i] |= 0; + break; + case GL_ONE_MINUS_SRC_ALPHA: + args_A[i] |= TEXBLENDARG_INV_ARG; + break; + default: + return; + } + } + + /* Native Arg1 == Arg0 in GL_EXT_texture_env_combine spec */ + /* Native Arg2 == Arg1 in GL_EXT_texture_env_combine spec */ + /* Native Arg0 == Arg2 in GL_EXT_texture_env_combine spec */ + + /* When we render we need to figure out which is the last really enabled + * tex unit, and put last stage on it + */ + + imesa->TexBlendColorPipeNum[unit] = 0; + + /* Build color pipeline */ + + imesa->TexBlend[unit][0] = (STATE3D_MAP_BLEND_OP_CMD(unit) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_MODIFY_PARMS | + blendop); + imesa->TexBlend[unit][1] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + args_RGB[0]); + imesa->TexBlend[unit][2] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + args_RGB[1]); + imesa->TexBlend[unit][3] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + args_RGB[2]); + + /* Build Alpha pipeline */ + imesa->TexBlend[unit][4] = (STATE3D_MAP_BLEND_OP_CMD(unit) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_MODIFY_PARMS | + ablendop); + imesa->TexBlend[unit][5] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + args_A[0]); + imesa->TexBlend[unit][6] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + args_A[1]); + imesa->TexBlend[unit][7] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_ALPHA | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + args_A[2]); + + { + GLubyte r, g, b, a; + GLfloat *fc = texUnit->EnvColor; + + FLOAT_COLOR_TO_UBYTE_COLOR(r, fc[RCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(g, fc[GCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(b, fc[BCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(a, fc[ACOMP]); + + imesa->TexBlend[unit][8] = STATE3D_COLOR_FACTOR_CMD(unit); + imesa->TexBlend[unit][9] = ((a << 24) | + (r << 16) | + (g << 8) | + b); + } + imesa->TexBlendWordsUsed[unit] = 10; +} + + + + +static void i830UpdateTexEnv( GLcontext *ctx, GLuint unit ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + const struct gl_texture_object *tObj = texUnit->_Current; + i830TextureObjectPtr t = (i830TextureObjectPtr)tObj->DriverData; + GLuint col; + + imesa->TexBlendWordsUsed[unit] = 0; + + if (0) fprintf(stderr, "i830UpdateTexEnv called : %s\n", + _mesa_lookup_enum_by_nr(texUnit->EnvMode)); + + if(texUnit->EnvMode == GL_COMBINE_ARB) { + i830SetTexEnvCombine(imesa, + texUnit, + unit); + } else { + i830SetBlend_GL1_2(imesa, + unit, + texUnit->EnvMode, + t->image[0].internalFormat); + + /* add blend color */ + { + GLubyte r, g, b, a; + GLfloat *fc = texUnit->EnvColor; + + FLOAT_COLOR_TO_UBYTE_COLOR(r, fc[RCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(g, fc[GCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(b, fc[BCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(a, fc[ACOMP]); + + col = ((a << 24) | + (r << 16) | + (g << 8) | + b); + } + + { + int i; + + i = imesa->TexBlendWordsUsed[unit]; + imesa->TexBlend[unit][i++] = STATE3D_COLOR_FACTOR_CMD(unit); + imesa->TexBlend[unit][i++] = col; + + imesa->TexBlendWordsUsed[unit] = i; + } + } + + I830_STATECHANGE( imesa, I830_UPLOAD_TEXBLEND_N(unit) ); +} + + +static void i830TexSetUnit( i830TextureObjectPtr t, GLuint unit ) +{ + if(I830_DEBUG&DEBUG_TEXTURE) + fprintf(stderr, "%s unit(%d)\n", __FUNCTION__, unit); + + t->Setup[I830_TEXREG_TM0LI] = (STATE3D_LOAD_STATE_IMMEDIATE_2 | + (LOAD_TEXTURE_MAP0 << unit) | 4); + + I830_SET_FIELD(t->Setup[I830_TEXREG_MCS], MAP_UNIT_MASK, MAP_UNIT(unit)); + + t->current_unit = unit; +} + +#define TEXCOORDTYPE_MASK (~((1<<13)|(1<<12)|(1<<11))) + +static void i830UpdateTexUnit( GLcontext *ctx, GLuint unit ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + + imesa->TexEnabledMask &= ~(I830_TEX_UNIT_ENABLED(unit)); + + if (texUnit->_ReallyEnabled == TEXTURE0_2D) + { + struct gl_texture_object *tObj = texUnit->_Current; + i830TextureObjectPtr t = (i830TextureObjectPtr)tObj->DriverData; + GLuint mcs = t->Setup[I830_TEXREG_MCS] & TEXCOORDTYPE_MASK; + + /* Handle projective texturing */ + if (imesa->vertex_format & (1<<31)) { + mcs |= TEXCOORDTYPE_HOMOGENEOUS; + } else { + mcs |= TEXCOORDTYPE_CARTESIAN; + } + + /* Fallback if there's a texture border */ + if ( tObj->Image[tObj->BaseLevel]->Border > 0 ) { + FALLBACK( imesa, I830_FALLBACK_TEXTURE, GL_TRUE ); + return; + } + + /* Upload teximages (not pipelined) + */ + if (t->dirty_images) { +/* I830_FIREVERTICES(imesa); */ + i830SetTexImages( imesa, tObj ); + if (!t->MemBlock) { + FALLBACK( imesa, I830_FALLBACK_TEXTURE, GL_TRUE ); + return; + } + } + + /* Update state if this is a different texture object to last + * time. + */ + if (imesa->CurrentTexObj[unit] != t || + mcs != t->Setup[I830_TEXREG_MCS]) { + I830_STATECHANGE(imesa, (I830_UPLOAD_TEX0<Setup[I830_TEXREG_MCS] = mcs; + imesa->CurrentTexObj[unit] = t; + i830TexSetUnit(t, unit); + } + + /* Update texture environment if texture object image format or + * texture environment state has changed. + * + * KW: doesn't work -- change from tex0 only to tex0+tex1 gets + * missed (need to update last stage flag?). Call + * i830UpdateTexEnv always. + */ + if (tObj->Image[tObj->BaseLevel]->Format != + imesa->TexEnvImageFmt[unit]) { + imesa->TexEnvImageFmt[unit] = tObj->Image[tObj->BaseLevel]->Format; + } + i830UpdateTexEnv( ctx, unit ); + imesa->TexEnabledMask |= I830_TEX_UNIT_ENABLED(unit); + } + else if (texUnit->_ReallyEnabled) { + FALLBACK( imesa, I830_FALLBACK_TEXTURE, GL_TRUE ); + } + else if (unit == 0) { + /* This is happening too often. I need to conditionally send diffuse + * state to the card. Perhaps a diffuse dirty flag of some kind. + * Will need to change this logic if more than 2 texture units are + * used. We need to only do this up to the last unit enabled, or unit + * one if nothing is enabled. + */ + imesa->CurrentTexObj[unit] = 0; + imesa->TexEnvImageFmt[unit] = 0; + imesa->dirty &= ~(I830_UPLOAD_TEX_N(unit)); + + imesa->TexBlend[unit][0] = (STATE3D_MAP_BLEND_OP_CMD(unit) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[unit][1] = (STATE3D_MAP_BLEND_OP_CMD(unit) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[unit][2] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[unit][3] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[unit] = 0; + imesa->TexBlendWordsUsed[unit] = 4; + I830_STATECHANGE(imesa, (I830_UPLOAD_TEXBLEND_N(unit))); + } +} + +/* Called from vb code to update projective texturing properly */ +void i830UpdateTexUnitProj( GLcontext *ctx, GLuint unit, GLboolean state ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + + if (texUnit->_ReallyEnabled == TEXTURE0_2D) + { + struct gl_texture_object *tObj = texUnit->_Current; + i830TextureObjectPtr t = (i830TextureObjectPtr)tObj->DriverData; + GLuint mcs = t->Setup[I830_TEXREG_MCS] & TEXCOORDTYPE_MASK; + + /* Handle projective texturing */ + if (state) { + mcs |= TEXCOORDTYPE_HOMOGENEOUS; + } else { + mcs |= TEXCOORDTYPE_CARTESIAN; + } + + if (mcs != t->Setup[I830_TEXREG_MCS]) { + I830_STATECHANGE(imesa, (I830_UPLOAD_TEX0<Setup[I830_TEXREG_MCS] = mcs; + } + } +} + +/* Only deal with unit 0 and 1 for right now */ +void i830UpdateTextureState( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int pipe_num = 0; + + if (0) fprintf(stderr, "%s\n", __FUNCTION__); + FALLBACK( imesa, I830_FALLBACK_TEXTURE, GL_FALSE ); + + i830UpdateTexUnit( ctx, 0 ); + i830UpdateTexUnit( ctx, 1 ); +#if 0 + i830UpdateTexUnit( ctx, 2 ); + i830UpdateTexUnit( ctx, 3 ); +#endif + + /* Make sure last stage is set correctly */ +#if 0 + if(imesa->TexEnabledMask & I830_TEX_UNIT_ENABLED(3)) { + pipe_num = imesa->TexBlendColorPipeNum[3]; + imesa->TexBlend[3][pipe_num] |= TEXOP_LAST_STAGE; + } else if(imesa->TexEnabledMask & I830_TEX_UNIT_ENABLED(2)) { + pipe_num = imesa->TexBlendColorPipeNum[2]; + imesa->TexBlend[2][pipe_num] |= TEXOP_LAST_STAGE; + } else +#endif + if(imesa->TexEnabledMask & I830_TEX_UNIT_ENABLED(1)) { + pipe_num = imesa->TexBlendColorPipeNum[1]; + imesa->TexBlend[1][pipe_num] |= TEXOP_LAST_STAGE; + if (0) fprintf(stderr, "Unit One is last enabled\n"); + } else { + pipe_num = imesa->TexBlendColorPipeNum[0]; + imesa->TexBlend[0][pipe_num] |= TEXOP_LAST_STAGE; + if (0) fprintf(stderr, "Unit Zero is last enabled\n"); + } +} + + + Index: xc/lib/GL/mesa/src/drv/i830/i830_tris.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_tris.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_tris.c:1.4 --- xc/lib/GL/mesa/src/drv/i830/i830_tris.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_tris.c Mon Dec 9 20:26:54 2002 @@ -1,3 +1,4 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tris.c,v 1.4 2002/12/10 01:26:54 dawes Exp $ */ /************************************************************************** Copyright 2001 VA Linux Systems Inc., Fremont, California. @@ -25,159 +26,858 @@ **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tris.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - /* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell + * Original Authors: + * Keith Whitwell + * Adapted for use on the I830M: + * Jeff Hartmann */ #include #include -#include "types.h" -#include "vb.h" -#include "pipeline.h" +#include "glheader.h" +#include "context.h" +#include "macros.h" +#include "enums.h" +#include "dd.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" -#include "mm.h" +#include "i830_screen.h" +#include "i830_dri.h" -#include "i830_drv.h" #include "i830_tris.h" +#include "i830_state.h" +#include "i830_vb.h" +#include "i830_ioctl.h" +#include "i830_span.h" + +static void i830RenderPrimitive( GLcontext *ctx, GLenum prim ); + +/*********************************************************************** + * Emit primitives as inline vertices * + ***********************************************************************/ + +#if defined(USE_X86_ASM) +#define COPY_DWORDS( j, vb, vertsize, v ) \ +do { \ + int __tmp; \ + __asm__ __volatile__( "rep ; movsl" \ + : "=%c" (j), "=D" (vb), "=S" (__tmp) \ + : "0" (vertsize), \ + "D" ((long)vb), \ + "S" ((long)v) ); \ +} while (0) +#else +#define COPY_DWORDS( j, vb, vertsize, v ) \ +do { \ + for ( j = 0 ; j < vertsize ; j++ ) \ + vb[j] = ((GLuint *)v)[j]; \ + vb += vertsize; \ +} while (0) +#endif + +static void __inline__ i830_draw_triangle( i830ContextPtr imesa, + i830VertexPtr v0, + i830VertexPtr v1, + i830VertexPtr v2 ) +{ + GLuint vertsize = imesa->vertex_size; + GLuint *vb = i830AllocDmaLow( imesa, 3 * 4 * vertsize ); + int j; + + COPY_DWORDS( j, vb, vertsize, v0 ); + COPY_DWORDS( j, vb, vertsize, v1 ); + COPY_DWORDS( j, vb, vertsize, v2 ); +} + + +static void __inline__ i830_draw_quad( i830ContextPtr imesa, + i830VertexPtr v0, + i830VertexPtr v1, + i830VertexPtr v2, + i830VertexPtr v3 ) +{ + GLuint vertsize = imesa->vertex_size; + GLuint *vb = i830AllocDmaLow( imesa, 6 * 4 * vertsize ); + int j; + + COPY_DWORDS( j, vb, vertsize, v0 ); + COPY_DWORDS( j, vb, vertsize, v1 ); + COPY_DWORDS( j, vb, vertsize, v3 ); + COPY_DWORDS( j, vb, vertsize, v1 ); + COPY_DWORDS( j, vb, vertsize, v2 ); + COPY_DWORDS( j, vb, vertsize, v3 ); +} + + +static __inline__ void i830_draw_point( i830ContextPtr imesa, + i830VertexPtr tmp ) +{ + GLuint vertsize = imesa->vertex_size; + GLuint *vb = i830AllocDmaLow( imesa, 4 * vertsize ); + int j; + + /* Adjust for sub pixel position */ + *(float *)&vb[0] = tmp->v.x - 0.125; + *(float *)&vb[1] = tmp->v.y - 0.125; + for (j = 2 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; +} + + +static __inline__ void i830_draw_line( i830ContextPtr imesa, + i830VertexPtr v0, + i830VertexPtr v1 ) +{ + GLuint vertsize = imesa->vertex_size; + GLuint *vb = i830AllocDmaLow( imesa, 2 * 4 * vertsize ); + int j; -/* Used in i830tritmp.h + COPY_DWORDS( j, vb, vertsize, v0 ); + COPY_DWORDS( j, vb, vertsize, v1 ); +} + + + +/*********************************************************************** + * Macros for t_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI( a, b, c ) \ +do { \ + if (DO_FALLBACK) \ + imesa->draw_tri( imesa, a, b, c ); \ + else \ + i830_draw_triangle( imesa, a, b, c ); \ +} while (0) + +#define QUAD( a, b, c, d ) \ +do { \ + if (DO_FALLBACK) { \ + imesa->draw_tri( imesa, a, b, d ); \ + imesa->draw_tri( imesa, b, c, d ); \ + } else \ + i830_draw_quad( imesa, a, b, c, d ); \ +} while (0) + +#define LINE( v0, v1 ) \ +do { \ + if (DO_FALLBACK) \ + imesa->draw_line( imesa, v0, v1 ); \ + else \ + i830_draw_line( imesa, v0, v1 ); \ +} while (0) + +#define POINT( v0 ) \ +do { \ + if (DO_FALLBACK) \ + imesa->draw_point( imesa, v0 ); \ + else \ + i830_draw_point( imesa, v0 ); \ +} while (0) + + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define I830_OFFSET_BIT 0x01 +#define I830_TWOSIDE_BIT 0x02 +#define I830_UNFILLED_BIT 0x04 +#define I830_FALLBACK_BIT 0x08 +#define I830_MAX_TRIFUNC 0x10 + + +static struct { + points_func points; + line_func line; + triangle_func triangle; + quad_func quad; +} rast_tab[I830_MAX_TRIFUNC]; + + +#define DO_FALLBACK (IND & I830_FALLBACK_BIT) +#define DO_OFFSET (IND & I830_OFFSET_BIT) +#define DO_UNFILLED (IND & I830_UNFILLED_BIT) +#define DO_TWOSIDE (IND & I830_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 1 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define VERTEX i830Vertex +#define TAB rast_tab + +/* Only used to pull back colors into vertices (ie, we know color is + * floating point). */ -#define I830_COLOR(to, from) { \ - (to)[0] = (from)[2]; \ - (to)[1] = (from)[1]; \ - (to)[2] = (from)[0]; \ - (to)[3] = (from)[3]; \ -} - -#define I830_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 points_func points_tab[0x10]; +#define I830_COLOR( dst, src ) \ +do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ + dst[3] = src[3]; \ +} while (0) + +#define I830_SPEC( dst, src ) \ +do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ +} while (0) + + +#define DEPTH_SCALE (imesa->depth_scale) +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW( a ) (a > 0) +#define GET_VERTEX(e) (imesa->verts + (e<vertex_stride_shift)) + +#define VERT_SET_RGBA( v, c ) I830_COLOR( v->ub4[coloroffset], c ) +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[coloroffset] +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx] + +#define VERT_SET_SPEC( v, c ) if (havespec) I830_SPEC( v->ub4[5], c ) +#define VERT_COPY_SPEC( v0, v1 ) if (havespec) COPY_3V(v0->ub4[5], v1->ub4[5]) +#define VERT_SAVE_SPEC( idx ) if (havespec) spec[idx] = v[idx]->ui[5] +#define VERT_RESTORE_SPEC( idx ) if (havespec) v[idx]->ui[5] = spec[idx] + +#define LOCAL_VARS(n) \ + i830ContextPtr imesa = I830_CONTEXT(ctx); \ + GLuint color[n], spec[n]; \ + GLuint coloroffset = (imesa->vertex_size == 4 ? 3 : 4); \ + GLboolean havespec = (imesa->vertex_size > 4); \ + (void) color; (void) spec; (void) coloroffset; (void) havespec; + + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +static const GLuint hw_prim[GL_POLYGON+1] = { + PRIM3D_POINTLIST, + PRIM3D_LINELIST, + PRIM3D_LINELIST, + PRIM3D_LINELIST, + PRIM3D_TRILIST, + PRIM3D_TRILIST, + PRIM3D_TRILIST, + PRIM3D_TRILIST, + PRIM3D_TRILIST, + PRIM3D_TRILIST +}; + +#define RASTERIZE(x) if (imesa->hw_primitive != hw_prim[x]) \ + i830RasterPrimitive( ctx, x, hw_prim[x] ) +#define RENDER_PRIMITIVE imesa->render_primitive +#define TAG(x) x +#define IND I830_FALLBACK_BIT +#include "tnl_dd/t_dd_unfilled.h" +#undef IND + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ #define IND (0) #define TAG(x) x -#include "i830_tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (I830_FLAT_BIT) -#define TAG(x) x##_flat -#include "i830_tritmp.h" - -#define IND (I830_OFFSET_BIT) +#define IND (I830_OFFSET_BIT) #define TAG(x) x##_offset -#include "i830_tritmp.h" - -#define IND (I830_OFFSET_BIT|I830_FLAT_BIT) -#define TAG(x) x##_offset_flat -#include "i830_tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (I830_TWOSIDE_BIT) +#define IND (I830_TWOSIDE_BIT) #define TAG(x) x##_twoside -#include "i830_tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (I830_TWOSIDE_BIT|I830_FLAT_BIT) -#define TAG(x) x##_twoside_flat -#include "i830_tritmp.h" - -#define IND (I830_TWOSIDE_BIT|I830_OFFSET_BIT) +#define IND (I830_TWOSIDE_BIT|I830_OFFSET_BIT) #define TAG(x) x##_twoside_offset -#include "i830_tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I830_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I830_OFFSET_BIT|I830_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I830_TWOSIDE_BIT|I830_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I830_TWOSIDE_BIT|I830_OFFSET_BIT|I830_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I830_FALLBACK_BIT) +#define TAG(x) x##_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I830_OFFSET_BIT|I830_FALLBACK_BIT) +#define TAG(x) x##_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" -#define IND (I830_TWOSIDE_BIT|I830_OFFSET_BIT|I830_FLAT_BIT) -#define TAG(x) x##_twoside_offset_flat -#include "i830_tritmp.h" +#define IND (I830_TWOSIDE_BIT|I830_FALLBACK_BIT) +#define TAG(x) x##_twoside_fallback +#include "tnl_dd/t_dd_tritmp.h" +#define IND (I830_TWOSIDE_BIT|I830_OFFSET_BIT|I830_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" +#define IND (I830_UNFILLED_BIT|I830_FALLBACK_BIT) +#define TAG(x) x##_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" -void i830DDTrifuncInit() +#define IND (I830_OFFSET_BIT|I830_UNFILLED_BIT|I830_FALLBACK_BIT) +#define TAG(x) x##_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I830_TWOSIDE_BIT|I830_UNFILLED_BIT|I830_FALLBACK_BIT) +#define TAG(x) x##_twoside_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (I830_TWOSIDE_BIT|I830_OFFSET_BIT|I830_UNFILLED_BIT| \ + I830_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab( void ) { init(); - init_flat(); init_offset(); - init_offset_flat(); init_twoside(); - init_twoside_flat(); init_twoside_offset(); - init_twoside_offset_flat(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); + init_fallback(); + init_offset_fallback(); + init_twoside_fallback(); + init_twoside_offset_fallback(); + init_unfilled_fallback(); + init_offset_unfilled_fallback(); + init_twoside_unfilled_fallback(); + init_twoside_offset_unfilled_fallback(); +} + + +/*********************************************************************** + * Rasterization fallback helpers * + ***********************************************************************/ + + +/* This code is hit only when a mix of accelerated and unaccelerated + * primitives are being drawn, and only for the unaccelerated + * primitives. + */ +static void +i830_fallback_tri( i830ContextPtr imesa, + i830Vertex *v0, + i830Vertex *v1, + i830Vertex *v2 ) +{ + GLcontext *ctx = imesa->glCtx; + SWvertex v[3]; + + if (0) + fprintf(stderr, "\n%s\n", __FUNCTION__); + + i830_translate_vertex( ctx, v0, &v[0] ); + i830_translate_vertex( ctx, v1, &v[1] ); + i830_translate_vertex( ctx, v2, &v[2] ); + i830SpanRenderStart( ctx ); + _swrast_Triangle( ctx, &v[0], &v[1], &v[2] ); + i830SpanRenderFinish( ctx ); +} + + +static void +i830_fallback_line( i830ContextPtr imesa, + i830Vertex *v0, + i830Vertex *v1 ) +{ + GLcontext *ctx = imesa->glCtx; + SWvertex v[2]; + + if (0) + fprintf(stderr, "\n%s\n", __FUNCTION__); + + i830_translate_vertex( ctx, v0, &v[0] ); + i830_translate_vertex( ctx, v1, &v[1] ); + i830SpanRenderStart( ctx ); + _swrast_Line( ctx, &v[0], &v[1] ); + i830SpanRenderFinish( ctx ); +} + + +static void +i830_fallback_point( i830ContextPtr imesa, + i830Vertex *v0 ) +{ + GLcontext *ctx = imesa->glCtx; + SWvertex v[1]; + + if (0) + fprintf(stderr, "\n%s\n", __FUNCTION__); + + i830_translate_vertex( ctx, v0, &v[0] ); + i830SpanRenderStart( ctx ); + _swrast_Point( ctx, &v[0] ); + i830SpanRenderFinish( ctx ); +} + + + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ + +#define IND 0 +#define V(x) (i830Vertex *)(vertptr + ((x)<verts; \ + const GLuint vertshift = imesa->vertex_stride_shift; \ + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ + (void) elt; +#define RESET_STIPPLE +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) x +#define TAG(x) i830_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) i830_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + + + +static void i830RenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint prim = imesa->render_primitive; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON]( ctx, 0, n, + PRIM_BEGIN|PRIM_END ); + VB->Elts = tmp; + } + + /* Restore the render primitive + */ + if (prim != GL_POLYGON) + tnl->Driver.Render.PrimitiveNotify( ctx, prim ); +} + +static void i830RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + + tnl->Driver.Render.Line( ctx, ii, jj ); +} + +static void i830FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + GLuint vertsize = imesa->vertex_size; + GLuint *vb = i830AllocDmaLow( imesa, (n-2) * 3 * 4 * vertsize ); + GLubyte *vertptr = (GLubyte *)imesa->verts; + const GLuint vertshift = imesa->vertex_stride_shift; + const GLuint *start = (const GLuint *)V(elts[0]); + int i,j; + + for (i = 2 ; i < n ; i++) { + COPY_DWORDS( j, vb, vertsize, V(elts[i-1]) ); + COPY_DWORDS( j, vb, vertsize, V(elts[i]) ); + COPY_DWORDS( j, vb, vertsize, start ); + } +} + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + + + +#define _I830_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET | \ + _DD_NEW_TRI_STIPPLE | \ + _NEW_POLYGONSTIPPLE) + +#define POINT_FALLBACK (0) +#define LINE_FALLBACK (DD_LINE_STIPPLE) +#define TRI_FALLBACK (0) +#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK|\ + DD_TRI_STIPPLE) +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) + +static void i830ChooseRenderState(GLcontext *ctx) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint index = 0; + + if (I830_DEBUG & DEBUG_STATE) + fprintf(stderr,"\n%s\n",__FUNCTION__); + + if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { + if (flags & ANY_RASTER_FLAGS) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= I830_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= I830_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= I830_UNFILLED_BIT; + } + + imesa->draw_point = i830_draw_point; + imesa->draw_line = i830_draw_line; + imesa->draw_tri = i830_draw_triangle; + + /* Hook in fallbacks for specific primitives. + */ + if (flags & ANY_FALLBACK_FLAGS) + { + if (flags & POINT_FALLBACK) + imesa->draw_point = i830_fallback_point; + + if (flags & LINE_FALLBACK) + imesa->draw_line = i830_fallback_line; + + if (flags & TRI_FALLBACK) + imesa->draw_tri = i830_fallback_tri; + + if ((flags & DD_TRI_STIPPLE) && !imesa->hw_stipple) { + imesa->draw_tri = i830_fallback_tri; + } + + index |= I830_FALLBACK_BIT; + } + } + + if (imesa->RenderIndex != index) { + imesa->RenderIndex = index; + + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = i830_render_tab_verts; + tnl->Driver.Render.PrimTabElts = i830_render_tab_elts; + tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ + tnl->Driver.Render.ClippedPolygon = i830FastRenderClippedPoly; + } else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = i830RenderClippedLine; + tnl->Driver.Render.ClippedPolygon = i830RenderClippedPoly; + } + } +} + +static const GLenum reduced_prim[GL_POLYGON+1] = { + GL_POINTS, + GL_LINES, + GL_LINES, + GL_LINES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES +}; + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + + +/* Determine the rasterized primitive when not drawing unfilled + * polygons. + * + * Used only for the default render stage which always decomposes + * primitives to trianges/lines/points. For the accelerated stage, + * which renders strips as strips, the equivalent calculations are + * performed in i810render.c. + */ +static void i830RenderPrimitive( GLcontext *ctx, GLenum prim ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLuint rprim = reduced_prim[prim]; + + imesa->render_primitive = prim; + + if (rprim == GL_TRIANGLES && (ctx->_TriangleCaps & DD_TRI_UNFILLED)) + return; + + if (imesa->reduced_primitive != rprim || + hw_prim[prim] != imesa->hw_primitive) { + i830RasterPrimitive( ctx, rprim, hw_prim[prim] ); + } +} + +static void i830RunPipeline( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if (imesa->new_state) { + if (imesa->new_state & _NEW_TEXTURE) { + I830_FIREVERTICES( imesa ); + i830UpdateTextureState( ctx ); /* may modify imesa->new_state */ + } + + if (!imesa->Fallback) { + if (imesa->new_state & _I830_NEW_VERTEX) + i830ChooseVertexState( ctx ); + + if (imesa->new_state & _I830_NEW_RENDERSTATE) + i830ChooseRenderState( ctx ); + } + + imesa->new_state = 0; + } + + _tnl_run_pipeline( ctx ); +} + +static void i830RenderStart( GLcontext *ctx ) +{ + /* Check for projective textureing. Make sure all texcoord + * pointers point to something. (fix in mesa?) + */ + + i830CheckTexSizes( ctx ); +} + +static void i830RenderFinish( GLcontext *ctx ) +{ + if (I830_CONTEXT(ctx)->RenderIndex & I830_FALLBACK_BIT) + _swrast_flush( ctx ); +} + + + + +/* System to flush dma and emit state changes based on the rasterized + * primitive. + */ +void i830RasterPrimitive( GLcontext *ctx, + GLenum rprim, + GLuint hwprim ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLuint aa = imesa->Setup[I830_CTXREG_AA]; + GLuint st1 = imesa->StippleSetup[I830_STPREG_ST1]; + + aa &= ~AA_LINE_ENABLE; + + if (I830_DEBUG & DEBUG_PRIMS) { + /* Prints reduced prim, and hw prim */ + char *prim_name = "Unknown"; + + switch(hwprim) { + case PRIM3D_POINTLIST: + prim_name = "PointList"; + break; + case PRIM3D_LINELIST: + prim_name = "LineList"; + break; + case PRIM3D_LINESTRIP: + prim_name = "LineStrip"; + break; + case PRIM3D_TRILIST: + prim_name = "TriList"; + break; + case PRIM3D_TRISTRIP: + prim_name = "TriStrip"; + break; + case PRIM3D_TRIFAN: + prim_name = "TriFan"; + break; + case PRIM3D_POLY: + prim_name = "Polygons"; + break; + default: + break; + } + + fprintf(stderr, "%s : rprim(%s), hwprim(%s)\n", + __FUNCTION__, + _mesa_lookup_enum_by_nr(rprim), + prim_name); + } + + switch (rprim) { + case GL_TRIANGLES: + aa |= AA_LINE_DISABLE; + if (ctx->Polygon.StippleFlag) + st1 |= ST1_ENABLE; + else + st1 &= ~ST1_ENABLE; + break; + case GL_LINES: + st1 &= ~ST1_ENABLE; + if (ctx->Line.SmoothFlag) { + aa |= AA_LINE_ENABLE; + } else { + aa |= AA_LINE_DISABLE; + } + break; + case GL_POINTS: + st1 &= ~ST1_ENABLE; + aa |= AA_LINE_DISABLE; + break; + default: + return; + } + + imesa->reduced_primitive = rprim; + + if (aa != imesa->Setup[I830_CTXREG_AA]) { + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_AA] = aa; + } + +#if 0 + if (st1 != imesa->StippleSetup[I830_STPREG_ST1]) { + I830_STATECHANGE(imesa, I830_UPLOAD_STIPPLE); + imesa->StippleSetup[I830_STPREG_ST1] = st1; + } +#endif + + if (hwprim != imesa->hw_primitive) { + I830_STATECHANGE(imesa, 0); + imesa->hw_primitive = hwprim; + } } +/**********************************************************************/ +/* Transition to/from hardware rasterization. */ +/**********************************************************************/ + +static char *fallbackStrings[] = { + "Texture", + "Draw buffer", + "Read buffer", + "Color mask", + "Render mode", + "Stencil", + "Stipple", + "User disable" +}; -#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_UNFILLED | DD_TRI_STIPPLE | DD_TRI_SMOOTH) -#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) - -void i830DDChooseRenderState(GLcontext *ctx) -{ - i830ContextPtr imesa = I830_CONTEXT(ctx); - GLuint flags = ctx->TriangleCaps; - CARD32 index = 0; - - if (imesa->Fallback) { - imesa->renderindex = I830_FALLBACK_BIT; - return; - } - - if (flags & ANY_RASTER_FLAGS) { - if (flags & DD_FLATSHADE) index |= I830_FLAT_BIT; - if (flags & DD_TRI_LIGHT_TWOSIDE) index |= I830_TWOSIDE_BIT; - if (flags & DD_TRI_OFFSET) index |= I830_OFFSET_BIT; - } - - imesa->PointsFunc = points_tab[index]; - imesa->LineFunc = line_tab[index]; - imesa->TriangleFunc = tri_tab[index]; - imesa->QuadFunc = quad_tab[index]; - imesa->renderindex = index; - imesa->IndirectTriangles = 0; - - if (flags & ANY_FALLBACK) { - if (flags & POINT_FALLBACK) { - imesa->renderindex |= I830_FALLBACK_BIT; - imesa->PointsFunc = 0; - imesa->IndirectTriangles |= DD_POINT_SW_RASTERIZE; - } - - if (flags & LINE_FALLBACK) { - imesa->renderindex |= I830_FALLBACK_BIT; - imesa->LineFunc = 0; - imesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; - } - - if (flags & TRI_FALLBACK) { - imesa->renderindex |= I830_FALLBACK_BIT; - imesa->TriangleFunc = 0; - imesa->QuadFunc = 0; - imesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | - DD_QUAD_SW_RASTERIZE); - } - /* Special cases: - */ - if ((flags & DD_TRI_STIPPLE) && - (ctx->IndirectTriangles & DD_TRI_STIPPLE)) { - imesa->renderindex |= I830_FALLBACK_BIT; - imesa->TriangleFunc = 0; - imesa->QuadFunc = 0; - imesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | - DD_QUAD_SW_RASTERIZE); - } - } +static char *getFallbackString(GLuint bit) +{ + int i = 0; + while (bit > 1) { + i++; + bit >>= 1; + } + return fallbackStrings[i]; } +void i830Fallback( i830ContextPtr imesa, GLuint bit, GLboolean mode ) +{ + GLcontext *ctx = imesa->glCtx; + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint oldfallback = imesa->Fallback; + + if (mode) { + imesa->Fallback |= bit; + if (oldfallback == 0) { + I830_FIREVERTICES(imesa); + if (I830_DEBUG & DEBUG_FALLBACKS) + fprintf(stderr, "ENTER FALLBACK %s\n", getFallbackString( bit )); + _swsetup_Wakeup( ctx ); + imesa->RenderIndex = ~0; + } + } + else { + imesa->Fallback &= ~bit; + if (oldfallback == bit) { + _swrast_flush( ctx ); + if (I830_DEBUG & DEBUG_FALLBACKS) + fprintf(stderr, "LEAVE FALLBACK %s\n", getFallbackString( bit )); + tnl->Driver.Render.Start = i830RenderStart; + tnl->Driver.Render.PrimitiveNotify = i830RenderPrimitive; + tnl->Driver.Render.Finish = i830RenderFinish; + tnl->Driver.Render.BuildVertices = i830BuildVertices; + imesa->new_state |= (_I830_NEW_RENDERSTATE|_I830_NEW_VERTEX); + } + } +} + + + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + + +void i830InitTriFuncs( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + firsttime = 0; + } + + tnl->Driver.RunPipeline = i830RunPipeline; + tnl->Driver.Render.Start = i830RenderStart; + tnl->Driver.Render.Finish = i830RenderFinish; + tnl->Driver.Render.PrimitiveNotify = i830RenderPrimitive; + tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; + tnl->Driver.Render.BuildVertices = i830BuildVertices; +} Index: xc/lib/GL/mesa/src/drv/i830/i830_tris.h diff -u xc/lib/GL/mesa/src/drv/i830/i830_tris.h:1.2 xc/lib/GL/mesa/src/drv/i830/i830_tris.h:1.3 --- xc/lib/GL/mesa/src/drv/i830/i830_tris.h:1.2 Thu Jan 17 04:50:58 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_tris.h Mon Sep 9 15:18:48 2002 @@ -1,263 +1,37 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tris.h,v 1.2 2002/01/17 09:50:58 eich Exp $ */ - /* - * Author: - * Jeff Hartmann + * GLX Hardware Device Driver for Intel i810 + * 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: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell + * 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. + * + * Adapted for use in the I830M: + * Jeff Hartmann */ - -#ifndef i830_TRIS_INC -#define i830_TRIS_INC +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tris.h,v 1.3 2002/09/09 19:18:48 dawes Exp $ */ -#include "types.h" +#ifndef I830TRIS_INC +#define I830TRIS_INC -#include "i830_drv.h" -#include "i830_ioctl.h" +#include "mtypes.h" extern void i830PrintRenderState( const char *msg, GLuint state ); -extern void i830DDChooseRenderState(GLcontext *ctx); -extern void i830DDTrifuncInit( void ); - - -#define I830_FLAT_BIT 0x1 -#define I830_OFFSET_BIT 0x2 -#define I830_TWOSIDE_BIT 0x4 -#define I830_FALLBACK_BIT 0x8 - - - - -static void __inline__ i830_draw_triangle( i830ContextPtr imesa, - i830VertexPtr v0, - i830VertexPtr v1, - i830VertexPtr v2 ) -{ - GLuint vertsize = imesa->vertsize; - int j; - GLuint *vb = i830AllocDwordsInline(imesa, 3 * vertsize); - -#if 0 - - if(imesa->vertex_prim != PRIM3D_TRILIST) fprintf(stderr, "Not tris and rendering tris\n"); - - fprintf(stderr, "\n\n\n\nDrawTriangle :\n"); - fprintf(stderr, "v0\n"); - fprintf(stderr, "u: %f\n", v0->f[6]); - fprintf(stderr, "v: %f\n", v0->f[7]); - fprintf(stderr, "v1\n"); - fprintf(stderr, "u: %f\n", v1->f[6]); - fprintf(stderr, "v: %f\n", v1->f[7]); - fprintf(stderr, "v2\n"); - fprintf(stderr, "u: %f\n", v2->f[6]); - fprintf(stderr, "v: %f\n", v2->f[7]); -#endif - -#if 0 - fprintf(stderr, "\n\n\n\nDrawTriangle :\n"); - fprintf(stderr, "v0\n"); - fprintf(stderr, "0x%x\n", v0->ui[0]); - fprintf(stderr, "0x%x\n", v0->ui[1]); - fprintf(stderr, "0x%x\n", v0->ui[2]); - fprintf(stderr, "0x%x\n", v0->ui[3]); - fprintf(stderr, "0x%x\n", v0->ui[4]); - fprintf(stderr, "0x%x\n", v0->ui[5]); - fprintf(stderr, "0x%x\n", v0->ui[6]); - fprintf(stderr, "0x%x\n", v0->ui[7]); - fprintf(stderr, "0x%x\n", v0->ui[8]); - fprintf(stderr, "0x%x\n", v0->ui[9]); - fprintf(stderr, "0x%x\n", v0->ui[10]); - fprintf(stderr, "0x%x\n", v0->ui[11]); - fprintf(stderr, "0x%x\n", v0->ui[12]); - fprintf(stderr, "0x%x\n", v0->ui[13]); - fprintf(stderr, "0x%x\n", v0->ui[14]); - fprintf(stderr, "0x%x\n", v0->ui[15]); - fprintf(stderr, "v1\n"); - fprintf(stderr, "0x%x\n", v1->ui[0]); - fprintf(stderr, "0x%x\n", v1->ui[1]); - fprintf(stderr, "0x%x\n", v1->ui[2]); - fprintf(stderr, "0x%x\n", v1->ui[3]); - fprintf(stderr, "0x%x\n", v1->ui[4]); - fprintf(stderr, "0x%x\n", v1->ui[5]); - fprintf(stderr, "0x%x\n", v1->ui[6]); - fprintf(stderr, "0x%x\n", v1->ui[7]); - fprintf(stderr, "0x%x\n", v1->ui[8]); - fprintf(stderr, "0x%x\n", v1->ui[9]); - fprintf(stderr, "0x%x\n", v1->ui[10]); - fprintf(stderr, "0x%x\n", v1->ui[11]); - fprintf(stderr, "0x%x\n", v1->ui[12]); - fprintf(stderr, "0x%x\n", v1->ui[13]); - fprintf(stderr, "0x%x\n", v1->ui[14]); - fprintf(stderr, "0x%x\n", v1->ui[15]); - fprintf(stderr, "v2\n"); - fprintf(stderr, "0x%x\n", v2->ui[0]); - fprintf(stderr, "0x%x\n", v2->ui[1]); - fprintf(stderr, "0x%x\n", v2->ui[2]); - fprintf(stderr, "0x%x\n", v2->ui[3]); - fprintf(stderr, "0x%x\n", v2->ui[4]); - fprintf(stderr, "0x%x\n", v2->ui[5]); - fprintf(stderr, "0x%x\n", v2->ui[6]); - fprintf(stderr, "0x%x\n", v2->ui[7]); - fprintf(stderr, "0x%x\n", v2->ui[8]); - fprintf(stderr, "0x%x\n", v2->ui[9]); - fprintf(stderr, "0x%x\n", v2->ui[10]); - fprintf(stderr, "0x%x\n", v2->ui[11]); - fprintf(stderr, "0x%x\n", v2->ui[12]); - fprintf(stderr, "0x%x\n", v2->ui[13]); - fprintf(stderr, "0x%x\n", v2->ui[14]); - fprintf(stderr, "0x%x\n", v2->ui[15]); -#endif - -#if defined(USE_X86_ASM) - __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 -} - -/* We aren't supporting point params, so we are ignoring size */ -static __inline__ void i830_draw_point( i830ContextPtr imesa, - i830VertexPtr tmp, - float sz ) -{ - GLuint vertsize = imesa->vertsize; - int j; - GLuint *vb = i830AllocDwordsInline( imesa, 1 * vertsize ); - -#if 0 - if(imesa->vertex_prim != PRIM3D_POINTLIST) fprintf(stderr, "Not points and rendering points\n"); -#endif - -#if defined(USE_X86_ASM) - __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 - -} - -static __inline__ void i830_draw_line( i830ContextPtr imesa, - i830VertexPtr v0, - i830VertexPtr v1 ) -{ - GLuint vertsize = imesa->vertsize; - int j; - GLuint *vb = i830AllocDwordsInline( imesa, 2 * vertsize ); - -#if 0 - if(imesa->vertex_prim != PRIM3D_LINELIST) fprintf(stderr, "Not lines and rendering lines : prim %d\n", imesa->vertex_prim); -#endif - -#if 0 - fprintf(stderr, "\n\n\n\nDrawLine"); - fprintf(stderr, "v0\n"); - fprintf(stderr, "0x%x\n", v0->ui[0]); - fprintf(stderr, "0x%x\n", v0->ui[1]); - fprintf(stderr, "0x%x\n", v0->ui[2]); - fprintf(stderr, "0x%x\n", v0->ui[3]); - fprintf(stderr, "0x%x\n", v0->ui[4]); - fprintf(stderr, "0x%x\n", v0->ui[5]); - fprintf(stderr, "0x%x\n", v0->ui[6]); - fprintf(stderr, "0x%x\n", v0->ui[7]); - fprintf(stderr, "0x%x\n", v0->ui[8]); - fprintf(stderr, "0x%x\n", v0->ui[9]); - fprintf(stderr, "0x%x\n", v0->ui[10]); - fprintf(stderr, "0x%x\n", v0->ui[11]); - fprintf(stderr, "0x%x\n", v0->ui[12]); - fprintf(stderr, "0x%x\n", v0->ui[13]); - fprintf(stderr, "0x%x\n", v0->ui[14]); - fprintf(stderr, "0x%x\n", v0->ui[15]); - fprintf(stderr, "v1\n"); - fprintf(stderr, "0x%x\n", v1->ui[0]); - fprintf(stderr, "0x%x\n", v1->ui[1]); - fprintf(stderr, "0x%x\n", v1->ui[2]); - fprintf(stderr, "0x%x\n", v1->ui[3]); - fprintf(stderr, "0x%x\n", v1->ui[4]); - fprintf(stderr, "0x%x\n", v1->ui[5]); - fprintf(stderr, "0x%x\n", v1->ui[6]); - fprintf(stderr, "0x%x\n", v1->ui[7]); - fprintf(stderr, "0x%x\n", v1->ui[8]); - fprintf(stderr, "0x%x\n", v1->ui[9]); - fprintf(stderr, "0x%x\n", v1->ui[10]); - fprintf(stderr, "0x%x\n", v1->ui[11]); - fprintf(stderr, "0x%x\n", v1->ui[12]); - fprintf(stderr, "0x%x\n", v1->ui[13]); - fprintf(stderr, "0x%x\n", v1->ui[14]); - fprintf(stderr, "0x%x\n", v1->ui[15]); -#endif - -#if defined(USE_X86_ASM) - __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" ); -#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]; -#endif -} - +extern void i830InitTriFuncs( GLcontext *ctx ); +extern void i830RasterPrimitive( GLcontext *ctx, GLenum rprim, GLuint hwprim ); #endif Index: xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h diff -u xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h:1.1 xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h:removed --- xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h Thu Feb 27 12:26:26 2003 @@ -1,276 +0,0 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - -/* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell - */ - -static __inline void TAG(triangle)(GLcontext *ctx, - GLuint e0, GLuint e1, GLuint e2, - GLuint pv) -{ - i830ContextPtr imesa = I830_CONTEXT(ctx); - struct vertex_buffer *VB = ctx->VB; - i830VertexPtr i830verts = I830_DRIVER_DATA(VB)->verts; - i830Vertex *v[3]; - -#if (IND & I830_OFFSET_BIT) - GLfloat offset; - GLfloat z[3]; -#endif - -#if (IND & (I830_TWOSIDE_BIT | I830_FLAT_BIT)) - GLuint c[3]; - GLuint s[3]; -#endif - - v[0] = &i830verts[e0]; - v[1] = &i830verts[e1]; - v[2] = &i830verts[e2]; - -#if (IND & (I830_TWOSIDE_BIT | I830_FLAT_BIT)) - 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 - - -#if (IND & (I830_TWOSIDE_BIT | I830_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 & I830_TWOSIDE_BIT) - { - GLuint facing = (cc > 0.0) ^ ctx->Polygon.FrontBit; - GLubyte (*vbcolor)[4] = VB->Color[facing]->data; - GLubyte (*vbspec)[4] = VB->Spec[facing]; - if (IND & I830_FLAT_BIT) { - I830_COLOR((char *)&v[0]->ui[4], vbcolor[pv]); - v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; - I830_COLOR3((char *)&v[0]->ui[5], vbspec[pv]); - v[2]->ui[5] = v[1]->ui[5] = v[0]->ui[5]; - } else { - I830_COLOR((char *)&v[0]->ui[4], vbcolor[e0]); - I830_COLOR((char *)&v[1]->ui[4], vbcolor[e1]); - I830_COLOR((char *)&v[2]->ui[4], vbcolor[e2]); - I830_COLOR3((char *)&v[0]->ui[5], vbspec[e0]); - I830_COLOR3((char *)&v[1]->ui[5], vbspec[e1]); - I830_COLOR3((char *)&v[2]->ui[5], vbspec[e2]); - } - } -#endif - -#if (IND & I830_OFFSET_BIT) - { - /*offset = ctx->Polygon.OffsetUnits * 1.0/0x10000;*/ - offset = ctx->Polygon.OffsetUnits * imesa->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 - } -#elif (IND & I830_FLAT_BIT) - { - GLuint color = i830verts[pv].ui[4]; - GLuint spec = i830verts[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 - - i830_draw_triangle( imesa, v[0], v[1], v[2] ); - -#if (IND & I830_OFFSET_BIT) - v[0]->v.z = z[0]; - v[1]->v.z = z[1]; - v[2]->v.z = z[2]; -#endif - -#if (IND & (I830_FLAT_BIT | I830_TWOSIDE_BIT)) - 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 - -} - - - - -static void TAG(quad)( GLcontext *ctx, GLuint v0, - GLuint v1, GLuint v2, GLuint v3, - GLuint pv ) -{ - TAG(triangle)( ctx, v0, v1, v3, pv ); - TAG(triangle)( ctx, v1, v2, v3, pv ); -} - - -static void TAG(line)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv ) -{ - i830ContextPtr imesa = I830_CONTEXT( ctx ); - i830VertexPtr i830VB = I830_DRIVER_DATA(ctx->VB)->verts; - GLfloat z0, z1; - GLuint c0, c1; - GLuint s0, s1; - i830Vertex *vert0 = &i830VB[v0]; - i830Vertex *vert1 = &i830VB[v1]; - - if (IND & I830_TWOSIDE_BIT) { - GLubyte (*vbcolor)[4] = ctx->VB->ColorPtr->data; - GLubyte (*vbspec)[4] = ctx->VB->Specular; - - if (IND & I830_FLAT_BIT) { - I830_COLOR((char *)&vert0->v.color,vbcolor[pv]); - *(int *)&vert1->v.color = *(int *)&vert0->v.color; - I830_COLOR3((char *)&vert0->v.specular, vbspec[pv]); - *(int *)&vert1->v.specular = *(int *)&vert0->v.specular; - } else { - I830_COLOR((char *)&vert0->v.color,vbcolor[v0]); - I830_COLOR((char *)&vert1->v.color,vbcolor[v1]); - I830_COLOR3((char *)&vert0->v.specular, vbspec[v0]); - I830_COLOR3((char *)&vert1->v.specular, vbspec[v1]); - } - } else if (IND & I830_FLAT_BIT) { - c0 = *(GLuint *) &(vert0->v.color); - c1 = *(GLuint *) &(vert1->v.color); - *(int *)&vert0->v.color = - *(int *)&vert1->v.color = *(int *)&i830VB[pv].v.color; - s0 = *(GLuint *) &(vert0->v.specular); - s1 = *(GLuint *) &(vert1->v.specular); - *(int *)&vert0->v.specular = - *(int *)&vert1->v.specular = *(int *)&i830VB[pv].v.specular; - } - - if (IND & I830_OFFSET_BIT) { - /*GLfloat offset = ctx->LineZoffset * (1.0 / 0x10000);*/ - GLfloat offset = ctx->LineZoffset * imesa->depth_scale; - z0 = vert0->v.z; - z1 = vert1->v.z; - vert0->v.z += offset; - vert1->v.z += offset; - } - - i830_draw_line( imesa, &i830VB[v0], &i830VB[v1]); - - if (IND & I830_OFFSET_BIT) { - vert0->v.z = z0; - vert1->v.z = z1; - } - - if ((IND & I830_FLAT_BIT) && !(IND & I830_TWOSIDE_BIT)) { - *(GLuint *) &(vert0->v.color) = c0; - *(GLuint *) &(vert1->v.color) = c1; - *(GLuint *) &(vert0->v.specular) = s0; - *(GLuint *) &(vert1->v.specular) = s1; - } -} - -static void TAG(points)( GLcontext *ctx, GLuint first, GLuint last ) -{ - i830ContextPtr imesa = I830_CONTEXT( ctx ); - struct vertex_buffer *VB = ctx->VB; - i830VertexPtr i830VB = I830_DRIVER_DATA(VB)->verts; - GLfloat sz = ctx->Point.Size * .5; - int i; - - for(i=first;iClipMask[i]==0) { - if (IND & (I830_TWOSIDE_BIT|I830_OFFSET_BIT)) { - i830Vertex tmp0 = i830VB[i]; - if (IND & I830_TWOSIDE_BIT) { - GLubyte (*vbcolor)[4] = VB->ColorPtr->data; - I830_COLOR((char *)&tmp0.v.color, vbcolor[i]); - } - if (IND & I830_OFFSET_BIT) { - /*GLfloat offset = ctx->PointZoffset * (1.0 / 0x10000);*/ - GLfloat offset = ctx->PointZoffset * imesa->depth_scale; - tmp0.v.z += offset; - } - tmp0.f[0] -= 0.125; - tmp0.f[1] -= 0.125; - i830_draw_point( imesa, &tmp0, sz ); - } else { - i830VB[i].f[0] -= 0.125; - i830VB[i].f[1] -= 0.125; - i830_draw_point( imesa, &i830VB[i], sz ); - i830VB[i].f[0] += 0.125; - i830VB[i].f[1] += 0.125; - } - } -} - - - - -static void TAG(init)( void ) -{ - tri_tab[IND] = TAG(triangle); - quad_tab[IND] = TAG(quad); - line_tab[IND] = TAG(line); - points_tab[IND] = TAG(points); -} - - -#undef IND -#undef TAG Index: xc/lib/GL/mesa/src/drv/i830/i830_vb.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_vb.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_vb.c:1.5 --- xc/lib/GL/mesa/src/drv/i830/i830_vb.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_vb.c Mon Dec 9 20:26:54 2002 @@ -1,480 +1,593 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_vb.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - /* - * Author: - * Jeff Hartmann + * GLX Hardware Device Driver for Intel i810 + * 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: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell + * 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. + * + * Adapted for use on the I830M: + * Jeff Hartmann */ - -#include -#include +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_vb.c,v 1.5 2002/12/10 01:26:54 dawes Exp $ */ -#include "i830_drv.h" +#include "glheader.h" +#include "mtypes.h" #include "mem.h" -#include "stages.h" - -#define TEX0 { \ - v->v.tu0 = tc0[i][0]; \ - v->v.tv0 = tc0[i][1]; \ -} - -#define TEX1 { \ - v->v.tu1 = tc1[i][0]; \ - v->v.tv1 = tc1[i][1]; \ -} - -/* Doesn't seem to work very well (golly). +#include "macros.h" +#include "colormac.h" +#include "mmath.h" + +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" + +#include "i830_screen.h" +#include "i830_dri.h" + +#include "i830_context.h" +#include "i830_vb.h" +#include "i830_ioctl.h" +#include "i830_tris.h" +#include "i830_state.h" + +#define I830_TEX1_BIT 0x1 +#define I830_TEX0_BIT 0x2 +#define I830_RGBA_BIT 0x4 +#define I830_SPEC_BIT 0x8 +#define I830_FOG_BIT 0x10 +#define I830_XYZW_BIT 0x20 +#define I830_PTEX_BIT 0x40 +#define I830_MAX_SETUP 0x80 + +static struct { + void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint ); + interp_func interp; + copy_pv_func copy_pv; + GLboolean (*check_tex_sizes)( GLcontext *ctx ); + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; +} setup_tab[I830_MAX_SETUP]; + +#define TINY_VERTEX_FORMAT (STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(0) | \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_XYZ) + +#define NOTEX_VERTEX_FORMAT (STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(0) | \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_SPEC | \ + VRTX_HAS_XYZW) + +#define TEX0_VERTEX_FORMAT (STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(1) | \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_SPEC | \ + VRTX_HAS_XYZW) + +#define TEX1_VERTEX_FORMAT (STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(2) | \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_SPEC | \ + VRTX_HAS_XYZW) + + +/* I'm cheating here hardcore : if bit 31 is set I know to emit + * a vf2 state == TEXCOORDFMT_3D. We never mix 2d/3d texcoords, + * so this solution works for now. */ -#define SPC { \ - 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]; \ -} -#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]; \ -} +#define PROJ_TEX1_VERTEX_FORMAT ((1<<31) | \ + STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(2) | \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_SPEC | \ + VRTX_HAS_XYZW) + +/* Might want to do these later */ +#define TEX2_VERTEX_FORMAT 0 +#define TEX3_VERTEX_FORMAT 0 +#define PROJ_TEX3_VERTEX_FORMAT 0 + +#define DO_XYZW (IND & I830_XYZW_BIT) +#define DO_RGBA (IND & I830_RGBA_BIT) +#define DO_SPEC (IND & I830_SPEC_BIT) +#define DO_FOG (IND & I830_FOG_BIT) +#define DO_TEX0 (IND & I830_TEX0_BIT) +#define DO_TEX1 (IND & I830_TEX1_BIT) +#define DO_TEX2 0 +#define DO_TEX3 0 +#define DO_PTEX (IND & I830_PTEX_BIT) + +#define VERTEX i830Vertex +#define VERTEX_COLOR i830_color_t +#define GET_VIEWPORT_MAT() I830_CONTEXT(ctx)->ViewportMatrix.m +#define GET_TEXSOURCE(n) n +#define GET_VERTEX_FORMAT() I830_CONTEXT(ctx)->vertex_format +#define GET_VERTEX_STORE() ((GLubyte *)I830_CONTEXT(ctx)->verts) +#define GET_VERTEX_STRIDE_SHIFT() I830_CONTEXT(ctx)->vertex_stride_shift +#define GET_UBYTE_COLOR_STORE() &I830_CONTEXT(ctx)->UbyteColor +#define GET_UBYTE_SPEC_COLOR_STORE() &I830_CONTEXT(ctx)->UbyteSecondaryColor +#define INVALIDATE_STORED_VERTICES() + +#define HAVE_HW_VIEWPORT 0 +#define HAVE_HW_DIVIDE 0 +#define HAVE_RGBA_COLOR 0 +#define HAVE_TINY_VERTICES 1 +#define HAVE_NOTEX_VERTICES 1 +#define HAVE_TEX0_VERTICES 1 +#define HAVE_TEX1_VERTICES 1 +#define HAVE_TEX2_VERTICES 0 +#define HAVE_TEX3_VERTICES 0 +#define HAVE_PTEX_VERTICES 1 + +#define UNVIEWPORT_VARS GLfloat h = I830_CONTEXT(ctx)->driDrawable->h +#define UNVIEWPORT_X(x) x - SUBPIXEL_X +#define UNVIEWPORT_Y(y) - y + h + SUBPIXEL_Y +#define UNVIEWPORT_Z(z) z * (float)I830_CONTEXT(ctx)->ClearDepth + +#define PTEX_FALLBACK() FALLBACK(I830_CONTEXT(ctx), I830_FALLBACK_TEXTURE, 1) + +#define IMPORT_FLOAT_COLORS i830_import_float_colors +#define IMPORT_FLOAT_SPEC_COLORS i830_import_float_spec_colors + +#define INTERP_VERTEX setup_tab[I830_CONTEXT(ctx)->SetupIndex].interp +#define COPY_PV_VERTEX setup_tab[I830_CONTEXT(ctx)->SetupIndex].copy_pv + + +/*********************************************************************** + * Generate pv-copying and translation functions * + ***********************************************************************/ + +#define TAG(x) i830_##x +#include "tnl_dd/t_dd_vb.c" + +/*********************************************************************** + * Generate vertex emit and interp functions * + ***********************************************************************/ + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT) +#define TAG(x) x##_wg +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_SPEC_BIT) +#define TAG(x) x##_wgs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_TEX0_BIT) +#define TAG(x) x##_wgt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT) +#define TAG(x) x##_wgt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_TEX0_BIT|I830_PTEX_BIT) +#define TAG(x) x##_wgpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT) +#define TAG(x) x##_wgst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT|\ + I830_TEX1_BIT) +#define TAG(x) x##_wgst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT|\ + I830_PTEX_BIT) +#define TAG(x) x##_wgspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT) +#define TAG(x) x##_wgf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT) +#define TAG(x) x##_wgfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT) +#define TAG(x) x##_wgft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT|\ + I830_TEX1_BIT) +#define TAG(x) x##_wgft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT|\ + I830_PTEX_BIT) +#define TAG(x) x##_wgfpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|\ + I830_TEX0_BIT) +#define TAG(x) x##_wgfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|\ + I830_TEX0_BIT|I830_TEX1_BIT) +#define TAG(x) x##_wgfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|\ + I830_TEX0_BIT|I830_PTEX_BIT) +#define TAG(x) x##_wgfspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_TEX0_BIT) +#define TAG(x) x##_t0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_TEX0_BIT|I830_TEX1_BIT) +#define TAG(x) x##_t0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_FOG_BIT) +#define TAG(x) x##_f +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_FOG_BIT|I830_TEX0_BIT) +#define TAG(x) x##_ft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT) +#define TAG(x) x##_ft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT) +#define TAG(x) x##_g +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_SPEC_BIT) +#define TAG(x) x##_gs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_TEX0_BIT) +#define TAG(x) x##_gt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT) +#define TAG(x) x##_gt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT) +#define TAG(x) x##_gst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT|I830_TEX1_BIT) +#define TAG(x) x##_gst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_FOG_BIT) +#define TAG(x) x##_gf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT) +#define TAG(x) x##_gfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT) +#define TAG(x) x##_gft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT) +#define TAG(x) x##_gft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT) +#define TAG(x) x##_gfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT|\ + I830_TEX1_BIT) +#define TAG(x) x##_gfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +/* Add functions for proj texturing for t0 and t1 */ +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT|\ + I830_PTEX_BIT) +#define TAG(x) x##_wgpt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT|\ + I830_TEX1_BIT|I830_PTEX_BIT) +#define TAG(x) x##_wgspt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT|\ + I830_TEX1_BIT|I830_PTEX_BIT) +#define TAG(x) x##_wgfpt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (I830_XYZW_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|\ + I830_TEX1_BIT|I830_TEX0_BIT|I830_PTEX_BIT) +#define TAG(x) x##_wgfspt0t1 +#include "tnl_dd/t_dd_vbtmp.h" -/* The vertex formats we have don't seem to support projective texturing - * in the multitexture case. (Would require another 1/w value for the - * second set of texcoords). - * XXX grantham - i830 does q coordinate, haven't spent time to figure out - * how to implement dynamic HOMOGENOUS coord; plus need to copy tc[i][2] - * for cube maps, not tc[i][3] - */ -#define TEX0_4 \ - if (VB->TexCoordPtr[0]->size == 4) \ - { \ - GLfloat (*tc)[4] = VB->TexCoordPtr[0]->data; \ - v = &(I830_DRIVER_DATA(VB)->verts[start]); \ - imesa->setupdone &= ~I830_WIN_BIT; \ - for (i=start; i < end; i++, v++) { \ - float oow = 1.0 / tc[i][3]; \ - v->v.oow *= tc[i][3]; \ - v->v.tu0 *= oow; \ - v->v.tv0 *= oow; \ - } \ - } - -#define COORD \ - GLfloat *win = VB->Win.data[i]; \ - v->v.x = xoffset + win[0]; \ - v->v.y = yoffset - win[1]; \ - v->v.z = depth_scale * win[2]; \ - v->v.oow = win[3]; - - -#define NOP -#define SUBPIXEL_X 0.125 -#define SUBPIXEL_Y 0.125 - -#define SETUPFUNC(name,win,col,tex0,tex1,tex0_4,spec,fog) \ -static void name(struct vertex_buffer *VB, GLuint start, GLuint end) \ -{ \ - i830ContextPtr imesa = I830_CONTEXT( VB->ctx ); \ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ - i830VertexPtr v; \ - GLfloat (*tc0)[4]; \ - GLfloat (*tc1)[4]; \ - const GLfloat depth_scale = imesa->depth_scale; \ - const GLfloat xoffset = SUBPIXEL_X; \ - const GLfloat yoffset = dPriv->h + SUBPIXEL_Y; \ - int i; \ - (void) xoffset; \ - (void) yoffset; \ - (void) imesa; \ - (void) depth_scale; \ - \ - \ - gl_import_client_data( VB, VB->ctx->RenderFlags, \ - (VB->ClipOrMask \ - ? VEC_WRITABLE|VEC_GOOD_STRIDE \ - : VEC_GOOD_STRIDE)); \ - \ - tc0 = VB->TexCoordPtr[0]->data; \ - tc1 = VB->TexCoordPtr[1]->data; \ - \ - v = &(I830_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; */ \ - /* tex2_4; */ \ - /* tex3_4; */ \ -} - -SETUPFUNC(rs_wt0, COORD,NOP,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wt0t1, COORD,NOP,TEX0,TEX1,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wft0, COORD,NOP,TEX0,NOP,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wft0t1, COORD,NOP,TEX0,TEX1,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wg, COORD,COL,NOP,NOP,NOP,NOP,NOP) -SETUPFUNC(rs_wgs, COORD,COL,NOP,NOP,NOP,SPC,NOP) -SETUPFUNC(rs_wgt0, COORD,COL,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wgt0t1, COORD,COL,TEX0,TEX1,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wgst0, COORD,COL,TEX0,NOP,TEX0_4,SPC,NOP) -SETUPFUNC(rs_wgst0t1, COORD,COL,TEX0,TEX1,TEX0_4,SPC,NOP) -SETUPFUNC(rs_wgf, COORD,COL,NOP,NOP,NOP,NOP,FOG) -SETUPFUNC(rs_wgfs, COORD,COL,NOP,NOP,NOP,SPC,FOG) -SETUPFUNC(rs_wgft0, COORD,COL,TEX0,NOP,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wgft0t1, COORD,COL,TEX0,TEX1,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wgfst0, COORD,COL,TEX0,NOP,TEX0_4,SPC,FOG) -SETUPFUNC(rs_wgfst0t1, COORD,COL,TEX0,TEX1,TEX0_4,SPC,FOG) - -SETUPFUNC(rs_t0, NOP,NOP,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_t0t1, NOP,NOP,TEX0,TEX1,TEX0_4,NOP,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,NOP,FOG) -SETUPFUNC(rs_g, NOP,COL,NOP,NOP,NOP,NOP,NOP) -SETUPFUNC(rs_gs, NOP,COL,NOP,NOP,NOP,SPC,NOP) -SETUPFUNC(rs_gt0, NOP,COL,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_gt0t1, NOP,COL,TEX0,TEX1,TEX0_4,NOP,NOP) -SETUPFUNC(rs_gst0, NOP,COL,TEX0,NOP,TEX0_4,SPC,NOP) -SETUPFUNC(rs_gst0t1, NOP,COL,TEX0,TEX1,TEX0_4,SPC,NOP) -SETUPFUNC(rs_gf, NOP,COL,NOP,NOP,NOP,NOP,FOG) -SETUPFUNC(rs_gfs, NOP,COL,NOP,NOP,NOP,SPC,FOG) -SETUPFUNC(rs_gft0, NOP,COL,TEX0,NOP,TEX0_4,NOP,FOG) -SETUPFUNC(rs_gft0t1, NOP,COL,TEX0,TEX1,TEX0_4,NOP,FOG) -SETUPFUNC(rs_gfst0, NOP,COL,TEX0,NOP,TEX0_4,SPC,FOG) -SETUPFUNC(rs_gfst0t1, NOP,COL,TEX0,TEX1,TEX0_4,SPC,FOG) - - - -static void rs_invalid(struct vertex_buffer *VB, GLuint start, GLuint end) +static void init_setup_tab( void ) { - - fprintf(stderr, "i830RasterSetup(): invalid setup function\n"); + init_wg(); + init_wgs(); + init_wgt0(); + init_wgt0t1(); + init_wgpt0(); + init_wgst0(); + init_wgst0t1(); + init_wgspt0(); + init_wgf(); + init_wgfs(); + init_wgft0(); + init_wgft0t1(); + init_wgfpt0(); + init_wgfst0(); + init_wgfst0t1(); + init_wgfspt0(); + init_t0(); + init_t0t1(); + init_f(); + init_ft0(); + init_ft0t1(); + init_g(); + init_gs(); + init_gt0(); + init_gt0t1(); + init_gst0(); + init_gst0t1(); + init_gf(); + init_gfs(); + init_gft0(); + init_gft0t1(); + init_gfst0(); + init_gfst0t1(); + /* Add proj texturing on t1 */ + init_wgpt0t1(); + init_wgspt0t1(); + init_wgfpt0t1(); + init_wgfspt0t1(); } -typedef void (*setupFunc)(struct vertex_buffer *,GLuint,GLuint); - -static setupFunc setup_func[0x80]; -void i830DDSetupInit( void ) -{ - int i; - - for (i = 0 ; i < 0x80 ; i++) - setup_func[i] = rs_invalid; - - /* Functions to build vert's from scratch */ - setup_func[I830_WIN_BIT|I830_TEX0_BIT] = rs_wt0; - setup_func[I830_WIN_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wt0t1; - setup_func[I830_WIN_BIT|I830_FOG_BIT|I830_TEX0_BIT] = rs_wft0; - setup_func[I830_WIN_BIT|I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wft0t1; - setup_func[I830_WIN_BIT|I830_RGBA_BIT] = rs_wg; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_SPEC_BIT] = rs_wgs; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_TEX0_BIT] = rs_wgt0; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wgt0t1; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT] = rs_wgst0; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wgst0t1; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT] = rs_wgf; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT] = rs_wgfs; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT] = rs_wgft0; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wgft0t1; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT] = rs_wgfst0; - setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wgfst0t1; - - /* Repair functions */ - setup_func[I830_TEX0_BIT] = rs_t0; - setup_func[I830_TEX0_BIT|I830_TEX1_BIT] = rs_t0t1; - setup_func[I830_FOG_BIT] = rs_f; - setup_func[I830_FOG_BIT|I830_TEX0_BIT] = rs_ft0; - setup_func[I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_ft0t1; - setup_func[I830_RGBA_BIT] = rs_g; - setup_func[I830_RGBA_BIT|I830_SPEC_BIT] = rs_gs; - setup_func[I830_RGBA_BIT|I830_TEX0_BIT] = rs_gt0; - setup_func[I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_gt0t1; - setup_func[I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT] = rs_gst0; - setup_func[I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_gst0t1; - setup_func[I830_RGBA_BIT|I830_FOG_BIT] = rs_gf; - setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT] = rs_gfs; - setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT] = rs_gft0; - setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_gft0t1; - setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT] = rs_gfst0; - setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_gfst0t1; - -} - void i830PrintSetupFlags(char *msg, GLuint flags ) { - fprintf(stderr, "%s: %d %s%s%s%s%s%s%s\n", + fprintf(stderr, "%s(%x): %s%s%s%s%s%s%s\n", msg, (int)flags, - (flags & I830_WIN_BIT) ? " xyzw," : "", + (flags & I830_XYZW_BIT) ? " xyzw," : "", (flags & I830_RGBA_BIT) ? " rgba," : "", (flags & I830_SPEC_BIT) ? " spec," : "", (flags & I830_FOG_BIT) ? " fog," : "", (flags & I830_TEX0_BIT) ? " tex-0," : "", (flags & I830_TEX1_BIT) ? " tex-1," : "", - (flags & I830_ALPHA_BIT) ? " alpha," : ""); + (flags & I830_PTEX_BIT) ? " ptex," : ""); } - -void i830ChooseRasterSetupFunc(GLcontext *ctx) +void i830CheckTexSizes( GLcontext *ctx ) { - i830ContextPtr imesa = I830_CONTEXT( ctx ); - int funcindex = (I830_WIN_BIT | I830_RGBA_BIT); - - if(I830_DEBUG&DEBUG_VERBOSE_TRACE) - fprintf(stderr, "%s\n", __FUNCTION__); + TNLcontext *tnl = TNL_CONTEXT(ctx); + i830ContextPtr imesa = I830_CONTEXT( ctx ); - imesa->vertsize = 8; - imesa->Setup[I830_CTXREG_VF] = VRTX_FORMAT_NTEX(1); + if (!setup_tab[imesa->SetupIndex].check_tex_sizes(ctx)) { + int ind = imesa->SetupIndex |= I830_PTEX_BIT; + + if(setup_tab[ind].vertex_format != imesa->vertex_format) { + int vfmt = setup_tab[ind].vertex_format; + + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_VF] = ~(1<<31) & vfmt; + + if (vfmt & (1<<31)) { + /* Proj texturing */ + imesa->Setup[I830_CTXREG_VF2] = (STATE3D_VERTEX_FORMAT_2_CMD | + VRTX_TEX_SET_0_FMT(TEXCOORDFMT_3D) | + VRTX_TEX_SET_1_FMT(TEXCOORDFMT_3D) | + VRTX_TEX_SET_2_FMT(TEXCOORDFMT_3D) | + VRTX_TEX_SET_3_FMT(TEXCOORDFMT_3D)); + i830UpdateTexUnitProj( ctx, 0, GL_TRUE ); + i830UpdateTexUnitProj( ctx, 1, GL_TRUE ); + + } else { + /* Normal texturing */ + imesa->Setup[I830_CTXREG_VF2] = (STATE3D_VERTEX_FORMAT_2_CMD | + VRTX_TEX_SET_0_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_1_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_2_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_3_FMT(TEXCOORDFMT_2D)); + i830UpdateTexUnitProj( ctx, 0, GL_FALSE ); + i830UpdateTexUnitProj( ctx, 1, GL_FALSE ); + } + imesa->vertex_format = vfmt; + imesa->vertex_size = setup_tab[ind].vertex_size; + imesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; + } - if (ctx->Texture.ReallyEnabled & 0xf) - funcindex |= I830_TEX0_BIT; - - if (ctx->Texture.ReallyEnabled & 0xf0) { - funcindex |= (I830_TEX0_BIT | I830_TEX1_BIT); - imesa->vertsize = 10; - imesa->Setup[I830_CTXREG_VF] = VRTX_FORMAT_NTEX(2); - } - - if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - funcindex |= I830_SPEC_BIT; - - if (ctx->FogMode == FOG_FRAGMENT) - funcindex |= I830_FOG_BIT; - - if (MESA_VERBOSE) - i830PrintSetupFlags("xsmesa: full setup function", funcindex); - - imesa->setupindex = funcindex; - ctx->Driver.RasterSetup = setup_func[funcindex]; - if(0) fprintf(stderr, "funcindex : 0x%x\n", funcindex); + if (!imesa->Fallback && + !(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { + tnl->Driver.Render.Interp = setup_tab[imesa->SetupIndex].interp; + tnl->Driver.Render.CopyPV = setup_tab[imesa->SetupIndex].copy_pv; + } + } } - - - -void i830DDCheckPartialRasterSetup( GLcontext *ctx, - struct gl_pipeline_stage *d ) +void i830BuildVertices( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint newinputs ) { i830ContextPtr imesa = I830_CONTEXT( ctx ); - GLuint tmp = imesa->setupdone; + GLubyte *v = ((GLubyte *) + imesa->verts + (start<vertex_stride_shift)); + GLuint stride = 1<vertex_stride_shift; - d->type = 0; - imesa->setupdone = 0; /* cleared if we return */ + if (0) fprintf(stderr, "%s\n", __FUNCTION__); - if ((ctx->Array.Summary & VERT_OBJ_ANY) == 0) - return; + newinputs |= imesa->SetupNewInputs; + imesa->SetupNewInputs = 0; - if (ctx->IndirectTriangles) + if (!newinputs) return; - - imesa->setupdone = tmp; - - /* disabled until we have a merge&render op */ - /* d->inputs = available; */ - /* d->outputs = VERT_RAST_SETUP_PART; */ - /* d->type = PIPE_PRECALC; */ -} + if (newinputs & VERT_CLIP) { + setup_tab[imesa->SetupIndex].emit( ctx, start, count, v, stride ); + } else { + GLuint ind = 0; -/* Repair existing precalculated vertices with new data. - */ -void i830DDPartialRasterSetup( struct vertex_buffer *VB ) -{ - i830ContextPtr imesa = I830_CONTEXT( VB->ctx ); - GLuint new = VB->pipeline->new_outputs; - GLuint available = VB->pipeline->outputs; - GLuint ind = 0; - - if (new & VERT_WIN) { - new = available; - ind |= I830_WIN_BIT | I830_FOG_BIT; - } + if (newinputs & VERT_RGBA) + ind |= I830_RGBA_BIT; - if (new & VERT_RGBA) - ind |= I830_RGBA_BIT | I830_SPEC_BIT; + if (newinputs & VERT_SPEC_RGB) + ind |= I830_SPEC_BIT; - if (new & VERT_TEX0_ANY) - ind |= I830_TEX0_BIT; + if (newinputs & VERT_TEX0) + ind |= I830_TEX0_BIT; - if (new & VERT_TEX1_ANY) - ind |= I830_TEX1_BIT; + if (newinputs & VERT_TEX1) + ind |= I830_TEX1_BIT; - if (new & VERT_FOG_COORD) - ind |= I830_FOG_BIT; + if (newinputs & VERT_FOG_COORD) + ind |= I830_FOG_BIT; - imesa->setupdone &= ~ind; - ind &= imesa->setupindex; - imesa->setupdone |= ind; +#if 0 + if (imesa->SetupIndex & I830_PTEX_BIT) + ind = ~0; +#endif - if (0) i830PrintSetupFlags("xsmesa: partial setup function", ind); + ind &= imesa->SetupIndex; - if (ind) - setup_func[ind&~I830_ALPHA_BIT]( VB, VB->Start, VB->Count ); + if (ind) { + setup_tab[ind].emit( ctx, start, count, v, stride ); + } + } } - -void i830DDDoRasterSetup( struct vertex_buffer *VB ) +void i830ChooseVertexState( GLcontext *ctx ) { - GLcontext *ctx = VB->ctx; - - if (VB->Type == VB_CVA_PRECALC) - i830DDPartialRasterSetup( VB ); - else if (ctx->Driver.RasterSetup) - ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); -} - - + TNLcontext *tnl = TNL_CONTEXT(ctx); + i830ContextPtr imesa = I830_CONTEXT( ctx ); + GLuint ind = I830_XYZW_BIT|I830_RGBA_BIT; + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + ind |= I830_SPEC_BIT; -void i830DDResizeVB( struct vertex_buffer *VB, GLuint size ) -{ - i830VertexBufferPtr mvb = I830_DRIVER_DATA(VB); + if (ctx->Fog.Enabled) + ind |= I830_FOG_BIT; - while (mvb->size < size) - mvb->size *= 2; + /* unit 1 */ + if (ctx->Texture._ReallyEnabled & TEXTURE1_ANY) + ind |= I830_TEX1_BIT|I830_TEX0_BIT; + /* unit 0 */ + else if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) + ind |= I830_TEX0_BIT; - free( mvb->vert_store ); - mvb->vert_store = malloc( sizeof(i830Vertex) * mvb->size + 31); - if (!mvb->vert_store) { - fprintf(stderr, "i830glx: out of memory !\n"); - exit(1); - } + imesa->SetupIndex = ind; - mvb->verts = (i830VertexPtr)(((unsigned long)mvb->vert_store + 31) & ~31); + if (I830_DEBUG & (DEBUG_VERTS|DEBUG_STATE)) + i830PrintSetupFlags( __FUNCTION__, ind ); - gl_vector1ui_free( &mvb->clipped_elements ); - gl_vector1ui_alloc( &mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32 ); - if (!mvb->clipped_elements.start) { - fprintf(stderr, "i830glx: out of memory !\n"); - exit(1); + if (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED)) { + tnl->Driver.Render.Interp = i830_interp_extras; + tnl->Driver.Render.CopyPV = i830_copy_pv_extras; + } else { + tnl->Driver.Render.Interp = setup_tab[ind].interp; + tnl->Driver.Render.CopyPV = setup_tab[ind].copy_pv; } - ALIGN_FREE( VB->ClipMask ); - VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 4); - if (!VB->ClipMask) { - fprintf(stderr, "i830glx: out of memory !\n"); - exit(1); - } + if (setup_tab[ind].vertex_format != imesa->vertex_format) { + int vfmt = setup_tab[ind].vertex_format; + I830_STATECHANGE(imesa, I830_UPLOAD_CTX); + imesa->Setup[I830_CTXREG_VF] = ~(1<<31) & vfmt; - if (VB->Type == VB_IMMEDIATE) { - free( mvb->primitive ); - free( mvb->next_primitive ); - mvb->primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); - mvb->next_primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); - if (!mvb->primitive || !mvb->next_primitive) { - fprintf(stderr, "i830glx: out of memory !\n"); - exit(1); + if (vfmt & (1<<31)) { + /* Proj texturing */ + imesa->Setup[I830_CTXREG_VF2] = (STATE3D_VERTEX_FORMAT_2_CMD | + VRTX_TEX_SET_0_FMT(TEXCOORDFMT_3D) | + VRTX_TEX_SET_1_FMT(TEXCOORDFMT_3D) | + VRTX_TEX_SET_2_FMT(TEXCOORDFMT_3D) | + VRTX_TEX_SET_3_FMT(TEXCOORDFMT_3D)); + i830UpdateTexUnitProj( ctx, 0, GL_TRUE ); + i830UpdateTexUnitProj( ctx, 1, GL_TRUE ); + } else { + /* Normal texturing */ + imesa->Setup[I830_CTXREG_VF2] = (STATE3D_VERTEX_FORMAT_2_CMD | + VRTX_TEX_SET_0_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_1_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_2_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_3_FMT(TEXCOORDFMT_2D)); + i830UpdateTexUnitProj( ctx, 0, GL_FALSE ); + i830UpdateTexUnitProj( ctx, 1, GL_FALSE ); } + imesa->vertex_format = vfmt; + imesa->vertex_size = setup_tab[ind].vertex_size; + imesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; } } -void i830DDRegisterVB( struct vertex_buffer *VB ) + +void i830_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ) { - i830VertexBufferPtr mvb; + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLuint vertex_size = imesa->vertex_size * 4; + GLuint *dest = i830AllocDmaLow( imesa, (count-start) * vertex_size); + setup_tab[imesa->SetupIndex].emit( ctx, start, count, dest, vertex_size ); +} - mvb = (i830VertexBufferPtr)calloc( 1, sizeof(*mvb) ); - mvb->size = VB->Size * 2; - mvb->vert_store = malloc( sizeof(i830Vertex) * mvb->size + 31); - if (!mvb->vert_store) { - fprintf(stderr, "i830glx: out of memory !\n"); - exit(1); - } - - mvb->verts = (i830VertexPtr)(((unsigned long)mvb->vert_store + 31) & ~31); - gl_vector1ui_alloc( &mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32 ); - if (!mvb->clipped_elements.start) { - fprintf(stderr, "i830glx: out of memory !\n"); - exit(1); - } - - ALIGN_FREE( VB->ClipMask ); - VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 4); - if (!VB->ClipMask) { - fprintf(stderr, "i830glx: out of memory !\n"); - exit(1); - } +void i830InitVB( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLuint size = TNL_CONTEXT(ctx)->vb.Size; + + imesa->verts = (char *)ALIGN_MALLOC(size * 4 * 16, 32); - mvb->primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); - mvb->next_primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); - if (!mvb->primitive || !mvb->next_primitive) { - fprintf(stderr, "i830glx: out of memory !\n"); - exit(1); + { + static int firsttime = 1; + if (firsttime) { + init_setup_tab(); + firsttime = 0; + } } - - VB->driver_data = mvb; } -void i830DDUnregisterVB( struct vertex_buffer *VB ) +void i830FreeVB( GLcontext *ctx ) { - i830VertexBufferPtr mvb = I830_DRIVER_DATA(VB); - - if (mvb) { - if (mvb->vert_store) free(mvb->vert_store); - if (mvb->primitive) free(mvb->primitive); - if (mvb->next_primitive) free(mvb->next_primitive); - gl_vector1ui_free( &mvb->clipped_elements ); - free(mvb); - VB->driver_data = 0; - } + i830ContextPtr imesa = I830_CONTEXT(ctx); + if (imesa->verts) { + ALIGN_FREE(imesa->verts); + imesa->verts = 0; + } + + if (imesa->UbyteSecondaryColor.Ptr) { + ALIGN_FREE(imesa->UbyteSecondaryColor.Ptr); + imesa->UbyteSecondaryColor.Ptr = 0; + } + + if (imesa->UbyteColor.Ptr) { + ALIGN_FREE(imesa->UbyteColor.Ptr); + imesa->UbyteColor.Ptr = 0; + } } Index: xc/lib/GL/mesa/src/drv/i830/i830_vb.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_vb.h:1.1 --- /dev/null Thu Feb 27 12:26:26 2003 +++ xc/lib/GL/mesa/src/drv/i830/i830_vb.h Mon Sep 9 15:18:49 2002 @@ -0,0 +1,63 @@ +/* + * GLX Hardware Device Driver for Intel i810 + * 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: + * + * 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. + * + * Adapted for use in the I830M: + * Jeff Hartmann + */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_vb.h,v 1.1 2002/09/09 19:18:49 dawes Exp $ */ + +#ifndef I830VB_INC +#define I830VB_INC + +#include "mtypes.h" +#include "swrast/swrast.h" + +#define _I830_NEW_VERTEX (_NEW_TEXTURE | \ + _DD_NEW_SEPARATE_SPECULAR | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _NEW_FOG) + + +extern void i830ChooseVertexState( GLcontext *ctx ); +extern void i830CheckTexSizes( GLcontext *ctx ); +extern void i830BuildVertices( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint newinputs ); + + +extern void i830_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ); + +extern void i830_translate_vertex( GLcontext *ctx, + const i830Vertex *src, + SWvertex *dst ); + +extern void i830InitVB( GLcontext *ctx ); +extern void i830FreeVB( GLcontext *ctx ); + +extern void i830_print_vertex( GLcontext *ctx, const i830Vertex *v ); +extern void i830PrintSetupFlags(char *msg, GLuint flags ); + +#endif Index: xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h diff -u xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h:1.1 xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h:removed --- xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h Thu Feb 27 12:26:26 2003 @@ -1,10898 +0,0 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - -/* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell - */ - -/* Here is a list of vertex structures that the hardware supports - * for points. - */ - -/* Points with xyzw coords */ - -/* Non-Textured Points */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; -} i830_xyzw_argb_spec_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; -} i830_xyzw_argb_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; -} i830_xyzw_spec_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; -} i830_xyzw_point; - -/* Textured Points */ - -/* Four texunit */ - -/* Four texunit - all proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3 -} i830_xyzw_argb_spec_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tp0_tp1_tp2_tp3_point; - -/* Four texunit - all cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_spec_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_tc0_tc1_tc2_tc3_point; - -/* Four texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_spec_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_tp0_tc1_tc2_tc3_point; - - - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_spec_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_tc0_tp1_tc2_tc3_point; - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_spec_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_tc0_tc1_tp2_tc3_point; - -/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tc0_tc1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_spec_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq0; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_tp0_tp1_tc2_tc3_point; - - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_spec_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_tc0_tp1_tp2_tc3_point; - - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tc0_tc1_tp2_tp3_point; - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tc0_tp1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tp0_tc1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_spec_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_tp0_tc1_tp2_tc3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_spec_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_tp0_tp1_tp2_tc3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tp0_tc1_tp2_tp3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tp0_tp1_tc2_tp3_point; - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tc0_tp1_tp2_tp3_point; - - -/* Three texunit */ - -/* Three texunit - all proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_spec_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_spec_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_tp0_tp1_tp2_point; - -/* Three texunit - all cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_argb_spec_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_argb_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_spec_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_tc0_tc1_tc2_point; - -/* Three texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_argb_spec_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_argb_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_spec_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_tp0_tc1_tc2_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_argb_spec_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_argb_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_spec_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_tp0_tp1_tc2_point; - -/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_spec_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_spec_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_tp0_tc1_tp2_point; - -/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_argb_spec_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_argb_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_spec_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_tc0_tp1_tc2_point; - -/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_spec_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_spec_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_tc0_tc1_tp2_point; - -/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_spec_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_spec_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_tc0_tp1_tp2_point; - - -/* Two texunit */ - -/* Two texunit - all proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_argb_spec_tp0_tp1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_argb_tp0_tp1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_spec_tp0_tp1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_tp0_tp1_point; - -/* Two texunit - all cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyzw_argb_spec_tc0_tc1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyzw_argb_tc0_tc1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyzw_spec_tc0_tc1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyzw_tc0_tc1_point; - -/* Two texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyzw_argb_spec_tp0_tc1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyzw_argb_tp0_tc1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyzw_spec_tp0_tc1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyzw_tp0_tc1_point; - -/* Unit 0 cart : Unit 1 proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_argb_spec_tc0_tp1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_argb_tc0_tp1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_spec_tc0_tp1_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_tc0_tp1_point; - -/* One texunit */ - -/* One texunit - all proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyzw_argb_spec_tp0_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; -} i830_xyzw_argb_tp0_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyzw_spec_tp0_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; -} i830_xyzw_tp0_point; - -/* One texunit - all cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyzw_argb_spec_tc0_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; -} i830_xyzw_argb_tc0_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyzw_spec_tc0_point; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; -} i830_xyzw_tc0_point; - - -/* Points w/ xyz coords */ - -/* Non-Textured Points */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; -} i830_xyz_argb_spec_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; -} i830_xyz_argb_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; -} i830_xyz_spec_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; -} i830_xyz_point; - -/* Textured Points */ - -/* Four texunit */ - -/* Four texunit - all proj */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3 -} i830_xyz_argb_spec_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tp0_tp1_tp2_tp3_point; - -/* Four texunit - all cart */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_spec_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_tc0_tc1_tc2_tc3_point; - -/* Four texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_spec_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_tp0_tc1_tc2_tc3_point; - - - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_spec_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_tc0_tp1_tc2_tc3_point; - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_spec_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_tc0_tc1_tp2_tc3_point; - -/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tc0_tc1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_spec_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq0; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_tp0_tp1_tc2_tc3_point; - - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_spec_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_tc0_tp1_tp2_tc3_point; - - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tc0_tc1_tp2_tp3_point; - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tc0_tp1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tp0_tc1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_spec_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_tp0_tc1_tp2_tc3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_spec_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_tp0_tp1_tp2_tc3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tp0_tc1_tp2_tp3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tp0_tp1_tc2_tp3_point; - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tc0_tp1_tp2_tp3_point; - - -/* Three texunit */ - -/* Three texunit - all proj */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_spec_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_spec_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_tp0_tp1_tp2_point; - -/* Three texunit - all cart */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_argb_spec_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_argb_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_spec_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_tc0_tc1_tc2_point; - -/* Three texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_argb_spec_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_argb_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_spec_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_tp0_tc1_tc2_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_argb_spec_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_argb_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_spec_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_tp0_tp1_tc2_point; - -/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_spec_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_spec_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_tp0_tc1_tp2_point; - -/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_argb_spec_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_argb_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_spec_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_tc0_tp1_tc2_point; - -/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_spec_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_spec_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_tc0_tc1_tp2_point; - -/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_spec_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_spec_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_tc0_tp1_tp2_point; - - -/* Two texunit */ - -/* Two texunit - all proj */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_argb_spec_tp0_tp1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_argb_tp0_tp1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_spec_tp0_tp1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_tp0_tp1_point; - -/* Two texunit - all cart */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyz_argb_spec_tc0_tc1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyz_argb_tc0_tc1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyz_spec_tc0_tc1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyz_tc0_tc1_point; - -/* Two texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyz_argb_spec_tp0_tc1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyz_argb_tp0_tc1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyz_spec_tp0_tc1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyz_tp0_tc1_point; - -/* Unit 0 cart : Unit 1 proj */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_argb_spec_tc0_tp1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_argb_tc0_tp1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_spec_tc0_tp1_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_tc0_tp1_point; - -/* One texunit */ - -/* One texunit - all proj */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyz_argb_spec_tp0_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; -} i830_xyz_argb_tp0_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyz_spec_tp0_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; - float tq0; -} i830_xyz_tp0_point; - -/* One texunit - all cart */ -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyz_argb_spec_tc0_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; -} i830_xyz_argb_tc0_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyz_spec_tc0_point; - -typedef struct { - float x; - float y; - float z; - - float point_width; - - float tu0; - float tv0; -} i830_xyz_tc0_point; - - -/* Points w/ xy coords */ - -/* Non-Textured Points */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; -} i830_xy_argb_spec_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; -} i830_xy_argb_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; -} i830_xy_spec_point; - -typedef struct { - float x; - float y; - - float point_width; -} i830_xy_point; - -/* Textured Points */ - -/* Four texunit */ - -/* Four texunit - all proj */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3 -} i830_xy_argb_spec_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tp0_tp1_tp2_tp3_point; - -/* Four texunit - all cart */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_spec_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_tc0_tc1_tc2_tc3_point; - -/* Four texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_spec_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_tp0_tc1_tc2_tc3_point; - - - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_spec_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_tc0_tp1_tc2_tc3_point; - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_spec_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_tc0_tc1_tp2_tc3_point; - -/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tc0_tc1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_spec_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq0; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_tp0_tp1_tc2_tc3_point; - - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_spec_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_tc0_tp1_tp2_tc3_point; - - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tc0_tc1_tp2_tp3_point; - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tc0_tp1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tp0_tc1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_spec_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_tp0_tc1_tp2_tc3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_spec_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_tp0_tp1_tp2_tc3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tp0_tc1_tp2_tp3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tp0_tp1_tc2_tp3_point; - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tc0_tp1_tp2_tp3_point; - - -/* Three texunit */ - -/* Three texunit - all proj */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_spec_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_spec_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_tp0_tp1_tp2_point; - -/* Three texunit - all cart */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_argb_spec_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_argb_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_spec_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_tc0_tc1_tc2_point; - -/* Three texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_argb_spec_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_argb_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_spec_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_tp0_tc1_tc2_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_argb_spec_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_argb_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_spec_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_tp0_tp1_tc2_point; - -/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_spec_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_spec_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_tp0_tc1_tp2_point; - -/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_argb_spec_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_argb_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_spec_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_tc0_tp1_tc2_point; - -/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_spec_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_spec_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_tc0_tc1_tp2_point; - -/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_spec_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_spec_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_tc0_tp1_tp2_point; - - -/* Two texunit */ - -/* Two texunit - all proj */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xy_argb_spec_tp0_tp1_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xy_argb_tp0_tp1_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xy_spec_tp0_tp1_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xy_tp0_tp1_point; - -/* Two texunit - all cart */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xy_argb_spec_tc0_tc1_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xy_argb_tc0_tc1_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xy_spec_tc0_tc1_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xy_tc0_tc1_point; - -/* Two texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xy_argb_spec_tp0_tc1_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xy_argb_tp0_tc1_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xy_spec_tp0_tc1_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xy_tp0_tc1_point; - -/* Unit 0 cart : Unit 1 proj */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xy_argb_spec_tc0_tp1_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xy_argb_tc0_tp1_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xy_spec_tc0_tp1_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xy_tc0_tp1_point; - -/* One texunit */ - -/* One texunit - all proj */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xy_argb_spec_tp0_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; -} i830_xy_argb_tp0_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xy_spec_tp0_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; - float tq0; -} i830_xy_tp0_point; - -/* One texunit - all cart */ -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xy_argb_spec_tc0_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int argb; - - float tu0; - float tv0; -} i830_xy_argb_tc0_point; - -typedef struct { - float x; - float y; - - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xy_spec_tc0_point; - -typedef struct { - float x; - float y; - - float point_width; - - float tu0; - float tv0; -} i830_xy_tc0_point; - -/* Points w/ xyw coords */ - -/* Non-Textured Points */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; -} i830_xyw_argb_spec_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; -} i830_xyw_argb_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; -} i830_xyw_spec_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; -} i830_xyw_point; - -/* Textured Points */ - -/* Four texunit */ - -/* Four texunit - all proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3 -} i830_xyw_argb_spec_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tp0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tp0_tp1_tp2_tp3_point; - -/* Four texunit - all cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_spec_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_tc0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_tc0_tc1_tc2_tc3_point; - -/* Four texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_spec_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_tp0_tc1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_tp0_tc1_tc2_tc3_point; - - - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_spec_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_tc0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_tc0_tp1_tc2_tc3_point; - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_spec_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_tc0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_tc0_tc1_tp2_tc3_point; - -/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tc0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tc0_tc1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_spec_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq0; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_tp0_tp1_tc2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_tp0_tp1_tc2_tc3_point; - - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_spec_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_tc0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_tc0_tp1_tp2_tc3_point; - - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tc0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tc0_tc1_tp2_tp3_point; - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tc0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tc0_tp1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tp0_tc1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tp0_tc1_tc2_tp3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_spec_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_tp0_tc1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_tp0_tc1_tp2_tc3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_spec_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_tp0_tp1_tp2_tc3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_tp0_tp1_tp2_tc3_point; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tp0_tc1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tp0_tc1_tp2_tp3_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tp0_tp1_tc2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tp0_tp1_tc2_tp3_point; - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tc0_tp1_tp2_tp3_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tc0_tp1_tp2_tp3_point; - - -/* Three texunit */ - -/* Three texunit - all proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_spec_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_spec_tp0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_tp0_tp1_tp2_point; - -/* Three texunit - all cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_argb_spec_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_argb_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_spec_tc0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_tc0_tc1_tc2_point; - -/* Three texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_argb_spec_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_argb_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_spec_tp0_tc1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_tp0_tc1_tc2_point; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_argb_spec_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_argb_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_spec_tp0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_tp0_tp1_tc2_point; - -/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_spec_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_spec_tp0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_tp0_tc1_tp2_point; - -/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_argb_spec_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_argb_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_spec_tc0_tp1_tc2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_tc0_tp1_tc2_point; - -/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_spec_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_spec_tc0_tc1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_tc0_tc1_tp2_point; - -/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_spec_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_spec_tc0_tp1_tp2_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_tc0_tp1_tp2_point; - - -/* Two texunit */ - -/* Two texunit - all proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_argb_spec_tp0_tp1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_argb_tp0_tp1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_spec_tp0_tp1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_tp0_tp1_point; - -/* Two texunit - all cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyw_argb_spec_tc0_tc1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyw_argb_tc0_tc1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyw_spec_tc0_tc1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyw_tc0_tc1_point; - -/* Two texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyw_argb_spec_tp0_tc1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyw_argb_tp0_tc1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyw_spec_tp0_tc1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyw_tp0_tc1_point; - -/* Unit 0 cart : Unit 1 proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_argb_spec_tc0_tp1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_argb_tc0_tp1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_spec_tc0_tp1_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_tc0_tp1_point; - -/* One texunit */ - -/* One texunit - all proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyw_argb_spec_tp0_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; - float tq0; -} i830_xyw_argb_tp0_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyw_spec_tp0_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; - float tq0; -} i830_xyw_tp0_point; - -/* One texunit - all cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyw_argb_spec_tc0_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int argb; - - float tu0; - float tv0; -} i830_xyw_argb_tc0_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyw_spec_tc0_point; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - float point_width; - - float tu0; - float tv0; -} i830_xyw_tc0_point; Index: xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h diff -u xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h:1.1 xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h:removed --- xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h Thu Feb 27 12:26:27 2003 @@ -1,10894 +0,0 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - -/* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell - */ - -/* Here is a list of vertex structures that the hardware supports - * for triangles. - */ - -/* Triangles with xyzw coords */ - -/* Non-Textured Triangles */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; -} i830_xyzw_argb_spec_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; -} i830_xyzw_argb_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; -} i830_xyzw_spec_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - -} i830_xyzw_tri; - -/* Textured Triangles */ - -/* Four texunit */ - -/* Four texunit - all proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3 -} i830_xyzw_argb_spec_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tp0_tp1_tp2_tp3_tri; - -/* Four texunit - all cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_spec_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_tc0_tc1_tc2_tc3_tri; - -/* Four texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_spec_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_tp0_tc1_tc2_tc3_tri; - - - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_spec_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_tc0_tp1_tc2_tc3_tri; - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_spec_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_tc0_tc1_tp2_tc3_tri; - -/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tc0_tc1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_spec_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq0; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_argb_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyzw_tp0_tp1_tc2_tc3_tri; - - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_spec_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_tc0_tp1_tp2_tc3_tri; - - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tc0_tc1_tp2_tp3_tri; - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tc0_tp1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tp0_tc1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_spec_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_tp0_tc1_tp2_tc3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_spec_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_spec_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_argb_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyzw_tp0_tp1_tp2_tc3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tp0_tc1_tp2_tp3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tp0_tp1_tc2_tp3_tri; - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_spec_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_spec_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_argb_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyzw_tc0_tp1_tp2_tp3_tri; - - -/* Three texunit */ - -/* Three texunit - all proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_spec_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_spec_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_tp0_tp1_tp2_tri; - -/* Three texunit - all cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_argb_spec_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_argb_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_spec_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_tc0_tc1_tc2_tri; - -/* Three texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_argb_spec_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_argb_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_spec_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyzw_tp0_tc1_tc2_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_argb_spec_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_argb_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_spec_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_tp0_tp1_tc2_tri; - -/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_spec_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_spec_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_tp0_tc1_tp2_tri; - -/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_argb_spec_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_argb_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_spec_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyzw_tc0_tp1_tc2_tri; - -/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_spec_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_spec_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_tc0_tc1_tp2_tri; - -/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_spec_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_argb_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_spec_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyzw_tc0_tp1_tp2_tri; - - -/* Two texunit */ - -/* Two texunit - all proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_argb_spec_tp0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_argb_tp0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_spec_tp0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_tp0_tp1_tri; - -/* Two texunit - all cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyzw_argb_spec_tc0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyzw_argb_tc0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyzw_spec_tc0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyzw_tc0_tc1_tri; - -/* Two texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyzw_argb_spec_tp0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyzw_argb_tp0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyzw_spec_tp0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyzw_tp0_tc1_tri; - -/* Unit 0 cart : Unit 1 proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_argb_spec_tc0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_argb_tc0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_spec_tc0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyzw_tc0_tp1_tri; - -/* One texunit */ - -/* One texunit - all proj */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyzw_argb_spec_tp0_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; -} i830_xyzw_argb_tp0_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyzw_spec_tp0_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; -} i830_xyzw_tp0_tri; - -/* One texunit - all cart */ -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyzw_argb_spec_tc0_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; -} i830_xyzw_argb_tc0_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyzw_spec_tc0_tri; - -typedef struct { - float x; - float y; - float z; - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; -} i830_xyzw_tc0_tri; - - -/* Triangles w/ xyz coords */ - -/* Non-Textured Triangles */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; -} i830_xyz_argb_spec_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; -} i830_xyz_argb_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; -} i830_xyz_spec_tri; - -typedef struct { - float x; - float y; - float z; - - -} i830_xyz_tri; - -/* Textured Triangles */ - -/* Four texunit */ - -/* Four texunit - all proj */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3 -} i830_xyz_argb_spec_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tp0_tp1_tp2_tp3_tri; - -/* Four texunit - all cart */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_spec_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_tc0_tc1_tc2_tc3_tri; - -/* Four texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_spec_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_tp0_tc1_tc2_tc3_tri; - - - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_spec_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_tc0_tp1_tc2_tc3_tri; - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_spec_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_tc0_tc1_tp2_tc3_tri; - -/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tc0_tc1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_spec_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq0; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_argb_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyz_tp0_tp1_tc2_tc3_tri; - - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_spec_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_tc0_tp1_tp2_tc3_tri; - - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tc0_tc1_tp2_tp3_tri; - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tc0_tp1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tp0_tc1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_spec_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_tp0_tc1_tp2_tc3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_spec_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_spec_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_argb_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyz_tp0_tp1_tp2_tc3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tp0_tc1_tp2_tp3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tp0_tp1_tc2_tp3_tri; - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_spec_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_spec_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_argb_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyz_tc0_tp1_tp2_tp3_tri; - - -/* Three texunit */ - -/* Three texunit - all proj */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_spec_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_spec_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_tp0_tp1_tp2_tri; - -/* Three texunit - all cart */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_argb_spec_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_argb_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_spec_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_tc0_tc1_tc2_tri; - -/* Three texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_argb_spec_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_argb_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_spec_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyz_tp0_tc1_tc2_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_argb_spec_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_argb_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_spec_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_tp0_tp1_tc2_tri; - -/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_spec_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_spec_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_tp0_tc1_tp2_tri; - -/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_argb_spec_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_argb_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_spec_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyz_tc0_tp1_tc2_tri; - -/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_spec_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_spec_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_tc0_tc1_tp2_tri; - -/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_spec_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_argb_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_spec_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyz_tc0_tp1_tp2_tri; - - -/* Two texunit */ - -/* Two texunit - all proj */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_argb_spec_tp0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_argb_tp0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_spec_tp0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_tp0_tp1_tri; - -/* Two texunit - all cart */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyz_argb_spec_tc0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyz_argb_tc0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyz_spec_tc0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyz_tc0_tc1_tri; - -/* Two texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyz_argb_spec_tp0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyz_argb_tp0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyz_spec_tp0_tc1_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyz_tp0_tc1_tri; - -/* Unit 0 cart : Unit 1 proj */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_argb_spec_tc0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_argb_tc0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_spec_tc0_tp1_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyz_tc0_tp1_tri; - -/* One texunit */ - -/* One texunit - all proj */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyz_argb_spec_tp0_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; -} i830_xyz_argb_tp0_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyz_spec_tp0_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; - float tq0; -} i830_xyz_tp0_tri; - -/* One texunit - all cart */ -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyz_argb_spec_tc0_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int argb; - - float tu0; - float tv0; -} i830_xyz_argb_tc0_tri; - -typedef struct { - float x; - float y; - float z; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyz_spec_tc0_tri; - -typedef struct { - float x; - float y; - float z; - - - - float tu0; - float tv0; -} i830_xyz_tc0_tri; - - -/* Triangles w/ xy coords */ - -/* Non-Textured Triangles */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; -} i830_xy_argb_spec_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; -} i830_xy_argb_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; -} i830_xy_spec_tri; - -typedef struct { - float x; - float y; - - -} i830_xy_tri; - -/* Textured Triangles */ - -/* Four texunit */ - -/* Four texunit - all proj */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3 -} i830_xy_argb_spec_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tp0_tp1_tp2_tp3_tri; - -/* Four texunit - all cart */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_spec_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_tc0_tc1_tc2_tc3_tri; - -/* Four texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_spec_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_tp0_tc1_tc2_tc3_tri; - - - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_spec_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_tc0_tp1_tc2_tc3_tri; - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_spec_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_tc0_tc1_tp2_tc3_tri; - -/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tc0_tc1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_spec_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq0; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_argb_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xy_tp0_tp1_tc2_tc3_tri; - - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_spec_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_tc0_tp1_tp2_tc3_tri; - - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tc0_tc1_tp2_tp3_tri; - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tc0_tp1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tp0_tc1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_spec_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_tp0_tc1_tp2_tc3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_spec_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_spec_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_argb_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xy_tp0_tp1_tp2_tc3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tp0_tc1_tp2_tp3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tp0_tp1_tc2_tp3_tri; - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_spec_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_spec_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_argb_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xy_tc0_tp1_tp2_tp3_tri; - - -/* Three texunit */ - -/* Three texunit - all proj */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_spec_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_spec_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_tp0_tp1_tp2_tri; - -/* Three texunit - all cart */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_argb_spec_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_argb_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_spec_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_tc0_tc1_tc2_tri; - -/* Three texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_argb_spec_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_argb_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_spec_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xy_tp0_tc1_tc2_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_argb_spec_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_argb_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_spec_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_tp0_tp1_tc2_tri; - -/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_spec_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_spec_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_tp0_tc1_tp2_tri; - -/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_argb_spec_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_argb_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_spec_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xy_tc0_tp1_tc2_tri; - -/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_spec_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_spec_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xy_tc0_tc1_tp2_tri; - -/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ - -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_spec_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_argb_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_spec_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xy_tc0_tp1_tp2_tri; - - -/* Two texunit */ - -/* Two texunit - all proj */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xy_argb_spec_tp0_tp1_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xy_argb_tp0_tp1_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xy_spec_tp0_tp1_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xy_tp0_tp1_tri; - -/* Two texunit - all cart */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xy_argb_spec_tc0_tc1_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xy_argb_tc0_tc1_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xy_spec_tc0_tc1_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xy_tc0_tc1_tri; - -/* Two texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xy_argb_spec_tp0_tc1_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xy_argb_tp0_tc1_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xy_spec_tp0_tc1_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xy_tp0_tc1_tri; - -/* Unit 0 cart : Unit 1 proj */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xy_argb_spec_tc0_tp1_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xy_argb_tc0_tp1_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xy_spec_tc0_tp1_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xy_tc0_tp1_tri; - -/* One texunit */ - -/* One texunit - all proj */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xy_argb_spec_tp0_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; - float tq0; -} i830_xy_argb_tp0_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xy_spec_tp0_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; - float tq0; -} i830_xy_tp0_tri; - -/* One texunit - all cart */ -typedef struct { - float x; - float y; - - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xy_argb_spec_tc0_tri; - -typedef struct { - float x; - float y; - - - unsigned int argb; - - float tu0; - float tv0; -} i830_xy_argb_tc0_tri; - -typedef struct { - float x; - float y; - - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xy_spec_tc0_tri; - -typedef struct { - float x; - float y; - - - - float tu0; - float tv0; -} i830_xy_tc0_tri; - -/* Triangles w/ xyw coords */ - -/* Non-Textured Triangles */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; -} i830_xyw_argb_spec_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; -} i830_xyw_argb_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; -} i830_xyw_spec_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - -} i830_xyw_tri; - -/* Textured Triangles */ - -/* Four texunit */ - -/* Four texunit - all proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3 -} i830_xyw_argb_spec_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tp0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tp0_tp1_tp2_tp3_tri; - -/* Four texunit - all cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_spec_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_tc0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_tc0_tc1_tc2_tc3_tri; - -/* Four texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_spec_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_tp0_tc1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_tp0_tc1_tc2_tc3_tri; - - - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_spec_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_tc0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_tc0_tp1_tc2_tc3_tri; - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_spec_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_tc0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_tc0_tc1_tp2_tc3_tri; - -/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tc0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tc0_tc1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_spec_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq0; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_argb_tp0_tp1_tc2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; -} i830_xyw_tp0_tp1_tc2_tc3_tri; - - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_spec_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_tc0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_tc0_tp1_tp2_tc3_tri; - - -/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tc0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tc0_tc1_tp2_tp3_tri; - -/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tc0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tc0_tp1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tp0_tc1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tp0_tc1_tc2_tp3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_spec_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_tp0_tc1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_tp0_tc1_tp2_tc3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_spec_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_spec_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_argb_tp0_tp1_tp2_tc3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; -} i830_xyw_tp0_tp1_tp2_tc3_tri; - -/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tp0_tc1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tp0_tc1_tp2_tp3_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tp0_tp1_tc2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tp0_tp1_tc2_tp3_tri; - -/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_spec_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_spec_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_argb_tc0_tp1_tp2_tp3_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; - - float tu3; - float tv3; - float tq3; -} i830_xyw_tc0_tp1_tp2_tp3_tri; - - -/* Three texunit */ - -/* Three texunit - all proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_spec_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_spec_tp0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_tp0_tp1_tp2_tri; - -/* Three texunit - all cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_argb_spec_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_argb_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_spec_tc0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_tc0_tc1_tc2_tri; - -/* Three texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_argb_spec_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_argb_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_spec_tp0_tc1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; -} i830_xyw_tp0_tc1_tc2_tri; - -/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_argb_spec_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_argb_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_spec_tp0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_tp0_tp1_tc2_tri; - -/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_spec_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_spec_tp0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_tp0_tc1_tp2_tri; - -/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_argb_spec_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_argb_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_spec_tc0_tp1_tc2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; -} i830_xyw_tc0_tp1_tc2_tri; - -/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_spec_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_spec_tc0_tc1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_tc0_tc1_tp2_tri; - -/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_spec_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_argb_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_spec_tc0_tp1_tp2_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; - - float tu2; - float tv2; - float tq2; -} i830_xyw_tc0_tp1_tp2_tri; - - -/* Two texunit */ - -/* Two texunit - all proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_argb_spec_tp0_tp1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_argb_tp0_tp1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_spec_tp0_tp1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_tp0_tp1_tri; - -/* Two texunit - all cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyw_argb_spec_tc0_tc1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyw_argb_tc0_tc1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyw_spec_tc0_tc1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - - float tu0; - float tv0; - - float tu1; - float tv1; -} i830_xyw_tc0_tc1_tri; - -/* Two texunit mixed cart/proj */ - -/* Unit 0 proj : Unit 1 cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyw_argb_spec_tp0_tc1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyw_argb_tp0_tc1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyw_spec_tp0_tc1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - float tu0; - float tv0; - float tq0; - - float tu1; - float tv1; -} i830_xyw_tp0_tc1_tri; - -/* Unit 0 cart : Unit 1 proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_argb_spec_tc0_tp1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_argb_tc0_tp1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_spec_tc0_tp1_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - float tu0; - float tv0; - - float tu1; - float tv1; - float tq1; -} i830_xyw_tc0_tp1_tri; - -/* One texunit */ - -/* One texunit - all proj */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyw_argb_spec_tp0_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; - float tq0; -} i830_xyw_argb_tp0_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; - float tq0; -} i830_xyw_spec_tp0_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - float tu0; - float tv0; - float tq0; -} i830_xyw_tp0_tri; - -/* One texunit - all cart */ -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyw_argb_spec_tc0_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int argb; - - float tu0; - float tv0; -} i830_xyw_argb_tc0_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - unsigned int fog_spec_rgb; - - float tu0; - float tv0; -} i830_xyw_spec_tc0_tri; - -typedef struct { - float x; - float y; - - union { - float w; - float rhw; - } w; - - float tu0; - float tv0; -} i830_xyw_tc0_tri; Index: xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c diff -u xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c:1.1 xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c:removed --- xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c:1.1 Thu Oct 4 14:28:21 2001 +++ xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c Thu Feb 27 12:26:27 2003 @@ -1,722 +0,0 @@ -/************************************************************************** - -Copyright 2001 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. - -**************************************************************************/ - -/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ - -/* - * Author: - * Jeff Hartmann - * - * Heavily based on the I810 driver, which was written by: - * Keith Whitwell - */ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include - -#include "context.h" -#include "vbxform.h" -#include "matrix.h" -#include "simple_list.h" - -#include "i830_drv.h" -#include "i830_tris.h" -#include "i830_ioctl.h" - -#include "i830_dri.h" - - - -#ifndef I830_DEBUG -int I830_DEBUG = (0 - | DEBUG_VERBOSE_TRACE -/* | DEBUG_VERBOSE_STATE */ -/* | DEBUG_ALWAYS_SYNC */ -/* | DEBUG_VERBOSE_RING */ -/* | DEBUG_VERBOSE_OUTREG */ -/* | DEBUG_VERBOSE_MSG */ -/* | DEBUG_NO_OUTRING */ -/* | DEBUG_NO_OUTREG */ -/* | DEBUG_VERBOSE_API */ -/* | DEBUG_VERBOSE_2D */ -/* | DEBUG_VERBOSE_DRI */ -/* | DEBUG_VALIDATE_RING */ -/* | DEBUG_VERBOSE_IOCTL */ - ); -#endif - - -static i830ContextPtr i830Ctx = 0; - - -/* These functions are accessed externally to the driver: - * - * XMesaInitDriver - * XMesaResetDriver - * XMesaCreateVisual - * XMesaDestroyVisual - * XMesaCreateContext - * XMesaDestroyContext - * XMesaCreateWindowBuffer - * XMesaCreatePixmapBuffer - * XMesaDestroyBuffer - * XMesaSwapBuffers - * XMesaMakeCurrent - * - */ - - -static int i830_malloc_proxy_buf(drmBufMapPtr buffers) -{ - char *buffer; - drmBufPtr buf; - int i; - - buffer = Xmalloc(I830_DMA_BUF_SZ); - if(buffer == NULL) return -1; - for(i = 0; i < I830_DMA_BUF_NR; i++) { - buf = &(buffers->list[i]); - buf->address = (drmAddress)buffer; - } - return 0; -} - -static drmBufMapPtr i830_create_empty_buffers(void) -{ - drmBufMapPtr retval; - - retval = (drmBufMapPtr)Xmalloc(sizeof(drmBufMap)); - if(retval == NULL) return NULL; - memset(retval, 0, sizeof(drmBufMap)); - retval->list = (drmBufPtr)Xmalloc(sizeof(drmBuf) * I830_DMA_BUF_NR); - if(retval->list == NULL) { - Xfree(retval); - return NULL; - } - memset(retval->list, 0, sizeof(drmBuf) * I830_DMA_BUF_NR); - /* - fprintf(stderr, "retval : %p, retval->list : %p\n", retval, retval->list); - */ - return retval; -} - -GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv) -{ - i830ScreenPrivate *i830Screen; - I830DRIPtr gDRIPriv = (I830DRIPtr)sPriv->pDevPriv; - - /* 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, "i830 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) { - char msg[1000]; - sprintf(msg, "i830 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 < 2) { - char msg[1000]; - sprintf(msg, "i830 DRI driver expected DRM driver version 1.2.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); - __driMesaMessage(msg); - return GL_FALSE; - } - - /* Allocate the private area */ - i830Screen = (i830ScreenPrivate *)Xmalloc(sizeof(i830ScreenPrivate)); - if (!i830Screen) - return GL_FALSE; - - i830Screen->driScrnPriv = sPriv; - sPriv->private = (void *)i830Screen; - - i830Screen->deviceID=gDRIPriv->deviceID; - i830Screen->width=gDRIPriv->width; - i830Screen->height=gDRIPriv->height; - i830Screen->mem=gDRIPriv->mem; - i830Screen->cpp=gDRIPriv->cpp; - i830Screen->fbStride=gDRIPriv->fbStride; - i830Screen->fbOffset=gDRIPriv->fbOffset; - - switch (gDRIPriv->bitsPerPixel) { - case 15: i830Screen->fbFormat = DV_PF_555; break; - case 16: i830Screen->fbFormat = DV_PF_565; break; - case 32: i830Screen->fbFormat = DV_PF_8888; break; - } - - i830Screen->backOffset=gDRIPriv->backOffset; - i830Screen->depthOffset=gDRIPriv->depthOffset; - i830Screen->backPitch = gDRIPriv->auxPitch; - i830Screen->backPitchBits = gDRIPriv->auxPitchBits; - i830Screen->textureOffset=gDRIPriv->textureOffset; - i830Screen->textureSize=gDRIPriv->textureSize; - i830Screen->logTextureGranularity = gDRIPriv->logTextureGranularity; - i830Screen->sarea_priv_offset = gDRIPriv->sarea_priv_offset; - - if (0) - fprintf(stderr, "Tex heap size %x, granularity %x bytes\n", - i830Screen->textureSize, 1<<(i830Screen->logTextureGranularity)); - - i830Screen->bufs = i830_create_empty_buffers(); - if(i830Screen->bufs == NULL) - { - Xfree(i830Screen); - return GL_FALSE; - } - - /* Check if you need to create a fake buffer */ - if(i830_check_copy(sPriv->fd) == 1) - { - i830_malloc_proxy_buf(i830Screen->bufs); - i830Screen->use_copy_buf = 1; - } - else - { - i830Screen->use_copy_buf = 0; - } - - i830Screen->back.handle = gDRIPriv->backbuffer; - i830Screen->back.size = gDRIPriv->backbufferSize; - - if (drmMap(sPriv->fd, - i830Screen->back.handle, - i830Screen->back.size, - (drmAddress *)&i830Screen->back.map) != 0) - { - Xfree(i830Screen); - sPriv->private = NULL; - return GL_FALSE; - } - - i830Screen->depth.handle = gDRIPriv->depthbuffer; - i830Screen->depth.size = gDRIPriv->depthbufferSize; - - if (drmMap(sPriv->fd, - i830Screen->depth.handle, - i830Screen->depth.size, - (drmAddress *)&i830Screen->depth.map) != 0) - { - Xfree(i830Screen); - drmUnmap(i830Screen->back.map, i830Screen->back.size); - sPriv->private = NULL; - return GL_FALSE; - } - - i830Screen->tex.handle = gDRIPriv->textures; - i830Screen->tex.size = gDRIPriv->textureSize; - - if (drmMap(sPriv->fd, - i830Screen->tex.handle, - i830Screen->tex.size, - (drmAddress *)&i830Screen->tex.map) != 0) - { - Xfree(i830Screen); - drmUnmap(i830Screen->back.map, i830Screen->back.size); - drmUnmap(i830Screen->depth.map, i830Screen->depth.size); - sPriv->private = NULL; - return GL_FALSE; - } - - - i830DDFastPathInit(); - i830DDTrifuncInit(); - i830DDSetupInit(); - - return GL_TRUE; -} - -/* Accessed by dlsym from dri_mesa_init.c - */ -void XMesaResetDriver(__DRIscreenPrivate *sPriv) -{ - i830ScreenPrivate *i830Screen = (i830ScreenPrivate *)sPriv->private; - - /* Need to unmap all the bufs and maps here: - */ - drmUnmap(i830Screen->back.map, i830Screen->back.size); - drmUnmap(i830Screen->depth.map, i830Screen->depth.size); - drmUnmap(i830Screen->tex.map, i830Screen->tex.size); - - Xfree(i830Screen); - sPriv->private = NULL; -} - - -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 */ ); -} - - -GLboolean XMesaCreateContext( Display *dpy, GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv ) -{ - GLcontext *ctx = driContextPriv->mesaContext; - i830ContextPtr imesa; - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; - i830ScreenPrivate *i830Screen = (i830ScreenPrivate *)sPriv->private; - I830SAREAPtr saPriv=(I830SAREAPtr)(((char*)sPriv->pSAREA)+ - i830Screen->sarea_priv_offset); - - imesa = (i830ContextPtr)Xcalloc(sizeof(i830Context), 1); - if (!imesa) { - return GL_FALSE; - } - - - /* Set the maximum texture size small enough that we can guarentee - * that both texture units can bind a maximal texture and have them - * in memory at once. - */ - if (i830Screen->textureSize < 2*1024*1024) { - ctx->Const.MaxTextureLevels = 9; - ctx->Const.MaxTextureSize = 1<<8; - } else if (i830Screen->textureSize < 8*1024*1024) { - ctx->Const.MaxTextureLevels = 10; - ctx->Const.MaxTextureSize = 1<<9; - } else { - ctx->Const.MaxTextureLevels = 11; - ctx->Const.MaxTextureSize = 1<<10; - } - - ctx->Const.MinLineWidth = 1.0; - ctx->Const.MinLineWidthAA = 1.0; - ctx->Const.MaxLineWidth = 3.0; - ctx->Const.MaxLineWidthAA = 3.0; - ctx->Const.LineWidthGranularity = 1.0; - - - /* Dri stuff - */ - imesa->display = dpy; - imesa->hHWContext = driContextPriv->hHWContext; - imesa->driFd = sPriv->fd; - imesa->driHwLock = &sPriv->pSAREA->lock; - - imesa->i830Screen = i830Screen; - imesa->driScreen = sPriv; - imesa->sarea = saPriv; - imesa->glBuffer = NULL; - - imesa->texHeap = mmInit( 0, i830Screen->textureSize ); - - - /* Utah stuff - */ - imesa->renderindex = -1; /* impossible value */ - imesa->new_state = ~0; - imesa->dirty = ~0; - - make_empty_list(&imesa->TexObjList); - make_empty_list(&imesa->SwappedOut); - - imesa->TextureMode = ctx->Texture.Unit[0].EnvMode; - imesa->CurrentTexObj[0] = 0; - imesa->CurrentTexObj[1] = 0; - - ctx->DriverCtx = (void *) imesa; - imesa->glCtx = ctx; - - i830DDExtensionsInit( ctx ); - - imesa->hw_stencil = mesaVis->StencilBits && mesaVis->DepthBits == 24; - - switch(mesaVis->DepthBits) { - case 16: - imesa->depth_scale = 1.0/0x10000; - imesa->depth_clear_mask = ~0; - imesa->ClearDepth = 0xffff; - break; - case 24: - imesa->depth_scale = 1.0/0x1000000; - imesa->depth_clear_mask = 0x00ffffff; - imesa->stencil_clear_mask = 0xff000000; - imesa->ClearDepth = 0x00ffffff; - break; - case 32: /* Not supported I don't believe */ - default: -#define DUMMY() /* keep gcc happy */ - DUMMY(); - } - - /* Completely disable stenciling for now, there are some serious issues - * with stencil. - */ -#if 1 - imesa->hw_stencil = 0; -#endif - - i830DDInitStateFuncs( ctx ); - i830DDInitTextureFuncs( ctx ); - i830DDInitSpanFuncs( ctx ); - i830DDInitDriverFuncs( ctx ); - i830DDInitIoctlFuncs( 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) - i830DDRegisterVB( ctx->VB ); - - if (ctx->NrPipelineStages) - ctx->NrPipelineStages = - i830DDRegisterPipelineStages(ctx->PipelineStage, - ctx->PipelineStage, - ctx->NrPipelineStages); - - i830DDInitState( imesa ); - - driContextPriv->driverPrivate = (void *) imesa; - - return GL_TRUE; -} - -void XMesaDestroyContext(__DRIcontextPrivate *driContextPriv) -{ - i830ContextPtr imesa = (i830ContextPtr) driContextPriv->driverPrivate; - - if (imesa) { - i830TextureObjectPtr next_t, t; - - foreach_s (t, next_t, &(imesa->TexObjList)) - i830DestroyTexObj(imesa, t); - - foreach_s (t, next_t, &(imesa->SwappedOut)) - i830DestroyTexObj(imesa, t); - - Xfree(imesa); - } -} - -GLframebuffer *XMesaCreateWindowBuffer( Display *dpy, - __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis) -{ -#if 0 - GLboolean swStencil = mesaVis->StencilBits > 0 && mesaVis->DepthBits != 24; -#else - GLboolean swStencil = mesaVis->StencilBits > 0; -#endif - return gl_create_framebuffer(mesaVis, - GL_FALSE, - swStencil, - mesaVis->AccumRedBits > 0, - mesaVis->AlphaBits > 0 - ); -} - - -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 -} - - -void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) -{ - /* XXX should do swap according to the buffer, not the context! */ - i830ContextPtr imesa = i830Ctx; - - if( !driDrawPriv->mesaBuffer->Visual->DBflag ) return; - - FLUSH_VB( imesa->glCtx, "swap buffers" ); - i830SwapBuffers(imesa); -} - - - -void i830XMesaSetFrontClipRects( i830ContextPtr imesa ) -{ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; - - imesa->numClipRects = dPriv->numClipRects; - imesa->pClipRects = dPriv->pClipRects; - imesa->dirty |= I830_UPLOAD_CLIPRECTS; - imesa->drawX = dPriv->x; - imesa->drawY = dPriv->y; - - i830EmitDrawingRectangle( imesa ); -} - - -void i830XMesaSetBackClipRects( i830ContextPtr imesa ) -{ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; - int i; - - if (dPriv->numBackClipRects == 0) - { - if (I830_DEBUG & DEBUG_VERBOSE_DRI) - fprintf(stderr, "FRONT_CLIPRECTS, %d rects\n", - dPriv->numClipRects); - - imesa->numClipRects = dPriv->numClipRects; - imesa->pClipRects = dPriv->pClipRects; - imesa->drawX = dPriv->x; - imesa->drawY = dPriv->y; - } else { - if (I830_DEBUG & DEBUG_VERBOSE_DRI) - fprintf(stderr, "BACK_RECTS, %d rects\n", - dPriv->numBackClipRects); - - imesa->numClipRects = dPriv->numBackClipRects; - imesa->pClipRects = dPriv->pBackClipRects; - imesa->drawX = dPriv->backX; - imesa->drawY = dPriv->backY; - } - - i830EmitDrawingRectangle( imesa ); - imesa->dirty |= I830_UPLOAD_CLIPRECTS; - - if (I830_DEBUG & DEBUG_VERBOSE_DRI) - for (i = 0 ; i < imesa->numClipRects ; i++) - fprintf(stderr, "cliprect %d: %d,%d - %d,%d\n", - i, - imesa->pClipRects[i].x1, - imesa->pClipRects[i].y1, - imesa->pClipRects[i].x2, - imesa->pClipRects[i].y2); -} - - -static void i830XMesaWindowMoved( i830ContextPtr imesa ) -{ - if (0) - fprintf(stderr, "i830XMesaWindowMoved\n\n"); - - switch (imesa->glCtx->Color.DriverDrawBuffer) { - case GL_FRONT_LEFT: - i830XMesaSetFrontClipRects( imesa ); - break; - case GL_BACK_LEFT: - i830XMesaSetBackClipRects( imesa ); - break; - default: - /*fprintf(stderr, "fallback buffer\n");*/ - break; - } -} - -GLboolean -XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) -{ - return GL_TRUE; -} - -GLboolean -XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) -{ - return GL_TRUE; -} - -GLboolean XMesaUnbindContext(__DRIcontextPrivate *driContextPriv) -{ - i830ContextPtr i830 = (i830ContextPtr) driContextPriv->driverPrivate; - if (i830) - i830->dirty = ~0; - - return GL_TRUE; -} - - -GLboolean XMesaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) -{ - if (driContextPriv) { - i830Ctx = (i830ContextPtr) driContextPriv->driverPrivate; - - gl_make_current2(i830Ctx->glCtx, driDrawPriv->mesaBuffer, - driReadPriv->mesaBuffer); - - - i830Ctx->driDrawable = driDrawPriv; - i830Ctx->dirty = ~0; - - i830XMesaWindowMoved( i830Ctx ); - - if (!i830Ctx->glCtx->Viewport.Width) - gl_Viewport(i830Ctx->glCtx, 0, 0, driDrawPriv->w, driDrawPriv->h); - } - else - { - gl_make_current(0,0); - i830Ctx = NULL; - } - return GL_TRUE; -} - - -void i830GetLock( i830ContextPtr imesa, GLuint flags ) -{ - __DRIdrawablePrivate *dPriv = imesa->driDrawable; - __DRIscreenPrivate *sPriv = imesa->driScreen; - I830SAREAPtr sarea = imesa->sarea; - int me = imesa->hHWContext; - int stamp = dPriv->lastStamp; - - - if (0) fprintf(stderr, ".\n"); - - /* We know there has been contention. - */ - drmGetLock(imesa->driFd, imesa->hHWContext, flags); - - - /* Note contention for throttling hint - */ - imesa->any_contend = 1; - - /* If the window moved, may need to set a new cliprect now. - * - * NOTE: This releases and regains the hw lock, so all state - * checking must be done *after* this call: - */ - XMESA_VALIDATE_DRAWABLE_INFO(imesa->display, sPriv, dPriv); - - - if (0) - fprintf(stderr, "i830GetLock, last enque: %d last dispatch: %d\n", - sarea->last_enqueue, - sarea->last_dispatch); - - /* If we lost context, need to dump all registers to hardware. - * Note that we don't care about 2d contexts, even if they perform - * accelerated commands, so the DRI locking in the X server is even - * more broken than usual. - */ - if (sarea->ctxOwner != me) { - imesa->dirty |= (I830_UPLOAD_CTX | - I830_UPLOAD_CLIPRECTS | - I830_UPLOAD_BUFFERS | - I830_UPLOAD_TEX0 | - I830_UPLOAD_TEX1); - - if(imesa->TexBlendWordsUsed[0]) imesa->dirty |= I830_UPLOAD_TEXBLEND0; - if(imesa->TexBlendWordsUsed[1]) imesa->dirty |= I830_UPLOAD_TEXBLEND1; - - sarea->ctxOwner = me; - } - - /* Shared texture managment - if another client has played with - * texture space, figure out which if any of our textures have been - * ejected, and update our global LRU. - */ - if (sarea->texAge != imesa->texAge) { - int sz = 1 << (imesa->i830Screen->logTextureGranularity); - int idx, nr = 0; - - /* Have to go right round from the back to ensure stuff ends up - * LRU in our local list... - */ - for (idx = sarea->texList[I830_NR_TEX_REGIONS].prev ; - idx != I830_NR_TEX_REGIONS && nr < I830_NR_TEX_REGIONS ; - idx = sarea->texList[idx].prev, nr++) - { - if (sarea->texList[idx].age > imesa->texAge) - i830TexturesGone(imesa, idx * sz, sz, sarea->texList[idx].in_use); - } - - if (nr == I830_NR_TEX_REGIONS) { - i830TexturesGone(imesa, 0, imesa->i830Screen->textureSize, 0); - i830ResetGlobalLRU( imesa ); - } - - if (0) fprintf(stderr, "imesa %d sarea %d\n", imesa->texAge, sarea->texAge); - imesa->dirty |= I830_UPLOAD_TEX0_IMAGE; - imesa->dirty |= I830_UPLOAD_TEX1_IMAGE; - imesa->texAge = sarea->texAge; - } - - - if (dPriv->lastStamp != stamp) - i830XMesaWindowMoved( imesa ); - - - sarea->last_quiescent = -1; /* just kill it for now */ -} - - -#endif Index: xc/lib/GL/mesa/src/drv/mga/Imakefile diff -u xc/lib/GL/mesa/src/drv/mga/Imakefile:1.20 xc/lib/GL/mesa/src/drv/mga/Imakefile:1.24 --- xc/lib/GL/mesa/src/drv/mga/Imakefile:1.20 Thu May 10 12:56:11 2001 +++ xc/lib/GL/mesa/src/drv/mga/Imakefile Mon Nov 25 09:04:51 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile,v 1.20 2001/05/10 16:56:11 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile,v 1.24 2002/11/25 14:04:51 eich Exp $ #include @@ -18,22 +18,31 @@ #include "../common/Imakefile.inc" #include "Imakefile.inc" +#include "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" #include "../../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #include "../../X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../../SPARC/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 + DRIOBJS = $(GLXLIBSRC)/dri/dri_util.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/xf86drmMga.o + $(GLXLIBSRC)/dri/drm/xf86drmSL.o #ifdef GlxSoProf LOSRCS = ../../../../lowpc.c @@ -47,7 +56,7 @@ OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ $(MESA_ASM_OBJS) $(COMMONOBJS) $(MGAOBJS) $(HIOBJS) -REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) #include Index: xc/lib/GL/mesa/src/drv/mga/Imakefile.inc diff -u xc/lib/GL/mesa/src/drv/mga/Imakefile.inc:1.2 xc/lib/GL/mesa/src/drv/mga/Imakefile.inc:1.3 --- xc/lib/GL/mesa/src/drv/mga/Imakefile.inc:1.2 Wed May 2 11:06:03 2001 +++ xc/lib/GL/mesa/src/drv/mga/Imakefile.inc Fri Feb 22 16:33:05 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile.inc,v 1.2 2001/05/02 15:06:03 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/mga/Imakefile.inc,v 1.3 2002/02/22 21:33:05 dawes Exp $ #ifndef MesaDrvSrcDir #define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv @@ -16,16 +16,17 @@ #endif #if BuildXF86DRI - DRI_DEFINES = GlxDefines + 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)/mga \ - -I$(GLXLIBSRC)/dri/drm + -I$(XF86COMSRC) \ + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/include #endif MESA_INCLUDES = -I$(MESASRCDIR)/src \ @@ -35,10 +36,9 @@ MGASRCS = $(MESADRVMGABUILDDIR)mgabuffers.c \ $(MESADRVMGABUILDDIR)mgadd.c \ - $(MESADRVMGABUILDDIR)mgaeltpath.c \ - $(MESADRVMGABUILDDIR)mgafastpath.c \ + $(MESADRVMGABUILDDIR)mgarender.c \ $(MESADRVMGABUILDDIR)mgaioctl.c \ - $(MESADRVMGABUILDDIR)mgapipeline.c \ + $(MESADRVMGABUILDDIR)mgapixel.c \ $(MESADRVMGABUILDDIR)mgaspan.c \ $(MESADRVMGABUILDDIR)mgastate.c \ $(MESADRVMGABUILDDIR)mgatex.c \ @@ -50,10 +50,9 @@ MGAOBJS = $(MESADRVMGABUILDDIR)mgabuffers.o \ $(MESADRVMGABUILDDIR)mgadd.o \ - $(MESADRVMGABUILDDIR)mgaeltpath.o \ - $(MESADRVMGABUILDDIR)mgafastpath.o \ + $(MESADRVMGABUILDDIR)mgarender.o \ $(MESADRVMGABUILDDIR)mgaioctl.o \ - $(MESADRVMGABUILDDIR)mgapipeline.o \ + $(MESADRVMGABUILDDIR)mgapixel.o \ $(MESADRVMGABUILDDIR)mgaspan.o \ $(MESADRVMGABUILDDIR)mgastate.o \ $(MESADRVMGABUILDDIR)mgatex.o \ @@ -65,10 +64,9 @@ MGAUOBJS = $(MESADRVMGABUILDDIR)unshared/mgabuffers.o \ $(MESADRVMGABUILDDIR)unshared/mgadd.o \ - $(MESADRVMGABUILDDIR)unshared/mgaeltpath.o \ - $(MESADRVMGABUILDDIR)unshared/mgafastpath.o \ + $(MESADRVMGABUILDDIR)unshared/mgarender.o \ $(MESADRVMGABUILDDIR)unshared/mgaioctl.o \ - $(MESADRVMGABUILDDIR)unshared/mgapipeline.o \ + $(MESADRVMGABUILDDIR)unshared/mgapixel.o \ $(MESADRVMGABUILDDIR)unshared/mgaspan.o \ $(MESADRVMGABUILDDIR)unshared/mgastate.o \ $(MESADRVMGABUILDDIR)unshared/mgatex.o \ @@ -80,10 +78,9 @@ MGADOBJS = $(MESADRVMGABUILDDIR)debugger/mgabuffers.o \ $(MESADRVMGABUILDDIR)debugger/mgadd.o \ - $(MESADRVMGABUILDDIR)debugger/mgaeltpath.o \ - $(MESADRVMGABUILDDIR)debugger/mgafastpath.o \ + $(MESADRVMGABUILDDIR)debugger/mgarender.o \ $(MESADRVMGABUILDDIR)debugger/mgaioctl.o \ - $(MESADRVMGABUILDDIR)debugger/mgapipeline.o \ + $(MESADRVMGABUILDDIR)debugger/mgapixel.o \ $(MESADRVMGABUILDDIR)debugger/mgaspan.o \ $(MESADRVMGABUILDDIR)debugger/mgastate.o \ $(MESADRVMGABUILDDIR)debugger/mgatex.o \ @@ -95,10 +92,9 @@ MGAPOBJS = $(MESADRVMGABUILDDIR)profiled/mgabuffers.o \ $(MESADRVMGABUILDDIR)profiled/mgadd.o \ - $(MESADRVMGABUILDDIR)profiled/mgaeltpath.o \ - $(MESADRVMGABUILDDIR)profiled/mgafastpath.o \ + $(MESADRVMGABUILDDIR)profiled/mgarender.o \ $(MESADRVMGABUILDDIR)profiled/mgaioctl.o \ - $(MESADRVMGABUILDDIR)profiled/mgapipeline.o \ + $(MESADRVMGABUILDDIR)profiled/mgapixel.o \ $(MESADRVMGABUILDDIR)profiled/mgaspan.o \ $(MESADRVMGABUILDDIR)profiled/mgastate.o \ $(MESADRVMGABUILDDIR)profiled/mgatex.o \ @@ -111,10 +107,9 @@ #ifdef NeedToLinkMesaSrc LinkSourceFile(mgabuffers.c, $(MESADRVSRCDIR)/mga) LinkSourceFile(mgadd.c, $(MESADRVSRCDIR)/mga) -LinkSourceFile(mgaeltpath.c, $(MESADRVSRCDIR)/mga) -LinkSourceFile(mgafastpath.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgarender.c, $(MESADRVSRCDIR)/mga) LinkSourceFile(mgaioctl.c, $(MESADRVSRCDIR)/mga) -LinkSourceFile(mgapipeline.c, $(MESADRVSRCDIR)/mga) +LinkSourceFile(mgapixel.c, $(MESADRVSRCDIR)/mga) LinkSourceFile(mgaspan.c, $(MESADRVSRCDIR)/mga) LinkSourceFile(mgastate.c, $(MESADRVSRCDIR)/mga) LinkSourceFile(mgatex.c, $(MESADRVSRCDIR)/mga) Index: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c diff -u xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c:1.12 xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c:1.18 --- xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c:1.12 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c Mon Dec 16 11:18:52 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c,v 1.12 2001/04/10 16:07:50 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c,v 1.18 2002/12/16 16:18:52 dawes Exp $ */ /* * Copyright 2000-2001 VA Linux Systems, Inc. * All Rights Reserved. @@ -23,7 +23,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ #ifdef GLX_DIRECT_RENDERING @@ -31,21 +31,29 @@ #include #include -#include "drm.h" +#include "xf86drm.h" +#include "mga_common.h" #include "mga_xmesa.h" #include "context.h" -#include "vbxform.h" #include "matrix.h" #include "mmath.h" #include "simple_list.h" #include "mem.h" +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/tnl.h" +#include "array_cache/acache.h" + +#include "tnl/t_pipeline.h" + #include "mgadd.h" #include "mgastate.h" #include "mgatex.h" #include "mgaspan.h" +#include "mgaioctl.h" #include "mgatris.h" -#include "mgapipeline.h" +#include "mgavb.h" #include "mgabuffers.h" #include "mgapixel.h" @@ -67,42 +75,22 @@ ); #endif - -static mgaContextPtr mgaCtx = 0; - - -/* These functions are accessed externally to the driver: - * - * XMesaInitDriver - * XMesaResetDriver - * XMesaCreateVisual - * XMesaDestroyVisual - * XMesaCreateContext - * XMesaDestroyContext - * XMesaCreateWindowBuffer - * XMesaCreatePixmapBuffer - * XMesaDestroyBuffer - * XMesaSwapBuffers - * XMesaMakeCurrent - * - */ -GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv) +static GLboolean +mgaInitDriver(__DRIscreenPrivate *sPriv) { mgaScreenPrivate *mgaScreen; MGADRIPtr serverInfo = (MGADRIPtr)sPriv->pDevPriv; if (MGA_DEBUG&DEBUG_VERBOSE_DRI) - fprintf(stderr, "XMesaInitDriver\n"); + fprintf(stderr, "mgaInitDriver\n"); /* 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, "MGA DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); - __driMesaMessage(msg); + __driUtilMessage("MGA DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); return GL_FALSE; } } @@ -111,18 +99,14 @@ /* Check that the DDX driver version is compatible */ if (sPriv->ddxMajor != 1 || 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); + __driUtilMessage("MGA DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); return GL_FALSE; } /* Check that the DRM driver version is compatible */ if (sPriv->drmMajor != 3 || sPriv->drmMinor < 0) { - char msg[1000]; - 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); + __driUtilMessage("MGA DRI driver expected DRM driver version 3.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); return GL_FALSE; } @@ -130,18 +114,36 @@ /* Allocate the private area */ mgaScreen = (mgaScreenPrivate *)MALLOC(sizeof(mgaScreenPrivate)); if (!mgaScreen) { - __driMesaMessage("Couldn't malloc screen struct"); + __driUtilMessage("Couldn't malloc screen struct"); return GL_FALSE; } mgaScreen->sPriv = sPriv; sPriv->private = (void *)mgaScreen; + if (sPriv->drmMinor >= 1) { + int ret; + drmMGAGetParam gp; + + gp.param = MGA_PARAM_IRQ_NR; + gp.value = &mgaScreen->irq; + + ret = drmCommandWriteRead( sPriv->fd, DRM_MGA_GETPARAM, + &gp, sizeof(gp)); + if (ret) { + fprintf(stderr, "drmMgaGetParam (MGA_PARAM_IRQ_NR): %d\n", ret); + XFree(mgaScreen); + sPriv->private = NULL; + return GL_FALSE; + } + } + + if (serverInfo->chipset != MGA_CARD_TYPE_G200 && serverInfo->chipset != MGA_CARD_TYPE_G400) { XFree(mgaScreen); sPriv->private = NULL; - __driMesaMessage("Unrecognized chipset"); + __driUtilMessage("Unrecognized chipset"); return GL_FALSE; } @@ -168,24 +170,10 @@ &mgaScreen->mmio.map ) < 0 ) { FREE( mgaScreen ); sPriv->private = NULL; - __driMesaMessage( "Couldn't map MMIO registers" ); + __driUtilMessage( "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; @@ -202,7 +190,7 @@ { Xfree(mgaScreen); sPriv->private = NULL; - __driMesaMessage("Couldn't map agp region"); + __driUtilMessage("Couldn't map agp region"); return GL_FALSE; } #endif @@ -221,6 +209,17 @@ mgaScreen->texVirtual[MGA_CARD_HEAP] = (char *)(mgaScreen->sPriv->pFB + serverInfo->textureOffset); + if (drmMap(sPriv->fd, + serverInfo->agpTextureOffset, + serverInfo->agpTextureSize, + (drmAddress *)&mgaScreen->texVirtual[MGA_AGP_HEAP]) != 0) + { + Xfree(mgaScreen); + sPriv->private = NULL; + __driUtilMessage("Couldn't map agptexture region"); + return GL_FALSE; + } + #if 0 mgaScreen->texVirtual[MGA_AGP_HEAP] = (mgaScreen->agp.map + serverInfo->agpTextureOffset); @@ -237,28 +236,22 @@ /*drmUnmap(mgaScreen->agp_tex.map, mgaScreen->agp_tex.size);*/ XFree(mgaScreen); sPriv->private = NULL; - __driMesaMessage("Couldn't map dma buffers"); + __driUtilMessage("Couldn't map dma buffers"); return GL_FALSE; } mgaScreen->sarea_priv_offset = serverInfo->sarea_priv_offset; - mgaDDFastPathInit(); - mgaDDEltPathInit(); - mgaDDTrifuncInit(); - mgaDDSetupInit(); - return GL_TRUE; } -/* Accessed by dlsym from dri_mesa_init.c - */ -void XMesaResetDriver(__DRIscreenPrivate *sPriv) +static void +mgaDestroyScreen(__DRIscreenPrivate *sPriv) { mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *) sPriv->private; if (MGA_DEBUG&DEBUG_VERBOSE_DRI) - fprintf(stderr, "XMesaResetDriver\n"); + fprintf(stderr, "mgaDestroyScreen\n"); /*drmUnmap(mgaScreen->agp_tex.map, mgaScreen->agp_tex.size);*/ Xfree(mgaScreen); @@ -266,56 +259,60 @@ } -GLvisual *XMesaCreateVisual(Display *dpy, - __DRIscreenPrivate *driScrnPriv, - const XVisualInfo *visinfo, - const __GLXvisualConfig *config) -{ - if (MGA_DEBUG&DEBUG_VERBOSE_DRI) - fprintf(stderr, "XMesaCreateVisual\n"); +extern const struct gl_pipeline_stage _mga_render_stage; - /* 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 */ ); -} +static const struct gl_pipeline_stage *mga_pipeline[] = { + &_tnl_vertex_transform_stage, + &_tnl_normal_transform_stage, + &_tnl_lighting_stage, + &_tnl_fog_coordinate_stage, + &_tnl_texgen_stage, + &_tnl_texture_transform_stage, + /* REMOVE: point attenuation stage */ +#if 0 + &_mga_render_stage, /* ADD: unclipped rastersetup-to-dma */ + /* Need new ioctl for wacceptseq */ +#endif + &_tnl_render_stage, + 0, +}; -GLboolean XMesaCreateContext( Display *dpy, GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv ) +static GLboolean +mgaCreateContext( Display *dpy, const __GLcontextModes *mesaVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ) { int i; - GLcontext *ctx; + GLcontext *ctx, *shareCtx; mgaContextPtr mmesa; __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *)sPriv->private; - MGASAREAPrivPtr saPriv = (MGASAREAPrivPtr)(((char*)sPriv->pSAREA)+ + MGASAREAPrivPtr saPriv=(MGASAREAPrivPtr)(((char*)sPriv->pSAREA)+ mgaScreen->sarea_priv_offset); if (MGA_DEBUG&DEBUG_VERBOSE_DRI) - fprintf(stderr, "XMesaCreateContext\n"); + fprintf(stderr, "mgaCreateContext\n"); - mmesa = (mgaContextPtr)CALLOC(sizeof(mgaContext)); + /* allocate mga context */ + mmesa = (mgaContextPtr) CALLOC(sizeof(mgaContext)); if (!mmesa) { return GL_FALSE; } - ctx = driContextPriv->mesaContext; + /* Allocate the Mesa context */ + if (sharedContextPrivate) + shareCtx = ((mgaContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + mmesa->glCtx = _mesa_create_context(mesaVis, shareCtx, mmesa, GL_TRUE); + if (!mmesa->glCtx) { + FREE(mmesa); + return GL_FALSE; + } + driContextPriv->driverPrivate = mmesa; + /* Init mga state */ mmesa->display = dpy; mmesa->hHWContext = driContextPriv->hHWContext; mmesa->driFd = sPriv->fd; @@ -323,7 +320,7 @@ mmesa->mgaScreen = mgaScreen; mmesa->driScreen = sPriv; - mmesa->sarea = saPriv; + mmesa->sarea = (void *)saPriv; mmesa->glBuffer = NULL; make_empty_list(&mmesa->SwappedOut); @@ -339,7 +336,8 @@ * that both texture units can bind a maximal texture and have them * on the card at once. */ - { + ctx = mmesa->glCtx; + { int nr = 2; if (mgaScreen->chipset == MGA_CARD_TYPE_G200) @@ -347,21 +345,26 @@ if (mgaScreen->textureSize[0] < nr*1024*1024) { ctx->Const.MaxTextureLevels = 9; - ctx->Const.MaxTextureSize = 1<<8; } else if (mgaScreen->textureSize[0] < nr*4*1024*1024) { ctx->Const.MaxTextureLevels = 10; - ctx->Const.MaxTextureSize = 1<<9; } else { ctx->Const.MaxTextureLevels = 11; - ctx->Const.MaxTextureSize = 1<<10; } + + ctx->Const.MaxTextureUnits = nr; } + + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 10.0; + ctx->Const.MaxLineWidthAA = 10.0; + ctx->Const.LineWidthGranularity = 1.0; - mmesa->hw_stencil = mesaVis->StencilBits && mesaVis->DepthBits == 24; + mmesa->hw_stencil = mesaVis->stencilBits && mesaVis->depthBits == 24; - switch (mesaVis->DepthBits) { - case 16: - mmesa->depth_scale = 1.0/(GLdouble)0xffff; + switch (mesaVis->depthBits) { + case 16: + mmesa->depth_scale = 1.0/(GLdouble)0xffff; mmesa->depth_clear_mask = ~0; mmesa->ClearDepth = 0xffff; break; @@ -381,20 +384,37 @@ break; }; - mmesa->canDoStipple = GL_FALSE; - mmesa->renderindex = -1; /* impossible value */ + mmesa->haveHwStipple = GL_FALSE; + mmesa->RenderIndex = -1; /* impossible value */ mmesa->new_state = ~0; mmesa->dirty = ~0; - mmesa->warp_pipe = 0; + mmesa->vertex_format = 0; mmesa->CurrentTexObj[0] = 0; mmesa->CurrentTexObj[1] = 0; + mmesa->tmu_source[0] = 0; + mmesa->tmu_source[1] = 1; mmesa->texAge[0] = 0; mmesa->texAge[1] = 0; + + /* Initialize the software rasterizer and helper modules. + */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + + _swsetup_CreateContext( ctx ); -#if 0 - mmesa->status = (GLuint *)mmesa->mgaScreen->status.map; -#endif + /* Install the customized pipeline: + */ + _tnl_destroy_pipeline( ctx ); + _tnl_install_pipeline( ctx, mga_pipeline ); + + /* Configure swrast to match hardware characteristics: + */ + _swrast_allow_pixel_fog( ctx, GL_FALSE ); + _swrast_allow_vertex_fog( ctx, GL_TRUE ); + mmesa->primary_offset = mmesa->mgaScreen->primary.handle; ctx->DriverCtx = (void *) mmesa; @@ -407,26 +427,10 @@ mgaDDInitSpanFuncs( ctx ); mgaDDInitDriverFuncs( ctx ); mgaDDInitIoctlFuncs( ctx ); -/* mgaDDInitPixelFuncs( ctx );*/ - - ctx->Driver.TriangleCaps = (DD_TRI_CULL| - DD_TRI_LIGHT_TWOSIDE| - DD_TRI_STIPPLE| - DD_TRI_OFFSET); + mgaDDInitPixelFuncs( ctx ); + mgaDDInitTriFuncs( ctx ); - /* Ask mesa to clip fog coordinates for us. - */ - ctx->TriangleCaps |= DD_CLIP_FOG_COORD; - - if (ctx->VB) - mgaDDRegisterVB( ctx->VB ); - - if (ctx->NrPipelineStages) - ctx->NrPipelineStages = - mgaDDRegisterPipelineStages(ctx->PipelineStage, - ctx->PipelineStage, - ctx->NrPipelineStages); - + mgaInitVB( ctx ); mgaInitState( mmesa ); driContextPriv->driverPrivate = (void *) mmesa; @@ -434,70 +438,67 @@ return GL_TRUE; } -void XMesaDestroyContext(__DRIcontextPrivate *driContextPriv) +static void +mgaDestroyContext(__DRIcontextPrivate *driContextPriv) { mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate; if (MGA_DEBUG&DEBUG_VERBOSE_DRI) - fprintf(stderr, "XMesaDestroyContext\n"); + fprintf(stderr, "mgaDestroyContext\n"); + assert(mmesa); /* should never be null */ if (mmesa) { - Xfree(mmesa); - driContextPriv->driverPrivate = NULL; + _swsetup_DestroyContext( mmesa->glCtx ); + _tnl_DestroyContext( mmesa->glCtx ); + _ac_DestroyContext( mmesa->glCtx ); + _swrast_DestroyContext( mmesa->glCtx ); + + mgaFreeVB( mmesa->glCtx ); + + /* free the Mesa context */ + mmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context(mmesa->glCtx); + /* free the mga context */ + FREE(mmesa); } } -GLframebuffer *XMesaCreateWindowBuffer( Display *dpy, - __DRIscreenPrivate *driScrnPriv, - __DRIdrawablePrivate *driDrawPriv, - GLvisual *mesaVis) +static GLboolean +mgaCreateBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap ) { - 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? */ - swStencil, - mesaVis->AccumRedBits > 0, - GL_FALSE /* software alpha buffer/ */ - ); -} + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } + else { + GLboolean swStencil = (mesaVis->stencilBits > 0 && + mesaVis->depthBits != 24); + driDrawPriv->driverPrivate = (void *) + _mesa_create_framebuffer(mesaVis, + GL_FALSE, /* software depth buffer? */ + swStencil, + mesaVis->accumRedBits > 0, + mesaVis->alphaBits > 0 ); -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 + return (driDrawPriv->driverPrivate != NULL); + } } -void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) +static void +mgaDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) { - /* XXX should do swap according to the buffer, not the context! */ - mgaContextPtr mmesa = mgaCtx; - FLUSH_VB( mmesa->glCtx, "swap buffers" ); - mgaSwapBuffers(mmesa); + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); } -GLboolean XMesaUnbindContext(__DRIcontextPrivate *driContextPriv) +static GLboolean +mgaUnbindContext(__DRIcontextPrivate *driContextPriv) { mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate; if (mmesa) @@ -506,14 +507,14 @@ return GL_TRUE; } -GLboolean -XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) +static GLboolean +mgaOpenFullScreen(__DRIcontextPrivate *driContextPriv) { return GL_TRUE; } -GLboolean -XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) +static GLboolean +mgaCloseFullScreen(__DRIcontextPrivate *driContextPriv) { return GL_TRUE; } @@ -525,28 +526,31 @@ * * But why are we doing context initialization here??? */ -GLboolean XMesaMakeCurrent(__DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv) +static GLboolean +mgaMakeCurrent(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv) { if (driContextPriv) { - mgaCtx = (mgaContextPtr) driContextPriv->driverPrivate; - - gl_make_current2(mgaCtx->glCtx, driDrawPriv->mesaBuffer, driReadPriv->mesaBuffer); + mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate; - if (mgaCtx->driDrawable != driDrawPriv) { - mgaCtx->driDrawable = driDrawPriv; - mgaCtx->dirty = ~0; - mgaCtx->dirty_cliprects = (MGA_FRONT|MGA_BACK); + if (mmesa->driDrawable != driDrawPriv) { + mmesa->driDrawable = driDrawPriv; + mmesa->dirty = ~0; + mmesa->dirty_cliprects = (MGA_FRONT|MGA_BACK); } - if (!mgaCtx->glCtx->Viewport.Width) - gl_Viewport(mgaCtx->glCtx, 0, 0, driDrawPriv->w, driDrawPriv->h); + _mesa_make_current2(mmesa->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate); + + if (!mmesa->glCtx->Viewport.Width) + _mesa_set_viewport(mmesa->glCtx, 0, 0, + driDrawPriv->w, driDrawPriv->h); } else { - gl_make_current(0,0); - mgaCtx = NULL; + _mesa_make_current(NULL, NULL); } return GL_TRUE; @@ -564,7 +568,7 @@ if (*(dPriv->pStamp) != mmesa->lastStamp) { mmesa->lastStamp = *(dPriv->pStamp); - mmesa->setupdone = 0; + mmesa->SetupNewInputs |= VERT_CLIP; mmesa->dirty_cliprects = (MGA_FRONT|MGA_BACK); mgaUpdateRects( mmesa, (MGA_FRONT|MGA_BACK) ); } @@ -586,6 +590,36 @@ sarea->last_quiescent = -1; /* just kill it for now */ } + + +static const struct __DriverAPIRec mgaAPI = { + mgaInitDriver, + mgaDestroyScreen, + mgaCreateContext, + mgaDestroyContext, + mgaCreateBuffer, + mgaDestroyBuffer, + mgaSwapBuffers, + mgaMakeCurrent, + mgaUnbindContext, + mgaOpenFullScreen, + mgaCloseFullScreen +}; + + + +/* + * This is the bootstrap function for the driver. + * The __driCreateScreen name is the symbol that libGL.so fetches. + * Return: pointer to a __DRIscreenPrivate. + */ +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) +{ + __DRIscreenPrivate *psp; + psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &mgaAPI); + return (void *) psp; +} Index: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h diff -u xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h:1.9 xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h:1.12 --- xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h:1.9 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h Mon Dec 16 11:18:52 2002 @@ -22,9 +22,9 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h,v 1.9 2001/04/10 16:07:50 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mga_xmesa.h,v 1.12 2002/12/16 16:18:52 dawes Exp $ */ #ifndef _MGA_INIT_H_ #define _MGA_INIT_H_ @@ -32,11 +32,10 @@ #ifdef GLX_DIRECT_RENDERING #include -#include "dri_tmm.h" -#include "dri_mesaint.h" -#include "dri_mesa.h" -#include "types.h" +#include "dri_util.h" +#include "mtypes.h" #include "mgaregs.h" +#include "mga_common.h" typedef struct mga_screen_private_s { @@ -47,6 +46,7 @@ int cpp; /* for front and back buffers */ GLint agpMode; + unsigned int irq; /* IRQ number (0 means none) */ unsigned int mAccess; @@ -61,10 +61,10 @@ unsigned int dmaOffset; - unsigned int textureOffset[MGA_NR_TEX_HEAPS]; - unsigned int textureSize[MGA_NR_TEX_HEAPS]; - int logTextureGranularity[MGA_NR_TEX_HEAPS]; - char *texVirtual[MGA_NR_TEX_HEAPS]; + unsigned int textureOffset[DRM_MGA_NR_TEX_HEAPS]; + unsigned int textureSize[DRM_MGA_NR_TEX_HEAPS]; + int logTextureGranularity[DRM_MGA_NR_TEX_HEAPS]; + char *texVirtual[DRM_MGA_NR_TEX_HEAPS]; __DRIscreenPrivate *sPriv; Index: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c diff -u xc/lib/GL/mesa/src/drv/mga/mgabuffers.c:1.8 xc/lib/GL/mesa/src/drv/mga/mgabuffers.c:1.13 --- xc/lib/GL/mesa/src/drv/mga/mgabuffers.c:1.8 Wed Oct 31 17:50:24 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgabuffers.c Tue Nov 5 12:46:08 2002 @@ -22,15 +22,16 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c,v 1.8 2001/10/31 22:50:24 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c,v 1.13 2002/11/05 17:46:08 tsi Exp $ */ #include #include "mgacontext.h" #include "mgabuffers.h" #include "mgastate.h" #include "mgaioctl.h" +#include "mgatris.h" static void mgaXMesaSetFrontClipRects( mgaContextPtr mmesa ) { @@ -131,8 +132,9 @@ mmesa->dirty_cliprects = (MGA_FRONT|MGA_BACK) & ~(sarea->exported_buffers); } - +#endif +#if 0 static void printSareaRects( mgaContextPtr mmesa ) { __DRIscreenPrivate *driScreen = mmesa->driScreen; @@ -202,6 +204,7 @@ #endif + void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers ) { __DRIdrawablePrivate *driDrawable = mmesa->driDrawable; @@ -209,35 +212,35 @@ /* fprintf(stderr, "%s\n", __FUNCTION__); */ - XMESA_VALIDATE_DRAWABLE_INFO(mmesa->display, - mmesa->driScreen, - driDrawable); - mmesa->dirty_cliprects = 0; + DRI_VALIDATE_DRAWABLE_INFO(mmesa->display, mmesa->driScreen, driDrawable); + mmesa->dirty_cliprects = 0; if (mmesa->draw_buffer == MGA_FRONT) mgaXMesaSetFrontClipRects( mmesa ); else mgaXMesaSetBackClipRects( mmesa ); -/* printMmesaRects(mmesa); */ +#if 0 + printMmesaRects(mmesa); +#endif sarea->req_drawable = driDrawable->draw; sarea->req_draw_buffer = mmesa->draw_buffer; mgaUpdateClipping( mmesa->glCtx ); + mgaCalcViewport( mmesa->glCtx ); mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; } -GLboolean mgaDDSetDrawBuffer(GLcontext *ctx, GLenum mode ) +void mgaDDSetDrawBuffer(GLcontext *ctx, GLenum mode ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); FLUSH_BATCH( MGA_CONTEXT(ctx) ); - mmesa->Fallback &= ~MGA_FALLBACK_BUFFER; if (mode == GL_FRONT_LEFT) { @@ -247,7 +250,7 @@ mmesa->dirty |= MGA_UPLOAD_CONTEXT; mmesa->draw_buffer = MGA_FRONT; mgaXMesaSetFrontClipRects( mmesa ); - return GL_TRUE; + FALLBACK( ctx, MGA_FALLBACK_DRAW_BUFFER, GL_FALSE ); } else if (mode == GL_BACK_LEFT) { @@ -257,28 +260,11 @@ mmesa->draw_buffer = MGA_BACK; mmesa->dirty |= MGA_UPLOAD_CONTEXT; mgaXMesaSetBackClipRects( mmesa ); - return GL_TRUE; + FALLBACK( ctx, MGA_FALLBACK_DRAW_BUFFER, GL_FALSE ); } else { - mmesa->Fallback |= MGA_FALLBACK_BUFFER; - return GL_FALSE; + FALLBACK( ctx, MGA_FALLBACK_DRAW_BUFFER, GL_TRUE ); } } -void mgaDDSetReadBuffer(GLcontext *ctx, GLframebuffer *buffer, - GLenum mode ) -{ - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - - if (mode == GL_FRONT_LEFT) - { - mmesa->readOffset = mmesa->mgaScreen->frontOffset; - mmesa->read_buffer = MGA_FRONT; - } - 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.4 xc/lib/GL/mesa/src/drv/mga/mgabuffers.h:1.7 --- xc/lib/GL/mesa/src/drv/mga/mgabuffers.h:1.4 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgabuffers.h Wed Oct 30 07:51:35 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.h,v 1.4 2001/04/10 16:07:50 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.h,v 1.7 2002/10/30 12:51:35 alanh Exp $ */ /* * Copyright 2000-2001 VA Linux Systems, Inc. * All Rights Reserved. @@ -23,16 +23,13 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ #ifndef MGA_BUFFERS_H #define MGA_BUFFERS_H -void mgaDDSetReadBuffer(GLcontext *ctx, GLframebuffer *buffer, - GLenum mode ); - -GLboolean mgaDDSetDrawBuffer(GLcontext *ctx, GLenum mode ); +void mgaDDSetDrawBuffer(GLcontext *ctx, GLenum mode ); void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers ); Index: xc/lib/GL/mesa/src/drv/mga/mgacontext.h diff -u xc/lib/GL/mesa/src/drv/mga/mgacontext.h:1.4 xc/lib/GL/mesa/src/drv/mga/mgacontext.h:1.7 --- xc/lib/GL/mesa/src/drv/mga/mgacontext.h:1.4 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgacontext.h Mon Dec 16 11:18:52 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgacontext.h,v 1.4 2001/04/10 16:07:50 dawes Exp $*/ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgacontext.h,v 1.7 2002/12/16 16:18:52 dawes Exp $*/ /* * Copyright 2000-2001 VA Linux Systems, Inc. * All Rights Reserved. @@ -23,28 +23,21 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ #ifndef MGALIB_INC #define MGALIB_INC #include -#include "dri_tmm.h" -#include "dri_mesaint.h" -#include "dri_mesa.h" - +#include "dri_util.h" +#include "mtypes.h" #include "xf86drm.h" -#include "xf86drmMga.h" - -#include "types.h" - #include "mm.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)) #define MGA_GET_FIELD(field, val) ((val & ~(field ## _MASK)) >> (field ## _SHIFT)) @@ -59,34 +52,39 @@ * - 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 +#define MGA_FALLBACK_TEXTURE 0x1 +#define MGA_FALLBACK_DRAW_BUFFER 0x2 +#define MGA_FALLBACK_READ_BUFFER 0x4 +#define MGA_FALLBACK_LOGICOP 0x8 +#define MGA_FALLBACK_RENDERMODE 0x10 +#define MGA_FALLBACK_STENCIL 0x20 +#define MGA_FALLBACK_DEPTH 0x40 /* For mgaCtx->new_state. */ #define MGA_NEW_DEPTH 0x1 #define MGA_NEW_ALPHA 0x2 -#define MGA_NEW_FOG 0x4 #define MGA_NEW_CLIP 0x8 -#define MGA_NEW_MASK 0x10 #define MGA_NEW_TEXTURE 0x20 #define MGA_NEW_CULL 0x40 #define MGA_NEW_WARP 0x80 #define MGA_NEW_STENCIL 0x100 #define MGA_NEW_CONTEXT 0x200 - -typedef void (*mga_interp_func)( GLfloat t, - GLfloat *result, - const GLfloat *in, - const GLfloat *out ); - +/* Use the templated vertex formats: + */ +#define TAG(x) mga##x +#include "tnl_dd/t_dd_vertex.h" +#undef TAG +typedef struct mga_context_t mgaContext; +typedef struct mga_context_t *mgaContextPtr; +typedef void (*mga_tri_func)( mgaContextPtr, mgaVertex *, mgaVertex *, + mgaVertex * ); +typedef void (*mga_line_func)( mgaContextPtr, mgaVertex *, mgaVertex * ); +typedef void (*mga_point_func)( mgaContextPtr, mgaVertex * ); @@ -95,7 +93,6 @@ #define MGA_BLEND_ENV_COLOR 0x1 #define MGA_BLEND_MULTITEX 0x2 -struct mga_elt_tab; struct mga_texture_object_s; struct mga_screen_private_s; @@ -123,7 +120,7 @@ struct mga_context_t { GLcontext *glCtx; - GLuint lastStamp; /* fullscreen breaks dpriv->laststamp, + unsigned int lastStamp; /* fullscreen breaks dpriv->laststamp, * need to shadow it here. */ /* Bookkeeping for texturing @@ -140,51 +137,55 @@ /* Map GL texture units onto hardware. */ - GLuint multitex; GLuint tmu_source[2]; - GLuint tex_dest[2]; - + GLboolean default32BitTextures; /* Manage fallbacks */ - GLuint IndirectTriangles; - int Fallback; + GLuint Fallback; - /* Support for CVA and the fastpath + /* Temporaries for translating away float colors: */ - unsigned int setupdone; - unsigned int setupindex; - unsigned int renderindex; - unsigned int using_fast_path; - mga_interp_func interp; - + struct gl_client_array UbyteColor; + struct gl_client_array UbyteSecondaryColor; /* Support for limited GL_BLEND fallback */ unsigned int blend_flags; unsigned int envcolor; - - /* Shortcircuit some state changes + /* Rasterization state */ - points_func PointsFunc; - line_func LineFunc; - triangle_func TriangleFunc; - quad_func QuadFunc; + GLuint SetupNewInputs; + GLuint SetupIndex; + GLuint RenderIndex; + + GLuint hw_primitive; + GLenum raster_primitive; + GLenum render_primitive; + + char *verts; + GLint vertex_stride_shift; + GLuint vertex_format; + GLuint vertex_size; + + /* Fallback rasterization functions + */ + mga_point_func draw_point; + mga_line_func draw_line; + mga_tri_func draw_tri; /* Manage driver and hardware state */ - GLuint new_state; + GLuint new_gl_state; + GLuint new_state; GLuint dirty; mga_context_regs_t setup; - GLuint warp_pipe; - GLuint vertsize; - GLuint MonoColor; GLuint ClearColor; GLuint ClearDepth; GLuint poly_stipple; @@ -193,13 +194,17 @@ GLuint depth_clear_mask; GLuint stencil_clear_mask; GLuint hw_stencil; - GLboolean canDoStipple; + GLuint haveHwStipple; + GLfloat hw_viewport[16]; /* Dma buffers */ drmBufPtr vertex_dma_buffer; drmBufPtr iload_buffer; + /* VBI + */ + GLuint vbl_seq; /* Drawable, cliprect and scissor information */ @@ -237,20 +242,9 @@ __DRIscreenPrivate *driScreen; struct mga_screen_private_s *mgaScreen; MGASAREAPrivPtr sarea; - - - /* New setupdma path - */ - drmBufPtr elt_buf, retained_buf; - GLuint *first_elt, *next_elt; - GLfloat *next_vert; - GLuint next_vert_phys; - GLuint first_vert_phys; - struct mga_elt_tab *elt_tab; - GLfloat device_matrix[16]; }; - +#define MGA_CONTEXT(ctx) ((mgaContextPtr)(ctx->DriverCtx)) #define MGAPACKCOLOR555(r,g,b,a) \ ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \ @@ -307,23 +301,10 @@ #define SUBPIXEL_Y (-0.5F + 0.125) -typedef struct mga_context_t mgaContext; -typedef struct mga_context_t *mgaContextPtr; - -struct mga_elt_tab { - void (*emit_unclipped_verts)( struct vertex_buffer *VB ); - - void (*build_tri_verts)( mgaContextPtr mmesa, - 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)( mgaContextPtr mmesa, - const GLfloat *verts, - GLuint *elts, - int nr ); -}; +#define MGA_WA_TRIANGLES 0x18000000 +#define MGA_WA_TRISTRIP_T0 0x02010200 +#define MGA_WA_TRIFAN_T0 0x01000408 +#define MGA_WA_TRISTRIP_T0T1 0x02010400 +#define MGA_WA_TRIFAN_T0T1 0x01000810 #endif Index: xc/lib/GL/mesa/src/drv/mga/mgadd.c diff -u xc/lib/GL/mesa/src/drv/mga/mgadd.c:1.11 xc/lib/GL/mesa/src/drv/mga/mgadd.c:1.14 --- xc/lib/GL/mesa/src/drv/mga/mgadd.c:1.11 Fri Aug 17 22:51:05 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgadd.c Wed Oct 30 07:51:35 2002 @@ -22,13 +22,12 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.c,v 1.11 2001/08/18 02:51:05 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.c,v 1.14 2002/10/30 12:51:35 alanh Exp $ */ -#include "types.h" -#include "vbrender.h" +#include "mtypes.h" #include @@ -42,17 +41,13 @@ #include "mgatex.h" #include "mgatris.h" #include "mgavb.h" -#include "mgapipeline.h" +#include "mga_xmesa.h" #include "extensions.h" -#include "vb.h" -#include "dd.h" - -#if defined(USE_X86_ASM) || defined(USE_3DNOW_ASM) || defined(USE_KATMAI_ASM) +#if defined(USE_X86_ASM) #include "X86/common_x86_asm.h" #endif - -#define MGA_DATE "20010622" +#define MGA_DATE "20020221" /*************************************** @@ -91,7 +86,7 @@ /* Append any CPU-specific information. */ #ifdef USE_X86_ASM - if ( gl_x86_cpu_features ) { + if ( _mesa_x86_cpu_features ) { strncat( buffer, " x86", 4 ); } #endif @@ -105,7 +100,7 @@ strncat( buffer, "/3DNow!", 7 ); } #endif -#ifdef USE_KATMAI_ASM +#ifdef USE_SSE_ASM if ( cpu_has_xmm ) { strncat( buffer, "/SSE", 4 ); } @@ -118,20 +113,10 @@ } -static GLint mgaGetParameteri(const GLcontext *ctx, GLint param) -{ - switch (param) { - case DD_HAVE_HARDWARE_FOG: - return 1; - default: - fprintf(stderr, "mgaGetParameteri(): unknown parameter!\n"); - return 0; - } -} - -static void mgaBufferSize(GLcontext *ctx, GLuint *width, GLuint *height) +static void mgaBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height) { + GET_CURRENT_CONTEXT(ctx); mgaContextPtr mmesa = MGA_CONTEXT(ctx); /* Need to lock to make sure the driDrawable is uptodate. This @@ -147,53 +132,33 @@ void mgaDDExtensionsInit( GLcontext *ctx ) { /* paletted_textures currently doesn't work, but we could fix them later */ - gl_extensions_disable( ctx, "GL_EXT_shared_texture_palette" ); - gl_extensions_disable( ctx, "GL_EXT_paletted_texture" ); + /* + _mesa_enable_extension( ctx, "GL_EXT_shared_texture_palette" ); + _mesa_enable_extension( ctx, "GL_EXT_paletted_texture" ); + */ - /* Support multitexture only on the g400. - */ - if (!MGA_IS_G400(MGA_CONTEXT(ctx))) - { - gl_extensions_disable( ctx, "GL_ARB_multitexture" ); - } + _mesa_enable_extension( ctx, "GL_ARB_texture_compression" ); + _mesa_enable_extension( ctx, "GL_ARB_multisample" ); - /* Turn on texenv_add for the G400. + _mesa_enable_extension( ctx, "GL_SGIS_generate_mipmap" ); + + /* Turn on multitexture and texenv_add for the G400. */ - if (MGA_IS_G400(MGA_CONTEXT(ctx))) - { - gl_extensions_enable( ctx, "GL_EXT_texture_env_add" ); + if (MGA_IS_G400(MGA_CONTEXT(ctx))) { + _mesa_enable_extension( ctx, "GL_ARB_multitexture" ); + _mesa_enable_extension( ctx, "GL_ARB_texture_env_add" ); + + _mesa_enable_extension( ctx, "GL_EXT_texture_env_add" ); #if defined (MESA_packed_depth_stencil) - gl_extensions_enable( ctx, "GL_MESA_packed_depth_stencil" ); + _mesa_enable_extension( 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" ); + if (!getenv("MGA_DISABLE_AGP_ALLOCATOR")) + _mesa_enable_extension( 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 - * a few rogue fallbacks. - */ - gl_extensions_disable( ctx, "ARB_imaging" ); - gl_extensions_disable( ctx, "GL_EXT_blend_color" ); - 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" ); } @@ -201,9 +166,6 @@ void mgaDDInitDriverFuncs( GLcontext *ctx ) { ctx->Driver.GetBufferSize = mgaBufferSize; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; ctx->Driver.GetString = mgaDDGetString; - ctx->Driver.GetParameteri = mgaGetParameteri; - ctx->Driver.RegisterVB = mgaDDRegisterVB; - ctx->Driver.UnregisterVB = mgaDDUnregisterVB; - ctx->Driver.BuildPrecalcPipeline = mgaDDBuildPrecalcPipeline; } Index: xc/lib/GL/mesa/src/drv/mga/mgadd.h diff -u xc/lib/GL/mesa/src/drv/mga/mgadd.h:1.2 xc/lib/GL/mesa/src/drv/mga/mgadd.h:1.3 --- xc/lib/GL/mesa/src/drv/mga/mgadd.h:1.2 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgadd.h Wed Oct 30 07:51:35 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.h,v 1.2 2001/04/10 16:07:50 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.h,v 1.3 2002/10/30 12:51:35 alanh Exp $ */ /* * Copyright 2000-2001 VA Linux Systems, Inc. * All Rights Reserved. @@ -23,7 +23,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ #ifndef MGADD_INC Index: xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c diff -u xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c:1.7 xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c:removed --- xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c:1.7 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgaeltpath.c Thu Feb 27 12:26:27 2003 @@ -1,460 +0,0 @@ -/* - * 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/mgaeltpath.c,v 1.7 2001/04/10 16:07:50 dawes Exp $ */ - -#include - -#include "types.h" -#include "enums.h" -#include "cva.h" -#include "vertices.h" -#include "mmath.h" -#include "xform.h" - -#include "mgacontext.h" -#include "mgapipeline.h" -#include "mgatris.h" -#include "mgastate.h" -#include "mgavb.h" - - -/* 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 - - -static void fire_elts( mgaContextPtr mmesa ) -{ - LOCK_HARDWARE( mmesa ); - - /* Fire queued elements and discard that buffer if its contents - * won't be referenced by future elements. - */ - if (mmesa->elt_buf) { - GLuint retain = (mmesa->elt_buf == mmesa->retained_buf); - - if (mmesa->first_elt != mmesa->next_elt) { - mgaFireEltsLocked( mmesa, - ((char *)mmesa->first_elt - - (char *)mmesa->elt_buf->address), - ((char *)mmesa->next_elt - - (char *)mmesa->elt_buf->address), - !retain ); - } else if (!retain) - mgaReleaseBufLocked( mmesa, mmesa->elt_buf ); - - mmesa->elt_buf = 0; - } - 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 - - BUFFER_STRIDE * sizeof(GLfloat)); - - mmesa->next_vert_phys = (mmesa->mgaScreen->dmaOffset + - mmesa->elt_buf->idx * MGA_BUFFER_SIZE + - mmesa->elt_buf->total - - BUFFER_STRIDE * sizeof(GLfloat)); - - mmesa->first_elt = (GLuint *)mmesa->elt_buf->address; - mmesa->next_elt = (GLuint *)mmesa->elt_buf->address; - -} - - -static void release_bufs( mgaContextPtr mmesa ) -{ - 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 - - (char *)mmesa->elt_buf->address), - ((char *)mmesa->next_elt - - (char *)mmesa->elt_buf->address), - 0 ); - - mmesa->first_elt = mmesa->next_elt; - } - - mgaReleaseBufLocked( mmesa, mmesa->retained_buf ); - UNLOCK_HARDWARE( mmesa ); - } - - mmesa->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) { \ - 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 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; \ -} - - -static void mga_tri_clip( mgaContextPtr mmesa, - struct vertex_buffer *VB, - GLuint *elt, - GLubyte mask ) -{ - struct mga_elt_tab *tab = mmesa->elt_tab; - mga_interp_func interp = tab->interp; - 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( mmesa, 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]; - GLuint space = (char *)mmesa->next_vert - (char *)mmesa->next_elt; - - if (space < n * (BUFFER_STRIDE + 3) * sizeof(GLuint)) - fire_elts(mmesa); - - /* Project the new vertices and emit to dma buffers. Translate - * 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. - */ - for (i = 2 ; i < n ; i++) { - mmesa->next_elt[0] = out[0]; - mmesa->next_elt[1] = out[i-1]; - mmesa->next_elt[2] = out[i]; - mmesa->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 (3 * sizeof(GLuint)) - -#define UNCLIPPED_VERT(x) (mmesa->first_vert_phys - x * BUFFER_STRIDE * 4) - -#define TRIANGLE( e2, e1, e0 ) \ -do { \ - if (((char *)mmesa->next_vert - \ - (char *)mmesa->next_elt) < TRI_THRESHOLD) \ - fire_elts(mmesa); \ - mmesa->next_elt[0] = UNCLIPPED_VERT(e2); \ - mmesa->next_elt[1] = UNCLIPPED_VERT(e1); \ - mmesa->next_elt[2] = UNCLIPPED_VERT(e0); \ - mmesa->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; \ - mga_tri_clip( mmesa, VB, out, ormask ); \ - } \ -} while (0) - -#define LOCAL_VARS \ - mgaContextPtr mmesa = MGA_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) mmesa; - - - -#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) mga_##x##_elt -#include "render_tmp.h" - - - -#define LOCAL_VARS \ - mgaContextPtr mmesa = MGA_CONTEXT( VB->ctx ); \ - GLuint *elt = VB->EltPtr->data; \ - (void) elt; (void) mmesa; - -#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) mga_##x##_elt_unclipped -#include "render_tmp.h" - - - - -static void refresh_projection_matrix( GLcontext *ctx ) -{ - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - GLfloat *m = mmesa->device_matrix; - GLmatrix *mat = &ctx->Viewport.WindowMap; - - REFRESH_DRAWABLE_INFO(mmesa); - - m[MAT_SX] = mat->m[MAT_SX]; - m[MAT_TX] = mat->m[MAT_TX] + mmesa->drawX + .5; - m[MAT_SY] = (- mat->m[MAT_SY]); - m[MAT_TY] = (- mat->m[MAT_TY]) + mmesa->driDrawable->h + mmesa->drawY - .5; - m[MAT_SZ] = mat->m[MAT_SZ] * mmesa->depth_scale; - m[MAT_TZ] = mat->m[MAT_TZ] * mmesa->depth_scale; -} - -#define CLIP_UBYTE_B 0 -#define CLIP_UBYTE_G 1 -#define CLIP_UBYTE_R 2 -#define CLIP_UBYTE_A 3 - - -#define TYPE (0) -#define TAG(x) x -#include "mgaelttmp.h" - -#define TYPE (MGA_RGBA_BIT) -#define TAG(x) x##_RGBA -#include "mgaelttmp.h" - -#define TYPE (MGA_TEX0_BIT) -#define TAG(x) x##_TEX0 -#include "mgaelttmp.h" - -#define TYPE (MGA_RGBA_BIT|MGA_TEX0_BIT) -#define TAG(x) x##_RGBA_TEX0 -#include "mgaelttmp.h" - -#define TYPE (MGA_RGBA_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) -#define TAG(x) x##_RGBA_TEX0_TEX1 -#include "mgaelttmp.h" - -#define TYPE (MGA_TEX0_BIT|MGA_TEX1_BIT) -#define TAG(x) x##_TEX0_TEX1 -#include "mgaelttmp.h" - - -/* Very sparsely popluated array - fix the indices. - */ -static struct mga_elt_tab mgaEltTab[0x80]; - -void mgaDDEltPathInit( void ) -{ - mga_render_init_elt(); - mga_render_init_elt_unclipped(); - - mga_init_eltpath( &mgaEltTab[0] ); - mga_init_eltpath_RGBA( &mgaEltTab[MGA_RGBA_BIT] ); - mga_init_eltpath_TEX0( &mgaEltTab[MGA_TEX0_BIT] ); - mga_init_eltpath_RGBA_TEX0( &mgaEltTab[MGA_RGBA_BIT|MGA_TEX0_BIT] ); - mga_init_eltpath_TEX0_TEX1( &mgaEltTab[MGA_TEX0_BIT|MGA_TEX1_BIT] ); - mga_init_eltpath_RGBA_TEX0_TEX1( &mgaEltTab[MGA_RGBA_BIT|MGA_TEX0_BIT| - MGA_TEX1_BIT] ); -} - -#define VALID_SETUP (MGA_RGBA_BIT|MGA_TEX0_BIT|MGA_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 mgaDDEltPath( struct vertex_buffer *VB ) -{ - GLcontext *ctx = VB->ctx; - GLenum prim = ctx->CVA.elt_mode; - 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->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 (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. - */ - 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 ); - - /* 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 ); - } else - mga_render_tab_elt_unclipped[prim]( VB, 0, VB->EltPtr->count, 0 ); - - /* Send to hardware and release any retained buffers. - */ - release_bufs( mmesa ); - - /* 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.4 xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h:removed --- xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h:1.4 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgaelttmp.h Thu Feb 27 12:26:27 2003 @@ -1,269 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaelttmp.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 - */ - -/* 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 ) -{ - GLuint i; - mgaContextPtr mmesa = MGA_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; - - GLfloat *f = mmesa->next_vert; - GLuint count = VB->Count; - GLubyte *clipmask = VB->ClipMask; - - const GLfloat *m = mmesa->device_matrix; - const GLfloat sx = m[0], sy = m[5], sz = m[10]; - const GLfloat tx = m[12], ty = m[13], tz = m[14]; - - mmesa->retained_buf = mmesa->elt_buf; - mmesa->first_vert_phys = mmesa->next_vert_phys; - - 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 & MGA_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 *b = (GLubyte *)&f[4]; - b[CLIP_UBYTE_B] = color[2]; - b[CLIP_UBYTE_G] = color[1]; - b[CLIP_UBYTE_R] = color[0]; - b[CLIP_UBYTE_A] = color[3]; -#endif - } - - if (TYPE & MGA_TEX0_BIT) { - *(int*)&f[6] = *(int*)&tex0_data[0]; - *(int*)&f[7] = *(int*)&tex0_data[1]; - } - - if (TYPE & MGA_TEX1_BIT) { - *(int*)&f[8] = *(int*)&tex1_data[0]; - *(int*)&f[9] = *(int*)&tex1_data[1]; - } - } - - STRIDE_F(dev, 16); - if (TYPE & MGA_RGBA_BIT) color += color_stride; - if (TYPE & MGA_TEX0_BIT) STRIDE_F(tex0_data, tex0_stride); - if (TYPE & MGA_TEX1_BIT) STRIDE_F(tex1_data, tex1_stride); - } - - mmesa->next_vert = f; - mmesa->next_vert_phys -= count * BUFFER_STRIDE * sizeof(GLuint); -} - - -/* 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)( mgaContextPtr mmesa, - struct vertex_buffer *VB, - GLfloat *O, - GLuint *elt ) -{ - int 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 & MGA_RGBA_BIT) { - GLubyte *color = VEC_ELT(VB->ColorPtr, GLubyte, elt[i]); -#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" (O) - : "%eax" ); -#else - GLubyte *b = (GLubyte *)&O[4]; - b[CLIP_UBYTE_B] = color[2]; - b[CLIP_UBYTE_G] = color[1]; - b[CLIP_UBYTE_R] = color[0]; - b[CLIP_UBYTE_A] = color[3]; -#endif - } - - *(GLuint *)&O[5] = UNCLIPPED_VERT(elt[i]); - - if (TYPE & MGA_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 & MGA_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]; - } - } -} - - -/* 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 & MGA_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 & MGA_TEX0_BIT) { - O[6] = LINTERP(t, I[6], J[6]); - O[7] = LINTERP(t, I[7], J[7]); - } - - if (TYPE & MGA_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)( mgaContextPtr mmesa, - const GLfloat *verts, - GLuint *elt, - int nr) -{ - - GLfloat *O = mmesa->next_vert; - GLuint phys = mmesa->next_vert_phys; - - const GLfloat *m = mmesa->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] = 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; - - 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]; - } - - if (TYPE & MGA_TEX1_BIT) { - *(int*)&O[8] = *(int*)&I[8]; - *(int*)&O[9] = *(int*)&I[9]; - } - - O -= BUFFER_STRIDE; - } - } - - mmesa->next_vert = O; - mmesa->next_vert_phys = phys; -} - - - -static void TAG(mga_init_eltpath)( struct mga_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/mga/mgafastpath.c diff -u xc/lib/GL/mesa/src/drv/mga/mgafastpath.c:1.9 xc/lib/GL/mesa/src/drv/mga/mgafastpath.c:removed --- xc/lib/GL/mesa/src/drv/mga/mgafastpath.c:1.9 Mon Aug 27 17:12:19 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgafastpath.c Thu Feb 27 12:26:27 2003 @@ -1,537 +0,0 @@ -/* - * 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/mgafastpath.c,v 1.9 2001/08/27 21:12:19 dawes Exp $ */ - -#include - -#include "types.h" -#include "enums.h" -#include "cva.h" -#include "vertices.h" -#include "mmath.h" - -#include "mgacontext.h" -#include "mgapipeline.h" -#include "mgatris.h" -#include "mgastate.h" -#include "mgavb.h" -#include "vbcull.h" - - -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 ); -}; - - - - -#define POINT(x) mga_draw_point(mmesa, &ivert[x], psize) -#define LINE(x,y) mga_draw_line(mmesa, &ivert[x], &ivert[y], lwidth) -#define TRI(x,y,z) mga_draw_triangle(mmesa, &ivert[x], &ivert[y], &ivert[z]) - - - - -/* Direct, and no clipping required. I haven't written the clip funcs - * yet, so this is only useful for the fast path. - */ -#define RENDER_POINTS( start, count ) \ -do { \ - GLuint e; \ - for(e=start;everts; \ - const GLuint *elt = VB->EltPtr->data; \ - GLcontext *ctx = VB->ctx; \ - mgaContextPtr mmesa = MGA_CONTEXT(ctx); \ - const GLfloat lwidth = ctx->Line.Width; \ - const GLfloat psize = ctx->Point.Size; \ - (void) lwidth; (void)psize; (void) ivert; - - -#define TAG(x) x##_mga_smooth_indirect -#include "render_tmp.h" - - - -static void mga_render_elements_direct( struct vertex_buffer *VB ) -{ - GLcontext *ctx = VB->ctx; - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - GLenum prim = ctx->CVA.elt_mode; - GLuint nr = VB->EltPtr->count; - render_func func = render_tab_mga_smooth_indirect[prim]; - GLuint p = 0; - - if (mmesa->new_state) - mgaDDUpdateHwState( ctx ); - - do { - func( VB, 0, nr, 0 ); - } while (ctx->Driver.MultipassFunc && - ctx->Driver.MultipassFunc( VB, ++p )); -} - - - -#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 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[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; \ -} - -#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); \ - \ - 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; \ -} - - -static __inline void mga_tri_clip( GLuint **p_elts, - mgaVertex *verts, - GLubyte *clipmask, - GLuint *p_next_vert, - GLubyte mask, - mga_interp_func interp ) -{ - 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 mga_line_clip( GLuint **p_elts, - mgaVertex *verts, - GLubyte *clipmask, - GLuint *p_next_vert, - GLubyte mask, - mga_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 ) \ - 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])) { \ - mga_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])) { \ - mga_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 \ - mgaContextPtr mmesa = MGA_CONTEXT( VB->ctx ); \ - GLuint *elt = VB->EltPtr->data; \ - mgaVertex *verts = MGA_DRIVER_DATA(VB)->verts; \ - GLuint next_vert = MGA_DRIVER_DATA(VB)->last_vert; \ - GLuint *out = MGA_DRIVER_DATA(VB)->clipped_elements.data; \ - GLubyte *mask = VB->ClipMask; \ - mga_interp_func interp = mmesa->interp; \ - (void) interp; (void) verts; - -#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; - - -#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, 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) mga_clip_##x##_elt -#include "render_tmp.h" - - - -static void mga_project_vertices( struct vertex_buffer *VB ) -{ - mgaVertexBufferPtr mgaVB = MGA_DRIVER_DATA(VB); - GLcontext *ctx = VB->ctx; - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - GLmatrix *mat = &ctx->Viewport.WindowMap; - GLfloat m[16]; - - REFRESH_DRAWABLE_INFO(mmesa); - - m[MAT_SX] = mat->m[MAT_SX]; - m[MAT_TX] = mat->m[MAT_TX] + mmesa->drawX + SUBPIXEL_X; - m[MAT_SY] = (- mat->m[MAT_SY]); - m[MAT_TY] = (- mat->m[MAT_TY]) + mmesa->driDrawable->h + mmesa->drawY + SUBPIXEL_Y; - m[MAT_SZ] = mat->m[MAT_SZ] * mmesa->depth_scale; - m[MAT_TZ] = mat->m[MAT_TZ] * mmesa->depth_scale; - - gl_project_v16( mgaVB->verts[VB->CopyStart].f, - mgaVB->verts[mgaVB->last_vert].f, - m, - 16 * 4 ); -} - -static void mga_project_clipped_vertices( struct vertex_buffer *VB ) -{ - mgaVertexBufferPtr mgaVB = MGA_DRIVER_DATA(VB); - GLcontext *ctx = VB->ctx; - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - GLmatrix *mat = &ctx->Viewport.WindowMap; - GLfloat m[16]; - - REFRESH_DRAWABLE_INFO(mmesa); - - m[MAT_SX] = mat->m[MAT_SX]; - m[MAT_TX] = mat->m[MAT_TX] + mmesa->drawX + SUBPIXEL_X; - m[MAT_SY] = (- mat->m[MAT_SY]); - m[MAT_TY] = (- mat->m[MAT_TY]) + mmesa->driDrawable->h + mmesa->drawY - SUBPIXEL_Y; - m[MAT_SZ] = mat->m[MAT_SZ] * mmesa->depth_scale; - m[MAT_TZ] = mat->m[MAT_TZ] * mmesa->depth_scale; - - gl_project_clipped_v16( mgaVB->verts[VB->CopyStart].f, - mgaVB->verts[mgaVB->last_vert].f, - m, - 16 * 4, - VB->ClipMask + VB->CopyStart ); -} - - -/* 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 "mgafasttmp.h" - -#define TYPE (MGA_RGBA_BIT) -#define TAG(x) x##_RGBA -#include "mgafasttmp.h" - -#define TYPE (MGA_TEX0_BIT) -#define TAG(x) x##_TEX0 -#include "mgafasttmp.h" - -#define TYPE (MGA_RGBA_BIT|MGA_TEX0_BIT) -#define TAG(x) x##_RGBA_TEX0 -#include "mgafasttmp.h" - -#define TYPE (MGA_RGBA_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) -#define TAG(x) x##_RGBA_TEX0_TEX1 -#include "mgafasttmp.h" - -#define TYPE (MGA_TEX0_BIT|MGA_TEX1_BIT) -#define TAG(x) x##_TEX0_TEX1 -#include "mgafasttmp.h" - - -/* Very sparsely popluated array - fix the indices. - */ -static struct mga_fast_tab mgaFastTab[0x80]; - -void mgaDDFastPathInit( void ) -{ - mga_clip_render_init_elt(); - render_init_mga_smooth_indirect(); - - mga_init_fastpath( &mgaFastTab[0] ); - mga_init_fastpath_RGBA( &mgaFastTab[MGA_RGBA_BIT] ); - mga_init_fastpath_TEX0( &mgaFastTab[MGA_TEX0_BIT] ); - mga_init_fastpath_RGBA_TEX0( &mgaFastTab[MGA_RGBA_BIT|MGA_TEX0_BIT] ); - mga_init_fastpath_TEX0_TEX1( &mgaFastTab[MGA_TEX0_BIT|MGA_TEX1_BIT] ); - mga_init_fastpath_RGBA_TEX0_TEX1( &mgaFastTab[MGA_RGBA_BIT|MGA_TEX0_BIT| - MGA_TEX1_BIT] ); -} - -#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 ); - struct mga_fast_tab *tab = &mgaFastTab[mmesa->setupindex & VALID_SETUP]; - GLuint do_cliptest = 1; - - - gl_prepare_arrays_cva( VB ); /* still need this */ - - 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) - { - mgaDDEltPath( VB ); - return; - } - - /* Reserve enough space for the pathological case. - */ - if (VB->EltPtr->count * 12 > MGA_DRIVER_DATA(VB)->size) { - mgaDDResizeVB( VB, VB->EltPtr->count * 12 ); - do_cliptest = 1; - } - - tab->build_vertices( VB, do_cliptest ); /* object->clip space */ - - if (mmesa->new_state) - mgaDDUpdateHwState( ctx ); - - 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]; - VB->EltPtr = &(MGA_DRIVER_DATA(VB)->clipped_elements); - - mga_project_clipped_vertices( VB ); /* clip->device space */ - mga_render_elements_direct( VB ); /* render using new list */ - } - } else { - mga_project_vertices( VB ); /* clip->device space */ - mga_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/mga/mgafasttmp.h diff -u xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h:1.3 xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h:removed --- xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h:1.3 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgafasttmp.h Thu Feb 27 12:26:28 2003 @@ -1,182 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgafasttmp.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 - */ - - -/* 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(mga_setup_full)( struct vertex_buffer *VB, GLuint do_cliptest ) -{ - GLcontext *ctx = VB->ctx; - const GLfloat * const m = ctx->ModelProjectMatrix.m; - GLuint start = VB->CopyStart; - GLuint count = VB->Count; - - gl_xform_points3_v16_general(MGA_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(MGA_DRIVER_DATA(VB)->verts[start].f, - MGA_DRIVER_DATA(VB)->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 = MGA_DRIVER_DATA(VB)->verts[start].f; - GLfloat *end = f+(16*(count-start)); - while (f != end) { - if (TYPE & MGA_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 & MGA_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 & MGA_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 & MGA_RGBA_BIT)color += color_stride; - if(TYPE & MGA_TEX0_BIT)STRIDE_F(tex0_data, tex0_stride); - if(TYPE & MGA_TEX1_BIT)STRIDE_F(tex1_data, tex1_stride); - f += 16; - } - } - - MGA_DRIVER_DATA(VB)->clipped_elements.count = start; - MGA_DRIVER_DATA(VB)->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(mga_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 & MGA_RGBA_BIT) { - INTERP_RGBA(t, - ((GLubyte *)&(O[4])), - ((GLubyte *)&(I[4])), - ((GLubyte *)&(J[4]))); - } - - if (TYPE & MGA_TEX0_BIT) { - O[6] = LINTERP(t, I[6], J[6]); - O[7] = LINTERP(t, I[7], J[7]); - } - - if (TYPE & MGA_TEX1_BIT) { - O[8] = LINTERP(t, I[8], J[8]); - O[9] = LINTERP(t, I[9], J[9]); - } -} - - -static void TAG(mga_init_fastpath)( struct mga_fast_tab *tab ) -{ - tab->interp = TAG(mga_interp_vert); - tab->build_vertices = TAG(mga_setup_full); -} - -#undef TYPE -#undef TAG -#undef SIZE Index: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c diff -u xc/lib/GL/mesa/src/drv/mga/mgaioctl.c:1.12 xc/lib/GL/mesa/src/drv/mga/mgaioctl.c:1.16 --- xc/lib/GL/mesa/src/drv/mga/mgaioctl.c:1.12 Wed Oct 31 17:50:24 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgaioctl.c Mon Dec 16 11:18:52 2002 @@ -22,16 +22,17 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell * Gareth Hughes */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c,v 1.12 2001/10/31 22:50:24 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c,v 1.16 2002/12/16 16:18:52 dawes Exp $ */ #include -#include "types.h" -#include "pb.h" +#include "mtypes.h" +#include "macros.h" #include "dd.h" +#include "swrast/swrast.h" #include "mm.h" #include "mgacontext.h" @@ -39,25 +40,36 @@ #include "mgastate.h" #include "mgatex.h" #include "mgavb.h" +#include "mgaioctl.h" #include "mgatris.h" #include "mgabuffers.h" -#include "drm.h" -#include +#include "xf86drm.h" +#include "mga_common.h" static void mga_iload_dma_ioctl(mgaContextPtr mmesa, unsigned long dest, int length) { drmBufPtr buf = mmesa->iload_buffer; - int ret; + drmMGAIload iload; + int ret, i; if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "DRM_IOCTL_MGA_ILOAD idx %d dst %x length %d\n", buf->idx, (int) dest, length); + + iload.idx = buf->idx; + iload.dstorg = dest; + iload.length = length; + + i = 0; + do { + ret = drmCommandWrite( mmesa->driFd, DRM_MGA_ILOAD, + &iload, sizeof(drmMGAIload) ); + } while ( ret == -EBUSY && i++ < DRM_MGA_IDLE_RETRY ); - ret = drmMGATextureLoad( mmesa->driFd, buf->idx, dest, length ); if ( ret < 0 ) { printf("send iload retcode = %d\n", ret); exit(1); @@ -139,7 +151,7 @@ -static GLbitfield +static void mgaDDClear( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint cx, GLint cy, GLint cw, GLint ch ) { @@ -153,6 +165,7 @@ int ret; int i; static int nrclears; + drmMGAClearRec clear; FLUSH_BATCH( mmesa ); @@ -182,102 +195,145 @@ mask &= ~DD_STENCIL_BIT; } - if ( !flags ) - return mask; + if ( flags ) { + LOCK_HARDWARE( mmesa ); - 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; - /* 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)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 ; ) - { - int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, mmesa->numClipRects); - XF86DRIClipRectPtr box = mmesa->pClipRects; - XF86DRIClipRectPtr b = mmesa->sarea->boxes; - int n = 0; + for (i = 0 ; i < mmesa->numClipRects ; ) + { + int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, mmesa->numClipRects); + XF86DRIClipRectPtr box = mmesa->pClipRects; + XF86DRIClipRectPtr b = mmesa->sarea->boxes; + int 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++; + 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++; + } } - } - 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; - - 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, + "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; + + clear.flags = flags; + clear.clear_color = clear_color; + clear.clear_depth = clear_depth; + clear.color_mask = color_mask; + clear.depth_mask = depth_mask; + ret = drmCommandWrite( mmesa->driFd, DRM_MGA_CLEAR, + &clear, sizeof(drmMGAClearRec)); + 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 ); - mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; + UNLOCK_HARDWARE( mmesa ); + mmesa->dirty |= MGA_UPLOAD_CLIPRECTS|MGA_UPLOAD_CONTEXT; + } - return mask; + if (mask) + _swrast_Clear( ctx, mask, all, cx, cy, cw, ch ); } int nrswaps; +void mgaWaitForVBlank( mgaContextPtr mmesa ) +{ + drmVBlank vbl; + int ret; + + if ( !mmesa->mgaScreen->irq ) + return; + if ( getenv("LIBGL_SYNC_REFRESH") ) { + /* Wait for until the next vertical blank */ + vbl.request.type = DRM_VBLANK_RELATIVE; + vbl.request.sequence = 1; + } else if ( getenv("LIBGL_THROTTLE_REFRESH") ) { + /* Wait for at least one vertical blank since the last call */ + vbl.request.type = DRM_VBLANK_ABSOLUTE; + vbl.request.sequence = mmesa->vbl_seq + 1; + } else { + return; + } + + if ((ret = drmWaitVBlank( mmesa->driFd, &vbl ))) { + fprintf(stderr, "%s: drmWaitVBlank returned %d, IRQs don't seem to be" + " working correctly.\nTry running with LIBGL_THROTTLE_REFRESH" + " and LIBL_SYNC_REFRESH unset.\n", __FUNCTION__, ret); + exit(1); + } + + mmesa->vbl_seq = vbl.reply.sequence; +} + + /* * Copy the back buffer to the front buffer. */ -void mgaSwapBuffers( mgaContextPtr mmesa ) +void mgaSwapBuffers(Display *dpy, void *drawablePrivate) { - __DRIdrawablePrivate *dPriv = mmesa->driDrawable; + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + mgaContextPtr mmesa; XF86DRIClipRectPtr pbox; GLint nbox; GLint ret, wait = 0; GLint i; GLuint last_frame, last_wrap; + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); + + mmesa = (mgaContextPtr) dPriv->driContextPriv->driverPrivate; + FLUSH_BATCH( mmesa ); + mgaWaitForVBlank( mmesa ); + LOCK_HARDWARE( mmesa ); last_frame = mmesa->sarea->last_frame.head; @@ -331,7 +387,7 @@ if (0) fprintf(stderr, "DRM_IOCTL_MGA_SWAP\n"); - ret = drmMGASwapBuffers( mmesa->driFd ); + ret = drmCommandNone( mmesa->driFd, DRM_MGA_SWAP ); if ( ret ) { printf("send swap retcode = %d\n", ret); exit(1); @@ -407,13 +463,16 @@ if (mmesa->CurrentTexObj[1]) mmesa->CurrentTexObj[1]->age = age; } +#ifdef __i386__ static int __break_vertex = 0; +#endif void mgaFlushVerticesLocked( mgaContextPtr mmesa ) { XF86DRIClipRectPtr pbox = mmesa->pClipRects; int nbox = mmesa->numClipRects; drmBufPtr buffer = mmesa->vertex_dma_buffer; + drmMGAVertex vertex; int i; mmesa->vertex_dma_buffer = 0; @@ -447,8 +506,13 @@ if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) fprintf(stderr, "Firing vertex -- case a nbox %d\n", nbox); + + vertex.idx = buffer->idx; + vertex.used = buffer->used; + vertex.discard = 1; + drmCommandWrite( mmesa->driFd, DRM_MGA_VERTEX, + &vertex, sizeof(drmMGAVertex) ); - drmMGAFlushVertexBuffer( mmesa->driFd, buffer->idx, buffer->used, 1 ); age_mmesa(mmesa, mmesa->sarea->last_enqueue); } else @@ -489,8 +553,13 @@ discard = 1; mmesa->sarea->dirty |= MGA_UPLOAD_CLIPRECTS; - drmMGAFlushVertexBuffer( mmesa->driFd, buffer->idx, - buffer->used, discard ); + + vertex.idx = buffer->idx; + vertex.used = buffer->used; + vertex.discard = discard; + drmCommandWrite( mmesa->driFd, DRM_MGA_VERTEX, + &vertex, sizeof(drmMGAVertex) ); + age_mmesa(mmesa, mmesa->sarea->last_enqueue); } } @@ -512,55 +581,6 @@ UNLOCK_HARDWARE( mmesa ); } -void mgaFlushEltsLocked( mgaContextPtr mmesa ) -{ - if (mmesa->first_elt != mmesa->next_elt) { - mgaFireEltsLocked( mmesa, - ((char *)mmesa->first_elt - - (char *)mmesa->elt_buf->address), - ((char *)mmesa->next_elt - - (char *)mmesa->elt_buf->address), - 0 ); - mmesa->first_elt = mmesa->next_elt; - } -} - -void mgaFlushElts( mgaContextPtr mmesa ) -{ - LOCK_HARDWARE( mmesa ); - mgaFlushEltsLocked( mmesa ); - UNLOCK_HARDWARE( mmesa ); -} - - -GLuint *mgaAllocVertexDwords( mgaContextPtr mmesa, int dwords ) -{ - int bytes = dwords * 4; - GLuint *head; - - if (!mmesa->vertex_dma_buffer) { - LOCK_HARDWARE( mmesa ); - - 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 > - mmesa->vertex_dma_buffer->total) { - LOCK_HARDWARE( mmesa ); - mgaFlushVerticesLocked( mmesa ); - mmesa->vertex_dma_buffer = mga_get_buffer_ioctl( mmesa ); - UNLOCK_HARDWARE( mmesa ); - } - - head = (GLuint *)((char *)mmesa->vertex_dma_buffer->address + - mmesa->vertex_dma_buffer->used); - - mmesa->vertex_dma_buffer->used += bytes; - return head; -} - void mgaFireILoadLocked( mgaContextPtr mmesa, GLuint offset, GLuint length ) @@ -591,12 +611,6 @@ return mga_get_buffer_ioctl( mmesa ); } -void mgaGetEltBufLocked( mgaContextPtr mmesa ) -{ - mmesa->elt_buf = mga_get_buffer_ioctl( mmesa ); -} - - void mgaDDFlush( GLcontext *ctx ) @@ -618,104 +632,60 @@ -void mgaFireEltsLocked( mgaContextPtr mmesa, - GLuint start, - GLuint end, - GLuint discard ) + +void mgaReleaseBufLocked( mgaContextPtr mmesa, drmBufPtr buffer ) { - XF86DRIClipRectPtr pbox = mmesa->pClipRects; - int nbox = mmesa->numClipRects; - drmBufPtr buffer = mmesa->elt_buf; - int i; + drmMGAVertex vertex; - if (!buffer) - return; + if (!buffer) return; - if (mmesa->dirty_cliprects & mmesa->draw_buffer) - mgaUpdateRects( mmesa, mmesa->draw_buffer ); + vertex.idx = buffer->idx; + vertex.used = 0; + vertex.discard = 1; + drmCommandWrite( mmesa->driFd, DRM_MGA_VERTEX, + &vertex, sizeof(drmMGAVertex) ); +} - if (mmesa->dirty & ~MGA_UPLOAD_CLIPRECTS) - mgaEmitHwStateLocked( mmesa ); +int mgaFlushDMA( int fd, drmLockFlags flags ) +{ + drmMGALock lock; + int ret, i = 0; - /* FIXME: Workaround bug in kernel module. - */ - mmesa->sarea->dirty |= MGA_UPLOAD_CONTEXT; + memset( &lock, 0, sizeof(drmMGALock) ); - if (!nbox) - end = start; + if ( flags & DRM_LOCK_QUIESCENT ) 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 (nbox >= MGA_NR_SAREA_CLIPRECTS) - mmesa->dirty |= MGA_UPLOAD_CLIPRECTS; + do { + ret = drmCommandWrite( fd, DRM_MGA_FLUSH, &lock, sizeof(drmMGALock) ); + } while ( ret && errno == EBUSY && i++ < DRM_MGA_IDLE_RETRY ); - if ( end == start || !(mmesa->dirty & MGA_UPLOAD_CLIPRECTS)) - { - if (nbox == 1) - mmesa->sarea->nbox = 0; - else - mmesa->sarea->nbox = nbox; + if ( ret == 0 ) + return 0; + if ( errno != EBUSY ) + return -errno; + if ( lock.flags & DRM_LOCK_QUIESCENT ) { + /* Only keep trying if we need quiescence. + */ + lock.flags &= ~(DRM_LOCK_FLUSH | DRM_LOCK_FLUSH_ALL); - drmMGAFlushIndices( mmesa->driFd, buffer->idx, start, end, discard ); - age_mmesa(mmesa, mmesa->sarea->last_enqueue); + do { + ret = drmCommandWrite( fd, DRM_MGA_FLUSH, &lock, sizeof(drmMGALock) ); + } while ( ret && errno == EBUSY && i++ < DRM_MGA_IDLE_RETRY ); } - else - { - for (i = 0 ; i < nbox ; ) - { - int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, nbox); - XF86DRIClipRectPtr b = mmesa->sarea->boxes; - int d = 0; - - if (mmesa->scissor) { - mmesa->sarea->nbox = 0; - 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; - end = start; - } - } else { - mmesa->sarea->nbox = nr - i; - for ( ; i < nr ; i++) - *b++ = pbox[i]; - } - - /* Potentially finished with the buffer? - */ - if (nr == nbox) - d = discard; - - - mmesa->sarea->dirty |= MGA_UPLOAD_CLIPRECTS; - drmMGAFlushIndices( mmesa->driFd, buffer->idx, start, end, d ); - age_mmesa(mmesa, mmesa->sarea->last_enqueue); - } + if ( ret == 0 ) { + return 0; + } else { + return -errno; } - - mmesa->dirty &= ~MGA_UPLOAD_CLIPRECTS; } - -void mgaReleaseBufLocked( mgaContextPtr mmesa, drmBufPtr buffer ) -{ - if (!buffer) return; - - drmMGAFlushVertexBuffer( mmesa->driFd, buffer->idx, 0, 1 ); -} - - void mgaDDInitIoctlFuncs( GLcontext *ctx ) { - ctx->Driver.Clear = mgaDDClear; - 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.8 xc/lib/GL/mesa/src/drv/mga/mgaioctl.h:1.11 --- xc/lib/GL/mesa/src/drv/mga/mgaioctl.h:1.8 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgaioctl.h Wed Oct 30 07:51:36 2002 @@ -22,10 +22,10 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * 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 $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.h,v 1.11 2002/10/30 12:51:36 alanh Exp $ */ #ifndef MGA_IOCTL_H #define MGA_IOCTL_H @@ -33,14 +33,8 @@ #include "mgacontext.h" #include "mga_xmesa.h" -GLbitfield mgaClear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ); +void mgaSwapBuffers( Display *dpy, void *drawablePrivate ); - -void mgaSwapBuffers( mgaContextPtr mmesa ); - - - GLuint *mgaAllocVertexDwords( mgaContextPtr mmesa, int dwords ); @@ -56,23 +50,9 @@ void mgaFlushVertices( mgaContextPtr mmesa ); void mgaFlushVerticesLocked( mgaContextPtr mmesa ); - - -void mgaFireEltsLocked( mgaContextPtr mmesa, - GLuint start, - GLuint end, - GLuint discard ); - -void mgaGetEltBufLocked( mgaContextPtr mmesa ); void mgaReleaseBufLocked( mgaContextPtr mmesa, drmBufPtr buffer ); +int mgaFlushDMA( int fd, drmLockFlags flags ); -void mgaFlushEltsLocked( mgaContextPtr mmesa ); -void mgaFlushElts( mgaContextPtr mmesa ) ; - - -/* upload texture - */ - void mgaDDFlush( GLcontext *ctx ); void mgaDDFinish( GLcontext *ctx ); @@ -82,23 +62,23 @@ if (MGA_DEBUG&DEBUG_VERBOSE_IOCTL) \ fprintf(stderr, "FLUSH_BATCH in %s\n", __FUNCTION__); \ if (mmesa->vertex_dma_buffer) mgaFlushVertices(mmesa); \ - else if (mmesa->next_elt != mmesa->first_elt) mgaFlushElts(mmesa); \ } while (0) +#define MGA_STATECHANGE(mmesa, flag) do { \ + FLUSH_BATCH(mmesa); \ + mmesa->dirty |= flag; \ +} while (0) + + extern drmBufPtr mga_get_buffer_ioctl( mgaContextPtr mmesa ); static __inline -GLuint *mgaAllocVertexDwordsInline( mgaContextPtr mmesa, int dwords ) +GLuint *mgaAllocDmaLow( mgaContextPtr mmesa, int bytes ) { - int bytes = dwords * 4; GLuint *head; if (!mmesa->vertex_dma_buffer) { LOCK_HARDWARE( mmesa ); - - 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 > @@ -119,11 +99,11 @@ #define UPDATE_LOCK( mmesa, flags ) \ do { \ - GLint ret = drmMGAFlushDMA( mmesa->driFd, flags ); \ + GLint ret = mgaFlushDMA( mmesa->driFd, flags ); \ if ( ret < 0 ) { \ - drmMGAEngineReset( mmesa->driFd ); \ + drmCommandNone( mmesa->driFd, DRM_MGA_RESET ); \ UNLOCK_HARDWARE( mmesa ); \ - fprintf( stderr, __FUNCTION__ ": flush ret=%d\n", ret ); \ + fprintf( stderr, "%s: flush ret=%d\n", __FUNCTION__, ret ); \ /*fprintf( stderr, "drmMGAFlushDMA: return = %d\n", ret );*/ \ exit( 1 ); \ } \ Index: xc/lib/GL/mesa/src/drv/mga/mgapipeline.c diff -u xc/lib/GL/mesa/src/drv/mga/mgapipeline.c:1.4 xc/lib/GL/mesa/src/drv/mga/mgapipeline.c:removed --- xc/lib/GL/mesa/src/drv/mga/mgapipeline.c:1.4 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgapipeline.c Thu Feb 27 12:26:28 2003 @@ -1,162 +0,0 @@ -/* $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" -#include "mgadd.h" -#include "mgacontext.h" -#include "mgatris.h" -#include "mgapipeline.h" -#include "fog.h" - -static struct gl_pipeline_stage mga_fast_stage = { - "MGA 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, - mgaDDFastPath -}; - - -#define ILLEGAL_ENABLES (TEXTURE0_3D| \ - TEXTURE1_3D| \ - ENABLE_TEXMAT0 | \ - ENABLE_TEXMAT1 | \ - ENABLE_TEXGEN0 | \ - ENABLE_TEXGEN1 | \ - 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 && - (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] = &mga_fast_stage; - pipe->stages[1] = 0; - pipe->new_inputs = ctx->RenderFlags & VERT_DATA; - pipe->ops = pipe->stages[0]->ops; - mmesa->using_fast_path = 1; - return 1; - } - - if (mmesa->using_fast_path) - { - mmesa->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; -} - - - - -/* 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 mgaDDCheckRasterSetup( GLcontext *ctx, struct gl_pipeline_stage *d ) -{ - d->type = PIPE_IMMEDIATE|PIPE_PRECALC; - d->inputs = ctx->RenderFlags; - - /* MGA 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 mgaDDRegisterPipelineStages( 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) { - - /* 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 = mgaDDCheckPartialRasterSetup; - out[o].run = mgaDDPartialRasterSetup; - o++; - break; - - case PIPE_OP_RAST_SETUP_0|PIPE_OP_RAST_SETUP_1: - out[o] = in[i]; - out[o].check = mgaDDCheckRasterSetup; - out[o].run = mgaDDDoRasterSetup; - o++; - break; - - default: - out[o++] = in[i]; - break; - } - } - - return o; -} Index: xc/lib/GL/mesa/src/drv/mga/mgapipeline.h diff -u xc/lib/GL/mesa/src/drv/mga/mgapipeline.h:1.3 xc/lib/GL/mesa/src/drv/mga/mgapipeline.h:removed --- xc/lib/GL/mesa/src/drv/mga/mgapipeline.h:1.3 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgapipeline.h Thu Feb 27 12:26:28 2003 @@ -1,46 +0,0 @@ -/* $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 - - -extern GLuint mgaDDRegisterPipelineStages( struct gl_pipeline_stage *out, - const struct gl_pipeline_stage *in, - GLuint nr ); - -extern GLboolean mgaDDBuildImmediatePipeline( GLcontext *ctx ); -extern GLboolean mgaDDBuildPrecalcPipeline( GLcontext *ctx ); - -extern void mgaDDFastPath( struct vertex_buffer *VB ); -extern void mgaDDFastPathInit( void ); - -extern void mgaDDEltPath( struct vertex_buffer *VB ); -extern void mgaDDEltPathInit( void ); - -#endif Index: xc/lib/GL/mesa/src/drv/mga/mgapixel.c diff -u xc/lib/GL/mesa/src/drv/mga/mgapixel.c:1.3 xc/lib/GL/mesa/src/drv/mga/mgapixel.c:1.9 --- xc/lib/GL/mesa/src/drv/mga/mgapixel.c:1.3 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgapixel.c Tue Nov 5 12:46:08 2002 @@ -22,13 +22,14 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * 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 $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgapixel.c,v 1.9 2002/11/05 17:46:08 tsi Exp $ */ #include "enums.h" -#include "types.h" +#include "mtypes.h" +#include "macros.h" #include "texutil.h" #include "mgadd.h" #include "mgacontext.h" @@ -36,15 +37,17 @@ #include "mgapixel.h" #include "mgabuffers.h" -#include "drm.h" +#include "xf86drm.h" +#include "mga_common.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)) +#include "swrast/swrast.h" -#define AGP_OFFSET( mmesa, p ) \ - (((GLuint)p) - (GLuint)mmesa->mgaScreen->buffers.map ) +#define IS_AGP_MEM( mmesa, p ) \ + ((unsigned long)mmesa->mgaScreen->buffers.map <= ((unsigned long)p) && \ + (unsigned long)mmesa->mgaScreen->buffers.map + \ + (unsigned long)mmesa->mgaScreen->buffers.size > ((unsigned long)p)) +#define AGP_OFFSET( mmesa, p ) \ + (((unsigned long)p) - (unsigned long)mmesa->mgaScreen->buffers.map) #if defined(MESA_packed_depth_stencil) @@ -113,25 +116,30 @@ 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 ); + return (!ctx->_ImageTransferState && + !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 ) ); + return (!( ctx->Color.AlphaEnabled || + ctx->Depth.Test || + ctx->Fog.Enabled || + ctx->Scissor.Enabled || + ctx->Stencil.Enabled || + !ctx->Color.ColorMask[0] || + !ctx->Color.ColorMask[1] || + !ctx->Color.ColorMask[2] || + !ctx->Color.ColorMask[3] || + ctx->Color.ColorLogicOpEnabled || + ctx->Texture._ReallyEnabled || + ctx->Depth.OcclusionTest + ) && + ctx->Current.RasterPosValid && + ctx->Pixel.ZoomX == 1.0F && + (ctx->Pixel.ZoomY == 1.0F || ctx->Pixel.ZoomY == -1.0F)); } static GLboolean @@ -171,29 +179,29 @@ *width = MIN2(*width, MAX_WIDTH); /* redundant? */ /* left clipping */ - if (*x < buffer->Xmin) { - *skipPixels += (buffer->Xmin - *x); - *width -= (buffer->Xmin - *x); - *x = buffer->Xmin; + 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 (*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; + 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 (*y + *height > buffer->_Ymax) + *height -= (*y + *height - buffer->_Ymax - 1); if (*height <= 0) return GL_FALSE; @@ -205,25 +213,27 @@ } 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 ) +mgaTryReadPixels( 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; + GLuint source; +#if 0 + drmMGABlit blit; + GLuint dest; GLint source_pitch, dest_pitch; GLint delta_sx, delta_sy; GLint delta_dx, delta_dy; GLint blit_height, ydir; - +#endif if (!clip_pixelrect(ctx, ctx->ReadBuffer, &x, &y, &width, &height, @@ -256,7 +266,7 @@ * Could get the acclerator to solid fill the destination with * zeros first... Or get the cpu to do it... */ - if (ctx->Visual->DepthBits == 24) + if (ctx->Visual.depthBits == 24) return GL_FALSE; planemask = ~0; @@ -283,6 +293,7 @@ LOCK_HARDWARE( mmesa ); +#if 0 { __DRIdrawablePrivate *dPriv = mmesa->driDrawable; int nbox, retcode, i; @@ -344,7 +355,8 @@ mmesa->sarea->nbox = n; - if (n && (retcode = ioctl(mmesa->driFd, DRM_IOCTL_MGA_BLIT, &blit))) { + if (n && (retcode = drmCommandWrite( mmesa->driFd, DRM_MGA_BLIT, + &blit, sizeof(drmMGABlit)))) { fprintf(stderr, "blit ioctl failed, retcode = %d\n", retcode); UNLOCK_HARDWARE( mmesa ); exit(1); @@ -353,12 +365,25 @@ UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT ); } +#endif UNLOCK_HARDWARE( mmesa ); return GL_TRUE; } +static void +mgaDDReadPixels( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *pack, + GLvoid *pixels ) +{ + if (!mgaTryReadPixels( ctx, x, y, width, height, format, type, pack, pixels)) + _swrast_ReadPixels( ctx, x, y, width, height, format, type, pack, pixels); +} + + static void do_draw_pix( GLcontext *ctx, @@ -367,8 +392,9 @@ const void *pixels, GLuint dest, GLuint planemask) { +#if 0 mgaContextPtr mmesa = MGA_CONTEXT(ctx); - drm_mga_blit_t blit; + drmMGABlit blit; __DRIdrawablePrivate *dPriv = mmesa->driDrawable; XF86DRIClipRectPtr pbox = dPriv->pClipRects; int nbox = dPriv->numClipRects; @@ -430,23 +456,25 @@ mmesa->sarea->nbox = n; - if (n && (retcode = ioctl(mmesa->driFd, DRM_IOCTL_MGA_BLIT, &blit))) { + if (n && (retcode = drmCommandWrite( mmesa->driFd, DRM_MGA_BLIT, + &blit, sizeof(drmMGABlit)))) { fprintf(stderr, "blit ioctl failed, retcode = %d\n", retcode); UNLOCK_HARDWARE( mmesa ); exit(1); } } +#endif } 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 ) +mgaTryDrawPixels( 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; @@ -476,7 +504,7 @@ case GL_DEPTH_COMPONENT: dest = mmesa->mgaScreen->depthOffset; - if (ctx->Visual->DepthBits == 24) + if (ctx->Visual.depthBits == 24) planemask = ~0xff; else planemask = ~0; @@ -532,7 +560,8 @@ */ /* drmBufPtr buf = mgaGetBufferLocked(mmesa); */ GLuint bufferpitch = (width*cpp+31)&~31; - char *address = mmesa->mgaScreen->agp.map; + + char *address = 0; /* mmesa->mgaScreen->agp.map; */ do { /* GLuint rows = MIN2( height, MGA_DMA_BUF_SZ / bufferpitch ); */ @@ -548,23 +577,19 @@ */ #if 0 if (cpp == 2) { - if (!_mesa_convert_teximage( MESA_FORMAT_RGB565, - width, rows, - address, bufferpitch, - width, rows, - format, type, - pixels, unpack )) { + if (!_mesa_convert_texsubimage2d( MESA_FORMAT_RGB565, + 0, 0, width, rows, + bufferpitch, format, type, + unpack, pixels, address )) { /* 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 )) { + if (!_mesa_convert_texsubimage2d( MESA_FORMAT_ARGB8888, + 0, 0, width, rows, + bufferpitch, format, type, + unpack, pixels, address )) { /* mgaReleaseBufLocked( mmesa, buf ); */ UNLOCK_HARDWARE(mmesa); return GL_FALSE; @@ -595,6 +620,18 @@ return GL_TRUE; } +static void +mgaDDDrawPixels( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ) +{ + if (!mgaTryDrawPixels( ctx, x, y, width, height, format, type, + unpack, pixels )) + _swrast_DrawPixels( ctx, x, y, width, height, format, type, + unpack, pixels ); +} @@ -637,6 +674,15 @@ ctx->Driver.GetAgpOffset = mgaDDGetAgpOffset; ctx->Driver.FreeAgpMemory = mgaDDFreeAgpMemory; #endif + + /* Pixel path fallbacks. + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.Bitmap = _swrast_Bitmap; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; + 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 xc/lib/GL/mesa/src/drv/mga/mgapixel.h:1.3 xc/lib/GL/mesa/src/drv/mga/mgapixel.h:1.5 --- xc/lib/GL/mesa/src/drv/mga/mgapixel.h:1.3 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgapixel.h Wed Oct 30 07:51:36 2002 @@ -22,14 +22,14 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgapixel.h,v 1.3 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgapixel.h,v 1.5 2002/10/30 12:51:36 alanh Exp $ */ #ifndef MGA_PIXELS_H #define MGA_PIXELS_H -#include "types.h" +#include "mtypes.h" extern void mgaDDInitPixelFuncs( GLcontext *ctx ); Index: xc/lib/GL/mesa/src/drv/mga/mgaregs.h diff -u xc/lib/GL/mesa/src/drv/mga/mgaregs.h:1.4 xc/lib/GL/mesa/src/drv/mga/mgaregs.h:1.6 --- xc/lib/GL/mesa/src/drv/mga/mgaregs.h:1.4 Sat Aug 18 07:55:47 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgaregs.h Sat Jan 11 22:55:46 2003 @@ -14,12 +14,12 @@ * 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 - * STEPHEN CROWLEY, 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 + * STEPHEN CROWLEY, 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/mga/mgaregs.h,v 1.4 2001/08/18 11:55:47 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaregs.h,v 1.6 2003/01/12 03:55:46 tsi Exp $ */ #ifndef _MGAREGS_H_ #define _MGAREGS_H_ @@ -35,1346 +35,1347 @@ * Power Graphic Mode Memory Space Registers */ -#define MGAREG_MGA_EXEC 0x0100 -#define MGAREG_AGP_PLL 0x1e4c +#define MGAREG_MGA_EXEC 0x0100 +#define MGAREG_AGP_PLL 0x1e4c - #define AGP_PLL_agp2xpllen_MASK 0xfffffffe /* bit 0 */ - #define AGP_PLL_agp2xpllen_disable 0x0 - #define AGP_PLL_agp2xpllen_enable 0x1 - -#define MGAREG_CFG_OR 0x1e4c - - #define CFG_OR_comp_or_MASK 0xfffffff7 /* bit 3 */ - #define CFG_OR_comp_or_disable 0x0 - #define CFG_OR_comp_or_enable 0x8 - #define CFG_OR_compfreq_MASK 0xffffff0f /* bits 4-7 */ - #define CFG_OR_compfreq_SHIFT 4 - #define CFG_OR_comporup_MASK 0xfffff0ff /* bits 8-11 */ - #define CFG_OR_comporup_SHIFT 8 - #define CFG_OR_compordn_MASK 0xffff0fff /* bits 12-15 */ - #define CFG_OR_compordn_SHIFT 12 - #define CFG_OR_e2pq_MASK 0xfffeffff /* bit 16 */ - #define CFG_OR_e2pq_disable 0x0 - #define CFG_OR_e2pq_enable 0x10000 - #define CFG_OR_e2pqbypcsn_MASK 0xfffdffff /* bit 17 */ - #define CFG_OR_e2pqbypcsn_disable 0x0 - #define CFG_OR_e2pqbypcsn_enable 0x20000 - #define CFG_OR_e2pqbypd_MASK 0xfffbffff /* bit 18 */ - #define CFG_OR_e2pqbypd_disable 0x0 - #define CFG_OR_e2pqbypd_enable 0x40000 - #define CFG_OR_e2pbypclk_MASK 0xfff7ffff /* bit 19 */ - #define CFG_OR_e2pbypclk_disable 0x0 - #define CFG_OR_e2pbypclk_enable 0x80000 - #define CFG_OR_e2pbyp_MASK 0xffefffff /* bit 20 */ - #define CFG_OR_e2pbyp_disable 0x0 - #define CFG_OR_e2pbyp_enable 0x100000 - #define CFG_OR_rate_cap_or_MASK 0xff1fffff /* bits 21-23 */ - #define CFG_OR_rate_cap_or_SHIFT 21 - #define CFG_OR_rq_or_MASK 0xe0ffffff /* bits 24-28 */ - #define CFG_OR_rq_or_SHIFT 24 - -#define MGAREG_ALPHACTRL 0x2c7c - - #define AC_src_MASK 0xfffffff0 /* bits 0-3 */ - #define AC_src_zero 0x0 /* val 0, shift 0 */ - #define AC_src_one 0x1 /* val 1, shift 0 */ - #define AC_src_dst_color 0x2 /* val 2, shift 0 */ - #define AC_src_om_dst_color 0x3 /* val 3, shift 0 */ - #define AC_src_src_alpha 0x4 /* val 4, shift 0 */ - #define AC_src_om_src_alpha 0x5 /* val 5, shift 0 */ - #define AC_src_dst_alpha 0x6 /* val 6, shift 0 */ - #define AC_src_om_dst_alpha 0x7 /* val 7, shift 0 */ - #define AC_src_src_alpha_sat 0x8 /* val 8, shift 0 */ - #define AC_dst_MASK 0xffffff0f /* bits 4-7 */ - #define AC_dst_zero 0x0 /* val 0, shift 4 */ - #define AC_dst_one 0x10 /* val 1, shift 4 */ - #define AC_dst_src_color 0x20 /* val 2, shift 4 */ - #define AC_dst_om_src_color 0x30 /* val 3, shift 4 */ - #define AC_dst_src_alpha 0x40 /* val 4, shift 4 */ - #define AC_dst_om_src_alpha 0x50 /* val 5, shift 4 */ - #define AC_dst_dst_alpha 0x60 /* val 6, shift 4 */ - #define AC_dst_om_dst_alpha 0x70 /* val 7, shift 4 */ - #define AC_amode_MASK 0xfffffcff /* bits 8-9 */ - #define AC_amode_FCOL 0x0 /* val 0, shift 8 */ - #define AC_amode_alpha_channel 0x100 /* val 1, shift 8 */ - #define AC_amode_video_alpha 0x200 /* val 2, shift 8 */ - #define AC_amode_RSVD 0x300 /* val 3, shift 8 */ - #define AC_astipple_MASK 0xfffff7ff /* bit 11 */ - #define AC_astipple_disable 0x0 - #define AC_astipple_enable 0x800 - #define AC_aten_MASK 0xffffefff /* bit 12 */ - #define AC_aten_disable 0x0 - #define AC_aten_enable 0x1000 - #define AC_atmode_MASK 0xffff1fff /* bits 13-15 */ - #define AC_atmode_noacmp 0x0 /* val 0, shift 13 */ - #define AC_atmode_ae 0x4000 /* val 2, shift 13 */ - #define AC_atmode_ane 0x6000 /* val 3, shift 13 */ - #define AC_atmode_alt 0x8000 /* val 4, shift 13 */ - #define AC_atmode_alte 0xa000 /* val 5, shift 13 */ - #define AC_atmode_agt 0xc000 /* val 6, shift 13 */ - #define AC_atmode_agte 0xe000 /* val 7, shift 13 */ - #define AC_atref_MASK 0xff00ffff /* bits 16-23 */ - #define AC_atref_SHIFT 16 - #define AC_alphasel_MASK 0xfcffffff /* bits 24-25 */ - #define AC_alphasel_fromtex 0x0 /* val 0, shift 24 */ - #define AC_alphasel_diffused 0x1000000 /* val 1, shift 24 */ - #define AC_alphasel_modulated 0x2000000 /* val 2, shift 24 */ - #define AC_alphasel_trans 0x3000000 /* val 3, shift 24 */ - -#define MGAREG_ALPHASTART 0x2c70 -#define MGAREG_ALPHAXINC 0x2c74 -#define MGAREG_ALPHAYINC 0x2c78 -#define MGAREG_AR0 0x1c60 - - #define AR0_ar0_MASK 0xfffc0000 /* bits 0-17 */ - #define AR0_ar0_SHIFT 0 - -#define MGAREG_AR1 0x1c64 - - #define AR1_ar1_MASK 0xff000000 /* bits 0-23 */ - #define AR1_ar1_SHIFT 0 - -#define MGAREG_AR2 0x1c68 - - #define AR2_ar2_MASK 0xfffc0000 /* bits 0-17 */ - #define AR2_ar2_SHIFT 0 - -#define MGAREG_AR3 0x1c6c - - #define AR3_ar3_MASK 0xff000000 /* bits 0-23 */ - #define AR3_ar3_SHIFT 0 - #define AR3_spage_MASK 0xf8ffffff /* bits 24-26 */ - #define AR3_spage_SHIFT 24 - -#define MGAREG_AR4 0x1c70 - - #define AR4_ar4_MASK 0xfffc0000 /* bits 0-17 */ - #define AR4_ar4_SHIFT 0 - -#define MGAREG_AR5 0x1c74 - - #define AR5_ar5_MASK 0xfffc0000 /* bits 0-17 */ - #define AR5_ar5_SHIFT 0 - -#define MGAREG_AR6 0x1c78 - - #define AR6_ar6_MASK 0xfffc0000 /* bits 0-17 */ - #define AR6_ar6_SHIFT 0 - -#define MGAREG_BCOL 0x1c20 -#define MGAREG_BESA1CORG 0x3d10 -#define MGAREG_BESA1ORG 0x3d00 -#define MGAREG_BESA2CORG 0x3d14 -#define MGAREG_BESA2ORG 0x3d04 -#define MGAREG_BESB1CORG 0x3d18 -#define MGAREG_BESB1ORG 0x3d08 -#define MGAREG_BESB2CORG 0x3d1c -#define MGAREG_BESB2ORG 0x3d0c -#define MGAREG_BESCTL 0x3d20 - - #define BC_besen_MASK 0xfffffffe /* bit 0 */ - #define BC_besen_disable 0x0 - #define BC_besen_enable 0x1 - #define BC_besv1srcstp_MASK 0xffffffbf /* bit 6 */ - #define BC_besv1srcstp_even 0x0 - #define BC_besv1srcstp_odd 0x40 - #define BC_besv2srcstp_MASK 0xfffffeff /* bit 8 */ - #define BC_besv2srcstp_disable 0x0 - #define BC_besv2srcstp_enable 0x100 - #define BC_beshfen_MASK 0xfffffbff /* bit 10 */ - #define BC_beshfen_disable 0x0 - #define BC_beshfen_enable 0x400 - #define BC_besvfen_MASK 0xfffff7ff /* bit 11 */ - #define BC_besvfen_disable 0x0 - #define BC_besvfen_enable 0x800 - #define BC_beshfixc_MASK 0xffffefff /* bit 12 */ - #define BC_beshfixc_weight 0x0 - #define BC_beshfixc_coeff 0x1000 - #define BC_bescups_MASK 0xfffeffff /* bit 16 */ - #define BC_bescups_disable 0x0 - #define BC_bescups_enable 0x10000 - #define BC_bes420pl_MASK 0xfffdffff /* bit 17 */ - #define BC_bes420pl_422 0x0 - #define BC_bes420pl_420 0x20000 - #define BC_besdith_MASK 0xfffbffff /* bit 18 */ - #define BC_besdith_disable 0x0 - #define BC_besdith_enable 0x40000 - #define BC_beshmir_MASK 0xfff7ffff /* bit 19 */ - #define BC_beshmir_disable 0x0 - #define BC_beshmir_enable 0x80000 - #define BC_besbwen_MASK 0xffefffff /* bit 20 */ - #define BC_besbwen_color 0x0 - #define BC_besbwen_bw 0x100000 - #define BC_besblank_MASK 0xffdfffff /* bit 21 */ - #define BC_besblank_disable 0x0 - #define BC_besblank_enable 0x200000 - #define BC_besfselm_MASK 0xfeffffff /* bit 24 */ - #define BC_besfselm_soft 0x0 - #define BC_besfselm_hard 0x1000000 - #define BC_besfsel_MASK 0xf9ffffff /* bits 25-26 */ - #define BC_besfsel_a1 0x0 /* val 0, shift 25 */ - #define BC_besfsel_a2 0x2000000 /* val 1, shift 25 */ - #define BC_besfsel_b1 0x4000000 /* val 2, shift 25 */ - #define BC_besfsel_b2 0x6000000 /* val 3, shift 25 */ - -#define MGAREG_BESGLOBCTL 0x3dc0 - - #define BGC_beshzoom_MASK 0xfffffffe /* bit 0 */ - #define BGC_beshzoom_disable 0x0 - #define BGC_beshzoom_enable 0x1 - #define BGC_beshzoomf_MASK 0xfffffffd /* bit 1 */ - #define BGC_beshzoomf_disable 0x0 - #define BGC_beshzoomf_enable 0x2 - #define BGC_bescorder_MASK 0xfffffff7 /* bit 3 */ - #define BGC_bescorder_even 0x0 - #define BGC_bescorder_odd 0x8 - #define BGC_besreghup_MASK 0xffffffef /* bit 4 */ - #define BGC_besreghup_disable 0x0 - #define BGC_besreghup_enable 0x10 - #define BGC_besvcnt_MASK 0xf000ffff /* bits 16-27 */ - #define BGC_besvcnt_SHIFT 16 - -#define MGAREG_BESHCOORD 0x3d28 - - #define BHC_besright_MASK 0xfffff800 /* bits 0-10 */ - #define BHC_besright_SHIFT 0 - #define BHC_besleft_MASK 0xf800ffff /* bits 16-26 */ - #define BHC_besleft_SHIFT 16 - -#define MGAREG_BESHISCAL 0x3d30 - - #define BHISF_beshiscal_MASK 0xffe00003 /* bits 2-20 */ - #define BHISF_beshiscal_SHIFT 2 - -#define MGAREG_BESHSRCEND 0x3d3c - - #define BHSE_beshsrcend_MASK 0xfc000003 /* bits 2-25 */ - #define BHSE_beshsrcend_SHIFT 2 - -#define MGAREG_BESHSRCLST 0x3d50 - - #define BHSL_beshsrclst_MASK 0xfc00ffff /* bits 16-25 */ - #define BHSL_beshsrclst_SHIFT 16 - -#define MGAREG_BESHSRCST 0x3d38 - - #define BHSS_beshsrcst_MASK 0xfc000003 /* bits 2-25 */ - #define BHSS_beshsrcst_SHIFT 2 - -#define MGAREG_BESPITCH 0x3d24 - - #define BP_bespitch_MASK 0xfffff000 /* bits 0-11 */ - #define BP_bespitch_SHIFT 0 - -#define MGAREG_BESSTATUS 0x3dc4 - - #define BS_besstat_MASK 0xfffffffc /* bits 0-1 */ - #define BS_besstat_a1 0x0 /* val 0, shift 0 */ - #define BS_besstat_a2 0x1 /* val 1, shift 0 */ - #define BS_besstat_b1 0x2 /* val 2, shift 0 */ - #define BS_besstat_b2 0x3 /* val 3, shift 0 */ - -#define MGAREG_BESV1SRCLST 0x3d54 - - #define BSF_besv1srclast_MASK 0xfffffc00 /* bits 0-9 */ - #define BSF_besv1srclast_SHIFT 0 - -#define MGAREG_BESV2SRCLST 0x3d58 - - #define BSF_besv2srclst_MASK 0xfffffc00 /* bits 0-9 */ - #define BSF_besv2srclst_SHIFT 0 - -#define MGAREG_BESV1WGHT 0x3d48 - - #define BSF_besv1wght_MASK 0xffff0003 /* bits 2-15 */ - #define BSF_besv1wght_SHIFT 2 - #define BSF_besv1wghts_MASK 0xfffeffff /* bit 16 */ - #define BSF_besv1wghts_disable 0x0 - #define BSF_besv1wghts_enable 0x10000 - -#define MGAREG_BESV2WGHT 0x3d4c - - #define BSF_besv2wght_MASK 0xffff0003 /* bits 2-15 */ - #define BSF_besv2wght_SHIFT 2 - #define BSF_besv2wghts_MASK 0xfffeffff /* bit 16 */ - #define BSF_besv2wghts_disable 0x0 - #define BSF_besv2wghts_enable 0x10000 - -#define MGAREG_BESVCOORD 0x3d2c - - #define BVC_besbot_MASK 0xfffff800 /* bits 0-10 */ - #define BVC_besbot_SHIFT 0 - #define BVC_bestop_MASK 0xf800ffff /* bits 16-26 */ - #define BVC_bestop_SHIFT 16 - -#define MGAREG_BESVISCAL 0x3d34 - - #define BVISF_besviscal_MASK 0xffe00003 /* bits 2-20 */ - #define BVISF_besviscal_SHIFT 2 - -#define MGAREG_CODECADDR 0x3e44 -#define MGAREG_CODECCTL 0x3e40 -#define MGAREG_CODECHARDPTR 0x3e4c -#define MGAREG_CODECHOSTPTR 0x3e48 -#define MGAREG_CODECLCODE 0x3e50 -#define MGAREG_CXBNDRY 0x1c80 - - #define CXB_cxleft_MASK 0xfffff000 /* bits 0-11 */ - #define CXB_cxleft_SHIFT 0 - #define CXB_cxright_MASK 0xf000ffff /* bits 16-27 */ - #define CXB_cxright_SHIFT 16 - -#define MGAREG_CXLEFT 0x1ca0 -#define MGAREG_CXRIGHT 0x1ca4 -#define MGAREG_DMAMAP30 0x1e30 -#define MGAREG_DMAMAP74 0x1e34 -#define MGAREG_DMAMAPB8 0x1e38 -#define MGAREG_DMAMAPFC 0x1e3c -#define MGAREG_DMAPAD 0x1c54 -#define MGAREG_DR0_Z32LSB 0x2c50 -#define MGAREG_DR0_Z32MSB 0x2c54 -#define MGAREG_DR2_Z32LSB 0x2c60 -#define MGAREG_DR2_Z32MSB 0x2c64 -#define MGAREG_DR3_Z32LSB 0x2c68 -#define MGAREG_DR3_Z32MSB 0x2c6c -#define MGAREG_DR0 0x1cc0 -#define MGAREG_DR2 0x1cc8 -#define MGAREG_DR3 0x1ccc -#define MGAREG_DR4 0x1cd0 -#define MGAREG_DR6 0x1cd8 -#define MGAREG_DR7 0x1cdc -#define MGAREG_DR8 0x1ce0 -#define MGAREG_DR10 0x1ce8 -#define MGAREG_DR11 0x1cec -#define MGAREG_DR12 0x1cf0 -#define MGAREG_DR14 0x1cf8 -#define MGAREG_DR15 0x1cfc -#define MGAREG_DSTORG 0x2cb8 - - #define DO_dstmap_MASK 0xfffffffe /* bit 0 */ - #define DO_dstmap_fb 0x0 - #define DO_dstmap_sys 0x1 - #define DO_dstacc_MASK 0xfffffffd /* bit 1 */ - #define DO_dstacc_pci 0x0 - #define DO_dstacc_agp 0x2 - #define DO_dstorg_MASK 0x7 /* bits 3-31 */ - #define DO_dstorg_SHIFT 3 - -#define MGAREG_DWG_INDIR_WT 0x1e80 -#define MGAREG_DWGCTL 0x1c00 - - #define DC_opcod_MASK 0xfffffff0 /* bits 0-3 */ - #define DC_opcod_line_open 0x0 /* val 0, shift 0 */ - #define DC_opcod_autoline_open 0x1 /* val 1, shift 0 */ - #define DC_opcod_line_close 0x2 /* val 2, shift 0 */ - #define DC_opcod_autoline_close 0x3 /* val 3, shift 0 */ - #define DC_opcod_trap 0x4 /* val 4, shift 0 */ - #define DC_opcod_texture_trap 0x6 /* val 6, shift 0 */ - #define DC_opcod_bitblt 0x8 /* val 8, shift 0 */ - #define DC_opcod_iload 0x9 /* val 9, shift 0 */ - #define DC_atype_MASK 0xffffff8f /* bits 4-6 */ - #define DC_atype_rpl 0x0 /* val 0, shift 4 */ - #define DC_atype_rstr 0x10 /* val 1, shift 4 */ - #define DC_atype_zi 0x30 /* val 3, shift 4 */ - #define DC_atype_blk 0x40 /* val 4, shift 4 */ - #define DC_atype_i 0x70 /* val 7, shift 4 */ - #define DC_linear_MASK 0xffffff7f /* bit 7 */ - #define DC_linear_xy 0x0 - #define DC_linear_linear 0x80 - #define DC_zmode_MASK 0xfffff8ff /* bits 8-10 */ - #define DC_zmode_nozcmp 0x0 /* val 0, shift 8 */ - #define DC_zmode_ze 0x200 /* val 2, shift 8 */ - #define DC_zmode_zne 0x300 /* val 3, shift 8 */ - #define DC_zmode_zlt 0x400 /* val 4, shift 8 */ - #define DC_zmode_zlte 0x500 /* val 5, shift 8 */ - #define DC_zmode_zgt 0x600 /* val 6, shift 8 */ - #define DC_zmode_zgte 0x700 /* val 7, shift 8 */ - #define DC_solid_MASK 0xfffff7ff /* bit 11 */ - #define DC_solid_disable 0x0 - #define DC_solid_enable 0x800 - #define DC_arzero_MASK 0xffffefff /* bit 12 */ - #define DC_arzero_disable 0x0 - #define DC_arzero_enable 0x1000 - #define DC_sgnzero_MASK 0xffffdfff /* bit 13 */ - #define DC_sgnzero_disable 0x0 - #define DC_sgnzero_enable 0x2000 - #define DC_shftzero_MASK 0xffffbfff /* bit 14 */ - #define DC_shftzero_disable 0x0 - #define DC_shftzero_enable 0x4000 - #define DC_bop_MASK 0xfff0ffff /* bits 16-19 */ - #define DC_bop_SHIFT 16 - #define DC_trans_MASK 0xff0fffff /* bits 20-23 */ - #define DC_trans_SHIFT 20 - #define DC_bltmod_MASK 0xe1ffffff /* bits 25-28 */ - #define DC_bltmod_bmonolef 0x0 /* val 0, shift 25 */ - #define DC_bltmod_bmonowf 0x8000000 /* val 4, shift 25 */ - #define DC_bltmod_bplan 0x2000000 /* val 1, shift 25 */ - #define DC_bltmod_bfcol 0x4000000 /* val 2, shift 25 */ - #define DC_bltmod_bu32bgr 0x6000000 /* val 3, shift 25 */ - #define DC_bltmod_bu32rgb 0xe000000 /* val 7, shift 25 */ - #define DC_bltmod_bu24bgr 0x16000000 /* val 11, shift 25 */ - #define DC_bltmod_bu24rgb 0x1e000000 /* val 15, shift 25 */ - #define DC_pattern_MASK 0xdfffffff /* bit 29 */ - #define DC_pattern_disable 0x0 - #define DC_pattern_enable 0x20000000 - #define DC_transc_MASK 0xbfffffff /* bit 30 */ - #define DC_transc_disable 0x0 - #define DC_transc_enable 0x40000000 - #define DC_clipdis_MASK 0x7fffffff /* bit 31 */ - #define DC_clipdis_disable 0x0 - #define DC_clipdis_enable 0x80000000 - -#define MGAREG_DWGSYNC 0x2c4c - - #define DS_dwgsyncaddr_MASK 0x3 /* bits 2-31 */ - #define DS_dwgsyncaddr_SHIFT 2 - -#define MGAREG_FCOL 0x1c24 -#define MGAREG_FIFOSTATUS 0x1e10 - - #define FS_fifocount_MASK 0xffffff80 /* bits 0-6 */ - #define FS_fifocount_SHIFT 0 - #define FS_bfull_MASK 0xfffffeff /* bit 8 */ - #define FS_bfull_disable 0x0 - #define FS_bfull_enable 0x100 - #define FS_bempty_MASK 0xfffffdff /* bit 9 */ - #define FS_bempty_disable 0x0 - #define FS_bempty_enable 0x200 - -#define MGAREG_FOGCOL 0x1cf4 -#define MGAREG_FOGSTART 0x1cc4 -#define MGAREG_FOGXINC 0x1cd4 -#define MGAREG_FOGYINC 0x1ce4 -#define MGAREG_FXBNDRY 0x1c84 - - #define XA_fxleft_MASK 0xffff0000 /* bits 0-15 */ - #define XA_fxleft_SHIFT 0 - #define XA_fxright_MASK 0xffff /* bits 16-31 */ - #define XA_fxright_SHIFT 16 - -#define MGAREG_FXLEFT 0x1ca8 -#define MGAREG_FXRIGHT 0x1cac -#define MGAREG_ICLEAR 0x1e18 - - #define IC_softrapiclr_MASK 0xfffffffe /* bit 0 */ - #define IC_softrapiclr_disable 0x0 - #define IC_softrapiclr_enable 0x1 - #define IC_pickiclr_MASK 0xfffffffb /* bit 2 */ - #define IC_pickiclr_disable 0x0 - #define IC_pickiclr_enable 0x4 - #define IC_vlineiclr_MASK 0xffffffdf /* bit 5 */ - #define IC_vlineiclr_disable 0x0 - #define IC_vlineiclr_enable 0x20 - #define IC_wiclr_MASK 0xffffff7f /* bit 7 */ - #define IC_wiclr_disable 0x0 - #define IC_wiclr_enable 0x80 - #define IC_wciclr_MASK 0xfffffeff /* bit 8 */ - #define IC_wciclr_disable 0x0 - #define IC_wciclr_enable 0x100 - -#define MGAREG_IEN 0x1e1c - - #define IE_softrapien_MASK 0xfffffffe /* bit 0 */ - #define IE_softrapien_disable 0x0 - #define IE_softrapien_enable 0x1 - #define IE_pickien_MASK 0xfffffffb /* bit 2 */ - #define IE_pickien_disable 0x0 - #define IE_pickien_enable 0x4 - #define IE_vlineien_MASK 0xffffffdf /* bit 5 */ - #define IE_vlineien_disable 0x0 - #define IE_vlineien_enable 0x20 - #define IE_extien_MASK 0xffffffbf /* bit 6 */ - #define IE_extien_disable 0x0 - #define IE_extien_enable 0x40 - #define IE_wien_MASK 0xffffff7f /* bit 7 */ - #define IE_wien_disable 0x0 - #define IE_wien_enable 0x80 - #define IE_wcien_MASK 0xfffffeff /* bit 8 */ - #define IE_wcien_disable 0x0 - #define IE_wcien_enable 0x100 - -#define MGAREG_LEN 0x1c5c -#define MGAREG_MACCESS 0x1c04 - - #define MA_pwidth_MASK 0xfffffffc /* bits 0-1 */ - #define MA_pwidth_8 0x0 /* val 0, shift 0 */ - #define MA_pwidth_16 0x1 /* val 1, shift 0 */ - #define MA_pwidth_32 0x2 /* val 2, shift 0 */ - #define MA_pwidth_24 0x3 /* val 3, shift 0 */ - #define MA_zwidth_MASK 0xffffffe7 /* bits 3-4 */ - #define MA_zwidth_16 0x0 /* val 0, shift 3 */ - #define MA_zwidth_32 0x8 /* val 1, shift 3 */ - #define MA_zwidth_15 0x10 /* val 2, shift 3 */ - #define MA_zwidth_24 0x18 /* val 3, shift 3 */ - #define MA_memreset_MASK 0xffff7fff /* bit 15 */ - #define MA_memreset_disable 0x0 - #define MA_memreset_enable 0x8000 - #define MA_fogen_MASK 0xfbffffff /* bit 26 */ - #define MA_fogen_disable 0x0 - #define MA_fogen_enable 0x4000000 - #define MA_tlutload_MASK 0xdfffffff /* bit 29 */ - #define MA_tlutload_disable 0x0 - #define MA_tlutload_enable 0x20000000 - #define MA_nodither_MASK 0xbfffffff /* bit 30 */ - #define MA_nodither_disable 0x0 - #define MA_nodither_enable 0x40000000 - #define MA_dit555_MASK 0x7fffffff /* bit 31 */ - #define MA_dit555_disable 0x0 - #define MA_dit555_enable 0x80000000 - -#define MGAREG_MCTLWTST 0x1c08 - - #define MCWS_casltncy_MASK 0xfffffff8 /* bits 0-2 */ - #define MCWS_casltncy_SHIFT 0 - #define MCWS_rrddelay_MASK 0xffffffcf /* bits 4-5 */ - #define MCWS_rcddelay_MASK 0xfffffe7f /* bits 7-8 */ - #define MCWS_rasmin_MASK 0xffffe3ff /* bits 10-12 */ - #define MCWS_rasmin_SHIFT 10 - #define MCWS_rpdelay_MASK 0xffff3fff /* bits 14-15 */ - #define MCWS_wrdelay_MASK 0xfff3ffff /* bits 18-19 */ - #define MCWS_rddelay_MASK 0xffdfffff /* bit 21 */ - #define MCWS_rddelay_disable 0x0 - #define MCWS_rddelay_enable 0x200000 - #define MCWS_smrdelay_MASK 0xfe7fffff /* bits 23-24 */ - #define MCWS_bwcdelay_MASK 0xf3ffffff /* bits 26-27 */ - #define MCWS_bpldelay_MASK 0x1fffffff /* bits 29-31 */ - #define MCWS_bpldelay_SHIFT 29 - -#define MGAREG_MEMRDBK 0x1e44 - - #define MRB_mclkbrd0_MASK 0xfffffff0 /* bits 0-3 */ - #define MRB_mclkbrd0_SHIFT 0 - #define MRB_mclkbrd1_MASK 0xfffffe1f /* bits 5-8 */ - #define MRB_mclkbrd1_SHIFT 5 - #define MRB_strmfctl_MASK 0xff3fffff /* bits 22-23 */ - #define MRB_mrsopcod_MASK 0xe1ffffff /* bits 25-28 */ - #define MRB_mrsopcod_SHIFT 25 - -#define MGAREG_OPMODE 0x1e54 - - #define OM_dmamod_MASK 0xfffffff3 /* bits 2-3 */ - #define OM_dmamod_general 0x0 /* val 0, shift 2 */ - #define OM_dmamod_blit 0x4 /* val 1, shift 2 */ - #define OM_dmamod_vector 0x8 /* val 2, shift 2 */ - #define OM_dmamod_vertex 0xc /* val 3, shift 2 */ - #define OM_dmadatasiz_MASK 0xfffffcff /* bits 8-9 */ - #define OM_dmadatasiz_8 0x0 /* val 0, shift 8 */ - #define OM_dmadatasiz_16 0x100 /* val 1, shift 8 */ - #define OM_dmadatasiz_32 0x200 /* val 2, shift 8 */ - #define OM_dirdatasiz_MASK 0xfffcffff /* bits 16-17 */ - #define OM_dirdatasiz_8 0x0 /* val 0, shift 16 */ - #define OM_dirdatasiz_16 0x10000 /* val 1, shift 16 */ - #define OM_dirdatasiz_32 0x20000 /* val 2, shift 16 */ - -#define MGAREG_PAT0 0x1c10 -#define MGAREG_PAT1 0x1c14 -#define MGAREG_PITCH 0x1c8c - - #define P_iy_MASK 0xffffe000 /* bits 0-12 */ - #define P_iy_SHIFT 0 - #define P_ylin_MASK 0xffff7fff /* bit 15 */ - #define P_ylin_disable 0x0 - #define P_ylin_enable 0x8000 - -#define MGAREG_PLNWT 0x1c1c -#define MGAREG_PRIMADDRESS 0x1e58 - - #define PDCA_primod_MASK 0xfffffffc /* bits 0-1 */ - #define PDCA_primod_general 0x0 /* val 0, shift 0 */ - #define PDCA_primod_blit 0x1 /* val 1, shift 0 */ - #define PDCA_primod_vector 0x2 /* val 2, shift 0 */ - #define PDCA_primod_vertex 0x3 /* val 3, shift 0 */ - #define PDCA_primaddress_MASK 0x3 /* bits 2-31 */ - #define PDCA_primaddress_SHIFT 2 - -#define MGAREG_PRIMEND 0x1e5c - - #define PDEA_primnostart_MASK 0xfffffffe /* bit 0 */ - #define PDEA_primnostart_disable 0x0 - #define PDEA_primnostart_enable 0x1 - #define PDEA_pagpxfer_MASK 0xfffffffd /* bit 1 */ - #define PDEA_pagpxfer_disable 0x0 - #define PDEA_pagpxfer_enable 0x2 - #define PDEA_primend_MASK 0x3 /* bits 2-31 */ - #define PDEA_primend_SHIFT 2 - -#define MGAREG_PRIMPTR 0x1e50 - - #define PLS_primptren0_MASK 0xfffffffe /* bit 0 */ - #define PLS_primptren0_disable 0x0 - #define PLS_primptren0_enable 0x1 - #define PLS_primptren1_MASK 0xfffffffd /* bit 1 */ - #define PLS_primptren1_disable 0x0 - #define PLS_primptren1_enable 0x2 - #define PLS_primptr_MASK 0x7 /* bits 3-31 */ - #define PLS_primptr_SHIFT 3 - -#define MGAREG_RST 0x1e40 - - #define R_softreset_MASK 0xfffffffe /* bit 0 */ - #define R_softreset_disable 0x0 - #define R_softreset_enable 0x1 - #define R_softextrst_MASK 0xfffffffd /* bit 1 */ - #define R_softextrst_disable 0x0 - #define R_softextrst_enable 0x2 - -#define MGAREG_SECADDRESS 0x2c40 - - #define SDCA_secmod_MASK 0xfffffffc /* bits 0-1 */ - #define SDCA_secmod_general 0x0 /* val 0, shift 0 */ - #define SDCA_secmod_blit 0x1 /* val 1, shift 0 */ - #define SDCA_secmod_vector 0x2 /* val 2, shift 0 */ - #define SDCA_secmod_vertex 0x3 /* val 3, shift 0 */ - #define SDCA_secaddress_MASK 0x3 /* bits 2-31 */ - #define SDCA_secaddress_SHIFT 2 - -#define MGAREG_SECEND 0x2c44 - - #define SDEA_sagpxfer_MASK 0xfffffffd /* bit 1 */ - #define SDEA_sagpxfer_disable 0x0 - #define SDEA_sagpxfer_enable 0x2 - #define SDEA_secend_MASK 0x3 /* bits 2-31 */ - #define SDEA_secend_SHIFT 2 - -#define MGAREG_SETUPADDRESS 0x2cd0 - - #define SETADD_mode_MASK 0xfffffffc /* bits 0-1 */ - #define SETADD_mode_vertlist 0x0 /* val 0, shift 0 */ - #define SETADD_address_MASK 0x3 /* bits 2-31 */ - #define SETADD_address_SHIFT 2 - -#define MGAREG_SETUPEND 0x2cd4 - - #define SETEND_agpxfer_MASK 0xfffffffd /* bit 1 */ - #define SETEND_agpxfer_disable 0x0 - #define SETEND_agpxfer_enable 0x2 - #define SETEND_address_MASK 0x3 /* bits 2-31 */ - #define SETEND_address_SHIFT 2 - -#define MGAREG_SGN 0x1c58 - - #define S_sdydxl_MASK 0xfffffffe /* bit 0 */ - #define S_sdydxl_y 0x0 - #define S_sdydxl_x 0x1 - #define S_scanleft_MASK 0xfffffffe /* bit 0 */ - #define S_scanleft_disable 0x0 - #define S_scanleft_enable 0x1 - #define S_sdxl_MASK 0xfffffffd /* bit 1 */ - #define S_sdxl_pos 0x0 - #define S_sdxl_neg 0x2 - #define S_sdy_MASK 0xfffffffb /* bit 2 */ - #define S_sdy_pos 0x0 - #define S_sdy_neg 0x4 - #define S_sdxr_MASK 0xffffffdf /* bit 5 */ - #define S_sdxr_pos 0x0 - #define S_sdxr_neg 0x20 - #define S_brkleft_MASK 0xfffffeff /* bit 8 */ - #define S_brkleft_disable 0x0 - #define S_brkleft_enable 0x100 - #define S_errorinit_MASK 0x7fffffff /* bit 31 */ - #define S_errorinit_disable 0x0 - #define S_errorinit_enable 0x80000000 - -#define MGAREG_SHIFT 0x1c50 - - #define FSC_x_off_MASK 0xfffffff0 /* bits 0-3 */ - #define FSC_x_off_SHIFT 0 - #define FSC_funcnt_MASK 0xffffff80 /* bits 0-6 */ - #define FSC_funcnt_SHIFT 0 - #define FSC_y_off_MASK 0xffffff8f /* bits 4-6 */ - #define FSC_y_off_SHIFT 4 - #define FSC_funoff_MASK 0xffc0ffff /* bits 16-21 */ - #define FSC_funoff_SHIFT 16 - #define FSC_stylelen_MASK 0xffc0ffff /* bits 16-21 */ - #define FSC_stylelen_SHIFT 16 - -#define MGAREG_SOFTRAP 0x2c48 - - #define STH_softraphand_MASK 0x3 /* bits 2-31 */ - #define STH_softraphand_SHIFT 2 - -#define MGAREG_SPECBSTART 0x2c98 -#define MGAREG_SPECBXINC 0x2c9c -#define MGAREG_SPECBYINC 0x2ca0 -#define MGAREG_SPECGSTART 0x2c8c -#define MGAREG_SPECGXINC 0x2c90 -#define MGAREG_SPECGYINC 0x2c94 -#define MGAREG_SPECRSTART 0x2c80 -#define MGAREG_SPECRXINC 0x2c84 -#define MGAREG_SPECRYINC 0x2c88 -#define MGAREG_SRC0 0x1c30 -#define MGAREG_SRC1 0x1c34 -#define MGAREG_SRC2 0x1c38 -#define MGAREG_SRC3 0x1c3c -#define MGAREG_SRCORG 0x2cb4 - - #define SO_srcmap_MASK 0xfffffffe /* bit 0 */ - #define SO_srcmap_fb 0x0 - #define SO_srcmap_sys 0x1 - #define SO_srcacc_MASK 0xfffffffd /* bit 1 */ - #define SO_srcacc_pci 0x0 - #define SO_srcacc_agp 0x2 - #define SO_srcorg_MASK 0x7 /* bits 3-31 */ - #define SO_srcorg_SHIFT 3 - -#define MGAREG_STATUS 0x1e14 - - #define STAT_softrapen_MASK 0xfffffffe /* bit 0 */ - #define STAT_softrapen_disable 0x0 - #define STAT_softrapen_enable 0x1 - #define STAT_pickpen_MASK 0xfffffffb /* bit 2 */ - #define STAT_pickpen_disable 0x0 - #define STAT_pickpen_enable 0x4 - #define STAT_vsyncsts_MASK 0xfffffff7 /* bit 3 */ - #define STAT_vsyncsts_disable 0x0 - #define STAT_vsyncsts_enable 0x8 - #define STAT_vsyncpen_MASK 0xffffffef /* bit 4 */ - #define STAT_vsyncpen_disable 0x0 - #define STAT_vsyncpen_enable 0x10 - #define STAT_vlinepen_MASK 0xffffffdf /* bit 5 */ - #define STAT_vlinepen_disable 0x0 - #define STAT_vlinepen_enable 0x20 - #define STAT_extpen_MASK 0xffffffbf /* bit 6 */ - #define STAT_extpen_disable 0x0 - #define STAT_extpen_enable 0x40 - #define STAT_wpen_MASK 0xffffff7f /* bit 7 */ - #define STAT_wpen_disable 0x0 - #define STAT_wpen_enable 0x80 - #define STAT_wcpen_MASK 0xfffffeff /* bit 8 */ - #define STAT_wcpen_disable 0x0 - #define STAT_wcpen_enable 0x100 - #define STAT_dwgengsts_MASK 0xfffeffff /* bit 16 */ - #define STAT_dwgengsts_disable 0x0 - #define STAT_dwgengsts_enable 0x10000 - #define STAT_endprdmasts_MASK 0xfffdffff /* bit 17 */ - #define STAT_endprdmasts_disable 0x0 - #define STAT_endprdmasts_enable 0x20000 - #define STAT_wbusy_MASK 0xfffbffff /* bit 18 */ - #define STAT_wbusy_disable 0x0 - #define STAT_wbusy_enable 0x40000 - #define STAT_swflag_MASK 0xfffffff /* bits 28-31 */ - #define STAT_swflag_SHIFT 28 - -#define MGAREG_STENCIL 0x2cc8 - - #define S_sref_MASK 0xffffff00 /* bits 0-7 */ - #define S_sref_SHIFT 0 - #define S_smsk_MASK 0xffff00ff /* bits 8-15 */ - #define S_smsk_SHIFT 8 - #define S_swtmsk_MASK 0xff00ffff /* bits 16-23 */ - #define S_swtmsk_SHIFT 16 - -#define MGAREG_STENCILCTL 0x2ccc - - #define SC_smode_MASK 0xfffffff8 /* bits 0-2 */ - #define SC_smode_salways 0x0 /* val 0, shift 0 */ - #define SC_smode_snever 0x1 /* val 1, shift 0 */ - #define SC_smode_se 0x2 /* val 2, shift 0 */ - #define SC_smode_sne 0x3 /* val 3, shift 0 */ - #define SC_smode_slt 0x4 /* val 4, shift 0 */ - #define SC_smode_slte 0x5 /* val 5, shift 0 */ - #define SC_smode_sgt 0x6 /* val 6, shift 0 */ - #define SC_smode_sgte 0x7 /* val 7, shift 0 */ - #define SC_sfailop_MASK 0xffffffc7 /* bits 3-5 */ - #define SC_sfailop_keep 0x0 /* val 0, shift 3 */ - #define SC_sfailop_zero 0x8 /* val 1, shift 3 */ - #define SC_sfailop_replace 0x10 /* val 2, shift 3 */ - #define SC_sfailop_incrsat 0x18 /* val 3, shift 3 */ - #define SC_sfailop_decrsat 0x20 /* val 4, shift 3 */ - #define SC_sfailop_invert 0x28 /* val 5, shift 3 */ - #define SC_sfailop_incr 0x30 /* val 6, shift 3 */ - #define SC_sfailop_decr 0x38 /* val 7, shift 3 */ - #define SC_szfailop_MASK 0xfffffe3f /* bits 6-8 */ - #define SC_szfailop_keep 0x0 /* val 0, shift 6 */ - #define SC_szfailop_zero 0x40 /* val 1, shift 6 */ - #define SC_szfailop_replace 0x80 /* val 2, shift 6 */ - #define SC_szfailop_incrsat 0xc0 /* val 3, shift 6 */ - #define SC_szfailop_decrsat 0x100 /* val 4, shift 6 */ - #define SC_szfailop_invert 0x140 /* val 5, shift 6 */ - #define SC_szfailop_incr 0x180 /* val 6, shift 6 */ - #define SC_szfailop_decr 0x1c0 /* val 7, shift 6 */ - #define SC_szpassop_MASK 0xfffff1ff /* bits 9-11 */ - #define SC_szpassop_keep 0x0 /* val 0, shift 9 */ - #define SC_szpassop_zero 0x200 /* val 1, shift 9 */ - #define SC_szpassop_replace 0x400 /* val 2, shift 9 */ - #define SC_szpassop_incrsat 0x600 /* val 3, shift 9 */ - #define SC_szpassop_decrsat 0x800 /* val 4, shift 9 */ - #define SC_szpassop_invert 0xa00 /* val 5, shift 9 */ - #define SC_szpassop_incr 0xc00 /* val 6, shift 9 */ - #define SC_szpassop_decr 0xe00 /* val 7, shift 9 */ - -#define MGAREG_TDUALSTAGE0 0x2cf8 - - #define TD0_color_arg2_MASK 0xfffffffc /* bits 0-1 */ - #define TD0_color_arg2_diffuse 0x0 /* val 0, shift 0 */ - #define TD0_color_arg2_specular 0x1 /* val 1, shift 0 */ - #define TD0_color_arg2_fcol 0x2 /* val 2, shift 0 */ - #define TD0_color_arg2_prevstage 0x3 /* val 3, shift 0 */ - #define TD0_color_alpha_MASK 0xffffffe3 /* bits 2-4 */ - #define TD0_color_alpha_diffuse 0x0 /* val 0, shift 2 */ - #define TD0_color_alpha_fcol 0x4 /* val 1, shift 2 */ - #define TD0_color_alpha_currtex 0x8 /* val 2, shift 2 */ - #define TD0_color_alpha_prevtex 0xc /* val 3, shift 2 */ - #define TD0_color_alpha_prevstage 0x10 /* val 4, shift 2 */ - #define TD0_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */ - #define TD0_color_arg1_replicatealpha_disable 0x0 - #define TD0_color_arg1_replicatealpha_enable 0x20 - #define TD0_color_arg1_inv_MASK 0xffffffbf /* bit 6 */ - #define TD0_color_arg1_inv_disable 0x0 - #define TD0_color_arg1_inv_enable 0x40 - #define TD0_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */ - #define TD0_color_arg2_replicatealpha_disable 0x0 - #define TD0_color_arg2_replicatealpha_enable 0x80 - #define TD0_color_arg2_inv_MASK 0xfffffeff /* bit 8 */ - #define TD0_color_arg2_inv_disable 0x0 - #define TD0_color_arg2_inv_enable 0x100 - #define TD0_color_alpha1inv_MASK 0xfffffdff /* bit 9 */ - #define TD0_color_alpha1inv_disable 0x0 - #define TD0_color_alpha1inv_enable 0x200 - #define TD0_color_alpha2inv_MASK 0xfffffbff /* bit 10 */ - #define TD0_color_alpha2inv_disable 0x0 - #define TD0_color_alpha2inv_enable 0x400 - #define TD0_color_arg1mul_MASK 0xfffff7ff /* bit 11 */ - #define TD0_color_arg1mul_arg1 0x0 /* val 0, shift 11 */ - #define TD0_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */ - #define TD0_color_arg2mul_MASK 0xffffefff /* bit 12 */ - #define TD0_color_arg2mul_arg2 0x0 /* val 0, shift 12 */ - #define TD0_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */ - #define TD0_color_arg1add_MASK 0xffffdfff /* bit 13 */ - #define TD0_color_arg1add_arg1 0x0 /* val 0, shift 13 */ - #define TD0_color_arg1add_mulout 0x2000 /* val 1, shift 13 */ - #define TD0_color_arg2add_MASK 0xffffbfff /* bit 14 */ - #define TD0_color_arg2add_arg2 0x0 /* val 0, shift 14 */ - #define TD0_color_arg2add_mulout 0x4000 /* val 1, shift 14 */ - #define TD0_color_modbright_MASK 0xfffe7fff /* bits 15-16 */ - #define TD0_color_modbright_disable 0x0 /* val 0, shift 15 */ - #define TD0_color_modbright_2x 0x8000 /* val 1, shift 15 */ - #define TD0_color_modbright_4x 0x10000 /* val 2, shift 15 */ - #define TD0_color_add_MASK 0xfffdffff /* bit 17 */ - #define TD0_color_add_sub 0x0 /* val 0, shift 17 */ - #define TD0_color_add_add 0x20000 /* val 1, shift 17 */ - #define TD0_color_add2x_MASK 0xfffbffff /* bit 18 */ - #define TD0_color_add2x_disable 0x0 - #define TD0_color_add2x_enable 0x40000 - #define TD0_color_addbias_MASK 0xfff7ffff /* bit 19 */ - #define TD0_color_addbias_disable 0x0 - #define TD0_color_addbias_enable 0x80000 - #define TD0_color_blend_MASK 0xffefffff /* bit 20 */ - #define TD0_color_blend_disable 0x0 - #define TD0_color_blend_enable 0x100000 - #define TD0_color_sel_MASK 0xff9fffff /* bits 21-22 */ - #define TD0_color_sel_arg1 0x0 /* val 0, shift 21 */ - #define TD0_color_sel_arg2 0x200000 /* val 1, shift 21 */ - #define TD0_color_sel_addout 0x400000 /* val 2, shift 21 */ - #define TD0_color_sel_mulout 0x600000 /* val 3, shift 21 */ - #define TD0_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */ - #define TD0_alpha_arg1_inv_disable 0x0 - #define TD0_alpha_arg1_inv_enable 0x800000 - #define TD0_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */ - #define TD0_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */ - #define TD0_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */ - #define TD0_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */ - #define TD0_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */ - #define TD0_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */ - #define TD0_alpha_arg2_inv_disable 0x0 - #define TD0_alpha_arg2_inv_enable 0x4000000 - #define TD0_alpha_add_MASK 0xf7ffffff /* bit 27 */ - #define TD0_alpha_add_disable 0x0 - #define TD0_alpha_add_enable 0x8000000 - #define TD0_alpha_addbias_MASK 0xefffffff /* bit 28 */ - #define TD0_alpha_addbias_disable 0x0 - #define TD0_alpha_addbias_enable 0x10000000 - #define TD0_alpha_add2x_MASK 0xdfffffff /* bit 29 */ - #define TD0_alpha_add2x_disable 0x0 - #define TD0_alpha_add2x_enable 0x20000000 - #define TD0_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */ - #define TD0_alpha_modbright_disable 0x0 /* val 0, shift 28 */ - #define TD0_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */ - #define TD0_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */ - #define TD0_alpha_sel_MASK 0x3fffffff /* bits 30-31 */ - #define TD0_alpha_sel_arg1 0x0 /* val 0, shift 30 */ - #define TD0_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */ - #define TD0_alpha_sel_addout 0x80000000 /* val 2, shift 30 */ - #define TD0_alpha_sel_mulout 0xc0000000 /* val 3, shift 30 */ - -#define MGAREG_TDUALSTAGE1 0x2cfc - - #define TD1_color_arg2_MASK 0xfffffffc /* bits 0-1 */ - #define TD1_color_arg2_diffuse 0x0 /* val 0, shift 0 */ - #define TD1_color_arg2_specular 0x1 /* val 1, shift 0 */ - #define TD1_color_arg2_fcol 0x2 /* val 2, shift 0 */ - #define TD1_color_arg2_prevstage 0x3 /* val 3, shift 0 */ - #define TD1_color_alpha_MASK 0xffffffe3 /* bits 2-4 */ - #define TD1_color_alpha_diffuse 0x0 /* val 0, shift 2 */ - #define TD1_color_alpha_fcol 0x4 /* val 1, shift 2 */ - #define TD1_color_alpha_currtex 0x8 /* val 2, shift 2 */ - #define TD1_color_alpha_prevtex 0xc /* val 3, shift 2 */ - #define TD1_color_alpha_prevstage 0x10 /* val 4, shift 2 */ - #define TD1_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */ - #define TD1_color_arg1_replicatealpha_disable 0x0 - #define TD1_color_arg1_replicatealpha_enable 0x20 - #define TD1_color_arg1_inv_MASK 0xffffffbf /* bit 6 */ - #define TD1_color_arg1_inv_disable 0x0 - #define TD1_color_arg1_inv_enable 0x40 - #define TD1_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */ - #define TD1_color_arg2_replicatealpha_disable 0x0 - #define TD1_color_arg2_replicatealpha_enable 0x80 - #define TD1_color_arg2_inv_MASK 0xfffffeff /* bit 8 */ - #define TD1_color_arg2_inv_disable 0x0 - #define TD1_color_arg2_inv_enable 0x100 - #define TD1_color_alpha1inv_MASK 0xfffffdff /* bit 9 */ - #define TD1_color_alpha1inv_disable 0x0 - #define TD1_color_alpha1inv_enable 0x200 - #define TD1_color_alpha2inv_MASK 0xfffffbff /* bit 10 */ - #define TD1_color_alpha2inv_disable 0x0 - #define TD1_color_alpha2inv_enable 0x400 - #define TD1_color_arg1mul_MASK 0xfffff7ff /* bit 11 */ - #define TD1_color_arg1mul_arg1 0x0 /* val 0, shift 11 */ - #define TD1_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */ - #define TD1_color_arg2mul_MASK 0xffffefff /* bit 12 */ - #define TD1_color_arg2mul_arg2 0x0 /* val 0, shift 12 */ - #define TD1_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */ - #define TD1_color_arg1add_MASK 0xffffdfff /* bit 13 */ - #define TD1_color_arg1add_arg1 0x0 /* val 0, shift 13 */ - #define TD1_color_arg1add_mulout 0x2000 /* val 1, shift 13 */ - #define TD1_color_arg2add_MASK 0xffffbfff /* bit 14 */ - #define TD1_color_arg2add_arg2 0x0 /* val 0, shift 14 */ - #define TD1_color_arg2add_mulout 0x4000 /* val 1, shift 14 */ - #define TD1_color_modbright_MASK 0xfffe7fff /* bits 15-16 */ - #define TD1_color_modbright_disable 0x0 /* val 0, shift 15 */ - #define TD1_color_modbright_2x 0x8000 /* val 1, shift 15 */ - #define TD1_color_modbright_4x 0x10000 /* val 2, shift 15 */ - #define TD1_color_add_MASK 0xfffdffff /* bit 17 */ - #define TD1_color_add_sub 0x0 /* val 0, shift 17 */ - #define TD1_color_add_add 0x20000 /* val 1, shift 17 */ - #define TD1_color_add2x_MASK 0xfffbffff /* bit 18 */ - #define TD1_color_add2x_disable 0x0 - #define TD1_color_add2x_enable 0x40000 - #define TD1_color_addbias_MASK 0xfff7ffff /* bit 19 */ - #define TD1_color_addbias_disable 0x0 - #define TD1_color_addbias_enable 0x80000 - #define TD1_color_blend_MASK 0xffefffff /* bit 20 */ - #define TD1_color_blend_disable 0x0 - #define TD1_color_blend_enable 0x100000 - #define TD1_color_sel_MASK 0xff9fffff /* bits 21-22 */ - #define TD1_color_sel_arg1 0x0 /* val 0, shift 21 */ - #define TD1_color_sel_arg2 0x200000 /* val 1, shift 21 */ - #define TD1_color_sel_addout 0x400000 /* val 2, shift 21 */ - #define TD1_color_sel_mulout 0x600000 /* val 3, shift 21 */ - #define TD1_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */ - #define TD1_alpha_arg1_inv_disable 0x0 - #define TD1_alpha_arg1_inv_enable 0x800000 - #define TD1_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */ - #define TD1_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */ - #define TD1_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */ - #define TD1_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */ - #define TD1_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */ - #define TD1_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */ - #define TD1_alpha_arg2_inv_disable 0x0 - #define TD1_alpha_arg2_inv_enable 0x4000000 - #define TD1_alpha_add_MASK 0xf7ffffff /* bit 27 */ - #define TD1_alpha_add_disable 0x0 - #define TD1_alpha_add_enable 0x8000000 - #define TD1_alpha_addbias_MASK 0xefffffff /* bit 28 */ - #define TD1_alpha_addbias_disable 0x0 - #define TD1_alpha_addbias_enable 0x10000000 - #define TD1_alpha_add2x_MASK 0xdfffffff /* bit 29 */ - #define TD1_alpha_add2x_disable 0x0 - #define TD1_alpha_add2x_enable 0x20000000 - #define TD1_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */ - #define TD1_alpha_modbright_disable 0x0 /* val 0, shift 28 */ - #define TD1_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */ - #define TD1_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */ - #define TD1_alpha_sel_MASK 0x3fffffff /* bits 30-31 */ - #define TD1_alpha_sel_arg1 0x0 /* val 0, shift 30 */ - #define TD1_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */ - #define TD1_alpha_sel_addout 0x80000000 /* val 2, shift 30 */ - #define TD1_alpha_sel_mulout 0xc0000000 /* val 3, shift 30 */ - -#define MGAREG_TEST0 0x1e48 - - #define TST_ramtsten_MASK 0xfffffffe /* bit 0 */ - #define TST_ramtsten_disable 0x0 - #define TST_ramtsten_enable 0x1 - #define TST_ramtstdone_MASK 0xfffffffd /* bit 1 */ - #define TST_ramtstdone_disable 0x0 - #define TST_ramtstdone_enable 0x2 - #define TST_wramtstpass_MASK 0xfffffffb /* bit 2 */ - #define TST_wramtstpass_disable 0x0 - #define TST_wramtstpass_enable 0x4 - #define TST_tcachetstpass_MASK 0xfffffff7 /* bit 3 */ - #define TST_tcachetstpass_disable 0x0 - #define TST_tcachetstpass_enable 0x8 - #define TST_tluttstpass_MASK 0xffffffef /* bit 4 */ - #define TST_tluttstpass_disable 0x0 - #define TST_tluttstpass_enable 0x10 - #define TST_luttstpass_MASK 0xffffffdf /* bit 5 */ - #define TST_luttstpass_disable 0x0 - #define TST_luttstpass_enable 0x20 - #define TST_besramtstpass_MASK 0xffffffbf /* bit 6 */ - #define TST_besramtstpass_disable 0x0 - #define TST_besramtstpass_enable 0x40 - #define TST_ringen_MASK 0xfffffeff /* bit 8 */ - #define TST_ringen_disable 0x0 - #define TST_ringen_enable 0x100 - #define TST_apllbyp_MASK 0xfffffdff /* bit 9 */ - #define TST_apllbyp_disable 0x0 - #define TST_apllbyp_enable 0x200 - #define TST_hiten_MASK 0xfffffbff /* bit 10 */ - #define TST_hiten_disable 0x0 - #define TST_hiten_enable 0x400 - #define TST_tmode_MASK 0xffffc7ff /* bits 11-13 */ - #define TST_tmode_SHIFT 11 - #define TST_tclksel_MASK 0xfffe3fff /* bits 14-16 */ - #define TST_tclksel_SHIFT 14 - #define TST_ringcnten_MASK 0xfffdffff /* bit 17 */ - #define TST_ringcnten_disable 0x0 - #define TST_ringcnten_enable 0x20000 - #define TST_ringcnt_MASK 0xc003ffff /* bits 18-29 */ - #define TST_ringcnt_SHIFT 18 - #define TST_ringcntclksl_MASK 0xbfffffff /* bit 30 */ - #define TST_ringcntclksl_disable 0x0 - #define TST_ringcntclksl_enable 0x40000000 - #define TST_biosboot_MASK 0x7fffffff /* bit 31 */ - #define TST_biosboot_disable 0x0 - #define TST_biosboot_enable 0x80000000 - -#define MGAREG_TEXBORDERCOL 0x2c5c -#define MGAREG_TEXCTL 0x2c30 - - #define TMC_tformat_MASK 0xfffffff0 /* bits 0-3 */ - #define TMC_tformat_tw4 0x0 /* val 0, shift 0 */ - #define TMC_tformat_tw8 0x1 /* val 1, shift 0 */ - #define TMC_tformat_tw15 0x2 /* val 2, shift 0 */ - #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 - #define TMC_tpitchlin_enable 0x100 - #define TMC_tpitchext_MASK 0xfff001ff /* bits 9-19 */ - #define TMC_tpitchext_SHIFT 9 - #define TMC_tpitch_MASK 0xfff8ffff /* bits 16-18 */ - #define TMC_tpitch_SHIFT 16 - #define TMC_owalpha_MASK 0xffbfffff /* bit 22 */ - #define TMC_owalpha_disable 0x0 - #define TMC_owalpha_enable 0x400000 - #define TMC_azeroextend_MASK 0xff7fffff /* bit 23 */ - #define TMC_azeroextend_disable 0x0 - #define TMC_azeroextend_enable 0x800000 - #define TMC_decalckey_MASK 0xfeffffff /* bit 24 */ - #define TMC_decalckey_disable 0x0 - #define TMC_decalckey_enable 0x1000000 - #define TMC_takey_MASK 0xfdffffff /* bit 25 */ - #define TMC_takey_0 0x0 - #define TMC_takey_1 0x2000000 - #define TMC_tamask_MASK 0xfbffffff /* bit 26 */ - #define TMC_tamask_0 0x0 - #define TMC_tamask_1 0x4000000 - #define TMC_clampv_MASK 0xf7ffffff /* bit 27 */ - #define TMC_clampv_disable 0x0 - #define TMC_clampv_enable 0x8000000 - #define TMC_clampu_MASK 0xefffffff /* bit 28 */ - #define TMC_clampu_disable 0x0 - #define TMC_clampu_enable 0x10000000 - #define TMC_tmodulate_MASK 0xdfffffff /* bit 29 */ - #define TMC_tmodulate_disable 0x0 - #define TMC_tmodulate_enable 0x20000000 - #define TMC_strans_MASK 0xbfffffff /* bit 30 */ - #define TMC_strans_disable 0x0 - #define TMC_strans_enable 0x40000000 - #define TMC_itrans_MASK 0x7fffffff /* bit 31 */ - #define TMC_itrans_disable 0x0 - #define TMC_itrans_enable 0x80000000 - -#define MGAREG_TEXCTL2 0x2c3c - - #define TMC_decalblend_MASK 0xfffffffe /* bit 0 */ - #define TMC_decalblend_disable 0x0 - #define TMC_decalblend_enable 0x1 - #define TMC_idecal_MASK 0xfffffffd /* bit 1 */ - #define TMC_idecal_disable 0x0 - #define TMC_idecal_enable 0x2 - #define TMC_decaldis_MASK 0xfffffffb /* bit 2 */ - #define TMC_decaldis_disable 0x0 - #define TMC_decaldis_enable 0x4 - #define TMC_ckstransdis_MASK 0xffffffef /* bit 4 */ - #define TMC_ckstransdis_disable 0x0 - #define TMC_ckstransdis_enable 0x10 - #define TMC_borderen_MASK 0xffffffdf /* bit 5 */ - #define TMC_borderen_disable 0x0 - #define TMC_borderen_enable 0x20 - #define TMC_specen_MASK 0xffffffbf /* bit 6 */ - #define TMC_specen_disable 0x0 - #define TMC_specen_enable 0x40 - #define TMC_dualtex_MASK 0xffffff7f /* bit 7 */ - #define TMC_dualtex_disable 0x0 - #define TMC_dualtex_enable 0x80 - #define TMC_tablefog_MASK 0xfffffeff /* bit 8 */ - #define TMC_tablefog_disable 0x0 - #define TMC_tablefog_enable 0x100 - #define TMC_bumpmap_MASK 0xfffffdff /* bit 9 */ - #define TMC_bumpmap_disable 0x0 - #define TMC_bumpmap_enable 0x200 - #define TMC_map1_MASK 0x7fffffff /* bit 31 */ - #define TMC_map1_disable 0x0 - #define TMC_map1_enable 0x80000000 - -#define MGAREG_TEXFILTER 0x2c58 - - #define TF_minfilter_MASK 0xfffffff0 /* bits 0-3 */ - #define TF_minfilter_nrst 0x0 /* val 0, shift 0 */ - #define TF_minfilter_bilin 0x2 /* val 2, shift 0 */ - #define TF_minfilter_cnst 0x3 /* val 3, shift 0 */ - #define TF_minfilter_mm1s 0x8 /* val 8, shift 0 */ - #define TF_minfilter_mm2s 0x9 /* val 9, shift 0 */ - #define TF_minfilter_mm4s 0xa /* val 10, shift 0 */ - #define TF_minfilter_mm8s 0xc /* val 12, shift 0 */ - #define TF_magfilter_MASK 0xffffff0f /* bits 4-7 */ - #define TF_magfilter_nrst 0x0 /* val 0, shift 4 */ - #define TF_magfilter_bilin 0x20 /* val 2, shift 4 */ - #define TF_magfilter_cnst 0x30 /* val 3, shift 4 */ - #define TF_avgstride_MASK 0xfff7ffff /* bit 19 */ - #define TF_avgstride_disable 0x0 - #define TF_avgstride_enable 0x80000 - #define TF_filteralpha_MASK 0xffefffff /* bit 20 */ - #define TF_filteralpha_disable 0x0 - #define TF_filteralpha_enable 0x100000 - #define TF_fthres_MASK 0xe01fffff /* bits 21-28 */ - #define TF_fthres_SHIFT 21 - #define TF_mapnb_MASK 0x1fffffff /* bits 29-31 */ - #define TF_mapnb_SHIFT 29 - -#define MGAREG_TEXHEIGHT 0x2c2c - - #define TH_th_MASK 0xffffffc0 /* bits 0-5 */ - #define TH_th_SHIFT 0 - #define TH_rfh_MASK 0xffff81ff /* bits 9-14 */ - #define TH_rfh_SHIFT 9 - #define TH_thmask_MASK 0xe003ffff /* bits 18-28 */ - #define TH_thmask_SHIFT 18 - -#define MGAREG_TEXORG 0x2c24 - - #define TO_texorgmap_MASK 0xfffffffe /* bit 0 */ - #define TO_texorgmap_fb 0x0 - #define TO_texorgmap_sys 0x1 - #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 - -#define MGAREG_TEXORG1 0x2ca4 -#define MGAREG_TEXORG2 0x2ca8 -#define MGAREG_TEXORG3 0x2cac -#define MGAREG_TEXORG4 0x2cb0 -#define MGAREG_TEXTRANS 0x2c34 - - #define TT_tckey_MASK 0xffff0000 /* bits 0-15 */ - #define TT_tckey_SHIFT 0 - #define TT_tkmask_MASK 0xffff /* bits 16-31 */ - #define TT_tkmask_SHIFT 16 - -#define MGAREG_TEXTRANSHIGH 0x2c38 - - #define TT_tckeyh_MASK 0xffff0000 /* bits 0-15 */ - #define TT_tckeyh_SHIFT 0 - #define TT_tkmaskh_MASK 0xffff /* bits 16-31 */ - #define TT_tkmaskh_SHIFT 16 - -#define MGAREG_TEXWIDTH 0x2c28 - - #define TW_tw_MASK 0xffffffc0 /* bits 0-5 */ - #define TW_tw_SHIFT 0 - #define TW_rfw_MASK 0xffff81ff /* bits 9-14 */ - #define TW_rfw_SHIFT 9 - #define TW_twmask_MASK 0xe003ffff /* bits 18-28 */ - #define TW_twmask_SHIFT 18 - -#define MGAREG_TMR0 0x2c00 -#define MGAREG_TMR1 0x2c04 -#define MGAREG_TMR2 0x2c08 -#define MGAREG_TMR3 0x2c0c -#define MGAREG_TMR4 0x2c10 -#define MGAREG_TMR5 0x2c14 -#define MGAREG_TMR6 0x2c18 -#define MGAREG_TMR7 0x2c1c -#define MGAREG_TMR8 0x2c20 -#define MGAREG_VBIADDR0 0x3e08 -#define MGAREG_VBIADDR1 0x3e0c -#define MGAREG_VCOUNT 0x1e20 -#define MGAREG_WACCEPTSEQ 0x1dd4 - - #define WAS_seqdst0_MASK 0xffffffc0 /* bits 0-5 */ - #define WAS_seqdst0_SHIFT 0 - #define WAS_seqdst1_MASK 0xfffff03f /* bits 6-11 */ - #define WAS_seqdst1_SHIFT 6 - #define WAS_seqdst2_MASK 0xfffc0fff /* bits 12-17 */ - #define WAS_seqdst2_SHIFT 12 - #define WAS_seqdst3_MASK 0xff03ffff /* bits 18-23 */ - #define WAS_seqdst3_SHIFT 18 - #define WAS_seqlen_MASK 0xfcffffff /* bits 24-25 */ - #define WAS_wfirsttag_MASK 0xfbffffff /* bit 26 */ - #define WAS_wfirsttag_disable 0x0 - #define WAS_wfirsttag_enable 0x4000000 - #define WAS_wsametag_MASK 0xf7ffffff /* bit 27 */ - #define WAS_wsametag_disable 0x0 - #define WAS_wsametag_enable 0x8000000 - #define WAS_seqoff_MASK 0xefffffff /* bit 28 */ - #define WAS_seqoff_disable 0x0 - #define WAS_seqoff_enable 0x10000000 - -#define MGAREG_WCODEADDR 0x1e6c - - #define WMA_wcodeaddr_MASK 0xff /* bits 8-31 */ - #define WMA_wcodeaddr_SHIFT 8 - -#define MGAREG_WFLAG 0x1dc4 - - #define WF_walustsflag_MASK 0xffffff00 /* bits 0-7 */ - #define WF_walustsflag_SHIFT 0 - #define WF_walucfgflag_MASK 0xffff00ff /* bits 8-15 */ - #define WF_walucfgflag_SHIFT 8 - #define WF_wprgflag_MASK 0xffff /* bits 16-31 */ - #define WF_wprgflag_SHIFT 16 - -#define MGAREG_WFLAG1 0x1de0 - - #define WF1_walustsflag1_MASK 0xffffff00 /* bits 0-7 */ - #define WF1_walustsflag1_SHIFT 0 - #define WF1_walucfgflag1_MASK 0xffff00ff /* bits 8-15 */ - #define WF1_walucfgflag1_SHIFT 8 - #define WF1_wprgflag1_MASK 0xffff /* bits 16-31 */ - #define WF1_wprgflag1_SHIFT 16 - -#define MGAREG_WFLAGNB 0x1e64 -#define MGAREG_WFLAGNB1 0x1e08 -#define MGAREG_WGETMSB 0x1dc8 - - #define WGV_wgetmsbmin_MASK 0xffffffe0 /* bits 0-4 */ - #define WGV_wgetmsbmin_SHIFT 0 - #define WGV_wgetmsbmax_MASK 0xffffe0ff /* bits 8-12 */ - #define WGV_wgetmsbmax_SHIFT 8 - #define WGV_wbrklefttop_MASK 0xfffeffff /* bit 16 */ - #define WGV_wbrklefttop_disable 0x0 - #define WGV_wbrklefttop_enable 0x10000 - #define WGV_wfastcrop_MASK 0xfffdffff /* bit 17 */ - #define WGV_wfastcrop_disable 0x0 - #define WGV_wfastcrop_enable 0x20000 - #define WGV_wcentersnap_MASK 0xfffbffff /* bit 18 */ - #define WGV_wcentersnap_disable 0x0 - #define WGV_wcentersnap_enable 0x40000 - #define WGV_wbrkrighttop_MASK 0xfff7ffff /* bit 19 */ - #define WGV_wbrkrighttop_disable 0x0 - #define WGV_wbrkrighttop_enable 0x80000 - -#define MGAREG_WIADDR 0x1dc0 - - #define WIA_wmode_MASK 0xfffffffc /* bits 0-1 */ - #define WIA_wmode_suspend 0x0 /* val 0, shift 0 */ - #define WIA_wmode_resume 0x1 /* val 1, shift 0 */ - #define WIA_wmode_jump 0x2 /* val 2, shift 0 */ - #define WIA_wmode_start 0x3 /* val 3, shift 0 */ - #define WIA_wagp_MASK 0xfffffffb /* bit 2 */ - #define WIA_wagp_pci 0x0 - #define WIA_wagp_agp 0x4 - #define WIA_wiaddr_MASK 0x7 /* bits 3-31 */ - #define WIA_wiaddr_SHIFT 3 - -#define MGAREG_WIADDR2 0x1dd8 - - #define WIA2_wmode_MASK 0xfffffffc /* bits 0-1 */ - #define WIA2_wmode_suspend 0x0 /* val 0, shift 0 */ - #define WIA2_wmode_resume 0x1 /* val 1, shift 0 */ - #define WIA2_wmode_jump 0x2 /* val 2, shift 0 */ - #define WIA2_wmode_start 0x3 /* val 3, shift 0 */ - #define WIA2_wagp_MASK 0xfffffffb /* bit 2 */ - #define WIA2_wagp_pci 0x0 - #define WIA2_wagp_agp 0x4 - #define WIA2_wiaddr_MASK 0x7 /* bits 3-31 */ - #define WIA2_wiaddr_SHIFT 3 - -#define MGAREG_WIADDRNB 0x1e60 -#define MGAREG_WIADDRNB1 0x1e04 -#define MGAREG_WIADDRNB2 0x1e00 -#define MGAREG_WIMEMADDR 0x1e68 - - #define WIMA_wimemaddr_MASK 0xffffff00 /* bits 0-7 */ - #define WIMA_wimemaddr_SHIFT 0 - -#define MGAREG_WIMEMDATA 0x2000 -#define MGAREG_WIMEMDATA1 0x2100 -#define MGAREG_WMISC 0x1e70 - - #define WM_wucodecache_MASK 0xfffffffe /* bit 0 */ - #define WM_wucodecache_disable 0x0 - #define WM_wucodecache_enable 0x1 - #define WM_wmaster_MASK 0xfffffffd /* bit 1 */ - #define WM_wmaster_disable 0x0 - #define WM_wmaster_enable 0x2 - #define WM_wcacheflush_MASK 0xfffffff7 /* bit 3 */ - #define WM_wcacheflush_disable 0x0 - #define WM_wcacheflush_enable 0x8 - -#define MGAREG_WR 0x2d00 -#define MGAREG_WVRTXSZ 0x1dcc - - #define WVS_wvrtxsz_MASK 0xffffffc0 /* bits 0-5 */ - #define WVS_wvrtxsz_SHIFT 0 - #define WVS_primsz_MASK 0xffffc0ff /* bits 8-13 */ - #define WVS_primsz_SHIFT 8 - -#define MGAREG_XDST 0x1cb0 -#define MGAREG_XYEND 0x1c44 - - #define XYEA_x_end_MASK 0xffff0000 /* bits 0-15 */ - #define XYEA_x_end_SHIFT 0 - #define XYEA_y_end_MASK 0xffff /* bits 16-31 */ - #define XYEA_y_end_SHIFT 16 - -#define MGAREG_XYSTRT 0x1c40 - - #define XYSA_x_start_MASK 0xffff0000 /* bits 0-15 */ - #define XYSA_x_start_SHIFT 0 - #define XYSA_y_start_MASK 0xffff /* bits 16-31 */ - #define XYSA_y_start_SHIFT 16 - -#define MGAREG_YBOT 0x1c9c -#define MGAREG_YDST 0x1c90 - - #define YA_ydst_MASK 0xff800000 /* bits 0-22 */ - #define YA_ydst_SHIFT 0 - #define YA_sellin_MASK 0x1fffffff /* bits 29-31 */ - #define YA_sellin_SHIFT 29 - -#define MGAREG_YDSTLEN 0x1c88 - - #define YDL_length_MASK 0xffff0000 /* bits 0-15 */ - #define YDL_length_SHIFT 0 - #define YDL_yval_MASK 0xffff /* bits 16-31 */ - #define YDL_yval_SHIFT 16 - -#define MGAREG_YDSTORG 0x1c94 -#define MGAREG_YTOP 0x1c98 -#define MGAREG_ZORG 0x1c0c - - #define ZO_zorgmap_MASK 0xfffffffe /* bit 0 */ - #define ZO_zorgmap_fb 0x0 - #define ZO_zorgmap_sys 0x1 - #define ZO_zorgacc_MASK 0xfffffffd /* bit 1 */ - #define ZO_zorgacc_pci 0x0 - #define ZO_zorgacc_agp 0x2 - #define ZO_zorg_MASK 0x3 /* bits 2-31 */ - #define ZO_zorg_SHIFT 2 +# define AGP_PLL_agp2xpllen_MASK 0xfffffffe /* bit 0 */ +# define AGP_PLL_agp2xpllen_disable 0x0 +# define AGP_PLL_agp2xpllen_enable 0x1 + +#define MGAREG_CFG_OR 0x1e4c + +# define CFG_OR_comp_or_MASK 0xfffffff7 /* bit 3 */ +# define CFG_OR_comp_or_disable 0x0 +# define CFG_OR_comp_or_enable 0x8 +# define CFG_OR_compfreq_MASK 0xffffff0f /* bits 4-7 */ +# define CFG_OR_compfreq_SHIFT 4 +# define CFG_OR_comporup_MASK 0xfffff0ff /* bits 8-11 */ +# define CFG_OR_comporup_SHIFT 8 +# define CFG_OR_compordn_MASK 0xffff0fff /* bits 12-15 */ +# define CFG_OR_compordn_SHIFT 12 +# define CFG_OR_e2pq_MASK 0xfffeffff /* bit 16 */ +# define CFG_OR_e2pq_disable 0x0 +# define CFG_OR_e2pq_enable 0x10000 +# define CFG_OR_e2pqbypcsn_MASK 0xfffdffff /* bit 17 */ +# define CFG_OR_e2pqbypcsn_disable 0x0 +# define CFG_OR_e2pqbypcsn_enable 0x20000 +# define CFG_OR_e2pqbypd_MASK 0xfffbffff /* bit 18 */ +# define CFG_OR_e2pqbypd_disable 0x0 +# define CFG_OR_e2pqbypd_enable 0x40000 +# define CFG_OR_e2pbypclk_MASK 0xfff7ffff /* bit 19 */ +# define CFG_OR_e2pbypclk_disable 0x0 +# define CFG_OR_e2pbypclk_enable 0x80000 +# define CFG_OR_e2pbyp_MASK 0xffefffff /* bit 20 */ +# define CFG_OR_e2pbyp_disable 0x0 +# define CFG_OR_e2pbyp_enable 0x100000 +# define CFG_OR_rate_cap_or_MASK 0xff1fffff /* bits 21-23 */ +# define CFG_OR_rate_cap_or_SHIFT 21 +# define CFG_OR_rq_or_MASK 0xe0ffffff /* bits 24-28 */ +# define CFG_OR_rq_or_SHIFT 24 + +#define MGAREG_ALPHACTRL 0x2c7c + +# define AC_src_MASK 0xfffffff0 /* bits 0-3 */ +# define AC_src_zero 0x0 /* val 0, shift 0 */ +# define AC_src_one 0x1 /* val 1, shift 0 */ +# define AC_src_dst_color 0x2 /* val 2, shift 0 */ +# define AC_src_om_dst_color 0x3 /* val 3, shift 0 */ +# define AC_src_src_alpha 0x4 /* val 4, shift 0 */ +# define AC_src_om_src_alpha 0x5 /* val 5, shift 0 */ +# define AC_src_dst_alpha 0x6 /* val 6, shift 0 */ +# define AC_src_om_dst_alpha 0x7 /* val 7, shift 0 */ +# define AC_src_src_alpha_sat 0x8 /* val 8, shift 0 */ +# define AC_dst_MASK 0xffffff0f /* bits 4-7 */ +# define AC_dst_zero 0x0 /* val 0, shift 4 */ +# define AC_dst_one 0x10 /* val 1, shift 4 */ +# define AC_dst_src_color 0x20 /* val 2, shift 4 */ +# define AC_dst_om_src_color 0x30 /* val 3, shift 4 */ +# define AC_dst_src_alpha 0x40 /* val 4, shift 4 */ +# define AC_dst_om_src_alpha 0x50 /* val 5, shift 4 */ +# define AC_dst_dst_alpha 0x60 /* val 6, shift 4 */ +# define AC_dst_om_dst_alpha 0x70 /* val 7, shift 4 */ +# define AC_amode_MASK 0xfffffcff /* bits 8-9 */ +# define AC_amode_FCOL 0x0 /* val 0, shift 8 */ +# define AC_amode_alpha_channel 0x100 /* val 1, shift 8 */ +# define AC_amode_video_alpha 0x200 /* val 2, shift 8 */ +# define AC_amode_RSVD 0x300 /* val 3, shift 8 */ +# define AC_astipple_MASK 0xfffff7ff /* bit 11 */ +# define AC_astipple_disable 0x0 +# define AC_astipple_enable 0x800 +# define AC_aten_MASK 0xffffefff /* bit 12 */ +# define AC_aten_disable 0x0 +# define AC_aten_enable 0x1000 +# define AC_atmode_MASK 0xffff1fff /* bits 13-15 */ +# define AC_atmode_noacmp 0x0 /* val 0, shift 13 */ +# define AC_atmode_ae 0x4000 /* val 2, shift 13 */ +# define AC_atmode_ane 0x6000 /* val 3, shift 13 */ +# define AC_atmode_alt 0x8000 /* val 4, shift 13 */ +# define AC_atmode_alte 0xa000 /* val 5, shift 13 */ +# define AC_atmode_agt 0xc000 /* val 6, shift 13 */ +# define AC_atmode_agte 0xe000 /* val 7, shift 13 */ +# define AC_atref_MASK 0xff00ffff /* bits 16-23 */ +# define AC_atref_SHIFT 16 +# define AC_alphasel_MASK 0xfcffffff /* bits 24-25 */ +# define AC_alphasel_fromtex 0x0 /* val 0, shift 24 */ +# define AC_alphasel_diffused 0x1000000 /* val 1, shift 24 */ +# define AC_alphasel_modulated 0x2000000 /* val 2, shift 24 */ +# define AC_alphasel_trans 0x3000000 /* val 3, shift 24 */ + +#define MGAREG_ALPHASTART 0x2c70 +#define MGAREG_ALPHAXINC 0x2c74 +#define MGAREG_ALPHAYINC 0x2c78 +#define MGAREG_AR0 0x1c60 + +# define AR0_ar0_MASK 0xfffc0000 /* bits 0-17 */ +# define AR0_ar0_SHIFT 0 + +#define MGAREG_AR1 0x1c64 + +# define AR1_ar1_MASK 0xff000000 /* bits 0-23 */ +# define AR1_ar1_SHIFT 0 + +#define MGAREG_AR2 0x1c68 + +# define AR2_ar2_MASK 0xfffc0000 /* bits 0-17 */ +# define AR2_ar2_SHIFT 0 + +#define MGAREG_AR3 0x1c6c + +# define AR3_ar3_MASK 0xff000000 /* bits 0-23 */ +# define AR3_ar3_SHIFT 0 +# define AR3_spage_MASK 0xf8ffffff /* bits 24-26 */ +# define AR3_spage_SHIFT 24 + +#define MGAREG_AR4 0x1c70 + +# define AR4_ar4_MASK 0xfffc0000 /* bits 0-17 */ +# define AR4_ar4_SHIFT 0 + +#define MGAREG_AR5 0x1c74 + +# define AR5_ar5_MASK 0xfffc0000 /* bits 0-17 */ +# define AR5_ar5_SHIFT 0 + +#define MGAREG_AR6 0x1c78 + +# define AR6_ar6_MASK 0xfffc0000 /* bits 0-17 */ +# define AR6_ar6_SHIFT 0 + +#define MGAREG_BCOL 0x1c20 +#define MGAREG_BESA1CORG 0x3d10 +#define MGAREG_BESA1ORG 0x3d00 +#define MGAREG_BESA2CORG 0x3d14 +#define MGAREG_BESA2ORG 0x3d04 +#define MGAREG_BESB1CORG 0x3d18 +#define MGAREG_BESB1ORG 0x3d08 +#define MGAREG_BESB2CORG 0x3d1c +#define MGAREG_BESB2ORG 0x3d0c +#define MGAREG_BESCTL 0x3d20 + +# define BC_besen_MASK 0xfffffffe /* bit 0 */ +# define BC_besen_disable 0x0 +# define BC_besen_enable 0x1 +# define BC_besv1srcstp_MASK 0xffffffbf /* bit 6 */ +# define BC_besv1srcstp_even 0x0 +# define BC_besv1srcstp_odd 0x40 +# define BC_besv2srcstp_MASK 0xfffffeff /* bit 8 */ +# define BC_besv2srcstp_disable 0x0 +# define BC_besv2srcstp_enable 0x100 +# define BC_beshfen_MASK 0xfffffbff /* bit 10 */ +# define BC_beshfen_disable 0x0 +# define BC_beshfen_enable 0x400 +# define BC_besvfen_MASK 0xfffff7ff /* bit 11 */ +# define BC_besvfen_disable 0x0 +# define BC_besvfen_enable 0x800 +# define BC_beshfixc_MASK 0xffffefff /* bit 12 */ +# define BC_beshfixc_weight 0x0 +# define BC_beshfixc_coeff 0x1000 +# define BC_bescups_MASK 0xfffeffff /* bit 16 */ +# define BC_bescups_disable 0x0 +# define BC_bescups_enable 0x10000 +# define BC_bes420pl_MASK 0xfffdffff /* bit 17 */ +# define BC_bes420pl_422 0x0 +# define BC_bes420pl_420 0x20000 +# define BC_besdith_MASK 0xfffbffff /* bit 18 */ +# define BC_besdith_disable 0x0 +# define BC_besdith_enable 0x40000 +# define BC_beshmir_MASK 0xfff7ffff /* bit 19 */ +# define BC_beshmir_disable 0x0 +# define BC_beshmir_enable 0x80000 +# define BC_besbwen_MASK 0xffefffff /* bit 20 */ +# define BC_besbwen_color 0x0 +# define BC_besbwen_bw 0x100000 +# define BC_besblank_MASK 0xffdfffff /* bit 21 */ +# define BC_besblank_disable 0x0 +# define BC_besblank_enable 0x200000 +# define BC_besfselm_MASK 0xfeffffff /* bit 24 */ +# define BC_besfselm_soft 0x0 +# define BC_besfselm_hard 0x1000000 +# define BC_besfsel_MASK 0xf9ffffff /* bits 25-26 */ +# define BC_besfsel_a1 0x0 /* val 0, shift 25 */ +# define BC_besfsel_a2 0x2000000 /* val 1, shift 25 */ +# define BC_besfsel_b1 0x4000000 /* val 2, shift 25 */ +# define BC_besfsel_b2 0x6000000 /* val 3, shift 25 */ + +#define MGAREG_BESGLOBCTL 0x3dc0 + +# define BGC_beshzoom_MASK 0xfffffffe /* bit 0 */ +# define BGC_beshzoom_disable 0x0 +# define BGC_beshzoom_enable 0x1 +# define BGC_beshzoomf_MASK 0xfffffffd /* bit 1 */ +# define BGC_beshzoomf_disable 0x0 +# define BGC_beshzoomf_enable 0x2 +# define BGC_bescorder_MASK 0xfffffff7 /* bit 3 */ +# define BGC_bescorder_even 0x0 +# define BGC_bescorder_odd 0x8 +# define BGC_besreghup_MASK 0xffffffef /* bit 4 */ +# define BGC_besreghup_disable 0x0 +# define BGC_besreghup_enable 0x10 +# define BGC_besvcnt_MASK 0xf000ffff /* bits 16-27 */ +# define BGC_besvcnt_SHIFT 16 + +#define MGAREG_BESHCOORD 0x3d28 + +# define BHC_besright_MASK 0xfffff800 /* bits 0-10 */ +# define BHC_besright_SHIFT 0 +# define BHC_besleft_MASK 0xf800ffff /* bits 16-26 */ +# define BHC_besleft_SHIFT 16 + +#define MGAREG_BESHISCAL 0x3d30 + +# define BHISF_beshiscal_MASK 0xffe00003 /* bits 2-20 */ +# define BHISF_beshiscal_SHIFT 2 + +#define MGAREG_BESHSRCEND 0x3d3c + +# define BHSE_beshsrcend_MASK 0xfc000003 /* bits 2-25 */ +# define BHSE_beshsrcend_SHIFT 2 + +#define MGAREG_BESHSRCLST 0x3d50 + +# define BHSL_beshsrclst_MASK 0xfc00ffff /* bits 16-25 */ +# define BHSL_beshsrclst_SHIFT 16 + +#define MGAREG_BESHSRCST 0x3d38 + +# define BHSS_beshsrcst_MASK 0xfc000003 /* bits 2-25 */ +# define BHSS_beshsrcst_SHIFT 2 + +#define MGAREG_BESPITCH 0x3d24 + +# define BP_bespitch_MASK 0xfffff000 /* bits 0-11 */ +# define BP_bespitch_SHIFT 0 + +#define MGAREG_BESSTATUS 0x3dc4 + +# define BS_besstat_MASK 0xfffffffc /* bits 0-1 */ +# define BS_besstat_a1 0x0 /* val 0, shift 0 */ +# define BS_besstat_a2 0x1 /* val 1, shift 0 */ +# define BS_besstat_b1 0x2 /* val 2, shift 0 */ +# define BS_besstat_b2 0x3 /* val 3, shift 0 */ + +#define MGAREG_BESV1SRCLST 0x3d54 + +# define BSF_besv1srclast_MASK 0xfffffc00 /* bits 0-9 */ +# define BSF_besv1srclast_SHIFT 0 + +#define MGAREG_BESV2SRCLST 0x3d58 + +# define BSF_besv2srclst_MASK 0xfffffc00 /* bits 0-9 */ +# define BSF_besv2srclst_SHIFT 0 + +#define MGAREG_BESV1WGHT 0x3d48 + +# define BSF_besv1wght_MASK 0xffff0003 /* bits 2-15 */ +# define BSF_besv1wght_SHIFT 2 +# define BSF_besv1wghts_MASK 0xfffeffff /* bit 16 */ +# define BSF_besv1wghts_disable 0x0 +# define BSF_besv1wghts_enable 0x10000 + +#define MGAREG_BESV2WGHT 0x3d4c + +# define BSF_besv2wght_MASK 0xffff0003 /* bits 2-15 */ +# define BSF_besv2wght_SHIFT 2 +# define BSF_besv2wghts_MASK 0xfffeffff /* bit 16 */ +# define BSF_besv2wghts_disable 0x0 +# define BSF_besv2wghts_enable 0x10000 + +#define MGAREG_BESVCOORD 0x3d2c + +# define BVC_besbot_MASK 0xfffff800 /* bits 0-10 */ +# define BVC_besbot_SHIFT 0 +# define BVC_bestop_MASK 0xf800ffff /* bits 16-26 */ +# define BVC_bestop_SHIFT 16 + +#define MGAREG_BESVISCAL 0x3d34 + +# define BVISF_besviscal_MASK 0xffe00003 /* bits 2-20 */ +# define BVISF_besviscal_SHIFT 2 + +#define MGAREG_CODECADDR 0x3e44 +#define MGAREG_CODECCTL 0x3e40 +#define MGAREG_CODECHARDPTR 0x3e4c +#define MGAREG_CODECHOSTPTR 0x3e48 +#define MGAREG_CODECLCODE 0x3e50 +#define MGAREG_CXBNDRY 0x1c80 + +# define CXB_cxleft_MASK 0xfffff000 /* bits 0-11 */ +# define CXB_cxleft_SHIFT 0 +# define CXB_cxright_MASK 0xf000ffff /* bits 16-27 */ +# define CXB_cxright_SHIFT 16 + +#define MGAREG_CXLEFT 0x1ca0 +#define MGAREG_CXRIGHT 0x1ca4 +#define MGAREG_DMAMAP30 0x1e30 +#define MGAREG_DMAMAP74 0x1e34 +#define MGAREG_DMAMAPB8 0x1e38 +#define MGAREG_DMAMAPFC 0x1e3c +#define MGAREG_DMAPAD 0x1c54 +#define MGAREG_DR0_Z32LSB 0x2c50 +#define MGAREG_DR0_Z32MSB 0x2c54 +#define MGAREG_DR2_Z32LSB 0x2c60 +#define MGAREG_DR2_Z32MSB 0x2c64 +#define MGAREG_DR3_Z32LSB 0x2c68 +#define MGAREG_DR3_Z32MSB 0x2c6c +#define MGAREG_DR0 0x1cc0 +#define MGAREG_DR2 0x1cc8 +#define MGAREG_DR3 0x1ccc +#define MGAREG_DR4 0x1cd0 +#define MGAREG_DR6 0x1cd8 +#define MGAREG_DR7 0x1cdc +#define MGAREG_DR8 0x1ce0 +#define MGAREG_DR10 0x1ce8 +#define MGAREG_DR11 0x1cec +#define MGAREG_DR12 0x1cf0 +#define MGAREG_DR14 0x1cf8 +#define MGAREG_DR15 0x1cfc +#define MGAREG_DSTORG 0x2cb8 + +# define DO_dstmap_MASK 0xfffffffe /* bit 0 */ +# define DO_dstmap_fb 0x0 +# define DO_dstmap_sys 0x1 +# define DO_dstacc_MASK 0xfffffffd /* bit 1 */ +# define DO_dstacc_pci 0x0 +# define DO_dstacc_agp 0x2 +# define DO_dstorg_MASK 0x7 /* bits 3-31 */ +# define DO_dstorg_SHIFT 3 + +#define MGAREG_DWG_INDIR_WT 0x1e80 +#define MGAREG_DWGCTL 0x1c00 + +# define DC_opcod_MASK 0xfffffff0 /* bits 0-3 */ +# define DC_opcod_line_open 0x0 /* val 0, shift 0 */ +# define DC_opcod_autoline_open 0x1 /* val 1, shift 0 */ +# define DC_opcod_line_close 0x2 /* val 2, shift 0 */ +# define DC_opcod_autoline_close 0x3 /* val 3, shift 0 */ +# define DC_opcod_trap 0x4 /* val 4, shift 0 */ +# define DC_opcod_texture_trap 0x6 /* val 6, shift 0 */ +# define DC_opcod_bitblt 0x8 /* val 8, shift 0 */ +# define DC_opcod_iload 0x9 /* val 9, shift 0 */ +# define DC_atype_MASK 0xffffff8f /* bits 4-6 */ +# define DC_atype_rpl 0x0 /* val 0, shift 4 */ +# define DC_atype_rstr 0x10 /* val 1, shift 4 */ +# define DC_atype_zi 0x30 /* val 3, shift 4 */ +# define DC_atype_blk 0x40 /* val 4, shift 4 */ +# define DC_atype_i 0x70 /* val 7, shift 4 */ +# define DC_linear_MASK 0xffffff7f /* bit 7 */ +# define DC_linear_xy 0x0 +# define DC_linear_linear 0x80 +# define DC_zmode_MASK 0xfffff8ff /* bits 8-10 */ +# define DC_zmode_nozcmp 0x0 /* val 0, shift 8 */ +# define DC_zmode_ze 0x200 /* val 2, shift 8 */ +# define DC_zmode_zne 0x300 /* val 3, shift 8 */ +# define DC_zmode_zlt 0x400 /* val 4, shift 8 */ +# define DC_zmode_zlte 0x500 /* val 5, shift 8 */ +# define DC_zmode_zgt 0x600 /* val 6, shift 8 */ +# define DC_zmode_zgte 0x700 /* val 7, shift 8 */ +# define DC_solid_MASK 0xfffff7ff /* bit 11 */ +# define DC_solid_disable 0x0 +# define DC_solid_enable 0x800 +# define DC_arzero_MASK 0xffffefff /* bit 12 */ +# define DC_arzero_disable 0x0 +# define DC_arzero_enable 0x1000 +# define DC_sgnzero_MASK 0xffffdfff /* bit 13 */ +# define DC_sgnzero_disable 0x0 +# define DC_sgnzero_enable 0x2000 +# define DC_shftzero_MASK 0xffffbfff /* bit 14 */ +# define DC_shftzero_disable 0x0 +# define DC_shftzero_enable 0x4000 +# define DC_bop_MASK 0xfff0ffff /* bits 16-19 */ +# define DC_bop_SHIFT 16 +# define DC_trans_MASK 0xff0fffff /* bits 20-23 */ +# define DC_trans_SHIFT 20 +# define DC_bltmod_MASK 0xe1ffffff /* bits 25-28 */ +# define DC_bltmod_bmonolef 0x0 /* val 0, shift 25 */ +# define DC_bltmod_bmonowf 0x8000000 /* val 4, shift 25 */ +# define DC_bltmod_bplan 0x2000000 /* val 1, shift 25 */ +# define DC_bltmod_bfcol 0x4000000 /* val 2, shift 25 */ +# define DC_bltmod_bu32bgr 0x6000000 /* val 3, shift 25 */ +# define DC_bltmod_bu32rgb 0xe000000 /* val 7, shift 25 */ +# define DC_bltmod_bu24bgr 0x16000000 /* val 11, shift 25 */ +# define DC_bltmod_bu24rgb 0x1e000000 /* val 15, shift 25 */ +# define DC_pattern_MASK 0xdfffffff /* bit 29 */ +# define DC_pattern_disable 0x0 +# define DC_pattern_enable 0x20000000 +# define DC_transc_MASK 0xbfffffff /* bit 30 */ +# define DC_transc_disable 0x0 +# define DC_transc_enable 0x40000000 +# define DC_clipdis_MASK 0x7fffffff /* bit 31 */ +# define DC_clipdis_disable 0x0 +# define DC_clipdis_enable 0x80000000 + +#define MGAREG_DWGSYNC 0x2c4c + +# define DS_dwgsyncaddr_MASK 0x3 /* bits 2-31 */ +# define DS_dwgsyncaddr_SHIFT 2 + +#define MGAREG_FCOL 0x1c24 +#define MGAREG_FIFOSTATUS 0x1e10 + +# define FS_fifocount_MASK 0xffffff80 /* bits 0-6 */ +# define FS_fifocount_SHIFT 0 +# define FS_bfull_MASK 0xfffffeff /* bit 8 */ +# define FS_bfull_disable 0x0 +# define FS_bfull_enable 0x100 +# define FS_bempty_MASK 0xfffffdff /* bit 9 */ +# define FS_bempty_disable 0x0 +# define FS_bempty_enable 0x200 + +#define MGAREG_FOGCOL 0x1cf4 +#define MGAREG_FOGSTART 0x1cc4 +#define MGAREG_FOGXINC 0x1cd4 +#define MGAREG_FOGYINC 0x1ce4 +#define MGAREG_FXBNDRY 0x1c84 + +# define XA_fxleft_MASK 0xffff0000 /* bits 0-15 */ +# define XA_fxleft_SHIFT 0 +# define XA_fxright_MASK 0xffff /* bits 16-31 */ +# define XA_fxright_SHIFT 16 + +#define MGAREG_FXLEFT 0x1ca8 +#define MGAREG_FXRIGHT 0x1cac +#define MGAREG_ICLEAR 0x1e18 + +# define IC_softrapiclr_MASK 0xfffffffe /* bit 0 */ +# define IC_softrapiclr_disable 0x0 +# define IC_softrapiclr_enable 0x1 +# define IC_pickiclr_MASK 0xfffffffb /* bit 2 */ +# define IC_pickiclr_disable 0x0 +# define IC_pickiclr_enable 0x4 +# define IC_vlineiclr_MASK 0xffffffdf /* bit 5 */ +# define IC_vlineiclr_disable 0x0 +# define IC_vlineiclr_enable 0x20 +# define IC_wiclr_MASK 0xffffff7f /* bit 7 */ +# define IC_wiclr_disable 0x0 +# define IC_wiclr_enable 0x80 +# define IC_wciclr_MASK 0xfffffeff /* bit 8 */ +# define IC_wciclr_disable 0x0 +# define IC_wciclr_enable 0x100 + +#define MGAREG_IEN 0x1e1c + +# define IE_softrapien_MASK 0xfffffffe /* bit 0 */ +# define IE_softrapien_disable 0x0 +# define IE_softrapien_enable 0x1 +# define IE_pickien_MASK 0xfffffffb /* bit 2 */ +# define IE_pickien_disable 0x0 +# define IE_pickien_enable 0x4 +# define IE_vlineien_MASK 0xffffffdf /* bit 5 */ +# define IE_vlineien_disable 0x0 +# define IE_vlineien_enable 0x20 +# define IE_extien_MASK 0xffffffbf /* bit 6 */ +# define IE_extien_disable 0x0 +# define IE_extien_enable 0x40 +# define IE_wien_MASK 0xffffff7f /* bit 7 */ +# define IE_wien_disable 0x0 +# define IE_wien_enable 0x80 +# define IE_wcien_MASK 0xfffffeff /* bit 8 */ +# define IE_wcien_disable 0x0 +# define IE_wcien_enable 0x100 + +#define MGAREG_LEN 0x1c5c +#define MGAREG_MACCESS 0x1c04 + +# define MA_pwidth_MASK 0xfffffffc /* bits 0-1 */ +# define MA_pwidth_8 0x0 /* val 0, shift 0 */ +# define MA_pwidth_16 0x1 /* val 1, shift 0 */ +# define MA_pwidth_32 0x2 /* val 2, shift 0 */ +# define MA_pwidth_24 0x3 /* val 3, shift 0 */ +# define MA_zwidth_MASK 0xffffffe7 /* bits 3-4 */ +# define MA_zwidth_16 0x0 /* val 0, shift 3 */ +# define MA_zwidth_32 0x8 /* val 1, shift 3 */ +# define MA_zwidth_15 0x10 /* val 2, shift 3 */ +# define MA_zwidth_24 0x18 /* val 3, shift 3 */ +# define MA_memreset_MASK 0xffff7fff /* bit 15 */ +# define MA_memreset_disable 0x0 +# define MA_memreset_enable 0x8000 +# define MA_fogen_MASK 0xfbffffff /* bit 26 */ +# define MA_fogen_disable 0x0 +# define MA_fogen_enable 0x4000000 +# define MA_tlutload_MASK 0xdfffffff /* bit 29 */ +# define MA_tlutload_disable 0x0 +# define MA_tlutload_enable 0x20000000 +# define MA_nodither_MASK 0xbfffffff /* bit 30 */ +# define MA_nodither_disable 0x0 +# define MA_nodither_enable 0x40000000 +# define MA_dit555_MASK 0x7fffffff /* bit 31 */ +# define MA_dit555_disable 0x0 +# define MA_dit555_enable 0x80000000 + +#define MGAREG_MCTLWTST 0x1c08 + +# define MCWS_casltncy_MASK 0xfffffff8 /* bits 0-2 */ +# define MCWS_casltncy_SHIFT 0 +# define MCWS_rrddelay_MASK 0xffffffcf /* bits 4-5 */ +# define MCWS_rcddelay_MASK 0xfffffe7f /* bits 7-8 */ +# define MCWS_rasmin_MASK 0xffffe3ff /* bits 10-12 */ +# define MCWS_rasmin_SHIFT 10 +# define MCWS_rpdelay_MASK 0xffff3fff /* bits 14-15 */ +# define MCWS_wrdelay_MASK 0xfff3ffff /* bits 18-19 */ +# define MCWS_rddelay_MASK 0xffdfffff /* bit 21 */ +# define MCWS_rddelay_disable 0x0 +# define MCWS_rddelay_enable 0x200000 +# define MCWS_smrdelay_MASK 0xfe7fffff /* bits 23-24 */ +# define MCWS_bwcdelay_MASK 0xf3ffffff /* bits 26-27 */ +# define MCWS_bpldelay_MASK 0x1fffffff /* bits 29-31 */ +# define MCWS_bpldelay_SHIFT 29 + +#define MGAREG_MEMRDBK 0x1e44 + +# define MRB_mclkbrd0_MASK 0xfffffff0 /* bits 0-3 */ +# define MRB_mclkbrd0_SHIFT 0 +# define MRB_mclkbrd1_MASK 0xfffffe1f /* bits 5-8 */ +# define MRB_mclkbrd1_SHIFT 5 +# define MRB_strmfctl_MASK 0xff3fffff /* bits 22-23 */ +# define MRB_mrsopcod_MASK 0xe1ffffff /* bits 25-28 */ +# define MRB_mrsopcod_SHIFT 25 + +#define MGAREG_OPMODE 0x1e54 + +# define OM_dmamod_MASK 0xfffffff3 /* bits 2-3 */ +# define OM_dmamod_general 0x0 /* val 0, shift 2 */ +# define OM_dmamod_blit 0x4 /* val 1, shift 2 */ +# define OM_dmamod_vector 0x8 /* val 2, shift 2 */ +# define OM_dmamod_vertex 0xc /* val 3, shift 2 */ +# define OM_dmadatasiz_MASK 0xfffffcff /* bits 8-9 */ +# define OM_dmadatasiz_8 0x0 /* val 0, shift 8 */ +# define OM_dmadatasiz_16 0x100 /* val 1, shift 8 */ +# define OM_dmadatasiz_32 0x200 /* val 2, shift 8 */ +# define OM_dirdatasiz_MASK 0xfffcffff /* bits 16-17 */ +# define OM_dirdatasiz_8 0x0 /* val 0, shift 16 */ +# define OM_dirdatasiz_16 0x10000 /* val 1, shift 16 */ +# define OM_dirdatasiz_32 0x20000 /* val 2, shift 16 */ + +#define MGAREG_PAT0 0x1c10 +#define MGAREG_PAT1 0x1c14 +#define MGAREG_PITCH 0x1c8c + +# define P_iy_MASK 0xffffe000 /* bits 0-12 */ +# define P_iy_SHIFT 0 +# define P_ylin_MASK 0xffff7fff /* bit 15 */ +# define P_ylin_disable 0x0 +# define P_ylin_enable 0x8000 + +#define MGAREG_PLNWT 0x1c1c +#define MGAREG_PRIMADDRESS 0x1e58 + +# define PDCA_primod_MASK 0xfffffffc /* bits 0-1 */ +# define PDCA_primod_general 0x0 /* val 0, shift 0 */ +# define PDCA_primod_blit 0x1 /* val 1, shift 0 */ +# define PDCA_primod_vector 0x2 /* val 2, shift 0 */ +# define PDCA_primod_vertex 0x3 /* val 3, shift 0 */ +# define PDCA_primaddress_MASK 0x3 /* bits 2-31 */ +# define PDCA_primaddress_SHIFT 2 + +#define MGAREG_PRIMEND 0x1e5c + +# define PDEA_primnostart_MASK 0xfffffffe /* bit 0 */ +# define PDEA_primnostart_disable 0x0 +# define PDEA_primnostart_enable 0x1 +# define PDEA_pagpxfer_MASK 0xfffffffd /* bit 1 */ +# define PDEA_pagpxfer_disable 0x0 +# define PDEA_pagpxfer_enable 0x2 +# define PDEA_primend_MASK 0x3 /* bits 2-31 */ +# define PDEA_primend_SHIFT 2 + +#define MGAREG_PRIMPTR 0x1e50 + +# define PLS_primptren0_MASK 0xfffffffe /* bit 0 */ +# define PLS_primptren0_disable 0x0 +# define PLS_primptren0_enable 0x1 +# define PLS_primptren1_MASK 0xfffffffd /* bit 1 */ +# define PLS_primptren1_disable 0x0 +# define PLS_primptren1_enable 0x2 +# define PLS_primptr_MASK 0x7 /* bits 3-31 */ +# define PLS_primptr_SHIFT 3 + +#define MGAREG_RST 0x1e40 + +# define R_softreset_MASK 0xfffffffe /* bit 0 */ +# define R_softreset_disable 0x0 +# define R_softreset_enable 0x1 +# define R_softextrst_MASK 0xfffffffd /* bit 1 */ +# define R_softextrst_disable 0x0 +# define R_softextrst_enable 0x2 + +#define MGAREG_SECADDRESS 0x2c40 + +# define SDCA_secmod_MASK 0xfffffffc /* bits 0-1 */ +# define SDCA_secmod_general 0x0 /* val 0, shift 0 */ +# define SDCA_secmod_blit 0x1 /* val 1, shift 0 */ +# define SDCA_secmod_vector 0x2 /* val 2, shift 0 */ +# define SDCA_secmod_vertex 0x3 /* val 3, shift 0 */ +# define SDCA_secaddress_MASK 0x3 /* bits 2-31 */ +# define SDCA_secaddress_SHIFT 2 + +#define MGAREG_SECEND 0x2c44 + +# define SDEA_sagpxfer_MASK 0xfffffffd /* bit 1 */ +# define SDEA_sagpxfer_disable 0x0 +# define SDEA_sagpxfer_enable 0x2 +# define SDEA_secend_MASK 0x3 /* bits 2-31 */ +# define SDEA_secend_SHIFT 2 + +#define MGAREG_SETUPADDRESS 0x2cd0 + +# define SETADD_mode_MASK 0xfffffffc /* bits 0-1 */ +# define SETADD_mode_vertlist 0x0 /* val 0, shift 0 */ +# define SETADD_address_MASK 0x3 /* bits 2-31 */ +# define SETADD_address_SHIFT 2 + +#define MGAREG_SETUPEND 0x2cd4 + +# define SETEND_agpxfer_MASK 0xfffffffd /* bit 1 */ +# define SETEND_agpxfer_disable 0x0 +# define SETEND_agpxfer_enable 0x2 +# define SETEND_address_MASK 0x3 /* bits 2-31 */ +# define SETEND_address_SHIFT 2 + +#define MGAREG_SGN 0x1c58 + +# define S_sdydxl_MASK 0xfffffffe /* bit 0 */ +# define S_sdydxl_y 0x0 +# define S_sdydxl_x 0x1 +# define S_scanleft_MASK 0xfffffffe /* bit 0 */ +# define S_scanleft_disable 0x0 +# define S_scanleft_enable 0x1 +# define S_sdxl_MASK 0xfffffffd /* bit 1 */ +# define S_sdxl_pos 0x0 +# define S_sdxl_neg 0x2 +# define S_sdy_MASK 0xfffffffb /* bit 2 */ +# define S_sdy_pos 0x0 +# define S_sdy_neg 0x4 +# define S_sdxr_MASK 0xffffffdf /* bit 5 */ +# define S_sdxr_pos 0x0 +# define S_sdxr_neg 0x20 +# define S_brkleft_MASK 0xfffffeff /* bit 8 */ +# define S_brkleft_disable 0x0 +# define S_brkleft_enable 0x100 +# define S_errorinit_MASK 0x7fffffff /* bit 31 */ +# define S_errorinit_disable 0x0 +# define S_errorinit_enable 0x80000000 + +#define MGAREG_SHIFT 0x1c50 + +# define FSC_x_off_MASK 0xfffffff0 /* bits 0-3 */ +# define FSC_x_off_SHIFT 0 +# define FSC_funcnt_MASK 0xffffff80 /* bits 0-6 */ +# define FSC_funcnt_SHIFT 0 +# define FSC_y_off_MASK 0xffffff8f /* bits 4-6 */ +# define FSC_y_off_SHIFT 4 +# define FSC_funoff_MASK 0xffc0ffff /* bits 16-21 */ +# define FSC_funoff_SHIFT 16 +# define FSC_stylelen_MASK 0xffc0ffff /* bits 16-21 */ +# define FSC_stylelen_SHIFT 16 + +#define MGAREG_SOFTRAP 0x2c48 + +# define STH_softraphand_MASK 0x3 /* bits 2-31 */ +# define STH_softraphand_SHIFT 2 + +#define MGAREG_SPECBSTART 0x2c98 +#define MGAREG_SPECBXINC 0x2c9c +#define MGAREG_SPECBYINC 0x2ca0 +#define MGAREG_SPECGSTART 0x2c8c +#define MGAREG_SPECGXINC 0x2c90 +#define MGAREG_SPECGYINC 0x2c94 +#define MGAREG_SPECRSTART 0x2c80 +#define MGAREG_SPECRXINC 0x2c84 +#define MGAREG_SPECRYINC 0x2c88 +#define MGAREG_SRC0 0x1c30 +#define MGAREG_SRC1 0x1c34 +#define MGAREG_SRC2 0x1c38 +#define MGAREG_SRC3 0x1c3c +#define MGAREG_SRCORG 0x2cb4 + +# define SO_srcmap_MASK 0xfffffffe /* bit 0 */ +# define SO_srcmap_fb 0x0 +# define SO_srcmap_sys 0x1 +# define SO_srcacc_MASK 0xfffffffd /* bit 1 */ +# define SO_srcacc_pci 0x0 +# define SO_srcacc_agp 0x2 +# define SO_srcorg_MASK 0x7 /* bits 3-31 */ +# define SO_srcorg_SHIFT 3 + +#define MGAREG_STATUS 0x1e14 + +# define STAT_softrapen_MASK 0xfffffffe /* bit 0 */ +# define STAT_softrapen_disable 0x0 +# define STAT_softrapen_enable 0x1 +# define STAT_pickpen_MASK 0xfffffffb /* bit 2 */ +# define STAT_pickpen_disable 0x0 +# define STAT_pickpen_enable 0x4 +# define STAT_vsyncsts_MASK 0xfffffff7 /* bit 3 */ +# define STAT_vsyncsts_disable 0x0 +# define STAT_vsyncsts_enable 0x8 +# define STAT_vsyncpen_MASK 0xffffffef /* bit 4 */ +# define STAT_vsyncpen_disable 0x0 +# define STAT_vsyncpen_enable 0x10 +# define STAT_vlinepen_MASK 0xffffffdf /* bit 5 */ +# define STAT_vlinepen_disable 0x0 +# define STAT_vlinepen_enable 0x20 +# define STAT_extpen_MASK 0xffffffbf /* bit 6 */ +# define STAT_extpen_disable 0x0 +# define STAT_extpen_enable 0x40 +# define STAT_wpen_MASK 0xffffff7f /* bit 7 */ +# define STAT_wpen_disable 0x0 +# define STAT_wpen_enable 0x80 +# define STAT_wcpen_MASK 0xfffffeff /* bit 8 */ +# define STAT_wcpen_disable 0x0 +# define STAT_wcpen_enable 0x100 +# define STAT_dwgengsts_MASK 0xfffeffff /* bit 16 */ +# define STAT_dwgengsts_disable 0x0 +# define STAT_dwgengsts_enable 0x10000 +# define STAT_endprdmasts_MASK 0xfffdffff /* bit 17 */ +# define STAT_endprdmasts_disable 0x0 +# define STAT_endprdmasts_enable 0x20000 +# define STAT_wbusy_MASK 0xfffbffff /* bit 18 */ +# define STAT_wbusy_disable 0x0 +# define STAT_wbusy_enable 0x40000 +# define STAT_swflag_MASK 0xfffffff /* bits 28-31 */ +# define STAT_swflag_SHIFT 28 + +#define MGAREG_STENCIL 0x2cc8 + +# define S_sref_MASK 0xffffff00 /* bits 0-7 */ +# define S_sref_SHIFT 0 +# define S_smsk_MASK 0xffff00ff /* bits 8-15 */ +# define S_smsk_SHIFT 8 +# define S_swtmsk_MASK 0xff00ffff /* bits 16-23 */ +# define S_swtmsk_SHIFT 16 + +#define MGAREG_STENCILCTL 0x2ccc + +# define SC_smode_MASK 0xfffffff8 /* bits 0-2 */ +# define SC_smode_salways 0x0 /* val 0, shift 0 */ +# define SC_smode_snever 0x1 /* val 1, shift 0 */ +# define SC_smode_se 0x2 /* val 2, shift 0 */ +# define SC_smode_sne 0x3 /* val 3, shift 0 */ +# define SC_smode_slt 0x4 /* val 4, shift 0 */ +# define SC_smode_slte 0x5 /* val 5, shift 0 */ +# define SC_smode_sgt 0x6 /* val 6, shift 0 */ +# define SC_smode_sgte 0x7 /* val 7, shift 0 */ +# define SC_sfailop_MASK 0xffffffc7 /* bits 3-5 */ +# define SC_sfailop_keep 0x0 /* val 0, shift 3 */ +# define SC_sfailop_zero 0x8 /* val 1, shift 3 */ +# define SC_sfailop_replace 0x10 /* val 2, shift 3 */ +# define SC_sfailop_incrsat 0x18 /* val 3, shift 3 */ +# define SC_sfailop_decrsat 0x20 /* val 4, shift 3 */ +# define SC_sfailop_invert 0x28 /* val 5, shift 3 */ +# define SC_sfailop_incr 0x30 /* val 6, shift 3 */ +# define SC_sfailop_decr 0x38 /* val 7, shift 3 */ +# define SC_szfailop_MASK 0xfffffe3f /* bits 6-8 */ +# define SC_szfailop_keep 0x0 /* val 0, shift 6 */ +# define SC_szfailop_zero 0x40 /* val 1, shift 6 */ +# define SC_szfailop_replace 0x80 /* val 2, shift 6 */ +# define SC_szfailop_incrsat 0xc0 /* val 3, shift 6 */ +# define SC_szfailop_decrsat 0x100 /* val 4, shift 6 */ +# define SC_szfailop_invert 0x140 /* val 5, shift 6 */ +# define SC_szfailop_incr 0x180 /* val 6, shift 6 */ +# define SC_szfailop_decr 0x1c0 /* val 7, shift 6 */ +# define SC_szpassop_MASK 0xfffff1ff /* bits 9-11 */ +# define SC_szpassop_keep 0x0 /* val 0, shift 9 */ +# define SC_szpassop_zero 0x200 /* val 1, shift 9 */ +# define SC_szpassop_replace 0x400 /* val 2, shift 9 */ +# define SC_szpassop_incrsat 0x600 /* val 3, shift 9 */ +# define SC_szpassop_decrsat 0x800 /* val 4, shift 9 */ +# define SC_szpassop_invert 0xa00 /* val 5, shift 9 */ +# define SC_szpassop_incr 0xc00 /* val 6, shift 9 */ +# define SC_szpassop_decr 0xe00 /* val 7, shift 9 */ + +#define MGAREG_TDUALSTAGE0 0x2cf8 + +# define TD0_color_arg2_MASK 0xfffffffc /* bits 0-1 */ +# define TD0_color_arg2_diffuse 0x0 /* val 0, shift 0 */ +# define TD0_color_arg2_specular 0x1 /* val 1, shift 0 */ +# define TD0_color_arg2_fcol 0x2 /* val 2, shift 0 */ +# define TD0_color_arg2_prevstage 0x3 /* val 3, shift 0 */ +# define TD0_color_alpha_MASK 0xffffffe3 /* bits 2-4 */ +# define TD0_color_alpha_diffuse 0x0 /* val 0, shift 2 */ +# define TD0_color_alpha_fcol 0x4 /* val 1, shift 2 */ +# define TD0_color_alpha_currtex 0x8 /* val 2, shift 2 */ +# define TD0_color_alpha_prevtex 0xc /* val 3, shift 2 */ +# define TD0_color_alpha_prevstage 0x10 /* val 4, shift 2 */ +# define TD0_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */ +# define TD0_color_arg1_replicatealpha_disable 0x0 +# define TD0_color_arg1_replicatealpha_enable 0x20 +# define TD0_color_arg1_inv_MASK 0xffffffbf /* bit 6 */ +# define TD0_color_arg1_inv_disable 0x0 +# define TD0_color_arg1_inv_enable 0x40 +# define TD0_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */ +# define TD0_color_arg2_replicatealpha_disable 0x0 +# define TD0_color_arg2_replicatealpha_enable 0x80 +# define TD0_color_arg2_inv_MASK 0xfffffeff /* bit 8 */ +# define TD0_color_arg2_inv_disable 0x0 +# define TD0_color_arg2_inv_enable 0x100 +# define TD0_color_alpha1inv_MASK 0xfffffdff /* bit 9 */ +# define TD0_color_alpha1inv_disable 0x0 +# define TD0_color_alpha1inv_enable 0x200 +# define TD0_color_alpha2inv_MASK 0xfffffbff /* bit 10 */ +# define TD0_color_alpha2inv_disable 0x0 +# define TD0_color_alpha2inv_enable 0x400 +# define TD0_color_arg1mul_MASK 0xfffff7ff /* bit 11 */ +# define TD0_color_arg1mul_disable 0x0 /* val 0, shift 11 */ +# define TD0_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */ +# define TD0_color_arg2mul_MASK 0xffffefff /* bit 12 */ +# define TD0_color_arg2mul_disable 0x0 /* val 0, shift 12 */ +# define TD0_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */ +# define TD0_color_arg1add_MASK 0xffffdfff /* bit 13 */ +# define TD0_color_arg1add_disable 0x0 /* val 0, shift 13 */ +# define TD0_color_arg1add_mulout 0x2000 /* val 1, shift 13 */ +# define TD0_color_arg2add_MASK 0xffffbfff /* bit 14 */ +# define TD0_color_arg2add_disable 0x0 /* val 0, shift 14 */ +# define TD0_color_arg2add_mulout 0x4000 /* val 1, shift 14 */ +# define TD0_color_modbright_MASK 0xfffe7fff /* bits 15-16 */ +# define TD0_color_modbright_disable 0x0 /* val 0, shift 15 */ +# define TD0_color_modbright_2x 0x8000 /* val 1, shift 15 */ +# define TD0_color_modbright_4x 0x10000 /* val 2, shift 15 */ +# define TD0_color_add_MASK 0xfffdffff /* bit 17 */ +# define TD0_color_add_sub 0x0 /* val 0, shift 17 */ +# define TD0_color_add_add 0x20000 /* val 1, shift 17 */ +# define TD0_color_add2x_MASK 0xfffbffff /* bit 18 */ +# define TD0_color_add2x_disable 0x0 +# define TD0_color_add2x_enable 0x40000 +# define TD0_color_addbias_MASK 0xfff7ffff /* bit 19 */ +# define TD0_color_addbias_disable 0x0 +# define TD0_color_addbias_enable 0x80000 +# define TD0_color_blend_MASK 0xffefffff /* bit 20 */ +# define TD0_color_blend_disable 0x0 +# define TD0_color_blend_enable 0x100000 +# define TD0_color_sel_MASK 0xff9fffff /* bits 21-22 */ +# define TD0_color_sel_arg1 0x0 /* val 0, shift 21 */ +# define TD0_color_sel_arg2 0x200000 /* val 1, shift 21 */ +# define TD0_color_sel_add 0x400000 /* val 2, shift 21 */ +# define TD0_color_sel_mul 0x600000 /* val 3, shift 21 */ +# define TD0_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */ +# define TD0_alpha_arg1_inv_disable 0x0 +# define TD0_alpha_arg1_inv_enable 0x800000 +# define TD0_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */ +# define TD0_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */ +# define TD0_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */ +# define TD0_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */ +# define TD0_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */ +# define TD0_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */ +# define TD0_alpha_arg2_inv_disable 0x0 +# define TD0_alpha_arg2_inv_enable 0x4000000 +# define TD0_alpha_add_MASK 0xf7ffffff /* bit 27 */ +# define TD0_alpha_add_disable 0x0 +# define TD0_alpha_add_enable 0x8000000 +# define TD0_alpha_addbias_MASK 0xefffffff /* bit 28 */ +# define TD0_alpha_addbias_disable 0x0 +# define TD0_alpha_addbias_enable 0x10000000 +# define TD0_alpha_add2x_MASK 0xdfffffff /* bit 29 */ +# define TD0_alpha_add2x_disable 0x0 +# define TD0_alpha_add2x_enable 0x20000000 +# define TD0_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */ +# define TD0_alpha_modbright_disable 0x0 /* val 0, shift 28 */ +# define TD0_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */ +# define TD0_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */ +# define TD0_alpha_sel_MASK 0x3fffffff /* bits 30-31 */ +# define TD0_alpha_sel_arg1 0x0 /* val 0, shift 30 */ +# define TD0_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */ +# define TD0_alpha_sel_add 0x80000000 /* val 2, shift 30 */ +# define TD0_alpha_sel_mul 0xc0000000 /* val 3, shift 30 */ + +#define MGAREG_TDUALSTAGE1 0x2cfc + +# define TD1_color_arg2_MASK 0xfffffffc /* bits 0-1 */ +# define TD1_color_arg2_diffuse 0x0 /* val 0, shift 0 */ +# define TD1_color_arg2_specular 0x1 /* val 1, shift 0 */ +# define TD1_color_arg2_fcol 0x2 /* val 2, shift 0 */ +# define TD1_color_arg2_prevstage 0x3 /* val 3, shift 0 */ +# define TD1_color_alpha_MASK 0xffffffe3 /* bits 2-4 */ +# define TD1_color_alpha_diffuse 0x0 /* val 0, shift 2 */ +# define TD1_color_alpha_fcol 0x4 /* val 1, shift 2 */ +# define TD1_color_alpha_tex0 0x8 /* val 2, shift 2 */ +# define TD1_color_alpha_prevtex 0xc /* val 3, shift 2 */ +# define TD1_color_alpha_prevstage 0x10 /* val 4, shift 2 */ +# define TD1_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */ +# define TD1_color_arg1_replicatealpha_disable 0x0 +# define TD1_color_arg1_replicatealpha_enable 0x20 +# define TD1_color_arg1_inv_MASK 0xffffffbf /* bit 6 */ +# define TD1_color_arg1_inv_disable 0x0 +# define TD1_color_arg1_inv_enable 0x40 +# define TD1_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */ +# define TD1_color_arg2_replicatealpha_disable 0x0 +# define TD1_color_arg2_replicatealpha_enable 0x80 +# define TD1_color_arg2_inv_MASK 0xfffffeff /* bit 8 */ +# define TD1_color_arg2_inv_disable 0x0 +# define TD1_color_arg2_inv_enable 0x100 +# define TD1_color_alpha1inv_MASK 0xfffffdff /* bit 9 */ +# define TD1_color_alpha1inv_disable 0x0 +# define TD1_color_alpha1inv_enable 0x200 +# define TD1_color_alpha2inv_MASK 0xfffffbff /* bit 10 */ +# define TD1_color_alpha2inv_disable 0x0 +# define TD1_color_alpha2inv_enable 0x400 +# define TD1_color_arg1mul_MASK 0xfffff7ff /* bit 11 */ +# define TD1_color_arg1mul_disable 0x0 /* val 0, shift 11 */ +# define TD1_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */ +# define TD1_color_arg2mul_MASK 0xffffefff /* bit 12 */ +# define TD1_color_arg2mul_disable 0x0 /* val 0, shift 12 */ +# define TD1_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */ +# define TD1_color_arg1add_MASK 0xffffdfff /* bit 13 */ +# define TD1_color_arg1add_disable 0x0 /* val 0, shift 13 */ +# define TD1_color_arg1add_mulout 0x2000 /* val 1, shift 13 */ +# define TD1_color_arg2add_MASK 0xffffbfff /* bit 14 */ +# define TD1_color_arg2add_disable 0x0 /* val 0, shift 14 */ +# define TD1_color_arg2add_mulout 0x4000 /* val 1, shift 14 */ +# define TD1_color_modbright_MASK 0xfffe7fff /* bits 15-16 */ +# define TD1_color_modbright_disable 0x0 /* val 0, shift 15 */ +# define TD1_color_modbright_2x 0x8000 /* val 1, shift 15 */ +# define TD1_color_modbright_4x 0x10000 /* val 2, shift 15 */ +# define TD1_color_add_MASK 0xfffdffff /* bit 17 */ +# define TD1_color_add_sub 0x0 /* val 0, shift 17 */ +# define TD1_color_add_add 0x20000 /* val 1, shift 17 */ +# define TD1_color_add2x_MASK 0xfffbffff /* bit 18 */ +# define TD1_color_add2x_disable 0x0 +# define TD1_color_add2x_enable 0x40000 +# define TD1_color_addbias_MASK 0xfff7ffff /* bit 19 */ +# define TD1_color_addbias_disable 0x0 +# define TD1_color_addbias_enable 0x80000 +# define TD1_color_blend_MASK 0xffefffff /* bit 20 */ +# define TD1_color_blend_disable 0x0 +# define TD1_color_blend_enable 0x100000 +# define TD1_color_sel_MASK 0xff9fffff /* bits 21-22 */ +# define TD1_color_sel_arg1 0x0 /* val 0, shift 21 */ +# define TD1_color_sel_arg2 0x200000 /* val 1, shift 21 */ +# define TD1_color_sel_add 0x400000 /* val 2, shift 21 */ +# define TD1_color_sel_mul 0x600000 /* val 3, shift 21 */ +# define TD1_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */ +# define TD1_alpha_arg1_inv_disable 0x0 +# define TD1_alpha_arg1_inv_enable 0x800000 +# define TD1_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */ +# define TD1_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */ +# define TD1_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */ +# define TD1_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */ +# define TD1_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */ +# define TD1_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */ +# define TD1_alpha_arg2_inv_disable 0x0 +# define TD1_alpha_arg2_inv_enable 0x4000000 +# define TD1_alpha_add_MASK 0xf7ffffff /* bit 27 */ +# define TD1_alpha_add_disable 0x0 +# define TD1_alpha_add_enable 0x8000000 +# define TD1_alpha_addbias_MASK 0xefffffff /* bit 28 */ +# define TD1_alpha_addbias_disable 0x0 +# define TD1_alpha_addbias_enable 0x10000000 +# define TD1_alpha_add2x_MASK 0xdfffffff /* bit 29 */ +# define TD1_alpha_add2x_disable 0x0 +# define TD1_alpha_add2x_enable 0x20000000 +# define TD1_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */ +# define TD1_alpha_modbright_disable 0x0 /* val 0, shift 28 */ +# define TD1_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */ +# define TD1_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */ +# define TD1_alpha_sel_MASK 0x3fffffff /* bits 30-31 */ +# define TD1_alpha_sel_arg1 0x0 /* val 0, shift 30 */ +# define TD1_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */ +# define TD1_alpha_sel_add 0x80000000 /* val 2, shift 30 */ +# define TD1_alpha_sel_mul 0xc0000000 /* val 3, shift 30 */ + +#define MGAREG_TEST0 0x1e48 + +# define TST_ramtsten_MASK 0xfffffffe /* bit 0 */ +# define TST_ramtsten_disable 0x0 +# define TST_ramtsten_enable 0x1 +# define TST_ramtstdone_MASK 0xfffffffd /* bit 1 */ +# define TST_ramtstdone_disable 0x0 +# define TST_ramtstdone_enable 0x2 +# define TST_wramtstpass_MASK 0xfffffffb /* bit 2 */ +# define TST_wramtstpass_disable 0x0 +# define TST_wramtstpass_enable 0x4 +# define TST_tcachetstpass_MASK 0xfffffff7 /* bit 3 */ +# define TST_tcachetstpass_disable 0x0 +# define TST_tcachetstpass_enable 0x8 +# define TST_tluttstpass_MASK 0xffffffef /* bit 4 */ +# define TST_tluttstpass_disable 0x0 +# define TST_tluttstpass_enable 0x10 +# define TST_luttstpass_MASK 0xffffffdf /* bit 5 */ +# define TST_luttstpass_disable 0x0 +# define TST_luttstpass_enable 0x20 +# define TST_besramtstpass_MASK 0xffffffbf /* bit 6 */ +# define TST_besramtstpass_disable 0x0 +# define TST_besramtstpass_enable 0x40 +# define TST_ringen_MASK 0xfffffeff /* bit 8 */ +# define TST_ringen_disable 0x0 +# define TST_ringen_enable 0x100 +# define TST_apllbyp_MASK 0xfffffdff /* bit 9 */ +# define TST_apllbyp_disable 0x0 +# define TST_apllbyp_enable 0x200 +# define TST_hiten_MASK 0xfffffbff /* bit 10 */ +# define TST_hiten_disable 0x0 +# define TST_hiten_enable 0x400 +# define TST_tmode_MASK 0xffffc7ff /* bits 11-13 */ +# define TST_tmode_SHIFT 11 +# define TST_tclksel_MASK 0xfffe3fff /* bits 14-16 */ +# define TST_tclksel_SHIFT 14 +# define TST_ringcnten_MASK 0xfffdffff /* bit 17 */ +# define TST_ringcnten_disable 0x0 +# define TST_ringcnten_enable 0x20000 +# define TST_ringcnt_MASK 0xc003ffff /* bits 18-29 */ +# define TST_ringcnt_SHIFT 18 +# define TST_ringcntclksl_MASK 0xbfffffff /* bit 30 */ +# define TST_ringcntclksl_disable 0x0 +# define TST_ringcntclksl_enable 0x40000000 +# define TST_biosboot_MASK 0x7fffffff /* bit 31 */ +# define TST_biosboot_disable 0x0 +# define TST_biosboot_enable 0x80000000 + +#define MGAREG_TEXBORDERCOL 0x2c5c +#define MGAREG_TEXCTL 0x2c30 + +# define TMC_tformat_MASK 0xfffffff0 /* bits 0-3 */ +# define TMC_tformat_tw4 0x0 /* val 0, shift 0 */ +# define TMC_tformat_tw8 0x1 /* val 1, shift 0 */ +# define TMC_tformat_tw15 0x2 /* val 2, shift 0 */ +# 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 +# define TMC_tpitchlin_enable 0x100 +# define TMC_tpitchext_MASK 0xfff001ff /* bits 9-19 */ +# define TMC_tpitchext_SHIFT 9 +# define TMC_tpitch_MASK 0xfff8ffff /* bits 16-18 */ +# define TMC_tpitch_SHIFT 16 +# define TMC_owalpha_MASK 0xffbfffff /* bit 22 */ +# define TMC_owalpha_disable 0x0 +# define TMC_owalpha_enable 0x400000 +# define TMC_azeroextend_MASK 0xff7fffff /* bit 23 */ +# define TMC_azeroextend_disable 0x0 +# define TMC_azeroextend_enable 0x800000 +# define TMC_decalckey_MASK 0xfeffffff /* bit 24 */ +# define TMC_decalckey_disable 0x0 +# define TMC_decalckey_enable 0x1000000 +# define TMC_takey_MASK 0xfdffffff /* bit 25 */ +# define TMC_takey_0 0x0 +# define TMC_takey_1 0x2000000 +# define TMC_tamask_MASK 0xfbffffff /* bit 26 */ +# define TMC_tamask_0 0x0 +# define TMC_tamask_1 0x4000000 +# define TMC_clampv_MASK 0xf7ffffff /* bit 27 */ +# define TMC_clampv_disable 0x0 +# define TMC_clampv_enable 0x8000000 +# define TMC_clampu_MASK 0xefffffff /* bit 28 */ +# define TMC_clampu_disable 0x0 +# define TMC_clampu_enable 0x10000000 +# define TMC_tmodulate_MASK 0xdfffffff /* bit 29 */ +# define TMC_tmodulate_disable 0x0 +# define TMC_tmodulate_enable 0x20000000 +# define TMC_strans_MASK 0xbfffffff /* bit 30 */ +# define TMC_strans_disable 0x0 +# define TMC_strans_enable 0x40000000 +# define TMC_itrans_MASK 0x7fffffff /* bit 31 */ +# define TMC_itrans_disable 0x0 +# define TMC_itrans_enable 0x80000000 + +#define MGAREG_TEXCTL2 0x2c3c + +# define TMC_decalblend_MASK 0xfffffffe /* bit 0 */ +# define TMC_decalblend_disable 0x0 +# define TMC_decalblend_enable 0x1 +# define TMC_idecal_MASK 0xfffffffd /* bit 1 */ +# define TMC_idecal_disable 0x0 +# define TMC_idecal_enable 0x2 +# define TMC_decaldis_MASK 0xfffffffb /* bit 2 */ +# define TMC_decaldis_disable 0x0 +# define TMC_decaldis_enable 0x4 +# define TMC_ckstransdis_MASK 0xffffffef /* bit 4 */ +# define TMC_ckstransdis_disable 0x0 +# define TMC_ckstransdis_enable 0x10 +# define TMC_borderen_MASK 0xffffffdf /* bit 5 */ +# define TMC_borderen_disable 0x0 +# define TMC_borderen_enable 0x20 +# define TMC_specen_MASK 0xffffffbf /* bit 6 */ +# define TMC_specen_disable 0x0 +# define TMC_specen_enable 0x40 +# define TMC_dualtex_MASK 0xffffff7f /* bit 7 */ +# define TMC_dualtex_disable 0x0 +# define TMC_dualtex_enable 0x80 +# define TMC_tablefog_MASK 0xfffffeff /* bit 8 */ +# define TMC_tablefog_disable 0x0 +# define TMC_tablefog_enable 0x100 +# define TMC_bumpmap_MASK 0xfffffdff /* bit 9 */ +# define TMC_bumpmap_disable 0x0 +# define TMC_bumpmap_enable 0x200 +# define TMC_map1_MASK 0x7fffffff /* bit 31 */ +# define TMC_map1_disable 0x0 +# define TMC_map1_enable 0x80000000 + +#define MGAREG_TEXFILTER 0x2c58 + +# define TF_minfilter_MASK 0xfffffff0 /* bits 0-3 */ +# define TF_minfilter_nrst 0x0 /* val 0, shift 0 */ +# define TF_minfilter_bilin 0x2 /* val 2, shift 0 */ +# define TF_minfilter_cnst 0x3 /* val 3, shift 0 */ +# define TF_minfilter_mm1s 0x8 /* val 8, shift 0 */ +# define TF_minfilter_mm2s 0x9 /* val 9, shift 0 */ +# define TF_minfilter_mm4s 0xa /* val 10, shift 0 */ +# define TF_minfilter_mm8s 0xc /* val 12, shift 0 */ +# define TF_magfilter_MASK 0xffffff0f /* bits 4-7 */ +# define TF_magfilter_nrst 0x0 /* val 0, shift 4 */ +# define TF_magfilter_bilin 0x20 /* val 2, shift 4 */ +# define TF_magfilter_cnst 0x30 /* val 3, shift 4 */ +# define TF_avgstride_MASK 0xfff7ffff /* bit 19 */ +# define TF_avgstride_disable 0x0 +# define TF_avgstride_enable 0x80000 +# define TF_filteralpha_MASK 0xffefffff /* bit 20 */ +# define TF_filteralpha_disable 0x0 +# define TF_filteralpha_enable 0x100000 +# define TF_fthres_MASK 0xe01fffff /* bits 21-28 */ +# define TF_fthres_SHIFT 21 +# define TF_mapnb_MASK 0x1fffffff /* bits 29-31 */ +# define TF_mapnb_SHIFT 29 + +#define MGAREG_TEXHEIGHT 0x2c2c + +# define TH_th_MASK 0xffffffc0 /* bits 0-5 */ +# define TH_th_SHIFT 0 +# define TH_rfh_MASK 0xffff81ff /* bits 9-14 */ +# define TH_rfh_SHIFT 9 +# define TH_thmask_MASK 0xe003ffff /* bits 18-28 */ +# define TH_thmask_SHIFT 18 + +#define MGAREG_TEXORG 0x2c24 + +# define TO_texorgmap_MASK 0xfffffffe /* bit 0 */ +# define TO_texorgmap_fb 0x0 +# define TO_texorgmap_sys 0x1 +# 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 + +#define MGAREG_TEXORG1 0x2ca4 +#define MGAREG_TEXORG2 0x2ca8 +#define MGAREG_TEXORG3 0x2cac +#define MGAREG_TEXORG4 0x2cb0 +#define MGAREG_TEXTRANS 0x2c34 + +# define TT_tckey_MASK 0xffff0000 /* bits 0-15 */ +# define TT_tckey_SHIFT 0 +# define TT_tkmask_MASK 0xffff /* bits 16-31 */ +# define TT_tkmask_SHIFT 16 + +#define MGAREG_TEXTRANSHIGH 0x2c38 + +# define TT_tckeyh_MASK 0xffff0000 /* bits 0-15 */ +# define TT_tckeyh_SHIFT 0 +# define TT_tkmaskh_MASK 0xffff /* bits 16-31 */ +# define TT_tkmaskh_SHIFT 16 + +#define MGAREG_TEXWIDTH 0x2c28 + +# define TW_tw_MASK 0xffffffc0 /* bits 0-5 */ +# define TW_tw_SHIFT 0 +# define TW_rfw_MASK 0xffff81ff /* bits 9-14 */ +# define TW_rfw_SHIFT 9 +# define TW_twmask_MASK 0xe003ffff /* bits 18-28 */ +# define TW_twmask_SHIFT 18 + +#define MGAREG_TMR0 0x2c00 +#define MGAREG_TMR1 0x2c04 +#define MGAREG_TMR2 0x2c08 +#define MGAREG_TMR3 0x2c0c +#define MGAREG_TMR4 0x2c10 +#define MGAREG_TMR5 0x2c14 +#define MGAREG_TMR6 0x2c18 +#define MGAREG_TMR7 0x2c1c +#define MGAREG_TMR8 0x2c20 +#define MGAREG_VBIADDR0 0x3e08 +#define MGAREG_VBIADDR1 0x3e0c +#define MGAREG_VCOUNT 0x1e20 +#define MGAREG_WACCEPTSEQ 0x1dd4 + +# define WAS_seqdst0_MASK 0xffffffc0 /* bits 0-5 */ +# define WAS_seqdst0_SHIFT 0 +# define WAS_seqdst1_MASK 0xfffff03f /* bits 6-11 */ +# define WAS_seqdst1_SHIFT 6 +# define WAS_seqdst2_MASK 0xfffc0fff /* bits 12-17 */ +# define WAS_seqdst2_SHIFT 12 +# define WAS_seqdst3_MASK 0xff03ffff /* bits 18-23 */ +# define WAS_seqdst3_SHIFT 18 +# define WAS_seqlen_MASK 0xfcffffff /* bits 24-25 */ +# define WAS_wfirsttag_MASK 0xfbffffff /* bit 26 */ +# define WAS_wfirsttag_disable 0x0 +# define WAS_wfirsttag_enable 0x4000000 +# define WAS_wsametag_MASK 0xf7ffffff /* bit 27 */ +# define WAS_wsametag_disable 0x0 +# define WAS_wsametag_enable 0x8000000 +# define WAS_seqoff_MASK 0xefffffff /* bit 28 */ +# define WAS_seqoff_disable 0x0 +# define WAS_seqoff_enable 0x10000000 + +#define MGAREG_WCODEADDR 0x1e6c + +# define WMA_wcodeaddr_MASK 0xff /* bits 8-31 */ +# define WMA_wcodeaddr_SHIFT 8 + +#define MGAREG_WFLAG 0x1dc4 + +# define WF_walustsflag_MASK 0xffffff00 /* bits 0-7 */ +# define WF_walustsflag_SHIFT 0 +# define WF_walucfgflag_MASK 0xffff00ff /* bits 8-15 */ +# define WF_walucfgflag_SHIFT 8 +# define WF_wprgflag_MASK 0xffff /* bits 16-31 */ +# define WF_wprgflag_SHIFT 16 + +#define MGAREG_WFLAG1 0x1de0 + +# define WF1_walustsflag1_MASK 0xffffff00 /* bits 0-7 */ +# define WF1_walustsflag1_SHIFT 0 +# define WF1_walucfgflag1_MASK 0xffff00ff /* bits 8-15 */ +# define WF1_walucfgflag1_SHIFT 8 +# define WF1_wprgflag1_MASK 0xffff /* bits 16-31 */ +# define WF1_wprgflag1_SHIFT 16 + +#define MGAREG_WFLAGNB 0x1e64 +#define MGAREG_WFLAGNB1 0x1e08 +#define MGAREG_WGETMSB 0x1dc8 + +# define WGV_wgetmsbmin_MASK 0xffffffe0 /* bits 0-4 */ +# define WGV_wgetmsbmin_SHIFT 0 +# define WGV_wgetmsbmax_MASK 0xffffe0ff /* bits 8-12 */ +# define WGV_wgetmsbmax_SHIFT 8 +# define WGV_wbrklefttop_MASK 0xfffeffff /* bit 16 */ +# define WGV_wbrklefttop_disable 0x0 +# define WGV_wbrklefttop_enable 0x10000 +# define WGV_wfastcrop_MASK 0xfffdffff /* bit 17 */ +# define WGV_wfastcrop_disable 0x0 +# define WGV_wfastcrop_enable 0x20000 +# define WGV_wcentersnap_MASK 0xfffbffff /* bit 18 */ +# define WGV_wcentersnap_disable 0x0 +# define WGV_wcentersnap_enable 0x40000 +# define WGV_wbrkrighttop_MASK 0xfff7ffff /* bit 19 */ +# define WGV_wbrkrighttop_disable 0x0 +# define WGV_wbrkrighttop_enable 0x80000 + +#define MGAREG_WIADDR 0x1dc0 + +# define WIA_wmode_MASK 0xfffffffc /* bits 0-1 */ +# define WIA_wmode_suspend 0x0 /* val 0, shift 0 */ +# define WIA_wmode_resume 0x1 /* val 1, shift 0 */ +# define WIA_wmode_jump 0x2 /* val 2, shift 0 */ +# define WIA_wmode_start 0x3 /* val 3, shift 0 */ +# define WIA_wagp_MASK 0xfffffffb /* bit 2 */ +# define WIA_wagp_pci 0x0 +# define WIA_wagp_agp 0x4 +# define WIA_wiaddr_MASK 0x7 /* bits 3-31 */ +# define WIA_wiaddr_SHIFT 3 + +#define MGAREG_WIADDR2 0x1dd8 + +# define WIA2_wmode_MASK 0xfffffffc /* bits 0-1 */ +# define WIA2_wmode_suspend 0x0 /* val 0, shift 0 */ +# define WIA2_wmode_resume 0x1 /* val 1, shift 0 */ +# define WIA2_wmode_jump 0x2 /* val 2, shift 0 */ +# define WIA2_wmode_start 0x3 /* val 3, shift 0 */ +# define WIA2_wagp_MASK 0xfffffffb /* bit 2 */ +# define WIA2_wagp_pci 0x0 +# define WIA2_wagp_agp 0x4 +# define WIA2_wiaddr_MASK 0x7 /* bits 3-31 */ +# define WIA2_wiaddr_SHIFT 3 + +#define MGAREG_WIADDRNB 0x1e60 +#define MGAREG_WIADDRNB1 0x1e04 +#define MGAREG_WIADDRNB2 0x1e00 +#define MGAREG_WIMEMADDR 0x1e68 + +# define WIMA_wimemaddr_MASK 0xffffff00 /* bits 0-7 */ +# define WIMA_wimemaddr_SHIFT 0 + +#define MGAREG_WIMEMDATA 0x2000 +#define MGAREG_WIMEMDATA1 0x2100 +#define MGAREG_WMISC 0x1e70 + +# define WM_wucodecache_MASK 0xfffffffe /* bit 0 */ +# define WM_wucodecache_disable 0x0 +# define WM_wucodecache_enable 0x1 +# define WM_wmaster_MASK 0xfffffffd /* bit 1 */ +# define WM_wmaster_disable 0x0 +# define WM_wmaster_enable 0x2 +# define WM_wcacheflush_MASK 0xfffffff7 /* bit 3 */ +# define WM_wcacheflush_disable 0x0 +# define WM_wcacheflush_enable 0x8 + +#define MGAREG_WR 0x2d00 +#define MGAREG_WVRTXSZ 0x1dcc + +# define WVS_wvrtxsz_MASK 0xffffffc0 /* bits 0-5 */ +# define WVS_wvrtxsz_SHIFT 0 +# define WVS_primsz_MASK 0xffffc0ff /* bits 8-13 */ +# define WVS_primsz_SHIFT 8 + +#define MGAREG_XDST 0x1cb0 +#define MGAREG_XYEND 0x1c44 + +# define XYEA_x_end_MASK 0xffff0000 /* bits 0-15 */ +# define XYEA_x_end_SHIFT 0 +# define XYEA_y_end_MASK 0xffff /* bits 16-31 */ +# define XYEA_y_end_SHIFT 16 + +#define MGAREG_XYSTRT 0x1c40 + +# define XYSA_x_start_MASK 0xffff0000 /* bits 0-15 */ +# define XYSA_x_start_SHIFT 0 +# define XYSA_y_start_MASK 0xffff /* bits 16-31 */ +# define XYSA_y_start_SHIFT 16 + +#define MGAREG_YBOT 0x1c9c +#define MGAREG_YDST 0x1c90 + +# define YA_ydst_MASK 0xff800000 /* bits 0-22 */ +# define YA_ydst_SHIFT 0 +# define YA_sellin_MASK 0x1fffffff /* bits 29-31 */ +# define YA_sellin_SHIFT 29 + +#define MGAREG_YDSTLEN 0x1c88 + +# define YDL_length_MASK 0xffff0000 /* bits 0-15 */ +# define YDL_length_SHIFT 0 +# define YDL_yval_MASK 0xffff /* bits 16-31 */ +# define YDL_yval_SHIFT 16 + +#define MGAREG_YDSTORG 0x1c94 +#define MGAREG_YTOP 0x1c98 +#define MGAREG_ZORG 0x1c0c + +# define ZO_zorgmap_MASK 0xfffffffe /* bit 0 */ +# define ZO_zorgmap_fb 0x0 +# define ZO_zorgmap_sys 0x1 +# define ZO_zorgacc_MASK 0xfffffffd /* bit 1 */ +# define ZO_zorgacc_pci 0x0 +# define ZO_zorgacc_agp 0x2 +# define ZO_zorg_MASK 0x3 /* bits 2-31 */ +# define ZO_zorg_SHIFT 2 /**************** (END) AUTOMATICLY GENERATED REGISTER FILE ******************/ -#endif /* _MGAREGS_H_ */ +#endif /* _MGAREGS_H_ */ + Index: xc/lib/GL/mesa/src/drv/mga/mgarender.c diff -u /dev/null xc/lib/GL/mesa/src/drv/mga/mgarender.c:1.4 --- /dev/null Thu Feb 27 12:26:28 2003 +++ xc/lib/GL/mesa/src/drv/mga/mgarender.c Wed Oct 30 07:51:36 2002 @@ -0,0 +1,208 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgarender.c,v 1.4 2002/10/30 12:51:36 alanh 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 + * + */ + + +/* + * Render unclipped vertex buffers by emitting vertices directly to + * dma buffers. Use strip/fan hardware primitives where possible. + * Simulate missing primitives with indexed vertices. + */ +#include "glheader.h" +#include "context.h" +#include "macros.h" +#include "mem.h" +#include "mtypes.h" +#include "mmath.h" + +#include "tnl/t_context.h" + +#include "mgacontext.h" +#include "mgatris.h" +#include "mgastate.h" +#include "mgaioctl.h" +#include "mgavb.h" + +#define HAVE_POINTS 0 +#define HAVE_LINES 0 +#define HAVE_LINE_STRIPS 0 +#define HAVE_TRIANGLES 1 +#define HAVE_TRI_STRIPS 1 +#define HAVE_TRI_STRIP_1 0 +#define HAVE_TRI_FANS 1 +#define HAVE_POLYGONS 0 +#define HAVE_QUADS 0 +#define HAVE_QUAD_STRIPS 0 + +#define HAVE_ELTS 0 /* for now */ + +static void mgaDmaPrimitive( GLcontext *ctx, GLenum prim ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + GLuint hwprim; + + switch (prim) { + case GL_TRIANGLES: + hwprim = MGA_WA_TRIANGLES; + break; + case GL_TRIANGLE_STRIP: + if (mmesa->vertex_size == 8) + hwprim = MGA_WA_TRISTRIP_T0; + else + hwprim = MGA_WA_TRISTRIP_T0T1; + break; + case GL_TRIANGLE_FAN: + if (mmesa->vertex_size == 8) + hwprim = MGA_WA_TRIFAN_T0; + else + hwprim = MGA_WA_TRIFAN_T0T1; + break; + default: + return; + } + + mgaRasterPrimitive( ctx, GL_TRIANGLES, hwprim ); +} + +static void VERT_FALLBACK( GLcontext *ctx, GLuint start, GLuint count, + GLuint flags ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.PrimitiveNotify( ctx, flags & PRIM_MODE_MASK ); + tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 ); + tnl->Driver.Render.PrimTabVerts[flags&PRIM_MODE_MASK]( ctx, start, count, flags ); + MGA_CONTEXT(ctx)->SetupNewInputs |= VERT_CLIP; +} + +#define LOCAL_VARS mgaContextPtr mmesa = MGA_CONTEXT(ctx) +#define INIT( prim ) do { \ + if (0) fprintf(stderr, "%s\n", __FUNCTION__); \ + FLUSH_BATCH(mmesa); \ + mgaDmaPrimitive( ctx, prim ); \ +} while (0) +#define NEW_PRIMITIVE() FLUSH_BATCH( mmesa ) +#define NEW_BUFFER() FLUSH_BATCH( mmesa ) +#define GET_CURRENT_VB_MAX_VERTS() \ + 0 /* fix me */ +#define GET_SUBSEQUENT_VB_MAX_VERTS() \ + MGA_BUFFER_SIZE / (mmesa->vertex_size * 4) +#define EMIT_VERTS( ctx, j, nr ) \ + mga_emit_contiguous_verts(ctx, j, (j)+(nr)) + + +#define TAG(x) mga_##x +#include "tnl_dd/t_dd_dmatmp.h" + + + +/**********************************************************************/ +/* Render pipeline stage */ +/**********************************************************************/ + + +static GLboolean mga_run_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint i, length, flags = 0; + + /* Don't handle clipping or indexed vertices or vertex manipulations. + */ + if (VB->ClipOrMask || mmesa->RenderIndex != 0 || VB->Elts) { + return GL_TRUE; + } + + tnl->Driver.Render.Start( ctx ); + mmesa->SetupNewInputs = ~0; + + for (i = VB->FirstPrimitive ; !(flags & PRIM_LAST) ; i += length) + { + flags = VB->Primitive[i]; + length= VB->PrimitiveLength[i]; + if (length) + mga_render_tab_verts[flags & PRIM_MODE_MASK]( ctx, i, i + length, + flags ); + } + + tnl->Driver.Render.Finish( ctx ); + + return GL_FALSE; /* finished the pipe */ +} + + +static void mga_check_render( GLcontext *ctx, struct gl_pipeline_stage *stage ) +{ + GLuint inputs = VERT_CLIP|VERT_RGBA; + + if (ctx->RenderMode == GL_RENDER) { + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + inputs |= VERT_SPEC_RGB; + + if (ctx->Texture.Unit[0]._ReallyEnabled) + inputs |= VERT_TEX(0); + + if (ctx->Texture.Unit[1]._ReallyEnabled) + inputs |= VERT_TEX(1); + + if (ctx->Fog.Enabled) + inputs |= VERT_FOG_COORD; + } + + stage->inputs = inputs; +} + + +static void dtr( struct gl_pipeline_stage *stage ) +{ + (void)stage; +} + + +const struct gl_pipeline_stage _mga_render_stage = +{ + "mga render", + (_DD_NEW_SEPARATE_SPECULAR | + _NEW_TEXTURE| + _NEW_FOG| + _NEW_RENDERMODE), /* re-check (new inputs) */ + 0, /* re-run (always runs) */ + GL_TRUE, /* active */ + 0, 0, /* inputs (set in check_render), outputs */ + 0, 0, /* changed_inputs, private */ + dtr, /* destructor */ + mga_check_render, /* check - initially set to alloc data */ + mga_run_render /* run */ +}; Index: xc/lib/GL/mesa/src/drv/mga/mgaspan.c diff -u xc/lib/GL/mesa/src/drv/mga/mgaspan.c:1.8 xc/lib/GL/mesa/src/drv/mga/mgaspan.c:1.11 --- xc/lib/GL/mesa/src/drv/mga/mgaspan.c:1.8 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgaspan.c Wed Oct 30 07:51:36 2002 @@ -22,35 +22,37 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaspan.c,v 1.8 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaspan.c,v 1.11 2002/10/30 12:51:36 alanh Exp $ */ -#include "types.h" +#include "mtypes.h" #include "mgadd.h" #include "mgacontext.h" #include "mgaspan.h" #include "mgaioctl.h" +#include "swrast/swrast.h" #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); \ - GLuint 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; \ (void) read_buf; (void) buf; (void) p + #define LOCAL_DEPTH_VARS \ @@ -63,10 +65,8 @@ mgaScreen->depthOffset + \ dPriv->x * mgaScreen->cpp + \ dPriv->y * pitch) - -#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS -#define INIT_MONO_PIXEL(p) +#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS #define CLIPPIXEL(_x,_y) (_x >= minx && _x < maxx && \ _y >= miny && _y < maxy) @@ -113,6 +113,12 @@ /* 16 bit, 565 rgb color spanline and pixel functions */ #define Y_FLIP(_y) (height - _y - 1) + +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = MGAPACKCOLOR565( color[0], color[1], color[2] ) + + #define WRITE_RGBA( _x, _y, r, g, b, a ) \ *(GLushort *)(buf + _x*2 + _y*pitch) = ( (((int)r & 0xf8) << 8) | \ (((int)g & 0xfc) << 3) | \ @@ -139,6 +145,12 @@ /* 32 bit, 8888 argb color spanline and pixel functions */ + +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = MGAPACKCOLOR8888( color[0], color[1], color[2], color[3] ) + + #define WRITE_RGBA(_x, _y, r, g, b, a) \ *(GLuint *)(buf + _x*4 + _y*pitch) = ((r << 16) | \ (g << 8) | \ @@ -221,51 +233,70 @@ +static void mgaDDSetReadBuffer(GLcontext *ctx, GLframebuffer *buffer, + GLenum mode ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + if (mode == GL_FRONT_LEFT) + { + mmesa->readOffset = mmesa->mgaScreen->frontOffset; + mmesa->read_buffer = MGA_FRONT; + } + else + { + mmesa->readOffset = mmesa->mgaScreen->backOffset; + mmesa->read_buffer = MGA_BACK; + } +} + void mgaDDInitSpanFuncs( GLcontext *ctx ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); + struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); + swdd->SetReadBuffer = mgaDDSetReadBuffer; + switch (mmesa->mgaScreen->cpp) { case 2: - ctx->Driver.WriteRGBASpan = mgaWriteRGBASpan_565; - ctx->Driver.WriteRGBSpan = mgaWriteRGBSpan_565; - ctx->Driver.WriteMonoRGBASpan = mgaWriteMonoRGBASpan_565; - ctx->Driver.WriteRGBAPixels = mgaWriteRGBAPixels_565; - ctx->Driver.WriteMonoRGBAPixels = mgaWriteMonoRGBAPixels_565; - ctx->Driver.ReadRGBASpan = mgaReadRGBASpan_565; - ctx->Driver.ReadRGBAPixels = mgaReadRGBAPixels_565; - - ctx->Driver.ReadDepthSpan = mgaReadDepthSpan_16; - ctx->Driver.WriteDepthSpan = mgaWriteDepthSpan_16; - ctx->Driver.ReadDepthPixels = mgaReadDepthPixels_16; - ctx->Driver.WriteDepthPixels = mgaWriteDepthPixels_16; + swdd->WriteRGBASpan = mgaWriteRGBASpan_565; + swdd->WriteRGBSpan = mgaWriteRGBSpan_565; + swdd->WriteMonoRGBASpan = mgaWriteMonoRGBASpan_565; + swdd->WriteRGBAPixels = mgaWriteRGBAPixels_565; + swdd->WriteMonoRGBAPixels = mgaWriteMonoRGBAPixels_565; + swdd->ReadRGBASpan = mgaReadRGBASpan_565; + swdd->ReadRGBAPixels = mgaReadRGBAPixels_565; + + swdd->ReadDepthSpan = mgaReadDepthSpan_16; + swdd->WriteDepthSpan = mgaWriteDepthSpan_16; + swdd->ReadDepthPixels = mgaReadDepthPixels_16; + swdd->WriteDepthPixels = mgaWriteDepthPixels_16; break; case 4: - ctx->Driver.WriteRGBASpan = mgaWriteRGBASpan_8888; - ctx->Driver.WriteRGBSpan = mgaWriteRGBSpan_8888; - ctx->Driver.WriteMonoRGBASpan = mgaWriteMonoRGBASpan_8888; - ctx->Driver.WriteRGBAPixels = mgaWriteRGBAPixels_8888; - ctx->Driver.WriteMonoRGBAPixels = mgaWriteMonoRGBAPixels_8888; - ctx->Driver.ReadRGBASpan = mgaReadRGBASpan_8888; - ctx->Driver.ReadRGBAPixels = mgaReadRGBAPixels_8888; - + swdd->WriteRGBASpan = mgaWriteRGBASpan_8888; + swdd->WriteRGBSpan = mgaWriteRGBSpan_8888; + swdd->WriteMonoRGBASpan = mgaWriteMonoRGBASpan_8888; + swdd->WriteRGBAPixels = mgaWriteRGBAPixels_8888; + swdd->WriteMonoRGBAPixels = mgaWriteMonoRGBAPixels_8888; + swdd->ReadRGBASpan = mgaReadRGBASpan_8888; + swdd->ReadRGBAPixels = mgaReadRGBAPixels_8888; + if (!mmesa->hw_stencil) { - ctx->Driver.ReadDepthSpan = mgaReadDepthSpan_32; - ctx->Driver.WriteDepthSpan = mgaWriteDepthSpan_32; - ctx->Driver.ReadDepthPixels = mgaReadDepthPixels_32; - ctx->Driver.WriteDepthPixels = mgaWriteDepthPixels_32; + swdd->ReadDepthSpan = mgaReadDepthSpan_32; + swdd->WriteDepthSpan = mgaWriteDepthSpan_32; + swdd->ReadDepthPixels = mgaReadDepthPixels_32; + swdd->WriteDepthPixels = mgaWriteDepthPixels_32; } else { - ctx->Driver.ReadDepthSpan = mgaReadDepthSpan_24_8; - ctx->Driver.WriteDepthSpan = mgaWriteDepthSpan_24_8; - ctx->Driver.ReadDepthPixels = mgaReadDepthPixels_24_8; - ctx->Driver.WriteDepthPixels = mgaWriteDepthPixels_24_8; - - ctx->Driver.ReadStencilSpan = mgaReadStencilSpan_24_8; - ctx->Driver.WriteStencilSpan = mgaWriteStencilSpan_24_8; - ctx->Driver.ReadStencilPixels = mgaReadStencilPixels_24_8; - ctx->Driver.WriteStencilPixels = mgaWriteStencilPixels_24_8; + swdd->ReadDepthSpan = mgaReadDepthSpan_24_8; + swdd->WriteDepthSpan = mgaWriteDepthSpan_24_8; + swdd->ReadDepthPixels = mgaReadDepthPixels_24_8; + swdd->WriteDepthPixels = mgaWriteDepthPixels_24_8; + + swdd->ReadStencilSpan = mgaReadStencilSpan_24_8; + swdd->WriteStencilSpan = mgaWriteStencilSpan_24_8; + swdd->ReadStencilPixels = mgaReadStencilPixels_24_8; + swdd->WriteStencilPixels = mgaWriteStencilPixels_24_8; } break; } Index: xc/lib/GL/mesa/src/drv/mga/mgaspan.h diff -u xc/lib/GL/mesa/src/drv/mga/mgaspan.h:1.2 xc/lib/GL/mesa/src/drv/mga/mgaspan.h:1.3 --- xc/lib/GL/mesa/src/drv/mga/mgaspan.h:1.2 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgaspan.h Wed Oct 30 07:51:36 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaspan.h,v 1.2 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaspan.h,v 1.3 2002/10/30 12:51:36 alanh Exp $ */ /* * Copyright 2000-2001 VA Linux Systems, Inc. * All Rights Reserved. @@ -23,7 +23,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ #ifndef _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.11 xc/lib/GL/mesa/src/drv/mga/mgastate.c:1.13 --- xc/lib/GL/mesa/src/drv/mga/mgastate.c:1.11 Thu May 31 04:29:42 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgastate.c Wed Oct 30 07:51:36 2002 @@ -22,14 +22,13 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.11 2001/05/31 08:29:42 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.13 2002/10/30 12:51:36 alanh Exp $ */ #include -#include "types.h" -#include "pb.h" +#include "mtypes.h" #include "dd.h" #include "mm.h" @@ -39,9 +38,17 @@ #include "mgatex.h" #include "mgavb.h" #include "mgatris.h" +#include "mgaioctl.h" #include "mgaregs.h" #include "mgabuffers.h" +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "swrast_setup/swrast_setup.h" + + + /* Some outstanding problems with accelerating logic ops... */ #if defined(ACCEL_ROP) @@ -200,6 +207,7 @@ { mgaContextPtr mmesa = MGA_CONTEXT(ctx); + /* KW: should the ~ be there? */ 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; @@ -261,7 +269,7 @@ } -static void mgaDDAlphaFunc(GLcontext *ctx, GLenum func, GLclampf ref) +static void mgaDDAlphaFunc(GLcontext *ctx, GLenum func, GLchan ref) { FLUSH_BATCH( MGA_CONTEXT(ctx) ); MGA_CONTEXT(ctx)->new_state |= MGA_NEW_ALPHA; @@ -272,12 +280,13 @@ { 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; + /* BlendEquation sets ColorLogicOpEnabled in an unexpected + * manner. + */ + FALLBACK( ctx, MGA_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && + ctx->Color.LogicOp != GL_COPY)); } static void mgaDDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor) @@ -317,10 +326,6 @@ { 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) @@ -338,42 +343,26 @@ #else static void mgaDDLogicOp( GLcontext *ctx, GLenum opcode ) { - 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; + FLUSH_BATCH( MGA_CONTEXT(ctx) ); + FALLBACK( ctx, MGA_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && opcode != GL_COPY) ); } #endif + -static void mgaUpdateFogAttrib( GLcontext *ctx ) +static void mgaDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) { 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 (pname == GL_FOG_COLOR) { + 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) + MGA_STATECHANGE(mmesa, MGA_UPLOAD_CONTEXT); 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_CONTEXT; -} - -static void mgaDDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) -{ - FLUSH_BATCH( MGA_CONTEXT(ctx) ); - MGA_CONTEXT(ctx)->new_state |= MGA_NEW_FOG; + } } @@ -391,7 +380,7 @@ int a = 0; /* determine source of alpha for blending and testing */ - if ( !ctx->Texture.ReallyEnabled ) { + if ( !ctx->Texture._ReallyEnabled ) { a |= AC_alphasel_diffused; } else { @@ -487,7 +476,7 @@ a |= AC_src_zero; break; case GL_SRC_ALPHA_SATURATE: - if (ctx->Visual->AlphaBits > 0) + if (ctx->Visual.alphaBits > 0) a |= AC_src_src_alpha_sat; else a |= AC_src_zero; @@ -584,38 +573,18 @@ MGA_CONTEXT(ctx)->new_state |= MGA_NEW_CLIP; } - -/* ====================================================================== - * New stuff for DRI state. - */ - -static void mgaDDDither(GLcontext *ctx, GLboolean enable) -{ -} - - - -static void mgaDDSetColor(GLcontext *ctx, - GLubyte r, GLubyte g, - GLubyte b, GLubyte a ) +static void mgaDDClearColor(GLcontext *ctx, + const GLchan color[4] ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); - mmesa->MonoColor = mgaPackColor( mmesa->mgaScreen->cpp, r, g, b, a ); + mmesa->ClearColor = mgaPackColor( mmesa->mgaScreen->cpp, + color[0], color[1], + color[2], color[3]); } -static void mgaDDClearColor(GLcontext *ctx, - GLubyte r, GLubyte g, - GLubyte b, GLubyte a ) -{ - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - - mmesa->ClearColor = mgaPackColor( mmesa->mgaScreen->cpp, r, g, b, a ); -} - - /* ============================================================= * Culling */ @@ -625,22 +594,22 @@ #define _CULL_POSITIVE (1<<11) -static void mgaUpdateCull( GLcontext *ctx ) +void mgaUpdateCull( GLcontext *ctx ) { 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 && + mmesa->raster_primitive == GL_TRIANGLES && + 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) - mode ^= (_CULL_POSITIVE ^ _CULL_NEGATIVE); /* why??? */ + if (ctx->Texture._ReallyEnabled == (TEXTURE0_2D|TEXTURE1_2D)) + mode ^= (_CULL_POSITIVE ^ _CULL_NEGATIVE); /* warp bug? */ } mmesa->setup.wflag = mode; @@ -661,11 +630,9 @@ * Color masks */ -/* Mesa calls this from the wrong place: - */ -static GLboolean mgaDDColorMask(GLcontext *ctx, - GLboolean r, GLboolean g, - GLboolean b, GLboolean a ) +static void mgaDDColorMask(GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); mgaScreenPrivate *mgaScreen = mmesa->mgaScreen; @@ -681,13 +648,9 @@ mask = mask | (mask << 16); if (mmesa->setup.plnwt != mask) { - FLUSH_BATCH( MGA_CONTEXT(ctx) ); - mmesa->setup.plnwt = mask; - MGA_CONTEXT(ctx)->new_state |= MGA_NEW_MASK; - mmesa->dirty |= MGA_UPLOAD_CONTEXT; + MGA_STATECHANGE( mmesa, MGA_UPLOAD_CONTEXT ); + mmesa->setup.plnwt = mask; } - - return 0; /* Kind of a hack */ } /* ============================================================= @@ -724,16 +687,12 @@ const GLubyte *m = mask; GLubyte p[4]; int i,j,k; - int active = (ctx->Polygon.StippleFlag && ctx->PB->primitive == GL_POLYGON); + int active = (ctx->Polygon.StippleFlag && + mmesa->raster_primitive == GL_TRIANGLES); GLuint stipple; FLUSH_BATCH(mmesa); - - /* 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; + mmesa->haveHwStipple = 0; if (active) { mmesa->dirty |= MGA_UPLOAD_CONTEXT; @@ -760,19 +719,13 @@ for (i = 0 ; i < 16 ; i++) if (mgaStipples[i] == stipple) { mmesa->poly_stipple = i<<20; + mmesa->haveHwStipple = 1; break; } - - if (i == 16) { - return; - } - - mmesa->canDoStipple = GL_TRUE; - + if (active) { mmesa->setup.dwgctl &= ~(0xf<<20); mmesa->setup.dwgctl |= mmesa->poly_stipple; - ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; } } @@ -833,8 +786,12 @@ mmesa->dirty |= MGA_UPLOAD_TEX1|MGA_UPLOAD_TEX0; } - mmesa->sarea->WarpPipe = mmesa->warp_pipe; - mmesa->sarea->vertsize = mmesa->vertsize; + if (mmesa->dirty & MGA_UPLOAD_PIPE) { +/* mmesa->sarea->wacceptseq = mmesa->hw_primitive; */ + mmesa->sarea->WarpPipe = mmesa->vertex_format; + mmesa->sarea->vertsize = mmesa->vertex_size; + } + mmesa->sarea->dirty |= mmesa->dirty; mmesa->dirty &= (MGA_UPLOAD_CLIPRECTS|MGA_WAIT_AGE); @@ -842,7 +799,7 @@ /* 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 || + 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; @@ -850,11 +807,51 @@ } } +/* Fallback to swrast for select and feedback. + */ +static void mgaRenderMode( GLcontext *ctx, GLenum mode ) +{ + FALLBACK( ctx, MGA_FALLBACK_RENDERMODE, (mode != GL_RENDER) ); +} /* ============================================================= */ +void mgaCalcViewport( GLcontext *ctx ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + const GLfloat *v = ctx->Viewport._WindowMap.m; + GLfloat *m = mmesa->hw_viewport; + + /* See also mga_translate_vertex. + */ + m[MAT_SX] = v[MAT_SX]; + m[MAT_TX] = v[MAT_TX] + mmesa->drawX + SUBPIXEL_X; + m[MAT_SY] = - v[MAT_SY]; + m[MAT_TY] = - v[MAT_TY] + mmesa->driDrawable->h + mmesa->drawY + SUBPIXEL_Y; + m[MAT_SZ] = v[MAT_SZ] * mmesa->depth_scale; + m[MAT_TZ] = v[MAT_TZ] * mmesa->depth_scale; + + mmesa->SetupNewInputs = ~0; +} + +static void mgaViewport( GLcontext *ctx, + GLint x, GLint y, + GLsizei width, GLsizei height ) +{ + mgaCalcViewport( ctx ); +} + +static void mgaDepthRange( GLcontext *ctx, + GLclampd nearval, GLclampd farval ) +{ + mgaCalcViewport( ctx ); +} + +/* ============================================================= + */ + static void mgaDDEnable(GLcontext *ctx, GLenum cap, GLboolean state) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); @@ -870,18 +867,15 @@ /* 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; + FALLBACK( ctx, MGA_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && + ctx->Color.LogicOp != GL_COPY)); 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; + FALLBACK (ctx, MGA_FALLBACK_DEPTH, + ctx->Depth.Func == GL_NEVER && ctx->Depth.Test); break; case GL_SCISSOR_TEST: FLUSH_BATCH( mmesa ); @@ -889,8 +883,11 @@ mmesa->new_state |= MGA_NEW_CLIP; break; case GL_FOG: - FLUSH_BATCH( mmesa ); - mmesa->new_state |= MGA_NEW_FOG; + MGA_STATECHANGE( mmesa, MGA_UPLOAD_CONTEXT ); + if (ctx->Fog.Enabled) + mmesa->setup.maccess |= MA_fogen_enable; + else + mmesa->setup.maccess &= ~MA_fogen_enable; break; case GL_CULL_FACE: FLUSH_BATCH( mmesa ); @@ -903,28 +900,19 @@ mmesa->new_state |= (MGA_NEW_TEXTURE|MGA_NEW_ALPHA); break; case GL_POLYGON_STIPPLE: - FLUSH_BATCH(mmesa); - mmesa->dirty |= MGA_UPLOAD_CONTEXT; - mmesa->setup.dwgctl &= ~(0xf<<20); - if (state) { - if (mmesa->canDoStipple && ctx->PB->primitive == GL_POLYGON) { + if (mmesa->haveHwStipple && mmesa->raster_primitive == GL_TRIANGLES) { + FLUSH_BATCH(mmesa); + mmesa->dirty |= MGA_UPLOAD_CONTEXT; + mmesa->setup.dwgctl &= ~(0xf<<20); + if (state) 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: FLUSH_BATCH( mmesa ); #if !defined(ACCEL_ROP) - mmesa->Fallback &= ~MGA_FALLBACK_LOGICOP; - if (state && ctx->Color.LogicOp != GL_COPY) - mmesa->Fallback |= MGA_FALLBACK_LOGICOP; + FALLBACK( ctx, MGA_FALLBACK_LOGICOP, + (state && ctx->Color.LogicOp != GL_COPY)); #else mmesa->new_state |= MGA_NEW_DEPTH; #endif @@ -933,10 +921,8 @@ FLUSH_BATCH( mmesa ); if (mmesa->hw_stencil) mmesa->new_state |= MGA_NEW_STENCIL; - else if (state) - mmesa->Fallback |= MGA_FALLBACK_STENCIL; else - mmesa->Fallback &= ~MGA_FALLBACK_STENCIL; + FALLBACK( ctx, MGA_FALLBACK_STENCIL, state ); default: break; } @@ -946,45 +932,19 @@ /* ============================================================= */ -/* Just need to note that it has changed - the kernel will do the - * upload the next time we fire a dma buffer. - */ -static void mgaWarpUpdateState( GLcontext *ctx ) -{ - 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 | -/* MGA_TEX1_BIT | */ - 0); - - if (index != mmesa->warp_pipe) - { - FLUSH_BATCH(mmesa); - mmesa->warp_pipe = index; - mmesa->new_state |= MGA_NEW_WARP; - mmesa->dirty |= MGA_UPLOAD_PIPE; - } -} - /* ============================================================= */ static void mgaDDPrintState( const char *msg, GLuint state ) { - fprintf(stderr, "%s (0x%x): %s%s%s%s%s%s%s%s\n", + fprintf(stderr, "%s (0x%x): %s%s%s%s%s%s\n", msg, state, (state & MGA_NEW_DEPTH) ? "depth, " : "", (state & MGA_NEW_ALPHA) ? "alpha, " : "", - (state & MGA_NEW_FOG) ? "fog, " : "", (state & MGA_NEW_CLIP) ? "clip, " : "", - (state & MGA_NEW_MASK) ? "colormask, " : "", (state & MGA_NEW_CULL) ? "cull, " : "", (state & MGA_NEW_TEXTURE) ? "texture, " : "", (state & MGA_NEW_CONTEXT) ? "context, " : ""); @@ -1010,9 +970,6 @@ if (new_state & MGA_NEW_ALPHA) mgaUpdateAlphaMode(ctx); - if (new_state & MGA_NEW_FOG) - mgaUpdateFogAttrib(ctx); - if (new_state & MGA_NEW_CLIP) mgaUpdateClipping(ctx); @@ -1027,60 +984,14 @@ } } - -void mgaDDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ) -{ - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - - FLUSH_BATCH( mmesa ); - mgaUpdateCull(ctx); - - 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)) -void mgaDDUpdateState( GLcontext *ctx ) +static void mgaDDInvalidateState( GLcontext *ctx, GLuint new_state ) { - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - - if (ctx->NewState & INTERESTED) { - 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 (!mmesa->Fallback) { - ctx->IndirectTriangles &= ~DD_SW_RASTERIZE; - ctx->IndirectTriangles |= mmesa->IndirectTriangles; - - ctx->Driver.PointsFunc=mmesa->PointsFunc; - ctx->Driver.LineFunc=mmesa->LineFunc; - ctx->Driver.TriangleFunc=mmesa->TriangleFunc; - ctx->Driver.QuadFunc=mmesa->QuadFunc; - } - else { - ctx->IndirectTriangles |= mmesa->IndirectTriangles; - } + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + MGA_CONTEXT(ctx)->new_gl_state |= new_state; } @@ -1123,7 +1034,7 @@ exit( 1 ); } - switch (mmesa->glCtx->Visual->DepthBits) { + switch (mmesa->glCtx->Visual.depthBits) { case 16: mmesa->setup.maccess |= MA_zwidth_16; break; @@ -1175,7 +1086,7 @@ void mgaDDInitStateFuncs( GLcontext *ctx ) { - ctx->Driver.UpdateState = mgaDDUpdateState; + ctx->Driver.UpdateState = mgaDDInvalidateState; ctx->Driver.Enable = mgaDDEnable; ctx->Driver.LightModelfv = mgaDDLightModelfv; ctx->Driver.AlphaFunc = mgaDDAlphaFunc; @@ -1190,16 +1101,10 @@ ctx->Driver.CullFace = mgaDDCullFaceFrontFace; ctx->Driver.FrontFace = mgaDDCullFaceFrontFace; ctx->Driver.ColorMask = mgaDDColorMask; - ctx->Driver.ReducedPrimitiveChange = mgaDDReducedPrimitiveChange; - ctx->Driver.RenderStart = mgaDDUpdateHwState; - ctx->Driver.RenderFinish = 0; ctx->Driver.SetDrawBuffer = mgaDDSetDrawBuffer; - ctx->Driver.SetReadBuffer = mgaDDSetReadBuffer; - ctx->Driver.Color = mgaDDSetColor; ctx->Driver.ClearColor = mgaDDClearColor; ctx->Driver.ClearDepth = mgaDDClearDepth; - ctx->Driver.Dither = mgaDDDither; ctx->Driver.LogicOpcode = mgaDDLogicOp; ctx->Driver.PolygonStipple = mgaDDPolygonStipple; @@ -1208,7 +1113,17 @@ ctx->Driver.StencilMask = mgaDDStencilMask; ctx->Driver.StencilOp = mgaDDStencilOp; - ctx->Driver.Index = 0; + ctx->Driver.DepthRange = mgaDepthRange; + ctx->Driver.Viewport = mgaViewport; + ctx->Driver.RenderMode = mgaRenderMode; + ctx->Driver.ClearIndex = 0; ctx->Driver.IndexMask = 0; + + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; } Index: xc/lib/GL/mesa/src/drv/mga/mgastate.h diff -u xc/lib/GL/mesa/src/drv/mga/mgastate.h:1.3 xc/lib/GL/mesa/src/drv/mga/mgastate.h:1.5 --- xc/lib/GL/mesa/src/drv/mga/mgastate.h:1.3 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgastate.h Wed Oct 30 07:51:36 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.h,v 1.3 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.h,v 1.5 2002/10/30 12:51:36 alanh Exp $ */ /* * Copyright 2000-2001 VA Linux Systems, Inc. * All Rights Reserved. @@ -23,21 +23,19 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ #ifndef _MGA_STATE_H #define _MGA_STATE_H +extern void mgaInitState( mgaContextPtr mmesa ); extern void mgaDDInitStateFuncs(GLcontext *ctx); extern void mgaDDUpdateHwState( GLcontext *ctx ); -extern void mgaDDUpdateState( GLcontext *ctx ); -extern void mgaDDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ); - -extern void mgaInitState( mgaContextPtr mmesa ); - extern void mgaUpdateClipping(const GLcontext *ctx); +extern void mgaUpdateCull( GLcontext *ctx ); +extern void mgaCalcViewport( GLcontext *ctx ); Index: xc/lib/GL/mesa/src/drv/mga/mgatex.c diff -u xc/lib/GL/mesa/src/drv/mga/mgatex.c:1.12 xc/lib/GL/mesa/src/drv/mga/mgatex.c:1.14 --- xc/lib/GL/mesa/src/drv/mga/mgatex.c:1.12 Fri Aug 17 22:51:05 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgatex.c Wed Oct 30 07:51:36 2002 @@ -22,9 +22,9 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.12 2001/08/18 02:51:05 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.14 2002/10/30 12:51:36 alanh Exp $ */ #include #include @@ -34,14 +34,18 @@ #include "mgacontext.h" #include "mgatex.h" #include "mgaregs.h" +#include "mgatris.h" #include "mgaioctl.h" -#include "context.h" #include "enums.h" #include "simple_list.h" #include "mem.h" -#include "texutil.h" +#include "macros.h" +#include "texformat.h" +#include "texstore.h" +#include "swrast/swrast.h" + #define TEX_0 1 #define TEX_1 2 @@ -60,7 +64,7 @@ mmFreeMem( t->MemBlock ); t->MemBlock = 0; - if (t->age > mmesa->dirtyAge) + if (mmesa && t->age > mmesa->dirtyAge) mmesa->dirtyAge = t->age; } @@ -69,9 +73,11 @@ 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 (mmesa) { + if (t->bound & TEX_0) mmesa->CurrentTexObj[0] = 0; + if (t->bound & TEX_1) mmesa->CurrentTexObj[1] = 0; + } + remove_from_list(t); FREE( t ); } @@ -157,9 +163,9 @@ 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 ) ); + _mesa_lookup_enum_by_nr( texImage->IntFormat ), + _mesa_lookup_enum_by_nr( format ), + _mesa_lookup_enum_by_nr( type ) ); #define SET_FORMAT( r, gl ) \ do { \ @@ -179,8 +185,13 @@ } while (0) switch ( texImage->IntFormat ) { - case GL_RGBA: + /* 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 4: + case GL_RGBA: + case GL_COMPRESSED_RGBA: if ( format == GL_BGRA ) { if ( type == GL_UNSIGNED_INT_8_8_8_8_REV ) { SET_FORMAT( TMC_tformat_tw32, _mesa_texformat_argb8888 ); @@ -197,8 +208,9 @@ TMC_tformat_tw12, _mesa_texformat_argb4444 ); break; - case GL_RGB: case 3: + case GL_RGB: + case GL_COMPRESSED_RGB: if ( format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 ) { SET_FORMAT( TMC_tformat_tw16, _mesa_texformat_rgb565 ); break; @@ -207,6 +219,9 @@ 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: @@ -217,17 +232,12 @@ case GL_RGBA4: case GL_RGBA2: - case GL_RGB5_A1: SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); break; -#if 0 case GL_RGB5_A1: - /* GH: Leave this until we use the new texture conversion code. - */ SET_FORMAT( TMC_tformat_tw15, _mesa_texformat_argb1555 ); break; -#endif case GL_RGB8: case GL_RGB10: @@ -248,6 +258,7 @@ case GL_ALPHA8: case GL_ALPHA12: case GL_ALPHA16: + case GL_COMPRESSED_ALPHA: /* FIXME: This will report incorrect component sizes... */ SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); break; @@ -258,6 +269,7 @@ case GL_LUMINANCE8: case GL_LUMINANCE12: case GL_LUMINANCE16: + case GL_COMPRESSED_LUMINANCE: /* FIXME: This will report incorrect component sizes... */ SET_FORMAT( TMC_tformat_tw16, _mesa_texformat_rgb565 ); break; @@ -270,6 +282,7 @@ case GL_LUMINANCE12_ALPHA4: case GL_LUMINANCE12_ALPHA12: case GL_LUMINANCE16_ALPHA16: + case GL_COMPRESSED_LUMINANCE_ALPHA: /* FIXME: This will report incorrect component sizes... */ SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); break; @@ -279,6 +292,7 @@ case GL_INTENSITY8: case GL_INTENSITY12: case GL_INTENSITY16: + case GL_COMPRESSED_INTENSITY: /* FIXME: This will report incorrect component sizes... */ SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); break; @@ -417,7 +431,7 @@ static void mgaUpdateTextureEnvG200( GLcontext *ctx ) { - struct gl_texture_object *tObj = ctx->Texture.Unit[0].Current; + struct gl_texture_object *tObj = ctx->Texture.Unit[0]._Current; mgaTextureObjectPtr t; if (!tObj || !tObj->DriverData) @@ -439,7 +453,7 @@ t->setup.texctl2 |= TMC_decalblend_enable; break; case GL_BLEND: - t->ctx->Fallback |= MGA_FALLBACK_TEXTURE; + FALLBACK( ctx, MGA_FALLBACK_TEXTURE, GL_TRUE ); break; default: break; @@ -451,13 +465,10 @@ mgaContextPtr mmesa = MGA_CONTEXT( ctx ); GLuint *reg = ((GLuint *)&mmesa->setup.tdualstage0 + unit); GLuint source = mmesa->tmu_source[unit]; - struct gl_texture_object *tObj = ctx->Texture.Unit[source].Current; + 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].Current2D || !tObj ) return; format = tObj->Image[tObj->BaseLevel]->Format; @@ -483,16 +494,16 @@ case GL_MODULATE: if (unit == 0) { *reg = ( TD0_color_arg2_diffuse | - TD0_color_sel_mulout | + TD0_color_sel_mul | TD0_alpha_arg2_diffuse | - TD0_alpha_sel_mulout); + TD0_alpha_sel_mul); } else { *reg = ( TD0_color_arg2_prevstage | TD0_color_alpha_prevstage | - TD0_color_sel_mulout | + TD0_color_sel_mul | TD0_alpha_arg2_prevstage | - TD0_alpha_sel_mulout); + TD0_alpha_sel_mul); } break; case GL_DECAL: @@ -538,7 +549,7 @@ } #else /* s/w fallback, pretty sure we can't do in h/w */ - mmesa->Fallback |= MGA_FALLBACK_TEXTURE; + FALLBACK( ctx, MGA_FALLBACK_TEXTURE, GL_TRUE ); if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) fprintf( stderr, "FALLBACK: GL_DECAL RGBA texture, unit=%d\n", unit ); @@ -565,44 +576,44 @@ if (format == GL_INTENSITY) *reg = ( TD0_color_arg2_diffuse | TD0_color_add_add | - TD0_color_sel_addout | + TD0_color_sel_add | TD0_alpha_arg2_diffuse | TD0_alpha_add_enable | - TD0_alpha_sel_addout); + TD0_alpha_sel_add); else if (format == GL_ALPHA) *reg = ( TD0_color_arg2_diffuse | - TD0_color_sel_mulout | + TD0_color_sel_mul | TD0_alpha_arg2_diffuse | - TD0_alpha_sel_mulout); + TD0_alpha_sel_mul); else *reg = ( TD0_color_arg2_diffuse | TD0_color_add_add | - TD0_color_sel_addout | + TD0_color_sel_add | TD0_alpha_arg2_diffuse | - TD0_alpha_sel_mulout); + TD0_alpha_sel_mul); } else { if (format == GL_INTENSITY) { *reg = ( TD0_color_arg2_prevstage | TD0_color_add_add | - TD0_color_sel_addout | + TD0_color_sel_add | TD0_alpha_arg2_prevstage | TD0_alpha_add_enable | - TD0_alpha_sel_addout); + TD0_alpha_sel_add); } else if (format == GL_ALPHA) { *reg = ( TD0_color_arg2_prevstage | - TD0_color_sel_mulout | + TD0_color_sel_mul | TD0_alpha_arg2_prevstage | - TD0_alpha_sel_mulout); + TD0_alpha_sel_mul); } else { *reg = ( TD0_color_arg2_prevstage | TD0_color_alpha_prevstage | TD0_color_add_add | - TD0_color_sel_addout | + TD0_color_sel_add | TD0_alpha_arg2_prevstage | - TD0_alpha_sel_mulout); + TD0_alpha_sel_mul); } } break; @@ -610,12 +621,12 @@ case GL_BLEND: if (format == GL_ALPHA) { *reg = ( TD0_color_arg2_diffuse | - TD0_color_sel_mulout | + TD0_color_sel_mul | TD0_alpha_arg2_diffuse | - TD0_alpha_sel_mulout); + TD0_alpha_sel_mul); } else { - mmesa->Fallback |= MGA_FALLBACK_TEXTURE; + FALLBACK( ctx, MGA_FALLBACK_TEXTURE, GL_TRUE ); if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) fprintf( stderr, "FALLBACK: GL_BLEND envcolor=0x%08x\n", mmesa->envcolor ); @@ -630,7 +641,7 @@ */ *reg = ( TD0_color_arg2_diffuse | TD0_color_arg1_inv_enable | - TD0_color_sel_mulout | + TD0_color_sel_mul | TD0_alpha_arg2_diffuse | TD0_alpha_sel_arg1); } else { @@ -639,7 +650,7 @@ */ *reg = ( TD0_color_arg2_prevstage | TD0_color_add_add | - TD0_color_sel_addout | + TD0_color_sel_add | TD0_alpha_arg2_prevstage | TD0_alpha_sel_arg2); } @@ -652,67 +663,52 @@ -static void mgaUpdateTextureObject( GLcontext *ctx, int unit ) +static void mgaUpdateTextureObject( GLcontext *ctx, int hw_unit ) { mgaTextureObjectPtr t; struct gl_texture_object *tObj; GLuint enabled; mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - GLuint source = mmesa->tmu_source[unit]; + GLuint gl_unit = mmesa->tmu_source[hw_unit]; - enabled = (ctx->Texture.ReallyEnabled>>(source*4))&TEXTURE0_ANY; - tObj = ctx->Texture.Unit[source].Current; + enabled = ctx->Texture.Unit[gl_unit]._ReallyEnabled; + tObj = ctx->Texture.Unit[gl_unit]._Current; if (enabled != TEXTURE0_2D) { - 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" ); + if (enabled) + FALLBACK( ctx, MGA_FALLBACK_TEXTURE, GL_TRUE ); return; } if (tObj->Image[tObj->BaseLevel]->Border > 0) { - mmesa->Fallback |= MGA_FALLBACK_TEXTURE; + FALLBACK( ctx, MGA_FALLBACK_TEXTURE, GL_TRUE ); if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) fprintf( stderr, "FALLBACK: texture border\n" ); return; } -/* if (!tObj) tObj = ctx->Texture.Unit[0].Current; */ -/* if (!tObj) return; */ - if ( !tObj->DriverData ) { mgaCreateTexObj( mmesa, tObj ); if ( !tObj->DriverData ) { - mmesa->Fallback |= MGA_FALLBACK_TEXTURE; - if ( MGA_DEBUG & DEBUG_VERBOSE_FALLBACK ) - fprintf( stderr, "FALLBACK: could not create texture object\n" ); - return; + FALLBACK( ctx, MGA_FALLBACK_TEXTURE, GL_TRUE ); + return; } } t = (mgaTextureObjectPtr)tObj->DriverData; if (t->dirty_images) - mmesa->dirty |= (MGA_UPLOAD_TEX0IMAGE << unit); + mmesa->dirty |= (MGA_UPLOAD_TEX0IMAGE << hw_unit); - mmesa->CurrentTexObj[unit] = t; - t->bound |= unit+1; + mmesa->CurrentTexObj[hw_unit] = t; + t->bound |= hw_unit+1; /* if (t->MemBlock) */ /* mgaUpdateTexLRU( mmesa, t ); */ t->setup.texctl2 &= ~TMC_dualtex_enable; - if (mmesa->multitex) + if (ctx->Texture._ReallyEnabled == (TEXTURE0_2D|TEXTURE1_2D)) t->setup.texctl2 |= TMC_dualtex_enable; t->setup.texctl2 &= ~TMC_specen_enable; @@ -730,7 +726,7 @@ void mgaUpdateTextureState( GLcontext *ctx ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - mmesa->Fallback &= ~MGA_FALLBACK_TEXTURE; + FALLBACK( ctx, MGA_FALLBACK_TEXTURE, GL_FALSE ); if (mmesa->CurrentTexObj[0]) { mmesa->CurrentTexObj[0]->bound = 0; @@ -742,24 +738,23 @@ mmesa->CurrentTexObj[1] = 0; } + if (ctx->Texture._ReallyEnabled == TEXTURE1_2D) { + mmesa->tmu_source[0] = 1; + } else { + mmesa->tmu_source[0] = 0; + } + if (MGA_IS_G400(mmesa)) { mgaUpdateTextureObject( ctx, 0 ); mgaUpdateTextureEnvG400( ctx, 0 ); mmesa->setup.tdualstage1 = mmesa->setup.tdualstage0; - - if (mmesa->multitex || 1) { - mgaUpdateTextureObject( ctx, 1 ); + + if (ctx->Texture._ReallyEnabled == (TEXTURE0_2D|TEXTURE1_2D)) { + mgaUpdateTextureObject( ctx, 1 ); mgaUpdateTextureEnvG400( ctx, 1 ); + mmesa->dirty |= MGA_UPLOAD_TEX1; } -/* 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 ); @@ -768,7 +763,7 @@ mmesa->dirty |= MGA_UPLOAD_CONTEXT | MGA_UPLOAD_TEX0; mmesa->setup.dwgctl &= DC_opcod_MASK; - mmesa->setup.dwgctl |= (ctx->Texture.ReallyEnabled + mmesa->setup.dwgctl |= (ctx->Texture._ReallyEnabled ? DC_opcod_texture_trap : DC_opcod_trap); } @@ -819,70 +814,50 @@ } } - -static void mgaDDTexImage( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, GLint level, - GLint internalFormat, - const struct gl_texture_image *image ) -{ - 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. */ - t = (mgaTextureObjectPtr) tObj->DriverData; - if ( t ) { - if (t->bound) FLUSH_BATCH(mmesa); - /* if this is the current object, it will force an update */ - mgaDestroyTexObj( mmesa, t ); - mmesa->new_state |= MGA_NEW_TEXTURE; - } - tformat = mgaChooseTexFormat( mmesa, img, img->Format, - GL_UNSIGNED_BYTE ); +static void mgaTexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + mgaTextureObjectPtr t = (mgaTextureObjectPtr) texObj->DriverData; + if (t) { + mgaDestroyTexObj( MGA_CONTEXT(ctx), t ); + texObj->DriverData = 0; + } + _mesa_store_teximage2d( ctx, target, level, internalFormat, + width, height, border, format, type, + pixels, packing, texObj, texImage ); +} + +static void mgaTexSubImage2D( 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 ) +{ + mgaTextureObjectPtr t = (mgaTextureObjectPtr) texObj->DriverData; + if (t) { + mgaDestroyTexObj( MGA_CONTEXT(ctx), t ); + texObj->DriverData = 0; + } + _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, + height, format, type, pixels, packing, texObj, + texImage); - if (0) - fprintf(stderr, "mgaDDTexImage tObj %p, level %d, image %p\n", - tObj, level, image); - } -static void mgaDDTexSubImage( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLint internalFormat, - const struct gl_texture_image *image ) -{ - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - mgaTextureObjectPtr t; - - t = (mgaTextureObjectPtr) tObj->DriverData; - - /* just free the mga texture if it exists, it will be recreated at - mgaUpdateTextureState time. */ - t = (mgaTextureObjectPtr) tObj->DriverData; - if ( t ) { - if (t->bound) FLUSH_BATCH(mmesa); - /* if this is the current object, it will force an update */ - mgaDestroyTexObj( mmesa, t ); - mmesa->new_state |= MGA_NEW_TEXTURE; - } - -#if 0 - /* the texture currently exists, so directly update it */ - mgaUploadSubImage( t, level, xoffset, yoffset, width, height ); -#endif -} - - - /* * mgaTexParameter * This just changes variables and flags for a state update, which @@ -958,15 +933,16 @@ mgaTextureObjectPtr t = (mgaTextureObjectPtr)tObj->DriverData; if ( t ) { - if (t->bound) { - FLUSH_BATCH(mmesa); - if (t->bound & TEX_0) mmesa->CurrentTexObj[0] = 0; - if (t->bound & TEX_1) mmesa->CurrentTexObj[1] = 0; - mmesa->new_state |= MGA_NEW_TEXTURE; + if (mmesa) { + if (t->bound) { + FLUSH_BATCH(mmesa); + if (t->bound & TEX_0) mmesa->CurrentTexObj[0] = 0; + if (t->bound & TEX_1) mmesa->CurrentTexObj[1] = 0; + } + mmesa->new_state |= MGA_NEW_TEXTURE; } mgaDestroyTexObj( mmesa, t ); - mmesa->new_state |= MGA_NEW_TEXTURE; } } @@ -983,8 +959,21 @@ mgaDDInitTextureFuncs( GLcontext *ctx ) { ctx->Driver.TexEnv = mgaDDTexEnv; - ctx->Driver.TexImage = mgaDDTexImage; - ctx->Driver.TexSubImage = mgaDDTexSubImage; + + ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format; + ctx->Driver.TexImage1D = _mesa_store_teximage1d; + ctx->Driver.TexImage2D = mgaTexImage2D; + ctx->Driver.TexImage3D = _mesa_store_teximage3d; + ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d; + ctx->Driver.TexSubImage2D = mgaTexSubImage2D; + ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; + ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; + ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; + ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; + ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; + ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; + ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; + ctx->Driver.BindTexture = mgaDDBindTexture; ctx->Driver.DeleteTexture = mgaDDDeleteTexture; ctx->Driver.TexParameter = mgaDDTexParameter; Index: xc/lib/GL/mesa/src/drv/mga/mgatex.h diff -u xc/lib/GL/mesa/src/drv/mga/mgatex.h:1.6 xc/lib/GL/mesa/src/drv/mga/mgatex.h:1.7 --- xc/lib/GL/mesa/src/drv/mga/mgatex.h:1.6 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgatex.h Wed Oct 30 07:51:36 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.h,v 1.6 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.h,v 1.7 2002/10/30 12:51:36 alanh Exp $ */ /* * Copyright 2000-2001 VA Linux Systems, Inc. * All Rights Reserved. @@ -23,7 +23,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ #ifndef MGATEX_INC Index: xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c diff -u xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c:1.2 xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c:1.3 --- xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c:1.2 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c Wed Oct 30 07:51:36 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c,v 1.2 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatexcnv.c,v 1.3 2002/10/30 12:51:36 alanh Exp $ */ /* * Copyright 2000-2001 VA Linux Systems, Inc. * All Rights Reserved. @@ -23,7 +23,7 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ #include Index: xc/lib/GL/mesa/src/drv/mga/mgatexmem.c diff -u xc/lib/GL/mesa/src/drv/mga/mgatexmem.c:1.4 xc/lib/GL/mesa/src/drv/mga/mgatexmem.c:1.7 --- xc/lib/GL/mesa/src/drv/mga/mgatexmem.c:1.4 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgatexmem.c Wed Oct 30 07:51:36 2002 @@ -22,9 +22,9 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatexmem.c,v 1.4 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatexmem.c,v 1.7 2002/10/30 12:51:36 alanh Exp $ */ #include #include @@ -254,8 +254,18 @@ idx != MGA_NR_TEX_REGIONS && nr < MGA_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 > mmesa->mgaScreen->textureSize[heap] ) { + nr = MGA_NR_TEX_REGIONS; + break; + } + if (sarea->texList[heap][idx].age > mmesa->texAge[heap]) { - mgaTexturesGone(mmesa, heap, idx * sz, sz, 1); + mgaTexturesGone(mmesa, heap, idx * sz, sz, + sarea->texList[heap][idx].in_use); } } @@ -377,7 +387,8 @@ /* Fill in the secondary buffer with properly converted texels * from the mesa buffer. */ - if(t->heap == MGA_CARD_HEAP) { + /* FIXME: the sync for direct copy reduces speed.. */ + if(t->heap == MGA_CARD_HEAP ) { mgaGetILoadBufferLocked( mmesa ); mgaConvertTexture( (GLuint *)mmesa->iload_buffer->address, texelBytes, image, x, y, width, height ); @@ -400,6 +411,8 @@ /* This works, is slower for uploads to card space and needs * additional synchronization with the dma stream. */ + + UPDATE_LOCK(mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT); mgaConvertTexture( (GLuint *) (mmesa->mgaScreen->texVirtual[t->heap] + offset + @@ -434,7 +447,43 @@ static int mgaChooseTexHeap( mgaContextPtr mmesa, mgaTextureObjectPtr t ) { - return 0; + int freeagp, freecard; + int fitincard, fitinagp; + int totalcard, totalagp; + TMemBlock *b; + + totalcard = totalagp = fitincard = fitinagp = freeagp = freecard = 0; + + b = mmesa->texHeap[0]; + while(b) + { + totalcard += b->size; + if(b->free) if(t->totalSize <= b->size)fitincard = 1; + b = b->next; + } + + b = mmesa->texHeap[1]; + while(b) + { + totalagp += b->size; + if(b->free) if(t->totalSize <= b->size)fitinagp = 1; + b = b->next; + } + + if(fitincard)return 0; + if(fitinagp)return 1; + + if(totalcard && totalagp) + { + int ages; + int ratio = (totalcard > totalagp) ? totalcard / totalagp : totalagp / totalcard; + ages = mmesa->sarea->texAge[0] + mmesa->sarea->texAge[1]; + if( (ages % ratio) == 0)return totalcard > totalagp ? 1 : 0; + else return totalcard > totalagp ? 0 : 1; + } + + if(totalagp) return 1; + return 0; } Index: xc/lib/GL/mesa/src/drv/mga/mgatris.c diff -u xc/lib/GL/mesa/src/drv/mga/mgatris.c:1.8 xc/lib/GL/mesa/src/drv/mga/mgatris.c:1.10 --- xc/lib/GL/mesa/src/drv/mga/mgatris.c:1.8 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgatris.c Wed Oct 30 07:51:36 2002 @@ -22,160 +22,894 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.c,v 1.8 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.c,v 1.10 2002/10/30 12:51:36 alanh Exp $ */ #include #include -#include "types.h" -#include "vb.h" -#include "pipeline.h" +#include "mtypes.h" +#include "macros.h" +#include "colormac.h" +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" #include "mm.h" #include "mgacontext.h" +#include "mgaioctl.h" #include "mgatris.h" #include "mgavb.h" +#include "mgastate.h" -#define MGA_COLOR(to, from) { \ - (to)[0] = (from)[2]; \ - (to)[1] = (from)[1]; \ - (to)[2] = (from)[0]; \ - (to)[3] = (from)[3]; \ +static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim ); + +/*********************************************************************** + * Functions to draw basic primitives * + ***********************************************************************/ + + +#if defined (USE_X86_ASM) +#define EMIT_VERT( j, vb, vertex_size, v ) \ +do { int __tmp; \ + __asm__ __volatile__( "rep ; movsl" \ + : "=%c" (j), "=D" (vb), "=S" (__tmp) \ + : "0" (vertex_size), \ + "D" ((long)vb), \ + "S" ((long)v)); \ +} while (0) +#else +#define EMIT_VERT( j, vb, vertex_size, v ) \ +do { \ + for ( j = 0 ; j < vertex_size ; j++ ) \ + vb[j] = (v)->ui[j]; \ + vb += vertex_size; \ +} while (0) +#endif + +static void __inline__ mga_draw_triangle( mgaContextPtr mmesa, + mgaVertexPtr v0, + mgaVertexPtr v1, + mgaVertexPtr v2 ) +{ + GLuint vertex_size = mmesa->vertex_size; + GLuint *vb = mgaAllocDmaLow( mmesa, 3 * 4 * vertex_size ); + int j; + + EMIT_VERT( j, vb, vertex_size, v0 ); + EMIT_VERT( j, vb, vertex_size, v1 ); + EMIT_VERT( j, vb, vertex_size, v2 ); } + -#define MGA_COLOR3(to, from) { \ - (to)[0] = (from)[2]; \ - (to)[1] = (from)[1]; \ - (to)[2] = (from)[0]; \ +static void __inline__ mga_draw_quad( mgaContextPtr mmesa, + mgaVertexPtr v0, + mgaVertexPtr v1, + mgaVertexPtr v2, + mgaVertexPtr v3 ) +{ + GLuint vertex_size = mmesa->vertex_size; + GLuint *vb = mgaAllocDmaLow( mmesa, 6 * 4 * vertex_size ); + int j; + + EMIT_VERT( j, vb, vertex_size, v0 ); + EMIT_VERT( j, vb, vertex_size, v1 ); + EMIT_VERT( j, vb, vertex_size, v3 ); + EMIT_VERT( j, vb, vertex_size, v1 ); + EMIT_VERT( j, vb, vertex_size, v2 ); + EMIT_VERT( j, vb, vertex_size, v3 ); } +static __inline__ void mga_draw_point( mgaContextPtr mmesa, + mgaVertexPtr tmp ) +{ + GLfloat sz = mmesa->glCtx->Point._Size * .5; + int vertex_size = mmesa->vertex_size; + GLuint *vb = mgaAllocDmaLow( mmesa, 6 * 4 * vertex_size ); + int j; + +#if 0 + v0->v.x += PNT_X_OFFSET - TRI_X_OFFSET; + v0->v.y += PNT_Y_OFFSET - TRI_Y_OFFSET; +#endif + + /* Draw a point as two triangles. + */ + *(float *)&vb[0] = tmp->v.x - sz; + *(float *)&vb[1] = tmp->v.y - sz; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = tmp->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = tmp->v.x + sz; + *(float *)&vb[1] = tmp->v.y - sz; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = tmp->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = tmp->v.x + sz; + *(float *)&vb[1] = tmp->v.y + sz; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = tmp->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = tmp->v.x + sz; + *(float *)&vb[1] = tmp->v.y + sz; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = tmp->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = tmp->v.x - sz; + *(float *)&vb[1] = tmp->v.y + sz; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = tmp->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = tmp->v.x - sz; + *(float *)&vb[1] = tmp->v.y - sz; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = tmp->ui[j]; + +#if 0 + v0->v.x -= PNT_X_OFFSET - TRI_X_OFFSET; + v0->v.y -= PNT_Y_OFFSET - TRI_Y_OFFSET; +#endif +} -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) +static __inline__ void mga_draw_line( mgaContextPtr mmesa, + mgaVertexPtr v0, + mgaVertexPtr v1 ) +{ + GLuint vertex_size = mmesa->vertex_size; + GLuint *vb = mgaAllocDmaLow( mmesa, 6 * 4 * vertex_size ); + GLfloat dx, dy, ix, iy; + GLfloat width = mmesa->glCtx->Line._Width; + GLint j; + +#if 0 + v0->v.x += LINE_X_OFFSET - TRI_X_OFFSET; + v0->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; + v1->v.x += LINE_X_OFFSET - TRI_X_OFFSET; + v1->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; +#endif + + dx = v0->v.x - v1->v.x; + dy = v0->v.y - v1->v.y; + + ix = width * .5; iy = 0; + if (dx * dx > dy * dy) { + iy = ix; ix = 0; + } + + *(float *)&vb[0] = v0->v.x - ix; + *(float *)&vb[1] = v0->v.y - iy; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = v0->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = v1->v.x + ix; + *(float *)&vb[1] = v1->v.y + iy; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = v1->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = v0->v.x + ix; + *(float *)&vb[1] = v0->v.y + iy; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = v0->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = v0->v.x - ix; + *(float *)&vb[1] = v0->v.y - iy; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = v0->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = v1->v.x - ix; + *(float *)&vb[1] = v1->v.y - iy; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = v1->ui[j]; + vb += vertex_size; + + *(float *)&vb[0] = v1->v.x + ix; + *(float *)&vb[1] = v1->v.y + iy; + for (j = 2 ; j < vertex_size ; j++) + vb[j] = v1->ui[j]; + vb += vertex_size; + +#if 0 + v0->v.x -= LINE_X_OFFSET - TRI_X_OFFSET; + v0->v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; + v1->v.x -= LINE_X_OFFSET - TRI_X_OFFSET; + v1->v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; +#endif +} + +/*********************************************************************** + * Macros for t_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI( a, b, c ) \ +do { \ + if (DO_FALLBACK) \ + mmesa->draw_tri( mmesa, a, b, c ); \ + else \ + mga_draw_triangle( mmesa, a, b, c ); \ +} while (0) + +#define QUAD( a, b, c, d ) \ +do { \ + if (DO_FALLBACK) { \ + mmesa->draw_tri( mmesa, a, b, d ); \ + mmesa->draw_tri( mmesa, b, c, d ); \ + } else { \ + mga_draw_quad( mmesa, a, b, c, d ); \ + } \ +} while (0) + +#define LINE( v0, v1 ) \ +do { \ + if (DO_FALLBACK) \ + mmesa->draw_line( mmesa, v0, v1 ); \ + else { \ + mga_draw_line( mmesa, v0, v1 ); \ + } \ +} while (0) + +#define POINT( v0 ) \ +do { \ + if (DO_FALLBACK) \ + mmesa->draw_point( mmesa, v0 ); \ + else { \ + mga_draw_point( mmesa, v0 ); \ + } \ +} while (0) + + +/*********************************************************************** + * Fallback to swrast for basic primitives * + ***********************************************************************/ + +/* This code is hit only when a mix of accelerated and unaccelerated + * primitives are being drawn, and only for the unaccelerated + * primitives. + */ + +static void +mga_fallback_tri( mgaContextPtr mmesa, + mgaVertex *v0, + mgaVertex *v1, + mgaVertex *v2 ) +{ + GLcontext *ctx = mmesa->glCtx; + SWvertex v[3]; + mga_translate_vertex( ctx, v0, &v[0] ); + mga_translate_vertex( ctx, v1, &v[1] ); + mga_translate_vertex( ctx, v2, &v[2] ); + _swrast_Triangle( ctx, &v[0], &v[1], &v[2] ); +} + + +static void +mga_fallback_line( mgaContextPtr mmesa, + mgaVertex *v0, + mgaVertex *v1 ) +{ + GLcontext *ctx = mmesa->glCtx; + SWvertex v[2]; + mga_translate_vertex( ctx, v0, &v[0] ); + mga_translate_vertex( ctx, v1, &v[1] ); + _swrast_Line( ctx, &v[0], &v[1] ); +} + + +static void +mga_fallback_point( mgaContextPtr mmesa, + mgaVertex *v0 ) +{ + GLcontext *ctx = mmesa->glCtx; + SWvertex v[1]; + mga_translate_vertex( ctx, v0, &v[0] ); + _swrast_Point( ctx, &v[0] ); +} + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + + +#define MGA_UNFILLED_BIT 0x1 +#define MGA_OFFSET_BIT 0x2 +#define MGA_TWOSIDE_BIT 0x4 +#define MGA_FLAT_BIT 0x8 /* mga can't flatshade? */ +#define MGA_FALLBACK_BIT 0x10 +#define MGA_MAX_TRIFUNC 0x20 + +static struct { + points_func points; + line_func line; + triangle_func triangle; + quad_func quad; +} rast_tab[MGA_MAX_TRIFUNC]; + +#define DO_FALLBACK (IND & MGA_FALLBACK_BIT) +#define DO_OFFSET (IND & MGA_OFFSET_BIT) +#define DO_UNFILLED (IND & MGA_UNFILLED_BIT) +#define DO_TWOSIDE (IND & MGA_TWOSIDE_BIT) +#define DO_FLAT (IND & MGA_FLAT_BIT) +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_BACK_COLORS 0 +#define HAVE_SPEC 1 +#define HAVE_HW_FLATSHADE 0 +#define VERTEX mgaVertex +#define TAB rast_tab + +#define MGA_COLOR( dst, src ) \ +do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ + dst[3] = src[3]; \ +} while (0) + +#define MGA_SPEC( dst, src ) \ +do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ +} while (0) + +#define DEPTH_SCALE mmesa->depth_scale +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW( a ) (a > 0) +#define GET_VERTEX(e) (mmesa->verts + (e<vertex_stride_shift)) + +#define VERT_SET_RGBA( v, c ) MGA_COLOR( v->ub4[4], c ) +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[4] = v1->ui[4] +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[4] +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[4] = color[idx] + +#define VERT_SET_SPEC( v, c ) MGA_SPEC( v->ub4[5], c ) +#define VERT_COPY_SPEC( v0, v1 ) COPY_3V(v0->ub4[5], v1->ub4[5]) +#define VERT_SAVE_SPEC( idx ) spec[idx] = v[idx]->ui[5] +#define VERT_RESTORE_SPEC( idx ) v[idx]->ui[5] = spec[idx] + +#define LOCAL_VARS(n) \ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); \ + GLuint color[n], spec[n]; \ + (void) color; (void) spec; + + + +/*********************************************************************** + * Functions to draw basic unfilled primitives * + ***********************************************************************/ + +#define RASTERIZE(x) if (mmesa->raster_primitive != x) \ + mgaRasterPrimitive( ctx, x, MGA_WA_TRIANGLES ) +#define RENDER_PRIMITIVE mmesa->render_primitive +#define IND MGA_FALLBACK_BIT #define TAG(x) x -#include "mgatritmp.h" +#include "tnl_dd/t_dd_unfilled.h" +#undef IND -#define IND (MGA_FLAT_BIT) -#define TAG(x) x##_flat -#include "mgatritmp.h" +/*********************************************************************** + * Functions to draw GL primitives * + ***********************************************************************/ +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + #define IND (MGA_OFFSET_BIT) #define TAG(x) x##_offset -#include "mgatritmp.h" - -#define IND (MGA_OFFSET_BIT|MGA_FLAT_BIT) -#define TAG(x) x##_offset_flat -#include "mgatritmp.h" +#include "tnl_dd/t_dd_tritmp.h" #define IND (MGA_TWOSIDE_BIT) #define TAG(x) x##_twoside -#include "mgatritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (MGA_TWOSIDE_BIT|MGA_FLAT_BIT) -#define TAG(x) x##_twoside_flat -#include "mgatritmp.h" - #define IND (MGA_TWOSIDE_BIT|MGA_OFFSET_BIT) #define TAG(x) x##_twoside_offset -#include "mgatritmp.h" +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_OFFSET_BIT|MGA_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_OFFSET_BIT|MGA_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_FALLBACK_BIT) +#define TAG(x) x##_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_OFFSET_BIT|MGA_FALLBACK_BIT) +#define TAG(x) x##_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_FALLBACK_BIT) +#define TAG(x) x##_twoside_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_OFFSET_BIT|MGA_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_UNFILLED_BIT|MGA_FALLBACK_BIT) +#define TAG(x) x##_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_OFFSET_BIT|MGA_UNFILLED_BIT|MGA_FALLBACK_BIT) +#define TAG(x) x##_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_UNFILLED_BIT|MGA_FALLBACK_BIT) +#define TAG(x) x##_twoside_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_OFFSET_BIT|MGA_UNFILLED_BIT| \ + MGA_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + + +/* Mga doesn't support provoking-vertex flat-shading? + */ +#define IND (MGA_FLAT_BIT) +#define TAG(x) x##_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_OFFSET_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_offset_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_twoside_flat +#include "tnl_dd/t_dd_tritmp.h" #define IND (MGA_TWOSIDE_BIT|MGA_OFFSET_BIT|MGA_FLAT_BIT) #define TAG(x) x##_twoside_offset_flat -#include "mgatritmp.h" +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_UNFILLED_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_unfilled_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_OFFSET_BIT|MGA_UNFILLED_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_offset_unfilled_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_UNFILLED_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_twoside_unfilled_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_OFFSET_BIT|MGA_UNFILLED_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_twoside_offset_unfilled_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_FALLBACK_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_OFFSET_BIT|MGA_FALLBACK_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_offset_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_FALLBACK_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_twoside_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_OFFSET_BIT|MGA_FALLBACK_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_twoside_offset_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" +#define IND (MGA_UNFILLED_BIT|MGA_FALLBACK_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_unfilled_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" -void mgaDDTrifuncInit() +#define IND (MGA_OFFSET_BIT|MGA_UNFILLED_BIT|MGA_FALLBACK_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_offset_unfilled_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_UNFILLED_BIT|MGA_FALLBACK_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_twoside_unfilled_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (MGA_TWOSIDE_BIT|MGA_OFFSET_BIT|MGA_UNFILLED_BIT| \ + MGA_FALLBACK_BIT|MGA_FLAT_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab( void ) { init(); - init_flat(); init_offset(); - init_offset_flat(); init_twoside(); - init_twoside_flat(); init_twoside_offset(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); + init_fallback(); + init_offset_fallback(); + init_twoside_fallback(); + init_twoside_offset_fallback(); + init_unfilled_fallback(); + init_offset_unfilled_fallback(); + init_twoside_unfilled_fallback(); + init_twoside_offset_unfilled_fallback(); + + init_flat(); + init_offset_flat(); + init_twoside_flat(); init_twoside_offset_flat(); + init_unfilled_flat(); + init_offset_unfilled_flat(); + init_twoside_unfilled_flat(); + init_twoside_offset_unfilled_flat(); + init_fallback_flat(); + init_offset_fallback_flat(); + init_twoside_fallback_flat(); + init_twoside_offset_fallback_flat(); + init_unfilled_fallback_flat(); + init_offset_unfilled_fallback_flat(); + init_twoside_unfilled_fallback_flat(); + init_twoside_offset_unfilled_fallback_flat(); } +/**********************************************************************/ +/* Render whole begin/end objects */ +/**********************************************************************/ + + +#define VERT(x) (mgaVertex *)(vertptr + ((x)<verts; \ + const GLuint vertshift = mmesa->vertex_stride_shift; \ + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ + (void) elt; +#define RESET_STIPPLE +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) x +#define TAG(x) mga_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) mga_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" + + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + + +static void mgaRenderClippedPoly( GLcontext *ctx, const GLuint *elts, GLuint n ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint prim = mmesa->render_primitive; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON]( ctx, 0, n, PRIM_BEGIN|PRIM_END ); + VB->Elts = tmp; + } + + /* Restore the render primitive + */ + if (prim != GL_POLYGON) + tnl->Driver.Render.PrimitiveNotify( ctx, prim ); +} -#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) - -/* 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 mgaDDChooseRenderState(GLcontext *ctx) -{ - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - GLuint flags = ctx->TriangleCaps; - GLuint index = 0; - - 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; - } - - mmesa->PointsFunc = points_tab[index]; - mmesa->LineFunc = line_tab[index]; - mmesa->TriangleFunc = tri_tab[index]; - mmesa->QuadFunc = quad_tab[index]; - - mmesa->renderindex = index; - mmesa->IndirectTriangles = 0; - - if (flags & ANY_FALLBACK) { - if (flags & POINT_FALLBACK) { - mmesa->renderindex |= MGA_FALLBACK_BIT; - mmesa->PointsFunc = 0; - mmesa->IndirectTriangles |= DD_POINT_SW_RASTERIZE; - } - - if (flags & LINE_FALLBACK) { - mmesa->renderindex |= MGA_FALLBACK_BIT; - mmesa->LineFunc = 0; - mmesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; - } - - if (flags & TRI_FALLBACK) { - mmesa->renderindex |= MGA_FALLBACK_BIT; - mmesa->TriangleFunc = 0; - mmesa->QuadFunc = 0; - mmesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | - DD_QUAD_SW_RASTERIZE); - } - /* Special cases: - */ - if ((flags & DD_TRI_STIPPLE) && - (ctx->IndirectTriangles & DD_TRI_STIPPLE)) { - mmesa->renderindex |= MGA_FALLBACK_BIT; - mmesa->TriangleFunc = 0; - 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; - } - } - } +static void mgaRenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line( ctx, ii, jj ); +} + +static void mgaFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) +{ + mgaContextPtr mmesa = MGA_CONTEXT( ctx ); + GLuint vertex_size = mmesa->vertex_size; + GLuint *vb = mgaAllocDmaLow( mmesa, (n-2) * 3 * 4 * vertex_size ); + GLubyte *vertptr = (GLubyte *)mmesa->verts; + const GLuint vertshift = mmesa->vertex_stride_shift; + const GLuint *start = (const GLuint *)VERT(elts[0]); + int i,j; + + for (i = 2 ; i < n ; i++) { + EMIT_VERT( j, vb, vertex_size, (mgaVertexPtr) VERT(elts[i-1]) ); + EMIT_VERT( j, vb, vertex_size, (mgaVertexPtr) VERT(elts[i]) ); + EMIT_VERT( j, vb, vertex_size, (mgaVertexPtr) start ); + } +} + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + + + +#define _MGA_NEW_RENDERSTATE (_DD_NEW_LINE_STIPPLE | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET | \ + _DD_NEW_TRI_STIPPLE | \ + _NEW_POLYGONSTIPPLE) + + +#define POINT_FALLBACK (DD_POINT_SMOOTH) +#define LINE_FALLBACK (DD_LINE_SMOOTH | DD_LINE_STIPPLE) +#define TRI_FALLBACK (DD_TRI_SMOOTH | DD_TRI_UNFILLED) +#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK| \ + DD_TRI_STIPPLE) +#define ANY_RASTER_FLAGS (DD_FLATSHADE|DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET| \ + DD_TRI_UNFILLED) + +static void mgaChooseRenderState(GLcontext *ctx) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint index = 0; + + if (flags & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { + if (flags & ANY_RASTER_FLAGS) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= MGA_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= MGA_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= MGA_UNFILLED_BIT; + if (flags & DD_FLATSHADE) index |= MGA_FLAT_BIT; + } + + mmesa->draw_point = mga_draw_point; + mmesa->draw_line = mga_draw_line; + mmesa->draw_tri = mga_draw_triangle; + + /* Hook in fallbacks for specific primitives. + */ + if (flags & ANY_FALLBACK_FLAGS) + { + if (flags & POINT_FALLBACK) + mmesa->draw_point = mga_fallback_point; + + if (flags & LINE_FALLBACK) + mmesa->draw_line = mga_fallback_line; + + if (flags & TRI_FALLBACK) + mmesa->draw_tri = mga_fallback_tri; + + if ((flags & DD_TRI_STIPPLE) && !mmesa->haveHwStipple) + mmesa->draw_tri = mga_fallback_tri; + + index |= MGA_FALLBACK_BIT; + } + } + + if (mmesa->RenderIndex != index) { + mmesa->RenderIndex = index; + + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = mga_render_tab_verts; + tnl->Driver.Render.PrimTabElts = mga_render_tab_elts; + tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ + tnl->Driver.Render.ClippedPolygon = mgaFastRenderClippedPoly; + } else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = mgaRenderClippedLine; + tnl->Driver.Render.ClippedPolygon = mgaRenderClippedPoly; + } + } +} + +/**********************************************************************/ +/* Runtime render state and callbacks */ +/**********************************************************************/ + + +static void mgaRunPipeline( GLcontext *ctx ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + + if (mmesa->new_state) { + mgaDDUpdateHwState( ctx ); + } + + if (!mmesa->Fallback && mmesa->new_gl_state) { + if (mmesa->new_gl_state & _MGA_NEW_RASTERSETUP) + mgaChooseVertexState( ctx ); + + if (mmesa->new_gl_state & _MGA_NEW_RENDERSTATE) + mgaChooseRenderState( ctx ); + + mmesa->new_gl_state = 0; + + /* Circularity: mgaDDUpdateHwState can affect mmesa->Fallback, + * but mgaChooseVertexState can affect mmesa->new_state. Hence + * the second check. (Fix this...) + */ + if (mmesa->new_state) { + mgaDDUpdateHwState( ctx ); + } + } + + _tnl_run_pipeline( ctx ); +} + + +static GLenum reduced_prim[GL_POLYGON+1] = { + GL_POINTS, + GL_LINES, + GL_LINES, + GL_LINES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES +}; + + + +/* Always called between RenderStart and RenderFinish --> We already + * hold the lock. + */ +void mgaRasterPrimitive( GLcontext *ctx, GLenum prim, GLuint hwprim ) +{ + mgaContextPtr mmesa = MGA_CONTEXT( ctx ); + + FLUSH_BATCH( mmesa ); + mmesa->raster_primitive = prim; +/* mmesa->hw_primitive = hwprim; */ + mmesa->hw_primitive = MGA_WA_TRIANGLES; /* disable mgarender.c for now */ + mgaUpdateCull(ctx); + + if (ctx->Polygon.StippleFlag && mmesa->haveHwStipple) + { + mmesa->dirty |= MGA_UPLOAD_CONTEXT; + if (mmesa->raster_primitive == GL_TRIANGLES) + mmesa->setup.dwgctl |= mmesa->poly_stipple; + else + mmesa->setup.dwgctl &= ~(0xf<<20); + } +} + + + +/* Determine the rasterized primitive when not drawing unfilled + * polygons. + * + * Used only for the default render stage which always decomposes + * primitives to trianges/lines/points. For the accelerated stage, + * which renders strips as strips, the equivalent calculations are + * performed in mgarender.c. + */ +static void mgaRenderPrimitive( GLcontext *ctx, GLenum prim ) +{ + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + GLuint rprim = reduced_prim[prim]; + + mmesa->render_primitive = prim; + + if (rprim == GL_TRIANGLES && (ctx->_TriangleCaps & DD_TRI_UNFILLED)) + return; + + if (mmesa->raster_primitive != rprim) { + mgaRasterPrimitive( ctx, rprim, MGA_WA_TRIANGLES ); + } +} + +static void mgaRenderFinish( GLcontext *ctx ) +{ + if (MGA_CONTEXT(ctx)->RenderIndex & MGA_FALLBACK_BIT) + _swrast_flush( ctx ); +} + + + +/**********************************************************************/ +/* Manage total rasterization fallbacks */ +/**********************************************************************/ + +void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + GLuint oldfallback = mmesa->Fallback; + + if (mode) { + mmesa->Fallback |= bit; + if (oldfallback == 0) { + FLUSH_BATCH(mmesa); + _swsetup_Wakeup( ctx ); + mmesa->RenderIndex = ~0; + } + } + else { + mmesa->Fallback &= ~bit; + if (oldfallback == bit) { + _swrast_flush( ctx ); + tnl->Driver.Render.Start = mgaCheckTexSizes; + tnl->Driver.Render.PrimitiveNotify = mgaRenderPrimitive; + tnl->Driver.Render.Finish = mgaRenderFinish; + tnl->Driver.Render.BuildVertices = mgaBuildVertices; + mmesa->new_gl_state |= (_MGA_NEW_RENDERSTATE | + _MGA_NEW_RASTERSETUP); + } + } +} + + +void mgaDDInitTriFuncs( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + static int firsttime = 1; + if (firsttime) { + init_rast_tab(); + firsttime = 0; + } + + mmesa->RenderIndex = ~0; + + tnl->Driver.RunPipeline = mgaRunPipeline; + tnl->Driver.Render.Start = mgaCheckTexSizes; + tnl->Driver.Render.Finish = mgaRenderFinish; + tnl->Driver.Render.PrimitiveNotify = mgaRenderPrimitive; + tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; + tnl->Driver.Render.BuildVertices = mgaBuildVertices; + tnl->Driver.Render.Multipass = NULL; } Index: xc/lib/GL/mesa/src/drv/mga/mgatris.h diff -u xc/lib/GL/mesa/src/drv/mga/mgatris.h:1.8 xc/lib/GL/mesa/src/drv/mga/mgatris.h:1.10 --- xc/lib/GL/mesa/src/drv/mga/mgatris.h:1.8 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgatris.h Wed Oct 30 07:51:36 2002 @@ -22,198 +22,21 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.h,v 1.8 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatris.h,v 1.10 2002/10/30 12:51:36 alanh Exp $ */ #ifndef MGATRIS_INC #define MGATRIS_INC -#include "types.h" -#include "mgaioctl.h" +#include "mtypes.h" -extern void mgaDDChooseRenderState(GLcontext *ctx); -extern void mgaDDTrifuncInit( void ); +extern void mgaDDInitTriFuncs( GLcontext *ctx ); +extern void mgaRasterPrimitive( GLcontext *ctx, GLenum prim, GLuint hwprim ); -#define MGA_FLAT_BIT 0x1 -#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 *v2 ) -{ - GLuint vertsize = mmesa->vertsize; - GLuint *wv = mgaAllocVertexDwordsInline( mmesa, 3 * vertsize ); - int j; - -#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 - * 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)wv), "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++) - wv[j] = v0->ui[j]; - - wv += vertsize; - for (j = 0 ; j < vertsize ; j++) - wv[j] = v1->ui[j]; - - wv += vertsize; - for (j = 0 ; j < vertsize ; j++) - wv[j] = v2->ui[j]; - } -#endif -} - - -static __inline void mga_draw_point( mgaContextPtr mmesa, - mgaVertex *tmp, float sz ) -{ - GLuint vertsize = mmesa->vertsize; - 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] = x - sz; - *(float *)&wv[1] = y - sz; - for (j = 2 ; j < vertsize ; j++) - wv[j] = tmp->ui[j]; - wv += vertsize; - - *(float *)&wv[0] = x + sz; - *(float *)&wv[1] = y - sz; - for (j = 2 ; j < vertsize ; j++) - wv[j] = tmp->ui[j]; - wv += vertsize; - - *(float *)&wv[0] = x + sz; - *(float *)&wv[1] = y + sz; - for (j = 2 ; j < vertsize ; j++) - wv[j] = tmp->ui[j]; - wv += vertsize; - - *(float *)&wv[0] = x + sz; - *(float *)&wv[1] = y + sz; - for (j = 2 ; j < vertsize ; j++) - wv[j] = tmp->ui[j]; - wv += vertsize; - - *(float *)&wv[0] = x - sz; - *(float *)&wv[1] = y + sz; - for (j = 2 ; j < vertsize ; j++) - wv[j] = tmp->ui[j]; - wv += vertsize; - - *(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 *tmp1, - float width ) -{ - 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; - 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 *)&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] = x1 + ix; - *(float *)&wv[1] = y1 + iy; - for (j = 2 ; j < vertsize ; j++) - wv[j] = tmp1->ui[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; - - *(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] = x1 - ix; - *(float *)&wv[1] = y1 - iy; - for (j = 2 ; j < vertsize ; j++) - wv[j] = tmp1->ui[j]; - wv += vertsize; - - *(float *)&wv[0] = x1 + ix; - *(float *)&wv[1] = y1 + iy; - for (j = 2 ; j < vertsize ; j++) - wv[j] = tmp1->ui[j]; - wv += vertsize; -} - +extern void mgaFallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( ctx, bit, mode ) mgaFallback( ctx, bit, mode ) Index: xc/lib/GL/mesa/src/drv/mga/mgatritmp.h diff -u xc/lib/GL/mesa/src/drv/mga/mgatritmp.h:1.6 xc/lib/GL/mesa/src/drv/mga/mgatritmp.h:removed --- xc/lib/GL/mesa/src/drv/mga/mgatritmp.h:1.6 Wed Mar 21 11:14:22 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgatritmp.h Thu Feb 27 12:26:29 2003 @@ -1,233 +0,0 @@ -/* $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, - GLuint pv) -{ - mgaContextPtr mmesa = MGA_CONTEXT(ctx); - struct vertex_buffer *VB = ctx->VB; - mgaVertexPtr mgaverts = MGA_DRIVER_DATA(VB)->verts; - mgaVertex *v[3]; - -#if (IND & MGA_OFFSET_BIT) - GLfloat offset; - GLfloat z[3]; -#endif - -#if (IND & (MGA_TWOSIDE_BIT | MGA_FLAT_BIT)) - GLuint c[3]; - GLuint s[3]; -#endif - - v[0] = &mgaverts[e0]; - v[1] = &mgaverts[e1]; - v[2] = &mgaverts[e2]; - -#if (IND & (MGA_TWOSIDE_BIT | MGA_FLAT_BIT)) - 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 - - -#if (IND & (MGA_TWOSIDE_BIT | MGA_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 & MGA_TWOSIDE_BIT) - { - 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 - -#if (IND & MGA_OFFSET_BIT) - { - offset = ctx->Polygon.OffsetUnits * mmesa->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 - } -#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 - - mga_draw_triangle( mmesa, v[0], v[1], v[2] ); - -#if (IND & MGA_OFFSET_BIT) - v[0]->v.z = z[0]; - v[1]->v.z = z[1]; - v[2]->v.z = z[2]; -#endif - -#if (IND & (MGA_FLAT_BIT | MGA_TWOSIDE_BIT)) - 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 - -} - - - - -static void TAG(quad)( GLcontext *ctx, GLuint v0, - GLuint v1, GLuint v2, GLuint v3, - GLuint pv ) -{ - TAG(triangle)( ctx, v0, v1, v3, pv ); - TAG(triangle)( ctx, v1, v2, v3, pv ); -} - - -static void TAG(line)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv ) -{ - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - mgaVertexPtr mgaVB = MGA_DRIVER_DATA(ctx->VB)->verts; - 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) { - GLfloat offset = ctx->LineZoffset * mmesa->depth_scale; - z0 = vert0->v.z; - z1 = vert1->v.z; - vert0->v.z += offset; - vert1->v.z += offset; - } - - mga_draw_line( mmesa, &mgaVB[v0], &mgaVB[v1], width ); - - if (IND & MGA_OFFSET_BIT) { - vert0->v.z = z0; - vert1->v.z = z1; - } - - 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; - } -} - - -static void TAG(points)( GLcontext *ctx, GLuint first, GLuint last ) -{ - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - struct vertex_buffer *VB = ctx->VB; - mgaVertexPtr mgaVB = MGA_DRIVER_DATA(VB)->verts; - GLfloat sz = ctx->Point.Size * .5; - int i; - - for(i=first;iClipMask[i]==0) { - if (IND & (MGA_TWOSIDE_BIT|MGA_OFFSET_BIT)) { - mgaVertex tmp0 = mgaVB[i]; - if (IND & MGA_TWOSIDE_BIT) { - GLubyte (*vbcolor)[4] = VB->ColorPtr->data; - MGA_COLOR((char *)&tmp0.v.color, vbcolor[i]); - } - if (IND & MGA_OFFSET_BIT) { - GLfloat offset = ctx->PointZoffset * mmesa->depth_scale; - tmp0.v.z += offset; - } - mga_draw_point( mmesa, &tmp0, sz ); - } else - mga_draw_point( mmesa, &mgaVB[i], sz ); - } -} - - - - -static void TAG(init)( void ) -{ - tri_tab[IND] = TAG(triangle); - quad_tab[IND] = TAG(quad); - line_tab[IND] = TAG(line); - points_tab[IND] = TAG(points); -} - - -#undef IND -#undef TAG Index: xc/lib/GL/mesa/src/drv/mga/mgavb.c diff -u xc/lib/GL/mesa/src/drv/mga/mgavb.c:1.11 xc/lib/GL/mesa/src/drv/mga/mgavb.c:1.14 --- xc/lib/GL/mesa/src/drv/mga/mgavb.c:1.11 Wed Oct 31 17:50:24 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgavb.c Wed Oct 30 07:51:36 2002 @@ -22,489 +22,476 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.c,v 1.11 2001/10/31 22:50:24 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.c,v 1.14 2002/10/30 12:51:36 alanh Exp $ */ #include "mgacontext.h" #include "mgavb.h" +#include "mgatris.h" +#include "mgaioctl.h" #include "mga_xmesa.h" -#include "stages.h" +#include "glheader.h" +#include "mtypes.h" #include "mem.h" +#include "macros.h" +#include "colormac.h" +#include "mmath.h" + +#include "tnl/t_context.h" +#include "swrast_setup/swrast_setup.h" +#include "swrast/swrast.h" #include #include -#define TEX0 { \ - v->v.tu0 = tc0[i][0]; \ - v->v.tv0 = tc0[i][1]; \ -} - -#define TEX1 { \ - v->v.tu1 = tc1[i][0]; \ - v->v.tv1 = tc1[i][1]; \ -} - -#define SPC { \ - 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]; \ -} -#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]; \ -} - -/* 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. - */ -#define TEX0_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++) { \ - GLfloat oow = 1.0 / tc[i][3]; \ - v->v.rhw *= tc[i][3]; \ - v->v.tu0 *= oow; \ - v->v.tv0 *= oow; \ - } \ - } - - -#define COORD \ - GLfloat *win = VB->Win.data[i]; \ - v->v.rhw = win[3]; \ - v->v.z = depth_scale * win[2]; \ - v->v.x = win[0] + xoffset; \ - v->v.y = - win[1] + yoffset; - - -#define NOP - - - - -#define SETUPFUNC(name,win,col,tex0,tex1,tex0_4,spec,fog) \ -static void name(struct vertex_buffer *VB, GLuint start, GLuint end) \ -{ \ - mgaContextPtr mmesa = MGA_CONTEXT( VB->ctx ); \ - mgaVertexPtr v; \ - GLfloat (*tc0)[4]; \ - GLfloat (*tc1)[4]; \ - const GLfloat depth_scale = mmesa->depth_scale; \ - const GLfloat xoffset = mmesa->drawX + SUBPIXEL_X; \ - const GLfloat yoffset = mmesa->driDrawable->h + mmesa->drawY + \ - SUBPIXEL_Y; \ - int i; \ - (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)); \ - \ - tc0 = VB->TexCoordPtr[mmesa->tmu_source[0]]->data; \ - tc1 = VB->TexCoordPtr[mmesa->tmu_source[1]]->data; \ - \ - v = &(MGA_DRIVER_DATA(VB)->verts[start]); \ - \ - if (VB->ClipOrMask == 0) \ - for (i=start; i < end; i++, v++) { \ - win; \ - col; \ - tex0; \ - tex1; \ - spec; \ - fog; \ - } \ - else \ - for (i=start; i < end; i++, v++) { \ - if (VB->ClipMask[i] == 0) { \ - win; \ - tex0; \ - tex1; \ - spec; \ - fog; \ - } \ - col; \ - } \ - tex0_4; \ +#define MGA_TEX1_BIT 0x1 +#define MGA_TEX0_BIT 0x2 +#define MGA_RGBA_BIT 0x4 +#define MGA_SPEC_BIT 0x8 +#define MGA_FOG_BIT 0x10 +#define MGA_XYZW_BIT 0x20 +#define MGA_PTEX_BIT 0x40 +#define MGA_MAX_SETUP 0x80 + +static struct { + void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint ); + interp_func interp; + copy_pv_func copy_pv; + GLboolean (*check_tex_sizes)( GLcontext *ctx ); + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; +} setup_tab[MGA_MAX_SETUP]; + + +#define TINY_VERTEX_FORMAT 0 +#define NOTEX_VERTEX_FORMAT 0 +#define TEX0_VERTEX_FORMAT (MGA_A|MGA_S|MGA_F) +#define TEX1_VERTEX_FORMAT (MGA_A|MGA_S|MGA_F|MGA_T2) +#define PROJ_TEX1_VERTEX_FORMAT 0 +#define TEX2_VERTEX_FORMAT 0 +#define TEX3_VERTEX_FORMAT 0 +#define PROJ_TEX3_VERTEX_FORMAT 0 + +#define DO_XYZW (IND & MGA_XYZW_BIT) +#define DO_RGBA (IND & MGA_RGBA_BIT) +#define DO_SPEC (IND & MGA_SPEC_BIT) +#define DO_FOG (IND & MGA_FOG_BIT) +#define DO_TEX0 (IND & MGA_TEX0_BIT) +#define DO_TEX1 (IND & MGA_TEX1_BIT) +#define DO_TEX2 0 +#define DO_TEX3 0 +#define DO_PTEX (IND & MGA_PTEX_BIT) + + +#define VERTEX mgaVertex +#define VERTEX_COLOR mga_color_t +#define LOCALVARS mgaContextPtr mmesa = MGA_CONTEXT(ctx); +#define GET_VIEWPORT_MAT() mmesa->hw_viewport +#define GET_TEXSOURCE(n) mmesa->tmu_source[n] +#define GET_VERTEX_FORMAT() mmesa->vertex_format +#define GET_VERTEX_STORE() mmesa->verts +#define GET_VERTEX_STRIDE_SHIFT() mmesa->vertex_stride_shift +#define GET_UBYTE_COLOR_STORE() &mmesa->UbyteColor +#define GET_UBYTE_SPEC_COLOR_STORE() &mmesa->UbyteSecondaryColor + +#define HAVE_HW_VIEWPORT 0 +#define HAVE_HW_DIVIDE 0 +#define HAVE_RGBA_COLOR 0 +#define HAVE_TINY_VERTICES 0 +#define HAVE_NOTEX_VERTICES 0 +#define HAVE_TEX0_VERTICES 1 +#define HAVE_TEX1_VERTICES 1 +#define HAVE_TEX2_VERTICES 0 +#define HAVE_TEX3_VERTICES 0 +#define HAVE_PTEX_VERTICES 0 + +#define UNVIEWPORT_VARS \ + const GLfloat dx = - mmesa->drawX - SUBPIXEL_X; \ + const GLfloat dy = (mmesa->driDrawable->h + \ + mmesa->drawY + SUBPIXEL_Y); \ + const GLfloat sz = 1.0 / mmesa->depth_scale + +#define UNVIEWPORT_X(x) x + dx; +#define UNVIEWPORT_Y(y) - y + dy; +#define UNVIEWPORT_Z(z) z * sz; + +#define PTEX_FALLBACK() FALLBACK(ctx, MGA_FALLBACK_TEXTURE, 1) + + +#define IMPORT_FLOAT_COLORS mga_import_float_colors +#define IMPORT_FLOAT_SPEC_COLORS mga_import_float_spec_colors + +#define INTERP_VERTEX setup_tab[MGA_CONTEXT(ctx)->SetupIndex].interp +#define COPY_PV_VERTEX setup_tab[MGA_CONTEXT(ctx)->SetupIndex].copy_pv + + +/*********************************************************************** + * Generate pv-copying and translation functions * + ***********************************************************************/ + +#define TAG(x) mga_##x +#include "tnl_dd/t_dd_vb.c" + +/*********************************************************************** + * Generate vertex emit and interp functions * + ***********************************************************************/ + + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT) +#define TAG(x) x##_wg +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_SPEC_BIT) +#define TAG(x) x##_wgs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_TEX0_BIT) +#define TAG(x) x##_wgt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_wgt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_TEX0_BIT|MGA_PTEX_BIT) +#define TAG(x) x##_wgpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT) +#define TAG(x) x##_wgst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_wgst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_PTEX_BIT) +#define TAG(x) x##_wgspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_FOG_BIT) +#define TAG(x) x##_wgf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT) +#define TAG(x) x##_wgfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_TEX0_BIT) +#define TAG(x) x##_wgft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_wgft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_TEX0_BIT|MGA_PTEX_BIT) +#define TAG(x) x##_wgfpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT) +#define TAG(x) x##_wgfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_wgfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_XYZW_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_PTEX_BIT) +#define TAG(x) x##_wgfspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_TEX0_BIT) +#define TAG(x) x##_t0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_t0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_FOG_BIT) +#define TAG(x) x##_f +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_FOG_BIT|MGA_TEX0_BIT) +#define TAG(x) x##_ft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_FOG_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_ft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT) +#define TAG(x) x##_g +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_SPEC_BIT) +#define TAG(x) x##_gs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_TEX0_BIT) +#define TAG(x) x##_gt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_gt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT) +#define TAG(x) x##_gst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_gst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_FOG_BIT) +#define TAG(x) x##_gf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT) +#define TAG(x) x##_gfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_FOG_BIT|MGA_TEX0_BIT) +#define TAG(x) x##_gft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_FOG_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_gft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT) +#define TAG(x) x##_gfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT) +#define TAG(x) x##_gfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + + +static void init_setup_tab( void ) +{ + init_wg(); + init_wgs(); + init_wgt0(); + init_wgt0t1(); + init_wgpt0(); + init_wgst0(); + init_wgst0t1(); + init_wgspt0(); + init_wgf(); + init_wgfs(); + init_wgft0(); + init_wgft0t1(); + init_wgfpt0(); + init_wgfst0(); + init_wgfst0t1(); + init_wgfspt0(); + init_t0(); + init_t0t1(); + init_f(); + init_ft0(); + init_ft0t1(); + init_g(); + init_gs(); + init_gt0(); + init_gt0t1(); + init_gst0(); + init_gst0t1(); + init_gf(); + init_gfs(); + init_gft0(); + init_gft0t1(); + init_gfst0(); + init_gfst0t1(); } -SETUPFUNC(rs_wt0, COORD,NOP,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wt0t1, COORD,NOP,TEX0,TEX1,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wft0, COORD,NOP,TEX0,NOP,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wft0t1, COORD,NOP,TEX0,TEX1,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wg, COORD,COL,NOP,NOP,NOP,NOP,NOP) -SETUPFUNC(rs_wgs, COORD,COL,NOP,NOP,NOP,SPC,NOP) -SETUPFUNC(rs_wgt0, COORD,COL,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wgt0t1, COORD,COL,TEX0,TEX1,TEX0_4,NOP,NOP) -SETUPFUNC(rs_wgst0, COORD,COL,TEX0,NOP,TEX0_4,SPC,NOP) -SETUPFUNC(rs_wgst0t1, COORD,COL,TEX0,TEX1,TEX0_4,SPC,NOP) -SETUPFUNC(rs_wgf, COORD,COL,NOP,NOP,NOP,NOP,FOG) -SETUPFUNC(rs_wgfs, COORD,COL,NOP,NOP,NOP,SPC,FOG) -SETUPFUNC(rs_wgft0, COORD,COL,TEX0,NOP,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wgft0t1, COORD,COL,TEX0,TEX1,TEX0_4,NOP,FOG) -SETUPFUNC(rs_wgfst0, COORD,COL,TEX0,NOP,TEX0_4,SPC,FOG) -SETUPFUNC(rs_wgfst0t1, COORD,COL,TEX0,TEX1,TEX0_4,SPC,FOG) - -SETUPFUNC(rs_t0, NOP,NOP,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_t0t1, NOP,NOP,TEX0,TEX1,TEX0_4,NOP,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,NOP,FOG) -SETUPFUNC(rs_g, NOP,COL,NOP,NOP,NOP,NOP,NOP) -SETUPFUNC(rs_gs, NOP,COL,NOP,NOP,NOP,SPC,NOP) -SETUPFUNC(rs_gt0, NOP,COL,TEX0,NOP,TEX0_4,NOP,NOP) -SETUPFUNC(rs_gt0t1, NOP,COL,TEX0,TEX1,TEX0_4,NOP,NOP) -SETUPFUNC(rs_gst0, NOP,COL,TEX0,NOP,TEX0_4,SPC,NOP) -SETUPFUNC(rs_gst0t1, NOP,COL,TEX0,TEX1,TEX0_4,SPC,NOP) -SETUPFUNC(rs_gf, NOP,COL,NOP,NOP,NOP,NOP,FOG) -SETUPFUNC(rs_gfs, NOP,COL,NOP,NOP,NOP,SPC,FOG) -SETUPFUNC(rs_gft0, NOP,COL,TEX0,NOP,TEX0_4,NOP,FOG) -SETUPFUNC(rs_gft0t1, NOP,COL,TEX0,TEX1,TEX0_4,NOP,FOG) -SETUPFUNC(rs_gfst0, NOP,COL,TEX0,NOP,TEX0_4,SPC,FOG) -SETUPFUNC(rs_gfst0t1, NOP,COL,TEX0,TEX1,TEX0_4,SPC,FOG) - - -static void rs_invalid(struct vertex_buffer *VB, GLuint start, GLuint end) -{ - fprintf(stderr, "mgaRasterSetup(): invalid combination\n"); -} - -typedef void (*setupFunc)(struct vertex_buffer *,GLuint,GLuint); - -static setupFunc setup_func[0x80]; - -void mgaDDSetupInit( void ) -{ - int i; - - 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; - setup_func[MGA_WIN_BIT|MGA_FOG_BIT|MGA_TEX0_BIT] = rs_wft0; - setup_func[MGA_WIN_BIT|MGA_FOG_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_wft0t1; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT] = rs_wg; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_SPEC_BIT] = rs_wgs; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_TEX0_BIT] = rs_wgt0; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_wgt0t1; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT] = rs_wgst0; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_wgst0t1; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_FOG_BIT] = rs_wgf; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT] = rs_wgfs; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_TEX0_BIT] = rs_wgft0; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_wgft0t1; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT] = rs_wgfst0; - setup_func[MGA_WIN_BIT|MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_wgfst0t1; - - /* Repair functions */ - setup_func[MGA_TEX0_BIT] = rs_t0; - setup_func[MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_t0t1; - setup_func[MGA_FOG_BIT] = rs_f; - setup_func[MGA_FOG_BIT|MGA_TEX0_BIT] = rs_ft0; - setup_func[MGA_FOG_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_ft0t1; - setup_func[MGA_RGBA_BIT] = rs_g; - setup_func[MGA_RGBA_BIT|MGA_SPEC_BIT] = rs_gs; - setup_func[MGA_RGBA_BIT|MGA_TEX0_BIT] = rs_gt0; - setup_func[MGA_RGBA_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_gt0t1; - setup_func[MGA_RGBA_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT] = rs_gst0; - setup_func[MGA_RGBA_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_gst0t1; - setup_func[MGA_RGBA_BIT|MGA_FOG_BIT] = rs_gf; - setup_func[MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT] = rs_gfs; - setup_func[MGA_RGBA_BIT|MGA_FOG_BIT|MGA_TEX0_BIT] = rs_gft0; - setup_func[MGA_RGBA_BIT|MGA_FOG_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_gft0t1; - setup_func[MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT] = rs_gfst0; - setup_func[MGA_RGBA_BIT|MGA_FOG_BIT|MGA_SPEC_BIT|MGA_TEX0_BIT|MGA_TEX1_BIT] = rs_gfst0t1; - -} - void mgaPrintSetupFlags(char *msg, GLuint flags ) { - fprintf(stderr, "%s: %d %s%s%s%s%s%s%s\n", + fprintf(stderr, "%s: %d %s%s%s%s%s%s\n", msg, (int)flags, - (flags & MGA_WIN_BIT) ? " xyzw," : "", + (flags & MGA_XYZW_BIT) ? " xyzw," : "", (flags & MGA_RGBA_BIT) ? " rgba," : "", (flags & MGA_SPEC_BIT) ? " spec," : "", (flags & MGA_FOG_BIT) ? " fog," : "", (flags & MGA_TEX0_BIT) ? " tex-0," : "", - (flags & MGA_TEX1_BIT) ? " tex-1," : "", - (flags & MGA_ALPHA_BIT) ? " alpha," : ""); + (flags & MGA_TEX1_BIT) ? " tex-1," : ""); } - - -void mgaChooseRasterSetupFunc(GLcontext *ctx) +void mgaCheckTexSizes( GLcontext *ctx ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - int funcindex = (MGA_WIN_BIT | MGA_RGBA_BIT); - int multi = mmesa->multitex; - - mmesa->vertsize = 8; - mmesa->tmu_source[0] = 0; - mmesa->tmu_source[1] = 1; - mmesa->tex_dest[0] = MGA_TEX0_BIT; - mmesa->tex_dest[1] = MGA_TEX1_BIT; - mmesa->multitex = 0; - mmesa->blend_flags &= ~MGA_BLEND_MULTITEX; - - if (ctx->Texture.ReallyEnabled & 0xf) { - /* This doesn't work for non-RGBA textures - if (ctx->Texture.Unit[0].EnvMode == GL_REPLACE) - funcindex &= ~MGA_RGBA_BIT; - */ - if (ctx->Texture.Unit[0].EnvMode == GL_BLEND && - mmesa->envcolor) - { - mmesa->multitex = 1; - mmesa->vertsize = 10; - mmesa->tmu_source[1] = 0; - funcindex |= MGA_TEX1_BIT; - } - - funcindex |= MGA_TEX0_BIT; - } + TNLcontext *tnl = TNL_CONTEXT(ctx); - 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; - } else { - /* Just a funny way of doing single texturing - */ - mmesa->tmu_source[0] = 1; - mmesa->tex_dest[1] = MGA_TEX0_BIT; - - if (ctx->Texture.Unit[0].EnvMode == GL_BLEND && - mmesa->envcolor) - { - mmesa->multitex = 1; - mmesa->vertsize = 10; - mmesa->tmu_source[1] = 1; - funcindex |= MGA_TEX1_BIT; - } + /*fprintf(stderr, "%s\n", __FUNCTION__);*/ - funcindex |= MGA_TEX0_BIT; + if (!setup_tab[mmesa->SetupIndex].check_tex_sizes(ctx)) { + mmesa->SetupIndex |= MGA_PTEX_BIT; + mmesa->SetupNewInputs = ~0; + + if (!mmesa->Fallback && + !(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { + tnl->Driver.Render.Interp = setup_tab[mmesa->SetupIndex].interp; + tnl->Driver.Render.CopyPV = setup_tab[mmesa->SetupIndex].copy_pv; } } - - if (multi != mmesa->multitex) - mmesa->new_state |= MGA_NEW_WARP; - - - /* Not really a good place to do this - need to make the mga state - * management code more event-driven so this can be calculated for - * free. - */ - - if (ctx->Color.BlendEnabled) - funcindex |= MGA_ALPHA_BIT; - - if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - funcindex |= MGA_SPEC_BIT; - - if (ctx->Fog.Enabled) - funcindex |= MGA_FOG_BIT; - - if (0) - mgaPrintSetupFlags("xsmesa: full setup function", funcindex); - - mmesa->dirty |= MGA_UPLOAD_PIPE; - mmesa->setupindex = funcindex; - - /* Called by mesa's clip functons: - */ - ctx->Driver.RasterSetup = setup_func[funcindex & ~MGA_ALPHA_BIT]; } - - -void mgaDDCheckPartialRasterSetup( GLcontext *ctx, struct gl_pipeline_stage *d ) +void mgaBuildVertices( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint newinputs ) { mgaContextPtr mmesa = MGA_CONTEXT( ctx ); - GLuint tmp = mmesa->setupdone; + GLubyte *v = ((GLubyte *)mmesa->verts + (start<vertex_stride_shift)); + GLuint stride = 1<vertex_stride_shift; - d->type = 0; - mmesa->setupdone = 0; /* cleared if we return */ - - if ((ctx->Array.Summary & VERT_OBJ_ANY) == 0) - return; + newinputs |= mmesa->SetupNewInputs; + mmesa->SetupNewInputs = 0; - if (ctx->IndirectTriangles) + if (!newinputs) return; - mmesa->setupdone = tmp; + if (newinputs & VERT_CLIP) { + setup_tab[mmesa->SetupIndex].emit( ctx, start, count, v, stride ); + } else { + GLuint ind = 0; - /* disabled until we have a merge&render op */ - /* d->inputs = available; */ - /* d->outputs = VERT_RAST_SETUP_PART; */ - /* d->type = PIPE_PRECALC; */ -} + if (newinputs & VERT_RGBA) + ind |= MGA_RGBA_BIT; + + if (newinputs & VERT_SPEC_RGB) + ind |= MGA_SPEC_BIT; + if (newinputs & VERT_TEX0) + ind |= MGA_TEX0_BIT; -/* Repair existing precalculated vertices with new data. - */ -void mgaDDPartialRasterSetup( struct vertex_buffer *VB ) -{ - mgaContextPtr mmesa = MGA_CONTEXT( VB->ctx ); - GLuint new = VB->pipeline->new_outputs; - GLuint available = VB->pipeline->outputs; - GLuint ind = 0; - - if (new & VERT_WIN) { - new = available; - ind |= MGA_WIN_BIT | MGA_FOG_BIT; - } + if (newinputs & VERT_TEX1) + ind |= MGA_TEX0_BIT|MGA_TEX1_BIT; - if (new & VERT_RGBA) - ind |= MGA_RGBA_BIT | MGA_SPEC_BIT; + if (newinputs & VERT_FOG_COORD) + ind |= MGA_FOG_BIT; - if (new & VERT_TEX0_ANY) - ind |= MGA_TEX0_BIT; + if (mmesa->SetupIndex & MGA_PTEX_BIT) + ind = ~0; - if (new & VERT_TEX1_ANY) - ind |= mmesa->tex_dest[1]; + ind &= mmesa->SetupIndex; - if (new & VERT_FOG_COORD) - ind |= MGA_FOG_BIT; + if (ind) { + setup_tab[ind].emit( ctx, start, count, v, stride ); + } + } +} - mmesa->setupdone &= ~ind; - ind &= mmesa->setupindex; - mmesa->setupdone |= ind; - if (0) - mgaPrintSetupFlags("xsmesa: partial setup function", ind); +void mgaChooseVertexState( GLcontext *ctx ) +{ + mgaContextPtr mmesa = MGA_CONTEXT( ctx ); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint ind = MGA_XYZW_BIT|MGA_RGBA_BIT; - if (ind) - setup_func[ind&~MGA_ALPHA_BIT]( VB, VB->Start, VB->Count ); -} + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + ind |= MGA_SPEC_BIT; + if (ctx->Fog.Enabled) + ind |= MGA_FOG_BIT; + + if (ctx->Texture._ReallyEnabled & TEXTURE1_ANY) { + if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) { + ind |= MGA_TEX1_BIT|MGA_TEX0_BIT; + } + else { + ind |= MGA_TEX0_BIT; + } + } + else if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) { + ind |= MGA_TEX0_BIT; + } + + mmesa->SetupIndex = ind; -void mgaDDDoRasterSetup( struct vertex_buffer *VB ) -{ - GLcontext *ctx = VB->ctx; -/* mgaContextPtr mmesa = MGA_CONTEXT( ctx ); */ + if (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED)) { + tnl->Driver.Render.Interp = mga_interp_extras; + tnl->Driver.Render.CopyPV = mga_copy_pv_extras; + } else { + tnl->Driver.Render.Interp = setup_tab[ind].interp; + tnl->Driver.Render.CopyPV = setup_tab[ind].copy_pv; + } - /* Can't lock, won't lock - */ -/* REFRESH_DRAWABLE_INFO( mmesa ); */ - - if (VB->Type == VB_CVA_PRECALC) - mgaDDPartialRasterSetup( VB ); - else if (ctx->Driver.RasterSetup) - ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); + if (setup_tab[ind].vertex_format != mmesa->vertex_format) { + FLUSH_BATCH(mmesa); + mmesa->new_state |= MGA_NEW_WARP; + mmesa->dirty |= MGA_UPLOAD_PIPE; + mmesa->vertex_format = setup_tab[ind].vertex_format; + mmesa->vertex_size = setup_tab[ind].vertex_size; + mmesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; + } } -static void FatalError( char *s ) -{ - fprintf(stderr, s); - exit(1); -} -void mgaDDResizeVB( struct vertex_buffer *VB, GLuint size ) +void mga_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ) { - mgaVertexBufferPtr mvb = MGA_DRIVER_DATA(VB); - - while (mvb->size < size) - mvb->size *= 2; - - FREE( mvb->vert_store ); - mvb->vert_store = MALLOC( sizeof(mgaVertex) * mvb->size + 31); - 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) - FatalError("mga-glx: out of memory !\n"); - - ALIGN_FREE( VB->ClipMask ); - VB->ClipMask = (GLubyte *)ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 32); - if (!VB->ClipMask) - FatalError("mga-glx: out of memory !\n"); - - if (VB->Type == VB_IMMEDIATE) { - FREE( mvb->primitive ); - FREE( mvb->next_primitive ); - 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!"); - } + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + GLuint vertex_size = mmesa->vertex_size * 4; + GLuint *dest = mgaAllocDmaLow( mmesa, (count-start) * vertex_size); + setup_tab[mmesa->SetupIndex].emit( ctx, start, count, dest, vertex_size ); } + -void mgaDDRegisterVB( struct vertex_buffer *VB ) +void mgaInitVB( GLcontext *ctx ) { - mgaVertexBufferPtr mvb; + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + GLuint size = TNL_CONTEXT(ctx)->vb.Size; - mvb = (mgaVertexBufferPtr)MALLOC( sizeof(*mvb) ); + mmesa->verts = (char *)ALIGN_MALLOC(size * sizeof(mgaVertex), 32); - /* 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. - */ - mvb->size = VB->Size * 5; - mvb->vert_store = MALLOC( sizeof(mgaVertex) * mvb->size + 31); - 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) - FatalError("mga-glx: out of memory !\n"); - - ALIGN_FREE( VB->ClipMask ); - VB->ClipMask = (GLubyte *)ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 32); - 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!"); + { + static int firsttime = 1; + if (firsttime) { + init_setup_tab(); + firsttime = 0; + } + } - VB->driver_data = mvb; + mmesa->new_state |= MGA_NEW_WARP; + mmesa->dirty |= MGA_UPLOAD_PIPE; + mmesa->vertex_format = setup_tab[0].vertex_format; + mmesa->vertex_size = setup_tab[0].vertex_size; + mmesa->vertex_stride_shift = setup_tab[0].vertex_stride_shift; } -void mgaDDUnregisterVB( struct vertex_buffer *VB ) +void mgaFreeVB( GLcontext *ctx ) { - mgaVertexBufferPtr mvb = MGA_DRIVER_DATA(VB); + mgaContextPtr mmesa = MGA_CONTEXT(ctx); + if (mmesa->verts) { + ALIGN_FREE(mmesa->verts); + mmesa->verts = 0; + } + + if (mmesa->UbyteSecondaryColor.Ptr) { + ALIGN_FREE(mmesa->UbyteSecondaryColor.Ptr); + mmesa->UbyteSecondaryColor.Ptr = 0; + } - if (mvb) { - if (mvb->vert_store) FREE(mvb->vert_store); - if (mvb->primitive) FREE(mvb->primitive); - if (mvb->next_primitive) FREE(mvb->next_primitive); - gl_vector1ui_free( &mvb->clipped_elements ); - FREE(mvb); - VB->driver_data = 0; + if (mmesa->UbyteColor.Ptr) { + ALIGN_FREE(mmesa->UbyteColor.Ptr); + mmesa->UbyteColor.Ptr = 0; } } + Index: xc/lib/GL/mesa/src/drv/mga/mgavb.h diff -u xc/lib/GL/mesa/src/drv/mga/mgavb.h:1.6 xc/lib/GL/mesa/src/drv/mga/mgavb.h:1.8 --- xc/lib/GL/mesa/src/drv/mga/mgavb.h:1.6 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgavb.h Wed Oct 30 07:51:36 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.h,v 1.6 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.h,v 1.8 2002/10/30 12:51:36 alanh Exp $ */ /* * Copyright 2000-2001 VA Linux Systems, Inc. * All Rights Reserved. @@ -23,99 +23,43 @@ * OTHER DEALINGS IN THE SOFTWARE. * * Authors: - * Keith Whitwell + * Keith Whitwell */ #ifndef MGAVB_INC #define MGAVB_INC -#include "types.h" -#include "vb.h" +#include "mtypes.h" +#include "mgacontext.h" +#include "swrast/swrast.h" + +#define _MGA_NEW_RASTERSETUP (_NEW_TEXTURE | \ + _DD_NEW_SEPARATE_SPECULAR | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _NEW_FOG) + + +extern void mgaChooseVertexState( GLcontext *ctx ); +extern void mgaCheckTexSizes( GLcontext *ctx ); +extern void mgaBuildVertices( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint newinputs ); - -/* common datatypes for the mga warp engines */ - -/* - * color type for the vertex data - * we probably want to use an internal datatype here? - */ -typedef struct mga_warp_color_t { - GLubyte blue; - GLubyte green; - GLubyte red; - GLubyte alpha; -} mga_warp_color; - - - -/* - * The vertex structure. The final tu1/tv1 values only used in multitexture - * modes. - */ -typedef struct mga_warp_vertex_t { - GLfloat x,y,z; /* coordinates in screen space*/ - GLfloat rhw; /* reciprocal homogeneous w */ - mga_warp_color color; /* vertex color */ - mga_warp_color specular; /* specular color, alpha is fog */ - GLfloat tu0,tv0; /* texture coordinates */ - GLfloat tu1,tv1; /* same for second stage */ -} mga_warp_vertex; - - -/* The fastpath code still expects a 16-float stride vertex. - */ -union mga_vertex_t { - mga_warp_vertex v; - float f[16]; - GLuint ui[16]; -}; - -typedef union mga_vertex_t mgaVertex; -typedef union mga_vertex_t *mgaVertexPtr; - -struct mga_vertex_buffer_t { - GLvector1ui clipped_elements; - mgaVertexPtr verts; - int last_vert; - GLuint *primitive; - GLuint *next_primitive; - void *vert_store; - GLuint size; - - GLuint *vert_buf; - GLuint *elt_buf; - GLuint vert_phys_start; -}; - -typedef struct mga_vertex_buffer_t *mgaVertexBufferPtr; - -#define MGA_CONTEXT(ctx) ((mgaContextPtr)((ctx)->DriverCtx)) -#define MGA_DRIVER_DATA(vb) ((mgaVertexBufferPtr)((vb)->driver_data)) - - -#define MGA_FOG_BIT MGA_F -#define MGA_ALPHA_BIT MGA_A -#define MGA_SPEC_BIT MGA_S -#define MGA_TEX1_BIT MGA_T2 -#define MGA_TEX0_BIT 0x10 /* non-warp parameters */ -#define MGA_RGBA_BIT 0x20 -#define MGA_WIN_BIT 0x40 - -struct gl_pipeline_stage; - -extern void mgaChooseRasterSetupFunc(GLcontext *ctx); 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, - struct gl_pipeline_stage *d ); - -extern void mgaDDUnregisterVB( struct vertex_buffer *VB ); -extern void mgaDDRegisterVB( struct vertex_buffer *VB ); -extern void mgaDDResizeVB( struct vertex_buffer *VB, GLuint size ); +extern void mgaInitVB( GLcontext *ctx ); +extern void mgaFreeVB( GLcontext *ctx ); -extern void mgaDDSetupInit( void ); +extern void mga_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ); + +extern void mga_translate_vertex(GLcontext *ctx, + const mgaVertex *src, + SWvertex *dst); +extern void mga_print_vertex( GLcontext *ctx, const mgaVertex *v ); #endif Index: xc/lib/GL/mesa/src/drv/r128/Imakefile diff -u xc/lib/GL/mesa/src/drv/r128/Imakefile:1.17 xc/lib/GL/mesa/src/drv/r128/Imakefile:1.21 --- xc/lib/GL/mesa/src/drv/r128/Imakefile:1.17 Thu May 10 12:56:11 2001 +++ xc/lib/GL/mesa/src/drv/r128/Imakefile Mon Nov 25 09:04:51 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile,v 1.17 2001/05/10 16:56:11 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile,v 1.21 2002/11/25 14:04:51 eich Exp $ #include @@ -18,22 +18,30 @@ #include "../common/Imakefile.inc" #include "Imakefile.inc" +#include "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" #include "../../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #include "../../X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../../SPARC/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 + DRIOBJS = $(GLXLIBSRC)/dri/dri_util.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/xf86drmR128.o + $(GLXLIBSRC)/dri/drm/xf86drmSL.o #ifdef GlxSoProf LOSRCS = ../../../../lowpc.c @@ -47,7 +55,7 @@ OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ $(MESA_ASM_OBJS) $(COMMONOBJS) $(R128OBJS) $(HIOBJS) -REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) #include @@ -63,7 +71,7 @@ #ifdef GlxSoProf SOPROF_LIBNAME = _r128_dri_p -NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(ALL_OBJS)) +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) #endif #endif Index: xc/lib/GL/mesa/src/drv/r128/Imakefile.inc diff -u xc/lib/GL/mesa/src/drv/r128/Imakefile.inc:1.3 xc/lib/GL/mesa/src/drv/r128/Imakefile.inc:1.4 --- xc/lib/GL/mesa/src/drv/r128/Imakefile.inc:1.3 Wed May 2 11:06:04 2001 +++ xc/lib/GL/mesa/src/drv/r128/Imakefile.inc Fri Feb 22 16:44:57 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile.inc,v 1.3 2001/05/02 15:06:04 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r128/Imakefile.inc,v 1.4 2002/02/22 21:44:57 dawes Exp $ #ifndef MesaDrvSrcDir #define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv @@ -17,109 +17,99 @@ #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 \ + DRI_INCLUDES = -I$(GLXLIBSRC)/dri \ + -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) \ + -I$(INCLUDESRC)/GL \ -I$(SERVERSRC)/GL/dri \ -I$(XF86OSSRC) \ -I$(XF86DRIVERSRC)/ati \ -I$(XF86COMSRC) \ - -I$(GLXLIBSRC)/dri/drm + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/include #endif -MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ +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_texmem.c \ + $(MESADRVR128BUILDDIR)r128_texstate.c \ $(MESADRVR128BUILDDIR)r128_tris.c \ - $(MESADRVR128BUILDDIR)r128_vb.c \ - $(MESADRVR128BUILDDIR)r128_xmesa.c + $(MESADRVR128BUILDDIR)r128_vb.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_texmem.o \ + $(MESADRVR128BUILDDIR)r128_texstate.o \ $(MESADRVR128BUILDDIR)r128_tris.o \ - $(MESADRVR128BUILDDIR)r128_vb.o \ - $(MESADRVR128BUILDDIR)r128_xmesa.o + $(MESADRVR128BUILDDIR)r128_vb.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_texmem.o \ + $(MESADRVR128BUILDDIR)unshared/r128_texstate.o \ $(MESADRVR128BUILDDIR)unshared/r128_tris.o \ - $(MESADRVR128BUILDDIR)unshared/r128_vb.o \ - $(MESADRVR128BUILDDIR)unshared/r128_xmesa.o + $(MESADRVR128BUILDDIR)unshared/r128_vb.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_texmem.o \ + $(MESADRVR128BUILDDIR)debugger/r128_texstate.o \ $(MESADRVR128BUILDDIR)debugger/r128_tris.o \ - $(MESADRVR128BUILDDIR)debugger/r128_vb.o \ - $(MESADRVR128BUILDDIR)debugger/r128_xmesa.o + $(MESADRVR128BUILDDIR)debugger/r128_vb.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_texmem.o \ + $(MESADRVR128BUILDDIR)profiled/r128_texstate.o \ $(MESADRVR128BUILDDIR)profiled/r128_tris.o \ - $(MESADRVR128BUILDDIR)profiled/r128_vb.o \ - $(MESADRVR128BUILDDIR)profiled/r128_xmesa.o + $(MESADRVR128BUILDDIR)profiled/r128_vb.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_texmem.c, $(MESADRVSRCDIR)/r128) +LinkSourceFile(r128_texstate.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.6 xc/lib/GL/mesa/src/drv/r128/r128_context.c:1.8 --- xc/lib/GL/mesa/src/drv/r128/r128_context.c:1.6 Wed Mar 21 11:14:23 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_context.c Wed Oct 30 07:51:38 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.c,v 1.6 2001/03/21 16:14:23 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.c,v 1.8 2002/10/30 12:51:38 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -41,12 +41,21 @@ #include "r128_state.h" #include "r128_span.h" #include "r128_tex.h" +#include "r128_tris.h" #include "r128_vb.h" -#include "r128_pipeline.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "array_cache/acache.h" + +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" + #include "context.h" #include "simple_list.h" #include "mem.h" +#include "matrix.h" #ifndef R128_DEBUG int R128_DEBUG = (0 @@ -62,25 +71,38 @@ /* Create the device specific context. */ -GLboolean r128CreateContext( Display *dpy, GLvisual *glVisual, - __DRIcontextPrivate *driContextPriv ) +GLboolean r128CreateContext( Display *dpy, const __GLcontextModes *glVisual, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ) { - GLcontext *ctx = driContextPriv->mesaContext; + GLcontext *ctx, *shareCtx; __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; r128ContextPtr rmesa; r128ScreenPtr r128scrn; int i; + /* Allocate the r128 context */ rmesa = (r128ContextPtr) CALLOC( sizeof(*rmesa) ); - if ( !rmesa ) return GL_FALSE; + if ( !rmesa ) + return GL_FALSE; - rmesa->glCtx = ctx; - rmesa->display = dpy; + /* Allocate the Mesa context */ + if (sharedContextPrivate) + shareCtx = ((r128ContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + rmesa->glCtx = _mesa_create_context(glVisual, shareCtx, rmesa, GL_TRUE); + if (!rmesa->glCtx) { + FREE(rmesa); + return GL_FALSE; + } + driContextPriv->driverPrivate = rmesa; + ctx = rmesa->glCtx; + rmesa->display = dpy; rmesa->driContext = driContextPriv; rmesa->driScreen = sPriv; - rmesa->driDrawable = NULL; /* Set by XMesaMakeCurrent */ - + rmesa->driDrawable = NULL; rmesa->hHWContext = driContextPriv->hHWContext; rmesa->driHwLock = &sPriv->pSAREA->lock; rmesa->driFd = sPriv->fd; @@ -90,12 +112,6 @@ 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; @@ -109,15 +125,9 @@ 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 @@ -125,17 +135,29 @@ */ 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; + /* No wide points. + */ + ctx->Const.MinPointSize = 1.0; + ctx->Const.MinPointSizeAA = 1.0; + ctx->Const.MaxPointSize = 1.0; + ctx->Const.MaxPointSizeAA = 1.0; + + /* No wide lines. + */ + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 1.0; + ctx->Const.MaxLineWidthAA = 1.0; + ctx->Const.LineWidthGranularity = 1.0; + #if ENABLE_PERF_BOXES if ( getenv( "LIBGL_PERFORMANCE_BOXES" ) ) { rmesa->boxes = 1; @@ -144,35 +166,31 @@ } #endif - ctx->DriverCtx = (void *)rmesa; + /* Initialize the software rasterizer and helper modules. + */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); - r128DDInitExtensions( ctx ); + /* Install the customized pipeline: + */ +/* _tnl_destroy_pipeline( ctx ); */ +/* _tnl_install_pipeline( ctx, r128_pipeline ); */ + /* Configure swrast to match hardware characteristics: + */ + _swrast_allow_pixel_fog( ctx, GL_FALSE ); + _swrast_allow_vertex_fog( ctx, GL_TRUE ); + + r128InitVB( ctx ); + r128InitTriFuncs( ctx ); + r128DDInitExtensions( ctx ); r128DDInitDriverFuncs( ctx ); r128DDInitIoctlFuncs( ctx ); r128DDInitStateFuncs( ctx ); r128DDInitSpanFuncs( ctx ); r128DDInitTextureFuncs( 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 ) - r128DDRegisterVB( ctx->VB ); - - if ( ctx->NrPipelineStages ) { - ctx->NrPipelineStages = - r128DDRegisterPipelineStages( ctx->PipelineStage, - ctx->PipelineStage, - ctx->NrPipelineStages ); - } - r128DDInitState( rmesa ); driContextPriv->driverPrivate = (void *)rmesa; @@ -182,24 +200,43 @@ /* Destroy the device specific context. */ -void r128DestroyContext( r128ContextPtr rmesa ) +void r128DestroyContext( __DRIcontextPrivate *driContextPriv ) { - if ( rmesa ) { - r128TexObjPtr t, next_t; - int i; + r128ContextPtr rmesa = (r128ContextPtr) driContextPriv->driverPrivate; - for ( i = 0 ; i < rmesa->r128Screen->numTexHeaps ; i++ ) { - foreach_s ( t, next_t, &rmesa->TexObjList[i] ) { - r128DestroyTexObj( rmesa, t ); - } - mmDestroy( rmesa->texHeap[i] ); + assert(rmesa); /* should never be null */ + if ( rmesa ) { + if (rmesa->glCtx->Shared->RefCount == 1) { + /* This share group is about to go away, free our private + * texture object data. + */ + 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] ); + rmesa->texHeap[i] = NULL; + } + + foreach_s ( t, next_t, &rmesa->SwappedOut ) { + r128DestroyTexObj( rmesa, t ); + } } - foreach_s ( t, next_t, &rmesa->SwappedOut ) { - r128DestroyTexObj( rmesa, t ); - } + _swsetup_DestroyContext( rmesa->glCtx ); + _tnl_DestroyContext( rmesa->glCtx ); + _ac_DestroyContext( rmesa->glCtx ); + _swrast_DestroyContext( rmesa->glCtx ); + + r128FreeVB( rmesa->glCtx ); + + /* free the Mesa context */ + rmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context(rmesa->glCtx); - ALIGN_FREE( rmesa->tmp_matrix ); FREE( rmesa ); } @@ -209,27 +246,50 @@ #endif } -/* Load the device specific context into the hardware. The actual - * setting of the hardware state is done in the r128UpdateHWState(). + +/* Force the context `c' to be the current context and associate with it + * buffer `b'. */ -r128ContextPtr r128MakeCurrent( r128ContextPtr oldCtx, - r128ContextPtr newCtx, - __DRIdrawablePrivate *dPriv ) +GLboolean +r128MakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ) { - if ( oldCtx ) { - if ( oldCtx != newCtx ) { - newCtx->new_state |= R128_NEW_CONTEXT; - newCtx->dirty = R128_UPLOAD_ALL; + if ( driContextPriv ) { + GET_CURRENT_CONTEXT(ctx); + r128ContextPtr oldR128Ctx = ctx ? R128_CONTEXT(ctx) : NULL; + r128ContextPtr newR128Ctx = (r128ContextPtr) driContextPriv->driverPrivate; + + if ( newR128Ctx != oldR128Ctx ) { + newR128Ctx->new_state |= R128_NEW_CONTEXT; + newR128Ctx->dirty = R128_UPLOAD_ALL; } - if ( oldCtx->driDrawable != dPriv ) { - newCtx->new_state |= R128_NEW_WINDOW | R128_NEW_CLIP; + + newR128Ctx->driDrawable = driDrawPriv; + + _mesa_make_current2( newR128Ctx->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate ); + + + newR128Ctx->new_state |= R128_NEW_WINDOW | R128_NEW_CLIP; + + if ( !newR128Ctx->glCtx->Viewport.Width ) { + _mesa_set_viewport(newR128Ctx->glCtx, 0, 0, + driDrawPriv->w, driDrawPriv->h); } } else { - newCtx->new_state |= R128_NEW_CONTEXT; - newCtx->dirty = R128_UPLOAD_ALL; + _mesa_make_current( 0, 0 ); } + + return GL_TRUE; +} - newCtx->driDrawable = dPriv; - return newCtx; +/* Force the context `c' to be unbound from its buffer. + */ +GLboolean +r128UnbindContext( __DRIcontextPrivate *driContextPriv ) +{ + return GL_TRUE; } Index: xc/lib/GL/mesa/src/drv/r128/r128_context.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_context.h:1.9 xc/lib/GL/mesa/src/drv/r128/r128_context.h:1.12 --- xc/lib/GL/mesa/src/drv/r128/r128_context.h:1.9 Tue Oct 2 07:44:13 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_context.h Mon Dec 16 11:18:52 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.h,v 1.9 2001/10/02 11:44:13 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.h,v 1.12 2002/12/16 16:18:52 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -40,13 +40,12 @@ #include -#include "dri_mesaint.h" -#include "dri_tmm.h" +#include "dri_util.h" #include "xf86drm.h" -#include "xf86drmR128.h" +#include "r128_common.h" -#include "types.h" +#include "mtypes.h" #include "r128_sarea.h" #include "r128_reg.h" @@ -82,7 +81,17 @@ #define R128_FALLBACK_RENDER_MODE 0x0010 #define R128_FALLBACK_MULTIDRAW 0x0020 #define R128_FALLBACK_LOGICOP 0x0040 +#define R128_FALLBACK_SEP_SPECULAR 0x0080 +#define R128_FALLBACK_BLEND_EQ 0x0100 +#define R128_FALLBACK_BLEND_FUNC 0x0200 + +/* Use the templated vertex format: + */ +#define TAG(x) r128##x +#include "tnl_dd/t_dd_vertex.h" +#undef TAG + /* Reasons why the GL_BLEND fallback mightn't work: */ #define R128_BLEND_ENV_COLOR 0x1 @@ -93,32 +102,19 @@ #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, - const GLfloat *out ); - -struct r128_elt_tab { - void (*emit_unclipped_verts)( struct vertex_buffer *VB ); - void (*build_tri_verts)( r128ContextPtr rmesa, - struct vertex_buffer *VB, - GLfloat *O, GLuint *elt ); +typedef void (*r128_tri_func)( r128ContextPtr, + r128Vertex *, + r128Vertex *, + r128Vertex * ); + +typedef void (*r128_line_func)( r128ContextPtr, + r128Vertex *, + r128Vertex * ); - void (*interp)( GLfloat t, GLfloat *O, - const GLfloat *I, const GLfloat *J ); +typedef void (*r128_point_func)( r128ContextPtr, + r128Vertex * ); - void (*project_and_emit_verts)( r128ContextPtr rmesa, - const GLfloat *verts, - GLuint *elts, - GLuint nr ); -}; struct r128_context { GLcontext *glCtx; /* Mesa context */ @@ -128,23 +124,33 @@ GLuint new_state; GLuint dirty; /* Hardware state to be updated */ r128_context_regs_t setup; + + /* Temporaries for translating away float colors: + */ + struct gl_client_array UbyteColor; + struct gl_client_array UbyteSecondaryColor; - GLuint vertsize; - GLuint vc_format; + GLuint NewGLState; + GLuint Fallback; + GLuint SetupIndex; + GLuint SetupNewInputs; + GLuint RenderIndex; + GLfloat hw_viewport[16]; GLfloat depth_scale; + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; + GLuint num_verts; + char *verts; - 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; + CARD32 ClearColor; /* Color used to clear color buffer */ + CARD32 ClearDepth; /* Value used to clear depth buffer */ + CARD32 ClearStencil; /* Value used to clear stencil */ /* Map GL texture units onto hardware */ GLint multitex; GLint tmu_source[2]; - GLint tex_dest[2]; GLuint tex_combine[2]; GLuint blend_flags; GLuint env_color; @@ -157,41 +163,19 @@ memHeap_t *texHeap[R128_NR_TEX_HEAPS]; GLint lastTexAge[R128_NR_TEX_HEAPS]; GLint lastTexHeap; - - /* Current rendering state, fallbacks + + /* Fallback rasterization functions */ - 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; - r128_interp_func interp; - GLfloat *tmp_matrix; + r128_point_func draw_point; + r128_line_func draw_line; + r128_tri_func draw_tri; /* Vertex buffers */ 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]; + GLuint hw_primitive; + GLenum render_primitive; /* Page flipping */ @@ -218,7 +202,7 @@ __DRIscreenPrivate *driScreen; /* DRI screen */ __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */ - int lastStamp; /* mirror driDrawable->lastStamp */ + unsigned int lastStamp; /* mirror driDrawable->lastStamp */ drmContext hHWContext; drmLock *driHwLock; @@ -236,6 +220,10 @@ GLuint c_textureSwaps; GLuint c_textureBytes; GLuint c_vertexBuffers; + + /* VBI + */ + GLuint vbl_seq; }; #define R128_CONTEXT(ctx) ((r128ContextPtr)(ctx->DriverCtx)) @@ -247,27 +235,19 @@ #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" +extern GLboolean r128CreateContext( Display *dpy, + const __GLcontextModes *glVisual, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ); + +extern void r128DestroyContext( __DRIcontextPrivate * ); + +extern GLboolean r128MakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ); -#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 { x = bswap_32( *(unsigned int *)&y ); } while (0) -#endif +extern GLboolean r128UnbindContext( __DRIcontextPrivate *driContextPriv ); /* ================================================================ * Debugging: Index: xc/lib/GL/mesa/src/drv/r128/r128_dd.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_dd.c:1.12 xc/lib/GL/mesa/src/drv/r128/r128_dd.c:1.15 --- xc/lib/GL/mesa/src/drv/r128/r128_dd.c:1.12 Tue Apr 10 12:07:52 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_dd.c Wed Oct 30 07:51:38 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_dd.c,v 1.12 2001/04/10 16:07:52 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_dd.c,v 1.15 2002/10/30 12:51:38 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -37,22 +37,23 @@ #include "r128_ioctl.h" #include "r128_state.h" #include "r128_vb.h" -#include "r128_pipeline.h" #include "r128_dd.h" +#include "context.h" #include "extensions.h" -#if defined(USE_X86_ASM) || defined(USE_3DNOW_ASM) || defined(USE_KATMAI_ASM) +#if defined(USE_X86_ASM) #include "X86/common_x86_asm.h" #endif -#define R128_DATE "20010405" +#define R128_DATE "20020221" /* Return the width and height of the current color buffer. */ -static void r128DDGetBufferSize( GLcontext *ctx, +static void r128DDGetBufferSize( GLframebuffer *buffer, GLuint *width, GLuint *height ) { + GET_CURRENT_CONTEXT(ctx); r128ContextPtr rmesa = R128_CONTEXT(ctx); LOCK_HARDWARE( rmesa ); @@ -84,7 +85,7 @@ strncat( buffer, " M3", 3 ); } - /* Append any AGP/PCI-specific information. + /* Append any AGP-specific information. */ switch ( rmesa->r128Screen->AGPMode ) { case 1: @@ -101,10 +102,9 @@ /* Append any CPU-specific information. */ #ifdef USE_X86_ASM - if ( gl_x86_cpu_features ) { + if ( _mesa_x86_cpu_features ) { strncat( buffer, " x86", 4 ); } -#endif #ifdef USE_MMX_ASM if ( cpu_has_mmx ) { strncat( buffer, "/MMX", 4 ); @@ -115,11 +115,12 @@ strncat( buffer, "/3DNow!", 7 ); } #endif -#ifdef USE_KATMAI_ASM +#ifdef USE_SSE_ASM if ( cpu_has_xmm ) { strncat( buffer, "/SSE", 4 ); } #endif +#endif return (GLubyte *)buffer; default: @@ -166,62 +167,25 @@ r128WaitForIdle( rmesa ); } -/* Return various parameters requested by Mesa (this is deprecated). - */ -static GLint r128DDGetParameteri( 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 r128DDInitExtensions( 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_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_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" ); - - 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" ); + _mesa_enable_extension( ctx, "GL_ARB_multitexture" ); + _mesa_enable_extension( ctx, "GL_ARB_texture_env_add" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_env_add" ); + _mesa_enable_imaging_extensions( ctx ); } /* 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.ResizeBuffers = _swrast_alloc_buffers; + ctx->Driver.GetString = r128DDGetString; + ctx->Driver.Finish = r128DDFinish; + ctx->Driver.Flush = r128DDFlush; + ctx->Driver.Error = NULL; } Index: xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c:1.4 xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c:removed --- xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c:1.4 Sun Apr 1 10:00:00 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_eltpath.c Thu Feb 27 12:26:29 2003 @@ -1,499 +0,0 @@ -/* $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. - -**************************************************************************/ - -/* - * Authors: - * Gareth Hughes - * Keith Whitwell - * - */ - -#include - -#include "r128_context.h" -#include "r128_pipeline.h" -#include "r128_ioctl.h" -#include "r128_tris.h" -#include "r128_state.h" -#include "r128_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( r128ContextPtr 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 ) { - 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( rmesa, rmesa->elt_buf ); - } - - rmesa->elt_buf = 0; - } - else if ( rmesa->vert_buf ) - { - r128FlushVerticesLocked( rmesa ); - } - - r128GetEltBufLocked( 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) * - R128_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) * - R128_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 + R128_INDEX_PRIM_OFFSET); - - rmesa->elt_vertsize = vertsize; -} - - -static void release_bufs( r128ContextPtr rmesa ) -{ - if ( rmesa->retained_buf && rmesa->retained_buf != rmesa->elt_buf ) - { - 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( rmesa ); - rmesa->first_elt = rmesa->next_elt; - } - - r128ReleaseBufLocked( 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 r128_tri_clip( r128ContextPtr rmesa, - struct vertex_buffer *VB, - GLuint *elt, - GLubyte mask ) -{ - struct r128_elt_tab *tab = rmesa->elt_tab; - r128_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; \ - r128_tri_clip( rmesa, VB, out, ormask ); \ - } \ -} while (0) - -#define LOCAL_VARS \ - 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) 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) r128_##x##_elt -#include "render_tmp.h" - - - -#define LOCAL_VARS \ - r128ContextPtr rmesa = R128_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) r128_##x##_elt_unclipped -#include "render_tmp.h" - - - - -static void refresh_projection_matrix( GLcontext *ctx ) -{ - r128ContextPtr rmesa = R128_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] + 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 -#define CLIP_UBYTE_G 1 -#define CLIP_UBYTE_R 2 -#define CLIP_UBYTE_A 3 - - -#define TYPE (0) -#define TAG(x) x -#include "r128_elttmp.h" - -#define TYPE (R128_RGBA_BIT) -#define TAG(x) x##_RGBA -#include "r128_elttmp.h" - -#define TYPE (R128_TEX0_BIT) -#define TAG(x) x##_TEX0 -#include "r128_elttmp.h" - -#define TYPE (R128_RGBA_BIT|R128_TEX0_BIT) -#define TAG(x) x##_RGBA_TEX0 -#include "r128_elttmp.h" - -#define TYPE (R128_RGBA_BIT|R128_TEX0_BIT|R128_TEX1_BIT) -#define TAG(x) x##_RGBA_TEX0_TEX1 -#include "r128_elttmp.h" - -#define TYPE (R128_TEX0_BIT|R128_TEX1_BIT) -#define TAG(x) x##_TEX0_TEX1 -#include "r128_elttmp.h" - - -/* Very sparsely popluated array - fix the indices. - */ -static struct r128_elt_tab r128EltTab[R128_MAX_SETUPFUNC]; - -void r128DDEltPathInit( void ) -{ - r128_render_init_elt(); - r128_render_init_elt_unclipped(); - - r128_init_eltpath( &r128EltTab[0] ); - r128_init_eltpath_RGBA( &r128EltTab[R128_RGBA_BIT] ); - 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)] ); -} - -#define VALID_SETUP (R128_RGBA_BIT|R128_TEX0_BIT|R128_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 r128DDEltPath( struct vertex_buffer *VB ) -{ - GLcontext *ctx = VB->ctx; - GLenum prim = ctx->CVA.elt_mode; - r128ContextPtr rmesa = R128_CONTEXT(ctx); - struct r128_elt_tab *tab = &r128EltTab[rmesa->SetupIndex & VALID_SETUP]; - GLuint 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 ) - r128FlushVertices( rmesa ); - - if ( rmesa->new_state ) - r128DDUpdateHWState( 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; - r128_render_tab_elt[prim]( VB, 0, VB->EltPtr->count, 0 ); - } else { - r128_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; -} Index: xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h:1.2 xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h:removed --- xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h:1.2 Sun Jan 7 20:07:20 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_elttmp.h Thu Feb 27 12:26:29 2003 @@ -1,263 +0,0 @@ -/* $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. - -**************************************************************************/ - -/* - * 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 ) -{ - r128ContextPtr rmesa = R128_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 & 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" ); -#else - GLubyte *b = (GLubyte *)&f[4]; - b[CLIP_UBYTE_B] = color[2]; - b[CLIP_UBYTE_G] = color[1]; - b[CLIP_UBYTE_R] = color[0]; - b[CLIP_UBYTE_A] = color[3]; -#endif - } - - if ( TYPE & R128_TEX0_BIT ) { - *(GLuint *)&f[6] = *(GLuint *)&tex0_data[0]; - *(GLuint *)&f[7] = *(GLuint *)&tex0_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 ); - } - - 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)( r128ContextPtr 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 & 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]; - b[CLIP_UBYTE_B] = col[2]; - b[CLIP_UBYTE_A] = col[3]; - } - - *(GLuint *)&O[5] = UNCLIPPED_VERT(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] ); - *(int*)&O[8] = *(int*)&tex1_data[0]; - *(int*)&O[9] = *(int*)&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 & R128_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 & 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] ); - } -} - - - -/* 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)( r128ContextPtr 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 & R128_RGBA_BIT ) { - *(GLuint *)&O[4] = *(GLuint *)&I[4]; - } - - if ( TYPE & R128_TEX0_BIT ) { - *(GLuint *)&O[6] = *(GLuint *)&I[6]; - *(GLuint *)&O[7] = *(GLuint *)&I[7]; - } - - if ( TYPE & R128_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(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); -} - -#undef TYPE -#undef TAG -#undef STRIDE Index: xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c:1.5 xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c:removed --- xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c:1.5 Sun Jan 7 20:07:20 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_fastpath.c Thu Feb 27 12:26:29 2003 @@ -1,534 +0,0 @@ -/* $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., - 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. - -**************************************************************************/ - -/* - * Authors: - * Keith Whitwell - * Gareth Hughes - * Kevin E. Martin - * - */ - -#include "r128_state.h" -#include "r128_vb.h" -#include "r128_pipeline.h" -#include "r128_ioctl.h" -#include "r128_tris.h" - -#include "mmath.h" -#include "cva.h" -#include "vertices.h" - - -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( 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 ) \ -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 \ - 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 -#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 r128_tri_clip( GLuint **p_elts, - r128VertexPtr verts, - GLubyte *clipmask, - GLuint *p_next_vert, - GLubyte mask, - r128_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 r128_line_clip( GLuint **p_elts, - r128VertexPtr verts, - GLubyte *clipmask, - GLuint *p_next_vert, - GLubyte mask, - r128_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]) ) { \ - r128_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]) ) { \ - r128_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 \ - 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;\ - r128VB->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) r128_##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 "r128_fasttmp.h" - -#define TYPE (R128_RGBA_BIT) -#define TAG(x) x##_RGBA -#include "r128_fasttmp.h" - -#define TYPE (R128_TEX0_BIT) -#define TAG(x) x##_TEX0 -#include "r128_fasttmp.h" - -#define TYPE (R128_RGBA_BIT | R128_TEX0_BIT) -#define TAG(x) x##_RGBA_TEX0 -#include "r128_fasttmp.h" - -#define TYPE (R128_RGBA_BIT | R128_TEX0_BIT | R128_TEX1_BIT) -#define TAG(x) x##_RGBA_TEX0_TEX1 -#include "r128_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 (R128_TEX0_BIT | R128_TEX1_BIT) -#define TAG(x) x##_TEX0_TEX1 -#include "r128_fasttmp.h" - - - -static void r128_render_elements_direct( struct vertex_buffer *VB ) -{ - 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 ( rmesa->new_state ) - r128DDUpdateHWState( ctx ); - - do { - func( VB, 0, nr, 0 ); - } while ( ctx->Driver.MultipassFunc && - ctx->Driver.MultipassFunc( VB, ++p ) ); -} - -static void r128_project_vertices( struct vertex_buffer *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] + 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, - m, - 16 * 4 ); -} - -static void r128_project_clipped_vertices( struct vertex_buffer *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] + 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, - m, - 16 * 4, - VB->ClipMask + VB->CopyStart ); -} - -static struct r128_fast_tab r128FastTab[R128_MAX_SETUPFUNC]; - -void r128DDFastPathInit( void ) -{ - r128_render_init_clip_elt(); - r128_render_init_smooth_indirect(); - - r128_init_fastpath( &r128FastTab[0] ); - r128_init_fastpath_RGBA( &r128FastTab[R128_RGBA_BIT] ); - 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)] ); -} - -#define VALID_SETUP (R128_RGBA_BIT | R128_TEX0_BIT | R128_TEX1_BIT) - -void r128DDFastPath( struct vertex_buffer *VB ) -{ - GLcontext *ctx = VB->ctx; - GLenum prim = ctx->CVA.elt_mode; - 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 | - MAT_FLAG_PERSPECTIVE) ) ) - { - r128DDEltPath( VB ); - return; - } - - /* Reserve enough space for the pathological case */ - if ( VB->EltPtr->count * 12 > R128_DRIVER_DATA(VB)->size ) { - r128DDResizeVB( VB, VB->EltPtr->count * 12 ); - do_cliptest = 1; - } - - tab->build_vertices( VB, do_cliptest ); /* object->clip space */ - - if ( rmesa->new_state ) - r128DDUpdateHWState( ctx ); - - if ( VB->ClipOrMask ) { - if ( !VB->ClipAndMask ) { - render_func *clip = r128_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 = &(R128_DRIVER_DATA(VB)->clipped_elements); - - r128_project_clipped_vertices( VB ); /* clip->device space */ - r128_render_elements_direct( VB ); /* render using new list */ - } - } else { - r128_project_vertices( VB ); /* clip->device space */ - r128_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/r128/r128_fasttmp.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h:1.3 xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h:removed --- xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h:1.3 Sun Jan 7 20:07:20 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_fasttmp.h Thu Feb 27 12:26:29 2003 @@ -1,190 +0,0 @@ -/* $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., - 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. - -**************************************************************************/ - -/* - * Authors: - * Keith Whitwell - * Gareth Hughes - * - */ - -/* 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(r128_setup_full)( struct vertex_buffer *VB, - GLuint do_cliptest ) -{ - 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( 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 & R128_RGBA_BIT ) { -#if defined(USE_X86_ASM) - /* 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" ); -#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 & R128_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 & R128_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 & 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; - } - } - - 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(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] ); - } -} - - -static void TAG(r128_init_fastpath)(struct r128_fast_tab *tab) -{ - tab->build_vertices = TAG(r128_setup_full); - tab->interp = TAG(r128_interp_vert); -} - -#undef TYPE -#undef TAG -#undef SIZE Index: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c:1.7 xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c:1.10 --- xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c:1.7 Wed Oct 31 17:50:25 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c Mon Dec 16 11:18:53 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c,v 1.7 2001/10/31 22:50:25 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c,v 1.10 2002/12/16 16:18:53 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -37,8 +37,12 @@ #include "r128_ioctl.h" #include "mem.h" +#include "macros.h" +#include "swrast/swrast.h" + #define R128_TIMEOUT 2048 +#define R128_IDLE_RETRY 32 /* ============================================================= @@ -83,7 +87,7 @@ } if ( !buf ) { - drmR128EngineReset( fd ); + drmCommandNone( fd, DRM_R128_CCE_RESET); UNLOCK_HARDWARE( rmesa ); fprintf( stderr, "Error: Could not get new VB... exiting\n" ); exit( -1 ); @@ -98,8 +102,9 @@ int nbox = rmesa->numClipRects; drmBufPtr buffer = rmesa->vert_buf; int count = rmesa->num_verts; - int prim = R128_TRIANGLES; + int prim = rmesa->hw_primitive; int fd = rmesa->driScreen->fd; + drmR128Vertex vertex; int i; rmesa->num_verts = 0; @@ -125,7 +130,11 @@ rmesa->sarea->nbox = nbox; } - drmR128FlushVertexBuffer( fd, prim, buffer->idx, count, 1 ); + vertex.prim = prim; + vertex.idx = buffer->idx; + vertex.count = count; + vertex.discard = 1; + drmCommandWrite( fd, DRM_R128_VERTEX, &vertex, sizeof(drmR128Vertex) ); } else { @@ -146,120 +155,20 @@ } rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; - drmR128FlushVertexBuffer( fd, prim, buffer->idx, count, discard ); - } - } - - rmesa->dirty &= ~R128_UPLOAD_CLIPRECTS; -} - - - -/* ================================================================ - * Indexed vertex buffer handling - */ - -void r128GetEltBufLocked( r128ContextPtr rmesa ) -{ - rmesa->elt_buf = r128GetBufferLocked( rmesa ); -} -void r128FireEltsLocked( r128ContextPtr rmesa, - GLuint start, GLuint end, - GLuint discard ) -{ - XF86DRIClipRectPtr pbox = rmesa->pClipRects; - int nbox = rmesa->numClipRects; - drmBufPtr buffer = rmesa->elt_buf; - int prim = R128_TRIANGLES; - int fd = rmesa->driScreen->fd; - int i; - - if ( !buffer ) - return; - - if ( rmesa->dirty & ~R128_UPLOAD_CLIPRECTS ) - r128EmitHwStateLocked( rmesa ); - - if ( !nbox ) - end = start; - - if ( nbox >= R128_NR_SAREA_CLIPRECTS ) - rmesa->dirty |= R128_UPLOAD_CLIPRECTS; - - if ( start == end || !(rmesa->dirty & R128_UPLOAD_CLIPRECTS) ) - { - if ( nbox < 3 ) { - rmesa->sarea->nbox = 0; - } else { - rmesa->sarea->nbox = nbox; - } - - drmR128FlushIndices( fd, prim, buffer->idx, start, end, discard ); - } - else - { - for ( i = 0 ; i < nbox ; ) { - int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = rmesa->sarea->boxes; - int d = 0; - - rmesa->sarea->nbox = nr - i; - for ( ; i < nr ; i++ ) { - *b++ = pbox[i]; - } - - /* Finished with the buffer? - */ - if ( nr == nbox ) { - d = discard; - } - - rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; - drmR128FlushIndices( fd, prim, buffer->idx, start, end, d ); + vertex.prim = prim; + vertex.idx = buffer->idx; + vertex.count = count; + vertex.discard = discard; + drmCommandWrite( fd, DRM_R128_VERTEX, &vertex, sizeof(drmR128Vertex) ); } } - if ( R128_DEBUG & DEBUG_ALWAYS_SYNC ) { - drmR128WaitForIdleCCE( rmesa->driFd ); - } - rmesa->dirty &= ~R128_UPLOAD_CLIPRECTS; } -void r128FlushEltsLocked( r128ContextPtr 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( rmesa ); - rmesa->first_elt = rmesa->next_elt; - } -} - -void r128ReleaseBufLocked( r128ContextPtr rmesa, drmBufPtr buffer ) -{ - int fd = rmesa->driScreen->fd; - - if ( !buffer ) - return; - - drmR128FlushVertexBuffer( fd, R128_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 *r128AllocVertices( r128ContextPtr rmesa, int count ) -{ - return r128AllocVerticesInline( rmesa, count ); -} /* ================================================================ @@ -270,15 +179,24 @@ GLint offset, GLint pitch, GLint format, GLint x, GLint y, GLint width, GLint height ) { + drmR128Blit blit; GLint ret; - ret = drmR128TextureBlit( rmesa->driFd, buffer->idx, - offset, pitch, format, - x, y, width, height ); + blit.idx = buffer->idx; + blit.offset = offset; + blit.pitch = pitch; + blit.format = format; + blit.x = x; + blit.y = y; + blit.width = width; + blit.height = height; + ret = drmCommandWrite( rmesa->driFd, DRM_R128_BLIT, + &blit, sizeof(drmR128Blit) ); + if ( ret ) { UNLOCK_HARDWARE( rmesa ); - fprintf( stderr, "drmR128TextureBlit: return = %d\n", ret ); + fprintf( stderr, "DRM_R128_BLIT: return = %d\n", ret ); exit( 1 ); } } @@ -308,19 +226,7 @@ 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 ); -#endif - - if ( 0 ) - fprintf( stderr, " last=0x%08x frame=0x%08lx\n", - rmesa->sarea->last_frame, (long)frame ); - if ( rmesa->sarea->last_frame - frame <= R128_MAX_OUTSTANDING ) { break; } @@ -337,12 +243,17 @@ /* Copy the back color buffer to the front color buffer. */ -void r128SwapBuffers( r128ContextPtr rmesa ) +void r128CopyBuffer( const __DRIdrawablePrivate *dPriv ) { - GLint nbox; - GLint i; - GLint ret; + r128ContextPtr rmesa; + GLint nbox, i, ret; + + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); + rmesa = (r128ContextPtr) dPriv->driContextPriv->driverPrivate; + if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "\n********************************\n" ); fprintf( stderr, "\n%s( %p )\n\n", @@ -365,6 +276,10 @@ rmesa->hardwareWentIdle = 0; } + r128WaitForVBlank( rmesa ); + + nbox = dPriv->numClipRects; + for ( i = 0 ; i < nbox ; ) { GLint nr = MIN2( i + R128_NR_SAREA_CLIPRECTS , nbox ); XF86DRIClipRectPtr box = rmesa->pClipRects; @@ -377,17 +292,20 @@ } rmesa->sarea->nbox = n; - ret = drmR128SwapBuffers( rmesa->driFd ); + ret = drmCommandNone( rmesa->driFd, DRM_R128_SWAP ); if ( ret ) { UNLOCK_HARDWARE( rmesa ); - fprintf( stderr, "drmR128SwapBuffers: return = %d\n", ret ); + fprintf( stderr, "DRM_R128_SWAP: return = %d\n", ret ); exit( 1 ); } } if ( R128_DEBUG & DEBUG_ALWAYS_SYNC ) { - drmR128WaitForIdleCCE( rmesa->driFd ); + i = 0; + do { + ret = drmCommandNone(rmesa->driFd, DRM_R128_CCE_IDLE); + } while ( ret && errno == EBUSY && i++ < R128_IDLE_RETRY ); } UNLOCK_HARDWARE( rmesa ); @@ -403,10 +321,17 @@ #endif } -void r128PageFlip( r128ContextPtr rmesa ) +void r128PageFlip( const __DRIdrawablePrivate *dPriv ) { + r128ContextPtr rmesa; GLint ret; + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); + + rmesa = (r128ContextPtr) dPriv->driContextPriv->driverPrivate; + if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "\n%s( %p ): page=%d\n\n", __FUNCTION__, rmesa->glCtx, rmesa->currentPage ); @@ -425,15 +350,17 @@ rmesa->hardwareWentIdle = 0; } + r128WaitForVBlank( rmesa ); + /* The kernel will have been initialized to perform page flipping * on a swapbuffers ioctl. */ - ret = drmR128SwapBuffers( rmesa->driFd ); + ret = drmCommandNone( rmesa->driFd, DRM_R128_SWAP ); UNLOCK_HARDWARE( rmesa ); if ( ret ) { - fprintf( stderr, "drmR128SwapBuffers: return = %d\n", ret ); + fprintf( stderr, "DRM_R128_SWAP: return = %d\n", ret ); exit( 1 ); } @@ -468,14 +395,13 @@ * Buffer clear */ -static GLbitfield r128DDClear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ) +static void r128DDClear( GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = rmesa->driDrawable; + drmR128Clear clear; GLuint flags = 0; - GLuint color_mask = 0; - GLuint depth_mask = 0; GLint i; GLint ret; @@ -485,109 +411,121 @@ 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? + /* The only state change we care about here is the RGBA colormask + * We'll just update that state, if needed. If we do more then + * there's some strange side-effects that the conformance tests find. */ - if ( rmesa->new_state ) + if ( rmesa->new_state & R128_NEW_MASKS) { + const GLuint save_state = rmesa->new_state; + rmesa->new_state = R128_NEW_MASKS; r128DDUpdateHWState( ctx ); + rmesa->new_state = save_state & ~R128_NEW_MASKS; + } if ( mask & DD_FRONT_LEFT_BIT ) { - flags |= DRM_R128_FRONT; - color_mask = rmesa->setup.plane_3d_mask_c; + flags |= DRM_R128_FRONT_BUFFER; mask &= ~DD_FRONT_LEFT_BIT; } if ( mask & DD_BACK_LEFT_BIT ) { - flags |= DRM_R128_BACK; - color_mask = rmesa->setup.plane_3d_mask_c; + flags |= DRM_R128_BACK_BUFFER; mask &= ~DD_BACK_LEFT_BIT; } if ( ( mask & DD_DEPTH_BIT ) && ctx->Depth.Mask ) { - flags |= DRM_R128_DEPTH; - depth_mask |= rmesa->DepthMask; + flags |= DRM_R128_DEPTH_BUFFER; mask &= ~DD_DEPTH_BIT; } #if 0 /* FIXME: Add stencil support */ if ( mask & DD_STENCIL_BIT ) { - flags |= DRM_R128_DEPTH; - depth_mask |= rmesa->StencilMask; + flags |= DRM_R128_DEPTH_BUFFER; mask &= ~DD_STENCIL_BIT; } #endif - if ( !flags ) - return mask; + if ( flags ) { - /* Flip top to bottom */ - cx += dPriv->x; - cy = dPriv->y + dPriv->h - cy - ch; + /* Flip top to bottom */ + cx += dPriv->x; + cy = dPriv->y + dPriv->h - cy - ch; - LOCK_HARDWARE( rmesa ); + LOCK_HARDWARE( rmesa ); - 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 ) { - 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++ = *(XF86DRIClipRectRec *)&box[i]; - n++; - } + /* FIXME: Do we actually need this? + */ + if ( rmesa->dirty & ~R128_UPLOAD_CLIPRECTS ) { + r128EmitHwStateLocked( rmesa ); } - rmesa->sarea->nbox = n; + 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 ( R128_DEBUG & DEBUG_VERBOSE_IOCTL ) { - fprintf( stderr, - "drmR128Clear: flag 0x%x color %x depth %x nbox %d\n", - flags, - (GLuint)rmesa->ClearColor, - (GLuint)rmesa->ClearDepth, - rmesa->sarea->nbox ); - } + 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++; + } + } - ret = drmR128Clear( rmesa->driFd, flags, - rmesa->ClearColor, rmesa->ClearDepth, - color_mask, depth_mask ); + rmesa->sarea->nbox = n; - if ( ret ) { - UNLOCK_HARDWARE( rmesa ); - fprintf( stderr, "drmR128Clear: return = %d\n", ret ); - exit( 1 ); + if ( R128_DEBUG & DEBUG_VERBOSE_IOCTL ) { + fprintf( stderr, + "DRM_R128_CLEAR: flag 0x%x color %x depth %x nbox %d\n", + flags, + (GLuint)rmesa->ClearColor, + (GLuint)rmesa->ClearDepth, + rmesa->sarea->nbox ); + } + + clear.flags = flags; + clear.clear_color = rmesa->ClearColor; + clear.clear_depth = rmesa->ClearDepth; + clear.color_mask = rmesa->setup.plane_3d_mask_c; + clear.depth_mask = ~0; + + ret = drmCommandWrite( rmesa->driFd, DRM_R128_CLEAR, + &clear, sizeof(drmR128Clear) ); + + if ( ret ) { + UNLOCK_HARDWARE( rmesa ); + fprintf( stderr, "DRM_R128_CLEAR: return = %d\n", ret ); + exit( 1 ); + } } - } - UNLOCK_HARDWARE( rmesa ); + UNLOCK_HARDWARE( rmesa ); - rmesa->dirty |= R128_UPLOAD_CLIPRECTS; + rmesa->dirty |= R128_UPLOAD_CLIPRECTS; + } - return mask; + if ( mask ) + _swrast_Clear( ctx, mask, all, cx, cy, cw, ch ); } @@ -601,6 +539,7 @@ const GLubyte mask[] ) { XF86DRIClipRectPtr pbox = rmesa->pClipRects; + drmR128Depth d; int nbox = rmesa->numClipRects; int fd = rmesa->driScreen->fd; int i; @@ -620,7 +559,15 @@ rmesa->sarea->nbox = nbox; } - drmR128WriteDepthSpan( fd, n, x, y, depth, mask ); + d.func = DRM_R128_WRITE_SPAN; + d.n = n; + d.x = (int*)&x; + d.y = (int*)&y; + d.buffer = (unsigned int *)depth; + d.mask = (unsigned char *)mask; + + drmCommandWrite( fd, DRM_R128_DEPTH, &d, sizeof(drmR128Depth)); + } else { @@ -634,7 +581,15 @@ } rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; - drmR128WriteDepthSpan( fd, n, x, y, depth, mask ); + + d.func = DRM_R128_WRITE_SPAN; + d.n = n; + d.x = (int*)&x; + d.y = (int*)&y; + d.buffer = (unsigned int *)depth; + d.mask = (unsigned char *)mask; + + drmCommandWrite( fd, DRM_R128_DEPTH, &d, sizeof(drmR128Depth)); } } @@ -647,6 +602,7 @@ const GLubyte mask[] ) { XF86DRIClipRectPtr pbox = rmesa->pClipRects; + drmR128Depth d; int nbox = rmesa->numClipRects; int fd = rmesa->driScreen->fd; int i; @@ -666,7 +622,14 @@ rmesa->sarea->nbox = nbox; } - drmR128WriteDepthPixels( fd, n, x, y, depth, mask ); + d.func = DRM_R128_WRITE_PIXELS; + d.n = n; + d.x = (int*)&x; + d.y = (int*)&y; + d.buffer = (unsigned int *)depth; + d.mask = (unsigned char *)mask; + + drmCommandWrite( fd, DRM_R128_DEPTH, &d, sizeof(drmR128Depth)); } else { @@ -680,7 +643,15 @@ } rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; - drmR128WriteDepthPixels( fd, n, x, y, depth, mask ); + + d.func = DRM_R128_WRITE_PIXELS; + d.n = n; + d.x = (int*)&x; + d.y = (int*)&y; + d.buffer = (unsigned int *)depth; + d.mask = (unsigned char *)mask; + + drmCommandWrite( fd, DRM_R128_DEPTH, &d, sizeof(drmR128Depth)); } } @@ -691,6 +662,7 @@ GLuint n, GLint x, GLint y ) { XF86DRIClipRectPtr pbox = rmesa->pClipRects; + drmR128Depth d; int nbox = rmesa->numClipRects; int fd = rmesa->driScreen->fd; int i; @@ -709,8 +681,15 @@ } else { rmesa->sarea->nbox = nbox; } + + d.func = DRM_R128_READ_SPAN; + d.n = n; + d.x = (int*)&x; + d.y = (int*)&y; + d.buffer = NULL; + d.mask = NULL; - drmR128ReadDepthSpan( fd, n, x, y ); + drmCommandWrite( fd, DRM_R128_DEPTH, &d, sizeof(drmR128Depth)); } else { @@ -724,7 +703,15 @@ } rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; - drmR128ReadDepthSpan( fd, n, x, y ); + + d.func = DRM_R128_READ_SPAN; + d.n = n; + d.x = (int*)&x; + d.y = (int*)&y; + d.buffer = NULL; + d.mask = NULL; + + drmCommandWrite( fd, DRM_R128_DEPTH, &d, sizeof(drmR128Depth)); } } @@ -735,6 +722,7 @@ const GLint x[], const GLint y[] ) { XF86DRIClipRectPtr pbox = rmesa->pClipRects; + drmR128Depth d; int nbox = rmesa->numClipRects; int fd = rmesa->driScreen->fd; int i; @@ -753,8 +741,15 @@ } else { rmesa->sarea->nbox = nbox; } + + d.func = DRM_R128_READ_PIXELS; + d.n = n; + d.x = (int*)&x; + d.y = (int*)&y; + d.buffer = NULL; + d.mask = NULL; - drmR128ReadDepthPixels( fd, n, x, y ); + drmCommandWrite( fd, DRM_R128_DEPTH, &d, sizeof(drmR128Depth)); } else { @@ -768,7 +763,15 @@ } rmesa->sarea->dirty |= R128_UPLOAD_CLIPRECTS; - drmR128ReadDepthPixels( fd, n, x, y ); + + d.func = DRM_R128_READ_PIXELS; + d.n = n; + d.x = (int*)&x; + d.y = (int*)&y; + d.buffer = NULL; + d.mask = NULL; + + drmCommandWrite( fd, DRM_R128_DEPTH, &d, sizeof(drmR128Depth)); } } @@ -780,20 +783,56 @@ { int fd = rmesa->r128Screen->driScreen->fd; int to = 0; - int ret; + int ret, i; do { - ret = drmR128WaitForIdleCCE( fd ); + i = 0; + do { + ret = drmCommandNone( fd, DRM_R128_CCE_IDLE); + } while ( ret && errno == EBUSY && i++ < R128_IDLE_RETRY ); } while ( ( ret == -EBUSY ) && ( to++ < R128_TIMEOUT ) ); if ( ret < 0 ) { - drmR128EngineReset( fd ); + drmCommandNone( fd, DRM_R128_CCE_RESET); UNLOCK_HARDWARE( rmesa ); fprintf( stderr, "Error: Rage 128 timed out... exiting\n" ); exit( -1 ); } } +void r128WaitForVBlank( r128ContextPtr rmesa ) +{ + drmVBlank vbl; + int ret; + + if ( !rmesa->r128Screen->irq ) + return; + + if ( getenv("LIBGL_SYNC_REFRESH") ) { + /* Wait for until the next vertical blank */ + vbl.request.type = DRM_VBLANK_RELATIVE; + vbl.request.sequence = 1; + } else if ( getenv("LIBGL_THROTTLE_REFRESH") ) { + /* Wait for at least one vertical blank since the last call */ + vbl.request.type = DRM_VBLANK_ABSOLUTE; + vbl.request.sequence = rmesa->vbl_seq + 1; + } else { + return; + } + + UNLOCK_HARDWARE( rmesa ); + + if ((ret = drmWaitVBlank( rmesa->driFd, &vbl ))) { + fprintf(stderr, "%s: drmWaitVBlank returned %d, IRQs don't seem to be" + " working correctly.\nTry running with LIBGL_THROTTLE_REFRESH" + " and LIBL_SYNC_REFRESH unset.\n", __FUNCTION__, ret); + exit(1); + } + + rmesa->vbl_seq = vbl.reply.sequence; + + LOCK_HARDWARE( rmesa ); +} void r128DDInitIoctlFuncs( GLcontext *ctx ) { Index: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h:1.3 xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h:1.6 --- xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h:1.3 Sun Apr 1 10:00:00 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h Mon Dec 16 11:18:53 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h,v 1.3 2001/04/01 14:00:00 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.h,v 1.6 2002/12/16 16:18:53 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -42,7 +42,7 @@ #include "r128_lock.h" #include "xf86drm.h" -#include "xf86drmR128.h" +#include "r128_common.h" #define R128_BUFFER_MAX_DWORDS (R128_BUFFER_SIZE / sizeof(CARD32)) @@ -50,46 +50,22 @@ extern drmBufPtr r128GetBufferLocked( r128ContextPtr rmesa ); extern void r128FlushVerticesLocked( r128ContextPtr rmesa ); -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 rmesa, drmBufPtr buffer ); - -/* Make this available as both a regular and an inline function. - */ -extern CARD32 *r128AllocVertices( r128ContextPtr rmesa, int count ); - -static __inline CARD32 *r128AllocVerticesInline( r128ContextPtr rmesa, - int count ) +static __inline void *r128AllocDmaLow( r128ContextPtr rmesa, int bytes ) { - int bytes = count * rmesa->vertsize * sizeof(CARD32); CARD32 *head; if ( !rmesa->vert_buf ) { LOCK_HARDWARE( rmesa ); - - if ( rmesa->first_elt != rmesa->next_elt ) { - r128FlushEltsLocked( rmesa ); - } - rmesa->vert_buf = r128GetBufferLocked( rmesa ); - UNLOCK_HARDWARE( rmesa ); } else if ( rmesa->vert_buf->used + bytes > rmesa->vert_buf->total ) { LOCK_HARDWARE( rmesa ); - r128FlushVerticesLocked( rmesa ); rmesa->vert_buf = r128GetBufferLocked( rmesa ); - UNLOCK_HARDWARE( rmesa ); } - - head = (CARD32 *)((char *)rmesa->vert_buf->address + - rmesa->vert_buf->used); - rmesa->num_verts += count; + head = (CARD32 *)((char *)rmesa->vert_buf->address + rmesa->vert_buf->used); rmesa->vert_buf->used += bytes; return head; } @@ -111,8 +87,9 @@ extern void r128ReadDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, const GLint x[], const GLint y[] ); -extern void r128SwapBuffers( r128ContextPtr rmesa ); -extern void r128PageFlip( r128ContextPtr rmesa ); +extern void r128CopyBuffer( const __DRIdrawablePrivate *dPriv ); +extern void r128PageFlip( const __DRIdrawablePrivate *dPriv ); +void r128WaitForVBlank( r128ContextPtr rmesa ); extern void r128WaitForIdleLocked( r128ContextPtr rmesa ); @@ -130,8 +107,6 @@ 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) @@ -141,7 +116,7 @@ #define ALIGN_NEXT_ELT( rmesa ) \ do { \ rmesa->next_elt = (GLushort *) \ - (((unsigned long)rmesa->next_elt + 7) & ~0x7); \ + (((GLuint)rmesa->next_elt + 7) & ~0x7); \ rmesa->next_elt = (GLushort *) \ ((GLubyte *)rmesa->next_elt + R128_INDEX_PRIM_OFFSET); \ } while (0) Index: xc/lib/GL/mesa/src/drv/r128/r128_lock.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_lock.c:1.3 xc/lib/GL/mesa/src/drv/r128/r128_lock.c:1.5 --- xc/lib/GL/mesa/src/drv/r128/r128_lock.c:1.3 Wed Mar 21 11:14:23 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_lock.c Wed Oct 30 07:51:38 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_lock.c,v 1.3 2001/03/21 16:14:23 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_lock.c,v 1.5 2002/10/30 12:51:38 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -67,12 +67,12 @@ * 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 ); + DRI_VALIDATE_DRAWABLE_INFO( rmesa->display, sPriv, dPriv ); if ( rmesa->lastStamp != dPriv->lastStamp ) { rmesa->lastStamp = dPriv->lastStamp; rmesa->new_state |= R128_NEW_WINDOW | R128_NEW_CLIP; - rmesa->SetupDone = 0; + rmesa->SetupNewInputs = ~0; } rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_CLIPRECTS; @@ -86,7 +86,7 @@ } for ( i = 0 ; i < rmesa->lastTexHeap ; i++ ) { - if ( sarea->texAge[i] != rmesa->lastTexAge[i] ) { + if ( rmesa->texHeap[i] && sarea->texAge[i] != rmesa->lastTexAge[i] ) { r128AgeTextures( rmesa, i ); } } Index: xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c:1.4 xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c:removed --- xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c:1.4 Sun Jan 7 20:07:21 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_pipeline.c Thu Feb 27 12:26:29 2003 @@ -1,167 +0,0 @@ -/* $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., - 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. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Gareth Hughes - * - */ - -#include "r128_context.h" -#include "r128_vb.h" -#include "r128_pipeline.h" - -#include "types.h" -#include "fog.h" - -static struct gl_pipeline_stage r128_fast_stage = { - "r128 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, - r128DDFastPath -}; - -#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 r128DDBuildPrecalcPipeline( GLcontext *ctx ) -{ - r128ContextPtr rmesa = R128_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] = &r128_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 r128DDCheckRasterSetup( GLcontext *ctx, - struct gl_pipeline_stage *d ) -{ - d->type = PIPE_IMMEDIATE | PIPE_PRECALC; - d->inputs = ctx->RenderFlags; - - /* r128 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 r128DDRegisterPipelineStages( 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 = r128DDCheckPartialRasterSetup; - out[o].run = r128DDPartialRasterSetup; - o++; - break; - - case PIPE_OP_RAST_SETUP_0 | PIPE_OP_RAST_SETUP_1: - out[o] = in[i]; - out[o].check = r128DDCheckRasterSetup; - out[o].run = r128DDDoRasterSetup; - o++; - break; - - default: - out[o++] = in[i]; - break; - } - } - - return o; -} Index: xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h:1.4 xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h:removed --- xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h:1.4 Sun Jan 7 20:07:21 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_pipeline.h Thu Feb 27 12:26:29 2003 @@ -1,53 +0,0 @@ -/* $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., - 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. - -**************************************************************************/ - -/* - * Authors: - * Gareth Hughes - * Kevin E. Martin - * - */ - -#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, - const struct gl_pipeline_stage *in, - GLuint nr ); - -extern void r128DDFastPathInit( void ); -extern void r128DDFastPath( struct vertex_buffer *VB ); - -extern void r128DDEltPathInit( void ); -extern void r128DDEltPath( struct vertex_buffer *VB ); - -#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.5 xc/lib/GL/mesa/src/drv/r128/r128_screen.c:1.8 --- xc/lib/GL/mesa/src/drv/r128/r128_screen.c:1.5 Wed Mar 21 11:14:23 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_screen.c Mon Dec 16 11:18:53 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_screen.c,v 1.5 2001/03/21 16:14:23 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_screen.c,v 1.8 2002/12/16 16:18:53 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -39,8 +39,8 @@ #include "r128_ioctl.h" #include "r128_tris.h" #include "r128_vb.h" -#include "r128_pipeline.h" +#include "context.h" #include "mem.h" #if 1 @@ -59,7 +59,8 @@ /* Create the device specific screen private data struct. */ -r128ScreenPtr r128CreateScreen( __DRIscreenPrivate *sPriv ) +static r128ScreenPtr +r128CreateScreen( __DRIscreenPrivate *sPriv ) { r128ScreenPtr r128Screen; R128DRIPtr r128DRIPriv = (R128DRIPtr)sPriv->pDevPriv; @@ -73,6 +74,22 @@ */ r128Screen->IsPCI = r128DRIPriv->IsPCI; r128Screen->sarea_priv_offset = r128DRIPriv->sarea_priv_offset; + + if (sPriv->drmMinor >= 3) { + drmR128GetParam gp; + int ret; + + gp.param = R128_PARAM_IRQ_NR; + gp.value = &r128Screen->irq; + + ret = drmCommandWriteRead( sPriv->fd, DRM_R128_GETPARAM, + &gp, sizeof(gp)); + if (ret) { + fprintf(stderr, "drmR128GetParam (R128_PARAM_IRQ_NR): %d\n", ret); + FREE( r128Screen ); + return NULL; + } + } r128Screen->mmio.handle = r128DRIPriv->registerHandle; r128Screen->mmio.size = r128DRIPriv->registerSize; @@ -155,20 +172,19 @@ r128Screen->driScreen = sPriv; - r128DDSetupInit(); - r128DDTriangleFuncsInit(); - r128DDFastPathInit(); - r128DDEltPathInit(); - return r128Screen; } /* Destroy the device specific screen private data struct. */ -void r128DestroyScreen( __DRIscreenPrivate *sPriv ) +static void +r128DestroyScreen( __DRIscreenPrivate *sPriv ) { r128ScreenPtr r128Screen = (r128ScreenPtr)sPriv->private; + if ( !r128Screen ) + return; + if ( !r128Screen->IsPCI ) { drmUnmap( (drmAddress)r128Screen->agpTextures.map, r128Screen->agpTextures.size ); @@ -178,4 +194,205 @@ FREE( r128Screen ); sPriv->private = NULL; +} + + +/* Initialize the fullscreen mode. + */ +static GLboolean +r128OpenFullScreen( __DRIcontextPrivate *driContextPriv ) +{ +#if 0 + r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; + drmR128Fullscreen fullscreen; + GLint ret; + + /* FIXME: Do we need to check this? + */ + if ( !r128Ctx->glCtx->Visual.doubleBufferMode ) + return GL_TRUE; + + LOCK_HARDWARE( rmesa ); + r128WaitForIdleLocked( rmesa ); + + /* Ignore errors. If this fails, we simply don't do page flipping. + */ + fullscreen.func = DRM_R128_INIT_FULLSCREEN; + ret = drmCommandWrite( rmesa->driFd, DRM_R128_FULLSCREEN, + &fullscreen, sizeof(drmR128Fullscreen) ); + + UNLOCK_HARDWARE( rmesa ); + + rmesa->doPageFlip = ( ret == 0 ); +#endif + + return GL_TRUE; +} + +/* Shut down the fullscreen mode. + */ +static GLboolean +r128CloseFullScreen( __DRIcontextPrivate *driContextPriv ) +{ +#if 0 + r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; + drmR128Fullscreen fullscreen; + LOCK_HARDWARE( rmesa ); + r128WaitForIdleLocked( rmesa ); + + /* Don't care if this fails, we're not page flipping anymore. + */ + fullscreen.func = DRM_R128_CLEANUP_FULLSCREEN; + drmCommandWrite( rmesa->driFd, DRM_R128_FULLSCREEN, + &fullscreen, sizeof(drmR128Fullscreen) ); + + UNLOCK_HARDWARE( rmesa ); + + rmesa->doPageFlip = GL_FALSE; + rmesa->currentPage = 0; +#endif + + return GL_TRUE; +} + + +/* Create and initialize the Mesa and driver specific pixmap buffer + * data. + */ +static GLboolean +r128CreateBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap ) +{ + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } + else { + driDrawPriv->driverPrivate = (void *) + _mesa_create_framebuffer( mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->stencilBits > 0, + mesaVis->accumRedBits > 0, + mesaVis->alphaBits > 0 ); + return (driDrawPriv->driverPrivate != NULL); + } +} + + +static void +r128DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +{ + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); +} + + +/* Copy the back color buffer to the front color buffer */ +static void +r128SwapBuffers(Display *dpy, void *drawablePrivate) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + (void) dpy; + + if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { + r128ContextPtr rmesa; + GLcontext *ctx; + rmesa = (r128ContextPtr) dPriv->driContextPriv->driverPrivate; + ctx = rmesa->glCtx; + if (ctx->Visual.doubleBufferMode) { + _mesa_swapbuffers( ctx ); /* flush pending rendering comands */ + + if ( rmesa->doPageFlip ) { + r128PageFlip( dPriv ); + } + else { + r128CopyBuffer( dPriv ); + } + } + } + else { + /* XXX this shouldn't be an error but we can't handle it for now */ + _mesa_problem(NULL, "r128SwapBuffers: drawable has no context!\n"); + } +} + + +/* Initialize the driver specific screen private data. + */ +static GLboolean +r128InitDriver( __DRIscreenPrivate *sPriv ) +{ + 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 ) { + __driUtilMessage( "R128 DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch ); + return GL_FALSE; + } + } + } + + /* Check that the DDX driver version is compatible */ + if ( sPriv->ddxMajor != 4 || + sPriv->ddxMinor < 0 ) { + __driUtilMessage( "R128 DRI driver expected DDX driver version 4.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch ); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if ( sPriv->drmMajor != 2 || + sPriv->drmMinor < 2 ) { + __driUtilMessage( "R128 DRI driver expected DRM driver version 2.2.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + return GL_FALSE; + } + + if ( !sPriv->private ) { + r128DestroyScreen( sPriv ); + return GL_FALSE; + } + + 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 ) +{ +} + + +static struct __DriverAPIRec r128API = { + r128InitDriver, + r128DestroyScreen, + r128CreateContext, + r128DestroyContext, + r128CreateBuffer, + r128DestroyBuffer, + r128SwapBuffers, + r128MakeCurrent, + r128UnbindContext, + r128OpenFullScreen, + r128CloseFullScreen +}; + + +/* + * This is the bootstrap function for the driver. + * The __driCreateScreen name is the symbol that libGL.so fetches. + * Return: pointer to a __DRIscreenPrivate. + */ +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) +{ + __DRIscreenPrivate *psp; + psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &r128API); + return (void *) psp; } Index: xc/lib/GL/mesa/src/drv/r128/r128_screen.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_screen.h:1.5 xc/lib/GL/mesa/src/drv/r128/r128_screen.h:1.7 --- xc/lib/GL/mesa/src/drv/r128/r128_screen.h:1.5 Wed Mar 21 11:14:23 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_screen.h Mon Dec 16 11:18:53 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_screen.h,v 1.5 2001/03/21 16:14:23 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_screen.h,v 1.7 2002/12/16 16:18:53 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -52,6 +52,7 @@ GLint cpp; GLint IsPCI; /* Current card is a PCI card */ GLint AGPMode; + unsigned int irq; /* IRQ number (0 means none) */ GLuint frontOffset; GLuint frontPitch; @@ -78,9 +79,6 @@ } r128ScreenRec, *r128ScreenPtr; - -extern r128ScreenPtr r128CreateScreen( __DRIscreenPrivate *sPriv ); -extern void r128DestroyScreen( __DRIscreenPrivate *sPriv ); #endif #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.6 xc/lib/GL/mesa/src/drv/r128/r128_span.c:1.8 --- xc/lib/GL/mesa/src/drv/r128/r128_span.c:1.6 Wed Mar 21 11:14:23 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_span.c Wed Oct 30 07:51:39 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_span.c,v 1.6 2001/03/21 16:14:23 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_span.c,v 1.8 2002/10/30 12:51:39 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -29,7 +29,7 @@ /* * Authors: * Gareth Hughes - * Keith Whitwell + * Keith Whitwell * Kevin E. Martin * */ @@ -38,8 +38,9 @@ #include "r128_ioctl.h" #include "r128_state.h" #include "r128_span.h" +#include "r128_tex.h" -#include "pb.h" +#include "swrast/s_pb.h" /* for PB_SIZE */ #define DBG 0 @@ -74,7 +75,6 @@ #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)) @@ -125,6 +125,10 @@ /* 16 bit, RGB565 color spanline and pixel functions */ +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = R128PACKCOLOR565( color[0], color[1], color[2] ) + #define WRITE_RGBA( _x, _y, r, g, b, a ) \ *(GLushort *)(buf + _x*2 + _y*pitch) = ((((int)r & 0xf8) << 8) | \ (((int)g & 0xfc) << 3) | \ @@ -153,6 +157,10 @@ /* 32 bit, ARGB8888 color spanline and pixel functions */ +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = R128PACKCOLOR8888( color[0], color[1], color[2], color[3] ) + #define WRITE_RGBA( _x, _y, r, g, b, a ) \ *(GLuint *)(buf + _x*4 + _y*pitch) = ((b << 0) | \ (g << 8) | \ @@ -168,7 +176,7 @@ rgba[0] = (p >> 16) & 0xff; \ rgba[1] = (p >> 8) & 0xff; \ rgba[2] = (p >> 0) & 0xff; \ - rgba[3] = (p >> 24) & 0xff; \ + rgba[3] = 0xff;/*(p >> 24) & 0xff;*/ \ } while (0) #define TAG(x) r128##x##_ARGB8888 @@ -176,6 +184,10 @@ /* 24 bit, RGB888 color spanline and pixel functions */ +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = R128PACKCOLOR888( color[0], color[1], color[2] ) + #define WRITE_RGBA(_x, _y, r, g, b, a) \ *(GLuint *)(buf + _x*3 + _y*pitch) = ((r << 16) | \ (g << 8) | \ @@ -364,59 +376,85 @@ #define WRITE_DEPTH(_x, _y, d) \ *(GLuint *)(buf + _x*4 + _y*pitch) = d + + +static void r128DDSetReadBuffer( GLcontext *ctx, + GLframebuffer *colorBuffer, + GLenum mode ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + + switch ( mode ) { + case GL_FRONT_LEFT: + rmesa->readOffset = rmesa->r128Screen->frontOffset; + rmesa->readPitch = rmesa->r128Screen->frontPitch; + break; + case GL_BACK_LEFT: + rmesa->readOffset = rmesa->r128Screen->backOffset; + rmesa->readPitch = rmesa->r128Screen->backPitch; + break; + default: + break; + } +} + + void r128DDInitSpanFuncs( GLcontext *ctx ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); + struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); + + swdd->SetReadBuffer = r128DDSetReadBuffer; switch ( rmesa->r128Screen->cpp ) { case 2: - ctx->Driver.WriteRGBASpan = r128WriteRGBASpan_RGB565; - ctx->Driver.WriteRGBSpan = r128WriteRGBSpan_RGB565; - ctx->Driver.WriteMonoRGBASpan = r128WriteMonoRGBASpan_RGB565; - ctx->Driver.WriteRGBAPixels = r128WriteRGBAPixels_RGB565; - ctx->Driver.WriteMonoRGBAPixels = r128WriteMonoRGBAPixels_RGB565; - ctx->Driver.ReadRGBASpan = r128ReadRGBASpan_RGB565; - ctx->Driver.ReadRGBAPixels = r128ReadRGBAPixels_RGB565; + swdd->WriteRGBASpan = r128WriteRGBASpan_RGB565; + swdd->WriteRGBSpan = r128WriteRGBSpan_RGB565; + swdd->WriteMonoRGBASpan = r128WriteMonoRGBASpan_RGB565; + swdd->WriteRGBAPixels = r128WriteRGBAPixels_RGB565; + swdd->WriteMonoRGBAPixels = r128WriteMonoRGBAPixels_RGB565; + swdd->ReadRGBASpan = r128ReadRGBASpan_RGB565; + swdd->ReadRGBAPixels = r128ReadRGBAPixels_RGB565; break; case 4: - ctx->Driver.WriteRGBASpan = r128WriteRGBASpan_ARGB8888; - ctx->Driver.WriteRGBSpan = r128WriteRGBSpan_ARGB8888; - ctx->Driver.WriteMonoRGBASpan = r128WriteMonoRGBASpan_ARGB8888; - ctx->Driver.WriteRGBAPixels = r128WriteRGBAPixels_ARGB8888; - ctx->Driver.WriteMonoRGBAPixels = r128WriteMonoRGBAPixels_ARGB8888; - ctx->Driver.ReadRGBASpan = r128ReadRGBASpan_ARGB8888; - ctx->Driver.ReadRGBAPixels = r128ReadRGBAPixels_ARGB8888; + swdd->WriteRGBASpan = r128WriteRGBASpan_ARGB8888; + swdd->WriteRGBSpan = r128WriteRGBSpan_ARGB8888; + swdd->WriteMonoRGBASpan = r128WriteMonoRGBASpan_ARGB8888; + swdd->WriteRGBAPixels = r128WriteRGBAPixels_ARGB8888; + swdd->WriteMonoRGBAPixels = r128WriteMonoRGBAPixels_ARGB8888; + swdd->ReadRGBASpan = r128ReadRGBASpan_ARGB8888; + swdd->ReadRGBAPixels = r128ReadRGBAPixels_ARGB8888; break; default: break; } - switch ( rmesa->glCtx->Visual->DepthBits ) { + switch ( rmesa->glCtx->Visual.depthBits ) { case 16: - ctx->Driver.ReadDepthSpan = r128ReadDepthSpan_16; - ctx->Driver.WriteDepthSpan = r128WriteDepthSpan_16; - ctx->Driver.ReadDepthPixels = r128ReadDepthPixels_16; - ctx->Driver.WriteDepthPixels = r128WriteDepthPixels_16; + swdd->ReadDepthSpan = r128ReadDepthSpan_16; + swdd->WriteDepthSpan = r128WriteDepthSpan_16; + swdd->ReadDepthPixels = r128ReadDepthPixels_16; + swdd->WriteDepthPixels = r128WriteDepthPixels_16; break; case 24: - ctx->Driver.ReadDepthSpan = r128ReadDepthSpan_24_8; - ctx->Driver.WriteDepthSpan = r128WriteDepthSpan_24_8; - ctx->Driver.ReadDepthPixels = r128ReadDepthPixels_24_8; - ctx->Driver.WriteDepthPixels = r128WriteDepthPixels_24_8; + swdd->ReadDepthSpan = r128ReadDepthSpan_24_8; + swdd->WriteDepthSpan = r128WriteDepthSpan_24_8; + swdd->ReadDepthPixels = r128ReadDepthPixels_24_8; + swdd->WriteDepthPixels = r128WriteDepthPixels_24_8; 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; + swdd->WriteCI8Span = NULL; + swdd->WriteCI32Span = NULL; + swdd->WriteMonoCISpan = NULL; + swdd->WriteCI32Pixels = NULL; + swdd->WriteMonoCIPixels = NULL; + swdd->ReadCI32Span = NULL; + swdd->ReadCI32Pixels = NULL; } Index: xc/lib/GL/mesa/src/drv/r128/r128_state.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_state.c:1.8 xc/lib/GL/mesa/src/drv/r128/r128_state.c:1.11 --- xc/lib/GL/mesa/src/drv/r128/r128_state.c:1.8 Wed Mar 21 11:14:23 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_state.c Wed Oct 30 07:51:39 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_state.c,v 1.8 2001/03/21 16:14:23 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_state.c,v 1.11 2002/10/30 12:51:39 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -30,7 +30,7 @@ * Authors: * Gareth Hughes * Kevin E. Martin - * Keith Whitwell + * Keith Whitwell * */ @@ -43,10 +43,16 @@ #include "context.h" #include "mmath.h" -#include "pb.h" #include "enums.h" +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_pipeline.h" + + /* ============================================================= * Alpha blending */ @@ -95,6 +101,8 @@ t &= ~R128_ALPHA_TEST_ENABLE; } + FALLBACK( rmesa, R128_FALLBACK_BLEND_FUNC, GL_FALSE ); + if ( ctx->Color.BlendEnabled ) { a &= ~(R128_ALPHA_BLEND_SRC_MASK | R128_ALPHA_BLEND_DST_MASK); @@ -126,6 +134,8 @@ case GL_SRC_ALPHA_SATURATE: a |= R128_ALPHA_BLEND_SRC_SRCALPHASAT; break; + default: + FALLBACK( rmesa, R128_FALLBACK_BLEND_FUNC, GL_TRUE ); } switch ( ctx->Color.BlendDstRGB ) { @@ -153,6 +163,8 @@ case GL_ONE_MINUS_DST_ALPHA: a |= R128_ALPHA_BLEND_DST_INVDESTALPHA; break; + default: + FALLBACK( rmesa, R128_FALLBACK_BLEND_FUNC, GL_TRUE ); } t |= R128_ALPHA_ENABLE; @@ -170,7 +182,7 @@ } } -static void r128DDAlphaFunc( GLcontext *ctx, GLenum func, GLclampf ref ) +static void r128DDAlphaFunc( GLcontext *ctx, GLenum func, GLchan ref ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); @@ -183,13 +195,19 @@ r128ContextPtr rmesa = R128_CONTEXT(ctx); 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; - } + /* BlendEquation sets ColorLogicOpEnabled in an unexpected + * manner. + */ + FALLBACK( R128_CONTEXT(ctx), R128_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && + ctx->Color.LogicOp != GL_COPY)); + + /* Can only do blend addition, not min, max, subtract, etc. */ + FALLBACK( R128_CONTEXT(ctx), R128_FALLBACK_BLEND_EQ, + mode != GL_FUNC_ADD_EXT); + + rmesa->new_state |= R128_NEW_ALPHA; } static void r128DDBlendFunc( GLcontext *ctx, GLenum sfactor, GLenum dfactor ) @@ -317,13 +335,16 @@ GLubyte c[4]; GLuint col; - if ( ctx->FogMode == FOG_FRAGMENT ) { + if ( ctx->Fog.Enabled ) { t |= R128_FOG_ENABLE; } else { t &= ~R128_FOG_ENABLE; } + + c[0] = FLOAT_TO_UBYTE( ctx->Fog.Color[0] ); + c[1] = FLOAT_TO_UBYTE( ctx->Fog.Color[1] ); + c[2] = FLOAT_TO_UBYTE( ctx->Fog.Color[2] ); - FLOAT_RGB_TO_UBYTE_RGB( c, ctx->Fog.Color ); col = r128PackColor( 4, c[0], c[1], c[2], 0 ); if ( rmesa->setup.fog_color_c != col ) { @@ -419,7 +440,7 @@ f |= R128_BACKFACE_SOLID | R128_FRONTFACE_SOLID; - if ( ctx->Polygon.CullFlag && ctx->PB->primitive == GL_POLYGON ) { + if ( ctx->Polygon.CullFlag ) { switch ( ctx->Polygon.CullFaceMode ) { case GL_FRONT: f &= ~R128_FRONTFACE_SOLID; @@ -434,7 +455,7 @@ } } - if ( rmesa->setup.pm4_vc_fpu_setup != f ) { + if ( 1 || rmesa->setup.pm4_vc_fpu_setup != f ) { rmesa->setup.pm4_vc_fpu_setup = f; rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_SETUP; } @@ -477,17 +498,14 @@ } } -static GLboolean r128DDColorMask( GLcontext *ctx, - GLboolean r, GLboolean g, - GLboolean b, GLboolean a ) +static void r128DDColorMask( GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); FLUSH_BATCH( rmesa ); rmesa->new_state |= R128_NEW_MASKS; - - return GL_FALSE; /* This forces the software paths to do colormasking. */ - /* This function will return void when we use Mesa 3.5 */ } @@ -499,26 +517,58 @@ * sense to break them out of the core texture state update routines. */ +static void updateSpecularLighting( GLcontext *ctx ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint t = rmesa->setup.tex_cntl_c; + + if ( ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR && + ctx->Light.Enabled) { + /* XXX separate specular color just doesn't seem to work as it should. + * For now, we fall back to s/w rendering whenever separate specular + * is enabled. + */ +#if 0 + if (ctx->Light.ShadeModel == GL_FLAT) { + /* R128 can't do flat-shaded separate specular */ + t &= ~R128_SPEC_LIGHT_ENABLE; + FALLBACK( rmesa, R128_FALLBACK_SEP_SPECULAR, GL_TRUE ); + /*printf("%s fallback sep spec\n", __FUNCTION__);*/ + } + else { + t |= R128_SPEC_LIGHT_ENABLE; + FALLBACK( rmesa, R128_FALLBACK_SEP_SPECULAR, GL_FALSE ); + /*printf("%s enable sep spec\n", __FUNCTION__);*/ + } +#else + t &= ~R128_SPEC_LIGHT_ENABLE; + FALLBACK( rmesa, R128_FALLBACK_SEP_SPECULAR, GL_TRUE ); + /*printf("%s fallback sep spec\n", __FUNCTION__);*/ +#endif + } + else { + t &= ~R128_SPEC_LIGHT_ENABLE; + FALLBACK( rmesa, R128_FALLBACK_SEP_SPECULAR, GL_FALSE ); + /*printf("%s disable sep spec\n", __FUNCTION__);*/ + } + + if ( rmesa->setup.tex_cntl_c != t ) { + rmesa->setup.tex_cntl_c = t; + rmesa->dirty |= R128_UPLOAD_CONTEXT; + rmesa->dirty |= R128_UPLOAD_SETUP; + rmesa->new_state |= R128_NEW_CONTEXT; + } +} + + static void r128DDLightModelfv( GLcontext *ctx, GLenum pname, const GLfloat *param ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); if ( pname == GL_LIGHT_MODEL_COLOR_CONTROL ) { - 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; - } + updateSpecularLighting(ctx); } } @@ -540,6 +590,8 @@ return; } + updateSpecularLighting(ctx); + if ( rmesa->setup.pm4_vc_fpu_setup != s ) { FLUSH_BATCH( rmesa ); rmesa->setup.pm4_vc_fpu_setup = s; @@ -566,27 +618,53 @@ rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_WINDOW; } - /* ============================================================= - * Miscellaneous + * Viewport */ -static void r128DDClearColor( GLcontext *ctx, - GLubyte r, GLubyte g, GLubyte b, GLubyte a ) + +static void r128CalcViewport( GLcontext *ctx ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); + const GLfloat *v = ctx->Viewport._WindowMap.m; + GLfloat *m = rmesa->hw_viewport; - rmesa->ClearColor = r128PackColor( rmesa->r128Screen->cpp, - r, g, b, a ); + /* See also r128_translate_vertex. + */ + m[MAT_SX] = v[MAT_SX]; + m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X; + m[MAT_SY] = - v[MAT_SY]; + m[MAT_TY] = - v[MAT_TY] + rmesa->driDrawable->h + SUBPIXEL_Y; + m[MAT_SZ] = v[MAT_SZ] * rmesa->depth_scale; + m[MAT_TZ] = v[MAT_TZ] * rmesa->depth_scale; +} + +static void r128Viewport( GLcontext *ctx, + GLint x, GLint y, + GLsizei width, GLsizei height ) +{ + r128CalcViewport( ctx ); +} + +static void r128DepthRange( GLcontext *ctx, + GLclampd nearval, GLclampd farval ) +{ + r128CalcViewport( ctx ); } + + +/* ============================================================= + * Miscellaneous + */ -static void r128DDColor( GLcontext *ctx, - GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +static void r128DDClearColor( GLcontext *ctx, + const GLchan color[4] ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); - rmesa->Color = r128PackColor( rmesa->r128Screen->cpp, - r, g, b, a ); + rmesa->ClearColor = r128PackColor( rmesa->r128Screen->cpp, + color[0], color[1], + color[2], color[3] ); } static void r128DDLogicOpCode( GLcontext *ctx, GLenum opcode ) @@ -596,39 +674,32 @@ if ( ctx->Color.ColorLogicOpEnabled ) { FLUSH_BATCH( rmesa ); - if ( opcode == GL_COPY ) { - rmesa->Fallback &= ~R128_FALLBACK_LOGICOP; - } else { - rmesa->Fallback |= R128_FALLBACK_LOGICOP; - } - } else { - rmesa->Fallback &= ~R128_FALLBACK_LOGICOP; + FALLBACK( rmesa, R128_FALLBACK_LOGICOP, opcode != GL_COPY ); } } -static GLboolean r128DDSetDrawBuffer( GLcontext *ctx, GLenum mode ) +static void r128DDSetDrawBuffer( GLcontext *ctx, GLenum mode ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); - int found = GL_TRUE; FLUSH_BATCH( rmesa ); if ( rmesa->DrawBuffer != mode ) { rmesa->DrawBuffer = mode; - rmesa->Fallback &= ~R128_FALLBACK_DRAW_BUFFER; switch ( mode ) { case GL_FRONT_LEFT: - rmesa->drawOffset = rmesa->r128Screen->frontOffset; - rmesa->drawPitch = rmesa->r128Screen->frontPitch; + rmesa->drawOffset = rmesa->readOffset = rmesa->r128Screen->frontOffset; + rmesa->drawPitch = rmesa->readPitch = rmesa->r128Screen->frontPitch; + FALLBACK( rmesa, R128_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; case GL_BACK_LEFT: - rmesa->drawOffset = rmesa->r128Screen->backOffset; - rmesa->drawPitch = rmesa->r128Screen->backPitch; + rmesa->drawOffset = rmesa->readOffset = rmesa->r128Screen->backOffset; + rmesa->drawPitch = rmesa->readPitch = rmesa->r128Screen->backPitch; + FALLBACK( rmesa, R128_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; default: - rmesa->Fallback |= R128_FALLBACK_DRAW_BUFFER; - found = GL_FALSE; + FALLBACK( rmesa, R128_FALLBACK_DRAW_BUFFER, GL_TRUE ); break; } @@ -636,31 +707,6 @@ (rmesa->drawOffset >> 5)); rmesa->new_state |= R128_NEW_WINDOW; } - - return found; -} - -static void r128DDSetReadBuffer( GLcontext *ctx, - GLframebuffer *colorBuffer, - GLenum mode ) -{ - r128ContextPtr rmesa = R128_CONTEXT(ctx); - - rmesa->Fallback &= ~R128_FALLBACK_READ_BUFFER; - - switch ( mode ) { - case GL_FRONT_LEFT: - rmesa->readOffset = rmesa->r128Screen->frontOffset; - rmesa->readPitch = rmesa->r128Screen->frontPitch; - break; - case GL_BACK_LEFT: - rmesa->readOffset = rmesa->r128Screen->backOffset; - rmesa->readPitch = rmesa->r128Screen->backPitch; - break; - default: - rmesa->Fallback |= R128_FALLBACK_READ_BUFFER; - break; - } } @@ -671,21 +717,22 @@ static void r128DDPolygonStipple( GLcontext *ctx, const GLubyte *mask ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); - GLuint *stipple = (GLuint *)mask; - - FLUSH_BATCH( rmesa ); - - rmesa->setup.dp_gui_master_cntl_c &= ~R128_GMC_BRUSH_NONE; + GLuint stipple[32], i; + drmR128Stipple stippleRec; - if ( ctx->Polygon.StippleFlag && ctx->PB->primitive == GL_POLYGON ) { - rmesa->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_32x32_MONO_FG_LA; - } else { - rmesa->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_SOLID_COLOR; + for (i = 0; i < 32; i++) { + stipple[31 - i] = ((mask[i*4+0] << 24) | + (mask[i*4+1] << 16) | + (mask[i*4+2] << 8) | + (mask[i*4+3])); } + FLUSH_BATCH( rmesa ); LOCK_HARDWARE( rmesa ); - drmR128PolygonStipple( rmesa->driFd, stipple ); + stippleRec.mask = stipple; + drmCommandWrite( rmesa->driFd, DRM_R128_STIPPLE, + &stippleRec, sizeof(drmR128Stipple) ); UNLOCK_HARDWARE( rmesa ); @@ -695,6 +742,18 @@ /* ============================================================= + * Render mode + */ + +static void r128DDRenderMode( GLcontext *ctx, GLenum mode ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + FALLBACK( rmesa, R128_FALLBACK_RENDER_MODE, (mode != GL_RENDER) ); +} + + + +/* ============================================================= * State enable/disable */ @@ -704,7 +763,7 @@ if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %s = %s )\n", - __FUNCTION__, gl_lookup_enum_by_nr( cap ), + __FUNCTION__, _mesa_lookup_enum_by_nr( cap ), state ? "GL_TRUE" : "GL_FALSE" ); } @@ -718,11 +777,11 @@ 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; - } + /* For some reason enable(GL_BLEND) affects ColorLogicOpEnabled. + */ + FALLBACK( rmesa, R128_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && + ctx->Color.LogicOp != GL_COPY)); break; case GL_CULL_FACE: @@ -760,11 +819,12 @@ case GL_COLOR_LOGIC_OP: FLUSH_BATCH( rmesa ); - if ( state && ctx->Color.LogicOp != GL_COPY ) { - rmesa->Fallback |= R128_FALLBACK_LOGICOP; - } else { - rmesa->Fallback &= ~R128_FALLBACK_LOGICOP; - } + FALLBACK( rmesa, R128_FALLBACK_LOGICOP, + state && ctx->Color.LogicOp != GL_COPY ); + break; + + case GL_LIGHTING: + updateSpecularLighting(ctx); break; case GL_SCISSOR_TEST: @@ -773,6 +833,11 @@ rmesa->new_state |= R128_NEW_CLIP; break; + case GL_STENCIL_TEST: + FLUSH_BATCH( rmesa ); + FALLBACK( rmesa, R128_FALLBACK_STENCIL, state ); + break; + case GL_TEXTURE_1D: case GL_TEXTURE_2D: case GL_TEXTURE_3D: @@ -781,9 +846,7 @@ break; case GL_POLYGON_STIPPLE: - if ( (ctx->Driver.TriangleCaps & DD_TRI_STIPPLE) && - ctx->PB->primitive == GL_POLYGON ) - { + if ( rmesa->render_primitive == GL_TRIANGLES ) { FLUSH_BATCH( rmesa ); rmesa->setup.dp_gui_master_cntl_c &= ~R128_GMC_BRUSH_NONE; if ( state ) { @@ -842,8 +905,8 @@ { R128SAREAPrivPtr sarea = rmesa->sarea; r128_context_regs_t *regs = &(rmesa->setup); - r128TexObjPtr t0 = rmesa->CurrentTexObj[0]; - r128TexObjPtr t1 = rmesa->CurrentTexObj[1]; + const r128TexObjPtr t0 = rmesa->CurrentTexObj[0]; + const r128TexObjPtr t1 = rmesa->CurrentTexObj[1]; if ( R128_DEBUG & DEBUG_VERBOSE_MSG ) { r128DDPrintDirty( "r128EmitHwStateLocked", rmesa->dirty ); @@ -889,8 +952,8 @@ tex->tex_border_color = t1->setup.tex_border_color; } - sarea->vertsize = rmesa->vertsize; - sarea->vc_format = rmesa->vc_format; + sarea->vertsize = rmesa->vertex_size; + sarea->vc_format = rmesa->vertex_format; /* Turn off the texture cache flushing */ rmesa->setup.tex_cntl_c &= ~R128_TEX_CACHE_FLUSH; @@ -958,82 +1021,18 @@ } } -/* 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 r128 uses triangles to render lines and points, it is - * necessary to turn off hardware culling when rendering these - * primitives. - */ -static void r128DDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ) -{ - r128ContextPtr rmesa = R128_CONTEXT(ctx); - GLuint f = rmesa->setup.pm4_vc_fpu_setup; - - f |= R128_BACKFACE_SOLID | R128_FRONTFACE_SOLID; - - if ( ctx->Polygon.CullFlag && ctx->PB->primitive == GL_POLYGON ) { - switch ( ctx->Polygon.CullFaceMode ) { - case GL_FRONT: - f &= ~R128_FRONTFACE_SOLID; - break; - case GL_BACK: - f &= ~R128_BACKFACE_SOLID; - break; - case GL_FRONT_AND_BACK: - f &= ~(R128_BACKFACE_SOLID | - R128_FRONTFACE_SOLID); - break; - } - } - - 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. - */ - rmesa->dirty |= R128_UPLOAD_SETUP; - } -} - - -#define INTERESTED (~(NEW_MODELVIEW | \ - NEW_PROJECTION | \ - NEW_TEXTURE_MATRIX | \ - NEW_USER_CLIP | \ - NEW_CLIENT_STATE)) -void r128DDUpdateState( GLcontext *ctx ) +static void r128DDInvalidateState( GLcontext *ctx, GLuint new_state ) { - r128ContextPtr rmesa = R128_CONTEXT(ctx); - - if ( ctx->NewState & INTERESTED ) { - r128DDChooseRenderState( ctx ); - r128DDChooseRasterSetupFunc( ctx ); - } - - /* Need to do this here to detect texture fallbacks before - * setting triangle functions. - */ - if ( rmesa->new_state & R128_NEW_TEXTURE ) { - r128DDUpdateHWState( 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; - } + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + R128_CONTEXT(ctx)->NewGLState |= new_state; } + /* Initialize the context's hardware state. */ void r128DDInitState( r128ContextPtr rmesa ) @@ -1054,35 +1053,26 @@ rmesa->ClearColor = 0x00000000; - switch ( rmesa->glCtx->Visual->DepthBits ) { + switch ( rmesa->glCtx->Visual.depthBits ) { case 16: rmesa->ClearDepth = 0x0000ffff; - rmesa->DepthMask = 0xffffffff; depth_bpp = R128_Z_PIX_WIDTH_16; rmesa->depth_scale = 1.0 / (GLfloat)0xffff; break; case 24: rmesa->ClearDepth = 0x00ffffff; - rmesa->DepthMask = 0x00ffffff; depth_bpp = R128_Z_PIX_WIDTH_24; rmesa->depth_scale = 1.0 / (GLfloat)0xffffff; break; default: fprintf( stderr, "Error: Unsupported depth %d... exiting\n", - rmesa->glCtx->Visual->DepthBits ); + rmesa->glCtx->Visual.depthBits ); exit( -1 ); } - 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 ) { + if ( rmesa->glCtx->Visual.doubleBufferMode ) { rmesa->DrawBuffer = GL_BACK_LEFT; rmesa->drawOffset = rmesa->readOffset = rmesa->r128Screen->backOffset; rmesa->drawPitch = rmesa->readPitch = rmesa->r128Screen->backPitch; @@ -1198,33 +1188,14 @@ */ void r128DDInitStateFuncs( GLcontext *ctx ) { - ctx->Driver.UpdateState = r128DDUpdateState; + ctx->Driver.UpdateState = r128DDInvalidateState; ctx->Driver.ClearIndex = NULL; ctx->Driver.ClearColor = r128DDClearColor; - ctx->Driver.Index = NULL; - ctx->Driver.Color = r128DDColor; ctx->Driver.SetDrawBuffer = r128DDSetDrawBuffer; - ctx->Driver.SetReadBuffer = r128DDSetReadBuffer; ctx->Driver.IndexMask = NULL; ctx->Driver.ColorMask = r128DDColorMask; - ctx->Driver.LogicOp = NULL; - ctx->Driver.Dither = NULL; - - ctx->Driver.NearFar = NULL; - - ctx->Driver.RenderStart = r128DDUpdateHWState; - ctx->Driver.RenderFinish = NULL; - ctx->Driver.RasterSetup = NULL; - - ctx->Driver.RenderVBClippedTab = NULL; - ctx->Driver.RenderVBCulledTab = NULL; - ctx->Driver.RenderVBRawTab = NULL; - - ctx->Driver.ReducedPrimitiveChange = r128DDReducedPrimitiveChange; - ctx->Driver.MultipassFunc = NULL; - ctx->Driver.AlphaFunc = r128DDAlphaFunc; ctx->Driver.BlendEquation = r128DDBlendEquation; ctx->Driver.BlendFunc = r128DDBlendFunc; @@ -1234,7 +1205,6 @@ ctx->Driver.FrontFace = r128DDFrontFace; ctx->Driver.DepthFunc = r128DDDepthFunc; ctx->Driver.DepthMask = r128DDDepthMask; - ctx->Driver.DepthRange = NULL; ctx->Driver.Enable = r128DDEnable; ctx->Driver.Fogfv = r128DDFogfv; ctx->Driver.Hint = NULL; @@ -1243,11 +1213,29 @@ ctx->Driver.LogicOpcode = r128DDLogicOpCode; ctx->Driver.PolygonMode = NULL; ctx->Driver.PolygonStipple = r128DDPolygonStipple; + ctx->Driver.RenderMode = r128DDRenderMode; ctx->Driver.Scissor = r128DDScissor; ctx->Driver.ShadeModel = r128DDShadeModel; ctx->Driver.ClearStencil = NULL; ctx->Driver.StencilFunc = NULL; ctx->Driver.StencilMask = NULL; ctx->Driver.StencilOp = NULL; - ctx->Driver.Viewport = NULL; + + ctx->Driver.DepthRange = r128DepthRange; + ctx->Driver.Viewport = r128Viewport; + + /* Pixel path fallbacks. + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.Bitmap = _swrast_Bitmap; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; + + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; } Index: xc/lib/GL/mesa/src/drv/r128/r128_tex.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_tex.c:1.10 xc/lib/GL/mesa/src/drv/r128/r128_tex.c:1.14 --- xc/lib/GL/mesa/src/drv/r128/r128_tex.c:1.10 Fri Aug 17 22:51:05 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_tex.c Tue Nov 5 12:46:08 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.c,v 1.10 2001/08/18 02:51:05 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.c,v 1.14 2002/11/05 17:46:08 tsi Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -30,19 +30,24 @@ * Authors: * Gareth Hughes * Kevin E. Martin - * Michel Dänzer - * + * Brian Paul */ #include "r128_context.h" #include "r128_state.h" #include "r128_ioctl.h" #include "r128_vb.h" +#include "r128_tris.h" #include "r128_tex.h" +#include "r128_texobj.h" +#include "context.h" +#include "macros.h" #include "mmath.h" #include "simple_list.h" #include "enums.h" +#include "texstore.h" +#include "texformat.h" #include "mem.h" #define TEX_0 1 @@ -55,6 +60,9 @@ switch ( swrap ) { case GL_CLAMP: + t->setup.tex_cntl |= R128_TEX_CLAMP_S_BORDER_COLOR; + break; + case GL_CLAMP_TO_EDGE: t->setup.tex_cntl |= R128_TEX_CLAMP_S_CLAMP; break; case GL_REPEAT: @@ -64,6 +72,9 @@ switch ( twrap ) { case GL_CLAMP: + t->setup.tex_cntl |= R128_TEX_CLAMP_T_BORDER_COLOR; + break; + case GL_CLAMP_TO_EDGE: t->setup.tex_cntl |= R128_TEX_CLAMP_T_CLAMP; break; case GL_REPEAT: @@ -87,10 +98,10 @@ t->setup.tex_cntl |= R128_MIN_BLEND_MIPNEAREST; break; case GL_LINEAR_MIPMAP_NEAREST: - t->setup.tex_cntl |= R128_MIN_BLEND_LINEARMIPNEAREST; + t->setup.tex_cntl |= R128_MIN_BLEND_MIPLINEAR; break; case GL_NEAREST_MIPMAP_LINEAR: - t->setup.tex_cntl |= R128_MIN_BLEND_MIPLINEAR; + t->setup.tex_cntl |= R128_MIN_BLEND_LINEARMIPNEAREST; break; case GL_LINEAR_MIPMAP_LINEAR: t->setup.tex_cntl |= R128_MIN_BLEND_LINEARMIPLINEAR; @@ -113,1323 +124,262 @@ } -/* Allocate and initialize hardware state associated with texture `t'. - */ -static r128TexObjPtr r128CreateTexObj( r128ContextPtr rmesa, - struct gl_texture_object *tObj ) +static r128TexObjPtr r128AllocTexObj( struct gl_texture_object *texObj ) { r128TexObjPtr t; - struct gl_texture_image *image; - int log2Pitch, log2Height, log2Size, log2MinSize; - int totalSize; - int i; - - image = tObj->Image[0]; - if ( !image ) - return NULL; - - t = (r128TexObjPtr) CALLOC( sizeof(*t) ); - if ( !t ) - return NULL; - - if ( R128_DEBUG & DEBUG_VERBOSE_API ) - fprintf( stderr, "%s( %p )\n", __FUNCTION__, tObj ); - - switch ( image->Format ) { - case GL_RGBA: - case GL_ALPHA: - case GL_LUMINANCE_ALPHA: - if ( rmesa->r128Screen->cpp == 4 ) { - t->texelBytes = 4; - t->textureFormat = R128_DATATYPE_ARGB8888; - } else { - t->texelBytes = 2; - t->textureFormat = R128_DATATYPE_ARGB4444; - } - break; - - case GL_RGB: - if ( rmesa->r128Screen->cpp == 4 ) { - t->texelBytes = 4; - t->textureFormat = R128_DATATYPE_ARGB8888; - } else { - t->texelBytes = 2; - t->textureFormat = R128_DATATYPE_RGB565; - } - break; - - case GL_LUMINANCE: - case GL_INTENSITY: - t->texelBytes = 1; - t->textureFormat = R128_DATATYPE_RGB8; - break; - - case GL_COLOR_INDEX: - t->texelBytes = 1; - t->textureFormat = R128_DATATYPE_CI8; - break; - - default: - fprintf( stderr, "%s: bad image->Format\n", __FUNCTION__ ); - FREE( t ); - return NULL; - } - - /* Calculate dimensions in log domain */ - for ( i = 1, log2Height = 0 ; i < image->Height ; i *= 2 ) { - log2Height++; - } - for ( i = 1, log2Pitch = 0 ; i < image->Width ; i *= 2 ) { - log2Pitch++; - } - if ( image->Width > image->Height ) { - log2Size = log2Pitch; - } else { - log2Size = log2Height; - } - - t->dirty_images = 0; - /* Calculate mipmap offsets and dimensions */ - totalSize = 0; - for ( i = 0 ; i <= log2Size && tObj->Image[i] ; i++ ) { - t->image[i].offset = totalSize; - t->image[i].width = tObj->Image[i]->Width; - t->image[i].height = tObj->Image[i]->Height; - - t->dirty_images |= (1 << i); - - totalSize += (tObj->Image[i]->Height * - tObj->Image[i]->Width * - t->texelBytes); - - /* Offsets must be 32-byte aligned for host data blits and tiling */ - totalSize = (totalSize + 31) & ~31; + if ( R128_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, texObj ); } - log2MinSize = log2Size - i + 1; - - t->totalSize = totalSize; - t->internFormat = image->IntFormat; - - t->age = 0; - t->bound = 0; - t->heap = 0; - t->tObj = tObj; - t->memBlock = NULL; - t->bufAddr = 0; + t = (r128TexObjPtr) CALLOC_STRUCT( r128_tex_obj ); + if (!t) + return NULL; - /* Hardware state: + /* Initialize non-image-dependent parts of the state: */ - t->setup.tex_cntl = (R128_MIN_BLEND_NEAREST | - R128_MAG_BLEND_NEAREST | - R128_TEX_CLAMP_S_WRAP | - R128_TEX_CLAMP_T_WRAP | - t->textureFormat); - - t->setup.tex_combine_cntl = 0x00000000; - - t->setup.tex_size_pitch = ((log2Pitch << R128_TEX_PITCH_SHIFT) | - (log2Size << R128_TEX_SIZE_SHIFT) | - (log2Height << R128_TEX_HEIGHT_SHIFT) | - (log2MinSize << R128_TEX_MIN_SIZE_SHIFT)); - - for ( i = 0 ; i < R128_MAX_TEXTURE_LEVELS ; i++ ) { - t->setup.tex_offset[i] = 0x00000000; - } - t->setup.tex_border_color = 0x00000000; - - if ( ( log2MinSize == log2Size ) || ( log2MinSize != 0 ) ) { - t->setup.tex_cntl |= R128_MIP_MAP_DISABLE; - } - - r128SetTexWrap( t, tObj->WrapS, tObj->WrapT ); - r128SetTexFilter( t, tObj->MinFilter, tObj->MagFilter ); - r128SetTexBorderColor( t, tObj->BorderColor ); - - tObj->DriverData = t; - - make_empty_list( t ); - - return t; -} - -/* Destroy hardware state associated with texture `t'. - */ -void r128DestroyTexObj( r128ContextPtr rmesa, r128TexObjPtr t ) -{ -#if ENABLE_PERF_BOXES - /* Bump the performace counter */ - rmesa->c_textureSwaps++; -#endif - if ( !t ) return; - - 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. - */ -static void r128SwapOutTexObj( r128ContextPtr rmesa, r128TexObjPtr t ) -{ -#if ENABLE_PERF_BOXES - /* Bump the performace counter */ - rmesa->c_textureSwaps++; -#endif - if ( t->memBlock ) { - mmFreeMem( t->memBlock ); - t->memBlock = NULL; - } - + t->tObj = texObj; t->dirty_images = ~0; - move_to_tail( &rmesa->SwappedOut, t ); -} - -/* Print out debugging information about texture LRU. - */ -void r128PrintLocalLRU( r128ContextPtr rmesa, int heap ) -{ - r128TexObjPtr t; - int sz = 1 << (rmesa->r128Screen->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 r128PrintGlobalLRU( r128ContextPtr rmesa, int heap ) -{ - r128_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 = R128_NR_TEX_REGIONS ; i < R128_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 == R128_NR_TEX_REGIONS ) break; - } - - if ( j != R128_NR_TEX_REGIONS ) { - fprintf( stderr, "Loop detected in global LRU\n" ); - for ( i = 0 ; i < R128_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 r128ResetGlobalLRU( r128ContextPtr rmesa, int 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 - * the array (R128_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->r128Screen->texSize[heap] ; i++ ) { - list[i].prev = i-1; - list[i].next = i+1; - list[i].age = 0; - } - - i--; - list[0].prev = R128_NR_TEX_REGIONS; - list[i].prev = i-1; - list[i].next = R128_NR_TEX_REGIONS; - list[R128_NR_TEX_REGIONS].prev = i; - list[R128_NR_TEX_REGIONS].next = 0; - rmesa->sarea->texAge[heap] = 0; -} - -/* Update the local and glock texture LRUs. - */ -static void r128UpdateTexLRU( r128ContextPtr rmesa, r128TexObjPtr t ) -{ - int heap = t->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; - - 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 = R128_NR_TEX_REGIONS; - list[i].next = list[R128_NR_TEX_REGIONS].next; - list[(CARD32)list[R128_NR_TEX_REGIONS].next].prev = i; - list[R128_NR_TEX_REGIONS].next = i; - } - - if ( 0 ) { - 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). - */ -static void r128TexturesGone( r128ContextPtr rmesa, int heap, - int offset, int size, int in_use ) -{ - r128TexObjPtr 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. - */ - if ( t->bound ) { - r128SwapOutTexObj( rmesa, t ); - } else { - r128DestroyTexObj( rmesa, t ); - } - } - - if ( in_use ) { - t = (r128TexObjPtr) 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 r128AgeTextures( r128ContextPtr rmesa, int heap ) -{ - R128SAREAPrivPtr sarea = rmesa->sarea; - if ( sarea->texAge[heap] != rmesa->lastTexAge[heap] ) { - int sz = 1 << rmesa->r128Screen->logTexGranularity[heap]; - int nr = 0; - int idx; - - /* 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][R128_NR_TEX_REGIONS].prev ; - idx != R128_NR_TEX_REGIONS && nr < R128_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->r128Screen->texSize[heap] ) { - nr = R128_NR_TEX_REGIONS; - break; - } - - if ( sarea->texList[heap][idx].age > rmesa->lastTexAge[heap] ) { - r128TexturesGone( rmesa, heap, idx * sz, sz, - sarea->texList[heap][idx].in_use ); - } - } - - /* If switching texturing schemes, then the SAREA might not - * have been properly cleared, so we need to reset the - * global texture LRU. - */ - if ( nr == R128_NR_TEX_REGIONS ) { - r128TexturesGone( rmesa, heap, 0, - rmesa->r128Screen->texSize[heap], 0 ); - r128ResetGlobalLRU( rmesa, heap ); - } + make_empty_list( t ); - if ( 0 ) { - r128PrintGlobalLRU( rmesa, heap ); - r128PrintLocalLRU( rmesa, heap ); - } + r128SetTexWrap( t, texObj->WrapS, texObj->WrapT ); + /*r128SetTexMaxAnisotropy( t, texObj->MaxAnisotropy );*/ + r128SetTexFilter( t, texObj->MinFilter, texObj->MagFilter ); + r128SetTexBorderColor( t, texObj->BorderColor ); - rmesa->dirty |= (R128_UPLOAD_CONTEXT | - R128_UPLOAD_TEX0IMAGES | - R128_UPLOAD_TEX1IMAGES); - rmesa->lastTexAge[heap] = sarea->texAge[heap]; - } + return t; } - -/* ================================================================ - * 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, - int pitch ) -{ - CARD8 *src; - int i, j; - - switch ( image->Format ) { - case GL_LUMINANCE: - case GL_INTENSITY: - case GL_COLOR_INDEX: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x); - for ( j = width >> 2 ; j ; j-- ) { - *dst++ = src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24); - src += 4; - } - } - break; - - default: - fprintf( stderr, "%s: unsupported format 0x%x\n", - __FUNCTION__, image->Format ); - break; - } -} -/* 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, - int pitch ) +/* Called by the _mesa_store_teximage[123]d() functions. */ +static const struct gl_texture_format * +r128ChooseTextureFormat( GLcontext *ctx, GLint internalFormat, + GLenum format, GLenum type ) { - CARD8 *src; - int i, j; - - if ( R128_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "%s: %d,%d at %d,%d\n", - __FUNCTION__, width, height, x, y ); - } - - - switch ( image->Format ) { - 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++ = R128PACKCOLORS4444( src[0], src[1], src[2], src[3], - src[4], src[5], src[6], src[7] ); - src += 8; - } - } - break; - - 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++ = R128PACKCOLORS565( src[0], src[1], src[2], - src[3], src[4], src[5] ); - src += 6; - } - } - break; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + (void) format; + (void) type; + switch ( internalFormat ) { case GL_ALPHA: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x); - for ( j = width >> 1 ; j ; j-- ) { - *dst++ = R128PACKCOLORS4444( 0xff, 0xff, 0xff, src[0], - 0xff, 0xff, 0xff, src[1] ); - src += 2; - } - } - break; - + case GL_ALPHA4: + case GL_ALPHA8: + case GL_ALPHA12: + case GL_ALPHA16: + case 2: case GL_LUMINANCE_ALPHA: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 2; - for ( j = width >> 1 ; j ; j-- ) { - *dst++ = R128PACKCOLORS4444( src[0], src[0], src[0], src[1], - src[2], src[2], src[2], src[3] ); - src += 4; - } - } - break; - - default: - fprintf( stderr, "%s: unsupported format 0x%x\n", - __FUNCTION__, image->Format ); - break; - } -} - -/* 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, - int pitch ) -{ - CARD8 *src; - int i, j; - - switch ( image->Format ) { + case GL_LUMINANCE4_ALPHA4: + case GL_LUMINANCE6_ALPHA2: + case GL_LUMINANCE8_ALPHA8: + case GL_LUMINANCE12_ALPHA4: + case GL_LUMINANCE12_ALPHA12: + case GL_LUMINANCE16_ALPHA16: + case 4: case GL_RGBA: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 4; - for ( j = width ; j ; j-- ) { - *dst++ = R128PACKCOLOR8888( src[0], src[1], src[2], src[3] ); - src += 4; - } - } - break; + case GL_RGBA2: + case GL_RGB5_A1: + case GL_RGBA8: + case GL_RGB10_A2: + case GL_RGBA12: + case GL_RGBA16: + if (rmesa->r128Screen->cpp == 4) + return &_mesa_texformat_argb8888; + else + return &_mesa_texformat_argb4444; + case GL_RGBA4: + return &_mesa_texformat_argb4444; + case 3: 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_R3_G3_B2: + case GL_RGB4: + case GL_RGB5: + case GL_RGB8: + case GL_RGB10: + case GL_RGB12: + case GL_RGB16: + if (rmesa->r128Screen->cpp == 4) + return &_mesa_texformat_argb8888; + else + return &_mesa_texformat_rgb565; - case GL_ALPHA: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x); - for ( j = width ; j ; j-- ) { - *dst++ = R128PACKCOLOR8888( 0xff, 0xff, 0xff, src[0] ); - src += 1; - } - } - break; + case 1: + case GL_LUMINANCE: + case GL_LUMINANCE4: + case GL_LUMINANCE8: + case GL_LUMINANCE12: + case GL_LUMINANCE16: + if (rmesa->r128Screen->cpp == 4) + return &_mesa_texformat_argb8888; /* inefficient but accurate */ + else + return &_mesa_texformat_rgb565; - case GL_LUMINANCE_ALPHA: - for ( i = 0 ; i < height ; i++ ) { - src = (CARD8 *)image->Data + ((y + i) * pitch + x) * 2; - for ( j = width ; j ; j-- ) { - *dst++ = R128PACKCOLOR8888( src[0], src[0], src[0], src[1] ); - src += 2; - } - } - break; + case GL_INTENSITY4: + return &_mesa_texformat_argb4444; + case GL_INTENSITY: + case GL_INTENSITY8: + case GL_INTENSITY12: + case GL_INTENSITY16: + if (rmesa->r128Screen->cpp == 4) + return &_mesa_texformat_argb8888; /* inefficient but accurate */ + else + return &_mesa_texformat_argb4444; + 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: + return &_mesa_texformat_ci8; + default: - fprintf( stderr, "%s: unsupported format 0x%x\n", - __FUNCTION__, image->Format ); - break; + _mesa_problem( ctx, "unexpected format in r128ChooseTextureFormat" ); + return NULL; } } -/* Upload the texture image associated with texture `t' at level `level' - * at the address relative to `start'. - */ -static void r128UploadSubImage( r128ContextPtr rmesa, - r128TexObjPtr t, int level, - int x, int y, int width, int height ) -{ - struct gl_texture_image *image; - int texelsPerDword = 0; - int imageWidth, imageHeight; - int remaining, rows; - int format, dwords; - CARD32 pitch, offset; - drmBufPtr buffer; - CARD32 *dst; - int i; - - /* Ensure we have a valid texture to upload */ - if ( ( level < 0 ) || ( level > R128_MAX_TEXTURE_LEVELS ) ) - return; - - image = t->tObj->Image[level]; - if ( !image || !image->Data ) - return; - - switch ( t->texelBytes ) { - case 1: texelsPerDword = 4; break; - case 2: texelsPerDword = 2; break; - case 4: texelsPerDword = 1; break; - } - -#if 1 - /* FIXME: The subimage index calcs are wrong... */ - x = 0; - y = 0; - width = image->Width; - height = image->Height; -#endif - - imageWidth = image->Width; - imageHeight = image->Height; - - format = t->textureFormat >> 16; - - /* The texel upload routines have a minimum width, so force the size - * if needed. - */ - if ( imageWidth < texelsPerDword ) { - int factor; - - factor = texelsPerDword / imageWidth; - imageWidth = texelsPerDword; - imageHeight /= factor; - if ( imageHeight == 0 ) { - /* In this case, the texel converter will actually walk a - * texel or two off the end of the image, but normal malloc - * alignment should prevent it from ever causing a fault. - */ - imageHeight = 1; - } - } - - /* We can't upload to a pitch less than 8 texels so we will need to - * linearly upload all modified rows for textures smaller than this. - * This makes the x/y/width/height different for the blitter and the - * texture walker. - */ - if ( imageWidth >= 8 ) { - /* The texture walker and the blitter look identical */ - pitch = imageWidth >> 3; - } else { - int factor; - int y2; - int start, end; - - start = (y * imageWidth) & ~7; - end = (y + height) * imageWidth; - - if ( end - start < 8 ) { - /* Handle the case where the total number of texels - * uploaded is < 8. - */ - x = 0; - y = start / 8; - width = end - start; - height = 1; - } else { - /* Upload some number of full 8 texel blit rows */ - factor = 8 / imageWidth; - - y2 = y + height - 1; - y /= factor; - y2 /= factor; - - x = 0; - width = 8; - height = y2 - y + 1; - } - - /* Fixed pitch of 8 */ - pitch = 1; - } - - dwords = width * height / texelsPerDword; - offset = t->bufAddr + t->image[level].offset; - -#if ENABLE_PERF_BOXES - /* Bump the performace counter */ - 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", - (GLuint)offset, (GLuint)pitch, dwords, level, format ); - } - - /* Subdivide the texture if required */ - if ( dwords <= R128_BUFFER_MAX_DWORDS / 2 ) { - rows = height; - } else { - rows = (R128_BUFFER_MAX_DWORDS * texelsPerDword) / (2 * width); - } - - for ( i = 0, remaining = height ; - remaining > 0 ; - remaining -= rows, y += rows, i++ ) - { - height = (remaining >= rows) ? rows : remaining; - dwords = width * height / texelsPerDword; - - if ( R128_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, " blitting: %d,%d at %d,%d - %d dwords\n", - width, height, x, y, dwords ); - } - - /* Grab the indirect buffer for the texture blit */ - buffer = r128GetBufferLocked( rmesa ); - - dst = (CARD32 *)((char *)buffer->address + R128_HOSTDATA_BLIT_OFFSET); - - /* Actually do the texture conversion */ - switch ( t->texelBytes ) { - case 1: - r128ConvertTexture8bpp( dst, image, - x, y, width, height, width ); - break; - case 2: - r128ConvertTexture16bpp( dst, image, - x, y, width, height, width ); - break; - case 4: - r128ConvertTexture32bpp( dst, image, - x, y, width, height, width ); - break; - } - r128FireBlitLocked( rmesa, buffer, - offset, pitch, format, - x, y, width, height ); - } - - rmesa->new_state |= R128_NEW_CONTEXT; - rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_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. - */ -/* NOTE: This function is only called while holding the hardware lock */ -int r128UploadTexImages( r128ContextPtr rmesa, r128TexObjPtr t ) +static void r128TexImage1D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) { - int i; - int minLevel; - int maxLevel; - int heap; - - if ( R128_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "%s( %p, %p )\n", - __FUNCTION__, rmesa->glCtx, t ); - } - - if ( !t ) return 0; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + r128TexObjPtr t = (r128TexObjPtr) texObj->DriverData; - /* Choose the heap appropriately */ - heap = t->heap = R128_CARD_HEAP; - if ( !rmesa->r128Screen->IsPCI && - t->totalSize > rmesa->r128Screen->texSize[heap] ) { - heap = t->heap = R128_AGP_HEAP; + if ( t ) { + r128SwapOutTexObj( R128_CONTEXT(ctx), t ); } - - /* 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 ); - - /* Try AGP before kicking anything out of local mem */ - 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_HEAP; + else { + t = r128AllocTexObj(texObj); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); + return; } - - /* Kick out textures until the requested texture fits */ - while ( !t->memBlock ) { - if ( rmesa->TexObjList[heap].prev->bound ) { - fprintf( stderr, - "r128UploadTexImages: ran into bound texture\n" ); - return -1; - } - 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_CARD_HEAP ) { - heap = t->heap = R128_AGP_HEAP; - continue; - } else { - fprintf( stderr, "r128UploadTexImages: upload texture " - "failure on both local and AGP texture heaps, " - "sz=%d\n", - t->totalSize ); - return -1; - } - } - - r128DestroyTexObj( 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->r128Screen->texOffset[heap] + t->memBlock->ofs; - - maxLevel = ((t->setup.tex_size_pitch & R128_TEX_SIZE_MASK) >> - R128_TEX_SIZE_SHIFT); - minLevel = ((t->setup.tex_size_pitch & R128_TEX_MIN_SIZE_MASK) >> - R128_TEX_MIN_SIZE_SHIFT); - - /* Set texture offsets */ - if ( t->setup.tex_cntl & R128_MIP_MAP_DISABLE ) { - for ( i = 0 ; i < R128_MAX_TEXTURE_LEVELS ; i++ ) { - t->setup.tex_offset[i] = t->bufAddr; - } - } else { - for ( i = maxLevel ; i >= minLevel ; i-- ) { - t->setup.tex_offset[i] = - (t->image[maxLevel-i].offset + t->bufAddr); - } - } - - /* Force loading the new state into the hardware */ - switch ( t->bound ) { - case 1: - rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_TEX0; - break; - - case 2: - rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_TEX1; - break; - - default: - return -1; - } + texObj->DriverData = t; } - - /* Let the world know we've used this memory recently */ - r128UpdateTexLRU( rmesa, t ); - - /* Upload any images that are new */ - if ( t->dirty_images ) { - int num_levels = (((t->setup.tex_size_pitch & R128_TEX_SIZE_MASK) >> - R128_TEX_SIZE_SHIFT) - - ((t->setup.tex_size_pitch & R128_TEX_MIN_SIZE_MASK) >> - R128_TEX_MIN_SIZE_SHIFT)); - - for ( i = 0 ; i <= num_levels ; i++ ) { - if ( t->dirty_images & (1 << i) ) { - r128UploadSubImage( rmesa, t, i, 0, 0, - t->image[i].width, t->image[i].height ); - } - } - - rmesa->setup.tex_cntl_c |= R128_TEX_CACHE_FLUSH; - rmesa->dirty |= R128_UPLOAD_CONTEXT; - } + /* Note, this will call r128ChooseTextureFormat */ + _mesa_store_teximage1d( ctx, target, level, internalFormat, + width, border, format, type, + pixels, packing, texObj, texImage ); - t->dirty_images = 0; - return 0; + t->dirty_images |= (1 << level); + rmesa->new_state |= R128_NEW_TEXTURE; } - -/* ================================================================ - * 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) -/* 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 r128UpdateTextureEnv( GLcontext *ctx, int unit ) +static void r128TexSubImage1D( 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 ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); - GLint source = rmesa->tmu_source[unit]; - struct gl_texture_object *tObj; - GLuint enabled; - GLuint combine; + r128TexObjPtr t = (r128TexObjPtr) texObj->DriverData; - if ( R128_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "%s( %p, %d )\n", - __FUNCTION__, ctx, unit ); + assert( t ); /* this _should_ be true */ + if ( t ) { + r128SwapOutTexObj( R128_CONTEXT(ctx), t ); + t->dirty_images |= (1 << level); } - - 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. - */ - 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; - - if ( unit == 0 ) { - combine = INPUT_INTERP; - } else { - combine = INPUT_PREVIOUS; - } - - /* Set the texture environment state */ - switch ( ctx->Texture.Unit[source].EnvMode ) { - case GL_REPLACE: - switch ( tObj->Image[0]->Format ) { - case GL_RGBA: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - combine |= (COLOR_COMB_DISABLE | /* C = Ct */ - ALPHA_COMB_DISABLE); /* A = At */ - break; - case GL_RGB: - case GL_LUMINANCE: - combine |= (COLOR_COMB_DISABLE | /* C = Ct */ - ALPHA_COMB_COPY_INPUT); /* A = Af */ - break; - case GL_ALPHA: - combine |= (COLOR_COMB_COPY_INPUT | /* C = Cf */ - ALPHA_COMB_DISABLE); /* A = At */ - break; - case GL_COLOR_INDEX: - default: - return; - } - break; - - case GL_MODULATE: - switch ( tObj->Image[0]->Format ) { - case GL_RGBA: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - combine |= (COLOR_COMB_MODULATE | /* C = CfCt */ - ALPHA_COMB_MODULATE); /* A = AfAt */ - break; - case GL_RGB: - case GL_LUMINANCE: - combine |= (COLOR_COMB_MODULATE | /* C = CfCt */ - 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_COLOR_INDEX: - default: - return; - } - break; - - case GL_DECAL: - switch ( tObj->Image[0]->Format ) { - case GL_RGBA: - combine |= (COLOR_COMB_BLEND_TEX | /* C = Cf(1-At)+CtAt */ - ALPHA_COMB_COPY_INPUT); /* A = Af */ - break; - case GL_RGB: - combine |= (COLOR_COMB_DISABLE | /* C = Ct */ - ALPHA_COMB_COPY_INPUT); /* A = Af */ - break; - case GL_ALPHA: - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - /* Undefined behaviour - just copy the incoming fragment */ - combine |= (COLOR_COMB_COPY_INPUT | /* C = undefined */ - ALPHA_COMB_COPY_INPUT); /* A = undefined */ - break; - case GL_COLOR_INDEX: - default: - return; - } - break; - - case GL_BLEND: - /* Rage 128 Pro and M3 can handle GL_BLEND texturing. - */ - 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; + else { + t = r128AllocTexObj(texObj); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage1D"); + return; } - switch ( tObj->Image[0]->Format ) { - case GL_RGBA: - case GL_LUMINANCE_ALPHA: - switch ( rmesa->env_color & 0x00ffffff ) { - case 0x00000000: - combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ - ALPHA_COMB_MODULATE); /* A = AfAt */ - break; - case 0x00ffffff: - if ( unit == 0 ) { - combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ - ALPHA_COMB_MODULATE); /* A = AfAt */ - } else { - combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ - ALPHA_COMB_COPY_INPUT); /* A = Af */ - } - break; - default: - combine |= (COLOR_COMB_MODULATE | /* C = fallback */ - ALPHA_COMB_MODULATE); /* A = fallback */ - rmesa->Fallback |= R128_FALLBACK_TEXTURE; - break; - } - break; - case GL_RGB: - case GL_LUMINANCE: - switch ( rmesa->env_color & 0x00ffffff ) { - case 0x00000000: - combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ - ALPHA_COMB_COPY_INPUT); /* A = Af */ - break; - case 0x00ffffff: - if ( unit == 0 ) { - combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ - ALPHA_COMB_COPY_INPUT); /* A = Af */ - } else { - combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ - ALPHA_COMB_COPY_INPUT); /* A = Af */ - } - break; - default: - combine |= (COLOR_COMB_MODULATE | /* C = fallback */ - ALPHA_COMB_COPY_INPUT); /* A = fallback */ - rmesa->Fallback |= R128_FALLBACK_TEXTURE; - break; - } - break; - case GL_ALPHA: - 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 ( rmesa->env_color & 0x00ffffff ) { - case 0x00000000: - combine |= COLOR_COMB_MODULATE_NTEX; /* C = Cf(1-It) */ - break; - case 0x00ffffff: - if ( unit == 0 ) { - combine |= COLOR_COMB_MODULATE_NTEX; /* C = Cf(1-It) */ - } else { - 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; - } - switch ( rmesa->env_color & 0xff000000 ) { - case 0x00000000: - combine |= ALPHA_COMB_MODULATE_NTEX; /* A = Af(1-It) */ - break; - case 0xff000000: - if ( unit == 0 ) { - combine |= ALPHA_COMB_MODULATE_NTEX; /* A = Af(1-It) */ - } else { - combine |= ALPHA_COMB_ADD; /* A = Af+It */ - } - break; - 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; - - case GL_ADD: - switch ( tObj->Image[0]->Format ) { - case GL_RGBA: - case GL_LUMINANCE_ALPHA: - combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ - ALPHA_COMB_MODULATE); /* A = AfAt */ - break; - case GL_RGB: - case GL_LUMINANCE: - combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ - 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: - combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ - ALPHA_COMB_ADD); /* A = Af+At */ - break; - case GL_COLOR_INDEX: - default: - return; - } - break; - - default: - return; + texObj->DriverData = t; } + + _mesa_store_texsubimage1d(ctx, target, level, xoffset, width, + format, type, pixels, packing, texObj, + texImage); - rmesa->tex_combine[unit] = combine; + t->dirty_images |= (1 << level); + rmesa->new_state |= R128_NEW_TEXTURE; } + -static void r128UpdateTextureObject( GLcontext *ctx, int unit ) +static void r128TexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); - int source = rmesa->tmu_source[unit]; - struct gl_texture_object *tObj; - r128TexObjPtr t; - GLuint enabled; - - if ( R128_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "%s( %p, %d ) really=0x%x\n", - __FUNCTION__, ctx, unit, ctx->Texture.ReallyEnabled ); - } - - enabled = (ctx->Texture.ReallyEnabled >> (source * 4)) & TEXTURE0_ANY; - if ( enabled != TEXTURE0_2D && enabled != TEXTURE0_1D ) { - if ( enabled ) - rmesa->Fallback |= R128_FALLBACK_TEXTURE; - return; - } + r128TexObjPtr t = (r128TexObjPtr) texObj->DriverData; - /* Only update the hardware texture state if the texture is current, - * complete and enabled. - */ - tObj = ctx->Texture.Unit[source].Current; - if ( !tObj || !tObj->Complete ) { - rmesa->Fallback |= R128_FALLBACK_TEXTURE; - return; - } - - if ( ( tObj != ctx->Texture.Unit[source].CurrentD[2] ) && - ( tObj != ctx->Texture.Unit[source].CurrentD[1] ) ) { - rmesa->Fallback |= R128_FALLBACK_TEXTURE; - return; + if ( t ) { + r128SwapOutTexObj( R128_CONTEXT(ctx), t ); } - - if ( !tObj->DriverData ) { - /* If this is the first time the texture has been used, then create - * a new texture object for it. - */ - r128CreateTexObj( rmesa, tObj ); - - if ( !tObj->DriverData ) { - /* Can't create a texture object... */ - fprintf( stderr, "%s: texture object creation failed!\n", - __FUNCTION__ ); - rmesa->Fallback |= R128_FALLBACK_TEXTURE; - return; + else { + t = r128AllocTexObj(texObj); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + return; } + texObj->DriverData = t; } - /* We definately have a valid texture now */ - t = tObj->DriverData; + /* Note, this will call r128ChooseTextureFormat */ + _mesa_store_teximage2d(ctx, target, level, internalFormat, + width, height, border, format, type, pixels, + &ctx->Unpack, texObj, texImage); - /* Force the texture unit state to be loaded into the hardware */ - rmesa->dirty |= R128_UPLOAD_CONTEXT | (R128_UPLOAD_TEX0 << unit); - - /* Force any texture images to be loaded into the hardware */ - if ( t->dirty_images ) - rmesa->dirty |= (R128_UPLOAD_TEX0IMAGES << unit); - - /* Bind to the given texture unit */ - rmesa->CurrentTexObj[unit] = t; - t->bound |= unit + 1; - - if ( t->memBlock ) - r128UpdateTexLRU( rmesa, t ); - - if ( unit == 0 ) { - 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; - - 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; - } + t->dirty_images |= (1 << level); + rmesa->new_state |= R128_NEW_TEXTURE; } -void r128UpdateTextureState( GLcontext *ctx ) + +static void r128TexSubImage2D( 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 ) { r128ContextPtr rmesa = R128_CONTEXT(ctx); + r128TexObjPtr t = (r128TexObjPtr) texObj->DriverData; - if ( R128_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "%s( %p ) en=0x%x\n", - __FUNCTION__, ctx, ctx->Texture.ReallyEnabled ); + assert( t ); /* this _should_ be true */ + if ( t ) { + r128SwapOutTexObj( R128_CONTEXT(ctx), t ); } - - /* Clear any texturing fallbacks */ - rmesa->Fallback &= ~R128_FALLBACK_TEXTURE; - - /* 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; - - 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 ); - r128UpdateTextureEnv( ctx, 0 ); - - if ( rmesa->multitex ) { - r128UpdateTextureObject( ctx, 1 ); - r128UpdateTextureEnv( ctx, 1 ); + else { + t = r128AllocTexObj(texObj); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + return; + } + texObj->DriverData = t; } - rmesa->dirty |= R128_UPLOAD_CONTEXT; + _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, + height, format, type, pixels, packing, texObj, + texImage); + t->dirty_images |= (1 << level); + rmesa->new_state |= R128_NEW_TEXTURE; } -/* ================================================================ - * DD interface texturing functions - * - * FIXME: Many of these are deprecated -- we should move to the new - * single-copy texture interface. - */ - static void r128DDTexEnv( GLcontext *ctx, GLenum target, GLenum pname, const GLfloat *param ) { @@ -1439,7 +389,7 @@ if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %s )\n", - __FUNCTION__, gl_lookup_enum_by_nr( pname ) ); + __FUNCTION__, _mesa_lookup_enum_by_nr( pname ) ); } switch ( pname ) { @@ -1450,7 +400,10 @@ case GL_TEXTURE_ENV_COLOR: texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - FLOAT_RGBA_TO_UBYTE_RGBA( c, texUnit->EnvColor ); + CLAMPED_FLOAT_TO_UBYTE( c[0], texUnit->EnvColor[0] ); + CLAMPED_FLOAT_TO_UBYTE( c[1], texUnit->EnvColor[1] ); + CLAMPED_FLOAT_TO_UBYTE( c[2], texUnit->EnvColor[2] ); + CLAMPED_FLOAT_TO_UBYTE( c[3], texUnit->EnvColor[3] ); 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 ); @@ -1516,82 +469,7 @@ } } -static void r128DDTexImage( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, GLint level, - GLint internalFormat, - const struct gl_texture_image *image ) -{ - 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 ( level >= R128_MAX_TEXTURE_LEVELS ) - return; - - t = (r128TexObjPtr)tObj->DriverData; - if ( t ) { - 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( rmesa, t ); - rmesa->new_state |= R128_NEW_TEXTURE; - } -} - -static void r128DDTexSubImage( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLint internalFormat, - const struct gl_texture_image *image ) -{ - r128ContextPtr rmesa = R128_CONTEXT(ctx); - r128TexObjPtr t; - - if ( R128_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "%s( %p, level %d ) size: %d,%d of %d,%d\n", - __FUNCTION__, tObj, level, width, height, - image->Width, image->Height ); - } - 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( rmesa ); - -#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( rmesa ); - - /* Update the context state */ - rmesa->setup.tex_cntl_c |= R128_TEX_CACHE_FLUSH; -#else - r128DestroyTexObj( rmesa, t ); -#endif - - rmesa->new_state |= R128_NEW_TEXTURE; - } -} - static void r128DDTexParameter( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj, GLenum pname, const GLfloat *params ) @@ -1601,19 +479,20 @@ if ( R128_DEBUG & DEBUG_VERBOSE_API ) { fprintf( stderr, "%s( %s )\n", - __FUNCTION__, gl_lookup_enum_by_nr( pname ) ); + __FUNCTION__, _mesa_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 || !t->bound ) + if ( ( target != GL_TEXTURE_2D ) && ( target != GL_TEXTURE_1D ) ) return; - if ( ( target != GL_TEXTURE_2D ) && - ( target != GL_TEXTURE_1D ) ) - return; + if (!t) { + t = r128AllocTexObj(tObj); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexParameter"); + return; + } + tObj->DriverData = t; + } switch ( pname ) { case GL_TEXTURE_MIN_FILTER: @@ -1633,6 +512,19 @@ r128SetTexBorderColor( t, tObj->BorderColor ); break; + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + /* This isn't the most efficient solution but there doesn't appear to + * be a nice alternative for R128. Since there's no LOD clamping, + * we just have to rely on loading the right subset of mipmap levels + * to simulate a clamped LOD. + */ + if ( t->bound ) FLUSH_BATCH( rmesa ); + r128SwapOutTexObj( rmesa, t ); + break; + default: return; } @@ -1654,7 +546,7 @@ FLUSH_BATCH( rmesa ); if ( rmesa->CurrentTexObj[unit] ) { - rmesa->CurrentTexObj[unit]->bound &= ~(unit+1); + rmesa->CurrentTexObj[unit]->bound &= ~(1 << unit); rmesa->CurrentTexObj[unit] = NULL; } @@ -1694,8 +586,19 @@ void r128DDInitTextureFuncs( GLcontext *ctx ) { ctx->Driver.TexEnv = r128DDTexEnv; - ctx->Driver.TexImage = r128DDTexImage; - ctx->Driver.TexSubImage = r128DDTexSubImage; + ctx->Driver.ChooseTextureFormat = r128ChooseTextureFormat; + ctx->Driver.TexImage1D = r128TexImage1D; + ctx->Driver.TexSubImage1D = r128TexSubImage1D; + ctx->Driver.TexImage2D = r128TexImage2D; + ctx->Driver.TexSubImage2D = r128TexSubImage2D; + ctx->Driver.TexImage3D = _mesa_store_teximage3d; + ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; + ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; + ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; + ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; + ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; + ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; + ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; ctx->Driver.TexParameter = r128DDTexParameter; ctx->Driver.BindTexture = r128DDBindTexture; ctx->Driver.DeleteTexture = r128DDDeleteTexture; Index: xc/lib/GL/mesa/src/drv/r128/r128_tex.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_tex.h:1.6 xc/lib/GL/mesa/src/drv/r128/r128_tex.h:1.7 --- xc/lib/GL/mesa/src/drv/r128/r128_tex.h:1.6 Tue Apr 10 13:53:07 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_tex.h Fri Feb 22 16:44:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.h,v 1.6 2001/04/10 17:53:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.h,v 1.7 2002/02/22 21:44:58 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -40,11 +40,15 @@ extern void r128UpdateTextureState( GLcontext *ctx ); -extern int r128UploadTexImages( r128ContextPtr rmesa, r128TexObjPtr t ); +extern void r128SwapOutTexObj( r128ContextPtr rmesa, r128TexObjPtr t ); +extern void r128UploadTexImages( r128ContextPtr rmesa, r128TexObjPtr t ); + extern void r128AgeTextures( r128ContextPtr rmesa, int heap ); extern void r128DestroyTexObj( r128ContextPtr rmesa, r128TexObjPtr t ); +extern void r128UpdateTexLRU( r128ContextPtr rmesa, r128TexObjPtr t ); + extern void r128PrintLocalLRU( r128ContextPtr rmesa, int heap ); extern void r128PrintGlobalLRU( r128ContextPtr rmesa, int heap ); @@ -73,24 +77,6 @@ #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)) - -#endif static __inline__ CARD32 r128PackColor( GLuint cpp, GLubyte r, GLubyte g, Index: xc/lib/GL/mesa/src/drv/r128/r128_texmem.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r128/r128_texmem.c:1.1 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r128/r128_texmem.c Fri Feb 22 16:44:58 2002 @@ -0,0 +1,592 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_texmem.c,v 1.1 2002/02/22 21:44:58 dawes 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. + +**************************************************************************/ + +/* + * Authors: + * Gareth Hughes + * Kevin E. Martin + * Brian Paul + */ + +#include "r128_context.h" +#include "r128_state.h" +#include "r128_ioctl.h" +#include "r128_vb.h" +#include "r128_tris.h" +#include "r128_tex.h" + +#include "context.h" +#include "macros.h" +#include "mmath.h" +#include "simple_list.h" +#include "texformat.h" +#include "mem.h" + +#define TEX_0 1 +#define TEX_1 2 + + +/* Destroy hardware state associated with texture `t'. + */ +void r128DestroyTexObj( r128ContextPtr rmesa, r128TexObjPtr t ) +{ +#if ENABLE_PERF_BOXES + /* Bump the performace counter */ + rmesa->c_textureSwaps++; +#endif + if ( !t ) return; + + 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 r128SwapOutTexObj( r128ContextPtr rmesa, r128TexObjPtr t ) +{ +#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 r128PrintLocalLRU( r128ContextPtr rmesa, int heap ) +{ + r128TexObjPtr t; + int sz = 1 << (rmesa->r128Screen->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 r128PrintGlobalLRU( r128ContextPtr rmesa, int heap ) +{ + r128_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 = R128_NR_TEX_REGIONS ; i < R128_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 == R128_NR_TEX_REGIONS ) break; + } + + if ( j != R128_NR_TEX_REGIONS ) { + fprintf( stderr, "Loop detected in global LRU\n" ); + for ( i = 0 ; i < R128_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 r128ResetGlobalLRU( r128ContextPtr rmesa, int 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 + * the array (R128_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->r128Screen->texSize[heap] ; i++ ) { + list[i].prev = i-1; + list[i].next = i+1; + list[i].age = 0; + } + + i--; + list[0].prev = R128_NR_TEX_REGIONS; + list[i].prev = i-1; + list[i].next = R128_NR_TEX_REGIONS; + list[R128_NR_TEX_REGIONS].prev = i; + list[R128_NR_TEX_REGIONS].next = 0; + rmesa->sarea->texAge[heap] = 0; +} + +/* Update the local and glock texture LRUs. + */ +void r128UpdateTexLRU( r128ContextPtr rmesa, r128TexObjPtr t ) +{ + int heap = t->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; + + 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 = R128_NR_TEX_REGIONS; + list[i].next = list[R128_NR_TEX_REGIONS].next; + list[(CARD32)list[R128_NR_TEX_REGIONS].next].prev = i; + list[R128_NR_TEX_REGIONS].next = i; + } + + if ( 0 ) { + 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). + */ +static void r128TexturesGone( r128ContextPtr rmesa, int heap, + int offset, int size, int in_use ) +{ + r128TexObjPtr 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. + */ + if ( t->bound ) { + r128SwapOutTexObj( rmesa, t ); + } else { + r128DestroyTexObj( rmesa, t ); + } + } + + if ( in_use ) { + t = (r128TexObjPtr) 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 r128AgeTextures( r128ContextPtr rmesa, int heap ) +{ + R128SAREAPrivPtr sarea = rmesa->sarea; + + if ( sarea->texAge[heap] != rmesa->lastTexAge[heap] ) { + int sz = 1 << rmesa->r128Screen->logTexGranularity[heap]; + int nr = 0; + int idx; + + /* 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][R128_NR_TEX_REGIONS].prev ; + idx != R128_NR_TEX_REGIONS && nr < R128_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->r128Screen->texSize[heap] ) { + nr = R128_NR_TEX_REGIONS; + break; + } + + if ( sarea->texList[heap][idx].age > rmesa->lastTexAge[heap] ) { + r128TexturesGone( rmesa, heap, idx * sz, sz, + sarea->texList[heap][idx].in_use ); + } + } + + /* If switching texturing schemes, then the SAREA might not + * have been properly cleared, so we need to reset the + * global texture LRU. + */ + if ( nr == R128_NR_TEX_REGIONS ) { + r128TexturesGone( rmesa, heap, 0, + rmesa->r128Screen->texSize[heap], 0 ); + r128ResetGlobalLRU( rmesa, heap ); + } + + if ( 0 ) { + r128PrintGlobalLRU( rmesa, heap ); + r128PrintLocalLRU( rmesa, heap ); + } + + rmesa->dirty |= (R128_UPLOAD_CONTEXT | + R128_UPLOAD_TEX0IMAGES | + R128_UPLOAD_TEX1IMAGES); + rmesa->lastTexAge[heap] = sarea->texAge[heap]; + } +} + + +/* Upload the texture image associated with texture `t' at level `level' + * at the address relative to `start'. + */ +static void r128UploadSubImage( r128ContextPtr rmesa, + r128TexObjPtr t, int level, + int x, int y, int width, int height ) +{ + struct gl_texture_image *image; + int texelsPerDword = 0; + int imageWidth, imageHeight; + int remaining, rows; + int format, dwords; + CARD32 pitch, offset; + int i; + + /* Ensure we have a valid texture to upload */ + if ( ( level < 0 ) || ( level > R128_MAX_TEXTURE_LEVELS ) ) + return; + + image = t->tObj->Image[level]; + if ( !image ) + return; + + switch ( image->TexFormat->TexelBytes ) { + case 1: texelsPerDword = 4; break; + case 2: texelsPerDword = 2; break; + case 4: texelsPerDword = 1; break; + } + +#if 1 + /* FIXME: The subimage index calcs are wrong... */ + x = 0; + y = 0; + width = image->Width; + height = image->Height; +#endif + + imageWidth = image->Width; + imageHeight = image->Height; + + format = t->textureFormat >> 16; + + /* The texel upload routines have a minimum width, so force the size + * if needed. + */ + if ( imageWidth < texelsPerDword ) { + int factor; + + factor = texelsPerDword / imageWidth; + imageWidth = texelsPerDword; + imageHeight /= factor; + if ( imageHeight == 0 ) { + /* In this case, the texel converter will actually walk a + * texel or two off the end of the image, but normal malloc + * alignment should prevent it from ever causing a fault. + */ + imageHeight = 1; + } + } + + /* We can't upload to a pitch less than 8 texels so we will need to + * linearly upload all modified rows for textures smaller than this. + * This makes the x/y/width/height different for the blitter and the + * texture walker. + */ + if ( imageWidth >= 8 ) { + /* The texture walker and the blitter look identical */ + pitch = imageWidth >> 3; + } else { + int factor; + int y2; + int start, end; + + start = (y * imageWidth) & ~7; + end = (y + height) * imageWidth; + + if ( end - start < 8 ) { + /* Handle the case where the total number of texels + * uploaded is < 8. + */ + x = 0; + y = start / 8; + width = end - start; + height = 1; + } else { + /* Upload some number of full 8 texel blit rows */ + factor = 8 / imageWidth; + + y2 = y + height - 1; + y /= factor; + y2 /= factor; + + x = 0; + width = 8; + height = y2 - y + 1; + } + + /* Fixed pitch of 8 */ + pitch = 1; + } + + dwords = width * height / texelsPerDword; + offset = t->bufAddr + t->image[level - t->firstLevel].offset; + +#if ENABLE_PERF_BOXES + /* Bump the performace counter */ + 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", + (GLuint)offset, (GLuint)pitch, dwords, level, format ); + } + + /* Subdivide the texture if required */ + if ( dwords <= R128_BUFFER_MAX_DWORDS / 2 ) { + rows = height; + } else { + rows = (R128_BUFFER_MAX_DWORDS * texelsPerDword) / (2 * width); + } + + for ( i = 0, remaining = height ; + remaining > 0 ; + remaining -= rows, y += rows, i++ ) + { + CARD32 *dst; + drmBufPtr buffer; + + height = MIN2(remaining, rows); + + /* Grab the indirect buffer for the texture blit */ + buffer = r128GetBufferLocked( rmesa ); + + dst = (CARD32 *)((char *)buffer->address + R128_HOSTDATA_BLIT_OFFSET); + + assert(image->Data); + + /* Copy the next chunck of the texture image into the blit buffer */ + { + const GLubyte *src = (const GLubyte *) image->Data + + (y * image->Width + x) * image->TexFormat->TexelBytes; + const GLuint bytes = width * height * image->TexFormat->TexelBytes; + memcpy(dst, src, bytes); + } + + r128FireBlitLocked( rmesa, buffer, + offset, pitch, format, + x, y, width, height ); + } + + rmesa->new_state |= R128_NEW_CONTEXT; + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_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. + */ +/* NOTE: This function is only called while holding the hardware lock */ +void r128UploadTexImages( r128ContextPtr rmesa, r128TexObjPtr t ) +{ + const GLint numLevels = t->lastLevel - t->firstLevel + 1; + GLint i, heap; + + if ( R128_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p, %p )\n", + __FUNCTION__, rmesa->glCtx, t ); + } + + assert(t); + + /* Choose the heap appropriately */ + 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( rmesa->texHeap[heap], t->totalSize, 12, 0 ); + + /* Try AGP before kicking anything out of local mem */ + if ( !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_HEAP; + } + + /* Kick out textures until the requested texture fits */ + while ( !t->memBlock ) { + if ( rmesa->TexObjList[heap].prev->bound ) { + fprintf( stderr, + "r128UploadTexImages: ran into bound texture\n" ); + return; + } + 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; + } else if ( heap == R128_CARD_HEAP ) { + heap = t->heap = R128_AGP_HEAP; + continue; + } else { + fprintf( stderr, "r128UploadTexImages: upload texture " + "failure on both local and AGP texture heaps, " + "sz=%d\n", + t->totalSize ); + return; + } + } + + r128SwapOutTexObj( 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->r128Screen->texOffset[heap] + t->memBlock->ofs; + + /* Set texture offsets for each mipmap level */ + if ( t->setup.tex_cntl & R128_MIP_MAP_DISABLE ) { + for ( i = 0 ; i < R128_MAX_TEXTURE_LEVELS ; i++ ) { + t->setup.tex_offset[i] = t->bufAddr; + } + } else { + for ( i = 0; i < numLevels; i++ ) { + const int j = numLevels - i - 1; + t->setup.tex_offset[j] = t->bufAddr + t->image[i].offset; + } + } + + /* Force loading the new state into the hardware */ + switch ( t->bound ) { + case 1: + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_TEX0; + break; + + case 2: + rmesa->dirty |= R128_UPLOAD_CONTEXT | R128_UPLOAD_TEX1; + break; + + default: + return; + } + } + + /* Let the world know we've used this memory recently */ + r128UpdateTexLRU( rmesa, t ); + + /* Upload any images that are new */ + if ( t->dirty_images ) { + for ( i = 0 ; i < numLevels; i++ ) { + const GLint j = t->firstLevel + i; /* the texObj's level */ + if ( t->dirty_images & (1 << j) ) { + r128UploadSubImage( rmesa, t, j, 0, 0, + t->image[i].width, t->image[i].height ); + } + } + + rmesa->setup.tex_cntl_c |= R128_TEX_CACHE_FLUSH; + rmesa->dirty |= R128_UPLOAD_CONTEXT; + t->dirty_images = 0; + } +} Index: xc/lib/GL/mesa/src/drv/r128/r128_texobj.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_texobj.h:1.4 xc/lib/GL/mesa/src/drv/r128/r128_texobj.h:1.5 --- xc/lib/GL/mesa/src/drv/r128/r128_texobj.h:1.4 Sun Jan 7 20:07:24 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_texobj.h Fri Feb 22 16:44:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_texobj.h,v 1.4 2001/01/08 01:07:24 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_texobj.h,v 1.5 2002/02/22 21:44:58 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -72,12 +72,14 @@ GLint totalSize; /* Total size of the texture including all mipmap levels */ - GLuint internFormat; /* Internal GL format used to store - texture on card */ CARD32 textureFormat; /* Actual hardware format */ - GLint texelBytes; /* Number of bytes per texel */ r128_texture_regs_t setup; /* Setup regs for texture */ + + /* texObj->Image[firstLevel] through texObj->Image[lastLevel] are the + * images to upload. + */ + GLint firstLevel, lastLevel; }; #endif /* _R128_TEXOBJ_H_ */ Index: xc/lib/GL/mesa/src/drv/r128/r128_texstate.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r128/r128_texstate.c:1.1 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r128/r128_texstate.c Fri Feb 22 16:44:58 2002 @@ -0,0 +1,597 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_texstate.c,v 1.1 2002/02/22 21:44:58 dawes 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. + +**************************************************************************/ + +/* + * Authors: + * Gareth Hughes + * Kevin E. Martin + * Brian Paul + */ + +#include "r128_context.h" +#include "r128_state.h" +#include "r128_ioctl.h" +#include "r128_vb.h" +#include "r128_tris.h" +#include "r128_tex.h" + +#include "context.h" +#include "macros.h" +#include "mem.h" +#include "texformat.h" + + +static void r128SetTexImages( r128ContextPtr rmesa, + const struct gl_texture_object *tObj ) +{ + r128TexObjPtr t = (r128TexObjPtr) tObj->DriverData; + struct gl_texture_image *baseImage = tObj->Image[tObj->BaseLevel]; + int log2Pitch, log2Height, log2Size, log2MinSize; + int totalSize; + int i; + GLint firstLevel, lastLevel; + + assert(t); + assert(baseImage); + + if ( R128_DEBUG & DEBUG_VERBOSE_API ) + fprintf( stderr, "%s( %p )\n", __FUNCTION__, tObj ); + + switch (baseImage->TexFormat->MesaFormat) { + case MESA_FORMAT_ARGB8888: + t->textureFormat = R128_DATATYPE_ARGB8888; + break; + case MESA_FORMAT_ARGB4444: + t->textureFormat = R128_DATATYPE_ARGB4444; + break; + case MESA_FORMAT_RGB565: + t->textureFormat = R128_DATATYPE_RGB565; + break; + case MESA_FORMAT_RGB332: + t->textureFormat = R128_DATATYPE_RGB8; + break; + case MESA_FORMAT_CI8: + t->textureFormat = R128_DATATYPE_CI8; + break; + default: + _mesa_problem(rmesa->glCtx, "Bad texture format in r128SetTexImages"); + }; + + /* Compute which mipmap levels we really want to send to the hardware. + * This depends on the base image size, GL_TEXTURE_MIN_LOD, + * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. + * Yes, this looks overly complicated, but it's all needed. + */ + firstLevel = tObj->BaseLevel + (GLint) (tObj->MinLod + 0.5); + firstLevel = MAX2(firstLevel, tObj->BaseLevel); + lastLevel = tObj->BaseLevel + (GLint) (tObj->MaxLod + 0.5); + lastLevel = MAX2(lastLevel, tObj->BaseLevel); + lastLevel = MIN2(lastLevel, tObj->BaseLevel + baseImage->MaxLog2); + lastLevel = MIN2(lastLevel, tObj->MaxLevel); + lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */ + + log2Pitch = tObj->Image[firstLevel]->WidthLog2; + log2Height = tObj->Image[firstLevel]->HeightLog2; + log2Size = MAX2(log2Pitch, log2Height); + log2MinSize = log2Size; + + t->dirty_images = 0; + totalSize = 0; + for ( i = firstLevel; i <= lastLevel; i++ ) { + const struct gl_texture_image *texImage; + + texImage = tObj->Image[i]; + if ( !texImage || !texImage->Data ) { + lastLevel = i - 1; + break; + } + + log2MinSize = texImage->MaxLog2; + + t->image[i - firstLevel].offset = totalSize; + t->image[i - firstLevel].width = tObj->Image[i]->Width; + t->image[i - firstLevel].height = tObj->Image[i]->Height; + + t->dirty_images |= (1 << i); + + totalSize += (tObj->Image[i]->Height * + tObj->Image[i]->Width * + tObj->Image[i]->TexFormat->TexelBytes); + + /* Offsets must be 32-byte aligned for host data blits and tiling */ + totalSize = (totalSize + 31) & ~31; + } + + t->totalSize = totalSize; + t->firstLevel = firstLevel; + t->lastLevel = lastLevel; + + /* Set the texture format */ + t->setup.tex_cntl &= ~(0xf << 16); + t->setup.tex_cntl |= t->textureFormat; + + t->setup.tex_combine_cntl = 0x00000000; /* XXX is this right? */ + + t->setup.tex_size_pitch = ((log2Pitch << R128_TEX_PITCH_SHIFT) | + (log2Size << R128_TEX_SIZE_SHIFT) | + (log2Height << R128_TEX_HEIGHT_SHIFT) | + (log2MinSize << R128_TEX_MIN_SIZE_SHIFT)); + + for ( i = 0 ; i < R128_MAX_TEXTURE_LEVELS ; i++ ) { + t->setup.tex_offset[i] = 0x00000000; + } + + if (firstLevel == lastLevel) + t->setup.tex_cntl |= R128_MIP_MAP_DISABLE; + else + t->setup.tex_cntl &= ~R128_MIP_MAP_DISABLE; + + /* XXX this is done in r128EmitHwStateLocked(): + r128UploadTexImages( rmesa, t ); + */ +} + + +/* ================================================================ + * 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) +/* 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 r128UpdateTextureEnv( GLcontext *ctx, int unit ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLint source = rmesa->tmu_source[unit]; + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[source]; + const struct gl_texture_object *tObj = texUnit->_Current; + const GLenum format = tObj->Image[tObj->BaseLevel]->Format; + GLuint combine; + + if ( R128_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p, %d )\n", + __FUNCTION__, ctx, unit ); + } + + if ( unit == 0 ) { + combine = INPUT_INTERP; + } else { + combine = INPUT_PREVIOUS; + } + + /* Set the texture environment state */ + switch ( texUnit->EnvMode ) { + case GL_REPLACE: + switch ( format ) { + case GL_RGBA: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + combine |= (COLOR_COMB_DISABLE | /* C = Ct */ + ALPHA_COMB_DISABLE); /* A = At */ + break; + case GL_RGB: + case GL_LUMINANCE: + combine |= (COLOR_COMB_DISABLE | /* C = Ct */ + ALPHA_COMB_COPY_INPUT); /* A = Af */ + break; + case GL_ALPHA: + combine |= (COLOR_COMB_COPY_INPUT | /* C = Cf */ + ALPHA_COMB_DISABLE); /* A = At */ + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_MODULATE: + switch ( format ) { + case GL_RGBA: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + combine |= (COLOR_COMB_MODULATE | /* C = CfCt */ + ALPHA_COMB_MODULATE); /* A = AfAt */ + break; + case GL_RGB: + case GL_LUMINANCE: + combine |= (COLOR_COMB_MODULATE | /* C = CfCt */ + 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_COLOR_INDEX: + default: + return; + } + break; + + case GL_DECAL: + switch ( format ) { + case GL_RGBA: + combine |= (COLOR_COMB_BLEND_TEX | /* C = Cf(1-At)+CtAt */ + ALPHA_COMB_COPY_INPUT); /* A = Af */ + break; + case GL_RGB: + combine |= (COLOR_COMB_DISABLE | /* C = Ct */ + ALPHA_COMB_COPY_INPUT); /* A = Af */ + break; + case GL_ALPHA: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + /* Undefined behaviour - just copy the incoming fragment */ + combine |= (COLOR_COMB_COPY_INPUT | /* C = undefined */ + ALPHA_COMB_COPY_INPUT); /* A = undefined */ + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_BLEND: + /* Rage 128 Pro and M3 can handle GL_BLEND texturing. + */ + if ( !R128_IS_PLAIN( rmesa ) ) { + /* XXX this hasn't been fully tested, I don't have a Pro card. -BP */ + switch ( 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 */ + FALLBACK( rmesa, R128_FALLBACK_TEXTURE, GL_TRUE ); + 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 ) { + FALLBACK( rmesa, R128_FALLBACK_TEXTURE, GL_TRUE ); + } + switch ( format ) { + case GL_RGBA: + case GL_LUMINANCE_ALPHA: + switch ( rmesa->env_color & 0x00ffffff ) { + case 0x00000000: + combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ + ALPHA_COMB_MODULATE); /* A = AfAt */ + break; +#if 0 + /* This isn't right - BP */ + case 0x00ffffff: + if ( unit == 0 ) { + combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ + ALPHA_COMB_MODULATE); /* A = AfAt */ + } else { + combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ + ALPHA_COMB_COPY_INPUT); /* A = Af */ + } + break; +#endif + default: + combine |= (COLOR_COMB_MODULATE | /* C = fallback */ + ALPHA_COMB_MODULATE); /* A = fallback */ + FALLBACK( rmesa, R128_FALLBACK_TEXTURE, GL_TRUE ); + break; + } + break; + case GL_RGB: + case GL_LUMINANCE: + switch ( rmesa->env_color & 0x00ffffff ) { + case 0x00000000: + combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ + ALPHA_COMB_COPY_INPUT); /* A = Af */ + break; +#if 0 + /* This isn't right - BP */ + case 0x00ffffff: + if ( unit == 0 ) { + combine |= (COLOR_COMB_MODULATE_NTEX | /* C = Cf(1-Ct) */ + ALPHA_COMB_COPY_INPUT); /* A = Af */ + } else { + combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ + ALPHA_COMB_COPY_INPUT); /* A = Af */ + } + break; +#endif + default: + combine |= (COLOR_COMB_MODULATE | /* C = fallback */ + ALPHA_COMB_COPY_INPUT); /* A = fallback */ + FALLBACK( rmesa, R128_FALLBACK_TEXTURE, GL_TRUE ); + break; + } + break; + case GL_ALPHA: + 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 ( rmesa->env_color & 0x00ffffff ) { + case 0x00000000: + combine |= COLOR_COMB_MODULATE_NTEX; /* C = Cf(1-It) */ + break; +#if 0 + /* This isn't right - BP */ + case 0x00ffffff: + if ( unit == 0 ) { + combine |= COLOR_COMB_MODULATE_NTEX; /* C = Cf(1-It) */ + } else { + combine |= COLOR_COMB_ADD; /* C = Cf+It */ + } + break; +#endif + default: + combine |= (COLOR_COMB_MODULATE | /* C = fallback */ + ALPHA_COMB_MODULATE); /* A = fallback */ + FALLBACK( rmesa, R128_FALLBACK_TEXTURE, GL_TRUE ); + break; + } + switch ( rmesa->env_color & 0xff000000 ) { + case 0x00000000: + combine |= ALPHA_COMB_MODULATE_NTEX; /* A = Af(1-It) */ + break; +#if 0 + /* This isn't right - BP */ + case 0xff000000: + if ( unit == 0 ) { + combine |= ALPHA_COMB_MODULATE_NTEX; /* A = Af(1-It) */ + } else { + combine |= ALPHA_COMB_ADD; /* A = Af+It */ + } + break; +#endif + default: + combine |= (COLOR_COMB_MODULATE | /* C = fallback */ + ALPHA_COMB_MODULATE); /* A = fallback */ + FALLBACK( rmesa, R128_FALLBACK_TEXTURE, GL_TRUE ); + break; + } + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_ADD: + switch ( format ) { + case GL_RGBA: + case GL_LUMINANCE_ALPHA: + combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ + ALPHA_COMB_MODULATE); /* A = AfAt */ + break; + case GL_RGB: + case GL_LUMINANCE: + combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ + 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: + combine |= (COLOR_COMB_ADD | /* C = Cf+Ct */ + ALPHA_COMB_ADD); /* A = Af+At */ + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + default: + return; + } + + rmesa->tex_combine[unit] = combine; +} + +static void r128UpdateTextureUnit( GLcontext *ctx, int unit ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + const int source = rmesa->tmu_source[unit]; + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[source]; + const struct gl_texture_object *tObj = ctx->Texture.Unit[source]._Current; + r128TexObjPtr t = tObj->DriverData; + + assert(unit == 0 || unit == 1); /* only two tex units */ + + if (texUnit->_ReallyEnabled & (TEXTURE0_1D | TEXTURE0_2D)) { + + assert(t); /* should have driver tex data by now */ + + /* Fallback if there's a texture border */ + if ( tObj->Image[tObj->BaseLevel]->Border > 0 ) { + FALLBACK( rmesa, R128_FALLBACK_TEXTURE, GL_TRUE ); + return; + } + + /* Upload teximages */ + if (t->dirty_images) { + r128SetTexImages( rmesa, tObj ); + } + + /* Bind to the given texture unit */ + rmesa->CurrentTexObj[unit] = t; + t->bound |= (1 << unit); + + if ( t->memBlock ) + r128UpdateTexLRU( rmesa, t ); + + /* register setup */ + if ( unit == 0 ) { + 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 { + 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; + t->setup.tex_cntl |= R128_SEC_SELECT_SEC_ST; + } + } + else if (texUnit->_ReallyEnabled) { + /* 3D or cube map texture enabled - fallback */ + FALLBACK( rmesa, R128_FALLBACK_TEXTURE, GL_TRUE ); + } + else { + /* texture unit disabled */ + } +} + + +void r128UpdateTextureState( GLcontext *ctx ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + + if ( R128_DEBUG & DEBUG_VERBOSE_API ) { + fprintf( stderr, "%s( %p ) enabled=0x%x\n", + __FUNCTION__, ctx, ctx->Texture._ReallyEnabled ); + } + + /* Clear any texturing fallbacks */ + FALLBACK( rmesa, R128_FALLBACK_TEXTURE, GL_FALSE ); + + /* 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; + + /* 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; + + /* + * Now examine texture enable state to do rest of setup. + */ + rmesa->tmu_source[0] = 0; + rmesa->tmu_source[1] = 1; + rmesa->blend_flags &= ~R128_BLEND_MULTITEX; + + if (ctx->Texture._ReallyEnabled & TEXTURE1_ANY) { + if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) { + /* both texture 0 and 1 enabled */ + if ( R128_IS_PLAIN( rmesa ) ) + rmesa->blend_flags |= R128_BLEND_MULTITEX; + r128UpdateTextureUnit( ctx, 0 ); + r128UpdateTextureEnv( ctx, 0 ); + r128UpdateTextureUnit( ctx, 1 ); + r128UpdateTextureEnv( ctx, 1 ); + rmesa->dirty |= (R128_UPLOAD_TEX0IMAGES | R128_UPLOAD_TEX0 | + R128_UPLOAD_TEX1IMAGES | R128_UPLOAD_TEX1); + } + else { + /* only texture 1 enabled */ + rmesa->tmu_source[0] = 1; + rmesa->tmu_source[1] = 0; + r128UpdateTextureUnit( ctx, 0 ); + r128UpdateTextureEnv( ctx, 0 ); + rmesa->dirty |= (R128_UPLOAD_TEX0IMAGES | R128_UPLOAD_TEX0); + } + } + else if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) { + /* only texture 0 enabled */ + r128UpdateTextureUnit( ctx, 0 ); + r128UpdateTextureEnv( ctx, 0 ); + rmesa->dirty |= (R128_UPLOAD_TEX0IMAGES | R128_UPLOAD_TEX0); + } + + rmesa->dirty |= R128_UPLOAD_CONTEXT; +} Index: xc/lib/GL/mesa/src/drv/r128/r128_tris.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_tris.c:1.6 xc/lib/GL/mesa/src/drv/r128/r128_tris.c:1.8 --- xc/lib/GL/mesa/src/drv/r128/r128_tris.c:1.6 Tue Apr 10 13:53:07 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_tris.c Wed Oct 30 07:51:43 2002 @@ -1,8 +1,9 @@ -/* $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 -*- */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tris.c,v 1.8 2002/10/30 12:51:43 alanh Exp $ */ /* -*- c-basic-offset: 3 -*- */ /************************************************************************** -Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., - Cedar Park, Texas. +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 @@ -19,7 +20,7 @@ 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, +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. @@ -28,194 +29,693 @@ /* * Authors: - * Gareth Hughes - * Kevin E. Martin - * Michel Dänzer + * Keith Whitwell * */ -#include "r128_context.h" -#include "r128_ioctl.h" -#include "r128_vb.h" +#include +#include + +#include "glheader.h" +#include "mtypes.h" +#include "colormac.h" +#include "macros.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + #include "r128_tris.h" #include "r128_state.h" - -#include "pipeline.h" -#include "vbindirect.h" +#include "r128_tex.h" +#include "r128_vb.h" +#include "r128_ioctl.h" -static struct { - points_func points; - line_func line; - triangle_func triangle; - quad_func quad; -} rast_tab[R128_MAX_TRIFUNC]; +static const GLuint hw_prim[GL_POLYGON+1] = { + R128_CCE_VC_CNTL_PRIM_TYPE_POINT, + R128_CCE_VC_CNTL_PRIM_TYPE_LINE, + R128_CCE_VC_CNTL_PRIM_TYPE_LINE, + R128_CCE_VC_CNTL_PRIM_TYPE_LINE, + R128_CCE_VC_CNTL_PRIM_TYPE_TRI_LIST, + R128_CCE_VC_CNTL_PRIM_TYPE_TRI_LIST, + R128_CCE_VC_CNTL_PRIM_TYPE_TRI_LIST, + R128_CCE_VC_CNTL_PRIM_TYPE_TRI_LIST, + R128_CCE_VC_CNTL_PRIM_TYPE_TRI_LIST, + R128_CCE_VC_CNTL_PRIM_TYPE_TRI_LIST, +}; + +static void r128RasterPrimitive( GLcontext *ctx, GLuint hwprim ); +static void r128RenderPrimitive( GLcontext *ctx, GLenum prim ); + + +/*********************************************************************** + * Emit primitives as inline vertices * + ***********************************************************************/ -#if X_BYTE_ORDER == X_LITTLE_ENDIAN -#define R128_COLOR( to, from ) \ +#if defined(USE_X86_ASM) +#define COPY_DWORDS( j, vb, vertsize, v ) \ do { \ - (to)[0] = (from)[2]; \ - (to)[1] = (from)[1]; \ - (to)[2] = (from)[0]; \ - (to)[3] = (from)[3]; \ + int __tmp; \ + __asm__ __volatile__( "rep ; movsl" \ + : "=%c" (j), "=D" (vb), "=S" (__tmp) \ + : "0" (vertsize), \ + "D" ((long)vb), \ + "S" ((long)v) ); \ } while (0) #else -#define R128_COLOR( to, from ) \ +#define COPY_DWORDS( j, vb, vertsize, v ) \ do { \ - (to)[0] = (from)[3]; \ - (to)[1] = (from)[0]; \ - (to)[2] = (from)[1]; \ - (to)[3] = (from)[2]; \ + for ( j = 0 ; j < vertsize ; j++ ) \ + vb[j] = CPU_TO_LE32(((GLuint *)v)[j]); \ + vb += vertsize; \ } while (0) #endif - -static void r128_null_quad( GLcontext *ctx, GLuint v0, - GLuint v1, GLuint v2, GLuint v3, GLuint pv ) -{ -} -static void r128_null_triangle( GLcontext *ctx, GLuint v0, - GLuint v1, GLuint v2, GLuint pv ) +static __inline void r128_draw_quad( r128ContextPtr rmesa, + r128VertexPtr v0, + r128VertexPtr v1, + r128VertexPtr v2, + r128VertexPtr v3 ) { + GLuint vertsize = rmesa->vertex_size; + GLuint *vb = (GLuint *)r128AllocDmaLow( rmesa, 6 * vertsize * 4 ); + GLuint j; + + rmesa->num_verts += 6; + COPY_DWORDS( j, vb, vertsize, v0 ); + COPY_DWORDS( j, vb, vertsize, v1 ); + COPY_DWORDS( j, vb, vertsize, v3 ); + COPY_DWORDS( j, vb, vertsize, v1 ); + COPY_DWORDS( j, vb, vertsize, v2 ); + COPY_DWORDS( j, vb, vertsize, v3 ); } -static void r128_null_line( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv ) + + +static __inline void r128_draw_triangle( r128ContextPtr rmesa, + r128VertexPtr v0, + r128VertexPtr v1, + r128VertexPtr v2 ) { + GLuint vertsize = rmesa->vertex_size; + GLuint *vb = (GLuint *)r128AllocDmaLow( rmesa, 3 * vertsize * 4 ); + GLuint j; + + rmesa->num_verts += 3; + COPY_DWORDS( j, vb, vertsize, v0 ); + COPY_DWORDS( j, vb, vertsize, v1 ); + COPY_DWORDS( j, vb, vertsize, v2 ); } -static void r128_null_points( GLcontext *ctx, GLuint first, GLuint last ) + +static __inline void r128_draw_line( r128ContextPtr rmesa, + r128VertexPtr v0, + r128VertexPtr v1 ) { + GLuint vertsize = rmesa->vertex_size; + GLuint *vb = (GLuint *)r128AllocDmaLow( rmesa, 2 * vertsize * 4 ); + GLuint j; + + rmesa->num_verts += 2; + COPY_DWORDS( j, vb, vertsize, v0 ); + COPY_DWORDS( j, vb, vertsize, v1 ); } -static void r128PrintRenderState( const char *msg, GLuint state ) +static __inline void r128_draw_point( r128ContextPtr rmesa, + r128VertexPtr v0 ) { - fprintf( stderr, "%s: (0x%x) %s%s%s%s%s\n", - msg, state, - (state & R128_FLAT_BIT) ? "flat, " : "", - (state & R128_OFFSET_BIT) ? "offset, " : "", - (state & R128_TWOSIDE_BIT) ? "twoside, " : "", - (state & R128_NODRAW_BIT) ? "no-draw, " : "", - (state & R128_FALLBACK_BIT) ? "fallback" : "" ); + int vertsize = rmesa->vertex_size; + GLuint *vb = (GLuint *)r128AllocDmaLow( rmesa, vertsize * 4 ); + int j; + + rmesa->num_verts += 1; + COPY_DWORDS( j, vb, vertsize, v0 ); } -#define IND (0) +/*********************************************************************** + * Macros for t_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI( a, b, c ) \ +do { \ + if (DO_FALLBACK) \ + rmesa->draw_tri( rmesa, a, b, c ); \ + else \ + r128_draw_triangle( rmesa, a, b, c ); \ +} while (0) + +#define QUAD( a, b, c, d ) \ +do { \ + if (DO_FALLBACK) { \ + rmesa->draw_tri( rmesa, a, b, d ); \ + rmesa->draw_tri( rmesa, b, c, d ); \ + } else \ + r128_draw_quad( rmesa, a, b, c, d ); \ +} while (0) + +#define LINE( v0, v1 ) \ +do { \ + if (DO_FALLBACK) \ + rmesa->draw_line( rmesa, v0, v1 ); \ + else \ + r128_draw_line( rmesa, v0, v1 ); \ +} while (0) + +#define POINT( v0 ) \ +do { \ + if (DO_FALLBACK) \ + rmesa->draw_point( rmesa, v0 ); \ + else \ + r128_draw_point( rmesa, v0 ); \ +} while (0) + + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define R128_OFFSET_BIT 0x01 +#define R128_TWOSIDE_BIT 0x02 +#define R128_UNFILLED_BIT 0x04 +#define R128_FALLBACK_BIT 0x08 +#define R128_MAX_TRIFUNC 0x10 + + +static struct { + points_func points; + line_func line; + triangle_func triangle; + quad_func quad; +} rast_tab[R128_MAX_TRIFUNC]; + + +#define DO_FALLBACK (IND & R128_FALLBACK_BIT) +#define DO_OFFSET (IND & R128_OFFSET_BIT) +#define DO_UNFILLED (IND & R128_UNFILLED_BIT) +#define DO_TWOSIDE (IND & R128_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 1 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define VERTEX r128Vertex +#define TAB rast_tab + +#define DEPTH_SCALE 1.0 +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW( a ) (a > 0) +#define GET_VERTEX(e) (rmesa->verts + (e<vertex_stride_shift)) + +#define VERT_SET_RGBA( v, c ) do { \ + r128_color_t *vc = (r128_color_t *)&(v)->ui[coloroffset]; \ + vc->blue = (c)[2]; \ + vc->green = (c)[1]; \ + vc->red = (c)[0]; \ + vc->alpha = (c)[3]; \ + } while (0) +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[coloroffset] +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx] + +#define VERT_SET_SPEC( v0, c ) if (havespec) { \ + (v0)->v.specular.red = (c)[0];\ + (v0)->v.specular.green = (c)[1];\ + (v0)->v.specular.blue = (c)[2]; } +#define VERT_COPY_SPEC( v0, v1 ) if (havespec) { \ + (v0)->v.specular.red = v1->v.specular.red; \ + (v0)->v.specular.green = v1->v.specular.green; \ + (v0)->v.specular.blue = v1->v.specular.blue; } + +#define VERT_SAVE_SPEC( idx ) if (havespec) spec[idx] = v[idx]->ui[5] +#define VERT_RESTORE_SPEC( idx ) if (havespec) v[idx]->ui[5] = spec[idx] + +#define LOCAL_VARS(n) \ + r128ContextPtr rmesa = R128_CONTEXT(ctx); \ + GLuint color[n], spec[n]; \ + GLuint coloroffset = (rmesa->vertex_size == 4 ? 3 : 4); \ + GLboolean havespec = (rmesa->vertex_size == 4 ? 0 : 1); \ + (void) color; (void) spec; (void) coloroffset; (void) havespec; + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +#define RASTERIZE(x) if (rmesa->hw_primitive != hw_prim[x]) \ + r128RasterPrimitive( ctx, hw_prim[x] ) +#define RENDER_PRIMITIVE rmesa->render_primitive +#define IND R128_FALLBACK_BIT #define TAG(x) x -#include "r128_tritmp.h" +#include "tnl_dd/t_dd_unfilled.h" +#undef IND -#define IND (R128_FLAT_BIT) -#define TAG(x) x##_flat -#include "r128_tritmp.h" +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ + + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + #define IND (R128_OFFSET_BIT) #define TAG(x) x##_offset -#include "r128_tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (R128_OFFSET_BIT | R128_FLAT_BIT) -#define TAG(x) x##_offset_flat -#include "r128_tritmp.h" - #define IND (R128_TWOSIDE_BIT) #define TAG(x) x##_twoside -#include "r128_tritmp.h" - -#define IND (R128_TWOSIDE_BIT | R128_FLAT_BIT) -#define TAG(x) x##_twoside_flat -#include "r128_tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (R128_TWOSIDE_BIT | R128_OFFSET_BIT) +#define IND (R128_TWOSIDE_BIT|R128_OFFSET_BIT) #define TAG(x) x##_twoside_offset -#include "r128_tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (R128_TWOSIDE_BIT | R128_OFFSET_BIT | R128_FLAT_BIT) -#define TAG(x) x##_twoside_offset_flat -#include "r128_tritmp.h" +#define IND (R128_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" +#define IND (R128_OFFSET_BIT|R128_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" -void r128DDTriangleFuncsInit( void ) -{ - GLint i; +#define IND (R128_TWOSIDE_BIT|R128_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R128_TWOSIDE_BIT|R128_OFFSET_BIT|R128_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R128_FALLBACK_BIT) +#define TAG(x) x##_fallback +#include "tnl_dd/t_dd_tritmp.h" +#define IND (R128_OFFSET_BIT|R128_FALLBACK_BIT) +#define TAG(x) x##_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R128_TWOSIDE_BIT|R128_FALLBACK_BIT) +#define TAG(x) x##_twoside_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R128_TWOSIDE_BIT|R128_OFFSET_BIT|R128_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R128_UNFILLED_BIT|R128_FALLBACK_BIT) +#define TAG(x) x##_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R128_OFFSET_BIT|R128_UNFILLED_BIT|R128_FALLBACK_BIT) +#define TAG(x) x##_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R128_TWOSIDE_BIT|R128_UNFILLED_BIT|R128_FALLBACK_BIT) +#define TAG(x) x##_twoside_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R128_TWOSIDE_BIT|R128_OFFSET_BIT|R128_UNFILLED_BIT| \ + R128_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab( void ) +{ init(); - init_flat(); init_offset(); - init_offset_flat(); init_twoside(); - init_twoside_flat(); init_twoside_offset(); - init_twoside_offset_flat(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); + init_fallback(); + init_offset_fallback(); + init_twoside_fallback(); + init_twoside_offset_fallback(); + init_unfilled_fallback(); + init_offset_unfilled_fallback(); + init_twoside_unfilled_fallback(); + init_twoside_offset_unfilled_fallback(); +} - 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; - } + + +/*********************************************************************** + * Rasterization fallback helpers * + ***********************************************************************/ + + +/* This code is hit only when a mix of accelerated and unaccelerated + * primitives are being drawn, and only for the unaccelerated + * primitives. + */ +static void +r128_fallback_tri( r128ContextPtr rmesa, + r128Vertex *v0, + r128Vertex *v1, + r128Vertex *v2 ) +{ + GLcontext *ctx = rmesa->glCtx; + SWvertex v[3]; + r128_translate_vertex( ctx, v0, &v[0] ); + r128_translate_vertex( ctx, v1, &v[1] ); + r128_translate_vertex( ctx, v2, &v[2] ); + _swrast_Triangle( ctx, &v[0], &v[1], &v[2] ); +} + + +static void +r128_fallback_line( r128ContextPtr rmesa, + r128Vertex *v0, + r128Vertex *v1 ) +{ + GLcontext *ctx = rmesa->glCtx; + SWvertex v[2]; + r128_translate_vertex( ctx, v0, &v[0] ); + r128_translate_vertex( ctx, v1, &v[1] ); + _swrast_Line( ctx, &v[0], &v[1] ); +} + + +static void +r128_fallback_point( r128ContextPtr rmesa, + r128Vertex *v0 ) +{ + GLcontext *ctx = rmesa->glCtx; + SWvertex v[1]; + r128_translate_vertex( ctx, v0, &v[0] ); + _swrast_Point( ctx, &v[0] ); +} + + + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ + +#define VERT(x) (r128Vertex *)(r128verts + (x << shift)) +#define RENDER_POINTS( start, count ) \ + for ( ; start < count ; start++) \ + r128_draw_point( rmesa, VERT(start) ) +#define RENDER_LINE( v0, v1 ) \ + r128_draw_line( rmesa, VERT(v0), VERT(v1) ) +#define RENDER_TRI( v0, v1, v2 ) \ + r128_draw_triangle( rmesa, VERT(v0), VERT(v1), VERT(v2) ) +#define RENDER_QUAD( v0, v1, v2, v3 ) \ + r128_draw_quad( rmesa, VERT(v0), VERT(v1), VERT(v2), VERT(v3) ) +#define INIT(x) do { \ + if (0) fprintf(stderr, "%s\n", __FUNCTION__); \ + r128RenderPrimitive( ctx, x ); \ +} while (0) +#undef LOCAL_VARS +#define LOCAL_VARS \ + r128ContextPtr rmesa = R128_CONTEXT(ctx); \ + const GLuint shift = rmesa->vertex_stride_shift; \ + const char *r128verts = (char *)rmesa->verts; \ + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ + (void) elt; +#define RESET_STIPPLE +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) (x) +#define TAG(x) r128_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) r128_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" + + +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ + +static void r128RenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON]( ctx, 0, n, PRIM_BEGIN|PRIM_END ); + VB->Elts = tmp; } } +static void r128RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line( ctx, ii, jj ); +} -/* FIXME: Only enable software fallback for stencil in 16 bpp mode after - * we have hardware stencil support. - */ -#define ALL_FALLBACK (DD_MULTIDRAW | 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_STIPPLE | 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 r128DDChooseRenderState( GLcontext *ctx ) +static void r128FastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) { + r128ContextPtr rmesa = R128_CONTEXT( ctx ); + GLuint vertsize = rmesa->vertex_size; + GLuint *vb = r128AllocDmaLow( rmesa, (n-2) * 3 * 4 * vertsize ); + GLubyte *r128verts = (GLubyte *)rmesa->verts; + const GLuint shift = rmesa->vertex_stride_shift; + const GLuint *start = (const GLuint *)VERT(elts[0]); + int i,j; + + rmesa->num_verts += (n-2) * 3; + + for (i = 2 ; i < n ; i++) { + COPY_DWORDS( j, vb, vertsize, (r128VertexPtr) VERT(elts[i-1]) ); + COPY_DWORDS( j, vb, vertsize, (r128VertexPtr) VERT(elts[i]) ); + COPY_DWORDS( j, vb, vertsize, (r128VertexPtr) start ); + } +} + + + + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + +#define _R128_NEW_RENDER_STATE (_DD_NEW_LINE_STIPPLE | \ + _DD_NEW_LINE_SMOOTH | \ + _DD_NEW_POINT_SMOOTH | \ + _DD_NEW_TRI_SMOOTH | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET) \ + + +#define POINT_FALLBACK (DD_POINT_SMOOTH) +#define LINE_FALLBACK (DD_LINE_STIPPLE|DD_LINE_SMOOTH) +#define TRI_FALLBACK (DD_TRI_SMOOTH) +#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK) +#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED) + + +static void r128ChooseRenderState(GLcontext *ctx) +{ r128ContextPtr rmesa = R128_CONTEXT(ctx); - GLuint flags = ctx->TriangleCaps; + GLuint flags = ctx->_TriangleCaps; GLuint index = 0; - if ( rmesa->Fallback ) { - rmesa->RenderIndex = R128_FALLBACK_BIT; - return; - } + if (flags & (ANY_RASTER_FLAGS|ANY_FALLBACK_FLAGS)) { + rmesa->draw_point = r128_draw_point; + rmesa->draw_line = r128_draw_line; + rmesa->draw_tri = r128_draw_triangle; + + if (flags & ANY_RASTER_FLAGS) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= R128_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= R128_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= R128_UNFILLED_BIT; + } - if ( flags & ANY_RASTER_FLAGS ) { - if ( flags & DD_FLATSHADE ) index |= R128_FLAT_BIT; - if ( flags & DD_TRI_LIGHT_TWOSIDE ) index |= R128_TWOSIDE_BIT; - if ( flags & DD_TRI_OFFSET ) index |= R128_OFFSET_BIT; - if ( flags & DD_Z_NEVER ) index |= R128_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 |= R128_FALLBACK_BIT; - rmesa->PointsFunc = 0; - rmesa->IndirectTriangles |= DD_POINT_SW_RASTERIZE; + /* Hook in fallbacks for specific primitives. + */ + if (flags & (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK)) { + if (flags & POINT_FALLBACK) rmesa->draw_point = r128_fallback_point; + if (flags & LINE_FALLBACK) rmesa->draw_line = r128_fallback_line; + if (flags & TRI_FALLBACK) rmesa->draw_tri = r128_fallback_tri; + index |= R128_FALLBACK_BIT; } + } - if ( flags & LINE_FALLBACK ) { - rmesa->RenderIndex |= R128_FALLBACK_BIT; - rmesa->LineFunc = 0; - rmesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; + if (index != rmesa->RenderIndex) { + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = r128_render_tab_verts; + tnl->Driver.Render.PrimTabElts = r128_render_tab_elts; + tnl->Driver.Render.ClippedLine = rast_tab[index].line; + tnl->Driver.Render.ClippedPolygon = r128FastRenderClippedPoly; + } else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = r128RenderClippedLine; + tnl->Driver.Render.ClippedPolygon = r128RenderClippedPoly; } + + rmesa->RenderIndex = index; + } +} + +/**********************************************************************/ +/* Validate state at pipeline start */ +/**********************************************************************/ + +static void r128RunPipeline( GLcontext *ctx ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + + if (rmesa->new_state) + r128DDUpdateHWState( ctx ); + + if (!rmesa->Fallback && rmesa->NewGLState) { + if (rmesa->NewGLState & _R128_NEW_VERTEX_STATE) + r128ChooseVertexState( ctx ); + + if (rmesa->NewGLState & _R128_NEW_RENDER_STATE) + r128ChooseRenderState( ctx ); + + rmesa->NewGLState = 0; + } + + _tnl_run_pipeline( ctx ); +} + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + +/* 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 r128 uses triangles to render lines and points, it is + * necessary to turn off hardware culling when rendering these + * primitives. + */ + +static void r128RasterPrimitive( GLcontext *ctx, GLuint hwprim ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + + rmesa->setup.dp_gui_master_cntl_c &= ~R128_GMC_BRUSH_NONE; + + if ( ctx->Polygon.StippleFlag && hwprim == GL_TRIANGLES ) { + rmesa->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_32x32_MONO_FG_LA; + } + else { + rmesa->setup.dp_gui_master_cntl_c |= R128_GMC_BRUSH_SOLID_COLOR; + } + + rmesa->new_state |= R128_NEW_CONTEXT; + rmesa->dirty |= R128_UPLOAD_CONTEXT; + + if (rmesa->hw_primitive != hwprim) { + FLUSH_BATCH( rmesa ); + rmesa->hw_primitive = hwprim; + } +} + +static void r128RenderPrimitive( GLcontext *ctx, GLenum prim ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint hw = hw_prim[prim]; + rmesa->render_primitive = prim; + if (prim >= GL_TRIANGLES && (ctx->_TriangleCaps & DD_TRI_UNFILLED)) + return; + r128RasterPrimitive( ctx, hw ); +} + + +static void r128RenderStart( GLcontext *ctx ) +{ + /* Check for projective texturing. Make sure all texcoord + * pointers point to something. (fix in mesa?) + */ + r128CheckTexSizes( ctx ); +} + +static void r128RenderFinish( GLcontext *ctx ) +{ + if (R128_CONTEXT(ctx)->RenderIndex & R128_FALLBACK_BIT) + _swrast_flush( ctx ); +} + + +/**********************************************************************/ +/* Transition to/from hardware rasterization. */ +/**********************************************************************/ + +void r128Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint oldfallback = rmesa->Fallback; - if ( flags & TRI_FALLBACK ) { - rmesa->RenderIndex |= R128_FALLBACK_BIT; - rmesa->TriangleFunc = 0; - rmesa->QuadFunc = 0; - rmesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | - DD_QUAD_SW_RASTERIZE); + if (mode) { + rmesa->Fallback |= bit; + if (oldfallback == 0) { + FLUSH_BATCH( rmesa ); + _swsetup_Wakeup( ctx ); + rmesa->RenderIndex = ~0; } } + else { + rmesa->Fallback &= ~bit; + if (oldfallback == bit) { + _swrast_flush( ctx ); + tnl->Driver.Render.Start = r128RenderStart; + tnl->Driver.Render.PrimitiveNotify = r128RenderPrimitive; + tnl->Driver.Render.Finish = r128RenderFinish; + tnl->Driver.Render.BuildVertices = r128BuildVertices; + rmesa->NewGLState |= (_R128_NEW_RENDER_STATE| + _R128_NEW_VERTEX_STATE); + } + } +} + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ - if ( 0 ) { - gl_print_tri_caps( "tricaps", ctx->TriangleCaps ); - r128PrintRenderState( "r128 render state", rmesa->RenderIndex ); +void r128InitTriFuncs( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + firsttime = 0; } + + tnl->Driver.RunPipeline = r128RunPipeline; + tnl->Driver.Render.Start = r128RenderStart; + tnl->Driver.Render.Finish = r128RenderFinish; + tnl->Driver.Render.PrimitiveNotify = r128RenderPrimitive; + tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; + tnl->Driver.Render.BuildVertices = r128BuildVertices; + +/* r128Fallback( ctx, 0x100000, 1 ); */ } Index: xc/lib/GL/mesa/src/drv/r128/r128_tris.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_tris.h:1.6 xc/lib/GL/mesa/src/drv/r128/r128_tris.h:1.8 --- xc/lib/GL/mesa/src/drv/r128/r128_tris.h:1.6 Tue Apr 10 12:07:53 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_tris.h Wed Oct 30 07:51:43 2002 @@ -1,8 +1,9 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tris.h,v 1.6 2001/04/10 16:07:53 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tris.h,v 1.8 2002/10/30 12:51:43 alanh Exp $ */ /************************************************************************** -Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., - Cedar Park, Texas. +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 @@ -19,7 +20,7 @@ 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, +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. @@ -28,315 +29,20 @@ /* * Authors: - * Gareth Hughes - * Kevin E. Martin + * Keith Whitwell * */ #ifndef __R128_TRIS_H__ #define __R128_TRIS_H__ + +#include "mtypes.h" -#ifdef GLX_DIRECT_RENDERING +extern void r128InitTriFuncs( GLcontext *ctx ); -#include "r128_vb.h" -extern void r128DDChooseRenderState( GLcontext *ctx ); -extern void r128DDTriangleFuncsInit( void ); +extern void r128Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( rmesa, bit, mode ) r128Fallback( rmesa->glCtx, bit, mode ) -#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 - - -static __inline void r128_draw_triangle( r128ContextPtr rmesa, - r128VertexPtr v0, - r128VertexPtr v1, - r128VertexPtr v2 ) -{ - GLuint vertsize = rmesa->vertsize; - CARD32 *vb = r128AllocVerticesInline( rmesa, 3 ); - 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)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++ ) - LE32_OUT( vb[j], v0->ui[j] ); - - vb += vertsize; - for ( j = 0 ; j < vertsize ; j++ ) - LE32_OUT( vb[j], v1->ui[j] ); - - vb += vertsize; - for ( j = 0 ; j < vertsize ; j++ ) - LE32_OUT( vb[j], v2->ui[j] ); -#endif -} - -static __inline void r128_draw_quad( r128ContextPtr rmesa, - r128VertexPtr v0, - r128VertexPtr v1, - r128VertexPtr v2, - r128VertexPtr v3 ) -{ - GLuint vertsize = rmesa->vertsize; - CARD32 *vb = r128AllocVerticesInline( rmesa, 6 ); - 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)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++ ) - LE32_OUT( vb[j], v0->ui[j] ); - - vb += vertsize; - for ( j = 0 ; j < vertsize ; j++ ) - LE32_OUT( vb[j], v1->ui[j] ); - - vb += vertsize; - for ( j = 0 ; j < vertsize ; j++ ) - LE32_OUT( vb[j], v3->ui[j] ); - - vb += vertsize; - for ( j = 0 ; j < vertsize ; j++ ) - LE32_OUT( vb[j], v1->ui[j] ); - - vb += vertsize; - for ( j = 0 ; j < vertsize ; j++ ) - LE32_OUT( vb[j], v2->ui[j] ); - - vb += vertsize; - for ( j = 0 ; j < vertsize ; j++ ) - LE32_OUT( vb[j], v3->ui[j] ); -#endif -} - -static __inline void r128_draw_line( r128ContextPtr rmesa, - r128VertexPtr tmp0, - r128VertexPtr tmp1, - GLfloat width ) -{ -#if 1 - 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; - 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; - } - - LE32_OUT_FLOAT( vb[0], x0 - ix ); - LE32_OUT_FLOAT( vb[1], y0 - iy ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp0->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x1 + ix ); - LE32_OUT_FLOAT( vb[1], y1 + iy ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp1->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x0 + ix ); - LE32_OUT_FLOAT( vb[1], y0 + iy ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp0->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x0 - ix ); - LE32_OUT_FLOAT( vb[1], y0 - iy ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp0->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x1 - ix ); - LE32_OUT_FLOAT( vb[1], y1 - iy ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp1->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x1 + ix ); - LE32_OUT_FLOAT( vb[1], y1 + iy ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp1->ui[j] ); - -#else - - int vertsize = rmesa->vertsize; - CARD32 *vb = r128AllocVerticesInline( rmesa, 2 ); - 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)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 r128_draw_point( r128ContextPtr rmesa, - r128VertexPtr tmp, GLfloat sz ) -{ -#if 1 - 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; - - LE32_OUT_FLOAT( vb[0], x - sz ); - LE32_OUT_FLOAT( vb[1], y - sz ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x + sz ); - LE32_OUT_FLOAT( vb[1], y - sz ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x + sz ); - LE32_OUT_FLOAT( vb[1], y + sz ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x + sz ); - LE32_OUT_FLOAT( vb[1], y + sz ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x - sz ); - LE32_OUT_FLOAT( vb[1], y + sz ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp->ui[j] ); - vb += vertsize; - - LE32_OUT_FLOAT( vb[0], x - sz ); - LE32_OUT_FLOAT( vb[1], y - sz ); - for (j = 2 ; j < vertsize ; j++) - LE32_OUT( vb[j], tmp->ui[j] ); - -#else - - int vertsize = rmesa->vertsize; - CARD32 *vb = r128AllocVerticesInline( rmesa, 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 /* __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.5 xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h:removed --- xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h:1.5 Sun Jan 7 20:07:24 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_tritmp.h Thu Feb 27 12:26:30 2003 @@ -1,333 +0,0 @@ -/* $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., - 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. - -**************************************************************************/ - -/* - * Authors: - * Gareth Hughes - * Kevin E. Martin - * - */ - -static __inline void TAG(triangle)( GLcontext *ctx, - GLuint e0, GLuint e1, GLuint e2, - GLuint pv ) -{ - r128ContextPtr rmesa = R128_CONTEXT(ctx); - struct vertex_buffer *VB = ctx->VB; - 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] = &verts[e0]; - v[1] = &verts[e1]; - v[2] = &verts[e2]; - -#if (IND & R128_TWOSIDE_BIT) - c[0] = v[0]->ui[4]; - c[1] = v[1]->ui[4]; - c[2] = v[2]->ui[4]; -#endif - -#if (IND & (R128_TWOSIDE_BIT | R128_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 & R128_TWOSIDE_BIT) - { - 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] ); - 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] ); - } - } -#endif - -#if (IND & R128_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 - - r128_draw_triangle( rmesa, v[0], v[1], v[2] ); - -#if (IND & R128_OFFSET_BIT) - v[0]->v.z = z[0]; - v[1]->v.z = z[1]; - v[2]->v.z = z[2]; -#endif - -#if (IND & R128_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 - r128ContextPtr rmesa = R128_CONTEXT(ctx); - struct vertex_buffer *VB = ctx->VB; - 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] = &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]; - c[1] = v[1]->ui[4]; - c[2] = v[2]->ui[4]; - c[3] = v[3]->ui[4]; -#endif - -#if (IND & (R128_TWOSIDE_BIT | R128_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 & R128_TWOSIDE_BIT) - { - 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] ); - 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] ); - } - } -#endif - -#if (IND & R128_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 - - r128_draw_quad( rmesa, v[0], v[1], v[2], v[3] ); - -#if (IND & R128_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 & R128_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 ) -{ - r128ContextPtr rmesa = R128_CONTEXT(ctx); - struct vertex_buffer *VB = ctx->VB; - r128VertexPtr verts = R128_DRIVER_DATA(VB)->verts; - GLfloat width = ctx->Line.Width; - r128VertexPtr v[2]; - -#if (IND & R128_OFFSET_BIT) - GLfloat offset; - GLfloat z[2]; -#endif -#if (IND & R128_TWOSIDE_BIT) - int c[2]; -#endif - - v[0] = &verts[e0]; - v[1] = &verts[e1]; - -#if (IND & R128_TWOSIDE_BIT) - c[0] = v[0]->ui[4]; - c[1] = v[1]->ui[4]; -#endif - -#if (IND & R128_TWOSIDE_BIT) - { - GLubyte (*vbcolor)[4] = ctx->VB->ColorPtr->data; - if ( IND & R128_FLAT_BIT ) { - R128_COLOR( (char *)&v[0]->ui[4], vbcolor[pv] ); - 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] ); - } - } -#endif - -#if (IND & R128_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 - - r128_draw_line( rmesa, v[0], v[1], width ); - -#if (IND & R128_OFFSET_BIT) - v[0]->v.z = z[0]; - v[1]->v.z = z[1]; -#endif - -#if (IND & R128_TWOSIDE_BIT) - v[0]->ui[4] = c[0]; - v[1]->ui[4] = c[1]; -#endif -} - - -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 ) { - GLubyte (*vbcolor)[4] = VB->ColorPtr->data; - R128_COLOR( (char *)&tmp0.v.color, vbcolor[i] ); - } - if ( IND & R128_OFFSET_BIT ) { - GLfloat offset = ctx->PointZoffset * rmesa->depth_scale; - tmp0.v.z += offset; - } - r128_draw_point( rmesa, &tmp0, size ); - } else { - r128_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/r128/r128_vb.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_vb.c:1.11 xc/lib/GL/mesa/src/drv/r128/r128_vb.c:1.15 --- xc/lib/GL/mesa/src/drv/r128/r128_vb.c:1.11 Sun Jan 7 20:07:24 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_vb.c Wed Oct 30 07:51:43 2002 @@ -1,8 +1,9 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.c,v 1.11 2001/01/08 01:07:24 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.c,v 1.15 2002/10/30 12:51:43 alanh Exp $ */ /************************************************************************** -Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., - Cedar Park, Texas. +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 @@ -19,7 +20,7 @@ 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, +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. @@ -28,487 +29,495 @@ /* * Authors: - * Gareth Hughes - * Kevin E. Martin + * Keith Whitwell * */ +#include "glheader.h" +#include "mtypes.h" +#include "mem.h" +#include "macros.h" +#include "colormac.h" +#include "mmath.h" + +#include "swrast_setup/swrast_setup.h" +#include "tnl/t_context.h" + #include "r128_context.h" +#include "r128_vb.h" #include "r128_ioctl.h" +#include "r128_tris.h" #include "r128_state.h" -#include "r128_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.blue = spec[2]; \ - v->v.specular.green = spec[1]; \ - v->v.specular.red = spec[0]; \ -} 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->v.color.blue = col[2]; \ - v->v.color.green = col[1]; \ - v->v.color.red = col[0]; \ - v->v.color.alpha = col[3]; \ -} while (0) - -#define TEX0_4 \ -do { \ - 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++ ) { \ - 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 = &(R128_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] + xoffset; \ - v->v.y = - win[1] + yoffset; \ - v->v.z = depth_scale * 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] + 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 - - -#define SETUPFUNC(name,win,col,tex0,tex1,tex0_4,tex1_4,spec,fog) \ -static void name( struct vertex_buffer *VB, GLuint start, GLuint end ) \ -{ \ - 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) xoffset; (void) yoffset; (void) depth_scale; \ - \ - 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 = &(R128_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; \ -} +#define R128_TEX1_BIT 0x1 +#define R128_TEX0_BIT 0x2 +#define R128_RGBA_BIT 0x4 +#define R128_SPEC_BIT 0x8 +#define R128_FOG_BIT 0x10 +#define R128_XYZW_BIT 0x20 +#define R128_PTEX_BIT 0x40 +#define R128_MAX_SETUP 0x80 + +static struct { + void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint ); + interp_func interp; + copy_pv_func copy_pv; + GLboolean (*check_tex_sizes)( GLcontext *ctx ); + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; +} setup_tab[R128_MAX_SETUP]; + +#define TINY_VERTEX_FORMAT (R128_CCE_VC_FRMT_DIFFUSE_ARGB) + +#define NOTEX_VERTEX_FORMAT (R128_CCE_VC_FRMT_RHW | \ + R128_CCE_VC_FRMT_DIFFUSE_ARGB |\ + R128_CCE_VC_FRMT_SPEC_FRGB) + +#define 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 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 PROJ_TEX1_VERTEX_FORMAT 0 +#define TEX2_VERTEX_FORMAT 0 +#define TEX3_VERTEX_FORMAT 0 +#define PROJ_TEX3_VERTEX_FORMAT 0 + +#define DO_XYZW (IND & R128_XYZW_BIT) +#define DO_RGBA (IND & R128_RGBA_BIT) +#define DO_SPEC (IND & R128_SPEC_BIT) +#define DO_FOG (IND & R128_FOG_BIT) +#define DO_TEX0 (IND & R128_TEX0_BIT) +#define DO_TEX1 (IND & R128_TEX1_BIT) +#define DO_TEX2 0 +#define DO_TEX3 0 +#define DO_PTEX (IND & R128_PTEX_BIT) + +#define VERTEX r128Vertex +#define VERTEX_COLOR r128_color_t +#define LOCALVARS r128ContextPtr rmesa = R128_CONTEXT(ctx); +#define GET_VIEWPORT_MAT() rmesa->hw_viewport +#define GET_TEXSOURCE(n) rmesa->tmu_source[n] +#define GET_VERTEX_FORMAT() rmesa->vertex_format +#define GET_VERTEX_STORE() rmesa->verts +#define GET_VERTEX_STRIDE_SHIFT() rmesa->vertex_stride_shift +#define INVALIDATE_STORED_VERTICES() +#define GET_UBYTE_COLOR_STORE() &rmesa->UbyteColor +#define GET_UBYTE_SPEC_COLOR_STORE() &rmesa->UbyteSecondaryColor + +#define HAVE_HW_VIEWPORT 0 +#define HAVE_HW_DIVIDE 0 +#define HAVE_RGBA_COLOR 0 +#define HAVE_TINY_VERTICES 1 +#define HAVE_NOTEX_VERTICES 1 +#define HAVE_TEX0_VERTICES 1 +#define HAVE_TEX1_VERTICES 1 +#define HAVE_TEX2_VERTICES 0 +#define HAVE_TEX3_VERTICES 0 +#define HAVE_PTEX_VERTICES 0 /* r128 rhw2 not supported by template */ + +#define UNVIEWPORT_VARS GLfloat h = R128_CONTEXT(ctx)->driDrawable->h +#define UNVIEWPORT_X(x) x - SUBPIXEL_X +#define UNVIEWPORT_Y(y) - y + h + SUBPIXEL_Y +#define UNVIEWPORT_Z(z) z / rmesa->depth_scale + +#define PTEX_FALLBACK() FALLBACK(R128_CONTEXT(ctx), R128_FALLBACK_TEXTURE, 1) + +#define IMPORT_FLOAT_COLORS r128_import_float_colors +#define IMPORT_FLOAT_SPEC_COLORS r128_import_float_spec_colors + +#define INTERP_VERTEX setup_tab[rmesa->SetupIndex].interp +#define COPY_PV_VERTEX setup_tab[rmesa->SetupIndex].copy_pv + +/*********************************************************************** + * Generate pv-copying and translation functions * + ***********************************************************************/ + +#define TAG(x) r128_##x +#include "tnl_dd/t_dd_vb.c" + +/*********************************************************************** + * Generate vertex emit and interp functions * + ***********************************************************************/ + + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT) +#define TAG(x) x##_wg +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_SPEC_BIT) +#define TAG(x) x##_wgs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_TEX0_BIT) +#define TAG(x) x##_wgt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_TEX0_BIT|R128_TEX1_BIT) +#define TAG(x) x##_wgt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_TEX0_BIT|R128_PTEX_BIT) +#define TAG(x) x##_wgpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_SPEC_BIT|R128_TEX0_BIT) +#define TAG(x) x##_wgst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_SPEC_BIT|R128_TEX0_BIT|\ + R128_TEX1_BIT) +#define TAG(x) x##_wgst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_SPEC_BIT|R128_TEX0_BIT|\ + R128_PTEX_BIT) +#define TAG(x) x##_wgspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_FOG_BIT) +#define TAG(x) x##_wgf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT) +#define TAG(x) x##_wgfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_TEX0_BIT) +#define TAG(x) x##_wgft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_TEX0_BIT|\ + R128_TEX1_BIT) +#define TAG(x) x##_wgft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_TEX0_BIT|\ + R128_PTEX_BIT) +#define TAG(x) x##_wgfpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|\ + R128_TEX0_BIT) +#define TAG(x) x##_wgfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|\ + R128_TEX0_BIT|R128_TEX1_BIT) +#define TAG(x) x##_wgfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_XYZW_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|\ + R128_TEX0_BIT|R128_PTEX_BIT) +#define TAG(x) x##_wgfspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_TEX0_BIT) +#define TAG(x) x##_t0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_TEX0_BIT|R128_TEX1_BIT) +#define TAG(x) x##_t0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_FOG_BIT) +#define TAG(x) x##_f +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_FOG_BIT|R128_TEX0_BIT) +#define TAG(x) x##_ft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_FOG_BIT|R128_TEX0_BIT|R128_TEX1_BIT) +#define TAG(x) x##_ft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT) +#define TAG(x) x##_g +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_SPEC_BIT) +#define TAG(x) x##_gs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_TEX0_BIT) +#define TAG(x) x##_gt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_TEX0_BIT|R128_TEX1_BIT) +#define TAG(x) x##_gt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_SPEC_BIT|R128_TEX0_BIT) +#define TAG(x) x##_gst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_SPEC_BIT|R128_TEX0_BIT|R128_TEX1_BIT) +#define TAG(x) x##_gst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_FOG_BIT) +#define TAG(x) x##_gf +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT) +#define TAG(x) x##_gfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_FOG_BIT|R128_TEX0_BIT) +#define TAG(x) x##_gft0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_FOG_BIT|R128_TEX0_BIT|R128_TEX1_BIT) +#define TAG(x) x##_gft0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|R128_TEX0_BIT) +#define TAG(x) x##_gfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|R128_TEX0_BIT|\ + R128_TEX1_BIT) +#define TAG(x) x##_gfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" -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 ) +static void init_setup_tab( void ) { - fprintf( stderr, "r128RasterSetup(): invalid setup function\n" ); + init_wg(); + init_wgs(); + init_wgt0(); + init_wgt0t1(); + init_wgpt0(); + init_wgst0(); + init_wgst0t1(); + init_wgspt0(); + init_wgf(); + init_wgfs(); + init_wgft0(); + init_wgft0t1(); + init_wgfpt0(); + init_wgfst0(); + init_wgfst0t1(); + init_wgfspt0(); + init_t0(); + init_t0t1(); + init_f(); + init_ft0(); + init_ft0t1(); + init_g(); + init_gs(); + init_gt0(); + init_gt0t1(); + init_gst0(); + init_gst0t1(); + init_gf(); + init_gfs(); + init_gft0(); + init_gft0t1(); + init_gfst0(); + init_gfst0t1(); } -typedef void (*setupFunc)( struct vertex_buffer *, GLuint, GLuint ); -static setupFunc setup_func[R128_MAX_SETUPFUNC]; -void r128DDSetupInit( void ) +void r128PrintSetupFlags(char *msg, GLuint flags ) { - GLint i; - - for ( i = 0 ; i < R128_MAX_SETUPFUNC ; i++ ) { - setup_func[i] = rs_invalid; - } - - /* 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; - setup_func[R128_WIN_BIT|R128_FOG_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_wft0t1; - setup_func[R128_WIN_BIT|R128_RGBA_BIT] = rs_wg; - setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_SPEC_BIT] = rs_wgs; - setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_TEX0_BIT] = rs_wgt0; - setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_wgt0t1; - setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_SPEC_BIT|R128_TEX0_BIT] = rs_wgst0; - setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_SPEC_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_wgst0t1; - setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_FOG_BIT] = rs_wgf; - setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT] = rs_wgfs; - setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_TEX0_BIT] = rs_wgft0; - setup_func[R128_WIN_BIT|R128_RGBA_BIT|R128_FOG_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_wgft0t1; - 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 - */ - setup_func[R128_TEX0_BIT] = rs_t0; - setup_func[R128_TEX0_BIT|R128_TEX1_BIT] = rs_t0t1; - setup_func[R128_FOG_BIT] = rs_f; - setup_func[R128_FOG_BIT|R128_TEX0_BIT] = rs_ft0; - setup_func[R128_FOG_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_ft0t1; - setup_func[R128_RGBA_BIT] = rs_g; - setup_func[R128_RGBA_BIT|R128_SPEC_BIT] = rs_gs; - setup_func[R128_RGBA_BIT|R128_TEX0_BIT] = rs_gt0; - setup_func[R128_RGBA_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_gt0t1; - setup_func[R128_RGBA_BIT|R128_SPEC_BIT|R128_TEX0_BIT] = rs_gst0; - setup_func[R128_RGBA_BIT|R128_SPEC_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_gst0t1; - setup_func[R128_RGBA_BIT|R128_FOG_BIT] = rs_gf; - setup_func[R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT] = rs_gfs; - setup_func[R128_RGBA_BIT|R128_FOG_BIT|R128_TEX0_BIT] = rs_gft0; - setup_func[R128_RGBA_BIT|R128_FOG_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_gft0t1; - setup_func[R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|R128_TEX0_BIT] = rs_gfst0; - setup_func[R128_RGBA_BIT|R128_FOG_BIT|R128_SPEC_BIT|R128_TEX0_BIT|R128_TEX1_BIT] = rs_gfst0t1; + fprintf(stderr, "%s(%x): %s%s%s%s%s%s\n", + msg, + (int)flags, + (flags & R128_XYZW_BIT) ? " xyzw," : "", + (flags & R128_RGBA_BIT) ? " rgba," : "", + (flags & R128_SPEC_BIT) ? " spec," : "", + (flags & R128_FOG_BIT) ? " fog," : "", + (flags & R128_TEX0_BIT) ? " tex-0," : "", + (flags & R128_TEX1_BIT) ? " tex-1," : ""); } -void r128PrintSetupFlags( char *msg, GLuint flags ) -{ - fprintf( stderr, "%s: %d %s%s%s%s%s%s\n", - msg, - (int)flags, - (flags & R128_WIN_BIT) ? " xyzw," : "", - (flags & R128_RGBA_BIT) ? " rgba," : "", - (flags & R128_SPEC_BIT) ? " spec," : "", - (flags & R128_FOG_BIT) ? " fog," : "", - (flags & R128_TEX0_BIT) ? " tex-0," : "", - (flags & R128_TEX1_BIT) ? " tex-1," : "" ); -} - -/* Initialize the vertex buffer setup functions based on the current - * rendering state. - */ -void r128DDChooseRasterSetupFunc( GLcontext *ctx ) +void r128CheckTexSizes( GLcontext *ctx ) { - r128ContextPtr rmesa = R128_CONTEXT(ctx); - GLint index = R128_WIN_BIT | R128_RGBA_BIT; - - 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 ( 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; - } - - index |= R128_TEX0_BIT; - } + r128ContextPtr rmesa = R128_CONTEXT( ctx ); - if ( ctx->Texture.ReallyEnabled & ENABLE_TEX1 ) { - if ( ctx->Texture.ReallyEnabled & ENABLE_TEX0 ) { - 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. - */ - rmesa->tmu_source[0] = 1; - rmesa->tex_dest[1] = R128_TEX0_BIT; - - 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; - } + if (!setup_tab[rmesa->SetupIndex].check_tex_sizes(ctx)) { + TNLcontext *tnl = TNL_CONTEXT(ctx); - index |= R128_TEX0_BIT; + /* Invalidate stored verts + */ + rmesa->SetupNewInputs = ~0; + rmesa->SetupIndex |= R128_PTEX_BIT; + + if (!rmesa->Fallback && + !(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { + tnl->Driver.Render.Interp = setup_tab[rmesa->SetupIndex].interp; + tnl->Driver.Render.CopyPV = setup_tab[rmesa->SetupIndex].copy_pv; } } - - if ( ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ) - index |= R128_SPEC_BIT; - - if ( ctx->Fog.Enabled ) - index |= R128_FOG_BIT; - - if ( R128_DEBUG & DEBUG_VERBOSE_MSG ) { - fprintf( stderr, "\n" ); - r128PrintSetupFlags( "full setup function", 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. - */ -void r128DDCheckPartialRasterSetup( GLcontext *ctx, - struct gl_pipeline_stage *s ) +void r128BuildVertices( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint newinputs ) { r128ContextPtr rmesa = R128_CONTEXT( ctx ); - GLint tmp = rmesa->SetupDone; + GLubyte *v = ((GLubyte *)rmesa->verts + (start<vertex_stride_shift)); + GLuint stride = 1<vertex_stride_shift; - s->type = 0; - rmesa->SetupDone = 0; + newinputs |= rmesa->SetupNewInputs; + rmesa->SetupNewInputs = 0; - if ( (ctx->Array.Summary & VERT_OBJ_ANY) == 0 ) + if (!newinputs) return; - if ( ctx->IndirectTriangles ) - return; + if (newinputs & VERT_CLIP) { + setup_tab[rmesa->SetupIndex].emit( ctx, start, count, v, stride ); + } else { + GLuint ind = 0; - rmesa->SetupDone = tmp; -} + if (newinputs & VERT_RGBA) + ind |= R128_RGBA_BIT; -/* Repair existing precalculated vertices with new data. - */ -void r128DDPartialRasterSetup( struct vertex_buffer *VB ) -{ - r128ContextPtr rmesa = R128_CONTEXT(VB->ctx); - GLuint new = VB->pipeline->new_outputs; - GLuint available = VB->pipeline->outputs; - GLuint index = 0; - - if ( new & VERT_WIN ) { - new = available; - index |= R128_WIN_BIT | R128_FOG_BIT; - } + if (newinputs & VERT_SPEC_RGB) + ind |= R128_SPEC_BIT; - if ( new & VERT_RGBA ) - index |= R128_RGBA_BIT | R128_SPEC_BIT; + if (newinputs & VERT_TEX0) + ind |= R128_TEX0_BIT; - if ( new & VERT_TEX0_ANY ) - index |= R128_TEX0_BIT; + if (newinputs & VERT_TEX1) + ind |= R128_TEX1_BIT; - if ( new & VERT_TEX1_ANY ) - index |= rmesa->tex_dest[1]; + if (newinputs & VERT_FOG_COORD) + ind |= R128_FOG_BIT; - if ( new & VERT_FOG_COORD ) - index |= R128_FOG_BIT; + if (rmesa->SetupIndex & R128_PTEX_BIT) + ind = ~0; - rmesa->SetupDone &= ~index; - index &= rmesa->SetupIndex; - rmesa->SetupDone |= index; + ind &= rmesa->SetupIndex; - if ( R128_DEBUG & DEBUG_VERBOSE_MSG ) - r128PrintSetupFlags( "partial setup function", index ); - - if ( index ) - setup_func[index]( VB, VB->Start, VB->Count ); + if (ind) { + setup_tab[ind].emit( ctx, start, count, v, stride ); + } + } } -void r128DDDoRasterSetup( struct vertex_buffer *VB ) +void r128ChooseVertexState( GLcontext *ctx ) { - GLcontext *ctx = VB->ctx; + TNLcontext *tnl = TNL_CONTEXT(ctx); + r128ContextPtr rmesa = R128_CONTEXT( ctx ); + GLuint ind = R128_XYZW_BIT|R128_RGBA_BIT; - if ( VB->Type == VB_CVA_PRECALC ) { - r128DDPartialRasterSetup( VB ); - } else if ( ctx->Driver.RasterSetup ) { - ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); - } -} + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + ind |= R128_SPEC_BIT; + if (ctx->Fog.Enabled) + ind |= R128_FOG_BIT; -/* ================================================================ - * Hardware-format vertex buffers - */ + if (ctx->Texture._ReallyEnabled) { + ind |= R128_TEX0_BIT; + if (ctx->Texture.Unit[0]._ReallyEnabled && + ctx->Texture.Unit[1]._ReallyEnabled) + ind |= R128_TEX1_BIT; + } -void r128DDResizeVB( struct vertex_buffer *VB, GLuint size ) -{ - r128VertexBufferPtr rvb = R128_DRIVER_DATA(VB); + rmesa->SetupIndex = ind; - while ( rvb->size < size ) - rvb->size *= 2; + if (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED)) { + tnl->Driver.Render.Interp = r128_interp_extras; + tnl->Driver.Render.CopyPV = r128_copy_pv_extras; + } else { + tnl->Driver.Render.Interp = setup_tab[ind].interp; + tnl->Driver.Render.CopyPV = setup_tab[ind].copy_pv; + } - 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 ); + if (setup_tab[ind].vertex_format != rmesa->vertex_format) { + FLUSH_BATCH(rmesa); + rmesa->vertex_format = setup_tab[ind].vertex_format; + rmesa->vertex_size = setup_tab[ind].vertex_size; + rmesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; } +} - rvb->verts = (r128VertexPtr)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 r128_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint vertex_size = rmesa->vertex_size * 4; + GLuint *dest = r128AllocDmaLow( rmesa, (count-start) * vertex_size); + setup_tab[rmesa->SetupIndex].emit( ctx, start, count, dest, vertex_size ); } + -void r128DDRegisterVB( struct vertex_buffer *VB ) +#if 0 +void r128_emit_indexed_verts( GLcontext *ctx, GLuint start, GLuint count ) { - r128VertexBufferPtr rvb; + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint vertex_size = rmesa->vertex_size * 4; + GLuint bufsz = (count-start) * vertex_size; + CARD32 *dest; + + rmesa->vertex_low = (rmesa->vertex_low + 63) & ~63; /* alignment */ + rmesa->vertex_last_prim = rmesa->vertex_low; + + dest = r128AllocDmaLow( rmesa, bufsz, __FUNCTION__); + setup_tab[rmesa->SetupIndex].emit( ctx, start, count, dest, vertex_size ); + + rmesa->retained_buffer = rmesa->vertex_buffer; + rmesa->vb_offset = (rmesa->vertex_buffer->idx * R128_BUFFER_SIZE + + rmesa->vertex_low - bufsz); - rvb = (r128VertexBufferPtr)CALLOC( sizeof(*rvb) ); + rmesa->vertex_low = (rmesa->vertex_low + 0x7) & ~0x7; /* alignment */ + rmesa->vertex_last_prim = rmesa->vertex_low; +} +#endif - 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 ); - } - rvb->verts = (r128VertexPtr)rvb->vert_store; +void r128InitVB( GLcontext *ctx ) +{ + r128ContextPtr rmesa = R128_CONTEXT(ctx); + GLuint size = TNL_CONTEXT(ctx)->vb.Size; - 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 ); - } + rmesa->verts = (char *)ALIGN_MALLOC(size * 4 * 16, 32); - 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 ); + { + static int firsttime = 1; + if (firsttime) { + init_setup_tab(); + firsttime = 0; + } } - - VB->driver_data = rvb; } -void r128DDUnregisterVB( struct vertex_buffer *VB ) + +void r128FreeVB( GLcontext *ctx ) { - r128VertexBufferPtr rvb = R128_DRIVER_DATA(VB); + r128ContextPtr rmesa = R128_CONTEXT(ctx); + if (rmesa->verts) { + ALIGN_FREE(rmesa->verts); + rmesa->verts = 0; + } + + + if (rmesa->UbyteSecondaryColor.Ptr) { + ALIGN_FREE(rmesa->UbyteSecondaryColor.Ptr); + rmesa->UbyteSecondaryColor.Ptr = 0; + } - if ( rvb ) { - if ( rvb->vert_store ) ALIGN_FREE( rvb->vert_store ); - gl_vector1ui_free( &rvb->clipped_elements ); - FREE( rvb ); - VB->driver_data = 0; + if (rmesa->UbyteColor.Ptr) { + ALIGN_FREE(rmesa->UbyteColor.Ptr); + rmesa->UbyteColor.Ptr = 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.6 xc/lib/GL/mesa/src/drv/r128/r128_vb.h:1.8 --- xc/lib/GL/mesa/src/drv/r128/r128_vb.h:1.6 Tue Apr 10 13:53:07 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_vb.h Wed Oct 30 07:51:46 2002 @@ -1,8 +1,9 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.h,v 1.6 2001/04/10 17:53:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_vb.h,v 1.8 2002/10/30 12:51:46 alanh Exp $ */ /************************************************************************** -Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., - Cedar Park, Texas. +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 @@ -19,7 +20,7 @@ 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, +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. @@ -28,110 +29,46 @@ /* * Authors: - * Gareth Hughes - * Kevin E. Martin - * Michel Dänzer + * Keith Whitwell * */ -#ifndef __R128_VB_H__ -#define __R128_VB_H__ +#ifndef R128VB_INC +#define R128VB_INC -#ifdef GLX_DIRECT_RENDERING +#include "mtypes.h" +#include "swrast/swrast.h" +#include "r128_context.h" -#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 alpha; - GLubyte red; - GLubyte green; - GLubyte blue; -} r128_color_t; -#endif +#define _R128_NEW_VERTEX_STATE (_DD_NEW_SEPARATE_SPECULAR | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_UNFILLED | \ + _NEW_TEXTURE | \ + _NEW_FOG) -/* 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 */ -} r128_vertex; +extern void r128CheckTexSizes( GLcontext *ctx ); +extern void r128ChooseVertexState( GLcontext *ctx ); -/* 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) +extern void r128BuildVertices( GLcontext *ctx, GLuint start, GLuint count, + GLuint newinputs ); +extern void r128PrintSetupFlags(char *msg, GLuint flags ); -/* The fastpath code still expects a 16-float stride vertex. - */ -union r128_vertex_t { - r128_vertex v; - GLfloat f[16]; - GLuint ui[16]; -}; - -typedef union r128_vertex_t r128Vertex; -typedef union r128_vertex_t *r128VertexPtr; - -typedef struct { - 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_WIN_BIT 0x01 -#define R128_RGBA_BIT 0x02 -#define R128_FOG_BIT 0x04 -#define R128_SPEC_BIT 0x08 -#define R128_TEX0_BIT 0x10 -#define R128_TEX1_BIT 0x20 -#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 ); +extern void r128InitVB( GLcontext *ctx ); +extern void r128FreeVB( GLcontext *ctx ); + +extern void r128_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ); + +extern void r128_emit_indexed_verts( GLcontext *ctx, + GLuint start, + GLuint count ); + +extern void r128_translate_vertex( GLcontext *ctx, + const r128Vertex *src, + SWvertex *dst ); -extern void r128DDSetupInit( void ); +extern void r128_print_vertex( GLcontext *ctx, const r128Vertex *v ); #endif -#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.12 xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c:removed --- xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c:1.12 Mon Nov 26 16:46:35 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c Thu Feb 27 12:26:30 2003 @@ -1,318 +0,0 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c,v 1.12 2001/11/26 21:46:35 dawes 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. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Gareth Hughes - * - */ - -#ifdef GLX_DIRECT_RENDERING - -/* r128 Mesa driver includes */ -#include "r128_context.h" -#include "r128_ioctl.h" -#include "r128_state.h" -#include "r128_tex.h" - -/* Mesa src includes */ -#include "context.h" -#include "simple_list.h" -#include "mmath.h" - -extern void __driRegisterExtensions( void ); - -static r128ContextPtr r128Ctx = NULL; - - -/* Initialize the driver specific screen private data. - */ -GLboolean XMesaInitDriver( __DRIscreenPrivate *sPriv ) -{ - 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 < 2 ) { - char msg[1000]; - sprintf( msg, "R128 DRI driver expected DRM driver version 3.0 or greater 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; -} - -/* Reset the driver specific screen private data. - */ -void XMesaResetDriver( __DRIscreenPrivate *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 ) -{ - /* 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 r128CreateContext( dpy, mesaVis, driContextPriv ); -} - -/* Destroy the Mesa and driver specific context data. - */ -void XMesaDestroyContext(__DRIcontextPrivate *driContextPriv) -{ - r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; - - 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 ) -{ - 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. - */ -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 ( 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 ) -{ - if ( driContextPriv ) { - r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; - - r128Ctx = r128MakeCurrent( r128Ctx, rmesa, driDrawPriv ); - - gl_make_current2( r128Ctx->glCtx, - driDrawPriv->mesaBuffer, - driReadPriv->mesaBuffer ); - - 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. - */ - r128Ctx->new_state = R128_NEW_WINDOW | R128_NEW_CLIP; - - 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; -} - -/* 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 ) -{ -#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 ) -{ -#if 0 - r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; - - 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/r200/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/Imakefile:1.2 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/Imakefile Mon Nov 25 09:04:51 2002 @@ -0,0 +1,79 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r200/Imakefile,v 1.2 2002/11/25 14:04:51 eich 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 "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" +#include "../../Imakefile.inc" +#if defined(i386Architecture) && MesaUseX86Asm +#include "../../X86/Imakefile.inc" +#endif +#ifdef SparcArchitecture +#include "../../SPARC/Imakefile.inc" +#endif + + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) + + DRIOBJS = $(GLXLIBSRC)/dri/dri_util.o + + 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 + HISRCS = ../../../../highpc.c + + LOOBJS = ../../../../lowpc.o + HIOBJS = ../../../../highpc.o +#endif + + SRCS = $(R200SRCS) + OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(COMMONOBJS) $(R200OBJS) $(HIOBJS) + +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(R200OBJS)) +NormalLintTarget($(SRCS)) + +#if !GlxUseBuiltInDRIDriver +LIBNAME = r200_dri.so +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) +InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) + +#ifdef GlxSoProf +SOPROF_LIBNAME = _r200_dri_p +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE $(OBJS),$(OBJS)) +InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) +#endif +#endif + +DependTarget() + Index: xc/lib/GL/mesa/src/drv/r200/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/Imakefile.inc:1.2 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/Imakefile.inc Fri Nov 29 09:41:33 2002 @@ -0,0 +1,182 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/r200/Imakefile.inc,v 1.2 2002/11/29 14:41:33 eich Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvR200BuildDir +#define MesaDrvR200BuildDir /**/ +#endif +MESADRVR200BUILDDIR = MesaDrvR200BuildDir + +#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$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ + -I$(XF86DRIVERSRC)/ati \ + -I$(XF86COMSRC) \ + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/include \ + -I$(XTOP)/include +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESADRVSRCDIR)/common \ + -I$(MESADRVSRCDIR)/r200 + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + R200SRCS = $(MESADRVR200BUILDDIR)r200_context.c \ + $(MESADRVR200BUILDDIR)r200_sanity.c \ + $(MESADRVR200BUILDDIR)r200_state.c \ + $(MESADRVR200BUILDDIR)r200_state_init.c \ + $(MESADRVR200BUILDDIR)r200_swtcl.c \ + $(MESADRVR200BUILDDIR)r200_cmdbuf.c \ + $(MESADRVR200BUILDDIR)r200_ioctl.c \ + $(MESADRVR200BUILDDIR)r200_lock.c \ + $(MESADRVR200BUILDDIR)r200_maos.c \ + $(MESADRVR200BUILDDIR)r200_pixel.c \ + $(MESADRVR200BUILDDIR)r200_screen.c \ + $(MESADRVR200BUILDDIR)r200_span.c \ + $(MESADRVR200BUILDDIR)r200_tcl.c \ + $(MESADRVR200BUILDDIR)r200_tex.c \ + $(MESADRVR200BUILDDIR)r200_texmem.c \ + $(MESADRVR200BUILDDIR)r200_texstate.c \ + $(MESADRVR200BUILDDIR)r200_vtxfmt.c \ + $(MESADRVR200BUILDDIR)r200_vtxfmt_x86.c \ + $(MESADRVR200BUILDDIR)r200_vtxtmp_x86.S \ + $(MESADRVR200BUILDDIR)r200_vtxfmt_sse.c \ + $(MESADRVR200BUILDDIR)r200_vtxfmt_c.c + + R200OBJS = $(MESADRVR200BUILDDIR)r200_context.o \ + $(MESADRVR200BUILDDIR)r200_sanity.o \ + $(MESADRVR200BUILDDIR)r200_state.o \ + $(MESADRVR200BUILDDIR)r200_state_init.o \ + $(MESADRVR200BUILDDIR)r200_swtcl.o \ + $(MESADRVR200BUILDDIR)r200_cmdbuf.o \ + $(MESADRVR200BUILDDIR)r200_ioctl.o \ + $(MESADRVR200BUILDDIR)r200_lock.o \ + $(MESADRVR200BUILDDIR)r200_maos.o \ + $(MESADRVR200BUILDDIR)r200_pixel.o \ + $(MESADRVR200BUILDDIR)r200_screen.o \ + $(MESADRVR200BUILDDIR)r200_span.o \ + $(MESADRVR200BUILDDIR)r200_tcl.o \ + $(MESADRVR200BUILDDIR)r200_tex.o \ + $(MESADRVR200BUILDDIR)r200_texmem.o \ + $(MESADRVR200BUILDDIR)r200_texstate.o \ + $(MESADRVR200BUILDDIR)r200_vtxfmt.o \ + $(MESADRVR200BUILDDIR)r200_vtxfmt_c.o + +#ifdef i386Architecture + R200OBJS += $(MESADRVR200BUILDDIR)r200_vtxfmt_x86.o \ + $(MESADRVR200BUILDDIR)r200_vtxtmp_x86.o \ + $(MESADRVR200BUILDDIR)r200_vtxfmt_sse.o +#endif + + R200UOBJS = $(MESADRVR200BUILDDIR)unshared/r200_context.o \ + $(MESADRVR200BUILDDIR)unshared/r200_sanity.o \ + $(MESADRVR200BUILDDIR)unshared/r200_cmdbuf.o \ + $(MESADRVR200BUILDDIR)unshared/r200_ioctl.o \ + $(MESADRVR200BUILDDIR)unshared/r200_lock.o \ + $(MESADRVR200BUILDDIR)unshared/r200_maos.o \ + $(MESADRVR200BUILDDIR)unshared/r200_pixel.o \ + $(MESADRVR200BUILDDIR)unshared/r200_screen.o \ + $(MESADRVR200BUILDDIR)unshared/r200_span.o \ + $(MESADRVR200BUILDDIR)unshared/r200_state.o \ + $(MESADRVR200BUILDDIR)unshared/r200_state_init.o \ + $(MESADRVR200BUILDDIR)unshared/r200_swtcl.o \ + $(MESADRVR200BUILDDIR)unshared/r200_tcl.o \ + $(MESADRVR200BUILDDIR)unshared/r200_tex.o \ + $(MESADRVR200BUILDDIR)unshared/r200_texmem.o \ + $(MESADRVR200BUILDDIR)unshared/r200_texstate.o \ + $(MESADRVR200BUILDDIR)unshared/r200_vtxfmt.o \ + $(MESADRVR200BUILDDIR)unshared/r200_vtxfmt_c.o + +#ifdef i386Architecture + R200UOBJS += $(MESADRVR200BUILDDIR)unshared/r200_vtxfmt_x86.o \ + $(MESADRVR200BUILDDIR)unshared/r200_vtxtmp_x86.o \ + $(MESADRVR200BUILDDIR)unshared/r200_vtxfmt_sse.o +#endif + + R200DOBJS = $(MESADRVR200BUILDDIR)debugger/r200_context.o \ + $(MESADRVR200BUILDDIR)debugger/r200_sanity.o \ + $(MESADRVR200BUILDDIR)debugger/r200_cmdbuf.o \ + $(MESADRVR200BUILDDIR)debugger/r200_ioctl.o \ + $(MESADRVR200BUILDDIR)debugger/r200_lock.o \ + $(MESADRVR200BUILDDIR)debugger/r200_maos.o \ + $(MESADRVR200BUILDDIR)debugger/r200_pixel.o \ + $(MESADRVR200BUILDDIR)debugger/r200_screen.o \ + $(MESADRVR200BUILDDIR)debugger/r200_span.o \ + $(MESADRVR200BUILDDIR)debugger/r200_state.o \ + $(MESADRVR200BUILDDIR)debugger/r200_state_init.o \ + $(MESADRVR200BUILDDIR)debugger/r200_swtcl.o \ + $(MESADRVR200BUILDDIR)debugger/r200_tcl.o \ + $(MESADRVR200BUILDDIR)debugger/r200_tex.o \ + $(MESADRVR200BUILDDIR)debugger/r200_texmem.o \ + $(MESADRVR200BUILDDIR)debugger/r200_texstate.o \ + $(MESADRVR200BUILDDIR)debugger/r200_vtxfmt.o \ + $(MESADRVR200BUILDDIR)debugger/r200_vtxfmt_c.o + +#ifdef i386Architecture + R200DOBJS += $(MESADRVR200BUILDDIR)debugger/r200_vtxfmt_x86.o \ + $(MESADRVR200BUILDDIR)debugger/r200_vtxtmp_x86.o \ + $(MESADRVR200BUILDDIR)debugger/r200_vtxfmt_sse.o +#endif + + R200POBJS = $(MESADRVR200BUILDDIR)profiled/r200_context.o \ + $(MESADRVR200BUILDDIR)profiled/r200_sanity.o \ + $(MESADRVR200BUILDDIR)profiled/r200_cmdbuf.o \ + $(MESADRVR200BUILDDIR)profiled/r200_ioctl.o \ + $(MESADRVR200BUILDDIR)profiled/r200_lock.o \ + $(MESADRVR200BUILDDIR)profiled/r200_maos.o \ + $(MESADRVR200BUILDDIR)profiled/r200_pixel.o \ + $(MESADRVR200BUILDDIR)profiled/r200_screen.o \ + $(MESADRVR200BUILDDIR)profiled/r200_span.o \ + $(MESADRVR200BUILDDIR)profiled/r200_state.o \ + $(MESADRVR200BUILDDIR)profiled/r200_state_init.o \ + $(MESADRVR200BUILDDIR)profiled/r200_swtcl.o \ + $(MESADRVR200BUILDDIR)profiled/r200_tcl.o \ + $(MESADRVR200BUILDDIR)profiled/r200_tex.o \ + $(MESADRVR200BUILDDIR)profiled/r200_texmem.o \ + $(MESADRVR200BUILDDIR)profiled/r200_texstate.o \ + $(MESADRVR200BUILDDIR)profiled/r200_vtxfmt.o \ + $(MESADRVR200BUILDDIR)profiled/r200_vtxfmt_c.o + +#ifdef i386Architecture + R200POBJS += $(MESADRVR200BUILDDIR)profiled/r200_vtxfmt_x86.o \ + $(MESADRVR200BUILDDIR)profiled/r200_vtxtmp_x86.o \ + $(MESADRVR200BUILDDIR)profiled/r200_vtxfmt_sse.o +#endif + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(r200_context.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_cmdbuf.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_ioctl.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_lock.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_maos.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_pixel.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_screen.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_span.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_sanity.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_state.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_state_init.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_swtcl.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_tcl.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_tex.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_texmem.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_texstate.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_vtxfmt.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_vtxfmt_c.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_vtxfmt_x86.c, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_vtxtmp_x86.S, $(MESADRVSRCDIR)/r200) +LinkSourceFile(r200_vtxfmt_sse.c, $(MESADRVSRCDIR)/r200) +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_cmdbuf.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_cmdbuf.c:1.1 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_cmdbuf.c Wed Oct 30 07:51:51 2002 @@ -0,0 +1,343 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_cmdbuf.c,v 1.1 2002/10/30 12:51:51 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_state.h" +#include "r200_ioctl.h" +#include "r200_tcl.h" +#include "r200_sanity.h" +#include "radeon_reg.h" + +#include "mem.h" +#include "macros.h" +#include "context.h" +#include "swrast/swrast.h" +#include "simple_list.h" + +static void print_state_atom( struct r200_state_atom *state ) +{ + int i; + + fprintf(stderr, "emit %s/%d\n", state->name, state->cmd_size); + + if (0 & R200_DEBUG & DEBUG_VERBOSE) + for (i = 0 ; i < state->cmd_size ; i++) + fprintf(stderr, "\t%s[%d]: %x\n", state->name, i, state->cmd[i]); + +} + +static void r200_emit_state_list( r200ContextPtr rmesa, + struct r200_state_atom *list ) +{ + struct r200_state_atom *state, *tmp; + char *dest; + + foreach_s( state, tmp, list ) { + if (state->check( rmesa->glCtx, state->idx )) { + dest = r200AllocCmdBuf( rmesa, state->cmd_size * 4, __FUNCTION__); + memcpy( dest, state->cmd, state->cmd_size * 4); + move_to_head( &(rmesa->hw.clean), state ); + if (R200_DEBUG & DEBUG_STATE) + print_state_atom( state ); + } + else if (R200_DEBUG & DEBUG_STATE) + fprintf(stderr, "skip state %s\n", state->name); + } +} + + +void r200EmitState( r200ContextPtr rmesa ) +{ + struct r200_state_atom *state, *tmp; + + if (R200_DEBUG & (DEBUG_STATE|DEBUG_PRIMS)) + fprintf(stderr, "%s\n", __FUNCTION__); + + /* Somewhat overkill: + */ + if ( rmesa->lost_context) { + if (R200_DEBUG & (DEBUG_STATE|DEBUG_PRIMS|DEBUG_IOCTL)) + fprintf(stderr, "%s - lost context\n", __FUNCTION__); + + foreach_s( state, tmp, &(rmesa->hw.clean) ) + move_to_tail(&(rmesa->hw.dirty), state ); + + rmesa->lost_context = 0; + } + else { + move_to_tail( &rmesa->hw.dirty, &rmesa->hw.mtl[0] ); + /* odd bug? -- isosurf, cycle between reflect & lit */ + } + + r200_emit_state_list( rmesa, &rmesa->hw.dirty ); +} + + + +/* Fire a section of the retained (indexed_verts) buffer as a regular + * primtive. + */ +extern void r200EmitVbufPrim( r200ContextPtr rmesa, + GLuint primitive, + GLuint vertex_nr ) +{ + drmRadeonCmdHeader *cmd; + + assert(!(primitive & R200_VF_PRIM_WALK_IND)); + + r200EmitState( rmesa ); + + if (R200_DEBUG & (DEBUG_IOCTL|DEBUG_PRIMS)) + fprintf(stderr, "%s cmd_used/4: %d prim %x nr %d\n", __FUNCTION__, + rmesa->store.cmd_used/4, primitive, vertex_nr); + + cmd = (drmRadeonCmdHeader *)r200AllocCmdBuf( rmesa, 3 * sizeof(*cmd), + __FUNCTION__ ); + cmd[0].i = 0; + cmd[0].header.cmd_type = RADEON_CMD_PACKET3_CLIP; + cmd[1].i = R200_CP_CMD_3D_DRAW_VBUF_2; + cmd[2].i = (primitive | + R200_VF_PRIM_WALK_LIST | + R200_VF_COLOR_ORDER_RGBA | + (vertex_nr << R200_VF_VERTEX_NUMBER_SHIFT)); + + + if (R200_DEBUG & DEBUG_SYNC) { + fprintf(stderr, "\nSyncing\n\n"); + R200_FIREVERTICES( rmesa ); + r200Finish( rmesa->glCtx ); + } +} + + +void r200FlushElts( r200ContextPtr rmesa ) +{ + int *cmd = (int *)(rmesa->store.cmd_buf + rmesa->store.elts_start); + int dwords; + int nr = (rmesa->store.cmd_used - (rmesa->store.elts_start + 12)) / 2; + + if (R200_DEBUG & (DEBUG_IOCTL|DEBUG_PRIMS)) + fprintf(stderr, "%s\n", __FUNCTION__); + + assert( rmesa->dma.flush == r200FlushElts ); + rmesa->dma.flush = 0; + + /* Cope with odd number of elts: + */ + rmesa->store.cmd_used = (rmesa->store.cmd_used + 2) & ~2; + dwords = (rmesa->store.cmd_used - rmesa->store.elts_start) / 4; + + cmd[1] |= (dwords - 3) << 16; + cmd[2] |= nr << R200_VF_VERTEX_NUMBER_SHIFT; + + if (R200_DEBUG & DEBUG_SYNC) { + fprintf(stderr, "\nSyncing in %s\n\n", __FUNCTION__); + R200_FIREVERTICES( rmesa ); + r200Finish( rmesa->glCtx ); + } +} + + +GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa, + GLuint primitive, + GLuint min_nr ) +{ + drmRadeonCmdHeader *cmd; + GLushort *retval; + + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s %d prim %x\n", __FUNCTION__, min_nr, primitive); + + assert((primitive & R200_VF_PRIM_WALK_IND)); + + r200EmitState( rmesa ); + + cmd = (drmRadeonCmdHeader *)r200AllocCmdBuf( rmesa, + 12 + min_nr*2, + __FUNCTION__ ); + cmd[0].i = 0; + cmd[0].header.cmd_type = RADEON_CMD_PACKET3_CLIP; + cmd[1].i = R200_CP_CMD_3D_DRAW_INDX_2; + cmd[2].i = (primitive | + R200_VF_PRIM_WALK_IND | + R200_VF_COLOR_ORDER_RGBA); + + + retval = (GLushort *)(cmd+3); + + if (R200_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "%s: header 0x%x prim %x \n", + __FUNCTION__, + cmd[1].i, primitive); + + assert(!rmesa->dma.flush); + rmesa->dma.flush = r200FlushElts; + + rmesa->store.elts_start = ((char *)cmd) - rmesa->store.cmd_buf; + + return retval; +} + + + +void r200EmitVertexAOS( r200ContextPtr rmesa, + GLuint vertex_size, + GLuint offset ) +{ + drmRadeonCmdHeader *cmd; + + if (R200_DEBUG & (DEBUG_PRIMS|DEBUG_IOCTL)) + fprintf(stderr, "%s: vertex_size 0x%x offset 0x%x \n", + __FUNCTION__, vertex_size, offset); + + cmd = (drmRadeonCmdHeader *)r200AllocCmdBuf( rmesa, 5 * sizeof(int), + __FUNCTION__ ); + + cmd[0].header.cmd_type = RADEON_CMD_PACKET3; + cmd[1].i = R200_CP_CMD_3D_LOAD_VBPNTR | (2 << 16); + cmd[2].i = 1; + cmd[3].i = vertex_size | (vertex_size << 8); + cmd[4].i = offset; +} + + +void r200EmitAOS( r200ContextPtr rmesa, + struct r200_dma_region **component, + GLuint nr, + GLuint offset ) +{ + drmRadeonCmdHeader *cmd; + int sz = 3 + ((nr/2)*3) + ((nr&1)*2); + int i; + int *tmp; + + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s nr arrays: %d\n", __FUNCTION__, nr); + + cmd = (drmRadeonCmdHeader *)r200AllocCmdBuf( rmesa, sz * sizeof(int), + __FUNCTION__ ); + cmd[0].i = 0; + cmd[0].header.cmd_type = RADEON_CMD_PACKET3; + cmd[1].i = R200_CP_CMD_3D_LOAD_VBPNTR | ((sz-3) << 16); + cmd[2].i = nr; + tmp = &cmd[0].i; + cmd += 3; + + for (i = 0 ; i < nr ; i++) { + if (i & 1) { + cmd[0].i |= ((component[i]->aos_stride << 24) | + (component[i]->aos_size << 16)); + cmd[2].i = (component[i]->aos_start + + offset * component[i]->aos_stride * 4); + cmd += 3; + } + else { + cmd[0].i = ((component[i]->aos_stride << 8) | + (component[i]->aos_size << 0)); + cmd[1].i = (component[i]->aos_start + + offset * component[i]->aos_stride * 4); + } + } + + if (R200_DEBUG & DEBUG_VERTS) { + fprintf(stderr, "%s:\n", __FUNCTION__); + for (i = 0 ; i < sz ; i++) + fprintf(stderr, " %d: %x\n", i, tmp[i]); + } +} + +void r200EmitBlit( r200ContextPtr rmesa, + GLuint color_fmt, + GLuint src_pitch, + GLuint src_offset, + GLuint dst_pitch, + GLuint dst_offset, + GLint srcx, GLint srcy, + GLint dstx, GLint dsty, + GLuint w, GLuint h ) +{ + drmRadeonCmdHeader *cmd; + + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s src %x/%x %d,%d dst: %x/%x %d,%d sz: %dx%d\n", + __FUNCTION__, + src_pitch, src_offset, srcx, srcy, + dst_pitch, dst_offset, dstx, dsty, + w, h); + + assert( (src_pitch & 63) == 0 ); + assert( (dst_pitch & 63) == 0 ); + assert( (src_offset & 1023) == 0 ); + assert( (dst_offset & 1023) == 0 ); + assert( w < (1<<16) ); + assert( h < (1<<16) ); + + cmd = (drmRadeonCmdHeader *)r200AllocCmdBuf( rmesa, 8 * sizeof(int), + __FUNCTION__ ); + + + cmd[0].header.cmd_type = RADEON_CMD_PACKET3; + cmd[1].i = R200_CP_CMD_BITBLT_MULTI | (5 << 16); + cmd[2].i = (RADEON_GMC_SRC_PITCH_OFFSET_CNTL | + RADEON_GMC_DST_PITCH_OFFSET_CNTL | + RADEON_GMC_BRUSH_NONE | + (color_fmt << 8) | + RADEON_GMC_SRC_DATATYPE_COLOR | + RADEON_ROP3_S | + RADEON_DP_SRC_SOURCE_MEMORY | + RADEON_GMC_CLR_CMP_CNTL_DIS | + RADEON_GMC_WR_MSK_DIS ); + + cmd[3].i = ((src_pitch/64)<<22) | (src_offset >> 10); + cmd[4].i = ((dst_pitch/64)<<22) | (dst_offset >> 10); + cmd[5].i = (srcx << 16) | srcy; + cmd[6].i = (dstx << 16) | dsty; /* dst */ + cmd[7].i = (w << 16) | h; +} + + +void r200EmitWait( r200ContextPtr rmesa, GLuint flags ) +{ + if (rmesa->dri.drmMinor >= 6) { + drmRadeonCmdHeader *cmd; + + assert( !(flags & ~(RADEON_WAIT_2D|RADEON_WAIT_3D)) ); + + cmd = (drmRadeonCmdHeader *)r200AllocCmdBuf( rmesa, 1 * sizeof(int), + __FUNCTION__ ); + cmd[0].i = 0; + cmd[0].wait.cmd_type = RADEON_CMD_WAIT; + cmd[0].wait.flags = flags; + } +} Index: xc/lib/GL/mesa/src/drv/r200/r200_context.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_context.c:1.2 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_context.c Mon Dec 16 11:18:53 2002 @@ -0,0 +1,634 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_context.c,v 1.2 2002/12/16 16:18:53 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_ioctl.h" +#include "r200_state.h" +#include "r200_span.h" +#include "r200_pixel.h" +#include "r200_tex.h" +#include "r200_swtcl.h" +#include "r200_tcl.h" +#include "r200_vtxfmt.h" +#include "r200_maos.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "array_cache/acache.h" + +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" + +#include "attrib.h" +#include "api_arrayelt.h" +#include "context.h" +#include "simple_list.h" +#include "mem.h" +#include "matrix.h" +#include "state.h" +#include "extensions.h" +#include "state.h" +#if defined(USE_X86_ASM) +#include "X86/common_x86_asm.h" +#endif + +#define R200_DATE "20020827" + +#ifndef R200_DEBUG +int R200_DEBUG = (0); +#endif + + + +/* Return the width and height of the given buffer. + */ +static void r200GetBufferSize( GLframebuffer *buffer, + GLuint *width, GLuint *height ) +{ + GET_CURRENT_CONTEXT(ctx); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + LOCK_HARDWARE( rmesa ); + *width = rmesa->dri.drawable->w; + *height = rmesa->dri.drawable->h; + UNLOCK_HARDWARE( rmesa ); +} + +/* Return various strings for glGetString(). + */ +static const GLubyte *r200GetString( GLcontext *ctx, GLenum name ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + static char buffer[128]; + + switch ( name ) { + case GL_VENDOR: + return (GLubyte *)"Tungsten Graphics, Inc."; + + case GL_RENDERER: + sprintf( buffer, "Mesa DRI R200 " R200_DATE); + + /* Append any chipset-specific information. None yet. + */ + + /* Append any AGP-specific information. + */ + switch ( rmesa->r200Screen->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 ( _mesa_x86_cpu_features ) { + strncat( buffer, " x86", 4 ); + } +#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_SSE_ASM + if ( cpu_has_xmm ) { + strncat( buffer, "/SSE", 4 ); + } +#endif +#endif + + if ( !(rmesa->TclFallback & R200_TCL_FALLBACK_TCL_DISABLE) ) { + strncat( buffer, " TCL", 4 ); + } + else { + strncat( buffer, " NO-TCL", 7 ); + } + + return (GLubyte *)buffer; + + default: + return NULL; + } +} + + + +/* Initialize the extensions supported by this driver. + */ +static void r200InitExtensions( GLcontext *ctx ) +{ + _mesa_enable_imaging_extensions( ctx ); + + _mesa_enable_extension( ctx, "GL_ARB_multitexture" ); + _mesa_enable_extension( ctx, "GL_ARB_texture_env_add" ); + _mesa_enable_extension( ctx, "GL_ARB_texture_env_combine" ); + _mesa_enable_extension( ctx, "GL_ARB_texture_env_dot3" ); + + _mesa_enable_extension( ctx, "GL_EXT_blend_logic_op" ); + _mesa_enable_extension( ctx, "GL_EXT_stencil_wrap" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_env_add" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_env_combine" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_env_dot3" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_filter_anisotropic" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_lod_bias" ); + _mesa_enable_extension( ctx, "GL_EXT_secondary_color" ); + _mesa_enable_extension( ctx, "GL_EXT_blend_subtract" ); + _mesa_enable_extension( ctx, "GL_EXT_blend_minmax" ); + +/* _mesa_enable_extension( ctx, "GL_EXT_fog_coord" ); */ + + _mesa_enable_extension( ctx, "GL_MESA_pack_invert" ); + _mesa_enable_extension( ctx, "GL_MESA_ycbcr_texture" ); + _mesa_enable_extension( ctx, "GL_NV_texture_rectangle" ); + +} + +extern const struct gl_pipeline_stage _r200_render_stage; +extern const struct gl_pipeline_stage _r200_tcl_stage; + +static const struct gl_pipeline_stage *r200_pipeline[] = { + + /* Try and go straight to t&l + */ + &_r200_tcl_stage, + + /* Catch any t&l fallbacks + */ + &_tnl_vertex_transform_stage, + &_tnl_normal_transform_stage, + &_tnl_lighting_stage, + &_tnl_fog_coordinate_stage, + &_tnl_texgen_stage, + &_tnl_texture_transform_stage, + + /* Try again to go to tcl? + * - no good for asymmetric-twoside (do with multipass) + * - no good for asymmetric-unfilled (do with multipass) + * - good for material + * - good for texgen + * - need to manipulate a bit of state + * + * - worth it/not worth it? + */ + + /* Else do them here. + */ + &_r200_render_stage, + &_tnl_render_stage, /* FALLBACK: */ + 0, +}; + + + +/* Initialize the driver's misc functions. + */ +static void r200InitDriverFuncs( GLcontext *ctx ) +{ + ctx->Driver.GetBufferSize = r200GetBufferSize; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; + ctx->Driver.GetString = r200GetString; + + ctx->Driver.Error = NULL; + ctx->Driver.DrawPixels = NULL; + ctx->Driver.Bitmap = NULL; +} + +static void add_debug_flags( const char *debug ) +{ + if (strstr(debug, "fall")) + R200_DEBUG |= DEBUG_FALLBACKS; + + if (strstr(debug, "tex")) + R200_DEBUG |= DEBUG_TEXTURE; + + if (strstr(debug, "ioctl")) + R200_DEBUG |= DEBUG_IOCTL; + + if (strstr(debug, "prim")) + R200_DEBUG |= DEBUG_PRIMS; + + if (strstr(debug, "vert")) + R200_DEBUG |= DEBUG_VERTS; + + if (strstr(debug, "state")) + R200_DEBUG |= DEBUG_STATE; + + if (strstr(debug, "code")) + R200_DEBUG |= DEBUG_CODEGEN; + + if (strstr(debug, "vfmt") || strstr(debug, "vtxf")) + R200_DEBUG |= DEBUG_VFMT; + + if (strstr(debug, "verb")) + R200_DEBUG |= DEBUG_VERBOSE; + + if (strstr(debug, "dri")) + R200_DEBUG |= DEBUG_DRI; + + if (strstr(debug, "dma")) + R200_DEBUG |= DEBUG_DMA; + + if (strstr(debug, "san")) + R200_DEBUG |= DEBUG_SANITY; + + if (strstr(debug, "sync")) + R200_DEBUG |= DEBUG_SYNC; + + if (strstr(debug, "pix")) + R200_DEBUG |= DEBUG_PIXEL; +} + +/* Create the device specific context. + */ +GLboolean r200CreateContext( Display *dpy, const __GLcontextModes *glVisual, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate) +{ + __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + r200ScreenPtr r200Screen = (r200ScreenPtr)(sPriv->private); + r200ContextPtr rmesa; + GLcontext *ctx, *shareCtx; + int i; + + assert(dpy); + assert(glVisual); + assert(driContextPriv); + assert(r200Screen); + + /* Allocate the R200 context */ + rmesa = (r200ContextPtr) CALLOC( sizeof(*rmesa) ); + if ( !rmesa ) + return GL_FALSE; + + /* Allocate the Mesa context */ + if (sharedContextPrivate) + shareCtx = ((r200ContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + rmesa->glCtx = _mesa_create_context(glVisual, shareCtx, rmesa, GL_TRUE); + if (!rmesa->glCtx) { + FREE(rmesa); + return GL_FALSE; + } + driContextPriv->driverPrivate = rmesa; + + /* Init r200 context data */ + rmesa->dri.display = dpy; + rmesa->dri.context = driContextPriv; + rmesa->dri.screen = sPriv; + rmesa->dri.drawable = NULL; /* Set by XMesaMakeCurrent */ + rmesa->dri.hwContext = driContextPriv->hHWContext; + rmesa->dri.hwLock = &sPriv->pSAREA->lock; + rmesa->dri.fd = sPriv->fd; + rmesa->dri.drmMinor = sPriv->drmMinor; + + rmesa->r200Screen = r200Screen; + rmesa->sarea = (RADEONSAREAPrivPtr)((GLubyte *)sPriv->pSAREA + + r200Screen->sarea_priv_offset); + + + rmesa->dma.buf0_address = rmesa->r200Screen->buffers->list[0].address; + + for ( i = 0 ; i < r200Screen->numTexHeaps ; i++ ) { + make_empty_list( &rmesa->texture.objects[i] ); + rmesa->texture.heap[i] = mmInit( 0, r200Screen->texSize[i] ); + rmesa->texture.age[i] = -1; + } + rmesa->texture.numHeaps = r200Screen->numTexHeaps; + make_empty_list( &rmesa->texture.swapped ); + + rmesa->swtcl.RenderIndex = ~0; + rmesa->lost_context = 1; + + /* 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. + * Test for 2 textures * 4 bytes/texel * size * size. + */ + ctx = rmesa->glCtx; + if (r200Screen->texSize[RADEON_CARD_HEAP] >= 2 * 4 * 2048 * 2048) { + ctx->Const.MaxTextureLevels = 12; /* 2048x2048 */ + } + else if (r200Screen->texSize[RADEON_CARD_HEAP] >= 2 * 4 * 1024 * 1024) { + ctx->Const.MaxTextureLevels = 11; /* 1024x1024 */ + } + else if (r200Screen->texSize[RADEON_CARD_HEAP] >= 2 * 4 * 512 * 512) { + ctx->Const.MaxTextureLevels = 10; /* 512x512 */ + } + else { + ctx->Const.MaxTextureLevels = 9; /* 256x256 */ + } + + ctx->Const.MaxTextureUnits = 2; + ctx->Const.MaxTextureMaxAnisotropy = 16.0; + + /* No wide points. + */ + ctx->Const.MinPointSize = 1.0; + ctx->Const.MinPointSizeAA = 1.0; + ctx->Const.MaxPointSize = 1.0; + ctx->Const.MaxPointSizeAA = 1.0; + + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 10.0; + ctx->Const.MaxLineWidthAA = 10.0; + ctx->Const.LineWidthGranularity = 0.0625; + + + /* Initialize the software rasterizer and helper modules. + */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); + _ae_create_context( ctx ); + + /* Install the customized pipeline: + */ + _tnl_destroy_pipeline( ctx ); + _tnl_install_pipeline( ctx, r200_pipeline ); + + /* Try and keep materials and vertices separate: + */ + _tnl_isolate_materials( ctx, GL_TRUE ); + + + /* Configure swrast to match hardware characteristics: + */ + _swrast_allow_pixel_fog( ctx, GL_FALSE ); + _swrast_allow_vertex_fog( ctx, GL_TRUE ); + + + _math_matrix_ctr( &rmesa->TexGenMatrix[0] ); + _math_matrix_ctr( &rmesa->TexGenMatrix[1] ); + _math_matrix_ctr( &rmesa->tmpmat ); + _math_matrix_set_identity( &rmesa->TexGenMatrix[0] ); + _math_matrix_set_identity( &rmesa->TexGenMatrix[1] ); + _math_matrix_set_identity( &rmesa->tmpmat ); + + r200InitExtensions( ctx ); + r200InitDriverFuncs( ctx ); + r200InitIoctlFuncs( ctx ); + r200InitStateFuncs( ctx ); + r200InitSpanFuncs( ctx ); + r200InitPixelFuncs( ctx ); + r200InitTextureFuncs( ctx ); + r200InitState( rmesa ); + r200InitSwtcl( ctx ); + + rmesa->iw.irq_seq = -1; + rmesa->irqsEmitted = 0; + rmesa->do_irqs = (rmesa->dri.drmMinor >= 6 && + !getenv("R200_NO_IRQS") && + rmesa->r200Screen->irq); + + if (!rmesa->do_irqs) + fprintf(stderr, + "IRQ's not enabled, falling back to busy waits: %d %d %d\n", + rmesa->dri.drmMinor, + !!getenv("R200_NO_IRQS"), + rmesa->r200Screen->irq); + + + rmesa->do_usleeps = !getenv("R200_NO_USLEEPS"); + rmesa->prefer_agp_client_texturing = + (getenv("R200_AGP_CLIENT_TEXTURES") != 0); + + +#if DO_DEBUG + if (getenv("R200_DEBUG")) + add_debug_flags( getenv("R200_DEBUG") ); + if (getenv("RADEON_DEBUG")) + add_debug_flags( getenv("RADEON_DEBUG") ); +#endif + + if (getenv("R200_NO_RAST")) { + fprintf(stderr, "disabling 3D acceleration\n"); + FALLBACK(rmesa, R200_FALLBACK_DISABLE, 1); + } + else if (getenv("R200_NO_TCL")) { + fprintf(stderr, "disabling TCL support\n"); + TCL_FALLBACK(rmesa->glCtx, R200_TCL_FALLBACK_TCL_DISABLE, 1); + } + else { + if (!getenv("R200_NO_VTXFMT")) { + r200VtxfmtInit( ctx ); + } + _tnl_need_dlist_norm_lengths( ctx, GL_FALSE ); + } + return GL_TRUE; +} + + +/* Destroy the device specific context. + */ +/* Destroy the Mesa and driver specific context data. + */ +void r200DestroyContext( __DRIcontextPrivate *driContextPriv ) +{ + GET_CURRENT_CONTEXT(ctx); + r200ContextPtr rmesa = (r200ContextPtr) driContextPriv->driverPrivate; + r200ContextPtr current = ctx ? R200_CONTEXT(ctx) : NULL; + + /* check if we're deleting the currently bound context */ + if (rmesa == current) { + R200_FIREVERTICES( rmesa ); + _mesa_make_current2(NULL, NULL, NULL); + } + + /* Free r200 context resources */ + assert(rmesa); /* should never be null */ + if ( rmesa ) { + if (rmesa->glCtx->Shared->RefCount == 1) { + /* This share group is about to go away, free our private + * texture object data. + */ + r200TexObjPtr t, next_t; + int i; + + for ( i = 0 ; i < rmesa->texture.numHeaps ; i++ ) { + foreach_s ( t, next_t, &rmesa->texture.objects[i] ) { + r200DestroyTexObj( rmesa, t ); + } + mmDestroy( rmesa->texture.heap[i] ); + rmesa->texture.heap[i] = NULL; + } + + foreach_s ( t, next_t, &rmesa->texture.swapped ) { + r200DestroyTexObj( rmesa, t ); + } + } + + _swsetup_DestroyContext( rmesa->glCtx ); + _tnl_DestroyContext( rmesa->glCtx ); + _ac_DestroyContext( rmesa->glCtx ); + _swrast_DestroyContext( rmesa->glCtx ); + + r200DestroySwtcl( rmesa->glCtx ); + + r200ReleaseArrays( rmesa->glCtx, ~0 ); + + if (rmesa->dma.current.buf) { + r200ReleaseDmaRegion( rmesa, &rmesa->dma.current, __FUNCTION__ ); + r200FlushCmdBuf( rmesa, __FUNCTION__ ); + } + + if (!rmesa->TclFallback & R200_TCL_FALLBACK_TCL_DISABLE) + if (!getenv("R200_NO_VTXFMT")) + r200VtxfmtDestroy( rmesa->glCtx ); + + /* free the Mesa context */ + rmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context( rmesa->glCtx ); + + if (rmesa->state.scissor.pClipRects) { + FREE(rmesa->state.scissor.pClipRects); + rmesa->state.scissor.pClipRects = 0; + } + + FREE( rmesa ); + } +} + + + + +void +r200SwapBuffers(Display *dpy, void *drawablePrivate) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + (void) dpy; + + if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { + r200ContextPtr rmesa; + GLcontext *ctx; + rmesa = (r200ContextPtr) dPriv->driContextPriv->driverPrivate; + ctx = rmesa->glCtx; + if (ctx->Visual.doubleBufferMode) { + _mesa_swapbuffers( ctx ); /* flush pending rendering comands */ + + if ( rmesa->doPageFlip ) { + r200PageFlip( dPriv ); + } + else { + r200CopyBuffer( dPriv ); + } + } + } + else { + /* XXX this shouldn't be an error but we can't handle it for now */ + _mesa_problem(NULL, "r200SwapBuffers: drawable has no context!\n"); + } +} + + +/* Force the context `c' to be the current context and associate with it + * buffer `b'. + */ +GLboolean +r200MakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ) +{ + if ( driContextPriv ) { + r200ContextPtr newR200Ctx = + (r200ContextPtr) driContextPriv->driverPrivate; + + if (R200_DEBUG & DEBUG_DRI) + fprintf(stderr, "%s ctx %p\n", __FUNCTION__, newR200Ctx->glCtx); + + if ( newR200Ctx->dri.drawable != driDrawPriv ) { + newR200Ctx->dri.drawable = driDrawPriv; + r200UpdateWindow( newR200Ctx->glCtx ); + r200UpdateViewportOffset( newR200Ctx->glCtx ); + } + + _mesa_make_current2( newR200Ctx->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate ); + + if ( !newR200Ctx->glCtx->Viewport.Width ) { + _mesa_set_viewport( newR200Ctx->glCtx, 0, 0, + driDrawPriv->w, driDrawPriv->h ); + } + + if (newR200Ctx->vb.enabled) + r200VtxfmtMakeCurrent( newR200Ctx->glCtx ); + + _mesa_update_state( newR200Ctx->glCtx ); + r200ValidateState( newR200Ctx->glCtx ); + + } else { + if (R200_DEBUG & DEBUG_DRI) + fprintf(stderr, "%s ctx is null\n", __FUNCTION__); + _mesa_make_current( 0, 0 ); + } + + if (R200_DEBUG & DEBUG_DRI) + fprintf(stderr, "End %s\n", __FUNCTION__); + return GL_TRUE; +} + +/* Force the context `c' to be unbound from its buffer. + */ +GLboolean +r200UnbindContext( __DRIcontextPrivate *driContextPriv ) +{ + r200ContextPtr rmesa = (r200ContextPtr) driContextPriv->driverPrivate; + + if (R200_DEBUG & DEBUG_DRI) + fprintf(stderr, "%s ctx %p\n", __FUNCTION__, rmesa->glCtx); + + r200VtxfmtUnbindContext( rmesa->glCtx ); + return GL_TRUE; +} + + + + + + Index: xc/lib/GL/mesa/src/drv/r200/r200_context.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_context.h:1.2 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_context.h Mon Dec 16 11:18:54 2002 @@ -0,0 +1,925 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_context.h,v 1.2 2002/12/16 16:18:54 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_CONTEXT_H__ +#define __R200_CONTEXT_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include +#include "dri_util.h" +#include "xf86drm.h" +#include "radeon_common.h" + +#include "macros.h" +#include "mtypes.h" +#include "r200_reg.h" + +struct r200_context; +typedef struct r200_context r200ContextRec; +typedef struct r200_context *r200ContextPtr; + +#include "r200_lock.h" +#include "r200_screen.h" +#include "mm.h" + +/* Flags for software fallback cases */ +/* See correponding strings in r200_swtcl.c */ +#define R200_FALLBACK_TEXTURE 0x1 +#define R200_FALLBACK_DRAW_BUFFER 0x2 +#define R200_FALLBACK_STENCIL 0x4 +#define R200_FALLBACK_RENDER_MODE 0x8 +#define R200_FALLBACK_BLEND_EQ 0x10 +#define R200_FALLBACK_BLEND_FUNC 0x20 +#define R200_FALLBACK_DISABLE 0x40 + +/* Use the templated vertex format: + */ +#define COLOR_IS_RGBA +#define TAG(x) r200##x +#include "tnl_dd/t_dd_vertex.h" +#undef TAG + +typedef void (*r200_tri_func)( r200ContextPtr, + r200Vertex *, + r200Vertex *, + r200Vertex * ); + +typedef void (*r200_line_func)( r200ContextPtr, + r200Vertex *, + r200Vertex * ); + +typedef void (*r200_point_func)( r200ContextPtr, + r200Vertex * ); + + +struct r200_colorbuffer_state { + GLuint clear; + GLint drawOffset, drawPitch; +}; + + +struct r200_depthbuffer_state { + GLfloat scale; +}; + +struct r200_pixel_state { + GLint readOffset, readPitch; +}; + +struct r200_scissor_state { + XF86DRIClipRectRec rect; + GLboolean enabled; + + GLuint numClipRects; /* Cliprects active */ + GLuint numAllocedClipRects; /* Cliprects available */ + XF86DRIClipRectPtr pClipRects; +}; + +struct r200_stencilbuffer_state { + GLboolean hwBuffer; + GLuint clear; /* rb3d_stencilrefmask value */ +}; + +struct r200_stipple_state { + GLuint mask[32]; +}; + + + +#define TEX_0 0x1 +#define TEX_1 0x2 +#define TEX_ALL 0x3 + +typedef struct r200_tex_obj r200TexObj, *r200TexObjPtr; + +/* Texture object in locally shared texture space. + */ +struct r200_tex_obj { + r200TexObjPtr 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 */ + + GLuint dirty_state; /* Flags (1 per texunit) for + whether or not this texobj + has dirty hardware state + (pp_*) that needs to be + brought into the + texunit. */ + + 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_txsize; /* npot only */ + GLuint pp_txpitch; /* npot only */ + GLuint pp_border_color; + + /* texObj->Image[firstLevel] through texObj->Image[lastLevel] are the + * images to upload. + */ + GLint firstLevel; + GLint lastLevel; +}; + + +struct r200_texture_env_state { + r200TexObjPtr texobj; + GLenum format; + GLenum envMode; +}; + +#define R200_MAX_TEXTURE_UNITS 3 + +struct r200_texture_state { + struct r200_texture_env_state unit[R200_MAX_TEXTURE_UNITS]; +}; + + +struct r200_state_atom { + struct r200_state_atom *next, *prev; + const char *name; /* for debug */ + int cmd_size; /* size in bytes */ + GLuint idx; + int *cmd; /* one or more cmd's */ + int *lastcmd; /* one or more cmd's */ + GLboolean (*check)( GLcontext *, int ); /* is this state active? */ +}; + + + +/* Trying to keep these relatively short as the variables are becoming + * extravagently long. Drop the R200_ off the front of everything - + * I think we know we're in the r200 driver by now, and keep the + * prefix to 3 letters unless absolutely impossible. + */ + +#define CTX_CMD_0 0 +#define CTX_PP_MISC 1 +#define CTX_PP_FOG_COLOR 2 +#define CTX_RE_SOLID_COLOR 3 +#define CTX_RB3D_BLENDCNTL 4 +#define CTX_RB3D_DEPTHOFFSET 5 +#define CTX_RB3D_DEPTHPITCH 6 +#define CTX_RB3D_ZSTENCILCNTL 7 +#define CTX_CMD_1 8 +#define CTX_PP_CNTL 9 +#define CTX_RB3D_CNTL 10 +#define CTX_RB3D_COLOROFFSET 11 +#define CTX_CMD_2 12 /* why */ +#define CTX_RB3D_COLORPITCH 13 /* why */ +#define CTX_STATE_SIZE 14 + +#define SET_CMD_0 0 +#define SET_SE_CNTL 1 +#define SET_RE_CNTL 2 /* replace se_coord_fmt */ +#define SET_STATE_SIZE 3 + +#define VTE_CMD_0 0 +#define VTE_SE_VTE_CNTL 1 +#define VTE_STATE_SIZE 2 + +#define LIN_CMD_0 0 +#define LIN_RE_LINE_PATTERN 1 +#define LIN_RE_LINE_STATE 2 +#define LIN_CMD_1 3 +#define LIN_SE_LINE_WIDTH 4 +#define LIN_STATE_SIZE 5 + +#define MSK_CMD_0 0 +#define MSK_RB3D_STENCILREFMASK 1 +#define MSK_RB3D_ROPCNTL 2 +#define MSK_RB3D_PLANEMASK 3 +#define MSK_STATE_SIZE 4 + +#define VPT_CMD_0 0 +#define VPT_SE_VPORT_XSCALE 1 +#define VPT_SE_VPORT_XOFFSET 2 +#define VPT_SE_VPORT_YSCALE 3 +#define VPT_SE_VPORT_YOFFSET 4 +#define VPT_SE_VPORT_ZSCALE 5 +#define VPT_SE_VPORT_ZOFFSET 6 +#define VPT_STATE_SIZE 7 + +#define ZBS_CMD_0 0 +#define ZBS_SE_ZBIAS_FACTOR 1 +#define ZBS_SE_ZBIAS_CONSTANT 2 +#define ZBS_STATE_SIZE 3 + +#define MSC_CMD_0 0 +#define MSC_RE_MISC 1 +#define MSC_STATE_SIZE 2 + +#define TAM_CMD_0 0 +#define TAM_DEBUG3 1 +#define TAM_STATE_SIZE 2 + +#define TEX_CMD_0 0 +#define TEX_PP_TXFILTER 1 +#define TEX_PP_TXFORMAT 2 +#define TEX_PP_TXFORMAT_X 3 +#define TEX_PP_TXSIZE 4 +#define TEX_PP_TXPITCH 5 +#define TEX_PP_BORDER_COLOR 6 +#define TEX_CMD_1 7 +#define TEX_PP_TXOFFSET 8 +#define TEX_STATE_SIZE 9 + +#define PIX_CMD_0 0 +#define PIX_PP_TXCBLEND 1 +#define PIX_PP_TXCBLEND2 2 +#define PIX_PP_TXABLEND 3 +#define PIX_PP_TXABLEND2 4 +#define PIX_STATE_SIZE 5 + +#define TF_CMD_0 0 +#define TF_TFACTOR_0 1 +#define TF_TFACTOR_1 2 +#define TF_TFACTOR_2 3 +#define TF_TFACTOR_3 4 +#define TF_TFACTOR_4 5 +#define TF_TFACTOR_5 6 +#define TF_STATE_SIZE 7 + +#define TCL_CMD_0 0 +#define TCL_LIGHT_MODEL_CTL_0 1 +#define TCL_LIGHT_MODEL_CTL_1 2 +#define TCL_PER_LIGHT_CTL_0 3 +#define TCL_PER_LIGHT_CTL_1 4 +#define TCL_PER_LIGHT_CTL_2 5 +#define TCL_PER_LIGHT_CTL_3 6 +#define TCL_CMD_1 7 +#define TCL_UCP_VERT_BLEND_CTL 8 +#define TCL_STATE_SIZE 9 + +#define MSL_CMD_0 0 +#define MSL_MATRIX_SELECT_0 1 +#define MSL_MATRIX_SELECT_1 2 +#define MSL_MATRIX_SELECT_2 3 +#define MSL_MATRIX_SELECT_3 4 +#define MSL_MATRIX_SELECT_4 5 +#define MSL_STATE_SIZE 6 + +#define TCG_CMD_0 0 +#define TCG_TEX_PROC_CTL_2 1 +#define TCG_TEX_PROC_CTL_3 2 +#define TCG_TEX_PROC_CTL_0 3 +#define TCG_TEX_PROC_CTL_1 4 +#define TCG_TEX_CYL_WRAP_CTL 5 +#define TCG_STATE_SIZE 6 + +#define MTL_CMD_0 0 +#define MTL_EMMISSIVE_RED 1 +#define MTL_EMMISSIVE_GREEN 2 +#define MTL_EMMISSIVE_BLUE 3 +#define MTL_EMMISSIVE_ALPHA 4 +#define MTL_AMBIENT_RED 5 +#define MTL_AMBIENT_GREEN 6 +#define MTL_AMBIENT_BLUE 7 +#define MTL_AMBIENT_ALPHA 8 +#define MTL_DIFFUSE_RED 9 +#define MTL_DIFFUSE_GREEN 10 +#define MTL_DIFFUSE_BLUE 11 +#define MTL_DIFFUSE_ALPHA 12 +#define MTL_SPECULAR_RED 13 +#define MTL_SPECULAR_GREEN 14 +#define MTL_SPECULAR_BLUE 15 +#define MTL_SPECULAR_ALPHA 16 +#define MTL_CMD_1 17 +#define MTL_SHININESS 18 +#define MTL_STATE_SIZE 19 + +#define VAP_CMD_0 0 +#define VAP_SE_VAP_CNTL 1 +#define VAP_STATE_SIZE 2 + +/* Replaces a lot of packet info from radeon + */ +#define VTX_CMD_0 0 +#define VTX_VTXFMT_0 1 +#define VTX_VTXFMT_1 2 +#define VTX_TCL_OUTPUT_VTXFMT_0 3 +#define VTX_TCL_OUTPUT_VTXFMT_1 4 +#define VTX_CMD_1 5 +#define VTX_TCL_OUTPUT_COMPSEL 6 +#define VTX_CMD_2 7 +#define VTX_STATE_CNTL 8 +#define VTX_STATE_SIZE 9 + + +#define VTX_COLOR(v,n) (((v)>>(R200_VTX_COLOR_0_SHIFT+(n)*2))&\ + R200_VTX_COLOR_MASK) + +#define MAT_CMD_0 0 +#define MAT_ELT_0 1 +#define MAT_STATE_SIZE 17 + +#define GRD_CMD_0 0 +#define GRD_VERT_GUARD_CLIP_ADJ 1 +#define GRD_VERT_GUARD_DISCARD_ADJ 2 +#define GRD_HORZ_GUARD_CLIP_ADJ 3 +#define GRD_HORZ_GUARD_DISCARD_ADJ 4 +#define GRD_STATE_SIZE 5 + +/* position changes frequently when lighting in modelpos - separate + * out to new state item? + */ +#define LIT_CMD_0 0 +#define LIT_AMBIENT_RED 1 +#define LIT_AMBIENT_GREEN 2 +#define LIT_AMBIENT_BLUE 3 +#define LIT_AMBIENT_ALPHA 4 +#define LIT_DIFFUSE_RED 5 +#define LIT_DIFFUSE_GREEN 6 +#define LIT_DIFFUSE_BLUE 7 +#define LIT_DIFFUSE_ALPHA 8 +#define LIT_SPECULAR_RED 9 +#define LIT_SPECULAR_GREEN 10 +#define LIT_SPECULAR_BLUE 11 +#define LIT_SPECULAR_ALPHA 12 +#define LIT_POSITION_X 13 +#define LIT_POSITION_Y 14 +#define LIT_POSITION_Z 15 +#define LIT_POSITION_W 16 +#define LIT_DIRECTION_X 17 +#define LIT_DIRECTION_Y 18 +#define LIT_DIRECTION_Z 19 +#define LIT_DIRECTION_W 20 +#define LIT_ATTEN_CONST 21 +#define LIT_ATTEN_LINEAR 22 +#define LIT_ATTEN_QUADRATIC 23 +#define LIT_ATTEN_XXX 24 +#define LIT_CMD_1 25 +#define LIT_SPOT_DCD 26 +#define LIT_SPOT_DCM 27 +#define LIT_SPOT_EXPONENT 28 +#define LIT_SPOT_CUTOFF 29 +#define LIT_SPECULAR_THRESH 30 +#define LIT_RANGE_CUTOFF 31 /* ? */ +#define LIT_RANGE_ATTEN 32 /* ? */ +#define LIT_STATE_SIZE 33 + +/* Fog + */ +#define FOG_CMD_0 0 +#define FOG_R 1 +#define FOG_C 2 +#define FOG_D 3 +#define FOG_PAD 4 +#define FOG_STATE_SIZE 5 + +/* UCP + */ +#define UCP_CMD_0 0 +#define UCP_X 1 +#define UCP_Y 2 +#define UCP_Z 3 +#define UCP_W 4 +#define UCP_STATE_SIZE 5 + +/* GLT - Global ambient + */ +#define GLT_CMD_0 0 +#define GLT_RED 1 +#define GLT_GREEN 2 +#define GLT_BLUE 3 +#define GLT_ALPHA 4 +#define GLT_STATE_SIZE 5 + +/* EYE + */ +#define EYE_CMD_0 0 +#define EYE_X 1 +#define EYE_Y 2 +#define EYE_Z 3 +#define EYE_RESCALE_FACTOR 4 +#define EYE_STATE_SIZE 5 + +/* CST - constant state + */ +#define CST_CMD_0 0 +#define CST_PP_CNTL_X 1 +#define CST_CMD_1 2 +#define CST_RB3D_DEPTHXY_OFFSET 3 +#define CST_CMD_2 4 +#define CST_RE_AUX_SCISSOR_CNTL 5 +#define CST_CMD_3 6 +#define CST_RE_SCISSOR_TL_0 7 +#define CST_RE_SCISSOR_BR_0 8 +#define CST_CMD_4 9 +#define CST_SE_VAP_CNTL_STATUS 10 +#define CST_CMD_5 11 +#define CST_RE_POINTSIZE 12 +#define CST_CMD_6 13 +#define CST_SE_TCL_INPUT_VTX_0 14 +#define CST_SE_TCL_INPUT_VTX_1 15 +#define CST_SE_TCL_INPUT_VTX_2 16 +#define CST_SE_TCL_INPUT_VTX_3 17 +#define CST_STATE_SIZE 18 + + + + +struct r200_hw_state { + /* All state should be on one of these lists: + */ + struct r200_state_atom dirty; /* dirty list head placeholder */ + struct r200_state_atom clean; /* clean list head placeholder */ + + /* Hardware state, stored as cmdbuf commands: + * -- Need to doublebuffer for + * - reviving state after loss of context + * - eliding noop statechange loops? (except line stipple count) + */ + struct r200_state_atom ctx; + struct r200_state_atom set; + struct r200_state_atom vte; + struct r200_state_atom lin; + struct r200_state_atom msk; + struct r200_state_atom vpt; + struct r200_state_atom vap; + struct r200_state_atom vtx; + struct r200_state_atom tcl; + struct r200_state_atom msl; + struct r200_state_atom tcg; + struct r200_state_atom msc; + struct r200_state_atom cst; + struct r200_state_atom tam; + struct r200_state_atom tf; + struct r200_state_atom tex[2]; + struct r200_state_atom zbs; + struct r200_state_atom mtl[2]; + struct r200_state_atom mat[5]; + struct r200_state_atom lit[8]; /* includes vec, scl commands */ + struct r200_state_atom ucp[6]; + struct r200_state_atom pix[6]; /* pixshader stages */ + struct r200_state_atom eye; /* eye pos */ + struct r200_state_atom grd; /* guard band clipping */ + struct r200_state_atom fog; + struct r200_state_atom glt; +}; + +struct r200_state { + /* Derived state for internal purposes: + */ + struct r200_colorbuffer_state color; + struct r200_depthbuffer_state depth; + struct r200_pixel_state pixel; + struct r200_scissor_state scissor; + struct r200_stencilbuffer_state stencil; + struct r200_stipple_state stipple; + struct r200_texture_state texture; +}; + +struct r200_texture { + r200TexObj objects[R200_NR_TEX_HEAPS]; + r200TexObj swapped; + + memHeap_t *heap[R200_NR_TEX_HEAPS]; + GLint age[R200_NR_TEX_HEAPS]; + + GLint numHeaps; +}; + +/* Need refcounting on dma buffers: + */ +struct r200_dma_buffer { + int refcount; /* the number of retained regions in buf */ + drmBufPtr buf; +}; + +#define GET_START(rvb) (rmesa->r200Screen->agp_buffer_offset + \ + (rvb)->address - rmesa->dma.buf0_address + \ + (rvb)->start) + +/* A retained region, eg vertices for indexed vertices. + */ +struct r200_dma_region { + struct r200_dma_buffer *buf; + char *address; /* == buf->address */ + int start, end, ptr; /* offsets from start of buf */ + int aos_start; + int aos_stride; + int aos_size; +}; + + +struct r200_dma { + /* Active dma region. Allocations for vertices and retained + * regions come from here. Also used for emitting random vertices, + * these may be flushed by calling flush_current(); + */ + struct r200_dma_region current; + + void (*flush)( r200ContextPtr ); + + char *buf0_address; /* start of buf[0], for index calcs */ + GLuint nr_released_bufs; /* flush after so many buffers released */ +}; + +struct r200_dri_mirror { + Display *display; /* X server display */ + + __DRIcontextPrivate *context; /* DRI context */ + __DRIscreenPrivate *screen; /* DRI screen */ + __DRIdrawablePrivate *drawable; /* DRI drawable bound to this ctx */ + + drmContext hwContext; + drmLock *hwLock; + int fd; + int drmMinor; +}; + + +#define R200_CMD_BUF_SZ (8*1024) + +struct r200_store { + GLuint statenr; + GLuint primnr; + char cmd_buf[R200_CMD_BUF_SZ]; + int cmd_used; + int elts_start; +}; + + +/* r200_tcl.c + */ +struct r200_tcl_info { + GLuint vertex_format; + GLint last_offset; + GLuint hw_primitive; + + struct r200_dma_region *aos_components[8]; + GLuint nr_aos_components; + + GLuint *Elts; + + struct r200_dma_region indexed_verts; + struct r200_dma_region obj; + struct r200_dma_region rgba; + struct r200_dma_region spec; + struct r200_dma_region fog; + struct r200_dma_region tex[R200_MAX_TEXTURE_UNITS]; + struct r200_dma_region norm; +}; + + +/* r200_swtcl.c + */ +struct r200_swtcl_info { + GLuint SetupIndex; + GLuint SetupNewInputs; + GLuint RenderIndex; + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; + char *verts; + + /* Fallback rasterization functions + */ + r200_point_func draw_point; + r200_line_func draw_line; + r200_tri_func draw_tri; + + GLuint hw_primitive; + GLenum render_primitive; + GLuint numverts; + + struct r200_dma_region indexed_verts; +}; + + +struct r200_ioctl { + GLuint vertex_offset; + GLuint vertex_size; +}; + + + +#define R200_MAX_PRIMS 64 + + +/* Want to keep a cache of these around. Each is parameterized by + * only a single value which has only a small range. Only expect a + * few, so just rescan the list each time? + */ +struct dynfn { + struct dynfn *next, *prev; + int key[2]; + char *code; +}; + +struct dfn_lists { + struct dynfn Vertex2f; + struct dynfn Vertex2fv; + struct dynfn Vertex3f; + struct dynfn Vertex3fv; + struct dynfn Color4ub; + struct dynfn Color4ubv; + struct dynfn Color3ub; + struct dynfn Color3ubv; + struct dynfn Color4f; + struct dynfn Color4fv; + struct dynfn Color3f; + struct dynfn Color3fv; + struct dynfn SecondaryColor3ubEXT; + struct dynfn SecondaryColor3ubvEXT; + struct dynfn SecondaryColor3fEXT; + struct dynfn SecondaryColor3fvEXT; + struct dynfn Normal3f; + struct dynfn Normal3fv; + struct dynfn TexCoord2f; + struct dynfn TexCoord2fv; + struct dynfn TexCoord1f; + struct dynfn TexCoord1fv; + struct dynfn MultiTexCoord2fARB; + struct dynfn MultiTexCoord2fvARB; + struct dynfn MultiTexCoord1fARB; + struct dynfn MultiTexCoord1fvARB; +}; + +struct _vb; + +struct dfn_generators { + struct dynfn *(*Vertex2f)( GLcontext *, const int * ); + struct dynfn *(*Vertex2fv)( GLcontext *, const int * ); + struct dynfn *(*Vertex3f)( GLcontext *, const int * ); + struct dynfn *(*Vertex3fv)( GLcontext *, const int * ); + struct dynfn *(*Color4ub)( GLcontext *, const int * ); + struct dynfn *(*Color4ubv)( GLcontext *, const int * ); + struct dynfn *(*Color3ub)( GLcontext *, const int * ); + struct dynfn *(*Color3ubv)( GLcontext *, const int * ); + struct dynfn *(*Color4f)( GLcontext *, const int * ); + struct dynfn *(*Color4fv)( GLcontext *, const int * ); + struct dynfn *(*Color3f)( GLcontext *, const int * ); + struct dynfn *(*Color3fv)( GLcontext *, const int * ); + struct dynfn *(*SecondaryColor3ubEXT)( GLcontext *, const int * ); + struct dynfn *(*SecondaryColor3ubvEXT)( GLcontext *, const int * ); + struct dynfn *(*SecondaryColor3fEXT)( GLcontext *, const int * ); + struct dynfn *(*SecondaryColor3fvEXT)( GLcontext *, const int * ); + struct dynfn *(*Normal3f)( GLcontext *, const int * ); + struct dynfn *(*Normal3fv)( GLcontext *, const int * ); + struct dynfn *(*TexCoord2f)( GLcontext *, const int * ); + struct dynfn *(*TexCoord2fv)( GLcontext *, const int * ); + struct dynfn *(*TexCoord1f)( GLcontext *, const int * ); + struct dynfn *(*TexCoord1fv)( GLcontext *, const int * ); + struct dynfn *(*MultiTexCoord2fARB)( GLcontext *, const int * ); + struct dynfn *(*MultiTexCoord2fvARB)( GLcontext *, const int * ); + struct dynfn *(*MultiTexCoord1fARB)( GLcontext *, const int * ); + struct dynfn *(*MultiTexCoord1fvARB)( GLcontext *, const int * ); +}; + + +struct r200_vb { + /* Keep these first: referenced from codegen templates: + */ + GLint counter, initial_counter; + GLint *dmaptr; + void (*notify)( void ); + GLint vertex_size; + + /* A maximum total of 15 elements per vertex: 3 floats for position, 3 + * floats for normal, 4 floats for color, 4 bytes for secondary color, + * 2 floats for each texture unit (4 floats total). + * + * As soon as the 3rd TMU is supported or cube maps (or 3D textures) are + * supported, this value will grow. + * + * The position data is never actually stored here, so 3 elements could be + * trimmed out of the buffer. + */ + union { float f; int i; r200_color_t color; } vertex[15]; + + GLfloat *normalptr; + GLfloat *floatcolorptr; + r200_color_t *colorptr; + GLfloat *floatspecptr; + r200_color_t *specptr; + GLfloat *texcoordptr[2]; + + GLcontext *context; /* current context : Single thread only! */ +}; + +struct r200_prim { + GLuint start; + GLuint end; + GLuint prim; +}; + +struct r200_vbinfo { + GLenum *prim; /* &ctx->Driver.CurrentExecPrimitive */ + GLuint primflags; + GLboolean enabled; /* R200_NO_VTXFMT//R200_NO_TCL env vars */ + GLboolean installed; + GLboolean fell_back; + GLboolean recheck; + GLint initial_counter; + GLint nrverts; + GLuint vtxfmt_0, vtxfmt_1; + + GLuint installed_vertex_format; + GLuint installed_color_3f_sz; + + struct r200_prim primlist[R200_MAX_PRIMS]; + int nrprims; + + struct dfn_lists dfn_cache; + struct dfn_generators codegen; + GLvertexformat vtxfmt; +}; + + + + +struct r200_context { + GLcontext *glCtx; /* Mesa context */ + + /* Driver and hardware state management + */ + struct r200_hw_state hw; + struct r200_state state; + + /* Texture object bookkeeping + */ + struct r200_texture texture; + + + /* Rasterization and vertex state: + */ + GLuint TclFallback; + GLuint Fallback; + GLuint NewGLState; + + + /* Temporaries for translating away float colors: + */ + struct gl_client_array UbyteColor; + struct gl_client_array UbyteSecondaryColor; + + /* Vertex buffers + */ + struct r200_ioctl ioctl; + struct r200_dma dma; + struct r200_store store; + + /* Page flipping + */ + GLuint doPageFlip; + + /* Busy waiting + */ + GLuint do_usleeps; + GLuint do_irqs; + GLuint irqsEmitted; + drmRadeonIrqWait iw; + + /* Clientdata textures; + */ + GLuint prefer_agp_client_texturing; + + /* Drawable, cliprect and scissor information + */ + GLuint numClipRects; /* Cliprects for the draw buffer */ + XF86DRIClipRectPtr pClipRects; + unsigned int lastStamp; + GLboolean lost_context; + r200ScreenPtr r200Screen; /* Screen private DRI data */ + RADEONSAREAPrivPtr sarea; /* Private SAREA data */ + + /* TCL stuff + */ + GLmatrix TexGenMatrix[R200_MAX_TEXTURE_UNITS]; + GLboolean recheck_texgen[R200_MAX_TEXTURE_UNITS]; + GLboolean TexGenNeedNormals[R200_MAX_TEXTURE_UNITS]; + GLuint TexMatEnabled; + GLuint TexMatCompSel; + GLuint TexGenEnabled; + GLuint TexGenInputs; + GLuint TexGenCompSel; + GLmatrix tmpmat; + + /* VBI + */ + GLuint vbl_seq; + + /* r200_tcl.c + */ + struct r200_tcl_info tcl; + + /* r200_swtcl.c + */ + struct r200_swtcl_info swtcl; + + /* r200_vtxfmt.c + */ + struct r200_vbinfo vb; + + /* Mirrors of some DRI state + */ + struct r200_dri_mirror dri; +}; + +#define R200_CONTEXT(ctx) ((r200ContextPtr)(ctx->DriverCtx)) + + +static __inline GLuint r200PackColor( GLuint cpp, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) +{ + switch ( cpp ) { + case 2: + return PACK_COLOR_565( r, g, b ); + case 4: + return PACK_COLOR_8888( a, r, g, b ); + default: + return 0; + } +} + +#define R200_OLD_PACKETS 0 + + +extern void r200DestroyContext( __DRIcontextPrivate *driContextPriv ); +extern GLboolean r200CreateContext( Display *dpy, + const __GLcontextModes *glVisual, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate); +extern void r200SwapBuffers(Display *dpy, void *drawablePrivate); +extern GLboolean r200MakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ); +extern GLboolean r200UnbindContext( __DRIcontextPrivate *driContextPriv ); + +/* ================================================================ + * Debugging: + */ +#define DO_DEBUG 1 + +#if DO_DEBUG +extern int R200_DEBUG; +#else +#define R200_DEBUG 0 +#endif + +#define DEBUG_TEXTURE 0x001 +#define DEBUG_STATE 0x002 +#define DEBUG_IOCTL 0x004 +#define DEBUG_PRIMS 0x008 +#define DEBUG_VERTS 0x010 +#define DEBUG_FALLBACKS 0x020 +#define DEBUG_VFMT 0x040 +#define DEBUG_CODEGEN 0x080 +#define DEBUG_VERBOSE 0x100 +#define DEBUG_DRI 0x200 +#define DEBUG_DMA 0x400 +#define DEBUG_SANITY 0x800 +#define DEBUG_SYNC 0x1000 +#define DEBUG_PIXEL 0x2000 + +#endif +#endif /* __R200_CONTEXT_H__ */ Index: xc/lib/GL/mesa/src/drv/r200/r200_ioctl.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_ioctl.c:1.4 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_ioctl.c Mon Dec 16 19:32:56 2002 @@ -0,0 +1,922 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_ioctl.c,v 1.4 2002/12/17 00:32:56 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_state.h" +#include "r200_ioctl.h" +#include "r200_tcl.h" +#include "r200_sanity.h" +#include "radeon_reg.h" + +#include "mem.h" +#include "macros.h" +#include "context.h" +#include "swrast/swrast.h" + +#include /* for usleep */ + +#define R200_TIMEOUT 512 +#define R200_IDLE_RETRY 16 + + +static void do_usleep( int nr, const char *caller ) +{ + if (0) fprintf(stderr, "usleep %d in %s\n", nr, caller ); + if (1) usleep( nr ); +} + +static void r200WaitForIdle( r200ContextPtr rmesa ); + + +int r200FlushCmdBufLocked( r200ContextPtr rmesa, const char * caller ) +{ + int ret, i; + drmRadeonCmdBuffer cmd; + + if (R200_DEBUG & DEBUG_IOCTL) { + fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); + + if (0 & R200_DEBUG & DEBUG_VERBOSE) + for (i = 0 ; i < rmesa->store.cmd_used ; i += 4 ) + fprintf(stderr, "%d: %x\n", i/4, + *(int *)(&rmesa->store.cmd_buf[i])); + } + + if (R200_DEBUG & DEBUG_DMA) + fprintf(stderr, "%s: Releasing %d buffers\n", __FUNCTION__, + rmesa->dma.nr_released_bufs); + + + if (R200_DEBUG & DEBUG_SANITY) { + if (rmesa->state.scissor.enabled) + ret = r200SanityCmdBuffer( rmesa, + rmesa->state.scissor.numClipRects, + rmesa->state.scissor.pClipRects); + else + ret = r200SanityCmdBuffer( rmesa, + rmesa->numClipRects, + rmesa->pClipRects); + if (ret) { + fprintf(stderr, "drmSanityCommandWrite: %d\n", ret); + goto out; + } + } + + + cmd.bufsz = rmesa->store.cmd_used; + cmd.buf = rmesa->store.cmd_buf; + + if (rmesa->state.scissor.enabled) { + cmd.nbox = rmesa->state.scissor.numClipRects; + cmd.boxes = (drmClipRect *)rmesa->state.scissor.pClipRects; + } else { + cmd.nbox = rmesa->numClipRects; + cmd.boxes = (drmClipRect *)rmesa->pClipRects; + } + + ret = drmCommandWrite( rmesa->dri.fd, + DRM_RADEON_CMDBUF, + &cmd, sizeof(cmd) ); + + if (ret) + fprintf(stderr, "drmCommandWrite: %d\n", ret); + + if (R200_DEBUG & DEBUG_SYNC) { + fprintf(stderr, "\nSyncing in %s\n\n", __FUNCTION__); + r200WaitForIdleLocked( rmesa ); + } + + + out: + rmesa->store.primnr = 0; + rmesa->store.statenr = 0; + rmesa->store.cmd_used = 0; + rmesa->dma.nr_released_bufs = 0; +/* rmesa->lost_context = 0; */ + rmesa->lost_context = 1; + return ret; +} + + +/* Note: does not emit any commands to avoid recursion on + * r200AllocCmdBuf. + */ +void r200FlushCmdBuf( r200ContextPtr rmesa, const char *caller ) +{ + int ret; + + LOCK_HARDWARE( rmesa ); + + ret = r200FlushCmdBufLocked( rmesa, caller ); + + UNLOCK_HARDWARE( rmesa ); + + if (ret) { + fprintf(stderr, "drmRadeonCmdBuffer: %d\n", ret); + exit(ret); + } +} + + +/* ============================================================= + * Hardware vertex buffer handling + */ + + +void r200RefillCurrentDmaRegion( r200ContextPtr rmesa ) +{ + struct r200_dma_buffer *dmabuf; + int fd = rmesa->dri.fd; + int index = 0; + int size = 0; + drmDMAReq dma; + int ret; + + if (R200_DEBUG & (DEBUG_IOCTL|DEBUG_DMA)) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->dma.flush) { + rmesa->dma.flush( rmesa ); + } + + if (rmesa->dma.current.buf) + r200ReleaseDmaRegion( rmesa, &rmesa->dma.current, __FUNCTION__ ); + + if (rmesa->dma.nr_released_bufs > 4) + r200FlushCmdBuf( rmesa, __FUNCTION__ ); + + dma.context = rmesa->dri.hwContext; + 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; + + LOCK_HARDWARE(rmesa); /* no need to validate */ + + while (1) { + ret = drmDMA( fd, &dma ); + if (ret == 0) + break; + + if (rmesa->dma.nr_released_bufs) { + r200FlushCmdBufLocked( rmesa, __FUNCTION__ ); + } + + if (rmesa->do_usleeps) { + UNLOCK_HARDWARE( rmesa ); + do_usleep(1, __FUNCTION__); + LOCK_HARDWARE( rmesa ); + } + } + + UNLOCK_HARDWARE(rmesa); + + if (R200_DEBUG & DEBUG_DMA) + fprintf(stderr, "Allocated buffer %d\n", index); + + dmabuf = CALLOC_STRUCT( r200_dma_buffer ); + dmabuf->buf = &rmesa->r200Screen->buffers->list[index]; + dmabuf->refcount = 1; + + rmesa->dma.current.buf = dmabuf; + rmesa->dma.current.address = dmabuf->buf->address; + rmesa->dma.current.end = dmabuf->buf->total; + rmesa->dma.current.start = 0; + rmesa->dma.current.ptr = 0; +} + +void r200ReleaseDmaRegion( r200ContextPtr rmesa, + struct r200_dma_region *region, + const char *caller ) +{ + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); + + if (!region->buf) + return; + + if (rmesa->dma.flush) + rmesa->dma.flush( rmesa ); + + if (--region->buf->refcount == 0) { + drmRadeonCmdHeader *cmd; + + if (R200_DEBUG & (DEBUG_IOCTL|DEBUG_DMA)) + fprintf(stderr, "%s -- DISCARD BUF %d\n", __FUNCTION__, + region->buf->buf->idx); + + cmd = (drmRadeonCmdHeader *)r200AllocCmdBuf( rmesa, sizeof(*cmd), + __FUNCTION__ ); + cmd->dma.cmd_type = RADEON_CMD_DMA_DISCARD; + cmd->dma.buf_idx = region->buf->buf->idx; + FREE(region->buf); + rmesa->dma.nr_released_bufs++; + } + + region->buf = 0; + region->start = 0; +} + +/* Allocates a region from rmesa->dma.current. If there isn't enough + * space in current, grab a new buffer (and discard what was left of current) + */ +void r200AllocDmaRegion( r200ContextPtr rmesa, + struct r200_dma_region *region, + int bytes, + int alignment ) +{ + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s %d\n", __FUNCTION__, bytes); + + if (rmesa->dma.flush) + rmesa->dma.flush( rmesa ); + + if (region->buf) + r200ReleaseDmaRegion( rmesa, region, __FUNCTION__ ); + + alignment--; + rmesa->dma.current.start = rmesa->dma.current.ptr = + (rmesa->dma.current.ptr + alignment) & ~alignment; + + if ( rmesa->dma.current.ptr + bytes > rmesa->dma.current.end ) + r200RefillCurrentDmaRegion( rmesa ); + + region->start = rmesa->dma.current.start; + region->ptr = rmesa->dma.current.start; + region->end = rmesa->dma.current.start + bytes; + region->address = rmesa->dma.current.address; + region->buf = rmesa->dma.current.buf; + region->buf->refcount++; + + rmesa->dma.current.ptr += bytes; /* bug - if alignment > 7 */ + rmesa->dma.current.start = + rmesa->dma.current.ptr = (rmesa->dma.current.ptr + 0x7) & ~0x7; +} + +void r200AllocDmaRegionVerts( r200ContextPtr rmesa, + struct r200_dma_region *region, + int numverts, + int vertsize, + int alignment ) +{ + r200AllocDmaRegion( rmesa, region, vertsize * numverts, alignment ); +} + +/* ================================================================ + * SwapBuffers with client-side throttling + */ + +static CARD32 r200GetLastFrame(r200ContextPtr rmesa) +{ + drmRadeonGetParam gp; + int ret; + CARD32 frame; + + gp.param = RADEON_PARAM_LAST_FRAME; + gp.value = (int *)&frame; + ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_GETPARAM, + &gp, sizeof(gp) ); + if ( ret ) { + fprintf( stderr, "%s: drmRadeonGetParam: %d\n", __FUNCTION__, ret ); + exit(1); + } + + return frame; +} + +static void r200EmitIrqLocked( r200ContextPtr rmesa ) +{ + drmRadeonIrqEmit ie; + int ret; + + ie.irq_seq = &rmesa->iw.irq_seq; + ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_IRQ_EMIT, + &ie, sizeof(ie) ); + if ( ret ) { + fprintf( stderr, "%s: drmRadeonIrqEmit: %d\n", __FUNCTION__, ret ); + exit(1); + } +} + + +static void r200WaitIrq( r200ContextPtr rmesa ) +{ + int ret; + + do { + ret = drmCommandWrite( rmesa->dri.fd, DRM_RADEON_IRQ_WAIT, + &rmesa->iw, sizeof(rmesa->iw) ); + } while (ret && (errno == EINTR || errno == EAGAIN)); + + if ( ret ) { + fprintf( stderr, "%s: drmRadeonIrqWait: %d\n", __FUNCTION__, ret ); + exit(1); + } +} + + +static void r200WaitForFrameCompletion( r200ContextPtr rmesa ) +{ + RADEONSAREAPrivPtr sarea = rmesa->sarea; + + if (rmesa->do_irqs) { + if (r200GetLastFrame(rmesa) < sarea->last_frame) { + if (!rmesa->irqsEmitted) { + while (r200GetLastFrame (rmesa) < sarea->last_frame) + ; + } + else { + UNLOCK_HARDWARE( rmesa ); + r200WaitIrq( rmesa ); + LOCK_HARDWARE( rmesa ); + } + rmesa->irqsEmitted = 10; + } + + if (rmesa->irqsEmitted) { + r200EmitIrqLocked( rmesa ); + rmesa->irqsEmitted--; + } + } + else { + while (r200GetLastFrame (rmesa) < sarea->last_frame) { + UNLOCK_HARDWARE( rmesa ); + if (rmesa->do_usleeps) + do_usleep(1, __FUNCTION__); + LOCK_HARDWARE( rmesa ); + } + } +} + + + +/* Copy the back color buffer to the front color buffer. + */ +void r200CopyBuffer( const __DRIdrawablePrivate *dPriv ) +{ + r200ContextPtr rmesa; + GLint nbox, i, ret; + + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); + + rmesa = (r200ContextPtr) dPriv->driContextPriv->driverPrivate; + + if ( R200_DEBUG & DEBUG_IOCTL ) { + fprintf( stderr, "\n%s( %p )\n\n", __FUNCTION__, rmesa->glCtx ); + } + + R200_FIREVERTICES( rmesa ); + + LOCK_HARDWARE( rmesa ); + + + /* Throttle the frame rate -- only allow one pending swap buffers + * request at a time. + */ + r200WaitForFrameCompletion( rmesa ); + + r200WaitForVBlank( rmesa ); + + nbox = rmesa->dri.drawable->numClipRects; /* must be in locked region */ + + for ( i = 0 ; i < nbox ; ) { + GLint nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS , nbox ); + XF86DRIClipRectPtr box = rmesa->dri.drawable->pClipRects; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; + GLint n = 0; + + for ( ; i < nr ; i++ ) { + *b++ = box[i]; + n++; + } + rmesa->sarea->nbox = n; + + ret = drmCommandNone( rmesa->dri.fd, DRM_RADEON_SWAP ); + + if ( ret ) { + fprintf( stderr, "DRM_R200_SWAP_BUFFERS: return = %d\n", ret ); + UNLOCK_HARDWARE( rmesa ); + exit( 1 ); + } + } + + UNLOCK_HARDWARE( rmesa ); + rmesa->lost_context = 1; +} + +void r200PageFlip( const __DRIdrawablePrivate *dPriv ) +{ + r200ContextPtr rmesa; + GLint ret; + + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); + + rmesa = (r200ContextPtr) dPriv->driContextPriv->driverPrivate; + + if ( R200_DEBUG & DEBUG_IOCTL ) { + fprintf(stderr, "%s: pfCurrentPage: %d\n", __FUNCTION__, + rmesa->sarea->pfCurrentPage); + } + + R200_FIREVERTICES( rmesa ); + LOCK_HARDWARE( rmesa ); + + if (!rmesa->dri.drawable->numClipRects) { + UNLOCK_HARDWARE( rmesa ); + usleep( 10000 ); /* throttle invisible client 10ms */ + return; + } + + /* Need to do this for the perf box placement: + */ + { + XF86DRIClipRectPtr box = rmesa->dri.drawable->pClipRects; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; + b[0] = box[0]; + rmesa->sarea->nbox = 1; + } + + /* Throttle the frame rate -- only allow a few pending swap buffers + * request at a time. + */ + r200WaitForFrameCompletion( rmesa ); + + r200WaitForVBlank( rmesa ); + + ret = drmCommandNone( rmesa->dri.fd, DRM_RADEON_FLIP ); + + UNLOCK_HARDWARE( rmesa ); + + if ( ret ) { + fprintf( stderr, "DRM_R200_FLIP: return = %d\n", ret ); + exit( 1 ); + } + + if ( rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.color.drawOffset = rmesa->r200Screen->frontOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->frontPitch; + } else { + rmesa->state.color.drawOffset = rmesa->r200Screen->backOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->backPitch; + } + + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = rmesa->state.color.drawOffset; + rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = rmesa->state.color.drawPitch; +} + + +/* ================================================================ + * Buffer clear + */ +static void r200Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + GLuint flags = 0; + GLuint color_mask = 0; + GLint ret, i; + + if ( R200_DEBUG & DEBUG_IOCTL ) { + fprintf( stderr, "%s: all=%d cx=%d cy=%d cw=%d ch=%d\n", + __FUNCTION__, all, cx, cy, cw, ch ); + } + + { + LOCK_HARDWARE( rmesa ); + UNLOCK_HARDWARE( rmesa ); + if ( dPriv->numClipRects == 0 ) + return; + } + + r200EmitState( rmesa ); + + /* Need to cope with lostcontext here as kernel relies on + * some residual state: + */ + R200_FIREVERTICES( rmesa ); + + if ( mask & DD_FRONT_LEFT_BIT ) { + flags |= RADEON_FRONT; + color_mask = rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK]; + mask &= ~DD_FRONT_LEFT_BIT; + } + + if ( mask & DD_BACK_LEFT_BIT ) { + flags |= RADEON_BACK; + color_mask = rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK]; + mask &= ~DD_BACK_LEFT_BIT; + } + + if ( mask & DD_DEPTH_BIT ) { + if ( ctx->Depth.Mask ) flags |= RADEON_DEPTH; /* FIXME: ??? */ + mask &= ~DD_DEPTH_BIT; + } + + if ( (mask & DD_STENCIL_BIT) && rmesa->state.stencil.hwBuffer ) { + flags |= RADEON_STENCIL; + mask &= ~DD_STENCIL_BIT; + } + + if ( mask ) + _swrast_Clear( ctx, mask, all, cx, cy, cw, ch ); + + if ( !flags ) + return; + + /* 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. + */ + while ( 1 ) { + drmRadeonGetParam gp; + int ret; + int clear; + + gp.param = RADEON_PARAM_LAST_CLEAR; + gp.value = (int *)&clear; + ret = drmCommandWriteRead( rmesa->dri.fd, + DRM_RADEON_GETPARAM, &gp, sizeof(gp) ); + + if ( ret ) { + fprintf( stderr, "%s: drmRadeonGetParam: %d\n", __FUNCTION__, ret ); + exit(1); + } + + /* Clear throttling needs more thought. + */ + if ( rmesa->sarea->last_clear - clear <= 8 ) { + break; + } + + if (rmesa->do_usleeps) { + UNLOCK_HARDWARE( rmesa ); + do_usleep(1, __FUNCTION__); + LOCK_HARDWARE( rmesa ); + } + } + + + for ( i = 0 ; i < dPriv->numClipRects ; ) { + GLint nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS, dPriv->numClipRects ); + XF86DRIClipRectPtr box = dPriv->pClipRects; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drmRadeonClearType clear; + drmRadeonClearRect depth_boxes[RADEON_NR_SAREA_CLIPRECTS]; + 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++ = box[i]; + n++; + } + } + + rmesa->sarea->nbox = n; + + clear.flags = flags; + clear.clear_color = rmesa->state.color.clear; + clear.clear_depth = 0; /* not used */ + clear.color_mask = rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK]; + clear.depth_mask = rmesa->state.stencil.clear; + clear.depth_boxes = depth_boxes; + + n--; + b = rmesa->sarea->boxes; + for ( ; n >= 0 ; n-- ) { + depth_boxes[n].f[RADEON_CLEAR_X1] = (float)b[n].x1; + depth_boxes[n].f[RADEON_CLEAR_Y1] = (float)b[n].y1; + depth_boxes[n].f[RADEON_CLEAR_X2] = (float)b[n].x2; + depth_boxes[n].f[RADEON_CLEAR_Y2] = (float)b[n].y2; + depth_boxes[n].f[RADEON_CLEAR_DEPTH] = ctx->Depth.Clear; + } + + ret = drmCommandWrite( rmesa->dri.fd, DRM_RADEON_CLEAR, + &clear, sizeof(drmRadeonClearType)); + + + if ( ret ) { + UNLOCK_HARDWARE( rmesa ); + fprintf( stderr, "DRM_RADEON_CLEAR: return = %d\n", ret ); + exit( 1 ); + } + } + + UNLOCK_HARDWARE( rmesa ); + rmesa->lost_context = 1; +} + + +void r200WaitForIdleLocked( r200ContextPtr rmesa ) +{ + int ret; + int i = 0; + + do { + ret = drmCommandNone( rmesa->dri.fd, DRM_RADEON_CP_IDLE); + if (ret) + do_usleep( 1, __FUNCTION__ ); + } while (ret && ++i < 100); + + if ( ret < 0 ) { + UNLOCK_HARDWARE( rmesa ); + fprintf( stderr, "Error: R200 timed out... exiting\n" ); + exit( -1 ); + } +} + +static void r200WaitForIdle( r200ContextPtr rmesa ) +{ + LOCK_HARDWARE(rmesa); + r200WaitForIdleLocked( rmesa ); + UNLOCK_HARDWARE(rmesa); +} + + +void r200WaitForVBlank( r200ContextPtr rmesa ) +{ + drmVBlank vbl; + int ret; + + if ( !rmesa->r200Screen->irq ) + return; + + if ( getenv("LIBGL_SYNC_REFRESH") ) { + /* Wait for until the next vertical blank */ + vbl.request.type = DRM_VBLANK_RELATIVE; + vbl.request.sequence = 1; + } else if ( getenv("LIBGL_THROTTLE_REFRESH") ) { + /* Wait for at least one vertical blank since the last call */ + vbl.request.type = DRM_VBLANK_ABSOLUTE; + vbl.request.sequence = rmesa->vbl_seq + 1; + } else { + return; + } + + UNLOCK_HARDWARE( rmesa ); + + if ((ret = drmWaitVBlank( rmesa->dri.fd, &vbl ))) { + fprintf(stderr, "%s: drmWaitVBlank returned %d, IRQs don't seem to be" + " working correctly.\nTry running with LIBGL_THROTTLE_REFRESH" + " and LIBL_SYNC_REFRESH unset.\n", __FUNCTION__, ret); + exit(1); + } else if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s: drmWaitVBlank returned %d\n", __FUNCTION__, ret); + rmesa->vbl_seq = vbl.reply.sequence; + + LOCK_HARDWARE( rmesa ); +} + + +void r200Flush( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->dma.flush) + rmesa->dma.flush( rmesa ); + + if (!is_empty_list(&rmesa->hw.dirty)) + r200EmitState( rmesa ); + + if (rmesa->store.cmd_used) + r200FlushCmdBuf( rmesa, __FUNCTION__ ); +} + +/* Make sure all commands have been sent to the hardware and have + * completed processing. + */ +void r200Finish( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + r200Flush( ctx ); + + if (rmesa->do_irqs) { + LOCK_HARDWARE( rmesa ); + r200EmitIrqLocked( rmesa ); + UNLOCK_HARDWARE( rmesa ); + r200WaitIrq( rmesa ); + } + else + r200WaitForIdle( rmesa ); +} + + +/* This version of AllocateMemoryNV allocates only agp memory, and + * only does so after the point at which the driver has been + * initialized. + * + * Theoretically a valid context isn't required. However, in this + * implementation, it is, as I'm using the hardware lock to protect + * the kernel data structures, and the current context to get the + * device fd. + */ +void *r200AllocateMemoryNV(GLsizei size, GLfloat readfreq, + GLfloat writefreq, GLfloat priority) +{ + GET_CURRENT_CONTEXT(ctx); + r200ContextPtr rmesa; + int region_offset; + drmRadeonMemAlloc alloc; + int ret; + + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s sz %d %f/%f/%f\n", __FUNCTION__, size, readfreq, + writefreq, priority); + + if (!ctx || !(rmesa = R200_CONTEXT(ctx)) || rmesa->r200Screen->IsPCI ) + return NULL; + + if (getenv("R200_NO_ALLOC")) + return NULL; + + if (rmesa->dri.drmMinor < 6) + return NULL; + + alloc.region = RADEON_MEM_REGION_AGP; + alloc.alignment = 0; + alloc.size = size; + alloc.region_offset = ®ion_offset; + + ret = drmCommandWriteRead( rmesa->r200Screen->driScreen->fd, + DRM_RADEON_ALLOC, + &alloc, sizeof(alloc)); + + if (ret) { + fprintf(stderr, "%s: DRM_RADEON_ALLOC ret %d\n", __FUNCTION__, ret); + return NULL; + } + + { + char *region_start = (char *)rmesa->r200Screen->agpTextures.map; + return (void *)(region_start + region_offset); + } +} + + +/* Called via glXFreeMemoryNV() */ +void r200FreeMemoryNV(GLvoid *pointer) +{ + GET_CURRENT_CONTEXT(ctx); + r200ContextPtr rmesa; + int region_offset; + drmRadeonMemFree memfree; + int ret; + + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s %p\n", __FUNCTION__, pointer); + + if (!ctx || !(rmesa = R200_CONTEXT(ctx)) || rmesa->r200Screen->IsPCI ) { + fprintf(stderr, "%s: no context\n", __FUNCTION__); + return; + } + + if (rmesa->dri.drmMinor < 6) + return; + + region_offset = (char *)pointer - (char *)rmesa->r200Screen->agpTextures.map; + + if (region_offset < 0 || + region_offset > rmesa->r200Screen->agpTextures.size) { + fprintf(stderr, "offset %d outside range 0..%d\n", region_offset, + rmesa->r200Screen->agpTextures.size); + return; + } + + memfree.region = RADEON_MEM_REGION_AGP; + memfree.region_offset = region_offset; + + ret = drmCommandWrite( rmesa->r200Screen->driScreen->fd, + DRM_RADEON_FREE, + &memfree, sizeof(memfree)); + + if (ret) + fprintf(stderr, "%s: DRM_RADEON_FREE ret %d\n", __FUNCTION__, ret); +} + +/* Called via glXGetAGPOffsetMESA() */ +GLuint r200GetAGPOffset(const GLvoid *pointer) +{ + GET_CURRENT_CONTEXT(ctx); + r200ContextPtr rmesa; + GLuint card_offset; + + if (!ctx || !(rmesa = R200_CONTEXT(ctx)) ) { + fprintf(stderr, "%s: no context\n", __FUNCTION__); + return ~0; + } + + if (!r200IsAgpMemory( rmesa, pointer, 0 )) + return ~0; + + if (rmesa->dri.drmMinor < 6) + return ~0; + + card_offset = r200AgpOffsetFromVirtual( rmesa, pointer ); + + return card_offset - rmesa->r200Screen->agp_base; +} + + +GLboolean r200IsAgpMemory( r200ContextPtr rmesa, const GLvoid *pointer, + GLint size ) +{ + int offset = (char *)pointer - (char *)rmesa->r200Screen->agpTextures.map; + int valid = (size >= 0 && + offset >= 0 && + offset + size < rmesa->r200Screen->agpTextures.size); + + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "r200IsAgpMemory( %p ) : %d\n", pointer, valid ); + + return valid; +} + + +GLuint r200AgpOffsetFromVirtual( r200ContextPtr rmesa, const GLvoid *pointer ) +{ + int offset = (char *)pointer - (char *)rmesa->r200Screen->agpTextures.map; + + if (offset < 0 || offset > rmesa->r200Screen->agpTextures.size) + return ~0; + else + return rmesa->r200Screen->agp_texture_offset + offset; +} + + + +void r200InitIoctlFuncs( GLcontext *ctx ) +{ + ctx->Driver.Clear = r200Clear; + ctx->Driver.Finish = r200Finish; + ctx->Driver.Flush = r200Flush; +} + Index: xc/lib/GL/mesa/src/drv/r200/r200_ioctl.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_ioctl.h:1.1 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_ioctl.h Wed Oct 30 07:51:52 2002 @@ -0,0 +1,188 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_ioctl.h,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_IOCTL_H__ +#define __R200_IOCTL_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "simple_list.h" +#include "radeon_dri.h" +#include "r200_lock.h" + +#include "xf86drm.h" +#include "radeon_common.h" + +extern void r200EmitState( r200ContextPtr rmesa ); +extern void r200EmitVertexAOS( r200ContextPtr rmesa, + GLuint vertex_size, + GLuint offset ); + +extern void r200EmitVbufPrim( r200ContextPtr rmesa, + GLuint primitive, + GLuint vertex_nr ); + +extern void r200FlushElts( r200ContextPtr rmesa ); + +extern GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa, + GLuint primitive, + GLuint min_nr ); + +extern void r200EmitAOS( r200ContextPtr rmesa, + struct r200_dma_region **regions, + GLuint n, + GLuint offset ); + +extern void r200EmitBlit( r200ContextPtr rmesa, + GLuint color_fmt, + GLuint src_pitch, + GLuint src_offset, + GLuint dst_pitch, + GLuint dst_offset, + GLint srcx, GLint srcy, + GLint dstx, GLint dsty, + GLuint w, GLuint h ); + +extern void r200EmitWait( r200ContextPtr rmesa, GLuint flags ); + +extern void r200FlushCmdBuf( r200ContextPtr rmesa, const char * ); +extern int r200FlushCmdBufLocked( r200ContextPtr rmesa, const char * caller ); + +extern void r200RefillCurrentDmaRegion( r200ContextPtr rmesa ); + +extern void r200AllocDmaRegion( r200ContextPtr rmesa, + struct r200_dma_region *region, + int bytes, + int alignment ); + +extern void r200AllocDmaRegionVerts( r200ContextPtr rmesa, + struct r200_dma_region *region, + int numverts, + int vertsize, + int alignment ); + +extern void r200ReleaseDmaRegion( r200ContextPtr rmesa, + struct r200_dma_region *region, + const char *caller ); + +extern void r200CopyBuffer( const __DRIdrawablePrivate *drawable ); +extern void r200PageFlip( const __DRIdrawablePrivate *drawable ); +extern void r200Flush( GLcontext *ctx ); +extern void r200Finish( GLcontext *ctx ); +extern void r200WaitForIdleLocked( r200ContextPtr rmesa ); +extern void r200WaitForVBlank( r200ContextPtr rmesa ); +extern void r200InitIoctlFuncs( GLcontext *ctx ); + +extern void *r200AllocateMemoryNV( GLsizei size, GLfloat readfreq, + GLfloat writefreq, GLfloat priority ); +extern void r200FreeMemoryNV( GLvoid *pointer ); +extern GLuint r200GetAGPOffset( const GLvoid *pointer ); +extern GLboolean r200IsAgpMemory( r200ContextPtr rmesa, const GLvoid *pointer, + GLint size ); + +extern GLuint r200AgpOffsetFromVirtual( r200ContextPtr rmesa, + const GLvoid *pointer ); + +/* ================================================================ + * Helper macros: + */ + +/* Close off the last primitive, if it exists. + */ +#define R200_NEWPRIM( rmesa ) \ +do { \ + if ( rmesa->dma.flush ) \ + rmesa->dma.flush( rmesa ); \ +} while (0) + +/* Can accomodate several state changes and primitive changes without + * actually firing the buffer. + */ +#define R200_STATECHANGE( rmesa, ATOM ) \ +do { \ + R200_NEWPRIM( rmesa ); \ + move_to_head( &(rmesa->hw.dirty), &(rmesa->hw.ATOM)); \ +} while (0) + +#define R200_DB_STATE( ATOM ) \ + memcpy( rmesa->hw.ATOM.lastcmd, rmesa->hw.ATOM.cmd, \ + rmesa->hw.ATOM.cmd_size * 4) + +static __inline int R200_DB_STATECHANGE( + r200ContextPtr rmesa, + struct r200_state_atom *atom ) +{ + if (memcmp(atom->cmd, atom->lastcmd, atom->cmd_size*4)) { + int *tmp; + R200_NEWPRIM( rmesa ); + move_to_head( &(rmesa->hw.dirty), atom ); + tmp = atom->cmd; + atom->cmd = atom->lastcmd; + atom->lastcmd = tmp; + return 1; + } + else + return 0; +} + + +/* Fire the buffered vertices no matter what. + */ +#define R200_FIREVERTICES( rmesa ) \ +do { \ + if ( rmesa->store.cmd_used || rmesa->dma.flush ) { \ + r200Flush( rmesa->glCtx ); \ + } \ +} while (0) + +/* Alloc space in the command buffer + */ +static __inline char *r200AllocCmdBuf( r200ContextPtr rmesa, + int bytes, const char *where ) +{ + if (rmesa->store.cmd_used + bytes > R200_CMD_BUF_SZ) + r200FlushCmdBuf( rmesa, __FUNCTION__ ); + + { + char *head = rmesa->store.cmd_buf + rmesa->store.cmd_used; + rmesa->store.cmd_used += bytes; + return head; + } +} + + + + +#endif +#endif /* __R200_IOCTL_H__ */ Index: xc/lib/GL/mesa/src/drv/r200/r200_lock.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_lock.c:1.1 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_lock.c Wed Oct 30 07:51:52 2002 @@ -0,0 +1,108 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_lock.c,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_lock.h" +#include "r200_tex.h" +#include "r200_state.h" +#include "r200_ioctl.h" + +#if DEBUG_LOCKING +char *prevLockFile = NULL; +int prevLockLine = 0; +#endif + +/* Turn on/off page flipping according to the flags in the sarea: + */ +static void +r200UpdatePageFlipping( r200ContextPtr rmesa ) +{ + int use_back; + rmesa->doPageFlip = rmesa->sarea->pfAllowPageFlip; + + use_back = (rmesa->glCtx->Color.DriverDrawBuffer == GL_BACK_LEFT); + use_back ^= (rmesa->sarea->pfCurrentPage == 1); + + if (use_back) { + rmesa->state.color.drawOffset = rmesa->r200Screen->backOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->backPitch; + } else { + rmesa->state.color.drawOffset = rmesa->r200Screen->frontOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->frontPitch; + } + + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = rmesa->state.color.drawOffset; + rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = rmesa->state.color.drawPitch; +} + + + +/* 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 r200GetLock( r200ContextPtr rmesa, GLuint flags ) +{ + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + __DRIscreenPrivate *sPriv = rmesa->dri.screen; + RADEONSAREAPrivPtr sarea = rmesa->sarea; + + drmGetLock( rmesa->dri.fd, rmesa->dri.hwContext, 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. + */ + DRI_VALIDATE_DRAWABLE_INFO( rmesa->dri.display, sPriv, dPriv ); + + if ( rmesa->lastStamp != dPriv->lastStamp ) { + r200UpdatePageFlipping( rmesa ); + r200SetCliprects( rmesa, rmesa->glCtx->Color.DriverDrawBuffer ); + r200UpdateViewportOffset( rmesa->glCtx ); + rmesa->lastStamp = dPriv->lastStamp; + } + + if ( sarea->ctxOwner != rmesa->dri.hwContext ) { + sarea->ctxOwner = rmesa->dri.hwContext; + } +} Index: xc/lib/GL/mesa/src/drv/r200/r200_lock.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_lock.h:1.1 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_lock.h Wed Oct 30 07:51:52 2002 @@ -0,0 +1,111 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_lock.h,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_LOCK_H__ +#define __R200_LOCK_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern void r200GetLock( r200ContextPtr 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->dri.hwLock, rmesa->dri.hwContext, \ + (DRM_LOCK_HELD | rmesa->dri.hwContext), __ret ); \ + if ( __ret ) \ + r200GetLock( rmesa, 0 ); \ + DEBUG_LOCK(); \ + } while (0) + +/* Unlock the hardware. + */ +#define UNLOCK_HARDWARE( rmesa ) \ + do { \ + DRM_UNLOCK( rmesa->dri.fd, \ + rmesa->dri.hwLock, \ + rmesa->dri.hwContext ); \ + DEBUG_RESET(); \ + } while (0) + +#endif +#endif /* __R200_LOCK_H__ */ Index: xc/lib/GL/mesa/src/drv/r200/r200_maos.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_maos.c:1.1 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_maos.c Wed Oct 30 07:51:52 2002 @@ -0,0 +1,12 @@ + + +/* If using new packets, can choose either verts or arrays. + * Otherwise, must use verts. + */ +#include "r200_context.h" +#define R200_MAOS_VERTS 0 +#if (R200_MAOS_VERTS) || (R200_OLD_PACKETS) +#include "r200_maos_verts.c" +#else +#include "r200_maos_arrays.c" +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_maos.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_maos.h:1.1 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_maos.h Wed Oct 30 07:51:52 2002 @@ -0,0 +1,46 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_maos.h,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_MAOS_H__ +#define __R200_MAOS_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "r200_context.h" + +extern void r200EmitArrays( GLcontext *ctx, GLuint inputs ); +extern void r200ReleaseArrays( GLcontext *ctx, GLuint newinputs ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_maos_arrays.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_maos_arrays.c:1.3 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_maos_arrays.c Sun Feb 23 18:59:01 2003 @@ -0,0 +1,481 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_maos_arrays.c,v 1.3 2003/02/23 23:59:01 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "glheader.h" +#include "mtypes.h" +#include "colormac.h" +#include "mem.h" +#include "mmath.h" +#include "macros.h" + +#include "swrast_setup/swrast_setup.h" +#include "math/m_translate.h" +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "tnl/t_imm_debug.h" + +#include "r200_context.h" +#include "r200_ioctl.h" +#include "r200_state.h" +#include "r200_swtcl.h" +#include "r200_maos.h" + +/* Usage: + * - from r200_tcl_render + * - call r200EmitArrays to ensure uptodate arrays in dma + * - emit primitives (new type?) which reference the data + * -- need to use elts for lineloop, quads, quadstrip/flat + * -- other primitives are all well-formed (need tristrip-1,fake-poly) + * + */ +static void emit_ubyte_rgba3( GLcontext *ctx, + struct r200_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + r200_color_t *out = (r200_color_t *)(rvb->start + rvb->address); + + if (R200_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d out %p\n", + __FUNCTION__, count, stride, out); + + for (i = 0; i < count; i++) { + out->red = *data; + out->green = *(data+1); + out->blue = *(data+2); + out->alpha = 0xFF; + out++; + data += stride; + } +} + + +#if defined(USE_X86_ASM) +#define COPY_DWORDS( dst, src, nr ) \ +do { \ + int __tmp; \ + __asm__ __volatile__( "rep ; movsl" \ + : "=%c" (__tmp), "=D" (dst), "=S" (__tmp) \ + : "0" (nr), \ + "D" ((long)dst), \ + "S" ((long)src) ); \ +} while (0) +#else +#define COPY_DWORDS( dst, src, nr ) \ +do { \ + int j; \ + for ( j = 0 ; j < nr ; j++ ) \ + dst[j] = ((int *)src)[j]; \ + dst += nr; \ +} while (0) +#endif + + + +static void emit_ubyte_rgba4( GLcontext *ctx, + struct r200_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (R200_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d\n", + __FUNCTION__, count, stride); + + if (stride == 4) { + for (i = 0; i < count; i++) + ((int *)out)[i] = LE32_TO_CPU(((int *)data)[i]); + } else { + for (i = 0; i < count; i++) { + *(int *)out++ = LE32_TO_CPU(*(int *)data); + data += stride; + } + } +} + + +static void emit_ubyte_rgba( GLcontext *ctx, + struct r200_dma_region *rvb, + char *data, + int size, + int stride, + int count ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s %d/%d\n", __FUNCTION__, count, size); + + assert (!rvb->buf); + + if (stride == 0) { + r200AllocDmaRegion( rmesa, rvb, 4, 4 ); + count = 1; + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = 0; + rvb->aos_size = 1; + } + else { + r200AllocDmaRegion( rmesa, rvb, 4 * count, 4 ); /* alignment? */ + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = 1; + rvb->aos_size = 1; + } + + /* Emit the data + */ + switch (size) { + case 3: + emit_ubyte_rgba3( ctx, rvb, data, stride, count ); + break; + case 4: + emit_ubyte_rgba4( ctx, rvb, data, stride, count ); + break; + default: + assert(0); + exit(1); + break; + } +} + + + + +static void emit_vec8( GLcontext *ctx, + struct r200_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (R200_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d\n", + __FUNCTION__, count, stride); + + if (stride == 8) + COPY_DWORDS( out, data, count*2 ); + else + for (i = 0; i < count; i++) { + out[0] = *(int *)data; + out[1] = *(int *)(data+4); + out += 2; + data += stride; + } +} + +static void emit_vec12( GLcontext *ctx, + struct r200_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (R200_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d out %p data %p\n", + __FUNCTION__, count, stride, out, data); + + if (stride == 12) + COPY_DWORDS( out, data, count*3 ); + else + for (i = 0; i < count; i++) { + out[0] = *(int *)data; + out[1] = *(int *)(data+4); + out[2] = *(int *)(data+8); + out += 3; + data += stride; + } +} + +static void emit_vec16( GLcontext *ctx, + struct r200_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (R200_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d\n", + __FUNCTION__, count, stride); + + if (stride == 16) + COPY_DWORDS( out, data, count*4 ); + else + for (i = 0; i < count; i++) { + out[0] = *(int *)data; + out[1] = *(int *)(data+4); + out[2] = *(int *)(data+8); + out[3] = *(int *)(data+12); + out += 4; + data += stride; + } +} + + +static void emit_vector( GLcontext *ctx, + struct r200_dma_region *rvb, + char *data, + int size, + int stride, + int count ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d size %d stride %d\n", + __FUNCTION__, count, size, stride); + + assert (!rvb->buf); + + if (stride == 0) { + r200AllocDmaRegion( rmesa, rvb, size * 4, 4 ); + count = 1; + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = 0; + rvb->aos_size = size; + } + else { + r200AllocDmaRegion( rmesa, rvb, size * count * 4, 4 ); /* alignment? */ + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = size; + rvb->aos_size = size; + } + + /* Emit the data + */ + switch (size) { + case 2: + emit_vec8( ctx, rvb, data, stride, count ); + break; + case 3: + emit_vec12( ctx, rvb, data, stride, count ); + break; + case 4: + emit_vec16( ctx, rvb, data, stride, count ); + break; + default: + assert(0); + exit(1); + break; + } + +} + + + +/* Emit any changed arrays to new agp memory, re-emit a packet to + * update the arrays. + */ +void r200EmitArrays( GLcontext *ctx, GLuint inputs ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb; + struct r200_dma_region **component = rmesa->tcl.aos_components; + GLuint nr = 0; + GLuint vfmt0 = 0, vfmt1 = 0; + GLuint count = VB->Count; + + if (R200_DEBUG & DEBUG_VERTS) + _tnl_print_vert_flags( __FUNCTION__, inputs ); + + if (1) { + if (!rmesa->tcl.obj.buf) + emit_vector( ctx, + &rmesa->tcl.obj, + (char *)VB->ObjPtr->data, + VB->ObjPtr->size, + VB->ObjPtr->stride, + count); + + switch( VB->ObjPtr->size ) { + case 4: vfmt0 |= R200_VTX_W0; + case 3: vfmt0 |= R200_VTX_Z0; + case 2: + default: + break; + } + component[nr++] = &rmesa->tcl.obj; + } + + + if (inputs & VERT_NORM) { + if (!rmesa->tcl.norm.buf) + emit_vector( ctx, + &(rmesa->tcl.norm), + (char *)VB->NormalPtr->data, + 3, + VB->NormalPtr->stride, + count); + + vfmt0 |= R200_VTX_N0; + component[nr++] = &rmesa->tcl.norm; + } + + if (inputs & VERT_RGBA) { + if (VB->ColorPtr[0]->Type == GL_UNSIGNED_BYTE) { + if (!rmesa->tcl.rgba.buf) + emit_ubyte_rgba( ctx, + &rmesa->tcl.rgba, + (char *)VB->ColorPtr[0]->Ptr, + VB->ColorPtr[0]->Size, + VB->ColorPtr[0]->StrideB, + count); + + vfmt0 |= R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT; + } + else { + int emitsize; + + if (VB->ColorPtr[0]->Size == 4 && + (VB->ColorPtr[0]->StrideB != 0 || + ((GLfloat *)VB->ColorPtr[0]->Ptr)[3] != 1.0)) { + vfmt0 |= R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT; + emitsize = 4; + } + else { + vfmt0 |= R200_VTX_FP_RGB << R200_VTX_COLOR_0_SHIFT; + emitsize = 3; + } + + if (!rmesa->tcl.rgba.buf) + emit_vector( ctx, + &(rmesa->tcl.rgba), + (char *)VB->ColorPtr[0]->Ptr, + emitsize, + VB->ColorPtr[0]->StrideB, + count); + } + + component[nr++] = &rmesa->tcl.rgba; + } + + + if (inputs & VERT_SPEC_RGB) { + if (!rmesa->tcl.spec.buf) { + if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE) + r200_import_float_spec_colors( ctx ); + + emit_ubyte_rgba( ctx, + &rmesa->tcl.spec, + (char *)VB->SecondaryColorPtr[0]->Ptr, + 3, + VB->SecondaryColorPtr[0]->StrideB, + count); + } + + /* How does this work? + */ + vfmt0 |= R200_VTX_PK_RGBA << R200_VTX_COLOR_1_SHIFT; + component[nr++] = &rmesa->tcl.spec; + } + +/* vtx = (rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] & */ +/* ~(R200_TCL_VTX_Q0|R200_TCL_VTX_Q1)); */ + + if (inputs & VERT_TEX0) { + if (!rmesa->tcl.tex[0].buf) + emit_vector( ctx, + &(rmesa->tcl.tex[0]), + (char *)VB->TexCoordPtr[0]->data, + VB->TexCoordPtr[0]->size, + VB->TexCoordPtr[0]->stride, + count ); + + vfmt1 |= VB->TexCoordPtr[0]->size << R200_VTX_TEX0_COMP_CNT_SHIFT; + component[nr++] = &rmesa->tcl.tex[0]; + } + + if (inputs & VERT_TEX1) { + if (!rmesa->tcl.tex[1].buf) + emit_vector( ctx, + &(rmesa->tcl.tex[1]), + (char *)VB->TexCoordPtr[1]->data, + VB->TexCoordPtr[1]->size, + VB->TexCoordPtr[1]->stride, + count ); + + vfmt1 |= VB->TexCoordPtr[1]->size << R200_VTX_TEX1_COMP_CNT_SHIFT; + component[nr++] = &rmesa->tcl.tex[1]; + } + + if (vfmt0 != rmesa->hw.vtx.cmd[VTX_VTXFMT_0] || + vfmt1 != rmesa->hw.vtx.cmd[VTX_VTXFMT_1]) { + R200_STATECHANGE( rmesa, vtx ); + rmesa->hw.vtx.cmd[VTX_VTXFMT_0] = vfmt0; + rmesa->hw.vtx.cmd[VTX_VTXFMT_1] = vfmt1; + } + + +/* fprintf(stderr, "VTXFMT_0: %x VTXFMT_1: %x\n", vfmt0, vfmt1); */ + + rmesa->tcl.nr_aos_components = nr; + rmesa->tcl.vertex_format = vfmt0; +} + + +void r200ReleaseArrays( GLcontext *ctx, GLuint newinputs ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + if (R200_DEBUG & DEBUG_VERTS) + _tnl_print_vert_flags( __FUNCTION__, newinputs ); + + if (newinputs & VERT_OBJ) + r200ReleaseDmaRegion( rmesa, &rmesa->tcl.obj, __FUNCTION__ ); + + if (newinputs & VERT_NORM) + r200ReleaseDmaRegion( rmesa, &rmesa->tcl.norm, __FUNCTION__ ); + + if (newinputs & VERT_RGBA) + r200ReleaseDmaRegion( rmesa, &rmesa->tcl.rgba, __FUNCTION__ ); + + if (newinputs & VERT_SPEC_RGB) + r200ReleaseDmaRegion( rmesa, &rmesa->tcl.spec, __FUNCTION__ ); + + if (newinputs & VERT_TEX0) + r200ReleaseDmaRegion( rmesa, &rmesa->tcl.tex[0], __FUNCTION__ ); + + if (newinputs & VERT_TEX1) + r200ReleaseDmaRegion( rmesa, &rmesa->tcl.tex[1], __FUNCTION__ ); +} Index: xc/lib/GL/mesa/src/drv/r200/r200_maos_vbtmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_maos_vbtmp.h:1.2 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_maos_vbtmp.h Mon Dec 16 11:18:54 2002 @@ -0,0 +1,378 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_maos_vbtmp.h,v 1.2 2002/12/16 16:18:54 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 LOCALVARS +#define LOCALVARS +#endif + +#undef TCL_DEBUG +#ifndef TCL_DEBUG +#define TCL_DEBUG 0 +#endif + +static void TAG(emit)( GLcontext *ctx, + GLuint start, GLuint end, + void *dest ) +{ + LOCALVARS + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint (*tc0)[4], (*tc1)[4]; + GLfloat *fog; + GLuint (*tc2)[4], (*norm)[3]; + GLubyte (*col)[4], (*spec)[4]; + GLuint tc0_stride, tc1_stride, col_stride, spec_stride, fog_stride; + GLuint tc2_stride, norm_stride; + GLuint (*coord)[4]; + GLuint coord_stride; + GLubyte dummy[4]; + int i; + + union emit_union *v = (union emit_union *)dest; + + + if (R200_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s\n", __FUNCTION__); + + /* The vertex code expects Obj to be clean to element 3. To fix + * this, add more vertex code (for obj-2, obj-3) or preferably move + * to maos. + */ + if (VB->ObjPtr->size < 3) { + if (VB->ObjPtr->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_OBJ, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->ObjPtr, VB->Count, 2 ); + } + + if (DO_W && VB->ObjPtr->size < 4) { + if (VB->ObjPtr->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_OBJ, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->ObjPtr, VB->Count, 3 ); + } + + coord = (GLuint (*)[4])VB->ObjPtr->data; + coord_stride = VB->ObjPtr->stride; + + if (DO_TEX2) { + const GLuint t2 = GET_TEXSOURCE(2); + tc2 = (GLuint (*)[4])VB->TexCoordPtr[t2]->data; + tc2_stride = VB->TexCoordPtr[t2]->stride; + if (DO_PTEX && VB->TexCoordPtr[t2]->size < 4) { + if (VB->TexCoordPtr[t2]->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_TEX2, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->TexCoordPtr[t2], VB->Count, 3 ); + } + } + + if (DO_TEX1) { + if (VB->TexCoordPtr[1]) { + const GLuint t1 = GET_TEXSOURCE(1); + tc1 = (GLuint (*)[4])VB->TexCoordPtr[t1]->data; + tc1_stride = VB->TexCoordPtr[t1]->stride; + if (DO_PTEX && VB->TexCoordPtr[t1]->size < 4) { + if (VB->TexCoordPtr[t1]->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_TEX1, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->TexCoordPtr[t1], VB->Count, 3 ); + } + } else { + tc1 = (GLuint (*)[4])&ctx->Current.Texcoord[1]; /* could be anything, really */ + tc1_stride = 0; + } + } + + if (DO_TEX0) { + if (VB->TexCoordPtr[0]) { + const GLuint t0 = GET_TEXSOURCE(0); + tc0_stride = VB->TexCoordPtr[t0]->stride; + tc0 = (GLuint (*)[4])VB->TexCoordPtr[t0]->data; + if (DO_PTEX && VB->TexCoordPtr[t0]->size < 4) { + if (VB->TexCoordPtr[t0]->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_TEX0, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->TexCoordPtr[t0], VB->Count, 3 ); + } + } else { + tc0 = (GLuint (*)[4])&ctx->Current.Texcoord[0]; /* could be anything, really */ + tc0_stride = 0; + } + + } + + if (DO_NORM) { + if (VB->NormalPtr) { + norm_stride = VB->NormalPtr->stride; + norm = (GLuint (*)[3])VB->NormalPtr->data; + } else { + norm_stride = 0; + norm = (GLuint (*)[3])&ctx->Current.Normal; + } + } + + if (DO_RGBA) { + if (VB->ColorPtr[0]) { + /* This is incorrect when colormaterial is enabled: + */ + if (VB->ColorPtr[0]->Type != GL_UNSIGNED_BYTE) { + if (0) fprintf(stderr, "IMPORTING FLOAT COLORS\n"); + IMPORT_FLOAT_COLORS( ctx ); + } + col = (GLubyte (*)[4])VB->ColorPtr[0]->Ptr; + col_stride = VB->ColorPtr[0]->StrideB; + } else { + col = &dummy; /* any old memory is fine */ + col_stride = 0; + } + + } + + if (DO_SPEC) { + if (VB->SecondaryColorPtr[0]) { + if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE) + IMPORT_FLOAT_SPEC_COLORS( ctx ); + spec = (GLubyte (*)[4])VB->SecondaryColorPtr[0]->Ptr; + spec_stride = VB->SecondaryColorPtr[0]->StrideB; + } else { + spec = &dummy; + spec_stride = 0; + } + + } + + if (DO_FOG) { + if (VB->FogCoordPtr) { + fog = VB->FogCoordPtr->data; + fog_stride = VB->FogCoordPtr->stride; + } else { + fog = (GLfloat *)&dummy; *fog = 0; + fog_stride = 0; + } + + } + + + if (VB->importable_data) { + if (start) { + coord = (GLuint (*)[4])((GLubyte *)coord + start * coord_stride); + if (DO_TEX0) + tc0 = (GLuint (*)[4])((GLubyte *)tc0 + start * tc0_stride); + if (DO_TEX1) + tc1 = (GLuint (*)[4])((GLubyte *)tc1 + start * tc1_stride); + if (DO_TEX2) + tc2 = (GLuint (*)[4])((GLubyte *)tc2 + start * tc2_stride); + if (DO_NORM) + norm = (GLuint (*)[3])((GLubyte *)norm + start * norm_stride); + if (DO_RGBA) + STRIDE_4UB(col, start * col_stride); + if (DO_SPEC) + STRIDE_4UB(spec, start * spec_stride); + if (DO_FOG) + STRIDE_F(fog, start * fog_stride); + } + + for (i=start; i < end; i++) { + v[0].ui = coord[0][0]; + v[1].ui = coord[0][1]; + v[2].ui = coord[0][2]; + if (TCL_DEBUG) fprintf(stderr, "%d: %.2f %.2f %.2f ", i, v[0].f, v[1].f, v[2].f); + if (DO_W) { + v[3].ui = coord[0][3]; + if (TCL_DEBUG) fprintf(stderr, "%.2f ", v[3].f); + v += 4; + } + else + v += 3; + coord = (GLuint (*)[4])((GLubyte *)coord + coord_stride); + + if (DO_NORM) { + v[0].ui = norm[0][0]; + v[1].ui = norm[0][1]; + v[2].ui = norm[0][2]; + if (TCL_DEBUG) fprintf(stderr, "norm: %.2f %.2f %.2f ", v[0].f, v[1].f, v[2].f); + v += 3; + norm = (GLuint (*)[3])((GLubyte *)norm + norm_stride); + } + if (DO_RGBA) { + v[0].ui = LE32_TO_CPU(*(GLuint *)&col[0]); + STRIDE_4UB(col, col_stride); + if (TCL_DEBUG) fprintf(stderr, "%x ", v[0].ui); + v++; + } + if (DO_SPEC || DO_FOG) { + if (DO_SPEC) { + v[0].ub[0] = spec[0][0]; + v[0].ub[1] = spec[0][1]; + v[0].ub[2] = spec[0][2]; + STRIDE_4UB(spec, spec_stride); + } + if (DO_FOG) { + v[0].ub[3] = fog[0] * 255.0; + STRIDE_F(fog, fog_stride); + } + if (TCL_DEBUG) fprintf(stderr, "%x ", v[0].ui); + v++; + } + if (DO_TEX0) { + v[0].ui = tc0[0][0]; + v[1].ui = tc0[0][1]; + if (TCL_DEBUG) fprintf(stderr, "t0: %.2f %.2f ", v[0].f, v[1].f); + if (DO_PTEX) { + v[2].ui = tc0[0][3]; + if (TCL_DEBUG) fprintf(stderr, "%.2f ", v[2].f); + v += 3; + } + else + v += 2; + tc0 = (GLuint (*)[4])((GLubyte *)tc0 + tc0_stride); + } + if (DO_TEX1) { + v[0].ui = tc1[0][0]; + v[1].ui = tc1[0][1]; + if (TCL_DEBUG) fprintf(stderr, "t1: %.2f %.2f ", v[0].f, v[1].f); + if (DO_PTEX) { + v[2].ui = tc1[0][3]; + if (TCL_DEBUG) fprintf(stderr, "%.2f ", v[2].f); + v += 3; + } + else + v += 2; + tc1 = (GLuint (*)[4])((GLubyte *)tc1 + tc1_stride); + } + if (DO_TEX2) { + v[0].ui = tc2[0][0]; + v[1].ui = tc2[0][1]; + if (DO_PTEX) { + v[2].ui = tc2[0][3]; + v += 3; + } + else + v += 2; + tc2 = (GLuint (*)[4])((GLubyte *)tc2 + tc2_stride); + } + if (TCL_DEBUG) fprintf(stderr, "\n"); + } + } else { + for (i=start; i < end; i++) { + v[0].ui = coord[i][0]; + v[1].ui = coord[i][1]; + v[2].ui = coord[i][2]; + if (DO_W) { + v[3].ui = coord[i][3]; + v += 4; + } + else + v += 3; + + if (DO_NORM) { + v[0].ui = norm[i][0]; + v[1].ui = norm[i][1]; + v[2].ui = norm[i][2]; + v += 3; + } + if (DO_RGBA) { + v[0].ui = LE32_TO_CPU(*(GLuint *)&col[i]); + v++; + } + if (DO_SPEC || DO_FOG) { + if (DO_SPEC) { + v[0].ub[0] = spec[i][0]; + v[0].ub[1] = spec[i][1]; + v[0].ub[2] = spec[i][2]; + } + if (DO_FOG) { + v[0].ub[3] = fog[i] * 255.0; + } + v++; + } + if (DO_TEX0) { + v[0].ui = tc0[i][0]; + v[1].ui = tc0[i][1]; + if (DO_PTEX) { + v[2].ui = tc0[i][3]; + v += 3; + } + else + v += 2; + } + if (DO_TEX1) { + v[0].ui = tc1[i][0]; + v[1].ui = tc1[i][1]; + if (DO_PTEX) { + v[2].ui = tc1[i][3]; + v += 3; + } + else + v += 2; + } + if (DO_TEX2) { + v[0].ui = tc2[i][0]; + v[1].ui = tc2[i][1]; + if (DO_PTEX) { + v[2].ui = tc2[i][3]; + v += 3; + } + else + v += 2; + } + } + } +} + + + +static void TAG(init)( void ) +{ + int sz = 3; + if (DO_W) sz++; + if (DO_NORM) sz += 3; + if (DO_RGBA) sz++; + if (DO_SPEC || DO_FOG) sz++; + if (DO_TEX0) sz += 2; + if (DO_TEX0 && DO_PTEX) sz++; + if (DO_TEX1) sz += 2; + if (DO_TEX1 && DO_PTEX) sz++; + if (DO_TEX2) sz += 2; + if (DO_TEX2 && DO_PTEX) sz++; + + setup_tab[IDX].emit = TAG(emit); + setup_tab[IDX].vertex_format = IND; + setup_tab[IDX].vertex_size = sz; +} + + +#undef IND +#undef TAG +#undef IDX Index: xc/lib/GL/mesa/src/drv/r200/r200_maos_verts.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_maos_verts.c:1.1 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_maos_verts.c Wed Oct 30 07:51:52 2002 @@ -0,0 +1,335 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_maos_verts.c,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_state.h" +#include "r200_ioctl.h" +#include "r200_tex.h" +#include "r200_tcl.h" +#include "r200_swtcl.h" +#include "r200_maos.h" + +#include "mmath.h" +#include "mtypes.h" +#include "enums.h" +#include "colormac.h" +#include "light.h" + +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" +#include "tnl/t_imm_debug.h" + +#define R200_TCL_MAX_SETUP 13 + +union emit_union { float f; GLuint ui; GLubyte ub[4]; }; + +static struct { + void (*emit)( GLcontext *, GLuint, GLuint, void * ); + GLuint vertex_size; + GLuint vertex_format; +} setup_tab[R200_TCL_MAX_SETUP]; + +#define DO_W (IND & R200_CP_VC_FRMT_W0) +#define DO_RGBA (IND & R200_CP_VC_FRMT_PKCOLOR) +#define DO_SPEC (IND & R200_CP_VC_FRMT_PKSPEC) +#define DO_FOG (IND & R200_CP_VC_FRMT_PKSPEC) +#define DO_TEX0 (IND & R200_CP_VC_FRMT_ST0) +#define DO_TEX1 (IND & R200_CP_VC_FRMT_ST1) +#define DO_PTEX (IND & R200_CP_VC_FRMT_Q0) +#define DO_NORM (IND & R200_CP_VC_FRMT_N0) + +#define DO_TEX2 0 +#define DO_TEX3 0 + +#define GET_TEXSOURCE(n) n +#define GET_UBYTE_COLOR_STORE() &R200_CONTEXT(ctx)->UbyteColor +#define GET_UBYTE_SPEC_COLOR_STORE() &R200_CONTEXT(ctx)->UbyteSecondaryColor + +#define IMPORT_FLOAT_COLORS r200_import_float_colors +#define IMPORT_FLOAT_SPEC_COLORS r200_import_float_spec_colors + +/*********************************************************************** + * Generate vertex emit functions * + ***********************************************************************/ + + +/* Defined in order of increasing vertex size: + */ +#define IDX 0 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_PKCOLOR) +#define TAG(x) x##_rgba +#include "r200_maos_vbtmp.h" + +#define IDX 1 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_N0) +#define TAG(x) x##_n +#include "r200_maos_vbtmp.h" + +#define IDX 2 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_PKCOLOR| \ + R200_CP_VC_FRMT_ST0) +#define TAG(x) x##_rgba_st +#include "r200_maos_vbtmp.h" + +#define IDX 3 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_PKCOLOR| \ + R200_CP_VC_FRMT_N0) +#define TAG(x) x##_rgba_n +#include "r200_maos_vbtmp.h" + +#define IDX 4 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_ST0| \ + R200_CP_VC_FRMT_N0) +#define TAG(x) x##_st_n +#include "r200_maos_vbtmp.h" + +#define IDX 5 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_PKCOLOR| \ + R200_CP_VC_FRMT_ST0| \ + R200_CP_VC_FRMT_ST1) +#define TAG(x) x##_rgba_st_st +#include "r200_maos_vbtmp.h" + +#define IDX 6 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_PKCOLOR| \ + R200_CP_VC_FRMT_ST0| \ + R200_CP_VC_FRMT_N0) +#define TAG(x) x##_rgba_st_n +#include "r200_maos_vbtmp.h" + +#define IDX 7 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_PKCOLOR| \ + R200_CP_VC_FRMT_PKSPEC| \ + R200_CP_VC_FRMT_ST0| \ + R200_CP_VC_FRMT_ST1) +#define TAG(x) x##_rgba_spec_st_st +#include "r200_maos_vbtmp.h" + +#define IDX 8 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_ST0| \ + R200_CP_VC_FRMT_ST1| \ + R200_CP_VC_FRMT_N0) +#define TAG(x) x##_st_st_n +#include "r200_maos_vbtmp.h" + +#define IDX 9 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_PKCOLOR| \ + R200_CP_VC_FRMT_PKSPEC| \ + R200_CP_VC_FRMT_ST0| \ + R200_CP_VC_FRMT_ST1| \ + R200_CP_VC_FRMT_N0) +#define TAG(x) x##_rgpa_spec_st_st_n +#include "r200_maos_vbtmp.h" + +#define IDX 10 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_PKCOLOR| \ + R200_CP_VC_FRMT_ST0| \ + R200_CP_VC_FRMT_Q0) +#define TAG(x) x##_rgba_stq +#include "r200_maos_vbtmp.h" + +#define IDX 11 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_PKCOLOR| \ + R200_CP_VC_FRMT_ST1| \ + R200_CP_VC_FRMT_Q1| \ + R200_CP_VC_FRMT_ST0| \ + R200_CP_VC_FRMT_Q0) +#define TAG(x) x##_rgba_stq_stq +#include "r200_maos_vbtmp.h" + +#define IDX 12 +#define IND (R200_CP_VC_FRMT_XY| \ + R200_CP_VC_FRMT_Z| \ + R200_CP_VC_FRMT_W0| \ + R200_CP_VC_FRMT_PKCOLOR| \ + R200_CP_VC_FRMT_PKSPEC| \ + R200_CP_VC_FRMT_ST0| \ + R200_CP_VC_FRMT_Q0| \ + R200_CP_VC_FRMT_ST1| \ + R200_CP_VC_FRMT_Q1| \ + R200_CP_VC_FRMT_N0) +#define TAG(x) x##_w_rgpa_spec_stq_stq_n +#include "r200_maos_vbtmp.h" + + + + + +/*********************************************************************** + * Initialization + ***********************************************************************/ + + +static void init_tcl_verts( void ) +{ + init_rgba(); + init_n(); + init_rgba_n(); + init_rgba_st(); + init_st_n(); + init_rgba_st_st(); + init_rgba_st_n(); + init_rgba_spec_st_st(); + init_st_st_n(); + init_rgpa_spec_st_st_n(); + init_rgba_stq(); + init_rgba_stq_stq(); + init_w_rgpa_spec_stq_stq_n(); +} + + +void r200EmitArrays( GLcontext *ctx, GLuint inputs ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint req = 0; + GLuint vtx = (rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] & + ~(R200_TCL_VTX_Q0|R200_TCL_VTX_Q1)); + int i; + static int firsttime = 1; + + if (firsttime) { + init_tcl_verts(); + firsttime = 0; + } + + if (1) { + req |= R200_CP_VC_FRMT_Z; + if (VB->ObjPtr->size == 4) { + req |= R200_CP_VC_FRMT_W0; + } + } + + if (inputs & VERT_NORM) { + req |= R200_CP_VC_FRMT_N0; + } + + if (inputs & VERT_RGBA) { + req |= R200_CP_VC_FRMT_PKCOLOR; + } + + if (inputs & VERT_SPEC_RGB) { + req |= R200_CP_VC_FRMT_PKSPEC; + } + + if (inputs & VERT_TEX0) { + req |= R200_CP_VC_FRMT_ST0; + + if (VB->TexCoordPtr[0]->size == 4) { + req |= R200_CP_VC_FRMT_Q0; + vtx |= R200_TCL_VTX_Q0; + } + } + + if (inputs & VERT_TEX1) { + req |= R200_CP_VC_FRMT_ST1; + + if (VB->TexCoordPtr[1]->size == 4) { + req |= R200_CP_VC_FRMT_Q1; + vtx |= R200_TCL_VTX_Q1; + } + } + + if (vtx != rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT]) { + R200_STATECHANGE( rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] = vtx; + } + + for (i = 0 ; i < R200_TCL_MAX_SETUP ; i++) + if ((setup_tab[i].vertex_format & req) == req) + break; + + if (rmesa->tcl.vertex_format == setup_tab[i].vertex_format && + rmesa->tcl.indexed_verts.buf) + return; + + if (rmesa->tcl.indexed_verts.buf) + r200ReleaseArrays( ctx, ~0 ); + + r200AllocDmaRegionVerts( rmesa, + &rmesa->tcl.indexed_verts, + VB->Count, + setup_tab[i].vertex_size * 4, + 4); + + setup_tab[i].emit( ctx, 0, VB->Count, + rmesa->tcl.indexed_verts.address + + rmesa->tcl.indexed_verts.start ); + + rmesa->tcl.vertex_format = setup_tab[i].vertex_format; + rmesa->tcl.indexed_verts.aos_start = GET_START( &rmesa->tcl.indexed_verts ); + rmesa->tcl.indexed_verts.aos_size = setup_tab[i].vertex_size; + rmesa->tcl.indexed_verts.aos_stride = setup_tab[i].vertex_size; + + rmesa->tcl.aos_components[0] = &rmesa->tcl.indexed_verts; + rmesa->tcl.nr_aos_components = 1; +} + + + +void r200ReleaseArrays( GLcontext *ctx, GLuint newinputs ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + if (R200_DEBUG & DEBUG_VERTS) + _tnl_print_vert_flags( __FUNCTION__, newinputs ); + + if (newinputs) + r200ReleaseDmaRegion( rmesa, &rmesa->tcl.indexed_verts, __FUNCTION__ ); +} Index: xc/lib/GL/mesa/src/drv/r200/r200_pixel.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_pixel.c:1.2 --- /dev/null Thu Feb 27 12:26:30 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_pixel.c Mon Dec 16 11:18:54 2002 @@ -0,0 +1,496 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_pixel.c,v 1.2 2002/12/16 16:18:54 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "enums.h" +#include "mtypes.h" +#include "macros.h" +#include "texutil.h" +#include "r200_context.h" +#include "r200_ioctl.h" +#include "r200_pixel.h" +#include "r200_swtcl.h" + +#include "xf86drm.h" +#include "swrast/swrast.h" + + + + + +static GLboolean +check_color( const GLcontext *ctx, GLenum type, GLenum format, + const struct gl_pixelstore_attrib *packing, + const void *pixels, GLint sz, GLint pitch ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint cpp = rmesa->r200Screen->cpp; + + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s\n", __FUNCTION__); + + if ( (pitch & 63) || + ctx->_ImageTransferState || + packing->SwapBytes || + packing->LsbFirst) { + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s: failed 1\n", __FUNCTION__); + return GL_FALSE; + } + + if ( type == GL_UNSIGNED_INT_8_8_8_8_REV && + cpp == 4 && + format == GL_BGRA ) { + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s: passed 2\n", __FUNCTION__); + return GL_TRUE; + } + + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s: failed\n", __FUNCTION__); + + return GL_FALSE; +} + +static GLboolean +check_color_per_fragment_ops( const GLcontext *ctx ) +{ + int result; + result = (!( ctx->Color.AlphaEnabled || + ctx->Depth.Test || + ctx->Fog.Enabled || + ctx->Scissor.Enabled || + ctx->Stencil.Enabled || + !ctx->Color.ColorMask[0] || + !ctx->Color.ColorMask[1] || + !ctx->Color.ColorMask[2] || + !ctx->Color.ColorMask[3] || + ctx->Color.ColorLogicOpEnabled || + ctx->Texture._ReallyEnabled || + ctx->Depth.OcclusionTest + ) && + ctx->Current.RasterPosValid); + + return result; +} + + + +static GLboolean +clip_pixelrect( const GLcontext *ctx, + const GLframebuffer *buffer, + GLint *x, GLint *y, + GLsizei *width, GLsizei *height, + GLint *size ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + /* left clipping */ + if (*x < buffer->_Xmin) { + *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) { + *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) * rmesa->r200Screen->frontPitch + + (*x + *width - 1) * rmesa->r200Screen->cpp); + + return GL_TRUE; +} + +static GLboolean +r200TryReadPixels( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *pack, + GLvoid *pixels ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLint size; + GLint pitch = pack->RowLength ? pack->RowLength : width; + GLint blit_format; + + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s\n", __FUNCTION__); + + /* Only accelerate reading to agp buffers. + */ + if ( !r200IsAgpMemory(rmesa, pixels, + pitch * height * rmesa->r200Screen->cpp ) ) { + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s: dest not agp\n", __FUNCTION__); + return GL_FALSE; + } + + /* Need GL_PACK_INVERT_MESA to cope with upsidedown results from + * blitter: + */ + if (!pack->Invert) { + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s: MESA_PACK_INVERT not set\n", __FUNCTION__); + return GL_FALSE; + } + + if (!check_color(ctx, type, format, pack, pixels, size, pitch)) + return GL_FALSE; + + switch ( rmesa->r200Screen->cpp ) { + case 4: + blit_format = R200_CP_COLOR_FORMAT_ARGB8888; + break; + default: + return GL_FALSE; + } + + + /* Although the blits go on the command buffer, need to do this and + * fire with lock held to guarentee cliprects and drawOffset are + * correct. + * + * This is an unusual situation however, as the code which flushes + * a full command buffer expects to be called unlocked. As a + * workaround, immediately flush the buffer on aquiring the lock. + */ + LOCK_HARDWARE( rmesa ); + + if (rmesa->store.cmd_used) + r200FlushCmdBufLocked( rmesa, __FUNCTION__ ); + + if (!clip_pixelrect(ctx, ctx->ReadBuffer, &x, &y, &width, &height, + &size)) { + UNLOCK_HARDWARE( rmesa ); + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s totally clipped -- nothing to do\n", + __FUNCTION__); + return GL_TRUE; + } + + { + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + int nbox = dPriv->numClipRects; + int src_offset = rmesa->state.color.drawOffset; + int src_pitch = rmesa->state.color.drawPitch * rmesa->r200Screen->cpp; + int dst_offset = r200AgpOffsetFromVirtual( rmesa, pixels); + int dst_pitch = pitch * rmesa->r200Screen->cpp; + XF86DRIClipRectRec *box = dPriv->pClipRects; + int i; + + r200EmitWait( rmesa, RADEON_WAIT_3D ); + + y = dPriv->h - y - height; + x += dPriv->x; + y += dPriv->y; + + + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "readpixel blit src_pitch %d dst_pitch %d\n", + src_pitch, dst_pitch); + + for (i = 0 ; i < nbox ; 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; + + r200EmitBlit( rmesa, + blit_format, + src_pitch, src_offset, + dst_pitch, dst_offset, + bx, by, + bx - x, by - y, + bw, bh ); + } + + r200FlushCmdBufLocked( rmesa, __FUNCTION__ ); + } + UNLOCK_HARDWARE( rmesa ); + + r200Finish( ctx ); /* required by GL */ + + return GL_TRUE; +} + +static void +r200ReadPixels( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *pack, + GLvoid *pixels ) +{ + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (!r200TryReadPixels( ctx, x, y, width, height, format, type, pack, + pixels)) + _swrast_ReadPixels( ctx, x, y, width, height, format, type, pack, + pixels); +} + + + + +static void do_draw_pix( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLint pitch, + const void *pixels, + GLuint dest, GLuint planemask) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + XF86DRIClipRectPtr box = dPriv->pClipRects; + int nbox = dPriv->numClipRects; + int i; + int blit_format; + int size; + int src_offset = r200AgpOffsetFromVirtual( rmesa, pixels); + int src_pitch = pitch * rmesa->r200Screen->cpp; + + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s\n", __FUNCTION__); + + switch ( rmesa->r200Screen->cpp ) { + case 2: + blit_format = R200_CP_COLOR_FORMAT_RGB565; + break; + case 4: + blit_format = R200_CP_COLOR_FORMAT_ARGB8888; + break; + default: + return; + } + + + LOCK_HARDWARE( rmesa ); + + if (rmesa->store.cmd_used) + r200FlushCmdBufLocked( rmesa, __FUNCTION__ ); + + y -= height; /* cope with pixel zoom */ + + if (!clip_pixelrect(ctx, ctx->DrawBuffer, + &x, &y, &width, &height, + &size)) { + UNLOCK_HARDWARE( rmesa ); + return; + } + + y = dPriv->h - y - height; /* convert from gl to hardware coords */ + x += dPriv->x; + y += dPriv->y; + + + r200EmitWait( rmesa, RADEON_WAIT_3D ); + + for (i = 0 ; i < nbox ; 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; + + r200EmitBlit( rmesa, + blit_format, + src_pitch, src_offset, + rmesa->state.color.drawPitch * rmesa->r200Screen->cpp, + rmesa->state.color.drawOffset, + bx - x, by - y, + bx, by, + bw, bh ); + } + + r200FlushCmdBufLocked( rmesa, __FUNCTION__ ); + r200WaitForIdleLocked( rmesa ); /* required by GL */ + UNLOCK_HARDWARE( rmesa ); +} + + + + +static GLboolean +r200TryDrawPixels( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLint pitch = unpack->RowLength ? unpack->RowLength : width; + GLuint dest, planemask; + GLuint cpp = rmesa->r200Screen->cpp; + GLint size = width * pitch * cpp; + + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s\n", __FUNCTION__); + + switch (format) { + case GL_RGB: + case GL_RGBA: + case GL_BGRA: + dest = rmesa->state.color.drawOffset; + + planemask = r200PackColor(cpp, + ctx->Color.ColorMask[RCOMP], + ctx->Color.ColorMask[GCOMP], + ctx->Color.ColorMask[BCOMP], + ctx->Color.ColorMask[ACOMP]); + + if (cpp == 2) + planemask |= planemask << 16; + + if (planemask != ~0) + return GL_FALSE; /* fix me -- should be possible */ + + /* Can't do conversions on agp reads/draws. + */ + if ( !r200IsAgpMemory( rmesa, pixels, size ) ) { + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s: not agp memory\n", __FUNCTION__); + return GL_FALSE; + } + + if (!check_color(ctx, type, format, unpack, pixels, size, pitch)) { + return GL_FALSE; + } + if (!check_color_per_fragment_ops(ctx)) { + return GL_FALSE; + } + + if (ctx->Pixel.ZoomX != 1.0F || + ctx->Pixel.ZoomY != -1.0F) + return GL_FALSE; + break; + + default: + return GL_FALSE; + } + + if ( r200IsAgpMemory(rmesa, pixels, size) ) + { + do_draw_pix( ctx, x, y, width, height, pitch, pixels, + dest, planemask ); + return GL_TRUE; + } + else if (0) + { + /* Pixels is in regular memory -- get dma buffers and perform + * upload through them. + */ + } + else + return GL_FALSE; +} + +static void +r200DrawPixels( GLcontext *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ) +{ + if (R200_DEBUG & DEBUG_PIXEL) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (!r200TryDrawPixels( ctx, x, y, width, height, format, type, + unpack, pixels )) + _swrast_DrawPixels( ctx, x, y, width, height, format, type, + unpack, pixels ); +} + + +static void +r200Bitmap( GLcontext *ctx, GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (rmesa->Fallback) + _swrast_Bitmap( ctx, px, py, width, height, unpack, bitmap ); + else + r200PointsBitmap( ctx, px, py, width, height, unpack, bitmap ); +} + + + +void r200InitPixelFuncs( GLcontext *ctx ) +{ + /* Pixel path fallbacks. + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.Bitmap = _swrast_Bitmap; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; + + if (!getenv("R200_NO_BLITS") && R200_CONTEXT(ctx)->dri.drmMinor >= 6) { + ctx->Driver.ReadPixels = r200ReadPixels; + ctx->Driver.DrawPixels = r200DrawPixels; + if (getenv("R200_HW_BITMAP")) + ctx->Driver.Bitmap = r200Bitmap; + } +} Index: xc/lib/GL/mesa/src/drv/r200/r200_pixel.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_pixel.h:1.1 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_pixel.h Wed Oct 30 07:51:52 2002 @@ -0,0 +1,43 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_pixel.h,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_PIXEL_H__ +#define __R200_PIXEL_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern void r200InitPixelFuncs( GLcontext *ctx ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_reg.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_reg.h:1.2 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_reg.h Mon Dec 16 11:18:54 2002 @@ -0,0 +1,1416 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_reg.h,v 1.2 2002/12/16 16:18:54 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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. +*/ + +#ifndef _R200_REG_H_ +#define _R200_REG_H_ + +#define R200_PP_MISC 0x1c14 +#define R200_REF_ALPHA_MASK 0x000000ff +#define R200_ALPHA_TEST_FAIL (0 << 8) +#define R200_ALPHA_TEST_LESS (1 << 8) +#define R200_ALPHA_TEST_LEQUAL (2 << 8) +#define R200_ALPHA_TEST_EQUAL (3 << 8) +#define R200_ALPHA_TEST_GEQUAL (4 << 8) +#define R200_ALPHA_TEST_GREATER (5 << 8) +#define R200_ALPHA_TEST_NEQUAL (6 << 8) +#define R200_ALPHA_TEST_PASS (7 << 8) +#define R200_ALPHA_TEST_OP_MASK (7 << 8) +#define R200_CHROMA_FUNC_FAIL (0 << 16) +#define R200_CHROMA_FUNC_PASS (1 << 16) +#define R200_CHROMA_FUNC_NEQUAL (2 << 16) +#define R200_CHROMA_FUNC_EQUAL (3 << 16) +#define R200_CHROMA_KEY_NEAREST (0 << 18) +#define R200_CHROMA_KEY_ZERO (1 << 18) +#define R200_RIGHT_HAND_CUBE_D3D (0 << 24) +#define R200_RIGHT_HAND_CUBE_OGL (1 << 24) +#define R200_PP_FOG_COLOR 0x1c18 +#define R200_FOG_COLOR_MASK 0x00ffffff +#define R200_FOG_VERTEX (0 << 24) +#define R200_FOG_TABLE (1 << 24) +#define R200_FOG_USE_DEPTH (0 << 25) +#define R200_FOG_USE_W (1 << 25) +#define R200_FOG_USE_DIFFUSE_ALPHA (2 << 25) +#define R200_FOG_USE_SPEC_ALPHA (3 << 25) +#define R200_FOG_USE_VTX_FOG (4 << 25) +#define R200_RE_SOLID_COLOR 0x1c1c +#define R200_RB3D_BLENDCNTL 0x1c20 +#define R200_COMB_FCN_MASK (7 << 12) +#define R200_COMB_FCN_ADD_CLAMP (0 << 12) +#define R200_COMB_FCN_ADD_NOCLAMP (1 << 12) +#define R200_COMB_FCN_SUB_CLAMP (2 << 12) +#define R200_COMB_FCN_SUB_NOCLAMP (3 << 12) +#define R200_COMB_FCN_MIN (4 << 12) +#define R200_COMB_FCN_MAX (5 << 12) +#define R200_COMB_FCN_RSUB_CLAMP (6 << 12) +#define R200_COMB_FCN_RSUB_NOCLAMP (7 << 12) +#define R200_SRC_BLEND_GL_ZERO (32 << 16) +#define R200_SRC_BLEND_GL_ONE (33 << 16) +#define R200_SRC_BLEND_GL_SRC_COLOR (34 << 16) +#define R200_SRC_BLEND_GL_ONE_MINUS_SRC_COLOR (35 << 16) +#define R200_SRC_BLEND_GL_DST_COLOR (36 << 16) +#define R200_SRC_BLEND_GL_ONE_MINUS_DST_COLOR (37 << 16) +#define R200_SRC_BLEND_GL_SRC_ALPHA (38 << 16) +#define R200_SRC_BLEND_GL_ONE_MINUS_SRC_ALPHA (39 << 16) +#define R200_SRC_BLEND_GL_DST_ALPHA (40 << 16) +#define R200_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA (41 << 16) +#define R200_SRC_BLEND_GL_SRC_ALPHA_SATURATE (42 << 16) +#define R200_SRC_BLEND_GL_CONST_COLOR (43 << 16) +#define R200_SRC_BLEND_GL_ONE_MINUS_CONST_COLOR (44 << 16) +#define R200_SRC_BLEND_GL_CONST_ALPHA (45 << 16) +#define R200_SRC_BLEND_GL_ONE_MINUS_CONST_ALPHA (46 << 16) +#define R200_SRC_BLEND_MASK (63 << 16) +#define R200_DST_BLEND_GL_ZERO (32 << 24) +#define R200_DST_BLEND_GL_ONE (33 << 24) +#define R200_DST_BLEND_GL_SRC_COLOR (34 << 24) +#define R200_DST_BLEND_GL_ONE_MINUS_SRC_COLOR (35 << 24) +#define R200_DST_BLEND_GL_DST_COLOR (36 << 24) +#define R200_DST_BLEND_GL_ONE_MINUS_DST_COLOR (37 << 24) +#define R200_DST_BLEND_GL_SRC_ALPHA (38 << 24) +#define R200_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA (39 << 24) +#define R200_DST_BLEND_GL_DST_ALPHA (40 << 24) +#define R200_DST_BLEND_GL_ONE_MINUS_DST_ALPHA (41 << 24) +#define R200_DST_BLEND_GL_CONST_COLOR (43 << 24) +#define R200_DST_BLEND_GL_ONE_MINUS_CONST_COLOR (44 << 24) +#define R200_DST_BLEND_GL_CONST_ALPHA (45 << 24) +#define R200_DST_BLEND_GL_ONE_MINUS_CONST_ALPHA (46 << 24) +#define R200_DST_BLEND_MASK (63 << 24) +#define R200_RB3D_DEPTHOFFSET 0x1c24 +#define R200_RB3D_DEPTHPITCH 0x1c28 +#define R200_DEPTHPITCH_MASK 0x00001ff8 +#define R200_DEPTH_ENDIAN_NO_SWAP (0 << 18) +#define R200_DEPTH_ENDIAN_WORD_SWAP (1 << 18) +#define R200_DEPTH_ENDIAN_DWORD_SWAP (2 << 18) +#define R200_RB3D_ZSTENCILCNTL 0x1c2c +#define R200_DEPTH_FORMAT_MASK (0xf << 0) +#define R200_DEPTH_FORMAT_16BIT_INT_Z (0 << 0) +#define R200_DEPTH_FORMAT_24BIT_INT_Z (2 << 0) +#define R200_DEPTH_FORMAT_24BIT_FLOAT_Z (3 << 0) +#define R200_DEPTH_FORMAT_32BIT_INT_Z (4 << 0) +#define R200_DEPTH_FORMAT_32BIT_FLOAT_Z (5 << 0) +#define R200_DEPTH_FORMAT_24BIT_FLOAT_W (9 << 0) +#define R200_DEPTH_FORMAT_32BIT_FLOAT_W (11 << 0) +#define R200_Z_TEST_NEVER (0 << 4) +#define R200_Z_TEST_LESS (1 << 4) +#define R200_Z_TEST_LEQUAL (2 << 4) +#define R200_Z_TEST_EQUAL (3 << 4) +#define R200_Z_TEST_GEQUAL (4 << 4) +#define R200_Z_TEST_GREATER (5 << 4) +#define R200_Z_TEST_NEQUAL (6 << 4) +#define R200_Z_TEST_ALWAYS (7 << 4) +#define R200_Z_TEST_MASK (7 << 4) +#define R200_STENCIL_TEST_NEVER (0 << 12) +#define R200_STENCIL_TEST_LESS (1 << 12) +#define R200_STENCIL_TEST_LEQUAL (2 << 12) +#define R200_STENCIL_TEST_EQUAL (3 << 12) +#define R200_STENCIL_TEST_GEQUAL (4 << 12) +#define R200_STENCIL_TEST_GREATER (5 << 12) +#define R200_STENCIL_TEST_NEQUAL (6 << 12) +#define R200_STENCIL_TEST_ALWAYS (7 << 12) +#define R200_STENCIL_TEST_MASK (0x7 << 12) +#define R200_STENCIL_FAIL_KEEP (0 << 16) +#define R200_STENCIL_FAIL_ZERO (1 << 16) +#define R200_STENCIL_FAIL_REPLACE (2 << 16) +#define R200_STENCIL_FAIL_INC (3 << 16) +#define R200_STENCIL_FAIL_DEC (4 << 16) +#define R200_STENCIL_FAIL_INVERT (5 << 16) +#define R200_STENCIL_FAIL_INC_WRAP (6 << 16) +#define R200_STENCIL_FAIL_DEC_WRAP (7 << 16) +#define R200_STENCIL_FAIL_MASK (0x7 << 16) +#define R200_STENCIL_ZPASS_KEEP (0 << 20) +#define R200_STENCIL_ZPASS_ZERO (1 << 20) +#define R200_STENCIL_ZPASS_REPLACE (2 << 20) +#define R200_STENCIL_ZPASS_INC (3 << 20) +#define R200_STENCIL_ZPASS_DEC (4 << 20) +#define R200_STENCIL_ZPASS_INVERT (5 << 20) +#define R200_STENCIL_ZPASS_INC_WRAP (6 << 20) +#define R200_STENCIL_ZPASS_DEC_WRAP (7 << 20) +#define R200_STENCIL_ZPASS_MASK (0x7 << 20) +#define R200_STENCIL_ZFAIL_KEEP (0 << 24) +#define R200_STENCIL_ZFAIL_ZERO (1 << 24) +#define R200_STENCIL_ZFAIL_REPLACE (2 << 24) +#define R200_STENCIL_ZFAIL_INC (3 << 24) +#define R200_STENCIL_ZFAIL_DEC (4 << 24) +#define R200_STENCIL_ZFAIL_INVERT (5 << 24) +#define R200_STENCIL_ZFAIL_INC_WRAP (6 << 24) +#define R200_STENCIL_ZFAIL_DEC_WRAP (7 << 24) +#define R200_STENCIL_ZFAIL_MASK (0x7 << 24) +#define R200_Z_WRITE_ENABLE (1 << 30) +/*gap*/ +#define R200_PP_CNTL 0x1c38 +#define R200_TEX_0_ENABLE 0x00000010 +#define R200_TEX_1_ENABLE 0x00000020 +#define R200_TEX_2_ENABLE 0x00000040 +#define R200_TEX_3_ENABLE 0x00000080 +#define R200_TEX_4_ENABLE 0x00000100 +#define R200_TEX_5_ENABLE 0x00000200 +#define R200_TEX_ENABLE_MASK 0x000003f0 +#define R200_FILTER_ROUND_MODE_MASK 0x00000400 +#define R200_TEX_BLEND_7_ENABLE 0x00000800 +#define R200_TEX_BLEND_0_ENABLE 0x00001000 +#define R200_TEX_BLEND_1_ENABLE 0x00002000 +#define R200_TEX_BLEND_2_ENABLE 0x00004000 +#define R200_TEX_BLEND_3_ENABLE 0x00008000 +#define R200_TEX_BLEND_4_ENABLE 0x00010000 +#define R200_TEX_BLEND_5_ENABLE 0x00020000 +#define R200_TEX_BLEND_6_ENABLE 0x00040000 +#define R200_MULTI_PASS_ENABLE 0x00080000 +#define R200_SPECULAR_ENABLE 0x00200000 +#define R200_FOG_ENABLE 0x00400000 +#define R200_ALPHA_TEST_ENABLE 0x00800000 +#define R200_ANTI_ALIAS_NONE 0x00000000 +#define R200_ANTI_ALIAS_LINE 0x01000000 +#define R200_ANTI_ALIAS_POLY 0x02000000 +#define R200_ANTI_ALIAS_MASK 0x03000000 +#define R200_RB3D_CNTL 0x1c3c +#define R200_ALPHA_BLEND_ENABLE (1 << 0) +#define R200_PLANE_MASK_ENABLE (1 << 1) +#define R200_DITHER_ENABLE (1 << 2) +#define R200_ROUND_ENABLE (1 << 3) +#define R200_SCALE_DITHER_ENABLE (1 << 4) +#define R200_DITHER_INIT (1 << 5) +#define R200_ROP_ENABLE (1 << 6) +#define R200_STENCIL_ENABLE (1 << 7) +#define R200_Z_ENABLE (1 << 8) +#define R200_DEPTH_XZ_OFFEST_ENABLE (1 << 9) +#define R200_COLOR_FORMAT_ARGB1555 (3 << 10) +#define R200_COLOR_FORMAT_RGB565 (4 << 10) +#define R200_COLOR_FORMAT_ARGB8888 (6 << 10) +#define R200_COLOR_FORMAT_RGB332 (7 << 10) +#define R200_COLOR_FORMAT_Y8 (8 << 10) +#define R200_COLOR_FORMAT_RGB8 (9 << 10) +#define R200_COLOR_FORMAT_YUV422_VYUY (11 << 10) +#define R200_COLOR_FORMAT_YUV422_YVYU (12 << 10) +#define R200_COLOR_FORMAT_aYUV444 (14 << 10) +#define R200_COLOR_FORMAT_ARGB4444 (15 << 10) +#define R200_CLRCMP_FLIP_ENABLE (1 << 14) +#define R200_SEPARATE_ALPHA_ENABLE (1 << 16) +#define R200_RB3D_COLOROFFSET 0x1c40 +#define R200_COLOROFFSET_MASK 0xfffffff0 +#define R200_RE_WIDTH_HEIGHT 0x1c44 +#define R200_RE_WIDTH_SHIFT 0 +#define R200_RE_HEIGHT_SHIFT 16 +#define R200_RB3D_COLORPITCH 0x1c48 +#define R200_COLORPITCH_MASK 0x000001ff8 +#define R200_COLOR_ENDIAN_NO_SWAP (0 << 18) +#define R200_COLOR_ENDIAN_WORD_SWAP (1 << 18) +#define R200_COLOR_ENDIAN_DWORD_SWAP (2 << 18) +#define R200_SE_CNTL 0x1c4c +#define R200_FFACE_CULL_CW (0 << 0) +#define R200_FFACE_CULL_CCW (1 << 0) +#define R200_FFACE_CULL_DIR_MASK (1 << 0) +#define R200_BFACE_CULL (0 << 1) +#define R200_BFACE_SOLID (3 << 1) +#define R200_FFACE_CULL (0 << 3) +#define R200_FFACE_SOLID (3 << 3) +#define R200_FFACE_CULL_MASK (3 << 3) +#define R200_FLAT_SHADE_VTX_0 (0 << 6) +#define R200_FLAT_SHADE_VTX_1 (1 << 6) +#define R200_FLAT_SHADE_VTX_2 (2 << 6) +#define R200_FLAT_SHADE_VTX_LAST (3 << 6) +#define R200_DIFFUSE_SHADE_SOLID (0 << 8) +#define R200_DIFFUSE_SHADE_FLAT (1 << 8) +#define R200_DIFFUSE_SHADE_GOURAUD (2 << 8) +#define R200_DIFFUSE_SHADE_MASK (3 << 8) +#define R200_ALPHA_SHADE_SOLID (0 << 10) +#define R200_ALPHA_SHADE_FLAT (1 << 10) +#define R200_ALPHA_SHADE_GOURAUD (2 << 10) +#define R200_ALPHA_SHADE_MASK (3 << 10) +#define R200_SPECULAR_SHADE_SOLID (0 << 12) +#define R200_SPECULAR_SHADE_FLAT (1 << 12) +#define R200_SPECULAR_SHADE_GOURAUD (2 << 12) +#define R200_SPECULAR_SHADE_MASK (3 << 12) +#define R200_FOG_SHADE_SOLID (0 << 14) +#define R200_FOG_SHADE_FLAT (1 << 14) +#define R200_FOG_SHADE_GOURAUD (2 << 14) +#define R200_FOG_SHADE_MASK (3 << 14) +#define R200_ZBIAS_ENABLE_POINT (1 << 16) +#define R200_ZBIAS_ENABLE_LINE (1 << 17) +#define R200_ZBIAS_ENABLE_TRI (1 << 18) +#define R200_WIDELINE_ENABLE (1 << 20) +#define R200_VTX_PIX_CENTER_D3D (0 << 27) +#define R200_VTX_PIX_CENTER_OGL (1 << 27) +#define R200_ROUND_MODE_TRUNC (0 << 28) +#define R200_ROUND_MODE_ROUND (1 << 28) +#define R200_ROUND_MODE_ROUND_EVEN (2 << 28) +#define R200_ROUND_MODE_ROUND_ODD (3 << 28) +#define R200_ROUND_PREC_16TH_PIX (0 << 30) +#define R200_ROUND_PREC_8TH_PIX (1 << 30) +#define R200_ROUND_PREC_4TH_PIX (2 << 30) +#define R200_ROUND_PREC_HALF_PIX (3 << 30) +#define R200_RE_CNTL 0x1c50 +#define R200_STIPPLE_ENABLE 0x1 +#define R200_SCISSOR_ENABLE 0x2 +#define R200_PATTERN_ENABLE 0x4 +#define R200_PERSPECTIVE_ENABLE 0x8 +#define R200_POINT_SMOOTH 0x20 +#define R200_VTX_STQ0_D3D 0x00010000 +#define R200_VTX_STQ1_D3D 0x00040000 +#define R200_VTX_STQ2_D3D 0x00100000 +#define R200_VTX_STQ3_D3D 0x00400000 +#define R200_VTX_STQ4_D3D 0x01000000 +#define R200_VTX_STQ5_D3D 0x04000000 +/* gap */ +#define R200_RE_STIPPLE_ADDR 0x1cc8 +#define R200_RE_STIPPLE_DATA 0x1ccc +#define R200_RE_LINE_PATTERN 0x1cd0 +#define R200_LINE_PATTERN_MASK 0x0000ffff +#define R200_LINE_REPEAT_COUNT_SHIFT 16 +#define R200_LINE_PATTERN_START_SHIFT 24 +#define R200_LINE_PATTERN_LITTLE_BIT_ORDER (0 << 28) +#define R200_LINE_PATTERN_BIG_BIT_ORDER (1 << 28) +#define R200_LINE_PATTERN_AUTO_RESET (1 << 29) +#define R200_RE_LINE_STATE 0x1cd4 +#define R200_LINE_CURRENT_PTR_SHIFT 0 +#define R200_LINE_CURRENT_COUNT_SHIFT 8 +#define R200_RE_SCISSOR_TL_0 0x1cd8 +#define R200_RE_SCISSOR_BR_0 0x1cdc +#define R200_RE_SCISSOR_TL_1 0x1ce0 +#define R200_RE_SCISSOR_BR_1 0x1ce4 +#define R200_RE_SCISSOR_TL_2 0x1ce8 +#define R200_RE_SCISSOR_BR_2 0x1cec +/* gap */ +#define R200_RB3D_DEPTHXY_OFFSET 0x1d60 +#define R200_DEPTHX_SHIFT 0 +#define R200_DEPTHY_SHIFT 16 +/* gap */ +#define R200_RB3D_STENCILREFMASK 0x1d7c +#define R200_STENCIL_REF_SHIFT 0 +#define R200_STENCIL_REF_MASK (0xff << 0) +#define R200_STENCIL_MASK_SHIFT 16 +#define R200_STENCIL_VALUE_MASK (0xff << 16) +#define R200_STENCIL_WRITEMASK_SHIFT 24 +#define R200_STENCIL_WRITE_MASK (0xff << 24) +#define R200_RB3D_ROPCNTL 0x1d80 +#define R200_ROP_MASK (15 << 8) +#define R200_ROP_CLEAR (0 << 8) +#define R200_ROP_NOR (1 << 8) +#define R200_ROP_AND_INVERTED (2 << 8) +#define R200_ROP_COPY_INVERTED (3 << 8) +#define R200_ROP_AND_REVERSE (4 << 8) +#define R200_ROP_INVERT (5 << 8) +#define R200_ROP_XOR (6 << 8) +#define R200_ROP_NAND (7 << 8) +#define R200_ROP_AND (8 << 8) +#define R200_ROP_EQUIV (9 << 8) +#define R200_ROP_NOOP (10 << 8) +#define R200_ROP_OR_INVERTED (11 << 8) +#define R200_ROP_COPY (12 << 8) +#define R200_ROP_OR_REVERSE (13 << 8) +#define R200_ROP_OR (14 << 8) +#define R200_ROP_SET (15 << 8) +#define R200_RB3D_PLANEMASK 0x1d84 +/* gap */ +#define R200_SE_VPORT_XSCALE 0x1d98 +#define R200_SE_VPORT_XOFFSET 0x1d9c +#define R200_SE_VPORT_YSCALE 0x1da0 +#define R200_SE_VPORT_YOFFSET 0x1da4 +#define R200_SE_VPORT_ZSCALE 0x1da8 +#define R200_SE_VPORT_ZOFFSET 0x1dac +#define R200_SE_ZBIAS_FACTOR 0x1db0 +#define R200_SE_ZBIAS_CONSTANT 0x1db4 +#define R200_SE_LINE_WIDTH 0x1db8 +#define R200_LINE_WIDTH_SHIFT 0x00000000 +#define R200_MINPOINTSIZE_SHIFT 0x00000010 +/* gap */ +#define R200_SE_VAP_CNTL 0x2080 +#define R200_VAP_TCL_ENABLE 0x00000001 +#define R200_VAP_SINGLE_BUF_STATE_ENABLE 0x00000010 +#define R200_VAP_FORCE_W_TO_ONE 0x00010000 +#define R200_VAP_D3D_TEX_DEFAULT 0x00020000 +#define R200_VAP_VF_MAX_VTX_NUM__SHIFT 18 +#define R200_VAP_DX_CLIP_SPACE_DEF 0x00400000 +#define R200_SE_VF_CNTL 0x2084 +#define R200_VF_PRIM_NONE 0x00000000 +#define R200_VF_PRIM_POINTS 0x00000001 +#define R200_VF_PRIM_LINES 0x00000002 +#define R200_VF_PRIM_LINE_STRIP 0x00000003 +#define R200_VF_PRIM_TRIANGLES 0x00000004 +#define R200_VF_PRIM_TRIANGLE_FAN 0x00000005 +#define R200_VF_PRIM_TRIANGLE_STRIP 0x00000006 +#define R200_VF_PRIM_RECT_LIST 0x00000008 +#define R200_VF_PRIM_3VRT_POINTS 0x00000009 +#define R200_VF_PRIM_3VRT_LINES 0x0000000a +#define R200_VF_PRIM_POINT_SPRITES 0x0000000b +#define R200_VF_PRIM_LINE_LOOP 0x0000000c +#define R200_VF_PRIM_QUADS 0x0000000d +#define R200_VF_PRIM_QUAD_STRIP 0x0000000e +#define R200_VF_PRIM_POLYGON 0x0000000f +#define R200_VF_PRIM_MASK 0x0000000f +#define R200_VF_PRIM_WALK_IND 0x00000010 +#define R200_VF_PRIM_WALK_LIST 0x00000020 +#define R200_VF_PRIM_WALK_RING 0x00000030 +#define R200_VF_PRIM_WALK_MASK 0x00000030 +#define R200_VF_COLOR_ORDER_RGBA 0x00000040 +#define R200_VF_TCL_OUTPUT_VTX_ENABLE 0x00000200 +#define R200_VF_INDEX_SZ_4 0x00000800 +#define R200_VF_VERTEX_NUMBER_MASK 0xffff0000 +#define R200_VF_VERTEX_NUMBER_SHIFT 16 +#define R200_SE_VTX_FMT_0 0x2088 +#define R200_VTX_XY 0 /* always have xy */ +#define R200_VTX_Z0 (1<<0) +#define R200_VTX_W0 (1<<1) +#define R200_VTX_WEIGHT_COUNT_SHIFT (2) +#define R200_VTX_PV_MATRIX_SEL (1<<5) +#define R200_VTX_N0 (1<<6) +#define R200_VTX_POINT_SIZE (1<<7) +#define R200_VTX_DISCRETE_FOG (1<<8) +#define R200_VTX_SHININESS_0 (1<<9) +#define R200_VTX_SHININESS_1 (1<<10) +#define R200_VTX_COLOR_NOT_PRESENT 0 +#define R200_VTX_PK_RGBA 1 +#define R200_VTX_FP_RGB 2 +#define R200_VTX_FP_RGBA 3 +#define R200_VTX_COLOR_MASK 3 +#define R200_VTX_COLOR_0_SHIFT 11 +#define R200_VTX_COLOR_1_SHIFT 13 +#define R200_VTX_COLOR_2_SHIFT 15 +#define R200_VTX_COLOR_3_SHIFT 17 +#define R200_VTX_COLOR_4_SHIFT 19 +#define R200_VTX_COLOR_5_SHIFT 21 +#define R200_VTX_COLOR_6_SHIFT 23 +#define R200_VTX_COLOR_7_SHIFT 25 +#define R200_VTX_XY1 (1<<28) +#define R200_VTX_Z1 (1<<29) +#define R200_VTX_W1 (1<<30) +#define R200_VTX_N1 (1<<31) +#define R200_SE_VTX_FMT_1 0x208c +#define R200_VTX_TEX0_COMP_CNT_SHIFT 0 +#define R200_VTX_TEX1_COMP_CNT_SHIFT 3 +#define R200_VTX_TEX2_COMP_CNT_SHIFT 6 +#define R200_VTX_TEX3_COMP_CNT_SHIFT 9 +#define R200_VTX_TEX4_COMP_CNT_SHIFT 12 +#define R200_VTX_TEX5_COMP_CNT_SHIFT 15 +#define R200_SE_TCL_OUTPUT_VTX_FMT_0 0x2090 +#define R200_SE_TCL_OUTPUT_VTX_FMT_1 0x2094 +/* gap */ +#define R200_SE_VTE_CNTL 0x20b0 +#define R200_VPORT_X_SCALE_ENA 0x00000001 +#define R200_VPORT_X_OFFSET_ENA 0x00000002 +#define R200_VPORT_Y_SCALE_ENA 0x00000004 +#define R200_VPORT_Y_OFFSET_ENA 0x00000008 +#define R200_VPORT_Z_SCALE_ENA 0x00000010 +#define R200_VPORT_Z_OFFSET_ENA 0x00000020 +#define R200_VTX_XY_FMT 0x00000100 +#define R200_VTX_Z_FMT 0x00000200 +#define R200_VTX_W0_FMT 0x00000400 +#define R200_VTX_W0_NORMALIZE 0x00000800 +#define R200_VTX_ST_DENORMALIZED 0x00001000 +/* gap */ +#define R200_SE_VTX_NUM_ARRAYS 0x20c0 +#define R200_SE_VTX_AOS_ATTR01 0x20c4 +#define R200_SE_VTX_AOS_ADDR0 0x20c8 +#define R200_SE_VTX_AOS_ADDR1 0x20cc +#define R200_SE_VTX_AOS_ATTR23 0x20d0 +#define R200_SE_VTX_AOS_ADDR2 0x20d4 +#define R200_SE_VTX_AOS_ADDR3 0x20d8 +#define R200_SE_VTX_AOS_ATTR45 0x20dc +#define R200_SE_VTX_AOS_ADDR4 0x20e0 +#define R200_SE_VTX_AOS_ADDR5 0x20e4 +#define R200_SE_VTX_AOS_ATTR67 0x20e8 +#define R200_SE_VTX_AOS_ADDR6 0x20ec +#define R200_SE_VTX_AOS_ADDR7 0x20f0 +#define R200_SE_VTX_AOS_ATTR89 0x20f4 +#define R200_SE_VTX_AOS_ADDR8 0x20f8 +#define R200_SE_VTX_AOS_ADDR9 0x20fc +#define R200_SE_VTX_AOS_ATTR1011 0x2100 +#define R200_SE_VTX_AOS_ADDR10 0x2104 +#define R200_SE_VTX_AOS_ADDR11 0x2108 +#define R200_SE_VF_MAX_VTX_INDX 0x210c +#define R200_SE_VF_MIN_VTX_INDX 0x2110 +/* gap */ +#define R200_SE_VAP_CNTL_STATUS 0x2140 +#define R200_VC_NO_SWAP (0 << 0) +#define R200_VC_16BIT_SWAP (1 << 0) +#define R200_VC_32BIT_SWAP (2 << 0) +/* gap */ +#define R200_SE_VTX_STATE_CNTL 0x2180 +#define R200_VSC_COLOR_0_ASSEMBLY_CNTL_SHIFT 0x00000000 +#define R200_VSC_COLOR_1_ASSEMBLY_CNTL_SHIFT 0x00000002 +#define R200_VSC_COLOR_2_ASSEMBLY_CNTL_SHIFT 0x00000004 +#define R200_VSC_COLOR_3_ASSEMBLY_CNTL_SHIFT 0x00000006 +#define R200_VSC_COLOR_4_ASSEMBLY_CNTL_SHIFT 0x00000008 +#define R200_VSC_COLOR_5_ASSEMBLY_CNTL_SHIFT 0x0000000a +#define R200_VSC_COLOR_6_ASSEMBLY_CNTL_SHIFT 0x0000000c +#define R200_VSC_COLOR_7_ASSEMBLY_CNTL_SHIFT 0x0000000e +#define R200_VSC_UPDATE_USER_COLOR_0_ENABLE 0x00010000 +#define R200_VSC_UPDATE_USER_COLOR_1_ENABLE 0x00020000 +/* gap */ +#define R200_SE_TCL_VECTOR_INDX_REG 0x2200 +#define R200_SE_TCL_VECTOR_DATA_REG 0x2204 +#define R200_SE_TCL_SCALAR_INDX_REG 0x2208 +#define R200_SE_TCL_SCALAR_DATA_REG 0x220c +/* gap */ +#define R200_SE_TCL_MATRIX_SEL_0 0x2230 +#define R200_MODELVIEW_0_SHIFT (0) +#define R200_MODELVIEW_1_SHIFT (8) +#define R200_MODELVIEW_2_SHIFT (16) +#define R200_MODELVIEW_3_SHIFT (24) +#define R200_SE_TCL_MATRIX_SEL_1 0x2234 +#define R200_IT_MODELVIEW_0_SHIFT (0) +#define R200_IT_MODELVIEW_1_SHIFT (8) +#define R200_IT_MODELVIEW_2_SHIFT (16) +#define R200_IT_MODELVIEW_3_SHIFT (24) +#define R200_SE_TCL_MATRIX_SEL_2 0x2238 +#define R200_MODELPROJECT_0_SHIFT (0) +#define R200_MODELPROJECT_1_SHIFT (8) +#define R200_MODELPROJECT_2_SHIFT (16) +#define R200_MODELPROJECT_3_SHIFT (24) +#define R200_SE_TCL_MATRIX_SEL_3 0x223c +#define R200_TEXMAT_0_SHIFT 0 +#define R200_TEXMAT_1_SHIFT 8 +#define R200_TEXMAT_2_SHIFT 16 +#define R200_TEXMAT_3_SHIFT 24 +#define R200_SE_TCL_MATRIX_SEL_4 0x2240 +#define R200_TEXMAT_4_SHIFT 0 +#define R200_TEXMAT_5_SHIFT 8 +/* gap */ +#define R200_SE_TCL_OUTPUT_VTX_COMP_SEL 0x2250 +#define R200_OUTPUT_XYZW (1<<0) +#define R200_OUTPUT_COLOR_0 (1<<8) +#define R200_OUTPUT_COLOR_1 (1<<9) +#define R200_OUTPUT_TEX_0 (1<<16) +#define R200_OUTPUT_TEX_1 (1<<17) +#define R200_OUTPUT_TEX_2 (1<<18) +#define R200_OUTPUT_TEX_3 (1<<19) +#define R200_OUTPUT_TEX_4 (1<<20) +#define R200_OUTPUT_TEX_5 (1<<21) +#define R200_OUTPUT_TEX_MASK (0x3f<<16) +#define R200_OUTPUT_PT_SIZE (1<<25) +#define R200_FORCE_INORDER_PROC (1<<31) +#define R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_0 0x2254 +#define R200_VERTEX_POSITION_ADDR__SHIFT 0x00000000 +#define R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_1 0x2258 +#define R200_VTX_COLOR_0_ADDR__SHIFT 0x00000000 +#define R200_VTX_COLOR_1_ADDR__SHIFT 0x00000008 +#define R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_2 0x225c +#define R200_VTX_TEX_0_ADDR__SHIFT 0x00000000 +#define R200_VTX_TEX_1_ADDR__SHIFT 0x00000008 +#define R200_VTX_TEX_2_ADDR__SHIFT 0x00000010 +#define R200_VTX_TEX_3_ADDR__SHIFT 0x00000018 +#define R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_3 0x2260 +#define R200_VTX_TEX_4_ADDR__SHIFT 0x00000000 +#define R200_VTX_TEX_5_ADDR__SHIFT 0x00000008 + +/* gap */ +#define R200_SE_TCL_LIGHT_MODEL_CTL_0 0x2268 +#define R200_LIGHTING_ENABLE (1<<0) +#define R200_LIGHT_IN_MODELSPACE (1<<1) +#define R200_LOCAL_VIEWER (1<<2) +#define R200_NORMALIZE_NORMALS (1<<3) +#define R200_RESCALE_NORMALS (1<<4) +#define R200_SPECULAR_LIGHTS (1<<5) +#define R200_DIFFUSE_SPECULAR_COMBINE (1<<6) +#define R200_LIGHT_ALPHA (1<<7) +#define R200_LOCAL_LIGHT_VEC_GL (1<<8) +#define R200_LIGHT_NO_NORMAL_AMBIENT_ONLY (1<<9) +#define R200_LIGHT_TWOSIDE (1<<10) +#define R200_FRONT_SHININESS_SOURCE_SHIFT (0xb) +#define R200_BACK_SHININESS_SOURCE_SHIFT (0xd) +#define R200_LM0_SOURCE_MATERIAL_0 (0) +#define R200_LM0_SOURCE_MATERIAL_1 (1) +#define R200_LM0_SOURCE_VERTEX_SHININESS_0 (2) +#define R200_LM0_SOURCE_VERTEX_SHININESS_1 (3) +#define R200_SE_TCL_LIGHT_MODEL_CTL_1 0x226c +#define R200_LM1_SOURCE_LIGHT_PREMULT (0) +#define R200_LM1_SOURCE_MATERIAL_0 (1) +#define R200_LM1_SOURCE_VERTEX_COLOR_0 (2) +#define R200_LM1_SOURCE_VERTEX_COLOR_1 (3) +#define R200_LM1_SOURCE_VERTEX_COLOR_2 (4) +#define R200_LM1_SOURCE_VERTEX_COLOR_3 (5) +#define R200_LM1_SOURCE_VERTEX_COLOR_4 (6) +#define R200_LM1_SOURCE_VERTEX_COLOR_5 (7) +#define R200_LM1_SOURCE_VERTEX_COLOR_6 (8) +#define R200_LM1_SOURCE_VERTEX_COLOR_7 (9) +#define R200_LM1_SOURCE_MATERIAL_1 (0xf) +#define R200_FRONT_EMISSIVE_SOURCE_SHIFT (0) +#define R200_FRONT_AMBIENT_SOURCE_SHIFT (4) +#define R200_FRONT_DIFFUSE_SOURCE_SHIFT (8) +#define R200_FRONT_SPECULAR_SOURCE_SHIFT (12) +#define R200_BACK_EMISSIVE_SOURCE_SHIFT (16) +#define R200_BACK_AMBIENT_SOURCE_SHIFT (20) +#define R200_BACK_DIFFUSE_SOURCE_SHIFT (24) +#define R200_BACK_SPECULAR_SOURCE_SHIFT (28) +#define R200_SE_TCL_PER_LIGHT_CTL_0 0x2270 +#define R200_LIGHT_0_ENABLE (1<<0) +#define R200_LIGHT_0_ENABLE_AMBIENT (1<<1) +#define R200_LIGHT_0_ENABLE_SPECULAR (1<<2) +#define R200_LIGHT_0_IS_LOCAL (1<<3) +#define R200_LIGHT_0_IS_SPOT (1<<4) +#define R200_LIGHT_0_DUAL_CONE (1<<5) +#define R200_LIGHT_0_ENABLE_RANGE_ATTEN (1<<6) +#define R200_LIGHT_0_CONSTANT_RANGE_ATTEN (1<<7) +#define R200_LIGHT_1_ENABLE (1<<16) +#define R200_LIGHT_1_ENABLE_AMBIENT (1<<17) +#define R200_LIGHT_1_ENABLE_SPECULAR (1<<18) +#define R200_LIGHT_1_IS_LOCAL (1<<19) +#define R200_LIGHT_1_IS_SPOT (1<<20) +#define R200_LIGHT_1_DUAL_CONE (1<<21) +#define R200_LIGHT_1_ENABLE_RANGE_ATTEN (1<<22) +#define R200_LIGHT_1_CONSTANT_RANGE_ATTEN (1<<23) +#define R200_LIGHT_0_SHIFT (0) +#define R200_LIGHT_1_SHIFT (16) +#define R200_SE_TCL_PER_LIGHT_CTL_1 0x2274 +#define R200_LIGHT_2_SHIFT (0) +#define R200_LIGHT_3_SHIFT (16) +#define R200_SE_TCL_PER_LIGHT_CTL_2 0x2278 +#define R200_LIGHT_4_SHIFT (0) +#define R200_LIGHT_5_SHIFT (16) +#define R200_SE_TCL_PER_LIGHT_CTL_3 0x227c +#define R200_LIGHT_6_SHIFT (0) +#define R200_LIGHT_7_SHIFT (16) +/* gap */ +#define R200_SE_TCL_TEX_PROC_CTL_2 0x22a8 +#define R200_TEXGEN_0_COMP_MASK_SHIFT (0) +#define R200_TEXGEN_1_COMP_MASK_SHIFT (4) +#define R200_TEXGEN_2_COMP_MASK_SHIFT (8) +#define R200_TEXGEN_3_COMP_MASK_SHIFT (12) +#define R200_TEXGEN_4_COMP_MASK_SHIFT (16) +#define R200_TEXGEN_5_COMP_MASK_SHIFT (20) +#define R200_SE_TCL_TEX_PROC_CTL_3 0x22ac +#define R200_TEXGEN_0_INPUT_TEX_SHIFT (0) +#define R200_TEXGEN_1_INPUT_TEX_SHIFT (4) +#define R200_TEXGEN_2_INPUT_TEX_SHIFT (8) +#define R200_TEXGEN_3_INPUT_TEX_SHIFT (12) +#define R200_TEXGEN_4_INPUT_TEX_SHIFT (16) +#define R200_TEXGEN_5_INPUT_TEX_SHIFT (20) +#define R200_SE_TCL_TEX_PROC_CTL_0 0x22b0 +#define R200_TEXGEN_TEXMAT_0_ENABLE (1<<0) +#define R200_TEXGEN_TEXMAT_1_ENABLE (1<<1) +#define R200_TEXGEN_TEXMAT_2_ENABLE (1<<2) +#define R200_TEXGEN_TEXMAT_3_ENABLE (1<<3) +#define R200_TEXGEN_TEXMAT_4_ENABLE (1<<4) +#define R200_TEXGEN_TEXMAT_5_ENABLE (1<<5) +#define R200_TEXMAT_0_ENABLE (1<<8) +#define R200_TEXMAT_1_ENABLE (1<<9) +#define R200_TEXMAT_2_ENABLE (1<<10) +#define R200_TEXMAT_3_ENABLE (1<<11) +#define R200_TEXMAT_4_ENABLE (1<<12) +#define R200_TEXMAT_5_ENABLE (1<<13) +#define R200_TEXGEN_FORCE_W_TO_ONE (1<<16) +#define R200_SE_TCL_TEX_PROC_CTL_1 0x22b4 +#define R200_TEXGEN_INPUT_MASK (0xf) +#define R200_TEXGEN_INPUT_TEXCOORD_0 (0) +#define R200_TEXGEN_INPUT_TEXCOORD_1 (1) +#define R200_TEXGEN_INPUT_TEXCOORD_2 (2) +#define R200_TEXGEN_INPUT_TEXCOORD_3 (3) +#define R200_TEXGEN_INPUT_TEXCOORD_4 (4) +#define R200_TEXGEN_INPUT_TEXCOORD_5 (5) +#define R200_TEXGEN_INPUT_OBJ (8) +#define R200_TEXGEN_INPUT_EYE (9) +#define R200_TEXGEN_INPUT_EYE_NORMAL (0xa) +#define R200_TEXGEN_INPUT_EYE_REFLECT (0xb) +#define R200_TEXGEN_INPUT_SPHERE (0xd) +#define R200_TEXGEN_0_INPUT_SHIFT (0) +#define R200_TEXGEN_1_INPUT_SHIFT (4) +#define R200_TEXGEN_2_INPUT_SHIFT (8) +#define R200_TEXGEN_3_INPUT_SHIFT (12) +#define R200_TEXGEN_4_INPUT_SHIFT (16) +#define R200_TEXGEN_5_INPUT_SHIFT (20) +#define R200_SE_TC_TEX_CYL_WRAP_CTL 0x22b8 +/* gap */ +#define R200_SE_TCL_UCP_VERT_BLEND_CTL 0x22c0 +#define R200_UCP_IN_CLIP_SPACE (1<<0) +#define R200_UCP_IN_MODEL_SPACE (1<<1) +#define R200_UCP_ENABLE_0 (1<<2) +#define R200_UCP_ENABLE_1 (1<<3) +#define R200_UCP_ENABLE_2 (1<<4) +#define R200_UCP_ENABLE_3 (1<<5) +#define R200_UCP_ENABLE_4 (1<<6) +#define R200_UCP_ENABLE_5 (1<<7) +#define R200_TCL_FOG_MASK (3<<8) +#define R200_TCL_FOG_DISABLE (0<<8) +#define R200_TCL_FOG_EXP (1<<8) +#define R200_TCL_FOG_EXP2 (2<<8) +#define R200_TCL_FOG_LINEAR (3<<8) +#define R200_RNG_BASED_FOG (1<<10) +#define R200_CLIP_DISABLE (1<<11) +#define R200_CULL_FRONT_IS_CW (0<<28) +#define R200_CULL_FRONT_IS_CCW (1<<28) +#define R200_CULL_FRONT (1<<29) +#define R200_CULL_BACK (1<<30) +#define R200_SE_TCL_POINT_SPRITE_CNTL 0x22c4 +/* gap */ +#define R200_SE_VTX_ST_POS_0_X_4 0x2300 +#define R200_SE_VTX_ST_POS_0_Y_4 0x2304 +#define R200_SE_VTX_ST_POS_0_Z_4 0x2308 +#define R200_SE_VTX_ST_POS_0_W_4 0x230c +#define R200_SE_VTX_ST_NORM_0_X 0x2310 +#define R200_SE_VTX_ST_NORM_0_Y 0x2314 +#define R200_SE_VTX_ST_NORM_0_Z 0x2318 +#define R200_SE_VTX_ST_PVMS 0x231c +#define R200_SE_VTX_ST_CLR_0_R 0x2320 +#define R200_SE_VTX_ST_CLR_0_G 0x2324 +#define R200_SE_VTX_ST_CLR_0_B 0x2328 +#define R200_SE_VTX_ST_CLR_0_A 0x232c +#define R200_SE_VTX_ST_CLR_1_R 0x2330 +#define R200_SE_VTX_ST_CLR_1_G 0x2334 +#define R200_SE_VTX_ST_CLR_1_B 0x2338 +#define R200_SE_VTX_ST_CLR_1_A 0x233c +#define R200_SE_VTX_ST_CLR_2_R 0x2340 +#define R200_SE_VTX_ST_CLR_2_G 0x2344 +#define R200_SE_VTX_ST_CLR_2_B 0x2348 +#define R200_SE_VTX_ST_CLR_2_A 0x234c +#define R200_SE_VTX_ST_CLR_3_R 0x2350 +#define R200_SE_VTX_ST_CLR_3_G 0x2354 +#define R200_SE_VTX_ST_CLR_3_B 0x2358 +#define R200_SE_VTX_ST_CLR_3_A 0x235c +#define R200_SE_VTX_ST_CLR_4_R 0x2360 +#define R200_SE_VTX_ST_CLR_4_G 0x2364 +#define R200_SE_VTX_ST_CLR_4_B 0x2368 +#define R200_SE_VTX_ST_CLR_4_A 0x236c +#define R200_SE_VTX_ST_CLR_5_R 0x2370 +#define R200_SE_VTX_ST_CLR_5_G 0x2374 +#define R200_SE_VTX_ST_CLR_5_B 0x2378 +#define R200_SE_VTX_ST_CLR_5_A 0x237c +#define R200_SE_VTX_ST_CLR_6_R 0x2380 +#define R200_SE_VTX_ST_CLR_6_G 0x2384 +#define R200_SE_VTX_ST_CLR_6_B 0x2388 +#define R200_SE_VTX_ST_CLR_6_A 0x238c +#define R200_SE_VTX_ST_CLR_7_R 0x2390 +#define R200_SE_VTX_ST_CLR_7_G 0x2394 +#define R200_SE_VTX_ST_CLR_7_B 0x2398 +#define R200_SE_VTX_ST_CLR_7_A 0x239c +#define R200_SE_VTX_ST_TEX_0_S 0x23a0 +#define R200_SE_VTX_ST_TEX_0_T 0x23a4 +#define R200_SE_VTX_ST_TEX_0_R 0x23a8 +#define R200_SE_VTX_ST_TEX_0_Q 0x23ac +#define R200_SE_VTX_ST_TEX_1_S 0x23b0 +#define R200_SE_VTX_ST_TEX_1_T 0x23b4 +#define R200_SE_VTX_ST_TEX_1_R 0x23b8 +#define R200_SE_VTX_ST_TEX_1_Q 0x23bc +#define R200_SE_VTX_ST_TEX_2_S 0x23c0 +#define R200_SE_VTX_ST_TEX_2_T 0x23c4 +#define R200_SE_VTX_ST_TEX_2_R 0x23c8 +#define R200_SE_VTX_ST_TEX_2_Q 0x23cc +#define R200_SE_VTX_ST_TEX_3_S 0x23d0 +#define R200_SE_VTX_ST_TEX_3_T 0x23d4 +#define R200_SE_VTX_ST_TEX_3_R 0x23d8 +#define R200_SE_VTX_ST_TEX_3_Q 0x23dc +#define R200_SE_VTX_ST_TEX_4_S 0x23e0 +#define R200_SE_VTX_ST_TEX_4_T 0x23e4 +#define R200_SE_VTX_ST_TEX_4_R 0x23e8 +#define R200_SE_VTX_ST_TEX_4_Q 0x23ec +#define R200_SE_VTX_ST_TEX_5_S 0x23f0 +#define R200_SE_VTX_ST_TEX_5_T 0x23f4 +#define R200_SE_VTX_ST_TEX_5_R 0x23f8 +#define R200_SE_VTX_ST_TEX_5_Q 0x23fc +#define R200_SE_VTX_ST_PNT_SPRT_SZ 0x2400 +#define R200_SE_VTX_ST_DISC_FOG 0x2404 +#define R200_SE_VTX_ST_SHININESS_0 0x2408 +#define R200_SE_VTX_ST_SHININESS_1 0x240c +#define R200_SE_VTX_ST_BLND_WT_0 0x2410 +#define R200_SE_VTX_ST_BLND_WT_1 0x2414 +#define R200_SE_VTX_ST_BLND_WT_2 0x2418 +#define R200_SE_VTX_ST_BLND_WT_3 0x241c +#define R200_SE_VTX_ST_POS_1_X 0x2420 +#define R200_SE_VTX_ST_POS_1_Y 0x2424 +#define R200_SE_VTX_ST_POS_1_Z 0x2428 +#define R200_SE_VTX_ST_POS_1_W 0x242c +#define R200_SE_VTX_ST_NORM_1_X 0x2430 +#define R200_SE_VTX_ST_NORM_1_Y 0x2434 +#define R200_SE_VTX_ST_NORM_1_Z 0x2438 +#define R200_SE_VTX_ST_USR_CLR_0_R 0x2440 +#define R200_SE_VTX_ST_USR_CLR_0_G 0x2444 +#define R200_SE_VTX_ST_USR_CLR_0_B 0x2448 +#define R200_SE_VTX_ST_USR_CLR_0_A 0x244c +#define R200_SE_VTX_ST_USR_CLR_1_R 0x2450 +#define R200_SE_VTX_ST_USR_CLR_1_G 0x2454 +#define R200_SE_VTX_ST_USR_CLR_1_B 0x2458 +#define R200_SE_VTX_ST_USR_CLR_1_A 0x245c +#define R200_SE_VTX_ST_CLR_0_PKD 0x2460 +#define R200_SE_VTX_ST_CLR_1_PKD 0x2464 +#define R200_SE_VTX_ST_CLR_2_PKD 0x2468 +#define R200_SE_VTX_ST_CLR_3_PKD 0x246c +#define R200_SE_VTX_ST_CLR_4_PKD 0x2470 +#define R200_SE_VTX_ST_CLR_5_PKD 0x2474 +#define R200_SE_VTX_ST_CLR_6_PKD 0x2478 +#define R200_SE_VTX_ST_CLR_7_PKD 0x247c +#define R200_SE_VTX_ST_POS_0_X_2 0x2480 +#define R200_SE_VTX_ST_POS_0_Y_2 0x2484 +#define R200_SE_VTX_ST_PAR_CLR_LD 0x2488 +#define R200_SE_VTX_ST_USR_CLR_PKD 0x248c +#define R200_SE_VTX_ST_POS_0_X_3 0x2490 +#define R200_SE_VTX_ST_POS_0_Y_3 0x2494 +#define R200_SE_VTX_ST_POS_0_Z_3 0x2498 +#define R200_SE_VTX_ST_END_OF_PKT 0x249c +/* gap */ +#define R200_RE_POINTSIZE 0x2648 +#define R200_POINTSIZE_SHIFT 0 +#define R200_MAXPOINTSIZE_SHIFT 16 +/* gap */ +#define R200_RE_TOP_LEFT 0x26c0 +#define R200_RE_LEFT_SHIFT 0 +#define R200_RE_TOP_SHIFT 16 +#define R200_RE_MISC 0x26c4 +#define R200_STIPPLE_COORD_MASK 0x1f +#define R200_STIPPLE_X_OFFSET_SHIFT 0 +#define R200_STIPPLE_X_OFFSET_MASK (0x1f << 0) +#define R200_STIPPLE_Y_OFFSET_SHIFT 8 +#define R200_STIPPLE_Y_OFFSET_MASK (0x1f << 8) +#define R200_STIPPLE_LITTLE_BIT_ORDER (0 << 16) +#define R200_STIPPLE_BIG_BIT_ORDER (1 << 16) +/* gap */ +#define R200_RE_AUX_SCISSOR_CNTL 0x26f0 +#define R200_EXCLUSIVE_SCISSOR_0 0x01000000 +#define R200_EXCLUSIVE_SCISSOR_1 0x02000000 +#define R200_EXCLUSIVE_SCISSOR_2 0x04000000 +#define R200_SCISSOR_ENABLE_0 0x10000000 +#define R200_SCISSOR_ENABLE_1 0x20000000 +#define R200_SCISSOR_ENABLE_2 0x40000000 +/* gap */ +#define R200_PP_TXFILTER_0 0x2c00 +#define R200_MAG_FILTER_NEAREST (0 << 0) +#define R200_MAG_FILTER_LINEAR (1 << 0) +#define R200_MAG_FILTER_MASK (1 << 0) +#define R200_MIN_FILTER_NEAREST (0 << 1) +#define R200_MIN_FILTER_LINEAR (1 << 1) +#define R200_MIN_FILTER_NEAREST_MIP_NEAREST (2 << 1) +#define R200_MIN_FILTER_NEAREST_MIP_LINEAR (3 << 1) +#define R200_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 1) +#define R200_MIN_FILTER_LINEAR_MIP_LINEAR (7 << 1) +#define R200_MIN_FILTER_ANISO_NEAREST (8 << 1) +#define R200_MIN_FILTER_ANISO_LINEAR (9 << 1) +#define R200_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST (10 << 1) +#define R200_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR (11 << 1) +#define R200_MIN_FILTER_MASK (15 << 1) +#define R200_MAX_ANISO_1_TO_1 (0 << 5) +#define R200_MAX_ANISO_2_TO_1 (1 << 5) +#define R200_MAX_ANISO_4_TO_1 (2 << 5) +#define R200_MAX_ANISO_8_TO_1 (3 << 5) +#define R200_MAX_ANISO_16_TO_1 (4 << 5) +#define R200_MAX_ANISO_MASK (7 << 5) +#define R200_MAX_MIP_LEVEL_MASK (0x0f << 16) +#define R200_MAX_MIP_LEVEL_SHIFT 16 +#define R200_YUV_TO_RGB (1 << 20) +#define R200_YUV_TEMPERATURE_COOL (0 << 21) +#define R200_YUV_TEMPERATURE_HOT (1 << 21) +#define R200_YUV_TEMPERATURE_MASK (1 << 21) +#define R200_WRAPEN_S (1 << 22) +#define R200_CLAMP_S_WRAP (0 << 23) +#define R200_CLAMP_S_MIRROR (1 << 23) +#define R200_CLAMP_S_CLAMP_LAST (2 << 23) +#define R200_CLAMP_S_MIRROR_CLAMP_LAST (3 << 23) +#define R200_CLAMP_S_CLAMP_BORDER (4 << 23) +#define R200_CLAMP_S_MIRROR_CLAMP_BORDER (5 << 23) +#define R200_CLAMP_S_MASK (7 << 23) +#define R200_WRAPEN_T (1 << 26) +#define R200_CLAMP_T_WRAP (0 << 27) +#define R200_CLAMP_T_MIRROR (1 << 27) +#define R200_CLAMP_T_CLAMP_LAST (2 << 27) +#define R200_CLAMP_T_MIRROR_CLAMP_LAST (3 << 27) +#define R200_CLAMP_T_CLAMP_BORDER (4 << 27) +#define R200_CLAMP_T_MIRROR_CLAMP_BORDER (5 << 27) +#define R200_CLAMP_T_MASK (7 << 27) +#define R200_KILL_LT_ZERO (1 << 30) +#define R200_BORDER_MODE_OGL (0 << 31) +#define R200_BORDER_MODE_D3D (1 << 31) +#define R200_PP_TXFORMAT_0 0x2c04 +#define R200_TXFORMAT_I8 (0 << 0) +#define R200_TXFORMAT_AI88 (1 << 0) +#define R200_TXFORMAT_RGB332 (2 << 0) +#define R200_TXFORMAT_ARGB1555 (3 << 0) +#define R200_TXFORMAT_RGB565 (4 << 0) +#define R200_TXFORMAT_ARGB4444 (5 << 0) +#define R200_TXFORMAT_ARGB8888 (6 << 0) +#define R200_TXFORMAT_RGBA8888 (7 << 0) +#define R200_TXFORMAT_Y8 (8 << 0) +#define R200_TXFORMAT_AVYU4444 (9 << 0) +#define R200_TXFORMAT_VYUY422 (10 << 0) +#define R200_TXFORMAT_YVYU422 (11 << 0) +#define R200_TXFORMAT_DXT1 (12 << 0) +#define R200_TXFORMAT_DXT23 (14 << 0) +#define R200_TXFORMAT_DXT45 (15 << 0) +#define R200_TXFORMAT_FORMAT_MASK (31 << 0) +#define R200_TXFORMAT_FORMAT_SHIFT 0 +#define R200_TXFORMAT_ALPHA_IN_MAP (1 << 6) +#define R200_TXFORMAT_NON_POWER2 (1 << 7) +#define R200_TXFORMAT_WIDTH_MASK (15 << 8) +#define R200_TXFORMAT_WIDTH_SHIFT 8 +#define R200_TXFORMAT_HEIGHT_MASK (15 << 12) +#define R200_TXFORMAT_HEIGHT_SHIFT 12 +#define R200_TXFORMAT_F5_WIDTH_MASK (15 << 15) /* cube face 5 */ +#define R200_TXFORMAT_F5_WIDTH_SHIFT 15 +#define R200_TXFORMAT_F5_HEIGHT_MASK (15 << 20) +#define R200_TXFORMAT_F5_HEIGHT_SHIFT 20 +#define R200_TXFORMAT_ST_ROUTE_MASK (7 << 24) +#define R200_TXFORMAT_ST_ROUTE_STQ0 (0 << 24) +#define R200_TXFORMAT_ST_ROUTE_STQ1 (1 << 24) +#define R200_TXFORMAT_ST_ROUTE_STQ2 (2 << 24) +#define R200_TXFORMAT_ST_ROUTE_STQ3 (3 << 24) +#define R200_TXFORMAT_ST_ROUTE_STQ4 (4 << 24) +#define R200_TXFORMAT_ST_ROUTE_STQ5 (5 << 24) +#define R200_TXFORMAT_ALPHA_MASK_ENABLE (1 << 28) +#define R200_TXFORMAT_CHROMA_KEY_ENABLE (1 << 29) +#define R200_TXFORMAT_CUBIC_MAP_ENABLE (1 << 30) +#define R200_PP_TXFORMAT_X_0 0x2c08 +#define R200_DEPTH_LOG2_MASK (0xff << 0) +#define R200_DEPTH_LOG2_SHIFT 0 +#define R200_WRAPEN_Q (1 << 8) +#define R200_CLAMP_Q_WRAP (0 << 9) +#define R200_CLAMP_Q_MIRROR (1 << 9) +#define R200_CLAMP_Q_CLAMP_LAST (2 << 9) +#define R200_CLAMP_Q_MIRROR_CLAMP_LAST (3 << 9) +#define R200_CLAMP_Q_CLAMP_BORDER (6 << 9) +#define R200_CLAMP_Q_MIRROR_CLAMP_BORDER (7 << 9) +#define R200_CLAMP_Q_MASK (7 << 9) +#define R200_MIN_MIP_LEVEL_MASK (0xff << 12) +#define R200_MIN_MIP_LEVEL_SHIFT 12 +#define R200_TEXCOORD_NONPROJ (0 << 16) +#define R200_TEXCOORD_CUBIC_ENV (1 << 16) +#define R200_TEXCOORD_VOLUME (2 << 16) +#define R200_TEXCOORD_PROJ (3 << 16) +#define R200_TEXCOORD_DEPTH (4 << 16) +#define R200_TEXCOORD_1D_PROJ (5 << 16) +#define R200_TEXCOORD_1D (6 << 16) +#define R200_TEXCOORD_ZERO (7 << 16) +#define R200_LOD_BIAS_MASK (0xfff80000) +#define R200_LOD_BIAS_SHIFT 19 +#define R200_PP_TXSIZE_0 0x2c0c /* NPOT only */ +#define R200_PP_TXPITCH_0 0x2c10 /* NPOT only */ +#define R200_PP_BORDER_COLOR_0 0x2c14 +#define R200_PP_CUBIC_FACES_0 0x2c18 +#define R200_PP_TXFILTER_1 0x2c20 +#define R200_PP_TXFORMAT_1 0x2c24 +#define R200_PP_TXFORMAT_X_1 0x2c28 +#define R200_PP_TXSIZE_1 0x2c2c +#define R200_PP_TXPITCH_1 0x2c30 +#define R200_PP_BORDER_COLOR_1 0x2c34 +#define R200_PP_CUBIC_FACES_1 0x2c38 +#define R200_PP_TXFILTER_2 0x2c40 +#define R200_PP_TXFORMAT_2 0x2c44 +#define R200_PP_TXSIZE_2 0x2c4c +#define R200_PP_TXFORMAT_X_2 0x2c48 +#define R200_PP_TXPITCH_2 0x2c50 +#define R200_PP_BORDER_COLOR_2 0x2c54 +#define R200_PP_CUBIC_FACES_2 0x2c58 +#define R200_PP_TXFILTER_3 0x2c60 +#define R200_PP_TXFORMAT_3 0x2c64 +#define R200_PP_TXSIZE_3 0x2c6c +#define R200_PP_TXFORMAT_X_3 0x2c68 +#define R200_PP_TXPITCH_3 0x2c70 +#define R200_PP_BORDER_COLOR_3 0x2c74 +#define R200_PP_CUBIC_FACES_3 0x2c78 +#define R200_PP_TXFILTER_4 0x2c80 +#define R200_PP_TXFORMAT_4 0x2c84 +#define R200_PP_TXSIZE_4 0x2c8c +#define R200_PP_TXFORMAT_X_4 0x2c88 +#define R200_PP_TXPITCH_4 0x2c90 +#define R200_PP_BORDER_COLOR_4 0x2c94 +#define R200_PP_CUBIC_FACES_4 0x2c98 +#define R200_PP_TXFILTER_5 0x2ca0 +#define R200_PP_TXFORMAT_5 0x2ca4 +#define R200_PP_TXSIZE_5 0x2cac +#define R200_PP_TXFORMAT_X_5 0x2ca8 +#define R200_PP_TXPITCH_5 0x2cb0 +#define R200_PP_BORDER_COLOR_5 0x2cb4 +#define R200_PP_CUBIC_FACES_5 0x2cb8 +/* gap */ +#define R200_PP_CNTL_X 0x2cc4 +/* gap */ +#define R200_PP_TXOFFSET_0 0x2d00 +#define R200_TXO_ENDIAN_NO_SWAP (0 << 0) +#define R200_TXO_ENDIAN_BYTE_SWAP (1 << 0) +#define R200_TXO_ENDIAN_WORD_SWAP (2 << 0) +#define R200_TXO_ENDIAN_HALFDW_SWAP (3 << 0) +#define R200_TXO_OFFSET_MASK 0xffffffe0 +#define R200_TXO_OFFSET_SHIFT 5 +#define R200_PP_CUBIC_OFFSET_F1_0 0x2d04 +#define R200_PP_CUBIC_OFFSET_F2_0 0x2d08 +#define R200_PP_CUBIC_OFFSET_F3_0 0x2d0c +#define R200_PP_CUBIC_OFFSET_F4_0 0x2d10 +#define R200_PP_CUBIC_OFFSET_F5_0 0x2d14 +#define R200_PP_TXOFFSET_1 0x2d18 +#define R200_PP_CUBIC_OFFSET_F1_1 0x2d1c +#define R200_PP_CUBIC_OFFSET_F2_1 0x2d20 +#define R200_PP_CUBIC_OFFSET_F3_1 0x2d24 +#define R200_PP_CUBIC_OFFSET_F4_1 0x2d28 +#define R200_PP_CUBIC_OFFSET_F5_1 0x2d2c +#define R200_PP_TXOFFSET_2 0x2d30 +#define R200_PP_CUBIC_OFFSET_F1_2 0x2d34 +#define R200_PP_CUBIC_OFFSET_F2_2 0x2d38 +#define R200_PP_CUBIC_OFFSET_F3_2 0x2d3c +#define R200_PP_CUBIC_OFFSET_F4_2 0x2d40 +#define R200_PP_CUBIC_OFFSET_F5_2 0x2d44 +#define R200_PP_TXOFFSET_3 0x2d48 +#define R200_PP_CUBIC_OFFSET_F1_3 0x2d4c +#define R200_PP_CUBIC_OFFSET_F2_3 0x2d50 +#define R200_PP_CUBIC_OFFSET_F3_3 0x2d54 +#define R200_PP_CUBIC_OFFSET_F4_3 0x2d58 +#define R200_PP_CUBIC_OFFSET_F5_3 0x2d5c +#define R200_PP_TXOFFSET_4 0x2d60 +#define R200_PP_CUBIC_OFFSET_F1_4 0x2d64 +#define R200_PP_CUBIC_OFFSET_F2_4 0x2d68 +#define R200_PP_CUBIC_OFFSET_F3_4 0x2d6c +#define R200_PP_CUBIC_OFFSET_F4_4 0x2d70 +#define R200_PP_CUBIC_OFFSET_F5_4 0x2d74 +#define R200_PP_TXOFFSET_5 0x2d78 +#define R200_PP_CUBIC_OFFSET_F1_5 0x2d7c +#define R200_PP_CUBIC_OFFSET_F2_5 0x2d80 +#define R200_PP_CUBIC_OFFSET_F3_5 0x2d84 +#define R200_PP_CUBIC_OFFSET_F4_5 0x2d88 +#define R200_PP_CUBIC_OFFSET_F5_5 0x2d8c +/* gap */ +#define R200_PP_TAM_DEBUG3 0x2d9c +/* gap */ +#define R200_PP_TFACTOR_0 0x2ee0 +#define R200_PP_TFACTOR_1 0x2ee4 +#define R200_PP_TFACTOR_2 0x2ee8 +#define R200_PP_TFACTOR_3 0x2eec +#define R200_PP_TFACTOR_4 0x2ef0 +#define R200_PP_TFACTOR_5 0x2ef4 +/* gap */ +#define R200_PP_TXCBLEND_0 0x2f00 +#define R200_TXC_ARG_A_ZERO (0) +#define R200_TXC_ARG_A_CURRENT_COLOR (2) +#define R200_TXC_ARG_A_CURRENT_ALPHA (3) +#define R200_TXC_ARG_A_DIFFUSE_COLOR (4) +#define R200_TXC_ARG_A_DIFFUSE_ALPHA (5) +#define R200_TXC_ARG_A_SPECULAR_COLOR (6) +#define R200_TXC_ARG_A_SPECULAR_ALPHA (7) +#define R200_TXC_ARG_A_TFACTOR_COLOR (8) +#define R200_TXC_ARG_A_TFACTOR_ALPHA (9) +#define R200_TXC_ARG_A_R0_COLOR (10) +#define R200_TXC_ARG_A_R0_ALPHA (11) +#define R200_TXC_ARG_A_R1_COLOR (12) +#define R200_TXC_ARG_A_R1_ALPHA (13) +#define R200_TXC_ARG_A_R2_COLOR (14) +#define R200_TXC_ARG_A_R2_ALPHA (15) +#define R200_TXC_ARG_A_R3_COLOR (16) +#define R200_TXC_ARG_A_R3_ALPHA (17) +#define R200_TXC_ARG_A_R4_COLOR (18) +#define R200_TXC_ARG_A_R4_ALPHA (19) +#define R200_TXC_ARG_A_R5_COLOR (20) +#define R200_TXC_ARG_A_R5_ALPHA (21) +#define R200_TXC_ARG_A_TFACTOR1_COLOR (26) +#define R200_TXC_ARG_A_TFACTOR1_ALPHA (27) +#define R200_TXC_ARG_A_MASK (31 << 0) +#define R200_TXC_ARG_A_SHIFT 0 +#define R200_TXC_ARG_B_ZERO (0<<5) +#define R200_TXC_ARG_B_CURRENT_COLOR (2<<5) +#define R200_TXC_ARG_B_CURRENT_ALPHA (3<<5) +#define R200_TXC_ARG_B_DIFFUSE_COLOR (4<<5) +#define R200_TXC_ARG_B_DIFFUSE_ALPHA (5<<5) +#define R200_TXC_ARG_B_SPECULAR_COLOR (6<<5) +#define R200_TXC_ARG_B_SPECULAR_ALPHA (7<<5) +#define R200_TXC_ARG_B_TFACTOR_COLOR (8<<5) +#define R200_TXC_ARG_B_TFACTOR_ALPHA (9<<5) +#define R200_TXC_ARG_B_R0_COLOR (10<<5) +#define R200_TXC_ARG_B_R0_ALPHA (11<<5) +#define R200_TXC_ARG_B_R1_COLOR (12<<5) +#define R200_TXC_ARG_B_R1_ALPHA (13<<5) +#define R200_TXC_ARG_B_R2_COLOR (14<<5) +#define R200_TXC_ARG_B_R2_ALPHA (15<<5) +#define R200_TXC_ARG_B_R3_COLOR (16<<5) +#define R200_TXC_ARG_B_R3_ALPHA (17<<5) +#define R200_TXC_ARG_B_R4_COLOR (18<<5) +#define R200_TXC_ARG_B_R4_ALPHA (19<<5) +#define R200_TXC_ARG_B_R5_COLOR (20<<5) +#define R200_TXC_ARG_B_R5_ALPHA (21<<5) +#define R200_TXC_ARG_B_TFACTOR1_COLOR (26<<5) +#define R200_TXC_ARG_B_TFACTOR1_ALPHA (27<<5) +#define R200_TXC_ARG_B_MASK (31 << 5) +#define R200_TXC_ARG_B_SHIFT 5 +#define R200_TXC_ARG_C_ZERO (0<<10) +#define R200_TXC_ARG_C_CURRENT_COLOR (2<<10) +#define R200_TXC_ARG_C_CURRENT_ALPHA (3<<10) +#define R200_TXC_ARG_C_DIFFUSE_COLOR (4<<10) +#define R200_TXC_ARG_C_DIFFUSE_ALPHA (5<<10) +#define R200_TXC_ARG_C_SPECULAR_COLOR (6<<10) +#define R200_TXC_ARG_C_SPECULAR_ALPHA (7<<10) +#define R200_TXC_ARG_C_TFACTOR_COLOR (8<<10) +#define R200_TXC_ARG_C_TFACTOR_ALPHA (9<<10) +#define R200_TXC_ARG_C_R0_COLOR (10<<10) +#define R200_TXC_ARG_C_R0_ALPHA (11<<10) +#define R200_TXC_ARG_C_R1_COLOR (12<<10) +#define R200_TXC_ARG_C_R1_ALPHA (13<<10) +#define R200_TXC_ARG_C_R2_COLOR (14<<10) +#define R200_TXC_ARG_C_R2_ALPHA (15<<10) +#define R200_TXC_ARG_C_R3_COLOR (16<<10) +#define R200_TXC_ARG_C_R3_ALPHA (17<<10) +#define R200_TXC_ARG_C_R4_COLOR (18<<10) +#define R200_TXC_ARG_C_R4_ALPHA (19<<10) +#define R200_TXC_ARG_C_R5_COLOR (20<<10) +#define R200_TXC_ARG_C_R5_ALPHA (21<<10) +#define R200_TXC_ARG_C_TFACTOR1_COLOR (26<<10) +#define R200_TXC_ARG_C_TFACTOR1_ALPHA (27<<10) +#define R200_TXC_ARG_C_MASK (31 << 10) +#define R200_TXC_ARG_C_SHIFT 10 +#define R200_TXC_COMP_ARG_A (1 << 16) +#define R200_TXC_COMP_ARG_A_SHIFT (16) +#define R200_TXC_BIAS_ARG_A (1 << 17) +#define R200_TXC_SCALE_ARG_A (1 << 18) +#define R200_TXC_NEG_ARG_A (1 << 19) +#define R200_TXC_COMP_ARG_B (1 << 20) +#define R200_TXC_COMP_ARG_B_SHIFT (20) +#define R200_TXC_BIAS_ARG_B (1 << 21) +#define R200_TXC_SCALE_ARG_B (1 << 22) +#define R200_TXC_NEG_ARG_B (1 << 23) +#define R200_TXC_COMP_ARG_C (1 << 24) +#define R200_TXC_COMP_ARG_C_SHIFT (24) +#define R200_TXC_BIAS_ARG_C (1 << 25) +#define R200_TXC_SCALE_ARG_C (1 << 26) +#define R200_TXC_NEG_ARG_C (1 << 27) +#define R200_TXC_OP_MADD (0 << 28) +#define R200_TXC_OP_CND0 (2 << 28) +#define R200_TXC_OP_LERP (3 << 28) +#define R200_TXC_OP_DOT3 (4 << 28) +#define R200_TXC_OP_DOT4 (5 << 28) +#define R200_TXC_OP_CONDITIONAL (6 << 28) +#define R200_TXC_OP_DOT2_ADD (7 << 28) +#define R200_TXC_OP_MASK (7 << 28) +#define R200_PP_TXCBLEND2_0 0x2f04 +#define R200_TXC_TFACTOR_SEL_SHIFT 0 +#define R200_TXC_TFACTOR_SEL_MASK 0x7 +#define R200_TXC_TFACTOR1_SEL_SHIFT 4 +#define R200_TXC_TFACTOR1_SEL_MASK (0x7 << 4) +#define R200_TXC_SCALE_SHIFT 8 +#define R200_TXC_SCALE_MASK (7 << 8) +#define R200_TXC_SCALE_1X (0 << 8) +#define R200_TXC_SCALE_2X (1 << 8) +#define R200_TXC_SCALE_4X (2 << 8) +#define R200_TXC_SCALE_8X (3 << 8) +#define R200_TXC_SCALE_INV2 (5 << 8) +#define R200_TXC_SCALE_INV4 (6 << 8) +#define R200_TXC_SCALE_INV8 (7 << 8) +#define R200_TXC_CLAMP_SHIFT 12 +#define R200_TXC_CLAMP_MASK (3 << 12) +#define R200_TXC_CLAMP_WRAP (0 << 12) +#define R200_TXC_CLAMP_0_1 (1 << 12) +#define R200_TXC_CLAMP_8_8 (2 << 12) +#define R200_TXC_OUTPUT_REG_MASK (7 << 16) +#define R200_TXC_OUTPUT_REG_NONE (0 << 16) +#define R200_TXC_OUTPUT_REG_R0 (1 << 16) +#define R200_TXC_OUTPUT_REG_R1 (2 << 16) +#define R200_TXC_OUTPUT_REG_R2 (3 << 16) +#define R200_TXC_OUTPUT_REG_R3 (4 << 16) +#define R200_TXC_OUTPUT_REG_R4 (5 << 16) +#define R200_TXC_OUTPUT_REG_R5 (6 << 16) +#define R200_TXC_OUTPUT_MASK_MASK (7 << 20) +#define R200_TXC_OUTPUT_MASK_RGB (0 << 20) +#define R200_TXC_OUTPUT_MASK_RG (1 << 20) +#define R200_TXC_OUTPUT_MASK_RB (2 << 20) +#define R200_TXC_OUTPUT_MASK_R (3 << 20) +#define R200_TXC_OUTPUT_MASK_GB (4 << 20) +#define R200_TXC_OUTPUT_MASK_G (5 << 20) +#define R200_TXC_OUTPUT_MASK_B (6 << 20) +#define R200_TXC_OUTPUT_MASK_NONE (7 << 20) +#define R200_TXC_REPL_NORMAL 0 +#define R200_TXC_REPL_RED 1 +#define R200_TXC_REPL_GREEN 2 +#define R200_TXC_REPL_BLUE 3 +#define R200_TXC_REPL_ARG_A_SHIFT 26 +#define R200_TXC_REPL_ARG_A_MASK (3 << 26) +#define R200_TXC_REPL_ARG_B_SHIFT 28 +#define R200_TXC_REPL_ARG_B_MASK (3 << 28) +#define R200_TXC_REPL_ARG_C_SHIFT 30 +#define R200_TXC_REPL_ARG_C_MASK (3 << 30) +#define R200_PP_TXABLEND_0 0x2f08 +#define R200_TXA_ARG_A_ZERO (0) +#define R200_TXA_ARG_A_CURRENT_ALPHA (2) /* guess */ +#define R200_TXA_ARG_A_CURRENT_BLUE (3) /* guess */ +#define R200_TXA_ARG_A_DIFFUSE_ALPHA (4) +#define R200_TXA_ARG_A_DIFFUSE_BLUE (5) +#define R200_TXA_ARG_A_SPECULAR_ALPHA (6) +#define R200_TXA_ARG_A_SPECULAR_BLUE (7) +#define R200_TXA_ARG_A_TFACTOR_ALPHA (8) +#define R200_TXA_ARG_A_TFACTOR_BLUE (9) +#define R200_TXA_ARG_A_R0_ALPHA (10) +#define R200_TXA_ARG_A_R0_BLUE (11) +#define R200_TXA_ARG_A_R1_ALPHA (12) +#define R200_TXA_ARG_A_R1_BLUE (13) +#define R200_TXA_ARG_A_R2_ALPHA (14) +#define R200_TXA_ARG_A_R2_BLUE (15) +#define R200_TXA_ARG_A_R3_ALPHA (16) +#define R200_TXA_ARG_A_R3_BLUE (17) +#define R200_TXA_ARG_A_R4_ALPHA (18) +#define R200_TXA_ARG_A_R4_BLUE (19) +#define R200_TXA_ARG_A_R5_ALPHA (20) +#define R200_TXA_ARG_A_R5_BLUE (21) +#define R200_TXA_ARG_A_TFACTOR1_ALPHA (26) +#define R200_TXA_ARG_A_TFACTOR1_BLUE (27) +#define R200_TXA_ARG_A_MASK (31 << 0) +#define R200_TXA_ARG_A_SHIFT 0 +#define R200_TXA_ARG_B_ZERO (0<<5) +#define R200_TXA_ARG_B_CURRENT_ALPHA (2<<5) /* guess */ +#define R200_TXA_ARG_B_CURRENT_BLUE (3<<5) /* guess */ +#define R200_TXA_ARG_B_DIFFUSE_ALPHA (4<<5) +#define R200_TXA_ARG_B_DIFFUSE_BLUE (5<<5) +#define R200_TXA_ARG_B_SPECULAR_ALPHA (6<<5) +#define R200_TXA_ARG_B_SPECULAR_BLUE (7<<5) +#define R200_TXA_ARG_B_TFACTOR_ALPHA (8<<5) +#define R200_TXA_ARG_B_TFACTOR_BLUE (9<<5) +#define R200_TXA_ARG_B_R0_ALPHA (10<<5) +#define R200_TXA_ARG_B_R0_BLUE (11<<5) +#define R200_TXA_ARG_B_R1_ALPHA (12<<5) +#define R200_TXA_ARG_B_R1_BLUE (13<<5) +#define R200_TXA_ARG_B_R2_ALPHA (14<<5) +#define R200_TXA_ARG_B_R2_BLUE (15<<5) +#define R200_TXA_ARG_B_R3_ALPHA (16<<5) +#define R200_TXA_ARG_B_R3_BLUE (17<<5) +#define R200_TXA_ARG_B_R4_ALPHA (18<<5) +#define R200_TXA_ARG_B_R4_BLUE (19<<5) +#define R200_TXA_ARG_B_R5_ALPHA (20<<5) +#define R200_TXA_ARG_B_R5_BLUE (21<<5) +#define R200_TXA_ARG_B_TFACTOR1_ALPHA (26<<5) +#define R200_TXA_ARG_B_TFACTOR1_BLUE (27<<5) +#define R200_TXA_ARG_B_MASK (31 << 5) +#define R200_TXA_ARG_B_SHIFT 5 +#define R200_TXA_ARG_C_ZERO (0<<10) +#define R200_TXA_ARG_C_CURRENT_ALPHA (2<<10) /* guess */ +#define R200_TXA_ARG_C_CURRENT_BLUE (3<<10) /* guess */ +#define R200_TXA_ARG_C_DIFFUSE_ALPHA (4<<10) +#define R200_TXA_ARG_C_DIFFUSE_BLUE (5<<10) +#define R200_TXA_ARG_C_SPECULAR_ALPHA (6<<10) +#define R200_TXA_ARG_C_SPECULAR_BLUE (7<<10) +#define R200_TXA_ARG_C_TFACTOR_ALPHA (8<<10) +#define R200_TXA_ARG_C_TFACTOR_BLUE (9<<10) +#define R200_TXA_ARG_C_R0_ALPHA (10<<10) +#define R200_TXA_ARG_C_R0_BLUE (11<<10) +#define R200_TXA_ARG_C_R1_ALPHA (12<<10) +#define R200_TXA_ARG_C_R1_BLUE (13<<10) +#define R200_TXA_ARG_C_R2_ALPHA (14<<10) +#define R200_TXA_ARG_C_R2_BLUE (15<<10) +#define R200_TXA_ARG_C_R3_ALPHA (16<<10) +#define R200_TXA_ARG_C_R3_BLUE (17<<10) +#define R200_TXA_ARG_C_R4_ALPHA (18<<10) +#define R200_TXA_ARG_C_R4_BLUE (19<<10) +#define R200_TXA_ARG_C_R5_ALPHA (20<<10) +#define R200_TXA_ARG_C_R5_BLUE (21<<10) +#define R200_TXA_ARG_C_TFACTOR1_ALPHA (26<<10) +#define R200_TXA_ARG_C_TFACTOR1_BLUE (27<<10) +#define R200_TXA_ARG_C_MASK (31 << 10) +#define R200_TXA_ARG_C_SHIFT 10 +#define R200_TXA_COMP_ARG_A (1 << 16) +#define R200_TXA_COMP_ARG_A_SHIFT (16) +#define R200_TXA_BIAS_ARG_A (1 << 17) +#define R200_TXA_SCALE_ARG_A (1 << 18) +#define R200_TXA_NEG_ARG_A (1 << 19) +#define R200_TXA_COMP_ARG_B (1 << 20) +#define R200_TXA_COMP_ARG_B_SHIFT (20) +#define R200_TXA_BIAS_ARG_B (1 << 21) +#define R200_TXA_SCALE_ARG_B (1 << 22) +#define R200_TXA_NEG_ARG_B (1 << 23) +#define R200_TXA_COMP_ARG_C (1 << 24) +#define R200_TXA_COMP_ARG_C_SHIFT (24) +#define R200_TXA_BIAS_ARG_C (1 << 25) +#define R200_TXA_SCALE_ARG_C (1 << 26) +#define R200_TXA_NEG_ARG_C (1 << 27) +#define R200_TXA_OP_MADD (0 << 28) +#define R200_TXA_OP_CND0 (2 << 28) +#define R200_TXA_OP_LERP (3 << 28) +#define R200_TXA_OP_CONDITIONAL (6 << 28) +#define R200_TXA_OP_MASK (7 << 28) +#define R200_PP_TXABLEND2_0 0x2f0c +#define R200_TXA_TFACTOR_SEL_SHIFT 0 +#define R200_TXA_TFACTOR_SEL_MASK 0x7 +#define R200_TXA_TFACTOR1_SEL_SHIFT 4 +#define R200_TXA_TFACTOR1_SEL_MASK (0x7 << 4) +#define R200_TXA_SCALE_SHIFT 8 +#define R200_TXA_SCALE_MASK (7 << 8) +#define R200_TXA_SCALE_1X (0 << 8) +#define R200_TXA_SCALE_2X (1 << 8) +#define R200_TXA_SCALE_4X (2 << 8) +#define R200_TXA_SCALE_8X (3 << 8) +#define R200_TXA_SCALE_INV2 (5 << 8) +#define R200_TXA_SCALE_INV4 (6 << 8) +#define R200_TXA_SCALE_INV8 (7 << 8) +#define R200_TXA_CLAMP_SHIFT 12 +#define R200_TXA_CLAMP_MASK (3 << 12) +#define R200_TXA_CLAMP_WRAP (0 << 12) +#define R200_TXA_CLAMP_0_1 (1 << 12) +#define R200_TXA_CLAMP_8_8 (2 << 12) +#define R200_TXA_OUTPUT_REG_MASK (7 << 16) +#define R200_TXA_OUTPUT_REG_NONE (0 << 16) +#define R200_TXA_OUTPUT_REG_R0 (1 << 16) +#define R200_TXA_OUTPUT_REG_R1 (2 << 16) +#define R200_TXA_OUTPUT_REG_R2 (3 << 16) +#define R200_TXA_OUTPUT_REG_R3 (4 << 16) +#define R200_TXA_OUTPUT_REG_R4 (5 << 16) +#define R200_TXA_OUTPUT_REG_R5 (6 << 16) +#define R200_TXA_DOT_ALPHA (1 << 20) +#define R200_TXA_REPL_NORMAL 0 +#define R200_TXA_REPL_RED 1 +#define R200_TXA_REPL_GREEN 2 +#define R200_TXA_REPL_ARG_A_SHIFT 26 +#define R200_TXA_REPL_ARG_A_MASK (3 << 26) +#define R200_TXA_REPL_ARG_B_SHIFT 28 +#define R200_TXA_REPL_ARG_B_MASK (3 << 28) +#define R200_TXA_REPL_ARG_C_SHIFT 30 +#define R200_TXA_REPL_ARG_C_MASK (3 << 30) +#define R200_PP_TXCBLEND_1 0x2f10 +#define R200_PP_TXCBLEND2_1 0x2f14 +#define R200_PP_TXABLEND_1 0x2f18 +#define R200_PP_TXABLEND2_1 0x2f1c +#define R200_PP_TXCBLEND_2 0x2f20 +#define R200_PP_TXCBLEND2_2 0x2f24 +#define R200_PP_TXABLEND_2 0x2f28 +#define R200_PP_TXABLEND2_2 0x2f2c +#define R200_PP_TXCBLEND_3 0x2f30 +#define R200_PP_TXCBLEND2_3 0x2f34 +#define R200_PP_TXABLEND_3 0x2f38 +#define R200_PP_TXABLEND2_3 0x2f3c +#define R200_PP_TXCBLEND_4 0x2f40 +#define R200_PP_TXCBLEND2_4 0x2f44 +#define R200_PP_TXABLEND_4 0x2f48 +#define R200_PP_TXABLEND2_4 0x2f4c +#define R200_PP_TXCBLEND_5 0x2f50 +#define R200_PP_TXCBLEND2_5 0x2f54 +#define R200_PP_TXABLEND_5 0x2f58 +#define R200_PP_TXABLEND2_5 0x2f5c +#define R200_PP_TXCBLEND_6 0x2f60 +#define R200_PP_TXCBLEND2_6 0x2f64 +#define R200_PP_TXABLEND_6 0x2f68 +#define R200_PP_TXABLEND2_6 0x2f6c +#define R200_PP_TXCBLEND_7 0x2f70 +#define R200_PP_TXCBLEND2_7 0x2f74 +#define R200_PP_TXABLEND_7 0x2f78 +#define R200_PP_TXABLEND2_7 0x2f7c +/* gap */ +#define R200_RB3D_ABLENDCNTL 0x321C /* see BLENDCTL */ +#define R200_RB3D_CBLENDCNTL 0x3220 /* see BLENDCTL */ + + +/* + * Offsets in TCL vector state. NOTE: Hardwiring matrix positions. + * Multiple contexts could collaberate to eliminate state bouncing. + */ +#define R200_VS_LIGHT_AMBIENT_ADDR 0x00000028 +#define R200_VS_LIGHT_DIFFUSE_ADDR 0x00000030 +#define R200_VS_LIGHT_SPECULAR_ADDR 0x00000038 +#define R200_VS_LIGHT_DIRPOS_ADDR 0x00000040 +#define R200_VS_LIGHT_HWVSPOT_ADDR 0x00000048 +#define R200_VS_LIGHT_ATTENUATION_ADDR 0x00000050 +#define R200_VS_SPOT_DUAL_CONE 0x00000058 +#define R200_VS_GLOBAL_AMBIENT_ADDR 0x0000005C +#define R200_VS_FOG_PARAM_ADDR 0x0000005D +#define R200_VS_EYE_VECTOR_ADDR 0x0000005E +#define R200_VS_UCP_ADDR 0x00000060 +#define R200_VS_PNT_SPRITE_VPORT_SCALE 0x00000068 +#define R200_VS_MATRIX_0_MV 0x00000080 +#define R200_VS_MATRIX_1_INV_MV 0x00000084 +#define R200_VS_MATRIX_2_MVP 0x00000088 +#define R200_VS_MATRIX_3_TEX0 0x0000008C +#define R200_VS_MATRIX_4_TEX1 0x00000090 +#define R200_VS_MATRIX_5_TEX2 0x00000094 +#define R200_VS_MATRIX_6_TEX3 0x00000098 +#define R200_VS_MATRIX_7_TEX4 0x0000009C +#define R200_VS_MATRIX_8_TEX5 0x000000A0 +#define R200_VS_MAT_0_EMISS 0x000000B0 +#define R200_VS_MAT_0_AMB 0x000000B1 +#define R200_VS_MAT_0_DIF 0x000000B2 +#define R200_VS_MAT_0_SPEC 0x000000B3 +#define R200_VS_MAT_1_EMISS 0x000000B4 +#define R200_VS_MAT_1_AMB 0x000000B5 +#define R200_VS_MAT_1_DIF 0x000000B6 +#define R200_VS_MAT_1_SPEC 0x000000B7 +#define R200_VS_EYE2CLIP_MTX 0x000000B8 +#define R200_VS_PNT_SPRITE_ATT_CONST 0x000000BC +#define R200_VS_PNT_SPRITE_EYE_IN_MODEL 0x000000BD +#define R200_VS_PNT_SPRITE_CLAMP 0x000000BE +#define R200_VS_MAX 0x000001C0 + + +/* + * Offsets in TCL scalar state + */ +#define R200_SS_LIGHT_DCD_ADDR 0x00000000 +#define R200_SS_LIGHT_DCM_ADDR 0x00000008 +#define R200_SS_LIGHT_SPOT_EXPONENT_ADDR 0x00000010 +#define R200_SS_LIGHT_SPOT_CUTOFF_ADDR 0x00000018 +#define R200_SS_LIGHT_SPECULAR_THRESH_ADDR 0x00000020 +#define R200_SS_LIGHT_RANGE_CUTOFF_SQRD 0x00000028 +#define R200_SS_LIGHT_RANGE_ATT_CONST 0x00000030 +#define R200_SS_VERT_GUARD_CLIP_ADJ_ADDR 0x00000080 +#define R200_SS_VERT_GUARD_DISCARD_ADJ_ADDR 0x00000081 +#define R200_SS_HORZ_GUARD_CLIP_ADJ_ADDR 0x00000082 +#define R200_SS_HORZ_GUARD_DISCARD_ADJ_ADDR 0x00000083 +#define R200_SS_MAT_0_SHININESS 0x00000100 +#define R200_SS_MAT_1_SHININESS 0x00000101 + + +/* + * Matrix indices + */ +#define R200_MTX_MV 0 +#define R200_MTX_IMV 1 +#define R200_MTX_MVP 2 +#define R200_MTX_TEX0 3 +#define R200_MTX_TEX1 4 +#define R200_MTX_TEX2 5 +#define R200_MTX_TEX3 6 +#define R200_MTX_TEX4 7 +#define R200_MTX_TEX5 8 + +/* Color formats for 2d packets + */ +#define R200_CP_COLOR_FORMAT_CI8 2 +#define R200_CP_COLOR_FORMAT_ARGB1555 3 +#define R200_CP_COLOR_FORMAT_RGB565 4 +#define R200_CP_COLOR_FORMAT_ARGB8888 6 +#define R200_CP_COLOR_FORMAT_RGB332 7 +#define R200_CP_COLOR_FORMAT_RGB8 9 +#define R200_CP_COLOR_FORMAT_ARGB4444 15 + + +/* + * CP type-3 packets + */ +#define R200_CP_CMD_NOP 0xC0001000 +#define R200_CP_CMD_NEXT_CHAR 0xC0001900 +#define R200_CP_CMD_PLY_NEXTSCAN 0xC0001D00 +#define R200_CP_CMD_SET_SCISSORS 0xC0001E00 +#define R200_CP_CMD_LOAD_MICROCODE 0xC0002400 +#define R200_CP_CMD_WAIT_FOR_IDLE 0xC0002600 +#define R200_CP_CMD_3D_DRAW_VBUF 0xC0002800 +#define R200_CP_CMD_3D_DRAW_IMMD 0xC0002900 +#define R200_CP_CMD_3D_DRAW_INDX 0xC0002A00 +#define R200_CP_CMD_LOAD_PALETTE 0xC0002C00 +#define R200_CP_CMD_3D_LOAD_VBPNTR 0xC0002F00 +#define R200_CP_CMD_INDX_BUFFER 0xC0003300 +#define R200_CP_CMD_3D_DRAW_VBUF_2 0xC0003400 +#define R200_CP_CMD_3D_DRAW_IMMD_2 0xC0003500 +#define R200_CP_CMD_3D_DRAW_INDX_2 0xC0003600 +#define R200_CP_CMD_PAINT 0xC0009100 +#define R200_CP_CMD_BITBLT 0xC0009200 +#define R200_CP_CMD_SMALLTEXT 0xC0009300 +#define R200_CP_CMD_HOSTDATA_BLT 0xC0009400 +#define R200_CP_CMD_POLYLINE 0xC0009500 +#define R200_CP_CMD_POLYSCANLINES 0xC0009800 +#define R200_CP_CMD_PAINT_MULTI 0xC0009A00 +#define R200_CP_CMD_BITBLT_MULTI 0xC0009B00 +#define R200_CP_CMD_TRANS_BITBLT 0xC0009C00 + + +#define R200_AGP_TEX_OFFSET 0x02000000 + + + + +#endif + Index: xc/lib/GL/mesa/src/drv/r200/r200_sanity.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_sanity.c:1.1 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_sanity.c Wed Oct 30 07:51:52 2002 @@ -0,0 +1,1316 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_sanity.c,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/************************************************************************** + +Copyright 2002 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics Inc, Cedar Park, TX. + +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, TUNGSTEN GRAPHICS 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 + * + */ + +#include "r200_context.h" +#include "r200_ioctl.h" +#include "r200_sanity.h" +#include "radeon_reg.h" +#include "r200_reg.h" + +/* Set this '1' to get more verbiage. + */ +#define MORE_VERBOSE 1 + +#if MORE_VERBOSE +#define VERBOSE (R200_DEBUG & DEBUG_VERBOSE) +#define NORMAL (1) +#else +#define VERBOSE 0 +#define NORMAL (R200_DEBUG & DEBUG_VERBOSE) +#endif + + +/* New (1.3) state mechanism. 3 commands (packet, scalar, vector) in + * 1.3 cmdbuffers allow all previous state to be updated as well as + * the tcl scalar and vector areas. + */ +static struct { + int start; + int len; + const char *name; +} packet[RADEON_MAX_STATE_PACKETS] = { + { RADEON_PP_MISC,7,"RADEON_PP_MISC" }, + { RADEON_PP_CNTL,3,"RADEON_PP_CNTL" }, + { RADEON_RB3D_COLORPITCH,1,"RADEON_RB3D_COLORPITCH" }, + { RADEON_RE_LINE_PATTERN,2,"RADEON_RE_LINE_PATTERN" }, + { RADEON_SE_LINE_WIDTH,1,"RADEON_SE_LINE_WIDTH" }, + { RADEON_PP_LUM_MATRIX,1,"RADEON_PP_LUM_MATRIX" }, + { RADEON_PP_ROT_MATRIX_0,2,"RADEON_PP_ROT_MATRIX_0" }, + { RADEON_RB3D_STENCILREFMASK,3,"RADEON_RB3D_STENCILREFMASK" }, + { RADEON_SE_VPORT_XSCALE,6,"RADEON_SE_VPORT_XSCALE" }, + { RADEON_SE_CNTL,2,"RADEON_SE_CNTL" }, + { RADEON_SE_CNTL_STATUS,1,"RADEON_SE_CNTL_STATUS" }, + { RADEON_RE_MISC,1,"RADEON_RE_MISC" }, + { RADEON_PP_TXFILTER_0,6,"RADEON_PP_TXFILTER_0" }, + { RADEON_PP_BORDER_COLOR_0,1,"RADEON_PP_BORDER_COLOR_0" }, + { RADEON_PP_TXFILTER_1,6,"RADEON_PP_TXFILTER_1" }, + { RADEON_PP_BORDER_COLOR_1,1,"RADEON_PP_BORDER_COLOR_1" }, + { RADEON_PP_TXFILTER_2,6,"RADEON_PP_TXFILTER_2" }, + { RADEON_PP_BORDER_COLOR_2,1,"RADEON_PP_BORDER_COLOR_2" }, + { RADEON_SE_ZBIAS_FACTOR,2,"RADEON_SE_ZBIAS_FACTOR" }, + { RADEON_SE_TCL_OUTPUT_VTX_FMT,11,"RADEON_SE_TCL_OUTPUT_VTX_FMT" }, + { RADEON_SE_TCL_MATERIAL_EMMISSIVE_RED,17,"RADEON_SE_TCL_MATERIAL_EMMISSIVE_RED" }, + { R200_PP_TXCBLEND_0, 4, "R200_EMIT_PP_TXCBLEND_0" }, + { R200_PP_TXCBLEND_1, 4, "R200_PP_TXCBLEND_1" }, + { R200_PP_TXCBLEND_2, 4, "R200_PP_TXCBLEND_2" }, + { R200_PP_TXCBLEND_3, 4, "R200_PP_TXCBLEND_3" }, + { R200_PP_TXCBLEND_4, 4, "R200_PP_TXCBLEND_4" }, + { R200_PP_TXCBLEND_5, 4, "R200_PP_TXCBLEND_5" }, + { R200_PP_TXCBLEND_6, 4, "R200_PP_TXCBLEND_6" }, + { R200_PP_TXCBLEND_7, 4, "R200_PP_TXCBLEND_7" }, + { R200_SE_TCL_LIGHT_MODEL_CTL_0, 6, "R200_SE_TCL_LIGHT_MODEL_CTL_0" }, + { R200_PP_TFACTOR_0, 6, "R200_PP_TFACTOR_0" }, + { R200_SE_VTX_FMT_0, 4, "R200_SE_VTX_FMT_0" }, + { R200_SE_VAP_CNTL, 1, "R200_SE_VAP_CNTL" }, + { R200_SE_TCL_MATRIX_SEL_0, 5, "R200_SE_TCL_MATRIX_SEL_0" }, + { R200_SE_TCL_TEX_PROC_CTL_2, 5, "R200_SE_TCL_TEX_PROC_CTL_2" }, + { R200_SE_TCL_UCP_VERT_BLEND_CTL, 1, "R200_SE_TCL_UCP_VERT_BLEND_CTL" }, + { R200_PP_TXFILTER_0, 6, "R200_PP_TXFILTER_0" }, + { R200_PP_TXFILTER_1, 6, "R200_PP_TXFILTER_1" }, + { R200_PP_TXFILTER_2, 6, "R200_PP_TXFILTER_2" }, + { R200_PP_TXFILTER_3, 6, "R200_PP_TXFILTER_3" }, + { R200_PP_TXFILTER_4, 6, "R200_PP_TXFILTER_4" }, + { R200_PP_TXFILTER_5, 6, "R200_PP_TXFILTER_5" }, + { R200_PP_TXOFFSET_0, 1, "R200_PP_TXOFFSET_0" }, + { R200_PP_TXOFFSET_1, 1, "R200_PP_TXOFFSET_1" }, + { R200_PP_TXOFFSET_2, 1, "R200_PP_TXOFFSET_2" }, + { R200_PP_TXOFFSET_3, 1, "R200_PP_TXOFFSET_3" }, + { R200_PP_TXOFFSET_4, 1, "R200_PP_TXOFFSET_4" }, + { R200_PP_TXOFFSET_5, 1, "R200_PP_TXOFFSET_5" }, + { R200_SE_VTE_CNTL, 1, "R200_SE_VTE_CNTL" }, + { R200_SE_TCL_OUTPUT_VTX_COMP_SEL, 1, "R200_SE_TCL_OUTPUT_VTX_COMP_SEL" }, + { R200_PP_TAM_DEBUG3, 1, "R200_PP_TAM_DEBUG3" }, + { R200_PP_CNTL_X, 1, "R200_PP_CNTL_X" }, + { R200_RB3D_DEPTHXY_OFFSET, 1, "R200_RB3D_DEPTHXY_OFFSET" }, + { R200_RE_AUX_SCISSOR_CNTL, 1, "R200_RE_AUX_SCISSOR_CNTL" }, + { R200_RE_SCISSOR_TL_0, 2, "R200_RE_SCISSOR_TL_0" }, + { R200_RE_SCISSOR_TL_1, 2, "R200_RE_SCISSOR_TL_1" }, + { R200_RE_SCISSOR_TL_2, 2, "R200_RE_SCISSOR_TL_2" }, + { R200_SE_VAP_CNTL_STATUS, 1, "R200_SE_VAP_CNTL_STATUS" }, + { R200_SE_VTX_STATE_CNTL, 1, "R200_SE_VTX_STATE_CNTL" }, + { R200_RE_POINTSIZE, 1, "R200_RE_POINTSIZE" }, + { R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_0, 4, "R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_0" }, +}; + +struct reg_names { + int idx; + const char *name; +}; + +static struct reg_names reg_names[] = { + { R200_PP_MISC, "R200_PP_MISC" }, + { R200_PP_FOG_COLOR, "R200_PP_FOG_COLOR" }, + { R200_RE_SOLID_COLOR, "R200_RE_SOLID_COLOR" }, + { R200_RB3D_BLENDCNTL, "R200_RB3D_BLENDCNTL" }, + { R200_RB3D_DEPTHOFFSET, "R200_RB3D_DEPTHOFFSET" }, + { R200_RB3D_DEPTHPITCH, "R200_RB3D_DEPTHPITCH" }, + { R200_RB3D_ZSTENCILCNTL, "R200_RB3D_ZSTENCILCNTL" }, + { R200_PP_CNTL, "R200_PP_CNTL" }, + { R200_RB3D_CNTL, "R200_RB3D_CNTL" }, + { R200_RB3D_COLOROFFSET, "R200_RB3D_COLOROFFSET" }, + { R200_RE_WIDTH_HEIGHT, "R200_RE_WIDTH_HEIGHT" }, + { R200_RB3D_COLORPITCH, "R200_RB3D_COLORPITCH" }, + { R200_SE_CNTL, "R200_SE_CNTL" }, + { R200_RE_CNTL, "R200_RE_CNTL" }, + { R200_RE_MISC, "R200_RE_MISC" }, + { R200_RE_STIPPLE_ADDR, "R200_RE_STIPPLE_ADDR" }, + { R200_RE_STIPPLE_DATA, "R200_RE_STIPPLE_DATA" }, + { R200_RE_LINE_PATTERN, "R200_RE_LINE_PATTERN" }, + { R200_RE_LINE_STATE, "R200_RE_LINE_STATE" }, + { R200_RE_SCISSOR_TL_0, "R200_RE_SCISSOR_TL_0" }, + { R200_RE_SCISSOR_BR_0, "R200_RE_SCISSOR_BR_0" }, + { R200_RE_SCISSOR_TL_1, "R200_RE_SCISSOR_TL_1" }, + { R200_RE_SCISSOR_BR_1, "R200_RE_SCISSOR_BR_1" }, + { R200_RE_SCISSOR_TL_2, "R200_RE_SCISSOR_TL_2" }, + { R200_RE_SCISSOR_BR_2, "R200_RE_SCISSOR_BR_2" }, + { R200_RB3D_DEPTHXY_OFFSET, "R200_RB3D_DEPTHXY_OFFSET" }, + { R200_RB3D_STENCILREFMASK, "R200_RB3D_STENCILREFMASK" }, + { R200_RB3D_ROPCNTL, "R200_RB3D_ROPCNTL" }, + { R200_RB3D_PLANEMASK, "R200_RB3D_PLANEMASK" }, + { R200_SE_VPORT_XSCALE, "R200_SE_VPORT_XSCALE" }, + { R200_SE_VPORT_XOFFSET, "R200_SE_VPORT_XOFFSET" }, + { R200_SE_VPORT_YSCALE, "R200_SE_VPORT_YSCALE" }, + { R200_SE_VPORT_YOFFSET, "R200_SE_VPORT_YOFFSET" }, + { R200_SE_VPORT_ZSCALE, "R200_SE_VPORT_ZSCALE" }, + { R200_SE_VPORT_ZOFFSET, "R200_SE_VPORT_ZOFFSET" }, + { R200_SE_ZBIAS_FACTOR, "R200_SE_ZBIAS_FACTOR" }, + { R200_SE_ZBIAS_CONSTANT, "R200_SE_ZBIAS_CONSTANT" }, + { R200_SE_LINE_WIDTH, "R200_SE_LINE_WIDTH" }, + { R200_SE_VAP_CNTL, "R200_SE_VAP_CNTL" }, + { R200_SE_VF_CNTL, "R200_SE_VF_CNTL" }, + { R200_SE_VTX_FMT_0, "R200_SE_VTX_FMT_0" }, + { R200_SE_VTX_FMT_1, "R200_SE_VTX_FMT_1" }, + { R200_SE_TCL_OUTPUT_VTX_FMT_0, "R200_SE_TCL_OUTPUT_VTX_FMT_0" }, + { R200_SE_TCL_OUTPUT_VTX_FMT_1, "R200_SE_TCL_OUTPUT_VTX_FMT_1" }, + { R200_SE_VTE_CNTL, "R200_SE_VTE_CNTL" }, + { R200_SE_VTX_NUM_ARRAYS, "R200_SE_VTX_NUM_ARRAYS" }, + { R200_SE_VTX_AOS_ATTR01, "R200_SE_VTX_AOS_ATTR01" }, + { R200_SE_VTX_AOS_ADDR0, "R200_SE_VTX_AOS_ADDR0" }, + { R200_SE_VTX_AOS_ADDR1, "R200_SE_VTX_AOS_ADDR1" }, + { R200_SE_VTX_AOS_ATTR23, "R200_SE_VTX_AOS_ATTR23" }, + { R200_SE_VTX_AOS_ADDR2, "R200_SE_VTX_AOS_ADDR2" }, + { R200_SE_VTX_AOS_ADDR3, "R200_SE_VTX_AOS_ADDR3" }, + { R200_SE_VTX_AOS_ATTR45, "R200_SE_VTX_AOS_ATTR45" }, + { R200_SE_VTX_AOS_ADDR4, "R200_SE_VTX_AOS_ADDR4" }, + { R200_SE_VTX_AOS_ADDR5, "R200_SE_VTX_AOS_ADDR5" }, + { R200_SE_VTX_AOS_ATTR67, "R200_SE_VTX_AOS_ATTR67" }, + { R200_SE_VTX_AOS_ADDR6, "R200_SE_VTX_AOS_ADDR6" }, + { R200_SE_VTX_AOS_ADDR7, "R200_SE_VTX_AOS_ADDR7" }, + { R200_SE_VTX_AOS_ATTR89, "R200_SE_VTX_AOS_ATTR89" }, + { R200_SE_VTX_AOS_ADDR8, "R200_SE_VTX_AOS_ADDR8" }, + { R200_SE_VTX_AOS_ADDR9, "R200_SE_VTX_AOS_ADDR9" }, + { R200_SE_VTX_AOS_ATTR1011, "R200_SE_VTX_AOS_ATTR1011" }, + { R200_SE_VTX_AOS_ADDR10, "R200_SE_VTX_AOS_ADDR10" }, + { R200_SE_VTX_AOS_ADDR11, "R200_SE_VTX_AOS_ADDR11" }, + { R200_SE_VF_MAX_VTX_INDX, "R200_SE_VF_MAX_VTX_INDX" }, + { R200_SE_VF_MIN_VTX_INDX, "R200_SE_VF_MIN_VTX_INDX" }, + { R200_SE_VTX_STATE_CNTL, "R200_SE_VTX_STATE_CNTL" }, + { R200_SE_TCL_VECTOR_INDX_REG, "R200_SE_TCL_VECTOR_INDX_REG" }, + { R200_SE_TCL_VECTOR_DATA_REG, "R200_SE_TCL_VECTOR_DATA_REG" }, + { R200_SE_TCL_SCALAR_INDX_REG, "R200_SE_TCL_SCALAR_INDX_REG" }, + { R200_SE_TCL_SCALAR_DATA_REG, "R200_SE_TCL_SCALAR_DATA_REG" }, + { R200_SE_TCL_MATRIX_SEL_0, "R200_SE_TCL_MATRIX_SEL_0" }, + { R200_SE_TCL_MATRIX_SEL_1, "R200_SE_TCL_MATRIX_SEL_1" }, + { R200_SE_TCL_MATRIX_SEL_2, "R200_SE_TCL_MATRIX_SEL_2" }, + { R200_SE_TCL_MATRIX_SEL_3, "R200_SE_TCL_MATRIX_SEL_3" }, + { R200_SE_TCL_MATRIX_SEL_4, "R200_SE_TCL_MATRIX_SEL_4" }, + { R200_SE_TCL_LIGHT_MODEL_CTL_0, "R200_SE_TCL_LIGHT_MODEL_CTL_0" }, + { R200_SE_TCL_LIGHT_MODEL_CTL_1, "R200_SE_TCL_LIGHT_MODEL_CTL_1" }, + { R200_SE_TCL_PER_LIGHT_CTL_0, "R200_SE_TCL_PER_LIGHT_CTL_0" }, + { R200_SE_TCL_PER_LIGHT_CTL_1, "R200_SE_TCL_PER_LIGHT_CTL_1" }, + { R200_SE_TCL_PER_LIGHT_CTL_2, "R200_SE_TCL_PER_LIGHT_CTL_2" }, + { R200_SE_TCL_PER_LIGHT_CTL_3, "R200_SE_TCL_PER_LIGHT_CTL_3" }, + { R200_SE_TCL_TEX_PROC_CTL_2, "R200_SE_TCL_TEX_PROC_CTL_2" }, + { R200_SE_TCL_TEX_PROC_CTL_3, "R200_SE_TCL_TEX_PROC_CTL_3" }, + { R200_SE_TCL_TEX_PROC_CTL_0, "R200_SE_TCL_TEX_PROC_CTL_0" }, + { R200_SE_TCL_TEX_PROC_CTL_1, "R200_SE_TCL_TEX_PROC_CTL_1" }, + { R200_SE_TC_TEX_CYL_WRAP_CTL, "R200_SE_TC_TEX_CYL_WRAP_CTL" }, + { R200_SE_TCL_UCP_VERT_BLEND_CTL, "R200_SE_TCL_UCP_VERT_BLEND_CTL" }, + { R200_SE_TCL_POINT_SPRITE_CNTL, "R200_SE_TCL_POINT_SPRITE_CNTL" }, + { R200_SE_VTX_ST_POS_0_X_4, "R200_SE_VTX_ST_POS_0_X_4" }, + { R200_SE_VTX_ST_POS_0_Y_4, "R200_SE_VTX_ST_POS_0_Y_4" }, + { R200_SE_VTX_ST_POS_0_Z_4, "R200_SE_VTX_ST_POS_0_Z_4" }, + { R200_SE_VTX_ST_POS_0_W_4, "R200_SE_VTX_ST_POS_0_W_4" }, + { R200_SE_VTX_ST_NORM_0_X, "R200_SE_VTX_ST_NORM_0_X" }, + { R200_SE_VTX_ST_NORM_0_Y, "R200_SE_VTX_ST_NORM_0_Y" }, + { R200_SE_VTX_ST_NORM_0_Z, "R200_SE_VTX_ST_NORM_0_Z" }, + { R200_SE_VTX_ST_PVMS, "R200_SE_VTX_ST_PVMS" }, + { R200_SE_VTX_ST_CLR_0_R, "R200_SE_VTX_ST_CLR_0_R" }, + { R200_SE_VTX_ST_CLR_0_G, "R200_SE_VTX_ST_CLR_0_G" }, + { R200_SE_VTX_ST_CLR_0_B, "R200_SE_VTX_ST_CLR_0_B" }, + { R200_SE_VTX_ST_CLR_0_A, "R200_SE_VTX_ST_CLR_0_A" }, + { R200_SE_VTX_ST_CLR_1_R, "R200_SE_VTX_ST_CLR_1_R" }, + { R200_SE_VTX_ST_CLR_1_G, "R200_SE_VTX_ST_CLR_1_G" }, + { R200_SE_VTX_ST_CLR_1_B, "R200_SE_VTX_ST_CLR_1_B" }, + { R200_SE_VTX_ST_CLR_1_A, "R200_SE_VTX_ST_CLR_1_A" }, + { R200_SE_VTX_ST_CLR_2_R, "R200_SE_VTX_ST_CLR_2_R" }, + { R200_SE_VTX_ST_CLR_2_G, "R200_SE_VTX_ST_CLR_2_G" }, + { R200_SE_VTX_ST_CLR_2_B, "R200_SE_VTX_ST_CLR_2_B" }, + { R200_SE_VTX_ST_CLR_2_A, "R200_SE_VTX_ST_CLR_2_A" }, + { R200_SE_VTX_ST_CLR_3_R, "R200_SE_VTX_ST_CLR_3_R" }, + { R200_SE_VTX_ST_CLR_3_G, "R200_SE_VTX_ST_CLR_3_G" }, + { R200_SE_VTX_ST_CLR_3_B, "R200_SE_VTX_ST_CLR_3_B" }, + { R200_SE_VTX_ST_CLR_3_A, "R200_SE_VTX_ST_CLR_3_A" }, + { R200_SE_VTX_ST_CLR_4_R, "R200_SE_VTX_ST_CLR_4_R" }, + { R200_SE_VTX_ST_CLR_4_G, "R200_SE_VTX_ST_CLR_4_G" }, + { R200_SE_VTX_ST_CLR_4_B, "R200_SE_VTX_ST_CLR_4_B" }, + { R200_SE_VTX_ST_CLR_4_A, "R200_SE_VTX_ST_CLR_4_A" }, + { R200_SE_VTX_ST_CLR_5_R, "R200_SE_VTX_ST_CLR_5_R" }, + { R200_SE_VTX_ST_CLR_5_G, "R200_SE_VTX_ST_CLR_5_G" }, + { R200_SE_VTX_ST_CLR_5_B, "R200_SE_VTX_ST_CLR_5_B" }, + { R200_SE_VTX_ST_CLR_5_A, "R200_SE_VTX_ST_CLR_5_A" }, + { R200_SE_VTX_ST_CLR_6_R, "R200_SE_VTX_ST_CLR_6_R" }, + { R200_SE_VTX_ST_CLR_6_G, "R200_SE_VTX_ST_CLR_6_G" }, + { R200_SE_VTX_ST_CLR_6_B, "R200_SE_VTX_ST_CLR_6_B" }, + { R200_SE_VTX_ST_CLR_6_A, "R200_SE_VTX_ST_CLR_6_A" }, + { R200_SE_VTX_ST_CLR_7_R, "R200_SE_VTX_ST_CLR_7_R" }, + { R200_SE_VTX_ST_CLR_7_G, "R200_SE_VTX_ST_CLR_7_G" }, + { R200_SE_VTX_ST_CLR_7_B, "R200_SE_VTX_ST_CLR_7_B" }, + { R200_SE_VTX_ST_CLR_7_A, "R200_SE_VTX_ST_CLR_7_A" }, + { R200_SE_VTX_ST_TEX_0_S, "R200_SE_VTX_ST_TEX_0_S" }, + { R200_SE_VTX_ST_TEX_0_T, "R200_SE_VTX_ST_TEX_0_T" }, + { R200_SE_VTX_ST_TEX_0_R, "R200_SE_VTX_ST_TEX_0_R" }, + { R200_SE_VTX_ST_TEX_0_Q, "R200_SE_VTX_ST_TEX_0_Q" }, + { R200_SE_VTX_ST_TEX_1_S, "R200_SE_VTX_ST_TEX_1_S" }, + { R200_SE_VTX_ST_TEX_1_T, "R200_SE_VTX_ST_TEX_1_T" }, + { R200_SE_VTX_ST_TEX_1_R, "R200_SE_VTX_ST_TEX_1_R" }, + { R200_SE_VTX_ST_TEX_1_Q, "R200_SE_VTX_ST_TEX_1_Q" }, + { R200_SE_VTX_ST_TEX_2_S, "R200_SE_VTX_ST_TEX_2_S" }, + { R200_SE_VTX_ST_TEX_2_T, "R200_SE_VTX_ST_TEX_2_T" }, + { R200_SE_VTX_ST_TEX_2_R, "R200_SE_VTX_ST_TEX_2_R" }, + { R200_SE_VTX_ST_TEX_2_Q, "R200_SE_VTX_ST_TEX_2_Q" }, + { R200_SE_VTX_ST_TEX_3_S, "R200_SE_VTX_ST_TEX_3_S" }, + { R200_SE_VTX_ST_TEX_3_T, "R200_SE_VTX_ST_TEX_3_T" }, + { R200_SE_VTX_ST_TEX_3_R, "R200_SE_VTX_ST_TEX_3_R" }, + { R200_SE_VTX_ST_TEX_3_Q, "R200_SE_VTX_ST_TEX_3_Q" }, + { R200_SE_VTX_ST_TEX_4_S, "R200_SE_VTX_ST_TEX_4_S" }, + { R200_SE_VTX_ST_TEX_4_T, "R200_SE_VTX_ST_TEX_4_T" }, + { R200_SE_VTX_ST_TEX_4_R, "R200_SE_VTX_ST_TEX_4_R" }, + { R200_SE_VTX_ST_TEX_4_Q, "R200_SE_VTX_ST_TEX_4_Q" }, + { R200_SE_VTX_ST_TEX_5_S, "R200_SE_VTX_ST_TEX_5_S" }, + { R200_SE_VTX_ST_TEX_5_T, "R200_SE_VTX_ST_TEX_5_T" }, + { R200_SE_VTX_ST_TEX_5_R, "R200_SE_VTX_ST_TEX_5_R" }, + { R200_SE_VTX_ST_TEX_5_Q, "R200_SE_VTX_ST_TEX_5_Q" }, + { R200_SE_VTX_ST_PNT_SPRT_SZ, "R200_SE_VTX_ST_PNT_SPRT_SZ" }, + { R200_SE_VTX_ST_DISC_FOG, "R200_SE_VTX_ST_DISC_FOG" }, + { R200_SE_VTX_ST_SHININESS_0, "R200_SE_VTX_ST_SHININESS_0" }, + { R200_SE_VTX_ST_SHININESS_1, "R200_SE_VTX_ST_SHININESS_1" }, + { R200_SE_VTX_ST_BLND_WT_0, "R200_SE_VTX_ST_BLND_WT_0" }, + { R200_SE_VTX_ST_BLND_WT_1, "R200_SE_VTX_ST_BLND_WT_1" }, + { R200_SE_VTX_ST_BLND_WT_2, "R200_SE_VTX_ST_BLND_WT_2" }, + { R200_SE_VTX_ST_BLND_WT_3, "R200_SE_VTX_ST_BLND_WT_3" }, + { R200_SE_VTX_ST_POS_1_X, "R200_SE_VTX_ST_POS_1_X" }, + { R200_SE_VTX_ST_POS_1_Y, "R200_SE_VTX_ST_POS_1_Y" }, + { R200_SE_VTX_ST_POS_1_Z, "R200_SE_VTX_ST_POS_1_Z" }, + { R200_SE_VTX_ST_POS_1_W, "R200_SE_VTX_ST_POS_1_W" }, + { R200_SE_VTX_ST_NORM_1_X, "R200_SE_VTX_ST_NORM_1_X" }, + { R200_SE_VTX_ST_NORM_1_Y, "R200_SE_VTX_ST_NORM_1_Y" }, + { R200_SE_VTX_ST_NORM_1_Z, "R200_SE_VTX_ST_NORM_1_Z" }, + { R200_SE_VTX_ST_USR_CLR_0_R, "R200_SE_VTX_ST_USR_CLR_0_R" }, + { R200_SE_VTX_ST_USR_CLR_0_G, "R200_SE_VTX_ST_USR_CLR_0_G" }, + { R200_SE_VTX_ST_USR_CLR_0_B, "R200_SE_VTX_ST_USR_CLR_0_B" }, + { R200_SE_VTX_ST_USR_CLR_0_A, "R200_SE_VTX_ST_USR_CLR_0_A" }, + { R200_SE_VTX_ST_USR_CLR_1_R, "R200_SE_VTX_ST_USR_CLR_1_R" }, + { R200_SE_VTX_ST_USR_CLR_1_G, "R200_SE_VTX_ST_USR_CLR_1_G" }, + { R200_SE_VTX_ST_USR_CLR_1_B, "R200_SE_VTX_ST_USR_CLR_1_B" }, + { R200_SE_VTX_ST_USR_CLR_1_A, "R200_SE_VTX_ST_USR_CLR_1_A" }, + { R200_SE_VTX_ST_CLR_0_PKD, "R200_SE_VTX_ST_CLR_0_PKD" }, + { R200_SE_VTX_ST_CLR_1_PKD, "R200_SE_VTX_ST_CLR_1_PKD" }, + { R200_SE_VTX_ST_CLR_2_PKD, "R200_SE_VTX_ST_CLR_2_PKD" }, + { R200_SE_VTX_ST_CLR_3_PKD, "R200_SE_VTX_ST_CLR_3_PKD" }, + { R200_SE_VTX_ST_CLR_4_PKD, "R200_SE_VTX_ST_CLR_4_PKD" }, + { R200_SE_VTX_ST_CLR_5_PKD, "R200_SE_VTX_ST_CLR_5_PKD" }, + { R200_SE_VTX_ST_CLR_6_PKD, "R200_SE_VTX_ST_CLR_6_PKD" }, + { R200_SE_VTX_ST_CLR_7_PKD, "R200_SE_VTX_ST_CLR_7_PKD" }, + { R200_SE_VTX_ST_POS_0_X_2, "R200_SE_VTX_ST_POS_0_X_2" }, + { R200_SE_VTX_ST_POS_0_Y_2, "R200_SE_VTX_ST_POS_0_Y_2" }, + { R200_SE_VTX_ST_PAR_CLR_LD, "R200_SE_VTX_ST_PAR_CLR_LD" }, + { R200_SE_VTX_ST_USR_CLR_PKD, "R200_SE_VTX_ST_USR_CLR_PKD" }, + { R200_SE_VTX_ST_POS_0_X_3, "R200_SE_VTX_ST_POS_0_X_3" }, + { R200_SE_VTX_ST_POS_0_Y_3, "R200_SE_VTX_ST_POS_0_Y_3" }, + { R200_SE_VTX_ST_POS_0_Z_3, "R200_SE_VTX_ST_POS_0_Z_3" }, + { R200_SE_VTX_ST_END_OF_PKT, "R200_SE_VTX_ST_END_OF_PKT" }, + { R200_RE_POINTSIZE, "R200_RE_POINTSIZE" }, + { R200_RE_TOP_LEFT, "R200_RE_TOP_LEFT" }, + { R200_RE_AUX_SCISSOR_CNTL, "R200_RE_AUX_SCISSOR_CNTL" }, + { R200_PP_TXFILTER_0, "R200_PP_TXFILTER_0" }, + { R200_PP_TXFORMAT_0, "R200_PP_TXFORMAT_0" }, + { R200_PP_TXSIZE_0, "R200_PP_TXSIZE_0" }, + { R200_PP_TXFORMAT_X_0, "R200_PP_TXFORMAT_X_0" }, + { R200_PP_TXPITCH_0, "R200_PP_TXPITCH_0" }, + { R200_PP_BORDER_COLOR_0, "R200_PP_BORDER_COLOR_0" }, + { R200_PP_CUBIC_FACES_0, "R200_PP_CUBIC_FACES_0" }, + { R200_PP_TXFILTER_1, "R200_PP_TXFILTER_1" }, + { R200_PP_TXFORMAT_1, "R200_PP_TXFORMAT_1" }, + { R200_PP_TXSIZE_1, "R200_PP_TXSIZE_1" }, + { R200_PP_TXFORMAT_X_1, "R200_PP_TXFORMAT_X_1" }, + { R200_PP_TXPITCH_1, "R200_PP_TXPITCH_1" }, + { R200_PP_BORDER_COLOR_1, "R200_PP_BORDER_COLOR_1" }, + { R200_PP_CUBIC_FACES_1, "R200_PP_CUBIC_FACES_1" }, + { R200_PP_TXFILTER_2, "R200_PP_TXFILTER_2" }, + { R200_PP_TXFORMAT_2, "R200_PP_TXFORMAT_2" }, + { R200_PP_TXSIZE_2, "R200_PP_TXSIZE_2" }, + { R200_PP_TXFORMAT_X_2, "R200_PP_TXFORMAT_X_2" }, + { R200_PP_TXPITCH_2, "R200_PP_TXPITCH_2" }, + { R200_PP_BORDER_COLOR_2, "R200_PP_BORDER_COLOR_2" }, + { R200_PP_CUBIC_FACES_2, "R200_PP_CUBIC_FACES_2" }, + { R200_PP_TXFILTER_3, "R200_PP_TXFILTER_3" }, + { R200_PP_TXFORMAT_3, "R200_PP_TXFORMAT_3" }, + { R200_PP_TXSIZE_3, "R200_PP_TXSIZE_3" }, + { R200_PP_TXFORMAT_X_3, "R200_PP_TXFORMAT_X_3" }, + { R200_PP_TXPITCH_3, "R200_PP_TXPITCH_3" }, + { R200_PP_BORDER_COLOR_3, "R200_PP_BORDER_COLOR_3" }, + { R200_PP_CUBIC_FACES_3, "R200_PP_CUBIC_FACES_3" }, + { R200_PP_TXFILTER_4, "R200_PP_TXFILTER_4" }, + { R200_PP_TXFORMAT_4, "R200_PP_TXFORMAT_4" }, + { R200_PP_TXSIZE_4, "R200_PP_TXSIZE_4" }, + { R200_PP_TXFORMAT_X_4, "R200_PP_TXFORMAT_X_4" }, + { R200_PP_TXPITCH_4, "R200_PP_TXPITCH_4" }, + { R200_PP_BORDER_COLOR_4, "R200_PP_BORDER_COLOR_4" }, + { R200_PP_CUBIC_FACES_4, "R200_PP_CUBIC_FACES_4" }, + { R200_PP_TXFILTER_5, "R200_PP_TXFILTER_5" }, + { R200_PP_TXFORMAT_5, "R200_PP_TXFORMAT_5" }, + { R200_PP_TXSIZE_5, "R200_PP_TXSIZE_5" }, + { R200_PP_TXFORMAT_X_5, "R200_PP_TXFORMAT_X_5" }, + { R200_PP_TXPITCH_5, "R200_PP_TXPITCH_5" }, + { R200_PP_BORDER_COLOR_5, "R200_PP_BORDER_COLOR_5" }, + { R200_PP_CUBIC_FACES_5, "R200_PP_CUBIC_FACES_5" }, + { R200_PP_TXOFFSET_0, "R200_PP_TXOFFSET_0" }, + { R200_PP_CUBIC_OFFSET_F1_0, "R200_PP_CUBIC_OFFSET_F1_0" }, + { R200_PP_CUBIC_OFFSET_F2_0, "R200_PP_CUBIC_OFFSET_F2_0" }, + { R200_PP_CUBIC_OFFSET_F3_0, "R200_PP_CUBIC_OFFSET_F3_0" }, + { R200_PP_CUBIC_OFFSET_F4_0, "R200_PP_CUBIC_OFFSET_F4_0" }, + { R200_PP_CUBIC_OFFSET_F5_0, "R200_PP_CUBIC_OFFSET_F5_0" }, + { R200_PP_TXOFFSET_1, "R200_PP_TXOFFSET_1" }, + { R200_PP_CUBIC_OFFSET_F1_1, "R200_PP_CUBIC_OFFSET_F1_1" }, + { R200_PP_CUBIC_OFFSET_F2_1, "R200_PP_CUBIC_OFFSET_F2_1" }, + { R200_PP_CUBIC_OFFSET_F3_1, "R200_PP_CUBIC_OFFSET_F3_1" }, + { R200_PP_CUBIC_OFFSET_F4_1, "R200_PP_CUBIC_OFFSET_F4_1" }, + { R200_PP_CUBIC_OFFSET_F5_1, "R200_PP_CUBIC_OFFSET_F5_1" }, + { R200_PP_TXOFFSET_2, "R200_PP_TXOFFSET_2" }, + { R200_PP_CUBIC_OFFSET_F1_2, "R200_PP_CUBIC_OFFSET_F1_2" }, + { R200_PP_CUBIC_OFFSET_F2_2, "R200_PP_CUBIC_OFFSET_F2_2" }, + { R200_PP_CUBIC_OFFSET_F3_2, "R200_PP_CUBIC_OFFSET_F3_2" }, + { R200_PP_CUBIC_OFFSET_F4_2, "R200_PP_CUBIC_OFFSET_F4_2" }, + { R200_PP_CUBIC_OFFSET_F5_2, "R200_PP_CUBIC_OFFSET_F5_2" }, + { R200_PP_TXOFFSET_3, "R200_PP_TXOFFSET_3" }, + { R200_PP_CUBIC_OFFSET_F1_3, "R200_PP_CUBIC_OFFSET_F1_3" }, + { R200_PP_CUBIC_OFFSET_F2_3, "R200_PP_CUBIC_OFFSET_F2_3" }, + { R200_PP_CUBIC_OFFSET_F3_3, "R200_PP_CUBIC_OFFSET_F3_3" }, + { R200_PP_CUBIC_OFFSET_F4_3, "R200_PP_CUBIC_OFFSET_F4_3" }, + { R200_PP_CUBIC_OFFSET_F5_3, "R200_PP_CUBIC_OFFSET_F5_3" }, + { R200_PP_TXOFFSET_4, "R200_PP_TXOFFSET_4" }, + { R200_PP_CUBIC_OFFSET_F1_4, "R200_PP_CUBIC_OFFSET_F1_4" }, + { R200_PP_CUBIC_OFFSET_F2_4, "R200_PP_CUBIC_OFFSET_F2_4" }, + { R200_PP_CUBIC_OFFSET_F3_4, "R200_PP_CUBIC_OFFSET_F3_4" }, + { R200_PP_CUBIC_OFFSET_F4_4, "R200_PP_CUBIC_OFFSET_F4_4" }, + { R200_PP_CUBIC_OFFSET_F5_4, "R200_PP_CUBIC_OFFSET_F5_4" }, + { R200_PP_TXOFFSET_5, "R200_PP_TXOFFSET_5" }, + { R200_PP_CUBIC_OFFSET_F1_5, "R200_PP_CUBIC_OFFSET_F1_5" }, + { R200_PP_CUBIC_OFFSET_F2_5, "R200_PP_CUBIC_OFFSET_F2_5" }, + { R200_PP_CUBIC_OFFSET_F3_5, "R200_PP_CUBIC_OFFSET_F3_5" }, + { R200_PP_CUBIC_OFFSET_F4_5, "R200_PP_CUBIC_OFFSET_F4_5" }, + { R200_PP_CUBIC_OFFSET_F5_5, "R200_PP_CUBIC_OFFSET_F5_5" }, + { R200_PP_TAM_DEBUG3, "R200_PP_TAM_DEBUG3" }, + { R200_PP_TFACTOR_0, "R200_PP_TFACTOR_0" }, + { R200_PP_TFACTOR_1, "R200_PP_TFACTOR_1" }, + { R200_PP_TFACTOR_2, "R200_PP_TFACTOR_2" }, + { R200_PP_TFACTOR_3, "R200_PP_TFACTOR_3" }, + { R200_PP_TFACTOR_4, "R200_PP_TFACTOR_4" }, + { R200_PP_TFACTOR_5, "R200_PP_TFACTOR_5" }, + { R200_PP_TXCBLEND_0, "R200_PP_TXCBLEND_0" }, + { R200_PP_TXCBLEND2_0, "R200_PP_TXCBLEND2_0" }, + { R200_PP_TXABLEND_0, "R200_PP_TXABLEND_0" }, + { R200_PP_TXABLEND2_0, "R200_PP_TXABLEND2_0" }, + { R200_PP_TXCBLEND_1, "R200_PP_TXCBLEND_1" }, + { R200_PP_TXCBLEND2_1, "R200_PP_TXCBLEND2_1" }, + { R200_PP_TXABLEND_1, "R200_PP_TXABLEND_1" }, + { R200_PP_TXABLEND2_1, "R200_PP_TXABLEND2_1" }, + { R200_PP_TXCBLEND_2, "R200_PP_TXCBLEND_2" }, + { R200_PP_TXCBLEND2_2, "R200_PP_TXCBLEND2_2" }, + { R200_PP_TXABLEND_2, "R200_PP_TXABLEND_2" }, + { R200_PP_TXABLEND2_2, "R200_PP_TXABLEND2_2" }, + { R200_PP_TXCBLEND_3, "R200_PP_TXCBLEND_3" }, + { R200_PP_TXCBLEND2_3, "R200_PP_TXCBLEND2_3" }, + { R200_PP_TXABLEND_3, "R200_PP_TXABLEND_3" }, + { R200_PP_TXABLEND2_3, "R200_PP_TXABLEND2_3" }, + { R200_PP_TXCBLEND_4, "R200_PP_TXCBLEND_4" }, + { R200_PP_TXCBLEND2_4, "R200_PP_TXCBLEND2_4" }, + { R200_PP_TXABLEND_4, "R200_PP_TXABLEND_4" }, + { R200_PP_TXABLEND2_4, "R200_PP_TXABLEND2_4" }, + { R200_PP_TXCBLEND_5, "R200_PP_TXCBLEND_5" }, + { R200_PP_TXCBLEND2_5, "R200_PP_TXCBLEND2_5" }, + { R200_PP_TXABLEND_5, "R200_PP_TXABLEND_5" }, + { R200_PP_TXABLEND2_5, "R200_PP_TXABLEND2_5" }, + { R200_PP_TXCBLEND_6, "R200_PP_TXCBLEND_6" }, + { R200_PP_TXCBLEND2_6, "R200_PP_TXCBLEND2_6" }, + { R200_PP_TXABLEND_6, "R200_PP_TXABLEND_6" }, + { R200_PP_TXABLEND2_6, "R200_PP_TXABLEND2_6" }, + { R200_PP_TXCBLEND_7, "R200_PP_TXCBLEND_7" }, + { R200_PP_TXCBLEND2_7, "R200_PP_TXCBLEND2_7" }, + { R200_PP_TXABLEND_7, "R200_PP_TXABLEND_7" }, + { R200_PP_TXABLEND2_7, "R200_PP_TXABLEND2_7" }, + { R200_RB3D_ABLENDCNTL, "R200_RB3D_ABLENDCNTL" }, + { R200_RB3D_CBLENDCNTL, "R200_RB3D_CBLENDCNTL" }, + { R200_SE_TCL_OUTPUT_VTX_COMP_SEL, "R200_SE_TCL_OUTPUT_VTX_COMP_SEL" }, + { R200_PP_CNTL_X, "R200_PP_CNTL_X" }, + { R200_SE_VAP_CNTL_STATUS, "R200_SE_VAP_CNTL_STATUS" }, + { R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_0, "R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_0" }, + { R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_1, "R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_1" }, + { R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_2, "R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_2" }, + { R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_3, "R200_SE_TCL_INPUT_VTX_VECTOR_ADDR_3" }, +}; + +static struct reg_names scalar_names[] = { + { R200_SS_LIGHT_DCD_ADDR, "R200_SS_LIGHT_DCD_ADDR" }, + { R200_SS_LIGHT_DCM_ADDR, "R200_SS_LIGHT_DCM_ADDR" }, + { R200_SS_LIGHT_SPOT_EXPONENT_ADDR, "R200_SS_LIGHT_SPOT_EXPONENT_ADDR" }, + { R200_SS_LIGHT_SPOT_CUTOFF_ADDR, "R200_SS_LIGHT_SPOT_CUTOFF_ADDR" }, + { R200_SS_LIGHT_SPECULAR_THRESH_ADDR, "R200_SS_LIGHT_SPECULAR_THRESH_ADDR" }, + { R200_SS_LIGHT_RANGE_CUTOFF_SQRD, "R200_SS_LIGHT_RANGE_CUTOFF_SQRD" }, + { R200_SS_LIGHT_RANGE_ATT_CONST, "R200_SS_LIGHT_RANGE_ATT_CONST" }, + { R200_SS_VERT_GUARD_CLIP_ADJ_ADDR, "R200_SS_VERT_GUARD_CLIP_ADJ_ADDR" }, + { R200_SS_VERT_GUARD_DISCARD_ADJ_ADDR, "R200_SS_VERT_GUARD_DISCARD_ADJ_ADDR" }, + { R200_SS_HORZ_GUARD_CLIP_ADJ_ADDR, "R200_SS_HORZ_GUARD_CLIP_ADJ_ADDR" }, + { R200_SS_HORZ_GUARD_DISCARD_ADJ_ADDR, "R200_SS_HORZ_GUARD_DISCARD_ADJ_ADDR" }, + { R200_SS_MAT_0_SHININESS, "R200_SS_MAT_0_SHININESS" }, + { R200_SS_MAT_1_SHININESS, "R200_SS_MAT_1_SHININESS" }, + { 1000, "" }, +}; + +/* Puff these out to make them look like normal (dword) registers. + */ +static struct reg_names vector_names[] = { + { 0, "start" }, + { R200_VS_LIGHT_AMBIENT_ADDR, "R200_VS_LIGHT_AMBIENT_ADDR" }, + { R200_VS_LIGHT_DIFFUSE_ADDR, "R200_VS_LIGHT_DIFFUSE_ADDR" }, + { R200_VS_LIGHT_SPECULAR_ADDR, "R200_VS_LIGHT_SPECULAR_ADDR" }, + { R200_VS_LIGHT_DIRPOS_ADDR, "R200_VS_LIGHT_DIRPOS_ADDR" }, + { R200_VS_LIGHT_HWVSPOT_ADDR, "R200_VS_LIGHT_HWVSPOT_ADDR" }, + { R200_VS_LIGHT_ATTENUATION_ADDR, "R200_VS_LIGHT_ATTENUATION_ADDR" }, + { R200_VS_SPOT_DUAL_CONE, "R200_VS_SPOT_DUAL_CONE" }, + { R200_VS_GLOBAL_AMBIENT_ADDR, "R200_VS_GLOBAL_AMBIENT_ADDR" }, + { R200_VS_FOG_PARAM_ADDR, "R200_VS_FOG_PARAM_ADDR" }, + { R200_VS_EYE_VECTOR_ADDR, "R200_VS_EYE_VECTOR_ADDR" }, + { R200_VS_UCP_ADDR, "R200_VS_UCP_ADDR" }, + { R200_VS_PNT_SPRITE_VPORT_SCALE, "R200_VS_PNT_SPRITE_VPORT_SCALE" }, + { R200_VS_MATRIX_0_MV, "R200_VS_MATRIX_0_MV" }, + { R200_VS_MATRIX_1_INV_MV, "R200_VS_MATRIX_1_INV_MV" }, + { R200_VS_MATRIX_2_MVP, "R200_VS_MATRIX_2_MVP" }, + { R200_VS_MATRIX_3_TEX0, "R200_VS_MATRIX_3_TEX0" }, + { R200_VS_MATRIX_4_TEX1, "R200_VS_MATRIX_4_TEX1" }, + { R200_VS_MATRIX_5_TEX2, "R200_VS_MATRIX_5_TEX2" }, + { R200_VS_MATRIX_6_TEX3, "R200_VS_MATRIX_6_TEX3" }, + { R200_VS_MATRIX_7_TEX4, "R200_VS_MATRIX_7_TEX4" }, + { R200_VS_MATRIX_8_TEX5, "R200_VS_MATRIX_8_TEX5" }, + { R200_VS_MAT_0_EMISS, "R200_VS_MAT_0_EMISS" }, + { R200_VS_MAT_0_AMB, "R200_VS_MAT_0_AMB" }, + { R200_VS_MAT_0_DIF, "R200_VS_MAT_0_DIF" }, + { R200_VS_MAT_0_SPEC, "R200_VS_MAT_0_SPEC" }, + { R200_VS_MAT_1_EMISS, "R200_VS_MAT_1_EMISS" }, + { R200_VS_MAT_1_AMB, "R200_VS_MAT_1_AMB" }, + { R200_VS_MAT_1_DIF, "R200_VS_MAT_1_DIF" }, + { R200_VS_MAT_1_SPEC, "R200_VS_MAT_1_SPEC" }, + { R200_VS_EYE2CLIP_MTX, "R200_VS_EYE2CLIP_MTX" }, + { R200_VS_PNT_SPRITE_ATT_CONST, "R200_VS_PNT_SPRITE_ATT_CONST" }, + { R200_VS_PNT_SPRITE_EYE_IN_MODEL, "R200_VS_PNT_SPRITE_EYE_IN_MODEL" }, + { R200_VS_PNT_SPRITE_CLAMP, "R200_VS_PNT_SPRITE_CLAMP" }, + { R200_VS_MAX, "R200_VS_MAX" }, + { 1000, "" }, +}; + +union fi { float f; int i; }; + +#define ISVEC 1 +#define ISFLOAT 2 +#define TOUCHED 4 + +struct reg { + int idx; + struct reg_names *closest; + int flags; + union fi current; + union fi *values; + int nvalues; + int nalloc; + float vmin, vmax; +}; + + +static struct reg regs[Elements(reg_names)+1]; +static struct reg scalars[512+1]; +static struct reg vectors[512*4+1]; + +static int total, total_changed, bufs; + +static void init_regs( void ) +{ + struct reg_names *tmp; + int i; + + for (i = 0 ; i < Elements(regs) ; i++) { + regs[i].idx = reg_names[i].idx; + regs[i].closest = ®_names[i]; + regs[i].flags = 0; + } + + for (i = 0, tmp = scalar_names ; i < Elements(scalars) ; i++) { + if (tmp[1].idx == i) tmp++; + scalars[i].idx = i; + scalars[i].closest = tmp; + scalars[i].flags = ISFLOAT; + } + + for (i = 0, tmp = vector_names ; i < Elements(vectors) ; i++) { + if (tmp[1].idx*4 == i) tmp++; + vectors[i].idx = i; + vectors[i].closest = tmp; + vectors[i].flags = ISFLOAT|ISVEC; + } + + regs[Elements(regs)-1].idx = -1; + scalars[Elements(scalars)-1].idx = -1; + vectors[Elements(vectors)-1].idx = -1; +} + +static int find_or_add_value( struct reg *reg, int val ) +{ + int j; + + for ( j = 0 ; j < reg->nvalues ; j++) + if ( val == reg->values[j].i ) + return 1; + + if (j == reg->nalloc) { + reg->nalloc += 5; + reg->nalloc *= 2; + reg->values = (union fi *) realloc( reg->values, + reg->nalloc * sizeof(union fi) ); + } + + reg->values[reg->nvalues++].i = val; + return 0; +} + +static struct reg *lookup_reg( struct reg *tab, int reg ) +{ + int i; + + for (i = 0 ; tab[i].idx != -1 ; i++) { + if (tab[i].idx == reg) + return &tab[i]; + } + + fprintf(stderr, "*** unknown reg 0x%x\n", reg); + return 0; +} + + +static const char *get_reg_name( struct reg *reg ) +{ + static char tmp[80]; + + if (reg->idx == reg->closest->idx) + return reg->closest->name; + + + if (reg->flags & ISVEC) { + if (reg->idx/4 != reg->closest->idx) + sprintf(tmp, "%s+%d[%d]", + reg->closest->name, + (reg->idx/4) - reg->closest->idx, + reg->idx%4); + else + sprintf(tmp, "%s[%d]", reg->closest->name, reg->idx%4); + } + else { + if (reg->idx != reg->closest->idx) + sprintf(tmp, "%s+%d", reg->closest->name, reg->idx - reg->closest->idx); + else + sprintf(tmp, "%s", reg->closest->name); + } + + return tmp; +} + +static int print_int_reg_assignment( struct reg *reg, int data ) +{ + int changed = (reg->current.i != data); + int ever_seen = find_or_add_value( reg, data ); + + if (VERBOSE || (NORMAL && (changed || !ever_seen))) + fprintf(stderr, " %s <-- 0x%x", get_reg_name(reg), data); + + if (NORMAL) { + if (!ever_seen) + fprintf(stderr, " *** BRAND NEW VALUE"); + else if (changed) + fprintf(stderr, " *** CHANGED"); + } + + reg->current.i = data; + + if (VERBOSE || (NORMAL && (changed || !ever_seen))) + fprintf(stderr, "\n"); + + return changed; +} + + +static int print_float_reg_assignment( struct reg *reg, float data ) +{ + int changed = (reg->current.f != data); + int newmin = (data < reg->vmin); + int newmax = (data > reg->vmax); + + if (VERBOSE || (NORMAL && (newmin || newmax || changed))) + fprintf(stderr, " %s <-- %.3f", get_reg_name(reg), data); + + if (NORMAL) { + if (newmin) { + fprintf(stderr, " *** NEW MIN (prev %.3f)", reg->vmin); + reg->vmin = data; + } + else if (newmax) { + fprintf(stderr, " *** NEW MAX (prev %.3f)", reg->vmax); + reg->vmax = data; + } + else if (changed) { + fprintf(stderr, " *** CHANGED"); + } + } + + reg->current.f = data; + + if (VERBOSE || (NORMAL && (newmin || newmax || changed))) + fprintf(stderr, "\n"); + + return changed; +} + +static int print_reg_assignment( struct reg *reg, int data ) +{ + reg->flags |= TOUCHED; + if (reg->flags & ISFLOAT) + return print_float_reg_assignment( reg, *(float *)&data ); + else + return print_int_reg_assignment( reg, data ); +} + +static void print_reg( struct reg *reg ) +{ + if (reg->flags & TOUCHED) { + if (reg->flags & ISFLOAT) { + fprintf(stderr, " %s == %f\n", get_reg_name(reg), reg->current.f); + } else { + fprintf(stderr, " %s == 0x%x\n", get_reg_name(reg), reg->current.i); + } + } +} + + +static void dump_state( void ) +{ + int i; + + for (i = 0 ; i < Elements(regs) ; i++) + print_reg( ®s[i] ); + + for (i = 0 ; i < Elements(scalars) ; i++) + print_reg( &scalars[i] ); + + for (i = 0 ; i < Elements(vectors) ; i++) + print_reg( &vectors[i] ); +} + + + +static int radeon_emit_packets( + drmRadeonCmdHeader header, + drmRadeonCmdBuffer *cmdbuf ) +{ + int id = (int)header.packet.packet_id; + int sz = packet[id].len; + int *data = (int *)cmdbuf->buf; + int i; + + if (sz * sizeof(int) > cmdbuf->bufsz) { + fprintf(stderr, "Packet overflows cmdbuf\n"); + return -EINVAL; + } + + if (!packet[id].name) { + fprintf(stderr, "*** Unknown packet 0 nr %d\n", id ); + return -EINVAL; + } + + + if (VERBOSE) + fprintf(stderr, "Packet 0 reg %s nr %d\n", packet[id].name, sz ); + + for ( i = 0 ; i < sz ; i++) { + struct reg *reg = lookup_reg( regs, packet[id].start + i*4 ); + if (print_reg_assignment( reg, data[i] )) + total_changed++; + total++; + } + + cmdbuf->buf += sz * sizeof(int); + cmdbuf->bufsz -= sz * sizeof(int); + return 0; +} + + +static int radeon_emit_scalars( + drmRadeonCmdHeader header, + drmRadeonCmdBuffer *cmdbuf ) +{ + int sz = header.scalars.count; + int *data = (int *)cmdbuf->buf; + int start = header.scalars.offset; + int stride = header.scalars.stride; + int i; + + if (VERBOSE) + fprintf(stderr, "emit scalars, start %d stride %d nr %d (end %d)\n", + start, stride, sz, start + stride * sz); + + + for (i = 0 ; i < sz ; i++, start += stride) { + struct reg *reg = lookup_reg( scalars, start ); + if (print_reg_assignment( reg, data[i] )) + total_changed++; + total++; + } + + cmdbuf->buf += sz * sizeof(int); + cmdbuf->bufsz -= sz * sizeof(int); + return 0; +} + + +static int radeon_emit_scalars2( + drmRadeonCmdHeader header, + drmRadeonCmdBuffer *cmdbuf ) +{ + int sz = header.scalars.count; + int *data = (int *)cmdbuf->buf; + int start = header.scalars.offset + 0x100; + int stride = header.scalars.stride; + int i; + + if (VERBOSE) + fprintf(stderr, "emit scalars2, start %d stride %d nr %d (end %d)\n", + start, stride, sz, start + stride * sz); + + if (start + stride * sz > 257) { + fprintf(stderr, "emit scalars OVERFLOW %d/%d/%d\n", start, stride, sz); + return -1; + } + + for (i = 0 ; i < sz ; i++, start += stride) { + struct reg *reg = lookup_reg( scalars, start ); + if (print_reg_assignment( reg, data[i] )) + total_changed++; + total++; + } + + cmdbuf->buf += sz * sizeof(int); + cmdbuf->bufsz -= sz * sizeof(int); + return 0; +} + +/* Check: inf/nan/extreme-size? + * Check: table start, end, nr, etc. + */ +static int radeon_emit_vectors( + drmRadeonCmdHeader header, + drmRadeonCmdBuffer *cmdbuf ) +{ + int sz = header.vectors.count; + int *data = (int *)cmdbuf->buf; + int start = header.vectors.offset; + int stride = header.vectors.stride; + int i,j; + + if (VERBOSE) + fprintf(stderr, "emit vectors, start %d stride %d nr %d (end %d) (0x%x)\n", + start, stride, sz, start + stride * sz, header.i); + +/* if (start + stride * (sz/4) > 128) { */ +/* fprintf(stderr, "emit vectors OVERFLOW %d/%d/%d\n", start, stride, sz); */ +/* return -1; */ +/* } */ + + for (i = 0 ; i < sz ; start += stride) { + int changed = 0; + for (j = 0 ; j < 4 ; i++,j++) { + struct reg *reg = lookup_reg( vectors, start*4+j ); + if (print_reg_assignment( reg, data[i] )) + changed = 1; + } + if (changed) + total_changed += 4; + total += 4; + } + + + cmdbuf->buf += sz * sizeof(int); + cmdbuf->bufsz -= sz * sizeof(int); + return 0; +} + +#if 0 +static int print_vertex_format( int vfmt ) +{ + if (NORMAL) { + fprintf(stderr, " %s(%x): %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", + "vertex format", + vfmt, + "xy,", + (vfmt & R200_VTX_Z0) ? "z," : "", + (vfmt & R200_VTX_W0) ? "w0," : "", + (vfmt & R200_VTX_FPCOLOR) ? "fpcolor," : "", + (vfmt & R200_VTX_FPALPHA) ? "fpalpha," : "", + (vfmt & R200_VTX_PKCOLOR) ? "pkcolor," : "", + (vfmt & R200_VTX_FPSPEC) ? "fpspec," : "", + (vfmt & R200_VTX_FPFOG) ? "fpfog," : "", + (vfmt & R200_VTX_PKSPEC) ? "pkspec," : "", + (vfmt & R200_VTX_ST0) ? "st0," : "", + (vfmt & R200_VTX_ST1) ? "st1," : "", + (vfmt & R200_VTX_Q1) ? "q1," : "", + (vfmt & R200_VTX_ST2) ? "st2," : "", + (vfmt & R200_VTX_Q2) ? "q2," : "", + (vfmt & R200_VTX_ST3) ? "st3," : "", + (vfmt & R200_VTX_Q3) ? "q3," : "", + (vfmt & R200_VTX_Q0) ? "q0," : "", + (vfmt & R200_VTX_N0) ? "n0," : "", + (vfmt & R200_VTX_XY1) ? "xy1," : "", + (vfmt & R200_VTX_Z1) ? "z1," : "", + (vfmt & R200_VTX_W1) ? "w1," : "", + (vfmt & R200_VTX_N1) ? "n1," : ""); + + + if (!find_or_add_value( &others[V_VTXFMT], vfmt )) + fprintf(stderr, " *** NEW VALUE"); + + fprintf(stderr, "\n"); + } + + return 0; +} +#endif + +static char *primname[0x10] = { + "NONE", + "POINTS", + "LINES", + "LINE_STRIP", + "TRIANGLES", + "TRIANGLE_FAN", + "TRIANGLE_STRIP", + "RECT_LIST", + 0, + "3VRT_POINTS", + "3VRT_LINES", + "POINT_SPRITES", + "LINE_LOOP", + "QUADS", + "QUAD_STRIP", + "POLYGON", +}; + +static int print_prim_and_flags( int prim ) +{ + int numverts; + + if (NORMAL) + fprintf(stderr, " %s(%x): %s%s%s%s%s%s\n", + "prim flags", + prim, + ((prim & 0x30) == R200_VF_PRIM_WALK_IND) ? "IND," : "", + ((prim & 0x30) == R200_VF_PRIM_WALK_LIST) ? "LIST," : "", + ((prim & 0x30) == R200_VF_PRIM_WALK_RING) ? "RING," : "", + (prim & R200_VF_COLOR_ORDER_RGBA) ? "RGBA," : "BGRA, ", + (prim & R200_VF_INDEX_SZ_4) ? "INDX-32," : "", + (prim & R200_VF_TCL_OUTPUT_VTX_ENABLE) ? "TCL_OUT_VTX," : ""); + + numverts = prim>>16; + + if (NORMAL) + fprintf(stderr, " prim: %s numverts %d\n", primname[prim&0xf], numverts); + + switch (prim & 0xf) { + case R200_VF_PRIM_NONE: + case R200_VF_PRIM_POINTS: + if (numverts < 1) { + fprintf(stderr, "Bad nr verts for line %d\n", numverts); + return -1; + } + break; + case R200_VF_PRIM_LINES: + case R200_VF_PRIM_POINT_SPRITES: + if ((numverts & 1) || numverts == 0) { + fprintf(stderr, "Bad nr verts for line %d\n", numverts); + return -1; + } + break; + case R200_VF_PRIM_LINE_STRIP: + case R200_VF_PRIM_LINE_LOOP: + if (numverts < 2) { + fprintf(stderr, "Bad nr verts for line_strip %d\n", numverts); + return -1; + } + break; + case R200_VF_PRIM_TRIANGLES: + case R200_VF_PRIM_3VRT_POINTS: + case R200_VF_PRIM_3VRT_LINES: + case R200_VF_PRIM_RECT_LIST: + if (numverts % 3 || numverts == 0) { + fprintf(stderr, "Bad nr verts for tri %d\n", numverts); + return -1; + } + break; + case R200_VF_PRIM_TRIANGLE_FAN: + case R200_VF_PRIM_TRIANGLE_STRIP: + case R200_VF_PRIM_POLYGON: + if (numverts < 3) { + fprintf(stderr, "Bad nr verts for strip/fan %d\n", numverts); + return -1; + } + break; + case R200_VF_PRIM_QUADS: + if (numverts % 4 || numverts == 0) { + fprintf(stderr, "Bad nr verts for quad %d\n", numverts); + return -1; + } + break; + case R200_VF_PRIM_QUAD_STRIP: + if (numverts % 2 || numverts < 4) { + fprintf(stderr, "Bad nr verts for quadstrip %d\n", numverts); + return -1; + } + break; + default: + fprintf(stderr, "Bad primitive\n"); + return -1; + } + return 0; +} + +/* build in knowledge about each packet type + */ +static int radeon_emit_packet3( drmRadeonCmdBuffer *cmdbuf ) +{ + int cmdsz; + int *cmd = (int *)cmdbuf->buf; + int *tmp; + int i, stride, size, start; + + cmdsz = 2 + ((cmd[0] & RADEON_CP_PACKET_COUNT_MASK) >> 16); + + if ((cmd[0] & RADEON_CP_PACKET_MASK) != RADEON_CP_PACKET3 || + cmdsz * 4 > cmdbuf->bufsz || + cmdsz > RADEON_CP_PACKET_MAX_DWORDS) { + fprintf(stderr, "Bad packet\n"); + return -EINVAL; + } + + switch( cmd[0] & ~RADEON_CP_PACKET_COUNT_MASK ) { + case R200_CP_CMD_NOP: + if (NORMAL) + fprintf(stderr, "PACKET3_NOP, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_NEXT_CHAR: + if (NORMAL) + fprintf(stderr, "PACKET3_NEXT_CHAR, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_PLY_NEXTSCAN: + if (NORMAL) + fprintf(stderr, "PACKET3_PLY_NEXTSCAN, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_SET_SCISSORS: + if (NORMAL) + fprintf(stderr, "PACKET3_SET_SCISSORS, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_LOAD_MICROCODE: + if (NORMAL) + fprintf(stderr, "PACKET3_LOAD_MICROCODE, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_WAIT_FOR_IDLE: + if (NORMAL) + fprintf(stderr, "PACKET3_WAIT_FOR_IDLE, %d dwords\n", cmdsz); + break; + + case R200_CP_CMD_3D_DRAW_VBUF: + if (NORMAL) + fprintf(stderr, "PACKET3_3D_DRAW_VBUF, %d dwords\n", cmdsz); +/* print_vertex_format(cmd[1]); */ + if (print_prim_and_flags(cmd[2])) + return -EINVAL; + break; + + case R200_CP_CMD_3D_DRAW_IMMD: + if (NORMAL) + fprintf(stderr, "PACKET3_3D_DRAW_IMMD, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_3D_DRAW_INDX: { + int neltdwords; + if (NORMAL) + fprintf(stderr, "PACKET3_3D_DRAW_INDX, %d dwords\n", cmdsz); +/* print_vertex_format(cmd[1]); */ + if (print_prim_and_flags(cmd[2])) + return -EINVAL; + neltdwords = cmd[2]>>16; + neltdwords += neltdwords & 1; + neltdwords /= 2; + if (neltdwords + 3 != cmdsz) + fprintf(stderr, "Mismatch in DRAW_INDX, %d vs cmdsz %d\n", + neltdwords, cmdsz); + break; + } + case R200_CP_CMD_LOAD_PALETTE: + if (NORMAL) + fprintf(stderr, "PACKET3_LOAD_PALETTE, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_3D_LOAD_VBPNTR: + if (NORMAL) { + fprintf(stderr, "PACKET3_3D_LOAD_VBPNTR, %d dwords\n", cmdsz); + fprintf(stderr, " nr arrays: %d\n", cmd[1]); + } + + if (((cmd[1]/2)*3) + ((cmd[1]%2)*2) != cmdsz - 2) { + fprintf(stderr, " ****** MISMATCH %d/%d *******\n", + ((cmd[1]/2)*3) + ((cmd[1]%2)*2) + 2, cmdsz); + return -EINVAL; + } + + if (NORMAL) { + tmp = cmd+2; + for (i = 0 ; i < cmd[1] ; i++) { + if (i & 1) { + stride = (tmp[0]>>24) & 0xff; + size = (tmp[0]>>16) & 0xff; + start = tmp[2]; + tmp += 3; + } + else { + stride = (tmp[0]>>8) & 0xff; + size = (tmp[0]) & 0xff; + start = tmp[1]; + } + fprintf(stderr, " array %d: start 0x%x vsize %d vstride %d\n", + i, start, size, stride ); + } + } + break; + case R200_CP_CMD_PAINT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_PAINT, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_BITBLT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_BITBLT, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_SMALLTEXT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_SMALLTEXT, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_HOSTDATA_BLT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_HOSTDATA_BLT, %d dwords\n", + cmdsz); + break; + case R200_CP_CMD_POLYLINE: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_POLYLINE, %d dwords\n", cmdsz); + break; + case R200_CP_CMD_POLYSCANLINES: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_POLYSCANLINES, %d dwords\n", + cmdsz); + break; + case R200_CP_CMD_PAINT_MULTI: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_PAINT_MULTI, %d dwords\n", + cmdsz); + break; + case R200_CP_CMD_BITBLT_MULTI: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_BITBLT_MULTI, %d dwords\n", + cmdsz); + break; + case R200_CP_CMD_TRANS_BITBLT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_TRANS_BITBLT, %d dwords\n", + cmdsz); + break; + case R200_CP_CMD_3D_DRAW_VBUF_2: + if (NORMAL) + fprintf(stderr, "R200_CP_CMD_3D_DRAW_VBUF_2, %d dwords\n", + cmdsz); + if (print_prim_and_flags(cmd[1])) + return -EINVAL; + break; + case R200_CP_CMD_3D_DRAW_IMMD_2: + if (NORMAL) + fprintf(stderr, "R200_CP_CMD_3D_DRAW_IMMD_2, %d dwords\n", + cmdsz); + if (print_prim_and_flags(cmd[1])) + return -EINVAL; + break; + case R200_CP_CMD_3D_DRAW_INDX_2: + if (NORMAL) + fprintf(stderr, "R200_CP_CMD_3D_DRAW_INDX_2, %d dwords\n", + cmdsz); + if (print_prim_and_flags(cmd[1])) + return -EINVAL; + break; + default: + fprintf(stderr, "UNKNOWN PACKET, %d dwords\n", cmdsz); + break; + } + + cmdbuf->buf += cmdsz * 4; + cmdbuf->bufsz -= cmdsz * 4; + return 0; +} + + +/* Check cliprects for bounds, then pass on to above: + */ +static int radeon_emit_packet3_cliprect( drmRadeonCmdBuffer *cmdbuf ) +{ + XF86DRIClipRectRec *boxes = (XF86DRIClipRectRec *)cmdbuf->boxes; + int i = 0; + + if (VERBOSE && total_changed) { + dump_state(); + total_changed = 0; + } + + if (NORMAL) { + do { + if ( i < cmdbuf->nbox ) { + fprintf(stderr, "Emit box %d/%d %d,%d %d,%d\n", + i, cmdbuf->nbox, + boxes[i].x1, boxes[i].y1, boxes[i].x2, boxes[i].y2); + } + } while ( ++i < cmdbuf->nbox ); + } + + if (cmdbuf->nbox == 1) + cmdbuf->nbox = 0; + + return radeon_emit_packet3( cmdbuf ); +} + + +int r200SanityCmdBuffer( r200ContextPtr rmesa, + int nbox, + XF86DRIClipRectRec *boxes ) +{ + int idx; + drmRadeonCmdBuffer cmdbuf; + drmRadeonCmdHeader header; + static int inited = 0; + + if (!inited) { + init_regs(); + inited = 1; + } + + + cmdbuf.buf = rmesa->store.cmd_buf; + cmdbuf.bufsz = rmesa->store.cmd_used; + cmdbuf.boxes = (drmClipRect *)boxes; + cmdbuf.nbox = nbox; + + while ( cmdbuf.bufsz >= sizeof(header) ) { + + header.i = *(int *)cmdbuf.buf; + cmdbuf.buf += sizeof(header); + cmdbuf.bufsz -= sizeof(header); + + switch (header.header.cmd_type) { + case RADEON_CMD_PACKET: + if (radeon_emit_packets( header, &cmdbuf )) { + fprintf(stderr,"radeon_emit_packets failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_SCALARS: + if (radeon_emit_scalars( header, &cmdbuf )) { + fprintf(stderr,"radeon_emit_scalars failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_SCALARS2: + if (radeon_emit_scalars2( header, &cmdbuf )) { + fprintf(stderr,"radeon_emit_scalars failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_VECTORS: + if (radeon_emit_vectors( header, &cmdbuf )) { + fprintf(stderr,"radeon_emit_vectors failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_DMA_DISCARD: + idx = header.dma.buf_idx; + if (NORMAL) + fprintf(stderr, "RADEON_CMD_DMA_DISCARD buf %d\n", idx); + bufs++; + break; + + case RADEON_CMD_PACKET3: + if (radeon_emit_packet3( &cmdbuf )) { + fprintf(stderr,"radeon_emit_packet3 failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_PACKET3_CLIP: + if (radeon_emit_packet3_cliprect( &cmdbuf )) { + fprintf(stderr,"radeon_emit_packet3_clip failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_WAIT: + break; + + default: + fprintf(stderr,"bad cmd_type %d at %p\n", + header.header.cmd_type, + cmdbuf.buf - sizeof(header)); + return -EINVAL; + } + } + + if (0) + { + static int n = 0; + n++; + if (n == 10) { + fprintf(stderr, "Bufs %d Total emitted %d real changes %d (%.2f%%)\n", + bufs, + total, total_changed, + ((float)total_changed/(float)total*100.0)); + fprintf(stderr, "Total emitted per buf: %.2f\n", + (float)total/(float)bufs); + fprintf(stderr, "Real changes per buf: %.2f\n", + (float)total_changed/(float)bufs); + + bufs = n = total = total_changed = 0; + } + } + + fprintf(stderr, "leaving %s\n\n\n", __FUNCTION__); + + return 0; +} + + +/* Do the same job to a native command stream + * -- pull apart packets after they are built. + * -- understand SCALAR, VECTOR stores + * -- understand INDIRECT registers & trace down into indirect buffers. + */ Index: xc/lib/GL/mesa/src/drv/r200/r200_sanity.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_sanity.h:1.1 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_sanity.h Wed Oct 30 07:51:52 2002 @@ -0,0 +1,8 @@ +#ifndef R200_SANITY_H +#define R200_SANITY_H + +extern int r200SanityCmdBuffer( r200ContextPtr rmesa, + int nbox, + XF86DRIClipRectRec *boxes ); + +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_screen.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_screen.c:1.2 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_screen.c Mon Dec 16 11:18:54 2002 @@ -0,0 +1,436 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_screen.c,v 1.2 2002/12/16 16:18:54 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 + +#include "r200_screen.h" +#include "r200_context.h" +#include "r200_ioctl.h" + +#include "mem.h" +#include "context.h" + +#if 1 +/* Including xf86PciInfo.h introduces a bunch of errors... + */ +#define PCI_CHIP_R200_QD 0x5144 +#define PCI_CHIP_R200_QE 0x5145 +#define PCI_CHIP_R200_QF 0x5146 +#define PCI_CHIP_R200_QG 0x5147 +#define PCI_CHIP_R200_QY 0x5159 +#define PCI_CHIP_R200_QZ 0x515A +#define PCI_CHIP_R200_LW 0x4C57 +#define PCI_CHIP_R200_LY 0x4C59 +#define PCI_CHIP_R200_LZ 0x4C5A +#define PCI_CHIP_RV200_QW 0x5157 +#endif + +static r200ScreenPtr __r200Screen; + +/* Create the device specific screen private data struct. + */ +static r200ScreenPtr +r200CreateScreen( __DRIscreenPrivate *sPriv ) +{ + r200ScreenPtr r200Screen; + RADEONDRIPtr r200DRIPriv = (RADEONDRIPtr)sPriv->pDevPriv; + + /* Check the DRI version */ + { + int major, minor, patch; + if ( XF86DRIQueryVersion( sPriv->display, &major, &minor, &patch ) ) { + if ( major != 4 || minor < 0 ) { + __driUtilMessage( "R200 DRI driver expected DRI version 4.0.x " + "but got version %d.%d.%d", + major, minor, patch ); + return NULL; + } + } + } + + /* Check that the DDX driver version is compatible */ + if ( sPriv->ddxMajor != 4 || + sPriv->ddxMinor < 0 ) { + __driUtilMessage( "R200 DRI driver expected DDX driver version 4.0.x " + "but got version %d.%d.%d", + sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch ); + return NULL; + } + + /* Check that the DRM driver version is compatible + * -- R200 support added at 1.5.0. + */ + if ( sPriv->drmMajor != 1 || + sPriv->drmMinor < 5) { + __driUtilMessage( "R200 DRI driver expected DRM driver version 1.5.x " + "but got version %d.%d.%d", + sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + return NULL; + } + + + + /* Allocate the private area */ + r200Screen = (r200ScreenPtr) CALLOC( sizeof(*r200Screen) ); + if ( !r200Screen ) { + __driUtilMessage("%s: CALLOC r200Screen struct failed", + __FUNCTION__); + return NULL; + } + + + switch ( r200DRIPriv->deviceID ) { + case PCI_CHIP_R200_QD: + case PCI_CHIP_R200_QE: + case PCI_CHIP_R200_QF: + case PCI_CHIP_R200_QG: + case PCI_CHIP_R200_QY: + case PCI_CHIP_R200_QZ: + case PCI_CHIP_RV200_QW: + case PCI_CHIP_R200_LW: + case PCI_CHIP_R200_LY: + case PCI_CHIP_R200_LZ: + __driUtilMessage("r200CreateScreen(): Device isn't an r200!\n"); + FREE( r200Screen ); + return NULL; + default: + r200Screen->chipset = R200_CHIPSET_R200; + break; + } + + + /* This is first since which regions we map depends on whether or + * not we are using a PCI card. + */ + r200Screen->IsPCI = r200DRIPriv->IsPCI; + + { + int ret; + drmRadeonGetParam gp; + + gp.param = RADEON_PARAM_AGP_BUFFER_OFFSET; + gp.value = &r200Screen->agp_buffer_offset; + + ret = drmCommandWriteRead( sPriv->fd, DRM_RADEON_GETPARAM, + &gp, sizeof(gp)); + if (ret) { + FREE( r200Screen ); + fprintf(stderr, "drmR200GetParam: %d\n", ret); + return NULL; + } + + r200Screen->agp_texture_offset = + r200Screen->agp_buffer_offset + 2*1024*1024; + + + if (sPriv->drmMinor >= 6) { + gp.param = RADEON_PARAM_AGP_BASE; + gp.value = &r200Screen->agp_base; + + ret = drmCommandWriteRead( sPriv->fd, DRM_RADEON_GETPARAM, + &gp, sizeof(gp)); + if (ret) { + FREE( r200Screen ); + fprintf(stderr, + "drmR200GetParam (RADEON_PARAM_AGP_BUFFER_OFFSET): %d\n", + ret); + return NULL; + } + } + + if (sPriv->drmMinor >= 6) { + gp.param = RADEON_PARAM_IRQ_NR; + gp.value = &r200Screen->irq; + + ret = drmCommandWriteRead( sPriv->fd, DRM_RADEON_GETPARAM, + &gp, sizeof(gp)); + if (ret) { + FREE( r200Screen ); + fprintf(stderr, "drmR200GetParam (RADEON_PARAM_IRQ_NR): %d\n", ret); + return NULL; + } + } + + } + + r200Screen->mmio.handle = r200DRIPriv->registerHandle; + r200Screen->mmio.size = r200DRIPriv->registerSize; + if ( drmMap( sPriv->fd, + r200Screen->mmio.handle, + r200Screen->mmio.size, + &r200Screen->mmio.map ) ) { + FREE( r200Screen ); + __driUtilMessage("r200CreateScreen(): drmMap failed\n"); + return NULL; + } + + r200Screen->status.handle = r200DRIPriv->statusHandle; + r200Screen->status.size = r200DRIPriv->statusSize; + if ( drmMap( sPriv->fd, + r200Screen->status.handle, + r200Screen->status.size, + &r200Screen->status.map ) ) { + drmUnmap( r200Screen->mmio.map, r200Screen->mmio.size ); + FREE( r200Screen ); + __driUtilMessage("r200CreateScreen(): drmMap (2) failed\n"); + return NULL; + } + r200Screen->scratch = (__volatile__ CARD32 *) + ((GLubyte *)r200Screen->status.map + RADEON_SCRATCH_REG_OFFSET); + + r200Screen->buffers = drmMapBufs( sPriv->fd ); + if ( !r200Screen->buffers ) { + drmUnmap( r200Screen->status.map, r200Screen->status.size ); + drmUnmap( r200Screen->mmio.map, r200Screen->mmio.size ); + FREE( r200Screen ); + __driUtilMessage("r200CreateScreen(): drmMapBufs failed\n"); + return NULL; + } + + if ( !r200Screen->IsPCI ) { + r200Screen->agpTextures.handle = r200DRIPriv->agpTexHandle; + r200Screen->agpTextures.size = r200DRIPriv->agpTexMapSize; + if ( drmMap( sPriv->fd, + r200Screen->agpTextures.handle, + r200Screen->agpTextures.size, + (drmAddressPtr)&r200Screen->agpTextures.map ) ) { + drmUnmapBufs( r200Screen->buffers ); + drmUnmap( r200Screen->status.map, r200Screen->status.size ); + drmUnmap( r200Screen->mmio.map, r200Screen->mmio.size ); + FREE( r200Screen ); + __driUtilMessage("r200CreateScreen(): IsPCI failed\n"); + return NULL; + } + } + + + + r200Screen->cpp = r200DRIPriv->bpp / 8; + r200Screen->AGPMode = r200DRIPriv->AGPMode; + + r200Screen->frontOffset = r200DRIPriv->frontOffset; + r200Screen->frontPitch = r200DRIPriv->frontPitch; + r200Screen->backOffset = r200DRIPriv->backOffset; + r200Screen->backPitch = r200DRIPriv->backPitch; + r200Screen->depthOffset = r200DRIPriv->depthOffset; + r200Screen->depthPitch = r200DRIPriv->depthPitch; + + r200Screen->texOffset[RADEON_CARD_HEAP] = r200DRIPriv->textureOffset; + r200Screen->texSize[RADEON_CARD_HEAP] = r200DRIPriv->textureSize; + r200Screen->logTexGranularity[RADEON_CARD_HEAP] = + r200DRIPriv->log2TexGran; + + if ( r200Screen->IsPCI ) { + r200Screen->numTexHeaps = RADEON_NR_TEX_HEAPS - 1; + r200Screen->texOffset[RADEON_AGP_HEAP] = 0; + r200Screen->texSize[RADEON_AGP_HEAP] = 0; + r200Screen->logTexGranularity[RADEON_AGP_HEAP] = 0; + } else { + r200Screen->numTexHeaps = RADEON_NR_TEX_HEAPS; + r200Screen->texOffset[RADEON_AGP_HEAP] = + r200DRIPriv->agpTexOffset + R200_AGP_TEX_OFFSET; + r200Screen->texSize[RADEON_AGP_HEAP] = r200DRIPriv->agpTexMapSize; + r200Screen->logTexGranularity[RADEON_AGP_HEAP] = + r200DRIPriv->log2AGPTexGran; + } + + + r200Screen->driScreen = sPriv; + r200Screen->sarea_priv_offset = r200DRIPriv->sarea_priv_offset; + return r200Screen; +} + +/* Destroy the device specific screen private data struct. + */ +static void +r200DestroyScreen( __DRIscreenPrivate *sPriv ) +{ + r200ScreenPtr r200Screen = (r200ScreenPtr)sPriv->private; + + if (!r200Screen) + return; + + if ( !r200Screen->IsPCI ) { + drmUnmap( r200Screen->agpTextures.map, + r200Screen->agpTextures.size ); + } + drmUnmapBufs( r200Screen->buffers ); + drmUnmap( r200Screen->status.map, r200Screen->status.size ); + drmUnmap( r200Screen->mmio.map, r200Screen->mmio.size ); + + FREE( r200Screen ); + sPriv->private = NULL; +} + + +/* Initialize the driver specific screen private data. + */ +static GLboolean +r200InitDriver( __DRIscreenPrivate *sPriv ) +{ + __r200Screen = r200CreateScreen( sPriv ); + + sPriv->private = (void *) __r200Screen; + + return sPriv->private ? GL_TRUE : GL_FALSE; +} + + + +/* Create and initialize the Mesa and driver specific pixmap buffer + * data. + */ +static GLboolean +r200CreateBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap ) +{ + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } + else { + const GLboolean swDepth = GL_FALSE; + const GLboolean swAlpha = GL_FALSE; + const GLboolean swAccum = mesaVis->accumRedBits > 0; + const GLboolean swStencil = mesaVis->stencilBits > 0 && + mesaVis->depthBits != 24; + driDrawPriv->driverPrivate = (void *) + _mesa_create_framebuffer( mesaVis, + swDepth, + swStencil, + swAccum, + swAlpha ); + return (driDrawPriv->driverPrivate != NULL); + } +} + + +static void +r200DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +{ + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); +} + + + + +/* Fullscreen mode isn't used for much -- could be a way to shrink + * front/back buffers & get more texture memory if the client has + * changed the video resolution. + * + * Pageflipping is now done automatically whenever there is a single + * 3d client. + */ +static GLboolean +r200OpenCloseFullScreen( __DRIcontextPrivate *driContextPriv ) +{ + return GL_TRUE; +} + +static struct __DriverAPIRec r200API = { + r200InitDriver, + r200DestroyScreen, + r200CreateContext, + r200DestroyContext, + r200CreateBuffer, + r200DestroyBuffer, + r200SwapBuffers, + r200MakeCurrent, + r200UnbindContext, + r200OpenCloseFullScreen, + r200OpenCloseFullScreen +}; + + + +/* + * This is the bootstrap function for the driver. + * The __driCreateScreen name is the symbol that libGL.so fetches. + * Return: pointer to a __DRIscreenPrivate. + * + */ +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) +{ + __DRIscreenPrivate *psp; + psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &r200API); + return (void *) psp; +} + + +/* 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 ) +{ + /* dlopen ourself */ + void *dll = dlopen(NULL, RTLD_GLOBAL); + if (dll) { + typedef void *(*registerFunc)(const char *funcName, void *funcAddr); + typedef void (*registerString)(const char *extName); + + /* Get pointers to libGL's __glXRegisterGLXFunction + * and __glXRegisterGLXExtensionString, if they exist. + */ + registerFunc regFunc = (registerFunc) dlsym(dll, "__glXRegisterGLXFunction"); + registerString regString = (registerString) dlsym(dll, "__glXRegisterGLXExtensionString"); + + if (regFunc) { + /* register our GLX extensions with libGL */ + void *p; + p = regFunc("glXAllocateMemoryNV", (void *) r200AllocateMemoryNV); + if (p) + ; /* XXX already registered - what to do, wrap? */ + + p = regFunc("glXFreeMemoryNV", (void *) r200FreeMemoryNV); + if (p) + ; /* XXX already registered - what to do, wrap? */ + + p = regFunc("glXGetAGPOffsetMESA", (void *) r200GetAGPOffset); + if (p) + ; /* XXX already registered - what to do, wrap? */ + } + + if (regString) { + regString("GLX_NV_vertex_array_range"); + regString("GLX_MESA_agp_offset"); + } + + dlclose(dll); + } +} Index: xc/lib/GL/mesa/src/drv/r200/r200_screen.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_screen.h:1.1 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_screen.h Wed Oct 30 07:51:52 2002 @@ -0,0 +1,96 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_screen.h,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_SCREEN_H__ +#define __R200_SCREEN_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include +#include "dri_util.h" +#include "xf86drm.h" +#include "radeon_common.h" +#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 */ +} r200RegionRec, *r200RegionPtr; + +#define R200_CHIPSET_R200 1 +#define R200_CHIPSET_MOBILITY 2 + + +#define R200_NR_TEX_HEAPS 2 + +typedef struct { + + int chipset; + int cpp; + int IsPCI; /* Current card is a PCI card */ + int AGPMode; + unsigned int irq; /* IRQ number (0 means none) */ + + unsigned int frontOffset; + unsigned int frontPitch; + unsigned int backOffset; + unsigned int backPitch; + + unsigned int depthOffset; + unsigned int depthPitch; + + /* Shared texture data */ + int numTexHeaps; + int texOffset[R200_NR_TEX_HEAPS]; + int texSize[R200_NR_TEX_HEAPS]; + int logTexGranularity[R200_NR_TEX_HEAPS]; + + r200RegionRec mmio; + r200RegionRec status; + r200RegionRec agpTextures; + + drmBufMapPtr buffers; + + __volatile__ CARD32 *scratch; + + __DRIscreenPrivate *driScreen; + unsigned int sarea_priv_offset; + unsigned int agp_buffer_offset; /* offset in card memory space */ + unsigned int agp_texture_offset; /* offset in card memory space */ + unsigned int agp_base; +} r200ScreenRec, *r200ScreenPtr; + +#endif +#endif /* __R200_SCREEN_H__ */ Index: xc/lib/GL/mesa/src/drv/r200/r200_span.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_span.c:1.1 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_span.c Wed Oct 30 07:51:52 2002 @@ -0,0 +1,415 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_span.c,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_ioctl.h" +#include "r200_state.h" +#include "r200_span.h" +#include "r200_tex.h" + +#include "swrast/swrast.h" + +#define DBG 0 + +#define LOCAL_VARS \ + r200ContextPtr rmesa = R200_CONTEXT(ctx); \ + r200ScreenPtr r200Screen = rmesa->r200Screen; \ + __DRIscreenPrivate *sPriv = rmesa->dri.screen; \ + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; \ + GLuint pitch = r200Screen->frontPitch * r200Screen->cpp; \ + GLuint height = dPriv->h; \ + char *buf = (char *)(sPriv->pFB + \ + rmesa->state.color.drawOffset + \ + (dPriv->x * r200Screen->cpp) + \ + (dPriv->y * pitch)); \ + char *read_buf = (char *)(sPriv->pFB + \ + rmesa->state.pixel.readOffset + \ + (dPriv->x * r200Screen->cpp) + \ + (dPriv->y * pitch)); \ + GLuint p; \ + (void) read_buf; (void) buf; (void) p + +#define LOCAL_DEPTH_VARS \ + r200ContextPtr rmesa = R200_CONTEXT(ctx); \ + r200ScreenPtr r200Screen = rmesa->r200Screen; \ + __DRIscreenPrivate *sPriv = rmesa->dri.screen; \ + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; \ + GLuint height = dPriv->h; \ + GLuint xo = dPriv->x; \ + GLuint yo = dPriv->y; \ + char *buf = (char *)(sPriv->pFB + r200Screen->depthOffset); \ + (void) buf + +#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS + + +#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() + +#define HW_CLIPLOOP() \ + do { \ + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; \ + 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() + + + +/* ================================================================ + * Color buffer + */ + +/* 16 bit, RGB565 color spanline and pixel functions + */ +#define INIT_MONO_PIXEL(p, color) \ + p = PACK_COLOR_565( color[0], color[1], color[2] ) + +#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) * 255 / 0xf8; \ + rgba[1] = ((p >> 3) & 0xfc) * 255 / 0xfc; \ + rgba[2] = ((p << 3) & 0xf8) * 255 / 0xf8; \ + rgba[3] = 0xff; \ + } while (0) + +#define TAG(x) r200##x##_RGB565 +#include "spantmp.h" + +/* 32 bit, ARGB8888 color spanline and pixel functions + */ +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = PACK_COLOR_8888( color[3], color[0], color[1], color[2] ) + +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ +do { \ + *(GLuint *)(buf + _x*4 + _y*pitch) = ((b << 0) | \ + (g << 8) | \ + (r << 16) | \ + (a << 24) ); \ +} while (0) + +#define WRITE_PIXEL( _x, _y, p ) \ +do { \ + *(GLuint *)(buf + _x*4 + _y*pitch) = p; \ +} while (0) + +#define READ_RGBA( rgba, _x, _y ) \ +do { \ + volatile GLuint *ptr = (volatile GLuint *)(read_buf + _x*4 + _y*pitch); \ + GLuint p = *ptr; \ + 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) r200##x##_ARGB8888 +#include "spantmp.h" + + + +/* ================================================================ + * Depth buffer + */ + +/* The R200 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. + */ + +#define BIT(x,b) ((x & (1<>b) +static GLuint r200_mba_z32( r200ContextPtr rmesa, + GLint x, GLint y ) +{ + GLuint pitch = rmesa->r200Screen->frontPitch; + GLuint b = ((y & 0x3FF) >> 4) * ((pitch & 0xFFF) >> 5) + ((x & 0x3FF) >> 5); + GLuint a = + (BIT(x,0) << 2) | + (BIT(y,0) << 3) | + (BIT(x,1) << 4) | + (BIT(y,1) << 5) | + (BIT(x,3) << 6) | + (BIT(x,4) << 7) | + (BIT(x,2) << 8) | + (BIT(y,2) << 9) | + (BIT(y,3) << 10) | + (((pitch & 0x20) ? (b & 0x01) : ((b & 0x01) ^ (BIT(y,4)))) << 11) | + ((b >> 1) << 12); + return a; +} + +static GLuint r200_mba_z16( r200ContextPtr rmesa, GLint x, GLint y ) +{ + GLuint pitch = rmesa->r200Screen->frontPitch; + GLuint b = ((y & 0x3FF) >> 4) * ((pitch & 0xFFF) >> 6) + ((x & 0x3FF) >> 6); + GLuint a = + (BIT(x,0) << 1) | + (BIT(y,0) << 2) | + (BIT(x,1) << 3) | + (BIT(y,1) << 4) | + (BIT(x,2) << 5) | + (BIT(x,4) << 6) | + (BIT(x,5) << 7) | + (BIT(x,3) << 8) | + (BIT(y,2) << 9) | + (BIT(y,3) << 10) | + (((pitch & 0x40) ? (b & 0x01) : ((b & 0x01) ^ (BIT(y,4)))) << 11) | + ((b >> 1) << 12); + return a; +} + + +/* 16-bit depth buffer functions + */ +#define WRITE_DEPTH( _x, _y, d ) \ + *(GLushort *)(buf + r200_mba_z16( rmesa, _x + xo, _y + yo )) = d; + +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLushort *)(buf + r200_mba_z16( rmesa, _x + xo, _y + yo )); + +#define TAG(x) r200##x##_16 +#include "depthtmp.h" + +/* 24 bit depth, 8 bit stencil depthbuffer functions + */ +#define WRITE_DEPTH( _x, _y, d ) \ +do { \ + GLuint offset = r200_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 + r200_mba_z32( rmesa, _x + xo, \ + _y + yo )) & 0x00ffffff; + +#define TAG(x) r200##x##_24_8 +#include "depthtmp.h" + + +/* ================================================================ + * Stencil buffer + */ + +/* 24 bit depth, 8 bit stencil depthbuffer functions + */ +#define WRITE_STENCIL( _x, _y, d ) \ +do { \ + GLuint offset = r200_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 = r200_mba_z32( rmesa, _x + xo, _y + yo ); \ + GLuint tmp = *(GLuint *)(buf + offset); \ + tmp &= 0xff000000; \ + d = tmp >> 24; \ +} while (0) + +#define TAG(x) r200##x##_24_8 +#include "stenciltmp.h" + + +static void r200SetReadBuffer( GLcontext *ctx, + GLframebuffer *colorBuffer, + GLenum mode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + switch ( mode ) { + case GL_FRONT_LEFT: + if ( rmesa->doPageFlip && rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.pixel.readOffset = rmesa->r200Screen->backOffset; + rmesa->state.pixel.readPitch = rmesa->r200Screen->backPitch; + } else { + rmesa->state.pixel.readOffset = rmesa->r200Screen->frontOffset; + rmesa->state.pixel.readPitch = rmesa->r200Screen->frontPitch; + } + break; + case GL_BACK_LEFT: + if ( rmesa->doPageFlip && rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.pixel.readOffset = rmesa->r200Screen->frontOffset; + rmesa->state.pixel.readPitch = rmesa->r200Screen->frontPitch; + } else { + rmesa->state.pixel.readOffset = rmesa->r200Screen->backOffset; + rmesa->state.pixel.readPitch = rmesa->r200Screen->backPitch; + } + break; + default: + assert(0); + break; + } +} + +/* Move locking out to get reasonable span performance (10x better + * than doing this in HW_LOCK above). WaitForIdle() is the main + * culprit. + */ + +static void r200SpanRenderStart( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + R200_FIREVERTICES( rmesa ); + LOCK_HARDWARE( rmesa ); + r200WaitForIdleLocked( rmesa ); + + /* Read & rewrite the first pixel in the frame buffer. This should + * be a noop, right? In fact without this conform fails as reading + * from the framebuffer sometimes produces old results -- the + * on-card read cache gets mixed up and doesn't notice that the + * framebuffer has been updated. + * + * In the worst case this is buggy too as p might get the wrong + * value first time, so really need a hidden pixel somewhere for this. + */ + { + int p; + volatile int *read_buf = (volatile int *)(rmesa->dri.screen->pFB + + rmesa->state.pixel.readOffset); + p = *read_buf; + *read_buf = p; + } +} + +static void r200SpanRenderFinish( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + _swrast_flush( ctx ); + UNLOCK_HARDWARE( rmesa ); +} + +void r200InitSpanFuncs( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); + + swdd->SetReadBuffer = r200SetReadBuffer; + + switch ( rmesa->r200Screen->cpp ) { + case 2: + swdd->WriteRGBASpan = r200WriteRGBASpan_RGB565; + swdd->WriteRGBSpan = r200WriteRGBSpan_RGB565; + swdd->WriteMonoRGBASpan = r200WriteMonoRGBASpan_RGB565; + swdd->WriteRGBAPixels = r200WriteRGBAPixels_RGB565; + swdd->WriteMonoRGBAPixels = r200WriteMonoRGBAPixels_RGB565; + swdd->ReadRGBASpan = r200ReadRGBASpan_RGB565; + swdd->ReadRGBAPixels = r200ReadRGBAPixels_RGB565; + break; + + case 4: + swdd->WriteRGBASpan = r200WriteRGBASpan_ARGB8888; + swdd->WriteRGBSpan = r200WriteRGBSpan_ARGB8888; + swdd->WriteMonoRGBASpan = r200WriteMonoRGBASpan_ARGB8888; + swdd->WriteRGBAPixels = r200WriteRGBAPixels_ARGB8888; + swdd->WriteMonoRGBAPixels = r200WriteMonoRGBAPixels_ARGB8888; + swdd->ReadRGBASpan = r200ReadRGBASpan_ARGB8888; + swdd->ReadRGBAPixels = r200ReadRGBAPixels_ARGB8888; + break; + + default: + break; + } + + switch ( rmesa->glCtx->Visual.depthBits ) { + case 16: + swdd->ReadDepthSpan = r200ReadDepthSpan_16; + swdd->WriteDepthSpan = r200WriteDepthSpan_16; + swdd->ReadDepthPixels = r200ReadDepthPixels_16; + swdd->WriteDepthPixels = r200WriteDepthPixels_16; + break; + + case 24: + swdd->ReadDepthSpan = r200ReadDepthSpan_24_8; + swdd->WriteDepthSpan = r200WriteDepthSpan_24_8; + swdd->ReadDepthPixels = r200ReadDepthPixels_24_8; + swdd->WriteDepthPixels = r200WriteDepthPixels_24_8; + + swdd->ReadStencilSpan = r200ReadStencilSpan_24_8; + swdd->WriteStencilSpan = r200WriteStencilSpan_24_8; + swdd->ReadStencilPixels = r200ReadStencilPixels_24_8; + swdd->WriteStencilPixels = r200WriteStencilPixels_24_8; + break; + + default: + break; + } + + swdd->SpanRenderStart = r200SpanRenderStart; + swdd->SpanRenderFinish = r200SpanRenderFinish; +} Index: xc/lib/GL/mesa/src/drv/r200/r200_span.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_span.h:1.1 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_span.h Wed Oct 30 07:51:52 2002 @@ -0,0 +1,43 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_span.h,v 1.1 2002/10/30 12:51:52 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_SPAN_H__ +#define __R200_SPAN_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern void r200InitSpanFuncs( GLcontext *ctx ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_state.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_state.c:1.4 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_state.c Sun Feb 23 18:59:01 2003 @@ -0,0 +1,2145 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_state.c,v 1.4 2003/02/23 23:59:01 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_ioctl.h" +#include "r200_state.h" +#include "r200_tcl.h" +#include "r200_tex.h" +#include "r200_swtcl.h" +#include "r200_vtxfmt.h" + +#include "mem.h" +#include "mmath.h" +#include "enums.h" +#include "colormac.h" +#include "light.h" +#include "api_arrayelt.h" + +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" +#include "swrast_setup/swrast_setup.h" + + +/* ============================================================= + * Alpha blending + */ + +static void r200AlphaFunc( GLcontext *ctx, GLenum func, GLchan ref ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + int pp_misc = rmesa->hw.ctx.cmd[CTX_PP_MISC]; + + R200_STATECHANGE( rmesa, ctx ); + + pp_misc &= ~(R200_ALPHA_TEST_OP_MASK | R200_REF_ALPHA_MASK); + pp_misc |= (ref & R200_REF_ALPHA_MASK); + + switch ( func ) { + case GL_NEVER: + pp_misc |= R200_ALPHA_TEST_FAIL; + break; + case GL_LESS: + pp_misc |= R200_ALPHA_TEST_LESS; + break; + case GL_EQUAL: + pp_misc |= R200_ALPHA_TEST_EQUAL; + break; + case GL_LEQUAL: + pp_misc |= R200_ALPHA_TEST_LEQUAL; + break; + case GL_GREATER: + pp_misc |= R200_ALPHA_TEST_GREATER; + break; + case GL_NOTEQUAL: + pp_misc |= R200_ALPHA_TEST_NEQUAL; + break; + case GL_GEQUAL: + pp_misc |= R200_ALPHA_TEST_GEQUAL; + break; + case GL_ALWAYS: + pp_misc |= R200_ALPHA_TEST_PASS; + break; + } + + rmesa->hw.ctx.cmd[CTX_PP_MISC] = pp_misc; +} + +static void r200BlendEquation( GLcontext *ctx, GLenum mode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint b = rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] & ~R200_COMB_FCN_MASK; + + switch ( mode ) { + case GL_FUNC_ADD_EXT: + case GL_LOGIC_OP: + b |= R200_COMB_FCN_ADD_CLAMP; + break; + + case GL_FUNC_SUBTRACT_EXT: + b |= R200_COMB_FCN_SUB_CLAMP; + break; + + case GL_FUNC_REVERSE_SUBTRACT_EXT: + b |= R200_COMB_FCN_RSUB_CLAMP; + break; + + case GL_MIN_EXT: + b |= R200_COMB_FCN_MIN; + break; + + case GL_MAX_EXT: + b |= R200_COMB_FCN_MAX; + break; + + default: + break; + } + + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] = b; + if ( ctx->Color.ColorLogicOpEnabled ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= R200_ROP_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~R200_ROP_ENABLE; + } +} + +static void r200BlendFunc( GLcontext *ctx, GLenum sfactor, GLenum dfactor ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint b = rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] & + ~(R200_SRC_BLEND_MASK | R200_DST_BLEND_MASK); + + switch ( ctx->Color.BlendSrcRGB ) { + case GL_ZERO: + b |= R200_SRC_BLEND_GL_ZERO; + break; + case GL_ONE: + b |= R200_SRC_BLEND_GL_ONE; + break; + case GL_DST_COLOR: + b |= R200_SRC_BLEND_GL_DST_COLOR; + break; + case GL_ONE_MINUS_DST_COLOR: + b |= R200_SRC_BLEND_GL_ONE_MINUS_DST_COLOR; + break; + case GL_SRC_ALPHA: + b |= R200_SRC_BLEND_GL_SRC_ALPHA; + break; + case GL_ONE_MINUS_SRC_ALPHA: + b |= R200_SRC_BLEND_GL_ONE_MINUS_SRC_ALPHA; + break; + case GL_DST_ALPHA: + b |= R200_SRC_BLEND_GL_DST_ALPHA; + break; + case GL_ONE_MINUS_DST_ALPHA: + b |= R200_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA; + break; + case GL_SRC_ALPHA_SATURATE: + b |= R200_SRC_BLEND_GL_SRC_ALPHA_SATURATE; + break; + case GL_CONSTANT_COLOR: + b |= R200_SRC_BLEND_GL_CONST_COLOR; + break; + case GL_ONE_MINUS_CONSTANT_COLOR: + b |= R200_SRC_BLEND_GL_ONE_MINUS_CONST_COLOR; + break; + case GL_CONSTANT_ALPHA: + b |= R200_SRC_BLEND_GL_CONST_ALPHA; + break; + case GL_ONE_MINUS_CONSTANT_ALPHA: + b |= R200_SRC_BLEND_GL_ONE_MINUS_CONST_ALPHA; + break; + default: + break; + } + + switch ( ctx->Color.BlendDstRGB ) { + case GL_ZERO: + b |= R200_DST_BLEND_GL_ZERO; + break; + case GL_ONE: + b |= R200_DST_BLEND_GL_ONE; + break; + case GL_SRC_COLOR: + b |= R200_DST_BLEND_GL_SRC_COLOR; + break; + case GL_ONE_MINUS_SRC_COLOR: + b |= R200_DST_BLEND_GL_ONE_MINUS_SRC_COLOR; + break; + case GL_SRC_ALPHA: + b |= R200_DST_BLEND_GL_SRC_ALPHA; + break; + case GL_ONE_MINUS_SRC_ALPHA: + b |= R200_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA; + break; + case GL_DST_ALPHA: + b |= R200_DST_BLEND_GL_DST_ALPHA; + break; + case GL_ONE_MINUS_DST_ALPHA: + b |= R200_DST_BLEND_GL_ONE_MINUS_DST_ALPHA; + break; + case GL_CONSTANT_COLOR: + b |= R200_DST_BLEND_GL_CONST_COLOR; + break; + case GL_ONE_MINUS_CONSTANT_COLOR: + b |= R200_DST_BLEND_GL_ONE_MINUS_CONST_COLOR; + break; + case GL_CONSTANT_ALPHA: + b |= R200_DST_BLEND_GL_CONST_ALPHA; + break; + case GL_ONE_MINUS_CONSTANT_ALPHA: + b |= R200_DST_BLEND_GL_ONE_MINUS_CONST_ALPHA; + break; + default: + break; + } + + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] = b; +} + +static void r200BlendFuncSeparate( GLcontext *ctx, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA ) +{ + r200BlendFunc( ctx, sfactorRGB, dfactorRGB ); +} + + +/* ============================================================= + * Depth testing + */ + +static void r200DepthFunc( GLcontext *ctx, GLenum func ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &= ~R200_Z_TEST_MASK; + + switch ( ctx->Depth.Func ) { + case GL_NEVER: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_Z_TEST_NEVER; + break; + case GL_LESS: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_Z_TEST_LESS; + break; + case GL_EQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_Z_TEST_EQUAL; + break; + case GL_LEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_Z_TEST_LEQUAL; + break; + case GL_GREATER: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_Z_TEST_GREATER; + break; + case GL_NOTEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_Z_TEST_NEQUAL; + break; + case GL_GEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_Z_TEST_GEQUAL; + break; + case GL_ALWAYS: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_Z_TEST_ALWAYS; + break; + } +} + + +static void r200DepthMask( GLcontext *ctx, GLboolean flag ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + R200_STATECHANGE( rmesa, ctx ); + + if ( ctx->Depth.Mask ) { + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_Z_WRITE_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &= ~R200_Z_WRITE_ENABLE; + } +} + + +/* ============================================================= + * Fog + */ + + +static void r200Fogfv( GLcontext *ctx, GLenum pname, const GLfloat *param ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + union { int i; float f; } c, d; + GLchan col[4]; + GLuint i; + + c.i = rmesa->hw.fog.cmd[FOG_C]; + d.i = rmesa->hw.fog.cmd[FOG_D]; + + switch (pname) { + case GL_FOG_MODE: + if (!ctx->Fog.Enabled) + return; + R200_STATECHANGE(rmesa, tcl); + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~R200_TCL_FOG_MASK; + switch (ctx->Fog.Mode) { + case GL_LINEAR: + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= R200_TCL_FOG_LINEAR; + if (ctx->Fog.Start == ctx->Fog.End) { + c.f = 1.0F; + d.f = 1.0F; + } + else { + c.f = ctx->Fog.End/(ctx->Fog.End-ctx->Fog.Start); + d.f = -1.0/(ctx->Fog.End-ctx->Fog.Start); + } + break; + case GL_EXP: + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= R200_TCL_FOG_EXP; + c.f = 0.0; + d.f = -ctx->Fog.Density; + break; + case GL_EXP2: + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= R200_TCL_FOG_EXP2; + c.f = 0.0; + d.f = -(ctx->Fog.Density * ctx->Fog.Density); + break; + default: + return; + } + break; + case GL_FOG_DENSITY: + switch (ctx->Fog.Mode) { + case GL_EXP: + c.f = 0.0; + d.f = -ctx->Fog.Density; + break; + case GL_EXP2: + c.f = 0.0; + d.f = -(ctx->Fog.Density * ctx->Fog.Density); + break; + default: + break; + } + break; + case GL_FOG_START: + case GL_FOG_END: + if (ctx->Fog.Mode == GL_LINEAR) { + if (ctx->Fog.Start == ctx->Fog.End) { + c.f = 1.0F; + d.f = 1.0F; + } else { + c.f = ctx->Fog.End/(ctx->Fog.End-ctx->Fog.Start); + d.f = -1.0/(ctx->Fog.End-ctx->Fog.Start); + } + } + break; + case GL_FOG_COLOR: + R200_STATECHANGE( rmesa, ctx ); + UNCLAMPED_FLOAT_TO_RGB_CHAN( col, ctx->Fog.Color ); + i = r200PackColor( 4, col[0], col[1], col[2], 0 ); + rmesa->hw.ctx.cmd[CTX_PP_FOG_COLOR] &= ~R200_FOG_COLOR_MASK; + rmesa->hw.ctx.cmd[CTX_PP_FOG_COLOR] |= i; + break; + case GL_FOG_COORDINATE_SOURCE_EXT: + /* What to do? + */ + break; + default: + return; + } + + if (c.i != rmesa->hw.fog.cmd[FOG_C] || d.i != rmesa->hw.fog.cmd[FOG_D]) { + R200_STATECHANGE( rmesa, fog ); + rmesa->hw.fog.cmd[FOG_C] = c.i; + rmesa->hw.fog.cmd[FOG_D] = d.i; + } +} + + +/* ============================================================= + * Scissoring + */ + + +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 r200RecalcScissorRects( r200ContextPtr rmesa ) +{ + XF86DRIClipRectPtr out; + int i; + + /* Grow cliprect store? + */ + if (rmesa->state.scissor.numAllocedClipRects < rmesa->numClipRects) { + while (rmesa->state.scissor.numAllocedClipRects < rmesa->numClipRects) { + rmesa->state.scissor.numAllocedClipRects += 1; /* zero case */ + rmesa->state.scissor.numAllocedClipRects *= 2; + } + + if (rmesa->state.scissor.pClipRects) + FREE(rmesa->state.scissor.pClipRects); + + rmesa->state.scissor.pClipRects = + MALLOC( rmesa->state.scissor.numAllocedClipRects * + sizeof(XF86DRIClipRectRec) ); + + if (!rmesa->state.scissor.numAllocedClipRects) { + rmesa->state.scissor.numAllocedClipRects = 0; + return; + } + } + + out = rmesa->state.scissor.pClipRects; + rmesa->state.scissor.numClipRects = 0; + + for ( i = 0 ; i < rmesa->numClipRects ; i++ ) { + if ( intersect_rect( out, + &rmesa->pClipRects[i], + &rmesa->state.scissor.rect ) ) { + rmesa->state.scissor.numClipRects++; + out++; + } + } +} + + +static void r200UpdateScissor( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if ( rmesa->dri.drawable ) { + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + + int x = ctx->Scissor.X; + int y = dPriv->h - ctx->Scissor.Y - ctx->Scissor.Height; + int w = ctx->Scissor.X + ctx->Scissor.Width - 1; + int h = dPriv->h - ctx->Scissor.Y - 1; + + rmesa->state.scissor.rect.x1 = x + dPriv->x; + rmesa->state.scissor.rect.y1 = y + dPriv->y; + rmesa->state.scissor.rect.x2 = w + dPriv->x + 1; + rmesa->state.scissor.rect.y2 = h + dPriv->y + 1; + + r200RecalcScissorRects( rmesa ); + } +} + + +static void r200Scissor( GLcontext *ctx, + GLint x, GLint y, GLsizei w, GLsizei h ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if ( ctx->Scissor.Enabled ) { + R200_FIREVERTICES( rmesa ); /* don't pipeline cliprect changes */ + r200UpdateScissor( ctx ); + } + +} + + +/* ============================================================= + * Culling + */ + +static void r200CullFace( GLcontext *ctx, GLenum unused ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL]; + GLuint t = rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL]; + + s |= R200_FFACE_SOLID | R200_BFACE_SOLID; + t &= ~(R200_CULL_FRONT | R200_CULL_BACK); + + if ( ctx->Polygon.CullFlag ) { + switch ( ctx->Polygon.CullFaceMode ) { + case GL_FRONT: + s &= ~R200_FFACE_SOLID; + t |= R200_CULL_FRONT; + break; + case GL_BACK: + s &= ~R200_BFACE_SOLID; + t |= R200_CULL_BACK; + break; + case GL_FRONT_AND_BACK: + s &= ~(R200_FFACE_SOLID | R200_BFACE_SOLID); + t |= (R200_CULL_FRONT | R200_CULL_BACK); + break; + } + } + + if ( rmesa->hw.set.cmd[SET_SE_CNTL] != s ) { + R200_STATECHANGE(rmesa, set ); + rmesa->hw.set.cmd[SET_SE_CNTL] = s; + } + + if ( rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] != t ) { + R200_STATECHANGE(rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] = t; + } +} + +static void r200FrontFace( GLcontext *ctx, GLenum mode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + R200_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~R200_FFACE_CULL_DIR_MASK; + + R200_STATECHANGE( rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~R200_CULL_FRONT_IS_CCW; + + switch ( mode ) { + case GL_CW: + rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_FFACE_CULL_CW; + break; + case GL_CCW: + rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_FFACE_CULL_CCW; + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= R200_CULL_FRONT_IS_CCW; + break; + } +} + +/* ============================================================= + * Point state + */ +static void r200PointSize( GLcontext *ctx, GLfloat size ) +{ + if (R200_DEBUG & DEBUG_STATE) + fprintf(stderr, "%s: %f\n", __FUNCTION__, size ); +} + +/* ============================================================= + * Line state + */ +static void r200LineWidth( GLcontext *ctx, GLfloat widthf ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + R200_STATECHANGE( rmesa, lin ); + R200_STATECHANGE( rmesa, set ); + + /* Line width is stored in U6.4 format. + */ + rmesa->hw.lin.cmd[LIN_SE_LINE_WIDTH] &= ~0xffff; + rmesa->hw.lin.cmd[LIN_SE_LINE_WIDTH] |= (GLuint)(ctx->Line._Width * 16.0); + + if ( widthf > 1.0 ) { + rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_WIDELINE_ENABLE; + } else { + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~R200_WIDELINE_ENABLE; + } +} + +static void r200LineStipple( GLcontext *ctx, GLint factor, GLushort pattern ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + R200_STATECHANGE( rmesa, lin ); + rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] = + ((((GLuint)factor & 0xff) << 16) | ((GLuint)pattern)); +} + + +/* ============================================================= + * Masks + */ +static void r200ColorMask( GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint mask = r200PackColor( rmesa->r200Screen->cpp, + ctx->Color.ColorMask[RCOMP], + ctx->Color.ColorMask[GCOMP], + ctx->Color.ColorMask[BCOMP], + ctx->Color.ColorMask[ACOMP] ); + + GLuint flag = rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] & ~R200_PLANE_MASK_ENABLE; + + if (!(r && g && b && a)) + flag |= R200_PLANE_MASK_ENABLE; + + if ( rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] != flag ) { + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] = flag; + } + + if ( rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK] != mask ) { + R200_STATECHANGE( rmesa, msk ); + rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK] = mask; + } +} + + +/* ============================================================= + * Polygon state + */ + +static void r200PolygonOffset( GLcontext *ctx, + GLfloat factor, GLfloat units ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLfloat constant = units * rmesa->state.depth.scale; + +/* factor *= 2; */ +/* constant *= 2; */ + +/* fprintf(stderr, "%s f:%f u:%f\n", __FUNCTION__, factor, constant); */ + + R200_STATECHANGE( rmesa, zbs ); + rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_FACTOR] = *(GLuint *)&factor; + rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_CONSTANT] = *(GLuint *)&constant; +} + +static void r200PolygonStipple( GLcontext *ctx, const GLubyte *mask ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint i; + drmRadeonStipple stipple; + + /* Must flip pattern upside down. + */ + for ( i = 0 ; i < 32 ; i++ ) { + rmesa->state.stipple.mask[31 - i] = ((GLuint *) mask)[i]; + } + + /* TODO: push this into cmd mechanism + */ + R200_FIREVERTICES( rmesa ); + LOCK_HARDWARE( rmesa ); + + /* FIXME: Use window x,y offsets into stipple RAM. + */ + stipple.mask = rmesa->state.stipple.mask; + drmCommandWrite( rmesa->dri.fd, DRM_RADEON_STIPPLE, + &stipple, sizeof(drmRadeonStipple) ); + UNLOCK_HARDWARE( rmesa ); +} + +static void r200PolygonMode( GLcontext *ctx, GLenum face, GLenum mode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLboolean flag = (ctx->_TriangleCaps & DD_TRI_UNFILLED) != 0; + + /* Can't generally do unfilled via tcl, but some good special + * cases work. + */ + TCL_FALLBACK( ctx, R200_TCL_FALLBACK_UNFILLED, flag); + if (rmesa->TclFallback) { + r200ChooseRenderState( ctx ); + r200ChooseVertexState( ctx ); + } +} + + +/* ============================================================= + * 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. + */ + +/* Examine lighting and texture state to determine if separate specular + * should be enabled. + */ +static void r200UpdateSpecular( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + CARD32 p = rmesa->hw.ctx.cmd[CTX_PP_CNTL]; + + R200_STATECHANGE( rmesa, tcl ); + R200_STATECHANGE( rmesa, vtx ); + + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] &= ~(3<hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] &= ~(3<hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] &= ~R200_OUTPUT_COLOR_0; + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] &= ~R200_OUTPUT_COLOR_1; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= ~R200_LIGHTING_ENABLE; + p &= ~R200_SPECULAR_ENABLE; + + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_DIFFUSE_SPECULAR_COMBINE; + + + if (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) { + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] |= + ((R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT) | + (R200_VTX_FP_RGBA << R200_VTX_COLOR_1_SHIFT)); + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] |= R200_OUTPUT_COLOR_0; + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] |= R200_OUTPUT_COLOR_1; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_LIGHTING_ENABLE; + p |= R200_SPECULAR_ENABLE; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= + ~R200_DIFFUSE_SPECULAR_COMBINE; + } + else if (ctx->Light.Enabled) { + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] |= + ((R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT)); + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] |= R200_OUTPUT_COLOR_0; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_LIGHTING_ENABLE; + } else if (ctx->Fog.ColorSumEnabled ) { + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] |= + ((R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT) | + (R200_VTX_FP_RGBA << R200_VTX_COLOR_1_SHIFT)); + p |= R200_SPECULAR_ENABLE; + } else { + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] |= + ((R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT)); + } + + if (ctx->Fog.Enabled) { + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] |= + ((R200_VTX_FP_RGBA << R200_VTX_COLOR_1_SHIFT)); + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] |= R200_OUTPUT_COLOR_1; + } + + if ( rmesa->hw.ctx.cmd[CTX_PP_CNTL] != p ) { + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_PP_CNTL] = p; + } + + /* Update vertex/render formats + */ + if (rmesa->TclFallback) { + r200ChooseRenderState( ctx ); + r200ChooseVertexState( ctx ); + } +} + + +/* ============================================================= + * Materials + */ + + +/* Update on colormaterial, material emmissive/ambient, + * lightmodel.globalambient + */ +static void update_global_ambient( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + float *fcmd = (float *)R200_DB_STATE( glt ); + + /* Need to do more if both emmissive & ambient are PREMULT: + */ + if ((rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_1] & + ((3 << R200_FRONT_EMISSIVE_SOURCE_SHIFT) | + (3 << R200_FRONT_AMBIENT_SOURCE_SHIFT))) == 0) + { + COPY_3V( &fcmd[GLT_RED], + ctx->Light.Material[0].Emission); + ACC_SCALE_3V( &fcmd[GLT_RED], + ctx->Light.Model.Ambient, + ctx->Light.Material[0].Ambient); + } + else + { + COPY_3V( &fcmd[GLT_RED], ctx->Light.Model.Ambient ); + } + + R200_DB_STATECHANGE(rmesa, &rmesa->hw.glt); +} + +/* Update on change to + * - light[p].colors + * - light[p].enabled + * - material, + * - colormaterial enabled + * - colormaterial bitmask + */ +static void update_light_colors( GLcontext *ctx, GLuint p ) +{ + struct gl_light *l = &ctx->Light.Light[p]; + +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + if (l->Enabled) { + r200ContextPtr rmesa = R200_CONTEXT(ctx); + float *fcmd = (float *)R200_DB_STATE( lit[p] ); + GLuint bitmask = ctx->Light.ColorMaterialBitmask; + struct gl_material *mat = &ctx->Light.Material[0]; + + COPY_4V( &fcmd[LIT_AMBIENT_RED], l->Ambient ); + COPY_4V( &fcmd[LIT_DIFFUSE_RED], l->Diffuse ); + COPY_4V( &fcmd[LIT_SPECULAR_RED], l->Specular ); + + if (!ctx->Light.ColorMaterialEnabled) + bitmask = 0; + + if ((bitmask & FRONT_AMBIENT_BIT) == 0) + SELF_SCALE_3V( &fcmd[LIT_AMBIENT_RED], mat->Ambient ); + + if ((bitmask & FRONT_DIFFUSE_BIT) == 0) + SELF_SCALE_3V( &fcmd[LIT_DIFFUSE_RED], mat->Diffuse ); + + if ((bitmask & FRONT_SPECULAR_BIT) == 0) + SELF_SCALE_3V( &fcmd[LIT_SPECULAR_RED], mat->Specular ); + + R200_DB_STATECHANGE( rmesa, &rmesa->hw.lit[p] ); + } +} + +/* Also fallback for asym colormaterial mode in twoside lighting... + */ +static void check_twoside_fallback( GLcontext *ctx ) +{ + GLboolean fallback = GL_FALSE; + + if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) { + if (memcmp( &ctx->Light.Material[0], + &ctx->Light.Material[1], + sizeof(struct gl_material)) != 0) + fallback = GL_TRUE; + else if (ctx->Light.ColorMaterialEnabled && + (ctx->Light.ColorMaterialBitmask & BACK_MATERIAL_BITS) != + ((ctx->Light.ColorMaterialBitmask & FRONT_MATERIAL_BITS)<<1)) + fallback = GL_TRUE; + } + + TCL_FALLBACK( ctx, R200_TCL_FALLBACK_LIGHT_TWOSIDE, fallback ); +} + +static void r200ColorMaterial( GLcontext *ctx, GLenum face, GLenum mode ) +{ + if (ctx->Light.ColorMaterialEnabled) { + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint light_model_ctl1 = rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_1]; + GLuint mask = ctx->Light.ColorMaterialBitmask; + + /* Default to PREMULT: + */ + light_model_ctl1 &= ~((0xf << R200_FRONT_EMISSIVE_SOURCE_SHIFT) | + (0xf << R200_FRONT_AMBIENT_SOURCE_SHIFT) | + (0xf << R200_FRONT_DIFFUSE_SOURCE_SHIFT) | + (0xf << R200_FRONT_SPECULAR_SOURCE_SHIFT)); + + if (mask & FRONT_EMISSION_BIT) { + light_model_ctl1 |= (R200_LM1_SOURCE_VERTEX_COLOR_0 << + R200_FRONT_EMISSIVE_SOURCE_SHIFT); + } + + if (mask & FRONT_AMBIENT_BIT) { + light_model_ctl1 |= (R200_LM1_SOURCE_VERTEX_COLOR_0 << + R200_FRONT_AMBIENT_SOURCE_SHIFT); + } + + if (mask & FRONT_DIFFUSE_BIT) { + light_model_ctl1 |= (R200_LM1_SOURCE_VERTEX_COLOR_0 << + R200_FRONT_DIFFUSE_SOURCE_SHIFT); + } + + if (mask & FRONT_SPECULAR_BIT) { + light_model_ctl1 |= (R200_LM1_SOURCE_VERTEX_COLOR_0 << + R200_FRONT_SPECULAR_SOURCE_SHIFT); + } + + if (light_model_ctl1 != rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_1]) { + GLuint p; + + R200_STATECHANGE( rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_1] = light_model_ctl1; + + for (p = 0 ; p < MAX_LIGHTS; p++) + update_light_colors( ctx, p ); + update_global_ambient( ctx ); + } + } + + check_twoside_fallback( ctx ); +} + +void r200UpdateMaterial( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLfloat *fcmd = (GLfloat *)R200_DB_STATE( mtl[0] ); + GLuint p; + GLuint mask = ~0; + + if (ctx->Light.ColorMaterialEnabled) + mask &= ~ctx->Light.ColorMaterialBitmask; + + if (R200_DEBUG & DEBUG_STATE) + fprintf(stderr, "%s\n", __FUNCTION__); + + + if (mask & FRONT_EMISSION_BIT) { + fcmd[MTL_EMMISSIVE_RED] = ctx->Light.Material[0].Emission[0]; + fcmd[MTL_EMMISSIVE_GREEN] = ctx->Light.Material[0].Emission[1]; + fcmd[MTL_EMMISSIVE_BLUE] = ctx->Light.Material[0].Emission[2]; + fcmd[MTL_EMMISSIVE_ALPHA] = ctx->Light.Material[0].Emission[3]; + } + if (mask & FRONT_AMBIENT_BIT) { + fcmd[MTL_AMBIENT_RED] = ctx->Light.Material[0].Ambient[0]; + fcmd[MTL_AMBIENT_GREEN] = ctx->Light.Material[0].Ambient[1]; + fcmd[MTL_AMBIENT_BLUE] = ctx->Light.Material[0].Ambient[2]; + fcmd[MTL_AMBIENT_ALPHA] = ctx->Light.Material[0].Ambient[3]; + } + if (mask & FRONT_DIFFUSE_BIT) { + fcmd[MTL_DIFFUSE_RED] = ctx->Light.Material[0].Diffuse[0]; + fcmd[MTL_DIFFUSE_GREEN] = ctx->Light.Material[0].Diffuse[1]; + fcmd[MTL_DIFFUSE_BLUE] = ctx->Light.Material[0].Diffuse[2]; + fcmd[MTL_DIFFUSE_ALPHA] = ctx->Light.Material[0].Diffuse[3]; + } + if (mask & FRONT_SPECULAR_BIT) { + fcmd[MTL_SPECULAR_RED] = ctx->Light.Material[0].Specular[0]; + fcmd[MTL_SPECULAR_GREEN] = ctx->Light.Material[0].Specular[1]; + fcmd[MTL_SPECULAR_BLUE] = ctx->Light.Material[0].Specular[2]; + fcmd[MTL_SPECULAR_ALPHA] = ctx->Light.Material[0].Specular[3]; + } + if (mask & FRONT_SHININESS_BIT) { + fcmd[MTL_SHININESS] = ctx->Light.Material[0].Shininess; + } + + if (R200_DB_STATECHANGE( rmesa, &rmesa->hw.mtl[0] )) { + for (p = 0 ; p < MAX_LIGHTS; p++) + update_light_colors( ctx, p ); + + check_twoside_fallback( ctx ); + update_global_ambient( ctx ); + } + else if (R200_DEBUG & (DEBUG_PRIMS|DEBUG_STATE)) + fprintf(stderr, "%s: Elided noop material call\n", __FUNCTION__); +} + +/* _NEW_LIGHT + * _NEW_MODELVIEW + * _MESA_NEW_NEED_EYE_COORDS + * + * Uses derived state from mesa: + * _VP_inf_norm + * _h_inf_norm + * _Position + * _NormDirection + * _ModelViewInvScale + * _NeedEyeCoords + * _EyeZDir + * + * which are calculated in light.c and are correct for the current + * lighting space (model or eye), hence dependencies on _NEW_MODELVIEW + * and _MESA_NEW_NEED_EYE_COORDS. + */ +static void update_light( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + /* Have to check these, or have an automatic shortcircuit mechanism + * to remove noop statechanges. (Or just do a better job on the + * front end). + */ + { + GLuint tmp = rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0]; + + if (ctx->_NeedEyeCoords) + tmp &= ~R200_LIGHT_IN_MODELSPACE; + else + tmp |= R200_LIGHT_IN_MODELSPACE; + + if (tmp != rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0]) + { + R200_STATECHANGE( rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] = tmp; + } + } + + { + GLfloat *fcmd = (GLfloat *)R200_DB_STATE( eye ); + fcmd[EYE_X] = ctx->_EyeZDir[0]; + fcmd[EYE_Y] = ctx->_EyeZDir[1]; + fcmd[EYE_Z] = - ctx->_EyeZDir[2]; + fcmd[EYE_RESCALE_FACTOR] = ctx->_ModelViewInvScale; + R200_DB_STATECHANGE( rmesa, &rmesa->hw.eye ); + } + + +/* R200_STATECHANGE( rmesa, glt ); */ + + if (ctx->Light.Enabled) { + GLint p; + for (p = 0 ; p < MAX_LIGHTS; p++) { + if (ctx->Light.Light[p].Enabled) { + struct gl_light *l = &ctx->Light.Light[p]; + GLfloat *fcmd = (GLfloat *)R200_DB_STATE( lit[p] ); + + if (l->EyePosition[3] == 0.0) { + COPY_3FV( &fcmd[LIT_POSITION_X], l->_VP_inf_norm ); + COPY_3FV( &fcmd[LIT_DIRECTION_X], l->_h_inf_norm ); + fcmd[LIT_POSITION_W] = 0; + fcmd[LIT_DIRECTION_W] = 0; + } else { + COPY_4V( &fcmd[LIT_POSITION_X], l->_Position ); + fcmd[LIT_DIRECTION_X] = -l->_NormDirection[0]; + fcmd[LIT_DIRECTION_Y] = -l->_NormDirection[1]; + fcmd[LIT_DIRECTION_Z] = -l->_NormDirection[2]; + fcmd[LIT_DIRECTION_W] = 0; + } + + R200_DB_STATECHANGE( rmesa, &rmesa->hw.lit[p] ); + } + } + } +} + +static void r200Lightfv( GLcontext *ctx, GLenum light, + GLenum pname, const GLfloat *params ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLint p = light - GL_LIGHT0; + struct gl_light *l = &ctx->Light.Light[p]; + GLfloat *fcmd = (GLfloat *)rmesa->hw.lit[p].cmd; + + + switch (pname) { + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + update_light_colors( ctx, p ); + break; + + case GL_SPOT_DIRECTION: + /* picked up in update_light */ + break; + + case GL_POSITION: { + /* positions picked up in update_light, but can do flag here */ + GLuint flag = (p&1)? R200_LIGHT_1_IS_LOCAL : R200_LIGHT_0_IS_LOCAL; + GLuint idx = TCL_PER_LIGHT_CTL_0 + p/2; + + R200_STATECHANGE(rmesa, tcl); + if (l->EyePosition[3] != 0.0F) + rmesa->hw.tcl.cmd[idx] |= flag; + else + rmesa->hw.tcl.cmd[idx] &= ~flag; + break; + } + + case GL_SPOT_EXPONENT: + R200_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_SPOT_EXPONENT] = params[0]; + break; + + case GL_SPOT_CUTOFF: { + GLuint flag = (p&1) ? R200_LIGHT_1_IS_SPOT : R200_LIGHT_0_IS_SPOT; + GLuint idx = TCL_PER_LIGHT_CTL_0 + p/2; + + R200_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_SPOT_CUTOFF] = l->_CosCutoff; + + R200_STATECHANGE(rmesa, tcl); + if (l->SpotCutoff != 180.0F) + rmesa->hw.tcl.cmd[idx] |= flag; + else + rmesa->hw.tcl.cmd[idx] &= ~flag; + + break; + } + + case GL_CONSTANT_ATTENUATION: + R200_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_ATTEN_CONST] = params[0]; + break; + case GL_LINEAR_ATTENUATION: + R200_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_ATTEN_LINEAR] = params[0]; + break; + case GL_QUADRATIC_ATTENUATION: + R200_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_ATTEN_QUADRATIC] = params[0]; + break; + default: + return; + } + +} + + + + +static void r200LightModelfv( GLcontext *ctx, GLenum pname, + const GLfloat *param ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + switch (pname) { + case GL_LIGHT_MODEL_AMBIENT: + update_global_ambient( ctx ); + break; + + case GL_LIGHT_MODEL_LOCAL_VIEWER: + R200_STATECHANGE( rmesa, tcl ); + if (ctx->Light.Model.LocalViewer) + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_LOCAL_VIEWER; + else + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= ~R200_LOCAL_VIEWER; + break; + + case GL_LIGHT_MODEL_TWO_SIDE: + R200_STATECHANGE( rmesa, tcl ); + if (ctx->Light.Model.TwoSide) + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_LIGHT_TWOSIDE; + else + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= ~R200_LIGHT_TWOSIDE; + + check_twoside_fallback( ctx ); + + if (rmesa->TclFallback) { + r200ChooseRenderState( ctx ); + r200ChooseVertexState( ctx ); + } + break; + + case GL_LIGHT_MODEL_COLOR_CONTROL: + r200UpdateSpecular(ctx); + break; + + default: + break; + } +} + +static void r200ShadeModel( GLcontext *ctx, GLenum mode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL]; + + s &= ~(R200_DIFFUSE_SHADE_MASK | + R200_ALPHA_SHADE_MASK | + R200_SPECULAR_SHADE_MASK | + R200_FOG_SHADE_MASK); + + switch ( mode ) { + case GL_FLAT: + s |= (R200_DIFFUSE_SHADE_FLAT | + R200_ALPHA_SHADE_FLAT | + R200_SPECULAR_SHADE_FLAT | + R200_FOG_SHADE_FLAT); + break; + case GL_SMOOTH: + s |= (R200_DIFFUSE_SHADE_GOURAUD | + R200_ALPHA_SHADE_GOURAUD | + R200_SPECULAR_SHADE_GOURAUD | + R200_FOG_SHADE_GOURAUD); + break; + default: + return; + } + + if ( rmesa->hw.set.cmd[SET_SE_CNTL] != s ) { + R200_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_SE_CNTL] = s; + } +} + + +/* ============================================================= + * User clip planes + */ + +static void r200ClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq ) +{ + GLint p = (GLint) plane - (GLint) GL_CLIP_PLANE0; + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLint *ip = (GLint *)ctx->Transform._ClipUserPlane[p]; + + R200_STATECHANGE( rmesa, ucp[p] ); + rmesa->hw.ucp[p].cmd[UCP_X] = ip[0]; + rmesa->hw.ucp[p].cmd[UCP_Y] = ip[1]; + rmesa->hw.ucp[p].cmd[UCP_Z] = ip[2]; + rmesa->hw.ucp[p].cmd[UCP_W] = ip[3]; +} + +static void r200UpdateClipPlanes( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint p; + + for (p = 0; p < ctx->Const.MaxClipPlanes; p++) { + if (ctx->Transform.ClipEnabled[p]) { + GLint *ip = (GLint *)ctx->Transform._ClipUserPlane[p]; + + R200_STATECHANGE( rmesa, ucp[p] ); + rmesa->hw.ucp[p].cmd[UCP_X] = ip[0]; + rmesa->hw.ucp[p].cmd[UCP_Y] = ip[1]; + rmesa->hw.ucp[p].cmd[UCP_Z] = ip[2]; + rmesa->hw.ucp[p].cmd[UCP_W] = ip[3]; + } + } +} + + +/* ============================================================= + * Stencil + */ + +static void r200StencilFunc( GLcontext *ctx, GLenum func, + GLint ref, GLuint mask ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint refmask = ((ctx->Stencil.Ref << R200_STENCIL_REF_SHIFT) | + (ctx->Stencil.ValueMask << R200_STENCIL_MASK_SHIFT)); + + R200_STATECHANGE( rmesa, ctx ); + R200_STATECHANGE( rmesa, msk ); + + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &= ~R200_STENCIL_TEST_MASK; + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] &= ~(R200_STENCIL_REF_MASK| + R200_STENCIL_VALUE_MASK); + + switch ( ctx->Stencil.Function ) { + case GL_NEVER: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_TEST_NEVER; + break; + case GL_LESS: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_TEST_LESS; + break; + case GL_EQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_TEST_EQUAL; + break; + case GL_LEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_TEST_LEQUAL; + break; + case GL_GREATER: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_TEST_GREATER; + break; + case GL_NOTEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_TEST_NEQUAL; + break; + case GL_GEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_TEST_GEQUAL; + break; + case GL_ALWAYS: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_TEST_ALWAYS; + break; + } + + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] |= refmask; +} + +static void r200StencilMask( GLcontext *ctx, GLuint mask ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + R200_STATECHANGE( rmesa, msk ); + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] &= ~R200_STENCIL_WRITE_MASK; + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] |= + (ctx->Stencil.WriteMask << R200_STENCIL_WRITEMASK_SHIFT); +} + +static void r200StencilOp( GLcontext *ctx, GLenum fail, + GLenum zfail, GLenum zpass ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &= ~(R200_STENCIL_FAIL_MASK | + R200_STENCIL_ZFAIL_MASK | + R200_STENCIL_ZPASS_MASK); + + switch ( ctx->Stencil.FailFunc ) { + case GL_KEEP: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_FAIL_KEEP; + break; + case GL_ZERO: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_FAIL_ZERO; + break; + case GL_REPLACE: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_FAIL_REPLACE; + break; + case GL_INCR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_FAIL_INC; + break; + case GL_DECR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_FAIL_DEC; + break; + case GL_INCR_WRAP_EXT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_FAIL_INC_WRAP; + break; + case GL_DECR_WRAP_EXT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_FAIL_DEC_WRAP; + break; + case GL_INVERT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_FAIL_INVERT; + break; + } + + switch ( ctx->Stencil.ZFailFunc ) { + case GL_KEEP: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZFAIL_KEEP; + break; + case GL_ZERO: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZFAIL_ZERO; + break; + case GL_REPLACE: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZFAIL_REPLACE; + break; + case GL_INCR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZFAIL_INC; + break; + case GL_DECR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZFAIL_DEC; + break; + case GL_INCR_WRAP_EXT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZFAIL_INC_WRAP; + break; + case GL_DECR_WRAP_EXT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZFAIL_DEC_WRAP; + break; + case GL_INVERT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZFAIL_INVERT; + break; + } + + switch ( ctx->Stencil.ZPassFunc ) { + case GL_KEEP: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZPASS_KEEP; + break; + case GL_ZERO: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZPASS_ZERO; + break; + case GL_REPLACE: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZPASS_REPLACE; + break; + case GL_INCR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZPASS_INC; + break; + case GL_DECR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZPASS_DEC; + break; + case GL_INCR_WRAP_EXT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZPASS_INC_WRAP; + break; + case GL_DECR_WRAP_EXT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZPASS_DEC_WRAP; + break; + case GL_INVERT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= R200_STENCIL_ZPASS_INVERT; + break; + } +} + +static void r200ClearStencil( GLcontext *ctx, GLint s ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + rmesa->state.stencil.clear = + ((GLuint) ctx->Stencil.Clear | + (0xff << R200_STENCIL_MASK_SHIFT) | + (ctx->Stencil.WriteMask << R200_STENCIL_WRITEMASK_SHIFT)); +} + + +/* ============================================================= + * Window position and viewport transformation + */ + +/* + * To correctly position primitives: + */ +#define SUBPIXEL_X 0.125 +#define SUBPIXEL_Y 0.125 + +void r200UpdateWindow( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + GLfloat xoffset = (GLfloat)dPriv->x; + GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h; + const GLfloat *v = ctx->Viewport._WindowMap.m; + + GLfloat sx = v[MAT_SX]; + GLfloat tx = v[MAT_TX] + xoffset + SUBPIXEL_X; + GLfloat sy = - v[MAT_SY]; + GLfloat ty = (- v[MAT_TY]) + yoffset + SUBPIXEL_Y; + GLfloat sz = v[MAT_SZ] * rmesa->state.depth.scale; + GLfloat tz = v[MAT_TZ] * rmesa->state.depth.scale; + + R200_FIREVERTICES( rmesa ); + R200_STATECHANGE( rmesa, vpt ); + + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XSCALE] = *(GLuint *)&sx; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] = *(GLuint *)&tx; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YSCALE] = *(GLuint *)&sy; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] = *(GLuint *)&ty; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZSCALE] = *(GLuint *)&sz; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZOFFSET] = *(GLuint *)&tz; +} + + + +static void r200Viewport( GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height ) +{ + /* Don't pipeline viewport changes, conflict with window offset + * setting below. Could apply deltas to rescue pipelined viewport + * values, or keep the originals hanging around. + */ + R200_FIREVERTICES( R200_CONTEXT(ctx) ); + r200UpdateWindow( ctx ); +} + +static void r200DepthRange( GLcontext *ctx, GLclampd nearval, + GLclampd farval ) +{ + r200UpdateWindow( ctx ); +} + +void r200UpdateViewportOffset( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + GLfloat xoffset = (GLfloat)dPriv->x; + GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h; + const GLfloat *v = ctx->Viewport._WindowMap.m; + + GLfloat tx = v[MAT_TX] + xoffset; + GLfloat ty = (- v[MAT_TY]) + yoffset; + + if ( rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] != *(GLuint *)&tx || + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] != *(GLuint *)&ty ) + { + /* Note: this should also modify whatever data the context reset + * code uses... + */ + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] = *(GLuint *)&tx; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] = *(GLuint *)&ty; + + /* update polygon stipple x/y screen offset */ + { + GLuint stx, sty; + GLuint m = rmesa->hw.msc.cmd[MSC_RE_MISC]; + + m &= ~(R200_STIPPLE_X_OFFSET_MASK | + R200_STIPPLE_Y_OFFSET_MASK); + + /* add magic offsets, then invert */ + stx = 31 - ((rmesa->dri.drawable->x - 1) & R200_STIPPLE_COORD_MASK); + sty = 31 - ((rmesa->dri.drawable->y + rmesa->dri.drawable->h - 1) + & R200_STIPPLE_COORD_MASK); + + m |= ((stx << R200_STIPPLE_X_OFFSET_SHIFT) | + (sty << R200_STIPPLE_Y_OFFSET_SHIFT)); + + if ( rmesa->hw.msc.cmd[MSC_RE_MISC] != m ) { + R200_STATECHANGE( rmesa, msc ); + rmesa->hw.msc.cmd[MSC_RE_MISC] = m; + } + } + } + + r200UpdateScissor( ctx ); +} + + + +/* ============================================================= + * Miscellaneous + */ + +static void r200ClearColor( GLcontext *ctx, const GLchan c[4] ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + rmesa->state.color.clear = r200PackColor( rmesa->r200Screen->cpp, + c[0], c[1], c[2], c[3] ); +} + + +static void r200RenderMode( GLcontext *ctx, GLenum mode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + FALLBACK( rmesa, R200_FALLBACK_RENDER_MODE, (mode != GL_RENDER) ); +} + + +static GLuint r200_rop_tab[] = { + R200_ROP_CLEAR, + R200_ROP_AND, + R200_ROP_AND_REVERSE, + R200_ROP_COPY, + R200_ROP_AND_INVERTED, + R200_ROP_NOOP, + R200_ROP_XOR, + R200_ROP_OR, + R200_ROP_NOR, + R200_ROP_EQUIV, + R200_ROP_INVERT, + R200_ROP_OR_REVERSE, + R200_ROP_COPY_INVERTED, + R200_ROP_OR_INVERTED, + R200_ROP_NAND, + R200_ROP_SET, +}; + +static void r200LogicOpCode( GLcontext *ctx, GLenum opcode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint rop = (GLuint)opcode - GL_CLEAR; + + ASSERT( rop < 16 ); + + R200_STATECHANGE( rmesa, msk ); + rmesa->hw.msk.cmd[MSK_RB3D_ROPCNTL] = r200_rop_tab[rop]; +} + + +void r200SetCliprects( r200ContextPtr rmesa, GLenum mode ) +{ + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + + switch ( mode ) { + case GL_FRONT_LEFT: + rmesa->numClipRects = dPriv->numClipRects; + rmesa->pClipRects = (XF86DRIClipRectPtr)dPriv->pClipRects; + break; + case GL_BACK_LEFT: + /* Can't ignore 2d windows if we are page flipping. + */ + if ( dPriv->numBackClipRects == 0 || rmesa->doPageFlip ) { + rmesa->numClipRects = dPriv->numClipRects; + rmesa->pClipRects = (XF86DRIClipRectPtr)dPriv->pClipRects; + } + else { + rmesa->numClipRects = dPriv->numBackClipRects; + rmesa->pClipRects = (XF86DRIClipRectPtr)dPriv->pBackClipRects; + } + break; + default: + fprintf(stderr, "bad mode in r200SetCliprects\n"); + return; + } + + if (rmesa->state.scissor.enabled) + r200RecalcScissorRects( rmesa ); +} + + +static void r200SetDrawBuffer( GLcontext *ctx, GLenum mode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_DRI) + fprintf(stderr, "%s %s\n", __FUNCTION__, + _mesa_lookup_enum_by_nr( mode )); + + R200_FIREVERTICES(rmesa); /* don't pipeline cliprect changes */ + + switch ( mode ) { + case GL_FRONT_LEFT: + FALLBACK( rmesa, R200_FALLBACK_DRAW_BUFFER, GL_FALSE ); + if ( rmesa->doPageFlip && rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.color.drawOffset = rmesa->r200Screen->backOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->backPitch; + } else { + rmesa->state.color.drawOffset = rmesa->r200Screen->frontOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->frontPitch; + } + r200SetCliprects( rmesa, GL_FRONT_LEFT ); + break; + case GL_BACK_LEFT: + FALLBACK( rmesa, R200_FALLBACK_DRAW_BUFFER, GL_FALSE ); + if ( rmesa->doPageFlip && rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.color.drawOffset = rmesa->r200Screen->frontOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->frontPitch; + } else { + rmesa->state.color.drawOffset = rmesa->r200Screen->backOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->backPitch; + } + r200SetCliprects( rmesa, GL_BACK_LEFT ); + break; + default: + FALLBACK( rmesa, R200_FALLBACK_DRAW_BUFFER, GL_TRUE ); + return; + } + + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = (rmesa->state.color.drawOffset & + R200_COLOROFFSET_MASK); + rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = rmesa->state.color.drawPitch; +} + + +/* ============================================================= + * State enable/disable + */ + +static void r200Enable( GLcontext *ctx, GLenum cap, GLboolean state ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint p, flag; + + if ( R200_DEBUG & DEBUG_STATE ) + fprintf( stderr, "%s( %s = %s )\n", __FUNCTION__, + _mesa_lookup_enum_by_nr( cap ), + state ? "GL_TRUE" : "GL_FALSE" ); + + switch ( cap ) { + /* Fast track this one... + */ + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_TEXTURE_3D: + break; + + case GL_ALPHA_TEST: + R200_STATECHANGE( rmesa, ctx ); + if (state) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_ALPHA_TEST_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~R200_ALPHA_TEST_ENABLE; + } + break; + + case GL_BLEND: + R200_STATECHANGE( rmesa, ctx ); + if (state) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= R200_ALPHA_BLEND_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~R200_ALPHA_BLEND_ENABLE; + } + if ( ctx->Color.ColorLogicOpEnabled ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= R200_ROP_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~R200_ROP_ENABLE; + } + break; + + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + p = cap-GL_CLIP_PLANE0; + R200_STATECHANGE( rmesa, tcl ); + if (state) { + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= (R200_UCP_ENABLE_0<hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~(R200_UCP_ENABLE_0<hw.ctx.cmd[CTX_RB3D_CNTL] |= R200_Z_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~R200_Z_ENABLE; + } + break; + + case GL_DITHER: + R200_STATECHANGE(rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= R200_DITHER_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~R200_DITHER_ENABLE; + } + break; + + case GL_FOG: + R200_STATECHANGE(rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_FOG_ENABLE; + r200Fogfv( ctx, GL_FOG_MODE, 0 ); + } else { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~R200_FOG_ENABLE; + R200_STATECHANGE(rmesa, tcl); + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~R200_TCL_FOG_MASK; + } + r200UpdateSpecular( ctx ); /* for PK_SPEC */ + break; + + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + R200_STATECHANGE(rmesa, tcl); + p = cap - GL_LIGHT0; + if (p&1) + flag = (R200_LIGHT_1_ENABLE | + R200_LIGHT_1_ENABLE_AMBIENT | + R200_LIGHT_1_ENABLE_SPECULAR); + else + flag = (R200_LIGHT_0_ENABLE | + R200_LIGHT_0_ENABLE_AMBIENT | + R200_LIGHT_0_ENABLE_SPECULAR); + + if (state) + rmesa->hw.tcl.cmd[p/2 + TCL_PER_LIGHT_CTL_0] |= flag; + else + rmesa->hw.tcl.cmd[p/2 + TCL_PER_LIGHT_CTL_0] &= ~flag; + + /* + */ + update_light_colors( ctx, p ); + break; + + case GL_LIGHTING: + r200UpdateSpecular(ctx); + check_twoside_fallback( ctx ); + break; + + case GL_LINE_SMOOTH: + R200_STATECHANGE( rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_ANTI_ALIAS_LINE; + } else { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~R200_ANTI_ALIAS_LINE; + } + break; + + case GL_LINE_STIPPLE: + R200_STATECHANGE( rmesa, set ); + if ( state ) { + rmesa->hw.set.cmd[SET_RE_CNTL] |= R200_PATTERN_ENABLE; + } else { + rmesa->hw.set.cmd[SET_RE_CNTL] &= ~R200_PATTERN_ENABLE; + } + break; + + case GL_COLOR_LOGIC_OP: + R200_STATECHANGE( rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= R200_ROP_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~R200_ROP_ENABLE; + } + break; + + case GL_NORMALIZE: + R200_STATECHANGE( rmesa, tcl ); + if ( state ) { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_NORMALIZE_NORMALS; + } else { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= ~R200_NORMALIZE_NORMALS; + } + break; + + /* Pointsize registers on r200 don't seem to do anything. Maybe + * have to pass pointsizes as vertex parameters? In any case, + * setting pointmin == pointsizemax == 1.0, and doing nothing + * for aa is enough to satisfy conform. + */ + case GL_POINT_SMOOTH: + break; + + /* These don't really do anything, as we don't use the 3vtx + * primitives yet. + */ +#if 0 + case GL_POLYGON_OFFSET_POINT: + R200_STATECHANGE( rmesa, set ); + if ( state ) { + rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_ZBIAS_ENABLE_POINT; + } else { + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~R200_ZBIAS_ENABLE_POINT; + } + break; + + case GL_POLYGON_OFFSET_LINE: + R200_STATECHANGE( rmesa, set ); + if ( state ) { + rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_ZBIAS_ENABLE_LINE; + } else { + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~R200_ZBIAS_ENABLE_LINE; + } + break; +#endif + + case GL_POLYGON_OFFSET_FILL: + R200_STATECHANGE( rmesa, set ); + if ( state ) { + rmesa->hw.set.cmd[SET_SE_CNTL] |= R200_ZBIAS_ENABLE_TRI; + } else { + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~R200_ZBIAS_ENABLE_TRI; + } + break; + + case GL_POLYGON_SMOOTH: + R200_STATECHANGE( rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_ANTI_ALIAS_POLY; + } else { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~R200_ANTI_ALIAS_POLY; + } + break; + + case GL_POLYGON_STIPPLE: + R200_STATECHANGE(rmesa, set ); + if ( state ) { + rmesa->hw.set.cmd[SET_RE_CNTL] |= R200_STIPPLE_ENABLE; + } else { + rmesa->hw.set.cmd[SET_RE_CNTL] &= ~R200_STIPPLE_ENABLE; + } + break; + + case GL_RESCALE_NORMAL_EXT: { + GLboolean tmp = ctx->_NeedEyeCoords ? state : !state; + R200_STATECHANGE( rmesa, tcl ); + if ( tmp ) { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_RESCALE_NORMALS; + } else { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= ~R200_RESCALE_NORMALS; + } + break; + } + + case GL_SCISSOR_TEST: + R200_FIREVERTICES( rmesa ); + rmesa->state.scissor.enabled = state; + r200UpdateScissor( ctx ); + break; + + case GL_STENCIL_TEST: + if ( rmesa->state.stencil.hwBuffer ) { + R200_STATECHANGE( rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= R200_STENCIL_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~R200_STENCIL_ENABLE; + } + } else { + FALLBACK( rmesa, R200_FALLBACK_STENCIL, state ); + } + break; + + case GL_TEXTURE_GEN_Q: + case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_T: + /* Picked up in r200UpdateTextureState. + */ + rmesa->recheck_texgen[ctx->Texture.CurrentUnit] = GL_TRUE; + break; + + case GL_COLOR_SUM_EXT: + r200UpdateSpecular ( ctx ); + break; + + default: + return; + } +} + + +void r200LightingSpaceChange( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLboolean tmp; + + if (R200_DEBUG & DEBUG_STATE) + fprintf(stderr, "%s %d BEFORE %x\n", __FUNCTION__, ctx->_NeedEyeCoords, + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0]); + + if (ctx->_NeedEyeCoords) + tmp = ctx->Transform.RescaleNormals; + else + tmp = !ctx->Transform.RescaleNormals; + + R200_STATECHANGE( rmesa, tcl ); + if ( tmp ) { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] |= R200_RESCALE_NORMALS; + } else { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] &= ~R200_RESCALE_NORMALS; + } + + if (R200_DEBUG & DEBUG_STATE) + fprintf(stderr, "%s %d AFTER %x\n", __FUNCTION__, ctx->_NeedEyeCoords, + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0]); +} + +/* ============================================================= + * Deferred state management - matrices, textures, other? + */ + + + + +static void upload_matrix( r200ContextPtr rmesa, GLfloat *src, int idx ) +{ + float *dest = ((float *)R200_DB_STATE( mat[idx] ))+MAT_ELT_0; + int i; + + + for (i = 0 ; i < 4 ; i++) { + *dest++ = src[i]; + *dest++ = src[i+4]; + *dest++ = src[i+8]; + *dest++ = src[i+12]; + } + + R200_DB_STATECHANGE( rmesa, &rmesa->hw.mat[idx] ); +} + +static void upload_matrix_t( r200ContextPtr rmesa, GLfloat *src, int idx ) +{ + float *dest = ((float *)R200_DB_STATE( mat[idx] ))+MAT_ELT_0; + memcpy(dest, src, 16*sizeof(float)); + R200_DB_STATECHANGE( rmesa, &rmesa->hw.mat[idx] ); +} + + +static void update_texturematrix( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + GLuint tpc = rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0]; + GLuint compsel = rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL]; + int unit; + + if (R200_DEBUG & DEBUG_STATE) + fprintf(stderr, "%s before COMPSEL: %x\n", __FUNCTION__, + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL]); + + rmesa->TexMatEnabled = 0; + rmesa->TexMatCompSel = 0; + + for (unit = 0 ; unit < 2; unit++) { + if (!ctx->Texture.Unit[unit]._ReallyEnabled) + continue; + + if (ctx->TextureMatrix[unit].type != MATRIX_IDENTITY) { + rmesa->TexMatEnabled |= (R200_TEXGEN_TEXMAT_0_ENABLE| + R200_TEXMAT_0_ENABLE) << unit; + + rmesa->TexMatCompSel |= R200_OUTPUT_TEX_0 << unit; + + if (rmesa->TexGenEnabled & (R200_TEXMAT_0_ENABLE << unit)) { + /* Need to preconcatenate any active texgen + * obj/eyeplane matrices: + */ + _math_matrix_mul_matrix( &rmesa->tmpmat, + &rmesa->TexGenMatrix[unit], + &ctx->TextureMatrix[unit] ); + upload_matrix( rmesa, rmesa->tmpmat.m, R200_MTX_TEX0+unit ); + } + else { + upload_matrix( rmesa, ctx->TextureMatrix[unit].m, + R200_MTX_TEX0+unit ); + } + } + else if (rmesa->TexGenEnabled & (R200_TEXMAT_0_ENABLE << unit)) { + upload_matrix( rmesa, rmesa->TexGenMatrix[unit].m, + R200_MTX_TEX0+unit ); + } + } + + tpc = (rmesa->TexMatEnabled | rmesa->TexGenEnabled); + if (tpc != rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0] || + rmesa->TexGenInputs != rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1]) { + R200_STATECHANGE(rmesa, tcg); + rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0] = tpc; + rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1] = rmesa->TexGenInputs; + } + + compsel &= ~R200_OUTPUT_TEX_MASK; + compsel |= rmesa->TexMatCompSel | rmesa->TexGenCompSel; + if (compsel != rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL]) { + R200_STATECHANGE(rmesa, vtx); + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] = compsel; + } +} + + + +void r200ValidateState( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint new_state = rmesa->NewGLState; + + if (new_state & _NEW_TEXTURE) { + r200UpdateTextureState( ctx ); + new_state |= rmesa->NewGLState; /* may add TEXTURE_MATRIX */ + } + + /* Need an event driven matrix update? + */ + if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION)) + upload_matrix( rmesa, ctx->_ModelProjectMatrix.m, R200_MTX_MVP ); + + /* Need these for lighting (shouldn't upload otherwise) + */ + if (new_state & (_NEW_MODELVIEW)) { + upload_matrix( rmesa, ctx->ModelView.m, R200_MTX_MV ); + upload_matrix_t( rmesa, ctx->ModelView.inv, R200_MTX_IMV ); + } + + /* Does this need to be triggered on eg. modelview for + * texgen-derived objplane/eyeplane matrices? + */ + if (new_state & (_NEW_TEXTURE|_NEW_TEXTURE_MATRIX)) { + update_texturematrix( ctx ); + } + + if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW|_MESA_NEW_NEED_EYE_COORDS)) { + update_light( ctx ); + } + + /* emit all active clip planes if projection matrix changes. + */ + if (new_state & (_NEW_PROJECTION)) { + if (ctx->Transform._AnyClip) + r200UpdateClipPlanes( ctx ); + } + + + rmesa->NewGLState = 0; +} + + +static void r200InvalidateState( GLcontext *ctx, GLuint new_state ) +{ + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + _ae_invalidate_state( ctx, new_state ); + R200_CONTEXT(ctx)->NewGLState |= new_state; + r200VtxfmtInvalidate( ctx ); +} + +static void r200WrapRunPipeline( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + + if (0) + fprintf(stderr, "%s, newstate: %x\n", __FUNCTION__, rmesa->NewGLState); + + /* Validate state: + */ + if (rmesa->NewGLState) + r200ValidateState( ctx ); + + if (tnl->vb.Material) { + TCL_FALLBACK( ctx, R200_TCL_FALLBACK_MATERIAL, GL_TRUE ); + } + + /* Run the pipeline. + */ + _tnl_run_pipeline( ctx ); + + if (tnl->vb.Material) { + TCL_FALLBACK( ctx, R200_TCL_FALLBACK_MATERIAL, GL_FALSE ); + r200UpdateMaterial( ctx ); /* not needed any more? */ + } +} + + +/* Initialize the driver's state functions. + */ +void r200InitStateFuncs( GLcontext *ctx ) +{ + ctx->Driver.UpdateState = r200InvalidateState; + ctx->Driver.LightingSpaceChange = r200LightingSpaceChange; + + ctx->Driver.SetDrawBuffer = r200SetDrawBuffer; + + ctx->Driver.AlphaFunc = r200AlphaFunc; + ctx->Driver.BlendEquation = r200BlendEquation; + ctx->Driver.BlendFunc = r200BlendFunc; + ctx->Driver.BlendFuncSeparate = r200BlendFuncSeparate; + ctx->Driver.ClearColor = r200ClearColor; + ctx->Driver.ClearDepth = NULL; + ctx->Driver.ClearIndex = NULL; + ctx->Driver.ClearStencil = r200ClearStencil; + ctx->Driver.ClipPlane = r200ClipPlane; + ctx->Driver.ColorMask = r200ColorMask; + ctx->Driver.CullFace = r200CullFace; + ctx->Driver.DepthFunc = r200DepthFunc; + ctx->Driver.DepthMask = r200DepthMask; + ctx->Driver.DepthRange = r200DepthRange; + ctx->Driver.Enable = r200Enable; + ctx->Driver.Fogfv = r200Fogfv; + ctx->Driver.FrontFace = r200FrontFace; + ctx->Driver.Hint = NULL; + ctx->Driver.IndexMask = NULL; + ctx->Driver.LightModelfv = r200LightModelfv; + ctx->Driver.Lightfv = r200Lightfv; + ctx->Driver.LineStipple = r200LineStipple; + ctx->Driver.LineWidth = r200LineWidth; + ctx->Driver.LogicOpcode = r200LogicOpCode; + ctx->Driver.PolygonMode = r200PolygonMode; + ctx->Driver.PolygonOffset = r200PolygonOffset; + ctx->Driver.PolygonStipple = r200PolygonStipple; + ctx->Driver.PointSize = r200PointSize; + ctx->Driver.RenderMode = r200RenderMode; + ctx->Driver.Scissor = r200Scissor; + ctx->Driver.ShadeModel = r200ShadeModel; + ctx->Driver.StencilFunc = r200StencilFunc; + ctx->Driver.StencilMask = r200StencilMask; + ctx->Driver.StencilOp = r200StencilOp; + ctx->Driver.Viewport = r200Viewport; + + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; + + TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange = r200UpdateMaterial; + TNL_CONTEXT(ctx)->Driver.RunPipeline = r200WrapRunPipeline; +} Index: xc/lib/GL/mesa/src/drv/r200/r200_state.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_state.h:1.2 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_state.h Tue Nov 5 12:46:08 2002 @@ -0,0 +1,68 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_state.h,v 1.2 2002/11/05 17:46:08 tsi Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_STATE_H__ +#define __R200_STATE_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "r200_context.h" + +extern void r200InitState( r200ContextPtr rmesa ); +extern void r200InitStateFuncs( GLcontext *ctx ); + +extern void r200UpdateMaterial( GLcontext *ctx ); + +extern void r200SetCliprects( r200ContextPtr rmesa, GLenum mode ); +extern void r200RecalcScissorRects( r200ContextPtr rmesa ); +extern void r200UpdateViewportOffset( GLcontext *ctx ); +extern void r200UpdateWindow( GLcontext *ctx ); + +extern void r200ValidateState( GLcontext *ctx ); + +extern void r200PrintDirty( r200ContextPtr rmesa, + const char *msg ); + + +extern void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( rmesa, bit, mode ) do { \ + if ( 0 ) fprintf( stderr, "FALLBACK in %s: #%d=%d\n", \ + __FUNCTION__, bit, mode ); \ + r200Fallback( rmesa->glCtx, bit, mode ); \ +} while (0) + +extern void r200LightingSpaceChange( GLcontext *ctx ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_state_init.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_state_init.c:1.4 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_state_init.c Sat Feb 22 01:21:11 2003 @@ -0,0 +1,688 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_state_init.c,v 1.4 2003/02/22 06:21:11 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_ioctl.h" +#include "r200_state.h" +#include "r200_tcl.h" +#include "r200_tex.h" +#include "r200_swtcl.h" +#include "r200_vtxfmt.h" + +#include "mem.h" +#include "mmath.h" +#include "enums.h" +#include "colormac.h" +#include "light.h" +#include "api_arrayelt.h" + +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" +#include "swrast_setup/swrast_setup.h" + +/* ============================================================= + * State initialization + */ + +void r200PrintDirty( r200ContextPtr rmesa, const char *msg ) +{ + struct r200_state_atom *l; + + fprintf(stderr, msg); + fprintf(stderr, ": "); + + foreach(l, &(rmesa->hw.dirty)) { + fprintf(stderr, "%s, ", l->name); + } + + fprintf(stderr, "\n"); +} + +static int cmdpkt( int id ) +{ + drmRadeonCmdHeader h; + h.i = 0; + h.packet.cmd_type = RADEON_CMD_PACKET; + h.packet.packet_id = id; + return h.i; +} + +static int cmdvec( int offset, int stride, int count ) +{ + drmRadeonCmdHeader h; + h.i = 0; + h.vectors.cmd_type = RADEON_CMD_VECTORS; + h.vectors.offset = offset; + h.vectors.stride = stride; + h.vectors.count = count; + return h.i; +} + +static int cmdscl( int offset, int stride, int count ) +{ + drmRadeonCmdHeader h; + h.i = 0; + h.scalars.cmd_type = RADEON_CMD_SCALARS; + h.scalars.offset = offset; + h.scalars.stride = stride; + h.scalars.count = count; + return h.i; +} + +static int cmdscl2( int offset, int stride, int count ) +{ + drmRadeonCmdHeader h; + h.i = 0; + h.scalars.cmd_type = RADEON_CMD_SCALARS2; + h.scalars.offset = offset - 0x100; + h.scalars.stride = stride; + h.scalars.count = count; + return h.i; +} + +#define CHECK( NM, FLAG ) \ +static GLboolean check_##NM( GLcontext *ctx, int idx ) \ +{ \ + (void) idx; \ + return FLAG; \ +} + +#define TCL_CHECK( NM, FLAG ) \ +static GLboolean check_##NM( GLcontext *ctx, int idx ) \ +{ \ + r200ContextPtr rmesa = R200_CONTEXT(ctx); \ + (void) idx; \ + return !rmesa->TclFallback && (FLAG); \ +} + + + +CHECK( always, GL_TRUE ) +CHECK( tex_any, ctx->Texture._ReallyEnabled ) +CHECK( tex, ctx->Texture.Unit[idx]._ReallyEnabled ) +CHECK( fog, ctx->Fog.Enabled ) +TCL_CHECK( tcl, GL_TRUE ) +TCL_CHECK( tcl_tex_any, ctx->Texture._ReallyEnabled ) +TCL_CHECK( tcl_tex, ctx->Texture.Unit[idx]._ReallyEnabled ) +TCL_CHECK( tcl_lighting, ctx->Light.Enabled ) +TCL_CHECK( tcl_eyespace_or_lighting, ctx->_NeedEyeCoords || ctx->Light.Enabled ) +TCL_CHECK( tcl_light, ctx->Light.Enabled && ctx->Light.Light[idx].Enabled ) +TCL_CHECK( tcl_ucp, ctx->Transform.ClipEnabled[idx] ) +/* TCL_CHECK( tcl_eyespace_or_fog, ctx->_NeedEyeCoords || ctx->Fog.Enabled ) */ + + +static GLboolean check_tcl_eyespace_or_fog( GLcontext *ctx, int idx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + int res; + (void) idx; + res = !rmesa->TclFallback && (ctx->_NeedEyeCoords || ctx->Fog.Enabled); + fprintf(stderr, "%s: %d\n", __FUNCTION__, res); + return res; +} + + +/* Initialize the context's hardware state. + */ +void r200InitState( r200ContextPtr rmesa ) +{ + GLcontext *ctx = rmesa->glCtx; + GLuint color_fmt, depth_fmt, i; + + switch ( rmesa->r200Screen->cpp ) { + case 2: + color_fmt = R200_COLOR_FORMAT_RGB565; + break; + case 4: + color_fmt = R200_COLOR_FORMAT_ARGB8888; + break; + default: + fprintf( stderr, "Error: Unsupported pixel depth... exiting\n" ); + exit( -1 ); + } + + rmesa->state.color.clear = 0x00000000; + + switch ( ctx->Visual.depthBits ) { + case 16: + rmesa->state.depth.scale = 1.0 / (GLfloat)0xffff; + depth_fmt = R200_DEPTH_FORMAT_16BIT_INT_Z; + rmesa->state.stencil.clear = 0x00000000; + break; + case 24: + rmesa->state.depth.scale = 1.0 / (GLfloat)0xffffff; + depth_fmt = R200_DEPTH_FORMAT_24BIT_INT_Z; + rmesa->state.stencil.clear = 0xff000000; + break; + default: + fprintf( stderr, "Error: Unsupported depth %d... exiting\n", + ctx->Visual.depthBits ); + exit( -1 ); + } + + /* Only have hw stencil when depth buffer is 24 bits deep */ + rmesa->state.stencil.hwBuffer = ( ctx->Visual.stencilBits > 0 && + ctx->Visual.depthBits == 24 ); + + rmesa->Fallback = 0; + + if ( ctx->Visual.doubleBufferMode && rmesa->sarea->pfCurrentPage == 0 ) { + rmesa->state.color.drawOffset = rmesa->r200Screen->backOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->backPitch; + } else { + rmesa->state.color.drawOffset = rmesa->r200Screen->frontOffset; + rmesa->state.color.drawPitch = rmesa->r200Screen->frontPitch; + } + + rmesa->state.pixel.readOffset = rmesa->state.color.drawOffset; + rmesa->state.pixel.readPitch = rmesa->state.color.drawPitch; + + /* Initialize lists: + */ + make_empty_list(&(rmesa->hw.dirty)); rmesa->hw.dirty.name = "DIRTY"; + make_empty_list(&(rmesa->hw.clean)); rmesa->hw.clean.name = "CLEAN"; + + +#define ALLOC_STATE( ATOM, CHK, SZ, NM, IDX ) \ + do { \ + rmesa->hw.ATOM.cmd_size = SZ; \ + rmesa->hw.ATOM.cmd = (int *)CALLOC(SZ * sizeof(int)); \ + rmesa->hw.ATOM.lastcmd = (int *)CALLOC(SZ * sizeof(int)); \ + rmesa->hw.ATOM.name = NM; \ + rmesa->hw.ATOM.idx = IDX; \ + rmesa->hw.ATOM.check = check_##CHK; \ + insert_at_head(&(rmesa->hw.dirty), &(rmesa->hw.ATOM)); \ + } while (0) + + + /* Allocate state buffers: + */ + ALLOC_STATE( ctx, always, CTX_STATE_SIZE, "CTX/context", 0 ); + ALLOC_STATE( set, always, SET_STATE_SIZE, "SET/setup", 0 ); + ALLOC_STATE( lin, always, LIN_STATE_SIZE, "LIN/line", 0 ); + ALLOC_STATE( msk, always, MSK_STATE_SIZE, "MSK/mask", 0 ); + ALLOC_STATE( vpt, always, VPT_STATE_SIZE, "VPT/viewport", 0 ); + ALLOC_STATE( vtx, always, VTX_STATE_SIZE, "VTX/vertex", 0 ); + ALLOC_STATE( vap, always, VAP_STATE_SIZE, "VAP/vap", 0 ); + ALLOC_STATE( vte, always, VTE_STATE_SIZE, "VTE/vte", 0 ); + ALLOC_STATE( msc, always, MSC_STATE_SIZE, "MSC/misc", 0 ); + ALLOC_STATE( cst, always, CST_STATE_SIZE, "CST/constant", 0 ); + ALLOC_STATE( zbs, always, ZBS_STATE_SIZE, "ZBS/zbias", 0 ); + ALLOC_STATE( tam, tex_any, TAM_STATE_SIZE, "TAM/tam", 0 ); + ALLOC_STATE( tf, tex_any, TF_STATE_SIZE, "TF/tfactor", 0 ); + ALLOC_STATE( tex[0], tex_any, TEX_STATE_SIZE, "TEX/tex-0", 0 ); + ALLOC_STATE( tex[1], tex_any, TEX_STATE_SIZE, "TEX/tex-1", 1 ); + + ALLOC_STATE( tcl, tcl, TCL_STATE_SIZE, "TCL/tcl", 0 ); + ALLOC_STATE( msl, tcl, MSL_STATE_SIZE, "MSL/matrix-select", 0 ); + ALLOC_STATE( tcg, tcl, TCG_STATE_SIZE, "TCG/texcoordgen", 0 ); + ALLOC_STATE( mtl[0], tcl_lighting, MTL_STATE_SIZE, "MTL0/material0", 0 ); + ALLOC_STATE( grd, tcl, GRD_STATE_SIZE, "GRD/guard-band", 0 ); + ALLOC_STATE( fog, fog, FOG_STATE_SIZE, "FOG/fog", 0 ); + ALLOC_STATE( glt, tcl_lighting, GLT_STATE_SIZE, "GLT/light-global", 0 ); + ALLOC_STATE( eye, tcl_lighting, EYE_STATE_SIZE, "EYE/eye-vector", 0 ); + ALLOC_STATE( mat[R200_MTX_MV], tcl, MAT_STATE_SIZE, "MAT/modelview", 0 ); + ALLOC_STATE( mat[R200_MTX_IMV], tcl, MAT_STATE_SIZE, "MAT/it-modelview", 0 ); + ALLOC_STATE( mat[R200_MTX_MVP], tcl, MAT_STATE_SIZE, "MAT/modelproject", 0 ); + ALLOC_STATE( mat[R200_MTX_TEX0], tcl_tex, MAT_STATE_SIZE, "MAT/texmat0", 0 ); + ALLOC_STATE( mat[R200_MTX_TEX1], tcl_tex, MAT_STATE_SIZE, "MAT/texmat1", 1 ); + ALLOC_STATE( ucp[0], tcl_ucp, UCP_STATE_SIZE, "UCP/userclip-0", 0 ); + ALLOC_STATE( ucp[1], tcl_ucp, UCP_STATE_SIZE, "UCP/userclip-1", 1 ); + ALLOC_STATE( ucp[2], tcl_ucp, UCP_STATE_SIZE, "UCP/userclip-2", 2 ); + ALLOC_STATE( ucp[3], tcl_ucp, UCP_STATE_SIZE, "UCP/userclip-3", 3 ); + ALLOC_STATE( ucp[4], tcl_ucp, UCP_STATE_SIZE, "UCP/userclip-4", 4 ); + ALLOC_STATE( ucp[5], tcl_ucp, UCP_STATE_SIZE, "UCP/userclip-5", 5 ); + ALLOC_STATE( lit[0], tcl_light, LIT_STATE_SIZE, "LIT/light-0", 0 ); + ALLOC_STATE( lit[1], tcl_light, LIT_STATE_SIZE, "LIT/light-1", 1 ); + ALLOC_STATE( lit[2], tcl_light, LIT_STATE_SIZE, "LIT/light-2", 2 ); + ALLOC_STATE( lit[3], tcl_light, LIT_STATE_SIZE, "LIT/light-3", 3 ); + ALLOC_STATE( lit[4], tcl_light, LIT_STATE_SIZE, "LIT/light-4", 4 ); + ALLOC_STATE( lit[5], tcl_light, LIT_STATE_SIZE, "LIT/light-5", 5 ); + ALLOC_STATE( lit[6], tcl_light, LIT_STATE_SIZE, "LIT/light-6", 6 ); + ALLOC_STATE( lit[7], tcl_light, LIT_STATE_SIZE, "LIT/light-7", 7 ); + ALLOC_STATE( pix[0], always, PIX_STATE_SIZE, "PIX/pixstage-0", 0 ); + ALLOC_STATE( pix[1], tex, PIX_STATE_SIZE, "PIX/pixstage-1", 1 ); + + + /* Fill in the packet headers: + */ + rmesa->hw.ctx.cmd[CTX_CMD_0] = cmdpkt(RADEON_EMIT_PP_MISC); + rmesa->hw.ctx.cmd[CTX_CMD_1] = cmdpkt(RADEON_EMIT_PP_CNTL); + rmesa->hw.ctx.cmd[CTX_CMD_2] = cmdpkt(RADEON_EMIT_RB3D_COLORPITCH); + rmesa->hw.lin.cmd[LIN_CMD_0] = cmdpkt(RADEON_EMIT_RE_LINE_PATTERN); + rmesa->hw.lin.cmd[LIN_CMD_1] = cmdpkt(RADEON_EMIT_SE_LINE_WIDTH); + rmesa->hw.msk.cmd[MSK_CMD_0] = cmdpkt(RADEON_EMIT_RB3D_STENCILREFMASK); + rmesa->hw.vpt.cmd[VPT_CMD_0] = cmdpkt(RADEON_EMIT_SE_VPORT_XSCALE); + rmesa->hw.set.cmd[SET_CMD_0] = cmdpkt(RADEON_EMIT_SE_CNTL); + rmesa->hw.msc.cmd[MSC_CMD_0] = cmdpkt(RADEON_EMIT_RE_MISC); + rmesa->hw.cst.cmd[CST_CMD_0] = cmdpkt(R200_EMIT_PP_CNTL_X); + rmesa->hw.cst.cmd[CST_CMD_1] = cmdpkt(R200_EMIT_RB3D_DEPTHXY_OFFSET); + rmesa->hw.cst.cmd[CST_CMD_2] = cmdpkt(R200_EMIT_RE_AUX_SCISSOR_CNTL); + rmesa->hw.cst.cmd[CST_CMD_3] = cmdpkt(R200_EMIT_RE_SCISSOR_TL_0); + rmesa->hw.cst.cmd[CST_CMD_4] = cmdpkt(R200_EMIT_SE_VAP_CNTL_STATUS); + rmesa->hw.cst.cmd[CST_CMD_5] = cmdpkt(R200_EMIT_RE_POINTSIZE); + rmesa->hw.cst.cmd[CST_CMD_6] = cmdpkt(R200_EMIT_TCL_INPUT_VTX_VECTOR_ADDR_0); + rmesa->hw.tam.cmd[TAM_CMD_0] = cmdpkt(R200_EMIT_PP_TAM_DEBUG3); + rmesa->hw.tf.cmd[TF_CMD_0] = cmdpkt(R200_EMIT_TFACTOR_0); + rmesa->hw.tex[0].cmd[TEX_CMD_0] = cmdpkt(R200_EMIT_PP_TXFILTER_0); + rmesa->hw.tex[0].cmd[TEX_CMD_1] = cmdpkt(R200_EMIT_PP_TXOFFSET_0); + rmesa->hw.tex[1].cmd[TEX_CMD_0] = cmdpkt(R200_EMIT_PP_TXFILTER_1); + rmesa->hw.tex[1].cmd[TEX_CMD_1] = cmdpkt(R200_EMIT_PP_TXOFFSET_1); + rmesa->hw.pix[0].cmd[PIX_CMD_0] = cmdpkt(R200_EMIT_PP_TXCBLEND_0); + rmesa->hw.pix[1].cmd[PIX_CMD_0] = cmdpkt(R200_EMIT_PP_TXCBLEND_1); + rmesa->hw.zbs.cmd[ZBS_CMD_0] = cmdpkt(RADEON_EMIT_SE_ZBIAS_FACTOR); + rmesa->hw.tcl.cmd[TCL_CMD_0] = cmdpkt(R200_EMIT_TCL_LIGHT_MODEL_CTL_0); + rmesa->hw.tcl.cmd[TCL_CMD_1] = cmdpkt(R200_EMIT_TCL_UCP_VERT_BLEND_CTL); + rmesa->hw.tcg.cmd[TCG_CMD_0] = cmdpkt(R200_EMIT_TEX_PROC_CTL_2); + rmesa->hw.msl.cmd[MSL_CMD_0] = cmdpkt(R200_EMIT_MATRIX_SELECT_0); + rmesa->hw.vap.cmd[VAP_CMD_0] = cmdpkt(R200_EMIT_VAP_CTL); + rmesa->hw.vtx.cmd[VTX_CMD_0] = cmdpkt(R200_EMIT_VTX_FMT_0); + rmesa->hw.vtx.cmd[VTX_CMD_1] = cmdpkt(R200_EMIT_OUTPUT_VTX_COMP_SEL); + rmesa->hw.vtx.cmd[VTX_CMD_2] = cmdpkt(R200_EMIT_SE_VTX_STATE_CNTL); + rmesa->hw.vte.cmd[VTE_CMD_0] = cmdpkt(R200_EMIT_VTE_CNTL); + rmesa->hw.mtl[0].cmd[MTL_CMD_0] = + cmdvec( R200_VS_MAT_0_EMISS, 1, 16 ); + rmesa->hw.mtl[0].cmd[MTL_CMD_1] = + cmdscl2( R200_SS_MAT_0_SHININESS, 1, 1 ); + rmesa->hw.grd.cmd[GRD_CMD_0] = + cmdscl( R200_SS_VERT_GUARD_CLIP_ADJ_ADDR, 1, 4 ); + rmesa->hw.fog.cmd[FOG_CMD_0] = + cmdvec( R200_VS_FOG_PARAM_ADDR, 1, 4 ); + rmesa->hw.glt.cmd[GLT_CMD_0] = + cmdvec( R200_VS_GLOBAL_AMBIENT_ADDR, 1, 4 ); + rmesa->hw.eye.cmd[EYE_CMD_0] = + cmdvec( R200_VS_EYE_VECTOR_ADDR, 1, 4 ); + + rmesa->hw.mat[R200_MTX_MV].cmd[MAT_CMD_0] = + cmdvec( R200_VS_MATRIX_0_MV, 1, 16); + rmesa->hw.mat[R200_MTX_IMV].cmd[MAT_CMD_0] = + cmdvec( R200_VS_MATRIX_1_INV_MV, 1, 16); + rmesa->hw.mat[R200_MTX_MVP].cmd[MAT_CMD_0] = + cmdvec( R200_VS_MATRIX_2_MVP, 1, 16); + rmesa->hw.mat[R200_MTX_TEX0].cmd[MAT_CMD_0] = + cmdvec( R200_VS_MATRIX_3_TEX0, 1, 16); + rmesa->hw.mat[R200_MTX_TEX1].cmd[MAT_CMD_0] = + cmdvec( R200_VS_MATRIX_4_TEX1, 1, 16); + + for (i = 0 ; i < 8; i++) { + rmesa->hw.lit[i].cmd[LIT_CMD_0] = + cmdvec( R200_VS_LIGHT_AMBIENT_ADDR + i, 8, 24 ); + rmesa->hw.lit[i].cmd[LIT_CMD_1] = + cmdscl( R200_SS_LIGHT_DCD_ADDR + i, 8, 7 ); + } + + for (i = 0 ; i < 6; i++) { + rmesa->hw.ucp[i].cmd[UCP_CMD_0] = + cmdvec( R200_VS_UCP_ADDR + i, 1, 4 ); + } + + /* Initial Harware state: + */ + rmesa->hw.ctx.cmd[CTX_PP_MISC] = (R200_ALPHA_TEST_PASS | + R200_RIGHT_HAND_CUBE_OGL); + + rmesa->hw.ctx.cmd[CTX_PP_FOG_COLOR] = (R200_FOG_VERTEX | + R200_FOG_USE_SPEC_ALPHA); + + rmesa->hw.ctx.cmd[CTX_RE_SOLID_COLOR] = 0x00000000; + + rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] = (R200_COMB_FCN_ADD_CLAMP | + R200_SRC_BLEND_GL_ONE | + R200_DST_BLEND_GL_ZERO ); + + rmesa->hw.ctx.cmd[CTX_RB3D_DEPTHOFFSET] = + rmesa->r200Screen->depthOffset; + + rmesa->hw.ctx.cmd[CTX_RB3D_DEPTHPITCH] = + ((rmesa->r200Screen->depthPitch & + R200_DEPTHPITCH_MASK) | + R200_DEPTH_ENDIAN_NO_SWAP); + + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] = (depth_fmt | + R200_Z_TEST_LESS | + R200_STENCIL_TEST_ALWAYS | + R200_STENCIL_FAIL_KEEP | + R200_STENCIL_ZPASS_KEEP | + R200_STENCIL_ZFAIL_KEEP | + R200_Z_WRITE_ENABLE); + + rmesa->hw.ctx.cmd[CTX_PP_CNTL] = (R200_ANTI_ALIAS_NONE + | R200_TEX_BLEND_0_ENABLE); + + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] = color_fmt; + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= R200_DITHER_ENABLE; + + rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = (rmesa->state.color.drawOffset & + R200_COLOROFFSET_MASK); + + rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = ((rmesa->state.color.drawPitch & + R200_COLORPITCH_MASK) | + R200_COLOR_ENDIAN_NO_SWAP); + + rmesa->hw.set.cmd[SET_SE_CNTL] = (R200_FFACE_CULL_CCW | + R200_BFACE_SOLID | + R200_FFACE_SOLID | + R200_FLAT_SHADE_VTX_LAST | + R200_DIFFUSE_SHADE_GOURAUD | + R200_ALPHA_SHADE_GOURAUD | + R200_SPECULAR_SHADE_GOURAUD | + R200_FOG_SHADE_GOURAUD | + R200_VTX_PIX_CENTER_OGL | + R200_ROUND_MODE_TRUNC | + R200_ROUND_PREC_8TH_PIX); + + rmesa->hw.set.cmd[SET_RE_CNTL] = (R200_PERSPECTIVE_ENABLE | + R200_SCISSOR_ENABLE); + + rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] = ((1 << 16) | 0xffff); + + rmesa->hw.lin.cmd[LIN_RE_LINE_STATE] = + ((0 << R200_LINE_CURRENT_PTR_SHIFT) | + (1 << R200_LINE_CURRENT_COUNT_SHIFT)); + + rmesa->hw.lin.cmd[LIN_SE_LINE_WIDTH] = (1 << 4); + + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] = + ((0x00 << R200_STENCIL_REF_SHIFT) | + (0xff << R200_STENCIL_MASK_SHIFT) | + (0xff << R200_STENCIL_WRITEMASK_SHIFT)); + + rmesa->hw.msk.cmd[MSK_RB3D_ROPCNTL] = R200_ROP_COPY; + rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK] = 0xffffffff; + + rmesa->hw.tam.cmd[TAM_DEBUG3] = 0; + + rmesa->hw.msc.cmd[MSC_RE_MISC] = + ((0 << R200_STIPPLE_X_OFFSET_SHIFT) | + (0 << R200_STIPPLE_Y_OFFSET_SHIFT) | + R200_STIPPLE_BIG_BIT_ORDER); + + + rmesa->hw.cst.cmd[CST_PP_CNTL_X] = 0; + rmesa->hw.cst.cmd[CST_RB3D_DEPTHXY_OFFSET] = 0; + rmesa->hw.cst.cmd[CST_RE_AUX_SCISSOR_CNTL] = 0x0; + rmesa->hw.cst.cmd[CST_RE_SCISSOR_TL_0] = 0; + rmesa->hw.cst.cmd[CST_RE_SCISSOR_BR_0] = 0; + rmesa->hw.cst.cmd[CST_SE_VAP_CNTL_STATUS] = +#ifdef MESA_BIG_ENDIAN + R200_VC_32BIT_SWAP; +#else + R200_VC_NO_SWAP; +#endif + rmesa->hw.cst.cmd[CST_RE_POINTSIZE] = 0x100010; + rmesa->hw.cst.cmd[CST_SE_TCL_INPUT_VTX_0] = + (0x0 << R200_VERTEX_POSITION_ADDR__SHIFT); + rmesa->hw.cst.cmd[CST_SE_TCL_INPUT_VTX_1] = + (0x02 << R200_VTX_COLOR_0_ADDR__SHIFT) | + (0x03 << R200_VTX_COLOR_1_ADDR__SHIFT); + rmesa->hw.cst.cmd[CST_SE_TCL_INPUT_VTX_2] = + (0x06 << R200_VTX_TEX_0_ADDR__SHIFT) | + (0x07 << R200_VTX_TEX_1_ADDR__SHIFT) | + (0x08 << R200_VTX_TEX_2_ADDR__SHIFT) | + (0x09 << R200_VTX_TEX_3_ADDR__SHIFT); + rmesa->hw.cst.cmd[CST_SE_TCL_INPUT_VTX_3] = + (0x0A << R200_VTX_TEX_4_ADDR__SHIFT) | + (0x0B << R200_VTX_TEX_5_ADDR__SHIFT); + + + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XSCALE] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YSCALE] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZSCALE] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZOFFSET] = 0x00000000; + + rmesa->hw.tex[0].cmd[TEX_PP_TXFILTER] = R200_BORDER_MODE_OGL; + rmesa->hw.tex[0].cmd[TEX_PP_TXFORMAT] = + (R200_TXFORMAT_ST_ROUTE_STQ0 | + (2 << R200_TXFORMAT_WIDTH_SHIFT) | + (2 << R200_TXFORMAT_HEIGHT_SHIFT)); + rmesa->hw.tex[0].cmd[TEX_PP_TXOFFSET] = 0; + rmesa->hw.tex[0].cmd[TEX_PP_BORDER_COLOR] = 0; + rmesa->hw.tex[0].cmd[TEX_PP_TXFORMAT_X] = + (/* R200_TEXCOORD_PROJ | */ + 0x100000); /* Small default bias */ + + rmesa->hw.pix[0].cmd[PIX_PP_TXCBLEND] = + (R200_TXC_ARG_A_ZERO | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_DIFFUSE_COLOR | + R200_TXC_OP_MADD); + + rmesa->hw.pix[0].cmd[PIX_PP_TXCBLEND2] = + ((0 << R200_TXC_TFACTOR_SEL_SHIFT) | + R200_TXC_SCALE_1X | + R200_TXC_CLAMP_0_1 | + R200_TXC_OUTPUT_REG_R0); + + rmesa->hw.pix[0].cmd[PIX_PP_TXABLEND] = + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_DIFFUSE_ALPHA | + R200_TXA_OP_MADD); + + rmesa->hw.pix[0].cmd[PIX_PP_TXABLEND2] = + ((0 << R200_TXA_TFACTOR_SEL_SHIFT) | + R200_TXA_SCALE_1X | + R200_TXA_CLAMP_0_1 | + R200_TXA_OUTPUT_REG_R0); + + rmesa->hw.tex[1].cmd[TEX_PP_TXFILTER] = R200_BORDER_MODE_OGL; + rmesa->hw.tex[1].cmd[TEX_PP_TXFORMAT] = + (R200_TXFORMAT_ST_ROUTE_STQ1 | + (2 << R200_TXFORMAT_WIDTH_SHIFT) | + (2 << R200_TXFORMAT_HEIGHT_SHIFT)); + rmesa->hw.tex[1].cmd[TEX_PP_TXOFFSET] = 0; + rmesa->hw.tex[1].cmd[TEX_PP_BORDER_COLOR] = 0; + rmesa->hw.tex[1].cmd[TEX_PP_TXFORMAT_X] = + (/* R200_TEXCOORD_PROJ | */ + 0x100000); /* Small default bias */ + + rmesa->hw.pix[1].cmd[PIX_PP_TXCBLEND] = + (R200_TXC_ARG_A_ZERO | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_DIFFUSE_COLOR | + R200_TXC_OP_MADD); + + rmesa->hw.pix[1].cmd[PIX_PP_TXCBLEND2] = + ((0 << R200_TXC_TFACTOR_SEL_SHIFT) | + R200_TXC_SCALE_1X | + R200_TXC_CLAMP_0_1 | + R200_TXC_OUTPUT_REG_R0); + + rmesa->hw.pix[1].cmd[PIX_PP_TXABLEND] = + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_DIFFUSE_ALPHA | + R200_TXA_OP_MADD); + + rmesa->hw.pix[1].cmd[PIX_PP_TXABLEND2] = + ((0 << R200_TXA_TFACTOR_SEL_SHIFT) | + R200_TXA_SCALE_1X | + R200_TXA_CLAMP_0_1 | + R200_TXA_OUTPUT_REG_R0); + + rmesa->hw.tf.cmd[TF_TFACTOR_0] = 0; + rmesa->hw.tf.cmd[TF_TFACTOR_1] = 0; + rmesa->hw.tf.cmd[TF_TFACTOR_2] = 0; + rmesa->hw.tf.cmd[TF_TFACTOR_3] = 0; + rmesa->hw.tf.cmd[TF_TFACTOR_4] = 0; + rmesa->hw.tf.cmd[TF_TFACTOR_5] = 0; + + rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] = + (R200_VAP_TCL_ENABLE | + (0x9 << R200_VAP_VF_MAX_VTX_NUM__SHIFT)); + + rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] = + (R200_VPORT_X_SCALE_ENA | + R200_VPORT_Y_SCALE_ENA | + R200_VPORT_Z_SCALE_ENA | + R200_VPORT_X_OFFSET_ENA | + R200_VPORT_Y_OFFSET_ENA | + R200_VPORT_Z_OFFSET_ENA | +/* FIXME: Turn on for tex rect only */ + R200_VTX_ST_DENORMALIZED | + R200_VTX_W0_FMT); + + + rmesa->hw.vtx.cmd[VTX_VTXFMT_0] = 0; + rmesa->hw.vtx.cmd[VTX_VTXFMT_1] = 0; + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_0] = + ((R200_VTX_Z0 | R200_VTX_W0 | + (R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT))); + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_1] = 0; + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_COMPSEL] = (R200_OUTPUT_XYZW); + rmesa->hw.vtx.cmd[VTX_STATE_CNTL] = R200_VSC_UPDATE_USER_COLOR_0_ENABLE; + + + /* Matrix selection */ + rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_0] = + (R200_MTX_MV << R200_MODELVIEW_0_SHIFT); + + rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_1] = + (R200_MTX_IMV << R200_IT_MODELVIEW_0_SHIFT); + + rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_2] = + (R200_MTX_MVP << R200_MODELPROJECT_0_SHIFT); + + rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_3] = + ((R200_MTX_TEX0 << R200_TEXMAT_0_SHIFT) | + (R200_MTX_TEX1 << R200_TEXMAT_1_SHIFT) | + (R200_MTX_TEX2 << R200_TEXMAT_2_SHIFT) | + (R200_MTX_TEX3 << R200_TEXMAT_3_SHIFT)); + + rmesa->hw.msl.cmd[MSL_MATRIX_SELECT_4] = + ((R200_MTX_TEX4 << R200_TEXMAT_4_SHIFT) | + (R200_MTX_TEX5 << R200_TEXMAT_5_SHIFT)); + + + /* General TCL state */ + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_0] = + (R200_SPECULAR_LIGHTS | + R200_DIFFUSE_SPECULAR_COMBINE | + R200_LOCAL_LIGHT_VEC_GL); + + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL_1] = + ((R200_LM1_SOURCE_LIGHT_PREMULT << R200_FRONT_EMISSIVE_SOURCE_SHIFT) | + (R200_LM1_SOURCE_LIGHT_PREMULT << R200_FRONT_AMBIENT_SOURCE_SHIFT) | + (R200_LM1_SOURCE_LIGHT_PREMULT << R200_FRONT_DIFFUSE_SOURCE_SHIFT) | + (R200_LM1_SOURCE_LIGHT_PREMULT << R200_FRONT_SPECULAR_SOURCE_SHIFT) | + (R200_LM1_SOURCE_LIGHT_PREMULT << R200_BACK_EMISSIVE_SOURCE_SHIFT) | + (R200_LM1_SOURCE_LIGHT_PREMULT << R200_BACK_AMBIENT_SOURCE_SHIFT) | + (R200_LM1_SOURCE_LIGHT_PREMULT << R200_BACK_DIFFUSE_SOURCE_SHIFT) | + (R200_LM1_SOURCE_LIGHT_PREMULT << R200_BACK_SPECULAR_SOURCE_SHIFT)); + + rmesa->hw.tcl.cmd[TCL_PER_LIGHT_CTL_0] = 0; /* filled in via callbacks */ + rmesa->hw.tcl.cmd[TCL_PER_LIGHT_CTL_1] = 0; + rmesa->hw.tcl.cmd[TCL_PER_LIGHT_CTL_2] = 0; + rmesa->hw.tcl.cmd[TCL_PER_LIGHT_CTL_3] = 0; + + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] = + (R200_UCP_IN_CLIP_SPACE | + R200_CULL_FRONT_IS_CCW); + + /* Texgen/Texmat state */ + rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_2] = 0x0; /* masks??? */ + rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_3] = + ((0 << R200_TEXGEN_0_INPUT_TEX_SHIFT) | + (1 << R200_TEXGEN_1_INPUT_TEX_SHIFT) | + (2 << R200_TEXGEN_2_INPUT_TEX_SHIFT) | + (3 << R200_TEXGEN_3_INPUT_TEX_SHIFT) | + (4 << R200_TEXGEN_4_INPUT_TEX_SHIFT) | + (5 << R200_TEXGEN_5_INPUT_TEX_SHIFT)); + rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0] = 0; + rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1] = + ((0 << R200_TEXGEN_0_INPUT_SHIFT) | + (1 << R200_TEXGEN_1_INPUT_SHIFT) | + (2 << R200_TEXGEN_2_INPUT_SHIFT) | + (3 << R200_TEXGEN_3_INPUT_SHIFT) | + (4 << R200_TEXGEN_4_INPUT_SHIFT) | + (5 << R200_TEXGEN_5_INPUT_SHIFT)); + rmesa->hw.tcg.cmd[TCG_TEX_CYL_WRAP_CTL] = 0; + + rmesa->TexGenInputs = rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1]; + + + for (i = 0 ; i < 8; i++) { + struct gl_light *l = &ctx->Light.Light[i]; + GLenum p = GL_LIGHT0 + i; + *(float *)&(rmesa->hw.lit[i].cmd[LIT_RANGE_CUTOFF]) = FLT_MAX; + + ctx->Driver.Lightfv( ctx, p, GL_AMBIENT, l->Ambient ); + ctx->Driver.Lightfv( ctx, p, GL_DIFFUSE, l->Diffuse ); + ctx->Driver.Lightfv( ctx, p, GL_SPECULAR, l->Specular ); + ctx->Driver.Lightfv( ctx, p, GL_POSITION, 0 ); + ctx->Driver.Lightfv( ctx, p, GL_SPOT_DIRECTION, 0 ); + ctx->Driver.Lightfv( ctx, p, GL_SPOT_EXPONENT, &l->SpotExponent ); + ctx->Driver.Lightfv( ctx, p, GL_SPOT_CUTOFF, &l->SpotCutoff ); + ctx->Driver.Lightfv( ctx, p, GL_CONSTANT_ATTENUATION, + &l->ConstantAttenuation ); + ctx->Driver.Lightfv( ctx, p, GL_LINEAR_ATTENUATION, + &l->LinearAttenuation ); + ctx->Driver.Lightfv( ctx, p, GL_QUADRATIC_ATTENUATION, + &l->QuadraticAttenuation ); + } + + ctx->Driver.LightModelfv( ctx, GL_LIGHT_MODEL_AMBIENT, + ctx->Light.Model.Ambient ); + + TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange( ctx ); + + for (i = 0 ; i < 6; i++) { + ctx->Driver.ClipPlane( ctx, GL_CLIP_PLANE0 + i, NULL ); + } + + ctx->Driver.Fogfv( ctx, GL_FOG_MODE, 0 ); + ctx->Driver.Fogfv( ctx, GL_FOG_DENSITY, &ctx->Fog.Density ); + ctx->Driver.Fogfv( ctx, GL_FOG_START, &ctx->Fog.Start ); + ctx->Driver.Fogfv( ctx, GL_FOG_END, &ctx->Fog.End ); + ctx->Driver.Fogfv( ctx, GL_FOG_COLOR, ctx->Fog.Color ); + ctx->Driver.Fogfv( ctx, GL_FOG_COORDINATE_SOURCE_EXT, 0 ); + + rmesa->hw.grd.cmd[GRD_VERT_GUARD_CLIP_ADJ] = IEEE_ONE; + rmesa->hw.grd.cmd[GRD_VERT_GUARD_DISCARD_ADJ] = IEEE_ONE; + rmesa->hw.grd.cmd[GRD_HORZ_GUARD_CLIP_ADJ] = IEEE_ONE; + rmesa->hw.grd.cmd[GRD_HORZ_GUARD_DISCARD_ADJ] = IEEE_ONE; + + rmesa->hw.eye.cmd[EYE_X] = 0; + rmesa->hw.eye.cmd[EYE_Y] = 0; + rmesa->hw.eye.cmd[EYE_Z] = IEEE_ONE; + rmesa->hw.eye.cmd[EYE_RESCALE_FACTOR] = IEEE_ONE; + + r200LightingSpaceChange( ctx ); + + rmesa->lost_context = 1; +} Index: xc/lib/GL/mesa/src/drv/r200/r200_swtcl.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_swtcl.c:1.3 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_swtcl.c Mon Dec 23 10:29:26 2002 @@ -0,0 +1,1277 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_swtcl.c,v 1.3 2002/12/23 15:29:26 tsi Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "glheader.h" +#include "mtypes.h" +#include "colormac.h" +#include "enums.h" +#include "mem.h" +#include "mmath.h" +#include "macros.h" +#include "image.h" + +#include "swrast_setup/swrast_setup.h" +#include "swrast/s_fog.h" +#include "math/m_translate.h" +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + +#include "r200_context.h" +#include "r200_ioctl.h" +#include "r200_state.h" +#include "r200_swtcl.h" +#include "r200_tcl.h" + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + + +#define R200_XYZW_BIT 0x01 +#define R200_RGBA_BIT 0x02 +#define R200_SPEC_BIT 0x04 +#define R200_TEX0_BIT 0x08 +#define R200_TEX1_BIT 0x10 +#define R200_PTEX_BIT 0x20 +#define R200_MAX_SETUP 0x40 + +static void flush_last_swtcl_prim( r200ContextPtr rmesa ); + +static struct { + void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint ); + interp_func interp; + copy_pv_func copy_pv; + GLboolean (*check_tex_sizes)( GLcontext *ctx ); + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; +} setup_tab[R200_MAX_SETUP]; + + +static int se_vtx_fmt_0[] = { + 0, + + (R200_VTX_XY | + R200_VTX_Z0 | + (R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT)), + + (R200_VTX_XY | + R200_VTX_Z0 | + R200_VTX_W0 | + (R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT) | + (R200_VTX_PK_RGBA << R200_VTX_COLOR_1_SHIFT)), + + (R200_VTX_XY | + R200_VTX_Z0 | + R200_VTX_W0 | + (R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT) | + (R200_VTX_PK_RGBA << R200_VTX_COLOR_1_SHIFT)), + + (R200_VTX_XY | + R200_VTX_Z0 | + R200_VTX_W0 | + (R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT) | + (R200_VTX_PK_RGBA << R200_VTX_COLOR_1_SHIFT)), + + (R200_VTX_XY | + R200_VTX_Z0 | + R200_VTX_W0 | + (R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT) | + (R200_VTX_PK_RGBA << R200_VTX_COLOR_1_SHIFT)) +}; + +static int se_vtx_fmt_1[] = { + 0, + 0, + 0, + ((2 << R200_VTX_TEX0_COMP_CNT_SHIFT)), + ((2 << R200_VTX_TEX0_COMP_CNT_SHIFT) | + (2 << R200_VTX_TEX1_COMP_CNT_SHIFT)), + ((3 << R200_VTX_TEX0_COMP_CNT_SHIFT) | + (3 << R200_VTX_TEX1_COMP_CNT_SHIFT)), +}; + +#define TINY_VERTEX_FORMAT 1 +#define NOTEX_VERTEX_FORMAT 2 +#define TEX0_VERTEX_FORMAT 3 +#define TEX1_VERTEX_FORMAT 4 +#define PROJ_TEX1_VERTEX_FORMAT 5 +#define TEX2_VERTEX_FORMAT 0 +#define TEX3_VERTEX_FORMAT 0 +#define PROJ_TEX3_VERTEX_FORMAT 0 + +#define DO_XYZW (IND & R200_XYZW_BIT) +#define DO_RGBA (IND & R200_RGBA_BIT) +#define DO_SPEC (IND & R200_SPEC_BIT) +#define DO_FOG (IND & R200_SPEC_BIT) +#define DO_TEX0 (IND & R200_TEX0_BIT) +#define DO_TEX1 (IND & R200_TEX1_BIT) +#define DO_TEX2 0 +#define DO_TEX3 0 +#define DO_PTEX (IND & R200_PTEX_BIT) + +#define VERTEX r200Vertex +#define VERTEX_COLOR r200_color_t +#define GET_VIEWPORT_MAT() 0 +#define GET_TEXSOURCE(n) n +#define GET_VERTEX_FORMAT() R200_CONTEXT(ctx)->swtcl.vertex_format +#define GET_VERTEX_STORE() R200_CONTEXT(ctx)->swtcl.verts +#define GET_VERTEX_STRIDE_SHIFT() R200_CONTEXT(ctx)->swtcl.vertex_stride_shift +#define GET_UBYTE_COLOR_STORE() &R200_CONTEXT(ctx)->UbyteColor +#define GET_UBYTE_SPEC_COLOR_STORE() &R200_CONTEXT(ctx)->UbyteSecondaryColor + +#define HAVE_HW_VIEWPORT 1 +#define HAVE_HW_DIVIDE (IND & ~(R200_XYZW_BIT|R200_RGBA_BIT)) +#define HAVE_TINY_VERTICES 1 +#define HAVE_RGBA_COLOR 1 +#define HAVE_NOTEX_VERTICES 1 +#define HAVE_TEX0_VERTICES 1 +#define HAVE_TEX1_VERTICES 1 +#define HAVE_TEX2_VERTICES 0 +#define HAVE_TEX3_VERTICES 0 +#define HAVE_PTEX_VERTICES 1 + +#define CHECK_HW_DIVIDE (!(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE| \ + DD_TRI_UNFILLED))) + +#define IMPORT_QUALIFIER +#define IMPORT_FLOAT_COLORS r200_import_float_colors +#define IMPORT_FLOAT_SPEC_COLORS r200_import_float_spec_colors + +#define INTERP_VERTEX setup_tab[R200_CONTEXT(ctx)->swtcl.SetupIndex].interp +#define COPY_PV_VERTEX setup_tab[R200_CONTEXT(ctx)->swtcl.SetupIndex].copy_pv + + +/*********************************************************************** + * Generate pv-copying and translation functions * + ***********************************************************************/ + +#define TAG(x) r200_##x +#define IND ~0 +#include "tnl_dd/t_dd_vb.c" +#undef IND + + +/*********************************************************************** + * Generate vertex emit and interp functions * + ***********************************************************************/ + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT) +#define TAG(x) x##_wg +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT|R200_TEX0_BIT) +#define TAG(x) x##_wgt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT|R200_TEX0_BIT|R200_PTEX_BIT) +#define TAG(x) x##_wgpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT|R200_TEX0_BIT|R200_TEX1_BIT) +#define TAG(x) x##_wgt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT|R200_TEX0_BIT|R200_TEX1_BIT|\ + R200_PTEX_BIT) +#define TAG(x) x##_wgpt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT|R200_SPEC_BIT) +#define TAG(x) x##_wgfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT|R200_SPEC_BIT|\ + R200_TEX0_BIT) +#define TAG(x) x##_wgfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT|R200_SPEC_BIT|\ + R200_TEX0_BIT|R200_PTEX_BIT) +#define TAG(x) x##_wgfspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT|R200_SPEC_BIT|\ + R200_TEX0_BIT|R200_TEX1_BIT) +#define TAG(x) x##_wgfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (R200_XYZW_BIT|R200_RGBA_BIT|R200_SPEC_BIT|\ + R200_TEX0_BIT|R200_TEX1_BIT|R200_PTEX_BIT) +#define TAG(x) x##_wgfspt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + + +/*********************************************************************** + * Initialization + ***********************************************************************/ + +static void init_setup_tab( void ) +{ + init_wg(); + init_wgt0(); + init_wgpt0(); + init_wgt0t1(); + init_wgpt0t1(); + init_wgfs(); + init_wgfst0(); + init_wgfspt0(); + init_wgfst0t1(); + init_wgfspt0t1(); +} + + + +void r200PrintSetupFlags(char *msg, GLuint flags ) +{ + fprintf(stderr, "%s(%x): %s%s%s%s%s%s\n", + msg, + (int)flags, + (flags & R200_XYZW_BIT) ? " xyzw," : "", + (flags & R200_RGBA_BIT) ? " rgba," : "", + (flags & R200_SPEC_BIT) ? " spec/fog," : "", + (flags & R200_TEX0_BIT) ? " tex-0," : "", + (flags & R200_TEX1_BIT) ? " tex-1," : "", + (flags & R200_PTEX_BIT) ? " proj-tex," : ""); +} + + + +static void r200SetVertexFormat( GLcontext *ctx, GLuint ind ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + TNLcontext *tnl = TNL_CONTEXT(ctx); + + rmesa->swtcl.SetupIndex = ind; + + if (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED)) { + tnl->Driver.Render.Interp = r200_interp_extras; + tnl->Driver.Render.CopyPV = r200_copy_pv_extras; + } + else { + tnl->Driver.Render.Interp = setup_tab[ind].interp; + tnl->Driver.Render.CopyPV = setup_tab[ind].copy_pv; + } + + if (setup_tab[ind].vertex_format != rmesa->swtcl.vertex_format) { + int i; + R200_NEWPRIM(rmesa); + i = rmesa->swtcl.vertex_format = setup_tab[ind].vertex_format; + rmesa->swtcl.vertex_size = setup_tab[ind].vertex_size; + rmesa->swtcl.vertex_stride_shift = setup_tab[ind].vertex_stride_shift; + + R200_STATECHANGE( rmesa, vtx ); + rmesa->hw.vtx.cmd[VTX_VTXFMT_0] = se_vtx_fmt_0[i]; + rmesa->hw.vtx.cmd[VTX_VTXFMT_1] = se_vtx_fmt_1[i]; + } + + { + GLuint vte = rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL]; + GLuint vap = rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL]; + GLuint needproj; + + /* HW perspective divide is a win, but tiny vertex formats are a + * bigger one. + */ + if (setup_tab[ind].vertex_format == TINY_VERTEX_FORMAT || + (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { + needproj = GL_TRUE; + vte |= R200_VTX_XY_FMT | R200_VTX_Z_FMT; + vte &= ~R200_VTX_W0_FMT; + vap |= R200_VAP_FORCE_W_TO_ONE; + } + else { + needproj = GL_FALSE; + vte &= ~(R200_VTX_XY_FMT | R200_VTX_Z_FMT); + vte |= R200_VTX_W0_FMT; + vap &= ~R200_VAP_FORCE_W_TO_ONE; + } + + _tnl_need_projected_coords( ctx, needproj ); + if (vte != rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL]) { + R200_STATECHANGE( rmesa, vte ); + rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] = vte; + } + if (vap != rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL]) { + R200_STATECHANGE( rmesa, vap ); + rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] = vap; + } + } +} + +static void r200RenderStart( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + if (!setup_tab[rmesa->swtcl.SetupIndex].check_tex_sizes(ctx)) { + r200SetVertexFormat( ctx, rmesa->swtcl.SetupIndex | R200_PTEX_BIT); + } + + if (rmesa->dma.flush != 0 && + rmesa->dma.flush != flush_last_swtcl_prim) + rmesa->dma.flush( rmesa ); +} + + +void r200BuildVertices( GLcontext *ctx, GLuint start, GLuint count, + GLuint newinputs ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + GLubyte *v = ((GLubyte *)rmesa->swtcl.verts + + (start << rmesa->swtcl.vertex_stride_shift)); + GLuint stride = 1 << rmesa->swtcl.vertex_stride_shift; + + newinputs |= rmesa->swtcl.SetupNewInputs; + rmesa->swtcl.SetupNewInputs = 0; + + if (!newinputs) + return; + + setup_tab[rmesa->swtcl.SetupIndex].emit( ctx, start, count, v, stride ); +} + + +void r200ChooseVertexState( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + GLuint ind = (R200_XYZW_BIT | R200_RGBA_BIT); + + if (!rmesa->TclFallback || rmesa->Fallback) + return; + + if (ctx->Fog.Enabled || (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)) + ind |= R200_SPEC_BIT; + + if (ctx->Texture._ReallyEnabled & TEXTURE1_ANY) + ind |= R200_TEX0_BIT|R200_TEX1_BIT; + else if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) + ind |= R200_TEX0_BIT; + + r200SetVertexFormat( ctx, ind ); +} + + +/* Flush vertices in the current dma region. + */ +static void flush_last_swtcl_prim( r200ContextPtr rmesa ) +{ + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->dma.current.buf) { + struct r200_dma_region *current = &rmesa->dma.current; + GLuint current_offset = (rmesa->r200Screen->agp_buffer_offset + + current->buf->buf->idx * RADEON_BUFFER_SIZE + + current->start); + + assert (!(rmesa->swtcl.hw_primitive & R200_VF_PRIM_WALK_IND)); + + assert (current->start + + rmesa->swtcl.numverts * rmesa->swtcl.vertex_size * 4 == + current->ptr); + + if (rmesa->dma.current.start != rmesa->dma.current.ptr) { + r200EmitVertexAOS( rmesa, + rmesa->swtcl.vertex_size, + current_offset); + + r200EmitVbufPrim( rmesa, + rmesa->swtcl.hw_primitive, + rmesa->swtcl.numverts); + } + + rmesa->swtcl.numverts = 0; + current->start = current->ptr; + + rmesa->dma.flush = 0; + } +} + + +/* Alloc space in the current dma region. + */ +static __inline void *r200AllocDmaLowVerts( r200ContextPtr rmesa, + int nverts, int vsize ) +{ + GLuint bytes = vsize * nverts; + + if ( rmesa->dma.current.ptr + bytes > rmesa->dma.current.end ) + r200RefillCurrentDmaRegion( rmesa ); + + if (!rmesa->dma.flush) { + rmesa->dma.flush = flush_last_swtcl_prim; + } + + ASSERT( vsize == rmesa->swtcl.vertex_size * 4 ); + ASSERT( rmesa->dma.flush == flush_last_swtcl_prim ); + ASSERT( rmesa->dma.current.start + + rmesa->swtcl.numverts * rmesa->swtcl.vertex_size * 4 == + rmesa->dma.current.ptr ); + + + { + GLubyte *head = rmesa->dma.current.address + rmesa->dma.current.ptr; + rmesa->dma.current.ptr += bytes; + rmesa->swtcl.numverts += nverts; + return head; + } + +} + + + + +void r200_emit_contiguous_verts( GLcontext *ctx, GLuint start, GLuint count ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint vertex_size = rmesa->swtcl.vertex_size * 4; + CARD32 *dest = r200AllocDmaLowVerts( rmesa, count-start, vertex_size ); + setup_tab[rmesa->swtcl.SetupIndex].emit( ctx, start, count, dest, + vertex_size ); +} + + + +void r200_emit_indexed_verts( GLcontext *ctx, GLuint start, GLuint count ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + r200AllocDmaRegionVerts( rmesa, + &rmesa->swtcl.indexed_verts, + count - start, + rmesa->swtcl.vertex_size * 4, + 64); + + setup_tab[rmesa->swtcl.SetupIndex].emit( + ctx, start, count, + rmesa->swtcl.indexed_verts.address + rmesa->swtcl.indexed_verts.start, + rmesa->swtcl.vertex_size * 4 ); +} + + +/* + * Render unclipped vertex buffers by emitting vertices directly to + * dma buffers. Use strip/fan hardware primitives where possible. + * Try to simulate missing primitives with indexed vertices. + */ +#define HAVE_POINTS 1 +#define HAVE_LINES 1 +#define HAVE_LINE_STRIPS 1 +#define HAVE_TRIANGLES 1 +#define HAVE_TRI_STRIPS 1 +#define HAVE_TRI_STRIP_1 0 +#define HAVE_TRI_FANS 1 +#define HAVE_QUADS 1 +#define HAVE_QUAD_STRIPS 1 +#define HAVE_POLYGONS 1 +#define HAVE_ELTS 1 + +static const GLuint hw_prim[GL_POLYGON+1] = { + R200_VF_PRIM_POINTS, + R200_VF_PRIM_LINES, + 0, + R200_VF_PRIM_LINE_STRIP, + R200_VF_PRIM_TRIANGLES, + R200_VF_PRIM_TRIANGLE_STRIP, + R200_VF_PRIM_TRIANGLE_FAN, + R200_VF_PRIM_QUADS, + R200_VF_PRIM_QUAD_STRIP, + R200_VF_PRIM_POLYGON +}; + +static __inline void r200DmaPrimitive( r200ContextPtr rmesa, GLenum prim ) +{ + R200_NEWPRIM( rmesa ); + rmesa->swtcl.hw_primitive = hw_prim[prim]; + assert(rmesa->dma.current.ptr == rmesa->dma.current.start); +} + +static __inline void r200EltPrimitive( r200ContextPtr rmesa, GLenum prim ) +{ + R200_NEWPRIM( rmesa ); + rmesa->swtcl.hw_primitive = hw_prim[prim] | R200_VF_PRIM_WALK_IND; +} + + +static void VERT_FALLBACK( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.PrimitiveNotify( ctx, flags & PRIM_MODE_MASK ); + tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 ); + tnl->Driver.Render.PrimTabVerts[flags&PRIM_MODE_MASK]( ctx, start, count, flags ); + R200_CONTEXT(ctx)->swtcl.SetupNewInputs = VERT_CLIP; +} + +static void ELT_FALLBACK( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.PrimitiveNotify( ctx, flags & PRIM_MODE_MASK ); + tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 ); + tnl->Driver.Render.PrimTabElts[flags&PRIM_MODE_MASK]( ctx, start, count, flags ); + R200_CONTEXT(ctx)->swtcl.SetupNewInputs = VERT_CLIP; +} + + +#define LOCAL_VARS r200ContextPtr rmesa = R200_CONTEXT(ctx) +#define ELTS_VARS GLushort *dest +#define INIT( prim ) r200DmaPrimitive( rmesa, prim ) +#define ELT_INIT(prim) r200EltPrimitive( rmesa, prim ) +#define NEW_PRIMITIVE() R200_NEWPRIM( rmesa ) +#define NEW_BUFFER() r200RefillCurrentDmaRegion( rmesa ) +#define GET_CURRENT_VB_MAX_VERTS() \ + (((int)rmesa->dma.current.end - (int)rmesa->dma.current.ptr) / (rmesa->swtcl.vertex_size*4)) +#define GET_SUBSEQUENT_VB_MAX_VERTS() \ + ((RADEON_BUFFER_SIZE) / (rmesa->swtcl.vertex_size*4)) + +#define GET_CURRENT_VB_MAX_ELTS() \ + ((R200_CMD_BUF_SZ - (rmesa->store.cmd_used + 16)) / 2) +#define GET_SUBSEQUENT_VB_MAX_ELTS() \ + ((R200_CMD_BUF_SZ - 1024) / 2) + + + +/* How do you extend an existing primitive? + */ +#define ALLOC_ELTS(nr) \ +do { \ + if (rmesa->dma.flush == r200FlushElts && \ + rmesa->store.cmd_used + nr*2 < R200_CMD_BUF_SZ) { \ + \ + dest = (GLushort *)(rmesa->store.cmd_buf + \ + rmesa->store.cmd_used); \ + rmesa->store.cmd_used += nr*2; \ + } \ + else { \ + if (rmesa->dma.flush) { \ + rmesa->dma.flush( rmesa ); \ + } \ + \ + r200EmitVertexAOS( rmesa, \ + rmesa->swtcl.vertex_size, \ + (rmesa->r200Screen->agp_buffer_offset + \ + rmesa->swtcl.indexed_verts.buf->buf->idx * \ + RADEON_BUFFER_SIZE + \ + rmesa->swtcl.indexed_verts.start)); \ + \ + dest = r200AllocEltsOpenEnded( rmesa, \ + rmesa->swtcl.hw_primitive, \ + nr ); \ + } \ +} while (0) + +#define ALLOC_ELTS_NEW_PRIMITIVE(nr) ALLOC_ELTS( nr ) + +#ifdef MESA_BIG_ENDIAN +/* We could do without (most of) this ugliness if dest was always 32 bit word aligned... */ +#define EMIT_ELT(offset, x) do { \ + int off = offset + ( ( (GLuint)dest & 0x2 ) >> 1 ); \ + GLushort *des = (GLushort *)( (GLuint)dest & ~0x2 ); \ + (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x); } while (0) +#else +#define EMIT_ELT(offset, x) (dest)[offset] = (GLushort) (x) +#endif +#define EMIT_TWO_ELTS(offset, x, y) *(GLuint *)(dest+offset) = ((y)<<16)|(x); +#define INCR_ELTS( nr ) dest += nr +#define RELEASE_ELT_VERTS() \ + r200ReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts, __FUNCTION__ ) +#define EMIT_VERTS( ctx, j, nr ) \ + r200_emit_contiguous_verts(ctx, j, (j)+(nr)) +#define EMIT_INDEXED_VERTS( ctx, start, count ) \ + r200_emit_indexed_verts( ctx, start, count ) + + +#define TAG(x) r200_dma_##x +#include "tnl_dd/t_dd_dmatmp.h" + + +/**********************************************************************/ +/* Render pipeline stage */ +/**********************************************************************/ + + +static GLboolean r200_run_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint i, length, flags = 0; + render_func *tab = TAG(render_tab_verts); + + if (rmesa->swtcl.indexed_verts.buf && (!VB->Elts || stage->changed_inputs)) + RELEASE_ELT_VERTS(); + + + + if ((R200_DEBUG & DEBUG_VERTS) || /* No debug */ + VB->ClipOrMask || /* No clipping */ + rmesa->swtcl.RenderIndex != 0 || /* No per-vertex manipulations */ + ctx->Line.StippleFlag) /* No stipple -- fix me? */ + return GL_TRUE; + + if (VB->Elts) { + tab = TAG(render_tab_elts); + if (!rmesa->swtcl.indexed_verts.buf) + if (!TAG(emit_elt_verts)(ctx, 0, VB->Count)) + return GL_TRUE; /* too many vertices */ + } + + tnl->Driver.Render.Start( ctx ); + + for (i = 0 ; !(flags & PRIM_LAST) ; i += length) + { + flags = VB->Primitive[i]; + length = VB->PrimitiveLength[i]; + + if (R200_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "r200_render.c: prim %s %d..%d\n", + _mesa_lookup_enum_by_nr(flags & PRIM_MODE_MASK), + i, i+length); + + if (length) + tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags ); + } + + tnl->Driver.Render.Finish( ctx ); + + return GL_FALSE; /* finished the pipe */ +} + + + +static void r200_check_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + GLuint inputs = VERT_OBJ|VERT_CLIP|VERT_RGBA; + + if (ctx->RenderMode == GL_RENDER) { + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + inputs |= VERT_SPEC_RGB; + + if (ctx->Texture.Unit[0]._ReallyEnabled) + inputs |= VERT_TEX(0); + + if (ctx->Texture.Unit[1]._ReallyEnabled) + inputs |= VERT_TEX(1); + + if (ctx->Fog.Enabled) + inputs |= VERT_FOG_COORD; + } + + stage->inputs = inputs; +} + + +static void dtr( struct gl_pipeline_stage *stage ) +{ + (void)stage; +} + + +const struct gl_pipeline_stage _r200_render_stage = +{ + "r200 render", + (_DD_NEW_SEPARATE_SPECULAR | + _NEW_TEXTURE| + _NEW_FOG| + _NEW_RENDERMODE), /* re-check (new inputs) */ + 0, /* re-run (always runs) */ + GL_TRUE, /* active */ + 0, 0, /* inputs (set in check_render), outputs */ + 0, 0, /* changed_inputs, private */ + dtr, /* destructor */ + r200_check_render, /* check - initially set to alloc data */ + r200_run_render /* run */ +}; + + + +/**************************************************************************/ + + +static const GLuint reduced_hw_prim[GL_POLYGON+1] = { + R200_VF_PRIM_POINTS, + R200_VF_PRIM_LINES, + R200_VF_PRIM_LINES, + R200_VF_PRIM_LINES, + R200_VF_PRIM_TRIANGLES, + R200_VF_PRIM_TRIANGLES, + R200_VF_PRIM_TRIANGLES, + R200_VF_PRIM_TRIANGLES, + R200_VF_PRIM_TRIANGLES, + R200_VF_PRIM_TRIANGLES +}; + +static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim ); +static void r200RenderPrimitive( GLcontext *ctx, GLenum prim ); +static void r200ResetLineStipple( GLcontext *ctx ); + +#undef HAVE_QUADS +#define HAVE_QUADS 0 + +#undef HAVE_QUAD_STRIPS +#define HAVE_QUAD_STRIPS 0 + +/*********************************************************************** + * Emit primitives as inline vertices * + ***********************************************************************/ + +#undef LOCAL_VARS +#define CTX_ARG r200ContextPtr rmesa +#define CTX_ARG2 rmesa +#define GET_VERTEX_DWORDS() rmesa->swtcl.vertex_size +#define ALLOC_VERTS( n, size ) r200AllocDmaLowVerts( rmesa, n, size * 4 ) +#define LOCAL_VARS \ + r200ContextPtr rmesa = R200_CONTEXT(ctx); \ + const GLuint shift = rmesa->swtcl.vertex_stride_shift; \ + const char *r200verts = (char *)rmesa->swtcl.verts; +#define VERT(x) (r200Vertex *)(r200verts + (x << shift)) +#define VERTEX r200Vertex +#define DO_DEBUG_VERTS (1 && (R200_DEBUG & DEBUG_VERTS)) +#define PRINT_VERTEX(v) r200_print_vertex(rmesa->glCtx, v) +#undef TAG +#define TAG(x) r200_##x +#include "tnl_dd/t_dd_triemit.h" + + +/*********************************************************************** + * Macros for t_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define QUAD( a, b, c, d ) r200_quad( rmesa, a, b, c, d ) +#define TRI( a, b, c ) r200_triangle( rmesa, a, b, c ) +#define LINE( a, b ) r200_line( rmesa, a, b ) +#define POINT( a ) r200_point( rmesa, a ) + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define R200_TWOSIDE_BIT 0x01 +#define R200_UNFILLED_BIT 0x02 +#define R200_MAX_TRIFUNC 0x04 + + +static struct { + points_func points; + line_func line; + triangle_func triangle; + quad_func quad; +} rast_tab[R200_MAX_TRIFUNC]; + + +#define DO_FALLBACK 0 +#define DO_UNFILLED (IND & R200_UNFILLED_BIT) +#define DO_TWOSIDE (IND & R200_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_OFFSET 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 1 +#define HAVE_INDEX 0 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define TAB rast_tab + +#define DEPTH_SCALE 1.0 +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW( a ) (a < 0) +#define GET_VERTEX(e) (rmesa->swtcl.verts + (e<swtcl.vertex_stride_shift)) + +#define VERT_SET_RGBA( v, c ) v->ui[coloroffset] = LE32_TO_CPU(*(GLuint *)c) +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] +#define VERT_SAVE_RGBA( idx ) color[idx] = CPU_TO_LE32(v[idx]->ui[coloroffset]) +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = LE32_TO_CPU(color[idx]) + +#define VERT_SET_SPEC( v0, c ) if (havespec) { \ + v0->v.specular.red = (c)[0]; \ + v0->v.specular.green = (c)[1]; \ + v0->v.specular.blue = (c)[2]; } +#define VERT_COPY_SPEC( v0, v1 ) if (havespec) { \ + v0->v.specular.red = v1->v.specular.red; \ + v0->v.specular.green = v1->v.specular.green; \ + v0->v.specular.blue = v1->v.specular.blue; } +#define VERT_SAVE_SPEC( idx ) if (havespec) spec[idx] = CPU_TO_LE32(v[idx]->ui[5]) +#define VERT_RESTORE_SPEC( idx ) if (havespec) v[idx]->ui[5] = LE32_TO_CPU(spec[idx]) + +#undef LOCAL_VARS +#undef TAG +#undef INIT + +#define LOCAL_VARS(n) \ + r200ContextPtr rmesa = R200_CONTEXT(ctx); \ + GLuint color[n], spec[n]; \ + GLuint coloroffset = (rmesa->swtcl.vertex_size == 4 ? 3 : 4); \ + GLboolean havespec = (rmesa->swtcl.vertex_size > 4); \ + (void) color; (void) spec; (void) coloroffset; (void) havespec; + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +#define RASTERIZE(x) r200RasterPrimitive( ctx, reduced_hw_prim[x] ) +#define RENDER_PRIMITIVE rmesa->swtcl.render_primitive +#define TAG(x) x +#include "tnl_dd/t_dd_unfilled.h" +#undef IND + + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ + + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R200_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R200_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (R200_TWOSIDE_BIT|R200_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab( void ) +{ + init(); + init_twoside(); + init_unfilled(); + init_twoside_unfilled(); +} + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ + +#define VERT(x) (r200Vertex *)(r200verts + (x << shift)) +#define RENDER_POINTS( start, count ) \ + for ( ; start < count ; start++) \ + r200_point( rmesa, VERT(start) ) +#define RENDER_LINE( v0, v1 ) \ + r200_line( rmesa, VERT(v0), VERT(v1) ) +#define RENDER_TRI( v0, v1, v2 ) \ + r200_triangle( rmesa, VERT(v0), VERT(v1), VERT(v2) ) +#define RENDER_QUAD( v0, v1, v2, v3 ) \ + r200_quad( rmesa, VERT(v0), VERT(v1), VERT(v2), VERT(v3) ) +#define INIT(x) do { \ + r200RenderPrimitive( ctx, x ); \ +} while (0) +#undef LOCAL_VARS +#define LOCAL_VARS \ + r200ContextPtr rmesa = R200_CONTEXT(ctx); \ + const GLuint shift = rmesa->swtcl.vertex_stride_shift; \ + const char *r200verts = (char *)rmesa->swtcl.verts; \ + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ + const GLboolean stipple = ctx->Line.StippleFlag; \ + (void) elt; (void) stipple; +#define RESET_STIPPLE if ( stipple ) r200ResetLineStipple( ctx ); +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) (x) +#define TAG(x) r200_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) r200_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" + + + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + +void r200ChooseRenderState( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint index = 0; + GLuint flags = ctx->_TriangleCaps; + + if (!rmesa->TclFallback || rmesa->Fallback) + return; + + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= R200_TWOSIDE_BIT; + if (flags & DD_TRI_UNFILLED) index |= R200_UNFILLED_BIT; + + if (index != rmesa->swtcl.RenderIndex) { + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.ClippedLine = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = r200_render_tab_verts; + tnl->Driver.Render.PrimTabElts = r200_render_tab_elts; + tnl->Driver.Render.ClippedPolygon = r200_fast_clipped_poly; + } else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedPolygon = _tnl_RenderClippedPolygon; + } + + rmesa->swtcl.RenderIndex = index; + } +} + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + +static void r200RasterPrimitive( GLcontext *ctx, GLuint hwprim ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (rmesa->swtcl.hw_primitive != hwprim) { + R200_NEWPRIM( rmesa ); + rmesa->swtcl.hw_primitive = hwprim; + } +} + +static void r200RenderPrimitive( GLcontext *ctx, GLenum prim ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + rmesa->swtcl.render_primitive = prim; + if (prim < GL_TRIANGLES || !(ctx->_TriangleCaps & DD_TRI_UNFILLED)) + r200RasterPrimitive( ctx, reduced_hw_prim[prim] ); +} + +static void r200RenderFinish( GLcontext *ctx ) +{ +} + +static void r200ResetLineStipple( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + R200_STATECHANGE( rmesa, lin ); +} + + +/**********************************************************************/ +/* Transition to/from hardware rasterization. */ +/**********************************************************************/ + +static char *fallbackStrings[] = { + "Texture mode", + "glDrawBuffer(GL_FRONT_AND_BACK)", + "glEnable(GL_STENCIL) without hw stencil buffer", + "glRenderMode(selection or feedback)", + "glBlendEquation", + "glBlendFunc(mode != ADD)" + "R200_NO_RAST" +}; + + +static char *getFallbackString(GLuint bit) +{ + int i = 0; + while (bit > 1) { + i++; + bit >>= 1; + } + return fallbackStrings[i]; +} + + +void r200Fallback( GLcontext *ctx, GLuint bit, GLboolean mode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint oldfallback = rmesa->Fallback; + + if (mode) { + rmesa->Fallback |= bit; + if (oldfallback == 0) { + R200_FIREVERTICES( rmesa ); + TCL_FALLBACK( ctx, R200_TCL_FALLBACK_RASTER, GL_TRUE ); + _swsetup_Wakeup( ctx ); + _tnl_need_projected_coords( ctx, GL_TRUE ); + rmesa->swtcl.RenderIndex = ~0; + if (R200_DEBUG & DEBUG_FALLBACKS) { + fprintf(stderr, "R200 begin rasterization fallback: 0x%x %s\n", + bit, getFallbackString(bit)); + } + } + } + else { + rmesa->Fallback &= ~bit; + if (oldfallback == bit) { + _swrast_flush( ctx ); + tnl->Driver.Render.Start = r200RenderStart; + tnl->Driver.Render.PrimitiveNotify = r200RenderPrimitive; + tnl->Driver.Render.Finish = r200RenderFinish; + tnl->Driver.Render.BuildVertices = r200BuildVertices; + tnl->Driver.Render.ResetLineStipple = r200ResetLineStipple; + TCL_FALLBACK( ctx, R200_TCL_FALLBACK_RASTER, GL_FALSE ); + if (rmesa->TclFallback) { + /* These are already done if rmesa->TclFallback goes to + * zero above. But not if it doesn't (R200_NO_TCL for + * example?) + */ + r200ChooseVertexState( ctx ); + r200ChooseRenderState( ctx ); + } + if (R200_DEBUG & DEBUG_FALLBACKS) { + fprintf(stderr, "R200 end rasterization fallback: 0x%x %s\n", + bit, getFallbackString(bit)); + } + } + } +} + + + + +/* Cope with depth operations by drawing individual pixels as points??? + */ +void +r200PointsBitmap( GLcontext *ctx, GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + const GLfloat *rc = ctx->Current.RasterColor; + GLint row, col; + r200Vertex vert; + GLuint orig_vte; + GLuint h; + + + /* Turn off tcl. + */ + TCL_FALLBACK( ctx, R200_TCL_FALLBACK_BITMAP, 1 ); + + /* Choose tiny vertex format + */ + r200SetVertexFormat( ctx, R200_XYZW_BIT | R200_RGBA_BIT ); + + /* Ready for point primitives: + */ + r200RenderPrimitive( ctx, GL_POINTS ); + + /* Turn off the hw viewport transformation: + */ + R200_STATECHANGE( rmesa, vte ); + orig_vte = rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL]; + rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] &= ~(R200_VPORT_X_SCALE_ENA | + R200_VPORT_Y_SCALE_ENA | + R200_VPORT_Z_SCALE_ENA | + R200_VPORT_X_OFFSET_ENA | + R200_VPORT_Y_OFFSET_ENA | + R200_VPORT_Z_OFFSET_ENA); + + /* Turn off other stuff: Stipple?, texture?, blending?, etc. + */ + + + /* Populate the vertex + * + * Incorporate FOG into RGBA + */ + if (ctx->Fog.Enabled) { + const GLfloat *fc = ctx->Fog.Color; + GLfloat color[4]; + GLfloat f; + + if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) + f = _mesa_z_to_fogfactor(ctx, ctx->Current.FogCoord); + else + f = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterDistance); + + color[0] = f * rc[0] + (1.F - f) * fc[0]; + color[1] = f * rc[1] + (1.F - f) * fc[1]; + color[2] = f * rc[2] + (1.F - f) * fc[2]; + color[3] = rc[3]; + + UNCLAMPED_FLOAT_TO_CHAN(vert.tv.color.red, color[0]); + UNCLAMPED_FLOAT_TO_CHAN(vert.tv.color.green, color[1]); + UNCLAMPED_FLOAT_TO_CHAN(vert.tv.color.blue, color[2]); + UNCLAMPED_FLOAT_TO_CHAN(vert.tv.color.alpha, color[3]); + } + else { + UNCLAMPED_FLOAT_TO_CHAN(vert.tv.color.red, rc[0]); + UNCLAMPED_FLOAT_TO_CHAN(vert.tv.color.green, rc[1]); + UNCLAMPED_FLOAT_TO_CHAN(vert.tv.color.blue, rc[2]); + UNCLAMPED_FLOAT_TO_CHAN(vert.tv.color.alpha, rc[3]); + } + + + vert.tv.z = ctx->Current.RasterPos[2]; + + + /* Update window height + */ + LOCK_HARDWARE( rmesa ); + UNLOCK_HARDWARE( rmesa ); + h = rmesa->dri.drawable->h + rmesa->dri.drawable->y; + px += rmesa->dri.drawable->x; + + /* Clipping handled by existing mechansims in r200_ioctl.c? + */ + for (row=0; rowLsbFirst) { + /* Lsb first */ + GLubyte mask = 1U << (unpack->SkipPixels & 0x7); + for (col=0; col> 7); + mask = ((mask << 1) & 0xff) | (mask >> 7); + } + + /* get ready for next row */ + if (mask != 1) + src++; + } + else { + /* Msb first */ + GLubyte mask = 128U >> (unpack->SkipPixels & 0x7); + for (col=0; col> 1); + } + /* get ready for next row */ + if (mask != 128) + src++; + } + } + + /* Fire outstanding vertices, restore state + */ + R200_STATECHANGE( rmesa, vte ); + rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] = orig_vte; + + /* Unfallback + */ + TCL_FALLBACK( ctx, R200_TCL_FALLBACK_BITMAP, 0 ); + + /* Need to restore vertexformat? + */ + if (rmesa->TclFallback) + r200ChooseVertexState( ctx ); +} + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + +void r200InitSwtcl( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint size = TNL_CONTEXT(ctx)->vb.Size; + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + init_setup_tab(); + firsttime = 0; + } + + tnl->Driver.Render.Start = r200RenderStart; + tnl->Driver.Render.Finish = r200RenderFinish; + tnl->Driver.Render.PrimitiveNotify = r200RenderPrimitive; + tnl->Driver.Render.ResetLineStipple = r200ResetLineStipple; + tnl->Driver.Render.BuildVertices = r200BuildVertices; + + rmesa->swtcl.verts = (char *)ALIGN_MALLOC( size * 16 * 4, 32 ); + rmesa->swtcl.RenderIndex = ~0; + rmesa->swtcl.render_primitive = GL_TRIANGLES; + rmesa->swtcl.hw_primitive = 0; +} + + +void r200DestroySwtcl( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (rmesa->swtcl.indexed_verts.buf) + r200ReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts, __FUNCTION__ ); + + if (rmesa->swtcl.verts) { + ALIGN_FREE(rmesa->swtcl.verts); + rmesa->swtcl.verts = 0; + } + + if (rmesa->UbyteSecondaryColor.Ptr) { + ALIGN_FREE(rmesa->UbyteSecondaryColor.Ptr); + rmesa->UbyteSecondaryColor.Ptr = 0; + } + + if (rmesa->UbyteColor.Ptr) { + ALIGN_FREE(rmesa->UbyteColor.Ptr); + rmesa->UbyteColor.Ptr = 0; + } +} Index: xc/lib/GL/mesa/src/drv/r200/r200_swtcl.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_swtcl.h:1.2 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_swtcl.h Mon Dec 16 11:18:55 2002 @@ -0,0 +1,79 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_swtcl.h,v 1.2 2002/12/16 16:18:55 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_SWTCL_H__ +#define __R200_SWTCL_H__ + +#include "mtypes.h" +#include "swrast/swrast.h" +#include "r200_context.h" + +extern void r200InitSwtcl( GLcontext *ctx ); +extern void r200DestroySwtcl( GLcontext *ctx ); + +extern void r200ChooseRenderState( GLcontext *ctx ); +extern void r200ChooseVertexState( GLcontext *ctx ); + +extern void r200CheckTexSizes( GLcontext *ctx ); + +extern void r200BuildVertices( GLcontext *ctx, GLuint start, GLuint count, + GLuint newinputs ); + +extern void r200PrintSetupFlags(char *msg, GLuint flags ); + + +extern void r200_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ); + +extern void r200_emit_indexed_verts( GLcontext *ctx, + GLuint start, + GLuint count ); + +extern void r200_translate_vertex( GLcontext *ctx, + const r200Vertex *src, + SWvertex *dst ); + +extern void r200_print_vertex( GLcontext *ctx, const r200Vertex *v ); + +extern void r200_import_float_colors( GLcontext *ctx ); +extern void r200_import_float_spec_colors( GLcontext *ctx ); + +extern void r200PointsBitmap( GLcontext *ctx, GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ); + + +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_tcl.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_tcl.c:1.2 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_tcl.c Mon Dec 16 11:18:55 2002 @@ -0,0 +1,553 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_tcl.c,v 1.2 2002/12/16 16:18:55 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_state.h" +#include "r200_ioctl.h" +#include "r200_tex.h" +#include "r200_tcl.h" +#include "r200_swtcl.h" +#include "r200_maos.h" + +#include "mmath.h" +#include "mtypes.h" +#include "enums.h" +#include "colormac.h" +#include "light.h" + +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" + + + +#define HAVE_POINTS 1 +#define HAVE_LINES 1 +#define HAVE_LINE_LOOP 0 +#define HAVE_LINE_STRIPS 1 +#define HAVE_TRIANGLES 1 +#define HAVE_TRI_STRIPS 1 +#define HAVE_TRI_STRIP_1 0 +#define HAVE_TRI_FANS 1 +#define HAVE_QUADS 0 /* hw quad verts in wrong order??? */ +#define HAVE_QUAD_STRIPS 1 +#define HAVE_POLYGONS 1 +#define HAVE_ELTS 1 + + +#define HW_POINTS R200_VF_PRIM_POINTS +#define HW_LINES R200_VF_PRIM_LINES +#define HW_LINE_LOOP 0 +#define HW_LINE_STRIP R200_VF_PRIM_LINE_STRIP +#define HW_TRIANGLES R200_VF_PRIM_TRIANGLES +#define HW_TRIANGLE_STRIP_0 R200_VF_PRIM_TRIANGLE_STRIP +#define HW_TRIANGLE_STRIP_1 0 +#define HW_TRIANGLE_FAN R200_VF_PRIM_TRIANGLE_FAN +#define HW_QUADS R200_VF_PRIM_QUADS +#define HW_QUAD_STRIP R200_VF_PRIM_QUAD_STRIP +#define HW_POLYGON R200_VF_PRIM_POLYGON + + +static GLboolean discrete_prim[0x10] = { + 0, /* 0 none */ + 1, /* 1 points */ + 1, /* 2 lines */ + 0, /* 3 line_strip */ + 1, /* 4 tri_list */ + 0, /* 5 tri_fan */ + 0, /* 6 tri_strip */ + 0, /* 7 tri_w_flags */ + 1, /* 8 rect list (unused) */ + 1, /* 9 3vert point */ + 1, /* a 3vert line */ + 0, /* b point sprite */ + 0, /* c line loop */ + 1, /* d quads */ + 0, /* e quad strip */ + 0, /* f polygon */ +}; + + +#define LOCAL_VARS r200ContextPtr rmesa = R200_CONTEXT(ctx) +#define ELTS_VARS GLushort *dest + +#define ELT_INIT(prim, hw_prim) \ + r200TclPrimitive( ctx, prim, hw_prim | R200_VF_PRIM_WALK_IND ) + +#define GET_ELTS() rmesa->tcl.Elts + + +#define NEW_PRIMITIVE() R200_NEWPRIM( rmesa ) +#define NEW_BUFFER() r200RefillCurrentDmaRegion( rmesa ) + +/* Don't really know how many elts will fit in what's left of cmdbuf, + * as there is state to emit, etc: + */ + +#if 0 +#define GET_CURRENT_VB_MAX_ELTS() \ + ((R200_CMD_BUF_SZ - (rmesa->store.cmd_used + 16)) / 2) +#define GET_SUBSEQUENT_VB_MAX_ELTS() ((R200_CMD_BUF_SZ - 16) / 2) +#else +/* Testing on isosurf shows a maximum around here. Don't know if it's + * the card or driver or kernel module that is causing the behaviour. + */ +#define GET_CURRENT_VB_MAX_ELTS() 300 +#define GET_SUBSEQUENT_VB_MAX_ELTS() 300 +#endif + +#define RESET_STIPPLE() do { \ + R200_STATECHANGE( rmesa, lin ); \ + r200EmitState( rmesa ); \ +} while (0) + +#define AUTO_STIPPLE( mode ) do { \ + R200_STATECHANGE( rmesa, lin ); \ + if (mode) \ + rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] |= \ + R200_LINE_PATTERN_AUTO_RESET; \ + else \ + rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] &= \ + ~R200_LINE_PATTERN_AUTO_RESET; \ + r200EmitState( rmesa ); \ +} while (0) + + +/* How do you extend an existing primitive? + */ +#define ALLOC_ELTS(nr) \ +do { \ + if (rmesa->dma.flush == r200FlushElts && \ + rmesa->store.cmd_used + nr*2 < R200_CMD_BUF_SZ) { \ + \ + dest = (GLushort *)(rmesa->store.cmd_buf + \ + rmesa->store.cmd_used); \ + rmesa->store.cmd_used += nr*2; \ + } \ + else { \ + if (rmesa->dma.flush) \ + rmesa->dma.flush( rmesa ); \ + \ + r200EmitAOS( rmesa, \ + rmesa->tcl.aos_components, \ + rmesa->tcl.nr_aos_components, \ + 0 ); \ + \ + dest = r200AllocEltsOpenEnded( rmesa, \ + rmesa->tcl.hw_primitive, \ + nr ); \ + } \ +} while (0) + + + +/* TODO: Try to extend existing primitive if both are identical, + * discrete and there are no intervening state changes. (Somewhat + * duplicates changes to DrawArrays code) + */ +static void EMIT_PRIM( GLcontext *ctx, + GLenum prim, + GLuint hwprim, + GLuint start, + GLuint count) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + r200TclPrimitive( ctx, prim, hwprim ); + + r200EmitAOS( rmesa, + rmesa->tcl.aos_components, + rmesa->tcl.nr_aos_components, + start ); + + /* Why couldn't this packet have taken an offset param? + */ + r200EmitVbufPrim( rmesa, + rmesa->tcl.hw_primitive, + count - start ); +} + + + +/* Try & join small primitives + */ +#if 0 +#define PREFER_DISCRETE_ELT_PRIM( NR, PRIM ) 0 +#else +#define PREFER_DISCRETE_ELT_PRIM( NR, PRIM ) \ + ((NR) < 20 || \ + ((NR) < 40 && \ + rmesa->tcl.hw_primitive == (PRIM| \ + R200_VF_TCL_OUTPUT_VTX_ENABLE| \ + R200_VF_PRIM_WALK_IND))) +#endif + +#ifdef MESA_BIG_ENDIAN +/* We could do without (most of) this ugliness if dest was always 32 bit word aligned... */ +#define EMIT_ELT(offset, x) do { \ + int off = offset + ( ( (GLuint)dest & 0x2 ) >> 1 ); \ + GLushort *des = (GLushort *)( (GLuint)dest & ~0x2 ); \ + (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x); } while (0) +#else +#define EMIT_ELT(offset, x) (dest)[offset] = (GLushort) (x) +#endif +#define EMIT_TWO_ELTS(offset, x, y) *(GLuint *)(dest+offset) = ((y)<<16)|(x); +#define INCR_ELTS( nr ) dest += nr +#define RELEASE_ELT_VERTS() \ + r200ReleaseArrays( ctx, ~0 ) + + + +#define TAG(x) tcl_##x +#include "tnl_dd/t_dd_dmatmp2.h" + +/**********************************************************************/ +/* External entrypoints */ +/**********************************************************************/ + +void r200EmitPrimitive( GLcontext *ctx, + GLuint first, + GLuint last, + GLuint flags ) +{ + tcl_render_tab_verts[flags&PRIM_MODE_MASK]( ctx, first, last, flags ); +} + +void r200EmitEltPrimitive( GLcontext *ctx, + GLuint first, + GLuint last, + GLuint flags ) +{ + tcl_render_tab_elts[flags&PRIM_MODE_MASK]( ctx, first, last, flags ); +} + +void r200TclPrimitive( GLcontext *ctx, + GLenum prim, + int hw_prim ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint newprim = hw_prim | R200_VF_TCL_OUTPUT_VTX_ENABLE; + + if (newprim != rmesa->tcl.hw_primitive || + !discrete_prim[hw_prim&0xf]) { + R200_NEWPRIM( rmesa ); + rmesa->tcl.hw_primitive = newprim; + } +} + + +/**********************************************************************/ +/* Render pipeline stage */ +/**********************************************************************/ + + +/* TCL render. + */ +static GLboolean r200_run_tcl_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint i,flags = 0,length; + + /* TODO: separate this from the swtnl pipeline + */ + if (rmesa->TclFallback) + return GL_TRUE; /* fallback to software t&l */ + + if (R200_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (VB->Count == 0) + return GL_FALSE; + + r200ReleaseArrays( ctx, stage->changed_inputs ); + r200EmitArrays( ctx, stage->inputs ); + + rmesa->tcl.Elts = VB->Elts; + + for (i = VB->FirstPrimitive ; !(flags & PRIM_LAST) ; i += length) + { + flags = VB->Primitive[i]; + length = VB->PrimitiveLength[i]; + + if (R200_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "%s: prim %s %d..%d\n", + __FUNCTION__, + _mesa_lookup_enum_by_nr(flags & PRIM_MODE_MASK), + i, i+length); + + if (!length) + continue; + + if (rmesa->tcl.Elts) + r200EmitEltPrimitive( ctx, i, i+length, flags ); + else + r200EmitPrimitive( ctx, i, i+length, flags ); + } + + return GL_FALSE; /* finished the pipe */ +} + + + +static void r200_check_tcl_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint inputs = VERT_OBJ; + + /* Validate state: + */ + if (rmesa->NewGLState) + r200ValidateState( ctx ); + + if (0) + fprintf(stderr, "%s: RE %d TGE %d NN %d\n", + __FUNCTION__, + ctx->Texture.Unit[0]._ReallyEnabled, + ctx->Texture.Unit[0].TexGenEnabled, + rmesa->TexGenNeedNormals[0]); + + if (ctx->RenderMode == GL_RENDER) { + /* Make all this event-driven: + */ + if (ctx->Light.Enabled) { + inputs |= VERT_NORM; + + if (ctx->Light.ColorMaterialEnabled) { + inputs |= VERT_RGBA; + } + } + else { + inputs |= VERT_RGBA; + + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) { + inputs |= VERT_SPEC_RGB; + } + } + + if (ctx->Texture.Unit[0]._ReallyEnabled) { + if (ctx->Texture.Unit[0].TexGenEnabled) { + if (rmesa->TexGenNeedNormals[0]) { + inputs |= VERT_NORM; + } + } else { + inputs |= VERT_TEX(0); + } + } + + if (ctx->Texture.Unit[1]._ReallyEnabled) { + if (ctx->Texture.Unit[1].TexGenEnabled) { + if (rmesa->TexGenNeedNormals[1]) { + inputs |= VERT_NORM; + } + } else { + inputs |= VERT_TEX(1); + } + } + + stage->inputs = inputs; + stage->active = 1; + } + else + stage->active = 0; +} + +static void r200_init_tcl_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + stage->check = r200_check_tcl_render; + stage->check( ctx, stage ); +} + +static void dtr( struct gl_pipeline_stage *stage ) +{ + (void)stage; +} + + +/* Initial state for tcl stage. + */ +const struct gl_pipeline_stage _r200_tcl_stage = +{ + "r200 render", + (_DD_NEW_SEPARATE_SPECULAR | + _NEW_LIGHT| + _NEW_TEXTURE| + _NEW_FOG| + _NEW_RENDERMODE), /* re-check (new inputs) */ + 0, /* re-run (always runs) */ + GL_TRUE, /* active */ + 0, 0, /* inputs (set in check_render), outputs */ + 0, 0, /* changed_inputs, private */ + dtr, /* destructor */ + r200_init_tcl_render, /* check - initially set to alloc data */ + r200_run_tcl_render /* run */ +}; + + + +/**********************************************************************/ +/* Validate state at pipeline start */ +/**********************************************************************/ + + +/*----------------------------------------------------------------------- + * Manage TCL fallbacks + */ + + +static void transition_to_swtnl( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + + R200_NEWPRIM( rmesa ); + rmesa->swtcl.vertex_format = 0; + + r200ChooseVertexState( ctx ); + r200ChooseRenderState( ctx ); + + _mesa_validate_all_lighting_tables( ctx ); + + tnl->Driver.NotifyMaterialChange = + _mesa_validate_all_lighting_tables; + + r200ReleaseArrays( ctx, ~0 ); + + /* Still using the D3D based hardware-rasterizer from the radeon; + * need to put the card into D3D mode to make it work: + */ + R200_STATECHANGE( rmesa, vap ); + rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] &= ~R200_VAP_TCL_ENABLE; + rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] |= R200_VAP_D3D_TEX_DEFAULT; + + R200_STATECHANGE( rmesa, vte ); + rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] &= ~R200_VTX_W0_FMT; + + R200_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_RE_CNTL] |= (R200_VTX_STQ0_D3D | + R200_VTX_STQ1_D3D); +} + + +static void transition_to_hwtnl( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + + _tnl_need_projected_coords( ctx, GL_FALSE ); + + r200UpdateMaterial( ctx ); + + tnl->Driver.NotifyMaterialChange = r200UpdateMaterial; + + if ( rmesa->dma.flush ) + rmesa->dma.flush( rmesa ); + + rmesa->dma.flush = 0; + rmesa->swtcl.vertex_format = 0; + + if (rmesa->swtcl.indexed_verts.buf) + r200ReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts, + __FUNCTION__ ); + + R200_STATECHANGE( rmesa, vap ); + rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] |= R200_VAP_TCL_ENABLE; + rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] &= ~(R200_VAP_FORCE_W_TO_ONE | + R200_VAP_D3D_TEX_DEFAULT); + + R200_STATECHANGE( rmesa, vte ); + rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] &= ~(R200_VTX_XY_FMT|R200_VTX_Z_FMT); + rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] |= R200_VTX_W0_FMT; + + R200_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_RE_CNTL] &= ~(R200_VTX_STQ0_D3D | + R200_VTX_STQ1_D3D); + + + if (R200_DEBUG & DEBUG_FALLBACKS) + fprintf(stderr, "R200 end tcl fallback\n"); +} + + +static char *fallbackStrings[] = { + "Rasterization fallback", + "Unfilled triangles", + "Twosided lighting, differing materials", + "Materials in VB (maybe between begin/end)", + "Texgen unit 0", + "Texgen unit 1", + "Texgen unit 2", + "User disable" +}; + + +static char *getFallbackString(GLuint bit) +{ + int i = 0; + while (bit > 1) { + i++; + bit >>= 1; + } + return fallbackStrings[i]; +} + + + +void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint oldfallback = rmesa->TclFallback; + + if (mode) { + rmesa->TclFallback |= bit; + if (oldfallback == 0) { + if (R200_DEBUG & DEBUG_FALLBACKS) + fprintf(stderr, "R200 begin tcl fallback %s\n", + getFallbackString( bit )); + transition_to_swtnl( ctx ); + } + } + else { + rmesa->TclFallback &= ~bit; + if (oldfallback == bit) { + if (R200_DEBUG & DEBUG_FALLBACKS) + fprintf(stderr, "R200 end tcl fallback %s\n", + getFallbackString( bit )); + transition_to_hwtnl( ctx ); + } + } +} Index: xc/lib/GL/mesa/src/drv/r200/r200_tcl.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_tcl.h:1.2 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_tcl.h Mon Dec 16 11:18:55 2002 @@ -0,0 +1,66 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_tcl.h,v 1.2 2002/12/16 16:18:55 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_TCL_H__ +#define __R200_TCL_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "r200_context.h" + +extern void r200TclPrimitive( GLcontext *ctx, GLenum prim, int hw_prim ); +extern void r200EmitEltPrimitive( GLcontext *ctx, GLuint first, GLuint last, + GLuint flags ); +extern void r200EmitPrimitive( GLcontext *ctx, GLuint first, GLuint last, + GLuint flags ); + +extern void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode ); + +#define R200_TCL_FALLBACK_RASTER 0x1 /* rasterization */ +#define R200_TCL_FALLBACK_UNFILLED 0x2 /* unfilled tris */ +#define R200_TCL_FALLBACK_LIGHT_TWOSIDE 0x4 /* twoside tris */ +#define R200_TCL_FALLBACK_MATERIAL 0x8 /* material in vb */ +#define R200_TCL_FALLBACK_TEXGEN_0 0x10 /* texgen, unit 0 */ +#define R200_TCL_FALLBACK_TEXGEN_1 0x20 /* texgen, unit 1 */ +#define R200_TCL_FALLBACK_TEXGEN_2 0x40 /* texgen, unit 2 */ +#define R200_TCL_FALLBACK_TCL_DISABLE 0x80 /* user disable */ +#define R200_TCL_FALLBACK_BITMAP 0x100 /* draw bitmap with points */ + +#define R200_MAX_TCL_VERTSIZE (4*4) /* using maos now... */ + +#define TCL_FALLBACK( ctx, bit, mode ) r200TclFallback( ctx, bit, mode ) + + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_tex.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_tex.c:1.2 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_tex.c Tue Nov 5 12:46:08 2002 @@ -0,0 +1,790 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_tex.c,v 1.2 2002/11/05 17:46:08 tsi Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_state.h" +#include "r200_ioctl.h" +#include "r200_swtcl.h" +#include "r200_tex.h" + +#include "colormac.h" +#include "context.h" +#include "enums.h" +#include "image.h" +#include "mem.h" +#include "mmath.h" +#include "simple_list.h" +#include "texformat.h" +#include "texstore.h" +#include "texutil.h" + + +/* ============================================================= + * Utility functions: + */ + +static void r200SetTexWrap( r200TexObjPtr t, GLenum swrap, GLenum twrap ) +{ + t->pp_txfilter &= ~(R200_CLAMP_S_MASK | R200_CLAMP_T_MASK); + + switch ( swrap ) { + case GL_REPEAT: + t->pp_txfilter |= R200_CLAMP_S_WRAP; + break; + case GL_CLAMP: + t->pp_txfilter |= R200_CLAMP_S_CLAMP_LAST; + break; + case GL_CLAMP_TO_EDGE: + t->pp_txfilter |= R200_CLAMP_S_CLAMP_LAST; + break; + } + + switch ( twrap ) { + case GL_REPEAT: + t->pp_txfilter |= R200_CLAMP_T_WRAP; + break; + case GL_CLAMP: + t->pp_txfilter |= R200_CLAMP_T_CLAMP_LAST; + break; + case GL_CLAMP_TO_EDGE: + t->pp_txfilter |= R200_CLAMP_T_CLAMP_LAST; + break; + } +} + +static void r200SetTexMaxAnisotropy( r200TexObjPtr t, GLfloat max ) +{ + t->pp_txfilter &= ~R200_MAX_ANISO_MASK; + + if ( max == 1.0 ) { + t->pp_txfilter |= R200_MAX_ANISO_1_TO_1; + } else if ( max <= 2.0 ) { + t->pp_txfilter |= R200_MAX_ANISO_2_TO_1; + } else if ( max <= 4.0 ) { + t->pp_txfilter |= R200_MAX_ANISO_4_TO_1; + } else if ( max <= 8.0 ) { + t->pp_txfilter |= R200_MAX_ANISO_8_TO_1; + } else { + t->pp_txfilter |= R200_MAX_ANISO_16_TO_1; + } +} + +static void r200SetTexFilter( r200TexObjPtr t, GLenum minf, GLenum magf ) +{ + GLuint anisotropy = (t->pp_txfilter & R200_MAX_ANISO_MASK); + + t->pp_txfilter &= ~(R200_MIN_FILTER_MASK | R200_MAG_FILTER_MASK); + + if ( anisotropy == R200_MAX_ANISO_1_TO_1 ) { + switch ( minf ) { + case GL_NEAREST: + t->pp_txfilter |= R200_MIN_FILTER_NEAREST; + break; + case GL_LINEAR: + t->pp_txfilter |= R200_MIN_FILTER_LINEAR; + break; + case GL_NEAREST_MIPMAP_NEAREST: + t->pp_txfilter |= R200_MIN_FILTER_NEAREST_MIP_NEAREST; + break; + case GL_NEAREST_MIPMAP_LINEAR: + t->pp_txfilter |= R200_MIN_FILTER_LINEAR_MIP_NEAREST; + break; + case GL_LINEAR_MIPMAP_NEAREST: + t->pp_txfilter |= R200_MIN_FILTER_NEAREST_MIP_LINEAR; + break; + case GL_LINEAR_MIPMAP_LINEAR: + t->pp_txfilter |= R200_MIN_FILTER_LINEAR_MIP_LINEAR; + break; + } + } else { + switch ( minf ) { + case GL_NEAREST: + t->pp_txfilter |= R200_MIN_FILTER_ANISO_NEAREST; + break; + case GL_LINEAR: + t->pp_txfilter |= R200_MIN_FILTER_ANISO_LINEAR; + break; + case GL_NEAREST_MIPMAP_NEAREST: + case GL_LINEAR_MIPMAP_NEAREST: + t->pp_txfilter |= R200_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST; + break; + case GL_NEAREST_MIPMAP_LINEAR: + case GL_LINEAR_MIPMAP_LINEAR: + t->pp_txfilter |= R200_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR; + break; + } + } + + switch ( magf ) { + case GL_NEAREST: + t->pp_txfilter |= R200_MAG_FILTER_NEAREST; + break; + case GL_LINEAR: + t->pp_txfilter |= R200_MAG_FILTER_LINEAR; + break; + } +} + +static void r200SetTexBorderColor( r200TexObjPtr t, GLubyte c[4] ) +{ + t->pp_border_color = r200PackColor( 4, c[0], c[1], c[2], c[3] ); +} + + +static r200TexObjPtr r200AllocTexObj( struct gl_texture_object *texObj ) +{ + r200TexObjPtr t; + + t = CALLOC_STRUCT( r200_tex_obj ); + if (!t) + return NULL; + + if ( R200_DEBUG & DEBUG_TEXTURE ) { + fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, texObj, t ); + } + + t->tObj = texObj; + make_empty_list( t ); + + /* Initialize non-image-dependent parts of the state: + */ + r200SetTexWrap( t, texObj->WrapS, texObj->WrapT ); + r200SetTexMaxAnisotropy( t, texObj->MaxAnisotropy ); + r200SetTexFilter( t, texObj->MinFilter, texObj->MagFilter ); + r200SetTexBorderColor( t, texObj->BorderColor ); + return t; +} + + +static const struct gl_texture_format * +r200ChooseTextureFormat( GLcontext *ctx, GLint internalFormat, + GLenum format, GLenum type ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + const GLboolean do32bpt = ( rmesa->r200Screen->cpp == 4 ); + + switch ( internalFormat ) { + case 4: + case GL_RGBA: + if ( format == GL_BGRA ) { + if ( type == GL_UNSIGNED_INT_8_8_8_8_REV ) { + return &_mesa_texformat_argb8888; + } + else if ( type == GL_UNSIGNED_SHORT_4_4_4_4_REV ) { + return &_mesa_texformat_argb4444; + } + else if ( type == GL_UNSIGNED_SHORT_1_5_5_5_REV ) { + return &_mesa_texformat_argb1555; + } + } + return do32bpt ? &_mesa_texformat_rgba8888 : &_mesa_texformat_argb4444; + + case 3: + case GL_RGB: + if ( format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 ) { + return &_mesa_texformat_rgb565; + } + return do32bpt ? &_mesa_texformat_rgba8888 : &_mesa_texformat_rgb565; + + case GL_RGBA8: + case GL_RGB10_A2: + case GL_RGBA12: + case GL_RGBA16: + return do32bpt ? &_mesa_texformat_rgba8888 : &_mesa_texformat_argb4444; + + case GL_RGBA4: + case GL_RGBA2: + return &_mesa_texformat_argb4444; + + case GL_RGB5_A1: + return &_mesa_texformat_argb1555; + + case GL_RGB8: + case GL_RGB10: + case GL_RGB12: + case GL_RGB16: + return do32bpt ? &_mesa_texformat_rgba8888 : &_mesa_texformat_rgb565; + + case GL_RGB5: + case GL_RGB4: + case GL_R3_G3_B2: + return &_mesa_texformat_rgb565; + + case GL_ALPHA: + case GL_ALPHA4: + case GL_ALPHA8: + case GL_ALPHA12: + case GL_ALPHA16: + return &_mesa_texformat_al88; + + case 1: + case GL_LUMINANCE: + case GL_LUMINANCE4: + case GL_LUMINANCE8: + case GL_LUMINANCE12: + case GL_LUMINANCE16: + return &_mesa_texformat_al88; + + 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: + return &_mesa_texformat_al88; + + case GL_INTENSITY: + case GL_INTENSITY4: + case GL_INTENSITY8: + case GL_INTENSITY12: + case GL_INTENSITY16: + /* At the moment, glean & conform both fail using the i8 internal + * format. + */ + return &_mesa_texformat_al88; +/* return &_mesa_texformat_i8; */ + + case GL_YCBCR_MESA: + if (type == GL_UNSIGNED_SHORT_8_8_APPLE || + type == GL_UNSIGNED_BYTE) + return &_mesa_texformat_ycbcr; + else + return &_mesa_texformat_ycbcr_rev; + + default: + _mesa_problem(ctx, "unexpected texture format in r200ChoosTexFormat"); + return NULL; + } + + return NULL; /* never get here */ +} + + +static GLboolean +r200ValidateClientStorage( GLcontext *ctx, GLenum target, + GLint internalFormat, + GLint srcWidth, GLint srcHeight, + GLenum format, GLenum type, const void *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage) + +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + int texelBytes; + + if (0) + fprintf(stderr, "intformat %s format %s type %s\n", + _mesa_lookup_enum_by_nr( internalFormat ), + _mesa_lookup_enum_by_nr( format ), + _mesa_lookup_enum_by_nr( type )); + + if (!ctx->Unpack.ClientStorage) + return 0; + + if (ctx->_ImageTransferState || + texImage->IsCompressed || + texObj->GenerateMipmap) + return 0; + + + /* This list is incomplete, may be different on ppc??? + */ + switch ( internalFormat ) { + case GL_RGBA: + if ( format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV ) { + texImage->TexFormat = &_mesa_texformat_argb8888; + texelBytes = 4; + } + else + return 0; + break; + + case GL_YCBCR_MESA: + if ( format == GL_YCBCR_MESA && + type == GL_UNSIGNED_SHORT_8_8_REV_APPLE ) { + texImage->TexFormat = &_mesa_texformat_ycbcr_rev; + texelBytes = 2; + } + else if ( format == GL_YCBCR_MESA && + (type == GL_UNSIGNED_SHORT_8_8_APPLE || + type == GL_UNSIGNED_BYTE)) { + texImage->TexFormat = &_mesa_texformat_ycbcr; + texelBytes = 2; + } + else + return 0; + break; + + + default: + return 0; + } + + /* Could deal with these packing issues, but currently don't: + */ + if (packing->SkipPixels || + packing->SkipRows || + packing->SwapBytes || + packing->LsbFirst) { + return 0; + } + + { + GLint srcRowStride = _mesa_image_row_stride(packing, srcWidth, + format, type); + + + if (0) + fprintf(stderr, "%s: srcRowStride %d/%x\n", + __FUNCTION__, srcRowStride, srcRowStride); + + /* Could check this later in upload, pitch restrictions could be + * relaxed, but would need to store the image pitch somewhere, + * as packing details might change before image is uploaded: + */ + if (!r200IsAgpMemory( rmesa, pixels, srcHeight * srcRowStride ) || + (srcRowStride & 63)) + return 0; + + + /* Have validated that _mesa_transfer_teximage would be a straight + * memcpy at this point. NOTE: future calls to TexSubImage will + * overwrite the client data. This is explicitly mentioned in the + * extension spec. + */ + texImage->Data = (void *)pixels; + texImage->IsClientData = GL_TRUE; + texImage->RowStride = srcRowStride / texelBytes; + return 1; + } +} + + +static void r200TexImage1D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + r200TexObjPtr t = (r200TexObjPtr) texObj->DriverData; + + if ( t ) { + r200SwapOutTexObj( rmesa, t ); + } + else { + t = r200AllocTexObj( texObj ); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); + return; + } + texObj->DriverData = t; + } + + /* Note, this will call r200ChooseTextureFormat */ + _mesa_store_teximage1d(ctx, target, level, internalFormat, + width, border, format, type, pixels, + &ctx->Unpack, texObj, texImage); + + t->dirty_images |= (1 << level); +} + + +static void r200TexSubImage1D( 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 ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + r200TexObjPtr t = (r200TexObjPtr)texObj->DriverData; + + assert( t ); /* this _should_ be true */ + if ( t ) { + r200SwapOutTexObj( rmesa, t ); + t->dirty_images |= (1 << level); + } + else { + t = r200AllocTexObj(texObj); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage1D"); + return; + } + texObj->DriverData = t; + } + + _mesa_store_texsubimage1d(ctx, target, level, xoffset, width, + format, type, pixels, packing, texObj, + texImage); + + t->dirty_images |= (1 << level); +} + + +static void r200TexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + r200TexObjPtr t = (r200TexObjPtr)texObj->DriverData; + + if ( t ) { + r200SwapOutTexObj( rmesa, t ); + } + else { + t = r200AllocTexObj( texObj ); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + return; + } + texObj->DriverData = t; + } + + texImage->IsClientData = GL_FALSE; + + if (r200ValidateClientStorage( ctx, target, + internalFormat, + width, height, + format, type, pixels, + packing, texObj, texImage)) { + if (R200_DEBUG & DEBUG_TEXTURE) + fprintf(stderr, "%s: Using client storage\n", __FUNCTION__); + } + else { + if (R200_DEBUG & DEBUG_TEXTURE) + fprintf(stderr, "%s: Using normal storage\n", __FUNCTION__); + + /* Normal path: copy (to cached memory) and eventually upload + * via another copy to agp memory and then a blit... Could + * eliminate one copy by going straight to (permanent) agp. + * + * Note, this will call r200ChooseTextureFormat. + */ + _mesa_store_teximage2d(ctx, target, level, internalFormat, + width, height, border, format, type, pixels, + &ctx->Unpack, texObj, texImage); + + t->dirty_images |= (1 << level); + } +} + + +static void r200TexSubImage2D( 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 ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + r200TexObjPtr t = (r200TexObjPtr) texObj->DriverData; + +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + assert( t ); /* this _should_ be true */ + if ( t ) { + r200SwapOutTexObj( rmesa, t ); + } + else { + t = r200AllocTexObj(texObj); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage2D"); + return; + } + texObj->DriverData = t; + } + + _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, + height, format, type, pixels, packing, texObj, + texImage); + + t->dirty_images |= (1 << level); +} + + +static void r200TexEnv( GLcontext *ctx, GLenum target, + GLenum pname, const GLfloat *param ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint unit = ctx->Texture.CurrentUnit; + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + + if ( R200_DEBUG & DEBUG_STATE ) { + fprintf( stderr, "%s( %s )\n", + __FUNCTION__, _mesa_lookup_enum_by_nr( pname ) ); + } + + /* This is incorrect: Need to maintain this data for each of + * GL_TEXTURE_{123}D, GL_TEXTURE_RECTANGLE_NV, etc, and switch + * between them according to _ReallyEnabled. + */ + switch ( pname ) { + case GL_TEXTURE_ENV_COLOR: { + GLubyte c[4]; + GLuint envColor; + UNCLAMPED_FLOAT_TO_RGBA_CHAN( c, texUnit->EnvColor ); + envColor = r200PackColor( 4, c[0], c[1], c[2], c[3] ); + if ( rmesa->hw.tf.cmd[TF_TFACTOR_0 + unit] != envColor ) { + R200_STATECHANGE( rmesa, tf ); + rmesa->hw.tf.cmd[TF_TFACTOR_0 + unit] = envColor; + } + break; + } + + case GL_TEXTURE_LOD_BIAS_EXT: { + GLfloat bias; + GLuint b; + const int fixed_one = 0x8000000; + + /* The R200's LOD bias is a signed 2's complement value with a + * range of -16.0 <= bias < 16.0. + * + * NOTE: Add a small bias to the bias for conform mipsel.c test. + */ + bias = *param + .01; + bias = CLAMP( bias, -16.0, 16.0 ); + b = (int)(bias * fixed_one) & R200_LOD_BIAS_MASK; + + if ( (rmesa->hw.tex[unit].cmd[TEX_PP_TXFORMAT_X] & R200_LOD_BIAS_MASK) != b ) { + R200_STATECHANGE( rmesa, tex[unit] ); + rmesa->hw.tex[unit].cmd[TEX_PP_TXFORMAT_X] &= ~R200_LOD_BIAS_MASK; + rmesa->hw.tex[unit].cmd[TEX_PP_TXFORMAT_X] |= b; + } + break; + } + + default: + return; + } +} + +static void r200TexParameter( GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj, + GLenum pname, const GLfloat *params ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + r200TexObjPtr t = (r200TexObjPtr) texObj->DriverData; + + if ( R200_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) { + fprintf( stderr, "%s( %s )\n", __FUNCTION__, + _mesa_lookup_enum_by_nr( pname ) ); + } + + if (!t) + return; + + switch ( pname ) { + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + r200SetTexMaxAnisotropy( t, texObj->MaxAnisotropy ); + r200SetTexFilter( t, texObj->MinFilter, texObj->MagFilter ); + break; + + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + r200SetTexWrap( t, texObj->WrapS, texObj->WrapT ); + break; + + case GL_TEXTURE_BORDER_COLOR: + r200SetTexBorderColor( t, texObj->BorderColor ); + break; + + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + /* This isn't the most efficient solution but there doesn't appear to + * be a nice alternative for R200. Since there's no LOD clamping, + * we just have to rely on loading the right subset of mipmap levels + * to simulate a clamped LOD. + */ + r200SwapOutTexObj( rmesa, t ); + break; + + default: + return; + } + + /* Mark this texobj as dirty (one bit per tex unit) + */ + t->dirty_state = TEX_ALL; +} + + + +static void r200BindTexture( GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj ) +{ + r200TexObjPtr t = (r200TexObjPtr) texObj->DriverData; + GLuint unit = ctx->Texture.CurrentUnit; + + if ( R200_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) { + fprintf( stderr, "%s( %p ) unit=%d\n", __FUNCTION__, texObj, unit ); + } + + if ( target == GL_TEXTURE_2D || target == GL_TEXTURE_1D ) { + if ( !t ) { + t = r200AllocTexObj( texObj ); + texObj->DriverData = t; + } + } +} + +static void r200DeleteTexture( GLcontext *ctx, + struct gl_texture_object *texObj ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + r200TexObjPtr t = (r200TexObjPtr) texObj->DriverData; + + if ( R200_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, texObj ); + } + + if ( t ) { + if ( rmesa ) { + R200_FIREVERTICES( rmesa ); + } + r200DestroyTexObj( rmesa, t ); + texObj->DriverData = NULL; + } +} + +static GLboolean r200IsTextureResident( GLcontext *ctx, + struct gl_texture_object *texObj ) +{ + r200TexObjPtr t = (r200TexObjPtr) texObj->DriverData; + + return ( t && t->memBlock ); +} + + +static void r200InitTextureObjects( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + struct gl_texture_object *texObj; + GLuint tmp = ctx->Texture.CurrentUnit; + + ctx->Texture.CurrentUnit = 0; + + texObj = ctx->Texture.Unit[0].Current1D; + r200BindTexture( ctx, GL_TEXTURE_1D, texObj ); + move_to_tail( &rmesa->texture.swapped, + (r200TexObjPtr)texObj->DriverData ); + + texObj = ctx->Texture.Unit[0].Current2D; + r200BindTexture( ctx, GL_TEXTURE_2D, texObj ); + move_to_tail( &rmesa->texture.swapped, + (r200TexObjPtr)texObj->DriverData ); + + ctx->Texture.CurrentUnit = 1; + + texObj = ctx->Texture.Unit[1].Current1D; + r200BindTexture( ctx, GL_TEXTURE_1D, texObj ); + move_to_tail( &rmesa->texture.swapped, + (r200TexObjPtr)texObj->DriverData ); + + texObj = ctx->Texture.Unit[1].Current2D; + r200BindTexture( ctx, GL_TEXTURE_2D, texObj ); + move_to_tail( &rmesa->texture.swapped, + (r200TexObjPtr)texObj->DriverData ); + + ctx->Texture.CurrentUnit = tmp; +} + +/* Need: + * - Same GEN_MODE for all active bits + * - Same EyePlane/ObjPlane for all active bits when using Eye/Obj + * - STRQ presumably all supported (matrix means incoming R values + * can end up in STQ, this has implications for vertex support, + * presumably ok if maos is used, though?) + * + * Basically impossible to do this on the fly - just collect some + * basic info & do the checks from ValidateState(). + */ +static void r200TexGen( GLcontext *ctx, + GLenum coord, + GLenum pname, + const GLfloat *params ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint unit = ctx->Texture.CurrentUnit; + rmesa->recheck_texgen[unit] = GL_TRUE; +} + + +void r200InitTextureFuncs( GLcontext *ctx ) +{ + ctx->Driver.ChooseTextureFormat = r200ChooseTextureFormat; + ctx->Driver.TexImage1D = r200TexImage1D; + ctx->Driver.TexImage2D = r200TexImage2D; + ctx->Driver.TexImage3D = _mesa_store_teximage3d; + ctx->Driver.TexSubImage1D = r200TexSubImage1D; + ctx->Driver.TexSubImage2D = r200TexSubImage2D; + ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; + ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; + ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; + ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; + ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; + ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; + ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; + + ctx->Driver.BindTexture = r200BindTexture; + ctx->Driver.CreateTexture = NULL; /* FIXME: Is this used??? */ + ctx->Driver.DeleteTexture = r200DeleteTexture; + ctx->Driver.IsTextureResident = r200IsTextureResident; + ctx->Driver.PrioritizeTexture = NULL; + ctx->Driver.ActiveTexture = NULL; + ctx->Driver.UpdateTexturePalette = NULL; + + ctx->Driver.TexEnv = r200TexEnv; + ctx->Driver.TexParameter = r200TexParameter; + ctx->Driver.TexGen = r200TexGen; + + r200InitTextureObjects( ctx ); +} Index: xc/lib/GL/mesa/src/drv/r200/r200_tex.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_tex.h:1.1 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_tex.h Wed Oct 30 07:51:53 2002 @@ -0,0 +1,55 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_tex.h,v 1.1 2002/10/30 12:51:53 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_TEX_H__ +#define __R200_TEX_H__ + +#ifdef GLX_DIRECT_RENDERING + +extern void r200UpdateTextureState( GLcontext *ctx ); + +extern int r200UploadTexImages( r200ContextPtr rmesa, r200TexObjPtr t ); + +extern void r200AgeTextures( r200ContextPtr rmesa, int heap ); +extern void r200DestroyTexObj( r200ContextPtr rmesa, r200TexObjPtr t ); +extern void r200SwapOutTexObj( r200ContextPtr rmesa, r200TexObjPtr t ); + +extern void r200PrintLocalLRU( r200ContextPtr rmesa, int heap ); +extern void r200PrintGlobalLRU( r200ContextPtr rmesa, int heap ); +extern void r200UpdateTexLRU( r200ContextPtr rmesa, r200TexObjPtr t ); + +extern void r200InitTextureFuncs( GLcontext *ctx ); + +#endif +#endif /* __R200_TEX_H__ */ Index: xc/lib/GL/mesa/src/drv/r200/r200_texmem.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_texmem.c:1.5 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_texmem.c Mon Dec 16 19:32:56 2002 @@ -0,0 +1,737 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_texmem.c,v 1.5 2002/12/17 00:32:56 dawes Exp $ */ +/************************************************************************** + +Copyright (C) Tungsten Graphics 2002. All Rights Reserved. +The Weather Channel, Inc. funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 +license. This notice must be preserved. + +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_reg.h" +#include "r200_context.h" +#include "r200_state.h" +#include "r200_ioctl.h" +#include "r200_swtcl.h" +#include "r200_tex.h" + +#include "context.h" +#include "colormac.h" +#include "mmath.h" +#include "macros.h" +#include "simple_list.h" +#include "enums.h" +#include "mem.h" + +#include /* for usleep */ + +/* Destroy hardware state associated with texture `t'. + */ +void r200DestroyTexObj( r200ContextPtr rmesa, r200TexObjPtr t ) +{ + if ( !t ) + return; + + if ( R200_DEBUG & DEBUG_TEXTURE ) { + fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, t, t->tObj ); + } + + if ( t->memBlock ) { + mmFreeMem( t->memBlock ); + t->memBlock = NULL; + } + + if ( t->tObj ) + t->tObj->DriverData = NULL; + + if ( rmesa ) { + if ( t == rmesa->state.texture.unit[0].texobj ) { + rmesa->state.texture.unit[0].texobj = NULL; + remove_from_list( &rmesa->hw.tex[0] ); + make_empty_list( &rmesa->hw.tex[0] ); + } + + if ( t == rmesa->state.texture.unit[1].texobj ) { + rmesa->state.texture.unit[1].texobj = NULL; + remove_from_list( &rmesa->hw.tex[1] ); + make_empty_list( &rmesa->hw.tex[1] ); + } + } + + remove_from_list( t ); + FREE( t ); +} + + +/* Keep track of swapped out texture objects. + */ +void r200SwapOutTexObj( r200ContextPtr rmesa, r200TexObjPtr t ) +{ + if ( R200_DEBUG & DEBUG_TEXTURE ) { + fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, t, t->tObj ); + } + + if ( t->memBlock ) { + mmFreeMem( t->memBlock ); + t->memBlock = NULL; + } + + t->dirty_images = ~0; + move_to_tail( &rmesa->texture.swapped, t ); +} + +/* Print out debugging information about texture LRU. + */ +void r200PrintLocalLRU( r200ContextPtr rmesa, int heap ) +{ + r200TexObjPtr t; + int sz = 1 << (rmesa->r200Screen->logTexGranularity[heap]); + + fprintf( stderr, "\nLocal LRU, heap %d:\n", heap ); + + foreach ( t, &rmesa->texture.objects[heap] ) { + if (!t->memBlock) + continue; + 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 at 0x%x sz 0x%x\n", + t->memBlock->ofs, + t->memBlock->size ); + } + } + + fprintf( stderr, "\n" ); +} + +void r200PrintGlobalLRU( r200ContextPtr 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 r200ResetGlobalLRU( r200ContextPtr rmesa, int heap ) +{ + radeon_tex_region_t *list = rmesa->sarea->texList[heap]; + int sz = 1 << rmesa->r200Screen->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->r200Screen->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 r200UpdateTexLRU(r200ContextPtr rmesa, r200TexObjPtr t ) +{ + int heap = t->heap; + radeon_tex_region_t *list = rmesa->sarea->texList[heap]; + int sz = rmesa->r200Screen->logTexGranularity[heap]; + int i, start, end; + + rmesa->texture.age[heap] = ++rmesa->sarea->texAge[heap]; + + if ( !t->memBlock ) + return; + + start = t->memBlock->ofs >> sz; + end = (t->memBlock->ofs + t->memBlock->size-1) >> sz; + + /* Update our local LRU */ + move_to_head( &rmesa->texture.objects[heap], t ); + + /* Update the global LRU */ + for ( i = start ; i <= end ; i++ ) { + list[i].in_use = 1; + list[i].age = rmesa->texture.age[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 ) { + r200PrintGlobalLRU( rmesa, t->heap ); + r200PrintLocalLRU( 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 r200TexturesGone( r200ContextPtr rmesa, int heap, + int offset, int size, int in_use ) +{ + r200TexObjPtr t, tmp; + + foreach_s ( t, tmp, &rmesa->texture.objects[heap] ) { + if ( !t->memBlock || + 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. + */ + r200SwapOutTexObj( rmesa, t ); + } + + if ( in_use ) { + t = (r200TexObjPtr) CALLOC( sizeof(*t) ); + if ( !t ) return; + + t->memBlock = mmAllocMem( rmesa->texture.heap[heap], size, 0, offset ); + if ( !t->memBlock ) { + fprintf( stderr, "Couldn't alloc placeholder sz %x ofs %x\n", + (int)size, (int)offset ); + mmDumpMemInfo( rmesa->texture.heap[heap] ); + return; + } + insert_at_head( &rmesa->texture.objects[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 r200AgeTextures( r200ContextPtr rmesa, int heap ) +{ + RADEONSAREAPrivPtr sarea = rmesa->sarea; + + if ( sarea->texAge[heap] != rmesa->texture.age[heap] ) { + int sz = 1 << rmesa->r200Screen->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->r200Screen->texSize[heap] ) { + nr = RADEON_NR_TEX_REGIONS; + break; + } + + if ( sarea->texList[heap][idx].age > rmesa->texture.age[heap] ) { + r200TexturesGone( rmesa, heap, idx * sz, sz, + sarea->texList[heap][idx].in_use ); + } + } + + if ( nr == RADEON_NR_TEX_REGIONS ) { + r200TexturesGone( rmesa, heap, 0, + rmesa->r200Screen->texSize[heap], 0 ); + r200ResetGlobalLRU( rmesa, heap ); + } + + rmesa->texture.age[heap] = sarea->texAge[heap]; + } +} + + +/* ------------------------------------------------------------ + * Texture image conversions + */ + + +static void r200UploadAGPClientSubImage( r200ContextPtr rmesa, + r200TexObjPtr t, + struct gl_texture_image *texImage, + GLint hwlevel, + GLint x, GLint y, + GLint width, GLint height ) +{ + const struct gl_texture_format *texFormat = texImage->TexFormat; + GLuint pitch = t->image[0].width * texFormat->TexelBytes; + int blit_format; + int srcOffset; + + + switch ( texFormat->TexelBytes ) { + case 1: + blit_format = R200_CP_COLOR_FORMAT_CI8; + break; + case 2: + blit_format = R200_CP_COLOR_FORMAT_RGB565; + break; + case 4: + blit_format = R200_CP_COLOR_FORMAT_ARGB8888; + break; + default: + return; + } + + t->image[hwlevel].data = texImage->Data; + srcOffset = r200AgpOffsetFromVirtual( rmesa, texImage->Data ); + + assert( srcOffset != ~0 ); + + /* Don't currently need to cope with small pitches? + */ + width = texImage->Width; + height = texImage->Height; + + r200EmitWait( rmesa, RADEON_WAIT_3D ); + + r200EmitBlit( rmesa, blit_format, + pitch, + srcOffset, + t->image[0].width * texFormat->TexelBytes, /* dst pitch! */ + t->bufAddr, + x, + y, + t->image[hwlevel].x + x, + t->image[hwlevel].y + y, + width, + height ); + + r200EmitWait( rmesa, RADEON_WAIT_2D ); +} + +static void r200UploadRectSubImage( r200ContextPtr rmesa, + r200TexObjPtr t, + struct gl_texture_image *texImage, + GLint x, GLint y, + GLint width, GLint height ) +{ + const struct gl_texture_format *texFormat = texImage->TexFormat; + int blit_format, blit_pitch, done; + + switch ( texFormat->TexelBytes ) { + case 1: + blit_format = R200_CP_COLOR_FORMAT_CI8; + break; + case 2: + blit_format = R200_CP_COLOR_FORMAT_RGB565; + break; + case 4: + blit_format = R200_CP_COLOR_FORMAT_ARGB8888; + break; + default: + return; + } + + t->image[0].data = texImage->Data; + + /* Currently don't need to cope with small pitches. + */ + width = texImage->Width; + height = texImage->Height; + blit_pitch = t->pp_txpitch + 32; + + if (rmesa->prefer_agp_client_texturing && texImage->IsClientData) { + /* In this case, could also use agp texturing. This is + * currently disabled, but has been tested & works. + */ + t->pp_txoffset = r200AgpOffsetFromVirtual( rmesa, texImage->Data ); + t->pp_txpitch = texImage->RowStride * texFormat->TexelBytes - 32; + + if (R200_DEBUG & DEBUG_TEXTURE) + fprintf(stderr, + "Using agp texturing for rectangular client texture\n"); + + /* Release FB memory allocated for this image: + */ + if ( t->memBlock ) { + mmFreeMem( t->memBlock ); + t->memBlock = NULL; + } + + } + else if (texImage->IsClientData) { + /* Data already in agp memory, with usable pitch. + */ + r200EmitBlit( rmesa, + blit_format, + texImage->RowStride * texFormat->TexelBytes, + r200AgpOffsetFromVirtual( rmesa, texImage->Data ), + blit_pitch, t->bufAddr, + 0, 0, + 0, 0, + width, height ); + } + else { + /* Data not in agp memory, or bad pitch. + */ + for (done = 0; done < height ; ) { + struct r200_dma_region region; + int lines = MIN2( height - done, RADEON_BUFFER_SIZE / blit_pitch ); + int src_pitch = texImage->RowStride * texFormat->TexelBytes; + char *tex = (char *)texImage->Data + done * src_pitch; + + memset(®ion, 0, sizeof(region)); + r200AllocDmaRegion( rmesa, ®ion, lines * blit_pitch, 64 ); + + /* Copy texdata to dma: + */ + if (0) + fprintf(stderr, "%s: src_pitch %d blit_pitch %d\n", + __FUNCTION__, src_pitch, blit_pitch); + + if (src_pitch == blit_pitch) { + memcpy( region.address, tex, lines * src_pitch ); + } + else { + char *buf = region.address; + int i; + for (i = 0 ; i < lines ; i++) { + memcpy( buf, tex, src_pitch ); + buf += blit_pitch; + tex += src_pitch; + } + } + + r200EmitWait( rmesa, RADEON_WAIT_3D ); + + /* Blit to framebuffer + */ + r200EmitBlit( rmesa, + blit_format, + blit_pitch, GET_START( ®ion ), + blit_pitch, t->bufAddr, + 0, 0, + 0, done, + width, lines ); + + r200EmitWait( rmesa, RADEON_WAIT_2D ); + + r200ReleaseDmaRegion( rmesa, ®ion, __FUNCTION__ ); + done += lines; + } + } +} + + +/* Upload the texture image associated with texture `t' at level `level' + * at the address relative to `start'. + */ +static void r200UploadSubImage( r200ContextPtr rmesa, + r200TexObjPtr t, + GLint hwlevel, + GLint x, GLint y, GLint width, GLint height ) +{ + struct gl_texture_image *texImage; + const struct gl_texture_format *texFormat; + GLint texelsPerDword = 0; + GLuint format, pitch, offset; + GLint imageWidth, imageHeight; + GLint ret; + drmRadeonTexture tex; + drmRadeonTexImage tmp; + int level = hwlevel + t->firstLevel; + + if ( R200_DEBUG & DEBUG_TEXTURE ) { + fprintf( stderr, "%s level %d %dx%d\n", __FUNCTION__, + level, width, height); + } + + /* Ensure we have a valid texture to upload */ + if ( ( hwlevel < 0 ) || ( hwlevel >= RADEON_MAX_TEXTURE_LEVELS ) ) { + _mesa_problem(NULL, "bad texture level in r200UploadSubimage"); + return; + } + + texImage = t->tObj->Image[level]; + if ( !texImage ) { + if ( R200_DEBUG & DEBUG_TEXTURE ) + fprintf( stderr, "%s: texImage %d is NULL!\n", __FUNCTION__, level ); + return; + } + if ( !texImage->Data ) { + if ( R200_DEBUG & DEBUG_TEXTURE ) + fprintf( stderr, "%s: image data is NULL!\n", __FUNCTION__ ); + return; + } + + + if (t->tObj->Target == GL_TEXTURE_RECTANGLE_NV) { + assert(level == 0); + assert(hwlevel == 0); + if ( R200_DEBUG & DEBUG_TEXTURE ) + fprintf( stderr, "%s: image data is rectangular\n", __FUNCTION__); + r200UploadRectSubImage( rmesa, t, texImage, x, y, width, height ); + return; + } + else if (texImage->IsClientData) { + if ( R200_DEBUG & DEBUG_TEXTURE ) + fprintf( stderr, "%s: image data is in agp client storage\n", + __FUNCTION__); + r200UploadAGPClientSubImage( rmesa, t, texImage, hwlevel, + x, y, width, height ); + return; + } + else if ( R200_DEBUG & DEBUG_TEXTURE ) + fprintf( stderr, "%s: image data is in normal memory\n", + __FUNCTION__); + + + 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 & R200_TXFORMAT_FORMAT_MASK; + + imageWidth = texImage->Width; + imageHeight = texImage->Height; + + offset = t->bufAddr; + pitch = (t->image[0].width * texFormat->TexelBytes) / 64; + + + if ( R200_DEBUG & (DEBUG_TEXTURE|DEBUG_IOCTL) ) + { + GLint imageX = 0; + GLint imageY = 0; + GLint blitX = t->image[hwlevel].x; + GLint blitY = t->image[hwlevel].y; + GLint blitWidth = t->image[hwlevel].width; + GLint blitHeight = t->image[hwlevel].height; + 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/%d format: %x\n", + (GLuint)offset, (GLuint)pitch, hwlevel, level, format ); + } + + t->image[hwlevel].data = texImage->Data; + + tex.offset = offset; + tex.pitch = pitch; + tex.format = format; + tex.width = imageWidth; + tex.height = imageHeight; + tex.image = &tmp; + + memcpy( &tmp, &t->image[hwlevel], sizeof(drmRadeonTexImage) ); + + LOCK_HARDWARE( rmesa ); + do { + ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_TEXTURE, + &tex, sizeof(drmRadeonTexture) ); + if (ret) { + if (R200_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "DRM_RADEON_TEXTURE: again!\n"); + usleep(1); + } + } while ( ret && errno == EAGAIN ); + + UNLOCK_HARDWARE( rmesa ); + + if ( ret ) { + fprintf( stderr, "DRM_R200_TEXTURE: 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[hwlevel].width, t->image[hwlevel].height, + t->image[hwlevel].data ); + exit( 1 ); + } +} + + + +/* 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 r200UploadTexImages( r200ContextPtr rmesa, r200TexObjPtr t ) +{ + const int numLevels = t->lastLevel - t->firstLevel + 1; + int heap; + r200TexObjPtr t0 = rmesa->state.texture.unit[0].texobj; + r200TexObjPtr t1 = rmesa->state.texture.unit[1].texobj; + + if ( R200_DEBUG & (DEBUG_TEXTURE|DEBUG_IOCTL) ) { + fprintf( stderr, "%s( %p, %p ) sz=%d lvls=%d-%d\n", __FUNCTION__, + rmesa->glCtx, t->tObj, t->totalSize, + t->firstLevel, t->lastLevel ); + } + + if ( !t || t->totalSize == 0 ) + return 0; + + if (R200_DEBUG & DEBUG_SYNC) { + fprintf(stderr, "\nSyncing\n\n"); + R200_FIREVERTICES( rmesa ); + r200Finish( rmesa->glCtx ); + } + + LOCK_HARDWARE( rmesa ); + + /* Choose the heap appropriately */ + heap = t->heap = RADEON_CARD_HEAP; + + /* Do we need to eject LRU texture objects? */ + if ( !t->memBlock ) { + /* Allocate a memory block on a 1k boundary (1<<10 == 1024) */ + t->memBlock = mmAllocMem( rmesa->texture.heap[heap], + t->totalSize, 10, 0 ); + + + /* Kick out textures until the requested texture fits */ + while ( !t->memBlock ) { + if ( rmesa->texture.objects[heap].prev == t0 || + rmesa->texture.objects[heap].prev == t1 ) { + fprintf( stderr, + "r200UploadTexImages: ran into bound texture\n" ); + UNLOCK_HARDWARE( rmesa ); + return -1; + } + if ( rmesa->texture.objects[heap].prev == + &rmesa->texture.objects[heap] ) { + if ( rmesa->r200Screen->IsPCI ) { + fprintf( stderr, "r200UploadTexImages: upload texture " + "failure on local texture heaps, sz=%d\n", + t->totalSize ); + UNLOCK_HARDWARE( rmesa ); + return -1; + } else { + fprintf( stderr, "r200UploadTexImages: upload texture " + "failure on both local and AGP texture heaps, " + "sz=%d\n", + t->totalSize ); + UNLOCK_HARDWARE( rmesa ); + return -1; + } + } + + r200SwapOutTexObj( rmesa, rmesa->texture.objects[heap].prev ); + + t->memBlock = mmAllocMem( rmesa->texture.heap[heap], + t->totalSize, 12, 0 ); + } + + /* Set the base offset of the texture image */ + t->bufAddr = rmesa->r200Screen->texOffset[heap] + t->memBlock->ofs; + t->pp_txoffset = t->bufAddr; + + /* Mark this texobj as dirty on all units: + */ + t->dirty_state = TEX_ALL; + } + + /* Let the world know we've used this memory recently */ + r200UpdateTexLRU( rmesa, t ); + UNLOCK_HARDWARE( rmesa ); + + /* Upload any images that are new */ + if (t->dirty_images) { + int hwlevel; + for ( hwlevel = 0 ; hwlevel < numLevels ; hwlevel++ ) { + if ( t->dirty_images & (1 << (hwlevel+t->firstLevel)) ) { + r200UploadSubImage( rmesa, t, hwlevel, + 0, 0, + t->image[hwlevel].width, + t->image[hwlevel].height ); + } + } + t->dirty_images = 0; + } + + + + if (R200_DEBUG & DEBUG_SYNC) { + fprintf(stderr, "\nSyncing\n\n"); + r200Finish( rmesa->glCtx ); + } + + return 0; +} Index: xc/lib/GL/mesa/src/drv/r200/r200_texstate.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_texstate.c:1.3 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_texstate.c Sat Feb 15 17:18:47 2003 @@ -0,0 +1,1519 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_texstate.c,v 1.3 2003/02/15 22:18:47 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "r200_context.h" +#include "r200_state.h" +#include "r200_ioctl.h" +#include "r200_swtcl.h" +#include "r200_tex.h" +#include "r200_tcl.h" + +#include "colormac.h" +#include "context.h" +#include "enums.h" +#include "macros.h" +#include "mem.h" +#include "mmath.h" +#include "simple_list.h" +#include "texformat.h" + + +static void r200SetTexImages( r200ContextPtr rmesa, + struct gl_texture_object *tObj, + GLenum target ) +{ + r200TexObjPtr t = (r200TexObjPtr)tObj->DriverData; + const struct gl_texture_image *baseImage = tObj->Image[tObj->BaseLevel]; + GLint totalSize; + GLint texelsPerDword = 0, blitWidth = 0, blitPitch = 0; + GLint x, y, width, height; + GLint i; + GLint firstLevel=0, lastLevel=0, numLevels; + GLint log2Width, log2Height; + GLuint txformat = 0; + + t->pp_txfilter &= ~R200_YUV_TO_RGB; + + /* Set the hardware texture format + */ + switch (baseImage->TexFormat->MesaFormat) { + case MESA_FORMAT_I8: + txformat = R200_TXFORMAT_I8; + break; + case MESA_FORMAT_AL88: + txformat = R200_TXFORMAT_AI88; + break; + case MESA_FORMAT_RGBA8888: + txformat = R200_TXFORMAT_RGBA8888; + break; + case MESA_FORMAT_ARGB8888: + txformat = R200_TXFORMAT_ARGB8888; + break; + case MESA_FORMAT_RGB565: + txformat = R200_TXFORMAT_RGB565; + break; + case MESA_FORMAT_ARGB1555: + txformat = R200_TXFORMAT_ARGB1555; + break; + case MESA_FORMAT_ARGB4444: + txformat = R200_TXFORMAT_ARGB4444; + break; + case MESA_FORMAT_YCBCR: + txformat = R200_TXFORMAT_YVYU422; + t->pp_txfilter |= R200_YUV_TO_RGB; + break; + case MESA_FORMAT_YCBCR_REV: + txformat = R200_TXFORMAT_VYUY422; + t->pp_txfilter |= R200_YUV_TO_RGB; + break; + default: + _mesa_problem(NULL, "unexpected texture format in r200TexImage2D"); + return; + } + + t->pp_txformat &= ~(R200_TXFORMAT_FORMAT_MASK | + R200_TXFORMAT_ALPHA_IN_MAP); + t->pp_txformat |= txformat; + + if ( txformat == R200_TXFORMAT_RGBA8888 || + txformat == R200_TXFORMAT_ARGB8888 || + txformat == R200_TXFORMAT_ARGB4444 || + txformat == R200_TXFORMAT_ARGB1555 || + txformat == R200_TXFORMAT_AI88 ) { + t->pp_txformat |= R200_TXFORMAT_ALPHA_IN_MAP; + } + + /* The R200 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 ( baseImage->TexFormat->TexelBytes ) { + case 1: + texelsPerDword = 4; + blitPitch = 64; + break; + case 2: + texelsPerDword = 2; + blitPitch = 32; + break; + case 4: + texelsPerDword = 1; + blitPitch = 16; + break; + default: + assert(0); + } + + /* Select the larger of the two widths for our global texture image + * coordinate space. As the R200 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( baseImage->Width, blitPitch ); + + /* Calculate mipmap offsets and dimensions. + */ + totalSize = 0; + x = 0; + y = 0; + + /* Compute which mipmap levels we really want to send to the hardware. + * This depends on the base image size, GL_TEXTURE_MIN_LOD, + * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. + * Yes, this looks overly complicated, but it's all needed. + */ + if (R200_DEBUG & DEBUG_TEXTURE) + fprintf(stderr, + "%s: BaseLevel %d MinLod %f MaxLod %f MaxLevel %d\n", + __FUNCTION__, + tObj->BaseLevel, tObj->MinLod, tObj->MaxLod, + tObj->MaxLevel); + + + switch (target) { + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + firstLevel = tObj->BaseLevel + (GLint)(tObj->MinLod + 0.5); + firstLevel = MAX2(firstLevel, tObj->BaseLevel); + lastLevel = tObj->BaseLevel + (GLint)(tObj->MaxLod + 0.5); + lastLevel = MAX2(lastLevel, tObj->BaseLevel); + lastLevel = MIN2(lastLevel, tObj->BaseLevel + baseImage->MaxLog2); + lastLevel = MIN2(lastLevel, tObj->MaxLevel); + lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */ + log2Width = tObj->Image[firstLevel]->WidthLog2; + log2Height = tObj->Image[firstLevel]->HeightLog2; + break; + case GL_TEXTURE_RECTANGLE_NV: + firstLevel = lastLevel = 0; + log2Width = log2Height = 1; /* ? */ + break; + default: + return; + } + + /* save these values */ + t->firstLevel = firstLevel; + t->lastLevel = lastLevel; + + numLevels = lastLevel - firstLevel + 1; + + if (R200_DEBUG & DEBUG_TEXTURE) + fprintf(stderr, + "%s: firstLevel %d last Level %d w,h: %d,%d log(w,h) %d,%d\n", + __FUNCTION__, firstLevel, lastLevel, + tObj->Image[firstLevel]->Width, + tObj->Image[firstLevel]->Height, + tObj->Image[firstLevel]->WidthLog2, + tObj->Image[firstLevel]->HeightLog2); + + + assert(numLevels <= RADEON_MAX_TEXTURE_LEVELS); + + for ( i = 0 ; i < numLevels ; i++ ) { + const struct gl_texture_image *texImage; + GLuint size; + + texImage = tObj->Image[i + firstLevel]; + 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; + } + + if (target == GL_TEXTURE_RECTANGLE_NV) + size = ((width*baseImage->TexFormat->TexelBytes+63)&~63) * height; + else + size = width * height * baseImage->TexFormat->TexelBytes; + + totalSize += size; + + if (target != GL_TEXTURE_RECTANGLE_NV) { + 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, baseImage->Width, baseImage->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 &= ~R200_MAX_MIP_LEVEL_MASK; + t->pp_txfilter |= (numLevels - 1) << R200_MAX_MIP_LEVEL_SHIFT; + + t->pp_txformat &= ~(R200_TXFORMAT_WIDTH_MASK | + R200_TXFORMAT_HEIGHT_MASK); + t->pp_txformat |= ((log2Width << R200_TXFORMAT_WIDTH_SHIFT) | + (log2Height << R200_TXFORMAT_HEIGHT_SHIFT)); + + t->pp_txsize = (((tObj->Image[firstLevel]->Width - 1) << 0) | + ((tObj->Image[firstLevel]->Height - 1) << 16)); + + /* Only need to round to nearest 32 for textures, but the blitter + * requires 64-byte aligned pitches, and we may/may not need the + * blitter. + */ + t->pp_txpitch = ((tObj->Image[firstLevel]->Width * baseImage->TexFormat->TexelBytes) + 63) & ~(63); + t->pp_txpitch -= 32; + + t->dirty_state = TEX_ALL; + + r200UploadTexImages( rmesa, t ); +} + + + +/* ================================================================ + * Texture combine functions + */ + +#define R200_DISABLE 0 +#define R200_REPLACE 1 +#define R200_MODULATE 2 +#define R200_DECAL 3 +#define R200_BLEND 4 +#define R200_ADD 5 +#define R200_MAX_COMBFUNC 6 + +static GLuint r200_color_combine[][R200_MAX_COMBFUNC] = +{ + /* Unit 0: + */ + { + /* Disable combiner stage + */ + (R200_TXC_ARG_A_ZERO | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_DIFFUSE_COLOR | + R200_TXC_OP_MADD), + + /* GL_REPLACE = 0x00802800 + */ + (R200_TXC_ARG_A_ZERO | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_R0_COLOR | + R200_TXC_OP_MADD), + + /* GL_MODULATE = 0x00800142 + */ + (R200_TXC_ARG_A_DIFFUSE_COLOR | /* current starts in DIFFUSE */ + R200_TXC_ARG_B_R0_COLOR | + R200_TXC_ARG_C_ZERO | + R200_TXC_OP_MADD), + + /* GL_DECAL = 0x008c2d42 + */ + (R200_TXC_ARG_A_DIFFUSE_COLOR | + R200_TXC_ARG_B_R0_COLOR | + R200_TXC_ARG_C_R0_ALPHA | + R200_TXC_OP_LERP), + + /* GL_BLEND = 0x008c2902 + */ + (R200_TXC_ARG_A_DIFFUSE_COLOR | + R200_TXC_ARG_B_TFACTOR_COLOR | + R200_TXC_ARG_C_R0_COLOR | + R200_TXC_OP_LERP), + + /* GL_ADD = 0x00812802 + */ + (R200_TXC_ARG_A_DIFFUSE_COLOR | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_R0_COLOR | + R200_TXC_COMP_ARG_B | + R200_TXC_OP_MADD), + }, + + /* Unit 1: + */ + { + /* Disable combiner stage + */ + (R200_TXC_ARG_A_ZERO | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_R0_COLOR | + R200_TXC_OP_MADD), + + /* GL_REPLACE = 0x00803000 + */ + (R200_TXC_ARG_A_ZERO | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_R1_COLOR | + R200_TXC_OP_MADD), + + /* GL_MODULATE = 0x00800182 + */ + (R200_TXC_ARG_A_R0_COLOR | /* current in R0 thereafter */ + R200_TXC_ARG_B_R1_COLOR | + R200_TXC_ARG_C_ZERO | + R200_TXC_OP_MADD), + + /* GL_DECAL = 0x008c3582 + */ + (R200_TXC_ARG_A_R0_COLOR | + R200_TXC_ARG_B_R1_COLOR | + R200_TXC_ARG_C_R1_ALPHA | + R200_TXC_OP_LERP), + + /* GL_BLEND = 0x008c3102 + */ + (R200_TXC_ARG_A_R0_COLOR | + R200_TXC_ARG_B_TFACTOR_COLOR | + R200_TXC_ARG_C_R1_COLOR | + R200_TXC_OP_LERP), + + /* GL_ADD = 0x00813002 + */ + (R200_TXC_ARG_A_R0_COLOR | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_R1_COLOR | + R200_TXC_COMP_ARG_B | + R200_TXC_OP_MADD), + }, + + /* Unit 2: + */ + { + /* Disable combiner stage + */ + (R200_TXC_ARG_A_ZERO | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_R0_COLOR | + R200_TXC_OP_MADD), + + /* GL_REPLACE = 0x00803800 + */ + (R200_TXC_ARG_A_ZERO | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_R2_COLOR | + R200_TXC_OP_MADD), + + /* GL_MODULATE = 0x008001c2 + */ + (R200_TXC_ARG_A_R0_COLOR | + R200_TXC_ARG_B_R2_COLOR | + R200_TXC_ARG_C_ZERO | + R200_TXC_OP_MADD), + + /* GL_DECAL = 0x008c3dc2 + */ + (R200_TXC_ARG_A_R0_COLOR | + R200_TXC_ARG_B_R2_COLOR | + R200_TXC_ARG_C_R2_ALPHA | + R200_TXC_OP_LERP), + + /* GL_BLEND = 0x008c3902 + */ + (R200_TXC_ARG_A_R0_COLOR | + R200_TXC_ARG_B_TFACTOR_COLOR | + R200_TXC_ARG_C_R2_COLOR | + R200_TXC_OP_LERP), + + /* GL_ADD = 0x00813802 + */ + (R200_TXC_ARG_A_R0_COLOR | + R200_TXC_ARG_B_ZERO | + R200_TXC_ARG_C_R2_COLOR | + R200_TXC_COMP_ARG_B | + R200_TXC_OP_MADD), + } +}; + +static GLuint r200_alpha_combine[][R200_MAX_COMBFUNC] = +{ + /* Unit 0: + */ + { + /* Disable combiner stage + */ + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_DIFFUSE_ALPHA | + R200_TXA_OP_MADD), + + + /* GL_REPLACE = 0x00800500 + */ + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R0_ALPHA | + R200_TXA_OP_MADD), + + /* GL_MODULATE = 0x00800051 + */ + (R200_TXA_ARG_A_DIFFUSE_ALPHA | + R200_TXA_ARG_B_R0_ALPHA | + R200_TXA_ARG_C_ZERO | + R200_TXA_OP_MADD), + + /* GL_DECAL = 0x00800100 + */ + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_DIFFUSE_ALPHA | + R200_TXA_OP_MADD), + + /* GL_BLEND = 0x00800051 + */ + (R200_TXA_ARG_A_DIFFUSE_ALPHA | + R200_TXA_ARG_B_TFACTOR_ALPHA | + R200_TXA_ARG_C_R0_ALPHA | + R200_TXA_OP_LERP), + + /* GL_ADD = 0x00800051 + */ + (R200_TXA_ARG_A_DIFFUSE_ALPHA | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R0_ALPHA | + R200_TXC_COMP_ARG_B | + R200_TXA_OP_MADD), + }, + + /* Unit 1: + */ + { + /* Disable combiner stage + */ + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R0_ALPHA | + R200_TXA_OP_MADD), + + /* GL_REPLACE = 0x00800600 + */ + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R1_ALPHA | + R200_TXA_OP_MADD), + + /* GL_MODULATE = 0x00800061 + */ + (R200_TXA_ARG_A_R0_ALPHA | + R200_TXA_ARG_B_R1_ALPHA | + R200_TXA_ARG_C_ZERO | + R200_TXA_OP_MADD), + + /* GL_DECAL = 0x00800100 + */ + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R0_ALPHA | + R200_TXA_OP_MADD), + + /* GL_BLEND = 0x00800061 + */ + (R200_TXA_ARG_A_R0_ALPHA | + R200_TXA_ARG_B_TFACTOR_ALPHA | + R200_TXA_ARG_C_R1_ALPHA | + R200_TXA_OP_LERP), + + /* GL_ADD = 0x00800061 + */ + (R200_TXA_ARG_A_R0_ALPHA | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R1_ALPHA | + R200_TXC_COMP_ARG_B | + R200_TXA_OP_MADD), + }, + + /* Unit 2: + */ + { + /* Disable combiner stage + */ + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R0_ALPHA | + R200_TXA_OP_MADD), + + /* GL_REPLACE = 0x00800700 + */ + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R2_ALPHA | + R200_TXA_OP_MADD), + + /* GL_MODULATE = 0x00800071 + */ + (R200_TXA_ARG_A_R0_ALPHA | + R200_TXA_ARG_B_R2_ALPHA | + R200_TXA_ARG_C_ZERO | + R200_TXA_OP_MADD), + + /* GL_DECAL = 0x00800100 + */ + (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R0_ALPHA | + R200_TXA_OP_MADD), + + /* GL_BLEND = 0x00800071 + */ + (R200_TXA_ARG_A_R0_ALPHA | + R200_TXA_ARG_B_TFACTOR_ALPHA | + R200_TXA_ARG_C_R2_ALPHA | + R200_TXA_OP_LERP), + + /* GL_ADD = 0x00800021 + */ + (R200_TXA_ARG_A_R0_ALPHA | + R200_TXA_ARG_B_ZERO | + R200_TXA_ARG_C_R2_ALPHA | + R200_TXC_COMP_ARG_B | + R200_TXA_OP_MADD), + } +}; + + +/* GL_ARB_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 r200_register_color[][R200_MAX_TEXTURE_UNITS] = +{ + { + R200_TXC_ARG_A_R0_COLOR, + R200_TXC_ARG_A_R1_COLOR, + R200_TXC_ARG_A_R2_COLOR + }, + { + R200_TXC_ARG_A_R0_COLOR | R200_TXC_COMP_ARG_A, + R200_TXC_ARG_A_R1_COLOR | R200_TXC_COMP_ARG_A, + R200_TXC_ARG_A_R2_COLOR | R200_TXC_COMP_ARG_A + }, + { + R200_TXC_ARG_A_R0_ALPHA, + R200_TXC_ARG_A_R1_ALPHA, + R200_TXC_ARG_A_R2_ALPHA + }, + { + R200_TXC_ARG_A_R0_ALPHA | R200_TXC_COMP_ARG_A, + R200_TXC_ARG_A_R1_ALPHA | R200_TXC_COMP_ARG_A, + R200_TXC_ARG_A_R2_ALPHA | R200_TXC_COMP_ARG_A + }, +}; + +static GLuint r200_tfactor_color[] = +{ + R200_TXC_ARG_A_TFACTOR_COLOR, + R200_TXC_ARG_A_TFACTOR_COLOR | R200_TXC_COMP_ARG_A, + R200_TXC_ARG_A_TFACTOR_ALPHA, + R200_TXC_ARG_A_TFACTOR_ALPHA | R200_TXC_COMP_ARG_A +}; + +static GLuint r200_primary_color[] = +{ + R200_TXC_ARG_A_DIFFUSE_COLOR, + R200_TXC_ARG_A_DIFFUSE_COLOR | R200_TXC_COMP_ARG_A, + R200_TXC_ARG_A_DIFFUSE_ALPHA, + R200_TXC_ARG_A_DIFFUSE_ALPHA | R200_TXC_COMP_ARG_A +}; + + +/* The alpha tables only have GL_SRC_ALPHA and GL_ONE_MINUS_SRC_ALPHA. + */ +static GLuint r200_register_alpha[][R200_MAX_TEXTURE_UNITS] = +{ + { + R200_TXA_ARG_A_R0_ALPHA, + R200_TXA_ARG_A_R1_ALPHA, + R200_TXA_ARG_A_R2_ALPHA + }, + { + R200_TXA_ARG_A_R0_ALPHA | R200_TXC_COMP_ARG_A, + R200_TXA_ARG_A_R1_ALPHA | R200_TXC_COMP_ARG_A, + R200_TXA_ARG_A_R2_ALPHA | R200_TXC_COMP_ARG_A + }, +}; + +static GLuint r200_tfactor_alpha[] = +{ + R200_TXA_ARG_A_TFACTOR_ALPHA, + R200_TXA_ARG_A_TFACTOR_ALPHA | R200_TXC_COMP_ARG_A +}; + +static GLuint r200_primary_alpha[] = +{ + R200_TXA_ARG_A_DIFFUSE_ALPHA, + R200_TXA_ARG_A_DIFFUSE_ALPHA | R200_TXC_COMP_ARG_A +}; + + + +/* Extract the arg from slot A, shift it into the correct argument slot + * and set the corresponding complement bit. + */ +#define R200_COLOR_ARG( n, arg ) \ +do { \ + color_combine |= \ + ((color_arg[n] & R200_TXC_ARG_A_MASK) \ + << R200_TXC_ARG_##arg##_SHIFT); \ + color_combine |= \ + ((color_arg[n] >> R200_TXC_COMP_ARG_A_SHIFT) \ + << R200_TXC_COMP_ARG_##arg##_SHIFT); \ +} while (0) + +#define R200_ALPHA_ARG( n, arg ) \ +do { \ + alpha_combine |= \ + ((alpha_arg[n] & R200_TXA_ARG_A_MASK) \ + << R200_TXA_ARG_##arg##_SHIFT); \ + alpha_combine |= \ + ((alpha_arg[n] >> R200_TXA_COMP_ARG_A_SHIFT) \ + << R200_TXA_COMP_ARG_##arg##_SHIFT); \ +} while (0) + + +/* ================================================================ + * Texture unit state management + */ + +static void r200UpdateTextureEnv( GLcontext *ctx, int unit ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + GLuint color_combine, alpha_combine; + GLuint color_scale = rmesa->hw.pix[unit].cmd[PIX_PP_TXCBLEND2]; + GLuint alpha_scale = rmesa->hw.pix[unit].cmd[PIX_PP_TXABLEND2]; + + if ( R200_DEBUG & DEBUG_TEXTURE ) { + fprintf( stderr, "%s( %p, %d )\n", __FUNCTION__, ctx, unit ); + } + + /* Set the texture environment state. Isn't this nice and clean? + * The R200 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. + */ + if ( !texUnit->_ReallyEnabled ) { + /* Don't cache these results. + */ + rmesa->state.texture.unit[unit].format = 0; + rmesa->state.texture.unit[unit].envMode = 0; + color_combine = r200_color_combine[unit][R200_DISABLE]; + alpha_combine = r200_alpha_combine[unit][R200_DISABLE]; + } + else { + const struct gl_texture_object *tObj = texUnit->_Current; + const GLenum format = tObj->Image[tObj->BaseLevel]->Format; + GLuint color_arg[3], alpha_arg[3]; + GLuint i, numColorArgs = 0, numAlphaArgs = 0; + GLuint RGBshift = texUnit->CombineScaleShiftRGB; + GLuint Ashift = texUnit->CombineScaleShiftA; + + switch ( texUnit->EnvMode ) { + case GL_REPLACE: + switch ( format ) { + case GL_RGBA: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + color_combine = r200_color_combine[unit][R200_REPLACE]; + alpha_combine = r200_alpha_combine[unit][R200_REPLACE]; + break; + case GL_ALPHA: + color_combine = r200_color_combine[unit][R200_DISABLE]; + alpha_combine = r200_alpha_combine[unit][R200_REPLACE]; + break; + case GL_LUMINANCE: + case GL_RGB: + case GL_YCBCR_MESA: + color_combine = r200_color_combine[unit][R200_REPLACE]; + alpha_combine = r200_alpha_combine[unit][R200_DISABLE]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_MODULATE: + switch ( format ) { + case GL_RGBA: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + color_combine = r200_color_combine[unit][R200_MODULATE]; + alpha_combine = r200_alpha_combine[unit][R200_MODULATE]; + break; + case GL_ALPHA: + color_combine = r200_color_combine[unit][R200_DISABLE]; + alpha_combine = r200_alpha_combine[unit][R200_MODULATE]; + break; + case GL_RGB: + case GL_LUMINANCE: + case GL_YCBCR_MESA: + color_combine = r200_color_combine[unit][R200_MODULATE]; + alpha_combine = r200_alpha_combine[unit][R200_DISABLE]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_DECAL: + switch ( format ) { + case GL_RGBA: + case GL_RGB: + case GL_YCBCR_MESA: + color_combine = r200_color_combine[unit][R200_DECAL]; + alpha_combine = r200_alpha_combine[unit][R200_DISABLE]; + break; + case GL_ALPHA: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + color_combine = r200_color_combine[unit][R200_DISABLE]; + alpha_combine = r200_alpha_combine[unit][R200_DISABLE]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_BLEND: + switch ( format ) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_YCBCR_MESA: + color_combine = r200_color_combine[unit][R200_BLEND]; + alpha_combine = r200_alpha_combine[unit][R200_MODULATE]; + break; + case GL_ALPHA: + color_combine = r200_color_combine[unit][R200_DISABLE]; + alpha_combine = r200_alpha_combine[unit][R200_MODULATE]; + break; + case GL_INTENSITY: + color_combine = r200_color_combine[unit][R200_BLEND]; + alpha_combine = r200_alpha_combine[unit][R200_BLEND]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_ADD: + switch ( format ) { + case GL_RGBA: + case GL_RGB: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_YCBCR_MESA: + color_combine = r200_color_combine[unit][R200_ADD]; + alpha_combine = r200_alpha_combine[unit][R200_MODULATE]; + break; + case GL_ALPHA: + color_combine = r200_color_combine[unit][R200_DISABLE]; + alpha_combine = r200_alpha_combine[unit][R200_MODULATE]; + break; + case GL_INTENSITY: + color_combine = r200_color_combine[unit][R200_ADD]; + alpha_combine = r200_alpha_combine[unit][R200_ADD]; + break; + case GL_COLOR_INDEX: + default: + return; + } + break; + + case GL_COMBINE: + /* Don't cache these results. + */ + rmesa->state.texture.unit[unit].format = 0; + rmesa->state.texture.unit[unit].envMode = 0; + + /* 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: + case GL_SUBTRACT: + case GL_DOT3_RGB: + case GL_DOT3_RGBA: + case GL_DOT3_RGB_EXT: + case GL_DOT3_RGBA_EXT: + numColorArgs = 2; + break; + case GL_INTERPOLATE: + numColorArgs = 3; + break; + default: + return; + } + + switch ( texUnit->CombineModeA ) { + case GL_REPLACE: + numAlphaArgs = 1; + break; + case GL_SUBTRACT: + case GL_MODULATE: + case GL_ADD: + case GL_ADD_SIGNED: + numAlphaArgs = 2; + break; + case GL_INTERPOLATE: + numAlphaArgs = 3; + break; + default: + return; + } + + /* Step 1: + * Extract the color and alpha combine function arguments. + */ + for ( i = 0 ; i < numColorArgs ; i++ ) { + const GLuint op = texUnit->CombineOperandRGB[i] - GL_SRC_COLOR; + assert(op >= 0); + assert(op <= 3); + switch ( texUnit->CombineSourceRGB[i] ) { + case GL_TEXTURE: + color_arg[i] = r200_register_color[op][unit]; + break; + case GL_CONSTANT: + color_arg[i] = r200_tfactor_color[op]; + break; + case GL_PRIMARY_COLOR: + color_arg[i] = r200_primary_color[op]; + break; + case GL_PREVIOUS: + if (unit == 0) + color_arg[i] = r200_primary_color[op]; + else + color_arg[i] = r200_register_color[op][0]; + break; + default: + return; + } + } + + for ( i = 0 ; i < numAlphaArgs ; i++ ) { + const GLuint op = texUnit->CombineOperandA[i] - GL_SRC_ALPHA; + assert(op >= 0); + assert(op <= 1); + switch ( texUnit->CombineSourceA[i] ) { + case GL_TEXTURE: + alpha_arg[i] = r200_register_alpha[op][unit]; + break; + case GL_CONSTANT: + alpha_arg[i] = r200_tfactor_alpha[op]; + break; + case GL_PRIMARY_COLOR: + alpha_arg[i] = r200_primary_alpha[op]; + break; + case GL_PREVIOUS: + if (unit == 0) + alpha_arg[i] = r200_primary_alpha[op]; + else + alpha_arg[i] = r200_register_alpha[op][0]; + break; + default: + return; + } + } + + /* Step 2: + * Build up the color and alpha combine functions. + */ + switch ( texUnit->CombineModeRGB ) { + case GL_REPLACE: + color_combine = (R200_TXC_ARG_A_ZERO | + R200_TXC_ARG_B_ZERO | + R200_TXC_OP_MADD); + R200_COLOR_ARG( 0, C ); + break; + case GL_MODULATE: + color_combine = (R200_TXC_ARG_C_ZERO | + R200_TXC_OP_MADD); + R200_COLOR_ARG( 0, A ); + R200_COLOR_ARG( 1, B ); + break; + case GL_ADD: + color_combine = (R200_TXC_ARG_B_ZERO | + R200_TXC_COMP_ARG_B | + R200_TXC_OP_MADD); + R200_COLOR_ARG( 0, A ); + R200_COLOR_ARG( 1, C ); + break; + case GL_SUBTRACT: + color_combine = (R200_TXC_ARG_B_ZERO | + R200_TXC_COMP_ARG_B | + R200_TXC_NEG_ARG_C | + R200_TXC_OP_MADD); + R200_COLOR_ARG( 0, A ); + R200_COLOR_ARG( 1, C ); + break; + case GL_ADD_SIGNED: + color_combine = (R200_TXC_ARG_B_ZERO | + R200_TXC_COMP_ARG_B | + R200_TXC_BIAS_ARG_C | /* new */ + R200_TXC_OP_MADD); /* was ADDSIGNED */ + R200_COLOR_ARG( 0, A ); + R200_COLOR_ARG( 1, C ); + break; + case GL_INTERPOLATE: + color_combine = (R200_TXC_OP_LERP); + R200_COLOR_ARG( 0, B ); + R200_COLOR_ARG( 1, A ); + R200_COLOR_ARG( 2, C ); + break; + + case GL_DOT3_RGB_EXT: + case GL_DOT3_RGBA_EXT: + RGBshift = 0; + Ashift = 0; + /* FALLTHROUGH */ + + case GL_DOT3_RGB: + case GL_DOT3_RGBA: + /* DOT3 works differently on R200 than on R100. On R100, just + * setting the DOT3 mode did everything for you. On R200, the + * driver has to enable the biasing (the -0.5 in the combine + * equation), and it has add the 4x scale factor. The hardware + * only supports up to 8x in the post filter, so 2x part of it + * happens on the inputs going into the combiner. + */ + + RGBshift++; + Ashift = RGBshift; + + color_combine = (R200_TXC_ARG_C_ZERO | + R200_TXC_OP_DOT3 | + R200_TXC_BIAS_ARG_A | + R200_TXC_BIAS_ARG_B | + R200_TXC_SCALE_ARG_A | + R200_TXC_SCALE_ARG_B); + R200_COLOR_ARG( 0, A ); + R200_COLOR_ARG( 1, B ); + break; + + default: + return; + } + + switch ( texUnit->CombineModeA ) { + case GL_REPLACE: + alpha_combine = (R200_TXA_ARG_A_ZERO | + R200_TXA_ARG_B_ZERO | + R200_TXA_OP_MADD); + R200_ALPHA_ARG( 0, C ); + break; + case GL_MODULATE: + alpha_combine = (R200_TXA_ARG_C_ZERO | + R200_TXA_OP_MADD); + R200_ALPHA_ARG( 0, A ); + R200_ALPHA_ARG( 1, B ); + break; + case GL_ADD: + alpha_combine = (R200_TXA_ARG_B_ZERO | + R200_TXC_COMP_ARG_B | + R200_TXA_OP_MADD); + R200_ALPHA_ARG( 0, A ); + R200_ALPHA_ARG( 1, C ); + break; + case GL_SUBTRACT: + alpha_combine = (R200_TXA_ARG_B_ZERO | + R200_TXC_COMP_ARG_B | + R200_TXC_NEG_ARG_C | + R200_TXA_OP_MADD); + R200_ALPHA_ARG( 0, A ); + R200_ALPHA_ARG( 1, C ); + break; + case GL_ADD_SIGNED: + alpha_combine = (R200_TXA_ARG_B_ZERO | + R200_TXC_COMP_ARG_B | + R200_TXC_BIAS_ARG_C | /* new */ + R200_TXA_OP_MADD); /* was ADDSIGNED */ + R200_ALPHA_ARG( 0, A ); + R200_ALPHA_ARG( 1, C ); + break; + case GL_INTERPOLATE: + alpha_combine = (R200_TXA_OP_LERP); + R200_ALPHA_ARG( 0, B ); + R200_ALPHA_ARG( 1, A ); + R200_ALPHA_ARG( 2, C ); + break; + default: + return; + } + + if ( texUnit->CombineModeRGB == GL_DOT3_RGB ) { + alpha_scale |= R200_TXA_DOT_ALPHA; + } + + /* Step 3: + * Apply the scale factor. The EXT version of the DOT3 extension does + * not support the scale factor, but the ARB version (and the version in + * OpenGL 1.3) does. + */ + color_scale &= ~R200_TXC_SCALE_MASK; + alpha_scale &= ~R200_TXA_SCALE_MASK; + color_scale |= (RGBshift << R200_TXC_SCALE_SHIFT); + alpha_scale |= (Ashift << R200_TXA_SCALE_SHIFT); + + /* All done! + */ + break; + + default: + return; + } + } + + if ( rmesa->hw.pix[unit].cmd[PIX_PP_TXCBLEND] != color_combine || + rmesa->hw.pix[unit].cmd[PIX_PP_TXABLEND] != alpha_combine || + rmesa->hw.pix[unit].cmd[PIX_PP_TXCBLEND2] != color_scale || + rmesa->hw.pix[unit].cmd[PIX_PP_TXABLEND2] != alpha_scale) { + R200_STATECHANGE( rmesa, pix[unit] ); + rmesa->hw.pix[unit].cmd[PIX_PP_TXCBLEND] = color_combine; + rmesa->hw.pix[unit].cmd[PIX_PP_TXABLEND] = alpha_combine; + rmesa->hw.pix[unit].cmd[PIX_PP_TXCBLEND2] = color_scale; + rmesa->hw.pix[unit].cmd[PIX_PP_TXABLEND2] = alpha_scale; + } +} + +#define TEXOBJ_TXFILTER_MASK (R200_MAX_MIP_LEVEL_MASK | \ + R200_MIN_FILTER_MASK | \ + R200_MAG_FILTER_MASK | \ + R200_MAX_ANISO_MASK | \ + R200_YUV_TO_RGB | \ + R200_YUV_TEMPERATURE_MASK | \ + R200_CLAMP_S_MASK | \ + R200_CLAMP_T_MASK) + +#define TEXOBJ_TXFORMAT_MASK (R200_TXFORMAT_WIDTH_MASK | \ + R200_TXFORMAT_HEIGHT_MASK | \ + R200_TXFORMAT_FORMAT_MASK | \ + R200_TXFORMAT_ALPHA_IN_MAP | \ + R200_TXFORMAT_NON_POWER2) + + + +static void import_tex_obj_state( r200ContextPtr rmesa, + int unit, + r200TexObjPtr texobj ) +{ + GLuint *cmd = R200_DB_STATE( tex[unit] ); + + cmd[TEX_PP_TXFILTER] &= ~TEXOBJ_TXFILTER_MASK; + cmd[TEX_PP_TXFILTER] |= texobj->pp_txfilter & TEXOBJ_TXFILTER_MASK; + cmd[TEX_PP_TXFORMAT] &= ~TEXOBJ_TXFORMAT_MASK; + cmd[TEX_PP_TXFORMAT] |= texobj->pp_txformat & TEXOBJ_TXFORMAT_MASK; + cmd[TEX_PP_TXSIZE] = texobj->pp_txsize; /* NPOT only! */ + cmd[TEX_PP_TXPITCH] = texobj->pp_txpitch; /* NPOT only! */ + cmd[TEX_PP_TXOFFSET] = texobj->pp_txoffset; + cmd[TEX_PP_BORDER_COLOR] = texobj->pp_border_color; + texobj->dirty_state &= ~(1<hw.tex[unit] ); +} + + + + +static void set_texgen_matrix( r200ContextPtr rmesa, + GLuint unit, + GLfloat *s_plane, + GLfloat *t_plane ) +{ + static const GLfloat scale_identity[4] = { 1,1,1,1 }; + + if (!TEST_EQ_4V( s_plane, scale_identity) || + !(TEST_EQ_4V( t_plane, scale_identity))) { + rmesa->TexGenEnabled |= R200_TEXMAT_0_ENABLE<TexGenMatrix[unit].m[0] = s_plane[0]; + rmesa->TexGenMatrix[unit].m[4] = s_plane[1]; + rmesa->TexGenMatrix[unit].m[8] = s_plane[2]; + rmesa->TexGenMatrix[unit].m[12] = s_plane[3]; + + rmesa->TexGenMatrix[unit].m[1] = t_plane[0]; + rmesa->TexGenMatrix[unit].m[5] = t_plane[1]; + rmesa->TexGenMatrix[unit].m[9] = t_plane[2]; + rmesa->TexGenMatrix[unit].m[13] = t_plane[3]; + rmesa->NewGLState |= _NEW_TEXTURE_MATRIX; + } +} + +/* Ignoring the Q texcoord for now. + * + * Returns GL_FALSE if fallback required. + */ +static GLboolean r200_validate_texgen( GLcontext *ctx, GLuint unit ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + GLuint inputshift = R200_TEXGEN_0_INPUT_SHIFT + unit*4; + GLuint tmp = rmesa->TexGenEnabled; + + rmesa->TexGenCompSel &= ~(R200_OUTPUT_TEX_0 << unit); + rmesa->TexGenEnabled &= ~(R200_TEXGEN_TEXMAT_0_ENABLE<TexGenEnabled &= ~(R200_TEXMAT_0_ENABLE<TexGenInputs &= ~(R200_TEXGEN_INPUT_MASK<TexGenNeedNormals[unit] = 0; + + if (0) + fprintf(stderr, "%s unit %d\n", __FUNCTION__, unit); + + if ((texUnit->TexGenEnabled & (S_BIT|T_BIT)) == 0) { + /* Disabled, no fallback: + */ + rmesa->TexGenInputs |= + (R200_TEXGEN_INPUT_TEXCOORD_0+unit) << inputshift; + return GL_TRUE; + } + else if (texUnit->TexGenEnabled & Q_BIT) { + /* Very easy to do this, in fact would remove a fallback case + * elsewhere, but I haven't done it yet... Fallback: + */ + fprintf(stderr, "fallback Q_BIT\n"); + return GL_FALSE; + } + else if ((texUnit->TexGenEnabled & (S_BIT|T_BIT)) != (S_BIT|T_BIT) || + texUnit->GenModeS != texUnit->GenModeT) { + /* Mixed modes, fallback: + */ +/* fprintf(stderr, "fallback mixed texgen\n"); */ + return GL_FALSE; + } + else + rmesa->TexGenEnabled |= R200_TEXGEN_TEXMAT_0_ENABLE << unit; + + switch (texUnit->GenModeS) { + case GL_OBJECT_LINEAR: + rmesa->TexGenInputs |= R200_TEXGEN_INPUT_OBJ << inputshift; + set_texgen_matrix( rmesa, unit, + texUnit->ObjectPlaneS, + texUnit->ObjectPlaneT); + break; + + case GL_EYE_LINEAR: + rmesa->TexGenInputs |= R200_TEXGEN_INPUT_EYE << inputshift; + set_texgen_matrix( rmesa, unit, + texUnit->EyePlaneS, + texUnit->EyePlaneT); + break; + + case GL_REFLECTION_MAP_NV: + rmesa->TexGenNeedNormals[unit] = GL_TRUE; + rmesa->TexGenInputs |= R200_TEXGEN_INPUT_EYE_REFLECT<TexGenNeedNormals[unit] = GL_TRUE; + rmesa->TexGenInputs |= R200_TEXGEN_INPUT_EYE_NORMAL<TexGenNeedNormals[unit] = GL_TRUE; + rmesa->TexGenInputs |= R200_TEXGEN_INPUT_SPHERE<TexGenCompSel |= R200_OUTPUT_TEX_0 << unit; + + if (tmp != rmesa->TexGenEnabled) { + rmesa->NewGLState |= _NEW_TEXTURE_MATRIX; + } + + if (0) + fprintf(stderr, "%s unit %d neednormals %d\n", __FUNCTION__, unit, + rmesa->TexGenNeedNormals[unit]); + + return GL_TRUE; +} + + +static void disable_tex( GLcontext *ctx, int unit ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (rmesa->hw.ctx.cmd[CTX_PP_CNTL] & (R200_TEX_0_ENABLE<state.texture.unit[unit].texobj = 0; + R200_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~((R200_TEX_0_ENABLE | + R200_TEX_BLEND_0_ENABLE) << unit); + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_BLEND_0_ENABLE; + + R200_STATECHANGE( rmesa, tcl ); + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_1] &= ~(7 << (unit * 3)); + + if (rmesa->TclFallback & (R200_TCL_FALLBACK_TEXGEN_0<2 texunits. + */ + if (unit == 0) + r200UpdateTextureEnv( ctx, unit ); + + + { + GLuint inputshift = R200_TEXGEN_0_INPUT_SHIFT + unit*4; + GLuint tmp = rmesa->TexGenEnabled; + + rmesa->TexGenEnabled &= ~(R200_TEXGEN_TEXMAT_0_ENABLE<TexGenEnabled &= ~(R200_TEXMAT_0_ENABLE<TexGenEnabled &= ~(R200_TEXGEN_INPUT_MASK<TexGenNeedNormals[unit] = 0; + rmesa->TexGenCompSel &= ~(R200_OUTPUT_TEX_0 << unit); + rmesa->TexGenInputs &= ~(R200_TEXGEN_INPUT_MASK<TexGenEnabled) { + rmesa->recheck_texgen[unit] = GL_TRUE; + rmesa->NewGLState |= _NEW_TEXTURE_MATRIX; + } + } + } +} + +static GLboolean enable_tex_2d( GLcontext *ctx, int unit ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + struct gl_texture_object *tObj = texUnit->_Current; + r200TexObjPtr t = (r200TexObjPtr) tObj->DriverData; + + /* Need to load the 2d images associated with this unit. + */ + if (t->pp_txformat & R200_TXFORMAT_NON_POWER2) { + t->pp_txformat &= ~R200_TXFORMAT_NON_POWER2; + t->dirty_images = ~0; + } + + if ( t->dirty_images ) { + R200_FIREVERTICES( rmesa ); + r200SetTexImages( rmesa, tObj, GL_TEXTURE_2D ); + if ( !t->memBlock ) + return GL_FALSE; + } + + return GL_TRUE; +} + +static GLboolean enable_tex_rect( GLcontext *ctx, int unit ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + struct gl_texture_object *tObj = texUnit->_Current; + r200TexObjPtr t = (r200TexObjPtr) tObj->DriverData; + + if (!(t->pp_txformat & R200_TXFORMAT_NON_POWER2)) { + t->pp_txformat |= R200_TXFORMAT_NON_POWER2; + t->dirty_images = ~0; + } + + if ( t->dirty_images ) { + R200_FIREVERTICES( rmesa ); + r200SetTexImages( rmesa, tObj, GL_TEXTURE_RECTANGLE_NV ); + if ( !t->memBlock && !rmesa->prefer_agp_client_texturing ) + return GL_FALSE; + } + + return GL_TRUE; +} + + +static GLboolean update_tex_common( GLcontext *ctx, int unit ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + struct gl_texture_object *tObj = texUnit->_Current; + r200TexObjPtr t = (r200TexObjPtr) tObj->DriverData; + GLenum format; + + /* Fallback if there's a texture border */ + if ( tObj->Image[tObj->BaseLevel]->Border > 0 ) + return GL_FALSE; + + /* Update state if this is a different texture object to last + * time. + */ + if ( rmesa->state.texture.unit[unit].texobj != t ) { + rmesa->state.texture.unit[unit].texobj = t; + t->dirty_state |= 1<hw.ctx.cmd[CTX_PP_CNTL] & (R200_TEX_0_ENABLE<hw.ctx.cmd[CTX_PP_CNTL] |= (R200_TEX_0_ENABLE | + R200_TEX_BLEND_0_ENABLE) << unit; + + R200_STATECHANGE( rmesa, vtx ); + rmesa->hw.vtx.cmd[VTX_TCL_OUTPUT_VTXFMT_1] |= 4 << (unit * 3); + + rmesa->recheck_texgen[unit] = GL_TRUE; + } + + if (t->dirty_state & (1<recheck_texgen[unit]) { + GLboolean fallback = !r200_validate_texgen( ctx, unit ); + TCL_FALLBACK( ctx, (R200_TCL_FALLBACK_TEXGEN_0<recheck_texgen[unit] = 0; + rmesa->NewGLState |= _NEW_TEXTURE_MATRIX; + } + + format = tObj->Image[tObj->BaseLevel]->Format; + if ( rmesa->state.texture.unit[unit].format != format || + rmesa->state.texture.unit[unit].envMode != texUnit->EnvMode ) { + rmesa->state.texture.unit[unit].format = format; + rmesa->state.texture.unit[unit].envMode = texUnit->EnvMode; + r200UpdateTextureEnv( ctx, unit ); + } + + return GL_TRUE; +} + + + +static GLboolean r200UpdateTextureUnit( GLcontext *ctx, int unit ) +{ + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + + if ( texUnit->_ReallyEnabled & (TEXTURE0_RECT) ) { + return (enable_tex_rect( ctx, unit ) && + update_tex_common( ctx, unit )); + } + else if ( texUnit->_ReallyEnabled & (TEXTURE0_1D|TEXTURE0_2D) ) { + return (enable_tex_2d( ctx, unit ) && + update_tex_common( ctx, unit )); + } + else if ( texUnit->_ReallyEnabled ) { + return GL_FALSE; + } + else { + disable_tex( ctx, unit ); + return GL_TRUE; + } +} + + +void r200UpdateTextureState( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLboolean ok; + GLuint dbg; + + ok = (r200UpdateTextureUnit( ctx, 0 ) && + r200UpdateTextureUnit( ctx, 1 )); + + FALLBACK( rmesa, R200_FALLBACK_TEXTURE, !ok ); + + if (rmesa->TclFallback) + r200ChooseVertexState( ctx ); + + /* + * T0 hang workaround ------------- + */ +#if 1 + if ((rmesa->hw.ctx.cmd[CTX_PP_CNTL] & R200_TEX_ENABLE_MASK) == R200_TEX_0_ENABLE && + (rmesa->hw.tex[0].cmd[TEX_PP_TXFILTER] & R200_MIN_FILTER_MASK) > R200_MIN_FILTER_LINEAR) { + + R200_STATECHANGE(rmesa, ctx); + R200_STATECHANGE(rmesa, tex[1]); + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_TEX_1_ENABLE; + rmesa->hw.tex[1].cmd[TEX_PP_TXFORMAT] &= ~TEXOBJ_TXFORMAT_MASK; + rmesa->hw.tex[1].cmd[TEX_PP_TXFORMAT] |= 0x08000000; + } + else { + if ((rmesa->hw.ctx.cmd[CTX_PP_CNTL] & R200_TEX_1_ENABLE) && + (rmesa->hw.tex[1].cmd[TEX_PP_TXFORMAT] & 0x08000000)) { + R200_STATECHANGE(rmesa, tex[1]); + rmesa->hw.tex[1].cmd[TEX_PP_TXFORMAT] &= ~0x08000000; + } + } +#endif + +#if 1 + /* + * Texture cache LRU hang workaround ------------- + */ + dbg = 0x0; + if (((rmesa->hw.ctx.cmd[CTX_PP_CNTL] & R200_TEX_0_ENABLE) && + ((((rmesa->hw.tex[0].cmd[TEX_PP_TXFILTER] & R200_MIN_FILTER_MASK)) & + 0x04) == 0))) + { + dbg |= 0x02; + } + + if (((rmesa->hw.ctx.cmd[CTX_PP_CNTL] & R200_TEX_1_ENABLE) && + ((((rmesa->hw.tex[1].cmd[TEX_PP_TXFILTER] & R200_MIN_FILTER_MASK)) & + 0x04) == 0))) + { + dbg |= 0x04; + } + + if (dbg != rmesa->hw.tam.cmd[TAM_DEBUG3]) { + R200_STATECHANGE( rmesa, tam ); + rmesa->hw.tam.cmd[TAM_DEBUG3] = dbg; + if (0) printf("TEXCACHE LRU HANG WORKAROUND %x\n", dbg); + } +#endif +} + +/* + also tests for higher texunits: + + ((rmesa->hw.ctx.cmd[CTX_PP_CNTL] & R200_TEX_2_ENABLE) && + ((((rmesa->hw.tex[2].cmd[TEX_PP_TXFILTER] & R200_MIN_FILTER_MASK)) & 0x04) == 0)) || + ((rmesa->hw.ctx.cmd[CTX_PP_CNTL] & R200_TEX_4_ENABLE) && + ((((rmesa->hw.tex[4].cmd[TEX_PP_TXFILTER] & R200_MIN_FILTER_MASK)) & 0x04) == 0))) + + ((rmesa->hw.ctx.cmd[CTX_PP_CNTL] & R200_TEX_3_ENABLE) && + ((((rmesa->hw.tex[3].cmd[TEX_PP_TXFILTER] & R200_MIN_FILTER_MASK)) & 0x04) == 0)) || + ((rmesa->hw.ctx.cmd[CTX_PP_CNTL] & R200_TEX_5_ENABLE) && + ((((rmesa->hw.tex[5].cmd[TEX_PP_TXFILTER] & R200_MIN_FILTER_MASK)) & 0x04) == 0))) + +*/ Index: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt.c:1.3 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt.c Mon Dec 16 11:18:55 2002 @@ -0,0 +1,1153 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt.c,v 1.3 2002/12/16 16:18:55 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "glheader.h" +#include "r200_context.h" +#include "r200_state.h" +#include "r200_ioctl.h" +#include "r200_tex.h" +#include "r200_tcl.h" +#include "r200_vtxfmt.h" + +#include "api_noop.h" +#include "api_arrayelt.h" +#include "context.h" +#include "mem.h" +#include "mmath.h" +#include "mtypes.h" +#include "enums.h" +#include "glapi.h" +#include "colormac.h" +#include "light.h" +#include "state.h" +#include "vtxfmt.h" + +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "tnl/t_array_api.h" + +struct r200_vb vb; + +static void r200FlushVertices( GLcontext *, GLuint ); + +static void count_func( const char *name, struct dynfn *l ) +{ + int i = 0; + struct dynfn *f; + foreach (f, l) i++; + if (i) fprintf(stderr, "%s: %d\n", name, i ); +} + +static void count_funcs( r200ContextPtr rmesa ) +{ + count_func( "Vertex2f", &rmesa->vb.dfn_cache.Vertex2f ); + count_func( "Vertex2fv", &rmesa->vb.dfn_cache.Vertex2fv ); + count_func( "Vertex3f", &rmesa->vb.dfn_cache.Vertex3f ); + count_func( "Vertex3fv", &rmesa->vb.dfn_cache.Vertex3fv ); + count_func( "Color4ub", &rmesa->vb.dfn_cache.Color4ub ); + count_func( "Color4ubv", &rmesa->vb.dfn_cache.Color4ubv ); + count_func( "Color3ub", &rmesa->vb.dfn_cache.Color3ub ); + count_func( "Color3ubv", &rmesa->vb.dfn_cache.Color3ubv ); + count_func( "Color4f", &rmesa->vb.dfn_cache.Color4f ); + count_func( "Color4fv", &rmesa->vb.dfn_cache.Color4fv ); + count_func( "Color3f", &rmesa->vb.dfn_cache.Color3f ); + count_func( "Color3fv", &rmesa->vb.dfn_cache.Color3fv ); + count_func( "SecondaryColor3f", &rmesa->vb.dfn_cache.SecondaryColor3fEXT ); + count_func( "SecondaryColor3fv", &rmesa->vb.dfn_cache.SecondaryColor3fvEXT ); + count_func( "SecondaryColor3ub", &rmesa->vb.dfn_cache.SecondaryColor3ubEXT ); + count_func( "SecondaryColor3ubv", &rmesa->vb.dfn_cache.SecondaryColor3ubvEXT ); + count_func( "Normal3f", &rmesa->vb.dfn_cache.Normal3f ); + count_func( "Normal3fv", &rmesa->vb.dfn_cache.Normal3fv ); + count_func( "TexCoord2f", &rmesa->vb.dfn_cache.TexCoord2f ); + count_func( "TexCoord2fv", &rmesa->vb.dfn_cache.TexCoord2fv ); + count_func( "TexCoord1f", &rmesa->vb.dfn_cache.TexCoord1f ); + count_func( "TexCoord1fv", &rmesa->vb.dfn_cache.TexCoord1fv ); + count_func( "MultiTexCoord2fARB", &rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + count_func( "MultiTexCoord2fvARB", &rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + count_func( "MultiTexCoord1fARB", &rmesa->vb.dfn_cache.MultiTexCoord1fARB ); + count_func( "MultiTexCoord1fvARB", &rmesa->vb.dfn_cache.MultiTexCoord1fvARB ); +} + + +void r200_copy_to_current( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + assert(ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT); + assert(vb.context == ctx); + + if (rmesa->vb.vtxfmt_0 & R200_VTX_N0) { + ctx->Current.Normal[0] = vb.normalptr[0]; + ctx->Current.Normal[1] = vb.normalptr[1]; + ctx->Current.Normal[2] = vb.normalptr[2]; + } + + switch( VTX_COLOR(rmesa->vb.vtxfmt_0, 0) ) { + case R200_VTX_PK_RGBA: + ctx->Current.Color[0] = UBYTE_TO_FLOAT( vb.colorptr->red ); + ctx->Current.Color[1] = UBYTE_TO_FLOAT( vb.colorptr->green ); + ctx->Current.Color[2] = UBYTE_TO_FLOAT( vb.colorptr->blue ); + ctx->Current.Color[3] = UBYTE_TO_FLOAT( vb.colorptr->alpha ); + break; + + case R200_VTX_FP_RGB: + ctx->Current.Color[0] = vb.floatcolorptr[0]; + ctx->Current.Color[1] = vb.floatcolorptr[1]; + ctx->Current.Color[2] = vb.floatcolorptr[2]; + break; + + case R200_VTX_FP_RGBA: + ctx->Current.Color[0] = vb.floatcolorptr[0]; + ctx->Current.Color[1] = vb.floatcolorptr[1]; + ctx->Current.Color[2] = vb.floatcolorptr[2]; + ctx->Current.Color[3] = vb.floatcolorptr[3]; + break; + + default: + break; + } + + if (VTX_COLOR(rmesa->vb.vtxfmt_0, 1) == R200_VTX_PK_RGBA) { + ctx->Current.SecondaryColor[0] = UBYTE_TO_FLOAT( vb.specptr->red ); + ctx->Current.SecondaryColor[1] = UBYTE_TO_FLOAT( vb.specptr->green ); + ctx->Current.SecondaryColor[2] = UBYTE_TO_FLOAT( vb.specptr->blue ); + } + + if (rmesa->vb.vtxfmt_1 & (7 << R200_VTX_TEX0_COMP_CNT_SHIFT)) { + ctx->Current.Texcoord[0][0] = vb.texcoordptr[0][0]; + ctx->Current.Texcoord[0][1] = vb.texcoordptr[0][1]; + ctx->Current.Texcoord[0][2] = 0.0F; + ctx->Current.Texcoord[0][3] = 1.0F; + } + + if (rmesa->vb.vtxfmt_1 & (7 << R200_VTX_TEX1_COMP_CNT_SHIFT)) { + ctx->Current.Texcoord[1][0] = vb.texcoordptr[1][0]; + ctx->Current.Texcoord[1][1] = vb.texcoordptr[1][1]; + ctx->Current.Texcoord[1][2] = 0.0F; + ctx->Current.Texcoord[1][3] = 1.0F; + } + + ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT; +} + +static GLboolean discreet_gl_prim[GL_POLYGON+1] = { + 1, /* 0 points */ + 1, /* 1 lines */ + 0, /* 2 line_strip */ + 0, /* 3 line_loop */ + 1, /* 4 tris */ + 0, /* 5 tri_fan */ + 0, /* 6 tri_strip */ + 1, /* 7 quads */ + 0, /* 8 quadstrip */ + 0, /* 9 poly */ +}; + +static void flush_prims( r200ContextPtr rmesa ) +{ + int i,j; + struct r200_dma_region tmp = rmesa->dma.current; + + tmp.buf->refcount++; + tmp.aos_size = vb.vertex_size; + tmp.aos_stride = vb.vertex_size; + tmp.aos_start = GET_START(&tmp); + + rmesa->dma.current.ptr = rmesa->dma.current.start += + (vb.initial_counter - vb.counter) * vb.vertex_size * 4; + + rmesa->tcl.vertex_format = rmesa->vb.vtxfmt_0; + rmesa->tcl.aos_components[0] = &tmp; + rmesa->tcl.nr_aos_components = 1; + rmesa->dma.flush = 0; + + /* Optimize the primitive list: + */ + if (rmesa->vb.nrprims > 1) { + for (j = 0, i = 1 ; i < rmesa->vb.nrprims; i++) { + int pj = rmesa->vb.primlist[j].prim & 0xf; + int pi = rmesa->vb.primlist[i].prim & 0xf; + + if (pj == pi && discreet_gl_prim[pj] && + rmesa->vb.primlist[i].start == rmesa->vb.primlist[j].end) { + rmesa->vb.primlist[j].end = rmesa->vb.primlist[i].end; + } + else { + j++; + if (j != i) rmesa->vb.primlist[j] = rmesa->vb.primlist[i]; + } + } + rmesa->vb.nrprims = j+1; + } + + if (rmesa->vb.vtxfmt_0 != rmesa->hw.vtx.cmd[VTX_VTXFMT_0] || + rmesa->vb.vtxfmt_1 != rmesa->hw.vtx.cmd[VTX_VTXFMT_1]) { + R200_STATECHANGE( rmesa, vtx ); + rmesa->hw.vtx.cmd[VTX_VTXFMT_0] = rmesa->vb.vtxfmt_0; + rmesa->hw.vtx.cmd[VTX_VTXFMT_1] = rmesa->vb.vtxfmt_1; + } + + + for (i = 0 ; i < rmesa->vb.nrprims; i++) { + if (R200_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "vtxfmt prim %d: %s %d..%d\n", i, + _mesa_lookup_enum_by_nr( rmesa->vb.primlist[i].prim & + PRIM_MODE_MASK ), + rmesa->vb.primlist[i].start, + rmesa->vb.primlist[i].end); + + if (rmesa->vb.primlist[i].start < rmesa->vb.primlist[i].end) + r200EmitPrimitive( vb.context, + rmesa->vb.primlist[i].start, + rmesa->vb.primlist[i].end, + rmesa->vb.primlist[i].prim ); + } + + rmesa->vb.nrprims = 0; + r200ReleaseDmaRegion( rmesa, &tmp, __FUNCTION__ ); +} + + +static void start_prim( r200ContextPtr rmesa, GLuint mode ) +{ + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s %d\n", __FUNCTION__, vb.initial_counter - vb.counter); + + rmesa->vb.primlist[rmesa->vb.nrprims].start = vb.initial_counter - vb.counter; + rmesa->vb.primlist[rmesa->vb.nrprims].prim = mode; +} + +static void note_last_prim( r200ContextPtr rmesa, GLuint flags ) +{ + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s %d\n", __FUNCTION__, vb.initial_counter - vb.counter); + + if (rmesa->vb.prim[0] != GL_POLYGON+1) { + rmesa->vb.primlist[rmesa->vb.nrprims].prim |= flags; + rmesa->vb.primlist[rmesa->vb.nrprims].end = vb.initial_counter - vb.counter; + + if (++(rmesa->vb.nrprims) == R200_MAX_PRIMS) + flush_prims( rmesa ); + } +} + + +static void copy_vertex( r200ContextPtr rmesa, GLuint n, GLfloat *dst ) +{ + GLuint i; + GLfloat *src = (GLfloat *)(rmesa->dma.current.address + + rmesa->dma.current.ptr + + (rmesa->vb.primlist[rmesa->vb.nrprims].start + n) * + vb.vertex_size * 4); + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "copy_vertex %d\n", rmesa->vb.primlist[rmesa->vb.nrprims].start + n); + + for (i = 0 ; i < vb.vertex_size; i++) { + dst[i] = src[i]; + } +} + +/* NOTE: This actually reads the copied vertices back from uncached + * memory. Could also use the counter/notify mechanism to populate + * tmp on the fly as vertices are generated. + */ +static GLuint copy_dma_verts( r200ContextPtr rmesa, GLfloat (*tmp)[15] ) +{ + GLuint ovf, i; + GLuint nr = (vb.initial_counter - vb.counter) - rmesa->vb.primlist[rmesa->vb.nrprims].start; + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s %d verts\n", __FUNCTION__, nr); + + switch( rmesa->vb.prim[0] ) + { + case GL_POINTS: + return 0; + case GL_LINES: + ovf = nr&1; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + case GL_TRIANGLES: + ovf = nr%3; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + case GL_QUADS: + ovf = nr&3; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + case GL_LINE_STRIP: + if (nr == 0) + return 0; + copy_vertex( rmesa, nr-1, tmp[0] ); + return 1; + case GL_LINE_LOOP: + case GL_TRIANGLE_FAN: + case GL_POLYGON: + if (nr == 0) + return 0; + else if (nr == 1) { + copy_vertex( rmesa, 0, tmp[0] ); + return 1; + } else { + copy_vertex( rmesa, 0, tmp[0] ); + copy_vertex( rmesa, nr-1, tmp[1] ); + return 2; + } + case GL_TRIANGLE_STRIP: + ovf = MIN2( nr-1, 2 ); + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + case GL_QUAD_STRIP: + ovf = MIN2( nr-1, 2 ); + if (nr > 2) ovf += nr&1; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + default: + assert(0); + return 0; + } +} + +static void VFMT_FALLBACK_OUTSIDE_BEGIN_END( const char *caller ) +{ + GLcontext *ctx = vb.context; + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & (DEBUG_VFMT|DEBUG_FALLBACKS)) + fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); + + if (ctx->Driver.NeedFlush) + r200FlushVertices( ctx, ctx->Driver.NeedFlush ); + + if (ctx->NewState) + _mesa_update_state( ctx ); /* clear state so fell_back sticks */ + + _tnl_wakeup_exec( ctx ); + + assert( rmesa->dma.flush == 0 ); + rmesa->vb.fell_back = GL_TRUE; + rmesa->vb.installed = GL_FALSE; +/* vb.context = 0; */ +} + + +static void VFMT_FALLBACK( const char *caller ) +{ + GLcontext *ctx = vb.context; + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLfloat tmp[3][15]; + GLuint i, prim; + GLuint ind0 = rmesa->vb.vtxfmt_0; + GLuint ind1 = rmesa->vb.vtxfmt_1; + GLuint nrverts; + GLfloat alpha = 1.0; + + if (R200_DEBUG & (DEBUG_FALLBACKS|DEBUG_VFMT)) + fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); + + if (rmesa->vb.prim[0] == GL_POLYGON+1) { + VFMT_FALLBACK_OUTSIDE_BEGIN_END( __FUNCTION__ ); + return; + } + + /* Copy vertices out of dma: + */ + nrverts = copy_dma_verts( rmesa, tmp ); + + /* Finish the prim at this point: + */ + note_last_prim( rmesa, 0 ); + flush_prims( rmesa ); + + /* Update ctx->Driver.CurrentExecPrimitive and swap in swtnl. + */ + prim = rmesa->vb.prim[0]; + ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1; + _tnl_wakeup_exec( ctx ); + + assert(rmesa->dma.flush == 0); + rmesa->vb.fell_back = GL_TRUE; + rmesa->vb.installed = GL_FALSE; + vb.context = 0; + glBegin( prim ); + + if (rmesa->vb.installed_color_3f_sz == 4) + alpha = ctx->Current.Color[3]; + + /* Replay saved vertices + */ + for (i = 0 ; i < nrverts; i++) { + GLuint offset = 3; + if (ind0 & R200_VTX_N0) { + glNormal3fv( &tmp[i][offset] ); + offset += 3; + } + + if (VTX_COLOR(ind0, 0) == R200_VTX_PK_RGBA) { + glColor4ubv( (GLubyte *)&tmp[i][offset] ); + offset++; + } + else if (VTX_COLOR(ind0, 0) == R200_VTX_FP_RGBA) { + glColor4fv( &tmp[i][offset] ); + offset+=4; + } + else if (VTX_COLOR(ind0, 0) == R200_VTX_FP_RGB) { + glColor3fv( &tmp[i][offset] ); + offset+=3; + } + + if (VTX_COLOR(ind0, 1) == R200_VTX_PK_RGBA) { + _glapi_Dispatch->SecondaryColor3ubvEXT( (GLubyte *)&tmp[i][offset] ); + offset++; + } + + if (ind1 & (7 << R200_VTX_TEX0_COMP_CNT_SHIFT)) { + glTexCoord2fv( &tmp[i][offset] ); + offset += 2; + } + + if (ind1 & (7 << R200_VTX_TEX1_COMP_CNT_SHIFT)) { + glMultiTexCoord2fvARB( GL_TEXTURE1_ARB, &tmp[i][offset] ); + offset += 2; + } + + glVertex3fv( &tmp[i][0] ); + } + + /* Replay current vertex + */ + if (ind0 & R200_VTX_N0) + glNormal3fv( vb.normalptr ); + + if (VTX_COLOR(ind0, 0) == R200_VTX_PK_RGBA) + glColor4ub( vb.colorptr->red, vb.colorptr->green, vb.colorptr->blue, vb.colorptr->alpha ); + else if (VTX_COLOR(ind0, 0) == R200_VTX_FP_RGBA) + glColor4fv( vb.floatcolorptr ); + else if (VTX_COLOR(ind0, 0) == R200_VTX_FP_RGB) { + if (rmesa->vb.installed_color_3f_sz == 4 && alpha != 1.0) + glColor4f( vb.floatcolorptr[0], + vb.floatcolorptr[1], + vb.floatcolorptr[2], + alpha ); + else + glColor3fv( vb.floatcolorptr ); + } + + if (VTX_COLOR(ind0, 1) == R200_VTX_PK_RGBA) + _glapi_Dispatch->SecondaryColor3ubEXT( vb.specptr->red, vb.specptr->green, vb.specptr->blue ); + + if (ind1 & (7 << R200_VTX_TEX0_COMP_CNT_SHIFT)) + glTexCoord2fv( vb.texcoordptr[0] ); + + if (ind1 & (7 << R200_VTX_TEX1_COMP_CNT_SHIFT)) + glMultiTexCoord2fvARB( GL_TEXTURE1_ARB, vb.texcoordptr[1] ); +} + + + +static void wrap_buffer( void ) +{ + GLcontext *ctx = vb.context; + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLfloat tmp[3][15]; + GLuint i, nrverts; + + if (R200_DEBUG & (DEBUG_VFMT|DEBUG_PRIMS)) + fprintf(stderr, "%s %d\n", __FUNCTION__, vb.initial_counter - vb.counter); + + /* Don't deal with parity. + */ + if ((((vb.initial_counter - vb.counter) - + rmesa->vb.primlist[rmesa->vb.nrprims].start) & 1)) { + vb.counter++; + vb.initial_counter++; + return; + } + + /* Copy vertices out of dma: + */ + if (rmesa->vb.prim[0] == GL_POLYGON+1) + nrverts = 0; + else { + nrverts = copy_dma_verts( rmesa, tmp ); + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%d vertices to copy\n", nrverts); + + /* Finish the prim at this point: + */ + note_last_prim( rmesa, 0 ); + } + + /* Fire any buffered primitives + */ + flush_prims( rmesa ); + + /* Get new buffer + */ + r200RefillCurrentDmaRegion( rmesa ); + + /* Reset counter, dmaptr + */ + vb.dmaptr = (int *)(rmesa->dma.current.ptr + rmesa->dma.current.address); + vb.counter = (rmesa->dma.current.end - rmesa->dma.current.ptr) / + (vb.vertex_size * 4); + vb.counter--; + vb.initial_counter = vb.counter; + vb.notify = wrap_buffer; + + rmesa->dma.flush = flush_prims; + + /* Restart wrapped primitive: + */ + if (rmesa->vb.prim[0] != GL_POLYGON+1) + start_prim( rmesa, rmesa->vb.prim[0] ); + + + /* Reemit saved vertices + */ + for (i = 0 ; i < nrverts; i++) { + if (R200_DEBUG & DEBUG_VERTS) { + int j; + fprintf(stderr, "re-emit vertex %d to %p\n", i, vb.dmaptr); + if (R200_DEBUG & DEBUG_VERBOSE) + for (j = 0 ; j < vb.vertex_size; j++) + fprintf(stderr, "\t%08x/%f\n", *(int*)&tmp[i][j], tmp[i][j]); + } + + memcpy( vb.dmaptr, tmp[i], vb.vertex_size * 4 ); + vb.dmaptr += vb.vertex_size; + vb.counter--; + } +} + + + +static GLboolean check_vtx_fmt( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + GLuint ind0 = R200_VTX_Z0; + GLuint ind1 = 0; + + if (rmesa->TclFallback || rmesa->vb.fell_back || ctx->CompileFlag) + return GL_FALSE; + + if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) + ctx->Driver.FlushVertices( ctx, FLUSH_UPDATE_CURRENT ); + + /* Make all this event-driven: + */ + if (ctx->Light.Enabled) { + ind0 |= R200_VTX_N0; + + /* TODO: make this data driven: If we receive only ubytes, send + * color as ubytes. Also check if converting (with free + * checking for overflow) is cheaper than sending floats + * directly. + */ + if (ctx->Light.ColorMaterialEnabled) { + if (1 || ctx->Color.AlphaEnabled) + ind0 |= R200_VTX_FP_RGBA << R200_VTX_COLOR_0_SHIFT; + else + ind0 |= R200_VTX_FP_RGB << R200_VTX_COLOR_0_SHIFT; + } + } + else { + /* TODO: make this data driven? + */ + ind0 |= R200_VTX_PK_RGBA << R200_VTX_COLOR_0_SHIFT; + + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) { + ind0 |= R200_VTX_PK_RGBA << R200_VTX_COLOR_1_SHIFT; + } + } + + if (ctx->Texture.Unit[0]._ReallyEnabled) { + if (ctx->Texture.Unit[0].TexGenEnabled) { + if (rmesa->TexGenNeedNormals[0]) { + ind0 |= R200_VTX_N0; + } + } else { + if (ctx->Current.Texcoord[0][2] != 0.0F || + ctx->Current.Texcoord[0][3] != 1.0) { + if (R200_DEBUG & (DEBUG_VFMT|DEBUG_FALLBACKS)) + fprintf(stderr, "%s: rq0\n", __FUNCTION__); + return GL_FALSE; + } + ind1 |= 2 << R200_VTX_TEX0_COMP_CNT_SHIFT; + } + } + + if (ctx->Texture.Unit[1]._ReallyEnabled) { + if (ctx->Texture.Unit[1].TexGenEnabled) { + if (rmesa->TexGenNeedNormals[1]) { + ind0 |= R200_VTX_N0; + } + } else { + if (ctx->Current.Texcoord[1][2] != 0.0F || + ctx->Current.Texcoord[1][3] != 1.0) { + if (R200_DEBUG & (DEBUG_VFMT|DEBUG_FALLBACKS)) + fprintf(stderr, "%s: rq1\n", __FUNCTION__); + return GL_FALSE; + } + ind1 |= 2 << R200_VTX_TEX1_COMP_CNT_SHIFT; + } + } + + if (R200_DEBUG & (DEBUG_VFMT|DEBUG_STATE)) + fprintf(stderr, "%s: format: 0x%x, 0x%x\n", __FUNCTION__, ind0, ind1 ); + + R200_NEWPRIM(rmesa); + rmesa->vb.vtxfmt_0 = ind0; + rmesa->vb.vtxfmt_1 = ind1; + rmesa->vb.prim = &ctx->Driver.CurrentExecPrimitive; + + vb.vertex_size = 3; + vb.normalptr = ctx->Current.Normal; + vb.colorptr = NULL; + vb.floatcolorptr = ctx->Current.Color; + vb.specptr = NULL; + vb.floatspecptr = ctx->Current.SecondaryColor; + vb.texcoordptr[0] = ctx->Current.Texcoord[0]; + vb.texcoordptr[1] = ctx->Current.Texcoord[1]; + + /* Run through and initialize the vertex components in the order + * the hardware understands: + */ + if (ind0 & R200_VTX_N0) { + vb.normalptr = &vb.vertex[vb.vertex_size].f; + vb.vertex_size += 3; + vb.normalptr[0] = ctx->Current.Normal[0]; + vb.normalptr[1] = ctx->Current.Normal[1]; + vb.normalptr[2] = ctx->Current.Normal[2]; + } + + if (VTX_COLOR(ind0, 0) == R200_VTX_PK_RGBA) { + vb.colorptr = &vb.vertex[vb.vertex_size].color; + vb.vertex_size += 1; + UNCLAMPED_FLOAT_TO_CHAN( vb.colorptr->red, ctx->Current.Color[0] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.colorptr->green, ctx->Current.Color[1] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.colorptr->blue, ctx->Current.Color[2] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.colorptr->alpha, ctx->Current.Color[3] ); + } + else if (VTX_COLOR(ind0, 0) == R200_VTX_FP_RGBA) { + vb.floatcolorptr = &vb.vertex[vb.vertex_size].f; + vb.vertex_size += 4; + vb.floatcolorptr[0] = ctx->Current.Color[0]; + vb.floatcolorptr[1] = ctx->Current.Color[1]; + vb.floatcolorptr[2] = ctx->Current.Color[2]; + vb.floatcolorptr[3] = ctx->Current.Color[3]; + } + else if (VTX_COLOR(ind0, 0) == R200_VTX_FP_RGB) { + vb.floatcolorptr = &vb.vertex[vb.vertex_size].f; + vb.vertex_size += 3; + vb.floatcolorptr[0] = ctx->Current.Color[0]; + vb.floatcolorptr[1] = ctx->Current.Color[1]; + vb.floatcolorptr[2] = ctx->Current.Color[2]; + } + + if (VTX_COLOR(ind0, 1) == R200_VTX_PK_RGBA) { + vb.specptr = &vb.vertex[vb.vertex_size].color; + vb.vertex_size += 1; + UNCLAMPED_FLOAT_TO_CHAN( vb.specptr->red, ctx->Current.SecondaryColor[0] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.specptr->green, ctx->Current.SecondaryColor[1] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.specptr->blue, ctx->Current.SecondaryColor[2] ); + } + + + if (ind1 & (7 << R200_VTX_TEX0_COMP_CNT_SHIFT)) { + vb.texcoordptr[0] = &vb.vertex[vb.vertex_size].f; + vb.vertex_size += 2; + vb.texcoordptr[0][0] = ctx->Current.Texcoord[0][0]; + vb.texcoordptr[0][1] = ctx->Current.Texcoord[0][1]; + } + + if (ind1 & (7 << R200_VTX_TEX1_COMP_CNT_SHIFT)) { + vb.texcoordptr[1] = &vb.vertex[vb.vertex_size].f; + vb.vertex_size += 2; + vb.texcoordptr[1][0] = ctx->Current.Texcoord[1][0]; + vb.texcoordptr[1][1] = ctx->Current.Texcoord[1][1]; + } + + if (rmesa->vb.installed_vertex_format != rmesa->vb.vtxfmt_0) { + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "reinstall on vertex_format change\n"); + _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); + rmesa->vb.installed_vertex_format = rmesa->vb.vtxfmt_0; + } + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s -- success\n", __FUNCTION__); + + return GL_TRUE; +} + + +void r200VtxfmtInvalidate( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + rmesa->vb.recheck = GL_TRUE; + rmesa->vb.fell_back = GL_FALSE; +} + + +static void r200NewList( GLcontext *ctx, GLuint list, GLenum mode ) +{ + VFMT_FALLBACK_OUTSIDE_BEGIN_END( __FUNCTION__ ); +} + + +static void r200VtxfmtValidate( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (ctx->Driver.NeedFlush) + ctx->Driver.FlushVertices( ctx, ctx->Driver.NeedFlush ); + + rmesa->vb.recheck = GL_FALSE; + + if (check_vtx_fmt( ctx )) { + if (!rmesa->vb.installed) { + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "reinstall (new install)\n"); + + _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); + ctx->Driver.FlushVertices = r200FlushVertices; + ctx->Driver.NewList = r200NewList; + rmesa->vb.installed = GL_TRUE; + vb.context = ctx; + } + else if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s: already installed", __FUNCTION__); + } + else { + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s: failed\n", __FUNCTION__); + + if (rmesa->vb.installed) { + if (rmesa->dma.flush) + rmesa->dma.flush( rmesa ); + _tnl_wakeup_exec( ctx ); + rmesa->vb.installed = GL_FALSE; + vb.context = 0; + } + } +} + + + +/* Materials: + */ +static void r200_Materialfv( GLenum face, GLenum pname, + const GLfloat *params ) +{ + GLcontext *ctx = vb.context; + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->vb.prim[0] != GL_POLYGON+1) { + VFMT_FALLBACK( __FUNCTION__ ); + glMaterialfv( face, pname, params ); + return; + } + _mesa_noop_Materialfv( face, pname, params ); + r200UpdateMaterial( vb.context ); +} + + +/* Begin/End + */ +static void r200_Begin( GLenum mode ) +{ + GLcontext *ctx = vb.context; + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s( %s )\n", __FUNCTION__, + _mesa_lookup_enum_by_nr( mode )); + + if (mode > GL_POLYGON) { + _mesa_error( ctx, GL_INVALID_ENUM, "glBegin" ); + return; + } + + if (rmesa->vb.prim[0] != GL_POLYGON+1) { + _mesa_error( ctx, GL_INVALID_OPERATION, "glBegin" ); + return; + } + + if (ctx->NewState) + _mesa_update_state( ctx ); + + if (rmesa->NewGLState) + r200ValidateState( ctx ); + + if (rmesa->vb.recheck) + r200VtxfmtValidate( ctx ); + + if (!rmesa->vb.installed) { + glBegin( mode ); + return; + } + + + if (rmesa->dma.flush && vb.counter < 12) { + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s: flush almost-empty buffers\n", __FUNCTION__); + flush_prims( rmesa ); + } + + /* Need to arrange to save vertices here? Or always copy from dma (yuk)? + */ + if (!rmesa->dma.flush) { + if (rmesa->dma.current.ptr + 12*vb.vertex_size*4 > + rmesa->dma.current.end) { + R200_NEWPRIM( rmesa ); + r200RefillCurrentDmaRegion( rmesa ); + } + + vb.dmaptr = (int *)(rmesa->dma.current.address + rmesa->dma.current.ptr); + vb.counter = (rmesa->dma.current.end - rmesa->dma.current.ptr) / + (vb.vertex_size * 4); + vb.counter--; + vb.initial_counter = vb.counter; + vb.notify = wrap_buffer; + rmesa->dma.flush = flush_prims; + vb.context->Driver.NeedFlush |= FLUSH_STORED_VERTICES; + } + + + rmesa->vb.prim[0] = mode; + start_prim( rmesa, mode | PRIM_BEGIN ); +} + + + +static void r200_End( void ) +{ + GLcontext *ctx = vb.context; + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->vb.prim[0] == GL_POLYGON+1) { + _mesa_error( ctx, GL_INVALID_OPERATION, "glEnd" ); + return; + } + + note_last_prim( rmesa, PRIM_END ); + rmesa->vb.prim[0] = GL_POLYGON+1; +} + + +/* Fallback on difficult entrypoints: + */ +#define PRE_LOOPBACK( FUNC ) \ +do { \ + if (R200_DEBUG & DEBUG_VFMT) \ + fprintf(stderr, "%s\n", __FUNCTION__); \ + VFMT_FALLBACK( __FUNCTION__ ); \ +} while (0) +#define TAG(x) r200_fallback_##x +#include "vtxfmt_tmp.h" + + + +static GLboolean r200NotifyBegin( GLcontext *ctx, GLenum p ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + assert(!rmesa->vb.installed); + + if (ctx->NewState) + _mesa_update_state( ctx ); + + if (rmesa->NewGLState) + r200ValidateState( ctx ); + + if (ctx->Driver.NeedFlush) + ctx->Driver.FlushVertices( ctx, ctx->Driver.NeedFlush ); + + if (rmesa->vb.recheck) + r200VtxfmtValidate( ctx ); + + if (!rmesa->vb.installed) { + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s -- failed\n", __FUNCTION__); + return GL_FALSE; + } + + r200_Begin( p ); + return GL_TRUE; +} + +static void r200FlushVertices( GLcontext *ctx, GLuint flags ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + assert(rmesa->vb.installed); + assert(vb.context == ctx); + + if (flags & FLUSH_UPDATE_CURRENT) { + r200_copy_to_current( ctx ); + if (R200_DEBUG & DEBUG_VFMT) + fprintf(stderr, "reinstall on update_current\n"); + _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); + ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT; + } + + if (flags & FLUSH_STORED_VERTICES) { + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + assert (rmesa->dma.flush == 0 || + rmesa->dma.flush == flush_prims); + if (rmesa->dma.flush == flush_prims) + flush_prims( R200_CONTEXT( ctx ) ); + ctx->Driver.NeedFlush &= ~FLUSH_STORED_VERTICES; + } +} + + + +/* At this point, don't expect very many versions of each function to + * be generated, so not concerned about freeing them? + */ + + +void r200VtxfmtInit( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + GLvertexformat *vfmt = &(rmesa->vb.vtxfmt); + + MEMSET( vfmt, 0, sizeof(GLvertexformat) ); + + /* Hook in chooser functions for codegen, etc: + */ + r200VtxfmtInitChoosers( vfmt ); + + /* Handled fully in supported states, but no codegen: + */ + vfmt->Materialfv = r200_Materialfv; + vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ + vfmt->Rectf = _mesa_noop_Rectf; /* generic helper */ + vfmt->Begin = r200_Begin; + vfmt->End = r200_End; + + /* Fallback for performance reasons: (Fix with cva/elt path here and + * dmatmp2.h style primitive-merging) + * + * These should call NotifyBegin(), as should _tnl_EvalMesh, to allow + * a driver-hook. + */ + vfmt->DrawArrays = r200_fallback_DrawArrays; + vfmt->DrawElements = r200_fallback_DrawElements; + vfmt->DrawRangeElements = r200_fallback_DrawRangeElements; + + + /* Not active in supported states; just keep ctx->Current uptodate: + */ + vfmt->FogCoordfvEXT = _mesa_noop_FogCoordfvEXT; + vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT; + vfmt->EdgeFlag = _mesa_noop_EdgeFlag; + vfmt->EdgeFlagv = _mesa_noop_EdgeFlagv; + vfmt->Indexi = _mesa_noop_Indexi; + vfmt->Indexiv = _mesa_noop_Indexiv; + + + /* Active but unsupported -- fallback if we receive these: + */ + vfmt->CallList = r200_fallback_CallList; + vfmt->EvalCoord1f = r200_fallback_EvalCoord1f; + vfmt->EvalCoord1fv = r200_fallback_EvalCoord1fv; + vfmt->EvalCoord2f = r200_fallback_EvalCoord2f; + vfmt->EvalCoord2fv = r200_fallback_EvalCoord2fv; + vfmt->EvalMesh1 = r200_fallback_EvalMesh1; + vfmt->EvalMesh2 = r200_fallback_EvalMesh2; + vfmt->EvalPoint1 = r200_fallback_EvalPoint1; + vfmt->EvalPoint2 = r200_fallback_EvalPoint2; + vfmt->TexCoord3f = r200_fallback_TexCoord3f; + vfmt->TexCoord3fv = r200_fallback_TexCoord3fv; + vfmt->TexCoord4f = r200_fallback_TexCoord4f; + vfmt->TexCoord4fv = r200_fallback_TexCoord4fv; + vfmt->MultiTexCoord3fARB = r200_fallback_MultiTexCoord3fARB; + vfmt->MultiTexCoord3fvARB = r200_fallback_MultiTexCoord3fvARB; + vfmt->MultiTexCoord4fARB = r200_fallback_MultiTexCoord4fARB; + vfmt->MultiTexCoord4fvARB = r200_fallback_MultiTexCoord4fvARB; + vfmt->Vertex4f = r200_fallback_Vertex4f; + vfmt->Vertex4fv = r200_fallback_Vertex4fv; + + (void)r200_fallback_vtxfmt; + + TNL_CONTEXT(ctx)->Driver.NotifyBegin = r200NotifyBegin; + + vb.context = ctx; + rmesa->vb.enabled = 1; + rmesa->vb.prim = &ctx->Driver.CurrentExecPrimitive; + rmesa->vb.primflags = 0; + + make_empty_list( &rmesa->vb.dfn_cache.Vertex2f ); + make_empty_list( &rmesa->vb.dfn_cache.Vertex2fv ); + make_empty_list( &rmesa->vb.dfn_cache.Vertex3f ); + make_empty_list( &rmesa->vb.dfn_cache.Vertex3fv ); + make_empty_list( &rmesa->vb.dfn_cache.Color4ub ); + make_empty_list( &rmesa->vb.dfn_cache.Color4ubv ); + make_empty_list( &rmesa->vb.dfn_cache.Color3ub ); + make_empty_list( &rmesa->vb.dfn_cache.Color3ubv ); + make_empty_list( &rmesa->vb.dfn_cache.Color4f ); + make_empty_list( &rmesa->vb.dfn_cache.Color4fv ); + make_empty_list( &rmesa->vb.dfn_cache.Color3f ); + make_empty_list( &rmesa->vb.dfn_cache.Color3fv ); + make_empty_list( &rmesa->vb.dfn_cache.SecondaryColor3fEXT ); + make_empty_list( &rmesa->vb.dfn_cache.SecondaryColor3fvEXT ); + make_empty_list( &rmesa->vb.dfn_cache.SecondaryColor3ubEXT ); + make_empty_list( &rmesa->vb.dfn_cache.SecondaryColor3ubvEXT ); + make_empty_list( &rmesa->vb.dfn_cache.Normal3f ); + make_empty_list( &rmesa->vb.dfn_cache.Normal3fv ); + make_empty_list( &rmesa->vb.dfn_cache.TexCoord2f ); + make_empty_list( &rmesa->vb.dfn_cache.TexCoord2fv ); + make_empty_list( &rmesa->vb.dfn_cache.TexCoord1f ); + make_empty_list( &rmesa->vb.dfn_cache.TexCoord1fv ); + make_empty_list( &rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + make_empty_list( &rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + make_empty_list( &rmesa->vb.dfn_cache.MultiTexCoord1fARB ); + make_empty_list( &rmesa->vb.dfn_cache.MultiTexCoord1fvARB ); + + r200InitCodegen( &rmesa->vb.codegen ); +} + +static void free_funcs( struct dynfn *l ) +{ + struct dynfn *f, *tmp; + foreach_s (f, tmp, l) { + remove_from_list( f ); + ALIGN_FREE( f->code ); + FREE( f ); + } +} + +void r200VtxfmtUnbindContext( GLcontext *ctx ) +{ + if (R200_CONTEXT(ctx)->vb.installed) { + assert(vb.context == ctx); + VFMT_FALLBACK_OUTSIDE_BEGIN_END( __FUNCTION__ ); + } + + TNL_CONTEXT(ctx)->Driver.NotifyBegin = 0; +} + + +void r200VtxfmtMakeCurrent( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + +#if defined(THREADS) + static GLboolean ThreadSafe = GL_FALSE; /* In thread-safe mode? */ + if (!ThreadSafe) { + static unsigned long knownID; + static GLboolean firstCall = GL_TRUE; + if (firstCall) { + knownID = _glthread_GetID(); + firstCall = GL_FALSE; + } + else if (knownID != _glthread_GetID()) { + ThreadSafe = GL_TRUE; + + if (R200_DEBUG & (DEBUG_DRI|DEBUG_VFMT)) + fprintf(stderr, "**** Multithread situation!\n"); + } + } + if (ThreadSafe) + return; +#endif + + if (rmesa->vb.enabled) { + TNL_CONTEXT(ctx)->Driver.NotifyBegin = r200NotifyBegin; + } +} + + +void r200VtxfmtDestroy( GLcontext *ctx ) +{ + r200ContextPtr rmesa = R200_CONTEXT( ctx ); + + count_funcs( rmesa ); + free_funcs( &rmesa->vb.dfn_cache.Vertex2f ); + free_funcs( &rmesa->vb.dfn_cache.Vertex2fv ); + free_funcs( &rmesa->vb.dfn_cache.Vertex3f ); + free_funcs( &rmesa->vb.dfn_cache.Vertex3fv ); + free_funcs( &rmesa->vb.dfn_cache.Color4ub ); + free_funcs( &rmesa->vb.dfn_cache.Color4ubv ); + free_funcs( &rmesa->vb.dfn_cache.Color3ub ); + free_funcs( &rmesa->vb.dfn_cache.Color3ubv ); + free_funcs( &rmesa->vb.dfn_cache.Color4f ); + free_funcs( &rmesa->vb.dfn_cache.Color4fv ); + free_funcs( &rmesa->vb.dfn_cache.Color3f ); + free_funcs( &rmesa->vb.dfn_cache.Color3fv ); + free_funcs( &rmesa->vb.dfn_cache.SecondaryColor3ubEXT ); + free_funcs( &rmesa->vb.dfn_cache.SecondaryColor3ubvEXT ); + free_funcs( &rmesa->vb.dfn_cache.SecondaryColor3fEXT ); + free_funcs( &rmesa->vb.dfn_cache.SecondaryColor3fvEXT ); + free_funcs( &rmesa->vb.dfn_cache.Normal3f ); + free_funcs( &rmesa->vb.dfn_cache.Normal3fv ); + free_funcs( &rmesa->vb.dfn_cache.TexCoord2f ); + free_funcs( &rmesa->vb.dfn_cache.TexCoord2fv ); + free_funcs( &rmesa->vb.dfn_cache.TexCoord1f ); + free_funcs( &rmesa->vb.dfn_cache.TexCoord1fv ); + free_funcs( &rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + free_funcs( &rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + free_funcs( &rmesa->vb.dfn_cache.MultiTexCoord1fARB ); + free_funcs( &rmesa->vb.dfn_cache.MultiTexCoord1fvARB ); +} + Index: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt.h diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt.h:1.1 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt.h Wed Oct 30 07:51:53 2002 @@ -0,0 +1,128 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt.h,v 1.1 2002/10/30 12:51:53 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 __R200_VTXFMT_H__ +#define __R200_VTXFMT_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "r200_context.h" + + + +extern struct r200_vb vb; + + +extern void r200VtxfmtUpdate( GLcontext *ctx ); +extern void r200VtxfmtInit( GLcontext *ctx ); +extern void r200VtxfmtInvalidate( GLcontext *ctx ); +extern void r200VtxfmtDestroy( GLcontext *ctx ); +extern void r200VtxfmtInitChoosers( GLvertexformat *vfmt ); + +extern void r200VtxfmtMakeCurrent( GLcontext *ctx ); +extern void r200VtxfmtUnbindContext( GLcontext *ctx ); + +extern void r200_copy_to_current( GLcontext *ctx ); + +#define DFN( FUNC, CACHE) \ +do { \ + char *start = (char *)&FUNC; \ + char *end = (char *)&FUNC##_end; \ + insert_at_head( &CACHE, dfn ); \ + dfn->key[0] = key[0]; \ + dfn->key[1] = key[1]; \ + dfn->code = ALIGN_MALLOC( end - start, 16 ); \ + memcpy (dfn->code, start, end - start); \ +} \ +while ( 0 ) + +#define FIXUP( CODE, OFFSET, CHECKVAL, NEWVAL ) \ +do { \ + int *icode = (int *)(CODE+OFFSET); \ + assert (*icode == CHECKVAL); \ + *icode = (int)NEWVAL; \ +} while (0) + + +/* Useful for figuring out the offsets: + */ +#define FIXUP2( CODE, OFFSET, CHECKVAL, NEWVAL ) \ +do { \ + while (*(int *)(CODE+OFFSET) != CHECKVAL) OFFSET++; \ + fprintf(stderr, "%s/%d CVAL %x OFFSET %d VAL %x\n", __FUNCTION__, \ + __LINE__, CHECKVAL, OFFSET, (int)(NEWVAL)); \ + *(int *)(CODE+OFFSET) = (int)(NEWVAL); \ + OFFSET += 4; \ +} while (0) + +/* + */ +void r200InitCodegen( struct dfn_generators *gen ); +void r200InitX86Codegen( struct dfn_generators *gen ); +void r200InitSSECodegen( struct dfn_generators *gen ); + + + +/* Defined in r200_vtxfmt_x86.c + */ +struct dynfn *r200_makeX86Vertex2f( GLcontext *, const int * ); +struct dynfn *r200_makeX86Vertex2fv( GLcontext *, const int * ); +struct dynfn *r200_makeX86Vertex3f( GLcontext *, const int * ); +struct dynfn *r200_makeX86Vertex3fv( GLcontext *, const int * ); +struct dynfn *r200_makeX86Color4ub( GLcontext *, const int * ); +struct dynfn *r200_makeX86Color4ubv( GLcontext *, const int * ); +struct dynfn *r200_makeX86Color3ub( GLcontext *, const int * ); +struct dynfn *r200_makeX86Color3ubv( GLcontext *, const int * ); +struct dynfn *r200_makeX86Color4f( GLcontext *, const int * ); +struct dynfn *r200_makeX86Color4fv( GLcontext *, const int * ); +struct dynfn *r200_makeX86Color3f( GLcontext *, const int * ); +struct dynfn *r200_makeX86Color3fv( GLcontext *, const int * ); +struct dynfn *r200_makeX86SecondaryColor3ubEXT( GLcontext *, const int * ); +struct dynfn *r200_makeX86SecondaryColor3ubvEXT( GLcontext *, const int * ); +struct dynfn *r200_makeX86SecondaryColor3fEXT( GLcontext *, const int * ); +struct dynfn *r200_makeX86SecondaryColor3fvEXT( GLcontext *, const int * ); +struct dynfn *r200_makeX86Normal3f( GLcontext *, const int * ); +struct dynfn *r200_makeX86Normal3fv( GLcontext *, const int * ); +struct dynfn *r200_makeX86TexCoord2f( GLcontext *, const int * ); +struct dynfn *r200_makeX86TexCoord2fv( GLcontext *, const int * ); +struct dynfn *r200_makeX86TexCoord1f( GLcontext *, const int * ); +struct dynfn *r200_makeX86TexCoord1fv( GLcontext *, const int * ); +struct dynfn *r200_makeX86MultiTexCoord2fARB( GLcontext *, const int * ); +struct dynfn *r200_makeX86MultiTexCoord2fvARB( GLcontext *, const int * ); +struct dynfn *r200_makeX86MultiTexCoord1fARB( GLcontext *, const int * ); +struct dynfn *r200_makeX86MultiTexCoord1fvARB( GLcontext *, const int * ); + + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_c.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_c.c:1.2 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_c.c Mon Dec 16 11:18:56 2002 @@ -0,0 +1,795 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_c.c,v 1.2 2002/12/16 16:18:56 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 "mtypes.h" +#include "colormac.h" +#include "simple_list.h" +#include "api_noop.h" +#include "vtxfmt.h" + +#include "r200_vtxfmt.h" + +/* Fallback versions of all the entrypoints for situations where + * codegen isn't available. This is still a lot faster than the + * vb/pipeline implementation in Mesa. + */ +static void r200_Vertex3f( GLfloat x, GLfloat y, GLfloat z ) +{ + int i; + + *vb.dmaptr++ = *(int *)&x; + *vb.dmaptr++ = *(int *)&y; + *vb.dmaptr++ = *(int *)&z; + + for (i = 3; i < vb.vertex_size; i++) + *vb.dmaptr++ = vb.vertex[i].i; + + if (--vb.counter == 0) + vb.notify(); +} + + +static void r200_Vertex3fv( const GLfloat *v ) +{ + int i; + + *vb.dmaptr++ = *(int *)&v[0]; + *vb.dmaptr++ = *(int *)&v[1]; + *vb.dmaptr++ = *(int *)&v[2]; + + for (i = 3; i < vb.vertex_size; i++) + *vb.dmaptr++ = vb.vertex[i].i; + + if (--vb.counter == 0) + vb.notify(); +} + + +static void r200_Vertex2f( GLfloat x, GLfloat y ) +{ + int i; + + *vb.dmaptr++ = *(int *)&x; + *vb.dmaptr++ = *(int *)&y; + *vb.dmaptr++ = 0; + + for (i = 3; i < vb.vertex_size; i++) + *vb.dmaptr++ = vb.vertex[i].i; + + if (--vb.counter == 0) + vb.notify(); +} + + +static void r200_Vertex2fv( const GLfloat *v ) +{ + int i; + + *vb.dmaptr++ = *(int *)&v[0]; + *vb.dmaptr++ = *(int *)&v[1]; + *vb.dmaptr++ = 0; + + for (i = 3; i < vb.vertex_size; i++) + *vb.dmaptr++ = vb.vertex[i].i; + + if (--vb.counter == 0) + vb.notify(); +} + + + +/* Color for ubyte (packed) color formats: + */ +static void r200_Color3ub_ub( GLubyte r, GLubyte g, GLubyte b ) +{ + r200_color_t *dest = vb.colorptr; + dest->red = r; + dest->green = g; + dest->blue = b; + dest->alpha = 0xff; +} + +static void r200_Color3ubv_ub( const GLubyte *v ) +{ + r200_color_t *dest = vb.colorptr; + dest->red = v[0]; + dest->green = v[1]; + dest->blue = v[2]; + dest->alpha = 0xff; +} + +static void r200_Color4ub_ub( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +{ + r200_color_t *dest = vb.colorptr; + dest->red = r; + dest->green = g; + dest->blue = b; + dest->alpha = a; +} + +static void r200_Color4ubv_ub( const GLubyte *v ) +{ + *(GLuint *)vb.colorptr = LE32_TO_CPU(*(GLuint *)v); +} + + +static void r200_Color3f_ub( GLfloat r, GLfloat g, GLfloat b ) +{ + r200_color_t *dest = vb.colorptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, r ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, g ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, b ); + dest->alpha = 255; +} + +static void r200_Color3fv_ub( const GLfloat *v ) +{ + r200_color_t *dest = vb.colorptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, v[0] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, v[1] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, v[2] ); + dest->alpha = 255; +} + +static void r200_Color4f_ub( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) +{ + r200_color_t *dest = vb.colorptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, r ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, g ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, b ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->alpha, a ); +} + +static void r200_Color4fv_ub( const GLfloat *v ) +{ + r200_color_t *dest = vb.colorptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, v[0] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, v[1] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, v[2] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->alpha, v[3] ); +} + + +/* Color for float color+alpha formats: + */ +static void r200_Color3ub_4f( GLubyte r, GLubyte g, GLubyte b ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); + dest[3] = 1.0; +} + +static void r200_Color3ubv_4f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); + dest[3] = 1.0; +} + +static void r200_Color4ub_4f( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); + dest[3] = UBYTE_TO_FLOAT(a); +} + +static void r200_Color4ubv_4f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); + dest[3] = UBYTE_TO_FLOAT(v[3]); +} + + +static void r200_Color3f_4f( GLfloat r, GLfloat g, GLfloat b ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; + dest[3] = 1.0; +} + +static void r200_Color3fv_4f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; + dest[3] = 1.0; +} + +static void r200_Color4f_4f( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; + dest[3] = a; +} + +static void r200_Color4fv_4f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; + dest[3] = v[3]; +} + + +/* Color for float color formats: + */ +static void r200_Color3ub_3f( GLubyte r, GLubyte g, GLubyte b ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); +} + +static void r200_Color3ubv_3f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); +} + +static void r200_Color4ub_3f( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); + vb.context->Current.Color[3] = UBYTE_TO_FLOAT(a); +} + +static void r200_Color4ubv_3f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); + vb.context->Current.Color[3] = UBYTE_TO_FLOAT(v[3]); +} + + +static void r200_Color3f_3f( GLfloat r, GLfloat g, GLfloat b ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; +} + +static void r200_Color3fv_3f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; +} + +static void r200_Color4f_3f( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; + vb.context->Current.Color[3] = a; +} + +static void r200_Color4fv_3f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; + vb.context->Current.Color[3] = v[3]; +} + + +/* Secondary Color: + */ +static void r200_SecondaryColor3ubEXT_ub( GLubyte r, GLubyte g, GLubyte b ) +{ + r200_color_t *dest = vb.specptr; + dest->red = r; + dest->green = g; + dest->blue = b; + dest->alpha = 0xff; +} + +static void r200_SecondaryColor3ubvEXT_ub( const GLubyte *v ) +{ + r200_color_t *dest = vb.specptr; + dest->red = v[0]; + dest->green = v[1]; + dest->blue = v[2]; + dest->alpha = 0xff; +} + +static void r200_SecondaryColor3fEXT_ub( GLfloat r, GLfloat g, GLfloat b ) +{ + r200_color_t *dest = vb.specptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, r ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, g ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, b ); + dest->alpha = 255; +} + +static void r200_SecondaryColor3fvEXT_ub( const GLfloat *v ) +{ + r200_color_t *dest = vb.specptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, v[0] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, v[1] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, v[2] ); + dest->alpha = 255; +} + +static void r200_SecondaryColor3ubEXT_3f( GLubyte r, GLubyte g, GLubyte b ) +{ + GLfloat *dest = vb.floatspecptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); + dest[3] = 1.0; +} + +static void r200_SecondaryColor3ubvEXT_3f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatspecptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); + dest[3] = 1.0; +} + +static void r200_SecondaryColor3fEXT_3f( GLfloat r, GLfloat g, GLfloat b ) +{ + GLfloat *dest = vb.floatspecptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; + dest[3] = 1.0; +} + +static void r200_SecondaryColor3fvEXT_3f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatspecptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; + dest[3] = 1.0; +} + + + +/* Normal + */ +static void r200_Normal3f( GLfloat n0, GLfloat n1, GLfloat n2 ) +{ + GLfloat *dest = vb.normalptr; + dest[0] = n0; + dest[1] = n1; + dest[2] = n2; +} + +static void r200_Normal3fv( const GLfloat *v ) +{ + GLfloat *dest = vb.normalptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; +} + + +/* TexCoord + */ +static void r200_TexCoord1f( GLfloat s ) +{ + GLfloat *dest = vb.texcoordptr[0]; + dest[0] = s; + dest[1] = 0; +} + +static void r200_TexCoord1fv( const GLfloat *v ) +{ + GLfloat *dest = vb.texcoordptr[0]; + dest[0] = v[0]; + dest[1] = 0; +} + +static void r200_TexCoord2f( GLfloat s, GLfloat t ) +{ + GLfloat *dest = vb.texcoordptr[0]; + dest[0] = s; + dest[1] = t; +} + +static void r200_TexCoord2fv( const GLfloat *v ) +{ + GLfloat *dest = vb.texcoordptr[0]; + dest[0] = v[0]; + dest[1] = v[1]; +} + + +/* MultiTexcoord + */ +static void r200_MultiTexCoord1fARB( GLenum target, GLfloat s ) +{ + GLfloat *dest = vb.texcoordptr[(target - GL_TEXTURE0_ARB)&1]; + dest[0] = s; + dest[1] = 0; +} + +static void r200_MultiTexCoord1fvARB( GLenum target, const GLfloat *v ) +{ + GLfloat *dest = vb.texcoordptr[(target - GL_TEXTURE0_ARB)&1]; + dest[0] = v[0]; + dest[1] = 0; +} + +static void r200_MultiTexCoord2fARB( GLenum target, GLfloat s, GLfloat t ) +{ + GLfloat *dest = vb.texcoordptr[(target - GL_TEXTURE0_ARB)&1]; + dest[0] = s; + dest[1] = t; +} + +static void r200_MultiTexCoord2fvARB( GLenum target, const GLfloat *v ) +{ + GLfloat *dest = vb.texcoordptr[(target - GL_TEXTURE0_ARB)&1]; + dest[0] = v[0]; + dest[1] = v[1]; +} + +static struct dynfn *lookup( struct dynfn *l, const int *key ) +{ + struct dynfn *f; + + foreach( f, l ) { + if (f->key[0] == key[0] && f->key[1] == key[1]) + return f; + } + + return 0; +} + +/* Can't use the loopback template for this: + */ + +#define CHOOSE(FN, FNTYPE, MASK0, MASK1, ARGS1, ARGS2 ) \ +static void choose_##FN ARGS1 \ +{ \ + r200ContextPtr rmesa = R200_CONTEXT(vb.context); \ + int key[2]; \ + struct dynfn *dfn; \ + \ + key[0] = rmesa->vb.vtxfmt_0 & MASK0; \ + key[1] = rmesa->vb.vtxfmt_1 & MASK1; \ + \ + dfn = lookup( &rmesa->vb.dfn_cache.FN, key ); \ + if (dfn == 0) \ + dfn = rmesa->vb.codegen.FN( vb.context, key ); \ + else if (R200_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- cached codegen\n", __FUNCTION__ ); \ + \ + if (dfn) \ + vb.context->Exec->FN = (FNTYPE)(dfn->code); \ + else { \ + if (R200_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- generic version\n", __FUNCTION__ ); \ + vb.context->Exec->FN = r200_##FN; \ + } \ + \ + vb.context->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT; \ + vb.context->Exec->FN ARGS2; \ +} + + + +/* For the _3f case, only allow one color function to be hooked in at + * a time. Eventually, use a similar mechanism to allow selecting the + * color component of the vertex format based on client behaviour. + * + * Note: Perform these actions even if there is a codegen or cached + * codegen version of the chosen function. + */ +#define CHOOSE_COLOR(FN, FNTYPE, NR, MASK0, MASK1, ARGS1, ARGS2 ) \ +static void choose_##FN ARGS1 \ +{ \ + GLcontext *ctx = vb.context; \ + r200ContextPtr rmesa = R200_CONTEXT(vb.context); \ + int key[2]; \ + struct dynfn *dfn; \ + \ + key[0] = rmesa->vb.vtxfmt_0 & MASK0; \ + key[1] = rmesa->vb.vtxfmt_1 & MASK1; \ + \ + if (VTX_COLOR(rmesa->vb.vtxfmt_0,0) == R200_VTX_PK_RGBA) { \ + ctx->Exec->FN = r200_##FN##_ub; \ + } \ + else if (VTX_COLOR(rmesa->vb.vtxfmt_0,0) == R200_VTX_FP_RGB) { \ + \ + if (rmesa->vb.installed_color_3f_sz != NR) { \ + rmesa->vb.installed_color_3f_sz = NR; \ + if (NR == 3) ctx->Current.Color[3] = 1.0; \ + if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) { \ + r200_copy_to_current( ctx ); \ + _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); \ + ctx->Exec->FN ARGS2; \ + return; \ + } \ + } \ + \ + ctx->Exec->FN = r200_##FN##_3f; \ + } \ + else { \ + ctx->Exec->FN = r200_##FN##_4f; \ + } \ + \ + \ + dfn = lookup( &rmesa->vb.dfn_cache.FN, key ); \ + if (!dfn) dfn = rmesa->vb.codegen.FN( ctx, key ); \ + \ + if (dfn) { \ + if (R200_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- codegen version\n", __FUNCTION__ ); \ + ctx->Exec->FN = (FNTYPE)dfn->code; \ + } \ + else if (R200_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- 'c' version\n", __FUNCTION__ ); \ + \ + ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT; \ + ctx->Exec->FN ARGS2; \ +} + + + +/* Right now there are both _ub and _3f versions of the secondary color + * functions. Currently, we only set-up the hardware to use the _ub versions. + * The _3f versions are needed for the cases where secondary color isn't used + * in the vertex format, but it still needs to be stored in the context + * state vector. + */ +#define CHOOSE_SECONDARY_COLOR(FN, FNTYPE, MASK0, MASK1, ARGS1, ARGS2 ) \ +static void choose_##FN ARGS1 \ +{ \ + r200ContextPtr rmesa = R200_CONTEXT(vb.context); \ + int key[2]; \ + struct dynfn *dfn; \ + \ + key[0] = rmesa->vb.vtxfmt_0 & MASK0; \ + key[1] = rmesa->vb.vtxfmt_1 & MASK1; \ + \ + dfn = lookup( &rmesa->vb.dfn_cache.FN, key ); \ + if (dfn == 0) \ + dfn = rmesa->vb.codegen.FN( vb.context, key ); \ + else if (R200_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- cached version\n", __FUNCTION__ ); \ + \ + if (dfn) \ + vb.context->Exec->FN = (FNTYPE)(dfn->code); \ + else { \ + if (R200_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- generic version\n", __FUNCTION__ ); \ + vb.context->Exec->FN = (VTX_COLOR(rmesa->vb.vtxfmt_0,1) == R200_VTX_PK_RGBA) \ + ? r200_##FN##_ub : r200_##FN##_3f; \ + } \ + \ + vb.context->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT; \ + vb.context->Exec->FN ARGS2; \ +} + + + + + +/* VTXFMT_0 + */ +#define MASK_XYZW (R200_VTX_W0|R200_VTX_Z0) +#define MASK_NORM (MASK_XYZW|R200_VTX_N0) +#define MASK_COLOR (MASK_NORM |(R200_VTX_COLOR_MASK<Color3f = choose_Color3f; + vfmt->Color3fv = choose_Color3fv; + vfmt->Color3ub = choose_Color3ub; + vfmt->Color3ubv = choose_Color3ubv; + vfmt->Color4f = choose_Color4f; + vfmt->Color4fv = choose_Color4fv; + vfmt->Color4ub = choose_Color4ub; + vfmt->Color4ubv = choose_Color4ubv; + vfmt->SecondaryColor3fEXT = choose_SecondaryColor3fEXT; + vfmt->SecondaryColor3fvEXT = choose_SecondaryColor3fvEXT; + vfmt->SecondaryColor3ubEXT = choose_SecondaryColor3ubEXT; + vfmt->SecondaryColor3ubvEXT = choose_SecondaryColor3ubvEXT; + vfmt->MultiTexCoord1fARB = choose_MultiTexCoord1fARB; + vfmt->MultiTexCoord1fvARB = choose_MultiTexCoord1fvARB; + vfmt->MultiTexCoord2fARB = choose_MultiTexCoord2fARB; + vfmt->MultiTexCoord2fvARB = choose_MultiTexCoord2fvARB; + vfmt->Normal3f = choose_Normal3f; + vfmt->Normal3fv = choose_Normal3fv; + vfmt->TexCoord1f = choose_TexCoord1f; + vfmt->TexCoord1fv = choose_TexCoord1fv; + vfmt->TexCoord2f = choose_TexCoord2f; + vfmt->TexCoord2fv = choose_TexCoord2fv; + vfmt->Vertex2f = choose_Vertex2f; + vfmt->Vertex2fv = choose_Vertex2fv; + vfmt->Vertex3f = choose_Vertex3f; + vfmt->Vertex3fv = choose_Vertex3fv; +} + + +static struct dynfn *codegen_noop( GLcontext *ctx, const int *key ) +{ + (void) ctx; (void) key; + return 0; +} + +void r200InitCodegen( struct dfn_generators *gen ) +{ + gen->Vertex3f = codegen_noop; + gen->Vertex3fv = codegen_noop; + gen->Color4ub = codegen_noop; + gen->Color4ubv = codegen_noop; + gen->Normal3f = codegen_noop; + gen->Normal3fv = codegen_noop; + gen->TexCoord2f = codegen_noop; + gen->TexCoord2fv = codegen_noop; + gen->MultiTexCoord2fARB = codegen_noop; + gen->MultiTexCoord2fvARB = codegen_noop; + gen->Vertex2f = codegen_noop; + gen->Vertex2fv = codegen_noop; + gen->Color3ub = codegen_noop; + gen->Color3ubv = codegen_noop; + gen->Color4f = codegen_noop; + gen->Color4fv = codegen_noop; + gen->Color3f = codegen_noop; + gen->Color3fv = codegen_noop; + gen->SecondaryColor3fEXT = codegen_noop; + gen->SecondaryColor3fvEXT = codegen_noop; + gen->SecondaryColor3ubEXT = codegen_noop; + gen->SecondaryColor3ubvEXT = codegen_noop; + gen->TexCoord1f = codegen_noop; + gen->TexCoord1fv = codegen_noop; + gen->MultiTexCoord1fARB = codegen_noop; + gen->MultiTexCoord1fvARB = codegen_noop; + + if (!getenv("R200_NO_CODEGEN")) { +#if defined(USE_X86_ASM) + r200InitX86Codegen( gen ); +#endif + +#if defined(USE_SSE_ASM) + r200InitSSECodegen( gen ); +#endif + } +} Index: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_sse.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_sse.c:1.1 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_sse.c Wed Oct 30 07:51:53 2002 @@ -0,0 +1,96 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_sse.c,v 1.1 2002/10/30 12:51:53 alanh Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 +#include "mem.h" +#include "simple_list.h" +#include "r200_vtxfmt.h" + +#if defined(USE_SSE_ASM) + +/* Build specialized versions of the immediate calls on the fly for + * the current state. ???P4 SSE2 versions??? + */ + + +static struct dynfn *makeSSENormal3fv( GLcontext *ctx, const int *key ) +{ + /* Requires P4 (sse2?) + */ + static unsigned char temp[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0xba, 0x78, 0x56, 0x34, 0x12, /* mov $0x12345678,%edx */ + 0xf3, 0x0f, 0x7e, 0x00, /* movq (%eax),%xmm0 */ + 0x66, 0x0f, 0x6e, 0x48, 0x08, /* movd 0x8(%eax),%xmm1 */ + 0x66, 0x0f, 0xd6, 0x42, 0x0c, /* movq %xmm0,0xc(%edx) */ + 0x66, 0x0f, 0x7e, 0x4a, 0x14, /* movd %xmm1,0x14(%edx) */ + 0xc3, /* ret */ + }; + + + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + insert_at_head( &rmesa->vb.dfn_cache.Normal3fv, dfn ); + dfn->key[0] = key[0]; + dfn->key[1] = key[1]; + + dfn->code = ALIGN_MALLOC( sizeof(temp), 16 ); + memcpy (dfn->code, temp, sizeof(temp)); + FIXUP(dfn->code, 5, 0x0, (int)vb.normalptr); + return dfn; +} + +void r200InitSSECodegen( struct dfn_generators *gen ) +{ + /* Need to: + * - check kernel sse support + * - check p4/sse2 + */ + (void) makeSSENormal3fv; +} + + +#else + +void r200InitSSECodegen( struct dfn_generators *gen ) +{ + (void) gen; +} + +#endif + + + + Index: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_x86.c diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_x86.c:1.2 --- /dev/null Thu Feb 27 12:26:31 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_x86.c Mon Dec 16 11:18:56 2002 @@ -0,0 +1,463 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_vtxfmt_x86.c,v 1.2 2002/12/16 16:18:56 dawes Exp $ */ +/* +Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved. + +The Weather Channel (TM) funded Tungsten Graphics to develop the +initial release of the Radeon 8500 driver under the XFree86 license. +This notice must be preserved. + +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 THE COPYRIGHT OWNER(S) 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 +#include "mem.h" +#include "mmath.h" +#include "simple_list.h" +#include "r200_vtxfmt.h" + +#if defined(USE_X86_ASM) + +#define EXTERN( FUNC ) \ +extern const char *FUNC; \ +extern const char *FUNC##_end + +EXTERN ( _x86_Normal3fv ); +EXTERN ( _x86_Normal3f ); +EXTERN ( _x86_Vertex3fv_6 ); +EXTERN ( _x86_Vertex3fv_8 ); +EXTERN ( _x86_Vertex3fv ); +EXTERN ( _x86_Vertex3f_4 ); +EXTERN ( _x86_Vertex3f_6 ); +EXTERN ( _x86_Vertex3f ); +EXTERN ( _x86_Color4ubv_ub ); +EXTERN ( _x86_Color4ubv_4f ); +EXTERN ( _x86_Color4ub_ub ); +EXTERN ( _x86_Color3fv_3f ); +EXTERN ( _x86_Color3f_3f ); +EXTERN ( _x86_TexCoord2fv ); +EXTERN ( _x86_TexCoord2f ); +EXTERN ( _x86_MultiTexCoord2fvARB ); +EXTERN ( _x86_MultiTexCoord2fvARB_2 ); +EXTERN ( _x86_MultiTexCoord2fARB ); +EXTERN ( _x86_MultiTexCoord2fARB_2 ); + + +/* Build specialized versions of the immediate calls on the fly for + * the current state. Generic x86 versions. + */ + +struct dynfn *r200_makeX86Vertex3f( GLcontext *ctx, const int *key ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x 0x%08x %d\n", __FUNCTION__, + key[0], key[1], vb.vertex_size ); + + switch (vb.vertex_size) { + case 4: { + + DFN ( _x86_Vertex3f_4, rmesa->vb.dfn_cache.Vertex3f ); + FIXUP(dfn->code, 2, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 25, 0x0, (int)&vb.vertex[3]); + FIXUP(dfn->code, 36, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 46, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 51, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 60, 0x0, (int)&vb.notify); + break; + } + case 6: { + + DFN ( _x86_Vertex3f_6, rmesa->vb.dfn_cache.Vertex3f ); + FIXUP(dfn->code, 3, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 28, 0x0, (int)&vb.vertex[3]); + FIXUP(dfn->code, 34, 0x0, (int)&vb.vertex[4]); + FIXUP(dfn->code, 40, 0x0, (int)&vb.vertex[5]); + FIXUP(dfn->code, 57, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 63, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 70, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 79, 0x0, (int)&vb.notify); + break; + } + default: { + + DFN ( _x86_Vertex3f, rmesa->vb.dfn_cache.Vertex3f ); + FIXUP(dfn->code, 3, 0x0, (int)&vb.vertex[3]); + FIXUP(dfn->code, 9, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 37, 0x0, vb.vertex_size-3); + FIXUP(dfn->code, 44, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 50, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 56, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 67, 0x0, (int)&vb.notify); + break; + } + } + + return dfn; +} + + + +struct dynfn *r200_makeX86Vertex3fv( GLcontext *ctx, const int *key ) +{ + r200ContextPtr rmesa = R200_CONTEXT(ctx); + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x 0x%08x %d\n", __FUNCTION__, + key[0], key[1], vb.vertex_size ); + + switch (vb.vertex_size) { + case 6: { + + DFN ( _x86_Vertex3fv_6, rmesa->vb.dfn_cache.Vertex3fv ); + FIXUP(dfn->code, 1, 0x00000000, (int)&vb.dmaptr); + FIXUP(dfn->code, 27, 0x0000001c, (int)&vb.vertex[3]); + FIXUP(dfn->code, 33, 0x00000020, (int)&vb.vertex[4]); + FIXUP(dfn->code, 45, 0x00000024, (int)&vb.vertex[5]); + FIXUP(dfn->code, 56, 0x00000000, (int)&vb.dmaptr); + FIXUP(dfn->code, 61, 0x00000004, (int)&vb.counter); + FIXUP(dfn->code, 67, 0x00000004, (int)&vb.counter); + FIXUP(dfn->code, 76, 0x00000008, (int)&vb.notify); + break; + } + + + case 8: { + + DFN ( _x86_Vertex3fv_8, rmesa->vb.dfn_cache.Vertex3fv ); + FIXUP(dfn->code, 1, 0x00000000, (int)&vb.dmaptr); + FIXUP(dfn->code, 27, 0x0000001c, (int)&vb.vertex[3]); + FIXUP(dfn->code, 33, 0x00000020, (int)&vb.vertex[4]); + FIXUP(dfn->code, 45, 0x0000001c, (int)&vb.vertex[5]); + FIXUP(dfn->code, 51, 0x00000020, (int)&vb.vertex[6]); + FIXUP(dfn->code, 63, 0x00000024, (int)&vb.vertex[7]); + FIXUP(dfn->code, 74, 0x00000000, (int)&vb.dmaptr); + FIXUP(dfn->code, 79, 0x00000004, (int)&vb.counter); + FIXUP(dfn->code, 85, 0x00000004, (int)&vb.counter); + FIXUP(dfn->code, 94, 0x00000008, (int)&vb.notify); + break; + } + + + + default: { + + DFN ( _x86_Vertex3fv, rmesa->vb.dfn_cache.Vertex3fv ); + FIXUP(dfn->code, 8, 0x01010101, (int)&vb.dmaptr); + FIXUP(dfn->code, 32, 0x00000006, vb.vertex_size-3); + FIXUP(dfn->code, 37, 0x00000058, (int)&vb.vertex[3]); + FIXUP(dfn->code, 45, 0x01010101, (int)&vb.dmaptr); + FIXUP(dfn->code, 50, 0x02020202, (int)&vb.counter); + FIXUP(dfn->code, 58, 0x02020202, (int)&vb.counter); + FIXUP(dfn->code, 67, 0x0, (int)&vb.notify); + break; + } + } + + return dfn; +} + +struct dynfn *r200_makeX86Normal3fv( GLcontext *ctx, const int *key ) +{ + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + int i = 0; + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key[0] ); + + DFN ( _x86_Normal3fv, rmesa->vb.dfn_cache.Normal3fv ); + + FIXUP2(dfn->code, i, 0x0, (int)vb.normalptr); + FIXUP2(dfn->code, i, 0x4, 4+(int)vb.normalptr); + FIXUP2(dfn->code, i, 0x8, 8+(int)vb.normalptr); + fprintf(stderr, "%s done\n", __FUNCTION__); + return dfn; +} + +struct dynfn *r200_makeX86Normal3f( GLcontext *ctx, const int *key ) +{ + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key[0] ); + + DFN ( _x86_Normal3f, rmesa->vb.dfn_cache.Normal3f ); + FIXUP(dfn->code, 1, 0x12345678, (int)vb.normalptr); + return dfn; +} + +struct dynfn *r200_makeX86Color4ubv( GLcontext *ctx, const int *key ) +{ + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key[0] ); + + if (VTX_COLOR(key[0],0) == R200_VTX_PK_RGBA) { + DFN ( _x86_Color4ubv_ub, rmesa->vb.dfn_cache.Color4ubv); + FIXUP(dfn->code, 5, 0x12345678, (int)vb.colorptr); + return dfn; + } + else { + + DFN ( _x86_Color4ubv_4f, rmesa->vb.dfn_cache.Color4ubv); + FIXUP(dfn->code, 2, 0x00000000, (int)_mesa_ubyte_to_float_color_tab); + FIXUP(dfn->code, 27, 0xdeadbeaf, (int)vb.floatcolorptr); + FIXUP(dfn->code, 33, 0xdeadbeaf, (int)vb.floatcolorptr+4); + FIXUP(dfn->code, 55, 0xdeadbeaf, (int)vb.floatcolorptr+8); + FIXUP(dfn->code, 61, 0xdeadbeaf, (int)vb.floatcolorptr+12); + return dfn; + } +} + +struct dynfn *r200_makeX86Color4ub( GLcontext *ctx, const int *key ) +{ + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key[0] ); + + if (VTX_COLOR(key[0],0) == R200_VTX_PK_RGBA) { + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + DFN ( _x86_Color4ub_ub, rmesa->vb.dfn_cache.Color4ub ); + FIXUP(dfn->code, 18, 0x0, (int)vb.colorptr); + FIXUP(dfn->code, 24, 0x0, (int)vb.colorptr+1); + FIXUP(dfn->code, 30, 0x0, (int)vb.colorptr+2); + FIXUP(dfn->code, 36, 0x0, (int)vb.colorptr+3); + return dfn; + } + else + return 0; +} + + +struct dynfn *r200_makeX86Color3fv( GLcontext *ctx, const int *key ) +{ + if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB) + return 0; + else + { + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key[0] ); + + DFN ( _x86_Color3fv_3f, rmesa->vb.dfn_cache.Color3fv ); + FIXUP(dfn->code, 5, 0x0, (int)vb.floatcolorptr); + return dfn; + } +} + +struct dynfn *r200_makeX86Color3f( GLcontext *ctx, const int *key ) +{ + if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB) + return 0; + else + { + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key[0] ); + + DFN ( _x86_Color3f_3f, rmesa->vb.dfn_cache.Color3f ); + FIXUP(dfn->code, 1, 0x12345678, (int)vb.floatcolorptr); + return dfn; + } +} + + + +struct dynfn *r200_makeX86TexCoord2fv( GLcontext *ctx, const int *key ) +{ + + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x 0x%08x\n", __FUNCTION__, key[0], key[1] ); + + DFN ( _x86_TexCoord2fv, rmesa->vb.dfn_cache.TexCoord2fv ); + FIXUP(dfn->code, 5, 0x12345678, (int)vb.texcoordptr[0]); + return dfn; +} + +struct dynfn *r200_makeX86TexCoord2f( GLcontext *ctx, const int *key ) +{ + + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x 0x%08x\n", __FUNCTION__, key[0], key[1] ); + + DFN ( _x86_TexCoord2f, rmesa->vb.dfn_cache.TexCoord2f ); + FIXUP(dfn->code, 1, 0x12345678, (int)vb.texcoordptr[0]); + return dfn; +} + +struct dynfn *r200_makeX86MultiTexCoord2fvARB( GLcontext *ctx, const int *key ) +{ +#if 0 + static char temp[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0x8b, 0x4c, 0x24, 0x08, /* mov 0x8(%esp,1),%ecx */ + 0x2d, 0xc0, 0x84, 0x00, 0x00, /* sub $0x84c0,%eax */ + 0x83, 0xe0, 0x01, /* and $0x1,%eax */ + 0x8b, 0x11, /* mov (%ecx),%edx */ + 0xc1, 0xe0, 0x03, /* shl $0x3,%eax */ + 0x8b, 0x49, 0x04, /* mov 0x4(%ecx),%ecx */ + 0x89, 0x90, 0, 0, 0, 0,/* mov %edx,DEST(%eax) */ + 0x89, 0x88, 0, 0, 0, 0,/* mov %ecx,DEST+8(%eax) */ + 0xc3, /* ret */ + }; + static char temp2[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0x8b, 0x4c, 0x24, 0x08, /* mov 0x8(%esp,1),%ecx */ + 0x2d, 0xc0, 0x84, 0x00, 0x00, /* sub $0x84c0,%eax */ + 0x83, 0xe0, 0x01, /* and $0x1,%eax */ + 0x8b, 0x14, 0x85, 0, 0, 0, 0, /* mov DEST(,%eax,4),%edx */ + 0x8b, 0x01, /* mov (%ecx),%eax */ + 0x89, 0x02, /* mov %eax,(%edx) */ + 0x8b, 0x41, 0x04, /* mov 0x4(%ecx),%eax */ + 0x89, 0x42, 0x04, /* mov %eax,0x4(%edx) */ + 0xc3, /* ret */ + }; +#endif + + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x 0x%08x\n", __FUNCTION__, key[0], key[1] ); + + if (vb.texcoordptr[1] == vb.texcoordptr[0]+4) { + DFN ( _x86_MultiTexCoord2fvARB, rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + FIXUP(dfn->code, 26, 0xdeadbeef, (int)vb.texcoordptr[0]); + FIXUP(dfn->code, 32, 0xdeadbeef, (int)vb.texcoordptr[0]+4); + } else { + DFN ( _x86_MultiTexCoord2fvARB_2, rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + FIXUP(dfn->code, 19, 0x0, (int)vb.texcoordptr); + } + return dfn; +} + +struct dynfn *r200_makeX86MultiTexCoord2fARB( GLcontext *ctx, + const int *key ) +{ +#if 0 + static char temp[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0x8b, 0x54, 0x24, 0x08, /* mov 0x8(%esp,1),%edx */ + 0x2d, 0xc0, 0x84, 0x00, 0x00, /* sub $0x84c0,%eax */ + 0x8b, 0x4c, 0x24, 0x0c, /* mov 0xc(%esp,1),%ecx */ + 0x83, 0xe0, 0x01, /* and $0x1,%eax */ + 0xc1, 0xe0, 0x03, /* shl $0x3,%eax */ + 0x89, 0x90, 0, 0, 0, 0, /* mov %edx,DEST(%eax) */ + 0x89, 0x88, 0, 0, 0, 0, /* mov %ecx,DEST+8(%eax) */ + 0xc3, /* ret */ + }; + + static char temp2[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0x8b, 0x54, 0x24, 0x08, /* mov 0x8(%esp,1),%edx */ + 0x2d, 0xc0, 0x84, 0x00, 0x00, /* sub $0x84c0,%eax */ + 0x8b, 0x4c, 0x24, 0x0c, /* mov 0xc(%esp,1),%ecx */ + 0x83, 0xe0, 0x01, /* and $0x1,%eax */ + 0x8b, 0x04, 0x85, 0, 0, 0, 0, /* mov DEST(,%eax,4),%eax */ + 0x89, 0x10, /* mov %edx,(%eax) */ + 0x89, 0x48, 0x04, /* mov %ecx,0x4(%eax) */ + 0xc3, /* ret */ + }; +#endif + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + r200ContextPtr rmesa = R200_CONTEXT(ctx); + + if (R200_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x 0x%08x\n", __FUNCTION__, key[0], key[1] ); + + if (vb.texcoordptr[1] == vb.texcoordptr[0]+4) { + DFN ( _x86_MultiTexCoord2fARB, rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + FIXUP(dfn->code, 25, 0xdeadbeef, (int)vb.texcoordptr[0]); + FIXUP(dfn->code, 31, 0xdeadbeef, (int)vb.texcoordptr[0]+4); + } + else { + /* Note: this might get generated multiple times, even though the + * actual emitted code is the same. + */ + DFN ( _x86_MultiTexCoord2fARB_2, rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + FIXUP(dfn->code, 23, 0x0, (int)vb.texcoordptr); + } + return dfn; +} + + +void r200InitX86Codegen( struct dfn_generators *gen ) +{ + gen->Vertex3f = r200_makeX86Vertex3f; + gen->Vertex3fv = r200_makeX86Vertex3fv; + gen->Color4ub = r200_makeX86Color4ub; /* PKCOLOR only */ + gen->Color4ubv = r200_makeX86Color4ubv; /* PKCOLOR only */ + gen->Normal3f = r200_makeX86Normal3f; + gen->Normal3fv = r200_makeX86Normal3fv; + gen->TexCoord2f = r200_makeX86TexCoord2f; + gen->TexCoord2fv = r200_makeX86TexCoord2fv; + gen->MultiTexCoord2fARB = r200_makeX86MultiTexCoord2fARB; + gen->MultiTexCoord2fvARB = r200_makeX86MultiTexCoord2fvARB; + gen->Color3f = r200_makeX86Color3f; + gen->Color3fv = r200_makeX86Color3fv; + + /* Not done: + */ +/* gen->Vertex2f = r200_makeX86Vertex2f; */ +/* gen->Vertex2fv = r200_makeX86Vertex2fv; */ +/* gen->Color3ub = r200_makeX86Color3ub; */ +/* gen->Color3ubv = r200_makeX86Color3ubv; */ +/* gen->Color4f = r200_makeX86Color4f; */ +/* gen->Color4fv = r200_makeX86Color4fv; */ +/* gen->TexCoord1f = r200_makeX86TexCoord1f; */ +/* gen->TexCoord1fv = r200_makeX86TexCoord1fv; */ +/* gen->MultiTexCoord1fARB = r200_makeX86MultiTexCoord1fARB; */ +/* gen->MultiTexCoord1fvARB = r200_makeX86MultiTexCoord1fvARB; */ +} + + +#else + +void r200InitX86Codegen( struct dfn_generators *gen ) +{ + (void) gen; +} + +#endif Index: xc/lib/GL/mesa/src/drv/r200/r200_vtxtmp_x86.S diff -u /dev/null xc/lib/GL/mesa/src/drv/r200/r200_vtxtmp_x86.S:1.2 --- /dev/null Thu Feb 27 12:26:32 2003 +++ xc/lib/GL/mesa/src/drv/r200/r200_vtxtmp_x86.S Thu Nov 7 13:31:59 2002 @@ -0,0 +1,410 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/r200/r200_vtxtmp_x86.S,v 1.2 2002/11/07 18:31:59 tsi Exp $ */ +/************************************************************************** + +Copyright 2002 Tungsten Graphics 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, TUNGSTEN GRAPHICS 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. + +**************************************************************************/ + +#define GLOBL( x ) \ +.globl x; \ +x##: + +.data +.align 4 +GLOBL( _x86_Normal3fv) + movl 4(%esp), %eax /* load 'v' off stack */ + movl (%eax), %ecx /* load v[0] */ + movl 4(%eax), %edx /* load v[1] */ + movl 8(%eax), %eax /* load v[2] */ + movl %ecx, 0 /* store v[0] to current vertex */ + movl %edx, 4 /* store v[1] to current vertex */ + movl %eax, 8 /* store v[2] to current vertex */ + ret +GLOBL ( _x86_Normal3fv_end ) + +/* + vertex 3f vertex size 4 +*/ + +GLOBL ( _x86_Vertex3f_4 ) + movl (0), %ecx + movl 4(%esp), %eax + movl 8(%esp), %edx + movl %eax, (%ecx) + movl %edx, 4(%ecx) + movl 12(%esp), %eax + movl (0), %edx + movl %eax, 8(%ecx) + movl %edx, 12(%ecx) + movl (0), %eax + addl $16, %ecx + dec %eax + movl %ecx, (0) + movl %eax, (0) + je .1 + ret +.1: jmp *0 + +GLOBL ( _x86_Vertex3f_4_end ) + +/* + vertex 3f vertex size 6 +*/ +GLOBL ( _x86_Vertex3f_6 ) + push %edi + movl (0), %edi + movl 8(%esp), %eax + movl 12(%esp), %edx + movl 16(%esp), %ecx + movl %eax, (%edi) + movl %edx, 4(%edi) + movl %ecx, 8(%edi) + movl (0), %eax + movl (0), %edx + movl (0), %ecx + movl %eax, 12(%edi) + movl %edx, 16(%edi) + movl %ecx, 20(%edi) + addl $24, %edi + movl (0), %eax + movl %edi, (0) + dec %eax + pop %edi + movl %eax, (0) + je .2 + ret +.2: jmp *0 +GLOBL ( _x86_Vertex3f_6_end ) +/* + vertex 3f generic size +*/ +GLOBL ( _x86_Vertex3f ) + push %edi + push %esi + movl $0, %esi + movl (0), %edi + movl 12(%esp), %eax + movl 16(%esp), %edx + movl 20(%esp), %ecx + movl %eax, (%edi) + movl %edx, 4(%edi) + movl %ecx, 8(%edi) + addl $12, %edi + movl $0, %ecx + repz + movsl %ds:(%esi), %es:(%edi) + movl (0), %eax + movl %edi, (0) + dec %eax + movl %eax, (0) + pop %esi + pop %edi + je .3 + ret +.3: jmp *0 + +GLOBL ( _x86_Vertex3f_end ) + +/* + Vertex 3fv vertex size 6 +*/ +GLOBL ( _x86_Vertex3fv_6 ) + movl (0), %eax + movl 4(%esp), %ecx + movl (%ecx), %edx + movl %edx, (%eax) + movl 4(%ecx), %edx + movl 8(%ecx), %ecx + movl %edx, 4(%eax) + movl %ecx, 8(%eax) + movl (28), %edx + movl (32), %ecx + movl %edx, 12(%eax) + movl %ecx, 16(%eax) + movl (36), %edx + movl %edx, 20(%eax) + addl $24, %eax + movl %eax, 0 + movl 4, %eax + dec %eax + movl %eax, 4 + je .4 + ret +.4: jmp *8 + +GLOBL ( _x86_Vertex3fv_6_end ) + +/* + Vertex 3fv vertex size 8 +*/ +GLOBL ( _x86_Vertex3fv_8 ) + movl (0), %eax + movl 4(%esp), %ecx + movl (%ecx), %edx + movl %edx ,(%eax) + movl 4(%ecx) ,%edx + movl 8(%ecx) ,%ecx + movl %edx, 4(%eax) + movl %ecx, 8(%eax) + movl (28), %edx + movl (32), %ecx + movl %edx, 12(%eax) + movl %ecx, 16(%eax) + movl (28), %edx + movl (32), %ecx + movl %edx, 20(%eax) + movl %ecx, 24(%eax) + movl (36), %edx + movl %edx, 28(%eax) + addl $32, %eax + movl %eax, (0) + movl 4, %eax + dec %eax + movl %eax, (4) + je .5 + ret +.5: jmp *8 + +GLOBL ( _x86_Vertex3fv_8_end ) + +/* + Vertex 3fv generic vertex size +*/ +GLOBL ( _x86_Vertex3fv ) + movl 4(%esp), %edx + push %edi + push %esi + movl (0x1010101), %edi + movl (%edx), %eax + movl 4(%edx), %ecx + movl 8(%edx), %esi + movl %eax, (%edi) + movl %ecx, 4(%edi) + movl %esi, 8(%edi) + addl $12, %edi + movl $6, %ecx + movl $0x58, %esi + repz + movsl %ds:(%esi), %es:(%edi) + movl %edi, (0x1010101) + movl (0x2020202), %eax + pop %esi + pop %edi + dec %eax + movl %eax, (0x2020202) + je .6 + ret +.6: jmp *0 +GLOBL ( _x86_Vertex3fv_end ) + +/* + Normal 3f +*/ +GLOBL ( _x86_Normal3f ) + movl $0x12345678, %edx + movl 4(%esp), %eax + movl %eax, (%edx) + movl 8(%esp), %eax + movl %eax, 4(%edx) + movl 12(%esp), %eax + movl %eax, 8(%edx) + ret +GLOBL ( _x86_Normal3f_end ) + +/* + Color 4ubv_ub +*/ +GLOBL ( _x86_Color4ubv_ub ) + movl 4(%esp), %eax + movl $0x12345678, %edx + movl (%eax), %eax + movl %eax, (%edx) + ret +GLOBL ( _x86_Color4ubv_ub_end ) + +/* + Color 4ubv 4f +*/ +GLOBL ( _x86_Color4ubv_4f ) + push %ebx + movl $0, %edx + xor %eax, %eax + xor %ecx, %ecx + movl 8(%esp), %ebx + movl (%ebx), %ebx + mov %bl, %al + mov %bh, %cl + movl (%edx,%eax,4),%eax + movl (%edx,%ecx,4),%ecx + movl %eax, (0xdeadbeaf) + movl %ecx, (0xdeadbeaf) + xor %eax, %eax + xor %ecx, %ecx + shr $16, %ebx + mov %bl, %al + mov %bh, %cl + movl (%edx,%eax,4), %eax + movl (%edx,%ecx,4), %ecx + movl %eax, (0xdeadbeaf) + movl %ecx, (0xdeadbeaf) + pop %ebx + ret +GLOBL ( _x86_Color4ubv_4f_end ) + +/* + + Color4ub_ub +*/ +GLOBL( _x86_Color4ub_ub ) + push %ebx + movl 8(%esp), %eax + movl 12(%esp), %edx + movl 16(%esp), %ecx + movl 20(%esp), %ebx + mov %al, (0) + mov %dl, (0) + mov %cl, (0) + mov %bl, (0) + pop %ebx + ret +GLOBL( _x86_Color4ub_ub_end ) + +/* + Color3fv_3f +*/ +GLOBL( _x86_Color3fv_3f ) + movl 4(%esp), %eax + movl $0, %edx + movl (%eax), %ecx + movl %ecx, (%edx) + movl 4(%eax), %ecx + movl %ecx, 4(%edx) + movl 8(%eax), %ecx + movl %ecx, 8(%edx) + ret +GLOBL( _x86_Color3fv_3f_end ) + +/* + Color3f_3f +*/ +GLOBL( _x86_Color3f_3f ) + movl $0x12345678, %edx + movl 4(%esp), %eax + movl %eax, (%edx) + movl 8(%esp,1), %eax + movl %eax, 4(%edx) + movl 12(%esp), %eax + movl %eax, 8(%edx) + ret +GLOBL( _x86_Color3f_3f_end ) + +/* + TexCoord2fv +*/ + +GLOBL( _x86_TexCoord2fv ) + movl 4(%esp), %eax + movl $0x12345678, %edx + movl (%eax), %ecx + movl 4(%eax), %eax + movl %ecx, (%edx) + movl %eax, 4(%edx) + ret + +GLOBL( _x86_TexCoord2fv_end ) +/* + TexCoord2f +*/ +GLOBL( _x86_TexCoord2f ) + movl $0x12345678, %edx + movl 4(%esp), %eax + movl 8(%esp), %ecx + movl %eax, (%edx) + movl %ecx, 4(%edx) + ret +GLOBL( _x86_TexCoord2f_end ) + +/* + MultiTexCoord2fvARB st0/st1 +*/ +GLOBL( _x86_MultiTexCoord2fvARB ) + + movl 4(%esp), %eax + movl 8(%esp), %ecx + sub $0x84c0, %eax + and $1, %eax + movl (%ecx), %edx + shl $3, %eax + movl 4(%ecx), %ecx + movl %edx, 0xdeadbeef(%eax) + movl %ecx, 0xdeadbeef(%eax) + ret +GLOBL( _x86_MultiTexCoord2fvARB_end ) +/* + MultiTexCoord2fvARB +*/ + +GLOBL( _x86_MultiTexCoord2fvARB_2 ) + movl 4(%esp,1), %eax + movl 8(%esp,1), %ecx + sub $0x84c0, %eax + and $0x1, %eax + movl 0(,%eax,4), %edx + movl (%ecx), %eax + movl %eax, (%edx) + movl 4(%ecx), %eax + movl %eax, 4(%edx) + ret + +GLOBL( _x86_MultiTexCoord2fvARB_2_end ) + +/* + MultiTexCoord2fARB st0/st1 +*/ +GLOBL( _x86_MultiTexCoord2fARB ) + movl 4(%esp), %eax + movl 8(%esp), %edx + sub $0x84c0, %eax + movl 12(%esp), %ecx + and $1, %eax + shl $3, %eax + movl %edx, 0xdeadbeef(%eax) + movl %ecx, 0xdeadbeef(%eax) + ret +GLOBL( _x86_MultiTexCoord2fARB_end ) + +/* + MultiTexCoord2fARB +*/ +GLOBL( _x86_MultiTexCoord2fARB_2 ) + movl 4(%esp), %eax + movl 8(%esp), %edx + sub $0x84c0, %eax + movl 12(%esp,1), %ecx + and $1,%eax + movl 0(,%eax,4), %eax + movl %edx, (%eax) + movl %ecx, 4(%eax) + ret +GLOBL( _x86_MultiTexCoord2fARB_2_end ) Index: xc/lib/GL/mesa/src/drv/radeon/Imakefile diff -u xc/lib/GL/mesa/src/drv/radeon/Imakefile:1.7 xc/lib/GL/mesa/src/drv/radeon/Imakefile:1.11 --- xc/lib/GL/mesa/src/drv/radeon/Imakefile:1.7 Fri Nov 2 18:29:26 2001 +++ xc/lib/GL/mesa/src/drv/radeon/Imakefile Mon Nov 25 09:04:51 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile,v 1.7 2001/11/02 23:29:26 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile,v 1.11 2002/11/25 14:04:51 eich Exp $ #include @@ -18,22 +18,29 @@ #include "../common/Imakefile.inc" #include "Imakefile.inc" +#include "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" #include "../../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #include "../../X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../../SPARC/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 + DRIOBJS = $(GLXLIBSRC)/dri/dri_util.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 + $(GLXLIBSRC)/dri/drm/xf86drmSL.o #ifdef GlxSoProf LOSRCS = ../../../../lowpc.c @@ -47,7 +54,7 @@ OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ $(MESA_ASM_OBJS) $(COMMONOBJS) $(RADEONOBJS) $(HIOBJS) -REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) #include Index: xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc diff -u xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc:1.2 xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc:1.4 --- xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc:1.2 Wed May 2 11:06:04 2001 +++ xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc Wed Oct 30 07:51:54 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc,v 1.2 2001/05/02 15:06:04 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile.inc,v 1.4 2002/10/30 12:51:54 alanh Exp $ #ifndef MesaDrvSrcDir #define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv @@ -16,17 +16,18 @@ #endif #if BuildXF86DRI - DRI_DEFINES = GlxDefines + 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 + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/include \ + -I$(XTOP)/include #endif MESA_INCLUDES = -I$(MESASRCDIR)/src \ @@ -35,106 +36,141 @@ 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_compat.c \ $(MESADRVRADEONBUILDDIR)radeon_ioctl.c \ $(MESADRVRADEONBUILDDIR)radeon_lock.c \ - $(MESADRVRADEONBUILDDIR)radeon_pipeline.c \ - $(MESADRVRADEONBUILDDIR)radeon_screen.c \ + $(MESADRVRADEONBUILDDIR)radeon_maos.c \ + $(MESADRVRADEONBUILDDIR)radeon_sanity.c \ + $(MESADRVRADEONBUILDDIR)radeon_screen.c \ $(MESADRVRADEONBUILDDIR)radeon_span.c \ $(MESADRVRADEONBUILDDIR)radeon_state.c \ + $(MESADRVRADEONBUILDDIR)radeon_state_init.c \ + $(MESADRVRADEONBUILDDIR)radeon_swtcl.c \ + $(MESADRVRADEONBUILDDIR)radeon_tcl.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 + $(MESADRVRADEONBUILDDIR)radeon_vtxfmt.c \ + $(MESADRVRADEONBUILDDIR)radeon_vtxfmt_x86.c \ + $(MESADRVRADEONBUILDDIR)radeon_vtxtmp_x86.S \ + $(MESADRVRADEONBUILDDIR)radeon_vtxfmt_sse.c \ + $(MESADRVRADEONBUILDDIR)radeon_vtxfmt_c.c RADEONOBJS = $(MESADRVRADEONBUILDDIR)radeon_context.o \ - $(MESADRVRADEONBUILDDIR)radeon_dd.o \ - $(MESADRVRADEONBUILDDIR)radeon_fastpath.o \ - $(MESADRVRADEONBUILDDIR)radeon_eltpath.o \ + $(MESADRVRADEONBUILDDIR)radeon_compat.o \ $(MESADRVRADEONBUILDDIR)radeon_ioctl.o \ $(MESADRVRADEONBUILDDIR)radeon_lock.o \ - $(MESADRVRADEONBUILDDIR)radeon_pipeline.o \ - $(MESADRVRADEONBUILDDIR)radeon_screen.o \ + $(MESADRVRADEONBUILDDIR)radeon_maos.o \ + $(MESADRVRADEONBUILDDIR)radeon_sanity.o \ + $(MESADRVRADEONBUILDDIR)radeon_screen.o \ $(MESADRVRADEONBUILDDIR)radeon_span.o \ $(MESADRVRADEONBUILDDIR)radeon_state.o \ + $(MESADRVRADEONBUILDDIR)radeon_state_init.o \ + $(MESADRVRADEONBUILDDIR)radeon_swtcl.o \ + $(MESADRVRADEONBUILDDIR)radeon_tcl.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 + $(MESADRVRADEONBUILDDIR)radeon_vtxfmt.o \ + $(MESADRVRADEONBUILDDIR)radeon_vtxfmt_c.o +#ifdef i386Architecture + RADEONOBJS += $(MESADRVRADEONBUILDDIR)radeon_vtxfmt_x86.o \ + $(MESADRVRADEONBUILDDIR)radeon_vtxtmp_x86.o \ + $(MESADRVRADEONBUILDDIR)radeon_vtxfmt_sse.o +#endif + RADEONUOBJS = $(MESADRVRADEONBUILDDIR)unshared/radeon_context.o \ - $(MESADRVRADEONBUILDDIR)unshared/radeon_dd.o \ - $(MESADRVRADEONBUILDDIR)unshared/radeon_fastpath.o \ - $(MESADRVRADEONBUILDDIR)unshared/radeon_eltpath.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_compat.o \ $(MESADRVRADEONBUILDDIR)unshared/radeon_ioctl.o \ $(MESADRVRADEONBUILDDIR)unshared/radeon_lock.o \ - $(MESADRVRADEONBUILDDIR)unshared/radeon_pipeline.o \ - $(MESADRVRADEONBUILDDIR)unshared/radeon_screen.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_maos.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_sanity.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_screen.o \ $(MESADRVRADEONBUILDDIR)unshared/radeon_span.o \ $(MESADRVRADEONBUILDDIR)unshared/radeon_state.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_state_init.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_swtcl.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_tcl.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 + $(MESADRVRADEONBUILDDIR)unshared/radeon_vtxfmt.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_vtxfmt_c.o +#ifdef i386Architecture + RADEONUOBJS += $(MESADRVRADEONBUILDDIR)unshared/radeon_vtxfmt_x86.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_vtxtmp_x86.o \ + $(MESADRVRADEONBUILDDIR)unshared/radeon_vtxfmt_sse.o +#endif + RADEONDOBJS = $(MESADRVRADEONBUILDDIR)debugger/radeon_context.o \ - $(MESADRVRADEONBUILDDIR)debugger/radeon_dd.o \ - $(MESADRVRADEONBUILDDIR)debugger/radeon_fastpath.o \ - $(MESADRVRADEONBUILDDIR)debugger/radeon_eltpath.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_compat.o \ $(MESADRVRADEONBUILDDIR)debugger/radeon_ioctl.o \ $(MESADRVRADEONBUILDDIR)debugger/radeon_lock.o \ - $(MESADRVRADEONBUILDDIR)debugger/radeon_pipeline.o \ - $(MESADRVRADEONBUILDDIR)debugger/radeon_screen.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_maos.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_sanity.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_screen.o \ $(MESADRVRADEONBUILDDIR)debugger/radeon_span.o \ $(MESADRVRADEONBUILDDIR)debugger/radeon_state.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_state_init.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_swtcl.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_tcl.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 + $(MESADRVRADEONBUILDDIR)debugger/radeon_vtxfmt.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_vtxfmt_c.o +#ifdef i386Architecture + RADEONDOBJS += $(MESADRVRADEONBUILDDIR)debugger/radeon_vtxfmt_x86.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_vtxtmp_x86.o \ + $(MESADRVRADEONBUILDDIR)debugger/radeon_vtxfmt_sse.o +#endif + RADEONPOBJS = $(MESADRVRADEONBUILDDIR)profiled/radeon_context.o \ - $(MESADRVRADEONBUILDDIR)profiled/radeon_dd.o \ - $(MESADRVRADEONBUILDDIR)profiled/radeon_fastpath.o \ - $(MESADRVRADEONBUILDDIR)profiled/radeon_eltpath.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_compat.o \ $(MESADRVRADEONBUILDDIR)profiled/radeon_ioctl.o \ $(MESADRVRADEONBUILDDIR)profiled/radeon_lock.o \ - $(MESADRVRADEONBUILDDIR)profiled/radeon_pipeline.o \ - $(MESADRVRADEONBUILDDIR)profiled/radeon_screen.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_maos.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_sanity.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_screen.o \ $(MESADRVRADEONBUILDDIR)profiled/radeon_span.o \ $(MESADRVRADEONBUILDDIR)profiled/radeon_state.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_state_init.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_swtcl.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_tcl.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 + $(MESADRVRADEONBUILDDIR)profiled/radeon_vtxfmt.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_vtxfmt_c.o + +#ifdef i386Architecture + RADEONPOBJS += $(MESADRVRADEONBUILDDIR)profiled/radeon_vtxfmt_x86.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_vtxtmp_x86.o \ + $(MESADRVRADEONBUILDDIR)profiled/radeon_vtxfmt_sse.o +#endif #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_compat.c, $(MESADRVSRCDIR)/radeon) LinkSourceFile(radeon_ioctl.c, $(MESADRVSRCDIR)/radeon) LinkSourceFile(radeon_lock.c, $(MESADRVSRCDIR)/radeon) -LinkSourceFile(radeon_pipeline.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_maos.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_sanity.c, $(MESADRVSRCDIR)/radeon) LinkSourceFile(radeon_screen.c, $(MESADRVSRCDIR)/radeon) LinkSourceFile(radeon_span.c, $(MESADRVSRCDIR)/radeon) LinkSourceFile(radeon_state.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_state_init.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_swtcl.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_tcl.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) +LinkSourceFile(radeon_vtxfmt.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_vtxfmt_c.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_vtxfmt_x86.c, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_vtxtmp_x86.S, $(MESADRVSRCDIR)/radeon) +LinkSourceFile(radeon_vtxfmt_sse.c, $(MESADRVSRCDIR)/radeon) #endif - Index: xc/lib/GL/mesa/src/drv/radeon/radeon_compat.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_compat.c:1.1 --- /dev/null Thu Feb 27 12:26:32 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_compat.c Wed Oct 30 07:51:54 2002 @@ -0,0 +1,301 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_compat.c,v 1.1 2002/10/30 12:51:54 alanh Exp $ */ +/************************************************************************** + +Copyright 2002 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics Inc., Austin, 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, TUNGSTEN GRAPHICS 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 + * + */ + +#include "radeon_context.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" +#include "mem.h" + +static struct { + int start; + int len; + const char *name; +} packet[RADEON_MAX_STATE_PACKETS] = { + { RADEON_PP_MISC,7,"RADEON_PP_MISC" }, + { RADEON_PP_CNTL,3,"RADEON_PP_CNTL" }, + { RADEON_RB3D_COLORPITCH,1,"RADEON_RB3D_COLORPITCH" }, + { RADEON_RE_LINE_PATTERN,2,"RADEON_RE_LINE_PATTERN" }, + { RADEON_SE_LINE_WIDTH,1,"RADEON_SE_LINE_WIDTH" }, + { RADEON_PP_LUM_MATRIX,1,"RADEON_PP_LUM_MATRIX" }, + { RADEON_PP_ROT_MATRIX_0,2,"RADEON_PP_ROT_MATRIX_0" }, + { RADEON_RB3D_STENCILREFMASK,3,"RADEON_RB3D_STENCILREFMASK" }, + { RADEON_SE_VPORT_XSCALE,6,"RADEON_SE_VPORT_XSCALE" }, + { RADEON_SE_CNTL,2,"RADEON_SE_CNTL" }, + { RADEON_SE_CNTL_STATUS,1,"RADEON_SE_CNTL_STATUS" }, + { RADEON_RE_MISC,1,"RADEON_RE_MISC" }, + { RADEON_PP_TXFILTER_0,6,"RADEON_PP_TXFILTER_0" }, + { RADEON_PP_BORDER_COLOR_0,1,"RADEON_PP_BORDER_COLOR_0" }, + { RADEON_PP_TXFILTER_1,6,"RADEON_PP_TXFILTER_1" }, + { RADEON_PP_BORDER_COLOR_1,1,"RADEON_PP_BORDER_COLOR_1" }, + { RADEON_PP_TXFILTER_2,6,"RADEON_PP_TXFILTER_2" }, + { RADEON_PP_BORDER_COLOR_2,1,"RADEON_PP_BORDER_COLOR_2" }, + { RADEON_SE_ZBIAS_FACTOR,2,"RADEON_SE_ZBIAS_FACTOR" }, + { RADEON_SE_TCL_OUTPUT_VTX_FMT,11,"RADEON_SE_TCL_OUTPUT_VTX_FMT" }, + { RADEON_SE_TCL_MATERIAL_EMMISSIVE_RED,17,"RADEON_SE_TCL_MATERIAL_EMMISSIVE_RED" }, +}; + + +static void radeonCompatEmitPacket( radeonContextPtr rmesa, + struct radeon_state_atom *state ) +{ + RADEONSAREAPrivPtr sarea = rmesa->sarea; + radeon_context_regs_t *ctx = &sarea->ContextState; + radeon_texture_regs_t *tex0 = &sarea->TexState[0]; + radeon_texture_regs_t *tex1 = &sarea->TexState[1]; + int i; + int *buf = state->cmd; + + for ( i = 0 ; i < state->cmd_size ; ) { + drmRadeonCmdHeader *header = (drmRadeonCmdHeader *)&buf[i++]; + + if (RADEON_DEBUG & DEBUG_STATE) + fprintf(stderr, "%s %d: %s\n", __FUNCTION__, header->packet.packet_id, + packet[(int)header->packet.packet_id].name); + + switch (header->packet.packet_id) { + case RADEON_EMIT_PP_MISC: + ctx->pp_misc = buf[i++]; + ctx->pp_fog_color = buf[i++]; + ctx->re_solid_color = buf[i++]; + ctx->rb3d_blendcntl = buf[i++]; + ctx->rb3d_depthoffset = buf[i++]; + ctx->rb3d_depthpitch = buf[i++]; + ctx->rb3d_zstencilcntl = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_CONTEXT; + break; + case RADEON_EMIT_PP_CNTL: + ctx->pp_cntl = buf[i++]; + ctx->rb3d_cntl = buf[i++]; + ctx->rb3d_coloroffset = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_CONTEXT; + break; + case RADEON_EMIT_RB3D_COLORPITCH: + ctx->rb3d_colorpitch = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_CONTEXT; + break; + case RADEON_EMIT_RE_LINE_PATTERN: + ctx->re_line_pattern = buf[i++]; + ctx->re_line_state = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_LINE; + break; + case RADEON_EMIT_SE_LINE_WIDTH: + ctx->se_line_width = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_LINE; + break; + case RADEON_EMIT_PP_LUM_MATRIX: + ctx->pp_lum_matrix = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_BUMPMAP; + break; + case RADEON_EMIT_PP_ROT_MATRIX_0: + ctx->pp_rot_matrix_0 = buf[i++]; + ctx->pp_rot_matrix_1 = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_BUMPMAP; + break; + case RADEON_EMIT_RB3D_STENCILREFMASK: + ctx->rb3d_stencilrefmask = buf[i++]; + ctx->rb3d_ropcntl = buf[i++]; + ctx->rb3d_planemask = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_MASKS; + break; + case RADEON_EMIT_SE_VPORT_XSCALE: + ctx->se_vport_xscale = buf[i++]; + ctx->se_vport_xoffset = buf[i++]; + ctx->se_vport_yscale = buf[i++]; + ctx->se_vport_yoffset = buf[i++]; + ctx->se_vport_zscale = buf[i++]; + ctx->se_vport_zoffset = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_VIEWPORT; + break; + case RADEON_EMIT_SE_CNTL: + ctx->se_cntl = buf[i++]; + ctx->se_coord_fmt = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_VERTFMT; + break; + case RADEON_EMIT_SE_CNTL_STATUS: + ctx->se_cntl_status = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_SETUP; + break; + case RADEON_EMIT_RE_MISC: + ctx->re_misc = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_MISC; + break; + case RADEON_EMIT_PP_TXFILTER_0: + tex0->pp_txfilter = buf[i++]; + tex0->pp_txformat = buf[i++]; + tex0->pp_txoffset = buf[i++]; + tex0->pp_txcblend = buf[i++]; + tex0->pp_txablend = buf[i++]; + tex0->pp_tfactor = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_TEX0; + break; + case RADEON_EMIT_PP_BORDER_COLOR_0: + tex0->pp_border_color = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_TEX0; + break; + case RADEON_EMIT_PP_TXFILTER_1: + tex1->pp_txfilter = buf[i++]; + tex1->pp_txformat = buf[i++]; + tex1->pp_txoffset = buf[i++]; + tex1->pp_txcblend = buf[i++]; + tex1->pp_txablend = buf[i++]; + tex1->pp_tfactor = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_TEX1; + break; + case RADEON_EMIT_PP_BORDER_COLOR_1: + tex1->pp_border_color = buf[i++]; + sarea->dirty |= RADEON_UPLOAD_TEX1; + break; + + case RADEON_EMIT_SE_ZBIAS_FACTOR: + i++; + i++; + break; + + case RADEON_EMIT_PP_TXFILTER_2: + case RADEON_EMIT_PP_BORDER_COLOR_2: + case RADEON_EMIT_SE_TCL_OUTPUT_VTX_FMT: + case RADEON_EMIT_SE_TCL_MATERIAL_EMMISSIVE_RED: + default: + /* These states aren't understood by radeon drm 1.1 */ + fprintf(stderr, "Tried to emit unsupported state\n"); + return; + } + } +} + + + +static void radeonCompatEmitStateLocked( radeonContextPtr rmesa ) +{ + struct radeon_state_atom *state, *tmp; + + if (RADEON_DEBUG & (DEBUG_STATE|DEBUG_PRIMS)) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->lost_context) { + if (RADEON_DEBUG & (DEBUG_STATE|DEBUG_PRIMS|DEBUG_IOCTL)) + fprintf(stderr, "%s - lost context\n", __FUNCTION__); + + foreach_s( state, tmp, &(rmesa->hw.clean) ) + move_to_tail(&(rmesa->hw.dirty), state ); + + rmesa->lost_context = 0; + } + + foreach_s( state, tmp, &(rmesa->hw.dirty) ) { + if (!state->is_tcl) + radeonCompatEmitPacket( rmesa, state ); + move_to_head( &(rmesa->hw.clean), state ); + } +} + + + +static void radeonCompatEmitPrimitiveLocked( radeonContextPtr rmesa, + GLuint hw_primitive, + GLuint nverts, + XF86DRIClipRectPtr pbox, + GLuint nbox ) +{ + int i; + + for ( i = 0 ; i < nbox ; ) { + int nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS, nbox ); + XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drmRadeonVertex vtx; + + rmesa->sarea->dirty |= RADEON_UPLOAD_CLIPRECTS; + rmesa->sarea->nbox = nr - i; + + for ( ; i < nr ; i++) + *b++ = pbox[i]; + + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, + "RadeonFlushVertexBuffer: prim %x buf %d verts %d " + "disc %d nbox %d\n", + hw_primitive, + rmesa->dma.current.buf->buf->idx, + nverts, + nr == nbox, + rmesa->sarea->nbox ); + + vtx.prim = hw_primitive; + vtx.idx = rmesa->dma.current.buf->buf->idx; + vtx.count = nverts; + vtx.discard = (nr == nbox); + + drmCommandWrite( rmesa->dri.fd, + DRM_RADEON_VERTEX, + &vtx, sizeof(vtx)); + } +} + + + +/* No 'start' for 1.1 vertices ioctl: only one vertex prim/buffer! + */ +void radeonCompatEmitPrimitive( radeonContextPtr rmesa, + GLuint vertex_format, + GLuint hw_primitive, + GLuint nrverts ) +{ + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s\n", __FUNCTION__); + + LOCK_HARDWARE( rmesa ); + + radeonCompatEmitStateLocked( rmesa ); + rmesa->sarea->vc_format = vertex_format; + + if (rmesa->state.scissor.enabled) { + radeonCompatEmitPrimitiveLocked( rmesa, + hw_primitive, + nrverts, + rmesa->state.scissor.pClipRects, + rmesa->state.scissor.numClipRects ); + } + else { + radeonCompatEmitPrimitiveLocked( rmesa, + hw_primitive, + nrverts, + rmesa->pClipRects, + rmesa->numClipRects ); + } + + + UNLOCK_HARDWARE( rmesa ); +} + Index: xc/lib/GL/mesa/src/drv/radeon/radeon_context.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_context.c:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_context.c:1.7 --- xc/lib/GL/mesa/src/drv/radeon/radeon_context.c:1.2 Wed Mar 21 11:14:24 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_context.c Sat Feb 8 16:26:45 2003 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_context.c,v 1.2 2001/03/21 16:14:24 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_context.c,v 1.7 2003/02/08 21:26:45 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -31,206 +31,565 @@ * Authors: * Kevin E. Martin * Gareth Hughes + * Keith Whitwell * */ -#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 "radeon_swtcl.h" +#include "radeon_tcl.h" +#include "radeon_vtxfmt.h" +#include "radeon_maos.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" + +#include "api_arrayelt.h" #include "context.h" #include "simple_list.h" #include "mem.h" +#include "matrix.h" +#include "extensions.h" +#if defined(USE_X86_ASM) +#include "X86/common_x86_asm.h" +#endif + +#define RADEON_DATE "20020611" #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 */ - ); +int RADEON_DEBUG = (0); #endif + + + +/* Return the width and height of the given buffer. + */ +static void radeonGetBufferSize( GLframebuffer *buffer, + GLuint *width, GLuint *height ) +{ + GET_CURRENT_CONTEXT(ctx); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + LOCK_HARDWARE( rmesa ); + *width = rmesa->dri.drawable->w; + *height = rmesa->dri.drawable->h; + UNLOCK_HARDWARE( rmesa ); +} -#ifdef PER_CONTEXT_SAREA -char *radeonGetPerContextSAREA(int fd, - drmContext hHWContext, - drmSize size) +/* Return various strings for glGetString(). + */ +static const GLubyte *radeonGetString( GLcontext *ctx, GLenum name ) { - drmHandle handle; - drmAddress address; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + static char buffer[128]; + + switch ( name ) { + case GL_VENDOR: + return (GLubyte *)"Tungsten Graphics, Inc."; + + case GL_RENDERER: + sprintf( buffer, "Mesa DRI Radeon " RADEON_DATE); + + /* Append any chipset-specific information. None yet. + */ + + /* Append any AGP-specific information. + */ + 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 ( _mesa_x86_cpu_features ) { + strncat( buffer, " x86", 4 ); + } +#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_SSE_ASM + if ( cpu_has_xmm ) { + strncat( buffer, "/SSE", 4 ); + } +#endif +#endif + + if ( rmesa->dri.drmMinor < 3 ) { + strncat( buffer, " DRM-COMPAT", 11 ); + } + + if ( !(rmesa->TclFallback & RADEON_TCL_FALLBACK_TCL_DISABLE) ) { + strncat( buffer, " TCL", 4 ); + } + else { + strncat( buffer, " NO-TCL", 7 ); + } - if(drmGetContextPrivateMapping(fd, hHWContext, &handle) < 0) { + return (GLubyte *)buffer; + + default: return NULL; } - if(drmMap(fd, handle, size, &address) < 0) { - return NULL; +} + + +/* Extension strings exported by the R100 driver. + */ +static const char * const radeon_extensions[] = +{ + "GL_ARB_multisample", + "GL_ARB_multitexture", + "GL_ARB_texture_border_clamp", + "GL_ARB_texture_compression", + "GL_ARB_texture_env_add", + "GL_ARB_texture_env_combine", + "GL_ARB_texture_env_dot3", + "GL_ARB_texture_mirrored_repeat", + "GL_EXT_blend_logic_op", + "GL_EXT_blend_subtract", +/* "GL_EXT_fog_coord", */ + "GL_EXT_secondary_color", + "GL_EXT_texture_env_add", + "GL_EXT_texture_env_combine", + "GL_EXT_texture_env_dot3", + "GL_EXT_texture_filter_anisotropic", + "GL_EXT_texture_lod_bias", + "GL_ATI_texture_mirror_once", + "GL_IBM_texture_mirrored_repeat", + "GL_NV_blend_square", + "GL_SGIS_generate_mipmap", + "GL_SGIS_texture_border_clamp", + NULL +}; + +/* Initialize the extensions supported by this driver. + */ +static void radeonInitExtensions( GLcontext *ctx ) +{ + unsigned i; + _mesa_enable_imaging_extensions( ctx ); + + for ( i = 0 ; radeon_extensions[i] != NULL ; i++ ) { + _mesa_enable_extension( ctx, radeon_extensions[i] ); } +} + +extern const struct gl_pipeline_stage _radeon_render_stage; +extern const struct gl_pipeline_stage _radeon_tcl_stage; + +static const struct gl_pipeline_stage *radeon_pipeline[] = { + + /* Try and go straight to t&l + */ + &_radeon_tcl_stage, + + /* Catch any t&l fallbacks + */ + &_tnl_vertex_transform_stage, + &_tnl_normal_transform_stage, + &_tnl_lighting_stage, + &_tnl_fog_coordinate_stage, + &_tnl_texgen_stage, + &_tnl_texture_transform_stage, + + /* Try again to go to tcl? + * - no good for asymmetric-twoside (do with multipass) + * - no good for asymmetric-unfilled (do with multipass) + * - good for material + * - good for texgen + * - need to manipulate a bit of state + * + * - worth it/not worth it? + */ + + /* Else do them here. + */ + &_radeon_render_stage, + &_tnl_render_stage, /* FALLBACK: */ + 0, +}; - return address; + + +/* Initialize the driver's misc functions. + */ +static void radeonInitDriverFuncs( GLcontext *ctx ) +{ + ctx->Driver.GetBufferSize = radeonGetBufferSize; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; + ctx->Driver.GetString = radeonGetString; + + ctx->Driver.Error = NULL; + ctx->Driver.DrawPixels = NULL; + ctx->Driver.Bitmap = NULL; } -#endif + + /* Create the device specific context. */ -GLboolean radeonCreateContext( Display *dpy, GLvisual *glVisual, - __DRIcontextPrivate *driContextPriv ) +static GLboolean +radeonCreateContext( Display *dpy, const __GLcontextModes *glVisual, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate) { - GLcontext *ctx = driContextPriv->mesaContext; __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + radeonScreenPtr radeonScreen = (radeonScreenPtr)(sPriv->private); radeonContextPtr rmesa; - radeonScreenPtr radeonScreen; + GLcontext *ctx, *shareCtx; int i; - rmesa = (radeonContextPtr) CALLOC( sizeof(*rmesa) ); - if ( !rmesa ) return GL_FALSE; + assert(dpy); + assert(glVisual); + assert(driContextPriv); + assert(radeonScreen); - rmesa->glCtx = ctx; - rmesa->display = dpy; + /* Allocate the Radeon context */ + rmesa = (radeonContextPtr) CALLOC( sizeof(*rmesa) ); + if ( !rmesa ) + return GL_FALSE; - rmesa->driContext = driContextPriv; - rmesa->driScreen = sPriv; - rmesa->driDrawable = NULL; /* Set by XMesaMakeCurrent */ + /* Allocate the Mesa context */ + if (sharedContextPrivate) + shareCtx = ((radeonContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + rmesa->glCtx = _mesa_create_context(glVisual, shareCtx, rmesa, GL_TRUE); + if (!rmesa->glCtx) { + FREE(rmesa); + return GL_FALSE; + } + driContextPriv->driverPrivate = rmesa; - rmesa->hHWContext = driContextPriv->hHWContext; - rmesa->driHwLock = &sPriv->pSAREA->lock; - rmesa->driFd = sPriv->fd; + /* Init radeon context data */ + rmesa->dri.display = dpy; + rmesa->dri.context = driContextPriv; + rmesa->dri.screen = sPriv; + rmesa->dri.drawable = NULL; /* Set by XMesaMakeCurrent */ + rmesa->dri.hwContext = driContextPriv->hHWContext; + rmesa->dri.hwLock = &sPriv->pSAREA->lock; + rmesa->dri.fd = sPriv->fd; - radeonScreen = rmesa->radeonScreen = (radeonScreenPtr)(sPriv->private); + /* If we don't have 1.3, fallback to the 1.1 interfaces. + */ + if (getenv("RADEON_COMPAT") || sPriv->drmMinor < 3 ) + rmesa->dri.drmMinor = 1; + else + rmesa->dri.drmMinor = sPriv->drmMinor; - rmesa->sarea = (RADEONSAREAPrivPtr)((char *)sPriv->pSAREA + + rmesa->radeonScreen = radeonScreen; + rmesa->sarea = (RADEONSAREAPrivPtr)((GLubyte *)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 ); + rmesa->dma.buf0_address = rmesa->radeonScreen->buffers->list[0].address; 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; + make_empty_list( &rmesa->texture.objects[i] ); + rmesa->texture.heap[i] = mmInit( 0, radeonScreen->texSize[i] ); + rmesa->texture.age[i] = -1; + } + rmesa->texture.numHeaps = radeonScreen->numTexHeaps; + make_empty_list( &rmesa->texture.swapped ); + + rmesa->swtcl.RenderIndex = ~0; + rmesa->lost_context = 1; /* 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) + * and have them both in on-card memory at once. + * Test for 2 textures * 4 bytes/texel * size * size. */ - 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 = rmesa->glCtx; + if (radeonScreen->texSize[RADEON_CARD_HEAP] >= 2 * 4 * 2048 * 2048) { + ctx->Const.MaxTextureLevels = 12; /* 2048x2048 */ + } + else if (radeonScreen->texSize[RADEON_CARD_HEAP] >= 2 * 4 * 1024 * 1024) { + ctx->Const.MaxTextureLevels = 11; /* 1024x1024 */ + } + else if (radeonScreen->texSize[RADEON_CARD_HEAP] >= 2 * 4 * 512 * 512) { + ctx->Const.MaxTextureLevels = 10; /* 512x512 */ } + else { + ctx->Const.MaxTextureLevels = 9; /* 256x256 */ + } ctx->Const.MaxTextureUnits = 2; + ctx->Const.MaxTextureMaxAnisotropy = 16.0; + + /* No wide points. + */ + ctx->Const.MinPointSize = 1.0; + ctx->Const.MinPointSizeAA = 1.0; + ctx->Const.MaxPointSize = 1.0; + ctx->Const.MaxPointSizeAA = 1.0; + + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 10.0; + ctx->Const.MaxLineWidthAA = 10.0; + ctx->Const.LineWidthGranularity = 0.0625; + + /* Set maxlocksize (and hence vb size) small enough to avoid + * fallbacks in radeon_tcl.c. ie. guarentee that all vertices can + * fit in a single dma buffer for indexed rendering of quad strips, + * etc. + */ + ctx->Const.MaxArrayLockSize = + MIN2( ctx->Const.MaxArrayLockSize, + RADEON_BUFFER_SIZE / RADEON_MAX_TCL_VERTSIZE ); + + if (getenv("LIBGL_PERFORMANCE_BOXES")) + rmesa->boxes = 1; + else + rmesa->boxes = 0; + + + /* Initialize the software rasterizer and helper modules. + */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); + _ae_create_context( ctx ); - ctx->DriverCtx = (void *)rmesa; + /* Install the customized pipeline: + */ + _tnl_destroy_pipeline( ctx ); + _tnl_install_pipeline( ctx, radeon_pipeline ); - radeonDDInitExtensions( ctx ); + /* Try and keep materials and vertices separate: + */ + _tnl_isolate_materials( ctx, GL_TRUE ); - 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); +/* _mesa_allow_light_in_model( ctx, GL_FALSE ); */ - /* Ask Mesa to clip fog coordinates for us. + /* Configure swrast to match hardware characteristics: */ - ctx->TriangleCaps |= DD_CLIP_FOG_COORD; + _swrast_allow_pixel_fog( ctx, GL_FALSE ); + _swrast_allow_vertex_fog( ctx, GL_TRUE ); + + + _math_matrix_ctr( &rmesa->TexGenMatrix[0] ); + _math_matrix_ctr( &rmesa->TexGenMatrix[1] ); + _math_matrix_ctr( &rmesa->tmpmat ); + _math_matrix_set_identity( &rmesa->TexGenMatrix[0] ); + _math_matrix_set_identity( &rmesa->TexGenMatrix[1] ); + _math_matrix_set_identity( &rmesa->tmpmat ); + + radeonInitExtensions( ctx ); + radeonInitDriverFuncs( ctx ); + radeonInitIoctlFuncs( ctx ); + radeonInitStateFuncs( ctx ); + radeonInitSpanFuncs( ctx ); + radeonInitTextureFuncs( ctx ); + radeonInitState( rmesa ); + radeonInitSwtcl( ctx ); + + rmesa->do_irqs = (rmesa->radeonScreen->irq && !getenv("RADEON_NO_IRQS")); + rmesa->irqsEmitted = 0; + rmesa->iw.irq_seq = -1; + + rmesa->do_usleeps = !getenv("RADEON_NO_USLEEPS"); + +#if DO_DEBUG + if (getenv("RADEON_DEBUG_FALLBACKS")) + RADEON_DEBUG |= DEBUG_FALLBACKS; + + if (getenv("RADEON_DEBUG_TEXTURE")) + RADEON_DEBUG |= DEBUG_TEXTURE; + + if (getenv("RADEON_DEBUG_IOCTL")) + RADEON_DEBUG |= DEBUG_IOCTL; + + if (getenv("RADEON_DEBUG_PRIMS")) + RADEON_DEBUG |= DEBUG_PRIMS; + + if (getenv("RADEON_DEBUG_VERTS")) + RADEON_DEBUG |= DEBUG_VERTS; - if ( ctx->VB ) - radeonDDRegisterVB( ctx->VB ); + if (getenv("RADEON_DEBUG_STATE")) + RADEON_DEBUG |= DEBUG_STATE; - if ( ctx->NrPipelineStages ) { - ctx->NrPipelineStages = - radeonDDRegisterPipelineStages( ctx->PipelineStage, - ctx->PipelineStage, - ctx->NrPipelineStages ); + if (getenv("RADEON_DEBUG_CODEGEN")) + RADEON_DEBUG |= DEBUG_CODEGEN; + + if (getenv("RADEON_DEBUG_VTXFMT")) + RADEON_DEBUG |= DEBUG_VFMT; + + if (getenv("RADEON_DEBUG_VERBOSE")) + RADEON_DEBUG |= DEBUG_VERBOSE; + + if (getenv("RADEON_DEBUG_DRI")) + RADEON_DEBUG |= DEBUG_DRI; + + if (getenv("RADEON_DEBUG_DMA")) + RADEON_DEBUG |= DEBUG_DMA; + + if (getenv("RADEON_DEBUG_SANITY")) + RADEON_DEBUG |= DEBUG_SANITY; + + if (getenv("RADEON_DEBUG")) + { + const char *debug = getenv("RADEON_DEBUG"); + if (strstr(debug, "fall")) + RADEON_DEBUG |= DEBUG_FALLBACKS; + + if (strstr(debug, "tex")) + RADEON_DEBUG |= DEBUG_TEXTURE; + + if (strstr(debug, "ioctl")) + RADEON_DEBUG |= DEBUG_IOCTL; + + if (strstr(debug, "prim")) + RADEON_DEBUG |= DEBUG_PRIMS; + + if (strstr(debug, "vert")) + RADEON_DEBUG |= DEBUG_VERTS; + + if (strstr(debug, "state")) + RADEON_DEBUG |= DEBUG_STATE; + + if (strstr(debug, "code")) + RADEON_DEBUG |= DEBUG_CODEGEN; + + if (strstr(debug, "vfmt") || strstr(debug, "vtxf")) + RADEON_DEBUG |= DEBUG_VFMT; + + if (strstr(debug, "verb")) + RADEON_DEBUG |= DEBUG_VERBOSE; + + if (strstr(debug, "dri")) + RADEON_DEBUG |= DEBUG_DRI; + + if (strstr(debug, "dma")) + RADEON_DEBUG |= DEBUG_DMA; + + if (strstr(debug, "san")) + RADEON_DEBUG |= DEBUG_SANITY; } - radeonDDInitState( rmesa ); - driContextPriv->driverPrivate = (void *)rmesa; +#endif + if (getenv("RADEON_NO_RAST")) { + fprintf(stderr, "disabling 3D acceleration\n"); + FALLBACK(rmesa, RADEON_FALLBACK_DISABLE, 1); + } + else if (getenv("RADEON_TCL_FORCE_ENABLE")) { + fprintf(stderr, "Enabling TCL support... this will probably crash\n"); + fprintf(stderr, " your card if it isn't capable of TCL!\n"); + rmesa->radeonScreen->chipset |= RADEON_CHIPSET_TCL; + } else if (getenv("RADEON_TCL_FORCE_DISABLE") || + rmesa->dri.drmMinor < 3 || + !(rmesa->radeonScreen->chipset & RADEON_CHIPSET_TCL)) { + rmesa->radeonScreen->chipset &= ~RADEON_CHIPSET_TCL; + fprintf(stderr, "disabling TCL support\n"); + TCL_FALLBACK(rmesa->glCtx, RADEON_TCL_FALLBACK_TCL_DISABLE, 1); + } + + if (rmesa->radeonScreen->chipset & RADEON_CHIPSET_TCL) { + if (!getenv("RADEON_NO_VTXFMT")) + radeonVtxfmtInit( ctx ); + + _tnl_need_dlist_norm_lengths( ctx, GL_FALSE ); + } return GL_TRUE; } + /* Destroy the device specific context. + */ +/* Destroy the Mesa and driver specific context data. */ -void radeonDestroyContext( radeonContextPtr rmesa ) +static void +radeonDestroyContext( __DRIcontextPrivate *driContextPriv ) { + GET_CURRENT_CONTEXT(ctx); + radeonContextPtr rmesa = (radeonContextPtr) driContextPriv->driverPrivate; + radeonContextPtr current = ctx ? RADEON_CONTEXT(ctx) : NULL; + + /* check if we're deleting the currently bound context */ + if (rmesa == current) { + RADEON_FIREVERTICES( rmesa ); + _mesa_make_current2(NULL, NULL, NULL); + } + + /* Free radeon context resources */ + assert(rmesa); /* should never be null */ 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; + if (rmesa->glCtx->Shared->RefCount == 1) { + /* This share group is about to go away, free our private + * texture object data. + */ + radeonTexObjPtr t, next_t; + int i; + + for ( i = 0 ; i < rmesa->texture.numHeaps ; i++ ) { + foreach_s ( t, next_t, &rmesa->texture.objects[i] ) { + radeonDestroyTexObj( rmesa, t ); + } + mmDestroy( rmesa->texture.heap[i] ); + rmesa->texture.heap[i] = NULL; + } + + foreach_s ( t, next_t, &rmesa->texture.swapped ) { + radeonDestroyTexObj( rmesa, t ); + } } -#endif - for ( i = 0 ; i < radeonScreen->numTexHeaps ; i++ ) { - foreach_s ( t, next_t, &rmesa->TexObjList[i] ) { - radeonDestroyTexObj( rmesa, t ); - } - mmDestroy( rmesa->texHeap[i] ); + _swsetup_DestroyContext( rmesa->glCtx ); + _tnl_DestroyContext( rmesa->glCtx ); + _ac_DestroyContext( rmesa->glCtx ); + _swrast_DestroyContext( rmesa->glCtx ); + + radeonDestroySwtcl( rmesa->glCtx ); + + radeonReleaseArrays( rmesa->glCtx, ~0 ); + if (rmesa->dma.current.buf) { + radeonReleaseDmaRegion( rmesa, &rmesa->dma.current, __FUNCTION__ ); + radeonFlushCmdBuf( rmesa, __FUNCTION__ ); } - foreach_s ( t, next_t, &rmesa->SwappedOut ) { - radeonDestroyTexObj( rmesa, t ); + if (!rmesa->TclFallback & RADEON_TCL_FALLBACK_TCL_DISABLE) + if (!getenv("RADEON_NO_VTXFMT")) + radeonVtxfmtDestroy( rmesa->glCtx ); + + /* free the Mesa context */ + rmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context( rmesa->glCtx ); + + if (rmesa->state.scissor.pClipRects) { + FREE(rmesa->state.scissor.pClipRects); + rmesa->state.scissor.pClipRects = 0; } - ALIGN_FREE( rmesa->tmp_matrix ); FREE( rmesa ); } @@ -239,28 +598,198 @@ glx_fini_prof(); #endif } + + +/* Initialize the driver specific screen private data. + */ +static GLboolean +radeonInitDriver( __DRIscreenPrivate *sPriv ) +{ + sPriv->private = (void *) radeonCreateScreen( sPriv ); + if ( !sPriv->private ) { + radeonDestroyScreen( sPriv ); + return GL_FALSE; + } + + return GL_TRUE; +} + + +/* Create and initialize the Mesa and driver specific pixmap buffer + * data. + */ +static GLboolean +radeonCreateBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap ) +{ + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } + else { + const GLboolean swDepth = GL_FALSE; + const GLboolean swAlpha = GL_FALSE; + const GLboolean swAccum = mesaVis->accumRedBits > 0; + const GLboolean swStencil = mesaVis->stencilBits > 0 && + mesaVis->depthBits != 24; + driDrawPriv->driverPrivate = (void *) + _mesa_create_framebuffer( mesaVis, + swDepth, + swStencil, + swAccum, + swAlpha ); + return (driDrawPriv->driverPrivate != NULL); + } +} + + +static void +radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +{ + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); +} + + + +static void +radeonSwapBuffers(Display *dpy, void *drawablePrivate) +{ + __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + (void) dpy; + + if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { + radeonContextPtr rmesa; + GLcontext *ctx; + rmesa = (radeonContextPtr) dPriv->driContextPriv->driverPrivate; + ctx = rmesa->glCtx; + if (ctx->Visual.doubleBufferMode) { + _mesa_swapbuffers( ctx ); /* flush pending rendering comands */ + + if ( rmesa->doPageFlip ) { + radeonPageFlip( dPriv ); + } + else { + radeonCopyBuffer( dPriv ); + } + } + } + else { + /* XXX this shouldn't be an error but we can't handle it for now */ + _mesa_problem(NULL, "radeonSwapBuffers: drawable has no context!\n"); + } +} -/* Load the device specific context into the hardware. The actual - * setting of the hardware state is done in the radeonUpdateHWState(). + +/* Force the context `c' to be the current context and associate with it + * buffer `b'. */ -radeonContextPtr radeonMakeCurrent( radeonContextPtr oldCtx, - radeonContextPtr newCtx, - __DRIdrawablePrivate *dPriv ) -{ - if ( oldCtx ) { - if ( oldCtx != newCtx ) { - newCtx->new_state |= RADEON_NEW_CONTEXT; - newCtx->dirty = RADEON_UPLOAD_ALL; +static GLboolean +radeonMakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ) +{ + if ( driContextPriv ) { + radeonContextPtr newRadeonCtx = + (radeonContextPtr) driContextPriv->driverPrivate; + + if (RADEON_DEBUG & DEBUG_DRI) + fprintf(stderr, "%s ctx %p\n", __FUNCTION__, newRadeonCtx->glCtx); + + if ( newRadeonCtx->dri.drawable != driDrawPriv ) { + newRadeonCtx->dri.drawable = driDrawPriv; + radeonUpdateWindow( newRadeonCtx->glCtx ); + radeonUpdateViewportOffset( newRadeonCtx->glCtx ); } - if ( oldCtx->driDrawable != dPriv ) { - newCtx->new_state |= RADEON_NEW_WINDOW | RADEON_NEW_CLIP; + + _mesa_make_current2( newRadeonCtx->glCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate ); + + if ( !newRadeonCtx->glCtx->Viewport.Width ) { + _mesa_set_viewport( newRadeonCtx->glCtx, 0, 0, + driDrawPriv->w, driDrawPriv->h ); } + + if (newRadeonCtx->vb.enabled) + radeonVtxfmtMakeCurrent( newRadeonCtx->glCtx ); + } else { - newCtx->new_state |= RADEON_NEW_CONTEXT; - newCtx->dirty = RADEON_UPLOAD_ALL; + if (RADEON_DEBUG & DEBUG_DRI) + fprintf(stderr, "%s ctx %p\n", __FUNCTION__, NULL); + _mesa_make_current( 0, 0 ); } + + if (RADEON_DEBUG & DEBUG_DRI) + fprintf(stderr, "End %s\n", __FUNCTION__); + return GL_TRUE; +} + +/* Force the context `c' to be unbound from its buffer. + */ +static GLboolean +radeonUnbindContext( __DRIcontextPrivate *driContextPriv ) +{ + radeonContextPtr rmesa = (radeonContextPtr) driContextPriv->driverPrivate; - newCtx->driDrawable = dPriv; + if (RADEON_DEBUG & DEBUG_DRI) + fprintf(stderr, "%s ctx %p\n", __FUNCTION__, rmesa->glCtx); - return newCtx; + radeonVtxfmtUnbindContext( rmesa->glCtx ); + return GL_TRUE; +} + +/* Fullscreen mode isn't used for much -- could be a way to shrink + * front/back buffers & get more texture memory if the client has + * changed the video resolution. + * + * Pageflipping is now done automatically whenever there is a single + * 3d client. + */ +static GLboolean +radeonOpenCloseFullScreen( __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 ) +{ +} + + + +static struct __DriverAPIRec radeonAPI = { + radeonInitDriver, + radeonDestroyScreen, + radeonCreateContext, + radeonDestroyContext, + radeonCreateBuffer, + radeonDestroyBuffer, + radeonSwapBuffers, + radeonMakeCurrent, + radeonUnbindContext, + radeonOpenCloseFullScreen, + radeonOpenCloseFullScreen +}; + + + +/* + * This is the bootstrap function for the driver. + * The __driCreateScreen name is the symbol that libGL.so fetches. + * Return: pointer to a __DRIscreenPrivate. + */ +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) +{ + __DRIscreenPrivate *psp; + psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &radeonAPI); + return (void *) psp; } Index: xc/lib/GL/mesa/src/drv/radeon/radeon_context.h diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_context.h:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_context.h:1.6 --- xc/lib/GL/mesa/src/drv/radeon/radeon_context.h:1.2 Wed Mar 21 11:14:24 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_context.h Mon Dec 16 11:18:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_context.h,v 1.2 2001/03/21 16:14:24 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_context.h,v 1.6 2002/12/16 16:18:58 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -31,7 +31,7 @@ * Authors: * Kevin E. Martin * Gareth Hughes - * + * Keith Whitwell */ #ifndef __RADEON_CONTEXT_H__ @@ -39,192 +39,736 @@ #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 "mtypes.h" #include "radeon_lock.h" -#include "radeon_texobj.h" #include "radeon_screen.h" +#include "mm.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 */ +/* See correponding strings in radeon_swtcl.c */ #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 +#define RADEON_FALLBACK_STENCIL 0x0004 +#define RADEON_FALLBACK_RENDER_MODE 0x0008 +#define RADEON_FALLBACK_BLEND_EQ 0x0010 +#define RADEON_FALLBACK_BLEND_FUNC 0x0020 +#define RADEON_FALLBACK_DISABLE 0x0040 -/* Subpixel offsets for window coordinates (triangles): +/* Use the templated vertex format: */ -#define SUBPIXEL_X (0.0625) -#define SUBPIXEL_Y (0.125) +#define COLOR_IS_RGBA +#define TAG(x) radeon##x +#include "tnl_dd/t_dd_vertex.h" +#undef TAG + +typedef void (*radeon_tri_func)( radeonContextPtr, + radeonVertex *, + radeonVertex *, + radeonVertex * ); + +typedef void (*radeon_line_func)( radeonContextPtr, + radeonVertex *, + radeonVertex * ); + +typedef void (*radeon_point_func)( radeonContextPtr, + radeonVertex * ); + + +struct radeon_colorbuffer_state { + GLuint clear; + GLint drawOffset, drawPitch; +}; + + +struct radeon_depthbuffer_state { + GLuint clear; + GLfloat scale; +}; + +struct radeon_pixel_state { + GLint readOffset, readPitch; +}; + +struct radeon_scissor_state { + XF86DRIClipRectRec rect; + GLboolean enabled; + + GLuint numClipRects; /* Cliprects active */ + GLuint numAllocedClipRects; /* Cliprects available */ + XF86DRIClipRectPtr pClipRects; +}; + +struct radeon_stencilbuffer_state { + GLboolean hwBuffer; + GLuint clear; /* rb3d_stencilrefmask value */ +}; + +struct radeon_stipple_state { + GLuint mask[32]; +}; + + + +#define TEX_0 0x1 +#define TEX_1 0x2 +#define TEX_ALL 0x3 + +typedef struct radeon_tex_obj radeonTexObj, *radeonTexObjPtr; -/* Offset for points: +/* Texture object in locally shared texture space. */ -#define PNT_X_OFFSET ( 0.125F) -#define PNT_Y_OFFSET (-0.125F) +struct radeon_tex_obj { + radeonTexObjPtr next, prev; -typedef void (*radeon_interp_func)( GLfloat t, - GLfloat *result, - const GLfloat *in, - const GLfloat *out ); + struct gl_texture_object *tObj; /* Mesa texture object */ -struct radeon_elt_tab { - void (*emit_unclipped_verts)( struct vertex_buffer *VB ); + PMemBlock memBlock; /* Memory block containing texture */ + GLuint bufAddr; /* Offset to start of locally + shared texture block */ - void (*build_tri_verts)( radeonContextPtr rmesa, - struct vertex_buffer *VB, - GLfloat *O, GLuint *elt ); + GLuint dirty_images; /* Flags for whether or not + images need to be uploaded to + local or AGP texture space */ - void (*interp)( GLfloat t, GLfloat *O, - const GLfloat *I, const GLfloat *J ); + GLuint dirty_state; /* Flags (1 per texunit) for + whether or not this texobj + has dirty hardware state + (pp_*) that needs to be + brought into the + texunit. */ - void (*project_and_emit_verts)( radeonContextPtr rmesa, - const GLfloat *verts, - GLuint *elts, - GLuint nr ); + 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; + + /* texObj->Image[firstLevel] through texObj->Image[lastLevel] are the + * images to upload. + */ + GLint firstLevel; + GLint lastLevel; }; + +struct radeon_texture_env_state { + radeonTexObjPtr texobj; + GLenum format; + GLenum envMode; +}; + +struct radeon_texture_state { + struct radeon_texture_env_state unit[RADEON_MAX_TEXTURE_UNITS]; +}; + + +struct radeon_state_atom { + struct radeon_state_atom *next, *prev; + const char *name; /* for debug */ + int cmd_size; /* size in bytes */ + GLuint is_tcl; + int *cmd; /* one or more cmd's */ + int *lastcmd; /* one or more cmd's */ + GLboolean (*check)( GLcontext * ); /* is this state active? */ +}; + + + +/* Trying to keep these relatively short as the variables are becoming + * extravagently long. Drop the RADEON_ off the front of everything - + * I think we know we're in the radeon driver by now, and keep the + * prefix to 3 letters unless absolutely impossible. + */ + +#define CTX_CMD_0 0 +#define CTX_PP_MISC 1 +#define CTX_PP_FOG_COLOR 2 +#define CTX_RE_SOLID_COLOR 3 +#define CTX_RB3D_BLENDCNTL 4 +#define CTX_RB3D_DEPTHOFFSET 5 +#define CTX_RB3D_DEPTHPITCH 6 +#define CTX_RB3D_ZSTENCILCNTL 7 +#define CTX_CMD_1 8 +#define CTX_PP_CNTL 9 +#define CTX_RB3D_CNTL 10 +#define CTX_RB3D_COLOROFFSET 11 +#define CTX_CMD_2 12 +#define CTX_RB3D_COLORPITCH 13 +#define CTX_STATE_SIZE 14 + +#define SET_CMD_0 0 +#define SET_SE_CNTL 1 +#define SET_SE_COORDFMT 2 +#define SET_CMD_1 3 +#define SET_SE_CNTL_STATUS 4 +#define SET_STATE_SIZE 5 + +#define LIN_CMD_0 0 +#define LIN_RE_LINE_PATTERN 1 +#define LIN_RE_LINE_STATE 2 +#define LIN_CMD_1 3 +#define LIN_SE_LINE_WIDTH 4 +#define LIN_STATE_SIZE 5 + +#define MSK_CMD_0 0 +#define MSK_RB3D_STENCILREFMASK 1 +#define MSK_RB3D_ROPCNTL 2 +#define MSK_RB3D_PLANEMASK 3 +#define MSK_STATE_SIZE 4 + +#define VPT_CMD_0 0 +#define VPT_SE_VPORT_XSCALE 1 +#define VPT_SE_VPORT_XOFFSET 2 +#define VPT_SE_VPORT_YSCALE 3 +#define VPT_SE_VPORT_YOFFSET 4 +#define VPT_SE_VPORT_ZSCALE 5 +#define VPT_SE_VPORT_ZOFFSET 6 +#define VPT_STATE_SIZE 7 + +#define MSC_CMD_0 0 +#define MSC_RE_MISC 1 +#define MSC_STATE_SIZE 2 + +#define TEX_CMD_0 0 +#define TEX_PP_TXFILTER 1 +#define TEX_PP_TXFORMAT 2 +#define TEX_PP_TXOFFSET 3 +#define TEX_PP_TXCBLEND 4 +#define TEX_PP_TXABLEND 5 +#define TEX_PP_TFACTOR 6 +#define TEX_CMD_1 7 +#define TEX_PP_BORDER_COLOR 8 +#define TEX_STATE_SIZE 9 + +#define ZBS_CMD_0 0 +#define ZBS_SE_ZBIAS_FACTOR 1 +#define ZBS_SE_ZBIAS_CONSTANT 2 +#define ZBS_STATE_SIZE 3 + +#define TCL_CMD_0 0 +#define TCL_OUTPUT_VTXFMT 1 +#define TCL_OUTPUT_VTXSEL 2 +#define TCL_MATRIX_SELECT_0 3 +#define TCL_MATRIX_SELECT_1 4 +#define TCL_UCP_VERT_BLEND_CTL 5 +#define TCL_TEXTURE_PROC_CTL 6 +#define TCL_LIGHT_MODEL_CTL 7 +#define TCL_PER_LIGHT_CTL_0 8 +#define TCL_PER_LIGHT_CTL_1 9 +#define TCL_PER_LIGHT_CTL_2 10 +#define TCL_PER_LIGHT_CTL_3 11 +#define TCL_STATE_SIZE 12 + +#define MTL_CMD_0 0 +#define MTL_EMMISSIVE_RED 1 +#define MTL_EMMISSIVE_GREEN 2 +#define MTL_EMMISSIVE_BLUE 3 +#define MTL_EMMISSIVE_ALPHA 4 +#define MTL_AMBIENT_RED 5 +#define MTL_AMBIENT_GREEN 6 +#define MTL_AMBIENT_BLUE 7 +#define MTL_AMBIENT_ALPHA 8 +#define MTL_DIFFUSE_RED 9 +#define MTL_DIFFUSE_GREEN 10 +#define MTL_DIFFUSE_BLUE 11 +#define MTL_DIFFUSE_ALPHA 12 +#define MTL_SPECULAR_RED 13 +#define MTL_SPECULAR_GREEN 14 +#define MTL_SPECULAR_BLUE 15 +#define MTL_SPECULAR_ALPHA 16 +#define MTL_SHININESS 17 +#define MTL_STATE_SIZE 18 + +#define VTX_CMD_0 0 +#define VTX_SE_COORD_FMT 1 +#define VTX_STATE_SIZE 2 + +#define MAT_CMD_0 0 +#define MAT_ELT_0 1 +#define MAT_STATE_SIZE 17 + +#define GRD_CMD_0 0 +#define GRD_VERT_GUARD_CLIP_ADJ 1 +#define GRD_VERT_GUARD_DISCARD_ADJ 2 +#define GRD_HORZ_GUARD_CLIP_ADJ 3 +#define GRD_HORZ_GUARD_DISCARD_ADJ 4 +#define GRD_STATE_SIZE 5 + +/* position changes frequently when lighting in modelpos - separate + * out to new state item? + */ +#define LIT_CMD_0 0 +#define LIT_AMBIENT_RED 1 +#define LIT_AMBIENT_GREEN 2 +#define LIT_AMBIENT_BLUE 3 +#define LIT_AMBIENT_ALPHA 4 +#define LIT_DIFFUSE_RED 5 +#define LIT_DIFFUSE_GREEN 6 +#define LIT_DIFFUSE_BLUE 7 +#define LIT_DIFFUSE_ALPHA 8 +#define LIT_SPECULAR_RED 9 +#define LIT_SPECULAR_GREEN 10 +#define LIT_SPECULAR_BLUE 11 +#define LIT_SPECULAR_ALPHA 12 +#define LIT_POSITION_X 13 +#define LIT_POSITION_Y 14 +#define LIT_POSITION_Z 15 +#define LIT_POSITION_W 16 +#define LIT_DIRECTION_X 17 +#define LIT_DIRECTION_Y 18 +#define LIT_DIRECTION_Z 19 +#define LIT_DIRECTION_W 20 +#define LIT_ATTEN_CONST 21 +#define LIT_ATTEN_LINEAR 22 +#define LIT_ATTEN_QUADRATIC 23 +#define LIT_ATTEN_XXX 24 +#define LIT_CMD_1 25 +#define LIT_SPOT_DCD 26 +#define LIT_SPOT_EXPONENT 27 +#define LIT_SPOT_CUTOFF 28 +#define LIT_SPECULAR_THRESH 29 +#define LIT_RANGE_CUTOFF 30 /* ? */ +#define LIT_RANGE_ATTEN 31 /* ? */ +#define LIT_STATE_SIZE 32 + +/* Fog + */ +#define FOG_CMD_0 0 +#define FOG_R 1 +#define FOG_C 2 +#define FOG_D 3 +#define FOG_PAD 4 +#define FOG_STATE_SIZE 5 + +/* UCP + */ +#define UCP_CMD_0 0 +#define UCP_X 1 +#define UCP_Y 2 +#define UCP_Z 3 +#define UCP_W 4 +#define UCP_STATE_SIZE 5 + +/* GLT - Global ambient + */ +#define GLT_CMD_0 0 +#define GLT_RED 1 +#define GLT_GREEN 2 +#define GLT_BLUE 3 +#define GLT_ALPHA 4 +#define GLT_STATE_SIZE 5 + +/* EYE + */ +#define EYE_CMD_0 0 +#define EYE_X 1 +#define EYE_Y 2 +#define EYE_Z 3 +#define EYE_RESCALE_FACTOR 4 +#define EYE_STATE_SIZE 5 + +#define SHN_CMD_0 0 +#define SHN_SHININESS 1 +#define SHN_STATE_SIZE 2 + + + + + +struct radeon_hw_state { + /* All state should be on one of these lists: + */ + struct radeon_state_atom dirty; /* dirty list head placeholder */ + struct radeon_state_atom clean; /* clean list head placeholder */ + + /* Hardware state, stored as cmdbuf commands: + * -- Need to doublebuffer for + * - reviving state after loss of context + * - eliding noop statechange loops? (except line stipple count) + */ + struct radeon_state_atom ctx; + struct radeon_state_atom set; + struct radeon_state_atom lin; + struct radeon_state_atom msk; + struct radeon_state_atom vpt; + struct radeon_state_atom tcl; + struct radeon_state_atom msc; + struct radeon_state_atom tex[2]; + struct radeon_state_atom zbs; + struct radeon_state_atom mtl; + struct radeon_state_atom mat[5]; + struct radeon_state_atom lit[8]; /* includes vec, scl commands */ + struct radeon_state_atom ucp[6]; + struct radeon_state_atom eye; /* eye pos */ + struct radeon_state_atom grd; /* guard band clipping */ + struct radeon_state_atom fog; + struct radeon_state_atom glt; +}; + +struct radeon_state { + /* Derived state for internal purposes: + */ + struct radeon_colorbuffer_state color; + struct radeon_depthbuffer_state depth; + struct radeon_pixel_state pixel; + struct radeon_scissor_state scissor; + struct radeon_stencilbuffer_state stencil; + struct radeon_stipple_state stipple; + struct radeon_texture_state texture; +}; + +struct radeon_texture { + radeonTexObj objects[RADEON_NR_TEX_HEAPS]; + radeonTexObj swapped; + + memHeap_t *heap[RADEON_NR_TEX_HEAPS]; + GLint age[RADEON_NR_TEX_HEAPS]; + + GLint numHeaps; +}; + +/* Need refcounting on dma buffers: + */ +struct radeon_dma_buffer { + int refcount; /* the number of retained regions in buf */ + drmBufPtr buf; +}; + +#define GET_START(rvb) (rmesa->radeonScreen->agp_buffer_offset + \ + (rvb)->address - rmesa->dma.buf0_address + \ + (rvb)->start) + +/* A retained region, eg vertices for indexed vertices. + */ +struct radeon_dma_region { + struct radeon_dma_buffer *buf; + char *address; /* == buf->address */ + int start, end, ptr; /* offsets from start of buf */ + int aos_start; + int aos_stride; + int aos_size; +}; + + +struct radeon_dma { + /* Active dma region. Allocations for vertices and retained + * regions come from here. Also used for emitting random vertices, + * these may be flushed by calling flush_current(); + */ + struct radeon_dma_region current; + + void (*flush)( radeonContextPtr ); + + char *buf0_address; /* start of buf[0], for index calcs */ + GLuint nr_released_bufs; /* flush after so many buffers released */ +}; + +struct radeon_dri_mirror { + Display *display; /* X server display */ + + __DRIcontextPrivate *context; /* DRI context */ + __DRIscreenPrivate *screen; /* DRI screen */ + __DRIdrawablePrivate *drawable; /* DRI drawable bound to this ctx */ + + drmContext hwContext; + drmLock *hwLock; + int fd; + int drmMinor; +}; + + +#define RADEON_CMD_BUF_SZ (8*1024) + +struct radeon_store { + GLuint statenr; + GLuint primnr; + char cmd_buf[RADEON_CMD_BUF_SZ]; + int cmd_used; + int elts_start; +}; + + +/* radeon_tcl.c + */ +struct radeon_tcl_info { + GLuint vertex_format; + GLint last_offset; + GLuint hw_primitive; + + struct radeon_dma_region *aos_components[8]; + GLuint nr_aos_components; + + GLuint *Elts; + + struct radeon_dma_region indexed_verts; + struct radeon_dma_region obj; + struct radeon_dma_region rgba; + struct radeon_dma_region spec; + struct radeon_dma_region fog; + struct radeon_dma_region tex[RADEON_MAX_TEXTURE_UNITS]; + struct radeon_dma_region norm; +}; + + +/* radeon_swtcl.c + */ +struct radeon_swtcl_info { + GLuint SetupIndex; + GLuint SetupNewInputs; + GLuint RenderIndex; + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; + char *verts; + + /* Fallback rasterization functions + */ + radeon_point_func draw_point; + radeon_line_func draw_line; + radeon_tri_func draw_tri; + + GLuint hw_primitive; + GLenum render_primitive; + GLuint numverts; + + struct radeon_dma_region indexed_verts; +}; + + +struct radeon_ioctl { + GLuint vertex_offset; + GLuint vertex_size; +}; + + + +#define RADEON_MAX_PRIMS 64 + + +/* Want to keep a cache of these around. Each is parameterized by + * only a single value which has only a small range. Only expect a + * few, so just rescan the list each time? + */ +struct dynfn { + struct dynfn *next, *prev; + int key; + char *code; +}; + +struct dfn_lists { + struct dynfn Vertex2f; + struct dynfn Vertex2fv; + struct dynfn Vertex3f; + struct dynfn Vertex3fv; + struct dynfn Color4ub; + struct dynfn Color4ubv; + struct dynfn Color3ub; + struct dynfn Color3ubv; + struct dynfn Color4f; + struct dynfn Color4fv; + struct dynfn Color3f; + struct dynfn Color3fv; + struct dynfn SecondaryColor3ubEXT; + struct dynfn SecondaryColor3ubvEXT; + struct dynfn SecondaryColor3fEXT; + struct dynfn SecondaryColor3fvEXT; + struct dynfn Normal3f; + struct dynfn Normal3fv; + struct dynfn TexCoord2f; + struct dynfn TexCoord2fv; + struct dynfn TexCoord1f; + struct dynfn TexCoord1fv; + struct dynfn MultiTexCoord2fARB; + struct dynfn MultiTexCoord2fvARB; + struct dynfn MultiTexCoord1fARB; + struct dynfn MultiTexCoord1fvARB; +}; + +struct _vb; + +struct dfn_generators { + struct dynfn *(*Vertex2f)( GLcontext *, int ); + struct dynfn *(*Vertex2fv)( GLcontext *, int ); + struct dynfn *(*Vertex3f)( GLcontext *, int ); + struct dynfn *(*Vertex3fv)( GLcontext *, int ); + struct dynfn *(*Color4ub)( GLcontext *, int ); + struct dynfn *(*Color4ubv)( GLcontext *, int ); + struct dynfn *(*Color3ub)( GLcontext *, int ); + struct dynfn *(*Color3ubv)( GLcontext *, int ); + struct dynfn *(*Color4f)( GLcontext *, int ); + struct dynfn *(*Color4fv)( GLcontext *, int ); + struct dynfn *(*Color3f)( GLcontext *, int ); + struct dynfn *(*Color3fv)( GLcontext *, int ); + struct dynfn *(*SecondaryColor3ubEXT)( GLcontext *, int ); + struct dynfn *(*SecondaryColor3ubvEXT)( GLcontext *, int ); + struct dynfn *(*SecondaryColor3fEXT)( GLcontext *, int ); + struct dynfn *(*SecondaryColor3fvEXT)( GLcontext *, int ); + struct dynfn *(*Normal3f)( GLcontext *, int ); + struct dynfn *(*Normal3fv)( GLcontext *, int ); + struct dynfn *(*TexCoord2f)( GLcontext *, int ); + struct dynfn *(*TexCoord2fv)( GLcontext *, int ); + struct dynfn *(*TexCoord1f)( GLcontext *, int ); + struct dynfn *(*TexCoord1fv)( GLcontext *, int ); + struct dynfn *(*MultiTexCoord2fARB)( GLcontext *, int ); + struct dynfn *(*MultiTexCoord2fvARB)( GLcontext *, int ); + struct dynfn *(*MultiTexCoord1fARB)( GLcontext *, int ); + struct dynfn *(*MultiTexCoord1fvARB)( GLcontext *, int ); +}; + + +struct radeon_vb { + /* Keep these first: referenced from codegen templates: + */ + GLint counter, initial_counter; + GLint *dmaptr; + void (*notify)( void ); + GLint vertex_size; + + /* A maximum total of 15 elements per vertex: 3 floats for position, 3 + * floats for normal, 4 floats for color, 4 bytes for secondary color, + * 2 floats for each texture unit (4 floats total). + * + * As soon as the 3rd TMU is supported or cube maps (or 3D textures) are + * supported, this value will grow. + * + * The position data is never actually stored here, so 3 elements could be + * trimmed out of the buffer. + */ + union { float f; int i; radeon_color_t color; } vertex[15]; + + GLfloat *normalptr; + GLfloat *floatcolorptr; + radeon_color_t *colorptr; + GLfloat *floatspecptr; + radeon_color_t *specptr; + GLfloat *texcoordptr[2]; + + GLcontext *context; /* current context : Single thread only! */ +}; + +struct radeon_prim { + GLuint start; + GLuint end; + GLuint prim; +}; + +struct radeon_vbinfo { + GLenum *prim; /* &ctx->Driver.CurrentExecPrimitive */ + GLuint primflags; + GLboolean enabled; /* RADEON_NO_VTXFMT//RADEON_NO_TCL env vars */ + GLboolean installed; + GLboolean fell_back; + GLboolean recheck; + GLint initial_counter; + GLint nrverts; + GLuint vertex_format; + + GLuint installed_vertex_format; + GLuint installed_color_3f_sz; + + struct radeon_prim primlist[RADEON_MAX_PRIMS]; + int nrprims; + + struct dfn_lists dfn_cache; + struct dfn_generators codegen; + GLvertexformat vtxfmt; +}; + + + + 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]; + struct radeon_hw_state hw; + struct radeon_state state; /* 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; + struct radeon_texture texture; + - GLuint IndirectTriangles; + /* Rasterization and vertex state: + */ + GLuint TclFallback; GLuint Fallback; + GLuint NewGLState; - /* Fast path + + /* Temporaries for translating away float colors: */ - GLuint SetupIndex; - GLuint SetupDone; - GLuint RenderIndex; - GLuint OnFastPath; - radeon_interp_func interp; - GLfloat *tmp_matrix; + struct gl_client_array UbyteColor; + struct gl_client_array UbyteSecondaryColor; /* 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]; + struct radeon_ioctl ioctl; + struct radeon_dma dma; + struct radeon_store store; /* Page flipping */ GLuint doPageFlip; - GLuint currentPage; - /* Drawable, cliprect and scissor information + /* Busy waiting */ - GLenum DrawBuffer; /* Optimize draw buffer update */ - GLint drawOffset, drawPitch; - GLint readOffset, readPitch; + GLuint do_usleeps; + GLuint do_irqs; + GLuint irqsEmitted; + drmRadeonIrqWait iw; + /* Drawable, cliprect and scissor information + */ GLuint numClipRects; /* Cliprects for the draw buffer */ XF86DRIClipRectPtr pClipRects; + unsigned int lastStamp; + GLboolean lost_context; + radeonScreenPtr radeonScreen; /* Screen private DRI data */ + RADEONSAREAPrivPtr sarea; /* Private SAREA data */ - GLuint scissor; - XF86DRIClipRectRec scissor_rect; /* Current software scissor */ + /* TCL stuff + */ + GLmatrix TexGenMatrix[RADEON_MAX_TEXTURE_UNITS]; + GLboolean recheck_texgen[RADEON_MAX_TEXTURE_UNITS]; + GLboolean TexGenNeedNormals[RADEON_MAX_TEXTURE_UNITS]; + GLuint TexMatEnabled; + GLuint TexGenEnabled; + GLmatrix tmpmat; + GLuint last_ReallyEnabled; - /* Mirrors of some DRI state + /* VBI */ - Display *display; /* X server display */ + GLuint vbl_seq; - __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; + /* radeon_tcl.c + */ + struct radeon_tcl_info tcl; - radeonScreenPtr radeonScreen; /* Screen private DRI data */ - RADEONSAREAPrivPtr sarea; /* Private SAREA data */ + /* radeon_swtcl.c + */ + struct radeon_swtcl_info swtcl; -#ifdef PER_CONTEXT_SAREA - char *private_sarea; /* Per-context private SAREA */ -#endif + /* radeon_vtxfmt.c + */ + struct radeon_vbinfo vb; + + /* Mirrors of some DRI state + */ + struct radeon_dri_mirror dri; + /* Performance counters */ GLuint boxes; /* Draw performance boxes */ @@ -239,19 +783,26 @@ #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 ); +static __inline GLuint radeonPackColor( GLuint cpp, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) +{ + switch ( cpp ) { + case 2: + return PACK_COLOR_565( r, g, b ); + case 4: + return PACK_COLOR_8888( a, r, g, b ); + default: + return 0; + } +} +#define RADEON_OLD_PACKETS 1 /* ================================================================ * Debugging: */ -#define DO_DEBUG 0 -#define ENABLE_PERF_BOXES 0 +#define DO_DEBUG 1 #if DO_DEBUG extern int RADEON_DEBUG; @@ -259,14 +810,18 @@ #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 +#define DEBUG_TEXTURE 0x001 +#define DEBUG_STATE 0x002 +#define DEBUG_IOCTL 0x004 +#define DEBUG_PRIMS 0x008 +#define DEBUG_VERTS 0x010 +#define DEBUG_FALLBACKS 0x020 +#define DEBUG_VFMT 0x040 +#define DEBUG_CODEGEN 0x080 +#define DEBUG_VERBOSE 0x100 +#define DEBUG_DRI 0x200 +#define DEBUG_DMA 0x400 +#define DEBUG_SANITY 0x800 #endif #endif /* __RADEON_CONTEXT_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_dd.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_dd.c:1.6 xc/lib/GL/mesa/src/drv/radeon/radeon_dd.c:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_dd.c:1.6 Tue Apr 10 12:07:53 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_dd.c Thu Feb 27 12:26:32 2003 @@ -1,226 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_dd.h:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_dd.h:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_dd.h:1.1 Sun Jan 7 20:07:26 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_dd.h Thu Feb 27 12:26:32 2003 @@ -1,46 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_eltpath.c:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_eltpath.c:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_eltpath.c:1.2 Sun Apr 1 10:00:00 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_eltpath.c Thu Feb 27 12:26:32 2003 @@ -1,504 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_elttmp.h:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_elttmp.h:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_elttmp.h:1.1 Sun Jan 7 20:07:27 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_elttmp.h Thu Feb 27 12:26:32 2003 @@ -1,246 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_fastpath.c:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_fastpath.c:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_fastpath.c:1.1 Sun Jan 7 20:07:27 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_fastpath.c Thu Feb 27 12:26:32 2003 @@ -1,542 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_fasttmp.h:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_fasttmp.h:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_fasttmp.h:1.1 Sun Jan 7 20:07:27 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_fasttmp.h Thu Feb 27 12:26:32 2003 @@ -1,185 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c:1.4 xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c:1.11 --- xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c:1.4 Tue Apr 10 12:07:53 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c Wed Jan 29 17:04:59 2003 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c,v 1.4 2001/04/10 16:07:53 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c,v 1.11 2003/01/29 22:04:59 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -31,503 +31,817 @@ * Authors: * Kevin E. Martin * Gareth Hughes + * Keith Whitwell * */ #include "radeon_context.h" #include "radeon_state.h" #include "radeon_ioctl.h" +#include "radeon_tcl.h" +#include "radeon_sanity.h" +#include "radeon_macros.h" /* for INREG() */ + #include "mem.h" +#include "macros.h" +#include "swrast/swrast.h" +#include "simple_list.h" + +#define RADEON_TIMEOUT 512 +#define RADEON_IDLE_RETRY 16 + +#include /* for usleep() */ -#define RADEON_TIMEOUT 2048 -#define USE_IN_MEMORY_SCRATCH_REGS 0 +static void do_usleep( int nr, const char *caller ) +{ + if (0) fprintf(stderr, "usleep %d in %s\n", nr, caller ); + if (1) usleep( nr ); +} +static void radeonWaitForIdle( radeonContextPtr rmesa ); /* ============================================================= - * Hardware vertex buffer handling + * Kernel command buffer handling */ -/* Get a new VB from the pool of vertex buffers in AGP space. - */ -drmBufPtr radeonGetBufferLocked( radeonContextPtr rmesa ) +static void print_state_atom( struct radeon_state_atom *state ) { - int fd = rmesa->radeonScreen->driScreen->fd; - int index = 0; - int size = 0; - drmDMAReq dma; - drmBufPtr buf = NULL; - int to = 0; - int ret; + int i; - 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; + fprintf(stderr, "emit %s/%d\n", state->name, state->cmd_size); - while ( !buf && ( to++ < RADEON_TIMEOUT ) ) { - ret = drmDMA( fd, &dma ); + if (RADEON_DEBUG & DEBUG_VERBOSE) + for (i = 0 ; i < state->cmd_size ; i++) + fprintf(stderr, "\t%s[%d]: %x\n", state->name, i, state->cmd[i]); - 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; +} + +static void radeon_emit_state_list( radeonContextPtr rmesa, + struct radeon_state_atom *list ) +{ + struct radeon_state_atom *state, *tmp; + char *dest; + + /* From Felix Kuhling: similar to some other lockups, glaxium will + * lock with what we believe to be a normal command stream, but + * sprinkling some magic waits arounds allows it to run + * uninterrupted. This has a slight effect on q3 framerates, but + * it might now be possible to remove the zbs hack, below. + * + * Felix reports that this can be narrowed down to just + * tcl,tex0,tex1 state, but that's pretty much every statechange, + * so let's just put the wait in always (unless Felix wants to + * narrow it down further...) + */ + if (1) { + drmRadeonCmdHeader *cmd; + cmd = (drmRadeonCmdHeader *)radeonAllocCmdBuf( rmesa, sizeof(*cmd), + __FUNCTION__ ); + cmd->wait.cmd_type = RADEON_CMD_WAIT; + cmd->wait.flags = RADEON_WAIT_3D; + } + + foreach_s( state, tmp, list ) { + if (state->check( rmesa->glCtx )) { + dest = radeonAllocCmdBuf( rmesa, state->cmd_size * 4, __FUNCTION__); + memcpy( dest, state->cmd, state->cmd_size * 4); + move_to_head( &(rmesa->hw.clean), state ); + if (RADEON_DEBUG & DEBUG_STATE) + print_state_atom( state ); } + else if (RADEON_DEBUG & DEBUG_STATE) + fprintf(stderr, "skip state %s\n", state->name); } +} - if ( !buf ) { - drmRadeonEngineReset( fd ); - UNLOCK_HARDWARE( rmesa ); - fprintf( stderr, "Error: Could not get new VB... exiting\n" ); - exit( -1 ); + +void radeonEmitState( radeonContextPtr rmesa ) +{ + struct radeon_state_atom *state, *tmp; + + if (RADEON_DEBUG & (DEBUG_STATE|DEBUG_PRIMS)) + fprintf(stderr, "%s\n", __FUNCTION__); + + /* Somewhat overkill: + */ + if (rmesa->lost_context) { + if (RADEON_DEBUG & (DEBUG_STATE|DEBUG_PRIMS|DEBUG_IOCTL)) + fprintf(stderr, "%s - lost context\n", __FUNCTION__); + + foreach_s( state, tmp, &(rmesa->hw.clean) ) + move_to_tail(&(rmesa->hw.dirty), state ); + + rmesa->lost_context = 0; + } + else if (1) { + /* This is a darstardly kludge to work around a lockup that I + * haven't otherwise figured out. + */ + move_to_tail(&(rmesa->hw.dirty), &(rmesa->hw.zbs) ); + } + + if (!(rmesa->radeonScreen->chipset & RADEON_CHIPSET_TCL)) { + foreach_s( state, tmp, &(rmesa->hw.dirty) ) { + if (state->is_tcl) { + move_to_head( &(rmesa->hw.clean), state ); + } + } } - return buf; + radeon_emit_state_list( rmesa, &rmesa->hw.dirty ); } + + -static GLboolean intersect_rect( XF86DRIClipRectPtr out, - XF86DRIClipRectPtr a, - XF86DRIClipRectPtr b ) +/* Fire a section of the retained (indexed_verts) buffer as a regular + * primtive. + */ +extern void radeonEmitVbufPrim( radeonContextPtr rmesa, + GLuint vertex_format, + GLuint primitive, + GLuint vertex_nr ) { - *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; + drmRadeonCmdHeader *cmd; + + + assert(rmesa->dri.drmMinor >= 3); + assert(!(primitive & RADEON_CP_VC_CNTL_PRIM_WALK_IND)); + + radeonEmitState( rmesa ); + + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s cmd_used/4: %d\n", __FUNCTION__, + rmesa->store.cmd_used/4); + +#if RADEON_OLD_PACKETS + cmd = (drmRadeonCmdHeader *)radeonAllocCmdBuf( rmesa, 6 * sizeof(*cmd), + __FUNCTION__ ); + cmd[0].header.cmd_type = RADEON_CMD_PACKET3_CLIP; + cmd[1].i = RADEON_CP_PACKET3_3D_RNDR_GEN_INDX_PRIM | (3 << 16); + cmd[2].i = rmesa->ioctl.vertex_offset; + cmd[3].i = vertex_nr; + cmd[4].i = vertex_format; + cmd[5].i = (primitive | + RADEON_CP_VC_CNTL_PRIM_WALK_LIST | + RADEON_CP_VC_CNTL_COLOR_ORDER_RGBA | + RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE | + (vertex_nr << RADEON_CP_VC_CNTL_NUM_SHIFT)); + + if (RADEON_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "%s: header 0x%x offt 0x%x vfmt 0x%x vfcntl %x \n", + __FUNCTION__, + cmd[1].i, cmd[2].i, cmd[4].i, cmd[5].i); +#else + cmd = (drmRadeonCmdHeader *)radeonAllocCmdBuf( rmesa, 4 * sizeof(*cmd), + __FUNCTION__ ); + cmd[0].i = 0; + cmd[0].header.cmd_type = RADEON_CMD_PACKET3_CLIP; + cmd[1].i = RADEON_CP_PACKET3_3D_DRAW_VBUF | (1 << 16); + cmd[2].i = vertex_format; + cmd[3].i = (primitive | + RADEON_CP_VC_CNTL_PRIM_WALK_LIST | + RADEON_CP_VC_CNTL_COLOR_ORDER_RGBA | + RADEON_CP_VC_CNTL_MAOS_ENABLE | + RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE | + (vertex_nr << RADEON_CP_VC_CNTL_NUM_SHIFT)); + + + if (RADEON_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "%s: header 0x%x vfmt 0x%x vfcntl %x \n", + __FUNCTION__, + cmd[1].i, cmd[2].i, cmd[3].i); +#endif } -void radeonFlushVerticesLocked( radeonContextPtr rmesa ) + +void radeonFlushElts( 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; + int *cmd = (int *)(rmesa->store.cmd_buf + rmesa->store.elts_start); + int dwords; +#if RADEON_OLD_PACKETS + int nr = (rmesa->store.cmd_used - (rmesa->store.elts_start + 24)) / 2; +#else + int nr = (rmesa->store.cmd_used - (rmesa->store.elts_start + 16)) / 2; +#endif - rmesa->vert_buf = NULL; - rmesa->num_verts = 0; + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s\n", __FUNCTION__); - if ( !buffer ) - return; + assert( rmesa->dma.flush == radeonFlushElts ); + rmesa->dma.flush = 0; - if ( rmesa->dirty & ~RADEON_UPLOAD_CLIPRECTS ) - radeonEmitHwStateLocked( rmesa ); + /* Cope with odd number of elts: + */ + rmesa->store.cmd_used = (rmesa->store.cmd_used + 2) & ~2; + dwords = (rmesa->store.cmd_used - rmesa->store.elts_start) / 4; - if ( !nbox ) - count = 0; +#if RADEON_OLD_PACKETS + cmd[1] |= (dwords - 3) << 16; + cmd[5] |= nr << RADEON_CP_VC_CNTL_NUM_SHIFT; +#else + cmd[1] |= (dwords - 3) << 16; + cmd[3] |= nr << RADEON_CP_VC_CNTL_NUM_SHIFT; +#endif +} - 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; - } +GLushort *radeonAllocEltsOpenEnded( radeonContextPtr rmesa, + GLuint vertex_format, + GLuint primitive, + GLuint min_nr ) +{ + drmRadeonCmdHeader *cmd; + GLushort *retval; - 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]; - } - } + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s %d\n", __FUNCTION__, min_nr); - /* Finished with the buffer? - */ - if ( nr == nbox ) { - discard = 1; - } + assert(rmesa->dri.drmMinor >= 3); + assert((primitive & RADEON_CP_VC_CNTL_PRIM_WALK_IND)); + + radeonEmitState( rmesa ); + +#if RADEON_OLD_PACKETS + cmd = (drmRadeonCmdHeader *)radeonAllocCmdBuf( rmesa, + 24 + min_nr*2, + __FUNCTION__ ); + cmd[0].i = 0; + cmd[0].header.cmd_type = RADEON_CMD_PACKET3_CLIP; + cmd[1].i = RADEON_CP_PACKET3_3D_RNDR_GEN_INDX_PRIM; + cmd[2].i = rmesa->ioctl.vertex_offset; + cmd[3].i = 0xffff; + cmd[4].i = vertex_format; + cmd[5].i = (primitive | + RADEON_CP_VC_CNTL_PRIM_WALK_IND | + RADEON_CP_VC_CNTL_COLOR_ORDER_RGBA | + RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE); + + retval = (GLushort *)(cmd+6); +#else + cmd = (drmRadeonCmdHeader *)radeonAllocCmdBuf( rmesa, + 16 + min_nr*2, + __FUNCTION__ ); + cmd[0].i = 0; + cmd[0].header.cmd_type = RADEON_CMD_PACKET3_CLIP; + cmd[1].i = RADEON_CP_PACKET3_3D_DRAW_INDX; + cmd[2].i = vertex_format; + cmd[3].i = (primitive | + RADEON_CP_VC_CNTL_PRIM_WALK_IND | + RADEON_CP_VC_CNTL_COLOR_ORDER_RGBA | + RADEON_CP_VC_CNTL_MAOS_ENABLE | + RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE); - rmesa->sarea->dirty |= RADEON_UPLOAD_CLIPRECTS; - drmRadeonFlushVertexBuffer( fd, prim, buffer->idx, count, discard ); - } - } + retval = (GLushort *)(cmd+4); +#endif - rmesa->dirty &= ~RADEON_UPLOAD_CLIPRECTS; -} + if (RADEON_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "%s: header 0x%x vfmt 0x%x prim %x \n", + __FUNCTION__, + cmd[1].i, vertex_format, primitive); + assert(!rmesa->dma.flush); + rmesa->dma.flush = radeonFlushElts; + rmesa->store.elts_start = ((char *)cmd) - rmesa->store.cmd_buf; -/* ================================================================ - * Indexed vertex buffer handling - */ + return retval; +} + + -void radeonGetEltBufLocked( radeonContextPtr rmesa ) +void radeonEmitVertexAOS( radeonContextPtr rmesa, + GLuint vertex_size, + GLuint offset ) { - rmesa->elt_buf = radeonGetBufferLocked( rmesa ); +#if RADEON_OLD_PACKETS + rmesa->ioctl.vertex_size = vertex_size; + rmesa->ioctl.vertex_offset = offset; +#else + drmRadeonCmdHeader *cmd; + assert(rmesa->dri.drmMinor >= 3); + + if (RADEON_DEBUG & (DEBUG_PRIMS|DEBUG_IOCTL)) + fprintf(stderr, "%s: vertex_size 0x%x offset 0x%x \n", + __FUNCTION__, vertex_size, offset); + + cmd = (drmRadeonCmdHeader *)radeonAllocCmdBuf( rmesa, 5 * sizeof(int), + __FUNCTION__ ); + + cmd[0].i = 0; + cmd[0].header.cmd_type = RADEON_CMD_PACKET3; + cmd[1].i = RADEON_CP_PACKET3_3D_LOAD_VBPNTR | (2 << 16); + cmd[2].i = 1; + cmd[3].i = vertex_size | (vertex_size << 8); + cmd[4].i = offset; +#endif } + -void radeonFireEltsLocked( radeonContextPtr rmesa, - GLuint start, GLuint end, - GLuint discard ) +void radeonEmitAOS( radeonContextPtr rmesa, + struct radeon_dma_region **component, + GLuint nr, + GLuint offset ) { - XF86DRIClipRectPtr pbox = rmesa->pClipRects; - int nbox = rmesa->numClipRects; - drmBufPtr buffer = rmesa->elt_buf; - int prim = RADEON_TRIANGLES; - int fd = rmesa->driScreen->fd; +#if RADEON_OLD_PACKETS + assert( nr == 1 ); + assert( component[0]->aos_size == component[0]->aos_stride ); + rmesa->ioctl.vertex_size = component[0]->aos_size; + rmesa->ioctl.vertex_offset = + (component[0]->aos_start + offset * component[0]->aos_stride * 4); +#else + drmRadeonCmdHeader *cmd; + int sz = 3 + (nr/2 * 3) + (nr & 1) * 2; int i; + int *tmp; - if ( !buffer ) - return; + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s\n", __FUNCTION__); - if ( rmesa->dirty & ~RADEON_UPLOAD_CLIPRECTS ) - radeonEmitHwStateLocked( rmesa ); + assert(rmesa->dri.drmMinor >= 3); - if ( !nbox ) - end = start; + cmd = (drmRadeonCmdHeader *)radeonAllocCmdBuf( rmesa, sz * sizeof(int), + __FUNCTION__ ); + cmd[0].i = 0; + cmd[0].header.cmd_type = RADEON_CMD_PACKET3; + cmd[1].i = RADEON_CP_PACKET3_3D_LOAD_VBPNTR | ((sz-3) << 16); + cmd[2].i = nr; + tmp = &cmd[0].i; + cmd += 3; + + for (i = 0 ; i < nr ; i++) { + if (i & 1) { + cmd[0].i |= ((component[i]->aos_stride << 24) | + (component[i]->aos_size << 16)); + cmd[2].i = (component[i]->aos_start + + offset * component[i]->aos_stride * 4); + cmd += 3; + } + else { + cmd[0].i = ((component[i]->aos_stride << 8) | + (component[i]->aos_size << 0)); + cmd[1].i = (component[i]->aos_start + + offset * component[i]->aos_stride * 4); + } + } - if ( nbox >= RADEON_NR_SAREA_CLIPRECTS ) - rmesa->dirty |= RADEON_UPLOAD_CLIPRECTS; + if (RADEON_DEBUG & DEBUG_VERTS) { + fprintf(stderr, "%s:\n", __FUNCTION__); + for (i = 0 ; i < sz ; i++) + fprintf(stderr, " %d: %x\n", i, tmp[i]); + } +#endif +} - 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 ); +static int radeonFlushCmdBufLocked( radeonContextPtr rmesa, + const char * caller ) +{ + int ret, i; + drmRadeonCmdBuffer cmd; + + if (RADEON_DEBUG & DEBUG_IOCTL) { + fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); + + if (RADEON_DEBUG & DEBUG_VERBOSE) + for (i = 0 ; i < rmesa->store.cmd_used ; i += 4 ) + fprintf(stderr, "%d: %x\n", i/4, + *(int *)(&rmesa->store.cmd_buf[i])); } - 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; - } + if (RADEON_DEBUG & DEBUG_DMA) + fprintf(stderr, "%s: Releasing %d buffers\n", __FUNCTION__, + rmesa->dma.nr_released_bufs); - rmesa->sarea->dirty |= RADEON_UPLOAD_CLIPRECTS; - drmRadeonFlushIndices( fd, prim, buffer->idx, start, end, d ); - } + + if (RADEON_DEBUG & DEBUG_SANITY) { + if (rmesa->state.scissor.enabled) + ret = radeonSanityCmdBuffer( rmesa, + rmesa->state.scissor.numClipRects, + rmesa->state.scissor.pClipRects); + else + ret = radeonSanityCmdBuffer( rmesa, + rmesa->numClipRects, + rmesa->pClipRects); } + + cmd.bufsz = rmesa->store.cmd_used; + cmd.buf = rmesa->store.cmd_buf; - rmesa->dirty &= ~RADEON_UPLOAD_CLIPRECTS; + if (rmesa->state.scissor.enabled) { + cmd.nbox = rmesa->state.scissor.numClipRects; + cmd.boxes = (drmClipRect *)rmesa->state.scissor.pClipRects; + } else { + cmd.nbox = rmesa->numClipRects; + cmd.boxes = (drmClipRect *)rmesa->pClipRects; + } + + ret = drmCommandWrite( rmesa->dri.fd, + DRM_RADEON_CMDBUF, + &cmd, sizeof(cmd) ); + + rmesa->store.primnr = 0; + rmesa->store.statenr = 0; + rmesa->store.cmd_used = 0; + rmesa->dma.nr_released_bufs = 0; + rmesa->lost_context = 1; + return ret; } + -void radeonFlushEltsLocked( radeonContextPtr rmesa ) +/* Note: does not emit any commands to avoid recursion on + * radeonAllocCmdBuf. + */ +void radeonFlushCmdBuf( radeonContextPtr rmesa, const char *caller ) { - 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 ); + int ret; + + + assert (rmesa->dri.drmMinor >= 3); + + LOCK_HARDWARE( rmesa ); - ALIGN_NEXT_ELT( rmesa ); - rmesa->first_elt = rmesa->next_elt; + ret = radeonFlushCmdBufLocked( rmesa, caller ); + + UNLOCK_HARDWARE( rmesa ); + + if (ret) { + fprintf(stderr, "drmRadeonCmdBuffer: %d\n", ret); + exit(ret); } } + -void radeonReleaseBufLocked( radeonContextPtr rmesa, drmBufPtr buffer ) +/* ============================================================= + * Hardware vertex buffer handling + */ + + +void radeonRefillCurrentDmaRegion( radeonContextPtr rmesa ) { - int fd = rmesa->driScreen->fd; + struct radeon_dma_buffer *dmabuf; + int fd = rmesa->dri.fd; + int index = 0; + int size = 0; + drmDMAReq dma; + int ret; - if ( !buffer ) - return; + if (RADEON_DEBUG & (DEBUG_IOCTL|DEBUG_DMA)) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->dma.flush) { + rmesa->dma.flush( rmesa ); + } + + if (rmesa->dma.current.buf) + radeonReleaseDmaRegion( rmesa, &rmesa->dma.current, __FUNCTION__ ); + + if (rmesa->dma.nr_released_bufs > 4) + radeonFlushCmdBuf( rmesa, __FUNCTION__ ); + + dma.context = rmesa->dri.hwContext; + 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; + + LOCK_HARDWARE(rmesa); /* no need to validate */ + + ret = drmDMA( fd, &dma ); + + if (ret != 0) { + /* Free some up this way? + */ + if (rmesa->dma.nr_released_bufs) { + radeonFlushCmdBufLocked( rmesa, __FUNCTION__ ); + } + + if (RADEON_DEBUG & DEBUG_DMA) + fprintf(stderr, "Waiting for buffers\n"); + + radeonWaitForIdleLocked( rmesa ); + ret = drmDMA( fd, &dma ); + + if ( ret != 0 ) { + UNLOCK_HARDWARE( rmesa ); + fprintf( stderr, "Error: Could not get dma buffer... exiting\n" ); + exit( -1 ); + } + } + + UNLOCK_HARDWARE(rmesa); + + if (RADEON_DEBUG & DEBUG_DMA) + fprintf(stderr, "Allocated buffer %d\n", index); - drmRadeonFlushVertexBuffer( fd, RADEON_TRIANGLES, buffer->idx, 0, 1 ); + dmabuf = CALLOC_STRUCT( radeon_dma_buffer ); + dmabuf->buf = &rmesa->radeonScreen->buffers->list[index]; + dmabuf->refcount = 1; + + rmesa->dma.current.buf = dmabuf; + rmesa->dma.current.address = dmabuf->buf->address; + rmesa->dma.current.end = dmabuf->buf->total; + rmesa->dma.current.start = 0; + rmesa->dma.current.ptr = 0; + + rmesa->c_vertexBuffers++; } +void radeonReleaseDmaRegion( radeonContextPtr rmesa, + struct radeon_dma_region *region, + const char *caller ) +{ + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); + + if (!region->buf) + return; + + if (rmesa->dma.flush) + rmesa->dma.flush( rmesa ); + + if (--region->buf->refcount == 0) { + drmRadeonCmdHeader *cmd; -/* Allocate some space in the current vertex buffer. If the current - * buffer is full, flush it and grab another one. + if (RADEON_DEBUG & (DEBUG_IOCTL|DEBUG_DMA)) + fprintf(stderr, "%s -- DISCARD BUF %d\n", __FUNCTION__, + region->buf->buf->idx); + + cmd = (drmRadeonCmdHeader *)radeonAllocCmdBuf( rmesa, sizeof(*cmd), + __FUNCTION__ ); + cmd->dma.cmd_type = RADEON_CMD_DMA_DISCARD; + cmd->dma.buf_idx = region->buf->buf->idx; + FREE(region->buf); + rmesa->dma.nr_released_bufs++; + } + + region->buf = 0; + region->start = 0; +} + +/* Allocates a region from rmesa->dma.current. If there isn't enough + * space in current, grab a new buffer (and discard what was left of current) */ -CARD32 *radeonAllocVertices( radeonContextPtr rmesa, GLuint count ) +void radeonAllocDmaRegion( radeonContextPtr rmesa, + struct radeon_dma_region *region, + int bytes, + int alignment ) { - return radeonAllocVerticesInline( rmesa, count ); + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s %d\n", __FUNCTION__, bytes); + + if (rmesa->dma.flush) + rmesa->dma.flush( rmesa ); + + if (region->buf) + radeonReleaseDmaRegion( rmesa, region, __FUNCTION__ ); + + alignment--; + rmesa->dma.current.start = rmesa->dma.current.ptr = + (rmesa->dma.current.ptr + alignment) & ~alignment; + + if ( rmesa->dma.current.ptr + bytes > rmesa->dma.current.end ) + radeonRefillCurrentDmaRegion( rmesa ); + + region->start = rmesa->dma.current.start; + region->ptr = rmesa->dma.current.start; + region->end = rmesa->dma.current.start + bytes; + region->address = rmesa->dma.current.address; + region->buf = rmesa->dma.current.buf; + region->buf->refcount++; + + rmesa->dma.current.ptr += bytes; /* bug - if alignment > 7 */ + rmesa->dma.current.start = + rmesa->dma.current.ptr = (rmesa->dma.current.ptr + 0x7) & ~0x7; + + if ( rmesa->dri.drmMinor < 3 ) + radeonRefillCurrentDmaRegion( rmesa ); } +void radeonAllocDmaRegionVerts( radeonContextPtr rmesa, + struct radeon_dma_region *region, + int numverts, + int vertsize, + int alignment ) +{ + radeonAllocDmaRegion( rmesa, region, vertsize * numverts, alignment ); +} /* ================================================================ - * Texture uploads + * SwapBuffers with client-side throttling */ -void radeonFireBlitLocked( radeonContextPtr rmesa, drmBufPtr buffer, - GLint offset, GLint pitch, GLint format, - GLint x, GLint y, GLint width, GLint height ) +static CARD32 radeonGetLastFrame (radeonContextPtr rmesa) { -#if 0 - GLint ret; + unsigned char *RADEONMMIO = rmesa->radeonScreen->mmio.map; + int ret; + CARD32 frame; + + if (rmesa->dri.screen->drmMinor >= 4) { + drmRadeonGetParam gp; - ret = drmRadeonTextureBlit( rmesa->driFd, buffer->idx, - offset, pitch, format, - x, y, width, height ); + gp.param = RADEON_PARAM_LAST_FRAME; + gp.value = (int *)&frame; + ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_GETPARAM, + &gp, sizeof(gp) ); + } + else + ret = -EINVAL; +#ifndef __alpha__ + if ( ret == -EINVAL ) { + frame = INREG( RADEON_LAST_FRAME_REG ); + ret = 0; + } +#endif if ( ret ) { - UNLOCK_HARDWARE( rmesa ); - fprintf( stderr, "drmRadeonTextureBlit: return = %d\n", ret ); - exit( 1 ); + fprintf( stderr, "%s: drmRadeonGetParam: %d\n", __FUNCTION__, ret ); + exit(1); } -#endif + + return frame; } +static void radeonEmitIrqLocked( radeonContextPtr rmesa ) +{ + drmRadeonIrqEmit ie; + int ret; -/* ================================================================ - * SwapBuffers with client-side throttling - */ + ie.irq_seq = &rmesa->iw.irq_seq; + ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_IRQ_EMIT, + &ie, sizeof(ie) ); + if ( ret ) { + fprintf( stderr, "%s: drmRadeonIrqEmit: %d\n", __FUNCTION__, ret ); + exit(1); + } +} -#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 ) +static void radeonWaitIrq( radeonContextPtr rmesa ) { - RADEONSAREAPrivPtr sarea = rmesa->sarea; - __volatile__ CARD32 *scratch = rmesa->radeonScreen->scratch; - CARD32 frame; - int wait = 0; + int ret; - 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++; - } + do { + ret = drmCommandWrite( rmesa->dri.fd, DRM_RADEON_IRQ_WAIT, + &rmesa->iw, sizeof(rmesa->iw) ); + } while (ret && (errno == EINTR || errno == EAGAIN)); - return wait; -} -#else -static void delay( void ) { -/* Prevent an optimizing compiler from removing a spin loop */ + if ( ret ) { + fprintf( stderr, "%s: drmRadeonIrqWait: %d\n", __FUNCTION__, ret ); + exit(1); + } } + -static int radeonWaitForFrameCompletion( radeonContextPtr rmesa ) +static void 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; + if (rmesa->do_irqs) { + if (radeonGetLastFrame(rmesa) < sarea->last_frame) { + if (!rmesa->irqsEmitted) { + while (radeonGetLastFrame (rmesa) < sarea->last_frame) + ; + } + else { + UNLOCK_HARDWARE( rmesa ); + radeonWaitIrq( rmesa ); + LOCK_HARDWARE( rmesa ); + } + rmesa->irqsEmitted = 10; } - wait++; - /* Spin in place a bit so we aren't hammering the bus */ - for ( i = 0 ; i < 1024 ; i++ ) { - delay(); + + if (rmesa->irqsEmitted) { + radeonEmitIrqLocked( rmesa ); + rmesa->irqsEmitted--; } + } + else { + while (radeonGetLastFrame (rmesa) < sarea->last_frame) { + UNLOCK_HARDWARE( rmesa ); + if (rmesa->do_usleeps) + do_usleep(1, __FUNCTION__); + LOCK_HARDWARE( rmesa ); + } } - - return wait; } -#endif /* Copy the back color buffer to the front color buffer. */ -void radeonSwapBuffers( radeonContextPtr rmesa ) +void radeonCopyBuffer( const __DRIdrawablePrivate *dPriv ) { - GLint nbox; - GLint i; - GLint ret; + radeonContextPtr rmesa; + GLint nbox, i, ret; - if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); + + rmesa = (radeonContextPtr) dPriv->driContextPriv->driverPrivate; + + if ( RADEON_DEBUG & DEBUG_IOCTL ) { fprintf( stderr, "\n%s( %p )\n\n", __FUNCTION__, rmesa->glCtx ); } - FLUSH_BATCH( rmesa ); + RADEON_FIREVERTICES( 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; - } + radeonWaitForFrameCompletion( rmesa ); + radeonWaitForVBlank( rmesa ); + + nbox = rmesa->dri.drawable->numClipRects; /* must be in locked region */ for ( i = 0 ; i < nbox ; ) { GLint nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS , nbox ); - XF86DRIClipRectPtr box = rmesa->pClipRects; + XF86DRIClipRectPtr box = rmesa->dri.drawable->pClipRects; XF86DRIClipRectPtr b = rmesa->sarea->boxes; GLint n = 0; for ( ; i < nr ; i++ ) { - *b++ = *(XF86DRIClipRectPtr)&box[i]; + *b++ = box[i]; n++; } rmesa->sarea->nbox = n; - ret = drmRadeonSwapBuffers( rmesa->driFd ); + ret = drmCommandNone( rmesa->dri.fd, DRM_RADEON_SWAP ); if ( ret ) { - fprintf( stderr, "drmRadeonSwapBuffers: return = %d\n", ret ); + fprintf( stderr, "DRM_RADEON_SWAP_BUFFERS: 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 ) +void radeonPageFlip( const __DRIdrawablePrivate *dPriv ) { + radeonContextPtr rmesa; GLint ret; + + assert(dPriv); + assert(dPriv->driContextPriv); + assert(dPriv->driContextPriv->driverPrivate); + + rmesa = (radeonContextPtr) dPriv->driContextPriv->driverPrivate; - if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "\n%s( %p ): page=%d\n\n", - __FUNCTION__, rmesa->glCtx, rmesa->currentPage ); + if ( RADEON_DEBUG & DEBUG_IOCTL ) { + fprintf(stderr, "%s %d\n", __FUNCTION__, + rmesa->sarea->pfCurrentPage ); } - FLUSH_BATCH( rmesa ); + RADEON_FIREVERTICES( rmesa ); LOCK_HARDWARE( rmesa ); - /* Throttle the frame rate -- only allow one pending swap buffers - * request at a time. + /* Need to do this for the perf box placement: */ - if ( !radeonWaitForFrameCompletion( rmesa ) ) { - rmesa->hardwareWentIdle = 1; - } else { - rmesa->hardwareWentIdle = 0; + if (rmesa->dri.drawable->numClipRects) + { + XF86DRIClipRectPtr box = rmesa->dri.drawable->pClipRects; + XF86DRIClipRectPtr b = rmesa->sarea->boxes; + b[0] = box[0]; + rmesa->sarea->nbox = 1; } - /* The kernel will have been initialized to perform page flipping - * on a swapbuffers ioctl. + + /* Throttle the frame rate -- only allow one pending swap buffers + * request at a time. */ - ret = drmRadeonSwapBuffers( rmesa->driFd ); + radeonWaitForFrameCompletion( rmesa ); + radeonWaitForVBlank( rmesa ); + ret = drmCommandNone( rmesa->dri.fd, DRM_RADEON_FLIP ); + UNLOCK_HARDWARE( rmesa ); if ( ret ) { - fprintf( stderr, "drmRadeonSwapBuffers: return = %d\n", ret ); + fprintf( stderr, "DRM_RADEON_FLIP: return = %d\n", ret ); exit( 1 ); } - if ( rmesa->currentPage == 0 ) { - rmesa->drawOffset = rmesa->radeonScreen->frontOffset; - rmesa->drawPitch = rmesa->radeonScreen->frontPitch; - rmesa->currentPage = 1; + if ( rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.color.drawOffset = rmesa->radeonScreen->frontOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->frontPitch; } else { - rmesa->drawOffset = rmesa->radeonScreen->backOffset; - rmesa->drawPitch = rmesa->radeonScreen->backPitch; - rmesa->currentPage = 0; + rmesa->state.color.drawOffset = rmesa->radeonScreen->backOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->backPitch; } - - 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 + RADEON_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = rmesa->state.color.drawOffset; + rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = rmesa->state.color.drawPitch; } @@ -536,69 +850,59 @@ */ #define RADEON_MAX_CLEARS 256 -static GLbitfield radeonDDClear( GLcontext *ctx, GLbitfield mask, - GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ) +static void radeonClear( GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; 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 ) { + if ( RADEON_DEBUG & DEBUG_IOCTL ) { fprintf( stderr, "%s: all=%d cx=%d cy=%d cw=%d ch=%d\n", __FUNCTION__, all, cx, cy, cw, ch ); } - FLUSH_BATCH( rmesa ); + radeonEmitState( rmesa ); - /* Update and emit any new state. We need to do this here to catch - * changes to the masks. - * FIXME: Just update the masks? + /* Need to cope with lostcontext here as kernel relies on + * some residual state: */ - if ( rmesa->new_state ) - radeonDDUpdateHWState( ctx ); + RADEON_FIREVERTICES( rmesa ); if ( mask & DD_FRONT_LEFT_BIT ) { - flags |= DRM_RADEON_FRONT; - color_mask = rmesa->setup.rb3d_planemask; + flags |= RADEON_FRONT; + color_mask = rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK]; mask &= ~DD_FRONT_LEFT_BIT; } if ( mask & DD_BACK_LEFT_BIT ) { - flags |= DRM_RADEON_BACK; - color_mask = rmesa->setup.rb3d_planemask; + flags |= RADEON_BACK; + color_mask = rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK]; mask &= ~DD_BACK_LEFT_BIT; } if ( mask & DD_DEPTH_BIT ) { - if ( ctx->Depth.Mask ) { - flags |= DRM_RADEON_DEPTH; - depth_mask |= rmesa->DepthMask; - } + if ( ctx->Depth.Mask ) flags |= RADEON_DEPTH; /* FIXME: ??? */ mask &= ~DD_DEPTH_BIT; } -#if 0 - /* FIXME: Add stencil support */ - if ( mask & DD_STENCIL_BIT ) { - flags |= DRM_RADEON_DEPTH; - depth_mask |= rmesa->StencilMask; + + if ( (mask & DD_STENCIL_BIT) && rmesa->state.stencil.hwBuffer ) { + flags |= RADEON_STENCIL; mask &= ~DD_STENCIL_BIT; } -#endif - if ( !flags ) - return mask; + if ( mask ) + _swrast_Clear( ctx, mask, all, cx, cy, cw, ch ); + if ( !flags ) + return; + + /* Flip top to bottom */ cx += dPriv->x; cy = dPriv->y + dPriv->h - cy - ch; @@ -607,37 +911,51 @@ /* 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; + int ret; + + if (rmesa->dri.screen->drmMinor >= 4) { + drmRadeonGetParam gp; + + gp.param = RADEON_PARAM_LAST_CLEAR; + gp.value = (int *)&clear; + ret = drmCommandWriteRead( rmesa->dri.fd, + DRM_RADEON_GETPARAM, &gp, sizeof(gp) ); + } else + ret = -EINVAL; + +#ifndef __alpha__ + if ( ret == -EINVAL ) { + clear = INREG( RADEON_LAST_CLEAR_REG ); + ret = 0; } - } -#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 ( ret ) { + fprintf( stderr, "%s: drmRadeonGetParam: %d\n", __FUNCTION__, ret ); + exit(1); + } + if ( RADEON_DEBUG & DEBUG_IOCTL ) { + fprintf( stderr, "%s( %d )\n", __FUNCTION__, (int)clear ); + if ( ret ) fprintf( stderr, " ( RADEON_LAST_CLEAR register read directly )\n" ); + } + 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(); + + if ( rmesa->do_usleeps ) { + UNLOCK_HARDWARE( rmesa ); + do_usleep(1, __FUNCTION__); + LOCK_HARDWARE( rmesa ); } } -#endif - for ( i = 0 ; i < rmesa->numClipRects ; ) { - GLint nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS, rmesa->numClipRects ); - XF86DRIClipRectPtr box = rmesa->pClipRects; + for ( i = 0 ; i < dPriv->numClipRects ; ) { + GLint nr = MIN2( i + RADEON_NR_SAREA_CLIPRECTS, dPriv->numClipRects ); + XF86DRIClipRectPtr box = dPriv->pClipRects; XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drmRadeonClearType clear; + drmRadeonClearRect depth_boxes[RADEON_NR_SAREA_CLIPRECTS]; GLint n = 0; if ( !all ) { @@ -663,62 +981,160 @@ } } else { for ( ; i < nr ; i++ ) { - *b++ = *(XF86DRIClipRectPtr)&box[i]; + *b++ = 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 ); + clear.flags = flags; + clear.clear_color = rmesa->state.color.clear; + clear.clear_depth = rmesa->state.depth.clear; + clear.color_mask = rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK]; + clear.depth_mask = rmesa->state.stencil.clear; + clear.depth_boxes = depth_boxes; + + n--; + b = rmesa->sarea->boxes; + for ( ; n >= 0 ; n-- ) { + depth_boxes[n].f[RADEON_CLEAR_X1] = (float)b[n].x1; + depth_boxes[n].f[RADEON_CLEAR_Y1] = (float)b[n].y1; + depth_boxes[n].f[RADEON_CLEAR_X2] = (float)b[n].x2; + depth_boxes[n].f[RADEON_CLEAR_Y2] = (float)b[n].y2; + depth_boxes[n].f[RADEON_CLEAR_DEPTH] = + (float)rmesa->state.depth.clear; } - ret = drmRadeonClear( rmesa->driFd, flags, - rmesa->ClearColor, rmesa->ClearDepth, - color_mask, depth_mask, - rmesa->sarea->boxes, rmesa->sarea->nbox ); + ret = drmCommandWrite( rmesa->dri.fd, DRM_RADEON_CLEAR, + &clear, sizeof(drmRadeonClearType)); if ( ret ) { UNLOCK_HARDWARE( rmesa ); - fprintf( stderr, "drmRadeonClear: return = %d\n", ret ); + fprintf( stderr, "DRM_RADEON_CLEAR: 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 fd = rmesa->dri.fd; int to = 0; - int ret; + int ret, i = 0; + + rmesa->c_drawWaits++; do { - ret = drmRadeonWaitForIdleCP( fd ); + do { + ret = drmCommandNone( fd, DRM_RADEON_CP_IDLE); + } while ( ret && errno == EBUSY && i++ < RADEON_IDLE_RETRY ); + if (ret && ret != -EBUSY) { + /* + * JO - I'm reluctant to print this message while holding the lock + * + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "%s: CP idle %d\n", __FUNCTION__, ret); + */ + } } while ( ( ret == -EBUSY ) && ( to++ < RADEON_TIMEOUT ) ); if ( ret < 0 ) { - drmRadeonEngineReset( fd ); UNLOCK_HARDWARE( rmesa ); fprintf( stderr, "Error: Radeon timed out... exiting\n" ); exit( -1 ); } } + +static void radeonWaitForIdle( radeonContextPtr rmesa ) +{ + LOCK_HARDWARE(rmesa); + radeonWaitForIdleLocked( rmesa ); + UNLOCK_HARDWARE(rmesa); +} + + +void radeonWaitForVBlank( radeonContextPtr rmesa ) +{ + drmVBlank vbl; + int ret; + + if ( !rmesa->radeonScreen->irq ) + return; + + if ( getenv("LIBGL_SYNC_REFRESH") ) { + /* Wait for at least one vertical blank since the last call */ + vbl.request.type = DRM_VBLANK_RELATIVE; + vbl.request.sequence = 1; + } else if ( getenv("LIBGL_THROTTLE_REFRESH") ) { + /* Wait for at least one vertical blank since the last call */ + vbl.request.type = DRM_VBLANK_ABSOLUTE; + vbl.request.sequence = rmesa->vbl_seq + 1; + } else { + return; + } + + UNLOCK_HARDWARE( rmesa ); + + if ((ret = drmWaitVBlank( rmesa->dri.fd, &vbl ))) { + fprintf(stderr, "%s: drmWaitVBlank returned %d, IRQs don't seem to be" + " working correctly.\nTry running with LIBGL_THROTTLE_REFRESH" + " and LIBL_SYNC_REFRESH unset.\n", __FUNCTION__, ret); + exit(1); + } else if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s: drmWaitVBlank returned %d\n", __FUNCTION__, ret); + + rmesa->vbl_seq = vbl.reply.sequence; + + LOCK_HARDWARE( rmesa ); +} + +void radeonFlush( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->dma.flush) + rmesa->dma.flush( rmesa ); + + if (rmesa->dri.drmMinor >= 3) { + if (!is_empty_list(&rmesa->hw.dirty)) + radeonEmitState( rmesa ); + + if (rmesa->store.cmd_used) + radeonFlushCmdBuf( rmesa, __FUNCTION__ ); + } +} + +/* Make sure all commands have been sent to the hardware and have + * completed processing. + */ +void radeonFinish( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + radeonFlush( ctx ); + + if (rmesa->do_irqs) { + LOCK_HARDWARE( rmesa ); + radeonEmitIrqLocked( rmesa ); + UNLOCK_HARDWARE( rmesa ); + radeonWaitIrq( rmesa ); + } + else + radeonWaitForIdle( rmesa ); +} + -void radeonDDInitIoctlFuncs( GLcontext *ctx ) +void radeonInitIoctlFuncs( GLcontext *ctx ) { - ctx->Driver.Clear = radeonDDClear; + ctx->Driver.Clear = radeonClear; + ctx->Driver.Finish = radeonFinish; + ctx->Driver.Flush = radeonFlush; } + Index: xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h:1.6 --- xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h:1.2 Sun Apr 1 10:00:00 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h Mon Dec 16 11:18:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h,v 1.2 2001/04/01 14:00:00 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.h,v 1.6 2002/12/16 16:18:58 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -39,123 +39,140 @@ #ifdef GLX_DIRECT_RENDERING -#include "radeon_dri.h" +#include "simple_list.h" #include "radeon_lock.h" -#include "xf86drm.h" -#include "xf86drmRadeon.h" -#define RADEON_BUFFER_MAX_DWORDS (RADEON_BUFFER_SIZE / sizeof(CARD32)) +extern void radeonEmitState( radeonContextPtr rmesa ); +extern void radeonEmitVertexAOS( radeonContextPtr rmesa, + GLuint vertex_size, + GLuint offset ); + +extern void radeonEmitVbufPrim( radeonContextPtr rmesa, + GLuint vertex_format, + GLuint primitive, + GLuint vertex_nr ); + +extern void radeonFlushElts( radeonContextPtr rmesa ); + +extern GLushort *radeonAllocEltsOpenEnded( radeonContextPtr rmesa, + GLuint vertex_format, + GLuint primitive, + GLuint min_nr ); + +extern void radeonEmitAOS( radeonContextPtr rmesa, + struct radeon_dma_region **regions, + GLuint n, + GLuint offset ); -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 ); +extern void radeonFlushCmdBuf( radeonContextPtr rmesa, const char * ); +extern void radeonRefillCurrentDmaRegion( radeonContextPtr rmesa ); + +extern void radeonAllocDmaRegion( radeonContextPtr rmesa, + struct radeon_dma_region *region, + int bytes, + int alignment ); + +extern void radeonAllocDmaRegionVerts( radeonContextPtr rmesa, + struct radeon_dma_region *region, + int numverts, + int vertsize, + int alignment ); + +extern void radeonReleaseDmaRegion( radeonContextPtr rmesa, + struct radeon_dma_region *region, + const char *caller ); + +extern void radeonCopyBuffer( const __DRIdrawablePrivate *drawable ); +extern void radeonPageFlip( const __DRIdrawablePrivate *drawable ); +extern void radeonFlush( GLcontext *ctx ); +extern void radeonFinish( GLcontext *ctx ); +extern void radeonWaitForIdleLocked( radeonContextPtr rmesa ); +extern void radeonWaitForVBlank( radeonContextPtr rmesa ); +extern void radeonInitIoctlFuncs( GLcontext *ctx ); +extern void radeonGetAllParams( radeonContextPtr rmesa ); -/* Make this available as both a regular and an inline function. +/* radeon_compat.c: */ -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 ); +extern void radeonCompatEmitPrimitive( radeonContextPtr rmesa, + GLuint vertex_format, + GLuint hw_primitive, + GLuint nrverts ); - if ( rmesa->first_elt != rmesa->next_elt ) { - radeonFlushEltsLocked( rmesa ); - } - rmesa->vert_buf = radeonGetBufferLocked( rmesa ); +/* ================================================================ + * Helper macros: + */ - UNLOCK_HARDWARE( rmesa ); - } else if ( rmesa->vert_buf->used + bytes > rmesa->vert_buf->total ) { - LOCK_HARDWARE( rmesa ); +/* Close off the last primitive, if it exists. + */ +#define RADEON_NEWPRIM( rmesa ) \ +do { \ + if ( rmesa->dma.flush ) \ + rmesa->dma.flush( rmesa ); \ +} while (0) - radeonFlushVerticesLocked( rmesa ); - rmesa->vert_buf = radeonGetBufferLocked( rmesa ); +/* Can accomodate several state changes and primitive changes without + * actually firing the buffer. + */ +#define RADEON_STATECHANGE( rmesa, ATOM ) \ +do { \ + RADEON_NEWPRIM( rmesa ); \ + move_to_head( &(rmesa->hw.dirty), &(rmesa->hw.ATOM)); \ +} while (0) - UNLOCK_HARDWARE( rmesa ); +#define RADEON_DB_STATE( ATOM ) \ + memcpy( rmesa->hw.ATOM.lastcmd, rmesa->hw.ATOM.cmd, \ + rmesa->hw.ATOM.cmd_size * 4) + +static __inline int RADEON_DB_STATECHANGE( + radeonContextPtr rmesa, + struct radeon_state_atom *atom ) +{ + if (memcmp(atom->cmd, atom->lastcmd, atom->cmd_size*4)) { + int *tmp; + RADEON_NEWPRIM( rmesa ); + move_to_head( &(rmesa->hw.dirty), atom ); + tmp = atom->cmd; + atom->cmd = atom->lastcmd; + atom->lastcmd = tmp; + return 1; } - - head = (CARD32 *)((char *)rmesa->vert_buf->address + - rmesa->vert_buf->used); - - rmesa->vert_buf->used += bytes; - rmesa->num_verts += count; - return head; + else + return 0; } -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: +/* Fire the buffered vertices no matter what. */ - -#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 ); \ - } \ +#define RADEON_FIREVERTICES( rmesa ) \ +do { \ + if ( rmesa->store.cmd_used || rmesa->dma.flush ) { \ + radeonFlush( rmesa->glCtx ); \ + } \ } while (0) -/* 64-bit align the next element address, and then make room for the - * next indexed prim packet header. +/* Alloc space in the command buffer */ -#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) +static __inline char *radeonAllocCmdBuf( radeonContextPtr rmesa, + int bytes, const char *where ) +{ + if (rmesa->store.cmd_used + bytes > RADEON_CMD_BUF_SZ) + radeonFlushCmdBuf( rmesa, __FUNCTION__ ); + + assert(rmesa->dri.drmMinor >= 3); + + { + char *head = rmesa->store.cmd_buf + rmesa->store.cmd_used; + rmesa->store.cmd_used += bytes; + return head; + } +} -#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 xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c:1.3 xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c:1.5 --- xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c:1.3 Tue Apr 10 12:07:53 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c Wed Oct 30 07:51:55 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c,v 1.3 2001/04/10 16:07:53 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_lock.c,v 1.5 2002/10/30 12:51:55 alanh Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -37,13 +37,49 @@ #include "radeon_context.h" #include "radeon_lock.h" #include "radeon_tex.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" #if DEBUG_LOCKING char *prevLockFile = NULL; int prevLockLine = 0; #endif +/* Turn on/off page flipping according to the flags in the sarea: + */ +static void +radeonUpdatePageFlipping( radeonContextPtr rmesa ) +{ + int use_back; + + if (rmesa->dri.drmMinor < 3) + return; + + rmesa->doPageFlip = rmesa->sarea->pfAllowPageFlip; + + use_back = (rmesa->glCtx->Color.DriverDrawBuffer == GL_BACK_LEFT); + use_back ^= (rmesa->sarea->pfCurrentPage == 1); + + if ( RADEON_DEBUG & DEBUG_VERBOSE ) + fprintf(stderr, "%s allow %d current %d\n", __FUNCTION__, + rmesa->doPageFlip, + rmesa->sarea->pfCurrentPage ); + + if ( use_back ) { + rmesa->state.color.drawOffset = rmesa->radeonScreen->backOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->backPitch; + } else { + rmesa->state.color.drawOffset = rmesa->radeonScreen->frontOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->frontPitch; + } + RADEON_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = rmesa->state.color.drawOffset; + rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = rmesa->state.color.drawPitch; +} + + + /* 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 @@ -54,12 +90,12 @@ */ void radeonGetLock( radeonContextPtr rmesa, GLuint flags ) { - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; - __DRIscreenPrivate *sPriv = rmesa->driScreen; + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + __DRIscreenPrivate *sPriv = rmesa->dri.screen; RADEONSAREAPrivPtr sarea = rmesa->sarea; int i; - drmGetLock( rmesa->driFd, rmesa->hHWContext, flags ); + drmGetLock( rmesa->dri.fd, rmesa->dri.hwContext, flags ); /* The window might have moved, so we might need to get new clip * rects. @@ -69,27 +105,22 @@ * 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 ); + DRI_VALIDATE_DRAWABLE_INFO( rmesa->dri.display, sPriv, dPriv ); - if ( rmesa->lastStamp != *(dPriv->pStamp) ) { - rmesa->lastStamp = *(dPriv->pStamp); - rmesa->new_state |= RADEON_NEW_WINDOW | RADEON_NEW_CLIP; - rmesa->SetupDone = 0; + if ( rmesa->lastStamp != dPriv->lastStamp ) { + radeonUpdatePageFlipping( rmesa ); + radeonSetCliprects( rmesa, rmesa->glCtx->Color.DriverDrawBuffer ); + radeonUpdateViewportOffset( rmesa->glCtx ); + rmesa->lastStamp = dPriv->lastStamp; } - 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; - } + if ( sarea->ctxOwner != rmesa->dri.hwContext ) { + sarea->ctxOwner = rmesa->dri.hwContext; - for ( i = 0 ; i < rmesa->lastTexHeap ; i++ ) { - if ( sarea->texAge[i] != rmesa->lastTexAge[i] ) { - radeonAgeTextures( rmesa, i ); + for ( i = 0 ; i < rmesa->texture.numHeaps ; i++ ) { + if ( rmesa->texture.heap[i] && sarea->texAge[i] != rmesa->texture.age[i] ) { + radeonAgeTextures( rmesa, i ); + } } } } Index: xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h:1.3 --- xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h:1.1 Sun Jan 7 20:07:27 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h Wed Oct 30 07:51:55 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h,v 1.1 2001/01/08 01:07:27 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_lock.h,v 1.3 2002/10/30 12:51:55 alanh Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -85,26 +85,27 @@ * 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(); \ +#define LOCK_HARDWARE( rmesa ) \ + do { \ + char __ret = 0; \ + DEBUG_CHECK_LOCK(); \ + DRM_CAS( rmesa->dri.hwLock, rmesa->dri.hwContext, \ + (DRM_LOCK_HELD | rmesa->dri.hwContext), __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 ); \ + DRM_UNLOCK( rmesa->dri.fd, \ + rmesa->dri.hwLock, \ + rmesa->dri.hwContext ); \ DEBUG_RESET(); \ } while (0) Index: xc/lib/GL/mesa/src/drv/radeon/radeon_maos.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_maos.c:1.1 --- /dev/null Thu Feb 27 12:26:32 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_maos.c Wed Oct 30 07:51:55 2002 @@ -0,0 +1,12 @@ + + +/* If using new packets, can choose either verts or arrays. + * Otherwise, must use verts. + */ +#include "radeon_context.h" +#define RADEON_MAOS_VERTS 1 +#if (RADEON_MAOS_VERTS) || (RADEON_OLD_PACKETS) +#include "radeon_maos_verts.c" +#else +#include "radeon_maos_arrays.c" +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_maos.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_maos.h:1.1 --- /dev/null Thu Feb 27 12:26:32 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_maos.h Wed Oct 30 07:51:55 2002 @@ -0,0 +1,47 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_maos.h,v 1.1 2002/10/30 12:51:55 alanh Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + Tungsten Grahpics Inc., Austin, 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, TUNGSTEN GRAHPICS 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 + * + */ + +#ifndef __RADEON_MAOS_H__ +#define __RADEON_MAOS_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "radeon_context.h" + +extern void radeonEmitArrays( GLcontext *ctx, GLuint inputs ); +extern void radeonReleaseArrays( GLcontext *ctx, GLuint newinputs ); + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_maos_arrays.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_maos_arrays.c:1.1 --- /dev/null Thu Feb 27 12:26:32 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_maos_arrays.c Wed Oct 30 07:51:55 2002 @@ -0,0 +1,592 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_maos_arrays.c,v 1.1 2002/10/30 12:51:55 alanh Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics 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, TUNGSTEN GRAPHICS 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 + * + */ + +#include "glheader.h" +#include "mtypes.h" +#include "colormac.h" +#include "mem.h" +#include "mmath.h" +#include "macros.h" + +#include "swrast_setup/swrast_setup.h" +#include "math/m_translate.h" +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "tnl/t_imm_debug.h" + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_state.h" +#include "radeon_swtcl.h" +#include "radeon_maos.h" + +/* Usage: + * - from radeon_tcl_render + * - call radeonEmitArrays to ensure uptodate arrays in dma + * - emit primitives (new type?) which reference the data + * -- need to use elts for lineloop, quads, quadstrip/flat + * -- other primitives are all well-formed (need tristrip-1,fake-poly) + * + */ +static void emit_ubyte_rgba3( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + radeon_color_t *out = (radeon_color_t *)(rvb->start + rvb->address); + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d out %p\n", + __FUNCTION__, count, stride, out); + + for (i = 0; i < count; i++) { + out->red = *data; + out->green = *(data+1); + out->blue = *(data+2); + out->alpha = 0xFF; + out++; + data += stride; + } +} + + +#if defined(USE_X86_ASM) +#define COPY_DWORDS( dst, src, nr ) \ +do { \ + int __tmp; \ + __asm__ __volatile__( "rep ; movsl" \ + : "=%c" (__tmp), "=D" (dst), "=S" (__tmp) \ + : "0" (nr), \ + "D" ((long)dst), \ + "S" ((long)src) ); \ +} while (0) +#else +#define COPY_DWORDS( dst, src, nr ) \ +do { \ + int j; \ + for ( j = 0 ; j < nr ; j++ ) \ + dst[j] = ((int *)src)[j]; \ + dst += nr; \ +} while (0) +#endif + + + +static void emit_ubyte_rgba4( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d\n", + __FUNCTION__, count, stride); + + if (stride == 4) + COPY_DWORDS( out, data, count ); + else + for (i = 0; i < count; i++) { + *out++ = LE32_TO_CPU(*(int *)data); + data += stride; + } +} + + +static void emit_ubyte_rgba( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int size, + int stride, + int count ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s %d/%d\n", __FUNCTION__, count, size); + + assert (!rvb->buf); + + if (stride == 0) { + radeonAllocDmaRegion( rmesa, rvb, 4, 4 ); + count = 1; + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = 0; + rvb->aos_size = 1; + } + else { + radeonAllocDmaRegion( rmesa, rvb, 4 * count, 4 ); /* alignment? */ + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = 1; + rvb->aos_size = 1; + } + + /* Emit the data + */ + switch (size) { + case 3: + emit_ubyte_rgba3( ctx, rvb, data, stride, count ); + break; + case 4: + emit_ubyte_rgba4( ctx, rvb, data, stride, count ); + break; + default: + assert(0); + exit(1); + break; + } +} + + + + +static void emit_vec8( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d\n", + __FUNCTION__, count, stride); + + if (stride == 8) + COPY_DWORDS( out, data, count*2 ); + else + for (i = 0; i < count; i++) { + out[0] = *(int *)data; + out[1] = *(int *)(data+4); + out += 2; + data += stride; + } +} + +static void emit_vec12( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d out %p data %p\n", + __FUNCTION__, count, stride, out, data); + + if (stride == 12) + COPY_DWORDS( out, data, count*3 ); + else + for (i = 0; i < count; i++) { + out[0] = *(int *)data; + out[1] = *(int *)(data+4); + out[2] = *(int *)(data+8); + out += 3; + data += stride; + } +} + +static void emit_vec16( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d\n", + __FUNCTION__, count, stride); + + if (stride == 16) + COPY_DWORDS( out, data, count*4 ); + else + for (i = 0; i < count; i++) { + out[0] = *(int *)data; + out[1] = *(int *)(data+4); + out[2] = *(int *)(data+8); + out[3] = *(int *)(data+12); + out += 4; + data += stride; + } +} + + +static void emit_vector( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int size, + int stride, + int count ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s %d/%d\n", __FUNCTION__, count, size); + + assert (!rvb->buf); + + if (stride == 0) { + radeonAllocDmaRegion( rmesa, rvb, size * 4, 4 ); + count = 1; + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = 0; + rvb->aos_size = size; + } + else { + radeonAllocDmaRegion( rmesa, rvb, size * count * 4, 4 ); /* alignment? */ + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = size; + rvb->aos_size = size; + } + + /* Emit the data + */ + switch (size) { + case 2: + emit_vec8( ctx, rvb, data, stride, count ); + break; + case 3: + emit_vec12( ctx, rvb, data, stride, count ); + break; + case 4: + emit_vec16( ctx, rvb, data, stride, count ); + break; + default: + assert(0); + exit(1); + break; + } + +} + + + +static void emit_s0_vec( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d\n", + __FUNCTION__, count, stride); + + for (i = 0; i < count; i++) { + out[0] = *(int *)data; + out[1] = 0; + out += 2; + data += stride; + } +} + +static void emit_stq_vec( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int stride, + int count ) +{ + int i; + int *out = (int *)(rvb->address + rvb->start); + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s count %d stride %d\n", + __FUNCTION__, count, stride); + + for (i = 0; i < count; i++) { + out[0] = *(int *)data; + out[1] = *(int *)(data+4); + out[2] = *(int *)(data+12); + out += 3; + data += stride; + } +} + + + + +static void emit_tex_vector( GLcontext *ctx, + struct radeon_dma_region *rvb, + char *data, + int size, + int stride, + int count ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + int emitsize; + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s %d/%d\n", __FUNCTION__, count, size); + + assert (!rvb->buf); + + switch (size) { + case 4: emitsize = 3; break; + default: emitsize = 2; break; + } + + + if (stride == 0) { + radeonAllocDmaRegion( rmesa, rvb, 4 * emitsize, 4 ); + count = 1; + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = 0; + rvb->aos_size = emitsize; + } + else { + radeonAllocDmaRegion( rmesa, rvb, 4 * emitsize * count, 4 ); + rvb->aos_start = GET_START(rvb); + rvb->aos_stride = emitsize; + rvb->aos_size = emitsize; + } + + + /* Emit the data + */ + switch (size) { + case 1: + emit_s0_vec( ctx, rvb, data, stride, count ); + break; + case 2: + emit_vec8( ctx, rvb, data, stride, count ); + break; + case 3: + emit_vec8( ctx, rvb, data, stride, count ); + break; + case 4: + emit_stq_vec( ctx, rvb, data, stride, count ); + break; + default: + assert(0); + exit(1); + break; + } +} + + + + +/* Emit any changed arrays to new agp memory, re-emit a packet to + * update the arrays. + */ +void radeonEmitArrays( GLcontext *ctx, GLuint inputs ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb; + struct radeon_dma_region **component = rmesa->tcl.aos_components; + GLuint nr = 0; + GLuint vfmt = 0; + GLuint count = VB->Count; + GLuint vtx; + + if (RADEON_DEBUG & DEBUG_VERTS) + _tnl_print_vert_flags( __FUNCTION__, inputs ); + + if (1) { + if (!rmesa->tcl.obj.buf) + emit_vector( ctx, + &rmesa->tcl.obj, + (char *)VB->ObjPtr->data, + VB->ObjPtr->size, + VB->ObjPtr->stride, + count); + + switch( VB->ObjPtr->size ) { + case 4: vfmt |= RADEON_CP_VC_FRMT_W0; + case 3: vfmt |= RADEON_CP_VC_FRMT_Z; + case 2: vfmt |= RADEON_CP_VC_FRMT_XY; + default: + } + component[nr++] = &rmesa->tcl.obj; + } + + + if (inputs & VERT_NORM) { + if (!rmesa->tcl.norm.buf) + emit_vector( ctx, + &(rmesa->tcl.norm), + (char *)VB->NormalPtr->data, + 3, + VB->NormalPtr->stride, + count); + + vfmt |= RADEON_CP_VC_FRMT_N0; + component[nr++] = &rmesa->tcl.norm; + } + + if (inputs & VERT_RGBA) { + if (VB->ColorPtr[0]->Type == GL_UNSIGNED_BYTE) { + if (!rmesa->tcl.rgba.buf) + emit_ubyte_rgba( ctx, + &rmesa->tcl.rgba, + (char *)VB->ColorPtr[0]->Ptr, + VB->ColorPtr[0]->Size, + VB->ColorPtr[0]->StrideB, + count); + + vfmt |= RADEON_CP_VC_FRMT_PKCOLOR; + } + else { + int emitsize; + + if (VB->ColorPtr[0]->Size == 4 && + (VB->ColorPtr[0]->StrideB != 0 || + ((GLfloat *)VB->ColorPtr[0]->Ptr)[3] != 1.0)) { + vfmt |= RADEON_CP_VC_FRMT_FPCOLOR | RADEON_CP_VC_FRMT_FPALPHA; + emitsize = 4; + } + else { + vfmt |= RADEON_CP_VC_FRMT_FPCOLOR; + emitsize = 3; + } + + + if (!rmesa->tcl.rgba.buf) + emit_vector( ctx, + &(rmesa->tcl.rgba), + (char *)VB->ColorPtr[0]->Ptr, + emitsize, + VB->ColorPtr[0]->StrideB, + count); + } + + component[nr++] = &rmesa->tcl.rgba; + } + + + if (inputs & VERT_SPEC_RGB) { + if (!rmesa->tcl.spec.buf) { + if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE) + radeon_import_float_spec_colors( ctx ); + + emit_ubyte_rgba( ctx, + &rmesa->tcl.spec, + (char *)VB->SecondaryColorPtr[0]->Ptr, + 3, + VB->SecondaryColorPtr[0]->StrideB, + count); + } + + vfmt |= RADEON_CP_VC_FRMT_PKSPEC; + component[nr++] = &rmesa->tcl.spec; + } + + vtx = (rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] & + ~(RADEON_TCL_VTX_Q0|RADEON_TCL_VTX_Q1)); + + if (inputs & VERT_TEX0) { + if (!rmesa->tcl.tex[0].buf) + emit_tex_vector( ctx, + &(rmesa->tcl.tex[0]), + (char *)VB->TexCoordPtr[0]->data, + VB->TexCoordPtr[0]->size, + VB->TexCoordPtr[0]->stride, + count ); + + switch( VB->TexCoordPtr[0]->size ) { + case 4: + vtx |= RADEON_TCL_VTX_Q0; + vfmt |= RADEON_CP_VC_FRMT_Q0; + default: + vfmt |= RADEON_CP_VC_FRMT_ST0; + } + component[nr++] = &rmesa->tcl.tex[0]; + } + + if (inputs & VERT_TEX1) { + if (!rmesa->tcl.tex[1].buf) + emit_tex_vector( ctx, + &(rmesa->tcl.tex[1]), + (char *)VB->TexCoordPtr[1]->data, + VB->TexCoordPtr[1]->size, + VB->TexCoordPtr[1]->stride, + count ); + + switch( VB->TexCoordPtr[1]->size ) { + case 4: + vtx |= RADEON_TCL_VTX_Q1; + vfmt |= RADEON_CP_VC_FRMT_Q1; + default: + vfmt |= RADEON_CP_VC_FRMT_ST1; + } + component[nr++] = &rmesa->tcl.tex[1]; + } + + if (vtx != rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT]) { + RADEON_STATECHANGE( rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] = vtx; + } + + rmesa->tcl.nr_aos_components = nr; + rmesa->tcl.vertex_format = vfmt; +} + + +void radeonReleaseArrays( GLcontext *ctx, GLuint newinputs ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + if (RADEON_DEBUG & DEBUG_VERTS) + _tnl_print_vert_flags( __FUNCTION__, newinputs ); + + if (newinputs & VERT_OBJ) + radeonReleaseDmaRegion( rmesa, &rmesa->tcl.obj, __FUNCTION__ ); + + if (newinputs & VERT_NORM) + radeonReleaseDmaRegion( rmesa, &rmesa->tcl.norm, __FUNCTION__ ); + + if (newinputs & VERT_RGBA) + radeonReleaseDmaRegion( rmesa, &rmesa->tcl.rgba, __FUNCTION__ ); + + if (newinputs & VERT_SPEC_RGB) + radeonReleaseDmaRegion( rmesa, &rmesa->tcl.spec, __FUNCTION__ ); + + if (newinputs & VERT_TEX0) + radeonReleaseDmaRegion( rmesa, &rmesa->tcl.tex[0], __FUNCTION__ ); + + if (newinputs & VERT_TEX1) + radeonReleaseDmaRegion( rmesa, &rmesa->tcl.tex[1], __FUNCTION__ ); +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_maos_vbtmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_maos_vbtmp.h:1.1 --- /dev/null Thu Feb 27 12:26:32 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_maos_vbtmp.h Wed Oct 30 07:51:55 2002 @@ -0,0 +1,371 @@ +/* + * Mesa 3-D graphics library + * Version: 3.5 + * + * Copyright (C) 1999-2001 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. + * + * Authors: + * Keith Whitwell + */ + +#ifndef LOCALVARS +#define LOCALVARS +#endif + +#undef TCL_DEBUG +#ifndef TCL_DEBUG +#define TCL_DEBUG 0 +#endif + +static void TAG(emit)( GLcontext *ctx, + GLuint start, GLuint end, + void *dest ) +{ + LOCALVARS + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint (*tc0)[4], (*tc1)[4]; + GLfloat *fog; + GLuint (*tc2)[4], (*norm)[3]; + GLubyte (*col)[4], (*spec)[4]; + GLuint tc0_stride, tc1_stride, col_stride, spec_stride, fog_stride; + GLuint tc2_stride, norm_stride; + GLuint (*coord)[4]; + GLuint coord_stride; + GLubyte dummy[4]; + int i; + + union emit_union *v = (union emit_union *)dest; + + + if (RADEON_DEBUG & DEBUG_VERTS) + fprintf(stderr, "%s\n", __FUNCTION__); + + /* The vertex code expects Obj to be clean to element 3. To fix + * this, add more vertex code (for obj-2, obj-3) or preferably move + * to maos. + */ + if (VB->ObjPtr->size < 3) { + if (VB->ObjPtr->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_OBJ, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->ObjPtr, VB->Count, 2 ); + } + + if (DO_W && VB->ObjPtr->size < 4) { + if (VB->ObjPtr->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_OBJ, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->ObjPtr, VB->Count, 3 ); + } + + coord = (GLuint (*)[4])VB->ObjPtr->data; + coord_stride = VB->ObjPtr->stride; + + if (DO_TEX2) { + const GLuint t2 = GET_TEXSOURCE(2); + tc2 = (GLuint (*)[4])VB->TexCoordPtr[t2]->data; + tc2_stride = VB->TexCoordPtr[t2]->stride; + if (DO_PTEX && VB->TexCoordPtr[t2]->size < 4) { + if (VB->TexCoordPtr[t2]->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_TEX2, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->TexCoordPtr[t2], VB->Count, 3 ); + } + } + + if (DO_TEX1) { + if (VB->TexCoordPtr[1]) { + const GLuint t1 = GET_TEXSOURCE(1); + tc1 = (GLuint (*)[4])VB->TexCoordPtr[t1]->data; + tc1_stride = VB->TexCoordPtr[t1]->stride; + if (DO_PTEX && VB->TexCoordPtr[t1]->size < 4) { + if (VB->TexCoordPtr[t1]->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_TEX1, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->TexCoordPtr[t1], VB->Count, 3 ); + } + } else { + tc1 = (GLuint (*)[4])&ctx->Current.Texcoord[1]; /* could be anything, really */ + tc1_stride = 0; + } + } + + if (DO_TEX0) { + if (VB->TexCoordPtr[0]) { + const GLuint t0 = GET_TEXSOURCE(0); + tc0_stride = VB->TexCoordPtr[t0]->stride; + tc0 = (GLuint (*)[4])VB->TexCoordPtr[t0]->data; + if (DO_PTEX && VB->TexCoordPtr[t0]->size < 4) { + if (VB->TexCoordPtr[t0]->flags & VEC_NOT_WRITEABLE) { + VB->import_data( ctx, VERT_TEX0, VEC_NOT_WRITEABLE ); + } + _mesa_vector4f_clean_elem( VB->TexCoordPtr[t0], VB->Count, 3 ); + } + } else { + tc0 = (GLuint (*)[4])&ctx->Current.Texcoord[0]; /* could be anything, really */ + tc0_stride = 0; + } + + } + + if (DO_NORM) { + if (VB->NormalPtr) { + norm_stride = VB->NormalPtr->stride; + norm = (GLuint (*)[3])VB->NormalPtr->data; + } else { + norm_stride = 0; + norm = (GLuint (*)[3])&ctx->Current.Normal; + } + } + + if (DO_RGBA) { + if (VB->ColorPtr[0]) { + /* This is incorrect when colormaterial is enabled: + */ + if (VB->ColorPtr[0]->Type != GL_UNSIGNED_BYTE) { + if (0) fprintf(stderr, "IMPORTING FLOAT COLORS\n"); + IMPORT_FLOAT_COLORS( ctx ); + } + col = (GLubyte (*)[4])VB->ColorPtr[0]->Ptr; + col_stride = VB->ColorPtr[0]->StrideB; + } else { + col = &dummy; /* any old memory is fine */ + col_stride = 0; + } + + } + + if (DO_SPEC) { + if (VB->SecondaryColorPtr[0]) { + if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE) + IMPORT_FLOAT_SPEC_COLORS( ctx ); + spec = (GLubyte (*)[4])VB->SecondaryColorPtr[0]->Ptr; + spec_stride = VB->SecondaryColorPtr[0]->StrideB; + } else { + spec = &dummy; + spec_stride = 0; + } + + } + + if (DO_FOG) { + if (VB->FogCoordPtr) { + fog = VB->FogCoordPtr->data; + fog_stride = VB->FogCoordPtr->stride; + } else { + fog = (GLfloat *)&dummy; *fog = 0; + fog_stride = 0; + } + + } + + + if (VB->importable_data) { + if (start) { + coord = (GLuint (*)[4])((GLubyte *)coord + start * coord_stride); + if (DO_TEX0) + tc0 = (GLuint (*)[4])((GLubyte *)tc0 + start * tc0_stride); + if (DO_TEX1) + tc1 = (GLuint (*)[4])((GLubyte *)tc1 + start * tc1_stride); + if (DO_TEX2) + tc2 = (GLuint (*)[4])((GLubyte *)tc2 + start * tc2_stride); + if (DO_NORM) + norm = (GLuint (*)[3])((GLubyte *)norm + start * norm_stride); + if (DO_RGBA) + STRIDE_4UB(col, start * col_stride); + if (DO_SPEC) + STRIDE_4UB(spec, start * spec_stride); + if (DO_FOG) + STRIDE_F(fog, start * fog_stride); + } + + for (i=start; i < end; i++) { + v[0].ui = coord[0][0]; + v[1].ui = coord[0][1]; + v[2].ui = coord[0][2]; + if (TCL_DEBUG) fprintf(stderr, "%d: %.2f %.2f %.2f ", i, v[0].f, v[1].f, v[2].f); + if (DO_W) { + v[3].ui = coord[0][3]; + if (TCL_DEBUG) fprintf(stderr, "%.2f ", v[3].f); + v += 4; + } + else + v += 3; + coord = (GLuint (*)[4])((GLubyte *)coord + coord_stride); + + if (DO_NORM) { + v[0].ui = norm[0][0]; + v[1].ui = norm[0][1]; + v[2].ui = norm[0][2]; + if (TCL_DEBUG) fprintf(stderr, "norm: %.2f %.2f %.2f ", v[0].f, v[1].f, v[2].f); + v += 3; + norm = (GLuint (*)[3])((GLubyte *)norm + norm_stride); + } + if (DO_RGBA) { + v[0].ui = LE32_TO_CPU(*(GLuint *)&col[0]); + STRIDE_4UB(col, col_stride); + if (TCL_DEBUG) fprintf(stderr, "%x ", v[0].ui); + v++; + } + if (DO_SPEC || DO_FOG) { + if (DO_SPEC) { + v[0].specular.red = spec[0][0]; + v[0].specular.green = spec[0][1]; + v[0].specular.blue = spec[0][2]; + STRIDE_4UB(spec, spec_stride); + } + if (DO_FOG) { + v[0].specular.alpha = fog[0] * 255.0; + STRIDE_F(fog, fog_stride); + } + if (TCL_DEBUG) fprintf(stderr, "%x ", v[0].ui); + v++; + } + if (DO_TEX0) { + v[0].ui = tc0[0][0]; + v[1].ui = tc0[0][1]; + if (TCL_DEBUG) fprintf(stderr, "t0: %.2f %.2f ", v[0].f, v[1].f); + if (DO_PTEX) { + v[2].ui = tc0[0][3]; + if (TCL_DEBUG) fprintf(stderr, "%.2f ", v[2].f); + v += 3; + } + else + v += 2; + tc0 = (GLuint (*)[4])((GLubyte *)tc0 + tc0_stride); + } + if (DO_TEX1) { + v[0].ui = tc1[0][0]; + v[1].ui = tc1[0][1]; + if (TCL_DEBUG) fprintf(stderr, "t1: %.2f %.2f ", v[0].f, v[1].f); + if (DO_PTEX) { + v[2].ui = tc1[0][3]; + if (TCL_DEBUG) fprintf(stderr, "%.2f ", v[2].f); + v += 3; + } + else + v += 2; + tc1 = (GLuint (*)[4])((GLubyte *)tc1 + tc1_stride); + } + if (DO_TEX2) { + v[0].ui = tc2[0][0]; + v[1].ui = tc2[0][1]; + if (DO_PTEX) { + v[2].ui = tc2[0][3]; + v += 3; + } + else + v += 2; + tc2 = (GLuint (*)[4])((GLubyte *)tc2 + tc2_stride); + } + if (TCL_DEBUG) fprintf(stderr, "\n"); + } + } else { + for (i=start; i < end; i++) { + v[0].ui = coord[i][0]; + v[1].ui = coord[i][1]; + v[2].ui = coord[i][2]; + if (DO_W) { + v[3].ui = coord[i][3]; + v += 4; + } + else + v += 3; + + if (DO_NORM) { + v[0].ui = norm[i][0]; + v[1].ui = norm[i][1]; + v[2].ui = norm[i][2]; + v += 3; + } + if (DO_RGBA) { + v[0].ui = LE32_TO_CPU(*(GLuint *)&col[i]); + v++; + } + if (DO_SPEC || DO_FOG) { + if (DO_SPEC) { + v[0].specular.red = spec[i][0]; + v[0].specular.green = spec[i][1]; + v[0].specular.blue = spec[i][2]; + } + if (DO_FOG) { + v[0].specular.alpha = fog[i] * 255.0; + } + v++; + } + if (DO_TEX0) { + v[0].ui = tc0[i][0]; + v[1].ui = tc0[i][1]; + if (DO_PTEX) { + v[2].ui = tc0[i][3]; + v += 3; + } + else + v += 2; + } + if (DO_TEX1) { + v[0].ui = tc1[i][0]; + v[1].ui = tc1[i][1]; + if (DO_PTEX) { + v[2].ui = tc1[i][3]; + v += 3; + } + else + v += 2; + } + if (DO_TEX2) { + v[0].ui = tc2[i][0]; + v[1].ui = tc2[i][1]; + if (DO_PTEX) { + v[2].ui = tc2[i][3]; + v += 3; + } + else + v += 2; + } + } + } +} + + + +static void TAG(init)( void ) +{ + int sz = 3; + if (DO_W) sz++; + if (DO_NORM) sz += 3; + if (DO_RGBA) sz++; + if (DO_SPEC || DO_FOG) sz++; + if (DO_TEX0) sz += 2; + if (DO_TEX0 && DO_PTEX) sz++; + if (DO_TEX1) sz += 2; + if (DO_TEX1 && DO_PTEX) sz++; + if (DO_TEX2) sz += 2; + if (DO_TEX2 && DO_PTEX) sz++; + + setup_tab[IDX].emit = TAG(emit); + setup_tab[IDX].vertex_format = IND; + setup_tab[IDX].vertex_size = sz; +} + + +#undef IND +#undef TAG +#undef IDX Index: xc/lib/GL/mesa/src/drv/radeon/radeon_maos_verts.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_maos_verts.c:1.1 --- /dev/null Thu Feb 27 12:26:32 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_maos_verts.c Wed Oct 30 07:51:55 2002 @@ -0,0 +1,336 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_maos_verts.c,v 1.1 2002/10/30 12:51:55 alanh Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics Inc., Austin, 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, TUNGSTEN GRAPHICS 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 + * + */ + +#include "radeon_context.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" +#include "radeon_tex.h" +#include "radeon_tcl.h" +#include "radeon_swtcl.h" +#include "radeon_maos.h" + +#include "mmath.h" +#include "mtypes.h" +#include "enums.h" +#include "colormac.h" +#include "light.h" + +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" +#include "tnl/t_imm_debug.h" + +#define RADEON_TCL_MAX_SETUP 13 + +union emit_union { float f; GLuint ui; radeon_color_t specular; }; + +static struct { + void (*emit)( GLcontext *, GLuint, GLuint, void * ); + GLuint vertex_size; + GLuint vertex_format; +} setup_tab[RADEON_TCL_MAX_SETUP]; + +#define DO_W (IND & RADEON_CP_VC_FRMT_W0) +#define DO_RGBA (IND & RADEON_CP_VC_FRMT_PKCOLOR) +#define DO_SPEC (IND & RADEON_CP_VC_FRMT_PKSPEC) +#define DO_FOG (IND & RADEON_CP_VC_FRMT_PKSPEC) +#define DO_TEX0 (IND & RADEON_CP_VC_FRMT_ST0) +#define DO_TEX1 (IND & RADEON_CP_VC_FRMT_ST1) +#define DO_PTEX (IND & RADEON_CP_VC_FRMT_Q0) +#define DO_NORM (IND & RADEON_CP_VC_FRMT_N0) + +#define DO_TEX2 0 +#define DO_TEX3 0 + +#define GET_TEXSOURCE(n) n +#define GET_UBYTE_COLOR_STORE() &RADEON_CONTEXT(ctx)->UbyteColor +#define GET_UBYTE_SPEC_COLOR_STORE() &RADEON_CONTEXT(ctx)->UbyteSecondaryColor + +#define IMPORT_FLOAT_COLORS radeon_import_float_colors +#define IMPORT_FLOAT_SPEC_COLORS radeon_import_float_spec_colors + +/*********************************************************************** + * Generate vertex emit functions * + ***********************************************************************/ + + +/* Defined in order of increasing vertex size: + */ +#define IDX 0 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_PKCOLOR) +#define TAG(x) x##_rgba +#include "radeon_maos_vbtmp.h" + +#define IDX 1 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_N0) +#define TAG(x) x##_n +#include "radeon_maos_vbtmp.h" + +#define IDX 2 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_PKCOLOR| \ + RADEON_CP_VC_FRMT_ST0) +#define TAG(x) x##_rgba_st +#include "radeon_maos_vbtmp.h" + +#define IDX 3 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_PKCOLOR| \ + RADEON_CP_VC_FRMT_N0) +#define TAG(x) x##_rgba_n +#include "radeon_maos_vbtmp.h" + +#define IDX 4 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_ST0| \ + RADEON_CP_VC_FRMT_N0) +#define TAG(x) x##_st_n +#include "radeon_maos_vbtmp.h" + +#define IDX 5 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_PKCOLOR| \ + RADEON_CP_VC_FRMT_ST0| \ + RADEON_CP_VC_FRMT_ST1) +#define TAG(x) x##_rgba_st_st +#include "radeon_maos_vbtmp.h" + +#define IDX 6 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_PKCOLOR| \ + RADEON_CP_VC_FRMT_ST0| \ + RADEON_CP_VC_FRMT_N0) +#define TAG(x) x##_rgba_st_n +#include "radeon_maos_vbtmp.h" + +#define IDX 7 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_PKCOLOR| \ + RADEON_CP_VC_FRMT_PKSPEC| \ + RADEON_CP_VC_FRMT_ST0| \ + RADEON_CP_VC_FRMT_ST1) +#define TAG(x) x##_rgba_spec_st_st +#include "radeon_maos_vbtmp.h" + +#define IDX 8 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_ST0| \ + RADEON_CP_VC_FRMT_ST1| \ + RADEON_CP_VC_FRMT_N0) +#define TAG(x) x##_st_st_n +#include "radeon_maos_vbtmp.h" + +#define IDX 9 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_PKCOLOR| \ + RADEON_CP_VC_FRMT_PKSPEC| \ + RADEON_CP_VC_FRMT_ST0| \ + RADEON_CP_VC_FRMT_ST1| \ + RADEON_CP_VC_FRMT_N0) +#define TAG(x) x##_rgpa_spec_st_st_n +#include "radeon_maos_vbtmp.h" + +#define IDX 10 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_PKCOLOR| \ + RADEON_CP_VC_FRMT_ST0| \ + RADEON_CP_VC_FRMT_Q0) +#define TAG(x) x##_rgba_stq +#include "radeon_maos_vbtmp.h" + +#define IDX 11 +#define IND (RADEON_CP_VC_FRMT_XY| \ + RADEON_CP_VC_FRMT_Z| \ + RADEON_CP_VC_FRMT_PKCOLOR| \ + RADEON_CP_VC_FRMT_ST1| \ + RADEON_CP_VC_FRMT_Q1| \ + RADEON_CP_VC_FRMT_ST0| \ + RADEON_CP_VC_FRMT_Q0) +#define TAG(x) x##_rgba_stq_stq +#include "radeon_maos_vbtmp.h" + +#define IDX 12 +#define IND (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_Q0| \ + RADEON_CP_VC_FRMT_ST1| \ + RADEON_CP_VC_FRMT_Q1| \ + RADEON_CP_VC_FRMT_N0) +#define TAG(x) x##_w_rgpa_spec_stq_stq_n +#include "radeon_maos_vbtmp.h" + + + + + +/*********************************************************************** + * Initialization + ***********************************************************************/ + + +static void init_tcl_verts( void ) +{ + init_rgba(); + init_n(); + init_rgba_n(); + init_rgba_st(); + init_st_n(); + init_rgba_st_st(); + init_rgba_st_n(); + init_rgba_spec_st_st(); + init_st_st_n(); + init_rgpa_spec_st_st_n(); + init_rgba_stq(); + init_rgba_stq_stq(); + init_w_rgpa_spec_stq_stq_n(); +} + + +void radeonEmitArrays( GLcontext *ctx, GLuint inputs ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLuint req = 0; + GLuint vtx = (rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] & + ~(RADEON_TCL_VTX_Q0|RADEON_TCL_VTX_Q1)); + int i; + static int firsttime = 1; + + if (firsttime) { + init_tcl_verts(); + firsttime = 0; + } + + if (1) { + req |= RADEON_CP_VC_FRMT_Z; + if (VB->ObjPtr->size == 4) { + req |= RADEON_CP_VC_FRMT_W0; + } + } + + if (inputs & VERT_NORM) { + req |= RADEON_CP_VC_FRMT_N0; + } + + if (inputs & VERT_RGBA) { + req |= RADEON_CP_VC_FRMT_PKCOLOR; + } + + if (inputs & VERT_SPEC_RGB) { + req |= RADEON_CP_VC_FRMT_PKSPEC; + } + + if (inputs & VERT_TEX0) { + req |= RADEON_CP_VC_FRMT_ST0; + + if (VB->TexCoordPtr[0]->size == 4) { + req |= RADEON_CP_VC_FRMT_Q0; + vtx |= RADEON_TCL_VTX_Q0; + } + } + + if (inputs & VERT_TEX1) { + req |= RADEON_CP_VC_FRMT_ST1; + + if (VB->TexCoordPtr[1]->size == 4) { + req |= RADEON_CP_VC_FRMT_Q1; + vtx |= RADEON_TCL_VTX_Q1; + } + } + + if (vtx != rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT]) { + RADEON_STATECHANGE( rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] = vtx; + } + + for (i = 0 ; i < RADEON_TCL_MAX_SETUP ; i++) + if ((setup_tab[i].vertex_format & req) == req) + break; + + if (rmesa->tcl.vertex_format == setup_tab[i].vertex_format && + rmesa->tcl.indexed_verts.buf) + return; + + if (rmesa->tcl.indexed_verts.buf) + radeonReleaseArrays( ctx, ~0 ); + + radeonAllocDmaRegionVerts( rmesa, + &rmesa->tcl.indexed_verts, + VB->Count, + setup_tab[i].vertex_size * 4, + 4); + + setup_tab[i].emit( ctx, 0, VB->Count, + rmesa->tcl.indexed_verts.address + + rmesa->tcl.indexed_verts.start ); + + rmesa->tcl.vertex_format = setup_tab[i].vertex_format; + rmesa->tcl.indexed_verts.aos_start = GET_START( &rmesa->tcl.indexed_verts ); + rmesa->tcl.indexed_verts.aos_size = setup_tab[i].vertex_size; + rmesa->tcl.indexed_verts.aos_stride = setup_tab[i].vertex_size; + + rmesa->tcl.aos_components[0] = &rmesa->tcl.indexed_verts; + rmesa->tcl.nr_aos_components = 1; +} + + + +void radeonReleaseArrays( GLcontext *ctx, GLuint newinputs ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + if (RADEON_DEBUG & DEBUG_VERTS) + _tnl_print_vert_flags( __FUNCTION__, newinputs ); + + if (newinputs) + radeonReleaseDmaRegion( rmesa, &rmesa->tcl.indexed_verts, __FUNCTION__ ); +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.c:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.c:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.c:1.1 Sun Jan 7 20:07:27 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.c Thu Feb 27 12:26:32 2003 @@ -1,168 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.h:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.h:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.h:1.1 Sun Jan 7 20:07:27 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_pipeline.h Thu Feb 27 12:26:32 2003 @@ -1,54 +0,0 @@ -/* $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_sanity.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_sanity.c:1.1 --- /dev/null Thu Feb 27 12:26:32 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_sanity.c Wed Oct 30 07:51:55 2002 @@ -0,0 +1,979 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_sanity.c,v 1.1 2002/10/30 12:51:55 alanh Exp $ */ +/************************************************************************** + +Copyright 2002 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics Inc, Cedar Park, TX. + +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, TUNGSTEN GRAPHICS 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 + * + */ + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_sanity.h" + +/* Set this '1' to get more verbiage. + */ +#define MORE_VERBOSE 1 + +#if MORE_VERBOSE +#define VERBOSE (RADEON_DEBUG & DEBUG_VERBOSE) +#define NORMAL (1) +#else +#define VERBOSE 0 +#define NORMAL (RADEON_DEBUG & DEBUG_VERBOSE) +#endif + + +/* New (1.3) state mechanism. 3 commands (packet, scalar, vector) in + * 1.3 cmdbuffers allow all previous state to be updated as well as + * the tcl scalar and vector areas. + */ +static struct { + int start; + int len; + const char *name; +} packet[RADEON_MAX_STATE_PACKETS] = { + { RADEON_PP_MISC,7,"RADEON_PP_MISC" }, + { RADEON_PP_CNTL,3,"RADEON_PP_CNTL" }, + { RADEON_RB3D_COLORPITCH,1,"RADEON_RB3D_COLORPITCH" }, + { RADEON_RE_LINE_PATTERN,2,"RADEON_RE_LINE_PATTERN" }, + { RADEON_SE_LINE_WIDTH,1,"RADEON_SE_LINE_WIDTH" }, + { RADEON_PP_LUM_MATRIX,1,"RADEON_PP_LUM_MATRIX" }, + { RADEON_PP_ROT_MATRIX_0,2,"RADEON_PP_ROT_MATRIX_0" }, + { RADEON_RB3D_STENCILREFMASK,3,"RADEON_RB3D_STENCILREFMASK" }, + { RADEON_SE_VPORT_XSCALE,6,"RADEON_SE_VPORT_XSCALE" }, + { RADEON_SE_CNTL,2,"RADEON_SE_CNTL" }, + { RADEON_SE_CNTL_STATUS,1,"RADEON_SE_CNTL_STATUS" }, + { RADEON_RE_MISC,1,"RADEON_RE_MISC" }, + { RADEON_PP_TXFILTER_0,6,"RADEON_PP_TXFILTER_0" }, + { RADEON_PP_BORDER_COLOR_0,1,"RADEON_PP_BORDER_COLOR_0" }, + { RADEON_PP_TXFILTER_1,6,"RADEON_PP_TXFILTER_1" }, + { RADEON_PP_BORDER_COLOR_1,1,"RADEON_PP_BORDER_COLOR_1" }, + { RADEON_PP_TXFILTER_2,6,"RADEON_PP_TXFILTER_2" }, + { RADEON_PP_BORDER_COLOR_2,1,"RADEON_PP_BORDER_COLOR_2" }, + { RADEON_SE_ZBIAS_FACTOR,2,"RADEON_SE_ZBIAS_FACTOR" }, + { RADEON_SE_TCL_OUTPUT_VTX_FMT,11,"RADEON_SE_TCL_OUTPUT_VTX_FMT" }, + { RADEON_SE_TCL_MATERIAL_EMMISSIVE_RED,17,"RADEON_SE_TCL_MATERIAL_EMMISSIVE_RED" }, +}; + +struct reg_names { + int idx; + const char *name; +}; + +static struct reg_names reg_names[] = { + { RADEON_PP_MISC, "RADEON_PP_MISC" }, + { RADEON_PP_FOG_COLOR, "RADEON_PP_FOG_COLOR" }, + { RADEON_RE_SOLID_COLOR, "RADEON_RE_SOLID_COLOR" }, + { RADEON_RB3D_BLENDCNTL, "RADEON_RB3D_BLENDCNTL" }, + { RADEON_RB3D_DEPTHOFFSET, "RADEON_RB3D_DEPTHOFFSET" }, + { RADEON_RB3D_DEPTHPITCH, "RADEON_RB3D_DEPTHPITCH" }, + { RADEON_RB3D_ZSTENCILCNTL, "RADEON_RB3D_ZSTENCILCNTL" }, + { RADEON_PP_CNTL, "RADEON_PP_CNTL" }, + { RADEON_RB3D_CNTL, "RADEON_RB3D_CNTL" }, + { RADEON_RB3D_COLOROFFSET, "RADEON_RB3D_COLOROFFSET" }, + { RADEON_RB3D_COLORPITCH, "RADEON_RB3D_COLORPITCH" }, + { RADEON_SE_CNTL, "RADEON_SE_CNTL" }, + { RADEON_SE_COORD_FMT, "RADEON_SE_COORDFMT" }, + { RADEON_SE_CNTL_STATUS, "RADEON_SE_CNTL_STATUS" }, + { RADEON_RE_LINE_PATTERN, "RADEON_RE_LINE_PATTERN" }, + { RADEON_RE_LINE_STATE, "RADEON_RE_LINE_STATE" }, + { RADEON_SE_LINE_WIDTH, "RADEON_SE_LINE_WIDTH" }, + { RADEON_RB3D_STENCILREFMASK, "RADEON_RB3D_STENCILREFMASK" }, + { RADEON_RB3D_ROPCNTL, "RADEON_RB3D_ROPCNTL" }, + { RADEON_RB3D_PLANEMASK, "RADEON_RB3D_PLANEMASK" }, + { RADEON_SE_VPORT_XSCALE, "RADEON_SE_VPORT_XSCALE" }, + { RADEON_SE_VPORT_XOFFSET, "RADEON_SE_VPORT_XOFFSET" }, + { RADEON_SE_VPORT_YSCALE, "RADEON_SE_VPORT_YSCALE" }, + { RADEON_SE_VPORT_YOFFSET, "RADEON_SE_VPORT_YOFFSET" }, + { RADEON_SE_VPORT_ZSCALE, "RADEON_SE_VPORT_ZSCALE" }, + { RADEON_SE_VPORT_ZOFFSET, "RADEON_SE_VPORT_ZOFFSET" }, + { RADEON_RE_MISC, "RADEON_RE_MISC" }, + { RADEON_PP_TXFILTER_0, "RADEON_PP_TXFILTER_0" }, + { RADEON_PP_TXFILTER_1, "RADEON_PP_TXFILTER_1" }, + { RADEON_PP_TXFILTER_2, "RADEON_PP_TXFILTER_2" }, + { RADEON_PP_TXFORMAT_0, "RADEON_PP_TXFORMAT_0" }, + { RADEON_PP_TXFORMAT_1, "RADEON_PP_TXFORMAT_1" }, + { RADEON_PP_TXFORMAT_2, "RADEON_PP_TXFORMAT_3" }, + { RADEON_PP_TXOFFSET_0, "RADEON_PP_TXOFFSET_0" }, + { RADEON_PP_TXOFFSET_1, "RADEON_PP_TXOFFSET_1" }, + { RADEON_PP_TXOFFSET_2, "RADEON_PP_TXOFFSET_3" }, + { RADEON_PP_TXCBLEND_0, "RADEON_PP_TXCBLEND_0" }, + { RADEON_PP_TXCBLEND_1, "RADEON_PP_TXCBLEND_1" }, + { RADEON_PP_TXCBLEND_2, "RADEON_PP_TXCBLEND_3" }, + { RADEON_PP_TXABLEND_0, "RADEON_PP_TXABLEND_0" }, + { RADEON_PP_TXABLEND_1, "RADEON_PP_TXABLEND_1" }, + { RADEON_PP_TXABLEND_2, "RADEON_PP_TXABLEND_3" }, + { RADEON_PP_TFACTOR_0, "RADEON_PP_TFACTOR_0" }, + { RADEON_PP_TFACTOR_1, "RADEON_PP_TFACTOR_1" }, + { RADEON_PP_TFACTOR_2, "RADEON_PP_TFACTOR_3" }, + { RADEON_PP_BORDER_COLOR_0, "RADEON_PP_BORDER_COLOR_0" }, + { RADEON_PP_BORDER_COLOR_1, "RADEON_PP_BORDER_COLOR_1" }, + { RADEON_PP_BORDER_COLOR_2, "RADEON_PP_BORDER_COLOR_3" }, + { RADEON_SE_ZBIAS_FACTOR, "RADEON_SE_ZBIAS_FACTOR" }, + { RADEON_SE_ZBIAS_CONSTANT, "RADEON_SE_ZBIAS_CONSTANT" }, + { RADEON_SE_TCL_OUTPUT_VTX_FMT, "RADEON_SE_TCL_OUTPUT_VTXFMT" }, + { RADEON_SE_TCL_OUTPUT_VTX_SEL, "RADEON_SE_TCL_OUTPUT_VTXSEL" }, + { RADEON_SE_TCL_MATRIX_SELECT_0, "RADEON_SE_TCL_MATRIX_SELECT_0" }, + { RADEON_SE_TCL_MATRIX_SELECT_1, "RADEON_SE_TCL_MATRIX_SELECT_1" }, + { RADEON_SE_TCL_UCP_VERT_BLEND_CTL, "RADEON_SE_TCL_UCP_VERT_BLEND_CTL" }, + { RADEON_SE_TCL_TEXTURE_PROC_CTL, "RADEON_SE_TCL_TEXTURE_PROC_CTL" }, + { RADEON_SE_TCL_LIGHT_MODEL_CTL, "RADEON_SE_TCL_LIGHT_MODEL_CTL" }, + { RADEON_SE_TCL_PER_LIGHT_CTL_0, "RADEON_SE_TCL_PER_LIGHT_CTL_0" }, + { RADEON_SE_TCL_PER_LIGHT_CTL_1, "RADEON_SE_TCL_PER_LIGHT_CTL_1" }, + { RADEON_SE_TCL_PER_LIGHT_CTL_2, "RADEON_SE_TCL_PER_LIGHT_CTL_2" }, + { RADEON_SE_TCL_PER_LIGHT_CTL_3, "RADEON_SE_TCL_PER_LIGHT_CTL_3" }, + { RADEON_SE_TCL_MATERIAL_EMMISSIVE_RED, "RADEON_SE_TCL_EMMISSIVE_RED" }, + { RADEON_SE_TCL_MATERIAL_EMMISSIVE_GREEN, "RADEON_SE_TCL_EMMISSIVE_GREEN" }, + { RADEON_SE_TCL_MATERIAL_EMMISSIVE_BLUE, "RADEON_SE_TCL_EMMISSIVE_BLUE" }, + { RADEON_SE_TCL_MATERIAL_EMMISSIVE_ALPHA, "RADEON_SE_TCL_EMMISSIVE_ALPHA" }, + { RADEON_SE_TCL_MATERIAL_AMBIENT_RED, "RADEON_SE_TCL_AMBIENT_RED" }, + { RADEON_SE_TCL_MATERIAL_AMBIENT_GREEN, "RADEON_SE_TCL_AMBIENT_GREEN" }, + { RADEON_SE_TCL_MATERIAL_AMBIENT_BLUE, "RADEON_SE_TCL_AMBIENT_BLUE" }, + { RADEON_SE_TCL_MATERIAL_AMBIENT_ALPHA, "RADEON_SE_TCL_AMBIENT_ALPHA" }, + { RADEON_SE_TCL_MATERIAL_DIFFUSE_RED, "RADEON_SE_TCL_DIFFUSE_RED" }, + { RADEON_SE_TCL_MATERIAL_DIFFUSE_GREEN, "RADEON_SE_TCL_DIFFUSE_GREEN" }, + { RADEON_SE_TCL_MATERIAL_DIFFUSE_BLUE, "RADEON_SE_TCL_DIFFUSE_BLUE" }, + { RADEON_SE_TCL_MATERIAL_DIFFUSE_ALPHA, "RADEON_SE_TCL_DIFFUSE_ALPHA" }, + { RADEON_SE_TCL_MATERIAL_SPECULAR_RED, "RADEON_SE_TCL_SPECULAR_RED" }, + { RADEON_SE_TCL_MATERIAL_SPECULAR_GREEN, "RADEON_SE_TCL_SPECULAR_GREEN" }, + { RADEON_SE_TCL_MATERIAL_SPECULAR_BLUE, "RADEON_SE_TCL_SPECULAR_BLUE" }, + { RADEON_SE_TCL_MATERIAL_SPECULAR_ALPHA, "RADEON_SE_TCL_SPECULAR_ALPHA" }, + { RADEON_SE_TCL_SHININESS, "RADEON_SE_TCL_SHININESS" }, + { RADEON_SE_COORD_FMT, "RADEON_SE_COORD_FMT" } +}; + +static struct reg_names scalar_names[] = { + { RADEON_SS_LIGHT_DCD_ADDR, "LIGHT_DCD" }, + { RADEON_SS_LIGHT_SPOT_EXPONENT_ADDR, "LIGHT_SPOT_EXPONENT" }, + { RADEON_SS_LIGHT_SPOT_CUTOFF_ADDR, "LIGHT_SPOT_CUTOFF" }, + { RADEON_SS_LIGHT_SPECULAR_THRESH_ADDR, "LIGHT_SPECULAR_THRESH" }, + { RADEON_SS_LIGHT_RANGE_CUTOFF_ADDR, "LIGHT_RANGE_CUTOFF" }, + { RADEON_SS_VERT_GUARD_CLIP_ADJ_ADDR, "VERT_GUARD_CLIP" }, + { RADEON_SS_VERT_GUARD_DISCARD_ADJ_ADDR, "VERT_GUARD_DISCARD" }, + { RADEON_SS_HORZ_GUARD_CLIP_ADJ_ADDR, "HORZ_GUARD_CLIP" }, + { RADEON_SS_HORZ_GUARD_DISCARD_ADJ_ADDR, "HORZ_GUARD_DISCARD" }, + { RADEON_SS_SHININESS, "SHININESS" }, + { 1000, "" }, +}; + +/* Puff these out to make them look like normal (dword) registers. + */ +static struct reg_names vector_names[] = { + { RADEON_VS_MATRIX_0_ADDR * 4, "MATRIX_0" }, + { RADEON_VS_MATRIX_1_ADDR * 4, "MATRIX_1" }, + { RADEON_VS_MATRIX_2_ADDR * 4, "MATRIX_2" }, + { RADEON_VS_MATRIX_3_ADDR * 4, "MATRIX_3" }, + { RADEON_VS_MATRIX_4_ADDR * 4, "MATRIX_4" }, + { RADEON_VS_MATRIX_5_ADDR * 4, "MATRIX_5" }, + { RADEON_VS_MATRIX_6_ADDR * 4, "MATRIX_6" }, + { RADEON_VS_MATRIX_7_ADDR * 4, "MATRIX_7" }, + { RADEON_VS_MATRIX_8_ADDR * 4, "MATRIX_8" }, + { RADEON_VS_MATRIX_9_ADDR * 4, "MATRIX_9" }, + { RADEON_VS_MATRIX_10_ADDR * 4, "MATRIX_10" }, + { RADEON_VS_MATRIX_11_ADDR * 4, "MATRIX_11" }, + { RADEON_VS_MATRIX_12_ADDR * 4, "MATRIX_12" }, + { RADEON_VS_MATRIX_13_ADDR * 4, "MATRIX_13" }, + { RADEON_VS_MATRIX_14_ADDR * 4, "MATRIX_14" }, + { RADEON_VS_MATRIX_15_ADDR * 4, "MATRIX_15" }, + { RADEON_VS_LIGHT_AMBIENT_ADDR * 4, "LIGHT_AMBIENT" }, + { RADEON_VS_LIGHT_DIFFUSE_ADDR * 4, "LIGHT_DIFFUSE" }, + { RADEON_VS_LIGHT_SPECULAR_ADDR * 4, "LIGHT_SPECULAR" }, + { RADEON_VS_LIGHT_DIRPOS_ADDR * 4, "LIGHT_DIRPOS" }, + { RADEON_VS_LIGHT_HWVSPOT_ADDR * 4, "LIGHT_HWVSPOT" }, + { RADEON_VS_LIGHT_ATTENUATION_ADDR * 4, "LIGHT_ATTENUATION" }, + { RADEON_VS_MATRIX_EYE2CLIP_ADDR * 4, "MATRIX_EYE2CLIP" }, + { RADEON_VS_UCP_ADDR * 4, "UCP" }, + { RADEON_VS_GLOBAL_AMBIENT_ADDR * 4, "GLOBAL_AMBIENT" }, + { RADEON_VS_FOG_PARAM_ADDR * 4, "FOG_PARAM" }, + { RADEON_VS_EYE_VECTOR_ADDR * 4, "EYE_VECTOR" }, + { 1000, "" }, +}; + +union fi { float f; int i; }; + +#define ISVEC 1 +#define ISFLOAT 2 +#define TOUCHED 4 + +struct reg { + int idx; + struct reg_names *closest; + int flags; + union fi current; + union fi *values; + int nvalues; + int nalloc; + float vmin, vmax; +}; + + +static struct reg regs[Elements(reg_names)+1]; +static struct reg scalars[512+1]; +static struct reg vectors[512*4+1]; + +static int total, total_changed, bufs; + +static void init_regs( void ) +{ + struct reg_names *tmp; + int i; + + for (i = 0 ; i < Elements(regs) ; i++) { + regs[i].idx = reg_names[i].idx; + regs[i].closest = ®_names[i]; + regs[i].flags = 0; + } + + for (i = 0, tmp = scalar_names ; i < Elements(scalars) ; i++) { + if (tmp[1].idx == i) tmp++; + scalars[i].idx = i; + scalars[i].closest = tmp; + scalars[i].flags = ISFLOAT; + } + + for (i = 0, tmp = vector_names ; i < Elements(vectors) ; i++) { + if (tmp[1].idx*4 == i) tmp++; + vectors[i].idx = i; + vectors[i].closest = tmp; + vectors[i].flags = ISFLOAT|ISVEC; + } + + regs[Elements(regs)-1].idx = -1; + scalars[Elements(scalars)-1].idx = -1; + vectors[Elements(vectors)-1].idx = -1; +} + +static int find_or_add_value( struct reg *reg, int val ) +{ + int j; + + for ( j = 0 ; j < reg->nvalues ; j++) + if ( val == reg->values[j].i ) + return 1; + + if (j == reg->nalloc) { + reg->nalloc += 5; + reg->nalloc *= 2; + reg->values = (union fi *) realloc( reg->values, + reg->nalloc * sizeof(union fi) ); + } + + reg->values[reg->nvalues++].i = val; + return 0; +} + +static struct reg *lookup_reg( struct reg *tab, int reg ) +{ + int i; + + for (i = 0 ; tab[i].idx != -1 ; i++) { + if (tab[i].idx == reg) + return &tab[i]; + } + + fprintf(stderr, "*** unknown reg 0x%x\n", reg); + return 0; +} + + +static const char *get_reg_name( struct reg *reg ) +{ + static char tmp[80]; + + if (reg->idx == reg->closest->idx) + return reg->closest->name; + + + if (reg->flags & ISVEC) { + if (reg->idx/4 != reg->closest->idx) + sprintf(tmp, "%s+%d[%d]", + reg->closest->name, + (reg->idx/4) - reg->closest->idx, + reg->idx%4); + else + sprintf(tmp, "%s[%d]", reg->closest->name, reg->idx%4); + } + else { + if (reg->idx != reg->closest->idx) + sprintf(tmp, "%s+%d", reg->closest->name, reg->idx - reg->closest->idx); + else + sprintf(tmp, "%s", reg->closest->name); + } + + return tmp; +} + +static int print_int_reg_assignment( struct reg *reg, int data ) +{ + int changed = (reg->current.i != data); + int ever_seen = find_or_add_value( reg, data ); + + if (VERBOSE || (NORMAL && (changed || !ever_seen))) + fprintf(stderr, " %s <-- 0x%x", get_reg_name(reg), data); + + if (NORMAL) { + if (!ever_seen) + fprintf(stderr, " *** BRAND NEW VALUE"); + else if (changed) + fprintf(stderr, " *** CHANGED"); + } + + reg->current.i = data; + + if (VERBOSE || (NORMAL && (changed || !ever_seen))) + fprintf(stderr, "\n"); + + return changed; +} + + +static int print_float_reg_assignment( struct reg *reg, float data ) +{ + int changed = (reg->current.f != data); + int newmin = (data < reg->vmin); + int newmax = (data > reg->vmax); + + if (VERBOSE || (NORMAL && (newmin || newmax || changed))) + fprintf(stderr, " %s <-- %.3f", get_reg_name(reg), data); + + if (NORMAL) { + if (newmin) { + fprintf(stderr, " *** NEW MIN (prev %.3f)", reg->vmin); + reg->vmin = data; + } + else if (newmax) { + fprintf(stderr, " *** NEW MAX (prev %.3f)", reg->vmax); + reg->vmax = data; + } + else if (changed) { + fprintf(stderr, " *** CHANGED"); + } + } + + reg->current.f = data; + + if (VERBOSE || (NORMAL && (newmin || newmax || changed))) + fprintf(stderr, "\n"); + + return changed; +} + +static int print_reg_assignment( struct reg *reg, int data ) +{ + reg->flags |= TOUCHED; + if (reg->flags & ISFLOAT) + return print_float_reg_assignment( reg, *(float *)&data ); + else + return print_int_reg_assignment( reg, data ); +} + +static void print_reg( struct reg *reg ) +{ + if (reg->flags & TOUCHED) { + if (reg->flags & ISFLOAT) { + fprintf(stderr, " %s == %f\n", get_reg_name(reg), reg->current.f); + } else { + fprintf(stderr, " %s == 0x%x\n", get_reg_name(reg), reg->current.i); + } + } +} + + +static void dump_state( void ) +{ + int i; + + for (i = 0 ; i < Elements(regs) ; i++) + print_reg( ®s[i] ); + + for (i = 0 ; i < Elements(scalars) ; i++) + print_reg( &scalars[i] ); + + for (i = 0 ; i < Elements(vectors) ; i++) + print_reg( &vectors[i] ); +} + + + +static int radeon_emit_packets( + drmRadeonCmdHeader header, + drmRadeonCmdBuffer *cmdbuf ) +{ + int id = (int)header.packet.packet_id; + int sz = packet[id].len; + int *data = (int *)cmdbuf->buf; + int i; + + if (sz * sizeof(int) > cmdbuf->bufsz) { + fprintf(stderr, "Packet overflows cmdbuf\n"); + return -EINVAL; + } + + if (!packet[id].name) { + fprintf(stderr, "*** Unknown packet 0 nr %d\n", id ); + return -EINVAL; + } + + + if (VERBOSE) + fprintf(stderr, "Packet 0 reg %s nr %d\n", packet[id].name, sz ); + + for ( i = 0 ; i < sz ; i++) { + struct reg *reg = lookup_reg( regs, packet[id].start + i*4 ); + if (print_reg_assignment( reg, data[i] )) + total_changed++; + total++; + } + + cmdbuf->buf += sz * sizeof(int); + cmdbuf->bufsz -= sz * sizeof(int); + return 0; +} + + +static int radeon_emit_scalars( + drmRadeonCmdHeader header, + drmRadeonCmdBuffer *cmdbuf ) +{ + int sz = header.scalars.count; + int *data = (int *)cmdbuf->buf; + int start = header.scalars.offset; + int stride = header.scalars.stride; + int i; + + if (VERBOSE) + fprintf(stderr, "emit scalars, start %d stride %d nr %d (end %d)\n", + start, stride, sz, start + stride * sz); + + + for (i = 0 ; i < sz ; i++, start += stride) { + struct reg *reg = lookup_reg( scalars, start ); + if (print_reg_assignment( reg, data[i] )) + total_changed++; + total++; + } + + cmdbuf->buf += sz * sizeof(int); + cmdbuf->bufsz -= sz * sizeof(int); + return 0; +} + + +static int radeon_emit_scalars2( + drmRadeonCmdHeader header, + drmRadeonCmdBuffer *cmdbuf ) +{ + int sz = header.scalars.count; + int *data = (int *)cmdbuf->buf; + int start = header.scalars.offset + 0x100; + int stride = header.scalars.stride; + int i; + + if (VERBOSE) + fprintf(stderr, "emit scalars2, start %d stride %d nr %d (end %d)\n", + start, stride, sz, start + stride * sz); + + if (start + stride * sz > 257) { + fprintf(stderr, "emit scalars OVERFLOW %d/%d/%d\n", start, stride, sz); + return -1; + } + + for (i = 0 ; i < sz ; i++, start += stride) { + struct reg *reg = lookup_reg( scalars, start ); + if (print_reg_assignment( reg, data[i] )) + total_changed++; + total++; + } + + cmdbuf->buf += sz * sizeof(int); + cmdbuf->bufsz -= sz * sizeof(int); + return 0; +} + +/* Check: inf/nan/extreme-size? + * Check: table start, end, nr, etc. + */ +static int radeon_emit_vectors( + drmRadeonCmdHeader header, + drmRadeonCmdBuffer *cmdbuf ) +{ + int sz = header.vectors.count; + int *data = (int *)cmdbuf->buf; + int start = header.vectors.offset; + int stride = header.vectors.stride; + int i,j; + + if (VERBOSE) + fprintf(stderr, "emit vectors, start %d stride %d nr %d (end %d) (0x%x)\n", + start, stride, sz, start + stride * sz, header.i); + +/* if (start + stride * (sz/4) > 128) { */ +/* fprintf(stderr, "emit vectors OVERFLOW %d/%d/%d\n", start, stride, sz); */ +/* return -1; */ +/* } */ + + for (i = 0 ; i < sz ; start += stride) { + int changed = 0; + for (j = 0 ; j < 4 ; i++,j++) { + struct reg *reg = lookup_reg( vectors, start*4+j ); + if (print_reg_assignment( reg, data[i] )) + changed = 1; + } + if (changed) + total_changed += 4; + total += 4; + } + + + cmdbuf->buf += sz * sizeof(int); + cmdbuf->bufsz -= sz * sizeof(int); + return 0; +} + + +static int print_vertex_format( int vfmt ) +{ + if (NORMAL) { + fprintf(stderr, " %s(%x): %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", + "vertex format", + vfmt, + "xy,", + (vfmt & RADEON_CP_VC_FRMT_Z) ? "z," : "", + (vfmt & RADEON_CP_VC_FRMT_W0) ? "w0," : "", + (vfmt & RADEON_CP_VC_FRMT_FPCOLOR) ? "fpcolor," : "", + (vfmt & RADEON_CP_VC_FRMT_FPALPHA) ? "fpalpha," : "", + (vfmt & RADEON_CP_VC_FRMT_PKCOLOR) ? "pkcolor," : "", + (vfmt & RADEON_CP_VC_FRMT_FPSPEC) ? "fpspec," : "", + (vfmt & RADEON_CP_VC_FRMT_FPFOG) ? "fpfog," : "", + (vfmt & RADEON_CP_VC_FRMT_PKSPEC) ? "pkspec," : "", + (vfmt & RADEON_CP_VC_FRMT_ST0) ? "st0," : "", + (vfmt & RADEON_CP_VC_FRMT_ST1) ? "st1," : "", + (vfmt & RADEON_CP_VC_FRMT_Q1) ? "q1," : "", + (vfmt & RADEON_CP_VC_FRMT_ST2) ? "st2," : "", + (vfmt & RADEON_CP_VC_FRMT_Q2) ? "q2," : "", + (vfmt & RADEON_CP_VC_FRMT_ST3) ? "st3," : "", + (vfmt & RADEON_CP_VC_FRMT_Q3) ? "q3," : "", + (vfmt & RADEON_CP_VC_FRMT_Q0) ? "q0," : "", + (vfmt & RADEON_CP_VC_FRMT_N0) ? "n0," : "", + (vfmt & RADEON_CP_VC_FRMT_XY1) ? "xy1," : "", + (vfmt & RADEON_CP_VC_FRMT_Z1) ? "z1," : "", + (vfmt & RADEON_CP_VC_FRMT_W1) ? "w1," : "", + (vfmt & RADEON_CP_VC_FRMT_N1) ? "n1," : ""); + + +/* if (!find_or_add_value( &others[V_VTXFMT], vfmt )) */ +/* fprintf(stderr, " *** NEW VALUE"); */ + + fprintf(stderr, "\n"); + } + + return 0; +} + +static char *primname[0xf] = { + "NONE", + "POINT", + "LINE", + "LINE_STRIP", + "TRI_LIST", + "TRI_FAN", + "TRI_STRIP", + "TRI_TYPE_2", + "RECT_LIST", + "3VRT_POINT_LIST", + "3VRT_LINE_LIST", +}; + +static int print_prim_and_flags( int prim ) +{ + int numverts; + + if (NORMAL) + fprintf(stderr, " %s(%x): %s%s%s%s%s%s%s\n", + "prim flags", + prim, + ((prim & 0x30) == RADEON_CP_VC_CNTL_PRIM_WALK_IND) ? "IND," : "", + ((prim & 0x30) == RADEON_CP_VC_CNTL_PRIM_WALK_LIST) ? "LIST," : "", + ((prim & 0x30) == RADEON_CP_VC_CNTL_PRIM_WALK_RING) ? "RING," : "", + (prim & RADEON_CP_VC_CNTL_COLOR_ORDER_RGBA) ? "RGBA," : "BGRA, ", + (prim & RADEON_CP_VC_CNTL_MAOS_ENABLE) ? "MAOS," : "", + (prim & RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE) ? "RADEON," : "", + (prim & RADEON_CP_VC_CNTL_TCL_ENABLE) ? "TCL," : ""); + + if ((prim & 0xf) > RADEON_CP_VC_CNTL_PRIM_TYPE_3VRT_LINE_LIST) { + fprintf(stderr, " *** Bad primitive: %x\n", prim & 0xf); + return -1; + } + + numverts = prim>>16; + + if (NORMAL) + fprintf(stderr, " prim: %s numverts %d\n", primname[prim&0xf], numverts); + + switch (prim & 0xf) { + case RADEON_CP_VC_CNTL_PRIM_TYPE_NONE: + case RADEON_CP_VC_CNTL_PRIM_TYPE_POINT: + if (numverts < 1) { + fprintf(stderr, "Bad nr verts for line %d\n", numverts); + return -1; + } + break; + case RADEON_CP_VC_CNTL_PRIM_TYPE_LINE: + if ((numverts & 1) || numverts == 0) { + fprintf(stderr, "Bad nr verts for line %d\n", numverts); + return -1; + } + break; + case RADEON_CP_VC_CNTL_PRIM_TYPE_LINE_STRIP: + if (numverts < 2) { + fprintf(stderr, "Bad nr verts for line_strip %d\n", numverts); + return -1; + } + break; + case RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST: + case RADEON_CP_VC_CNTL_PRIM_TYPE_3VRT_POINT_LIST: + case RADEON_CP_VC_CNTL_PRIM_TYPE_3VRT_LINE_LIST: + case RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST: + if (numverts % 3 || numverts == 0) { + fprintf(stderr, "Bad nr verts for tri %d\n", numverts); + return -1; + } + break; + case RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN: + case RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_STRIP: + if (numverts < 3) { + fprintf(stderr, "Bad nr verts for strip/fan %d\n", numverts); + return -1; + } + break; + default: + fprintf(stderr, "Bad primitive\n"); + return -1; + } + return 0; +} + +/* build in knowledge about each packet type + */ +static int radeon_emit_packet3( drmRadeonCmdBuffer *cmdbuf ) +{ + int cmdsz; + int *cmd = (int *)cmdbuf->buf; + int *tmp; + int i, stride, size, start; + + cmdsz = 2 + ((cmd[0] & RADEON_CP_PACKET_COUNT_MASK) >> 16); + + if ((cmd[0] & RADEON_CP_PACKET_MASK) != RADEON_CP_PACKET3 || + cmdsz * 4 > cmdbuf->bufsz || + cmdsz > RADEON_CP_PACKET_MAX_DWORDS) { + fprintf(stderr, "Bad packet\n"); + return -EINVAL; + } + + switch( cmd[0] & ~RADEON_CP_PACKET_COUNT_MASK ) { + case RADEON_CP_PACKET3_NOP: + if (NORMAL) + fprintf(stderr, "PACKET3_NOP, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_NEXT_CHAR: + if (NORMAL) + fprintf(stderr, "PACKET3_NEXT_CHAR, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_PLY_NEXTSCAN: + if (NORMAL) + fprintf(stderr, "PACKET3_PLY_NEXTSCAN, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_SET_SCISSORS: + if (NORMAL) + fprintf(stderr, "PACKET3_SET_SCISSORS, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_3D_RNDR_GEN_INDX_PRIM: + if (NORMAL) + fprintf(stderr, "PACKET3_3D_RNDR_GEN_INDX_PRIM, %d dwords\n", + cmdsz); + break; + case RADEON_CP_PACKET3_LOAD_MICROCODE: + if (NORMAL) + fprintf(stderr, "PACKET3_LOAD_MICROCODE, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_WAIT_FOR_IDLE: + if (NORMAL) + fprintf(stderr, "PACKET3_WAIT_FOR_IDLE, %d dwords\n", cmdsz); + break; + + case RADEON_CP_PACKET3_3D_DRAW_VBUF: + if (NORMAL) + fprintf(stderr, "PACKET3_3D_DRAW_VBUF, %d dwords\n", cmdsz); + print_vertex_format(cmd[1]); + print_prim_and_flags(cmd[2]); + break; + + case RADEON_CP_PACKET3_3D_DRAW_IMMD: + if (NORMAL) + fprintf(stderr, "PACKET3_3D_DRAW_IMMD, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_3D_DRAW_INDX: { + int neltdwords; + if (NORMAL) + fprintf(stderr, "PACKET3_3D_DRAW_INDX, %d dwords\n", cmdsz); + print_vertex_format(cmd[1]); + print_prim_and_flags(cmd[2]); + neltdwords = cmd[2]>>16; + neltdwords += neltdwords & 1; + neltdwords /= 2; + if (neltdwords + 3 != cmdsz) + fprintf(stderr, "Mismatch in DRAW_INDX, %d vs cmdsz %d\n", + neltdwords, cmdsz); + break; + } + case RADEON_CP_PACKET3_LOAD_PALETTE: + if (NORMAL) + fprintf(stderr, "PACKET3_LOAD_PALETTE, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_3D_LOAD_VBPNTR: + if (NORMAL) { + fprintf(stderr, "PACKET3_3D_LOAD_VBPNTR, %d dwords\n", cmdsz); + fprintf(stderr, " nr arrays: %d\n", cmd[1]); + } + + if (cmd[1]/2 + cmd[1]%2 != cmdsz - 3) { + fprintf(stderr, " ****** MISMATCH %d/%d *******\n", + cmd[1]/2 + cmd[1]%2 + 3, cmdsz); + return -EINVAL; + } + + if (NORMAL) { + tmp = cmd+2; + for (i = 0 ; i < cmd[1] ; i++) { + if (i & 1) { + stride = (tmp[0]>>24) & 0xff; + size = (tmp[0]>>16) & 0xff; + start = tmp[2]; + tmp += 3; + } + else { + stride = (tmp[0]>>8) & 0xff; + size = (tmp[0]) & 0xff; + start = tmp[1]; + } + fprintf(stderr, " array %d: start 0x%x vsize %d vstride %d\n", + i, start, size, stride ); + } + } + break; + case RADEON_CP_PACKET3_CNTL_PAINT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_PAINT, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_CNTL_BITBLT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_BITBLT, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_CNTL_SMALLTEXT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_SMALLTEXT, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_CNTL_HOSTDATA_BLT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_HOSTDATA_BLT, %d dwords\n", + cmdsz); + break; + case RADEON_CP_PACKET3_CNTL_POLYLINE: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_POLYLINE, %d dwords\n", cmdsz); + break; + case RADEON_CP_PACKET3_CNTL_POLYSCANLINES: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_POLYSCANLINES, %d dwords\n", + cmdsz); + break; + case RADEON_CP_PACKET3_CNTL_PAINT_MULTI: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_PAINT_MULTI, %d dwords\n", + cmdsz); + break; + case RADEON_CP_PACKET3_CNTL_BITBLT_MULTI: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_BITBLT_MULTI, %d dwords\n", + cmdsz); + break; + case RADEON_CP_PACKET3_CNTL_TRANS_BITBLT: + if (NORMAL) + fprintf(stderr, "PACKET3_CNTL_TRANS_BITBLT, %d dwords\n", + cmdsz); + break; + default: + fprintf(stderr, "UNKNOWN PACKET, %d dwords\n", cmdsz); + break; + } + + cmdbuf->buf += cmdsz * 4; + cmdbuf->bufsz -= cmdsz * 4; + return 0; +} + + +/* Check cliprects for bounds, then pass on to above: + */ +static int radeon_emit_packet3_cliprect( drmRadeonCmdBuffer *cmdbuf ) +{ + XF86DRIClipRectRec *boxes = (XF86DRIClipRectRec *)cmdbuf->boxes; + int i = 0; + + if (VERBOSE && total_changed) { + dump_state(); + total_changed = 0; + } + else fprintf(stderr, "total_changed zero\n"); + + if (NORMAL) { + do { + if ( i < cmdbuf->nbox ) { + fprintf(stderr, "Emit box %d/%d %d,%d %d,%d\n", + i, cmdbuf->nbox, + boxes[i].x1, boxes[i].y1, boxes[i].x2, boxes[i].y2); + } + } while ( ++i < cmdbuf->nbox ); + } + + if (cmdbuf->nbox == 1) + cmdbuf->nbox = 0; + + return radeon_emit_packet3( cmdbuf ); +} + + +int radeonSanityCmdBuffer( radeonContextPtr rmesa, + int nbox, + XF86DRIClipRectRec *boxes ) +{ + int idx; + drmRadeonCmdBuffer cmdbuf; + drmRadeonCmdHeader header; + static int inited = 0; + + if (!inited) { + init_regs(); + inited = 1; + } + + cmdbuf.buf = rmesa->store.cmd_buf; + cmdbuf.bufsz = rmesa->store.cmd_used; + cmdbuf.boxes = (drmClipRect *)boxes; + cmdbuf.nbox = nbox; + + while ( cmdbuf.bufsz >= sizeof(header) ) { + + header.i = *(int *)cmdbuf.buf; + cmdbuf.buf += sizeof(header); + cmdbuf.bufsz -= sizeof(header); + + switch (header.header.cmd_type) { + case RADEON_CMD_PACKET: + if (radeon_emit_packets( header, &cmdbuf )) { + fprintf(stderr,"radeon_emit_packets failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_SCALARS: + if (radeon_emit_scalars( header, &cmdbuf )) { + fprintf(stderr,"radeon_emit_scalars failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_SCALARS2: + if (radeon_emit_scalars2( header, &cmdbuf )) { + fprintf(stderr,"radeon_emit_scalars failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_VECTORS: + if (radeon_emit_vectors( header, &cmdbuf )) { + fprintf(stderr,"radeon_emit_vectors failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_DMA_DISCARD: + idx = header.dma.buf_idx; + if (NORMAL) + fprintf(stderr, "RADEON_CMD_DMA_DISCARD buf %d\n", idx); + bufs++; + break; + + case RADEON_CMD_PACKET3: + if (radeon_emit_packet3( &cmdbuf )) { + fprintf(stderr,"radeon_emit_packet3 failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_PACKET3_CLIP: + if (radeon_emit_packet3_cliprect( &cmdbuf )) { + fprintf(stderr,"radeon_emit_packet3_clip failed\n"); + return -EINVAL; + } + break; + + case RADEON_CMD_WAIT: + break; + + default: + fprintf(stderr,"bad cmd_type %d at %p\n", + header.header.cmd_type, + cmdbuf.buf - sizeof(header)); + return -EINVAL; + } + } + + if (0) + { + static int n = 0; + n++; + if (n == 10) { + fprintf(stderr, "Bufs %d Total emitted %d real changes %d (%.2f%%)\n", + bufs, + total, total_changed, + ((float)total_changed/(float)total*100.0)); + fprintf(stderr, "Total emitted per buf: %.2f\n", + (float)total/(float)bufs); + fprintf(stderr, "Real changes per buf: %.2f\n", + (float)total_changed/(float)bufs); + + bufs = n = total = total_changed = 0; + } + } + + return 0; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_sanity.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_sanity.h:1.1 --- /dev/null Thu Feb 27 12:26:32 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_sanity.h Wed Oct 30 07:51:55 2002 @@ -0,0 +1,8 @@ +#ifndef RADEON_SANITY_H +#define RADEON_SANITY_H + +extern int radeonSanityCmdBuffer( radeonContextPtr rmesa, + int nbox, + XF86DRIClipRectRec *boxes ); + +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c:1.3 xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c:1.6 --- xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c:1.3 Wed May 2 11:06:04 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c Mon Dec 16 11:18:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c,v 1.3 2001/05/02 15:06:04 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c,v 1.6 2002/12/16 16:18:58 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -34,16 +34,10 @@ * */ -#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 "radeon_screen.h" #include "mem.h" + #if 1 /* Including xf86PciInfo.h introduces a bunch of errors... */ @@ -51,7 +45,16 @@ #define PCI_CHIP_RADEON_QE 0x5145 #define PCI_CHIP_RADEON_QF 0x5146 #define PCI_CHIP_RADEON_QG 0x5147 -#define PCI_CHIP_RADEON_VE 0x5159 + +#define PCI_CHIP_RADEON_QY 0x5159 +#define PCI_CHIP_RADEON_QZ 0x515A + +#define PCI_CHIP_RADEON_LW 0x4C57 /* mobility 7 - has tcl */ + +#define PCI_CHIP_RADEON_LY 0x4C59 +#define PCI_CHIP_RADEON_LZ 0x4C5A + +#define PCI_CHIP_RV200_QW 0x5157 /* a confusing name for a radeon */ #endif @@ -62,15 +65,94 @@ radeonScreenPtr radeonScreen; RADEONDRIPtr radeonDRIPriv = (RADEONDRIPtr)sPriv->pDevPriv; + /* Check the DRI version */ + { + int major, minor, patch; + if ( XF86DRIQueryVersion( sPriv->display, &major, &minor, &patch ) ) { + if ( major != 4 || minor < 0 ) { + __driUtilMessage( "Radeon DRI driver expected DRI version 4.0.x " + "but got version %d.%d.%d", + major, minor, patch ); + return NULL; + } + } + } + + /* Check that the DDX driver version is compatible */ + if ( sPriv->ddxMajor != 4 || + sPriv->ddxMinor < 0 ) { + __driUtilMessage( "Radeon DRI driver expected DDX driver version 4.0.x " + "but got version %d.%d.%d", + sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch ); + return NULL; + } + + /* Check that the DRM driver version is compatible */ + /* KW: Check minor number here too -- compatibility mode is broken + * atm. + */ + if ( sPriv->drmMajor != 1 || + sPriv->drmMinor < 3) { + __driUtilMessage( "Radeon DRI driver expected DRM driver version 1.3.x " + "or newer but got version %d.%d.%d", + sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + return NULL; + } + + /* Allocate the private area */ radeonScreen = (radeonScreenPtr) CALLOC( sizeof(*radeonScreen) ); - if ( !radeonScreen ) return NULL; + if ( !radeonScreen ) { + __driUtilMessage("%s: CALLOC radeonScreen struct failed", + __FUNCTION__); + return NULL; + } + if ( sPriv->drmMinor < 3 || + getenv("RADEON_COMPAT")) { + fprintf( stderr, "Radeon DRI driver:\n\t" + "Compatibility mode for DRM driver version %d.%d.%d\n\t" + "TCL will be disabled, expect reduced performance\n\t" + "(prefer DRM radeon.o 1.3.x or newer)\n\t", + sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + } + + /* This is first since which regions we map depends on whether or * not we are using a PCI card. */ radeonScreen->IsPCI = radeonDRIPriv->IsPCI; + if (sPriv->drmMinor >= 3) { + int ret; + drmRadeonGetParam gp; + + gp.param = RADEON_PARAM_AGP_BUFFER_OFFSET; + gp.value = &radeonScreen->agp_buffer_offset; + + ret = drmCommandWriteRead( sPriv->fd, DRM_RADEON_GETPARAM, + &gp, sizeof(gp)); + if (ret) { + FREE( radeonScreen ); + fprintf(stderr, "drmRadeonGetParam (RADEON_PARAM_AGP_BUFFER_OFFSET): %d\n", ret); + return NULL; + } + + if (sPriv->drmMinor >= 6) { + gp.param = RADEON_PARAM_IRQ_NR; + gp.value = &radeonScreen->irq; + + ret = drmCommandWriteRead( sPriv->fd, DRM_RADEON_GETPARAM, + &gp, sizeof(gp)); + if (ret) { + FREE( radeonScreen ); + fprintf(stderr, "drmRadeonGetParam (RADEON_PARAM_IRQ_NR): %d\n", ret); + return NULL; + } + } + + } + radeonScreen->mmio.handle = radeonDRIPriv->registerHandle; radeonScreen->mmio.size = radeonDRIPriv->registerSize; if ( drmMap( sPriv->fd, @@ -78,6 +160,7 @@ radeonScreen->mmio.size, &radeonScreen->mmio.map ) ) { FREE( radeonScreen ); + __driUtilMessage("radeonCreateScreen(): drmMap failed\n"); return NULL; } @@ -89,6 +172,7 @@ &radeonScreen->status.map ) ) { drmUnmap( radeonScreen->mmio.map, radeonScreen->mmio.size ); FREE( radeonScreen ); + __driUtilMessage("radeonCreateScreen(): drmMap (2) failed\n"); return NULL; } radeonScreen->scratch = (__volatile__ CARD32 *) @@ -99,6 +183,7 @@ drmUnmap( radeonScreen->status.map, radeonScreen->status.size ); drmUnmap( radeonScreen->mmio.map, radeonScreen->mmio.size ); FREE( radeonScreen ); + __driUtilMessage("radeonCreateScreen(): drmMapBufs failed\n"); return NULL; } @@ -113,21 +198,26 @@ drmUnmap( radeonScreen->status.map, radeonScreen->status.size ); drmUnmap( radeonScreen->mmio.map, radeonScreen->mmio.size ); FREE( radeonScreen ); + __driUtilMessage("radeonCreateScreen(): IsPCI failed\n"); return NULL; } } - + radeonScreen->chipset = 0; switch ( radeonDRIPriv->deviceID ) { + default: + fprintf(stderr, "unknown chip id, assuming full radeon support\n"); 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; + case PCI_CHIP_RV200_QW: + case PCI_CHIP_RADEON_LW: + radeonScreen->chipset |= RADEON_CHIPSET_TCL; + case PCI_CHIP_RADEON_QY: + case PCI_CHIP_RADEON_QZ: + case PCI_CHIP_RADEON_LY: + case PCI_CHIP_RADEON_LZ: break; } @@ -162,16 +252,6 @@ 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; } @@ -180,6 +260,9 @@ void radeonDestroyScreen( __DRIscreenPrivate *sPriv ) { radeonScreenPtr radeonScreen = (radeonScreenPtr)sPriv->private; + + if (!radeonScreen) + return; if ( !radeonScreen->IsPCI ) { drmUnmap( radeonScreen->agpTextures.map, Index: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h:1.5 --- xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h:1.2 Wed Mar 21 11:14:25 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h Mon Dec 16 11:18:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h,v 1.2 2001/03/21 16:14:25 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h,v 1.5 2002/12/16 16:18:58 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -39,28 +39,41 @@ #ifdef GLX_DIRECT_RENDERING +/* + * IMPORTS: these headers contain all the DRI, X and kernel-related + * definitions that we need. + */ +#include "dri_util.h" +#include "radeon_common.h" +#include "radeon_dri.h" +#include "radeon_reg.h" #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; +/* chipset features */ +#define RADEON_CHIPSET_TCL (1 << 0) + typedef struct { - GLint chipset; - GLint cpp; - GLint IsPCI; /* Current card is a PCI card */ - GLint AGPMode; - - GLuint frontOffset; - GLuint frontPitch; - GLuint backOffset; - GLuint backPitch; + int chipset; + int cpp; + int IsPCI; /* Current card is a PCI card */ + int AGPMode; + unsigned int irq; /* IRQ number (0 means none) */ + + unsigned int frontOffset; + unsigned int frontPitch; + unsigned int backOffset; + unsigned int backPitch; - GLuint depthOffset; - GLuint depthPitch; + unsigned int depthOffset; + unsigned int depthPitch; /* Shared texture data */ int numTexHeaps; @@ -68,10 +81,6 @@ 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; @@ -82,6 +91,7 @@ __DRIscreenPrivate *driScreen; unsigned int sarea_priv_offset; + unsigned int agp_buffer_offset; /* offset in card memory space */ } radeonScreenRec, *radeonScreenPtr; extern radeonScreenPtr radeonCreateScreen( __DRIscreenPrivate *sPriv ); Index: xc/lib/GL/mesa/src/drv/radeon/radeon_span.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_span.c:1.4 xc/lib/GL/mesa/src/drv/radeon/radeon_span.c:1.6 --- xc/lib/GL/mesa/src/drv/radeon/radeon_span.c:1.4 Tue Apr 10 12:07:53 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_span.c Wed Oct 30 07:51:56 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_span.c,v 1.4 2001/04/10 16:07:53 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_span.c,v 1.6 2002/10/30 12:51:56 alanh Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -31,7 +31,7 @@ * Authors: * Kevin E. Martin * Gareth Hughes - * Keith Whitwell + * Keith Whitwell * */ @@ -39,22 +39,25 @@ #include "radeon_ioctl.h" #include "radeon_state.h" #include "radeon_span.h" +#include "radeon_tex.h" +#include "swrast/swrast.h" + #define DBG 0 #define LOCAL_VARS \ radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ radeonScreenPtr radeonScreen = rmesa->radeonScreen; \ - __DRIscreenPrivate *sPriv = rmesa->driScreen; \ - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + __DRIscreenPrivate *sPriv = rmesa->dri.screen; \ + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; \ GLuint pitch = radeonScreen->frontPitch * radeonScreen->cpp; \ GLuint height = dPriv->h; \ char *buf = (char *)(sPriv->pFB + \ - rmesa->drawOffset + \ + rmesa->state.color.drawOffset + \ (dPriv->x * radeonScreen->cpp) + \ (dPriv->y * pitch)); \ char *read_buf = (char *)(sPriv->pFB + \ - rmesa->readOffset + \ + rmesa->state.pixel.readOffset + \ (dPriv->x * radeonScreen->cpp) + \ (dPriv->y * pitch)); \ GLuint p; \ @@ -63,8 +66,8 @@ #define LOCAL_DEPTH_VARS \ radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ radeonScreenPtr radeonScreen = rmesa->radeonScreen; \ - __DRIscreenPrivate *sPriv = rmesa->driScreen; \ - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + __DRIscreenPrivate *sPriv = rmesa->dri.screen; \ + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; \ GLuint height = dPriv->h; \ GLuint xo = dPriv->x; \ GLuint yo = dPriv->y; \ @@ -73,7 +76,6 @@ #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)) @@ -92,15 +94,11 @@ #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_LOCK() #define HW_CLIPLOOP() \ do { \ - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \ + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; \ int _nc = dPriv->numClipRects; \ \ while ( _nc-- ) { \ @@ -113,8 +111,7 @@ } \ } while (0) -#define HW_UNLOCK() \ - UNLOCK_HARDWARE( rmesa ) +#define HW_UNLOCK() @@ -124,6 +121,9 @@ /* 16 bit, RGB565 color spanline and pixel functions */ +#define INIT_MONO_PIXEL(p, color) \ + p = PACK_COLOR_565( color[0], color[1], color[2] ) + #define WRITE_RGBA( _x, _y, r, g, b, a ) \ *(GLushort *)(buf + _x*2 + _y*pitch) = ((((int)r & 0xf8) << 8) | \ (((int)g & 0xfc) << 3) | \ @@ -135,13 +135,10 @@ #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 >> 8) & 0xf8) * 255 / 0xf8; \ + rgba[1] = ((p >> 3) & 0xfc) * 255 / 0xfc; \ + rgba[2] = ((p << 3) & 0xf8) * 255 / 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 @@ -149,6 +146,10 @@ /* 32 bit, ARGB8888 color spanline and pixel functions */ +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = PACK_COLOR_8888( color[3], color[0], color[1], color[2] ) + #define WRITE_RGBA( _x, _y, r, g, b, a ) \ *(GLuint *)(buf + _x*4 + _y*pitch) = ((b << 0) | \ (g << 8) | \ @@ -260,7 +261,6 @@ * Stencil buffer */ -#if 0 /* 24 bit depth, 8 bit stencil depthbuffer functions */ #define WRITE_STENCIL( _x, _y, d ) \ @@ -282,69 +282,115 @@ #define TAG(x) radeon##x##_24_8 #include "stenciltmp.h" -#endif -void radeonDDInitSpanFuncs( GLcontext *ctx ) +static void radeonSetReadBuffer( GLcontext *ctx, + GLframebuffer *colorBuffer, + GLenum mode ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + switch ( mode ) { + case GL_FRONT_LEFT: + if ( rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.pixel.readOffset = rmesa->radeonScreen->backOffset; + rmesa->state.pixel.readPitch = rmesa->radeonScreen->backPitch; + } else { + rmesa->state.pixel.readOffset = rmesa->radeonScreen->frontOffset; + rmesa->state.pixel.readPitch = rmesa->radeonScreen->frontPitch; + } + break; + case GL_BACK_LEFT: + if ( rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.pixel.readOffset = rmesa->radeonScreen->frontOffset; + rmesa->state.pixel.readPitch = rmesa->radeonScreen->frontPitch; + } else { + rmesa->state.pixel.readOffset = rmesa->radeonScreen->backOffset; + rmesa->state.pixel.readPitch = rmesa->radeonScreen->backPitch; + } + break; + default: + assert(0); + break; + } +} + +/* Move locking out to get reasonable span performance (10x better + * than doing this in HW_LOCK above). WaitForIdle() is the main + * culprit. + */ + +static void radeonSpanRenderStart( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + RADEON_FIREVERTICES( rmesa ); + LOCK_HARDWARE( rmesa ); + radeonWaitForIdleLocked( rmesa ); +} + +static void radeonSpanRenderFinish( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + _swrast_flush( ctx ); + UNLOCK_HARDWARE( rmesa ); +} + +void radeonInitSpanFuncs( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); + + swdd->SetReadBuffer = radeonSetReadBuffer; + 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; + swdd->WriteRGBASpan = radeonWriteRGBASpan_RGB565; + swdd->WriteRGBSpan = radeonWriteRGBSpan_RGB565; + swdd->WriteMonoRGBASpan = radeonWriteMonoRGBASpan_RGB565; + swdd->WriteRGBAPixels = radeonWriteRGBAPixels_RGB565; + swdd->WriteMonoRGBAPixels = radeonWriteMonoRGBAPixels_RGB565; + swdd->ReadRGBASpan = radeonReadRGBASpan_RGB565; + swdd->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; + swdd->WriteRGBASpan = radeonWriteRGBASpan_ARGB8888; + swdd->WriteRGBSpan = radeonWriteRGBSpan_ARGB8888; + swdd->WriteMonoRGBASpan = radeonWriteMonoRGBASpan_ARGB8888; + swdd->WriteRGBAPixels = radeonWriteRGBAPixels_ARGB8888; + swdd->WriteMonoRGBAPixels = radeonWriteMonoRGBAPixels_ARGB8888; + swdd->ReadRGBASpan = radeonReadRGBASpan_ARGB8888; + swdd->ReadRGBAPixels = radeonReadRGBAPixels_ARGB8888; break; default: break; } - switch ( rmesa->glCtx->Visual->DepthBits ) { + 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; + swdd->ReadDepthSpan = radeonReadDepthSpan_16; + swdd->WriteDepthSpan = radeonWriteDepthSpan_16; + swdd->ReadDepthPixels = radeonReadDepthPixels_16; + swdd->WriteDepthPixels = radeonWriteDepthPixels_16; + break; + + case 24: + swdd->ReadDepthSpan = radeonReadDepthSpan_24_8; + swdd->WriteDepthSpan = radeonWriteDepthSpan_24_8; + swdd->ReadDepthPixels = radeonReadDepthPixels_24_8; + swdd->WriteDepthPixels = radeonWriteDepthPixels_24_8; + + swdd->ReadStencilSpan = radeonReadStencilSpan_24_8; + swdd->WriteStencilSpan = radeonWriteStencilSpan_24_8; + swdd->ReadStencilPixels = radeonReadStencilPixels_24_8; + swdd->WriteStencilPixels = radeonWriteStencilPixels_24_8; break; + + default: + 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; + swdd->SpanRenderStart = radeonSpanRenderStart; + swdd->SpanRenderFinish = radeonSpanRenderFinish; } Index: xc/lib/GL/mesa/src/drv/radeon/radeon_span.h diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_span.h:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_span.h:1.2 --- xc/lib/GL/mesa/src/drv/radeon/radeon_span.h:1.1 Sun Jan 7 20:07:28 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_span.h Fri Feb 22 16:45:01 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_span.h,v 1.1 2001/01/08 01:07:28 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_span.h,v 1.2 2002/02/22 21:45:01 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -39,7 +39,7 @@ #ifdef GLX_DIRECT_RENDERING -extern void radeonDDInitSpanFuncs( GLcontext *ctx ); +extern void radeonInitSpanFuncs( GLcontext *ctx ); #endif #endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_state.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_state.c:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_state.c:1.8 --- xc/lib/GL/mesa/src/drv/radeon/radeon_state.c:1.2 Wed Mar 21 11:14:25 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_state.c Mon Dec 16 11:18:58 2002 @@ -1,222 +1,240 @@ -/* $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. - -**************************************************************************/ - +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_state.c,v 1.8 2002/12/16 16:18:58 dawes Exp $ */ /* - * Authors: - * Kevin E. Martin - * Gareth Hughes - * Keith Whitwell + * Copyright 2000, 2001 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 + * 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: + * 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_state.h" +#include "radeon_tcl.h" #include "radeon_tex.h" +#include "radeon_swtcl.h" +#include "radeon_vtxfmt.h" +#include "mem.h" #include "mmath.h" -#include "pb.h" #include "enums.h" +#include "colormac.h" +#include "light.h" +#include "api_arrayelt.h" + +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" +#include "swrast_setup/swrast_setup.h" + + +#define MODEL_PROJ 0 +#define MODEL 1 +#define MODEL_IT 2 +#define TEXMAT_0 3 +#define TEXMAT_1 4 +#define TEXMAT_2 5 /* ============================================================= * Alpha blending */ -static void radeonUpdateAlphaMode( GLcontext *ctx ) +static void radeonAlphaFunc( GLcontext *ctx, GLenum func, GLchan ref ) { 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); + int pp_misc = rmesa->hw.ctx.cmd[CTX_PP_MISC]; - 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; - } + RADEON_STATECHANGE( rmesa, ctx ); - 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; - } + pp_misc &= ~(RADEON_ALPHA_TEST_OP_MASK | RADEON_REF_ALPHA_MASK); + pp_misc |= (ref & RADEON_REF_ALPHA_MASK); - c |= RADEON_ALPHA_BLEND_ENABLE; - } else { - c &= ~RADEON_ALPHA_BLEND_ENABLE; + switch ( func ) { + case GL_NEVER: + pp_misc |= RADEON_ALPHA_TEST_FAIL; + break; + case GL_LESS: + pp_misc |= RADEON_ALPHA_TEST_LESS; + break; + case GL_EQUAL: + pp_misc |= RADEON_ALPHA_TEST_EQUAL; + break; + case GL_LEQUAL: + pp_misc |= RADEON_ALPHA_TEST_LEQUAL; + break; + case GL_GREATER: + pp_misc |= RADEON_ALPHA_TEST_GREATER; + break; + case GL_NOTEQUAL: + pp_misc |= RADEON_ALPHA_TEST_NEQUAL; + break; + case GL_GEQUAL: + pp_misc |= RADEON_ALPHA_TEST_GEQUAL; + break; + case GL_ALWAYS: + pp_misc |= RADEON_ALPHA_TEST_PASS; + break; } - 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; - } + rmesa->hw.ctx.cmd[CTX_PP_MISC] = pp_misc; } -static void radeonDDAlphaFunc( GLcontext *ctx, GLenum func, GLclampf ref ) +static void radeonBlendEquation( GLcontext *ctx, GLenum mode ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint b = rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] & ~RADEON_COMB_FCN_MASK; + GLboolean fallback = GL_FALSE; - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_ALPHA; -} + switch ( mode ) { + case GL_FUNC_ADD: + case GL_LOGIC_OP: + b |= RADEON_COMB_FCN_ADD_CLAMP; + break; -static void radeonDDBlendEquation( GLcontext *ctx, GLenum mode ) -{ - radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + case GL_FUNC_SUBTRACT: + b |= RADEON_COMB_FCN_SUB_CLAMP; + break; - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_ALPHA; + default: + fallback = GL_TRUE; + break; + } - if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) - rmesa->Fallback |= RADEON_FALLBACK_LOGICOP; - else - rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; + FALLBACK( rmesa, RADEON_FALLBACK_BLEND_EQ, fallback ); + if ( !fallback ) { + RADEON_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] = b; + if ( ctx->Color.ColorLogicOpEnabled ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_ROP_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_ROP_ENABLE; + } + } } -static void radeonDDBlendFunc( GLcontext *ctx, GLenum sfactor, GLenum dfactor ) +static void radeonBlendFunc( GLcontext *ctx, GLenum sfactor, GLenum dfactor ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint b = rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] & + ~(RADEON_SRC_BLEND_MASK | RADEON_DST_BLEND_MASK); + GLboolean fallback = GL_FALSE; + + 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_COLOR: + b |= RADEON_SRC_BLEND_GL_SRC_COLOR; + break; + case GL_ONE_MINUS_SRC_COLOR: + b |= RADEON_SRC_BLEND_GL_ONE_MINUS_SRC_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; + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + fallback = GL_TRUE; + break; + } - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_ALPHA; + 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_COLOR: + b |= RADEON_DST_BLEND_GL_DST_COLOR; + break; + case GL_ONE_MINUS_DST_COLOR: + b |= RADEON_DST_BLEND_GL_ONE_MINUS_DST_COLOR; + 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; + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + fallback = GL_TRUE; + break; + } + + FALLBACK( rmesa, RADEON_FALLBACK_BLEND_FUNC, fallback ); + if ( !fallback ) { + RADEON_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] = b; + } } -static void radeonDDBlendFuncSeparate( GLcontext *ctx, - GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA ) +static void radeonBlendFuncSeparate( GLcontext *ctx, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA ) { - radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_ALPHA; + radeonBlendFunc( ctx, sfactorRGB, dfactorRGB ); } @@ -224,89 +242,66 @@ * Depth testing */ -static void radeonUpdateZMode( GLcontext *ctx ) +static void radeonDepthFunc( GLcontext *ctx, GLenum func ) { 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; - } + RADEON_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &= ~RADEON_Z_TEST_MASK; - 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; + switch ( ctx->Depth.Func ) { + case GL_NEVER: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_TEST_NEVER; + break; + case GL_LESS: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_TEST_LESS; + break; + case GL_EQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_TEST_EQUAL; + break; + case GL_LEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_TEST_LEQUAL; + break; + case GL_GREATER: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_TEST_GREATER; + break; + case GL_NOTEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_TEST_NEQUAL; + break; + case GL_GEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_TEST_GEQUAL; + break; + case GL_ALWAYS: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_TEST_ALWAYS; + break; } } -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 ) +static void radeonDepthMask( GLcontext *ctx, GLboolean flag ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + RADEON_STATECHANGE( rmesa, ctx ); - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_DEPTH; + if ( ctx->Depth.Mask ) { + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_Z_WRITE_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &= ~RADEON_Z_WRITE_ENABLE; + } } -static void radeonDDClearDepth( GLcontext *ctx, GLclampd d ) +static void radeonClearDepth( GLcontext *ctx, GLclampd d ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint format = (rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] & + RADEON_DEPTH_FORMAT_MASK); - switch ( rmesa->setup.rb3d_zstencilcntl & RADEON_DEPTH_FORMAT_MASK ) { + switch ( format ) { case RADEON_DEPTH_FORMAT_16BIT_INT_Z: - rmesa->ClearDepth = d * 0x0000ffff; + rmesa->state.depth.clear = d * 0x0000ffff; break; case RADEON_DEPTH_FORMAT_24BIT_INT_Z: - rmesa->ClearDepth = d * 0x00ffffff; + rmesa->state.depth.clear = d * 0x00ffffff; break; } } @@ -315,88 +310,190 @@ /* ============================================================= * Fog */ + -static void radeonUpdateFogAttrib( GLcontext *ctx ) +static void radeonFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - GLuint p = rmesa->setup.pp_cntl; - GLubyte c[4]; - GLuint col; + union { int i; float f; } c, d; + GLchan col[4]; - if ( ctx->FogMode == FOG_FRAGMENT ) { - p |= RADEON_FOG_ENABLE; - } else { - p &= ~RADEON_FOG_ENABLE; - } + c.i = rmesa->hw.fog.cmd[FOG_C]; + d.i = rmesa->hw.fog.cmd[FOG_D]; - 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; + switch (pname) { + case GL_FOG_MODE: + if (!ctx->Fog.Enabled) + return; + RADEON_STATECHANGE(rmesa, tcl); + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~RADEON_TCL_FOG_MASK; + switch (ctx->Fog.Mode) { + case GL_LINEAR: + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= RADEON_TCL_FOG_LINEAR; + if (ctx->Fog.Start == ctx->Fog.End) { + c.f = 1.0F; + d.f = 1.0F; + } + else { + c.f = ctx->Fog.End/(ctx->Fog.End-ctx->Fog.Start); + d.f = 1.0/(ctx->Fog.End-ctx->Fog.Start); + } + break; + case GL_EXP: + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= RADEON_TCL_FOG_EXP; + c.f = 0.0; + d.f = ctx->Fog.Density; + break; + case GL_EXP2: + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= RADEON_TCL_FOG_EXP2; + c.f = 0.0; + d.f = -(ctx->Fog.Density * ctx->Fog.Density); + break; + default: + return; + } + break; + case GL_FOG_DENSITY: + switch (ctx->Fog.Mode) { + case GL_EXP: + c.f = 0.0; + d.f = ctx->Fog.Density; + break; + case GL_EXP2: + c.f = 0.0; + d.f = -(ctx->Fog.Density * ctx->Fog.Density); + break; + default: + break; + } + break; + case GL_FOG_START: + case GL_FOG_END: + if (ctx->Fog.Mode == GL_LINEAR) { + if (ctx->Fog.Start == ctx->Fog.End) { + c.f = 1.0F; + d.f = 1.0F; + } else { + c.f = ctx->Fog.End/(ctx->Fog.End-ctx->Fog.Start); + d.f = 1.0/(ctx->Fog.End-ctx->Fog.Start); + } + } + break; + case GL_FOG_COLOR: + RADEON_STATECHANGE( rmesa, ctx ); + UNCLAMPED_FLOAT_TO_RGB_CHAN( col, ctx->Fog.Color ); + rmesa->hw.ctx.cmd[CTX_PP_FOG_COLOR] = + radeonPackColor( 4, col[0], col[1], col[2], 0 ); + break; + case GL_FOG_COORDINATE_SOURCE_EXT: + /* What to do? + */ + break; + default: + return; } - if ( rmesa->setup.pp_cntl != p ) { - rmesa->setup.pp_cntl = p; - rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + + if (c.i != rmesa->hw.fog.cmd[FOG_C] || d.i != rmesa->hw.fog.cmd[FOG_D]) { + RADEON_STATECHANGE( rmesa, fog ); + rmesa->hw.fog.cmd[FOG_C] = c.i; + rmesa->hw.fog.cmd[FOG_D] = d.i; } } -static void radeonDDFogfv( GLcontext *ctx, GLenum pname, const GLfloat *param ) -{ - radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + +/* ============================================================= + * Scissoring + */ + - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_FOG; +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; } -/* ============================================================= - * Clipping - */ +void radeonRecalcScissorRects( radeonContextPtr rmesa ) +{ + XF86DRIClipRectPtr out; + int i; + + /* Grow cliprect store? + */ + if (rmesa->state.scissor.numAllocedClipRects < rmesa->numClipRects) { + while (rmesa->state.scissor.numAllocedClipRects < rmesa->numClipRects) { + rmesa->state.scissor.numAllocedClipRects += 1; /* zero case */ + rmesa->state.scissor.numAllocedClipRects *= 2; + } -static void radeonUpdateClipping( GLcontext *ctx ) + if (rmesa->state.scissor.pClipRects) + FREE(rmesa->state.scissor.pClipRects); + + rmesa->state.scissor.pClipRects = + MALLOC( rmesa->state.scissor.numAllocedClipRects * + sizeof(XF86DRIClipRectRec) ); + + if (!rmesa->state.scissor.numAllocedClipRects) { +/* FALLBACK( rmesa, RADEON_FALLBACK_MEMORY, GL_TRUE ); */ + rmesa->state.scissor.numAllocedClipRects = 0; + return; + } + } + + out = rmesa->state.scissor.pClipRects; + rmesa->state.scissor.numClipRects = 0; + + for ( i = 0 ; i < rmesa->numClipRects ; i++ ) { + if ( intersect_rect( out, + &rmesa->pClipRects[i], + &rmesa->state.scissor.rect ) ) { + rmesa->state.scissor.numClipRects++; + out++; + } + } +} + + +static void radeonUpdateScissor( 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 ( rmesa->dri.drawable ) { + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; - 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; - } - } + int x = ctx->Scissor.X; + int y = dPriv->h - ctx->Scissor.Y - ctx->Scissor.Height; + int w = ctx->Scissor.X + ctx->Scissor.Width - 1; + int h = dPriv->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->state.scissor.rect.x1 = x + dPriv->x; + rmesa->state.scissor.rect.y1 = y + dPriv->y; + rmesa->state.scissor.rect.x2 = w + dPriv->x + 1; + rmesa->state.scissor.rect.y2 = h + dPriv->y + 1; - rmesa->dirty |= RADEON_UPLOAD_CLIPRECTS; + radeonRecalcScissorRects( rmesa ); } } -static void radeonDDScissor( GLcontext *ctx, - GLint x, GLint y, GLsizei w, GLsizei h ) + +static void radeonScissor( GLcontext *ctx, + GLint x, GLint y, GLsizei w, GLsizei h ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if ( ctx->Scissor.Enabled ) { + RADEON_FIREVERTICES( rmesa ); /* don't pipeline cliprect changes */ + radeonUpdateScissor( ctx ); + } - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_CLIP; } @@ -404,92 +501,169 @@ * Culling */ -static void radeonUpdateCull( GLcontext *ctx ) +static void radeonCullFace( GLcontext *ctx, GLenum unused ) { 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; - } + GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL]; + GLuint t = rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL]; s |= RADEON_FFACE_SOLID | RADEON_BFACE_SOLID; + t &= ~(RADEON_CULL_FRONT | RADEON_CULL_BACK); - if ( ctx->Polygon.CullFlag && ctx->PB->primitive == GL_POLYGON ) { + if ( ctx->Polygon.CullFlag ) { switch ( ctx->Polygon.CullFaceMode ) { case GL_FRONT: s &= ~RADEON_FFACE_SOLID; + t |= RADEON_CULL_FRONT; break; case GL_BACK: s &= ~RADEON_BFACE_SOLID; + t |= RADEON_CULL_BACK; break; case GL_FRONT_AND_BACK: s &= ~(RADEON_FFACE_SOLID | RADEON_BFACE_SOLID); + t |= (RADEON_CULL_FRONT | RADEON_CULL_BACK); break; } } + + if ( rmesa->hw.set.cmd[SET_SE_CNTL] != s ) { + RADEON_STATECHANGE(rmesa, set ); + rmesa->hw.set.cmd[SET_SE_CNTL] = s; + } + + if ( rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] != t ) { + RADEON_STATECHANGE(rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] = t; + } +} + +static void radeonFrontFace( GLcontext *ctx, GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - if ( rmesa->setup.se_cntl != s ) { - rmesa->setup.se_cntl = s; - rmesa->dirty |= RADEON_UPLOAD_CONTEXT | RADEON_UPLOAD_SETUP; + RADEON_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~RADEON_FFACE_CULL_DIR_MASK; + + RADEON_STATECHANGE( rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~RADEON_CULL_FRONT_IS_CCW; + + switch ( mode ) { + case GL_CW: + rmesa->hw.set.cmd[SET_SE_CNTL] |= RADEON_FFACE_CULL_CW; + break; + case GL_CCW: + rmesa->hw.set.cmd[SET_SE_CNTL] |= RADEON_FFACE_CULL_CCW; + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= RADEON_CULL_FRONT_IS_CCW; + break; } } + -static void radeonDDCullFace( GLcontext *ctx, GLenum mode ) +/* ============================================================= + * Line state + */ +static void radeonLineWidth( GLcontext *ctx, GLfloat widthf ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + RADEON_STATECHANGE( rmesa, lin ); + RADEON_STATECHANGE( rmesa, set ); - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_CULL; + /* Line width is stored in U6.4 format. + */ + rmesa->hw.lin.cmd[LIN_SE_LINE_WIDTH] = (GLuint)(widthf * 16.0); + if ( widthf > 1.0 ) { + rmesa->hw.set.cmd[SET_SE_CNTL] |= RADEON_WIDELINE_ENABLE; + } else { + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~RADEON_WIDELINE_ENABLE; + } } -static void radeonDDFrontFace( GLcontext *ctx, GLenum mode ) +static void radeonLineStipple( GLcontext *ctx, GLint factor, GLushort pattern ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_CULL; + RADEON_STATECHANGE( rmesa, lin ); + rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] = + ((((GLuint)factor & 0xff) << 16) | ((GLuint)pattern)); } /* ============================================================= * Masks */ - -static void radeonUpdateMasks( GLcontext *ctx ) +static void radeonColorMask( GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a ) { 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; + if ( rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK] != mask ) { + RADEON_STATECHANGE( rmesa, msk ); + rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK] = mask; } } + + +/* ============================================================= + * Polygon state + */ -static GLboolean radeonDDColorMask( GLcontext *ctx, - GLboolean r, GLboolean g, - GLboolean b, GLboolean a ) +static void radeonPolygonOffset( GLcontext *ctx, + GLfloat factor, GLfloat units ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLfloat constant = units * rmesa->state.depth.scale; - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_MASKS; + RADEON_STATECHANGE( rmesa, zbs ); + rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_FACTOR] = *(GLuint *)&factor; + rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_CONSTANT] = *(GLuint *)&constant; +} - return GL_FALSE; /* This forces the software paths to do colormasking. */ - /* This function will return void when we use Mesa 3.5 */ +static void radeonPolygonStipple( GLcontext *ctx, const GLubyte *mask ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint i; + drmRadeonStipple stipple; + + /* Must flip pattern upside down. + */ + for ( i = 0 ; i < 32 ; i++ ) { + rmesa->state.stipple.mask[31 - i] = ((GLuint *) mask)[i]; + } + + /* TODO: push this into cmd mechanism + */ + RADEON_FIREVERTICES( rmesa ); + LOCK_HARDWARE( rmesa ); + + /* FIXME: Use window x,y offsets into stipple RAM. + */ + stipple.mask = rmesa->state.stipple.mask; + drmCommandWrite( rmesa->dri.fd, DRM_RADEON_STIPPLE, + &stipple, sizeof(drmRadeonStipple) ); + UNLOCK_HARDWARE( rmesa ); +} + +static void radeonPolygonMode( GLcontext *ctx, GLenum face, GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLboolean flag = (ctx->_TriangleCaps & DD_TRI_UNFILLED) != 0; + + /* Can't generally do unfilled via tcl, but some good special + * cases work. + */ + TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_UNFILLED, flag); + if (rmesa->TclFallback) { + radeonChooseRenderState( ctx ); + radeonChooseVertexState( ctx ); + } } @@ -501,35 +675,485 @@ * sense to break them out of the core texture state update routines. */ -static void radeonDDLightModelfv( GLcontext *ctx, GLenum pname, - const GLfloat *param ) +/* Examine lighting and texture state to determine if separate specular + * should be enabled. + */ +static void radeonUpdateSpecular( GLcontext *ctx ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + CARD32 p = rmesa->hw.ctx.cmd[CTX_PP_CNTL]; - if ( pname == GL_LIGHT_MODEL_COLOR_CONTROL ) { - GLuint p = rmesa->setup.pp_cntl; + if ( ctx->_TriangleCaps & DD_SEPARATE_SPECULAR ) { + p |= RADEON_SPECULAR_ENABLE; + } else { + p &= ~RADEON_SPECULAR_ENABLE; + } - FLUSH_BATCH( rmesa ); + if ( rmesa->hw.ctx.cmd[CTX_PP_CNTL] != p ) { + RADEON_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_PP_CNTL] = p; + } - if ( ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR && - ctx->Light.Enabled && ctx->Texture.ReallyEnabled) { - p |= RADEON_SPECULAR_ENABLE; + /* Bizzare: have to leave lighting enabled to get fog. + */ + RADEON_STATECHANGE( rmesa, tcl ); + if ((ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) { + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] |= RADEON_TCL_COMPUTE_SPECULAR; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] |= RADEON_TCL_COMPUTE_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_SPEC; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_LIGHTING_ENABLE; + } + else if (ctx->Fog.Enabled) { + if (ctx->Light.Enabled) { + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] |= RADEON_TCL_COMPUTE_SPECULAR; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] |= RADEON_TCL_COMPUTE_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_SPEC; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_LIGHTING_ENABLE; } else { - p &= ~RADEON_SPECULAR_ENABLE; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] |= RADEON_TCL_COMPUTE_SPECULAR; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] &= ~RADEON_TCL_COMPUTE_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_SPEC; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_LIGHTING_ENABLE; + } + } + else if (ctx->Light.Enabled) { + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] &= ~RADEON_TCL_COMPUTE_SPECULAR; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] |= RADEON_TCL_COMPUTE_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] &= ~RADEON_TCL_VTX_PK_SPEC; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_LIGHTING_ENABLE; + } else if (ctx->Fog.ColorSumEnabled ) { + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] &= ~RADEON_TCL_COMPUTE_SPECULAR; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] &= ~RADEON_TCL_COMPUTE_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_SPEC; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] &= ~RADEON_LIGHTING_ENABLE; + } else { + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] &= ~RADEON_TCL_COMPUTE_SPECULAR; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] &= ~RADEON_TCL_COMPUTE_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] &= ~RADEON_TCL_VTX_PK_SPEC; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_PK_DIFFUSE; + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] &= ~RADEON_LIGHTING_ENABLE; + } + + /* Update vertex/render formats + */ + if (rmesa->TclFallback) { + radeonChooseRenderState( ctx ); + radeonChooseVertexState( ctx ); + } +} + + +/* ============================================================= + * Materials + */ + + +/* Update on colormaterial, material emmissive/ambient, + * lightmodel.globalambient + */ +static void update_global_ambient( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + float *fcmd = (float *)RADEON_DB_STATE( glt ); + + /* Need to do more if both emmissive & ambient are PREMULT: + */ + if ((rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] & + ((3 << RADEON_EMISSIVE_SOURCE_SHIFT) | + (3 << RADEON_AMBIENT_SOURCE_SHIFT))) == 0) + { + COPY_3V( &fcmd[GLT_RED], + ctx->Light.Material[0].Emission); + ACC_SCALE_3V( &fcmd[GLT_RED], + ctx->Light.Model.Ambient, + ctx->Light.Material[0].Ambient); + } + else + { + COPY_3V( &fcmd[GLT_RED], ctx->Light.Model.Ambient ); + } + + RADEON_DB_STATECHANGE(rmesa, &rmesa->hw.glt); +} + +/* Update on change to + * - light[p].colors + * - light[p].enabled + * - material, + * - colormaterial enabled + * - colormaterial bitmask + */ +static void update_light_colors( GLcontext *ctx, GLuint p ) +{ + struct gl_light *l = &ctx->Light.Light[p]; + +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + if (l->Enabled) { + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + float *fcmd = (float *)RADEON_DB_STATE( lit[p] ); + GLuint bitmask = ctx->Light.ColorMaterialBitmask; + struct gl_material *mat = &ctx->Light.Material[0]; + + COPY_4V( &fcmd[LIT_AMBIENT_RED], l->Ambient ); + COPY_4V( &fcmd[LIT_DIFFUSE_RED], l->Diffuse ); + COPY_4V( &fcmd[LIT_SPECULAR_RED], l->Specular ); + + if (!ctx->Light.ColorMaterialEnabled) + bitmask = 0; + + if ((bitmask & FRONT_AMBIENT_BIT) == 0) + SELF_SCALE_3V( &fcmd[LIT_AMBIENT_RED], mat->Ambient ); + + if ((bitmask & FRONT_DIFFUSE_BIT) == 0) + SELF_SCALE_3V( &fcmd[LIT_DIFFUSE_RED], mat->Diffuse ); + + if ((bitmask & FRONT_SPECULAR_BIT) == 0) + SELF_SCALE_3V( &fcmd[LIT_SPECULAR_RED], mat->Specular ); + + RADEON_DB_STATECHANGE( rmesa, &rmesa->hw.lit[p] ); + } +} + +/* Also fallback for asym colormaterial mode in twoside lighting... + */ +static void check_twoside_fallback( GLcontext *ctx ) +{ + GLboolean fallback = GL_FALSE; + + if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) { + if (memcmp( &ctx->Light.Material[0], + &ctx->Light.Material[1], + sizeof(struct gl_material)) != 0) + fallback = GL_TRUE; + else if (ctx->Light.ColorMaterialEnabled && + (ctx->Light.ColorMaterialBitmask & BACK_MATERIAL_BITS) != + ((ctx->Light.ColorMaterialBitmask & FRONT_MATERIAL_BITS)<<1)) + fallback = GL_TRUE; + } + + TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_LIGHT_TWOSIDE, fallback ); +} + +static void radeonColorMaterial( GLcontext *ctx, GLenum face, GLenum mode ) +{ + if (ctx->Light.ColorMaterialEnabled) { + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint light_model_ctl = rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL]; + GLuint mask = ctx->Light.ColorMaterialBitmask; + + /* Default to PREMULT: + */ + light_model_ctl &= ~((3 << RADEON_EMISSIVE_SOURCE_SHIFT) | + (3 << RADEON_AMBIENT_SOURCE_SHIFT) | + (3 << RADEON_DIFFUSE_SOURCE_SHIFT) | + (3 << RADEON_SPECULAR_SOURCE_SHIFT)); + + if (mask & FRONT_EMISSION_BIT) { + light_model_ctl |= (RADEON_LM_SOURCE_VERTEX_DIFFUSE << + RADEON_EMISSIVE_SOURCE_SHIFT); + } + + if (mask & FRONT_AMBIENT_BIT) { + light_model_ctl |= (RADEON_LM_SOURCE_VERTEX_DIFFUSE << + RADEON_AMBIENT_SOURCE_SHIFT); + } + + if (mask & FRONT_DIFFUSE_BIT) { + light_model_ctl |= (RADEON_LM_SOURCE_VERTEX_DIFFUSE << + RADEON_DIFFUSE_SOURCE_SHIFT); + } + + if (mask & FRONT_SPECULAR_BIT) { + light_model_ctl |= (RADEON_LM_SOURCE_VERTEX_DIFFUSE << + RADEON_SPECULAR_SOURCE_SHIFT); + } + + if (light_model_ctl != rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL]) { + GLuint p; + + RADEON_STATECHANGE( rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] = light_model_ctl; + + for (p = 0 ; p < MAX_LIGHTS; p++) + update_light_colors( ctx, p ); + update_global_ambient( ctx ); + } + } + + check_twoside_fallback( ctx ); +} + +void radeonUpdateMaterial( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLfloat *fcmd = (GLfloat *)RADEON_DB_STATE( mtl ); + GLuint p; + GLuint mask = ~0; + + if (ctx->Light.ColorMaterialEnabled) + mask &= ~ctx->Light.ColorMaterialBitmask; + + if (RADEON_DEBUG & DEBUG_STATE) + fprintf(stderr, "%s\n", __FUNCTION__); + + + if (mask & FRONT_EMISSION_BIT) { + fcmd[MTL_EMMISSIVE_RED] = ctx->Light.Material[0].Emission[0]; + fcmd[MTL_EMMISSIVE_GREEN] = ctx->Light.Material[0].Emission[1]; + fcmd[MTL_EMMISSIVE_BLUE] = ctx->Light.Material[0].Emission[2]; + fcmd[MTL_EMMISSIVE_ALPHA] = ctx->Light.Material[0].Emission[3]; + } + if (mask & FRONT_AMBIENT_BIT) { + fcmd[MTL_AMBIENT_RED] = ctx->Light.Material[0].Ambient[0]; + fcmd[MTL_AMBIENT_GREEN] = ctx->Light.Material[0].Ambient[1]; + fcmd[MTL_AMBIENT_BLUE] = ctx->Light.Material[0].Ambient[2]; + fcmd[MTL_AMBIENT_ALPHA] = ctx->Light.Material[0].Ambient[3]; + } + if (mask & FRONT_DIFFUSE_BIT) { + fcmd[MTL_DIFFUSE_RED] = ctx->Light.Material[0].Diffuse[0]; + fcmd[MTL_DIFFUSE_GREEN] = ctx->Light.Material[0].Diffuse[1]; + fcmd[MTL_DIFFUSE_BLUE] = ctx->Light.Material[0].Diffuse[2]; + fcmd[MTL_DIFFUSE_ALPHA] = ctx->Light.Material[0].Diffuse[3]; + } + if (mask & FRONT_SPECULAR_BIT) { + fcmd[MTL_SPECULAR_RED] = ctx->Light.Material[0].Specular[0]; + fcmd[MTL_SPECULAR_GREEN] = ctx->Light.Material[0].Specular[1]; + fcmd[MTL_SPECULAR_BLUE] = ctx->Light.Material[0].Specular[2]; + fcmd[MTL_SPECULAR_ALPHA] = ctx->Light.Material[0].Specular[3]; + } + if (mask & FRONT_SHININESS_BIT) { + fcmd[MTL_SHININESS] = ctx->Light.Material[0].Shininess; + } + + if (RADEON_DB_STATECHANGE( rmesa, &rmesa->hw.mtl )) { + for (p = 0 ; p < MAX_LIGHTS; p++) + update_light_colors( ctx, p ); + + check_twoside_fallback( ctx ); + update_global_ambient( ctx ); + } + else if (RADEON_DEBUG & (DEBUG_PRIMS|DEBUG_STATE)) + fprintf(stderr, "%s: Elided noop material call\n", __FUNCTION__); +} + +/* _NEW_LIGHT + * _NEW_MODELVIEW + * _MESA_NEW_NEED_EYE_COORDS + * + * Uses derived state from mesa: + * _VP_inf_norm + * _h_inf_norm + * _Position + * _NormDirection + * _ModelViewInvScale + * _NeedEyeCoords + * _EyeZDir + * + * which are calculated in light.c and are correct for the current + * lighting space (model or eye), hence dependencies on _NEW_MODELVIEW + * and _MESA_NEW_NEED_EYE_COORDS. + */ +static void update_light( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + /* Have to check these, or have an automatic shortcircuit mechanism + * to remove noop statechanges. (Or just do a better job on the + * front end). + */ + { + GLuint tmp = rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL]; + + if (ctx->_NeedEyeCoords) + tmp &= ~RADEON_LIGHT_IN_MODELSPACE; + else + tmp |= RADEON_LIGHT_IN_MODELSPACE; + + + /* Leave this test disabled: (unexplained q3 lockup) (even with + new packets) + */ + if (tmp != rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL]) + { + RADEON_STATECHANGE( rmesa, tcl ); + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] = tmp; } + } + + { + GLfloat *fcmd = (GLfloat *)RADEON_DB_STATE( eye ); + fcmd[EYE_X] = ctx->_EyeZDir[0]; + fcmd[EYE_Y] = ctx->_EyeZDir[1]; + fcmd[EYE_Z] = - ctx->_EyeZDir[2]; + fcmd[EYE_RESCALE_FACTOR] = ctx->_ModelViewInvScale; + RADEON_DB_STATECHANGE( rmesa, &rmesa->hw.eye ); + } + - if ( rmesa->setup.pp_cntl != p ) { - rmesa->setup.pp_cntl = p; - rmesa->dirty |= RADEON_UPLOAD_CONTEXT; +/* RADEON_STATECHANGE( rmesa, glt ); */ + + if (ctx->Light.Enabled) { + GLint p; + for (p = 0 ; p < MAX_LIGHTS; p++) { + if (ctx->Light.Light[p].Enabled) { + struct gl_light *l = &ctx->Light.Light[p]; + GLfloat *fcmd = (GLfloat *)RADEON_DB_STATE( lit[p] ); + + if (l->EyePosition[3] == 0.0) { + COPY_3FV( &fcmd[LIT_POSITION_X], l->_VP_inf_norm ); + COPY_3FV( &fcmd[LIT_DIRECTION_X], l->_h_inf_norm ); + fcmd[LIT_POSITION_W] = 0; + fcmd[LIT_DIRECTION_W] = 0; + } else { + COPY_4V( &fcmd[LIT_POSITION_X], l->_Position ); + fcmd[LIT_DIRECTION_X] = -l->_NormDirection[0]; + fcmd[LIT_DIRECTION_Y] = -l->_NormDirection[1]; + fcmd[LIT_DIRECTION_Z] = -l->_NormDirection[2]; + fcmd[LIT_DIRECTION_W] = 0; + } + + RADEON_DB_STATECHANGE( rmesa, &rmesa->hw.lit[p] ); + } } } } -static void radeonDDShadeModel( GLcontext *ctx, GLenum mode ) +static void radeonLightfv( GLcontext *ctx, GLenum light, + GLenum pname, const GLfloat *params ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - GLuint s = rmesa->setup.se_cntl; + GLint p = light - GL_LIGHT0; + struct gl_light *l = &ctx->Light.Light[p]; + GLfloat *fcmd = (GLfloat *)rmesa->hw.lit[p].cmd; + + + switch (pname) { + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + update_light_colors( ctx, p ); + break; + + case GL_SPOT_DIRECTION: + /* picked up in update_light */ + break; + + case GL_POSITION: { + /* positions picked up in update_light, but can do flag here */ + GLuint flag = (p&1)? RADEON_LIGHT_1_IS_LOCAL : RADEON_LIGHT_0_IS_LOCAL; + GLuint idx = TCL_PER_LIGHT_CTL_0 + p/2; + + RADEON_STATECHANGE(rmesa, tcl); + if (l->EyePosition[3] != 0.0F) + rmesa->hw.tcl.cmd[idx] |= flag; + else + rmesa->hw.tcl.cmd[idx] &= ~flag; + break; + } + + case GL_SPOT_EXPONENT: + RADEON_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_SPOT_EXPONENT] = params[0]; + break; + + case GL_SPOT_CUTOFF: { + GLuint flag = (p&1) ? RADEON_LIGHT_1_IS_SPOT : RADEON_LIGHT_0_IS_SPOT; + GLuint idx = TCL_PER_LIGHT_CTL_0 + p/2; + RADEON_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_SPOT_CUTOFF] = l->_CosCutoff; + + RADEON_STATECHANGE(rmesa, tcl); + if (l->SpotCutoff != 180.0F) + rmesa->hw.tcl.cmd[idx] |= flag; + else + rmesa->hw.tcl.cmd[idx] &= ~flag; + break; + } + + case GL_CONSTANT_ATTENUATION: + RADEON_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_ATTEN_CONST] = params[0]; + break; + case GL_LINEAR_ATTENUATION: + RADEON_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_ATTEN_LINEAR] = params[0]; + break; + case GL_QUADRATIC_ATTENUATION: + RADEON_STATECHANGE(rmesa, lit[p]); + fcmd[LIT_ATTEN_QUADRATIC] = params[0]; + break; + default: + return; + } + +} + + + + +static void radeonLightModelfv( GLcontext *ctx, GLenum pname, + const GLfloat *param ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + switch (pname) { + case GL_LIGHT_MODEL_AMBIENT: + update_global_ambient( ctx ); + break; + + case GL_LIGHT_MODEL_LOCAL_VIEWER: + RADEON_STATECHANGE( rmesa, tcl ); + if (ctx->Light.Model.LocalViewer) + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_LOCAL_VIEWER; + else + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] &= ~RADEON_LOCAL_VIEWER; + break; + + case GL_LIGHT_MODEL_TWO_SIDE: + RADEON_STATECHANGE( rmesa, tcl ); + if (ctx->Light.Model.TwoSide) + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= RADEON_LIGHT_TWOSIDE; + else + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~RADEON_LIGHT_TWOSIDE; + + check_twoside_fallback( ctx ); + + if (rmesa->TclFallback) { + radeonChooseRenderState( ctx ); + radeonChooseVertexState( ctx ); + } + break; + + case GL_LIGHT_MODEL_COLOR_CONTROL: + radeonUpdateSpecular(ctx); + + RADEON_STATECHANGE( rmesa, tcl ); + if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] &= + ~RADEON_DIFFUSE_SPECULAR_COMBINE; + else + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= + RADEON_DIFFUSE_SPECULAR_COMBINE; + break; + + default: + break; + } +} + +static void radeonShadeModel( GLcontext *ctx, GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint s = rmesa->hw.set.cmd[SET_SE_CNTL]; + s &= ~(RADEON_DIFFUSE_SHADE_MASK | RADEON_ALPHA_SHADE_MASK | RADEON_SPECULAR_SHADE_MASK | @@ -552,191 +1176,421 @@ return; } - if ( rmesa->setup.se_cntl != s ) { - FLUSH_BATCH( rmesa ); - rmesa->setup.se_cntl = s; + if ( rmesa->hw.set.cmd[SET_SE_CNTL] != s ) { + RADEON_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_SE_CNTL] = s; + } +} - rmesa->new_state |= RADEON_NEW_CONTEXT; - rmesa->dirty |= RADEON_UPLOAD_SETUP; + +/* ============================================================= + * User clip planes + */ + +static void radeonClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq ) +{ + GLint p = (GLint) plane - (GLint) GL_CLIP_PLANE0; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLint *ip = (GLint *)ctx->Transform._ClipUserPlane[p]; + + RADEON_STATECHANGE( rmesa, ucp[p] ); + rmesa->hw.ucp[p].cmd[UCP_X] = ip[0]; + rmesa->hw.ucp[p].cmd[UCP_Y] = ip[1]; + rmesa->hw.ucp[p].cmd[UCP_Z] = ip[2]; + rmesa->hw.ucp[p].cmd[UCP_W] = ip[3]; +} + +static void radeonUpdateClipPlanes( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint p; + + for (p = 0; p < ctx->Const.MaxClipPlanes; p++) { + if (ctx->Transform.ClipEnabled[p]) { + GLint *ip = (GLint *)ctx->Transform._ClipUserPlane[p]; + + RADEON_STATECHANGE( rmesa, ucp[p] ); + rmesa->hw.ucp[p].cmd[UCP_X] = ip[0]; + rmesa->hw.ucp[p].cmd[UCP_Y] = ip[1]; + rmesa->hw.ucp[p].cmd[UCP_Z] = ip[2]; + rmesa->hw.ucp[p].cmd[UCP_W] = ip[3]; + } } } /* ============================================================= - * Window position + * Stencil + */ + +static void radeonStencilFunc( GLcontext *ctx, GLenum func, + GLint ref, GLuint mask ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint refmask = ((ctx->Stencil.Ref << RADEON_STENCIL_REF_SHIFT) | + (ctx->Stencil.ValueMask << RADEON_STENCIL_MASK_SHIFT)); + + RADEON_STATECHANGE( rmesa, ctx ); + RADEON_STATECHANGE( rmesa, msk ); + + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &= ~RADEON_STENCIL_TEST_MASK; + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] &= ~(RADEON_STENCIL_REF_MASK| + RADEON_STENCIL_VALUE_MASK); + + switch ( ctx->Stencil.Function ) { + case GL_NEVER: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_TEST_NEVER; + break; + case GL_LESS: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_TEST_LESS; + break; + case GL_EQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_TEST_EQUAL; + break; + case GL_LEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_TEST_LEQUAL; + break; + case GL_GREATER: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_TEST_GREATER; + break; + case GL_NOTEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_TEST_NEQUAL; + break; + case GL_GEQUAL: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_TEST_GEQUAL; + break; + case GL_ALWAYS: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_TEST_ALWAYS; + break; + } + + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] |= refmask; +} + +static void radeonStencilMask( GLcontext *ctx, GLuint mask ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + RADEON_STATECHANGE( rmesa, msk ); + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] &= ~RADEON_STENCIL_WRITE_MASK; + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] |= + (ctx->Stencil.WriteMask << RADEON_STENCIL_WRITEMASK_SHIFT); +} + +static void radeonStencilOp( GLcontext *ctx, GLenum fail, + GLenum zfail, GLenum zpass ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + RADEON_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &= ~(RADEON_STENCIL_FAIL_MASK | + RADEON_STENCIL_ZFAIL_MASK | + RADEON_STENCIL_ZPASS_MASK); + + switch ( ctx->Stencil.FailFunc ) { + case GL_KEEP: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_FAIL_KEEP; + break; + case GL_ZERO: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_FAIL_ZERO; + break; + case GL_REPLACE: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_FAIL_REPLACE; + break; + case GL_INCR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_FAIL_INC; + break; + case GL_DECR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_FAIL_DEC; + break; + case GL_INVERT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_FAIL_INVERT; + break; + } + + switch ( ctx->Stencil.ZFailFunc ) { + case GL_KEEP: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZFAIL_KEEP; + break; + case GL_ZERO: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZFAIL_ZERO; + break; + case GL_REPLACE: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZFAIL_REPLACE; + break; + case GL_INCR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZFAIL_INC; + break; + case GL_DECR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZFAIL_DEC; + break; + case GL_INVERT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZFAIL_INVERT; + break; + } + + switch ( ctx->Stencil.ZPassFunc ) { + case GL_KEEP: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZPASS_KEEP; + break; + case GL_ZERO: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZPASS_ZERO; + break; + case GL_REPLACE: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZPASS_REPLACE; + break; + case GL_INCR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZPASS_INC; + break; + case GL_DECR: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZPASS_DEC; + break; + case GL_INVERT: + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] |= RADEON_STENCIL_ZPASS_INVERT; + break; + } +} + +static void radeonClearStencil( GLcontext *ctx, GLint s ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + rmesa->state.stencil.clear = + ((GLuint) ctx->Stencil.Clear | + (0xff << RADEON_STENCIL_MASK_SHIFT) | + (ctx->Stencil.WriteMask << RADEON_STENCIL_WRITEMASK_SHIFT)); +} + + +/* ============================================================= + * Window position and viewport transformation + */ + +/* + * To correctly position primitives: */ +#define SUBPIXEL_X 0.125 +#define SUBPIXEL_Y 0.125 void radeonUpdateWindow( GLcontext *ctx ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - __DRIdrawablePrivate *dPriv = rmesa->driDrawable; + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; 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; - } + const GLfloat *v = ctx->Viewport._WindowMap.m; - rmesa->dirty |= RADEON_UPLOAD_VIEWPORT; + GLfloat sx = v[MAT_SX]; + GLfloat tx = v[MAT_TX] + xoffset + SUBPIXEL_X; + GLfloat sy = - v[MAT_SY]; + GLfloat ty = (- v[MAT_TY]) + yoffset + SUBPIXEL_Y; + GLfloat sz = v[MAT_SZ] * rmesa->state.depth.scale; + GLfloat tz = v[MAT_TZ] * rmesa->state.depth.scale; + RADEON_FIREVERTICES( rmesa ); + RADEON_STATECHANGE( rmesa, vpt ); + + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XSCALE] = *(GLuint *)&sx; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] = *(GLuint *)&tx; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YSCALE] = *(GLuint *)&sy; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] = *(GLuint *)&ty; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZSCALE] = *(GLuint *)&sz; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZOFFSET] = *(GLuint *)&tz; } -/* ============================================================= - * Miscellaneous - */ -static void radeonDDClearColor( GLcontext *ctx, - GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +static void radeonViewport( GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height ) { - radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - - rmesa->ClearColor = radeonPackColor( rmesa->radeonScreen->cpp, - r, g, b, a ); + /* Don't pipeline viewport changes, conflict with window offset + * setting below. Could apply deltas to rescue pipelined viewport + * values, or keep the originals hanging around. + */ + RADEON_FIREVERTICES( RADEON_CONTEXT(ctx) ); + radeonUpdateWindow( ctx ); } -static void radeonDDColor( GLcontext *ctx, - GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +static void radeonDepthRange( GLcontext *ctx, GLclampd nearval, + GLclampd farval ) { - radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - - rmesa->Color = radeonPackColor( rmesa->radeonScreen->cpp, - r, g, b, a ); + radeonUpdateWindow( ctx ); } -static void radeonDDLogicOpCode( GLcontext *ctx, GLenum opcode ) +void radeonUpdateViewportOffset( GLcontext *ctx ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; + GLfloat xoffset = (GLfloat)dPriv->x; + GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h; + const GLfloat *v = ctx->Viewport._WindowMap.m; - if ( ctx->Color.ColorLogicOpEnabled ) { - FLUSH_BATCH( rmesa ); + GLfloat tx = v[MAT_TX] + xoffset; + GLfloat ty = (- v[MAT_TY]) + yoffset; - /* FIXME: We can do color logic ops. + if ( rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] != *(GLuint *)&tx || + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] != *(GLuint *)&ty ) + { + /* Note: this should also modify whatever data the context reset + * code uses... */ - if ( opcode == GL_COPY ) { - rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; - } else { - rmesa->Fallback |= RADEON_FALLBACK_LOGICOP; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] = *(GLuint *)&tx; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] = *(GLuint *)&ty; + + /* update polygon stipple x/y screen offset */ + { + GLuint stx, sty; + GLuint m = rmesa->hw.msc.cmd[MSC_RE_MISC]; + + m &= ~(RADEON_STIPPLE_X_OFFSET_MASK | + RADEON_STIPPLE_Y_OFFSET_MASK); + + /* add magic offsets, then invert */ + stx = 31 - ((rmesa->dri.drawable->x - 1) & RADEON_STIPPLE_COORD_MASK); + sty = 31 - ((rmesa->dri.drawable->y + rmesa->dri.drawable->h - 1) + & RADEON_STIPPLE_COORD_MASK); + + m |= ((stx << RADEON_STIPPLE_X_OFFSET_SHIFT) | + (sty << RADEON_STIPPLE_Y_OFFSET_SHIFT)); + + if ( rmesa->hw.msc.cmd[MSC_RE_MISC] != m ) { + RADEON_STATECHANGE( rmesa, msc ); + rmesa->hw.msc.cmd[MSC_RE_MISC] = m; + } } } - else - rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; + + radeonUpdateScissor( ctx ); } + + + +/* ============================================================= + * Miscellaneous + */ -static GLboolean radeonDDSetDrawBuffer( GLcontext *ctx, GLenum mode ) +static void radeonClearColor( GLcontext *ctx, const GLchan c[4] ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - int found = GL_TRUE; + rmesa->state.color.clear = radeonPackColor( rmesa->radeonScreen->cpp, + c[0], c[1], c[2], c[3] ); +} - FLUSH_BATCH( rmesa ); - if ( rmesa->DrawBuffer != mode ) { - rmesa->DrawBuffer = mode; - rmesa->Fallback &= ~RADEON_FALLBACK_DRAW_BUFFER; +static void radeonRenderMode( GLcontext *ctx, GLenum mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + FALLBACK( rmesa, RADEON_FALLBACK_RENDER_MODE, (mode != GL_RENDER) ); +} - 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; +static GLuint radeon_rop_tab[] = { + RADEON_ROP_CLEAR, + RADEON_ROP_AND, + RADEON_ROP_AND_REVERSE, + RADEON_ROP_COPY, + RADEON_ROP_AND_INVERTED, + RADEON_ROP_NOOP, + RADEON_ROP_XOR, + RADEON_ROP_OR, + RADEON_ROP_NOR, + RADEON_ROP_EQUIV, + RADEON_ROP_INVERT, + RADEON_ROP_OR_REVERSE, + RADEON_ROP_COPY_INVERTED, + RADEON_ROP_OR_INVERTED, + RADEON_ROP_NAND, + RADEON_ROP_SET, +}; - rmesa->new_state |= RADEON_NEW_WINDOW; - } +static void radeonLogicOpCode( GLcontext *ctx, GLenum opcode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint rop = (GLuint)opcode - GL_CLEAR; - return found; + ASSERT( rop < 16 ); + + RADEON_STATECHANGE( rmesa, msk ); + rmesa->hw.msk.cmd[MSK_RB3D_ROPCNTL] = radeon_rop_tab[rop]; } -static void radeonDDSetReadBuffer( GLcontext *ctx, - GLframebuffer *colorBuffer, - GLenum mode ) -{ - radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - rmesa->Fallback &= ~RADEON_FALLBACK_READ_BUFFER; +void radeonSetCliprects( radeonContextPtr rmesa, GLenum mode ) +{ + __DRIdrawablePrivate *dPriv = rmesa->dri.drawable; switch ( mode ) { case GL_FRONT_LEFT: - rmesa->readOffset = rmesa->radeonScreen->frontOffset; - rmesa->readPitch = rmesa->radeonScreen->frontPitch; + rmesa->numClipRects = dPriv->numClipRects; + rmesa->pClipRects = (XF86DRIClipRectPtr)dPriv->pClipRects; break; case GL_BACK_LEFT: - rmesa->readOffset = rmesa->radeonScreen->backOffset; - rmesa->readPitch = rmesa->radeonScreen->backPitch; + /* Can't ignore 2d windows if we are page flipping. + */ + if ( dPriv->numBackClipRects == 0 || rmesa->doPageFlip ) { + rmesa->numClipRects = dPriv->numClipRects; + rmesa->pClipRects = (XF86DRIClipRectPtr)dPriv->pClipRects; + } + else { + rmesa->numClipRects = dPriv->numBackClipRects; + rmesa->pClipRects = (XF86DRIClipRectPtr)dPriv->pBackClipRects; + } break; default: - rmesa->Fallback |= RADEON_FALLBACK_READ_BUFFER; - break; + fprintf(stderr, "bad mode in radeonSetCliprects\n"); + return; } -} + if (rmesa->state.scissor.enabled) + radeonRecalcScissorRects( rmesa ); +} -/* ============================================================= - * Polygon stipple - */ -static void radeonDDPolygonStipple( GLcontext *ctx, const GLubyte *mask ) +static void radeonSetDrawBuffer( GLcontext *ctx, GLenum mode ) { 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]; - } + if (RADEON_DEBUG & DEBUG_DRI) + fprintf(stderr, "%s %s\n", __FUNCTION__, + _mesa_lookup_enum_by_nr( mode )); - FLUSH_BATCH( rmesa ); + RADEON_FIREVERTICES(rmesa); /* don't pipeline cliprect changes */ - if ( ctx->Polygon.StippleFlag && ctx->PB->primitive == GL_POLYGON ) { - rmesa->setup.pp_cntl |= RADEON_STIPPLE_ENABLE; - } else { - rmesa->setup.pp_cntl &= ~RADEON_STIPPLE_ENABLE; + switch ( mode ) { + case GL_FRONT_LEFT: + FALLBACK( rmesa, RADEON_FALLBACK_DRAW_BUFFER, GL_FALSE ); + if ( rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.color.drawOffset = rmesa->radeonScreen->backOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->backPitch; + } else { + rmesa->state.color.drawOffset = rmesa->radeonScreen->frontOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->frontPitch; + } + rmesa->state.pixel.readOffset = rmesa->state.color.drawOffset; + rmesa->state.pixel.readPitch = rmesa->state.color.drawPitch; + radeonSetCliprects( rmesa, GL_FRONT_LEFT ); + break; + case GL_BACK_LEFT: + FALLBACK( rmesa, RADEON_FALLBACK_DRAW_BUFFER, GL_FALSE ); + if ( rmesa->sarea->pfCurrentPage == 1 ) { + rmesa->state.color.drawOffset = rmesa->radeonScreen->frontOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->frontPitch; + } else { + rmesa->state.color.drawOffset = rmesa->radeonScreen->backOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->backPitch; + } + rmesa->state.pixel.readOffset = rmesa->state.color.drawOffset; + rmesa->state.pixel.readPitch = rmesa->state.color.drawPitch; + radeonSetCliprects( rmesa, GL_BACK_LEFT ); + break; + default: + FALLBACK( rmesa, RADEON_FALLBACK_DRAW_BUFFER, GL_TRUE ); + return; } - 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; + RADEON_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = (rmesa->state.color.drawOffset & + RADEON_COLOROFFSET_MASK); + rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = rmesa->state.color.drawPitch; } @@ -744,633 +1598,562 @@ * State enable/disable */ -static void radeonDDEnable( GLcontext *ctx, GLenum cap, GLboolean state ) +static void radeonEnable( GLcontext *ctx, GLenum cap, GLboolean state ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint p, flag; + + if ( RADEON_DEBUG & DEBUG_STATE ) + fprintf( stderr, "%s( %s = %s )\n", __FUNCTION__, + _mesa_lookup_enum_by_nr( cap ), + state ? "GL_TRUE" : "GL_FALSE" ); switch ( cap ) { + /* Fast track this one... + */ + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_TEXTURE_3D: + break; + case GL_ALPHA_TEST: - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_ALPHA; + RADEON_STATECHANGE( rmesa, ctx ); + if (state) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= RADEON_ALPHA_TEST_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~RADEON_ALPHA_TEST_ENABLE; + } break; case GL_BLEND: - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_ALPHA; + RADEON_STATECHANGE( rmesa, ctx ); + if (state) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_ALPHA_BLEND_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_ALPHA_BLEND_ENABLE; + } + if ( ctx->Color.ColorLogicOpEnabled ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_ROP_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_ROP_ENABLE; + } + break; - if (ctx->Color.ColorLogicOpEnabled && ctx->Color.LogicOp != GL_COPY) - rmesa->Fallback |= RADEON_FALLBACK_LOGICOP; - else - rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + p = cap-GL_CLIP_PLANE0; + RADEON_STATECHANGE( rmesa, tcl ); + if (state) { + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] |= (RADEON_UCP_ENABLE_0<hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~(RADEON_UCP_ENABLE_0<new_state |= RADEON_NEW_CULL; + radeonCullFace( ctx, 0 ); break; case GL_DEPTH_TEST: - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_DEPTH; + RADEON_STATECHANGE(rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_Z_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_Z_ENABLE; + } break; case GL_DITHER: - do { - GLuint r = rmesa->setup.rb3d_cntl; - FLUSH_BATCH( rmesa ); + RADEON_STATECHANGE(rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_DITHER_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_DITHER_ENABLE; + } + break; + + case GL_FOG: + RADEON_STATECHANGE(rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= RADEON_FOG_ENABLE; + radeonFogfv( ctx, GL_FOG_MODE, 0 ); + } else { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~RADEON_FOG_ENABLE; + RADEON_STATECHANGE(rmesa, tcl); + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] &= ~RADEON_TCL_FOG_MASK; + } + radeonUpdateSpecular( ctx ); /* for PK_SPEC */ + if (rmesa->TclFallback) + radeonChooseVertexState( ctx ); + break; + + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + RADEON_STATECHANGE(rmesa, tcl); + p = cap - GL_LIGHT0; + if (p&1) + flag = (RADEON_LIGHT_1_ENABLE | + RADEON_LIGHT_1_ENABLE_AMBIENT | + RADEON_LIGHT_1_ENABLE_SPECULAR); + else + flag = (RADEON_LIGHT_0_ENABLE | + RADEON_LIGHT_0_ENABLE_AMBIENT | + RADEON_LIGHT_0_ENABLE_SPECULAR); + + if (state) + rmesa->hw.tcl.cmd[p/2 + TCL_PER_LIGHT_CTL_0] |= flag; + else + rmesa->hw.tcl.cmd[p/2 + TCL_PER_LIGHT_CTL_0] &= ~flag; + + /* + */ + update_light_colors( ctx, p ); + break; + + case GL_LIGHTING: + RADEON_STATECHANGE(rmesa, tcl); + if (state) { +/* rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_LIGHTING_ENABLE; */ +/* rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] |= RADEON_TCL_COMPUTE_DIFFUSE; */ + } + else { +/* rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] &= ~RADEON_LIGHTING_ENABLE; */ +/* rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] &= ~RADEON_TCL_COMPUTE_DIFFUSE; */ + } + radeonUpdateSpecular(ctx); + check_twoside_fallback( ctx ); + break; + + case GL_LINE_SMOOTH: + RADEON_STATECHANGE( rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= RADEON_ANTI_ALIAS_LINE; + } else { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~RADEON_ANTI_ALIAS_LINE; + } + break; + + case GL_LINE_STIPPLE: + RADEON_STATECHANGE( rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= RADEON_PATTERN_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~RADEON_PATTERN_ENABLE; + } + break; + + case GL_COLOR_LOGIC_OP: + RADEON_STATECHANGE( rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_ROP_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_ROP_ENABLE; + } + break; + + case GL_NORMALIZE: + RADEON_STATECHANGE( rmesa, tcl ); + if ( state ) { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_NORMALIZE_NORMALS; + } else { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] &= ~RADEON_NORMALIZE_NORMALS; + } + break; - if ( ctx->Color.DitherFlag ) { - r |= RADEON_DITHER_ENABLE; + case GL_POLYGON_OFFSET_POINT: + if (rmesa->dri.drmMinor == 1) { + radeonChooseRenderState( ctx ); + } + else { + RADEON_STATECHANGE( rmesa, set ); + if ( state ) { + rmesa->hw.set.cmd[SET_SE_CNTL] |= RADEON_ZBIAS_ENABLE_POINT; } else { - r &= ~RADEON_DITHER_ENABLE; + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~RADEON_ZBIAS_ENABLE_POINT; } + } + break; - if ( rmesa->setup.rb3d_cntl != r ) { - rmesa->setup.rb3d_cntl = r; - rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + case GL_POLYGON_OFFSET_LINE: + if (rmesa->dri.drmMinor == 1) { + radeonChooseRenderState( ctx ); + } + else { + RADEON_STATECHANGE( rmesa, set ); + if ( state ) { + rmesa->hw.set.cmd[SET_SE_CNTL] |= RADEON_ZBIAS_ENABLE_LINE; + } else { + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~RADEON_ZBIAS_ENABLE_LINE; } - } while (0); + } break; - case GL_FOG: - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_FOG; + case GL_POLYGON_OFFSET_FILL: + if (rmesa->dri.drmMinor == 1) { + radeonChooseRenderState( ctx ); + } + else { + RADEON_STATECHANGE( rmesa, set ); + if ( state ) { + rmesa->hw.set.cmd[SET_SE_CNTL] |= RADEON_ZBIAS_ENABLE_TRI; + } else { + rmesa->hw.set.cmd[SET_SE_CNTL] &= ~RADEON_ZBIAS_ENABLE_TRI; + } + } break; - case GL_COLOR_LOGIC_OP: - FLUSH_BATCH( rmesa ); - if ( state && ctx->Color.LogicOp != GL_COPY ) { - rmesa->Fallback |= RADEON_FALLBACK_LOGICOP; + case GL_POLYGON_SMOOTH: + RADEON_STATECHANGE( rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= RADEON_ANTI_ALIAS_POLY; } else { - rmesa->Fallback &= ~RADEON_FALLBACK_LOGICOP; + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~RADEON_ANTI_ALIAS_POLY; } 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_POLYGON_STIPPLE: + RADEON_STATECHANGE(rmesa, ctx ); + if ( state ) { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= RADEON_STIPPLE_ENABLE; + } else { + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~RADEON_STIPPLE_ENABLE; } + break; - case GL_SCISSOR_TEST: - FLUSH_BATCH( rmesa ); - rmesa->scissor = state; - rmesa->new_state |= RADEON_NEW_CLIP; + case GL_RESCALE_NORMAL_EXT: { + GLboolean tmp = ctx->_NeedEyeCoords ? state : !state; + RADEON_STATECHANGE( rmesa, tcl ); + if ( tmp ) { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_RESCALE_NORMALS; + } else { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] &= ~RADEON_RESCALE_NORMALS; + } break; + } - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - FLUSH_BATCH( rmesa ); - rmesa->new_state |= RADEON_NEW_TEXTURE; + case GL_SCISSOR_TEST: + RADEON_FIREVERTICES( rmesa ); + rmesa->state.scissor.enabled = state; + radeonUpdateScissor( ctx ); break; - case GL_POLYGON_STIPPLE: - if ( ctx->PB->primitive == GL_POLYGON ) { - FLUSH_BATCH( rmesa ); + case GL_STENCIL_TEST: + if ( rmesa->state.stencil.hwBuffer ) { + RADEON_STATECHANGE( rmesa, ctx ); if ( state ) { - rmesa->setup.pp_cntl |= RADEON_STIPPLE_ENABLE; + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_STENCIL_ENABLE; } else { - rmesa->setup.pp_cntl &= ~RADEON_STIPPLE_ENABLE; + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] &= ~RADEON_STENCIL_ENABLE; } - rmesa->new_state |= RADEON_NEW_CONTEXT; - rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + } else { + FALLBACK( rmesa, RADEON_FALLBACK_STENCIL, state ); } break; + case GL_TEXTURE_GEN_Q: + case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_T: + /* Picked up in radeonUpdateTextureState. + */ + rmesa->recheck_texgen[ctx->Texture.CurrentUnit] = GL_TRUE; + break; + + case GL_COLOR_SUM_EXT: + radeonUpdateSpecular ( ctx ); + 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 ) +static void radeonLightingSpaceChange( GLcontext *ctx ) { - RADEONSAREAPrivPtr sarea = rmesa->sarea; - radeon_context_regs_t *regs = &(rmesa->setup); - radeonTexObjPtr t0 = rmesa->CurrentTexObj[0]; - radeonTexObjPtr t1 = rmesa->CurrentTexObj[1]; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLboolean tmp; + RADEON_STATECHANGE( rmesa, tcl ); - if ( RADEON_DEBUG & DEBUG_VERBOSE_MSG ) { - radeonDDPrintDirty( "radeonEmitHwStateLocked", rmesa->dirty ); - } + if (RADEON_DEBUG & DEBUG_STATE) + fprintf(stderr, "%s %d\n", __FUNCTION__, ctx->_NeedEyeCoords); - 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 (ctx->_NeedEyeCoords) + tmp = ctx->Transform.RescaleNormals; + else + tmp = !ctx->Transform.RescaleNormals; - 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) ); + if ( tmp ) { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_RESCALE_NORMALS; + } else { + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] &= ~RADEON_RESCALE_NORMALS; } - - /* 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]; +/* ============================================================= + * Deferred state management - matrices, textures, other? + */ - 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]; +static void upload_matrix( radeonContextPtr rmesa, GLfloat *src, int idx ) +{ + float *dest = ((float *)RADEON_DB_STATE( mat[idx] ))+MAT_ELT_0; + int i; - 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]) ); + for (i = 0 ; i < 4 ; i++) { + *dest++ = src[i]; + *dest++ = src[i+4]; + *dest++ = src[i+8]; + *dest++ = src[i+12]; } - - sarea->vertsize = rmesa->vertsize; - sarea->vc_format = rmesa->vc_format; - sarea->dirty |= rmesa->dirty; - rmesa->dirty &= RADEON_UPLOAD_CLIPRECTS; + RADEON_DB_STATECHANGE( rmesa, &rmesa->hw.mat[idx] ); } -static void radeonDDPrintState( const char *msg, GLuint flags ) +static void upload_matrix_t( radeonContextPtr rmesa, GLfloat *src, int idx ) { - 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, " : "" ); + float *dest = ((float *)RADEON_DB_STATE( mat[idx] ))+MAT_ELT_0; + memcpy(dest, src, 16*sizeof(float)); + RADEON_DB_STATECHANGE( rmesa, &rmesa->hw.mat[idx] ); } -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 ); +static void update_texturematrix( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + GLuint tpc = rmesa->hw.tcl.cmd[TCL_TEXTURE_PROC_CTL]; + GLuint vs = rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL]; + int unit; - /* Update the various parts of the context's state. - */ - if ( new_state & RADEON_NEW_ALPHA ) - radeonUpdateAlphaMode( ctx ); + rmesa->TexMatEnabled = 0; - if ( new_state & RADEON_NEW_DEPTH ) - radeonUpdateZMode( ctx ); + for (unit = 0 ; unit < 2; unit++) { + if (!ctx->Texture.Unit[unit]._ReallyEnabled) { + } + else if (ctx->TextureMatrix[unit].type != MATRIX_IDENTITY) { + GLuint inputshift = RADEON_TEXGEN_0_INPUT_SHIFT + unit*4; + + rmesa->TexMatEnabled |= (RADEON_TEXGEN_TEXMAT_0_ENABLE| + RADEON_TEXMAT_0_ENABLE) << unit; + + if (rmesa->TexGenEnabled & (RADEON_TEXMAT_0_ENABLE << unit)) { + /* Need to preconcatenate any active texgen + * obj/eyeplane matrices: + */ + _math_matrix_mul_matrix( &rmesa->tmpmat, + &rmesa->TexGenMatrix[unit], + &ctx->TextureMatrix[unit] ); + upload_matrix( rmesa, rmesa->tmpmat.m, TEXMAT_0+unit ); + } + else { + rmesa->TexMatEnabled |= + (RADEON_TEXGEN_INPUT_TEXCOORD_0+unit) << inputshift; + upload_matrix( rmesa, ctx->TextureMatrix[unit].m, + TEXMAT_0+unit ); + } + } + else if (rmesa->TexGenEnabled & (RADEON_TEXMAT_0_ENABLE << unit)) { + upload_matrix( rmesa, rmesa->TexGenMatrix[unit].m, + TEXMAT_0+unit ); + } + } - if ( new_state & RADEON_NEW_FOG ) - radeonUpdateFogAttrib( ctx ); - if ( new_state & RADEON_NEW_CLIP ) - radeonUpdateClipping( ctx ); + tpc = (rmesa->TexMatEnabled | rmesa->TexGenEnabled); - if ( new_state & RADEON_NEW_CULL ) - radeonUpdateCull( ctx ); + vs &= ~((0xf << RADEON_TCL_TEX_0_OUTPUT_SHIFT) | + (0xf << RADEON_TCL_TEX_1_OUTPUT_SHIFT)); - if ( new_state & RADEON_NEW_MASKS ) - radeonUpdateMasks( ctx ); + if (tpc & RADEON_TEXGEN_TEXMAT_0_ENABLE) + vs |= RADEON_TCL_TEX_COMPUTED_TEX_0 << RADEON_TCL_TEX_0_OUTPUT_SHIFT; + else + vs |= RADEON_TCL_TEX_INPUT_TEX_0 << RADEON_TCL_TEX_0_OUTPUT_SHIFT; - if ( new_state & RADEON_NEW_WINDOW ) - radeonUpdateWindow( ctx ); + if (tpc & RADEON_TEXGEN_TEXMAT_1_ENABLE) + vs |= RADEON_TCL_TEX_COMPUTED_TEX_1 << RADEON_TCL_TEX_1_OUTPUT_SHIFT; + else + vs |= RADEON_TCL_TEX_INPUT_TEX_1 << RADEON_TCL_TEX_1_OUTPUT_SHIFT; - if ( new_state & RADEON_NEW_TEXTURE ) - radeonUpdateTextureState( ctx ); + if (tpc != rmesa->hw.tcl.cmd[TCL_TEXTURE_PROC_CTL] || + vs != rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL]) { + + RADEON_STATECHANGE(rmesa, tcl); + rmesa->hw.tcl.cmd[TCL_TEXTURE_PROC_CTL] = tpc; + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] = vs; } } -/* 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; - } - } +void radeonValidateState( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint new_state = rmesa->NewGLState; - 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; + if (new_state & _NEW_TEXTURE) { + radeonUpdateTextureState( ctx ); + new_state |= rmesa->NewGLState; /* may add TEXTURE_MATRIX */ } -} + /* Need an event driven matrix update? + */ + if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION)) + upload_matrix( rmesa, ctx->_ModelProjectMatrix.m, MODEL_PROJ ); -#define INTERESTED (~(NEW_MODELVIEW | \ - NEW_PROJECTION | \ - NEW_TEXTURE_MATRIX | \ - NEW_USER_CLIP | \ - NEW_CLIENT_STATE)) + /* Need these for lighting (shouldn't upload otherwise) + */ + if (new_state & (_NEW_MODELVIEW)) { + upload_matrix( rmesa, ctx->ModelView.m, MODEL ); + upload_matrix_t( rmesa, ctx->ModelView.inv, MODEL_IT ); + } -void radeonDDUpdateState( GLcontext *ctx ) -{ - radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + /* Does this need to be triggered on eg. modelview for + * texgen-derived objplane/eyeplane matrices? + */ + if (new_state & _NEW_TEXTURE_MATRIX) { + update_texturematrix( ctx ); + } - if ( ctx->NewState & INTERESTED ) { - radeonDDChooseRenderState( ctx ); - radeonDDChooseRasterSetupFunc( ctx ); + if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW|_MESA_NEW_NEED_EYE_COORDS)) { + update_light( 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... + /* emit all active clip planes if projection matrix changes. */ - if ( rmesa->new_state & RADEON_NEW_TEXTURE ) { - radeonDDUpdateHWState( ctx ); + if (new_state & (_NEW_PROJECTION)) { + if (ctx->Transform._AnyClip) + radeonUpdateClipPlanes( 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; - } + rmesa->NewGLState = 0; } -/* Initialize the context's hardware state. - */ -void radeonDDInitState( radeonContextPtr rmesa ) +static void radeonInvalidateState( GLcontext *ctx, GLuint new_state ) { - GLuint color_fmt, depth_fmt; + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + _ae_invalidate_state( ctx, new_state ); + RADEON_CONTEXT(ctx)->NewGLState |= new_state; + radeonVtxfmtInvalidate( ctx ); +} - 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 ); - } +static void radeonWrapRunPipeline( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); - rmesa->ClearColor = 0x00000000; + if (0) + fprintf(stderr, "%s, newstate: %x\n", __FUNCTION__, rmesa->NewGLState); - 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; + /* Validate state: + */ + if (rmesa->NewGLState) + radeonValidateState( ctx ); + + if (tnl->vb.Material) { + TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_MATERIAL, GL_TRUE ); } - /* 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; + /* Run the pipeline. + */ + _tnl_run_pipeline( ctx ); - rmesa->new_state = RADEON_NEW_ALL; + if (tnl->vb.Material) { + TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_MATERIAL, GL_FALSE ); + radeonUpdateMaterial( ctx ); /* not needed any more? */ + } } + + + /* Initialize the driver's state functions. */ -void radeonDDInitStateFuncs( GLcontext *ctx ) +void radeonInitStateFuncs( GLcontext *ctx ) { - ctx->Driver.UpdateState = radeonDDUpdateState; + ctx->Driver.UpdateState = radeonInvalidateState; + ctx->Driver.LightingSpaceChange = radeonLightingSpaceChange; - 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.SetDrawBuffer = radeonSetDrawBuffer; - 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.AlphaFunc = radeonAlphaFunc; + ctx->Driver.BlendEquation = radeonBlendEquation; + ctx->Driver.BlendFunc = radeonBlendFunc; + ctx->Driver.BlendFuncSeparate = radeonBlendFuncSeparate; + ctx->Driver.ClearColor = radeonClearColor; + ctx->Driver.ClearDepth = radeonClearDepth; + ctx->Driver.ClearIndex = NULL; + ctx->Driver.ClearStencil = radeonClearStencil; + ctx->Driver.ClipPlane = radeonClipPlane; + ctx->Driver.ColorMask = radeonColorMask; + ctx->Driver.CullFace = radeonCullFace; + ctx->Driver.DepthFunc = radeonDepthFunc; + ctx->Driver.DepthMask = radeonDepthMask; + ctx->Driver.DepthRange = radeonDepthRange; + ctx->Driver.Enable = radeonEnable; + ctx->Driver.Fogfv = radeonFogfv; + ctx->Driver.FrontFace = radeonFrontFace; 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; + ctx->Driver.IndexMask = NULL; + ctx->Driver.LightModelfv = radeonLightModelfv; + ctx->Driver.Lightfv = radeonLightfv; + ctx->Driver.LineStipple = radeonLineStipple; + ctx->Driver.LineWidth = radeonLineWidth; + ctx->Driver.LogicOpcode = radeonLogicOpCode; + ctx->Driver.PolygonMode = radeonPolygonMode; + + if (RADEON_CONTEXT(ctx)->dri.drmMinor > 1) + ctx->Driver.PolygonOffset = radeonPolygonOffset; + + ctx->Driver.PolygonStipple = radeonPolygonStipple; + ctx->Driver.RenderMode = radeonRenderMode; + ctx->Driver.Scissor = radeonScissor; + ctx->Driver.ShadeModel = radeonShadeModel; + ctx->Driver.StencilFunc = radeonStencilFunc; + ctx->Driver.StencilMask = radeonStencilMask; + ctx->Driver.StencilOp = radeonStencilOp; + ctx->Driver.Viewport = radeonViewport; + + /* Pixel path fallbacks + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.Bitmap = _swrast_Bitmap; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; + + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; + + TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange = radeonUpdateMaterial; + TNL_CONTEXT(ctx)->Driver.RunPipeline = radeonWrapRunPipeline; } Index: xc/lib/GL/mesa/src/drv/radeon/radeon_state.h diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_state.h:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_state.h:1.5 --- xc/lib/GL/mesa/src/drv/radeon/radeon_state.h:1.1 Sun Jan 7 20:07:28 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_state.h Tue Nov 5 12:46:09 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_state.h,v 1.1 2001/01/08 01:07:28 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_state.h,v 1.5 2002/11/05 17:46:09 tsi Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -41,15 +41,36 @@ #include "radeon_context.h" -extern void radeonDDInitState( radeonContextPtr rmesa ); -extern void radeonDDInitStateFuncs( GLcontext *ctx ); +extern void radeonInitState( radeonContextPtr rmesa ); +extern void radeonInitStateFuncs( GLcontext *ctx ); -extern void radeonDDUpdateState( GLcontext *ctx ); -extern void radeonDDUpdateHWState( GLcontext *ctx ); +extern void radeonUpdateMaterial( GLcontext *ctx ); +extern void radeonSetCliprects( radeonContextPtr rmesa, GLenum mode ); +extern void radeonRecalcScissorRects( radeonContextPtr rmesa ); +extern void radeonUpdateViewportOffset( GLcontext *ctx ); extern void radeonUpdateWindow( GLcontext *ctx ); -extern void radeonEmitHwStateLocked( radeonContextPtr rmesa ); +extern void radeonValidateState( GLcontext *ctx ); + +extern void radeonPrintDirty( radeonContextPtr rmesa, + const char *msg ); + + +extern void radeonFallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( rmesa, bit, mode ) do { \ + if ( 0 ) fprintf( stderr, "FALLBACK in %s: #%d=%d\n", \ + __FUNCTION__, bit, mode ); \ + radeonFallback( rmesa->glCtx, bit, mode ); \ +} while (0) + + +#define MODEL_PROJ 0 +#define MODEL 1 +#define MODEL_IT 2 +#define TEXMAT_0 3 +#define TEXMAT_1 4 +#define TEXMAT_2 5 #endif #endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_state_init.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_state_init.c:1.3 --- /dev/null Thu Feb 27 12:26:33 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_state_init.c Sat Feb 22 01:21:11 2003 @@ -0,0 +1,556 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_state_init.c,v 1.3 2003/02/22 06:21:11 dawes Exp $ */ +/* + * Copyright 2000, 2001 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 + * 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: + * Gareth Hughes + * Keith Whitwell + */ + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_state.h" +#include "radeon_tcl.h" +#include "radeon_tex.h" +#include "radeon_swtcl.h" +#include "radeon_vtxfmt.h" + +#include "mem.h" +#include "mmath.h" +#include "enums.h" +#include "colormac.h" +#include "light.h" +#include "api_arrayelt.h" + +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" +#include "swrast_setup/swrast_setup.h" + +/* ============================================================= + * State initialization + */ + +void radeonPrintDirty( radeonContextPtr rmesa, const char *msg ) +{ + struct radeon_state_atom *l; + + fprintf(stderr, msg); + fprintf(stderr, ": "); + + foreach(l, &(rmesa->hw.dirty)) { + fprintf(stderr, "%s, ", l->name); + } + + fprintf(stderr, "\n"); +} + +static int cmdpkt( int id ) +{ + drmRadeonCmdHeader h; + h.i = 0; + h.packet.cmd_type = RADEON_CMD_PACKET; + h.packet.packet_id = id; + return h.i; +} + +static int cmdvec( int offset, int stride, int count ) +{ + drmRadeonCmdHeader h; + h.i = 0; + h.vectors.cmd_type = RADEON_CMD_VECTORS; + h.vectors.offset = offset; + h.vectors.stride = stride; + h.vectors.count = count; + return h.i; +} + +static int cmdscl( int offset, int stride, int count ) +{ + drmRadeonCmdHeader h; + h.i = 0; + h.scalars.cmd_type = RADEON_CMD_SCALARS; + h.scalars.offset = offset; + h.scalars.stride = stride; + h.scalars.count = count; + return h.i; +} + +#define CHECK( NM, FLAG ) \ +static GLboolean check_##NM( GLcontext *ctx ) \ +{ \ + return FLAG; \ +} + +#define TCL_CHECK( NM, FLAG ) \ +static GLboolean check_##NM( GLcontext *ctx ) \ +{ \ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ + return !rmesa->TclFallback && (FLAG); \ +} + + +CHECK( always, GL_TRUE ) +CHECK( tex0, ctx->Texture.Unit[0]._ReallyEnabled ) +CHECK( tex1, ctx->Texture.Unit[1]._ReallyEnabled ) +CHECK( fog, ctx->Fog.Enabled ) +TCL_CHECK( tcl, GL_TRUE ) +TCL_CHECK( tcl_tex0, ctx->Texture.Unit[0]._ReallyEnabled ) +TCL_CHECK( tcl_tex1, ctx->Texture.Unit[1]._ReallyEnabled ) +TCL_CHECK( tcl_lighting, ctx->Light.Enabled ) +TCL_CHECK( tcl_eyespace_or_lighting, ctx->_NeedEyeCoords || ctx->Light.Enabled ) +TCL_CHECK( tcl_lit0, ctx->Light.Enabled && ctx->Light.Light[0].Enabled ) +TCL_CHECK( tcl_lit1, ctx->Light.Enabled && ctx->Light.Light[1].Enabled ) +TCL_CHECK( tcl_lit2, ctx->Light.Enabled && ctx->Light.Light[2].Enabled ) +TCL_CHECK( tcl_lit3, ctx->Light.Enabled && ctx->Light.Light[3].Enabled ) +TCL_CHECK( tcl_lit4, ctx->Light.Enabled && ctx->Light.Light[4].Enabled ) +TCL_CHECK( tcl_lit5, ctx->Light.Enabled && ctx->Light.Light[5].Enabled ) +TCL_CHECK( tcl_lit6, ctx->Light.Enabled && ctx->Light.Light[6].Enabled ) +TCL_CHECK( tcl_lit7, ctx->Light.Enabled && ctx->Light.Light[7].Enabled ) +TCL_CHECK( tcl_ucp0, ctx->Transform.ClipEnabled[0] ) +TCL_CHECK( tcl_ucp1, ctx->Transform.ClipEnabled[1] ) +TCL_CHECK( tcl_ucp2, ctx->Transform.ClipEnabled[2] ) +TCL_CHECK( tcl_ucp3, ctx->Transform.ClipEnabled[3] ) +TCL_CHECK( tcl_ucp4, ctx->Transform.ClipEnabled[4] ) +TCL_CHECK( tcl_ucp5, ctx->Transform.ClipEnabled[5] ) +TCL_CHECK( tcl_eyespace_or_fog, ctx->_NeedEyeCoords || ctx->Fog.Enabled ) + + + +/* Initialize the context's hardware state. + */ +void radeonInitState( radeonContextPtr rmesa ) +{ + GLcontext *ctx = rmesa->glCtx; + GLuint color_fmt, depth_fmt, i; + + 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->state.color.clear = 0x00000000; + + switch ( ctx->Visual.depthBits ) { + case 16: + rmesa->state.depth.clear = 0x0000ffff; + rmesa->state.depth.scale = 1.0 / (GLfloat)0xffff; + depth_fmt = RADEON_DEPTH_FORMAT_16BIT_INT_Z; + rmesa->state.stencil.clear = 0x00000000; + break; + case 24: + rmesa->state.depth.clear = 0x00ffffff; + rmesa->state.depth.scale = 1.0 / (GLfloat)0xffffff; + depth_fmt = RADEON_DEPTH_FORMAT_24BIT_INT_Z; + rmesa->state.stencil.clear = 0xff000000; + break; + default: + fprintf( stderr, "Error: Unsupported depth %d... exiting\n", + ctx->Visual.depthBits ); + exit( -1 ); + } + + /* Only have hw stencil when depth buffer is 24 bits deep */ + rmesa->state.stencil.hwBuffer = ( ctx->Visual.stencilBits > 0 && + ctx->Visual.depthBits == 24 ); + + rmesa->Fallback = 0; + + if ( ctx->Visual.doubleBufferMode && rmesa->sarea->pfCurrentPage == 0 ) { + rmesa->state.color.drawOffset = rmesa->radeonScreen->backOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->backPitch; + } else { + rmesa->state.color.drawOffset = rmesa->radeonScreen->frontOffset; + rmesa->state.color.drawPitch = rmesa->radeonScreen->frontPitch; + } + rmesa->state.pixel.readOffset = rmesa->state.color.drawOffset; + rmesa->state.pixel.readPitch = rmesa->state.color.drawPitch; + + /* Initialize lists: + */ + make_empty_list(&(rmesa->hw.dirty)); + make_empty_list(&(rmesa->hw.clean)); + + +#define ALLOC_STATE( ATOM, CHK, SZ, NM, FLAG ) \ + do { \ + rmesa->hw.ATOM.cmd_size = SZ; \ + rmesa->hw.ATOM.cmd = (int *)CALLOC(SZ * sizeof(int)); \ + rmesa->hw.ATOM.lastcmd = (int *)CALLOC(SZ * sizeof(int)); \ + rmesa->hw.ATOM.name = NM; \ + rmesa->hw.ATOM.is_tcl = FLAG; \ + rmesa->hw.ATOM.check = check_##CHK; \ + insert_at_head(&(rmesa->hw.dirty), &(rmesa->hw.ATOM)); \ + } while (0) + + + /* Allocate state buffers: + */ + ALLOC_STATE( ctx, always, CTX_STATE_SIZE, "CTX/context", 0 ); + ALLOC_STATE( lin, always, LIN_STATE_SIZE, "LIN/line", 0 ); + ALLOC_STATE( msk, always, MSK_STATE_SIZE, "MSK/mask", 0 ); + ALLOC_STATE( vpt, always, VPT_STATE_SIZE, "VPT/viewport", 0 ); + ALLOC_STATE( set, always, SET_STATE_SIZE, "SET/setup", 0 ); + ALLOC_STATE( msc, always, MSC_STATE_SIZE, "MSC/misc", 0 ); + ALLOC_STATE( zbs, always, ZBS_STATE_SIZE, "ZBS/zbias", 0 ); + ALLOC_STATE( tcl, always, TCL_STATE_SIZE, "TCL/tcl", 1 ); + ALLOC_STATE( mtl, tcl_lighting, MTL_STATE_SIZE, "MTL/material", 1 ); + ALLOC_STATE( grd, always, GRD_STATE_SIZE, "GRD/guard-band", 1 ); + ALLOC_STATE( fog, fog, FOG_STATE_SIZE, "FOG/fog", 1 ); + ALLOC_STATE( glt, tcl_lighting, GLT_STATE_SIZE, "GLT/light-global", 1 ); + ALLOC_STATE( eye, tcl_lighting, EYE_STATE_SIZE, "EYE/eye-vector", 1 ); + ALLOC_STATE( tex[0], tex0, TEX_STATE_SIZE, "TEX/tex-0", 0 ); + ALLOC_STATE( tex[1], tex1, TEX_STATE_SIZE, "TEX/tex-1", 0 ); + ALLOC_STATE( mat[0], tcl, MAT_STATE_SIZE, "MAT/modelproject", 1 ); + ALLOC_STATE( mat[1], tcl_eyespace_or_fog, MAT_STATE_SIZE, "MAT/modelview", 1 ); + ALLOC_STATE( mat[2], tcl_eyespace_or_lighting, MAT_STATE_SIZE, "MAT/it-modelview", 1 ); + ALLOC_STATE( mat[3], tcl_tex0, MAT_STATE_SIZE, "MAT/texmat0", 1 ); + ALLOC_STATE( mat[4], tcl_tex1, MAT_STATE_SIZE, "MAT/texmat1", 1 ); + ALLOC_STATE( ucp[0], tcl_ucp0, UCP_STATE_SIZE, "UCP/userclip-0", 1 ); + ALLOC_STATE( ucp[1], tcl_ucp1, UCP_STATE_SIZE, "UCP/userclip-1", 1 ); + ALLOC_STATE( ucp[2], tcl_ucp2, UCP_STATE_SIZE, "UCP/userclip-2", 1 ); + ALLOC_STATE( ucp[3], tcl_ucp3, UCP_STATE_SIZE, "UCP/userclip-3", 1 ); + ALLOC_STATE( ucp[4], tcl_ucp4, UCP_STATE_SIZE, "UCP/userclip-4", 1 ); + ALLOC_STATE( ucp[5], tcl_ucp5, UCP_STATE_SIZE, "UCP/userclip-5", 1 ); + ALLOC_STATE( lit[0], tcl_lit0, LIT_STATE_SIZE, "LIT/light-0", 1 ); + ALLOC_STATE( lit[1], tcl_lit1, LIT_STATE_SIZE, "LIT/light-1", 1 ); + ALLOC_STATE( lit[2], tcl_lit2, LIT_STATE_SIZE, "LIT/light-2", 1 ); + ALLOC_STATE( lit[3], tcl_lit3, LIT_STATE_SIZE, "LIT/light-3", 1 ); + ALLOC_STATE( lit[4], tcl_lit4, LIT_STATE_SIZE, "LIT/light-4", 1 ); + ALLOC_STATE( lit[5], tcl_lit5, LIT_STATE_SIZE, "LIT/light-5", 1 ); + ALLOC_STATE( lit[6], tcl_lit6, LIT_STATE_SIZE, "LIT/light-6", 1 ); + ALLOC_STATE( lit[7], tcl_lit7, LIT_STATE_SIZE, "LIT/light-7", 1 ); + + + /* Fill in the packet headers: + */ + rmesa->hw.ctx.cmd[CTX_CMD_0] = cmdpkt(RADEON_EMIT_PP_MISC); + rmesa->hw.ctx.cmd[CTX_CMD_1] = cmdpkt(RADEON_EMIT_PP_CNTL); + rmesa->hw.ctx.cmd[CTX_CMD_2] = cmdpkt(RADEON_EMIT_RB3D_COLORPITCH); + rmesa->hw.lin.cmd[LIN_CMD_0] = cmdpkt(RADEON_EMIT_RE_LINE_PATTERN); + rmesa->hw.lin.cmd[LIN_CMD_1] = cmdpkt(RADEON_EMIT_SE_LINE_WIDTH); + rmesa->hw.msk.cmd[MSK_CMD_0] = cmdpkt(RADEON_EMIT_RB3D_STENCILREFMASK); + rmesa->hw.vpt.cmd[VPT_CMD_0] = cmdpkt(RADEON_EMIT_SE_VPORT_XSCALE); + rmesa->hw.set.cmd[SET_CMD_0] = cmdpkt(RADEON_EMIT_SE_CNTL); + rmesa->hw.set.cmd[SET_CMD_1] = cmdpkt(RADEON_EMIT_SE_CNTL_STATUS); + rmesa->hw.msc.cmd[MSC_CMD_0] = cmdpkt(RADEON_EMIT_RE_MISC); + rmesa->hw.tex[0].cmd[TEX_CMD_0] = cmdpkt(RADEON_EMIT_PP_TXFILTER_0); + rmesa->hw.tex[0].cmd[TEX_CMD_1] = cmdpkt(RADEON_EMIT_PP_BORDER_COLOR_0); + rmesa->hw.tex[1].cmd[TEX_CMD_0] = cmdpkt(RADEON_EMIT_PP_TXFILTER_1); + rmesa->hw.tex[1].cmd[TEX_CMD_1] = cmdpkt(RADEON_EMIT_PP_BORDER_COLOR_1); + rmesa->hw.zbs.cmd[ZBS_CMD_0] = cmdpkt(RADEON_EMIT_SE_ZBIAS_FACTOR); + rmesa->hw.tcl.cmd[TCL_CMD_0] = cmdpkt(RADEON_EMIT_SE_TCL_OUTPUT_VTX_FMT); + rmesa->hw.mtl.cmd[MTL_CMD_0] = + cmdpkt(RADEON_EMIT_SE_TCL_MATERIAL_EMMISSIVE_RED); + rmesa->hw.grd.cmd[GRD_CMD_0] = + cmdscl( RADEON_SS_VERT_GUARD_CLIP_ADJ_ADDR, 1, 4 ); + rmesa->hw.fog.cmd[FOG_CMD_0] = + cmdvec( RADEON_VS_FOG_PARAM_ADDR, 1, 4 ); + rmesa->hw.glt.cmd[GLT_CMD_0] = + cmdvec( RADEON_VS_GLOBAL_AMBIENT_ADDR, 1, 4 ); + rmesa->hw.eye.cmd[EYE_CMD_0] = + cmdvec( RADEON_VS_EYE_VECTOR_ADDR, 1, 4 ); + + for (i = 0 ; i < 5; i++) { + rmesa->hw.mat[i].cmd[MAT_CMD_0] = + cmdvec( RADEON_VS_MATRIX_0_ADDR + i*4, 1, 16); + } + + for (i = 0 ; i < 8; i++) { + rmesa->hw.lit[i].cmd[LIT_CMD_0] = + cmdvec( RADEON_VS_LIGHT_AMBIENT_ADDR + i, 8, 24 ); + rmesa->hw.lit[i].cmd[LIT_CMD_1] = + cmdscl( RADEON_SS_LIGHT_DCD_ADDR + i, 8, 6 ); + } + + for (i = 0 ; i < 6; i++) { + rmesa->hw.ucp[i].cmd[UCP_CMD_0] = + cmdvec( RADEON_VS_UCP_ADDR + i, 1, 4 ); + } + + rmesa->last_ReallyEnabled = -1; + + /* Initial Harware state: + */ + rmesa->hw.ctx.cmd[CTX_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->hw.ctx.cmd[CTX_PP_FOG_COLOR] = (RADEON_FOG_VERTEX | + RADEON_FOG_USE_DEPTH); + + rmesa->hw.ctx.cmd[CTX_RE_SOLID_COLOR] = 0x00000000; + + rmesa->hw.ctx.cmd[CTX_RB3D_BLENDCNTL] = (RADEON_COMB_FCN_ADD_CLAMP | + RADEON_SRC_BLEND_GL_ONE | + RADEON_DST_BLEND_GL_ZERO ); + + rmesa->hw.ctx.cmd[CTX_RB3D_DEPTHOFFSET] = + rmesa->radeonScreen->depthOffset; + + rmesa->hw.ctx.cmd[CTX_RB3D_DEPTHPITCH] = + ((rmesa->radeonScreen->depthPitch & + RADEON_DEPTHPITCH_MASK) | + RADEON_DEPTH_ENDIAN_NO_SWAP); + + rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] = (depth_fmt | + RADEON_Z_TEST_LESS | + RADEON_STENCIL_TEST_ALWAYS | + RADEON_STENCIL_FAIL_KEEP | + RADEON_STENCIL_ZPASS_KEEP | + RADEON_STENCIL_ZFAIL_KEEP | + RADEON_Z_WRITE_ENABLE); + + rmesa->hw.ctx.cmd[CTX_PP_CNTL] = (RADEON_SCISSOR_ENABLE | + RADEON_ANTI_ALIAS_NONE); + + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] = (RADEON_PLANE_MASK_ENABLE | + color_fmt | + (1<<15)); + + rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |= RADEON_DITHER_ENABLE; + + rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = (rmesa->state.color.drawOffset & + RADEON_COLOROFFSET_MASK); + + rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = ((rmesa->state.color.drawPitch & + RADEON_COLORPITCH_MASK) | + RADEON_COLOR_ENDIAN_NO_SWAP); + + rmesa->hw.set.cmd[SET_SE_CNTL] = (RADEON_FFACE_CULL_CCW | + RADEON_BFACE_SOLID | + RADEON_FFACE_SOLID | +/* RADEON_BADVTX_CULL_DISABLE | */ + 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->hw.set.cmd[SET_SE_CNTL_STATUS] = +#ifdef MESA_BIG_ENDIAN + RADEON_VC_32BIT_SWAP; +#else + RADEON_VC_NO_SWAP; +#endif + + if (!(rmesa->radeonScreen->chipset & RADEON_CHIPSET_TCL)) { + rmesa->hw.set.cmd[SET_SE_CNTL_STATUS] |= RADEON_TCL_BYPASS; + } + + rmesa->hw.set.cmd[SET_SE_COORDFMT] = ( + RADEON_VTX_W0_IS_NOT_1_OVER_W0 | + RADEON_TEX1_W_ROUTING_USE_Q1); + + + rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] = ((1 << 16) | 0xffff); + + rmesa->hw.lin.cmd[LIN_RE_LINE_STATE] = + ((0 << RADEON_LINE_CURRENT_PTR_SHIFT) | + (1 << RADEON_LINE_CURRENT_COUNT_SHIFT)); + + rmesa->hw.lin.cmd[LIN_SE_LINE_WIDTH] = (1 << 4); + + rmesa->hw.msk.cmd[MSK_RB3D_STENCILREFMASK] = + ((0x00 << RADEON_STENCIL_REF_SHIFT) | + (0xff << RADEON_STENCIL_MASK_SHIFT) | + (0xff << RADEON_STENCIL_WRITEMASK_SHIFT)); + + rmesa->hw.msk.cmd[MSK_RB3D_ROPCNTL] = RADEON_ROP_COPY; + rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK] = 0xffffffff; + + rmesa->hw.msc.cmd[MSC_RE_MISC] = + ((0 << RADEON_STIPPLE_X_OFFSET_SHIFT) | + (0 << RADEON_STIPPLE_Y_OFFSET_SHIFT) | + RADEON_STIPPLE_BIG_BIT_ORDER); + + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XSCALE] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_XOFFSET] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YSCALE] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_YOFFSET] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZSCALE] = 0x00000000; + rmesa->hw.vpt.cmd[VPT_SE_VPORT_ZOFFSET] = 0x00000000; + + rmesa->hw.tex[0].cmd[TEX_PP_TXFILTER] = RADEON_BORDER_MODE_OGL; + rmesa->hw.tex[0].cmd[TEX_PP_TXFORMAT] = + (RADEON_TXFORMAT_ENDIAN_NO_SWAP | + RADEON_TXFORMAT_PERSPECTIVE_ENABLE | + RADEON_TXFORMAT_ST_ROUTE_STQ0 | + (2 << RADEON_TXFORMAT_WIDTH_SHIFT) | + (2 << RADEON_TXFORMAT_HEIGHT_SHIFT)); + rmesa->hw.tex[0].cmd[TEX_PP_TXOFFSET] = 0x2000; + rmesa->hw.tex[0].cmd[TEX_PP_BORDER_COLOR] = 0; + rmesa->hw.tex[0].cmd[TEX_PP_TXCBLEND] = + (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); + rmesa->hw.tex[0].cmd[TEX_PP_TXABLEND] = + (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); + rmesa->hw.tex[0].cmd[TEX_PP_TFACTOR] = 0; + + rmesa->hw.tex[1].cmd[TEX_PP_TXFILTER] = RADEON_BORDER_MODE_OGL; + rmesa->hw.tex[1].cmd[TEX_PP_TXFORMAT] = + (RADEON_TXFORMAT_ENDIAN_NO_SWAP | + RADEON_TXFORMAT_PERSPECTIVE_ENABLE | + RADEON_TXFORMAT_ST_ROUTE_STQ1 | + (2 << RADEON_TXFORMAT_WIDTH_SHIFT) | + (2 << RADEON_TXFORMAT_HEIGHT_SHIFT)); + rmesa->hw.tex[1].cmd[TEX_PP_TXOFFSET] = 0x8000; + rmesa->hw.tex[1].cmd[TEX_PP_BORDER_COLOR] = 0; + rmesa->hw.tex[1].cmd[TEX_PP_TXCBLEND] = + (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); + rmesa->hw.tex[1].cmd[TEX_PP_TXABLEND] = + (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); + rmesa->hw.tex[1].cmd[TEX_PP_TFACTOR] = 0; + + /* Can oly add ST1 at the time of doing some multitex but can keep + * it after that. Errors if DIFFUSE is missing. + */ + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] = + (RADEON_TCL_VTX_Z0 | + RADEON_TCL_VTX_W0 | + RADEON_TCL_VTX_PK_DIFFUSE + ); /* need to keep this uptodate */ + + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXSEL] = + ( RADEON_TCL_COMPUTE_XYZW | + (RADEON_TCL_TEX_INPUT_TEX_0 << RADEON_TCL_TEX_0_OUTPUT_SHIFT) | + (RADEON_TCL_TEX_INPUT_TEX_1 << RADEON_TCL_TEX_1_OUTPUT_SHIFT) | + (RADEON_TCL_TEX_INPUT_TEX_2 << RADEON_TCL_TEX_2_OUTPUT_SHIFT)); + + + /* XXX */ + rmesa->hw.tcl.cmd[TCL_MATRIX_SELECT_0] = + ((MODEL << RADEON_MODELVIEW_0_SHIFT) | + (MODEL_IT << RADEON_IT_MODELVIEW_0_SHIFT)); + + rmesa->hw.tcl.cmd[TCL_MATRIX_SELECT_1] = + ((MODEL_PROJ << RADEON_MODELPROJECT_0_SHIFT) | + (TEXMAT_0 << RADEON_TEXMAT_0_SHIFT) | + (TEXMAT_1 << RADEON_TEXMAT_1_SHIFT)); + + rmesa->hw.tcl.cmd[TCL_UCP_VERT_BLEND_CTL] = + (RADEON_UCP_IN_CLIP_SPACE | + RADEON_CULL_FRONT_IS_CCW); + + rmesa->hw.tcl.cmd[TCL_TEXTURE_PROC_CTL] = 0; + + rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] = + (RADEON_SPECULAR_LIGHTS | + RADEON_DIFFUSE_SPECULAR_COMBINE | + RADEON_LOCAL_LIGHT_VEC_GL | + (RADEON_LM_SOURCE_STATE_PREMULT << RADEON_EMISSIVE_SOURCE_SHIFT) | + (RADEON_LM_SOURCE_STATE_PREMULT << RADEON_AMBIENT_SOURCE_SHIFT) | + (RADEON_LM_SOURCE_STATE_PREMULT << RADEON_DIFFUSE_SOURCE_SHIFT) | + (RADEON_LM_SOURCE_STATE_PREMULT << RADEON_SPECULAR_SOURCE_SHIFT)); + + for (i = 0 ; i < 8; i++) { + struct gl_light *l = &ctx->Light.Light[i]; + GLenum p = GL_LIGHT0 + i; + *(float *)&(rmesa->hw.lit[i].cmd[LIT_RANGE_CUTOFF]) = FLT_MAX; + + ctx->Driver.Lightfv( ctx, p, GL_AMBIENT, l->Ambient ); + ctx->Driver.Lightfv( ctx, p, GL_DIFFUSE, l->Diffuse ); + ctx->Driver.Lightfv( ctx, p, GL_SPECULAR, l->Specular ); + ctx->Driver.Lightfv( ctx, p, GL_POSITION, 0 ); + ctx->Driver.Lightfv( ctx, p, GL_SPOT_DIRECTION, 0 ); + ctx->Driver.Lightfv( ctx, p, GL_SPOT_EXPONENT, &l->SpotExponent ); + ctx->Driver.Lightfv( ctx, p, GL_SPOT_CUTOFF, &l->SpotCutoff ); + ctx->Driver.Lightfv( ctx, p, GL_CONSTANT_ATTENUATION, + &l->ConstantAttenuation ); + ctx->Driver.Lightfv( ctx, p, GL_LINEAR_ATTENUATION, + &l->LinearAttenuation ); + ctx->Driver.Lightfv( ctx, p, GL_QUADRATIC_ATTENUATION, + &l->QuadraticAttenuation ); + } + + ctx->Driver.LightModelfv( ctx, GL_LIGHT_MODEL_AMBIENT, + ctx->Light.Model.Ambient ); + + TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange( ctx ); + + for (i = 0 ; i < 6; i++) { + ctx->Driver.ClipPlane( ctx, GL_CLIP_PLANE0 + i, NULL ); + } + + ctx->Driver.Fogfv( ctx, GL_FOG_MODE, 0 ); + ctx->Driver.Fogfv( ctx, GL_FOG_DENSITY, &ctx->Fog.Density ); + ctx->Driver.Fogfv( ctx, GL_FOG_START, &ctx->Fog.Start ); + ctx->Driver.Fogfv( ctx, GL_FOG_END, &ctx->Fog.End ); + ctx->Driver.Fogfv( ctx, GL_FOG_COLOR, ctx->Fog.Color ); + ctx->Driver.Fogfv( ctx, GL_FOG_COORDINATE_SOURCE_EXT, 0 ); + + + /* Set up vector and scalar state commands: + */ +/* upload_matrix( rmesa, ctx->ModelView.m, MODEL ); */ +/* upload_matrix_t( rmesa, ctx->ModelView.inv, MODEL_IT ); */ +/* upload_matrix( rmesa, ctx->TextureMatrix[0].m, TEXMAT_0 ); */ +/* upload_matrix( rmesa, ctx->TextureMatrix[1].m, TEXMAT_1 ); */ +/* upload_matrix( rmesa, ctx->_ModelProjectMatrix.m, TEXMAT_2 ); */ + + rmesa->hw.grd.cmd[GRD_VERT_GUARD_CLIP_ADJ] = IEEE_ONE; + rmesa->hw.grd.cmd[GRD_VERT_GUARD_DISCARD_ADJ] = IEEE_ONE; + rmesa->hw.grd.cmd[GRD_HORZ_GUARD_CLIP_ADJ] = IEEE_ONE; + rmesa->hw.grd.cmd[GRD_HORZ_GUARD_DISCARD_ADJ] = IEEE_ONE; + + rmesa->hw.eye.cmd[EYE_X] = 0; + rmesa->hw.eye.cmd[EYE_Y] = 0; + rmesa->hw.eye.cmd[EYE_Z] = IEEE_ONE; + rmesa->hw.eye.cmd[EYE_RESCALE_FACTOR] = IEEE_ONE; +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_swtcl.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_swtcl.c:1.4 --- /dev/null Thu Feb 27 12:26:33 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_swtcl.c Sat Feb 15 17:18:48 2003 @@ -0,0 +1,1189 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_swtcl.c,v 1.4 2003/02/15 22:18:48 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: + * Keith Whitwell + * + */ + +#include "glheader.h" +#include "mtypes.h" +#include "colormac.h" +#include "enums.h" +#include "mem.h" +#include "mmath.h" +#include "macros.h" + +#include "swrast_setup/swrast_setup.h" +#include "math/m_translate.h" +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + +#include "radeon_context.h" +#include "radeon_ioctl.h" +#include "radeon_state.h" +#include "radeon_swtcl.h" +#include "radeon_tcl.h" + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + + +#define RADEON_XYZW_BIT 0x01 +#define RADEON_RGBA_BIT 0x02 +#define RADEON_SPEC_BIT 0x04 +#define RADEON_TEX0_BIT 0x08 +#define RADEON_TEX1_BIT 0x10 +#define RADEON_PTEX_BIT 0x20 +#define RADEON_MAX_SETUP 0x40 + +static void flush_last_swtcl_prim( radeonContextPtr rmesa ); +static void flush_last_swtcl_prim_compat( radeonContextPtr rmesa ); + +static struct { + void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint ); + interp_func interp; + copy_pv_func copy_pv; + GLboolean (*check_tex_sizes)( GLcontext *ctx ); + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; +} setup_tab[RADEON_MAX_SETUP]; + + +#define TINY_VERTEX_FORMAT (RADEON_CP_VC_FRMT_XY | \ + RADEON_CP_VC_FRMT_Z | \ + RADEON_CP_VC_FRMT_PKCOLOR) + +#define NOTEX_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) + +#define 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 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) + +#define 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_Q0 | \ + RADEON_CP_VC_FRMT_ST1 | \ + RADEON_CP_VC_FRMT_Q1) + +#define TEX2_VERTEX_FORMAT 0 +#define TEX3_VERTEX_FORMAT 0 +#define PROJ_TEX3_VERTEX_FORMAT 0 + +#define DO_XYZW (IND & RADEON_XYZW_BIT) +#define DO_RGBA (IND & RADEON_RGBA_BIT) +#define DO_SPEC (IND & RADEON_SPEC_BIT) +#define DO_FOG (IND & RADEON_SPEC_BIT) +#define DO_TEX0 (IND & RADEON_TEX0_BIT) +#define DO_TEX1 (IND & RADEON_TEX1_BIT) +#define DO_TEX2 0 +#define DO_TEX3 0 +#define DO_PTEX (IND & RADEON_PTEX_BIT) + +#define VERTEX radeonVertex +#define VERTEX_COLOR radeon_color_t +#define GET_VIEWPORT_MAT() 0 +#define GET_TEXSOURCE(n) n +#define GET_VERTEX_FORMAT() RADEON_CONTEXT(ctx)->swtcl.vertex_format +#define GET_VERTEX_STORE() RADEON_CONTEXT(ctx)->swtcl.verts +#define GET_VERTEX_STRIDE_SHIFT() RADEON_CONTEXT(ctx)->swtcl.vertex_stride_shift +#define GET_UBYTE_COLOR_STORE() &RADEON_CONTEXT(ctx)->UbyteColor +#define GET_UBYTE_SPEC_COLOR_STORE() &RADEON_CONTEXT(ctx)->UbyteSecondaryColor + +#define HAVE_HW_VIEWPORT 1 +/* Tiny vertices don't seem to work atm - haven't looked into why. + */ +#define HAVE_HW_DIVIDE (IND & ~(RADEON_XYZW_BIT|RADEON_RGBA_BIT)) +#define HAVE_TINY_VERTICES 1 +#define HAVE_RGBA_COLOR 1 +#define HAVE_NOTEX_VERTICES 1 +#define HAVE_TEX0_VERTICES 1 +#define HAVE_TEX1_VERTICES 1 +#define HAVE_TEX2_VERTICES 0 +#define HAVE_TEX3_VERTICES 0 +#define HAVE_PTEX_VERTICES 1 + +#define CHECK_HW_DIVIDE (!(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE| \ + DD_TRI_UNFILLED))) + +#define IMPORT_QUALIFIER +#define IMPORT_FLOAT_COLORS radeon_import_float_colors +#define IMPORT_FLOAT_SPEC_COLORS radeon_import_float_spec_colors + +#define INTERP_VERTEX setup_tab[RADEON_CONTEXT(ctx)->swtcl.SetupIndex].interp +#define COPY_PV_VERTEX setup_tab[RADEON_CONTEXT(ctx)->swtcl.SetupIndex].copy_pv + + +/*********************************************************************** + * Generate pv-copying and translation functions * + ***********************************************************************/ + +#define TAG(x) radeon_##x +#define IND ~0 +#include "tnl_dd/t_dd_vb.c" +#undef IND + + +/*********************************************************************** + * Generate vertex emit and interp functions * + ***********************************************************************/ + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT) +#define TAG(x) x##_wg +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT|RADEON_TEX0_BIT) +#define TAG(x) x##_wgt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT|RADEON_TEX0_BIT|RADEON_PTEX_BIT) +#define TAG(x) x##_wgpt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT) +#define TAG(x) x##_wgt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT|RADEON_TEX0_BIT|RADEON_TEX1_BIT|\ + RADEON_PTEX_BIT) +#define TAG(x) x##_wgpt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT|RADEON_SPEC_BIT) +#define TAG(x) x##_wgfs +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT|RADEON_SPEC_BIT|\ + RADEON_TEX0_BIT) +#define TAG(x) x##_wgfst0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT|RADEON_SPEC_BIT|\ + RADEON_TEX0_BIT|RADEON_PTEX_BIT) +#define TAG(x) x##_wgfspt0 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT|RADEON_SPEC_BIT|\ + RADEON_TEX0_BIT|RADEON_TEX1_BIT) +#define TAG(x) x##_wgfst0t1 +#include "tnl_dd/t_dd_vbtmp.h" + +#define IND (RADEON_XYZW_BIT|RADEON_RGBA_BIT|RADEON_SPEC_BIT|\ + RADEON_TEX0_BIT|RADEON_TEX1_BIT|RADEON_PTEX_BIT) +#define TAG(x) x##_wgfspt0t1 +#include "tnl_dd/t_dd_vbtmp.h" + + +/*********************************************************************** + * Initialization + ***********************************************************************/ + +static void init_setup_tab( void ) +{ + init_wg(); + init_wgt0(); + init_wgpt0(); + init_wgt0t1(); + init_wgpt0t1(); + init_wgfs(); + init_wgfst0(); + init_wgfspt0(); + init_wgfst0t1(); + init_wgfspt0t1(); +} + + + +void radeonPrintSetupFlags(char *msg, GLuint flags ) +{ + fprintf(stderr, "%s(%x): %s%s%s%s%s%s\n", + msg, + (int)flags, + (flags & RADEON_XYZW_BIT) ? " xyzw," : "", + (flags & RADEON_RGBA_BIT) ? " rgba," : "", + (flags & RADEON_SPEC_BIT) ? " spec/fog," : "", + (flags & RADEON_TEX0_BIT) ? " tex-0," : "", + (flags & RADEON_TEX1_BIT) ? " tex-1," : "", + (flags & RADEON_PTEX_BIT) ? " proj-tex," : ""); +} + + +static void radeonRenderStart( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + if (!setup_tab[rmesa->swtcl.SetupIndex].check_tex_sizes(ctx)) { + GLuint ind = rmesa->swtcl.SetupIndex |= (RADEON_PTEX_BIT|RADEON_RGBA_BIT); + + /* Radeon handles projective textures nicely; just have to change + * up to the new vertex format. + */ + if (setup_tab[ind].vertex_format != rmesa->swtcl.vertex_format) { + RADEON_NEWPRIM(rmesa); + rmesa->swtcl.vertex_format = setup_tab[ind].vertex_format; + rmesa->swtcl.vertex_size = setup_tab[ind].vertex_size; + rmesa->swtcl.vertex_stride_shift = setup_tab[ind].vertex_stride_shift; + } + + if (!(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { + tnl->Driver.Render.Interp = setup_tab[rmesa->swtcl.SetupIndex].interp; + tnl->Driver.Render.CopyPV = setup_tab[rmesa->swtcl.SetupIndex].copy_pv; + } + } + + if (rmesa->dma.flush != 0 && + rmesa->dma.flush != flush_last_swtcl_prim && + rmesa->dma.flush != flush_last_swtcl_prim_compat) + rmesa->dma.flush( rmesa ); +} + + +void radeonBuildVertices( GLcontext *ctx, GLuint start, GLuint count, + GLuint newinputs ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + GLubyte *v = ((GLubyte *)rmesa->swtcl.verts + + (start << rmesa->swtcl.vertex_stride_shift)); + GLuint stride = 1 << rmesa->swtcl.vertex_stride_shift; + + newinputs |= rmesa->swtcl.SetupNewInputs; + rmesa->swtcl.SetupNewInputs = 0; + + if (!newinputs) + return; + + setup_tab[rmesa->swtcl.SetupIndex].emit( ctx, start, count, v, stride ); +} + +void radeonChooseVertexState( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint ind = (RADEON_XYZW_BIT | RADEON_RGBA_BIT); + + if (!rmesa->TclFallback || rmesa->Fallback) + return; + + if (ctx->Fog.Enabled || (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)) + ind |= RADEON_SPEC_BIT; + + if (ctx->Texture._ReallyEnabled & TEXTURE1_ANY) + ind |= RADEON_TEX0_BIT|RADEON_TEX1_BIT; + else if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) + ind |= RADEON_TEX0_BIT; + + rmesa->swtcl.SetupIndex = ind; + + if (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED)) { + tnl->Driver.Render.Interp = radeon_interp_extras; + tnl->Driver.Render.CopyPV = radeon_copy_pv_extras; + } + else { + tnl->Driver.Render.Interp = setup_tab[ind].interp; + tnl->Driver.Render.CopyPV = setup_tab[ind].copy_pv; + } + + if (setup_tab[ind].vertex_format != rmesa->swtcl.vertex_format) { + RADEON_NEWPRIM(rmesa); + rmesa->swtcl.vertex_format = setup_tab[ind].vertex_format; + rmesa->swtcl.vertex_size = setup_tab[ind].vertex_size; + rmesa->swtcl.vertex_stride_shift = setup_tab[ind].vertex_stride_shift; + } + + { + GLuint se_coord_fmt, needproj; + + /* HW perspective divide is a win, but tiny vertex formats are a + * bigger one. + */ + if (setup_tab[ind].vertex_format == TINY_VERTEX_FORMAT || + (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { + needproj = GL_TRUE; + 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); + } + else { + needproj = GL_FALSE; + se_coord_fmt = (RADEON_VTX_W0_IS_NOT_1_OVER_W0 | + RADEON_TEX1_W_ROUTING_USE_Q1); + } + + if ( se_coord_fmt != rmesa->hw.set.cmd[SET_SE_COORDFMT] ) { + RADEON_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_SE_COORDFMT] = se_coord_fmt; + } + _tnl_need_projected_coords( ctx, needproj ); + } +} + + +/* Flush vertices in the current dma region. + */ +static void flush_last_swtcl_prim( radeonContextPtr rmesa ) +{ + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->dma.current.buf) { + struct radeon_dma_region *current = &rmesa->dma.current; + GLuint current_offset = (rmesa->radeonScreen->agp_buffer_offset + + current->buf->buf->idx * RADEON_BUFFER_SIZE + + current->start); + + assert (!(rmesa->swtcl.hw_primitive & RADEON_CP_VC_CNTL_PRIM_WALK_IND)); + + assert (current->start + + rmesa->swtcl.numverts * rmesa->swtcl.vertex_size * 4 == + current->ptr); + + if (rmesa->dma.current.start != rmesa->dma.current.ptr) { + radeonEmitVertexAOS( rmesa, + rmesa->swtcl.vertex_size, + current_offset); + + radeonEmitVbufPrim( rmesa, + rmesa->swtcl.vertex_format, + rmesa->swtcl.hw_primitive, + rmesa->swtcl.numverts); + } + + rmesa->swtcl.numverts = 0; + current->start = current->ptr; + + rmesa->dma.flush = 0; + } +} + + +static void flush_last_swtcl_prim_compat( radeonContextPtr rmesa ) +{ + struct radeon_dma_region *current = &rmesa->dma.current; + + if (RADEON_DEBUG & DEBUG_IOCTL) + fprintf(stderr, "%s buf %p start %d ptr %d\n", + __FUNCTION__, + current->buf, + current->start, + current->ptr); + + assert (!(rmesa->swtcl.hw_primitive & RADEON_CP_VC_CNTL_PRIM_WALK_IND)); + assert (current->start + + rmesa->swtcl.numverts * rmesa->swtcl.vertex_size * 4 == + current->ptr); + assert (current->start == 0); + + if (current->ptr && current->buf) { + assert (current->buf->refcount == 1); + + radeonCompatEmitPrimitive( rmesa, + rmesa->swtcl.vertex_format, + rmesa->swtcl.hw_primitive, + rmesa->swtcl.numverts); + + /* The buffer has been released: + */ + FREE(current->buf); + current->buf = 0; + current->start = 0; + current->ptr = current->end; + + } + + rmesa->swtcl.numverts = 0; + rmesa->dma.flush = 0; +} + + +/* Alloc space in the current dma region. + */ +static __inline void *radeonAllocDmaLowVerts( radeonContextPtr rmesa, + int nverts, int vsize ) +{ + GLuint bytes = vsize * nverts; + + if ( rmesa->dma.current.ptr + bytes > rmesa->dma.current.end ) + radeonRefillCurrentDmaRegion( rmesa ); + + if (!rmesa->dma.flush) { + if (rmesa->dri.drmMinor == 1) + rmesa->dma.flush = flush_last_swtcl_prim_compat; + else + rmesa->dma.flush = flush_last_swtcl_prim; + } + + assert( vsize == rmesa->swtcl.vertex_size * 4 ); + assert( rmesa->dma.flush == flush_last_swtcl_prim || + rmesa->dma.flush == flush_last_swtcl_prim_compat); + assert (rmesa->dma.current.start + + rmesa->swtcl.numverts * rmesa->swtcl.vertex_size * 4 == + rmesa->dma.current.ptr); + + + { + GLubyte *head = rmesa->dma.current.address + rmesa->dma.current.ptr; + rmesa->dma.current.ptr += bytes; + rmesa->swtcl.numverts += nverts; + return head; + } + +} + + + + +void radeon_emit_contiguous_verts( GLcontext *ctx, GLuint start, GLuint count ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint vertex_size = rmesa->swtcl.vertex_size * 4; + CARD32 *dest = radeonAllocDmaLowVerts( rmesa, count-start, vertex_size ); + setup_tab[rmesa->swtcl.SetupIndex].emit( ctx, start, count, dest, + vertex_size ); +} + + + +void radeon_emit_indexed_verts( GLcontext *ctx, GLuint start, GLuint count ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + radeonAllocDmaRegionVerts( rmesa, + &rmesa->swtcl.indexed_verts, + count - start, + rmesa->swtcl.vertex_size * 4, + 64); + + setup_tab[rmesa->swtcl.SetupIndex].emit( + ctx, start, count, + rmesa->swtcl.indexed_verts.address + rmesa->swtcl.indexed_verts.start, + rmesa->swtcl.vertex_size * 4 ); +} + + +/* + * Render unclipped vertex buffers by emitting vertices directly to + * dma buffers. Use strip/fan hardware primitives where possible. + * Try to simulate missing primitives with indexed vertices. + */ +#define HAVE_POINTS 1 +#define HAVE_LINES 1 +#define HAVE_LINE_STRIPS 1 +#define HAVE_TRIANGLES 1 +#define HAVE_TRI_STRIPS 1 +#define HAVE_TRI_STRIP_1 0 +#define HAVE_TRI_FANS 1 +#define HAVE_QUADS 0 +#define HAVE_QUAD_STRIPS 0 +#define HAVE_POLYGONS 0 +#define HAVE_ELTS 1 + +static const GLuint hw_prim[GL_POLYGON+1] = { + RADEON_CP_VC_CNTL_PRIM_TYPE_POINT, + RADEON_CP_VC_CNTL_PRIM_TYPE_LINE, + 0, + RADEON_CP_VC_CNTL_PRIM_TYPE_LINE_STRIP, + RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST, + RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_STRIP, + RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN, + 0, + 0, + 0 +}; + +static __inline void radeonDmaPrimitive( radeonContextPtr rmesa, GLenum prim ) +{ + RADEON_NEWPRIM( rmesa ); + rmesa->swtcl.hw_primitive = hw_prim[prim]; + assert(rmesa->dma.current.ptr == rmesa->dma.current.start); +} + +static __inline void radeonEltPrimitive( radeonContextPtr rmesa, GLenum prim ) +{ + RADEON_NEWPRIM( rmesa ); + rmesa->swtcl.hw_primitive = hw_prim[prim] | RADEON_CP_VC_CNTL_PRIM_WALK_IND; +} + + +static void VERT_FALLBACK( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.PrimitiveNotify( ctx, flags & PRIM_MODE_MASK ); + tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 ); + tnl->Driver.Render.PrimTabVerts[flags&PRIM_MODE_MASK]( ctx, start, count, flags ); + RADEON_CONTEXT(ctx)->swtcl.SetupNewInputs = VERT_CLIP; +} + +static void ELT_FALLBACK( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.PrimitiveNotify( ctx, flags & PRIM_MODE_MASK ); + tnl->Driver.Render.BuildVertices( ctx, start, count, ~0 ); + tnl->Driver.Render.PrimTabElts[flags&PRIM_MODE_MASK]( ctx, start, count, flags ); + RADEON_CONTEXT(ctx)->swtcl.SetupNewInputs = VERT_CLIP; +} + + +#define LOCAL_VARS radeonContextPtr rmesa = RADEON_CONTEXT(ctx) +#define ELTS_VARS GLushort *dest +#define INIT( prim ) radeonDmaPrimitive( rmesa, prim ) +#define ELT_INIT(prim) radeonEltPrimitive( rmesa, prim ) +#define NEW_PRIMITIVE() RADEON_NEWPRIM( rmesa ) +#define NEW_BUFFER() radeonRefillCurrentDmaRegion( rmesa ) +#define GET_CURRENT_VB_MAX_VERTS() \ + (((int)rmesa->dma.current.end - (int)rmesa->dma.current.ptr) / (rmesa->swtcl.vertex_size*4)) +#define GET_SUBSEQUENT_VB_MAX_VERTS() \ + ((RADEON_BUFFER_SIZE) / (rmesa->swtcl.vertex_size*4)) + +#if RADEON_OLD_PACKETS +# define GET_CURRENT_VB_MAX_ELTS() \ + ((RADEON_CMD_BUF_SZ - (rmesa->store.cmd_used + 24)) / 2) +#else +# define GET_CURRENT_VB_MAX_ELTS() \ + ((RADEON_CMD_BUF_SZ - (rmesa->store.cmd_used + 16)) / 2) +#endif +#define GET_SUBSEQUENT_VB_MAX_ELTS() \ + ((RADEON_CMD_BUF_SZ - 1024) / 2) + + + +/* How do you extend an existing primitive? + */ +#define ALLOC_ELTS(nr) \ +do { \ + if (rmesa->dma.flush == radeonFlushElts && \ + rmesa->store.cmd_used + nr*2 < RADEON_CMD_BUF_SZ) { \ + \ + dest = (GLushort *)(rmesa->store.cmd_buf + \ + rmesa->store.cmd_used); \ + rmesa->store.cmd_used += nr*2; \ + } \ + else { \ + if (rmesa->dma.flush) { \ + rmesa->dma.flush( rmesa ); \ + } \ + \ + radeonEmitVertexAOS( rmesa, \ + rmesa->swtcl.vertex_size, \ + (rmesa->radeonScreen->agp_buffer_offset + \ + rmesa->swtcl.indexed_verts.buf->buf->idx * \ + RADEON_BUFFER_SIZE + \ + rmesa->swtcl.indexed_verts.start)); \ + \ + dest = radeonAllocEltsOpenEnded( rmesa, \ + rmesa->swtcl.vertex_format, \ + rmesa->swtcl.hw_primitive, \ + nr ); \ + } \ +} while (0) + +#define ALLOC_ELTS_NEW_PRIMITIVE(nr) ALLOC_ELTS( nr ) + +#ifdef MESA_BIG_ENDIAN +/* We could do without (most of) this ugliness if dest was always 32 bit word aligned... */ +#define EMIT_ELT(offset, x) do { \ + int off = offset + ( ( (GLuint)dest & 0x2 ) >> 1 ); \ + GLushort *des = (GLushort *)( (GLuint)dest & ~0x2 ); \ + (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x); } while (0) +#else +#define EMIT_ELT(offset, x) (dest)[offset] = (GLushort) (x) +#endif +#define EMIT_TWO_ELTS(offset, x, y) *(GLuint *)(dest+offset) = ((y)<<16)|(x); +#define INCR_ELTS( nr ) dest += nr +#define RELEASE_ELT_VERTS() \ + radeonReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts, __FUNCTION__ ) +#define EMIT_VERTS( ctx, j, nr ) \ + radeon_emit_contiguous_verts(ctx, j, (j)+(nr)) +#define EMIT_INDEXED_VERTS( ctx, start, count ) \ + radeon_emit_indexed_verts( ctx, start, count ) + + +#define TAG(x) radeon_dma_##x +#include "tnl_dd/t_dd_dmatmp.h" + + +/**********************************************************************/ +/* Render pipeline stage */ +/**********************************************************************/ + + +static GLboolean radeon_run_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint i, length, flags = 0; + render_func *tab = TAG(render_tab_verts); + + if (rmesa->swtcl.indexed_verts.buf && (!VB->Elts || stage->changed_inputs)) + RELEASE_ELT_VERTS(); + + if (VB->ClipOrMask || /* No clipping */ + rmesa->swtcl.RenderIndex != 0 || /* No per-vertex manipulations */ + ctx->Line.StippleFlag) /* GH: THIS IS A HACK!!! */ + return GL_TRUE; + + if (rmesa->dri.drmMinor < 3) { + /* drm 1.1 doesn't support vertex primitives starting in the + * middle of a buffer. It doesn't support sane indexed vertices + * either. drm 1.2 fixes both of these problems, but we don't have a + * compatibility layer to that version yet. + */ + return GL_TRUE; + } + + tnl->Driver.Render.Start( ctx ); + + if (VB->Elts) { + tab = TAG(render_tab_elts); + if (!rmesa->swtcl.indexed_verts.buf) + if (!TAG(emit_elt_verts)(ctx, 0, VB->Count)) + return GL_TRUE; /* too many vertices */ + } + + for (i = 0 ; !(flags & PRIM_LAST) ; i += length) + { + flags = VB->Primitive[i]; + length = VB->PrimitiveLength[i]; + + if (RADEON_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "radeon_render.c: prim %s %d..%d\n", + _mesa_lookup_enum_by_nr(flags & PRIM_MODE_MASK), + i, i+length); + + if (length) + tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags ); + } + + tnl->Driver.Render.Finish( ctx ); + + return GL_FALSE; /* finished the pipe */ +} + + + +static void radeon_check_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + GLuint inputs = VERT_OBJ|VERT_CLIP|VERT_RGBA; + + if (ctx->RenderMode == GL_RENDER) { + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) + inputs |= VERT_SPEC_RGB; + + if (ctx->Texture.Unit[0]._ReallyEnabled) + inputs |= VERT_TEX(0); + + if (ctx->Texture.Unit[1]._ReallyEnabled) + inputs |= VERT_TEX(1); + + if (ctx->Fog.Enabled) + inputs |= VERT_FOG_COORD; + } + + stage->inputs = inputs; +} + + +static void dtr( struct gl_pipeline_stage *stage ) +{ + (void)stage; +} + + +const struct gl_pipeline_stage _radeon_render_stage = +{ + "radeon render", + (_DD_NEW_SEPARATE_SPECULAR | + _NEW_TEXTURE| + _NEW_FOG| + _NEW_RENDERMODE), /* re-check (new inputs) */ + 0, /* re-run (always runs) */ + GL_TRUE, /* active */ + 0, 0, /* inputs (set in check_render), outputs */ + 0, 0, /* changed_inputs, private */ + dtr, /* destructor */ + radeon_check_render, /* check - initially set to alloc data */ + radeon_run_render /* run */ +}; + + + +/**************************************************************************/ + + +static const GLuint reduced_hw_prim[GL_POLYGON+1] = { + RADEON_CP_VC_CNTL_PRIM_TYPE_POINT, + RADEON_CP_VC_CNTL_PRIM_TYPE_LINE, + RADEON_CP_VC_CNTL_PRIM_TYPE_LINE, + RADEON_CP_VC_CNTL_PRIM_TYPE_LINE, + RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST, + RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST, + RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST, + RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST, + RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST, + RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST +}; + +static void radeonRasterPrimitive( GLcontext *ctx, GLuint hwprim ); +static void radeonRenderPrimitive( GLcontext *ctx, GLenum prim ); +static void radeonResetLineStipple( GLcontext *ctx ); + + +/*********************************************************************** + * Emit primitives as inline vertices * + ***********************************************************************/ + +#define CTX_ARG radeonContextPtr rmesa +#define CTX_ARG2 rmesa +#define GET_VERTEX_DWORDS() rmesa->swtcl.vertex_size +#define ALLOC_VERTS( n, size ) radeonAllocDmaLowVerts( rmesa, n, size * 4 ) +#undef LOCAL_VARS +#define LOCAL_VARS \ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ + const GLuint shift = rmesa->swtcl.vertex_stride_shift; \ + const char *radeonverts = (char *)rmesa->swtcl.verts; +#define VERT(x) (radeonVertex *)(radeonverts + (x << shift)) +#define VERTEX radeonVertex +#undef TAG +#define TAG(x) radeon_##x +#include "tnl_dd/t_dd_triemit.h" + + +/*********************************************************************** + * Macros for t_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define QUAD( a, b, c, d ) radeon_quad( rmesa, a, b, c, d ) +#define TRI( a, b, c ) radeon_triangle( rmesa, a, b, c ) +#define LINE( a, b ) radeon_line( rmesa, a, b ) +#define POINT( a ) radeon_point( rmesa, a ) + +/*********************************************************************** + * Build render functions from dd templates * + ***********************************************************************/ + +#define RADEON_TWOSIDE_BIT 0x01 +#define RADEON_UNFILLED_BIT 0x02 +#define RADEON_OFFSET_BIT 0x04 /* drmMinor == 1 */ +#define RADEON_MAX_TRIFUNC 0x08 + + +static struct { + points_func points; + line_func line; + triangle_func triangle; + quad_func quad; +} rast_tab[RADEON_MAX_TRIFUNC]; + + +#define DO_FALLBACK 0 +#define DO_OFFSET (IND & RADEON_OFFSET_BIT) +#define DO_UNFILLED (IND & RADEON_UNFILLED_BIT) +#define DO_TWOSIDE (IND & RADEON_TWOSIDE_BIT) +#define DO_FLAT 0 +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 1 +#define HAVE_INDEX 0 +#define HAVE_BACK_COLORS 0 +#define HAVE_HW_FLATSHADE 1 +#define TAB rast_tab + +#define DEPTH_SCALE 1.0 +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW( a ) (a < 0) +#define GET_VERTEX(e) (rmesa->swtcl.verts + (e<swtcl.vertex_stride_shift)) + +#define VERT_SET_RGBA( v, c ) v->ui[coloroffset] = LE32_TO_CPU(*(GLuint *)c) +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] +#define VERT_SAVE_RGBA( idx ) color[idx] = CPU_TO_LE32(v[idx]->ui[coloroffset]) +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = LE32_TO_CPU(color[idx]) + +#define VERT_SET_SPEC( v0, c ) if (havespec) { \ + v0->v.specular.red = (c)[0]; \ + v0->v.specular.green = (c)[1]; \ + v0->v.specular.blue = (c)[2]; } +#define VERT_COPY_SPEC( v0, v1 ) if (havespec) { \ + v0->v.specular.red = v1->v.specular.red; \ + v0->v.specular.green = v1->v.specular.green; \ + v0->v.specular.blue = v1->v.specular.blue; } +#define VERT_SAVE_SPEC( idx ) if (havespec) spec[idx] = CPU_TO_LE32(v[idx]->ui[5]) +#define VERT_RESTORE_SPEC( idx ) if (havespec) v[idx]->ui[5] = LE32_TO_CPU(spec[idx]) + +#undef LOCAL_VARS +#define LOCAL_VARS(n) \ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ + GLuint color[n], spec[n]; \ + GLuint coloroffset = (rmesa->swtcl.vertex_size == 4 ? 3 : 4); \ + GLboolean havespec = (rmesa->swtcl.vertex_size > 4); \ + (void) color; (void) spec; (void) coloroffset; (void) havespec; + +/*********************************************************************** + * Helpers for rendering unfilled primitives * + ***********************************************************************/ + +#define RASTERIZE(x) radeonRasterPrimitive( ctx, reduced_hw_prim[x] ) +#define RENDER_PRIMITIVE rmesa->swtcl.render_primitive +#undef TAG +#define TAG(x) x +#include "tnl_dd/t_dd_unfilled.h" +#undef IND + + +/*********************************************************************** + * Generate GL render functions * + ***********************************************************************/ + + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (RADEON_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (RADEON_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (RADEON_TWOSIDE_BIT|RADEON_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (RADEON_OFFSET_BIT) +#define TAG(x) x##_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (RADEON_TWOSIDE_BIT|RADEON_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (RADEON_UNFILLED_BIT|RADEON_OFFSET_BIT) +#define TAG(x) x##_unfilled_offset +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (RADEON_TWOSIDE_BIT|RADEON_UNFILLED_BIT|RADEON_OFFSET_BIT) +#define TAG(x) x##_twoside_unfilled_offset +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab( void ) +{ + init(); + init_twoside(); + init_unfilled(); + init_twoside_unfilled(); + init_offset(); + init_twoside_offset(); + init_unfilled_offset(); + init_twoside_unfilled_offset(); +} + +/**********************************************************************/ +/* Render unclipped begin/end objects */ +/**********************************************************************/ + +#define VERT(x) (radeonVertex *)(radeonverts + (x << shift)) +#define RENDER_POINTS( start, count ) \ + for ( ; start < count ; start++) \ + radeon_point( rmesa, VERT(start) ) +#define RENDER_LINE( v0, v1 ) \ + radeon_line( rmesa, VERT(v0), VERT(v1) ) +#define RENDER_TRI( v0, v1, v2 ) \ + radeon_triangle( rmesa, VERT(v0), VERT(v1), VERT(v2) ) +#define RENDER_QUAD( v0, v1, v2, v3 ) \ + radeon_quad( rmesa, VERT(v0), VERT(v1), VERT(v2), VERT(v3) ) +#undef INIT +#define INIT(x) do { \ + radeonRenderPrimitive( ctx, x ); \ +} while (0) +#undef LOCAL_VARS +#define LOCAL_VARS \ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); \ + const GLuint shift = rmesa->swtcl.vertex_stride_shift; \ + const char *radeonverts = (char *)rmesa->swtcl.verts; \ + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ + const GLboolean stipple = ctx->Line.StippleFlag; \ + (void) elt; (void) stipple; +#define RESET_STIPPLE if ( stipple ) radeonResetLineStipple( ctx ); +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS +#define ELT(x) (x) +#define TAG(x) radeon_##x##_verts +#include "tnl/t_vb_rendertmp.h" +#undef ELT +#undef TAG +#define TAG(x) radeon_##x##_elts +#define ELT(x) elt[x] +#include "tnl/t_vb_rendertmp.h" + + + +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + +void radeonChooseRenderState( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint index = 0; + GLuint flags = ctx->_TriangleCaps; + + if (!rmesa->TclFallback || rmesa->Fallback) + return; + + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= RADEON_TWOSIDE_BIT; + if (flags & DD_TRI_UNFILLED) index |= RADEON_UNFILLED_BIT; + if ((flags & DD_TRI_OFFSET) && + rmesa->dri.drmMinor == 1) index |= RADEON_OFFSET_BIT; + + if (index != rmesa->swtcl.RenderIndex) { + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.ClippedLine = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = radeon_render_tab_verts; + tnl->Driver.Render.PrimTabElts = radeon_render_tab_elts; + tnl->Driver.Render.ClippedPolygon = radeon_fast_clipped_poly; + } else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedPolygon = _tnl_RenderClippedPolygon; + } + + rmesa->swtcl.RenderIndex = index; + } +} + + +/**********************************************************************/ +/* High level hooks for t_vb_render.c */ +/**********************************************************************/ + + +static void radeonRasterPrimitive( GLcontext *ctx, GLuint hwprim ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (rmesa->swtcl.hw_primitive != hwprim) { + RADEON_NEWPRIM( rmesa ); + rmesa->swtcl.hw_primitive = hwprim; + } +} + +static void radeonRenderPrimitive( GLcontext *ctx, GLenum prim ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + rmesa->swtcl.render_primitive = prim; + if (prim < GL_TRIANGLES || !(ctx->_TriangleCaps & DD_TRI_UNFILLED)) + radeonRasterPrimitive( ctx, reduced_hw_prim[prim] ); +} + +static void radeonRenderFinish( GLcontext *ctx ) +{ +} + +static void radeonResetLineStipple( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + RADEON_STATECHANGE( rmesa, lin ); +} + + +/**********************************************************************/ +/* Transition to/from hardware rasterization. */ +/**********************************************************************/ + +static char *fallbackStrings[] = { + "Texture mode", + "glDrawBuffer(GL_FRONT_AND_BACK)", + "glEnable(GL_STENCIL) without hw stencil buffer", + "glRenderMode(selection or feedback)", + "glBlendEquation", + "glBlendFunc(mode != ADD)" + "RADEON_NO_RAST" +}; + + +static char *getFallbackString(GLuint bit) +{ + int i = 0; + while (bit > 1) { + i++; + bit >>= 1; + } + return fallbackStrings[i]; +} + + +void radeonFallback( GLcontext *ctx, GLuint bit, GLboolean mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint oldfallback = rmesa->Fallback; + + if (mode) { + rmesa->Fallback |= bit; + if (oldfallback == 0) { + RADEON_FIREVERTICES( rmesa ); + TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_RASTER, GL_TRUE ); + _swsetup_Wakeup( ctx ); + _tnl_need_projected_coords( ctx, GL_TRUE ); + rmesa->swtcl.RenderIndex = ~0; + if (RADEON_DEBUG & DEBUG_FALLBACKS) { + fprintf(stderr, "Radeon begin rasterization fallback: 0x%x %s\n", + bit, getFallbackString(bit)); + } + } + } + else { + rmesa->Fallback &= ~bit; + if (oldfallback == bit) { + _swrast_flush( ctx ); + tnl->Driver.Render.Start = radeonRenderStart; + tnl->Driver.Render.PrimitiveNotify = radeonRenderPrimitive; + tnl->Driver.Render.Finish = radeonRenderFinish; + tnl->Driver.Render.BuildVertices = radeonBuildVertices; + tnl->Driver.Render.ResetLineStipple = radeonResetLineStipple; + TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_RASTER, GL_FALSE ); + if (rmesa->TclFallback) { + /* These are already done if rmesa->TclFallback goes to + * zero above. But not if it doesn't (RADEON_NO_TCL for + * example?) + */ + radeonChooseVertexState( ctx ); + radeonChooseRenderState( ctx ); + } + if (RADEON_DEBUG & DEBUG_FALLBACKS) { + fprintf(stderr, "Radeon end rasterization fallback: 0x%x %s\n", + bit, getFallbackString(bit)); + } + } + } +} + + +/**********************************************************************/ +/* Initialization. */ +/**********************************************************************/ + +void radeonInitSwtcl( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint size = TNL_CONTEXT(ctx)->vb.Size; + static int firsttime = 1; + + if (firsttime) { + init_rast_tab(); + init_setup_tab(); + firsttime = 0; + } + + tnl->Driver.Render.Start = radeonRenderStart; + tnl->Driver.Render.Finish = radeonRenderFinish; + tnl->Driver.Render.PrimitiveNotify = radeonRenderPrimitive; + tnl->Driver.Render.ResetLineStipple = radeonResetLineStipple; + tnl->Driver.Render.BuildVertices = radeonBuildVertices; + + rmesa->swtcl.verts = (char *)ALIGN_MALLOC( size * 16 * 4, 32 ); + rmesa->swtcl.RenderIndex = ~0; + rmesa->swtcl.render_primitive = GL_TRIANGLES; + rmesa->swtcl.hw_primitive = 0; +} + + +void radeonDestroySwtcl( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (rmesa->swtcl.indexed_verts.buf) + radeonReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts, + __FUNCTION__ ); + + if (rmesa->swtcl.verts) { + ALIGN_FREE(rmesa->swtcl.verts); + rmesa->swtcl.verts = 0; + } + + if (rmesa->UbyteSecondaryColor.Ptr) { + ALIGN_FREE(rmesa->UbyteSecondaryColor.Ptr); + rmesa->UbyteSecondaryColor.Ptr = 0; + } + + if (rmesa->UbyteColor.Ptr) { + ALIGN_FREE(rmesa->UbyteColor.Ptr); + rmesa->UbyteColor.Ptr = 0; + } +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_swtcl.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_swtcl.h:1.1 --- /dev/null Thu Feb 27 12:26:33 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_swtcl.h Wed Oct 30 07:51:57 2002 @@ -0,0 +1,76 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_swtcl.h,v 1.1 2002/10/30 12:51:57 alanh 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 + * + */ + +#ifndef __RADEON_TRIS_H__ +#define __RADEON_TRIS_H__ + +#include "mtypes.h" +#include "swrast/swrast.h" +#include "radeon_context.h" + +extern void radeonInitSwtcl( GLcontext *ctx ); +extern void radeonDestroySwtcl( GLcontext *ctx ); + +extern void radeonChooseRenderState( GLcontext *ctx ); +extern void radeonChooseVertexState( GLcontext *ctx ); + +extern void radeonCheckTexSizes( GLcontext *ctx ); + +extern void radeonBuildVertices( GLcontext *ctx, GLuint start, GLuint count, + GLuint newinputs ); + +extern void radeonPrintSetupFlags(char *msg, GLuint flags ); + + +extern void radeon_emit_contiguous_verts( GLcontext *ctx, + GLuint start, + GLuint count ); + +extern void radeon_emit_indexed_verts( GLcontext *ctx, + GLuint start, + GLuint count ); + +extern void radeon_translate_vertex( GLcontext *ctx, + const radeonVertex *src, + SWvertex *dst ); + +extern void radeon_print_vertex( GLcontext *ctx, const radeonVertex *v ); + +extern void radeon_import_float_colors( GLcontext *ctx ); +extern void radeon_import_float_spec_colors( GLcontext *ctx ); + + + +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tcl.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_tcl.c:1.1 --- /dev/null Thu Feb 27 12:26:33 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tcl.c Wed Oct 30 07:51:57 2002 @@ -0,0 +1,545 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tcl.c,v 1.1 2002/10/30 12:51:57 alanh Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics Inc., Austin, 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, TUNGSTEN GRAPHICS 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 + * + */ + +#include "radeon_context.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" +#include "radeon_tex.h" +#include "radeon_tcl.h" +#include "radeon_swtcl.h" +#include "radeon_maos.h" + +#include "mmath.h" +#include "mtypes.h" +#include "enums.h" +#include "colormac.h" +#include "light.h" + +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" + + + +/* + * Render unclipped vertex buffers by emitting vertices directly to + * dma buffers. Use strip/fan hardware primitives where possible. + * Try to simulate missing primitives with indexed vertices. + */ +#define HAVE_POINTS 1 +#define HAVE_LINES 1 +#define HAVE_LINE_LOOP 0 +#define HAVE_LINE_STRIPS 1 +#define HAVE_TRIANGLES 1 +#define HAVE_TRI_STRIPS 1 +#define HAVE_TRI_STRIP_1 0 +#define HAVE_TRI_FANS 1 +#define HAVE_QUADS 0 +#define HAVE_QUAD_STRIPS 0 +#define HAVE_POLYGONS 1 +#define HAVE_ELTS 1 + + +#define HW_POINTS RADEON_CP_VC_CNTL_PRIM_TYPE_POINT +#define HW_LINES RADEON_CP_VC_CNTL_PRIM_TYPE_LINE +#define HW_LINE_LOOP 0 +#define HW_LINE_STRIP RADEON_CP_VC_CNTL_PRIM_TYPE_LINE_STRIP +#define HW_TRIANGLES RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST +#define HW_TRIANGLE_STRIP_0 RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_STRIP +#define HW_TRIANGLE_STRIP_1 0 +#define HW_TRIANGLE_FAN RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN +#define HW_QUADS 0 +#define HW_QUAD_STRIP 0 +#define HW_POLYGON RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN + + +static GLboolean discreet_prim[0x10] = { + 0, /* none */ + 1, /* points */ + 1, /* lines */ + 0, /* line_strip */ + 1, /* tri_list */ + 0, /* tri_fan */ + 0, /* tri_type_2 */ + 1, /* rect list (unused) */ + 1, /* 3 vert point */ + 1, /* 3 vert line */ + 0, + 0, + 0, + 0, + 0, +}; + + +#define LOCAL_VARS radeonContextPtr rmesa = RADEON_CONTEXT(ctx) +#define ELTS_VARS GLushort *dest + +#define ELT_INIT(prim, hw_prim) \ + radeonTclPrimitive( ctx, prim, hw_prim | RADEON_CP_VC_CNTL_PRIM_WALK_IND ) + +#define GET_ELTS() rmesa->tcl.Elts + + +#define NEW_PRIMITIVE() RADEON_NEWPRIM( rmesa ) +#define NEW_BUFFER() radeonRefillCurrentDmaRegion( rmesa ) + +/* Don't really know how many elts will fit in what's left of cmdbuf, + * as there is state to emit, etc: + */ + +#if 0 +#define GET_CURRENT_VB_MAX_ELTS() \ + ((RADEON_CMD_BUF_SZ - (rmesa->store.cmd_used + 16)) / 2) +#define GET_SUBSEQUENT_VB_MAX_ELTS() ((RADEON_CMD_BUF_SZ - 16) / 2) +#else +/* Testing on isosurf shows a maximum around here. Don't know if it's + * the card or driver or kernel module that is causing the behaviour. + */ +#define GET_CURRENT_VB_MAX_ELTS() 300 +#define GET_SUBSEQUENT_VB_MAX_ELTS() 300 +#endif + +#define RESET_STIPPLE() do { \ + RADEON_STATECHANGE( rmesa, lin ); \ + radeonEmitState( rmesa ); \ +} while (0) + +#define AUTO_STIPPLE( mode ) do { \ + RADEON_STATECHANGE( rmesa, lin ); \ + if (mode) \ + rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] |= \ + RADEON_LINE_PATTERN_AUTO_RESET; \ + else \ + rmesa->hw.lin.cmd[LIN_RE_LINE_PATTERN] &= \ + ~RADEON_LINE_PATTERN_AUTO_RESET; \ + radeonEmitState( rmesa ); \ +} while (0) + + +/* How do you extend an existing primitive? + */ +#define ALLOC_ELTS(nr) \ +do { \ + if (rmesa->dma.flush == radeonFlushElts && \ + rmesa->store.cmd_used + nr*2 < RADEON_CMD_BUF_SZ) { \ + \ + dest = (GLushort *)(rmesa->store.cmd_buf + \ + rmesa->store.cmd_used); \ + rmesa->store.cmd_used += nr*2; \ + } \ + else { \ + if (rmesa->dma.flush) \ + rmesa->dma.flush( rmesa ); \ + \ + radeonEmitAOS( rmesa, \ + rmesa->tcl.aos_components, \ + rmesa->tcl.nr_aos_components, \ + 0 ); \ + \ + dest = radeonAllocEltsOpenEnded( rmesa, \ + rmesa->tcl.vertex_format, \ + rmesa->tcl.hw_primitive, \ + nr ); \ + } \ +} while (0) + + + +/* TODO: Try to extend existing primitive if both are identical, + * discreet and there are no intervening state changes. (Somewhat + * duplicates changes to DrawArrays code) + */ +static void EMIT_PRIM( GLcontext *ctx, + GLenum prim, + GLuint hwprim, + GLuint start, + GLuint count) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + radeonTclPrimitive( ctx, prim, hwprim ); + + radeonEmitAOS( rmesa, + rmesa->tcl.aos_components, + rmesa->tcl.nr_aos_components, + start ); + + /* Why couldn't this packet have taken an offset param? + */ + radeonEmitVbufPrim( rmesa, + rmesa->tcl.vertex_format, + rmesa->tcl.hw_primitive, + count - start ); +} + + + +/* Try & join small primitives + */ +#if 0 +#define PREFER_DISCRETE_ELT_PRIM( NR, PRIM ) 0 +#else +#define PREFER_DISCRETE_ELT_PRIM( NR, PRIM ) \ + ((NR) < 20 || \ + ((NR) < 40 && \ + rmesa->tcl.hw_primitive == (PRIM| \ + RADEON_CP_VC_CNTL_PRIM_WALK_IND| \ + RADEON_CP_VC_CNTL_TCL_ENABLE))) +#endif + +#ifdef MESA_BIG_ENDIAN +/* We could do without (most of) this ugliness if dest was always 32 bit word aligned... */ +#define EMIT_ELT(offset, x) do { \ + int off = offset + ( ( (GLuint)dest & 0x2 ) >> 1 ); \ + GLushort *des = (GLushort *)( (GLuint)dest & ~0x2 ); \ + (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x); } while (0) +#else +#define EMIT_ELT(offset, x) (dest)[offset] = (GLushort) (x) +#endif +#define EMIT_TWO_ELTS(offset, x, y) *(GLuint *)(dest+offset) = ((y)<<16)|(x); +#define INCR_ELTS( nr ) dest += nr +#define RELEASE_ELT_VERTS() \ + radeonReleaseArrays( ctx, ~0 ) + + + +#define TAG(x) tcl_##x +#include "tnl_dd/t_dd_dmatmp2.h" + +/**********************************************************************/ +/* External entrypoints */ +/**********************************************************************/ + +void radeonEmitPrimitive( GLcontext *ctx, + GLuint first, + GLuint last, + GLuint flags ) +{ + tcl_render_tab_verts[flags&PRIM_MODE_MASK]( ctx, first, last, flags ); +} + +void radeonEmitEltPrimitive( GLcontext *ctx, + GLuint first, + GLuint last, + GLuint flags ) +{ + tcl_render_tab_elts[flags&PRIM_MODE_MASK]( ctx, first, last, flags ); +} + +void radeonTclPrimitive( GLcontext *ctx, + GLenum prim, + int hw_prim ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint se_cntl; + GLuint newprim = hw_prim | RADEON_CP_VC_CNTL_TCL_ENABLE; + + if (newprim != rmesa->tcl.hw_primitive || + !discreet_prim[hw_prim&0xf]) { + RADEON_NEWPRIM( rmesa ); + rmesa->tcl.hw_primitive = newprim; + } + + se_cntl = rmesa->hw.set.cmd[SET_SE_CNTL]; + se_cntl &= ~RADEON_FLAT_SHADE_VTX_LAST; + + if (prim == GL_POLYGON && (ctx->_TriangleCaps & DD_FLATSHADE)) + se_cntl |= RADEON_FLAT_SHADE_VTX_0; + else + se_cntl |= RADEON_FLAT_SHADE_VTX_LAST; + + if (se_cntl != rmesa->hw.set.cmd[SET_SE_CNTL]) { + RADEON_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_SE_CNTL] = se_cntl; + } +} + + +/**********************************************************************/ +/* Render pipeline stage */ +/**********************************************************************/ + + +/* TCL render. + */ +static GLboolean radeon_run_tcl_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint i,flags = 0,length; + + /* TODO: separate this from the swtnl pipeline + */ + if (rmesa->TclFallback) + return GL_TRUE; /* fallback to software t&l */ + + if (VB->Count == 0) + return GL_FALSE; + + radeonReleaseArrays( ctx, stage->changed_inputs ); + radeonEmitArrays( ctx, stage->inputs ); + + rmesa->tcl.Elts = VB->Elts; + + for (i = VB->FirstPrimitive ; !(flags & PRIM_LAST) ; i += length) + { + flags = VB->Primitive[i]; + length = VB->PrimitiveLength[i]; + + if (RADEON_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "%s: prim %s %d..%d\n", + __FUNCTION__, + _mesa_lookup_enum_by_nr(flags & PRIM_MODE_MASK), + i, i+length); + + if (!length) + continue; + + if (rmesa->tcl.Elts) + radeonEmitEltPrimitive( ctx, i, i+length, flags ); + else + radeonEmitPrimitive( ctx, i, i+length, flags ); + } + + return GL_FALSE; /* finished the pipe */ +} + + + +static void radeon_check_tcl_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint inputs = VERT_OBJ; + + if (ctx->RenderMode == GL_RENDER) { + /* Make all this event-driven: + */ + if (ctx->Light.Enabled) { + inputs |= VERT_NORM; + + if (ctx->Light.ColorMaterialEnabled) { + inputs |= VERT_RGBA; + } + } + else { + inputs |= VERT_RGBA; + + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) { + inputs |= VERT_SPEC_RGB; + } + } + + if (ctx->Texture.Unit[0]._ReallyEnabled) { + if (ctx->Texture.Unit[0].TexGenEnabled) { + if (rmesa->TexGenNeedNormals[0]) { + inputs |= VERT_NORM; + } + } else { + inputs |= VERT_TEX(0); + } + } + + if (ctx->Texture.Unit[1]._ReallyEnabled) { + if (ctx->Texture.Unit[1].TexGenEnabled) { + if (rmesa->TexGenNeedNormals[1]) { + inputs |= VERT_NORM; + } + } else { + inputs |= VERT_TEX(1); + } + } + + stage->inputs = inputs; + stage->active = 1; + } + else + stage->active = 0; +} + +static void radeon_init_tcl_render( GLcontext *ctx, + struct gl_pipeline_stage *stage ) +{ + stage->check = radeon_check_tcl_render; + stage->check( ctx, stage ); +} + +static void dtr( struct gl_pipeline_stage *stage ) +{ + (void)stage; +} + + +/* Initial state for tcl stage. + */ +const struct gl_pipeline_stage _radeon_tcl_stage = +{ + "radeon render", + (_DD_NEW_SEPARATE_SPECULAR | + _NEW_LIGHT| + _NEW_TEXTURE| + _NEW_FOG| + _NEW_RENDERMODE), /* re-check (new inputs) */ + 0, /* re-run (always runs) */ + GL_TRUE, /* active */ + 0, 0, /* inputs (set in check_render), outputs */ + 0, 0, /* changed_inputs, private */ + dtr, /* destructor */ + radeon_init_tcl_render, /* check - initially set to alloc data */ + radeon_run_tcl_render /* run */ +}; + + + +/**********************************************************************/ +/* Validate state at pipeline start */ +/**********************************************************************/ + + +/*----------------------------------------------------------------------- + * Manage TCL fallbacks + */ + + +static void transition_to_swtnl( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint se_cntl; + + RADEON_NEWPRIM( rmesa ); + rmesa->swtcl.vertex_format = 0; + + radeonChooseVertexState( ctx ); + radeonChooseRenderState( ctx ); + + _mesa_validate_all_lighting_tables( ctx ); + + tnl->Driver.NotifyMaterialChange = + _mesa_validate_all_lighting_tables; + + radeonReleaseArrays( ctx, ~0 ); + + se_cntl = rmesa->hw.set.cmd[SET_SE_CNTL]; + se_cntl |= RADEON_FLAT_SHADE_VTX_LAST; + + if (se_cntl != rmesa->hw.set.cmd[SET_SE_CNTL]) { + RADEON_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_SE_CNTL] = se_cntl; + } +} + + +static void transition_to_hwtnl( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + GLuint se_coord_fmt = (RADEON_VTX_W0_IS_NOT_1_OVER_W0 | + RADEON_TEX1_W_ROUTING_USE_Q1); + + if ( se_coord_fmt != rmesa->hw.set.cmd[SET_SE_COORDFMT] ) { + RADEON_STATECHANGE( rmesa, set ); + rmesa->hw.set.cmd[SET_SE_COORDFMT] = se_coord_fmt; + _tnl_need_projected_coords( ctx, GL_FALSE ); + } + + radeonUpdateMaterial( ctx ); + + tnl->Driver.NotifyMaterialChange = radeonUpdateMaterial; + + if ( rmesa->dma.flush ) + rmesa->dma.flush( rmesa ); + + rmesa->dma.flush = 0; + rmesa->swtcl.vertex_format = 0; + + if (rmesa->swtcl.indexed_verts.buf) + radeonReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts, + __FUNCTION__ ); + + if (RADEON_DEBUG & DEBUG_FALLBACKS) + fprintf(stderr, "Radeon end tcl fallback\n"); +} + +static char *fallbackStrings[] = { + "Rasterization fallback", + "Unfilled triangles", + "Twosided lighting, differing materials", + "Materials in VB (maybe between begin/end)", + "Texgen unit 0", + "Texgen unit 1", + "Texgen unit 2", + "User disable" +}; + + +static char *getFallbackString(GLuint bit) +{ + int i = 0; + while (bit > 1) { + i++; + bit >>= 1; + } + return fallbackStrings[i]; +} + + + +void radeonTclFallback( GLcontext *ctx, GLuint bit, GLboolean mode ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint oldfallback = rmesa->TclFallback; + + if (mode) { + rmesa->TclFallback |= bit; + if (oldfallback == 0) { + if (RADEON_DEBUG & DEBUG_FALLBACKS) + fprintf(stderr, "Radeon begin tcl fallback %s\n", + getFallbackString( bit )); + transition_to_swtnl( ctx ); + } + } + else { + rmesa->TclFallback &= ~bit; + if (oldfallback == bit) { + if (RADEON_DEBUG & DEBUG_FALLBACKS) + fprintf(stderr, "Radeon end tcl fallback %s\n", + getFallbackString( bit )); + transition_to_hwtnl( ctx ); + } + } +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tcl.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_tcl.h:1.2 --- /dev/null Thu Feb 27 12:26:33 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tcl.h Sat Feb 8 16:26:45 2003 @@ -0,0 +1,66 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tcl.h,v 1.2 2003/02/08 21:26:45 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + Tungsten Grahpics Inc., Austin, 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, TUNGSTEN GRAHPICS 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 + * + */ + +#ifndef __RADEON_TCL_H__ +#define __RADEON_TCL_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "radeon_context.h" + +extern void radeonTclPrimitive( GLcontext *ctx, GLenum prim, int hw_prim ); +extern void radeonEmitEltPrimitive( GLcontext *ctx, GLuint first, GLuint last, + GLuint flags ); +extern void radeonEmitPrimitive( GLcontext *ctx, GLuint first, GLuint last, + GLuint flags ); + +extern void radeonTclFallback( GLcontext *ctx, GLuint bit, GLboolean mode ); + +#define RADEON_TCL_FALLBACK_RASTER 0x1 /* rasterization */ +#define RADEON_TCL_FALLBACK_UNFILLED 0x2 /* unfilled tris */ +#define RADEON_TCL_FALLBACK_LIGHT_TWOSIDE 0x4 /* twoside tris */ +#define RADEON_TCL_FALLBACK_MATERIAL 0x8 /* material in vb */ +#define RADEON_TCL_FALLBACK_TEXGEN_0 0x10 /* texgen, unit 0 */ +#define RADEON_TCL_FALLBACK_TEXGEN_1 0x20 /* texgen, unit 1 */ +#define RADEON_TCL_FALLBACK_TEXGEN_2 0x40 /* texgen, unit 2 */ +#define RADEON_TCL_FALLBACK_TCL_DISABLE 0x80 /* user disable */ + +#define RADEON_MAX_TCL_VERTSIZE (15*4) + +#define TCL_FALLBACK( ctx, bit, mode ) radeonTclFallback( ctx, bit, mode ) + + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c:1.4 xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c:1.9 --- xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c:1.4 Mon May 21 17:43:52 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c Mon Dec 16 11:18:59 2002 @@ -1,51 +1,53 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c,v 1.4 2001/05/21 21:43:52 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. - -**************************************************************************/ - +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c,v 1.9 2002/12/16 16:18:59 dawes Exp $ */ /* - * Authors: - * Kevin E. Martin - * Gareth Hughes + * 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 + * Brian Paul */ #include "radeon_context.h" #include "radeon_state.h" #include "radeon_ioctl.h" -#include "radeon_vb.h" +#include "radeon_swtcl.h" #include "radeon_tex.h" -#include "mmath.h" -#include "simple_list.h" +#include "colormac.h" +#include "context.h" #include "enums.h" +#include "image.h" #include "mem.h" -#include "texutil.h" +#include "simple_list.h" +#include "texformat.h" +#include "texstore.h" + +/* ============================================================= + * Utility functions: + */ static void radeonSetTexWrap( radeonTexObjPtr t, GLenum swrap, GLenum twrap ) { @@ -61,6 +63,18 @@ case GL_CLAMP_TO_EDGE: t->pp_txfilter |= RADEON_CLAMP_S_CLAMP_LAST; break; + case GL_CLAMP_TO_BORDER: + t->pp_txfilter |= RADEON_CLAMP_S_CLAMP_BORDER; + break; + case GL_MIRRORED_REPEAT: + t->pp_txfilter |= RADEON_CLAMP_S_MIRROR; + break; + case GL_MIRROR_CLAMP_ATI: + t->pp_txfilter |= RADEON_CLAMP_S_MIRROR_CLAMP_BORDER; + break; + case GL_MIRROR_CLAMP_TO_EDGE_ATI: + t->pp_txfilter |= RADEON_CLAMP_S_MIRROR_CLAMP_LAST; + break; } switch ( twrap ) { @@ -73,32 +87,82 @@ case GL_CLAMP_TO_EDGE: t->pp_txfilter |= RADEON_CLAMP_T_CLAMP_LAST; break; + case GL_CLAMP_TO_BORDER: + t->pp_txfilter |= RADEON_CLAMP_T_CLAMP_BORDER; + break; + case GL_MIRRORED_REPEAT: + t->pp_txfilter |= RADEON_CLAMP_T_MIRROR; + break; + case GL_MIRROR_CLAMP_ATI: + t->pp_txfilter |= RADEON_CLAMP_T_MIRROR_CLAMP_BORDER; + break; + case GL_MIRROR_CLAMP_TO_EDGE_ATI: + t->pp_txfilter |= RADEON_CLAMP_T_MIRROR_CLAMP_LAST; + break; } } +static void radeonSetTexMaxAnisotropy( radeonTexObjPtr t, GLfloat max ) +{ + t->pp_txfilter &= ~RADEON_MAX_ANISO_MASK; + + if ( max == 1.0 ) { + t->pp_txfilter |= RADEON_MAX_ANISO_1_TO_1; + } else if ( max <= 2.0 ) { + t->pp_txfilter |= RADEON_MAX_ANISO_2_TO_1; + } else if ( max <= 4.0 ) { + t->pp_txfilter |= RADEON_MAX_ANISO_4_TO_1; + } else if ( max <= 8.0 ) { + t->pp_txfilter |= RADEON_MAX_ANISO_8_TO_1; + } else { + t->pp_txfilter |= RADEON_MAX_ANISO_16_TO_1; + } +} + static void radeonSetTexFilter( radeonTexObjPtr t, GLenum minf, GLenum magf ) { + GLuint anisotropy = (t->pp_txfilter & RADEON_MAX_ANISO_MASK); + 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; + if ( anisotropy == RADEON_MAX_ANISO_1_TO_1 ) { + 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; + } + } else { + switch ( minf ) { + case GL_NEAREST: + t->pp_txfilter |= RADEON_MIN_FILTER_ANISO_NEAREST; + break; + case GL_LINEAR: + t->pp_txfilter |= RADEON_MIN_FILTER_ANISO_LINEAR; + break; + case GL_NEAREST_MIPMAP_NEAREST: + case GL_LINEAR_MIPMAP_NEAREST: + t->pp_txfilter |= RADEON_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST; + break; + case GL_NEAREST_MIPMAP_LINEAR: + case GL_LINEAR_MIPMAP_LINEAR: + t->pp_txfilter |= RADEON_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR; + break; + } } switch ( magf ) { @@ -116,143 +180,95 @@ 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 (!t) + return NULL; - if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + if ( RADEON_DEBUG & DEBUG_TEXTURE ) { 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 ); + /* Initialize non-image-dependent parts of the state: + */ radeonSetTexWrap( t, texObj->WrapS, texObj->WrapT ); + radeonSetTexMaxAnisotropy( t, texObj->MaxAnisotropy ); 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 ) +static const struct gl_texture_format * +radeonChooseTextureFormat( GLcontext *ctx, GLint internalFormat, + GLenum format, GLenum type ) { + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); 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: + switch ( internalFormat ) { case 4: + case GL_RGBA: + case GL_COMPRESSED_RGBA: 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; + return &_mesa_texformat_argb8888; } + else if ( type == GL_UNSIGNED_SHORT_4_4_4_4_REV ) { + return &_mesa_texformat_argb4444; + } + else if ( type == GL_UNSIGNED_SHORT_1_5_5_5_REV ) { + return &_mesa_texformat_argb1555; + } } - SET_FORMAT_32BPT( RADEON_TXFORMAT_RGBA8888, _mesa_texformat_rgba8888, - RADEON_TXFORMAT_ARGB4444, _mesa_texformat_argb4444 ); - break; + return do32bpt ? &_mesa_texformat_rgba8888 : &_mesa_texformat_argb4444; - case GL_RGB: case 3: + case GL_RGB: + case GL_COMPRESSED_RGB: if ( format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5 ) { - SET_FORMAT( RADEON_TXFORMAT_RGB565, _mesa_texformat_rgb565 ); - break; + return &_mesa_texformat_rgb565; } - SET_FORMAT_32BPT( RADEON_TXFORMAT_RGBA8888, _mesa_texformat_rgba8888, - RADEON_TXFORMAT_RGB565, _mesa_texformat_rgb565 ); - break; + return do32bpt ? &_mesa_texformat_rgba8888 : &_mesa_texformat_rgb565; - /* 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; + return do32bpt ? &_mesa_texformat_rgba8888 : &_mesa_texformat_argb4444; case GL_RGBA4: case GL_RGBA2: - SET_FORMAT( RADEON_TXFORMAT_ARGB4444, _mesa_texformat_argb4444 ); - break; + return &_mesa_texformat_argb4444; case GL_RGB5_A1: - SET_FORMAT( RADEON_TXFORMAT_ARGB1555, _mesa_texformat_argb1555 ); - break; + return &_mesa_texformat_argb1555; 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; + return do32bpt ? &_mesa_texformat_rgba8888 : &_mesa_texformat_rgb565; case GL_RGB5: case GL_RGB4: case GL_R3_G3_B2: - SET_FORMAT( RADEON_TXFORMAT_RGB565, _mesa_texformat_rgb565 ); - break; + return &_mesa_texformat_rgb565; 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 GL_COMPRESSED_ALPHA: + return &_mesa_texformat_al88; case 1: case GL_LUMINANCE: @@ -260,8 +276,8 @@ case GL_LUMINANCE8: case GL_LUMINANCE12: case GL_LUMINANCE16: - SET_FORMAT( RADEON_TXFORMAT_AI88, _mesa_texformat_al88 ); - break; + case GL_COMPRESSED_LUMINANCE: + return &_mesa_texformat_al88; case 2: case GL_LUMINANCE_ALPHA: @@ -271,550 +287,232 @@ case GL_LUMINANCE12_ALPHA4: case GL_LUMINANCE12_ALPHA12: case GL_LUMINANCE16_ALPHA16: - SET_FORMAT( RADEON_TXFORMAT_AI88, _mesa_texformat_al88 ); - break; + case GL_COMPRESSED_LUMINANCE_ALPHA: + return &_mesa_texformat_al88; 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_COMPRESSED_INTENSITY: + return &_mesa_texformat_i8; - 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; + _mesa_problem(ctx, "unexpected texture format in radeonChoosTexFormat"); + return NULL; } - - texImage->TexFormat = texFormat; - return ret; + return NULL; /* never get here */ } -/* ================================================================ - * 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 ) +static void radeonTexImage1D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint border, + 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; - GLuint texSize; - GLint txformat; - GLubyte *data; - - if ( target != GL_TEXTURE_1D ) - return GL_FALSE; + radeonTexObjPtr t = (radeonTexObjPtr) texObj->DriverData; - 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 { + } + else { t = radeonAllocTexObj( texObj ); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); + return; + } 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; + /* Note, this will call radeonChooseTextureFormat */ + _mesa_store_teximage1d(ctx, target, level, internalFormat, + width, border, format, type, pixels, + &ctx->Unpack, texObj, texImage); - 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 ) +static void radeonTexSubImage1D( 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; - 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 ); - } - + assert( t ); /* this _should_ be true */ if ( t ) { - if ( t->bound ) FLUSH_BATCH( rmesa ); - if ( t->image[level].data ) radeonSwapOutTexObj( rmesa, t ); - } else { - t = radeonAllocTexObj( texObj ); + radeonSwapOutTexObj( rmesa, t ); + t->dirty_images |= (1 << level); + } + else { + t = radeonAllocTexObj(texObj); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage1D"); + return; + } 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; - } + _mesa_store_texsubimage1d(ctx, target, level, xoffset, width, + format, type, pixels, packing, texObj, + texImage); - 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 ) + +static void radeonTexImage2D( GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + 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; - GLuint texSize; - GLint txformat; - GLubyte *data; - if ( target != GL_TEXTURE_3D ) - return GL_FALSE; +/* fprintf(stderr, "%s\n", __FUNCTION__); */ if ( t ) { - if ( t->bound ) FLUSH_BATCH( rmesa ); radeonSwapOutTexObj( rmesa, t ); - } else { + } + else { t = radeonAllocTexObj( texObj ); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + return; + } 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; - } + /* Note, this will call radeonChooseTextureFormat */ + _mesa_store_teximage2d(ctx, target, level, internalFormat, + width, height, border, format, type, pixels, + &ctx->Unpack, texObj, texImage); - 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 ) +static void radeonTexSubImage2D( 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; + radeonTexObjPtr t = (radeonTexObjPtr) texObj->DriverData; - if ( target != GL_TEXTURE_1D ) - return GL_FALSE; - - /* FIXME: Can this ever be NULL??? - */ - ASSERT( t ); - ASSERT( t->image[level].data ); +/* fprintf(stderr, "%s\n", __FUNCTION__); */ - 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 ); + assert( t ); /* this _should_ be true */ + if ( t ) { + radeonSwapOutTexObj( rmesa, t ); } - - /* 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; + else { + t = radeonAllocTexObj(texObj); + if (!t) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage2D"); + return; + } + texObj->DriverData = t; } - - 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; - } + _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width, + height, format, type, pixels, packing, texObj, + texImage); 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) + (((GLuint)((255.0F / scale) * (x))) / 2) -static void radeonDDTexEnv( GLcontext *ctx, GLenum target, - GLenum pname, const GLfloat *param ) +static void radeonTexEnv( 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; + GLuint unit = ctx->Texture.CurrentUnit; + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { + if ( RADEON_DEBUG & DEBUG_STATE ) { fprintf( stderr, "%s( %s )\n", - __FUNCTION__, gl_lookup_enum_by_nr( pname ) ); + __FUNCTION__, _mesa_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; + case GL_TEXTURE_ENV_COLOR: { + GLubyte c[4]; + GLuint envColor; + UNCLAMPED_FLOAT_TO_RGBA_CHAN( c, texUnit->EnvColor ); + envColor = radeonPackColor( 4, c[0], c[1], c[2], c[3] ); + if ( rmesa->hw.tex[unit].cmd[TEX_PP_TFACTOR] != envColor ) { + RADEON_STATECHANGE( rmesa, tex[unit] ); + rmesa->hw.tex[unit].cmd[TEX_PP_TFACTOR] = envColor; } break; + } + + case GL_TEXTURE_LOD_BIAS_EXT: { + GLfloat bias; + GLuint b; - 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 ); + b = ((GLuint)SCALED_FLOAT_TO_BYTE( bias, 4.0 )) << RADEON_LOD_BIAS_SHIFT; } else { - b = (GLubyte) SCALED_FLOAT_TO_BYTE( bias, 1.0 ); + b = ((GLuint)SCALED_FLOAT_TO_BYTE( bias, 1.0 )) << RADEON_LOD_BIAS_SHIFT; } - if ( rmesa->lod_bias[source] != (GLuint)b ) { - FLUSH_BATCH( rmesa ); - rmesa->lod_bias[source] = (GLuint)b; - - rmesa->new_state |= RADEON_NEW_TEXTURE; + if ( (rmesa->hw.tex[unit].cmd[TEX_PP_TXFILTER] & RADEON_LOD_BIAS_MASK) != b ) { + RADEON_STATECHANGE( rmesa, tex[unit] ); + rmesa->hw.tex[unit].cmd[TEX_PP_TXFILTER] &= ~RADEON_LOD_BIAS_MASK; + rmesa->hw.tex[unit].cmd[TEX_PP_TXFILTER] |= (b & RADEON_LOD_BIAS_MASK); } break; + } default: return; } } -static void radeonDDTexParameter( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, - GLenum pname, const GLfloat *params ) +static void radeonTexParameter( GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj, + GLenum pname, const GLfloat *params ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - radeonTexObjPtr t = (radeonTexObjPtr)tObj->DriverData; + radeonTexObjPtr t = (radeonTexObjPtr) texObj->DriverData; - if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "%s( %s )\n", - __FUNCTION__, gl_lookup_enum_by_nr( pname ) ); + if ( RADEON_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) { + fprintf( stderr, "%s( %s )\n", __FUNCTION__, + _mesa_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; @@ -822,94 +520,90 @@ switch ( pname ) { case GL_TEXTURE_MIN_FILTER: case GL_TEXTURE_MAG_FILTER: - if ( t->bound ) FLUSH_BATCH( rmesa ); - radeonSetTexFilter( t, tObj->MinFilter, tObj->MagFilter ); + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + radeonSetTexMaxAnisotropy( t, texObj->MaxAnisotropy ); + radeonSetTexFilter( t, texObj->MinFilter, texObj->MagFilter ); break; case GL_TEXTURE_WRAP_S: case GL_TEXTURE_WRAP_T: - if ( t->bound ) FLUSH_BATCH( rmesa ); - radeonSetTexWrap( t, tObj->WrapS, tObj->WrapT ); + radeonSetTexWrap( t, texObj->WrapS, texObj->WrapT ); break; case GL_TEXTURE_BORDER_COLOR: - if ( t->bound ) FLUSH_BATCH( rmesa ); - radeonSetTexBorderColor( t, tObj->BorderColor ); + radeonSetTexBorderColor( t, texObj->BorderColor ); + break; + + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + /* This isn't the most efficient solution but there doesn't appear to + * be a nice alternative for Radeon. Since there's no LOD clamping, + * we just have to rely on loading the right subset of mipmap levels + * to simulate a clamped LOD. + */ + radeonSwapOutTexObj( rmesa, t ); break; default: return; } - rmesa->new_state |= RADEON_NEW_TEXTURE; + /* Mark this texobj as dirty (one bit per tex unit) + */ + t->dirty_state = TEX_ALL; } -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 ); +static void radeonBindTexture( GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj ) +{ + radeonTexObjPtr t = (radeonTexObjPtr) texObj->DriverData; + GLuint unit = ctx->Texture.CurrentUnit; - if ( !t ) { - t = radeonAllocTexObj( tObj ); - tObj->DriverData = t; + if ( RADEON_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) { + fprintf( stderr, "%s( %p ) unit=%d\n", __FUNCTION__, texObj, unit ); } - /* Unbind a currently bound texture. - */ - if ( rmesa->CurrentTexObj[unit] ) { - rmesa->CurrentTexObj[unit]->bound &= ~(unit + 1); - rmesa->CurrentTexObj[unit] = NULL; + if ( target == GL_TEXTURE_2D || target == GL_TEXTURE_1D ) { + if ( !t ) { + t = radeonAllocTexObj( texObj ); + texObj->DriverData = t; + } } - - /* 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 ) +static void radeonDeleteTexture( GLcontext *ctx, + struct gl_texture_object *texObj ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); - radeonTexObjPtr t = (radeonTexObjPtr)tObj->DriverData; + radeonTexObjPtr t = (radeonTexObjPtr) texObj->DriverData; - if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, __FUNCTION__ "( %p )\n", tObj ); + if ( RADEON_DEBUG & (DEBUG_STATE|DEBUG_TEXTURE) ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, texObj ); } 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; + if ( rmesa ) { + RADEON_FIREVERTICES( rmesa ); } - radeonDestroyTexObj( rmesa, t ); - tObj->DriverData = NULL; + texObj->DriverData = NULL; } } -static GLboolean radeonDDIsTextureResident( GLcontext *ctx, - struct gl_texture_object *tObj ) +static GLboolean radeonIsTextureResident( GLcontext *ctx, + struct gl_texture_object *texObj ) { - radeonTexObjPtr t = (radeonTexObjPtr)tObj->DriverData; + radeonTexObjPtr t = (radeonTexObjPtr) texObj->DriverData; return ( t && t->memBlock ); } + -static void radeonDDInitTextureObjects( GLcontext *ctx ) +static void radeonInitTextureObjects( GLcontext *ctx ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); struct gl_texture_object *texObj; @@ -917,44 +611,79 @@ 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 ); + texObj = ctx->Texture.Unit[0].Current1D; + radeonBindTexture( ctx, GL_TEXTURE_1D, texObj ); + move_to_tail( &rmesa->texture.swapped, + (radeonTexObjPtr)texObj->DriverData ); + + texObj = ctx->Texture.Unit[0].Current2D; + radeonBindTexture( ctx, GL_TEXTURE_2D, texObj ); + move_to_tail( &rmesa->texture.swapped, + (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 ); + texObj = ctx->Texture.Unit[1].Current1D; + radeonBindTexture( ctx, GL_TEXTURE_1D, texObj ); + move_to_tail( &rmesa->texture.swapped, + (radeonTexObjPtr)texObj->DriverData ); + + texObj = ctx->Texture.Unit[1].Current2D; + radeonBindTexture( ctx, GL_TEXTURE_2D, texObj ); + move_to_tail( &rmesa->texture.swapped, + (radeonTexObjPtr)texObj->DriverData ); ctx->Texture.CurrentUnit = tmp; } + +/* Need: + * - Same GEN_MODE for all active bits + * - Same EyePlane/ObjPlane for all active bits when using Eye/Obj + * - STRQ presumably all supported (matrix means incoming R values + * can end up in STQ, this has implications for vertex support, + * presumably ok if maos is used, though?) + * + * Basically impossible to do this on the fly - just collect some + * basic info & do the checks from ValidateState(). + */ +static void radeonTexGen( GLcontext *ctx, + GLenum coord, + GLenum pname, + const GLfloat *params ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint unit = ctx->Texture.CurrentUnit; + rmesa->recheck_texgen[unit] = GL_TRUE; +} + -void radeonDDInitTextureFuncs( GLcontext *ctx ) +void radeonInitTextureFuncs( 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.ChooseTextureFormat = radeonChooseTextureFormat; + ctx->Driver.TexImage1D = radeonTexImage1D; + ctx->Driver.TexImage2D = radeonTexImage2D; + ctx->Driver.TexImage3D = _mesa_store_teximage3d; + ctx->Driver.TexSubImage1D = radeonTexSubImage1D; + ctx->Driver.TexSubImage2D = radeonTexSubImage2D; + ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; + ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; + ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; + ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; + ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; + ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; + ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; + + ctx->Driver.BindTexture = radeonBindTexture; + ctx->Driver.CreateTexture = NULL; /* FIXME: Is this used??? */ + ctx->Driver.DeleteTexture = radeonDeleteTexture; + ctx->Driver.IsTextureResident = radeonIsTextureResident; ctx->Driver.PrioritizeTexture = NULL; ctx->Driver.ActiveTexture = NULL; ctx->Driver.UpdateTexturePalette = NULL; + + ctx->Driver.TexEnv = radeonTexEnv; + ctx->Driver.TexParameter = radeonTexParameter; + ctx->Driver.TexGen = radeonTexGen; - radeonDDInitTextureObjects( ctx ); + radeonInitTextureObjects( ctx ); } Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h:1.3 --- xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h:1.2 Wed Mar 21 11:14:25 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h Fri Feb 22 16:45:01 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h,v 1.2 2001/03/21 16:14:25 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.h,v 1.3 2002/02/22 21:45:01 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -49,50 +49,9 @@ extern void radeonPrintLocalLRU( radeonContextPtr rmesa, int heap ); extern void radeonPrintGlobalLRU( radeonContextPtr rmesa, int heap ); -extern void radeonUpdateTexLRU(radeonContextPtr rmesa, radeonTexObjPtr t ); +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; - } -} +extern void radeonInitTextureFuncs( GLcontext *ctx ); #endif #endif /* __RADEON_TEX_H__ */ Index: xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c:1.7 --- xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c:1.2 Tue Apr 10 12:07:53 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c Mon Dec 16 11:18:59 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c,v 1.2 2001/04/10 16:07:53 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c,v 1.7 2002/12/16 16:18:59 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -35,36 +35,25 @@ */ #include "radeon_context.h" -#include "radeon_state.h" -#include "radeon_ioctl.h" -#include "radeon_vb.h" #include "radeon_tex.h" -#include "mmath.h" +#include "context.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 ( !t ) + return; - if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + if ( RADEON_DEBUG & DEBUG_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; @@ -72,32 +61,47 @@ if ( t->tObj ) t->tObj->DriverData = NULL; + + if ( rmesa ) { + /* Bump the performace counter */ + rmesa->c_textureSwaps++; + + if ( t == rmesa->state.texture.unit[0].texobj ) { + rmesa->state.texture.unit[0].texobj = NULL; + remove_from_list( &rmesa->hw.tex[0] ); + make_empty_list( &rmesa->hw.tex[0] ); + } - if ( t->bound & TEX_0 ) rmesa->CurrentTexObj[0] = NULL; - if ( t->bound & TEX_1 ) rmesa->CurrentTexObj[1] = NULL; + if ( t == rmesa->state.texture.unit[1].texobj ) { + rmesa->state.texture.unit[1].texobj = NULL; + remove_from_list( &rmesa->hw.tex[1] ); + make_empty_list( &rmesa->hw.tex[1] ); + } + } 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 ) { + if ( RADEON_DEBUG & DEBUG_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 ); + move_to_tail( &rmesa->texture.swapped, t ); } /* Print out debugging information about texture LRU. @@ -109,15 +113,14 @@ fprintf( stderr, "\nLocal LRU, heap %d:\n", heap ); - foreach ( t, &rmesa->TexObjList[heap] ) { + foreach ( t, &rmesa->texture.objects[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, + fprintf( stderr, "Texture at 0x%x sz 0x%x\n", t->memBlock->ofs, t->memBlock->size ); } @@ -182,7 +185,7 @@ /* Update the local and glock texture LRUs. */ -void radeonUpdateTexLRU( radeonContextPtr rmesa, radeonTexObjPtr t ) +void radeonUpdateTexLRU(radeonContextPtr rmesa, radeonTexObjPtr t ) { int heap = t->heap; radeon_tex_region_t *list = rmesa->sarea->texList[heap]; @@ -191,7 +194,7 @@ int end = (t->memBlock->ofs + t->memBlock->size-1) >> sz; int i; - rmesa->lastTexAge[heap] = ++rmesa->sarea->texAge[heap]; + rmesa->texture.age[heap] = ++rmesa->sarea->texAge[heap]; if ( !t->memBlock ) { fprintf( stderr, "no memblock\n\n" ); @@ -199,12 +202,12 @@ } /* Update our local LRU */ - move_to_head( &rmesa->TexObjList[heap], t ); + move_to_head( &rmesa->texture.objects[heap], t ); /* Update the global LRU */ for ( i = start ; i <= end ; i++ ) { list[i].in_use = 1; - list[i].age = rmesa->lastTexAge[heap]; + list[i].age = rmesa->texture.age[heap]; /* remove_from_list(i) */ list[(CARD32)list[i].next].prev = list[i].prev; @@ -234,7 +237,7 @@ { radeonTexObjPtr t, tmp; - foreach_s ( t, tmp, &rmesa->TexObjList[heap] ) { + foreach_s ( t, tmp, &rmesa->texture.objects[heap] ) { if ( t->memBlock->ofs >= offset + size || t->memBlock->ofs + t->memBlock->size <= offset ) continue; @@ -249,14 +252,14 @@ t = (radeonTexObjPtr) CALLOC( sizeof(*t) ); if ( !t ) return; - t->memBlock = mmAllocMem( rmesa->texHeap[heap], size, 0, offset ); + t->memBlock = mmAllocMem( rmesa->texture.heap[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] ); + mmDumpMemInfo( rmesa->texture.heap[heap] ); return; } - insert_at_head( &rmesa->TexObjList[heap], t ); + insert_at_head( &rmesa->texture.objects[heap], t ); } } @@ -269,7 +272,7 @@ { RADEONSAREAPrivPtr sarea = rmesa->sarea; - if ( sarea->texAge[heap] != rmesa->lastTexAge[heap] ) { + if ( sarea->texAge[heap] != rmesa->texture.age[heap] ) { int sz = 1 << rmesa->radeonScreen->logTexGranularity[heap]; int nr = 0; int idx; @@ -287,7 +290,7 @@ break; } - if ( sarea->texList[heap][idx].age > rmesa->lastTexAge[heap] ) { + if ( sarea->texList[heap][idx].age > rmesa->texture.age[heap] ) { radeonTexturesGone( rmesa, heap, idx * sz, sz, sarea->texList[heap][idx].in_use ); } @@ -299,16 +302,13 @@ radeonResetGlobalLRU( rmesa, heap ); } - rmesa->dirty |= (RADEON_UPLOAD_CONTEXT | - RADEON_UPLOAD_TEX0IMAGES | - RADEON_UPLOAD_TEX1IMAGES); - rmesa->lastTexAge[heap] = sarea->texAge[heap]; + rmesa->texture.age[heap] = sarea->texAge[heap]; } } -/* ================================================================ - * Texture image uploads +/* ============================================================= + * Texture image conversions */ /* Upload the texture image associated with texture `t' at level `level' @@ -321,25 +321,32 @@ 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 imageWidth, imageHeight; GLint ret; + drmRadeonTexture tex; + drmRadeonTexImage tmp; - if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) { + if ( RADEON_DEBUG & DEBUG_TEXTURE ) { fprintf( stderr, "%s( %p, %p )\n", __FUNCTION__, t, t->tObj ); } /* Ensure we have a valid texture to upload */ + level += t->firstLevel; + if ( ( level < 0 ) || ( level >= RADEON_MAX_TEXTURE_LEVELS ) ) { + _mesa_problem(NULL, "bad texture level in radeonUploadSubimage"); + return; + } + texImage = t->tObj->Image[level]; if ( !texImage ) { - if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) - fprintf( stderr, __FUNCTION__ ": texImage %d is NULL!\n", level ); + if ( RADEON_DEBUG & DEBUG_TEXTURE ) + fprintf( stderr, "%s: texImage %d is NULL!\n", __FUNCTION__, level ); return; } - if ( !t->image[level].data ) { - if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) - fprintf( stderr, __FUNCTION__ ": image data is NULL!\n" ); + if ( !texImage->Data ) { + if ( RADEON_DEBUG & DEBUG_TEXTURE ) + fprintf( stderr, "%s: image data is NULL!\n", __FUNCTION__ ); return; } @@ -359,20 +366,24 @@ 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 0 + /* Bump the performace counter */ + rmesa->c_textureBytes += (dwords << 2); +#endif - if ( RADEON_DEBUG & DEBUG_VERBOSE_MSG ) { + if ( RADEON_DEBUG & (DEBUG_TEXTURE|DEBUG_IOCTL) ) { + GLint imageX = 0; + GLint imageY = 0; + GLint blitX = t->image[level].x; + GLint blitY = t->image[level].y; + GLint blitWidth = t->image[level].width; + GLint blitHeight = t->image[level].height; fprintf( stderr, " upload image: %d,%d at %d,%d\n", imageWidth, imageHeight, imageX, imageY ); fprintf( stderr, " upload blit: %d,%d at %d,%d\n", @@ -382,12 +393,25 @@ (GLuint)offset, (GLuint)pitch, level, format ); } - ret = drmRadeonLoadTexture( rmesa->driFd, offset, pitch, format, - imageWidth, imageHeight, &t->image[level] ); + t->image[level].data = texImage->Data; + tex.offset = offset; + tex.pitch = pitch; + tex.format = format; + tex.width = imageWidth; + tex.height = imageHeight; + tex.image = &tmp; + + memcpy( &tmp, &t->image[level], sizeof(drmRadeonTexImage) ); + + do { + ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_TEXTURE, + &tex, sizeof(drmRadeonTexture) ); + } while ( ret && errno == EAGAIN ); + if ( ret ) { UNLOCK_HARDWARE( rmesa ); - fprintf( stderr, "drmRadeonTextureBlit: return = %d\n", ret ); + fprintf( stderr, "DRM_RADEON_TEXTURE: 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", @@ -397,9 +421,6 @@ 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 @@ -408,17 +429,23 @@ */ int radeonUploadTexImages( radeonContextPtr rmesa, radeonTexObjPtr t ) { + const int numLevels = t->lastLevel - t->firstLevel + 1; int i; int heap; + radeonTexObjPtr t0 = rmesa->state.texture.unit[0].texobj; + radeonTexObjPtr t1 = rmesa->state.texture.unit[1].texobj; - if ( RADEON_DEBUG & DEBUG_VERBOSE_TEXTURE ) { - fprintf( stderr, "%s( %p, %p ) sz=%d\n", - __FUNCTION__, rmesa->glCtx, t->tObj, t->totalSize ); + if ( RADEON_DEBUG & (DEBUG_TEXTURE|DEBUG_IOCTL) ) { + fprintf( stderr, "%s( %p, %p ) sz=%d lvls=%d-%d\n", __FUNCTION__, + rmesa->glCtx, t->tObj, t->totalSize, + t->firstLevel, t->lastLevel ); } if ( !t || t->totalSize == 0 ) return 0; + LOCK_HARDWARE( rmesa ); + /* Choose the heap appropriately */ heap = t->heap = RADEON_CARD_HEAP; #if 0 @@ -431,13 +458,13 @@ /* 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->memBlock = mmAllocMem( rmesa->texture.heap[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->memBlock = mmAllocMem( rmesa->texture.heap[RADEON_AGP_HEAP], t->totalSize, 12, 0 ); if ( t->memBlock ) @@ -447,16 +474,20 @@ /* Kick out textures until the requested texture fits */ while ( !t->memBlock ) { - if ( rmesa->TexObjList[heap].prev->bound ) { + if ( rmesa->texture.objects[heap].prev == t0 || + rmesa->texture.objects[heap].prev == t1 ) { fprintf( stderr, "radeonUploadTexImages: ran into bound texture\n" ); + UNLOCK_HARDWARE( rmesa ); return -1; } - if ( rmesa->TexObjList[heap].prev == &rmesa->TexObjList[heap] ) { + if ( rmesa->texture.objects[heap].prev == + &rmesa->texture.objects[heap] ) { if ( rmesa->radeonScreen->IsPCI ) { fprintf( stderr, "radeonUploadTexImages: upload texture " "failure on local texture heaps, sz=%d\n", t->totalSize ); + UNLOCK_HARDWARE( rmesa ); return -1; #if 0 } else if ( heap == RADEON_CARD_HEAP ) { @@ -468,20 +499,21 @@ "failure on both local and AGP texture heaps, " "sz=%d\n", t->totalSize ); + UNLOCK_HARDWARE( rmesa ); return -1; } } - radeonSwapOutTexObj( rmesa, rmesa->TexObjList[heap].prev ); + radeonSwapOutTexObj( rmesa, rmesa->texture.objects[heap].prev ); - t->memBlock = mmAllocMem( rmesa->texHeap[heap], + t->memBlock = mmAllocMem( rmesa->texture.heap[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 ) { @@ -490,33 +522,27 @@ } #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; - } + /* Mark this texobj as dirty on all units: + */ + t->dirty_state = TEX_ALL; } /* 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 ); - } + if (t->dirty_images) { + for ( i = 0 ; i < numLevels ; i++ ) { + if ( t->dirty_images & (1 << i) ) { + radeonUploadSubImage( rmesa, t, i, 0, 0, + t->image[i].width, t->image[i].height ); + } } - - rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + t->dirty_images = 0; } + + + UNLOCK_HARDWARE( rmesa ); - t->dirty_images = 0; return 0; } Index: xc/lib/GL/mesa/src/drv/radeon/radeon_texobj.h diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_texobj.h:1.3 xc/lib/GL/mesa/src/drv/radeon/radeon_texobj.h:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_texobj.h:1.3 Tue Apr 10 12:07:53 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_texobj.h Thu Feb 27 12:26:33 2003 @@ -1,77 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c:1.6 --- xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c:1.1 Wed Mar 21 11:14:25 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c Mon Dec 16 11:18:59 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c,v 1.1 2001/03/21 16:14:25 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c,v 1.6 2002/12/16 16:18:59 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and @@ -37,52 +37,85 @@ #include "radeon_context.h" #include "radeon_state.h" #include "radeon_ioctl.h" -#include "radeon_vb.h" +#include "radeon_swtcl.h" #include "radeon_tex.h" +#include "radeon_tcl.h" -#include "mmath.h" -#include "simple_list.h" +#include "context.h" #include "enums.h" #include "mem.h" +#include "texformat.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; + const struct gl_texture_image *baseImage = tObj->Image[tObj->BaseLevel]; GLint totalSize; GLint texelsPerDword = 0, blitWidth = 0, blitPitch = 0; GLint x, y, width, height; GLint i; + GLint firstLevel, lastLevel, numLevels; + GLint log2Width, log2Height; + GLuint txformat = 0; - /* Calculate dimensions in log domain. + /* Set the hardware texture format */ - for ( i = 1, log2Height = 0 ; i < texImage->Height ; i *= 2 ) { - log2Height++; + switch (baseImage->TexFormat->MesaFormat) { + case MESA_FORMAT_I8: + txformat = RADEON_TXFORMAT_I8; + break; + case MESA_FORMAT_AL88: + txformat = RADEON_TXFORMAT_AI88; + break; + case MESA_FORMAT_RGBA8888: + txformat = RADEON_TXFORMAT_RGBA8888; + break; + case MESA_FORMAT_ARGB8888: + txformat = RADEON_TXFORMAT_ARGB8888; + break; + case MESA_FORMAT_RGB565: + txformat = RADEON_TXFORMAT_RGB565; + break; + case MESA_FORMAT_ARGB1555: + txformat = RADEON_TXFORMAT_ARGB1555; + break; + case MESA_FORMAT_ARGB4444: + txformat = RADEON_TXFORMAT_ARGB4444; + break; + default: + _mesa_problem(NULL, "unexpected texture format in radeonTexImage2D"); + return; } - for ( i = 1, log2Width = 0 ; i < texImage->Width ; i *= 2 ) { - log2Width++; + + 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; } - 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; + switch ( baseImage->TexFormat->TexelBytes ) { + case 1: + texelsPerDword = 4; + blitPitch = 64; break; case 2: texelsPerDword = 2; blitPitch = 32; break; - case 1: - texelsPerDword = 4; - blitPitch = 64; + case 4: + texelsPerDword = 1; + blitPitch = 16; break; } @@ -91,7 +124,7 @@ * can't upload mipmaps directly and have to reference their location * from the aligned start of the whole image. */ - blitWidth = MAX2( texImage->Width, blitPitch ); + blitWidth = MAX2( baseImage->Width, blitPitch ); /* Calculate mipmap offsets and dimensions. */ @@ -99,10 +132,33 @@ x = 0; y = 0; - for ( i = 0 ; i <= log2Size ; i++ ) { + /* Compute which mipmap levels we really want to send to the hardware. + * This depends on the base image size, GL_TEXTURE_MIN_LOD, + * GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, and GL_TEXTURE_MAX_LEVEL. + * Yes, this looks overly complicated, but it's all needed. + */ + firstLevel = tObj->BaseLevel + (GLint) (tObj->MinLod + 0.5); + firstLevel = MAX2(firstLevel, tObj->BaseLevel); + lastLevel = tObj->BaseLevel + (GLint) (tObj->MaxLod + 0.5); + lastLevel = MAX2(lastLevel, tObj->BaseLevel); + lastLevel = MIN2(lastLevel, tObj->BaseLevel + baseImage->MaxLog2); + lastLevel = MIN2(lastLevel, tObj->MaxLevel); + lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */ + + /* save these values */ + t->firstLevel = firstLevel; + t->lastLevel = lastLevel; + + numLevels = lastLevel - firstLevel + 1; + + log2Width = tObj->Image[firstLevel]->WidthLog2; + log2Height = tObj->Image[firstLevel]->HeightLog2; + + for ( i = 0 ; i < numLevels ; i++ ) { + const struct gl_texture_image *texImage; GLuint size; - texImage = tObj->Image[i]; + texImage = tObj->Image[i + firstLevel]; if ( !texImage ) break; @@ -118,7 +174,7 @@ width = blitPitch / 2; } - size = width * height * texFormat->TexelBytes; + size = width * height * baseImage->TexFormat->TexelBytes; totalSize += size; ASSERT( (totalSize & 31) == 0 ); @@ -127,6 +183,7 @@ height /= 2; } + assert(i < RADEON_MAX_TEXTURE_LEVELS); t->image[i].x = x; t->image[i].y = y; @@ -147,12 +204,11 @@ } } - if ( 0 ) { + if ( 0 ) fprintf( stderr, "level=%d p=%d %dx%d -> %dx%d at (%d,%d)\n", - i, blitWidth, texImage->Width, texImage->Height, + i, blitWidth, baseImage->Width, baseImage->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. @@ -162,15 +218,20 @@ /* Hardware state: */ t->pp_txfilter &= ~RADEON_MAX_MIP_LEVEL_MASK; - t->pp_txfilter |= i << RADEON_MAX_MIP_LEVEL_SHIFT; + t->pp_txfilter |= (numLevels - 1) << 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)); + + t->dirty_state = TEX_ALL; + + radeonUploadTexImages( rmesa, t ); } + /* ================================================================ * Texture combine functions */ @@ -661,39 +722,21 @@ * Texture unit state management */ -static void radeonUpdateTextureEnv( GLcontext *ctx, int unit ) +static GLboolean 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; + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + const struct gl_texture_object *tObj = texUnit->_Current; + const GLenum format = tObj->Image[tObj->BaseLevel]->Format; 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 ); + if ( RADEON_DEBUG & DEBUG_TEXTURE ) { + fprintf( stderr, "%s( %p, %d ) format=%s\n", __FUNCTION__, + ctx, unit, _mesa_lookup_enum_by_nr( format ) ); } - 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 @@ -702,10 +745,8 @@ */ switch ( texUnit->EnvMode ) { case GL_REPLACE: - switch ( tObj->Image[0]->Format ) { + switch ( 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]; @@ -715,17 +756,20 @@ color_combine = radeon_color_combine[unit][RADEON_DISABLE]; alpha_combine = radeon_alpha_combine[unit][RADEON_REPLACE]; break; + case GL_LUMINANCE: + case GL_RGB: + color_combine = radeon_color_combine[unit][RADEON_REPLACE]; + alpha_combine = radeon_alpha_combine[unit][RADEON_DISABLE]; + break; case GL_COLOR_INDEX: default: - return; + return GL_FALSE; } break; case GL_MODULATE: - switch ( tObj->Image[0]->Format ) { + switch ( 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]; @@ -735,14 +779,19 @@ color_combine = radeon_color_combine[unit][RADEON_DISABLE]; alpha_combine = radeon_alpha_combine[unit][RADEON_MODULATE]; break; + case GL_RGB: + case GL_LUMINANCE: + color_combine = radeon_color_combine[unit][RADEON_MODULATE]; + alpha_combine = radeon_alpha_combine[unit][RADEON_DISABLE]; + break; case GL_COLOR_INDEX: default: - return; + return GL_FALSE; } break; case GL_DECAL: - switch ( tObj->Image[0]->Format ) { + switch ( format ) { case GL_RGBA: case GL_RGB: color_combine = radeon_color_combine[unit][RADEON_DECAL]; @@ -757,12 +806,12 @@ break; case GL_COLOR_INDEX: default: - return; + return GL_FALSE; } break; case GL_BLEND: - switch ( tObj->Image[0]->Format ) { + switch ( format ) { case GL_RGBA: case GL_RGB: case GL_LUMINANCE: @@ -780,12 +829,12 @@ break; case GL_COLOR_INDEX: default: - return; + return GL_FALSE; } break; case GL_ADD: - switch ( tObj->Image[0]->Format ) { + switch ( format ) { case GL_RGBA: case GL_RGB: case GL_LUMINANCE: @@ -803,11 +852,16 @@ break; case GL_COLOR_INDEX: default: - return; + return GL_FALSE; } break; case GL_COMBINE_EXT: + /* Don't cache these results. + */ + rmesa->state.texture.unit[unit].format = 0; + rmesa->state.texture.unit[unit].envMode = 0; + /* Step 0: * Calculate how many arguments we need to process. */ @@ -817,16 +871,19 @@ break; case GL_MODULATE: case GL_ADD: - case GL_ADD_SIGNED_EXT: + case GL_ADD_SIGNED: + case GL_SUBTRACT: + case GL_DOT3_RGB: + case GL_DOT3_RGBA: case GL_DOT3_RGB_EXT: case GL_DOT3_RGBA_EXT: numColorArgs = 2; break; - case GL_INTERPOLATE_EXT: + case GL_INTERPOLATE: numColorArgs = 3; break; default: - return; + return GL_FALSE; } switch ( texUnit->CombineModeA ) { @@ -835,56 +892,61 @@ break; case GL_MODULATE: case GL_ADD: - case GL_ADD_SIGNED_EXT: + case GL_ADD_SIGNED: + case GL_SUBTRACT: numAlphaArgs = 2; break; - case GL_INTERPOLATE_EXT: + case GL_INTERPOLATE: numAlphaArgs = 3; break; default: - return; + return GL_FALSE; } /* Step 1: * Extract the color and alpha combine function arguments. */ for ( i = 0 ; i < numColorArgs ; i++ ) { - op = texUnit->CombineOperandRGB[i] - GL_SRC_COLOR; + const GLuint op = texUnit->CombineOperandRGB[i] - GL_SRC_COLOR; + ASSERT(op >= 0); + ASSERT(op <= 3); switch ( texUnit->CombineSourceRGB[i] ) { case GL_TEXTURE: color_arg[i] = radeon_texture_color[op][unit]; break; - case GL_CONSTANT_EXT: + case GL_CONSTANT: color_arg[i] = radeon_tfactor_color[op]; break; - case GL_PRIMARY_COLOR_EXT: + case GL_PRIMARY_COLOR: color_arg[i] = radeon_primary_color[op]; break; - case GL_PREVIOUS_EXT: + case GL_PREVIOUS: color_arg[i] = radeon_previous_color[op]; break; default: - return; + return GL_FALSE; } } for ( i = 0 ; i < numAlphaArgs ; i++ ) { - op = texUnit->CombineOperandA[i] - GL_SRC_ALPHA; + const GLuint op = texUnit->CombineOperandA[i] - GL_SRC_ALPHA; + ASSERT(op >= 0); + ASSERT(op <= 1); switch ( texUnit->CombineSourceA[i] ) { case GL_TEXTURE: alpha_arg[i] = radeon_texture_alpha[op][unit]; break; - case GL_CONSTANT_EXT: + case GL_CONSTANT: alpha_arg[i] = radeon_tfactor_alpha[op]; break; - case GL_PRIMARY_COLOR_EXT: + case GL_PRIMARY_COLOR: alpha_arg[i] = radeon_primary_alpha[op]; break; - case GL_PREVIOUS_EXT: + case GL_PREVIOUS: alpha_arg[i] = radeon_previous_alpha[op]; break; default: - return; + return GL_FALSE; } } @@ -914,21 +976,39 @@ RADEON_COLOR_ARG( 0, A ); RADEON_COLOR_ARG( 1, C ); break; - case GL_ADD_SIGNED_EXT: + case GL_ADD_SIGNED: 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_SUBTRACT: + color_combine = (RADEON_COLOR_ARG_B_ZERO | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_SUBTRACT | + RADEON_CLAMP_TX); + RADEON_COLOR_ARG( 0, A ); + RADEON_COLOR_ARG( 1, C ); break; - case GL_INTERPOLATE_EXT: + case GL_INTERPOLATE: 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: + case GL_DOT3_RGBA: + if ( texUnit->CombineScaleShiftRGB + != (RADEON_SCALE_1X >> RADEON_SCALE_SHIFT) ) + { + return GL_FALSE; + } + /* FALLTHROUGH */ + case GL_DOT3_RGB_EXT: case GL_DOT3_RGBA_EXT: color_combine = (RADEON_COLOR_ARG_C_ZERO | @@ -938,7 +1018,7 @@ RADEON_COLOR_ARG( 1, B ); break; default: - return; + return GL_FALSE; } switch ( texUnit->CombineModeA ) { @@ -964,15 +1044,23 @@ RADEON_ALPHA_ARG( 0, A ); RADEON_ALPHA_ARG( 1, C ); break; - case GL_ADD_SIGNED_EXT: + case GL_ADD_SIGNED: 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_SUBTRACT: + alpha_combine = (RADEON_COLOR_ARG_B_ZERO | + RADEON_COMP_ARG_B | + RADEON_BLEND_CTL_SUBTRACT | + RADEON_CLAMP_TX); + RADEON_ALPHA_ARG( 0, A ); + RADEON_ALPHA_ARG( 1, C ); break; - case GL_INTERPOLATE_EXT: + case GL_INTERPOLATE: alpha_combine = (RADEON_BLEND_CTL_BLEND | RADEON_CLAMP_TX); RADEON_ALPHA_ARG( 0, B ); @@ -980,24 +1068,29 @@ RADEON_ALPHA_ARG( 2, C ); break; default: - return; + return GL_FALSE; } - if ( texUnit->CombineModeRGB == GL_DOT3_RGB_EXT ) { + if ( (texUnit->CombineModeRGB == GL_DOT3_RGB_EXT) + || (texUnit->CombineModeRGB == GL_DOT3_RGB_ARB) ) { 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. + * Apply the scale factor. The EXT version of the DOT3 extension does + * not support the scale factor, but the ARB version (and the version in + * OpenGL 1.3) does. The catch is that the Radeon only supports a 1X + * multiplier in hardware w/the ARB version. */ if ( texUnit->CombineModeRGB != GL_DOT3_RGB_EXT && - texUnit->CombineModeRGB != GL_DOT3_RGBA_EXT ) { - color_combine |= (texUnit->CombineScaleShiftRGB << 21); - alpha_combine |= (texUnit->CombineScaleShiftA << 21); - } else { + texUnit->CombineModeRGB != GL_DOT3_RGBA_EXT && + texUnit->CombineModeRGB != GL_DOT3_RGB && + texUnit->CombineModeRGB != GL_DOT3_RGBA ) { + color_combine |= (texUnit->CombineScaleShiftRGB << RADEON_SCALE_SHIFT); + alpha_combine |= (texUnit->CombineScaleShiftA << RADEON_SCALE_SHIFT); + } + else + { color_combine |= RADEON_SCALE_4X; alpha_combine |= RADEON_SCALE_4X; } @@ -1007,97 +1100,304 @@ break; default: - return; + return GL_FALSE; } - rmesa->color_combine[source] = color_combine; - rmesa->alpha_combine[source] = alpha_combine; + if ( rmesa->hw.tex[unit].cmd[TEX_PP_TXCBLEND] != color_combine || + rmesa->hw.tex[unit].cmd[TEX_PP_TXABLEND] != alpha_combine ) { + RADEON_STATECHANGE( rmesa, tex[unit] ); + rmesa->hw.tex[unit].cmd[TEX_PP_TXCBLEND] = color_combine; + rmesa->hw.tex[unit].cmd[TEX_PP_TXABLEND] = alpha_combine; + } + + return GL_TRUE; } -static void radeonUpdateTextureObject( GLcontext *ctx, int unit ) +#define TEXOBJ_TXFILTER_MASK (RADEON_MAX_MIP_LEVEL_MASK | \ + RADEON_MIN_FILTER_MASK | \ + RADEON_MAG_FILTER_MASK | \ + RADEON_MAX_ANISO_MASK | \ + RADEON_CLAMP_S_MASK | \ + RADEON_CLAMP_T_MASK) + +#define TEXOBJ_TXFORMAT_MASK (RADEON_TXFORMAT_WIDTH_MASK | \ + RADEON_TXFORMAT_HEIGHT_MASK | \ + RADEON_TXFORMAT_FORMAT_MASK | \ + RADEON_TXFORMAT_ALPHA_IN_MAP) + + +static void import_tex_obj_state( radeonContextPtr rmesa, + int unit, + radeonTexObjPtr texobj ) { - 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 ); - } + GLuint *cmd = RADEON_DB_STATE( tex[unit] ); - enabled = (ctx->Texture.ReallyEnabled >> (source * 4)) & TEXTURE0_ANY; - if ( enabled != TEXTURE0_2D && enabled != TEXTURE0_1D ) { - if ( enabled ) - rmesa->Fallback |= RADEON_FALLBACK_TEXTURE; - return; - } + cmd[TEX_PP_TXFILTER] &= ~TEXOBJ_TXFILTER_MASK; + cmd[TEX_PP_TXFORMAT] &= ~TEXOBJ_TXFORMAT_MASK; + cmd[TEX_PP_TXFILTER] |= texobj->pp_txfilter & TEXOBJ_TXFILTER_MASK; + cmd[TEX_PP_TXFORMAT] |= texobj->pp_txformat & TEXOBJ_TXFORMAT_MASK; + cmd[TEX_PP_TXOFFSET] = texobj->pp_txoffset; + cmd[TEX_PP_BORDER_COLOR] = texobj->pp_border_color; + texobj->dirty_state &= ~(1<Texture.Unit[source].Current; - if ( !tObj || !tObj->Complete ) - return; + RADEON_DB_STATECHANGE( rmesa, &rmesa->hw.tex[unit] ); +} - 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); +static void set_texgen_matrix( radeonContextPtr rmesa, + GLuint unit, + GLfloat *s_plane, + GLfloat *t_plane ) +{ + static const GLfloat scale_identity[4] = { 1,1,1,1 }; + + if (!TEST_EQ_4V( s_plane, scale_identity) || + !(TEST_EQ_4V( t_plane, scale_identity))) { + rmesa->TexGenEnabled |= RADEON_TEXMAT_0_ENABLE<TexGenMatrix[unit].m[0] = s_plane[0]; + rmesa->TexGenMatrix[unit].m[4] = s_plane[1]; + rmesa->TexGenMatrix[unit].m[8] = s_plane[2]; + rmesa->TexGenMatrix[unit].m[12] = s_plane[3]; + + rmesa->TexGenMatrix[unit].m[1] = t_plane[0]; + rmesa->TexGenMatrix[unit].m[5] = t_plane[1]; + rmesa->TexGenMatrix[unit].m[9] = t_plane[2]; + rmesa->TexGenMatrix[unit].m[13] = t_plane[3]; + rmesa->NewGLState |= _NEW_TEXTURE_MATRIX; } +} - if ( t->memBlock ) - radeonUpdateTexLRU( rmesa, t ); +/* Ignoring the Q texcoord for now. + * + * Returns GL_FALSE if fallback required. + */ +static GLboolean radeon_validate_texgen( GLcontext *ctx, GLuint unit ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + GLuint inputshift = RADEON_TEXGEN_0_INPUT_SHIFT + unit*4; + GLuint tmp = rmesa->TexGenEnabled; + + rmesa->TexGenEnabled &= ~(RADEON_TEXGEN_TEXMAT_0_ENABLE<TexGenEnabled &= ~(RADEON_TEXMAT_0_ENABLE<TexGenEnabled &= ~(RADEON_TEXGEN_INPUT_MASK<TexGenNeedNormals[unit] = 0; + + if (0) + fprintf(stderr, "%s unit %d cleared texgenEnabled %x\n", __FUNCTION__, + unit, rmesa->TexGenEnabled); + + if ((texUnit->TexGenEnabled & (S_BIT|T_BIT)) == 0) { + /* Disabled, no fallback: + */ + rmesa->TexGenEnabled |= + (RADEON_TEXGEN_INPUT_TEXCOORD_0+unit) << inputshift; + return GL_TRUE; + } + else if (texUnit->TexGenEnabled & Q_BIT) { + /* Very easy to do this, in fact would remove a fallback case + * elsewhere, but I haven't done it yet... Fallback: + */ + fprintf(stderr, "fallback Q_BIT\n"); + return GL_FALSE; + } + else if ((texUnit->TexGenEnabled & (S_BIT|T_BIT)) != (S_BIT|T_BIT) || + texUnit->GenModeS != texUnit->GenModeT) { + /* Mixed modes, fallback: + */ +/* fprintf(stderr, "fallback mixed texgen\n"); */ + return GL_FALSE; + } + else + rmesa->TexGenEnabled |= RADEON_TEXGEN_TEXMAT_0_ENABLE << unit; - switch ( unit ) { - case 0: - rmesa->setup.pp_cntl |= (RADEON_TEX_0_ENABLE | - RADEON_TEX_BLEND_0_ENABLE); + switch (texUnit->GenModeS) { + case GL_OBJECT_LINEAR: + rmesa->TexGenEnabled |= RADEON_TEXGEN_INPUT_OBJ << inputshift; + set_texgen_matrix( rmesa, unit, + texUnit->ObjectPlaneS, + texUnit->ObjectPlaneT); break; - case 1: - rmesa->setup.pp_cntl |= (RADEON_TEX_1_ENABLE | - RADEON_TEX_BLEND_1_ENABLE); + + case GL_EYE_LINEAR: + rmesa->TexGenEnabled |= RADEON_TEXGEN_INPUT_EYE << inputshift; + set_texgen_matrix( rmesa, unit, + texUnit->EyePlaneS, + texUnit->EyePlaneT); + break; + + case GL_REFLECTION_MAP_NV: + rmesa->TexGenNeedNormals[unit] = GL_TRUE; + rmesa->TexGenEnabled |= RADEON_TEXGEN_INPUT_EYE_REFLECT<TexGenNeedNormals[unit] = GL_TRUE; + rmesa->TexGenEnabled |= RADEON_TEXGEN_INPUT_EYE_NORMAL<TexGenEnabled) { + rmesa->NewGLState |= _NEW_TEXTURE_MATRIX; } + +/* fprintf(stderr, "%s unit %d texgenEnabled %x\n", __FUNCTION__, */ +/* unit, rmesa->TexGenEnabled); */ + return GL_TRUE; } -void radeonUpdateTextureState( GLcontext *ctx ) + + + +static GLboolean radeonUpdateTextureUnit( GLcontext *ctx, int unit ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + if ( texUnit->_ReallyEnabled & (TEXTURE0_1D|TEXTURE0_2D) ) { + struct gl_texture_object *tObj = texUnit->_Current; + radeonTexObjPtr t = (radeonTexObjPtr) tObj->DriverData; + GLenum format; + + /* Fallback if there's a texture border */ + if ( tObj->Image[tObj->BaseLevel]->Border > 0 ) + return GL_FALSE; + + /* Upload teximages (not pipelined) + */ + if ( t->dirty_images ) { + RADEON_FIREVERTICES( rmesa ); + radeonSetTexImages( rmesa, tObj ); + /* Fallback if we can't upload: + */ + if ( !t->memBlock ) + return GL_FALSE; + } - if ( RADEON_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "%s( %p ) en=0x%x\n", - __FUNCTION__, ctx, ctx->Texture.ReallyEnabled ); + /* Update state if this is a different texture object to last + * time. + */ + if ( rmesa->state.texture.unit[unit].texobj != t ) { + rmesa->state.texture.unit[unit].texobj = t; + t->dirty_state |= 1<hw.ctx.cmd[CTX_PP_CNTL] & (RADEON_TEX_0_ENABLE<hw.ctx.cmd[CTX_PP_CNTL] |= + (RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE) << unit; + + RADEON_STATECHANGE( rmesa, tcl ); + + if (unit == 0) + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_ST0; + else + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] |= RADEON_TCL_VTX_ST1; + + rmesa->recheck_texgen[unit] = GL_TRUE; + } + + if (t->dirty_state & (1<recheck_texgen[unit]) { + GLboolean fallback = !radeon_validate_texgen( ctx, unit ); + TCL_FALLBACK( ctx, (RADEON_TCL_FALLBACK_TEXGEN_0<recheck_texgen[unit] = 0; + rmesa->NewGLState |= _NEW_TEXTURE_MATRIX; + } + + format = tObj->Image[tObj->BaseLevel]->Format; + if ( rmesa->state.texture.unit[unit].format != format || + rmesa->state.texture.unit[unit].envMode != texUnit->EnvMode ) { + rmesa->state.texture.unit[unit].format = format; + rmesa->state.texture.unit[unit].envMode = texUnit->EnvMode; + if ( ! radeonUpdateTextureEnv( ctx, unit ) ) { + return GL_FALSE; + } + } + } + else if ( texUnit->_ReallyEnabled ) { + /* 3d textures, etc: + */ + return GL_FALSE; } + else if (rmesa->hw.ctx.cmd[CTX_PP_CNTL] & (RADEON_TEX_0_ENABLE<state.texture.unit[unit].texobj = 0; + RADEON_STATECHANGE( rmesa, ctx ); + rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= + ~((RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE) << unit); + + RADEON_STATECHANGE( rmesa, tcl ); + switch (unit) { + case 0: + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] &= ~(RADEON_TCL_VTX_ST0 | + RADEON_TCL_VTX_Q0); + break; + case 1: + rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] &= ~(RADEON_TCL_VTX_ST1 | + RADEON_TCL_VTX_Q1); + break; + default: + break; + } - /* 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 ); + if (rmesa->TclFallback & (RADEON_TCL_FALLBACK_TEXGEN_0<recheck_texgen[unit] = GL_TRUE; + } + + + + { + GLuint inputshift = RADEON_TEXGEN_0_INPUT_SHIFT + unit*4; + GLuint tmp = rmesa->TexGenEnabled; + + rmesa->TexGenEnabled &= ~(RADEON_TEXGEN_TEXMAT_0_ENABLE<TexGenEnabled &= ~(RADEON_TEXMAT_0_ENABLE<TexGenEnabled &= ~(RADEON_TEXGEN_INPUT_MASK<TexGenNeedNormals[unit] = 0; + rmesa->TexGenEnabled |= + (RADEON_TEXGEN_INPUT_TEXCOORD_0+unit) << inputshift; + + if (tmp != rmesa->TexGenEnabled) { + rmesa->recheck_texgen[unit] = GL_TRUE; + rmesa->NewGLState |= _NEW_TEXTURE_MATRIX; + } + } } + + return GL_TRUE; +} + +void radeonUpdateTextureState( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLboolean ok; + + ok = (radeonUpdateTextureUnit( ctx, 0 ) && + radeonUpdateTextureUnit( ctx, 1 )); + + FALLBACK( rmesa, RADEON_FALLBACK_TEXTURE, !ok ); - rmesa->dirty |= RADEON_UPLOAD_CONTEXT; + if (rmesa->TclFallback) + radeonChooseVertexState( ctx ); } Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tris.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_tris.c:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_tris.c:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_tris.c:1.2 Wed Mar 21 11:14:25 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tris.c Thu Feb 27 12:26:33 2003 @@ -1,225 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_tris.h:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_tris.h:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_tris.h:1.2 Wed Mar 21 11:14:25 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tris.h Thu Feb 27 12:26:33 2003 @@ -1,341 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_tritmp.h:1.2 xc/lib/GL/mesa/src/drv/radeon/radeon_tritmp.h:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_tritmp.h:1.2 Wed Mar 21 11:14:25 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tritmp.h Thu Feb 27 12:26:33 2003 @@ -1,349 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_vb.c:1.4 xc/lib/GL/mesa/src/drv/radeon/radeon_vb.c:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_vb.c:1.4 Sun Mar 25 00:32:00 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vb.c Thu Feb 27 12:26:34 2003 @@ -1,483 +0,0 @@ -/* $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 xc/lib/GL/mesa/src/drv/radeon/radeon_vb.h:1.1 xc/lib/GL/mesa/src/drv/radeon/radeon_vb.h:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_vb.h:1.1 Sun Jan 7 20:07:29 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vb.h Thu Feb 27 12:26:34 2003 @@ -1,136 +0,0 @@ -/* $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_vtxfmt.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c:1.5 --- /dev/null Thu Feb 27 12:26:34 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c Mon Dec 16 11:18:59 2002 @@ -0,0 +1,1127 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c,v 1.5 2002/12/16 16:18:59 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics 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, TUNGSTEN GRAPHICS 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 + * + */ +#include "glheader.h" +#include "radeon_context.h" +#include "radeon_state.h" +#include "radeon_ioctl.h" +#include "radeon_tex.h" +#include "radeon_tcl.h" +#include "radeon_vtxfmt.h" + +#include "api_noop.h" +#include "api_arrayelt.h" +#include "context.h" +#include "mem.h" +#include "mmath.h" +#include "mtypes.h" +#include "enums.h" +#include "glapi.h" +#include "colormac.h" +#include "light.h" +#include "state.h" +#include "vtxfmt.h" + +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "tnl/t_array_api.h" + +struct radeon_vb vb; + +static void radeonFlushVertices( GLcontext *, GLuint ); + +static void count_func( const char *name, struct dynfn *l ) +{ + int i = 0; + struct dynfn *f; + foreach (f, l) i++; + if (i) fprintf(stderr, "%s: %d\n", name, i ); +} + +static void count_funcs( radeonContextPtr rmesa ) +{ + count_func( "Vertex2f", &rmesa->vb.dfn_cache.Vertex2f ); + count_func( "Vertex2fv", &rmesa->vb.dfn_cache.Vertex2fv ); + count_func( "Vertex3f", &rmesa->vb.dfn_cache.Vertex3f ); + count_func( "Vertex3fv", &rmesa->vb.dfn_cache.Vertex3fv ); + count_func( "Color4ub", &rmesa->vb.dfn_cache.Color4ub ); + count_func( "Color4ubv", &rmesa->vb.dfn_cache.Color4ubv ); + count_func( "Color3ub", &rmesa->vb.dfn_cache.Color3ub ); + count_func( "Color3ubv", &rmesa->vb.dfn_cache.Color3ubv ); + count_func( "Color4f", &rmesa->vb.dfn_cache.Color4f ); + count_func( "Color4fv", &rmesa->vb.dfn_cache.Color4fv ); + count_func( "Color3f", &rmesa->vb.dfn_cache.Color3f ); + count_func( "Color3fv", &rmesa->vb.dfn_cache.Color3fv ); + count_func( "SecondaryColor3f", &rmesa->vb.dfn_cache.SecondaryColor3fEXT ); + count_func( "SecondaryColor3fv", &rmesa->vb.dfn_cache.SecondaryColor3fvEXT ); + count_func( "SecondaryColor3ub", &rmesa->vb.dfn_cache.SecondaryColor3ubEXT ); + count_func( "SecondaryColor3ubv", &rmesa->vb.dfn_cache.SecondaryColor3ubvEXT ); + count_func( "Normal3f", &rmesa->vb.dfn_cache.Normal3f ); + count_func( "Normal3fv", &rmesa->vb.dfn_cache.Normal3fv ); + count_func( "TexCoord2f", &rmesa->vb.dfn_cache.TexCoord2f ); + count_func( "TexCoord2fv", &rmesa->vb.dfn_cache.TexCoord2fv ); + count_func( "TexCoord1f", &rmesa->vb.dfn_cache.TexCoord1f ); + count_func( "TexCoord1fv", &rmesa->vb.dfn_cache.TexCoord1fv ); + count_func( "MultiTexCoord2fARB", &rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + count_func( "MultiTexCoord2fvARB", &rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + count_func( "MultiTexCoord1fARB", &rmesa->vb.dfn_cache.MultiTexCoord1fARB ); + count_func( "MultiTexCoord1fvARB", &rmesa->vb.dfn_cache.MultiTexCoord1fvARB ); +} + + +void radeon_copy_to_current( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + assert(ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT); + assert(vb.context == ctx); + + if (rmesa->vb.vertex_format & RADEON_CP_VC_FRMT_N0) { + ctx->Current.Normal[0] = vb.normalptr[0]; + ctx->Current.Normal[1] = vb.normalptr[1]; + ctx->Current.Normal[2] = vb.normalptr[2]; + } + + if (rmesa->vb.vertex_format & RADEON_CP_VC_FRMT_PKCOLOR) { + ctx->Current.Color[0] = UBYTE_TO_FLOAT( vb.colorptr->red ); + ctx->Current.Color[1] = UBYTE_TO_FLOAT( vb.colorptr->green ); + ctx->Current.Color[2] = UBYTE_TO_FLOAT( vb.colorptr->blue ); + ctx->Current.Color[3] = UBYTE_TO_FLOAT( vb.colorptr->alpha ); + } + + if (rmesa->vb.vertex_format & RADEON_CP_VC_FRMT_FPCOLOR) { + ctx->Current.Color[0] = vb.floatcolorptr[0]; + ctx->Current.Color[1] = vb.floatcolorptr[1]; + ctx->Current.Color[2] = vb.floatcolorptr[2]; + } + + if (rmesa->vb.vertex_format & RADEON_CP_VC_FRMT_FPALPHA) + ctx->Current.Color[3] = vb.floatcolorptr[3]; + + if (rmesa->vb.vertex_format & RADEON_CP_VC_FRMT_PKSPEC) { + ctx->Current.SecondaryColor[0] = UBYTE_TO_FLOAT( vb.specptr->red ); + ctx->Current.SecondaryColor[1] = UBYTE_TO_FLOAT( vb.specptr->green ); + ctx->Current.SecondaryColor[2] = UBYTE_TO_FLOAT( vb.specptr->blue ); + } + + if (rmesa->vb.vertex_format & RADEON_CP_VC_FRMT_ST0) { + ctx->Current.Texcoord[0][0] = vb.texcoordptr[0][0]; + ctx->Current.Texcoord[0][1] = vb.texcoordptr[0][1]; + ctx->Current.Texcoord[0][2] = 0.0F; + ctx->Current.Texcoord[0][3] = 1.0F; + } + + if (rmesa->vb.vertex_format & RADEON_CP_VC_FRMT_ST1) { + ctx->Current.Texcoord[1][0] = vb.texcoordptr[1][0]; + ctx->Current.Texcoord[1][1] = vb.texcoordptr[1][1]; + ctx->Current.Texcoord[1][2] = 0.0F; + ctx->Current.Texcoord[1][3] = 1.0F; + } + + ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT; +} + +static GLboolean discreet_gl_prim[GL_POLYGON+1] = { + 1, /* 0 points */ + 1, /* 1 lines */ + 0, /* 2 line_strip */ + 0, /* 3 line_loop */ + 1, /* 4 tris */ + 0, /* 5 tri_fan */ + 0, /* 6 tri_strip */ + 1, /* 7 quads */ + 0, /* 8 quadstrip */ + 0, /* 9 poly */ +}; + +static void flush_prims( radeonContextPtr rmesa ) +{ + int i,j; + struct radeon_dma_region tmp = rmesa->dma.current; + + tmp.buf->refcount++; + tmp.aos_size = vb.vertex_size; + tmp.aos_stride = vb.vertex_size; + tmp.aos_start = GET_START(&tmp); + + rmesa->dma.current.ptr = rmesa->dma.current.start += + (vb.initial_counter - vb.counter) * vb.vertex_size * 4; + + rmesa->tcl.vertex_format = rmesa->vb.vertex_format; + rmesa->tcl.aos_components[0] = &tmp; + rmesa->tcl.nr_aos_components = 1; + rmesa->dma.flush = 0; + + /* Optimize the primitive list: + */ + if (rmesa->vb.nrprims > 1) { + for (j = 0, i = 1 ; i < rmesa->vb.nrprims; i++) { + int pj = rmesa->vb.primlist[j].prim & 0xf; + int pi = rmesa->vb.primlist[i].prim & 0xf; + + if (pj == pi && discreet_gl_prim[pj] && + rmesa->vb.primlist[i].start == rmesa->vb.primlist[j].end) { + rmesa->vb.primlist[j].end = rmesa->vb.primlist[i].end; + } + else { + j++; + if (j != i) rmesa->vb.primlist[j] = rmesa->vb.primlist[i]; + } + } + rmesa->vb.nrprims = j+1; + } + + for (i = 0 ; i < rmesa->vb.nrprims; i++) { + if (RADEON_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "vtxfmt prim %d: %s %d..%d\n", i, + _mesa_lookup_enum_by_nr( rmesa->vb.primlist[i].prim & + PRIM_MODE_MASK ), + rmesa->vb.primlist[i].start, + rmesa->vb.primlist[i].end); + + radeonEmitPrimitive( vb.context, + rmesa->vb.primlist[i].start, + rmesa->vb.primlist[i].end, + rmesa->vb.primlist[i].prim ); + } + + rmesa->vb.nrprims = 0; + radeonReleaseDmaRegion( rmesa, &tmp, __FUNCTION__ ); +} + + +static void start_prim( radeonContextPtr rmesa, GLuint mode ) +{ + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s %d\n", __FUNCTION__, vb.initial_counter - vb.counter); + + rmesa->vb.primlist[rmesa->vb.nrprims].start = vb.initial_counter - vb.counter; + rmesa->vb.primlist[rmesa->vb.nrprims].prim = mode; +} + +static void note_last_prim( radeonContextPtr rmesa, GLuint flags ) +{ + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s %d\n", __FUNCTION__, vb.initial_counter - vb.counter); + + if (rmesa->vb.prim[0] != GL_POLYGON+1) { + rmesa->vb.primlist[rmesa->vb.nrprims].prim |= flags; + rmesa->vb.primlist[rmesa->vb.nrprims].end = vb.initial_counter - vb.counter; + + if (++(rmesa->vb.nrprims) == RADEON_MAX_PRIMS) + flush_prims( rmesa ); + } +} + + +static void copy_vertex( radeonContextPtr rmesa, GLuint n, GLfloat *dst ) +{ + GLuint i; + GLfloat *src = (GLfloat *)(rmesa->dma.current.address + + rmesa->dma.current.ptr + + (rmesa->vb.primlist[rmesa->vb.nrprims].start + n) * + vb.vertex_size * 4); + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "copy_vertex %d\n", rmesa->vb.primlist[rmesa->vb.nrprims].start + n); + + for (i = 0 ; i < vb.vertex_size; i++) { + dst[i] = src[i]; + } +} + +/* NOTE: This actually reads the copied vertices back from uncached + * memory. Could also use the counter/notify mechanism to populate + * tmp on the fly as vertices are generated. + */ +static GLuint copy_dma_verts( radeonContextPtr rmesa, GLfloat (*tmp)[15] ) +{ + GLuint ovf, i; + GLuint nr = (vb.initial_counter - vb.counter) - rmesa->vb.primlist[rmesa->vb.nrprims].start; + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s %d verts\n", __FUNCTION__, nr); + + switch( rmesa->vb.prim[0] ) + { + case GL_POINTS: + return 0; + case GL_LINES: + ovf = nr&1; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + case GL_TRIANGLES: + ovf = nr%3; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + case GL_QUADS: + ovf = nr&3; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + case GL_LINE_STRIP: + if (nr == 0) + return 0; + copy_vertex( rmesa, nr-1, tmp[0] ); + return 1; + case GL_LINE_LOOP: + case GL_TRIANGLE_FAN: + case GL_POLYGON: + if (nr == 0) + return 0; + else if (nr == 1) { + copy_vertex( rmesa, 0, tmp[0] ); + return 1; + } else { + copy_vertex( rmesa, 0, tmp[0] ); + copy_vertex( rmesa, nr-1, tmp[1] ); + return 2; + } + case GL_TRIANGLE_STRIP: + ovf = MIN2( nr-1, 2 ); + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + case GL_QUAD_STRIP: + ovf = MIN2( nr-1, 2 ); + if (nr > 2) ovf += nr&1; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + default: + assert(0); + return 0; + } +} + +static void VFMT_FALLBACK_OUTSIDE_BEGIN_END( const char *caller ) +{ + GLcontext *ctx = vb.context; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & (DEBUG_VFMT|DEBUG_FALLBACKS)) + fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); + + if (ctx->Driver.NeedFlush) + radeonFlushVertices( ctx, ctx->Driver.NeedFlush ); + + if (ctx->NewState) + _mesa_update_state( ctx ); /* clear state so fell_back sticks */ + + _tnl_wakeup_exec( ctx ); + + assert( rmesa->dma.flush == 0 ); + rmesa->vb.fell_back = GL_TRUE; + rmesa->vb.installed = GL_FALSE; + vb.context = 0; +} + + +static void VFMT_FALLBACK( const char *caller ) +{ + GLcontext *ctx = vb.context; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLfloat tmp[3][15]; + GLuint i, prim; + GLuint ind = rmesa->vb.vertex_format; + GLuint nrverts; + GLfloat alpha = 1.0; + + if (RADEON_DEBUG & (DEBUG_FALLBACKS|DEBUG_VFMT)) + fprintf(stderr, "%s from %s\n", __FUNCTION__, caller); + + if (rmesa->vb.prim[0] == GL_POLYGON+1) { + VFMT_FALLBACK_OUTSIDE_BEGIN_END( __FUNCTION__ ); + return; + } + + /* Copy vertices out of dma: + */ + nrverts = copy_dma_verts( rmesa, tmp ); + + /* Finish the prim at this point: + */ + note_last_prim( rmesa, 0 ); + flush_prims( rmesa ); + + /* Update ctx->Driver.CurrentExecPrimitive and swap in swtnl. + */ + prim = rmesa->vb.prim[0]; + ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1; + _tnl_wakeup_exec( ctx ); + + assert(rmesa->dma.flush == 0); + rmesa->vb.fell_back = GL_TRUE; + rmesa->vb.installed = GL_FALSE; + vb.context = 0; + glBegin( prim ); + + if (rmesa->vb.installed_color_3f_sz == 4) + alpha = ctx->Current.Color[3]; + + /* Replay saved vertices + */ + for (i = 0 ; i < nrverts; i++) { + GLuint offset = 3; + if (ind & RADEON_CP_VC_FRMT_N0) { + glNormal3fv( &tmp[i][offset] ); + offset += 3; + } + + if (ind & RADEON_CP_VC_FRMT_PKCOLOR) { + radeon_color_t *col = (radeon_color_t *)&tmp[i][offset]; + glColor4ub( col->red, col->green, col->blue, col->alpha ); + offset++; + } + else if (ind & RADEON_CP_VC_FRMT_FPALPHA) { + glColor4fv( &tmp[i][offset] ); + offset+=4; + } + else if (ind & RADEON_CP_VC_FRMT_FPCOLOR) { + glColor3fv( &tmp[i][offset] ); + offset+=3; + } + + if (ind & RADEON_CP_VC_FRMT_PKSPEC) { + radeon_color_t *spec = (radeon_color_t *)&tmp[i][offset]; + _glapi_Dispatch->SecondaryColor3ubEXT( spec->red, spec->green, spec->blue ); + offset++; + } + + if (ind & RADEON_CP_VC_FRMT_ST0) { + glTexCoord2fv( &tmp[i][offset] ); + offset += 2; + } + + if (ind & RADEON_CP_VC_FRMT_ST1) { + glMultiTexCoord2fvARB( GL_TEXTURE1_ARB, &tmp[i][offset] ); + offset += 2; + } + glVertex3fv( &tmp[i][0] ); + } + + /* Replay current vertex + */ + if (ind & RADEON_CP_VC_FRMT_N0) + glNormal3fv( vb.normalptr ); + + if (ind & RADEON_CP_VC_FRMT_PKCOLOR) + glColor4ub( vb.colorptr->red, vb.colorptr->green, vb.colorptr->blue, vb.colorptr->alpha ); + else if (ind & RADEON_CP_VC_FRMT_FPALPHA) + glColor4fv( vb.floatcolorptr ); + else if (ind & RADEON_CP_VC_FRMT_FPCOLOR) { + if (rmesa->vb.installed_color_3f_sz == 4 && alpha != 1.0) + glColor4f( vb.floatcolorptr[0], + vb.floatcolorptr[1], + vb.floatcolorptr[2], + alpha ); + else + glColor3fv( vb.floatcolorptr ); + } + + if (ind & RADEON_CP_VC_FRMT_PKSPEC) + _glapi_Dispatch->SecondaryColor3ubEXT( vb.specptr->red, vb.specptr->green, vb.specptr->blue ); + + if (ind & RADEON_CP_VC_FRMT_ST0) + glTexCoord2fv( vb.texcoordptr[0] ); + + if (ind & RADEON_CP_VC_FRMT_ST1) + glMultiTexCoord2fvARB( GL_TEXTURE1_ARB, vb.texcoordptr[1] ); +} + + + +static void wrap_buffer( void ) +{ + GLcontext *ctx = vb.context; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLfloat tmp[3][15]; + GLuint i, nrverts; + + if (RADEON_DEBUG & (DEBUG_VFMT|DEBUG_PRIMS)) + fprintf(stderr, "%s %d\n", __FUNCTION__, vb.initial_counter - vb.counter); + + /* Don't deal with parity. + */ + if ((((vb.initial_counter - vb.counter) - + rmesa->vb.primlist[rmesa->vb.nrprims].start) & 1)) { + vb.counter++; + vb.initial_counter++; + return; + } + + /* Copy vertices out of dma: + */ + if (rmesa->vb.prim[0] == GL_POLYGON+1) + nrverts = 0; + else { + nrverts = copy_dma_verts( rmesa, tmp ); + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%d vertices to copy\n", nrverts); + + /* Finish the prim at this point: + */ + note_last_prim( rmesa, 0 ); + } + + /* Fire any buffered primitives + */ + flush_prims( rmesa ); + + /* Get new buffer + */ + radeonRefillCurrentDmaRegion( rmesa ); + + /* Reset counter, dmaptr + */ + vb.dmaptr = (int *)(rmesa->dma.current.ptr + rmesa->dma.current.address); + vb.counter = (rmesa->dma.current.end - rmesa->dma.current.ptr) / + (vb.vertex_size * 4); + vb.counter--; + vb.initial_counter = vb.counter; + vb.notify = wrap_buffer; + + rmesa->dma.flush = flush_prims; + + /* Restart wrapped primitive: + */ + if (rmesa->vb.prim[0] != GL_POLYGON+1) + start_prim( rmesa, rmesa->vb.prim[0] ); + + /* Reemit saved vertices + */ + for (i = 0 ; i < nrverts; i++) { + if (RADEON_DEBUG & DEBUG_VERTS) { + int j; + fprintf(stderr, "re-emit vertex %d to %p\n", i, vb.dmaptr); + if (RADEON_DEBUG & DEBUG_VERBOSE) + for (j = 0 ; j < vb.vertex_size; j++) + fprintf(stderr, "\t%08x/%f\n", *(int*)&tmp[i][j], tmp[i][j]); + } + + memcpy( vb.dmaptr, tmp[i], vb.vertex_size * 4 ); + vb.dmaptr += vb.vertex_size; + vb.counter--; + } +} + + + +static GLboolean check_vtx_fmt( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + GLuint ind = RADEON_CP_VC_FRMT_Z; + + if (rmesa->TclFallback || rmesa->vb.fell_back || ctx->CompileFlag) + return GL_FALSE; + + if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) + ctx->Driver.FlushVertices( ctx, FLUSH_UPDATE_CURRENT ); + + /* Make all this event-driven: + */ + if (ctx->Light.Enabled) { + ind |= RADEON_CP_VC_FRMT_N0; + + /* TODO: make this data driven: If we receive only ubytes, send + * color as ubytes. Also check if converting (with free + * checking for overflow) is cheaper than sending floats + * directly. + */ + if (ctx->Light.ColorMaterialEnabled) { + ind |= RADEON_CP_VC_FRMT_FPCOLOR; + if (ctx->Color.AlphaEnabled) { + ind |= RADEON_CP_VC_FRMT_FPALPHA; + } + } + } + else { + /* TODO: make this data driven? + */ + ind |= RADEON_CP_VC_FRMT_PKCOLOR; + + if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) { + ind |= RADEON_CP_VC_FRMT_PKSPEC; + } + } + + if (ctx->Texture.Unit[0]._ReallyEnabled) { + if (ctx->Texture.Unit[0].TexGenEnabled) { + if (rmesa->TexGenNeedNormals[0]) { + ind |= RADEON_CP_VC_FRMT_N0; + } + } else { + if (ctx->Current.Texcoord[0][2] != 0.0F || + ctx->Current.Texcoord[0][3] != 1.0) { + if (RADEON_DEBUG & (DEBUG_VFMT|DEBUG_FALLBACKS)) + fprintf(stderr, "%s: rq0\n", __FUNCTION__); + return GL_FALSE; + } + ind |= RADEON_CP_VC_FRMT_ST0; + } + } + + if (ctx->Texture.Unit[1]._ReallyEnabled) { + if (ctx->Texture.Unit[1].TexGenEnabled) { + if (rmesa->TexGenNeedNormals[1]) { + ind |= RADEON_CP_VC_FRMT_N0; + } + } else { + if (ctx->Current.Texcoord[1][2] != 0.0F || + ctx->Current.Texcoord[1][3] != 1.0) { + if (RADEON_DEBUG & (DEBUG_VFMT|DEBUG_FALLBACKS)) + fprintf(stderr, "%s: rq1\n", __FUNCTION__); + return GL_FALSE; + } + ind |= RADEON_CP_VC_FRMT_ST1; + } + } + + if (RADEON_DEBUG & (DEBUG_VFMT|DEBUG_STATE)) + fprintf(stderr, "%s: format: 0x%x\n", __FUNCTION__, ind ); + + RADEON_NEWPRIM(rmesa); + rmesa->vb.vertex_format = ind; + vb.vertex_size = 3; + rmesa->vb.prim = &ctx->Driver.CurrentExecPrimitive; + + vb.normalptr = ctx->Current.Normal; + vb.colorptr = NULL; + vb.floatcolorptr = ctx->Current.Color; + vb.specptr = NULL; + vb.floatspecptr = ctx->Current.SecondaryColor; + vb.texcoordptr[0] = ctx->Current.Texcoord[0]; + vb.texcoordptr[1] = ctx->Current.Texcoord[1]; + + /* Run through and initialize the vertex components in the order + * the hardware understands: + */ + if (ind & RADEON_CP_VC_FRMT_N0) { + vb.normalptr = &vb.vertex[vb.vertex_size].f; + vb.vertex_size += 3; + vb.normalptr[0] = ctx->Current.Normal[0]; + vb.normalptr[1] = ctx->Current.Normal[1]; + vb.normalptr[2] = ctx->Current.Normal[2]; + } + + if (ind & RADEON_CP_VC_FRMT_PKCOLOR) { + vb.colorptr = &vb.vertex[vb.vertex_size].color; + vb.vertex_size += 1; + UNCLAMPED_FLOAT_TO_CHAN( vb.colorptr->red, ctx->Current.Color[0] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.colorptr->green, ctx->Current.Color[1] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.colorptr->blue, ctx->Current.Color[2] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.colorptr->alpha, ctx->Current.Color[3] ); + } + + if (ind & RADEON_CP_VC_FRMT_FPCOLOR) { + assert(!(ind & RADEON_CP_VC_FRMT_PKCOLOR)); + vb.floatcolorptr = &vb.vertex[vb.vertex_size].f; + vb.vertex_size += 3; + vb.floatcolorptr[0] = ctx->Current.Color[0]; + vb.floatcolorptr[1] = ctx->Current.Color[1]; + vb.floatcolorptr[2] = ctx->Current.Color[2]; + + if (ind & RADEON_CP_VC_FRMT_FPALPHA) { + vb.vertex_size += 1; + vb.floatcolorptr[3] = ctx->Current.Color[3]; + } + } + + if (ind & RADEON_CP_VC_FRMT_PKSPEC) { + vb.specptr = &vb.vertex[vb.vertex_size].color; + vb.vertex_size += 1; + UNCLAMPED_FLOAT_TO_CHAN( vb.specptr->red, ctx->Current.SecondaryColor[0] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.specptr->green, ctx->Current.SecondaryColor[1] ); + UNCLAMPED_FLOAT_TO_CHAN( vb.specptr->blue, ctx->Current.SecondaryColor[2] ); + } + + + if (ind & RADEON_CP_VC_FRMT_ST0) { + vb.texcoordptr[0] = &vb.vertex[vb.vertex_size].f; + vb.vertex_size += 2; + vb.texcoordptr[0][0] = ctx->Current.Texcoord[0][0]; + vb.texcoordptr[0][1] = ctx->Current.Texcoord[0][1]; + } + + if (ind & RADEON_CP_VC_FRMT_ST1) { + vb.texcoordptr[1] = &vb.vertex[vb.vertex_size].f; + vb.vertex_size += 2; + vb.texcoordptr[1][0] = ctx->Current.Texcoord[1][0]; + vb.texcoordptr[1][1] = ctx->Current.Texcoord[1][1]; + } + + if (rmesa->vb.installed_vertex_format != rmesa->vb.vertex_format) { + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "reinstall on vertex_format change\n"); + _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); + rmesa->vb.installed_vertex_format = rmesa->vb.vertex_format; + } + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s -- success\n", __FUNCTION__); + + return GL_TRUE; +} + + +void radeonVtxfmtInvalidate( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + rmesa->vb.recheck = GL_TRUE; + rmesa->vb.fell_back = GL_FALSE; +} + + +static void radeonNewList( GLcontext *ctx, GLuint list, GLenum mode ) +{ + VFMT_FALLBACK_OUTSIDE_BEGIN_END( __FUNCTION__ ); +} + + +static void radeonVtxfmtValidate( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (ctx->Driver.NeedFlush) + ctx->Driver.FlushVertices( ctx, ctx->Driver.NeedFlush ); + + rmesa->vb.recheck = GL_FALSE; + + if (check_vtx_fmt( ctx )) { + if (!rmesa->vb.installed) { + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "reinstall (new install)\n"); + + _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); + ctx->Driver.FlushVertices = radeonFlushVertices; + ctx->Driver.NewList = radeonNewList; + rmesa->vb.installed = GL_TRUE; + vb.context = ctx; + } + else if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s: already installed", __FUNCTION__); + } + else { + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s: failed\n", __FUNCTION__); + + if (rmesa->vb.installed) { + if (rmesa->dma.flush) + rmesa->dma.flush( rmesa ); + _tnl_wakeup_exec( ctx ); + rmesa->vb.installed = GL_FALSE; + vb.context = 0; + } + } +} + + + +/* Materials: + */ +static void radeon_Materialfv( GLenum face, GLenum pname, + const GLfloat *params ) +{ + GLcontext *ctx = vb.context; + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->vb.prim[0] != GL_POLYGON+1) { + VFMT_FALLBACK( __FUNCTION__ ); + glMaterialfv( face, pname, params ); + return; + } + _mesa_noop_Materialfv( face, pname, params ); + radeonUpdateMaterial( vb.context ); +} + + +/* Begin/End + */ +static void radeon_Begin( GLenum mode ) +{ + GLcontext *ctx = vb.context; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (mode > GL_POLYGON) { + _mesa_error( ctx, GL_INVALID_ENUM, "glBegin" ); + return; + } + + if (rmesa->vb.prim[0] != GL_POLYGON+1) { + _mesa_error( ctx, GL_INVALID_OPERATION, "glBegin" ); + return; + } + + if (ctx->NewState) + _mesa_update_state( ctx ); + + if (rmesa->NewGLState) + radeonValidateState( ctx ); + + if (rmesa->vb.recheck) + radeonVtxfmtValidate( ctx ); + + if (!rmesa->vb.installed) { + glBegin( mode ); + return; + } + + + if (rmesa->dma.flush && vb.counter < 12) { + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s: flush almost-empty buffers\n", __FUNCTION__); + flush_prims( rmesa ); + } + + /* Need to arrange to save vertices here? Or always copy from dma (yuk)? + */ + if (!rmesa->dma.flush) { + if (rmesa->dma.current.ptr + 12*vb.vertex_size*4 > + rmesa->dma.current.end) { + RADEON_NEWPRIM( rmesa ); + radeonRefillCurrentDmaRegion( rmesa ); + } + + vb.dmaptr = (int *)(rmesa->dma.current.address + rmesa->dma.current.ptr); + vb.counter = (rmesa->dma.current.end - rmesa->dma.current.ptr) / + (vb.vertex_size * 4); + vb.counter--; + vb.initial_counter = vb.counter; + vb.notify = wrap_buffer; + rmesa->dma.flush = flush_prims; + vb.context->Driver.NeedFlush |= FLUSH_STORED_VERTICES; + } + + + rmesa->vb.prim[0] = mode; + start_prim( rmesa, mode | PRIM_BEGIN ); +} + + + +static void radeon_End( void ) +{ + GLcontext *ctx = vb.context; + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (rmesa->vb.prim[0] == GL_POLYGON+1) { + _mesa_error( ctx, GL_INVALID_OPERATION, "glEnd" ); + return; + } + + note_last_prim( rmesa, PRIM_END ); + rmesa->vb.prim[0] = GL_POLYGON+1; +} + + +/* Fallback on difficult entrypoints: + */ +#define PRE_LOOPBACK( FUNC ) \ +do { \ + if (RADEON_DEBUG & DEBUG_VFMT) \ + fprintf(stderr, "%s\n", __FUNCTION__); \ + VFMT_FALLBACK( __FUNCTION__ ); \ +} while (0) +#define TAG(x) radeon_fallback_##x +#include "vtxfmt_tmp.h" + + + +static GLboolean radeonNotifyBegin( GLcontext *ctx, GLenum p ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + assert(!rmesa->vb.installed); + + if (ctx->NewState) + _mesa_update_state( ctx ); + + if (rmesa->NewGLState) + radeonValidateState( ctx ); + + if (ctx->Driver.NeedFlush) + ctx->Driver.FlushVertices( ctx, ctx->Driver.NeedFlush ); + + if (rmesa->vb.recheck) + radeonVtxfmtValidate( ctx ); + + if (!rmesa->vb.installed) { + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s -- failed\n", __FUNCTION__); + return GL_FALSE; + } + + radeon_Begin( p ); + return GL_TRUE; +} + +static void radeonFlushVertices( GLcontext *ctx, GLuint flags ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "%s\n", __FUNCTION__); + + assert(rmesa->vb.installed); + assert(vb.context == ctx); + + if (flags & FLUSH_UPDATE_CURRENT) { + radeon_copy_to_current( ctx ); + if (RADEON_DEBUG & DEBUG_VFMT) + fprintf(stderr, "reinstall on update_current\n"); + _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); + ctx->Driver.NeedFlush &= ~FLUSH_UPDATE_CURRENT; + } + + if (flags & FLUSH_STORED_VERTICES) { + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + assert (rmesa->dma.flush == 0 || + rmesa->dma.flush == flush_prims); + if (rmesa->dma.flush == flush_prims) + flush_prims( RADEON_CONTEXT( ctx ) ); + ctx->Driver.NeedFlush &= ~FLUSH_STORED_VERTICES; + } +} + + + +/* At this point, don't expect very many versions of each function to + * be generated, so not concerned about freeing them? + */ + + +void radeonVtxfmtInit( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + GLvertexformat *vfmt = &(rmesa->vb.vtxfmt); + + MEMSET( vfmt, 0, sizeof(GLvertexformat) ); + + /* Hook in chooser functions for codegen, etc: + */ + radeonVtxfmtInitChoosers( vfmt ); + + /* Handled fully in supported states, but no codegen: + */ + vfmt->Materialfv = radeon_Materialfv; + vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ + vfmt->Rectf = _mesa_noop_Rectf; /* generic helper */ + vfmt->Begin = radeon_Begin; + vfmt->End = radeon_End; + + /* Fallback for performance reasons: (Fix with cva/elt path here and + * dmatmp2.h style primitive-merging) + * + * These should call NotifyBegin(), as should _tnl_EvalMesh, to allow + * a driver-hook. + */ + vfmt->DrawArrays = radeon_fallback_DrawArrays; + vfmt->DrawElements = radeon_fallback_DrawElements; + vfmt->DrawRangeElements = radeon_fallback_DrawRangeElements; + + + /* Not active in supported states; just keep ctx->Current uptodate: + */ + vfmt->FogCoordfvEXT = _mesa_noop_FogCoordfvEXT; + vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT; + vfmt->EdgeFlag = _mesa_noop_EdgeFlag; + vfmt->EdgeFlagv = _mesa_noop_EdgeFlagv; + vfmt->Indexi = _mesa_noop_Indexi; + vfmt->Indexiv = _mesa_noop_Indexiv; + + + /* Active but unsupported -- fallback if we receive these: + */ + vfmt->CallList = radeon_fallback_CallList; + vfmt->EvalCoord1f = radeon_fallback_EvalCoord1f; + vfmt->EvalCoord1fv = radeon_fallback_EvalCoord1fv; + vfmt->EvalCoord2f = radeon_fallback_EvalCoord2f; + vfmt->EvalCoord2fv = radeon_fallback_EvalCoord2fv; + vfmt->EvalMesh1 = radeon_fallback_EvalMesh1; + vfmt->EvalMesh2 = radeon_fallback_EvalMesh2; + vfmt->EvalPoint1 = radeon_fallback_EvalPoint1; + vfmt->EvalPoint2 = radeon_fallback_EvalPoint2; + vfmt->TexCoord3f = radeon_fallback_TexCoord3f; + vfmt->TexCoord3fv = radeon_fallback_TexCoord3fv; + vfmt->TexCoord4f = radeon_fallback_TexCoord4f; + vfmt->TexCoord4fv = radeon_fallback_TexCoord4fv; + vfmt->MultiTexCoord3fARB = radeon_fallback_MultiTexCoord3fARB; + vfmt->MultiTexCoord3fvARB = radeon_fallback_MultiTexCoord3fvARB; + vfmt->MultiTexCoord4fARB = radeon_fallback_MultiTexCoord4fARB; + vfmt->MultiTexCoord4fvARB = radeon_fallback_MultiTexCoord4fvARB; + vfmt->Vertex4f = radeon_fallback_Vertex4f; + vfmt->Vertex4fv = radeon_fallback_Vertex4fv; + + (void)radeon_fallback_vtxfmt; + + TNL_CONTEXT(ctx)->Driver.NotifyBegin = radeonNotifyBegin; + + vb.context = ctx; + rmesa->vb.enabled = 1; + rmesa->vb.prim = &ctx->Driver.CurrentExecPrimitive; + rmesa->vb.primflags = 0; + + make_empty_list( &rmesa->vb.dfn_cache.Vertex2f ); + make_empty_list( &rmesa->vb.dfn_cache.Vertex2fv ); + make_empty_list( &rmesa->vb.dfn_cache.Vertex3f ); + make_empty_list( &rmesa->vb.dfn_cache.Vertex3fv ); + make_empty_list( &rmesa->vb.dfn_cache.Color4ub ); + make_empty_list( &rmesa->vb.dfn_cache.Color4ubv ); + make_empty_list( &rmesa->vb.dfn_cache.Color3ub ); + make_empty_list( &rmesa->vb.dfn_cache.Color3ubv ); + make_empty_list( &rmesa->vb.dfn_cache.Color4f ); + make_empty_list( &rmesa->vb.dfn_cache.Color4fv ); + make_empty_list( &rmesa->vb.dfn_cache.Color3f ); + make_empty_list( &rmesa->vb.dfn_cache.Color3fv ); + make_empty_list( &rmesa->vb.dfn_cache.SecondaryColor3fEXT ); + make_empty_list( &rmesa->vb.dfn_cache.SecondaryColor3fvEXT ); + make_empty_list( &rmesa->vb.dfn_cache.SecondaryColor3ubEXT ); + make_empty_list( &rmesa->vb.dfn_cache.SecondaryColor3ubvEXT ); + make_empty_list( &rmesa->vb.dfn_cache.Normal3f ); + make_empty_list( &rmesa->vb.dfn_cache.Normal3fv ); + make_empty_list( &rmesa->vb.dfn_cache.TexCoord2f ); + make_empty_list( &rmesa->vb.dfn_cache.TexCoord2fv ); + make_empty_list( &rmesa->vb.dfn_cache.TexCoord1f ); + make_empty_list( &rmesa->vb.dfn_cache.TexCoord1fv ); + make_empty_list( &rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + make_empty_list( &rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + make_empty_list( &rmesa->vb.dfn_cache.MultiTexCoord1fARB ); + make_empty_list( &rmesa->vb.dfn_cache.MultiTexCoord1fvARB ); + + radeonInitCodegen( &rmesa->vb.codegen ); +} + +static void free_funcs( struct dynfn *l ) +{ + struct dynfn *f, *tmp; + foreach_s (f, tmp, l) { + remove_from_list( f ); + ALIGN_FREE( f->code ); + FREE( f ); + } +} + +void radeonVtxfmtUnbindContext( GLcontext *ctx ) +{ + if (RADEON_CONTEXT(ctx)->vb.installed) { + assert(vb.context == ctx); + VFMT_FALLBACK_OUTSIDE_BEGIN_END( __FUNCTION__ ); + } + + TNL_CONTEXT(ctx)->Driver.NotifyBegin = 0; +} + + +void radeonVtxfmtMakeCurrent( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + +#if defined(THREADS) + static GLboolean ThreadSafe = GL_FALSE; /* In thread-safe mode? */ + if (!ThreadSafe) { + static unsigned long knownID; + static GLboolean firstCall = GL_TRUE; + if (firstCall) { + knownID = _glthread_GetID(); + firstCall = GL_FALSE; + } + else if (knownID != _glthread_GetID()) { + ThreadSafe = GL_TRUE; + + if (RADEON_DEBUG & (DEBUG_DRI|DEBUG_VFMT)) + fprintf(stderr, "**** Multithread situation!\n"); + } + } + if (ThreadSafe) + return; +#endif + + if (rmesa->vb.enabled) { + TNL_CONTEXT(ctx)->Driver.NotifyBegin = radeonNotifyBegin; + } +} + + +void radeonVtxfmtDestroy( GLcontext *ctx ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); + + count_funcs( rmesa ); + free_funcs( &rmesa->vb.dfn_cache.Vertex2f ); + free_funcs( &rmesa->vb.dfn_cache.Vertex2fv ); + free_funcs( &rmesa->vb.dfn_cache.Vertex3f ); + free_funcs( &rmesa->vb.dfn_cache.Vertex3fv ); + free_funcs( &rmesa->vb.dfn_cache.Color4ub ); + free_funcs( &rmesa->vb.dfn_cache.Color4ubv ); + free_funcs( &rmesa->vb.dfn_cache.Color3ub ); + free_funcs( &rmesa->vb.dfn_cache.Color3ubv ); + free_funcs( &rmesa->vb.dfn_cache.Color4f ); + free_funcs( &rmesa->vb.dfn_cache.Color4fv ); + free_funcs( &rmesa->vb.dfn_cache.Color3f ); + free_funcs( &rmesa->vb.dfn_cache.Color3fv ); + free_funcs( &rmesa->vb.dfn_cache.SecondaryColor3ubEXT ); + free_funcs( &rmesa->vb.dfn_cache.SecondaryColor3ubvEXT ); + free_funcs( &rmesa->vb.dfn_cache.SecondaryColor3fEXT ); + free_funcs( &rmesa->vb.dfn_cache.SecondaryColor3fvEXT ); + free_funcs( &rmesa->vb.dfn_cache.Normal3f ); + free_funcs( &rmesa->vb.dfn_cache.Normal3fv ); + free_funcs( &rmesa->vb.dfn_cache.TexCoord2f ); + free_funcs( &rmesa->vb.dfn_cache.TexCoord2fv ); + free_funcs( &rmesa->vb.dfn_cache.TexCoord1f ); + free_funcs( &rmesa->vb.dfn_cache.TexCoord1fv ); + free_funcs( &rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + free_funcs( &rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + free_funcs( &rmesa->vb.dfn_cache.MultiTexCoord1fARB ); + free_funcs( &rmesa->vb.dfn_cache.MultiTexCoord1fvARB ); +} + Index: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.h diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.h:1.3 --- /dev/null Thu Feb 27 12:26:34 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.h Sat Dec 21 12:02:16 2002 @@ -0,0 +1,128 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.h,v 1.3 2002/12/21 17:02:16 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics 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, TUNGSTEN GRAPHICS 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 + * + */ + +#ifndef __RADEON_VTXFMT_H__ +#define __RADEON_VTXFMT_H__ + +#ifdef GLX_DIRECT_RENDERING + +#include "radeon_context.h" + + + +extern struct radeon_vb vb; + + +extern void radeonVtxfmtUpdate( GLcontext *ctx ); +extern void radeonVtxfmtInit( GLcontext *ctx ); +extern void radeonVtxfmtInvalidate( GLcontext *ctx ); +extern void radeonVtxfmtDestroy( GLcontext *ctx ); +extern void radeonVtxfmtInitChoosers( GLvertexformat *vfmt ); + +extern void radeonVtxfmtMakeCurrent( GLcontext *ctx ); +extern void radeonVtxfmtUnbindContext( GLcontext *ctx ); + +extern void radeon_copy_to_current( GLcontext *ctx ); + +#define DFN( FUNC, CACHE) \ +do { \ + char *start = (char *)&FUNC; \ + char *end = (char *)&FUNC##_end; \ + insert_at_head( &CACHE, dfn ); \ + dfn->key = key; \ + dfn->code = ALIGN_MALLOC( end - start, 16 ); \ + memcpy (dfn->code, start, end - start); \ +} \ +while ( 0 ) + +#define FIXUP( CODE, OFFSET, CHECKVAL, NEWVAL ) \ +do { \ + int *icode = (int *)(CODE+OFFSET); \ + assert (*icode == CHECKVAL); \ + *icode = (int)NEWVAL; \ +} while (0) + + +/* Useful for figuring out the offsets: + */ +#define FIXUP2( CODE, OFFSET, CHECKVAL, NEWVAL ) \ +do { \ + while (*(int *)(CODE+OFFSET) != CHECKVAL) OFFSET++; \ + /* fprintf(stderr, "%s/%d CVAL %x OFFSET %d VAL %x\n", __FUNCTION__, */ \ +/* __LINE__, CHECKVAL, OFFSET, (int)(NEWVAL)); */ \ + *(int *)(CODE+OFFSET) = (int)(NEWVAL); \ + OFFSET += 4; \ +} while (0) + +/* + */ +void radeonInitCodegen( struct dfn_generators *gen ); +void radeonInitX86Codegen( struct dfn_generators *gen ); +void radeonInitSSECodegen( struct dfn_generators *gen ); + + + +/* Defined in radeon_vtxfmt_x86.c + */ +struct dynfn *radeon_makeX86Vertex2f( GLcontext *, int ); +struct dynfn *radeon_makeX86Vertex2fv( GLcontext *, int ); +struct dynfn *radeon_makeX86Vertex3f( GLcontext *, int ); +struct dynfn *radeon_makeX86Vertex3fv( GLcontext *, int ); +struct dynfn *radeon_makeX86Color4ub( GLcontext *, int ); +struct dynfn *radeon_makeX86Color4ubv( GLcontext *, int ); +struct dynfn *radeon_makeX86Color3ub( GLcontext *, int ); +struct dynfn *radeon_makeX86Color3ubv( GLcontext *, int ); +struct dynfn *radeon_makeX86Color4f( GLcontext *, int ); +struct dynfn *radeon_makeX86Color4fv( GLcontext *, int ); +struct dynfn *radeon_makeX86Color3f( GLcontext *, int ); +struct dynfn *radeon_makeX86Color3fv( GLcontext *, int ); +struct dynfn *radeon_makeX86SecondaryColor3ubEXT( GLcontext *, int ); +struct dynfn *radeon_makeX86SecondaryColor3ubvEXT( GLcontext *, int ); +struct dynfn *radeon_makeX86SecondaryColor3fEXT( GLcontext *, int ); +struct dynfn *radeon_makeX86SecondaryColor3fvEXT( GLcontext *, int ); +struct dynfn *radeon_makeX86Normal3f( GLcontext *, int ); +struct dynfn *radeon_makeX86Normal3fv( GLcontext *, int ); +struct dynfn *radeon_makeX86TexCoord2f( GLcontext *, int ); +struct dynfn *radeon_makeX86TexCoord2fv( GLcontext *, int ); +struct dynfn *radeon_makeX86TexCoord1f( GLcontext *, int ); +struct dynfn *radeon_makeX86TexCoord1fv( GLcontext *, int ); +struct dynfn *radeon_makeX86MultiTexCoord2fARB( GLcontext *, int ); +struct dynfn *radeon_makeX86MultiTexCoord2fvARB( GLcontext *, int ); +struct dynfn *radeon_makeX86MultiTexCoord1fARB( GLcontext *, int ); +struct dynfn *radeon_makeX86MultiTexCoord1fvARB( GLcontext *, int ); + + +#endif +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_c.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_c.c:1.2 --- /dev/null Thu Feb 27 12:26:34 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_c.c Mon Dec 16 11:18:59 2002 @@ -0,0 +1,801 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_c.c,v 1.2 2002/12/16 16:18:59 dawes Exp $ */ +/************************************************************************** + +Copyright 2002 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics 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, TUNGSTEN GRAPHICS 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 + */ +#include "mtypes.h" +#include "colormac.h" +#include "simple_list.h" +#include "api_noop.h" +#include "vtxfmt.h" + +#include "radeon_vtxfmt.h" + +/* Fallback versions of all the entrypoints for situations where + * codegen isn't available. This is still a lot faster than the + * vb/pipeline implementation in Mesa. + */ +static void radeon_Vertex3f( GLfloat x, GLfloat y, GLfloat z ) +{ + int i; + + *vb.dmaptr++ = *(int *)&x; + *vb.dmaptr++ = *(int *)&y; + *vb.dmaptr++ = *(int *)&z; + + for (i = 3; i < vb.vertex_size; i++) + *vb.dmaptr++ = vb.vertex[i].i; + + if (--vb.counter == 0) + vb.notify(); +} + + +static void radeon_Vertex3fv( const GLfloat *v ) +{ + int i; + + *vb.dmaptr++ = *(int *)&v[0]; + *vb.dmaptr++ = *(int *)&v[1]; + *vb.dmaptr++ = *(int *)&v[2]; + + for (i = 3; i < vb.vertex_size; i++) + *vb.dmaptr++ = vb.vertex[i].i; + + if (--vb.counter == 0) + vb.notify(); +} + + +static void radeon_Vertex2f( GLfloat x, GLfloat y ) +{ + int i; + + *vb.dmaptr++ = *(int *)&x; + *vb.dmaptr++ = *(int *)&y; + *vb.dmaptr++ = 0; + + for (i = 3; i < vb.vertex_size; i++) + *vb.dmaptr++ = *(int *)&vb.vertex[i]; + + if (--vb.counter == 0) + vb.notify(); +} + + +static void radeon_Vertex2fv( const GLfloat *v ) +{ + int i; + + *vb.dmaptr++ = *(int *)&v[0]; + *vb.dmaptr++ = *(int *)&v[1]; + *vb.dmaptr++ = 0; + + for (i = 3; i < vb.vertex_size; i++) + *vb.dmaptr++ = vb.vertex[i].i; + + if (--vb.counter == 0) + vb.notify(); +} + + + +/* Color for ubyte (packed) color formats: + */ +static void radeon_Color3ub_ub( GLubyte r, GLubyte g, GLubyte b ) +{ + radeon_color_t *dest = vb.colorptr; + dest->red = r; + dest->green = g; + dest->blue = b; + dest->alpha = 0xff; +} + +static void radeon_Color3ubv_ub( const GLubyte *v ) +{ + radeon_color_t *dest = vb.colorptr; + dest->red = v[0]; + dest->green = v[1]; + dest->blue = v[2]; + dest->alpha = 0xff; +} + +static void radeon_Color4ub_ub( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +{ + radeon_color_t *dest = vb.colorptr; + dest->red = r; + dest->green = g; + dest->blue = b; + dest->alpha = a; +} + +static void radeon_Color4ubv_ub( const GLubyte *v ) +{ + *(GLuint *)vb.colorptr = LE32_TO_CPU(*(GLuint *)v); +} + + +static void radeon_Color3f_ub( GLfloat r, GLfloat g, GLfloat b ) +{ + radeon_color_t *dest = vb.colorptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, r ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, g ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, b ); + dest->alpha = 255; +} + +static void radeon_Color3fv_ub( const GLfloat *v ) +{ + radeon_color_t *dest = vb.colorptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, v[0] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, v[1] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, v[2] ); + dest->alpha = 255; +} + +static void radeon_Color4f_ub( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) +{ + radeon_color_t *dest = vb.colorptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, r ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, g ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, b ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->alpha, a ); +} + +static void radeon_Color4fv_ub( const GLfloat *v ) +{ + radeon_color_t *dest = vb.colorptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, v[0] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, v[1] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, v[2] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->alpha, v[3] ); +} + + +/* Color for float color+alpha formats: + */ +static void radeon_Color3ub_4f( GLubyte r, GLubyte g, GLubyte b ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); + dest[3] = 1.0; +} + +static void radeon_Color3ubv_4f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); + dest[3] = 1.0; +} + +static void radeon_Color4ub_4f( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); + dest[3] = UBYTE_TO_FLOAT(a); +} + +static void radeon_Color4ubv_4f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); + dest[3] = UBYTE_TO_FLOAT(v[3]); +} + + +static void radeon_Color3f_4f( GLfloat r, GLfloat g, GLfloat b ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; + dest[3] = 1.0; +} + +static void radeon_Color3fv_4f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; + dest[3] = 1.0; +} + +static void radeon_Color4f_4f( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; + dest[3] = a; +} + +static void radeon_Color4fv_4f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; + dest[3] = v[3]; +} + + +/* Color for float color formats: + */ +static void radeon_Color3ub_3f( GLubyte r, GLubyte g, GLubyte b ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); +} + +static void radeon_Color3ubv_3f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); +} + +static void radeon_Color4ub_3f( GLubyte r, GLubyte g, GLubyte b, GLubyte a ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); + vb.context->Current.Color[3] = UBYTE_TO_FLOAT(a); +} + +static void radeon_Color4ubv_3f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); + vb.context->Current.Color[3] = UBYTE_TO_FLOAT(v[3]); +} + + +static void radeon_Color3f_3f( GLfloat r, GLfloat g, GLfloat b ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; +} + +static void radeon_Color3fv_3f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; +} + +static void radeon_Color4f_3f( GLfloat r, GLfloat g, GLfloat b, GLfloat a ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; + vb.context->Current.Color[3] = a; +} + +static void radeon_Color4fv_3f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatcolorptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; + vb.context->Current.Color[3] = v[3]; +} + + +/* Secondary Color: + */ +static void radeon_SecondaryColor3ubEXT_ub( GLubyte r, GLubyte g, GLubyte b ) +{ + radeon_color_t *dest = vb.specptr; + dest->red = r; + dest->green = g; + dest->blue = b; + dest->alpha = 0xff; +} + +static void radeon_SecondaryColor3ubvEXT_ub( const GLubyte *v ) +{ + radeon_color_t *dest = vb.specptr; + dest->red = v[0]; + dest->green = v[1]; + dest->blue = v[2]; + dest->alpha = 0xff; +} + +static void radeon_SecondaryColor3fEXT_ub( GLfloat r, GLfloat g, GLfloat b ) +{ + radeon_color_t *dest = vb.specptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, r ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, g ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, b ); + dest->alpha = 255; +} + +static void radeon_SecondaryColor3fvEXT_ub( const GLfloat *v ) +{ + radeon_color_t *dest = vb.specptr; + UNCLAMPED_FLOAT_TO_UBYTE( dest->red, v[0] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->green, v[1] ); + UNCLAMPED_FLOAT_TO_UBYTE( dest->blue, v[2] ); + dest->alpha = 255; +} + +static void radeon_SecondaryColor3ubEXT_3f( GLubyte r, GLubyte g, GLubyte b ) +{ + GLfloat *dest = vb.floatspecptr; + dest[0] = UBYTE_TO_FLOAT(r); + dest[1] = UBYTE_TO_FLOAT(g); + dest[2] = UBYTE_TO_FLOAT(b); + dest[3] = 1.0; +} + +static void radeon_SecondaryColor3ubvEXT_3f( const GLubyte *v ) +{ + GLfloat *dest = vb.floatspecptr; + dest[0] = UBYTE_TO_FLOAT(v[0]); + dest[1] = UBYTE_TO_FLOAT(v[1]); + dest[2] = UBYTE_TO_FLOAT(v[2]); + dest[3] = 1.0; +} + +static void radeon_SecondaryColor3fEXT_3f( GLfloat r, GLfloat g, GLfloat b ) +{ + GLfloat *dest = vb.floatspecptr; + dest[0] = r; + dest[1] = g; + dest[2] = b; + dest[3] = 1.0; +} + +static void radeon_SecondaryColor3fvEXT_3f( const GLfloat *v ) +{ + GLfloat *dest = vb.floatspecptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; + dest[3] = 1.0; +} + + +/* Normal + */ +static void radeon_Normal3f( GLfloat n0, GLfloat n1, GLfloat n2 ) +{ + GLfloat *dest = vb.normalptr; + dest[0] = n0; + dest[1] = n1; + dest[2] = n2; +} + +static void radeon_Normal3fv( const GLfloat *v ) +{ + GLfloat *dest = vb.normalptr; + dest[0] = v[0]; + dest[1] = v[1]; + dest[2] = v[2]; +} + + +/* TexCoord + */ +static void radeon_TexCoord1f( GLfloat s ) +{ + GLfloat *dest = vb.texcoordptr[0]; + dest[0] = s; + dest[1] = 0; +} + +static void radeon_TexCoord1fv( const GLfloat *v ) +{ + GLfloat *dest = vb.texcoordptr[0]; + dest[0] = v[0]; + dest[1] = 0; +} + +static void radeon_TexCoord2f( GLfloat s, GLfloat t ) +{ + GLfloat *dest = vb.texcoordptr[0]; + dest[0] = s; + dest[1] = t; +} + +static void radeon_TexCoord2fv( const GLfloat *v ) +{ + GLfloat *dest = vb.texcoordptr[0]; + dest[0] = v[0]; + dest[1] = v[1]; +} + + +/* MultiTexcoord + */ +static void radeon_MultiTexCoord1fARB( GLenum target, GLfloat s ) +{ + GLfloat *dest = vb.texcoordptr[(target - GL_TEXTURE0_ARB)&1]; + dest[0] = s; + dest[1] = 0; +} + +static void radeon_MultiTexCoord1fvARB( GLenum target, const GLfloat *v ) +{ + GLfloat *dest = vb.texcoordptr[(target - GL_TEXTURE0_ARB)&1]; + dest[0] = v[0]; + dest[1] = 0; +} + +static void radeon_MultiTexCoord2fARB( GLenum target, GLfloat s, GLfloat t ) +{ + GLfloat *dest = vb.texcoordptr[(target - GL_TEXTURE0_ARB)&1]; + dest[0] = s; + dest[1] = t; +} + +static void radeon_MultiTexCoord2fvARB( GLenum target, const GLfloat *v ) +{ + GLfloat *dest = vb.texcoordptr[(target - GL_TEXTURE0_ARB)&1]; + dest[0] = v[0]; + dest[1] = v[1]; +} + +static struct dynfn *lookup( struct dynfn *l, int key ) +{ + struct dynfn *f; + + foreach( f, l ) { + if (f->key == key) + return f; + } + + return 0; +} + +/* Can't use the loopback template for this: + */ + +#define CHOOSE(FN, FNTYPE, MASK, ACTIVE, ARGS1, ARGS2 ) \ +static void choose_##FN ARGS1 \ +{ \ + radeonContextPtr rmesa = RADEON_CONTEXT(vb.context); \ + int key = rmesa->vb.vertex_format & (MASK|ACTIVE); \ + struct dynfn *dfn = lookup( &rmesa->vb.dfn_cache.FN, key ); \ + \ + if (dfn == 0) \ + dfn = rmesa->vb.codegen.FN( vb.context, key ); \ + else if (RADEON_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- cached codegen\n", __FUNCTION__ ); \ + \ + if (dfn) \ + vb.context->Exec->FN = (FNTYPE)(dfn->code); \ + else { \ + if (RADEON_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- generic version\n", __FUNCTION__ ); \ + vb.context->Exec->FN = radeon_##FN; \ + } \ + \ + vb.context->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT; \ + vb.context->Exec->FN ARGS2; \ +} + + + +/* For the _3f case, only allow one color function to be hooked in at + * a time. Eventually, use a similar mechanism to allow selecting the + * color component of the vertex format based on client behaviour. + * + * Note: Perform these actions even if there is a codegen or cached + * codegen version of the chosen function. + */ +#define CHOOSE_COLOR(FN, FNTYPE, NR, MASK, ACTIVE, ARGS1, ARGS2 ) \ +static void choose_##FN ARGS1 \ +{ \ + GLcontext *ctx = vb.context; \ + radeonContextPtr rmesa = RADEON_CONTEXT(vb.context); \ + int key = rmesa->vb.vertex_format & (MASK|ACTIVE); \ + struct dynfn *dfn; \ + \ + if (rmesa->vb.vertex_format & ACTIVE_PKCOLOR) { \ + ctx->Exec->FN = radeon_##FN##_ub; \ + } \ + else if ((rmesa->vb.vertex_format & \ + (ACTIVE_FPCOLOR|ACTIVE_FPALPHA)) == ACTIVE_FPCOLOR) { \ + \ + if (rmesa->vb.installed_color_3f_sz != NR) { \ + rmesa->vb.installed_color_3f_sz = NR; \ + if (NR == 3) ctx->Current.Color[3] = 1.0; \ + if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) { \ + radeon_copy_to_current( ctx ); \ + _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); \ + ctx->Exec->FN ARGS2; \ + return; \ + } \ + } \ + \ + ctx->Exec->FN = radeon_##FN##_3f; \ + } \ + else { \ + ctx->Exec->FN = radeon_##FN##_4f; \ + } \ + \ + \ + dfn = lookup( &rmesa->vb.dfn_cache.FN, key ); \ + if (!dfn) dfn = rmesa->vb.codegen.FN( ctx, key ); \ + \ + if (dfn) { \ + if (RADEON_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- codegen version\n", __FUNCTION__ ); \ + ctx->Exec->FN = (FNTYPE)dfn->code; \ + } \ + else if (RADEON_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- 'c' version\n", __FUNCTION__ ); \ + \ + ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT; \ + ctx->Exec->FN ARGS2; \ +} + + + +/* Right now there are both _ub and _3f versions of the secondary color + * functions. Currently, we only set-up the hardware to use the _ub versions. + * The _3f versions are needed for the cases where secondary color isn't used + * in the vertex format, but it still needs to be stored in the context + * state vector. + */ +#define CHOOSE_SECONDARY_COLOR(FN, FNTYPE, MASK, ACTIVE, ARGS1, ARGS2 ) \ +static void choose_##FN ARGS1 \ +{ \ + GLcontext *ctx = vb.context; \ + radeonContextPtr rmesa = RADEON_CONTEXT(vb.context); \ + int key = rmesa->vb.vertex_format & (MASK|ACTIVE); \ + struct dynfn *dfn = lookup( &rmesa->vb.dfn_cache.FN, key ); \ + \ + if (dfn == 0) \ + dfn = rmesa->vb.codegen.FN( vb.context, key ); \ + else if (RADEON_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- cached version\n", __FUNCTION__ ); \ + \ + if (dfn) \ + vb.context->Exec->FN = (FNTYPE)(dfn->code); \ + else { \ + if (RADEON_DEBUG & DEBUG_CODEGEN) \ + fprintf(stderr, "%s -- generic version\n", __FUNCTION__ ); \ + vb.context->Exec->FN = ((rmesa->vb.vertex_format & ACTIVE_PKSPEC) != 0) \ + ? radeon_##FN##_ub : radeon_##FN##_3f; \ + } \ + \ + ctx->Driver.NeedFlush |= FLUSH_UPDATE_CURRENT; \ + ctx->Exec->FN ARGS2; \ +} + + + + + +/* Shorthands + */ +#define ACTIVE_XYZW (RADEON_CP_VC_FRMT_W0|RADEON_CP_VC_FRMT_Z) +#define ACTIVE_NORM RADEON_CP_VC_FRMT_N0 + +#define ACTIVE_PKCOLOR RADEON_CP_VC_FRMT_PKCOLOR +#define ACTIVE_FPCOLOR RADEON_CP_VC_FRMT_FPCOLOR +#define ACTIVE_FPALPHA RADEON_CP_VC_FRMT_FPALPHA +#define ACTIVE_COLOR (ACTIVE_FPCOLOR|ACTIVE_PKCOLOR) + +#define ACTIVE_PKSPEC RADEON_CP_VC_FRMT_PKSPEC +#define ACTIVE_FPSPEC RADEON_CP_VC_FRMT_FPSPEC +#define ACTIVE_SPEC (ACTIVE_FPSPEC|ACTIVE_PKSPEC) + +#define ACTIVE_ST0 RADEON_CP_VC_FRMT_ST0 +#define ACTIVE_ST1 RADEON_CP_VC_FRMT_ST1 +#define ACTIVE_ST_ALL (RADEON_CP_VC_FRMT_ST1|RADEON_CP_VC_FRMT_ST0) + +/* Each codegen function should be able to be fully specified by a + * subsetted version of rmesa->vb.vertex_format. + */ +#define MASK_NORM (ACTIVE_XYZW) +#define MASK_COLOR (MASK_NORM|ACTIVE_NORM) +#define MASK_SPEC (MASK_COLOR|ACTIVE_COLOR) +#define MASK_ST0 (MASK_SPEC|ACTIVE_SPEC) +#define MASK_ST1 (MASK_ST0|ACTIVE_ST0) +#define MASK_ST_ALL (MASK_ST1|ACTIVE_ST1) +#define MASK_VERTEX (MASK_ST_ALL|ACTIVE_FPALPHA) + + +typedef void (*p4f)( GLfloat, GLfloat, GLfloat, GLfloat ); +typedef void (*p3f)( GLfloat, GLfloat, GLfloat ); +typedef void (*p2f)( GLfloat, GLfloat ); +typedef void (*p1f)( GLfloat ); +typedef void (*pe2f)( GLenum, GLfloat, GLfloat ); +typedef void (*pe1f)( GLenum, GLfloat ); +typedef void (*p4ub)( GLubyte, GLubyte, GLubyte, GLubyte ); +typedef void (*p3ub)( GLubyte, GLubyte, GLubyte ); +typedef void (*pfv)( const GLfloat * ); +typedef void (*pefv)( GLenum, const GLfloat * ); +typedef void (*pubv)( const GLubyte * ); + + +CHOOSE(Normal3f, p3f, MASK_NORM, ACTIVE_NORM, + (GLfloat a,GLfloat b,GLfloat c), (a,b,c)) +CHOOSE(Normal3fv, pfv, MASK_NORM, ACTIVE_NORM, + (const GLfloat *v), (v)) + +CHOOSE_COLOR(Color4ub, p4ub, 4, MASK_COLOR, ACTIVE_COLOR, + (GLubyte a,GLubyte b, GLubyte c, GLubyte d), (a,b,c,d)) +CHOOSE_COLOR(Color4ubv, pubv, 4, MASK_COLOR, ACTIVE_COLOR, + (const GLubyte *v), (v)) +CHOOSE_COLOR(Color3ub, p3ub, 3, MASK_COLOR, ACTIVE_COLOR, + (GLubyte a,GLubyte b, GLubyte c), (a,b,c)) +CHOOSE_COLOR(Color3ubv, pubv, 3, MASK_COLOR, ACTIVE_COLOR, + (const GLubyte *v), (v)) + +CHOOSE_COLOR(Color4f, p4f, 4, MASK_COLOR, ACTIVE_COLOR, + (GLfloat a,GLfloat b, GLfloat c, GLfloat d), (a,b,c,d)) +CHOOSE_COLOR(Color4fv, pfv, 4, MASK_COLOR, ACTIVE_COLOR, + (const GLfloat *v), (v)) +CHOOSE_COLOR(Color3f, p3f, 3, MASK_COLOR, ACTIVE_COLOR, + (GLfloat a,GLfloat b, GLfloat c), (a,b,c)) +CHOOSE_COLOR(Color3fv, pfv, 3, MASK_COLOR, ACTIVE_COLOR, + (const GLfloat *v), (v)) + + +CHOOSE_SECONDARY_COLOR(SecondaryColor3ubEXT, p3ub, MASK_SPEC, ACTIVE_SPEC, + (GLubyte a,GLubyte b, GLubyte c), (a,b,c)) +CHOOSE_SECONDARY_COLOR(SecondaryColor3ubvEXT, pubv, MASK_SPEC, ACTIVE_SPEC, + (const GLubyte *v), (v)) +CHOOSE_SECONDARY_COLOR(SecondaryColor3fEXT, p3f, MASK_SPEC, ACTIVE_SPEC, + (GLfloat a,GLfloat b, GLfloat c), (a,b,c)) +CHOOSE_SECONDARY_COLOR(SecondaryColor3fvEXT, pfv, MASK_SPEC, ACTIVE_SPEC, + (const GLfloat *v), (v)) + +CHOOSE(TexCoord2f, p2f, MASK_ST0, ACTIVE_ST0, + (GLfloat a,GLfloat b), (a,b)) +CHOOSE(TexCoord2fv, pfv, MASK_ST0, ACTIVE_ST0, + (const GLfloat *v), (v)) +CHOOSE(TexCoord1f, p1f, MASK_ST0, ACTIVE_ST0, + (GLfloat a), (a)) +CHOOSE(TexCoord1fv, pfv, MASK_ST0, ACTIVE_ST0, + (const GLfloat *v), (v)) + +CHOOSE(MultiTexCoord2fARB, pe2f, MASK_ST_ALL, ACTIVE_ST_ALL, + (GLenum u,GLfloat a,GLfloat b), (u,a,b)) +CHOOSE(MultiTexCoord2fvARB, pefv, MASK_ST_ALL, ACTIVE_ST_ALL, + (GLenum u,const GLfloat *v), (u,v)) +CHOOSE(MultiTexCoord1fARB, pe1f, MASK_ST_ALL, ACTIVE_ST_ALL, + (GLenum u,GLfloat a), (u,a)) +CHOOSE(MultiTexCoord1fvARB, pefv, MASK_ST_ALL, ACTIVE_ST_ALL, + (GLenum u,const GLfloat *v), (u,v)) + +CHOOSE(Vertex3f, p3f, MASK_VERTEX, MASK_VERTEX, + (GLfloat a,GLfloat b,GLfloat c), (a,b,c)) +CHOOSE(Vertex3fv, pfv, MASK_VERTEX, MASK_VERTEX, + (const GLfloat *v), (v)) +CHOOSE(Vertex2f, p2f, MASK_VERTEX, MASK_VERTEX, + (GLfloat a,GLfloat b), (a,b)) +CHOOSE(Vertex2fv, pfv, MASK_VERTEX, MASK_VERTEX, + (const GLfloat *v), (v)) + + + + + +void radeonVtxfmtInitChoosers( GLvertexformat *vfmt ) +{ + vfmt->Color3f = choose_Color3f; + vfmt->Color3fv = choose_Color3fv; + vfmt->Color3ub = choose_Color3ub; + vfmt->Color3ubv = choose_Color3ubv; + vfmt->Color4f = choose_Color4f; + vfmt->Color4fv = choose_Color4fv; + vfmt->Color4ub = choose_Color4ub; + vfmt->Color4ubv = choose_Color4ubv; + vfmt->SecondaryColor3fEXT = choose_SecondaryColor3fEXT; + vfmt->SecondaryColor3fvEXT = choose_SecondaryColor3fvEXT; + vfmt->SecondaryColor3ubEXT = choose_SecondaryColor3ubEXT; + vfmt->SecondaryColor3ubvEXT = choose_SecondaryColor3ubvEXT; + vfmt->MultiTexCoord1fARB = choose_MultiTexCoord1fARB; + vfmt->MultiTexCoord1fvARB = choose_MultiTexCoord1fvARB; + vfmt->MultiTexCoord2fARB = choose_MultiTexCoord2fARB; + vfmt->MultiTexCoord2fvARB = choose_MultiTexCoord2fvARB; + vfmt->Normal3f = choose_Normal3f; + vfmt->Normal3fv = choose_Normal3fv; + vfmt->TexCoord1f = choose_TexCoord1f; + vfmt->TexCoord1fv = choose_TexCoord1fv; + vfmt->TexCoord2f = choose_TexCoord2f; + vfmt->TexCoord2fv = choose_TexCoord2fv; + vfmt->Vertex2f = choose_Vertex2f; + vfmt->Vertex2fv = choose_Vertex2fv; + vfmt->Vertex3f = choose_Vertex3f; + vfmt->Vertex3fv = choose_Vertex3fv; +} + + +static struct dynfn *codegen_noop( GLcontext *ctx, int key ) +{ + (void) ctx; (void) key; + return 0; +} + +void radeonInitCodegen( struct dfn_generators *gen ) +{ + gen->Vertex3f = codegen_noop; + gen->Vertex3fv = codegen_noop; + gen->Color4ub = codegen_noop; + gen->Color4ubv = codegen_noop; + gen->Normal3f = codegen_noop; + gen->Normal3fv = codegen_noop; + gen->TexCoord2f = codegen_noop; + gen->TexCoord2fv = codegen_noop; + gen->MultiTexCoord2fARB = codegen_noop; + gen->MultiTexCoord2fvARB = codegen_noop; + gen->Vertex2f = codegen_noop; + gen->Vertex2fv = codegen_noop; + gen->Color3ub = codegen_noop; + gen->Color3ubv = codegen_noop; + gen->Color4f = codegen_noop; + gen->Color4fv = codegen_noop; + gen->Color3f = codegen_noop; + gen->Color3fv = codegen_noop; + gen->SecondaryColor3fEXT = codegen_noop; + gen->SecondaryColor3fvEXT = codegen_noop; + gen->SecondaryColor3ubEXT = codegen_noop; + gen->SecondaryColor3ubvEXT = codegen_noop; + gen->TexCoord1f = codegen_noop; + gen->TexCoord1fv = codegen_noop; + gen->MultiTexCoord1fARB = codegen_noop; + gen->MultiTexCoord1fvARB = codegen_noop; + + if (!getenv("RADEON_NO_CODEGEN")) { +#if defined(USE_X86_ASM) + radeonInitX86Codegen( gen ); +#endif + +#if defined(USE_SSE_ASM) + radeonInitSSECodegen( gen ); +#endif + } +} Index: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_sse.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_sse.c:1.1 --- /dev/null Thu Feb 27 12:26:34 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_sse.c Wed Oct 30 07:51:58 2002 @@ -0,0 +1,88 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_sse.c,v 1.1 2002/10/30 12:51:58 alanh Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics 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, TUNGSTEN GRAPHICS 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 + */ + +#include +#include +#include "mem.h" +#include "simple_list.h" +#include "radeon_vtxfmt.h" + +#if defined(USE_SSE_ASM) +#include "X86/common_x86_asm.h" + +/* Build specialized versions of the immediate calls on the fly for + * the current state. ???P4 SSE2 versions??? + */ + + +static struct dynfn *makeSSENormal3fv( GLcontext *ctx, int key ) +{ + /* Requires P4 (sse2?) + */ + static unsigned char temp[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0xba, 0x78, 0x56, 0x34, 0x12, /* mov $0x12345678,%edx */ + 0xf3, 0x0f, 0x7e, 0x00, /* movq (%eax),%xmm0 */ + 0x66, 0x0f, 0x6e, 0x48, 0x08, /* movd 0x8(%eax),%xmm1 */ + 0x66, 0x0f, 0xd6, 0x42, 0x0c, /* movq %xmm0,0xc(%edx) */ + 0x66, 0x0f, 0x7e, 0x4a, 0x14, /* movd %xmm1,0x14(%edx) */ + 0xc3, /* ret */ + }; + + + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + insert_at_head( &rmesa->vb.dfn_cache.Normal3fv, dfn ); + dfn->key = key; + + dfn->code = ALIGN_MALLOC( sizeof(temp), 16 ); + memcpy (dfn->code, temp, sizeof(temp)); + FIXUP(dfn->code, 5, 0x0, (int)vb.normalptr); + return dfn; +} + +void radeonInitSSECodegen( struct dfn_generators *gen ) +{ + if ( cpu_has_xmm && cpu_has_xmm2 ) + /*gen->Normal3fv = */ (void)makeSSENormal3fv; +} + +#else + +void radeonInitSSECodegen( struct dfn_generators *gen ) +{ + (void) gen; +} + +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_x86.c diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_x86.c:1.2 --- /dev/null Thu Feb 27 12:26:34 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_x86.c Sat Dec 21 12:02:16 2002 @@ -0,0 +1,463 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt_x86.c,v 1.2 2002/12/21 17:02:16 dawes Exp $ */ +/************************************************************************** + +Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and + Tungsten Graphics 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, TUNGSTEN GRAPHICS 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 + */ + +#include +#include +#include "mem.h" +#include "mmath.h" +#include "simple_list.h" +#include "radeon_vtxfmt.h" + +#if defined(USE_X86_ASM) + +#define EXTERN( FUNC ) \ +extern const char *FUNC; \ +extern const char *FUNC##_end + +EXTERN ( _x86_Normal3fv ); +EXTERN ( _x86_Normal3f ); +EXTERN ( _x86_Vertex3fv_6 ); +EXTERN ( _x86_Vertex3fv_8 ); +EXTERN ( _x86_Vertex3fv ); +EXTERN ( _x86_Vertex3f_4 ); +EXTERN ( _x86_Vertex3f_6 ); +EXTERN ( _x86_Vertex3f ); +EXTERN ( _x86_Color4ubv_ub ); +EXTERN ( _x86_Color4ubv_4f ); +EXTERN ( _x86_Color4ub_ub ); +EXTERN ( _x86_Color3fv_3f ); +EXTERN ( _x86_Color3f_3f ); +EXTERN ( _x86_TexCoord2fv ); +EXTERN ( _x86_TexCoord2f ); +EXTERN ( _x86_MultiTexCoord2fvARB ); +EXTERN ( _x86_MultiTexCoord2fvARB_2 ); +EXTERN ( _x86_MultiTexCoord2fARB ); +EXTERN ( _x86_MultiTexCoord2fARB_2 ); + + +/* Build specialized versions of the immediate calls on the fly for + * the current state. Generic x86 versions. + */ + +struct dynfn *radeon_makeX86Vertex3f( GLcontext *ctx, int key ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x %d\n", __FUNCTION__, key, vb.vertex_size ); + + switch (vb.vertex_size) { + case 4: { + + DFN ( _x86_Vertex3f_4, rmesa->vb.dfn_cache.Vertex3f ); + FIXUP(dfn->code, 2, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 25, 0x0, (int)&vb.vertex[3]); + FIXUP(dfn->code, 36, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 46, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 51, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 60, 0x0, (int)&vb.notify); + break; + } + case 6: { + + DFN ( _x86_Vertex3f_6, rmesa->vb.dfn_cache.Vertex3f ); + FIXUP(dfn->code, 3, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 28, 0x0, (int)&vb.vertex[3]); + FIXUP(dfn->code, 34, 0x0, (int)&vb.vertex[4]); + FIXUP(dfn->code, 40, 0x0, (int)&vb.vertex[5]); + FIXUP(dfn->code, 57, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 63, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 70, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 79, 0x0, (int)&vb.notify); + break; + } + default: { + + DFN ( _x86_Vertex3f, rmesa->vb.dfn_cache.Vertex3f ); + FIXUP(dfn->code, 3, 0x0, (int)&vb.vertex[3]); + FIXUP(dfn->code, 9, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 37, 0x0, vb.vertex_size-3); + FIXUP(dfn->code, 44, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 50, 0x0, (int)&vb.dmaptr); + FIXUP(dfn->code, 56, 0x0, (int)&vb.counter); + FIXUP(dfn->code, 67, 0x0, (int)&vb.notify); + break; + } + } + + return dfn; +} + + + +struct dynfn *radeon_makeX86Vertex3fv( GLcontext *ctx, int key ) +{ + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x %d\n", __FUNCTION__, key, vb.vertex_size ); + + switch (vb.vertex_size) { + case 6: { + + DFN ( _x86_Vertex3fv_6, rmesa->vb.dfn_cache.Vertex3fv ); + FIXUP(dfn->code, 1, 0x00000000, (int)&vb.dmaptr); + FIXUP(dfn->code, 27, 0x0000001c, (int)&vb.vertex[3]); + FIXUP(dfn->code, 33, 0x00000020, (int)&vb.vertex[4]); + FIXUP(dfn->code, 45, 0x00000024, (int)&vb.vertex[5]); + FIXUP(dfn->code, 56, 0x00000000, (int)&vb.dmaptr); + FIXUP(dfn->code, 61, 0x00000004, (int)&vb.counter); + FIXUP(dfn->code, 67, 0x00000004, (int)&vb.counter); + FIXUP(dfn->code, 76, 0x00000008, (int)&vb.notify); + break; + } + + + case 8: { + + DFN ( _x86_Vertex3fv_8, rmesa->vb.dfn_cache.Vertex3fv ); + FIXUP(dfn->code, 1, 0x00000000, (int)&vb.dmaptr); + FIXUP(dfn->code, 27, 0x0000001c, (int)&vb.vertex[3]); + FIXUP(dfn->code, 33, 0x00000020, (int)&vb.vertex[4]); + FIXUP(dfn->code, 45, 0x0000001c, (int)&vb.vertex[5]); + FIXUP(dfn->code, 51, 0x00000020, (int)&vb.vertex[6]); + FIXUP(dfn->code, 63, 0x00000024, (int)&vb.vertex[7]); + FIXUP(dfn->code, 74, 0x00000000, (int)&vb.dmaptr); + FIXUP(dfn->code, 79, 0x00000004, (int)&vb.counter); + FIXUP(dfn->code, 85, 0x00000004, (int)&vb.counter); + FIXUP(dfn->code, 94, 0x00000008, (int)&vb.notify); + break; + } + + + + default: { + + DFN ( _x86_Vertex3fv, rmesa->vb.dfn_cache.Vertex3fv ); + FIXUP(dfn->code, 8, 0x01010101, (int)&vb.dmaptr); + FIXUP(dfn->code, 32, 0x00000006, vb.vertex_size-3); + FIXUP(dfn->code, 37, 0x00000058, (int)&vb.vertex[3]); + FIXUP(dfn->code, 45, 0x01010101, (int)&vb.dmaptr); + FIXUP(dfn->code, 50, 0x02020202, (int)&vb.counter); + FIXUP(dfn->code, 58, 0x02020202, (int)&vb.counter); + FIXUP(dfn->code, 67, 0x0, (int)&vb.notify); + break; + } + } + + return dfn; +} + +struct dynfn *radeon_makeX86Normal3fv( GLcontext *ctx, int key ) +{ + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + int i = 0; + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + DFN ( _x86_Normal3fv, rmesa->vb.dfn_cache.Normal3fv ); + + FIXUP2(dfn->code, i, 0x0, (int)vb.normalptr); + FIXUP2(dfn->code, i, 0x4, 4+(int)vb.normalptr); + FIXUP2(dfn->code, i, 0x8, 8+(int)vb.normalptr); + /* fprintf(stderr, "%s done\n", __FUNCTION__); */ + return dfn; +} + +struct dynfn *radeon_makeX86Normal3f( GLcontext *ctx, int key ) +{ + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + DFN ( _x86_Normal3f, rmesa->vb.dfn_cache.Normal3f ); + FIXUP(dfn->code, 1, 0x12345678, (int)vb.normalptr); + return dfn; +} + +struct dynfn *radeon_makeX86Color4ubv( GLcontext *ctx, int key ) +{ + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + if (key & RADEON_CP_VC_FRMT_PKCOLOR) { + DFN ( _x86_Color4ubv_ub, rmesa->vb.dfn_cache.Color4ubv); + FIXUP(dfn->code, 5, 0x12345678, (int)vb.colorptr); + return dfn; + } + else { + + DFN ( _x86_Color4ubv_4f, rmesa->vb.dfn_cache.Color4ubv); + FIXUP(dfn->code, 2, 0x00000000, (int)_mesa_ubyte_to_float_color_tab); + FIXUP(dfn->code, 27, 0xdeadbeaf, (int)vb.floatcolorptr); + FIXUP(dfn->code, 33, 0xdeadbeaf, (int)vb.floatcolorptr+4); + FIXUP(dfn->code, 55, 0xdeadbeaf, (int)vb.floatcolorptr+8); + FIXUP(dfn->code, 61, 0xdeadbeaf, (int)vb.floatcolorptr+12); + return dfn; + } +} + +struct dynfn *radeon_makeX86Color4ub( GLcontext *ctx, int key ) +{ + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + if (key & RADEON_CP_VC_FRMT_PKCOLOR) { + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + DFN ( _x86_Color4ub_ub, rmesa->vb.dfn_cache.Color4ub ); + FIXUP(dfn->code, 18, 0x0, (int)vb.colorptr); + FIXUP(dfn->code, 24, 0x0, (int)vb.colorptr+1); + FIXUP(dfn->code, 30, 0x0, (int)vb.colorptr+2); + FIXUP(dfn->code, 36, 0x0, (int)vb.colorptr+3); + return dfn; + } + else + return 0; +} + + +struct dynfn *radeon_makeX86Color3fv( GLcontext *ctx, int key ) +{ + if (key & (RADEON_CP_VC_FRMT_PKCOLOR|RADEON_CP_VC_FRMT_FPALPHA)) + return 0; + else + { + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + DFN ( _x86_Color3fv_3f, rmesa->vb.dfn_cache.Color3fv ); + FIXUP(dfn->code, 5, 0x0, (int)vb.floatcolorptr); + return dfn; + } +} + +struct dynfn *radeon_makeX86Color3f( GLcontext *ctx, int key ) +{ + if (key & (RADEON_CP_VC_FRMT_PKCOLOR|RADEON_CP_VC_FRMT_FPALPHA)) + return 0; + else + { + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + DFN ( _x86_Color3f_3f, rmesa->vb.dfn_cache.Color3f ); + FIXUP(dfn->code, 1, 0x12345678, (int)vb.floatcolorptr); + return dfn; + } +} + + + +struct dynfn *radeon_makeX86TexCoord2fv( GLcontext *ctx, int key ) +{ + + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + DFN ( _x86_TexCoord2fv, rmesa->vb.dfn_cache.TexCoord2fv ); + FIXUP(dfn->code, 5, 0x12345678, (int)vb.texcoordptr[0]); + return dfn; +} + +struct dynfn *radeon_makeX86TexCoord2f( GLcontext *ctx, int key ) +{ + + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + DFN ( _x86_TexCoord2f, rmesa->vb.dfn_cache.TexCoord2f ); + FIXUP(dfn->code, 1, 0x12345678, (int)vb.texcoordptr[0]); + return dfn; +} + +struct dynfn *radeon_makeX86MultiTexCoord2fvARB( GLcontext *ctx, int key ) +{ +#if 0 + static char temp[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0x8b, 0x4c, 0x24, 0x08, /* mov 0x8(%esp,1),%ecx */ + 0x2d, 0xc0, 0x84, 0x00, 0x00, /* sub $0x84c0,%eax */ + 0x83, 0xe0, 0x01, /* and $0x1,%eax */ + 0x8b, 0x11, /* mov (%ecx),%edx */ + 0xc1, 0xe0, 0x03, /* shl $0x3,%eax */ + 0x8b, 0x49, 0x04, /* mov 0x4(%ecx),%ecx */ + 0x89, 0x90, 0, 0, 0, 0,/* mov %edx,DEST(%eax) */ + 0x89, 0x88, 0, 0, 0, 0,/* mov %ecx,DEST+8(%eax) */ + 0xc3, /* ret */ + }; + static char temp2[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0x8b, 0x4c, 0x24, 0x08, /* mov 0x8(%esp,1),%ecx */ + 0x2d, 0xc0, 0x84, 0x00, 0x00, /* sub $0x84c0,%eax */ + 0x83, 0xe0, 0x01, /* and $0x1,%eax */ + 0x8b, 0x14, 0x85, 0, 0, 0, 0, /* mov DEST(,%eax,4),%edx */ + 0x8b, 0x01, /* mov (%ecx),%eax */ + 0x89, 0x02, /* mov %eax,(%edx) */ + 0x8b, 0x41, 0x04, /* mov 0x4(%ecx),%eax */ + 0x89, 0x42, 0x04, /* mov %eax,0x4(%edx) */ + 0xc3, /* ret */ + }; +#endif + + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + if ((key & (RADEON_CP_VC_FRMT_ST0|RADEON_CP_VC_FRMT_ST1)) == + (RADEON_CP_VC_FRMT_ST0|RADEON_CP_VC_FRMT_ST1)) { + DFN ( _x86_MultiTexCoord2fvARB, rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + FIXUP(dfn->code, 26, 0xdeadbeef, (int)vb.texcoordptr[0]); + FIXUP(dfn->code, 32, 0xdeadbeef, (int)vb.texcoordptr[0]+4); + } else { + DFN ( _x86_MultiTexCoord2fvARB_2, rmesa->vb.dfn_cache.MultiTexCoord2fvARB ); + FIXUP(dfn->code, 19, 0x0, (int)vb.texcoordptr); + } + return dfn; +} + +struct dynfn *radeon_makeX86MultiTexCoord2fARB( GLcontext *ctx, + int key ) +{ +#if 0 + static char temp[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0x8b, 0x54, 0x24, 0x08, /* mov 0x8(%esp,1),%edx */ + 0x2d, 0xc0, 0x84, 0x00, 0x00, /* sub $0x84c0,%eax */ + 0x8b, 0x4c, 0x24, 0x0c, /* mov 0xc(%esp,1),%ecx */ + 0x83, 0xe0, 0x01, /* and $0x1,%eax */ + 0xc1, 0xe0, 0x03, /* shl $0x3,%eax */ + 0x89, 0x90, 0, 0, 0, 0, /* mov %edx,DEST(%eax) */ + 0x89, 0x88, 0, 0, 0, 0, /* mov %ecx,DEST+8(%eax) */ + 0xc3, /* ret */ + }; + + static char temp2[] = { + 0x8b, 0x44, 0x24, 0x04, /* mov 0x4(%esp,1),%eax */ + 0x8b, 0x54, 0x24, 0x08, /* mov 0x8(%esp,1),%edx */ + 0x2d, 0xc0, 0x84, 0x00, 0x00, /* sub $0x84c0,%eax */ + 0x8b, 0x4c, 0x24, 0x0c, /* mov 0xc(%esp,1),%ecx */ + 0x83, 0xe0, 0x01, /* and $0x1,%eax */ + 0x8b, 0x04, 0x85, 0, 0, 0, 0, /* mov DEST(,%eax,4),%eax */ + 0x89, 0x10, /* mov %edx,(%eax) */ + 0x89, 0x48, 0x04, /* mov %ecx,0x4(%eax) */ + 0xc3, /* ret */ + }; +#endif + struct dynfn *dfn = MALLOC_STRUCT( dynfn ); + radeonContextPtr rmesa = RADEON_CONTEXT(ctx); + + if (RADEON_DEBUG & DEBUG_CODEGEN) + fprintf(stderr, "%s 0x%08x\n", __FUNCTION__, key ); + + if ((key & (RADEON_CP_VC_FRMT_ST0|RADEON_CP_VC_FRMT_ST1)) == + (RADEON_CP_VC_FRMT_ST0|RADEON_CP_VC_FRMT_ST1)) { + DFN ( _x86_MultiTexCoord2fARB, rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + FIXUP(dfn->code, 25, 0xdeadbeef, (int)vb.texcoordptr[0]); + FIXUP(dfn->code, 31, 0xdeadbeef, (int)vb.texcoordptr[0]+4); + } + else { + /* Note: this might get generated multiple times, even though the + * actual emitted code is the same. + */ + DFN ( _x86_MultiTexCoord2fARB_2, rmesa->vb.dfn_cache.MultiTexCoord2fARB ); + FIXUP(dfn->code, 23, 0x0, (int)vb.texcoordptr); + } + return dfn; +} + + +void radeonInitX86Codegen( struct dfn_generators *gen ) +{ + gen->Vertex3f = radeon_makeX86Vertex3f; + gen->Vertex3fv = radeon_makeX86Vertex3fv; + gen->Color4ub = radeon_makeX86Color4ub; /* PKCOLOR only */ + gen->Color4ubv = radeon_makeX86Color4ubv; /* PKCOLOR only */ + gen->Normal3f = radeon_makeX86Normal3f; + gen->Normal3fv = radeon_makeX86Normal3fv; + gen->TexCoord2f = radeon_makeX86TexCoord2f; + gen->TexCoord2fv = radeon_makeX86TexCoord2fv; + gen->MultiTexCoord2fARB = radeon_makeX86MultiTexCoord2fARB; + gen->MultiTexCoord2fvARB = radeon_makeX86MultiTexCoord2fvARB; + gen->Color3f = radeon_makeX86Color3f; + gen->Color3fv = radeon_makeX86Color3fv; + + /* Not done: + */ +/* gen->Vertex2f = radeon_makeX86Vertex2f; */ +/* gen->Vertex2fv = radeon_makeX86Vertex2fv; */ +/* gen->Color3ub = radeon_makeX86Color3ub; */ +/* gen->Color3ubv = radeon_makeX86Color3ubv; */ +/* gen->Color4f = radeon_makeX86Color4f; */ +/* gen->Color4fv = radeon_makeX86Color4fv; */ +/* gen->TexCoord1f = radeon_makeX86TexCoord1f; */ +/* gen->TexCoord1fv = radeon_makeX86TexCoord1fv; */ +/* gen->MultiTexCoord1fARB = radeon_makeX86MultiTexCoord1fARB; */ +/* gen->MultiTexCoord1fvARB = radeon_makeX86MultiTexCoord1fvARB; */ +} + + +#else + +void radeonInitX86Codegen( struct dfn_generators *gen ) +{ + (void) gen; +} + +#endif Index: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxtmp_x86.S diff -u /dev/null xc/lib/GL/mesa/src/drv/radeon/radeon_vtxtmp_x86.S:1.2 --- /dev/null Thu Feb 27 12:26:34 2003 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_vtxtmp_x86.S Thu Nov 7 13:32:00 2002 @@ -0,0 +1,410 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_vtxtmp_x86.S,v 1.2 2002/11/07 18:32:00 tsi Exp $ */ +/************************************************************************** + +Copyright 2002 Tungsten Graphics 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, TUNGSTEN GRAPHICS 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. + +**************************************************************************/ + +#define GLOBL( x ) \ +.globl x; \ +x##: + +.data +.align 4 +GLOBL( _x86_Normal3fv) + movl 4(%esp), %eax /* load 'v' off stack */ + movl (%eax), %ecx /* load v[0] */ + movl 4(%eax), %edx /* load v[1] */ + movl 8(%eax), %eax /* load v[2] */ + movl %ecx, 0 /* store v[0] to current vertex */ + movl %edx, 4 /* store v[1] to current vertex */ + movl %eax, 8 /* store v[2] to current vertex */ + ret +GLOBL ( _x86_Normal3fv_end ) + +/* + vertex 3f vertex size 4 +*/ + +GLOBL ( _x86_Vertex3f_4 ) + movl (0), %ecx + movl 4(%esp), %eax + movl 8(%esp), %edx + movl %eax, (%ecx) + movl %edx, 4(%ecx) + movl 12(%esp), %eax + movl (0), %edx + movl %eax, 8(%ecx) + movl %edx, 12(%ecx) + movl (0), %eax + addl $16, %ecx + dec %eax + movl %ecx, (0) + movl %eax, (0) + je .1 + ret +.1: jmp *0 + +GLOBL ( _x86_Vertex3f_4_end ) + +/* + vertex 3f vertex size 6 +*/ +GLOBL ( _x86_Vertex3f_6 ) + push %edi + movl (0), %edi + movl 8(%esp), %eax + movl 12(%esp), %edx + movl 16(%esp), %ecx + movl %eax, (%edi) + movl %edx, 4(%edi) + movl %ecx, 8(%edi) + movl (0), %eax + movl (0), %edx + movl (0), %ecx + movl %eax, 12(%edi) + movl %edx, 16(%edi) + movl %ecx, 20(%edi) + addl $24, %edi + movl (0), %eax + movl %edi, (0) + dec %eax + pop %edi + movl %eax, (0) + je .2 + ret +.2: jmp *0 +GLOBL ( _x86_Vertex3f_6_end ) +/* + vertex 3f generic size +*/ +GLOBL ( _x86_Vertex3f ) + push %edi + push %esi + movl $0, %esi + movl (0), %edi + movl 12(%esp), %eax + movl 16(%esp), %edx + movl 20(%esp), %ecx + movl %eax, (%edi) + movl %edx, 4(%edi) + movl %ecx, 8(%edi) + addl $12, %edi + movl $0, %ecx + repz + movsl %ds:(%esi), %es:(%edi) + movl (0), %eax + movl %edi, (0) + dec %eax + movl %eax, (0) + pop %esi + pop %edi + je .3 + ret +.3: jmp *0 + +GLOBL ( _x86_Vertex3f_end ) + +/* + Vertex 3fv vertex size 6 +*/ +GLOBL ( _x86_Vertex3fv_6 ) + movl (0), %eax + movl 4(%esp), %ecx + movl (%ecx), %edx + movl %edx, (%eax) + movl 4(%ecx), %edx + movl 8(%ecx), %ecx + movl %edx, 4(%eax) + movl %ecx, 8(%eax) + movl (28), %edx + movl (32), %ecx + movl %edx, 12(%eax) + movl %ecx, 16(%eax) + movl (36), %edx + movl %edx, 20(%eax) + addl $24, %eax + movl %eax, 0 + movl 4, %eax + dec %eax + movl %eax, 4 + je .4 + ret +.4: jmp *8 + +GLOBL ( _x86_Vertex3fv_6_end ) + +/* + Vertex 3fv vertex size 8 +*/ +GLOBL ( _x86_Vertex3fv_8 ) + movl (0), %eax + movl 4(%esp), %ecx + movl (%ecx), %edx + movl %edx ,(%eax) + movl 4(%ecx) ,%edx + movl 8(%ecx) ,%ecx + movl %edx, 4(%eax) + movl %ecx, 8(%eax) + movl (28), %edx + movl (32), %ecx + movl %edx, 12(%eax) + movl %ecx, 16(%eax) + movl (28), %edx + movl (32), %ecx + movl %edx, 20(%eax) + movl %ecx, 24(%eax) + movl (36), %edx + movl %edx, 28(%eax) + addl $32, %eax + movl %eax, (0) + movl 4, %eax + dec %eax + movl %eax, (4) + je .5 + ret +.5: jmp *8 + +GLOBL ( _x86_Vertex3fv_8_end ) + +/* + Vertex 3fv generic vertex size +*/ +GLOBL ( _x86_Vertex3fv ) + movl 4(%esp), %edx + push %edi + push %esi + movl (0x1010101), %edi + movl (%edx), %eax + movl 4(%edx), %ecx + movl 8(%edx), %esi + movl %eax, (%edi) + movl %ecx, 4(%edi) + movl %esi, 8(%edi) + addl $12, %edi + movl $6, %ecx + movl $0x58, %esi + repz + movsl %ds:(%esi), %es:(%edi) + movl %edi, (0x1010101) + movl (0x2020202), %eax + pop %esi + pop %edi + dec %eax + movl %eax, (0x2020202) + je .6 + ret +.6: jmp *0 +GLOBL ( _x86_Vertex3fv_end ) + +/* + Normal 3f +*/ +GLOBL ( _x86_Normal3f ) + movl $0x12345678, %edx + movl 4(%esp), %eax + movl %eax, (%edx) + movl 8(%esp), %eax + movl %eax, 4(%edx) + movl 12(%esp), %eax + movl %eax, 8(%edx) + ret +GLOBL ( _x86_Normal3f_end ) + +/* + Color 4ubv_ub +*/ +GLOBL ( _x86_Color4ubv_ub ) + movl 4(%esp), %eax + movl $0x12345678, %edx + movl (%eax), %eax + movl %eax, (%edx) + ret +GLOBL ( _x86_Color4ubv_ub_end ) + +/* + Color 4ubv 4f +*/ +GLOBL ( _x86_Color4ubv_4f ) + push %ebx + movl $0, %edx + xor %eax, %eax + xor %ecx, %ecx + movl 8(%esp), %ebx + movl (%ebx), %ebx + mov %bl, %al + mov %bh, %cl + movl (%edx,%eax,4),%eax + movl (%edx,%ecx,4),%ecx + movl %eax, (0xdeadbeaf) + movl %ecx, (0xdeadbeaf) + xor %eax, %eax + xor %ecx, %ecx + shr $16, %ebx + mov %bl, %al + mov %bh, %cl + movl (%edx,%eax,4), %eax + movl (%edx,%ecx,4), %ecx + movl %eax, (0xdeadbeaf) + movl %ecx, (0xdeadbeaf) + pop %ebx + ret +GLOBL ( _x86_Color4ubv_4f_end ) + +/* + + Color4ub_ub +*/ +GLOBL( _x86_Color4ub_ub ) + push %ebx + movl 8(%esp), %eax + movl 12(%esp), %edx + movl 16(%esp), %ecx + movl 20(%esp), %ebx + mov %al, (0) + mov %dl, (0) + mov %cl, (0) + mov %bl, (0) + pop %ebx + ret +GLOBL( _x86_Color4ub_ub_end ) + +/* + Color3fv_3f +*/ +GLOBL( _x86_Color3fv_3f ) + movl 4(%esp), %eax + movl $0, %edx + movl (%eax), %ecx + movl %ecx, (%edx) + movl 4(%eax), %ecx + movl %ecx, 4(%edx) + movl 8(%eax), %ecx + movl %ecx, 8(%edx) + ret +GLOBL( _x86_Color3fv_3f_end ) + +/* + Color3f_3f +*/ +GLOBL( _x86_Color3f_3f ) + movl $0x12345678, %edx + movl 4(%esp), %eax + movl %eax, (%edx) + movl 8(%esp,1), %eax + movl %eax, 4(%edx) + movl 12(%esp), %eax + movl %eax, 8(%edx) + ret +GLOBL( _x86_Color3f_3f_end ) + +/* + TexCoord2fv +*/ + +GLOBL( _x86_TexCoord2fv ) + movl 4(%esp), %eax + movl $0x12345678, %edx + movl (%eax), %ecx + movl 4(%eax), %eax + movl %ecx, (%edx) + movl %eax, 4(%edx) + ret + +GLOBL( _x86_TexCoord2fv_end ) +/* + TexCoord2f +*/ +GLOBL( _x86_TexCoord2f ) + movl $0x12345678, %edx + movl 4(%esp), %eax + movl 8(%esp), %ecx + movl %eax, (%edx) + movl %ecx, 4(%edx) + ret +GLOBL( _x86_TexCoord2f_end ) + +/* + MultiTexCoord2fvARB st0/st1 +*/ +GLOBL( _x86_MultiTexCoord2fvARB ) + + movl 4(%esp), %eax + movl 8(%esp), %ecx + sub $0x84c0, %eax + and $1, %eax + movl (%ecx), %edx + shl $3, %eax + movl 4(%ecx), %ecx + movl %edx, 0xdeadbeef(%eax) + movl %ecx, 0xdeadbeef(%eax) + ret +GLOBL( _x86_MultiTexCoord2fvARB_end ) +/* + MultiTexCoord2fvARB +*/ + +GLOBL( _x86_MultiTexCoord2fvARB_2 ) + movl 4(%esp,1), %eax + movl 8(%esp,1), %ecx + sub $0x84c0, %eax + and $0x1, %eax + movl 0(,%eax,4), %edx + movl (%ecx), %eax + movl %eax, (%edx) + movl 4(%ecx), %eax + movl %eax, 4(%edx) + ret + +GLOBL( _x86_MultiTexCoord2fvARB_2_end ) + +/* + MultiTexCoord2fARB st0/st1 +*/ +GLOBL( _x86_MultiTexCoord2fARB ) + movl 4(%esp), %eax + movl 8(%esp), %edx + sub $0x84c0, %eax + movl 12(%esp), %ecx + and $1, %eax + shl $3, %eax + movl %edx, 0xdeadbeef(%eax) + movl %ecx, 0xdeadbeef(%eax) + ret +GLOBL( _x86_MultiTexCoord2fARB_end ) + +/* + MultiTexCoord2fARB +*/ +GLOBL( _x86_MultiTexCoord2fARB_2 ) + movl 4(%esp), %eax + movl 8(%esp), %edx + sub $0x84c0, %eax + movl 12(%esp,1), %ecx + and $1,%eax + movl 0(,%eax,4), %eax + movl %edx, (%eax) + movl %ecx, 4(%eax) + ret +GLOBL( _x86_MultiTexCoord2fARB_2_end ) Index: xc/lib/GL/mesa/src/drv/radeon/radeon_xmesa.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_xmesa.c:1.4 xc/lib/GL/mesa/src/drv/radeon/radeon_xmesa.c:removed --- xc/lib/GL/mesa/src/drv/radeon/radeon_xmesa.c:1.4 Tue Apr 10 12:07:53 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_xmesa.c Thu Feb 27 12:26:34 2003 @@ -1,312 +0,0 @@ -/* $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.18 xc/lib/GL/mesa/src/drv/sis/Imakefile:1.22 --- xc/lib/GL/mesa/src/drv/sis/Imakefile:1.18 Fri Nov 2 18:29:27 2001 +++ xc/lib/GL/mesa/src/drv/sis/Imakefile Mon Nov 25 09:04:52 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.18 2001/11/02 23:29:27 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.22 2002/11/25 14:04:52 eich Exp $ #include @@ -18,10 +18,19 @@ #include "../common/Imakefile.inc" #include "Imakefile.inc" +#include "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" #include "../../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #include "../../X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../../SPARC/Imakefile.inc" +#endif XCOMM SIS_DEFINES = -DSIS_USE_HW_CULL -DSIS_USE_FASTPATH SIS_DEFINES = -DSIS_USE_HW_CULL @@ -53,7 +62,7 @@ OBJS = $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ $(MESA_ASM_OBJS) $(SISOBJS) $(HIOBJS) -REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) #include Index: xc/lib/GL/mesa/src/drv/sis/sis_mesa.c diff -u xc/lib/GL/mesa/src/drv/sis/sis_mesa.c:1.6 xc/lib/GL/mesa/src/drv/sis/sis_mesa.c:1.7 --- xc/lib/GL/mesa/src/drv/sis/sis_mesa.c:1.6 Wed Oct 31 17:50:25 2001 +++ xc/lib/GL/mesa/src/drv/sis/sis_mesa.c Wed Oct 30 07:52:00 2002 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_mesa.c,v 1.6 2001/10/31 22:50:25 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_mesa.c,v 1.7 2002/10/30 12:52:00 alanh Exp $ */ /* * Authors: @@ -1404,8 +1404,9 @@ } void -sis_GetBufferSize (GLcontext * ctx, GLuint * width, GLuint * height) +sis_GetBufferSize (GLframebuffer *buffer, GLuint * width, GLuint * height) { + GET_CURRENT_CONTEXT(ctx); XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; __GLSiScontext *hwcx = (__GLSiScontext *) xmesa->private; Index: xc/lib/GL/mesa/src/drv/sis/sis_mesa.h diff -u xc/lib/GL/mesa/src/drv/sis/sis_mesa.h:1.3 xc/lib/GL/mesa/src/drv/sis/sis_mesa.h:1.4 --- xc/lib/GL/mesa/src/drv/sis/sis_mesa.h:1.3 Tue Sep 26 11:56:48 2000 +++ xc/lib/GL/mesa/src/drv/sis/sis_mesa.h Wed Oct 30 07:52:00 2002 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_mesa.h,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_mesa.h,v 1.4 2002/10/30 12:52:00 alanh Exp $ */ /* * Authors: @@ -44,7 +44,7 @@ GLboolean sis_SetDrawBuffer (GLcontext * ctx, GLenum mode); void sis_SetReadBuffer (GLcontext *ctx, GLframebuffer *colorBuffer, GLenum buffer); -void sis_GetBufferSize (GLcontext * ctx, GLuint * width, GLuint * height); +void sis_GetBufferSize (GLframebuffer * buffer, GLuint * width, GLuint * height); const char *sis_ExtensionString (GLcontext * ctx); const GLubyte *sis_GetString (GLcontext * ctx, GLenum name); void sis_Finish (GLcontext * ctx); Index: xc/lib/GL/mesa/src/drv/tdfx/Imakefile diff -u xc/lib/GL/mesa/src/drv/tdfx/Imakefile:1.28 xc/lib/GL/mesa/src/drv/tdfx/Imakefile:1.32 --- xc/lib/GL/mesa/src/drv/tdfx/Imakefile:1.28 Fri Aug 17 22:51:06 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/Imakefile Mon Nov 25 09:04:52 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.28 2001/08/18 02:51:06 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.32 2002/11/25 14:04:52 eich Exp $ #include @@ -18,17 +18,24 @@ #include "../common/Imakefile.inc" #include "Imakefile.inc" +#include "../../array_cache/Imakefile.inc" +#include "../../math/Imakefile.inc" +#include "../../swrast/Imakefile.inc" +#include "../../swrast_setup/Imakefile.inc" +#include "../../tnl/Imakefile.inc" +#include "../../tnl_dd/Imakefile.inc" #include "../../Imakefile.inc" -#ifdef i386Architecture +#if defined(i386Architecture) && MesaUseX86Asm #include "../../X86/Imakefile.inc" #endif +#ifdef SparcArchitecture +#include "../../SPARC/Imakefile.inc" +#endif DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) - INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) \ - -I$(GLIDE3INCDIR) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) - DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ - $(GLXLIBSRC)/dri/dri_tmm.o + DRIOBJS = $(GLXLIBSRC)/dri/dri_util.o DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ @@ -47,7 +54,7 @@ OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ $(MESA_ASM_OBJS) $(TDFXOBJS) $(HIOBJS) -REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) $(XONLYLIB) #include Index: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc diff -u xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc:1.3 xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc:1.4 --- xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc:1.3 Fri Aug 17 22:51:06 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc Fri Feb 22 16:45:03 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc,v 1.3 2001/08/18 02:51:06 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc,v 1.4 2002/02/22 21:45:03 dawes Exp $ #ifndef MesaDrvSrcDir #define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv @@ -16,26 +16,28 @@ #endif #if BuildXF86DRI - DRI_DEFINES = GlxDefines - DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ - -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ - -I$(GLXLIBSRC)/mesa/dri \ + DRI_DEFINES = GlxDefines -DX_BYTE_ORDER=ByteOrder + DRI_INCLUDES = -I$(GLXLIBSRC)/dri \ + -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) \ + -I$(INCLUDESRC)/GL \ -I$(SERVERSRC)/GL/dri \ -I$(XF86OSSRC) \ -I$(XF86DRIVERSRC)/tdfx \ - -I$(GLXLIBSRC)/dri/drm + -I$(XF86COMSRC) \ + -I$(GLXLIBSRC)/dri/drm \ + -I$(GLXLIBSRC)/include #endif -MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ +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_lock.c \ - $(MESADRVTDFXBUILDDIR)tdfx_pipeline.c \ + $(MESADRVTDFXBUILDDIR)tdfx_pixels.c \ $(MESADRVTDFXBUILDDIR)tdfx_render.c \ $(MESADRVTDFXBUILDDIR)tdfx_screen.c \ $(MESADRVTDFXBUILDDIR)tdfx_span.c \ @@ -44,16 +46,12 @@ $(MESADRVTDFXBUILDDIR)tdfx_texman.c \ $(MESADRVTDFXBUILDDIR)tdfx_texstate.c \ $(MESADRVTDFXBUILDDIR)tdfx_tris.c \ - $(MESADRVTDFXBUILDDIR)tdfx_vb.c \ - $(MESADRVTDFXBUILDDIR)tdfx_wrapper.c \ - $(MESADRVTDFXBUILDDIR)tdfx_xmesa.c + $(MESADRVTDFXBUILDDIR)tdfx_vb.c TDFXOBJS = $(MESADRVTDFXBUILDDIR)tdfx_context.o \ $(MESADRVTDFXBUILDDIR)tdfx_dd.o \ - $(MESADRVTDFXBUILDDIR)tdfx_pixels.o \ - $(MESADRVTDFXBUILDDIR)tdfx_fastpath.o \ $(MESADRVTDFXBUILDDIR)tdfx_lock.o \ - $(MESADRVTDFXBUILDDIR)tdfx_pipeline.o \ + $(MESADRVTDFXBUILDDIR)tdfx_pixels.o \ $(MESADRVTDFXBUILDDIR)tdfx_render.o \ $(MESADRVTDFXBUILDDIR)tdfx_screen.o \ $(MESADRVTDFXBUILDDIR)tdfx_span.o \ @@ -62,16 +60,12 @@ $(MESADRVTDFXBUILDDIR)tdfx_texman.o \ $(MESADRVTDFXBUILDDIR)tdfx_texstate.o \ $(MESADRVTDFXBUILDDIR)tdfx_tris.o \ - $(MESADRVTDFXBUILDDIR)tdfx_vb.o \ - $(MESADRVTDFXBUILDDIR)tdfx_wrapper.o \ - $(MESADRVTDFXBUILDDIR)tdfx_xmesa.o + $(MESADRVTDFXBUILDDIR)tdfx_vb.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_lock.o \ - $(MESADRVTDFXBUILDDIR)unshared/tdfx_pipeline.o \ + $(MESADRVTDFXBUILDDIR)unshared/tdfx_pixels.o \ $(MESADRVTDFXBUILDDIR)unshared/tdfx_render.o \ $(MESADRVTDFXBUILDDIR)unshared/tdfx_screen.o \ $(MESADRVTDFXBUILDDIR)unshared/tdfx_span.o \ @@ -80,16 +74,12 @@ $(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 + $(MESADRVTDFXBUILDDIR)unshared/tdfx_vb.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_lock.o \ - $(MESADRVTDFXBUILDDIR)debugger/tdfx_pipeline.o \ + $(MESADRVTDFXBUILDDIR)debugger/tdfx_pixels.o \ $(MESADRVTDFXBUILDDIR)debugger/tdfx_render.o \ $(MESADRVTDFXBUILDDIR)debugger/tdfx_screen.o \ $(MESADRVTDFXBUILDDIR)debugger/tdfx_span.o \ @@ -98,16 +88,12 @@ $(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 + $(MESADRVTDFXBUILDDIR)debugger/tdfx_vb.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_lock.o \ - $(MESADRVTDFXBUILDDIR)profiled/tdfx_pipeline.o \ + $(MESADRVTDFXBUILDDIR)profiled/tdfx_pixels.o \ $(MESADRVTDFXBUILDDIR)profiled/tdfx_render.o \ $(MESADRVTDFXBUILDDIR)profiled/tdfx_screen.o \ $(MESADRVTDFXBUILDDIR)profiled/tdfx_span.o \ @@ -116,17 +102,13 @@ $(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 + $(MESADRVTDFXBUILDDIR)profiled/tdfx_vb.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_lock.c, $(MESADRVSRCDIR)/tdfx) -LinkSourceFile(tdfx_pipeline.c, $(MESADRVSRCDIR)/tdfx) +LinkSourceFile(tdfx_pixels.c, $(MESADRVSRCDIR)/tdfx) LinkSourceFile(tdfx_render.c, $(MESADRVSRCDIR)/tdfx) LinkSourceFile(tdfx_screen.c, $(MESADRVSRCDIR)/tdfx) LinkSourceFile(tdfx_span.c, $(MESADRVSRCDIR)/tdfx) @@ -136,7 +118,4 @@ 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/tdfx_context.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c:1.6 xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c:1.11 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c:1.6 Wed Dec 12 19:34:21 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c Tue Jan 14 23:16:39 2003 @@ -23,7 +23,7 @@ * 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.6 2001/12/13 00:34:21 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c,v 1.11 2003/01/15 04:16:39 dawes Exp $ */ /* * Original rewrite: @@ -36,30 +36,23 @@ */ #include -#include "dri_glide.h" #include "tdfx_context.h" #include "tdfx_dd.h" #include "tdfx_state.h" #include "tdfx_vb.h" +#include "tdfx_tris.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 + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "array_cache/acache.h" + +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" #if 0 @@ -79,27 +72,25 @@ { 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" ); + _mesa_enable_extension( ctx, "GL_HP_occlusion_test" ); + _mesa_enable_extension( ctx, "GL_EXT_paletted_texture" ); + _mesa_enable_extension( ctx, "GL_EXT_texture_lod_bias" ); + + if ( fxMesa->haveTwoTMUs ) { + _mesa_enable_extension( ctx, "GL_EXT_texture_env_add" ); + _mesa_enable_extension( ctx, "GL_ARB_multitexture" ); } if ( TDFX_IS_NAPALM( fxMesa ) ) { - gl_extensions_enable( ctx, "GL_EXT_texture_env_combine" ); +#if 0 + _mesa_enable_extension( ctx, "GL_ARB_texture_compression" ); + _mesa_enable_extension( ctx, "GL_3DFX_texture_compression_FXT1" ); +#endif + _mesa_enable_extension( ctx, "GL_EXT_texture_env_combine" ); } if (fxMesa->haveHwStencil) { - gl_extensions_enable( ctx, "GL_EXT_stencil_wrap" ); + _mesa_enable_extension( ctx, "GL_EXT_stencil_wrap" ); } /* Example of hooking in an extension function. @@ -124,22 +115,46 @@ -GLboolean tdfxCreateContext( Display *dpy, GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv ) +static const struct gl_pipeline_stage *tdfx_pipeline[] = { + &_tnl_vertex_transform_stage, + &_tnl_normal_transform_stage, + &_tnl_lighting_stage, /* REMOVE: fog coord stage */ + &_tnl_texgen_stage, + &_tnl_texture_transform_stage, + /* REMOVE: point attenuation stage */ + &_tnl_render_stage, + 0, +}; + + +GLboolean tdfxCreateContext( Display *dpy, const __GLcontextModes *mesaVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ) { tdfxContextPtr fxMesa; - GLcontext *ctx = driContextPriv->mesaContext; + GLcontext *ctx, *shareCtx; __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private; TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) ((char *) sPriv->pSAREA + - fxScreen->sarea_priv_offset); + sizeof(XF86DRISAREARec)); - fxMesa = (tdfxContextPtr) MALLOC( sizeof(tdfxContextRec) ); - if ( !fxMesa ) { + /* Allocate tdfx context */ + fxMesa = (tdfxContextPtr) CALLOC( sizeof(tdfxContextRec) ); + if (!fxMesa) + return GL_FALSE; + + /* Allocate the Mesa context */ + if (sharedContextPrivate) + shareCtx = ((tdfxContextPtr) sharedContextPrivate)->glCtx; + else + shareCtx = NULL; + fxMesa->glCtx = _mesa_create_context(mesaVis, shareCtx, fxMesa, GL_TRUE); + if (!fxMesa->glCtx) { + FREE(fxMesa); return GL_FALSE; } - BZERO(fxMesa, sizeof(tdfxContextRec)); + driContextPriv->driverPrivate = fxMesa; /* Mirror some important DRI state */ @@ -152,25 +167,19 @@ fxMesa->fxScreen = fxScreen; fxMesa->sarea = saPriv; - - fxMesa->haveHwStencil = ( TDFX_IS_NAPALM( fxMesa ) && - mesaVis->StencilBits && - mesaVis->DepthBits == 24 ); + mesaVis->stencilBits && + mesaVis->depthBits == 24 ); fxMesa->screen_width = fxScreen->width; fxMesa->screen_height = fxScreen->height; + fxMesa->new_gl_state = ~0; fxMesa->new_state = ~0; fxMesa->dirty = ~0; - - fxMesa->vertexFormat = 0; - fxMesa->glCtx = driContextPriv->mesaContext; - fxMesa->glVis = mesaVis; - - /* NOTE: This MUST be called before any Glide functions are called! */ - if (!tdfxInitGlide(fxMesa)) { + /* NOTE: This must be here before any Glide calls! */ + if (!tdfxInitGlide( fxMesa )) { FREE(fxMesa); return GL_FALSE; } @@ -196,10 +205,16 @@ 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; + + if (getenv("FX_EMULATE_SINGLE_TMU")) { + fxMesa->haveTwoTMUs = GL_FALSE; + } + else { + if ( TDFX_IS_BANSHEE( fxMesa ) ) { + fxMesa->haveTwoTMUs = GL_FALSE; + } else { + fxMesa->haveTwoTMUs = GL_TRUE; + } } fxMesa->stats.swapBuffer = 0; @@ -209,61 +224,58 @@ fxMesa->tmuSrc = TDFX_TMU_NONE; + ctx = fxMesa->glCtx; 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 ); + /* No wide points. + */ + ctx->Const.MinPointSize = 1.0; + ctx->Const.MinPointSizeAA = 1.0; + ctx->Const.MaxPointSize = 1.0; + ctx->Const.MaxPointSizeAA = 1.0; - tdfxDDInitDriverFuncs( ctx ); - tdfxDDInitStateFuncs( ctx ); - tdfxDDInitRenderFuncs( ctx ); - tdfxDDInitSpanFuncs( ctx ); - tdfxDDInitTextureFuncs( ctx ); + /* Disable wide lines as we can't antialias them correctly in + * hardware. + */ + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 1.0; + ctx->Const.MaxLineWidthAA = 1.0; + ctx->Const.LineWidthGranularity = 1.0; - 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 ); + /* Initialize the software rasterizer and helper modules. + */ + _swrast_CreateContext( ctx ); + _ac_CreateContext( ctx ); + _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); - /* Run the config file */ - gl_context_initialize( ctx ); + /* Install the customized pipeline: + */ + _tnl_destroy_pipeline( ctx ); + _tnl_install_pipeline( ctx, tdfx_pipeline ); -#if 0 - /* HACK: Allocate buffer for vertex data. + /* Configure swrast to match hardware characteristics: */ - if ( fxMesa->buffer ) { - ALIGN_FREE( fxMesa->buffer ); - } - fxMesa->buffer = ALIGN_MALLOC( 2048, 32 ); - fxMesa->buffer_total = 2048; - fxMesa->buffer_used = 0; -#endif + _swrast_allow_pixel_fog( ctx, GL_TRUE ); + _swrast_allow_vertex_fog( ctx, GL_FALSE ); + tdfxDDInitExtensions( ctx ); + tdfxDDInitDriverFuncs( ctx ); + tdfxDDInitStateFuncs( ctx ); + tdfxDDInitRenderFuncs( ctx ); + tdfxDDInitSpanFuncs( ctx ); + tdfxDDInitTriFuncs( ctx ); + tdfxInitVB( ctx ); tdfxInitState( fxMesa ); - driContextPriv->driverPrivate = (void *) fxMesa; - return GL_TRUE; } @@ -284,26 +296,40 @@ } } - /* Single textured vertex format - 32 bytes. + /* Tiny vertex format - 16 bytes. */ fxMesa->Glide.grReset( GR_VERTEX_PARAMETER ); + fxMesa->Glide.grCoordinateSpace( GR_WINDOW_COORDS ); + fxMesa->Glide.grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_PARGB, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_TINY] ); + /* Non textured vertex format - 24 bytes (Need w for table fog) + */ + fxMesa->Glide.grReset( GR_VERTEX_PARAMETER ); fxMesa->Glide.grCoordinateSpace( GR_WINDOW_COORDS ); fxMesa->Glide.grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); - fxMesa->Glide.grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); -#if 0 - fxMesa->Glide.grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); -#endif + fxMesa->Glide.grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_NOTEX] ); + /* Single textured vertex format - 32 bytes. + */ + fxMesa->Glide.grReset( GR_VERTEX_PARAMETER ); + fxMesa->Glide.grCoordinateSpace( GR_WINDOW_COORDS ); + fxMesa->Glide.grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); + /*grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE );*/ fxMesa->Glide.grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_SINGLE] ); /* Multitextured vertex format - 40 bytes. */ fxMesa->Glide.grReset( GR_VERTEX_PARAMETER ); - fxMesa->Glide.grCoordinateSpace( GR_WINDOW_COORDS ); fxMesa->Glide.grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); @@ -311,29 +337,22 @@ fxMesa->Glide.grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_ST1, TDFX_ST1_OFFSET, GR_PARAM_ENABLE ); -#if 0 - fxMesa->Glide.grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); -#endif - + /*fxMesa->Glide.grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE );*/ fxMesa->Glide.grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_MULTI] ); /* Projected texture vertex format - 48 bytes. */ fxMesa->Glide.grReset( GR_VERTEX_PARAMETER ); - fxMesa->Glide.grCoordinateSpace( GR_WINDOW_COORDS ); fxMesa->Glide.grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); - fxMesa->Glide.grVertexLayout( GR_PARAM_ST1, TDFX_ST1_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_Q0, TDFX_Q0_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_ST1, TDFX_ST1_OFFSET, GR_PARAM_ENABLE ); fxMesa->Glide.grVertexLayout( GR_PARAM_Q1, TDFX_Q1_OFFSET, GR_PARAM_ENABLE ); -#if 0 - fxMesa->Glide.grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); -#endif - + /*fxMesa->Glide.grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE );*/ fxMesa->Glide.grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_PROJECT] ); UNLOCK_HARDWARE( fxMesa ); @@ -345,8 +364,8 @@ /* * Initialize the state in an tdfxContextPtr struct. */ -GLboolean tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, - tdfxContextPtr fxMesa ) +static GLboolean +tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, tdfxContextPtr fxMesa ) { /* KW: Would be nice to make one of these a member of the other. */ @@ -397,7 +416,7 @@ LOCK_HARDWARE( fxMesa ); - if ( fxMesa->glVis->DepthBits > 0 ) { + if ( fxMesa->glCtx->Visual.depthBits > 0 ) { fxMesa->Glide.grDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER); } else { fxMesa->Glide.grDepthBufferMode(GR_DEPTHBUFFER_DISABLE); @@ -444,6 +463,14 @@ UNLOCK_HARDWARE( fxMesa ); + { + const char *debug = getenv("LIBGL_DEBUG"); + if (debug && strstr(debug, "fallbacks")) { + fxMesa->debugFallbacks = GL_TRUE; + } + } + + fxMesa->numClipRects = 0; fxMesa->pClipRects = NULL; fxMesa->scissoredClipRects = GL_FALSE; @@ -454,38 +481,224 @@ } -void tdfxDestroyContext( tdfxContextPtr fxMesa ) +void +tdfxDestroyContext( __DRIcontextPrivate *driContextPriv ) { + tdfxContextPtr fxMesa = (tdfxContextPtr) driContextPriv->driverPrivate; + 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 ) { + if (fxMesa->glCtx->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 ); + struct gl_texture_object *tObj; + tObj = fxMesa->glCtx->Shared->TexObjectList; + while (tObj) { + tdfxTMFreeTexture(fxMesa, tObj); + tObj = tObj->Next; } - UNLOCK_HARDWARE( fxMesa ); } + + tdfxTMClose(fxMesa); /* free texture memory */ + + _swsetup_DestroyContext( fxMesa->glCtx ); + _tnl_DestroyContext( fxMesa->glCtx ); + _ac_DestroyContext( fxMesa->glCtx ); + _swrast_DestroyContext( fxMesa->glCtx ); + + tdfxFreeVB( fxMesa->glCtx ); - tdfxTMClose( fxMesa ); /* free texture memory */ - FREE( fxMesa ); + /* Free Mesa context */ + fxMesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context(fxMesa->glCtx); + + /* free the tdfx context */ + XFree( fxMesa ); } +} -#if 0 - glx_fini_prof(); -#endif + +GLboolean +tdfxUnbindContext( __DRIcontextPrivate *driContextPriv ) +{ + GET_CURRENT_CONTEXT(ctx); + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, driContextPriv ); + } + + if ( driContextPriv && (tdfxContextPtr) driContextPriv == fxMesa ) { + LOCK_HARDWARE(fxMesa); + fxMesa->Glide.grGlideGetState(fxMesa->Glide.State); + UNLOCK_HARDWARE(fxMesa); + } + return GL_TRUE; +} + + +GLboolean +tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ) +{ + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, driContextPriv ); + } + + if ( driContextPriv ) { + tdfxContextPtr newFx = (tdfxContextPtr) driContextPriv->driverPrivate; + GLcontext *newCtx = newFx->glCtx; + GET_CURRENT_CONTEXT(curCtx); + + if ( newFx->driDrawable != driDrawPriv ) { + newFx->driDrawable = driDrawPriv; + newFx->dirty = ~0; + } + else if (curCtx == newCtx) { + /* same drawable, same context -> no-op */ + /* Need to call _mesa_make_current2() in order to make sure API + * dispatch is set correctly. + */ + _mesa_make_current2( newCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate ); + return GL_TRUE; + } + + if ( !newFx->Glide.Initialized ) { + if ( !tdfxInitContext( driDrawPriv, newFx ) ) + return GL_FALSE; + + LOCK_HARDWARE( newFx ); + + /* FIXME: Force loading of window information */ + newFx->width = 0; + tdfxUpdateClipping(newCtx); + tdfxUploadClipping(newFx); + + UNLOCK_HARDWARE( newFx ); + } else { + LOCK_HARDWARE( newFx ); + + newFx->Glide.grSstSelect( newFx->Glide.Board ); + newFx->Glide.grGlideSetState( newFx->Glide.State ); + + tdfxUpdateClipping(newCtx); + tdfxUploadClipping(newFx); + + UNLOCK_HARDWARE( newFx ); + } + + _mesa_make_current2( newCtx, + (GLframebuffer *) driDrawPriv->driverPrivate, + (GLframebuffer *) driReadPriv->driverPrivate ); + + if ( !newCtx->Viewport.Width ) { + _mesa_set_viewport( newCtx, 0, 0, driDrawPriv->w, driDrawPriv->h ); + } + } else { + _mesa_make_current( 0, 0 ); + } + + return GL_TRUE; +} + + +/* + * Enable this to trace calls to various Glide functions. + */ +/*#define DEBUG_TRAP*/ +#ifdef DEBUG_TRAP +static void (*real_grDrawTriangle)( const void *a, const void *b, const void *c ); +static void (*real_grDrawPoint)( const void *a ); +static void (*real_grDrawVertexArray)(FxU32 mode, FxU32 Count, void *pointers); +static void (*real_grDrawVertexArrayContiguous)(FxU32 mode, FxU32 Count, + void *pointers, FxU32 stride); +static void (*real_grClipWindow)( FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy ); + +static void (*real_grVertexLayout)(FxU32 param, FxI32 offset, FxU32 mode); +static void (*real_grGlideGetVertexLayout)( void *layout ); +static void (*real_grGlideSetVertexLayout)( const void *layout ); + +static void (*real_grTexDownloadMipMapLevel)( GrChipID_t tmu, + FxU32 startAddress, + GrLOD_t thisLod, + GrLOD_t largeLod, + GrAspectRatio_t aspectRatio, + GrTextureFormat_t format, + FxU32 evenOdd, + void *data ); + + +static void debug_grDrawTriangle( const void *a, const void *b, const void *c ) +{ + printf("%s\n", __FUNCTION__); + (*real_grDrawTriangle)(a, b, c); +} + +static void debug_grDrawPoint( const void *a ) +{ + const float *f = (const float *) a; + printf("%s %g %g\n", __FUNCTION__, f[0], f[1]); + (*real_grDrawPoint)(a); +} + +static void debug_grDrawVertexArray(FxU32 mode, FxU32 Count, void *pointers) +{ + printf("%s count=%d\n", __FUNCTION__, (int) Count); + (*real_grDrawVertexArray)(mode, Count, pointers); } +static void debug_grDrawVertexArrayContiguous(FxU32 mode, FxU32 Count, + void *pointers, FxU32 stride) +{ + printf("%s mode=0x%x count=%d\n", __FUNCTION__, (int) mode, (int) Count); + (*real_grDrawVertexArrayContiguous)(mode, Count, pointers, stride); +} + +static void debug_grClipWindow( FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy ) +{ + printf("%s %d,%d .. %d,%d\n", __FUNCTION__, + (int) minx, (int) miny, (int) maxx, (int) maxy); + (*real_grClipWindow)(minx, miny, maxx, maxy); +} +static void debug_grVertexLayout(FxU32 param, FxI32 offset, FxU32 mode) +{ + (*real_grVertexLayout)(param, offset, mode); +} + +static void debug_grGlideGetVertexLayout( void *layout ) +{ + (*real_grGlideGetVertexLayout)(layout); +} +static void debug_grGlideSetVertexLayout( const void *layout ) +{ + (*real_grGlideSetVertexLayout)(layout); +} + +static void debug_grTexDownloadMipMapLevel( GrChipID_t tmu, + FxU32 startAddress, + GrLOD_t thisLod, + GrLOD_t largeLod, + GrAspectRatio_t aspectRatio, + GrTextureFormat_t format, + FxU32 evenOdd, + void *data ) +{ + (*real_grTexDownloadMipMapLevel)(tmu, startAddress, thisLod, largeLod, + aspectRatio, format, evenOdd, data); +} + +#endif + + /* * Examine the context's deviceID to determine what kind of 3dfx hardware * is installed. dlopen() the appropriate Glide library and initialize @@ -513,10 +726,8 @@ break; default: { - char err[1000]; - sprintf(err, "unrecognized 3dfx deviceID: 0x%x", + __driUtilMessage("unrecognized 3dfx deviceID: 0x%x", tmesa->fxScreen->deviceID); - __driMesaMessage(err); } return GL_FALSE; } @@ -528,13 +739,10 @@ */ libHandle = dlopen(defaultGlide, RTLD_NOW); if (!libHandle) { - char err[1000]; - sprintf(err, + __driUtilMessage( "can't find Glide library, dlopen(%s) and dlopen(%s) both failed.", libName, defaultGlide); - __driMesaMessage(err); - sprintf(err, "dlerror() message: %s", dlerror()); - __driMesaMessage(err); + __driUtilMessage("dlerror() message: %s", dlerror()); return GL_FALSE; } libName = defaultGlide; @@ -550,10 +758,8 @@ #define GET_FUNCTION(PTR, NAME) \ tmesa->Glide.PTR = dlsym(libHandle, NAME); \ if (!tmesa->Glide.PTR) { \ - char err[1000]; \ - sprintf(err, "couldn't find Glide function %s in %s.", \ + __driUtilMessage("couldn't find Glide function %s in %s.", \ NAME, libName); \ - __driMesaMessage(err); \ } GET_FUNCTION(grDrawPoint, "grDrawPoint"); @@ -609,10 +815,8 @@ GET_FUNCTION(grDisable, "grDisable"); GET_FUNCTION(grCoordinateSpace, "grCoordinateSpace"); GET_FUNCTION(grDepthRange, "grDepthRange"); -#if defined(__linux__) || defined(__FreeBSD__) GET_FUNCTION(grStippleMode, "grStippleMode"); GET_FUNCTION(grStipplePattern, "grStipplePattern"); -#endif /* __linux__ || __FreeBSD__ */ GET_FUNCTION(grViewport, "grViewport"); GET_FUNCTION(grTexCalcMemRequired, "grTexCalcMemRequired"); GET_FUNCTION(grTexTextureMemRequired, "grTexTextureMemRequired"); @@ -685,5 +889,35 @@ tmesa->Glide.txImgDequantizeFXT1 = dlsym(libHandle, "_txImgDequantizeFXT1"); tmesa->Glide.txErrorSetCallback = dlsym(libHandle, "txErrorSetCallback"); +#ifdef DEBUG_TRAP + /* wrap the drawing functions so we can trap them */ + real_grDrawTriangle = tmesa->Glide.grDrawTriangle; + tmesa->Glide.grDrawTriangle = debug_grDrawTriangle; + + real_grDrawPoint = tmesa->Glide.grDrawPoint; + tmesa->Glide.grDrawPoint = debug_grDrawPoint; + + real_grDrawVertexArray = tmesa->Glide.grDrawVertexArray; + tmesa->Glide.grDrawVertexArray = debug_grDrawVertexArray; + + real_grDrawVertexArrayContiguous = tmesa->Glide.grDrawVertexArrayContiguous; + tmesa->Glide.grDrawVertexArrayContiguous = debug_grDrawVertexArrayContiguous; + + real_grClipWindow = tmesa->Glide.grClipWindow; + tmesa->Glide.grClipWindow = debug_grClipWindow; + + real_grVertexLayout = tmesa->Glide.grVertexLayout; + tmesa->Glide.grVertexLayout = debug_grVertexLayout; + + real_grGlideGetVertexLayout = tmesa->Glide.grGlideGetVertexLayout; + tmesa->Glide.grGlideGetVertexLayout = debug_grGlideGetVertexLayout; + + real_grGlideSetVertexLayout = tmesa->Glide.grGlideSetVertexLayout; + tmesa->Glide.grGlideSetVertexLayout = debug_grGlideSetVertexLayout; + + real_grTexDownloadMipMapLevel = tmesa->Glide.grTexDownloadMipMapLevel; + tmesa->Glide.grTexDownloadMipMapLevel = debug_grTexDownloadMipMapLevel; + +#endif return GL_TRUE; } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h:1.3 xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h:1.5 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h:1.3 Tue Oct 2 07:44:13 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h Sun Feb 24 16:51:10 2002 @@ -23,7 +23,7 @@ * 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.3 2001/10/02 11:44:13 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h,v 1.5 2002/02/24 21:51:10 dawes Exp $ */ /* * Original rewrite: @@ -40,10 +40,7 @@ #ifdef GLX_DIRECT_RENDERING #include -#include "dri_tmm.h" -#include "dri_mesaint.h" -#include "dri_mesa.h" -#include "dri_xmesaapi.h" +#include "dri_util.h" #ifdef XFree86Server #include "GL/xf86glx.h" #else @@ -52,34 +49,19 @@ #if defined(__linux__) #include #endif + +#include "tdfx_glide.h" + #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 "mtypes.h" -#include "tdfx_wrapper.h" #include "tdfx_screen.h" -#include "tdfx_lock.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 @@ -129,7 +111,6 @@ #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 @@ -143,27 +124,28 @@ #define TDFX_UPLOAD_STIPPLE 0x04000000 -/* Flags for software fallback cases - */ -#define TDFX_FALLBACK_TEXTURE 0x0001 -#define TDFX_FALLBACK_BUFFER 0x0002 +/* Flags for software fallback cases */ +/* See correponding strings in tdfx_tris.c */ +#define TDFX_FALLBACK_TEXTURE_1D_3D 0x0001 +#define TDFX_FALLBACK_DRAW_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 +#define TDFX_FALLBACK_LOGICOP 0x0020 +#define TDFX_FALLBACK_TEXTURE_ENV 0x0040 +#define TDFX_FALLBACK_TEXTURE_BORDER 0x0080 +#define TDFX_FALLBACK_COLORMASK 0x0100 +#define TDFX_FALLBACK_BLEND 0x0200 +#define TDFX_FALLBACK_LINE_STIPPLE 0x0400 /* 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_LAYOUT_TINY 0 +#define TDFX_LAYOUT_NOTEX 1 +#define TDFX_LAYOUT_SINGLE 2 +#define TDFX_LAYOUT_MULTI 3 +#define TDFX_LAYOUT_PROJECT 4 +#define TDFX_NUM_LAYOUTS 5 #define TDFX_XY_OFFSET 0 #define TDFX_Z_OFFSET 8 @@ -260,27 +242,26 @@ (((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 tdfx_context tdfxContextRec; +typedef struct tdfx_context *tdfxContextPtr; + typedef struct { volatile int fifoPtr; volatile int fifoRead; volatile int fifoOwner; volatile int ctxOwner; volatile int texOwner; -} TDFXSAREAPriv; +} +TDFXSAREAPriv; + typedef struct { GLuint swapBuffer; GLuint reqTexUpload; @@ -289,74 +270,121 @@ GLuint texSwaps; } tdfxStats; + + /* * Memory range from startAddr to endAddr-1 */ typedef struct mem_range { struct mem_range *next; FxU32 startAddr, endAddr; -} tdfxMemRange; +} +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; + GLsizei width, height; /* image size */ + GLint wScale, hScale; /* scale factors */ + GrTextureFormat_t glideFormat; /* Glide image format */ +} +tdfxMipMapLevel; #define TDFX_NUM_TMU 2 -typedef struct { +typedef struct tdfxTexInfo_t +{ 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]; + GrAspectRatio_t aspectRatio; + tdfxMemRange *tm[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; + FxBool LODblend; + GrMipMapMode_t mmMode; - GLfloat sScale, tScale; /* texcoord scale factor */ + GLfloat sScale, tScale; /* texcoord scale factor */ GuTexPalette palette; -} tdfxTexObj, *tdfxTexObjPtr; +} +tdfxTexInfo; + -#define TDFX_TEXTURE_DATA(tObj) ((tdfxTexObjPtr)((tObj)->DriverData)) +#define TDFX_TEXTURE_DATA(mesaObj) ((tdfxTexInfo *)((mesaObj)->DriverData)) +#define TDFX_TEXIMAGE_DATA(mesaImg) ((tdfxMipMapLevel *)((mesaImg)->DriverData)) -/* This is state which may be shared by several tdfx contexts. + + +/* + * 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 { +struct tdfxSharedState { 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; + GLuint totalTexMem[TDFX_NUM_TMU]; /* constant */ + GLuint freeTexMem[TDFX_NUM_TMU]; /* changes as we go */ + tdfxMemRange *tmPool; + tdfxMemRange *tmFree[TDFX_NUM_TMU]; +}; + + + +/* ================================================================ + * The vertex structures. + */ +typedef struct { + GLubyte blue; + GLubyte green; + GLubyte red; + GLubyte alpha; +} tdfx_color_t; + +typedef struct { + GLfloat x, y, z; /* Coordinates in screen space */ + GLfloat rhw; /* Reciprocal homogeneous w */ + tdfx_color_t color; /* Diffuse color */ + GLuint pad; + GLfloat tu0, tv0; /* Texture 0 coordinates */ + GLfloat tu1, tv1; /* Texture 1 coordinates */ +} tdfx_vertex; + +typedef struct { + GLfloat x, y, z; /* Coordinates in screen space */ + GLfloat rhw; /* Reciprocal homogeneous w */ + tdfx_color_t color; /* Diffuse color */ + GLuint pad; + GLfloat tu0, tv0; /* Texture 0 coordinates */ + GLfloat tu1, tv1; /* Texture 1 coordinates */ + GLfloat tq0, tq1; /* Texture 0/1 q coords */ +} tdfx_ptex_vertex; +typedef struct { + GLfloat x, y, z; /* Coordinates in screen space */ + tdfx_color_t color; /* Diffuse color */ +} tdfx_tiny_vertex; + +/* The size of this union is not of relevence: + */ +union tdfx_vertex_t { + tdfx_vertex v; + tdfx_tiny_vertex tv; + tdfx_ptex_vertex pv; + GLfloat f[16]; + GLuint ui[16]; + GLubyte ub4[16][4]; +}; +typedef union tdfx_vertex_t tdfxVertex, *tdfxVertexPtr; /* ================================================================ @@ -512,11 +540,6 @@ 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 */ @@ -650,10 +673,8 @@ void (*grDisable)( GrEnableMode_t mode ); void (*grCoordinateSpace)( GrCoordinateSpaceMode_t mode ); void (*grDepthRange)( FxFloat n, FxFloat f ); -#if defined(__linux__) || defined (__FreeBSD__) void (*grStippleMode)( GrStippleMode_t mode ); void (*grStipplePattern)( GrStipplePattern_t mode ); -#endif /* __linux__ || __FreeBSD__ */ void (*grViewport)( FxI32 x, FxI32 y, FxI32 width, FxI32 height ); FxU32 (*grTexCalcMemRequired)(GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt); @@ -799,13 +820,17 @@ void (*txErrorSetCallback)( void *fnc ); }; +typedef void (*tdfx_tri_func)( tdfxContextPtr, tdfxVertex *, tdfxVertex *, + tdfxVertex * ); +typedef void (*tdfx_line_func)( tdfxContextPtr, tdfxVertex *, tdfxVertex * ); +typedef void (*tdfx_point_func)( tdfxContextPtr, tdfxVertex * ); struct tdfx_context { /* Set once and never changed: */ GLcontext *glCtx; /* The core Mesa context */ - GLvisual *glVis; /* Describes the color buffer */ + GLuint new_gl_state; GLuint new_state; GLuint dirty; @@ -843,37 +868,51 @@ struct tdfx_glide Glide; + + /* Temporaries for translating away float colors: + */ + struct gl_client_array UbyteColor; + + /* Fallback rasterization functions + */ + tdfx_point_func draw_point; + tdfx_line_func draw_line; + tdfx_tri_func draw_triangle; + + /* Variable-size Glide vertex formats */ - GLuint vertsize; /* bytes per vertex */ GLuint vertexFormat; /* the current format */ + GLuint vertex_stride_shift; void *layout[TDFX_NUM_LAYOUTS]; - - GLuint tmu_source[TDFX_NUM_TMU]; - GLuint tex_dest[MAX_TEXTURE_UNITS]; - GLuint numTMUs; - + char *verts; /* tdfxVertices, arbitarily packed */ + + GLfloat hw_viewport[16]; + GLuint SetupIndex; - GLuint SetupDone; + GLuint SetupNewInputs; GLuint RenderIndex; - - GLuint IndirectTriangles; GLuint Fallback; + GLenum render_primitive; /* what GL thinks */ + GLenum raster_primitive; /* what the hardware thinks */ GLfloat sScale0, tScale0; GLfloat sScale1, tScale1; - GLuint using_fast_path, passes, multipass; GLuint texBindNumber; GLint tmuSrc; int screen_width; int screen_height; + GLboolean haveTwoTMUs; /* True if we have 2 tmu's */ GLboolean haveHwStencil; + GLboolean haveHwStipple; GLint maxPendingSwapBuffers; + char rendererString[100]; + /* stuff added for DRI */ __DRIscreenPrivate *driScreen; __DRIcontextPrivate *driContext; @@ -897,39 +936,41 @@ 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; + GLboolean debugFallbacks; }; #define TDFX_CONTEXT(ctx) ((tdfxContextPtr)((ctx)->DriverCtx)) + +extern GLboolean +tdfxCreateContext( Display *dpy, + const __GLcontextModes *mesaVis, + __DRIcontextPrivate *driContextPriv, + void *sharedContextPrivate ); + +extern void +tdfxDestroyContext( __DRIcontextPrivate *driContextPriv ); + +extern GLboolean +tdfxUnbindContext( __DRIcontextPrivate *driContextPriv ); + +extern GLboolean +tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv ); -extern GLboolean tdfxCreateContext( Display *dpy, GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv ); -extern void tdfxDestroyContext( tdfxContextPtr fxMesa ); +extern GLboolean +tdfxInitGlide( tdfxContextPtr tmesa ); -extern GLboolean tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, - tdfxContextPtr fxMesa ); +extern void +FX_grColorMaskv(GLcontext *ctx, const GLboolean rgba[4]); -extern GLboolean tdfxInitGlide(tdfxContextPtr tmesa); +extern void +FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4]); /* Color packing utilities @@ -981,7 +1022,6 @@ #define DEBUG_VERBOSE_DRI 0x10 #define DEBUG_VERBOSE_IOCTL 0x20 #define DEBUG_VERBOSE_2D 0x40 -#define DEBUG_VERBOSE_TEXTURE 0x80 #endif /* GLX_DIRECT_RENDERING */ Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c:1.5 xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c:1.10 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c:1.5 Fri Aug 17 22:51:06 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c Wed Oct 30 07:52:00 2002 @@ -23,7 +23,7 @@ * 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.5 2001/08/18 02:51:06 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c,v 1.10 2002/10/30 12:52:00 alanh Exp $ */ /* * Original rewrite: @@ -37,19 +37,21 @@ #include "tdfx_context.h" #include "tdfx_dd.h" +#include "tdfx_lock.h" #include "tdfx_vb.h" -#include "tdfx_pipeline.h" #include "tdfx_pixels.h" +#include "context.h" #include "enums.h" -#include "pb.h" -#if defined(USE_X86_ASM) || defined(USE_3DNOW_ASM) || defined(USE_KATMAI_ASM) +#include "swrast/swrast.h" +#if defined(USE_X86_ASM) #include "X86/common_x86_asm.h" #endif -#define TDFX_DATE "20010501" +#define TDFX_DATE "20020221" + /* 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 }; @@ -65,42 +67,48 @@ 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]; + case GL_RENDERER: + { + /* The renderer string must be per-context state to handle + * multihead correctly. + */ + char *buffer = fxMesa->rendererString; + char hardware[100]; - strcpy( hardware, FX_grGetString( fxMesa, GR_HARDWARE ) ); + LOCK_HARDWARE(fxMesa); + strcpy( hardware, fxMesa->Glide.grGetString(GR_HARDWARE) ); + UNLOCK_HARDWARE(fxMesa); + + strcpy( buffer, "Mesa DRI " ); + strcat( buffer, TDFX_DATE ); + strcat( buffer, " " ); if ( strcmp( hardware, "Voodoo3 (tm)" ) == 0 ) { - strcpy( hardware, "Voodoo3" ); + strcat( buffer, "Voodoo3" ); } else if ( strcmp( hardware, "Voodoo Banshee (tm)" ) == 0 ) { - strcpy( hardware, "VoodooBanshee" ); + strcat( buffer, "VoodooBanshee" ); } else if ( strcmp( hardware, "Voodoo4 (tm)" ) == 0 ) { - strcpy( hardware, "Voodoo4" ); + strcat( buffer, "Voodoo4" ); } else if ( strcmp( hardware, "Voodoo5 (tm)" ) == 0 ) { - strcpy( hardware, "Voodoo5" ); + strcat( buffer, "Voodoo5" ); } else { - /* Unexpected result: replace spaces with hyphens */ + /* unexpected result: replace spaces with hyphens */ int i; - for ( i = 0 ; hardware[i] ; i++ ) { + for ( i = 0 ; hardware[i] && i < 60 ; i++ ) { if ( hardware[i] == ' ' || hardware[i] == '\t' ) hardware[i] = '-'; } + strcat( buffer, hardware ); } - /* 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 ) { + if ( _mesa_x86_cpu_features ) { strncat( buffer, " x86", 4 ); } #endif @@ -114,41 +122,36 @@ strncat( buffer, "/3DNow!", 7 ); } #endif -#ifdef USE_KATMAI_ASM +#ifdef USE_SSE_ASM if ( cpu_has_xmm ) { strncat( buffer, "/SSE", 4 ); } #endif - return (GLubyte *)buffer; + return (const GLubyte *) buffer; } - + case GL_VENDOR: + return (const GLubyte *)"VA Linux Systems, Inc."; default: return NULL; } } -/* Return buffer size information. +/* Return uptodate buffer size information. */ -static void tdfxDDGetBufferSize( GLcontext *ctx, +static void tdfxDDGetBufferSize( GLframebuffer *buffer, GLuint *width, GLuint *height ) { + GET_CURRENT_CONTEXT(ctx); tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + LOCK_HARDWARE( fxMesa ); *width = fxMesa->width; *height = fxMesa->height; + UNLOCK_HARDWARE( fxMesa ); } -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 @@ -160,6 +163,7 @@ GLboolean result; LOCK_HARDWARE( fxMesa ); + fxMesa->Glide.grFinish(); /* required to flush the FIFO - FB 21-01-2002 */ if (ctx->Depth.OcclusionTest) { if (ctx->OcclusionResult) { @@ -168,13 +172,12 @@ else { FxI32 zfail, in; fxMesa->Glide.grGet(GR_STATS_PIXELS_DEPTHFUNC_FAIL, 4, &zfail); - /*zfail = FX_grGetInteger_NoLock(GR_STATS_PIXELS_DEPTHFUNC_FAIL);*/ fxMesa->Glide.grGet(GR_STATS_PIXELS_IN, 4, &in); - /*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 */ + /* Geometry is occluded if there is no input (in == 0) */ + /* or if all pixels failed the depth test (zfail == in) */ + /* The < 1 is there because I have empirically seen cases where */ + /* zfail > in.... go figure. FB - 21-01-2002. */ + result = ((in - zfail) < 1 || in == 0) ? GL_FALSE : GL_TRUE; } } else { @@ -240,10 +243,10 @@ #define VISUAL_EQUALS_RGBA(vis, r, g, b, a) \ - ((vis->RedBits == r) && \ - (vis->GreenBits == g) && \ - (vis->BlueBits == b) && \ - (vis->AlphaBits == a)) + ((vis.redBits == r) && \ + (vis.greenBits == g) && \ + (vis.blueBits == b) && \ + (vis.alphaBits == a)) void tdfxDDInitDriverFuncs( GLcontext *ctx ) { @@ -253,49 +256,75 @@ ctx->Driver.GetString = tdfxDDGetString; ctx->Driver.GetBufferSize = tdfxDDGetBufferSize; + ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; ctx->Driver.Error = NULL; - ctx->Driver.GetParameteri = tdfxDDGetParameteri; + /* Pixel path fallbacks. + */ + ctx->Driver.Accum = _swrast_Accum; + ctx->Driver.Bitmap = _swrast_Bitmap; + ctx->Driver.CopyPixels = _swrast_CopyPixels; + ctx->Driver.DrawPixels = _swrast_DrawPixels; + ctx->Driver.ReadPixels = _swrast_ReadPixels; + + /* Accelerated paths + */ 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; +} + + +/* + * These are here for lack of a better place. + */ + +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( fxMesa->Glide.grColorMaskExt ); + fxMesa->Glide.grColorMaskExt(rgba[RCOMP], rgba[GCOMP], + rgba[BCOMP], rgba[ACOMP]); + } + else { + /* 16 bpp mode */ + /* we never have an alpha buffer */ + fxMesa->Glide.grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], + GL_FALSE); + } + UNLOCK_HARDWARE(fxMesa); +} + +void +FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4]) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + if (ctx->Visual.redBits == 8) { + /* 32bpp mode */ + ASSERT( fxMesa->Glide.grColorMaskExt ); + fxMesa->Glide.grColorMaskExt(rgba[RCOMP], rgba[GCOMP], + rgba[BCOMP], rgba[ACOMP]); + } + else { + /* 16 bpp mode */ + /* we never have an alpha buffer */ + fxMesa->Glide.grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], + GL_FALSE); + } } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c:1.2 Fri Aug 17 22:51:06 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c Thu Feb 27 12:26:35 2003 @@ -1,594 +0,0 @@ -/* -*- 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.2 2001/08/18 02:51:06 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) fxMesa->Glide.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 ); - fxMesa->Glide.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 ); - fxMesa->Glide.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 xc/lib/GL/mesa/src/drv/tdfx/tdfx_fasttmp.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_fasttmp.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_fasttmp.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_fasttmp.h Thu Feb 27 12:26:35 2003 @@ -1,293 +0,0 @@ -/* -*- 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_glide.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_glide.h:1.1 --- /dev/null Thu Feb 27 12:26:35 2003 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_glide.h Fri Feb 22 16:45:03 2002 @@ -0,0 +1,606 @@ +/* + * This file defines macros and types necessary for accessing glide3. + */ + +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_glide.h,v 1.1 2002/02/22 21:45:03 dawes Exp $ */ + +#ifndef NEWGLIDE_H +#define NEWGLIDE_H + +#define FX_CALL + +typedef unsigned char FxU8; +typedef signed char FxI8; +typedef unsigned short FxU16; +typedef signed short FxI16; +#if defined(__alpha__) || defined (__LP64__) +typedef signed int FxI32; +typedef unsigned int FxU32; +#else +typedef signed long FxI32; +typedef unsigned long FxU32; +#endif +typedef unsigned long AnyPtr; +typedef int FxBool; +typedef float FxFloat; +typedef double FxDouble; + +typedef unsigned long FxColor_t; +typedef struct +{ + float r, g, b, a; +} +FxColor4; + +typedef FxU32 GrColor_t; +typedef FxU8 GrAlpha_t; +typedef FxU32 GrMipMapId_t; +typedef FxU32 GrStipplePattern_t; +typedef FxU8 GrFog_t; +typedef FxU32 GrContext_t; +typedef int (FX_CALL * GrProc) (void); + +#define FXTRUE 1 +#define FXFALSE 0 + +#define FXBIT(i) (1L << (i)) + +#define GR_NULL_MIPMAP_HANDLE ((GrMipMapId_t) -1) + +#define GR_MIPMAPLEVELMASK_EVEN FXBIT(0) +#define GR_MIPMAPLEVELMASK_ODD FXBIT(1) +#define GR_MIPMAPLEVELMASK_BOTH (GR_MIPMAPLEVELMASK_EVEN | GR_MIPMAPLEVELMASK_ODD ) + +typedef FxI32 GrChipID_t; +#define GR_TMU0 0x0 +#define GR_TMU1 0x1 +#define GR_TMU2 0x2 + +#define GR_FBI 0x0 + +typedef FxI32 GrCombineFunction_t; +#define GR_COMBINE_FUNCTION_ZERO 0x0 +#define GR_COMBINE_FUNCTION_NONE GR_COMBINE_FUNCTION_ZERO +#define GR_COMBINE_FUNCTION_LOCAL 0x1 +#define GR_COMBINE_FUNCTION_LOCAL_ALPHA 0x2 +#define GR_COMBINE_FUNCTION_SCALE_OTHER 0x3 +#define GR_COMBINE_FUNCTION_BLEND_OTHER GR_COMBINE_FUNCTION_SCALE_OTHER +#define GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL 0x4 +#define GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL_ALPHA 0x5 +#define GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL 0x6 +#define GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL 0x7 +#define GR_COMBINE_FUNCTION_BLEND GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL +#define GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL_ALPHA 0x8 +#define GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL 0x9 +#define GR_COMBINE_FUNCTION_BLEND_LOCAL GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL +#define GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA 0x10 + +typedef FxI32 GrCombineFactor_t; +#define GR_COMBINE_FACTOR_ZERO 0x0 +#define GR_COMBINE_FACTOR_NONE GR_COMBINE_FACTOR_ZERO +#define GR_COMBINE_FACTOR_LOCAL 0x1 +#define GR_COMBINE_FACTOR_OTHER_ALPHA 0x2 +#define GR_COMBINE_FACTOR_LOCAL_ALPHA 0x3 +#define GR_COMBINE_FACTOR_TEXTURE_ALPHA 0x4 +#define GR_COMBINE_FACTOR_TEXTURE_RGB 0x5 +#define GR_COMBINE_FACTOR_DETAIL_FACTOR GR_COMBINE_FACTOR_TEXTURE_ALPHA +#define GR_COMBINE_FACTOR_LOD_FRACTION 0x5 +#define GR_COMBINE_FACTOR_ONE 0x8 +#define GR_COMBINE_FACTOR_ONE_MINUS_LOCAL 0x9 +#define GR_COMBINE_FACTOR_ONE_MINUS_OTHER_ALPHA 0xa +#define GR_COMBINE_FACTOR_ONE_MINUS_LOCAL_ALPHA 0xb +#define GR_COMBINE_FACTOR_ONE_MINUS_TEXTURE_ALPHA 0xc +#define GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR GR_COMBINE_FACTOR_ONE_MINUS_TEXTURE_ALPHA +#define GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION 0xd + +typedef FxI32 GrCombineLocal_t; +#define GR_COMBINE_LOCAL_ITERATED 0x0 +#define GR_COMBINE_LOCAL_CONSTANT 0x1 +#define GR_COMBINE_LOCAL_NONE GR_COMBINE_LOCAL_CONSTANT +#define GR_COMBINE_LOCAL_DEPTH 0x2 + +typedef FxI32 GrCombineOther_t; +#define GR_COMBINE_OTHER_ITERATED 0x0 +#define GR_COMBINE_OTHER_TEXTURE 0x1 +#define GR_COMBINE_OTHER_CONSTANT 0x2 +#define GR_COMBINE_OTHER_NONE GR_COMBINE_OTHER_CONSTANT + +typedef FxI32 GrAlphaSource_t; +#define GR_ALPHASOURCE_CC_ALPHA 0x0 +#define GR_ALPHASOURCE_ITERATED_ALPHA 0x1 +#define GR_ALPHASOURCE_TEXTURE_ALPHA 0x2 +#define GR_ALPHASOURCE_TEXTURE_ALPHA_TIMES_ITERATED_ALPHA 0x3 + +typedef FxI32 GrColorCombineFnc_t; +#define GR_COLORCOMBINE_ZERO 0x0 +#define GR_COLORCOMBINE_CCRGB 0x1 +#define GR_COLORCOMBINE_ITRGB 0x2 +#define GR_COLORCOMBINE_ITRGB_DELTA0 0x3 +#define GR_COLORCOMBINE_DECAL_TEXTURE 0x4 +#define GR_COLORCOMBINE_TEXTURE_TIMES_CCRGB 0x5 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB 0x6 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_DELTA0 0x7 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_ADD_ALPHA 0x8 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA 0x9 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA_ADD_ITRGB 0xa +#define GR_COLORCOMBINE_TEXTURE_ADD_ITRGB 0xb +#define GR_COLORCOMBINE_TEXTURE_SUB_ITRGB 0xc +#define GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA 0xd +#define GR_COLORCOMBINE_DIFF_SPEC_A 0xe +#define GR_COLORCOMBINE_DIFF_SPEC_B 0xf +#define GR_COLORCOMBINE_ONE 0x10 + +typedef FxI32 GrAlphaBlendFnc_t; +#define GR_BLEND_ZERO 0x0 +#define GR_BLEND_SRC_ALPHA 0x1 +#define GR_BLEND_SRC_COLOR 0x2 +#define GR_BLEND_DST_COLOR GR_BLEND_SRC_COLOR +#define GR_BLEND_DST_ALPHA 0x3 +#define GR_BLEND_ONE 0x4 +#define GR_BLEND_ONE_MINUS_SRC_ALPHA 0x5 +#define GR_BLEND_ONE_MINUS_SRC_COLOR 0x6 +#define GR_BLEND_ONE_MINUS_DST_COLOR GR_BLEND_ONE_MINUS_SRC_COLOR +#define GR_BLEND_ONE_MINUS_DST_ALPHA 0x7 +#define GR_BLEND_RESERVED_8 0x8 +#define GR_BLEND_RESERVED_9 0x9 +#define GR_BLEND_RESERVED_A 0xa +#define GR_BLEND_RESERVED_B 0xb +#define GR_BLEND_RESERVED_C 0xc +#define GR_BLEND_RESERVED_D 0xd +#define GR_BLEND_RESERVED_E 0xe +#define GR_BLEND_ALPHA_SATURATE 0xf +#define GR_BLEND_PREFOG_COLOR GR_BLEND_ALPHA_SATURATE +#define GR_BLEND_SAME_COLOR_EXT 0x08 +#define GR_BLEND_ONE_MINUS_SAME_COLOR_EXT 0x09 + +typedef FxI32 GrAspectRatio_t; +#define GR_ASPECT_LOG2_8x1 3 +#define GR_ASPECT_LOG2_4x1 2 +#define GR_ASPECT_LOG2_2x1 1 +#define GR_ASPECT_LOG2_1x1 0 +#define GR_ASPECT_LOG2_1x2 -1 +#define GR_ASPECT_LOG2_1x4 -2 +#define GR_ASPECT_LOG2_1x8 -3 + +typedef FxI32 GrBuffer_t; +#define GR_BUFFER_FRONTBUFFER 0x0 +#define GR_BUFFER_BACKBUFFER 0x1 +#define GR_BUFFER_AUXBUFFER 0x2 +#define GR_BUFFER_DEPTHBUFFER 0x3 +#define GR_BUFFER_ALPHABUFFER 0x4 +#define GR_BUFFER_TRIPLEBUFFER 0x5 + +typedef FxI32 GrChromakeyMode_t; +#define GR_CHROMAKEY_DISABLE 0x0 +#define GR_CHROMAKEY_ENABLE 0x1 + +typedef FxI32 GrChromaRangeMode_t; +#define GR_CHROMARANGE_RGB_ALL_EXT 0x0 + +#define GR_CHROMARANGE_DISABLE_EXT 0x00 +#define GR_CHROMARANGE_ENABLE_EXT 0x01 + +typedef FxI32 GrTexChromakeyMode_t; +#define GR_TEXCHROMA_DISABLE_EXT 0x0 +#define GR_TEXCHROMA_ENABLE_EXT 0x1 + +#define GR_TEXCHROMARANGE_RGB_ALL_EXT 0x0 + +typedef FxI32 GrCmpFnc_t; +#define GR_CMP_NEVER 0x0 +#define GR_CMP_LESS 0x1 +#define GR_CMP_EQUAL 0x2 +#define GR_CMP_LEQUAL 0x3 +#define GR_CMP_GREATER 0x4 +#define GR_CMP_NOTEQUAL 0x5 +#define GR_CMP_GEQUAL 0x6 +#define GR_CMP_ALWAYS 0x7 + +typedef FxI32 GrColorFormat_t; +#define GR_COLORFORMAT_ARGB 0x0 +#define GR_COLORFORMAT_ABGR 0x1 + +#define GR_COLORFORMAT_RGBA 0x2 +#define GR_COLORFORMAT_BGRA 0x3 + +typedef FxI32 GrCullMode_t; +#define GR_CULL_DISABLE 0x0 +#define GR_CULL_NEGATIVE 0x1 +#define GR_CULL_POSITIVE 0x2 + +typedef FxI32 GrDepthBufferMode_t; +#define GR_DEPTHBUFFER_DISABLE 0x0 +#define GR_DEPTHBUFFER_ZBUFFER 0x1 +#define GR_DEPTHBUFFER_WBUFFER 0x2 +#define GR_DEPTHBUFFER_ZBUFFER_COMPARE_TO_BIAS 0x3 +#define GR_DEPTHBUFFER_WBUFFER_COMPARE_TO_BIAS 0x4 + +typedef FxI32 GrDitherMode_t; +#define GR_DITHER_DISABLE 0x0 +#define GR_DITHER_2x2 0x1 +#define GR_DITHER_4x4 0x2 + +typedef FxI32 GrStippleMode_t; +#define GR_STIPPLE_DISABLE 0x0 +#define GR_STIPPLE_PATTERN 0x1 +#define GR_STIPPLE_ROTATE 0x2 + +typedef FxI32 GrFogMode_t; +#define GR_FOG_DISABLE 0x0 +#define GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT 0x1 +#define GR_FOG_WITH_TABLE_ON_Q 0x2 +#define GR_FOG_WITH_TABLE_ON_W GR_FOG_WITH_TABLE_ON_Q +#define GR_FOG_WITH_ITERATED_Z 0x3 +#define GR_FOG_WITH_ITERATED_ALPHA_EXT 0x4 +#define GR_FOG_MULT2 0x100 +#define GR_FOG_ADD2 0x200 + +typedef FxU32 GrLock_t; +#define GR_LFB_READ_ONLY 0x00 +#define GR_LFB_WRITE_ONLY 0x01 +#define GR_LFB_IDLE 0x00 +#define GR_LFB_NOIDLE 0x10 + +typedef FxI32 GrLfbBypassMode_t; +#define GR_LFBBYPASS_DISABLE 0x0 +#define GR_LFBBYPASS_ENABLE 0x1 + +typedef FxI32 GrLfbWriteMode_t; +#define GR_LFBWRITEMODE_565 0x0 +#define GR_LFBWRITEMODE_555 0x1 +#define GR_LFBWRITEMODE_1555 0x2 +#define GR_LFBWRITEMODE_RESERVED1 0x3 +#define GR_LFBWRITEMODE_888 0x4 +#define GR_LFBWRITEMODE_8888 0x5 +#define GR_LFBWRITEMODE_RESERVED2 0x6 +#define GR_LFBWRITEMODE_RESERVED3 0x7 +#define GR_LFBWRITEMODE_RESERVED4 0x8 +#define GR_LFBWRITEMODE_RESERVED5 0x9 +#define GR_LFBWRITEMODE_RESERVED6 0xa +#define GR_LFBWRITEMODE_RESERVED7 0xb +#define GR_LFBWRITEMODE_565_DEPTH 0xc +#define GR_LFBWRITEMODE_555_DEPTH 0xd +#define GR_LFBWRITEMODE_1555_DEPTH 0xe +#define GR_LFBWRITEMODE_ZA16 0xf +#define GR_LFBWRITEMODE_ANY 0xFF + +typedef FxI32 GrOriginLocation_t; +#define GR_ORIGIN_UPPER_LEFT 0x0 +#define GR_ORIGIN_LOWER_LEFT 0x1 +#define GR_ORIGIN_ANY 0xFF + +typedef struct +{ + int size; + void *lfbPtr; + FxU32 strideInBytes; + GrLfbWriteMode_t writeMode; + GrOriginLocation_t origin; +} +GrLfbInfo_t; + +typedef FxI32 GrLOD_t; +#define GR_LOD_LOG2_2048 0xb +#define GR_LOD_LOG2_1024 0xa +#define GR_LOD_LOG2_512 0x9 +#define GR_LOD_LOG2_256 0x8 +#define GR_LOD_LOG2_128 0x7 +#define GR_LOD_LOG2_64 0x6 +#define GR_LOD_LOG2_32 0x5 +#define GR_LOD_LOG2_16 0x4 +#define GR_LOD_LOG2_8 0x3 +#define GR_LOD_LOG2_4 0x2 +#define GR_LOD_LOG2_2 0x1 +#define GR_LOD_LOG2_1 0x0 + +typedef FxI32 GrMipMapMode_t; +#define GR_MIPMAP_DISABLE 0x0 +#define GR_MIPMAP_NEAREST 0x1 +#define GR_MIPMAP_NEAREST_DITHER 0x2 + +typedef FxI32 GrSmoothingMode_t; +#define GR_SMOOTHING_DISABLE 0x0 +#define GR_SMOOTHING_ENABLE 0x1 + +typedef FxI32 GrTextureClampMode_t; +#define GR_TEXTURECLAMP_WRAP 0x0 +#define GR_TEXTURECLAMP_CLAMP 0x1 +#define GR_TEXTURECLAMP_MIRROR_EXT 0x2 + +typedef FxI32 GrTextureCombineFnc_t; +#define GR_TEXTURECOMBINE_ZERO 0x0 +#define GR_TEXTURECOMBINE_DECAL 0x1 +#define GR_TEXTURECOMBINE_OTHER 0x2 +#define GR_TEXTURECOMBINE_ADD 0x3 +#define GR_TEXTURECOMBINE_MULTIPLY 0x4 +#define GR_TEXTURECOMBINE_SUBTRACT 0x5 +#define GR_TEXTURECOMBINE_DETAIL 0x6 +#define GR_TEXTURECOMBINE_DETAIL_OTHER 0x7 +#define GR_TEXTURECOMBINE_TRILINEAR_ODD 0x8 +#define GR_TEXTURECOMBINE_TRILINEAR_EVEN 0x9 +#define GR_TEXTURECOMBINE_ONE 0xa + +typedef FxI32 GrTextureFilterMode_t; +#define GR_TEXTUREFILTER_POINT_SAMPLED 0x0 +#define GR_TEXTUREFILTER_BILINEAR 0x1 + +typedef FxI32 GrTextureFormat_t; +#define GR_TEXFMT_8BIT 0x0 +#define GR_TEXFMT_RGB_332 GR_TEXFMT_8BIT +#define GR_TEXFMT_YIQ_422 0x1 +#define GR_TEXFMT_ALPHA_8 0x2 +#define GR_TEXFMT_INTENSITY_8 0x3 +#define GR_TEXFMT_ALPHA_INTENSITY_44 0x4 +#define GR_TEXFMT_P_8 0x5 +#define GR_TEXFMT_RSVD0 0x6 +#define GR_TEXFMT_RSVD1 0x7 +#define GR_TEXFMT_16BIT 0x8 +#define GR_TEXFMT_ARGB_8332 GR_TEXFMT_16BIT +#define GR_TEXFMT_AYIQ_8422 0x9 +#define GR_TEXFMT_RGB_565 0xa +#define GR_TEXFMT_ARGB_1555 0xb +#define GR_TEXFMT_ARGB_4444 0xc +#define GR_TEXFMT_ALPHA_INTENSITY_88 0xd +#define GR_TEXFMT_AP_88 0xe +#define GR_TEXFMT_RSVD2 0xf +#define GR_TEXFMT_ARGB_CMP_FXT1 0x11 +#define GR_TEXFMT_ARGB_8888 0x12 +#define GR_TEXFMT_YUYV_422 0x13 +#define GR_TEXFMT_UYVY_422 0x14 +#define GR_TEXFMT_AYUV_444 0x15 +#define GR_TEXFMT_ARGB_CMP_DXT1 0x16 +#define GR_TEXFMT_ARGB_CMP_DXT2 0x17 +#define GR_TEXFMT_ARGB_CMP_DXT3 0x18 +#define GR_TEXFMT_ARGB_CMP_DXT4 0x19 +#define GR_TEXFMT_ARGB_CMP_DXT5 0x1A + +typedef FxU32 GrTexTable_t; +#define GR_TEXTABLE_NCC0 0x0 +#define GR_TEXTABLE_NCC1 0x1 +#define GR_TEXTABLE_PALETTE 0x2 +#define GR_TEXTABLE_PALETTE_6666_EXT 0x3 + +typedef FxU32 GrNCCTable_t; +#define GR_NCCTABLE_NCC0 0x0 +#define GR_NCCTABLE_NCC1 0x1 + +typedef FxU32 GrTexBaseRange_t; +#define GR_TEXBASE_256 0x3 +#define GR_TEXBASE_128 0x2 +#define GR_TEXBASE_64 0x1 +#define GR_TEXBASE_32_TO_1 0x0 +#define GR_TEXBASE_2048 0x7 +#define GR_TEXBASE_1024 0x6 +#define GR_TEXBASE_512 0x5 +#define GR_TEXBASE_256_TO_1 0x4 + +typedef FxU32 GrEnableMode_t; +#define GR_MODE_DISABLE 0x0 +#define GR_MODE_ENABLE 0x1 + +#define GR_AA_ORDERED 0x01 +#define GR_ALLOW_MIPMAP_DITHER 0x02 +#define GR_PASSTHRU 0x03 +#define GR_SHAMELESS_PLUG 0x04 +#define GR_VIDEO_SMOOTHING 0x05 + +typedef FxU32 GrCoordinateSpaceMode_t; +#define GR_WINDOW_COORDS 0x00 +#define GR_CLIP_COORDS 0x01 + +/* Parameters for strips */ +#define GR_PARAM_XY 0x01 +#define GR_PARAM_Z 0x02 +#define GR_PARAM_W 0x03 +#define GR_PARAM_Q 0x04 +#define GR_PARAM_FOG_EXT 0x05 + +#define GR_PARAM_A 0x10 + +#define GR_PARAM_RGB 0x20 + +#define GR_PARAM_PARGB 0x30 + +#define GR_PARAM_ST0 0x40 +#define GR_PARAM_ST1 GR_PARAM_ST0+1 +#define GR_PARAM_ST2 GR_PARAM_ST0+2 + +#define GR_PARAM_Q0 0x50 +#define GR_PARAM_Q1 GR_PARAM_Q0+1 +#define GR_PARAM_Q2 GR_PARAM_Q0+2 + +#define GR_PARAM_DISABLE 0x00 +#define GR_PARAM_ENABLE 0x01 + +/* grDrawVertexArray/grDrawVertexArrayContiguous */ +#define GR_POINTS 0 +#define GR_LINE_STRIP 1 +#define GR_LINES 2 +#define GR_POLYGON 3 +#define GR_TRIANGLE_STRIP 4 +#define GR_TRIANGLE_FAN 5 +#define GR_TRIANGLES 6 +#define GR_TRIANGLE_STRIP_CONTINUE 7 +#define GR_TRIANGLE_FAN_CONTINUE 8 + +/* grGet/grReset */ +#define GR_BITS_DEPTH 0x01 +#define GR_BITS_RGBA 0x02 +#define GR_FIFO_FULLNESS 0x03 +#define GR_FOG_TABLE_ENTRIES 0x04 +#define GR_GAMMA_TABLE_ENTRIES 0x05 +#define GR_GLIDE_STATE_SIZE 0x06 +#define GR_GLIDE_VERTEXLAYOUT_SIZE 0x07 +#define GR_IS_BUSY 0x08 +#define GR_LFB_PIXEL_PIPE 0x09 +#define GR_MAX_TEXTURE_SIZE 0x0a +#define GR_MAX_TEXTURE_ASPECT_RATIO 0x0b +#define GR_MEMORY_FB 0x0c +#define GR_MEMORY_TMU 0x0d +#define GR_MEMORY_UMA 0x0e +#define GR_NUM_BOARDS 0x0f +#define GR_NON_POWER_OF_TWO_TEXTURES 0x10 +#define GR_NUM_FB 0x11 +#define GR_NUM_SWAP_HISTORY_BUFFER 0x12 +#define GR_NUM_TMU 0x13 +#define GR_PENDING_BUFFERSWAPS 0x14 +#define GR_REVISION_FB 0x15 +#define GR_REVISION_TMU 0x16 +#define GR_STATS_LINES 0x17 +#define GR_STATS_PIXELS_AFUNC_FAIL 0x18 +#define GR_STATS_PIXELS_CHROMA_FAIL 0x19 +#define GR_STATS_PIXELS_DEPTHFUNC_FAIL 0x1a +#define GR_STATS_PIXELS_IN 0x1b +#define GR_STATS_PIXELS_OUT 0x1c +#define GR_STATS_PIXELS 0x1d +#define GR_STATS_POINTS 0x1e +#define GR_STATS_TRIANGLES_IN 0x1f +#define GR_STATS_TRIANGLES_OUT 0x20 +#define GR_STATS_TRIANGLES 0x21 +#define GR_SWAP_HISTORY 0x22 +#define GR_SUPPORTS_PASSTHRU 0x23 +#define GR_TEXTURE_ALIGN 0x24 +#define GR_VIDEO_POSITION 0x25 +#define GR_VIEWPORT 0x26 +#define GR_WDEPTH_MIN_MAX 0x27 +#define GR_ZDEPTH_MIN_MAX 0x28 +#define GR_VERTEX_PARAMETER 0x29 +#define GR_BITS_GAMMA 0x2a +#define GR_GET_RESERVED_1 0x1000 + +/* grGetString types */ +#define GR_EXTENSION 0xa0 +#define GR_HARDWARE 0xa1 +#define GR_RENDERER 0xa2 +#define GR_VENDOR 0xa3 +#define GR_VERSION 0xa4 + +typedef FxI32 GrScreenRefresh_t; +#define GR_REFRESH_NONE 0xff + +typedef FxI32 GrScreenResolution_t; +#define GR_RESOLUTION_NONE 0xff + +typedef struct +{ + GrLOD_t smallLodLog2; + GrLOD_t largeLodLog2; + GrAspectRatio_t aspectRatioLog2; + GrTextureFormat_t format; + void *data; +} +GrTexInfo; + +typedef struct GrSstPerfStats_s +{ + FxU32 pixelsIn; + FxU32 chromaFail; + FxU32 zFuncFail; + FxU32 aFuncFail; + FxU32 pixelsOut; +} +GrSstPerfStats_t; + +typedef struct +{ + GrScreenResolution_t resolution; + GrScreenRefresh_t refresh; + int numColorBuffers; + int numAuxBuffers; +} +GrResolution; + +typedef GrResolution GlideResolution; +#define GR_QUERY_ANY ((FxU32)(~0)) + +typedef FxU32 GrLfbSrcFmt_t; +#define GR_LFB_SRC_FMT_565 0x00 +#define GR_LFB_SRC_FMT_555 0x01 +#define GR_LFB_SRC_FMT_1555 0x02 +#define GR_LFB_SRC_FMT_888 0x04 +#define GR_LFB_SRC_FMT_8888 0x05 +#define GR_LFB_SRC_FMT_565_DEPTH 0x0c +#define GR_LFB_SRC_FMT_555_DEPTH 0x0d +#define GR_LFB_SRC_FMT_1555_DEPTH 0x0e +#define GR_LFB_SRC_FMT_ZA16 0x0f +#define GR_LFB_SRC_FMT_RLE16 0x80 + +typedef FxU32 GrPixelFormat_t; +#define GR_PIXFMT_I_8 0x0001 +#define GR_PIXFMT_AI_88 0x0002 +#define GR_PIXFMT_RGB_565 0x0003 +#define GR_PIXFMT_ARGB_1555 0x0004 +#define GR_PIXFMT_ARGB_8888 0x0005 +#define GR_PIXFMT_AA_2_RGB_565 0x0006 +#define GR_PIXFMT_AA_2_ARGB_1555 0x0007 +#define GR_PIXFMT_AA_2_ARGB_8888 0x0008 +#define GR_PIXFMT_AA_4_RGB_565 0x0009 +#define GR_PIXFMT_AA_4_ARGB_1555 0x000a +#define GR_PIXFMT_AA_4_ARGB_8888 0x000b + +#define GR_LFBWRITEMODE_Z32 0x0008 + +typedef FxU32 GrAAMode_t; +#define GR_AA_NONE 0x0000 +#define GR_AA_4SAMPLES 0x0001 + +typedef FxU8 GrStencil_t; + +typedef FxU32 GrStencilOp_t; +#define GR_STENCILOP_KEEP 0x00 +#define GR_STENCILOP_ZERO 0x01 +#define GR_STENCILOP_REPLACE 0x02 +#define GR_STENCILOP_INCR_CLAMP 0x03 +#define GR_STENCILOP_DECR_CLAMP 0x04 +#define GR_STENCILOP_INVERT 0x05 +#define GR_STENCILOP_INCR_WRAP 0x06 +#define GR_STENCILOP_DECR_WRAP 0x07 + +#define GR_TEXTURE_UMA_EXT 0x06 +#define GR_STENCIL_MODE_EXT 0x07 +#define GR_OPENGL_MODE_EXT 0x08 + +typedef FxU32 GrCCUColor_t; +typedef FxU32 GrACUColor_t; +typedef FxU32 GrTCCUColor_t; +typedef FxU32 GrTACUColor_t; +#define GR_CMBX_ZERO 0x00 +#define GR_CMBX_TEXTURE_ALPHA 0x01 +#define GR_CMBX_ALOCAL 0x02 +#define GR_CMBX_AOTHER 0x03 +#define GR_CMBX_B 0x04 +#define GR_CMBX_CONSTANT_ALPHA 0x05 +#define GR_CMBX_CONSTANT_COLOR 0x06 +#define GR_CMBX_DETAIL_FACTOR 0x07 +#define GR_CMBX_ITALPHA 0x08 +#define GR_CMBX_ITRGB 0x09 +#define GR_CMBX_LOCAL_TEXTURE_ALPHA 0x0a +#define GR_CMBX_LOCAL_TEXTURE_RGB 0x0b +#define GR_CMBX_LOD_FRAC 0x0c +#define GR_CMBX_OTHER_TEXTURE_ALPHA 0x0d +#define GR_CMBX_OTHER_TEXTURE_RGB 0x0e +#define GR_CMBX_TEXTURE_RGB 0x0f +#define GR_CMBX_TMU_CALPHA 0x10 +#define GR_CMBX_TMU_CCOLOR 0x11 + +typedef FxU32 GrCombineMode_t; +#define GR_FUNC_MODE_ZERO 0x00 +#define GR_FUNC_MODE_X 0x01 +#define GR_FUNC_MODE_ONE_MINUS_X 0x02 +#define GR_FUNC_MODE_NEGATIVE_X 0x03 +#define GR_FUNC_MODE_X_MINUS_HALF 0x04 + +typedef FxU32 GrAlphaBlendOp_t; +#define GR_BLEND_OP_ADD 0x00 +#define GR_BLEND_OP_SUB 0x01 +#define GR_BLEND_OP_REVSUB 0x02 + +typedef struct +{ + FxU32 data[256]; +} +GuTexPalette; + +typedef void (*GrErrorCallbackFnc_t) (const char *string, FxBool fatal); + +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c:1.3 xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c:1.5 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c:1.3 Wed Dec 12 19:34:21 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c Mon Dec 16 11:19:00 2002 @@ -23,7 +23,7 @@ * 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.3 2001/12/13 00:34:21 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c,v 1.5 2002/12/16 16:19:00 dawes Exp $ */ /* * Original rewrite: @@ -34,11 +34,10 @@ * */ -#include "dri_glide.h" - #include "tdfx_context.h" #include "tdfx_lock.h" #include "tdfx_state.h" +#include "tdfx_render.h" #include "tdfx_texman.h" #include "tdfx_tris.h" @@ -50,16 +49,15 @@ __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); + unsigned int stamp = dPriv->lastStamp; drmGetLock( fxMesa->driFd, fxMesa->hHWContext, 0 ); /* This macro will update dPriv's cliprects if needed */ - XMESA_VALIDATE_DRAWABLE_INFO( cPriv->display, sPriv, dPriv ); + DRI_VALIDATE_DRAWABLE_INFO( cPriv->display, sPriv, dPriv ); if ( saPriv->fifoOwner != fxMesa->hHWContext ) { - fxMesa->Glide.grDRIImportFifo( saPriv->fifoPtr, saPriv->fifoRead ); + fxMesa->Glide.grDRIImportFifo( saPriv->fifoPtr, saPriv->fifoRead ); } if ( saPriv->ctxOwner != fxMesa->hHWContext ) { @@ -69,11 +67,11 @@ * that state onto the hardware when you set the state. */ void *state; - FxI32 size; - fxMesa->Glide.grGet( GR_GLIDE_STATE_SIZE, 4, &size ); - state = malloc( size ); - FX_grGlideGetState_NoLock( state ); - FX_grGlideSetState_NoLock( state ); + FxI32 stateSize; + fxMesa->Glide.grGet(GR_GLIDE_STATE_SIZE, 4, &stateSize); + state = malloc(stateSize); + fxMesa->Glide.grGlideGetState( state ); + fxMesa->Glide.grGlideSetState( state ); free( state ); } @@ -87,12 +85,6 @@ 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 xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h:1.2 xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h:1.2 Fri Aug 17 22:51:06 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h Fri Feb 22 16:45:03 2002 @@ -23,7 +23,7 @@ * 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.2 2001/08/18 02:51:06 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h,v 1.3 2002/02/22 21:45:03 dawes Exp $ */ /* * Original rewrite: Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.c Thu Feb 27 12:26:35 2003 @@ -1,177 +0,0 @@ -/* -*- 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 xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_pipeline.h Thu Feb 27 12:26:35 2003 @@ -1,54 +0,0 @@ -/* -*- 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 xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c:1.3 xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c:1.4 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c:1.3 Fri Aug 17 22:51:06 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c Fri Feb 22 16:45:03 2002 @@ -23,7 +23,7 @@ * 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.3 2001/08/18 02:51:06 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c,v 1.4 2002/02/22 21:45:03 dawes Exp $ */ /* * Original rewrite: @@ -38,13 +38,56 @@ #include "tdfx_context.h" #include "tdfx_dd.h" +#include "tdfx_lock.h" #include "tdfx_vb.h" -#include "tdfx_pipeline.h" #include "tdfx_pixels.h" #include "tdfx_render.h" +#include "swrast/swrast.h" + #include "image.h" + +#define FX_grLfbWriteRegion(fxMesa,dst_buffer,dst_x,dst_y,src_format,src_width,src_height,src_stride,src_data) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + fxMesa->Glide.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); \ + fxMesa->Glide.grLfbReadRegion(src_buffer,src_x,src_y,src_width,src_height,dst_stride,dst_data); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0); + + +static 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 = fxMesa->Glide.grLfbLock(type, buffer, writeMode, origin, pixelPipeline, info); + UNLOCK_HARDWARE(fxMesa); + return result; +} + + + +#define FX_grLfbUnlock(fxMesa, t, b) \ + do { \ + LOCK_HARDWARE(fxMesa); \ + fxMesa->Glide.grLfbUnlock(t, b); \ + UNLOCK_HARDWARE(fxMesa); \ + } while (0) + + + #if 0 /* test if window coord (px,py) is visible */ static GLboolean @@ -432,25 +475,26 @@ } #endif -GLboolean +void 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 */ + if (format != GL_RGB || + type != GL_UNSIGNED_SHORT_5_6_5 || + (ctx->_ImageTransferState & (IMAGE_SCALE_BIAS_BIT| + IMAGE_MAP_COLOR_BIT))) + { + _swrast_ReadPixels( ctx, x, y, width, height, format, type, packing, + dstImage ); + return; } { 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; @@ -460,9 +504,9 @@ LOCK_HARDWARE( fxMesa ); info.size = sizeof(info); if (fxMesa->Glide.grLfbLock(GR_LFB_READ_ONLY, - fxMesa->ReadBuffer, - GR_LFBWRITEMODE_ANY, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { + 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 @@ -472,45 +516,43 @@ 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; + /* 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; } fxMesa->Glide.grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->ReadBuffer); } UNLOCK_HARDWARE( fxMesa ); - return result; + return; } } -GLboolean +void 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 ((!(format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) && + !(format == GL_BGRA && type == GL_UNSIGNED_BYTE)) || + (ctx->_ImageTransferState & (IMAGE_SCALE_BIAS_BIT| + IMAGE_MAP_COLOR_BIT))) + { + _swrast_ReadPixels( ctx, x, y, width, height, format, type, packing, + dstImage ); + return; } - 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; @@ -520,9 +562,9 @@ LOCK_HARDWARE(fxMesa); info.size = sizeof(info); if (fxMesa->Glide.grLfbLock(GR_LFB_READ_ONLY, - fxMesa->ReadBuffer, - GR_LFBWRITEMODE_ANY, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) + 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); @@ -534,46 +576,53 @@ 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; } fxMesa->Glide.grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->ReadBuffer); } UNLOCK_HARDWARE(fxMesa); - return result; } } -GLboolean +void 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 */ - } + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - if (ctx->RasterMask & (~BLEND_BIT)) { - return GL_FALSE; /* can't do any raster ops, except blend */ + if ((!(format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8) && + !(format == GL_BGRA && type == GL_UNSIGNED_BYTE)) || + ctx->Pixel.ZoomX != 1.0F || + ctx->Pixel.ZoomY != 1.0F || + (ctx->_ImageTransferState & (IMAGE_SCALE_BIAS_BIT| + IMAGE_MAP_COLOR_BIT)) || + ctx->Color.AlphaEnabled || + ctx->Depth.Test || + ctx->Fog.Enabled || + ctx->Scissor.Enabled || + ctx->Stencil.Enabled || + !ctx->Color.ColorMask[0] || + !ctx->Color.ColorMask[1] || + !ctx->Color.ColorMask[2] || + !ctx->Color.ColorMask[3] || + ctx->Color.ColorLogicOpEnabled || + ctx->Texture._ReallyEnabled || + ctx->Depth.OcclusionTest || + fxMesa->Fallback) + { + _swrast_DrawPixels( ctx, x, y, width, height, format, type, + unpack, pixels ); + return; } { @@ -590,7 +639,7 @@ LOCK_HARDWARE(fxMesa); /* make sure hardware has latest blend funcs */ - if (ctx->RasterMask & BLEND_BIT) { + if (ctx->Color.BlendEnabled) { fxMesa->dirty |= TDFX_UPLOAD_BLEND_FUNC; tdfxEmitHwStateLocked( fxMesa ); } @@ -599,15 +648,17 @@ if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) { if (!inClipRects_Region(fxMesa, scrX, scrY, width, height)) { UNLOCK_HARDWARE(fxMesa); - return GL_FALSE; + _swrast_DrawPixels( ctx, x, y, width, height, format, type, + unpack, pixels ); + return; } } info.size = sizeof(info); if (fxMesa->Glide.grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->DrawBuffer, - GR_LFBWRITEMODE_8888, - GR_ORIGIN_UPPER_LEFT, FXTRUE, &info)) + 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); @@ -633,6 +684,5 @@ fxMesa->Glide.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 xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.h:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.h Fri Feb 22 16:45:03 2002 @@ -23,7 +23,7 @@ * 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 $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.h,v 1.2 2002/02/22 21:45:03 dawes Exp $ */ /* * Original rewrite: @@ -43,33 +43,33 @@ #include "context.h" -extern GLboolean +extern void tdfx_bitmap_R5G6B5( GLcontext *ctx, GLint px, GLint py, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap ); -extern GLboolean +extern void tdfx_bitmap_R8G8B8A8( GLcontext *ctx, GLint px, GLint py, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap ); -extern GLboolean +extern void 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 +extern void 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 +extern void tdfx_drawpixels_R8G8B8A8( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c:1.3 xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c:1.4 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c:1.3 Tue Oct 2 07:44:13 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c Fri Feb 22 16:45:03 2002 @@ -23,7 +23,7 @@ * 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.3 2001/10/02 11:44:13 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c,v 1.4 2002/02/22 21:45:03 dawes Exp $ */ /* * Original rewrite: @@ -35,92 +35,23 @@ * */ -#include "dri_glide.h" #include "tdfx_context.h" #include "tdfx_render.h" #include "tdfx_state.h" #include "tdfx_texman.h" +#include "swrast/swrast.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 ) +static void tdfxDDClear( GLcontext *ctx, + GLbitfield mask, GLboolean all, + GLint x, GLint y, GLint width, GLint height ) { tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; - const GLuint stencil_size = fxMesa->haveHwStencil ? fxMesa->glVis->StencilBits : 0; - GLbitfield softwareMask = 0; + GLbitfield softwareMask = mask & (DD_ACCUM_BIT); + const GLuint stencil_size = + fxMesa->haveHwStencil ? fxMesa->glCtx->Visual.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 ) { - fxMesa->Glide.grStencilMask( fxMesa->Stencil.WriteMask ); - /* set stencil ref value = desired clear value */ - fxMesa->Glide.grStencilFunc( GR_CMP_ALWAYS, fxMesa->Stencil.Clear, 0xff ); - fxMesa->Glide.grStencilOp( GR_STENCILOP_REPLACE, - GR_STENCILOP_REPLACE, - GR_STENCILOP_REPLACE ); - fxMesa->Glide.grEnable( GR_STENCIL_MODE_EXT ); - - if ( ctx->Stencil.Enabled ) { - fxMesa->Glide.grStencilOp( fxMesa->Stencil.FailFunc, - fxMesa->Stencil.ZFailFunc, - fxMesa->Stencil.ZPassFunc ); - fxMesa->Glide.grStencilMask( fxMesa->Stencil.WriteMask ); - fxMesa->Glide.grStencilFunc( fxMesa->Stencil.Function, - fxMesa->Stencil.RefValue, - fxMesa->Stencil.ValueMask ); - fxMesa->Glide.grEnable_NoLock( GR_STENCIL_MODE_EXT ); - } else { - fxMesa->Glide.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 ); @@ -133,10 +64,7 @@ } /* we can't clear accum buffers */ - if (mask & DD_ACCUM_BIT) { - mask &= ~(DD_ACCUM_BIT); - softwareMask |= DD_ACCUM_BIT; - } + mask &= ~(DD_ACCUM_BIT); if (mask & DD_STENCIL_BIT) { if (!fxMesa->haveHwStencil || ctx->Stencil.WriteMask != 0xff) { @@ -147,10 +75,10 @@ } } - if (fxMesa->glVis->RedBits != 8) { + if (fxMesa->glCtx->Visual.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])) { + 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); } @@ -166,7 +94,8 @@ if (mask & DD_STENCIL_BIT) { fxMesa->Glide.grStencilMask(/*ctx->Stencil.WriteMask*/ 0xff); /* set stencil ref value = desired clear value */ - fxMesa->Glide.grStencilFunc(GR_CMP_ALWAYS, ctx->Stencil.Clear, 0xff); + fxMesa->Glide.grStencilFunc(GR_CMP_ALWAYS, + ctx->Stencil.Clear, 0xff); fxMesa->Glide.grStencilOp(GR_STENCILOP_REPLACE, GR_STENCILOP_REPLACE, GR_STENCILOP_REPLACE); fxMesa->Glide.grEnable(GR_STENCIL_MODE_EXT); @@ -178,7 +107,8 @@ } /* - * FIXME: This is just plain ugly... + * This may be ugly, but it's needed in order to work around a number + * of Glide bugs. */ BEGIN_CLIP_LOOP(fxMesa); { @@ -277,8 +207,7 @@ case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT: /* front and back */ fxMesa->Glide.grDepthMask(FXFALSE); - fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); - FX_grColorMaskv_NoLock(ctx, true4); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); if (stencil_size > 0) fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -288,7 +217,7 @@ fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear); - fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); if (stencil_size > 0) fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -306,7 +235,6 @@ /* clear front */ fxMesa->Glide.grDepthMask(FXFALSE); fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); - FX_grColorMaskv_NoLock(ctx, true4); if (stencil_size > 0) fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, @@ -319,7 +247,7 @@ /* clear back and depth */ fxMesa->Glide.grDepthMask(FXTRUE); fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); - if (stencil_size > 0) + if (stencil_size > 0) fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, fxMesa->Color.ClearAlpha, fxMesa->Depth.Clear, @@ -381,8 +309,8 @@ fxMesa->dirty |= TDFX_UPLOAD_STENCIL; } -#endif - return softwareMask; + if (softwareMask) + _swrast_Clear( ctx, softwareMask, all, x, y, width, height ); } @@ -409,8 +337,8 @@ UNLOCK_HARDWARE( fxMesa ); } - +#if 0 static const char *texSource(int k) { switch (k) { @@ -454,7 +382,9 @@ return ""; } } +#endif +#if 0 static const char *texMode(int k) { switch (k) { @@ -472,11 +402,14 @@ return ""; } } +#endif +#if 0 static const char *texInvert(int k) { return k ? "FXTRUE" : "FXFALSE"; } +#endif static void uploadTextureEnv( tdfxContextPtr fxMesa ) { @@ -530,7 +463,7 @@ fxMesa->TexCombineExt[unit].Alpha.Shift, fxMesa->TexCombineExt[unit].Alpha.Invert); fxMesa->Glide.grConstantColorValueExt(TDFX_TMU0 + unit, - fxMesa->TexCombineExt[unit].EnvColor); + fxMesa->TexCombineExt[unit].EnvColor); } } else { @@ -598,13 +531,16 @@ { 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; + 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].Current2D; + tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj); + if (ti && ti->reloadImages && ti->whichTMU != TDFX_TMU_NONE) { + /* + printf("download texture image on unit %d\n", unit); + */ + tdfxTMDownloadTexture(fxMesa, tObj); + ti->reloadImages = GL_FALSE; } } } @@ -631,9 +567,9 @@ } else if (fxMesa->numClipRects == 1) { fxMesa->Glide.grClipWindow(fxMesa->pClipRects[0].x1, - fxMesa->screen_height - fxMesa->pClipRects[0].y2, - fxMesa->pClipRects[0].x2, - fxMesa->screen_height - fxMesa->pClipRects[0].y1); + 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 */ @@ -650,23 +586,23 @@ if ( fxMesa->dirty & TDFX_UPLOAD_COLOR_COMBINE ) { if (TDFX_IS_NAPALM(fxMesa)) { fxMesa->Glide.grColorCombineExt(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); + 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 */ - fxMesa->Glide.grColorCombine(fxMesa->ColorCombine.Function, - fxMesa->ColorCombine.Factor, - fxMesa->ColorCombine.Local, - fxMesa->ColorCombine.Other, - fxMesa->ColorCombine.Invert); + fxMesa->Glide.grColorCombine( fxMesa->ColorCombine.Function, + fxMesa->ColorCombine.Factor, + fxMesa->ColorCombine.Local, + fxMesa->ColorCombine.Other, + fxMesa->ColorCombine.Invert ); } fxMesa->dirty &= ~TDFX_UPLOAD_COLOR_COMBINE; } @@ -699,13 +635,11 @@ fxMesa->dirty &= ~TDFX_UPLOAD_RENDER_BUFFER; } -#if defined(__linux__) || defined(__FreeBSD__) if ( fxMesa->dirty & TDFX_UPLOAD_STIPPLE) { fxMesa->Glide.grStipplePattern( fxMesa->Stipple.Pattern ); fxMesa->Glide.grStippleMode( fxMesa->Stipple.Mode ); fxMesa->dirty &= ~TDFX_UPLOAD_STIPPLE; } -#endif /* __linux__ || __FreeBSD__ */ if ( fxMesa->dirty & TDFX_UPLOAD_ALPHA_TEST ) { fxMesa->Glide.grAlphaTestFunction( fxMesa->Color.AlphaFunc ); @@ -779,7 +713,7 @@ if ( fxMesa->dirty & TDFX_UPLOAD_COLOR_MASK ) { if ( fxMesa->Glide.grColorMaskExt - && fxMesa->glCtx->Visual->RedBits == 8) { + && fxMesa->glCtx->Visual.redBits == 8) { fxMesa->Glide.grColorMaskExt( fxMesa->Color.ColorMask[RCOMP], fxMesa->Color.ColorMask[GCOMP], fxMesa->Color.ColorMask[BCOMP], @@ -793,10 +727,10 @@ fxMesa->dirty &= ~TDFX_UPLOAD_COLOR_MASK; } - if ( fxMesa->dirty & TDFX_UPLOAD_CONSTANT_COLOR ) { - fxMesa->Glide.grConstantColorValue( fxMesa->Color.MonoColor ); - fxMesa->dirty &= ~TDFX_UPLOAD_CONSTANT_COLOR; - } +/* 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) Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c:1.2 Fri Aug 17 22:51:07 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c Fri Feb 22 16:45:03 2002 @@ -23,7 +23,7 @@ * 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.2 2001/08/18 02:51:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c,v 1.3 2002/02/22 21:45:03 dawes Exp $ */ /* * Original rewrite: @@ -38,9 +38,9 @@ #include "tdfx_dri.h" #include "tdfx_context.h" +#include "tdfx_lock.h" #include "tdfx_vb.h" #include "tdfx_tris.h" -#include "tdfx_pipeline.h" #ifdef DEBUG_LOCKING @@ -48,8 +48,22 @@ int prevLockLine = 0; #endif +#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 */ + ); +#endif + + -GLboolean tdfxCreateScreen( __DRIscreenPrivate *sPriv ) +static GLboolean +tdfxCreateScreen( __DRIscreenPrivate *sPriv ) { tdfxScreenPrivate *fxScreen; TDFXDRIPtr fxDRIPriv = (TDFXDRIPtr) sPriv->pDevPriv; @@ -84,17 +98,12 @@ return GL_FALSE; } - tdfxDDSetupInit(); - tdfxDDTriangleFuncsInit(); - tdfxDDFastPathInit(); - - /*** - tdfxDDGlideExtensionsInit(); - **/ return GL_TRUE; } -void tdfxDestroyScreen( __DRIscreenPrivate *sPriv ) + +static void +tdfxDestroyScreen( __DRIscreenPrivate *sPriv ) { tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private; @@ -104,4 +113,259 @@ Xfree( fxScreen ); sPriv->private = NULL; } +} + + +static GLboolean +tdfxInitDriver( __DRIscreenPrivate *sPriv ) +{ + int major, minor, patch; + + 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 ) { + __driUtilMessage( + "3dfx DRI driver expected DRI version 4.0.x " + "but got version %d.%d.%d", + major, minor, patch ); + return GL_FALSE; + } + } + + /* Check that the DDX driver version is compatible */ + if ( sPriv->ddxMajor != 1 || + sPriv->ddxMinor < 0 ) { + __driUtilMessage( + "3dfx DRI driver expected DDX driver version 1.0.x " + "but got version %d.%d.%d", + sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch ); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if ( sPriv->drmMajor != 1 || + sPriv->drmMinor < 0 ) { + __driUtilMessage( + "3dfx DRI driver expected DRM driver version 1.0.x " + "but got version %d.%d.%d", + sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + return GL_FALSE; + } + + if ( !tdfxCreateScreen( sPriv ) ) { + tdfxDestroyScreen( sPriv ); + return GL_FALSE; + } + + return GL_TRUE; +} + + +static GLboolean +tdfxCreateBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + const __GLcontextModes *mesaVis, + GLboolean isPixmap ) +{ + if (isPixmap) { + return GL_FALSE; /* not implemented */ + } + else { + driDrawPriv->driverPrivate = (void *) + _mesa_create_framebuffer( mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->stencilBits > 0, + mesaVis->accumRedBits > 0, + GL_FALSE /* software alpha channel? */ ); + return (driDrawPriv->driverPrivate != NULL); + } +} + + +static void +tdfxDestroyBuffer(__DRIdrawablePrivate *driDrawPriv) +{ + _mesa_destroy_framebuffer((GLframebuffer *) (driDrawPriv->driverPrivate)); +} + + +static void +tdfxSwapBuffers(Display *dpy, void *drawablePrivate) +{ + __DRIdrawablePrivate *driDrawPriv = (__DRIdrawablePrivate*) drawablePrivate; + GET_CURRENT_CONTEXT(ctx); + tdfxContextPtr fxMesa = 0; + GLframebuffer *mesaBuffer; + + if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { + fprintf( stderr, "%s( %p )\n", __FUNCTION__, driDrawPriv ); + } + + mesaBuffer = (GLframebuffer *) driDrawPriv->driverPrivate; + if ( !mesaBuffer->Visual.doubleBufferMode ) + 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 */ + _mesa_swapbuffers( ctx ); + LOCK_HARDWARE( fxMesa ); + } + else { + /* find the fxMesa context previously bound to the window */ + fxMesa = (tdfxContextPtr) driDrawPriv->driContextPriv->driverPrivate; + if (!fxMesa) + return; + LOCK_HARDWARE( fxMesa ); + fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); + printf("SwapBuf SetState 1\n"); + fxMesa->Glide.grGlideSetState(fxMesa->Glide.State ); + } + } + +#ifdef STATS + { + int stalls; + static int prevStalls = 0; + + stalls = fxMesa->Glide.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 */ + fxMesa->Glide.grDRIPosition( driDrawPriv->x, driDrawPriv->y, + driDrawPriv->w, driDrawPriv->h, + driDrawPriv->numClipRects, + driDrawPriv->pClipRects ); + } + + fxMesa->Glide.grDRIBufferSwap( fxMesa->Glide.SwapInterval ); + + if (fxMesa->scissoredClipRects) { + /* restore clip rects WITH scissor box */ + fxMesa->Glide.grDRIPosition( driDrawPriv->x, driDrawPriv->y, + driDrawPriv->w, driDrawPriv->h, + fxMesa->numClipRects, fxMesa->pClipRects ); + } + + +#if 0 + { + FxI32 result; + do { + FxI32 result; + fxMesa->Glide.grGet(GR_PENDING_BUFFERSWAPS, 4, &result); + } while ( result > fxMesa->maxPendingSwapBuffers ); + } +#endif + + fxMesa->stats.swapBuffer++; + + if (ctx) { + if (ctx->DriverCtx != fxMesa) { + fxMesa = TDFX_CONTEXT(ctx); + fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); + printf("SwapBuf SetState 2\n"); + fxMesa->Glide.grGlideSetState(fxMesa->Glide.State ); + } + UNLOCK_HARDWARE( fxMesa ); + } +} + + + +/* 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 ) +{ +#if 0 + /* 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 +} + +static GLboolean +tdfxOpenFullScreen(__DRIcontextPrivate *driContextPriv) +{ +#if 0 /* When new glide3 calls exist */ + fprintf(stderr,"***** XMesaOpenFullScreen *****\n"); + return((GLboolean)grDRISetupFullScreen(GL_TRUE)); +#else + return GL_TRUE; +#endif +} + + +static GLboolean +tdfxCloseFullScreen(__DRIcontextPrivate *driContextPriv) +{ +#if 0 /* When new glide3 calls exist */ + fprintf(stderr,"***** XMesaCloseFullScreen *****\n"); + return((GLboolean)grDRISetupFullScreen(GL_FALSE)); +#else + return GL_TRUE; +#endif +} + + + +static struct __DriverAPIRec tdfxAPI = { + tdfxInitDriver, + tdfxDestroyScreen, + tdfxCreateContext, + tdfxDestroyContext, + tdfxCreateBuffer, + tdfxDestroyBuffer, + tdfxSwapBuffers, + tdfxMakeCurrent, + tdfxUnbindContext, + tdfxOpenFullScreen, + tdfxCloseFullScreen +}; + + +/* + * This is the bootstrap function for the driver. + * The __driCreateScreen name is the symbol that libGL.so fetches. + * Return: pointer to a __DRIscreenPrivate. + */ +void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc, + int numConfigs, __GLXvisualConfig *config) +{ + __DRIscreenPrivate *psp; + psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &tdfxAPI); + return (void *) psp; } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h Fri Feb 22 16:45:03 2002 @@ -23,7 +23,7 @@ * 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 $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.h,v 1.2 2002/02/22 21:45:03 dawes Exp $ */ /* * Original rewrite: @@ -39,8 +39,6 @@ #ifdef GLX_DIRECT_RENDERING -#include "dri_mesaint.h" - typedef struct { drmHandle handle; drmSize size; @@ -70,9 +68,6 @@ 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 xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c:1.3 xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c:1.7 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c:1.3 Fri Aug 17 22:51:07 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c Wed Oct 30 07:52:00 2002 @@ -23,7 +23,7 @@ * 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.3 2001/08/18 02:51:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c,v 1.7 2002/10/30 12:52:00 alanh Exp $ */ /* * Original rewrite: @@ -32,13 +32,15 @@ * Authors: * Gareth Hughes * Brian Paul - * Keith Whitwell + * Keith Whitwell * */ #include "tdfx_context.h" +#include "tdfx_lock.h" #include "tdfx_span.h" #include "tdfx_render.h" +#include "swrast/swrast.h" #define DBG 0 @@ -58,8 +60,6 @@ (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 ) @@ -83,8 +83,9 @@ UNLOCK_HARDWARE( fxMesa ); \ LOCK_HARDWARE( fxMesa ); \ info.size = sizeof(GrLfbInfo_t); \ - if ( fxMesa->Glide.grLfbLock( GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer, \ - LFB_MODE, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ + if ( fxMesa->Glide.grLfbLock( GR_LFB_WRITE_ONLY, \ + fxMesa->DrawBuffer, LFB_MODE, \ + GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ { #define HW_WRITE_UNLOCK() \ @@ -100,7 +101,7 @@ LOCK_HARDWARE( fxMesa ); \ info.size = sizeof(GrLfbInfo_t); \ if ( fxMesa->Glide.grLfbLock( GR_LFB_READ_ONLY, fxMesa->ReadBuffer, \ - LFB_MODE, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ + LFB_MODE, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ { #define HW_READ_UNLOCK() \ @@ -140,6 +141,11 @@ /* 16 bit, RGB565 color spanline and pixel functions */ \ +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = TDFXPACKCOLOR565( color[0], color[1], color[2] ) + + #define WRITE_RGBA( _x, _y, r, g, b, a ) \ *(GLushort *)(buf + _x*2 + _y*pitch) = ((((int)r & 0xf8) << 8) | \ (((int)g & 0xfc) << 3) | \ @@ -195,6 +201,10 @@ /* 24 bit, RGB888 color spanline and pixel functions */ +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = TDFXPACKCOLOR888( color[0], color[1], color[2] ) + #define WRITE_RGBA( _x, _y, r, g, b, a ) \ *(GLuint *)(buf + _x*3 + _y*pitch) = ((b << 0) | \ (g << 8) | \ @@ -223,6 +233,10 @@ /* 32 bit, ARGB8888 color spanline and pixel functions */ +#undef INIT_MONO_PIXEL +#define INIT_MONO_PIXEL(p, color) \ + p = TDFXPACKCOLOR8888( color[0], color[1], color[2], color[3] ) + #define WRITE_RGBA( _x, _y, r, g, b, a ) \ *(GLuint *)(buf + _x*4 + _y*pitch) = ((b << 0) | \ (g << 8) | \ @@ -557,10 +571,6 @@ * it's better in the macro or in the call. * * Recall that x and y are screen coordinates. - * - * Note: ANSI C doesn't allow conditional expressions or cast expressions - * as lvalues. Some of these macros violate that. - * */ #define GET_FB_DATA(ReadParamsp, type, x, y) \ (((x) < (ReadParamsp)->firstWrappedX) \ @@ -592,8 +602,8 @@ { 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; + GLuint depth_size = fxMesa->glCtx->Visual.depthBits; + GLuint stencil_size = fxMesa->glCtx->Visual.stencilBits; GrLfbInfo_t info; GLubyte visMask[MAX_WIDTH]; @@ -828,7 +838,7 @@ tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; GLint bottom = fxMesa->height + fxMesa->y_offset - 1; GLuint i; - GLuint depth_size = fxMesa->glVis->DepthBits; + GLuint depth_size = fxMesa->glCtx->Visual.depthBits; GrLfbInfo_t info; if (MESA_VERBOSE & VERBOSE_DRIVER) { @@ -883,7 +893,7 @@ LFBParameters ReadParams; GrLfbInfo_t backBufferInfo; int wrappedPartStart; - GLuint stencil_size = fxMesa->glVis->StencilBits; + GLuint stencil_size = fxMesa->glCtx->Visual.stencilBits; GetBackBufferInfo(fxMesa, &backBufferInfo); /* * Note that the _LOCK macro adds a curly brace, @@ -934,8 +944,8 @@ GLuint i; GLushort d16; GLuint d32; - GLuint depth_size = fxMesa->glVis->DepthBits; - GLuint stencil_size = fxMesa->glVis->StencilBits; + GLuint depth_size = fxMesa->glCtx->Visual.depthBits; + GLuint stencil_size = fxMesa->glCtx->Visual.stencilBits; GrLfbInfo_t info; int xpos; int ypos; @@ -1013,7 +1023,7 @@ tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; GLint bottom = fxMesa->height + fxMesa->y_offset - 1; GLuint i; - GLuint depth_size = fxMesa->glVis->DepthBits; + GLuint depth_size = fxMesa->glCtx->Visual.depthBits; GLushort d16; int xpos; int ypos; @@ -1058,7 +1068,7 @@ * and the UNLOCK macro removes it. */ READ_FB_SPAN_LOCK(fxMesa, info, GR_BUFFER_AUXBUFFER); - stencil_size = fxMesa->glVis->StencilBits; + stencil_size = fxMesa->glCtx->Visual.stencilBits; { LFBParameters ReadParams; GetFbParams(fxMesa, &info, &backBufferInfo, @@ -1270,47 +1280,96 @@ } #define VISUAL_EQUALS_RGBA(vis, r, g, b, a) \ - ((vis->RedBits == r) && \ - (vis->GreenBits == g) && \ - (vis->BlueBits == b) && \ - (vis->AlphaBits == a)) + ((vis.redBits == r) && \ + (vis.greenBits == g) && \ + (vis.blueBits == b) && \ + (vis.alphaBits == a)) + + + +/**********************************************************************/ +/* Locking for swrast */ +/**********************************************************************/ + + +static void tdfxSpanRenderStart( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + LOCK_HARDWARE(fxMesa); +} + +static void tdfxSpanRenderFinish( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + _swrast_flush( ctx ); + UNLOCK_HARDWARE(fxMesa); +} + +/* Set the buffer used for reading */ +static void tdfxDDSetReadBuffer( GLcontext *ctx, + GLframebuffer *buffer, GLenum mode ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + (void) buffer; + + switch ( mode ) { + case GL_FRONT_LEFT: + fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER; + break; + + case GL_BACK_LEFT: + fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER; + break; + + default: + break; + } +} + +/**********************************************************************/ +/* Initialize swrast device driver */ +/**********************************************************************/ + void tdfxDDInitSpanFuncs( GLcontext *ctx ) { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx ); + swdd->SetReadBuffer = tdfxDDSetReadBuffer; + 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; + swdd->WriteRGBASpan = tdfxWriteRGBASpan_RGB565; + swdd->WriteRGBSpan = tdfxWriteRGBSpan_RGB565; + swdd->WriteMonoRGBASpan = tdfxWriteMonoRGBASpan_RGB565; + swdd->WriteRGBAPixels = tdfxWriteRGBAPixels_RGB565; + swdd->WriteMonoRGBAPixels = tdfxWriteMonoRGBAPixels_RGB565; + swdd->ReadRGBASpan = tdfxReadRGBASpan_RGB565; + swdd->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; + swdd->WriteRGBASpan = tdfxWriteRGBASpan_RGB888; + swdd->WriteRGBSpan = tdfxWriteRGBSpan_RGB888; + swdd->WriteMonoRGBASpan = tdfxWriteMonoRGBASpan_RGB888; + swdd->WriteRGBAPixels = tdfxWriteRGBAPixels_RGB888; + swdd->WriteMonoRGBAPixels = tdfxWriteMonoRGBAPixels_RGB888; + swdd->ReadRGBASpan = tdfxReadRGBASpan_RGB888; + swdd->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; + swdd->WriteRGBASpan = tdfxWriteRGBASpan_ARGB8888; + swdd->WriteRGBSpan = tdfxWriteRGBSpan_ARGB8888; + swdd->WriteMonoRGBASpan = tdfxWriteMonoRGBASpan_ARGB8888; + swdd->WriteRGBAPixels = tdfxWriteRGBAPixels_ARGB8888; + swdd->WriteMonoRGBAPixels = tdfxWriteMonoRGBAPixels_ARGB8888; + swdd->ReadRGBAPixels = tdfxReadRGBAPixels_ARGB8888; + swdd->ReadRGBASpan = tdfxReadRGBASpan_ARGB8888; } else { @@ -1318,22 +1377,25 @@ } 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; + swdd->WriteStencilSpan = write_stencil_span; + swdd->ReadStencilSpan = read_stencil_span; + swdd->WriteStencilPixels = write_stencil_pixels; + swdd->ReadStencilPixels = read_stencil_pixels; + } + + swdd->WriteDepthSpan = tdfxDDWriteDepthSpan; + swdd->WriteDepthPixels = tdfxDDWriteDepthPixels; + swdd->ReadDepthSpan = tdfxDDReadDepthSpan; + swdd->ReadDepthPixels = tdfxDDReadDepthPixels; + + swdd->WriteCI8Span = NULL; + swdd->WriteCI32Span = NULL; + swdd->WriteMonoCISpan = NULL; + swdd->WriteCI32Pixels = NULL; + swdd->WriteMonoCIPixels = NULL; + swdd->ReadCI32Span = NULL; + swdd->ReadCI32Pixels = NULL; + + swdd->SpanRenderStart = tdfxSpanRenderStart; + swdd->SpanRenderFinish = tdfxSpanRenderFinish; } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c:1.4 xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c:1.7 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c:1.4 Tue Oct 2 07:44:13 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c Wed Oct 30 07:52:00 2002 @@ -23,7 +23,7 @@ * 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.4 2001/10/02 11:44:13 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c,v 1.7 2002/10/30 12:52:00 alanh Exp $ */ /* * Original rewrite: @@ -32,19 +32,26 @@ * Authors: * Gareth Hughes * Brian Paul + * Keith Whitwell (port to 3.5) * */ -#include "types.h" -#include "pb.h" +#include "mtypes.h" +#include "texformat.h" +#include "texstore.h" + +#include "swrast/swrast.h" +#include "array_cache/acache.h" +#include "tnl/tnl.h" +#include "tnl/t_pipeline.h" +#include "swrast_setup/swrast_setup.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_texstate.h" #include "tdfx_tris.h" #include "tdfx_render.h" @@ -60,7 +67,6 @@ 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__ ); @@ -120,13 +126,13 @@ srcRGB = GR_BLEND_ONE_MINUS_SRC_ALPHA; break; case GL_DST_ALPHA: - srcRGB = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + srcRGB = GR_BLEND_DST_ALPHA; break; case GL_ONE_MINUS_DST_ALPHA: - srcRGB = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + srcRGB = GR_BLEND_ONE_MINUS_DST_ALPHA; break; case GL_SRC_ALPHA_SATURATE: - srcRGB = hasAlpha ? GR_BLEND_ALPHA_SATURATE : GR_BLEND_ZERO; + srcRGB = GR_BLEND_ALPHA_SATURATE; break; default: srcRGB = GR_BLEND_ONE; @@ -139,23 +145,23 @@ case GL_ONE: srcA = GR_BLEND_ONE; break; - case GL_DST_COLOR: /* Napalm only */ - srcA = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + case GL_DST_COLOR: + srcA = GR_BLEND_DST_ALPHA; /* Napalm only */ break; - case GL_ONE_MINUS_DST_COLOR: /* Napalm only */ - srcA = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + case GL_ONE_MINUS_DST_COLOR: + srcA = GR_BLEND_ONE_MINUS_DST_ALPHA; /* Napalm only */ break; - case GL_SRC_ALPHA: /* Napalm only */ - srcA = GR_BLEND_SRC_ALPHA; + case GL_SRC_ALPHA: + srcA = GR_BLEND_SRC_ALPHA; /* Napalm only */ break; - case GL_ONE_MINUS_SRC_ALPHA: /* Napalm only */ - srcA = GR_BLEND_ONE_MINUS_SRC_ALPHA; + case GL_ONE_MINUS_SRC_ALPHA: + srcA = GR_BLEND_ONE_MINUS_SRC_ALPHA; /* Napalm only */ break; - case GL_DST_ALPHA: /* Napalm only */ - srcA = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + case GL_DST_ALPHA: + srcA = GR_BLEND_DST_ALPHA; /* Napalm only */ break; - case GL_ONE_MINUS_DST_ALPHA: /* Napalm only */ - srcA = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + case GL_ONE_MINUS_DST_ALPHA: + srcA = GR_BLEND_ONE_MINUS_DST_ALPHA; /* Napalm only */ break; case GL_SRC_ALPHA_SATURATE: srcA = GR_BLEND_ONE; @@ -184,10 +190,10 @@ dstRGB = GR_BLEND_ONE_MINUS_SRC_ALPHA; break; case GL_DST_ALPHA: - dstRGB = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + dstRGB = GR_BLEND_DST_ALPHA; break; case GL_ONE_MINUS_DST_ALPHA: - dstRGB = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + dstRGB = GR_BLEND_ONE_MINUS_DST_ALPHA; break; default: dstRGB = GR_BLEND_ZERO; @@ -200,23 +206,23 @@ case GL_ONE: dstA = GR_BLEND_ONE; break; - case GL_SRC_COLOR: /* Napalm only */ - dstA = GR_BLEND_SRC_ALPHA; + case GL_SRC_COLOR: + dstA = GR_BLEND_SRC_ALPHA; /* Napalm only */ break; - case GL_ONE_MINUS_SRC_COLOR: /* Napalm only */ - dstA = GR_BLEND_ONE_MINUS_SRC_ALPHA; + case GL_ONE_MINUS_SRC_COLOR: + dstA = GR_BLEND_ONE_MINUS_SRC_ALPHA; /* Napalm only */ break; - case GL_SRC_ALPHA: /* Napalm only */ - dstA = GR_BLEND_SRC_ALPHA; + case GL_SRC_ALPHA: + dstA = GR_BLEND_SRC_ALPHA; /* Napalm only */ break; - case GL_ONE_MINUS_SRC_ALPHA: /* Napalm only */ - dstA = GR_BLEND_ONE_MINUS_SRC_ALPHA; + case GL_ONE_MINUS_SRC_ALPHA: + dstA = GR_BLEND_ONE_MINUS_SRC_ALPHA; /* Napalm only */ break; - case GL_DST_ALPHA: /* Napalm only */ - dstA = hasAlpha ? GR_BLEND_DST_ALPHA : GR_BLEND_ONE; + case GL_DST_ALPHA: + dstA = GR_BLEND_DST_ALPHA; /* Napalm only */ break; - case GL_ONE_MINUS_DST_ALPHA: /* Napalm only */ - dstA = hasAlpha ? GR_BLEND_ONE_MINUS_DST_ALPHA : GR_BLEND_ZERO; + case GL_ONE_MINUS_DST_ALPHA: + dstA = GR_BLEND_ONE_MINUS_DST_ALPHA; /* Napalm only */ break; default: dstA = GR_BLEND_ZERO; @@ -251,7 +257,7 @@ } } -static void tdfxDDAlphaFunc( GLcontext *ctx, GLenum func, GLclampf ref ) +static void tdfxDDAlphaFunc( GLcontext *ctx, GLenum func, GLchan ref ) { tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); @@ -265,11 +271,6 @@ 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 ) @@ -300,7 +301,7 @@ * Stipple */ -static void tdfxUpdateStipple( GLcontext *ctx ) +void tdfxUpdateStipple( GLcontext *ctx ) { tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); GrStippleMode_t mode = GR_STIPPLE_DISABLE; @@ -333,10 +334,10 @@ FxI32 bias; FxBool mask; - if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) fprintf( stderr, "%s()\n", __FUNCTION__ ); - } + bias = (FxI32) (ctx->Polygon.OffsetUnits * TDFX_DEPTH_BIAS_SCALE); if ( ctx->Depth.Test ) { @@ -381,7 +382,7 @@ mask = FXFALSE; /* zbuffer is not touched */ } - fxMesa->Depth.Clear = (FxU32) (((1 << fxMesa->glVis->DepthBits) - 1) + fxMesa->Depth.Clear = (FxU32) (((1 << fxMesa->glCtx->Visual.depthBits) - 1) * ctx->Depth.Clear); if ( fxMesa->Depth.Bias != bias ) { @@ -451,7 +452,7 @@ case GL_DECR_WRAP_EXT: return GR_STENCILOP_DECR_WRAP; default: - gl_problem( NULL, "bad stencil op in convertGLStencilOp" ); + _mesa_problem( NULL, "bad stencil op in convertGLStencilOp" ); } return GR_STENCILOP_KEEP; /* never get, silence compiler warning */ } @@ -547,14 +548,14 @@ { switch( ctx->Fog.Mode ) { case GL_EXP: - fxMesa->Glide.guFogGenerateExp(fxMesa->Fog.Table, ctx->Fog.Density); + fxMesa->Glide.guFogGenerateExp( fxMesa->Fog.Table, ctx->Fog.Density ); break; case GL_EXP2: - fxMesa->Glide.guFogGenerateExp2(fxMesa->Fog.Table, ctx->Fog.Density); + fxMesa->Glide.guFogGenerateExp2( fxMesa->Fog.Table, ctx->Fog.Density); break; case GL_LINEAR: - fxMesa->Glide.guFogGenerateLinear(fxMesa->Fog.Table, - ctx->Fog.Start, ctx->Fog.End); + fxMesa->Glide.guFogGenerateLinear( fxMesa->Fog.Table, + ctx->Fog.Start, ctx->Fog.End ); break; } @@ -619,6 +620,7 @@ fxMesa->height = dPriv->h; fxMesa->y_delta = fxMesa->screen_height - fxMesa->y_offset - fxMesa->height; + tdfxUpdateViewport( ctx ); } if (fxMesa->scissoredClipRects && fxMesa->pClipRects) { @@ -678,18 +680,15 @@ * Culling */ -static void tdfxUpdateCull( GLcontext *ctx ) +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) ) { + /* KW: don't need to check raster_primitive here as we don't + * attempt to draw lines or points with triangles. + */ + if ( ctx->Polygon.CullFlag ) { switch ( ctx->Polygon.CullFaceMode ) { case GL_FRONT: if ( ctx->Polygon.FrontFace == GL_CCW ) { @@ -708,8 +707,11 @@ break; case GL_FRONT_AND_BACK: + /* Handled as a fallback on triangles in tdfx_tris.c */ + return; + default: - mode = GR_CULL_DISABLE; + ASSERT(0); break; } } @@ -762,32 +764,13 @@ } - /* ============================================================= * 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 ) +static void tdfxDDColorMask( GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a ) { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); @@ -803,48 +786,22 @@ fxMesa->Color.ColorMask[ACOMP] = a; fxMesa->dirty |= TDFX_UPLOAD_COLOR_MASK; - if (ctx->Visual->RedBits < 8) { + 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; - } + FALLBACK( fxMesa, TDFX_FALLBACK_COLORMASK, (r != g || g != b) ); } } - - 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 ) + const GLchan color[4] ) { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - FLUSH_BATCH( fxMesa ); - - fxMesa->Color.ClearColor = TDFXPACKCOLOR888( red, green, blue ); - fxMesa->Color.ClearAlpha = alpha; + fxMesa->Color.ClearColor = TDFXPACKCOLOR888( color[0], color[1], color[2] ); + fxMesa->Color.ClearAlpha = color[3]; } @@ -858,14 +815,9 @@ 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; - } + FALLBACK( fxMesa, TDFX_FALLBACK_SPECULAR, + (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR )); } } @@ -906,12 +858,20 @@ * Viewport */ -static void tdfxUpdateViewport( GLcontext *ctx ) +void tdfxUpdateViewport( GLcontext *ctx ) { - /* XXX: Implement this when we're doing clip coordinates */ - if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { - fprintf( stderr, "%s()\n", __FUNCTION__ ); - } + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + const GLfloat *v = ctx->Viewport._WindowMap.m; + GLfloat *m = fxMesa->hw_viewport; + + m[MAT_SX] = v[MAT_SX]; + m[MAT_TX] = v[MAT_TX] + fxMesa->x_offset + TRI_X_OFFSET; + m[MAT_SY] = v[MAT_SY]; + m[MAT_TY] = v[MAT_TY] + fxMesa->y_delta + TRI_Y_OFFSET; + m[MAT_SZ] = v[MAT_SZ]; + m[MAT_TZ] = v[MAT_TZ]; + + fxMesa->SetupNewInputs |= VERT_CLIP; } @@ -924,7 +884,7 @@ } -static void tdfxDDNearFar( GLcontext *ctx, GLfloat nearVal, GLfloat farVal ) +static void tdfxDDDepthRange( GLcontext *ctx, GLclampd nearVal, GLclampd farVal ) { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); FLUSH_BATCH( fxMesa ); @@ -949,11 +909,9 @@ 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; + FALLBACK( fxMesa, TDFX_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && + ctx->Color.LogicOp != GL_COPY)); break; case GL_CULL_FACE: @@ -982,19 +940,26 @@ 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; - } + FALLBACK( fxMesa, TDFX_FALLBACK_LOGICOP, + (ctx->Color.ColorLogicOpEnabled && + ctx->Color.LogicOp != GL_COPY)); break; + case GL_LIGHTING: + FALLBACK( fxMesa, TDFX_FALLBACK_SPECULAR, + (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR )); + break; + case GL_LINE_SMOOTH: FLUSH_BATCH( fxMesa ); fxMesa->new_state |= TDFX_NEW_LINE; break; + case GL_LINE_STIPPLE: + FALLBACK(fxMesa, TDFX_FALLBACK_LINE_STIPPLE, state); + break; + case GL_POLYGON_STIPPLE: FLUSH_BATCH(fxMesa); fxMesa->new_state |= TDFX_NEW_STIPPLE; @@ -1007,20 +972,13 @@ 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; + FALLBACK( fxMesa, TDFX_FALLBACK_STENCIL, state && !fxMesa->haveHwStencil); break; case GL_TEXTURE_1D: case GL_TEXTURE_3D: - if (state) - fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE; - else - fxMesa->Fallback &= ~TDFX_FALLBACK_TEXTURE; + FLUSH_BATCH( fxMesa ); + FALLBACK( fxMesa, TDFX_FALLBACK_TEXTURE_1D_3D, state); /* wrong */ fxMesa->new_state |= TDFX_NEW_TEXTURE; break; @@ -1038,7 +996,7 @@ /* Set the buffer used for drawing */ /* XXX support for separate read/draw buffers hasn't been tested */ -static GLboolean tdfxDDSetDrawBuffer( GLcontext *ctx, GLenum mode ) +static void tdfxDDSetDrawBuffer( GLcontext *ctx, GLenum mode ) { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); @@ -1048,57 +1006,32 @@ FLUSH_BATCH( fxMesa ); - fxMesa->Fallback &= ~TDFX_FALLBACK_BUFFER; - - switch ( mode ) { + switch( mode) { case GL_FRONT_LEFT: - fxMesa->DrawBuffer = GR_BUFFER_FRONTBUFFER; + fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER; fxMesa->new_state |= TDFX_NEW_RENDER; - return GL_TRUE; + FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE ); + break; case GL_BACK_LEFT: - fxMesa->DrawBuffer = GR_BUFFER_BACKBUFFER; + fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER; fxMesa->new_state |= TDFX_NEW_RENDER; - return GL_TRUE; + FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE ); + break; 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; + FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; - case GL_BACK_LEFT: - fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER; - break; - default: - fxMesa->Fallback |= TDFX_FALLBACK_BUFFER; + FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_TRUE ); break; } } + + /* ============================================================= * Polygon stipple */ @@ -1109,13 +1042,31 @@ const GLubyte *m = mask; GLubyte q[4]; int i,j,k; - int active = (ctx->Polygon.StippleFlag && ctx->PB->primitive == GL_POLYGON); + GLboolean allBitsSet; +/* int active = (ctx->Polygon.StippleFlag && */ +/* fxMesa->reduced_prim == GL_TRIANGLES); */ + FLUSH_BATCH(fxMesa); + fxMesa->Stipple.Pattern = 0xffffffff; + fxMesa->dirty |= TDFX_UPLOAD_STIPPLE; + fxMesa->new_state |= TDFX_NEW_STIPPLE; - if (active) { - ctx->Driver.TriangleCaps |= DD_TRI_STIPPLE; + /* Check if the stipple pattern is fully opaque. If so, use software + * rendering. This basically a trick to make sure the OpenGL conformance + * test passes. + */ + allBitsSet = GL_TRUE; + for (i = 0; i < 32; i++) { + if (((GLuint *) mask)[i] != 0xffffffff) { + allBitsSet = GL_FALSE; + break; + } } + if (allBitsSet) { + fxMesa->haveHwStipple = GL_FALSE; + return; + } q[0] = mask[0]; q[1] = mask[4]; @@ -1126,43 +1077,24 @@ 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 */ + fxMesa->haveHwStipple = GL_FALSE; return; } } - /* We can do it, so flag an upload of the stipple pattern */ + fxMesa->haveHwStipple = GL_TRUE; 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 ) { - fxMesa->Glide.grCullMode( fxMesa->CullMode ); - fxMesa->dirty &= ~TDFX_UPLOAD_CULL; - } -#if defined(__linux__) || defined(__FreeBSD__) - tdfxUpdateStipple(ctx); - if ( fxMesa->dirty & TDFX_UPLOAD_STIPPLE ) { - fxMesa->Glide.grStipplePattern ( fxMesa->Stipple.Pattern ); - fxMesa->Glide.grStippleMode ( fxMesa->Stipple.Mode ); - fxMesa->dirty &= ~TDFX_UPLOAD_STIPPLE; - } -#endif /* __linux__ || __FreeBSD__ */ +static void tdfxDDRenderMode( GLcontext *ctx, GLenum mode ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + FALLBACK( fxMesa, TDFX_FALLBACK_RENDER_MODE, (mode != GL_RENDER) ); } @@ -1266,69 +1198,17 @@ } -static void tdfxDDRenderStart( GLcontext *ctx ) +static void tdfxDDInvalidateState( GLcontext *ctx, GLuint new_state ) { - tdfxDDUpdateHwState( ctx ); - LOCK_HARDWARE( TDFX_CONTEXT(ctx) ); + _swrast_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + TDFX_CONTEXT(ctx)->new_gl_state |= new_state; } -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. */ @@ -1405,7 +1285,7 @@ fxMesa->TexState.Enabled = 0; } - if ( ctx->Visual->DBflag) { + if ( ctx->Visual.doubleBufferMode) { fxMesa->DrawBuffer = GR_BUFFER_BACKBUFFER; fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER; } else { @@ -1430,7 +1310,7 @@ fxMesa->Color.Dither = GR_DITHER_2x2; - if ( fxMesa->glVis->DepthBits > 0 ) { + if ( fxMesa->glCtx->Visual.depthBits > 0 ) { fxMesa->Depth.Mode = GR_DEPTHBUFFER_ZBUFFER; } else { fxMesa->Depth.Mode = GR_DEPTHBUFFER_DISABLE; @@ -1485,32 +1365,19 @@ void tdfxDDInitStateFuncs( GLcontext *ctx ) { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + ctx->Driver.UpdateState = tdfxDDInvalidateState; - ctx->Driver.UpdateState = tdfxDDUpdateState; + /* State notification callbacks: + */ 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; @@ -1521,7 +1388,7 @@ ctx->Driver.FrontFace = tdfxDDFrontFace; ctx->Driver.DepthFunc = tdfxDDDepthFunc; ctx->Driver.DepthMask = tdfxDDDepthMask; - ctx->Driver.DepthRange = NULL; + ctx->Driver.DepthRange = tdfxDDDepthRange; ctx->Driver.Enable = tdfxDDEnable; ctx->Driver.Fogfv = tdfxDDFogfv; ctx->Driver.Hint = NULL; @@ -1529,14 +1396,37 @@ 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.RenderMode = tdfxDDRenderMode; ctx->Driver.Scissor = tdfxDDScissor; ctx->Driver.ShadeModel = tdfxDDShadeModel; + ctx->Driver.BindTexture = tdfxDDBindTexture; + ctx->Driver.DeleteTexture = tdfxDDDeleteTexture; + ctx->Driver.TexEnv = tdfxDDTexEnv; + ctx->Driver.TexParameter = tdfxDDTexParameter; + ctx->Driver.ChooseTextureFormat = tdfxDDChooseTextureFormat; + ctx->Driver.TexImage2D = tdfxDDTexImage2D; + ctx->Driver.TexSubImage2D = tdfxDDTexSubImage2D; + /* + ctx->Driver.TexImage2D = _mesa_store_teximage2d; + ctx->Driver.TexSubImage2D = _mesa_store_texsubimage2d; + */ + + ctx->Driver.TexImage1D = _mesa_store_teximage1d; + ctx->Driver.TexImage3D = _mesa_store_teximage3d; + ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d; + ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d; + ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d; + ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d; + ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d; + ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d; + ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d; + ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage; + +/* ctx->Driver.GetTexImage = tdfxDDGetTexImage; */ + ctx->Driver.UpdateTexturePalette = tdfxDDTexturePalette; + if ( fxMesa->haveHwStencil ) { ctx->Driver.StencilFunc = tdfxDDStencilFunc; ctx->Driver.StencilMask = tdfxDDStencilMask; @@ -1548,4 +1438,12 @@ } ctx->Driver.Viewport = tdfxDDViewport; + + + /* Swrast hooks for imaging extensions: + */ + ctx->Driver.CopyColorTable = _swrast_CopyColorTable; + ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable; + ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D; + ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D; } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h Fri Feb 22 16:45:04 2002 @@ -23,7 +23,7 @@ * 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 $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.h,v 1.2 2002/02/22 21:45:04 dawes Exp $ */ /* * Original rewrite: @@ -50,6 +50,15 @@ extern void tdfxInitState( tdfxContextPtr fxMesa ); extern void tdfxUpdateClipping( GLcontext *ctx ); + + +extern void tdfxFallback( GLcontext *ctx, GLuint bit, GLboolean mode ); +#define FALLBACK( rmesa, bit, mode ) tdfxFallback( rmesa->glCtx, bit, mode ) + +extern void tdfxUpdateCull( GLcontext *ctx ); +extern void tdfxUpdateStipple( GLcontext *ctx ); +extern void tdfxUpdateViewport( GLcontext *ctx ); + #endif #endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c:1.3 xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c:1.7 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c:1.3 Fri Aug 17 22:51:07 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c Tue Nov 5 12:46:10 2002 @@ -23,7 +23,7 @@ * 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.3 2001/08/18 02:51:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c,v 1.7 2002/11/05 17:46:10 tsi Exp $ */ /* * Original rewrite: @@ -35,37 +35,42 @@ * */ +#include "image.h" +#include "texutil.h" +#include "texformat.h" +#include "teximage.h" +#include "texstore.h" #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 ) +static int +logbase2(int n) { - GLint i = 1; - GLint log2 = 0; - - if ( n < 0 ) - return -1; + GLint i = 1; + GLint log2 = 0; - while ( n > i ) { - i *= 2; - log2++; - } - if ( i != n ) { - return -1; - } else { - return log2; - } + if (n < 0) { + return -1; + } + + while (n > i) { + i *= 2; + log2++; + } + if (i != n) { + return -1; + } + else { + return log2; + } } + -/* Compute various texture image parameters. +/* + * 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 @@ -82,282 +87,524 @@ * 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); - } - } +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; - if ( ar < GR_ASPECT_LOG2_1x8 ) { - ar = GR_ASPECT_LOG2_1x8; - } else if ( ar > GR_ASPECT_LOG2_8x1 ) { - ar = GR_ASPECT_LOG2_8x1; - } + ASSERT(w >= 1); + ASSERT(h >= 1); - 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; + 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; + 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(width < height); + 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 +/* + * 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 ) +static void RevalidateTexture(GLcontext *ctx, struct gl_texture_object *tObj) { - tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); - GLint minl, maxl; + tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj); + GLint minl, maxl; - if ( !t ) - return; + if (!ti) + 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 ); - } + minl = maxl = tObj->BaseLevel; - 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; - } + 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, + &ti->info.largeLodLog2, + &ti->info.aspectRatioLog2, + &(ti->sScale), &(ti->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, + &ti->info.smallLodLog2, NULL, + NULL, NULL, NULL, NULL); + } + else { + /* not mipmapping: smallLodLog2 = largeLodLog2 */ + ti->info.smallLodLog2 = ti->info.largeLodLog2; + maxl = minl; + } + + ti->minLevel = minl; + ti->maxLevel = maxl; + ti->info.data = NULL; +} + + +static tdfxTexInfo * +fxAllocTexObjData(tdfxContextPtr fxMesa) +{ + tdfxTexInfo *ti; + + if (!(ti = CALLOC(sizeof(tdfxTexInfo)))) { + _mesa_problem(NULL, "tdfx driver: out of memory"); + return NULL; + } + + ti->isInTM = GL_FALSE; + + ti->whichTMU = TDFX_TMU_NONE; + + ti->tm[TDFX_TMU0] = NULL; + ti->tm[TDFX_TMU1] = NULL; + + ti->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; + ti->magFilt = GR_TEXTUREFILTER_BILINEAR; + + ti->sClamp = GR_TEXTURECLAMP_WRAP; + ti->tClamp = GR_TEXTURECLAMP_WRAP; - t->minLevel = minl; - t->maxLevel = maxl; - t->info.data = NULL; + ti->mmMode = GR_MIPMAP_NEAREST; + ti->LODblend = FXFALSE; + + return ti; } -static tdfxTexObjPtr tdfxAllocTexObj( tdfxContextPtr fxMesa ) +/* + * Called via glBindTexture. + */ + +void +tdfxDDBindTexture(GLcontext * ctx, GLenum target, + struct gl_texture_object *tObj) { - tdfxTexObjPtr t; - int i; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxTexInfo *ti; - t = CALLOC( sizeof(tdfxTexObj) ); - if ( !t ) { - gl_problem( NULL, "tdfx driver: out of memory" ); - return NULL; - } + if (MESA_VERBOSE & VERBOSE_DRIVER) { + fprintf(stderr, "fxmesa: fxDDTexBind(%d,%p)\n", tObj->Name, + tObj->DriverData); + } - t->isInTM = GL_FALSE; + if (target != GL_TEXTURE_2D) + return; - t->whichTMU = TDFX_TMU_NONE; + if (!tObj->DriverData) { + tObj->DriverData = fxAllocTexObjData(fxMesa); + } - t->range[TDFX_TMU0] = NULL; - t->range[TDFX_TMU1] = NULL; + ti = TDFX_TEXTURE_DATA(tObj); + ti->lastTimeUsed = fxMesa->texBindNumber++; - t->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; - t->magFilt = GR_TEXTUREFILTER_BILINEAR; + fxMesa->new_state |= TDFX_NEW_TEXTURE; +} - t->sClamp = GR_TEXTURECLAMP_WRAP; - t->tClamp = GR_TEXTURECLAMP_WRAP; - t->mmMode = GR_MIPMAP_NEAREST; - t->LODblend = FXFALSE; +/* + * Called via glTexEnv. + */ +void +tdfxDDTexEnv(GLcontext * ctx, GLenum target, GLenum pname, + const GLfloat * param) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - for ( i = 0 ; i < MAX_TEXTURE_LEVELS ; i++ ) { - t->image[i].original.data = NULL; - t->image[i].rescaled.data = NULL; - } + if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { + if (param) + fprintf(stderr, "fxmesa: texenv(%x,%x)\n", pname, + (GLint) (*param)); + else + fprintf(stderr, "fxmesa: texenv(%x)\n", pname); + } + + /* XXX this is a bit of a hack to force the Glide texture + * state to be updated. + */ + fxMesa->TexState.EnvMode[ctx->Texture.CurrentUnit] = 0; - return t; + fxMesa->new_state |= TDFX_NEW_TEXTURE; } -/* 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. +/* + * Called via glTexParameter. */ -static GrTextureFormat_t -tdfxTexGetFormat( tdfxContextPtr fxMesa, struct gl_texture_image *texImage, - GLenum format, GLenum type ) +void +tdfxDDTexParameter(GLcontext * ctx, GLenum target, + struct gl_texture_object *tObj, + GLenum pname, const GLfloat * params) { - 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; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLenum param = (GLenum) (GLint) params[0]; + tdfxTexInfo *ti; + + if (MESA_VERBOSE & VERBOSE_DRIVER) { + fprintf(stderr, "fxmesa: fxDDTexParam(%d,%p,%x,%x)\n", tObj->Name, + tObj->DriverData, pname, param); + } + + if (target != GL_TEXTURE_2D) + return; + + if (!tObj->DriverData) + tObj->DriverData = fxAllocTexObjData(fxMesa); + + ti = TDFX_TEXTURE_DATA(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_LINEAR: + if (TDFX_IS_NAPALM(fxMesa)) { + 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; + } + /* 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: + ti->mmMode = GR_MIPMAP_NEAREST; + ti->minFilt = GR_TEXTUREFILTER_POINT_SAMPLED; + ti->LODblend = FXFALSE; + break; + case GL_LINEAR_MIPMAP_LINEAR: + if (TDFX_IS_NAPALM(fxMesa)) { + 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; + } + /* 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: + ti->mmMode = GR_MIPMAP_NEAREST; + ti->minFilt = GR_TEXTUREFILTER_BILINEAR; + ti->LODblend = FXFALSE; + break; + default: + break; + } + RevalidateTexture(ctx, tObj); + fxMesa->new_state |= TDFX_NEW_TEXTURE; + break; + + case GL_TEXTURE_MAG_FILTER: + switch (param) { + case GL_NEAREST: + ti->magFilt = GR_TEXTUREFILTER_POINT_SAMPLED; + break; + case GL_LINEAR: + ti->magFilt = GR_TEXTUREFILTER_BILINEAR; + break; + default: + break; + } + fxMesa->new_state |= TDFX_NEW_TEXTURE; + 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 |= TDFX_NEW_TEXTURE; + 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 |= TDFX_NEW_TEXTURE; + 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: + RevalidateTexture(ctx, tObj); + break; + case GL_TEXTURE_MAX_LEVEL: + RevalidateTexture(ctx, tObj); + break; + + default: + 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; +/* + * Called via glDeleteTextures to delete a texture object. + * Here, we delete the Glide data associated with the texture. + */ +void +tdfxDDDeleteTexture(GLcontext * ctx, struct gl_texture_object *tObj) +{ + if (ctx && ctx->DriverCtx) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxTMFreeTexture(fxMesa, tObj); + fxMesa->new_state |= TDFX_NEW_TEXTURE; + } +} - 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; +/* + * Return true if texture is resident, false otherwise. + */ +GLboolean +tdfxDDIsTextureResident(GLcontext *ctx, struct gl_texture_object *tObj) +{ + tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj); + return (GLboolean) (ti && ti->isInTM); +} - 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; +/* + * 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 +tdfxDDTexturePalette(GLcontext * ctx, struct gl_texture_object *tObj) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if (tObj) { + /* per-texture palette */ + tdfxTexInfo *ti; + + /* This might be a proxy texture. */ + if (!tObj->Palette.Table) + return; + + if (!tObj->DriverData) + tObj->DriverData = fxAllocTexObjData(fxMesa); + ti = TDFX_TEXTURE_DATA(tObj); + convertPalette(ti->palette.data, &tObj->Palette); + /*tdfxTexInvalidate(ctx, tObj);*/ + } + else { + /* global texture palette */ + convertPalette(fxMesa->glbPalette.data, &ctx->Texture.Palette); + } + fxMesa->new_state |= TDFX_NEW_TEXTURE; /* XXX too heavy-handed */ +} + + +/**********************************************************************/ +/**** NEW TEXTURE IMAGE FUNCTIONS ****/ +/**********************************************************************/ + +#if 000 +static FxBool TexusFatalError = FXFALSE; +static FxBool TexusError = FXFALSE; + +#define TX_DITHER_NONE 0x00000000 + +static void +fxTexusError(const char *string, FxBool fatal) +{ + _mesa_problem(NULL, string); + /* + * Just propagate the fatal value up. + */ + TexusError = FXTRUE; + TexusFatalError = fatal; +} +#endif + + +const struct gl_texture_format * +tdfxDDChooseTextureFormat( GLcontext *ctx, GLint internalFormat, + GLenum srcFormat, GLenum srcType ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + const GLboolean allow32bpt = TDFX_IS_NAPALM(fxMesa); + + switch (internalFormat) { 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; - + return &_mesa_texformat_a8; 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; - + return &_mesa_texformat_l8; case 2: case GL_LUMINANCE_ALPHA: case GL_LUMINANCE4_ALPHA4: @@ -366,17 +613,39 @@ case GL_LUMINANCE12_ALPHA4: case GL_LUMINANCE12_ALPHA12: case GL_LUMINANCE16_ALPHA16: - SET_FORMAT( GR_TEXFMT_ALPHA_INTENSITY_88, _mesa_texformat_al88 ); - break; - + return &_mesa_texformat_al88; case GL_INTENSITY: case GL_INTENSITY4: case GL_INTENSITY8: case GL_INTENSITY12: case GL_INTENSITY16: - SET_FORMAT( GR_TEXFMT_ALPHA_8, _mesa_texformat_i8 ); + return &_mesa_texformat_i8; + case GL_R3_G3_B2: + case GL_RGB4: + case GL_RGB5: + return &_mesa_texformat_rgb565; + case 3: + case GL_RGB: + case GL_RGB8: + case GL_RGB10: + case GL_RGB12: + case GL_RGB16: + return (allow32bpt) ? &_mesa_texformat_argb8888 + : &_mesa_texformat_rgb565; break; - + case GL_RGBA2: + case GL_RGBA4: + return &_mesa_texformat_argb4444; + case 4: + case GL_RGBA: + case GL_RGBA8: + case GL_RGB10_A2: + case GL_RGBA12: + case GL_RGBA16: + return allow32bpt ? &_mesa_texformat_argb8888 + : &_mesa_texformat_argb4444; + case GL_RGB5_A1: + return &_mesa_texformat_argb1555; case GL_COLOR_INDEX: case GL_COLOR_INDEX1_EXT: case GL_COLOR_INDEX2_EXT: @@ -384,677 +653,821 @@ 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; - + return &_mesa_texformat_ci8; default: - fprintf( stderr, "bad texture format in fxTexGetFormat() %d", - texImage->IntFormat ); - return -1; + _mesa_problem(ctx, "unexpected format in tdfxDDChooseTextureFormat"); + return NULL; } - - 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 ) +/* + * Return the Glide format for the given mesa texture format. + */ +static GrTextureFormat_t +fxGlideFormat(GLint mesaFormat) { - 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->TexelBytes, - texImage->Width, texImage->Height, - dstWidth, dstHeight, - image->original.data, image->rescaled.data ); - - data = image->rescaled.data; + switch (mesaFormat) { + case MESA_FORMAT_I8: + return GR_TEXFMT_ALPHA_8; + case MESA_FORMAT_A8: + return GR_TEXFMT_ALPHA_8; + case MESA_FORMAT_L8: + return GR_TEXFMT_INTENSITY_8; + case MESA_FORMAT_CI8: + return GR_TEXFMT_P_8; + case MESA_FORMAT_AL88: + return GR_TEXFMT_ALPHA_INTENSITY_88; + case MESA_FORMAT_RGB565: + return GR_TEXFMT_RGB_565; + case MESA_FORMAT_ARGB4444: + return GR_TEXFMT_ARGB_4444; + case MESA_FORMAT_ARGB1555: + return GR_TEXFMT_ARGB_1555; + case MESA_FORMAT_ARGB8888: + return GR_TEXFMT_ARGB_8888; + default: + _mesa_problem(NULL, "Unexpected format in fxGlideFormat"); + return 0; } +} - image->data = data; - image->size = size; - - tdfxRevalidateTexture( ctx, texObj ); - t->reloadImages = GL_TRUE; - fxMesa->new_state |= TDFX_NEW_TEXTURE; +/* Texel-fetch functions for software texturing and glGetTexImage(). + * We should have been able to use some "standard" fetch functions (which + * may get defined in texutil.c) but we have to account for scaled texture + * images on tdfx hardware (the 8:1 aspect ratio limit). + * Hence, we need special functions here. + */ - *retainInternalCopy = GL_FALSE; - return GL_TRUE; +static void +fetch_intensity8(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLvoid * texelOut) +{ + GLchan *rgba = (GLchan *) texelOut; + const tdfxMipMapLevel *mml = TDFX_TEXIMAGE_DATA(texImage); + const GLubyte *texel; + + i = i * mml->wScale; + j = j * mml->hScale; + + texel = ((GLubyte *) texImage->Data) + j * mml->width + i; + rgba[RCOMP] = *texel; + rgba[GCOMP] = *texel; + rgba[BCOMP] = *texel; + rgba[ACOMP] = *texel; } -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 ) +static void +fetch_luminance8(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLvoid * texelOut) { - 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->TexelBytes, - 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; + GLchan *rgba = (GLchan *) texelOut; + const tdfxMipMapLevel *mml = TDFX_TEXIMAGE_DATA(texImage); + const GLubyte *texel; + + i = i * mml->wScale; + j = j * mml->hScale; + + texel = ((GLubyte *) texImage->Data) + j * mml->width + i; + rgba[RCOMP] = *texel; + rgba[GCOMP] = *texel; + rgba[BCOMP] = *texel; + rgba[ACOMP] = 255; } - - -/* ================================================================ - * - */ -static void tdfxDDTexEnv( GLcontext *ctx, GLenum target, - GLenum pname, const GLfloat *param ) +static void +fetch_alpha8(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLvoid * texelOut) { - 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; + GLchan *rgba = (GLchan *) texelOut; + const tdfxMipMapLevel *mml = TDFX_TEXIMAGE_DATA(texImage); + const GLubyte *texel; + + i = i * mml->wScale; + j = j * mml->hScale; + i = i * mml->width / texImage->Width; + j = j * mml->height / texImage->Height; + + texel = ((GLubyte *) texImage->Data) + j * mml->width + i; + rgba[RCOMP] = 255; + rgba[GCOMP] = 255; + rgba[BCOMP] = 255; + rgba[ACOMP] = *texel; } -static void tdfxDDTexParameter( GLcontext *ctx, GLenum target, - struct gl_texture_object *tObj, - GLenum pname, const GLfloat *params ) + +static void +fetch_index8(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLvoid * texelOut) { - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - GLenum param = (GLenum) (GLint) params[0]; - tdfxTexObjPtr t; + const tdfxMipMapLevel *mml = TDFX_TEXIMAGE_DATA(texImage); + (void) mml; + /* XXX todo */ +} - 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; +static void +fetch_luminance8_alpha8(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLvoid * texelOut) +{ + GLchan *rgba = (GLchan *) texelOut; + const tdfxMipMapLevel *mml = TDFX_TEXIMAGE_DATA(texImage); + const GLubyte *texel; + + i = i * mml->wScale; + j = j * mml->hScale; + + texel = ((GLubyte *) texImage->Data) + (j * mml->width + i) * 2; + rgba[RCOMP] = texel[0]; + rgba[GCOMP] = texel[0]; + rgba[BCOMP] = texel[0]; + rgba[ACOMP] = texel[1]; +} - if ( !tObj->DriverData ) - tObj->DriverData = tdfxAllocTexObj( fxMesa ); - t = TDFX_TEXTURE_DATA(tObj); +static void +fetch_r5g6b5(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLvoid * texelOut) +{ + GLchan *rgba = (GLchan *) texelOut; + const tdfxMipMapLevel *mml = TDFX_TEXIMAGE_DATA(texImage); + const GLushort *texel; + + i = i * mml->wScale; + j = j * mml->hScale; + + texel = ((GLushort *) texImage->Data) + j * mml->width + i; + rgba[RCOMP] = (((*texel) >> 11) & 0x1f) * 255 / 31; + rgba[GCOMP] = (((*texel) >> 5) & 0x3f) * 255 / 63; + rgba[BCOMP] = (((*texel) >> 0) & 0x1f) * 255 / 31; + rgba[ACOMP] = 255; +} - 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; +static void +fetch_r4g4b4a4(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLvoid * texelOut) +{ + GLchan *rgba = (GLchan *) texelOut; + const tdfxMipMapLevel *mml = TDFX_TEXIMAGE_DATA(texImage); + const GLushort *texel; + + i = i * mml->wScale; + j = j * mml->hScale; + + texel = ((GLushort *) texImage->Data) + j * mml->width + i; + rgba[RCOMP] = (((*texel) >> 12) & 0xf) * 255 / 15; + rgba[GCOMP] = (((*texel) >> 8) & 0xf) * 255 / 15; + rgba[BCOMP] = (((*texel) >> 4) & 0xf) * 255 / 15; + rgba[ACOMP] = (((*texel) >> 0) & 0xf) * 255 / 15; +} - 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; +static void +fetch_r5g5b5a1(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLvoid * texelOut) +{ + GLchan *rgba = (GLchan *) texelOut; + const tdfxMipMapLevel *mml = TDFX_TEXIMAGE_DATA(texImage); + const GLushort *texel; + + i = i * mml->wScale; + j = j * mml->hScale; + + texel = ((GLushort *) texImage->Data) + j * mml->width + i; + rgba[RCOMP] = (((*texel) >> 11) & 0x1f) * 255 / 31; + rgba[GCOMP] = (((*texel) >> 6) & 0x1f) * 255 / 31; + rgba[BCOMP] = (((*texel) >> 1) & 0x1f) * 255 / 31; + rgba[ACOMP] = (((*texel) >> 0) & 0x01) * 255; +} - case GL_TEXTURE_BASE_LEVEL: - tdfxRevalidateTexture( ctx, tObj ); - break; - case GL_TEXTURE_MAX_LEVEL: - tdfxRevalidateTexture( ctx, tObj ); - break; +static void +fetch_a8r8g8b8(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLvoid * texelOut) +{ + GLchan *rgba = (GLchan *) texelOut; + const tdfxMipMapLevel *mml = TDFX_TEXIMAGE_DATA(texImage); + const GLuint *texel; + + i = i * mml->wScale; + j = j * mml->hScale; + + texel = ((GLuint *) texImage->Data) + j * mml->width + i; + rgba[RCOMP] = (((*texel) >> 16) & 0xff); + rgba[GCOMP] = (((*texel) >> 8) & 0xff); + rgba[BCOMP] = (((*texel) ) & 0xff); + rgba[ACOMP] = (((*texel) >> 24) & 0xff); +} - case GL_TEXTURE_BORDER_COLOR: - /* TO DO */ - break; - case GL_TEXTURE_MIN_LOD: - /* TO DO */ - break; - case GL_TEXTURE_MAX_LOD: - /* TO DO */ - break; +static FetchTexelFunc +fxFetchFunction(GLint mesaFormat) +{ + switch (mesaFormat) { + case MESA_FORMAT_I8: + return fetch_intensity8; + case MESA_FORMAT_A8: + return fetch_alpha8; + case MESA_FORMAT_L8: + return fetch_luminance8; + case MESA_FORMAT_CI8: + return fetch_index8; + case MESA_FORMAT_AL88: + return fetch_luminance8_alpha8; + case MESA_FORMAT_RGB565: + return fetch_r5g6b5; + case MESA_FORMAT_ARGB4444: + return fetch_r4g4b4a4; + case MESA_FORMAT_ARGB1555: + return fetch_r5g5b5a1; + case MESA_FORMAT_ARGB8888: + return fetch_a8r8g8b8; default: - break; + _mesa_problem(NULL, "Unexpected format in fxFetchFunction"); + printf("%d\n", mesaFormat); + return NULL; } } -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; +void +tdfxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level, + GLint internalFormat, GLint width, GLint height, GLint border, + 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); + tdfxTexInfo *ti; + tdfxMipMapLevel *mml; + GLint texelBytes; + + /* + 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 ( !tObj->DriverData ) - tObj->DriverData = tdfxAllocTexObj( fxMesa ); + ti = TDFX_TEXTURE_DATA(texObj); + if (!ti) { + texObj->DriverData = fxAllocTexObjData(fxMesa); + if (!texObj->DriverData) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + return; + } + ti = TDFX_TEXTURE_DATA(texObj); + } + + mml = TDFX_TEXIMAGE_DATA(texImage); + if (!mml) { + texImage->DriverData = CALLOC(sizeof(tdfxMipMapLevel)); + if (!texImage->DriverData) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + return; + } + mml = TDFX_TEXIMAGE_DATA(texImage); + } + + /* Determine width and height scale factors for texture. + * Remember, Glide is limited to 8:1 aspect ratios. + */ + tdfxTexGetInfo(ctx, + texImage->Width, texImage->Height, + NULL, /* lod level */ + NULL, /* aspect ratio */ + NULL, NULL, /* sscale, tscale */ + &mml->wScale, &mml->hScale); + + /* rescaled size: */ + mml->width = width * mml->wScale; + mml->height = height * mml->hScale; + + + /* choose the texture format */ + assert(ctx->Driver.ChooseTextureFormat); + texImage->TexFormat = (*ctx->Driver.ChooseTextureFormat)(ctx, + internalFormat, format, type); + assert(texImage->TexFormat); + mml->glideFormat = fxGlideFormat(texImage->TexFormat->MesaFormat); + ti->info.format = mml->glideFormat; + texImage->FetchTexel = fxFetchFunction(texImage->TexFormat->MesaFormat); + texelBytes = texImage->TexFormat->TexelBytes; + + if (mml->width != width || mml->height != height) { + /* rescale the image to overcome 1:8 aspect limitation */ + GLvoid *tempImage; + tempImage = MALLOC(width * height * texelBytes); + if (!tempImage) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + return; + } + /* unpack image, apply transfer ops and store in tempImage */ + _mesa_transfer_teximage(ctx, 2, texImage->Format, + texImage->TexFormat, + tempImage, + width, height, 1, 0, 0, 0, + width * texelBytes, + 0, /* dstImageStride */ + format, type, pixels, packing); + assert(!texImage->Data); + texImage->Data = MESA_PBUFFER_ALLOC(mml->width * mml->height * texelBytes); + if (!texImage->Data) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + FREE(tempImage); + return; + } + _mesa_rescale_teximage2d(texelBytes, + mml->width * texelBytes, /* dst stride */ + width, height, + mml->width, mml->height, + tempImage /*src*/, texImage->Data /*dst*/ ); + FREE(tempImage); + } + else { + /* no rescaling needed */ + assert(!texImage->Data); + texImage->Data = MESA_PBUFFER_ALLOC(mml->width * mml->height * texelBytes); + if (!texImage->Data) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); + return; + } + /* unpack image, apply transfer ops and store in texImage->Data */ + _mesa_transfer_teximage(ctx, 2, texImage->Format, + texImage->TexFormat, texImage->Data, + width, height, 1, 0, 0, 0, + texImage->Width * texelBytes, + 0, /* dstImageStride */ + format, type, pixels, packing); + } - t = TDFX_TEXTURE_DATA(tObj); - t->lastTimeUsed = fxMesa->texBindNumber++; + RevalidateTexture(ctx, texObj); - fxMesa->new_state |= TDFX_NEW_TEXTURE; + ti->reloadImages = GL_TRUE; + 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 ); - } +void +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); + tdfxTexInfo *ti; + tdfxMipMapLevel *mml; + GLint texelBytes; + + if (!texObj->DriverData) { + _mesa_problem(ctx, "problem in fxDDTexSubImage2D"); + return; + } + + ti = TDFX_TEXTURE_DATA(texObj); + assert(ti); + mml = TDFX_TEXIMAGE_DATA(texImage); + assert(mml); + + assert(texImage->Data); /* must have an existing texture image! */ + assert(texImage->Format); + + texelBytes = texImage->TexFormat->TexelBytes; + + if (mml->wScale != 1 || mml->hScale != 1) { + /* need to rescale subimage to match mipmap level's rescale factors */ + const GLint newWidth = width * mml->wScale; + const GLint newHeight = height * mml->hScale; + GLvoid *scaledImage, *tempImage; + GLubyte *destAddr; + tempImage = MALLOC(width * height * texelBytes); + if (!tempImage) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage2D"); + return; + } + + _mesa_transfer_teximage(ctx, 2, texImage->Format,/* Tex int format */ + texImage->TexFormat, /* dest format */ + (GLubyte *) tempImage, /* dest */ + width, height, 1, /* subimage size */ + 0, 0, 0, /* subimage pos */ + width * texelBytes, /* dest row stride */ + 0, /* dst image stride */ + format, type, pixels, packing); + + /* now rescale */ + scaledImage = MALLOC(newWidth * newHeight * texelBytes); + if (!scaledImage) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage2D"); + FREE(tempImage); + return; + } + + /* compute address of dest subimage within the overal tex image */ + destAddr = (GLubyte *) texImage->Data + + (yoffset * mml->hScale * mml->width + + xoffset * mml->wScale) * texelBytes; + + _mesa_rescale_teximage2d(texelBytes, + mml->width * texelBytes, /* dst stride */ + width, height, + newWidth, newHeight, + tempImage, destAddr); + + FREE(tempImage); + FREE(scaledImage); + } + else { + /* no rescaling needed */ + _mesa_transfer_teximage(ctx, 2, texImage->Format, /* Tex int format */ + texImage->TexFormat, /* dest format */ + (GLubyte *) texImage->Data,/* dest */ + width, height, 1, /* subimage size */ + xoffset, yoffset, 0, /* subimage pos */ + mml->width * texelBytes, /* dest row stride */ + 0, /* dst image stride */ + format, type, pixels, packing); + } - fxMesa->new_state |= TDFX_NEW_TEXTURE; + ti->reloadImages = GL_TRUE; /* signal the image needs to be reloaded */ + fxMesa->new_state |= TDFX_NEW_TEXTURE; /* XXX this might be a bit much */ } -static GLboolean tdfxDDIsTextureResident( GLcontext *ctx, - struct gl_texture_object *tObj ) -{ - tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); - return ( t && t->isInTM ); -} +/**********************************************************************/ +/**** COMPRESSED TEXTURE IMAGE FUNCTIONS ****/ +/**********************************************************************/ -/* Convert a gl_color_table texture palette to Glide's format. - */ -static void -tdfxConvertPalette( FxU32 data[256], const struct gl_color_table *table ) +#if 0000 +GLboolean +tdfxDDCompressedTexImage2D( GLcontext *ctx, GLenum target, + GLint level, GLsizei imageSize, + const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLboolean *retainInternalCopy) { - const GLubyte *tableUB = (const GLubyte *) table->Table; - GLint width = table->Size; - FxU32 r, g, b, a; - GLint i; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + const GLboolean allow32bpt = TDFX_IS_NAPALM(fxMesa); + GrTextureFormat_t gldformat; + tdfxTexInfo *ti; + tdfxMipMapLevel *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 = TDFX_TEXTURE_DATA(texObj); + mml = &ti->mipmapLevel[level]; + + isCompressedFormat = tdfxDDIsCompressedGlideFormatMacro(texImage->IntFormat); + if (!isCompressedFormat) { + _mesa_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. + */ + tdfxTexGetFormat(texImage->IntFormat, allow32bpt, + &gldformat, &intFormat, &texelSize); + + /* Determine width and height scale factors for texture. + * Remember, Glide is limited to 8:1 aspect ratios. + */ + tdfxTexGetInfo(ctx, + texImage->Width, texImage->Height, + NULL, /* lod level */ + NULL, /* aspect ratio */ + NULL, NULL, /* sscale, tscale */ + &wScale, &hScale); + dstWidth = texImage->Width * wScale; + dstHeight = texImage->Height * hScale; + /* housekeeping */ + _mesa_set_teximage_component_sizes(intFormat, texImage); + + texSize = tdfxDDCompressedImageSize(ctx, + texImage->IntFormat, + 2, + texImage->Width, + texImage->Height, + 1); + if (texSize != imageSize) { + _mesa_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; + tdfxTMMoveOutTM(fxMesa, texObj); + /*tdfxTexInvalidate(ctx, texObj);*/ + } + + /* save the texture data */ + MEMCPY(mml->data, data, imageSize); - ASSERT( table->TableType == GL_UNSIGNED_BYTE ); + RevalidateTexture(ctx, texObj); - 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; - } + ti->reloadImages = GL_TRUE; + fxMesa->new_state |= TDFX_NEW_TEXTURE; + + *retainInternalCopy = GL_FALSE; + return GL_TRUE; } -static void -tdfxDDTexturePalette( GLcontext *ctx, struct gl_texture_object *tObj ) +GLboolean +tdfxDDCompressedTexSubImage2D( 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 ) { - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - tdfxTexObjPtr t; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxTexInfo *ti; + tdfxMipMapLevel *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 = TDFX_TEXTURE_DATA(texObj); + mml = &ti->mipmapLevel[level]; + if (imageSize != mml->dataSize) { + return GL_FALSE; + } + MEMCPY(data, mml->data, imageSize); - 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 ); - } + ti->reloadImages = GL_TRUE; + fxMesa->new_state |= TDFX_NEW_TEXTURE; - fxMesa->new_state |= TDFX_NEW_TEXTURE; /* XXX too heavy-handed */ + return GL_TRUE; } - - - - -/**********************************************************************/ -/**** NEW TEXTURE IMAGE FUNCTIONS ****/ -/**********************************************************************/ +#endif -#if 0 +#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"); - } + 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 ) +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 = fxMesa->Glide.grTexTextureMemRequired( - GR_MIPMAPLEVELMASK_BOTH, &(t->info)); - } - else { - /* XXX GR_MIPMAPLEVELMASK_BOTH might not be right, but works */ - memNeeded = fxMesa->Glide.grTexTextureMemRequired( - 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 */ - } + tdfxContextPtr fxMesa = TDFX_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; + tdfxTexInfo *ti; + int memNeeded; + + tObj = ctx->Texture.Proxy2D; + if (!tObj->DriverData) + tObj->DriverData = fxAllocTexObjData(fxMesa); + ti = 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; +#if 0 + tObj->Image[level]->IntFormat = internalFormat; +#endif + 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; + } + RevalidateTexture(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 = fxMesa->Glide.grTexTextureMemRequired( + GR_MIPMAPLEVELMASK_BOTH, &(ti->info)); + } + else { + /* XXX GR_MIPMAPLEVELMASK_BOTH might not be right, but works */ + memNeeded = fxMesa->Glide.grTexTextureMemRequired( + 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. +#if 000 +/* + * This is called from _mesa_GetCompressedTexImage. We just + * copy out the compressed data. */ -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; +void +tdfxDDGetCompressedTexImage( GLcontext *ctx, GLenum target, + GLint lod, void *image, + const struct gl_texture_object *texObj, + struct gl_texture_image *texImage ) +{ + tdfxTexInfo *ti; + tdfxMipMapLevel *mml; - if ( target != GL_TEXTURE_2D ) - return NULL; - if ( !t ) - return NULL; + if (target != GL_TEXTURE_2D) + return; - image = &t->image[level]; - if ( !image->original.data ) - return NULL; + if (!texObj->DriverData) + return; - data = (GLubyte *) MALLOC( texImage->Width * texImage->Height * 4 ); - if ( !data ) - return NULL; + ti = TDFX_TEXTURE_DATA(texObj); + mml = &ti->mipmapLevel[lod]; + if (mml->data) { + MEMCPY(image, mml->data, mml->dataSize); + } +} +#endif + +/* + * Calculate a specific texture format given a generic + * texture format. + */ +GLint +tdfxDDSpecificCompressedTexFormat(GLcontext *ctx, + GLint internalFormat, + GLint numDimensions) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - _mesa_unconvert_teximage2d( texFormat->IntFormat, texImage->Format, - texImage->Width, texImage->Height, - image->original.data, data ); + 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 (!fxMesa->Glide.txImgQuantize || !fxMesa->Glide.txImgDequantizeFXT1) { + return internalFormat; + } + switch (internalFormat) { + case GL_COMPRESSED_RGB_ARB: + return GL_COMPRESSED_RGB_FXT1_3DFX; + case GL_COMPRESSED_RGBA_ARB: + return GL_COMPRESSED_RGBA_FXT1_3DFX; + } + return internalFormat; +} - *formatOut = texImage->Format; - *typeOut = GL_UNSIGNED_BYTE; - *freeImageOut = GL_TRUE; +/* + * Calculate a specific texture format given a generic + * texture format. + */ +GLint +tdfxDDBaseCompressedTexFormat(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; +} - return data; +/* + * 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 +tdfxDDIsCompressedFormat(GLcontext *ctx, GLint internalFormat) +{ + return tdfxDDIsCompressedFormatMacro(internalFormat); } -void tdfxDDInitTextureFuncs( GLcontext *ctx ) +/* + * 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 +tdfxDDCompressedImageSize(GLcontext *ctx, + GLenum intFormat, + GLuint numDimensions, + GLuint width, + GLuint height, + GLuint depth) { - 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; + 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/tdfx_tex.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h Fri Feb 22 16:45:04 2002 @@ -23,7 +23,7 @@ * 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 $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.h,v 1.2 2002/02/22 21:45:04 dawes Exp $ */ /* * Original rewrite: @@ -35,12 +35,131 @@ * */ -#ifndef __TDFX_TEX_H__ -#define __TDFX_TEX_H__ +#ifndef _TDFX_TEX_H_ +#define _TDFX_TEX_H_ -extern void tdfxUpdateTextureState( GLcontext *ctx ); -extern void tdfxUpdateTextureBinding( GLcontext *ctx ); -extern void tdfxDDInitTextureFuncs( GLcontext *ctx ); +#include "texutil.h" + + +#define tdfxDDIsCompressedFormatMacro(internalFormat) \ + (((internalFormat) == GL_COMPRESSED_RGB_FXT1_3DFX) || \ + ((internalFormat) == GL_COMPRESSED_RGBA_FXT1_3DFX)) +#define tdfxDDIsCompressedGlideFormatMacro(internalFormat) \ + ((internalFormat) == GR_TEXFMT_ARGB_CMP_FXT1) + + + +extern void +tdfxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj); + +extern void +tdfxDDBindTexture(GLcontext * ctx, GLenum target, + struct gl_texture_object *tObj); + +extern void +tdfxDDDeleteTexture(GLcontext * ctx, struct gl_texture_object *tObj); + +extern GLboolean +tdfxDDIsTextureResident(GLcontext *ctx, struct gl_texture_object *tObj); + +extern void +tdfxDDTexturePalette(GLcontext * ctx, struct gl_texture_object *tObj); + +#if 000 /* DEAD? */ +extern void +fxDDTexUseGlobalPalette(GLcontext * ctx, GLboolean state); +#endif + +extern void +tdfxDDTexEnv(GLcontext * ctx, GLenum target, GLenum pname, + const GLfloat * param); + +extern void +tdfxDDTexParameter(GLcontext * ctx, GLenum target, + struct gl_texture_object *tObj, + GLenum pname, const GLfloat * params); + +extern const struct gl_texture_format * +tdfxDDChooseTextureFormat( GLcontext *ctx, GLint internalFormat, + GLenum srcFormat, GLenum srcType ); + +extern void +tdfxDDTexImage2D(GLcontext * ctx, GLenum target, GLint level, + GLint internalFormat, GLint width, GLint height, + GLint border, + GLenum format, GLenum type, const GLvoid * pixels, + const struct gl_pixelstore_attrib * packing, + struct gl_texture_object * texObj, + struct gl_texture_image * texImage); + +extern void +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 ); + +#if 000 +extern GLboolean +tdfxDDCompressedTexImage2D( 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 +tdfxDDCompressedTexSubImage2D( 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 ); +#endif + +extern GLboolean +tdfxDDTestProxyTexImage(GLcontext *ctx, GLenum target, + GLint level, GLint internalFormat, + GLenum format, GLenum type, + GLint width, GLint height, + GLint depth, GLint border); + +extern GLvoid * +tdfxDDGetTexImage(GLcontext * ctx, GLenum target, GLint level, + const struct gl_texture_object *texObj, + GLenum * formatOut, GLenum * typeOut, + GLboolean * freeImageOut); + +extern void +tdfxDDGetCompressedTexImage( GLcontext *ctx, GLenum target, + GLint lod, void *image, + const struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + +extern GLint +tdfxDDSpecificCompressedTexFormat(GLcontext *ctx, + GLint internalFormat, + GLint numDimensions); + +extern GLint +tdfxDDBaseCompressedTexFormat(GLcontext *ctx, + GLint internalFormat); + +extern GLboolean +tdfxDDIsCompressedFormat(GLcontext *ctx, GLint internalFormat); + +extern GLsizei +tdfxDDCompressedImageSize(GLcontext *ctx, + GLenum intFormat, + GLuint numDimensions, + GLuint width, + GLuint height, + GLuint depth); + #endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c:1.4 xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c:1.5 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c:1.4 Fri Aug 17 22:51:07 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c Fri Feb 22 16:45:04 2002 @@ -23,7 +23,7 @@ * 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.4 2001/08/18 02:51:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c,v 1.5 2002/02/22 21:45:04 dawes Exp $ */ /* * Original rewrite: @@ -39,871 +39,934 @@ #include "tdfx_tex.h" #include "tdfx_texman.h" -#define BAD_ADDRESS ((FxU32) -1) -/* Verify the consistancy of the texture memory manager. +#define BAD_ADDRESS ((FxU32) -1) + + +#if 0 /* DEBUG use */ +/* + * 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 ) +static void +VerifyFreeList(tdfxContextPtr fxMesa, FxU32 tmu) { - 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] ); + struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; + tdfxMemRange *block; + int prevStart = -1, prevEnd = -1; + int totalFree = 0; + int numObj = 0, numRes = 0; + int totalUsed = 0; + + for (block = shared->tmFree[tmu]; block; block = block->next) { + assert( block->endAddr > 0 ); + assert( block->startAddr <= shared->totalTexMem[tmu] ); + assert( block->endAddr <= shared->totalTexMem[tmu] ); + 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 == shared->freeTexMem[tmu]); + + { + struct gl_texture_object *obj; + for (obj = mesaShared->TexObjectList; obj; obj = obj->Next) { + tdfxTexInfo *ti = TDFX_TEXTURE_DATA(obj); + numObj++; + if (ti) { + if (ti->isInTM) { + numRes++; + assert(ti->tm[0]); + if (ti->tm[tmu]) + totalUsed += (ti->tm[tmu]->endAddr - ti->tm[tmu]->startAddr); + } + else { + assert(!ti->tm[0]); + } + } + } + } + + printf("totalFree: %d totalUsed: %d totalMem: %d #objs=%d #res=%d\n", + shared->freeTexMem[tmu], totalUsed, shared->totalTexMem[tmu], + numObj, numRes); + + assert(totalUsed + totalFree == shared->totalTexMem[tmu]); +} + + +static void +dump_texmem(tdfxContextPtr fxMesa) +{ + struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; + struct gl_texture_object *oldestObj, *obj, *lowestPriorityObj; + tdfxMemRange *r; + FxU32 prev; + + printf("DUMP Objects:\n"); + for (obj = mesaShared->TexObjectList; obj; obj = obj->Next) { + tdfxTexInfo *info = TDFX_TEXTURE_DATA(obj); + + if (info && info->isInTM) { + printf("Obj %8p: %4d info = %p\n", obj, obj->Name, info); + + printf(" isInTM=%d whichTMU=%d lastTimeUsed=%d\n", + info->isInTM, info->whichTMU, info->lastTimeUsed); + printf(" tm[0] = %p", info->tm[0]); + assert(info->tm[0]); + if (info->tm[0]) { + printf(" tm startAddr = %d endAddr = %d", + info->tm[0]->startAddr, + info->tm[0]->endAddr); + } + printf("\n"); + printf(" tm[1] = %p", info->tm[1]); + if (info->tm[1]) { + printf(" tm startAddr = %d endAddr = %d", + info->tm[1]->startAddr, + info->tm[1]->endAddr); + } + printf("\n"); + } + } + + VerifyFreeList(fxMesa, 0); + VerifyFreeList(fxMesa, 1); + + printf("Free memory unit 0: %d bytes\n", shared->freeTexMem[0]); + prev = 0; + for (r = shared->tmFree[0]; r; r = r->next) { + printf("%8p: start %8d end %8d size %8d gap %8d\n", r, r->startAddr, r->endAddr, r->endAddr - r->startAddr, r->startAddr - prev); + prev = r->endAddr; + } + + printf("Free memory unit 1: %d bytes\n", shared->freeTexMem[1]); + prev = 0; + for (r = shared->tmFree[1]; r; r = r->next) { + printf("%8p: start %8d end %8d size %8d gap %8d\n", r, r->startAddr, r->endAddr, r->endAddr - r->startAddr, r->startAddr - prev); + prev = r->endAddr; + } - 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; - } } +#endif + #ifdef TEXSANITY -static void fubar( void ) +static void +fubar(void) { - /* GH: What am I meant to do??? */ } -/* Sanity Check +/* + * Sanity Check */ -static void sanity( tdfxContextPtr fxMesa ) +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; - } + tdfxMemRange *tmp, *prev, *pos; - 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; - } + 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. +/* + * 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 ) +NewRangeNode(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; + struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; + tdfxMemRange *result; + + _glthread_LOCK_MUTEX(mesaShared->Mutex); + if (shared && shared->tmPool) { + result = shared->tmPool; + shared->tmPool = shared->tmPool->next; + } + else { + result = MALLOC(sizeof(tdfxMemRange)); + + } + _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 range; + return result; } -/* Initialize texture memory. We take care of one or both TMU's here. +/* + * Initialize texture memory. + * We take care of one or both TMU's here. */ -void tdfxTMInit( tdfxContextPtr fxMesa ) +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 = fxMesa->Glide.grGetString( GR_EXTENSION ); - - if ( strstr( extensions, " TEXUMA " ) ) { - FxU32 start, end; - - tss->umaTexMemory = GL_TRUE; - - fxMesa->Glide.grEnable( GR_TEXTURE_UMA_EXT ); - - start = fxMesa->Glide.grTexMinAddress( 0 ); - end = fxMesa->Glide.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 = fxMesa->Glide.grTexMinAddress( unit ); - end = fxMesa->Glide.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 ); - } + if (!fxMesa->glCtx->Shared->DriverData) { + const char *extensions; + struct tdfxSharedState *shared = CALLOC_STRUCT(tdfxSharedState); + if (!shared) + return; + + LOCK_HARDWARE(fxMesa); + extensions = fxMesa->Glide.grGetString(GR_EXTENSION); + UNLOCK_HARDWARE(fxMesa); + if (strstr(extensions, "TEXUMA")) { + FxU32 start, end; + shared->umaTexMemory = GL_TRUE; + LOCK_HARDWARE(fxMesa); + fxMesa->Glide.grEnable(GR_TEXTURE_UMA_EXT); + start = fxMesa->Glide.grTexMinAddress(0); + end = fxMesa->Glide.grTexMaxAddress(0); + UNLOCK_HARDWARE(fxMesa); + shared->totalTexMem[0] = end - start; + shared->totalTexMem[1] = 0; + shared->freeTexMem[0] = end - start; + shared->freeTexMem[1] = 0; + shared->tmFree[0] = NewRangeNode(fxMesa, start, end); + shared->tmFree[1] = NULL; + /*printf("UMA tex memory: %d\n", (int) (end - start));*/ + } + else { + const int numTMUs = fxMesa->haveTwoTMUs ? 2 : 1; + int tmu; + shared->umaTexMemory = GL_FALSE; + LOCK_HARDWARE(fxMesa); + for (tmu = 0; tmu < numTMUs; tmu++) { + FxU32 start = fxMesa->Glide.grTexMinAddress(tmu); + FxU32 end = fxMesa->Glide.grTexMaxAddress(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));*/ + } + UNLOCK_HARDWARE(fxMesa); + } + + shared->tmPool = NULL; + fxMesa->glCtx->Shared->DriverData = shared; + /*printf("Texture memory init UMA: %d\n", shared->umaTexMemory);*/ + } } -/* Clean-up texture memory before destroying context. +/* + * Clean-up texture memory before destroying context. */ -void tdfxTMClose( tdfxContextPtr fxMesa ) +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; - } + if (fxMesa->glCtx->Shared->RefCount == 1 && fxMesa->driDrawable) { + /* 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; + tdfxMemRange *tmp, *next; + + /* Deallocate the pool of free tdfxMemRange nodes */ + tmp = shared->tmPool; + while (tmp) { + next = tmp->next; + FREE(tmp); + tmp = next; + } + + /* Delete the texture memory block tdfxMemRange 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; + } } -/* Delete a tdfxMemRange struct. +/* + * 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) +#if 0 +static void +DeleteRangeNode_NoLock(struct TdfxSharedState *shared, tdfxMemRange *range) +{ + /* insert at head of list */ + range->next = shared->tmPool; + shared->tmPool = range; +} +#endif -/* When we've run out of texture memory we have to throw out an +#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 * -tdfxTMFindOldestObject( tdfxContextPtr fxMesa, FxU32 unit ) +FindOldestObject(tdfxContextPtr fxMesa, FxU32 tmu) { - 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; - } + 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) { + tdfxTexInfo *info = TDFX_TEXTURE_DATA(obj); + + if (info && info->isInTM && + ((info->whichTMU == tmu) || (info->whichTMU == TDFX_TMU_BOTH) || + (info->whichTMU == TDFX_TMU_SPLIT))) { + GLuint age, lasttime; + + assert(info->tm[0]); + 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; + } +} + + +#if 0 +static void +FlushTexMemory(tdfxContextPtr fxMesa) +{ + struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; + struct gl_texture_object *obj; + + for (obj = mesaShared->TexObjectList; obj; obj = obj->Next) { + if (obj->RefCount < 2) { + /* don't flush currently bound textures */ + tdfxTMMoveOutTM_NoLock(fxMesa, obj); + } + } } +#endif -/* Find the address (offset?) at which we can store a new texture. - * is the texture unit. +/* + * 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 ) +static FxU32 +FindStartAddr(tdfxContextPtr fxMesa, FxU32 tmu, 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; - } - } + struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; + tdfxMemRange *prev, *block; + FxU32 result; +#if 0 + int discardedCount = 0; +#define MAX_DISCARDS 10 +#endif - /* never get here, but play it safe */ - _glthread_UNLOCK_MUTEX( ss->Mutex ); - return BAD_ADDRESS; + if (shared->umaTexMemory) { + assert(tmu == TDFX_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; + } + /* We failed to find a block large enough to accomodate bytes. + * Find the oldest texObject and free it. + */ +#if 0 + discardedCount++; + if (discardedCount > MAX_DISCARDS + 1) { + _mesa_problem(NULL, "tdfx driver: extreme texmem fragmentation"); + _glthread_UNLOCK_MUTEX(mesaShared->Mutex); + return BAD_ADDRESS; + } + else if (discardedCount > MAX_DISCARDS) { + /* texture memory is probably really fragmented, flush it */ + FlushTexMemory(fxMesa); + } + else +#endif + { + struct gl_texture_object *obj = FindOldestObject(fxMesa, tmu); + if (obj) { + tdfxTMMoveOutTM_NoLock(fxMesa, obj); + fxMesa->stats.texSwaps++; + } + else { + _mesa_problem(NULL, "tdfx driver: extreme texmem fragmentation"); + _glthread_UNLOCK_MUTEX(mesaShared->Mutex); + return BAD_ADDRESS; + } + } + } + + /* never get here, but play it safe */ + _glthread_UNLOCK_MUTEX(mesaShared->Mutex); + return BAD_ADDRESS; } -/* Remove the given tdfxMemRange node from hardware texture memory. +/* + * Remove the given tdfxMemRange node from hardware texture memory. */ -static void tdfxTMRemoveRangeLocked( tdfxContextPtr fxMesa, - FxU32 unit, tdfxMemRange *range ) +static void +RemoveRange_NoLock(tdfxContextPtr fxMesa, FxU32 tmu, 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; - } + struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; + tdfxMemRange *block, *prev; + + if (shared->umaTexMemory) { + assert(tmu == TDFX_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 tdfxMemRange node */ + prev = NULL; + block = shared->tmFree[tmu]; + 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(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; + } +} + + +#if 0 /* NOT USED */ +static void +RemoveRange(tdfxContextPtr fxMesa, FxU32 tmu, tdfxMemRange *range) +{ + struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + _glthread_LOCK_MUTEX(mesaShared->Mutex); + RemoveRange_NoLock(fxMesa, tmu, range); + _glthread_UNLOCK_MUTEX(mesaShared->Mutex); } +#endif -/* Allocate space for a texture image. +/* + * 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 ) +AllocTexMem(tdfxContextPtr fxMesa, FxU32 tmu, FxU32 texmemsize) { - 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; - - fxMesa->Glide.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; - - fxMesa->Glide.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 ); - - fxMesa->Glide.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; - - fxMesa->Glide.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 ); - - fxMesa->Glide.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; - } + FxU32 startAddr; + startAddr = FindStartAddr(fxMesa, tmu, texmemsize); + if (startAddr == BAD_ADDRESS) { + char err[100]; + sprintf(err, "AllocTexMem returned NULL! tmu=%d texmemsize=%d\n", + (int) tmu, (int) texmemsize); + _mesa_problem(fxMesa->glCtx, err); + return NULL; + } + else { + tdfxMemRange *range; + range = NewRangeNode(fxMesa, startAddr, startAddr + texmemsize); + return range; + } } -void tdfxTMReloadMipMapLevelLocked( GLcontext *ctx, - struct gl_texture_object *tObj, - GLint level ) -{ - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - 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: - fxMesa->Glide.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: - fxMesa->Glide.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 ); - - fxMesa->Glide.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: - fxMesa->Glide.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 ); - - fxMesa->Glide.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; - } +/* + * Download (copy) the given texture data (all mipmap levels) into the + * Voodoo's texture memory. + * The texture memory must have already been allocated. + */ +void +tdfxTMDownloadTexture(tdfxContextPtr fxMesa, struct gl_texture_object *tObj) +{ + tdfxTexInfo *ti; + GLint l; + FxU32 targetTMU; + + assert(tObj); + ti = TDFX_TEXTURE_DATA(tObj); + assert(ti); + targetTMU = ti->whichTMU; + + switch (targetTMU) { + case TDFX_TMU0: + case TDFX_TMU1: + if (ti->tm[targetTMU]) { + for (l = ti->minLevel; l <= ti->maxLevel + && tObj->Image[l]->Data; l++) { + GrLOD_t glideLod = ti->info.largeLodLog2 - l + tObj->BaseLevel; + fxMesa->Glide.grTexDownloadMipMapLevel(targetTMU, + ti->tm[targetTMU]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_BOTH, + tObj->Image[l]->Data); + } + } + break; + case TDFX_TMU_SPLIT: + if (ti->tm[TDFX_TMU0] && ti->tm[TDFX_TMU1]) { + for (l = ti->minLevel; l <= ti->maxLevel + && tObj->Image[l]->Data; l++) { + GrLOD_t glideLod = ti->info.largeLodLog2 - l + tObj->BaseLevel; + fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU0, + ti->tm[TDFX_TMU0]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_ODD, + tObj->Image[l]->Data); + + fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU1, + ti->tm[TDFX_TMU1]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_EVEN, + tObj->Image[l]->Data); + } + } + break; + case TDFX_TMU_BOTH: + if (ti->tm[TDFX_TMU0] && ti->tm[TDFX_TMU1]) { + for (l = ti->minLevel; l <= ti->maxLevel + && tObj->Image[l]->Data; l++) { + GrLOD_t glideLod = ti->info.largeLodLog2 - l + tObj->BaseLevel; + fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU0, + ti->tm[TDFX_TMU0]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_BOTH, + tObj->Image[l]->Data); + + fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU1, + ti->tm[TDFX_TMU1]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_BOTH, + tObj->Image[l]->Data); + } + } + break; + default: + _mesa_problem(NULL, "error in tdfxTMDownloadTexture: bad tmu"); + return; + } +} + + +void +tdfxTMReloadMipMapLevel(GLcontext *ctx, struct gl_texture_object *tObj, + GLint level) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj); + GrLOD_t glideLod; + FxU32 tmu; + + tmu = ti->whichTMU; + glideLod = ti->info.largeLodLog2 - level + tObj->BaseLevel; + ASSERT(ti->isInTM); + + LOCK_HARDWARE(fxMesa); + + switch (tmu) { + case TDFX_TMU0: + case TDFX_TMU1: + fxMesa->Glide.grTexDownloadMipMapLevel(tmu, + ti->tm[tmu]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_BOTH, + tObj->Image[level]->Data); + break; + case TDFX_TMU_SPLIT: + fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU0, + ti->tm[GR_TMU0]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_ODD, + tObj->Image[level]->Data); + + fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU1, + ti->tm[GR_TMU1]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_EVEN, + tObj->Image[level]->Data); + break; + case TDFX_TMU_BOTH: + fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU0, + ti->tm[GR_TMU0]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_BOTH, + tObj->Image[level]->Data); + + fxMesa->Glide.grTexDownloadMipMapLevel(GR_TMU1, + ti->tm[GR_TMU1]->startAddr, + glideLod, + ti->info.largeLodLog2, + ti->info.aspectRatioLog2, + ti->info.format, + GR_MIPMAPLEVELMASK_BOTH, + tObj->Image[level]->Data); + break; + + default: + _mesa_problem(ctx, "error in tdfxTMReloadMipMapLevel(): wrong tmu"); + break; + } + UNLOCK_HARDWARE(fxMesa); } -/* Allocate space for the given texture in texture memory then +/* + * 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; +void +tdfxTMMoveInTM_NoLock( tdfxContextPtr fxMesa, struct gl_texture_object *tObj, + FxU32 targetTMU ) +{ + tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj); + FxU32 texmemsize; + + fxMesa->stats.reqTexUpload++; + + if (ti->isInTM) { + if (ti->whichTMU == targetTMU) + return; + if (targetTMU == TDFX_TMU_SPLIT || ti->whichTMU == TDFX_TMU_SPLIT) { + tdfxTMMoveOutTM_NoLock(fxMesa, tObj); + } + else { + if (ti->whichTMU == TDFX_TMU_BOTH) + return; + targetTMU = TDFX_TMU_BOTH; + } + } + + ti->whichTMU = targetTMU; + + switch (targetTMU) { + case TDFX_TMU0: + case TDFX_TMU1: + texmemsize = fxMesa->Glide.grTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, + &(ti->info)); + ti->tm[targetTMU] = AllocTexMem(fxMesa, targetTMU, texmemsize); + break; + case TDFX_TMU_SPLIT: + texmemsize = fxMesa->Glide.grTexTextureMemRequired(GR_MIPMAPLEVELMASK_ODD, + &(ti->info)); + ti->tm[TDFX_TMU0] = AllocTexMem(fxMesa, TDFX_TMU0, texmemsize); + if (ti->tm[TDFX_TMU0]) + fxMesa->stats.memTexUpload += texmemsize; + + texmemsize = fxMesa->Glide.grTexTextureMemRequired(GR_MIPMAPLEVELMASK_EVEN, + &(ti->info)); + ti->tm[TDFX_TMU1] = AllocTexMem(fxMesa, TDFX_TMU1, texmemsize); + break; + case TDFX_TMU_BOTH: + texmemsize = fxMesa->Glide.grTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, + &(ti->info)); + ti->tm[TDFX_TMU0] = AllocTexMem(fxMesa, TDFX_TMU0, texmemsize); + if (ti->tm[TDFX_TMU0]) + fxMesa->stats.memTexUpload += texmemsize; + + texmemsize = fxMesa->Glide.grTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, + &(ti->info)); + ti->tm[TDFX_TMU1] = AllocTexMem(fxMesa, TDFX_TMU1, texmemsize); + break; + default: + _mesa_problem(NULL, "error in tdfxTMMoveInTM() -> bad tmu (%d)"); + return; + } - fxMesa->stats.reqTexUpload++; + ti->reloadImages = GL_TRUE; + ti->isInTM = GL_TRUE; - 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 = fxMesa->Glide.grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); - t->range[targetTMU] = tdfxTMAllocTexMem(fxMesa, targetTMU, size); - break; - - case TDFX_TMU_SPLIT: - size = fxMesa->Glide.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 = fxMesa->Glide.grTexTextureMemRequired( GR_MIPMAPLEVELMASK_EVEN, &t->info ); - t->range[TDFX_TMU1] = tdfxTMAllocTexMem( fxMesa, TDFX_TMU1, size ); - break; - - case TDFX_TMU_BOTH: - size = fxMesa->Glide.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 = fxMesa->Glide.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++; + fxMesa->stats.texUpload++; } -/* Move the given texture out of hardware texture memory. +/* + * 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 ) +void +tdfxTMMoveOutTM_NoLock( 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 ); - } + struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; + tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj); + + if (MESA_VERBOSE & VERBOSE_DRIVER) { + fprintf(stderr, "fxmesa: fxTMMoveOutTM(%p (%d))\n", tObj, tObj->Name); + } + + /* + VerifyFreeList(fxMesa, 0); + VerifyFreeList(fxMesa, 1); + */ + + if (!ti || !ti->isInTM) + return; + + switch (ti->whichTMU) { + case TDFX_TMU0: + case TDFX_TMU1: + RemoveRange_NoLock(fxMesa, ti->whichTMU, ti->tm[ti->whichTMU]); + break; + case TDFX_TMU_SPLIT: + case TDFX_TMU_BOTH: + assert(!shared->umaTexMemory); + RemoveRange_NoLock(fxMesa, TDFX_TMU0, ti->tm[TDFX_TMU0]); + RemoveRange_NoLock(fxMesa, TDFX_TMU1, ti->tm[TDFX_TMU1]); + break; + default: + _mesa_problem(NULL, "tdfx driver: bad tmu in tdfxTMMOveOutTM()"); + return; + } + + ti->isInTM = GL_FALSE; + ti->tm[0] = NULL; + ti->tm[1] = NULL; + ti->whichTMU = TDFX_TMU_NONE; + + /* + VerifyFreeList(fxMesa, 0); + VerifyFreeList(fxMesa, 1); + */ } -void tdfxTMFreeTextureLocked( tdfxContextPtr fxMesa, - struct gl_texture_object *tObj ) +/* + * Called via glDeleteTexture to delete a texture object. + */ +void +tdfxTMFreeTexture(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 ); - } + tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj); + if (ti) { + tdfxTMMoveOutTM(fxMesa, tObj); + FREE(ti); + tObj->DriverData = NULL; + } + /* + VerifyFreeList(fxMesa, 0); + VerifyFreeList(fxMesa, 1); + */ } + -/* After a context switch this function will be called to restore +/* + * After a context switch this function will be called to restore * texture memory for the new context. */ -void tdfxTMRestoreTexturesLocked( tdfxContextPtr fxMesa ) +void tdfxTMRestoreTextures_NoLock( 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 ) { + tdfxTexInfo *ti = TDFX_TEXTURE_DATA( tObj ); + if ( ti && ti->isInTM ) { for ( i = 0 ; i < MAX_TEXTURE_UNITS ; i++ ) { - if ( ctx->Texture.Unit[i].Current == tObj ) { - tdfxTMDownloadTextureLocked( fxMesa, tObj ); + if ( ctx->Texture.Unit[i]._Current == tObj ) { + tdfxTMDownloadTexture( fxMesa, tObj ); break; } } if ( i == MAX_TEXTURE_UNITS ) { - tdfxTMMoveOutTMLocked( fxMesa, tObj ); + tdfxTMMoveOutTM_NoLock( fxMesa, tObj ); } } - } - - if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) { - tdfxTMVerifyFreeList( fxMesa, 0 ); - tdfxTMVerifyFreeList( fxMesa, 1 ); } + /* + VerifyFreeList(fxMesa, 0); + VerifyFreeList(fxMesa, 1); + */ } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h Fri Feb 22 16:45:04 2002 @@ -23,7 +23,7 @@ * 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 $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.h,v 1.2 2002/02/22 21:45:04 dawes Exp $ */ /* * Original rewrite: @@ -38,39 +38,47 @@ #ifndef __TDFX_TEXMAN_H__ #define __TDFX_TEXMAN_H__ + #include "tdfx_lock.h" + extern void tdfxTMInit( tdfxContextPtr fxMesa ); + extern void tdfxTMClose( tdfxContextPtr fxMesa ); + +extern void tdfxTMDownloadTexture(tdfxContextPtr fxMesa, + struct gl_texture_object *tObj); + +extern void tdfxTMReloadMipMapLevel( GLcontext *ctx, + struct gl_texture_object *tObj, + GLint level ); + +extern void tdfxTMMoveInTM_NoLock( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj, + FxU32 targetTMU ); + +extern void tdfxTMMoveOutTM_NoLock( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj ); + +extern void tdfxTMFreeTexture( tdfxContextPtr fxMesa, + struct gl_texture_object *tObj ); + +extern void tdfxTMRestoreTextures_NoLock( tdfxContextPtr fxMesa ); + + +#define tdfxTMMoveInTM( fxMesa, tObj, targetTMU ) \ + do { \ + LOCK_HARDWARE( fxMesa ); \ + tdfxTMMoveInTM_NoLock( fxMesa, tObj, targetTMU ); \ + UNLOCK_HARDWARE( fxMesa ); \ + } while (0) + +#define tdfxTMMoveOutTM( fxMesa, tObj ) \ + do { \ + LOCK_HARDWARE( fxMesa ); \ + tdfxTMMoveOutTM_NoLock( fxMesa, tObj ); \ + UNLOCK_HARDWARE( fxMesa ); \ + } while (0) -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 xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.c:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.c Fri Feb 22 16:45:04 2002 @@ -23,7 +23,7 @@ * 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 $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.c,v 1.2 2002/02/22 21:45:04 dawes Exp $ */ /* * Original rewrite: @@ -38,6 +38,7 @@ #include "tdfx_state.h" #include "tdfx_tex.h" #include "tdfx_texman.h" +#include "tdfx_texstate.h" /* ============================================================= @@ -656,7 +657,7 @@ texUnit->CombineOperandA[1], incomingAlpha); TEXENV_SETUP_MODE_A(Bmode_A, - texUnit->CombineOperandA[0]); + texUnit->CombineOperandA[1]); C_A = D_A = GR_CMBX_ZERO; Cinv_A = FXTRUE; Dinv_A = Ginv_A = FXFALSE; @@ -751,7 +752,7 @@ texUnit->CombineOperandA[2], incomingAlpha); Cinv_A = FXFALSE; - D_A = GR_CMBX_ZERO; + D_A = GR_CMBX_B; Dinv_A = Ginv_A = FXFALSE; break; default: @@ -798,7 +799,7 @@ break; default: - gl_problem(ctx, "Bad envMode in SetupTexEnvNapalm"); + _mesa_problem(ctx, "Bad envMode in SetupTexEnvNapalm"); } fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_ENV; @@ -1008,7 +1009,7 @@ break; default: - gl_problem(NULL, "bad texture env mode in SetupSingleTexEnvVoodoo3"); + _mesa_problem(NULL, "bad texture env mode in SetupSingleTexEnvVoodoo3"); } if (colorComb.Function != fxMesa->ColorCombine.Function || @@ -1250,7 +1251,7 @@ fxMesa->AlphaCombine.Invert = FXFALSE; } else { - /*gl_problem(ctx, "Unexpected dual texture mode encountered\n");*/ + /*_mesa_problem(ctx, "Unexpected dual texture mode encountered\n");*/ return GL_FALSE; } @@ -1269,105 +1270,105 @@ static void setupSingleTMU(tdfxContextPtr fxMesa, struct gl_texture_object *tObj) { + struct tdfxSharedState *shared = (struct tdfxSharedState *) fxMesa->glCtx->Shared->DriverData; + tdfxTexInfo *ti = TDFX_TEXTURE_DATA(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 (ti->isInTM && !shared->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); + if (ti->LODblend) { + if (ti->whichTMU != TDFX_TMU_SPLIT) + tdfxTMMoveOutTM_NoLock(fxMesa, tObj); } else { - if (t->whichTMU == TDFX_TMU_SPLIT) - tdfxTMMoveOutTMLocked(fxMesa, tObj); + if (ti->whichTMU == TDFX_TMU_SPLIT) + tdfxTMMoveOutTM_NoLock(fxMesa, tObj); } } /* Make sure we're loaded correctly */ - if (!t->isInTM) { + if (!ti->isInTM) { /* Have to download the texture */ - if (tss->umaTexMemory) { - tdfxTMMoveInTMLocked(fxMesa, tObj, TDFX_TMU0); + if (shared->umaTexMemory) { + tdfxTMMoveInTM_NoLock(fxMesa, tObj, TDFX_TMU0); } else { /* Voodoo3 (split texture memory) */ - if (t->LODblend) { - tdfxTMMoveInTMLocked(fxMesa, tObj, TDFX_TMU_SPLIT); + if (ti->LODblend) { + tdfxTMMoveInTM_NoLock(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); + if (fxMesa->haveTwoTMUs) { + GLint memReq = fxMesa->Glide.grTexTextureMemRequired( + GR_MIPMAPLEVELMASK_BOTH, &(ti->info)); + if (shared->freeTexMem[TDFX_TMU0] > memReq) { + tdfxTMMoveInTM_NoLock(fxMesa, tObj, TDFX_TMU0); } else { - tdfxTMMoveInTMLocked(fxMesa, tObj, TDFX_TMU1); + tdfxTMMoveInTM_NoLock(fxMesa, tObj, TDFX_TMU1); } } else #endif { - tdfxTMMoveInTMLocked( fxMesa, tObj, TDFX_TMU0 ); + tdfxTMMoveInTM_NoLock(fxMesa, tObj, TDFX_TMU0); } } } } - if (t->LODblend && t->whichTMU == TDFX_TMU_SPLIT) { + if (ti->LODblend && ti->whichTMU == TDFX_TMU_SPLIT) { /* mipmap levels split between texture banks */ GLint u; - if (t->info.format == GR_TEXFMT_P_8 && !ctx->Texture.SharedPalette) { + if (ti->info.format == GR_TEXFMT_P_8 && !ctx->Texture.SharedPalette) { fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; - fxMesa->TexPalette.Data = &(t->palette); + fxMesa->TexPalette.Data = &(ti->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].sClamp = ti->sClamp; + fxMesa->TexParams[u].tClamp = ti->tClamp; + fxMesa->TexParams[u].minFilt = ti->minFilt; + fxMesa->TexParams[u].magFilt = ti->magFilt; + fxMesa->TexParams[u].mmMode = ti->mmMode; + fxMesa->TexParams[u].LODblend = ti->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].StartAddress = ti->tm[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[0].Info = &(ti->info); + fxMesa->TexSource[1].StartAddress = ti->tm[TDFX_TMU1]->startAddr; fxMesa->TexSource[1].EvenOdd = GR_MIPMAPLEVELMASK_EVEN; - fxMesa->TexSource[1].Info = &(t->info); + fxMesa->TexSource[1].Info = &(ti->info); fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_SOURCE; } else { FxU32 tmu; - if (t->whichTMU == TDFX_TMU_BOTH) + if (ti->whichTMU == TDFX_TMU_BOTH) tmu = TDFX_TMU0; else - tmu = t->whichTMU; + tmu = ti->whichTMU; - if (tss->umaTexMemory) { - assert(t->whichTMU == TDFX_TMU0); + if (shared->umaTexMemory) { + assert(ti->whichTMU == TDFX_TMU0); assert(tmu == TDFX_TMU0); } - if (t->info.format == GR_TEXFMT_P_8 && !ctx->Texture.SharedPalette) { + if (ti->info.format == GR_TEXFMT_P_8 && !ctx->Texture.SharedPalette) { fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; - fxMesa->TexPalette.Data = &(t->palette); + fxMesa->TexPalette.Data = &(ti->palette); fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; } @@ -1376,18 +1377,18 @@ * 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 || + if (fxMesa->TexParams[tmu].sClamp != ti->sClamp || + fxMesa->TexParams[tmu].tClamp != ti->tClamp || + fxMesa->TexParams[tmu].minFilt != ti->minFilt || + fxMesa->TexParams[tmu].magFilt != ti->magFilt || + fxMesa->TexParams[tmu].mmMode != ti->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].sClamp = ti->sClamp; + fxMesa->TexParams[tmu].tClamp = ti->tClamp; + fxMesa->TexParams[tmu].minFilt = ti->minFilt; + fxMesa->TexParams[tmu].magFilt = ti->magFilt; + fxMesa->TexParams[tmu].mmMode = ti->mmMode; fxMesa->TexParams[tmu].LODblend = FXFALSE; fxMesa->TexParams[tmu].LodBias = ctx->Texture.Unit[tmu].LodBias; fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PARAMS; @@ -1396,16 +1397,16 @@ /* 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; + if (ti->tm[tmu]) { + fxMesa->TexSource[tmu].StartAddress = ti->tm[tmu]->startAddr; fxMesa->TexSource[tmu].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; - fxMesa->TexSource[tmu].Info = &(t->info); + fxMesa->TexSource[tmu].Info = &(ti->info); fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_SOURCE; } } - fxMesa->sScale0 = t->sScale; - fxMesa->tScale0 = t->tScale; + fxMesa->sScale0 = ti->sScale; + fxMesa->tScale0 = ti->tScale; } static void @@ -1419,12 +1420,12 @@ 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; + if (fxMesa->haveTwoTMUs) { + const struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + const struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; int tmu; - if (tss->umaTexMemory) + if (shared->umaTexMemory) tmu = GR_TMU0; else tmu = GR_TMU1; @@ -1446,7 +1447,7 @@ fxMesa->TexCombine[0].FactorAlpha = GR_COMBINE_FACTOR_NONE; fxMesa->TexCombine[0].InvertRGB = FXFALSE; fxMesa->TexCombine[0].InvertAlpha = FXFALSE; - if ( fxMesa->numTMUs > 1 ) { + if (fxMesa->haveTwoTMUs) { fxMesa->TexCombine[1].FunctionRGB = GR_COMBINE_FUNCTION_ZERO; fxMesa->TexCombine[1].FactorRGB = GR_COMBINE_FACTOR_NONE; fxMesa->TexCombine[1].FunctionAlpha = GR_COMBINE_FUNCTION_ZERO; @@ -1480,19 +1481,19 @@ 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]; + struct gl_texture_object *tObj0 = ctx->Texture.Unit[0].Current2D; + struct gl_texture_object *tObj1 = ctx->Texture.Unit[1].Current2D; 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, + 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, + 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]); @@ -1510,48 +1511,39 @@ static void setupTextureSingleTMU(GLcontext * ctx, GLuint unit) { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - tdfxTexObjPtr t; + tdfxTexInfo *ti; 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; - } + tObj = ctx->Texture.Unit[unit].Current2D; if (tObj->Image[tObj->BaseLevel]->Border > 0) { - fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_BORDER; + FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_BORDER, GL_TRUE); return; } setupSingleTMU(fxMesa, tObj); - t = TDFX_TEXTURE_DATA(tObj); - if (t->whichTMU == TDFX_TMU_BOTH) + ti = TDFX_TEXTURE_DATA(tObj); + if (ti->whichTMU == TDFX_TMU_BOTH) tmu = TDFX_TMU0; else - tmu = t->whichTMU; + tmu = ti->whichTMU; if (fxMesa->tmuSrc != tmu) { - selectSingleTMUSrc(fxMesa, tmu, t->LODblend); + selectSingleTMUSrc(fxMesa, tmu, ti->LODblend); } - if (t->reloadImages) + if (ti->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 || + if (fxMesa->TexState.Enabled != ctx->Texture._ReallyEnabled || envMode != fxMesa->TexState.EnvMode[0] || envMode == GL_COMBINE_EXT || baseFormat != fxMesa->TexState.TexFormat[0]) { @@ -1560,7 +1552,7 @@ &ctx->Texture.Unit[unit], baseFormat, &fxMesa->TexCombineExt[0])) { /* software fallback */ - fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_ENV; + FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_ENV, GL_TRUE); } /* disable other unit */ otherEnv = &fxMesa->TexCombineExt[1]; @@ -1585,7 +1577,7 @@ otherEnv->Alpha.Shift = 0; otherEnv->Alpha.Invert = FXFALSE; - fxMesa->TexState.Enabled = ctx->Texture.ReallyEnabled; + fxMesa->TexState.Enabled = ctx->Texture._ReallyEnabled; fxMesa->TexState.EnvMode[0] = envMode; fxMesa->TexState.TexFormat[0] = baseFormat; fxMesa->TexState.EnvMode[1] = 0; @@ -1596,15 +1588,15 @@ /* Voodoo3 */ /* see if we really need to update the unit */ - if (fxMesa->TexState.Enabled != ctx->Texture.ReallyEnabled || + 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; + FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_ENV, GL_TRUE); } - fxMesa->TexState.Enabled = ctx->Texture.ReallyEnabled; + fxMesa->TexState.Enabled = ctx->Texture._ReallyEnabled; fxMesa->TexState.EnvMode[0] = envMode; fxMesa->TexState.TexFormat[0] = baseFormat; fxMesa->TexState.EnvMode[1] = 0; @@ -1626,35 +1618,35 @@ #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 struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + const struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; const GLcontext *ctx = fxMesa->glCtx; - tdfxTexObjPtr t0 = TDFX_TEXTURE_DATA(tObj0); - tdfxTexObjPtr t1 = TDFX_TEXTURE_DATA(tObj1); + tdfxTexInfo *ti0 = TDFX_TEXTURE_DATA(tObj0); + tdfxTexInfo *ti1 = 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 (shared->umaTexMemory) { + if (!ti0->isInTM) { + tdfxTMMoveInTM_NoLock(fxMesa, tObj0, TDFX_TMU0); + assert(ti0->isInTM); } - if (!t1->isInTM) { - tdfxTMMoveInTMLocked(fxMesa, tObj1, TDFX_TMU0); - assert(t1->isInTM); + if (!ti1->isInTM) { + tdfxTMMoveInTM_NoLock(fxMesa, tObj1, TDFX_TMU0); + assert(ti1->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 (ti0->whichTMU == TDFX_TMU1) + tdfxTMMoveOutTM_NoLock(fxMesa, tObj0); + if (ti1->whichTMU == TDFX_TMU0) + tdfxTMMoveOutTM_NoLock(fxMesa, tObj1); - if (t0->isInTM) { - switch (t0->whichTMU) { + if (ti0->isInTM) { + switch (ti0->whichTMU) { case TDFX_TMU0: tstate |= T0_IN_TMU0; break; @@ -1672,8 +1664,8 @@ else tstate |= T0_NOT_IN_TMU; - if (t1->isInTM) { - switch (t1->whichTMU) { + if (ti1->isInTM) { + switch (ti1->whichTMU) { case TDFX_TMU0: tstate |= T1_IN_TMU0; break; @@ -1696,7 +1688,7 @@ 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); + tdfxTMMoveInTM_NoLock(fxMesa, tObj1, TDFX_TMU_BOTH); } else { /* Find the minimal way to correct the situation */ @@ -1704,10 +1696,10 @@ /* 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); + tdfxTMMoveInTM_NoLock(fxMesa, tObj1, TDFX_TMU1); } else { - tdfxTMMoveInTMLocked(fxMesa, tObj0, TDFX_TMU0); + tdfxTMMoveInTM_NoLock(fxMesa, tObj0, TDFX_TMU0); } /* tmu0 and tmu1 are setup */ } @@ -1715,36 +1707,36 @@ /* 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); + tdfxTMMoveInTM_NoLock(fxMesa, tObj0, TDFX_TMU1); } else { - tdfxTMMoveInTMLocked(fxMesa, tObj1, TDFX_TMU0); + tdfxTMMoveInTM_NoLock(fxMesa, tObj1, TDFX_TMU0); } tmu0 = 1; tmu1 = 0; } else { /* Nothing is loaded */ - tdfxTMMoveInTMLocked(fxMesa, tObj0, TDFX_TMU0); - tdfxTMMoveInTMLocked(fxMesa, tObj1, TDFX_TMU1); + tdfxTMMoveInTM_NoLock(fxMesa, tObj0, TDFX_TMU0); + tdfxTMMoveInTM_NoLock(fxMesa, tObj1, TDFX_TMU1); /* tmu0 and tmu1 are setup */ } } } } - t0->lastTimeUsed = fxMesa->texBindNumber; - t1->lastTimeUsed = fxMesa->texBindNumber; + ti0->lastTimeUsed = fxMesa->texBindNumber; + ti1->lastTimeUsed = fxMesa->texBindNumber; if (!ctx->Texture.SharedPalette) { - if (t0->info.format == GR_TEXFMT_P_8) { + if (ti0->info.format == GR_TEXFMT_P_8) { fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; - fxMesa->TexPalette.Data = &(t0->palette); + fxMesa->TexPalette.Data = &(ti0->palette); fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; } - else if (t1->info.format == GR_TEXFMT_P_8) { + else if (ti1->info.format == GR_TEXFMT_P_8) { fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; - fxMesa->TexPalette.Data = &(t1->palette); + fxMesa->TexPalette.Data = &(ti1->palette); fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; } else { @@ -1755,25 +1747,25 @@ /* * Setup Unit 0 */ - assert(t0->isInTM); - assert(t0->range[tmu0]); - fxMesa->TexSource[tmu0].StartAddress = t0->range[tmu0]->startAddr; + assert(ti0->isInTM); + assert(ti0->tm[tmu0]); + fxMesa->TexSource[tmu0].StartAddress = ti0->tm[tmu0]->startAddr; fxMesa->TexSource[tmu0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; - fxMesa->TexSource[tmu0].Info = &(t0->info); + fxMesa->TexSource[tmu0].Info = &(ti0->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 || + if (fxMesa->TexParams[tmu0].sClamp != ti0->sClamp || + fxMesa->TexParams[tmu0].tClamp != ti0->tClamp || + fxMesa->TexParams[tmu0].minFilt != ti0->minFilt || + fxMesa->TexParams[tmu0].magFilt != ti0->magFilt || + fxMesa->TexParams[tmu0].mmMode != ti0->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].sClamp = ti0->sClamp; + fxMesa->TexParams[tmu0].tClamp = ti0->tClamp; + fxMesa->TexParams[tmu0].minFilt = ti0->minFilt; + fxMesa->TexParams[tmu0].magFilt = ti0->magFilt; + fxMesa->TexParams[tmu0].mmMode = ti0->mmMode; fxMesa->TexParams[tmu0].LODblend = FXFALSE; fxMesa->TexParams[tmu0].LodBias = ctx->Texture.Unit[tmu0].LodBias; fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PARAMS; @@ -1782,42 +1774,42 @@ /* * Setup Unit 1 */ - if (tss->umaTexMemory) { - ASSERT(t1->isInTM); - ASSERT(t1->range[0]); - fxMesa->TexSource[tmu1].StartAddress = t1->range[0]->startAddr; + if (shared->umaTexMemory) { + ASSERT(ti1->isInTM); + ASSERT(ti1->tm[0]); + fxMesa->TexSource[tmu1].StartAddress = ti1->tm[0]->startAddr; fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; - fxMesa->TexSource[tmu1].Info = &(t1->info); + fxMesa->TexSource[tmu1].Info = &(ti1->info); } else { - ASSERT(t1->isInTM); - ASSERT(t1->range[tmu1]); - fxMesa->TexSource[tmu1].StartAddress = t1->range[tmu1]->startAddr; + ASSERT(ti1->isInTM); + ASSERT(ti1->tm[tmu1]); + fxMesa->TexSource[tmu1].StartAddress = ti1->tm[tmu1]->startAddr; fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; - fxMesa->TexSource[tmu1].Info = &(t1->info); + fxMesa->TexSource[tmu1].Info = &(ti1->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 || + if (fxMesa->TexParams[tmu1].sClamp != ti1->sClamp || + fxMesa->TexParams[tmu1].tClamp != ti1->tClamp || + fxMesa->TexParams[tmu1].minFilt != ti1->minFilt || + fxMesa->TexParams[tmu1].magFilt != ti1->magFilt || + fxMesa->TexParams[tmu1].mmMode != ti1->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].sClamp = ti1->sClamp; + fxMesa->TexParams[tmu1].tClamp = ti1->tClamp; + fxMesa->TexParams[tmu1].minFilt = ti1->minFilt; + fxMesa->TexParams[tmu1].magFilt = ti1->magFilt; + fxMesa->TexParams[tmu1].mmMode = ti1->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; + fxMesa->sScale0 = ti0->sScale; + fxMesa->tScale0 = ti0->tScale; + fxMesa->sScale1 = ti1->sScale; + fxMesa->tScale1 = ti1->tScale; #undef T0_NOT_IN_TMU #undef T1_NOT_IN_TMU @@ -1830,30 +1822,27 @@ 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_object *tObj0 = ctx->Texture.Unit[0].Current2D; + struct gl_texture_object *tObj1 = ctx->Texture.Unit[1].Current2D; + tdfxTexInfo *ti0 = TDFX_TEXTURE_DATA(tObj0); + tdfxTexInfo *ti1 = 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; + if (baseImage0->Border > 0 || baseImage1->Border > 0) { + FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_BORDER, GL_TRUE); return; } setupDoubleTMU(fxMesa, tObj0, tObj1); - if (t0->reloadImages || t1->reloadImages) + if (ti0->reloadImages || ti1->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. @@ -1861,7 +1850,7 @@ GLboolean hw1 = GL_TRUE, hw2 = GL_TRUE; /* check if we really need to update glide unit 1 */ - if (fxMesa->TexState.Enabled != ctx->Texture.ReallyEnabled || + if (fxMesa->TexState.Enabled != ctx->Texture._ReallyEnabled || envMode0 != fxMesa->TexState.EnvMode[1] || envMode0 == GL_COMBINE_EXT || baseImage0->Format != fxMesa->TexState.TexFormat[1] || @@ -1873,7 +1862,7 @@ } /* check if we really need to update glide unit 0 */ - if (fxMesa->TexState.Enabled != ctx->Texture.ReallyEnabled || + if (fxMesa->TexState.Enabled != ctx->Texture._ReallyEnabled || envMode1 != fxMesa->TexState.EnvMode[0] || envMode1 == GL_COMBINE_EXT || baseImage1->Format != fxMesa->TexState.TexFormat[0] || @@ -1884,21 +1873,21 @@ fxMesa->TexState.TexFormat[0] = baseImage1->Format; } - fxMesa->TexState.Enabled = ctx->Texture.ReallyEnabled; + fxMesa->TexState.Enabled = ctx->Texture._ReallyEnabled; if (!hw1 || !hw2) { - fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_ENV; + FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_ENV, GL_TRUE); } } else { int unit0, unit1; - if ((t0->whichTMU == TDFX_TMU1) || (t1->whichTMU == TDFX_TMU0)) + if ((ti0->whichTMU == TDFX_TMU1) || (ti1->whichTMU == TDFX_TMU0)) unit0 = 1; else unit0 = 0; unit1 = 1 - unit0; - if (fxMesa->TexState.Enabled != ctx->Texture.ReallyEnabled || + if (fxMesa->TexState.Enabled != ctx->Texture._ReallyEnabled || envMode0 != fxMesa->TexState.EnvMode[unit0] || envMode0 == GL_COMBINE_EXT || envMode1 != fxMesa->TexState.EnvMode[unit1] || @@ -1910,47 +1899,50 @@ if (!SetupDoubleTexEnvVoodoo3(ctx, unit0, ctx->Texture.Unit[0].EnvMode, baseImage0->Format, ctx->Texture.Unit[1].EnvMode, baseImage1->Format)) { - fxMesa->Fallback |= TDFX_FALLBACK_TEXTURE_ENV; + FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_ENV, GL_TRUE); } 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; + fxMesa->TexState.Enabled = ctx->Texture._ReallyEnabled; } } } -void tdfxUpdateTextureState( GLcontext *ctx ) +void +tdfxUpdateTextureState( GLcontext *ctx ) { tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - GLuint enabled = ctx->Texture.ReallyEnabled; + GLuint tex2Denabled = ctx->Texture._ReallyEnabled; - if ( fxMesa->numTMUs == 1 ) - enabled &= TEXTURE0_2D; + if (!fxMesa->haveTwoTMUs) + tex2Denabled &= TEXTURE0_2D; - switch ( enabled ) { + FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_BORDER, GL_FALSE); + FALLBACK(fxMesa, TDFX_FALLBACK_TEXTURE_ENV, GL_FALSE); + + switch (tex2Denabled) { case TEXTURE0_2D: LOCK_HARDWARE( fxMesa ); /* XXX remove locking eventually */ - setupTextureSingleTMU( ctx, 0 ); + setupTextureSingleTMU(ctx, 0); UNLOCK_HARDWARE( fxMesa ); break; case TEXTURE1_2D: LOCK_HARDWARE( fxMesa ); - setupTextureSingleTMU( ctx, 1 ); + setupTextureSingleTMU(ctx, 1); UNLOCK_HARDWARE( fxMesa ); break; - case TEXTURE0_2D | TEXTURE1_2D: + case (TEXTURE0_2D | TEXTURE1_2D): LOCK_HARDWARE( fxMesa ); - setupTextureDoubleTMU( ctx ); + setupTextureDoubleTMU(ctx); UNLOCK_HARDWARE( fxMesa ); break; - default: - /* Disable hardware texturing */ - if ( TDFX_IS_NAPALM( fxMesa ) ) { + /* 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; @@ -1971,8 +1963,9 @@ fxMesa->AlphaCombineExt.InvertD = FXFALSE; fxMesa->AlphaCombineExt.Shift = 0; fxMesa->AlphaCombineExt.Invert = FXFALSE; - } else { - /* Voodoo 3 */ + } + else { + /* Voodoo 3*/ fxMesa->ColorCombine.Function = GR_COMBINE_FUNCTION_LOCAL; fxMesa->ColorCombine.Factor = GR_COMBINE_FACTOR_NONE; fxMesa->ColorCombine.Local = GR_COMBINE_LOCAL_ITERATED; @@ -1995,103 +1988,106 @@ } -/* This is a special case of texture state update. + +/* + * 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 ) +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 ) { + struct gl_texture_object *tObj0 = ctx->Texture.Unit[0].Current2D; + struct gl_texture_object *tObj1 = ctx->Texture.Unit[1].Current2D; + tdfxTexInfo *ti0 = TDFX_TEXTURE_DATA(tObj0); + tdfxTexInfo *ti1 = TDFX_TEXTURE_DATA(tObj1); + + const struct gl_shared_state *mesaShared = fxMesa->glCtx->Shared; + const struct tdfxSharedState *shared = (struct tdfxSharedState *) mesaShared->DriverData; + + if (ti0) { + fxMesa->sScale0 = ti0->sScale; + fxMesa->tScale0 = ti0->tScale; + if (ti0->info.format == GR_TEXFMT_P_8) { fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; - fxMesa->TexPalette.Data = &t0->palette; + fxMesa->TexPalette.Data = &(ti0->palette); fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; - } else if ( t1 && t1->info.format == GR_TEXFMT_P_8 ) { + } + else if (ti1 && ti1->info.format == GR_TEXFMT_P_8) { fxMesa->TexPalette.Type = GR_TEXTABLE_PALETTE_6666_EXT; - fxMesa->TexPalette.Data = &t1->palette; + fxMesa->TexPalette.Data = &(ti1->palette); fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_PALETTE; } } - if ( t1 ) { - fxMesa->sScale1 = t1->sScale; - fxMesa->tScale1 = t1->tScale; + if (ti1) { + fxMesa->sScale1 = ti1->sScale; + fxMesa->tScale1 = ti1->tScale; } - switch ( ctx->Texture.ReallyEnabled ) { - case TEXTURE0_2D: - if ( tss->umaTexMemory ) { - fxMesa->TexSource[0].StartAddress = t0->range[0]->startAddr; + if (ctx->Texture._ReallyEnabled == TEXTURE0_2D) { + if (shared->umaTexMemory) { + fxMesa->TexSource[0].StartAddress = ti0->tm[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].Info = &(ti0->info); + } + else { + if (ti0->LODblend && ti0->whichTMU == TDFX_TMU_SPLIT) { + fxMesa->TexSource[0].StartAddress = ti0->tm[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[0].Info = &(ti0->info); + fxMesa->TexSource[1].StartAddress = ti0->tm[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[1].Info = &(ti0->info); + } + else { + FxU32 tmu; + if (ti0->whichTMU == TDFX_TMU_BOTH) + tmu = TDFX_TMU0; + else + tmu = ti0->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; + if (ti0->tm[tmu]) { + fxMesa->TexSource[tmu].StartAddress = ti0->tm[tmu]->startAddr; + fxMesa->TexSource[tmu].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; + fxMesa->TexSource[tmu].Info = &(ti0->info); } } } - break; - - case TEXTURE1_2D: - if ( tss->umaTexMemory ) { - fxMesa->TexSource[0].StartAddress = t1->range[0]->startAddr; + } + else if (ctx->Texture._ReallyEnabled == TEXTURE1_2D) { + if (shared->umaTexMemory) { + fxMesa->TexSource[0].StartAddress = ti1->tm[0]->startAddr; fxMesa->TexSource[0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; - fxMesa->TexSource[0].Info = &t1->info; + fxMesa->TexSource[0].Info = &(ti1->info); } - break; - - case TEXTURE0_2D | TEXTURE1_2D: - if ( tss->umaTexMemory ) { + } + else if (ctx->Texture._ReallyEnabled == (TEXTURE0_2D | TEXTURE1_2D)) { + if (shared->umaTexMemory) { const FxU32 tmu0 = 0, tmu1 = 1; - fxMesa->TexSource[tmu0].StartAddress = t0->range[0]->startAddr; + fxMesa->TexSource[tmu0].StartAddress = ti0->tm[0]->startAddr; fxMesa->TexSource[tmu0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; - fxMesa->TexSource[tmu0].Info = &t0->info; + fxMesa->TexSource[tmu0].Info = &(ti0->info); - fxMesa->TexSource[tmu1].StartAddress = t1->range[0]->startAddr; + fxMesa->TexSource[tmu1].StartAddress = ti1->tm[0]->startAddr; fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; - fxMesa->TexSource[tmu1].Info = &t1->info; + fxMesa->TexSource[tmu1].Info = &(ti1->info); } else { const FxU32 tmu0 = 0, tmu1 = 1; - fxMesa->TexSource[tmu0].StartAddress = t0->range[tmu0]->startAddr; + fxMesa->TexSource[tmu0].StartAddress = ti0->tm[tmu0]->startAddr; fxMesa->TexSource[tmu0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; - fxMesa->TexSource[tmu0].Info = &t0->info; + fxMesa->TexSource[tmu0].Info = &(ti0->info); - fxMesa->TexSource[tmu1].StartAddress = t1->range[tmu1]->startAddr; + fxMesa->TexSource[tmu1].StartAddress = ti1->tm[tmu1]->startAddr; fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH; - fxMesa->TexSource[tmu1].Info = &t1->info; + fxMesa->TexSource[tmu1].Info = &(ti1->info); } - break; } + fxMesa->dirty |= TDFX_UPLOAD_TEXTURE_SOURCE; } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.h:1.1 --- /dev/null Thu Feb 27 12:26:36 2003 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_texstate.h Fri Feb 22 16:45:04 2002 @@ -0,0 +1,44 @@ +/* -*- 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.h,v 1.1 2002/02/22 21:45:04 dawes Exp $ */ + +/* + * Original rewrite: + * Gareth Hughes , 29 Sep - 1 Oct 2000 + * + * Authors: + * Gareth Hughes + * Brian Paul + * + */ + +#ifndef __TDFX_TEXSTATE_H__ +#define __TDFX_TEXSTATE_H__ + +extern void tdfxUpdateTextureState( GLcontext *ctx ); +extern void tdfxUpdateTextureBinding( GLcontext *ctx ); + +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c:1.4 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c:1.2 Fri Aug 17 22:51:07 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c Wed Oct 30 07:52:01 2002 @@ -23,493 +23,1239 @@ * 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.2 2001/08/18 02:51:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c,v 1.4 2002/10/30 12:52:01 alanh Exp $ */ -/* - * Original rewrite: - * Gareth Hughes , 29 Sep - 1 Oct 2000 - * - * Authors: - * Gareth Hughes - * Brian Paul - * Keith Whitwell - * +/* Authors: + * Keith Whitwell */ + +#include +#include -#include "tdfx_context.h" +#include "glheader.h" +#include "mtypes.h" +#include "macros.h" +#include "colormac.h" + +#include "swrast/swrast.h" +#include "swrast_setup/swrast_setup.h" +#include "swrast_setup/ss_context.h" +#include "tnl/t_context.h" +#include "tnl/t_pipeline.h" + #include "tdfx_tris.h" +#include "tdfx_state.h" +#include "tdfx_vb.h" +#include "tdfx_lock.h" +#include "tdfx_render.h" + + +static void tdfxRasterPrimitive( GLcontext *ctx, GLenum prim ); +static void tdfxRenderPrimitive( GLcontext *ctx, GLenum prim ); + +/*********************************************************************** + * Macros for t_dd_tritmp.h to draw basic primitives * + ***********************************************************************/ + +#define TRI( a, b, c ) \ +do { \ + if (DO_FALLBACK) \ + fxMesa->draw_triangle( fxMesa, a, b, c ); \ + else \ + fxMesa->Glide.grDrawTriangle( a, b, c ); \ +} while (0) \ + +#define QUAD( a, b, c, d ) \ +do { \ + if (DO_FALLBACK) { \ + fxMesa->draw_triangle( fxMesa, a, b, d ); \ + fxMesa->draw_triangle( fxMesa, b, c, d ); \ + } else { \ + fxMesa->Glide.grDrawTriangle( a, b, d ); \ + fxMesa->Glide.grDrawTriangle( b, c, d ); \ + } \ +} while (0) + +#define LINE( v0, v1 ) \ +do { \ + if (DO_FALLBACK) \ + fxMesa->draw_line( fxMesa, v0, v1 ); \ + else { \ + v0->v.x += LINE_X_OFFSET - TRI_X_OFFSET; \ + v0->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; \ + v1->v.x += LINE_X_OFFSET - TRI_X_OFFSET; \ + v1->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; \ + fxMesa->Glide.grDrawLine( v0, v1 ); \ + v0->v.x -= LINE_X_OFFSET - TRI_X_OFFSET; \ + v0->v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; \ + v1->v.x -= LINE_X_OFFSET - TRI_X_OFFSET; \ + v1->v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; \ + } \ +} while (0) + +#define POINT( v0 ) \ +do { \ + if (DO_FALLBACK) \ + fxMesa->draw_point( fxMesa, v0 ); \ + else { \ + v0->v.x += PNT_X_OFFSET - TRI_X_OFFSET; \ + v0->v.y += PNT_Y_OFFSET - TRI_Y_OFFSET; \ + fxMesa->Glide.grDrawPoint( v0 ); \ + v0->v.x -= PNT_X_OFFSET - TRI_X_OFFSET; \ + v0->v.y -= PNT_Y_OFFSET - TRI_Y_OFFSET; \ + } \ +} while (0) + + +/*********************************************************************** + * Fallback to swrast for basic primitives * + ***********************************************************************/ + +/* Build an SWvertex from a hardware vertex. + * + * This code is hit only when a mix of accelerated and unaccelerated + * primitives are being drawn, and only for the unaccelerated + * primitives. + */ +static void +tdfx_translate_vertex( GLcontext *ctx, const tdfxVertex *src, SWvertex *dst) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if (fxMesa->vertexFormat == TDFX_LAYOUT_TINY) { + dst->win[0] = src->tv.x - fxMesa->x_offset; + dst->win[1] = src->tv.y - (fxMesa->screen_height - fxMesa->height - fxMesa->y_offset); + dst->win[2] = src->tv.z; + dst->win[3] = 1.0; + + dst->color[0] = src->tv.color.red; + dst->color[1] = src->tv.color.green; + dst->color[2] = src->tv.color.blue; + dst->color[3] = src->tv.color.alpha; + } + else { + GLfloat w = 1.0 / src->v.rhw; + + dst->win[0] = src->v.x - fxMesa->x_offset; + dst->win[1] = fxMesa->screen_height - fxMesa->y_offset - src->v.y; + dst->win[2] = src->v.z; + dst->win[3] = src->v.rhw; + + dst->color[0] = src->v.color.red; + dst->color[1] = src->v.color.green; + dst->color[2] = src->v.color.blue; + dst->color[3] = src->v.color.alpha; + + if (fxMesa->vertexFormat == TDFX_LAYOUT_PROJECT) { + dst->texcoord[0][0] = fxMesa->sScale0 * w * src->pv.tu0; + dst->texcoord[0][1] = fxMesa->tScale0 * w * src->pv.tv0; + dst->texcoord[0][3] = w * src->pv.tq0; + + if (fxMesa->SetupIndex & TDFX_TEX1_BIT) { + dst->texcoord[1][0] = fxMesa->sScale1 * w * src->pv.tu1; + dst->texcoord[1][1] = fxMesa->tScale1 * w * src->pv.tv1; + dst->texcoord[1][3] = w * src->pv.tq1; + } + } else if (fxMesa->SetupIndex & TDFX_TEX0_BIT) { + dst->texcoord[0][0] = fxMesa->sScale0 * w * src->v.tu0; + dst->texcoord[0][1] = fxMesa->tScale0 * w * src->v.tv0; + dst->texcoord[0][3] = 1.0; + + if (fxMesa->SetupIndex & TDFX_TEX1_BIT) { + dst->texcoord[1][0] = fxMesa->sScale1 * w * src->v.tu1; + dst->texcoord[1][1] = fxMesa->tScale1 * w * src->v.tv1; + dst->texcoord[1][3] = 1.0; + } + } + } + + dst->pointSize = ctx->Point._Size; +} + + +static void +tdfx_fallback_tri( tdfxContextPtr fxMesa, + tdfxVertex *v0, + tdfxVertex *v1, + tdfxVertex *v2 ) +{ + GLcontext *ctx = fxMesa->glCtx; + SWvertex v[3]; + tdfx_translate_vertex( ctx, v0, &v[0] ); + tdfx_translate_vertex( ctx, v1, &v[1] ); + tdfx_translate_vertex( ctx, v2, &v[2] ); + _swrast_Triangle( ctx, &v[0], &v[1], &v[2] ); +} + + +static void +tdfx_fallback_line( tdfxContextPtr fxMesa, + tdfxVertex *v0, + tdfxVertex *v1 ) +{ + GLcontext *ctx = fxMesa->glCtx; + SWvertex v[2]; + tdfx_translate_vertex( ctx, v0, &v[0] ); + tdfx_translate_vertex( ctx, v1, &v[1] ); + _swrast_Line( ctx, &v[0], &v[1] ); +} + + +static void +tdfx_fallback_point( tdfxContextPtr fxMesa, + tdfxVertex *v0 ) +{ + GLcontext *ctx = fxMesa->glCtx; + SWvertex v[1]; + tdfx_translate_vertex( ctx, v0, &v[0] ); + _swrast_Point( ctx, &v[0] ); +} + +/*********************************************************************** + * Functions to draw basic primitives * + ***********************************************************************/ + +static void tdfx_print_vertex( GLcontext *ctx, const tdfxVertex *v ) +{ + tdfxContextPtr imesa = TDFX_CONTEXT( ctx ); + + fprintf(stderr, "vertex at %p\n", v); + + if (imesa->vertexFormat == TDFX_LAYOUT_TINY) { + fprintf(stderr, "x %f y %f z %f\n", v->v.x, v->v.y, v->v.z); + fprintf(stderr, "r %d g %d b %d a %d\n", + v->tv.color.red, + v->tv.color.green, + v->tv.color.blue, + v->tv.color.alpha); + } + else { + fprintf(stderr, "x %f y %f z %f oow %f\n", + v->v.x, v->v.y, v->v.z, v->v.rhw); + fprintf(stderr, "r %d g %d b %d a %d\n", + v->v.color.red, + v->v.color.green, + v->v.color.blue, + v->v.color.alpha); + } + + fprintf(stderr, "\n"); +} + +#define DO_FALLBACK 0 + +/* Need to do clip loop at each triangle when mixing swrast and hw + * rendering. These functions are only used when mixed-mode rendering + * is occurring. + */ +static void tdfx_draw_quad( tdfxContextPtr fxMesa, + tdfxVertexPtr v0, + tdfxVertexPtr v1, + tdfxVertexPtr v2, + tdfxVertexPtr v3 ) +{ +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + BEGIN_CLIP_LOOP_LOCKED(fxMesa) { + QUAD( v0, v1, v2, v3 ); + } END_CLIP_LOOP_LOCKED(fxMesa); +} -#include "pipeline.h" -#include "vbindirect.h" +static void tdfx_draw_triangle( tdfxContextPtr fxMesa, + tdfxVertexPtr v0, + tdfxVertexPtr v1, + tdfxVertexPtr v2 ) +{ +/* fprintf(stderr, "%s\n", __FUNCTION__); */ +/* tdfx_print_vertex( fxMesa->glCtx, v0 ); */ +/* tdfx_print_vertex( fxMesa->glCtx, v1 ); */ +/* tdfx_print_vertex( fxMesa->glCtx, v2 ); */ + BEGIN_CLIP_LOOP_LOCKED(fxMesa) { + TRI( v0, v1, v2 ); + } END_CLIP_LOOP_LOCKED(fxMesa); +} + +static void tdfx_draw_line( tdfxContextPtr fxMesa, + tdfxVertexPtr v0, + tdfxVertexPtr v1 ) +{ + /* No support for wide lines (avoid wide/aa line fallback). + */ + BEGIN_CLIP_LOOP_LOCKED(fxMesa) { + LINE(v0, v1); + } END_CLIP_LOOP_LOCKED(fxMesa); +} + +static void tdfx_draw_point( tdfxContextPtr fxMesa, + tdfxVertexPtr v0 ) +{ + /* No support for wide points. + */ + BEGIN_CLIP_LOOP_LOCKED(fxMesa) { + POINT( v0 ); + } END_CLIP_LOOP_LOCKED(fxMesa); +} +#undef DO_FALLBACK + + +#define TDFX_UNFILLED_BIT 0x1 +#define TDFX_OFFSET_BIT 0x2 +#define TDFX_TWOSIDE_BIT 0x4 +#define TDFX_FLAT_BIT 0x8 +#define TDFX_FALLBACK_BIT 0x10 +#define TDFX_MAX_TRIFUNC 0x20 + static struct { - points_func points; - line_func line; + 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 DO_FALLBACK (IND & TDFX_FALLBACK_BIT) +#define DO_OFFSET (IND & TDFX_OFFSET_BIT) +#define DO_UNFILLED (IND & TDFX_UNFILLED_BIT) +#define DO_TWOSIDE (IND & TDFX_TWOSIDE_BIT) +#define DO_FLAT (IND & TDFX_FLAT_BIT) +#define DO_TRI 1 +#define DO_QUAD 1 +#define DO_LINE 1 +#define DO_POINTS 1 +#define DO_FULL_QUAD 1 + +#define HAVE_RGBA 1 +#define HAVE_SPEC 0 +#define HAVE_HW_FLATSHADE 0 +#define HAVE_BACK_COLORS 0 +#define VERTEX tdfxVertex +#define TAB rast_tab + +#define TDFX_COLOR( dst, src ) \ +do { \ + dst[0] = src[2]; \ + dst[1] = src[1]; \ + dst[2] = src[0]; \ + dst[3] = src[3]; \ +} while (0) +#define DEPTH_SCALE 1.0 +#define UNFILLED_TRI unfilled_tri +#define UNFILLED_QUAD unfilled_quad +#define VERT_X(_v) _v->v.x +#define VERT_Y(_v) _v->v.y +#define VERT_Z(_v) _v->v.z +#define AREA_IS_CCW( a ) (a < 0) +#define GET_VERTEX(e) (fxMesa->verts + (e<vertex_stride_shift)) + +#define VERT_SET_RGBA( v, c ) TDFX_COLOR( v->ub4[coloroffset], c ) +#define VERT_COPY_RGBA( v0, v1 ) v0->ui[coloroffset] = v1->ui[coloroffset] +#define VERT_SAVE_RGBA( idx ) color[idx] = v[idx]->ui[coloroffset] +#define VERT_RESTORE_RGBA( idx ) v[idx]->ui[coloroffset] = color[idx] + +#define LOCAL_VARS(n) \ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); \ + GLuint coloroffset = (fxMesa->vertexFormat == \ + TDFX_LAYOUT_TINY) ? 3 : 4; \ + GLuint color[n]; \ + (void) color; (void)coloroffset -#define IND (0) + + +/*********************************************************************** + * Functions to draw basic unfilled primitives * + ***********************************************************************/ + +#define RASTERIZE(x) if (fxMesa->raster_primitive != x) \ + tdfxRasterPrimitive( ctx, x ) +#define RENDER_PRIMITIVE fxMesa->render_primitive +#define IND TDFX_FALLBACK_BIT #define TAG(x) x -#include "tdfx_tritmp.h" +#include "tnl_dd/t_dd_unfilled.h" +#undef IND -#define IND (TDFX_FLAT_BIT) -#define TAG(x) x##_flat -#include "tdfx_tritmp.h" +/*********************************************************************** + * Functions to draw GL primitives * + ***********************************************************************/ + +#define IND (0) +#define TAG(x) x +#include "tnl_dd/t_dd_tritmp.h" #define IND (TDFX_OFFSET_BIT) #define TAG(x) x##_offset -#include "tdfx_tritmp.h" +#include "tnl_dd/t_dd_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" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (TDFX_TWOSIDE_BIT | TDFX_OFFSET_BIT) +#define IND (TDFX_TWOSIDE_BIT|TDFX_OFFSET_BIT) #define TAG(x) x##_twoside_offset -#include "tdfx_tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" -#define IND (TDFX_TWOSIDE_BIT | TDFX_OFFSET_BIT | TDFX_FLAT_BIT) +#define IND (TDFX_UNFILLED_BIT) +#define TAG(x) x##_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_OFFSET_BIT|TDFX_UNFILLED_BIT) +#define TAG(x) x##_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT|TDFX_UNFILLED_BIT) +#define TAG(x) x##_twoside_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT|TDFX_OFFSET_BIT|TDFX_UNFILLED_BIT) +#define TAG(x) x##_twoside_offset_unfilled +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_FALLBACK_BIT) +#define TAG(x) x##_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_OFFSET_BIT|TDFX_FALLBACK_BIT) +#define TAG(x) x##_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT|TDFX_FALLBACK_BIT) +#define TAG(x) x##_twoside_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT|TDFX_OFFSET_BIT|TDFX_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_UNFILLED_BIT|TDFX_FALLBACK_BIT) +#define TAG(x) x##_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_OFFSET_BIT|TDFX_UNFILLED_BIT|TDFX_FALLBACK_BIT) +#define TAG(x) x##_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT|TDFX_UNFILLED_BIT|TDFX_FALLBACK_BIT) +#define TAG(x) x##_twoside_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT|TDFX_OFFSET_BIT|TDFX_UNFILLED_BIT| \ + TDFX_FALLBACK_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback +#include "tnl_dd/t_dd_tritmp.h" + + +/* Tdfx doesn't support provoking-vertex flat-shading? + */ +#define IND (TDFX_FLAT_BIT) +#define TAG(x) x##_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_OFFSET_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_offset_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_twoside_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT|TDFX_OFFSET_BIT|TDFX_FLAT_BIT) #define TAG(x) x##_twoside_offset_flat -#include "tdfx_tritmp.h" +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_UNFILLED_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_unfilled_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_OFFSET_BIT|TDFX_UNFILLED_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_offset_unfilled_flat +#include "tnl_dd/t_dd_tritmp.h" -#define IND (TDFX_CLIPRECT_BIT) -#define TAG(x) x##_cliprect -#include "tdfx_tritmp.h" +#define IND (TDFX_TWOSIDE_BIT|TDFX_UNFILLED_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_twoside_unfilled_flat +#include "tnl_dd/t_dd_tritmp.h" -#define IND (TDFX_FLAT_BIT | TDFX_CLIPRECT_BIT) -#define TAG(x) x##_flat_cliprect -#include "tdfx_tritmp.h" +#define IND (TDFX_TWOSIDE_BIT|TDFX_OFFSET_BIT|TDFX_UNFILLED_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_twoside_offset_unfilled_flat +#include "tnl_dd/t_dd_tritmp.h" -#define IND (TDFX_OFFSET_BIT | TDFX_CLIPRECT_BIT) -#define TAG(x) x##_offset_cliprect -#include "tdfx_tritmp.h" +#define IND (TDFX_FALLBACK_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_fallback_flat +#include "tnl_dd/t_dd_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_OFFSET_BIT|TDFX_FALLBACK_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_offset_fallback_flat +#include "tnl_dd/t_dd_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_FALLBACK_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_twoside_fallback_flat +#include "tnl_dd/t_dd_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_FALLBACK_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_twoside_offset_fallback_flat +#include "tnl_dd/t_dd_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_UNFILLED_BIT|TDFX_FALLBACK_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_unfilled_fallback_flat +#include "tnl_dd/t_dd_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" +#define IND (TDFX_OFFSET_BIT|TDFX_UNFILLED_BIT|TDFX_FALLBACK_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_offset_unfilled_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" -static void tdfx_render_vb_points( struct vertex_buffer *VB, +#define IND (TDFX_TWOSIDE_BIT|TDFX_UNFILLED_BIT|TDFX_FALLBACK_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_twoside_unfilled_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" + +#define IND (TDFX_TWOSIDE_BIT|TDFX_OFFSET_BIT|TDFX_UNFILLED_BIT| \ + TDFX_FALLBACK_BIT|TDFX_FLAT_BIT) +#define TAG(x) x##_twoside_offset_unfilled_fallback_flat +#include "tnl_dd/t_dd_tritmp.h" + + +static void init_rast_tab( void ) +{ + init(); + init_offset(); + init_twoside(); + init_twoside_offset(); + init_unfilled(); + init_offset_unfilled(); + init_twoside_unfilled(); + init_twoside_offset_unfilled(); + init_fallback(); + init_offset_fallback(); + init_twoside_fallback(); + init_twoside_offset_fallback(); + init_unfilled_fallback(); + init_offset_unfilled_fallback(); + init_twoside_unfilled_fallback(); + init_twoside_offset_unfilled_fallback(); + + init_flat(); + init_offset_flat(); + init_twoside_flat(); + init_twoside_offset_flat(); + init_unfilled_flat(); + init_offset_unfilled_flat(); + init_twoside_unfilled_flat(); + init_twoside_offset_unfilled_flat(); + init_fallback_flat(); + init_offset_fallback_flat(); + init_twoside_fallback_flat(); + init_twoside_offset_fallback_flat(); + init_unfilled_fallback_flat(); + init_offset_unfilled_fallback_flat(); + init_twoside_unfilled_fallback_flat(); + init_twoside_offset_unfilled_fallback_flat(); +} + + +/**********************************************************************/ +/* Render whole begin/end objects */ +/**********************************************************************/ + + +/* Accelerate vertex buffer rendering when renderindex == 0 and + * there is no clipping. + */ + +static void tdfx_render_vb_points( GLcontext *ctx, GLuint start, GLuint count, - GLuint parity ) + GLuint flags ) { - GLcontext *ctx = VB->ctx; tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + GLuint shift = fxMesa->vertex_stride_shift; + char *fxVB = fxMesa->verts + (start << shift); + int stride = 1<v.x += PNT_X_OFFSET - TRI_X_OFFSET; + ((tdfxVertexPtr)tmp)->v.y += PNT_Y_OFFSET - TRI_Y_OFFSET; } + fxMesa->Glide.grDrawVertexArrayContiguous( GR_POINTS, count-start, - fxVB+start, sizeof(*fxVB)); + fxVB, stride); /* 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; + for (i = start, tmp = fxVB; i < count; i++, tmp += stride) { + ((tdfxVertexPtr)tmp)->v.x -= PNT_X_OFFSET - TRI_X_OFFSET; + ((tdfxVertexPtr)tmp)->v.y -= PNT_Y_OFFSET - TRI_Y_OFFSET; } } -static void tdfx_render_vb_line_strip( struct vertex_buffer *VB, +static void tdfx_render_vb_line_strip( GLcontext *ctx, GLuint start, GLuint count, - GLuint parity ) + GLuint flags ) { - tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); - tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint shift = fxMesa->vertex_stride_shift; + char *fxVB = fxMesa->verts + (start << shift); + int stride = 1<v.x += LINE_X_OFFSET - TRI_X_OFFSET; + ((tdfxVertexPtr)tmp)->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; } + fxMesa->Glide.grDrawVertexArrayContiguous( GR_LINE_STRIP, count-start, - fxVB+start, sizeof(*fxVB)); + fxVB, 1<v.x -= LINE_X_OFFSET - TRI_X_OFFSET; + ((tdfxVertexPtr)tmp)->v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; + } +} + +static void tdfx_render_vb_line_loop( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint shift = fxMesa->vertex_stride_shift; + char *fxVB = fxMesa->verts + (start << shift); + int stride = 1<v.x += LINE_X_OFFSET - TRI_X_OFFSET; + ((tdfxVertexPtr)tmp)->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; + } + + fxMesa->Glide.grDrawVertexArrayContiguous( GR_LINE_STRIP, count-j, + fxVB, 1<Glide.grDrawLine( fxMesa->verts + ((count - 1)<verts + (start<v.x -= LINE_X_OFFSET - TRI_X_OFFSET; + ((tdfxVertexPtr)tmp)->v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; } } -static void tdfx_render_vb_lines( struct vertex_buffer *VB, +static void tdfx_render_vb_lines( GLcontext *ctx, GLuint start, GLuint count, - GLuint parity ) + GLuint flags ) { - tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); - tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint shift = fxMesa->vertex_stride_shift; + char *fxVB = fxMesa->verts + (start << shift); + int stride = 1<v.x += LINE_X_OFFSET - TRI_X_OFFSET; + ((tdfxVertexPtr)tmp)->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; } + fxMesa->Glide.grDrawVertexArrayContiguous( GR_LINES, count-start, - fxVB+start, sizeof(*fxVB)); + fxVB, 1<v.x -= LINE_X_OFFSET - TRI_X_OFFSET; + ((tdfxVertexPtr)tmp)->v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; } } -static void tdfx_render_vb_triangles( struct vertex_buffer *VB, +static void tdfx_render_vb_triangles( GLcontext *ctx, GLuint start, GLuint count, - GLuint parity ) + GLuint flags ) { - tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); - tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint shift = fxMesa->vertex_stride_shift; + char *fxVB = fxMesa->verts + (start << shift); + (void) flags; + fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLES, count-start, - fxVB+start, sizeof(*fxVB)); - (void) parity; + fxVB, 1<ctx); - tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; - fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLE_STRIP, count-start, - fxVB+start, sizeof(*fxVB)); - (void) parity; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint shift = fxMesa->vertex_stride_shift; + char *fxVB = fxMesa->verts + (start << shift); + int mode; + (void) flags; + +/* fprintf(stderr, "%s/%d\n", __FUNCTION__, 1<Glide.grDrawVertexArrayContiguous( mode, count-start, + fxVB, 1<ctx); - tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint shift = fxMesa->vertex_stride_shift; + char *fxVB = fxMesa->verts + (start << shift); + (void) flags; + fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, count-start, - fxVB+start, sizeof(*fxVB) ); - (void) parity; + fxVB, 1<vertex_stride_shift; + char *fxVB = fxMesa->verts; + GLuint i; + (void) flags; + + for (i = start ; i < count-3 ; i += 4 ) { +#define VERT(x) (fxVB + ((x)<Glide.grDrawTriangle( VERT(i), VERT(i+1), VERT(i+3) ); + fxMesa->Glide.grDrawTriangle( VERT(i+1), VERT(i+2), VERT(i+3) ); +#undef VERT + } +} + +static void tdfx_render_vb_quad_strip( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint shift = fxMesa->vertex_stride_shift; + char *fxVB = fxMesa->verts + (start << shift); + (void) flags; + + count -= (count-start)&1; -static void tdfx_render_vb_poly( struct vertex_buffer *VB, + fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLE_STRIP, + count-start, fxVB, 1<ctx); - tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint shift = fxMesa->vertex_stride_shift; + char *fxVB = fxMesa->verts + (start << shift); + (void) flags; + fxMesa->Glide.grDrawVertexArrayContiguous( GR_POLYGON, count-start, - fxVB+start, sizeof(*fxVB)); - (void) parity; + fxVB, 1<Glide.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) +static void tdfx_render_vb_noop( GLcontext *ctx, + GLuint start, + GLuint count, + GLuint flags ) +{ + (void) (ctx && start && count && flags); +} -#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; \ - fxMesa->Glide.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) +static void (*tdfx_render_tab_verts[GL_POLYGON+2])(GLcontext *, + GLuint, + GLuint, + GLuint) = +{ + tdfx_render_vb_points, + tdfx_render_vb_lines, + tdfx_render_vb_line_loop, + tdfx_render_vb_line_strip, + tdfx_render_vb_triangles, + tdfx_render_vb_tri_strip, + tdfx_render_vb_tri_fan, + tdfx_render_vb_quads, + tdfx_render_vb_quad_strip, + tdfx_render_vb_poly, + tdfx_render_vb_noop, +}; + + +/**********************************************************************/ +/* Render whole (indexed) begin/end objects */ +/**********************************************************************/ + + +#define VERT(x) (tdfxVertex *)(vertptr + ((x)<Glide.grDrawPoint( VERT(ELT(start)) ); + +#define RENDER_LINE( v0, v1 ) \ + fxMesa->Glide.grDrawLine( VERT(v0), VERT(v1) ) + +#define RENDER_TRI( v0, v1, v2 ) \ + fxMesa->Glide.grDrawTriangle( VERT(v0), VERT(v1), VERT(v2) ) + +#define RENDER_QUAD( v0, v1, v2, v3 ) \ + tdfx_draw_quad( fxMesa, VERT(v0), VERT(v1), VERT(v2), VERT(v3) ) + +#define INIT(x) tdfxRenderPrimitive( ctx, x ) + +#undef LOCAL_VARS +#define LOCAL_VARS \ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); \ + GLubyte *vertptr = (GLubyte *)fxMesa->verts; \ + const GLuint vertshift = fxMesa->vertex_stride_shift; \ + const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \ + (void) elt; + +#define RESET_STIPPLE +#define RESET_OCCLUSION +#define PRESERVE_VB_DEFS -#define RENDER_TRI( i2, i1, i, pv, parity ) \ -do { \ - if (parity) fxMesa->Glide.grDrawTriangle( &v[elt[i1]], &v[elt[i2]], &v[elt[i]] ); \ - else fxMesa->Glide.grDrawTriangle( &v[elt[i2]], &v[elt[i1]], &v[elt[i]] ); \ -} while (0) +/* Elts, no clipping. + */ +#undef ELT +#undef TAG +#define TAG(x) tdfx_##x##_elts +#define ELT(x) elt[x] +#include "tnl_dd/t_dd_rendertmp.h" -#define RENDER_QUAD( i3, i2, i1, i, pv ) \ -do { \ - fxMesa->Glide.grDrawTriangle( &v[elt[i3]], &v[elt[i2]], &v[elt[i]] ); \ - fxMesa->Glide.grDrawTriangle( &v[elt[i2]], &v[elt[i1]], &v[elt[i]] ); \ -} while (0) -#define LOCAL_VARS \ - GLcontext *ctx = VB->ctx; \ - tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); \ - const GLuint *elt = VB->EltPtr->data; \ - tdfxVertexPtr v = TDFX_DRIVER_DATA(VB)->verts; \ - (void) v; (void) ctx; +/**********************************************************************/ +/* Render clipped primitives */ +/**********************************************************************/ -#define TAG(x) tdfx_##x##_elts -#include "render_tmp.h" -static void tdfxDDRenderEltsRaw( struct vertex_buffer *VB ) +static void tdfxRenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) { - 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 ); + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + TNLcontext *tnl = TNL_CONTEXT(ctx); + struct vertex_buffer *VB = &tnl->vb; + GLuint prim = fxMesa->render_primitive; + + /* Render the new vertices as an unclipped polygon. + */ + { + GLuint *tmp = VB->Elts; + VB->Elts = (GLuint *)elts; + tnl->Driver.Render.PrimTabElts[GL_POLYGON]( ctx, 0, n, PRIM_BEGIN|PRIM_END ); + VB->Elts = tmp; + } - ctx->Driver.RenderFinish( ctx ); - ctx->VB = OldVB; + /* Restore the render primitive + */ + if (prim != GL_POLYGON) + tnl->Driver.Render.PrimitiveNotify( ctx, prim ); } +static void tdfxRenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tnl->Driver.Render.Line( ctx, ii, jj ); +} -void tdfxDDTriangleFuncsInit( void ) +static void tdfxFastRenderClippedPoly( GLcontext *ctx, const GLuint *elts, + GLuint n ) { - init(); - init_flat(); - init_offset(); - init_offset_flat(); - init_twoside(); - init_twoside_flat(); - init_twoside_offset(); - init_twoside_offset_flat(); + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + GLubyte *vertptr = (GLubyte *)fxMesa->verts; + const GLuint vertshift = fxMesa->vertex_stride_shift; + const GLuint *start = (const GLuint *)VERT(elts[0]); + int i; - 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(); + for (i = 2 ; i < n ; i++) { + fxMesa->Glide.grDrawTriangle( VERT(elts[i-1]), VERT(elts[i]), start ); + } } +/**********************************************************************/ +/* Choose render functions */ +/**********************************************************************/ + -#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. +#define POINT_FALLBACK (DD_POINT_SMOOTH) +#define LINE_FALLBACK (DD_LINE_STIPPLE) +#define TRI_FALLBACK (DD_TRI_SMOOTH) +#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK|DD_TRI_STIPPLE) +#define ANY_RASTER_FLAGS (DD_FLATSHADE|DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET| \ + DD_TRI_UNFILLED) + + +/* All state referenced below: */ -void tdfxDDChooseRenderState( GLcontext *ctx ) +#define _TDFX_NEW_RENDERSTATE (_DD_NEW_POINT_SMOOTH | \ + _DD_NEW_LINE_STIPPLE | \ + _DD_NEW_TRI_SMOOTH | \ + _DD_NEW_FLATSHADE | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _DD_NEW_TRI_OFFSET | \ + _DD_NEW_TRI_STIPPLE | \ + _NEW_POLYGONSTIPPLE) + + +static void tdfxChooseRenderState(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; + TNLcontext *tnl = TNL_CONTEXT(ctx); + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint flags = ctx->_TriangleCaps; + GLuint index = 0; + + if (0) { + fxMesa->draw_point = tdfx_draw_point; + fxMesa->draw_line = tdfx_draw_line; + fxMesa->draw_triangle = tdfx_draw_triangle; + index |= TDFX_FALLBACK_BIT; } - 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 & (ANY_FALLBACK_FLAGS|ANY_RASTER_FLAGS)) { + if (flags & ANY_RASTER_FLAGS) { + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= TDFX_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= TDFX_OFFSET_BIT; + if (flags & DD_TRI_UNFILLED) index |= TDFX_UNFILLED_BIT; + if (flags & DD_FLATSHADE) index |= TDFX_FLAT_BIT; } - if ( flags & LINE_FALLBACK ) { - fxMesa->LineFunc = 0; - fxMesa->RenderVBRawTab = 0; - fxMesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; - fxMesa->RenderIndex |= TDFX_FALLBACK_BIT; - } + fxMesa->draw_point = tdfx_draw_point; + fxMesa->draw_line = tdfx_draw_line; + fxMesa->draw_triangle = tdfx_draw_triangle; + + /* Hook in fallbacks for specific primitives. + * + * DD_TRI_UNFILLED is here because the unfilled_tri functions use + * fxMesa->draw_tri *always*, and thus can't use the multipass + * approach to cliprects. + * + */ + if (flags & (POINT_FALLBACK| + LINE_FALLBACK| + TRI_FALLBACK| + DD_TRI_STIPPLE| + DD_TRI_UNFILLED)) + { + if (flags & POINT_FALLBACK) + fxMesa->draw_point = tdfx_fallback_point; + + if (flags & LINE_FALLBACK) + fxMesa->draw_line = tdfx_fallback_line; - 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; - } + if (flags & TRI_FALLBACK) + fxMesa->draw_triangle = tdfx_fallback_tri; - /* 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; - } + if ((flags & DD_TRI_STIPPLE) && !fxMesa->haveHwStipple) + fxMesa->draw_triangle = tdfx_fallback_tri; + + index |= 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 (fxMesa->RenderIndex != index) { + fxMesa->RenderIndex = index; + + tnl->Driver.Render.Points = rast_tab[index].points; + tnl->Driver.Render.Line = rast_tab[index].line; + tnl->Driver.Render.Triangle = rast_tab[index].triangle; + tnl->Driver.Render.Quad = rast_tab[index].quad; + + if (index == 0) { + tnl->Driver.Render.PrimTabVerts = tdfx_render_tab_verts; + tnl->Driver.Render.PrimTabElts = tdfx_render_tab_elts; + tnl->Driver.Render.ClippedLine = line; /* from tritmp.h */ + tnl->Driver.Render.ClippedPolygon = tdfxFastRenderClippedPoly; + } else { + tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts; + tnl->Driver.Render.PrimTabElts = _tnl_render_tab_elts; + tnl->Driver.Render.ClippedLine = tdfxRenderClippedLine; + tnl->Driver.Render.ClippedPolygon = tdfxRenderClippedPoly; } + } +} + +/**********************************************************************/ +/* Use multipass rendering for cliprects */ +/**********************************************************************/ - if (flags & (DD_LINE_WIDTH | DD_POINT_SIZE)) - fxMesa->RenderVBRawTab = 0; - fxMesa->RenderElementsRaw = gl_render_elts; + +/* TODO: Benchmark this. + * TODO: Use single back-buffer cliprect where possible. + * NOTE: starts at 1, not zero! + */ +static GLboolean multipass_cliprect( GLcontext *ctx, GLuint pass ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + if (pass >= fxMesa->numClipRects) + return GL_FALSE; + else { + fxMesa->Glide.grClipWindow(fxMesa->pClipRects[pass].x1, + fxMesa->screen_height - fxMesa->pClipRects[pass].y2, + fxMesa->pClipRects[pass].x2, + fxMesa->screen_height - fxMesa->pClipRects[pass].y1); + + return GL_TRUE; } +} + + +/**********************************************************************/ +/* Runtime render state and callbacks */ +/**********************************************************************/ + +static void tdfxRunPipeline( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + if (fxMesa->new_state) { + tdfxDDUpdateHwState( ctx ); + } - if ( 0 ) { - gl_print_tri_caps( "tricaps", ctx->TriangleCaps ); - tdfxPrintRenderState( "tdfx render state", fxMesa->RenderIndex ); + if (!fxMesa->Fallback && fxMesa->new_gl_state) { + if (fxMesa->new_gl_state & _TDFX_NEW_RASTERSETUP) + tdfxChooseVertexState( ctx ); + + if (fxMesa->new_gl_state & _TDFX_NEW_RENDERSTATE) + tdfxChooseRenderState( ctx ); + + fxMesa->new_gl_state = 0; } + + _tnl_run_pipeline( ctx ); } -void tdfxDDToggleTriCliprects( GLcontext *ctx ) +static void tdfxRenderStart( GLcontext *ctx ) { + TNLcontext *tnl = TNL_CONTEXT(ctx); + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + tdfxCheckTexSizes( ctx ); + + LOCK_HARDWARE(fxMesa); + + /* Make sure vertex format changes get uploaded before we start + * sending triangles. + */ + if (fxMesa->dirty) { + tdfxEmitHwStateLocked( fxMesa ); + } + + if (fxMesa->numClipRects && !(fxMesa->RenderIndex & TDFX_FALLBACK_BIT)) { + fxMesa->Glide.grClipWindow(fxMesa->pClipRects[0].x1, + fxMesa->screen_height - fxMesa->pClipRects[0].y2, + fxMesa->pClipRects[0].x2, + fxMesa->screen_height - fxMesa->pClipRects[0].y1); + if (fxMesa->numClipRects > 1) + tnl->Driver.Render.Multipass = multipass_cliprect; + else + tnl->Driver.Render.Multipass = NULL; + } + else + tnl->Driver.Render.Multipass = NULL; +} + + +static GLenum reduced_prim[GL_POLYGON+1] = { + GL_POINTS, + GL_LINES, + GL_LINES, + GL_LINES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES, + GL_TRIANGLES +}; + + + +/* Always called between RenderStart and RenderFinish --> We already + * hold the lock. + */ +static void tdfxRasterPrimitive( GLcontext *ctx, GLenum prim ) +{ tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); - int oldidx = fxMesa->RenderIndex; - int newidx; + + FLUSH_BATCH( fxMesa ); + + fxMesa->raster_primitive = prim; + + tdfxUpdateCull(ctx); + if ( fxMesa->dirty & TDFX_UPLOAD_CULL ) { + fxMesa->Glide.grCullMode( fxMesa->CullMode ); + fxMesa->dirty &= ~TDFX_UPLOAD_CULL; + } + + tdfxUpdateStipple(ctx); + if ( fxMesa->dirty & TDFX_UPLOAD_STIPPLE ) { + fxMesa->Glide.grStipplePattern ( fxMesa->Stipple.Pattern ); + fxMesa->Glide.grStippleMode ( fxMesa->Stipple.Mode ); + fxMesa->dirty &= ~TDFX_UPLOAD_STIPPLE; + } +} - if (fxMesa->Fallback) + + +/* Determine the rasterized primitive when not drawing unfilled + * polygons. + * + * Used only for the default render stage which always decomposes + * primitives to trianges/lines/points. For the accelerated stage, + * which renders strips as strips, the equivalent calculations are + * performed in tdfx_render.c. + */ +static void tdfxRenderPrimitive( GLcontext *ctx, GLenum prim ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint rprim = reduced_prim[prim]; + + fxMesa->render_primitive = prim; + + if (rprim == GL_TRIANGLES && (ctx->_TriangleCaps & DD_TRI_UNFILLED)) return; + + if (fxMesa->raster_primitive != rprim) { + tdfxRasterPrimitive( ctx, rprim ); + } +} - if (fxMesa->numClipRects > 1) - newidx = (fxMesa->RenderIndex |= TDFX_CLIPRECT_BIT); - else - newidx = (fxMesa->RenderIndex &= ~TDFX_CLIPRECT_BIT); +static void tdfxRenderFinish( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + + if (fxMesa->RenderIndex & TDFX_FALLBACK_BIT) + _swrast_flush( ctx ); + + UNLOCK_HARDWARE(fxMesa); +} + - if (ctx->Driver.TriangleFunc == rast_tab[oldidx].triangle) - ctx->Driver.TriangleFunc = rast_tab[newidx].triangle; +/**********************************************************************/ +/* Manage total rasterization fallbacks */ +/**********************************************************************/ + +static char *fallbackStrings[] = { + "1D/3D Texture map", + "glDrawBuffer(GL_FRONT_AND_BACK)", + "Separate specular color", + "glEnable/Disable(GL_STENCIL_TEST)", + "glRenderMode(selection or feedback)", + "glLogicOp()", + "Texture env mode", + "Texture border", + "glColorMask", + "blend mode", + "line stipple" +}; - 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; +static char *getFallbackString(GLuint bit) +{ + int i = 0; + while (bit > 1) { + i++; + bit >>= 1; + } + return fallbackStrings[i]; +} - 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; +void tdfxFallback( GLcontext *ctx, GLuint bit, GLboolean mode ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint oldfallback = fxMesa->Fallback; - if (ctx->TriangleFunc == rast_tab[oldidx].triangle) - ctx->TriangleFunc = rast_tab[newidx].triangle; + if (mode) { + fxMesa->Fallback |= bit; + if (oldfallback == 0) { + /*printf("Go to software rendering, bit = 0x%x\n", bit);*/ + FLUSH_BATCH(fxMesa); + _swsetup_Wakeup( ctx ); + fxMesa->RenderIndex = ~0; + if (fxMesa->debugFallbacks) { + fprintf(stderr, "Tdfx begin software fallback: 0x%x %s\n", + bit, getFallbackString(bit)); + } + } + } + else { + fxMesa->Fallback &= ~bit; + if (oldfallback == bit) { + /*printf("Go to hardware rendering, bit = 0x%x\n", bit);*/ + _swrast_flush( ctx ); + tnl->Driver.Render.Start = tdfxRenderStart; + tnl->Driver.Render.PrimitiveNotify = tdfxRenderPrimitive; + tnl->Driver.Render.Finish = tdfxRenderFinish; + tnl->Driver.Render.BuildVertices = tdfxBuildVertices; + fxMesa->new_gl_state |= (_TDFX_NEW_RENDERSTATE| + _TDFX_NEW_RASTERSETUP); + if (fxMesa->debugFallbacks) { + fprintf(stderr, "Tdfx end software fallback: 0x%x %s\n", + bit, getFallbackString(bit)); + } + } + } +} + - if (ctx->QuadFunc == rast_tab[oldidx].quad) - ctx->QuadFunc = rast_tab[newidx].quad; +void tdfxDDInitTriFuncs( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + static int firsttime = 1; - 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 (firsttime) { + init_rast_tab(); + firsttime = 0; + } - if (newidx == 0 && - (ctx->IndirectTriangles & (DD_LINE_WIDTH|DD_POINT_SIZE)) == 0) - fxMesa->RenderElementsRaw = tdfxDDRenderEltsRaw; - else - fxMesa->RenderElementsRaw = gl_render_elts; + fxMesa->RenderIndex = ~0; + + tnl->Driver.RunPipeline = tdfxRunPipeline; + tnl->Driver.Render.Start = tdfxRenderStart; + tnl->Driver.Render.Finish = tdfxRenderFinish; + tnl->Driver.Render.PrimitiveNotify = tdfxRenderPrimitive; + tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; + tnl->Driver.Render.BuildVertices = tdfxBuildVertices; + tnl->Driver.Render.Multipass = NULL; - if (0) - tdfxPrintRenderState( "toggle tdfx render state", fxMesa->RenderIndex ); + (void) tdfx_print_vertex; } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h:1.2 xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h:1.5 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h:1.2 Fri Aug 17 22:51:07 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h Wed Oct 30 07:52:01 2002 @@ -23,154 +23,20 @@ * 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.2 2001/08/18 02:51:07 dawes Exp $ */ /* - * Original rewrite: - * Gareth Hughes , 29 Sep - 1 Oct 2000 - * * Authors: - * Gareth Hughes - * Brian Paul - * Keith Whitwell + * Keith Whitwell * */ - -#ifndef __TDFX_TRIS_H__ -#define __TDFX_TRIS_H__ - -#ifdef GLX_DIRECT_RENDERING - -#include "tdfx_vb.h" -#include "tdfx_render.h" +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h,v 1.5 2002/10/30 12:52:01 alanh Exp $ */ -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 ) -{ - fxMesa->Glide.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; - fxMesa->Glide.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; - - fxMesa->Glide.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; - fxMesa->Glide.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; - - fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, 4, verts, - sizeof(tdfxVertex) ); - } -} +#ifndef TDFX_TRIS_INC +#define TDFX_TRIS_INC -void tdfxDDToggleTriCliprects( GLcontext *ctx ); +#include "mtypes.h" +extern void tdfxDDInitTriFuncs( GLcontext *ctx ); -#endif /* GLX_DIRECT_RENDERING */ -#endif /* __TDFX_TRIS_H__ */ +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h:1.2 xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h:1.2 Fri Aug 17 22:51:07 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h Thu Feb 27 12:26:36 2003 @@ -1,415 +0,0 @@ -/* -*- 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.2 2001/08/18 02:51:07 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 ) -{ - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - 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 - - 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 ); - fxMesa->Glide.grDrawTriangle( v[0], v[1], v[2] ); - END_CLIP_LOOP_LOCKED( fxMesa ); -#else - fxMesa->Glide.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 ) -{ - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - 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 - - 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 ); */ - fxMesa->Glide.grDrawTriangle( v[0], v[1], v[3] ); - fxMesa->Glide.grDrawTriangle( v[1], v[2], v[3] ); - END_CLIP_LOOP_LOCKED( fxMesa ); -#else -/* grDrawVertexArray( GR_TRIANGLE_FAN, 4, v ); */ - fxMesa->Glide.grDrawTriangle( v[0], v[1], v[3] ); - fxMesa->Glide.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 xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c Wed Oct 30 07:52:01 2002 @@ -1,8 +1,6 @@ -/* -*- mode: c; c-basic-offset: 3 -*- - * - * Copyright 2000 VA Linux Systems Inc., Fremont, California. - * - * All Rights Reserved. +/* + * GLX Hardware Device Driver for Intel i810 + * 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"), @@ -11,488 +9,356 @@ * 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 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, + * 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 + * 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. * - * Authors: - * Gareth Hughes - * Brian Paul - * Keith Whitwell * */ - -#include "tdfx_context.h" -#include "tdfx_vb.h" - -#include "stages.h" +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.c,v 1.3 2002/10/30 12:52:01 alanh Exp $ */ + +#include "glheader.h" +#include "mtypes.h" #include "mem.h" +#include "macros.h" +#include "colormac.h" +#include "mmath.h" +#include "math/m_translate.h" +#include "swrast_setup/swrast_setup.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) +#include "tdfx_context.h" +#include "tdfx_vb.h" +#include "tdfx_tris.h" +#include "tdfx_state.h" +#include "tdfx_render.h" +static void copy_pv_rgba4( GLcontext *ctx, GLuint edst, GLuint esrc ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + GLubyte *tdfxverts = (GLubyte *)fxMesa->verts; + GLuint shift = fxMesa->vertex_stride_shift; + tdfxVertex *dst = (tdfxVertex *)(tdfxverts + (edst << shift)); + tdfxVertex *src = (tdfxVertex *)(tdfxverts + (esrc << shift)); + dst->ui[4] = src->ui[4]; +} -/* 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," : "" ); +static void copy_pv_rgba3( GLcontext *ctx, GLuint edst, GLuint esrc ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + GLubyte *tdfxverts = (GLubyte *)fxMesa->verts; + GLuint shift = fxMesa->vertex_stride_shift; + tdfxVertex *dst = (tdfxVertex *)(tdfxverts + (edst << shift)); + tdfxVertex *src = (tdfxVertex *)(tdfxverts + (esrc << shift)); + dst->ui[3] = src->ui[3]; } +typedef void (*emit_func)( GLcontext *, GLuint, GLuint, void *, GLuint ); -/* ================================================================ - * Raster Setup - */ +static struct { + emit_func emit; + interp_func interp; + copy_pv_func copy_pv; + GLboolean (*check_tex_sizes)( GLcontext *ctx ); + GLuint vertex_size; + GLuint vertex_stride_shift; + GLuint vertex_format; +} setup_tab[TDFX_MAX_SETUP]; -void tdfxDDChooseRasterSetupFunc( GLcontext *ctx ) + +static void import_float_colors( GLcontext *ctx ) { - tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); - int index = TDFX_WIN_BIT | TDFX_RGBA_BIT; - int vertexFormat = fxMesa->vertexFormat; + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + struct gl_client_array *from = VB->ColorPtr[0]; + struct gl_client_array *to = &TDFX_CONTEXT(ctx)->UbyteColor; + GLuint count = VB->Count; - 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 (!to->Ptr) { + to->Ptr = ALIGN_MALLOC( VB->Size * 4 * sizeof(GLubyte), 32 ); + to->Type = GL_UNSIGNED_BYTE; } - 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; - } + /* No need to transform the same value 3000 times. + */ + if (!from->StrideB) { + to->StrideB = 0; + count = 1; } + else + to->StrideB = 4 * sizeof(GLubyte); + + _math_trans_4ub( (GLubyte (*)[4]) to->Ptr, + from->Ptr, + from->StrideB, + from->Type, + from->Size, + 0, + count); + + VB->ColorPtr[0] = to; +} + + +#define GET_COLOR(ptr, idx) (((GLchan (*)[4])((ptr)->Ptr))[idx]) - if ( ctx->Fog.Enabled ) - index |= TDFX_FOG_BIT; - fxMesa->SetupIndex = index; - ctx->Driver.RasterSetup = setup_func[index]; +static void interp_extras( GLcontext *ctx, + GLfloat t, + GLuint dst, GLuint out, GLuint in, + GLboolean force_boundary ) +{ + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + + /*fprintf(stderr, "%s\n", __FUNCTION__);*/ - if ( fxMesa->vertexFormat != vertexFormat ) { - fxMesa->dirty |= TDFX_UPLOAD_VERTEX_LAYOUT; + if (VB->ColorPtr[1]) { + INTERP_4CHAN( t, + GET_COLOR(VB->ColorPtr[1], dst), + GET_COLOR(VB->ColorPtr[1], out), + GET_COLOR(VB->ColorPtr[1], in) ); } - if (0) { - tdfxPrintSetupFlags( "full setup function", index ); - fprintf(stderr, "full setup function %p\n", ctx->Driver.RasterSetup); + if (VB->EdgeFlag) { + VB->EdgeFlag[dst] = VB->EdgeFlag[out] || force_boundary; } + + setup_tab[TDFX_CONTEXT(ctx)->SetupIndex].interp(ctx, t, dst, out, in, + force_boundary); } -/* Check to see if vertices need repairing. - */ -void tdfxDDCheckPartialRasterSetup( GLcontext *ctx, - struct gl_pipeline_stage *d ) +static void copy_pv_extras( GLcontext *ctx, GLuint dst, GLuint src ) { - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - int tmp = fxMesa->SetupDone; + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - d->type = 0; - fxMesa->SetupDone = 0; /* cleared if we return */ - - if ( (ctx->Array.Summary & VERT_OBJ_ANY) == 0 ) - return; - if ( ctx->IndirectTriangles ) - return; + if (VB->ColorPtr[1]) { + COPY_CHAN4( GET_COLOR(VB->ColorPtr[1], dst), + GET_COLOR(VB->ColorPtr[1], src) ); + } - fxMesa->SetupDone = tmp; + setup_tab[TDFX_CONTEXT(ctx)->SetupIndex].copy_pv(ctx, dst, src); } -/* Repair existing precalculated vertices with new data. + + +#define IND (TDFX_XYZ_BIT|TDFX_RGBA_BIT) +#define TAG(x) x##_wg +#include "tdfx_vbtmp.h" + +/* Special for tdfx: fog requires w */ -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; +#define IND (TDFX_XYZ_BIT|TDFX_RGBA_BIT|TDFX_W_BIT) +#define TAG(x) x##_wg_fog +#include "tdfx_vbtmp.h" - if ( new & VERT_WIN ) { - new = available; - index |= TDFX_WIN_BIT | TDFX_FOG_BIT; - } +#define IND (TDFX_XYZ_BIT|TDFX_RGBA_BIT|TDFX_W_BIT|TDFX_TEX0_BIT) +#define TAG(x) x##_wgt0 +#include "tdfx_vbtmp.h" - if ( new & VERT_RGBA ) - index |= TDFX_RGBA_BIT; +#define IND (TDFX_XYZ_BIT|TDFX_RGBA_BIT|TDFX_W_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT) +#define TAG(x) x##_wgt0t1 +#include "tdfx_vbtmp.h" - if ( new & VERT_TEX0_ANY ) - index |= TDFX_TEX0_BIT; +#define IND (TDFX_XYZ_BIT|TDFX_RGBA_BIT|TDFX_W_BIT|TDFX_TEX0_BIT|TDFX_PTEX_BIT) +#define TAG(x) x##_wgpt0 +#include "tdfx_vbtmp.h" - if ( new & VERT_TEX1_ANY ) - index |= fxMesa->tex_dest[1]; +#define IND (TDFX_XYZ_BIT|TDFX_RGBA_BIT|TDFX_W_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT|\ + TDFX_PTEX_BIT) +#define TAG(x) x##_wgpt0t1 +#include "tdfx_vbtmp.h" - if ( new & VERT_FOG_COORD ) - index |= TDFX_FOG_BIT; +#define IND (TDFX_RGBA_BIT) +#define TAG(x) x##_g +#include "tdfx_vbtmp.h" - fxMesa->SetupDone &= ~index; - index &= fxMesa->SetupIndex; - fxMesa->SetupDone |= index; +#define IND (TDFX_TEX0_BIT) +#define TAG(x) x##_t0 +#include "tdfx_vbtmp.h" - if ( 0 ) - tdfxPrintSetupFlags( "partial setup function", index ); +#define IND (TDFX_TEX0_BIT|TDFX_TEX1_BIT) +#define TAG(x) x##_t0t1 +#include "tdfx_vbtmp.h" - if ( index ) - setup_func[index]( VB, VB->Start, VB->Count ); -} +#define IND (TDFX_RGBA_BIT|TDFX_TEX0_BIT) +#define TAG(x) x##_gt0 +#include "tdfx_vbtmp.h" + +#define IND (TDFX_RGBA_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT) +#define TAG(x) x##_gt0t1 +#include "tdfx_vbtmp.h" + -void tdfxDDDoRasterSetup( struct vertex_buffer *VB ) + +static void init_setup_tab( void ) { - GLcontext *ctx = VB->ctx; + init_wg(); + init_wg_fog(); + init_wgt0(); + init_wgt0t1(); + init_wgpt0(); + init_wgpt0t1(); - if ( VB->Type == VB_CVA_PRECALC ) { - tdfxDDPartialRasterSetup( VB ); - } else if ( ctx->Driver.RasterSetup ) { - ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); - } + init_g(); + init_t0(); + init_t0t1(); + init_gt0(); + init_gt0t1(); } -/* ================================================================ - * Device-specific Vertex Buffers - */ - -void tdfxDDResizeVB( struct vertex_buffer *VB, GLuint size ) +void tdfxPrintSetupFlags(char *msg, GLuint flags ) { - tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + fprintf(stderr, "%s(%x): %s%s%s%s%s\n", + msg, + (int)flags, + (flags & TDFX_XYZ_BIT) ? " xyz," : "", + (flags & TDFX_W_BIT) ? " w," : "", + (flags & TDFX_RGBA_BIT) ? " rgba," : "", + (flags & TDFX_TEX0_BIT) ? " tex-0," : "", + (flags & TDFX_TEX1_BIT) ? " tex-1," : ""); +} - 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; +void tdfxCheckTexSizes( GLcontext *ctx ) +{ + TNLcontext *tnl = TNL_CONTEXT(ctx); + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); - 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 ); - } + if (!setup_tab[fxMesa->SetupIndex].check_tex_sizes(ctx)) { + GLuint ind = fxMesa->SetupIndex |= (TDFX_PTEX_BIT|TDFX_RGBA_BIT); - 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 ); + /* Tdfx handles projective textures nicely; just have to change + * up to the new vertex format. + */ + if (setup_tab[ind].vertex_format != fxMesa->vertexFormat) { + FLUSH_BATCH(fxMesa); + fxMesa->dirty |= TDFX_UPLOAD_VERTEX_LAYOUT; + fxMesa->vertexFormat = setup_tab[ind].vertex_format; + fxMesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; + + /* This is required as we have just changed the vertex + * format, so the interp and copy routines must also change. + * In the unfilled and twosided cases we are using the + * swrast_setup ones anyway, so leave them in place. + */ + if (!(ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))) { + tnl->Driver.Render.Interp = setup_tab[fxMesa->SetupIndex].interp; + tnl->Driver.Render.CopyPV = setup_tab[fxMesa->SetupIndex].copy_pv; + } + } } } -void tdfxDDResizeElts( struct vertex_buffer *VB, GLuint size ) + +void tdfxBuildVertices( GLcontext *ctx, GLuint start, GLuint count, + GLuint newinputs ) { -#if 0 - tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + char *v = (fxMesa->verts + (start<vertex_stride_shift)); + GLuint stride = 1<vertex_stride_shift; + + newinputs |= fxMesa->SetupNewInputs; + fxMesa->SetupNewInputs = 0; + + if (!newinputs) + return; - FREE(fxVB->elts); + if (newinputs & VERT_CLIP) { + setup_tab[fxMesa->SetupIndex].emit( ctx, start, count, v, stride ); + } else { + GLuint ind = 0; + + if (newinputs & VERT_RGBA) + ind |= TDFX_RGBA_BIT; + + if (newinputs & VERT_TEX0) + ind |= TDFX_TEX0_BIT; + + if (newinputs & VERT_TEX1) + ind |= TDFX_TEX0_BIT|TDFX_TEX1_BIT; - while (fxVB->elt_size < size) - fxVB->elt_size *= 2; + if (fxMesa->SetupIndex & TDFX_PTEX_BIT) + ind = ~0; - FREE(fxVB->elts); - fxVB->elts = MALLOC( sizeof(tdfxVertex *) * fxVB->elt_size ); - if ( !fxVB->elts ) { - fprintf( stderr, "Cannot allocate vertex indirection! Exiting...\n" ); - exit( 1 ); + ind &= fxMesa->SetupIndex; + + if (ind) { + setup_tab[ind].emit( ctx, start, count, v, stride ); + } } -#endif } -void tdfxDDRegisterVB( struct vertex_buffer *VB ) + +void tdfxChooseVertexState( GLcontext *ctx ) { - tdfxVertexBufferPtr fxVB; + TNLcontext *tnl = TNL_CONTEXT(ctx); + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + GLuint ind = TDFX_XYZ_BIT|TDFX_RGBA_BIT; - fxVB = (tdfxVertexBufferPtr) CALLOC( sizeof(*fxVB) ); + if (ctx->Texture._ReallyEnabled & TEXTURE1_ANY) + ind |= TDFX_W_BIT|TDFX_TEX1_BIT|TDFX_TEX0_BIT; + else if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) + ind |= TDFX_W_BIT|TDFX_TEX0_BIT; + else if (ctx->Fog.Enabled) + ind |= TDFX_W_BIT; + + fxMesa->SetupIndex = ind; - 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 ); + if (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED)) { + tnl->Driver.Render.Interp = interp_extras; + tnl->Driver.Render.CopyPV = copy_pv_extras; + } else { + tnl->Driver.Render.Interp = setup_tab[ind].interp; + tnl->Driver.Render.CopyPV = setup_tab[ind].copy_pv; } - 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 ); + if (setup_tab[ind].vertex_format != fxMesa->vertexFormat) { + FLUSH_BATCH(fxMesa); + fxMesa->dirty |= TDFX_UPLOAD_VERTEX_LAYOUT; + fxMesa->vertexFormat = setup_tab[ind].vertex_format; + fxMesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; } -#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 ); +void tdfxInitVB( GLcontext *ctx ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + GLuint size = TNL_CONTEXT(ctx)->vb.Size; + static int firsttime = 1; + if (firsttime) { + init_setup_tab(); + firsttime = 0; } - VB->driver_data = fxVB; + fxMesa->verts = (char *)ALIGN_MALLOC(size * sizeof(tdfxVertex), 32); + fxMesa->vertexFormat = setup_tab[TDFX_XYZ_BIT|TDFX_RGBA_BIT].vertex_format; + fxMesa->vertex_stride_shift = setup_tab[(TDFX_XYZ_BIT| + TDFX_RGBA_BIT)].vertex_stride_shift; + fxMesa->SetupIndex = TDFX_XYZ_BIT|TDFX_RGBA_BIT; } -void tdfxDDUnregisterVB( struct vertex_buffer *VB ) + +void tdfxFreeVB( GLcontext *ctx ) { - tdfxVertexBufferPtr fxVB = TDFX_DRIVER_DATA(VB); + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + if (fxMesa->verts) { + ALIGN_FREE(fxMesa->verts); + fxMesa->verts = 0; + } - 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; + if (fxMesa->UbyteColor.Ptr) { + ALIGN_FREE(fxMesa->UbyteColor.Ptr); + fxMesa->UbyteColor.Ptr = 0; } + } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h Fri Feb 22 16:45:04 2002 @@ -1,8 +1,6 @@ -/* -*- mode: c; c-basic-offset: 3 -*- - * - * Copyright 2000 VA Linux Systems Inc., Fremont, California. - * - * All Rights Reserved. +/* + * GLX Hardware Device Driver for Intel tdfx + * 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"), @@ -11,117 +9,60 @@ * 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 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, + * 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 + * 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. * - * 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; +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_vb.h,v 1.2 2002/02/22 21:45:04 dawes Exp $ */ -/* 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; +#ifndef TDFXVB_INC +#define TDFXVB_INC - tdfxVertexPtr *elts; - GLuint elt_size; - GLuint last_elt; -}; +#include "mtypes.h" -typedef struct tdfx_vertex_buffer *tdfxVertexBufferPtr; +#include "tnl/tnl.h" +#include "tnl/t_context.h" +#include "math/m_xform.h" -#define TDFX_DRIVER_DATA(vb) ((tdfxVertexBufferPtr)((vb)->driver_data)) +#define TDFX_XYZ_BIT 0x1 +#define TDFX_W_BIT 0x2 +#define TDFX_RGBA_BIT 0x4 +#define TDFX_TEX1_BIT 0x8 +#define TDFX_TEX0_BIT 0x10 +#define TDFX_PTEX_BIT 0x20 +#define TDFX_MAX_SETUP 0x40 +#define _TDFX_NEW_RASTERSETUP (_NEW_TEXTURE | \ + _DD_NEW_SEPARATE_SPECULAR | \ + _DD_NEW_TRI_UNFILLED | \ + _DD_NEW_TRI_LIGHT_TWOSIDE | \ + _NEW_FOG) -#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 tdfxValidateBuildProjVerts(GLcontext *ctx, + GLuint start, GLuint count, + GLuint newinputs ); -extern void tdfxDDSetupInit( void ); +extern void tdfxPrintSetupFlags(char *msg, GLuint flags ); -extern void tdfxDDChooseRasterSetupFunc( GLcontext *ctx ); -extern void tdfxPrintSetupFlags( char *msg, GLuint flags ); +extern void tdfxInitVB( GLcontext *ctx ); -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 tdfxFreeVB( GLcontext *ctx ); -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 ); +extern void tdfxCheckTexSizes( GLcontext *ctx ); +extern void tdfxChooseVertexState( GLcontext *ctx ); -#endif /* GLX_DIRECT_RENDERING */ +extern void tdfxBuildVertices( GLcontext *ctx, GLuint start, GLuint count, + GLuint newinputs ); -#endif /* __TDFX_VB_H__ */ +#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_vbtmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/tdfx/tdfx_vbtmp.h:1.1 --- /dev/null Thu Feb 27 12:26:36 2003 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_vbtmp.h Fri Feb 22 16:45:04 2002 @@ -0,0 +1,442 @@ + +#if (IND & (TDFX_W_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT)) + +static void TAG(emit)( GLcontext *ctx, + GLuint start, GLuint end, + void *dest, + GLuint stride ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLfloat (*tc0)[4], (*tc1)[4]; + GLubyte (*col)[4]; + GLuint tc0_stride, tc1_stride, col_stride; + GLuint tc0_size, tc1_size; + GLfloat (*proj)[4] = VB->ProjectedClipPtr->data; + GLuint proj_stride = VB->ProjectedClipPtr->stride; + tdfxVertex *v = (tdfxVertex *)dest; + GLfloat u0scale,v0scale,u1scale,v1scale; + const GLubyte *mask = VB->ClipMask; + const GLfloat *s = fxMesa->hw_viewport; + int i; + +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + ASSERT(stride > 16); + + + if (IND & TDFX_TEX0_BIT) { + tc0_stride = VB->TexCoordPtr[0]->stride; + tc0 = VB->TexCoordPtr[0]->data; + u0scale = fxMesa->sScale0; + v0scale = fxMesa->tScale0; + if (IND & TDFX_PTEX_BIT) + tc0_size = VB->TexCoordPtr[0]->size; + } + + if (IND & TDFX_TEX1_BIT) { + tc1 = VB->TexCoordPtr[1]->data; + tc1_stride = VB->TexCoordPtr[1]->stride; + u1scale = fxMesa->sScale1; + v1scale = fxMesa->tScale1; + if (IND & TDFX_PTEX_BIT) + tc1_size = VB->TexCoordPtr[1]->size; + } + + if (IND & TDFX_RGBA_BIT) { + if (VB->ColorPtr[0]->Type != GL_UNSIGNED_BYTE) + import_float_colors( ctx ); + col = VB->ColorPtr[0]->Ptr; + col_stride = VB->ColorPtr[0]->StrideB; + } + + if (VB->importable_data) { + /* May have nonstandard strides: + */ + if (start) { + proj = (GLfloat (*)[4])((GLubyte *)proj + start * proj_stride); + if (IND & TDFX_TEX0_BIT) + tc0 = (GLfloat (*)[4])((GLubyte *)tc0 + start * tc0_stride); + if (IND & TDFX_TEX1_BIT) + tc1 = (GLfloat (*)[4])((GLubyte *)tc1 + start * tc1_stride); + if (IND & TDFX_RGBA_BIT) + STRIDE_4UB(col, start * col_stride); + } + + for (i=start; i < end; i++, v = (tdfxVertex *)((GLubyte *)v + stride)) { + if (IND & TDFX_XYZ_BIT) { + if (mask[i] == 0) { + /* unclipped */ + v->v.x = s[0] * proj[0][0] + s[12]; + v->v.y = s[5] * proj[0][1] + s[13]; + v->v.z = s[10] * proj[0][2] + s[14]; + v->v.rhw = proj[0][3]; + } else { + /* clipped */ + v->v.rhw = 1.0; + } + proj = (GLfloat (*)[4])((GLubyte *)proj + proj_stride); + } + if (IND & TDFX_RGBA_BIT) { +#if 0 + *(GLuint *)&v->v.color = *(GLuint *)col; +#else + GLubyte *b = (GLubyte *) &v->v.color; + b[0] = col[0][2]; + b[1] = col[0][1]; + b[2] = col[0][0]; + b[3] = col[0][3]; + +#endif + STRIDE_4UB(col, col_stride); + } + if (IND & TDFX_TEX0_BIT) { + GLfloat w = v->v.rhw; + if (IND & TDFX_PTEX_BIT) { + v->pv.tu0 = tc0[0][0] * u0scale * w; + v->pv.tv0 = tc0[0][1] * v0scale * w; + v->pv.tq0 = w; + if (tc0_size == 4) + v->pv.tq0 = tc0[0][3] * w; + } + else { + v->v.tu0 = tc0[0][0] * u0scale * w; + v->v.tv0 = tc0[0][1] * v0scale * w; + } + tc0 = (GLfloat (*)[4])((GLubyte *)tc0 + tc0_stride); + } + if (IND & TDFX_TEX1_BIT) { + GLfloat w = v->v.rhw; + if (IND & TDFX_PTEX_BIT) { + v->pv.tu1 = tc1[0][0] * u1scale * w; + v->pv.tv1 = tc1[0][1] * v1scale * w; + v->pv.tq1 = w; + if (tc1_size == 4) + v->pv.tq1 = tc1[0][3] * w; + } + else { + v->v.tu1 = tc1[0][0] * u1scale * w; + v->v.tv1 = tc1[0][1] * v1scale * w; + } + tc1 = (GLfloat (*)[4])((GLubyte *)tc1 + tc1_stride); + } + } + } + else { + for (i=start; i < end; i++, v = (tdfxVertex *)((GLubyte *)v + stride)) { + if (IND & TDFX_XYZ_BIT) { + if (mask[i] == 0) { + v->v.x = s[0] * proj[i][0] + s[12]; + v->v.y = s[5] * proj[i][1] + s[13]; + v->v.z = s[10] * proj[i][2] + s[14]; + v->v.rhw = proj[i][3]; + } else { + v->v.rhw = 1.0; + } + } + if (IND & TDFX_RGBA_BIT) { +#if 0 + *(GLuint *)&v->v.color = *(GLuint *)&col[i]; +#else + GLubyte *b = (GLubyte *) &v->v.color; + b[0] = col[i][2]; + b[1] = col[i][1]; + b[2] = col[i][0]; + b[3] = col[i][3]; + +#endif + } + if (IND & TDFX_TEX0_BIT) { + GLfloat w = v->v.rhw; + if (IND & TDFX_PTEX_BIT) { + v->pv.tu0 = tc0[i][0] * u0scale * w; + v->pv.tv0 = tc0[i][1] * v0scale * w; + v->pv.tq0 = w; + if (tc0_size == 4) + v->pv.tq0 = tc0[i][3] * w; + } + else { + v->v.tu0 = tc0[i][0] * u0scale * w; + v->v.tv0 = tc0[i][1] * v0scale * w; + } + } + if (IND & TDFX_TEX1_BIT) { + GLfloat w = v->v.rhw; + if (IND & TDFX_PTEX_BIT) { + v->pv.tu1 = tc1[i][0] * u1scale * w; + v->pv.tv1 = tc1[i][1] * v1scale * w; + v->pv.tq1 = w; + if (tc1_size == 4) + v->pv.tq1 = tc1[i][3] * w; + } + else { + v->v.tu1 = tc1[i][0] * u1scale * w; + v->v.tv1 = tc1[i][1] * v1scale * w; + } + } + } + } +} +#else +#if (IND & TDFX_XYZ_BIT) +static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end, + void *dest, GLuint stride ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLubyte (*col)[4]; + GLuint col_stride; + GLfloat (*proj)[4] = VB->ProjectedClipPtr->data; + GLuint proj_stride = VB->ProjectedClipPtr->stride; + GLfloat *v = (GLfloat *)dest; + const GLubyte *mask = VB->ClipMask; + const GLfloat *s = fxMesa->hw_viewport; + int i; + +/* fprintf(stderr, "%s %d..%d dest %p stride %d\n", __FUNCTION__, */ +/* start, end, dest, stride); */ + + ASSERT(fxMesa->SetupIndex == (TDFX_XYZ_BIT|TDFX_RGBA_BIT)); + ASSERT(stride == 16); + + if (VB->ColorPtr[0]->Type != GL_UNSIGNED_BYTE) + import_float_colors( ctx ); + + col = (GLubyte (*)[4])VB->ColorPtr[0]->Ptr; + col_stride = VB->ColorPtr[0]->StrideB; + ASSERT(VB->ColorPtr[0]->Type == GL_UNSIGNED_BYTE); + + /* Pack what's left into a 4-dword vertex. Color is in a different + * place, and there is no 'w' coordinate. + */ + if (VB->importable_data) { + if (start) { + proj = (GLfloat (*)[4])((GLubyte *)proj + start * proj_stride); + STRIDE_4UB(col, start * col_stride); + } + + for (i=start; i < end; i++, v+=4) { + if (mask[i] == 0) { + v[0] = s[0] * proj[0][0] + s[12]; + v[1] = s[5] * proj[0][1] + s[13]; + v[2] = s[10] * proj[0][2] + s[14]; + } + proj = (GLfloat (*)[4])((GLubyte *)proj + proj_stride); + { + GLubyte *b = (GLubyte *)&v[3]; + b[0] = col[0][2]; + b[1] = col[0][1]; + b[2] = col[0][0]; + b[3] = col[0][3]; + STRIDE_4UB(col, col_stride); + } + } + } + else { + for (i=start; i < end; i++, v+=4) { + if (mask[i] == 0) { + v[0] = s[0] * proj[i][0] + s[12]; + v[1] = s[5] * proj[i][1] + s[13]; + v[2] = s[10] * proj[i][2] + s[14]; + } + { + GLubyte *b = (GLubyte *)&v[3]; + b[0] = col[i][2]; + b[1] = col[i][1]; + b[2] = col[i][0]; + b[3] = col[i][3]; + } + } + } +} +#else +static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end, + void *dest, GLuint stride ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + GLubyte (*col)[4]; + GLuint col_stride; + GLfloat *v = (GLfloat *)dest; + int i; + + if (VB->ColorPtr[0]->Type != GL_UNSIGNED_BYTE) + import_float_colors( ctx ); + + col = VB->ColorPtr[0]->Ptr; + col_stride = VB->ColorPtr[0]->StrideB; + + if (start) + STRIDE_4UB(col, col_stride * start); + + /* Need to figure out where color is: + */ + if (fxMesa->SetupIndex & TDFX_W_BIT ) + v += 4; + else + v += 3; + + for (i=start; i < end; i++, STRIDE_F(v, stride)) { + GLubyte *b = (GLubyte *)v; + b[0] = col[0][2]; + b[1] = col[0][1]; + b[2] = col[0][0]; + b[3] = col[0][3]; + STRIDE_4UB( col, col_stride ); + } +} +#endif +#endif + +#if (IND & TDFX_XYZ_BIT) && (IND & TDFX_RGBA_BIT) + +static GLboolean TAG(check_tex_sizes)( GLcontext *ctx ) +{ +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + if (IND & TDFX_PTEX_BIT) + return GL_TRUE; + + if (IND & TDFX_TEX0_BIT) { + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + + if (IND & TDFX_TEX1_BIT) { + if (VB->TexCoordPtr[0] == 0) + VB->TexCoordPtr[0] = VB->TexCoordPtr[1]; + + if (VB->TexCoordPtr[1]->size == 4) + return GL_FALSE; + } + + if (VB->TexCoordPtr[0]->size == 4) + return GL_FALSE; + } + + return GL_TRUE; +} + +static void TAG(interp)( GLcontext *ctx, + GLfloat t, + GLuint edst, GLuint eout, GLuint ein, + GLboolean force_boundary ) +{ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); + struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; + const GLuint shift = fxMesa->vertex_stride_shift; + const GLfloat *dstclip = VB->ClipPtr->data[edst]; + const GLfloat oow = (dstclip[3] == 0.0F) ? 1.0F : (1.0F / dstclip[3]); + const GLfloat *s = fxMesa->hw_viewport; + GLubyte *tdfxverts = (GLubyte *)fxMesa->verts; + tdfxVertex *dst = (tdfxVertex *) (tdfxverts + (edst << shift)); + const tdfxVertex *out = (const tdfxVertex *) (tdfxverts + (eout << shift)); + const tdfxVertex *in = (const tdfxVertex *) (tdfxverts + (ein << shift)); + const GLfloat wout = 1.0F / out->v.rhw; + const GLfloat win = 1.0F / in->v.rhw; + + dst->v.x = s[0] * dstclip[0] * oow + s[12]; + dst->v.y = s[5] * dstclip[1] * oow + s[13]; + dst->v.z = s[10] * dstclip[2] * oow + s[14]; + + if (IND & (TDFX_W_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT)) { + dst->v.rhw = oow; + + INTERP_UB( t, dst->ub4[4][0], out->ub4[4][0], in->ub4[4][0] ); + INTERP_UB( t, dst->ub4[4][1], out->ub4[4][1], in->ub4[4][1] ); + INTERP_UB( t, dst->ub4[4][2], out->ub4[4][2], in->ub4[4][2] ); + INTERP_UB( t, dst->ub4[4][3], out->ub4[4][3], in->ub4[4][3] ); + + if (IND & TDFX_TEX0_BIT) { + if (IND & TDFX_PTEX_BIT) { + INTERP_F( t, dst->pv.tu0, out->pv.tu0 * wout, in->pv.tu0 * win ); + INTERP_F( t, dst->pv.tv0, out->pv.tv0 * wout, in->pv.tv0 * win ); + INTERP_F( t, dst->pv.tq0, out->pv.tq0 * wout, in->pv.tq0 * win ); + dst->pv.tu0 *= oow; + dst->pv.tv0 *= oow; + dst->pv.tq0 *= oow; + } else { + INTERP_F( t, dst->v.tu0, out->v.tu0 * wout, in->v.tu0 * win ); + INTERP_F( t, dst->v.tv0, out->v.tv0 * wout, in->v.tv0 * win ); + dst->v.tu0 *= oow; + dst->v.tv0 *= oow; + } + } + if (IND & TDFX_TEX1_BIT) { + if (IND & TDFX_PTEX_BIT) { + INTERP_F( t, dst->pv.tu1, out->pv.tu1 * wout, in->pv.tu1 * win ); + INTERP_F( t, dst->pv.tv1, out->pv.tv1 * wout, in->pv.tv1 * win ); + INTERP_F( t, dst->pv.tq1, out->pv.tq1 * wout, in->pv.tq1 * win ); + dst->pv.tu1 *= oow; + dst->pv.tv1 *= oow; + dst->pv.tq1 *= oow; + } else { + INTERP_F( t, dst->v.tu1, out->v.tu1 * wout, in->v.tu1 * win ); + INTERP_F( t, dst->v.tv1, out->v.tv1 * wout, in->v.tv1 * win ); + dst->v.tu1 *= oow; + dst->v.tv1 *= oow; + } + } + } else { + /* 4-dword vertex. Color is in v[3] and there is no oow coordinate. + */ + INTERP_UB( t, dst->ub4[3][0], out->ub4[3][0], in->ub4[3][0] ); + INTERP_UB( t, dst->ub4[3][1], out->ub4[3][1], in->ub4[3][1] ); + INTERP_UB( t, dst->ub4[3][2], out->ub4[3][2], in->ub4[3][2] ); + INTERP_UB( t, dst->ub4[3][3], out->ub4[3][3], in->ub4[3][3] ); + } +} +#endif + + +static void TAG(init)( void ) +{ +/* fprintf(stderr, "%s\n", __FUNCTION__); */ + + setup_tab[IND].emit = TAG(emit); + +#if ((IND & TDFX_XYZ_BIT) && (IND & TDFX_RGBA_BIT)) + setup_tab[IND].check_tex_sizes = TAG(check_tex_sizes); + setup_tab[IND].interp = TAG(interp); + + if (IND & (TDFX_W_BIT|TDFX_TEX0_BIT|TDFX_TEX1_BIT)) + setup_tab[IND].copy_pv = copy_pv_rgba4; + else + setup_tab[IND].copy_pv = copy_pv_rgba3; + + + if (IND & TDFX_TEX1_BIT) { + if (IND & TDFX_PTEX_BIT) { + setup_tab[IND].vertex_format = TDFX_LAYOUT_PROJECT; + setup_tab[IND].vertex_size = 12; + setup_tab[IND].vertex_stride_shift = 6; + } + else { + setup_tab[IND].vertex_format = TDFX_LAYOUT_MULTI; + setup_tab[IND].vertex_size = 10; + setup_tab[IND].vertex_stride_shift = 6; + } + } + else if (IND & TDFX_TEX0_BIT) { + if (IND & TDFX_PTEX_BIT) { + setup_tab[IND].vertex_format = TDFX_LAYOUT_PROJECT; + setup_tab[IND].vertex_size = 12; + setup_tab[IND].vertex_stride_shift = 6; + } else { + setup_tab[IND].vertex_format = TDFX_LAYOUT_SINGLE; + setup_tab[IND].vertex_size = 8; + setup_tab[IND].vertex_stride_shift = 5; + } + } + else if (IND & TDFX_W_BIT) { + setup_tab[IND].vertex_format = TDFX_LAYOUT_NOTEX; + setup_tab[IND].vertex_size = 6; + setup_tab[IND].vertex_stride_shift = 5; + } else { + setup_tab[IND].vertex_format = TDFX_LAYOUT_TINY; + setup_tab[IND].vertex_size = 4; + setup_tab[IND].vertex_stride_shift = 4; + } +#endif +} + + +#undef IND +#undef TAG Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c:1.2 Fri Aug 17 22:51:07 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c Thu Feb 27 12:26:36 2003 @@ -1,392 +0,0 @@ -/* -*- 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.2 2001/08/18 02:51:07 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(tdfxContextPtr fxMesa, 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; - fxMesa->Glide.grGet(grname, 4, &result); - return result; - } - case FX_ZDEPTH_MAX: - { - FxI32 zvals[2]; - fxMesa->Glide.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(fxMesa, pname); - UNLOCK_HARDWARE(fxMesa); - return result; -} - - -const char * -FX_grGetString(tdfxContextPtr fxMesa, FxU32 pname) -{ - const char *s; - LOCK_HARDWARE(fxMesa); - s = fxMesa->Glide.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( fxMesa->Glide.grColorMaskExt ); - fxMesa->Glide.grColorMaskExt(r, g, b, a); - } - else { - /* 16 bpp mode */ - /* we never have an alpha buffer */ - fxMesa->Glide.grColorMask(r || g || b, GL_FALSE); - } - UNLOCK_HARDWARE(fxMesa); -} - - -void -FX_grColorMask_NoLock(GLcontext *ctx, GLboolean r, GLboolean g, - GLboolean b, GLboolean a) -{ - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - if (ctx->Visual->RedBits == 8) { - /* 32bpp mode */ - ASSERT( fxMesa->Glide.grColorMaskExt ); - fxMesa->Glide.grColorMaskExt(r, g, b, a); - } - else { - /* 16 bpp mode */ - /* we never have an alpha buffer */ - fxMesa->Glide.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( fxMesa->Glide.grColorMaskExt ); - fxMesa->Glide.grColorMaskExt(rgba[RCOMP], rgba[GCOMP], - rgba[BCOMP], rgba[ACOMP]); - } - else { - /* 16 bpp mode */ - /* we never have an alpha buffer */ - fxMesa->Glide.grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], GL_FALSE); - } - UNLOCK_HARDWARE(fxMesa); -} - -void -FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4]) -{ - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - if (ctx->Visual->RedBits == 8) { - /* 32bpp mode */ - ASSERT( fxMesa->Glide.grColorMaskExt ); - fxMesa->Glide.grColorMaskExt(rgba[RCOMP], rgba[GCOMP], - rgba[BCOMP], rgba[ACOMP]); - } - else { - /* 16 bpp mode */ - /* we never have an alpha buffer */ - fxMesa->Glide.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 = fxMesa->Glide.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 = fxMesa->Glide.grTexTextureMemRequired(evenOdd, info); - UNLOCK_HARDWARE(fxMesa); - return result; -} - -FxU32 -FX_grTexMinAddress(tdfxContextPtr fxMesa, GrChipID_t tmu) -{ - FxU32 result; - - LOCK_HARDWARE(fxMesa); - result = fxMesa->Glide.grTexMinAddress(tmu); - UNLOCK_HARDWARE(fxMesa); - return result; -} - -extern FxU32 -FX_grTexMaxAddress(tdfxContextPtr fxMesa, GrChipID_t tmu) -{ - FxU32 result; - - LOCK_HARDWARE(fxMesa); - result = fxMesa->Glide.grTexMaxAddress(tmu); - UNLOCK_HARDWARE(fxMesa); - return result; -} - - -int -FX_getFogTableSize(tdfxContextPtr fxMesa) -{ - int result; - LOCK_HARDWARE(fxMesa); - fxMesa->Glide.grGet(GR_FOG_TABLE_ENTRIES, sizeof(int), (void *) &result); - UNLOCK_HARDWARE(fxMesa); - return result; -} - -int -FX_getGrStateSize(tdfxContextPtr fxMesa) -{ - int result; - LOCK_HARDWARE(fxMesa); - fxMesa->Glide.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); - fxMesa->Glide.grDrawLine(a, b); - END_CLIP_LOOP(fxMesa); -} - -void -FX_grAADrawPoint(tdfxContextPtr fxMesa, GrVertex * a) -{ - BEGIN_CLIP_LOOP(fxMesa); - fxMesa->Glide.grDrawPoint(a); - END_CLIP_LOOP(fxMesa); -} - -void -FX_grDrawPolygonVertexList(tdfxContextPtr fxMesa, int n, GrVertex * verts) -{ - BEGIN_CLIP_LOOP(fxMesa); - fxMesa->Glide.grDrawVertexArrayContiguous(GR_POLYGON, n, verts, sizeof(GrVertex)); - END_CLIP_LOOP(fxMesa); -} - -#if TDFX_USE_PARGB -void -FX_setupGrVertexLayout(tdfxContextPtr fxMesa) -{ - LOCK_HARDWARE(fxMesa); - fxMesa->Glide.grReset(GR_VERTEX_PARAMETER); - - fxMesa->Glide.grCoordinateSpace(GR_WINDOW_COORDS); - fxMesa->Glide.grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_PARGB, GR_VERTEX_PARGB_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); - fxMesa->Glide.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); - fxMesa->Glide.grReset(GR_VERTEX_PARAMETER); - - fxMesa->Glide.grCoordinateSpace(GR_WINDOW_COORDS); - fxMesa->Glide.grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_RGB, GR_VERTEX_R_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_A, GR_VERTEX_A_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); - fxMesa->Glide.grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); - UNLOCK_HARDWARE(fxMesa); -} -#endif /* TDFX_USE_PARGB */ - -void -FX_grHints_NoLock(tdfxContextPtr fxMesa, GrHint_t hintType, FxU32 hintMask) -{ - switch (hintType) { - case GR_HINT_STWHINT: - { - if (hintMask & GR_STWHINT_W_DIFF_TMU0) - fxMesa->Glide.grVertexLayout(GR_PARAM_Q0, - GR_VERTEX_OOW_TMU0_OFFSET << 2, - GR_PARAM_ENABLE); - else - fxMesa->Glide.grVertexLayout(GR_PARAM_Q0, - GR_VERTEX_OOW_TMU0_OFFSET << 2, - GR_PARAM_DISABLE); - - if (hintMask & GR_STWHINT_ST_DIFF_TMU1) - fxMesa->Glide.grVertexLayout(GR_PARAM_ST1, - GR_VERTEX_SOW_TMU1_OFFSET << 2, - GR_PARAM_ENABLE); - else - fxMesa->Glide.grVertexLayout(GR_PARAM_ST1, - GR_VERTEX_SOW_TMU1_OFFSET << 2, - GR_PARAM_DISABLE); - - if (hintMask & GR_STWHINT_W_DIFF_TMU1) - fxMesa->Glide.grVertexLayout(GR_PARAM_Q1, - GR_VERTEX_OOW_TMU1_OFFSET << 2, - GR_PARAM_ENABLE); - else - fxMesa->Glide.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(fxMesa, 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 = fxMesa->Glide.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 xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h:1.3 xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h:1.3 Sat Aug 18 07:55:48 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h Thu Feb 27 12:26:36 2003 @@ -1,673 +0,0 @@ -/* - * 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. - */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h,v 1.3 2001/08/18 11:55:48 tsi Exp $ */ - -#ifndef __FX_GLIDE_WARPER__ -#define __FX_GLIDE_WARPER__ - -#include "glide.h" -#include "g3ext.h" - -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(tdfxContextPtr fxMesa, 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); \ - fxMesa->Glide.grTexDownloadTable(type,data); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0); - -#define FX_grTexDownloadTable_NoLock(type, data) \ - fxMesa->Glide.grTexDownloadTable(type, data) - - -#define FX_grFlush(fxMesa) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grFlush(); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grFinish(fxMesa) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMes->Glide.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); \ - fxMesa->Glide.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); \ - fxMesa->Glide.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) fxMesa->Glide.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(tdfxContextPtr fxMesa, 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) fxMesa->Glide.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) fxMesa->Glide.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); \ - fxMesa->Glide.grDitherMode(m); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grRenderBuffer(fxMesa, b) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grRenderBuffer(b); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grRenderBuffer_NoLock(b) fxMesa->Glide.grRenderBuffer(b) - -#define FX_grBufferClear(fxMesa, c, a, d) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - fxMesa->Glide.grBufferClear(c, a, d); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -#define FX_grBufferClear_NoLock(c, a, d) fxMesa->Glide.grBufferClear(c, a, d) - - -#define FX_grBufferClearExt_NoLock(c, a, d, s) fxMesa->Glide.grBufferClearExt(c, a, d, s) - -#define FX_grBufferClearExt(fxMesa, c, a, d, s) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - fxMesa->Glide.grBufferClearExt(c, a, d, s); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -#define FX_grEnable(fxMesa, m) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grEnable(m); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grEnable_NoLock(m) fxMesa->Glide.grEnable(m) - -#define FX_grDisable(fxMesa, m) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grDisable(m); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grDisable_NoLock(m) fxMesa->Glide.grDisable(m) - - -#define FX_grStencilFunc(fxMesa, fnc, ref, mask) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grStencilFunc((fnc), (ref), (mask)); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grStencilFunc_NoLock(f, r, m) fxMesa->grStencilFunc(f, r, m) - -#define FX_grStencilMask(fxMesa, write_mask) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grStencilMask(write_mask); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grStencilMask_NoLock(m) fxMesa->Glide.grStencilMask(m) - -#define FX_grStencilOp(fxMesa, stencil_fail, depth_fail, depth_pass) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grStencilOp((stencil_fail), (depth_fail), (depth_pass));\ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grStencilOp_NoLock(sf, df, dp) fxMesa->Glide.grStencilOp(sf, df, dp) - -#define FX_grDepthMask(fxMesa, m) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grDepthMask(m); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grDepthMask_NoLock(m) fxMesa->Glide.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); \ - fxMesa->Glide.grLfbUnlock(t, b); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grConstantColorValue(fxMesa, v) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grConstantColorValue(v); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grConstantColorValue_NoLock fxMesa->Glide.grConstantColorValue - -#define FX_grAADrawTriangle(fxMesa, a, b, c, ab, bc, ca) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - fxMesa->Glide.grAADrawTriangle(a, b, c, ab, bc, ca); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -#define FX_grAlphaBlendFunction(rs, rd, as, ad) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grAlphaBlendFunction(rs, rd, as, ad); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grAlphaCombine(func, fact, loc, oth, inv) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grAlphaCombine(func, fact, loc, oth, inv); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grAlphaCombine_NoLock fxMesa->Glide.grAlphaCombine - -#define FX_grAlphaTestFunction(fxMesa, f) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grAlphaTestFunction(f); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grAlphaTestReferenceValue(fxMesa, v) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grAlphaTestReferenceValue(v); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grClipWindow(fxMesa, minx, miny, maxx, maxy) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grClipWindow(minx, miny, maxx, maxy); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grClipWindow_NoLock fxMesa->Glide.grClipWindow - -#define FX_grColorCombine(fxMesa, func, fact, loc, oth, inv) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grColorCombine(func, fact, loc, oth, inv); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grColorCombine_NoLock fxMesa->Glide.grColorCombine - -#define FX_grCullMode(fxMesa, m) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grCullMode(m); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grDepthBiasLevel(fxMesa, lev) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grDepthBiasLevel(lev); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grDepthBufferFunction(fxMesa, func) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grDepthBufferFunction(func); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grFogColorValue(fxMesa, c) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grFogColorValue(c); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grFogMode(fxMesa, m) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grFogMode(m); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grFogTable(fxMesa, t)\ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grFogTable(t);\ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grTexClampMode(fxMesa, t, sc, tc) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grTexClampMode(t, sc, tc); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grTexClampMode_NoLock fxMesa->Glide.grTexClampMode - -#define FX_grTexCombine(fxMesa, t, rfunc, rfact, afunc, afact, rinv, ainv)\ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grTexCombine(t, rfunc, rfact, afunc, afact, rinv, ainv);\ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grTexCombine_NoLock fxMesa->Glide.grTexCombine - -#define FX_grTexDownloadMipMapLevel(fxMesa, t, sa, tlod, llod, ar, f, eo, d)\ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.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); \ - fxMesa->Glide.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); \ - fxMesa->Glide.grTexFilterMode(t, minf, magf); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grTexFilterMode_NoLock fxMesa->Glide.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); \ - fxMesa->Glide.grTexMipMapMode(t, m, lod);\ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grTexMipMapMode_NoLock fxMesa->Glide.grTexMipMapMode - -#define FX_grTexSource(t, sa, eo, i) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grTexSource(t, sa, eo, i);\ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grTexSource_NoLock fxMesa->Glide.grTexSource - -extern FxU32 FX_grTexTextureMemRequired(tdfxContextPtr fxMesa, - FxU32 evenOdd, GrTexInfo * info); - -#define FX_grTexTextureMemRequired_NoLock fxMesa->Glide.grTexTextureMemRequired - -#define FX_grGlideGetState(fxMesa, s) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grGlideGetState(s); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) -#define FX_grGlideGetState_NoLock(s) fxMesa->Glide.grGlideGetState(s); - -#define FX_grDRIBufferSwap(fxMesa, i) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grDRIBufferSwap(i); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grSstSelect(fxMesa, b) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grSstSelect(b); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grSstSelect_NoLock fxMesa->Glide.grSstSelect - -#define FX_grGlideSetState(fxMesa, s) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grGlideSetState(s); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) -#define FX_grGlideSetState_NoLock(s) fxMesa->Glide.grGlideSetState(s); - -#define FX_grDepthBufferMode(fxMesa, m) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grDepthBufferMode(m); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grLfbWriteColorFormat(fxMesa, f) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grLfbWriteColorFormat(f); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grDrawVertexArray(fxMesa, m, c, p) \ - do { \ - BEGIN_CLIP_LOOP(fxMesa); \ - fxMesa->Glide.grDrawVertexArray(m, c, p); \ - END_CLIP_LOOP(fxMesa); \ - } while (0) - -#define FX_grGlideShutdown(fxMesa) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grGlideShutdown(); \ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grTexLodBiasValue_NoLock(t, v) fxMesa->Glide.grTexLodBiasValue(t, v) - -#define FX_grTexLodBiasValue(t, v) \ - do { \ - LOCK_HARDWARE(fxMesa); \ - fxMesa->Glide.grTexLodBiasValue(t, v);\ - UNLOCK_HARDWARE(fxMesa); \ - } while (0) - -#define FX_grGlideInit_NoLock fxMesa->Glide.grGlideInit -#define FX_grSstWinOpen_NoLock fxMesa->Glide.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.13 xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c:1.13 Fri Aug 17 22:51:07 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c Thu Feb 27 12:26:36 2003 @@ -1,429 +0,0 @@ -/* -*- 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.13 2001/08/18 02:51:07 dawes Exp $ */ - -/* - * Original rewrite: - * Gareth Hughes , 29 Sep - 1 Oct 2000 - * - * Authors: - * Gareth Hughes - * Brian Paul - * - */ - -#ifdef GLX_DIRECT_RENDERING - -#include - -#include "context.h" -#include "matrix.h" -#include "mmath.h" -#include "vbxform.h" - -#include "dri_glide.h" - -#include "tdfx_context.h" -#include "tdfx_render.h" -#include "tdfx_state.h" -#include "tdfx_texman.h" - - -GLboolean -XMesaInitDriver( __DRIscreenPrivate *sPriv ) -{ - int major, minor, patch; - char msg[1024]; - - 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; -} - - -void -XMesaResetDriver( __DRIscreenPrivate *sPriv ) -{ - 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, - 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 */ ); -} - - -GLboolean -XMesaCreateContext( Display *dpy, GLvisual *mesaVis, - __DRIcontextPrivate *driContextPriv ) -{ - if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) { - fprintf( stderr, "%s( %p )\n", __FUNCTION__, driContextPriv ); - } - - return tdfxCreateContext( dpy, mesaVis, driContextPriv ); -} - - -void -XMesaDestroyContext( __DRIcontextPrivate *driContextPriv ) -{ - 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? */ ); -} - - -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 -} - -void -XMesaSwapBuffers( __DRIdrawablePrivate *driDrawPriv ) -{ - 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 ); - fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); - fxMesa->Glide.grGlideSetState( (GrState *) fxMesa->Glide.State ); - } - } - -#ifdef STATS - { - int stalls; - static int prevStalls = 0; - - stalls = fxMesa->Glide.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 */ - fxMesa->Glide.grDRIPosition( driDrawPriv->x, driDrawPriv->y, - driDrawPriv->w, driDrawPriv->h, - driDrawPriv->numClipRects, - driDrawPriv->pClipRects ); - } - - fxMesa->Glide.grDRIBufferSwap( fxMesa->Glide.SwapInterval ); - - if (fxMesa->scissoredClipRects) { - /* restore clip rects WITH scissor box */ - fxMesa->Glide.grDRIPosition( driDrawPriv->x, driDrawPriv->y, - driDrawPriv->w, driDrawPriv->h, - fxMesa->numClipRects, fxMesa->pClipRects ); - } - - -#if 0 - { - FxI32 result; - do { - result = FX_grGetInteger( FX_PENDING_BUFFERSWAPS ); - } while ( result > fxMesa->maxPendingSwapBuffers ); - } -#endif - - fxMesa->stats.swapBuffer++; - - if (ctx) { - if (ctx->DriverCtx != fxMesa) { - fxMesa = TDFX_CONTEXT(ctx); - fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); - fxMesa->Glide.grGlideSetState( (GrState *) fxMesa->Glide.State ); - } - UNLOCK_HARDWARE( fxMesa ); - } -} - - -GLboolean -XMesaUnbindContext( __DRIcontextPrivate *driContextPriv ) -{ - 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 -XMesaMakeCurrent( __DRIcontextPrivate *driContextPriv, - __DRIdrawablePrivate *driDrawPriv, - __DRIdrawablePrivate *driReadPriv ) -{ - 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 ); - - fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); - fxMesa->Glide.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 -XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) -{ - if ( 0 ) - fprintf( stderr, "***** XMesaOpenFullScreen *****\n" ); -#if 0 /* When new glide3 calls exist */ - return (GLboolean)grDRISetupFullScreen( GL_TRUE ); -#else - return GL_TRUE; -#endif -} - - -GLboolean -XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) -{ - if ( 0 ) - fprintf( stderr, "***** XMesaCloseFullScreen *****\n" ); -#if 0 /* When new glide3 calls exist */ - return (GLboolean)grDRISetupFullScreen( GL_FALSE ); -#else - return GL_TRUE; -#endif -} - - -/* Silence compiler warnings. - */ -extern void __driRegisterExtensions( void ); - -/* 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 ) -{ -#if 0 - /* 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 -} - - -#endif Index: xc/lib/GL/mesa/src/math/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/math/Imakefile:1.9 --- /dev/null Thu Feb 27 12:26:36 2003 +++ xc/lib/GL/mesa/src/math/Imakefile Mon Nov 25 09:04:52 2002 @@ -0,0 +1,91 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/math/Imakefile,v 1.9 2002/11/25 14:04:52 eich Exp $ + +#include + +/* + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. + */ + +#if BuildOSMesaLib || (BuildXF86DRI && (GlxDriverUsesMesa || GlxBuiltInXMesa)) +#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 + + +#define MesaMathBuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" + + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I../../../dri -I../../../glx -I../../dri -I.. \ + -I$(INCLUDESRC)/GL -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri +#endif + +#if defined(i386Architecture) && MesaUseX86Asm + ASM_DIR = X86 + ASM_SRCS = + ASM_OBJS = +#if MesaUseMMX + MMX_DEFS = -DUSE_MMX_ASM +#endif +#if MesaUse3DNow + 3DNOW_DEFS = -DUSE_3DNOW_ASM +#endif +#if MesaUseSSE + SSE_DEFS = -DUSE_SSE_ASM +#endif + ASM_DEFS = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(SSE_DEFS) +#endif + +#ifdef SparcArchitecture + ASM_DIR = SPARC + ASM_SRCS = + ASM_OBJS = + ASM_DEFS = -DUSE_SPARC_ASM +#endif + +#ifdef UseCompaqMathLibrary + MATHDEF = -DCCPML +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/src/$(ASM_DIR) \ + -I$(MESASRCDIR)/include \ + -I../../../include -I$(XINCLUDESRC) + + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFS) $(MATHDEF) + INCLUDES = $(MESA_INCLUDES) $(DRI_INCLUDES) + SRCS = $(MESA_MATH_SRCS) + OBJS = $(MESA_MATH_OBJS) + + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +DependTarget() Index: xc/lib/GL/mesa/src/math/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/math/Imakefile.inc:1.2 --- /dev/null Thu Feb 27 12:26:36 2003 +++ xc/lib/GL/mesa/src/math/Imakefile.inc Thu Nov 14 16:01:17 2002 @@ -0,0 +1,80 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/math/Imakefile.inc,v 1.2 2002/11/14 21:01:17 tsi Exp $ + +#ifndef MesaMathBuildDir +#define MesaMathBuildDir $(GLXLIBSRC)/mesa/src/math/ +#endif + +MESAMATHBUILDDIR = MesaMathBuildDir + + MESA_MATH_SRCS = $(MESAMATHBUILDDIR)m_debug_clip.c \ + $(MESAMATHBUILDDIR)m_debug_norm.c \ + $(MESAMATHBUILDDIR)m_debug_xform.c \ + $(MESAMATHBUILDDIR)m_debug_vertex.c \ + $(MESAMATHBUILDDIR)m_eval.c \ + $(MESAMATHBUILDDIR)m_matrix.c \ + $(MESAMATHBUILDDIR)m_translate.c \ + $(MESAMATHBUILDDIR)m_vector.c \ + $(MESAMATHBUILDDIR)m_vertices.c \ + $(MESAMATHBUILDDIR)m_xform.c + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(m_debug_clip.c, $(MESASRCDIR)/src/math) +LinkSourceFile(m_debug_norm.c, $(MESASRCDIR)/src/math) +LinkSourceFile(m_debug_vertex.c, $(MESASRCDIR)/src/math) +LinkSourceFile(m_debug_xform.c, $(MESASRCDIR)/src/math) +LinkSourceFile(m_eval.c, $(MESASRCDIR)/src/math) +LinkSourceFile(m_matrix.c, $(MESASRCDIR)/src/math) +LinkSourceFile(m_translate.c, $(MESASRCDIR)/src/math) +LinkSourceFile(m_vector.c, $(MESASRCDIR)/src/math) +LinkSourceFile(m_vertices.c, $(MESASRCDIR)/src/math) +LinkSourceFile(m_xform.c, $(MESASRCDIR)/src/math) +#endif + + MESA_MATH_OBJS = $(MESAMATHBUILDDIR)m_debug_clip.o \ + $(MESAMATHBUILDDIR)m_debug_norm.o \ + $(MESAMATHBUILDDIR)m_debug_xform.o \ + $(MESAMATHBUILDDIR)m_debug_vertex.o \ + $(MESAMATHBUILDDIR)m_eval.o \ + $(MESAMATHBUILDDIR)m_matrix.o \ + $(MESAMATHBUILDDIR)m_translate.o \ + $(MESAMATHBUILDDIR)m_vector.o \ + $(MESAMATHBUILDDIR)m_vertices.o \ + $(MESAMATHBUILDDIR)m_xform.o + +#if defined(DoSharedLib) && DoSharedLib + MESA_MATH_UOBJS = $(MESAMATHBUILDDIR)unshared/m_debug_clip.o \ + $(MESAMATHBUILDDIR)unshared/m_debug_norm.o \ + $(MESAMATHBUILDDIR)unshared/m_debug_xform.o \ + $(MESAMATHBUILDDIR)unshared/m_debug_vertex.o \ + $(MESAMATHBUILDDIR)unshared/m_eval.o \ + $(MESAMATHBUILDDIR)unshared/m_matrix.o \ + $(MESAMATHBUILDDIR)unshared/m_translate.o \ + $(MESAMATHBUILDDIR)unshared/m_vector.o \ + $(MESAMATHBUILDDIR)unshared/m_vertices.o \ + $(MESAMATHBUILDDIR)unshared/m_xform.o +#else + MATH_MESA_UOBJS = $(MESA_MATH_OBJS) +#endif + + MESA_MATH_DOBJS = $(MESAMATHBUILDDIR)debugger/m_debug_clip.o \ + $(MESAMATHBUILDDIR)debugger/m_debug_norm.o \ + $(MESAMATHBUILDDIR)debugger/m_debug_xform.o \ + $(MESAMATHBUILDDIR)debugger/m_debug_vertex.o \ + $(MESAMATHBUILDDIR)debugger/m_eval.o \ + $(MESAMATHBUILDDIR)debugger/m_matrix.o \ + $(MESAMATHBUILDDIR)debugger/m_translate.o \ + $(MESAMATHBUILDDIR)debugger/m_vector.o \ + $(MESAMATHBUILDDIR)debugger/m_vertices.o \ + $(MESAMATHBUILDDIR)debugger/m_xform.o + + MESA_MATH_POBJS = $(MESAMATHBUILDDIR)profiled/m_debug_clip.o \ + $(MESAMATHBUILDDIR)profiled/m_debug_norm.o \ + $(MESAMATHBUILDDIR)profiled/m_debug_xform.o \ + $(MESAMATHBUILDDIR)profiled/m_debug_vertex.o \ + $(MESAMATHBUILDDIR)profiled/m_eval.o \ + $(MESAMATHBUILDDIR)profiled/m_matrix.o \ + $(MESAMATHBUILDDIR)profiled/m_translate.o \ + $(MESAMATHBUILDDIR)profiled/m_vector.o \ + $(MESAMATHBUILDDIR)profiled/m_vertices.o \ + $(MESAMATHBUILDDIR)profiled/m_xform.o + Index: xc/lib/GL/mesa/src/swrast/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/swrast/Imakefile:1.9 --- /dev/null Thu Feb 27 12:26:36 2003 +++ xc/lib/GL/mesa/src/swrast/Imakefile Mon Nov 25 09:04:52 2002 @@ -0,0 +1,93 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/swrast/Imakefile,v 1.9 2002/11/25 14:04:52 eich Exp $ + +#include + +/* + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. + */ + +#if BuildOSMesaLib || (BuildXF86DRI && (GlxDriverUsesMesa || GlxBuiltInXMesa)) +#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 + + +#define MesaSwrastBuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" + + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I../../../dri -I../../../glx -I../../dri -I../../../include \ + -I$(INCLUDESRC)/GL -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri +#endif + +#if defined(i386Architecture) && MesaUseX86Asm + ASM_DIR = X86 + ASM_SRCS = + ASM_OBJS = +#if MesaUseMMX + MMX_DEFS = -DUSE_MMX_ASM +#endif +#if MesaUse3DNow + 3DNOW_DEFS = -DUSE_3DNOW_ASM +#endif +#if MesaUseSSE + SSE_DEFS = -DUSE_SSE_ASM +#endif + ASM_DEFS = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(SSE_DEFS) +#endif + +#ifdef SparcArchitecture + ASM_DIR = SPARC + ASM_SRCS = + ASM_OBJS = + ASM_DEFS = -DUSE_SPARC_ASM +#endif + +#ifdef UseCompaqMathLibrary + MATHDEF = -DCCPML +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/array_cache \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/src/swrast \ + -I$(MESASRCDIR)/src/$(ASM_DIR) \ + -I$(MESASRCDIR)/include \ + -I../../../include -I$(XINCLUDESRC) + + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFS) $(MATHDEF) + INCLUDES = $(MESA_INCLUDES) $(DRI_INCLUDES) + SRCS = $(MESA_SWRAST_SRCS) + OBJS = $(MESA_SWRAST_OBJS) + + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +DependTarget() Index: xc/lib/GL/mesa/src/swrast/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/swrast/Imakefile.inc:1.2 --- /dev/null Thu Feb 27 12:26:36 2003 +++ xc/lib/GL/mesa/src/swrast/Imakefile.inc Thu Nov 14 16:01:17 2002 @@ -0,0 +1,200 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/swrast/Imakefile.inc,v 1.2 2002/11/14 21:01:17 tsi Exp $ + +#ifndef MesaSwrastBuildDir +#define MesaSwrastBuildDir $(GLXLIBSRC)/mesa/src/swrast/ +#endif + +MESASWRASTBUILDDIR = MesaSwrastBuildDir + + MESA_SWRAST_SRCS = $(MESASWRASTBUILDDIR)s_aaline.c \ + $(MESASWRASTBUILDDIR)s_aatriangle.c \ + $(MESASWRASTBUILDDIR)s_accum.c \ + $(MESASWRASTBUILDDIR)s_alpha.c \ + $(MESASWRASTBUILDDIR)s_alphabuf.c \ + $(MESASWRASTBUILDDIR)s_bitmap.c \ + $(MESASWRASTBUILDDIR)s_blend.c \ + $(MESASWRASTBUILDDIR)s_buffers.c \ + $(MESASWRASTBUILDDIR)s_context.c \ + $(MESASWRASTBUILDDIR)s_copypix.c \ + $(MESASWRASTBUILDDIR)s_depth.c \ + $(MESASWRASTBUILDDIR)s_drawpix.c \ + $(MESASWRASTBUILDDIR)s_feedback.c \ + $(MESASWRASTBUILDDIR)s_fog.c \ + $(MESASWRASTBUILDDIR)s_histogram.c \ + $(MESASWRASTBUILDDIR)s_imaging.c \ + $(MESASWRASTBUILDDIR)s_lines.c \ + $(MESASWRASTBUILDDIR)s_logic.c \ + $(MESASWRASTBUILDDIR)s_masking.c \ + $(MESASWRASTBUILDDIR)s_pb.c \ + $(MESASWRASTBUILDDIR)s_pixeltex.c \ + $(MESASWRASTBUILDDIR)s_points.c \ + $(MESASWRASTBUILDDIR)s_readpix.c \ + $(MESASWRASTBUILDDIR)s_scissor.c \ + $(MESASWRASTBUILDDIR)s_span.c \ + $(MESASWRASTBUILDDIR)s_stencil.c \ + $(MESASWRASTBUILDDIR)s_texstore.c \ + $(MESASWRASTBUILDDIR)s_texture.c \ + $(MESASWRASTBUILDDIR)s_triangle.c \ + $(MESASWRASTBUILDDIR)s_zoom.c + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(s_aaline.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_aatriangle.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_accum.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_alpha.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_alphabuf.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_bitmap.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_blend.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_buffers.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_context.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_copypix.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_depth.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_drawpix.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_feedback.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_fog.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_histogram.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_imaging.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_lines.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_logic.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_masking.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_pb.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_pixeltex.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_points.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_readpix.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_scissor.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_span.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_stencil.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_texstore.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_texture.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_triangle.c, $(MESASRCDIR)/src/swrast) +LinkSourceFile(s_zoom.c, $(MESASRCDIR)/src/swrast) +#endif + + MESA_SWRAST_OBJS = $(MESASWRASTBUILDDIR)s_aaline.o \ + $(MESASWRASTBUILDDIR)s_aatriangle.o \ + $(MESASWRASTBUILDDIR)s_accum.o \ + $(MESASWRASTBUILDDIR)s_alpha.o \ + $(MESASWRASTBUILDDIR)s_alphabuf.o \ + $(MESASWRASTBUILDDIR)s_bitmap.o \ + $(MESASWRASTBUILDDIR)s_blend.o \ + $(MESASWRASTBUILDDIR)s_buffers.o \ + $(MESASWRASTBUILDDIR)s_context.o \ + $(MESASWRASTBUILDDIR)s_copypix.o \ + $(MESASWRASTBUILDDIR)s_depth.o \ + $(MESASWRASTBUILDDIR)s_drawpix.o \ + $(MESASWRASTBUILDDIR)s_feedback.o \ + $(MESASWRASTBUILDDIR)s_fog.o \ + $(MESASWRASTBUILDDIR)s_histogram.o \ + $(MESASWRASTBUILDDIR)s_imaging.o \ + $(MESASWRASTBUILDDIR)s_lines.o \ + $(MESASWRASTBUILDDIR)s_logic.o \ + $(MESASWRASTBUILDDIR)s_masking.o \ + $(MESASWRASTBUILDDIR)s_pb.o \ + $(MESASWRASTBUILDDIR)s_pixeltex.o \ + $(MESASWRASTBUILDDIR)s_points.o \ + $(MESASWRASTBUILDDIR)s_readpix.o \ + $(MESASWRASTBUILDDIR)s_scissor.o \ + $(MESASWRASTBUILDDIR)s_span.o \ + $(MESASWRASTBUILDDIR)s_stencil.o \ + $(MESASWRASTBUILDDIR)s_texstore.o \ + $(MESASWRASTBUILDDIR)s_texture.o \ + $(MESASWRASTBUILDDIR)s_triangle.o \ + $(MESASWRASTBUILDDIR)s_zoom.o + +#if defined(DoSharedLib) && DoSharedLib + MESA_SWRAST_UOBJS = $(MESASWRASTBUILDDIR)unshared/s_aaline.o \ + $(MESASWRASTBUILDDIR)unshared/s_aatriangle.o \ + $(MESASWRASTBUILDDIR)unshared/s_accum.o \ + $(MESASWRASTBUILDDIR)unshared/s_alpha.o \ + $(MESASWRASTBUILDDIR)unshared/s_alphabuf.o \ + $(MESASWRASTBUILDDIR)unshared/s_bitmap.o \ + $(MESASWRASTBUILDDIR)unshared/s_blend.o \ + $(MESASWRASTBUILDDIR)unshared/s_buffers.o \ + $(MESASWRASTBUILDDIR)unshared/s_context.o \ + $(MESASWRASTBUILDDIR)unshared/s_copypix.o \ + $(MESASWRASTBUILDDIR)unshared/s_depth.o \ + $(MESASWRASTBUILDDIR)unshared/s_drawpix.o \ + $(MESASWRASTBUILDDIR)unshared/s_feedback.o \ + $(MESASWRASTBUILDDIR)unshared/s_fog.o \ + $(MESASWRASTBUILDDIR)unshared/s_histogram.o \ + $(MESASWRASTBUILDDIR)unshared/s_imaging.o \ + $(MESASWRASTBUILDDIR)unshared/s_lines.o \ + $(MESASWRASTBUILDDIR)unshared/s_logic.o \ + $(MESASWRASTBUILDDIR)unshared/s_masking.o \ + $(MESASWRASTBUILDDIR)unshared/s_pb.o \ + $(MESASWRASTBUILDDIR)unshared/s_pixeltex.o \ + $(MESASWRASTBUILDDIR)unshared/s_points.o \ + $(MESASWRASTBUILDDIR)unshared/s_readpix.o \ + $(MESASWRASTBUILDDIR)unshared/s_scissor.o \ + $(MESASWRASTBUILDDIR)unshared/s_span.o \ + $(MESASWRASTBUILDDIR)unshared/s_stencil.o \ + $(MESASWRASTBUILDDIR)unshared/s_texstore.o \ + $(MESASWRASTBUILDDIR)unshared/s_texture.o \ + $(MESASWRASTBUILDDIR)unshared/s_triangle.o \ + $(MESASWRASTBUILDDIR)unshared/s_zoom.o +#else + MESA_SWRAST_UOBJS = $(MESA_SWRAST_OBJS) +#endif + + MESA_SWRAST_DOBJS = $(MESASWRASTBUILDDIR)debugger/s_aaline.o \ + $(MESASWRASTBUILDDIR)debugger/s_aatriangle.o \ + $(MESASWRASTBUILDDIR)debugger/s_accum.o \ + $(MESASWRASTBUILDDIR)debugger/s_alpha.o \ + $(MESASWRASTBUILDDIR)debugger/s_alphabuf.o \ + $(MESASWRASTBUILDDIR)debugger/s_bitmap.o \ + $(MESASWRASTBUILDDIR)debugger/s_blend.o \ + $(MESASWRASTBUILDDIR)debugger/s_buffers.o \ + $(MESASWRASTBUILDDIR)debugger/s_context.o \ + $(MESASWRASTBUILDDIR)debugger/s_copypix.o \ + $(MESASWRASTBUILDDIR)debugger/s_depth.o \ + $(MESASWRASTBUILDDIR)debugger/s_drawpix.o \ + $(MESASWRASTBUILDDIR)debugger/s_feedback.o \ + $(MESASWRASTBUILDDIR)debugger/s_fog.o \ + $(MESASWRASTBUILDDIR)debugger/s_histogram.o \ + $(MESASWRASTBUILDDIR)debugger/s_imaging.o \ + $(MESASWRASTBUILDDIR)debugger/s_lines.o \ + $(MESASWRASTBUILDDIR)debugger/s_logic.o \ + $(MESASWRASTBUILDDIR)debugger/s_masking.o \ + $(MESASWRASTBUILDDIR)debugger/s_pb.o \ + $(MESASWRASTBUILDDIR)debugger/s_pixeltex.o \ + $(MESASWRASTBUILDDIR)debugger/s_points.o \ + $(MESASWRASTBUILDDIR)debugger/s_readpix.o \ + $(MESASWRASTBUILDDIR)debugger/s_scissor.o \ + $(MESASWRASTBUILDDIR)debugger/s_span.o \ + $(MESASWRASTBUILDDIR)debugger/s_stencil.o \ + $(MESASWRASTBUILDDIR)debugger/s_texstore.o \ + $(MESASWRASTBUILDDIR)debugger/s_texture.o \ + $(MESASWRASTBUILDDIR)debugger/s_triangle.o \ + $(MESASWRASTBUILDDIR)debugger/s_zoom.o + + MESA_SWRAST_POBJS = $(MESASWRASTBUILDDIR)profiled/s_aaline.o \ + $(MESASWRASTBUILDDIR)profiled/s_aatriangle.o \ + $(MESASWRASTBUILDDIR)profiled/s_accum.o \ + $(MESASWRASTBUILDDIR)profiled/s_alpha.o \ + $(MESASWRASTBUILDDIR)profiled/s_alphabuf.o \ + $(MESASWRASTBUILDDIR)profiled/s_bitmap.o \ + $(MESASWRASTBUILDDIR)profiled/s_blend.o \ + $(MESASWRASTBUILDDIR)profiled/s_buffers.o \ + $(MESASWRASTBUILDDIR)profiled/s_context.o \ + $(MESASWRASTBUILDDIR)profiled/s_copypix.o \ + $(MESASWRASTBUILDDIR)profiled/s_depth.o \ + $(MESASWRASTBUILDDIR)profiled/s_drawpix.o \ + $(MESASWRASTBUILDDIR)profiled/s_feedback.o \ + $(MESASWRASTBUILDDIR)profiled/s_fog.o \ + $(MESASWRASTBUILDDIR)profiled/s_histogram.o \ + $(MESASWRASTBUILDDIR)profiled/s_imaging.o \ + $(MESASWRASTBUILDDIR)profiled/s_lines.o \ + $(MESASWRASTBUILDDIR)profiled/s_logic.o \ + $(MESASWRASTBUILDDIR)profiled/s_masking.o \ + $(MESASWRASTBUILDDIR)profiled/s_pb.o \ + $(MESASWRASTBUILDDIR)profiled/s_pixeltex.o \ + $(MESASWRASTBUILDDIR)profiled/s_points.o \ + $(MESASWRASTBUILDDIR)profiled/s_readpix.o \ + $(MESASWRASTBUILDDIR)profiled/s_scissor.o \ + $(MESASWRASTBUILDDIR)profiled/s_span.o \ + $(MESASWRASTBUILDDIR)profiled/s_stencil.o \ + $(MESASWRASTBUILDDIR)profiled/s_texstore.o \ + $(MESASWRASTBUILDDIR)profiled/s_texture.o \ + $(MESASWRASTBUILDDIR)profiled/s_triangle.o \ + $(MESASWRASTBUILDDIR)profiled/s_zoom.o + Index: xc/lib/GL/mesa/src/swrast_setup/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/swrast_setup/Imakefile:1.9 --- /dev/null Thu Feb 27 12:26:37 2003 +++ xc/lib/GL/mesa/src/swrast_setup/Imakefile Mon Nov 25 09:04:52 2002 @@ -0,0 +1,92 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/swrast_setup/Imakefile,v 1.9 2002/11/25 14:04:52 eich Exp $ + +#include + +/* + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. + */ + +#if BuildOSMesaLib || (BuildXF86DRI && (GlxDriverUsesMesa || GlxBuiltInXMesa)) +#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 + + +#define MesaSwrastSetupBuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I../../../dri -I../../../glx -I../../dri -I../../../include \ + -I$(INCLUDESRC)/GL -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri +#endif + +#if defined(i386Architecture) && MesaUseX86Asm + ASM_DIR = X86 + ASM_SRCS = + ASM_OBJS = +#if MesaUseMMX + MMX_DEFS = -DUSE_MMX_ASM +#endif +#if MesaUse3DNow + 3DNOW_DEFS = -DUSE_3DNOW_ASM +#endif +#if MesaUseSSE + SSE_DEFS = -DUSE_SSE_ASM +#endif + ASM_DEFS = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(SSE_DEFS) +#endif + +#ifdef SparcArchitecture + ASM_DIR = SPARC + ASM_SRCS = + ASM_OBJS = + ASM_DEFS = -DUSE_SPARC_ASM +#endif + +#ifdef UseCompaqMathLibrary + MATHDEF = -DCCPML +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/$(ASM_DIR) \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/src/swrast_setup \ + -I$(MESASRCDIR)/src/tnl \ + -I$(MESASRCDIR)/include \ + -I../../../include -I$(XINCLUDESRC) + + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFS) $(MATHDEF) + INCLUDES = $(MESA_INCLUDES) $(DRI_INCLUDES) + SRCS = $(MESA_SWR_SETUP_SRCS) + OBJS = $(MESA_SWR_SETUP_OBJS) + + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +DependTarget() Index: xc/lib/GL/mesa/src/swrast_setup/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/swrast_setup/Imakefile.inc:1.2 --- /dev/null Thu Feb 27 12:26:37 2003 +++ xc/lib/GL/mesa/src/swrast_setup/Imakefile.inc Thu Nov 14 16:01:17 2002 @@ -0,0 +1,38 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/swrast_setup/Imakefile.inc,v 1.2 2002/11/14 21:01:17 tsi Exp $ + +#ifndef MesaSwrastSetupBuildDir +#define MesaSwrastSetupBuildDir $(GLXLIBSRC)/mesa/src/swrast_setup/ +#endif + +MESASWRSETUPDIR = MesaSwrastSetupBuildDir + + MESA_SWR_SETUP_SRCS = $(MESASWRSETUPDIR)ss_context.c \ + $(MESASWRSETUPDIR)ss_triangle.c \ + $(MESASWRSETUPDIR)ss_vb.c + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(ss_context.c, $(MESASRCDIR)/src/swrast_setup) +LinkSourceFile(ss_triangle.c, $(MESASRCDIR)/src/swrast_setup) +LinkSourceFile(ss_vb.c, $(MESASRCDIR)/src/swrast_setup) +#endif + + MESA_SWR_SETUP_OBJS = $(MESASWRSETUPDIR)ss_context.o \ + $(MESASWRSETUPDIR)ss_triangle.o \ + $(MESASWRSETUPDIR)ss_vb.o + +#if defined(DoSharedLib) && DoSharedLib +MESA_SWR_SETUP_UOBJS = $(MESASWRSETUPDIR)unshared/ss_context.o \ + $(MESASWRSETUPDIR)unshared/ss_triangle.o \ + $(MESASWRSETUPDIR)unshared/ss_vb.o +#else +MESA_SWR_SETUP_UOBJS = $(MESA_SWR_SETUP_OBJS) +#endif + +MESA_SWR_SETUP_DOBJS = $(MESASWRSETUPDIR)debugger/ss_context.o \ + $(MESASWRSETUPDIR)debugger/ss_triangle.o \ + $(MESASWRSETUPDIR)debugger/ss_vb.o + +MESA_SWR_SETUP_POBJS = $(MESASWRSETUPDIR)profiled/ss_context.o \ + $(MESASWRSETUPDIR)profiled/ss_triangle.o \ + $(MESASWRSETUPDIR)profiled/ss_vb.o + Index: xc/lib/GL/mesa/src/tnl/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/tnl/Imakefile:1.9 --- /dev/null Thu Feb 27 12:26:37 2003 +++ xc/lib/GL/mesa/src/tnl/Imakefile Mon Nov 25 09:04:52 2002 @@ -0,0 +1,94 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/tnl/Imakefile,v 1.9 2002/11/25 14:04:52 eich Exp $ + +#include + +/* + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. + */ + +#if BuildOSMesaLib || (BuildXF86DRI && (GlxDriverUsesMesa || GlxBuiltInXMesa)) +#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 + + +#define MesaTnlBuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" + + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I../../../dri -I../../../glx -I../../dri -I../../../include \ + -I$(INCLUDESRC)/GL -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri +#endif + +#if defined(i386Architecture) && MesaUseX86Asm + ASM_DIR = X86 + ASM_SRCS = + ASM_OBJS = +#if MesaUseMMX + MMX_DEFS = -DUSE_MMX_ASM +#endif +#if MesaUse3DNow + 3DNOW_DEFS = -DUSE_3DNOW_ASM +#endif +#if MesaUseSSE + SSE_DEFS = -DUSE_SSE_ASM +#endif + ASM_DEFS = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(SSE_DEFS) +#endif + +#ifdef SparcArchitecture + ASM_DIR = SPARC + ASM_SRCS = + ASM_OBJS = + ASM_DEFS = -DUSE_SPARC_ASM +#endif + +#ifdef UseCompaqMathLibrary + MATHDEF = -DCCPML +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/$(ASM_DIR) \ + -I$(MESASRCDIR)/src/array_cache \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/src/swrast_setup \ + -I$(MESASRCDIR)/src/tnl \ + -I$(MESASRCDIR)/include \ + -I../../../include -I$(XINCLUDESRC) + + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFS) $(MATHDEF) + INCLUDES = $(MESA_INCLUDES) $(DRI_INCLUDES) + SRCS = $(MESA_TNL_SRCS) + OBJS = $(MESA_TNL_OBJS) + + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +DependTarget() Index: xc/lib/GL/mesa/src/tnl/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/tnl/Imakefile.inc:1.2 --- /dev/null Thu Feb 27 12:26:37 2003 +++ xc/lib/GL/mesa/src/tnl/Imakefile.inc Thu Nov 14 16:01:17 2002 @@ -0,0 +1,146 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/tnl/Imakefile.inc,v 1.2 2002/11/14 21:01:17 tsi Exp $ + +#ifndef MesaTnlBuildDir +#define MesaTnlBuildDir $(GLXLIBSRC)/mesa/src/tnl/ +#endif + +MESATNLBUILDDIR = MesaTnlBuildDir + + MESA_TNL_SRCS = $(MESATNLBUILDDIR)t_array_api.c \ + $(MESATNLBUILDDIR)t_array_import.c \ + $(MESATNLBUILDDIR)t_context.c \ + $(MESATNLBUILDDIR)t_eval_api.c \ + $(MESATNLBUILDDIR)t_imm_alloc.c \ + $(MESATNLBUILDDIR)t_imm_api.c \ + $(MESATNLBUILDDIR)t_imm_debug.c \ + $(MESATNLBUILDDIR)t_imm_dlist.c \ + $(MESATNLBUILDDIR)t_imm_elt.c \ + $(MESATNLBUILDDIR)t_imm_eval.c \ + $(MESATNLBUILDDIR)t_imm_exec.c \ + $(MESATNLBUILDDIR)t_imm_fixup.c \ + $(MESATNLBUILDDIR)t_pipeline.c \ + $(MESATNLBUILDDIR)t_vb_fog.c \ + $(MESATNLBUILDDIR)t_vb_light.c \ + $(MESATNLBUILDDIR)t_vb_normals.c \ + $(MESATNLBUILDDIR)t_vb_points.c \ + $(MESATNLBUILDDIR)t_vb_render.c \ + $(MESATNLBUILDDIR)t_vb_texgen.c \ + $(MESATNLBUILDDIR)t_vb_texmat.c \ + $(MESATNLBUILDDIR)t_vb_vertex.c + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(t_array_api.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_array_import.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_context.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_eval_api.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_imm_alloc.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_imm_api.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_imm_debug.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_imm_dlist.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_imm_elt.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_imm_eval.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_imm_exec.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_imm_fixup.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_pipeline.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_vb_fog.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_vb_light.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_vb_normals.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_vb_points.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_vb_render.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_vb_texgen.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_vb_texmat.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_vb_vertex.c, $(MESASRCDIR)/src/tnl) +#endif + + MESA_TNL_OBJS = $(MESATNLBUILDDIR)t_array_api.o \ + $(MESATNLBUILDDIR)t_array_import.o \ + $(MESATNLBUILDDIR)t_context.o \ + $(MESATNLBUILDDIR)t_eval_api.o \ + $(MESATNLBUILDDIR)t_imm_alloc.o \ + $(MESATNLBUILDDIR)t_imm_api.o \ + $(MESATNLBUILDDIR)t_imm_debug.o \ + $(MESATNLBUILDDIR)t_imm_dlist.o \ + $(MESATNLBUILDDIR)t_imm_elt.o \ + $(MESATNLBUILDDIR)t_imm_eval.o \ + $(MESATNLBUILDDIR)t_imm_exec.o \ + $(MESATNLBUILDDIR)t_imm_fixup.o \ + $(MESATNLBUILDDIR)t_pipeline.o \ + $(MESATNLBUILDDIR)t_vb_fog.o \ + $(MESATNLBUILDDIR)t_vb_light.o \ + $(MESATNLBUILDDIR)t_vb_normals.o \ + $(MESATNLBUILDDIR)t_vb_points.o \ + $(MESATNLBUILDDIR)t_vb_render.o \ + $(MESATNLBUILDDIR)t_vb_texgen.o \ + $(MESATNLBUILDDIR)t_vb_texmat.o \ + $(MESATNLBUILDDIR)t_vb_vertex.o + +#if defined(DoSharedLib) && DoSharedLib + MESA_TNL_UOBJS = $(MESATNLBUILDDIR)unshared/t_array_api.o \ + $(MESATNLBUILDDIR)unshared/t_array_import.o \ + $(MESATNLBUILDDIR)unshared/t_context.o \ + $(MESATNLBUILDDIR)unshared/t_eval_api.o \ + $(MESATNLBUILDDIR)unshared/t_imm_alloc.o \ + $(MESATNLBUILDDIR)unshared/t_imm_api.o \ + $(MESATNLBUILDDIR)unshared/t_imm_debug.o \ + $(MESATNLBUILDDIR)unshared/t_imm_dlist.o \ + $(MESATNLBUILDDIR)unshared/t_imm_elt.o \ + $(MESATNLBUILDDIR)unshared/t_imm_eval.o \ + $(MESATNLBUILDDIR)unshared/t_imm_exec.o \ + $(MESATNLBUILDDIR)unshared/t_imm_fixup.o \ + $(MESATNLBUILDDIR)unshared/t_pipeline.o \ + $(MESATNLBUILDDIR)unshared/t_vb_fog.o \ + $(MESATNLBUILDDIR)unshared/t_vb_light.o \ + $(MESATNLBUILDDIR)unshared/t_vb_normals.o \ + $(MESATNLBUILDDIR)unshared/t_vb_points.o \ + $(MESATNLBUILDDIR)unshared/t_vb_render.o \ + $(MESATNLBUILDDIR)unshared/t_vb_texgen.o \ + $(MESATNLBUILDDIR)unshared/t_vb_texmat.o \ + $(MESATNLBUILDDIR)unshared/t_vb_vertex.o +#else + MESA_TNL_UOBJS = $(MESA_TNL_OBJS) +#endif + + MESA_TNL_DOBJS = $(MESATNLBUILDDIR)debugger/t_array_api.o \ + $(MESATNLBUILDDIR)debugger/t_array_import.o \ + $(MESATNLBUILDDIR)debugger/t_context.o \ + $(MESATNLBUILDDIR)debugger/t_eval_api.o \ + $(MESATNLBUILDDIR)debugger/t_imm_alloc.o \ + $(MESATNLBUILDDIR)debugger/t_imm_api.o \ + $(MESATNLBUILDDIR)debugger/t_imm_debug.o \ + $(MESATNLBUILDDIR)debugger/t_imm_dlist.o \ + $(MESATNLBUILDDIR)debugger/t_imm_elt.o \ + $(MESATNLBUILDDIR)debugger/t_imm_eval.o \ + $(MESATNLBUILDDIR)debugger/t_imm_exec.o \ + $(MESATNLBUILDDIR)debugger/t_imm_fixup.o \ + $(MESATNLBUILDDIR)debugger/t_pipeline.o \ + $(MESATNLBUILDDIR)debugger/t_vb_fog.o \ + $(MESATNLBUILDDIR)debugger/t_vb_light.o \ + $(MESATNLBUILDDIR)debugger/t_vb_normals.o \ + $(MESATNLBUILDDIR)debugger/t_vb_points.o \ + $(MESATNLBUILDDIR)debugger/t_vb_render.o \ + $(MESATNLBUILDDIR)debugger/t_vb_texgen.o \ + $(MESATNLBUILDDIR)debugger/t_vb_texmat.o \ + $(MESATNLBUILDDIR)debugger/t_vb_vertex.o + + MESA_TNL_POBJS = $(MESATNLBUILDDIR)profiled/t_array_api.o \ + $(MESATNLBUILDDIR)profiled/t_array_import.o \ + $(MESATNLBUILDDIR)profiled/t_context.o \ + $(MESATNLBUILDDIR)profiled/t_eval_api.o \ + $(MESATNLBUILDDIR)profiled/t_imm_alloc.o \ + $(MESATNLBUILDDIR)profiled/t_imm_api.o \ + $(MESATNLBUILDDIR)profiled/t_imm_profiled.o \ + $(MESATNLBUILDDIR)profiled/t_imm_dlist.o \ + $(MESATNLBUILDDIR)profiled/t_imm_elt.o \ + $(MESATNLBUILDDIR)profiled/t_imm_eval.o \ + $(MESATNLBUILDDIR)profiled/t_imm_exec.o \ + $(MESATNLBUILDDIR)profiled/t_imm_fixup.o \ + $(MESATNLBUILDDIR)profiled/t_pipeline.o \ + $(MESATNLBUILDDIR)profiled/t_vb_fog.o \ + $(MESATNLBUILDDIR)profiled/t_vb_light.o \ + $(MESATNLBUILDDIR)profiled/t_vb_normals.o \ + $(MESATNLBUILDDIR)profiled/t_vb_points.o \ + $(MESATNLBUILDDIR)profiled/t_vb_render.o \ + $(MESATNLBUILDDIR)profiled/t_vb_texgen.o \ + $(MESATNLBUILDDIR)profiled/t_vb_texmat.o \ + $(MESATNLBUILDDIR)profiled/t_vb_vertex.o + Index: xc/lib/GL/mesa/src/tnl_dd/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/tnl_dd/Imakefile:1.7 --- /dev/null Thu Feb 27 12:26:37 2003 +++ xc/lib/GL/mesa/src/tnl_dd/Imakefile Mon Nov 25 09:04:53 2002 @@ -0,0 +1,89 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/tnl_dd/Imakefile,v 1.7 2002/11/25 14:04:53 eich Exp $ + +#include + +/* + * Need both shared and unshared Mesa objects in the following cases: + * GlxDriverUsesMesa + * GlxBuiltInXMesa + * BuildOSMesaLib + * + * In other cases, only the shared version is needed to link in to loadable + * driver modules. + */ + +#if GlxDriverUsesMesa || GlxBuiltInXMesa || BuildOSMesaLib +#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 + + +#define MesaTnlDdBuildDir /**/ +#define NeedToLinkMesaSrc +#include "Imakefile.inc" + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I../../../dri -I../../../glx -I../../dri -I../../../include \ + -I$(XINCLUDESRC) -I$(INCLUDESRC)/GL \ + -I$(XF86OSSRC) -I$(SERVERSRC)/GL/dri +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/src/tnl_dd \ + -I$(MESASRCDIR)/include \ + -I../../../include + + INCLUDES = $(MESA_INCLUDES) $(DRI_INCLUDES) + SRCS = $(MESA_TNL_DD_SRCS) + OBJS = $(MESA_TNL_DD_OBJS) + +#if defined(i386Architecture) && MesaUseX86Asm + ASM_SRCS = + ASM_OBJS = +#if MesaUseMMX + MMX_DEFS = -DUSE_MMX_ASM +#endif +#if MesaUse3DNow + 3DNOW_DEFS = -DUSE_3DNOW_ASM +#endif +#if MesaUseSSE + SSE_DEFS = -DUSE_SSE_ASM +#endif + ASM_DEFS = -DUSE_X86_ASM $(MMX_DEFS) $(3DNOW_DEFS) $(SSE_DEFS) +#endif + +#ifdef SparcArchitecture + ASM_SRCS = + ASM_OBJS = + ASM_DEFS = -DUSE_SPARC_ASM +#endif + +#ifdef UseCompaqMathLibrary + MATHDEF = -DCCPML +#endif + + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(ASM_DEFS) $(MATHDEF) + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(OBJS)) +NormalLintTarget($(SRCS)) + +DependTarget() Index: xc/lib/GL/mesa/src/tnl_dd/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/tnl_dd/Imakefile.inc:1.2 --- /dev/null Thu Feb 27 12:26:37 2003 +++ xc/lib/GL/mesa/src/tnl_dd/Imakefile.inc Thu Nov 14 16:01:18 2002 @@ -0,0 +1,38 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/tnl_dd/Imakefile.inc,v 1.2 2002/11/14 21:01:18 tsi Exp $ + +#ifndef MesaTnlDdBuildDir +#define MesaTnlDdBuildDir $(GLXLIBSRC)/mesa/src/tnl_dd/ +#endif + +MESATNLDDBUILDDIR = MesaTnlDdBuildDir + + MESA_TNL_DD_SRCS = $(MESATNLDDBUILDDIR)t_array_api.c \ + $(MESATNLDDBUILDDIR)t_dd.c \ + $(MESATNLDDBUILDDIR)t_dd_vb.c + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(t_array_api.c, $(MESASRCDIR)/src/tnl) +LinkSourceFile(t_dd.c, $(MESASRCDIR)/src/tnl_dd) +LinkSourceFile(t_dd_vb.c, $(MESASRCDIR)/src/tnl_dd) +#endif + + MESA_TNL_DD_OBJS = $(MESATNLDDBUILDDIR)t_array_api.o \ + $(MESATNLDDBUILDDIR)t_dd.o \ + $(MESATNLDDBUILDDIR)t_dd_vb.o + +#if defined(DoSharedLib) && DoSharedLib +MESA_TNL_DD_UOBJS = $(MESATNLDDBUILDDIR)unshared/t_array_api.o \ + $(MESATNLDDBUILDDIR)unshared/t_dd.o \ + $(MESATNLDDBUILDDIR)unshared/t_dd_vb.o +#else +MESA_TNL_DD_UOBJS = $(MESA_TNL_DD_OBJS) +#endif + +MESA_TNL_DD_DOBJS = $(MESATNLDDBUILDDIR)debugger/t_array_api.o \ + $(MESATNLDDBUILDDIR)debugger/t_dd.o \ + $(MESATNLDDBUILDDIR)debugger/t_dd_vb.o + +MESA_TNL_DD_POBJS = $(MESATNLDDBUILDDIR)profiled/t_array_api.o \ + $(MESATNLDDBUILDDIR)profiled/t_dd.o \ + $(MESATNLDDBUILDDIR)profiled/t_dd_vb.o + Index: xc/lib/GLU/Imakefile diff -u xc/lib/GLU/Imakefile:1.5 xc/lib/GLU/Imakefile:1.6 --- xc/lib/GLU/Imakefile:1.5 Tue Jun 5 19:03:20 2001 +++ xc/lib/GLU/Imakefile Fri May 31 14:45:39 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GLU/Imakefile,v 1.5 2001/06/05 23:03:20 dawes Exp $ +XCOMM $XFree86: xc/lib/GLU/Imakefile,v 1.6 2002/05/31 18:45:39 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 @@ -53,7 +53,7 @@ #ifndef SeparateSharedCompile #define SeparateSharedCompile YES #endif -#if NormalLibFont && SharedLibFont && SeparateSharedCompile +#if NormalLibGlu && SharedLibGlu && SeparateSharedCompile STATIC_OBJSDIR = unshared/ #endif @@ -117,15 +117,15 @@ InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) #endif -#if DebugLibFont +#if DebugLibGlu DebuggedDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(DEBUG_OBJS)) InstallLibrary($(LIBNAME)_d,$(USRLIBDIR)) -#endif /* DebugLibFont */ +#endif /* DebugLibGlu */ -#if ProfileLibFont +#if ProfileLibGlu ProfiledDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(PROFILE_OBJS)) InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) -#endif /* ProfileLibFont */ +#endif /* ProfileLibGlu */ ForceSubdirs($(SUBDIRS)) Index: xc/lib/GLU/libnurbs/internals/Imakefile diff -u xc/lib/GLU/libnurbs/internals/Imakefile:1.6 xc/lib/GLU/libnurbs/internals/Imakefile:1.9 --- xc/lib/GLU/libnurbs/internals/Imakefile:1.6 Mon Jun 11 03:23:11 2001 +++ xc/lib/GLU/libnurbs/internals/Imakefile Fri Dec 13 23:41:12 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GLU/libnurbs/internals/Imakefile,v 1.6 2001/06/11 07:23:11 torrey Exp $ +XCOMM $XFree86: xc/lib/GLU/libnurbs/internals/Imakefile,v 1.9 2002/12/14 04:41:12 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 @@ -143,8 +143,12 @@ -I$(TOP)/include \ -I$(TOP)/include/GL -#if SystemV4 || defined(DarwinArchitecture) +#if SystemV4 || defined(LynxOSArchitecture) OSDEFINES = -DNEEDCEILF +#elif defined(DarwinArchitecture) +# if OSMajorVersion <= 5 +OSDEFINES = -DNEEDCEILF +# endif #else OSDEFINES = -D_EXTENSIONS_ #endif Index: xc/lib/GLw/Imakefile diff -u xc/lib/GLw/Imakefile:1.2 xc/lib/GLw/Imakefile:1.3 --- xc/lib/GLw/Imakefile:1.2 Thu Nov 2 16:20:10 2000 +++ xc/lib/GLw/Imakefile Sat Apr 6 13:24:46 2002 @@ -25,7 +25,7 @@ * XFree86 Project. */ -XCOMM $XFree86: xc/lib/GLw/Imakefile,v 1.2 2000/11/02 21:20:10 dawes Exp $ +XCOMM $XFree86: xc/lib/GLw/Imakefile,v 1.3 2002/04/06 18:24:46 tsi Exp $ XCOMM XCOMM Imakefile for GLw library - lots of modifications for XFree86 by @@ -49,7 +49,7 @@ #define SoRev SOGLWREV #define IncSubdir GL -REQUIREDLIBS = $(LDPRELIBS) $(XLIB) +REQUIREDLIBS = $(LDPRELIBS) $(XTOOLLIB) $(XLIB) DEFINES = Index: xc/lib/ICE/ICEos2.def diff -u xc/lib/ICE/ICEos2.def:3.7 xc/lib/ICE/ICEos2.def:removed --- xc/lib/ICE/ICEos2.def:3.7 Thu Apr 29 05:13:27 1999 +++ xc/lib/ICE/ICEos2.def Thu Feb 27 12:26:38 2003 @@ -1,134 +0,0 @@ -LIBRARY ICE -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/ICE/ICEos2.def,v 3.7 1999/04/29 09:13:27 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - IceAcceptConnection @ 1 - IceAddConnectionWatch @ 2 - IceAllocScratch @ 3 - IceAppLockConn @ 4 - IceAppUnlockConn @ 5 - IceAuthFileName @ 6 - IceCheckShutdownNegotiation @ 7 - IceCloseConnection @ 8 - IceComposeNetworkIdList @ 9 - IceConnectionNumber @ 10 - IceConnectionStatus @ 11 - IceConnectionString @ 12 - IceFlush @ 13 - IceFreeAuthFileEntry @ 14 - IceFreeListenObjs @ 15 - IceGenerateMagicCookie @ 16 - IceGetAuthFileEntry @ 17 - IceGetConnectionContext @ 18 - IceGetInBufSize @ 19 - IceGetListenConnectionNumber @ 20 - IceGetListenConnectionString @ 21 - IceGetOutBufSize @ 22 - IceInitThreads @ 23 - IceLastReceivedSequenceNumber @ 24 - IceLastSentSequenceNumber @ 25 - IceListenForConnections @ 26 - IceLockAuthFile @ 27 - IceOpenConnection @ 28 - IcePing @ 29 - IceProcessMessages @ 30 - IceProtocolRevision @ 31 - IceProtocolSetup @ 32 - IceProtocolShutdown @ 33 - IceProtocolVersion @ 34 - IceReadAuthFileEntry @ 35 - IceRegisterForProtocolReply @ 36 - IceRegisterForProtocolSetup @ 37 - IceRelease @ 38 - IceRemoveConnectionWatch @ 39 - IceSetErrorHandler @ 40 - IceSetHostBasedAuthProc @ 41 - IceSetIOErrorHandler @ 42 - IceSetPaAuthData @ 43 - IceSetShutdownNegotiation @ 44 - IceSwapping @ 45 - IceUnlockAuthFile @ 46 - IceVendor @ 47 - IceWriteAuthFileEntry @ 48 - _IceTransGetPeerAddr @ 49 - _IceTransGetPeerNetworkId @ 50 - _IceErrorBadMinor @ 51 - _IceErrorBadLength @ 52 - _IceErrorBadState @ 53 - _IceErrorBadValue @ 54 - _IcePaMagicCookie1Proc @ 55 - _IcePoMagicCookie1Proc @ 56 - _IceRead @ 57 - _IceReadSkip @ 58 - _IceWrite @ 59 - _IceErrorNoAuthentication @ 60 - _IceErrorNoVersion @ 61 - _IceErrorAuthenticationRejected @ 62 - _IceErrorAuthenticationFailed @ 63 - _IceErrorProtocolDuplicate @ 64 - _IceErrorMajorOpcodeDuplicate @ 65 - _IceErrorUnknownProtocol @ 66 - _IceErrorBadMajor @ 67 - _IceDefaultErrorHandler @ 68 - _IceDefaultIOErrorHandler @ 69 - _IceGetPoValidAuthIndices @ 70 - _IceGetPaValidAuthIndices @ 71 - _IceAddOpcodeMapping @ 72 - _IceGetPeerName @ 73 - _IceProcessCoreMessage @ 74 - _IceAddReplyWait @ 75 - _IceSearchReplyWaits @ 76 - _IceCheckReplyReady @ 77 - _IceFreeConnection @ 78 - _IceConnectionOpened @ 79 - _IceConnectionClosed @ 80 - _IceErrorSetupFailed @ 81 - _IceGetPoAuthData @ 82 - _IceGetPaAuthData @ 83 - _IceTransOpenCOTSClient @ 84 - _IceTransOpenCOTSServer @ 85 - _IceTransOpenCLTSClient @ 86 - _IceTransOpenCLTSServer @ 87 - _IceTransSetOption @ 88 - _IceTransCreateListener @ 89 - _IceTransResetListener @ 90 - _IceTransAccept @ 91 - _IceTransConnect @ 92 - _IceTransBytesReadable @ 93 - _IceTransRead @ 94 - _IceTransWrite @ 95 - _IceTransReadv @ 96 - _IceTransWritev @ 97 - _IceTransDisconnect @ 98 - _IceTransClose @ 99 - _IceTransCloseForCloning @ 100 - _IceTransIsLocal @ 101 - _IceTransGetMyAddr @ 102 - _IceTransGetConnectionNumber @ 103 - _IceTransMakeAllCOTSServerListeners @ 104 - _IceTransMakeAllCLTSServerListeners @ 105 - _IceTransGetHostname @ 106 - _IceTransGetMyNetworkId @ 107 - _IceConnectionCount @ 108 - _IceLastMajorOpcode @ 109 - _IceAuthCount @ 110 - _IceAuthNames @ 111 - _IcePoAuthProcs @ 112 - _IcePaAuthProcs @ 113 - _IcePaAuthDataEntryCount @ 114 - _IceVersionCount @ 115 - _IceVersions @ 116 - _IceWatchProcs @ 117 - _IceErrorHandler @ 118 - _IceIOErrorHandler @ 119 - _IceConnectionObjs @ 120 - _IceConnectionStrings @ 121 - _IceProtocols @ 122 - _IcePaAuthDataEntries @ 123 - _IceTransSocketINETFuncs @ 124 - _IceTransSocketTCPFuncs @ 125 - IceListenForWellKnownConnections @ 126 Index: xc/lib/ICE/ICEos2.rsp diff -u xc/lib/ICE/ICEos2.rsp:3.3 xc/lib/ICE/ICEos2.rsp:removed --- xc/lib/ICE/ICEos2.rsp:3.3 Sun Jan 5 06:51:51 1997 +++ xc/lib/ICE/ICEos2.rsp Thu Feb 27 12:26:38 2003 @@ -1,6 +0,0 @@ -accept.obj authutil.obj connect.obj error.obj getauth.obj iceauth.obj+ -listen.obj locking.obj misc.obj ping.obj process.obj protosetup.obj+ -register.obj replywait.obj setauth.obj shutdown.obj transport.obj+ -watch.obj listenwk.obj /NOI /NOL /NOD /BAT -ICE.dll -ICE.map Index: xc/lib/ICE/authutil.c diff -u xc/lib/ICE/authutil.c:3.8 xc/lib/ICE/authutil.c:3.9 --- xc/lib/ICE/authutil.c:3.8 Fri Dec 14 14:53:35 2001 +++ xc/lib/ICE/authutil.c Fri May 31 14:45:41 2002 @@ -26,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/authutil.c,v 3.8 2001/12/14 19:53:35 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/authutil.c,v 3.9 2002/05/31 18:45:41 dawes Exp $ */ #include #include "ICElibint.h" @@ -37,7 +37,7 @@ #include #define Time_t time_t -#ifdef __EMX__ +#ifdef __UNIXOS2__ extern char* getenv(const char*); #define link rename #endif @@ -75,7 +75,7 @@ static char *buf; static int bsize; int size; -#if defined(WIN32) || defined(__EMX__) +#if defined(WIN32) || defined(__UNIXOS2__) #ifndef PATH_MAX #define PATH_MAX 512 #endif @@ -107,7 +107,7 @@ } if (!name) #endif -#ifdef __EMX__ +#ifdef __UNIXOS2__ strcpy (dir,"c:"); name = dir; if (!name) Index: xc/lib/ICE/connect.c diff -u xc/lib/ICE/connect.c:3.9 xc/lib/ICE/connect.c:3.10 --- xc/lib/ICE/connect.c:3.9 Fri Dec 14 14:53:35 2001 +++ xc/lib/ICE/connect.c Mon Dec 2 16:50:29 2002 @@ -26,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/connect.c,v 3.9 2001/12/14 19:53:35 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/connect.c,v 3.10 2002/12/02 21:50:29 tsi Exp $ */ #include #include "ICElibint.h" @@ -205,7 +205,7 @@ iceConn->inbufmax = iceConn->inbuf + ICE_INBUFSIZE; if ((iceConn->outbuf = iceConn->outbufptr = - (char *) malloc (ICE_OUTBUFSIZE)) == NULL) + (char *) calloc (1, ICE_OUTBUFSIZE)) == NULL) { _IceFreeConnection (iceConn); strncpy (errorStringRet, "Can't malloc", errorLength); Index: xc/lib/ICE/globals.h diff -u xc/lib/ICE/globals.h:1.4 xc/lib/ICE/globals.h:1.5 --- xc/lib/ICE/globals.h:1.4 Fri Dec 14 14:53:35 2001 +++ xc/lib/ICE/globals.h Fri May 31 14:45:41 2002 @@ -26,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/globals.h,v 1.4 2001/12/14 19:53:35 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/globals.h,v 1.5 2002/05/31 18:45:41 dawes Exp $ */ extern void _IceDefaultErrorHandler (); extern void _IceDefaultIOErrorHandler (); @@ -36,20 +36,17 @@ extern void _IceProcessCoreMessage (); -#ifndef __EMX__ +#ifndef __UNIXOS2__ IceConn _IceConnectionObjs[256]; char *_IceConnectionStrings[256]; +_IceProtocol _IceProtocols[255]; #else IceConn _IceConnectionObjs[256] = {0}; char *_IceConnectionStrings[256] = {0}; +_IceProtocol _IceProtocols[255] = {0}; #endif int _IceConnectionCount = 0; -#ifndef __EMX__ -_IceProtocol _IceProtocols[255]; -#else -_IceProtocol _IceProtocols[255] = {0}; -#endif int _IceLastMajorOpcode = 0; int _IceAuthCount = 1; Index: xc/lib/ICE/iceauth.c diff -u xc/lib/ICE/iceauth.c:3.5 xc/lib/ICE/iceauth.c:3.6 --- xc/lib/ICE/iceauth.c:3.5 Fri Dec 14 14:53:36 2001 +++ xc/lib/ICE/iceauth.c Fri May 31 14:45:41 2002 @@ -26,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/iceauth.c,v 3.5 2001/12/14 19:53:36 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/iceauth.c,v 3.6 2002/05/31 18:45:41 dawes Exp $ */ #include #include "ICElibint.h" @@ -69,7 +69,7 @@ } #else { -#ifndef __EMX__ +#ifndef __UNIXOS2__ long time (); #endif ldata[0] = time ((long *) 0); Index: xc/lib/ICE/setauth.c diff -u xc/lib/ICE/setauth.c:1.4 xc/lib/ICE/setauth.c:1.5 --- xc/lib/ICE/setauth.c:1.4 Fri Dec 14 14:53:36 2001 +++ xc/lib/ICE/setauth.c Fri May 31 14:45:41 2002 @@ -26,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/setauth.c,v 1.4 2001/12/14 19:53:36 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/setauth.c,v 1.5 2002/05/31 18:45:41 dawes Exp $ */ #include #include "ICElibint.h" @@ -49,7 +49,7 @@ */ int _IcePaAuthDataEntryCount = 0; -#ifndef __EMX__ +#ifndef __UNIXOS2__ IceAuthDataEntry _IcePaAuthDataEntries[ICE_MAX_AUTH_DATA_ENTRIES]; #else IceAuthDataEntry _IcePaAuthDataEntries[ICE_MAX_AUTH_DATA_ENTRIES] = {0}; Index: xc/lib/PEX5/PEX5os2.def diff -u xc/lib/PEX5/PEX5os2.def:3.6 xc/lib/PEX5/PEX5os2.def:removed --- xc/lib/PEX5/PEX5os2.def:3.6 Thu Apr 29 05:13:27 1999 +++ xc/lib/PEX5/PEX5os2.def Thu Feb 27 12:26:38 2003 @@ -1,429 +0,0 @@ -LIBRARY PEX5 -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/PEX5/PEX5os2.def,v 3.6 1999/04/29 09:13:27 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 65536 -EXPORTS - PEXAccumulateState @ 1 - PEXAddToNameSet @ 2 - PEXAnnotationText @ 3 - PEXAnnotationText2D @ 4 - PEXApplicationData @ 5 - PEXBeginPickAll @ 6 - PEXBeginPickOne @ 7 - PEXBeginRendering @ 8 - PEXBeginStructure @ 9 - PEXBuildTransform @ 10 - PEXBuildTransform2D @ 11 - PEXCellArray @ 12 - PEXCellArray2D @ 13 - PEXChangeNameSet @ 14 - PEXChangePickDevice @ 15 - PEXChangePipelineContext @ 16 - PEXChangeRenderer @ 17 - PEXChangeSearchContext @ 18 - PEXChangeStructureRefs @ 19 - PEXCopyBytesToOC @ 20 - PEXCopyElements @ 21 - PEXCopyLookupTable @ 22 - PEXCopyNameSet @ 23 - PEXCopyPipelineContext @ 24 - PEXCopySearchContext @ 25 - PEXCopyStructure @ 26 - PEXCountOCs @ 27 - PEXCreateLookupTable @ 28 - PEXCreateNameSet @ 29 - PEXCreatePickMeasure @ 30 - PEXCreatePipelineContext @ 31 - PEXCreateRenderer @ 32 - PEXCreateSearchContext @ 33 - PEXCreateStructure @ 34 - PEXCreateWorkstation @ 35 - PEXDecodeOCs @ 36 - PEXDeleteBetweenLabels @ 37 - PEXDeleteElements @ 38 - PEXDeleteTableEntries @ 39 - PEXDeleteToLabel @ 40 - PEXDestroyStructures @ 41 - PEXElementSearch @ 42 - PEXEncodeOCs @ 43 - PEXEncodedAnnoText @ 44 - PEXEncodedAnnoText2D @ 45 - PEXEncodedText @ 46 - PEXEncodedText2D @ 47 - PEXEndPickAll @ 48 - PEXEndPickOne @ 49 - PEXEndRendering @ 50 - PEXEndStructure @ 51 - PEXEscape @ 52 - PEXEscapeWithReply @ 53 - PEXExecuteDeferredActions @ 54 - PEXExecuteStructure @ 55 - PEXExtendedCellArray @ 56 - PEXFetchElements @ 57 - PEXFetchElementsAndSend @ 58 - PEXFillArea @ 59 - PEXFillArea2D @ 60 - PEXFillAreaSet @ 61 - PEXFillAreaSet2D @ 62 - PEXFillAreaSetWithData @ 63 - PEXFillAreaWithData @ 64 - PEXFinishOCs @ 65 - PEXFreeEnumInfo @ 66 - PEXFreeFontInfo @ 67 - PEXFreeFontNames @ 68 - PEXFreeLookupTable @ 69 - PEXFreeNameSet @ 70 - PEXFreeOCData @ 71 - PEXFreePCAttributes @ 72 - PEXFreePDAttributes @ 73 - PEXFreePMAttributes @ 74 - PEXFreePickMeasure @ 75 - PEXFreePickPaths @ 76 - PEXFreePipelineContext @ 77 - PEXFreeRenderer @ 78 - PEXFreeRendererAttributes @ 79 - PEXFreeSCAttributes @ 80 - PEXFreeSearchContext @ 81 - PEXFreeStructurePaths @ 82 - PEXFreeTableEntries @ 83 - PEXFreeWorkstation @ 84 - PEXFreeWorkstationAttributes @ 85 - PEXGDP @ 86 - PEXGDP2D @ 87 - PEXGSE @ 88 - PEXGeoNormFillArea @ 89 - PEXGeoNormFillAreaSet @ 90 - PEXGeoNormQuadrilateralMesh @ 91 - PEXGeoNormSetOfFillAreaSets @ 92 - PEXGeoNormTriangleStrip @ 93 - PEXGetAncestors @ 94 - PEXGetDefinedIndices @ 95 - PEXGetDescendants @ 96 - PEXGetElementInfo @ 97 - PEXGetEnumTypeInfo @ 98 - PEXGetExtensionInfo @ 99 - PEXGetImpDepConstants @ 100 - PEXGetNameSet @ 101 - PEXGetOCAddr @ 102 - PEXGetPickDevice @ 103 - PEXGetPickMeasure @ 104 - PEXGetPipelineContext @ 105 - PEXGetPredefinedEntries @ 106 - PEXGetProtocolFloatFormat @ 107 - PEXGetRendererAttributes @ 108 - PEXGetRendererDynamics @ 109 - PEXGetSearchContext @ 110 - PEXGetSizeOCs @ 111 - PEXGetStructureInfo @ 112 - PEXGetStructuresInNetwork @ 113 - PEXGetTableEntries @ 114 - PEXGetTableEntry @ 115 - PEXGetTableInfo @ 116 - PEXGetWorkstationAttributes @ 117 - PEXGetWorkstationDynamics @ 118 - PEXGetWorkstationPostings @ 119 - PEXGetWorkstationViewRep @ 120 - PEXIdentityMatrix @ 121 - PEXIdentityMatrix2D @ 122 - PEXInitialize @ 123 - PEXInvertMatrix @ 124 - PEXInvertMatrix2D @ 125 - PEXLabel @ 126 - PEXListFonts @ 127 - PEXListFontsWithInfo @ 128 - PEXLoadFont @ 129 - PEXLookAtViewMatrix @ 130 - PEXMapDCToWC @ 131 - PEXMapWCToDC @ 132 - PEXMapXCToNPC @ 133 - PEXMapXCToNPC2D @ 134 - PEXMarkers @ 135 - PEXMarkers2D @ 136 - PEXMatchRenderingTargets @ 137 - PEXMatrixMult @ 138 - PEXMatrixMult2D @ 139 - PEXNPCToXCTransform @ 140 - PEXNPCToXCTransform2D @ 141 - PEXNURBCurve @ 142 - PEXNURBSurface @ 143 - PEXNoop @ 144 - PEXNormalizeVectors @ 145 - PEXNormalizeVectors2D @ 146 - PEXOrthoProjMatrix @ 147 - PEXPerspProjMatrix @ 148 - PEXPickAll @ 149 - PEXPickOne @ 150 - PEXPolarViewMatrix @ 151 - PEXPolyline @ 152 - PEXPolyline2D @ 153 - PEXPolylineSetWithData @ 154 - PEXPostStructure @ 155 - PEXQuadrilateralMesh @ 156 - PEXQueryEncodedTextExtents @ 157 - PEXQueryFont @ 158 - PEXQueryTextExtents @ 159 - PEXRedrawAllStructures @ 160 - PEXRedrawClipRegion @ 161 - PEXRemoveFromNameSet @ 162 - PEXRenderElements @ 163 - PEXRenderNetwork @ 164 - PEXRestoreModelClipVolume @ 165 - PEXRotate @ 166 - PEXRotate2D @ 167 - PEXRotateGeneral @ 168 - PEXScale @ 169 - PEXScale2D @ 170 - PEXSearchNetwork @ 171 - PEXSendOCs @ 172 - PEXSetATextAlignment @ 173 - PEXSetATextHeight @ 174 - PEXSetATextPath @ 175 - PEXSetATextStyle @ 176 - PEXSetATextUpVector @ 177 - PEXSetBFInteriorStyle @ 178 - PEXSetBFInteriorStyleIndex @ 179 - PEXSetBFReflectionAttributes @ 180 - PEXSetBFReflectionModel @ 181 - PEXSetBFSurfaceColor @ 182 - PEXSetBFSurfaceColorIndex @ 183 - PEXSetBFSurfaceInterpMethod @ 184 - PEXSetCharExpansion @ 185 - PEXSetCharHeight @ 186 - PEXSetCharSpacing @ 187 - PEXSetCharUpVector @ 188 - PEXSetColorApproxIndex @ 189 - PEXSetCurveApprox @ 190 - PEXSetDepthCueIndex @ 191 - PEXSetEchoColor @ 192 - PEXSetEdgeBundleIndex @ 193 - PEXSetEditingMode @ 194 - PEXSetElementPtr @ 195 - PEXSetElementPtrAtLabel @ 196 - PEXSetFacetCullingMode @ 197 - PEXSetFacetDistinguishFlag @ 198 - PEXSetGlobalTransform @ 199 - PEXSetGlobalTransform2D @ 200 - PEXSetHLHSRID @ 201 - PEXSetIndividualASF @ 202 - PEXSetInteriorBundleIndex @ 203 - PEXSetInteriorStyle @ 204 - PEXSetInteriorStyleIndex @ 205 - PEXSetLightSourceState @ 206 - PEXSetLineBundleIndex @ 207 - PEXSetLineColor @ 208 - PEXSetLineColorIndex @ 209 - PEXSetLineType @ 210 - PEXSetLineWidth @ 211 - PEXSetLocalTransform @ 212 - PEXSetLocalTransform2D @ 213 - PEXSetMarkerBundleIndex @ 214 - PEXSetMarkerColor @ 215 - PEXSetMarkerColorIndex @ 216 - PEXSetMarkerScale @ 217 - PEXSetMarkerType @ 218 - PEXSetModelClipFlag @ 219 - PEXSetModelClipVolume @ 220 - PEXSetModelClipVolume2D @ 221 - PEXSetOfFillAreaSets @ 222 - PEXSetParaSurfCharacteristics @ 223 - PEXSetPatternAttributes @ 224 - PEXSetPatternAttributes2D @ 225 - PEXSetPatternSize @ 226 - PEXSetPickID @ 227 - PEXSetPolylineInterpMethod @ 228 - PEXSetReflectionAttributes @ 229 - PEXSetReflectionModel @ 230 - PEXSetRenderingColorModel @ 231 - PEXSetSurfaceApprox @ 232 - PEXSetSurfaceColor @ 233 - PEXSetSurfaceColorIndex @ 234 - PEXSetSurfaceEdgeColor @ 235 - PEXSetSurfaceEdgeColorIndex @ 236 - PEXSetSurfaceEdgeFlag @ 237 - PEXSetSurfaceEdgeType @ 238 - PEXSetSurfaceEdgeWidth @ 239 - PEXSetSurfaceInterpMethod @ 240 - PEXSetTableEntries @ 241 - PEXSetTextAlignment @ 242 - PEXSetTextBundleIndex @ 243 - PEXSetTextColor @ 244 - PEXSetTextColorIndex @ 245 - PEXSetTextFontIndex @ 246 - PEXSetTextPath @ 247 - PEXSetTextPrecision @ 248 - PEXSetViewIndex @ 249 - PEXSetWorkstationBufferMode @ 250 - PEXSetWorkstationDisplayUpdateMode @ 251 - PEXSetWorkstationHLHSRMode @ 252 - PEXSetWorkstationViewPriority @ 253 - PEXSetWorkstationViewRep @ 254 - PEXSetWorkstationViewport @ 255 - PEXSetWorkstationWindow @ 256 - PEXStartOCs @ 257 - PEXText @ 258 - PEXText2D @ 259 - PEXTransformPoints @ 260 - PEXTransformPoints2D @ 261 - PEXTransformPoints2DH @ 262 - PEXTransformPoints4D @ 263 - PEXTransformVectors @ 264 - PEXTransformVectors2D @ 265 - PEXTranslate @ 266 - PEXTranslate2D @ 267 - PEXTriangleStrip @ 268 - PEXUnloadFont @ 269 - PEXUnpostAllStructures @ 270 - PEXUnpostStructure @ 271 - PEXUpdatePickMeasure @ 272 - PEXUpdateWorkstation @ 273 - PEXViewMappingMatrix @ 274 - PEXViewMappingMatrix2D @ 275 - PEXViewOrientationMatrix @ 276 - PEXViewOrientationMatrix2D @ 277 - PEXXCToNPCTransform @ 278 - PEXXCToNPCTransform2D @ 279 - _PEXDecodeEnumType @ 280 - _PEXDecodeTableIndex @ 281 - _PEXDecodeColor @ 282 - _PEXDecodeFloat @ 283 - _PEXDecodeCARD16 @ 284 - _PEXDecodeVector2D @ 285 - _PEXDecodeTextAlignment @ 286 - _PEXDecodeCurveApprox @ 287 - _PEXDecodeReflectionAttr @ 288 - _PEXDecodeSurfaceApprox @ 289 - _PEXDecodeCullMode @ 290 - _PEXDecodeSwitch @ 291 - _PEXDecodePatternSize @ 292 - _PEXDecodePatternAttr2D @ 293 - _PEXDecodePatternAttr @ 294 - _PEXDecodeASF @ 295 - _PEXDecodeLocalTransform @ 296 - _PEXDecodeLocalTransform2D @ 297 - _PEXDecodeGlobalTransform @ 298 - _PEXDecodeGlobalTransform2D @ 299 - _PEXDecodeModelClipVolume @ 300 - _PEXDecodeModelClipVolume2D @ 301 - _PEXDecodeRestoreModelClip @ 302 - _PEXDecodeLightSourceState @ 303 - _PEXDecodeID @ 304 - _PEXDecodePSC @ 305 - _PEXDecodeNameSet @ 306 - _PEXDecodeExecuteStructure @ 307 - _PEXDecodeLabel @ 308 - _PEXDecodeApplicationData @ 309 - _PEXDecodeGSE @ 310 - _PEXDecodeMarkers @ 311 - _PEXDecodeMarkers2D @ 312 - _PEXDecodePolyline @ 313 - _PEXDecodePolyline2D @ 314 - _PEXDecodeText @ 315 - _PEXDecodeText2D @ 316 - _PEXDecodeAnnoText @ 317 - _PEXDecodeAnnoText2D @ 318 - _PEXDecodePolylineSet @ 319 - _PEXDecodeNURBCurve @ 320 - _PEXDecodeFillArea @ 321 - _PEXDecodeFillArea2D @ 322 - _PEXDecodeFillAreaWithData @ 323 - _PEXDecodeFillAreaSet @ 324 - _PEXDecodeFillAreaSet2D @ 325 - _PEXDecodeFillAreaSetWithData @ 326 - _PEXDecodeTriangleStrip @ 327 - _PEXDecodeQuadMesh @ 328 - _PEXDecodeSOFA @ 329 - _PEXDecodeNURBSurface @ 330 - _PEXDecodeCellArray @ 331 - _PEXDecodeCellArray2D @ 332 - _PEXDecodeExtendedCellArray @ 333 - _PEXDecodeGDP @ 334 - _PEXDecodeGDP2D @ 335 - _PEXDecodeNoop @ 336 - _PEXEncodeEnumType @ 337 - _PEXEncodeTableIndex @ 338 - _PEXEncodeColor @ 339 - _PEXEncodeFloat @ 340 - _PEXEncodeCARD16 @ 341 - _PEXEncodeVector2D @ 342 - _PEXEncodeTextAlignment @ 343 - _PEXEncodeCurveApprox @ 344 - _PEXEncodeReflectionAttr @ 345 - _PEXEncodeSurfaceApprox @ 346 - _PEXEncodeCullMode @ 347 - _PEXEncodeSwitch @ 348 - _PEXEncodePatternSize @ 349 - _PEXEncodePatternAttr2D @ 350 - _PEXEncodePatternAttr @ 351 - _PEXEncodeASF @ 352 - _PEXEncodeLocalTransform @ 353 - _PEXEncodeLocalTransform2D @ 354 - _PEXEncodeGlobalTransform @ 355 - _PEXEncodeGlobalTransform2D @ 356 - _PEXEncodeModelClipVolume @ 357 - _PEXEncodeModelClipVolume2D @ 358 - _PEXEncodeRestoreModelClip @ 359 - _PEXEncodeLightSourceState @ 360 - _PEXEncodeID @ 361 - _PEXEncodePSC @ 362 - _PEXEncodeNameSet @ 363 - _PEXEncodeExecuteStructure @ 364 - _PEXEncodeLabel @ 365 - _PEXEncodeApplicationData @ 366 - _PEXEncodeGSE @ 367 - _PEXEncodeMarkers @ 368 - _PEXEncodePolyline @ 369 - _PEXEncodeMarkers2D @ 370 - _PEXEncodePolyline2D @ 371 - _PEXEncodeText @ 372 - _PEXEncodeText2D @ 373 - _PEXEncodeAnnoText @ 374 - _PEXEncodeAnnoText2D @ 375 - _PEXEncodePolylineSet @ 376 - _PEXEncodeNURBCurve @ 377 - _PEXEncodeFillArea @ 378 - _PEXEncodeFillArea2D @ 379 - _PEXEncodeFillAreaWithData @ 380 - _PEXEncodeFillAreaSet @ 381 - _PEXEncodeFillAreaSet2D @ 382 - _PEXEncodeFillAreaSetWithData @ 383 - _PEXEncodeTriangleStrip @ 384 - _PEXEncodeQuadMesh @ 385 - _PEXEncodeSOFA @ 386 - _PEXEncodeNURBSurface @ 387 - _PEXEncodeCellArray @ 388 - _PEXEncodeCellArray2D @ 389 - _PEXEncodeExtendedCellArray @ 390 - _PEXEncodeGDP @ 391 - _PEXEncodeGDP2D @ 392 - _PEXEncodeNoop @ 393 - _PEXSendBytesToOC @ 394 - _PEXCopyPaddedBytesToOC @ 395 - _PEXGenOCBadLengthError @ 396 - _PEXConvertMaxHitsEvent @ 397 - _PEXConvertOCError @ 398 - _PEXPrintOCError @ 399 - _PEXCloseDisplay @ 400 - _PEXIEEE32toDECF @ 401 - _PEXDECFtoIEEE32 @ 402 - _PEXOCFacet @ 403 - _PEXOCListOfFacet @ 404 - _PEXOCListOfVertex @ 405 - _PEXOCListOfColor @ 406 - _PEXStoreFacet @ 407 - _PEXStoreListOfFacet @ 408 - _PEXStoreListOfVertex @ 409 - _PEXStoreListOfColor @ 410 - _PEXExtractFacet @ 411 - _PEXExtractListOfFacet @ 412 - _PEXExtractListOfVertex @ 413 - _PEXExtractListOfColor @ 414 - PEXDisplayInfoHeader @ 415 - PEXPickCache @ 416 - PEXPickCacheSize @ 417 - PEXPickCacheInUse @ 418 - PEX_encode_oc_funcs @ 419 - PEX_decode_oc_funcs @ 420 - PEX_fp_convert @ 421 Index: xc/lib/PEX5/PEX5os2.rsp diff -u xc/lib/PEX5/PEX5os2.rsp:3.2 xc/lib/PEX5/PEX5os2.rsp:removed --- xc/lib/PEX5/PEX5os2.rsp:3.2 Fri May 10 02:54:49 1996 +++ xc/lib/PEX5/PEX5os2.rsp Thu Feb 27 12:26:39 2003 @@ -1,6 +0,0 @@ -pl_convert.obj pl_escape.obj pl_font.obj pl_free.obj pl_lut.obj+ -pl_nameset.obj pl_oc_attr.obj pl_oc_dec.obj pl_oc_enc.obj pl_oc_prim.obj+ -pl_oc_str.obj pl_oc_util.obj pl_pc.obj pl_pick.obj pl_rdr.obj pl_sc.obj+ -pl_startup.obj pl_struct.obj pl_util.obj pl_wks.obj /NOI /NOL /NOD /BAT -PEX5.dll -PEX5.map Index: xc/lib/SM/SMos2.def diff -u xc/lib/SM/SMos2.def:3.5 xc/lib/SM/SMos2.def:removed --- xc/lib/SM/SMos2.def:3.5 Thu Apr 29 05:13:28 1999 +++ xc/lib/SM/SMos2.def Thu Feb 27 12:26:40 2003 @@ -1,63 +0,0 @@ -LIBRARY SM -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/SM/SMos2.def,v 3.5 1999/04/29 09:13:28 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - SmFreeProperty @ 1 - SmFreeReasons @ 2 - SmcClientID @ 3 - SmcCloseConnection @ 4 - SmcDeleteProperties @ 5 - SmcGetIceConnection @ 6 - SmcGetProperties @ 7 - SmcInteractDone @ 8 - SmcInteractRequest @ 9 - SmcModifyCallbacks @ 10 - SmcOpenConnection @ 11 - SmcProtocolRevision @ 12 - SmcProtocolVersion @ 13 - SmcRelease @ 14 - SmcRequestSaveYourself @ 15 - SmcRequestSaveYourselfPhase2 @ 16 - SmcSaveYourselfDone @ 17 - SmcSetErrorHandler @ 18 - SmcSetProperties @ 19 - SmcVendor @ 20 - SmsCleanUp @ 21 - SmsClientHostName @ 22 - SmsClientID @ 23 - SmsDie @ 24 - SmsGenerateClientID @ 25 - SmsGetIceConnection @ 26 - SmsInitialize @ 27 - SmsInteract @ 28 - SmsProtocolRevision @ 29 - SmsProtocolVersion @ 30 - SmsRegisterClientReply @ 31 - SmsReturnProperties @ 32 - SmsSaveComplete @ 33 - SmsSaveYourself @ 34 - SmsSaveYourselfPhase2 @ 35 - SmsSetErrorHandler @ 36 - SmsShutdownCancelled @ 37 - _SmcProcessMessage @ 38 - _SmsProcessMessage @ 39 - _SmcDefaultErrorHandler @ 40 - _SmsDefaultErrorHandler @ 41 - _SmsProtocolSetupProc @ 42 - _SmcOpcode @ 43 - _SmsOpcode @ 44 - _SmVersionCount @ 45 - _SmcVersions @ 46 - _SmsVersions @ 47 - _SmAuthCount @ 48 - _SmAuthNames @ 49 - _SmcAuthProcs @ 50 - _SmsAuthProcs @ 51 - _SmcErrorHandler @ 52 - _SmsErrorHandler @ 53 - _SmsNewClientProc @ 54 - _SmsNewClientData @ 55 Index: xc/lib/SM/SMos2.rsp diff -u xc/lib/SM/SMos2.rsp:3.2 xc/lib/SM/SMos2.rsp:removed --- xc/lib/SM/SMos2.rsp:3.2 Fri May 10 02:54:51 1996 +++ xc/lib/SM/SMos2.rsp Thu Feb 27 12:26:40 2003 @@ -1,4 +0,0 @@ -sm_auth.obj sm_client.obj sm_error.obj sm_genid.obj sm_manager.obj+ -sm_misc.obj sm_process.obj /NOI /NOL /NOD /BAT -SM.dll -SM.map Index: xc/lib/SM/globals.h diff -u xc/lib/SM/globals.h:1.4 xc/lib/SM/globals.h:1.5 --- xc/lib/SM/globals.h:1.4 Fri Dec 14 14:53:55 2001 +++ xc/lib/SM/globals.h Fri May 31 14:45:41 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/SM/globals.h,v 1.4 2001/12/14 19:53:55 dawes Exp $ */ +/* $XFree86: xc/lib/SM/globals.h,v 1.5 2002/05/31 18:45:41 dawes Exp $ */ /* * Author: Ralph Mor, X Consortium @@ -56,7 +56,7 @@ IcePoAuthProc _SmcAuthProcs[] = {_IcePoMagicCookie1Proc}; IcePaAuthProc _SmsAuthProcs[] = {_IcePaMagicCookie1Proc}; -#ifndef __EMX__ +#ifndef __UNIXOS2__ SmsNewClientProc _SmsNewClientProc; SmPointer _SmsNewClientData; #else Index: xc/lib/X11/CrCursor.c diff -u xc/lib/X11/CrCursor.c:1.2 xc/lib/X11/CrCursor.c:1.4 --- xc/lib/X11/CrCursor.c:1.2 Fri Dec 14 14:53:59 2001 +++ xc/lib/X11/CrCursor.c Sat Nov 23 14:27:48 2002 @@ -24,9 +24,21 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/CrCursor.c,v 1.4 2002/11/23 19:27:48 tsi Exp $ */ #include "Xlibint.h" +#ifdef USE_DYNAMIC_XCURSOR +Cursor +_XTryShapeBitmapCursor (Display *dpy, + Pixmap source, + Pixmap mask, + XColor *foreground, + XColor *background, + unsigned int x, + unsigned int y); +#endif + Cursor XCreatePixmapCursor(dpy, source, mask, foreground, background, x, y) register Display *dpy; Pixmap source, mask; @@ -37,6 +49,12 @@ register xCreateCursorReq *req; Cursor cid; +#ifdef USE_DYNAMIC_XCURSOR + cid = _XTryShapeBitmapCursor (dpy, source, mask, + foreground, background, x, y); + if (cid) + return cid; +#endif LockDisplay(dpy); GetReq(CreateCursor, req); req->cid = cid = XAllocID(dpy); Index: xc/lib/X11/CrGlCur.c diff -u xc/lib/X11/CrGlCur.c:1.4 xc/lib/X11/CrGlCur.c:1.6 --- xc/lib/X11/CrGlCur.c:1.4 Fri Dec 14 14:53:59 2001 +++ xc/lib/X11/CrGlCur.c Thu Sep 5 14:17:31 2002 @@ -24,10 +24,194 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrGlCur.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CrGlCur.c,v 1.6 2002/09/05 18:17:31 keithp Exp $ */ #include "Xlibint.h" +#ifdef USE_DYNAMIC_XCURSOR + +#include +#include +#if defined(hpux) +#include +#else +#include +#endif + +#if defined(hpux) +typedef shl_dt XModuleType; +#else +typedef void *XModuleType; +#endif + +#ifndef LIBXCURSOR +#define LIBXCURSOR "libXcursor.so" +#endif + +static char libraryName[] = LIBXCURSOR; + +static XModuleType +open_library (void) +{ + char *library = libraryName; + char *dot; + XModuleType module; + for (;;) + { +#if defined(hpux) + module = shl_load(library, BIND_DEFERRED, 0L); +#else + module = dlopen(library, RTLD_LAZY); +#endif + if (module) + return module; + dot = strrchr (library, '.'); + if (!dot) + break; + *dot = '\0'; + } + return 0; +} + +static void * +fetch_symbol (XModuleType module, char *under_symbol) +{ + void *result = NULL; + char *symbol = under_symbol + 1; +#if defined(hpux) + int getsyms_cnt, i; + struct shl_symbol *symbols; + + getsyms_cnt = shl_getsymbols(module, TYPE_PROCEDURE, + EXPORT_SYMBOLS, malloc, &symbols); + + for(i=0; i 0) { + free(symbols); + } +#else + result = dlsym (module, symbol); + if (!result) + result = dlsym (module, under_symbol); +#endif + return result; +} + +typedef void (*NoticeCreateBitmapFunc) (Display *dpy, + Pixmap pid, + unsigned int width, + unsigned int height); + +typedef void (*NoticePutBitmapFunc) (Display *dpy, + Drawable draw, + XImage *image); + +typedef Cursor (*TryShapeBitmapCursorFunc) (Display *dpy, + Pixmap source, + Pixmap mask, + XColor *foreground, + XColor *background, + unsigned int x, + unsigned int y); + +typedef Cursor (*TryShapeCursorFunc) (Display *dpy, + Font source_font, + Font mask_font, + unsigned int source_char, + unsigned int mask_char, + XColor _Xconst *foreground, + XColor _Xconst *background); + +static XModuleType _XcursorModule; +static Bool _XcursorModuleTried; + +#define GetFunc(type,name,ret) {\ + static Bool been_here; \ + static type staticFunc; \ + \ + _XLockMutex (_Xglobal_lock); \ + if (!been_here) \ + { \ + been_here = True; \ + if (!_XcursorModuleTried) \ + { \ + _XcursorModuleTried = True; \ + _XcursorModule = open_library (); \ + } \ + if (_XcursorModule) \ + staticFunc = (type) fetch_symbol (_XcursorModule, "_" name); \ + } \ + ret = staticFunc; \ + _XUnlockMutex (_Xglobal_lock); \ +} + +Cursor +_XTryShapeCursor (Display *dpy, + Font source_font, + Font mask_font, + unsigned int source_char, + unsigned int mask_char, + XColor _Xconst *foreground, + XColor _Xconst *background) +{ + TryShapeCursorFunc func; + + GetFunc (TryShapeCursorFunc, "XcursorTryShapeCursor", func); + if (func) + return (*func) (dpy, source_font, mask_font, source_char, mask_char, + foreground, background); + return None; +} + +void +_XNoticeCreateBitmap (Display *dpy, + Pixmap pid, + unsigned int width, + unsigned int height) +{ + NoticeCreateBitmapFunc func; + + GetFunc (NoticeCreateBitmapFunc, "XcursorNoticeCreateBitmap", func); + if (func) + (*func) (dpy, pid, width, height); +} + +void +_XNoticePutBitmap (Display *dpy, + Drawable draw, + XImage *image) +{ + NoticePutBitmapFunc func; + + GetFunc (NoticePutBitmapFunc, "XcursorNoticePutBitmap", func); + if (func) + (*func) (dpy, draw, image); +} + +Cursor +_XTryShapeBitmapCursor (Display *dpy, + Pixmap source, + Pixmap mask, + XColor *foreground, + XColor *background, + unsigned int x, + unsigned int y) +{ + TryShapeBitmapCursorFunc func; + + GetFunc (TryShapeBitmapCursorFunc, "XcursorTryShapeBitmapCursor", func); + if (func) + return (*func) (dpy, source, mask, foreground, background, x, y); + return None; +} +#endif + Cursor XCreateGlyphCursor(dpy, source_font, mask_font, source_char, mask_char, foreground, background) @@ -40,6 +224,12 @@ Cursor cid; register xCreateGlyphCursorReq *req; +#ifdef USE_DYNAMIC_XCURSOR + cid = _XTryShapeCursor (dpy, source_font, mask_font, + source_char, mask_char, foreground, background); + if (cid) + return cid; +#endif LockDisplay(dpy); GetReq(CreateGlyphCursor, req); cid = req->cid = XAllocID(dpy); Index: xc/lib/X11/CrPixmap.c diff -u xc/lib/X11/CrPixmap.c:1.2 xc/lib/X11/CrPixmap.c:1.4 --- xc/lib/X11/CrPixmap.c:1.2 Fri Dec 14 14:53:59 2001 +++ xc/lib/X11/CrPixmap.c Sat Nov 23 14:27:49 2002 @@ -24,9 +24,18 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/CrPixmap.c,v 1.4 2002/11/23 19:27:49 tsi Exp $ */ #include "Xlibint.h" +#ifdef USE_DYNAMIC_XCURSOR +void +_XNoticeCreateBitmap (Display *dpy, + Pixmap pid, + unsigned int width, + unsigned int height); +#endif + Pixmap XCreatePixmap (dpy, d, width, height, depth) register Display *dpy; Drawable d; @@ -44,6 +53,10 @@ pid = req->pid = XAllocID(dpy); UnlockDisplay(dpy); SyncHandle(); +#ifdef USE_DYNAMIC_XCURSOR + if (depth == 1) + _XNoticeCreateBitmap (dpy, pid, width, height); +#endif return (pid); } Index: xc/lib/X11/Font.c diff -u xc/lib/X11/Font.c:1.15 xc/lib/X11/Font.c:1.16 --- xc/lib/X11/Font.c:1.15 Fri Dec 14 14:54:00 2001 +++ xc/lib/X11/Font.c Fri Dec 13 20:55:57 2002 @@ -27,7 +27,7 @@ authorization from the X Consortium and the XFree86 Project. */ -/* $XFree86: xc/lib/X11/Font.c,v 1.15 2001/12/14 19:54:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Font.c,v 1.16 2002/12/14 01:55:57 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -720,7 +720,7 @@ } if (l - 2 - (p - charset) < 0) return 0; - if (strncasecmp(name + l - 2 - (p - charset), charset, p - charset)) + if (_XlcNCompareISOLatin1(name + l - 2 - (p - charset), charset, p - charset)) return 0; if (strlen(p + 1) + l - 1 >= sizeof(buf) - 1) return 0; Index: xc/lib/X11/GetColor.c diff -u xc/lib/X11/GetColor.c:1.4 xc/lib/X11/GetColor.c:1.5 --- xc/lib/X11/GetColor.c:1.4 Fri Dec 14 14:54:00 2001 +++ xc/lib/X11/GetColor.c Wed Dec 4 18:18:32 2002 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetColor.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetColor.c,v 1.5 2002/12/04 23:18:32 paulo Exp $ */ #define NEED_REPLIES #include @@ -71,20 +71,27 @@ /* * Let's Attempt to use Xcms and i18n approach to Parse Color */ - /* copy string to allow overwrite by _XcmsResolveColorString() */ if ((ccc = XcmsCCCOfColormap(dpy, cmap)) != (XcmsCCC)NULL) { - if (_XcmsResolveColorString(ccc, &colorname, &cmsColor_exact, - XcmsRGBFormat) >= XcmsSuccess) { + const char *tmpName = colorname; + + switch (_XcmsResolveColorString(ccc, &tmpName, &cmsColor_exact, + XcmsRGBFormat)) { + case XcmsSuccess: + case XcmsSuccessWithCompression: _XcmsRGB_to_XColor(&cmsColor_exact, exact_def, 1); memcpy((char *)hard_def, (char *)exact_def, sizeof(XColor)); ret = XAllocColor(dpy, cmap, hard_def); exact_def->pixel = hard_def->pixel; return(ret); + case XcmsFailure: + case _XCMS_NEWNAME: + /* + * if the result was _XCMS_NEWNAME tmpName points to + * a string in cmsColNm.c:pairs table, for example, + * gray70 would become tekhvc:0.0/70.0/0.0 + */ + break; } - /* - * Otherwise we failed; or colorname was changed with yet another - * name. Thus pass name to the X Server. - */ } /* Index: xc/lib/X11/GetDflt.c diff -u xc/lib/X11/GetDflt.c:3.19 xc/lib/X11/GetDflt.c:3.21 --- xc/lib/X11/GetDflt.c:3.19 Fri Dec 14 14:54:00 2001 +++ xc/lib/X11/GetDflt.c Fri May 31 14:45:41 2002 @@ -46,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/GetDflt.c,v 3.19 2001/12/14 19:54:00 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetDflt.c,v 3.21 2002/05/31 18:45:41 dawes Exp $ */ #include "Xlibint.h" #include @@ -112,7 +112,9 @@ else *dest = '\0'; #else +#ifdef X_NEEDS_PWPARAMS _Xgetpwparams pwparams; +#endif struct passwd *pw; register char *ptr; @@ -208,7 +210,7 @@ #ifdef WIN32 char *progname2; #endif -#ifdef __EMX__ +#ifdef __UNIXOS2__ char *progname2; char *dotpos; #endif @@ -222,7 +224,7 @@ if (progname2 && (!progname || progname < progname2)) progname = progname2; #endif -#ifdef __EMX__ /* Very similar to WIN32 */ +#ifdef __UNIXOS2__ /* Very similar to WIN32 */ progname2 = strrchr (prog, '\\'); if (progname2 && (!progname || progname < progname2)) progname = progname2; Index: xc/lib/X11/ICWrap.c diff -u xc/lib/X11/ICWrap.c:1.7 xc/lib/X11/ICWrap.c:1.8 --- xc/lib/X11/ICWrap.c:1.7 Fri Dec 14 14:54:01 2001 +++ xc/lib/X11/ICWrap.c Mon Nov 25 09:04:53 2002 @@ -64,7 +64,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/ICWrap.c,v 1.7 2001/12/14 19:54:01 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ICWrap.c,v 1.8 2002/11/25 14:04:53 eich Exp $ */ #define NEED_EVENTS #include "Xlibint.h" @@ -394,8 +394,12 @@ Xutf8ResetIC(ic) XIC ic; { - if (ic->core.im) - return (*ic->methods->utf8_reset)(ic); + if (ic->core.im) { + if (*ic->methods->utf8_reset) + return (*ic->methods->utf8_reset)(ic); + else if (*ic->methods->mb_reset) + return (*ic->methods->mb_reset)(ic); + } return (char *)NULL; } @@ -438,8 +442,13 @@ KeySym *keysym; Status *status; { - if (ic->core.im) - return (*ic->methods->utf8_lookup_string) (ic, ev, buffer, nbytes, - keysym, status); + if (ic->core.im) { + if (*ic->methods->utf8_lookup_string) + return (*ic->methods->utf8_lookup_string) (ic, ev, buffer, nbytes, + keysym, status); + else if (*ic->methods->mb_lookup_string) + return (*ic->methods->mb_lookup_string) (ic, ev, buffer, nbytes, + keysym, status); + } return XLookupNone; } Index: xc/lib/X11/Imakefile diff -u xc/lib/X11/Imakefile:3.43 xc/lib/X11/Imakefile:3.51 --- xc/lib/X11/Imakefile:3.43 Thu Dec 20 14:03:47 2001 +++ xc/lib/X11/Imakefile Mon Nov 25 21:31:23 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.43 2001/12/20 19:03:47 keithp Exp $ +XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.51 2002/11/26 02:31:23 dawes Exp $ #if BuildLoadableXlibI18n #define IHaveSubdirs #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" @@ -96,6 +96,13 @@ #if NoRConst RCONST_DEFINES = -DNORCONST #endif +#if DisableXLocaleDirEnv + SETID_DEFINES = -DNO_XLOCALEDIR +#elif HasIssetugid + SETID_DEFINES = -DHASSETUGID +#elif HasGetresuid + SETID_DEFINES = -DHASGETRESUID +#endif XLC_DEFINES = -DXLOCALEDIR=\"$(XLOCALEDIR)\" #if HasKrb5 K5OBJS = k5encode.o @@ -103,19 +110,36 @@ K5INCL = Krb5Includes K5DEFS = Krb5Defines #endif +#if BuildLoadableXlibXcursor +XCURSOR_DEFINES = -DUSE_DYNAMIC_XCURSOR -DLIBXCURSOR=\"libXcursor.so.$(SOXCURSORREV)\" +#endif #if NeedLibInsideFlag LIB_DEFINES = -D_XLIBINT_ +#endif +#if defined LibDirName +# define PostLocaleLibDefines -DPOSTLOCALELIBDIR=\"LibDirName\" + POSTLOCALELIBDEFINES = PostLocaleLibDefines #endif - DEFINES = $(MALLOC_DEFINES) $(LIB_DEFINES) $(MISC_DEFINES) + DEFINES = $(MALLOC_DEFINES) $(LIB_DEFINES) $(MISC_DEFINES)\ + $(POSTLOCALELIBDEFINES) OPEN_DEFINES = -I$(EXTINCSRC) $(K5INCL) $(K5DEFS) 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 */ + SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(EXTRASRCS) /* try *.c if you have trouble */ HEADERS = Xlib.h Xresource.h Xutil.h cursorfont.h Xlibint.h \ Xcms.h Xlocale.h XKBlib.h LINTLIBS = +#if BuildLoadableXlibI18n && DoSharedLib +EXTRASHAREDSRC = $(SHAREDLCSRCS) +#endif +#if !BuildLoadableXlibI18n || DoNormalLib +EXTRASTATICSRC = $(STATICLCSRCS) +#endif + +EXTRASRCS = $(EXTRASHAREDSRC) $(EXTRASTATICSRC) + SRCS1 = \ Context.c \ Depths.c \ @@ -789,15 +813,17 @@ $(XKBOBJS) $(LCOBJS) $(MISCOBJS) #if BuildLoadableXlibI18n -LCDEPSYMSRCS = XlcDL.c XlcSL.c LC_DYNDEFINES = -DUSE_DYNAMIC_LC +#endif + +SHAREDLCDEPSYMSRCS = XlcDL.c XlcSL.c -I18NSTATICSRCS = \ +SHAREDI18NSTATICSRCS = \ XDefaultIMIF.c XDefaultOMIF.c -#else -LCDEPSYMSRCS = + +STATICLCDEPSYMSRCS = -I18NSTATICSRCS = \ +STATICI18NSTATICSRCS = \ imCallbk.c \ imDefFlt.c \ imDefIc.c \ @@ -837,11 +863,9 @@ omTextExt.c \ omTextPer.c \ omXChar.c -#endif LCSRCS = \ SetLocale.c \ - $(LCDEPSYMSRCS) \ imConv.c \ imKStoUCS.c \ lcCT.c \ @@ -859,16 +883,21 @@ lcStd.c \ lcTxtPr.c \ lcUtil.c \ - lcUTF8.c \ - $(I18NSTATICSRCS) + lcUTF8.c -#if BuildLoadableXlibI18n -LCDEPOBJS = XlcDL.o XlcSL.o -I18NSTATICOBJS = \ +STATICLCSRCS = \ + $(STATICLCDEPSYMSRCS) \ + $(STATICI18NSTATICSRCS) + +SHAREDLCSRCS = \ + $(SHAREDLCDEPSYMSRCS) \ + $(SHAREDI18NSTATICSRCS) + +SHAREDLCDEPOBJS = XlcDL.o XlcSL.o +SHAREDI18NSTATICOBJS = \ XDefaultIMIF.o XDefaultOMIF.o -#else -LCDEPOBJS = -I18NSTATICOBJS = \ +STATICLCDEPOBJS = +STATICI18NSTATICOBJS = \ imCallbk.o \ imDefFlt.o \ imDefIc.o \ @@ -908,11 +937,9 @@ omTextExt.o \ omTextPer.o \ omXChar.o -#endif LCOBJS = \ SetLocale.o \ - $(LCDEPOBJS) \ imConv.o \ imKStoUCS.o \ lcCT.o \ @@ -930,8 +957,15 @@ lcStd.o \ lcTxtPr.o \ lcUtil.o \ - lcUTF8.o \ - $(I18NSTATICOBJS) + lcUTF8.o + +STATICLCOBJS = \ + $(STATICLCDEPOBJS) \ + $(STATICI18NSTATICOBJS) + +SHAREDLCOBJS = \ + $(SHAREDLCDEPOBJS) \ + $(SHAREDI18NSTATICOBJS) #ifdef OS2Architecture MISCSRCS = os2Stubs.c @@ -943,6 +977,14 @@ OBJS = $(OBJS1) $(OBJS2) $(OBJS3) +EXTRAUNSHAREDOBJS = $(STATICLCOBJS) + +#if BuildLoadableXlibI18n +EXTRASHAREDOBJS = $(SHAREDLCOBJS) +# else +EXTRASHAREDOBJS = $(STATICLCOBJS) +#endif + #if !BuildServersOnly || XnestServer || BuildGLXLibrary || BuildClients #include @@ -955,7 +997,7 @@ LinkFile(ximtrans.c,$(TRANSCOMMSRC)/transport.c) SpecialCLibObjectRule(OpenDis,$(ICONFIGFILES),$(BC_DEFINES) $(OPEN_DEFINES) $(XTRANS_X_DEFINES) $(XKB_DEFINES)) SpecialCLibObjectRule(Wrap,$(ICONFIGFILES),$(XDMAUTHDEFS)) -SpecialCLibObjectRule(XlibInt,$(ICONFIGFILES),-I$(EXTINCSRC) $(CONN_DEFINES) $(POLL_DEFINES) $(XTRANS_X_DEFINES)) +SpecialCLibObjectRule(XlibInt,$(ICONFIGFILES),$(CONN_DEFINES) $(POLL_DEFINES) $(XTRANS_X_DEFINES)) SpecialCLibObjectRule(Font,$(ICONFIGFILES),$(SHM_DEFINES) $(XF86BIGFONT_DEFINES)) SpecialCLibObjectRule(FontInfo,$(ICONFIGFILES),$(SHM_DEFINES) $(XF86BIGFONT_DEFINES)) SpecialCLibObjectRule(cmsColNm,$(ICONFIGFILES),$(CMS_DEFINES)) @@ -964,7 +1006,7 @@ SpecialCLibObjectRule(Xrm,$(_NOOP_),$(RCONST_DEFINES)) SpecialCLibObjectRule(imTransR,$(ICONFIGFILES),$(CONN_DEFINES) $(XTRANS_XIM_DEFINES)) SpecialCLibObjectRule(imTrans,$(ICONFIGFILES),$(CONN_DEFINES) $(XTRANS_XIM_DEFINES)) -SpecialCLibObjectRule(lcFile,$(ICONFIGFILES),$(XLC_DEFINES)) +SpecialCLibObjectRule(lcFile,$(ICONFIGFILES),$(XLC_DEFINES) $(SETID_DEFINES)) #if BuildXKBlib SpecialCLibObjectRule(XKBCvt,$(_NOOP_),$(RCONST_DEFINES)) SpecialCLibObjectRule(KeyBind,$(ICONFIGFILES),$(XKB_DEFINES)) @@ -975,9 +1017,15 @@ SpecialCLibObjectRule(k5encode,$(_NOOP_),$(K5INCL)) #endif #if BuildLoadableXlibI18n -SpecialCLibObjectRule(lcInit,$(ICONFIGFILES),$(LC_DYNDEFINES)) -SpecialCLibObjectRule(lcGeneric,$(ICONFIGFILES),$(LC_DYNDEFINES)) -SpecialCLibObjectRule(lcPublic,$(ICONFIGFILES),$(LC_DYNDEFINES)) +SpecialCLibObjectRuleSeparateOpts(lcInit,$(ICONFIGFILES),$(_NOOP_),$(LC_DYNDEFINES)) +SpecialCLibObjectRuleSeparateOpts(lcGeneric,$(ICONFIGFILES),$(_NOOP_),$(LC_DYNDEFINES)) +SpecialCLibObjectRuleSeparateOpts(lcPublic,$(ICONFIGFILES),$(_NOOP_),$(LC_DYNDEFINES)) +#endif +#if BuildLoadableXlibXcursor +SpecialCLibObjectRuleSeparateOpts(CrCursor,$(ICONFIGFILES),$(_NOOP_),$(XCURSOR_DEFINES)) +SpecialCLibObjectRuleSeparateOpts(CrGlCur,$(ICONFIGFILES),$(_NOOP_),$(XCURSOR_DEFINES)) +SpecialCLibObjectRuleSeparateOpts(CrPixmap,$(ICONFIGFILES),$(_NOOP_),$(XCURSOR_DEFINES)) +SpecialCLibObjectRuleSeparateOpts(PutImage,$(ICONFIGFILES),$(_NOOP_),$(XCURSOR_DEFINES)) #endif #if InstallXcmsTxt @@ -1026,8 +1074,9 @@ clean:: RemoveFiles(ks_tables_h ks_tables.h HostProgramTargetName(makekeys)) + -DependTarget3($(SRCS1),$(SRCS2),$(SRCS3)) +DependTarget3($(SRCS1),$(SRCS2),$(SRCS3) $(EXTRASRCS)) #if BuildLoadableXlibI18n MakeSubdirs($(SUBDIRS)) Index: xc/lib/X11/LookupCol.c diff -u xc/lib/X11/LookupCol.c:1.4 xc/lib/X11/LookupCol.c:1.5 --- xc/lib/X11/LookupCol.c:1.4 Fri Dec 14 14:54:02 2001 +++ xc/lib/X11/LookupCol.c Wed Dec 4 18:18:32 2002 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LookupCol.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LookupCol.c,v 1.5 2002/12/04 23:18:32 paulo Exp $ */ #define NEED_REPLIES #include @@ -60,21 +60,27 @@ /* * Let's Attempt to use Xcms and i18n approach to Parse Color */ - /* copy string to allow overwrite by _XcmsResolveColorString() */ if ((ccc = XcmsCCCOfColormap(dpy, cmap)) != (XcmsCCC)NULL) { - if (_XcmsResolveColorString(ccc, &spec, - &cmsColor_exact, XcmsRGBFormat) >= XcmsSuccess) { + const char *tmpName = spec; + + switch (_XcmsResolveColorString(ccc, &tmpName, &cmsColor_exact, + XcmsRGBFormat)) { + case XcmsSuccess: + case XcmsSuccessWithCompression: _XcmsRGB_to_XColor(&cmsColor_exact, def, 1); memcpy((char *)scr, (char *)def, sizeof(XColor)); _XUnresolveColor(ccc, scr); return(1); + case XcmsFailure: + case _XCMS_NEWNAME: + /* + * if the result was _XCMS_NEWNAME tmpName points to + * a string in cmsColNm.c:pairs table, for example, + * gray70 would become tekhvc:0.0/70.0/0.0 + */ + break; } - /* - * Otherwise we failed; or spec was changed with yet another - * name. Thus pass name to the X Server. - */ } - /* * Xcms and i18n methods failed, so lets pass it to the server Index: xc/lib/X11/ParseCol.c diff -u xc/lib/X11/ParseCol.c:1.4 xc/lib/X11/ParseCol.c:1.5 --- xc/lib/X11/ParseCol.c:1.4 Fri Dec 14 14:54:03 2001 +++ xc/lib/X11/ParseCol.c Wed Dec 4 18:18:32 2002 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ParseCol.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ParseCol.c,v 1.5 2002/12/04 23:18:32 paulo Exp $ */ #define NEED_REPLIES #include @@ -96,16 +96,24 @@ * Let's Attempt to use Xcms and i18n approach to Parse Color */ if ((ccc = XcmsCCCOfColormap(dpy, cmap)) != (XcmsCCC)NULL) { - if (_XcmsResolveColorString(ccc, &spec, - &cmsColor, XcmsRGBFormat) >= XcmsSuccess) { + const char *tmpName = spec; + + switch (_XcmsResolveColorString(ccc, &tmpName, &cmsColor, + XcmsRGBFormat)) { + case XcmsSuccess: + case XcmsSuccessWithCompression: cmsColor.pixel = def->pixel; _XcmsRGB_to_XColor(&cmsColor, def, 1); return(1); + case XcmsFailure: + case _XCMS_NEWNAME: + /* + * if the result was _XCMS_NEWNAME tmpName points to + * a string in cmsColNm.c:pairs table, for example, + * gray70 would become tekhvc:0.0/70.0/0.0 + */ + break; } - /* - * Otherwise we failed; or spec was changed with yet another - * name. Thus pass name to the X Server. - */ } /* Index: xc/lib/X11/PutImage.c diff -u xc/lib/X11/PutImage.c:3.9 xc/lib/X11/PutImage.c:3.11 --- xc/lib/X11/PutImage.c:3.9 Fri Dec 14 14:54:03 2001 +++ xc/lib/X11/PutImage.c Sun Dec 8 23:10:56 2002 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PutImage.c,v 3.9 2001/12/14 19:54:03 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PutImage.c,v 3.11 2002/12/09 04:10:56 tsi Exp $ */ #include "Xlibint.h" #include "Xutil.h" @@ -343,6 +343,7 @@ register unsigned char *src, *dest; long srclen, srcinc, destinc; unsigned int height; + int half_order; { long length = ROUNDUP(srclen, 2); register long h, n; @@ -906,6 +907,13 @@ extern void _XInitImageFuncPtrs(); +#ifdef USE_DYNAMIC_XCURSOR +void +_XNoticePutBitmap (Display *dpy, + Drawable draw, + XImage *image); +#endif + int XPutImage (dpy, d, gc, image, req_xoffset, req_yoffset, x, y, req_width, req_height) @@ -996,5 +1004,15 @@ UnlockDisplay(dpy); SyncHandle(); +#ifdef USE_DYNAMIC_XCURSOR + if (image->bits_per_pixel == 1 && + x == 0 && y == 0 && + width == image->width && height == image->height && + gc->values.function == GXcopy && + (gc->values.plane_mask & 1)) + { + _XNoticePutBitmap (dpy, d, image); + } +#endif return 0; } Index: xc/lib/X11/RdBitF.c diff -u xc/lib/X11/RdBitF.c:3.4 xc/lib/X11/RdBitF.c:3.5 --- xc/lib/X11/RdBitF.c:3.4 Fri Dec 14 14:54:05 2001 +++ xc/lib/X11/RdBitF.c Fri May 31 14:45:41 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/RdBitF.c,v 3.4 2001/12/14 19:54:05 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RdBitF.c,v 3.5 2002/05/31 18:45:41 dawes Exp $ */ /* * Code to read bitmaps from disk files. Interprets @@ -158,7 +158,7 @@ /* first time initialization */ if (initialized == False) initHexTable(); -#ifdef __EMX__ +#ifdef __UNIXOS2__ filename = __XOS2RedirRoot(filename); #endif if (!(fstream = fopen(filename, "r"))) Index: xc/lib/X11/Region.c diff -u xc/lib/X11/Region.c:1.8 xc/lib/X11/Region.c:1.9 --- xc/lib/X11/Region.c:1.8 Fri Dec 14 14:54:05 2001 +++ xc/lib/X11/Region.c Tue Jun 4 18:19:57 2002 @@ -45,7 +45,7 @@ SOFTWARE. ************************************************************************/ -/* $XFree86: xc/lib/X11/Region.c,v 1.8 2001/12/14 19:54:05 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Region.c,v 1.9 2002/06/04 22:19:57 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 @@ -1457,7 +1457,8 @@ assert(pReg->numRects<=pReg->size); } r1++; - x1 = r1->x1; + if (r1 != r1End) + x1 = r1->x1; } } Index: xc/lib/X11/SetLocale.c diff -u xc/lib/X11/SetLocale.c:3.16 xc/lib/X11/SetLocale.c:3.17 --- xc/lib/X11/SetLocale.c:3.16 Fri Dec 14 14:54:06 2001 +++ xc/lib/X11/SetLocale.c Fri May 31 14:45:41 2002 @@ -55,7 +55,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/SetLocale.c,v 3.16 2001/12/14 19:54:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetLocale.c,v 3.17 2002/05/31 18:45:41 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -144,7 +144,7 @@ char *osname; char *siname; { -#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(__EMX__) || defined(linux) +#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(__UNIXOS2__) || defined(linux) # ifdef hpux # ifndef _LastCategory /* HPUX 9 and earlier */ @@ -161,7 +161,7 @@ # define STARTCHAR '\001' # define ENDCHAR '\001' # else -# if defined(WIN32) || defined(__EMX__) +# if defined(WIN32) || defined(__UNIXOS2__) # define SKIPCOUNT 1 # define STARTCHAR '=' # define ENDCHAR ';' Index: xc/lib/X11/WMProps.c diff -u xc/lib/X11/WMProps.c:3.6 xc/lib/X11/WMProps.c:3.7 --- xc/lib/X11/WMProps.c:3.6 Fri Dec 14 14:54:07 2001 +++ xc/lib/X11/WMProps.c Fri May 31 14:45:41 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/WMProps.c,v 3.6 2001/12/14 19:54:07 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WMProps.c,v 3.7 2002/05/31 18:45:41 dawes Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., @@ -121,7 +121,7 @@ * systems will have to change this. */ char *cp = strrchr (argv[0], '/'); -#ifdef __EMX__ +#ifdef __UNIXOS2__ char *os2_cp = strrchr (argv[0],'\\'); char *dot_cp = strrchr (argv[0],'.'); if (os2_cp && (os2_cp > cp)) { Index: xc/lib/X11/WrBitF.c diff -u xc/lib/X11/WrBitF.c:3.4 xc/lib/X11/WrBitF.c:3.5 --- xc/lib/X11/WrBitF.c:3.4 Fri Dec 14 14:54:08 2001 +++ xc/lib/X11/WrBitF.c Fri May 31 14:45:41 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/WrBitF.c,v 3.4 2001/12/14 19:54:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WrBitF.c,v 3.5 2002/05/31 18:45:41 dawes Exp $ */ #include "Xlibint.h" #include @@ -112,7 +112,7 @@ else name++; -#ifdef __EMX__ +#ifdef __UNIXOS2__ filename = (char*)__XOS2RedirRoot(filename); #endif if (!(stream = fopen(filename, "w"))) Index: xc/lib/X11/X11-def.cpp diff -u xc/lib/X11/X11-def.cpp:1.12 xc/lib/X11/X11-def.cpp:1.13 --- xc/lib/X11/X11-def.cpp:1.12 Wed Sep 19 11:47:00 2001 +++ xc/lib/X11/X11-def.cpp Fri May 31 14:45:41 2002 @@ -5,13 +5,14 @@ #endif VERSION LIBRARY_VERSION EXPORTS -#ifndef __CYGWIN__ +#if !defined(__CYGWIN__) && !defined(__UNIXOS2__) _Xdebug_p=_Xdebug CONSTANT _XCreateMutex_fn_p=_XCreateMutex_fn CONSTANT _XFreeMutex_fn_p=_XFreeMutex_fn CONSTANT _XLockMutex_fn_p=_XLockMutex_fn CONSTANT _XUnlockMutex_fn_p=_XUnlockMutex_fn CONSTANT _Xglobal_lock_p=_Xglobal_lock CONSTANT + _XFlushIt XActivateScreenSaver XAddConnectionWatch XAddExtension @@ -604,7 +605,9 @@ _XDeqAsyncHandler _XEatData _XError +#ifndef __UNIXOS2__ _XFlushIt +#endif _XFlushGCCache _XFreeTemp _XGetAsyncData @@ -612,7 +615,7 @@ _XIOError _XInitImageFuncPtrs _XRead - _XReadEvents +;_XReadEvents _XReadPad _XRegisterFilterByMask _XRegisterFilterByType @@ -624,8 +627,10 @@ _XUnregisterFilter _XUnregisterInternalConnection _XVIDtoVisual +#ifndef __UNIXOS2__ _Xthread_init _Xthread_waiter +#endif XkbIgnoreExtension XkbOpenDisplay XkbQueryExtension @@ -970,8 +975,6 @@ XAddHosts XRemoveHosts XIfEvent - _XGetScanlinePad - _XGetBitsPerPixel XCreateImage _XSetImage _XInitImageFuncPtrs @@ -1460,7 +1463,6 @@ _XRegisterFilterByMask _XRegisterFilterByType _XUnregisterFilter - _Xsetlocale XDefaultString _XlcDefaultLoader _XrmInitParseInfo @@ -1993,7 +1995,15 @@ _XUnlockMutex_fn DATA _Xglobal_lock DATA #endif +#ifdef __UNIXOS2__ +; OS/2 specific exports + __XOS2RedirRoot + __XOS2RedirRoot1 + _XGetScanlinePad + _XGetBitsPerPixel + _Xsetlocale +#endif #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.12 2001/09/19 15:47:00 alanh Exp $ */ +/* $XFree86: xc/lib/X11/X11-def.cpp,v 1.13 2002/05/31 18:45:41 dawes Exp $ */ Index: xc/lib/X11/X11os2.def diff -u xc/lib/X11/X11os2.def:3.8 xc/lib/X11/X11os2.def:removed --- xc/lib/X11/X11os2.def:3.8 Thu Apr 29 05:13:28 1999 +++ xc/lib/X11/X11os2.def Thu Feb 27 12:27:00 2003 @@ -1,1182 +0,0 @@ -LIBRARY X11 -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/X11/X11os2.def,v 3.8 1999/04/29 09:13:28 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 32768 -EXPORTS - XSaveContext @ 1 - XFindContext @ 2 - XDeleteContext @ 3 - XListDepths @ 4 - XrmParseCommand @ 5 - Xpermalloc @ 6 - _XrmInternalStringToQuark @ 7 - XrmStringToQuark @ 8 - XrmPermStringToQuark @ 9 - XrmUniqueQuark @ 10 - XrmQuarkToString @ 11 - XAllocColorCells @ 12 - XAllocColorPlanes @ 13 - XAllowEvents @ 14 - XAutoRepeatOn @ 15 - XAutoRepeatOff @ 16 - XSetWindowBackground @ 17 - XSetWindowBorderWidth @ 18 - XBell @ 19 - XSetWindowBorder @ 20 - XEnableAccessControl @ 21 - XDisableAccessControl @ 22 - XSetAccessControl @ 23 - XSetCloseDownMode @ 24 - XChangeActivePointerGrab @ 25 - XSetWindowColormap @ 26 - XChangeGC @ 27 - XChangeKeyboardControl @ 28 - XChangePointerControl @ 29 - XChangeProperty @ 30 - XChangeSaveSet @ 31 - XAddToSaveSet @ 32 - XRemoveFromSaveSet @ 33 - XChangeWindowAttributes @ 34 - XResizeWindow @ 35 - XCheckIfEvent @ 36 - XCheckMaskEvent @ 37 - XCheckWindowEvent @ 38 - XCheckTypedEvent @ 39 - XCheckTypedWindowEvent @ 40 - XCirculateSubwindows @ 41 - XCirculateSubwindowsDown @ 42 - XCirculateSubwindowsUp @ 43 - XCloseDisplay @ 44 - XClearWindow @ 45 - XClearArea @ 46 - XMoveResizeWindow @ 47 - _XConnectDisplay @ 48 - _XDisconnectDisplay @ 49 - _XSendClientPrefix @ 50 - XSetAuthorization @ 51 - XConvertSelection @ 52 - XCopyArea @ 53 - XCopyColormapAndFree @ 54 - XCopyGC @ 55 - XCopyPlane @ 56 - XCreateBitmapFromData @ 57 - XCreateColormap @ 58 - XCreatePixmapCursor @ 59 - XCreateGC @ 60 - _XUpdateGCCache @ 61 - _XFlushGCCache @ 62 - XFlushGC @ 63 - XGContextFromGC @ 64 - XCreateGlyphCursor @ 65 - XCreatePixmapFromBitmapData @ 66 - XCreatePixmap @ 67 - XCreateSimpleWindow @ 68 - XCreateFontCursor @ 69 - XDefineCursor @ 70 - XDeleteProperty @ 71 - XDestroySubwindows @ 72 - XDestroyWindow @ 73 - XDisplayName @ 74 - XDrawArc @ 75 - XDrawArcs @ 76 - XDrawLine @ 77 - XDrawLines @ 78 - XDrawPoint @ 79 - XDrawPoints @ 80 - XDrawRectangle @ 81 - XDrawRectangles @ 82 - XDrawSegments @ 83 - XGetErrorText @ 84 - XGetErrorDatabaseText @ 85 - XSetErrorHandler @ 86 - XSetIOErrorHandler @ 87 - _XEventToWire @ 88 - XFetchName @ 89 - XGetIconName @ 90 - XFillArc @ 91 - XFillArcs @ 92 - XFillPolygon @ 93 - XFillRectangle @ 94 - XFillRectangles @ 95 - XFlush @ 96 - XLoadQueryFont @ 97 - XFreeFont @ 98 - XQueryFont @ 99 - XListFonts @ 100 - XFreeFontNames @ 101 - XListFontsWithInfo @ 102 - XFreeFontInfo @ 103 - XFreeColormap @ 104 - XFreeColors @ 105 - XFreeCursor @ 106 - _XFreeExtData @ 107 - XFreeGC @ 108 - XFreePixmap @ 109 - XActivateScreenSaver @ 110 - XResetScreenSaver @ 111 - XForceScreenSaver @ 112 - XSetArcMode @ 113 - XSetFillRule @ 114 - XSetFillStyle @ 115 - XSetGraphicsExposures @ 116 - XSetSubwindowMode @ 117 - XGeometry @ 118 - XGetAtomName @ 119 - XAllocNamedColor @ 120 - XGetDefault @ 121 - XGetFontPath @ 122 - XFreeFontPath @ 123 - XGetFontProperty @ 124 - XGetGeometry @ 125 - XAllocColor @ 126 - XGetSizeHints @ 127 - XGetWMHints @ 128 - XGetZoomHints @ 129 - XGetNormalHints @ 130 - XGetIconSizes @ 131 - XGetCommand @ 132 - XGetTransientForHint @ 133 - XGetClassHint @ 134 - XGetInputFocus @ 135 - XGetImage @ 136 - XGetSubImage @ 137 - XGetKeyboardControl @ 138 - XGetMotionEvents @ 139 - XGetPointerControl @ 140 - XGetPointerMapping @ 141 - XGetKeyboardMapping @ 142 - XGetWindowProperty @ 143 - XGetSelectionOwner @ 144 - XGetScreenSaver @ 145 - XGetStandardColormap @ 146 - XGetWindowAttributes @ 147 - XGrabButton @ 148 - XGrabKey @ 149 - XGrabKeyboard @ 150 - XGrabPointer @ 151 - XGrabServer @ 152 - XAddHost @ 153 - XRemoveHost @ 154 - XAddHosts @ 155 - XRemoveHosts @ 156 - XIfEvent @ 157 - _XGetScanlinePad @ 158 - _XGetBitsPerPixel @ 159 - XCreateImage @ 160 - _XSetImage @ 161 - _XInitImageFuncPtrs @ 162 - XDrawImageString @ 163 - XDrawImageString16 @ 164 - XInitExtension @ 165 - XAddExtension @ 166 - XEHeadOfExtensionList @ 167 - XAddToExtensionList @ 168 - XFindOnExtensionList @ 169 - XESetCreateGC @ 170 - XESetCopyGC @ 171 - XESetFlushGC @ 172 - XESetFreeGC @ 173 - XESetCreateFont @ 174 - XESetFreeFont @ 175 - XESetCloseDisplay @ 176 - XESetWireToEvent @ 177 - XESetEventToWire @ 178 - XESetWireToError @ 179 - XESetError @ 180 - XESetErrorString @ 181 - XESetPrintErrorValues @ 182 - XInstallColormap @ 183 - XInternAtom @ 184 - XKeycodeToKeysym @ 185 - XKeysymToKeycode @ 186 - XLookupKeysym @ 187 - XRefreshKeyboardMapping @ 188 - XLookupString @ 189 - XRebindKeysym @ 190 - XKeysymToString @ 191 - XKillClient @ 192 - XListHosts @ 193 - XListInstalledColormaps @ 194 - XListProperties @ 195 - XListExtensions @ 196 - XFreeExtensionList @ 197 - XLoadFont @ 198 - XLookupColor @ 199 - XLowerWindow @ 200 - XConnectionNumber @ 942 - XRootWindow @ 943 - XDefaultScreen @ 201 - XDefaultRootWindow @ 202 - XDefaultVisual @ 203 - XDefaultGC @ 204 - XBlackPixel @ 205 - XWhitePixel @ 206 - XAllPlanes @ 207 - XQLength @ 208 - XDisplayWidth @ 209 - XDisplayHeight @ 210 - XDisplayWidthMM @ 211 - XDisplayHeightMM @ 212 - XDisplayPlanes @ 213 - XDisplayCells @ 214 - XScreenCount @ 215 - XServerVendor @ 216 - XProtocolVersion @ 217 - XProtocolRevision @ 218 - XVendorRelease @ 219 - XDisplayString @ 220 - XDefaultDepth @ 221 - XDefaultColormap @ 222 - XBitmapUnit @ 223 - XBitmapBitOrder @ 224 - XBitmapPad @ 225 - XImageByteOrder @ 226 - XNextRequest @ 227 - XLastKnownRequestProcessed @ 228 - XScreenOfDisplay @ 229 - XDefaultScreenOfDisplay @ 230 - XDisplayOfScreen @ 231 - XRootWindowOfScreen @ 232 - XBlackPixelOfScreen @ 233 - XWhitePixelOfScreen @ 234 - XDefaultColormapOfScreen @ 235 - XDefaultDepthOfScreen @ 236 - XDefaultGCOfScreen @ 237 - XDefaultVisualOfScreen @ 238 - XWidthOfScreen @ 239 - XHeightOfScreen @ 240 - XWidthMMOfScreen @ 241 - XHeightMMOfScreen @ 242 - XPlanesOfScreen @ 243 - XCellsOfScreen @ 244 - XMinCmapsOfScreen @ 245 - XMaxCmapsOfScreen @ 246 - XDoesSaveUnders @ 247 - XDoesBackingStore @ 248 - XEventMaskOfScreen @ 249 - XScreenNumberOfScreen @ 250 - XDestroyImage @ 251 - XGetPixel @ 252 - XPutPixel @ 253 - XSubImage @ 254 - XAddPixel @ 255 - XNoOp @ 256 - XMapRaised @ 257 - XMapSubwindows @ 258 - XMapWindow @ 259 - XMaskEvent @ 260 - XMaxRequestSize @ 261 - XResourceManagerString @ 262 - XDisplayMotionBufferSize @ 263 - XDisplayKeycodes @ 264 - XVisualIDFromVisual @ 265 - XGetModifierMapping @ 266 - XSetModifierMapping @ 267 - XNewModifiermap @ 268 - XFreeModifiermap @ 269 - XInsertModifiermapEntry @ 270 - XDeleteModifiermapEntry @ 271 - XMoveWindow @ 272 - XNextEvent @ 273 - XOpenDisplay @ 274 - _XFreeDisplayStructure @ 275 - XParseColor @ 276 - XParseGeometry @ 277 - XPeekEvent @ 278 - XPeekIfEvent @ 279 - XEventsQueued @ 280 - XPending @ 281 - XSetWindowBackgroundPixmap @ 282 - XSetWindowBorderPixmap @ 283 - XPolygonRegion @ 284 - XDrawText @ 285 - XDrawText16 @ 286 - XPutBackEvent @ 287 - _XReverse_Bytes @ 288 - XPutImage @ 289 - XQueryBestSize @ 290 - XQueryColor @ 291 - XQueryColors @ 292 - XQueryBestCursor @ 293 - XQueryExtension @ 294 - XQueryKeymap @ 295 - XQueryPointer @ 296 - XQueryBestStipple @ 297 - XQueryTextExtents16 @ 298 - XQueryTextExtents @ 299 - XQueryBestTile @ 300 - XQueryTree @ 301 - XRaiseWindow @ 302 - XReadBitmapFile @ 303 - XRecolorCursor @ 304 - XConfigureWindow @ 305 - XCreateRegion @ 306 - XClipBox @ 307 - XUnionRectWithRegion @ 308 - XSetRegion @ 309 - XDestroyRegion @ 310 - XOffsetRegion @ 311 - XShrinkRegion @ 312 - XIntersectRegion @ 313 - XUnionRegion @ 314 - XSubtractRegion @ 315 - XXorRegion @ 316 - XEmptyRegion @ 317 - XEqualRegion @ 318 - XPointInRegion @ 319 - XRectInRegion @ 320 - XReparentWindow @ 321 - XRestackWindows @ 322 - XRotateWindowProperties @ 323 - XScreenResourceString @ 324 - XSelectInput @ 325 - XSendEvent @ 326 - XSetBackground @ 327 - XSetClipRectangles @ 328 - _XSetClipRectangles @ 329 - XSetClipMask @ 330 - XSetClipOrigin @ 331 - XSetDashes @ 332 - XSetFontPath @ 333 - XSetFont @ 334 - XSetForeground @ 335 - XSetFunction @ 336 - XSetSizeHints @ 337 - XSetWMHints @ 338 - XSetZoomHints @ 339 - XSetNormalHints @ 340 - XSetIconSizes @ 341 - XSetCommand @ 342 - XSetStandardProperties @ 343 - XSetTransientForHint @ 344 - XSetClassHint @ 345 - XSetInputFocus @ 346 - XSetLineAttributes @ 347 - XSetPlaneMask @ 348 - XSetPointerMapping @ 349 - XChangeKeyboardMapping @ 350 - XSetSelectionOwner @ 351 - XSetScreenSaver @ 352 - XSetState @ 353 - XSetStipple @ 354 - XSetStandardColormap @ 355 - XSetTile @ 356 - XSetTSOrigin @ 357 - XRotateBuffers @ 358 - XFetchBuffer @ 359 - XFetchBytes @ 360 - XStoreBuffer @ 361 - XStoreBytes @ 362 - XStoreColor @ 363 - XStoreColors @ 364 - XStoreNamedColor @ 365 - XStoreName @ 366 - XSetIconName @ 367 - _XInitKeysymDB @ 368 - XStringToKeysym @ 369 - XSync @ 370 - _XSyncFunction @ 371 - XSynchronize @ 372 - XSetAfterFunction @ 373 - XDrawString @ 374 - XDrawString16 @ 375 - XTextExtents @ 376 - XTextWidth @ 377 - XTextExtents16 @ 378 - XTextWidth16 @ 379 - XTranslateCoordinates @ 380 - XUndefineCursor @ 381 - XUngrabButton @ 382 - XUngrabKeyboard @ 383 - XUngrabKey @ 384 - XUngrabPointer @ 385 - XUngrabServer @ 386 - XUninstallColormap @ 387 - XUnloadFont @ 388 - XUnmapSubwindows @ 389 - XUnmapWindow @ 390 - XGetVisualInfo @ 391 - XMatchVisualInfo @ 392 - XWarpPointer @ 393 - XWindowEvent @ 394 - XCreateWindow @ 395 - _XProcessWindowAttributes @ 396 - XWriteBitmapFile @ 397 - _XFlush @ 398 - _XEventsQueued @ 399 - _XReadEvents @ 400 - _XRead @ 401 - _XReadPad @ 402 - _XSend @ 403 - _XAllocID @ 404 - _XSetLastRequestRead @ 405 - _XReply @ 406 - _XEatData @ 407 - _XEnq @ 408 - _XUnknownWireEvent @ 409 - _XUnknownNativeEvent @ 410 - _XWireToEvent @ 411 - _XDefaultIOError @ 412 - _XDefaultError @ 413 - _XDefaultWireError @ 414 - _XError @ 415 - _XIOError @ 416 - _XAllocScratch @ 417 - _XVIDtoVisual @ 418 - XFree @ 419 - _XGetHostname @ 420 - _XScreenOfWindow @ 421 - _XAllocIDs @ 423 - _XAllocTemp @ 424 - _XFreeTemp @ 425 - XrmInitialize @ 426 - XrmGetDatabase @ 427 - XrmSetDatabase @ 428 - XrmStringToQuarkList @ 429 - XrmStringToBindingQuarkList @ 430 - XrmCombineDatabase @ 431 - XrmMergeDatabases @ 432 - XrmQPutResource @ 433 - XrmPutResource @ 434 - XrmQPutStringResource @ 435 - XrmPutStringResource @ 436 - XrmPutLineResource @ 437 - XrmGetStringDatabase @ 438 - XrmGetFileDatabase @ 439 - XrmCombineFileDatabase @ 440 - XrmEnumerateDatabase @ 441 - XrmPutFileDatabase @ 442 - XrmQGetSearchList @ 443 - XrmQGetSearchResource @ 444 - XrmQGetResource @ 445 - XrmGetResource @ 446 - XrmLocaleOfDatabase @ 447 - XrmDestroyDatabase @ 448 - XGetGCValues @ 449 - XGetWMSizeHints @ 450 - XGetWMNormalHints @ 451 - XGetRGBColormaps @ 452 - XGetTextProperty @ 453 - XGetWMName @ 454 - XGetWMIconName @ 455 - XGetWMClientMachine @ 456 - XGetWMColormapWindows @ 457 - XGetWMProtocols @ 458 - XIconifyWindow @ 459 - XListPixmapFormats @ 460 - XAllocSizeHints @ 461 - XAllocStandardColormap @ 462 - XAllocWMHints @ 463 - XAllocClassHint @ 464 - XAllocIconSize @ 465 - XReconfigureWMWindow @ 466 - XSetWMSizeHints @ 467 - XSetWMNormalHints @ 468 - XSetRGBColormaps @ 469 - XSetTextProperty @ 470 - XSetWMName @ 471 - XSetWMIconName @ 472 - XSetWMClientMachine @ 473 - XSetWMColormapWindows @ 474 - XSetWMProperties @ 475 - XSetWMProtocols @ 476 - XStringListToTextProperty @ 477 - XTextPropertyToStringList @ 478 - XFreeStringList @ 479 - XWMGeometry @ 480 - XWithdrawWindow @ 481 - XauDisposeAuth @ 482 - XauGetBestAuthByAddr @ 483 - XauFileName @ 484 - XauReadAuth @ 485 - XcmsCIELabToCIEXYZ @ 486 - XcmsCIEXYZToCIELab @ 487 - XcmsCIELabClipab @ 488 - XcmsCIELabClipL @ 489 - XcmsCIELabClipLab @ 490 - XcmsCIELabQueryMinL @ 491 - XcmsCIELabQueryMaxC @ 492 - XcmsCIELabQueryMaxL @ 493 - _XcmsCIELabQueryMaxLCRGB @ 494 - XcmsCIELabQueryMaxLC @ 495 - XcmsCIELabWhiteShiftColors @ 496 - XcmsCIELuvToCIEuvY @ 497 - XcmsCIEuvYToCIELuv @ 498 - XcmsCIELuvClipuv @ 499 - XcmsCIELuvClipL @ 500 - XcmsCIELuvClipLuv @ 501 - XcmsCIELuvQueryMinL @ 502 - XcmsCIELuvQueryMaxC @ 503 - XcmsCIELuvQueryMaxL @ 504 - _XcmsCIELuvQueryMaxLCRGB @ 505 - XcmsCIELuvQueryMaxLC @ 506 - XcmsCIELuvWhiteShiftColors @ 507 - XcmsCIEuvYToCIEXYZ @ 508 - XcmsCIEXYZToCIEuvY @ 509 - XcmsCIExyYToCIEXYZ @ 510 - XcmsCIEXYZToCIExyY @ 511 - XcmsTekHVCToCIEuvY @ 512 - XcmsCIEuvYToTekHVC @ 513 - _XcmsTekHVC_CheckModify @ 514 - XcmsTekHVCClipC @ 515 - XcmsTekHVCClipV @ 516 - XcmsTekHVCClipVC @ 517 - XcmsTekHVCQueryMinV @ 518 - XcmsTekHVCQueryMaxC @ 519 - XcmsTekHVCQueryMaxV @ 520 - _XcmsTekHVCQueryMaxVCRGB @ 521 - XcmsTekHVCQueryMaxVC @ 522 - XcmsTekHVCQueryMaxVSamples @ 523 - XcmsTekHVCWhiteShiftColors @ 524 - XcmsAddColorSpace @ 525 - XcmsAddFunctionSet @ 526 - XcmsAllocNamedColor @ 527 - XcmsAllocColor @ 528 - XcmsCreateCCC @ 529 - XcmsDefaultCCC @ 530 - XcmsFreeCCC @ 531 - _XcmsAddCmapRec @ 532 - _XcmsCopyCmapRecAndFree @ 533 - _XcmsDeleteCmapRec @ 534 - XcmsCCCOfColormap @ 535 - _XcmsCopyISOLatin1Lowered @ 536 - _XcmsResolveColorString @ 537 - _XcmsConvertColorsWithWhitePt @ 538 - _XcmsEqualWhitePts @ 539 - _XcmsDIConvertColors @ 540 - _XcmsDDConvertColors @ 541 - XcmsConvertColors @ 542 - _XcmsRegFormatOfPrefix @ 543 - XcmsFormatOfPrefix @ 544 - _XcmsCopyPointerArray @ 545 - _XcmsFreePointerArray @ 546 - _XcmsPushPointerArray @ 547 - _XcmsInitDefaultCCCs @ 548 - _XcmsInitScrnInfo @ 549 - _XcmsFreeIntensityMaps @ 550 - _XcmsGetIntensityMap @ 551 - _XcmsGetTableType0 @ 552 - _XcmsGetTableType1 @ 553 - _XcmsValueCmp @ 554 - _XcmsIntensityCmp @ 555 - _XcmsValueInterpolation @ 556 - _XcmsIntensityInterpolation @ 557 - _XcmsTableSearch @ 558 - _XcmsMatVec @ 559 - XcmsCIEXYZToRGBi @ 560 - XcmsRGBiToCIEXYZ @ 561 - XcmsRGBiToRGB @ 562 - XcmsRGBToRGBi @ 563 - _XcmsLRGB_InitScrnDefault @ 564 - XcmsLookupColor @ 565 - _XcmsCubeRoot @ 566 - _XcmsSquareRoot @ 567 - XcmsDisplayOfCCC @ 568 - XcmsVisualOfCCC @ 569 - XcmsScreenNumberOfCCC @ 570 - XcmsScreenWhitePointOfCCC @ 571 - XcmsClientWhitePointOfCCC @ 572 - XcmsPrefixOfFormat @ 573 - _XcmsGetElement @ 574 - _XcmsGetProperty @ 575 - XcmsQueryBlack @ 576 - XcmsQueryBlue @ 577 - XcmsQueryGreen @ 578 - XcmsQueryRed @ 579 - XcmsQueryWhite @ 580 - XcmsQueryColor @ 581 - XcmsQueryColors @ 582 - XcmsSetWhitePoint @ 583 - XcmsSetCompressionProc @ 584 - XcmsSetWhiteAdjustProc @ 585 - _XcmsSetGetColors @ 586 - XcmsStoreColor @ 587 - XcmsStoreColors @ 588 - _XcmsCosine @ 589 - _XcmsSine @ 590 - _XcmsArcTangent @ 591 - _XcmsRGB_to_XColor @ 592 - _XColor_to_XcmsRGB @ 593 - _XcmsResolveColor @ 594 - _XcmsUnresolveColor @ 595 - _XUnresolveColor @ 596 - _XParseBaseFontNameList @ 597 - XCreateFontSet @ 598 - XFontsOfFontSet @ 599 - XBaseFontNameListOfFontSet @ 941 - XLocaleOfFontSet @ 600 - XContextDependentDrawing @ 601 - XExtentsOfFontSet @ 602 - XFreeFontSet @ 603 - XVaCreateNestedList @ 604 - XGetIMValues @ 605 - XCreateIC @ 606 - XDestroyIC @ 607 - XGetICValues @ 608 - XSetICValues @ 609 - XSetICFocus @ 610 - XUnsetICFocus @ 611 - XIMOfIC @ 612 - XmbResetIC @ 613 - XwcResetIC @ 614 - XmbLookupString @ 615 - XwcLookupString @ 616 - _XIMCompileResourceList @ 617 - _XCopyToArg @ 618 - XOpenIM @ 619 - XCloseIM @ 620 - XDisplayOfIM @ 621 - XLocaleOfIM @ 622 - XSetLocaleModifiers @ 623 - XSupportsLocale @ 624 - _XlcValidModSyntax @ 625 - _XlcDefaultMapModifiers @ 626 - _XlcAddLoader @ 627 - _XlcCurrentLC @ 628 - XmbSetWMProperties @ 629 - XmbDrawText @ 630 - XmbDrawString @ 631 - XmbDrawImageString @ 632 - XmbTextEscapement @ 633 - XmbTextExtents @ 634 - XmbTextPerCharExtents @ 635 - XwcDrawText @ 636 - XwcDrawString @ 637 - XwcDrawImageString @ 638 - XwcTextEscapement @ 639 - XwcTextExtents @ 640 - XwcTextPerCharExtents @ 641 - XFilterEvent @ 642 - _XRegisterFilterByMask @ 643 - _XRegisterFilterByType @ 644 - _XUnregisterFilter @ 645 - _Xsetlocale @ 646 - XDefaultString @ 647 - _XlcDefaultLoader @ 648 - _XrmInitParseInfo @ 649 - XmbTextPropertyToTextList @ 650 - XmbTextListToTextProperty @ 651 - XwcTextPropertyToTextList @ 652 - XwcFreeStringList @ 653 - XwcTextListToTextProperty @ 654 - _X11TransConnectDisplay @ 655 - XGetAtomNames @ 656 - XInitImage @ 657 - XESetBeforeFlush @ 658 - _XFreeAtomTable @ 659 - _XUpdateAtomCache @ 660 - XInternAtoms @ 661 - _XKeyInitialize @ 662 - XConvertCase @ 663 - _XTranslateKey @ 664 - _XTranslateKeySym @ 665 - _XKeysymToModifiers @ 666 - XExtendedMaxRequestSize @ 667 - XReadBitmapFileData @ 668 - _XAsyncErrorHandler @ 669 - _XDeqAsyncHandler @ 670 - _XGetAsyncReply @ 671 - _XGetAsyncData @ 672 - _XPollfdCacheInit @ 673 - _XPollfdCacheAdd @ 674 - _XPollfdCacheDel @ 675 - _XRegisterInternalConnection @ 676 - _XUnregisterInternalConnection @ 677 - XInternalConnectionNumbers @ 678 - XProcessInternalConnection @ 679 - XAddConnectionWatch @ 680 - XRemoveConnectionWatch @ 681 - _XDeq @ 682 - _XcmsCIEXYZ_ValidSpec @ 683 - _XcmsCIEuvY_ValidSpec @ 684 - XcmsSetCCCOfColormap @ 685 - XDirectionalDependentDrawing @ 686 - XContextualDrawing @ 687 - XSetIMValues @ 688 - XRegisterIMInstantiateCallback @ 689 - XUnregisterIMInstantiateCallback @ 690 - XCreateOC @ 691 - XDestroyOC @ 692 - XOMOfOC @ 693 - XSetOCValues @ 694 - XGetOCValues @ 695 - XOpenOM @ 696 - XCloseOM @ 697 - XSetOMValues @ 698 - XGetOMValues @ 699 - XDisplayOfOM @ 700 - XLocaleOfOM @ 701 - _XlcRemoveLoader @ 702 - _XOpenLC @ 703 - _XCloseLC @ 704 - _XlcCopyFromArg @ 705 - _XlcCopyToArg @ 706 - _XlcCountVaList @ 707 - _XlcVaToArgList @ 708 - _XlcCompileResourceList @ 709 - _XlcGetValues @ 710 - _XlcSetValues @ 711 - XInitThreads @ 712 - XLockDisplay @ 713 - XUnlockDisplay @ 714 - _X11TransFreeConnInfo @ 715 - _X11TransOpenCOTSClient @ 716 - _X11TransOpenCLTSClient @ 717 - _X11TransSetOption @ 718 - _X11TransConnect @ 719 - _X11TransBytesReadable @ 720 - _X11TransRead @ 721 - _X11TransWrite @ 722 - _X11TransReadv @ 723 - _X11TransWritev @ 724 - _X11TransDisconnect @ 725 - _X11TransClose @ 726 - _X11TransCloseForCloning @ 727 - _X11TransIsLocal @ 728 - _X11TransGetMyAddr @ 729 - _X11TransGetPeerAddr @ 730 - _X11TransGetConnectionNumber @ 731 - _X11TransGetHostname @ 732 - _X11TransConvertAddress @ 733 - _XimCbDispatch @ 734 - _XimLookupMBText @ 735 - _XimLookupWCText @ 736 - _XimRegisterFilter @ 737 - _XimUnregisterFilter @ 738 - _XimReregisterFilter @ 739 - _XimRegisterServerFilter @ 740 - _XimUnregisterServerFilter @ 741 - _XimProtoCreateIC @ 742 - _XimCheckDataSize @ 743 - _XimSetHeader @ 744 - _XimProtoIMFree @ 745 - _XimProtoOpenIM @ 746 - _XimICOfXICID @ 747 - _XimSetEventMaskCallback @ 748 - _XimSync @ 749 - _XimProcSyncReply @ 750 - _XimRespSyncReply @ 751 - _XimSyncCallback @ 752 - _XimForwardEvent @ 753 - _XimForwardEventCallback @ 754 - _XimRegisterTriggerKeysCallback @ 755 - _XimGetWindowEventmask @ 756 - _XimTriggerNotify @ 757 - _XimFreeCommitInfo @ 758 - _XimCommitCallback @ 759 - _XimProcError @ 760 - _XimErrorCallback @ 761 - _XimError @ 762 - _Ximctstombs @ 763 - _Ximctstowcs @ 764 - _XimProtoMbLookupString @ 765 - _XimProtoWcLookupString @ 766 - _XimRegProtoIntrCallback @ 767 - _XimFreeProtoIntrCallback @ 768 - _XimDispatchInit @ 769 - _XimProtoEventToWire @ 770 - _XimProtoWireToEvent @ 771 - _XimExtension @ 772 - _XimRegisterIMInstantiateCallback @ 773 - _XimUnRegisterIMInstantiateCallback @ 774 - _XimResetIMInstantiateCallback @ 775 - _XimDestroyIMStructureList @ 776 - _XimServerDestroy @ 777 - _XInitIM @ 779 - _XimLocalFilter @ 780 - _XimLocalGetICValues @ 781 - _XimLocalCreateIC @ 782 - _XimCheckIfLocalProcessing @ 783 - _XimLocalIMFree @ 784 - _XimLocalGetIMValues @ 785 - _XimLocalSetIMValues @ 786 - _XimLocalOpenIM @ 787 - _XimLocalMbLookupString @ 788 - _XimLocalWcLookupString @ 789 - _XimParseStringFile @ 790 - _XimSetICValueData @ 791 - _XimLocalSetICValues @ 792 - _XimSetIMResourceList @ 793 - _XimSetICResourceList @ 794 - _XimSetInnerIMResourceList @ 795 - _XimSetInnerICResourceList @ 796 - _XimCheckCreateICValues @ 797 - _XimGetResourceListRec @ 798 - _XimSetIMMode @ 799 - _XimCheckIMMode @ 800 - _XimSetICMode @ 801 - _XimCheckICMode @ 802 - _XimSetLocalIMDefaults @ 944 - _XimSetICDefaults @ 803 - _XimDecodeLocalIMAttr @ 804 - _XimDecodeLocalICAttr @ 805 - _XimCheckLocalInputStyle @ 806 - _XimEncodeLocalIMAttr @ 807 - _XimEncodeLocalICAttr @ 808 - _XimGetCurrentIMValues @ 809 - _XimSetCurrentIMValues @ 810 - _XimGetCurrentICValues @ 811 - _XimSetCurrentICValues @ 812 - _XimInitialResourceInfo @ 813 - _XimDecodeIMATTRIBUTE @ 814 - _XimDecodeICATTRIBUTE @ 815 - _XimEncodeIMATTRIBUTE @ 816 - _XimEncodeICATTRIBUTE @ 817 - _XimGetAttributeID @ 818 - _XimThaiFilter @ 819 - _XimThaiCreateIC @ 820 - _XimCheckIfThaiProcessing @ 821 - _XimThaiOpenIM @ 822 - _XimThaiIMFree @ 823 - _XimThaiCloseIM @ 824 - _XimXConf @ 825 - _XimConnect @ 826 - _XimShutdown @ 827 - _XimFlush @ 828 - _XimFilterWaitEvent @ 829 - _XimFreeTransIntrCallback @ 830 - _XimTransFilterWaitEvent @ 831 - _XimTransInternalConnection @ 832 - _XimTransFlush @ 833 - _XimTransConf @ 834 - _XlcParseCharSet @ 835 - _XlcInitCTInfo @ 836 - _XlcGetCSValues @ 837 - _XlcGetCharSet @ 838 - _XlcAddCharSet @ 839 - _XlcCreateDefaultCharSet @ 840 - _XlcSetConverter @ 841 - _XlcOpenConverter @ 842 - _XlcCloseConverter @ 843 - _XlcConvert @ 844 - _XlcResetConverter @ 845 - _XlcGetResource @ 846 - _XlcGetLocaleDataBase @ 847 - _XlcDestroyLocaleDataBase @ 848 - _XlcCreateLocaleDataBase @ 849 - _XlcEucLoader @ 850 - _XlcFileName @ 851 - _XlcResolveLocaleName @ 852 -;REMOVED _XlcResolveDBName @ 853 - _XlcResolveI18NPath @ 854 - _XlcGenericLoader @ 855 - _XlcInitLoader @ 856 - _XmbTextPropertyToTextList @ 857 - _XwcTextPropertyToTextList @ 858 - _XwcFreeStringList @ 859 - _XGetLCValues @ 860 - _XlcDestroyLC @ 861 - _XlcCreateLC @ 862 - _XrmDefaultInitParseInfo @ 863 - _XlcSjisLoader @ 864 - _Xlcmbtowc @ 865 - _Xlcwctomb @ 866 - _Xlcmbstowcs @ 867 - _Xlcwcstombs @ 868 - _Xmbtowc @ 869 - _Xwctomb @ 870 - _Xmbstowcs @ 871 - _Xwcstombs @ 872 - _Xwcscpy @ 873 - _Xwcsncpy @ 874 - _Xwcslen @ 875 - _Xwcscmp @ 876 - _Xwcsncmp @ 877 - _XmbTextListToTextProperty @ 878 - _XwcTextListToTextProperty @ 879 - _XlcUtfLoader @ 880 - _XlcCompareISOLatin1 @ 881 - _XlcNCompareISOLatin1 @ 882 - _XmbDefaultTextEscapement @ 883 - _XwcDefaultTextEscapement @ 884 - _XmbDefaultTextExtents @ 885 - _XwcDefaultTextExtents @ 886 - _XmbDefaultTextPerCharExtents @ 887 - _XwcDefaultTextPerCharExtents @ 888 - _XmbDefaultDrawString @ 889 - _XwcDefaultDrawString @ 890 - _XmbDefaultDrawImageString @ 891 - _XwcDefaultDrawImageString @ 892 - _XomGenericOpenOM @ 893 - _XInitOM @ 894 - _XmbGenericDrawImageString @ 895 - _XwcGenericDrawImageString @ 896 - _XomGenericDrawString @ 897 - _XmbGenericDrawString @ 898 - _XwcGenericDrawString @ 899 - _XmbGenericTextEscapement @ 900 - _XwcGenericTextEscapement @ 901 - _XomGenericTextExtents @ 902 - _XmbGenericTextExtents @ 903 - _XwcGenericTextExtents @ 904 - _XmbGenericTextPerCharExtents @ 905 - _XwcGenericTextPerCharExtents @ 906 - _XomConvert @ 907 - _XomInitConverter @ 908 - _Xmblen @ 909 -;;Removed 3.3.2.2 _XimGetResourceName @ 910 - _XimGetResourceListRecByQuark @ 911 - _XimSetIMValueData @ 912 - _XimGetIMValueData @ 913 - _XimGetICValueData @ 914 - _XimMakeIMAttrIDList @ 915 - _XimMakeICAttrIDList @ 916 - _XimWrite @ 917 - _XimRead @ 918 - _XimRegisterDispatcher @ 919 - _XimTransRegisterDispatcher @ 920 - _XimTransCallDispatcher @ 921 - _XimTransWrite @ 922 - _XimTransRead @ 923 - _XimXTransFreeConnInfo @ 924 - _XimXTransOpenCOTSClient @ 925 - _XimXTransOpenCLTSClient @ 926 - _XimXTransSetOption @ 927 - _XimXTransConnect @ 928 - _XimXTransBytesReadable @ 929 - _XimXTransRead @ 930 - _XimXTransWrite @ 931 - _XimXTransReadv @ 932 - _XimXTransWritev @ 933 - _XimXTransDisconnect @ 934 - _XimXTransClose @ 935 - _XimXTransCloseForCloning @ 936 - _XimXTransIsLocal @ 937 - _XimXTransGetMyAddr @ 938 - _XimXTransGetPeerAddr @ 939 - _XimXTransGetConnectionNumber @ 940 - _XimXTransGetHostname @ 945 - _Xdebug @ 946 - __XOS2RedirRoot @ 950 - __XOS2RedirRoot1 @ 951 - XkbIgnoreExtension @ 1000 - XkbOpenDisplay @ 1001 - XkbQueryExtension @ 1002 - XkbUseExtension @ 1003 - XkbLibraryVersion @ 1004 - XkbSetXlibControls @ 1005 - XkbGetXlibControls @ 1006 - XkbSetAtomFuncs @ 1007 - XkbKeycodeToKeysym @ 1008 - XkbKeysymToModifiers @ 1009 - XkbLookupKeySym @ 1010 - XkbLookupKeyBinding @ 1011 - XkbTranslateKeyCode @ 1012 - XkbTranslateKeySym @ 1013 - XkbSetAutoRepeatRate @ 1014 - XkbGetAutoRepeatRate @ 1015 - XkbChangeEnabledControls @ 1016 - XkbDeviceBell @ 1017 - XkbForceDeviceBell @ 1018 - XkbDeviceBellEvent @ 1019 - XkbBell @ 1020 - XkbForceBell @ 1021 - XkbBellEvent @ 1022 - XkbSelectEvents @ 1023 - XkbSelectEventDetails @ 1024 - XkbNoteMapChanges @ 1025 - XkbNoteNameChanges @ 1026 - XkbGetIndicatorState @ 1027 - XkbGetIndicatorMap @ 1029 - XkbSetIndicatorMap @ 1030 - XkbGetNamedIndicator @ 1031 - XkbGetNamedDeviceIndicator @ 1032 - XkbSetNamedIndicator @ 1033 - XkbSetNamedDeviceIndicator @ 1034 - XkbLockModifiers @ 1035 - XkbLatchModifiers @ 1036 - XkbLockGroup @ 1037 - XkbLatchGroup @ 1038 - XkbSetServerInternalMods @ 1039 - XkbSetIgnoreLockMods @ 1040 - XkbVirtualModsToReal @ 1041 - XkbComputeEffectiveMap @ 1042 - XkbInitCanonicalKeyTypes @ 1043 - XkbAllocKeyboard @ 1044 - XkbFreeKeyboard @ 1045 - XkbAllocClientMap @ 1046 - XkbAllocServerMap @ 1047 - XkbFreeClientMap @ 1048 - XkbFreeServerMap @ 1049 - XkbAddKeyType @ 1050 - XkbAllocIndicatorMaps @ 1051 - XkbFreeIndicatorMaps @ 1052 - XkbGetMap @ 1053 - XkbGetUpdatedMap @ 1054 - XkbGetMapChanges @ 1055 - XkbRefreshKeyboardMapping @ 1056 - XkbGetKeyTypes @ 1057 - XkbGetKeySyms @ 1058 - XkbGetKeyActions @ 1059 - XkbGetKeyBehaviors @ 1060 - XkbGetVirtualMods @ 1061 - XkbGetKeyExplicitComponents @ 1062 - XkbGetKeyModifierMap @ 1063 - XkbAllocControls @ 1064 - XkbFreeControls @ 1065 - XkbGetControls @ 1066 - XkbSetControls @ 1067 - XkbAllocCompatMap @ 1069 - XkbFreeCompatMap @ 1070 - XkbGetCompatMap @ 1071 - XkbSetCompatMap @ 1072 - XkbAllocNames @ 1073 - XkbGetNames @ 1074 - XkbSetNames @ 1075 - XkbChangeNames @ 1076 - XkbFreeNames @ 1077 - XkbGetState @ 1078 - XkbSetMap @ 1079 - XkbChangeMap @ 1080 - XkbSetDetectableAutoRepeat @ 1081 - XkbGetDetectableAutoRepeat @ 1082 - XkbSetAutoResetControls @ 1083 - XkbGetAutoResetControls @ 1084 - XkbCopyKeyType @ 1085 - XkbCopyKeyTypes @ 1086 - XkbResizeKeyType @ 1087 - XkbResizeKeySyms @ 1088 - XkbResizeKeyActions @ 1089 - XkbChangeTypesOfKey @ 1090 - XkbListComponents @ 1091 - XkbFreeComponentList @ 1092 - XkbGetKeyboard @ 1093 - XkbGetKeyboardByName @ 1094 - XkbAddDeviceLedInfo @ 1098 - XkbResizeDeviceButtonActions @ 1099 - XkbAllocDeviceInfo @ 1100 - XkbFreeDeviceInfo @ 1101 - XkbNoteDeviceChanges @ 1102 - XkbGetDeviceInfo @ 1103 - XkbGetDeviceInfoChanges @ 1104 - XkbGetDeviceButtonActions @ 1105 - XkbGetDeviceLedInfo @ 1106 - XkbSetDeviceInfo @ 1107 - XkbChangeDeviceInfo @ 1108 - XkbSetDeviceLedInfo @ 1109 - XkbSetDeviceButtonActions @ 1110 - XkbToControl @ 1111 - XkbSetDebuggingFlags @ 1112 - _XkbInternAtomFunc @ 1113 - _XkbGetAtomNameFunc @ 1114 - _XkbReloadDpy @ 1115 - _XKeycodeToKeysym @ 1116 - _XKeysymToKeycode @ 1117 - _XLookupKeysym @ 1118 - _XRefreshKeyboardMapping @ 1119 - _XLookupString @ 1120 - _XkbNoteCoreMapChanges @ 1121 - _XkbInitReadBuffer @ 1122 - _XkbSkipReadBufferData @ 1123 - _XkbCopyFromReadBuffer @ 1124 - _XkbReadCopyKeySyms @ 1125 - _XkbWriteCopyKeySyms @ 1126 - _XkbReadBufferCopyKeySyms @ 1127 - _XkbPeekAtReadBuffer @ 1128 - _XkbGetReadBufferPtr @ 1129 - _XkbFreeReadBuffer @ 1130 - _XkbGetReadBufferCountedString @ 1131 - _XkbGetCharset @ 1132 - _XkbGetConverters @ 1133 - XkbGetGeometry @ 1134 - XkbAddGeomShape @ 1135 - XkbAddGeomOutline @ 1136 - XkbComputeShapeBounds @ 1137 - XkbAddGeomDoodad @ 1138 - XkbAddGeomColor @ 1139 - XkbAddGeomOverlayRow @ 1140 - XkbAddGeomSection @ 1141 - XkbAddGeomRow @ 1142 - XkbAddGeomKey @ 1143 - XkbComputeSectionBounds @ 1144 - XkbAllocGeometry @ 1145 - XkbAddGeomProperty @ 1146 - XkbAddGeomOverlay @ 1147 - XkbComputeShapeTop @ 1148 - XkbFindOverlayForKey @ 1149 - XkbAllocGeomKeyAliases @ 1150 - XkbSetGeometry @ 1151 - XkbXlibControlsImplemented @ 1152 - XkbTranslateKey @ 1153 - XkbAddGeomOverlayKey @ 1154 - XkbNoteControlsChanges @ 1155 - XkbGetKeyVirtualModMap @ 1156 - XkbComputeRowBounds @ 1157 - XkbGetNamedGeometry @ 1158 - XkbKeyTypesForCoreSymbols @ 1159 - XkbApplyCompatMapToKey @ 1160 - XkbUpdateMapFromCore @ 1161 - XkbUpdateActionVirtualMods @ 1162 - XkbUpdateKeyTypeVirtualMods @ 1163 - XkbApplyVirtualModChanges @ 1164 - XkbFreeGeomProperties @ 1165 - XkbFreeGeomKeyAliases @ 1166 - XkbFreeGeomColors @ 1167 - XkbFreeGeomPoints @ 1168 - XkbFreeGeomOutlines @ 1169 - XkbFreeGeomShapes @ 1170 - XkbFreeGeomOverlayKeys @ 1171 - XkbFreeGeomOverlayRows @ 1172 - XkbFreeGeomOverlays @ 1173 - XkbFreeGeomKeys @ 1174 - XkbFreeGeomRows @ 1175 - XkbFreeGeomSections @ 1176 - XkbFreeGeomDoodads @ 1177 - XkbFreeGeometry @ 1178 - XkbAllocGeomProps @ 1179 - XkbAllocGeomColors @ 1180 - XkbAllocGeomShapes @ 1181 - XkbAllocGeomSections @ 1182 - XkbAllocGeomOverlays @ 1183 - XkbAllocGeomOverlayRows @ 1184 - XkbAllocGeomOverlayKeys @ 1185 - XkbAllocGeomDoodads @ 1186 - XkbAllocGeomSectionDoodads @ 1187 - XkbAllocGeomOutlines @ 1188 - XkbAllocGeomRows @ 1189 - XkbAllocGeomPoints @ 1190 - XkbAllocGeomKeys @ 1191 - XkbAddGeomKeyAlias @ 1192 - _XkeyTable @ 1200 - _Xevent_to_mask @ 1201 - _qfree @ 1202 - _XIOErrorFunction @ 1203 - _XErrorFunction @ 1204 - _XHeadOfDisplayList @ 1205 - XcmsCIELabColorSpace @ 1206 - XcmsCIELuvColorSpace @ 1207 - XcmsCIEXYZColorSpace @ 1208 - XcmsCIEuvYColorSpace @ 1209 - XcmsCIExyYColorSpace @ 1210 - XcmsTekHVCColorSpace @ 1211 - XcmsUNDEFINEDColorSpace @ 1212 - _XcmsDIColorSpacesInit @ 1213 - _XcmsDIColorSpaces @ 1214 - _XcmsDDColorSpacesInit @ 1215 - _XcmsDDColorSpaces @ 1216 - _XcmsSCCFuncSetsInit @ 1217 - _XcmsSCCFuncSets @ 1218 - _XcmsCIEXYZ_prefix @ 1219 - _XcmsCIEuvY_prefix @ 1220 - _XcmsCIExyY_prefix @ 1221 - _XcmsCIELab_prefix @ 1222 - _XcmsCIELuv_prefix @ 1223 - _XcmsTekHVC_prefix @ 1224 - _XcmsRGBi_prefix @ 1225 - _XcmsRGB_prefix @ 1226 - _XcmsRegColorSpaces @ 1227 - XcmsRGBiColorSpace @ 1228 - XcmsRGBColorSpace @ 1229 - XcmsLinearRGBFunctionSet @ 1230 - _X11TransSocketINETFuncs @ 1231 - _X11TransSocketTCPFuncs @ 1232 - _XimXTransSocketINETFuncs @ 1233 - _XimXTransSocketTCPFuncs @ 1234 - _XimImSportRec @ 1235 - _XimTransportRec @ 1236 - _XlcGenericMethods @ 1237 - _XlcPublicMethods @ 1238 - Index: xc/lib/X11/X11os2.rsp diff -u xc/lib/X11/X11os2.rsp:3.7 xc/lib/X11/X11os2.rsp:removed --- xc/lib/X11/X11os2.rsp:3.7 Wed Apr 5 14:13:16 2000 +++ xc/lib/X11/X11os2.rsp Thu Feb 27 12:27:00 2003 @@ -1,71 +0,0 @@ -AddDIC.obj AddSF.obj AllCells.obj AllPlanes.obj AllowEv.obj AuDispose.obj+ -AuFileName.obj AuGetBest.obj AuRead.obj AutoRep.obj Backgnd.obj+ -BdrWidth.obj Bell.obj Border.obj CCC.obj ChAccCon.obj ChActPGb.obj+ -ChClMode.obj ChCmap.obj ChGC.obj ChKeyCon.obj ChPntCon.obj ChProp.obj+ -ChSaveSet.obj ChWAttrs.obj ChWindow.obj ChkIfEv.obj ChkMaskEv.obj+ -ChkTypEv.obj ChkTypWEv.obj ChkWinEv.obj CirWin.obj CirWinDn.obj CirWinUp.obj+ -ClDisplay.obj Clear.obj ClearArea.obj ConfWind.obj ConnDis.obj Context.obj+ -ConvSel.obj CopyArea.obj CopyCmap.obj CopyGC.obj CopyPlane.obj CrBFData.obj+ -CrCmap.obj CrCursor.obj CrGC.obj CrGlCur.obj CrPFBData.obj CrPixmap.obj+ -CrWindow.obj Cursor.obj CvColW.obj CvCols.obj DefCursor.obj DelProp.obj+ -Depths.obj DestSubs.obj DestWind.obj DisName.obj DrArc.obj DrArcs.obj+ -DrLine.obj DrLines.obj DrPoint.obj DrPoints.obj DrRect.obj DrRects.obj+ -DrSegs.obj ErrDes.obj ErrHndlr.obj EvToWire.obj FSSaver.obj FSWrap.obj+ -FetchName.obj FillArc.obj FillArcs.obj FillPoly.obj FillRct.obj FillRcts.obj+ -FilterEv.obj Flush.obj Font.obj FontInfo.obj FontNames.obj FreeCmap.obj+ -FreeCols.obj FreeCurs.obj FreeEData.obj FreeGC.obj FreePix.obj GCMisc.obj+ -Geom.obj GetAtomNm.obj GetColor.obj GetDflt.obj GetFPath.obj GetFProp.obj+ -GetGCVals.obj GetGeom.obj GetHColor.obj GetHints.obj GetIFocus.obj+ -GetImage.obj GetKCnt.obj GetMoEv.obj GetNrmHint.obj GetPCnt.obj GetPntMap.obj+ -GetProp.obj GetRGBCMap.obj GetSOwner.obj GetSSaver.obj GetStCmap.obj+ -GetTxtProp.obj GetWAttrs.obj GetWMCMapW.obj GetWMProto.obj GrButton.obj+ -GrKey.obj GrKeybd.obj GrPointer.obj GrServer.obj HVC.obj HVCGcC.obj+ -HVCGcV.obj HVCGcVC.obj HVCMnV.obj HVCMxC.obj HVCMxV.obj HVCMxVC.obj+ -HVCMxVs.obj HVCWpAj.obj Host.obj ICWrap.obj IMWrap.obj Iconify.obj IdOfPr.obj+ -IfEvent.obj ImText.obj ImText16.obj ImUtil.obj InitExt.obj InsCmap.obj+ -IntAtom.obj KeyBind.obj KeysymStr.obj KillCl.obj LRGB.obj Lab.obj LabGcC.obj+ -LabGcL.obj LabGcLC.obj LabMnL.obj LabMxC.obj LabMxL.obj LabMxLC.obj+ -LabWpAj.obj LiHosts.obj LiICmaps.obj LiProps.obj ListExt.obj LoadFont.obj+ -LockDis.obj LookupCol.obj LowerWin.obj Luv.obj LuvGcC.obj LuvGcL.obj+ -LuvGcLC.obj LuvMnL.obj LuvMxC.obj LuvMxL.obj LuvMxLC.obj LuvWpAj.obj+ -Macros.obj MapRaised.obj MapSubs.obj MapWindow.obj MaskEvent.obj Misc.obj+ -ModMap.obj MoveWin.obj NextEvent.obj OCWrap.obj OMWrap.obj OfCCC.obj+ -OpenDis.obj ParseCmd.obj ParseCol.obj ParseGeom.obj PeekEvent.obj PeekIfEv.obj+ -Pending.obj PixFormats.obj PmapBgnd.obj PmapBord.obj PolyReg.obj PolyTxt.obj+ -PolyTxt16.obj PrOfId.obj PropAlloc.obj PutBEvent.obj PutImage.obj QBlack.obj+ -QBlue.obj QGreen.obj QRed.obj QWhite.obj QuBest.obj QuCol.obj QuColor.obj+ -QuColors.obj QuCols.obj QuCurShp.obj QuExt.obj QuKeybd.obj QuPntr.obj+ -QuStipShp.obj QuTextE16.obj QuTextExt.obj QuTileShp.obj QuTree.obj Quarks.obj+ -RaiseWin.obj RdBitF.obj RecolorC.obj ReconfWM.obj ReconfWin.obj Region.obj+ -RegstFlt.obj RepWindow.obj RestackWs.obj RotProp.obj ScrResStr.obj+ -SelInput.obj SendEvent.obj SetBack.obj SetCCC.obj SetCRects.obj SetClMask.obj+ -SetClOrig.obj SetDashes.obj SetFPath.obj SetFont.obj SetFore.obj SetFunc.obj+ -SetGetCols.obj SetHints.obj SetIFocus.obj SetLStyle.obj SetLocale.obj+ -SetNrmHint.obj SetPMask.obj SetPntMap.obj SetRGBCMap.obj SetSOwner.obj+ -SetSSaver.obj SetStCmap.obj SetState.obj SetStip.obj SetTSOrig.obj SetTile.obj+ -SetTxtProp.obj SetWMCMapW.obj SetWMProto.obj StBytes.obj StCol.obj StColor.obj+ -StColors.obj StCols.obj StNColor.obj StName.obj StrKeysym.obj StrToText.obj+ -Sync.obj Synchro.obj Text.obj Text16.obj TextExt.obj TextExt16.obj+ -TextToStr.obj TrCoords.obj UNDEFINED.obj UndefCurs.obj UngrabBut.obj+ -UngrabKbd.obj UngrabKey.obj UngrabPtr.obj UngrabSvr.obj UninsCmap.obj+ -UnldFont.obj UnmapSubs.obj UnmapWin.obj VisUtil.obj WMGeom.obj WMProps.obj+ -WarpPtr.obj WinEvent.obj Window.obj Withdraw.obj WrBitF.obj XRGB.obj XYZ.obj+ -XlibAsync.obj XlibInt.obj Xrm.obj cmsAllCol.obj cmsAllNCol.obj cmsCmap.obj+ -cmsColNm.obj cmsGlobls.obj cmsInt.obj cmsLkCol.obj cmsMath.obj cmsProp.obj+ -cmsTrig.obj evtomask.obj globals.obj imCallbk.obj imConv.obj imDefFlt.obj+ -imDefIc.obj imDefIm.obj imDefLkup.obj imDispch.obj imEvToWire.obj imExten.obj+ -imImSw.obj imInsClbk.obj imInt.obj imLcFlt.obj imLcGIc.obj imLcIc.obj+ -imLcIm.obj imLcLkup.obj imLcPrs.obj imLcSIc.obj imRm.obj imRmAttr.obj+ -imThaiFlt.obj imThaiIc.obj imThaiIm.obj imTrX.obj imTrans.obj imTransR.obj+ -lcCT.obj lcCharSet.obj lcConv.obj lcDB.obj lcDefConv.obj lcEuc.obj lcFile.obj+ -lcGenConv.obj lcGeneric.obj lcInit.obj lcJis.obj lcPrTxt.obj lcPubWrap.obj lcPublic.obj+ -lcRM.obj lcSjis.obj lcStd.obj lcTxtPr.obj lcUTF.obj lcUTF8.obj lcUtil.obj lcWrap.obj+ -locking.obj mbWMProps.obj mbWrap.obj omDefault.obj omGeneric.obj omImText.obj+ -omText.obj omTextEsc.obj omTextExt.obj omTextPer.obj omXChar.obj uvY.obj+ -XKB.obj XKBAlloc.obj XKBBell.obj XKBBind.obj XKBCompat.obj XKBCtrls.obj+ -XKBCvt.obj XKBExtDev.obj XKBGAlloc.obj XKBGeom.obj XKBGetByName.obj+ -XKBGetMap.obj XKBleds.obj XKBList.obj XKBMAlloc.obj XKBNames.obj+ -XKBRdBuf.obj XKBSetMap.obj XKBUse.obj XKBMisc.obj XKBSetGeom.obj+ -wcWrap.obj x11trans.obj ximtrans.obj xyY.obj os2Stubs.obj /NOI /NOL /NOD /BAT -X11.dll -X11.map Index: xc/lib/X11/XDefaultOMIF.c diff -u xc/lib/X11/XDefaultOMIF.c:1.2 xc/lib/X11/XDefaultOMIF.c:1.3 --- xc/lib/X11/XDefaultOMIF.c:1.2 Mon Nov 19 10:33:38 2001 +++ xc/lib/X11/XDefaultOMIF.c Wed Sep 18 13:11:42 2002 @@ -41,7 +41,7 @@ Sun Microsystems, Inc. or its licensors is granted. */ -/* $XFree86: xc/lib/X11/XDefaultOMIF.c,v 1.2 2001/11/19 15:33:38 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XDefaultOMIF.c,v 1.3 2002/09/18 17:11:42 tsi Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -689,7 +689,7 @@ wcs_to_mbs(oc, to, from, length) XOC oc; char *to; - wchar_t *from; + _Xconst wchar_t *from; int length; { XlcConv conv = XOC_GENERIC(oc)->wcs_to_cs; Index: xc/lib/X11/XErrorDB diff -u xc/lib/X11/XErrorDB:3.36 xc/lib/X11/XErrorDB:3.41 --- xc/lib/X11/XErrorDB:3.36 Fri Dec 14 14:54:08 2001 +++ xc/lib/X11/XErrorDB Sat Dec 21 19:46:50 2002 @@ -23,7 +23,7 @@ ! other dealings in this Software without prior written authorization ! from The Open Group. ! -! $XFree86: xc/lib/X11/XErrorDB,v 3.36 2001/12/14 19:54:08 dawes Exp $ +! $XFree86: xc/lib/X11/XErrorDB,v 3.41 2002/12/22 00:46:50 dawes Exp $ ! ! these are used in XGetErrorMessage. XlibMessage.XError: X Error of failed request @@ -588,12 +588,13 @@ XRequest.XFree86-VidModeExtension.17: XF86VidModeGetGammaRamp XRequest.XFree86-VidModeExtension.18: XF86VidModeSetGammaRamp XRequest.XFree86-VidModeExtension.19: XF86VidModeGetGammaRampSize +XRequest.XFree86-VidModeExtension.20: XF86VidModeGetPermissions XProtoError.XFree86-VidModeExtension.0: XF86VidModeBadClock XProtoError.XFree86-VidModeExtension.1: XF86VidModeBadHTimings XProtoError.XFree86-VidModeExtension.2: XF86VidModeBadVTimings XProtoError.XFree86-VidModeExtension.3: XF86VidModeModeUnsuitable -XProtoError.XFree86-VidModeExtension.4: XF86VidModeClientNotLocal -XProtoError.XFree86-VidModeExtension.5: XF86VidModeExtensionDisabled +XProtoError.XFree86-VidModeExtension.4: XF86VidModeExtensionDisabled +XProtoError.XFree86-VidModeExtension.5: XF86VidModeClientNotLocal XProtoError.XFree86-VidModeExtension.6: XF86VidModeZoomLocked ! XFree86-Misc -- not an X Consortium standard XRequest.XFree86-Misc.0: XF86MiscQueryVersion @@ -603,6 +604,9 @@ XRequest.XFree86-Misc.4: XF86MiscGetKbdSettings XRequest.XFree86-Misc.5: XF86MiscSetMouseSettings XRequest.XFree86-Misc.6: XF86MiscSetKbdSettings +XRequest.XFree86-Misc.7: XF86MiscSetGrabKeysState +XRequest.XFree86-Misc.8: XF86MiscSetClientVersion +XRequest.XFree86-Misc.9: XF86MiscGetFilePaths XProtoError.XFree86-Misc.0: XF86MiscBadMouseProtocol XProtoError.XFree86-Misc.1: XF86MiscBadMouseBaudRate XProtoError.XFree86-Misc.2: XF86MiscBadMouseFlags @@ -830,4 +834,52 @@ XlibMessage.Adobe-DPS-Extension.1: Space id in failed request: 0x%lx XProtoError.Adobe-DPS-Extension.2: PSErrorAbort (interpreter aborted) XlibMessage.Adobe-DPS-Extension.2: Value in failed request: 0x%lx - +! RANDR +XRequest.RANDR.0: RRQueryVersion +XRequest.RANDR.1: RROldGetScreenInfo +XRequest.RANDR.2: RRSetScreenConfig +XRequest.RANDR.3: RROldScreenChangeSelectInput +XRequest.RANDR.4: RRSelectInput +XRequest.RANDR.5: RRGetScreenInfo +! RENDER +XRequest.RENDER.0: RenderQueryVersion +XRequest.RENDER.1: RenderQueryPictFormats +XRequest.RENDER.2: RenderQueryPictIndexValues +XRequest.RENDER.3: RenderQueryDithers +XRequest.RENDER.4: RenderCreatePicture +XRequest.RENDER.5: RenderChangePicture +XRequest.RENDER.6: RenderSetPictureClipRectangles +XRequest.RENDER.7: RenderFreePicture +XRequest.RENDER.8: RenderComposite +XRequest.RENDER.9: RenderScale +XRequest.RENDER.10: RenderTrapezoids +XRequest.RENDER.11: RenderTriangles +XRequest.RENDER.12: RenderTriStrip +XRequest.RENDER.13: RenderTriFan +XRequest.RENDER.14: RenderColorTrapezoids +XRequest.RENDER.15: RenderColorTriangles +XRequest.RENDER.16: RenderTransform +XRequest.RENDER.17: RenderCreateGlyphSet +XRequest.RENDER.18: RenderReferenceGlyphSet +XRequest.RENDER.19: RenderFreeGlyphSet +XRequest.RENDER.20: RenderAddGlyphs +XRequest.RENDER.21: RenderAddGlyphsFromPicture +XRequest.RENDER.22: RenderFreeGlyphs +XRequest.RENDER.23: RenderCompositeGlyphs8 +XRequest.RENDER.24: RenderCompositeGlyphs16 +XRequest.RENDER.25: RenderCompositeGlyphs32 +XRequest.RENDER.26: RenderFillRectangles +XRequest.RENDER.27: RenderCreateCursor +XRequest.RENDER.28: RenderSetPictureTransform +XRequest.RENDER.29: RenderQueryFilters +XRequest.RENDER.30: RenderSetPictureFilter +XProtoError.RENDER.0: RenderBadFormat (invalid PictFormat parameter) +XlibMessage.RENDER.0: PictFormat id in failed request: 0x%lx +XProtoError.RENDER.1: RenderBadPicture (invalid Picture parameter) +XlibMessage.RENDER.1: Picture id in failed request: 0x%lx +XProtoError.RENDER.2: RenderBadPictOp (invalid PictOp parameter) +XlibMessage.RENDER.2: PictOp in failed request: 0x%lx +XProtoError.RENDER.3: RenderBadGlyphSet (invalid GlyphSet parameter) +XlibMessage.RENDER.3: GlyphSet id in failed request: 0x%lx +XProtoError.RENDER.4: RenderBadGlyph (invalid Glyph parameter) +XlibMessage.RENDER.4: Glyph in failed request: 0x%lx Index: xc/lib/X11/XKB.c diff -u xc/lib/X11/XKB.c:1.6 xc/lib/X11/XKB.c:1.7 --- xc/lib/X11/XKB.c:1.6 Sat Oct 27 23:32:33 2001 +++ xc/lib/X11/XKB.c Mon Dec 9 23:30:39 2002 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKB.c,v 1.6 2001/10/28 03:32:33 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XKB.c,v 1.7 2002/12/10 04:30:39 dawes Exp $ */ #include #define NEED_REPLIES @@ -417,9 +417,10 @@ unsigned values; #endif { - if ((dpy->flags & XlibDisplayNoXkb) || - (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) - return False; + if (!dpy->xkb_info) + XkbUseExtension(dpy,NULL,NULL); + if (!dpy->xkb_info) + return 0; affect&= XkbLC_AllControls; dpy->xkb_info->xlib_ctrls&= ~affect; dpy->xkb_info->xlib_ctrls|= (affect&values); @@ -434,8 +435,9 @@ Display * dpy; #endif { - if ((dpy->flags & XlibDisplayNoXkb) || - (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) + if (!dpy->xkb_info) + XkbUseExtension(dpy,NULL,NULL); + if (!dpy->xkb_info) return 0; return dpy->xkb_info->xlib_ctrls; } Index: xc/lib/X11/XKBBind.c diff -u xc/lib/X11/XKBBind.c:3.14 xc/lib/X11/XKBBind.c:3.15 --- xc/lib/X11/XKBBind.c:3.14 Fri Dec 14 14:54:08 2001 +++ xc/lib/X11/XKBBind.c Sat Feb 15 12:49:01 2003 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/XKBBind.c,v 3.14 2001/12/14 19:54:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBBind.c,v 3.15 2003/02/15 17:49:01 dawes Exp $ */ /* the new monsters ate the old ones */ @@ -865,7 +865,8 @@ /* We *should* use the new_mods (which does not contain any modifiers */ /* that were used to compute the symbol here, but pre-XKB XLookupString */ /* did not and we have to remain compatible. Sigh. */ - if ((dpy->xkb_info->xlib_ctrls&XkbLC_ConsumeLookupMods)==0) + if (_XkbUnavailable(dpy) || + (dpy->xkb_info->xlib_ctrls&XkbLC_ConsumeLookupMods)==0) new_mods= event->state; rtrnLen= XkbLookupKeyBinding(dpy,*keysym,new_mods,buffer,nbytes,NULL); Index: xc/lib/X11/XKBCtrls.c diff -u xc/lib/X11/XKBCtrls.c:1.3 xc/lib/X11/XKBCtrls.c:1.4 --- xc/lib/X11/XKBCtrls.c:1.3 Wed Jan 17 14:41:48 2001 +++ xc/lib/X11/XKBCtrls.c Mon Dec 9 23:33:48 2002 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBCtrls.c,v 1.3 2001/01/17 19:41:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBCtrls.c,v 1.4 2002/12/10 04:33:48 dawes Exp $ */ #include #define NEED_REPLIES @@ -402,7 +402,7 @@ } UnlockDisplay(dpy); SyncHandle(); - return False; + return True; } /***====================================================================***/ Index: xc/lib/X11/XKBCvt.c diff -u xc/lib/X11/XKBCvt.c:3.32 xc/lib/X11/XKBCvt.c:3.34 --- xc/lib/X11/XKBCvt.c:3.32 Fri Dec 14 14:54:08 2001 +++ xc/lib/X11/XKBCvt.c Tue Oct 8 19:31:35 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.32 2001/12/14 19:54:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.34 2002/10/08 23:31:35 dawes Exp $ */ #include #include @@ -255,7 +255,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.TIS620=tis620: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.iso8859-11=iso8859-11:th_TH.TIS620=tis620:hy=armscii-8:vi=tcvn-5712:ka=georgian-academy:be,bg=microsoft-cp1251"; char * _XkbGetCharset() @@ -307,7 +307,7 @@ } else { struct stat sbuf; FILE *file; -#ifndef __EMX__ +#ifndef __UNIXOS2__ char *cf = CHARSET_FILE; #else char *cf = __XOS2RedirRoot(CHARSET_FILE); Index: xc/lib/X11/XKBGetMap.c diff -u xc/lib/X11/XKBGetMap.c:1.6 xc/lib/X11/XKBGetMap.c:1.7 --- xc/lib/X11/XKBGetMap.c:1.6 Wed Jan 17 14:41:48 2001 +++ xc/lib/X11/XKBGetMap.c Mon Feb 3 22:49:33 2003 @@ -25,7 +25,7 @@ ********************************************************/ -/* $XFree86: xc/lib/X11/XKBGetMap.c,v 1.6 2001/01/17 19:41:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBGetMap.c,v 1.7 2003/02/04 03:49:33 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -974,6 +974,7 @@ UnlockDisplay(dpy); return status; } + UnlockDisplay(dpy); return Success; } Index: xc/lib/X11/XKeysymDB diff -u xc/lib/X11/XKeysymDB:3.12 xc/lib/X11/XKeysymDB:3.17 --- xc/lib/X11/XKeysymDB:3.12 Wed Dec 26 17:28:25 2001 +++ xc/lib/X11/XKeysymDB Fri Feb 14 17:02:26 2003 @@ -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.12 2001/12/26 22:28:25 dawes Exp $ +! $XFree86: xc/lib/X11/XKeysymDB,v 3.17 2003/02/14 22:02:26 dawes Exp $ hpmute_acute :100000A8 hpmute_grave :100000A9 @@ -245,8 +245,8 @@ XF86BrightnessAdjust :1008FF3B XF86Finance :1008FF3C XF86Community :1008FF3D -! Allocate 1008FF3E-F next - +XF86AudioRewind :1008FF3E +XF86BackForward :1008FF3F XF86Launch0 :1008FF40 XF86Launch1 :1008FF41 XF86Launch2 :1008FF42 @@ -263,7 +263,87 @@ XF86LaunchD :1008FF4D XF86LaunchE :1008FF4E XF86LaunchF :1008FF4F - +XF86ApplicationLeft :1008FF50 +XF86ApplicationRight :1008FF51 +XF86Book :1008FF52 +XF86CD :1008FF53 +XF86Calculater :1008FF54 +XF86Clear :1008FF55 +XF86Close :1008FF56 +XF86Copy :1008FF57 +XF86Cut :1008FF58 +XF86Display :1008FF59 +XF86DOS :1008FF5A +XF86Documents :1008FF5B +XF86Excel :1008FF5C +XF86Explorer :1008FF5D +XF86Game :1008FF5E +XF86Go :1008FF5F +XF86iTouch :1008FF60 +XF86LogOff :1008FF61 +XF86Market :1008FF62 +XF86Meeting :1008FF63 +XF86MenuKB :1008FF65 +XF86MenuPB :1008FF66 +XF86MySites :1008FF67 +XF86New :1008FF68 +XF86News :1008FF69 +XF86OfficeHome :1008FF6A +XF86Open :1008FF6B +XF86Option :1008FF6C +XF86Paste :1008FF6D +XF86Phone :1008FF6E +XF86Q :1008FF70 +XF86Reply :1008FF72 +XF86Reload :1008FF73 +XF86RotateWindows :1008FF74 +XF86RotationPB :1008FF75 +XF86RotationKB :1008FF76 +XF86Save :1008FF77 +XF86ScrollUp :1008FF78 +XF86ScrollDown :1008FF79 +XF86ScrollClick :1008FF7A +XF86Send :1008FF7B +XF86Spell :1008FF7C +XF86SplitScreen :1008FF7D +XF86Support :1008FF7E +XF86TaskPane :1008FF7F +XF86Terminal :1008FF80 +XF86Tools :1008FF81 +XF86Travel :1008FF82 +XF86UserPB :1008FF84 +XF86User1KB :1008FF85 +XF86User2KB :1008FF86 +XF86Video :1008FF87 +XF86WheelButton :1008FF88 +XF86Word :1008FF89 +XF86Xfer :1008FF8A +XF86ZoomIn :1008FF8B +XF86ZoomOut :1008FF8C +XF86Away :1008FF8D +XF86Messenger :1008FF8E +XF86WebCam :1008FF8F +XF86MailForward :1008FF90 +XF86Pictures :1008FF91 +XF86Music :1008FF92 + +! XFree86 special action keys +XF86_Switch_VT_1 :1008FE01 +XF86_Switch_VT_2 :1008FE02 +XF86_Switch_VT_3 :1008FE03 +XF86_Switch_VT_4 :1008FE04 +XF86_Switch_VT_5 :1008FE05 +XF86_Switch_VT_6 :1008FE06 +XF86_Switch_VT_7 :1008FE07 +XF86_Switch_VT_8 :1008FE08 +XF86_Switch_VT_9 :1008FE09 +XF86_Switch_VT_10 :1008FE0A +XF86_Switch_VT_11 :1008FE0B +XF86_Switch_VT_12 :1008FE0C +XF86_Ungrab :1008FE20 +XF86_ClearGrab :1008FE21 +XF86_Next_VMode :1008FE22 +XF86_Prev_VMode :1008FE23 usldead_acute :100000A8 usldead_grave :100000A9 Index: xc/lib/X11/Xcms.txt diff -u xc/lib/X11/Xcms.txt:3.0 xc/lib/X11/Xcms.txt:3.2 --- xc/lib/X11/Xcms.txt:3.0 Mon May 13 03:23:39 1996 +++ xc/lib/X11/Xcms.txt Wed Feb 12 22:40:54 2003 @@ -25,6 +25,7 @@ * DESCRIPTION * Sample Color Name Database * + * $XFree86: xc/lib/X11/Xcms.txt,v 3.2 2003/02/13 03:40:54 dawes Exp $ */ @@ -38,24 +39,7 @@ delimited from the color specification by one or more tabs. XCMS_COLORDB_START 0.1 -red CIEXYZ:0.3811/0.2073/0.0213 -green CIEXYZ:0.3203/0.6805/0.1430 -blue CIEXYZ:0.2483/0.1122/1.2417 -aquamarine CIEXYZ:0.5512/0.7909/0.9759 -cadet blue CIEXYZ:0.2218/0.2815/0.4708 -cornflower blue CIEXYZ:0.3400/0.3109/1.1067 -navy blue CIEXYZ:0.0478/0.0216/0.2392 -navy CIEXYZ:0.0478/0.0216/0.2392 -brown CIEXYZ:0.1333/0.0772/0.0217 -gray0 TekHVC:0.0/0.0/0.0 -gray10 TekHVC:0.0/10.0/0.0 -gray20 TekHVC:0.0/20.0/0.0 -gray30 TekHVC:0.0/30.0/0.0 -gray40 TekHVC:0.0/40.0/0.0 -gray50 TekHVC:0.0/50.0/0.0 -gray60 TekHVC:0.0/60.0/0.0 -gray70 TekHVC:0.0/70.0/0.0 -gray80 TekHVC:0.0/80.0/0.0 -gray90 TekHVC:0.0/90.0/0.0 -gray100 TekHVC:0.0/100.0/0.0 +cms red CIEXYZ:0.3811/0.2073/0.0213 +cms green CIEXYZ:0.3203/0.6805/0.1430 +cms blue CIEXYZ:0.2483/0.1122/1.2417 XCMS_COLORDB_END Index: xc/lib/X11/XlcDL.c diff -u xc/lib/X11/XlcDL.c:1.3 xc/lib/X11/XlcDL.c:1.9 --- xc/lib/X11/XlcDL.c:1.3 Mon Nov 19 10:33:38 2001 +++ xc/lib/X11/XlcDL.c Mon Nov 25 09:04:53 2002 @@ -41,7 +41,7 @@ Sun Microsystems, Inc. or its licensors is granted. */ -/* $XFree86: xc/lib/X11/XlcDL.c,v 1.3 2001/11/19 15:33:38 tsi Exp $ */ +/* $XFree86: xc/lib/X11/XlcDL.c,v 1.9 2002/11/25 14:04:53 eich Exp $ */ #include #if defined(hpux) @@ -56,12 +56,16 @@ #include "XlcPubI.h" #ifdef _LP64 -#if defined(__sparcv9) -#define _MACH64_NAME "sparcv9" -#define _MACH64_NAME_LEN (sizeof (_MACH64_NAME) - 1) -#else /* !defined(__sparcv9) */ -#error "Unknown architecture" -#endif /* defined(__sparcv9) */ +# if defined(__sparcv9) +# define _MACH64_NAME "sparcv9" +# elif defined(__ia64__) +# undef MACH64_NAME +# else +# error "Unknown architecture" +# endif /* defined(__sparcv9) */ +# ifdef _MACH64_NAME +# define _MACH64_NAME_LEN (sizeof (_MACH64_NAME) - 1) +# endif #endif /* _LP64 */ #define XI18N_DLREL 2 @@ -83,6 +87,7 @@ char *im_register; char *im_unregister; int dl_release; + unsigned int refcount; #if defined(hpux) shl_t dl_module; #else @@ -125,28 +130,37 @@ } static char * -strdup_and_prefix(char *symbol) +strdup_with_underscore(const char *symbol) { - size_t n; char *result; - n = strlen(symbol) + 1; -#ifndef __ELF__ - n++; /* add space for _ */ -#endif - if ((result = malloc(n)) == NULL) + if ((result = malloc(strlen(symbol) + 2)) == NULL) return NULL; -#ifndef __ELF__ result[0] = '_'; -#endif - memcpy(result -#ifndef __ELF__ - +1 -#endif - , symbol, n); + strcpy(result + 1, symbol); return result; } +#ifndef hpux +static void * +try_both_dlsym (void *handle, char *name) +{ + void *ret; + + ret = dlsym (handle, name); + if (!ret) + { + name = strdup_with_underscore (name); + if (name) + { + ret = dlsym (handle, name); + free (name); + } + } + return ret; +} +#endif + static void resolve_object(path, lc_name) char *path; @@ -202,13 +216,14 @@ xi18n_objects_list[lc_count].type = XIM_OBJECT; } xi18n_objects_list[lc_count].dl_name = strdup(args[1]); - xi18n_objects_list[lc_count].open = strdup_and_prefix(args[2]); + xi18n_objects_list[lc_count].open = strdup(args[2]); xi18n_objects_list[lc_count].dl_release = XI18N_DLREL; xi18n_objects_list[lc_count].locale_name = strdup(lc_name); + xi18n_objects_list[lc_count].refcount = 0; xi18n_objects_list[lc_count].dl_module = (void*)NULL; if (n == 5) { - xi18n_objects_list[lc_count].im_register = strdup_and_prefix(args[3]); - xi18n_objects_list[lc_count].im_unregister = strdup_and_prefix(args[4]); + xi18n_objects_list[lc_count].im_register = strdup(args[3]); + xi18n_objects_list[lc_count].im_unregister = strdup(args[4]); } else { xi18n_objects_list[lc_count].im_register = NULL; xi18n_objects_list[lc_count].im_unregister = NULL; @@ -227,7 +242,13 @@ char *path; size_t len; -#ifdef _LP64 + /* + * reject this for possible security issue + */ + if (strstr (dl_name, "../")) + return NULL; + +#if defined (_LP64) && defined (_MACH64_NAME) len = (lc_dir ? strlen(lc_dir) : 0 ) + (dl_name ? strlen(dl_name) : 0) + _MACH64_NAME_LEN + 10; path = Xmalloc(len + 1); @@ -258,6 +279,9 @@ #else len = (lc_dir ? strlen(lc_dir) : 0 ) + (dl_name ? strlen(dl_name) : 0) + 10; +#if defined POSTLOCALELIBDIR + len += (strlen(POSTLOCALELIBDIR) + 1); +#endif path = Xmalloc(len + 1); if (strchr(dl_name, '/') != NULL) { @@ -265,16 +289,107 @@ slash_p = strrchr(lc_dir, '/'); *slash_p = '\0'; strcpy(path, lc_dir); strcat(path, "/"); +#if defined POSTLOCALELIBDIR + strcat(path, POSTLOCALELIBDIR); strcat(path, "/"); +#endif strcat(path, dl_name); strcat(path, ".so.2"); *slash_p = '/'; } else { strcpy(path, lc_dir); strcat(path, "/"); +#if defined POSTLOCALELIBDIR + strcat(path, POSTLOCALELIBDIR); strcat(path, "/"); +#endif strcat(path, dl_name); strcat(path, ".so.2"); } #endif return path; } +/* We reference count dlopen() and dlclose() of modules; unfortunately, + * since XCloseIM, XCloseOM, XlcClose aren't wrapped, but directly + * call the close method of the object, we leak a reference count every + * time we open then close a module. Fixing this would require + * either creating proxy objects or hooks for close_im/close_om + * in XLCd + */ +static Bool +open_object (object, lc_dir) + XI18NObjectsList object; + char *lc_dir; +{ + char *path; + + if (object->refcount == 0) { + path = __lc_path(object->dl_name, lc_dir); + if (!path) + return False; +#if defined(hpux) + object->dl_module = shl_load(path, BIND_DEFERRED, 0L); +#else + object->dl_module = dlopen(path, RTLD_LAZY); +#endif + Xfree(path); + + if (!object->dl_module) + return False; + } + + object->refcount++; + return True; +} + +static void * +fetch_symbol (object, symbol) + XI18NObjectsList object; + char *symbol; +{ + void *result = NULL; +#if defined(hpux) + int getsyms_cnt, i; + struct shl_symbol *symbols; +#endif + + if (symbol == NULL) + return NULL; + +#if defined(hpux) + getsyms_cnt = shl_getsymbols(object->dl_module, TYPE_PROCEDURE, + EXPORT_SYMBOLS, malloc, &symbols); + + for(i=0; i 0) { + free(symbols); + } +#else + result = try_both_dlsym(object->dl_module, symbol); +#endif + + return result; +} + +static void +close_object (object) + XI18NObjectsList object; +{ + object->refcount--; + if (object->refcount == 0) + { +#if defined(hpux) + shl_unload(object->dl_module); +#else + dlclose(object->dl_module); +#endif + object->dl_module = NULL; + } +} + + XLCd #if NeedFunctionPrototypes _XlcDynamicLoad(const char *lc_name) @@ -285,14 +400,9 @@ { XLCd lcd = (XLCd)NULL; XLCd (*lc_loader)() = (XLCd(*)())NULL; - char *path; int count; XI18NObjectsList objects_list; char lc_dir[BUFSIZE]; -#if defined(hpux) - int getsyms_cnt, i; - struct shl_symbol *symbols; -#endif if (lc_name == NULL) return (XLCd)NULL; @@ -306,45 +416,17 @@ for (; count-- > 0; objects_list++) { if (objects_list->type != XLC_OBJECT || strcmp(objects_list->locale_name, lc_name)) continue; - if (!objects_list->dl_module) { - path = __lc_path(objects_list->dl_name, lc_dir); -#if defined(hpux) - objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); -#else - objects_list->dl_module = dlopen(path, RTLD_LAZY); -#endif - Xfree(path); - if (!objects_list->dl_module) continue; - } -#if defined(hpux) - getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, - EXPORT_SYMBOLS, malloc, &symbols); - - for(i=0; iopen)) { - lc_loader = symbols[i].value; - break; - } - } + if (!open_object (objects_list, lc_dir)) + continue; - if(getsyms_cnt > 0) { - free(symbols); - } -#else - lc_loader = (XLCd(*)())dlsym(objects_list->dl_module, - objects_list->open); -#endif + lc_loader = (XLCd(*)())fetch_symbol (objects_list, objects_list->open); if (!lc_loader) continue; lcd = (*lc_loader)(lc_name); if (lcd != (XLCd)NULL) { break; } -#if defined(hpux) - shl_unload(objects_list->dl_module); -#else - dlclose(objects_list->dl_module); -#endif - objects_list->dl_module = NULL; + + close_object (objects_list); } return (XLCd)lcd; } @@ -362,16 +444,11 @@ #endif { XIM im = (XIM)NULL; - char *path; char lc_dir[BUFSIZE]; char *lc_name; XIM (*im_openIM)() = (XIM(*)())NULL; int count; XI18NObjectsList objects_list = xi18n_objects_list; -#if defined(hpux) - int getsyms_cnt, i; - struct shl_symbol *symbols; -#endif lc_name = lcd->core->name; @@ -381,46 +458,18 @@ for (; count-- > 0; objects_list++) { if (objects_list->type != XIM_OBJECT || strcmp(objects_list->locale_name, lc_name)) continue; - if (!objects_list->dl_module) { - path = __lc_path(objects_list->dl_name, lc_dir); -#if defined(hpux) - objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); -#else - objects_list->dl_module = dlopen(path, RTLD_LAZY); -#endif - Xfree(path); - if (!objects_list->dl_module) continue; - } -#if defined(hpux) - getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, - EXPORT_SYMBOLS, malloc, &symbols); - for(i=0; iopen)) { - im_openIM = symbols[i].value; - break; - } - } + if (!open_object (objects_list, lc_dir)) + continue; - if(getsyms_cnt > 0) { - free(symbols); - } -#else - im_openIM = (XIM(*)())dlsym(objects_list->dl_module, - objects_list->open); + im_openIM = (XIM(*)())fetch_symbol(objects_list, objects_list->open); if (!im_openIM) continue; -#endif im = (*im_openIM)(lcd, display, rdb, res_name, res_class); if (im != (XIM)NULL) { - break; + break; } - im_openIM = 0; -#if defined(hpux) - shl_unload(objects_list->dl_module); -#else - dlclose(objects_list->dl_module); -#endif - objects_list->dl_module = NULL; + + close_object (objects_list); } return (XIM)im; } @@ -436,7 +485,6 @@ XIMProc callback; XPointer *client_data; { - char *path; char lc_dir[BUFSIZE]; char *lc_name; Bool (*im_registerIM)() = (Bool(*)())NULL; @@ -456,47 +504,18 @@ for (; count-- > 0; objects_list++) { if (objects_list->type != XIM_OBJECT || strcmp(objects_list->locale_name, lc_name)) continue; - if (!objects_list->dl_module) { - path = __lc_path(objects_list->dl_name, lc_dir); -#if defined(hpux) - objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); -#else - objects_list->dl_module = dlopen(path, RTLD_LAZY); -#endif - Xfree(path); - if (!objects_list->dl_module) continue; - } -#if defined(hpux) - getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, - EXPORT_SYMBOLS, malloc, &symbols); - for(i=0; iopen)) { - im_registerIM = symbols[i].value; - break; - } - } - - if(getsyms_cnt > 0) { - free(symbols); - } -#else - im_registerIM = (Bool(*)())dlsym(objects_list->dl_module, - objects_list->im_register); + if (!open_object (objects_list, lc_dir)) + continue; + im_registerIM = (Bool(*)())fetch_symbol(objects_list, + objects_list->im_register); if (!im_registerIM) continue; -#endif ret_flag = (*im_registerIM)(lcd, display, rdb, res_name, res_class, callback, client_data); if (ret_flag) break; - im_registerIM = 0; -#if defined(hpux) - shl_unload(objects_list->dl_module); -#else - dlclose(objects_list->dl_module); -#endif - objects_list->dl_module = NULL; + close_object (objects_list); } return (Bool)ret_flag; } @@ -512,7 +531,6 @@ XIMProc callback; XPointer *client_data; { - char *path; char lc_dir[BUFSIZE]; char *lc_name; Bool (*im_unregisterIM)() = (Bool(*)())NULL; @@ -531,48 +549,21 @@ for (; count-- > 0; objects_list++) { if (objects_list->type != XIM_OBJECT || strcmp(objects_list->locale_name, lc_name)) continue; - if (!objects_list->dl_module) { - path = __lc_path(objects_list->dl_name, lc_dir); -#if defined(hpux) - objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); -#else - objects_list->dl_module = dlopen(path, RTLD_LAZY); -#endif - Xfree(path); - if (!objects_list->dl_module) continue; - } -#if defined(hpux) - getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, - EXPORT_SYMBOLS, malloc, &symbols); - for(i=0; iopen)) { - im_unregisterIM = symbols[i].value; - break; - } - } + if (!objects_list->refcount) /* Must already be opened */ + continue; - if(getsyms_cnt > 0) { - free(symbols); - } -#else - im_unregisterIM = (Bool(*)())dlsym(objects_list->dl_module, - objects_list->im_unregister); + im_unregisterIM = (Bool(*)())fetch_symbol(objects_list, + objects_list->im_unregister); if (!im_unregisterIM) continue; -#endif ret_flag = (*im_unregisterIM)(lcd, display, rdb, res_name, res_class, callback, client_data); - if (ret_flag) break; - - im_unregisterIM = 0; -#if defined(hpux) - shl_unload(objects_list->dl_module); -#else - dlclose(objects_list->dl_module); -#endif - objects_list->dl_module = NULL; + if (ret_flag) { + close_object (objects_list); /* opened in RegisterIMInstantiateCallback */ + break; + } } return (Bool)ret_flag; } @@ -608,7 +599,6 @@ { XOM om = (XOM)NULL; int count; - char *path; char lc_dir[BUFSIZE]; char *lc_name; XOM (*om_openOM)() = (XOM(*)())NULL; @@ -626,46 +616,16 @@ for (; count-- > 0; objects_list++) { if (objects_list->type != XOM_OBJECT || strcmp(objects_list->locale_name, lc_name)) continue; - if (!objects_list->dl_module) { - path = __lc_path(objects_list->dl_name, lc_dir); -#if defined(hpux) - objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); -#else - objects_list->dl_module = dlopen(path, RTLD_LAZY); -#endif - Xfree(path); - if (!objects_list->dl_module) continue; - } -#if defined(hpux) - getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, - EXPORT_SYMBOLS, malloc, &symbols); - - for(i=0; iopen)) { - om_openOM = symbols[i].value; - break; - } - } - - if(getsyms_cnt > 0) { - free(symbols); - } -#else - om_openOM = (XOM(*)())dlsym(objects_list->dl_module, - objects_list->open); + if (!open_object (objects_list, lc_dir)) + continue; + + om_openOM = (XOM(*)())fetch_symbol(objects_list, objects_list->open); if (!om_openOM) continue; -#endif om = (*om_openOM)(lcd, display, rdb, res_name, res_class); if (om != (XOM)NULL) { - break; + break; } - om_openOM = 0; -#if defined(hpux) - shl_unload(objects_list->dl_module); -#else - dlclose(objects_list->dl_module); -#endif - objects_list->dl_module = NULL; + close_object(objects_list); } return (XOM)om; } Index: xc/lib/X11/Xlcint.h diff -u xc/lib/X11/Xlcint.h:3.13 xc/lib/X11/Xlcint.h:3.14 --- xc/lib/X11/Xlcint.h:3.13 Fri Dec 14 14:54:08 2001 +++ xc/lib/X11/Xlcint.h Fri Nov 1 08:43:31 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlcint.h,v 3.13 2001/12/14 19:54:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlcint.h,v 3.14 2002/11/01 13:43:31 alanh Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, @@ -988,6 +988,8 @@ /* documented in i18n/Framework.PS */ extern void _XlcInitLoader (void); + +extern void _XlcDeInitLoader (void); /* documented in i18n/Framework.PS */ /* Returns True on success, False on failure. */ Index: xc/lib/X11/Xlib.h diff -u xc/lib/X11/Xlib.h:3.22 xc/lib/X11/Xlib.h:3.23 --- xc/lib/X11/Xlib.h:3.22 Fri Dec 14 14:54:08 2001 +++ xc/lib/X11/Xlib.h Fri May 31 14:45:42 2002 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlib.h,v 3.22 2001/12/14 19:54:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlib.h,v 3.23 2002/05/31 18:45:42 dawes Exp $ */ /* @@ -71,7 +71,7 @@ #ifndef X_WCHAR #include #else -#ifdef __EMX__ +#ifdef __UNIXOS2__ #include #else /* replace this with #include or typedef appropriate for your system */ Index: xc/lib/X11/XlibInt.c diff -u xc/lib/X11/XlibInt.c:3.30 xc/lib/X11/XlibInt.c:3.34 --- xc/lib/X11/XlibInt.c:3.30 Fri Dec 14 14:54:09 2001 +++ xc/lib/X11/XlibInt.c Tue Feb 18 00:15:27 2003 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/XlibInt.c,v 3.30 2001/12/14 19:54:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlibInt.c,v 3.34 2003/02/18 05:15:27 dawes Exp $ */ /* * XlibInt.c - Internal support routines for the C subroutine @@ -38,7 +38,7 @@ #include "Xlibint.h" #include #include -#include "xcmiscstr.h" +#include #include #ifdef XTHREADS @@ -104,7 +104,7 @@ #define ECHECK(err) (WSAGetLastError() == err) #define ESET(val) WSASetLastError(val) #else -#ifdef __EMX__ +#ifdef __UNIXOS2__ #define ECHECK(err) (errno == err) #define ESET(val) #else @@ -129,7 +129,7 @@ #endif #endif -#ifdef __EMX__ +#ifdef __UNIXOS2__ #define select(n,r,w,x,t) os2ClientSelect(n,r,w,x,t) #include #define MAX_PATH _POSIX_PATH_MAX @@ -778,7 +778,12 @@ #endif /* XCONN_CHECK_FREQ */ if (!(len = pend)) { /* _XFlush can enqueue events */ - UnlockNextEventReader(dpy); +#ifdef XTHREADS + if (cvl) +#endif + { + UnlockNextEventReader(dpy); + } return(dpy->qlen); } /* Force a read if there is not enough data. Otherwise, @@ -822,7 +827,9 @@ if (read_buf != (char *)dpy->lock->reply_awaiters->buf) memcpy(dpy->lock->reply_awaiters->buf, read_buf, len); - UnlockNextEventReader(dpy); + if (cvl) { + UnlockNextEventReader(dpy); + } return(dpy->qlen); /* we read, so we can return */ } else if (read_buf != buf.buf) memcpy(buf.buf, read_buf, len); @@ -846,7 +853,12 @@ } } ENDITERATE - UnlockNextEventReader(dpy); +#ifdef XTHREADS + if (cvl) +#endif + { + UnlockNextEventReader(dpy); + } return(dpy->qlen); } @@ -3300,7 +3312,7 @@ /* try the places set in the environment */ drive = getenv ("_XBASEDRIVE"); -#ifdef __EMX__ +#ifdef __UNIXOS2__ if (!drive) drive = getenv ("X11ROOT"); #endif @@ -3316,7 +3328,7 @@ return 1; } -#ifndef __EMX__ +#ifndef __UNIXOS2__ /* one last place to look */ drive = getenv ("HOMEDRIVE"); if (drive) { Index: xc/lib/X11/Xlibint.h diff -u xc/lib/X11/Xlibint.h:3.23 xc/lib/X11/Xlibint.h:3.24 --- xc/lib/X11/Xlibint.h:3.23 Wed Dec 19 16:37:30 2001 +++ xc/lib/X11/Xlibint.h Fri May 31 14:45:42 2002 @@ -27,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlibint.h,v 3.23 2001/12/19 21:37:30 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlibint.h,v 3.24 2002/05/31 18:45:42 dawes Exp $ */ #ifndef _XLIBINT_H_ #define _XLIBINT_H_ 1 @@ -1415,7 +1415,7 @@ struct _XConnWatchInfo *next; }; -#ifdef __EMX__ +#ifdef __UNIXOS2__ extern char* __XOS2RedirRoot( #if NeedFunctionPrototypes char* Index: xc/lib/X11/Xrm.c diff -u xc/lib/X11/Xrm.c:3.19 xc/lib/X11/Xrm.c:3.20 --- xc/lib/X11/Xrm.c:3.19 Fri Dec 14 14:54:10 2001 +++ xc/lib/X11/Xrm.c Fri May 31 14:45:42 2002 @@ -49,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xrm.c,v 3.19 2001/12/14 19:54:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xrm.c,v 3.20 2002/05/31 18:45:42 dawes Exp $ */ #include #include @@ -289,7 +289,7 @@ static XrmBits const xrmtypes[256] = { EOS,0,0,0,0,0,0,0, 0,SPACE,EOL,0,0, -#if defined(WIN32) || defined(__EMX__) /* || defined(OS2) */ +#if defined(WIN32) || defined(__UNIXOS2__) EOL, /* treat CR the same as LF, just in case */ #else 0, @@ -1593,7 +1593,7 @@ register int fd, size; char * filebuf; -#ifdef __EMX__ +#ifdef __UNIXOS2__ filename = __XOS2RedirRoot(filename); #endif @@ -1620,7 +1620,7 @@ } size = read (fd, filebuf, size); -#ifdef __EMX__ +#ifdef __UNIXOS2__ { /* kill CRLF */ int i,k; for (i=k=0; i= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \ + || (((KeySym)(keysym) >= XK_ISO_Lock) && \ + ((KeySym)(keysym) <= XK_ISO_Last_Group_Lock)) \ || ((KeySym)(keysym) == XK_Mode_switch) \ || ((KeySym)(keysym) == XK_Num_Lock)) /* Index: xc/lib/X11/cmsColNm.c diff -u xc/lib/X11/cmsColNm.c:3.9 xc/lib/X11/cmsColNm.c:3.10 --- xc/lib/X11/cmsColNm.c:3.9 Sat Oct 27 23:32:34 2001 +++ xc/lib/X11/cmsColNm.c Fri May 31 14:45:42 2002 @@ -31,7 +31,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsColNm.c,v 3.9 2001/10/28 03:32:34 tsi Exp $ */ +/* $XFree86: xc/lib/X11/cmsColNm.c,v 3.10 2002/05/31 18:45:42 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" @@ -729,7 +729,7 @@ if ((pathname = getenv("XCMSDB")) == NULL) { pathname = XCMSDB; } -#ifdef __EMX__ +#ifdef __UNIXOS2__ pathname = __XOS2RedirRoot(pathname); #endif Index: xc/lib/X11/imCallbk.c diff -u xc/lib/X11/imCallbk.c:3.7 xc/lib/X11/imCallbk.c:3.8 --- xc/lib/X11/imCallbk.c:3.7 Fri Aug 17 22:41:28 2001 +++ xc/lib/X11/imCallbk.c Sat Dec 14 20:20:56 2002 @@ -32,7 +32,7 @@ makoto@sm.sony.co.jp ***********************************************************************/ -/* $XFree86: xc/lib/X11/imCallbk.c,v 3.7 2001/08/18 02:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imCallbk.c,v 3.8 2002/12/15 01:20:56 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -835,7 +835,8 @@ (*cb->callback)((XIC)ic, cb->client_data, (XPointer)&cbs); - _free_memory_for_text((XIMText *)cbs.data.text); + if (cbs.type == XIMTextType) + _free_memory_for_text((XIMText *)cbs.data.text); } else { Index: xc/lib/X11/imDefIm.c diff -u xc/lib/X11/imDefIm.c:1.9 xc/lib/X11/imDefIm.c:1.11 --- xc/lib/X11/imDefIm.c:1.9 Sat Oct 27 23:32:34 2001 +++ xc/lib/X11/imDefIm.c Fri Dec 13 20:53:56 2002 @@ -31,7 +31,7 @@ makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefIm.c,v 1.9 2001/10/28 03:32:34 tsi Exp $ */ +/* $XFree86: xc/lib/X11/imDefIm.c,v 1.11 2002/12/14 01:53:56 dawes Exp $ */ #include #define NEED_EVENTS @@ -165,7 +165,7 @@ *p = '\0'; for( n = 0; n < len; n++ ) - if( locale_name[n] && !strcmp( pp, locale_name[n] ) ) + if( locale_name[n] && !_XlcCompareISOLatin1( pp, locale_name[n] ) ) return locale_name[n]; if (finish) break; @@ -1136,6 +1136,13 @@ #endif /* XIM_CONNECTABLE */ ic = next; } +#ifdef XIM_CONNECTABLE + if (!(!IS_SERVER_CONNECTED(im) && IS_RECONNECTABLE(im))) + im->core.ic_chain = NULL; +#else + im->core.ic_chain = NULL; +#endif + _XimUnregisterServerFilter(im); _XimResetIMInstantiateCallback(im); status = (Status)_XimClose(im); Index: xc/lib/X11/imExten.c diff -u xc/lib/X11/imExten.c:1.2 xc/lib/X11/imExten.c:1.3 --- xc/lib/X11/imExten.c:1.2 Sat Oct 27 23:32:34 2001 +++ xc/lib/X11/imExten.c Wed Feb 19 22:30:36 2003 @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imExten.c,v 1.2 2001/10/28 03:32:34 tsi Exp $ */ +/* $XFree86: xc/lib/X11/imExten.c,v 1.3 2003/02/20 03:30:36 dawes Exp $ */ #include #define NEED_EVENTS @@ -480,9 +480,12 @@ len += sizeof(CARD16) /* sizeof imid */ + sizeof(INT16); /* sizeof length of extensions */ - _XimSetHeader((XPointer)buf, XIM_QUERY_EXTENSION, 0, &len); - if (!(_XimWrite(im, len, (XPointer)buf))) + _XimSetHeader((XPointer)buf, XIM_QUERY_EXTENSION, 0, &len); + if (!(_XimWrite(im, len, (XPointer)buf))) { + XFree(buf); return False; + } + XFree(buf); _XimFlush(im); buf_size = BUFSIZE; ret_code = _XimRead(im, &len, (XPointer)reply, buf_size, Index: xc/lib/X11/imLcIm.c diff -u xc/lib/X11/imLcIm.c:1.9 xc/lib/X11/imLcIm.c:1.10 --- xc/lib/X11/imLcIm.c:1.9 Wed Jan 17 14:41:52 2001 +++ xc/lib/X11/imLcIm.c Fri Sep 20 22:46:04 2002 @@ -32,7 +32,7 @@ frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcIm.c,v 1.9 2001/01/17 19:41:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcIm.c,v 1.10 2002/09/21 02:46:04 dawes Exp $ */ #include /* @@ -167,6 +167,7 @@ XIC next; ic = im->core.ic_chain; + im->core.ic_chain = NULL; while (ic) { (*ic->methods->destroy) (ic); next = ic->core.next; Index: xc/lib/X11/imLcPrs.c diff -u xc/lib/X11/imLcPrs.c:1.7 xc/lib/X11/imLcPrs.c:1.8 --- xc/lib/X11/imLcPrs.c:1.7 Sat Oct 27 23:32:34 2001 +++ xc/lib/X11/imLcPrs.c Tue Jan 14 21:59:33 2003 @@ -30,7 +30,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcPrs.c,v 1.7 2001/10/28 03:32:34 tsi Exp $ */ +/* $XFree86: xc/lib/X11/imLcPrs.c,v 1.8 2003/01/15 02:59:33 dawes Exp $ */ #include #include @@ -518,13 +518,13 @@ FILE *fp; DefTree **ptop; { - char tb[65535]; + char tb[8192]; char* tbp; struct stat st; if (fstat (fileno (fp), &st) != -1) { unsigned long size = (unsigned long) st.st_size; - if (size < sizeof tb) tbp = tb; + if (size <= sizeof tb) tbp = tb; else tbp = malloc (size); if (tbp != NULL) { Index: xc/lib/X11/imThaiFlt.c diff -u xc/lib/X11/imThaiFlt.c:3.11 xc/lib/X11/imThaiFlt.c:3.18 --- xc/lib/X11/imThaiFlt.c:3.11 Fri Dec 14 14:54:10 2001 +++ xc/lib/X11/imThaiFlt.c Thu Feb 20 22:13:30 2003 @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/imThaiFlt.c,v 3.11 2001/12/14 19:54:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imThaiFlt.c,v 3.18 2003/02/21 03:13:30 dawes Exp $ */ /* **++ @@ -85,6 +85,12 @@ char *str, int len ); +extern int _Xlcwcstombs( + XLCd lcd, + char *str, + wchar_t *wstr, + int len +); extern int _Xlcmbstoutf8( XLCd lcd, char *ustr, @@ -578,22 +584,33 @@ (0<=(wc)&&(wc)<=0x7F) ? \ (wc) : \ ((0x0E01<=(wc)&&(wc)<=0x0E5F) ? ((wc)-0x0E00+0xA0) : 0)) +#define tis2ucs(c) \ + ( \ + ((c)<=0x7F) ? \ + (wchar_t)(c) : \ + ((0x0A1<=(c)&&(c)<=0x0FF) ? ((wchar_t)(c)-0xA0+0x0E00) : 0)) /* * Macros to save and recall last input character in XIC */ #define IC_SavePreviousChar(ic,ch) \ (*((ic)->private.local.context->mb) = (char) (ch)) -/* +#define IC_ClearPreviousChar(ic) \ + (*((ic)->private.local.context->mb) = 0) #define IC_GetPreviousChar(ic) \ - ((unsigned char) *((ic)->private.local.context->mb)) -*/ + (IC_RealGetPreviousChar(ic,1)) +#define IC_GetContextChar(ic) \ + (IC_RealGetPreviousChar(ic,2)) +#define IC_DeletePreviousChar(ic) \ + (IC_RealDeletePreviousChar(ic)) + Private unsigned char #if NeedFunctionPrototypes -IC_GetPreviousChar(Xic ic) +IC_RealGetPreviousChar(Xic ic, unsigned short pos) #else -IC_GetPreviousChar(ic) +IC_RealGetPreviousChar(ic, pos) Xic ic; + XIMStringConversionPosition pos; #endif { XICCallback* cb = &ic->core.string_conversion_callback; @@ -602,25 +619,29 @@ XIMStringConversionCallbackStruct screc; unsigned char c; + /* Use a safe value of position = 0 and stretch the range to desired + * place, as XIM protocol is unclear here whether it could be negative + */ screc.position = 0; screc.direction = XIMBackwardChar; screc.operation = XIMStringConversionRetrieval; - screc.factor = 2; + screc.factor = pos; screc.text = 0; (cb->callback)((XIC)ic, cb->client_data, (XPointer)&screc); - if (!screc.text) { return 0; } + if (!screc.text) + return (unsigned char) *((ic)->private.local.context->mb); if ((screc.text->feedback && *screc.text->feedback == XIMStringConversionLeftEdge) || - screc.text->length < 2) + screc.text->length < 1) { c = 0; } else { if (screc.text->encoding_is_wchar) { - c = ucs2tis(screc.text->string.wcs[1]); + c = ucs2tis(screc.text->string.wcs[0]); XFree(screc.text->string.wcs); } else { - c = screc.text->string.mbs[1]; + c = screc.text->string.mbs[0]; XFree(screc.text->string.mbs); } } @@ -630,8 +651,49 @@ return (unsigned char) *((ic)->private.local.context->mb); } } -#define IC_ClearPreviousChar(ic) \ - (*((ic)->private.local.context->mb) = 0) + +Private unsigned char +#if NeedFunctionPrototypes +IC_RealDeletePreviousChar(Xic ic) +#else +IC_RealDeletePreviousChar(ic) + Xic ic; +#endif +{ + XICCallback* cb = &ic->core.string_conversion_callback; + + if (cb && cb->callback) { + XIMStringConversionCallbackStruct screc; + unsigned char c; + + screc.position = 0; + screc.direction = XIMBackwardChar; + screc.operation = XIMStringConversionSubstitution; + screc.factor = 1; + screc.text = 0; + + (cb->callback)((XIC)ic, cb->client_data, (XPointer)&screc); + if (!screc.text) { return 0; } + if ((screc.text->feedback && + *screc.text->feedback == XIMStringConversionLeftEdge) || + screc.text->length < 1) + { + c = 0; + } else { + if (screc.text->encoding_is_wchar) { + c = ucs2tis(screc.text->string.wcs[0]); + XFree(screc.text->string.wcs); + } else { + c = screc.text->string.mbs[0]; + XFree(screc.text->string.mbs); + } + } + XFree(screc.text); + return c; + } else { + return 0; + } +} /* * Input sequence check mode in XIC */ @@ -1210,6 +1272,71 @@ } /* + * Helper functions for _XimThaiFilter() + */ +Private Bool +#if NeedFunctionPrototypes +ThaiFltAcceptInput(Xic ic, unsigned char new_char, KeySym symbol) +#else +ThaiFltAcceptInput(ic, new_char, symbol) + Xic ic; + unsigned char new_char; + KeySym symbol; +#endif +{ + ic->private.local.composed->wc[0] = tis2ucs(new_char); + ic->private.local.composed->wc[1] = '\0'; + + if ((new_char <= 0x1f) || (new_char == 0x7f)) + ic->private.local.composed->keysym = symbol; + else + ic->private.local.composed->keysym = NoSymbol; + + return True; +} + +Private Bool +#if NeedFunctionPrototypes +ThaiFltReorderInput(Xic ic, unsigned char previous_char, unsigned char new_char) +#else +ThaiFltReorderInput(ic, previous_char, new_char) + Xic ic; + unsigned char previous_char, new_char; +#endif +{ + if (!IC_DeletePreviousChar(ic)) return False; + ic->private.local.composed->wc[0] = tis2ucs(new_char); + ic->private.local.composed->wc[1] = tis2ucs(previous_char); + ic->private.local.composed->wc[2] = '\0'; + + ic->private.local.composed->keysym = NoSymbol; + + return True; +} + +Private Bool +#if NeedFunctionPrototypes +ThaiFltReplaceInput(Xic ic, unsigned char new_char, KeySym symbol) +#else +ThaiFltReplaceInput(ic, new_char, symbol) + Xic ic; + unsigned char new_char; + KeySym symbol; +#endif +{ + if (!IC_DeletePreviousChar(ic)) return False; + ic->private.local.composed->wc[0] = tis2ucs(new_char); + ic->private.local.composed->wc[1] = '\0'; + + if ((new_char <= 0x1f) || (new_char == 0x7f)) + ic->private.local.composed->keysym = symbol; + else + ic->private.local.composed->keysym = NoSymbol; + + return True; +} + +/* * Filter function for TACTIS */ Bool @@ -1221,17 +1348,19 @@ { Xic ic = (Xic)client_data; KeySym symbol; - int count; + int wcount; int isc_mode; /* Thai Input Sequence Check mode */ unsigned char previous_char; /* Last inputted Thai char */ + unsigned char new_char; #if 0 unsigned int modifiers; KeySym lsym,usym; int state; XicThaiPart *thai_part; -#endif char buf[10]; - int i; +#endif + wchar_t wbuf[10]; + Bool isReject; if ((ev->type != KeyPress) || (ev->xkey.keycode == 0)) @@ -1239,9 +1368,11 @@ if (!IC_IscMode(ic)) InitIscMode(ic); - count = XmbLookupString((XIC)ic, &ev->xkey, buf, sizeof(buf), &symbol, NULL); + wcount = XwcLookupString((XIC)ic, &ev->xkey, + wbuf, sizeof(wbuf)/sizeof(wbuf[0]), &symbol, NULL); - if (((symbol >> 8 == 0xFF) && + if ((ev->xkey.state & (AllMods & ~ShiftMask)) || + ((symbol >> 8 == 0xFF) && ((XK_BackSpace <= symbol && symbol <= XK_Clear) || (symbol == XK_Return) || (symbol == XK_Pause) || @@ -1249,23 +1380,20 @@ (symbol == XK_Sys_Req) || (symbol == XK_Escape) || (symbol == XK_Delete) || - (XK_Home <= symbol && symbol <= XK_Begin) || - (XK_Select <= symbol && symbol <= XK_Insert) || - (XK_Undo <= symbol && symbol <= XK_Break) || - (symbol == XK_Num_Lock) || - (symbol == XK_KP_Space) || - (symbol == XK_KP_Tab) || - (symbol == XK_KP_Enter) || - (XK_KP_F1 <= symbol && symbol <= XK_KP_Delete) || - (XK_KP_Multiply <= symbol && symbol <= XK_KP_9) || - (XK_F1 <= symbol && symbol <= XK_F35) || - (symbol == XK_KP_Equal)))) + IsCursorKey(symbol) || + IsKeypadKey(symbol) || + IsMiscFunctionKey(symbol) || + IsFunctionKey(symbol)))) { IC_ClearPreviousChar(ic); return False; } if (((symbol >> 8 == 0xFF) && - (XK_Shift_L <= symbol && symbol <= XK_Hyper_R)) || + IsModifierKey(symbol)) || +#ifdef XK_XKB_KEYS + ((symbol >> 8 == 0xFE) && + (XK_ISO_Lock <= symbol && symbol <= XK_ISO_Last_Group_Lock)) || +#endif (symbol == NoSymbol)) { return False; @@ -1305,27 +1433,47 @@ */ isc_mode = IC_IscMode(ic); if (!(previous_char = IC_GetPreviousChar(ic))) previous_char = ' '; - if (!THAI_isaccepted(buf[0], previous_char, isc_mode)) { + new_char = ucs2tis(wbuf[0]); + isReject = True; + if (THAI_isaccepted(new_char, previous_char, isc_mode)) { + ThaiFltAcceptInput(ic, new_char, symbol); + isReject = False; + } else { + unsigned char context_char; + + context_char = IC_GetContextChar(ic); + if (context_char) { + if (THAI_iscomposible(new_char, context_char)) { + if (THAI_iscomposible(previous_char, new_char)) { + isReject = !ThaiFltReorderInput(ic, previous_char, new_char); + } else if (THAI_iscomposible(previous_char, context_char)) { + isReject = !ThaiFltReplaceInput(ic, new_char, symbol); + } else if (THAI_chtype(previous_char) == FV1 + && THAI_chtype(new_char) == TONE) { + isReject = !ThaiFltReorderInput(ic, previous_char, new_char); + } + } else if (THAI_isaccepted(new_char, context_char, isc_mode)) { + isReject = !ThaiFltReplaceInput(ic, new_char, symbol); + } + } + } + if (isReject) { /* reject character */ XBell(ev->xkey.display, BellVolume); return True; } - /* Remember the last character inputted. */ - IC_SavePreviousChar(ic, buf[count-1]); - for (i=0; iprivate.local.composed->mb[i] = buf[i]; - ic->private.local.composed->mb[count] = '\0'; - _Xlcmbstowcs(ic->core.im->core.lcd, ic->private.local.composed->wc, - ic->private.local.composed->mb, count); + _Xlcwcstombs(ic->core.im->core.lcd, ic->private.local.composed->mb, + ic->private.local.composed->wc, 10); _Xlcmbstoutf8(ic->core.im->core.lcd, ic->private.local.composed->utf8, - ic->private.local.composed->mb, count); + ic->private.local.composed->mb, 10); - if (!((buf[0] > 0 && buf[0] <= 0x1f) || (buf[0] == 0) || (buf[0] == 0x7f))) - ic->private.local.composed->keysym = NoSymbol; - else - ic->private.local.composed->keysym = symbol; + /* Remember the last character inputted + * (as fallback in case StringConversionCallback is not provided) + */ + IC_SavePreviousChar(ic, new_char); + ev->xkey.keycode = 0; XPutBackEvent(d, ev); return True; Index: xc/lib/X11/imThaiIm.c diff -u xc/lib/X11/imThaiIm.c:1.7 xc/lib/X11/imThaiIm.c:1.8 --- xc/lib/X11/imThaiIm.c:1.7 Wed Jan 17 14:41:52 2001 +++ xc/lib/X11/imThaiIm.c Fri Sep 20 22:46:04 2002 @@ -32,7 +32,7 @@ frankyling@hgrd01.enet.dec.com ******************************************************************/ -/* $XFree86: xc/lib/X11/imThaiIm.c,v 1.7 2001/01/17 19:41:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imThaiIm.c,v 1.8 2002/09/21 02:46:04 dawes Exp $ */ #include #include @@ -220,6 +220,7 @@ XIC next; ic = im->core.ic_chain; + im->core.ic_chain = NULL; while (ic) { (*ic->methods->destroy) (ic); next = ic->core.next; Index: xc/lib/X11/imTrX.c diff -u xc/lib/X11/imTrX.c:1.1.1.3 xc/lib/X11/imTrX.c:1.2 --- xc/lib/X11/imTrX.c:1.1.1.3 Tue Jan 16 17:11:51 2001 +++ xc/lib/X11/imTrX.c Mon Nov 25 20:21:25 2002 @@ -28,6 +28,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ +/* $XFree86: xc/lib/X11/imTrX.c,v 1.2 2002/11/26 01:21:25 dawes Exp $ */ #include #include @@ -340,8 +341,15 @@ unsigned long bytes_after_ret; unsigned char *prop_ret; - if ((event->type == ClientMessage) && (event->xclient.format == 8)) { - data = event->xclient.data.b; + if ((event->type == ClientMessage) && + !((event->xclient.message_type == spec->improtocolid) || + (event->xclient.message_type == spec->immoredataid))) { + /* This event has nothing to do with us, + * FIXME should not have gotten here then... + */ + return False; + } else if ((event->type == ClientMessage) && (event->xclient.format == 8)) { + data = event->xclient.data.b; if (buf_len >= XIM_CM_DATA_SIZE) { (void)memcpy(buf, data, XIM_CM_DATA_SIZE); *ret_len = XIM_CM_DATA_SIZE; Index: xc/lib/X11/lcCT.c diff -u xc/lib/X11/lcCT.c:3.26 xc/lib/X11/lcCT.c:3.27 --- xc/lib/X11/lcCT.c:3.26 Sat Oct 27 23:32:34 2001 +++ xc/lib/X11/lcCT.c Tue Oct 8 19:31:35 2002 @@ -36,7 +36,7 @@ * Modifier: Ivan Pascal The XFree86 Project * Modifier: Bruno Haible The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcCT.c,v 3.26 2001/10/28 03:32:34 tsi Exp $ */ +/* $XFree86: xc/lib/X11/lcCT.c,v 3.27 2002/10/08 23:31:35 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -72,13 +72,16 @@ { "ISO8859-8:GR", /* ISO-8859-8 138 */ "\033-H" }, { "ISO8859-9:GR", /* ISO-8859-9 148 */ "\033-M" }, { "ISO8859-10:GR", /* ISO-8859-10 157 */ "\033-V" }, + { "ISO8859-11:GR", /* ISO-8859-11 166 */ "\033-T" }, { "ISO8859-13:GR", /* ISO-8859-13 179 */ "\033-Y" }, { "ISO8859-14:GR", /* ISO-8859-14 199 */ "\033-_" }, { "ISO8859-15:GR", /* ISO-8859-15 203 */ "\033-b" }, { "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" }, +#if 0 { "TIS620-0:GR", /* TIS-620 166 */ "\033-T" }, +#endif /* Registered character sets with two byte per character */ { "GB2312.1980-0:GL", /* GB_2312-80 58 */ "\033$(A" }, Index: xc/lib/X11/lcDB.c diff -u xc/lib/X11/lcDB.c:3.14 xc/lib/X11/lcDB.c:3.15 --- xc/lib/X11/lcDB.c:3.14 Thu Aug 9 15:14:06 2001 +++ xc/lib/X11/lcDB.c Fri May 31 14:45:42 2002 @@ -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.14 2001/08/09 19:14:06 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcDB.c,v 3.15 2002/05/31 18:45:42 dawes Exp $ */ @@ -346,7 +346,7 @@ cur += len; str[cur] = '\0'; -#ifdef __EMX__ /* Take out carriage returns under OS/2 */ +#ifdef __UNIXOS2__ /* Take out carriage returns under OS/2 */ if (cur>1) { if (str[cur-2] == '\r' && str[cur-1] == '\n') { str[cur-2] = '\n'; @@ -1251,7 +1251,7 @@ if (name == NULL) return (XPointer)NULL; -#ifndef __EMX__ +#ifndef __UNIXOS2__ name_q = XrmStringToQuark(name); #else name_q = XrmStringToQuark((char*)__XOS2RedirRoot(name)); Index: xc/lib/X11/lcEuc.c diff -u xc/lib/X11/lcEuc.c:3.10 xc/lib/X11/lcEuc.c:3.12 --- xc/lib/X11/lcEuc.c:3.10 Wed Jan 17 14:41:53 2001 +++ xc/lib/X11/lcEuc.c Sun Jan 19 23:05:30 2003 @@ -30,7 +30,7 @@ Yoshiyuki Segawa (segawa@ossi.com) *****************************************************************/ -/* $XFree86: xc/lib/X11/lcEuc.c,v 3.10 2001/01/17 19:41:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcEuc.c,v 3.12 2003/01/20 04:05:30 dawes Exp $ */ /* * An EUC locale. @@ -114,7 +114,7 @@ int cs0flg = False; int cs1flg = False; - int length; + int length = 0; int num_conv; int unconv_num = 0; @@ -1215,7 +1215,7 @@ { int ct_len = *to_left; int cs_num; - int clen, length; + int clen, length = 0; int unconv_num = 0; int num_conv; const char *inbufptr = *from; @@ -1489,6 +1489,8 @@ _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNCompoundText, open_wcstocts); _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte, open_wcstombs); #endif + + _XlcAddUtf8Converters(lcd); return lcd; } Index: xc/lib/X11/lcFile.c diff -u xc/lib/X11/lcFile.c:3.25 xc/lib/X11/lcFile.c:3.30 --- xc/lib/X11/lcFile.c:3.25 Mon Nov 19 10:33:38 2001 +++ xc/lib/X11/lcFile.c Mon Nov 25 09:04:53 2002 @@ -23,7 +23,7 @@ * SOFTWARE. * */ -/* $XFree86: xc/lib/X11/lcFile.c,v 3.25 2001/11/19 15:33:38 tsi Exp $ */ +/* $XFree86: xc/lib/X11/lcFile.c,v 3.30 2002/11/25 14:04:53 eich Exp $ */ #include #include @@ -41,7 +41,7 @@ #define isreadable(f) ((access((f), R_OK) != -1) ? 1 : 0) #endif -#ifndef __EMX__ +#ifndef __UNIXOS2__ #define LC_PATHDELIM ':' #else #define LC_PATHDELIM ';' @@ -143,20 +143,64 @@ char *buf, int buf_len) { - char *dir, *p = buf; + char *p = buf; int len = 0; +#ifndef NO_XLOCALEDIR + char *dir; + int priv = 1; + dir = getenv("XLOCALEDIR"); - if (dir != NULL) { - len = strlen(dir); - strncpy(p, dir, buf_len); - if (len < buf_len) { - p[len++] = LC_PATHDELIM; - p += len; + + if (dir) { + /* + * Only use the user-supplied path if the process isn't priviledged. + */ + if (getuid() == geteuid() && getgid() == getegid()) { +#if defined(HASSETUGID) + priv = issetugid(); +#elif defined(HASGETRESUID) + { + uid_t ruid, euid, suid; + gid_t rgid, egid, sgid; + if ((getresuid(&ruid, &euid, &suid) == 0) && + (getresgid(&rgid, &egid, &sgid) == 0)) + priv = (euid != suid) || (egid != sgid); + } +#else + /* + * If there are saved ID's the process might still be priviledged + * even though the above test succeeded. If issetugid() and + * getresgid() aren't available, test this by trying to set + * euid to 0. + * + * Note: this only protects setuid-root clients. It doesn't + * protect other setuid or any setgid clients. If this tradeoff + * isn't acceptable, set DisableXLocaleDirEnv to YES in host.def. + */ + unsigned int oldeuid; + oldeuid = geteuid(); + if (seteuid(0) != 0) { + priv = 0; + } else { + seteuid(oldeuid); + priv = 1; + } +#endif + } + if (!priv) { + len = strlen(dir); + strncpy(p, dir, buf_len); + if (len < buf_len) { + p[len++] = LC_PATHDELIM; + p += len; + } } } +#endif /* NO_XLOCALEDIR */ + if (len < buf_len) -#ifndef __EMX__ +#ifndef __UNIXOS2__ strncpy(p, XLOCALEDIR, buf_len - len); #else strncpy(p,__XOS2RedirRoot(XLOCALEDIR), buf_len - len); @@ -187,7 +231,7 @@ char *p = buf; int n; char *args[2], *from, *to; -#ifdef __EMX__ /* Take out CR under OS/2 */ +#ifdef __UNIXOS2__ /* Take out CR under OS/2 */ int len; len = strlen(p); @@ -389,53 +433,63 @@ char *dir_name; char *lc_name; { - char dir[PATH_MAX], buf[PATH_MAX], *name = NULL; - int i, n; - char *args[NUM_LOCALEDIR]; - static char locale_alias[] = LOCALE_ALIAS; - char *target_name = (char*)0; - char *target_dir = (char*)0; - - xlocaledir (dir, PATH_MAX); - n = _XlcParsePath(dir, args, 256); - for (i = 0; i < n; ++i){ - if ((2 + (args[i] ? strlen(args[i]) : 0) + - strlen(locale_alias)) < PATH_MAX) { - sprintf (buf, "%s/%s", args[i], locale_alias); - name = resolve_name(lc_name, buf, LtoR); - } - - /* If name is not an alias, use lc_name for locale.dir search */ - if (name == NULL) - name = lc_name; - - /* look at locale.dir */ - - target_dir = args[i]; - if (!target_dir) { - /* something wrong */ - continue; - } - if ((1 + (target_dir ? strlen (target_dir) : 0) + - strlen("locale.dir")) < PATH_MAX) { - sprintf(buf, "%s/locale.dir", target_dir); - target_name = resolve_name(name, buf, RtoL); - } - if (target_name != NULL) { - char *p = 0; - if ((p = strstr(target_name, "/XLC_LOCALE"))) { - *p = '\0'; - break; - } - } - } - if (target_name == NULL) { - /* vendor locale name == Xlocale name, no expansion of alias */ - target_dir = args[0]; - target_name = lc_name; - } - strcpy(dir_name, target_dir); - strcat(dir_name, "/"); - strcat(dir_name, target_name); - return dir_name; + char dir[PATH_MAX], buf[PATH_MAX], *name = NULL; + int i, n; + char *args[NUM_LOCALEDIR]; + static char locale_alias[] = LOCALE_ALIAS; + char *target_name = (char*)0; + char *target_dir = (char*)0; + + xlocaledir (dir, PATH_MAX); + n = _XlcParsePath(dir, args, 256); + for (i = 0; i < n; ++i) { + + if ((2 + (args[i] ? strlen(args[i]) : 0) + + strlen(locale_alias)) < PATH_MAX) { + sprintf (buf, "%s/%s", args[i], locale_alias); + name = resolve_name(lc_name, buf, LtoR); + } + + /* If name is not an alias, use lc_name for locale.dir search */ + if (name == NULL) + name = lc_name; + + /* look at locale.dir */ + + target_dir = args[i]; + if (!target_dir) { + /* something wrong */ + if (name != lc_name) + Xfree(name); + continue; + } + if ((1 + (target_dir ? strlen (target_dir) : 0) + + strlen("locale.dir")) < PATH_MAX) { + sprintf(buf, "%s/locale.dir", target_dir); + target_name = resolve_name(name, buf, RtoL); + } + if (name != lc_name) + Xfree(name); + if (target_name != NULL) { + char *p = 0; + if ((p = strstr(target_name, "/XLC_LOCALE"))) { + *p = '\0'; + break; + } + Xfree(target_name); + target_name = NULL; + } + name = NULL; + } + if (target_name == NULL) { + /* vendor locale name == Xlocale name, no expansion of alias */ + target_dir = args[0]; + target_name = lc_name; + } + strcpy(dir_name, target_dir); + strcat(dir_name, "/"); + strcat(dir_name, target_name); + if (target_name != lc_name) + Xfree(target_name); + return dir_name; } Index: xc/lib/X11/lcGenConv.c diff -u xc/lib/X11/lcGenConv.c:3.24 xc/lib/X11/lcGenConv.c:3.27 --- xc/lib/X11/lcGenConv.c:3.24 Wed Dec 19 18:07:00 2001 +++ xc/lib/X11/lcGenConv.c Tue Feb 25 17:02:45 2003 @@ -35,7 +35,7 @@ * 2000 * Modifier: Ivan Pascal The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.24 2001/12/19 23:07:00 tsi Exp $ */ +/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.27 2003/02/25 22:02:45 dawes Exp $ */ /* * A generic locale loader for all kinds of ISO-2022 based codesets. @@ -660,7 +660,7 @@ } if (glyph_index_tmp != *glyph_index) { - if (ctextseg->charset == charset) { + if (ctextseg && ctextseg->charset == charset) { goto end_loop; } } @@ -1001,7 +1001,7 @@ } /* end of while */ - *from = (XPointer) ((const char *) *from + from_size); + *from = (XPointer) ((const wchar_t *) *from + from_size); *from_left = 0; *to = (XPointer) outbufptr; @@ -1194,7 +1194,7 @@ *ext_seg_len = i % 128 + 128; } - *from = (XPointer) ((const char *) *from + from_size); + *from = (XPointer) ((const wchar_t *) *from + from_size); *from_left = 0; *to = (XPointer) outbufptr; @@ -2046,7 +2046,7 @@ } /* end of while */ - *from = (XPointer) ((const char *) *from + from_size); + *from = (XPointer) ((const wchar_t *) *from + from_size); *from_left = 0; *to = (XPointer) outbufptr; @@ -2164,7 +2164,7 @@ /* error end */ if (unconv_num) { - *from = (XPointer) ((const char *) *from + from_size); + *from = (XPointer) ((const wchar_t *) *from + from_size); *from_left = 0; *to = (XPointer) outbufptr; return -1; @@ -2219,7 +2219,7 @@ end: /* error end */ if (save_from == (XPointer) src) { - *from = (XPointer) ((const char *) *from + from_size); + *from = (XPointer) ((const wchar_t *) *from + from_size); *from_left = 0; return -1; } @@ -2279,6 +2279,8 @@ return(0); } +#ifdef STDCVT + static int stdc_wcstocs( XlcConv conv, @@ -2326,6 +2328,8 @@ return(0); } + +#endif static int ctstombs( Index: xc/lib/X11/lcGeneric.c diff -u xc/lib/X11/lcGeneric.c:3.16 xc/lib/X11/lcGeneric.c:3.17 --- xc/lib/X11/lcGeneric.c:3.16 Thu Nov 15 19:52:27 2001 +++ xc/lib/X11/lcGeneric.c Mon Feb 3 17:11:58 2003 @@ -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.16 2001/11/16 00:52:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcGeneric.c,v 3.17 2003/02/03 22:11:58 paulo Exp $ */ #include #include "Xlibint.h" @@ -526,7 +526,7 @@ Xfree(charsetd->encoding_name); } */ - tmp = (char *)Xmalloc(strlen(value[0]+1)); + tmp = (char *)Xmalloc(strlen(value[0])+1); strcpy(tmp,value[0]); charsetd->encoding_name = tmp; charsetd->xrm_encoding_name = XrmStringToQuark(tmp); Index: xc/lib/X11/lcInit.c diff -u xc/lib/X11/lcInit.c:3.9 xc/lib/X11/lcInit.c:3.10 --- xc/lib/X11/lcInit.c:3.9 Thu Nov 15 19:52:27 2001 +++ xc/lib/X11/lcInit.c Fri Nov 1 08:43:31 2002 @@ -74,7 +74,7 @@ * Modifier: Masayoshi Shimamura FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/lcInit.c,v 3.9 2001/11/16 00:52:27 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcInit.c,v 3.10 2002/11/01 13:43:31 alanh Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -133,6 +133,45 @@ #ifdef USE_DYNAMIC_LOADER _XlcAddLoader(_XlcDynamicLoader, XlcHead); +#endif + +#endif /* USE_DYNAMIC_LC */ +} + +void +_XlcDeInitLoader() +{ + +#ifdef USE_DYNAMIC_LC + _XlcRemoveLoader(_XlcDynamicLoad); +#else /* USE_DYNAMIC_LC */ + +#ifdef USE_GENERIC_LOADER + _XlcRemoveLoader(_XlcGenericLoader); +#endif + +#ifdef USE_DEFAULT_LOADER + _XlcRemoveLoader(_XlcDefaultLoader); +#endif + +#ifdef USE_UTF8_LOADER + _XlcRemoveLoader(_XlcUtf8Loader); +#endif + +#ifdef USE_EUC_LOADER + _XlcRemoveLoader(_XlcEucLoader); +#endif + +#ifdef USE_SJIS_LOADER + _XlcRemoveLoader(_XlcSjisLoader); +#endif + +#ifdef USE_JIS_LOADER + _XlcRemoveLoader(_XlcJisLoader); +#endif + +#ifdef USE_DYNAMIC_LOADER + _XlcRemoveLoader(_XlcDynamicLoader); #endif #endif /* USE_DYNAMIC_LC */ Index: xc/lib/X11/lcJis.c diff -u xc/lib/X11/lcJis.c:1.8 xc/lib/X11/lcJis.c:1.10 --- xc/lib/X11/lcJis.c:1.8 Wed Jul 25 11:04:45 2001 +++ xc/lib/X11/lcJis.c Sun Jan 19 23:05:31 2003 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcJis.c,v 1.8 2001/07/25 15:04:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcJis.c,v 1.10 2003/01/20 04:05:31 dawes Exp $ */ /* * A Japanese JIS locale. @@ -139,6 +139,8 @@ case E_GR: charset = state->GR_charset; goto found; + default: + break; } } } @@ -406,6 +408,8 @@ else state->GR_charset = charset; break; + default: + break; } } @@ -929,6 +933,8 @@ #ifdef STDCVT } #endif + + _XlcAddUtf8Converters(lcd); return lcd; } Index: xc/lib/X11/lcPrTxt.c diff -u xc/lib/X11/lcPrTxt.c:1.7 xc/lib/X11/lcPrTxt.c:1.8 --- xc/lib/X11/lcPrTxt.c:1.7 Sat Oct 27 23:32:35 2001 +++ xc/lib/X11/lcPrTxt.c Mon Jun 3 18:36:00 2002 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcPrTxt.c,v 1.7 2001/10/28 03:32:35 tsi Exp $ */ +/* $XFree86: xc/lib/X11/lcPrTxt.c,v 1.8 2002/06/03 22:36:00 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -148,8 +148,7 @@ return XConverterNotFound; if (is_wide_char) { - buf_len = text_prop->nitems + 1; - buf = (XPointer) Xmalloc(buf_len * sizeof(wchar_t)); + buf_len = (text_prop->nitems + 1) * sizeof(wchar_t);; } else { if (strcmp(to_type, XlcNUtf8String) == 0) buf_len = text_prop->nitems * 6 + 1; @@ -157,6 +156,7 @@ buf_len = text_prop->nitems * XLC_PUBLIC(lcd, mb_cur_max) + 1; buf = (XPointer) Xmalloc(buf_len); } + buf = (XPointer) Xmalloc(buf_len); if (buf == NULL) return XNoMemory; to = buf; @@ -223,11 +223,13 @@ if (! do_strcpy) _XlcCloseConverter(conv); - if (is_wide_char) + if (is_wide_char) { *((wchar_t *) to) = (wchar_t) 0; - else + to_left -= sizeof(wchar_t); + } else { *((char *) to) = '\0'; - to_left--; + to_left--; + } *list_ret = alloc_list(is_wide_char, *count_ret, buf_len - to_left); if (*list_ret) Index: xc/lib/X11/lcSjis.c diff -u xc/lib/X11/lcSjis.c:3.8 xc/lib/X11/lcSjis.c:3.10 --- xc/lib/X11/lcSjis.c:3.8 Wed Jan 17 14:41:55 2001 +++ xc/lib/X11/lcSjis.c Sun Jan 19 23:05:31 2003 @@ -35,7 +35,7 @@ makoto@sm.sony.co.jp *****************************************************************/ -/* $XFree86: xc/lib/X11/lcSjis.c,v 3.8 2001/01/17 19:41:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcSjis.c,v 3.10 2003/01/20 04:05:31 dawes Exp $ */ /* * A Japanese SJIS locale. @@ -145,7 +145,7 @@ Bool new_char; int firstbyte; - int length; + int length = 0; int num_conv; int unconv_num = 0; @@ -893,7 +893,7 @@ XPointer ct_base = ctptr; StateRec ct_state; - CTData charset; + CTData charset = NULL; XLCd lcd = (XLCd) conv->state; int codeset_num = XLC_GENERIC(lcd, codeset_num); @@ -1556,6 +1556,7 @@ _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte, open_wcstombs); #endif + _XlcAddUtf8Converters(lcd); return lcd; } Index: xc/lib/X11/lcUTF8.c diff -u xc/lib/X11/lcUTF8.c:1.14 xc/lib/X11/lcUTF8.c:1.15 --- xc/lib/X11/lcUTF8.c:1.14 Thu Nov 15 19:52:28 2001 +++ xc/lib/X11/lcUTF8.c Tue Oct 8 19:31:36 2002 @@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.14 2001/11/16 00:52:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.15 2002/10/08 23:31:36 dawes Exp $ */ /* * This file contains: @@ -183,6 +183,7 @@ #include "lcUniConv/iso8859_8.h" #include "lcUniConv/iso8859_9.h" #include "lcUniConv/iso8859_10.h" +#include "lcUniConv/iso8859_11.h" #include "lcUniConv/iso8859_13.h" #include "lcUniConv/iso8859_14.h" #include "lcUniConv/iso8859_15.h" @@ -253,6 +254,9 @@ }, { "ISO8859-10", NULLQUARK, iso8859_10_mbtowc, iso8859_10_wctomb + }, + { "ISO8859-11", NULLQUARK, + iso8859_11_mbtowc, iso8859_11_wctomb }, { "ISO8859-13", NULLQUARK, iso8859_13_mbtowc, iso8859_13_wctomb Index: xc/lib/X11/lcWrap.c diff -u xc/lib/X11/lcWrap.c:3.13 xc/lib/X11/lcWrap.c:3.14 --- xc/lib/X11/lcWrap.c:3.13 Fri Dec 14 14:54:10 2001 +++ xc/lib/X11/lcWrap.c Fri Nov 1 08:43:31 2002 @@ -53,7 +53,7 @@ * * Katsuhisa Yano TOSHIBA Corp. */ -/* $XFree86: xc/lib/X11/lcWrap.c,v 3.13 2001/12/14 19:54:10 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcWrap.c,v 3.14 2002/11/01 13:43:31 alanh Exp $ */ #include #include "Xlibint.h" @@ -333,6 +333,11 @@ } break; } + } + + if(loader_list) { + _XlcDeInitLoader(); + loader_list = NULL; } } Index: xc/lib/X11/omGeneric.c diff -u xc/lib/X11/omGeneric.c:3.20 xc/lib/X11/omGeneric.c:3.25 --- xc/lib/X11/omGeneric.c:3.20 Thu Apr 5 13:42:26 2001 +++ xc/lib/X11/omGeneric.c Tue Nov 26 08:41:40 2002 @@ -1,4 +1,5 @@ /* $Xorg: omGeneric.c,v 1.6 2000/08/17 19:45:21 cpqbld Exp $ */ +/* #define FONTDEBUG */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -31,7 +32,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/omGeneric.c,v 3.20 2001/04/05 17:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omGeneric.c,v 3.25 2002/11/26 13:41:40 eich Exp $ */ /* * Fixed the algorithms in parse_fontname() and parse_fontdata() @@ -43,6 +44,10 @@ * * Modifiers: Jeff Walls, Paul Anderson: HEWLETT-PACKARD */ +/* + * Cleaned up mess, removed some blabla + * Egbert Eich, SuSE Linux AG + */ #include "Xlibint.h" #include "XomGeneric.h" @@ -56,6 +61,7 @@ #define PIXEL_SIZE_FIELD 7 #define POINT_SIZE_FIELD 8 #define CHARSET_ENCODING_FIELD 14 +#define XLFD_MAX_LEN 255 extern int _XmbDefaultTextEscapement(), _XwcDefaultTextEscapement(), _Xutf8DefaultTextEscapement(); @@ -275,7 +281,7 @@ if (load_fontset_data (oc, font_set) != True) return False; - +#ifndef TESTVERSION if(load_fontdata(oc, font_set->font_data, font_set->font_data_count) != True) return False; @@ -283,35 +289,6 @@ if(load_fontdata(oc, font_set->substitute, font_set->substitute_num) != True) return False; - -#if 0 - /* ### This code is no longer needed. This block essentially - * ### took the font used for this FontSet and figured out - * ### which font structure to use. This is now accomplished - * ### via load_fontset_data(), which takes the *best* font - * ### for this FontSet and performs an XLoadQueryFont() to - * ### obtain the font structure. Note that this should work - * ### for either Primary or Substitute fonts. - * ### -- jjw/pma (HP) - */ - if(font_set->font_data_count > 0 && font_set->font_data->font ) { - for (i=0; ifont_data_count; i++) - { - if (!strcmp (font_set->font_data[i].xlfd_name, - font_set->font_name)) - { - font_set->font = font_set->font_data[i].font; - break; - } - } - } else if(font_set->substitute_num > 0 ) { - for(i=0;isubstitute_num;i++){ - if(font_set->substitute[i].font != NULL){ - font_set->font = font_set->substitute[i].font; - break ; - } - } - } #endif /* Add 1996.05.20 */ @@ -564,7 +541,8 @@ int pixel_size = 0; int field_num = 0, len = 0; - if(font_name == (char *) NULL || (len = strlen(font_name)) <= 0 || len > 255) + if(font_name == (char *) NULL || (len = strlen(font_name)) <= 0 + || len > XLFD_MAX_LEN) return NULL; pattern = (char *)Xmalloc(len + 1); @@ -583,7 +561,7 @@ for(field_num = 0 ; field_num < CHARSET_ENCODING_FIELD && ptr && *ptr ; ptr++, field_num++) { fields[field_num] = ptr; - + if((ptr = strchr(ptr, '-'))) { *ptr = '\0'; } @@ -619,7 +597,7 @@ } /* Max XLFD length is 255 */ - if (len > 255) + if (len > XLFD_MAX_LEN) return NULL; rotate_font_ptr = (char *)Xmalloc(len + 1); @@ -660,6 +638,7 @@ return False; } +#if 0 static char * get_font_name_from_list(oc, pattern, font_data) XOC oc; @@ -687,6 +666,7 @@ return name; } +#endif static int parse_all_name(oc, font_data, pattern) @@ -711,11 +691,16 @@ int list_num; XFontStruct *fs_list; if(is_match_charset(font_data, pattern) != True) { + /* + * pattern should not contain any wildcard (execpt '?') + * this was probably added to make this case insensitive. + */ if ((fn_list = XListFontsWithInfo(dpy, pattern, MAXFONTS, &list_num, &fs_list)) == NULL) { return False; - } + } + /* shouldn't we loop here ? */ else if ((prop_fname = get_prop_name(dpy, fs_list)) == NULL) { XFreeFontInfo(fn_list, fs_list, list_num); return False; @@ -749,11 +734,11 @@ { char* last = (char *) NULL; char* base_name; - char buf[BUFSIZE]; /* no XLFD name should be this long */ + char buf[XLFD_MAX_LEN + 1]; int length = 0; int num_fields; - - /* If the font specified by "pattern" is expandable to be + /* + * If the font specified by "pattern" is expandable to be * a member of "font_data"'s FontSet, we've found a match. */ if(is_match_charset(font_data, pattern) == True) { @@ -762,39 +747,11 @@ } } - /* If an XLFD name is arbitrarily (too) long, allocate a buffer, - * and some extra space to tack stuff on the end. - * - * ### This is a hack. What happens is, we substitute pattern's - * ### encoding with the default encoding for the FontSet and - * ### try to find a match. For example, we may change pattern - * ### from: - * ### -*-*-*-*-*-*-14-*-*-*-*-*-jisx0212.1990-0 to - * ### -*-*-*-*-*-*-14-*-*-*-*-*-JISX0208.1990-0 - * ### So, the length of the original pattern may not be enough - * ### to store the "new" encoding (e.g., going from ISO8859-1 to - * ### JISX0208.1990-0), so the author decided to simply allocate - * ### a *bunch* of extra space to handle the potentially longer - * ### encoding. - * ### - * ### The real way to do this would be to figure out the length - * ### of the original encoding and the length of the new encoding. - * ### Re-alloc the array with the difference. Since it doesn't - * ### hurt anything keeping the extra-large buffer, I'll leave - * ### it the way it is. --jjw/pma (HP) - * ### - */ - - /* - * since BUFSIZE is much bigger than any legal XLFD name - * we'll allow the first half for the XLFD pattern, and the - * second half for the charset-plus-encoding. If we wanted to - * be accomodating, we could allocate memory, but that's - * overkill for this. Hackers who are trying to do bad things - * don't deserve to be accomodated like that. - */ - if ((length = strlen (pattern)) > BUFSIZE/2) return -1; + length = strlen (pattern); + if (length > XLFD_MAX_LEN) + return -1; + strcpy(buf, pattern); last = buf + length - 1; @@ -814,6 +771,13 @@ * then append the encoding to get: * -*-*-*-*-*-*-14-*-*-*-*-*-JISX0208.1990-0 */ + /* + * Take care of: + * -*-*-*-*-*-*-14-*-*-*-*- + */ + if (*(last) == '-') + *++last = '*'; + *++last = '-'; break; case 13: @@ -843,19 +807,10 @@ num_fields = 12; break; default: - /* punt */ - if (length > 1 && *last == '*' && *(last - 1) == '-') { - if (length > 3 && *(last - 2) == '*' && *(last - 3) == '-') - last -= 3; - else - last--; - } else { + if (*last != '-') *++last = '-'; - } - break; } - last++; /* At this point, "last" is pointing to the last "-" in the * xlfd, and all xlfd's at this point take a form similar to: @@ -867,44 +822,29 @@ * If the modified font is found in the current FontSet, * we've found a match. */ + + last++; - /* don't let hackers trounce the stack... */ - if (strlen (font_data->name) > BUFSIZE/2) + if ((last - buf) + strlen(font_data->name) > XLFD_MAX_LEN) return -1; - /* ...otherwise there's plenty of room to tack on the charset/encoding */ strcpy(last, font_data->name); if ((font_data->xlfd_name = get_font_name(oc, buf)) != NULL) return True; - /* This happens if the client specifies less than 12 fields - * (e.g., -*-*-*) for some reason. We'll keep appending - * "-*" until we find something that matches. This "feels" - * as if we're being overly nice to "lazy" client programs, - * but that's the way X is...nice :-) - */ + /* This may mot be needed anymore as XListFonts() takes care of this */ while (num_fields < 12) { + if ((last - buf) > (XLFD_MAX_LEN - 2)) + return -1; *last = '*'; *(last + 1) = '-'; strcpy(last + 2, font_data->name); num_fields++; last+=2; if ((font_data->xlfd_name = get_font_name(oc, buf)) != NULL) - return True; + return True; } - -/* - I'm not sure what Teeks was trying to do here. It - seems to me that if "get_font_name()" fails, - "get_font_name_from_list()" would also fail. I wouldn't - put this in the SI until I understood it better. - -- jjw/pma (HP) - - Couldn't resolve the wild base fontname ! - - Teeks -*/ - if ((font_data->xlfd_name = get_font_name_from_list(oc, buf, font_data)) != NULL) - return True; + return False; } @@ -913,8 +853,8 @@ typedef enum{C_PRIMARY, C_SUBSTITUTE, C_VMAP, C_VROTATE } ClassType; static int -parse_fontdata(oc, font_set, font_data, font_data_count, name_list, name_list_count, - class, font_data_return) +parse_fontdata(oc, font_set, font_data, font_data_count, name_list, + name_list_count, class, font_data_return) XOC oc; FontSet font_set; FontData font_data; @@ -930,7 +870,6 @@ char *pattern = (char *) NULL; int found_num = 0, ret = 0; int count = name_list_count; - Bool is_found = False; if(name_list == NULL || count <= 0) { return False; @@ -939,46 +878,53 @@ 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. */ + + /* Loop through each font encoding defined in the "font_data" FontSet. */ for ( ; font_data_count-- > 0; font_data++) { - is_found = False; + Bool is_found = False; font_name = (char *) NULL; count = name_list_count; cur_name_list = name_list; - /* Loop through each font specified by the user in the call to XCreateFontset(). */ + /* + * Loop through each font specified by the user + * in the call to XCreateFontset(). + */ while (count-- > 0) { pattern = *cur_name_list++; if (pattern == NULL || *pattern == '\0') continue; - - - /* If the current font is fully specified (i.e., the xlfd contains - * no wildcards) and the font exists on the X Server, we have a match. +#ifdef FONTDEBUG + fprintf(stderr,"Font pattern: %s %s\n", + pattern,font_data->name); +#endif + + /* + * If the current font is fully specified (i.e., the + * xlfd contains no wildcards) and the font exists on + * the X Server, we have a match. */ if (strchr(pattern, '*') == NULL && (font_name = get_font_name(oc, pattern))) { - - /* Find the full xlfd name for this font. If the font is already - * in xlfd format, it is simply returned. If the font is an - * alias for another font, the xlfd of the aliased font is returned. + /* + * Find the full xlfd name for this font. If the font is + * already in xlfd format, it is simply returned. If the + * font is an alias for another font, the xlfd of the + * aliased font is returned. */ ret = parse_all_name(oc, font_data, font_name); Xfree(font_name); if (ret == -1) return -1; if (ret == False) continue; - - /* Since there was an exact match of a fully-specified font + /* + * Since there was an exact match of a fully-specified font * or a font alias, we can return now since the desired font - * was found for the current FontSet for this CharSet. + * was found for the current font encoding for this FontSet. * * Previous implementations of this algorithm would * not return here. Instead, they continued searching - * through the FontSets for this CharSet. The side-effect + * through the font encodings for this FontSet. The side-effect * of that behavior is you may return a "substitute" match * instead of an "exact" match. We believe there should be a * preference on exact matches. Therefore, as soon as we @@ -986,7 +932,7 @@ * * Also, previous implementations seemed to think it was * important to find either a primary or substitute font - * for each FontSet in the CharSet before returning an + * for each Font encoding in the FontSet before returning an * acceptable font. We don't believe this is necessary. * All the client cares about is finding a reasonable font * for what was passed in. If we find an exact match, @@ -994,19 +940,25 @@ * * -- jjw/pma (HP) */ - font_data_return->xlfd_name = (char *)Xmalloc + if (font_data_return) { + font_data_return->xlfd_name = (char *)Xmalloc (strlen(font_data->xlfd_name) + 1); - if (!font_data_return->xlfd_name) return -1; + if (!font_data_return->xlfd_name) return -1; - strcpy (font_data_return->xlfd_name, font_data->xlfd_name); + strcpy (font_data_return->xlfd_name, font_data->xlfd_name); - font_data_return->side = font_data->side; + font_data_return->side = font_data->side; + } +#ifdef FONTDEBUG + fprintf(stderr,"XLFD name: %s\n",font_data->xlfd_name); +#endif return True; } - - /* If the font name is not fully specified (i.e., it has wildcards), - * we have more work to do. See the comments in parse_omit_name() + /* + * If the font name is not fully specified + * (i.e., it has wildcards), we have more work to do. + * See the comments in parse_omit_name() * for the list of things to do. */ ret = parse_omit_name(oc, font_data, pattern); @@ -1014,7 +966,8 @@ if (ret == -1) return -1; if (ret == False) continue; - /* A font which matched the wild-carded specification was found. + /* + * A font which matched the wild-carded specification was found. * Only update the return data if a font has not yet been found. * This maintains the convention that FontSets listed higher in * a CodeSet in the Locale Database have higher priority than @@ -1033,9 +986,11 @@ * higher priority than a font found in the JISX0208.1983-0 * FontSet. */ - if (font_data_return->xlfd_name == NULL) - { - + if (font_data_return && font_data_return->xlfd_name == NULL) { + +#ifdef FONTDEBUG + fprintf(stderr,"XLFD name: %s\n",font_data->xlfd_name); +#endif font_data_return->xlfd_name = (char *)Xmalloc (strlen(font_data->xlfd_name) + 1); if (!font_data_return->xlfd_name) return -1; @@ -1046,26 +1001,22 @@ found_num++; is_found = True; - /* We almost certainly should have 'break' here and should ignore - * the rest of the patterns. The problem is that we'll overwrite - * font_data->font and font_data->xlfd_name with later matches. - * But the general expectation would be that font_data->xlfd_name - * would correspond to to the returned value. (It's not clear - * why this routine modifies font_data and has a - * font_data_return...) - * - * Owen Taylor 12 Jul 2000 - */ + + break; } switch(class) { case C_PRIMARY: - if(is_found == False) - { - /* Did not find a font for the current FontSet. Check the + if(is_found == False) { + /* + * Did not find a font for the current FontSet. Check the * FontSet's "substitute" font for a match. If we find a * match, we'll keep searching in hopes of finding an exact * match later down the FontSet list. + * + * when we return and we have found a font font_data_return + * contains the first (ie. best) match no matter if this + * is a C_PRIMARY or a C_SUBSTITUTE font */ ret = parse_fontdata(oc, font_set, font_set->substitute, font_set->substitute_num, name_list, @@ -1077,7 +1028,10 @@ found_num++; is_found = True; } - +#ifdef TESTVERSION + else + return True; +#endif break; case C_SUBSTITUTE: @@ -1090,8 +1044,8 @@ if(is_found == True) { char *rotate_name; - if((rotate_name = get_rotate_fontname(font_data->xlfd_name)) != - NULL) { + if((rotate_name = get_rotate_fontname(font_data->xlfd_name)) + != NULL) { Xfree(font_data->xlfd_name); font_data->xlfd_name = rotate_name; @@ -1119,20 +1073,20 @@ int count; { FontData vmap = font_set->vmap; - FontDataRec font_data_return; VRotate vrotate = font_set->vrotate; int vmap_num = font_set->vmap_num; int vrotate_num = font_set->vrotate_num; int ret = 0, i = 0; if(vmap_num > 0) { - if(parse_fontdata(oc, font_set, vmap, vmap_num, name_list, count, C_VMAP) == -1) + if(parse_fontdata(oc, font_set, vmap, vmap_num, name_list, + count, C_VMAP,NULL) == -1) return (-1); } if(vrotate_num > 0) { ret = parse_fontdata(oc, font_set, (FontData) vrotate, vrotate_num, - name_list, count, C_VROTATE, &font_data_return); + name_list, count, C_VROTATE, NULL); if(ret == -1) { return (-1); } else if(ret == False) { @@ -1140,8 +1094,8 @@ int num_cr; int sub_num = font_set->substitute_num; - code_range = vrotate[i].code_range; - num_cr = vrotate[i].num_cr; + code_range = vrotate[0].code_range; /* ? */ + num_cr = vrotate[0].num_cr; /* ? */ for(i = 0 ; i < vrotate_num ; i++) { if(vrotate[i].xlfd_name) Xfree(vrotate[i].xlfd_name); @@ -1167,7 +1121,7 @@ } ret = parse_fontdata(oc, font_set, (FontData) vrotate, vrotate_num, - name_list, count, C_VROTATE, &font_data_return); + name_list, count, C_VROTATE, NULL); if(ret == -1) return (-1); } @@ -1206,22 +1160,18 @@ if(font_set->font_data_count > 0) { - /* If there are a non-zero number of FontSets defined + /* + * If there are a non-zero number of FontSets defined * for this CharSet. - */ - font_data_return.name = NULL; - font_data_return.side = XlcUnknown; - font_data_return.scopes_num = 0; - font_data_return.scopes = NULL; - font_data_return.xlfd_name = NULL; - font_data_return.font = NULL; - - /* Try to find a font for this CharSet. If we find an + * Try to find a font for this CharSet. If we find an * acceptable font, we save the information for return * to the client. If we do not find an acceptable font, * a "missing_charset" will be reported to the client * for this CharSet. */ + font_data_return. xlfd_name = NULL; + font_data_return.side = XlcUnknown; + ret = parse_fontdata(oc, font_set, font_set->font_data, font_set->font_data_count, name_list, count, C_PRIMARY, @@ -1229,6 +1179,13 @@ if(ret == -1) { goto err; } else if(ret == True) { + /* + * We can't just loop thru fontset->font_data to + * find the first (ie. best) match: parse_fontdata + * will try a substitute font if no primary one could + * be matched. It returns the required information in + * font_data_return. + */ font_set->font_name = (char *)Xmalloc (strlen(font_data_return.xlfd_name) + 1); if(font_set->font_name == (char *) NULL) @@ -1237,6 +1194,7 @@ font_set->side = font_data_return.side; Xfree (font_data_return.xlfd_name); + font_data_return.xlfd_name = NULL; if(parse_vw(oc, font_set, name_list, count) == -1) goto err; @@ -1244,20 +1202,13 @@ } } else if(font_set->substitute_num > 0) { - - /* If there are no FontSets defined for this + /* + * If there are no FontSets defined for this * CharSet. We can only find "substitute" fonts. */ - font_data_return.name = NULL; - font_data_return.side = XlcUnknown; - font_data_return.scopes_num = 0; - font_data_return.scopes = NULL; - font_data_return.xlfd_name = NULL; - font_data_return.font = NULL; - ret = parse_fontdata(oc, font_set, font_set->substitute, font_set->substitute_num, - name_list, count, C_SUBSTITUTE, &font_data_return); + name_list, count, C_SUBSTITUTE, NULL); if(ret == -1) { goto err; } else if(ret == True) { @@ -1450,9 +1401,13 @@ XFreeFontInfo(NULL, font_data->font, 1);/* Add 1996.01.23 */ font_data->font = NULL; } -/* XOM to kyoutuu shite shiyou sushiteiru ryouiki - kokoha free_fontdataOM() de free sareru - +/* + * font_data->name and font_data->scopes belong to the OM not OC. + * To save space this data is shared between OM and OC. We are + * not allowed to free it here. + * It has been moved to free_fontdataOM() + */ +/* if(font_data->scopes){ Xfree(font_data->scopes); font_data->scopes = NULL; @@ -1464,6 +1419,7 @@ */ } } + void destroy_fontdata(gen,dpy) XOCGenericPart *gen ; Display *dpy ; @@ -1475,7 +1431,16 @@ font_set = gen->font_set; font_set_num = gen->font_set_num; for( ; font_set_num-- ; font_set++) { + if (font_set->font) { + if(font_set->font->fid) + XFreeFont(dpy,font_set->font); + else + XFreeFontInfo(NULL, font_set->font, 1); + font_set->font = NULL; + } if(font_set->font_data) { + if (font_set->info) + XFreeFontInfo(NULL, font_set->info, 1); free_fontdataOC(dpy, font_set->font_data, font_set->font_data_count); Xfree(font_set->font_data); Index: xc/lib/X11/omText.c diff -u xc/lib/X11/omText.c:1.5 xc/lib/X11/omText.c:1.6 --- xc/lib/X11/omText.c:1.5 Sat Oct 27 23:32:35 2001 +++ xc/lib/X11/omText.c Mon Sep 16 14:05:23 2002 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omText.c,v 1.5 2001/10/28 03:32:35 tsi Exp $ */ +/* $XFree86: xc/lib/X11/omText.c,v 1.6 2002/09/16 18:05:23 eich Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint @@ -196,10 +196,10 @@ * *always* contain good data. We should probably remove * the check for "fd->font", but we won't :-) -- jjw/pma (HP) */ - if(fd == (FontData) NULL || - (font = fs->font) == (XFontStruct *) NULL){ + if((font = fs->font) == (XFontStruct *) NULL){ - if((font = fd->font) == (XFontStruct *) NULL) + if(fd == (FontData) NULL || + (font = fd->font) == (XFontStruct *) NULL) break; } Index: xc/lib/X11/os2Stubs.c diff -u xc/lib/X11/os2Stubs.c:3.0 xc/lib/X11/os2Stubs.c:3.1 --- xc/lib/X11/os2Stubs.c:3.0 Mon May 13 02:37:17 1996 +++ xc/lib/X11/os2Stubs.c Fri May 31 14:45:42 2002 @@ -28,11 +28,12 @@ * */ -/* $XFree86: xc/lib/X11/os2Stubs.c,v 3.0 1996/05/13 06:37:17 dawes Exp $ */ +/* $XFree86: xc/lib/X11/os2Stubs.c,v 3.1 2002/05/31 18:45:42 dawes Exp $ */ /* A few OS/2 functions needed in the X11 lib. Mainly, the file path redirection * functions and the "optimized" select() for the clients */ +#define I_NEED_OS2_H #include #include #include Index: xc/lib/X11/lcUniConv/iso8859_11.h diff -u /dev/null xc/lib/X11/lcUniConv/iso8859_11.h:1.2 --- /dev/null Thu Feb 27 12:27:06 2003 +++ xc/lib/X11/lcUniConv/iso8859_11.h Wed Oct 9 12:38:19 2002 @@ -0,0 +1,78 @@ +/* $XFree86: xc/lib/X11/lcUniConv/iso8859_11.h,v 1.2 2002/10/09 16:38:19 tsi Exp $ */ + +/* + * ISO8859-11 + */ + +static const unsigned short iso8859_11_2uni[96] = { + /* 0xa0 */ + 0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, + 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, + /* 0xb0 */ + 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, + 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, + /* 0xc0 */ + 0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, + 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, + /* 0xd0 */ + 0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, + 0x0e38, 0x0e39, 0x0e3a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0e3f, + /* 0xe0 */ + 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, + 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f, + /* 0xf0 */ + 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, + 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, +}; + +static int +iso8859_11_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) +{ + unsigned char c = *s; + if (c < 0x80) { + *pwc = (ucs4_t) c; + return 1; + } + else if (c < 0xa0) { + } + else { + unsigned short wc = iso8859_11_2uni[c-0xa0]; + if (wc != 0xfffd) { + *pwc = (ucs4_t) wc; + return 1; + } + } + return RET_ILSEQ; +} + +static const unsigned char iso8859_11_page0e[96] = { + 0x00, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x00-0x07 */ + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0x08-0x0f */ + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x10-0x17 */ + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0x18-0x1f */ + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */ + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */ + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x30-0x37 */ + 0xd8, 0xd9, 0xda, 0x00, 0x00, 0x00, 0x00, 0xdf, /* 0x38-0x3f */ + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */ + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */ + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0x50-0x57 */ + 0xf8, 0xf9, 0xfa, 0xfb, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */ +}; + +static int +iso8859_11_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) +{ + unsigned char c = 0; + if (wc < 0x0080 || wc == 0x00a0) { + *r = wc; + return 1; + } + else if (wc >= 0x0e00 && wc < 0x0e60) + c = iso8859_11_page0e[wc-0x0e00]; + if (c != 0) { + *r = c; + return 1; + } + return RET_ILSEQ; +} Index: xc/lib/X11/xlibi18n/Xi18nLib.conf diff -u xc/lib/X11/xlibi18n/Xi18nLib.conf:1.4 xc/lib/X11/xlibi18n/Xi18nLib.conf:1.8 --- xc/lib/X11/xlibi18n/Xi18nLib.conf:1.4 Thu Jan 17 12:14:49 2002 +++ xc/lib/X11/xlibi18n/Xi18nLib.conf Mon Nov 25 09:04:54 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/X11/xlibi18n/Xi18nLib.conf,v 1.4 2002/01/17 17:14:49 dawes Exp $ +XCOMM $XFree86: xc/lib/X11/xlibi18n/Xi18nLib.conf,v 1.8 2002/11/25 14:04:54 eich Exp $ #define DoNormalLib NO #define DoSharedLib YES @@ -10,6 +10,11 @@ SOXI18NREV = 2 POSTLOCALE = common +#if defined (LibDirName) + POSTLOCALELIB = LibDirName +#else + POSTLOCALELIB = lib +#endif #if Malloc0ReturnsNull MALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL @@ -23,7 +28,7 @@ #include -#ifdef HPArchitecture && OSMajorVersion > 9 +#if defined(HPArchitecture) && OSMajorVersion > 9 EXTRA_SHLIBLDFLAGS = +s +b $(USRLIBDIR) #else EXTRA_SHLIBLDFLAGS = @@ -47,8 +52,6 @@ $(RM) $@ $(CC) -c $(CFLAGS) $(_NOOP_) $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $*.c -DependTarget() - clean:: rm -rf *.so.$(SOXI18NREV) @@ -56,8 +59,8 @@ $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) #ifndef Xi18nLibraryTarget -#if 0 -#define Xi18nLibraryTarget(libname) @@\ +# if 0 /* !CrossCompiling */ +# define Xi18nLibraryTarget(libname) @@\ all:: libname.so.$(SOXI18NREV) @@\ libname.so.$(SOXI18NREV): $(OBJS) @@\ $(RM) $@~ @@\ @@ -65,17 +68,18 @@ $(RM) $@ @@\ $(MV) $@~ $@ @@\ install:: libname.so.$(SOXI18NREV) @@\ - @if [ -d $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE) ]; then set +x; \ @@\ - else (set -x; $(MKDIRHIER) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)); fi @@\ - $(RM) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)/libname.so.$(SOXI18NREV) @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) libname.so.$(SOXI18NREV) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE) -#else -#define Xi18nLibraryTarget(libname) @@\ + @if [ -d $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALELIB)/$(POSTLOCALE) ]; then set +x; \ @@\ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALELIB)/$(POSTLOCALE)); fi @@\ + $(RM) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALELIB)/$(POSTLOCALE)/libname.so.$(SOXI18NREV) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) libname.so.$(SOXI18NREV) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALELIB)/$(POSTLOCALE) +# else +# define Xi18nLibraryTarget(libname) @@\ +DependTarget() @@\ SharedLibraryTarget(libname,$(SOXI18NREV),$(OBJS),.,.) @@\ install:: Concat(lib,libname.so.$(SOXI18NREV)) @@\ - MakeDir($(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)) @@\ - $(RM) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)/libname.so.$(SOXI18NREV) @@\ - $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.$(SOXI18NREV)) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)/libname.so.$(SOXI18NREV) + MakeDir($(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALELIB)/$(POSTLOCALE)) @@\ + $(RM) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALELIB)/$(POSTLOCALE)/libname.so.$(SOXI18NREV) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.$(SOXI18NREV)) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALELIB)/$(POSTLOCALE)/libname.so.$(SOXI18NREV) -#endif +# endif #endif Index: xc/lib/XIE/XIEos2.def diff -u xc/lib/XIE/XIEos2.def:3.6 xc/lib/XIE/XIEos2.def:removed --- xc/lib/XIE/XIEos2.def:3.6 Thu Apr 29 05:13:29 1999 +++ xc/lib/XIE/XIEos2.def Thu Feb 27 12:27:09 2003 @@ -1,207 +0,0 @@ -LIBRARY XIE -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/XIE/XIEos2.def,v 3.6 1999/04/29 09:13:29 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 32768 -EXPORTS - XieAbort @ 1 - XieAllocatePhotofloGraph @ 2 - XieAwait @ 3 - XieCreateColorList @ 4 - XieCreateLUT @ 5 - XieCreatePhotoflo @ 6 - XieCreatePhotomap @ 7 - XieCreatePhotospace @ 8 - XieCreateROI @ 9 - XieDestroyColorList @ 10 - XieDestroyLUT @ 11 - XieDestroyPhotoflo @ 12 - XieDestroyPhotomap @ 13 - XieDestroyPhotospace @ 14 - XieDestroyROI @ 15 - XieExecuteImmediate @ 16 - XieExecutePhotoflo @ 17 - XieFloArithmetic @ 18 - XieFloBandCombine @ 19 - XieFloBandExtract @ 20 - XieFloBandSelect @ 21 - XieFloBlend @ 22 - XieFloCompare @ 23 - XieFloConstrain @ 24 - XieFloConvertFromIndex @ 25 - XieFloConvertFromRGB @ 26 - XieFloConvertToIndex @ 27 - XieFloConvertToRGB @ 28 - XieFloConvolve @ 29 - XieFloDither @ 30 - XieFloExportClientHistogram @ 31 - XieFloExportClientLUT @ 32 - XieFloExportClientPhoto @ 33 - XieFloExportClientROI @ 34 - XieFloExportDrawable @ 35 - XieFloExportDrawablePlane @ 36 - XieFloExportLUT @ 37 - XieFloExportPhotomap @ 38 - XieFloExportROI @ 39 - XieFloGeometry @ 40 - XieFloImportClientLUT @ 41 - XieFloImportClientPhoto @ 42 - XieFloImportClientROI @ 43 - XieFloImportDrawable @ 44 - XieFloImportDrawablePlane @ 45 - XieFloImportLUT @ 46 - XieFloImportPhotomap @ 47 - XieFloImportROI @ 48 - XieFloLogical @ 49 - XieFloMatchHistogram @ 50 - XieFloMath @ 51 - XieFloPasteUp @ 52 - XieFloPoint @ 53 - XieFloUnconstrain @ 54 - XieFreeEncodeJPEGBaseline @ 55 - XieFreeEncodeJPEGLossless @ 56 - XieFreePasteUpTiles @ 57 - XieFreePhotofloGraph @ 58 - XieFreeTechniques @ 59 - XieGetClientData @ 60 - XieInitialize @ 61 - XieModifyPhotoflo @ 62 - XiePurgeColorList @ 63 - XiePutClientData @ 64 - XieQueryColorList @ 65 - XieQueryPhotoflo @ 66 - XieQueryPhotomap @ 67 - XieQueryTechniques @ 68 - XieRedefinePhotoflo @ 69 - XieTecCIELabToRGB @ 70 - XieTecCIEXYZToRGB @ 71 - XieTecClipScale @ 72 - XieTecColorAllocAll @ 73 - XieTecColorAllocMatch @ 74 - XieTecColorAllocRequantize @ 75 - XieTecConvolveConstant @ 76 - XieTecDecodeG31D @ 77 - XieTecDecodeG32D @ 78 - XieTecDecodeG42D @ 79 - XieTecDecodeJPEGBaseline @ 80 - XieTecDecodeJPEGLossless @ 81 - XieTecDecodeTIFF2 @ 82 - XieTecDecodeTIFFPackBits @ 83 - XieTecDecodeUncompressedSingle @ 84 - XieTecDecodeUncompressedTriple @ 85 - XieTecDitherOrderedParam @ 86 - XieTecEncodeG31D @ 87 - XieTecEncodeG32D @ 88 - XieTecEncodeG42D @ 89 - XieTecEncodeJPEGBaseline @ 90 - XieTecEncodeJPEGLossless @ 91 - XieTecEncodeServerChoice @ 92 - XieTecEncodeTIFF2 @ 93 - XieTecEncodeTIFFPackBits @ 94 - XieTecEncodeUncompressedSingle @ 95 - XieTecEncodeUncompressedTriple @ 96 - XieTecGeomAntialiasByArea @ 97 - XieTecGeomAntialiasByLowpass @ 98 - XieTecGeomGaussian @ 99 - XieTecGeomNearestNeighbor @ 100 - XieTecHistogramGaussian @ 101 - XieTecHistogramHyperbolic @ 102 - XieTecRGBToCIELab @ 103 - XieTecRGBToCIEXYZ @ 104 - XieTecRGBToYCC @ 105 - XieTecRGBToYCbCr @ 106 - XieTecWhiteAdjustCIELabShift @ 107 - XieTecYCCToRGB @ 108 - XieTecYCbCrToRGB @ 109 - _XiePhotofloSize @ 110 - _XieElemImportClientLUT @ 111 - _XieElemImportClientPhoto @ 112 - _XieElemImportClientROI @ 113 - _XieElemImportDrawable @ 114 - _XieElemImportDrawablePlane @ 115 - _XieElemImportLUT @ 116 - _XieElemImportPhotomap @ 117 - _XieElemImportROI @ 118 - _XieElemArithmetic @ 119 - _XieElemBandCombine @ 120 - _XieElemBandExtract @ 121 - _XieElemBandSelect @ 122 - _XieElemBlend @ 123 - _XieElemCompare @ 124 - _XieElemConstrain @ 125 - _XieElemConvertFromIndex @ 126 - _XieElemConvertFromRGB @ 127 - _XieElemConvertToIndex @ 128 - _XieElemConvertToRGB @ 129 - _XieElemConvolve @ 130 - _XieElemDither @ 131 - _XieElemGeometry @ 132 - _XieElemLogical @ 133 - _XieElemMatchHistogram @ 134 - _XieElemMath @ 135 - _XieElemPasteUp @ 136 - _XieElemPoint @ 137 - _XieElemUnconstrain @ 138 - _XieElemExportClientHistogram @ 139 - _XieElemExportClientLUT @ 140 - _XieElemExportClientPhoto @ 141 - _XieElemExportClientROI @ 142 - _XieElemExportDrawable @ 143 - _XieElemExportDrawablePlane @ 144 - _XieElemExportLUT @ 145 - _XieElemExportPhotomap @ 146 - _XieElemExportROI @ 147 - _XieFloError @ 148 - _XieColorAllocEvent @ 149 - _XieDecodeNotifyEvent @ 150 - _XieExportAvailableEvent @ 151 - _XieImportObscuredEvent @ 152 - _XiePhotofloDoneEvent @ 153 - _XieConvertToIEEE @ 154 - _XieCloseDisplay @ 155 - _XiePrintError @ 156 - _XieTechniqueLength @ 157 - _XieEncodeTechnique @ 158 - _XieColorAllocAllParam @ 159 - _XieColorAllocMatchParam @ 160 - _XieColorAllocRequantizeParam @ 161 - _XieRGBToCIELabParam @ 162 - _XieRGBToYCbCrParam @ 163 - _XieRGBToYCCParam @ 164 - _XieYCbCrToRGBParam @ 165 - _XieYCCToRGBParam @ 166 - _XieCIELabToRGBParam @ 167 - _XieConvolveConstantParam @ 168 - _XieClipScaleParam @ 169 - _XieDecodeUncompressedSingleParam @ 170 - _XieDecodeUncompressedTripleParam @ 171 - _XieDecodeG31DParam @ 172 - _XieDecodeTIFFPackBitsParam @ 173 - _XieDecodeJPEGBaselineParam @ 174 - _XieDitherOrderedParam @ 175 - _XieEncodeUncompressedSingleParam @ 176 - _XieEncodeUncompressedTripleParam @ 177 - _XieEncodeG31DParam @ 178 - _XieEncodeTIFFPackBitsParam @ 179 - _XieEncodeServerChoiceParam @ 180 - _XieEncodeG32DParam @ 181 - _XieEncodeG42DParam @ 182 - _XieEncodeJPEGBaselineParam @ 183 - _XieEncodeJPEGLosslessParam @ 184 - _XieEncodeTIFF2Param @ 185 - _XieGeomAntialiasByAreaParam @ 186 - _XieGeomAntialiasByLowpassParam @ 187 - _XieGeomGaussianParam @ 188 - _XieGeomNearestNeighborParam @ 189 - _XieHistogramGaussianParam @ 190 - _XieHistogramHyperbolicParam @ 191 - _XieWhiteAdjustCIELabShiftParam @ 192 - _XieInitTechFuncTable @ 193 - _XieRegisterTechFunc @ 194 - _XieLookupTechFunc @ 195 - _XieExtInfoHeader @ 196 - _XieElemFuncs @ 197 - _XieTechFuncsInitialized @ 198 - _XieTechFuncs @ 199 Index: xc/lib/XIE/XIEos2.rsp diff -u xc/lib/XIE/XIEos2.rsp:3.2 xc/lib/XIE/XIEos2.rsp:removed --- xc/lib/XIE/XIEos2.rsp:3.2 Fri May 10 02:55:13 1996 +++ xc/lib/XIE/XIEos2.rsp Thu Feb 27 12:27:09 2003 @@ -1,5 +0,0 @@ -abort.obj await.obj clientdata.obj colorlist.obj conven.obj elements.obj+ -errors.obj events.obj free.obj ieee.obj init.obj lut.obj photoflo.obj+ -photomap.obj photospace.obj roi.obj technique.obj utils.obj /NOI /NOL /NOD /BAT -XIE.dll -XIE.map Index: xc/lib/XIE/globals.h diff -u xc/lib/XIE/globals.h:1.5 xc/lib/XIE/globals.h:1.6 --- xc/lib/XIE/globals.h:1.5 Fri Dec 14 14:54:33 2001 +++ xc/lib/XIE/globals.h Fri May 31 14:45:43 2002 @@ -27,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/globals.h,v 1.5 2001/12/14 19:54:33 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/globals.h,v 1.6 2002/05/31 18:45:43 dawes Exp $ */ extern void _XieElemImportClientLUT (char **, XiePhotoElement *); extern void _XieElemImportClientPhoto (char **, XiePhotoElement *); @@ -113,7 +113,7 @@ }; -#ifndef __EMX__ +#ifndef __UNIXOS2__ XieTechFuncRec *_XieTechFuncs[xieValMaxTechGroup]; #else XieTechFuncRec *_XieTechFuncs[xieValMaxTechGroup] = {0}; Index: xc/lib/XRes/Imakefile diff -u /dev/null xc/lib/XRes/Imakefile:1.2 --- /dev/null Thu Feb 27 12:27:11 2003 +++ xc/lib/XRes/Imakefile Tue Oct 15 20:37:26 2002 @@ -0,0 +1,28 @@ +XCOMM $XFree86: xc/lib/XRes/Imakefile,v 1.2 2002/10/16 00:37:26 dawes Exp $ + +#define DoNormalLib NormalLibXRes +#define DoSharedLib SharedLibXRes +#define DoDebugLib DebugLibXRes +#define DoProfileLib ProfileLibXRes +#define LibName XRes +#define SoRev SOXRESREV +#define LibHeaders NO + +#include + +#ifdef SharedXResReqs +REQUIREDLIBS = SharedXResReqs +#endif + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + + DEFINES = $(ALLOC_DEFINES) + SRCS = XRes.c + OBJS = XRes.o + LINTLIBS = $(LINTXLIB) + +#include + +DependTarget() Index: xc/lib/XRes/XRes.c diff -u /dev/null xc/lib/XRes/XRes.c:1.4 --- /dev/null Thu Feb 27 12:27:11 2003 +++ xc/lib/XRes/XRes.c Tue Oct 15 20:37:26 2002 @@ -0,0 +1,230 @@ +/* + Copyright (c) 2002 XFree86 Inc +*/ +/* $XFree86: xc/lib/XRes/XRes.c,v 1.4 2002/10/16 00:37:26 dawes Exp $ */ + +#define NEED_EVENTS +#define NEED_REPLIES +#include +#include +#include +#include +#include +#include +#include + + +static XExtensionInfo _xres_ext_info_data; +static XExtensionInfo *xres_ext_info = &_xres_ext_info_data; +static char *xres_extension_name = XRES_NAME; + +#define XResCheckExtension(dpy,i,val) \ + XextCheckExtension (dpy, i, xres_extension_name, val) + +static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xres_ext_info) + +static XExtensionHooks xres_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + close_display, /* close_display */ + NULL, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ +}; + +static XEXT_GENERATE_FIND_DISPLAY (find_display, xres_ext_info, + xres_extension_name, + &xres_extension_hooks, + 0, NULL) + +Bool XResQueryExtension ( + Display *dpy, + int *event_basep, + int *error_basep +) +{ + XExtDisplayInfo *info = find_display (dpy); + + if (XextHasExtension(info)) { + *event_basep = info->codes->first_event; + *error_basep = info->codes->first_error; + return True; + } else { + return False; + } +} + +Status XResQueryVersion( + Display *dpy, + int *major_versionp, + int *minor_versionp +) +{ + XExtDisplayInfo *info = find_display (dpy); + xXResQueryVersionReply rep; + xXResQueryVersionReq *req; + + XResCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (XResQueryVersion, req); + req->reqType = info->codes->major_opcode; + req->XResReqType = X_XResQueryVersion; + req->client_major = XRES_MAJOR_VERSION; + req->client_minor = XRES_MINOR_VERSION; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + *major_versionp = rep.server_major; + *minor_versionp = rep.server_minor; + UnlockDisplay (dpy); + SyncHandle (); + return 1; +} + + +Status XResQueryClients ( + Display *dpy, + int *num_clients, + XResClient **clients +) +{ + XExtDisplayInfo *info = find_display (dpy); + xXResQueryClientsReq *req; + xXResQueryClientsReply rep; + XResClient *clnts; + int result = 0; + + *num_clients = 0; + *clients = NULL; + + XResCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (XResQueryClients, req); + req->reqType = info->codes->major_opcode; + req->XResReqType = X_XResQueryClients; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + + if(rep.num_clients) { + if((clnts = Xmalloc(sizeof(XResClient) * rep.num_clients))) { + xXResClient scratch; + int i; + + for(i = 0; i < rep.num_clients; i++) { + _XRead(dpy, (char*)&scratch, sz_xXResClient); + clnts[i].resource_base = scratch.resource_base; + clnts[i].resource_mask = scratch.resource_mask; + } + *clients = clnts; + *num_clients = rep.num_clients; + result = 1; + } else { + _XEatData(dpy, rep.length << 2); + } + } + + UnlockDisplay (dpy); + SyncHandle (); + return result; +} + +Status XResQueryClientResources ( + Display *dpy, + XID xid, + int *num_types, + XResType **types +) +{ + XExtDisplayInfo *info = find_display (dpy); + xXResQueryClientResourcesReq *req; + xXResQueryClientResourcesReply rep; + XResType *typs; + int result = 0; + + *num_types = 0; + *types = NULL; + + XResCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (XResQueryClientResources, req); + req->reqType = info->codes->major_opcode; + req->XResReqType = X_XResQueryClientResources; + req->xid = xid; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + + if(rep.num_types) { + if((typs = Xmalloc(sizeof(XResType) * rep.num_types))) { + xXResType scratch; + int i; + + for(i = 0; i < rep.num_types; i++) { + _XRead(dpy, (char*)&scratch, sz_xXResType); + typs[i].resource_type = scratch.resource_type; + typs[i].count = scratch.count; + } + *types = typs; + *num_types = rep.num_types; + result = 1; + } else { + _XEatData(dpy, rep.length << 2); + } + } + + UnlockDisplay (dpy); + SyncHandle (); + return result; +} + +Status XResQueryClientPixmapBytes ( + Display *dpy, + XID xid, + unsigned long *bytes +) +{ + XExtDisplayInfo *info = find_display (dpy); + xXResQueryClientPixmapBytesReq *req; + xXResQueryClientPixmapBytesReply rep; + + *bytes = 0; + + XResCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (XResQueryClientPixmapBytes, req); + req->reqType = info->codes->major_opcode; + req->XResReqType = X_XResQueryClientPixmapBytes; + req->xid = xid; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + +#ifdef LONG64 + *bytes = (rep.bytes_overflow * 4294967295) + rep.bytes; +#else + *bytes = rep.bytes_overflow ? 0xffffffff : rep.bytes; +#endif + + UnlockDisplay (dpy); + SyncHandle (); + return 1; +} + Index: xc/lib/XThrStub/UIThrStubs.c diff -u xc/lib/XThrStub/UIThrStubs.c:3.3 xc/lib/XThrStub/UIThrStubs.c:3.4 --- xc/lib/XThrStub/UIThrStubs.c:3.3 Sun Nov 18 16:13:26 2001 +++ xc/lib/XThrStub/UIThrStubs.c Tue Jan 14 21:55:16 2003 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/XThrStub/UIThrStubs.c,v 3.3 2001/11/18 21:13:26 herrb Exp $ + * $XFree86: xc/lib/XThrStub/UIThrStubs.c,v 3.4 2003/01/15 02:55:16 dawes Exp $ * * Copyright (c) 1995 David E. Wexelblat. All rights reserved * @@ -99,6 +99,21 @@ #else #include typedef pthread_t xthread_t; +#if __GNUC__ >= 3 +xthread_t pthread_self() __attribute__ ((weak, alias ("_Xthr_self_stub_"))); +int pthread_mutex_init() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_mutex_destroy() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_mutex_lock() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_mutex_unlock() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_init() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_destroy() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_wait() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_signal() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_cond_broadcast() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_key_create() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +void *pthread_getspecific() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +int pthread_setspecific() __attribute__ ((weak, alias ("_Xthr_zero_stub_"))); +#else /* __GNUC__ */ #pragma weak pthread_self = _Xthr_self_stub_ #pragma weak pthread_mutex_init = _Xthr_zero_stub_ #pragma weak pthread_mutex_destroy = _Xthr_zero_stub_ @@ -113,6 +128,7 @@ #pragma weak pthread_key_create = _Xthr_zero_stub_ #pragma weak pthread_getspecific = _Xthr_zero_stub_ #pragma weak pthread_setspecific = _Xthr_zero_stub_ +#endif /* __GNUC__ */ #if defined(_DECTHREADS_) || defined(linux) #pragma weak pthread_equal = _Xthr_equal_stub_ /* See Xthreads.h! */ int Index: xc/lib/XTrap/XETrapInit.c diff -u xc/lib/XTrap/XETrapInit.c:1.2 xc/lib/XTrap/XETrapInit.c:1.3 --- xc/lib/XTrap/XETrapInit.c:1.2 Wed Nov 7 23:00:12 2001 +++ xc/lib/XTrap/XETrapInit.c Tue Oct 15 20:37:27 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/XTrap/XETrapInit.c,v 1.2 2001/11/08 04:00:12 tsi Exp $ */ +/* $XFree86: xc/lib/XTrap/XETrapInit.c,v 1.3 2002/10/16 00:37:27 dawes Exp $ */ /***************************************************************************** Copyright 1987, 1988, 1989, 1990, 1991, 1992 by Digital Equipment Corp., Maynard, MA @@ -27,7 +27,7 @@ #include #include #include -#include +#include #ifndef XETrapNumberErrors #define XETrapNumberErrors 0 Index: xc/lib/Xau/AuLock.c diff -u xc/lib/Xau/AuLock.c:3.5 xc/lib/Xau/AuLock.c:3.6 --- xc/lib/Xau/AuLock.c:3.5 Fri Dec 14 14:54:36 2001 +++ xc/lib/Xau/AuLock.c Fri May 31 14:45:43 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuLock.c,v 3.5 2001/12/14 19:54:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuLock.c,v 3.6 2002/05/31 18:45:43 dawes Exp $ */ #include #include @@ -42,7 +42,7 @@ #define link rename #endif #endif -#ifdef __EMX__ +#ifdef __UNIXOS2__ #define link rename #endif Index: xc/lib/Xaw/AsciiSink.c diff -u xc/lib/Xaw/AsciiSink.c:1.27 xc/lib/Xaw/AsciiSink.c:1.28 --- xc/lib/Xaw/AsciiSink.c:1.27 Fri Jan 4 18:04:17 2002 +++ xc/lib/Xaw/AsciiSink.c Sat Sep 7 22:29:47 2002 @@ -46,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiSink.c,v 1.27 2002/01/04 23:04:17 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSink.c,v 1.28 2002/09/08 02:29:47 paulo Exp $ */ #include #include @@ -532,6 +532,7 @@ while (pos < to) { paint = XtNew(XawTextPaintStruct); paint->next = sink->text_sink.paint->paint; + sink->text_sink.paint->paint = paint; paint->x = x; paint->y = y + ascent; paint->property = NULL; @@ -623,22 +624,21 @@ } } + paint->width = segment.x2 - segment.x1; x = segment.x1 = segment.x2; - paint->width = x - segment.x1; if (paint->length == 0) { paint->x = x; continue; } paint->text = XtRealloc(paint->text, paint->length); - - sink->text_sink.paint->paint = paint; - + property = paint->property; paint = XtNew(XawTextPaintStruct); paint->next = sink->text_sink.paint->paint; + sink->text_sink.paint->paint = paint; paint->x = x; paint->y = y + ascent; - paint->property = sink->text_sink.paint->paint->property; + paint->property = property; paint->max_ascent = ascent; paint->max_descent = descent; paint->backtabs = NULL; @@ -694,7 +694,6 @@ } paint->width = x - segment.x1; - sink->text_sink.paint->paint = paint; } xr = x; Index: xc/lib/Xaw/AsciiSrc.c diff -u xc/lib/Xaw/AsciiSrc.c:1.30 xc/lib/Xaw/AsciiSrc.c:1.34 --- xc/lib/Xaw/AsciiSrc.c:1.30 Fri Dec 14 14:54:38 2001 +++ xc/lib/Xaw/AsciiSrc.c Thu Nov 21 11:22:52 2002 @@ -26,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xaw/AsciiSrc.c,v 1.30 2001/12/14 19:54:38 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSrc.c,v 1.34 2002/11/21 16:22:52 paulo Exp $ */ /* * AsciiSrc.c - AsciiSrc object. (For use with the text widget). @@ -329,6 +329,9 @@ #endif src->ascii_src.allocated_string = False; + if (src->ascii_src.use_string_in_place && src->ascii_src.string == NULL) + src->ascii_src.use_string_in_place = False; + file = InitStringOrFile(src, src->ascii_src.type == XawAsciiFile); LoadPieces(src, file, NULL); @@ -342,7 +345,7 @@ * * Parameters: * w - AsciiSource widget - * pos - position of the text to retreive. + * pos - position of the text to retreive. * text - text block that will contain returned text * length - maximum number of characters to read * @@ -350,7 +353,7 @@ * This function reads the source. * * Returns: - * The number of characters read into the buffer + * The character position following the retrieved text. */ static XawTextPosition ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length) @@ -417,7 +420,7 @@ text->firstPos = pos; text->ptr = piece->text + (pos - start); count = piece->used - (pos - start); - text->length = (length > count) ? count : length; + text->length = Max(0, (length > count) ? count : length); text->format = XawFmt8Bit; return (pos + text->length); @@ -1405,7 +1408,6 @@ const char *fdopen_mode = NULL; int fd; FILE *file; - char fileName[TMPSIZ]; if (src->ascii_src.type == XawAsciiString) { if (src->ascii_src.string == NULL) @@ -1418,6 +1420,7 @@ } if (src->ascii_src.use_string_in_place) { + if (src->ascii_src.string != NULL) src->ascii_src.length = strlen(src->ascii_src.string); /* In case the length resource is incorrectly set */ if (src->ascii_src.length > src->ascii_src.ascii_length) @@ -1449,11 +1452,8 @@ case XawtextAppend: case XawtextEdit: if (src->ascii_src.string == NULL) { - src->ascii_src.string = fileName; - (void)tmpnam(src->ascii_src.string); + src->ascii_src.string = "*ascii-src*"; src->ascii_src.is_tempfile = True; - open_mode = O_WRONLY | O_CREAT | O_EXCL; - fdopen_mode = "w"; } else { /* O_NOFOLLOW is a FreeBSD & Linux extension */ @@ -1472,11 +1472,8 @@ NULL, NULL); } - /* Allocate new memory for the temp filename, because it is held in - * a stack variable, not static memory. This widget does not need - * to keep the private state field is_tempfile -- it is only accessed - * in this routine, and its former setting is unused - */ + /* If is_tempfile, allocate a private copy of the text + * Unlikely to be changed, just to set allocated_string */ if (newString || src->ascii_src.is_tempfile) { src->ascii_src.string = XtNewString(src->ascii_src.string); src->ascii_src.allocated_string = True; @@ -1777,15 +1774,15 @@ static void GetDefaultPieceSize(Widget w, int offset, XrmValue *value) { - static int pagesize; + static XPointer pagesize; if (pagesize == 0) { - pagesize = _XawGetPageSize(); - if (pagesize < BUFSIZ) - pagesize = BUFSIZ; + pagesize = (XPointer)((long)_XawGetPageSize()); + if (pagesize < (XPointer)BUFSIZ) + pagesize = (XPointer)BUFSIZ; } - value->addr = (XtPointer)&pagesize; + value->addr = (XPointer)&pagesize; } #if (defined(ASCII_STRING) || defined(ASCII_DISK)) Index: xc/lib/Xaw/Command.c diff -u xc/lib/Xaw/Command.c:1.14 xc/lib/Xaw/Command.c:1.15 --- xc/lib/Xaw/Command.c:1.14 Thu Dec 27 16:17:54 2001 +++ xc/lib/Xaw/Command.c Thu Jul 4 13:04:20 2002 @@ -46,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Command.c,v 1.14 2001/12/27 21:17:54 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/Command.c,v 1.15 2002/07/04 17:04:20 paulo Exp $ */ /* * Command.c - Command button widget @@ -65,6 +65,7 @@ #define DEFAULT_HIGHLIGHT_THICKNESS 2 #define DEFAULT_SHAPE_HIGHLIGHT 32767 +#define STR_EQUAL(str1, str2) (str1 == str2 || strcmp(str1, str2) == 0) /* * Class Methods @@ -76,6 +77,7 @@ static void XawCommandResize(Widget); static void XawCommandRedisplay(Widget, XEvent*, Region); static Boolean XawCommandSetValues(Widget, Widget, Widget, ArgList, Cardinal*); +static void XawCommandGetValuesHook(Widget, ArgList, Cardinal*); static Bool ChangeSensitive(Widget); /* @@ -186,7 +188,7 @@ XawCommandSetValues, /* set_values */ NULL, /* set_values_hook */ XtInheritSetValuesAlmost, /* set_values_almost */ - NULL, /* get_values_hook */ + XawCommandGetValuesHook, /* get_values_hook */ NULL, /* accept_focus */ XtVersion, /* version */ NULL, /* callback_private */ @@ -327,8 +329,8 @@ if (cbw->command.set) return; - cbw->command.set= True; XawCommandToggle(w); + cbw->command.set= True; } /*ARGSUSED*/ @@ -515,7 +517,23 @@ cbw->command.highlighted = HighlightNone; redisplay = True; } - + + if (cbw->command.set) { + unsigned int i; + Pixel foreground, background; + + foreground = oldcbw->label.foreground; + background = oldcbw->core.background_pixel; + for (i = 0; i < *num_args; i++) { + if (STR_EQUAL(args[i].name, XtNforeground)) + background = cbw->label.foreground; + else if (STR_EQUAL(args[i].name, XtNbackground)) + foreground = cbw->core.background_pixel; + } + cbw->label.foreground = foreground; + cbw->core.background_pixel = background; + } + if (oldcbw->label.foreground != cbw->label.foreground || oldcbw->core.background_pixel != cbw->core.background_pixel || oldcbw->command.highlight_thickness @@ -539,6 +557,22 @@ cbw->command.shape_style = oldcbw->command.shape_style; return (redisplay); +} + +static void +XawCommandGetValuesHook(Widget w, ArgList args, Cardinal *num_args) +{ + CommandWidget cbw = (CommandWidget)w; + unsigned int i; + + for (i = 0; i < *num_args; i++) { + if (STR_EQUAL(args[i].name, XtNforeground)) + *((String*)args[i].value) = cbw->command.set ? + (String)cbw->core.background_pixel : (String)cbw->label.foreground; + else if (STR_EQUAL(args[i].name, XtNbackground)) + *((String*)args[i].value) = cbw->command.set ? + (String)cbw->label.foreground : (String)cbw->core.background_pixel; + } } static void Index: xc/lib/Xaw/MultiSrc.c diff -u xc/lib/Xaw/MultiSrc.c:1.24 xc/lib/Xaw/MultiSrc.c:1.29 --- xc/lib/Xaw/MultiSrc.c:1.24 Fri Dec 14 14:54:41 2001 +++ xc/lib/Xaw/MultiSrc.c Fri Dec 6 11:19:57 2002 @@ -27,7 +27,7 @@ * * Much code taken from X11R3 String and Disk Sources. */ -/* $XFree86: xc/lib/Xaw/MultiSrc.c,v 1.24 2001/12/14 19:54:41 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSrc.c,v 1.29 2002/12/06 16:19:57 paulo Exp $ */ /* @@ -298,6 +298,9 @@ #endif src->multi_src.allocated_string = False; + if (src->multi_src.use_string_in_place && src->multi_src.string == NULL) + src->multi_src.use_string_in_place = False; + file = InitStringOrFile(src, src->multi_src.type == XawAsciiFile); LoadPieces(src, file, NULL); @@ -320,7 +323,7 @@ * This function reads the source. * * Returns: - * The number of characters read into the buffer + * The character position following the retrieved text. */ static XawTextPosition ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length) @@ -333,7 +336,7 @@ text->firstPos = pos; text->ptr = (char *)(piece->text + (pos - start)); count = piece->used - (pos - start); - text->length = (length > count) ? count : length; + text->length = Max(0, (length > count) ? count : length); return (pos + text->length); } @@ -1167,7 +1170,6 @@ const char *fdopen_mode = NULL; int fd; FILE *file; - char fileName[TMPSIZ]; Display *d = XtDisplayOfObject((Widget)src); if (src->multi_src.type == XawAsciiString) { @@ -1221,13 +1223,8 @@ case XawtextAppend: case XawtextEdit: if (src->multi_src.string == NULL) { - src->multi_src.allocated_string = False; - src->multi_src.string = fileName; - - (void)tmpnam((char *)src->multi_src.string); + src->multi_src.string = "*multi-src*"; src->multi_src.is_tempfile = True; - open_mode = O_WRONLY | O_CREAT | O_EXCL; - fdopen_mode = "w"; } else { /* O_NOFOLLOW is a BSD & Linux extension */ @@ -1245,10 +1242,8 @@ "Read, Append or Edit.", NULL, NULL); } - /* Allocate new memory for the temp filename, because it is held in - * a stack memory buffer. We must verify that all routines that set - * .string first check .allocated_string and free it - plumbing Sheeran. - */ + /* If is_tempfile, allocate a private copy of the text + * Unlikely to be changed, just to set allocated_string */ if (newString || src->multi_src.is_tempfile) { String temp = XtNewString((char *)src->multi_src.string); @@ -1259,7 +1254,7 @@ } if (!src->multi_src.is_tempfile) { - if ((fd = open((char *)src->multi_src.string, open_mode, 0666)) != 0) { + if ((fd = open((char *)src->multi_src.string, open_mode, 0666)) != -1) { if ((file = fdopen(fd, fdopen_mode)) != NULL) { (void)fseek(file, 0, SEEK_END); src->multi_src.length = (XawTextPosition)ftell(file); @@ -1610,13 +1605,13 @@ static void GetDefaultPieceSize(Widget w, int offset, XrmValue *value) { - static int pagesize; + static XPointer pagesize; if (pagesize == 0) { - pagesize = _XawGetPageSize(); - if (pagesize < BUFSIZ) - pagesize = BUFSIZ; + pagesize = (XPointer)((long)_XawGetPageSize()); + if (pagesize < (XPointer)BUFSIZ) + pagesize = (XPointer)BUFSIZ; } - value->addr = (XtPointer)&pagesize; + value->addr = (XPointer)&pagesize; } Index: xc/lib/Xaw/Pixmap.c diff -u xc/lib/Xaw/Pixmap.c:3.16 xc/lib/Xaw/Pixmap.c:3.17 --- xc/lib/Xaw/Pixmap.c:3.16 Tue Jan 30 10:03:34 2001 +++ xc/lib/Xaw/Pixmap.c Fri May 17 22:05:39 2002 @@ -25,7 +25,7 @@ * XFree86 Project. */ -/* $XFree86: xc/lib/Xaw/Pixmap.c,v 3.16 2001/01/30 15:03:34 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/Pixmap.c,v 3.17 2002/05/18 02:05:39 paulo Exp $ */ #include #include @@ -70,6 +70,7 @@ static int bcmp_long(register _Xconst void*, register _Xconst void *); static int qcmp_string(register _Xconst void*, register _Xconst void *); static int bcmp_string(register _Xconst void*, register _Xconst void *); +static void GetResourcePixmapPath(Display*); /* * Initialization @@ -649,9 +650,51 @@ #define PROJECT_ROOT "/usr/X11R6" #endif -static char *pixmap_path = - "%H/%T/%N:%P/include/X11/%T/%N:/usr/X11R6/include/X11/%T/%N:/usr/include/X11/%T/%N:%N"; +static char *pixmap_path = NULL; +static void +GetResourcePixmapPath(Display *display) +{ + XrmName xrm_name[2]; + XrmClass xrm_class[2]; + XrmRepresentation rep_type; + XrmValue value; + static char *default_path = + "%H/%T/%N:%P/include/X11/%T/%N:/usr/X11R6/include/X11/%T/%N:/usr/include/X11/%T/%N:%N"; + + xrm_name[0] = XrmPermStringToQuark("pixmapFilePath"); + xrm_name[1] = NULLQUARK; + xrm_class[0] = XrmPermStringToQuark("PixmapFilePath"); + xrm_class[1] = NULLQUARK; + if (!XrmGetDatabase(display)) + (void) XGetDefault(display, "", ""); + if (XrmQGetResource(XrmGetDatabase(display), xrm_name, xrm_class, + &rep_type, &value) && + rep_type == XrmPermStringToQuark("String")) { + int length = 0; + char *tok, *buffer = XtNewString(value.addr); + + for (tok = strtok(buffer, ":"); tok; tok = strtok(NULL, ":")) { + int toklen = strlen(tok); + + if (toklen) { + pixmap_path = XtRealloc(pixmap_path, length + toklen + 5); + strcpy(pixmap_path + length, tok); + if (length) + pixmap_path[length++] = ':'; + sprintf(pixmap_path + length, "%s/%%N", tok); + length += strlen(tok) + 3; + } + } + pixmap_path = XtRealloc(pixmap_path, length + strlen(default_path) + 2); + if (length) + pixmap_path[length++] = ':'; + strcpy(pixmap_path + length, default_path); + } + else + pixmap_path = default_path; +} + static Bool BitmapLoader(XawParams *params, Screen *screen, Colormap colormap, int depth, Pixmap *pixmap_return, Pixmap *mask_return, @@ -700,6 +743,8 @@ if (!sub[0].substitution) sub[0].substitution = getenv("HOME"); sub[1].substitution = params->name; + if (pixmap_path == NULL) + GetResourcePixmapPath(DisplayOfScreen(screen)); filename = XtFindFile(pixmap_path, sub, XtNumber(sub), NULL); if (!filename) return (FALSE); @@ -900,6 +945,8 @@ if (!sub[0].substitution) sub[0].substitution = getenv("HOME"); sub[1].substitution = params->name; + if (pixmap_path == NULL) + GetResourcePixmapPath(DisplayOfScreen(screen)); filename = XtFindFile(pixmap_path, sub, XtNumber(sub), NULL); if (!filename) return (False); Index: xc/lib/Xaw/Text.c diff -u xc/lib/Xaw/Text.c:3.50 xc/lib/Xaw/Text.c:3.52 --- xc/lib/Xaw/Text.c:3.50 Mon Dec 17 15:29:18 2001 +++ xc/lib/Xaw/Text.c Sun Nov 3 15:10:25 2002 @@ -74,7 +74,7 @@ * XFree86 Project. */ -/* $XFree86: xc/lib/Xaw/Text.c,v 3.50 2001/12/17 20:29:18 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/Text.c,v 3.52 2002/11/03 20:10:25 paulo Exp $ */ #include #include @@ -1372,8 +1372,8 @@ _XawTextNeedsUpdating(ctx, position, end <= position ? position + 1 : end); ctx->text.clear_to_eol = True; + lt->position = position; } - if (lt->y != y) { if (update_from < 0) update_from = line == 0 ? @@ -1381,9 +1381,12 @@ ctx->text.lt.info[line - 1].position; lt->y = y; ctx->text.clear_to_eol = True; + } + if (lt->textWidth != width) { + if (lt->textWidth > width) + ctx->text.clear_to_eol = True; + lt->textWidth = width; } - lt->position = position; - lt->textWidth = width; y += height; if (end > ctx->text.lastPos) { @@ -1425,6 +1428,7 @@ XtRealloc((char *)ctx->text.lt.info, sizeof(XawTextLineTableEntry) * (line + 1)); lt = ctx->text.lt.info + line; + bzero(lt, sizeof(XawTextLineTableEntry)); ++ctx->text.lt.lines; } else Index: xc/lib/Xaw/TextAction.c diff -u xc/lib/Xaw/TextAction.c:3.44 xc/lib/Xaw/TextAction.c:3.46 --- xc/lib/Xaw/TextAction.c:3.44 Fri Jan 4 18:04:17 2002 +++ xc/lib/Xaw/TextAction.c Wed Mar 20 00:06:23 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TextAction.c,v 3.44 2002/01/04 23:04:17 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/TextAction.c,v 3.46 2002/03/20 05:06:23 paulo Exp $ */ #include #include @@ -2911,8 +2911,11 @@ Widget old = focus[i].widget; focus[i].widget = w; - if (old != NULL) + if (old != NULL) { TextFocusOut(old, event, p, n); + /* TextFocusOut may set it to NULL */ + focus[i].widget = w; + } XtAddCallback(w, XtNdestroyCallback, DestroyFocusCallback, (XtPointer)&focus[i]); } @@ -2944,9 +2947,11 @@ || event->xfocus.detail == NotifyPointer) return; - if (i < num_focus && focus[i].widget) + if (i < num_focus && focus[i].widget) { XtRemoveCallback(focus[i].widget, XtNdestroyCallback, DestroyFocusCallback, (XtPointer)&focus[i]); + focus[i].widget = NULL; + } /* Let the input method know focus has left.*/ _XawImUnsetFocus(w); Index: xc/lib/Xaw/TextSink.c diff -u xc/lib/Xaw/TextSink.c:1.20 xc/lib/Xaw/TextSink.c:1.21 --- xc/lib/Xaw/TextSink.c:1.20 Fri Dec 14 14:54:45 2001 +++ xc/lib/Xaw/TextSink.c Mon Jun 3 17:39:24 2002 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TextSink.c,v 1.20 2001/12/14 19:54:45 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSink.c,v 1.21 2002/06/03 21:39:24 paulo Exp $ */ /* * Author: Chris Peterson, MIT X Consortium. @@ -1497,6 +1497,7 @@ XawTextPropertyList *propl, *prev = NULL; XawTextProperty *def_prop = NULL; String str, tok, tmp; + char buffer[BUFSIZ]; if (prop_lists) ptr = (XawTextPropertyList**) bsearch((void*)(long)qname, prop_lists, num_prop_lists, @@ -1545,6 +1546,10 @@ params = XawParseParamsString(tok); ident = XrmStringToQuark(params->name); if (ident == NULLQUARK) { + XmuSnprintf(buffer, sizeof(buffer), + "Bad text property name \"%s\".", params->name); + XtAppWarning(XtDisplayToApplicationContext + (DisplayOfScreen(screen)), buffer); DestroyTextPropertyList(propl); if (prev) prev->next = NULL; @@ -1564,6 +1569,10 @@ if ((prop->font = XLoadQueryFont(DisplayOfScreen(screen), argval->value)) == NULL) { + XmuSnprintf(buffer, sizeof(buffer), + "Cannot load font \"%s\".", argval->value); + XtAppWarning(XtDisplayToApplicationContext + (DisplayOfScreen(screen)), buffer); DestroyTextPropertyList(propl); if (prev) prev->next = NULL; @@ -1579,6 +1588,10 @@ argval->value) { if (!XAllocNamedColor(DisplayOfScreen(screen), colormap, argval->value, &color, &exact)) { + XmuSnprintf(buffer, sizeof(buffer), + "Cannot allocate color \"%s\".", argval->value); + XtAppWarning(XtDisplayToApplicationContext + (DisplayOfScreen(screen)), buffer); DestroyTextPropertyList(propl); if (prev) prev->next = NULL; @@ -1592,6 +1605,10 @@ argval->value) { if (!XAllocNamedColor(DisplayOfScreen(screen), colormap, argval->value, &color, &exact)) { + XmuSnprintf(buffer, sizeof(buffer), + "Cannot allocate color \"%s\".", argval->value); + XtAppWarning(XtDisplayToApplicationContext + (DisplayOfScreen(screen)), buffer); DestroyTextPropertyList(propl); if (prev) prev->next = NULL; Index: xc/lib/Xaw/TextSrc.c diff -u xc/lib/Xaw/TextSrc.c:1.30 xc/lib/Xaw/TextSrc.c:1.34 --- xc/lib/Xaw/TextSrc.c:1.30 Fri Dec 14 14:54:45 2001 +++ xc/lib/Xaw/TextSrc.c Sun Sep 22 03:09:05 2002 @@ -25,7 +25,7 @@ */ -/* $XFree86: xc/lib/Xaw/TextSrc.c,v 1.30 2001/12/14 19:54:45 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSrc.c,v 1.34 2002/09/22 07:09:05 paulo Exp $ */ /* * Author: Chris Peterson, MIT X Consortium. @@ -405,6 +405,9 @@ * * Description: * This function reads the source. + * + * Returns: + * The character position following the retrieved text. */ /*ARGSUSED*/ static XawTextPosition @@ -940,7 +943,8 @@ memcpy(list->left->buffer, undo->left->buffer, size); } ++list->left->length; - XtFree(l_state->buffer); + if (l_state->buffer != SrcNL && l_state->buffer != (char*)SrcWNL) + XtFree(l_state->buffer); } if (src->textSrc.undo->num_list >= UNDO_DEPTH) @@ -1766,6 +1770,10 @@ XawTextAnchor *next, *anchor = _XawTextSourceFindAnchor(w, position); XawTextEntity *entity, *eprev; + /* There is no support for zero length entities for now */ + if (length == 0) + return (NULL); + if (anchor->cache && anchor->position + anchor->cache->offset + anchor->cache->length <= position) eprev = entity = anchor->cache; @@ -1815,6 +1823,15 @@ length, property)); } } + } + + /* Automatically join sequential entities if possible */ + if (eprev && + anchor->position + eprev->offset + eprev->length == position && + eprev->property == property && eprev->type == type && + eprev->flags == flags && eprev->data == data) { + eprev->length += length; + return (eprev); } entity = XtNew(XawTextEntity); Index: xc/lib/Xaw/TextSrc.h diff -u xc/lib/Xaw/TextSrc.h:1.12 xc/lib/Xaw/TextSrc.h:1.13 --- xc/lib/Xaw/TextSrc.h:1.12 Fri Dec 14 14:54:45 2001 +++ xc/lib/Xaw/TextSrc.h Sat Feb 9 21:40:08 2002 @@ -48,7 +48,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextSrc.h,v 1.12 2001/12/14 19:54:45 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSrc.h,v 1.13 2002/02/10 02:40:08 paulo Exp $ */ #ifndef _XawTextSrc_h #define _XawTextSrc_h Index: xc/lib/Xaw/Vendor.c diff -u xc/lib/Xaw/Vendor.c:1.8 xc/lib/Xaw/Vendor.c:1.9 --- xc/lib/Xaw/Vendor.c:1.8 Fri Dec 14 14:54:45 2001 +++ xc/lib/Xaw/Vendor.c Fri May 31 14:45:44 2002 @@ -46,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Vendor.c,v 1.8 2001/12/14 19:54:45 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Vendor.c,v 1.9 2002/05/31 18:45:44 dawes Exp $ */ /* * This is a copy of Xt/Vendor.c with an additional ClassInitialize @@ -111,7 +111,7 @@ * ***************************************************************************/ -#ifdef __EMX__ +#ifdef __UNIXOS2__ /* to fix the EditRes problem because of wrong linker semantics */ extern WidgetClass vendorShellWidgetClass; /* from Xt/Vendor.c */ extern VendorShellClassRec _XawVendorShellClassRec; @@ -193,7 +193,7 @@ } }; -#ifndef __EMX__ +#ifndef __UNIXOS2__ externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = (WidgetClass) (&vendorShellClassRec); #endif @@ -337,7 +337,7 @@ } } -#if defined(__osf__) || defined(__EMX__) +#if defined(__osf__) || defined(__UNIXOS2__) /* stupid OSF/1 shared libraries have the wrong semantics */ /* symbols do not get resolved external to the shared library */ void _XawFixupVendorShell() Index: xc/lib/Xaw/Xaw-def.cpp diff -u xc/lib/Xaw/Xaw-def.cpp:1.1.1.2 xc/lib/Xaw/Xaw-def.cpp:1.2 --- xc/lib/Xaw/Xaw-def.cpp:1.1.1.2 Tue Jan 16 17:18:45 2001 +++ xc/lib/Xaw/Xaw-def.cpp Fri May 31 14:45:44 2002 @@ -60,8 +60,10 @@ toggleWidgetClass DATA treeClassRec DATA treeWidgetClass DATA +#ifndef __UNIXOS2__ vendorShellClassRec DATA vendorShellWidgetClass DATA +#endif viewportClassRec DATA viewportWidgetClass DATA XawAsciiSave @@ -131,4 +133,24 @@ XawViewportSetLocation XawWidgetArray XawWidgetCount +#ifdef __UNIXOS2__ /* xconsole */ + _XawTextGetSTRING + XawTextSourceAddEntity + XawTextSourceAnchorAndEntity + XawTextSourceNextAnchor + XawTextSourcePrevAnchor + XawTextSourceFindAnchor + _XawTextShowPosition + _XawTextSrcUndo + XawTextSinkConvertPropertyList + XawTextGetSink + _XawTextBuildLineTable + XawTextSourceClearEntities + _XawTextNeedsUpdating + XawTextSinkCopyProperty + XawTextSinkGetProperty + XawTextSinkCombineProperty + XawTextSinkAddProperty +#endif /* $Xorg: Xaw-def.cpp,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ +/* $XFree86: xc/lib/Xaw/Xaw-def.cpp,v 1.2 2002/05/31 18:45:44 dawes Exp $ */ Index: xc/lib/Xaw/Xawos2.def diff -u xc/lib/Xaw/Xawos2.def:3.8 xc/lib/Xaw/Xawos2.def:removed --- xc/lib/Xaw/Xawos2.def:3.8 Wed Apr 5 14:13:17 2000 +++ xc/lib/Xaw/Xawos2.def Thu Feb 27 12:27:19 2003 @@ -1,205 +0,0 @@ -LIBRARY Xaw INITINSTANCE TERMINSTANCE -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xaw/Xawos2.def,v 3.8 2000/04/05 18:13:17 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 32768 -EXPORTS - XawAsciiSourceFreeString @ 1 - XawAsciiSave @ 2 - XawAsciiSaveAsFile @ 3 - XawAsciiSourceChanged @ 4 - XawDialogAddButton @ 5 - XawDialogGetValueString @ 6 - XawFormDoLayout @ 7 - XawListChange @ 8 - XawListUnhighlight @ 9 - XawListHighlight @ 10 - XawListShowCurrent @ 11 - XawPanedSetMinMax @ 13 - XawPanedGetMinMax @ 14 - XawPanedSetRefigureMode @ 15 - XawPanedGetNumSub @ 16 - XawScrollbarSetThumb @ 18 - XawSimpleMenuAddGlobalActions @ 19 - XawSimpleMenuGetActiveEntry @ 20 - XawSimpleMenuClearActiveEntry @ 21 - XawTextDisplay @ 22 - XawTextEnableRedisplay @ 23 - XawTextDisableRedisplay @ 24 - XawTextSetSelectionArray @ 25 - XawTextGetSelectionPos @ 26 - XawTextSetSource @ 27 - XawTextReplace @ 28 - XawTextTopPosition @ 29 - XawTextSetInsertionPoint @ 30 - XawTextGetInsertionPoint @ 31 - XawTextUnsetSelection @ 32 - XawTextSetSelection @ 33 - XawTextInvalidate @ 34 - XawTextGetSource @ 35 - XawTextSearch @ 36 - XawTextDisplayCaret @ 37 - XawTextSinkDisplayText @ 38 - XawTextSinkInsertCursor @ 39 - XawTextSinkClearToBackground @ 40 - XawTextSinkFindPosition @ 41 - XawTextSinkFindDistance @ 42 - XawTextSinkResolve @ 43 - XawTextSinkMaxLines @ 44 - XawTextSinkMaxHeight @ 45 - XawTextSinkSetTabs @ 46 - XawTextSinkGetCursorBounds @ 47 - XawTextSourceRead @ 48 - XawTextSourceReplace @ 49 - XawTextSourceScan @ 50 - XawTextSourceSearch @ 51 - XawTextSourceConvertSelection @ 52 - XawTextSourceSetSelection @ 53 - XawToggleChangeRadioGroup @ 54 - XawToggleGetCurrent @ 55 - XawToggleSetCurrent @ 56 - XawToggleUnsetCurrent @ 57 - XawTreeForceLayout @ 58 - XawViewportSetLocation @ 59 - XawViewportSetCoordinates @ 60 - _XawMultiSinkPosToXY @ 61 - _XawMultiSave @ 62 - _XawMultiSaveAsFile @ 63 - _XawMultiSourceFreeString @ 64 - _XawTextFormat @ 65 - _XawTextBuildLineTable @ 66 - _XawTextGetSTRING @ 67 - _XawTextSaltAwaySelection @ 68 - _XawTextPosToXY @ 69 - _XawTextWCToMB @ 70 - _XawTextMBToWC @ 71 - _Xaw_atowc @ 72 - _XawImResizeVendorShell @ 73 - _XawImGetShellHeight @ 74 - _XawImRealize @ 75 - _XawImInitialize @ 76 - _XawImReconnect @ 77 - _XawImRegister @ 78 - _XawImUnregister @ 79 - _XawImSetValues @ 80 - _XawImSetFocusValues @ 82 - _XawImUnsetFocus @ 84 - _XawImWcLookupString @ 85 - _XawImGetImAreaHeight @ 86 - _XawImCallVendorShellExtResize @ 87 - _XawImDestroy @ 88 - _XawTextZapSelection @ 89 - _XawTextInsertFileAction @ 90 - _XawTextInsertFile @ 91 - _XawTextDoSearchAction @ 92 - _XawTextPopdownSearchAction @ 93 - _XawTextSearch @ 94 - _XawTextDoReplaceAction @ 95 - _XawTextSetField @ 96 - asciiSrcObjectClass @ 100 - asciiSrcClassRec @ 101 - dialogWidgetClass @ 102 - dialogClassRec @ 103 - formWidgetClass @ 104 - formClassRec @ 105 - listWidgetClass @ 106 - listClassRec @ 107 - multiSinkObjectClass @ 108 - multiSinkClassRec @ 109 - multiSrcObjectClass @ 110 - multiSrcClassRec @ 111 - panedWidgetClass @ 112 - panedClassRec @ 113 - scrollbarWidgetClass @ 114 - scrollbarClassRec @ 115 - simpleMenuWidgetClass @ 116 - simpleMenuClassRec @ 117 - FMT8BIT @ 118 - XawFmt8Bit @ 119 - XawFmtWide @ 120 - _XawTextActionsTable @ 121 - _XawTextActionsTableCount @ 122 - textWidgetClass @ 123 - textClassRec @ 124 - textSinkObjectClass @ 125 - textSinkClassRec @ 126 - toggleWidgetClass @ 127 - toggleClassRec @ 128 - treeWidgetClass @ 129 - treeClassRec @ 130 - viewportWidgetClass @ 131 - viewportClassRec @ 132 - menuButtonClassRec @ 133 - menuButtonWidgetClass @ 134 - smeBSBClassRec @ 135 - smeBSBObjectClass @ 136 - smeLineClassRec @ 137 - smeLineObjectClass @ 138 - labelClassRec @ 139 - labelWidgetClass @ 140 - commandClassRec @ 141 - commandWidgetClass @ 142 - boxClassRec @ 143 - boxWidgetClass @ 144 - simpleClassRec @ 145 - simpleWidgetClass @ 146 - XawInitializeWidgetSet @ 147 - asciiTextClassRec @ 148 - asciiTextWidgetClass @ 149 - portholeClassRec @ 150 - portholeWidgetClass @ 151 - pannerClassRec @ 152 - pannerWidgetClass @ 153 - textSrcClassRec @ 154 - textSrcObjectClass @ 155 - gripWidgetClass @ 156 - XawWidgetArray @ 157 - XawWidgetCount @ 158 - XawPanedAllowResize @ 159 - _XawTextNeedsUpdating @ 160 - _XawTextGetText @ 161 - _XawTextSetScrollBars @ 162 - _XawTextVScroll @ 163 - _XawTextReplace @ 164 - _XawTextClearAndCenterDisplay @ 165 - _XawTextCheckResize @ 166 - _XawTextSelectionList @ 167 - _XawTextSetSelection @ 168 - _XawTextAlterSelection @ 169 - _XawTextPrepareToUpdate @ 170 - _XawTextShowPosition @ 171 - _XawTextExecuteUpdate @ 172 - XawVendorShellExtResize @ 173 - asciiSinkClassRec @ 174 - asciiSinkObjectClass @ 175 - gripClassRec @ 176 - vPanedWidgetClass @ 177 - repeaterClassRec @ 178 - repeaterWidgetClass @ 179 - smeClassRec @ 180 - smeObjectClass @ 181 - stripChartClassRec @ 182 - stripChartWidgetClass @ 183 -; _XawDefaultTextTranslations1 @ 184 -; _XawDefaultTextTranslations2 @ 185 -; _XawDefaultTextTranslations3 @ 186 -; vendorShellClassRec @ 187 - _XawVendorShellClassRec @ 187 -; vendorShellWidgetClass @ 188 -; _XawDefaultTextTranslations4 @ 189 - _XawDefaultTextTranslations @ 190 - _XawTextSrcUndo @ 191 - tipClassRec @ 192 - tipWidgetClass @ 193 - XawTipEnable @ 194 - XawTipDisable @ 195 - XawTextSinkConvertPropertyList @ 196 - XawTextGetSink @ 197 - XawTextSourceClearEntities @ 198 - XawTextSourceFindAnchor @ 199 - XawTextSourcePrevAnchor @ 200 - XawTextSourceNextAnchor @ 201 - XawTextSourceAnchorAndEntity @ 202 - XawTextSourceAddEntity @ 203 Index: xc/lib/Xaw/Xawos2.rsp diff -u xc/lib/Xaw/Xawos2.rsp:3.6 xc/lib/Xaw/Xawos2.rsp:removed --- xc/lib/Xaw/Xawos2.rsp:3.6 Wed Apr 5 14:13:17 2000 +++ xc/lib/Xaw/Xawos2.rsp Thu Feb 27 12:27:19 2003 @@ -1,10 +0,0 @@ -Actions.obj AllWidgets.obj AsciiSink.obj AsciiSrc.obj AsciiText.obj Box.obj+ -Command.obj Converters.obj Dialog.obj DisplayList.obj Form.obj Grip.obj+ -Label.obj List.obj MenuButton.obj MultiSink.obj MultiSrc.obj OS.obj Paned.obj+ -Panner.obj Pixmap.obj Porthole.obj Repeater.obj Scrollbar.obj Simple.obj+ -SimpleMenu.obj Sme.obj SmeBSB.obj SmeLine.obj StripChart.obj Text.obj+ -TextAction.obj TextPop.obj TextSink.obj TextSrc.obj TextTr.obj Tip.obj+ -Toggle.obj Tree.obj Vendor.obj Viewport.obj XawI18n.obj XawIm.obj+ -XawInit.obj +/NOI /NOL /NOD /BAT -Xaw.dll -Xaw.map Index: xc/lib/Xaw6/Imakefile diff -u xc/lib/Xaw6/Imakefile:1.2 xc/lib/Xaw6/Imakefile:1.3 --- xc/lib/Xaw6/Imakefile:1.2 Sun Jun 6 10:05:55 1999 +++ xc/lib/Xaw6/Imakefile Fri May 31 14:45:44 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xaw6/Imakefile,v 1.2 1999/06/06 14:05:55 dawes Exp $ +XCOMM $XFree86: xc/lib/Xaw6/Imakefile,v 1.3 2002/05/31 18:45:44 dawes Exp $ #define DoNormalLib NormalLibXaw6 #define DoSharedLib SharedLibXaw6 #define DoExtraLib SharedLibXaw6 @@ -111,7 +111,7 @@ Viewport.o \ XawIm.o \ XawI18n.o \ - XawInit.o + XawInit.o $(OSOBJS) INCLUDES = -I$(AWIDGETSRC) Index: xc/lib/Xaw6/Xaw-def.cpp diff -u /dev/null xc/lib/Xaw6/Xaw-def.cpp:1.1 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xaw6/Xaw-def.cpp Fri May 31 14:45:44 2002 @@ -0,0 +1,144 @@ +LIBRARY Xaw +VERSION LIBRARY_VERSION +EXPORTS + asciiSinkClassRec DATA + asciiSinkObjectClass DATA + asciiSrcClassRec DATA + asciiSrcObjectClass DATA + asciiTextClassRec DATA + asciiTextWidgetClass DATA + boxClassRec DATA + boxWidgetClass DATA + commandClassRec DATA + commandWidgetClass DATA + dialogClassRec DATA + dialogWidgetClass DATA + FMT8BIT DATA + formClassRec DATA + formWidgetClass DATA + gripClassRec DATA + gripWidgetClass DATA + labelClassRec DATA + labelWidgetClass DATA + listClassRec DATA + listWidgetClass DATA + menuButtonClassRec DATA + menuButtonWidgetClass DATA + multiSinkClassRec DATA + multiSinkObjectClass DATA + multiSrcClassRec DATA + multiSrcObjectClass DATA + panedClassRec DATA + panedWidgetClass DATA + pannerClassRec DATA + pannerWidgetClass DATA + portholeClassRec DATA + portholeWidgetClass DATA + repeaterClassRec DATA + repeaterWidgetClass DATA + scrollbarClassRec DATA + scrollbarWidgetClass DATA + simpleClassRec DATA + simpleMenuClassRec DATA + simpleMenuWidgetClass DATA + simpleWidgetClass DATA + smeBSBClassRec DATA + smeBSBObjectClass DATA + smeClassRec DATA + smeLineClassRec DATA + smeLineObjectClass DATA + smeObjectClass DATA + stripChartClassRec DATA + stripChartWidgetClass DATA + textClassRec DATA + textSinkClassRec DATA + textSinkObjectClass DATA + textSrcClassRec DATA + textSrcObjectClass DATA + textWidgetClass DATA + toggleClassRec DATA + toggleWidgetClass DATA + treeClassRec DATA + treeWidgetClass DATA +#ifndef __UNIXOS2__ + vendorShellClassRec DATA + vendorShellWidgetClass DATA +#endif + viewportClassRec DATA + viewportWidgetClass DATA + XawAsciiSave + XawAsciiSaveAsFile + XawAsciiSourceChanged + XawAsciiSourceFreeString + XawDialogAddButton + XawDialogGetValueString + XawFmt8Bit + XawFmtWide + XawFormDoLayout + XawInitializeWidgetSet + XawListChange + XawListHighlight + XawListShowCurrent + XawListUnhighlight + XawPanedAllowResize + XawPanedGetMinMax + XawPanedGetNumSub + XawPanedSetMinMax + XawPanedSetRefigureMode + XawScrollbarSetThumb + XawSimpleMenuAddGlobalActions + XawSimpleMenuClearActiveEntry + XawSimpleMenuGetActiveEntry + XawTextDisableRedisplay + XawTextDisplay + XawTextDisplayCaret + XawTextEnableRedisplay + XawTextGetInsertionPoint + XawTextGetSelectionPos + XawTextGetSource + XawTextInvalidate + XawTextReplace + XawTextSearch + XawTextSetInsertionPoint + XawTextSetSelection + XawTextSetSelectionArray + XawTextSetSource + XawTextSinkClearToBackground + XawTextSinkDisplayText + XawTextSinkFindDistance + XawTextSinkFindPosition + XawTextSinkGetCursorBounds + XawTextSinkInsertCursor + XawTextSinkMaxHeight + XawTextSinkMaxLines + XawTextSinkResolve + XawTextSinkSetTabs + XawTextSourceConvertSelection + XawTextSourceRead + XawTextSourceReplace + XawTextSourceScan + XawTextSourceSearch + XawTextSourceSetSelection + XawTextTopPosition + XawTextUnsetSelection + XawToggleChangeRadioGroup + XawToggleGetCurrent + XawToggleSetCurrent + XawToggleUnsetCurrent + XawTreeForceLayout + xawvendorShellExtClassRec + XawVendorShellExtResize + xawvendorShellExtWidgetClass + XawViewportSetCoordinates + XawViewportSetLocation + XawWidgetArray + XawWidgetCount +#ifdef __UNIXOS2__ /* xconsole */ + _XawTextGetSTRING + _XawTextShowPosition + XawTextGetSink + _XawTextBuildLineTable + _XawTextNeedsUpdating +#endif +/* $Xorg: Xaw-def.cpp,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ +/* $XFree86: xc/lib/Xaw6/Xaw-def.cpp,v 1.1 2002/05/31 18:45:44 dawes Exp $ */ Index: xc/lib/Xaw6/Xaw6os2.def diff -u xc/lib/Xaw6/Xaw6os2.def:1.1 xc/lib/Xaw6/Xaw6os2.def:removed --- xc/lib/Xaw6/Xaw6os2.def:1.1 Wed Apr 5 14:13:18 2000 +++ xc/lib/Xaw6/Xaw6os2.def Thu Feb 27 12:27:20 2003 @@ -1,205 +0,0 @@ -LIBRARY Xaw6 INITINSTANCE TERMINSTANCE -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xaw6/Xaw6os2.def,v 1.1 2000/04/05 18:13:18 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 32768 -EXPORTS - XawAsciiSourceFreeString @ 1 - XawAsciiSave @ 2 - XawAsciiSaveAsFile @ 3 - XawAsciiSourceChanged @ 4 - XawDialogAddButton @ 5 - XawDialogGetValueString @ 6 - XawFormDoLayout @ 7 - XawListChange @ 8 - XawListUnhighlight @ 9 - XawListHighlight @ 10 - XawListShowCurrent @ 11 - XawPanedSetMinMax @ 13 - XawPanedGetMinMax @ 14 - XawPanedSetRefigureMode @ 15 - XawPanedGetNumSub @ 16 - XawScrollbarSetThumb @ 18 - XawSimpleMenuAddGlobalActions @ 19 - XawSimpleMenuGetActiveEntry @ 20 - XawSimpleMenuClearActiveEntry @ 21 - XawTextDisplay @ 22 - XawTextEnableRedisplay @ 23 - XawTextDisableRedisplay @ 24 - XawTextSetSelectionArray @ 25 - XawTextGetSelectionPos @ 26 - XawTextSetSource @ 27 - XawTextReplace @ 28 - XawTextTopPosition @ 29 - XawTextSetInsertionPoint @ 30 - XawTextGetInsertionPoint @ 31 - XawTextUnsetSelection @ 32 - XawTextSetSelection @ 33 - XawTextInvalidate @ 34 - XawTextGetSource @ 35 - XawTextSearch @ 36 - XawTextDisplayCaret @ 37 - XawTextSinkDisplayText @ 38 - XawTextSinkInsertCursor @ 39 - XawTextSinkClearToBackground @ 40 - XawTextSinkFindPosition @ 41 - XawTextSinkFindDistance @ 42 - XawTextSinkResolve @ 43 - XawTextSinkMaxLines @ 44 - XawTextSinkMaxHeight @ 45 - XawTextSinkSetTabs @ 46 - XawTextSinkGetCursorBounds @ 47 - XawTextSourceRead @ 48 - XawTextSourceReplace @ 49 - XawTextSourceScan @ 50 - XawTextSourceSearch @ 51 - XawTextSourceConvertSelection @ 52 - XawTextSourceSetSelection @ 53 - XawToggleChangeRadioGroup @ 54 - XawToggleGetCurrent @ 55 - XawToggleSetCurrent @ 56 - XawToggleUnsetCurrent @ 57 - XawTreeForceLayout @ 58 - XawViewportSetLocation @ 59 - XawViewportSetCoordinates @ 60 - _XawMultiSinkPosToXY @ 61 - _XawMultiSave @ 62 - _XawMultiSaveAsFile @ 63 - _XawMultiSourceFreeString @ 64 - _XawTextFormat @ 65 - _XawTextBuildLineTable @ 66 - _XawTextGetSTRING @ 67 - _XawTextSaltAwaySelection @ 68 - _XawTextPosToXY @ 69 - _XawTextWCToMB @ 70 - _XawTextMBToWC @ 71 - _Xaw_atowc @ 72 - _XawImResizeVendorShell @ 73 - _XawImGetShellHeight @ 74 - _XawImRealize @ 75 - _XawImInitialize @ 76 - _XawImReconnect @ 77 - _XawImRegister @ 78 - _XawImUnregister @ 79 - _XawImSetValues @ 80 - _XawImSetFocusValues @ 82 - _XawImUnsetFocus @ 84 - _XawImWcLookupString @ 85 - _XawImGetImAreaHeight @ 86 - _XawImCallVendorShellExtResize @ 87 - _XawImDestroy @ 88 - _XawTextZapSelection @ 89 - _XawTextInsertFileAction @ 90 - _XawTextInsertFile @ 91 - _XawTextDoSearchAction @ 92 - _XawTextPopdownSearchAction @ 93 - _XawTextSearch @ 94 - _XawTextDoReplaceAction @ 95 - _XawTextSetField @ 96 - asciiSrcObjectClass @ 100 - asciiSrcClassRec @ 101 - dialogWidgetClass @ 102 - dialogClassRec @ 103 - formWidgetClass @ 104 - formClassRec @ 105 - listWidgetClass @ 106 - listClassRec @ 107 - multiSinkObjectClass @ 108 - multiSinkClassRec @ 109 - multiSrcObjectClass @ 110 - multiSrcClassRec @ 111 - panedWidgetClass @ 112 - panedClassRec @ 113 - scrollbarWidgetClass @ 114 - scrollbarClassRec @ 115 - simpleMenuWidgetClass @ 116 - simpleMenuClassRec @ 117 - FMT8BIT @ 118 - XawFmt8Bit @ 119 - XawFmtWide @ 120 - _XawTextActionsTable @ 121 - _XawTextActionsTableCount @ 122 - textWidgetClass @ 123 - textClassRec @ 124 - textSinkObjectClass @ 125 - textSinkClassRec @ 126 - toggleWidgetClass @ 127 - toggleClassRec @ 128 - treeWidgetClass @ 129 - treeClassRec @ 130 - viewportWidgetClass @ 131 - viewportClassRec @ 132 - menuButtonClassRec @ 133 - menuButtonWidgetClass @ 134 - smeBSBClassRec @ 135 - smeBSBObjectClass @ 136 - smeLineClassRec @ 137 - smeLineObjectClass @ 138 - labelClassRec @ 139 - labelWidgetClass @ 140 - commandClassRec @ 141 - commandWidgetClass @ 142 - boxClassRec @ 143 - boxWidgetClass @ 144 - simpleClassRec @ 145 - simpleWidgetClass @ 146 - XawInitializeWidgetSet @ 147 - asciiTextClassRec @ 148 - asciiTextWidgetClass @ 149 - portholeClassRec @ 150 - portholeWidgetClass @ 151 - pannerClassRec @ 152 - pannerWidgetClass @ 153 - textSrcClassRec @ 154 - textSrcObjectClass @ 155 - gripWidgetClass @ 156 - XawWidgetArray @ 157 - XawWidgetCount @ 158 - XawPanedAllowResize @ 159 - _XawTextNeedsUpdating @ 160 - _XawTextGetText @ 161 - _XawTextSetScrollBars @ 162 - _XawTextVScroll @ 163 - _XawTextReplace @ 164 - _XawTextClearAndCenterDisplay @ 165 - _XawTextCheckResize @ 166 - _XawTextSelectionList @ 167 - _XawTextSetSelection @ 168 - _XawTextAlterSelection @ 169 - _XawTextPrepareToUpdate @ 170 - _XawTextShowPosition @ 171 - _XawTextExecuteUpdate @ 172 - XawVendorShellExtResize @ 173 - asciiSinkClassRec @ 174 - asciiSinkObjectClass @ 175 - gripClassRec @ 176 - vPanedWidgetClass @ 177 - repeaterClassRec @ 178 - repeaterWidgetClass @ 179 - smeClassRec @ 180 - smeObjectClass @ 181 - stripChartClassRec @ 182 - stripChartWidgetClass @ 183 -; _XawDefaultTextTranslations1 @ 184 -; _XawDefaultTextTranslations2 @ 185 -; _XawDefaultTextTranslations3 @ 186 -; vendorShellClassRec @ 187 - _XawVendorShellClassRec @ 187 -; vendorShellWidgetClass @ 188 -; _XawDefaultTextTranslations4 @ 189 - _XawDefaultTextTranslations @ 190 -;newAW _XawTextSrcUndo @ 191 -;newAW tipClassRec @ 192 -;newAW tipWidgetClass @ 193 -;newAW XawTipEnable @ 194 -;newAW XawTipDisable @ 195 -; XawTextSinkConvertPropertyList @ 196 -; XawTextGetSink @ 197 -; XawTextSourceClearEntities @ 198 -; XawTextSourceFindAnchor @ 199 -; XawTextSourcePrevAnchor @ 200 -; XawTextSourceNextAnchor @ 201 -; XawTextSourceAnchorAndEntity @ 202 -; XawTextSourceAddEntity @ 203 Index: xc/lib/Xaw6/Xaw6os2.rsp diff -u xc/lib/Xaw6/Xaw6os2.rsp:1.1 xc/lib/Xaw6/Xaw6os2.rsp:removed --- xc/lib/Xaw6/Xaw6os2.rsp:1.1 Wed Apr 5 14:13:18 2000 +++ xc/lib/Xaw6/Xaw6os2.rsp Thu Feb 27 12:27:20 2003 @@ -1,10 +0,0 @@ -Actions.obj AllWidgets.obj AsciiSink.obj AsciiSrc.obj AsciiText.obj Box.obj+ -Command.obj Converters.obj Dialog.obj DisplayList.obj Form.obj Grip.obj+ -Label.obj List.obj MenuButton.obj MultiSink.obj MultiSrc.obj OS.obj Paned.obj+ -Panner.obj Pixmap.obj Porthole.obj Repeater.obj Scrollbar.obj Simple.obj+ -SimpleMenu.obj Sme.obj SmeBSB.obj SmeLine.obj StripChart.obj Text.obj+ -TextAction.obj TextPop.obj TextSink.obj TextSrc.obj TextTr.obj+ -Toggle.obj Tree.obj Vendor.obj Viewport.obj XawI18n.obj XawIm.obj+ -XawInit.obj +/NOI /NOL /NOD /BAT -Xaw6.dll -Xaw6.map Index: xc/lib/Xcursor/Imakefile diff -u /dev/null xc/lib/Xcursor/Imakefile:1.3 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/Imakefile Thu Sep 26 03:52:01 2002 @@ -0,0 +1,76 @@ +XCOMM $XFree86: xc/lib/Xcursor/Imakefile,v 1.3 2002/09/26 07:52:01 alanh Exp $ + +#ifndef NormalLibXcursor +#define NormalLibXcursor YES +SOXCURSORREV=1.0 +#endif + +#ifndef SharedLibXcursor +#define SharedLibXcursor YES +#endif + +#define DoNormalLib NormalLibXcursor +#define DoSharedLib SharedLibXcursor +#define DoDebugLib DebugLibXcursor +#define DoProfileLib ProfileLibXcursor + +#define LibName Xcursor +#define SoRev SOXCURSORREV +#define IncSubdir X11 +#define IncSubSubdir Xcursor + +#include + +XCURSOR_REVISION=0 + +#ifdef SharedXcursorReqs +REQUIREDLIBS = SharedXcursorReqs +#else +REQUIREDLIBS = $(LDPRELIB) $(XRENDERLIB) +#endif + +ICONDIR=$(LIBDIR)/icons + +DEFINES=-DICONDIR=\"$(ICONDIR)\" + +SRCS = cursor.c display.c file.c library.c xlib.c + +OBJS = cursor.o display.o file.o library.o xlib.o + +HEADERS = Xcursor.h + +SUBSTVARS=prefix="$(PROJECTROOT)" \ + exec_prefix="$(BINDIR)" \ + libdir="$(USRLIBDIR)" \ + includedir="$(INCROOT)" \ + PACKAGE_VERSION="$(SOXCURSORREV).$(XCURSOR_REVISION)" + +#include + +MANSUFFIX=$(LIBMANSUFFIX) +InstallManPage(Xcursor,$(LIBMANDIR)) + +DependTarget() + +all:: xcursor-config.script + +xcursor-config.script: xcursor-config.in + RemoveFile($@) + sh config-subst $(SUBSTVARS) < xcursor-config.in > $@ + +InstallScript(xcursor-config,$(BINDIR)) + +clean:: + RemoveFile(xcursor-config.script) + +all:: xcursor.pc + +xcursor.pc: xcursor.pc.in + RemoveFile($@) + sh config-subst $(SUBSTVARS) < xcursor.pc.in > $@ + +InstallNonExecFile(xcursor.pc,$(USRLIBDIR)/pkgconfig) + +clean:: + RemoveFile(xcursor.pc) + Index: xc/lib/Xcursor/Xcursor-def.cpp diff -u /dev/null xc/lib/Xcursor/Xcursor-def.cpp:1.2 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/Xcursor-def.cpp Mon Sep 30 18:02:17 2002 @@ -0,0 +1,54 @@ +LIBRARY Xcursor +VERSION LIBRARY_VERSION +EXPORTS +XcursorAnimateCreate +XcursorAnimateDestroy +XcursorAnimateNext +XcursorCursorsCreate +XcursorCursorsDestroy +XcursorFilenameLoadCursor +XcursorFilenameLoadCursors +XcursorImageLoadCursor +XcursorImagesLoadCursors +XcursorLibraryLoadCursor +XcursorLibraryLoadCursors +XcursorShapeLoadCursor +XcursorShapeLoadCursors +_XcursorCreateGlyphCursor +XcursorGetDefaultSize +XcursorGetTheme +XcursorSetDefaultSize +XcursorSetTheme +XcursorSupportsARGB +_XcursorGetDisplayInfo +XcursorCommentCreate +XcursorCommentDestroy +XcursorCommentsCreate +XcursorCommentsDestroy +XcursorFileLoad +XcursorFileLoadAllImages +XcursorFileLoadImage +XcursorFileLoadImages +XcursorFileSave +XcursorFileSaveImages +XcursorFilenameLoad +XcursorFilenameLoadAllImages +XcursorFilenameLoadImage +XcursorFilenameLoadImages +XcursorFilenameSave +XcursorFilenameSaveImages +XcursorImageCreate +XcursorImageDestroy +XcursorImagesCreate +XcursorImagesDestroy +XcursorXcFileLoad +XcursorXcFileLoadAllImages +XcursorXcFileLoadImage +XcursorXcFileLoadImages +XcursorXcFileSave +XcursorLibraryLoadImage +XcursorLibraryLoadImages +XcursorShapeLoadImage +XcursorShapeLoadImages +XcursorTryShapeCursor +/* $XFree86: xc/lib/Xcursor/Xcursor-def.cpp,v 1.2 2002/09/30 22:02:17 alanh Exp $ */ Index: xc/lib/Xcursor/Xcursor.h diff -u /dev/null xc/lib/Xcursor/Xcursor.h:1.4 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/Xcursor.h Sat Jan 25 22:22:42 2003 @@ -0,0 +1,476 @@ +/* + * $XFree86: xc/lib/Xcursor/Xcursor.h,v 1.4 2003/01/26 03:22:42 eich Exp $ + * + * Copyright © 2002 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. + */ + +#ifndef _XCURSOR_H_ +#define _XCURSOR_H_ +#include +#include + +typedef int XcursorBool; +typedef unsigned int XcursorUInt; + +typedef XcursorUInt XcursorDim; +typedef XcursorUInt XcursorPixel; + +#define XcursorTrue 1 +#define XcursorFalse 0 + +/* + * Cursor files start with a header. The header + * contains a magic number, a version number and a + * table of contents which has type and offset information + * for the remaining tables in the file. + * + * File minor versions increment for compatible changes + * File major versions increment for incompatible changes (never, we hope) + * + * Chunks of the same type are always upward compatible. Incompatible + * changes are made with new chunk types; the old data can remain under + * the old type. Upward compatible changes can add header data as the + * header lengths are specified in the file. + * + * File: + * FileHeader + * LISTofChunk + * + * FileHeader: + * CARD32 magic magic number + * CARD32 header bytes in file header + * CARD32 version file version + * CARD32 ntoc number of toc entries + * LISTofFileToc toc table of contents + * + * FileToc: + * CARD32 type entry type + * CARD32 subtype entry subtype (size for images) + * CARD32 position absolute file position + */ + +#define XCURSOR_MAGIC 0x72756358 /* "Xcur" LSBFirst */ + +#define XCURSOR_MAJOR 1 +#define XCURSOR_MINOR 0 +#define XCURSOR_VERSION ((XCURSOR_MAJOR << 16) | (XCURSOR_MINOR)) +#define XCURSOR_FILE_HEADER_LEN (4 * 4) +#define XCURSOR_FILE_TOC_LEN (3 * 4) + +typedef struct _XcursorFileToc { + XcursorUInt type; /* chunk type */ + XcursorUInt subtype; /* subtype (size for images) */ + XcursorUInt position; /* absolute position in file */ +} XcursorFileToc; + +typedef struct _XcursorFileHeader { + XcursorUInt magic; /* magic number */ + XcursorUInt header; /* byte length of header */ + XcursorUInt version; /* file version number */ + XcursorUInt ntoc; /* number of toc entries */ + XcursorFileToc *tocs; /* table of contents */ +} XcursorFileHeader; + +/* + * The rest of the file is a list of chunks, each tagged by type + * and version. + * + * Chunk: + * ChunkHeader + * + * + * + * ChunkHeader: + * CARD32 header bytes in chunk header + type header + * CARD32 type chunk type + * CARD32 subtype chunk subtype + * CARD32 version chunk type version + */ + +#define XCURSOR_CHUNK_HEADER_LEN (4 * 4) + +typedef struct _XcursorChunkHeader { + XcursorUInt header; /* bytes in chunk header */ + XcursorUInt type; /* chunk type */ + XcursorUInt subtype; /* chunk subtype (size for images) */ + XcursorUInt version; /* version of this type */ +} XcursorChunkHeader; + +/* + * Here's a list of the known chunk types + */ + +/* + * Comments consist of a 4-byte length field followed by + * UTF-8 encoded text + * + * Comment: + * ChunkHeader header chunk header + * CARD32 length bytes in text + * LISTofCARD8 text UTF-8 encoded text + */ + +#define XCURSOR_COMMENT_TYPE 0xfffe0001 +#define XCURSOR_COMMENT_VERSION 1 +#define XCURSOR_COMMENT_HEADER_LEN (XCURSOR_CHUNK_HEADER_LEN + (1 *4)) +#define XCURSOR_COMMENT_COPYRIGHT 1 +#define XCURSOR_COMMENT_LICENSE 2 +#define XCURSOR_COMMENT_OTHER 3 +#define XCURSOR_COMMENT_MAX_LEN 0x100000 + +typedef struct _XcursorComment { + XcursorUInt version; + XcursorUInt comment_type; + char *comment; +} XcursorComment; + +/* + * Each cursor image occupies a separate image chunk. + * The length of the image header follows the chunk header + * so that future versions can extend the header without + * breaking older applications + * + * Image: + * ChunkHeader header chunk header + * CARD32 width actual width + * CARD32 height actual height + * CARD32 xhot hot spot x + * CARD32 yhot hot spot y + * CARD32 delay animation delay + * LISTofCARD32 pixels ARGB pixels + */ + +#define XCURSOR_IMAGE_TYPE 0xfffd0002 +#define XCURSOR_IMAGE_VERSION 1 +#define XCURSOR_IMAGE_HEADER_LEN (XCURSOR_CHUNK_HEADER_LEN + (5*4)) +#define XCURSOR_IMAGE_MAX_SIZE 0x7fff /* 32767x32767 max cursor size */ + +typedef struct _XcursorImage { + XcursorUInt version; /* version of the image data */ + XcursorDim size; /* nominal size for matching */ + XcursorDim width; /* actual width */ + XcursorDim height; /* actual height */ + XcursorDim xhot; /* hot spot x (must be inside image) */ + XcursorDim yhot; /* hot spot y (must be inside image) */ + XcursorUInt delay; /* animation delay to next frame (ms) */ + XcursorPixel *pixels; /* pointer to pixels */ +} XcursorImage; + +/* + * Other data structures exposed by the library API + */ +typedef struct _XcursorImages { + int nimage; /* number of images */ + XcursorImage **images; /* array of XcursorImage pointers */ +} XcursorImages; + +typedef struct _XcursorCursors { + Display *dpy; /* Display holding cursors */ + int ref; /* reference count */ + int ncursor; /* number of cursors */ + Cursor *cursors; /* array of cursors */ +} XcursorCursors; + +typedef struct _XcursorAnimate { + XcursorCursors *cursors; /* list of cursors to use */ + int sequence; /* which cursor is next */ +} XcursorAnimate; + +typedef struct _XcursorFile XcursorFile; + +struct _XcursorFile { + void *closure; + int (*read) (XcursorFile *file, unsigned char *buf, int len); + int (*write) (XcursorFile *file, unsigned char *buf, int len); + int (*seek) (XcursorFile *file, long offset, int whence); +}; + +typedef struct _XcursorComments { + int ncomment; /* number of comments */ + XcursorComment **comments; /* array of XcursorComment pointers */ +} XcursorComments; + +#define XCURSOR_CORE_THEME "core" + +_XFUNCPROTOBEGIN + +/* + * Manage Image objects + */ +XcursorImage * +XcursorImageCreate (int width, int height); + +void +XcursorImageDestroy (XcursorImage *image); + +/* + * Manage Images objects + */ +XcursorImages * +XcursorImagesCreate (int size); + +void +XcursorImagesDestroy (XcursorImages *images); + +/* + * Manage Cursor objects + */ +XcursorCursors * +XcursorCursorsCreate (Display *dpy, int size); + +void +XcursorCursorsDestroy (XcursorCursors *cursors); + +/* + * Manage Animate objects + */ +XcursorAnimate * +XcursorAnimateCreate (XcursorCursors *cursors); + +void +XcursorAnimateDestroy (XcursorAnimate *animate); + +Cursor +XcursorAnimateNext (XcursorAnimate *animate); + +/* + * Manage Comment objects + */ +XcursorComment * +XcursorCommentCreate (XcursorUInt comment_type, int length); + +void +XcursorCommentDestroy (XcursorComment *comment); + +XcursorComments * +XcursorCommentsCreate (int size); + +void +XcursorCommentsDestroy (XcursorComments *comments); + +/* + * XcursorFile/Image APIs + */ +XcursorImage * +XcursorXcFileLoadImage (XcursorFile *file, int size); + +XcursorImages * +XcursorXcFileLoadImages (XcursorFile *file, int size); + +XcursorImages * +XcursorXcFileLoadAllImages (XcursorFile *file); + +XcursorBool +XcursorXcFileLoad (XcursorFile *file, + XcursorComments **commentsp, + XcursorImages **imagesp); + +XcursorBool +XcursorXcFileSave (XcursorFile *file, + const XcursorComments *comments, + const XcursorImages *images); + +/* + * FILE/Image APIs + */ +XcursorImage * +XcursorFileLoadImage (FILE *file, int size); + +XcursorImages * +XcursorFileLoadImages (FILE *file, int size); + +XcursorImages * +XcursorFileLoadAllImages (FILE *file); + +XcursorBool +XcursorFileLoad (FILE *file, + XcursorComments **commentsp, + XcursorImages **imagesp); + +XcursorBool +XcursorFileSaveImages (FILE *file, const XcursorImages *images); + +XcursorBool +XcursorFileSave (FILE * file, + const XcursorComments *comments, + const XcursorImages *images); + +/* + * Filename/Image APIs + */ +XcursorImage * +XcursorFilenameLoadImage (const char *filename, int size); + +XcursorImages * +XcursorFilenameLoadImages (const char *filename, int size); + +XcursorImages * +XcursorFilenameLoadAllImages (const char *filename); + +XcursorBool +XcursorFilenameLoad (const char *file, + XcursorComments **commentsp, + XcursorImages **imagesp); + +XcursorBool +XcursorFilenameSaveImages (const char *filename, const XcursorImages *images); + +XcursorBool +XcursorFilenameSave (const char *file, + const XcursorComments *comments, + const XcursorImages *images); + +/* + * Library/Image APIs + */ +XcursorImage * +XcursorLibraryLoadImage (const char *library, const char *theme, int size); + +XcursorImages * +XcursorLibraryLoadImages (const char *library, const char *theme, int size); + +/* + * Library/shape API + */ +int +XcursorLibraryShape (const char *library); + +/* + * Image/Cursor APIs + */ + +Cursor +XcursorImageLoadCursor (Display *dpy, const XcursorImage *image); + +XcursorCursors * +XcursorImagesLoadCursors (Display *dpy, const XcursorImages *images); + +Cursor +XcursorImagesLoadCursor (Display *dpy, const XcursorImages *images); + +/* + * Filename/Cursor APIs + */ +Cursor +XcursorFilenameLoadCursor (Display *dpy, const char *file); + +XcursorCursors * +XcursorFilenameLoadCursors (Display *dpy, const char *file); + +/* + * Library/Cursor APIs + */ +Cursor +XcursorLibraryLoadCursor (Display *dpy, const char *file); + +XcursorCursors * +XcursorLibraryLoadCursors (Display *dpy, const char *file); + +/* + * Shape/Image APIs + */ + +XcursorImage * +XcursorShapeLoadImage (unsigned int shape, const char *theme, int size); + +XcursorImages * +XcursorShapeLoadImages (unsigned int shape, const char *theme, int size); + +/* + * Shape/Cursor APIs + */ +Cursor +XcursorShapeLoadCursor (Display *dpy, unsigned int shape); + +XcursorCursors * +XcursorShapeLoadCursors (Display *dpy, unsigned int shape); + +/* + * This is the function called by Xlib when attempting to + * load cursors from XCreateGlyphCursor. The interface must + * not change as Xlib loads 'libXcursor.so' instead of + * a specific major version + */ +Cursor +XcursorTryShapeCursor (Display *dpy, + Font source_font, + Font mask_font, + unsigned int source_char, + unsigned int mask_char, + XColor _Xconst *foreground, + XColor _Xconst *background); + +void +XcursorNoticeCreateBitmap (Display *dpy, + Pixmap pid, + unsigned int width, + unsigned int height); + +void +XcursorNoticePutBitmap (Display *dpy, + Drawable draw, + XImage *image); + +Cursor +XcursorTryShapeBitmapCursor (Display *dpy, + Pixmap source, + Pixmap mask, + XColor *foreground, + XColor *background, + unsigned int x, + unsigned int y); + +#define XCURSOR_BITMAP_HASH_SIZE 16 + +void +XcursorImageHash (XImage *image, + unsigned char hash[XCURSOR_BITMAP_HASH_SIZE]); + +/* + * Display information APIs + */ +XcursorBool +XcursorSupportsARGB (Display *dpy); + +XcursorBool +XcursorSupportsAnim (Display *dpy); + +XcursorBool +XcursorSetDefaultSize (Display *dpy, int size); + +int +XcursorGetDefaultSize (Display *dpy); + +XcursorBool +XcursorSetTheme (Display *dpy, const char *theme); + +char * +XcursorGetTheme (Display *dpy); + +XcursorBool +XcursorGetThemeCore (Display *dpy); + +XcursorBool +XcursorSetThemeCore (Display *dpy, XcursorBool theme_core); + +_XFUNCPROTOEND + +#endif Index: xc/lib/Xcursor/Xcursor.man diff -u /dev/null xc/lib/Xcursor/Xcursor.man:1.2 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/Xcursor.man Wed Feb 12 22:09:04 2003 @@ -0,0 +1,379 @@ +.\" +.\" $XFree86: xc/lib/Xcursor/Xcursor.man,v 1.2 2003/02/13 03:09:04 dawes Exp $ +.\" +.\" Copyright © 2002 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. +.\" +.de TQ +.br +.ns +.TP \\$1 +.. +.TH XCURSOR 3 "Version 1.0" "XFree86" + +.SH NAME +XCURSOR \- Cursor management library + +.SH SYNOPSIS +.nf +.B #include +.fi +.SH DESCRIPTION +.B Xcursor +is a simple library designed to help locate and load cursors. Cursors can +be loaded from files or memory. A library of common cursors exists which +map to the standard X cursor names. Cursors can exist in several sizes and +the library automatically picks the best size. + +.SH FUNCTIONAL OVERVIEW +Xcursor is built in a couple of layers; at the bottom layer is code which +can load cursor images from files. Above that is a layer which locates +cursor files based on the library path and theme. At the top is a layer +which builds cursors either out of an image loaded from a file or one of the +standard X cursors. When using images loaded from files, Xcursor prefers +to use the Render extension CreateCursor request if supported by the X +server. Where not supported, Xcursor maps the cursor image to a standard X +cursor and uses the core CreateCursor request. + +.SS CURSOR FILES +Xcursor defines a new format for cursors on disk. Each file holds +one or more cursor images. Each cursor image is tagged with a nominal size +so that the best size can be selected automatically. Multiple cursors of +the same nominal size can be loaded together; applications are expected to +use them as an animated sequence. +.P +Cursor files are stored as a header containing a table of contents followed +by a sequence of chunks. The table of contents indicates the type, subtype +and position in the file of each chunk. The file header looks like: +.LP +.in +.2i +\fImagic\fP\^: CARD32 'Xcur' (0x58, 0x63, 0x75, 0x72) +.br +\fIheader\fP\^: CARD32 bytes in this header +.br +\fIversion\fP\^: CARD32 file version number +.br +\fIntoc\fP\^: CARD32 number of toc entries +\fItoc\fP\^: LISTofTOC table of contents +.in -.2i +.P +Each table of contents entry looks like: +.LP +.in +.2i +\fItype\fP\^: CARD32 entry type +\fIsubtype\fP\^: CARD32 type-specific label - size for images +\fIposition\fP\^: CARD32 absolute byte position of table in file +.in -.2i +.P +.P +Each chunk in the file has set of common header fields followed by +additional type-specific fields: +.LP +.in +.2i +\fIheader\fP\^: CARD32 bytes in chunk header (including type-specific fields) +.br +\fItype\fP\^: CARD32 must match type in TOC for this chunk +.br +\fIsubtype\fP\^: CARD32 must match subtype in TOC for this chunk +.br +\fIversion\fP\^: CARD32 version number for this chunk type +.in -.2i +.P +There are currently two chunk types defined for cursor files; comments and +images. Comments look like: +.LP +.in +.2i +\fIheader\fP\^: 20 Comment headers are 20 bytes +.br +\fItype\fP\^: 0xfffe0001 Comment type is 0xfffe0001 +.br +\fIsubtype\fP\^: { 1 (COPYRIGHT), 2 (LICENSE), 3 (OTHER) } +.br +\fIversion\fP\^: 1 +.br +\fIlength\fP\^: CARD32 byte length of UTF-8 string +.br +\fIstring\fP\^: LISTofCARD8 UTF-8 string +.in -.2i +.P +Images look like: +.LP +.in +.2i +\fIheader\fP\^: 36 Image headers are 36 bytes +.br +\fItype\fP\^: 0xfffd0002 Image type is 0xfffd0002 +.br +\fIsubtype\fP\^: CARD32 Image subtype is the nominal size +.br +\fIversion\fP\^: 1 +.br +\fIwidth\fP\^: CARD32 Must be less than or equal to 0x7fff +.br +\fIheight\fP\^: CARD32 Must be less than or equal to 0x7fff +.br +\fIxhot\fP\^: CARD32 Must be less than or equal to width +.br +\fIyhot\fP\^: CARD32 Must be less than or equal to height +.br +\fIdelay\fP\^: CARD32 Delay between animation frames in milliseconds +.br +\fIpixels\fP\^: LISTofCARD32 Packed ARGB format pixels +.in -.2i + +.SS THEMES +Xcursor (mostly) follows the freedesktop.org spec for theming icons. The +default search path it uses is $HOME/.icons, /usr/share/icons, +/usr/share/pimaps, /usr/X11R6/lib/X11/icons. Within each of these +directorys, it searches for a directory using the theme name. Within the +theme directory, it looks for cursor files in the 'cursors' subdirectory. +It uses the first cursor file found along the path. +.PP +If necessary, Xcursor also looks for a "index.theme" file in each theme +directory to find inherited themes and searches along the path for those +themes as well. +.PP +If no theme is set, or if no cursor is found for the specified theme, +Xcursor checks the "default" theme. + +.SH DATATYPES + +.TP +.B XcursorImage +holds a single cursor image in memory. Each pixel in the cursor is a 32-bit +value containing ARGB with A in the high byte. +.sp +.nf +.ft CR + typedef struct _XcursorImage { + XcursorDim size; /* nominal size for matching */ + XcursorDim width; /* actual width */ + XcursorDim height; /* actual height */ + XcursorDim xhot; /* hot spot x (must be inside image) */ + XcursorDim yhot; /* hot spot y (must be inside image) */ + XcursorPixel *pixels; /* pointer to pixels */ + } XcursorImage; +.ft +.fi + +.TP +.B XcursorImages +holds multiple XcursorImage structures. They're all freed when the +XcursorImages is freed. +.sp +.nf +.ft CR + typedef struct _XcursorImages { + int nimage; /* number of images */ + XcursorImage **images; /* array of XcursorImage pointers */ + } XcursorImages; +.ft +.fi + +.TP +.B XcursorCursors +Holds multiple Cursor objects. They're all freed when the XcursorCursors is +freed. These are reference counted so that multiple XcursorAnimate +structures can use the same XcursorCursors. +.sp +.nf +.ft CR + typedef struct _XcursorCursors { + Display *dpy; /* Display holding cursors */ + int ref; /* reference count */ + int ncursor; /* number of cursors */ + Cursor *cursors; /* array of cursors */ + } XcursorCursors; +.ft +.fi + +.TP +.B XcursorAnimate +References a set of cursors and a sequence within that set. Multiple +XcursorAnimate structures may reference the same XcursorCursors; each +holds a reference which is removed when the XcursorAnimate is freed. +.sp +.nf +.ft CR + typedef struct _XcursorAnimate { + XcursorCursors *cursors; /* list of cursors to use */ + int sequence; /* which cursor is next */ + } XcursorAnimate; +.ft +.fi + +.TP +.B XcursorFile +Xcursor provides an abstract API for accessing the file data. Xcursor +provides a stdio implementation of this abstract API; applications +are free to create additional implementations. These functions +parallel the stdio functions in return value and expected argument values; +the read and write functions flip the arguments around to match the POSIX +versions. +.sp +.nf +.ft CR + typedef struct _XcursorFile { + void *closure; + int (*read) (XcursorFile *file, unsigned char *buf, int len); + int (*write) (XcursorFile *file, unsigned char *buf, int len); + int (*seek) (XcursorFile *file, long offset, int whence); + }; +.ft +.fi + +.SH FUNCTIONS + +.SS Object Management +.TP +XcursorImage *XcursorImageCreate (int width, int height) +.TQ +void XcursorImageDestroy (XcursorImage *image) +Allocate and free images. On allocation, the hotspot and the pixels are +left uninitialized. The size is set to the maximum of width and height. + +.TP +XcursorImages *XcursorImagesCreate (int size) +.TQ +void XcursorImagesDestroy (XcursorImages *images) +Allocate and free arrays to hold multiple cursor images. On allocation, +nimage is set to zero. + +.TP +XcursorCursors *XcursorCursorsCreate (Display *dpy, int size) +.TQ +void XcursorCursorsDestroy (XcursorCursors *cursors) +Allocate and free arrays to hold multiple cursors. On allocation, +ncursor is set to zero, ref is set to one. + +.SS Reading and writing images. + +.TP +XcursorImage *XcursorXcFileLoadImage (XcursorFile *file, int size) +.TQ +XcursorImages *XcursorXcFileLoadImages (XcursorFile *file, int size) +.TQ +XcursorImages *XcursorXcFileLoadAllImages (XcursorFile *file) +.TQ +XcursorBool XcursorXcFileLoad (XcursorFile *file, XcursorComments **commentsp, XcursorImages **imagesp) +.TQ +XcursorBool XcursorXcFileSave (XcursorFile *file, const XcursorComments *comments, const XcursorImages *images) +These read and write cursors from an XcursorFile handle. After reading, the +file pointer will be left at some random place in the file. + +.TP +XcursorImage *XcursorFileLoadImage (FILE *file, int size) +.TQ +XcursorImages *XcursorFileLoadImages (FILE *file, int size) +.TQ +XcursorImages *XcursorFileLoadAllImages (FILE *file) +.TQ +XcursorBool XcursorFileLoad (FILE *file, XcursorComments **commentsp, XcursorImages **imagesp) +.TQ +XcursorBool XcursorFileSaveImages (FILE *file, const XcursorImages *images) +.TQ +XcursorBool XcursorFileSave (FILE * file, const XcursorComments *comments, const XcursorImages *images) +These read and write cursors from a stdio FILE handle. Writing flushes +before returning so that any errors should be detected. + +.TP +XcursorImage *XcursorFilenameLoadImage (const char *filename, int size) +.TQ +XcursorImages *XcursorFilenameLoadImages (const char *filename, int size) +.TQ +XcursorImages *XcursorFilenameLoadAllImages (FILE *file) +.TQ +XcursorBool XcursorFilenameLoad (const char *file, XcursorComments **commentsp, XcursorImages **imagesp) +.TQ +XcursorBool XcursorFilenameSaveImages (const char *filename, const XcursorImages *images) +.TQ +XcursorBool XcursorFilenameSave (const char *file, const XcursorComments *comments, const XcursorImages *images) +These parallel the stdio FILE interfaces above, but take filenames. + +.SS Reading library images +.TP +XcursorImage *XcursorLibraryLoadImage (const char *name, const char *theme, int size) +.TQ +XcursorImages *XcursorLibraryLoadImages (const char *name, const char *theme, int size) +These search the library path, loading the first file found. If 'theme' is +not NULL, these functions first try appending -theme to name and then +name alone. + +.SS Cursor APIs + +.TP +Cursor XcursorFilenameLoadCursor (Display *dpy, const char *file) +.TQ +XcursorCursors *XcursorFilenameLoadCursors (Display *dpy, const char *file) +These load cursors from the specified file. + +.TP +Cursor XcursorLibraryLoadCursor (Display *dpy, const char *name) +.TQ +XcursorCursors *XcursorLibraryLoadCursors (Display *dpy, const char *name) +These load cursors using the specified library name. The theme +comes from the display. + +.SS X Cursor Name APIs + +.TP +XcursorImage *XcursorShapeLoadImage (unsigned int shape, const char *theme, int size) +.TQ +XcursorImages *XcursorShapeLoadImages (unsigned int shape, const char *theme, int size) +These map 'shape' to a library name using the standard X cursor names and +then load the images. + +.TP +Cursor XcursorShapeLoadCursor (Display *dpy, unsigned int shape) +.TQ +XcursorCursors *XcursorShapeLoadCursors (Display *dpy, unsigned int shape) +These map 'shape' to a library name and then load the cursors. + +.SS Display Information APIs + +.TP +XcursorBool XcursorSupportsARGB (Display *dpy) +Returns whether the display supports ARGB cursors or whether cursors will be +mapped to a core X cursor. + +.TP +XcursorBool XcursorSetDefaultSize (Display *dpy, int size) +Sets the default size for cursors on the specified display. When loading +cursors, those who's nominal size is closest to this size will be preferred. + +.TP +int XcursorGetDefaultSize (Display *dpy) +Gets the default cursor size. + +.TP +XcursorBool +XcursorSetTheme (Display *dpy, const char *theme) +Sets the current theme name. + +char * +XcursorGetTheme (Display *dpy) +Gets the current theme name. + +.SH RESTRICTIONS +.B Xcursor +will probably change radically in the future; weak attempts will be made to +retain some level of source-file compatibility. + +.SH AUTHOR +Keith Packard, member of the XFree86 Project, Inc. Index: xc/lib/Xcursor/config-subst diff -u /dev/null xc/lib/Xcursor/config-subst:1.1 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/config-subst Thu Aug 29 00:40:34 2002 @@ -0,0 +1,10 @@ +#!/bin/sh +script=config-subst.$$ +trap "rm $script" 0 +rm -f $script +for i in ${1+"$@"}; do + var="`echo "$i" | sed 's/=.*$//'`" + val="`echo "$i" | sed 's/^[^=]*=//'`" + echo "s;@$var@;$val;" >> $script +done +sed -f $script Index: xc/lib/Xcursor/cursor.c diff -u /dev/null xc/lib/Xcursor/cursor.c:1.5 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/cursor.c Sat Jan 25 22:22:42 2003 @@ -0,0 +1,810 @@ +/* + * $XFree86: xc/lib/Xcursor/cursor.c,v 1.5 2003/01/26 03:22:42 eich Exp $ + * + * Copyright © 2002 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 "xcursorint.h" +#include +#include + +XcursorCursors * +XcursorCursorsCreate (Display *dpy, int size) +{ + XcursorCursors *cursors; + + cursors = malloc (sizeof (XcursorCursors) + + size * sizeof (Cursor)); + if (!cursors) + return 0; + cursors->ref = 1; + cursors->dpy = dpy; + cursors->ncursor = 0; + cursors->cursors = (Cursor *) (cursors + 1); + return cursors; +} + +void +XcursorCursorsDestroy (XcursorCursors *cursors) +{ + int n; + + --cursors->ref; + if (cursors->ref > 0) + return; + + for (n = 0; n < cursors->ncursor; n++) + XFreeCursor (cursors->dpy, cursors->cursors[n]); + free (cursors); +} + +XcursorAnimate * +XcursorAnimateCreate (XcursorCursors *cursors) +{ + XcursorAnimate *animate; + + animate = malloc (sizeof (XcursorAnimate)); + if (!animate) + return 0; + animate->cursors = cursors; + cursors->ref++; + animate->sequence = 0; + return animate; +} + +void +XcursorAnimateDestroy (XcursorAnimate *animate) +{ + XcursorCursorsDestroy (animate->cursors); + free (animate); +} + +Cursor +XcursorAnimateNext (XcursorAnimate *animate) +{ + Cursor cursor = animate->cursors->cursors[animate->sequence++]; + + if (animate->sequence >= animate->cursors->ncursor) + animate->sequence = 0; + return cursor; +} + +static int +nativeByteOrder (void) +{ + int x = 1; + + return (*((char *) &x) == 1) ? LSBFirst : MSBFirst; +} + +static XcursorUInt +_XcursorPixelBrightness (XcursorPixel p) +{ + XcursorPixel alpha = p >> 24; + XcursorPixel r, g, b; + + if (!alpha) + return 0; + r = ((p >> 8) & 0xff00) / alpha; + if (r > 0xff) r = 0xff; + g = ((p >> 0) & 0xff00) / alpha; + if (g > 0xff) g = 0xff; + b = ((p << 8) & 0xff00) / alpha; + if (b > 0xff) b = 0xff; + return (r * 153 + g * 301 + b * 58) >> 9; +} + +static unsigned short +_XcursorDivideAlpha (XcursorUInt value, XcursorUInt alpha) +{ + if (!alpha) + return 0; + value = value * 255 / alpha; + if (value > 255) + value = 255; + return value | (value << 8); +} + +static void +_XcursorPixelToColor (XcursorPixel p, XColor *color) +{ + XcursorPixel alpha = p >> 24; + + color->pixel = 0; + color->red = _XcursorDivideAlpha ((p >> 16) & 0xff, alpha); + color->green = _XcursorDivideAlpha ((p >> 8) & 0xff, alpha); + color->blue = _XcursorDivideAlpha ((p >> 0) & 0xff, alpha); + color->flags = DoRed|DoGreen|DoBlue; +} + +#undef DEBUG_IMAGE +#ifdef DEBUG_IMAGE +static void +_XcursorDumpImage (XImage *image) +{ + FILE *f = fopen ("/tmp/images", "a"); + int x, y; + if (!f) + return; + fprintf (f, "%d x %x\n", image->width, image->height); + for (y = 0; y < image->height; y++) + { + for (x = 0; x < image->width; x++) + fprintf (f, "%c", XGetPixel (image, x, y) ? '*' : ' '); + fprintf (f, "\n"); + } + fflush (f); + fclose (f); +} + +static void +_XcursorDumpColor (XColor *color, char *name) +{ + FILE *f = fopen ("/tmp/images", "a"); + fprintf (f, "%s: %x %x %x\n", name, + color->red, color->green, color->blue); + fflush (f); + fclose (f); +} +#endif + +static int +_XcursorCompareRed (const void *a, const void *b) +{ + const XcursorPixel *ap = a, *bp = b; + + return (int) (((*ap >> 16) & 0xff) - ((*bp >> 16) & 0xff)); +} + +static int +_XcursorCompareGreen (const void *a, const void *b) +{ + const XcursorPixel *ap = a, *bp = b; + + return (int) (((*ap >> 8) & 0xff) - ((*bp >> 8) & 0xff)); +} + +static int +_XcursorCompareBlue (const void *a, const void *b) +{ + const XcursorPixel *ap = a, *bp = b; + + return (int) (((*ap >> 0) & 0xff) - ((*bp >> 0) & 0xff)); +} + +static XcursorPixel +_XcursorAverageColor (XcursorPixel *pixels, int npixels) +{ + XcursorPixel p; + XcursorPixel red, green, blue; + int n = npixels; + + blue = green = red = 0; + while (n--) + { + p = *pixels++; + red += (p >> 16) & 0xff; + green += (p >> 8) & 0xff; + blue += (p >> 0) & 0xff; + } + if (!n) + return 0; + return (0xff << 24) | ((red/npixels) << 16) | ((green/npixels) << 8) | (blue/npixels); +} + +typedef struct XcursorCoreCursor { + XImage *src_image; + XImage *msk_image; + XColor on_color; + XColor off_color; +} XcursorCoreCursor; + +static Bool +_XcursorHeckbertMedianCut (const XcursorImage *image, XcursorCoreCursor *core) +{ + XImage *src_image = core->src_image, *msk_image = core->msk_image; + int npixels = image->width * image->height; + int ncolors; + int n; + XcursorPixel *po, *pn, *pc; + XcursorPixel p; + XcursorPixel red, green, blue, alpha; + XcursorPixel max_red, min_red, max_green, min_green, max_blue, min_blue; + XcursorPixel *temp, *pixels, *colors; + int split; + XcursorPixel leftColor, centerColor, rightColor; + int (*compare) (const void *, const void *); + int x, y; + + /* + * Temp space for converted image and converted colors + */ + temp = malloc (npixels * sizeof (XcursorPixel) * 2); + if (!temp) + return False; + + pixels = temp; + colors = pixels + npixels; + + /* + * Convert to 2-value alpha and build + * array of opaque color values and an + */ + po = image->pixels; + pn = pixels; + pc = colors; + max_blue = max_green = max_red = 0; + min_blue = min_green = min_red = 255; + n = npixels; + while (n--) + { + p = *po++; + alpha = (p >> 24) & 0xff; + red = (p >> 16) & 0xff; + green = (p >> 8) & 0xff; + blue = (p >> 0) & 0xff; + if (alpha >= 0x80) + { + red = red * 255 / alpha; + green = green * 255 / alpha; + blue = blue * 255 / alpha; + if (red < min_red) min_red = red; + if (red > max_red) max_red = red; + if (green < min_green) min_green = green; + if (green > max_green) max_green = green; + if (blue < min_blue) min_blue = blue; + if (blue > max_blue) max_blue = blue; + p = ((0xff << 24) | (red << 16) | + (green << 8) | (blue << 0)); + *pc++ = p; + } + else + p = 0; + *pn++ = p; + } + ncolors = pc - colors; + + /* + * Compute longest dimension and sort + */ + if ((max_green - min_green) >= (max_red - min_red) && + (max_green - min_green) >= (max_blue - min_blue)) + compare = _XcursorCompareGreen; + else if ((max_red - min_red) >= (max_blue - min_blue)) + compare = _XcursorCompareRed; + else + compare = _XcursorCompareBlue; + qsort (colors, ncolors, sizeof (XcursorPixel), compare); + /* + * Compute average colors on both sides of the cut + */ + split = ncolors >> 1; + leftColor = _XcursorAverageColor (colors, split); + centerColor = colors[split]; + rightColor = _XcursorAverageColor (colors + split, ncolors - split); + /* + * Select best color for each pixel + */ + pn = pixels; + for (y = 0; y < image->height; y++) + for (x = 0; x < image->width; x++) + { + p = *pn++; + if (p & 0xff000000) + { + XPutPixel (msk_image, x, y, 1); + if ((*compare) (&p, ¢erColor) >= 0) + XPutPixel (src_image, x, y, 0); + else + XPutPixel (src_image, x, y, 1); + } + else + { + XPutPixel (msk_image, x, y, 0); + XPutPixel (src_image, x, y, 0); + } + } + free (temp); + _XcursorPixelToColor (rightColor, &core->off_color); + _XcursorPixelToColor (leftColor, &core->on_color); + return True; +} + +#if 0 +#define DITHER_DIM 4 +static XcursorPixel orderedDither[4][4] = { + { 1, 9, 3, 11 }, + { 13, 5, 15, 7 }, + { 4, 12, 2, 10 }, + { 16, 8, 14, 6 } +}; +#else +#define DITHER_DIM 2 +static XcursorPixel orderedDither[2][2] = { + { 1, 3, }, + { 4, 2, }, +}; +#endif + +#define DITHER_SIZE ((sizeof orderedDither / sizeof orderedDither[0][0]) + 1) + +static Bool +_XcursorBayerOrderedDither (const XcursorImage *image, XcursorCoreCursor *core) +{ + int x, y; + XcursorPixel *pixel, p; + XcursorPixel a, i, d; + + pixel = image->pixels; + for (y = 0; y < image->height; y++) + for (x = 0; x < image->width; x++) + { + p = *pixel++; + a = ((p >> 24) * DITHER_SIZE + 127) / 255; + i = (_XcursorPixelBrightness (p) * DITHER_SIZE + 127) / 255; + d = orderedDither[y&(DITHER_DIM-1)][x&(DITHER_DIM-1)]; + if (a > d) + { + XPutPixel (core->msk_image, x, y, 1); + if (i > d) + XPutPixel (core->src_image, x, y, 0); /* white */ + else + XPutPixel (core->src_image, x, y, 1); /* black */ + } + else + { + XPutPixel (core->msk_image, x, y, 0); + XPutPixel (core->src_image, x, y, 0); + } + } + core->on_color.red = 0; + core->on_color.green = 0; + core->on_color.blue = 0; + core->off_color.red = 0xffff; + core->off_color.green = 0xffff; + core->off_color.blue = 0xffff; + return True; +} + +static Bool +_XcursorFloydSteinberg (const XcursorImage *image, XcursorCoreCursor *core) +{ + int *aPicture, *iPicture, *aP, *iP; + XcursorPixel *pixel, p; + int aR, iR, aA, iA; + int npixels = image->width * image->height; + int n; + int right = 1; + int belowLeft = image->width - 1; + int below = image->width; + int belowRight = image->width + 1; + int iError, aError; + int iErrorRight, aErrorRight; + int iErrorBelowLeft, aErrorBelowLeft; + int iErrorBelow, aErrorBelow; + int iErrorBelowRight, aErrorBelowRight; + int x, y; + int max_inten, min_inten, mean_inten; + + iPicture = malloc (npixels * sizeof (int) * 2); + if (!iPicture) + return False; + aPicture = iPicture + npixels; + + /* + * Compute raw gray and alpha arrays + */ + pixel = image->pixels; + iP = iPicture; + aP = aPicture; + n = npixels; + max_inten = 0; + min_inten = 0xff; + while (n--) + { + p = *pixel++; + *aP++ = (int) (p >> 24); + iR = (int) _XcursorPixelBrightness (p); + if (iR > max_inten) max_inten = iR; + if (iR < min_inten) min_inten = iR; + *iP++ = iR; + } + /* + * Draw the image while diffusing the error + */ + iP = iPicture; + aP = aPicture; + mean_inten = (max_inten + min_inten + 1) >> 1; + for (y = 0; y < image->height; y++) + for (x = 0; x < image->width; x++) + { + aR = *aP; + iR = *iP; + if (aR >= 0x80) + { + XPutPixel (core->msk_image, x, y, 1); + aA = 0xff; + } + else + { + XPutPixel (core->msk_image, x, y, 0); + aA = 0x00; + } + if (iR >= mean_inten) + { + XPutPixel (core->src_image, x, y, 0); + iA = max_inten; + } + else + { + XPutPixel (core->src_image, x, y, 1); + iA = min_inten; + } + iError = iR - iA; + aError = aR - aA; + iErrorRight = (iError * 7) >> 4; + iErrorBelowLeft = (iError * 3) >> 4; + iErrorBelow = (iError * 5) >> 4; + iErrorBelowRight = (iError - iErrorRight - + iErrorBelowLeft - iErrorBelow); + aErrorRight = (aError * 7) >> 4; + aErrorBelowLeft = (aError * 3) >> 4; + aErrorBelow = (aError * 5) >> 4; + aErrorBelowRight = (aError - aErrorRight - + aErrorBelowLeft - aErrorBelow); + if (x < image->width - 1) + { + iP[right] += iErrorRight; + aP[right] += aErrorRight; + } + if (y < image->height - 1) + { + if (x) + { + iP[belowLeft] += iErrorBelowLeft; + aP[belowLeft] += aErrorBelowLeft; + } + iP[below] += iErrorBelow; + aP[below] += aErrorBelow; + if (x < image->width - 1) + { + iP[belowRight] += iErrorBelowRight; + aP[belowRight] += aErrorBelowRight; + } + } + aP++; + iP++; + } + free (iPicture); + core->on_color.red = + core->on_color.green = + core->on_color.blue = (min_inten | min_inten << 8); + core->off_color.red = + core->off_color.green = + core->off_color.blue = (max_inten | max_inten << 8); + return True; +} + +static Bool +_XcursorThreshold (const XcursorImage *image, XcursorCoreCursor *core) +{ + XcursorPixel *pixel, p; + int x, y; + + /* + * Draw the image, picking black for dark pixels and white for light + */ + pixel = image->pixels; + for (y = 0; y < image->height; y++) + for (x = 0; x < image->width; x++) + { + p = *pixel++; + if ((p >> 24) >= 0x80) + { + XPutPixel (core->msk_image, x, y, 1); + if (_XcursorPixelBrightness (p) > 0x80) + XPutPixel (core->src_image, x, y, 0); + else + XPutPixel (core->src_image, x, y, 1); + } + else + { + XPutPixel (core->msk_image, x, y, 0); + XPutPixel (core->src_image, x, y, 0); + } + } + core->on_color.red = + core->on_color.green = + core->on_color.blue = 0; + core->off_color.red = + core->off_color.green = + core->off_color.blue = 0xffff; + return True; +} + +Cursor +XcursorImageLoadCursor (Display *dpy, const XcursorImage *image) +{ + Cursor cursor; + +#if RENDER_MAJOR > 0 || RENDER_MINOR >= 5 + if (XcursorSupportsARGB (dpy)) + { + XImage ximage; + int screen = DefaultScreen (dpy); + Pixmap pixmap; + Picture picture; + GC gc; + XRenderPictFormat *format; + + ximage.width = image->width; + ximage.height = image->height; + ximage.xoffset = 0; + ximage.format = ZPixmap; + ximage.data = (char *) image->pixels; + ximage.byte_order = nativeByteOrder (); + ximage.bitmap_unit = 32; + ximage.bitmap_bit_order = ximage.byte_order; + ximage.bitmap_pad = 32; + ximage.depth = 32; + ximage.bits_per_pixel = 32; + ximage.bytes_per_line = image->width * 4; + ximage.red_mask = 0xff0000; + ximage.green_mask = 0x00ff00; + ximage.blue_mask = 0x0000ff; + ximage.obdata = 0; + if (!XInitImage (&ximage)) + return None; + pixmap = XCreatePixmap (dpy, RootWindow (dpy, screen), + image->width, image->height, 32); + gc = XCreateGC (dpy, pixmap, 0, 0); + XPutImage (dpy, pixmap, gc, &ximage, + 0, 0, 0, 0, image->width, image->height); + XFreeGC (dpy, gc); + format = XRenderFindStandardFormat (dpy, PictStandardARGB32); + picture = XRenderCreatePicture (dpy, pixmap, format, 0, 0); + XFreePixmap (dpy, pixmap); + cursor = XRenderCreateCursor (dpy, picture, + image->xhot, image->yhot); + XRenderFreePicture (dpy, picture); + } + else +#endif + { + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + int screen = DefaultScreen (dpy); + XcursorCoreCursor core; + Pixmap src_pixmap, msk_pixmap; + GC gc; + XGCValues gcv; + + core.src_image = XCreateImage (dpy, 0, 1, ZPixmap, + 0, 0, image->width, image->height, + 32, 0); + core.src_image->data = Xmalloc (image->height * + core.src_image->bytes_per_line); + core.msk_image = XCreateImage (dpy, 0, 1, ZPixmap, + 0, 0, image->width, image->height, + 32, 0); + core.msk_image->data = Xmalloc (image->height * + core.msk_image->bytes_per_line); + + switch (info->dither) { + case XcursorDitherThreshold: + if (!_XcursorThreshold (image, &core)) + return 0; + break; + case XcursorDitherMedian: + if (!_XcursorHeckbertMedianCut (image, &core)) + return 0; + break; + case XcursorDitherOrdered: + if (!_XcursorBayerOrderedDither (image, &core)) + return 0; + break; + case XcursorDitherDiffuse: + if (!_XcursorFloydSteinberg (image, &core)) + return 0; + break; + default: + return 0; + } + + /* + * Create the cursor + */ + src_pixmap = XCreatePixmap (dpy, RootWindow (dpy, screen), + image->width, image->height, 1); + msk_pixmap = XCreatePixmap (dpy, RootWindow (dpy, screen), + image->width, image->height, 1); + gcv.foreground = 1; + gcv.background = 0; + gc = XCreateGC (dpy, src_pixmap, + GCForeground|GCBackground, + &gcv); + XPutImage (dpy, src_pixmap, gc, core.src_image, + 0, 0, 0, 0, image->width, image->height); + + XPutImage (dpy, msk_pixmap, gc, core.msk_image, + 0, 0, 0, 0, image->width, image->height); + XFreeGC (dpy, gc); + +#ifdef DEBUG_IMAGE + _XcursorDumpColor (&core.on_color, "on_color"); + _XcursorDumpColor (&core.off_color, "off_color"); + _XcursorDumpImage (core.src_image); + _XcursorDumpImage (core.msk_image); +#endif + XDestroyImage (core.src_image); + XDestroyImage (core.msk_image); + + cursor = XCreatePixmapCursor (dpy, src_pixmap, msk_pixmap, + &core.on_color, &core.off_color, + image->xhot, image->yhot); + XFreePixmap (dpy, src_pixmap); + XFreePixmap (dpy, msk_pixmap); + } + return cursor; +} + +XcursorCursors * +XcursorImagesLoadCursors (Display *dpy, const XcursorImages *images) +{ + XcursorCursors *cursors = XcursorCursorsCreate (dpy, images->nimage); + int n; + + if (!cursors) + return 0; + for (n = 0; n < images->nimage; n++) + { + cursors->cursors[n] = XcursorImageLoadCursor (dpy, images->images[n]); + if (!cursors->cursors[n]) + { + XcursorCursorsDestroy (cursors); + return 0; + } + cursors->ncursor++; + } + return cursors; +} + +Cursor +XcursorImagesLoadCursor (Display *dpy, const XcursorImages *images) +{ + if (images->nimage == 1 || !XcursorSupportsAnim (dpy)) + return XcursorImageLoadCursor (dpy, images->images[0]); + else + { + XcursorCursors *cursors = XcursorImagesLoadCursors (dpy, images); + XAnimCursor *anim; + int n; + Cursor cursor; + + if (!cursors) + return 0; + anim = malloc (cursors->ncursor * sizeof (XAnimCursor)); + if (!anim) + { + XcursorCursorsDestroy (cursors); + return 0; + } + for (n = 0; n < cursors->ncursor; n++) + { + anim[n].cursor = cursors->cursors[n]; + anim[n].delay = images->images[n]->delay; + } + cursor = XRenderCreateAnimCursor (dpy, cursors->ncursor, anim); + free (anim); + return cursor; + } +} + + +Cursor +XcursorFilenameLoadCursor (Display *dpy, const char *file) +{ + int size = XcursorGetDefaultSize (dpy); + XcursorImages *images = XcursorFilenameLoadImages (file, size); + Cursor cursor; + + if (!images) + return None; + cursor = XcursorImagesLoadCursor (dpy, images); + XcursorImagesDestroy (images); + return cursor; +} + +XcursorCursors * +XcursorFilenameLoadCursors (Display *dpy, const char *file) +{ + int size = XcursorGetDefaultSize (dpy); + XcursorImages *images = XcursorFilenameLoadImages (file, size); + XcursorCursors *cursors; + + if (!images) + return 0; + cursors = XcursorImagesLoadCursors (dpy, images); + XcursorImagesDestroy (images); + return cursors; +} + +/* + * Stolen from XCreateGlyphCursor (which we cruelly override) + */ + +Cursor +_XcursorCreateGlyphCursor(Display *dpy, + Font source_font, + Font mask_font, + unsigned int source_char, + unsigned int mask_char, + XColor _Xconst *foreground, + XColor _Xconst *background) +{ + Cursor cid; + register xCreateGlyphCursorReq *req; + + LockDisplay(dpy); + GetReq(CreateGlyphCursor, req); + cid = req->cid = XAllocID(dpy); + req->source = source_font; + req->mask = mask_font; + req->sourceChar = source_char; + req->maskChar = mask_char; + req->foreRed = foreground->red; + req->foreGreen = foreground->green; + req->foreBlue = foreground->blue; + req->backRed = background->red; + req->backGreen = background->green; + req->backBlue = background->blue; + UnlockDisplay(dpy); + SyncHandle(); + return (cid); +} + +/* + * Stolen from XCreateFontCursor (which we cruelly override) + */ + +Cursor +_XcursorCreateFontCursor (Display *dpy, unsigned int shape) +{ + static XColor _Xconst foreground = { 0, 0, 0, 0 }; /* black */ + static XColor _Xconst background = { 0, 65535, 65535, 65535 }; /* white */ + + /* + * the cursor font contains the shape glyph followed by the mask + * glyph; so character position 0 contains a shape, 1 the mask for 0, + * 2 a shape, etc. contains hash define names + * for all of these. + */ + + if (dpy->cursor_font == None) + { + dpy->cursor_font = XLoadFont (dpy, CURSORFONT); + if (dpy->cursor_font == None) + return None; + } + + return _XcursorCreateGlyphCursor (dpy, dpy->cursor_font, dpy->cursor_font, + shape, shape + 1, &foreground, &background); +} + Index: xc/lib/Xcursor/display.c diff -u /dev/null xc/lib/Xcursor/display.c:1.6 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/display.c Wed Feb 19 22:13:50 2003 @@ -0,0 +1,361 @@ +/* + * $XFree86: xc/lib/Xcursor/display.c,v 1.6 2003/02/20 03:13:50 dawes Exp $ + * + * Copyright © 2002 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 "xcursorint.h" +#include +#include + +static XcursorDisplayInfo *_XcursorDisplayInfo; + +static int +_XcursorCloseDisplay (Display *dpy, XExtCodes *codes) +{ + XcursorDisplayInfo *info, **prev; + + /* + * Unhook from the global list + */ + _XLockMutex (_Xglobal_lock); + for (prev = &_XcursorDisplayInfo; (info = *prev); prev = &(*prev)->next) + if (info->display == dpy) + { + *prev = info->next; + break; + } + _XUnlockMutex (_Xglobal_lock); + + if (info->theme) + free (info->theme); + free (info); + return 0; +} + +static int +_XcursorDefaultParseBool (char *v) +{ + char c0, c1; + + c0 = *v; + if (isupper ((int)c0)) + c0 = tolower (c0); + if (c0 == 't' || c0 == 'y' || c0 == '1') + return 1; + if (c0 == 'f' || c0 == 'n' || c0 == '0') + return 0; + if (c0 == 'o') + { + c1 = v[1]; + if (isupper ((int)c1)) + c1 = tolower (c1); + if (c1 == 'n') + return 1; + if (c1 == 'f') + return 0; + } + return -1; +} + +XcursorDisplayInfo * +_XcursorGetDisplayInfo (Display *dpy) +{ + XcursorDisplayInfo *info, **prev, *old; + int event_base, error_base; + int major, minor; + char *v; + int i; + + _XLockMutex (_Xglobal_lock); + for (prev = &_XcursorDisplayInfo; (info = *prev); prev = &(*prev)->next) + { + if (info->display == dpy) + { + /* + * MRU the list + */ + if (prev != &_XcursorDisplayInfo) + { + *prev = info->next; + info->next = _XcursorDisplayInfo; + _XcursorDisplayInfo = info; + } + break; + } + } + _XUnlockMutex (_Xglobal_lock); + if (info) + return info; + info = (XcursorDisplayInfo *) malloc (sizeof (XcursorDisplayInfo)); + if (!info) + return 0; + info->next = 0; + info->display = dpy; + + info->codes = XAddExtension (dpy); + if (!info->codes) + { + free (info); + return 0; + } + (void) XESetCloseDisplay (dpy, info->codes->extension, _XcursorCloseDisplay); + + /* + * Check whether the display supports the Render CreateCursor request + */ + info->has_render_cursor = XcursorFalse; + info->has_anim_cursor = XcursorFalse; + if (XRenderQueryExtension (dpy, &event_base, &error_base) && + XRenderQueryVersion (dpy, &major, &minor)) + { + if (major > 0 || minor >= 5) + { + info->has_render_cursor = XcursorTrue; + v = getenv ("XCURSOR_CORE"); + if (!v) + v = XGetDefault (dpy, "Xcursor", "core"); + if (v && _XcursorDefaultParseBool (v) == 1) + info->has_render_cursor = XcursorFalse; + } + if (info->has_render_cursor && (major > 0 || minor >= 8)) + { + info->has_anim_cursor = XcursorTrue; + v = getenv ("XCURSOR_ANIM"); + if (!v) + v = XGetDefault (dpy, "Xcursor", "anim"); + if (v && _XcursorDefaultParseBool (v) == 0) + info->has_anim_cursor = XcursorFalse; + } + } + + info->size = 0; + + /* + * Get desired cursor size + */ + v = getenv ("XCURSOR_SIZE"); + if (!v) + v = XGetDefault (dpy, "Xcursor", "size"); + if (v) + info->size = atoi (v); + + /* + * Use the Xft size to guess a size; make cursors 16 "points" tall + */ + if (info->size == 0) + { + int dpi = 0; + v = XGetDefault (dpy, "Xft", "dpi"); + if (v) + dpi = atoi (v); + if (dpi) + info->size = dpi * 16 / 72; + } + + /* + * Use display size to guess a size + */ + if (info->size == 0) + { + int dim; + + if (DisplayHeight (dpy, DefaultScreen (dpy)) < + DisplayWidth (dpy, DefaultScreen (dpy))) + dim = DisplayHeight (dpy, DefaultScreen (dpy)); + else + dim = DisplayWidth (dpy, DefaultScreen (dpy)); + /* + * 16 pixels on a display of dimension 768 + */ + info->size = dim / 48; + } + + info->theme = 0; + + /* + * Get the desired theme + */ + v = getenv ("XCURSOR_THEME"); + if (!v) + v = XGetDefault (dpy, "Xcursor", "theme"); + if (v) + { + info->theme = malloc (strlen (v) + 1); + if (info->theme) + strcpy (info->theme, v); + } + + /* + * Get the desired dither + */ + info->dither = XcursorDitherThreshold; + v = getenv ("XCURSOR_DITHER"); + if (!v) + v = XGetDefault (dpy, "Xcursor", "dither"); + if (v) + { + if (!strcmp (v, "threshold")) + info->dither = XcursorDitherThreshold; + if (!strcmp (v, "median")) + info->dither = XcursorDitherMedian; + if (!strcmp (v, "ordered")) + info->dither = XcursorDitherOrdered; + if (!strcmp (v, "diffuse")) + info->dither = XcursorDitherDiffuse; + } + + info->theme_core = False; + /* + * Find out if core cursors should + * be themed + */ + v = getenv ("XCURSOR_THEME_CORE"); + if (!v) + v = XGetDefault (dpy, "Xcursor", "theme_core"); + if (v) + { + i = _XcursorDefaultParseBool (v); + if (i >= 0) + info->theme_core = i; + } + + info->fonts = 0; + for (i = 0; i < NUM_BITMAPS; i++) + info->bitmaps[i].bitmap = None; + + /* + * Link new info info list, making sure another + * thread hasn't inserted something into the list while + * this one was busy setting up the data + */ + _XLockMutex (_Xglobal_lock); + for (old = _XcursorDisplayInfo; old; old = old->next) + if (old->display == dpy) + break; + if (old) + { + if (info->theme) + free (info->theme); + free (info); + info = old; + } + else + { + info->next = _XcursorDisplayInfo; + _XcursorDisplayInfo = info; + } + _XUnlockMutex (_Xglobal_lock); + + return info; +} + +XcursorBool +XcursorSupportsARGB (Display *dpy) +{ + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + + return info && info->has_render_cursor; +} + +XcursorBool +XcursorSupportsAnim (Display *dpy) +{ + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + + return info && info->has_anim_cursor; +} + +XcursorBool +XcursorSetDefaultSize (Display *dpy, int size) +{ + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + + if (!info) + return XcursorFalse; + info->size = size; + return XcursorTrue; +} + +int +XcursorGetDefaultSize (Display *dpy) +{ + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + + if (!info) + return 0; + return info->size; +} + +XcursorBool +XcursorSetTheme (Display *dpy, const char *theme) +{ + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + char *copy; + + if (!info) + return XcursorFalse; + if (theme) + { + copy = malloc (strlen (theme) + 1); + if (!copy) + return XcursorFalse; + strcpy (copy, theme); + } + else + copy = 0; + if (info->theme) + free (info->theme); + info->theme = copy; + return XcursorTrue; +} + +char * +XcursorGetTheme (Display *dpy) +{ + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + + if (!info) + return 0; + return info->theme; +} + +XcursorBool +XcursorGetThemeCore (Display *dpy) +{ + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + + if (!info) + return XcursorFalse; + return info->theme_core; + +} + +XcursorBool +XcursorSetThemeCore (Display *dpy, XcursorBool theme_core) +{ + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + + if (!info) + return XcursorFalse; + info->theme_core = theme_core; + return XcursorTrue; +} Index: xc/lib/Xcursor/file.c diff -u /dev/null xc/lib/Xcursor/file.c:1.2 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/file.c Wed Sep 18 13:11:42 2002 @@ -0,0 +1,992 @@ +/* + * $XFree86: xc/lib/Xcursor/file.c,v 1.2 2002/09/18 17:11:42 tsi Exp $ + * + * Copyright © 2002 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 "xcursorint.h" +#include +#include + +XcursorImage * +XcursorImageCreate (int width, int height) +{ + XcursorImage *image; + + image = malloc (sizeof (XcursorImage) + + width * height * sizeof (XcursorPixel)); + if (!image) + return 0; + image->version = XCURSOR_IMAGE_VERSION; + image->pixels = (XcursorPixel *) (image + 1); + image->size = width > height ? width : height; + image->width = width; + image->height = height; + image->delay = 0; + return image; +} + +void +XcursorImageDestroy (XcursorImage *image) +{ + free (image); +} + +XcursorImages * +XcursorImagesCreate (int size) +{ + XcursorImages *images; + + images = malloc (sizeof (XcursorImages) + + size * sizeof (XcursorImage *)); + if (!images) + return 0; + images->nimage = 0; + images->images = (XcursorImage **) (images + 1); + return images; +} + +void +XcursorImagesDestroy (XcursorImages *images) +{ + int n; + + for (n = 0; n < images->nimage; n++) + XcursorImageDestroy (images->images[n]); + free (images); +} + +XcursorComment * +XcursorCommentCreate (XcursorUInt comment_type, int length) +{ + XcursorComment *comment; + + if (length > XCURSOR_COMMENT_MAX_LEN) + return 0; + + comment = malloc (sizeof (XcursorComment) + length + 1); + if (!comment) + return 0; + comment->version = XCURSOR_COMMENT_VERSION; + comment->comment_type = comment_type; + comment->comment = (char *) (comment + 1); + comment->comment[0] = '\0'; + return comment; +} + +void +XcursorCommentDestroy (XcursorComment *comment) +{ + free (comment); +} + +XcursorComments * +XcursorCommentsCreate (int size) +{ + XcursorComments *comments; + + comments = malloc (sizeof (XcursorComments) + + size * sizeof (XcursorComment *)); + if (!comments) + return 0; + comments->ncomment = 0; + comments->comments = (XcursorComment **) (comments + 1); + return comments; +} + +void +XcursorCommentsDestroy (XcursorComments *comments) +{ + int n; + + for (n = 0; n < comments->ncomment; n++) + XcursorCommentDestroy (comments->comments[n]); + free (comments); +} + +static XcursorBool +_XcursorReadUInt (XcursorFile *file, XcursorUInt *u) +{ + unsigned char bytes[4]; + + if ((*file->read) (file, bytes, 4) != 4) + return XcursorFalse; + *u = ((bytes[0] << 0) | + (bytes[1] << 8) | + (bytes[2] << 16) | + (bytes[3] << 24)); + return XcursorTrue; +} + +static XcursorBool +_XcursorReadBytes (XcursorFile *file, char *bytes, int length) +{ + if ((*file->read) (file, (unsigned char *) bytes, length) != length) + return XcursorFalse; + return XcursorTrue; +} + +static XcursorBool +_XcursorWriteUInt (XcursorFile *file, XcursorUInt u) +{ + unsigned char bytes[4]; + + bytes[0] = u; + bytes[1] = u >> 8; + bytes[2] = u >> 16; + bytes[3] = u >> 24; + if ((*file->write) (file, bytes, 4) != 4) + return XcursorFalse; + return XcursorTrue; +} + +static XcursorBool +_XcursorWriteBytes (XcursorFile *file, char *bytes, int length) +{ + if ((*file->write) (file, (unsigned char *) bytes, length) != length) + return XcursorFalse; + return XcursorTrue; +} + +static void +_XcursorFileHeaderDestroy (XcursorFileHeader *fileHeader) +{ + free (fileHeader); +} + +static XcursorFileHeader * +_XcursorFileHeaderCreate (int ntoc) +{ + XcursorFileHeader *fileHeader; + + if (ntoc > 0x10000) + return 0; + fileHeader = malloc (sizeof (XcursorFileHeader) + + ntoc * sizeof (XcursorFileToc)); + if (!fileHeader) + return 0; + fileHeader->magic = XCURSOR_MAGIC; + fileHeader->header = XCURSOR_FILE_HEADER_LEN; + fileHeader->version = XCURSOR_VERSION; + fileHeader->ntoc = ntoc; + fileHeader->tocs = (XcursorFileToc *) (fileHeader + 1); + return fileHeader; +} + +static XcursorFileHeader * +_XcursorReadFileHeader (XcursorFile *file) +{ + XcursorFileHeader head, *fileHeader; + XcursorUInt skip; + int n; + + if (!_XcursorReadUInt (file, &head.magic)) + return 0; + if (head.magic != XCURSOR_MAGIC) + return 0; + if (!_XcursorReadUInt (file, &head.header)) + return 0; + if (!_XcursorReadUInt (file, &head.version)) + return 0; + if (!_XcursorReadUInt (file, &head.ntoc)) + return 0; + skip = head.header - XCURSOR_FILE_HEADER_LEN; + if (skip) + if ((*file->seek) (file, skip, SEEK_CUR) == EOF) + return 0; + fileHeader = _XcursorFileHeaderCreate (head.ntoc); + if (!fileHeader) + return 0; + fileHeader->magic = head.magic; + fileHeader->header = head.header; + fileHeader->version = head.version; + fileHeader->ntoc = head.ntoc; + for (n = 0; n < fileHeader->ntoc; n++) + { + if (!_XcursorReadUInt (file, &fileHeader->tocs[n].type)) + break; + if (!_XcursorReadUInt (file, &fileHeader->tocs[n].subtype)) + break; + if (!_XcursorReadUInt (file, &fileHeader->tocs[n].position)) + break; + } + if (n != fileHeader->ntoc) + { + _XcursorFileHeaderDestroy (fileHeader); + return 0; + } + return fileHeader; +} + +static XcursorUInt +_XcursorFileHeaderLength (XcursorFileHeader *fileHeader) +{ + return (XCURSOR_FILE_HEADER_LEN + + fileHeader->ntoc * XCURSOR_FILE_TOC_LEN); +} + +static XcursorBool +_XcursorWriteFileHeader (XcursorFile *file, XcursorFileHeader *fileHeader) +{ + int toc; + + if (!_XcursorWriteUInt (file, fileHeader->magic)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, fileHeader->header)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, fileHeader->version)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, fileHeader->ntoc)) + return XcursorFalse; + for (toc = 0; toc < fileHeader->ntoc; toc++) + { + if (!_XcursorWriteUInt (file, fileHeader->tocs[toc].type)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, fileHeader->tocs[toc].subtype)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, fileHeader->tocs[toc].position)) + return XcursorFalse; + } + return XcursorTrue; +} + +static XcursorBool +_XcursorSeekToToc (XcursorFile *file, + XcursorFileHeader *fileHeader, + int toc) +{ + if ((*file->seek) (file, fileHeader->tocs[toc].position, SEEK_SET) == EOF) + return XcursorFalse; + return XcursorTrue; +} + +static XcursorBool +_XcursorFileReadChunkHeader (XcursorFile *file, + XcursorFileHeader *fileHeader, + int toc, + XcursorChunkHeader *chunkHeader) +{ + if (!_XcursorSeekToToc (file, fileHeader, toc)) + return XcursorFalse; + if (!_XcursorReadUInt (file, &chunkHeader->header)) + return XcursorFalse; + if (!_XcursorReadUInt (file, &chunkHeader->type)) + return XcursorFalse; + if (!_XcursorReadUInt (file, &chunkHeader->subtype)) + return XcursorFalse; + if (!_XcursorReadUInt (file, &chunkHeader->version)) + return XcursorFalse; + /* sanity check */ + if (chunkHeader->type != fileHeader->tocs[toc].type || + chunkHeader->subtype != fileHeader->tocs[toc].subtype) + return XcursorFalse; + return XcursorTrue; +} + +static XcursorBool +_XcursorFileWriteChunkHeader (XcursorFile *file, + XcursorFileHeader *fileHeader, + int toc, + XcursorChunkHeader *chunkHeader) +{ + if (!_XcursorSeekToToc (file, fileHeader, toc)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, chunkHeader->header)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, chunkHeader->type)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, chunkHeader->subtype)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, chunkHeader->version)) + return XcursorFalse; + return XcursorTrue; +} + +#define dist(a,b) ((a) > (b) ? (a) - (b) : (b) - (a)) + +static XcursorDim +_XcursorFindBestSize (XcursorFileHeader *fileHeader, + XcursorDim size, + int *nsizesp) +{ + int n; + int nsizes = 0; + XcursorDim bestSize = 0; + XcursorDim thisSize; + + for (n = 0; n < fileHeader->ntoc; n++) + { + if (fileHeader->tocs[n].type != XCURSOR_IMAGE_TYPE) + continue; + thisSize = fileHeader->tocs[n].subtype; + if (!bestSize || dist (thisSize, size) < dist (bestSize, size)) + { + bestSize = thisSize; + nsizes = 1; + } + else if (thisSize == bestSize) + nsizes++; + } + *nsizesp = nsizes; + return bestSize; +} + +static int +_XcursorFindImageToc (XcursorFileHeader *fileHeader, + XcursorDim size, + int count) +{ + int toc; + XcursorDim thisSize; + + for (toc = 0; toc < fileHeader->ntoc; toc++) + { + if (fileHeader->tocs[toc].type != XCURSOR_IMAGE_TYPE) + continue; + thisSize = fileHeader->tocs[toc].subtype; + if (thisSize != size) + continue; + if (!count) + break; + count--; + } + if (toc == fileHeader->ntoc) + return -1; + return toc; +} + +static XcursorImage * +_XcursorReadImage (XcursorFile *file, + XcursorFileHeader *fileHeader, + int toc) +{ + XcursorChunkHeader chunkHeader; + XcursorImage head; + XcursorImage *image; + int n; + XcursorPixel *p; + + if (!_XcursorFileReadChunkHeader (file, fileHeader, toc, &chunkHeader)) + return 0; + if (!_XcursorReadUInt (file, &head.width)) + return 0; + if (!_XcursorReadUInt (file, &head.height)) + return 0; + if (!_XcursorReadUInt (file, &head.xhot)) + return 0; + if (!_XcursorReadUInt (file, &head.yhot)) + return 0; + if (!_XcursorReadUInt (file, &head.delay)) + return 0; + /* sanity check data */ + if (head.width >= 0x10000 || head.height > 0x10000) + return 0; + if (head.width == 0 || head.height == 0) + return 0; + if (head.xhot > head.width || head.yhot > head.height) + return 0; + + /* Create the image and initialize it */ + image = XcursorImageCreate (head.width, head.height); + if (chunkHeader.version < image->version) + image->version = chunkHeader.version; + image->size = chunkHeader.subtype; + image->xhot = head.xhot; + image->yhot = head.yhot; + image->delay = head.delay; + n = image->width * image->height; + p = image->pixels; + while (n--) + { + if (!_XcursorReadUInt (file, p)) + { + XcursorImageDestroy (image); + return 0; + } + p++; + } + return image; +} + +static XcursorUInt +_XcursorImageLength (XcursorImage *image) +{ + return XCURSOR_IMAGE_HEADER_LEN + (image->width * image->height) * 4; +} + +static XcursorBool +_XcursorWriteImage (XcursorFile *file, + XcursorFileHeader *fileHeader, + int toc, + XcursorImage *image) +{ + XcursorChunkHeader chunkHeader; + int n; + XcursorPixel *p; + + /* sanity check data */ + if (image->width > XCURSOR_IMAGE_MAX_SIZE || + image->height > XCURSOR_IMAGE_MAX_SIZE) + return XcursorFalse; + if (image->width == 0 || image->height == 0) + return XcursorFalse; + if (image->xhot > image->width || image->yhot > image->height) + return XcursorFalse; + + /* write chunk header */ + chunkHeader.header = XCURSOR_IMAGE_HEADER_LEN; + chunkHeader.type = XCURSOR_IMAGE_TYPE; + chunkHeader.subtype = image->size; + chunkHeader.version = XCURSOR_IMAGE_VERSION; + + if (!_XcursorFileWriteChunkHeader (file, fileHeader, toc, &chunkHeader)) + return XcursorFalse; + + /* write extra image header fields */ + if (!_XcursorWriteUInt (file, image->width)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, image->height)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, image->xhot)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, image->yhot)) + return XcursorFalse; + if (!_XcursorWriteUInt (file, image->delay)) + return XcursorFalse; + + /* write the image */ + n = image->width * image->height; + p = image->pixels; + while (n--) + { + if (!_XcursorWriteUInt (file, *p)) + return XcursorFalse; + p++; + } + return XcursorTrue; +} + +static XcursorComment * +_XcursorReadComment (XcursorFile *file, + XcursorFileHeader *fileHeader, + int toc) +{ + XcursorChunkHeader chunkHeader; + XcursorUInt length; + XcursorComment *comment; + + /* read chunk header */ + if (!_XcursorFileReadChunkHeader (file, fileHeader, toc, &chunkHeader)) + return 0; + /* read extra comment header fields */ + if (!_XcursorReadUInt (file, &length)) + return 0; + comment = XcursorCommentCreate (chunkHeader.subtype, length); + if (!comment) + return 0; + if (!_XcursorReadBytes (file, comment->comment, length)) + { + XcursorCommentDestroy (comment); + return 0; + } + comment->comment[length] = '\0'; + return comment; +} + +static XcursorUInt +_XcursorCommentLength (XcursorComment *comment) +{ + return XCURSOR_COMMENT_HEADER_LEN + strlen (comment->comment); +} + +static XcursorBool +_XcursorWriteComment (XcursorFile *file, + XcursorFileHeader *fileHeader, + int toc, + XcursorComment *comment) +{ + XcursorChunkHeader chunkHeader; + XcursorUInt length; + + length = strlen (comment->comment); + + /* sanity check data */ + if (length > XCURSOR_COMMENT_MAX_LEN) + return XcursorFalse; + + /* read chunk header */ + chunkHeader.header = XCURSOR_COMMENT_HEADER_LEN; + chunkHeader.type = XCURSOR_COMMENT_TYPE; + chunkHeader.subtype = comment->comment_type; + chunkHeader.version = XCURSOR_COMMENT_VERSION; + + if (!_XcursorFileWriteChunkHeader (file, fileHeader, toc, &chunkHeader)) + return XcursorFalse; + + /* write extra comment header fields */ + if (!_XcursorWriteUInt (file, length)) + return XcursorFalse; + + if (!_XcursorWriteBytes (file, comment->comment, length)) + return XcursorFalse; + return XcursorTrue; +} + +XcursorImage * +XcursorXcFileLoadImage (XcursorFile *file, int size) +{ + XcursorFileHeader *fileHeader; + XcursorDim bestSize; + int nsize; + int toc; + XcursorImage *image; + + if (size < 0) + return 0; + fileHeader = _XcursorReadFileHeader (file); + if (!fileHeader) + return 0; + bestSize = _XcursorFindBestSize (fileHeader, (XcursorDim) size, &nsize); + if (!bestSize) + return 0; + toc = _XcursorFindImageToc (fileHeader, bestSize, 0); + if (toc < 0) + return 0; + image = _XcursorReadImage (file, fileHeader, toc); + _XcursorFileHeaderDestroy (fileHeader); + return image; +} + +XcursorImages * +XcursorXcFileLoadImages (XcursorFile *file, int size) +{ + XcursorFileHeader *fileHeader; + XcursorDim bestSize; + int nsize; + XcursorImages *images; + int n; + int toc; + + if (size < 0) + return 0; + fileHeader = _XcursorReadFileHeader (file); + if (!fileHeader) + return 0; + bestSize = _XcursorFindBestSize (fileHeader, (XcursorDim) size, &nsize); + if (!bestSize) + return 0; + images = XcursorImagesCreate (nsize); + if (!images) + return 0; + for (n = 0; n < nsize; n++) + { + toc = _XcursorFindImageToc (fileHeader, bestSize, n); + if (toc < 0) + break; + images->images[images->nimage] = _XcursorReadImage (file, fileHeader, + toc); + if (!images->images[images->nimage]) + break; + images->nimage++; + } + _XcursorFileHeaderDestroy (fileHeader); + if (images->nimage != nsize) + { + XcursorImagesDestroy (images); + images = 0; + } + return images; +} + +XcursorImages * +XcursorXcFileLoadAllImages (XcursorFile *file) +{ + XcursorFileHeader *fileHeader; + XcursorImage *image; + XcursorImages *images; + int nimage; + int n; + int toc; + + fileHeader = _XcursorReadFileHeader (file); + if (!fileHeader) + return 0; + nimage = 0; + for (n = 0; n < fileHeader->ntoc; n++) + { + switch (fileHeader->tocs[n].type) { + case XCURSOR_IMAGE_TYPE: + nimage++; + break; + } + } + images = XcursorImagesCreate (nimage); + if (!images) + return 0; + for (toc = 0; toc < fileHeader->ntoc; toc++) + { + switch (fileHeader->tocs[toc].type) { + case XCURSOR_IMAGE_TYPE: + image = _XcursorReadImage (file, fileHeader, toc); + if (image) + { + images->images[images->nimage] = image; + images->nimage++; + } + break; + } + } + _XcursorFileHeaderDestroy (fileHeader); + if (images->nimage != nimage) + { + XcursorImagesDestroy (images); + images = 0; + } + return images; +} + +XcursorBool +XcursorXcFileLoad (XcursorFile *file, + XcursorComments **commentsp, + XcursorImages **imagesp) +{ + XcursorFileHeader *fileHeader; + int nimage; + int ncomment; + XcursorImages *images; + XcursorImage *image; + XcursorComment *comment; + XcursorComments *comments; + int toc; + + fileHeader = _XcursorReadFileHeader (file); + if (!fileHeader) + return 0; + nimage = 0; + ncomment = 0; + for (toc = 0; toc < fileHeader->ntoc; toc++) + { + switch (fileHeader->tocs[toc].type) { + case XCURSOR_COMMENT_TYPE: + ncomment++; + break; + case XCURSOR_IMAGE_TYPE: + nimage++; + break; + } + } + images = XcursorImagesCreate (nimage); + if (!images) + return 0; + comments = XcursorCommentsCreate (ncomment); + if (!comments) + { + XcursorImagesDestroy (images); + return 0; + } + for (toc = 0; toc < fileHeader->ntoc; toc++) + { + switch (fileHeader->tocs[toc].type) { + case XCURSOR_COMMENT_TYPE: + comment = _XcursorReadComment (file, fileHeader, toc); + if (comment) + { + comments->comments[comments->ncomment] = comment; + comments->ncomment++; + } + break; + case XCURSOR_IMAGE_TYPE: + image = _XcursorReadImage (file, fileHeader, toc); + if (image) + { + images->images[images->nimage] = image; + images->nimage++; + } + break; + } + } + _XcursorFileHeaderDestroy (fileHeader); + if (images->nimage != nimage || comments->ncomment != ncomment) + { + XcursorImagesDestroy (images); + XcursorCommentsDestroy (comments); + images = 0; + comments = 0; + return XcursorFalse; + } + *imagesp = images; + *commentsp = comments; + return XcursorTrue; +} + +XcursorBool +XcursorXcFileSave (XcursorFile *file, + const XcursorComments *comments, + const XcursorImages *images) +{ + XcursorFileHeader *fileHeader; + XcursorUInt position; + int n; + int toc; + + fileHeader = _XcursorFileHeaderCreate (comments->ncomment + images->nimage); + if (!fileHeader) + return XcursorFalse; + + position = _XcursorFileHeaderLength (fileHeader); + + /* + * Compute the toc. Place the images before the comments + * as they're more often read + */ + + toc = 0; + for (n = 0; n < images->nimage; n++) + { + fileHeader->tocs[toc].type = XCURSOR_IMAGE_TYPE; + fileHeader->tocs[toc].subtype = images->images[n]->size; + fileHeader->tocs[toc].position = position; + position += _XcursorImageLength (images->images[n]); + toc++; + } + + for (n = 0; n < comments->ncomment; n++) + { + fileHeader->tocs[toc].type = XCURSOR_COMMENT_TYPE; + fileHeader->tocs[toc].subtype = comments->comments[n]->comment_type; + fileHeader->tocs[toc].position = position; + position += _XcursorCommentLength (comments->comments[n]); + toc++; + } + + /* + * Write the header and the toc + */ + if (!_XcursorWriteFileHeader (file, fileHeader)) + goto bail; + + /* + * Write the images + */ + toc = 0; + for (n = 0; n < images->nimage; n++) + { + if (!_XcursorWriteImage (file, fileHeader, toc, images->images[n])) + goto bail; + toc++; + } + + /* + * Write the comments + */ + for (n = 0; n < comments->ncomment; n++) + { + if (!_XcursorWriteComment (file, fileHeader, toc, comments->comments[n])) + goto bail; + toc++; + } + + _XcursorFileHeaderDestroy (fileHeader); + return XcursorTrue; +bail: + _XcursorFileHeaderDestroy (fileHeader); + return XcursorFalse; +} + +static int +_XcursorStdioFileRead (XcursorFile *file, unsigned char *buf, int len) +{ + FILE *f = file->closure; + return fread (buf, 1, len, f); +} + +static int +_XcursorStdioFileWrite (XcursorFile *file, unsigned char *buf, int len) +{ + FILE *f = file->closure; + return fwrite (buf, 1, len, f); +} + +static int +_XcursorStdioFileSeek (XcursorFile *file, long offset, int whence) +{ + FILE *f = file->closure; + return fseek (f, offset, whence); +} + +static void +_XcursorStdioFileInitialize (FILE *stdfile, XcursorFile *file) +{ + file->closure = stdfile; + file->read = _XcursorStdioFileRead; + file->write = _XcursorStdioFileWrite; + file->seek = _XcursorStdioFileSeek; +} + +XcursorImage * +XcursorFileLoadImage (FILE *file, int size) +{ + XcursorFile f; + + _XcursorStdioFileInitialize (file, &f); + return XcursorXcFileLoadImage (&f, size); +} + +XcursorImages * +XcursorFileLoadImages (FILE *file, int size) +{ + XcursorFile f; + + _XcursorStdioFileInitialize (file, &f); + return XcursorXcFileLoadImages (&f, size); +} + +XcursorImages * +XcursorFileLoadAllImages (FILE *file) +{ + XcursorFile f; + + _XcursorStdioFileInitialize (file, &f); + return XcursorXcFileLoadAllImages (&f); +} + +XcursorBool +XcursorFileLoad (FILE *file, + XcursorComments **commentsp, + XcursorImages **imagesp) +{ + XcursorFile f; + + _XcursorStdioFileInitialize (file, &f); + return XcursorXcFileLoad (&f, commentsp, imagesp); +} + +XcursorBool +XcursorFileSaveImages (FILE *file, const XcursorImages *images) +{ + XcursorComments *comments = XcursorCommentsCreate (0); + XcursorFile f; + XcursorBool ret; + if (!comments) + return 0; + _XcursorStdioFileInitialize (file, &f); + ret = XcursorXcFileSave (&f, comments, images) && fflush (file) != EOF; + XcursorCommentsDestroy (comments); + return ret; +} + +XcursorBool +XcursorFileSave (FILE * file, + const XcursorComments *comments, + const XcursorImages *images) +{ + XcursorFile f; + + _XcursorStdioFileInitialize (file, &f); + return XcursorXcFileSave (&f, comments, images) && fflush (file) != EOF; +} + +XcursorImage * +XcursorFilenameLoadImage (const char *file, int size) +{ + FILE *f; + XcursorImage *image; + + f = fopen (file, "r"); + if (!f) + return 0; + image = XcursorFileLoadImage (f, size); + fclose (f); + return image; +} + +XcursorImages * +XcursorFilenameLoadImages (const char *file, int size) +{ + FILE *f; + XcursorImages *images; + + f = fopen (file, "r"); + if (!f) + return 0; + images = XcursorFileLoadImages (f, size); + fclose (f); + return images; +} + +XcursorImages * +XcursorFilenameLoadAllImages (const char *file) +{ + FILE *f; + XcursorImages *images; + + f = fopen (file, "r"); + if (!f) + return 0; + images = XcursorFileLoadAllImages (f); + fclose (f); + return images; +} + +XcursorBool +XcursorFilenameLoad (const char *file, + XcursorComments **commentsp, + XcursorImages **imagesp) +{ + FILE *f; + XcursorBool ret; + + f = fopen (file, "r"); + if (!f) + return 0; + ret = XcursorFileLoad (f, commentsp, imagesp); + fclose (f); + return ret; +} + +XcursorBool +XcursorFilenameSaveImages (const char *file, const XcursorImages *images) +{ + FILE *f; + XcursorBool ret; + + f = fopen (file, "w"); + if (!f) + return 0; + ret = XcursorFileSaveImages (f, images); + return fclose (f) != EOF && ret; +} + +XcursorBool +XcursorFilenameSave (const char *file, + const XcursorComments *comments, + const XcursorImages *images) +{ + FILE *f; + XcursorBool ret; + + f = fopen (file, "w"); + if (!f) + return 0; + ret = XcursorFileSave (f, comments, images); + return fclose (f) != EOF && ret; +} + Index: xc/lib/Xcursor/library.c diff -u /dev/null xc/lib/Xcursor/library.c:1.2 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/library.c Sat Jan 25 22:22:42 2003 @@ -0,0 +1,460 @@ +/* + * $XFree86: xc/lib/Xcursor/library.c,v 1.2 2003/01/26 03:22:42 eich Exp $ + * + * Copyright © 2002 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 "xcursorint.h" +#include +#include + +#ifndef ICONDIR +#define ICONDIR "/usr/X11R6/lib/X11/icons" +#endif + +#define CURSORPATH "~/.icons:/usr/share/icons:/usr/share/pixmaps:"ICONDIR + +static const char * +_XcursorLibraryPath (void) +{ + static const char *path; + + if (!path) + { + path = getenv ("XCURSOR_PATH"); + if (!path) + path = CURSORPATH; + } + return path; +} + +static void +_XcursorAddPathElt (char *path, const char *elt, int len) +{ + int pathlen = strlen (path); + + /* append / if the path doesn't currently have one */ + if (path[0] == '\0' || path[pathlen - 1] != '/') + { + strcat (path, "/"); + pathlen++; + } + if (len == -1) + len = strlen (elt); + /* strip leading slashes */ + while (len && elt[0] == '/') + { + elt++; + len--; + } + strncpy (path + pathlen, elt, len); + path[pathlen + len] = '\0'; +} + +static char * +_XcursorBuildThemeDir (const char *dir, const char *theme) +{ + const char *colon; + const char *tcolon; + char *full; + char *home; + int dirlen; + int homelen; + int themelen; + int len; + + colon = strchr (dir, ':'); + if (!colon) + colon = dir + strlen (dir); + + dirlen = colon - dir; + + tcolon = strchr (theme, ':'); + if (!tcolon) + tcolon = theme + strlen (theme); + + themelen = tcolon - theme; + + home = 0; + homelen = 0; + if (*dir == '~') + { + home = getenv ("HOME"); + if (!home) + return 0; + homelen = strlen (home); + dir++; + dirlen--; + } + + len = homelen + dirlen + 1 + themelen + 1; + + full = malloc (len); + if (!full) + return 0; + full[0] = '\0'; + + if (home) + _XcursorAddPathElt (full, home, -1); + _XcursorAddPathElt (full, dir, dirlen); + _XcursorAddPathElt (full, theme, themelen); + return full; +} + +static char * +_XcursorBuildFullname (const char *dir, const char *subdir, const char *file) +{ + char *full; + + full = malloc (strlen (dir) + 1 + strlen (subdir) + 1 + strlen (file) + 1); + if (!full) + return 0; + full[0] = '\0'; + _XcursorAddPathElt (full, dir, -1); + _XcursorAddPathElt (full, subdir, -1); + _XcursorAddPathElt (full, file, -1); + return full; +} + +static const char * +_XcursorNextPath (const char *path) +{ + char *colon = strchr (path, ':'); + + if (!colon) + return 0; + return colon + 1; +} + +#define XcursorWhite(c) ((c) == ' ' || (c) == '\t' || (c) == '\n') +#define XcursorSep(c) ((c) == ';' || (c) == ',') + +static char * +_XcursorThemeInherits (const char *full) +{ + char line[8192]; + char *result = 0; + FILE *f; + + f = fopen (full, "r"); + if (f) + { + while (fgets (line, sizeof (line), f)) + { + if (!strncmp (line, "Inherits", 8)) + { + char *l = line + 8; + char *r; + while (*l == ' ') l++; + if (*l != '=') continue; + l++; + while (*l == ' ') l++; + result = malloc (strlen (l)); + if (result) + { + r = result; + while (*l) + { + while (XcursorSep(*l) || XcursorWhite (*l)) l++; + if (!*l) + break; + if (r != result) + *r++ = ':'; + while (*l && !XcursorWhite(*l) && + !XcursorSep(*l)) + *r++ = *l++; + } + *r++ = '\0'; + } + break; + } + } + fclose (f); + } + return result; +} + +#define XCURSOR_SCAN_CORE ((FILE *) 1) + +static FILE * +XcursorScanTheme (const char *theme, const char *name) +{ + FILE *f = 0; + char *full; + char *dir; + const char *path; + char *inherits = 0; + const char *i; + + /* + * XCURSOR_CORE_THEME is a magic name; cursors from the core set + * are never found in any directory. Instead, a magic value is + * returned which truncates any search so that overlying functions + * can switch to equivalent core cursors + */ + if (!strcmp (theme, XCURSOR_CORE_THEME) && XcursorLibraryShape (name) >= 0) + return XCURSOR_SCAN_CORE; + /* + * Scan this theme + */ + for (path = _XcursorLibraryPath (); + path && f == 0; + path = _XcursorNextPath (path)) + { + dir = _XcursorBuildThemeDir (path, theme); + if (dir) + { + full = _XcursorBuildFullname (dir, "cursors", name); + if (full) + { + f = fopen (full, "r"); + free (full); + } + if (!f && !inherits) + { + full = _XcursorBuildFullname (dir, "", "index.theme"); + if (full) + { + inherits = _XcursorThemeInherits (full); + free (full); + } + } + free (dir); + } + } + /* + * Recurse to scan inherited themes + */ + for (i = inherits; i && f == 0; i = _XcursorNextPath (i)) + f = XcursorScanTheme (i, name); + if (inherits) + free (inherits); + return f; +} + +XcursorImage * +XcursorLibraryLoadImage (const char *file, const char *theme, int size) +{ + FILE *f = 0; + XcursorImage *image = 0; + + if (theme) + f = XcursorScanTheme (theme, file); + if (!f) + f = XcursorScanTheme ("default", file); + if (f == XCURSOR_SCAN_CORE) + return 0; + if (f) + { + image = XcursorFileLoadImage (f, size); + fclose (f); + } + return image; +} + +XcursorImages * +XcursorLibraryLoadImages (const char *file, const char *theme, int size) +{ + FILE *f = 0; + XcursorImages *images = 0; + + if (theme) + f = XcursorScanTheme (theme, file); + if (!f) + f = XcursorScanTheme ("default", file); + if (f == XCURSOR_SCAN_CORE) + return 0; + if (f) + { + images = XcursorFileLoadImages (f, size); + fclose (f); + } + return images; +} + +Cursor +XcursorLibraryLoadCursor (Display *dpy, const char *file) +{ + int size = XcursorGetDefaultSize (dpy); + char *theme = XcursorGetTheme (dpy); + XcursorImages *images = XcursorLibraryLoadImages (file, theme, size); + Cursor cursor; + + if (!images) + { + int id = XcursorLibraryShape (file); + + if (id >= 0) + return _XcursorCreateFontCursor (dpy, id); + else + return 0; + } + cursor = XcursorImagesLoadCursor (dpy, images); + XcursorImagesDestroy (images); + return cursor; +} + +XcursorCursors * +XcursorLibraryLoadCursors (Display *dpy, const char *file) +{ + int size = XcursorGetDefaultSize (dpy); + char *theme = XcursorGetTheme (dpy); + XcursorImages *images = XcursorLibraryLoadImages (file, theme, size); + XcursorCursors *cursors; + + if (!images) + { + int id = XcursorLibraryShape (file); + + if (id >= 0) + { + cursors = XcursorCursorsCreate (dpy, 1); + if (cursors) + { + cursors->cursors[0] = _XcursorCreateFontCursor (dpy, id); + if (cursors->cursors[0] == None) + { + XcursorCursorsDestroy (cursors); + cursors = 0; + } + else + cursors->ncursor = 1; + } + } + else + cursors = 0; + } + else + { + cursors = XcursorImagesLoadCursors (dpy, images); + XcursorImagesDestroy (images); + } + return cursors; +} + +const static char *_XcursorStandardNames[] = { + /* 0 */ + "X_cursor", "arrow", "based_arrow_down", "based_arrow_up", + "boat", "bogosity", "bottom_left_corner", "bottom_right_corner", + "bottom_side", "bottom_tee", "box_spiral", "center_ptr", + "circle", "clock", "coffee_mug", "cross", + + /* 32 */ + "cross_reverse", "crosshair", "diamond_cross", "dot", + "dotbox", "double_arrow", "draft_large", "draft_small", + "draped_box", "exchange", "fleur", "gobbler", + "gumby", "hand1", "hand2", "heart", + + /* 64 */ + "icon", "iron_cross", "left_ptr", "left_side", + "left_tee", "leftbutton", "ll_angle", "lr_angle", + "man", "middlebutton", "mouse", "pencil", + "pirate", "plus", "question_arrow", "right_ptr", + + /* 96 */ + "right_side", "right_tee", "rightbutton", "rtl_logo", + "sailboat", "sb_down_arrow", "sb_h_double_arrow", "sb_left_arrow", + "sb_right_arrow", "sb_up_arrow", "sb_v_double_arrow", "shuttle", + "sizing", "spider", "spraycan", "star", + + /* 128 */ + "target", "tcross", "top_left_arrow", "top_left_corner", + "top_right_corner", "top_side", "top_tee", "trek", + "ul_angle", "umbrella", "ur_angle", "watch", + "xterm", +}; + +#define NUM_STANDARD_NAMES (sizeof _XcursorStandardNames / sizeof _XcursorStandardNames[0]) + +XcursorImage * +XcursorShapeLoadImage (unsigned int shape, const char *theme, int size) +{ + unsigned int id = shape >> 1; + + if (id < NUM_STANDARD_NAMES) + return XcursorLibraryLoadImage (_XcursorStandardNames[id], + theme, size); + else + return 0; +} + +XcursorImages * +XcursorShapeLoadImages (unsigned int shape, const char *theme, int size) +{ + unsigned int id = shape >> 1; + + if (id < NUM_STANDARD_NAMES) + return XcursorLibraryLoadImages (_XcursorStandardNames[id], + theme, size); + else + return 0; +} + +Cursor +XcursorShapeLoadCursor (Display *dpy, unsigned int shape) +{ + unsigned int id = shape >> 1; + + if (id < NUM_STANDARD_NAMES) + return XcursorLibraryLoadCursor (dpy, _XcursorStandardNames[id]); + else + return 0; +} + +XcursorCursors * +XcursorShapeLoadCursors (Display *dpy, unsigned int shape) +{ + unsigned int id = shape >> 1; + + if (id < NUM_STANDARD_NAMES) + return XcursorLibraryLoadCursors (dpy, _XcursorStandardNames[id]); + else + return 0; +} + +int +XcursorLibraryShape (const char *library) +{ + int low, high; + int mid; + int c; + + low = 0; + high = NUM_STANDARD_NAMES - 1; + while (low < high - 1) + { + mid = (low + high) >> 1; + c = strcmp (library, _XcursorStandardNames[mid]); + if (c == 0) + return (mid << 1); + if (c > 0) + low = mid; + else + high = mid; + } + while (low <= high) + { + if (!strcmp (library, _XcursorStandardNames[low])) + return (low << 1); + low++; + } + return -1; +} Index: xc/lib/Xcursor/xcursor-config.in diff -u /dev/null xc/lib/Xcursor/xcursor-config.in:1.1 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/xcursor-config.in Thu Aug 29 00:40:34 2002 @@ -0,0 +1,94 @@ +#! /bin/sh + +prefix="@prefix@" +exec_prefix="@exec_prefix@" +libdir="@libdir@" +includedir="@includedir@" +version="@PACKAGE_VERSION@" + +usage() +{ + cat <&2 +fi + +while test $# -gt 0 ; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + local_prefix=yes + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + local_prefix=yes + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --version) + echo $version + exit 0 + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +if test "$local_prefix" = "yes" ; then + if test "$exec_prefix_set" != "yes" ; then + exec_prefix=$prefix + fi +fi + +if test "$echo_prefix" = "yes" ; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes" ; then + echo $exec_prefix +fi + +if test "$echo_cflags" = "yes" ; then + cflags="-I${includedir}" + echo $cflags +fi + +if test "$echo_libs" = "yes" ; then + libs="-lXcursor" + if test "${libdir}" != "/usr/lib" ; then + echo -L${libdir} $libs + else + echo $libs + fi +fi + +# EOF Index: xc/lib/Xcursor/xcursor.pc.in diff -u /dev/null xc/lib/Xcursor/xcursor.pc.in:1.1 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/xcursor.pc.in Thu Aug 29 00:40:34 2002 @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Xcursor +Description: X Cursor library +Version: @PACKAGE_VERSION@ +Requires: +Libs: -L${libdir} -lXcursor +Cflags: -I${includedir} Index: xc/lib/Xcursor/xcursorint.h diff -u /dev/null xc/lib/Xcursor/xcursorint.h:1.4 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/xcursorint.h Sat Jan 25 22:22:42 2003 @@ -0,0 +1,98 @@ +/* + * $XFree86: xc/lib/Xcursor/xcursorint.h,v 1.4 2003/01/26 03:22:42 eich Exp $ + * + * Copyright © 2002 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. + */ + +#ifndef _XCURSORINT_H_ +#define _XCURSORINT_H_ + +#include +#include +#include +#include "Xcursor.h" + +typedef struct _XcursorFontInfo { + struct _XcursorFontInfo *next; + Font font; + XcursorBool is_cursor_font; +} XcursorFontInfo; + +/* + * Track a few recently created bitmaps to see + * if they get used to create cursors. This + * is done by hooking into Xlib and watching + * for XCreatePixmap, XPutImage, XCreatePixmapCursor + * with appropriate arguments. When this happens + * Xcursor computes a hash value for the source image + * and tries to load a library cursor of that name. + */ + +/* large bitmaps are unlikely to be cursors */ +#define MAX_BITMAP_CURSOR_SIZE 64 +/* don't need to remember very many; in fact, 2 is likely sufficient */ +#define NUM_BITMAPS 8 + +typedef struct _XcursorBitmapInfo { + Pixmap bitmap; + unsigned long sequence; + unsigned int width, height; + Bool has_image; + unsigned char hash[XCURSOR_BITMAP_HASH_SIZE]; +} XcursorBitmapInfo; + +typedef enum _XcursorDither { + XcursorDitherThreshold, + XcursorDitherMedian, + XcursorDitherOrdered, + XcursorDitherDiffuse +} XcursorDither; + +typedef struct _XcursorDisplayInfo { + struct _XcursorDisplayInfo *next; + Display *display; + XExtCodes *codes; + XcursorBool has_render_cursor; + XcursorBool has_anim_cursor; + XcursorBool theme_core; + int size; + XcursorFontInfo *fonts; + char *theme; + XcursorDither dither; + XcursorBitmapInfo bitmaps[NUM_BITMAPS]; +} XcursorDisplayInfo; + +XcursorDisplayInfo * +_XcursorGetDisplayInfo (Display *dpy); + +Cursor +_XcursorCreateGlyphCursor(Display *dpy, + Font source_font, + Font mask_font, + unsigned int source_char, + unsigned int mask_char, + XColor _Xconst *foreground, + XColor _Xconst *background); + +Cursor +_XcursorCreateFontCursor (Display *dpy, unsigned int shape); + +#endif /* _XCURSORINT_H_ */ Index: xc/lib/Xcursor/xlib.c diff -u /dev/null xc/lib/Xcursor/xlib.c:1.4 --- /dev/null Thu Feb 27 12:27:20 2003 +++ xc/lib/Xcursor/xlib.c Sat Feb 22 01:16:15 2003 @@ -0,0 +1,399 @@ +/* + * $XFree86: xc/lib/Xcursor/xlib.c,v 1.4 2003/02/22 06:16:15 dawes Exp $ + * + * Copyright © 2002 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 "xcursorint.h" +#include +#include +#include + +static XcursorBool +_XcursorFontIsCursor (Display *dpy, Font font) +{ + XcursorFontInfo *fi; + XcursorDisplayInfo *info; + XcursorBool ret; + XFontStruct *fs; + int n; + Atom cursor; + + if (font == dpy->cursor_font) + return XcursorTrue; + + info = _XcursorGetDisplayInfo (dpy); + if (!info) + return XcursorFalse; + LockDisplay (dpy); + for (fi = info->fonts; fi; fi = fi->next) + if (fi->font == font) + { + ret = fi->is_cursor_font; + UnlockDisplay (dpy); + return ret; + } + UnlockDisplay (dpy); + ret = XcursorFalse; + fs = XQueryFont (dpy, font); + if (fs) + { + cursor = XInternAtom (dpy, "cursor", False); + for (n = 0; n < fs->n_properties; n++) + if (fs->properties[n].name == XA_FONT) + { + ret = (fs->properties[n].card32 == cursor); + break; + } + } + fi = malloc (sizeof (XcursorFontInfo)); + if (fi) + { + fi->font = font; + fi->is_cursor_font = ret; + LockDisplay (dpy); + fi->next = info->fonts; + info->fonts = fi; + UnlockDisplay (dpy); + } + return ret; +} + +Cursor +XcursorTryShapeCursor (Display *dpy, + Font source_font, + Font mask_font, + unsigned int source_char, + unsigned int mask_char, + XColor _Xconst *foreground, + XColor _Xconst *background) +{ + Cursor cursor = None; + + if (!XcursorSupportsARGB (dpy) && !XcursorGetThemeCore (dpy)) + return None; + + if (source_font == mask_font && + _XcursorFontIsCursor (dpy, source_font) && + source_char + 1 == mask_char) + { + int size = XcursorGetDefaultSize (dpy); + char *theme = XcursorGetTheme (dpy); + XcursorImages *images = XcursorShapeLoadImages (source_char, theme, size); + + if (images) + { + cursor = XcursorImagesLoadCursor (dpy, images); + XcursorImagesDestroy (images); + } + } + return cursor; +} + +void +XcursorNoticeCreateBitmap (Display *dpy, + Pixmap pid, + unsigned int width, + unsigned int height) +{ + XcursorDisplayInfo *info; + unsigned long oldest; + unsigned long now; + int i; + int replace = 0; + XcursorBitmapInfo *bmi; + + if (!XcursorSupportsARGB (dpy) && !XcursorGetThemeCore (dpy)) + return; + + if (width > MAX_BITMAP_CURSOR_SIZE || height > MAX_BITMAP_CURSOR_SIZE) + return; + + info = _XcursorGetDisplayInfo (dpy); + if (!info) + return; + + LockDisplay (dpy); + replace = 0; + now = dpy->request; + oldest = now; + for (i = 0; i < NUM_BITMAPS; i++) + { + if (!info->bitmaps[i].bitmap) + { + replace = i; + break; + } + if ((long) (now - info->bitmaps[i].sequence) > + (long) (now - oldest)) + { + replace = i; + oldest = info->bitmaps[i].sequence; + } + } + bmi = &info->bitmaps[replace]; + bmi->bitmap = pid; + bmi->sequence = now; + bmi->width = width; + bmi->height = height; + bmi->has_image = False; + UnlockDisplay (dpy); +} + +static XcursorBitmapInfo * +_XcursorGetBitmap (Display *dpy, Pixmap bitmap) +{ + XcursorDisplayInfo *info = _XcursorGetDisplayInfo (dpy); + int i; + + if (!info) + return 0; + LockDisplay (dpy); + for (i = 0; i < NUM_BITMAPS; i++) + if (info->bitmaps[i].bitmap == bitmap) + { + info->bitmaps[i].sequence = dpy->request; + UnlockDisplay (dpy); + return &info->bitmaps[i]; + } + UnlockDisplay (dpy); + return 0; +} + +static Bool +_XcursorClientLSB (void) +{ + int v = 1; + return *((char *) &v) == 1; +} + +/* stolen from Xlib */ +static unsigned char const _reverse_byte[0x100] = { + 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, + 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, + 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, + 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, + 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, + 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, + 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, + 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, + 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, + 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, + 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, + 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, + 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, + 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, + 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, + 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, + 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, + 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, + 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, + 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, + 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, + 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, + 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, + 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, + 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, + 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, + 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, + 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, + 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, + 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, + 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, + 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff +}; + +#define RotByte(t,i) (((t) << (i)) | ((t) >> (8 - (i)))) + +void +XcursorImageHash (XImage *image, + unsigned char hash[XCURSOR_BITMAP_HASH_SIZE]) +{ + int i; + int x, y; + unsigned char *line; + unsigned char t; + int low_addr; + Bool bit_swap; + + for (i = 0; i < XCURSOR_BITMAP_HASH_SIZE; i++) + hash[i] = 0; + /* + * Flip byte order on MSB machines where the bitmap_unit isn't + * in bytes + */ + low_addr = 0; + if (image->bitmap_unit != 8) + { + if (!_XcursorClientLSB()) + switch (image->bitmap_unit) { + case 16: + low_addr = 1; + break; + case 32: + low_addr = 3; + break; + } + } + /* + * Flip bit order on MSB images + */ + bit_swap = (image->bitmap_bit_order != LSBFirst); + + line = (unsigned char *) image->data; + i = 0; + /* + * Compute the hash. Yes, it might be nice to use + * a stronger hash function, but MD5 and SHA1 are both + * a bit to expensive in time and space for this, + * and cursors are generally small enough that a weak + * hash is sufficient to distinguish among them. + */ + for (y = 0; y < image->height; y++) + { + for (x = 0; x < image->bytes_per_line; x++) + { + t = line[x^low_addr]; + if (bit_swap) + t = _reverse_byte[t]; + if (t) + hash[(i++) & (XCURSOR_BITMAP_HASH_SIZE - 1)] ^= RotByte (t, y & 7); + } + line += image->bytes_per_line; + } +} + +static Bool +_XcursorLogDiscover (void) +{ + static Bool been_here; + static Bool log; + + if (!been_here) + { + been_here = True; + + if (getenv ("XCURSOR_DISCOVER")) + log = True; + } + return log; +} + +void +XcursorNoticePutBitmap (Display *dpy, + Drawable draw, + XImage *image) +{ + XcursorBitmapInfo *bmi; + + if (!XcursorSupportsARGB (dpy) && !XcursorGetThemeCore (dpy)) + return; + + if (image->width > MAX_BITMAP_CURSOR_SIZE || + image->height > MAX_BITMAP_CURSOR_SIZE) + return; + + bmi = _XcursorGetBitmap (dpy, (Pixmap) draw); + if (!bmi) + return; + /* + * Make sure the image fills the bitmap + */ + if (image->width != bmi->width || image->height != bmi->height) + { + bmi->bitmap = 0; + return; + } + /* + * If multiple images are placed in the same bitmap, + * assume it's not going to be a cursor + */ + if (bmi->has_image) + { + bmi->bitmap = 0; + return; + } + /* + * Make sure the image is valid + */ + if (image->bytes_per_line & ((image->bitmap_unit >> 3) - 1)) + { + bmi->bitmap = 0; + return; + } + /* + * Hash the image + */ + XcursorImageHash (image, bmi->hash); + /* + * Display the hash value and the image if + * requested so that users can find out what + * cursor name is associated with each image + */ + if (_XcursorLogDiscover()) + { + int x, y; + int i; + XImage t = *image; + + XInitImage (&t); + + printf ("Cursor image name: "); + for (i = 0; i < XCURSOR_BITMAP_HASH_SIZE; i++) + printf ("%02x", bmi->hash[i]); + printf ("\n"); + for (y = 0; y < image->height; y++) + { + for (x = 0; x < image->width; x++) + putchar (XGetPixel (&t, x, y) ? '*' : ' '); + putchar ('\n'); + } + } + bmi->has_image = True; +} + +Cursor +XcursorTryShapeBitmapCursor (Display *dpy, + Pixmap source, + Pixmap mask, + XColor *foreground, + XColor *background, + unsigned int x, + unsigned int y) +{ + XcursorBitmapInfo *bmi; + char name[8 * XCURSOR_BITMAP_HASH_SIZE]; + int i; + Cursor cursor; + + if (!XcursorSupportsARGB (dpy) && !XcursorGetThemeCore (dpy)) + return None; + + bmi = _XcursorGetBitmap (dpy, source); + if (!bmi || !bmi->has_image) + return None; + for (i = 0; i < XCURSOR_BITMAP_HASH_SIZE; i++) + sprintf (name + 2 * i, "%02x", bmi->hash[i]); + cursor = XcursorLibraryLoadCursor (dpy, name); + if (_XcursorLogDiscover()) + printf ("Cursor hash %s returns 0x%x\n", name, (unsigned int) cursor); + return cursor; +} Index: xc/lib/Xext/DPMS.c diff -u xc/lib/Xext/DPMS.c:3.4 xc/lib/Xext/DPMS.c:3.6 --- xc/lib/Xext/DPMS.c:3.4 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/DPMS.c Tue Oct 15 22:19:22 2002 @@ -26,19 +26,19 @@ Equipment Corporation. ******************************************************************/ -/* $XFree86: xc/lib/Xext/DPMS.c,v 3.4 2001/01/17 19:42:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/DPMS.c,v 3.6 2002/10/16 02:19:22 dawes Exp $ */ /* * HISTORY */ #define NEED_REPLIES -#include "Xlibint.h" -#include "dpms.h" -#include "dpmsstr.h" -#include "Xext.h" -#include "extutil.h" -#include "stdio.h" +#include +#include +#include +#include +#include +#include static XExtensionInfo _dpms_info_data; static XExtensionInfo *dpms_info = &_dpms_info_data; @@ -53,7 +53,7 @@ * * *****************************************************************************/ -static int close_display(); +static int close_display(Display *dpy, XExtCodes *codes); static /* const */ XExtensionHooks dpms_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ Index: xc/lib/Xext/Imakefile diff -u xc/lib/Xext/Imakefile:1.11 xc/lib/Xext/Imakefile:1.12 --- xc/lib/Xext/Imakefile:1.11 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/Imakefile Tue Oct 15 20:37:27 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.11 2001/01/17 19:42:46 dawes Exp $ +XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.12 2002/10/16 00:37:27 dawes Exp $ #define DoNormalLib NormalLibXext #define DoSharedLib SharedLibXext @@ -30,7 +30,7 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) + INCLUDES = -I$(XLIBSRC) SRCS = globals.c extutil.c XMultibuf.c XShape.c $(SHMSRCS) \ MITMisc.c XTestExt1.c XSync.c Xdbe.c XLbx.c \ XSecurity.c XAppgroup.c Xcup.c DPMS.c XEVI.c Index: xc/lib/Xext/MITMisc.c diff -u xc/lib/Xext/MITMisc.c:1.2 xc/lib/Xext/MITMisc.c:1.4 --- xc/lib/Xext/MITMisc.c:1.2 Fri Dec 14 14:54:59 2001 +++ xc/lib/Xext/MITMisc.c Tue Oct 15 22:19:22 2002 @@ -24,15 +24,16 @@ in this Software without prior written authorization from The Open Group. * */ +/* $XFree86: xc/lib/Xext/MITMisc.c,v 1.4 2002/10/16 02:19:22 dawes Exp $ */ /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM BLESSING */ #define NEED_REPLIES -#include "Xlibint.h" -#include "MITMisc.h" -#include "mitmiscstr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include +#include static XExtensionInfo _mit_info_data; static XExtensionInfo *mit_info = &_mit_info_data; @@ -47,7 +48,7 @@ * * *****************************************************************************/ -static int close_display(); +static int close_display(Display *dpy, XExtCodes *codes); static /* const */ XExtensionHooks mit_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ Index: xc/lib/Xext/XAppgroup.c diff -u xc/lib/Xext/XAppgroup.c:1.9 xc/lib/Xext/XAppgroup.c:1.11 --- xc/lib/Xext/XAppgroup.c:1.9 Fri Dec 14 14:54:59 2001 +++ xc/lib/Xext/XAppgroup.c Tue Oct 15 22:19:22 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.9 2001/12/14 19:54:59 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.11 2002/10/16 02:19:22 dawes Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -38,10 +38,10 @@ #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "Xagstr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include #include @@ -69,7 +69,7 @@ * * *****************************************************************************/ -static int close_display(); +static int close_display(Display *dpy, XExtCodes *codes); static /* const */ XExtensionHooks xag_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ @@ -129,10 +129,7 @@ } static void -StuffToWire (dpy, stuff, req) - Display* dpy; - struct xagstuff* stuff; - xXagCreateReq* req; +StuffToWire (Display *dpy, struct xagstuff *stuff, xXagCreateReq *req) { unsigned long values[8]; unsigned long* value = values; Index: xc/lib/Xext/XEVI.c diff -u xc/lib/Xext/XEVI.c:1.6 xc/lib/Xext/XEVI.c:1.7 --- xc/lib/Xext/XEVI.c:1.6 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/XEVI.c Tue Oct 15 20:37:27 2002 @@ -21,13 +21,14 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/Xext/XEVI.c,v 1.7 2002/10/16 00:37:27 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "XEVI.h" -#include "XEVIstr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include static XExtensionInfo *xevi_info;/* needs to move to globals.c */ static /* const */ char *xevi_extension_name = EVINAME; Index: xc/lib/Xext/XLbx.c diff -u xc/lib/Xext/XLbx.c:1.3 xc/lib/Xext/XLbx.c:1.5 --- xc/lib/Xext/XLbx.c:1.3 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/XLbx.c Tue Oct 15 22:19:22 2002 @@ -22,16 +22,16 @@ * * Author: Keith Packard, Network Computing Devices */ -/* $XFree86: xc/lib/Xext/XLbx.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XLbx.c,v 1.5 2002/10/16 02:19:22 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES #include -#include "Xlibint.h" -#include "XLbx.h" -#include "lbxstr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include +#include static XExtensionInfo _lbx_info_data; static XExtensionInfo *lbx_info = &_lbx_info_data; @@ -40,8 +40,9 @@ #define LbxCheckExtension(dpy,i,val) \ XextCheckExtension (dpy, i, lbx_extension_name, val) -static int close_display(); -static char *error_string(); +static int close_display(Display *dpy, XExtCodes *codes); +static char *error_string(Display *dpy, int code, XExtCodes *codes, + char *buf, int n); static /* const */ XExtensionHooks lbx_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ @@ -86,8 +87,7 @@ } -int XLbxGetEventBase(dpy) - Display *dpy; +int XLbxGetEventBase(Display *dpy) { XExtDisplayInfo *info = find_display (dpy); Index: xc/lib/Xext/XMultibuf.c diff -u xc/lib/Xext/XMultibuf.c:1.5 xc/lib/Xext/XMultibuf.c:1.6 --- xc/lib/Xext/XMultibuf.c:1.5 Fri Dec 14 14:55:00 2001 +++ xc/lib/Xext/XMultibuf.c Tue Oct 15 20:37:27 2002 @@ -25,15 +25,15 @@ * * Authors: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xext/XMultibuf.c,v 1.5 2001/12/14 19:55:00 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XMultibuf.c,v 1.6 2002/10/16 00:37:27 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES #include #include -#include "Xext.h" /* in ../include */ -#include "extutil.h" /* in ../include */ -#include "multibufst.h" /* in ../include */ +#include +#include +#include static XExtensionInfo _multibuf_info_data; static XExtensionInfo *multibuf_info = &_multibuf_info_data; Index: xc/lib/Xext/XSecurity.c diff -u xc/lib/Xext/XSecurity.c:1.4 xc/lib/Xext/XSecurity.c:1.6 --- xc/lib/Xext/XSecurity.c:1.4 Fri Dec 14 14:55:00 2001 +++ xc/lib/Xext/XSecurity.c Tue Oct 15 22:19:22 2002 @@ -24,13 +24,13 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xext/XSecurity.c,v 1.4 2001/12/14 19:55:00 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XSecurity.c,v 1.6 2002/10/16 02:19:22 dawes Exp $ */ #include #include -#include "Xext.h" -#include "extutil.h" -#include "securstr.h" +#include +#include +#include static XExtensionInfo _Security_info_data; static XExtensionInfo *Security_info = &_Security_info_data; @@ -54,10 +54,12 @@ /* * find_display - locate the display info block */ -static int close_display(); -static Bool wire_to_event(); -static Status event_to_wire(); -static char *error_string(); +static int close_display(Display *dpy, XExtCodes *codes); +static Bool wire_to_event(Display *dpy, XEvent *event, xEvent *wire); +static Status event_to_wire(Display *dpy, XEvent *event, xEvent *wire); +static char *error_string(Display *dpy, int code, XExtCodes *codes, + char *buf, int n); + static XExtensionHooks Security_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ @@ -78,21 +80,18 @@ }; static XEXT_GENERATE_FIND_DISPLAY (find_display, Security_info, - Security_extension_name, - &Security_extension_hooks, + Security_extension_name, + &Security_extension_hooks, XSecurityNumberEvents, NULL) static XEXT_GENERATE_CLOSE_DISPLAY (close_display, Security_info) -static +static XEXT_GENERATE_ERROR_STRING(error_string, Security_extension_name, XSecurityNumberErrors, security_error_list) -static Bool -wire_to_event(dpy, event, wire) - Display *dpy; - XEvent *event; - xEvent *wire; +static Bool +wire_to_event(Display *dpy, XEvent *event, xEvent *wire) { XExtDisplayInfo *info = find_display(dpy); @@ -104,7 +103,7 @@ { xSecurityAuthorizationRevokedEvent *rwire = (xSecurityAuthorizationRevokedEvent *)wire; - XSecurityAuthorizationRevokedEvent *revent = + XSecurityAuthorizationRevokedEvent *revent = (XSecurityAuthorizationRevokedEvent *)event; revent->type = rwire->type & 0x7F; @@ -119,11 +118,8 @@ return False; } -static Status -event_to_wire(dpy, event, wire) - Display *dpy; - XEvent *event; - xEvent *wire; +static Status +event_to_wire(Display *dpy, XEvent *event, xEvent *wire) { XExtDisplayInfo *info = find_display(dpy); @@ -135,7 +131,7 @@ { xSecurityAuthorizationRevokedEvent *rwire = (xSecurityAuthorizationRevokedEvent *)wire; - XSecurityAuthorizationRevokedEvent *revent = + XSecurityAuthorizationRevokedEvent *revent = (XSecurityAuthorizationRevokedEvent *)event; rwire->type = revent->type | (revent->send_event ? 0x80 : 0); rwire->sequenceNumber = revent->serial & 0xFFFF; @@ -300,7 +296,7 @@ { XExtDisplayInfo *info = find_display (dpy); xSecurityRevokeAuthorizationReq *req; - + SecurityCheckExtension (dpy, info, 0); LockDisplay(dpy); SecurityGetReq(SecurityRevokeAuthorization, req, info); Index: xc/lib/Xext/XShape.c diff -u xc/lib/Xext/XShape.c:1.2 xc/lib/Xext/XShape.c:1.4 --- xc/lib/Xext/XShape.c:1.2 Fri Dec 14 14:55:00 2001 +++ xc/lib/Xext/XShape.c Tue Oct 15 22:19:22 2002 @@ -25,14 +25,15 @@ * * Author: Keith Packard, MIT X Consortium */ +/* $XFree86: xc/lib/Xext/XShape.c,v 1.4 2002/10/16 02:19:22 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES #include #include #include "region.h" /* in Xlib sources */ -#include "Xext.h" /* in ../include */ -#include "extutil.h" /* in ../include */ -#include "shapestr.h" /* in ../include */ +#include +#include +#include static XExtensionInfo _shape_info_data; static XExtensionInfo *shape_info = &_shape_info_data; @@ -50,9 +51,9 @@ * * *****************************************************************************/ -static int close_display(); -static Bool wire_to_event(); -static Status event_to_wire(); +static int close_display(Display *dpy, XExtCodes *codes); +static Bool wire_to_event (Display *dpy, XEvent *re, xEvent *event); +static Status event_to_wire (Display *dpy, XEvent *re, xEvent *event); static /* const */ XExtensionHooks shape_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ @@ -75,10 +76,8 @@ static XEXT_GENERATE_CLOSE_DISPLAY (close_display, shape_info) -static Bool wire_to_event (dpy, re, event) - Display *dpy; - XEvent *re; - xEvent *event; +static Bool +wire_to_event (Display *dpy, XEvent *re, xEvent *event) { XExtDisplayInfo *info = find_display (dpy); XShapeEvent *se; @@ -109,10 +108,8 @@ return False; } -static Status event_to_wire (dpy, re, event) - Display *dpy; - XEvent *re; - xEvent *event; +static Status +event_to_wire (Display *dpy, XEvent *re, xEvent *event) { XExtDisplayInfo *info = find_display (dpy); XShapeEvent *se; Index: xc/lib/Xext/XShm.c diff -u xc/lib/Xext/XShm.c:1.4 xc/lib/Xext/XShm.c:1.6 --- xc/lib/Xext/XShm.c:1.4 Fri Dec 14 14:55:00 2001 +++ xc/lib/Xext/XShm.c Tue Oct 15 22:19:22 2002 @@ -25,18 +25,18 @@ * * Author: Bob Scheifler and Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xext/XShm.c,v 1.4 2001/12/14 19:55:00 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XShm.c,v 1.6 2002/10/16 02:19:22 dawes Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ #define NEED_EVENTS #define NEED_REPLIES #include -#include "Xlibint.h" -#include "XShm.h" -#include "shmstr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include +#include static XExtensionInfo _shm_info_data; static XExtensionInfo *shm_info = &_shm_info_data; @@ -56,10 +56,11 @@ extern int _XGetBitsPerPixel(); extern void _XInitImageFuncPtrs(); -static int close_display(); -static char *error_string(); -static Bool wire_to_event(); -static Status event_to_wire(); +static int close_display(Display *dpy, XExtCodes *codes); +static char *error_string(Display *dpy, int code, XExtCodes *codes, + char *buf, int n); +static Bool wire_to_event (Display *dpy, XEvent *re, xEvent *event); +static Status event_to_wire (Display *dpy, XEvent *re, xEvent *event); static /* const */ XExtensionHooks shm_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ @@ -87,10 +88,8 @@ ShmNumberErrors, shm_error_list) -static Bool wire_to_event (dpy, re, event) - Display *dpy; - XEvent *re; - xEvent *event; +static Bool +wire_to_event (Display *dpy, XEvent *re, xEvent *event) { XExtDisplayInfo *info = find_display (dpy); XShmCompletionEvent *se; @@ -116,10 +115,8 @@ return False; } -static Status event_to_wire (dpy, re, event) - Display *dpy; - XEvent *re; - xEvent *event; +static Status +event_to_wire (Display *dpy, XEvent *re, xEvent *event) { XExtDisplayInfo *info = find_display (dpy); XShmCompletionEvent *se; Index: xc/lib/Xext/XSync.c diff -u xc/lib/Xext/XSync.c:1.5 xc/lib/Xext/XSync.c:1.7 --- xc/lib/Xext/XSync.c:1.5 Fri Dec 14 14:55:01 2001 +++ xc/lib/Xext/XSync.c Tue Oct 15 22:19:22 2002 @@ -50,15 +50,15 @@ PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xext/XSync.c,v 1.5 2001/12/14 19:55:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XSync.c,v 1.7 2002/10/16 02:19:22 dawes Exp $ */ #include #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "Xext.h" -#include "extutil.h" -#include "syncstr.h" +#include +#include +#include +#include static XExtensionInfo _sync_info_data; static XExtensionInfo *sync_info = &_sync_info_data; @@ -69,10 +69,11 @@ #define SyncSimpleCheckExtension(dpy,i) \ XextSimpleCheckExtension(dpy, i, sync_extension_name) -static int close_display(); -static Bool wire_to_event(); -static Status event_to_wire(); -static char *error_string(); +static int close_display(Display *dpy, XExtCodes *codes); +static Bool wire_to_event(Display *dpy, XEvent *event, xEvent *wire); +static Status event_to_wire(Display *dpy, XEvent *event, xEvent *wire); +static char *error_string(Display *dpy, int code, XExtCodes *codes, + char *buf, int n); static XExtensionHooks sync_extension_hooks = { NULL, /* create_gc */ @@ -108,10 +109,7 @@ static Bool -wire_to_event(dpy, event, wire) - Display *dpy; - XEvent *event; - xEvent *wire; +wire_to_event(Display *dpy, XEvent *event, xEvent *wire) { XExtDisplayInfo *info = find_display(dpy); XSyncCounterNotifyEvent *aevent; @@ -166,10 +164,7 @@ } static Status -event_to_wire(dpy, event, wire) - Display *dpy; - XEvent *event; - xEvent *wire; +event_to_wire(Display *dpy, XEvent *event, xEvent *wire) { XExtDisplayInfo *info = find_display(dpy); XSyncCounterNotifyEvent *aevent; @@ -514,11 +509,9 @@ } static void -_XProcessAlarmAttributes(dpy, req, valuemask, attributes) - Display *dpy; - xSyncChangeAlarmReq *req; - unsigned long valuemask; - XSyncAlarmAttributes *attributes; +_XProcessAlarmAttributes(Display *dpy, xSyncChangeAlarmReq *req, + unsigned long valuemask, + XSyncAlarmAttributes *attributes) { unsigned long values[32]; Index: xc/lib/Xext/Xcup.c diff -u xc/lib/Xext/Xcup.c:1.6 xc/lib/Xext/Xcup.c:1.8 --- xc/lib/Xext/Xcup.c:1.6 Fri Dec 14 14:55:01 2001 +++ xc/lib/Xext/Xcup.c Tue Oct 15 22:19:22 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xext/Xcup.c,v 1.6 2001/12/14 19:55:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/Xcup.c,v 1.8 2002/10/16 02:19:22 dawes Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group @@ -38,10 +38,10 @@ #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "Xcupstr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include static XExtensionInfo _xcup_info_data; static XExtensionInfo *xcup_info = &_xcup_info_data; @@ -53,7 +53,7 @@ * * *****************************************************************************/ -static int close_display(); +static int close_display(Display *dpy, XExtCodes *codes); static /* const */ XExtensionHooks xcup_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ Index: xc/lib/Xext/Xdbe.c diff -u xc/lib/Xext/Xdbe.c:3.5 xc/lib/Xext/Xdbe.c:3.7 --- xc/lib/Xext/Xdbe.c:3.5 Wed Jul 25 11:04:50 2001 +++ xc/lib/Xext/Xdbe.c Tue Oct 15 22:19:22 2002 @@ -30,16 +30,16 @@ * Xlib DBE code * *****************************************************************************/ -/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.5 2001/07/25 15:04:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.7 2002/10/16 02:19:22 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES #include #include -#include "Xext.h" -#include "extutil.h" +#include +#include #define NEED_DBE_PROTOCOL -#include "Xdbe.h" +#include static XExtensionInfo _dbe_info_data; static XExtensionInfo *dbe_info = &_dbe_info_data; @@ -70,8 +70,9 @@ /* * find_display - locate the display info block */ -static int close_display(); -static char *error_string(); +static int close_display(Display *dpy, XExtCodes *codes); +static char *error_string(Display *dpy, int code, XExtCodes *codes, + char *buf, int n); static XExtensionHooks dbe_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ Index: xc/lib/Xext/Xext-def.cpp diff -u xc/lib/Xext/Xext-def.cpp:1.8 xc/lib/Xext/Xext-def.cpp:1.9 --- xc/lib/Xext/Xext-def.cpp:1.8 Sun May 6 06:35:51 2001 +++ xc/lib/Xext/Xext-def.cpp Fri May 31 14:45:44 2002 @@ -17,7 +17,7 @@ XShapeQueryExtents XShapeQueryVersion XShapeSelectInput -#if defined(__CYGWIN__) && defined(HAS_SHM) +#if (defined(__CYGWIN__) && defined(HAS_SHM)) || defined(__UNIXOS2__) XShmAttach XShmCreateImage XShmCreatePixmap @@ -116,7 +116,7 @@ XcupGetReservedColormapEntries XcupQueryVersion XcupStoreColors -#ifndef __CYGWIN__ +#if !defined(__CYGWIN__) && !defined(__UNIXOS2__) XPanoramiXQueryVersion XPanoramiXAllocInfo XPanoramiXGetScreenCount @@ -137,4 +137,4 @@ XeviQueryVersion XeviGetVisualInfo /* $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 $ */ +/* $XFree86: xc/lib/Xext/Xext-def.cpp,v 1.9 2002/05/31 18:45:44 dawes Exp $ */ Index: xc/lib/Xext/Xextos2.def diff -u xc/lib/Xext/Xextos2.def:3.9 xc/lib/Xext/Xextos2.def:removed --- xc/lib/Xext/Xextos2.def:3.9 Wed Apr 5 14:13:18 2000 +++ xc/lib/Xext/Xextos2.def Thu Feb 27 12:27:21 2003 @@ -1,138 +0,0 @@ -LIBRARY XEXT -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xext/Xextos2.def,v 3.9 2000/04/05 18:13:18 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - XMITMiscGetBugMode @ 1 - XMITMiscQueryExtension @ 2 - XMITMiscSetBugMode @ 3 - XMissingExtension @ 4 - XSetExtensionErrorHandler @ 5 - XShapeCombineMask @ 6 - XShapeCombineRectangles @ 7 - XShapeCombineRegion @ 8 - XShapeCombineShape @ 9 - XShapeGetRectangles @ 10 - XShapeInputSelected @ 11 - XShapeOffsetShape @ 12 - XShapeQueryExtension @ 13 - XShapeQueryExtents @ 14 - XShapeQueryVersion @ 15 - XShapeSelectInput @ 16 - XSyncAwait @ 17 - XSyncChangeAlarm @ 18 - XSyncChangeCounter @ 19 - XSyncCreateAlarm @ 20 - XSyncCreateCounter @ 21 - XSyncDestroyAlarm @ 22 - XSyncDestroyCounter @ 23 - XSyncFreeSystemCounterList @ 24 - XSyncGetPriority @ 25 - XSyncInitialize @ 26 - XSyncIntToValue @ 27 - XSyncIntsToValue @ 28 - XSyncListSystemCounters @ 29 - XSyncMaxValue @ 30 - XSyncMinValue @ 31 - XSyncQueryAlarm @ 32 - XSyncQueryCounter @ 33 - XSyncQueryExtension @ 34 - XSyncSetCounter @ 35 - XSyncSetPriority @ 36 - XSyncValueAdd @ 37 - XSyncValueEqual @ 38 - XSyncValueGreaterOrEqual @ 39 - XSyncValueGreaterThan @ 40 - XSyncValueHigh32 @ 41 - XSyncValueIsNegative @ 42 - XSyncValueIsPositive @ 43 - XSyncValueIsZero @ 44 - XSyncValueLessOrEqual @ 45 - XSyncValueLessThan @ 46 - XSyncValueLow32 @ 47 - XSyncValueSubtract @ 48 - XTestFakeInput @ 49 - XTestFlush @ 50 - XTestGetInput @ 51 - XTestMovePointer @ 52 - XTestPressButton @ 53 - XTestPressKey @ 54 - XTestQueryInputSize @ 55 - XTestReset @ 56 - XTestStopInput @ 57 - XextAddDisplay @ 58 - XextCreateExtension @ 59 - XextDestroyExtension @ 60 - XextFindDisplay @ 61 - XextRemoveDisplay @ 62 - XmbufChangeBufferAttributes @ 63 - XmbufChangeWindowAttributes @ 64 - XmbufClearBufferArea @ 65 - XmbufCreateBuffers @ 66 - XmbufCreateStereoWindow @ 67 - XmbufDestroyBuffers @ 68 - XmbufDisplayBuffers @ 69 - XmbufGetBufferAttributes @ 70 - XmbufGetScreenInfo @ 71 - XmbufGetVersion @ 72 - XmbufGetWindowAttributes @ 73 - XmbufQueryExtension @ 74 - XdbeQueryExtension @ 75 - XdbeAllocateBackBufferName @ 76 - XdbeDeallocateBackBufferName @ 77 - XdbeSwapBuffers @ 78 - XdbeBeginIdiom @ 79 - XdbeEndIdiom @ 80 - XdbeGetVisualInfo @ 81 - XdbeFreeVisualInfo @ 82 - XdbeGetBackBufferAttributes @ 83 - XSecurityQueryExtension @ 84 - XSecurityAllocXauth @ 85 - XSecurityFreeXauth @ 86 - XSecurityGenerateAuthorization @ 87 - XSecurityRevokeAuthorization @ 88 - XagQueryVersion @ 89 - XagCreateEmbeddedApplicationGroup @ 90 - XagCreateNonembeddedApplicationGroup @ 91 - XagDestroyApplicationGroup @ 92 - XagGetApplicationGroupAttributes @ 93 - XagQueryApplicationGroup @ 94 - XagCreateAssociation @ 95 - XagDestroyAssociation @ 96 - XLbxQueryExtension @ 97 - XLbxGetEventBase @ 98 - XLbxQueryVersion @ 99 - XShmQueryExtension @ 100 - XShmGetEventBase @ 101 - XShmQueryVersion @ 102 - XShmPixmapFormat @ 103 - XShmAttach @ 104 - XShmDetach @ 105 - XShmCreateImage @ 106 - XShmPutImage @ 107 - XShmGetImage @ 108 - XShmCreatePixmap @ 109 - XcupGetReservedColormapEntries @ 110 - XcupQueryVersion @ 111 - XcupStoreColors @ 112 -; XPanoramiXQueryVersion @ 113 -; XPanoramiXAllocInfo @ 114 -; XPanoramiXGetScreenCount @ 115 -; XPanoramiXGetScreenSize @ 116 -; XPanoramiXGetState @ 117 -; XPanoramiXQueryExtension @ 118 - DPMSQueryExtension @ 119 - DPMSGetVersion @ 120 - DPMSCapable @ 121 - DPMSSetTimeouts @ 122 - DPMSGetTimeouts @ 123 - DPMSEnable @ 124 - DPMSDisable @ 125 - DPMSForceLevel @ 126 - DPMSInfo @ 127 - XeviQueryExtension @ 128 - XeviQueryVersion @ 129 - XeviGetVisualInfo @ 130 Index: xc/lib/Xext/Xextos2.rsp diff -u xc/lib/Xext/Xextos2.rsp:3.7 xc/lib/Xext/Xextos2.rsp:removed --- xc/lib/Xext/Xextos2.rsp:3.7 Wed Apr 5 14:13:19 2000 +++ xc/lib/Xext/Xextos2.rsp Thu Feb 27 12:27:21 2003 @@ -1,5 +0,0 @@ -DPMS.obj MITMisc.obj XAppgroup.obj XEVI.obj XLbx.obj XMultibuf.obj+ -XSecurity.obj XShape.obj XShm.obj XSync.obj XTestExt1.obj Xcup.obj+ -Xdbe.obj extutil.obj globals.obj /NOI /NOL /NOD /BAT -Xext.dll -Xext.map Index: xc/lib/Xext/extutil.c diff -u xc/lib/Xext/extutil.c:1.4 xc/lib/Xext/extutil.c:1.5 --- xc/lib/Xext/extutil.c:1.4 Fri Dec 14 14:55:02 2001 +++ xc/lib/Xext/extutil.c Tue Oct 15 20:37:27 2002 @@ -45,12 +45,12 @@ * XSetExtensionErrorHandler establish an extension error handler * XMissingExtension raise an error about missing ext */ -/* $XFree86: xc/lib/Xext/extutil.c,v 1.4 2001/12/14 19:55:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/extutil.c,v 1.5 2002/10/16 00:37:27 dawes Exp $ */ #include -#include "Xlibint.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include /* Index: xc/lib/Xfontcache/FontCache.c diff -u xc/lib/Xfontcache/FontCache.c:1.2 xc/lib/Xfontcache/FontCache.c:1.3 --- xc/lib/Xfontcache/FontCache.c:1.2 Wed Feb 23 15:29:32 2000 +++ xc/lib/Xfontcache/FontCache.c Tue Oct 15 20:37:28 2002 @@ -27,15 +27,16 @@ * * Id: FontCache.c,v 1.8 1999/01/31 12:52:49 akiyama Exp $ */ +/* $XFree86: xc/lib/Xfontcache/FontCache.c,v 1.3 2002/10/16 00:37:28 dawes Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "fontcachstr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include static XExtensionInfo _fontcache_info_data; static XExtensionInfo *fontcache_info = &_fontcache_info_data; Index: xc/lib/Xfontcache/Imakefile diff -u xc/lib/Xfontcache/Imakefile:1.3 xc/lib/Xfontcache/Imakefile:1.4 --- xc/lib/Xfontcache/Imakefile:1.3 Sat Aug 18 07:55:49 2001 +++ xc/lib/Xfontcache/Imakefile Tue Oct 15 20:37:28 2002 @@ -2,7 +2,7 @@ -XCOMM $XFree86: xc/lib/Xfontcache/Imakefile,v 1.3 2001/08/18 11:55:49 tsi Exp $ +XCOMM $XFree86: xc/lib/Xfontcache/Imakefile,v 1.4 2002/10/16 00:37:28 dawes Exp $ #define DoNormalLib NormalLibXfontcache #define DoSharedLib SharedLibXfontcache @@ -27,7 +27,6 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = $(FONTCACHESRCS) OBJS = $(FONTCACHEOBJS) LINTLIBS = $(LINTXLIB) Index: xc/lib/Xft/Imakefile diff -u xc/lib/Xft/Imakefile:1.15 xc/lib/Xft/Imakefile:1.24 --- xc/lib/Xft/Imakefile:1.15 Sat Sep 29 13:47:16 2001 +++ xc/lib/Xft/Imakefile Tue Feb 25 17:18:03 2003 @@ -1,10 +1,11 @@ -XCOMM $XFree86: xc/lib/Xft/Imakefile,v 1.15 2001/09/29 17:47:16 herrb Exp $ +XCOMM $XFree86: xc/lib/Xft/Imakefile,v 1.24 2003/02/25 22:18:03 dawes Exp $ #define DoNormalLib NormalLibXft #define DoSharedLib SharedLibXft #define DoExtraLib SharedLibXft #define DoDebugLib DebugLibXft #define DoProfileLib ProfileLibXft + #define HasSharedData YES #define LibName Xft #define SoRev SOXFTREV @@ -13,68 +14,126 @@ #include -YFLAGS = -d - #ifndef XftLibDir #define XftLibDir $(LIBDIR) #endif + #ifndef XftType1Dir #define XftType1Dir $(LIBDIR)/fonts/Type1 #endif -XFTLIBDIR=XftLibDir -XFTCONFIG=$(XFTLIBDIR)/XftConfig +#ifdef UseInstalled +/* when using xmkmf, make sure the needed definitions for the fontconfig + * library are available + */ + +#ifndef SharedFontconfigRev +#define SharedFontconfigRev 1.0 +SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGLIBSRC),SOFONTCONFIGREV,SharedFontconfigRev) +#endif -TYPE1DIR=XftType1Dir -CONFIG_DEFS=-DXFT_TYPE1_DIR=\"$(TYPE1DIR)\" -INCLUDES=$(FREETYPE2INCLUDES) -DEFINES=-DXFT_DEFAULT_PATH=\"$(XFTCONFIG)\" $(FREETYPE2DEFINES) $(RENDERDEFINES) +/* make sure we're building the right major version */ +SOXFTREV=2.1 -#if UseFreetype2 -FREETYPE2REQLIB = $(FREETYPE2LIB) #endif -REQUIREDLIBS=$(LDPRELIBS) $(XRENDERLIB) $(XLIB) $(FREETYPE2REQLIB) +XFTLIBDIR=XftLibDir -#if UseFreetype2 -FT_HEADERS = XftFreetype.h - FT_SRCS = xftcache.c xftdir.c xftfreetype.c xftglyphs.c xftrender.c - FT_OBJS = xftcache.o xftdir.o xftfreetype.o xftglyphs.o xftrender.o +TYPE1DIR=XftType1Dir +#if HasGcc2 || HasGcc3 +WARNINGS=-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs #endif - -HEADERS = Xft.h $(FT_HEADERS) +INCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) $(WARNINGS) +DEFINES=$(FREETYPE2DEFINES) $(RENDERDEFINES) - 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 xftmatrix.c \ - xftname.c xftpat.c xftstr.c xftxlfd.c $(FT_SRCS) +XFT_REVISION=0 - 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 xftmatrix.o \ - xftname.o xftpat.o xftstr.o xftxlfd.o $(FT_OBJS) +FREETYPE_LIBS=$(FREETYPE2LIB) +FREETYPE_CFLAGS=$(FREETYPE2INCLUDES) +XRENDER_LIBS=$(XRENDERLIB) +XRENDER_CFLAGS=$(XRENDERINCLUDES) +FONTCONFIG_CFLAGS=$(FONTCONFIGINCLUDES) +FONTCONFIG_LIBS=$(FONTCONFIGLIB) + +#if !defined(UseInstalled) + +/* these must always be computed using the installed location, + * when building inside the tree that means extra work + */ +#if BuildFontconfigLibrary +FONTCONFIG_LIBS=-L$(USRLIBDIR) -lfontconfig +FONTCONFIG_CFLAGS=-I$(INCROOT) +#endif + +#if BuildFreetype2Library +FREETYPE_LIBS=-L$(USRLIBDIR) -lfreetype +FREETYPE_CFLAGS=-I$(INCROOT)/freetype2 +#endif + +#if BuildRenderLibrary +XRENDER_LIBS=-L$(USRLIBDIR) -lXrender +XRENDER_CFLAGS=-I$(INCROOT) +#endif + +#endif + +SUBSTVARS=prefix="$(PROJECTROOT)" \ + exec_prefix="$(BINDIR)" \ + libdir="$(USRLIBDIR)" \ + includedir="$(INCROOT)" \ + PACKAGE_VERSION="$(SOXFTREV).$(XFT_REVISION)" \ + FREETYPE_LIBS="$(FREETYPE_LIBS)" \ + FREETYPE_CFLAGS="$(FREETYPE_CFLAGS)" \ + XRENDER_LIBS="$(XRENDER_LIBS)" \ + XRENDER_CFLAGS="$(XRENDER_CFLAGS)" \ + FONTCONFIG_CFLAGS="$(FONTCONFIG_CFLAGS)" \ + FONTCONFIG_LIBS="$(FONTCONFIG_LIBS)" + +REQUIREDLIBS=$(LDPRELIBS) $(XRENDERLIB) $(XLIB) $(FONTCONFIGLIB) $(EXPATLIB) $(FREETYPE2LIB) + +HEADERS = Xft.h XftCompat.h + + SRCS = xftcolor.c xftdbg.c xftdpy.c \ + xftdraw.c xftextent.c xftfont.c \ + xftinit.c xftlist.c \ + xftname.c xftstr.c xftswap.c xftxlfd.c \ + xftfreetype.c xftglyphs.c xftrender.c xftcore.c + + OBJS = xftcolor.o xftdbg.o xftdpy.o \ + xftdraw.o xftextent.o xftfont.o \ + xftinit.o xftlist.o \ + xftname.o xftstr.o xftswap.o xftxlfd.o \ + xftfreetype.o xftglyphs.o xftrender.o xftcore.o #include -LexFilePrefix(xftlex,XftConfig) -YaccFilePrefix(xftgram,$(YFLAGS),XftConfig) - #if DoSharedLib && SharedDataSeparation SpecialCObjectRule(sharedlib,NullParameter,$(SHLIBDEF)) #endif + +MANSUFFIX = $(LIBMANSUFFIX) +InstallManPage(Xft,$(LIBMANDIR)) +DependTarget() -all:: XftConfig +all:: xft-config.script -CppFileTarget(XftConfig,XftConfig.cpp,$(CONFIG_DEFS),$(ICONFIGFILES)) +xft-config.script: xft-config.in + RemoveFile($@) + sh config/config-subst $(SUBSTVARS) < xft-config.in > $@ -#if InstallFSConfig -InstallNonExecFile(XftConfig,$(XFTLIBDIR)) -#else -InstallNonExecFileNoClobber(XftConfig,$(XFTLIBDIR)) -#endif +InstallScript(xft-config,$(BINDIR)) -LinkConfFileLong(XftConfig,XftConfig,$(XFTLIBDIR),$(CONFDIR)) +clean:: + RemoveFile(xft-config.script) -MANSUFFIX = $(LIBMANSUFFIX) -InstallManPage(Xft,$(LIBMANDIR)) -DependTarget() +all:: xft.pc + +xft.pc: xft.pc.in + RemoveFile($@) + sh config/config-subst $(SUBSTVARS) < xft.pc.in > $@ + +InstallNonExecFile(xft.pc,$(USRLIBDIR)/pkgconfig) + +clean:: + RemoveFile(xft.pc) + Index: xc/lib/Xft/Makefile.in diff -u /dev/null xc/lib/Xft/Makefile.in:1.4 --- /dev/null Thu Feb 27 12:27:22 2003 +++ xc/lib/Xft/Makefile.in Fri May 31 03:01:49 2002 @@ -0,0 +1,203 @@ +# +# $XFree86: xc/lib/Xft/Makefile.in,v 1.4 2002/05/31 07:01:49 keithp Exp $ +# +# Copyright © 2002 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. +# + +SHELL = @SHELL@ + +srcdir=@srcdir@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +bindir=@bindir@ +datadir=@datadir@ +includedir=@includedir@ +sysconfdir=@sysconfdir@ + +CDEBUGFLAGS=@CFLAGS@ +CPPFLAGS=@CPPFLAGS@ +DEFS=@DEFS@ + +DSO_LDOPTS=@DSO_LDOPTS@ +DSO_CFLAGS=@DSO_CFLAGS@ +DSO_PIC_CFLAGS=@DSO_PIC_CFLAGS@ + +INCLUDES=-I. + +CFLAGS=$(CDEBUGFLAGS) $(INCLUDES) $(DEFS) $(CPPFLAGS) + +INSTALL=@INSTALL@ +INSTALL_PROGRAM=@INSTALL_PROGRAM@ +INSTALL_SCRIPT=@INSTALL_SCRIPT@ +INSTALL_DATA=@INSTALL_DATA@ +MKSHLIB=@MKSHLIB@ +LN_S=@LN_S@ + +X_FONT_DIR=@X_FONT_DIR@ +FC_DEFAULT_FONTS=@FC_DEFAULT_FONTS@ + +# shared libraries +LIBDIR=$(libdir) +# programs +BINDIR=$(bindir) +# include files +INCLUDEDIR=$(includedir)/X11/Xft + +LIBBASE=libXft.so +LIBFILE=$(LIBBASE).@PACKAGE_MAJOR@.@PACKAGE_MINOR@ +LIBMAJOR=$(LIBBASE).@PACKAGE_MAJOR@ + +LIBS=@LIBS@ + +SRCS=xftcolor.c \ + xftcore.c \ + xftdbg.c \ + xftdpy.c \ + xftdraw.c \ + xftextent.c \ + xftfont.c \ + xftfreetype.c \ + xftglyphs.c \ + xftinit.c \ + xftlist.c \ + xftname.c \ + xftrender.c \ + xftstr.c \ + xftswap.c \ + xftxlfd.c + +OBJS=xftcolor.@OBJEXT@ \ + xftcore.@OBJEXT@ \ + xftdbg.@OBJEXT@ \ + xftdpy.@OBJEXT@ \ + xftdraw.@OBJEXT@ \ + xftextent.@OBJEXT@ \ + xftfont.@OBJEXT@ \ + xftfreetype.@OBJEXT@ \ + xftglyphs.@OBJEXT@ \ + xftinit.@OBJEXT@ \ + xftlist.@OBJEXT@ \ + xftname.@OBJEXT@ \ + xftrender.@OBJEXT@ \ + xftstr.@OBJEXT@ \ + xftswap.@OBJEXT@ \ + xftxlfd.@OBJEXT@ + +HEADERS=Xft.h \ + XftCompat.h \ + xftint.h + +.c.@OBJEXT@: + $(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) -c $< -o $@ + +all:: $(LIBFILE) $(LIBMAJOR) $(LIBBASE) + +# +# Build the library +# +$(LIBFILE): $(OBJS) + rm -f $@ + $(MKSHLIB) $(OBJS) $(LIBS) + +$(LIBMAJOR): $(LIBFILE) + rm -f $@ + $(LN_S) $(LIBFILE) $(LIBMAJOR) + +$(LIBBASE): $(LIBMAJOR) + rm -f $@ + $(LN_S) $(LIBMAJOR) $(LIBBASE) + +$(OBJS): $(HEADERS) + +# +# install directories +# + +install:: $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBDIR)/pkgconfig +install:: $(DESTDIR)$(INCLUDEDIR) $(DESTDIR)$(BINDIR) + +$(DESTDIR)$(LIBDIR): + mkdir -p $@ + +$(DESTDIR)$(LIBDIR)/pkgconfig: + mkdir -p $@ + +$(DESTDIR)$(INCLUDEDIR): + mkdir -p $@ + +$(DESTDIR)$(BINDIR): + mkdir -p $@ + +# +# install library +# + +install:: $(DESTDIR)$(LIBDIR)/$(LIB) $(DESTDIR)$(LIBDIR)/$(LIBMAJOR) +install:: $(DESTDIR)$(LIBDIR)/$(LIBBASE) + +$(DESTDIR)$(LIBDIR)/$(LIBFILE): $(LIBFILE) + $(INSTALL_PROGRAM) $< $(DESTDIR)$(LIBDIR) + +$(DESTDIR)$(LIBDIR)/$(LIBMAJOR): $(DESTDIR)$(LIBDIR)/$(LIBFILE) + rm -f $@ + $(LN_S) $(LIBFILE) $(DESTDIR)$(LIBDIR)/$(LIBMAJOR) + +$(DESTDIR)$(LIBDIR)/$(LIBBASE): $(DESTDIR)$(LIBDIR)/$(LIBMAJOR) + rm -f $@ + $(LN_S) $(LIBMAJOR) $(DESTDIR)$(LIBDIR)/$(LIBBASE) + +# +# install xft-config script +# + +install:: $(DESTDIR)$(BINDIR)/xft-config + +$(DESTDIR)$(BINDIR)/xft-config: xft-config + $(INSTALL_SCRIPT) $< $(DESTDIR)$(BINDIR) + +# +# install pkgconfig control file +# + +install:: $(DESTDIR)$(LIBDIR)/pkgconfig/xft.pc + +$(DESTDIR)$(LIBDIR)/pkgconfig/xft.pc: xft.pc + $(INSTALL_DATA) $< $(DESTDIR)$(LIBDIR)/pkgconfig + + +# +# install header files +# + +install::$(DESTDIR)$(INCLUDEDIR)/Xft.h $(DESTDIR)$(INCLUDEDIR)/XftCompat.h + +$(DESTDIR)$(INCLUDEDIR)/Xft.h: Xft.h + $(INSTALL_DATA) $< $(DESTDIR)$(INCLUDEDIR) + +$(DESTDIR)$(INCLUDEDIR)/XftCompat.h: XftCompat.h + $(INSTALL_DATA) $< $(DESTDIR)$(INCLUDEDIR) + +# +# delete generated files +# +clean:: + rm -f $(LIBFILE) $(LIBMAJOR) $(LIBBASE) $(OBJS) Index: xc/lib/Xft/Xft-def.cpp diff -u xc/lib/Xft/Xft-def.cpp:1.2 xc/lib/Xft/Xft-def.cpp:1.4 --- xc/lib/Xft/Xft-def.cpp:1.2 Thu Apr 5 15:29:38 2001 +++ xc/lib/Xft/Xft-def.cpp Tue Sep 17 21:25:00 2002 @@ -145,6 +145,14 @@ XftConfigDirs XftDirScan XftDirSave +XftDrawPicture +XftDrawSrcPicture +XftGlyphLoad +XftGlyphCheck +XftFreeTypeGlyphExists +XftFreeTypeOpen +XftFreeTypeClose +XftRenderString16 -/* $XFree86: xc/lib/Xft/Xft-def.cpp,v 1.2 2001/04/05 19:29:38 dawes Exp $ */ +/* $XFree86: xc/lib/Xft/Xft-def.cpp,v 1.4 2002/09/18 01:25:00 dawes Exp $ */ Index: xc/lib/Xft/Xft.h diff -u xc/lib/Xft/Xft.h:1.19 xc/lib/Xft/Xft.h:1.32 --- xc/lib/Xft/Xft.h:1.19 Sat Apr 28 23:21:17 2001 +++ xc/lib/Xft/Xft.h Tue Feb 25 16:57:53 2003 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/Xft.h,v 1.19 2001/04/29 03:21:17 keithp Exp $ + * $XFree86: xc/lib/Xft/Xft.h,v 1.32 2003/02/25 21:57:53 dawes Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -25,136 +25,41 @@ #ifndef _XFT_H_ #define _XFT_H_ -#include +#define XFT_MAJOR 2 +#define XFT_MINOR 1 +#define XFT_REVISION 0 +#define XFT_VERSION ((XFT_MAJOR * 10000) + (XFT_MINOR * 100) + (XFT_REVISION)) +#define XftVersion XFT_VERSION + #include +#include +#include +#include #include -#include +/* #include */ + +#ifndef _XFT_NO_COMPAT_ +#include +#endif + +#define XFT_CORE "core" +#define XFT_RENDER "render" +#define XFT_XLFD "xlfd" +#define XFT_MAX_GLYPH_MEMORY "maxglyphmemory" +#define XFT_MAX_UNREF_FONTS "maxunreffonts" -typedef unsigned char XftChar8; -typedef unsigned short XftChar16; -typedef unsigned int XftChar32; - -#define XFT_FAMILY "family" /* String */ -#define XFT_STYLE "style" /* String */ -#define XFT_SLANT "slant" /* Int */ -#define XFT_WEIGHT "weight" /* Int */ -#define XFT_SIZE "size" /* Double */ -#define XFT_PIXEL_SIZE "pixelsize" /* Double */ -#define XFT_ENCODING "encoding" /* String */ -#define XFT_SPACING "spacing" /* Int */ -#define XFT_FOUNDRY "foundry" /* String */ -#define XFT_CORE "core" /* Bool */ -#define XFT_ANTIALIAS "antialias" /* Bool */ -#define XFT_XLFD "xlfd" /* String */ -#define XFT_FILE "file" /* String */ -#define XFT_INDEX "index" /* Int */ -#define XFT_RASTERIZER "rasterizer"/* String */ -#define XFT_OUTLINE "outline" /* Bool */ -#define XFT_SCALABLE "scalable" /* Bool */ -#define XFT_RGBA "rgba" /* Int */ - -/* 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 -#define XFT_WEIGHT_DEMIBOLD 180 -#define XFT_WEIGHT_BOLD 200 -#define XFT_WEIGHT_BLACK 210 - -#define XFT_SLANT_ROMAN 0 -#define XFT_SLANT_ITALIC 100 -#define XFT_SLANT_OBLIQUE 110 - -#define XFT_PROPORTIONAL 0 -#define XFT_MONO 100 -#define XFT_CHARCELL 110 - -#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, - 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; - -typedef struct _XftValue { - XftType type; - union { - char *s; - int i; - Bool b; - double d; - XftMatrix *m; - } u; -} XftValue; - -typedef struct _XftValueList { - struct _XftValueList *next; - XftValue value; -} XftValueList; - -typedef struct _XftPatternElt { - const char *object; - XftValueList *values; -} XftPatternElt; - -typedef struct _XftPattern { - int num; - int size; - XftPatternElt *elts; -} XftPattern; - -typedef struct _XftFontSet { - int nfont; - int sfont; - XftPattern **fonts; -} XftFontSet; +extern FT_Library _XftFTlibrary; -typedef struct _XftFontStruct XftFontStruct; +typedef struct _XftFontInfo XftFontInfo; typedef struct _XftFont { int ascent; int descent; int height; int max_advance_width; - Bool core; - XftPattern *pattern; - union { - struct { - XFontStruct *font; - } core; - struct { - XftFontStruct *font; - } ft; - } u; + FcCharSet *charset; + FcPattern *pattern; } XftFont; typedef struct _XftDraw XftDraw; @@ -164,31 +69,48 @@ XRenderColor color; } XftColor; -typedef struct _XftObjectSet { - int nobject; - int sobject; - const char **objects; -} XftObjectSet; +typedef struct _XftCharSpec { + FcChar32 ucs4; + short x; + short y; +} XftCharSpec; + +typedef struct _XftCharFontSpec { + XftFont *font; + FcChar32 ucs4; + short x; + short y; +} XftCharFontSpec; + +typedef struct _XftGlyphSpec { + FT_UInt glyph; + short x; + short y; +} XftGlyphSpec; + +typedef struct _XftGlyphFontSpec { + XftFont *font; + FT_UInt glyph; + short x; + short y; +} XftGlyphFontSpec; _XFUNCPROTOBEGIN -/* xftcfg.c */ -Bool -XftConfigSubstitute (XftPattern *p); - + /* xftcolor.c */ Bool XftColorAllocName (Display *dpy, - Visual *visual, + _Xconst Visual *visual, Colormap cmap, - char *name, + _Xconst char *name, XftColor *result); Bool XftColorAllocValue (Display *dpy, Visual *visual, Colormap cmap, - XRenderColor *color, + _Xconst XRenderColor *color, XftColor *result); void @@ -199,29 +121,23 @@ /* xftcore.c */ -/* xftdbg.c */ -void -XftValuePrint (XftValue v); -void -XftValueListPrint (XftValueList *l); - -void -XftPatternPrint (XftPattern *p); +/* xftdir.c */ +FcBool +XftDirScan (FcFontSet *set, _Xconst char *dir, FcBool force); -void -XftFontSetPrint (XftFontSet *s); +FcBool +XftDirSave (FcFontSet *set, _Xconst char *dir); -/* xftdir.c */ /* xftdpy.c */ Bool XftDefaultHasRender (Display *dpy); Bool -XftDefaultSet (Display *dpy, XftPattern *defaults); +XftDefaultSet (Display *dpy, FcPattern *defaults); void -XftDefaultSubstitute (Display *dpy, int screen, XftPattern *pattern); +XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern); /* xftdraw.c */ @@ -235,290 +151,482 @@ XftDrawCreateBitmap (Display *dpy, Pixmap bitmap); +XftDraw * +XftDrawCreateAlpha (Display *dpy, + Pixmap pixmap, + int depth); + void XftDrawChange (XftDraw *draw, Drawable drawable); -void -XftDrawDestroy (XftDraw *draw); +Display * +XftDrawDisplay (XftDraw *draw); -void -XftDrawString8 (XftDraw *d, - XftColor *color, - XftFont *font, - int x, - int y, - XftChar8 *string, - int len); +Drawable +XftDrawDrawable (XftDraw *draw); +Colormap +XftDrawColormap (XftDraw *draw); + +Visual * +XftDrawVisual (XftDraw *draw); + void -XftDrawString16 (XftDraw *draw, - XftColor *color, - XftFont *font, - int x, - int y, - XftChar16 *string, - int len); - -void -XftDrawString32 (XftDraw *draw, - XftColor *color, - XftFont *font, - int x, - 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, - int y, - unsigned int width, - unsigned int height); +XftDrawDestroy (XftDraw *draw); +Picture +XftDrawPicture (XftDraw *draw); -Bool -XftDrawSetClip (XftDraw *d, - Region r); +Picture +XftDrawSrcPicture (XftDraw *draw, _Xconst XftColor *color); -/* xftextent.c */ +void +XftDrawGlyphs (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FT_UInt *glyphs, + int nglyphs); void -XftTextExtents8 (Display *dpy, - XftFont *font, - XftChar8 *string, - int len, - XGlyphInfo *extents); +XftDrawString8 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar8 *string, + int len); void -XftTextExtents16 (Display *dpy, - XftFont *font, - XftChar16 *string, - int len, - XGlyphInfo *extents); +XftDrawString16 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar16 *string, + int len); void -XftTextExtents32 (Display *dpy, - XftFont *font, - XftChar32 *string, - int len, - XGlyphInfo *extents); - +XftDrawString32 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar32 *string, + int len); + void -XftTextExtentsUtf8 (Display *dpy, - XftFont *font, - XftChar8 *string, - int len, - XGlyphInfo *extents); +XftDrawStringUtf8 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar8 *string, + int len); -/* xftfont.c */ -XftPattern * -XftFontMatch (Display *dpy, int screen, XftPattern *pattern, XftResult *result); +void +XftDrawStringUtf16 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar8 *string, + FcEndian endian, + int len); -XftFont * -XftFontOpenPattern (Display *dpy, XftPattern *pattern); +void +XftDrawCharSpec (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + _Xconst XftCharSpec *chars, + int len); -XftFont * -XftFontOpen (Display *dpy, int screen, ...); +void +XftDrawCharFontSpec (XftDraw *draw, + _Xconst XftColor *color, + _Xconst XftCharFontSpec *chars, + int len); -XftFont * -XftFontOpenName (Display *dpy, int screen, const char *name); +void +XftDrawGlyphSpec (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + _Xconst XftGlyphSpec *glyphs, + int len); -XftFont * -XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd); +void +XftDrawGlyphFontSpec (XftDraw *draw, + _Xconst XftColor *color, + _Xconst XftGlyphFontSpec *glyphs, + int len); void -XftFontClose (Display *dpy, XftFont *font); +XftDrawRect (XftDraw *draw, + _Xconst XftColor *color, + int x, + int y, + unsigned int width, + unsigned int height); -Bool -XftGlyphExists (Display *dpy, XftFont *font, XftChar32 glyph); - -/* xftfreetype.c */ -/* xftfs.c */ -XftFontSet * -XftFontSetCreate (void); +Bool +XftDrawSetClip (XftDraw *draw, + Region r); -void -XftFontSetDestroy (XftFontSet *s); Bool -XftFontSetAdd (XftFontSet *s, XftPattern *font); +XftDrawSetClipRectangles (XftDraw *draw, + int xOrigin, + int yOrigin, + _Xconst XRectangle *rects, + int n); -/* xftglyphs.c */ -/* see XftFreetype.h */ - -/* xftgram.y */ +void +XftDrawSetSubwindowMode (XftDraw *draw, + int mode); -/* xftinit.c */ -Bool -XftInit (char *config); - -/* xftlex.l */ +/* xftextent.c */ -/* xftlist.c */ -XftObjectSet * -XftObjectSetCreate (void); +void +XftGlyphExtents (Display *dpy, + XftFont *pub, + _Xconst FT_UInt *glyphs, + int nglyphs, + XGlyphInfo *extents); -Bool -XftObjectSetAdd (XftObjectSet *os, const char *object); +void +XftTextExtents8 (Display *dpy, + XftFont *pub, + _Xconst FcChar8 *string, + int len, + XGlyphInfo *extents); void -XftObjectSetDestroy (XftObjectSet *os); +XftTextExtents16 (Display *dpy, + XftFont *pub, + _Xconst FcChar16 *string, + int len, + XGlyphInfo *extents); -XftObjectSet * -XftObjectSetVaBuild (const char *first, va_list va); +void +XftTextExtents32 (Display *dpy, + XftFont *pub, + _Xconst FcChar32 *string, + int len, + XGlyphInfo *extents); + +void +XftTextExtentsUtf8 (Display *dpy, + XftFont *pub, + _Xconst FcChar8 *string, + int len, + XGlyphInfo *extents); -XftObjectSet * -XftObjectSetBuild (const char *first, ...); +void +XftTextExtentsUtf16 (Display *dpy, + XftFont *pub, + _Xconst FcChar8 *string, + FcEndian endian, + int len, + XGlyphInfo *extents); -XftFontSet * -XftListFontSets (XftFontSet **sets, - int nsets, - XftPattern *p, - XftObjectSet *os); +/* xftfont.c */ +FcPattern * +XftFontMatch (Display *dpy, + int screen, + _Xconst FcPattern *pattern, + FcResult *result); -XftFontSet * -XftListFontsPatternObjects (Display *dpy, - int screen, - XftPattern *pattern, - XftObjectSet *os); +XftFont * +XftFontOpen (Display *dpy, int screen, ...); -XftFontSet * -XftListFonts (Display *dpy, - int screen, - ...); +XftFont * +XftFontOpenName (Display *dpy, int screen, _Xconst char *name); -/* xftmatch.c */ -XftPattern * -XftFontSetMatch (XftFontSet **sets, - int nsets, - XftPattern *p, - XftResult *result); +XftFont * +XftFontOpenXlfd (Display *dpy, int screen, _Xconst char *xlfd); -/* xftmatrix.c */ -int -XftMatrixEqual (const XftMatrix *mat1, const XftMatrix *mat2); +/* xftfreetype.c */ -void -XftMatrixMultiply (XftMatrix *result, XftMatrix *a, XftMatrix *b); +FT_Face +XftLockFace (XftFont *pub); void -XftMatrixRotate (XftMatrix *m, double c, double s); +XftUnlockFace (XftFont *pub); -void -XftMatrixScale (XftMatrix *m, double sx, double sy); +XftFontInfo * +XftFontInfoCreate (Display *dpy, _Xconst FcPattern *pattern); void -XftMatrixShear (XftMatrix *m, double sh, double sv); +XftFontInfoDestroy (Display *dpy, XftFontInfo *fi); -/* xftname.c */ -XftPattern * -XftNameParse (const char *name); +FcChar32 +XftFontInfoHash (_Xconst XftFontInfo *fi); -Bool -XftNameUnparse (XftPattern *pat, char *dest, int len); +FcBool +XftFontInfoEqual (_Xconst XftFontInfo *a, _Xconst XftFontInfo *b); -/* xftpat.c */ -XftPattern * -XftPatternCreate (void); +XftFont * +XftFontOpenInfo (Display *dpy, + FcPattern *pattern, + XftFontInfo *fi); -XftPattern * -XftPatternDuplicate (XftPattern *p); +XftFont * +XftFontOpenPattern (Display *dpy, FcPattern *pattern); -void -XftValueDestroy (XftValue v); +XftFont * +XftFontCopy (Display *dpy, XftFont *pub); -void -XftValueListDestroy (XftValueList *l); - void -XftPatternDestroy (XftPattern *p); +XftFontClose (Display *dpy, XftFont *pub); -XftPatternElt * -XftPatternFind (XftPattern *p, const char *object, Bool insert); +FcBool +XftInitFtLibrary(void); -Bool -XftPatternAdd (XftPattern *p, const char *object, XftValue value, Bool append); +/* xftglyphs.c */ +void +XftFontLoadGlyphs (Display *dpy, + XftFont *pub, + FcBool need_bitmaps, + _Xconst FT_UInt *glyphs, + int nglyph); + +void +XftFontUnloadGlyphs (Display *dpy, + XftFont *pub, + _Xconst FT_UInt *glyphs, + int nglyph); + +#define XFT_NMISSING 256 + +FcBool +XftFontCheckGlyph (Display *dpy, + XftFont *pub, + FcBool need_bitmaps, + FT_UInt glyph, + FT_UInt *missing, + int *nmissing); + +FcBool +XftCharExists (Display *dpy, + XftFont *pub, + FcChar32 ucs4); -XftResult -XftPatternGet (XftPattern *p, const char *object, int id, XftValue *v); +FT_UInt +XftCharIndex (Display *dpy, + XftFont *pub, + FcChar32 ucs4); -Bool -XftPatternDel (XftPattern *p, const char *object); - -Bool -XftPatternAddInteger (XftPattern *p, const char *object, int i); - -Bool -XftPatternAddDouble (XftPattern *p, const char *object, double d); +/* xftgram.y */ -Bool -XftPatternAddString (XftPattern *p, const char *object, const char *s); +/* xftinit.c */ +FcBool +XftInit (_Xconst char *config); -Bool -XftPatternAddMatrix (XftPattern *p, const char *object, const XftMatrix *s); +int +XftGetVersion (void); -Bool -XftPatternAddBool (XftPattern *p, const char *object, Bool b); +/* xftlex.l */ -XftResult -XftPatternGetInteger (XftPattern *p, const char *object, int n, int *i); +/* xftlist.c */ -XftResult -XftPatternGetDouble (XftPattern *p, const char *object, int n, double *d); +FcFontSet * +XftListFonts (Display *dpy, + int screen, + ...); -XftResult -XftPatternGetString (XftPattern *p, const char *object, int n, char **s); +/* xftmatch.c */ -XftResult -XftPatternGetMatrix (XftPattern *p, const char *object, int n, XftMatrix **s); +/* xftmatrix.c */ -XftResult -XftPatternGetBool (XftPattern *p, const char *object, int n, Bool *b); +/* xftname.c */ +FcPattern +*XftNameParse (_Xconst char *name); -XftPattern * -XftPatternVaBuild (XftPattern *orig, va_list va); - -XftPattern * -XftPatternBuild (XftPattern *orig, ...); +/* xftpat.c */ /* xftrender.c */ -/* see XftFreetype.h */ +void +XftGlyphRender (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FT_UInt *glyphs, + int nglyphs); -/* xftstr.c */ +void +XftGlyphSpecRender (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + _Xconst XftGlyphSpec *glyphs, + int nglyphs); + +void +XftCharSpecRender (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + _Xconst XftCharSpec *chars, + int len); + +void +XftGlyphFontSpecRender (Display *dpy, + int op, + Picture src, + Picture dst, + int srcx, + int srcy, + _Xconst XftGlyphFontSpec *glyphs, + int nglyphs); + +void +XftCharFontSpecRender (Display *dpy, + int op, + Picture src, + Picture dst, + int srcx, + int srcy, + _Xconst XftCharFontSpec *chars, + int len); + +void +XftTextRender8 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len); -int -XftUtf8ToUcs4 (XftChar8 *src_orig, - XftChar32 *dst, - int len); +void +XftTextRender16 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar16 *string, + int len); + +void +XftTextRender16BE (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len); + +void +XftTextRender16LE (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len); + +void +XftTextRender32 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar32 *string, + int len); + +void +XftTextRender32BE (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len); + +void +XftTextRender32LE (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len); + +void +XftTextRenderUtf8 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len); + +void +XftTextRenderUtf16 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + FcEndian endian, + int len); -Bool -XftUtf8Len (XftChar8 *string, - int len, - int *nchar, - int *wchar); +/* xftstr.c */ /* xftxlfd.c */ -XftPattern * -XftXlfdParse (const char *xlfd_orig, Bool ignore_scalable, Bool complete); +FcPattern * +XftXlfdParse (_Xconst char *xlfd_orig, Bool ignore_scalable, Bool complete); -XFontStruct * -XftCoreOpen (Display *dpy, XftPattern *pattern); - -void -XftCoreClose (Display *dpy, XFontStruct *font); - _XFUNCPROTOEND #endif /* _XFT_H_ */ Index: xc/lib/Xft/Xft.man diff -u xc/lib/Xft/Xft.man:1.2 xc/lib/Xft/Xft.man:1.3 --- xc/lib/Xft/Xft.man:1.2 Thu Nov 30 01:59:45 2000 +++ xc/lib/Xft/Xft.man Fri Oct 4 11:06:18 2002 @@ -1,5 +1,5 @@ .\" -.\" $XFree86: xc/lib/Xft/Xft.man,v 1.2 2000/11/30 06:59:45 keithp Exp $ +.\" $XFree86: xc/lib/Xft/Xft.man,v 1.3 2002/10/04 15:06:18 keithp Exp $ .\" .\" Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. .\" @@ -172,10 +172,11 @@ the given expression. "+="/"=+" will prepend/append a new value to the list of values for the indicated field. -.SH RESTRICTIONS +.SH COMPATIBILITY +As of version 2, .B Xft -will probably change radically in the future; weak attempts will be made to -retain some level of source-file compatibility. +has become relatively stable and is expected to retain source and binary +compatibility in future releases. .SH AUTHOR Keith Packard, member of the XFree86 Project, Inc. Index: xc/lib/Xft/XftCompat.h diff -u /dev/null xc/lib/Xft/XftCompat.h:1.5 --- /dev/null Thu Feb 27 12:27:22 2003 +++ xc/lib/Xft/XftCompat.h Wed Oct 2 03:02:32 2002 @@ -0,0 +1,167 @@ +/* + * $XFree86: xc/lib/Xft/XftCompat.h,v 1.5 2002/10/02 07:02:32 keithp Exp $ + * + * Copyright © 2001 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. + */ + +#ifndef _XFTCOMPAT_H_ +#define _XFTCOMPAT_H_ +#include + +/* + * Compatibility definitions -- map Fc names to Xft names + */ + +typedef FcChar8 XftChar8; +typedef FcChar16 XftChar16; +typedef FcChar32 XftChar32; + +#define XFT_FAMILY FC_FAMILY +#define XFT_STYLE FC_STYLE +#define XFT_SLANT FC_SLANT +#define XFT_WEIGHT FC_WEIGHT +#define XFT_SIZE FC_SIZE +#define XFT_PIXEL_SIZE FC_PIXEL_SIZE +#define XFT_SPACING FC_SPACING +#define XFT_FOUNDRY FC_FOUNDRY +#define XFT_ANTIALIAS FC_ANTIALIAS +#define XFT_FILE FC_FILE +#define XFT_INDEX FC_INDEX +#define XFT_RASTERIZER FC_RASTERIZER +#define XFT_OUTLINE FC_OUTLINE +#define XFT_SCALABLE FC_SCALABLE +#define XFT_RGBA FC_RGBA + +/* defaults from resources */ +#define XFT_SCALE FC_SCALE +#define XFT_MINSPACE FC_MINSPACE +#define XFT_DPI FC_DPI + +/* specific to FreeType rasterizer */ +#define XFT_CHAR_WIDTH FC_CHAR_WIDTH +#define XFT_CHAR_HEIGHT FC_CHAR_HEIGHT +#define XFT_MATRIX FC_MATRIX + +#define XFT_WEIGHT_LIGHT FC_WEIGHT_LIGHT +#define XFT_WEIGHT_MEDIUM FC_WEIGHT_MEDIUM +#define XFT_WEIGHT_DEMIBOLD FC_WEIGHT_DEMIBOLD +#define XFT_WEIGHT_BOLD FC_WEIGHT_BOLD +#define XFT_WEIGHT_BLACK FC_WEIGHT_BLACK + +#define XFT_SLANT_ROMAN FC_SLANT_ROMAN +#define XFT_SLANT_ITALIC FC_SLANT_ITALIC +#define XFT_SLANT_OBLIQUE FC_SLANT_OBLIQUE + +#define XFT_PROPORTIONAL FC_PROPORTIONAL +#define XFT_MONO FC_MONO +#define XFT_CHARCELL FC_CHARCELL + +#define XFT_RGBA_UNKNOWN FC_RGBA_UNKNOWN +#define XFT_RGBA_RGB FC_RGBA_RGB +#define XFT_RGBA_BGR FC_RGBA_BGR +#define XFT_RGBA_VRGB FC_RGBA_VRGB +#define XFT_RGBA_VBGR FC_RGBA_VBGR +#define XFT_RGBA_NONE FC_RGBA_NONE + +/* + * Old constants + */ +#define XFT_ENCODING "encoding" + +typedef FcType XftType; + +typedef FcMatrix XftMatrix; + +#define XftMatrixInit(m) FcMatrixInit(m) + +typedef FcResult XftResult; + +#define XftResultMatch FcResultMatch +#define XftResultNoMatch FcResultNoMatch +#define XftResultTypeMismatch FcResultTypeMismatch +#define XftResultNoId FcResultNoId + +typedef FcValue XftValue; +typedef FcPattern XftPattern; +typedef FcFontSet XftFontSet; +typedef FcObjectSet XftObjectSet; + +#define XftGlyphExists XftCharExists + +#define XftObjectSetCreate FcObjectSetCreate +#define XftObjectSetAdd FcObjectSetAdd +#define XftObjectSetDestroy FcObjectSetDestroy +#define XftObjectSetVaBuild FcObjectSetVaBuild +#define XftObjectSetBuild FcObjectSetBuild + +#define XftListFontsPatternObjects FcListFontsPatternObjects + +#define XftFontSetMatch FcFontSetMatch +#define XftFontSetDestroy FcFontSetDestroy + +#define XftMatrixEqual FcMatrixEqual +#define XftMatrixMultiply FcMatrixMultiply +#define XftMatrixRotate FcMatrixRotate +#define XftMatrixScale FcMatrixScale +#define XftMatrixShear FcMatrixShear + +#define XftPatternCreate FcPatternCreate +#define XftPatternDuplicate FcPatternDuplicate +#define XftValueDestroy FcValueDestroy +#define XftValueListDestroy FcValueListDestroy +#define XftPatternDestroy FcPatternDestroy +#define XftPatternFind FcPatternFind +#define XftPatternAdd FcPatternAdd +#define XftPatternGet FcPatternGet +#define XftPatternDel FcPatternDel +#define XftPatternAddInteger FcPatternAddInteger +#define XftPatternAddDouble FcPatternAddDouble +#define XftPatternAddString(p,e,s) FcPatternAddString(p,e,(FcChar8 *)(s)) +#define XftPatternAddMatrix FcPatternAddMatrix +#define XftPatternAddBool FcPatternAddBool +#define XftPatternGetInteger FcPatternGetInteger +#define XftPatternGetDouble FcPatternGetDouble +#define XftPatternGetString(p,e,i,n) FcPatternGetString(p,e,i,(FcChar8 **) (n)) +#define XftPatternGetMatrix FcPatternGetMatrix +#define XftPatternGetBool FcPatternGetBool +#define XftPatternVaBuild FcPatternVaBuild +#define XftPatternBuild FcPatternBuild + +#define XftUtf8ToUcs4 FcUtf8ToUcs4 +#define XftUtf8Len FcUtf8Len + +#define XftTypeVoid FcTypeVoid +#define XftTypeInteger FcTypeInteger +#define XftTypeDouble FcTypeDouble +#define XftTypeString FcTypeString +#define XftTypeBool FcTypeBool +#define XftTypeMatrix FcTypeMatrix + +#define XftConfigSubstitute(p) FcConfigSubstitute (0, p, FcMatchPattern) + +_XFUNCPROTOBEGIN + +FcBool +XftNameUnparse (XftPattern *pat, char *dest, int len); + +_XFUNCPROTOEND + +#endif /* _XFTCOMPAT_H_ */ Index: xc/lib/Xft/XftConfig.cpp diff -u xc/lib/Xft/XftConfig.cpp:1.8 xc/lib/Xft/XftConfig.cpp:removed --- xc/lib/Xft/XftConfig.cpp:1.8 Wed Nov 21 18:41:12 2001 +++ xc/lib/Xft/XftConfig.cpp Thu Feb 27 12:27:22 2003 @@ -1,39 +0,0 @@ -XCOMM $XFree86: xc/lib/Xft/XftConfig.cpp,v 1.8 2001/11/21 23:41:12 keithp Exp $ - -dir XFT_TYPE1_DIR - -XCOMM -XCOMM alias 'fixed' for 'mono' -XCOMM -match any family == "fixed" edit family =+ "mono"; - -XCOMM -XCOMM Check users config file -XCOMM -includeif "~/.xftconfig" - -XCOMM -XCOMM Use Luxi fonts for default faces -XCOMM -match any family == "serif" edit family += "Luxi Serif"; -match any family == "sans" edit family += "Luxi Sans"; -match any family == "mono" edit family += "Luxi Mono"; - -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"; - -XCOMM -XCOMM Alias older name for Luxi fonts -XCOMM -match any family == "LuciduxSerif" edit family += "Luxi Serif"; -match any family == "Lucidux Serif" edit family += "Luxi Serif"; - -match any family == "LuciduxSans" edit family += "Luxi Sans"; -match any family == "Lucidux Sans" edit family += "Luxi Sans"; - -match any family == "LuciduxMono" edit family += "Luxi Mono"; -match any family == "Lucidux Mono" edit family += "Luxi Mono"; Index: xc/lib/Xft/XftFreetype.h diff -u xc/lib/Xft/XftFreetype.h:1.15 xc/lib/Xft/XftFreetype.h:1.16 --- xc/lib/Xft/XftFreetype.h:1.15 Sat Mar 31 18:07:29 2001 +++ xc/lib/Xft/XftFreetype.h Fri Feb 15 02:36:10 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/XftFreetype.h,v 1.15 2001/03/31 23:07:29 keithp Exp $ + * $XFree86: xc/lib/Xft/XftFreetype.h,v 1.16 2002/02/15 07:36:10 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -22,84 +22,84 @@ * PERFORMANCE OF THIS SOFTWARE. */ +/* + * This file is strictly for backwards compatibility with + * old Xft applications + */ + #ifndef _XFTFREETYPE_H_ #define _XFTFREETYPE_H_ - -#include -#include +/* #include */ +/* #include */ +#include "Xft.h" #include #include -extern FT_Library _XftFTlibrary; +typedef struct _XftFontStruct { + FT_Face __DEPRECATED_face; /* handle to face object */ + GlyphSet __DEPRECATED_glyphset; + int min_char; + int max_char; + FT_F26Dot6 size; + int ascent; + int descent; + int height; + int max_advance_width; + int __DEPRECATED_spacing; + int __DEPRECATED_rgba; + Bool __DEPRECATED_antialias; + int __DEPRECATED_charmap; /* -1 for unencoded */ + XRenderPictFormat *__DEPRECATED_format; + XGlyphInfo **__DEPRECATED_realized; + int __DEPRECATED_nrealized; + FcBool __DEPRECATED_transform; + FT_Matrix __DEPRECATED_matrix; + /* private field */ + XftFont *font; +} XftFontStruct; -struct _XftFontStruct { - FT_Face face; /* handle to face object */ - GlyphSet glyphset; - int min_char; - int max_char; - FT_F26Dot6 size; - int ascent; - int descent; - int height; - int max_advance_width; - int spacing; - int rgba; - Bool antialias; - 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, FcPattern *pattern); XftFontStruct * -XftFreeTypeOpen (Display *dpy, XftPattern *pattern); +XftFreeTypeGet (XftFont *font); void XftFreeTypeClose (Display *dpy, XftFontStruct *font); -XftFontStruct * -XftFreeTypeGet (XftFont *font); +void +XftGlyphLoad (Display *dpy, + XftFontStruct *font, + FcChar32 *glyphs, + int nglyph); -Bool -XftInitFtLibrary(void); +void +XftGlyphCheck (Display *dpy, + XftFontStruct *font, + FcChar32 glyph, + FcChar32 *missing, + int *nmissing); -/* xftglyphs.c */ void XftGlyphLoad (Display *dpy, XftFontStruct *font, - XftChar32 *glyphs, + FcChar32 *glyphs, int nglyph); void XftGlyphCheck (Display *dpy, XftFontStruct *font, - XftChar32 glyph, - XftChar32 *missing, + FcChar32 glyph, + FcChar32 *missing, int *nmissing); Bool XftFreeTypeGlyphExists (Display *dpy, XftFontStruct *font, - XftChar32 glyph); + FcChar32 glyph); /* xftrender.c */ @@ -108,54 +108,54 @@ XftFontStruct *font, Picture dst, int srcx, int srcy, int x, int y, - XftChar8 *string, int len); + FcChar8 *string, int len); void XftRenderString16 (Display *dpy, Picture src, XftFontStruct *font, Picture dst, int srcx, int srcy, int x, int y, - XftChar16 *string, int len); + FcChar16 *string, int len); void XftRenderString32 (Display *dpy, Picture src, XftFontStruct *font, Picture dst, int srcx, int srcy, int x, int y, - XftChar32 *string, int len); + FcChar32 *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); + FcChar8 *string, int len); void XftRenderExtents8 (Display *dpy, XftFontStruct *font, - XftChar8 *string, + FcChar8 *string, int len, XGlyphInfo *extents); void XftRenderExtents16 (Display *dpy, XftFontStruct *font, - XftChar16 *string, + FcChar16 *string, int len, XGlyphInfo *extents); void XftRenderExtents32 (Display *dpy, XftFontStruct *font, - XftChar32 *string, + FcChar32 *string, int len, XGlyphInfo *extents); void XftRenderExtentsUtf8 (Display *dpy, XftFontStruct *font, - XftChar8 *string, + FcChar8 *string, int len, XGlyphInfo *extents); Index: xc/lib/Xft/config.h.in diff -u /dev/null xc/lib/Xft/config.h.in:1.1 --- /dev/null Thu Feb 27 12:27:22 2003 +++ xc/lib/Xft/config.h.in Thu May 23 19:01:56 2002 @@ -0,0 +1,14 @@ +/* config.h.in. Generated manually by keithp. */ + +/* Library major version */ +#undef PACKAGE_MAJOR + +/* Library minor version */ +#undef PACKAGE_MINOR + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Library revision */ +#undef PACKAGE_REVISION + Index: xc/lib/Xft/configure.in diff -u /dev/null xc/lib/Xft/configure.in:1.2 --- /dev/null Thu Feb 27 12:27:22 2003 +++ xc/lib/Xft/configure.in Fri Jun 7 13:55:40 2002 @@ -0,0 +1,289 @@ +dnl +dnl $XFree86: xc/lib/Xft/configure.in,v 1.2 2002/06/07 17:55:40 keithp Exp $ +dnl +dnl Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation, and that the name of Keith Packard not be used in +dnl advertising or publicity pertaining to distribution of the software without +dnl specific, written prior permission. Keith Packard makes no +dnl representations about the suitability of this software for any purpose. It +dnl is provided "as is" without express or implied warranty. +dnl +dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +dnl PERFORMANCE OF THIS SOFTWARE. +dnl + +# Process this file with autoconf to produce a configure script. +AC_INIT(Xft.h, 2.0.0, fonts@xfree86.org) +AC_CONFIG_AUX_DIR(config) +AC_CONFIG_HEADER(config.h) + +AC_ARG_WITH(freetype_includes, [ --with-freetype-includes=DIR Use FreeType includes in DIR], freetype_includes=$withval, freetype_includes=yes) +AC_ARG_WITH(freetype_lib, [ --with-freetype-lib=DIR Use FreeType library in DIR], freetype_lib=$withval, freetype_lib=yes) +AC_ARG_WITH(freetype_config, [ --with-freeetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes) +AC_ARG_WITH(fontconfig_includes, [ --with-fontconfig-includes=DIR Use Fontconfig includes in DIR], fontconfig_includes=$withval, fontconfig_includes=yes) +AC_ARG_WITH(fontconfig_lib, [ --with-fontconfig-lib=DIR Use Fontconfig library in DIR], fontconfig_lib=$withval, fontconfig_lib=yes) +AC_ARG_WITH(fontconfig_config, [ --with-fontconfig-config=PROG Use Fontconfig configuration program PROG], fontconfig_config=$withval, fontconfig_config=yes) + +# Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PATH_X + +PACKAGE_VERSION=2.0.0 + +# Set major version +PACKAGE_MAJOR=`echo $PACKAGE_VERSION | awk -F . '{ print $1 }'` +PACKAGE_MINOR=`echo $PACKAGE_VERSION | awk -F . '{ print $2 }'` +PACKAGE_REVISION=`echo $PACKAGE_VERSION | awk -F . '{ print $3 }'` +AC_SUBST(PACKAGE_VERSION) +AC_SUBST(PACKAGE_MAJOR) +AC_SUBST(PACKAGE_MINOR) +AC_SUBST(PACKAGE_REVISION) + +OBJEXT="o" +AC_SUBST(OBJEXT) + +AC_DEFINE_UNQUOTED(PACKAGE_MAJOR,$PACKAGE_MAJOR) +AC_DEFINE_UNQUOTED(PACKAGE_MINOR,$PACKAGE_MINOR) +AC_DEFINE_UNQUOTED(PACKAGE_REVISION,$PACKAGE_REVISION) + +if test "$GCC" = "yes"; then + MKSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' + DSO_LDOPTS='-shared -Wl,-h,`echo $@ | sed '"'s/\.so\.\([[0-9][0-9]]*\).*/.so.\1/'"'`' + DSO_CFLAGS='' + DSO_PIC_CFLAGS='-fPIC -DPIC' +else + + AC_CANONICAL_HOST + + MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@' + DSO_CFLAGS='' + DSO_PIC_CFLAGS='-KPIC -DPIC' + + case "$host" in + *solaris*) + DSO_LDOPTS='-G -z text -z defs -h $@' + LIBS="$LIBS -lc" + ;; + *) + DSO_LDOPTS='-shared -h $@' + ;; + esac +fi + +AC_SUBST(MKSHLIB) +AC_SUBST(DSO_LDOPTS) +AC_SUBST(DSO_CFLAGS) +AC_SUBST(DSO_PIC_CFLAGS) + +# +# Check X configuration +# +case "$have_x" in +yes) + XRENDER_CFLAGS="-I$x_includes" + XRENDER_LIBS="-L$x_libraries -lXrender" + + saved_LIBS="$LIBS" + LIBS="$LIBS $XRENDER_LIBS" + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS" + AC_CHECK_HEADERS(X11/extensions/Xrender.h) + + case "$ac_cv_header_X11_extensions_Xrender_h" in + no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + ;; + yes) + AC_CHECK_FUNCS(XRenderQueryVersion) + case "$ac_cv_func_XRenderQueryVersion" in + no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + ;; + yes) + AC_DEFINE(HAVE_XRENDER) + AC_SUBST(XRENDER_CFLAGS) + AC_SUBST(XRENDER_LIBS) + ;; + esac + ;; + esac + + ;; +esac + +# +# Check freetype configuration +# +case "$freetype_config" in +no) + ;; +yes) + AC_CHECK_PROG(ft_config,freetype-config,freetype-config,no) + ;; +*) + ft_config="$freetype_config" + ;; +esac + +case "$freetype_includes" in +no) + FREETYPE_CFLAGS="" + ;; +yes) + case "$ft_config" in + no) + FREETYPE_CFLAGS="" + ;; + *) + FREETYPE_CFLAGS="`$ft_config --cflags`" + ;; + esac + ;; +*) + FREETYPE_CFLAGS="-I$freetype_includes" + ;; +esac + +case "$freetype_lib" in +no) + freetype_lib="" + ;; +yes) + case "$ft_config" in + no) + freetype_lib="" + ;; + *) + FREETYPE_LIBS="`$ft_config --libs`" + ;; + esac + ;; +*) + FREETYPE_LIBS="-L$freetype_lib -lfreetype" + ;; +esac + +saved_LIBS="$LIBS" +LIBS="$LIBS $FREETYPE_LIBS" +saved_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" +AC_CHECK_HEADERS(freetype/freetype.h) + +case "$ac_cv_header_freetype_freetype_h" in +no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + ;; +yes) + AC_CHECK_FUNCS(FT_Init_FreeType) + case "$ac_cv_func_FT_Init_FreeType" in + no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + ;; + yes) + AC_DEFINE(HAVE_FREETYPE) + AC_SUBST(FREETYPE_CFLAGS) + AC_SUBST(FREETYPE_LIBS) + ;; + esac + ;; +esac + +# +# Check fontconfig configuration +# +case "$fontconfig_config" in +no) + ;; +yes) + AC_CHECK_PROG(fc_config,fontconfig-config,fontconfig-config,no) + ;; +*) + fc_config="$fontconfig_config" + ;; +esac + +case "$fontconfig_includes" in +no) + FONTCONFIG_CFLAGS="" + ;; +yes) + case "$fc_config" in + no) + FONTCONFIG_CFLAGS="" + ;; + *) + FONTCONFIG_CFLAGS="`$fc_config --cflags`" + ;; + esac + ;; +*) + FONTCONFIG_CFLAGS="-I$fontconfig_includes" + ;; +esac + +case "$fontconfig_lib" in +no) + fontconfig_lib="" + ;; +yes) + case "$fc_config" in + no) + fontconfig_lib="" + ;; + *) + FONTCONFIG_LIBS="`$fc_config --libs`" + ;; + esac + ;; +*) + FONTCONFIG_LIBS="-L$fontconfig_lib -lfontconfig" + ;; +esac + +saved_LIBS="$LIBS" +LIBS="$LIBS $FONTCONFIG_LIBS" +saved_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $FONTCONFIG_CFLAGS" +AC_CHECK_HEADERS(fontconfig/fontconfig.h) + +case "$ac_cv_header_fontconfig_fontconfig_h" in +no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + ;; +yes) + AC_CHECK_FUNCS(FcInit) + case "$ac_cv_func_FcInit" in + no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + ;; + yes) + AC_DEFINE(HAVE_FONTCONFIG) + AC_SUBST(FONTCONFIG_CFLAGS) + AC_SUBST(FONTCONFIG_LIBS) + ;; + esac + ;; +esac + + +AC_OUTPUT([Makefile + xft.pc + xft-config]) Index: xc/lib/Xft/xft-config.in diff -u /dev/null xc/lib/Xft/xft-config.in:1.2 --- /dev/null Thu Feb 27 12:27:22 2003 +++ xc/lib/Xft/xft-config.in Tue May 28 11:59:32 2002 @@ -0,0 +1,100 @@ +#! /bin/sh + +prefix="@prefix@" +exec_prefix="@exec_prefix@" +libdir="@libdir@" +includedir="@includedir@" +version="@PACKAGE_VERSION@" +freetypelibs="@FREETYPE_LIBS@" +freetypecflags="@FREETYPE_CFLAGS@" +fontconfiglibs="@FONTCONFIG_LIBS@" +fontconfigcflags="@FONTCONFIG_CFLAGS@" +xrenderlibs="@XRENDER_LIBS@" +xrendercflags="@XRENDER_CFLAGS@" + +usage() +{ + cat <&2 +fi + +while test $# -gt 0 ; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + local_prefix=yes + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + local_prefix=yes + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --version) + echo $version + exit 0 + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +if test "$local_prefix" = "yes" ; then + if test "$exec_prefix_set" != "yes" ; then + exec_prefix=$prefix + fi +fi + +if test "$echo_prefix" = "yes" ; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes" ; then + echo $exec_prefix +fi + +if test "$echo_cflags" = "yes" ; then + cflags="-I${includedir} ${freetypecflags} ${fontconfigcflags} ${xrendercflags}" + echo $cflags +fi + +if test "$echo_libs" = "yes" ; then + libs="-lXft ${freetypelibs} ${fontconfiglibs} ${xrenderlibs}" + if test "${libdir}" != "/usr/lib" ; then + echo -L${libdir} $libs + else + echo $libs + fi +fi + +# EOF Index: xc/lib/Xft/xft.pc.in diff -u /dev/null xc/lib/Xft/xft.pc.in:1.1 --- /dev/null Thu Feb 27 12:27:22 2003 +++ xc/lib/Xft/xft.pc.in Thu May 23 19:01:56 2002 @@ -0,0 +1,15 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +freetypelibs=@FREETYPE_LIBS@ +freetypecflags=@FREETYPE_CFLAGS@ +xrenderlibs=@XRENDER_LIBS@ +xrendercflags=@XRENDER_CFLAGS@ + +Name: Xft +Description: X FreeType library +Version: @PACKAGE_VERSION@ +Requires: fontconfig +Libs: -L${libdir} -lXft ${freetypelibs} ${xrenderlibs} +Cflags: -I${includedir} ${freetypecflags} ${xrendercflags} Index: xc/lib/Xft/xftcache.c diff -u xc/lib/Xft/xftcache.c:1.2 xc/lib/Xft/xftcache.c:removed --- xc/lib/Xft/xftcache.c:1.2 Mon Jun 11 18:53:30 2001 +++ xc/lib/Xft/xftcache.c Thu Feb 27 12:27:22 2003 @@ -1,608 +0,0 @@ -/* - * $XFree86: xc/lib/Xft/xftcache.c,v 1.2 2001/06/11 22:53:30 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 + 1; - 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.10 xc/lib/Xft/xftcfg.c:removed --- xc/lib/Xft/xftcfg.c:1.10 Sat Jan 12 15:46:42 2002 +++ xc/lib/Xft/xftcfg.c Thu Feb 27 12:27:22 2003 @@ -1,679 +0,0 @@ -/* - * $XFree86: xc/lib/Xft/xftcfg.c,v 1.10 2002/01/12 20:46:42 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 "xftint.h" - -static char *XftConfigDefaultDirs[] = { - "/usr/X11R6/lib/X11/fonts/Type1", - 0 -}; - -char **XftConfigDirs = XftConfigDefaultDirs; -static int XftConfigNdirs; - -char XftConfigDefaultCache[] = "~/.xftcache"; -char *XftConfigCache = 0; - -static XftSubst *XftSubsts; - -Bool -XftConfigAddDir (char *d) -{ - char **dirs; - char *dir; - char *h; - - if (*d == '~') - { - h = getenv ("HOME"); - if (!h) - return False; - dir = (char *) malloc (strlen (h) + strlen (d)); - if (!dir) - return False; - strcpy (dir, h); - strcat (dir, d+1); - } - else - { - dir = (char *) malloc (strlen (d) + 1); - if (!dir) - return False; - strcpy (dir, d); - } - dirs = (char **) malloc ((XftConfigNdirs + 2) * sizeof (char *)); - if (!dirs) - { - free (dir); - return False; - } - if (XftConfigNdirs) - { - memcpy (dirs, XftConfigDirs, XftConfigNdirs * sizeof (char *)); - } - dirs[XftConfigNdirs] = dir; - XftConfigNdirs++; - dirs[XftConfigNdirs] = 0; - if (XftConfigDirs != XftConfigDefaultDirs) - free (XftConfigDirs); - XftConfigDirs = dirs; - 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 -XftConfigAddEdit (XftTest *test, XftEdit *edit) -{ - XftSubst *subst, **prev; - XftTest *t; - int num; - - subst = (XftSubst *) malloc (sizeof (XftSubst)); - if (!subst) - return False; - for (prev = &XftSubsts; *prev; prev = &(*prev)->next); - *prev = subst; - subst->next = 0; - subst->test = test; - subst->edit = edit; - if (_XftFontDebug () & XFT_DBG_EDIT) - { - printf ("Add Subst "); - XftSubstPrint (subst); - } - num = 0; - for (t = test; t; t = t->next) - num++; - if (XftSubstsMaxObjects < num) - XftSubstsMaxObjects = num; - return True; -} - -typedef struct _XftSubState { - XftPatternElt *elt; - XftValueList *value; -} XftSubState; - -static XftMatrix XftIdentityMatrix = { 1, 0, 0, 1 }; - -static XftValue -_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; -} - -Bool -_XftConfigCompareValue (XftValue m, - XftOp op, - XftValue v) -{ - Bool ret; - - if (m.type == XftTypeVoid) - return True; - m = _XftConfigPromote (m, v); - v = _XftConfigPromote (v, m); - if (m.type == v.type) - { - ret = False; - switch (m.type) { - case XftTypeDouble: - switch (op) { - case XftOpEqual: - ret = m.u.d == v.u.d; - break; - case XftOpNotEqual: - ret = m.u.d != v.u.d; - break; - case XftOpLess: - ret = m.u.d < v.u.d; - break; - case XftOpLessEqual: - ret = m.u.d <= v.u.d; - break; - case XftOpMore: - ret = m.u.d > v.u.d; - break; - case XftOpMoreEqual: - ret = m.u.d >= v.u.d; - break; - default: - break; - } - break; - case XftTypeBool: - switch (op) { - case XftOpEqual: - ret = m.u.b == v.u.b; - break; - case XftOpNotEqual: - ret = m.u.b != v.u.b; - break; - default: - break; - } - break; - case XftTypeString: - switch (op) { - case XftOpEqual: - ret = _XftStrCmpIgnoreCase (m.u.s, v.u.s) == 0; - break; - case XftOpNotEqual: - ret = _XftStrCmpIgnoreCase (m.u.s, v.u.s) != 0; - break; - default: - break; - } - break; - default: - break; - } - } - else - { - if (op == XftOpNotEqual) - ret = True; - else - ret = False; - } - return ret; -} - -static XftValueList * -_XftConfigMatchValueList (XftTest *t, - XftValueList *v) -{ - XftValueList *ret = 0; - - for (; v; v = v->next) - { - if (_XftConfigCompareValue (v->value, t->op, t->value)) - { - if (!ret) - ret = v; - } - else - { - if (t->qual == XftQualAll) - { - ret = 0; - break; - } - } - } - return ret; -} - -static XftValue -_XftConfigEvaluate (XftPattern *p, XftExpr *e) -{ - XftValue v, vl, vr; - XftResult r; - - switch (e->op) { - case XftOpInteger: - v.type = XftTypeInteger; - v.u.i = e->u.ival; - break; - case XftOpDouble: - v.type = XftTypeDouble; - v.u.d = e->u.dval; - break; - case XftOpString: - 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; - break; - case XftOpField: - r = XftPatternGet (p, e->u.field, 0, &v); - if (r != XftResultMatch) - v.type = XftTypeVoid; - break; - case XftOpQuest: - vl = _XftConfigEvaluate (p, e->u.tree.left); - if (vl.type == XftTypeBool) - { - if (vl.u.b) - v = _XftConfigEvaluate (p, e->u.tree.right->u.tree.left); - else - v = _XftConfigEvaluate (p, e->u.tree.right->u.tree.right); - } - else - v.type = XftTypeVoid; - break; - case XftOpOr: - case XftOpAnd: - case XftOpEqual: - case XftOpNotEqual: - case XftOpLess: - case XftOpLessEqual: - case XftOpMore: - case XftOpMoreEqual: - case XftOpPlus: - case XftOpMinus: - case XftOpTimes: - case XftOpDivide: - vl = _XftConfigEvaluate (p, e->u.tree.left); - vr = _XftConfigEvaluate (p, e->u.tree.right); - vl = _XftConfigPromote (vl, vr); - vr = _XftConfigPromote (vr, vl); - if (vl.type == vr.type) - { - switch (vl.type) { - case XftTypeDouble: - switch (e->op) { - case XftOpPlus: - v.type = XftTypeDouble; - v.u.d = vl.u.d + vr.u.d; - break; - case XftOpMinus: - v.type = XftTypeDouble; - v.u.d = vl.u.d - vr.u.d; - break; - case XftOpTimes: - v.type = XftTypeDouble; - v.u.d = vl.u.d * vr.u.d; - break; - case XftOpDivide: - v.type = XftTypeDouble; - v.u.d = vl.u.d / vr.u.d; - break; - case XftOpEqual: - v.type = XftTypeBool; - v.u.b = vl.u.d == vr.u.d; - break; - case XftOpNotEqual: - v.type = XftTypeBool; - v.u.b = vl.u.d != vr.u.d; - break; - case XftOpLess: - v.type = XftTypeBool; - v.u.b = vl.u.d < vr.u.d; - break; - case XftOpLessEqual: - v.type = XftTypeBool; - v.u.b = vl.u.d <= vr.u.d; - break; - case XftOpMore: - v.type = XftTypeBool; - v.u.b = vl.u.d > vr.u.d; - break; - case XftOpMoreEqual: - v.type = XftTypeBool; - v.u.b = vl.u.d >= vr.u.d; - break; - default: - v.type = XftTypeVoid; - break; - } - if (v.type == XftTypeDouble && - v.u.d == (double) (int) v.u.d) - { - v.type = XftTypeInteger; - v.u.i = (int) v.u.d; - } - break; - case XftTypeBool: - switch (e->op) { - case XftOpOr: - v.type = XftTypeBool; - v.u.b = vl.u.b || vr.u.b; - break; - case XftOpAnd: - v.type = XftTypeBool; - v.u.b = vl.u.b && vr.u.b; - break; - case XftOpEqual: - v.type = XftTypeBool; - v.u.b = vl.u.b == vr.u.b; - break; - case XftOpNotEqual: - v.type = XftTypeBool; - v.u.b = vl.u.b != vr.u.b; - break; - default: - v.type = XftTypeVoid; - break; - } - break; - case XftTypeString: - switch (e->op) { - case XftOpEqual: - v.type = XftTypeBool; - v.u.b = _XftStrCmpIgnoreCase (vl.u.s, vr.u.s) == 0; - break; - case XftOpNotEqual: - v.type = XftTypeBool; - v.u.b = _XftStrCmpIgnoreCase (vl.u.s, vr.u.s) != 0; - break; - case XftOpPlus: - v.type = XftTypeString; - v.u.s = malloc (strlen (vl.u.s) + strlen (vr.u.s) + 1); - if (v.u.s) - { - strcpy (v.u.s, vl.u.s); - strcat (v.u.s, vr.u.s); - } - else - v.type = XftTypeVoid; - break; - default: - 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; - } - } - else - v.type = XftTypeVoid; - break; - case XftOpNot: - vl = _XftConfigEvaluate (p, e->u.tree.left); - switch (vl.type) { - case XftTypeBool: - v.type = XftTypeBool; - v.u.b = !vl.u.b; - break; - default: - v.type = XftTypeVoid; - break; - } - break; - default: - v.type = XftTypeVoid; - break; - } - return v; -} - -static XftValueList * -_XftConfigAdd (XftValueList **head, - XftValueList *position, - Bool append, - XftValue value) -{ - XftValueList *new, **prev; - - new = (XftValueList *) malloc (sizeof (XftValueList)); - if (!new) - goto bail0; - - if (value.type == XftTypeString) - { - value.u.s = _XftSaveString (value.u.s); - if (!value.u.s) - goto bail1; - - } - new->value = value; - new->next = 0; - - if (append) - { - prev = &position->next; - } - else - { - for (prev = head; *prev; prev = &(*prev)->next) - { - if (*prev == position) - break; - } - if (_XftFontDebug() & XFT_DBG_EDIT) - { - if (!*prev) - printf ("position not on list\n"); - } - } - - if (_XftFontDebug() & XFT_DBG_EDIT) - { - printf ("%s list before ", append ? "Append" : "Prepend"); - XftValueListPrint (*head); - printf ("\n"); - } - - new->next = *prev; - *prev = new; - - if (_XftFontDebug() & XFT_DBG_EDIT) - { - printf ("%s list after ", append ? "Append" : "Prepend"); - XftValueListPrint (*head); - printf ("\n"); - } - - return new; - -bail1: - free (new); -bail0: - return 0; -} - -static void -_XftConfigDel (XftValueList **head, - XftValueList *position) -{ - XftValueList **prev; - - for (prev = head; *prev; prev = &(*prev)->next) - { - if (*prev == position) - { - *prev = position->next; - position->next = 0; - XftValueListDestroy (position); - break; - } - } -} - -Bool -XftConfigSubstitute (XftPattern *p) -{ - XftSubst *s; - XftSubState *st; - int i; - XftTest *t; - XftEdit *e; - XftValue v; - - st = (XftSubState *) malloc (XftSubstsMaxObjects * sizeof (XftSubState)); - if (!st && XftSubstsMaxObjects) - return False; - - if (_XftFontDebug() & XFT_DBG_EDIT) - { - printf ("XftConfigSubstitute "); - XftPatternPrint (p); - } - for (s = XftSubsts; s; s = s->next) - { - for (t = s->test, i = 0; t; t = t->next, i++) - { - if (_XftFontDebug() & XFT_DBG_EDIT) - { - printf ("XftConfigSubstitute test "); - XftTestPrint (t); - } - st[i].elt = XftPatternFind (p, t->field, False); - if (!st[i].elt) - { - if (t->qual == XftQualAll) - continue; - else - break; - } - st[i].value = _XftConfigMatchValueList (t, st[i].elt->values); - if (!st[i].value) - break; - } - if (t) - { - if (_XftFontDebug() & XFT_DBG_EDIT) - { - printf ("No match\n"); - } - continue; - } - if (_XftFontDebug() & XFT_DBG_EDIT) - { - printf ("Substitute "); - XftSubstPrint (s); - } - for (e = s->edit; e; e = e->next) - { - v = _XftConfigEvaluate (p, e->expr); - if (v.type == XftTypeVoid) - continue; - for (t = s->test, i = 0; t; t = t->next, i++) - if (!_XftStrCmpIgnoreCase (t->field, e->field)) - break; - switch (e->op) { - case XftOpAssign: - if (t) - { - XftValueList *new; - new = _XftConfigAdd (&st[i].elt->values, st[i].value, True, v); - if (new) - { - _XftConfigDel (&st[i].elt->values, st[i].value); - st[i].value = new; - } - } - else - { - XftPatternDel (p, e->field); - XftPatternAdd (p, e->field, v, True); - } - break; - case XftOpPrepend: - if (t) - _XftConfigAdd (&st[i].elt->values, st[i].value, False, v); - else - XftPatternAdd (p, e->field, v, False); - break; - case XftOpAppend: - if (t) - _XftConfigAdd (&st[i].elt->values, st[i].value, True, v); - else - XftPatternAdd (p, e->field, v, True); - break; - default: - break; - } - } - if (_XftFontDebug() & XFT_DBG_EDIT) - { - printf ("XftConfigSubstitute edit"); - XftPatternPrint (p); - } - } - free (st); - if (_XftFontDebug() & XFT_DBG_EDIT) - { - printf ("XftConfigSubstitute done"); - XftPatternPrint (p); - } - return True; -} Index: xc/lib/Xft/xftcolor.c diff -u xc/lib/Xft/xftcolor.c:1.2 xc/lib/Xft/xftcolor.c:1.3 --- xc/lib/Xft/xftcolor.c:1.2 Wed May 16 13:20:06 2001 +++ xc/lib/Xft/xftcolor.c Fri Oct 11 13:53:02 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftcolor.c,v 1.2 2001/05/16 17:20:06 keithp Exp $ + * $XFree86: xc/lib/Xft/xftcolor.c,v 1.3 2002/10/11 17:53:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -26,9 +26,9 @@ Bool XftColorAllocName (Display *dpy, - Visual *visual, + _Xconst Visual *visual, Colormap cmap, - char *name, + _Xconst char *name, XftColor *result) { XColor screen, exact; @@ -77,7 +77,7 @@ XftColorAllocValue (Display *dpy, Visual *visual, Colormap cmap, - XRenderColor *color, + _Xconst XRenderColor *color, XftColor *result) { if (visual->class == TrueColor) Index: xc/lib/Xft/xftcore.c diff -u xc/lib/Xft/xftcore.c:1.5 xc/lib/Xft/xftcore.c:1.13 --- xc/lib/Xft/xftcore.c:1.5 Tue Dec 19 19:28:44 2000 +++ xc/lib/Xft/xftcore.c Sat Feb 15 17:30:51 2003 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftcore.c,v 1.5 2000/12/20 00:28:44 keithp Exp $ + * $XFree86: xc/lib/Xft/xftcore.c,v 1.13 2003/02/15 22:30:51 dawes Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -24,224 +24,1354 @@ #include #include "xftint.h" +#include -XChar2b * -XftCoreConvert16 (XftChar16 *string, - int len, - XChar2b xcloc[XFT_CORE_N16LOCAL]) +void +XftRectCore (XftDraw *draw, + _Xconst XftColor *color, + int x, + int y, + unsigned int width, + unsigned int height) +{ + if (color->color.alpha >= 0x8000) + { + XSetForeground (draw->dpy, draw->core.gc, color->pixel); + XFillRectangle (draw->dpy, draw->drawable, draw->core.gc, + x, y, width, height); + } +} + +/* + * Use the core protocol to draw the glyphs + */ + +static void +_XftSharpGlyphMono (XftDraw *draw, + XftGlyph *glyph, + int x, + int y) +{ + unsigned char *srcLine = glyph->bitmap, *src; + unsigned char bits, bitsMask; + int width = glyph->metrics.width; + int stride = ((width + 31) & ~31) >> 3; + int height = glyph->metrics.height; + int w; + int xspan, lenspan; + + x -= glyph->metrics.x; + y -= glyph->metrics.y; + while (height--) + { + src = srcLine; + srcLine += stride; + w = width; + + bitsMask = 0x80; /* FreeType is always MSB first */ + bits = *src++; + + xspan = x; + while (w) + { + if (bits & bitsMask) + { + lenspan = 0; + do + { + lenspan++; + if (lenspan == w) + break; + bitsMask = bitsMask >> 1; + if (!bitsMask) + { + bits = *src++; + bitsMask = 0x80; + } + } while (bits & bitsMask); + XFillRectangle (draw->dpy, draw->drawable, + draw->core.gc, xspan, y, lenspan, 1); + xspan += lenspan; + w -= lenspan; + } + else + { + do + { + w--; + xspan++; + if (!w) + break; + bitsMask = bitsMask >> 1; + if (!bitsMask) + { + bits = *src++; + bitsMask = 0x80; + } + } while (!(bits & bitsMask)); + } + } + y++; + } +} + +/* + * Draw solid color text from an anti-aliased bitmap. This is a + * fallback for cases where a particular drawable has no AA code + */ +static void +_XftSharpGlyphGray (XftDraw *draw, + XftGlyph *glyph, + int x, + int y) +{ + unsigned char *srcLine = glyph->bitmap, *src, bits; + int width = glyph->metrics.width; + int stride = ((width + 3) & ~3); + int height = glyph->metrics.height; + int w; + int xspan, lenspan; + + x -= glyph->metrics.x; + y -= glyph->metrics.y; + while (height--) + { + src = srcLine; + srcLine += stride; + w = width; + + bits = *src++; + xspan = x; + while (w) + { + if (bits >= 0x80) + { + lenspan = 0; + do + { + lenspan++; + if (lenspan == w) + break; + bits = *src++; + } while (bits >= 0x80); + XFillRectangle (draw->dpy, draw->drawable, + draw->core.gc, xspan, y, lenspan, 1); + xspan += lenspan; + w -= lenspan; + } + else + { + do + { + w--; + xspan++; + if (!w) + break; + bits = *src++; + } while (bits < 0x80); + } + } + y++; + } +} + +static void +_XftSharpGlyphRgba (XftDraw *draw, + XftGlyph *glyph, + int x, + int y) +{ + CARD32 *srcLine = glyph->bitmap, *src, bits; + int width = glyph->metrics.width; + int stride = ((width + 3) & ~3); + int height = glyph->metrics.height; + int w; + int xspan, lenspan; + + x -= glyph->metrics.x; + y -= glyph->metrics.y; + while (height--) + { + src = srcLine; + srcLine += stride; + w = width; + + bits = *src++; + xspan = x; + while (w) + { + if (bits >= 0x80000000) + { + lenspan = 0; + do + { + lenspan++; + if (lenspan == w) + break; + bits = *src++; + } while (bits >= 0x80000000); + XFillRectangle (draw->dpy, draw->drawable, + draw->core.gc, xspan, y, lenspan, 1); + xspan += lenspan; + w -= lenspan; + } + else + { + do + { + w--; + xspan++; + if (!w) + break; + bits = *src++; + } while (bits < 0x80000000); + } + } + y++; + } +} + +typedef void (*XftSharpGlyph) (XftDraw *draw, + XftGlyph *glyph, + int x, + int y); + +static XftSharpGlyph +_XftSharpGlyphFind (XftDraw *draw, XftFont *public) +{ + XftFontInt *font = (XftFontInt *) public; + + if (!font->info.antialias) + return _XftSharpGlyphMono; + else switch (font->info.rgba) { + case FC_RGBA_RGB: + case FC_RGBA_BGR: + case FC_RGBA_VRGB: + case FC_RGBA_VBGR: + return _XftSharpGlyphRgba; + default: + return _XftSharpGlyphGray; + } +} + +/* + * Draw glyphs to a target that supports anti-aliasing + */ + +/* + * Primitives for converting between RGB values and TrueColor pixels + */ + +static void +_XftExamineBitfield (unsigned long mask, int *shift, int *len) +{ + int s, l; + + s = 0; + while ((mask & 1) == 0) + { + mask >>= 1; + s++; + } + l = 0; + while ((mask & 1) == 1) + { + mask >>= 1; + l++; + } + *shift = s; + *len = l; +} + +static CARD32 +_XftGetField (unsigned long l_pixel, int shift, int len) { - XChar2b *xc; - int i; + CARD32 pixel = (CARD32) l_pixel; - if (len < XFT_CORE_N16LOCAL) - xc = xcloc; + pixel = pixel & (((1 << (len)) - 1) << shift); + pixel = pixel << (32 - (shift + len)) >> 24; + while (len < 8) + { + pixel |= (pixel >> len); + len <<= 1; + } + return pixel; +} + +static unsigned long +_XftPutField (CARD32 pixel, int shift, int len) +{ + unsigned long l_pixel = (unsigned long) pixel; + + shift = shift - (8 - len); + if (len <= 8) + l_pixel &= (((1 << len) - 1) << (8 - len)); + if (shift < 0) + l_pixel >>= -shift; else - xc = (XChar2b *) malloc (len * sizeof (XChar2b)); - for (i = 0; i < len; i++) + l_pixel <<= shift; + return l_pixel; +} + +/* + * This is used when doing XftCharFontSpec/XftGlyphFontSpec where + * some of the fonts are bitmaps and some are anti-aliased to handle + * the bitmap portions + */ +static void +_XftSmoothGlyphMono (XImage *image, + _Xconst XftGlyph *xftg, + int x, + int y, + _Xconst XftColor *color) +{ + unsigned char *srcLine = xftg->bitmap, *src; + unsigned char bits, bitsMask; + int width = xftg->metrics.width; + int stride = ((width + 31) & ~31) >> 3; + int height = xftg->metrics.height; + int w; + int xspan; + int r_shift, r_len; + int g_shift, g_len; + int b_shift, b_len; + unsigned long pixel; + + _XftExamineBitfield (image->red_mask, &r_shift, &r_len); + _XftExamineBitfield (image->green_mask, &g_shift, &g_len); + _XftExamineBitfield (image->blue_mask, &b_shift, &b_len); + pixel = (_XftPutField (color->color.red >> 8, r_shift, r_len) | + _XftPutField (color->color.green >> 8, g_shift, g_len) | + _XftPutField (color->color.blue >> 8, b_shift, b_len)); + x -= xftg->metrics.x; + y -= xftg->metrics.y; + while (height--) { - xc[i].byte1 = string[i] & 0xff; - xc[i].byte2 = (string[i] >> 8) & 0xff; + src = srcLine; + srcLine += stride; + w = width; + + bitsMask = 0x80; /* FreeType is always MSB first */ + bits = *src++; + + xspan = x; + while (w--) + { + if (bits & bitsMask) + XPutPixel (image, xspan, y, pixel); + bitsMask = bitsMask >> 1; + if (!bitsMask) + { + bits = *src++; + bitsMask = 0x80; + } + xspan++; + } + y++; } - return xc; } + +/* + * As simple anti-aliasing is likely to be common, there are three + * optimized versions for the usual true color pixel formats (888, 565, 555). + * Other formats are handled by the general case + */ + +#define cvt8888to0565(s) ((((s) >> 3) & 0x001f) | \ + (((s) >> 5) & 0x07e0) | \ + (((s) >> 8) & 0xf800)) + +#define cvt0565to8888(s) (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \ + ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \ + ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000))) + +#define cvt8888to0555(s) ((((s) >> 3) & 0x001f) | \ + (((s) >> 6) & 0x03e0) | \ + (((s) >> 7) & 0x7c00)) + +#define cvt0555to8888(s) (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \ + ((((s) << 6) & 0xf800) | (((s) >> 0) & 0x300)) | \ + ((((s) << 9) & 0xf80000) | (((s) << 4) & 0x70000))) + + +#define XftIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) ) +#define XftIntDiv(a,b) (((CARD16) (a) * 255) / (b)) + +#define XftGet8(v,i) ((CARD16) (CARD8) ((v) >> i)) + +/* + * There are two ways of handling alpha -- either as a single unified value or + * a separate value for each component, hence each macro must have two + * versions. The unified alpha version has a 'U' at the end of the name, + * the component version has a 'C'. Similarly, functions which deal with + * this difference will have two versions using the same convention. + */ -XChar2b * -XftCoreConvert32 (XftChar32 *string, - int len, - XChar2b xcloc[XFT_CORE_N16LOCAL]) +#define XftOverU(x,y,i,a,t) ((t) = XftIntMult(XftGet8(y,i),(a),(t)) + XftGet8(x,i),\ + (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) + +#define XftOverC(x,y,i,a,t) ((t) = XftIntMult(XftGet8(y,i),XftGet8(a,i),(t)) + XftGet8(x,i),\ + (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) + +#define XftInU(x,i,a,t) ((CARD32) XftIntMult(XftGet8(x,i),(a),(t)) << (i)) + +#define XftInC(x,i,a,t) ((CARD32) XftIntMult(XftGet8(x,i),XftGet8(a,i),(t)) << (i)) + +#define XftGen(x,y,i,ax,ay,t,u,v) ((t) = (XftIntMult(XftGet8(y,i),ay,(u)) + \ + XftIntMult(XftGet8(x,i),ax,(v))),\ + (CARD32) ((CARD8) ((t) | \ + (0 - ((t) >> 8)))) << (i)) + +#define XftAdd(x,y,i,t) ((t) = XftGet8(x,i) + XftGet8(y,i), \ + (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) + + +static CARD32 +fbOver24 (CARD32 x, CARD32 y) +{ + CARD16 a = ~x >> 24; + CARD16 t; + CARD32 m,n,o; + + m = XftOverU(x,y,0,a,t); + n = XftOverU(x,y,8,a,t); + o = XftOverU(x,y,16,a,t); + return m|n|o; +} + +static CARD32 +fbIn (CARD32 x, CARD8 y) { - XChar2b *xc; - int i; + CARD16 a = y; + CARD16 t; + CARD32 m,n,o,p; + + m = XftInU(x,0,a,t); + n = XftInU(x,8,a,t); + o = XftInU(x,16,a,t); + p = XftInU(x,24,a,t); + return m|n|o|p; +} + +static void +_XftSmoothGlyphGray8888 (XImage *image, + _Xconst XftGlyph *xftg, + int x, + int y, + _Xconst XftColor *color) +{ + CARD32 src, srca; + CARD32 r, g, b; + CARD32 *dstLine, *dst, d; + CARD8 *maskLine, *mask, m; + int dstStride, maskStride; + int width, height; + int w; + + srca = color->color.alpha >> 8; - if (len < XFT_CORE_N16LOCAL) - xc = xcloc; + /* This handles only RGB and BGR */ + g = (color->color.green & 0xff00); + if (image->red_mask == 0xff0000) + { + r = (color->color.red & 0xff00) << 8; + b = color->color.blue >> 8; + } else - xc = (XChar2b *) malloc (len * sizeof (XChar2b)); - for (i = 0; i < len; i++) + { + r = color->color.red >> 8; + b = (color->color.blue & 0xff00) << 8; + } + src = (srca << 24) | r | g | b; + + width = xftg->metrics.width; + height = xftg->metrics.height; + + x -= xftg->metrics.x; + y -= xftg->metrics.y; + + dstLine = (CARD32 *) (image->data + image->bytes_per_line * y + (x << 2)); + dstStride = image->bytes_per_line >> 2; + maskLine = (unsigned char *) xftg->bitmap; + maskStride = (width + 3) & ~3; + + while (height--) { - xc[i].byte1 = string[i] & 0xff; - xc[i].byte2 = (string[i] >> 8) & 0xff; + dst = dstLine; + dstLine += dstStride; + mask = maskLine; + maskLine += maskStride; + w = width; + + while (w--) + { + m = *mask++; + if (m == 0xff) + { + if (srca == 0xff) + *dst = src; + else + *dst = fbOver24 (src, *dst); + } + else if (m) + { + d = fbIn (src, m); + *dst = fbOver24 (d, *dst); + } + dst++; + } } - return xc; } -XChar2b * -XftCoreConvertUtf8 (XftChar8 *string, - int len, - XChar2b xcloc[XFT_CORE_N16LOCAL], - int *nchar) +static void +_XftSmoothGlyphGray565 (XImage *image, + _Xconst XftGlyph *xftg, + int x, + int y, + _Xconst XftColor *color) { - XChar2b *xc; - XftChar32 c; - int i; - int n, width; - int clen; - - if (!XftUtf8Len (string, len, &n, &width)) - return 0; + CARD32 src, srca; + CARD32 r, g, b; + CARD32 d; + CARD16 *dstLine, *dst; + CARD8 *maskLine, *mask, m; + int dstStride, maskStride; + int width, height; + int w; + + srca = color->color.alpha >> 8; - if (n < XFT_CORE_N16LOCAL) - xc = xcloc; + /* This handles only RGB and BGR */ + g = (color->color.green & 0xff00); + if (image->red_mask == 0xf800) + { + r = (color->color.red & 0xff00) << 8; + b = color->color.blue >> 8; + } else - xc = (XChar2b *) malloc (n * sizeof (XChar2b)); - for (i = 0; i < n; i++) + { + r = color->color.red >> 8; + b = (color->color.blue & 0xff00) << 8; + } + src = (srca << 24) | r | g | b; + + width = xftg->metrics.width; + height = xftg->metrics.height; + + x -= xftg->metrics.x; + y -= xftg->metrics.y; + + dstLine = (CARD16 *) (image->data + image->bytes_per_line * y + (x << 1)); + dstStride = image->bytes_per_line >> 1; + maskLine = (unsigned char *) xftg->bitmap; + maskStride = (width + 3) & ~3; + + while (height--) { - clen = XftUtf8ToUcs4 (string, &c, len); - xc[i].byte1 = c & 0xff; - xc[i].byte2 = (c >> 8) & 0xff; - string += clen; - len -= clen; + dst = dstLine; + dstLine += dstStride; + mask = maskLine; + maskLine += maskStride; + w = width; + + while (w--) + { + m = *mask++; + if (m == 0xff) + { + if (srca == 0xff) + d = src; + else + { + d = *dst; + d = fbOver24 (src, cvt0565to8888(d)); + } + *dst = cvt8888to0565(d); + } + else if (m) + { + d = *dst; + d = fbOver24 (fbIn(src,m), cvt0565to8888(d)); + *dst = cvt8888to0565(d); + } + dst++; + } } - *nchar = n; - return xc; } -void -XftCoreExtents8 (Display *dpy, - XFontStruct *fs, - XftChar8 *string, - int len, - XGlyphInfo *extents) +static void +_XftSmoothGlyphGray555 (XImage *image, + _Xconst XftGlyph *xftg, + int x, + int y, + _Xconst XftColor *color) { - int direction; - int ascent, descent; - XCharStruct overall; + CARD32 src, srca; + CARD32 r, g, b; + CARD32 d; + CARD16 *dstLine, *dst; + CARD8 *maskLine, *mask, m; + int dstStride, maskStride; + int width, height; + int w; - XTextExtents (fs, (char *) string, len, &direction, - &ascent, &descent, &overall); - if (overall.lbearing < overall.rbearing) + srca = color->color.alpha >> 8; + + /* This handles only RGB and BGR */ + g = (color->color.green & 0xff00); + if (image->red_mask == 0xf800) { - extents->x = overall.lbearing; - extents->width = overall.rbearing - overall.lbearing; + r = (color->color.red & 0xff00) << 8; + b = color->color.blue >> 8; } else + { + r = color->color.red >> 8; + b = (color->color.blue & 0xff00) << 8; + } + src = (srca << 24) | r | g | b; + + width = xftg->metrics.width; + height = xftg->metrics.height; + + x -= xftg->metrics.x; + y -= xftg->metrics.y; + + dstLine = (CARD16 *) (image->data + image->bytes_per_line * y + (x << 1)); + dstStride = image->bytes_per_line >> 1; + maskLine = (unsigned char *) xftg->bitmap; + maskStride = (width + 3) & ~3; + + while (height--) + { + dst = dstLine; + dstLine += dstStride; + mask = maskLine; + maskLine += maskStride; + w = width; + + while (w--) + { + m = *mask++; + if (m == 0xff) + { + if (srca == 0xff) + d = src; + else + { + d = *dst; + d = fbOver24 (src, cvt0555to8888(d)); + } + *dst = cvt8888to0555(d); + } + else if (m) + { + d = *dst; + d = fbOver24 (fbIn(src,m), cvt0555to8888(d)); + *dst = cvt8888to0555(d); + } + dst++; + } + } +} + +static void +_XftSmoothGlyphGray (XImage *image, + _Xconst XftGlyph *xftg, + int x, + int y, + _Xconst XftColor *color) +{ + CARD32 src, srca; + int r_shift, r_len; + int g_shift, g_len; + int b_shift, b_len; + CARD8 *maskLine, *mask, m; + int maskStride; + CARD32 d; + unsigned long pixel; + int width, height; + int w, tx; + + srca = color->color.alpha >> 8; + src = (srca << 24 | + (color->color.red & 0xff00) << 8 | + (color->color.green & 0xff00) | + (color->color.blue) >> 8); + x -= xftg->metrics.x; + y -= xftg->metrics.y; + width = xftg->metrics.width; + height = xftg->metrics.height; + + maskLine = (unsigned char *) xftg->bitmap; + maskStride = (width + 3) & ~3; + + _XftExamineBitfield (image->red_mask, &r_shift, &r_len); + _XftExamineBitfield (image->green_mask, &g_shift, &g_len); + _XftExamineBitfield (image->blue_mask, &b_shift, &b_len); + while (height--) + { + mask = maskLine; + maskLine += maskStride; + w = width; + tx = x; + + while (w--) + { + m = *mask++; + if (m == 0xff) + { + if (srca == 0xff) + d = src; + else + { + pixel = XGetPixel (image, tx, y); + d = (_XftGetField (pixel, r_shift, r_len) << 16 | + _XftGetField (pixel, g_shift, g_len) << 8 | + _XftGetField (pixel, b_shift, b_len)); + d = fbOver24 (src, d); + } + pixel = (_XftPutField ((d >> 16) & 0xff, r_shift, r_len) | + _XftPutField ((d >> 8) & 0xff, g_shift, g_len) | + _XftPutField ((d ) & 0xff, b_shift, b_len)); + XPutPixel (image, tx, y, pixel); + } + else if (m) + { + pixel = XGetPixel (image, tx, y); + d = (_XftGetField (pixel, r_shift, r_len) << 16 | + _XftGetField (pixel, g_shift, g_len) << 8 | + _XftGetField (pixel, b_shift, b_len)); + d = fbOver24 (fbIn(src,m), d); + pixel = (_XftPutField ((d >> 16) & 0xff, r_shift, r_len) | + _XftPutField ((d >> 8) & 0xff, g_shift, g_len) | + _XftPutField ((d ) & 0xff, b_shift, b_len)); + XPutPixel (image, tx, y, pixel); + } + tx++; + } + y++; + } +} + +static void +_XftSmoothGlyphRgba (XImage *image, + _Xconst XftGlyph *xftg, + int x, + int y, + _Xconst XftColor *color) +{ + CARD32 src, srca; + int r_shift, r_len; + int g_shift, g_len; + int b_shift, b_len; + CARD32 *mask, ma; + CARD32 d; + unsigned long pixel; + int width, height; + int w, tx; + + srca = color->color.alpha >> 8; + src = (srca << 24 | + (color->color.red & 0xff00) << 8 | + (color->color.green & 0xff00) | + (color->color.blue) >> 8); + x -= xftg->metrics.x; + y -= xftg->metrics.y; + width = xftg->metrics.width; + height = xftg->metrics.height; + + mask = (CARD32 *) xftg->bitmap; + + _XftExamineBitfield (image->red_mask, &r_shift, &r_len); + _XftExamineBitfield (image->green_mask, &g_shift, &g_len); + _XftExamineBitfield (image->blue_mask, &b_shift, &b_len); + while (height--) { - extents->x = overall.rbearing; - extents->width = overall.lbearing - overall.rbearing; + w = width; + tx = x; + + while (w--) + { + ma = *mask++; + if (ma == 0xffffffff) + { + if (srca == 0xff) + d = src; + else + { + pixel = XGetPixel (image, tx, y); + d = (_XftGetField (pixel, r_shift, r_len) << 16 | + _XftGetField (pixel, g_shift, g_len) << 8 | + _XftGetField (pixel, b_shift, b_len)); + d = fbOver24 (src, d); + } + pixel = (_XftPutField ((d >> 16) & 0xff, r_shift, r_len) | + _XftPutField ((d >> 8) & 0xff, g_shift, g_len) | + _XftPutField ((d ) & 0xff, b_shift, b_len)); + XPutPixel (image, tx, y, pixel); + } + else if (ma) + { + CARD32 m,n,o; + pixel = XGetPixel (image, tx, y); + d = (_XftGetField (pixel, r_shift, r_len) << 16 | + _XftGetField (pixel, g_shift, g_len) << 8 | + _XftGetField (pixel, b_shift, b_len)); +#define XftInOverC(src,srca,msk,dst,i,result) { \ + CARD16 __a = XftGet8(msk,i); \ + CARD32 __t, __ta; \ + CARD32 __i; \ + __t = XftIntMult (XftGet8(src,i), __a,__i); \ + __ta = (CARD8) ~XftIntMult (srca, __a,__i); \ + __t = __t + XftIntMult(XftGet8(dst,i),__ta,__i); \ + __t = (CARD32) (CARD8) (__t | (-(__t >> 8))); \ + result = __t << (i); \ +} + XftInOverC(src,srca,ma,d,0,m); + XftInOverC(src,srca,ma,d,8,n); + XftInOverC(src,srca,ma,d,16,o); + d = m | n | o; + pixel = (_XftPutField ((d >> 16) & 0xff, r_shift, r_len) | + _XftPutField ((d >> 8) & 0xff, g_shift, g_len) | + _XftPutField ((d ) & 0xff, b_shift, b_len)); + XPutPixel (image, tx, y, pixel); + } + tx++; + } + y++; } - extents->y = -overall.ascent; - extents->height = overall.ascent + overall.descent; - extents->xOff = overall.width; - extents->yOff = 0; } +static FcBool +_XftSmoothGlyphPossible (XftDraw *draw) +{ + if (!draw->visual) + return FcFalse; + if (draw->visual->class != TrueColor) + return FcFalse; + return FcTrue; +} + +typedef void (*XftSmoothGlyph) (XImage *image, + _Xconst XftGlyph *xftg, + int x, + int y, + _Xconst XftColor *color); + +static XftSmoothGlyph +_XftSmoothGlyphFind (XftDraw *draw, XftFont *public) +{ + XftFontInt *font = (XftFontInt *) public; + + if (!font->info.antialias) + return _XftSmoothGlyphMono; + else switch (font->info.rgba) { + case FC_RGBA_RGB: + case FC_RGBA_BGR: + case FC_RGBA_VRGB: + case FC_RGBA_VBGR: + return _XftSmoothGlyphRgba; + default: + switch (XftDrawBitsPerPixel (draw)) { + case 32: + if ((draw->visual->red_mask == 0xff0000 && + draw->visual->green_mask == 0x00ff00 && + draw->visual->blue_mask == 0x0000ff) || + (draw->visual->red_mask == 0x0000ff && + draw->visual->green_mask == 0x00ff00 && + draw->visual->blue_mask == 0xff0000)) + { + return _XftSmoothGlyphGray8888; + } + break; + case 16: + if ((draw->visual->red_mask == 0xf800 && + draw->visual->green_mask == 0x07e0 && + draw->visual->blue_mask == 0x001f) || + (draw->visual->red_mask == 0x001f && + draw->visual->green_mask == 0x07e0 && + draw->visual->blue_mask == 0xf800)) + { + return _XftSmoothGlyphGray565; + } + if ((draw->visual->red_mask == 0x7c00 && + draw->visual->green_mask == 0x03e0 && + draw->visual->blue_mask == 0x001f) || + (draw->visual->red_mask == 0x001f && + draw->visual->green_mask == 0x03e0 && + draw->visual->blue_mask == 0x7c00)) + { + return _XftSmoothGlyphGray555; + } + break; + default: + break; + } + return _XftSmoothGlyphGray; + } +} + +static XftGlyph * +_XftGlyphDefault (Display *dpy, XftFont *public) +{ + XftFontInt *font = (XftFontInt *) public; + FT_UInt missing[XFT_NMISSING]; + int nmissing; + FcBool glyphs_loaded = FcFalse; + + if (XftFontCheckGlyph (dpy, public, FcTrue, 0, missing, &nmissing)) + glyphs_loaded = FcTrue; + if (nmissing) + XftFontLoadGlyphs (dpy, public, FcTrue, missing, nmissing); + return font->glyphs[0]; +} + +static int XftGetImageErrorHandler (Display *dpy, XErrorEvent *error_event) +{ + return 0; +} + void -XftCoreExtents16 (Display *dpy, - XFontStruct *fs, - XftChar16 *string, - int len, - XGlyphInfo *extents) -{ - int direction; - int ascent, descent; - XCharStruct overall; - XChar2b *xc, xcloc[XFT_CORE_N16LOCAL]; - - 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; - extents->width = overall.rbearing - overall.lbearing; +XftGlyphCore (XftDraw *draw, + _Xconst XftColor *color, + XftFont *public, + int x, + int y, + _Xconst FT_UInt *glyphs, + int nglyphs) +{ + Display *dpy = draw->dpy; + XftFontInt *font = (XftFontInt *) public; + XftGlyph *xftg; + FT_UInt glyph; + _Xconst FT_UInt *g; + FT_UInt missing[XFT_NMISSING]; + FcBool glyphs_loaded; + int nmissing; + int n; + XErrorHandler prev_error; + + /* + * Load missing glyphs + */ + g = glyphs; + n = nglyphs; + nmissing = 0; + glyphs_loaded = FcFalse; + while (n--) + if (XftFontCheckGlyph (dpy, public, FcTrue, *g++, missing, &nmissing)) + glyphs_loaded = FcTrue; + if (nmissing) + XftFontLoadGlyphs (dpy, public, FcTrue, missing, nmissing); + + g = glyphs; + n = nglyphs; + if ((font->info.antialias || color->color.alpha != 0xffff) && + _XftSmoothGlyphPossible (draw)) + { + XGlyphInfo gi; + XImage *image; + unsigned int depth; + int ox, oy; + XftSmoothGlyph smooth = _XftSmoothGlyphFind (draw, public); + + XftGlyphExtents (dpy, public, glyphs, nglyphs, &gi); + if (!gi.width || !gi.height) + goto bail1; + ox = x - gi.x; + oy = y - gi.y; + /* + * Try to get bits directly from the drawable; if that fails, + * use a temporary pixmap. When it does fail, assume it + * will probably fail for a while and keep using temporary + * pixmaps for a while to avoid double round trips. + */ + if (draw->core.use_pixmap == 0) + { + prev_error = XSetErrorHandler (XftGetImageErrorHandler); + image = XGetImage (dpy, draw->drawable, + ox, oy, + gi.width, gi.height, AllPlanes, + ZPixmap); + XSetErrorHandler (prev_error); + if (!image) + draw->core.use_pixmap = XFT_ASSUME_PIXMAP; + } + else + { + draw->core.use_pixmap--; + image = 0; + } + if (!image && (depth = XftDrawDepth (draw))) + { + Pixmap pix; + GC gc; + XGCValues gcv; + + pix = XCreatePixmap (dpy, draw->drawable, + gi.width, gi.height, depth); + gcv.graphics_exposures = False; + gc = XCreateGC (dpy, pix, GCGraphicsExposures, &gcv); + XCopyArea (dpy, draw->drawable, pix, gc, ox, oy, + gi.width, gi.height, 0, 0); + XFreeGC (dpy, gc); + image = XGetImage (dpy, pix, 0, 0, gi.width, gi.height, AllPlanes, + ZPixmap); + XFreePixmap (dpy, pix); + } + if (!image) + goto bail1; + image->red_mask = draw->visual->red_mask; + image->green_mask = draw->visual->green_mask; + image->blue_mask = draw->visual->blue_mask; + if (image->byte_order != XftNativeByteOrder ()) + XftSwapImage (image); + while (n--) + { + glyph = *g++; + if (glyph >= font->num_glyphs || !(xftg = font->glyphs[glyph])) + xftg = _XftGlyphDefault (dpy, public); + if (xftg) + { + (*smooth) (image, xftg, x - ox, y - oy, color); + x += xftg->metrics.xOff; + y += xftg->metrics.yOff; + } + } + if (image->byte_order != XftNativeByteOrder ()) + XftSwapImage (image); + XPutImage (dpy, draw->drawable, draw->core.gc, image, 0, 0, ox, oy, + gi.width, gi.height); + XDestroyImage (image); } 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; + XftSharpGlyph sharp = _XftSharpGlyphFind (draw, public); + while (n--) + { + glyph = *g++; + if (glyph >= font->num_glyphs || !(xftg = font->glyphs[glyph])) + xftg = _XftGlyphDefault (dpy, public); + if (xftg) + { + (*sharp) (draw, xftg, x, y); + x += xftg->metrics.xOff; + y += xftg->metrics.yOff; + } + } + } +bail1: + if (glyphs_loaded) + _XftFontManageMemory (dpy, public); } +#define NUM_LOCAL 1024 + void -XftCoreExtents32 (Display *dpy, - XFontStruct *fs, - XftChar32 *string, - int len, - XGlyphInfo *extents) -{ - int direction; - int ascent, descent; - XCharStruct overall; - XChar2b *xc, xcloc[XFT_CORE_N16LOCAL]; - - 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; +XftGlyphSpecCore (XftDraw *draw, + _Xconst XftColor *color, + XftFont *public, + _Xconst XftGlyphSpec *glyphs, + int nglyphs) +{ + Display *dpy = draw->dpy; + XftFontInt *font = (XftFontInt *) public; + XftGlyph *xftg; + FT_UInt missing[XFT_NMISSING]; + FcBool glyphs_loaded; + int nmissing; + int i; + XErrorHandler prev_error; + int x1, y1, x2, y2; + + /* + * Load missing glyphs + */ + glyphs_loaded = FcFalse; + x1 = y1 = x2 = y2 = 0; + for (i = 0; i < nglyphs; i++) + { + XGlyphInfo gi; + int g_x1, g_x2, g_y1, g_y2; + + nmissing = 0; + if (XftFontCheckGlyph (dpy, public, FcTrue, glyphs[i].glyph, missing, &nmissing)) + glyphs_loaded = FcTrue; + if (nmissing) + XftFontLoadGlyphs (dpy, public, FcTrue, missing, nmissing); + + XftGlyphExtents (dpy, public, &glyphs[i].glyph, 1, &gi); + g_x1 = glyphs[i].x - gi.x; + g_y1 = glyphs[i].y - gi.y; + g_x2 = g_x1 + gi.width; + g_y2 = g_y1 + gi.height; + if (i) + { + if (g_x1 < x1) + x1 = g_x1; + if (g_y1 < y1) + y1 = g_y1; + if (g_x2 > x2) + x2 = g_x2; + if (g_y2 > y2) + y2 = g_y2; + } + else + { + x1 = g_x1; + y1 = g_y1; + x2 = g_x2; + y2 = g_y2; + } } + + if (x1 == x2 || y1 == y2) + goto bail1; + + if ((font->info.antialias || color->color.alpha != 0xffff) && + _XftSmoothGlyphPossible (draw)) + { + XImage *image; + unsigned int depth; + int width = x2 - x1, height = y2 - y1; + XftSmoothGlyph smooth = _XftSmoothGlyphFind (draw, public); + + /* + * Try to get bits directly from the drawable; if that fails, + * use a temporary pixmap. When it does fail, assume it + * will probably fail for a while and keep using temporary + * pixmaps for a while to avoid double round trips. + */ + if (draw->core.use_pixmap == 0) + { + prev_error = XSetErrorHandler (XftGetImageErrorHandler); + image = XGetImage (dpy, draw->drawable, + x1, y1, + width, height, AllPlanes, + ZPixmap); + XSetErrorHandler (prev_error); + if (!image) + draw->core.use_pixmap = XFT_ASSUME_PIXMAP; + } + else + { + draw->core.use_pixmap--; + image = 0; + } + if (!image && (depth = XftDrawDepth (draw))) + { + Pixmap pix; + GC gc; + XGCValues gcv; + + pix = XCreatePixmap (dpy, draw->drawable, + width, height, depth); + gcv.graphics_exposures = False; + gc = XCreateGC (dpy, pix, GCGraphicsExposures, &gcv); + XCopyArea (dpy, draw->drawable, pix, gc, x1, y1, + width, height, 0, 0); + XFreeGC (dpy, gc); + image = XGetImage (dpy, pix, 0, 0, width, height, AllPlanes, + ZPixmap); + XFreePixmap (dpy, pix); + } + if (!image) + goto bail1; + image->red_mask = draw->visual->red_mask; + image->green_mask = draw->visual->green_mask; + image->blue_mask = draw->visual->blue_mask; + if (image->byte_order != XftNativeByteOrder ()) + XftSwapImage (image); + for (i = 0; i < nglyphs; i++) + { + FT_UInt glyph = glyphs[i].glyph; + if (glyph >= font->num_glyphs || !(xftg = font->glyphs[glyph])) + xftg = _XftGlyphDefault (dpy, public); + if (xftg) + { + (*smooth) (image, xftg, glyphs[i].x - x1, + glyphs[i].y - y1, color); + } + } + if (image->byte_order != XftNativeByteOrder ()) + XftSwapImage (image); + XPutImage (dpy, draw->drawable, draw->core.gc, image, 0, 0, x1, y1, + width, height); + XDestroyImage (image); + } 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; + XftSharpGlyph sharp = _XftSharpGlyphFind (draw, public); + for (i = 0; i < nglyphs; i++) + { + FT_UInt glyph = glyphs[i].glyph; + if (glyph >= font->num_glyphs || !(xftg = font->glyphs[glyph])) + xftg = _XftGlyphDefault (dpy, public); + if (xftg) + (*sharp) (draw, xftg, glyphs[i].x, glyphs[i].y); + } + } +bail1: + if (glyphs_loaded) + _XftFontManageMemory (dpy, public); } 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; - extents->width = overall.rbearing - overall.lbearing; +XftGlyphFontSpecCore (XftDraw *draw, + _Xconst XftColor *color, + _Xconst XftGlyphFontSpec *glyphs, + int nglyphs) +{ + Display *dpy = draw->dpy; + XftGlyph *xftg; + FT_UInt missing[XFT_NMISSING]; + FcBool glyphs_loaded; + int nmissing; + int i; + XErrorHandler prev_error; + int x1, y1, x2, y2; + + /* + * Load missing glyphs + */ + glyphs_loaded = FcFalse; + x1 = y1 = x2 = y2 = 0; + for (i = 0; i < nglyphs; i++) + { + XftFont *public = glyphs[i].font; + XGlyphInfo gi; + int g_x1, g_x2, g_y1, g_y2; + + nmissing = 0; + if (XftFontCheckGlyph (dpy, public, FcTrue, glyphs[i].glyph, missing, &nmissing)) + glyphs_loaded = FcTrue; + if (nmissing) + XftFontLoadGlyphs (dpy, public, FcTrue, missing, nmissing); + + XftGlyphExtents (dpy, public, &glyphs[i].glyph, 1, &gi); + g_x1 = glyphs[i].x - gi.x; + g_y1 = glyphs[i].y - gi.y; + g_x2 = g_x1 + gi.width; + g_y2 = g_y1 + gi.height; + if (i) + { + if (g_x1 < x1) + x1 = g_x1; + if (g_y1 < y1) + y1 = g_y1; + if (g_x2 > x2) + x2 = g_x2; + if (g_y2 > y2) + y2 = g_y2; + } + else + { + x1 = g_x1; + y1 = g_y1; + x2 = g_x2; + y2 = g_y2; + } + } + + if (x1 == x2 || y1 == y2) + goto bail1; + + for (i = 0; i < nglyphs; i++) + if (((XftFontInt *) glyphs[i].font)->info.antialias) + break; + + if ((i != nglyphs || color->color.alpha != 0xffff) && + _XftSmoothGlyphPossible (draw)) + { + XImage *image; + unsigned int depth; + int width = x2 - x1, height = y2 - y1; + + /* + * Try to get bits directly from the drawable; if that fails, + * use a temporary pixmap. When it does fail, assume it + * will probably fail for a while and keep using temporary + * pixmaps for a while to avoid double round trips. + */ + if (draw->core.use_pixmap == 0) + { + prev_error = XSetErrorHandler (XftGetImageErrorHandler); + image = XGetImage (dpy, draw->drawable, + x1, y1, + width, height, AllPlanes, + ZPixmap); + XSetErrorHandler (prev_error); + if (!image) + draw->core.use_pixmap = XFT_ASSUME_PIXMAP; + } + else + { + draw->core.use_pixmap--; + image = 0; + } + if (!image && (depth = XftDrawDepth (draw))) + { + Pixmap pix; + GC gc; + XGCValues gcv; + + pix = XCreatePixmap (dpy, draw->drawable, + width, height, depth); + gcv.graphics_exposures = False; + gc = XCreateGC (dpy, pix, GCGraphicsExposures, &gcv); + XCopyArea (dpy, draw->drawable, pix, gc, x1, y1, + width, height, 0, 0); + XFreeGC (dpy, gc); + image = XGetImage (dpy, pix, 0, 0, width, height, AllPlanes, + ZPixmap); + XFreePixmap (dpy, pix); + } + if (!image) + goto bail1; + image->red_mask = draw->visual->red_mask; + image->green_mask = draw->visual->green_mask; + image->blue_mask = draw->visual->blue_mask; + if (image->byte_order != XftNativeByteOrder ()) + XftSwapImage (image); + for (i = 0; i < nglyphs; i++) + { + XftFont *public = glyphs[i].font; + XftFontInt *font = (XftFontInt *) public; + XftSmoothGlyph smooth = _XftSmoothGlyphFind (draw, public); + FT_UInt glyph = glyphs[i].glyph; + + if (glyph >= font->num_glyphs || !(xftg = font->glyphs[glyph])) + xftg = _XftGlyphDefault (dpy, public); + if (xftg) + { + (*smooth) (image, xftg, glyphs[i].x - x1, + glyphs[i].y - y1, color); + } + } + if (image->byte_order != XftNativeByteOrder ()) + XftSwapImage (image); + XPutImage (dpy, draw->drawable, draw->core.gc, image, 0, 0, x1, y1, + width, height); + XDestroyImage (image); } 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; -} - -Bool -XftCoreGlyphExists (Display *dpy, - XFontStruct *fs, - XftChar32 glyph) -{ - int direction; - int ascent, descent; - XCharStruct overall; - XChar2b xc; - - XftCoreConvert32 (&glyph, 1, &xc); - XTextExtents16 (fs, &xc, 1, &direction, - &ascent, &descent, &overall); - return (overall.lbearing != 0 || - overall.rbearing != 0 || - overall.width != 0 || - overall.ascent != 0 || - overall.descent != 0); + for (i = 0; i < nglyphs; i++) + { + XftFont *public = glyphs[i].font; + XftFontInt *font = (XftFontInt *) public; + XftSharpGlyph sharp = _XftSharpGlyphFind (draw, public); + FT_UInt glyph = glyphs[i].glyph; + + if (glyph >= font->num_glyphs || !(xftg = font->glyphs[glyph])) + xftg = _XftGlyphDefault (dpy, public); + if (xftg) + (*sharp) (draw, xftg, glyphs[i].x, glyphs[i].y); + } + } +bail1: + if (glyphs_loaded) + for (i = 0; i < nglyphs; i++) + _XftFontManageMemory (dpy, glyphs[i].font); } - Index: xc/lib/Xft/xftdbg.c diff -u xc/lib/Xft/xftdbg.c:1.3 xc/lib/Xft/xftdbg.c:1.4 --- xc/lib/Xft/xftdbg.c:1.3 Fri Mar 30 20:57:20 2001 +++ xc/lib/Xft/xftdbg.c Fri Feb 15 02:36:10 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftdbg.c,v 1.3 2001/03/31 01:57:20 keithp Exp $ + * $XFree86: xc/lib/Xft/xftdbg.c,v 1.4 2002/02/15 07:36:10 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -22,209 +22,29 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#include "xftint.h" +#include #include - -void -XftValuePrint (XftValue v) -{ - switch (v.type) { - case XftTypeVoid: - printf (" "); - break; - case XftTypeInteger: - printf (" %d", v.u.i); - break; - case XftTypeDouble: - printf (" %g", v.u.d); - break; - case XftTypeString: - printf (" \"%s\"", v.u.s); - break; - 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; - } -} +#include "xftint.h" -void -XftValueListPrint (XftValueList *l) +int +XftDebug (void) { - for (; l; l = l->next) - XftValuePrint (l->value); -} + static int initialized; + static int debug; -void -XftPatternPrint (XftPattern *p) -{ - int i; - XftPatternElt *e; - - printf ("Pattern %d of %d\n", p->num, p->size); - for (i = 0; i < p->num; i++) + if (!initialized) { - e = &p->elts[i]; - printf ("\t%s:", e->object); - XftValueListPrint (e->values); - printf ("\n"); - } - printf ("\n"); -} + char *e; -void -XftOpPrint (XftOp op) -{ - switch (op) { - 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; - case XftOpPrepend: printf ("Prepend"); break; - case XftOpAppend: printf ("Append"); break; - case XftOpQuest: printf ("Quest"); break; - case XftOpOr: printf ("Or"); break; - case XftOpAnd: printf ("And"); break; - case XftOpEqual: printf ("Equal"); break; - case XftOpNotEqual: printf ("NotEqual"); break; - case XftOpLess: printf ("Less"); break; - case XftOpLessEqual: printf ("LessEqual"); break; - case XftOpMore: printf ("More"); break; - case XftOpMoreEqual: printf ("MoreEqual"); break; - case XftOpPlus: printf ("Plus"); break; - case XftOpMinus: printf ("Minus"); break; - case XftOpTimes: printf ("Times"); break; - case XftOpDivide: printf ("Divide"); break; - case XftOpNot: printf ("Not"); break; - case XftOpNil: printf ("Nil"); break; - } -} - -void -XftTestPrint (XftTest *test) -{ - switch (test->qual) { - case XftQualAny: - printf ("any "); - break; - case XftQualAll: - printf ("all "); - break; - } - printf ("%s ", test->field); - XftOpPrint (test->op); - printf (" "); - XftValuePrint (test->value); - printf ("\n"); -} - -void -XftExprPrint (XftExpr *expr) -{ - switch (expr->op) { - 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: - XftExprPrint (expr->u.tree.left); - printf (" quest "); - XftExprPrint (expr->u.tree.right->u.tree.left); - printf (" colon "); - XftExprPrint (expr->u.tree.right->u.tree.right); - break; - case XftOpOr: - case XftOpAnd: - case XftOpEqual: - case XftOpNotEqual: - case XftOpLess: - case XftOpLessEqual: - case XftOpMore: - case XftOpMoreEqual: - case XftOpPlus: - case XftOpMinus: - case XftOpTimes: - case XftOpDivide: - XftExprPrint (expr->u.tree.left); - printf (" "); - switch (expr->op) { - case XftOpOr: printf ("Or"); break; - case XftOpAnd: printf ("And"); break; - case XftOpEqual: printf ("Equal"); break; - case XftOpNotEqual: printf ("NotEqual"); break; - case XftOpLess: printf ("Less"); break; - case XftOpLessEqual: printf ("LessEqual"); break; - case XftOpMore: printf ("More"); break; - case XftOpMoreEqual: printf ("MoreEqual"); break; - case XftOpPlus: printf ("Plus"); break; - case XftOpMinus: printf ("Minus"); break; - case XftOpTimes: printf ("Times"); break; - case XftOpDivide: printf ("Divide"); break; - default: break; + initialized = 1; + e = getenv ("XFT_DEBUG"); + if (e) + { + printf ("XFT_DEBUG=%s\n", e); + debug = atoi (e); + if (debug <= 0) + debug = 1; } - printf (" "); - XftExprPrint (expr->u.tree.right); - break; - case XftOpNot: - printf ("Not "); - XftExprPrint (expr->u.tree.left); - break; - default: - break; - } -} - -void -XftEditPrint (XftEdit *edit) -{ - printf ("Edit %s ", edit->field); - XftOpPrint (edit->op); - printf (" "); - XftExprPrint (edit->expr); -} - -void -XftSubstPrint (XftSubst *subst) -{ - XftEdit *e; - XftTest *t; - - printf ("match\n"); - for (t = subst->test; t; t = t->next) - { - printf ("\t"); - XftTestPrint (t); - } - printf ("edit\n"); - for (e = subst->edit; e; e = e->next) - { - printf ("\t"); - XftEditPrint (e); - printf (";\n"); - } - printf ("\n"); -} - -void -XftFontSetPrint (XftFontSet *s) -{ - int i; - - printf ("FontSet %d of %d\n", s->nfont, s->sfont); - for (i = 0; i < s->nfont; i++) - { - printf ("Font %d ", i); - XftPatternPrint (s->fonts[i]); } + return debug; } Index: xc/lib/Xft/xftdir.c diff -u xc/lib/Xft/xftdir.c:1.3 xc/lib/Xft/xftdir.c:removed --- xc/lib/Xft/xftdir.c:1.3 Wed May 16 06:32:54 2001 +++ xc/lib/Xft/xftdir.c Thu Feb 27 12:27:22 2003 @@ -1,136 +0,0 @@ -/* - * $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. - * - * 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 "xftint.h" - -Bool -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; - - file = (char *) malloc (strlen (dir) + 1 + 256 + 1); - if (!file) - 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] != '.') - { - id = 0; - strcpy (base, e->d_name); - do - { - 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); - } - } - free (file); - 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.8 xc/lib/Xft/xftdpy.c:1.20 --- xc/lib/Xft/xftdpy.c:1.8 Thu Dec 13 12:26:00 2001 +++ xc/lib/Xft/xftdpy.c Fri Oct 11 13:53:02 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftdpy.c,v 1.8 2001/12/13 17:26:00 keithp Exp $ + * $XFree86: xc/lib/Xft/xftdpy.c,v 1.20 2002/10/11 17:53:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -35,24 +35,42 @@ { XftDisplayInfo *info, **prev; - for (prev = &_XftDisplayInfo; (info = *prev); prev = &(*prev)->next) - if (info->codes == codes) - break; + info = _XftDisplayInfoGet (dpy, FcFalse); if (!info) return 0; - *prev = info->next; + + /* + * Get rid of any dangling unreferenced fonts + */ + info->max_unref_fonts = 0; + XftFontManageMemory (dpy); + + /* + * Clean up the default values + */ if (info->defaults) - XftPatternDestroy (info->defaults); - if (info->coreFonts) - XftFontSetDestroy (info->coreFonts); + FcPatternDestroy (info->defaults); + + /* + * Unhook from the global list + */ + for (prev = &_XftDisplayInfo; (info = *prev); prev = &(*prev)->next) + if (info->display == dpy) + break; + *prev = info->next; + free (info); return 0; } + XftDisplayInfo * -_XftDisplayInfoGet (Display *dpy) +_XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary) { - XftDisplayInfo *info, **prev; + XftDisplayInfo *info, **prev; + XRenderPictFormat pf; + int i; + int event_base, error_base; for (prev = &_XftDisplayInfo; (info = *prev); prev = &(*prev)->next) { @@ -70,6 +88,9 @@ return info; } } + if (!createIfNecessary) + return 0; + info = (XftDisplayInfo *) malloc (sizeof (XftDisplayInfo)); if (!info) goto bail0; @@ -80,10 +101,32 @@ info->display = dpy; info->defaults = 0; - info->coreFonts = 0; - info->hasRender = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0; - info->glyphSets = 0; - if (_XftFontDebug () & XFT_DBG_RENDER) + info->hasRender = (XRenderQueryExtension (dpy, &event_base, &error_base) && + (XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0)); + info->use_free_glyphs = FcTrue; + if (info->hasRender) + { + int major, minor; + XRenderQueryVersion (dpy, &major, &minor); + if (major < 0 || (major == 0 && minor <= 2)) + info->use_free_glyphs = FcFalse; + } + pf.type = PictTypeDirect; + pf.depth = 32; + pf.direct.redMask = 0xff; + pf.direct.greenMask = 0xff; + pf.direct.blueMask = 0xff; + pf.direct.alphaMask = 0xff; + info->solidFormat = XRenderFindFormat (dpy, + (PictFormatType| + PictFormatDepth| + PictFormatRedMask| + PictFormatGreenMask| + PictFormatBlueMask| + PictFormatAlphaMask), + &pf, + 0); + if (XftDebug () & XFT_DBG_RENDER) { Visual *visual = DefaultVisual (dpy, DefaultScreen (dpy)); XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); @@ -111,45 +154,134 @@ printf ("XftDisplayInfoGet initialized, hasRender set to \"%s\"\n", info->hasRender ? "True" : "False"); } + for (i = 0; i < XFT_NUM_SOLID_COLOR; i++) + { + info->colors[i].screen = -1; + info->colors[i].pict = 0; + } + info->fonts = 0; info->next = _XftDisplayInfo; _XftDisplayInfo = info; + + info->glyph_memory = 0; + info->max_glyph_memory = XftDefaultGetInteger (dpy, + XFT_MAX_GLYPH_MEMORY, 0, + XFT_DPY_MAX_GLYPH_MEMORY); + if (XftDebug () & XFT_DBG_CACHE) + printf ("global max cache memory %ld\n", info->max_glyph_memory); + + + info->num_unref_fonts = 0; + info->max_unref_fonts = XftDefaultGetInteger (dpy, + XFT_MAX_UNREF_FONTS, 0, + XFT_DPY_MAX_UNREF_FONTS); + if (XftDebug() & XFT_DBG_CACHE) + printf ("global max unref fonts %d\n", info->max_unref_fonts); + + memset (info->fontHash, '\0', sizeof (XftFont *) * XFT_NUM_FONT_HASH); return info; bail1: free (info); bail0: - if (_XftFontDebug () & XFT_DBG_RENDER) + if (XftDebug () & XFT_DBG_RENDER) { printf ("XftDisplayInfoGet failed to initialize, Xft unhappy\n"); } return 0; } +/* + * Reduce memory usage in X server + */ + +static void +_XftDisplayValidateMemory (XftDisplayInfo *info) +{ + XftFont *public; + XftFontInt *font; + unsigned long glyph_memory; + + glyph_memory = 0; + for (public = info->fonts; public; public = font->next) + { + font = (XftFontInt *) public; + glyph_memory += font->glyph_memory; + } + if (glyph_memory != info->glyph_memory) + printf ("Display glyph cache incorrect has %ld bytes, should have %ld\n", + info->glyph_memory, glyph_memory); +} + +void +_XftDisplayManageMemory (Display *dpy) +{ + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, False); + unsigned long glyph_memory; + XftFont *public; + XftFontInt *font; + + if (!info || !info->max_glyph_memory) + return; + if (XftDebug () & XFT_DBG_CACHE) + { + if (info->glyph_memory > info->max_glyph_memory) + printf ("Reduce global memory from %ld to %ld\n", + info->glyph_memory, info->max_glyph_memory); + _XftDisplayValidateMemory (info); + } + while (info->glyph_memory > info->max_glyph_memory) + { + glyph_memory = rand () % info->glyph_memory; + public = info->fonts; + while (public) + { + font = (XftFontInt *) public; + + if (font->glyph_memory > glyph_memory) + { + _XftFontUncacheGlyph (dpy, public); + break; + } + public = font->next; + glyph_memory -= font->glyph_memory; + } + } + if (XftDebug () & XFT_DBG_CACHE) + _XftDisplayValidateMemory (info); +} + Bool XftDefaultHasRender (Display *dpy) { -#ifdef FREETYPE2 - XftDisplayInfo *info = _XftDisplayInfoGet (dpy); + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, True); if (!info) return False; return info->hasRender; -#else - return False; -#endif } Bool -XftDefaultSet (Display *dpy, XftPattern *defaults) +XftDefaultSet (Display *dpy, FcPattern *defaults) { - XftDisplayInfo *info = _XftDisplayInfoGet (dpy); + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, True); if (!info) return False; if (info->defaults) - XftPatternDestroy (info->defaults); + FcPatternDestroy (info->defaults); info->defaults = defaults; + if (!info->max_glyph_memory) + info->max_glyph_memory = XFT_DPY_MAX_GLYPH_MEMORY; + info->max_glyph_memory = XftDefaultGetInteger (dpy, + XFT_MAX_GLYPH_MEMORY, 0, + info->max_glyph_memory); + if (!info->max_unref_fonts) + info->max_unref_fonts = XFT_DPY_MAX_UNREF_FONTS; + info->max_unref_fonts = XftDefaultGetInteger (dpy, + XFT_MAX_UNREF_FONTS, 0, + info->max_unref_fonts); return True; } @@ -159,7 +291,7 @@ char c0, c1; c0 = *v; - if (isupper (c0)) + if (isupper ((int)c0)) c0 = tolower (c0); if (c0 == 't' || c0 == 'y' || c0 == '1') return 1; @@ -168,7 +300,7 @@ if (c0 == 'o') { c1 = v[1]; - if (isupper (c1)) + if (isupper ((int)c1)) c1 = tolower (c1); if (c1 == 'n') return 1; @@ -179,19 +311,19 @@ } static Bool -_XftDefaultInitBool (Display *dpy, XftPattern *pat, char *option) +_XftDefaultInitBool (Display *dpy, FcPattern *pat, char *option) { char *v; int i; v = XGetDefault (dpy, "Xft", option); if (v && (i = XftDefaultParseBool (v)) >= 0) - return XftPatternAddBool (pat, option, i != 0); + return FcPatternAddBool (pat, option, i != 0); return True; } static Bool -_XftDefaultInitDouble (Display *dpy, XftPattern *pat, char *option) +_XftDefaultInitDouble (Display *dpy, FcPattern *pat, char *option) { char *v, *e; double d; @@ -201,13 +333,13 @@ { d = strtod (v, &e); if (e != v) - return XftPatternAddDouble (pat, option, d); + return FcPatternAddDouble (pat, option, d); } return True; } static Bool -_XftDefaultInitInteger (Display *dpy, XftPattern *pat, char *option) +_XftDefaultInitInteger (Display *dpy, FcPattern *pat, char *option) { char *v, *e; int i; @@ -215,76 +347,80 @@ v = XGetDefault (dpy, "Xft", option); if (v) { - if (XftNameConstant (v, &i)) - return XftPatternAddInteger (pat, option, i); + if (FcNameConstant ((FcChar8 *) v, &i)) + return FcPatternAddInteger (pat, option, i); i = strtol (v, &e, 0); if (e != v) - return XftPatternAddInteger (pat, option, i); + return FcPatternAddInteger (pat, option, i); } return True; } -static XftPattern * +static FcPattern * _XftDefaultInit (Display *dpy) { - XftPattern *pat; + FcPattern *pat; - pat = XftPatternCreate (); + pat = FcPatternCreate (); if (!pat) goto bail0; - if (!_XftDefaultInitBool (dpy, pat, XFT_CORE)) - goto bail1; - if (!_XftDefaultInitDouble (dpy, pat, XFT_SCALE)) + if (!_XftDefaultInitDouble (dpy, pat, FC_SCALE)) goto bail1; - if (!_XftDefaultInitDouble (dpy, pat, XFT_DPI)) + if (!_XftDefaultInitDouble (dpy, pat, FC_DPI)) goto bail1; if (!_XftDefaultInitBool (dpy, pat, XFT_RENDER)) goto bail1; - if (!_XftDefaultInitInteger (dpy, pat, XFT_RGBA)) + if (!_XftDefaultInitInteger (dpy, pat, FC_RGBA)) goto bail1; - if (!_XftDefaultInitBool (dpy, pat, XFT_ANTIALIAS)) + if (!_XftDefaultInitBool (dpy, pat, FC_ANTIALIAS)) goto bail1; - if (!_XftDefaultInitBool (dpy, pat, XFT_MINSPACE)) + if (!_XftDefaultInitBool (dpy, pat, FC_AUTOHINT)) goto bail1; + if (!_XftDefaultInitBool (dpy, pat, FC_HINTING)) + goto bail1; + if (!_XftDefaultInitBool (dpy, pat, FC_MINSPACE)) + goto bail1; + if (!_XftDefaultInitInteger (dpy, pat, XFT_MAX_GLYPH_MEMORY)) + goto bail1; return pat; bail1: - XftPatternDestroy (pat); + FcPatternDestroy (pat); bail0: return 0; } -static XftResult -_XftDefaultGet (Display *dpy, const char *object, int screen, XftValue *v) +static FcResult +_XftDefaultGet (Display *dpy, const char *object, int screen, FcValue *v) { - XftDisplayInfo *info = _XftDisplayInfoGet (dpy); - XftResult r; + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, True); + FcResult r; if (!info) - return XftResultNoMatch; + return FcResultNoMatch; if (!info->defaults) { info->defaults = _XftDefaultInit (dpy); if (!info->defaults) - return XftResultNoMatch; + return FcResultNoMatch; } - r = XftPatternGet (info->defaults, object, screen, v); - if (r == XftResultNoId && screen > 0) - r = XftPatternGet (info->defaults, object, 0, v); + r = FcPatternGet (info->defaults, object, screen, v); + if (r == FcResultNoId && screen > 0) + r = FcPatternGet (info->defaults, object, 0, v); return r; } Bool XftDefaultGetBool (Display *dpy, const char *object, int screen, Bool def) { - XftResult r; - XftValue v; + FcResult r; + FcValue v; r = _XftDefaultGet (dpy, object, screen, &v); - if (r != XftResultMatch || v.type != XftTypeBool) + if (r != FcResultMatch || v.type != FcTypeBool) return def; return v.u.b; } @@ -292,11 +428,11 @@ int XftDefaultGetInteger (Display *dpy, const char *object, int screen, int def) { - XftResult r; - XftValue v; + FcResult r; + FcValue v; r = _XftDefaultGet (dpy, object, screen, &v); - if (r != XftResultMatch || v.type != XftTypeInteger) + if (r != FcResultMatch || v.type != FcTypeInteger) return def; return v.u.i; } @@ -304,123 +440,90 @@ double XftDefaultGetDouble (Display *dpy, const char *object, int screen, double def) { - XftResult r; - XftValue v; + FcResult r; + FcValue v; r = _XftDefaultGet (dpy, object, screen, &v); - if (r != XftResultMatch || v.type != XftTypeDouble) + if (r != FcResultMatch || v.type != FcTypeDouble) return def; return v.u.d; } -XftFontSet * -XftDisplayGetFontSet (Display *dpy) -{ - XftDisplayInfo *info = _XftDisplayInfoGet (dpy); - - if (!info) - return 0; - if (!info->coreFonts) - { - info->coreFonts = XftFontSetCreate (); - if (info->coreFonts) - { - if (!XftCoreAddFonts (info->coreFonts, dpy, - XftDefaultGetBool (dpy, XFT_SCALABLE, - DefaultScreen (dpy), - False))) - { - XftFontSetDestroy (info->coreFonts); - info->coreFonts = 0; - } - } - } - return info->coreFonts; -} - void -XftDefaultSubstitute (Display *dpy, int screen, XftPattern *pattern) +XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern) { - XftValue v; - double size; - double scale; + FcValue v; + double dpi; - if (XftPatternGet (pattern, XFT_STYLE, 0, &v) == XftResultNoMatch) + if (FcPatternGet (pattern, XFT_RENDER, 0, &v) == FcResultNoMatch) { - if (XftPatternGet (pattern, XFT_WEIGHT, 0, &v) == XftResultNoMatch ) - { - XftPatternAddInteger (pattern, XFT_WEIGHT, XFT_WEIGHT_MEDIUM); - } - if (XftPatternGet (pattern, XFT_SLANT, 0, &v) == XftResultNoMatch) - { - XftPatternAddInteger (pattern, XFT_SLANT, XFT_SLANT_ROMAN); - } - } - if (XftPatternGet (pattern, XFT_ENCODING, 0, &v) == XftResultNoMatch) - XftPatternAddString (pattern, XFT_ENCODING, "iso8859-1"); - if (XftPatternGet (pattern, XFT_RENDER, 0, &v) == XftResultNoMatch) - { - XftPatternAddBool (pattern, XFT_RENDER, + FcPatternAddBool (pattern, XFT_RENDER, XftDefaultGetBool (dpy, XFT_RENDER, screen, XftDefaultHasRender (dpy))); - } - if (XftPatternGet (pattern, XFT_CORE, 0, &v) == XftResultNoMatch) - { - XftPatternAddBool (pattern, XFT_CORE, - XftDefaultGetBool (dpy, XFT_CORE, screen, - !XftDefaultHasRender (dpy))); } - if (XftPatternGet (pattern, XFT_ANTIALIAS, 0, &v) == XftResultNoMatch) + if (FcPatternGet (pattern, FC_ANTIALIAS, 0, &v) == FcResultNoMatch) { - XftPatternAddBool (pattern, XFT_ANTIALIAS, - XftDefaultGetBool (dpy, XFT_ANTIALIAS, screen, + FcPatternAddBool (pattern, FC_ANTIALIAS, + XftDefaultGetBool (dpy, FC_ANTIALIAS, screen, True)); } - if (XftPatternGet (pattern, XFT_RGBA, 0, &v) == XftResultNoMatch) + if (FcPatternGet (pattern, FC_HINTING, 0, &v) == FcResultNoMatch) { - XftPatternAddInteger (pattern, XFT_RGBA, - XftDefaultGetInteger (dpy, XFT_RGBA, screen, - XFT_RGBA_NONE)); + FcPatternAddBool (pattern, FC_HINTING, + XftDefaultGetBool (dpy, FC_HINTING, screen, + True)); + } + if (FcPatternGet (pattern, FC_AUTOHINT, 0, &v) == FcResultNoMatch) + { + FcPatternAddBool (pattern, FC_AUTOHINT, + XftDefaultGetBool (dpy, FC_AUTOHINT, screen, + False)); + } + if (FcPatternGet (pattern, FC_RGBA, 0, &v) == FcResultNoMatch) + { + int subpixel = FC_RGBA_UNKNOWN; +#if RENDER_MAJOR > 0 || RENDER_MINOR >= 6 + int render_order = XRenderQuerySubpixelOrder (dpy, screen); + switch (render_order) { + default: + case SubPixelUnknown: subpixel = FC_RGBA_UNKNOWN; break; + case SubPixelHorizontalRGB: subpixel = FC_RGBA_RGB; break; + case SubPixelHorizontalBGR: subpixel = FC_RGBA_BGR; break; + case SubPixelVerticalRGB: subpixel = FC_RGBA_VRGB; break; + case SubPixelVerticalBGR: subpixel = FC_RGBA_VBGR; break; + case SubPixelNone: subpixel = FC_RGBA_NONE; break; + } +#endif + FcPatternAddInteger (pattern, FC_RGBA, + XftDefaultGetInteger (dpy, FC_RGBA, screen, + subpixel)); } - if (XftPatternGet (pattern, XFT_MINSPACE, 0, &v) == XftResultNoMatch) + if (FcPatternGet (pattern, FC_MINSPACE, 0, &v) == FcResultNoMatch) { - XftPatternAddBool (pattern, XFT_MINSPACE, - XftDefaultGetBool (dpy, XFT_MINSPACE, screen, + FcPatternAddBool (pattern, FC_MINSPACE, + XftDefaultGetBool (dpy, FC_MINSPACE, screen, False)); } - if (XftPatternGet (pattern, XFT_PIXEL_SIZE, 0, &v) == XftResultNoMatch) + if (FcPatternGet (pattern, FC_DPI, 0, &v) == FcResultNoMatch) { - int pixels, mm; - double dpi; - - if (XftPatternGet (pattern, XFT_SIZE, 0, &v) != XftResultMatch) - { - size = 12.0; - XftPatternAddDouble (pattern, XFT_SIZE, size); - } - else - { - switch (v.type) { - case XftTypeInteger: - size = (double) v.u.i; - break; - case XftTypeDouble: - size = v.u.d; - break; - default: - size = 12.0; - break; - } - } - scale = XftDefaultGetDouble (dpy, XFT_SCALE, screen, 1.0); - size *= scale; - 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); + FcPatternAddDouble (pattern, FC_DPI, + XftDefaultGetDouble (dpy, FC_DPI, screen, + dpi)); + } + if (FcPatternGet (pattern, FC_SCALE, 0, &v) == FcResultNoMatch) + { + FcPatternAddDouble (pattern, FC_SCALE, + XftDefaultGetDouble (dpy, FC_SCALE, screen, 1.0)); + } + if (FcPatternGet (pattern, XFT_MAX_GLYPH_MEMORY, 0, &v) == FcResultNoMatch) + { + FcPatternAddInteger (pattern, XFT_MAX_GLYPH_MEMORY, + XftDefaultGetInteger (dpy, XFT_MAX_GLYPH_MEMORY, + screen, + XFT_FONT_MAX_GLYPH_MEMORY)); } + FcDefaultSubstitute (pattern); } Index: xc/lib/Xft/xftdraw.c diff -u xc/lib/Xft/xftdraw.c:1.15 xc/lib/Xft/xftdraw.c:1.25 --- xc/lib/Xft/xftdraw.c:1.15 Wed May 16 15:20:43 2001 +++ xc/lib/Xft/xftdraw.c Fri Oct 11 13:53:02 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftdraw.c,v 1.15 2001/05/16 19:20:43 keithp Exp $ + * $XFree86: xc/lib/Xft/xftdraw.c,v 1.25 2002/10/11 17:53:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -26,8 +26,111 @@ #include #include #include "xftint.h" +#include #include +/* + * Ok, this is a pain. To share source pictures across multiple destinations, + * the screen for each drawable must be discovered. + */ + +static int +_XftDrawScreen (Display *dpy, Drawable drawable, Visual *visual) +{ + int s; + Window root; + int x, y; + unsigned int width, height, borderWidth, depth; + /* Special case the most common environment */ + if (ScreenCount (dpy) == 1) + return 0; + /* + * If we've got a visual, look for the screen that points at it. + * This requires no round trip. + */ + if (visual) + { + for (s = 0; s < ScreenCount (dpy); s++) + { + XVisualInfo template, *ret; + int nret; + + template.visualid = visual->visualid; + template.screen = s; + ret = XGetVisualInfo (dpy, VisualIDMask|VisualScreenMask, + &template, &nret); + if (ret) + { + XFree (ret); + return s; + } + } + } + /* + * Otherwise, as the server for the drawable geometry and find + * the screen from the root window. + * This takes a round trip. + */ + if (XGetGeometry (dpy, drawable, &root, &x, &y, &width, &height, + &borderWidth, &depth)) + { + for (s = 0; s < ScreenCount (dpy); s++) + { + if (RootWindow (dpy, s) == root) + return s; + } + } + /* + * Make a guess -- it's probably wrong, but then the app probably + * handed us a bogus drawable in this case + */ + return 0; +} + +unsigned int +XftDrawDepth (XftDraw *draw) +{ + if (!draw->depth) + { + Window root; + int x, y; + unsigned int width, height, borderWidth, depth; + if (XGetGeometry (draw->dpy, draw->drawable, + &root, &x, &y, &width, &height, + &borderWidth, &depth)) + draw->depth = depth; + } + return draw->depth; +} + +unsigned int +XftDrawBitsPerPixel (XftDraw *draw) +{ + if (!draw->bits_per_pixel) + { + XPixmapFormatValues *formats; + int nformats; + unsigned int depth; + + if ((depth = XftDrawDepth (draw)) && + (formats = XListPixmapFormats (draw->dpy, &nformats))) + { + int i; + + for (i = 0; i < nformats; i++) + { + if (formats[i].depth == depth) + { + draw->bits_per_pixel = formats[i].bits_per_pixel; + break; + } + } + XFree (formats); + } + } + return draw->bits_per_pixel; +} + XftDraw * XftDrawCreate (Display *dpy, Drawable drawable, @@ -39,14 +142,20 @@ draw = (XftDraw *) malloc (sizeof (XftDraw)); if (!draw) return 0; + draw->dpy = dpy; draw->drawable = drawable; + draw->screen = _XftDrawScreen (dpy, drawable, visual); + draw->depth = 0; /* don't find out unless we need to know */ + draw->bits_per_pixel = 0; /* don't find out unless we need to know */ draw->visual = visual; draw->colormap = colormap; - draw->core_set = False; - draw->render_set = False; - draw->render_able = False; - draw->clip = 0; + draw->render.pict = 0; + draw->core.gc = 0; + draw->core.use_pixmap = 0; + draw->clip_type = XftClipTypeNone; + draw->subwindow_mode = ClipByChildren; + XftMemAlloc (XFT_MEM_DRAW, sizeof (XftDraw)); return draw; } @@ -61,49 +170,60 @@ return 0; draw->dpy = dpy; draw->drawable = (Drawable) bitmap; + draw->screen = _XftDrawScreen (dpy, bitmap, 0); + draw->depth = 1; + draw->bits_per_pixel = 1; draw->visual = 0; draw->colormap = 0; - draw->core_set = False; - draw->render_set = False; - draw->render_able = False; - draw->clip = 0; + draw->render.pict = 0; + draw->core.gc = 0; + draw->clip_type = XftClipTypeNone; + draw->subwindow_mode = ClipByChildren; + XftMemAlloc (XFT_MEM_DRAW, sizeof (XftDraw)); return draw; } -static XRenderPictFormat * -_XftDrawFormat (XftDraw *draw) +XftDraw * +XftDrawCreateAlpha (Display *dpy, + Pixmap pixmap, + int depth) { - if (draw->visual == 0) - { - XRenderPictFormat pf; + XftDraw *draw; - pf.type = PictTypeDirect; - pf.depth = 1; - pf.direct.alpha = 0; - pf.direct.alphaMask = 1; - return XRenderFindFormat (draw->dpy, - (PictFormatType| - PictFormatDepth| - PictFormatAlpha| - PictFormatAlphaMask), - &pf, - 0); - } - else - return XRenderFindVisualFormat (draw->dpy, draw->visual); + draw = (XftDraw *) malloc (sizeof (XftDraw)); + if (!draw) + return 0; + draw->dpy = dpy; + draw->drawable = (Drawable) pixmap; + draw->screen = _XftDrawScreen (dpy, pixmap, 0); + draw->depth = depth; + draw->bits_per_pixel = 0; /* don't find out until we need it */ + draw->visual = 0; + draw->colormap = 0; + draw->render.pict = 0; + draw->core.gc = 0; + draw->clip_type = XftClipTypeNone; + draw->subwindow_mode = ClipByChildren; + XftMemAlloc (XFT_MEM_DRAW, sizeof (XftDraw)); + return draw; } static XRenderPictFormat * -_XftDrawFgFormat (XftDraw *draw) +_XftDrawFormat (XftDraw *draw) { - XRenderPictFormat pf; + XftDisplayInfo *info = _XftDisplayInfoGet (draw->dpy, True); + + if (!info->hasRender) + return 0; if (draw->visual == 0) { + XRenderPictFormat pf; + pf.type = PictTypeDirect; - pf.depth = 1; + pf.depth = XftDrawDepth (draw); pf.direct.alpha = 0; - pf.direct.alphaMask = 1; + pf.direct.alphaMask = (1 << pf.depth) - 1; return XRenderFindFormat (draw->dpy, (PictFormatType| PictFormatDepth| @@ -113,23 +233,7 @@ 0); } else - { - pf.type = PictTypeDirect; - pf.depth = 32; - pf.direct.redMask = 0xff; - pf.direct.greenMask = 0xff; - pf.direct.blueMask = 0xff; - pf.direct.alphaMask = 0xff; - return XRenderFindFormat (draw->dpy, - (PictFormatType| - PictFormatDepth| - PictFormatRedMask| - PictFormatGreenMask| - PictFormatBlueMask| - PictFormatAlphaMask), - &pf, - 0); - } + return XRenderFindVisualFormat (draw->dpy, draw->visual); } void @@ -137,291 +241,578 @@ Drawable drawable) { draw->drawable = drawable; - if (draw->render_able) + if (draw->render.pict) { - XRenderPictFormat *format; - XRenderFreePicture (draw->dpy, draw->render.pict); - format = XRenderFindVisualFormat (draw->dpy, draw->visual); - draw->render.pict = XRenderCreatePicture (draw->dpy, draw->drawable, - format, 0, 0); + draw->render.pict = 0; + } + if (draw->core.gc) + { + XFreeGC (draw->dpy, draw->core.gc); + draw->core.gc = 0; } } +Display * +XftDrawDisplay (XftDraw *draw) +{ + return draw->dpy; +} + +Drawable +XftDrawDrawable (XftDraw *draw) +{ + return draw->drawable; +} + +Colormap +XftDrawColormap (XftDraw *draw) +{ + return draw->colormap; +} + +Visual * +XftDrawVisual (XftDraw *draw) +{ + return draw->visual; +} + void XftDrawDestroy (XftDraw *draw) { - int n; - - if (draw->render_able) - { + if (draw->render.pict) XRenderFreePicture (draw->dpy, draw->render.pict); - for (n = 0; n < XFT_DRAW_N_SRC; n++) - XRenderFreePicture (draw->dpy, draw->render.src[n].pict); + if (draw->core.gc) + XFreeGC (draw->dpy, draw->core.gc); + switch (draw->clip_type) { + case XftClipTypeRegion: + XDestroyRegion (draw->clip.region); + break; + case XftClipTypeRectangles: + free (draw->clip.rect); + break; + case XftClipTypeNone: + break; } - if (draw->core_set) - XFreeGC (draw->dpy, draw->core.draw_gc); - if (draw->clip) - XDestroyRegion (draw->clip); + XftMemFree (XFT_MEM_DRAW, sizeof (XftDraw)); free (draw); } -Bool -XftDrawRenderPrepare (XftDraw *draw, - XftColor *color, - XftFont *font, - int src) +Picture +XftDrawSrcPicture (XftDraw *draw, _Xconst XftColor *color) { - if (!draw->render_set) + Display *dpy = draw->dpy; + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, True); + int i; + XftColor bitmapColor; + + if (!info) + return 0; + + /* + * Monochrome targets require special handling; the PictOp controls + * the color, and the color must be opaque + */ + if (!draw->visual && draw->depth == 1) + { + bitmapColor.color.alpha = 0xffff; + bitmapColor.color.red = 0xffff; + bitmapColor.color.green = 0xffff; + bitmapColor.color.blue = 0xffff; + color = &bitmapColor; + } + + /* + * See if there's one already available + */ + for (i = 0; i < XFT_NUM_SOLID_COLOR; i++) + { + if (info->colors[i].pict && + info->colors[i].screen == draw->screen && + !memcmp ((void *) &color->color, + (void *) &info->colors[i].color, + sizeof (XRenderColor))) + return info->colors[i].pict; + } + /* + * Pick one to replace at random + */ + i = (unsigned int) rand () % XFT_NUM_SOLID_COLOR; + /* + * Recreate if it was for the wrong screen + */ + if (info->colors[i].screen != draw->screen && info->colors[i].pict) + { + XRenderFreePicture (dpy, info->colors[i].pict); + info->colors[i].pict = 0; + } + /* + * Create picture if necessary + */ + if (!info->colors[i].pict) { + Pixmap pix; + XRenderPictureAttributes pa; + + pix = XCreatePixmap (dpy, RootWindow (dpy, draw->screen), 1, 1, + info->solidFormat->depth); + pa.repeat = True; + info->colors[i].pict = XRenderCreatePicture (draw->dpy, + pix, + info->solidFormat, + CPRepeat, &pa); + XFreePixmap (dpy, pix); + } + /* + * Set to the new color + */ + info->colors[i].color = color->color; + info->colors[i].screen = draw->screen; + XRenderFillRectangle (dpy, PictOpSrc, + info->colors[i].pict, + &color->color, 0, 0, 1, 1); + return info->colors[i].pict; +} + +static int +_XftDrawOp (_Xconst XftDraw *draw, _Xconst XftColor *color) +{ + if (draw->visual || draw->depth != 1) + return PictOpOver; + if (color->color.alpha >= 0x8000) + return PictOpOver; + return PictOpOutReverse; +} + +static FcBool +_XftDrawRenderPrepare (XftDraw *draw) +{ + if (!draw->render.pict) + { XRenderPictFormat *format; - XRenderPictFormat *pix_format; XRenderPictureAttributes pa; - int n; - Pixmap pix; + unsigned long mask = 0; - draw->render_set = True; - draw->render_able = False; format = _XftDrawFormat (draw); - pix_format = _XftDrawFgFormat (draw); - if (format && pix_format) + if (!format) + return FcFalse; + + if (draw->subwindow_mode == IncludeInferiors) { - draw->render_able = True; - - draw->render.pict = XRenderCreatePicture (draw->dpy, draw->drawable, - format, 0, 0); - 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); + pa.subwindow_mode = IncludeInferiors; + mask |= CPSubwindowMode; } + draw->render.pict = XRenderCreatePicture (draw->dpy, draw->drawable, + format, mask, &pa); + if (!draw->render.pict) + return FcFalse; + switch (draw->clip_type) { + case XftClipTypeRegion: + XRenderSetPictureClipRegion (draw->dpy, draw->render.pict, + draw->clip.region); + break; + case XftClipTypeRectangles: + XRenderSetPictureClipRectangles (draw->dpy, draw->render.pict, + draw->clip.rect->xOrigin, + draw->clip.rect->yOrigin, + XftClipRects(draw->clip.rect), + draw->clip.rect->n); + break; + case XftClipTypeNone: + break; + } } - if (!draw->render_able) - return False; - if (memcmp (&color->color, &draw->render.src[src].color, - sizeof (XRenderColor))) + return FcTrue; +} + +static FcBool +_XftDrawCorePrepare (XftDraw *draw, _Xconst XftColor *color) +{ + if (!draw->core.gc) { - if (_XftFontDebug () & XFT_DBG_DRAW) + XGCValues gcv; + unsigned long mask = 0; + if (draw->subwindow_mode == IncludeInferiors) { - 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.src[src].color = color->color; + gcv.subwindow_mode = IncludeInferiors; + mask |= GCSubwindowMode; + } + draw->core.gc = XCreateGC (draw->dpy, draw->drawable, mask, &gcv); + if (!draw->core.gc) + return FcFalse; + switch (draw->clip_type) { + case XftClipTypeRegion: + XSetRegion (draw->dpy, draw->core.gc, draw->clip.region); + break; + case XftClipTypeRectangles: + XSetClipRectangles (draw->dpy, draw->core.gc, + draw->clip.rect->xOrigin, + draw->clip.rect->yOrigin, + XftClipRects (draw->clip.rect), + draw->clip.rect->n, + Unsorted); + break; + case XftClipTypeNone: + break; + } } - return True; + XSetForeground (draw->dpy, draw->core.gc, color->pixel); + return FcTrue; } + +Picture +XftDrawPicture (XftDraw *draw) +{ + if (!_XftDrawRenderPrepare (draw)) + return 0; + return draw->render.pict; +} -Bool -XftDrawCorePrepare (XftDraw *draw, - XftColor *color, - XftFont *font) +#define NUM_LOCAL 1024 + +void +XftDrawGlyphs (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FT_UInt *glyphs, + int nglyphs) { + XftFontInt *font = (XftFontInt *) pub; - if (!draw->core_set) + if (font->format) { - XGCValues gcv; - unsigned long mask; - draw->core_set = True; - - draw->core.fg = color->pixel; - gcv.foreground = draw->core.fg; - mask = GCForeground; - if (font) - { - draw->core.font = font->u.core.font->fid; - gcv.font = draw->core.font; - mask |= GCFont; - } - draw->core.draw_gc = XCreateGC (draw->dpy, draw->drawable, - mask, &gcv); - if (draw->clip) - XSetRegion (draw->dpy, draw->core.draw_gc, draw->clip); + Picture src; + + if (_XftDrawRenderPrepare (draw) && + (src = XftDrawSrcPicture (draw, color))) + XftGlyphRender (draw->dpy, _XftDrawOp (draw, color), + src, pub, draw->render.pict, + 0, 0, x, y, glyphs, nglyphs); } - if (draw->core.fg != color->pixel) + else { - draw->core.fg = color->pixel; - XSetForeground (draw->dpy, draw->core.draw_gc, draw->core.fg); + if (_XftDrawCorePrepare (draw, color)) + XftGlyphCore (draw, color, pub, x, y, glyphs, nglyphs); } - if (font && draw->core.font != font->u.core.font->fid) +} + +void +XftDrawString8 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar8 *string, + int len) +{ + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (XftDebug () & XFT_DBG_DRAW) + printf ("DrawString \"%*.*s\"\n", len, len, string); + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - draw->core.font = font->u.core.font->fid; - XSetFont (draw->dpy, draw->core.draw_gc, draw->core.font); - } - return True; + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; + } + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (draw->dpy, pub, string[i]); + XftDrawGlyphs (draw, color, pub, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); } void -XftDrawString8 (XftDraw *draw, - XftColor *color, - XftFont *font, - int x, - int y, - XftChar8 *string, - int len) +XftDrawString16 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar16 *string, + int len) { - if (_XftFontDebug () & XFT_DBG_DRAW) + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - printf ("DrawString \"%*.*s\"\n", len, len, string); + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; } - if (font->core) + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (draw->dpy, pub, string[i]); + + XftDrawGlyphs (draw, color, pub, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftDrawString32 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar32 *string, + int len) +{ + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - XftDrawCorePrepare (draw, color, font); - XDrawString (draw->dpy, draw->drawable, draw->core.draw_gc, x, y, - (char *) string, len); + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; } -#ifdef FREETYPE2 - else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (draw->dpy, pub, string[i]); + + XftDrawGlyphs (draw, color, pub, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftDrawStringUtf8 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar8 *string, + int len) +{ + FT_UInt *glyphs, *glyphs_new, glyphs_local[NUM_LOCAL]; + FcChar32 ucs4; + int i; + int l; + int size; + + i = 0; + glyphs = glyphs_local; + size = NUM_LOCAL; + while (len && (l = FcUtf8ToUcs4 (string, &ucs4, len)) > 0) { - 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 + if (i == size) + { + glyphs_new = malloc (size * 2 * sizeof (FT_UInt)); + if (!glyphs_new) + { + if (glyphs != glyphs_local) + free (glyphs); + return; + } + memcpy (glyphs_new, glyphs, size * sizeof (FT_UInt)); + size *= 2; + if (glyphs != glyphs_local) + free (glyphs); + glyphs = glyphs_new; + } + glyphs[i++] = XftCharIndex (draw->dpy, pub, ucs4); + string += l; + len -= l; + } + XftDrawGlyphs (draw, color, pub, x, y, glyphs, i); + if (glyphs != glyphs_local) + free (glyphs); } -#define N16LOCAL 256 +void +XftDrawStringUtf16 (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + int x, + int y, + _Xconst FcChar8 *string, + FcEndian endian, + int len) +{ + FT_UInt *glyphs, *glyphs_new, glyphs_local[NUM_LOCAL]; + FcChar32 ucs4; + int i; + int l; + int size; + + i = 0; + glyphs = glyphs_local; + size = NUM_LOCAL; + while (len && (l = FcUtf16ToUcs4 (string, endian, &ucs4, len)) > 0) + { + if (i == size) + { + glyphs_new = malloc (size * 2 * sizeof (FT_UInt)); + if (!glyphs_new) + { + if (glyphs != glyphs_local) + free (glyphs); + return; + } + memcpy (glyphs_new, glyphs, size * sizeof (FT_UInt)); + size *= 2; + if (glyphs != glyphs_local) + free (glyphs); + glyphs = glyphs_new; + } + glyphs[i++] = XftCharIndex (draw->dpy, pub, ucs4); + string += l; + len -= l; + } + XftDrawGlyphs (draw, color, pub, x, y, glyphs, i); + if (glyphs != glyphs_local) + free (glyphs); +} void -XftDrawString16 (XftDraw *draw, - XftColor *color, - XftFont *font, - int x, - int y, - XftChar16 *string, - int len) +XftDrawGlyphSpec (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + _Xconst XftGlyphSpec *glyphs, + int len) { - if (font->core) + XftFontInt *font = (XftFontInt *) pub; + + if (font->format) { - XChar2b *xc; - XChar2b xcloc[XFT_CORE_N16LOCAL]; - - XftDrawCorePrepare (draw, color, font); - xc = XftCoreConvert16 (string, len, xcloc); - XDrawString16 (draw->dpy, draw->drawable, draw->core.draw_gc, x, y, - xc, len); - if (xc != xcloc) - free (xc); + Picture src; + + if (_XftDrawRenderPrepare (draw) && + (src = XftDrawSrcPicture (draw, color))) + { + XftGlyphSpecRender (draw->dpy, _XftDrawOp (draw, color), + src, pub, draw->render.pict, + 0, 0, glyphs, len); + } } -#ifdef FREETYPE2 - else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) + else { - XftRenderString16 (draw->dpy, - draw->render.src[XFT_DRAW_SRC_TEXT].pict, - font->u.ft.font, - draw->render.pict, 0, 0, x, y, string, len); + if (_XftDrawCorePrepare (draw, color)) + XftGlyphSpecCore (draw, color, pub, glyphs, len); } -#endif } void -XftDrawString32 (XftDraw *draw, - XftColor *color, - XftFont *font, - int x, - int y, - XftChar32 *string, - int len) +XftDrawGlyphFontSpec (XftDraw *draw, + _Xconst XftColor *color, + _Xconst XftGlyphFontSpec *glyphs, + int len) { - if (font->core) + int i; + int start; + + i = 0; + while (i < len) { - XChar2b *xc; - XChar2b xcloc[XFT_CORE_N16LOCAL]; - - XftDrawCorePrepare (draw, color, font); - xc = XftCoreConvert32 (string, len, xcloc); - XDrawString16 (draw->dpy, draw->drawable, draw->core.draw_gc, x, y, - xc, len); - if (xc != xcloc) - free (xc); - } -#ifdef FREETYPE2 - else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) - { - 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 + start = i; + if (((XftFontInt *) glyphs[i].font)->format) + { + Picture src; + while (i < len && ((XftFontInt *) glyphs[i].font)->format) + i++; + if (_XftDrawRenderPrepare (draw) && + (src = XftDrawSrcPicture (draw, color))) + { + XftGlyphFontSpecRender (draw->dpy, _XftDrawOp (draw, color), + src, draw->render.pict, + 0, 0, glyphs, i - start); + } + } + else + { + while (i < len && !((XftFontInt *) glyphs[i].font)->format) + i++; + if (_XftDrawCorePrepare (draw, color)) + XftGlyphFontSpecCore (draw, color, glyphs, len); + } + } } 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); +XftDrawCharSpec (XftDraw *draw, + _Xconst XftColor *color, + XftFont *pub, + _Xconst XftCharSpec *chars, + int len) +{ + XftGlyphSpec *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else + { + glyphs = malloc (len * sizeof (XftGlyphSpec)); + if (!glyphs) + return; } -#ifdef FREETYPE2 - else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) + for (i = 0; i < len; i++) { - XftRenderStringUtf8 (draw->dpy, - draw->render.src[XFT_DRAW_SRC_TEXT].pict, - font->u.ft.font, - draw->render.pict, 0, 0, x, y, string, len); + glyphs[i].glyph = XftCharIndex(draw->dpy, pub, chars[i].ucs4); + glyphs[i].x = chars[i].x; + glyphs[i].y = chars[i].y; } -#endif + + XftDrawGlyphSpec (draw, color, pub, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); } +void +XftDrawCharFontSpec (XftDraw *draw, + _Xconst XftColor *color, + _Xconst XftCharFontSpec *chars, + int len) +{ + XftGlyphFontSpec *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else + { + glyphs = malloc (len * sizeof (XftGlyphFontSpec)); + if (!glyphs) + return; + } + for (i = 0; i < len; i++) + { + glyphs[i].font = chars[i].font; + glyphs[i].glyph = XftCharIndex(draw->dpy, glyphs[i].font, chars[i].ucs4); + glyphs[i].x = chars[i].x; + glyphs[i].y = chars[i].y; + } + + XftDrawGlyphFontSpec (draw, color, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +} void -XftDrawRect (XftDraw *draw, - XftColor *color, - int x, - int y, - unsigned int width, - unsigned int height) +XftDrawRect (XftDraw *draw, + _Xconst XftColor *color, + int x, + int y, + unsigned int width, + unsigned int height) { - if (XftDrawRenderPrepare (draw, color, 0, XFT_DRAW_SRC_RECT)) + if (_XftDrawRenderPrepare (draw)) { XRenderFillRectangle (draw->dpy, PictOpOver, draw->render.pict, &color->color, x, y, width, height); } - else + else if (_XftDrawCorePrepare (draw, color)) { - XftDrawCorePrepare (draw, color, 0); - XFillRectangle (draw->dpy, draw->drawable, draw->core.draw_gc, - x, y, width, height); + XftRectCore (draw, color, x, y, width, height); } } @@ -431,9 +822,22 @@ { Region n = 0; - if (!r && !draw->clip) + /* + * Check for quick exits + */ + if (!r && draw->clip_type == XftClipTypeNone) return True; + + if (r && + draw->clip_type == XftClipTypeRegion && + XEqualRegion (r, draw->clip.region)) + { + return True; + } + /* + * Duplicate the region so future changes can be short circuited + */ if (r) { n = XCreateRegion (); @@ -446,37 +850,144 @@ } } } - if (draw->clip) + + /* + * Destroy existing clip + */ + switch (draw->clip_type) { + case XftClipTypeRegion: + XDestroyRegion (draw->clip.region); + break; + case XftClipTypeRectangles: + free (draw->clip.rect); + break; + case XftClipTypeNone: + break; + } + + /* + * Set the clip + */ + if (n) { - XDestroyRegion (draw->clip); + draw->clip_type = XftClipTypeRegion; + draw->clip.region = n; } - draw->clip = n; - if (draw->render_able) + else { - XRenderPictureAttributes pa; - if (n) - { + draw->clip_type = XftClipTypeNone; + } + /* + * Apply new clip to existing objects + */ + if (draw->render.pict) + { + if (n) XRenderSetPictureClipRegion (draw->dpy, draw->render.pict, n); - } else { + XRenderPictureAttributes pa; pa.clip_mask = None; XRenderChangePicture (draw->dpy, draw->render.pict, CPClipMask, &pa); } } - if (draw->core_set) + if (draw->core.gc) { - XGCValues gv; - if (n) - XSetRegion (draw->dpy, draw->core.draw_gc, n); + XSetRegion (draw->dpy, draw->core.gc, draw->clip.region); else - { - gv.clip_mask = None; - XChangeGC (draw->dpy, draw->core.draw_gc, - GCClipMask, &gv); - } + XSetClipMask (draw->dpy, draw->core.gc, None); } return True; +} + +Bool +XftDrawSetClipRectangles (XftDraw *draw, + int xOrigin, + int yOrigin, + _Xconst XRectangle *rects, + int n) +{ + XftClipRect *new = 0; + + /* + * Check for quick exit + */ + if (draw->clip_type == XftClipTypeRectangles && + !memcmp (XftClipRects (draw->clip.rect), rects, n * sizeof (XRectangle))) + { + return True; + } + + /* + * Duplicate the region so future changes can be short circuited + */ + new = malloc (sizeof (XftClipRect) + n * sizeof (XRectangle)); + if (!new) + return False; + + new->n = n; + new->xOrigin = xOrigin; + new->yOrigin = yOrigin; + memcpy (XftClipRects (new), rects, n * sizeof (XRectangle)); + + /* + * Destroy existing clip + */ + switch (draw->clip_type) { + case XftClipTypeRegion: + XDestroyRegion (draw->clip.region); + break; + case XftClipTypeRectangles: + free (draw->clip.rect); + break; + case XftClipTypeNone: + break; + } + + /* + * Set the clip + */ + draw->clip_type = XftClipTypeRectangles; + draw->clip.rect = new; + /* + * Apply new clip to existing objects + */ + if (draw->render.pict) + { + XRenderSetPictureClipRectangles (draw->dpy, draw->render.pict, + new->xOrigin, + new->yOrigin, + XftClipRects(new), + new->n); + } + if (draw->core.gc) + { + XSetClipRectangles (draw->dpy, draw->core.gc, + new->xOrigin, + new->yOrigin, + XftClipRects (new), + new->n, + Unsorted); + } + return True; +} + +void +XftDrawSetSubwindowMode (XftDraw *draw, int mode) +{ + if (mode == draw->subwindow_mode) + return; + draw->subwindow_mode = mode; + if (draw->render.pict) + { + XRenderPictureAttributes pa; + + pa.subwindow_mode = mode; + XRenderChangePicture (draw->dpy, draw->render.pict, + CPSubwindowMode, &pa); + } + if (draw->core.gc) + XSetSubwindowMode (draw->dpy, draw->core.gc, mode); } Index: xc/lib/Xft/xftextent.c diff -u xc/lib/Xft/xftextent.c:1.6 xc/lib/Xft/xftextent.c:1.10 --- xc/lib/Xft/xftextent.c:1.6 Sun Apr 1 10:00:01 2001 +++ xc/lib/Xft/xftextent.c Fri Dec 13 20:59:38 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftextent.c,v 1.6 2001/04/01 14:00:01 tsi Exp $ + * $XFree86: xc/lib/Xft/xftextent.c,v 1.10 2002/12/14 01:59:38 dawes Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -25,166 +25,267 @@ #include #include #include "xftint.h" - + void -XftTextExtents8 (Display *dpy, - XftFont *font, - XftChar8 *string, - int len, - XGlyphInfo *extents) +XftGlyphExtents (Display *dpy, + XftFont *pub, + _Xconst FT_UInt *glyphs, + int nglyphs, + XGlyphInfo *extents) { - if (font->core) + XftFontInt *font = (XftFontInt *) pub; + FT_UInt missing[XFT_NMISSING]; + int nmissing; + int n; + _Xconst FT_UInt *g; + FT_UInt glyph; + XftGlyph *xftg; + FcBool glyphs_loaded; + int x, y; + int left, right, top, bottom; + int overall_left, overall_right; + int overall_top, overall_bottom; + + g = glyphs; + n = nglyphs; + nmissing = 0; + glyphs_loaded = FcFalse; + while (n--) + if (XftFontCheckGlyph (dpy, pub, FcFalse, *g++, missing, &nmissing)) + glyphs_loaded = FcTrue; + if (nmissing) + XftFontLoadGlyphs (dpy, pub, FcFalse, missing, nmissing); + g = glyphs; + n = nglyphs; + xftg = 0; + while (n) + { + glyph = *g++; + n--; + if (glyph < font->num_glyphs && + (xftg = font->glyphs[glyph])) + break; + } + if (n == 0 && !xftg) { - XftCoreExtents8 (dpy, font->u.core.font, string, len, extents); + extents->width = 0; + extents->height = 0; + extents->x = 0; + extents->y = 0; + extents->yOff = 0; + extents->xOff = 0; } -#ifdef FREETYPE2 else { - XftRenderExtents8 (dpy, font->u.ft.font, string, len, extents); + x = 0; + y = 0; + overall_left = x - xftg->metrics.x; + overall_top = y - xftg->metrics.y; + overall_right = overall_left + (int) xftg->metrics.width; + overall_bottom = overall_top + (int) xftg->metrics.height; + x += xftg->metrics.xOff; + y += xftg->metrics.yOff; + while (n--) + { + glyph = *g++; + if (glyph < font->num_glyphs && (xftg = font->glyphs[glyph])) + { + left = x - xftg->metrics.x; + top = y - xftg->metrics.y; + right = left + (int) xftg->metrics.width; + bottom = top + (int) xftg->metrics.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 += xftg->metrics.xOff; + y += xftg->metrics.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; } -#endif + if (glyphs_loaded) + _XftFontManageMemory (dpy, pub); } +#define NUM_LOCAL 1024 + void -XftTextExtents16 (Display *dpy, - XftFont *font, - XftChar16 *string, - int len, - XGlyphInfo *extents) +XftTextExtents8 (Display *dpy, + XftFont *pub, + _Xconst FcChar8 *string, + int len, + XGlyphInfo *extents) { - if (font->core) - { - XftCoreExtents16 (dpy, font->u.core.font, string, len, extents); - } -#ifdef FREETYPE2 + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; else { - XftRenderExtents16 (dpy, font->u.ft.font, string, len, extents); + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + { + memset (extents, '\0', sizeof (XGlyphInfo)); + return; + } } -#endif + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, string[i]); + XftGlyphExtents (dpy, pub, glyphs, len, extents); + if (glyphs != glyphs_local) + free (glyphs); } void -XftTextExtents32 (Display *dpy, - XftFont *font, - XftChar32 *string, - int len, - XGlyphInfo *extents) +XftTextExtents16 (Display *dpy, + XftFont *pub, + _Xconst FcChar16 *string, + int len, + XGlyphInfo *extents) { - if (font->core) - { - XftCoreExtents32 (dpy, font->u.core.font, string, len, extents); - } -#ifdef FREETYPE2 + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; else { - XftRenderExtents32 (dpy, font->u.ft.font, string, len, extents); + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + { + memset (extents, '\0', sizeof (XGlyphInfo)); + return; + } } -#endif + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, string[i]); + XftGlyphExtents (dpy, pub, glyphs, len, extents); + if (glyphs != glyphs_local) + free (glyphs); } 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) +XftTextExtents32 (Display *dpy, + XftFont *pub, + _Xconst FcChar32 *string, + int len, + XGlyphInfo *extents) +{ + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - clen = XftUtf8ToUcs4 (src, &c, rlen); - if (clen <= 0) /* malformed UTF8 string */ + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) { - memset (extents, 0, sizeof (XGlyphInfo)); + 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)) + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, string[i]); + XftGlyphExtents (dpy, pub, glyphs, len, extents); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftTextExtentsUtf8 (Display *dpy, + XftFont *pub, + _Xconst FcChar8 *string, + int len, + XGlyphInfo *extents) +{ + FT_UInt *glyphs, *glyphs_new, glyphs_local[NUM_LOCAL]; + FcChar32 ucs4; + int i; + int l; + int size; + + i = 0; + glyphs = glyphs_local; + size = NUM_LOCAL; + while (len && (l = FcUtf8ToUcs4 (string, &ucs4, len)) > 0) { - dst = (XftChar32 *) malloc (n * width); - if (!dst) + if (i == size) { - memset (extents, 0, sizeof (XGlyphInfo)); - return; + glyphs_new = malloc (size * 2 * sizeof (FT_UInt)); + if (!glyphs_new) + { + if (glyphs != glyphs_local) + free (glyphs); + memset (extents, '\0', sizeof (XGlyphInfo)); + return; + } + memcpy (glyphs_new, glyphs, size * sizeof (FT_UInt)); + size *= 2; + if (glyphs != glyphs_local) + free (glyphs); + glyphs = glyphs_new; } + glyphs[i++] = XftCharIndex (dpy, pub, ucs4); + string += l; + len -= l; } - - 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) + XftGlyphExtents (dpy, pub, glyphs, i, extents); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftTextExtentsUtf16 (Display *dpy, + XftFont *pub, + _Xconst FcChar8 *string, + FcEndian endian, + int len, + XGlyphInfo *extents) +{ + FT_UInt *glyphs, *glyphs_new, glyphs_local[NUM_LOCAL]; + FcChar32 ucs4; + int i; + int l; + int size; + + i = 0; + glyphs = glyphs_local; + size = NUM_LOCAL; + while (len && (l = FcUtf16ToUcs4 (string, endian, &ucs4, len)) > 0) + { + if (i == size) { - clen = XftUtf8ToUcs4 (src, &c, rlen); - if (clen <= 0) /* malformed UTF8 string */ + glyphs_new = malloc (size * 2 * sizeof (FT_UInt)); + if (!glyphs_new) + { + if (glyphs != glyphs_local) + free (glyphs); + memset (extents, '\0', sizeof (XGlyphInfo)); return; - *dst8++ = c; - src += clen; - rlen -= clen; - } - dst8 = (XftChar8 *) dst; - XftTextExtents8 (dpy, font, dst8, n, extents); - break; + } + memcpy (glyphs_new, glyphs, size * sizeof (FT_UInt)); + size *= 2; + if (glyphs != glyphs_local) + free (glyphs); + glyphs = glyphs_new; + } + glyphs[i++] = XftCharIndex (dpy, pub, ucs4); + string += l; + len -= l; } - if (dst != lbuf) - free (dst); + XftGlyphExtents (dpy, pub, glyphs, i, extents); + if (glyphs != glyphs_local) + free (glyphs); } Index: xc/lib/Xft/xftfont.c diff -u xc/lib/Xft/xftfont.c:1.8 xc/lib/Xft/xftfont.c:1.11 --- xc/lib/Xft/xftfont.c:1.8 Tue Dec 19 19:20:48 2000 +++ xc/lib/Xft/xftfont.c Fri Oct 11 13:53:02 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftfont.c,v 1.8 2000/12/20 00:20:48 keithp Exp $ + * $XFree86: xc/lib/Xft/xftfont.c,v 1.11 2002/10/11 17:53:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -26,190 +26,91 @@ #include #include "xftint.h" -XftPattern * -XftFontMatch (Display *dpy, int screen, XftPattern *pattern, XftResult *result) +FcPattern * +XftFontMatch (Display *dpy, + int screen, + _Xconst FcPattern *pattern, + FcResult *result) { - XftPattern *new; - XftPattern *match; - XftFontSet *sets[2]; - int nsets; -#ifdef FREETYPE2 - Bool render, core; -#endif + FcPattern *new; + FcPattern *match; if (!XftInit (0)) return 0; - new = XftPatternDuplicate (pattern); + new = FcPatternDuplicate (pattern); if (!new) return 0; - if (_XftFontDebug () & XFT_DBG_OPENV) + if (XftDebug () & XFT_DBG_OPENV) { printf ("XftFontMatch pattern "); - XftPatternPrint (new); + FcPatternPrint (new); } - XftConfigSubstitute (new); - if (_XftFontDebug () & XFT_DBG_OPENV) + FcConfigSubstitute (0, new, FcMatchPattern); + if (XftDebug () & XFT_DBG_OPENV) { - printf ("XftFontMatch after XftConfig substitutions "); - XftPatternPrint (new); + printf ("XftFontMatch after FcConfig substitutions "); + FcPatternPrint (new); } XftDefaultSubstitute (dpy, screen, new); - if (_XftFontDebug () & XFT_DBG_OPENV) + if (XftDebug () & XFT_DBG_OPENV) { printf ("XftFontMatch after X resource substitutions "); - XftPatternPrint (new); + FcPatternPrint (new); } - nsets = 0; -#ifdef FREETYPE2 - render = False; - core = True; - (void) XftPatternGetBool (new, XFT_RENDER, 0, &render); - (void) XftPatternGetBool (new, XFT_CORE, 0, &core); - if (_XftFontDebug () & XFT_DBG_OPENV) + match = FcFontMatch (0, new, result); + if (XftDebug () & XFT_DBG_OPENV) { - printf ("XftFontMatch: use core fonts \"%s\", use render fonts \"%s\"\n", - core ? "True" : "False", render ? "True" : "False"); + printf ("XftFontMatch result "); + FcPatternPrint (match); } - - if (render) - { - if (XftInitFtLibrary ()) - { - sets[nsets] = _XftFontSet; - if (sets[nsets]) - nsets++; - } - } - if (core) -#endif - { - sets[nsets] = XftDisplayGetFontSet (dpy); - if (sets[nsets]) - nsets++; - } - - match = XftFontSetMatch (sets, nsets, new, result); - XftPatternDestroy (new); + FcPatternDestroy (new); return match; } XftFont * -XftFontOpenPattern (Display *dpy, XftPattern *pattern) -{ - Bool core = True; - XFontStruct *xfs = 0; - XftFont *font; -#ifdef FREETYPE2 - XftFontStruct *fs = 0; - - if (XftPatternGetBool (pattern, XFT_CORE, 0, &core) != XftResultMatch) - return 0; - if (core) -#endif - { - xfs = XftCoreOpen (dpy, pattern); - if (!xfs) return 0; - } -#ifdef FREETYPE2 - else - { - fs = XftFreeTypeOpen (dpy, pattern); - if (!fs) return 0; - } -#endif - font = (XftFont *) malloc (sizeof (XftFont)); - font->core = core; - font->pattern = pattern; -#ifdef FREETYPE2 - if (core) -#endif - { - font->u.core.font = xfs; - font->ascent = xfs->ascent; - font->descent = xfs->descent; - font->height = xfs->ascent + xfs->descent; - font->max_advance_width = xfs->max_bounds.width; - } -#ifdef FREETYPE2 - else - { - font->u.ft.font = fs; - font->ascent = fs->ascent; - font->descent = fs->descent; - font->height = fs->height; - font->max_advance_width = fs->max_advance_width; - } -#endif - return font; -} - -int -_XftFontDebug (void) -{ - static int initialized; - static int debug; - - if (!initialized) - { - char *e; - - initialized = 1; - e = getenv ("XFT_DEBUG"); - if (e) - { - printf ("XFT_DEBUG=%s\n", e); - debug = atoi (e); - if (debug <= 0) - debug = 1; - } - } - return debug; -} - -XftFont * XftFontOpen (Display *dpy, int screen, ...) { va_list va; - XftPattern *pat; - XftPattern *match; - XftResult result; + FcPattern *pat; + FcPattern *match; + FcResult result; XftFont *font; va_start (va, screen); - pat = XftPatternVaBuild (0, va); + pat = FcPatternVaBuild (0, va); va_end (va); if (!pat) { - if (_XftFontDebug () & XFT_DBG_OPEN) + if (XftDebug () & XFT_DBG_OPEN) printf ("XftFontOpen: Invalid pattern argument\n"); return 0; } match = XftFontMatch (dpy, screen, pat, &result); - if (_XftFontDebug () & XFT_DBG_OPEN) + if (XftDebug () & XFT_DBG_OPEN) { printf ("Pattern "); - XftPatternPrint (pat); + FcPatternPrint (pat); if (match) { printf ("Match "); - XftPatternPrint (match); + FcPatternPrint (match); } else printf ("No Match\n"); } - XftPatternDestroy (pat); + FcPatternDestroy (pat); if (!match) return 0; font = XftFontOpenPattern (dpy, match); if (!font) { - if (_XftFontDebug () & XFT_DBG_OPEN) + if (XftDebug () & XFT_DBG_OPEN) printf ("No Font\n"); - XftPatternDestroy (match); + FcPatternDestroy (match); } return font; @@ -218,17 +119,17 @@ XftFont * XftFontOpenName (Display *dpy, int screen, const char *name) { - XftPattern *pat; - XftPattern *match; - XftResult result; - XftFont *font; + FcPattern *pat; + FcPattern *match; + FcResult result; + XftFont *font; - pat = XftNameParse (name); - if (_XftFontDebug () & XFT_DBG_OPEN) + pat = FcNameParse ((FcChar8 *) name); + if (XftDebug () & XFT_DBG_OPEN) { printf ("XftFontOpenName \"%s\": ", name); if (pat) - XftPatternPrint (pat); + FcPatternPrint (pat); else printf ("Invalid name\n"); } @@ -236,23 +137,27 @@ if (!pat) return 0; match = XftFontMatch (dpy, screen, pat, &result); - if (_XftFontDebug () & XFT_DBG_OPEN) + if (XftDebug () & XFT_DBG_OPEN) { if (match) { printf ("Match "); - XftPatternPrint (match); + FcPatternPrint (match); } else printf ("No Match\n"); } - XftPatternDestroy (pat); + FcPatternDestroy (pat); if (!match) return 0; font = XftFontOpenPattern (dpy, match); if (!font) - XftPatternDestroy (match); + { + if (XftDebug () & XFT_DBG_OPEN) + printf ("No Font\n"); + FcPatternDestroy (match); + } return font; } @@ -260,68 +165,46 @@ XftFont * XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd) { - XftPattern *pat; - XftPattern *match; - XftResult result; - XftFont *font; + FcPattern *pat; + FcPattern *match; + FcResult result; + XftFont *font; - pat = XftXlfdParse (xlfd, False, False); - if (_XftFontDebug () & XFT_DBG_OPEN) + pat = XftXlfdParse (xlfd, FcFalse, FcFalse); + if (XftDebug () & XFT_DBG_OPEN) { printf ("XftFontOpenXlfd \"%s\": ", xlfd); if (pat) printf ("Invalid xlfd\n"); else - XftPatternPrint (pat); + FcPatternPrint (pat); } if (!pat) return 0; match = XftFontMatch (dpy, screen, pat, &result); - if (_XftFontDebug () & XFT_DBG_OPEN) + if (XftDebug () & XFT_DBG_OPEN) { if (match) { printf ("Match "); - XftPatternPrint (match); + FcPatternPrint (match); } else printf ("No Match\n"); } - XftPatternDestroy (pat); + FcPatternDestroy (pat); if (!match) return 0; font = XftFontOpenPattern (dpy, match); if (!font) - XftPatternDestroy (match); + { + if (XftDebug () & XFT_DBG_OPEN) + printf ("No Font\n"); + FcPatternDestroy (match); + } return font; } -void -XftFontClose (Display *dpy, XftFont *font) -{ - if (font->core) - XftCoreClose (dpy, font->u.core.font); -#ifdef FREETYPE2 - else - XftFreeTypeClose (dpy, font->u.ft.font); -#endif - if (font->pattern) - XftPatternDestroy (font->pattern); - free (font); -} - -Bool -XftGlyphExists (Display *dpy, XftFont *font, XftChar32 glyph) -{ - if (font->core) - return XftCoreGlyphExists (dpy, font->u.core.font, glyph); - else -#ifdef FREETYPE2 - return XftFreeTypeGlyphExists (dpy, font->u.ft.font, glyph); -#else - return False; -#endif -} Index: xc/lib/Xft/xftfreetype.c diff -u xc/lib/Xft/xftfreetype.c:1.16 xc/lib/Xft/xftfreetype.c:1.29 --- xc/lib/Xft/xftfreetype.c:1.16 Thu Dec 13 12:26:00 2001 +++ xc/lib/Xft/xftfreetype.c Fri Oct 11 13:53:02 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.16 2001/12/13 17:26:00 keithp Exp $ + * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.29 2002/10/11 17:53:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -26,508 +26,722 @@ #include #include #include "xftint.h" +#include FT_Library _XftFTlibrary; -typedef struct _XftFtEncoding { - const char *name; - FT_Encoding encoding; -} 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) -{ - FT_Face face; - XftPattern *pat; - int slant; - int weight; - int i, j; - - if (FT_New_Face (_XftFTlibrary, file, id, &face)) - return 0; - - *count = face->num_faces; - - pat = XftPatternCreate (); - if (!pat) - goto bail0; - - - if (!XftPatternAddBool (pat, XFT_CORE, False)) - goto bail1; - - if (!XftPatternAddBool (pat, XFT_OUTLINE, - (face->face_flags & FT_FACE_FLAG_SCALABLE) != 0)) - goto bail1; - - if (!XftPatternAddBool (pat, XFT_SCALABLE, - (face->face_flags & FT_FACE_FLAG_SCALABLE) != 0)) - goto bail1; - - - slant = XFT_SLANT_ROMAN; - if (face->style_flags & FT_STYLE_FLAG_ITALIC) - slant = XFT_SLANT_ITALIC; - - if (!XftPatternAddInteger (pat, XFT_SLANT, slant)) - goto bail1; - - weight = XFT_WEIGHT_MEDIUM; - if (face->style_flags & FT_STYLE_FLAG_BOLD) - weight = XFT_WEIGHT_BOLD; - - if (!XftPatternAddInteger (pat, XFT_WEIGHT, weight)) - goto bail1; - - if (!XftPatternAddString (pat, XFT_FAMILY, face->family_name)) - goto bail1; - - if (!XftPatternAddString (pat, XFT_STYLE, face->style_name)) - goto bail1; - - if (!XftPatternAddString (pat, XFT_FILE, file)) - goto bail1; - - 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++) - if (!XftPatternAddDouble (pat, XFT_PIXEL_SIZE, - (double) face->available_sizes[i].height)) - goto bail1; - } - - for (i = 0; i < face->num_charmaps; i++) - { -#if 0 - printf ("face %s encoding %d %c%c%c%c\n", - face->family_name, i, - face->charmaps[i]->encoding >> 24, - face->charmaps[i]->encoding >> 16, - face->charmaps[i]->encoding >> 8, - face->charmaps[i]->encoding >> 0); -#endif - for (j = 0; j < NUM_FT_ENCODINGS; j++) - { - if (face->charmaps[i]->encoding == xftFtEncoding[j].encoding) - { - if (!XftPatternAddString (pat, XFT_ENCODING, - xftFtEncoding[j].name)) - goto bail1; - } - } - } - - if (!XftPatternAddString (pat, XFT_ENCODING, - "glyphs-fontspecific")) - goto bail1; - - - FT_Done_Face (face); - return pat; - -bail1: - XftPatternDestroy (pat); -bail0: - FT_Done_Face (face); - 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; +int XftMaxFreeTypeFiles = 5; static XftFtFile * -_XftFreeTypeOpenFile (char *file, int id) +_XftGetFile (const FcChar8 *file, int id) { XftFtFile *f; - FT_Face face; + + if (!XftInitFtLibrary ()) + return 0; for (f = _XftFtFiles; f; f = f->next) { - if (!strcmp (f->file, file) && f->id == id) + if (!strcmp (f->file, (void *) file) && f->id == id) { ++f->ref; - if (_XftFontDebug () & XFT_DBG_REF) + if (XftDebug () & 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); + f = malloc (sizeof (XftFtFile) + strlen ((char *) file) + 1); if (!f) return 0; - if (_XftFontDebug () & XFT_DBG_REF) + XftMemAlloc (XFT_MEM_FILE, sizeof (XftFtFile) + strlen ((char *) file) + 1); + if (XftDebug () & 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); + strcpy (f->file, (void *) file); f->id = id; - f->face = face; - f->size = 0; - f->charmap = -1; + f->lock = 0; + f->face = 0; + f->xsize = 0; + f->ysize = 0; return f; } -Bool -XftFreeTypeSetFace (FT_Face face, FT_F26Dot6 size, int charmap, FT_Matrix *matrix) +static XftFtFile * +_XftGetFaceFile (FT_Face face) { - XftFtFile *f, **prev; + XftFtFile *f; + + f = malloc (sizeof (XftFtFile)); + if (!f) + return 0; + XftMemAlloc (XFT_MEM_FILE, sizeof(XftFtFile)); + f->next = 0; - for (prev = &_XftFtFiles; (f = *prev); prev = &f->next) + f->ref = 1; + + f->file = 0; + f->id = 0; + f->lock = 0; + f->face = face; + f->xsize = 0; + f->ysize = 0; + return f; +} + +static int +_XftNumFiles (void) +{ + XftFtFile *f; + int count = 0; + for (f = _XftFtFiles; f; f = f->next) + if (f->face && !f->lock) + ++count; + return count; +} + +static XftFtFile * +_XftNthFile (int n) +{ + XftFtFile *f; + int count = 0; + for (f = _XftFtFiles; f; f = f->next) + if (f->face && !f->lock) + if (count++ == n) + break; + return f; +} + +static void +_XftUncacheFiles (void) +{ + int n; + XftFtFile *f; + while ((n = _XftNumFiles ()) > XftMaxFreeTypeFiles) { - if (f->face == face) + f = _XftNthFile (rand () % n); + if (f) { - /* 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; + if (XftDebug() & XFT_DBG_REF) + printf ("Discard file %s/%d from cache\n", + f->file, f->id); + FT_Done_Face (f->face); + f->face = 0; } } +} + +static FT_Face +_XftLockFile (XftFtFile *f) +{ + ++f->lock; + if (!f->face) + { + if (XftDebug() & XFT_DBG_REF) + printf ("Loading file %s/%d\n", f->file, f->id); + if (FT_New_Face (_XftFTlibrary, f->file, f->id, &f->face)) + --f->lock; + + f->xsize = 0; + f->ysize = 0; + f->matrix.xx = f->matrix.xy = f->matrix.yx = f->matrix.yy = 0; + _XftUncacheFiles (); + } + return f->face; +} + +static void +_XftLockError (char *reason) +{ + fprintf (stderr, "Xft: locking error %s\n", reason); +} + +static void +_XftUnlockFile (XftFtFile *f) +{ + if (--f->lock < 0) + _XftLockError ("too many file unlocks"); +} + +FcBool +_XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix) +{ + FT_Face face = f->face; + + if (f->xsize != xsize || f->ysize != ysize) + { + if (XftDebug() & XFT_DBG_GLYPH) + printf ("Set face size to %dx%d (%dx%d)\n", + (int) (xsize >> 6), (int) (ysize >> 6), (int) xsize, (int) ysize); + if (FT_Set_Char_Size (face, xsize, ysize, 0, 0)) + return False; + f->xsize = xsize; + f->ysize = ysize; + } + if (!FT_Matrix_Equal (&f->matrix, matrix)) + { + if (XftDebug() & 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; + } return True; } static void -_XftFreeTypeCloseFile (XftFtFile *f) +_XftReleaseFile (XftFtFile *f) { XftFtFile **prev; if (--f->ref != 0) - return; - for (prev = &_XftFtFiles; *prev; prev = &(*prev)->next) + return; + if (f->lock) + _XftLockError ("Attempt to close locked file"); + if (f->file) { - if (*prev == f) + for (prev = &_XftFtFiles; *prev; prev = &(*prev)->next) { - *prev = f->next; - break; + if (*prev == f) + { + *prev = f->next; + break; + } } + if (f->face) + FT_Done_Face (f->face); } - FT_Done_Face (f->face); + XftMemFree (XFT_MEM_FILE, sizeof (XftFtFile) + strlen (f->file) + 1); free (f); } /* - * Cache of all glyphsets + * Find a prime larger than the minimum reasonable hash size */ -typedef struct _XftFtGlyphSet { - struct _XftFtGlyphSet *next; - int ref; - - XftFtFile *file; - Bool minspace; - int char_width; + +static FcChar32 +_XftSqrt (FcChar32 a) +{ + FcChar32 l, h, m; + + l = 2; + h = a/2; + while ((h-l) > 1) + { + m = (h+l) >> 1; + if (m * m < a) + l = m; + else + h = m; + } + return h; +} + +static FcBool +_XftIsPrime (FcChar32 i) +{ + FcChar32 l, t; + + if (i < 2) + return FcFalse; + if ((i & 1) == 0) + { + if (i == 2) + return FcTrue; + return FcFalse; + } + l = _XftSqrt (i) + 1; + for (t = 3; t <= l; t += 2) + if (i % t == 0) + return FcFalse; + return FcTrue; +} + +static FcChar32 +_XftHashSize (FcChar32 num_unicode) +{ + /* at least 31.25 % extra space */ + FcChar32 hash = num_unicode + (num_unicode >> 2) + (num_unicode >> 4); + + if ((hash & 1) == 0) + hash++; + while (!_XftIsPrime (hash)) + hash += 2; + return hash; +} + +FT_Face +XftLockFace (XftFont *public) +{ + XftFontInt *font = (XftFontInt *) public; + XftFontInfo *fi = &font->info; + FT_Face face; - XftFontStruct font; -} XftFtGlyphSet; + face = _XftLockFile (fi->file); + /* + * Make sure the face is usable at the requested size + */ + if (face && !_XftSetFace (fi->file, fi->xsize, fi->ysize, &fi->matrix)) + { + _XftUnlockFile (fi->file); + face = 0; + } + return face; +} -XftFontStruct * -XftFreeTypeOpen (Display *dpy, XftPattern *pattern) +void +XftUnlockFace (XftFont *public) { - XftDisplayInfo *info = _XftDisplayInfoGet (dpy); - XftFtFile *file; - FT_Face face; - XftFtGlyphSet *gs; - char *filename; + XftFontInt *font = (XftFontInt *) public; + _XftUnlockFile (font->info.file); +} + +static FcBool +XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi) +{ + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, True); + FcChar8 *filename; int id; double dsize; - FT_F26Dot6 size; - int rgba; - int spacing; - int char_width; - Bool antialias; - Bool minspace; - char *encoding_name; - XftFontStruct *font; - int j; - FT_Encoding encoding; - int charmap; - FT_Matrix matrix; - XftMatrix *font_matrix; - -#if 0 - int extra; -#endif - int height, ascent, descent; - XRenderPictFormat pf, *format; - + double aspect; + FcMatrix *font_matrix; + FcBool hinting, vertical_layout, autohint, global_advance; + FcChar32 hash, *hashp; + FT_Face face; + int nhash; + + if (!info) + return FcFalse; + /* - * Open the file + * Find the associated file */ - if (XftPatternGetString (pattern, XFT_FILE, 0, &filename) != XftResultMatch) - goto bail0; - - if (XftPatternGetInteger (pattern, XFT_INDEX, 0, &id) != XftResultMatch) + switch (FcPatternGetString (pattern, FC_FILE, 0, &filename)) { + case FcResultNoMatch: + filename = 0; + break; + case FcResultMatch: + break; + default: goto bail0; + } - file = _XftFreeTypeOpenFile (filename, id); - if (!file) + switch (FcPatternGetInteger (pattern, FC_INDEX, 0, &id)) { + case FcResultNoMatch: + id = 0; + break; + case FcResultMatch: + break; + default: goto bail0; + } - face = file->face; + if (filename) + fi->file = _XftGetFile (filename, id); + else if (FcPatternGetFTFace (pattern, FC_FT_FACE, 0, &face) == FcResultMatch + && face) + fi->file = _XftGetFaceFile (face); + else + fi->file = 0; + if (!fi->file) + goto bail0; /* - * Extract the glyphset information from the pattern + * Compute pixel size */ - if (XftPatternGetString (pattern, XFT_ENCODING, 0, &encoding_name) != XftResultMatch) - goto bail0; + if (FcPatternGetDouble (pattern, FC_PIXEL_SIZE, 0, &dsize) != FcResultMatch) + goto bail1; + + if (FcPatternGetDouble (pattern, FC_ASPECT, 0, &aspect) != FcResultMatch) + aspect = 1.0; - if (XftPatternGetDouble (pattern, XFT_PIXEL_SIZE, 0, &dsize) != XftResultMatch) - goto bail0; + fi->ysize = (FT_F26Dot6) (dsize * 64.0); + fi->xsize = (FT_F26Dot6) (dsize * aspect * 64.0); + + if (XftDebug() & XFT_DBG_OPEN) + printf ("XftFontInfoFill: %s: %d (%g pixels)\n", + (filename ? filename : (FcChar8 *) ""), id, dsize); + /* + * Get antialias value + */ + switch (FcPatternGetBool (pattern, FC_ANTIALIAS, 0, &fi->antialias)) { + case FcResultNoMatch: + fi->antialias = True; + break; + case FcResultMatch: + break; + default: + goto bail1; + } - switch (XftPatternGetInteger (pattern, XFT_RGBA, 0, &rgba)) { - case XftResultNoMatch: - rgba = XFT_RGBA_NONE; + /* + * Get rgba value + */ + switch (FcPatternGetInteger (pattern, FC_RGBA, 0, &fi->rgba)) { + case FcResultNoMatch: + fi->rgba = FC_RGBA_UNKNOWN; break; - case XftResultMatch: + case FcResultMatch: break; default: - goto bail0; + goto bail1; } - - switch (XftPatternGetBool (pattern, XFT_ANTIALIAS, 0, &antialias)) { - case XftResultNoMatch: - antialias = True; + + /* + * Get matrix and transform values + */ + switch (FcPatternGetMatrix (pattern, FC_MATRIX, 0, &font_matrix)) { + case FcResultNoMatch: + fi->matrix.xx = fi->matrix.yy = 0x10000; + fi->matrix.xy = fi->matrix.yx = 0; break; - case XftResultMatch: + case FcResultMatch: + fi->matrix.xx = 0x10000L * font_matrix->xx; + fi->matrix.yy = 0x10000L * font_matrix->yy; + fi->matrix.xy = 0x10000L * font_matrix->xy; + fi->matrix.yx = 0x10000L * font_matrix->yx; break; default: - goto bail0; + goto bail1; + } + + fi->transform = (fi->matrix.xx != 0x10000 || fi->matrix.xy != 0 || + fi->matrix.yx != 0 || fi->matrix.yy != 0x10000); + + /* + * Get render value, set to false if no Render extension present + */ + if (info->hasRender) + { + switch (FcPatternGetBool (pattern, XFT_RENDER, 0, &fi->render)) { + case FcResultNoMatch: + fi->render = info->hasRender; + break; + case FcResultMatch: + break; + default: + goto bail1; + } } + else + fi->render = FcFalse; - switch (XftPatternGetBool (pattern, XFT_MINSPACE, 0, &minspace)) { - case XftResultNoMatch: - minspace = False; + /* + * Compute glyph load flags + */ + fi->load_flags = FT_LOAD_DEFAULT; + + /* disable bitmaps when anti-aliasing or transforming glyphs */ + if (fi->antialias || fi->transform) + fi->load_flags |= FT_LOAD_NO_BITMAP; + + /* disable hinting if requested */ + switch (FcPatternGetBool (pattern, FC_HINTING, 0, &hinting)) { + case FcResultNoMatch: + hinting = FcTrue; break; - case XftResultMatch: + case FcResultMatch: break; default: - goto bail0; + goto bail1; } + + if (!hinting) + fi->load_flags |= FT_LOAD_NO_HINTING; - switch (XftPatternGetInteger (pattern, XFT_SPACING, 0, &spacing)) { - case XftResultNoMatch: - spacing = XFT_PROPORTIONAL; + /* set vertical layout if requested */ + switch (FcPatternGetBool (pattern, FC_VERTICAL_LAYOUT, 0, &vertical_layout)) { + case FcResultNoMatch: + vertical_layout = FcFalse; break; - case XftResultMatch: + case FcResultMatch: break; default: goto bail1; } - if (XftPatternGetInteger (pattern, XFT_CHAR_WIDTH, - 0, &char_width) != XftResultMatch) - { - char_width = 0; + if (vertical_layout) + fi->load_flags |= FT_LOAD_VERTICAL_LAYOUT; + + /* force autohinting if requested */ + switch (FcPatternGetBool (pattern, FC_AUTOHINT, 0, &autohint)) { + case FcResultNoMatch: + autohint = FcFalse; + break; + case FcResultMatch: + break; + default: + goto bail1; } - 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: + + if (autohint) + fi->load_flags |= FT_LOAD_FORCE_AUTOHINT; + + /* disable global advance width (for broken DynaLab TT CJK fonts) */ + switch (FcPatternGetBool (pattern, FC_GLOBAL_ADVANCE, 0, &global_advance)) { + case FcResultNoMatch: + global_advance = FcTrue; 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; + case FcResultMatch: break; default: goto bail1; } + if (!global_advance) + fi->load_flags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; + /* + * Get requested spacing value + */ + switch (FcPatternGetInteger (pattern, FC_SPACING, 0, &fi->spacing)) { + case FcResultNoMatch: + fi->spacing = FC_PROPORTIONAL; + break; + case FcResultMatch: + break; + default: + goto bail1; + } - if (XftPatternGetInteger (pattern, XFT_CHAR_WIDTH, - 0, &char_width) != XftResultMatch) - { - char_width = 0; + /* + * Check for minspace + */ + + switch (FcPatternGetBool (pattern, FC_MINSPACE, 0, &fi->minspace)) { + case FcResultNoMatch: + fi->minspace = FcFalse; + break; + case FcResultMatch: + break; + default: + goto bail1; } - else if (char_width) - spacing = XFT_MONO; + /* + * Check for fixed pixel spacing + */ + switch (FcPatternGetInteger (pattern, FC_CHAR_WIDTH, 0, &fi->char_width)) { + case FcResultNoMatch: + fi->char_width = 0; + break; + case FcResultMatch: + if (fi->char_width) + fi->spacing = FC_MONO; + break; + default: + goto bail1; + } - encoding = face->charmaps[0]->encoding; + /* + * Step over hash value in the structure + */ + hash = 0; + hashp = (FcChar32 *) fi + 1; + nhash = (sizeof (XftFontInfo) / sizeof (FcChar32)) - 1; + + while (nhash--) + hash += *hashp++; + fi->hash = hash; - for (j = 0; j < NUM_FT_ENCODINGS; j++) - if (!strcmp (encoding_name, xftFtEncoding[j].name)) - { - encoding = xftFtEncoding[j].encoding; - break; - } + /* + * All done + */ + return FcTrue; - size = (FT_F26Dot6) (dsize * 64.0); +bail1: + _XftReleaseFile (fi->file); + fi->file = 0; +bail0: + return FcFalse; +} + +static void +XftFontInfoEmpty (Display *dpy, XftFontInfo *fi) +{ + if (fi->file) + _XftReleaseFile (fi->file); +} + +XftFontInfo * +XftFontInfoCreate (Display *dpy, _Xconst FcPattern *pattern) +{ + XftFontInfo *fi = malloc (sizeof (XftFontInfo)); + + if (!fi) + return 0; - if (encoding == ft_encoding_none) - charmap = -1; - else + if (!XftFontInfoFill (dpy, pattern, fi)) { - for (charmap = 0; charmap < face->num_charmaps; charmap++) - if (face->charmaps[charmap]->encoding == encoding) - break; - - if (charmap == face->num_charmaps) - goto bail1; + free (fi); + fi = 0; } + XftMemAlloc (XFT_MEM_FONT, sizeof (XftFontInfo)); + return fi; +} + +void +XftFontInfoDestroy (Display *dpy, XftFontInfo *fi) +{ + XftFontInfoEmpty (dpy, fi); + XftMemFree (XFT_MEM_FONT, sizeof (XftFontInfo)); + free (fi); +} +FcChar32 +XftFontInfoHash (_Xconst XftFontInfo *fi) +{ + return fi->hash; +} +FcBool +XftFontInfoEqual (_Xconst XftFontInfo *a, _Xconst XftFontInfo *b) +{ + return memcmp ((void *) a, (void *) b, sizeof (XftFontInfo)) == 0; +} + +XftFont * +XftFontOpenInfo (Display *dpy, + FcPattern *pattern, + XftFontInfo *fi) +{ + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, True); + FT_Face face; + XftFont **bucket; + XftFontInt *font; + XRenderPictFormat pf, *format; + FcCharSet *charset; + FcChar32 num_unicode; + FcChar32 hash_value; + FcChar32 rehash_value; + FcBool antialias; + int max_glyph_memory; + int alloc_size; + int ascent, descent, height; + int i; + + if (!info) + return 0; /* - * Match an existing glyphset + * Find a matching previously opened font */ - for (gs = info->glyphSets; 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)) + bucket = &info->fontHash[fi->hash % XFT_NUM_FONT_HASH]; + for (font = (XftFontInt *) *bucket; font; font = (XftFontInt *) font->hash_next) + if (XftFontInfoEqual (&font->info, fi)) { - ++gs->ref; - if (_XftFontDebug () & XFT_DBG_REF) - { - printf ("Face size %g matches existing (%d)\n", - dsize, gs->ref); - } - return &gs->font; + if (!font->ref++) + --info->num_unref_fonts; + FcPatternDestroy (pattern); + return &font->public; } - } - - if (_XftFontDebug () & XFT_DBG_REF) - { - printf ("Face size %g matches new\n", - dsize); - } + /* - * No existing glyphset, create another + * No existing font, create another. */ - gs = malloc (sizeof (XftFtGlyphSet)); - if (!gs) + + if (XftDebug () & XFT_DBG_CACHE) + printf ("New font %s/%d size %dx%d\n", + fi->file->file, fi->file->id, + (int) fi->xsize >> 6, (int) fi->ysize >> 6); + + if (FcPatternGetInteger (pattern, XFT_MAX_GLYPH_MEMORY, 0, + &max_glyph_memory) != FcResultMatch) + max_glyph_memory = XFT_FONT_MAX_GLYPH_MEMORY; + + face = _XftLockFile (fi->file); + if (!face) + goto bail0; + + if (!_XftSetFace (fi->file, fi->xsize, fi->ysize, &fi->matrix)) goto bail1; - gs->ref = 1; + /* + * Get the set of Unicode codepoints covered by the font. + * If the incoming pattern doesn't provide this data, go + * off and compute it. Yes, this is expensive, but it's + * required to map Unicode to glyph indices. + */ + if (FcPatternGetCharSet (pattern, FC_CHARSET, 0, &charset) != FcResultMatch) + charset = FcFreeTypeCharSet (face, FcConfigGetBlanks (0)); - gs->file = file; - gs->minspace = minspace; - gs->char_width = char_width; - - font = &gs->font; + antialias = fi->antialias; + if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) + antialias = FcFalse; - if (antialias) + /* + * Find the appropriate picture format + */ + if (fi->render) { - if (rgba) + if (antialias) { - pf.depth = 32; - pf.type = PictTypeDirect; - pf.direct.alpha = 24; - pf.direct.alphaMask = 0xff; - pf.direct.red = 16; - pf.direct.redMask = 0xff; - pf.direct.green = 8; - pf.direct.greenMask = 0xff; - pf.direct.blue = 0; - pf.direct.blueMask = 0xff; - format = XRenderFindFormat(dpy, - PictFormatType| - PictFormatDepth| - PictFormatAlpha| - PictFormatAlphaMask| - PictFormatRed| - PictFormatRedMask| - PictFormatGreen| - PictFormatGreenMask| - PictFormatBlue| - PictFormatBlueMask, - &pf, 0); + switch (fi->rgba) { + case FC_RGBA_RGB: + case FC_RGBA_BGR: + case FC_RGBA_VRGB: + case FC_RGBA_VBGR: + pf.depth = 32; + pf.type = PictTypeDirect; + pf.direct.alpha = 24; + pf.direct.alphaMask = 0xff; + pf.direct.red = 16; + pf.direct.redMask = 0xff; + pf.direct.green = 8; + pf.direct.greenMask = 0xff; + pf.direct.blue = 0; + pf.direct.blueMask = 0xff; + format = XRenderFindFormat(dpy, + PictFormatType| + PictFormatDepth| + PictFormatAlpha| + PictFormatAlphaMask| + PictFormatRed| + PictFormatRedMask| + PictFormatGreen| + PictFormatGreenMask| + PictFormatBlue| + PictFormatBlueMask, + &pf, 0); + break; + default: + pf.depth = 8; + pf.type = PictTypeDirect; + pf.direct.alpha = 0; + pf.direct.alphaMask = 0xff; + format = XRenderFindFormat(dpy, + PictFormatType| + PictFormatDepth| + PictFormatAlpha| + PictFormatAlphaMask, + &pf, 0); + break; + } } else { - pf.depth = 8; + pf.depth = 1; pf.type = PictTypeDirect; pf.direct.alpha = 0; - pf.direct.alphaMask = 0xff; + pf.direct.alphaMask = 0x1; format = XRenderFindFormat(dpy, PictFormatType| PictFormatDepth| @@ -535,148 +749,300 @@ PictFormatAlphaMask, &pf, 0); } + + if (!format) + goto bail0; } else - { - pf.depth = 1; - pf.type = PictTypeDirect; - pf.direct.alpha = 0; - pf.direct.alphaMask = 0x1; - format = XRenderFindFormat(dpy, - PictFormatType| - PictFormatDepth| - PictFormatAlpha| - PictFormatAlphaMask, - &pf, 0); - } - - if (!format) - goto bail2; - - if (!XftFreeTypeSetFace (face, size, charmap, &matrix)) - goto bail2; - - descent = -(face->size->metrics.descender >> 6); - ascent = face->size->metrics.ascender >> 6; - if (minspace) + format = 0; + + if (charset) { - height = ascent + descent; + num_unicode = FcCharSetCount (charset); + hash_value = _XftHashSize (num_unicode); + rehash_value = hash_value - 2; } else { - height = face->size->metrics.height >> 6; -#if 0 - extra = (height - (ascent + descent)); - if (extra > 0) + num_unicode = 0; + hash_value = 0; + rehash_value = 0; + } + + alloc_size = (sizeof (XftFontInt) + + face->num_glyphs * sizeof (XftGlyph *) + + hash_value * sizeof (XftUcsHash)); + font = malloc (alloc_size); + + if (!font) + goto bail1; + + XftMemAlloc (XFT_MEM_FONT, alloc_size); + + /* + * Public fields + */ + if (fi->transform) + { + FT_Vector vector; + + vector.x = 0; + vector.y = face->size->metrics.descender; + FT_Vector_Transform (&vector, &fi->matrix); + descent = -(vector.y >> 6); + + vector.x = 0; + vector.y = face->size->metrics.ascender; + FT_Vector_Transform (&vector, &fi->matrix); + ascent = vector.y >> 6; + + if (fi->minspace) + height = ascent + descent; + else { - ascent = ascent + extra / 2; - descent = height - ascent; + vector.x = 0; + vector.y = face->size->metrics.height; + FT_Vector_Transform (&vector, &fi->matrix); + height = vector.y >> 6; } - else if (extra < 0) + } + else + { + descent = -(face->size->metrics.descender >> 6); + ascent = face->size->metrics.ascender >> 6; + if (fi->minspace) height = ascent + descent; -#endif + else + height = face->size->metrics.height >> 6; } - font->ascent = ascent; - font->descent = descent; - font->height = height; + font->public.ascent = ascent; + font->public.descent = descent; + font->public.height = height; - if (char_width) - font->max_advance_width = char_width; + if (fi->char_width) + font->public.max_advance_width = fi->char_width; else - font->max_advance_width = face->size->metrics.max_advance >> 6; - - gs->next = info->glyphSets; - info->glyphSets = gs; + { + if (fi->transform) + { + FT_Vector vector; + vector.x = face->size->metrics.max_advance; + vector.y = 0; + FT_Vector_Transform (&vector, &fi->matrix); + font->public.max_advance_width = vector.x >> 6; + } + else + font->public.max_advance_width = face->size->metrics.max_advance >> 6; + } + font->public.charset = charset; + font->public.pattern = pattern; - font->glyphset = XRenderCreateGlyphSet (dpy, format); + /* + * Management fields + */ + font->ref = 1; - font->size = size; - font->spacing = spacing; + font->next = info->fonts; + info->fonts = &font->public; + + font->hash_next = *bucket; + *bucket = &font->public; + + /* + * Copy the info over + */ + font->info = *fi; + /* + * reset the antialias field. It can't + * be set correctly until the font is opened, + * which doesn't happen in XftFontInfoFill + */ + font->info.antialias = antialias; + /* + * bump XftFile reference count + */ + font->info.file->ref++; + + /* + * Per glyph information + */ + font->glyphs = (XftGlyph **) (font + 1); + memset (font->glyphs, '\0', face->num_glyphs * sizeof (XftGlyph *)); + font->num_glyphs = face->num_glyphs; + /* + * Unicode hash table information + */ + font->hash_table = (XftUcsHash *) (font->glyphs + font->num_glyphs); + for (i = 0; i < hash_value; i++) + { + font->hash_table[i].ucs4 = ((FcChar32) ~0); + font->hash_table[i].glyph = 0; + } + font->hash_value = hash_value; + font->rehash_value = rehash_value; + /* + * X specific fields + */ + font->glyphset = 0; font->format = format; - font->realized =0; - font->nrealized = 0; - font->rgba = rgba; - font->antialias = antialias; - font->charmap = charmap; - font->transform = (matrix.xx != 0x10000 || matrix.xy != 0 || - matrix.yx != 0 || matrix.yy != 0x10000); - font->matrix = matrix; - font->face = face; + + /* + * Glyph memory management fields + */ + font->glyph_memory = 0; + font->max_glyph_memory = max_glyph_memory; + font->use_free_glyphs = info->use_free_glyphs; + + _XftUnlockFile (fi->file); - return font; + return &font->public; -bail2: - free (gs); bail1: - _XftFreeTypeCloseFile (file); + _XftUnlockFile (fi->file); bail0: return 0; } +XftFont * +XftFontOpenPattern (Display *dpy, FcPattern *pattern) +{ + XftFontInfo info; + XftFont *font; + + if (!XftFontInfoFill (dpy, pattern, &info)) + return 0; + + font = XftFontOpenInfo (dpy, pattern, &info); + XftFontInfoEmpty (dpy, &info); + return font; +} + +XftFont * +XftFontCopy (Display *dpy, XftFont *public) +{ + XftFontInt *font = (XftFontInt *) public; + + font->ref++; + return public; +} + +static void +XftFontDestroy (Display *dpy, XftFont *public) +{ + XftFontInt *font = (XftFontInt *) public; + int i; + + /* Clean up the info */ + XftFontInfoEmpty (dpy, &font->info); + /* Free the glyphset */ + if (font->glyphset) + XRenderFreeGlyphSet (dpy, font->glyphset); + /* Free the glyphs */ + for (i = 0; i < font->num_glyphs; i++) + { + XftGlyph *xftg = font->glyphs[i]; + if (xftg) + { + if (xftg->bitmap) + free (xftg->bitmap); + free (xftg); + } + } + + /* Finally, free the font structure */ + XftMemFree (XFT_MEM_FONT, sizeof (XftFontInt) + + font->num_glyphs * sizeof (XftGlyph *) + + font->hash_value * sizeof (XftUcsHash)); + free (font); +} + +static XftFont * +XftFontFindNthUnref (XftDisplayInfo *info, int n) +{ + XftFont *public; + XftFontInt *font; + + for (public = info->fonts; public; public = font->next) + { + font = (XftFontInt*) public; + if (!font->ref && !n--) + break; + } + return public; +} + void -XftFreeTypeClose (Display *dpy, XftFontStruct *font) +XftFontManageMemory (Display *dpy) { - XftFtGlyphSet *gs, **prev; - XftDisplayInfo *info = _XftDisplayInfoGet (dpy); + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, False); + XftFont **prev; + XftFont *public; + XftFontInt *font; - for (prev = &info->glyphSets; (gs = *prev); prev = &gs->next) + if (!info) + return; + while (info->num_unref_fonts > info->max_unref_fonts) { - if (&gs->font == font) + public = XftFontFindNthUnref (info, rand() % info->num_unref_fonts); + font = (XftFontInt *) public; + + if (XftDebug () & XFT_DBG_CACHE) + printf ("freeing unreferenced font %s/%d size %dx%d\n", + font->info.file->file, font->info.file->id, + (int) font->info.xsize >> 6, (int) font->info.ysize >> 6); + + /* Unhook from display list */ + for (prev = &info->fonts; *prev; prev = &(*(XftFontInt **) prev)->next) { - if (--gs->ref == 0) + if (*prev == public) { - XRenderFreeGlyphSet (dpy, font->glyphset); - if (font->realized) - free (font->realized); - - _XftFreeTypeCloseFile (gs->file); - - *prev = gs->next; - free (gs); + *prev = font->next; + break; } - break; } + /* Unhook from hash list */ + for (prev = &info->fontHash[font->info.hash % XFT_NUM_FONT_HASH]; + *prev; + prev = &(*(XftFontInt **) prev)->hash_next) + { + if (*prev == public) + { + *prev = font->hash_next; + break; + } + } + /* Destroy the font */ + XftFontDestroy (dpy, public); + --info->num_unref_fonts; } } - -XftFontStruct * -XftFreeTypeGet (XftFont *font) + +void +XftFontClose (Display *dpy, XftFont *public) { - if (font->core) - return 0; - return font->u.ft.font; + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, False); + XftFontInt *font = (XftFontInt *) public; + + if (--font->ref != 0) + return; + + if (info) + { + ++info->num_unref_fonts; + XftFontManageMemory (dpy); + } + else + { + XftFontDestroy (dpy, public); + } } -/* #define XFT_DEBUG_FONTSET */ - -Bool +FcBool XftInitFtLibrary (void) { - char **d; - char *cache; - if (_XftFTlibrary) - return True; + return FcTrue; if (FT_Init_FreeType (&_XftFTlibrary)) - return False; - _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, False); - } -#ifdef XFT_DEBUG_FONTSET - XftFontSetPrint (_XftFontSet); -#endif - if (cache) - XftFileCacheSave (cache); - XftFileCacheDispose (); - return True; + return FcFalse; + return FcTrue; } Index: xc/lib/Xft/xftfs.c diff -u xc/lib/Xft/xftfs.c:1.1 xc/lib/Xft/xftfs.c:removed --- xc/lib/Xft/xftfs.c:1.1 Wed Nov 29 03:39:22 2000 +++ xc/lib/Xft/xftfs.c Thu Feb 27 12:27:23 2003 @@ -1,74 +0,0 @@ -/* - * $XFree86: xc/lib/Xft/xftfs.c,v 1.1 2000/11/29 08:39:22 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 "xftint.h" - -XftFontSet * -XftFontSetCreate (void) -{ - XftFontSet *s; - - s = (XftFontSet *) malloc (sizeof (XftFontSet)); - if (!s) - return 0; - s->nfont = 0; - s->sfont = 0; - s->fonts = 0; - return s; -} - -void -XftFontSetDestroy (XftFontSet *s) -{ - int i; - - for (i = 0; i < s->nfont; i++) - XftPatternDestroy (s->fonts[i]); - if (s->fonts) - free (s->fonts); - free (s); -} - -Bool -XftFontSetAdd (XftFontSet *s, XftPattern *font) -{ - XftPattern **f; - int sfont; - - if (s->nfont == s->sfont) - { - sfont = s->sfont + 32; - if (s->fonts) - f = (XftPattern **) realloc (s->fonts, sfont * sizeof (XftPattern *)); - else - f = (XftPattern **) malloc (sfont * sizeof (XftPattern *)); - if (!f) - return False; - s->sfont = sfont; - s->fonts = f; - } - s->fonts[s->nfont++] = font; - return True; -} Index: xc/lib/Xft/xftglyphs.c diff -u xc/lib/Xft/xftglyphs.c:1.14 xc/lib/Xft/xftglyphs.c:1.23 --- xc/lib/Xft/xftglyphs.c:1.14 Sat Nov 17 03:22:45 2001 +++ xc/lib/Xft/xftglyphs.c Fri Oct 11 13:53:02 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.14 2001/11/17 08:22:45 keithp Exp $ + * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.23 2002/10/11 17:53:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -27,6 +27,7 @@ #include #include "xftint.h" #include +#include static const int filters[3][3] = { /* red */ @@ -44,23 +45,48 @@ { 65538*1/13,65538*3/13,65538*9/13 }, }; -#define _UntestedGlyph ((XGlyphInfo *) 1) +/* + * Validate the memory info for a font + */ + +static void +_XftFontValidateMemory (Display *dpy, XftFont *public) +{ + XftFontInt *font = (XftFontInt *) public; + unsigned long glyph_memory; + FT_UInt glyphindex; + XftGlyph *xftg; + + glyph_memory = 0; + for (glyphindex = 0; glyphindex < font->num_glyphs; glyphindex++) + { + xftg = font->glyphs[glyphindex]; + if (xftg) + { + glyph_memory += xftg->glyph_memory; + } + } + if (glyph_memory != font->glyph_memory) + printf ("Font glyph cache incorrect has %ld bytes, should have %ld\n", + font->glyph_memory, glyph_memory); +} void -XftGlyphLoad (Display *dpy, - XftFontStruct *font, - XftChar32 *glyphs, - int nglyph) +XftFontLoadGlyphs (Display *dpy, + XftFont *pub, + FcBool need_bitmaps, + _Xconst FT_UInt *glyphs, + int nglyph) { + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, True); + XftFontInt *font = (XftFontInt *) pub; FT_Error error; - FT_ULong charcode; FT_UInt glyphindex; - FT_GlyphSlot glyph; - XGlyphInfo *gi; - Glyph g; + FT_GlyphSlot glyphslot; + XftGlyph *xftg; + Glyph glyph; unsigned char bufLocal[4096]; unsigned char *bufBitmap = bufLocal; - unsigned char *b; int bufSize = sizeof (bufLocal); int size, pitch; unsigned char bufLocalRgba[4096]; @@ -69,7 +95,6 @@ int sizergba, pitchrgba, widthrgba; int width; int height; - int i; int left, right, top, bottom; int hmul = 1; int vmul = 1; @@ -77,24 +102,30 @@ FT_Matrix matrix; FT_Vector vector; Bool subpixel = False; + FT_Face face; + + if (!info) + return; - if (!XftFreeTypeSetFace (font->face, font->size, font->charmap, &font->matrix)) - return ; + face = XftLockFace (&font->public); + + if (!face) + return; matrix.xx = matrix.yy = 0x10000L; matrix.xy = matrix.yx = 0; - if (font->antialias) + if (font->info.antialias) { - switch (font->rgba) { - case XFT_RGBA_RGB: - case XFT_RGBA_BGR: + switch (font->info.rgba) { + case FC_RGBA_RGB: + case FC_RGBA_BGR: matrix.xx *= 3; subpixel = True; hmul = 3; break; - case XFT_RGBA_VRGB: - case XFT_RGBA_VBGR: + case FC_RGBA_VRGB: + case FC_RGBA_VBGR: matrix.yy *= 3; vmul = 3; subpixel = True; @@ -104,38 +135,48 @@ while (nglyph--) { - charcode = (FT_ULong) *glyphs++; - gi = font->realized[charcode]; - if (!gi) + glyphindex = *glyphs++; + xftg = font->glyphs[glyphindex]; + if (!xftg) + continue; + + if (XftDebug() & XFT_DBG_CACHE) + _XftFontValidateMemory (dpy, pub); + /* + * Check to see if this glyph has just been loaded, + * this happens when drawing the same glyph twice + * in a single string + */ + if (xftg->glyph_memory) continue; - if (font->charmap != -1) + error = FT_Load_Glyph (face, glyphindex, font->info.load_flags); + if (error) { - 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); + /* + * If anti-aliasing or transforming glyphs and + * no outline version exists, fallback to the + * bitmap and let things look bad instead of + * missing the glyph + */ + if (font->info.load_flags & FT_LOAD_NO_BITMAP) + error = FT_Load_Glyph (face, glyphindex, + font->info.load_flags & ~FT_LOAD_NO_BITMAP); + if (error) continue; - } -#endif } - else - glyphindex = (FT_UInt) charcode; - error = FT_Load_Glyph (font->face, glyphindex, FT_LOAD_NO_BITMAP); - if (error) - continue; #define FLOOR(x) ((x) & -64) #define CEIL(x) (((x)+63) & -64) #define TRUNC(x) ((x) >> 6) #define ROUND(x) (((x)+32) & -64) - glyph = font->face->glyph; + glyphslot = face->glyph; - if(font->transform) + /* + * Compute glyph metrics from FreeType information + */ + if(font->info.transform && glyphslot->format != ft_glyph_format_bitmap) { /* * calculate the true width by transforming all four corners. @@ -144,10 +185,10 @@ 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) + vector.x = glyphslot->metrics.horiBearingX + xc * glyphslot->metrics.width; + vector.y = glyphslot->metrics.horiBearingY - yc * glyphslot->metrics.height; + FT_Vector_Transform(&vector, &font->info.matrix); + if (XftDebug() & 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) { @@ -168,60 +209,132 @@ top = CEIL(top); } else { - left = FLOOR( glyph->metrics.horiBearingX ); - right = CEIL( glyph->metrics.horiBearingX + glyph->metrics.width ); + left = FLOOR( glyphslot->metrics.horiBearingX ); + right = CEIL( glyphslot->metrics.horiBearingX + glyphslot->metrics.width ); - top = CEIL( glyph->metrics.horiBearingY ); - bottom = FLOOR( glyph->metrics.horiBearingY - glyph->metrics.height ); + top = CEIL( glyphslot->metrics.horiBearingY ); + bottom = FLOOR( glyphslot->metrics.horiBearingY - glyphslot->metrics.height ); } width = TRUNC(right - left); height = TRUNC( top - bottom ); - /* * Try to keep monospace fonts ink-inside * XXX transformed? */ - if (font->spacing != XFT_PROPORTIONAL && !font->transform) + if (font->info.spacing != FC_PROPORTIONAL && !font->info.transform) { - if (TRUNC(right) > font->max_advance_width) + if (font->info.load_flags & FT_LOAD_VERTICAL_LAYOUT) { - int adjust; - - adjust = right - (font->max_advance_width << 6); - if (adjust > left) - adjust = left; - left -= adjust; - right -= adjust; - width = font->max_advance_width; + if (TRUNC(bottom) > font->public.max_advance_width) + { + int adjust; + + adjust = bottom - (font->public.max_advance_width << 6); + if (adjust > top) + adjust = top; + top -= adjust; + bottom -= adjust; + height = font->public.max_advance_width; + } + } + else + { + if (TRUNC(right) > font->public.max_advance_width) + { + int adjust; + + adjust = right - (font->public.max_advance_width << 6); + if (adjust > left) + adjust = left; + left -= adjust; + right -= adjust; + width = font->public.max_advance_width; + } } } + + if (font->info.antialias) + pitch = (width * hmul + 3) & ~3; + else + pitch = ((width + 31) & ~31) >> 3; + + size = pitch * height * vmul; + + xftg->metrics.width = width; + xftg->metrics.height = height; + xftg->metrics.x = -TRUNC(left); + xftg->metrics.y = TRUNC(top); - if ( glyph->format == ft_glyph_format_outline ) + if (font->info.spacing != FC_PROPORTIONAL) { - if (font->antialias) - pitch = (width * hmul + 3) & ~3; + if (font->info.transform) + { + if (font->info.load_flags & FT_LOAD_VERTICAL_LAYOUT) + { + vector.x = 0; + vector.y = -face->size->metrics.max_advance; + } + else + { + vector.x = face->size->metrics.max_advance; + vector.y = 0; + } + FT_Vector_Transform (&vector, &font->info.matrix); + xftg->metrics.xOff = vector.x >> 6; + xftg->metrics.yOff = -(vector.y >> 6); + } else - pitch = ((width + 31) & ~31) >> 3; - - size = pitch * height * vmul; - - if (size > bufSize) { - if (bufBitmap != bufLocal) - free (bufBitmap); - bufBitmap = (unsigned char *) malloc (size); - if (!bufBitmap) - continue; - bufSize = size; + if (font->info.load_flags & FT_LOAD_VERTICAL_LAYOUT) + { + xftg->metrics.xOff = 0; + xftg->metrics.yOff = -font->public.max_advance_width; + } + else + { + xftg->metrics.xOff = font->public.max_advance_width; + xftg->metrics.yOff = 0; + } } - memset (bufBitmap, 0, size); + } + else + { + xftg->metrics.xOff = TRUNC(ROUND(glyphslot->advance.x)); + xftg->metrics.yOff = -TRUNC(ROUND(glyphslot->advance.y)); + } + + /* + * If the glyph is relatively large (> 1% of server memory), + * don't send it until necessary + */ + if (!need_bitmaps && size > info->max_glyph_memory / 100) + continue; + + /* + * Make sure there's enough buffer space for the glyph + */ + if (size > bufSize) + { + if (bufBitmap != bufLocal) + free (bufBitmap); + bufBitmap = (unsigned char *) malloc (size); + if (!bufBitmap) + continue; + bufSize = size; + } + memset (bufBitmap, 0, size); + /* + * Rasterize into the local buffer + */ + switch (glyphslot->format) { + case ft_glyph_format_outline: ftbit.width = width * hmul; ftbit.rows = height * vmul; ftbit.pitch = pitch; - if (font->antialias) + if (font->info.antialias) ftbit.pixel_mode = ft_pixel_mode_grays; else ftbit.pixel_mode = ft_pixel_mode_mono; @@ -229,109 +342,114 @@ ftbit.buffer = bufBitmap; if (subpixel) - FT_Outline_Transform (&glyph->outline, &matrix); + FT_Outline_Transform (&glyphslot->outline, &matrix); - FT_Outline_Translate ( &glyph->outline, -left*hmul, -bottom*vmul ); + FT_Outline_Translate ( &glyphslot->outline, -left*hmul, -bottom*vmul ); - FT_Outline_Get_Bitmap( _XftFTlibrary, &glyph->outline, &ftbit ); - i = size; - b = (unsigned char *) bufBitmap; - /* - * swap bit order around - */ - if (!font->antialias) + FT_Outline_Get_Bitmap( _XftFTlibrary, &glyphslot->outline, &ftbit ); + break; + case ft_glyph_format_bitmap: + if (font->info.antialias) { - if (BitmapBitOrder (dpy) != MSBFirst) + unsigned char *srcLine, *dstLine; + int height; + int x; + int h, v; + + srcLine = glyphslot->bitmap.buffer; + dstLine = bufBitmap; + height = glyphslot->bitmap.rows; + while (height--) { - unsigned char *line; - unsigned char c; - int i; - - line = (unsigned char *) bufBitmap; - i = size; - while (i--) + for (x = 0; x < glyphslot->bitmap.width; x++) { - c = *line; - c = ((c << 1) & 0xaa) | ((c >> 1) & 0x55); - c = ((c << 2) & 0xcc) | ((c >> 2) & 0x33); - c = ((c << 4) & 0xf0) | ((c >> 4) & 0x0f); - *line++ = c; + /* always MSB bitmaps */ + unsigned char a = ((srcLine[x >> 3] & (0x80 >> (x & 7))) ? + 0xff : 0x00); + if (subpixel) + { + for (v = 0; v < vmul; v++) + for (h = 0; h < hmul; h++) + dstLine[v * pitch + x*hmul + h] = a; + } + else + dstLine[x] = a; } + dstLine += pitch * vmul; + srcLine += glyphslot->bitmap.pitch; } } - if (_XftFontDebug() & XFT_DBG_GLYPH) + else { - 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) - { - int x, y; - unsigned char *line; + unsigned char *srcLine, *dstLine; + int h, bytes; - line = bufBitmap; - for (y = 0; y < height * vmul; y++) - { - if (font->antialias) - { - 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"); + srcLine = glyphslot->bitmap.buffer; + dstLine = bufBitmap; + h = glyphslot->bitmap.rows; + bytes = (glyphslot->bitmap.width + 7) >> 3; + while (h--) + { + memcpy (dstLine, srcLine, bytes); + dstLine += pitch; + srcLine += glyphslot->bitmap.pitch; } } - } - else - { - if (_XftFontDebug() & XFT_DBG_GLYPH) - printf ("glyph (%c) %d no outline\n", - (int) charcode, (int) charcode); + break; + default: + if (XftDebug() & XFT_DBG_GLYPH) + printf ("glyph %d is not in a usable format\n", + (int) glyphindex); continue; } - gi->width = width; - gi->height = height; - gi->x = -TRUNC(left); - gi->y = TRUNC(top); - 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 + if (XftDebug() & XFT_DBG_GLYPH) + { + printf ("glyph %d:\n", (int) glyphindex); + printf (" xywh (%d %d %d %d), trans (%d %d %d %d) wh (%d %d)\n", + (int) glyphslot->metrics.horiBearingX, + (int) glyphslot->metrics.horiBearingY, + (int) glyphslot->metrics.width, + (int) glyphslot->metrics.height, + left, right, top, bottom, + width, height); + if (XftDebug() & XFT_DBG_GLYPHV) { - gi->xOff = font->max_advance_width; - gi->yOff = 0; + int x, y; + unsigned char *line; + + line = bufBitmap; + for (y = 0; y < height * vmul; y++) + { + if (font->info.antialias) + { + 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"); } } - else - { - gi->xOff = TRUNC(ROUND(glyph->advance.x)); - gi->yOff = -TRUNC(ROUND(glyph->advance.y)); - } - g = charcode; + /* + * Use the glyph index as the wire encoding; it + * might be more efficient for some locales to map + * these by first usage to smaller values, but that + * would require persistently storing the map when + * glyphs were freed. + */ + glyph = (Glyph) glyphindex; + if (subpixel) { int x, y; @@ -342,23 +460,26 @@ int s; int o, os; + /* + * Filter the glyph to soften the color fringes + */ widthrgba = width; pitchrgba = (widthrgba * 4 + 3) & ~3; sizergba = pitchrgba * height; os = 1; - switch (font->rgba) { - case XFT_RGBA_VRGB: + switch (font->info.rgba) { + case FC_RGBA_VRGB: os = pitch; - case XFT_RGBA_RGB: + case FC_RGBA_RGB: default: rf = 0; gf = 1; bf = 2; break; - case XFT_RGBA_VBGR: + case FC_RGBA_VBGR: os = pitch; - case XFT_RGBA_BGR: + case FC_RGBA_BGR: bf = 0; gf = 1; rf = 2; @@ -400,96 +521,292 @@ } } - XRenderAddGlyphs (dpy, font->glyphset, &g, gi, 1, - (char *) bufBitmapRgba, sizergba); + xftg->glyph_memory = sizergba + sizeof (XftGlyph); + if (font->format) + { + if (!font->glyphset) + font->glyphset = XRenderCreateGlyphSet (dpy, font->format); + if (ImageByteOrder (dpy) != XftNativeByteOrder ()) + XftSwapCARD32 ((CARD32 *) bufBitmapRgba, sizergba >> 2); + XRenderAddGlyphs (dpy, font->glyphset, &glyph, + &xftg->metrics, 1, + (char *) bufBitmapRgba, sizergba); + } + else + { + xftg->bitmap = malloc (sizergba); + if (xftg->bitmap) + memcpy (xftg->bitmap, bufBitmapRgba, sizergba); + } } else { - XRenderAddGlyphs (dpy, font->glyphset, &g, gi, 1, - (char *) bufBitmap, size); + xftg->glyph_memory = size + sizeof (XftGlyph); + if (font->format) + { + /* + * swap bit order around; FreeType is always MSBFirst + */ + if (!font->info.antialias) + { + if (BitmapBitOrder (dpy) != MSBFirst) + { + unsigned char *line; + unsigned char c; + int i; + + line = (unsigned char *) bufBitmap; + i = size; + while (i--) + { + c = *line; + c = ((c << 1) & 0xaa) | ((c >> 1) & 0x55); + c = ((c << 2) & 0xcc) | ((c >> 2) & 0x33); + c = ((c << 4) & 0xf0) | ((c >> 4) & 0x0f); + *line++ = c; + } + } + } + if (!font->glyphset) + font->glyphset = XRenderCreateGlyphSet (dpy, font->format); + XRenderAddGlyphs (dpy, font->glyphset, &glyph, + &xftg->metrics, 1, + (char *) bufBitmap, size); + } + else + { + xftg->bitmap = malloc (size); + if (xftg->bitmap) + memcpy (xftg->bitmap, bufBitmap, size); + } } + font->glyph_memory += xftg->glyph_memory; + info->glyph_memory += xftg->glyph_memory; + if (XftDebug() & XFT_DBG_CACHE) + _XftFontValidateMemory (dpy, pub); + if (XftDebug() & XFT_DBG_CACHEV) + printf ("Caching glyph 0x%x size %ld\n", glyphindex, + xftg->glyph_memory); } if (bufBitmap != bufLocal) free (bufBitmap); if (bufBitmapRgba != bufLocalRgba) free (bufBitmapRgba); + XftUnlockFace (&font->public); +} + +void +XftFontUnloadGlyphs (Display *dpy, + XftFont *pub, + _Xconst FT_UInt *glyphs, + int nglyph) +{ + XftDisplayInfo *info = _XftDisplayInfoGet (dpy, False); + XftFontInt *font = (XftFontInt *) pub; + XftGlyph *xftg; + FT_UInt glyphindex; + Glyph glyphBuf[1024]; + int nused; + + nused = 0; + while (nglyph--) + { + glyphindex = *glyphs++; + xftg = font->glyphs[glyphindex]; + if (!xftg) + continue; + if (xftg->glyph_memory) + { + if (font->format) + { + if (font->glyphset) + { + glyphBuf[nused++] = (Glyph) glyphindex; + if (nused == sizeof (glyphBuf) / sizeof (glyphBuf[0])) + { + XRenderFreeGlyphs (dpy, font->glyphset, glyphBuf, nused); + nused = 0; + } + } + } + else + { + if (xftg->bitmap) + free (xftg->bitmap); + } + font->glyph_memory -= xftg->glyph_memory; + if (info) + info->glyph_memory -= xftg->glyph_memory; + } + free (xftg); + XftMemFree (XFT_MEM_GLYPH, sizeof (XftGlyph)); + font->glyphs[glyphindex] = 0; + } + if (font->glyphset && nused) + XRenderFreeGlyphs (dpy, font->glyphset, glyphBuf, nused); +} + +FcBool +XftFontCheckGlyph (Display *dpy, + XftFont *pub, + FcBool need_bitmaps, + FT_UInt glyph, + FT_UInt *missing, + int *nmissing) +{ + XftFontInt *font = (XftFontInt *) pub; + XftGlyph *xftg; + int n; + + if (glyph >= font->num_glyphs) + return FcFalse; + xftg = font->glyphs[glyph]; + if (!xftg || (need_bitmaps && !xftg->glyph_memory)) + { + if (!xftg) + { + xftg = (XftGlyph *) malloc (sizeof (XftGlyph)); + if (!xftg) + return FcFalse; + XftMemAlloc (XFT_MEM_GLYPH, sizeof (XftGlyph)); + xftg->bitmap = 0; + xftg->glyph_memory = 0; + font->glyphs[glyph] = xftg; + } + n = *nmissing; + missing[n++] = glyph; + if (n == XFT_NMISSING) + { + XftFontLoadGlyphs (dpy, pub, need_bitmaps, missing, n); + n = 0; + } + *nmissing = n; + return FcTrue; + } + else + return FcFalse; } -#define STEP 256 +FcBool +XftCharExists (Display *dpy, + XftFont *pub, + FcChar32 ucs4) +{ + if (pub->charset) + return FcCharSetHasChar (pub->charset, ucs4); + return FcFalse; +} -/* - * 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) +#define Missing ((FT_UInt) ~0) + +FT_UInt +XftCharIndex (Display *dpy, + XftFont *pub, + FcChar32 ucs4) { - if (font->charmap != -1) + XftFontInt *font = (XftFontInt *) pub; + FcChar32 ent, offset; + FT_Face face; + + if (!font->hash_value) + return 0; + + ent = ucs4 % font->hash_value; + offset = 0; + while (font->hash_table[ent].ucs4 != ucs4) { - FT_Set_Charmap (font->face, font->face->charmaps[font->charmap]); - glyph = (XftChar32) FT_Get_Char_Index (font->face, (FT_ULong) glyph); + if (font->hash_table[ent].ucs4 == (FcChar32) ~0) + { + if (!XftCharExists (dpy, pub, ucs4)) + return 0; + face = XftLockFace (pub); + if (!face) + return 0; + font->hash_table[ent].ucs4 = ucs4; + font->hash_table[ent].glyph = FcFreeTypeCharIndex (face, ucs4); + XftUnlockFace (pub); + break; + } + if (!offset) + { + offset = ucs4 % font->rehash_value; + if (!offset) + offset = 1; + } + ent = ent + offset; + if (ent > font->hash_value) + ent -= font->hash_value; } - return glyph <= font->face->num_glyphs; + return font->hash_table[ent].glyph; } - + +/* + * Pick a random glyph from the font and remove it from the cache + */ void -XftGlyphCheck (Display *dpy, - XftFontStruct *font, - XftChar32 glyph, - XftChar32 *missing, - int *nmissing) +_XftFontUncacheGlyph (Display *dpy, XftFont *pub) { - XGlyphInfo **realized; - int nrealized; - int n; + XftFontInt *font = (XftFontInt *) pub; + unsigned long glyph_memory; + FT_UInt glyphindex; + XftGlyph *xftg; - if (glyph >= font->nrealized) + if (!font->glyph_memory) + return; + if (font->use_free_glyphs) { - nrealized = glyph + STEP; - - if (font->realized) - realized = (XGlyphInfo **) realloc ((void *) font->realized, - nrealized * sizeof (XGlyphInfo *)); - else - realized = (XGlyphInfo **) malloc (nrealized * sizeof (XGlyphInfo *)); - if (!realized) - return; - for (n = font->nrealized; n < nrealized; n++) - realized[n] = _UntestedGlyph; - - font->realized = realized; - font->nrealized = nrealized; + glyph_memory = rand() % font->glyph_memory; } - if (font->realized[glyph] == _UntestedGlyph) + else { - if (XftGlyphDrawable (dpy, font, glyph)) + if (font->glyphset) { - font->realized[glyph] = (XGlyphInfo *) malloc (sizeof (XGlyphInfo)); - n = *nmissing; - missing[n++] = glyph; - if (n == XFT_NMISSING) + XRenderFreeGlyphSet (dpy, font->glyphset); + font->glyphset = 0; + } + glyph_memory = 0; + } + + if (XftDebug() & XFT_DBG_CACHE) + _XftFontValidateMemory (dpy, pub); + for (glyphindex = 0; glyphindex < font->num_glyphs; glyphindex++) + { + xftg = font->glyphs[glyphindex]; + if (xftg) + { + if (xftg->glyph_memory > glyph_memory) { - XftGlyphLoad (dpy, font, missing, n); - n = 0; + if (XftDebug() & XFT_DBG_CACHEV) + printf ("Uncaching glyph 0x%x size %ld\n", + glyphindex, xftg->glyph_memory); + XftFontUnloadGlyphs (dpy, pub, &glyphindex, 1); + if (!font->use_free_glyphs) + continue; + break; } - *nmissing = n; + glyph_memory -= xftg->glyph_memory; } - else - font->realized[glyph] = 0; } + if (XftDebug() & XFT_DBG_CACHE) + _XftFontValidateMemory (dpy, pub); } -Bool -XftFreeTypeGlyphExists (Display *dpy, - XftFontStruct *font, - XftChar32 glyph) +void +_XftFontManageMemory (Display *dpy, XftFont *pub) { - if (font->charmap != -1) + XftFontInt *font = (XftFontInt *) pub; + + if (font->max_glyph_memory) { - FT_Set_Charmap (font->face, font->face->charmaps[font->charmap]); - glyph = (XftChar32) FT_Get_Char_Index (font->face, (FT_ULong) glyph); + if (XftDebug() & XFT_DBG_CACHE) + { + if (font->glyph_memory > font->max_glyph_memory) + printf ("Reduce memory for font 0x%lx from %ld to %ld\n", + font->glyphset ? font->glyphset : (unsigned long) font, + font->glyph_memory, font->max_glyph_memory); + } + while (font->glyph_memory > font->max_glyph_memory) + _XftFontUncacheGlyph (dpy, pub); } - return glyph && glyph <= font->face->num_glyphs; + _XftDisplayManageMemory (dpy); } Index: xc/lib/Xft/xftgram.y diff -u xc/lib/Xft/xftgram.y:1.5 xc/lib/Xft/xftgram.y:removed --- xc/lib/Xft/xftgram.y:1.5 Wed May 16 06:32:54 2001 +++ xc/lib/Xft/xftgram.y Thu Feb 27 12:27:23 2003 @@ -1,452 +0,0 @@ -/* - * $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. - * - * 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 "xftint.h" - -static XftMatrix matrix; - -%} - -%union { - int ival; - double dval; - char *sval; - XftExpr *eval; - XftPattern *pval; - XftValue vval; - XftEdit *Eval; - XftOp oval; - XftQual qval; - XftTest *tval; -} - -%token INTEGER -%token DOUBLE -%token STRING NAME -%token ANY ALL -%token DIR CACHE INCLUDE INCLUDEIF MATCH EDIT -%token TOK_TRUE TOK_FALSE TOK_NIL -%token EQUAL SEMI OS CS - -%type expr -%type value -%type field -%type edit -%type edits -%type eqop -%type qual -%type compare -%type tests test -%type number - -%right QUEST COLON -%left OROR -%left ANDAND -%left EQEQ NOTEQ -%left LESS LESSEQ MORE MOREEQ -%left PLUS MINUS -%left TIMES DIVIDE -%right NOT - -%% -configs : configs config - | - ; -config : DIR STRING - { XftConfigAddDir ($2); } - | CACHE STRING - { XftConfigSetCache ($2); } - | INCLUDE STRING - { XftConfigPushInput ($2, True); } - | INCLUDEIF STRING - { XftConfigPushInput ($2, False); } - | MATCH tests EDIT edits - { XftConfigAddEdit ($2, $4); } - ; -tests : test tests - { $1->next = $2; $$ = $1; } - | - { $$ = 0; } - ; -test : qual field compare value - { $$ = XftTestCreate ($1, $2, $3, $4); } - ; -qual : ANY - { $$ = XftQualAny; } - | ALL - { $$ = XftQualAll; } - | - { $$ = XftQualAny; } - ; -field : NAME - { - $$ = XftConfigSaveField ($1); - } - ; -compare : EQUAL - { $$ = XftOpEqual; } - | EQEQ - { $$ = XftOpEqual; } - | NOTEQ - { $$ = XftOpNotEqual; } - | LESS - { $$ = XftOpLess; } - | LESSEQ - { $$ = XftOpLessEqual; } - | MORE - { $$ = XftOpMore; } - | MOREEQ - { $$ = XftOpMoreEqual; } - ; -value : INTEGER - { - $$.type = XftTypeInteger; - $$.u.i = $1; - } - | DOUBLE - { - $$.type = XftTypeDouble; - $$.u.d = $1; - } - | STRING - { - $$.type = XftTypeString; - $$.u.s = $1; - } - | TOK_TRUE - { - $$.type = XftTypeBool; - $$.u.b = True; - } - | TOK_FALSE - { - $$.type = XftTypeBool; - $$.u.b = False; - } - | TOK_NIL - { - $$.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; } - | - { $$ = 0; } - ; -edit : field eqop expr SEMI - { $$ = XftEditCreate ($1, $2, $3); } - ; -eqop : EQUAL - { $$ = XftOpAssign; } - | PLUS EQUAL - { $$ = XftOpPrepend; } - | EQUAL PLUS - { $$ = XftOpAppend; } - ; -expr : INTEGER - { $$ = XftExprCreateInteger ($1); } - | DOUBLE - { $$ = XftExprCreateDouble ($1); } - | STRING - { $$ = XftExprCreateString ($1); } - | TOK_TRUE - { $$ = XftExprCreateBool (True); } - | TOK_FALSE - { $$ = XftExprCreateBool (False); } - | TOK_NIL - { $$ = XftExprCreateNil (); } - | matrix - { $$ = XftExprCreateMatrix (&matrix); } - | NAME - { $$ = XftExprCreateField ($1); } - | expr OROR expr - { $$ = XftExprCreateOp ($1, XftOpOr, $3); } - | expr ANDAND expr - { $$ = XftExprCreateOp ($1, XftOpAnd, $3); } - | expr EQEQ expr - { $$ = XftExprCreateOp ($1, XftOpEqual, $3); } - | expr NOTEQ expr - { $$ = XftExprCreateOp ($1, XftOpNotEqual, $3); } - | expr LESS expr - { $$ = XftExprCreateOp ($1, XftOpLess, $3); } - | expr LESSEQ expr - { $$ = XftExprCreateOp ($1, XftOpLessEqual, $3); } - | expr MORE expr - { $$ = XftExprCreateOp ($1, XftOpMore, $3); } - | expr MOREEQ expr - { $$ = XftExprCreateOp ($1, XftOpMoreEqual, $3); } - | expr PLUS expr - { $$ = XftExprCreateOp ($1, XftOpPlus, $3); } - | expr MINUS expr - { $$ = XftExprCreateOp ($1, XftOpMinus, $3); } - | expr TIMES expr - { $$ = XftExprCreateOp ($1, XftOpTimes, $3); } - | expr DIVIDE expr - { $$ = XftExprCreateOp ($1, XftOpDivide, $3); } - | NOT expr - { $$ = XftExprCreateOp ($2, XftOpNot, (XftExpr *) 0); } - | expr QUEST expr COLON expr - { $$ = XftExprCreateOp ($1, XftOpQuest, XftExprCreateOp ($3, XftOpQuest, $5)); } - ; -%% - -int -XftConfigwrap (void) -{ - return 1; -} - -void -XftConfigerror (char *fmt, ...) -{ - va_list args; - - fprintf (stderr, "\"%s\": line %d, ", XftConfigFile, XftConfigLineno); - va_start (args, fmt); - vfprintf (stderr, fmt, args); - va_end (args); - fprintf (stderr, "\n"); -} - -XftTest * -XftTestCreate (XftQual qual, const char *field, XftOp compare, XftValue value) -{ - XftTest *test = (XftTest *) malloc (sizeof (XftTest));; - - if (test) - { - test->next = 0; - test->qual = qual; - 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; -} - -XftExpr * -XftExprCreateInteger (int i) -{ - XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); - - if (e) - { - e->op = XftOpInteger; - e->u.ival = i; - } - return e; -} - -XftExpr * -XftExprCreateDouble (double d) -{ - XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); - - if (e) - { - e->op = XftOpDouble; - e->u.dval = d; - } - return e; -} - -XftExpr * -XftExprCreateString (const char *s) -{ - XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); - - if (e) - { - e->op = XftOpString; - e->u.sval = _XftSaveString (s); - } - return e; -} - -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)); - - if (e) - { - e->op = XftOpBool; - e->u.bval = b; - } - return e; -} - -XftExpr * -XftExprCreateNil (void) -{ - XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); - - if (e) - { - e->op = XftOpNil; - } - return e; -} - -XftExpr * -XftExprCreateField (const char *field) -{ - XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); - - if (e) - { - e->op = XftOpField; - e->u.field = _XftSaveString (field); - } - return e; -} - -XftExpr * -XftExprCreateOp (XftExpr *left, XftOp op, XftExpr *right) -{ - XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); - - if (e) - { - e->op = op; - e->u.tree.left = left; - e->u.tree.right = right; - } - return e; -} - -void -XftExprDestroy (XftExpr *e) -{ - switch (e->op) { - case XftOpInteger: - break; - case XftOpDouble: - break; - case XftOpString: - free (e->u.sval); - break; - case XftOpMatrix: - free (e->u.mval); - break; - case XftOpBool: - break; - case XftOpField: - free (e->u.field); - break; - case XftOpAssign: - case XftOpPrepend: - case XftOpAppend: - break; - case XftOpOr: - case XftOpAnd: - case XftOpEqual: - case XftOpNotEqual: - case XftOpLess: - case XftOpLessEqual: - case XftOpMore: - case XftOpMoreEqual: - case XftOpPlus: - case XftOpMinus: - case XftOpTimes: - case XftOpDivide: - case XftOpQuest: - XftExprDestroy (e->u.tree.right); - /* fall through */ - case XftOpNot: - XftExprDestroy (e->u.tree.left); - break; - case XftOpNil: - break; - } - free (e); -} - -XftEdit * -XftEditCreate (const char *field, XftOp op, XftExpr *expr) -{ - XftEdit *e = (XftEdit *) malloc (sizeof (XftEdit)); - - if (e) - { - e->next = 0; - e->field = field; /* already saved in grammar */ - e->op = op; - e->expr = expr; - } - return e; -} - -void -XftEditDestroy (XftEdit *e) -{ - if (e->next) - XftEditDestroy (e->next); - free ((void *) e->field); - if (e->expr) - XftExprDestroy (e->expr); -} - -char * -XftConfigSaveField (const char *field) -{ - return _XftSaveString (field); -} Index: xc/lib/Xft/xftinit.c diff -u xc/lib/Xft/xftinit.c:1.2 xc/lib/Xft/xftinit.c:1.5 --- xc/lib/Xft/xftinit.c:1.2 Fri Dec 15 12:12:53 2000 +++ xc/lib/Xft/xftinit.c Fri Oct 11 13:53:02 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftinit.c,v 1.2 2000/12/15 17:12:53 keithp Exp $ + * $XFree86: xc/lib/Xft/xftinit.c,v 1.5 2002/10/11 17:53:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -23,26 +23,96 @@ */ #include +#include #include "xftint.h" +#include -XftFontSet *_XftFontSet; Bool _XftConfigInitialized; Bool -XftInit (char *config) +XftInit (_Xconst char *config) { if (_XftConfigInitialized) return True; _XftConfigInitialized = True; - if (!config) + if (!FcInit ()) + return False; + _XftNameInit (); + return True; +} + +int +XftGetVersion (void) +{ + return XftVersion; +} + +static struct { + char *name; + int alloc_count; + int alloc_mem; + int free_count; + int free_mem; +} XftInUse[XFT_MEM_NUM] = { + { "XftDraw", 0, 0 }, + { "XftFont", 0 ,0 }, + { "XftFtFile", 0, 0 }, + { "XftGlyph", 0, 0 }, +}; + +static int XftAllocCount, XftAllocMem; +static int XftFreeCount, XftFreeMem; + +static int XftMemNotice = 1*1024*1024; + +static int XftAllocNotify, XftFreeNotify; + +void +XftMemReport (void) +{ + int i; + printf ("Xft Memory Usage:\n"); + printf ("\t Which Alloc Free\n"); + printf ("\t count bytes count bytes\n"); + for (i = 0; i < XFT_MEM_NUM; i++) + printf ("\t%8.8s%8d%8d%8d%8d\n", + XftInUse[i].name, + XftInUse[i].alloc_count, XftInUse[i].alloc_mem, + XftInUse[i].free_count, XftInUse[i].free_mem); + printf ("\t%8.8s%8d%8d%8d%8d\n", + "Total", + XftAllocCount, XftAllocMem, + XftFreeCount, XftFreeMem); + XftAllocNotify = 0; + XftFreeNotify = 0; +} + +void +XftMemAlloc (int kind, int size) +{ + if (XftDebug() & XFT_DBG_MEMORY) { - config = getenv ("XFT_CONFIG"); - if (!config) - config = XFT_DEFAULT_PATH; + XftInUse[kind].alloc_count++; + XftInUse[kind].alloc_mem += size; + XftAllocCount++; + XftAllocMem += size; + XftAllocNotify += size; + if (XftAllocNotify > XftMemNotice) + XftMemReport (); } - if (XftConfigLexFile (config)) +} + +void +XftMemFree (int kind, int size) +{ + if (XftDebug() & XFT_DBG_MEMORY) { - XftConfigparse (); + XftInUse[kind].free_count++; + XftInUse[kind].free_mem += size; + XftFreeCount++; + XftFreeMem += size; + XftFreeNotify += size; + if (XftFreeNotify > XftMemNotice) + XftMemReport (); } - return True; } Index: xc/lib/Xft/xftint.h diff -u xc/lib/Xft/xftint.h:1.28 xc/lib/Xft/xftint.h:1.37 --- xc/lib/Xft/xftint.h:1.28 Sat Jan 12 15:46:42 2002 +++ xc/lib/Xft/xftint.h Fri Oct 11 13:53:02 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftint.h,v 1.28 2002/01/12 20:46:42 keithp Exp $ + * $XFree86: xc/lib/Xft/xftint.h,v 1.37 2002/10/11 17:53:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -22,74 +22,225 @@ * PERFORMANCE OF THIS SOFTWARE. */ +/* + * These definitions are solely for use by the implementation of Xft + * and constitute no kind of standard. If you need any of these functions, + * please drop me a note. Either the library needs new functionality, + * or there's a way to do what you need using the existing published + * interfaces. keithp@xfree86.org + */ + #ifndef _XFTINT_H_ #define _XFTINT_H_ #include -#ifdef FREETYPE2 -#include "XftFreetype.h" -#else +#include +#define _XFT_NO_COMPAT_ #include "Xft.h" -#endif +#include +#include typedef struct _XftMatcher { char *object; - double (*compare) (char *object, XftValue value1, XftValue value2); + double (*compare) (char *object, FcValue value1, FcValue value2); } XftMatcher; typedef struct _XftSymbolic { const char *name; int value; } XftSymbolic; + +/* + * Glyphs are stored in this structure + */ +typedef struct _XftGlyph { + XGlyphInfo metrics; + void *bitmap; + unsigned long glyph_memory; +} XftGlyph; + +/* + * A hash table translates Unicode values into glyph indicies + */ +typedef struct _XftUcsHash { + FcChar32 ucs4; + FT_UInt glyph; +} XftUcsHash; + +/* + * Many fonts can share the same underlying face data; this + * structure references that. Note that many faces may in fact + * live in the same font file; that is irrelevant to this structure + * which is concerned only with the individual faces themselves + */ + +typedef struct _XftFtFile { + struct _XftFtFile *next; + int ref; /* number of font infos using this file */ + + char *file; /* file name */ + int id; /* font index within that file */ -#define XFT_DRAW_N_SRC 2 + FT_F26Dot6 xsize; /* current xsize setting */ + FT_F26Dot6 ysize; /* current ysize setting */ + FT_Matrix matrix; /* current matrix setting */ + + int lock; /* lock count; can't unload unless 0 */ + FT_Face face; /* pointer to face; only valid when lock */ +} XftFtFile; -#define XFT_DRAW_SRC_TEXT 0 -#define XFT_DRAW_SRC_RECT 1 +/* + * This structure holds the data extracted from a pattern + * needed to create a unique font object. + */ +struct _XftFontInfo { + /* + * Hash value (not include in hash value computation) + */ + FcChar32 hash; + XftFtFile *file; /* face source */ + /* + * Rendering options + */ + FT_F26Dot6 xsize, ysize; /* pixel size */ + FcBool antialias; /* doing antialiasing */ + int rgba; /* subpixel order */ + FT_Matrix matrix; /* glyph transformation matrix */ + FcBool transform; /* non-identify matrix? */ + FT_Int load_flags; /* glyph load flags */ + FcBool render; /* whether to use the Render extension */ + /* + * Internal fields + */ + int spacing; + FcBool minspace; + int char_width; +}; + +/* + * Internal version of the font with private data + */ + +typedef struct _XftFontInt { + XftFont public; /* public fields */ + XftFont *next; /* all fonts on display */ + XftFont *hash_next; /* fonts in this hash chain */ + XftFontInfo info; /* Data from pattern */ + int ref; /* reference count */ + /* + * Per-glyph information, indexed by glyph ID + * This array follows the font in memory + */ + XftGlyph **glyphs; + int num_glyphs; /* size of glyphs/bitmaps arrays */ + /* + * Hash table to get from Unicode value to glyph ID + * This array follows the glyphs in memory + */ + XftUcsHash *hash_table; + int hash_value; + int rehash_value; + /* + * X specific fields + */ + GlyphSet glyphset; /* Render glyphset */ + XRenderPictFormat *format; /* Render format for glyphs */ + /* + * Glyph memory management fields + */ + unsigned long glyph_memory; + unsigned long max_glyph_memory; + FcBool use_free_glyphs; /* Use XRenderFreeGlyphs */ +} XftFontInt; + +typedef enum _XftClipType { + XftClipTypeNone, XftClipTypeRegion, XftClipTypeRectangles +} XftClipType; + +typedef struct _XftClipRect { + int xOrigin; + int yOrigin; + int n; +} XftClipRect; + +#define XftClipRects(cr) ((XRectangle *) ((cr) + 1)) + +typedef union _XftClip { + XftClipRect *rect; + Region region; +} XftClip; + struct _XftDraw { Display *dpy; + int screen; + unsigned int bits_per_pixel; + unsigned int depth; Drawable drawable; Visual *visual; /* NULL for bitmaps */ Colormap colormap; - Region clip; - Bool core_set; - Bool render_set; - Bool render_able; + XftClipType clip_type; + XftClip clip; + int subwindow_mode; struct { Picture pict; - struct { - Picture pict; - XRenderColor color; - } src[XFT_DRAW_N_SRC]; } render; struct { - GC draw_gc; - unsigned long fg; - Font font; + GC gc; + int use_pixmap; } core; }; +/* + * Instead of taking two round trips for each blending request, + * assume that if a particular drawable fails GetImage that it will + * fail for a "while"; use temporary pixmaps to avoid the errors + */ + +#define XFT_ASSUME_PIXMAP 20 + +typedef struct _XftSolidColor { + XRenderColor color; + int screen; + Picture pict; +} XftSolidColor; + +#define XFT_NUM_SOLID_COLOR 16 + +#define XFT_NUM_FONT_HASH 127 + typedef struct _XftDisplayInfo { struct _XftDisplayInfo *next; Display *display; XExtCodes *codes; - XftPattern *defaults; - XftFontSet *coreFonts; - Bool hasRender; - struct _XftFtGlyphSet *glyphSets; + FcPattern *defaults; + FcBool hasRender; + XftFont *fonts; + XRenderPictFormat *solidFormat; + unsigned long glyph_memory; + unsigned long max_glyph_memory; + FcBool use_free_glyphs; + int num_unref_fonts; + int max_unref_fonts; + XftSolidColor colors[XFT_NUM_SOLID_COLOR]; + XftFont *fontHash[XFT_NUM_FONT_HASH]; } XftDisplayInfo; -extern XftFontSet *_XftGlobalFontSet; -extern XftDisplayInfo *_XftDisplayInfo; -extern char **XftConfigDirs; -extern XftFontSet *_XftFontSet; +/* + * By default, use no more than 4 meg of server memory total, and no + * more than 1 meg for any one font + */ +#define XFT_DPY_MAX_GLYPH_MEMORY (4 * 1024 * 1024) +#define XFT_FONT_MAX_GLYPH_MEMORY (1024 * 1024) -#define XFT_NMISSING 256 +/* + * By default, keep the last 16 unreferenced fonts around to + * speed reopening them. Note that the glyph caching code + * will keep the global memory usage reasonably limited + */ +#define XFT_DPY_MAX_UNREF_FONTS 16 -#ifndef XFT_DEFAULT_PATH -#define XFT_DEFAULT_PATH "/usr/X11R6/lib/X11/XftConfig" -#endif +extern XftDisplayInfo *_XftDisplayInfo; #define XFT_DBG_OPEN 1 #define XFT_DBG_OPENV 2 @@ -100,240 +251,96 @@ #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 -#define XFT_DBG_EDIT 2048 - -typedef enum _XftOp { - XftOpInteger, XftOpDouble, XftOpString, XftOpMatrix, XftOpBool, XftOpNil, - XftOpField, - XftOpAssign, XftOpPrepend, XftOpAppend, - XftOpQuest, - XftOpOr, XftOpAnd, XftOpEqual, XftOpNotEqual, - XftOpLess, XftOpLessEqual, XftOpMore, XftOpMoreEqual, - XftOpPlus, XftOpMinus, XftOpTimes, XftOpDivide, - XftOpNot -} XftOp; - -typedef struct _XftExpr { - XftOp op; - union { - int ival; - double dval; - char *sval; - XftMatrix *mval; - Bool bval; - char *field; - struct { - struct _XftExpr *left, *right; - } tree; - } u; -} XftExpr; - -typedef enum _XftQual { - XftQualAny, XftQualAll -} XftQual; - -typedef struct _XftTest { - struct _XftTest *next; - XftQual qual; - const char *field; - XftOp op; - XftValue value; -} XftTest; - -typedef struct _XftEdit { - struct _XftEdit *next; - const char *field; - XftOp op; - XftExpr *expr; -} XftEdit; - -typedef struct _XftSubst { - struct _XftSubst *next; - XftTest *test; - XftEdit *edit; -} XftSubst; - -/* - * I tried this with functions that took va_list* arguments - * but portability concerns made me change these functions - * into macros (sigh). - */ +#define XFT_DBG_MEMORY 512 -#define _XftPatternVapBuild(result, orig, va) \ -{ \ - XftPattern *__p__ = (orig); \ - const char *__o__; \ - XftValue __v__; \ - \ - if (!__p__) \ - { \ - __p__ = XftPatternCreate (); \ - if (!__p__) \ - goto _XftPatternVapBuild_bail0; \ - } \ - for (;;) \ - { \ - __o__ = va_arg (va, const char *); \ - if (!__o__) \ - break; \ - __v__.type = va_arg (va, XftType); \ - switch (__v__.type) { \ - case XftTypeVoid: \ - goto _XftPatternVapBuild_bail1; \ - case XftTypeInteger: \ - __v__.u.i = va_arg (va, int); \ - break; \ - case XftTypeDouble: \ - __v__.u.d = va_arg (va, double); \ - break; \ - case XftTypeString: \ - __v__.u.s = va_arg (va, char *); \ - break; \ - 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; \ - } \ - result = __p__; \ - goto _XftPatternVapBuild_return; \ - \ -_XftPatternVapBuild_bail1: \ - if (!orig) \ - XftPatternDestroy (__p__); \ -_XftPatternVapBuild_bail0: \ - result = 0; \ - \ -_XftPatternVapBuild_return: \ - ; \ -} - - -/* 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); +#define XFT_MEM_DRAW 0 +#define XFT_MEM_FONT 1 +#define XFT_MEM_FILE 2 +#define XFT_MEM_GLYPH 3 +#define XFT_MEM_NUM 4 + +/* xftcompat.c */ +void XftFontSetDestroy (FcFontSet *s); +FcBool XftMatrixEqual (_Xconst FcMatrix *mat1, _Xconst FcMatrix *mat2); +void XftMatrixMultiply (FcMatrix *result, FcMatrix *a, FcMatrix *b); +void XftMatrixRotate (FcMatrix *m, double c, double s); +void XftMatrixScale (FcMatrix *m, double sx, double sy); +void XftMatrixShear (FcMatrix *m, double sh, double sv); +FcPattern *XftPatternCreate (void); +void XftValueDestroy (FcValue v); +void XftPatternDestroy (FcPattern *p); +FcBool XftPatternAdd (FcPattern *p, _Xconst char *object, FcValue value, FcBool append); +FcBool XftPatternDel (FcPattern *p, _Xconst char *object); +FcBool XftPatternAddInteger (FcPattern *p, _Xconst char *object, int i); +FcBool XftPatternAddDouble (FcPattern *p, _Xconst char *object, double i); +FcBool XftPatternAddMatrix (FcPattern *p, _Xconst char *object, FcMatrix *i); +FcBool XftPatternAddString (FcPattern *p, _Xconst char *object, char *i); +FcBool XftPatternAddBool (FcPattern *p, _Xconst char *object, FcBool i); +FcResult XftPatternGet (FcPattern *p, _Xconst char *object, int id, FcValue *v); +FcResult XftPatternGetInteger (FcPattern *p, _Xconst char *object, int id, int *i); +FcResult XftPatternGetDouble (FcPattern *p, _Xconst char *object, int id, double *i); +FcResult XftPatternGetString (FcPattern *p, _Xconst char *object, int id, char **i); +FcResult XftPatternGetMatrix (FcPattern *p, _Xconst char *object, int id, FcMatrix **i); +FcResult XftPatternGetBool (FcPattern *p, _Xconst char *object, int id, FcBool *i); +FcPattern *XftPatternDuplicate (FcPattern *orig); +FcPattern *XftPatternVaBuild (FcPattern *orig, va_list va); +FcPattern *XftPatternBuild (FcPattern *orig, ...); +FcBool XftNameUnparse (FcPattern *pat, char *dest, int len); +FcBool XftGlyphExists (Display *dpy, XftFont *font, FcChar32 ucs4); +FcObjectSet *XftObjectSetCreate (void); +Bool XftObjectSetAdd (FcObjectSet *os, _Xconst char *object); +void XftObjectSetDestroy (FcObjectSet *os); +FcObjectSet *XftObjectSetVaBuild (_Xconst char *first, va_list va); +FcObjectSet *XftObjectSetBuild (_Xconst char *first, ...); +FcFontSet *XftListFontSets (FcFontSet **sets, int nsets, FcPattern *p, FcObjectSet *os); -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 -_XftConfigCompareValue (XftValue m, - XftOp op, - XftValue v); - /* xftcore.c */ - -#define XFT_CORE_N16LOCAL 256 - -XChar2b * -XftCoreConvert16 (XftChar16 *string, - int len, - XChar2b xcloc[XFT_CORE_N16LOCAL]); - -XChar2b * -XftCoreConvert32 (XftChar32 *string, - 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, - XftChar8 *string, - int len, - XGlyphInfo *extents); - -void -XftCoreExtents16 (Display *dpy, - XFontStruct *fs, - XftChar16 *string, - int len, - XGlyphInfo *extents); - -void -XftCoreExtents32 (Display *dpy, - XFontStruct *fs, - XftChar32 *string, - int len, - XGlyphInfo *extents); - -void -XftCoreExtentsUtf8 (Display *dpy, - XFontStruct *fs, - XftChar8 *string, - int len, - XGlyphInfo *extents); - -Bool -XftCoreGlyphExists (Display *dpy, - XFontStruct *fs, - XftChar32 glyph); - -/* xftdbg.c */ -void -XftOpPrint (XftOp op); - -void -XftTestPrint (XftTest *test); - void -XftExprPrint (XftExpr *expr); +XftRectCore (XftDraw *draw, + _Xconst XftColor *color, + int x, + int y, + unsigned int width, + unsigned int height); + +void +XftGlyphCore (XftDraw *draw, + _Xconst XftColor *color, + XftFont *public, + int x, + int y, + _Xconst FT_UInt *glyphs, + int nglyphs); + +void +XftGlyphSpecCore (XftDraw *draw, + _Xconst XftColor *color, + XftFont *public, + _Xconst XftGlyphSpec *glyphs, + int nglyphs); + +void +XftGlyphFontSpecCore (XftDraw *draw, + _Xconst XftColor *color, + _Xconst XftGlyphFontSpec *glyphs, + int nglyphs); -void -XftEditPrint (XftEdit *edit); - -void -XftSubstPrint (XftSubst *subst); +/* xftdbg.c */ +int +XftDebug (void); /* xftdpy.c */ XftDisplayInfo * -_XftDisplayInfoGet (Display *dpy); +_XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary); + +void +_XftDisplayManageMemory (Display *dpy); int XftDefaultParseBool (char *v); -Bool -XftDefaultGetBool (Display *dpy, const char *object, int screen, Bool def); +FcBool +XftDefaultGetBool (Display *dpy, const char *object, int screen, FcBool def); int XftDefaultGetInteger (Display *dpy, const char *object, int screen, int def); @@ -341,153 +348,79 @@ double XftDefaultGetDouble (Display *dpy, const char *object, int screen, double def); -XftFontSet * +FcFontSet * XftDisplayGetFontSet (Display *dpy); /* xftdraw.c */ -Bool -XftDrawRenderPrepare (XftDraw *draw, - XftColor *color, - XftFont *font, - int src); - -Bool -XftDrawCorePrepare (XftDraw *draw, - XftColor *color, - XftFont *font); +unsigned int +XftDrawDepth (XftDraw *draw); -/* xftextent.c */ -/* xftfont.c */ -int -_XftFontDebug (void); - -/* xftfs.c */ -/* xftgram.y */ -int -XftConfigparse (void); +unsigned int +XftDrawBitsPerPixel (XftDraw *draw); -int -XftConfigwrap (void); - -void -XftConfigerror (char *fmt, ...); - -char * -XftConfigSaveField (const char *field); - -XftTest * -XftTestCreate (XftQual qual, const char *field, XftOp compare, XftValue value); - -XftExpr * -XftExprCreateInteger (int i); - -XftExpr * -XftExprCreateDouble (double d); +FcBool +XftDrawRenderPrepare (XftDraw *draw); -XftExpr * -XftExprCreateString (const char *s); - -XftExpr * -XftExprCreateMatrix (const XftMatrix *m); - -XftExpr * -XftExprCreateBool (Bool b); - -XftExpr * -XftExprCreateNil (void); - -XftExpr * -XftExprCreateField (const char *field); +/* xftextent.c */ + +/* xftfont.c */ -XftExpr * -XftExprCreateOp (XftExpr *left, XftOp op, XftExpr *right); +/* xftfreetype.c */ +FcBool +_XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix); void -XftExprDestroy (XftExpr *e); +XftFontManageMemory (Display *dpy); -XftEdit * -XftEditCreate (const char *field, XftOp op, XftExpr *expr); +/* xftglyph.c */ +void +_XftFontUncacheGlyph (Display *dpy, XftFont *public); void -XftEditDestroy (XftEdit *e); +_XftFontManageMemory (Display *dpy, XftFont *public); /* xftinit.c */ - -/* xftlex.l */ -extern int XftConfigLineno; -extern char *XftConfigFile; - -int -XftConfiglex (void); +void +XftMemReport (void); -Bool -XftConfigLexFile(char *s); +void +XftMemAlloc (int kind, int size); -Bool -XftConfigPushInput (char *s, Bool complain); +void +XftMemFree (int kind, int size); /* xftlist.c */ -Bool -XftListValueCompare (XftValue v1, - XftValue v2); - -Bool -XftListValueListCompare (XftValueList *v1orig, - XftValueList *v2orig, - XftQual qual); - -Bool -XftListMatch (XftPattern *p, - XftPattern *font, - XftQual qual); - -Bool -XftListAppend (XftFontSet *s, - XftPattern *font, - XftObjectSet *os); - - -/* xftmatch.c */ +FcFontSet * +XftListFontsPatternObjects (Display *dpy, + int screen, + FcPattern *pattern, + FcObjectSet *os); /* xftname.c */ -Bool -XftNameConstant (char *string, int *result); +void +_XftNameInit (void); -/* xftpat.c */ - /* xftrender.c */ -/* xftmatrix.c */ -XftMatrix * -_XftSaveMatrix (const XftMatrix *mat); - /* xftstr.c */ -char * -_XftSaveString (const char *s); - -const char * -_XftGetInt(const char *ptr, int *val); +int +_XftMatchSymbolic (XftSymbolic *s, int n, const char *name, int def); -char * -_XftSplitStr (const char *field, char *save); +/* xftswap.c */ +int +XftNativeByteOrder (void); -char * -_XftDownStr (const char *field, char *save); +void +XftSwapCARD32 (CARD32 *data, int n); -const char * -_XftSplitField (const char *field, char *save); +void +XftSwapCARD24 (CARD8 *data, int width, int height); -const char * -_XftSplitValue (const char *field, char *save); +void +XftSwapCARD16 (CARD16 *data, int n); -int -_XftMatchSymbolic (XftSymbolic *s, int n, const char *name, int def); +void +XftSwapImage (XImage *image); -int -_XftStrCmpIgnoreCase (const char *s1, const char *s2); - /* xftxlfd.c */ -Bool -XftCoreAddFonts (XftFontSet *set, Display *dpy, Bool ignore_scalable); - #endif /* _XFT_INT_H_ */ Index: xc/lib/Xft/xftlex.l diff -u xc/lib/Xft/xftlex.l:1.7 xc/lib/Xft/xftlex.l:removed --- xc/lib/Xft/xftlex.l:1.7 Fri May 18 12:03:06 2001 +++ xc/lib/Xft/xftlex.l Thu Feb 27 12:27:23 2003 @@ -1,275 +0,0 @@ -%{ -/* - * $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. - * - * 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 "xftint.h" - -#include "xftgram.h" - -int XftConfigLineno; - -static void _XftConfigSkipComment (void); - -static void _XftConfigSkipLine (void); - -static int _XftConfigPopInput (void); - - -#define XFT_CONFIG_IN_DEEP 20 -FILE *XftConfigInStack[XFT_CONFIG_IN_DEEP]; -FILE **XftConfigInpt = XftConfigInStack + XFT_CONFIG_IN_DEEP; -FILE *XftConfigInput; -int XftConfigLinenos[XFT_CONFIG_IN_DEEP]; -int *XftConfigLinenopt = XftConfigLinenos + XFT_CONFIG_IN_DEEP; -char *XftConfigFile = ""; -char *XftConfigFileNames[XFT_CONFIG_IN_DEEP]; -char **XftConfigFileNamePt = XftConfigFileNames + XFT_CONFIG_IN_DEEP; -int XftConfigFiledeep = 0; - -#undef YY_INPUT - -#define YY_INPUT(buf,result,max_size) \ -{ \ - int c; \ - result = 0; \ - while (result < max_size) { \ - c = getc (XftConfigInput); \ - if (c < 0) { \ - c = _XftConfigPopInput (); \ - if (c < 0) \ - break; \ - } \ - buf[result++] = c; \ - if (c == '\n') \ - { \ - XftConfigLineno++; \ - break; \ - } \ - } \ -} - -#ifndef FLEX_SCANNER -#undef input -#undef unput -static int input (void) -{ - char buf[1]; - static int r = EOF; - - 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); -} -#endif - -%} -%% -"/\052" _XftConfigSkipComment(); -^# _XftConfigSkipLine(); -dir return DIR; -cache return CACHE; -include return INCLUDE; -includeif return INCLUDEIF; -match return MATCH; -edit return EDIT; -true return TOK_TRUE; -false return TOK_FALSE; -nil return TOK_NIL; -any return ANY; -all return ALL; -"=" return EQUAL; -":" return COLON; -";" return SEMI; -"+" return PLUS; -"-" return MINUS; -"*" return TIMES; -"/" return DIVIDE; -"!" return NOT; -"&&" return ANDAND; -"||" return OROR; -"<" return LESS; -"<=" return LESSEQ; -"==" return EQEQ; -">=" return MOREEQ; -">" return MORE; -"!=" return NOTEQ; -"?" return QUEST; -"[" return OS; -"]" return CS; -\"([^\n\"]|\\\")*\" { - yytext[yyleng - 1] = '\0'; - yylval.sval = yytext+1; - return STRING; - } -[0-9]+ { - yylval.ival = strtol (yytext, 0, 10); - return INTEGER; - } -(([0-9]+((\.[0-9]*(\{[0-9]+\})?)?))|(\.[0-9]+)|(\.[0-9]*\{[0-9]+\}))(([Ee][-+]?[0-9]+)?) { - yylval.dval = strtod (yytext, 0); - return DOUBLE; - } -[a-zA-Z][0-9a-zA-Z_]* { - if (XftNameConstant (yytext, &yylval.ival)) - return INTEGER; - yylval.sval = yytext; - return NAME; - } -. ; -"\n" ; -%% -static void -_XftConfigSkipComment (void) -{ - int c; - - c = input(); - for (;;) { - while (c != EOF && c != '*') - c = input(); - if (c == EOF) - return; - c = input(); - if (c == EOF || c == '/') - return; - } -} - -static void -_XftConfigSkipLine (void) -{ - int c; - - do { - c = input(); - } while (c != EOF && c != '\n'); - if (c == '\n') unput('\n'); -} - -Bool -XftConfigLexFile(char *s) -{ - FILE *f; - - f = fopen (s, "r"); - if (f == 0) - { - fprintf (stderr, "cannot open file \"%s\"\n", s); - return False; - } - ++XftConfigFiledeep; - XftConfigInput = f; - XftConfigFile = s; - return True; -} - -Bool -XftConfigPushInput (char *s, Bool complain) -{ - FILE *f; - char *t; - char *h; - - if (XftConfigInpt == XftConfigInStack) - { - (void) fprintf (stderr, "files nested too deeply\n"); - return False; - } - t = s; - if (*s == '~') - { - h = getenv ("HOME"); - if (h) - { - t = (char *) malloc (strlen (h) + strlen (s)); - if (t) - { - strcpy (t, h); - strcat (t, s+1); - } - else - t = s; - } - } - f = fopen (t, "r"); - if (t != s) - free (t); - if (f == 0) - { - if (complain) - (void) fprintf (stderr, "cannot open file %s\n", s); - return False; - } - ++XftConfigFiledeep; - *--XftConfigInpt = XftConfigInput; - *--XftConfigLinenopt = XftConfigLineno; - *--XftConfigFileNamePt = XftConfigFile; - XftConfigInput = f; - XftConfigLineno = 1; - XftConfigFile = _XftSaveString (s); - return True; -} - -static int -_XftConfigPopInput (void) -{ - int c; - - for (;;) - { - c = getc (XftConfigInput); - if (c >= 0) - return c; - fclose (XftConfigInput); - XftConfigInput = 0; - if (XftConfigInpt == XftConfigInStack + XFT_CONFIG_IN_DEEP) - return EOF; - XftConfigInput = *XftConfigInpt++; - XftConfigLineno = *XftConfigLinenopt++; - free (XftConfigFile); - XftConfigFile = *XftConfigFileNamePt++; - --XftConfigFiledeep; - } -} - -void -XftConfigLexDone (void) -{ -#ifdef FLEX_SCANNER - XftConfig_delete_buffer (XftConfig_current_buffer); -#endif -} Index: xc/lib/Xft/xftlist.c diff -u xc/lib/Xft/xftlist.c:1.2 xc/lib/Xft/xftlist.c:1.3 --- xc/lib/Xft/xftlist.c:1.2 Thu Dec 7 18:57:28 2000 +++ xc/lib/Xft/xftlist.c Fri Feb 15 02:36:11 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftlist.c,v 1.2 2000/12/07 23:57:28 keithp Exp $ + * $XFree86: xc/lib/Xft/xftlist.c,v 1.3 2002/02/15 07:36:11 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -25,304 +25,37 @@ #include #include "xftint.h" -XftObjectSet * -XftObjectSetCreate (void) -{ - XftObjectSet *os; - - os = (XftObjectSet *) malloc (sizeof (XftObjectSet)); - if (!os) - return 0; - os->nobject = 0; - os->sobject = 0; - os->objects = 0; - return os; -} - -Bool -XftObjectSetAdd (XftObjectSet *os, const char *object) -{ - int s; - const char **objects; - - if (os->nobject == os->sobject) - { - s = os->sobject + 4; - if (os->objects) - objects = (const char **) realloc ((void *) os->objects, - s * sizeof (const char **)); - else - objects = (const char **) malloc (s * sizeof (const char **)); - if (!objects) - return False; - os->objects = objects; - os->sobject = s; - } - os->objects[os->nobject++] = object; - return True; -} - -void -XftObjectSetDestroy (XftObjectSet *os) -{ - if (os->objects) - free ((void *) os->objects); - free (os); -} - -#define _XftObjectSetVapBuild(__ret__, __first__, __va__) \ -{ \ - XftObjectSet *__os__; \ - const char *__ob__; \ - \ - __ret__ = 0; \ - __os__ = XftObjectSetCreate (); \ - if (!__os__) \ - goto _XftObjectSetVapBuild_bail0; \ - __ob__ = __first__; \ - while (__ob__) \ - { \ - if (!XftObjectSetAdd (__os__, __ob__)) \ - goto _XftObjectSetVapBuild_bail1; \ - __ob__ = va_arg (__va__, const char *); \ - } \ - __ret__ = __os__; \ - \ -_XftObjectSetVapBuild_bail1: \ - if (!__ret__ && __os__) \ - XftObjectSetDestroy (__os__); \ -_XftObjectSetVapBuild_bail0: \ - ; \ -} - -XftObjectSet * -XftObjectSetVaBuild (const char *first, va_list va) -{ - XftObjectSet *ret; - - _XftObjectSetVapBuild (ret, first, va); - return ret; -} - -XftObjectSet * -XftObjectSetBuild (const char *first, ...) -{ - va_list va; - XftObjectSet *os; - - va_start (va, first); - _XftObjectSetVapBuild (os, first, va); - va_end (va); - return os; -} - -Bool -XftListValueCompare (XftValue v1, - XftValue v2) -{ - return _XftConfigCompareValue (v1, XftOpEqual, v2); -} - -Bool -XftListValueListCompare (XftValueList *v1orig, - XftValueList *v2orig, - XftQual qual) -{ - XftValueList *v1, *v2; - - for (v1 = v1orig; v1; v1 = v1->next) - { - for (v2 = v2orig; v2; v2 = v2->next) - { - if (_XftConfigCompareValue (v1->value, XftOpEqual, v2->value)) - { - if (qual == XftQualAny) - return True; - else - break; - } - } - if (qual == XftQualAll) - { - if (!v2) - return False; - } - } - if (qual == XftQualAll) - return True; - else - return False; -} - -/* - * True iff all objects in "p" match "font" - */ -Bool -XftListMatch (XftPattern *p, - XftPattern *font, - XftQual qual) -{ - int i; - XftPatternElt *e; - - for (i = 0; i < p->num; i++) - { - e = XftPatternFind (font, p->elts[i].object, False); - if (!e) - { - if (qual == XftQualAll) - continue; - else - return False; - } - if (!XftListValueListCompare (p->elts[i].values, e->values, qual)) - return False; - } - return True; -} - -Bool -XftListAppend (XftFontSet *s, - XftPattern *font, - XftObjectSet *os) -{ - int f; - int o; - XftPattern *l; - XftPatternElt *e; - XftValueList *v; - - for (f = 0; f < s->nfont; f++) - { - l = s->fonts[f]; - if (XftListMatch (l, font, XftQualAll)) - return True; - } - l = XftPatternCreate (); - if (!l) - goto bail0; - for (o = 0; o < os->nobject; o++) - { - e = XftPatternFind (font, os->objects[o], False); - if (e) - { - for (v = e->values; v; v = v->next) - { - if (!XftPatternAdd (l, os->objects[o], v->value, True)) - goto bail1; - } - } - } - if (!XftFontSetAdd (s, l)) - goto bail1; - return True; -bail1: - XftPatternDestroy (l); -bail0: - return False; -} - -XftFontSet * -XftListFontSets (XftFontSet **sets, - int nsets, - XftPattern *p, - XftObjectSet *os) -{ - XftFontSet *ret; - XftFontSet *s; - int f; - int set; - - ret = XftFontSetCreate (); - if (!ret) - goto bail0; - for (set = 0; set < nsets; set++) - { - s = sets[set]; - for (f = 0; f < s->nfont; f++) - { - if (XftListMatch (p, s->fonts[f], XftQualAny)) - { - if (!XftListAppend (ret, s->fonts[f], os)) - goto bail1; - } - } - } - return ret; -bail1: - XftFontSetDestroy (ret); -bail0: - return 0; -} - -XftFontSet * +FcFontSet * XftListFontsPatternObjects (Display *dpy, int screen, - XftPattern *pattern, - XftObjectSet *os) + FcPattern *pattern, + FcObjectSet *os) { - XftFontSet *sets[2]; - int nsets = 0; -#ifdef FREETYPE2 - Bool core, render; - XftResult result; -#endif - - if (!XftInit (0)) - return 0; - -#ifdef FREETYPE2 - render = core = False; - result = XftPatternGetBool (pattern, XFT_CORE, 0, &core); - if (result != XftResultMatch) - core = XftDefaultGetBool (dpy, XFT_CORE, screen, - !XftDefaultHasRender (dpy)); - - result = XftPatternGetBool (pattern, XFT_RENDER, 0, &render); - if (result != XftResultMatch) - render = XftDefaultGetBool (dpy, XFT_RENDER, screen, - XftDefaultHasRender (dpy)); - if (render) - { - if (XftInitFtLibrary ()) - { - sets[nsets] = _XftFontSet; - if (sets[nsets]) - nsets++; - } - } - if (core) -#endif - { - sets[nsets] = XftDisplayGetFontSet (dpy); - if (sets[nsets]) - nsets++; - } - return XftListFontSets (sets, nsets, pattern, os); + return FcFontList (0, pattern, os); } -XftFontSet * +FcFontSet * XftListFonts (Display *dpy, int screen, ...) { va_list va; - XftFontSet *fs; - XftObjectSet *os; - XftPattern *pattern; + FcFontSet *fs; + FcObjectSet *os; + FcPattern *pattern; const char *first; va_start (va, screen); - _XftPatternVapBuild (pattern, 0, va); + FcPatternVapBuild (pattern, 0, va); first = va_arg (va, const char *); - _XftObjectSetVapBuild (os, first, va); + FcObjectSetVapBuild (os, first, va); va_end (va); fs = XftListFontsPatternObjects (dpy, screen, pattern, os); - XftPatternDestroy (pattern); - XftObjectSetDestroy (os); + FcPatternDestroy (pattern); + FcObjectSetDestroy (os); return fs; } Index: xc/lib/Xft/xftmatch.c diff -u xc/lib/Xft/xftmatch.c:1.6 xc/lib/Xft/xftmatch.c:removed --- xc/lib/Xft/xftmatch.c:1.6 Fri Sep 21 15:54:53 2001 +++ xc/lib/Xft/xftmatch.c Thu Feb 27 12:27:23 2003 @@ -1,330 +0,0 @@ -/* - * $XFree86: xc/lib/Xft/xftmatch.c,v 1.6 2001/09/21 19:54:53 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 "xftint.h" -#include - -static double -_XftCompareInteger (char *object, XftValue value1, XftValue value2) -{ - int v; - - if (value2.type != XftTypeInteger || value1.type != XftTypeInteger) - return -1.0; - v = value2.u.i - value1.u.i; - if (v < 0) - v = -v; - return (double) v; -} - -static double -_XftCompareString (char *object, XftValue value1, XftValue value2) -{ - if (value2.type != XftTypeString || value1.type != XftTypeString) - return -1.0; - return (double) _XftStrCmpIgnoreCase (value1.u.s, value2.u.s) != 0; -} - -static double -_XftCompareBool (char *object, XftValue value1, XftValue value2) -{ - if (value2.type != XftTypeBool || value1.type != XftTypeBool) - return -1.0; - return (double) value2.u.b != value1.u.b; -} - -static double -_XftCompareSize (char *object, XftValue value1, XftValue value2) -{ - double v1, v2, v; - - switch (value1.type) { - case XftTypeInteger: - v1 = value1.u.i; - break; - case XftTypeDouble: - v1 = value1.u.d; - break; - default: - return -1; - } - switch (value2.type) { - case XftTypeInteger: - v2 = value2.u.i; - break; - case XftTypeDouble: - v2 = value2.u.d; - break; - default: - return -1; - } - if (v2 == 0) - return 0; - v = v2 - v1; - if (v < 0) - v = -v; - return v; -} - -/* - * Order is significant, it defines the precedence of - * each value, earlier values are more significant than - * later values - */ -static XftMatcher _XftMatchers [] = { - { XFT_FOUNDRY, _XftCompareString, }, - { XFT_ENCODING, _XftCompareString, }, - { XFT_FAMILY, _XftCompareString, }, - { XFT_SPACING, _XftCompareInteger, }, - { XFT_PIXEL_SIZE, _XftCompareSize, }, - { XFT_STYLE, _XftCompareString, }, - { XFT_SLANT, _XftCompareInteger, }, - { XFT_WEIGHT, _XftCompareInteger, }, - { XFT_RASTERIZER, _XftCompareString, }, - { XFT_ANTIALIAS, _XftCompareBool, }, - { XFT_OUTLINE, _XftCompareBool, }, -}; - -#define NUM_MATCHER (sizeof _XftMatchers / sizeof _XftMatchers[0]) - -static Bool -_XftCompareValueList (const char *object, - XftValueList *v1orig, /* pattern */ - XftValueList *v2orig, /* target */ - XftValue *bestValue, - double *value, - XftResult *result) -{ - XftValueList *v1, *v2; - double v, best; - int j; - int i; - - for (i = 0; i < NUM_MATCHER; i++) - { - if (!_XftStrCmpIgnoreCase (_XftMatchers[i].object, object)) - break; - } - if (i == NUM_MATCHER) - { - if (bestValue) - *bestValue = v2orig->value; - return True; - } - - best = 1e99; - j = 0; - for (v1 = v1orig; v1; v1 = v1->next) - { - for (v2 = v2orig; v2; v2 = v2->next) - { - v = (*_XftMatchers[i].compare) (_XftMatchers[i].object, - v1->value, - v2->value); - if (v < 0) - { - *result = XftResultTypeMismatch; - return False; - } - if (_XftFontDebug () & XFT_DBG_MATCHV) - printf (" v %g j %d ", v, j); - v = v * 100 + j; - if (v < best) - { - if (bestValue) - *bestValue = v2->value; - best = v; - } - } - j++; - } - if (_XftFontDebug () & XFT_DBG_MATCHV) - { - printf (" %s: %g ", object, best); - XftValueListPrint (v1orig); - printf (", "); - XftValueListPrint (v2orig); - printf ("\n"); - } - value[i] += best; - return True; -} - -/* - * Return a value indicating the distance between the two lists of - * values - */ - -static Bool -_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 < pat->num; i1++) - { - for (i2 = 0; i2 < fnt->num; i2++) - { - if (!_XftStrCmpIgnoreCase (pat->elts[i1].object, - fnt->elts[i2].object)) - { - if (!_XftCompareValueList (pat->elts[i1].object, - pat->elts[i1].values, - fnt->elts[i2].values, - 0, - value, - result)) - return False; - 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; -} - -XftPattern * -XftFontSetMatch (XftFontSet **sets, - int nsets, - XftPattern *p, - XftResult *result) -{ - double score[NUM_MATCHER], bestscore[NUM_MATCHER]; - int f; - XftFontSet *s; - XftPattern *best; - XftPattern *new; - XftPatternElt *fe, *pe; - XftValue v; - int i; - int set; - - for (i = 0; i < NUM_MATCHER; i++) - bestscore[i] = 0; - best = 0; - 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++) - { - if (_XftFontDebug () & XFT_DBG_MATCH) - { - printf ("Font %d ", f); - XftPatternPrint (s->fonts[f]); - } - if (!_XftCompare (p, s->fonts[f], score, result)) - return 0; - if (_XftFontDebug () & XFT_DBG_MATCH) - { - printf ("Score"); - for (i = 0; i < NUM_MATCHER; i++) - { - printf (" %g", score[i]); - } - printf ("\n"); - } - for (i = 0; i < NUM_MATCHER; i++) - { - if (best && bestscore[i] < score[i]) - break; - if (!best || score[i] < bestscore[i]) - { - for (i = 0; i < NUM_MATCHER; i++) - bestscore[i] = score[i]; - best = s->fonts[f]; - break; - } - } - } - } - 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; - return 0; - } - new = XftPatternCreate (); - if (!new) - return 0; - for (i = 0; i < best->num; i++) - { - fe = &best->elts[i]; - pe = XftPatternFind (p, fe->object, False); - if (pe) - { - if (!_XftCompareValueList (pe->object, pe->values, - fe->values, &v, score, result)) - { - XftPatternDestroy (new); - return 0; - } - } - else - v = fe->values->value; - XftPatternAdd (new, fe->object, v, True); - } - for (i = 0; i < p->num; i++) - { - pe = &p->elts[i]; - fe = XftPatternFind (best, pe->object, False); - if (!fe) - XftPatternAdd (new, pe->object, pe->values->value, True); - } - return new; -} Index: xc/lib/Xft/xftmatrix.c diff -u xc/lib/Xft/xftmatrix.c:1.1 xc/lib/Xft/xftmatrix.c:removed --- xc/lib/Xft/xftmatrix.c:1.1 Fri Mar 30 13:50:18 2001 +++ xc/lib/Xft/xftmatrix.c Thu Feb 27 12:27:23 2003 @@ -1,104 +0,0 @@ -/* - * $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.10 xc/lib/Xft/xftname.c:1.12 --- xc/lib/Xft/xftname.c:1.10 Fri Mar 30 13:50:18 2001 +++ xc/lib/Xft/xftname.c Fri May 24 03:02:38 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftname.c,v 1.10 2001/03/30 18:50:18 keithp Exp $ + * $XFree86: xc/lib/Xft/xftname.c,v 1.12 2002/05/24 07:02:38 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -23,369 +23,47 @@ */ #include "xftint.h" -#include #include -#include -#include -typedef struct _XftObjectType { - const char *object; - XftType type; -} XftObjectType; - -static const XftObjectType _XftObjectTypes[] = { - { XFT_FAMILY, XftTypeString, }, - { XFT_STYLE, XftTypeString, }, - { XFT_SLANT, XftTypeInteger, }, - { XFT_WEIGHT, XftTypeInteger, }, - { XFT_SIZE, XftTypeDouble, }, - { XFT_PIXEL_SIZE, XftTypeDouble, }, - { XFT_ENCODING, XftTypeString, }, - { XFT_SPACING, XftTypeInteger, }, - { XFT_FOUNDRY, XftTypeString, }, - { XFT_CORE, XftTypeBool, }, - { XFT_ANTIALIAS, XftTypeBool, }, - { XFT_XLFD, XftTypeString, }, - { XFT_FILE, XftTypeString, }, - { XFT_INDEX, XftTypeInteger, }, - { XFT_RASTERIZER, XftTypeString, }, - { XFT_OUTLINE, XftTypeBool, }, - { XFT_SCALABLE, XftTypeBool, }, - { XFT_RGBA, XftTypeInteger, }, - { XFT_SCALE, XftTypeDouble, }, - { XFT_RENDER, XftTypeBool, }, - { XFT_MINSPACE, XftTypeBool, }, - { XFT_CHAR_WIDTH, XftTypeInteger }, - { XFT_CHAR_HEIGHT, XftTypeInteger }, - { XFT_MATRIX, XftTypeMatrix }, +static const FcObjectType _XftObjectTypes[] = { + { XFT_CORE, FcTypeBool, }, + { XFT_XLFD, FcTypeString, }, + { XFT_RENDER, FcTypeBool, }, }; #define NUM_OBJECT_TYPES (sizeof _XftObjectTypes / sizeof _XftObjectTypes[0]) - -static const XftObjectType * -XftNameGetType (const char *object) -{ - int i; - - for (i = 0; i < NUM_OBJECT_TYPES; i++) - { - if (!_XftStrCmpIgnoreCase (object, _XftObjectTypes[i].object)) - return &_XftObjectTypes[i]; - } - return 0; -} - -typedef struct _XftConstant { - const char *name; - const char *object; - int value; -} XftConstant; - -static XftConstant XftConstants[] = { - { "light", "weight", XFT_WEIGHT_LIGHT, }, - { "medium", "weight", XFT_WEIGHT_MEDIUM, }, - { "demibold", "weight", XFT_WEIGHT_DEMIBOLD, }, - { "bold", "weight", XFT_WEIGHT_BOLD, }, - { "black", "weight", XFT_WEIGHT_BLACK, }, - - { "roman", "slant", XFT_SLANT_ROMAN, }, - { "italic", "slant", XFT_SLANT_ITALIC, }, - { "oblique", "slant", XFT_SLANT_OBLIQUE, }, - - { "proportional", "spacing", XFT_PROPORTIONAL, }, - { "mono", "spacing", XFT_MONO, }, - { "charcell", "spacing", XFT_CHARCELL, }, - - { "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]) - -static XftConstant * -_XftNameConstantLookup (char *string) -{ - int i; - - for (i = 0; i < NUM_XFT_CONSTANTS; i++) - if (!_XftStrCmpIgnoreCase (string, XftConstants[i].name)) - return &XftConstants[i]; - return 0; -} - -Bool -XftNameConstant (char *string, int *result) -{ - XftConstant *c; - if ((c = _XftNameConstantLookup(string))) - { - *result = c->value; - return True; - } - return False; -} +Bool _XftNameInitialized; -static XftValue -_XftNameConvert (XftType type, char *string, XftMatrix *m) +void +_XftNameInit (void) { - XftValue v; - - v.type = type; - switch (v.type) { - case XftTypeInteger: - if (!XftNameConstant (string, &v.u.i)) - v.u.i = atoi (string); - break; - case XftTypeString: - v.u.s = string; - break; - case XftTypeBool: - v.u.b = XftDefaultParseBool (string); - break; - 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; - } - return v; + if (_XftNameInitialized) + return; + FcNameRegisterObjectTypes (_XftObjectTypes, NUM_OBJECT_TYPES); } -static const char * -_XftNameFindNext (const char *cur, const char *delim, char *save, char *last) -{ - char c; - - while ((c = *cur)) - { - if (c == '\\') - { - ++cur; - if (!(c = *cur)) - break; - } - else if (strchr (delim, c)) - break; - ++cur; - *save++ = c; - } - *save = 0; - *last = *cur; - if (*cur) - cur++; - return cur; +FcPattern +*XftNameParse (const char *name) +{ + _XftNameInit (); + return FcNameParse ((FcChar8 *) name); } -XftPattern * -XftNameParse (const char *name) +FcBool +XftNameUnparse (FcPattern *pat, char *dest, int len) { - char *save; - XftPattern *pat; - double d; - char *e; - char delim; - XftValue v; - XftMatrix m; - const XftObjectType *t; - XftConstant *c; - - save = malloc (strlen (name) + 1); - if (!save) - goto bail0; - pat = XftPatternCreate (); - if (!pat) - goto bail1; + FcChar8 *name; - for (;;) - { - name = _XftNameFindNext (name, "-,:", save, &delim); - if (save[0]) - { - if (!XftPatternAddString (pat, XFT_FAMILY, save)) - goto bail2; - } - if (delim != ',') - break; - } - if (delim == '-') - { - for (;;) - { - name = _XftNameFindNext (name, "-,:", save, &delim); - d = strtod (save, &e); - if (e != save) - { - if (!XftPatternAddDouble (pat, XFT_SIZE, d)) - goto bail2; - } - if (delim != ',') - break; - } - } - while (delim == ':') - { - name = _XftNameFindNext (name, "=_:", save, &delim); - if (save[0]) - { - if (delim == '=' || delim == '_') - { - t = XftNameGetType (save); - for (;;) - { - name = _XftNameFindNext (name, ":,", save, &delim); - if (save[0] && t) - { - v = _XftNameConvert (t->type, save, &m); - if (!XftPatternAdd (pat, t->object, v, True)) - goto bail2; - } - if (delim != ',') - break; - } - } - else - { - if ((c = _XftNameConstantLookup (save))) - { - if (!XftPatternAddInteger (pat, c->object, c->value)) - goto bail2; - } - } - } - } - - free (save); - return pat; - -bail2: - XftPatternDestroy (pat); -bail1: - 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++) + name = FcNameUnparse (pat); + if (!name) + return FcFalse; + if (strlen ((char *) name) + 1 > len) { - 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; - } + free (name); + return FcFalse; } - if (len == 0) - return False; - *dest = '\0'; - return True; + strcpy (dest, ((char *) name)); + free (name); + return FcTrue; } Index: xc/lib/Xft/xftpat.c diff -u xc/lib/Xft/xftpat.c:1.6 xc/lib/Xft/xftpat.c:1.7 --- xc/lib/Xft/xftpat.c:1.6 Fri Mar 30 13:50:18 2001 +++ xc/lib/Xft/xftpat.c Fri Feb 15 02:36:11 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftpat.c,v 1.6 2001/03/30 18:50:18 keithp Exp $ + * $XFree86: xc/lib/Xft/xftpat.c,v 1.7 2002/02/15 07:36:11 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -26,12 +26,12 @@ #include #include "xftint.h" -XftPattern * +FcPattern * XftPatternCreate (void) { - XftPattern *p; + FcPattern *p; - p = (XftPattern *) malloc (sizeof (XftPattern)); + p = (FcPattern *) malloc (sizeof (FcPattern)); if (!p) return 0; p->num = 0; @@ -41,145 +41,27 @@ } void -XftValueDestroy (XftValue v) -{ - if (v.type == XftTypeString) - free (v.u.s); - if( v.type == XftTypeMatrix) - free (v.u.m); -} +XftValueDestroy (FcValue v) +{ FcValueDestroy (v); } void XftValueListDestroy (XftValueList *l) -{ - XftValueList *next; - for (; l; l = next) - { - 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); - } -} +{ FcValueListDestroy (l); } void -XftPatternDestroy (XftPattern *p) -{ - int i; - - for (i = 0; i < p->num; i++) - XftValueListDestroy (p->elts[i].values); - - if (p->elts) - { - free (p->elts); - p->elts = 0; - } - p->num = p->size = 0; - free (p); -} +XftPatternDestroy (FcPattern *p) +{ FcPatternDestroy (p); } XftPatternElt * -XftPatternFind (XftPattern *p, const char *object, Bool insert) -{ - int i; - int s; - XftPatternElt *e; - - /* match existing */ - for (i = 0; i < p->num; i++) - { - if (!_XftStrCmpIgnoreCase (object, p->elts[i].object)) - return &p->elts[i]; - } - - if (!insert) - return 0; - - /* grow array */ - if (i == p->size) - { - s = p->size + 16; - if (p->elts) - e = (XftPatternElt *) realloc (p->elts, s * sizeof (XftPatternElt)); - else - e = (XftPatternElt *) malloc (s * sizeof (XftPatternElt)); - if (!e) - return False; - p->elts = e; - while (p->size < s) - { - p->elts[p->size].object = 0; - p->elts[p->size].values = 0; - p->size++; - } - } - - /* bump count */ - p->num++; - - return &p->elts[i]; -} +XftPatternFind (FcPattern *p, const char *object, Bool insert) +{ return FcPatternFind (p, object, insert); } Bool -XftPatternAdd (XftPattern *p, const char *object, XftValue value, Bool append) -{ - XftPatternElt *e; - XftValueList *new, **prev; - - new = (XftValueList *) malloc (sizeof (XftValueList)); - if (!new) - goto bail0; - - /* dup string */ - if (value.type == XftTypeString) - { - value.u.s = _XftSaveString (value.u.s); - 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; - - e = XftPatternFind (p, object, True); - if (!e) - goto bail2; - - e->object = object; - if (append) - { - for (prev = &e->values; *prev; prev = &(*prev)->next); - *prev = new; - } - else - { - new->next = e->values; - e->values = new; - } - - return True; - -bail2: - if (value.type == XftTypeString) - free (value.u.s); - else if (value.type == XftTypeMatrix) - free (value.u.m); -bail1: - free (new); -bail0: - return False; -} +XftPatternAdd (FcPattern *p, const char *object, FcValue value, Bool append) +{ return FcPatternAdd (p, object, value, append); } Bool -XftPatternDel (XftPattern *p, const char *object) +XftPatternDel (FcPattern *p, const char *object) { XftPatternElt *e; int i; @@ -202,59 +84,59 @@ } Bool -XftPatternAddInteger (XftPattern *p, const char *object, int i) +XftPatternAddInteger (FcPattern *p, const char *object, int i) { - XftValue v; + FcValue v; - v.type = XftTypeInteger; + v.type = FcTypeInteger; v.u.i = i; return XftPatternAdd (p, object, v, True); } Bool -XftPatternAddDouble (XftPattern *p, const char *object, double d) +XftPatternAddDouble (FcPattern *p, const char *object, double d) { - XftValue v; + FcValue v; - v.type = XftTypeDouble; + v.type = FcTypeDouble; v.u.d = d; return XftPatternAdd (p, object, v, True); } Bool -XftPatternAddString (XftPattern *p, const char *object, const char *s) +XftPatternAddString (FcPattern *p, const char *object, const char *s) { - XftValue v; + FcValue v; - v.type = XftTypeString; + v.type = FcTypeString; v.u.s = (char *) s; return XftPatternAdd (p, object, v, True); } Bool -XftPatternAddMatrix (XftPattern *p, const char *object, const XftMatrix *s) +XftPatternAddMatrix (FcPattern *p, const char *object, const XftMatrix *s) { - XftValue v; + FcValue v; - v.type = XftTypeMatrix; + v.type = FcTypeMatrix; v.u.m = (XftMatrix *) s; return XftPatternAdd (p, object, v, True); } Bool -XftPatternAddBool (XftPattern *p, const char *object, Bool b) +XftPatternAddBool (FcPattern *p, const char *object, Bool b) { - XftValue v; + FcValue v; - v.type = XftTypeBool; + v.type = FcTypeBool; v.u.b = b; return XftPatternAdd (p, object, v, True); } XftResult -XftPatternGet (XftPattern *p, const char *object, int id, XftValue *v) +XftPatternGet (FcPattern *p, const char *object, int id, FcValue *v) { XftPatternElt *e; XftValueList *l; @@ -275,19 +157,19 @@ } XftResult -XftPatternGetInteger (XftPattern *p, const char *object, int id, int *i) +XftPatternGetInteger (FcPattern *p, const char *object, int id, int *i) { - XftValue v; + FcValue v; XftResult r; r = XftPatternGet (p, object, id, &v); if (r != XftResultMatch) return r; switch (v.type) { - case XftTypeDouble: + case FcTypeDouble: *i = (int) v.u.d; break; - case XftTypeInteger: + case FcTypeInteger: *i = v.u.i; break; default: @@ -297,19 +179,19 @@ } XftResult -XftPatternGetDouble (XftPattern *p, const char *object, int id, double *d) +XftPatternGetDouble (FcPattern *p, const char *object, int id, double *d) { - XftValue v; + FcValue v; XftResult r; r = XftPatternGet (p, object, id, &v); if (r != XftResultMatch) return r; switch (v.type) { - case XftTypeDouble: + case FcTypeDouble: *d = v.u.d; break; - case XftTypeInteger: + case FcTypeInteger: *d = (double) v.u.i; break; default: @@ -319,30 +201,30 @@ } XftResult -XftPatternGetString (XftPattern *p, const char *object, int id, char **s) +XftPatternGetString (FcPattern *p, const char *object, int id, char **s) { - XftValue v; + FcValue v; XftResult r; r = XftPatternGet (p, object, id, &v); if (r != XftResultMatch) return r; - if (v.type != XftTypeString) + if (v.type != FcTypeString) return XftResultTypeMismatch; *s = v.u.s; return XftResultMatch; } XftResult -XftPatternGetMatrix (XftPattern *p, const char *object, int id, XftMatrix **m) +XftPatternGetMatrix (FcPattern *p, const char *object, int id, XftMatrix **m) { - XftValue v; + FcValue v; XftResult r; r = XftPatternGet (p, object, id, &v); if (r != XftResultMatch) return r; - if (v.type != XftTypeMatrix) + if (v.type != FcTypeMatrix) return XftResultTypeMismatch; *m = v.u.m; return XftResultMatch; @@ -350,24 +232,24 @@ XftResult -XftPatternGetBool (XftPattern *p, const char *object, int id, Bool *b) +XftPatternGetBool (FcPattern *p, const char *object, int id, Bool *b) { - XftValue v; + FcValue v; XftResult r; r = XftPatternGet (p, object, id, &v); if (r != XftResultMatch) return r; - if (v.type != XftTypeBool) + if (v.type != FcTypeBool) return XftResultTypeMismatch; *b = v.u.b; return XftResultMatch; } -XftPattern * -XftPatternDuplicate (XftPattern *orig) +FcPattern * +XftPatternDuplicate (FcPattern *orig) { - XftPattern *new; + FcPattern *new; int i; XftValueList *l; @@ -390,17 +272,17 @@ return 0; } -XftPattern * -XftPatternVaBuild (XftPattern *orig, va_list va) +FcPattern * +XftPatternVaBuild (FcPattern *orig, va_list va) { - XftPattern *ret; + FcPattern *ret; _XftPatternVapBuild (ret, orig, va); return ret; } -XftPattern * -XftPatternBuild (XftPattern *orig, ...) +FcPattern * +XftPatternBuild (FcPattern *orig, ...) { va_list va; Index: xc/lib/Xft/xftrender.c diff -u xc/lib/Xft/xftrender.c:1.8 xc/lib/Xft/xftrender.c:1.15 --- xc/lib/Xft/xftrender.c:1.8 Fri Jul 13 14:16:10 2001 +++ xc/lib/Xft/xftrender.c Fri Dec 13 20:59:38 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftrender.c,v 1.8 2001/07/13 18:16:10 keithp Exp $ + * $XFree86: xc/lib/Xft/xftrender.c,v 1.15 2002/12/14 01:59:38 dawes Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -25,503 +25,957 @@ #include #include "xftint.h" +#define NUM_LOCAL 1024 +#define NUM_ELT_LOCAL 128 + +/* + * Use the Render extension to draw the glyphs + */ + void -XftRenderString8 (Display *dpy, Picture src, - XftFontStruct *font, Picture dst, - int srcx, int srcy, - int x, int y, - XftChar8 *string, int len) +XftGlyphRender (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FT_UInt *glyphs, + int nglyphs) { - XftChar32 missing[XFT_NMISSING]; + XftFontInt *font = (XftFontInt *) pub; + int i; + FT_UInt missing[XFT_NMISSING]; int nmissing; - XftChar8 *s; - int l; - - s = string; - l = len; + FT_UInt g, max; + int size, width; + Glyph wire; + char *char8; + unsigned short *char16; + unsigned int *char32; + unsigned int char_local[NUM_LOCAL]; + unsigned int *chars; + FcBool glyphs_loaded; + + if (!font->format) + return; + + /* + * Load missing glyphs + */ nmissing = 0; - while (l--) - XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); + max = 0; + glyphs_loaded = FcFalse; + for (i = 0; i < nglyphs; i++) + { + g = glyphs[i]; + if (g > max) + max = g; + if (XftFontCheckGlyph (dpy, pub, FcTrue, g, missing, &nmissing)) + glyphs_loaded = FcTrue; + } if (nmissing) - XftGlyphLoad (dpy, font, missing, nmissing); - XRenderCompositeString8 (dpy, PictOpOver, src, dst, - font->format, font->glyphset, - srcx, srcy, x, y, (char *) string, len); + XftFontLoadGlyphs (dpy, pub, FcTrue, missing, nmissing); + + if (!font->glyphset) + goto bail1; + if (max < 0x100) + { + width = 1; + size = sizeof (char); + } + else if (max < 0x10000) + { + width = 2; + size = sizeof (unsigned short); + } + else + { + width = 4; + size = sizeof (unsigned int); + } + chars = char_local; + if (nglyphs * size > sizeof (char_local)) + { + chars = malloc (nglyphs * size); + if (!chars) + goto bail1; + } + char8 = (char *) chars; + char16 = (unsigned short *) chars; + char32 = (unsigned int *) chars; + for (i = 0; i < nglyphs; i++) + { + wire = (Glyph) glyphs[i]; + if (wire >= font->num_glyphs || !font->glyphs[wire]) + wire = 0; + switch (width) { + case 1: char8[i] = (char) wire; break; + case 2: char16[i] = (unsigned short) wire; break; + case 4: char32[i] = (unsigned long) wire; break; + } + } + switch (width) { + case 1: + default: + XRenderCompositeString8 (dpy, op, + src, dst, font->format, font->glyphset, + srcx, srcy, x, y, char8, nglyphs); + break; + case 2: + XRenderCompositeString16(dpy, op, + src, dst, font->format, font->glyphset, + srcx, srcy, x, y, char16, nglyphs); + break; + case 4: + XRenderCompositeString32(dpy, op, + src, dst, font->format, font->glyphset, + srcx, srcy, x, y, char32, nglyphs); + break; + } + if (chars != char_local) + free (chars); +bail1: + if (glyphs_loaded) + _XftFontManageMemory (dpy, pub); } void -XftRenderString16 (Display *dpy, Picture src, - XftFontStruct *font, Picture dst, - int srcx, int srcy, - int x, int y, - XftChar16 *string, int len) +XftGlyphSpecRender (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + _Xconst XftGlyphSpec *glyphs, + int nglyphs) { - XftChar32 missing[XFT_NMISSING]; + XftFontInt *font = (XftFontInt *) pub; + int i, j; + FT_UInt missing[XFT_NMISSING]; int nmissing; - XftChar16 *s; - int l; - - s = string; - l = len; + int n; + FT_UInt g; + XftGlyph *glyph; + FT_UInt max; + int size, width; + char *char8; + unsigned short *char16; + unsigned int *char32; + unsigned int char_local[NUM_LOCAL]; + unsigned int *chars; + XGlyphElt8 *elts; + XGlyphElt8 elts_local[NUM_ELT_LOCAL]; + FcBool glyphs_loaded; + int nelt; + int x, y; + + if (!font->format) + return; + if (!nglyphs) + return; + + /* + * Load missing glyphs + */ + max = 0; nmissing = 0; - while (l--) - XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); + glyphs_loaded = FcFalse; + g = glyphs[0].glyph; + for (i = 0; i < nglyphs; i++) + { + g = glyphs[i].glyph; + if (g > max) + max = g; + if (XftFontCheckGlyph (dpy, pub, FcTrue, g, missing, &nmissing)) + glyphs_loaded = FcTrue; + } if (nmissing) - XftGlyphLoad (dpy, font, missing, nmissing); - XRenderCompositeString16 (dpy, PictOpOver, src, dst, - font->format, font->glyphset, - srcx, srcy, x, y, string, len); + XftFontLoadGlyphs (dpy, pub, FcTrue, missing, nmissing); + + if (!font->glyphset) + goto bail1; + + /* + * See what encoding size is needed + */ + if (max < 0x100) + { + size = sizeof (char); + width = 1; + } + else if (max < 0x10000) + { + size = sizeof (unsigned short); + width = 2; + } + else + { + size = sizeof (unsigned int); + width = 4; + } + chars = char_local; + if (nglyphs * size > NUM_LOCAL) + { + chars = malloc (nglyphs * size); + if (!chars) + goto bail1; + } + char8 = (char *) chars; + char16 = (unsigned short *) chars; + char32 = (unsigned int *) chars; + + /* + * Compute the number of glyph elts needed + */ + nelt = 1; + for (i = 0; i < nglyphs; i++) + { + g = glyphs[i].glyph; + /* Substitute default for non-existant glyphs */ + if (g >= font->num_glyphs || !font->glyphs[g]) + g = 0; + if (font->glyphs[g]) + break; + } + if (i == nglyphs) + goto bail2; + glyph = font->glyphs[g]; + x = glyphs[i].x + glyph->metrics.xOff; + y = glyphs[i].y + glyph->metrics.yOff; + while (++i < nglyphs) + { + g = glyphs[i].glyph; + /* Substitute default for non-existant glyphs */ + if (g >= font->num_glyphs || !font->glyphs[g]) + g = 0; + /* + * check to see if the glyph is placed where it would + * fall using the normal spacing + */ + if ((glyph = font->glyphs[g])) + { + if (x != glyphs[i].x || y != glyphs[i].y) + { + x = glyphs[i].x; + y = glyphs[i].y; + ++nelt; + } + x += glyph->metrics.xOff; + y += glyph->metrics.yOff; + } + } + + elts = elts_local; + if (nelt > NUM_ELT_LOCAL) + { + elts = malloc (nelt * sizeof (XGlyphElt8)); + if (!elts) + goto bail2; + } + + /* + * Generate the list of glyph elts + */ + nelt = 0; + x = y = 0; + n = 0; + j = 0; + for (i = 0; i < nglyphs; i++) + { + g = glyphs[i].glyph; + /* Substitute default for non-existant glyphs */ + if (g >= font->num_glyphs || !font->glyphs[g]) + g = 0; + if ((glyph = font->glyphs[g])) + { + if (!i || x != glyphs[i].x || y != glyphs[i].y) + { + if (n) + { + elts[nelt].nchars = n; + nelt++; + } + elts[nelt].glyphset = font->glyphset; + elts[nelt].chars = char8 + size * j; + elts[nelt].xOff = glyphs[i].x - x; + elts[nelt].yOff = glyphs[i].y - y; + x = glyphs[i].x; + y = glyphs[i].y; + n = 0; + } + switch (width) { + case 1: char8[j] = (char) g; break; + case 2: char16[j] = (unsigned short) g; break; + case 4: char32[j] = (unsigned int) g; break; + } + x += glyph->metrics.xOff; + y += glyph->metrics.yOff; + j++; + n++; + } + } + if (n) + { + elts[nelt].nchars = n; + nelt++; + } + switch (width) { + case 1: + XRenderCompositeText8 (dpy, op, src, dst, font->format, + srcx, srcy, glyphs[0].x, glyphs[0].y, + elts, nelt); + break; + case 2: + XRenderCompositeText16 (dpy, op, src, dst, font->format, + srcx, srcy, glyphs[0].x, glyphs[0].y, + (XGlyphElt16 *) elts, nelt); + break; + case 4: + XRenderCompositeText32 (dpy, op, src, dst, font->format, + srcx, srcy, glyphs[0].x, glyphs[0].y, + (XGlyphElt32 *) elts, nelt); + break; + } + + if (elts != elts_local) + free (elts); +bail2: + if (chars != char_local) + free (chars); +bail1: + if (glyphs_loaded) + _XftFontManageMemory (dpy, pub); } void -XftRenderString32 (Display *dpy, Picture src, - XftFontStruct *font, Picture dst, - int srcx, int srcy, - int x, int y, - XftChar32 *string, int len) +XftCharSpecRender (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + _Xconst XftCharSpec *chars, + int len) { - XftChar32 missing[XFT_NMISSING]; - int nmissing; - XftChar32 *s; - int l; + XftGlyphSpec *glyphs, glyphs_local[NUM_LOCAL]; + int i; - s = string; - l = len; - nmissing = 0; - while (l--) - XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); - if (nmissing) - XftGlyphLoad (dpy, font, missing, nmissing); - XRenderCompositeString32 (dpy, PictOpOver, src, dst, - font->format, font->glyphset, - srcx, srcy, x, y, string, len); + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else + { + glyphs = malloc (len * sizeof (XftGlyphSpec)); + if (!glyphs) + return; + } + for (i = 0; i < len; i++) + { + glyphs[i].glyph = XftCharIndex(dpy, pub, chars[i].ucs4); + glyphs[i].x = chars[i].x; + glyphs[i].y = chars[i].y; + } + + XftGlyphSpecRender (dpy, op, src, pub, dst, srcx, srcy, glyphs, len); + + if (glyphs != glyphs_local) + free (glyphs); } 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)) +XftGlyphFontSpecRender (Display *dpy, + int op, + Picture src, + Picture dst, + int srcx, + int srcy, + _Xconst XftGlyphFontSpec *glyphs, + int nglyphs) +{ + int i, j; + XftFont *prevPublic; + XftFontInt *firstFont; + FT_UInt missing[XFT_NMISSING]; + int nmissing; + int n; + FT_UInt g; + XftGlyph *glyph; + FT_UInt max; + int size, width; + char *char8; + unsigned short *char16; + unsigned int *char32; + unsigned int char_local[NUM_LOCAL]; + unsigned int *chars; + XGlyphElt8 *elts; + XGlyphElt8 elts_local[NUM_ELT_LOCAL]; + FcBool glyphs_loaded; + int nelt; + int x, y; + + if (!nglyphs) return; + + /* + * Load missing glyphs. Have to load them + * one at a time in case the font changes + */ + max = 0; + glyphs_loaded = FcFalse; + g = glyphs[0].glyph; + for (i = 0; i < nglyphs; i++) + { + XftFont *pub = glyphs[i].font; + XftFontInt *font = (XftFontInt *) pub; + g = glyphs[i].glyph; + if (g > max) + max = g; + nmissing = 0; + if (XftFontCheckGlyph (dpy, pub, FcTrue, g, missing, &nmissing)) + glyphs_loaded = FcTrue; + if (nmissing) + XftFontLoadGlyphs (dpy, pub, FcTrue, missing, nmissing); + if (!font->format) + goto bail1; + if (!font->glyphset) + goto bail1; + } - d = lbuf; - if (n * width > sizeof (lbuf)) + /* + * See what encoding size is needed + */ + if (max < 0x100) { - d = (XftChar32 *) malloc (n * width); - if (!d) - return; + size = sizeof (char); + width = 1; + } + else if (max < 0x10000) + { + size = sizeof (unsigned short); + width = 2; + } + else + { + size = sizeof (unsigned int); + width = 4; } + chars = char_local; + if (nglyphs * size > NUM_LOCAL) + { + chars = malloc (nglyphs * size); + if (!chars) + goto bail1; + } + char8 = (char *) chars; + char16 = (unsigned short *) chars; + char32 = (unsigned int *) chars; - switch (width) { - case 4: - s = string; - rlen = len; - dst32 = d; - while (rlen) + /* + * Compute the number of glyph elts needed + */ + nelt = 1; + firstFont = 0; + for (i = 0; i < nglyphs; i++) + { + XftFont *pub = glyphs[i].font; + XftFontInt *font = (XftFontInt *) pub; + g = glyphs[i].glyph; + /* Substitute default for non-existant glyphs */ + if (g >= font->num_glyphs || !font->glyphs[g]) + g = 0; + if (font->glyphs[g]) { - clen = XftUtf8ToUcs4 (s, &c, rlen); - if (clen <= 0) /* malformed UTF8 string */ - return; - *dst32++ = c; - s += clen; - rlen -= clen; + firstFont = font; + break; } - 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) + } + if (i == nglyphs) + goto bail2; + glyph = firstFont->glyphs[g]; + x = glyphs[i].x + glyph->metrics.xOff; + y = glyphs[i].y + glyph->metrics.yOff; + prevPublic = 0; + while (++i < nglyphs) + { + XftFont *pub = glyphs[i].font; + XftFontInt *font = (XftFontInt *) pub; + g = glyphs[i].glyph; + /* Substitute default for non-existant glyphs */ + if (g >= font->num_glyphs || !font->glyphs[g]) + g = 0; + /* + * check to see if the glyph is placed where it would + * fall using the normal spacing + */ + if ((glyph = font->glyphs[g])) { - clen = XftUtf8ToUcs4 (s, &c, rlen); - if (clen <= 0) /* malformed UTF8 string */ - return; - *dst16++ = c; - s += clen; - rlen -= clen; + if (pub != prevPublic || x != glyphs[i].x || y != glyphs[i].y) + { + prevPublic = pub; + x = glyphs[i].x; + y = glyphs[i].y; + ++nelt; + } + x += glyph->metrics.xOff; + y += glyph->metrics.yOff; } - 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) + } + + elts = elts_local; + if (nelt > NUM_ELT_LOCAL) + { + elts = malloc (nelt * sizeof (XGlyphElt8)); + if (!elts) + goto bail2; + } + + /* + * Generate the list of glyph elts + */ + nelt = 0; + x = y = 0; + n = 0; + j = 0; + prevPublic = 0; + for (i = 0; i < nglyphs; i++) + { + XftFont *pub = glyphs[i].font; + XftFontInt *font = (XftFontInt *) pub; + + g = glyphs[i].glyph; + /* Substitute default for non-existant glyphs */ + if (g >= font->num_glyphs || !font->glyphs[g]) + g = 0; + if ((glyph = font->glyphs[g])) { - clen = XftUtf8ToUcs4 (s, &c, rlen); - if (clen <= 0) /* malformed UTF8 string */ - return; - *dst8++ = c; - s += clen; - rlen -= clen; + if (!i || pub != prevPublic || x != glyphs[i].x || y != glyphs[i].y) + { + if (n) + { + elts[nelt].nchars = n; + nelt++; + } + elts[nelt].glyphset = font->glyphset; + elts[nelt].chars = char8 + size * j; + elts[nelt].xOff = glyphs[i].x - x; + elts[nelt].yOff = glyphs[i].y - y; + prevPublic = pub; + x = glyphs[i].x; + y = glyphs[i].y; + n = 0; + } + switch (width) { + case 1: char8[j] = (char) g; break; + case 2: char16[j] = (unsigned short) g; break; + case 4: char32[j] = (unsigned int) g; break; + } + x += glyph->metrics.xOff; + y += glyph->metrics.yOff; + j++; + n++; } - dst8 = (XftChar8 *) d; - XftRenderString8 (dpy, src, font, dst, srcx, srcy, x, y, - dst8, n); + } + if (n) + { + elts[nelt].nchars = n; + nelt++; + } + switch (width) { + case 1: + XRenderCompositeText8 (dpy, op, src, dst, firstFont->format, + srcx, srcy, glyphs[0].x, glyphs[0].y, + elts, nelt); break; + case 2: + XRenderCompositeText16 (dpy, op, src, dst, firstFont->format, + srcx, srcy, glyphs[0].x, glyphs[0].y, + (XGlyphElt16 *) elts, nelt); + break; + case 4: + XRenderCompositeText32 (dpy, op, src, dst, firstFont->format, + srcx, srcy, glyphs[0].x, glyphs[0].y, + (XGlyphElt32 *) elts, nelt); + break; } - if (d != lbuf) - free (d); + + if (elts != elts_local) + free (elts); +bail2: + if (chars != char_local) + free (chars); +bail1: + if (glyphs_loaded) + for (i = 0; i < nglyphs; i++) + _XftFontManageMemory (dpy, glyphs[i].font); } - + void -XftRenderExtents8 (Display *dpy, - XftFontStruct *font, - XftChar8 *string, - int len, - XGlyphInfo *extents) +XftCharFontSpecRender (Display *dpy, + int op, + Picture src, + Picture dst, + int srcx, + int srcy, + _Xconst XftCharFontSpec *chars, + int len) { - XftChar32 missing[XFT_NMISSING]; - int nmissing; - XftChar8 *s, c; - int l; - XGlyphInfo *gi; - int x, y; - int left, right, top, bottom; - int overall_left, overall_right; - int overall_top, overall_bottom; + XftGlyphFontSpec *glyphs, glyphs_local[NUM_LOCAL]; + int i; - s = string; - l = len; - nmissing = 0; - while (l--) - XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); - if (nmissing) - XftGlyphLoad (dpy, font, missing, nmissing); - - gi = 0; - while (len) + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - c = *string++; - len--; - gi = c < font->nrealized ? font->realized[c] : 0; - if (gi) - break; + glyphs = malloc (len * sizeof (XftGlyphFontSpec)); + if (!glyphs) + return; } - if (len == 0 && !gi) + for (i = 0; i < len; i++) { - extents->width = 0; - extents->height = 0; - extents->x = 0; - extents->y = 0; - extents->yOff = 0; - extents->xOff = 0; - return; + glyphs[i].font = chars[i].font; + glyphs[i].glyph = XftCharIndex(dpy, glyphs[i].font, chars[i].ucs4); + glyphs[i].x = chars[i].x; + glyphs[i].y = chars[i].y; } - 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; - 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; + + XftGlyphFontSpecRender (dpy, op, src, dst, srcx, srcy, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); } void -XftRenderExtents16 (Display *dpy, - XftFontStruct *font, - XftChar16 *string, - int len, - XGlyphInfo *extents) +XftTextRender8 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len) { - XftChar32 missing[XFT_NMISSING]; - int nmissing; - XftChar16 *s, c; - int l; - XGlyphInfo *gi; - int x, y; - int left, right, top, bottom; - int overall_left, overall_right; - int overall_top, overall_bottom; + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; - s = string; - l = len; - nmissing = 0; - while (l--) - XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); - if (nmissing) - XftGlyphLoad (dpy, font, missing, nmissing); - - gi = 0; - while (len) + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - c = *string++; - len--; - gi = c < font->nrealized ? font->realized[c] : 0; - if (gi) - break; + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; } - if (len == 0 && !gi) + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, string[i]); + XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftTextRender16 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar16 *string, + int len) +{ + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - extents->width = 0; - extents->height = 0; - extents->x = 0; - extents->y = 0; - extents->yOff = 0; - extents->xOff = 0; - return; + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; } - 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; - 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; + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, string[i]); + XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); } void -XftRenderExtents32 (Display *dpy, - XftFontStruct *font, - XftChar32 *string, - int len, - XGlyphInfo *extents) +XftTextRender16BE (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len) { - XftChar32 missing[XFT_NMISSING]; - int nmissing; - XftChar32 *s, c; - int l; - XGlyphInfo *gi; - int x, y; - int left, right, top, bottom; - int overall_left, overall_right; - int overall_top, overall_bottom; + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; - s = string; - l = len; - nmissing = 0; - while (l--) - XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); - if (nmissing) - XftGlyphLoad (dpy, font, missing, nmissing); - - gi = 0; - while (len) + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - c = *string++; - len--; - gi = c < font->nrealized ? font->realized[c] : 0; - if (gi) - break; + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; } - if (len == 0 && !gi) + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, + (string[i*2]<<8) | string[i*2+1]); + XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftTextRender16LE (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len) +{ + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - extents->width = 0; - extents->height = 0; - extents->x = 0; - extents->y = 0; - extents->yOff = 0; - extents->xOff = 0; - return; + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; } - 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; - 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; + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, + string[i*2] | (string[i*2+1]<<8)); + XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); } void -XftRenderExtentsUtf8 (Display *dpy, - XftFontStruct *font, - XftChar8 *string, - int len, - XGlyphInfo *extents) +XftTextRender32 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar32 *string, + int len) { - XftChar32 missing[XFT_NMISSING]; - int nmissing; - XftChar8 *s; - XftChar32 c; - int l, clen; - XGlyphInfo *gi; - int x, y; - int left, right, top, bottom; - int overall_left, overall_right; - int overall_top, overall_bottom; + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; - s = string; - l = len; - nmissing = 0; - while (l) + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - clen = XftUtf8ToUcs4 (s, &c, l); - if (clen < 0) - break; - XftGlyphCheck (dpy, font, (XftChar32) c, missing, &nmissing); - s += clen; - l -= clen; + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; } - if (nmissing) - XftGlyphLoad (dpy, font, missing, nmissing); - - gi = 0; - while (len) + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, string[i]); + XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftTextRender32BE (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len) +{ + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - 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; + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; } - if (len == 0 && !gi) + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, + (string[i*4] << 24) | + (string[i*4+1] << 16) | + (string[i*4+2] << 8) | + (string[i*4+3])); + XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftTextRender32LE (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len) +{ + FT_UInt *glyphs, glyphs_local[NUM_LOCAL]; + int i; + + if (len <= NUM_LOCAL) + glyphs = glyphs_local; + else { - extents->width = 0; - extents->height = 0; - extents->x = 0; - extents->y = 0; - extents->yOff = 0; - extents->xOff = 0; - return; + glyphs = malloc (len * sizeof (FT_UInt)); + if (!glyphs) + return; } - 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) + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, + (string[i*4]) | + (string[i*4+1] << 8) | + (string[i*4+2] << 16) | + (string[i*4+3] << 24)); + XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftTextRenderUtf8 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + int len) +{ + FT_UInt *glyphs, *glyphs_new, glyphs_local[NUM_LOCAL]; + FcChar32 ucs4; + int i; + int l; + int size; + + i = 0; + glyphs = glyphs_local; + size = NUM_LOCAL; + while (len && (l = FcUtf8ToUcs4 (string, &ucs4, len)) > 0) { - clen = XftUtf8ToUcs4 (string, &c, len); - if (clen < 0) - break; - len -= clen; - string += clen; - gi = c < font->nrealized ? font->realized[c] : 0; - if (!gi) - continue; - 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; + if (i == size) + { + glyphs_new = malloc (size * 2 * sizeof (FT_UInt)); + if (!glyphs_new) + { + if (glyphs != glyphs_local) + free (glyphs); + return; + } + memcpy (glyphs_new, glyphs, size * sizeof (FT_UInt)); + size *= 2; + if (glyphs != glyphs_local) + free (glyphs); + glyphs = glyphs_new; + } + glyphs[i++] = XftCharIndex (dpy, pub, ucs4); + string += l; + len -= l; + } + XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, i); + if (glyphs != glyphs_local) + free (glyphs); +} + +void +XftTextRenderUtf16 (Display *dpy, + int op, + Picture src, + XftFont *pub, + Picture dst, + int srcx, + int srcy, + int x, + int y, + _Xconst FcChar8 *string, + FcEndian endian, + int len) +{ + FT_UInt *glyphs, *glyphs_new, glyphs_local[NUM_LOCAL]; + FcChar32 ucs4; + int i; + int l; + int size; + + i = 0; + glyphs = glyphs_local; + size = NUM_LOCAL; + while (len && (l = FcUtf16ToUcs4 (string, endian, &ucs4, len)) > 0) + { + if (i == size) + { + glyphs_new = malloc (size * 2 * sizeof (FT_UInt)); + if (!glyphs_new) + { + if (glyphs != glyphs_local) + free (glyphs); + return; + } + memcpy (glyphs_new, glyphs, size * sizeof (FT_UInt)); + size *= 2; + if (glyphs != glyphs_local) + free (glyphs); + glyphs = glyphs_new; + } + glyphs[i++] = XftCharIndex (dpy, pub, ucs4); + string += l; + len -= l; + } + XftGlyphRender (dpy, PictOpOver, src, pub, dst, + srcx, srcy, x, y, glyphs, i); + if (glyphs != glyphs_local) + free (glyphs); } Index: xc/lib/Xft/xftstr.c diff -u xc/lib/Xft/xftstr.c:1.6 xc/lib/Xft/xftstr.c:1.7 --- xc/lib/Xft/xftstr.c:1.6 Sun Apr 1 10:00:01 2001 +++ xc/lib/Xft/xftstr.c Fri Feb 15 02:36:11 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftstr.c,v 1.6 2001/04/01 14:00:01 tsi Exp $ + * $XFree86: xc/lib/Xft/xftstr.c,v 1.7 2002/02/15 07:36:11 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -27,233 +27,14 @@ #include #include "xftint.h" -char * -_XftSaveString (const char *s) -{ - char *r; - - if (!s) - return 0; - r = (char *) malloc (strlen (s) + 1); - if (!r) - return 0; - strcpy (r, s); - return r; -} - -const char * -_XftGetInt(const char *ptr, int *val) -{ - if (*ptr == '*') { - *val = -1; - ptr++; - } else - for (*val = 0; *ptr >= '0' && *ptr <= '9';) - *val = *val * 10 + *ptr++ - '0'; - if (*ptr == '-') - return ptr; - return (char *) 0; -} - -char * -_XftSplitStr (const char *field, char *save) -{ - char *s = save; - char c; - - while (*field) - { - if (*field == '-') - break; - c = *field++; - *save++ = c; - } - *save = 0; - return s; -} - -char * -_XftDownStr (const char *field, char *save) -{ - char *s = save; - char c; - - while (*field) - { - c = *field++; - *save++ = c; - } - *save = 0; - return s; -} - -const char * -_XftSplitField (const char *field, char *save) -{ - char c; - - while (*field) - { - if (*field == '-' || *field == '=') - break; - c = *field++; - *save++ = c; - } - *save = 0; - return field; -} - -const char * -_XftSplitValue (const char *field, char *save) -{ - char c; - - while (*field) - { - if (*field == '-' || *field == ',') - break; - c = *field++; - *save++ = c; - } - *save = 0; - if (*field) - field++; - return field; -} - int _XftMatchSymbolic (XftSymbolic *s, int n, const char *name, int def) { while (n--) { - if (!_XftStrCmpIgnoreCase (s->name, name)) + if (!FcStrCmpIgnoreCase ((FcChar8 *) s->name, (FcChar8 *) name)) return s->value; s++; } return def; -} - -int -_XftStrCmpIgnoreCase (const char *s1, const char *s2) -{ - char c1, c2; - - for (;;) - { - c1 = *s1++; - c2 = *s2++; - if (!c1 || !c2) - break; - if (isupper (c1)) - c1 = tolower (c1); - if (isupper (c2)) - c2 = tolower (c2); - if (c1 != c2) - 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/xftswap.c diff -u /dev/null xc/lib/Xft/xftswap.c:1.1 --- /dev/null Thu Feb 27 12:27:23 2003 +++ xc/lib/Xft/xftswap.c Fri Feb 15 02:37:35 2002 @@ -0,0 +1,122 @@ +/* + * $XFree86: xc/lib/Xft/xftswap.c,v 1.1 2002/02/15 07:37:35 keithp Exp $ + * + * Copyright © 2002 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 "xftint.h" + +int +XftNativeByteOrder (void) +{ + int whichbyte = 1; + + if (*((char *) &whichbyte)) + return LSBFirst; + return MSBFirst; +} + +/* byte swap a 32-bit value */ +#define swapl(x, n) { \ + n = ((char *) (x))[0];\ + ((char *) (x))[0] = ((char *) (x))[3];\ + ((char *) (x))[3] = n;\ + n = ((char *) (x))[1];\ + ((char *) (x))[1] = ((char *) (x))[2];\ + ((char *) (x))[2] = n; } + +/* byte swap a short */ +#define swaps(x, n) { \ + n = ((char *) (x))[0];\ + ((char *) (x))[0] = ((char *) (x))[1];\ + ((char *) (x))[1] = n; } + +/* byte swap a three-byte unit */ +#define swapt(x, n) { \ + n = ((char *) (x))[0];\ + ((char *) (x))[0] = ((char *) (x))[2];\ + ((char *) (x))[2] = n; } + +void +XftSwapCARD32 (CARD32 *data, int u) +{ + char n; + while (u--) + { + swapl (data, n); + data++; + } +} + +void +XftSwapCARD24 (CARD8 *data, int width, int height) +{ + int units, u; + char n; + CARD8 *d; + + units = width / 3; + while (height--) + { + d = data; + data += width; + u = units; + while (u--) + { + swapt (d, n); + d += 3; + } + } +} + +void +XftSwapCARD16 (CARD16 *data, int u) +{ + char n; + while (u--) + { + swaps (data, n); + data++; + } +} + +void +XftSwapImage (XImage *image) +{ + switch (image->bits_per_pixel) { + case 32: + XftSwapCARD32 ((CARD32 *) image->data, + image->height * image->bytes_per_line >> 2); + break; + case 24: + XftSwapCARD24 ((CARD8 *) image->data, + image->bytes_per_line, + image->height); + break; + case 16: + XftSwapCARD16 ((CARD16 *) image->data, + image->height * image->bytes_per_line >> 1); + break; + default: + break; + } +} Index: xc/lib/Xft/xftxlfd.c diff -u xc/lib/Xft/xftxlfd.c:1.7 xc/lib/Xft/xftxlfd.c:1.9 --- xc/lib/Xft/xftxlfd.c:1.7 Fri Dec 22 00:05:16 2000 +++ xc/lib/Xft/xftxlfd.c Sat Aug 31 14:08:10 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftxlfd.c,v 1.7 2000/12/22 05:05:16 tsi Exp $ + * $XFree86: xc/lib/Xft/xftxlfd.c,v 1.9 2002/08/31 18:08:10 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -28,28 +28,67 @@ #include "xftint.h" static XftSymbolic XftXlfdWeights[] = { - { "light", XFT_WEIGHT_LIGHT }, - { "medium", XFT_WEIGHT_MEDIUM }, - { "regular", XFT_WEIGHT_MEDIUM }, - { "demibold", XFT_WEIGHT_DEMIBOLD }, - { "bold", XFT_WEIGHT_BOLD }, - { "black", XFT_WEIGHT_BLACK }, + { "light", FC_WEIGHT_LIGHT }, + { "medium", FC_WEIGHT_MEDIUM }, + { "regular", FC_WEIGHT_MEDIUM }, + { "demibold", FC_WEIGHT_DEMIBOLD }, + { "bold", FC_WEIGHT_BOLD }, + { "black", FC_WEIGHT_BLACK }, }; #define NUM_XLFD_WEIGHTS (sizeof XftXlfdWeights/sizeof XftXlfdWeights[0]) static XftSymbolic XftXlfdSlants[] = { - { "r", XFT_SLANT_ROMAN }, - { "i", XFT_SLANT_ITALIC }, - { "o", XFT_SLANT_OBLIQUE }, + { "r", FC_SLANT_ROMAN }, + { "i", FC_SLANT_ITALIC }, + { "o", FC_SLANT_OBLIQUE }, }; #define NUM_XLFD_SLANTS (sizeof XftXlfdSlants/sizeof XftXlfdSlants[0]) -XftPattern * -XftXlfdParse (const char *xlfd_orig, Bool ignore_scalable, Bool complete) +/* + * Cut out one XLFD field, placing it in 'save' and return + * the start of 'save' + */ +static char * +XftSplitStr (const char *field, char *save) +{ + char *s = save; + char c; + + while (*field) + { + if (*field == '-') + break; + c = *field++; + *save++ = c; + } + *save = 0; + return s; +} + +/* + * convert one XLFD numeric field. Return -1 if the field is '*' + */ + +static const char * +XftGetInt(const char *ptr, int *val) { - XftPattern *pat; + if (*ptr == '*') { + *val = -1; + ptr++; + } else + for (*val = 0; *ptr >= '0' && *ptr <= '9';) + *val = *val * 10 + *ptr++ - '0'; + if (*ptr == '-') + return ptr; + return (char *) 0; +} + +FcPattern * +XftXlfdParse (const char *xlfd_orig, FcBool ignore_scalable, FcBool complete) +{ + FcPattern *pat; const char *xlfd = xlfd_orig; const char *foundry; const char *family; @@ -58,7 +97,6 @@ const char *registry; const char *encoding; char *save; - char style[128]; int pixel; int point; int resx; @@ -74,20 +112,20 @@ if (!(xlfd = strchr (slant = ++xlfd, '-'))) return 0; if (!(xlfd = strchr (/* setwidth_name = */ ++xlfd, '-'))) return 0; if (!(xlfd = strchr (/* add_style_name = */ ++xlfd, '-'))) return 0; - if (!(xlfd = _XftGetInt (++xlfd, &pixel))) return 0; - if (!(xlfd = _XftGetInt (++xlfd, &point))) return 0; - if (!(xlfd = _XftGetInt (++xlfd, &resx))) return 0; - if (!(xlfd = _XftGetInt (++xlfd, &resy))) return 0; + if (!(xlfd = XftGetInt (++xlfd, &pixel))) return 0; + if (!(xlfd = XftGetInt (++xlfd, &point))) return 0; + if (!(xlfd = XftGetInt (++xlfd, &resx))) return 0; + if (!(xlfd = XftGetInt (++xlfd, &resy))) return 0; if (!(xlfd = strchr (/* spacing = */ ++xlfd, '-'))) return 0; if (!(xlfd = strchr (/* average_width = */ ++xlfd, '-'))) return 0; if (!(xlfd = strchr (registry = ++xlfd, '-'))) return 0; /* make sure no fields follow this one */ if ((xlfd = strchr (encoding = ++xlfd, '-'))) return 0; - if (ignore_scalable && !pixel) + if (!pixel) return 0; - pat = XftPatternCreate (); + pat = FcPatternCreate (); if (!pat) return 0; @@ -96,240 +134,47 @@ if (!save) return 0; - if (!XftPatternAddString (pat, XFT_XLFD, xlfd_orig)) goto bail; + if (!FcPatternAddString (pat, XFT_XLFD, (FcChar8 *) xlfd_orig)) goto bail; - _XftSplitStr (foundry, save); + XftSplitStr (foundry, save); if (save[0] && strcmp (save, "*") != 0) - if (!XftPatternAddString (pat, XFT_FOUNDRY, save)) goto bail; + if (!FcPatternAddString (pat, FC_FOUNDRY, (FcChar8 *) save)) goto bail; - _XftSplitStr (family, save); + XftSplitStr (family, save); if (save[0] && strcmp (save, "*") != 0) - if (!XftPatternAddString (pat, XFT_FAMILY, save)) goto bail; + if (!FcPatternAddString (pat, FC_FAMILY, (FcChar8 *) save)) goto bail; weight_value = _XftMatchSymbolic (XftXlfdWeights, NUM_XLFD_WEIGHTS, - _XftSplitStr (weight_name, save), - XFT_WEIGHT_MEDIUM); - if (!XftPatternAddInteger (pat, XFT_WEIGHT, weight_value)) + XftSplitStr (weight_name, save), + FC_WEIGHT_MEDIUM); + if (!FcPatternAddInteger (pat, FC_WEIGHT, weight_value)) goto bail; slant_value = _XftMatchSymbolic (XftXlfdSlants, NUM_XLFD_SLANTS, - _XftSplitStr (slant, save), - XFT_SLANT_ROMAN); - if (!XftPatternAddInteger (pat, XFT_SLANT, slant_value)) + XftSplitStr (slant, save), + FC_SLANT_ROMAN); + if (!FcPatternAddInteger (pat, FC_SLANT, slant_value)) goto bail; dpixel = (double) pixel; - if (complete) + if (point > 0) { - /* - * Build a style name - */ - style[0] = '\0'; - switch (weight_value) { - case XFT_WEIGHT_LIGHT: strcat (style, "light"); break; - case XFT_WEIGHT_DEMIBOLD: strcat (style, "demibold"); break; - case XFT_WEIGHT_BOLD: strcat (style, "bold"); break; - case XFT_WEIGHT_BLACK: strcat (style, "black"); break; - } - if (slant_value != XFT_SLANT_ROMAN) { - if (style[0]) - strcat (style, " "); - switch (slant_value) { - case XFT_SLANT_ITALIC: strcat (style, "italic"); break; - case XFT_SLANT_OBLIQUE: strcat (style, "oblique"); break; - } - } - if (!style[0]) - strcat (style, "Regular"); - - if (!XftPatternAddString (pat, XFT_STYLE, style)) - goto bail; - if (!XftPatternAddBool (pat, XFT_SCALABLE, pixel == 0)) goto bail; - if (!XftPatternAddBool (pat, XFT_CORE, True)) goto bail; - if (!XftPatternAddBool (pat, XFT_ANTIALIAS, False)) goto bail; - } - else - { - if (point > 0) + if (!FcPatternAddDouble (pat, FC_SIZE, ((double) point) / 10.0)) goto bail; + if (pixel <= 0 && resy > 0) { - if (!XftPatternAddDouble (pat, XFT_SIZE, ((double) point) / 10.0)) goto bail; - if (pixel <= 0 && resy > 0) - { - dpixel = (double) point * (double) resy / 720.0; - } + dpixel = (double) point * (double) resy / 720.0; } } if (dpixel > 0) - if (!XftPatternAddDouble (pat, XFT_PIXEL_SIZE, dpixel)) goto bail; + if (!FcPatternAddDouble (pat, FC_PIXEL_SIZE, dpixel)) goto bail; - _XftDownStr (registry, save); - if (registry[0] && !strchr (registry, '*')) - if (!XftPatternAddString (pat, XFT_ENCODING, save)) goto bail; - free (save); return pat; bail: free (save); - XftPatternDestroy (pat); + FcPatternDestroy (pat); return 0; -} - -Bool -XftCoreAddFonts (XftFontSet *set, Display *dpy, Bool ignore_scalable) -{ - char **xlfds; - int num; - int i; - XftPattern *font; - Bool ret; - - xlfds = XListFonts (dpy, - "-*-*-*-*-*-*-*-*-*-*-*-*-*-*", - 10000, &num); - if (!xlfds) - return False; - ret = True; - for (i = 0; ret && i < num; i++) - { - font = XftXlfdParse (xlfds[i], ignore_scalable, True); - if (font) - { - if (!XftFontSetAdd (set, font)) - { - XftPatternDestroy (font); - ret = False; - } - } - } - XFreeFontNames (xlfds); - return ret; -} - -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; - int d; - Bool scalable; - double pixel_size; - int pixel_int; - XFontStruct *ret; - -#if 0 - printf ("Core "); - XftPatternPrint (pattern); -#endif - if (XftPatternGetString (pattern, XFT_XLFD, 0, &xlfd) != XftResultMatch) - return 0; - if (XftPatternGetBool (pattern, XFT_SCALABLE, 0, &scalable) != XftResultMatch) - return 0; - if (scalable) - { - if (XftPatternGetDouble (pattern, XFT_PIXEL_SIZE, 0, &pixel_size) != XftResultMatch) - return 0; - pixel_int = (int) (pixel_size + 0.5); - if (pixel_int) - { - xlfd_pixel = (char *) malloc (strlen (xlfd) + 32); - i = xlfd; - o = xlfd_pixel; - d = 0; - while (d != 7 && *i) - { - if ((*o++ = *i++) == '-') - d++; - } - if (*i) - { - sprintf (o, "%d", pixel_int); - o += strlen (o); - while (*i != '-') - ++i; - } - while ((*o++ = *i++)); -#if 0 - printf ("original %s sized %s\n", xlfd, xlfd_pixel); -#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); - } - if (xlfd_pixel) - free (xlfd_pixel); - 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/Xft/config/config-subst diff -u /dev/null xc/lib/Xft/config/config-subst:1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft/config/config-subst Thu May 23 19:01:57 2002 @@ -0,0 +1,10 @@ +#!/bin/sh +script=config-subst.$$ +trap "rm $script" 0 +rm -f $script +for i in ${1+"$@"}; do + var="`echo "$i" | sed 's/=.*$//'`" + val="`echo "$i" | sed 's/^[^=]*=//'`" + echo "s;@$var@;$val;" >> $script +done +sed -f $script Index: xc/lib/Xft/config/config.guess diff -u /dev/null xc/lib/Xft/config/config.guess:1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft/config/config.guess Thu May 23 19:01:57 2002 @@ -0,0 +1,1391 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-02-13' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# Please send patches to . +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break + fi + done + rm -f $dummy.c $dummy.o $dummy.rel + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + mips:Linux:*:*) + cat >$dummy.c < /* for printf() prototype */ +int main (int argc, char *argv[]) { +#else +int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + *:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_emulations=`cd /; ld --help 2>&1 \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + elf_i?86) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + sparclinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32_sparc) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + armlinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32arm*) + echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" + exit 0 + ;; + armelf_linux*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + m68klinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32ppc | elf32ppclinux) + # Determine Lib Version + cat >$dummy.c < +#if defined(__GLIBC__) +extern char __libc_version[]; +extern char __libc_release[]; +#endif +main(argc, argv) + int argc; + char *argv[]; +{ +#if defined(__GLIBC__) + printf("%s %s\n", __libc_version, __libc_release); +#else + printf("unkown\n"); +#endif + return 0; +} +EOF + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 + ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; + 1-0) UNAME_MACHINE="alphaev5" ;; + 1-1) UNAME_MACHINE="alphaev56" ;; + 1-101) UNAME_MACHINE="alphapca56" ;; + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) UNAME_MACHINE="alphaev67" ;; + esac + + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + test -z "$ld_supported_emulations" \ + && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c < +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i?86:*:5:7*) + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i?86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i?86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Index: xc/lib/Xft/config/config.sub diff -u /dev/null xc/lib/Xft/config/config.sub:1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft/config/config.sub Thu May 23 19:01:57 2002 @@ -0,0 +1,1355 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-02-13' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ + | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp10 | pdp11 \ + | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | miprs64vr5000el | mcore \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ + | thumb | d10v | d30v | fr30 | avr | openrisc) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[234567]86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ + | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [cjt]90) + basic_machine=${basic_machine}-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4) + basic_machine=sh-unknown + ;; + sparc | sparcv9) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i[34567]86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Index: xc/lib/Xft/config/install.sh diff -u /dev/null xc/lib/Xft/config/install.sh:1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft/config/install.sh Thu May 23 19:01:57 2002 @@ -0,0 +1,240 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# +# $XFree86: xc/lib/Xft/config/install.sh,v 1.1 2002/05/23 23:01:57 keithp Exp $ +# + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +tranformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 Index: xc/lib/Xft1/Imakefile diff -u /dev/null xc/lib/Xft1/Imakefile:1.11 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/Imakefile Thu Nov 14 16:01:18 2002 @@ -0,0 +1,150 @@ +XCOMM $XFree86: xc/lib/Xft1/Imakefile,v 1.11 2002/11/14 21:01:18 tsi Exp $ + +XCOMM Allow for builds against old installed bits +#ifdef UseInstalled + +#ifndef SharedLibXft1 +#define SharedLibXft1 YES +#endif + +#ifndef NormalLibXft1 +#define NormalLibXft1 (!SharedLibXft1 | ForceNormalLib) +#endif + +#ifndef DebugLibXft1 +#define DebugLibXft1 NO +#endif + +#ifndef ProfileLibXft1 +#define ProfileLibXft1 NO +#endif + +#ifndef FontconfigClientDepLibs +#define FontconfigClientDepLibs $(DEPFONTCONFIGLIB) +#endif +#ifndef FontconfigClientLibs +#define FontconfigClientLibs $(FONTCONFIGLIB) +#endif + +#if SharedLibFontconfig +#define SharedFontconfigRev 1.0 + +SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),SOXLIBREV,SharedFontconfigRev) +#else + +ProjectUnsharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),BuildLibDir) +#endif + +#if SharedLibXft1 +#define SharedXft1Rev 1.2 +SharedLibReferences(XFT1,Xft,$(XFT1SRC),SOXFT1REV,SharedXft1Rev) +#else +ProjectUnsharedLibReferences(XFT1,Xft,$(XFT1SRC),BuildLibDir) +#endif + +#undef LinkBuildLibrary +#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\ + RemoveFile($(BUILDLIBDIR)/lib) @@\ + cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib . +#undef _LinkBuildLibrary +#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) + +#undef LinkBuildLibraryMaybe +#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\ + @if doit; then (set -x; \ @@\ + RemoveFile($(BUILDLIBDIR)/lib); \ @@\ + cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi + +#ifdef LdPreLibs +# undef LdPreLibs +#endif +#define LdPreLibs -L$(BUILDLIBDIR) LdPreLib XLdPreLibs + +LDPRELIBS=LdPreLibs +#endif + + +#define DoNormalLib NO +#define DoSharedLib SharedLibXft1 +#define DoExtraLib NO +#define DoDebugLib NO +#define DoProfileLib NO +#define HasSharedData YES +#define LibName Xft +#define SoRev SOXFT1REV +#define LibHeaders NO +#define NoSoSymlink + +#include + +YFLAGS = -d + +#ifndef XftLibDir +#define XftLibDir $(LIBDIR) +#endif + +XFTLIBDIR=XftLibDir + +INCLUDES=$(FREETYPE2INCLUDES) +DEFINES=$(FREETYPE2DEFINES) $(RENDERDEFINES) + +#if UseFreetype2 +FREETYPE2REQLIB = $(FREETYPE2LIB) +#endif + +REQUIREDLIBS=$(LDPRELIBS) $(XRENDERLIB) $(XLIB) $(FONTCONFIGLIB) $(EXPATLIB) $(FREETYPE2REQLIB) + +#if UseFreetype2 +FT_OLD = xftcache.c +FT_HEADERS = XftFreetype.h + FT_SRCS = xftfreetype.c xftglyphs.c xftrender.c xftdir.c + FT_OBJS = xftfreetype.o xftglyphs.o xftrender.o xftdir.o +#endif + +HEADERS = Xft.h $(FT_HEADERS) + +OLD = xftgram.c xftlex.c + + SRCS = xftcfg.c xftcolor.c xftcore.c xftdbg.c xftdpy.c \ + xftdraw.c xftextent.c xftfont.c xftfs.c\ + xftinit.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 \ + xftinit.o xftlist.o xftmatch.o xftmatrix.o \ + xftname.o xftpat.o xftstr.o xftxlfd.o $(FT_OBJS) + +#include + +#if DoSharedLib && SharedDataSeparation +SpecialCObjectRule(sharedlib,NullParameter,$(SHLIBDEF)) +#endif + +/* + * InstallNamedTargetRelated - like InstallNamedTarget, but only + * installs if a related file already exists. Useful for + * annotating older systems with information on the relationship + * with the new system. + */ + +#ifndef InstallNamedTargetRelated +#define InstallNamedTargetRelated(step,srcname,flags,dest,dstname,dstrel)@@\ +step:: srcname @@\ + MakeDir($(DESTDIR)dest) @@\ + @if [ -f $(DESTDIR)dest/dstrel ]; then \ @@\ + set -x; \ @@\ + $(INSTALL) $(INSTALLFLAGS) flags srcname $(DESTDIR)dest/dstname; fi +#endif + +#ifndef InstallNonExecFileRelated +#define InstallNonExecFileRelated(file,dest,rel) @@\ +InstallNamedTargetRelated(install,file,$(INSTDATFLAGS),dest,file,rel) +#endif /* InstallNonExecFileBackup */ + +InstallNonExecFileRelated(XftConfig-OBSOLETE,$(XFTLIBDIR),XftConfig) +InstallNonExecFileRelated(XftConfig-OBSOLETE,$(CONFDIR),XftConfig) + +MANSUFFIX = $(LIBMANSUFFIX) +InstallManPage(Xft,$(LIBMANDIR)) +DependTarget() Index: xc/lib/Xft1/Xft-def.cpp diff -u /dev/null xc/lib/Xft1/Xft-def.cpp:1.3 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/Xft-def.cpp Mon May 27 12:59:23 2002 @@ -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/Xft1/Xft-def.cpp,v 1.3 2002/05/27 16:59:23 alanh Exp $ */ Index: xc/lib/Xft1/Xft.h diff -u /dev/null xc/lib/Xft1/Xft.h:1.2 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/Xft.h Thu Feb 28 20:00:53 2002 @@ -0,0 +1,486 @@ +/* + * $XFree86: xc/lib/Xft1/Xft.h,v 1.2 2002/03/01 01:00:53 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. + */ + +#ifndef _XFT_H_ +#define _XFT_H_ + +#include +#include +#include + +#include +#include + +typedef unsigned char XftChar8; +typedef unsigned short XftChar16; +typedef unsigned int XftChar32; + +#define XFT_FAMILY "family" /* String */ +#define XFT_STYLE "style" /* String */ +#define XFT_SLANT "slant" /* Int */ +#define XFT_WEIGHT "weight" /* Int */ +#define XFT_SIZE "size" /* Double */ +#define XFT_PIXEL_SIZE "pixelsize" /* Double */ +#define XFT_ENCODING "encoding" /* String */ +#define XFT_SPACING "spacing" /* Int */ +#define XFT_FOUNDRY "foundry" /* String */ +#define XFT_CORE "core" /* Bool */ +#define XFT_ANTIALIAS "antialias" /* Bool */ +#define XFT_XLFD "xlfd" /* String */ +#define XFT_FILE "file" /* String */ +#define XFT_INDEX "index" /* Int */ +#define XFT_RASTERIZER "rasterizer"/* String */ +#define XFT_OUTLINE "outline" /* Bool */ +#define XFT_SCALABLE "scalable" /* Bool */ +#define XFT_RGBA "rgba" /* Int */ + +/* 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 +#define XFT_WEIGHT_DEMIBOLD 180 +#define XFT_WEIGHT_BOLD 200 +#define XFT_WEIGHT_BLACK 210 + +#define XFT_SLANT_ROMAN 0 +#define XFT_SLANT_ITALIC 100 +#define XFT_SLANT_OBLIQUE 110 + +#define XFT_PROPORTIONAL 0 +#define XFT_MONO 100 +#define XFT_CHARCELL 110 + +#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 FcType XftType; + +typedef FcMatrix XftMatrix; + +#define XftMatrixInit(m) FcMatrixInit(m) + +typedef FcResult XftResult; + +#define XftResultMatch FcResultMatch +#define XftResultNoMatch FcResultNoMatch +#define XftResultTypeMismatch FcResultTypeMismatch +#define XftResultNoId FcResultNoId + +#define XftTypeVoid FcTypeVoid +#define XftTypeInteger FcTypeInteger +#define XftTypeDouble FcTypeDouble +#define XftTypeString FcTypeString +#define XftTypeBool FcTypeBool +#define XftTypeMatrix FcTypeMatrix + +typedef FcValue XftValue; + + +typedef FcPattern XftPattern; + +typedef FcFontSet XftFontSet; + +typedef struct _XftFontStruct XftFontStruct; + +typedef struct _XftFont { + int ascent; + int descent; + int height; + int max_advance_width; + Bool core; + XftPattern *pattern; + union { + struct { + XFontStruct *font; + } core; + struct { + XftFontStruct *font; + } ft; + } u; +} XftFont; + +typedef struct _XftDraw XftDraw; + +typedef struct _XftColor { + unsigned long pixel; + XRenderColor color; +} XftColor; + +typedef FcObjectSet XftObjectSet; + +_XFUNCPROTOBEGIN + +/* xftcfg.c */ +Bool +XftConfigSubstitute (XftPattern *p); + +/* xftcolor.c */ +Bool +XftColorAllocName (Display *dpy, + Visual *visual, + Colormap cmap, + char *name, + XftColor *result); + +Bool +XftColorAllocValue (Display *dpy, + Visual *visual, + Colormap cmap, + XRenderColor *color, + XftColor *result); + +void +XftColorFree (Display *dpy, + Visual *visual, + Colormap cmap, + XftColor *color); + + +/* xftcore.c */ +/* xftdbg.c */ +void +XftValuePrint (XftValue v); + +void +XftPatternPrint (XftPattern *p); + +void +XftFontSetPrint (XftFontSet *s); + +/* xftdir.c */ +/* xftdpy.c */ +Bool +XftDefaultHasRender (Display *dpy); + +Bool +XftDefaultSet (Display *dpy, XftPattern *defaults); + +void +XftDefaultSubstitute (Display *dpy, int screen, XftPattern *pattern); + +/* xftdraw.c */ + +XftDraw * +XftDrawCreate (Display *dpy, + Drawable drawable, + Visual *visual, + Colormap colormap); + +XftDraw * +XftDrawCreateBitmap (Display *dpy, + Pixmap bitmap); + +void +XftDrawChange (XftDraw *draw, + Drawable drawable); + +void +XftDrawDestroy (XftDraw *draw); + +void +XftDrawString8 (XftDraw *d, + XftColor *color, + XftFont *font, + int x, + int y, + XftChar8 *string, + int len); + +void +XftDrawString16 (XftDraw *draw, + XftColor *color, + XftFont *font, + int x, + int y, + XftChar16 *string, + int len); + +void +XftDrawString32 (XftDraw *draw, + XftColor *color, + XftFont *font, + int x, + 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, + int y, + unsigned int width, + unsigned int height); + + +Bool +XftDrawSetClip (XftDraw *d, + Region r); + +/* xftextent.c */ + +void +XftTextExtents8 (Display *dpy, + XftFont *font, + XftChar8 *string, + int len, + XGlyphInfo *extents); + +void +XftTextExtents16 (Display *dpy, + XftFont *font, + XftChar16 *string, + int len, + XGlyphInfo *extents); + +void +XftTextExtents32 (Display *dpy, + XftFont *font, + XftChar32 *string, + 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); + +XftFont * +XftFontOpenPattern (Display *dpy, XftPattern *pattern); + +XftFont * +XftFontOpen (Display *dpy, int screen, ...); + +XftFont * +XftFontOpenName (Display *dpy, int screen, const char *name); + +XftFont * +XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd); + +void +XftFontClose (Display *dpy, XftFont *font); + +Bool +XftGlyphExists (Display *dpy, XftFont *font, XftChar32 glyph); + +/* xftfreetype.c */ +/* xftfs.c */ + +XftFontSet * +XftFontSetCreate (void); + +void +XftFontSetDestroy (XftFontSet *s); + +Bool +XftFontSetAdd (XftFontSet *s, XftPattern *font); + +/* xftglyphs.c */ +/* see XftFreetype.h */ + +/* xftgram.y */ + +/* xftinit.c */ +Bool +XftInit (char *config); + +/* xftlex.l */ + +/* xftlist.c */ +XftObjectSet * +XftObjectSetCreate (void); + +Bool +XftObjectSetAdd (XftObjectSet *os, const char *object); + +void +XftObjectSetDestroy (XftObjectSet *os); + +XftObjectSet * +XftObjectSetVaBuild (const char *first, va_list va); + +XftObjectSet * +XftObjectSetBuild (const char *first, ...); + +XftFontSet * +XftListFontSets (XftFontSet **sets, + int nsets, + XftPattern *p, + XftObjectSet *os); + +XftFontSet * +XftListFontsPatternObjects (Display *dpy, + int screen, + XftPattern *pattern, + XftObjectSet *os); + +XftFontSet * +XftListFonts (Display *dpy, + int screen, + ...); + +/* xftmatch.c */ +XftPattern * +XftFontSetMatch (XftFontSet **sets, + int nsets, + 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); + +XftPattern * +XftPatternDuplicate (XftPattern *p); + +void +XftValueDestroy (XftValue v); + +void +XftPatternDestroy (XftPattern *p); + +Bool +XftPatternAdd (XftPattern *p, const char *object, XftValue value, Bool append); + +XftResult +XftPatternGet (XftPattern *p, const char *object, int id, XftValue *v); + +Bool +XftPatternDel (XftPattern *p, const char *object); + +Bool +XftPatternAddInteger (XftPattern *p, const char *object, int i); + +Bool +XftPatternAddDouble (XftPattern *p, const char *object, double d); + +Bool +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 +XftPatternGetInteger (XftPattern *p, const char *object, int n, int *i); + +XftResult +XftPatternGetDouble (XftPattern *p, const char *object, int n, double *d); + +XftResult +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 * +XftPatternVaBuild (XftPattern *orig, va_list va); + +XftPattern * +XftPatternBuild (XftPattern *orig, ...); + +/* xftrender.c */ +/* see XftFreetype.h */ + +/* 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 + +#endif /* _XFT_H_ */ Index: xc/lib/Xft1/Xft.man diff -u /dev/null xc/lib/Xft1/Xft.man:1.1.1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/Xft.man Thu Feb 14 20:26:15 2002 @@ -0,0 +1,181 @@ +.\" +.\" $XFree86: xc/lib/Xft1/Xft.man,v 1.1.1.1 2002/02/15 01:26:15 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. +.\" +.de TQ +.br +.ns +.TP \\$1 +.. +.TH XFT 3 "Version 1.0" "XFree86" + +.SH NAME + XFT \- X FreeType interface library + +.SH DESCRIPTION +.B Xft +is a simple library designed to interface the FreeType rasterizer with the X +Rendering Extension. This manual page barely scratches the surface of this +library. + +.SH DATATYPES + +.B XftPattern +holds a set of names with associated value lists; each name refers to a +property of a font. XftPatterns are used as inputs to the matching code as +well as holding information about specific fonts. + +.B XftFont +contains general font metrics and a pointer to either the core XFontStruct +data or a structure holding FreeType and X Render Extension data. + +.B XftFontStruct +contains information about FreeType fonts used with the X Render Extension. + +.B XftFontSet +contains a list of XftPatterns. Internally Xft uses this data structure to +hold sets of fonts. Externally, Xft returns the results of listing fonts in +this format. + +.B XftObjectSet +holds a set of names and is used to specify which fields from fonts are +placed in the the list of returned patterns when listing fonts. + +.B XftDraw +is an opaque object which holds information used to render to an X drawable +using either core protocol or the X Rendering extension. + +.SH FUNCTIONS +.nf +XftFont * +XftFontOpen (Display *dpy, int screen, ...); +.fi +.B XftFontOpen +takes a list of pattern elements of the form (field, type, value) terminated +with a 0, matches that pattern against the available fonts and opens the +matching font. +.PP +Example: +.br + font = XftFontOpen (dpy, scr, + XFT_FAMILY, XftTypeString, "charter", + XFT_SIZE, XftTypeDouble, 12.0); +.PP +This opens the charter font at 12 points. The point size is automatically +converted to the correct pixel size based on the resolution of the monitor. +.PP +.nf +void +XftTextExtents8 (Display *dpy, + XftFont *font, + unsigned char *string, + int len, + XGlyphInfo *extents); +.fi +.B XftTextExtents8 +computes the pixel extents of "string" when drawn with "font". +.PP +.nf +XftDraw * +XftDrawCreate (Display *dpy, + Drawable drawable, + Visual *visual, + Colormap colormap); +.fi +.B XtDrawCreate +creates a structure that can be used to render text and rectangles +to the screen. +.PP +.nf +void +XftDrawString8 (XftDraw *d, + XRenderColor *color, + XftFont *font, + int x, + int y, + unsigned char *string, + int len); +.fi +.B XftDrawString8 +draws "string" using "font" in "color" at "x, y". +.PP +.nf +void +XftDrawRect (XftDraw *d, + XRenderColor *color, + int x, + int y, + unsigned int width, + unsigned int height); +.fi +.B XftDrawRect +fills a solid rectangle in the specified color. +.SH XftConfig +The +.B XftConfig +file contains configuration information for the Xft library consisting of +directories to look at for font information as well as instructions on +editing program specified font patterns before attempting to match the +available fonts. +.PP +.nf +config : "dir" STRING + | "include" STRING + | "includeif" STRING + | "match" tests "edit" edits + ; +test : qual FIELD-NAME COMPARE CONSTANT + ; +qual : "any" + | "all" + ; +edit : FIELD-NAME ASSIGN expr SEMI + ; +.fi +.PP +STRINGs are double-quote delimited. FIELD-NAMEs are identifiers, +ASSIGN is one of "=", "+=" or "=+". expr can contain the usual +arithmetic operators and can include FIELD-NAMEs. +.PP +"dir" adds a directory to the list of places Xft will look for fonts. +There is no particular order implied by the list; Xft treats all fonts about +the same. +.PP +"include" and "includeif" cause Xft to load more configuration parameters +from the indicated file. "includeif" doesn't elicit a complaint if the file +doesn't exist. If the file name begins with a '~' character, it refers to a +path relative to the home directory of the user. +.PP +If the tests in a "match" statement all match a user-specified pattern, the +pattern will be edited with the specified instructions. +.PP +Where ASSIGN is "=", the matching value in the pattern will be replaced by +the given expression. "+="/"=+" will prepend/append a new value to the list +of values for the indicated field. + +.SH RESTRICTIONS +.B Xft +will probably change radically in the future; weak attempts will be made to +retain some level of source-file compatibility. + +.SH AUTHOR +Keith Packard, member of the XFree86 Project, Inc. Index: xc/lib/Xft1/XftConfig-OBSOLETE diff -u /dev/null xc/lib/Xft1/XftConfig-OBSOLETE:1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/XftConfig-OBSOLETE Fri Aug 2 15:07:39 2002 @@ -0,0 +1,2 @@ +The XftConfig file is no longer used by Xft. Please see +/etc/fonts/fonts.conf to configure client-side fonts. Index: xc/lib/Xft1/XftFreetype.h diff -u /dev/null xc/lib/Xft1/XftFreetype.h:1.3 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/XftFreetype.h Sat Mar 2 17:09:04 2002 @@ -0,0 +1,166 @@ +/* + * $XFree86: xc/lib/Xft1/XftFreetype.h,v 1.3 2002/03/02 22:09:04 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. + */ + +#ifndef _XFTFREETYPE_H_ +#define _XFTFREETYPE_H_ + +#include "Xft.h" +#include + +#include +#include + +extern FT_Library _XftFTlibrary; + +struct _XftFontStruct { + FT_Face face; /* handle to face object */ + GlyphSet glyphset; + int min_char; + int max_char; + FT_F26Dot6 size; + int ascent; + int descent; + int height; + int max_advance_width; + int spacing; + int rgba; + Bool antialias; + int charmap; /* -1 for unencoded */ + XRenderPictFormat *format; + XGlyphInfo **realized; + int nrealized; + Bool transform; + FT_Matrix matrix; +}; + +#define XftUntestedGlyph ((XGlyphInfo *) 1) + +_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, + XftFontStruct *font, + XftChar32 *glyphs, + int nglyph); + +void +XftGlyphCheck (Display *dpy, + XftFontStruct *font, + XftChar32 glyph, + XftChar32 *missing, + int *nmissing); + +Bool +XftFreeTypeGlyphExists (Display *dpy, + XftFontStruct *font, + XftChar32 glyph); + +/* xftrender.c */ + +void +XftRenderString8 (Display *dpy, Picture src, + XftFontStruct *font, Picture dst, + int srcx, int srcy, + int x, int y, + XftChar8 *string, int len); + +void +XftRenderString16 (Display *dpy, Picture src, + XftFontStruct *font, Picture dst, + int srcx, int srcy, + int x, int y, + XftChar16 *string, int len); + +void +XftRenderString32 (Display *dpy, Picture src, + XftFontStruct *font, Picture dst, + int srcx, int srcy, + int x, int y, + 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, + int len, + XGlyphInfo *extents); + +void +XftRenderExtents16 (Display *dpy, + XftFontStruct *font, + XftChar16 *string, + int len, + XGlyphInfo *extents); + +void +XftRenderExtents32 (Display *dpy, + XftFontStruct *font, + XftChar32 *string, + int len, + XGlyphInfo *extents); + +void +XftRenderExtentsUtf8 (Display *dpy, + XftFontStruct *font, + XftChar8 *string, + int len, + XGlyphInfo *extents); + +_XFUNCPROTOEND + +#endif /* _XFTFREETYPE_H_ */ Index: xc/lib/Xft1/xftcache.c diff -u /dev/null xc/lib/Xft1/xftcache.c:1.1.1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftcache.c Thu Feb 14 20:26:15 2002 @@ -0,0 +1,608 @@ +/* + * $XFree86: xc/lib/Xft1/xftcache.c,v 1.1.1.1 2002/02/15 01:26:15 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 + 1; + 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/Xft1/xftcfg.c diff -u /dev/null xc/lib/Xft1/xftcfg.c:1.2 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftcfg.c Thu Feb 28 20:00:53 2002 @@ -0,0 +1,36 @@ +/* + * $XFree86: xc/lib/Xft1/xftcfg.c,v 1.2 2002/03/01 01:00:53 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 "xftint.h" + +Bool +XftConfigSubstitute (XftPattern *p) +{ + FcConfigSubstitute (0, p, FcMatchPattern); + FcConfigSubstitute (0, p, FcMatchFont); + return True; +} Index: xc/lib/Xft1/xftcolor.c diff -u /dev/null xc/lib/Xft1/xftcolor.c:1.1.1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftcolor.c Thu Feb 14 20:26:16 2002 @@ -0,0 +1,125 @@ +/* + * $XFree86: xc/lib/Xft1/xftcolor.c,v 1.1.1.1 2002/02/15 01:26:16 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 "xftint.h" + +Bool +XftColorAllocName (Display *dpy, + Visual *visual, + Colormap cmap, + char *name, + XftColor *result) +{ + XColor screen, exact; + + if (!XAllocNamedColor (dpy, cmap, name, &screen, &exact)) + { + /* XXX stick standard colormap stuff here */ + return False; + } + + result->pixel = screen.pixel; + result->color.red = exact.red; + result->color.green = exact.green; + result->color.blue = exact.blue; + result->color.alpha = 0xffff; + return True; +} + +static short +maskbase (unsigned long m) +{ + short i; + + if (!m) + return 0; + i = 0; + while (!(m&1)) + { + m>>=1; + i++; + } + return i; +} + +static short +masklen (unsigned long m) +{ + unsigned long y; + + y = (m >> 1) &033333333333; + y = m - y - ((y >>1) & 033333333333); + return (short) (((y + (y >> 3)) & 030707070707) % 077); +} + +Bool +XftColorAllocValue (Display *dpy, + Visual *visual, + Colormap cmap, + XRenderColor *color, + XftColor *result) +{ + if (visual->class == TrueColor) + { + int red_shift, red_len; + int green_shift, green_len; + int blue_shift, blue_len; + + red_shift = maskbase (visual->red_mask); + red_len = masklen (visual->red_mask); + green_shift = maskbase (visual->green_mask); + green_len = masklen (visual->green_mask); + blue_shift = maskbase (visual->blue_mask); + blue_len = masklen (visual->blue_mask); + result->pixel = (((color->red >> (16 - red_len)) << red_shift) | + ((color->green >> (16 - green_len)) << green_shift) | + ((color->blue >> (16 - blue_len)) << blue_shift)); + } + else + { + XColor xcolor; + + xcolor.red = color->red; + xcolor.green = color->green; + xcolor.blue = color->blue; + if (!XAllocColor (dpy, cmap, &xcolor)) + return False; + result->pixel = xcolor.pixel; + } + result->color.red = color->red; + result->color.green = color->green; + result->color.blue = color->blue; + result->color.alpha = color->alpha; + return True; +} + +void +XftColorFree (Display *dpy, + Visual *visual, + Colormap cmap, + XftColor *color) +{ + if (visual->class != TrueColor) + XFreeColors (dpy, cmap, &color->pixel, 1, 0); +} Index: xc/lib/Xft1/xftcore.c diff -u /dev/null xc/lib/Xft1/xftcore.c:1.1.1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftcore.c Thu Feb 14 20:26:15 2002 @@ -0,0 +1,247 @@ +/* + * $XFree86: xc/lib/Xft1/xftcore.c,v 1.1.1.1 2002/02/15 01:26:15 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 "xftint.h" + +XChar2b * +XftCoreConvert16 (XftChar16 *string, + int len, + XChar2b xcloc[XFT_CORE_N16LOCAL]) +{ + XChar2b *xc; + int i; + + if (len < XFT_CORE_N16LOCAL) + xc = xcloc; + else + xc = (XChar2b *) malloc (len * sizeof (XChar2b)); + for (i = 0; i < len; i++) + { + xc[i].byte1 = string[i] & 0xff; + xc[i].byte2 = (string[i] >> 8) & 0xff; + } + return xc; +} + +XChar2b * +XftCoreConvert32 (XftChar32 *string, + int len, + XChar2b xcloc[XFT_CORE_N16LOCAL]) +{ + XChar2b *xc; + int i; + + if (len < XFT_CORE_N16LOCAL) + xc = xcloc; + else + xc = (XChar2b *) malloc (len * sizeof (XChar2b)); + for (i = 0; i < len; i++) + { + xc[i].byte1 = string[i] & 0xff; + xc[i].byte2 = (string[i] >> 8) & 0xff; + } + 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, + XftChar8 *string, + int len, + XGlyphInfo *extents) +{ + int direction; + int ascent, descent; + XCharStruct overall; + + XTextExtents (fs, (char *) string, len, &direction, + &ascent, &descent, &overall); + 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 +XftCoreExtents16 (Display *dpy, + XFontStruct *fs, + XftChar16 *string, + int len, + XGlyphInfo *extents) +{ + int direction; + int ascent, descent; + XCharStruct overall; + XChar2b *xc, xcloc[XFT_CORE_N16LOCAL]; + + 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; + 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 +XftCoreExtents32 (Display *dpy, + XFontStruct *fs, + XftChar32 *string, + int len, + XGlyphInfo *extents) +{ + int direction; + int ascent, descent; + XCharStruct overall; + XChar2b *xc, xcloc[XFT_CORE_N16LOCAL]; + + 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; + 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; +} + +Bool +XftCoreGlyphExists (Display *dpy, + XFontStruct *fs, + XftChar32 glyph) +{ + int direction; + int ascent, descent; + XCharStruct overall; + XChar2b xc; + + XftCoreConvert32 (&glyph, 1, &xc); + XTextExtents16 (fs, &xc, 1, &direction, + &ascent, &descent, &overall); + return (overall.lbearing != 0 || + overall.rbearing != 0 || + overall.width != 0 || + overall.ascent != 0 || + overall.descent != 0); +} + Index: xc/lib/Xft1/xftdbg.c diff -u /dev/null xc/lib/Xft1/xftdbg.c:1.2 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftdbg.c Thu Feb 28 20:00:53 2002 @@ -0,0 +1,43 @@ +/* + * $XFree86: xc/lib/Xft1/xftdbg.c,v 1.2 2002/03/01 01:00:53 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 "xftint.h" + +void +XftFontSetPrint (XftFontSet *s) +{ + FcFontSetPrint (s); +} + +void +XftPatternPrint (XftPattern *p) +{ + FcPatternPrint (p); +} + +void +XftValuePrint (XftValue v) +{ + FcValuePrint (v); +} Index: xc/lib/Xft1/xftdir.c diff -u /dev/null xc/lib/Xft1/xftdir.c:1.3 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftdir.c Wed May 22 00:16:40 2002 @@ -0,0 +1,42 @@ +/* + * $XFree86: xc/lib/Xft1/xftdir.c,v 1.3 2002/05/22 04:16:40 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 "xftint.h" + +Bool +XftDirScan (XftFontSet *set, const char *dir, Bool force) +{ + return FcFalse; +} + +Bool +XftDirSave (XftFontSet *set, const char *dir) +{ + return FcFalse; +} + Index: xc/lib/Xft1/xftdpy.c diff -u /dev/null xc/lib/Xft1/xftdpy.c:1.2 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftdpy.c Sat Nov 23 20:56:56 2002 @@ -0,0 +1,439 @@ +/* + * $XFree86: xc/lib/Xft1/xftdpy.c,v 1.2 2002/11/24 01:56:56 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 "xftint.h" + +XftDisplayInfo *_XftDisplayInfo; + +static int +_XftCloseDisplay (Display *dpy, XExtCodes *codes) +{ + XftDisplayInfo *info, **prev; + + for (prev = &_XftDisplayInfo; (info = *prev); prev = &(*prev)->next) + if (info->codes == codes) + break; + if (!info) + return 0; + *prev = info->next; + if (info->defaults) + XftPatternDestroy (info->defaults); + if (info->coreFonts) + XftFontSetDestroy (info->coreFonts); + free (info); + return 0; +} + +XftDisplayInfo * +_XftDisplayInfoGet (Display *dpy) +{ + XftDisplayInfo *info, **prev; + + for (prev = &_XftDisplayInfo; (info = *prev); prev = &(*prev)->next) + { + if (info->display == dpy) + { + /* + * MRU the list + */ + if (prev != &_XftDisplayInfo) + { + *prev = info->next; + info->next = _XftDisplayInfo; + _XftDisplayInfo = info; + } + return info; + } + } + info = (XftDisplayInfo *) malloc (sizeof (XftDisplayInfo)); + if (!info) + goto bail0; + info->codes = XAddExtension (dpy); + if (!info->codes) + goto bail1; + (void) XESetCloseDisplay (dpy, info->codes->extension, _XftCloseDisplay); + + info->display = dpy; + info->defaults = 0; + info->coreFonts = 0; + info->hasRender = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0; + info->glyphSets = 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; + return info; + +bail1: + free (info); +bail0: + if (_XftFontDebug () & XFT_DBG_RENDER) + { + printf ("XftDisplayInfoGet failed to initialize, Xft unhappy\n"); + } + return 0; +} + +Bool +XftDefaultHasRender (Display *dpy) +{ +#ifdef FREETYPE2 + XftDisplayInfo *info = _XftDisplayInfoGet (dpy); + + if (!info) + return False; + return info->hasRender; +#else + return False; +#endif +} + +Bool +XftDefaultSet (Display *dpy, XftPattern *defaults) +{ + XftDisplayInfo *info = _XftDisplayInfoGet (dpy); + + if (!info) + return False; + if (info->defaults) + XftPatternDestroy (info->defaults); + info->defaults = defaults; + return True; +} + +int +XftDefaultParseBool (char *v) +{ + char c0, c1; + + c0 = *v; + if (isupper (c0)) + c0 = tolower (c0); + if (c0 == 't' || c0 == 'y' || c0 == '1') + return 1; + if (c0 == 'f' || c0 == 'n' || c0 == '0') + return 0; + if (c0 == 'o') + { + c1 = v[1]; + if (isupper (c1)) + c1 = tolower (c1); + if (c1 == 'n') + return 1; + if (c1 == 'f') + return 0; + } + return -1; +} + +static Bool +_XftDefaultInitBool (Display *dpy, XftPattern *pat, char *option) +{ + char *v; + int i; + + v = XGetDefault (dpy, "Xft", option); + if (v && (i = XftDefaultParseBool (v)) >= 0) + return XftPatternAddBool (pat, option, i != 0); + return True; +} + +static Bool +_XftDefaultInitDouble (Display *dpy, XftPattern *pat, char *option) +{ + char *v, *e; + double d; + + v = XGetDefault (dpy, "Xft", option); + if (v) + { + d = strtod (v, &e); + if (e != v) + return XftPatternAddDouble (pat, option, d); + } + return True; +} + +static Bool +_XftDefaultInitInteger (Display *dpy, XftPattern *pat, char *option) +{ + char *v, *e; + int i; + + v = XGetDefault (dpy, "Xft", option); + if (v) + { + if (XftNameConstant (v, &i)) + return XftPatternAddInteger (pat, option, i); + i = strtol (v, &e, 0); + if (e != v) + return XftPatternAddInteger (pat, option, i); + } + return True; +} + +static XftPattern * +_XftDefaultInit (Display *dpy) +{ + XftPattern *pat; + + pat = XftPatternCreate (); + if (!pat) + goto bail0; + + if (!_XftDefaultInitBool (dpy, pat, XFT_CORE)) + 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; + +bail1: + XftPatternDestroy (pat); +bail0: + return 0; +} + +static XftResult +_XftDefaultGet (Display *dpy, const char *object, int screen, XftValue *v) +{ + XftDisplayInfo *info = _XftDisplayInfoGet (dpy); + XftResult r; + + if (!info) + return XftResultNoMatch; + + if (!info->defaults) + { + info->defaults = _XftDefaultInit (dpy); + if (!info->defaults) + return XftResultNoMatch; + } + r = XftPatternGet (info->defaults, object, screen, v); + if (r == XftResultNoId && screen > 0) + r = XftPatternGet (info->defaults, object, 0, v); + return r; +} + +Bool +XftDefaultGetBool (Display *dpy, const char *object, int screen, Bool def) +{ + XftResult r; + XftValue v; + + r = _XftDefaultGet (dpy, object, screen, &v); + if (r != XftResultMatch || v.type != XftTypeBool) + return def; + return v.u.b; +} + +int +XftDefaultGetInteger (Display *dpy, const char *object, int screen, int def) +{ + XftResult r; + XftValue v; + + r = _XftDefaultGet (dpy, object, screen, &v); + if (r != XftResultMatch || v.type != XftTypeInteger) + return def; + return v.u.i; +} + +double +XftDefaultGetDouble (Display *dpy, const char *object, int screen, double def) +{ + XftResult r; + XftValue v; + + r = _XftDefaultGet (dpy, object, screen, &v); + if (r != XftResultMatch || v.type != XftTypeDouble) + return def; + return v.u.d; +} + +XftFontSet * +XftDisplayGetFontSet (Display *dpy) +{ + XftDisplayInfo *info = _XftDisplayInfoGet (dpy); + + if (!info) + return 0; + if (!info->coreFonts) + { + info->coreFonts = XftFontSetCreate (); + if (info->coreFonts) + { + if (!XftCoreAddFonts (info->coreFonts, dpy, + XftDefaultGetBool (dpy, XFT_SCALABLE, + DefaultScreen (dpy), + False))) + { + XftFontSetDestroy (info->coreFonts); + info->coreFonts = 0; + } + } + } + return info->coreFonts; +} + +void +XftDefaultSubstitute (Display *dpy, int screen, XftPattern *pattern) +{ + XftValue v; + double size; + double scale; + + if (XftPatternGet (pattern, XFT_STYLE, 0, &v) == XftResultNoMatch) + { + if (XftPatternGet (pattern, XFT_WEIGHT, 0, &v) == XftResultNoMatch ) + { + XftPatternAddInteger (pattern, XFT_WEIGHT, XFT_WEIGHT_MEDIUM); + } + if (XftPatternGet (pattern, XFT_SLANT, 0, &v) == XftResultNoMatch) + { + XftPatternAddInteger (pattern, XFT_SLANT, XFT_SLANT_ROMAN); + } + } + if (XftPatternGet (pattern, XFT_ENCODING, 0, &v) == XftResultNoMatch) + XftPatternAddString (pattern, XFT_ENCODING, "iso8859-1"); + if (XftPatternGet (pattern, XFT_RENDER, 0, &v) == XftResultNoMatch) + { + XftPatternAddBool (pattern, XFT_RENDER, + XftDefaultGetBool (dpy, XFT_RENDER, screen, + XftDefaultHasRender (dpy))); + } + if (XftPatternGet (pattern, XFT_CORE, 0, &v) == XftResultNoMatch) + { + XftPatternAddBool (pattern, XFT_CORE, + XftDefaultGetBool (dpy, XFT_CORE, screen, + !XftDefaultHasRender (dpy))); + } + if (XftPatternGet (pattern, XFT_ANTIALIAS, 0, &v) == XftResultNoMatch) + { + XftPatternAddBool (pattern, XFT_ANTIALIAS, + XftDefaultGetBool (dpy, XFT_ANTIALIAS, screen, + True)); + } + if (XftPatternGet (pattern, XFT_RGBA, 0, &v) == XftResultNoMatch) + { + int subpixel = XFT_RGBA_NONE; +#if RENDER_MAJOR > 0 || RENDER_MINOR >= 6 + int render_order = XRenderQuerySubpixelOrder (dpy, screen); + switch (render_order) { + default: + case SubPixelUnknown: subpixel = XFT_RGBA_NONE; break; + case SubPixelHorizontalRGB: subpixel = XFT_RGBA_RGB; break; + case SubPixelHorizontalBGR: subpixel = XFT_RGBA_BGR; break; + case SubPixelVerticalRGB: subpixel = XFT_RGBA_VRGB; break; + case SubPixelVerticalBGR: subpixel = XFT_RGBA_VBGR; break; + case SubPixelNone: subpixel = XFT_RGBA_NONE; break; + } +#endif + XftPatternAddInteger (pattern, XFT_RGBA, + XftDefaultGetInteger (dpy, XFT_RGBA, screen, + subpixel)); + } + 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) + { + size = 12.0; + XftPatternAddDouble (pattern, XFT_SIZE, size); + } + else + { + switch (v.type) { + case XftTypeInteger: + size = (double) v.u.i; + break; + case XftTypeDouble: + size = v.u.d; + break; + default: + size = 12.0; + break; + } + } + scale = XftDefaultGetDouble (dpy, XFT_SCALE, screen, 1.0); + size *= scale; + 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/Xft1/xftdraw.c diff -u /dev/null xc/lib/Xft1/xftdraw.c:1.1.1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftdraw.c Thu Feb 14 20:26:15 2002 @@ -0,0 +1,482 @@ +/* + * $XFree86: xc/lib/Xft1/xftdraw.c,v 1.1.1.1 2002/02/15 01:26:15 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 "xftint.h" +#include + +XftDraw * +XftDrawCreate (Display *dpy, + Drawable drawable, + Visual *visual, + Colormap colormap) +{ + XftDraw *draw; + + draw = (XftDraw *) malloc (sizeof (XftDraw)); + if (!draw) + return 0; + draw->dpy = dpy; + draw->drawable = drawable; + draw->visual = visual; + draw->colormap = colormap; + draw->core_set = False; + draw->render_set = False; + draw->render_able = False; + draw->clip = 0; + return draw; +} + +XftDraw * +XftDrawCreateBitmap (Display *dpy, + Pixmap bitmap) +{ + XftDraw *draw; + + draw = (XftDraw *) malloc (sizeof (XftDraw)); + if (!draw) + return 0; + draw->dpy = dpy; + draw->drawable = (Drawable) bitmap; + draw->visual = 0; + draw->colormap = 0; + draw->core_set = False; + draw->render_set = False; + draw->render_able = False; + draw->clip = 0; + return draw; +} + +static XRenderPictFormat * +_XftDrawFormat (XftDraw *draw) +{ + if (draw->visual == 0) + { + XRenderPictFormat pf; + + pf.type = PictTypeDirect; + pf.depth = 1; + pf.direct.alpha = 0; + pf.direct.alphaMask = 1; + return XRenderFindFormat (draw->dpy, + (PictFormatType| + PictFormatDepth| + PictFormatAlpha| + PictFormatAlphaMask), + &pf, + 0); + } + else + return XRenderFindVisualFormat (draw->dpy, draw->visual); +} + +static XRenderPictFormat * +_XftDrawFgFormat (XftDraw *draw) +{ + XRenderPictFormat pf; + + if (draw->visual == 0) + { + pf.type = PictTypeDirect; + pf.depth = 1; + pf.direct.alpha = 0; + pf.direct.alphaMask = 1; + return XRenderFindFormat (draw->dpy, + (PictFormatType| + PictFormatDepth| + PictFormatAlpha| + PictFormatAlphaMask), + &pf, + 0); + } + else + { + pf.type = PictTypeDirect; + pf.depth = 32; + pf.direct.redMask = 0xff; + pf.direct.greenMask = 0xff; + pf.direct.blueMask = 0xff; + pf.direct.alphaMask = 0xff; + return XRenderFindFormat (draw->dpy, + (PictFormatType| + PictFormatDepth| + PictFormatRedMask| + PictFormatGreenMask| + PictFormatBlueMask| + PictFormatAlphaMask), + &pf, + 0); + } +} + +void +XftDrawChange (XftDraw *draw, + Drawable drawable) +{ + draw->drawable = drawable; + if (draw->render_able) + { + XRenderPictFormat *format; + + XRenderFreePicture (draw->dpy, draw->render.pict); + format = XRenderFindVisualFormat (draw->dpy, draw->visual); + draw->render.pict = XRenderCreatePicture (draw->dpy, draw->drawable, + format, 0, 0); + } +} + +void +XftDrawDestroy (XftDraw *draw) +{ + int n; + + if (draw->render_able) + { + XRenderFreePicture (draw->dpy, draw->render.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); + if (draw->clip) + XDestroyRegion (draw->clip); + free (draw); +} + +Bool +XftDrawRenderPrepare (XftDraw *draw, + XftColor *color, + 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; + format = _XftDrawFormat (draw); + pix_format = _XftDrawFgFormat (draw); + if (format && pix_format) + { + draw->render_able = True; + + draw->render.pict = XRenderCreatePicture (draw->dpy, draw->drawable, + format, 0, 0); + 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); + } + } + if (!draw->render_able) + return False; + if (memcmp (&color->color, &draw->render.src[src].color, + sizeof (XRenderColor))) + { + 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.src[src].color = color->color; + } + return True; +} + +Bool +XftDrawCorePrepare (XftDraw *draw, + XftColor *color, + XftFont *font) +{ + + if (!draw->core_set) + { + XGCValues gcv; + unsigned long mask; + draw->core_set = True; + + draw->core.fg = color->pixel; + gcv.foreground = draw->core.fg; + mask = GCForeground; + if (font) + { + draw->core.font = font->u.core.font->fid; + gcv.font = draw->core.font; + mask |= GCFont; + } + draw->core.draw_gc = XCreateGC (draw->dpy, draw->drawable, + mask, &gcv); + if (draw->clip) + XSetRegion (draw->dpy, draw->core.draw_gc, draw->clip); + } + if (draw->core.fg != color->pixel) + { + draw->core.fg = color->pixel; + XSetForeground (draw->dpy, draw->core.draw_gc, draw->core.fg); + } + if (font && draw->core.font != font->u.core.font->fid) + { + draw->core.font = font->u.core.font->fid; + XSetFont (draw->dpy, draw->core.draw_gc, draw->core.font); + } + return True; +} + +void +XftDrawString8 (XftDraw *draw, + XftColor *color, + XftFont *font, + int x, + int y, + XftChar8 *string, + int len) +{ + if (_XftFontDebug () & XFT_DBG_DRAW) + { + printf ("DrawString \"%*.*s\"\n", len, len, string); + } + if (font->core) + { + XftDrawCorePrepare (draw, color, font); + XDrawString (draw->dpy, draw->drawable, draw->core.draw_gc, x, y, + (char *) string, len); + } +#ifdef FREETYPE2 + else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) + { + 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 +} + +#define N16LOCAL 256 + +void +XftDrawString16 (XftDraw *draw, + XftColor *color, + XftFont *font, + int x, + int y, + XftChar16 *string, + int len) +{ + if (font->core) + { + XChar2b *xc; + XChar2b xcloc[XFT_CORE_N16LOCAL]; + + XftDrawCorePrepare (draw, color, font); + xc = XftCoreConvert16 (string, len, xcloc); + XDrawString16 (draw->dpy, draw->drawable, draw->core.draw_gc, x, y, + xc, len); + if (xc != xcloc) + free (xc); + } +#ifdef FREETYPE2 + else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) + { + 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 +} + +void +XftDrawString32 (XftDraw *draw, + XftColor *color, + XftFont *font, + int x, + int y, + XftChar32 *string, + int len) +{ + if (font->core) + { + XChar2b *xc; + XChar2b xcloc[XFT_CORE_N16LOCAL]; + + XftDrawCorePrepare (draw, color, font); + xc = XftCoreConvert32 (string, len, xcloc); + XDrawString16 (draw->dpy, draw->drawable, draw->core.draw_gc, x, y, + xc, len); + if (xc != xcloc) + free (xc); + } +#ifdef FREETYPE2 + else if (XftDrawRenderPrepare (draw, color, font, XFT_DRAW_SRC_TEXT)) + { + 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, + int y, + unsigned int width, + unsigned int height) +{ + if (XftDrawRenderPrepare (draw, color, 0, XFT_DRAW_SRC_RECT)) + { + XRenderFillRectangle (draw->dpy, PictOpOver, draw->render.pict, + &color->color, x, y, width, height); + } + else + { + XftDrawCorePrepare (draw, color, 0); + XFillRectangle (draw->dpy, draw->drawable, draw->core.draw_gc, + x, y, width, height); + } +} + +Bool +XftDrawSetClip (XftDraw *draw, + Region r) +{ + Region n = 0; + + if (!r && !draw->clip) + return True; + + if (r) + { + n = XCreateRegion (); + if (n) + { + if (!XUnionRegion (n, r, n)) + { + XDestroyRegion (n); + return False; + } + } + } + if (draw->clip) + { + XDestroyRegion (draw->clip); + } + draw->clip = n; + if (draw->render_able) + { + XRenderPictureAttributes pa; + if (n) + { + XRenderSetPictureClipRegion (draw->dpy, draw->render.pict, n); + } + else + { + pa.clip_mask = None; + XRenderChangePicture (draw->dpy, draw->render.pict, + CPClipMask, &pa); + } + } + if (draw->core_set) + { + XGCValues gv; + + if (n) + XSetRegion (draw->dpy, draw->core.draw_gc, n); + else + { + gv.clip_mask = None; + XChangeGC (draw->dpy, draw->core.draw_gc, + GCClipMask, &gv); + } + } + return True; +} Index: xc/lib/Xft1/xftextent.c diff -u /dev/null xc/lib/Xft1/xftextent.c:1.1.1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftextent.c Thu Feb 14 20:26:15 2002 @@ -0,0 +1,190 @@ +/* + * $XFree86: xc/lib/Xft1/xftextent.c,v 1.1.1.1 2002/02/15 01:26:15 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 "xftint.h" + +void +XftTextExtents8 (Display *dpy, + XftFont *font, + XftChar8 *string, + int len, + XGlyphInfo *extents) +{ + if (font->core) + { + XftCoreExtents8 (dpy, font->u.core.font, string, len, extents); + } +#ifdef FREETYPE2 + else + { + XftRenderExtents8 (dpy, font->u.ft.font, string, len, extents); + } +#endif +} + +void +XftTextExtents16 (Display *dpy, + XftFont *font, + XftChar16 *string, + int len, + XGlyphInfo *extents) +{ + if (font->core) + { + XftCoreExtents16 (dpy, font->u.core.font, string, len, extents); + } +#ifdef FREETYPE2 + else + { + XftRenderExtents16 (dpy, font->u.ft.font, string, len, extents); + } +#endif +} + +void +XftTextExtents32 (Display *dpy, + XftFont *font, + XftChar32 *string, + int len, + XGlyphInfo *extents) +{ + if (font->core) + { + XftCoreExtents32 (dpy, font->u.core.font, string, len, extents); + } +#ifdef FREETYPE2 + else + { + 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/Xft1/xftfont.c diff -u /dev/null xc/lib/Xft1/xftfont.c:1.2 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftfont.c Thu Feb 28 20:00:53 2002 @@ -0,0 +1,327 @@ +/* + * $XFree86: xc/lib/Xft1/xftfont.c,v 1.2 2002/03/01 01:00:53 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 "xftint.h" + +XftPattern * +XftFontMatch (Display *dpy, int screen, XftPattern *pattern, XftResult *result) +{ + XftPattern *new; + XftPattern *match; + XftFontSet *sets[2]; + int nsets; +#ifdef FREETYPE2 + Bool render, core; +#endif + + if (!XftInit (0)) + return 0; + + 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 + render = False; + 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) + { + if (XftInitFtLibrary()) + { + sets[nsets] = _XftFontSet; + if (sets[nsets]) + nsets++; + } + } + if (core) +#endif + { + sets[nsets] = XftDisplayGetFontSet (dpy); + if (sets[nsets]) + nsets++; + } + + match = XftFontSetMatch (sets, nsets, new, result); + XftPatternDestroy (new); + return match; +} + +XftFont * +XftFontOpenPattern (Display *dpy, XftPattern *pattern) +{ + Bool core = True; + XFontStruct *xfs = 0; + XftFont *font; +#ifdef FREETYPE2 + XftFontStruct *fs = 0; + + if (XftPatternGetBool (pattern, XFT_CORE, 0, &core) != XftResultMatch) + return 0; + if (core) +#endif + { + xfs = XftCoreOpen (dpy, pattern); + if (!xfs) return 0; + } +#ifdef FREETYPE2 + else + { + fs = XftFreeTypeOpen (dpy, pattern); + if (!fs) return 0; + } +#endif + font = (XftFont *) malloc (sizeof (XftFont)); + font->core = core; + font->pattern = pattern; +#ifdef FREETYPE2 + if (core) +#endif + { + font->u.core.font = xfs; + font->ascent = xfs->ascent; + font->descent = xfs->descent; + font->height = xfs->ascent + xfs->descent; + font->max_advance_width = xfs->max_bounds.width; + } +#ifdef FREETYPE2 + else + { + font->u.ft.font = fs; + font->ascent = fs->ascent; + font->descent = fs->descent; + font->height = fs->height; + font->max_advance_width = fs->max_advance_width; + } +#endif + return font; +} + +int +_XftFontDebug (void) +{ + static int initialized; + static int debug; + + if (!initialized) + { + char *e; + + initialized = 1; + e = getenv ("XFT_DEBUG"); + if (e) + { + printf ("XFT_DEBUG=%s\n", e); + debug = atoi (e); + if (debug <= 0) + debug = 1; + } + } + return debug; +} + +XftFont * +XftFontOpen (Display *dpy, int screen, ...) +{ + va_list va; + XftPattern *pat; + XftPattern *match; + XftResult result; + XftFont *font; + + va_start (va, screen); + pat = XftPatternVaBuild (0, va); + va_end (va); + if (!pat) + { + if (_XftFontDebug () & XFT_DBG_OPEN) + printf ("XftFontOpen: Invalid pattern argument\n"); + return 0; + } + match = XftFontMatch (dpy, screen, pat, &result); + if (_XftFontDebug () & XFT_DBG_OPEN) + { + printf ("Pattern "); + XftPatternPrint (pat); + if (match) + { + printf ("Match "); + XftPatternPrint (match); + } + else + printf ("No Match\n"); + } + XftPatternDestroy (pat); + if (!match) + return 0; + + font = XftFontOpenPattern (dpy, match); + if (!font) + { + if (_XftFontDebug () & XFT_DBG_OPEN) + printf ("No Font\n"); + XftPatternDestroy (match); + } + + return font; +} + +XftFont * +XftFontOpenName (Display *dpy, int screen, const char *name) +{ + XftPattern *pat; + XftPattern *match; + XftResult result; + XftFont *font; + + pat = XftNameParse (name); + if (_XftFontDebug () & XFT_DBG_OPEN) + { + printf ("XftFontOpenName \"%s\": ", name); + if (pat) + XftPatternPrint (pat); + else + printf ("Invalid name\n"); + } + + if (!pat) + return 0; + match = XftFontMatch (dpy, screen, pat, &result); + if (_XftFontDebug () & XFT_DBG_OPEN) + { + if (match) + { + printf ("Match "); + XftPatternPrint (match); + } + else + printf ("No Match\n"); + } + XftPatternDestroy (pat); + if (!match) + return 0; + + font = XftFontOpenPattern (dpy, match); + if (!font) + XftPatternDestroy (match); + + return font; +} + +XftFont * +XftFontOpenXlfd (Display *dpy, int screen, const char *xlfd) +{ + XftPattern *pat; + XftPattern *match; + XftResult result; + XftFont *font; + + pat = XftXlfdParse (xlfd, False, False); + if (_XftFontDebug () & XFT_DBG_OPEN) + { + printf ("XftFontOpenXlfd \"%s\": ", xlfd); + if (pat) + printf ("Invalid xlfd\n"); + else + XftPatternPrint (pat); + } + + if (!pat) + return 0; + match = XftFontMatch (dpy, screen, pat, &result); + if (_XftFontDebug () & XFT_DBG_OPEN) + { + if (match) + { + printf ("Match "); + XftPatternPrint (match); + } + else + printf ("No Match\n"); + } + XftPatternDestroy (pat); + if (!match) + return 0; + + font = XftFontOpenPattern (dpy, match); + if (!font) + XftPatternDestroy (match); + + return font; +} + +void +XftFontClose (Display *dpy, XftFont *font) +{ + if (font->core) + XftCoreClose (dpy, font->u.core.font); +#ifdef FREETYPE2 + else + XftFreeTypeClose (dpy, font->u.ft.font); +#endif + if (font->pattern) + XftPatternDestroy (font->pattern); + free (font); +} + +Bool +XftGlyphExists (Display *dpy, XftFont *font, XftChar32 glyph) +{ + if (font->core) + return XftCoreGlyphExists (dpy, font->u.core.font, glyph); + else +#ifdef FREETYPE2 + return XftFreeTypeGlyphExists (dpy, font->u.ft.font, glyph); +#else + return False; +#endif +} Index: xc/lib/Xft1/xftfreetype.c diff -u /dev/null xc/lib/Xft1/xftfreetype.c:1.6 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftfreetype.c Sat Nov 23 20:49:41 2002 @@ -0,0 +1,678 @@ +/* + * $XFree86: xc/lib/Xft1/xftfreetype.c,v 1.6 2002/11/24 01:49:41 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 "xftint.h" + +FT_Library _XftFTlibrary; + +typedef struct _XftFtEncoding { + const char *name; + FT_Encoding encoding; +} 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) +{ + FT_Face face; + XftPattern *pat; + int slant; + int weight; + int i, j; + + if (FT_New_Face (_XftFTlibrary, file, id, &face)) + return 0; + + *count = face->num_faces; + + pat = XftPatternCreate (); + if (!pat) + goto bail0; + + + if (!XftPatternAddBool (pat, XFT_CORE, False)) + goto bail1; + + if (!XftPatternAddBool (pat, XFT_OUTLINE, + (face->face_flags & FT_FACE_FLAG_SCALABLE) != 0)) + goto bail1; + + if (!XftPatternAddBool (pat, XFT_SCALABLE, + (face->face_flags & FT_FACE_FLAG_SCALABLE) != 0)) + goto bail1; + + + slant = XFT_SLANT_ROMAN; + if (face->style_flags & FT_STYLE_FLAG_ITALIC) + slant = XFT_SLANT_ITALIC; + + if (!XftPatternAddInteger (pat, XFT_SLANT, slant)) + goto bail1; + + weight = XFT_WEIGHT_MEDIUM; + if (face->style_flags & FT_STYLE_FLAG_BOLD) + weight = XFT_WEIGHT_BOLD; + + if (!XftPatternAddInteger (pat, XFT_WEIGHT, weight)) + goto bail1; + + if (!XftPatternAddString (pat, XFT_FAMILY, face->family_name)) + goto bail1; + + if (!XftPatternAddString (pat, XFT_STYLE, face->style_name)) + goto bail1; + + if (!XftPatternAddString (pat, XFT_FILE, file)) + goto bail1; + + 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++) + if (!XftPatternAddDouble (pat, XFT_PIXEL_SIZE, + (double) face->available_sizes[i].height)) + goto bail1; + } + + for (i = 0; i < face->num_charmaps; i++) + { +#if 0 + printf ("face %s encoding %d %c%c%c%c\n", + face->family_name, i, + face->charmaps[i]->encoding >> 24, + face->charmaps[i]->encoding >> 16, + face->charmaps[i]->encoding >> 8, + face->charmaps[i]->encoding >> 0); +#endif + for (j = 0; j < NUM_FT_ENCODINGS; j++) + { + if (face->charmaps[i]->encoding == xftFtEncoding[j].encoding) + { + if (!XftPatternAddString (pat, XFT_ENCODING, + xftFtEncoding[j].name)) + goto bail1; + } + } + } + + if (!XftPatternAddString (pat, XFT_ENCODING, + "glyphs-fontspecific")) + goto bail1; + + + FT_Done_Face (face); + return pat; + +bail1: + XftPatternDestroy (pat); +bail0: + FT_Done_Face (face); + 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; + f->matrix.xx = 0x10000; + f->matrix.xy = 0x0; + f->matrix.yy = 0x10000; + f->matrix.yx = 0x0; + 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; + +XftFontStruct * +XftFreeTypeOpen (Display *dpy, XftPattern *pattern) +{ + XftDisplayInfo *info = _XftDisplayInfoGet (dpy); + XftFtFile *file; + FT_Face face; + XftFtGlyphSet *gs; + char *filename; + int id; + double dsize; + FT_F26Dot6 size; + int rgba; + int spacing; + int char_width; + Bool antialias; + Bool minspace; + char *encoding_name; + XftFontStruct *font; + int j; + FT_Encoding encoding; + int charmap; + FT_Matrix matrix; + XftMatrix *font_matrix; + +#if 0 + int extra; +#endif + int height, ascent, descent; + XRenderPictFormat pf, *format; + + /* + * 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, &dsize) != XftResultMatch) + goto bail0; + + switch (XftPatternGetInteger (pattern, XFT_RGBA, 0, &rgba)) { + case XftResultNoMatch: + rgba = XFT_RGBA_NONE; + break; + case XftResultMatch: + break; + default: + goto bail0; + } + + switch (XftPatternGetBool (pattern, XFT_ANTIALIAS, 0, &antialias)) { + case XftResultNoMatch: + antialias = True; + break; + case XftResultMatch: + break; + default: + 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 = info->glyphSets; 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) + { + switch (rgba) { + case FC_RGBA_RGB: + case FC_RGBA_BGR: + case FC_RGBA_VRGB: + case FC_RGBA_VBGR: + pf.depth = 32; + pf.type = PictTypeDirect; + pf.direct.alpha = 24; + pf.direct.alphaMask = 0xff; + pf.direct.red = 16; + pf.direct.redMask = 0xff; + pf.direct.green = 8; + pf.direct.greenMask = 0xff; + pf.direct.blue = 0; + pf.direct.blueMask = 0xff; + format = XRenderFindFormat(dpy, + PictFormatType| + PictFormatDepth| + PictFormatAlpha| + PictFormatAlphaMask| + PictFormatRed| + PictFormatRedMask| + PictFormatGreen| + PictFormatGreenMask| + PictFormatBlue| + PictFormatBlueMask, + &pf, 0); + break; + default: + pf.depth = 8; + pf.type = PictTypeDirect; + pf.direct.alpha = 0; + pf.direct.alphaMask = 0xff; + format = XRenderFindFormat(dpy, + PictFormatType| + PictFormatDepth| + PictFormatAlpha| + PictFormatAlphaMask, + &pf, 0); + break; + } + } + else + { + pf.depth = 1; + pf.type = PictTypeDirect; + pf.direct.alpha = 0; + pf.direct.alphaMask = 0x1; + format = XRenderFindFormat(dpy, + PictFormatType| + PictFormatDepth| + PictFormatAlpha| + PictFormatAlphaMask, + &pf, 0); + } + + if (!format) + goto bail2; + + if (!XftFreeTypeSetFace (face, size, charmap, &matrix)) + goto bail2; + + descent = -(face->size->metrics.descender >> 6); + ascent = face->size->metrics.ascender >> 6; + if (minspace) + { + height = ascent + descent; + } + else + { + height = face->size->metrics.height >> 6; +#if 0 + extra = (height - (ascent + descent)); + if (extra > 0) + { + ascent = ascent + extra / 2; + descent = height - ascent; + } + else if (extra < 0) + height = ascent + descent; +#endif + } + font->ascent = ascent; + font->descent = descent; + font->height = height; + + if (char_width) + font->max_advance_width = char_width; + else + font->max_advance_width = face->size->metrics.max_advance >> 6; + + gs->next = info->glyphSets; + info->glyphSets = 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->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 (gs); +bail1: + _XftFreeTypeCloseFile (file); +bail0: + return 0; +} + +void +XftFreeTypeClose (Display *dpy, XftFontStruct *font) +{ + XftFtGlyphSet *gs, **prev; + XftDisplayInfo *info = _XftDisplayInfoGet (dpy); + int i; + XGlyphInfo *gi; + + for (prev = &info->glyphSets; (gs = *prev); prev = &gs->next) + { + if (&gs->font == font) + { + if (--gs->ref == 0) + { + XRenderFreeGlyphSet (dpy, font->glyphset); + for (i = 0; i < font->nrealized; i++) + { + gi = font->realized[i]; + if (gi && gi != XftUntestedGlyph) + free (gi); + } + if (font->realized) + free (font->realized); + + _XftFreeTypeCloseFile (gs->file); + + *prev = gs->next; + free (gs); + } + break; + } + } +} + +XftFontStruct * +XftFreeTypeGet (XftFont *font) +{ + if (font->core) + return 0; + return font->u.ft.font; +} + +/* #define XFT_DEBUG_FONTSET */ + +Bool +XftInitFtLibrary (void) +{ + if (_XftFTlibrary) + return True; + if (FT_Init_FreeType (&_XftFTlibrary)) + return False; + _XftFontSet = FcConfigGetFonts (0, FcSetSystem); + if (!_XftFontSet) + return False; + return True; +} Index: xc/lib/Xft1/xftfs.c diff -u /dev/null xc/lib/Xft1/xftfs.c:1.2 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftfs.c Thu Feb 28 20:00:53 2002 @@ -0,0 +1,44 @@ +/* + * $XFree86: xc/lib/Xft1/xftfs.c,v 1.2 2002/03/01 01:00:53 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 "xftint.h" + +XftFontSet * +XftFontSetCreate (void) +{ + return FcFontSetCreate (); +} + +void +XftFontSetDestroy (XftFontSet *s) +{ + FcFontSetDestroy (s); +} + +Bool +XftFontSetAdd (XftFontSet *s, XftPattern *font) +{ + return FcFontSetAdd (s, font); +} Index: xc/lib/Xft1/xftglyphs.c diff -u /dev/null xc/lib/Xft1/xftglyphs.c:1.2 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftglyphs.c Sat Mar 2 17:09:05 2002 @@ -0,0 +1,493 @@ +/* + * $XFree86: xc/lib/Xft1/xftglyphs.c,v 1.2 2002/03/02 22:09:05 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 "xftint.h" +#include + +static const int filters[3][3] = { + /* red */ +#if 0 +{ 65538*4/7,65538*2/7,65538*1/7 }, + /* green */ +{ 65536*1/4, 65536*2/4, 65537*1/4 }, + /* blue */ +{ 65538*1/7,65538*2/7,65538*4/7 }, +#endif +{ 65538*9/13,65538*3/13,65538*1/13 }, + /* green */ +{ 65538*1/6, 65538*4/6, 65538*1/6 }, + /* blue */ +{ 65538*1/13,65538*3/13,65538*9/13 }, +}; + +void +XftGlyphLoad (Display *dpy, + XftFontStruct *font, + XftChar32 *glyphs, + int nglyph) +{ + FT_Error error; + FT_ULong charcode; + FT_UInt glyphindex; + FT_GlyphSlot glyph; + XGlyphInfo *gi; + Glyph g; + unsigned char bufLocal[4096]; + unsigned char *bufBitmap = bufLocal; + unsigned char *b; + int bufSize = sizeof (bufLocal); + int size, pitch; + unsigned char bufLocalRgba[4096]; + unsigned char *bufBitmapRgba = bufLocalRgba; + int bufSizeRgba = sizeof (bufLocalRgba); + int sizergba, pitchrgba, widthrgba; + int width; + int height; + int i; + int left, right, top, bottom; + int hmul = 1; + int vmul = 1; + FT_Bitmap ftbit; + FT_Matrix matrix; + FT_Vector vector; + Bool subpixel = False; + + if (!XftFreeTypeSetFace (font->face, font->size, font->charmap, &font->matrix)) + return ; + + matrix.xx = matrix.yy = 0x10000L; + matrix.xy = matrix.yx = 0; + + if (font->antialias) + { + 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++; + gi = font->realized[charcode]; + if (!gi) + continue; + + 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; + error = FT_Load_Glyph (font->face, glyphindex, FT_LOAD_NO_BITMAP); + if (error) + continue; + +#define FLOOR(x) ((x) & -64) +#define CEIL(x) (((x)+63) & -64) +#define TRUNC(x) ((x) >> 6) +#define ROUND(x) (((x)+32) & -64) + + glyph = font->face->glyph; + + 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->spacing != XFT_PROPORTIONAL && !font->transform) + { + if (TRUNC(right) > font->max_advance_width) + { + int adjust; + + adjust = right - (font->max_advance_width << 6); + if (adjust > left) + adjust = left; + left -= adjust; + right -= adjust; + width = font->max_advance_width; + } + } + + if ( glyph->format == ft_glyph_format_outline ) + { + if (font->antialias) + pitch = (width * hmul + 3) & ~3; + else + pitch = ((width + 31) & ~31) >> 3; + + size = pitch * height * vmul; + + if (size > bufSize) + { + if (bufBitmap != bufLocal) + free (bufBitmap); + bufBitmap = (unsigned char *) malloc (size); + if (!bufBitmap) + continue; + bufSize = size; + } + memset (bufBitmap, 0, size); + + ftbit.width = width * hmul; + ftbit.rows = height * vmul; + ftbit.pitch = pitch; + if (font->antialias) + ftbit.pixel_mode = ft_pixel_mode_grays; + else + ftbit.pixel_mode = ft_pixel_mode_mono; + + ftbit.buffer = bufBitmap; + + if (subpixel) + FT_Outline_Transform (&glyph->outline, &matrix); + + FT_Outline_Translate ( &glyph->outline, -left*hmul, -bottom*vmul ); + + FT_Outline_Get_Bitmap( _XftFTlibrary, &glyph->outline, &ftbit ); + i = size; + b = (unsigned char *) bufBitmap; + /* + * swap bit order around + */ + if (!font->antialias) + { + if (BitmapBitOrder (dpy) != MSBFirst) + { + unsigned char *line; + unsigned char c; + int i; + + line = (unsigned char *) bufBitmap; + i = size; + while (i--) + { + c = *line; + c = ((c << 1) & 0xaa) | ((c >> 1) & 0x55); + c = ((c << 2) & 0xcc) | ((c >> 2) & 0x33); + c = ((c << 4) & 0xf0) | ((c >> 4) & 0x0f); + *line++ = c; + } + } + } + if (_XftFontDebug() & XFT_DBG_GLYPH) + { + 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) + { + int x, y; + unsigned char *line; + + line = bufBitmap; + for (y = 0; y < height * vmul; y++) + { + if (font->antialias) + { + 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"); + } + } + } + else + { + if (_XftFontDebug() & XFT_DBG_GLYPH) + printf ("glyph (%c) %d no outline\n", + (int) charcode, (int) charcode); + continue; + } + + gi->width = width; + gi->height = height; + gi->x = -TRUNC(left); + gi->y = TRUNC(top); + 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->advance.x)); + gi->yOff = -TRUNC(ROUND(glyph->advance.y)); + } + g = charcode; + + if (subpixel) + { + int x, y; + unsigned char *in_line, *out_line, *in; + unsigned int *out; + 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; + rf = 2; + break; + } + if (sizergba > bufSizeRgba) + { + if (bufBitmapRgba != bufLocalRgba) + free (bufBitmapRgba); + bufBitmapRgba = (unsigned char *) malloc (sizergba); + if (!bufBitmapRgba) + continue; + bufSizeRgba = sizergba; + } + memset (bufBitmapRgba, 0, sizergba); + in_line = bufBitmap; + out_line = bufBitmapRgba; + for (y = 0; y < height; y++) + { + in = in_line; + out = (unsigned int *) out_line; + in_line += pitch * vmul; + out_line += pitchrgba; + 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+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++ = (green << 24) | (red << 16) | (green << 8) | blue; + } + } + + XRenderAddGlyphs (dpy, font->glyphset, &g, gi, 1, + (char *) bufBitmapRgba, sizergba); + } + else + { + XRenderAddGlyphs (dpy, font->glyphset, &g, gi, 1, + (char *) bufBitmap, size); + } + } + if (bufBitmap != bufLocal) + free (bufBitmap); + if (bufBitmapRgba != bufLocalRgba) + free (bufBitmapRgba); +} + +#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, + XftChar32 glyph, + XftChar32 *missing, + int *nmissing) +{ + XGlyphInfo **realized; + int nrealized; + int n; + + if (glyph >= font->nrealized) + { + nrealized = glyph + STEP; + + if (font->realized) + realized = (XGlyphInfo **) realloc ((void *) font->realized, + nrealized * sizeof (XGlyphInfo *)); + else + realized = (XGlyphInfo **) malloc (nrealized * sizeof (XGlyphInfo *)); + if (!realized) + return; + for (n = font->nrealized; n < nrealized; n++) + realized[n] = XftUntestedGlyph; + + font->realized = realized; + font->nrealized = nrealized; + } + if (font->realized[glyph] == XftUntestedGlyph) + { + if (XftGlyphDrawable (dpy, font, glyph)) + { + font->realized[glyph] = (XGlyphInfo *) malloc (sizeof (XGlyphInfo)); + n = *nmissing; + missing[n++] = glyph; + if (n == XFT_NMISSING) + { + XftGlyphLoad (dpy, font, missing, n); + n = 0; + } + *nmissing = n; + } + else + font->realized[glyph] = 0; + } +} + +Bool +XftFreeTypeGlyphExists (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 && glyph <= font->face->num_glyphs; +} Index: xc/lib/Xft1/xftgram.y diff -u /dev/null xc/lib/Xft1/xftgram.y:1.1.1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftgram.y Thu Feb 14 20:26:16 2002 @@ -0,0 +1,452 @@ +/* + * $XFree86: xc/lib/Xft1/xftgram.y,v 1.1.1.1 2002/02/15 01:26:16 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 "xftint.h" + +static XftMatrix matrix; + +%} + +%union { + int ival; + double dval; + char *sval; + XftExpr *eval; + XftPattern *pval; + XftValue vval; + XftEdit *Eval; + XftOp oval; + XftQual qval; + XftTest *tval; +} + +%token INTEGER +%token DOUBLE +%token STRING NAME +%token ANY ALL +%token DIR CACHE INCLUDE INCLUDEIF MATCH EDIT +%token TOK_TRUE TOK_FALSE TOK_NIL +%token EQUAL SEMI OS CS + +%type expr +%type value +%type field +%type edit +%type edits +%type eqop +%type qual +%type compare +%type tests test +%type number + +%right QUEST COLON +%left OROR +%left ANDAND +%left EQEQ NOTEQ +%left LESS LESSEQ MORE MOREEQ +%left PLUS MINUS +%left TIMES DIVIDE +%right NOT + +%% +configs : configs config + | + ; +config : DIR STRING + { XftConfigAddDir ($2); } + | CACHE STRING + { XftConfigSetCache ($2); } + | INCLUDE STRING + { XftConfigPushInput ($2, True); } + | INCLUDEIF STRING + { XftConfigPushInput ($2, False); } + | MATCH tests EDIT edits + { XftConfigAddEdit ($2, $4); } + ; +tests : test tests + { $1->next = $2; $$ = $1; } + | + { $$ = 0; } + ; +test : qual field compare value + { $$ = XftTestCreate ($1, $2, $3, $4); } + ; +qual : ANY + { $$ = XftQualAny; } + | ALL + { $$ = XftQualAll; } + | + { $$ = XftQualAny; } + ; +field : NAME + { + $$ = XftConfigSaveField ($1); + } + ; +compare : EQUAL + { $$ = XftOpEqual; } + | EQEQ + { $$ = XftOpEqual; } + | NOTEQ + { $$ = XftOpNotEqual; } + | LESS + { $$ = XftOpLess; } + | LESSEQ + { $$ = XftOpLessEqual; } + | MORE + { $$ = XftOpMore; } + | MOREEQ + { $$ = XftOpMoreEqual; } + ; +value : INTEGER + { + $$.type = XftTypeInteger; + $$.u.i = $1; + } + | DOUBLE + { + $$.type = XftTypeDouble; + $$.u.d = $1; + } + | STRING + { + $$.type = XftTypeString; + $$.u.s = $1; + } + | TOK_TRUE + { + $$.type = XftTypeBool; + $$.u.b = True; + } + | TOK_FALSE + { + $$.type = XftTypeBool; + $$.u.b = False; + } + | TOK_NIL + { + $$.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; } + | + { $$ = 0; } + ; +edit : field eqop expr SEMI + { $$ = XftEditCreate ($1, $2, $3); } + ; +eqop : EQUAL + { $$ = XftOpAssign; } + | PLUS EQUAL + { $$ = XftOpPrepend; } + | EQUAL PLUS + { $$ = XftOpAppend; } + ; +expr : INTEGER + { $$ = XftExprCreateInteger ($1); } + | DOUBLE + { $$ = XftExprCreateDouble ($1); } + | STRING + { $$ = XftExprCreateString ($1); } + | TOK_TRUE + { $$ = XftExprCreateBool (True); } + | TOK_FALSE + { $$ = XftExprCreateBool (False); } + | TOK_NIL + { $$ = XftExprCreateNil (); } + | matrix + { $$ = XftExprCreateMatrix (&matrix); } + | NAME + { $$ = XftExprCreateField ($1); } + | expr OROR expr + { $$ = XftExprCreateOp ($1, XftOpOr, $3); } + | expr ANDAND expr + { $$ = XftExprCreateOp ($1, XftOpAnd, $3); } + | expr EQEQ expr + { $$ = XftExprCreateOp ($1, XftOpEqual, $3); } + | expr NOTEQ expr + { $$ = XftExprCreateOp ($1, XftOpNotEqual, $3); } + | expr LESS expr + { $$ = XftExprCreateOp ($1, XftOpLess, $3); } + | expr LESSEQ expr + { $$ = XftExprCreateOp ($1, XftOpLessEqual, $3); } + | expr MORE expr + { $$ = XftExprCreateOp ($1, XftOpMore, $3); } + | expr MOREEQ expr + { $$ = XftExprCreateOp ($1, XftOpMoreEqual, $3); } + | expr PLUS expr + { $$ = XftExprCreateOp ($1, XftOpPlus, $3); } + | expr MINUS expr + { $$ = XftExprCreateOp ($1, XftOpMinus, $3); } + | expr TIMES expr + { $$ = XftExprCreateOp ($1, XftOpTimes, $3); } + | expr DIVIDE expr + { $$ = XftExprCreateOp ($1, XftOpDivide, $3); } + | NOT expr + { $$ = XftExprCreateOp ($2, XftOpNot, (XftExpr *) 0); } + | expr QUEST expr COLON expr + { $$ = XftExprCreateOp ($1, XftOpQuest, XftExprCreateOp ($3, XftOpQuest, $5)); } + ; +%% + +int +XftConfigwrap (void) +{ + return 1; +} + +void +XftConfigerror (char *fmt, ...) +{ + va_list args; + + fprintf (stderr, "\"%s\": line %d, ", XftConfigFile, XftConfigLineno); + va_start (args, fmt); + vfprintf (stderr, fmt, args); + va_end (args); + fprintf (stderr, "\n"); +} + +XftTest * +XftTestCreate (XftQual qual, const char *field, XftOp compare, XftValue value) +{ + XftTest *test = (XftTest *) malloc (sizeof (XftTest));; + + if (test) + { + test->next = 0; + test->qual = qual; + 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; +} + +XftExpr * +XftExprCreateInteger (int i) +{ + XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); + + if (e) + { + e->op = XftOpInteger; + e->u.ival = i; + } + return e; +} + +XftExpr * +XftExprCreateDouble (double d) +{ + XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); + + if (e) + { + e->op = XftOpDouble; + e->u.dval = d; + } + return e; +} + +XftExpr * +XftExprCreateString (const char *s) +{ + XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); + + if (e) + { + e->op = XftOpString; + e->u.sval = _XftSaveString (s); + } + return e; +} + +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)); + + if (e) + { + e->op = XftOpBool; + e->u.bval = b; + } + return e; +} + +XftExpr * +XftExprCreateNil (void) +{ + XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); + + if (e) + { + e->op = XftOpNil; + } + return e; +} + +XftExpr * +XftExprCreateField (const char *field) +{ + XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); + + if (e) + { + e->op = XftOpField; + e->u.field = _XftSaveString (field); + } + return e; +} + +XftExpr * +XftExprCreateOp (XftExpr *left, XftOp op, XftExpr *right) +{ + XftExpr *e = (XftExpr *) malloc (sizeof (XftExpr)); + + if (e) + { + e->op = op; + e->u.tree.left = left; + e->u.tree.right = right; + } + return e; +} + +void +XftExprDestroy (XftExpr *e) +{ + switch (e->op) { + case XftOpInteger: + break; + case XftOpDouble: + break; + case XftOpString: + free (e->u.sval); + break; + case XftOpMatrix: + free (e->u.mval); + break; + case XftOpBool: + break; + case XftOpField: + free (e->u.field); + break; + case XftOpAssign: + case XftOpPrepend: + case XftOpAppend: + break; + case XftOpOr: + case XftOpAnd: + case XftOpEqual: + case XftOpNotEqual: + case XftOpLess: + case XftOpLessEqual: + case XftOpMore: + case XftOpMoreEqual: + case XftOpPlus: + case XftOpMinus: + case XftOpTimes: + case XftOpDivide: + case XftOpQuest: + XftExprDestroy (e->u.tree.right); + /* fall through */ + case XftOpNot: + XftExprDestroy (e->u.tree.left); + break; + case XftOpNil: + break; + } + free (e); +} + +XftEdit * +XftEditCreate (const char *field, XftOp op, XftExpr *expr) +{ + XftEdit *e = (XftEdit *) malloc (sizeof (XftEdit)); + + if (e) + { + e->next = 0; + e->field = field; /* already saved in grammar */ + e->op = op; + e->expr = expr; + } + return e; +} + +void +XftEditDestroy (XftEdit *e) +{ + if (e->next) + XftEditDestroy (e->next); + free ((void *) e->field); + if (e->expr) + XftExprDestroy (e->expr); +} + +char * +XftConfigSaveField (const char *field) +{ + return _XftSaveString (field); +} Index: xc/lib/Xft1/xftinit.c diff -u /dev/null xc/lib/Xft1/xftinit.c:1.4 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftinit.c Wed May 22 00:16:40 2002 @@ -0,0 +1,42 @@ +/* + * $XFree86: xc/lib/Xft1/xftinit.c,v 1.4 2002/05/22 04:16:40 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 "xftint.h" + +XftFontSet *_XftFontSet; +Bool _XftConfigInitialized; +static char *nodirs[] = { 0 }; +char **XftConfigDirs = nodirs; + +Bool +XftInit (char *config) +{ + if (_XftConfigInitialized) + return True; + if (!FcInit ()) + return False; + _XftConfigInitialized = True; + return True; +} Index: xc/lib/Xft1/xftint.h diff -u /dev/null xc/lib/Xft1/xftint.h:1.3 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftint.h Mon Jul 1 00:28:17 2002 @@ -0,0 +1,508 @@ +/* + * $XFree86: xc/lib/Xft1/xftint.h,v 1.3 2002/07/01 04:28:17 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. + */ + +#ifndef _XFTINT_H_ +#define _XFTINT_H_ + +#include +#include +#ifdef FREETYPE2 +#include "XftFreetype.h" +#else +#include "Xft.h" +#endif + +typedef struct _XftMatcher { + char *object; + double (*compare) (char *object, XftValue value1, XftValue value2); +} XftMatcher; + +typedef struct _XftSymbolic { + const char *name; + 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; + Visual *visual; /* NULL for bitmaps */ + Colormap colormap; + Region clip; + Bool core_set; + Bool render_set; + Bool render_able; + struct { + Picture pict; + struct { + Picture pict; + XRenderColor color; + } src[XFT_DRAW_N_SRC]; + } render; + struct { + GC draw_gc; + unsigned long fg; + Font font; + } core; +}; + +typedef struct _XftDisplayInfo { + struct _XftDisplayInfo *next; + Display *display; + XExtCodes *codes; + XftPattern *defaults; + XftFontSet *coreFonts; + Bool hasRender; + struct _XftFtGlyphSet *glyphSets; +} XftDisplayInfo; + +extern XftFontSet *_XftGlobalFontSet; +extern XftDisplayInfo *_XftDisplayInfo; +extern char **XftConfigDirs; +extern XftFontSet *_XftFontSet; + +typedef struct _FcPatternElt FcPatternElt; + +/* + * Yes, these are stolen from fcint.h + */ +FcPatternElt * +FcPatternFindElt (const FcPattern *p, const char *object); + +FcPatternElt * +FcPatternInsertElt (FcPattern *p, const char *object); + +typedef FcPatternElt XftPatternElt; + +#define XFT_NMISSING 256 + +#ifndef XFT_DEFAULT_PATH +#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 +#define XFT_DBG_EDIT 2048 + +typedef enum _XftOp { + XftOpInteger, XftOpDouble, XftOpString, XftOpMatrix, XftOpBool, XftOpNil, + XftOpField, + XftOpAssign, XftOpPrepend, XftOpAppend, + XftOpQuest, + XftOpOr, XftOpAnd, XftOpEqual, XftOpNotEqual, + XftOpLess, XftOpLessEqual, XftOpMore, XftOpMoreEqual, + XftOpPlus, XftOpMinus, XftOpTimes, XftOpDivide, + XftOpNot +} XftOp; + +typedef struct _XftExpr { + XftOp op; + union { + int ival; + double dval; + char *sval; + XftMatrix *mval; + Bool bval; + char *field; + struct { + struct _XftExpr *left, *right; + } tree; + } u; +} XftExpr; + +typedef enum _XftQual { + XftQualAny, XftQualAll +} XftQual; + +typedef struct _XftTest { + struct _XftTest *next; + XftQual qual; + const char *field; + XftOp op; + XftValue value; +} XftTest; + +typedef struct _XftEdit { + struct _XftEdit *next; + const char *field; + XftOp op; + XftExpr *expr; +} XftEdit; + +typedef struct _XftSubst { + struct _XftSubst *next; + XftTest *test; + XftEdit *edit; +} XftSubst; + +/* + * I tried this with functions that took va_list* arguments + * but portability concerns made me change these functions + * into macros (sigh). + */ + +#define _XftPatternVapBuild(result, orig, va) \ +{ \ + XftPattern *__p__ = (orig); \ + const char *__o__; \ + XftValue __v__; \ + \ + if (!__p__) \ + { \ + __p__ = XftPatternCreate (); \ + if (!__p__) \ + goto _XftPatternVapBuild_bail0; \ + } \ + for (;;) \ + { \ + __o__ = va_arg (va, const char *); \ + if (!__o__) \ + break; \ + __v__.type = va_arg (va, XftType); \ + switch (__v__.type) { \ + case XftTypeVoid: \ + goto _XftPatternVapBuild_bail1; \ + case XftTypeInteger: \ + __v__.u.i = va_arg (va, int); \ + break; \ + case XftTypeDouble: \ + __v__.u.d = va_arg (va, double); \ + break; \ + case XftTypeString: \ + __v__.u.s = va_arg (va, char *); \ + break; \ + 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; \ + } \ + result = __p__; \ + goto _XftPatternVapBuild_return; \ + \ +_XftPatternVapBuild_bail1: \ + if (!orig) \ + XftPatternDestroy (__p__); \ +_XftPatternVapBuild_bail0: \ + result = 0; \ + \ +_XftPatternVapBuild_return: \ + ; \ +} + + +/* 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 +_XftConfigCompareValue (XftValue m, + XftOp op, + XftValue v); + +/* xftcore.c */ + +#define XFT_CORE_N16LOCAL 256 + +XChar2b * +XftCoreConvert16 (XftChar16 *string, + int len, + XChar2b xcloc[XFT_CORE_N16LOCAL]); + +XChar2b * +XftCoreConvert32 (XftChar32 *string, + 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, + XftChar8 *string, + int len, + XGlyphInfo *extents); + +void +XftCoreExtents16 (Display *dpy, + XFontStruct *fs, + XftChar16 *string, + int len, + XGlyphInfo *extents); + +void +XftCoreExtents32 (Display *dpy, + XFontStruct *fs, + XftChar32 *string, + int len, + XGlyphInfo *extents); + +void +XftCoreExtentsUtf8 (Display *dpy, + XFontStruct *fs, + XftChar8 *string, + int len, + XGlyphInfo *extents); + +Bool +XftCoreGlyphExists (Display *dpy, + XFontStruct *fs, + XftChar32 glyph); + +/* xftdbg.c */ +void +XftOpPrint (XftOp op); + +void +XftTestPrint (XftTest *test); + +void +XftExprPrint (XftExpr *expr); + +void +XftEditPrint (XftEdit *edit); + +void +XftSubstPrint (XftSubst *subst); + +/* xftdpy.c */ +XftDisplayInfo * +_XftDisplayInfoGet (Display *dpy); + +int +XftDefaultParseBool (char *v); + +Bool +XftDefaultGetBool (Display *dpy, const char *object, int screen, Bool def); + +int +XftDefaultGetInteger (Display *dpy, const char *object, int screen, int def); + +double +XftDefaultGetDouble (Display *dpy, const char *object, int screen, double def); + +XftFontSet * +XftDisplayGetFontSet (Display *dpy); + +/* xftdraw.c */ +Bool +XftDrawRenderPrepare (XftDraw *draw, + XftColor *color, + XftFont *font, + int src); + +Bool +XftDrawCorePrepare (XftDraw *draw, + XftColor *color, + XftFont *font); + +/* xftextent.c */ +/* xftfont.c */ +int +_XftFontDebug (void); + +/* xftfs.c */ +/* xftgram.y */ +int +XftConfigparse (void); + +int +XftConfigwrap (void); + +void +XftConfigerror (char *fmt, ...); + +char * +XftConfigSaveField (const char *field); + +XftTest * +XftTestCreate (XftQual qual, const char *field, XftOp compare, XftValue value); + +XftExpr * +XftExprCreateInteger (int i); + +XftExpr * +XftExprCreateDouble (double d); + +XftExpr * +XftExprCreateString (const char *s); + +XftExpr * +XftExprCreateMatrix (const XftMatrix *m); + +XftExpr * +XftExprCreateBool (Bool b); + +XftExpr * +XftExprCreateNil (void); + +XftExpr * +XftExprCreateField (const char *field); + +XftExpr * +XftExprCreateOp (XftExpr *left, XftOp op, XftExpr *right); + +void +XftExprDestroy (XftExpr *e); + +XftEdit * +XftEditCreate (const char *field, XftOp op, XftExpr *expr); + +void +XftEditDestroy (XftEdit *e); + +/* xftinit.c */ + +/* xftlex.l */ +extern int XftConfigLineno; +extern char *XftConfigFile; + +int +XftConfiglex (void); + +Bool +XftConfigLexFile(char *s); + +Bool +XftConfigPushInput (char *s, Bool complain); + +/* xftlist.c */ +Bool +XftListValueCompare (XftValue v1, + XftValue v2); + +Bool +XftListMatch (XftPattern *p, + XftPattern *font, + XftQual qual); + +Bool +XftListAppend (XftFontSet *s, + XftPattern *font, + XftObjectSet *os); + + +/* xftmatch.c */ + +/* xftname.c */ +Bool +XftNameConstant (char *string, int *result); + +/* xftpat.c */ + +extern FcPatternElt * +FcPatternFind (FcPattern *p, const char *object, FcBool insert); + +XftPatternElt * +XftPatternFind (XftPattern *p, const char *object, FcBool insert); + +/* xftrender.c */ + +/* xftmatrix.c */ +XftMatrix * +_XftSaveMatrix (const XftMatrix *mat); + +/* xftstr.c */ +char * +_XftSaveString (const char *s); + +const char * +_XftGetInt(const char *ptr, int *val); + +char * +_XftSplitStr (const char *field, char *save); + +char * +_XftDownStr (const char *field, char *save); + +const char * +_XftSplitField (const char *field, char *save); + +const char * +_XftSplitValue (const char *field, char *save); + +int +_XftMatchSymbolic (XftSymbolic *s, int n, const char *name, int def); + +int +_XftStrCmpIgnoreCase (const char *s1, const char *s2); + +/* xftxlfd.c */ +Bool +XftCoreAddFonts (XftFontSet *set, Display *dpy, Bool ignore_scalable); + +#endif /* _XFT_INT_H_ */ Index: xc/lib/Xft1/xftlex.l diff -u /dev/null xc/lib/Xft1/xftlex.l:1.1.1.1 --- /dev/null Thu Feb 27 12:27:24 2003 +++ xc/lib/Xft1/xftlex.l Thu Feb 14 20:26:15 2002 @@ -0,0 +1,275 @@ +%{ +/* + * $XFree86: xc/lib/Xft1/xftlex.l,v 1.1.1.1 2002/02/15 01:26:15 keithp Exp $ + * + * Copyright (c) 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 "xftint.h" + +#include "xftgram.h" + +int XftConfigLineno; + +static void _XftConfigSkipComment (void); + +static void _XftConfigSkipLine (void); + +static int _XftConfigPopInput (void); + + +#define XFT_CONFIG_IN_DEEP 20 +FILE *XftConfigInStack[XFT_CONFIG_IN_DEEP]; +FILE **XftConfigInpt = XftConfigInStack + XFT_CONFIG_IN_DEEP; +FILE *XftConfigInput; +int XftConfigLinenos[XFT_CONFIG_IN_DEEP]; +int *XftConfigLinenopt = XftConfigLinenos + XFT_CONFIG_IN_DEEP; +char *XftConfigFile = ""; +char *XftConfigFileNames[XFT_CONFIG_IN_DEEP]; +char **XftConfigFileNamePt = XftConfigFileNames + XFT_CONFIG_IN_DEEP; +int XftConfigFiledeep = 0; + +#undef YY_INPUT + +#define YY_INPUT(buf,result,max_size) \ +{ \ + int c; \ + result = 0; \ + while (result < max_size) { \ + c = getc (XftConfigInput); \ + if (c < 0) { \ + c = _XftConfigPopInput (); \ + if (c < 0) \ + break; \ + } \ + buf[result++] = c; \ + if (c == '\n') \ + { \ + XftConfigLineno++; \ + break; \ + } \ + } \ +} + +#ifndef FLEX_SCANNER +#undef input +#undef unput +static int input (void) +{ + char buf[1]; + static int r = EOF; + + 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); +} +#endif + +%} +%% +"/\052" _XftConfigSkipComment(); +^# _XftConfigSkipLine(); +dir return DIR; +cache return CACHE; +include return INCLUDE; +includeif return INCLUDEIF; +match return MATCH; +edit return EDIT; +true return TOK_TRUE; +false return TOK_FALSE; +nil return TOK_NIL; +any return ANY; +all return ALL; +"=" return EQUAL; +":" return COLON; +";" return SEMI; +"+" return PLUS; +"-" return MINUS; +"*" return TIMES; +"/" return DIVIDE; +"!" return NOT; +"&&" return ANDAND; +"||" return OROR; +"<" return LESS; +"<=" return LESSEQ; +"==" return EQEQ; +">=" return MOREEQ; +">" return MORE; +"!=" return NOTEQ; +"?" return QUEST; +"[" return OS; +"]" return CS; +\"([^\n\"]|\\\")*\" { + yytext[yyleng - 1] = '\0'; + yylval.sval = yytext+1; + return STRING; + } +[0-9]+ { + yylval.ival = strtol (yytext, 0, 10); + return INTEGER; + } +(([0-9]+((\.[0-9]*(\{[0-9]+\})?)?))|(\.[0-9]+)|(\.[0-9]*\{[0-9]+\}))(([Ee][-+]?[0-9]+)?) { + yylval.dval = strtod (yytext, 0); + return DOUBLE; + } +[a-zA-Z][0-9a-zA-Z_]* { + if (XftNameConstant (yytext, &yylval.ival)) + return INTEGER; + yylval.sval = yytext; + return NAME; + } +. ; +"\n" ; +%% +static void +_XftConfigSkipComment (void) +{ + int c; + + c = input(); + for (;;) { + while (c != EOF && c != '*') + c = input(); + if (c == EOF) + return; + c = input(); + if (c == EOF || c == '/') + return; + } +} + +static void +_XftConfigSkipLine (void) +{ + int c; + + do { + c = input(); + } while (c != EOF && c != '\n'); + if (c == '\n') unput('\n'); +} + +Bool +XftConfigLexFile(char *s) +{ + FILE *f; + + f = fopen (s, "r"); + if (f == 0) + { + fprintf (stderr, "cannot open file \"%s\"\n", s); + return False; + } + ++XftConfigFiledeep; + XftConfigInput = f; + XftConfigFile = s; + return True; +} + +Bool +XftConfigPushInput (char *s, Bool complain) +{ + FILE *f; + char *t; + char *h; + + if (XftConfigInpt == XftConfigInStack) + { + (void) fprintf (stderr, "files nested too deeply\n"); + return False; + } + t = s; + if (*s == '~') + { + h = getenv ("HOME"); + if (h) + { + t = (char *) malloc (strlen (h) + strlen (s)); + if (t) + { + strcpy (t, h); + strcat (t, s+1); + } + else + t = s; + } + } + f = fopen (t, "r"); + if (t != s) + free (t); + if (f == 0) + { + if (complain) + (void) fprintf (stderr, "cannot open file %s\n", s); + return False; + } + ++XftConfigFiledeep; + *--XftConfigInpt = XftConfigInput; + *--XftConfigLinenopt = XftConfigLineno; + *--XftConfigFileNamePt = XftConfigFile; + XftConfigInput = f; + XftConfigLineno = 1; + XftConfigFile = _XftSaveString (s); + return True; +} + +static int +_XftConfigPopInput (void) +{ + int c; + + for (;;) + { + c = getc (XftConfigInput); + if (c >= 0) + return c; + fclose (XftConfigInput); + XftConfigInput = 0; + if (XftConfigInpt == XftConfigInStack + XFT_CONFIG_IN_DEEP) + return EOF; + XftConfigInput = *XftConfigInpt++; + XftConfigLineno = *XftConfigLinenopt++; + free (XftConfigFile); + XftConfigFile = *XftConfigFileNamePt++; + --XftConfigFiledeep; + } +} + +void +XftConfigLexDone (void) +{ +#ifdef FLEX_SCANNER + XftConfig_delete_buffer (XftConfig_current_buffer); +#endif +} Index: xc/lib/Xft1/xftlist.c diff -u /dev/null xc/lib/Xft1/xftlist.c:1.4 --- /dev/null Thu Feb 27 12:27:25 2003 +++ xc/lib/Xft1/xftlist.c Tue Jul 9 13:40:20 2002 @@ -0,0 +1,166 @@ +/* + * $XFree86: xc/lib/Xft1/xftlist.c,v 1.4 2002/07/09 17:40:20 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 "xftint.h" +#include + +XftObjectSet * +XftObjectSetCreate (void) +{ + return FcObjectSetCreate (); +} + +Bool +XftObjectSetAdd (XftObjectSet *os, const char *object) +{ + return FcObjectSetAdd (os, object); +} + +void +XftObjectSetDestroy (XftObjectSet *os) +{ + FcObjectSetDestroy (os); +} + + +XftObjectSet * +XftObjectSetVaBuild (const char *first, va_list va) +{ + XftObjectSet *ret; + + FcObjectSetVapBuild (ret, first, va); + return ret; +} + +XftObjectSet * +XftObjectSetBuild (const char *first, ...) +{ + va_list va; + XftObjectSet *os; + + va_start (va, first); + FcObjectSetVapBuild (os, first, va); + va_end (va); + return os; +} + +XftFontSet * +XftListFontSets (XftFontSet **sets, + int nsets, + XftPattern *p, + XftObjectSet *os) +{ + return FcFontSetList (0, sets, nsets, p, os); +} + +XftFontSet * +XftListFontsPatternObjects (Display *dpy, + int screen, + XftPattern *pattern, + XftObjectSet *os) +{ + XftFontSet *sets[2]; + int nsets = 0; +#ifdef FREETYPE2 + Bool core, render; + XftResult result; +#endif + XftPattern *pattern_trim; + XftFontSet *ret; + + if (!XftInit (0)) + return 0; + + pattern_trim = XftPatternDuplicate (pattern); + if (!pattern_trim) + return 0; + + XftPatternDel (pattern_trim, XFT_CORE); + XftPatternDel (pattern_trim, XFT_RENDER); +#ifdef FREETYPE2 + render = core = False; + result = XftPatternGetBool (pattern, XFT_CORE, 0, &core); + if (result != XftResultMatch) + core = XftDefaultGetBool (dpy, XFT_CORE, screen, + !XftDefaultHasRender (dpy)); + + result = XftPatternGetBool (pattern, XFT_RENDER, 0, &render); + if (result != XftResultMatch) + render = XftDefaultGetBool (dpy, XFT_RENDER, screen, + XftDefaultHasRender (dpy)); + if (render) + { + /* + * fontconfig fonts never include encoding values. + * deleting it is something of a kludge as it eliminates the + * ability to list core fonts and render fonts of a specific + * encoding. Fortunately, Xft1 apps generally don't want core + * fonts in any case. + */ + XftPatternDel (pattern_trim, XFT_ENCODING); + if (XftInitFtLibrary()) + { + sets[nsets] = _XftFontSet; + if (sets[nsets]) + nsets++; + } + } + if (core) +#endif + { + sets[nsets] = XftDisplayGetFontSet (dpy); + if (sets[nsets]) + nsets++; + } + ret = XftListFontSets (sets, nsets, pattern_trim, os); + XftPatternDestroy (pattern_trim); + return ret; +} + +XftFontSet * +XftListFonts (Display *dpy, + int screen, + ...) +{ + va_list va; + XftFontSet *fs; + XftObjectSet *os; + XftPattern *pattern; + const char *first; + + va_start (va, screen); + + FcPatternVapBuild (pattern, 0, va); + + first = va_arg (va, const char *); + FcObjectSetVapBuild (os, first, va); + + va_end (va); + + fs = XftListFontsPatternObjects (dpy, screen, pattern, os); + XftPatternDestroy (pattern); + XftObjectSetDestroy (os); + return fs; +} Index: xc/lib/Xft1/xftmatch.c diff -u /dev/null xc/lib/Xft1/xftmatch.c:1.2 --- /dev/null Thu Feb 27 12:27:25 2003 +++ xc/lib/Xft1/xftmatch.c Thu Feb 28 20:00:53 2002 @@ -0,0 +1,37 @@ +/* + * $XFree86: xc/lib/Xft1/xftmatch.c,v 1.2 2002/03/01 01:00:53 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 "xftint.h" +#include + +XftPattern * +XftFontSetMatch (XftFontSet **sets, + int nsets, + XftPattern *p, + XftResult *result) +{ + return FcFontSetMatch (0, sets, nsets, p, result); +} Index: xc/lib/Xft1/xftmatrix.c diff -u /dev/null xc/lib/Xft1/xftmatrix.c:1.1.1.1 --- /dev/null Thu Feb 27 12:27:25 2003 +++ xc/lib/Xft1/xftmatrix.c Thu Feb 14 20:26:16 2002 @@ -0,0 +1,104 @@ +/* + * $XFree86: xc/lib/Xft1/xftmatrix.c,v 1.1.1.1 2002/02/15 01:26:16 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/Xft1/xftname.c diff -u /dev/null xc/lib/Xft1/xftname.c:1.3 --- /dev/null Thu Feb 27 12:27:25 2003 +++ xc/lib/Xft1/xftname.c Wed Apr 10 12:20:07 2002 @@ -0,0 +1,59 @@ +/* + * $XFree86: xc/lib/Xft1/xftname.c,v 1.3 2002/04/10 16:20:07 tsi 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 "xftint.h" +#include +#include +#include +#include + +XftPattern * +XftNameParse (const char *name) +{ + return FcNameParse ((const FcChar8 *) name); +} + + +Bool +XftNameUnparse (XftPattern *pat, char *dest, int len) +{ + FcChar8 *name = FcNameUnparse (pat); + if (!name) + return FcFalse; + if (strlen ((char *) name) > len - 1) + { + free (name); + return FcFalse; + } + strcpy (dest, (void *) name); + free (name); + return FcTrue; +} + +Bool +XftNameConstant (char *string, int *result) +{ + return FcNameConstant ((FcChar8 *) string, result); +} + Index: xc/lib/Xft1/xftpat.c diff -u /dev/null xc/lib/Xft1/xftpat.c:1.3 --- /dev/null Thu Feb 27 12:27:25 2003 +++ xc/lib/Xft1/xftpat.c Fri Jun 7 19:44:23 2002 @@ -0,0 +1,243 @@ +/* + * $XFree86: xc/lib/Xft1/xftpat.c,v 1.3 2002/06/07 23:44:23 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 "xftint.h" +#include + +XftPattern * +XftPatternCreate (void) +{ + return FcPatternCreate (); +} + +void +XftValueDestroy (XftValue v) +{ + FcValueDestroy (v); +} + +void +XftPatternDestroy (XftPattern *p) +{ + FcPatternDestroy (p); +} + + +Bool +XftPatternAdd (XftPattern *p, const char *object, XftValue value, Bool append) +{ + return FcPatternAdd (p, object, value, append); +} + +Bool +XftPatternDel (XftPattern *p, const char *object) +{ + return FcPatternDel (p, object); +} + +Bool +XftPatternAddInteger (XftPattern *p, const char *object, int i) +{ + XftValue v; + + v.type = XftTypeInteger; + v.u.i = i; + return XftPatternAdd (p, object, v, True); +} + +Bool +XftPatternAddDouble (XftPattern *p, const char *object, double d) +{ + XftValue v; + + v.type = XftTypeDouble; + v.u.d = d; + return XftPatternAdd (p, object, v, True); +} + + +Bool +XftPatternAddString (XftPattern *p, const char *object, const char *s) +{ + XftValue v; + + v.type = XftTypeString; + v.u.s = (FcChar8 *) s; + 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) +{ + XftValue v; + + v.type = XftTypeBool; + v.u.b = b; + return XftPatternAdd (p, object, v, True); +} + +XftResult +XftPatternGet (XftPattern *p, const char *object, int id, XftValue *v) +{ + return FcPatternGet (p, object, id, v); +} + +XftResult +XftPatternGetInteger (XftPattern *p, const char *object, int id, int *i) +{ + XftValue v; + XftResult r; + + r = XftPatternGet (p, object, id, &v); + if (r != XftResultMatch) + return r; + switch (v.type) { + case XftTypeDouble: + *i = (int) v.u.d; + break; + case XftTypeInteger: + *i = v.u.i; + break; + default: + return XftResultTypeMismatch; + } + return XftResultMatch; +} + +XftResult +XftPatternGetDouble (XftPattern *p, const char *object, int id, double *d) +{ + XftValue v; + XftResult r; + + r = XftPatternGet (p, object, id, &v); + if (r != XftResultMatch) + return r; + switch (v.type) { + case XftTypeDouble: + *d = v.u.d; + break; + case XftTypeInteger: + *d = (double) v.u.i; + break; + default: + return XftResultTypeMismatch; + } + return XftResultMatch; +} + +XftResult +XftPatternGetString (XftPattern *p, const char *object, int id, char **s) +{ + XftValue v; + XftResult r; + + r = XftPatternGet (p, object, id, &v); + if (r != XftResultMatch) + return r; + if (v.type != XftTypeString) + return XftResultTypeMismatch; + *s = (char *) 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 = (XftMatrix *) v.u.m; + return XftResultMatch; +} + + +XftResult +XftPatternGetBool (XftPattern *p, const char *object, int id, Bool *b) +{ + XftValue v; + XftResult r; + + r = XftPatternGet (p, object, id, &v); + if (r != XftResultMatch) + return r; + if (v.type != XftTypeBool) + return XftResultTypeMismatch; + *b = v.u.b; + return XftResultMatch; +} + +XftPatternElt * +XftPatternFind (XftPattern *p, const char *object, FcBool insert) +{ + if (insert) + return FcPatternInsertElt (p, object); + else + return FcPatternFindElt (p, object); +} + + +XftPattern * +XftPatternDuplicate (XftPattern *orig) +{ + return FcPatternDuplicate (orig); +} + +XftPattern * +XftPatternVaBuild (XftPattern *orig, va_list va) +{ + XftPattern *ret; + + FcPatternVapBuild (ret, orig, va); + return ret; +} + +XftPattern * +XftPatternBuild (XftPattern *orig, ...) +{ + va_list va; + + va_start (va, orig); + FcPatternVapBuild (orig, orig, va); + va_end (va); + return orig; +} Index: xc/lib/Xft1/xftrender.c diff -u /dev/null xc/lib/Xft1/xftrender.c:1.1.1.1 --- /dev/null Thu Feb 27 12:27:25 2003 +++ xc/lib/Xft1/xftrender.c Thu Feb 14 20:26:15 2002 @@ -0,0 +1,527 @@ +/* + * $XFree86: xc/lib/Xft1/xftrender.c,v 1.1.1.1 2002/02/15 01:26:15 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 "xftint.h" + +void +XftRenderString8 (Display *dpy, Picture src, + XftFontStruct *font, Picture dst, + int srcx, int srcy, + int x, int y, + XftChar8 *string, int len) +{ + XftChar32 missing[XFT_NMISSING]; + int nmissing; + XftChar8 *s; + int l; + + s = string; + l = len; + nmissing = 0; + while (l--) + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); + if (nmissing) + XftGlyphLoad (dpy, font, missing, nmissing); + XRenderCompositeString8 (dpy, PictOpOver, src, dst, + font->format, font->glyphset, + srcx, srcy, x, y, (char *) string, len); +} + +void +XftRenderString16 (Display *dpy, Picture src, + XftFontStruct *font, Picture dst, + int srcx, int srcy, + int x, int y, + XftChar16 *string, int len) +{ + XftChar32 missing[XFT_NMISSING]; + int nmissing; + XftChar16 *s; + int l; + + s = string; + l = len; + nmissing = 0; + while (l--) + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); + if (nmissing) + XftGlyphLoad (dpy, font, missing, nmissing); + XRenderCompositeString16 (dpy, PictOpOver, src, dst, + font->format, font->glyphset, + srcx, srcy, x, y, string, len); +} + +void +XftRenderString32 (Display *dpy, Picture src, + XftFontStruct *font, Picture dst, + int srcx, int srcy, + int x, int y, + XftChar32 *string, int len) +{ + XftChar32 missing[XFT_NMISSING]; + int nmissing; + XftChar32 *s; + int l; + + s = string; + l = len; + nmissing = 0; + while (l--) + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); + if (nmissing) + XftGlyphLoad (dpy, font, missing, nmissing); + XRenderCompositeString32 (dpy, PictOpOver, src, dst, + font->format, font->glyphset, + srcx, srcy, x, y, string, len); +} + +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, + int len, + XGlyphInfo *extents) +{ + XftChar32 missing[XFT_NMISSING]; + int nmissing; + XftChar8 *s, c; + 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; + nmissing = 0; + while (l--) + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); + if (nmissing) + XftGlyphLoad (dpy, font, missing, nmissing); + + gi = 0; + while (len) + { + c = *string++; + len--; + 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; + } + 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; + 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; +} + +void +XftRenderExtents16 (Display *dpy, + XftFontStruct *font, + XftChar16 *string, + int len, + XGlyphInfo *extents) +{ + XftChar32 missing[XFT_NMISSING]; + int nmissing; + XftChar16 *s, c; + 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; + nmissing = 0; + while (l--) + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); + if (nmissing) + XftGlyphLoad (dpy, font, missing, nmissing); + + gi = 0; + while (len) + { + c = *string++; + len--; + 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; + } + 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; + 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; +} + +void +XftRenderExtents32 (Display *dpy, + XftFontStruct *font, + XftChar32 *string, + int len, + XGlyphInfo *extents) +{ + XftChar32 missing[XFT_NMISSING]; + int nmissing; + XftChar32 *s, c; + 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; + nmissing = 0; + while (l--) + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); + if (nmissing) + XftGlyphLoad (dpy, font, missing, nmissing); + + gi = 0; + while (len) + { + c = *string++; + len--; + 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; + } + 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; + 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; +} + +void +XftRenderExtentsUtf8 (Display *dpy, + XftFontStruct *font, + XftChar8 *string, + int len, + XGlyphInfo *extents) +{ + XftChar32 missing[XFT_NMISSING]; + int nmissing; + XftChar8 *s; + XftChar32 c; + int l, clen; + XGlyphInfo *gi; + int x, y; + int left, right, top, bottom; + int overall_left, overall_right; + int overall_top, overall_bottom; + + s = string; + l = len; + nmissing = 0; + while (l) + { + clen = XftUtf8ToUcs4 (s, &c, l); + if (clen < 0) + break; + XftGlyphCheck (dpy, font, (XftChar32) 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; + } + 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) + { + clen = XftUtf8ToUcs4 (string, &c, len); + if (clen < 0) + break; + len -= clen; + string += clen; + gi = c < font->nrealized ? font->realized[c] : 0; + if (!gi) + continue; + 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; +} Index: xc/lib/Xft1/xftstr.c diff -u /dev/null xc/lib/Xft1/xftstr.c:1.1.1.1 --- /dev/null Thu Feb 27 12:27:25 2003 +++ xc/lib/Xft1/xftstr.c Thu Feb 14 20:26:15 2002 @@ -0,0 +1,259 @@ +/* + * $XFree86: xc/lib/Xft1/xftstr.c,v 1.1.1.1 2002/02/15 01:26:15 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 "xftint.h" + +char * +_XftSaveString (const char *s) +{ + char *r; + + if (!s) + return 0; + r = (char *) malloc (strlen (s) + 1); + if (!r) + return 0; + strcpy (r, s); + return r; +} + +const char * +_XftGetInt(const char *ptr, int *val) +{ + if (*ptr == '*') { + *val = -1; + ptr++; + } else + for (*val = 0; *ptr >= '0' && *ptr <= '9';) + *val = *val * 10 + *ptr++ - '0'; + if (*ptr == '-') + return ptr; + return (char *) 0; +} + +char * +_XftSplitStr (const char *field, char *save) +{ + char *s = save; + char c; + + while (*field) + { + if (*field == '-') + break; + c = *field++; + *save++ = c; + } + *save = 0; + return s; +} + +char * +_XftDownStr (const char *field, char *save) +{ + char *s = save; + char c; + + while (*field) + { + c = *field++; + *save++ = c; + } + *save = 0; + return s; +} + +const char * +_XftSplitField (const char *field, char *save) +{ + char c; + + while (*field) + { + if (*field == '-' || *field == '=') + break; + c = *field++; + *save++ = c; + } + *save = 0; + return field; +} + +const char * +_XftSplitValue (const char *field, char *save) +{ + char c; + + while (*field) + { + if (*field == '-' || *field == ',') + break; + c = *field++; + *save++ = c; + } + *save = 0; + if (*field) + field++; + return field; +} + +int +_XftMatchSymbolic (XftSymbolic *s, int n, const char *name, int def) +{ + while (n--) + { + if (!_XftStrCmpIgnoreCase (s->name, name)) + return s->value; + s++; + } + return def; +} + +int +_XftStrCmpIgnoreCase (const char *s1, const char *s2) +{ + char c1, c2; + + for (;;) + { + c1 = *s1++; + c2 = *s2++; + if (!c1 || !c2) + break; + if (isupper (c1)) + c1 = tolower (c1); + if (isupper (c2)) + c2 = tolower (c2); + if (c1 != c2) + 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/Xft1/xftxlfd.c diff -u /dev/null xc/lib/Xft1/xftxlfd.c:1.1.1.1 --- /dev/null Thu Feb 27 12:27:25 2003 +++ xc/lib/Xft1/xftxlfd.c Thu Feb 14 20:26:16 2002 @@ -0,0 +1,335 @@ +/* + * $XFree86: xc/lib/Xft1/xftxlfd.c,v 1.1.1.1 2002/02/15 01:26:16 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 "xftint.h" + +static XftSymbolic XftXlfdWeights[] = { + { "light", XFT_WEIGHT_LIGHT }, + { "medium", XFT_WEIGHT_MEDIUM }, + { "regular", XFT_WEIGHT_MEDIUM }, + { "demibold", XFT_WEIGHT_DEMIBOLD }, + { "bold", XFT_WEIGHT_BOLD }, + { "black", XFT_WEIGHT_BLACK }, +}; + +#define NUM_XLFD_WEIGHTS (sizeof XftXlfdWeights/sizeof XftXlfdWeights[0]) + +static XftSymbolic XftXlfdSlants[] = { + { "r", XFT_SLANT_ROMAN }, + { "i", XFT_SLANT_ITALIC }, + { "o", XFT_SLANT_OBLIQUE }, +}; + +#define NUM_XLFD_SLANTS (sizeof XftXlfdSlants/sizeof XftXlfdSlants[0]) + +XftPattern * +XftXlfdParse (const char *xlfd_orig, Bool ignore_scalable, Bool complete) +{ + XftPattern *pat; + const char *xlfd = xlfd_orig; + const char *foundry; + const char *family; + const char *weight_name; + const char *slant; + const char *registry; + const char *encoding; + char *save; + char style[128]; + int pixel; + int point; + int resx; + int resy; + int slant_value, weight_value; + double dpixel; + + if (*xlfd != '-') + return 0; + if (!(xlfd = strchr (foundry = ++xlfd, '-'))) return 0; + if (!(xlfd = strchr (family = ++xlfd, '-'))) return 0; + if (!(xlfd = strchr (weight_name = ++xlfd, '-'))) return 0; + if (!(xlfd = strchr (slant = ++xlfd, '-'))) return 0; + if (!(xlfd = strchr (/* setwidth_name = */ ++xlfd, '-'))) return 0; + if (!(xlfd = strchr (/* add_style_name = */ ++xlfd, '-'))) return 0; + if (!(xlfd = _XftGetInt (++xlfd, &pixel))) return 0; + if (!(xlfd = _XftGetInt (++xlfd, &point))) return 0; + if (!(xlfd = _XftGetInt (++xlfd, &resx))) return 0; + if (!(xlfd = _XftGetInt (++xlfd, &resy))) return 0; + if (!(xlfd = strchr (/* spacing = */ ++xlfd, '-'))) return 0; + if (!(xlfd = strchr (/* average_width = */ ++xlfd, '-'))) return 0; + if (!(xlfd = strchr (registry = ++xlfd, '-'))) return 0; + /* make sure no fields follow this one */ + if ((xlfd = strchr (encoding = ++xlfd, '-'))) return 0; + + if (ignore_scalable && !pixel) + return 0; + + pat = XftPatternCreate (); + if (!pat) + return 0; + + save = (char *) malloc (strlen (foundry) + 1); + + if (!save) + return 0; + + if (!XftPatternAddString (pat, XFT_XLFD, xlfd_orig)) goto bail; + + _XftSplitStr (foundry, save); + if (save[0] && strcmp (save, "*") != 0) + if (!XftPatternAddString (pat, XFT_FOUNDRY, save)) goto bail; + + _XftSplitStr (family, save); + if (save[0] && strcmp (save, "*") != 0) + if (!XftPatternAddString (pat, XFT_FAMILY, save)) goto bail; + + weight_value = _XftMatchSymbolic (XftXlfdWeights, NUM_XLFD_WEIGHTS, + _XftSplitStr (weight_name, save), + XFT_WEIGHT_MEDIUM); + if (!XftPatternAddInteger (pat, XFT_WEIGHT, weight_value)) + goto bail; + + slant_value = _XftMatchSymbolic (XftXlfdSlants, NUM_XLFD_SLANTS, + _XftSplitStr (slant, save), + XFT_SLANT_ROMAN); + if (!XftPatternAddInteger (pat, XFT_SLANT, slant_value)) + goto bail; + + dpixel = (double) pixel; + + if (complete) + { + /* + * Build a style name + */ + style[0] = '\0'; + switch (weight_value) { + case XFT_WEIGHT_LIGHT: strcat (style, "light"); break; + case XFT_WEIGHT_DEMIBOLD: strcat (style, "demibold"); break; + case XFT_WEIGHT_BOLD: strcat (style, "bold"); break; + case XFT_WEIGHT_BLACK: strcat (style, "black"); break; + } + if (slant_value != XFT_SLANT_ROMAN) { + if (style[0]) + strcat (style, " "); + switch (slant_value) { + case XFT_SLANT_ITALIC: strcat (style, "italic"); break; + case XFT_SLANT_OBLIQUE: strcat (style, "oblique"); break; + } + } + if (!style[0]) + strcat (style, "Regular"); + + if (!XftPatternAddString (pat, XFT_STYLE, style)) + goto bail; + if (!XftPatternAddBool (pat, XFT_SCALABLE, pixel == 0)) goto bail; + if (!XftPatternAddBool (pat, XFT_CORE, True)) goto bail; + if (!XftPatternAddBool (pat, XFT_ANTIALIAS, False)) goto bail; + } + else + { + if (point > 0) + { + if (!XftPatternAddDouble (pat, XFT_SIZE, ((double) point) / 10.0)) goto bail; + if (pixel <= 0 && resy > 0) + { + dpixel = (double) point * (double) resy / 720.0; + } + } + } + + if (dpixel > 0) + if (!XftPatternAddDouble (pat, XFT_PIXEL_SIZE, dpixel)) goto bail; + + _XftDownStr (registry, save); + if (registry[0] && !strchr (registry, '*')) + if (!XftPatternAddString (pat, XFT_ENCODING, save)) goto bail; + + free (save); + return pat; + +bail: + free (save); + XftPatternDestroy (pat); + return 0; +} + +Bool +XftCoreAddFonts (XftFontSet *set, Display *dpy, Bool ignore_scalable) +{ + char **xlfds; + int num; + int i; + XftPattern *font; + Bool ret; + + xlfds = XListFonts (dpy, + "-*-*-*-*-*-*-*-*-*-*-*-*-*-*", + 10000, &num); + if (!xlfds) + return False; + ret = True; + for (i = 0; ret && i < num; i++) + { + font = XftXlfdParse (xlfds[i], ignore_scalable, True); + if (font) + { + if (!XftFontSetAdd (set, font)) + { + XftPatternDestroy (font); + ret = False; + } + } + } + XFreeFontNames (xlfds); + return ret; +} + +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; + int d; + Bool scalable; + double pixel_size; + int pixel_int; + XFontStruct *ret; + +#if 0 + printf ("Core "); + XftPatternPrint (pattern); +#endif + if (XftPatternGetString (pattern, XFT_XLFD, 0, &xlfd) != XftResultMatch) + return 0; + if (XftPatternGetBool (pattern, XFT_SCALABLE, 0, &scalable) != XftResultMatch) + return 0; + if (scalable) + { + if (XftPatternGetDouble (pattern, XFT_PIXEL_SIZE, 0, &pixel_size) != XftResultMatch) + return 0; + pixel_int = (int) (pixel_size + 0.5); + if (pixel_int) + { + xlfd_pixel = (char *) malloc (strlen (xlfd) + 32); + i = xlfd; + o = xlfd_pixel; + d = 0; + while (d != 7 && *i) + { + if ((*o++ = *i++) == '-') + d++; + } + if (*i) + { + sprintf (o, "%d", pixel_int); + o += strlen (o); + while (*i != '-') + ++i; + } + while ((*o++ = *i++)); +#if 0 + printf ("original %s sized %s\n", xlfd, xlfd_pixel); +#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); + } + if (xlfd_pixel) + free (xlfd_pixel); + 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.4 xc/lib/Xi/Imakefile:1.5 --- xc/lib/Xi/Imakefile:1.4 Wed Jan 17 14:42:47 2001 +++ xc/lib/Xi/Imakefile Tue Oct 15 20:37:28 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/Xi/Imakefile,v 1.4 2001/01/17 19:42:47 dawes Exp $ +XCOMM $XFree86: xc/lib/Xi/Imakefile,v 1.5 2002/10/16 00:37:28 dawes Exp $ #define DoNormalLib NormalLibXi #define DoSharedLib SharedLibXi @@ -25,7 +25,6 @@ #endif DEFINES = $(ALLOC_DEFINES) -INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = XAllowDv.c \ XChgDCtl.c \ XChgFCtl.c \ Index: xc/lib/Xi/XAllowDv.c diff -u xc/lib/Xi/XAllowDv.c:3.3 xc/lib/Xi/XAllowDv.c:3.4 --- xc/lib/Xi/XAllowDv.c:3.3 Fri Dec 14 14:55:03 2001 +++ xc/lib/Xi/XAllowDv.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XAllowDv.c,v 3.3 2001/12/14 19:55:03 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XAllowDv.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XChgDCtl.c diff -u xc/lib/Xi/XChgDCtl.c:3.3 xc/lib/Xi/XChgDCtl.c:3.4 --- xc/lib/Xi/XChgDCtl.c:3.3 Fri Dec 14 14:55:03 2001 +++ xc/lib/Xi/XChgDCtl.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgDCtl.c,v 3.3 2001/12/14 19:55:03 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgDCtl.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -54,11 +54,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XChgFCtl.c diff -u xc/lib/Xi/XChgFCtl.c:3.3 xc/lib/Xi/XChgFCtl.c:3.4 --- xc/lib/Xi/XChgFCtl.c:3.3 Fri Dec 14 14:55:03 2001 +++ xc/lib/Xi/XChgFCtl.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgFCtl.c,v 3.3 2001/12/14 19:55:03 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgFCtl.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -54,11 +54,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XChgKMap.c diff -u xc/lib/Xi/XChgKMap.c:3.3 xc/lib/Xi/XChgKMap.c:3.4 --- xc/lib/Xi/XChgKMap.c:3.3 Fri Dec 14 14:55:04 2001 +++ xc/lib/Xi/XChgKMap.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgKMap.c,v 3.3 2001/12/14 19:55:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgKMap.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XChgKbd.c diff -u xc/lib/Xi/XChgKbd.c:3.3 xc/lib/Xi/XChgKbd.c:3.4 --- xc/lib/Xi/XChgKbd.c:3.3 Fri Dec 14 14:55:04 2001 +++ xc/lib/Xi/XChgKbd.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgKbd.c,v 3.3 2001/12/14 19:55:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgKbd.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XChgPnt.c diff -u xc/lib/Xi/XChgPnt.c:3.3 xc/lib/Xi/XChgPnt.c:3.4 --- xc/lib/Xi/XChgPnt.c:3.3 Fri Dec 14 14:55:04 2001 +++ xc/lib/Xi/XChgPnt.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgPnt.c,v 3.3 2001/12/14 19:55:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgPnt.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XChgProp.c diff -u xc/lib/Xi/XChgProp.c:3.3 xc/lib/Xi/XChgProp.c:3.4 --- xc/lib/Xi/XChgProp.c:3.3 Fri Dec 14 14:55:05 2001 +++ xc/lib/Xi/XChgProp.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgProp.c,v 3.3 2001/12/14 19:55:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgProp.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -54,11 +54,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XCloseDev.c diff -u xc/lib/Xi/XCloseDev.c:3.3 xc/lib/Xi/XCloseDev.c:3.4 --- xc/lib/Xi/XCloseDev.c:3.3 Fri Dec 14 14:55:06 2001 +++ xc/lib/Xi/XCloseDev.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XCloseDev.c,v 3.3 2001/12/14 19:55:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XCloseDev.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XIproto.h" -#include "Xlibint.h" -#include "XI.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XDevBell.c diff -u xc/lib/Xi/XDevBell.c:3.3 xc/lib/Xi/XDevBell.c:3.4 --- xc/lib/Xi/XDevBell.c:3.3 Fri Dec 14 14:55:08 2001 +++ xc/lib/Xi/XDevBell.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XDevBell.c,v 3.3 2001/12/14 19:55:08 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XDevBell.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XExtInt.c diff -u xc/lib/Xi/XExtInt.c:3.6 xc/lib/Xi/XExtInt.c:3.7 --- xc/lib/Xi/XExtInt.c:3.6 Fri Dec 14 14:55:09 2001 +++ xc/lib/Xi/XExtInt.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XExtInt.c,v 3.6 2001/12/14 19:55:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XExtInt.c,v 3.7 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -56,11 +56,11 @@ #define NEED_EVENTS #define NEED_REPLIES #include -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" #define ENQUEUE_EVENT True Index: xc/lib/Xi/XExtToWire.c diff -u xc/lib/Xi/XExtToWire.c:3.4 xc/lib/Xi/XExtToWire.c:3.6 --- xc/lib/Xi/XExtToWire.c:3.4 Fri Dec 14 14:55:11 2001 +++ xc/lib/Xi/XExtToWire.c Wed Oct 16 08:56:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XExtToWire.c,v 3.4 2001/12/14 19:55:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XExtToWire.c,v 3.6 2002/10/16 12:56:28 tsi Exp $ */ /**************************************************************** * @@ -55,10 +55,10 @@ #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "XInput.h" -#include "XIproto.h" -#include "extutil.h" +#include +#include +#include +#include #include "XIint.h" Status Index: xc/lib/Xi/XFreeLst.c diff -u xc/lib/Xi/XFreeLst.c:1.2 xc/lib/Xi/XFreeLst.c:1.3 --- xc/lib/Xi/XFreeLst.c:1.2 Fri Dec 14 14:55:12 2001 +++ xc/lib/Xi/XFreeLst.c Tue Oct 15 20:37:28 2002 @@ -45,6 +45,7 @@ SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/Xi/XFreeLst.c,v 1.3 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,7 +54,7 @@ */ #include -#include "Xlib.h" +#include /*********************************************************************** * Index: xc/lib/Xi/XGMotion.c diff -u xc/lib/Xi/XGMotion.c:3.3 xc/lib/Xi/XGMotion.c:3.4 --- xc/lib/Xi/XGMotion.c:3.3 Fri Dec 14 14:55:12 2001 +++ xc/lib/Xi/XGMotion.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGMotion.c,v 3.3 2001/12/14 19:55:12 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGMotion.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" XDeviceTimeCoord Index: xc/lib/Xi/XGetBMap.c diff -u xc/lib/Xi/XGetBMap.c:3.3 xc/lib/Xi/XGetBMap.c:3.4 --- xc/lib/Xi/XGetBMap.c:3.3 Fri Dec 14 14:55:13 2001 +++ xc/lib/Xi/XGetBMap.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetBMap.c,v 3.3 2001/12/14 19:55:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetBMap.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" #ifdef MIN /* some systems define this in */ Index: xc/lib/Xi/XGetDCtl.c diff -u xc/lib/Xi/XGetDCtl.c:3.3 xc/lib/Xi/XGetDCtl.c:3.4 --- xc/lib/Xi/XGetDCtl.c:3.3 Fri Dec 14 14:55:13 2001 +++ xc/lib/Xi/XGetDCtl.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetDCtl.c,v 3.3 2001/12/14 19:55:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetDCtl.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,12 +53,12 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "Xlib.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include +#include #include "XIint.h" XDeviceControl Index: xc/lib/Xi/XGetFCtl.c diff -u xc/lib/Xi/XGetFCtl.c:3.3 xc/lib/Xi/XGetFCtl.c:3.4 --- xc/lib/Xi/XGetFCtl.c:3.3 Fri Dec 14 14:55:14 2001 +++ xc/lib/Xi/XGetFCtl.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetFCtl.c,v 3.3 2001/12/14 19:55:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetFCtl.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,12 +53,12 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "Xlib.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include +#include #include "XIint.h" XFeedbackState Index: xc/lib/Xi/XGetKMap.c diff -u xc/lib/Xi/XGetKMap.c:3.3 xc/lib/Xi/XGetKMap.c:3.4 --- xc/lib/Xi/XGetKMap.c:3.3 Fri Dec 14 14:55:15 2001 +++ xc/lib/Xi/XGetKMap.c Tue Oct 15 20:37:28 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetKMap.c,v 3.3 2001/12/14 19:55:15 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetKMap.c,v 3.4 2002/10/16 00:37:28 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" KeySym Index: xc/lib/Xi/XGetMMap.c diff -u xc/lib/Xi/XGetMMap.c:3.3 xc/lib/Xi/XGetMMap.c:3.4 --- xc/lib/Xi/XGetMMap.c:3.3 Fri Dec 14 14:55:16 2001 +++ xc/lib/Xi/XGetMMap.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetMMap.c,v 3.3 2001/12/14 19:55:16 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetMMap.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" XModifierKeymap Index: xc/lib/Xi/XGetProp.c diff -u xc/lib/Xi/XGetProp.c:3.3 xc/lib/Xi/XGetProp.c:3.4 --- xc/lib/Xi/XGetProp.c:3.3 Fri Dec 14 14:55:17 2001 +++ xc/lib/Xi/XGetProp.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetProp.c,v 3.3 2001/12/14 19:55:17 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetProp.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -54,11 +54,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" XEventClass Index: xc/lib/Xi/XGetVers.c diff -u xc/lib/Xi/XGetVers.c:3.3 xc/lib/Xi/XGetVers.c:3.4 --- xc/lib/Xi/XGetVers.c:3.3 Fri Dec 14 14:55:17 2001 +++ xc/lib/Xi/XGetVers.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetVers.c,v 3.3 2001/12/14 19:55:17 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetVers.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XIproto.h" -#include "Xlibint.h" -#include "XI.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" XExtensionVersion Index: xc/lib/Xi/XGrDvBut.c diff -u xc/lib/Xi/XGrDvBut.c:3.4 xc/lib/Xi/XGrDvBut.c:3.5 --- xc/lib/Xi/XGrDvBut.c:3.4 Fri Dec 14 14:55:17 2001 +++ xc/lib/Xi/XGrDvBut.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGrDvBut.c,v 3.4 2001/12/14 19:55:17 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGrDvBut.c,v 3.5 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XGrDvKey.c diff -u xc/lib/Xi/XGrDvKey.c:3.3 xc/lib/Xi/XGrDvKey.c:3.4 --- xc/lib/Xi/XGrDvKey.c:3.3 Fri Dec 14 14:55:17 2001 +++ xc/lib/Xi/XGrDvKey.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGrDvKey.c,v 3.3 2001/12/14 19:55:17 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGrDvKey.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XGrabDev.c diff -u xc/lib/Xi/XGrabDev.c:3.3 xc/lib/Xi/XGrabDev.c:3.4 --- xc/lib/Xi/XGrabDev.c:3.3 Fri Dec 14 14:55:17 2001 +++ xc/lib/Xi/XGrabDev.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGrabDev.c,v 3.3 2001/12/14 19:55:17 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGrabDev.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XGtFocus.c diff -u xc/lib/Xi/XGtFocus.c:3.3 xc/lib/Xi/XGtFocus.c:3.4 --- xc/lib/Xi/XGtFocus.c:3.3 Fri Dec 14 14:55:18 2001 +++ xc/lib/Xi/XGtFocus.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGtFocus.c,v 3.3 2001/12/14 19:55:18 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGtFocus.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XGtSelect.c diff -u xc/lib/Xi/XGtSelect.c:3.3 xc/lib/Xi/XGtSelect.c:3.4 --- xc/lib/Xi/XGtSelect.c:3.3 Fri Dec 14 14:55:19 2001 +++ xc/lib/Xi/XGtSelect.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGtSelect.c,v 3.3 2001/12/14 19:55:19 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGtSelect.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XListDev.c diff -u xc/lib/Xi/XListDev.c:3.4 xc/lib/Xi/XListDev.c:3.5 --- xc/lib/Xi/XListDev.c:3.4 Fri Dec 14 14:55:19 2001 +++ xc/lib/Xi/XListDev.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XListDev.c,v 3.4 2001/12/14 19:55:19 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XListDev.c,v 3.5 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -56,11 +56,11 @@ #define NEED_REPLIES #define NEED_EVENTS -#include "Xlibint.h" -#include "XIproto.h" -#include "XI.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" XDeviceInfo Index: xc/lib/Xi/XOpenDev.c diff -u xc/lib/Xi/XOpenDev.c:3.3 xc/lib/Xi/XOpenDev.c:3.4 --- xc/lib/Xi/XOpenDev.c:3.3 Fri Dec 14 14:55:20 2001 +++ xc/lib/Xi/XOpenDev.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XOpenDev.c,v 3.3 2001/12/14 19:55:20 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XOpenDev.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" XDevice Index: xc/lib/Xi/XQueryDv.c diff -u xc/lib/Xi/XQueryDv.c:3.3 xc/lib/Xi/XQueryDv.c:3.4 --- xc/lib/Xi/XQueryDv.c:3.3 Fri Dec 14 14:55:20 2001 +++ xc/lib/Xi/XQueryDv.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XQueryDv.c,v 3.3 2001/12/14 19:55:20 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XQueryDv.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" XDeviceState Index: xc/lib/Xi/XSelect.c diff -u xc/lib/Xi/XSelect.c:3.3 xc/lib/Xi/XSelect.c:3.4 --- xc/lib/Xi/XSelect.c:3.3 Fri Dec 14 14:55:21 2001 +++ xc/lib/Xi/XSelect.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSelect.c,v 3.3 2001/12/14 19:55:21 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSelect.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XSetBMap.c diff -u xc/lib/Xi/XSetBMap.c:3.3 xc/lib/Xi/XSetBMap.c:3.4 --- xc/lib/Xi/XSetBMap.c:3.3 Fri Dec 14 14:55:21 2001 +++ xc/lib/Xi/XSetBMap.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetBMap.c,v 3.3 2001/12/14 19:55:21 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetBMap.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" #define NEED_REPLIES Index: xc/lib/Xi/XSetDVal.c diff -u xc/lib/Xi/XSetDVal.c:3.3 xc/lib/Xi/XSetDVal.c:3.4 --- xc/lib/Xi/XSetDVal.c:3.3 Fri Dec 14 14:55:22 2001 +++ xc/lib/Xi/XSetDVal.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetDVal.c,v 3.3 2001/12/14 19:55:22 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetDVal.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -54,11 +54,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XSetMMap.c diff -u xc/lib/Xi/XSetMMap.c:3.3 xc/lib/Xi/XSetMMap.c:3.4 --- xc/lib/Xi/XSetMMap.c:3.3 Fri Dec 14 14:55:22 2001 +++ xc/lib/Xi/XSetMMap.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetMMap.c,v 3.3 2001/12/14 19:55:22 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetMMap.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XSetMode.c diff -u xc/lib/Xi/XSetMode.c:3.3 xc/lib/Xi/XSetMode.c:3.4 --- xc/lib/Xi/XSetMode.c:3.3 Fri Dec 14 14:55:23 2001 +++ xc/lib/Xi/XSetMode.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetMode.c,v 3.3 2001/12/14 19:55:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetMode.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XSndExEv.c diff -u xc/lib/Xi/XSndExEv.c:3.3 xc/lib/Xi/XSndExEv.c:3.4 --- xc/lib/Xi/XSndExEv.c:3.3 Fri Dec 14 14:55:23 2001 +++ xc/lib/Xi/XSndExEv.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSndExEv.c,v 3.3 2001/12/14 19:55:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSndExEv.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" extern Status _XiEventToWire(); Index: xc/lib/Xi/XStFocus.c diff -u xc/lib/Xi/XStFocus.c:3.3 xc/lib/Xi/XStFocus.c:3.4 --- xc/lib/Xi/XStFocus.c:3.3 Fri Dec 14 14:55:23 2001 +++ xc/lib/Xi/XStFocus.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XStFocus.c,v 3.3 2001/12/14 19:55:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XStFocus.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XUngrDev.c diff -u xc/lib/Xi/XUngrDev.c:3.3 xc/lib/Xi/XUngrDev.c:3.4 --- xc/lib/Xi/XUngrDev.c:3.3 Fri Dec 14 14:55:23 2001 +++ xc/lib/Xi/XUngrDev.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XUngrDev.c,v 3.3 2001/12/14 19:55:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XUngrDev.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XUngrDvB.c diff -u xc/lib/Xi/XUngrDvB.c:3.3 xc/lib/Xi/XUngrDvB.c:3.4 --- xc/lib/Xi/XUngrDvB.c:3.3 Fri Dec 14 14:55:25 2001 +++ xc/lib/Xi/XUngrDvB.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XUngrDvB.c,v 3.3 2001/12/14 19:55:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XUngrDvB.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/XUngrDvK.c diff -u xc/lib/Xi/XUngrDvK.c:3.3 xc/lib/Xi/XUngrDvK.c:3.4 --- xc/lib/Xi/XUngrDvK.c:3.3 Fri Dec 14 14:55:26 2001 +++ xc/lib/Xi/XUngrDvK.c Tue Oct 15 20:37:29 2002 @@ -45,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XUngrDvK.c,v 3.3 2001/12/14 19:55:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XUngrDvK.c,v 3.4 2002/10/16 00:37:29 dawes Exp $ */ /*********************************************************************** * @@ -53,11 +53,11 @@ * */ -#include "XI.h" -#include "XIproto.h" -#include "Xlibint.h" -#include "XInput.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include "XIint.h" int Index: xc/lib/Xi/Xios2.def diff -u xc/lib/Xi/Xios2.def:3.6 xc/lib/Xi/Xios2.def:removed --- xc/lib/Xi/Xios2.def:3.6 Thu Apr 29 05:13:31 1999 +++ xc/lib/Xi/Xios2.def Thu Feb 27 12:27:26 2003 @@ -1,53 +0,0 @@ -LIBRARY XI -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xi/Xios2.def,v 3.6 1999/04/29 09:13:31 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - XAllowDeviceEvents @ 1 - XChangeDeviceControl @ 2 - XChangeDeviceDontPropagateList @ 3 - XChangeDeviceKeyMapping @ 4 - XChangeFeedbackControl @ 5 - XChangeKeyboardDevice @ 6 - XChangePointerDevice @ 7 - XCloseDevice @ 8 - XDeviceBell @ 9 - XFreeDeviceControl @ 10 - XFreeDeviceList @ 11 - XFreeDeviceMotionEvents @ 12 - XFreeDeviceState @ 13 - XFreeFeedbackList @ 14 - XGetDeviceButtonMapping @ 15 - XGetDeviceControl @ 16 - XGetDeviceDontPropagateList @ 17 - XGetDeviceFocus @ 18 - XGetDeviceKeyMapping @ 19 - XGetDeviceModifierMapping @ 20 - XGetDeviceMotionEvents @ 21 - XGetExtensionVersion @ 22 - XGetFeedbackControl @ 23 - XGetSelectedExtensionEvents @ 24 - XGrabDevice @ 25 - XGrabDeviceButton @ 26 - XGrabDeviceKey @ 27 - XListInputDevices @ 28 - XOpenDevice @ 29 - XQueryDeviceState @ 30 - XSelectExtensionEvent @ 31 - XSendExtensionEvent @ 32 - XSetDeviceButtonMapping @ 33 - XSetDeviceFocus @ 34 - XSetDeviceMode @ 35 - XSetDeviceModifierMapping @ 36 - XSetDeviceValuators @ 37 - XUngrabDevice @ 38 - XUngrabDeviceButton @ 39 - XUngrabDeviceKey @ 40 - _xibadclass @ 41 - _xibaddevice @ 42 - _xibadevent @ 43 - _xibadmode @ 44 - _xidevicebusy @ 45 Index: xc/lib/Xi/Xios2.rsp diff -u xc/lib/Xi/Xios2.rsp:3.1 xc/lib/Xi/Xios2.rsp:removed --- xc/lib/Xi/Xios2.rsp:3.1 Mon Apr 15 07:17:03 1996 +++ xc/lib/Xi/Xios2.rsp Thu Feb 27 12:27:26 2003 @@ -1,9 +0,0 @@ -XAllowDv.obj XChgDCtl.obj XChgFCtl.obj XChgKMap.obj XChgKbd.obj XChgPnt.obj+ -XChgProp.obj XCloseDev.obj XDevBell.obj XExtInt.obj XExtToWire.obj+ -XGMotion.obj XGetBMap.obj XGetDCtl.obj XGetFCtl.obj XGetKMap.obj+ -XGetMMap.obj XGetProp.obj XGetVers.obj XGrDvBut.obj XGrDvKey.obj XGrabDev.obj+ -XGtFocus.obj XGtSelect.obj XListDev.obj XOpenDev.obj XQueryDv.obj XSelect.obj+ -XSetBMap.obj XSetDVal.obj XSetMMap.obj XSetMode.obj XSndExEv.obj XStFocus.obj+ -XUngrDev.obj XUngrDvB.obj XUngrDvK.obj /NOI /NOL /NOD /BAT -Xi.dll - Index: xc/lib/Xinerama/Imakefile diff -u xc/lib/Xinerama/Imakefile:1.2 xc/lib/Xinerama/Imakefile:1.5 --- xc/lib/Xinerama/Imakefile:1.2 Tue Feb 29 13:38:42 2000 +++ xc/lib/Xinerama/Imakefile Fri Jan 3 21:48:24 2003 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xinerama/Imakefile,v 1.2 2000/02/29 18:38:42 dawes Exp $ +XCOMM $XFree86: xc/lib/Xinerama/Imakefile,v 1.5 2003/01/04 02:48:24 dawes Exp $ #define DoNormalLib NormalLibXinerama #define DoSharedLib SharedLibXinerama @@ -19,10 +19,11 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = Xinerama.c OBJS = Xinerama.o LINTLIBS = $(LINTXLIB) + +#define IncludeSharedObjectInNormalLib #include Index: xc/lib/Xinerama/Xinerama.c diff -u xc/lib/Xinerama/Xinerama.c:1.2 xc/lib/Xinerama/Xinerama.c:1.3 --- xc/lib/Xinerama/Xinerama.c:1.2 Mon Jul 23 13:20:28 2001 +++ xc/lib/Xinerama/Xinerama.c Tue Oct 15 20:37:31 2002 @@ -23,17 +23,17 @@ dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ -/* $XFree86: xc/lib/Xinerama/Xinerama.c,v 1.2 2001/07/23 17:20:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xinerama/Xinerama.c,v 1.3 2002/10/16 00:37:31 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES #include #include -#include "Xext.h" /* in ../include */ -#include "extutil.h" /* in ../include */ -#include "panoramiXext.h" -#include "panoramiXproto.h" /* in ../include */ -#include "Xinerama.h" +#include +#include +#include +#include +#include static XExtensionInfo _panoramiX_ext_info_data; Index: xc/lib/Xmu/ClientWin.c diff -u xc/lib/Xmu/ClientWin.c:1.7 xc/lib/Xmu/ClientWin.c:1.8 --- xc/lib/Xmu/ClientWin.c:1.7 Fri Dec 14 14:55:34 2001 +++ xc/lib/Xmu/ClientWin.c Wed Nov 27 15:54:49 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ClientWin.c,v 1.7 2001/12/14 19:55:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ClientWin.c,v 1.8 2002/11/27 20:54:49 tsi Exp $ */ #include #include @@ -46,7 +46,7 @@ Atom type = None; int format; unsigned long nitems, after; - unsigned char *data; + unsigned char *data = NULL; Window inf; WM_STATE = XInternAtom(dpy, "WM_STATE", True); @@ -54,6 +54,8 @@ return win; XGetWindowProperty(dpy, win, WM_STATE, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &data); + if (data) + XFree(data); if (type) return win; inf = TryChildren(dpy, win, WM_STATE); @@ -78,14 +80,18 @@ if (!XQueryTree(dpy, win, &root, &parent, &children, &nchildren)) return 0; for (i = 0; !inf && (i < nchildren); i++) { + data = NULL; XGetWindowProperty(dpy, children[i], WM_STATE, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &data); + if (data) + XFree(data); if (type) inf = children[i]; } for (i = 0; !inf && (i < nchildren); i++) inf = TryChildren(dpy, children[i], WM_STATE); - if (children) XFree((char *)children); + if (children) + XFree(children); return inf; } Index: xc/lib/Xmu/CursorName.c diff -u xc/lib/Xmu/CursorName.c:3.7 xc/lib/Xmu/CursorName.c:3.8 --- xc/lib/Xmu/CursorName.c:3.7 Fri Dec 14 14:55:38 2001 +++ xc/lib/Xmu/CursorName.c Wed Sep 18 13:11:42 2002 @@ -25,11 +25,12 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CursorName.c,v 3.7 2001/12/14 19:55:38 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CursorName.c,v 3.8 2002/09/18 17:11:42 tsi Exp $ */ #include #include #include +#include int XmuCursorNameToIndex(_Xconst char *name) Index: xc/lib/Xmu/EditresCom.c diff -u xc/lib/Xmu/EditresCom.c:1.16 xc/lib/Xmu/EditresCom.c:1.17 --- xc/lib/Xmu/EditresCom.c:1.16 Fri Dec 14 14:55:43 2001 +++ xc/lib/Xmu/EditresCom.c Tue Dec 3 13:07:59 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.16 2001/12/14 19:55:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.17 2002/12/03 18:07:59 paulo Exp $ */ /* * Author: Chris D. Peterson, Dave Sternlicht, MIT X Consortium @@ -817,7 +817,7 @@ for (j = 0; j < num_extra; j++) if ((*children)[i] == extra_widgets[j]) { - memmove(&extra_widgets[i], &extra_widgets[i + 1], + memmove(&extra_widgets[j], &extra_widgets[j + 1], (num_extra - j) * sizeof(Widget)); --num_extra; } Index: xc/lib/Xmu/LocBitmap.c diff -u xc/lib/Xmu/LocBitmap.c:3.9 xc/lib/Xmu/LocBitmap.c:3.10 --- xc/lib/Xmu/LocBitmap.c:3.9 Fri Dec 14 14:55:47 2001 +++ xc/lib/Xmu/LocBitmap.c Fri May 31 14:45:45 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/LocBitmap.c,v 3.9 2001/12/14 19:55:47 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/LocBitmap.c,v 3.10 2002/05/31 18:45:45 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium @@ -156,7 +156,7 @@ switch (i) { case 1: -#ifndef __EMX__ +#ifndef __UNIXOS2__ if (!(name[0] == '/' || ((name[0] == '.') && name[1] == '/'))) #else if (!(name[0] == '/' || (name[0] == '.' && name[1] == '/') || @@ -186,7 +186,7 @@ data = NULL; pixmap = None; -#ifdef __EMX__ +#ifdef __UNIXOS2__ fn = (char*)__XOS2RedirRoot(fn); #endif if (XmuReadBitmapDataFromFile (fn, &width, &height, &data, Index: xc/lib/Xmu/RdBitF.c diff -u xc/lib/Xmu/RdBitF.c:3.12 xc/lib/Xmu/RdBitF.c:3.13 --- xc/lib/Xmu/RdBitF.c:3.12 Fri Dec 14 14:55:48 2001 +++ xc/lib/Xmu/RdBitF.c Fri May 31 14:45:45 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/RdBitF.c,v 3.12 2001/12/14 19:55:48 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/RdBitF.c,v 3.13 2002/05/31 18:45:45 dawes Exp $ */ /* * This file contains miscellaneous utility routines and is not part of the @@ -300,7 +300,7 @@ /* try the places set in the environment */ drive = getenv ("_XBASEDRIVE"); -#ifdef __EMX__ +#ifdef __UNIXOS2__ if (!drive) drive = getenv ("X11ROOT"); #endif @@ -316,7 +316,7 @@ return 1; } -#ifndef __EMX__ +#ifndef __UNIXOS2__ /* one last place to look */ drive = getenv ("HOMEDRIVE"); if (drive) { @@ -386,7 +386,7 @@ FILE *fstream; int status; -#ifdef __EMX__ +#ifdef __UNIXOS2__ filename = __XOS2RedirRoot(filename); #endif if ((fstream = fopen_file (filename, "r")) == NULL) { Index: xc/lib/Xmu/StrToCurs.c diff -u xc/lib/Xmu/StrToCurs.c:1.9 xc/lib/Xmu/StrToCurs.c:1.12 --- xc/lib/Xmu/StrToCurs.c:1.9 Fri Dec 14 14:55:51 2001 +++ xc/lib/Xmu/StrToCurs.c Tue Sep 24 14:55:21 2002 @@ -50,7 +50,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/Xmu/StrToCurs.c,v 1.9 2001/12/14 19:55:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToCurs.c,v 1.12 2002/09/24 18:55:21 alanh Exp $ */ #include #include @@ -168,8 +168,9 @@ #endif strspec = XtMalloc(strlen("FONT %s %d %s %d") + 21); - sprintf(strspec, "FONT %%%ds %%d %%%ds %%d", sizeof(source_name) - 1, - sizeof(mask_name) - 1); + sprintf(strspec, "FONT %%%lds %%d %%%lds %%d", + (unsigned long)sizeof(source_name) - 1, + (unsigned long)sizeof(mask_name) - 1); fields = sscanf(name, strspec, source_name, &source_char, mask_name, &mask_char); Index: xc/lib/Xmu/WidgetNode.c diff -u xc/lib/Xmu/WidgetNode.c:1.10 xc/lib/Xmu/WidgetNode.c:1.13 --- xc/lib/Xmu/WidgetNode.c:1.10 Fri Dec 14 14:55:57 2001 +++ xc/lib/Xmu/WidgetNode.c Tue Sep 24 14:55:21 2002 @@ -26,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xmu/WidgetNode.c,v 1.10 2001/12/14 19:55:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/WidgetNode.c,v 1.13 2002/09/24 18:55:21 alanh Exp $ */ /* * Author: Jim Fulton, MIT X Consortium @@ -236,9 +236,9 @@ sizeof (XmuWidgetNode *)); if (!wn->resourcewn) { fprintf (stderr, - "%s: unable to calloc %d %d byte widget node ptrs\n", - "XmuWnFetchResources",wn->nresources, - sizeof (XmuWidgetNode *)); + "%s: unable to calloc %d %ld byte widget node ptrs\n", + "XmuWnFetchResources", wn->nresources, + (unsigned long)sizeof (XmuWidgetNode *)); exit (1); } @@ -252,9 +252,9 @@ XtCalloc (wn->nconstraints, sizeof (XmuWidgetNode *)); if (!wn->constraintwn) { fprintf (stderr, - "%s: unable to calloc %d %d byte widget node ptrs\n", + "%s: unable to calloc %d %ld byte widget node ptrs\n", "XmuWnFetchResources", wn->nconstraints, - sizeof (XmuWidgetNode *)); + (unsigned long)sizeof (XmuWidgetNode *)); exit (1); } Index: xc/lib/Xmu/Xmu-def.cpp diff -u xc/lib/Xmu/Xmu-def.cpp:1.1 xc/lib/Xmu/Xmu-def.cpp:1.2 --- xc/lib/Xmu/Xmu-def.cpp:1.1 Wed Aug 9 19:40:13 2000 +++ xc/lib/Xmu/Xmu-def.cpp Fri May 31 14:45:45 2002 @@ -96,5 +96,50 @@ XctFree XctNextItem XctReset +XmuCvtGravityToString +XmuCvtBackingStoreToString +_XA_ATOM_PAIR +_XA_CHARACTER_POSITION +_XA_CLASS +_XA_CLIENT_WINDOW +_XA_CLIPBOARD +_XA_COMPOUND_TEXT +_XA_DECNET_ADDRESS +_XA_DELETE +_XA_FILENAME +_XA_HOSTNAME +_XA_IP_ADDRESS +_XA_LENGTH +_XA_LIST_LENGTH +_XA_NAME +_XA_NET_ADDRESS +_XA_NULL +_XA_OWNER_OS +_XA_SPAN +_XA_TARGETS +_XA_TEXT +_XA_TIMESTAMP +_XA_USER +_XA_UTF8_STRING +XmuNewArea +XmuDestroyScanlineList +XmuCvtWidgetToString +XmuOptimizeScanline +XmuAreaOrXor +XmuScanlineXor +XmuDestroySegmentList +XmuCvtJustifyToString +XmuSnprintf +XmuNewScanline +XmuNCopyISOLatin1Lowered +XmuNCopyISOLatin1Uppered +XmuCvtShapeStyleToString +XmuCvtOrientationToString +XmuScanlineOrSegment +#ifdef __UNIXOS2__ +XmuScanlineNot +XmuScanlineAnd +XmuScanlineOr +#endif -/* $XFree86: xc/lib/Xmu/Xmu-def.cpp,v 1.1 2000/08/09 23:40:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Xmu-def.cpp,v 1.2 2002/05/31 18:45:45 dawes Exp $ */ Index: xc/lib/Xmu/Xmuos2.def diff -u xc/lib/Xmu/Xmuos2.def:3.6 xc/lib/Xmu/Xmuos2.def:removed --- xc/lib/Xmu/Xmuos2.def:3.6 Thu Apr 29 05:13:32 1999 +++ xc/lib/Xmu/Xmuos2.def Thu Feb 27 12:27:32 2003 @@ -1,128 +0,0 @@ -LIBRARY Xmu -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xmu/Xmuos2.def,v 3.6 1999/04/29 09:13:32 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 32768 -EXPORTS - XmuGetAtomName @ 1 - XmuInternAtom @ 2 - XmuInternStrings @ 3 - XmuMakeAtom @ 4 - XmuNameOfAtom @ 5 - XmuCopyISOLatin1Lowered @ 6 - XmuCopyISOLatin1Uppered @ 7 - XmuCompareISOLatin1 @ 8 - XmuAddCloseDisplayHook @ 9 - XmuLookupCloseDisplayHook @ 10 - XmuRemoveCloseDisplayHook @ 11 - XmuCvtFunctionToCallback @ 12 - XmuCvtStringToBackingStore @ 13 - XmuCvtStringToCursor @ 14 - XmuCvtStringToColorCursor @ 15 - XmuCvtStringToGravity @ 16 - XmuCvtStringToJustify @ 17 - XmuCvtStringToLong @ 18 - XmuCvtStringToOrientation @ 19 - XmuCvtStringToBitmap @ 20 - XmuCvtStringToShapeStyle @ 21 - XmuReshapeWidget @ 22 - XmuCvtStringToWidget @ 23 - XmuNewCvtStringToWidget @ 24 - XmuCursorNameToIndex @ 25 - XmuDQCreate @ 26 - XmuDQDestroy @ 27 - XmuDQLookupDisplay @ 28 - XmuDQAddDisplay @ 29 - XmuDQRemoveDisplay @ 30 - XmuDrawRoundedRectangle @ 31 - XmuFillRoundedRectangle @ 32 - XmuDrawLogo @ 33 - XmuCreatePixmapFromBitmap @ 34 - XmuCreateStippledPixmap @ 35 - XmuReleaseStippledPixmap @ 36 - XmuLocateBitmapFile @ 37 - XmuLocatePixmapFile @ 38 - XmuReadBitmapData @ 39 - XmuReadBitmapDataFromFile @ 40 - XmuPrintDefaultErrorMessage @ 41 - XmuSimpleErrorHandler @ 42 - XmuRegisterExternalAgent @ 43 - XmuCallInitializers @ 44 - XmuAddInitializer @ 45 - XmuAllStandardColormaps @ 46 - XmuCreateColormap @ 47 - XmuDeleteStandardColormap @ 48 - XmuGetColormapAllocation @ 49 - XmuLookupStandardColormap @ 50 - XmuStandardColormap @ 51 - XmuVisualStandardColormaps @ 52 - XmuConvertStandardSelection @ 53 - XmuGetHostname @ 54 - XmuWnInitializeNodes @ 55 - XmuWnFetchResources @ 56 - XmuWnCountOwnedResources @ 57 - XmuWnNameToNode @ 58 - XmuClientWindow @ 59 - XmuUpdateMapHints @ 60 - XmuScreenOfWindow @ 61 - XctCreate @ 62 - XctNextItem @ 63 - XctFree @ 64 - XctReset @ 65 - _XmuCCLookupDisplay @ 66 - _XEditResCheckMessages @ 67 - _XEditResPutString8 @ 68 - _XEditResPut8 @ 69 - _XEditResPut16 @ 70 - _XEditResPut32 @ 71 - _XEditResPutWidgetInfo @ 72 - _XEditResResetStream @ 74 - _XEditResGet8 @ 75 - _XEditResGet16 @ 76 - _XEditResGetSigned16 @ 77 - _XEditResGet32 @ 78 - _XEditResGetString8 @ 79 - _XEditResGetWidgetInfo @ 80 - _XA_ATOM_PAIR @ 81 - _XA_CHARACTER_POSITION @ 82 - _XA_CLASS @ 83 - _XA_CLIENT_WINDOW @ 84 - _XA_CLIPBOARD @ 85 - _XA_COMPOUND_TEXT @ 86 - _XA_DECNET_ADDRESS @ 87 - _XA_DELETE @ 88 - _XA_FILENAME @ 89 - _XA_HOSTNAME @ 90 - _XA_IP_ADDRESS @ 91 - _XA_LENGTH @ 92 - _XA_LIST_LENGTH @ 93 - _XA_NAME @ 94 - _XA_NET_ADDRESS @ 95 - _XA_NULL @ 96 - _XA_OWNER_OS @ 97 - _XA_SPAN @ 98 - _XA_TARGETS @ 99 - _XA_TEXT @ 100 - _XA_TIMESTAMP @ 101 - _XA_USER @ 102 - XmuDistinguishableColors @ 103 - XmuDistinguishablePixels @ 104 - XmuCvtWidgetToString @ 105 - XmuCvtGravityToString @ 106 - XmuDestroySegmentList @ 107 - XmuCvtJustifyToString @ 108 - XmuSnprintf @ 109 - XmuAreaOrXor @ 110 - XmuDestroyScanlineList @ 111 - XmuScanlineXor @ 112 - XmuNewScanline @ 113 - XmuNCopyISOLatin1Lowered @ 114 - XmuNCopyISOLatin1Uppered @ 115 - XmuCvtShapeStyleToString @ 116 - XmuCvtOrientationToString @ 117 - XmuCvtBackingStoreToString @ 118 - XmuNewArea @ 119 - XmuScanlineOrSegment @ 120 - XmuOptimizeScanline @ 121 Index: xc/lib/Xmu/Xmuos2.rsp diff -u xc/lib/Xmu/Xmuos2.rsp:3.4 xc/lib/Xmu/Xmuos2.rsp:removed --- xc/lib/Xmu/Xmuos2.rsp:3.4 Thu Apr 29 05:13:32 1999 +++ xc/lib/Xmu/Xmuos2.rsp Thu Feb 27 12:27:32 2003 @@ -1,11 +0,0 @@ -AllCmap.obj Atoms.obj ClientWin.obj Clip.obj CloseHook.obj CmapAlloc.obj + -CrCmap.obj CrPixFBit.obj CursorName.obj CvtCache.obj CvtStdSel.obj + -DefErrMsg.obj DelCmap.obj DisplayQue.obj Distinct.obj DrRndRect.obj + -DrawLogo.obj EditresCom.obj ExtAgent.obj FToCback.obj GetHost.obj + -GrayPixmap.obj Initer.obj LocBitmap.obj Lookup.obj LookupCmap.obj Lower.obj + -RdBitF.obj ScrOfWin.obj ShapeWidg.obj StdCmap.obj StrToBS.obj StrToBmap.obj + -StrToCurs.obj StrToGrav.obj StrToJust.obj StrToLong.obj StrToOrnt.obj + -StrToShap.obj StrToWidg.obj UpdMapHint.obj VisCmap.obj WidgetNode.obj+ -Xct.obj /NOI /NOL /NOD /BAT -Xmu.dll -Xmu.map Index: xc/lib/Xmuu/Imakefile diff -u xc/lib/Xmuu/Imakefile:1.2 xc/lib/Xmuu/Imakefile:1.3 --- xc/lib/Xmuu/Imakefile:1.2 Fri May 11 04:16:54 2001 +++ xc/lib/Xmuu/Imakefile Thu Nov 14 16:01:18 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xmuu/Imakefile,v 1.2 2001/05/11 08:16:54 alanh Exp $ +XCOMM $XFree86: xc/lib/Xmuu/Imakefile,v 1.3 2002/11/14 21:01:18 tsi 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 @@ -8,7 +8,7 @@ #define DoNormalLib NormalLibXmuu #define DoSharedLib SharedLibXmuu -#define DoExtraLib SharedLibXmuuc +#define DoExtraLib SharedLibXmuu #define DoDebugLib DebugLibXmuu #define DoProfileLib ProfileLibXmuu #define LibName Xmuu Index: xc/lib/Xmuu/Xmuu-def.cpp diff -u xc/lib/Xmuu/Xmuu-def.cpp:1.1 xc/lib/Xmuu/Xmuu-def.cpp:1.2 --- xc/lib/Xmuu/Xmuu-def.cpp:1.1 Wed Apr 18 13:14:00 2001 +++ xc/lib/Xmuu/Xmuu-def.cpp Fri May 31 14:45:45 2002 @@ -13,8 +13,10 @@ XmuNCopyISOLatin1Lowered XmuNCopyISOLatin1Uppered XmuSnprintf +#ifndef __UNIXOS2__ _cygwin_dll_entry@12 _cygwin_noncygwin_dll_entry@12 dll_main@12 +#endif -/* $XFree86: xc/lib/Xmuu/Xmuu-def.cpp,v 1.1 2001/04/18 17:14:00 dawes Exp $ */ +/* $XFree86: xc/lib/Xmuu/Xmuu-def.cpp,v 1.2 2002/05/31 18:45:45 dawes Exp $ */ Index: xc/lib/Xp/Imakefile diff -u xc/lib/Xp/Imakefile:1.3 xc/lib/Xp/Imakefile:1.4 --- xc/lib/Xp/Imakefile:1.3 Wed Jan 17 14:43:01 2001 +++ xc/lib/Xp/Imakefile Tue Oct 15 20:37:31 2002 @@ -36,7 +36,7 @@ ** ****************************************************************************** *****************************************************************************/ -XCOMM $XFree86: xc/lib/Xp/Imakefile,v 1.3 2001/01/17 19:43:01 dawes Exp $ +XCOMM $XFree86: xc/lib/Xp/Imakefile,v 1.4 2002/10/16 00:37:31 dawes Exp $ #define DoNormalLib NormalLibXp @@ -59,7 +59,6 @@ #endif DEFINES = $(ALLOC_DEFINES) -INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) /* * NOTE: libDtPrint.a has a dependency on extutil.o found in Index: xc/lib/Xp/XpAttr.c diff -u xc/lib/Xp/XpAttr.c:1.6 xc/lib/Xp/XpAttr.c:1.7 --- xc/lib/Xp/XpAttr.c:1.6 Wed Jan 17 14:43:01 2001 +++ xc/lib/Xp/XpAttr.c Tue Oct 15 20:37:31 2002 @@ -34,12 +34,12 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpAttr.c,v 1.6 2001/01/17 19:43:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpAttr.c,v 1.7 2002/10/16 00:37:31 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" #define _XpPadOut(len) (((len) + 3) & ~3) Index: xc/lib/Xp/XpContext.c diff -u xc/lib/Xp/XpContext.c:1.6 xc/lib/Xp/XpContext.c:1.7 --- xc/lib/Xp/XpContext.c:1.6 Sat Oct 27 23:32:39 2001 +++ xc/lib/Xp/XpContext.c Tue Oct 15 20:37:31 2002 @@ -34,12 +34,12 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpContext.c,v 1.6 2001/10/28 03:32:39 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpContext.c,v 1.7 2002/10/16 00:37:31 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" #define _XpPadOut(len) (((len) + 3) & ~3) Index: xc/lib/Xp/XpDoc.c diff -u xc/lib/Xp/XpDoc.c:1.3 xc/lib/Xp/XpDoc.c:1.4 --- xc/lib/Xp/XpDoc.c:1.3 Wed Jan 17 14:43:01 2001 +++ xc/lib/Xp/XpDoc.c Tue Oct 15 20:37:31 2002 @@ -34,10 +34,10 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpDoc.c,v 1.3 2001/01/17 19:43:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpDoc.c,v 1.4 2002/10/16 00:37:31 dawes Exp $ */ -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" typedef struct { Index: xc/lib/Xp/XpExtUtil.c diff -u xc/lib/Xp/XpExtUtil.c:1.6 xc/lib/Xp/XpExtUtil.c:1.7 --- xc/lib/Xp/XpExtUtil.c:1.6 Sat Oct 27 23:32:39 2001 +++ xc/lib/Xp/XpExtUtil.c Tue Oct 15 20:37:31 2002 @@ -34,13 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpExtUtil.c,v 1.6 2001/10/28 03:32:39 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpExtUtil.c,v 1.7 2002/10/16 00:37:31 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES #include -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" #include Index: xc/lib/Xp/XpExtUtil.h diff -u xc/lib/Xp/XpExtUtil.h:1.2 xc/lib/Xp/XpExtUtil.h:1.3 --- xc/lib/Xp/XpExtUtil.h:1.2 Tue Jul 31 20:44:40 2001 +++ xc/lib/Xp/XpExtUtil.h Tue Oct 15 20:37:31 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xp/XpExtUtil.h,v 1.2 2001/08/01 00:44:40 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpExtUtil.h,v 1.3 2002/10/16 00:37:31 dawes Exp $ */ /* * Copyright (C) 2000 The XFree86 Project, Inc. All Rights Reserved. * @@ -29,7 +29,7 @@ #define _XPEXTUTIL_H 1 #include -#include "extutil.h" +#include extern XEXT_FIND_DISPLAY_PROTO(xp_find_display); Index: xc/lib/Xp/XpExtVer.c diff -u xc/lib/Xp/XpExtVer.c:1.4 xc/lib/Xp/XpExtVer.c:1.5 --- xc/lib/Xp/XpExtVer.c:1.4 Wed Jan 17 14:43:01 2001 +++ xc/lib/Xp/XpExtVer.c Tue Oct 15 20:37:31 2002 @@ -34,12 +34,12 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpExtVer.c,v 1.4 2001/01/17 19:43:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpExtVer.c,v 1.5 2002/10/16 00:37:31 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" Index: xc/lib/Xp/XpGetData.c diff -u xc/lib/Xp/XpGetData.c:1.4 xc/lib/Xp/XpGetData.c:1.5 --- xc/lib/Xp/XpGetData.c:1.4 Wed Jan 17 14:43:02 2001 +++ xc/lib/Xp/XpGetData.c Tue Oct 15 20:37:32 2002 @@ -34,12 +34,12 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpGetData.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpGetData.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" #define MAX_XP_BUFFER_SIZE 32768 Index: xc/lib/Xp/XpImageRes.c diff -u xc/lib/Xp/XpImageRes.c:1.4 xc/lib/Xp/XpImageRes.c:1.5 --- xc/lib/Xp/XpImageRes.c:1.4 Wed Jan 17 14:43:02 2001 +++ xc/lib/Xp/XpImageRes.c Tue Oct 15 20:37:32 2002 @@ -34,13 +34,13 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpImageRes.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpImageRes.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" Index: xc/lib/Xp/XpInput.c diff -u xc/lib/Xp/XpInput.c:1.4 xc/lib/Xp/XpInput.c:1.5 --- xc/lib/Xp/XpInput.c:1.4 Wed Jan 17 14:43:02 2001 +++ xc/lib/Xp/XpInput.c Tue Oct 15 20:37:32 2002 @@ -34,12 +34,12 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpInput.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpInput.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" Index: xc/lib/Xp/XpJob.c diff -u xc/lib/Xp/XpJob.c:1.4 xc/lib/Xp/XpJob.c:1.6 --- xc/lib/Xp/XpJob.c:1.4 Wed Jan 17 14:43:02 2001 +++ xc/lib/Xp/XpJob.c Tue Oct 15 20:37:32 2002 @@ -34,15 +34,15 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpJob.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpJob.c,v 1.6 2002/10/16 00:37:32 dawes Exp $ */ -#if defined(sun) && defined(i386) && defined(SVR4) +#if defined(sun) && defined(i386) && defined(SVR4) && !defined(__EXTENSIONS__) #define __EXTENSIONS__ #endif -#include "Printstr.h" -#include "Xlibint.h" -#include "X11/Xos.h" +#include +#include +#include #include "XpExtUtil.h" #include #ifndef WIN32 @@ -101,7 +101,9 @@ char *joa; /* job owner attribute */ char *PwName; #ifndef WIN32 +#ifdef X_NEEDS_PWPARAMS _Xgetpwparams pwparams; +#endif struct passwd *pw; pw = _XGetpwuid(getuid(),pwparams); Index: xc/lib/Xp/XpLocale.c diff -u xc/lib/Xp/XpLocale.c:1.4 xc/lib/Xp/XpLocale.c:1.5 --- xc/lib/Xp/XpLocale.c:1.4 Wed Jan 17 14:43:02 2001 +++ xc/lib/Xp/XpLocale.c Tue Oct 15 20:37:32 2002 @@ -34,10 +34,10 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpLocale.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpLocale.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" #include Index: xc/lib/Xp/XpNotifyPdm.c diff -u xc/lib/Xp/XpNotifyPdm.c:1.5 xc/lib/Xp/XpNotifyPdm.c:1.6 --- xc/lib/Xp/XpNotifyPdm.c:1.5 Sat Oct 27 23:32:39 2001 +++ xc/lib/Xp/XpNotifyPdm.c Tue Oct 15 20:37:32 2002 @@ -41,13 +41,13 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpNotifyPdm.c,v 1.5 2001/10/28 03:32:39 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpNotifyPdm.c,v 1.6 2002/10/16 00:37:32 dawes Exp $ */ -#include "Print.h" -#include "X11/Xlibint.h" -#include "X11/Xutil.h" -#include "X11/Xatom.h" -#include "X11/Xauth.h" +#include +#include +#include +#include +#include #include #include Index: xc/lib/Xp/XpPage.c diff -u xc/lib/Xp/XpPage.c:1.4 xc/lib/Xp/XpPage.c:1.5 --- xc/lib/Xp/XpPage.c:1.4 Wed Dec 19 16:28:44 2001 +++ xc/lib/Xp/XpPage.c Tue Oct 15 20:37:32 2002 @@ -34,10 +34,10 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpPage.c,v 1.4 2001/12/19 21:28:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpPage.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" Index: xc/lib/Xp/XpPageDim.c diff -u xc/lib/Xp/XpPageDim.c:1.4 xc/lib/Xp/XpPageDim.c:1.5 --- xc/lib/Xp/XpPageDim.c:1.4 Wed Jan 17 14:43:02 2001 +++ xc/lib/Xp/XpPageDim.c Tue Oct 15 20:37:32 2002 @@ -34,12 +34,12 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpPageDim.c,v 1.4 2001/01/17 19:43:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpPageDim.c,v 1.5 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" Index: xc/lib/Xp/XpPrinter.c diff -u xc/lib/Xp/XpPrinter.c:1.8 xc/lib/Xp/XpPrinter.c:1.9 --- xc/lib/Xp/XpPrinter.c:1.8 Sun Apr 1 10:00:02 2001 +++ xc/lib/Xp/XpPrinter.c Tue Oct 15 20:37:32 2002 @@ -34,12 +34,12 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpPrinter.c,v 1.8 2001/04/01 14:00:02 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpPrinter.c,v 1.9 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" #define _XpPadOut(len) (((len) + 3) & ~3) Index: xc/lib/Xp/XpPutData.c diff -u xc/lib/Xp/XpPutData.c:1.3 xc/lib/Xp/XpPutData.c:1.4 --- xc/lib/Xp/XpPutData.c:1.3 Wed Jan 17 14:43:02 2001 +++ xc/lib/Xp/XpPutData.c Tue Oct 15 20:37:32 2002 @@ -34,10 +34,10 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpPutData.c,v 1.3 2001/01/17 19:43:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpPutData.c,v 1.4 2002/10/16 00:37:32 dawes Exp $ */ -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" #define _XpPadOut(len) (((len) + 3) & ~3) Index: xc/lib/Xp/XpScreens.c diff -u xc/lib/Xp/XpScreens.c:1.5 xc/lib/Xp/XpScreens.c:1.6 --- xc/lib/Xp/XpScreens.c:1.5 Sun Apr 1 10:00:02 2001 +++ xc/lib/Xp/XpScreens.c Tue Oct 15 20:37:32 2002 @@ -34,12 +34,12 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpScreens.c,v 1.5 2001/04/01 14:00:02 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpScreens.c,v 1.6 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_REPLIES -#include "Printstr.h" -#include "Xlibint.h" +#include +#include #include "XpExtUtil.h" Index: xc/lib/Xp/Xpos2.def diff -u xc/lib/Xp/Xpos2.def:1.2 xc/lib/Xp/Xpos2.def:removed --- xc/lib/Xp/Xpos2.def:1.2 Thu Apr 29 05:13:33 1999 +++ xc/lib/Xp/Xpos2.def Thu Feb 27 12:27:34 2003 @@ -1,45 +0,0 @@ -LIBRARY XP -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xp/Xpos2.def,v 1.2 1999/04/29 09:13:33 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE - 32768 -EXPORTS - XpCancelDoc @ 1 - XpCancelJob @ 2 - XpCancelPage @ 3 - XpCreateContext @ 4 - XpDestroyContext @ 5 - XpEndDoc @ 6 - XpEndJob @ 7 - XpEndPage @ 8 - XpFreePrinterList @ 9 - XpGetAttributes @ 10 - XpGetAuthParams @ 11 - XpGetContext @ 12 - XpGetDocumentData @ 13 - XpGetLocaleHinter @ 14 - XpGetLocaleNetString @ 15 - XpGetOneAttribute @ 16 - XpGetPageDimensions @ 17 - XpGetPdmStartParams @ 18 - XpGetPrinterList @ 19 - XpGetScreenOfContext @ 20 - XpInputSelected @ 21 - XpNotifyPdm @ 22 - XpPutDocumentData @ 23 - XpQueryExtension @ 24 - XpQueryScreens @ 25 - XpQueryVersion @ 26 - XpRehashPrinterList @ 27 - XpSelectInput @ 28 - XpSendAuth @ 29 - XpSendOneTicket @ 30 - XpSetAttributes @ 31 - XpSetContext @ 32 - XpSetLocaleHinter @ 33 - XpStartDoc @ 34 - XpStartJob @ 35 - XpStartPage @ 36 Index: xc/lib/Xp/Xpos2.rsp diff -u xc/lib/Xp/Xpos2.rsp:1.1 xc/lib/Xp/Xpos2.rsp:removed --- xc/lib/Xp/Xpos2.rsp:1.1 Sun Jan 5 06:52:13 1997 +++ xc/lib/Xp/Xpos2.rsp Thu Feb 27 12:27:34 2003 @@ -1,5 +0,0 @@ -XpAttr.obj XpContext.obj XpDoc.obj XpExtUtil.obj XpExtVer.obj XpGetData.obj+ -XpImageRes.obj XpInput.obj XpJob.obj XpLocale.obj XpNotifyPdm.obj XpPage.obj+ -XpPageDim.obj XpPrinter.obj XpPutData.obj XpScreens.obj /NOI /NOL /NOD /BAT -Xp.dll -Xp.map Index: xc/lib/Xpm/Xpmos2.def diff -u xc/lib/Xpm/Xpmos2.def:1.1 xc/lib/Xpm/Xpmos2.def:removed --- xc/lib/Xpm/Xpmos2.def:1.1 Thu Apr 29 05:26:37 1999 +++ xc/lib/Xpm/Xpmos2.def Thu Feb 27 12:27:34 2003 @@ -1,41 +0,0 @@ -LIBRARY XPM -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xpm/Xpmos2.def,v 1.1 1999/04/29 09:26:37 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 16384 -EXPORTS - XpmCreatePixmapFromData @ 1 - XpmCreateDataFromPixmap @ 2 - XpmReadFileToPixmap @ 3 - XpmWriteFileFromPixmap @ 4 - XpmCreateImageFromData @ 5 - XpmCreateDataFromImage @ 6 - XpmReadFileToImage @ 7 - XpmWriteFileFromImage @ 8 - XpmCreateImageFromBuffer @ 9 - XpmCreatePixmapFromBuffer @ 10 - XpmCreateBufferFromImage @ 11 - XpmCreateBufferFromPixmap @ 12 - XpmReadFileToBuffer @ 13 - XpmWriteFileFromBuffer @ 14 - XpmReadFileToData @ 15 - XpmWriteFileFromData @ 16 - XpmAttributesSize @ 17 - XpmFreeAttributes @ 18 - XpmFreeExtensions @ 19 - XpmFreeXpmImage @ 20 - XpmFreeXpmInfo @ 21 - XpmGetErrorString @ 22 - XpmLibraryVersion @ 23 - XpmReadFileToXpmImage @ 24 - XpmWriteFileFromXpmImage @ 25 - XpmCreatePixmapFromXpmImage @ 26 - XpmCreateImageFromXpmImage @ 27 - XpmCreateXpmImageFromImage @ 28 - XpmCreateXpmImageFromPixmap @ 29 - XpmCreateDataFromXpmImage @ 30 - XpmCreateXpmImageFromData @ 31 - XpmCreateXpmImageFromBuffer @ 32 - XpmCreateBufferFromXpmImage @ 33 Index: xc/lib/Xpm/Xpmos2.rsp diff -u xc/lib/Xpm/Xpmos2.rsp:1.1 xc/lib/Xpm/Xpmos2.rsp:removed --- xc/lib/Xpm/Xpmos2.rsp:1.1 Thu Apr 29 05:26:37 1999 +++ xc/lib/Xpm/Xpmos2.rsp Thu Feb 27 12:27:34 2003 @@ -1,7 +0,0 @@ -Attrib.obj CrBufFrI.obj CrBufFrP.obj CrDatFrI.obj CrDatFrP.obj CrIFrBuf.obj+ -CrIFrDat.obj CrIFrP.obj CrPFrBuf.obj CrPFrDat.obj CrPFrI.obj Image.obj+ -Info.obj RdFToBuf.obj RdFToDat.obj RdFToI.obj RdFToP.obj WrFFrBuf.obj+ -WrFFrDat.obj WrFFrI.obj WrFFrP.obj create.obj data.obj hashtab.obj misc.obj+ -parse.obj rgb.obj scan.obj /NOI /NOL /NOD /BAT -Xpm.dll -Xpm.map Index: xc/lib/Xrandr/Imakefile diff -u xc/lib/Xrandr/Imakefile:1.1 xc/lib/Xrandr/Imakefile:1.2 --- xc/lib/Xrandr/Imakefile:1.1 Tue May 22 23:29:44 2001 +++ xc/lib/Xrandr/Imakefile Wed Oct 2 12:55:41 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xrandr/Imakefile,v 1.1 2001/05/23 03:29:44 keithp Exp $ +XCOMM $XFree86: xc/lib/Xrandr/Imakefile,v 1.2 2002/10/02 16:55:41 keithp Exp $ #define DoNormalLib NormalLibXrandr @@ -29,5 +29,9 @@ HEADERS = Xrandr.h #include + +MANSUFFIX = $(LIBMANSUFFIX) + +InstallManPage(Xrandr,$(LIBMANDIR)) DependTarget() Index: xc/lib/Xrandr/Xrandr.c diff -u xc/lib/Xrandr/Xrandr.c:1.6 xc/lib/Xrandr/Xrandr.c:1.13 --- xc/lib/Xrandr/Xrandr.c:1.6 Sun Jun 10 21:37:53 2001 +++ xc/lib/Xrandr/Xrandr.c Fri Feb 7 06:21:07 2003 @@ -1,29 +1,35 @@ /* - * $XFree86: xc/lib/Xrandr/Xrandr.c,v 1.6 2001/06/11 01:37:53 keithp Exp $ + * $XFree86: xc/lib/Xrandr/Xrandr.c,v 1.13 2003/02/07 11:21:07 eich Exp $ * * Copyright © 2000 Compaq Computer Corporation, Inc. + * Copyright © 2002 Hewlett Packard Company, 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 Compaq not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Compaq makes no representations about the + * documentation, and that the name of Compaq or HP not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. HP makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * - * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ * 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. * - * Author: Jim Gettys, Compaq Computer Corporation, Inc. + * Author: Jim Gettys, HP Labs, HP. */ + #include #include +/* we need to be able to manipulate the Display structure on events */ +#include +#include +#include #include "Xrandrint.h" XExtensionInfo XRRExtensionInfo; @@ -32,6 +38,8 @@ static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire); static Status XRREventToWire(Display *dpy, XEvent *event, xEvent *wire); +static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, Window window); + static int XRRCloseDisplay (Display *dpy, XExtCodes *codes); @@ -72,7 +80,7 @@ aevent->timestamp = awire->timestamp; aevent->config_timestamp = awire->configTimestamp; aevent->size_index = awire->sizeID; - aevent->visual_group_index = awire->visualGroupID; + aevent->subpixel_order = awire->subpixelOrder; aevent->rotation = awire->rotation; aevent->width = awire->widthInPixels; aevent->height = awire->heightInPixels; @@ -105,7 +113,7 @@ awire->root = aevent->root; awire->window = aevent->window; awire->sizeID = aevent->size_index; - awire->visualGroupID = aevent->visual_group_index; + awire->subpixelOrder = aevent->subpixel_order; awire->widthInPixels = aevent->width; awire->heightInPixels = aevent->height; awire->widthInMillimeters = aevent->mwidth; @@ -119,84 +127,205 @@ XRRFindDisplay (Display *dpy) { XExtDisplayInfo *dpyinfo; + XRandRInfo *xrri; + int i, numscreens; dpyinfo = XextFindDisplay (&XRRExtensionInfo, dpy); - if (!dpyinfo) + if (!dpyinfo) { dpyinfo = XextAddDisplay (&XRRExtensionInfo, dpy, XRRExtensionName, &rr_extension_hooks, RRNumberEvents, 0); + numscreens = ScreenCount(dpy); + xrri = Xmalloc (sizeof(XRandRInfo) + + sizeof(char *) * numscreens); + xrri->config = (XRRScreenConfiguration **)(xrri + 1); + for(i = 0; i < numscreens; i++) + xrri->config[i] = NULL; + xrri->major_version = -1; + dpyinfo->data = (char *) xrri; + } return dpyinfo; } static int XRRCloseDisplay (Display *dpy, XExtCodes *codes) { + int i; + XRRScreenConfiguration **configs; XExtDisplayInfo *info = XRRFindDisplay (dpy); - if (info->data) XFree (info->data); - - return XextRemoveDisplay (&XRRExtensionInfo, dpy); -} - -/**************************************************************************** - * * - * RandR public interfaces * - * * - ****************************************************************************/ -int XRRVisualToDepth(Display *dpy, Visual *visual) -{ - int s; - for (s = 0; s < ScreenCount(dpy); s++) { - Screen *sp = ScreenOfDisplay(dpy, s); - int d; - for (d = 0; d < sp->ndepths; d++) { - int v; - for (v = 0; v < sp->depths[s].nvisuals; v++) { - if ( &sp->depths[s].visuals[v] == visual ) return d; - } - } - } - return -1; /* should not ever happen */ -} + XRandRInfo *xrri; -Visual *XRRVisualIDToVisual(Display *dpy, int screen, VisualID id) -{ - int d, v; - Screen *sp = ScreenOfDisplay(dpy, screen); - for (d = 0; d < sp->ndepths; d++) { - for (v = 0; v < sp->depths[d].nvisuals; v++) { - if ( sp->depths[d].visuals[v].visualid == id ) - return (&sp->depths[d].visuals[v]); + LockDisplay(dpy); + /* + * free cached data + */ + if (XextHasExtension(info)) { + xrri = (XRandRInfo *) info->data; + if (xrri) { + configs = xrri->config; + + for (i = 0; i < ScreenCount(dpy); i++) { + if (configs[i] != NULL) XFree (configs[i]); + } + XFree (xrri); + } } - } - return NULL; + UnlockDisplay(dpy); + return XextRemoveDisplay (&XRRExtensionInfo, dpy); } + -Rotation XRRRotations(XRRScreenConfiguration *config, Rotation *current_rotation) +Rotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation) { *current_rotation = config->current_rotation; return config->rotations; } -XRRScreenSize *XRRSizes(XRRScreenConfiguration *config, int *nsizes) +XRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes) { *nsizes = config->nsizes; return config->sizes; } + +short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates) +{ + short *r = config->rates; + int nents = config->nrates; + + /* Skip over the intervening rate lists */ + while (sizeID > 0 && nents > 0) + { + int i = (*r + 1); + r += i; + nents -= i; + sizeID--; + } + if (!nents) + { + *nrates = 0; + return 0; + } + *nrates = (int) *r; + return r + 1; +} -Time XRRTimes (XRRScreenConfiguration *config, Time *config_timestamp) +Time XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp) { *config_timestamp = config->config_timestamp; return config->timestamp; } -SizeID XRRCurrentConfig (XRRScreenConfiguration *config, VisualGroupID *visual_group, Rotation *rotation) + +SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, + Rotation *rotation) { - *visual_group = (VisualGroupID) config->current_visual_group; *rotation = (Rotation) config->current_rotation; return (SizeID) config->current_size; } +short XRRConfigCurrentRate (XRRScreenConfiguration *config) +{ + return config->current_rate; +} + +/* + * Go get the screen configuration data and salt it away for future use; + * returns NULL if extension not supported + */ +static XRRScreenConfiguration *_XRRValidateCache (Display *dpy, int screen) +{ + XExtDisplayInfo *info = XRRFindDisplay (dpy); + XRRScreenConfiguration **configs; + XRandRInfo *xrri; + + if (XextHasExtension(info)) { + xrri = (XRandRInfo *) info->data; + configs = xrri->config; + + if (configs[screen] == NULL) + configs[screen] = _XRRGetScreenInfo (dpy, RootWindow(dpy, screen)); + return configs[screen]; + } else { + return NULL; + } +} + +/* given a screen, return the information from the (possibly) cached data */ +Rotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation) +{ + XRRScreenConfiguration *config; + Rotation cr; + LockDisplay(dpy); + if ((config = _XRRValidateCache(dpy, screen))) { + *current_rotation = config->current_rotation; + cr = config->rotations; + UnlockDisplay(dpy); + return cr; + } + else { + UnlockDisplay(dpy); + *current_rotation = RR_Rotate_0; + return 0; /* no rotations supported */ + } +} + +/* given a screen, return the information from the (possibly) cached data */ +XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes) +{ + XRRScreenConfiguration *config; + XRRScreenSize *sizes; + + LockDisplay(dpy); + if ((config = _XRRValidateCache(dpy, screen))) { + *nsizes = config->nsizes; + sizes = config->sizes; + UnlockDisplay(dpy); + return sizes; + } + else { + UnlockDisplay(dpy); + *nsizes = 0; + return NULL; + } +} + +short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates) +{ + XRRScreenConfiguration *config; + short *rates; + + LockDisplay(dpy); + if ((config = _XRRValidateCache(dpy, screen))) { + rates = XRRConfigRates (config, sizeID, nrates); + UnlockDisplay(dpy); + return rates; + } + else { + UnlockDisplay(dpy); + *nrates = 0; + return NULL; + } +} + +/* given a screen, return the information from the (possibly) cached data */ +Time XRRTimes (Display *dpy, int screen, Time *config_timestamp) +{ + XRRScreenConfiguration *config; + Time ts; + + LockDisplay(dpy); + if ((config = _XRRValidateCache(dpy, screen))) { + *config_timestamp = config->config_timestamp; + ts = config->timestamp; + UnlockDisplay(dpy); + return ts; + } else { + UnlockDisplay(dpy); + return CurrentTime; + } +} + int XRRRootToScreen(Display *dpy, Window root) { int snum; @@ -209,7 +338,7 @@ Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep) { - XExtDisplayInfo *info = XRRFindDisplay (dpy); + XExtDisplayInfo *info = XRRFindDisplay (dpy); if (XextHasExtension(info)) { *event_basep = info->codes->first_event; @@ -220,6 +349,11 @@ } } +static Bool +_XRRHasRates (int major, int minor) +{ + return major > 1 || (major == 1 && minor >= 1); +} Status XRRQueryVersion (Display *dpy, int *major_versionp, @@ -228,233 +362,303 @@ XExtDisplayInfo *info = XRRFindDisplay (dpy); xRRQueryVersionReply rep; xRRQueryVersionReq *req; + XRandRInfo *xrri; RRCheckExtension (dpy, info, 0); - LockDisplay (dpy); - GetReq (RRQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->randrReqType = X_RRQueryVersion; - req->majorVersion = RANDR_MAJOR; - req->minorVersion = RANDR_MINOR; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + xrri = (XRandRInfo *) info->data; + + /* + * only get the version information from the server if we don't have it already + */ + if (xrri->major_version == -1) { + LockDisplay (dpy); + GetReq (RRQueryVersion, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRQueryVersion; + req->majorVersion = RANDR_MAJOR; + req->minorVersion = RANDR_MINOR; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { UnlockDisplay (dpy); SyncHandle (); return 0; + } + xrri->major_version = rep.majorVersion; + xrri->minor_version = rep.minorVersion; + xrri->has_rates = _XRRHasRates (xrri->major_version, xrri->minor_version); } - *major_versionp = rep.majorVersion; - *minor_versionp = rep.minorVersion; + *major_versionp = xrri->major_version; + *minor_versionp = xrri->minor_version; UnlockDisplay (dpy); SyncHandle (); return 1; } -XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, Window window) +typedef struct _randrVersionState { + unsigned long version_seq; + Bool error; + int major_version; + int minor_version; +} _XRRVersionState; + +static Bool +_XRRVersionHandler (Display *dpy, + xReply *rep, + char *buf, + int len, + XPointer data) +{ + xRRQueryVersionReply replbuf; + xRRQueryVersionReply *repl; + _XRRVersionState *state = (_XRRVersionState *) data; + + if (dpy->last_request_read != state->version_seq) + return False; + if (rep->generic.type == X_Error) + { + state->error = True; + return False; + } + repl = (xRRQueryVersionReply *) + _XGetAsyncReply(dpy, (char *)&replbuf, rep, buf, len, + (SIZEOF(xRRQueryVersionReply) - SIZEOF(xReply)) >> 2, + True); + state->major_version = repl->majorVersion; + state->minor_version = repl->minorVersion; + return True; +} +/* need a version that does not hold the display lock */ +static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy, Window window) { XExtDisplayInfo *info = XRRFindDisplay(dpy); xRRGetScreenInfoReply rep; xRRGetScreenInfoReq *req; - int nbytes, rbytes; - int i, j; - int nvisuals, ngroups; + _XAsyncHandler async; + _XRRVersionState async_state; + int nbytes, nbytesRead, rbytes; + int i; int snum; - xScreenSizes *psize; - char *data; + xScreenSizes size; struct _XRRScreenConfiguration *scp; - XRRVisualGroup *vgp; - XRRGroupOfVisualGroup *gvgp; - XRRVisualGroup **gp; XRRScreenSize *ssp; - Visual **vgpp; - CARD32 *data32; - CARD16 *data16; + short *rates; + xRRQueryVersionReq *vreq; + XRandRInfo *xrri; + Bool getting_version = False; RRCheckExtension (dpy, info, 0); - LockDisplay (dpy); + xrri = (XRandRInfo *) info->data; + + if (xrri->major_version == -1) + { + /* hide a version query in the request */ + GetReq (RRQueryVersion, vreq); + vreq->reqType = info->codes->major_opcode; + vreq->randrReqType = X_RRQueryVersion; + vreq->majorVersion = RANDR_MAJOR; + vreq->minorVersion = RANDR_MINOR; + + async_state.version_seq = dpy->request; + async_state.error = False; + async.next = dpy->async_handlers; + async.handler = _XRRVersionHandler; + async.data = (XPointer) &async_state; + dpy->async_handlers = &async; + + getting_version = True; + } + GetReq (RRGetScreenInfo, req); req->reqType = info->codes->major_opcode; req->randrReqType = X_RRGetScreenInfo; req->window = window; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); + if (getting_version) + DeqAsyncHandler (dpy, &async); SyncHandle (); return NULL; } - nbytes = (long) rep.length << 2; - data = (char *) Xmalloc ((unsigned) nbytes); - if (!data) + if (getting_version) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return NULL; + DeqAsyncHandler (dpy, &async); + if (async_state.error) + { + SyncHandle(); + } + xrri->major_version = async_state.major_version; + xrri->minor_version = async_state.minor_version; + xrri->has_rates = _XRRHasRates (xrri->minor_version, xrri->major_version); } - _XReadPad (dpy, data, nbytes); - UnlockDisplay (dpy); - SyncHandle (); - /* - * first we must compute how much space to allocate for - * randr library's use; we'll allocate the structures in a single - * allocation, on cleanlyness grounds. - */ - - /* pick up in the protocol buffer after the protocol size information */ - psize = (xScreenSizes *) data; - data32 = (CARD32 *) &psize[rep.nSizes]; - vgp = (XRRVisualGroup *) ssp; /* visual groups after size structures */ - /* and groups of visual groups structures after the array of visual groups */ - gvgp = (XRRGroupOfVisualGroup *) &vgp[rep.nVisualGroups]; - /* - * first we count up the number of groups + * Make the reply compatible with v1.1 */ - nvisuals = 0; - for (i = 0; i < rep.nVisualGroups; i++) { - j = *data32; - data32 += j + 1; - nvisuals += j; + if (!xrri->has_rates) + { + rep.rate = 0; + rep.nrateEnts = 0; } - - /* - * Next comes the groups of visual groups - */ + + nbytes = (long) rep.length << 2; - data16 = (CARD16 *) data32; - /* - * We count up the number of groups + nbytesRead = (long) (rep.nSizes * SIZEOF (xScreenSizes) + + ((rep.nrateEnts + 1)& ~1) * 2 /* SIZEOF (CARD16) */); + + /* + * first we must compute how much space to allocate for + * randr library's use; we'll allocate the structures in a single + * allocation, on cleanlyness grounds. */ - ngroups = 0; - for (i = 0; i < rep.nGroupsOfVisualGroups; i++) { - j = *data16; - data16 += j + 1; - ngroups += j; - } rbytes = sizeof (XRRScreenConfiguration) + - (rep.nVisualGroups * sizeof (XRRVisualGroup)) + - (rep.nGroupsOfVisualGroups * sizeof (XRRGroupOfVisualGroup)) + - (rep.nSizes * sizeof (XRRScreenSize)) + - (nvisuals * sizeof (Visual *)) + - (ngroups * sizeof (XRRGroupOfVisualGroup *)); + (rep.nSizes * sizeof (XRRScreenSize) + + rep.nrateEnts * sizeof (int)); scp = (struct _XRRScreenConfiguration *) Xmalloc(rbytes); - if (scp == NULL) return NULL; + if (scp == NULL) { + _XEatData (dpy, (unsigned long) nbytes); + SyncHandle (); + return NULL; + } ssp = (XRRScreenSize *)(scp + 1); - vgp = (XRRVisualGroup *) (&ssp[rep.nSizes]); - gvgp = (XRRGroupOfVisualGroup *) (&vgp[rep.nVisualGroups]); - vgpp = (Visual **) (&gvgp[rep.nGroupsOfVisualGroups]); - gp = (XRRVisualGroup **) (&vgpp[ngroups]); + rates = (short *) (ssp + rep.nSizes); + /* set up the screen configuration structure */ - scp->screen = ScreenOfDisplay (dpy, (snum = XRRRootToScreen(dpy, rep.root))); + scp->screen = + ScreenOfDisplay (dpy, (snum = XRRRootToScreen(dpy, rep.root))); - scp->visual_group = vgp; - scp->groups_of_visual_groups = gvgp; scp->sizes = ssp; + scp->rates = rates; scp->rotations = rep.setOfRotations; scp->current_size = rep.sizeID; - scp->current_visual_group = rep.visualGroupID; + scp->current_rate = rep.rate; scp->current_rotation = rep.rotation; scp->timestamp = rep.timestamp; scp->config_timestamp = rep.configTimestamp; scp->nsizes = rep.nSizes; + scp->nrates = rep.nrateEnts; /* * Time to unpack the data from the server. */ /* - * First comes the size information + * First the size information */ - psize = (xScreenSizes *) data; for (i = 0; i < rep.nSizes; i++) { - ssp[i].width = psize[i].widthInPixels; - ssp[i].height = psize[i].heightInPixels; - ssp[i].mwidth = psize[i].widthInMillimeters; - ssp[i].mheight = psize[i].heightInMillimeters; - ssp[i].group = psize[i].visualGroup; + _XReadPad (dpy, (char *) &size, SIZEOF (xScreenSizes)); + + ssp[i].width = size.widthInPixels; + ssp[i].height = size.heightInPixels; + ssp[i].mwidth = size.widthInMillimeters; + ssp[i].mheight = size.heightInMillimeters; } /* - * Next comes the visual groups + * And the rates */ - - data32 = (CARD32 *) &psize[i]; - - for (i = 0; i < rep.nVisualGroups; i++) { - vgp[i].visuals = vgpp; - vgp[i].nvisuals = (int) *data32++; - for (j = 0; j < vgp->nvisuals; j++) { - *vgpp = XRRVisualIDToVisual(dpy, snum, (VisualID) *data32++); - vgpp += 1; - } - } - - - data16 = (CARD16 *) data32; - - for (i = 0; i < rep.nGroupsOfVisualGroups; i++) { - gvgp[i].groups = gp; - gvgp[i].ngroups = (int) *data16++; - for (j = 0; j < gvgp[i].ngroups; j++) { - gvgp[i].groups[j] = &vgp[*data16++]; - gp += 1; - } - } - + _XRead16Pad (dpy, rates, 2 /* SIZEOF (CARD16) */ * rep.nrateEnts); + + /* + * Skip any extra data + */ + if (nbytes > nbytesRead) + _XEatData (dpy, (unsigned long) (nbytes - nbytesRead)); + return (XRRScreenConfiguration *)(scp); } + +XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, Window window) +{ + XRRScreenConfiguration *config; + LockDisplay (dpy); + config = _XRRGetScreenInfo(dpy, window); + UnlockDisplay (dpy); + SyncHandle (); + return config; +} + -void XRRFreeScreenInfo (XRRScreenConfiguration *config) +void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config) { Xfree (config); } + -void XRRScreenChangeSelectInput (Display *dpy, Window window, Bool enable) +/* + * in protocol version 0.1, routine added to allow selecting for new events. + */ + +void XRRSelectInput (Display *dpy, Window window, int mask) { XExtDisplayInfo *info = XRRFindDisplay (dpy); - xRRScreenChangeSelectInputReq *req; + xRRSelectInputReq *req; RRSimpleCheckExtension (dpy, info); LockDisplay (dpy); - GetReq (RRScreenChangeSelectInput, req); + GetReq (RRSelectInput, req); req->reqType = info->codes->major_opcode; - req->randrReqType = X_RRScreenChangeSelectInput; + req->randrReqType = X_RRSelectInput; req->window = window; - req->enable = xFalse; - if (enable) req->enable = xTrue; + req->enable = 0; + if (mask) req->enable = mask; UnlockDisplay (dpy); SyncHandle (); return; } -Status XRRSetScreenConfig (Display *dpy, - XRRScreenConfiguration *config, - Drawable draw, - int size_index, - int visual_group_index, - Rotation rotation, Time timestamp) +Status XRRSetScreenConfigAndRate (Display *dpy, + XRRScreenConfiguration *config, + Drawable draw, + int size_index, + Rotation rotation, + short rate, + Time timestamp) { XExtDisplayInfo *info = XRRFindDisplay (dpy); xRRSetScreenConfigReply rep; - xRRSetScreenConfigReq *req; + XRandRInfo *xrri; + int major, minor; RRCheckExtension (dpy, info, 0); + /* Make sure has_rates is set */ + if (!XRRQueryVersion (dpy, &major, &minor)) + return 0; + LockDisplay (dpy); - GetReq (RRSetScreenConfig, req); - req->reqType = info->codes->major_opcode; - req->randrReqType = X_RRSetScreenConfig; - req->drawable = draw; - req->sizeID = size_index; - req->visualGroupID = visual_group_index; - req->rotation = rotation; - req->timestamp = timestamp; - req->configTimestamp = config->config_timestamp; + xrri = (XRandRInfo *) info->data; + if (xrri->has_rates) + { + xRRSetScreenConfigReq *req; + GetReq (RRSetScreenConfig, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRSetScreenConfig; + req->drawable = draw; + req->sizeID = size_index; + req->rotation = rotation; + req->timestamp = timestamp; + req->configTimestamp = config->config_timestamp; + req->rate = rate; + } + else + { + xRR1_0SetScreenConfigReq *req; + GetReq (RR1_0SetScreenConfig, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRSetScreenConfig; + req->drawable = draw; + req->sizeID = size_index; + req->rotation = rotation; + req->timestamp = timestamp; + req->configTimestamp = config->config_timestamp; + } + (void) _XReply (dpy, (xReply *) &rep, 0, xTrue); if (rep.status == RRSetConfigSuccess) { @@ -464,9 +668,66 @@ config->screen = ScreenOfDisplay (dpy, XRRRootToScreen(dpy, rep.root)); config->current_size = size_index; config->current_rotation = rotation; - config->current_visual_group = visual_group_index; } UnlockDisplay (dpy); SyncHandle (); return(rep.status); +} + +Status XRRSetScreenConfig (Display *dpy, + XRRScreenConfiguration *config, + Drawable draw, + int size_index, + Rotation rotation, Time timestamp) +{ + return XRRSetScreenConfigAndRate (dpy, config, draw, size_index, + rotation, 0, timestamp); +} + +int XRRUpdateConfiguration(XEvent *event) +{ + XRRScreenChangeNotifyEvent *scevent; + XConfigureEvent *rcevent; + Display *dpy = event->xany.display; + XExtDisplayInfo *info; + XRandRInfo *xrri; + int snum; + + /* first, see if it is a vanilla configure notify event */ + if (event->type == ConfigureNotify) { + rcevent = (XConfigureEvent *) event; + snum = XRRRootToScreen(dpy, rcevent->window); + dpy->screens[snum].width = rcevent->width; + dpy->screens[snum].height = rcevent->height; + return 1; + } + + info = XRRFindDisplay(dpy); + RRCheckExtension (dpy, info, 0); + + switch (event->type - info->codes->first_event) { + case RRScreenChangeNotify: + scevent = (XRRScreenChangeNotifyEvent *) event; + snum = XRRRootToScreen(dpy, + ((XRRScreenChangeNotifyEvent *) event)->root); + dpy->screens[snum].width = scevent->width; + dpy->screens[snum].height = scevent->height; + dpy->screens[snum].mwidth = scevent->mwidth; + dpy->screens[snum].mheight = scevent->mheight; + XRenderSetSubpixelOrder (dpy, snum, scevent->subpixel_order); + break; + default: + return 0; + } + xrri = (XRandRInfo *) info->data; + /* + * so the next time someone wants some data, it will be fetched; + * it might be better to force the round trip immediately, but + * I dislike pounding the server simultaneously when not necessary + */ + if (xrri->config[snum] != NULL) { + XFree (xrri->config[snum]); + xrri->config[snum] = NULL; + } + return 1; } Index: xc/lib/Xrandr/Xrandr.h diff -u xc/lib/Xrandr/Xrandr.h:1.8 xc/lib/Xrandr/Xrandr.h:1.11 --- xc/lib/Xrandr/Xrandr.h:1.8 Fri Nov 23 18:26:38 2001 +++ xc/lib/Xrandr/Xrandr.h Mon Oct 14 14:01:39 2002 @@ -1,7 +1,8 @@ /* - * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.8 2001/11/23 23:26:38 keithp Exp $ + * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.11 2002/10/14 18:01:39 keithp Exp $ * * Copyright © 2000 Compaq Computer Corporation, Inc. + * Copyright © 2002 Hewlett-Packard Company, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -9,18 +10,18 @@ * copyright notice and this permission notice appear in supporting * documentation, and that the name of Compaq not be used in advertising or * publicity pertaining to distribution of the software without specific, - * written prior permission. Compaq makes no representations about the + * written prior permission. HP makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * - * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ * 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. * - * Author: Jim Gettys, Compaq Computer Corporation + * Author: Jim Gettys, HP Labs, HP. */ #ifndef _XRANDR_H_ @@ -32,24 +33,14 @@ _XFUNCPROTOBEGIN -typedef struct { - int nvisuals; - Visual **visuals; -} XRRVisualGroup; - -typedef struct { - int ngroups; - XRRVisualGroup **groups; -} XRRGroupOfVisualGroup; typedef struct { int width, height; int mwidth, mheight; - int group; } XRRScreenSize; /* - * Events + * Events. */ typedef struct { @@ -59,10 +50,10 @@ Display *display; /* Display the event was read from */ Window window; /* window which selected for this event */ Window root; /* Root window for changed screen */ - Time timestamp; - Time config_timestamp; + Time timestamp; /* when the screen change occurred */ + Time config_timestamp; /* when the last configuration change */ SizeID size_index; - VisualGroupID visual_group_index; + SubpixelOrder subpixel_order; Rotation rotation; int width; int height; @@ -70,11 +61,11 @@ int mheight; } XRRScreenChangeNotifyEvent; + /* internal representation is private to the library */ typedef struct _XRRScreenConfiguration XRRScreenConfiguration; Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep); - Status XRRQueryVersion (Display *dpy, int *major_versionp, int *minor_versionp); @@ -82,31 +73,78 @@ XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, Drawable draw); -void XRRFreeScreenInfo (XRRScreenConfiguration *config); +void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config); +/* + * Note that screen configuration changes are only permitted if the client can + * prove it has up to date configuration information. We are trying to + * insist that it become possible for screens to change dynamically, so + * we want to ensure the client knows what it is talking about when requesting + * changes. + */ Status XRRSetScreenConfig (Display *dpy, XRRScreenConfiguration *config, Drawable draw, int size_index, - int visual_group_index, Rotation rotation, Time timestamp); -XRRScreenSize *XRRSizes(XRRScreenConfiguration *config, int *nsizes); +/* added in v1.1, sorry for the lame name */ +Status XRRSetScreenConfigAndRate (Display *dpy, + XRRScreenConfiguration *config, + Drawable draw, + int size_index, + Rotation rotation, + short rate, + Time timestamp); -void XRRScreenChangeSelectInput (Display *dpy, Window window, Bool enable); -Visual *XRRVisualIDToVisual(Display *dpy, int screen, VisualID id); +Rotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation); -int XRRVisualToDepth(Display *dpy, Visual *visual); +Time XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp); -Rotation XRRRotations(XRRScreenConfiguration *config, Rotation *current_rotation); +XRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes); -Time XRRTimes (XRRScreenConfiguration *config, Time *config_timestamp); +short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates); -SizeID XRRCurrentConfig (XRRScreenConfiguration *config, VisualGroupID *visual_group, Rotation *rotation); +SizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, + Rotation *rotation); +short XRRConfigCurrentRate (XRRScreenConfiguration *config); + int XRRRootToScreen(Display *dpy, Window root); + +/* + * returns the screen configuration for the specified screen; does a lazy + * evalution to delay getting the information, and caches the result. + * These routines should be used in preference to XRRGetScreenInfo + * to avoid unneeded round trips to the X server. These are new + * in protocol version 0.1. + */ + + +XRRScreenConfiguration *XRRScreenConfig(Display *dpy, int screen); +XRRScreenConfiguration *XRRConfig(Screen *screen); +void XRRSelectInput(Display *dpy, Window window, int mask); + +/* + * the following are always safe to call, even if RandR is not implemented + * on a screen + */ + + +Rotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation); +XRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes); +short *XRRRates (Display *dpy, int screen, int sizeID, int *nrates); +Time XRRTimes (Display *dpy, int screen, Time *config_timestamp); + + +/* + * intended to take RRScreenChangeNotify, or + * ConfigureNotify (on the root window) + * returns 1 if it is an event type it understands, 0 if not + */ +int XRRUpdateConfiguration(XEvent *event); _XFUNCPROTOEND Index: xc/lib/Xrandr/Xrandr.man diff -u /dev/null xc/lib/Xrandr/Xrandr.man:1.3 --- /dev/null Thu Feb 27 12:27:35 2003 +++ xc/lib/Xrandr/Xrandr.man Tue Oct 8 09:00:48 2002 @@ -0,0 +1,319 @@ +.\" +.\" $XFree86: xc/lib/Xrandr/Xrandr.man,v 1.3 2002/10/08 13:00:48 keithp Exp $ +.\" +.\" Copyright © 2002 Hewlett-Packard Company +.\" +.\" 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 Hewlett-Packard Company not be used in +.\" advertising or publicity pertaining to distribution of the software without +.\" specific, written prior permission. Hewlett Packard Company makes no +.\" representations about the suitability of this software for any purpose. It +.\" is provided "as is" without express or implied warranty. +.\" +.\" Hewlett-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. +.\" +.de TQ +.br +.ns +.TP \\$1 +.. +.TH XRANDR 3 "Version 1.0" "XFree86" + +.SH NAME + Xrandr \- X Resize, Rotate and Reflection extension. +.SH SYNTAX +\&#include +.nf +.sp +Bool XRRQueryExtension \^(\^Display *\fIdpy\fP, + int *\fIevent_basep\fP, int *\fIerror_basep\fP\^); +.sp +Status XRRQueryVersion \^(\^Display *\fIdpy\fP, + int *\fImajor_versionp\fP, + int *\fIminor_versionp\fP\^); +.sp +XRRScreenConfiguration *XRRGetScreenInfo \^(\^Display *dpy, + Drawable \fIdraw\fP\^); +.sp +void XRRFreeScreenConfigInfo \^(\^ + \fIXRRScreenConfiguration *config\fP\^); +.sp +Status XRRSetScreenConfig \^(\^Display *\fIdpy\fP, + XRRScreenConfiguration *\fIconfig\fP, + Drawable \fIdraw\fP, + int \fIsize_index\fP, + Rotation \fIrotation\fP, + Time \fItimestamp\fP\^); +.sp +Rotation XRRConfigRotations\^(\^ + XRRScreenConfiguration *\fIconfig\fP, + Rotation *\fIcurrent_rotation\fP\^); +.sp +Time XRRConfigTimes \^(\^ + XRRScreenConfiguration *\fIconfig\fP, + Time *\fIconfig_timestamp\fP\^); +.sp +XRRScreenSize *XRRConfigSizes\^(\^ + XRRScreenConfiguration *\fIconfig\fP, + int *\fInsizes\fP\^); +.sp +SizeID XRRConfigCurrentConfiguration \^(\^ + XRRScreenConfiguration *\fIconfig\fP, + Rotation *\fIrotation\fP\^); +.sp +int XRRRootToScreen\^(\^ + Display *\fIdpy\fP, + Window \fIroot\fP\^); +.sp +XRRScreenConfiguration *XRRScreenConfig\^(\^ + Display *\fIdpy\fP, int \fIscreen\fP\^); +.sp +XRRScreenConfiguration *XRRConfig\^(\^Screen *\fIscreen\fP\^); +.sp +void XRRSelectInput\^(\^Display *\fIdpy\fP, Window \fIwindow\fP, int \fImask\fP\^); +.sp +/* + * intended to take RRScreenChangeNotify, or + * ConfigureNotify \^(\^\fIon the root window\fP\^) + * returns 1 if it is an event type it understands, 0 if not + */ +int XRRUpdateConfiguration\^(\^XEvent *\fIevent\fP^); +.sp +/* + * the following are always safe to call, even if RandR is + * not implemented on a screen + */ +.br +Rotation XRRRotations\^(\^ + Display *\fIdpy\fP, int \fIscreen\fP, + Rotation *\fIcurrent_rotation\fP\^); +.sp +XRRScreenSize *XRRSizes\^(\^Display *\fIdpy\fP, + int \fIscreen\fP, int *\fInsizes\fP\^); +.sp +Time XRRTimes \^(\^Display *\fIdpy\fP, int \fIscreen\fP, Time *\fIconfig_timestamp\fP\^); +.fi +.SH ARGUMENTS +.IP \fIdisplay\fP 1i +Specifies the connection to the X server. +.IP \fIscreen\fP 1i +Specifies which screen. +.IP \fIdraw\fP 1i +Specifies the screen. +.IP \fIrotation\fP 1i +Specifies the rotations or reflections possible of the screen. +.IP \fIcurrent_rotation\fP 1i +Specifies the current rotations and reflection of the screen. +.IP \fItimestamp\fP 1i +Specifies the server timestamp. +.IP \fIconfig_timestamp\fP 1i +Specifies the timestamp when the screen was last (re)configured. +.IP \fIconfig\fP 1i +Specifies the screen configuration being used. +.IP \fIsizes\fP 1i +Specifies the array of sizes supported. + +.SH DATATYPES + +.PP +.B Rotations/Reflections +.PP +Can be any of: +.nf +#define RR_Rotate_0 1 +#define RR_Rotate_90 2 +#define RR_Rotate_180 4 +#define RR_Rotate_270 8 + +/* new in 1.0 protocol, to allow reflection of screen */ +/* reflection is applied after rotation */ + +#define RR_Reflect_X 16 +#define RR_Reflect_Y 32 + + +typedef struct { + int width, height; + int mwidth, mheight; +} XRRScreenSize; + +typedef struct { + int type; /* event base */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* window which selected for this event */ + Window root; /* Root window for changed screen */ + Time timestamp; /* when the screen change occurred */ + Time config_timestamp; /* when the last configuration change */ + SizeID size_index; + SubpixelOrder subpixel_order; + Rotation rotation; + int width; + int height; + int mwidth; + int mheight; +} XRRScreenChangeNotifyEvent; +.sp +.fi +.B XRRScreenSize +structure contains a possible root size in pixels and in millimeters. +.B XRRScreenChangeNotifyEvent +Is sent to a client that has requested notification whenever the screen +configuration is changed. + +.B XRRScreenConfiguration +This is an opaque data type containing the configuration information +for a screen. + +.B Timestamps +.PP +Time stamps are included and must be used to ensure the client is playing +with a full deck: the screen may change properties +on the fly and this ensures its knowledge of the configuration is up to date. +This is to help issues when screens may become hot-pluggable in the future. + +.SH DESCRIPTION +.B Xrandr +is a simple library designed to interface the X Resize and Rotate +Extension. This allows clients to change the size and rotation of the +root window of a screen, along with the ability to reflect the screen +about either axis (if supported by the impementation). Rotation and +reflection may be implemented by software and may result in slower +performance if rotation and reflection are implemented in this fashion +(as are all implementations as of October 2002). +.PP +The Xrandr library does some minimal caching to avoid roundtrips to +provide clients frequently used information. See "The X Resize and +Rotate Extension" for a detailed description; also note that depth +switching, as described in the document is not implemented, and may +(or may not) ever be implemented, as display memory is growing rapidly, +and toolkits are already beginning to support migration, mitigating the +need for depth switching. If it is implemented in the future, we +expect to do so via an upward compatible extension to the +current library/protocol; functionality described here should continue +to work. +.PP +Rotation and reflection and how they interact can be confusing. In +Randr, the coordinate system is rotated in a counter-clockwise +direction relative to the normal orientation. Reflection is along the +window system coordinate system, not the physical screen X and Y axis, +so that rotation and reflection do not interact. The other way to +consider reflection is to is specified in the "normal" orientation, +before rotation, if you find the other way confusing. +.PP +The +.B XRRScreenChangeNotify +event is sent to clients that ask to be informed whenever the root window +configuration changes. Configuration changes may include resolution, +physical size, subpixel order (see XRender(3)), and rotation. Note +that changes to any or all of these could occur due to external events +(user control in the X server, a different monitor/flat panel display +being hot-plugged) and is not only the result of a protocol/library +request to the X server. +.PP +Additionally, to eliminate a potential race condition, +this event may be generated +immediately upon selecting for notification if the screen has changed +since the client of Xrandr connected to the X server, to enable +reliable screen resolution changing when a user may log in and +change the configuration while one or many clients are starting up. +.PP +.B Xlib notification +.PP +Clients must call back into Xlib using +.B XRRUpdateConfiguration +when screen configuration change notify events are generated +(or root window configuration changes occur, to update Xlib's +view of the resolution, size, rotation, reflection or subpixel order. +Generally, toolkits will perform this operation on behalf of applications; +we did not want to change display structure data behind the back of toolkits, +as in multithreaded clients, various race conditions might occur. +Toolkits should provide clients some mechanism for notification of +screen change, of couse. + +.SH FUNCTIONS +There are two classes of interfaces: those which can be safely called +even if RandR is not implemented on a screen (to make common idioms not +dependent on the server having support), and those which will return +errors if the extension is not present. +.PP +.B XRRRotations +returns both the possible set of rotations/reflections supported +(as a bitmask) as the value of the function, along with the current +rotation/reflection of the screen. +.PP +.B XRRSizes +returns the size and a pointer to the current sizes supported by +the specified screen. The first size specified is the default size +of the server. If RandR is not supported, it returns 0 for +the number of sizes. +.PP +.B XRRTimes +returns the time last reported by the server along with the +timestamp the last configuration changed. +If the configuration has changed since the client last updated +its view of the server time, requests to change the configuration +will fail until the client has an up to date timestamp. +.PP +.B XRRRootToScreen +returns the screen number given a root window (for example, from +an \fBXRRScreenChangeNotifyEvent\fI. +.PP +The rest of the functions will fail if applied to screens not +implementing the RandR extension. +.B XRRSetScreenConfig +sets the screen size and rotation and reflection to the desired +values on the screen specified by \fIdraw\fP, or returns a +.B BadValue +error. +\fIsize_index\fP specifies which size configuration is to be used, +\fIrotation\fP specifies which rotatation or reflection is to +be used (or a +.B BadValue +error is returned). +The \fItimestamp\fP is used by the server to make sure the client +has up to date configuration information. Status is returned +to indicate success or failure; a client must refresh its configuration +information if it fails and try the call again (by calling +\fBXRRGetScreenInfo\fP). +.PP +.B XRRConfigRotations, +.B XRRConfigSizes, +.B XRRConfigCurrentConfiguration, +and +.B XRRConfigTimes +are used to get specific configuration information out of a screen +configuration. +.PP +.B XRRGetScreenInfo +Returns a screen configuration for later use; the information is +private to the library. +Call +.B XRRFreeScreenConfigInfo +to free this information when you are finished with it. +It forces a round trip to the server. + +Other functions include: +.B XRRQueryExtension +which returns the event and error base codes, +.B XRRQueryVersion +, which returns the current version of the extension (this information +is cached by the library). +.SH RESTRICTIONS +.B Xrandr +will remain upward compatible after the current 1.0 release. +.SH "SEE ALSO" +Xrender(3) +.SH AUTHOR +Jim Gettys, HP, and Keith Packard, member of the XFree86 Project, Inc. and +HP. Index: xc/lib/Xrandr/Xrandrint.h diff -u xc/lib/Xrandr/Xrandrint.h:1.2 xc/lib/Xrandr/Xrandrint.h:1.4 --- xc/lib/Xrandr/Xrandrint.h:1.2 Thu Jun 7 11:33:43 2001 +++ xc/lib/Xrandr/Xrandrint.h Mon Oct 14 14:01:40 2002 @@ -1,26 +1,28 @@ /* - * $XFree86: xc/lib/Xrandr/Xrandrint.h,v 1.2 2001/06/07 15:33:43 keithp Exp $ + * $XFree86: xc/lib/Xrandr/Xrandrint.h,v 1.4 2002/10/14 18:01:40 keithp Exp $ * - * Copyright © 2000 Compaq Computer Corporation, Inc. * + * Copyright © 2000, Compaq Computer Corporation, + * Copyright © 2002, Hewlett Packard, 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 Compaq not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Compaq makes no representations about the + * documentation, and that the name of Compaq or HP not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. HP makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * - * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ + * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP * 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. * - * Author: Jim Gettys, Compaq Computer Corporation, Inc. + * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. */ #ifndef _XRANDRINT_H_ @@ -41,27 +43,45 @@ #define RRCheckExtension(dpy,i,val) \ XextCheckExtension (dpy, i, XRRExtensionName, val) - #define RRSimpleCheckExtension(dpy,i) \ XextSimpleCheckExtension (dpy, i, XRRExtensionName) + +XExtDisplayInfo *XRRFindDisplay (Display *dpy); -XExtDisplayInfo * -XRRFindDisplay (Display *dpy); /* deliberately opaque internal data structure; can be extended, but not reordered */ struct _XRRScreenConfiguration { Screen *screen; /* the root window in GetScreenInfo */ - XRRVisualGroup *visual_group; - XRRGroupOfVisualGroup *groups_of_visual_groups; XRRScreenSize *sizes; Rotation rotations; Rotation current_rotation; int nsizes; int current_size; - int current_visual_group; + short current_rate; Time timestamp; Time config_timestamp; + int subpixel_order; /* introduced in randr v0.1 */ + short *rates; /* introduced in randr v1.1 */ + int nrates; }; + +/* + * if a configure notify on the root is recieved, or + * an XRRScreenChangeNotify is recieved, + * XRRUpdateConfiguration should be called to update the X library's + * view of the screen configuration; it will also invalidate the cache + * provided by XRRScreenConfig and XRRConfig, and force a round trip + * when next used. Returns invalid status if not an event type + * the library routine understand. + */ + +/* we cache one screen configuration/screen */ + +typedef struct _XRandRInfo { + XRRScreenConfiguration **config; + int major_version, minor_version; /* major_version = -1 means we don't know */ + Bool has_rates; /* Server supports refresh rates */ +} XRandRInfo; #endif /* _XRANDRINT_H_ */ Index: xc/lib/Xrender/Color.c diff -u /dev/null xc/lib/Xrender/Color.c:1.1 --- /dev/null Thu Feb 27 12:27:35 2003 +++ xc/lib/Xrender/Color.c Fri May 17 18:34:18 2002 @@ -0,0 +1,90 @@ +/* + * $XFree86: xc/lib/Xrender/Color.c,v 1.1 2002/05/17 22:34:18 keithp Exp $ + * + * Copyright © 2002 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 "Xrenderint.h" + +Status +XRenderParseColor(Display *dpy, char *spec, XRenderColor *def) +{ + + if (!strncmp (spec, "rgba:", 5)) + { + unsigned short elements[4]; + unsigned short *pShort; + int i, n; + char c; + + spec += 5; + /* + * Attempt to parse the value portion. + */ + pShort = elements; + for (i = 0; i < 4; i++, pShort++, spec++) { + n = 0; + *pShort = 0; + while (*spec != '/' && *spec != '\0') { + if (++n > 4) { + return 0; + } + c = *spec++; + *pShort <<= 4; + if (c >= '0' && c <= '9') + *pShort |= c - '0'; + /* assume string in lowercase + else if (c >= 'A' && c <= 'F') + *pShort |= c - ('A' - 10); + */ + else if (c >= 'a' && c <= 'f') + *pShort |= c - ('a' - 10); + else return 0; + } + if (n == 0) + return 0; + if (n < 4) { + *pShort = ((unsigned long)*pShort * 0xFFFF) / ((1 << n*4) - 1); + } + } + def->red = elements[0]; + def->green = elements[1]; + def->blue = elements[2]; + def->alpha = elements[3]; + } + else + { + XColor coreColor; + Colormap colormap; + + colormap = DefaultColormap (dpy, DefaultScreen (dpy)); + if (!XParseColor (dpy, colormap, spec, &coreColor)) + return 0; + def->red = coreColor.red; + def->green = coreColor.green; + def->blue = coreColor.blue; + def->alpha = 0xffff; + } + def->red = (def->red * def->alpha) / 65535; + def->green = (def->green * def->alpha) / 65535; + def->blue = (def->blue * def->alpha) / 65535; + return 1; +} Index: xc/lib/Xrender/Cursor.c diff -u /dev/null xc/lib/Xrender/Cursor.c:1.3 --- /dev/null Thu Feb 27 12:27:35 2003 +++ xc/lib/Xrender/Cursor.c Sun Nov 24 16:46:15 2002 @@ -0,0 +1,77 @@ +/* + * $XFree86: xc/lib/Xrender/Cursor.c,v 1.3 2002/11/24 21:46:15 tsi Exp $ + * + * Copyright © 2002 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 "Xrenderint.h" + +Cursor +XRenderCreateCursor (Display *dpy, + Picture source, + unsigned int x, + unsigned int y) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + Cursor cid; + xRenderCreateCursorReq *req; + + RenderCheckExtension (dpy, info, 0); + LockDisplay(dpy); + GetReq(RenderCreateCursor, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderCreateCursor; + req->cid = cid = XAllocID (dpy); + req->src = source; + req->x = x; + req->y = y; + + UnlockDisplay(dpy); + SyncHandle(); + return cid; +} + +Cursor +XRenderCreateAnimCursor (Display *dpy, + int ncursor, + XAnimCursor *cursors) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + Cursor cid; + xRenderCreateAnimCursorReq *req; + long len; + + RenderCheckExtension (dpy, info, 0); + LockDisplay(dpy); + GetReq(RenderCreateAnimCursor, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderCreateAnimCursor; + req->cid = cid = XAllocID (dpy); + + len = (long) ncursor * SIZEOF (xAnimCursorElt) >> 2; + SetReqLen (req, len, len); + len <<= 2; + Data32 (dpy, (long *) cursors, len); + + UnlockDisplay(dpy); + SyncHandle(); + return cid; +} Index: xc/lib/Xrender/Filter.c diff -u /dev/null xc/lib/Xrender/Filter.c:1.1 --- /dev/null Thu Feb 27 12:27:35 2003 +++ xc/lib/Xrender/Filter.c Wed Sep 25 22:56:52 2002 @@ -0,0 +1,150 @@ +/* + * $XFree86: xc/lib/Xrender/Filter.c,v 1.1 2002/09/26 02:56:52 keithp Exp $ + * + * Copyright © 2002 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 "Xrenderint.h" + +XFilters * +XRenderQueryFilters (Display *dpy, Drawable drawable) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + XRenderInfo *xri; + xRenderQueryFiltersReq *req; + xRenderQueryFiltersReply rep; + XFilters *filters; + char *name; + char len; + int i; + long nbytes, nbytesAlias, nbytesName; + + if (!XextHasExtension (info)) + return 0; + + if (!XRenderQueryFormats (dpy)) + return 0; + + xri = (XRenderInfo *) info->data; + if (xri->minor_version < 6) + return 0; + + LockDisplay (dpy); + GetReq (RenderQueryFilters, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderQueryFilters; + req->drawable = drawable; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) + { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + /* + * Compute total number of bytes for filter names + */ + nbytes = (long)rep.length << 2; + nbytesAlias = rep.numAliases * 2; + if (rep.numAliases & 1) + nbytesAlias += 2; + nbytesName = nbytes - nbytesAlias; + + /* + * Allocate one giant block for the whole data structure + */ + filters = Xmalloc (sizeof (XFilters) + + rep.numFilters * sizeof (char *) + + rep.numAliases * sizeof (short) + + nbytesName); + + if (!filters) + { + _XEatData (dpy, (unsigned long) rep.length << 2); + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + + /* + * Layout: + * XFilters + * numFilters char * pointers to filter names + * numAliases short alias values + * nbytesName char strings + */ + + filters->nfilter = rep.numFilters; + filters->nalias = rep.numAliases; + filters->filter = (char **) (filters + 1); + filters->alias = (short *) (filters->filter + rep.numFilters); + name = (char *) (filters->alias + rep.numAliases); + + /* + * Read the filter aliases + */ + _XRead16Pad (dpy, filters->alias, 2 * rep.numAliases); + + /* + * Read the filter names + */ + for (i = 0; i < rep.numFilters; i++) + { + int l; + _XRead (dpy, &len, 1); + l = len & 0xff; + filters->filter[i] = name; + _XRead (dpy, name, l); + name[l] = '\0'; + name += l + 1; + } + i = name - (char *) (filters->alias + rep.numAliases); + + if (i & 3) + _XEatData (dpy, 4 - (i & 3)); + + UnlockDisplay (dpy); + return filters; +} + +void +XRenderSetPictureFilter (Display *dpy, + Picture picture, + char *filter, + XFixed *params, + int nparams) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderSetPictureFilterReq *req; + int nbytes = strlen (filter); + + RenderSimpleCheckExtension (dpy, info); + LockDisplay(dpy); + GetReq(RenderSetPictureFilter, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderSetPictureFilter; + req->picture = picture; + req->nbytes = nbytes; + req->length += ((nbytes + 3) >> 2) + nparams; + Data (dpy, filter, nbytes); + Data32 (dpy, params, nparams << 2); + UnlockDisplay(dpy); + SyncHandle(); +} Index: xc/lib/Xrender/Glyph.c diff -u xc/lib/Xrender/Glyph.c:1.7 xc/lib/Xrender/Glyph.c:1.12 --- xc/lib/Xrender/Glyph.c:1.7 Wed Dec 26 20:16:00 2001 +++ xc/lib/Xrender/Glyph.c Tue Nov 5 18:22:35 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Glyph.c,v 1.7 2001/12/27 01:16:00 keithp Exp $ + * $XFree86: xc/lib/Xrender/Glyph.c,v 1.12 2002/11/05 23:22:35 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -125,6 +125,7 @@ GetReq(RenderFreeGlyphs, req); req->reqType = info->codes->major_opcode; req->renderReqType = X_RenderFreeGlyphs; + req->glyphset = glyphset; len = nglyphs; SetReqLen(req, len, len); len <<= 2; @@ -213,6 +214,7 @@ elt->deltay = yDst; memcpy ((char *) (elt + 1), string, nchar); } +#undef MAX_8 UnlockDisplay(dpy); SyncHandle(); @@ -256,7 +258,7 @@ #define MAX_16 254 - len = SIZEOF(xGlyphElt) * ((nchar + MAX_8-1) / MAX_8) + nchar * 2; + len = SIZEOF(xGlyphElt) * ((nchar + MAX_16-1) / MAX_16) + nchar * 2; req->length += (len + 3)>>2; /* convert to number of 32-bit words */ @@ -291,6 +293,7 @@ elt->deltay = yDst; memcpy ((char *) (elt + 1), (char *) string, nchar * 2); } +#undef MAX_16 UnlockDisplay(dpy); SyncHandle(); @@ -335,7 +338,7 @@ #define MAX_32 254 - len = SIZEOF(xGlyphElt) * ((nchar + MAX_8-1) / MAX_8) + nchar * 4; + len = SIZEOF(xGlyphElt) * ((nchar + MAX_32-1) / MAX_32) + nchar * 4; req->length += (len + 3)>>2; /* convert to number of 32-bit words */ @@ -370,6 +373,7 @@ elt->deltay = yDst; memcpy ((char *) (elt + 1), (char *) string, nchar * 4); } +#undef MAX_32 UnlockDisplay(dpy); SyncHandle(); @@ -390,6 +394,7 @@ { XExtDisplayInfo *info = XRenderFindDisplay (dpy); xRenderCompositeGlyphs8Req *req; + GlyphSet glyphset; long len; long elen; xGlyphElt *elt; @@ -419,10 +424,19 @@ */ len = 0; +#define MAX_8 252 + + glyphset = elts[0].glyphset; for (i = 0; i < nelt; i++) { - if (elts[i].glyphset != req->glyphset) + /* + * Check for glyphset change + */ + if (elts[i].glyphset != glyphset) + { + glyphset = elts[i].glyphset; len += (SIZEOF (xGlyphElt) + 4) >> 2; + } nchars = elts[i].nchars; /* * xGlyphElt must be aligned on a 32-bit boundary; this is @@ -434,26 +448,24 @@ } req->length += len; - /* - * If the entire request does not fit into the remaining space in the - * buffer, flush the buffer first. - */ - if (dpy->bufptr + (len << 2) > dpy->bufmax) - _XFlush (dpy); - + /* + * Send the glyphs + */ + glyphset = elts[0].glyphset; for (i = 0; i < nelt; i++) { /* * Switch glyphsets */ - if (elts[i].glyphset != req->glyphset) + if (elts[i].glyphset != glyphset) { + glyphset = elts[i].glyphset; BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt)); elt->len = 0xff; elt->deltax = 0; elt->deltay = 0; - Data32(dpy, &elts[i].glyphset, 4); + Data32(dpy, &glyphset, 4); } nchars = elts[i].nchars; xDst = elts[i].xOff; @@ -461,17 +473,20 @@ chars = elts[i].chars; while (nchars) { + int this_chars = nchars > MAX_8 ? MAX_8 : nchars; + BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt)) - elt->len = nchars > MAX_8 ? MAX_8 : nchars; + elt->len = this_chars; elt->deltax = xDst; elt->deltay = yDst; xDst = 0; yDst = 0; - Data (dpy, chars, elt->len); - nchars -= elt->len; - chars += elt->len; + Data (dpy, chars, this_chars); + nchars -= this_chars; + chars += this_chars; } } +#undef MAX_8 UnlockDisplay(dpy); SyncHandle(); @@ -492,6 +507,7 @@ { XExtDisplayInfo *info = XRenderFindDisplay (dpy); xRenderCompositeGlyphs16Req *req; + GlyphSet glyphset; long len; long elen; xGlyphElt *elt; @@ -521,10 +537,19 @@ */ len = 0; +#define MAX_16 254 + + glyphset = elts[0].glyphset; for (i = 0; i < nelt; i++) { - if (elts[i].glyphset != req->glyphset) + /* + * Check for glyphset change + */ + if (elts[i].glyphset != glyphset) + { + glyphset = elts[i].glyphset; len += (SIZEOF (xGlyphElt) + 4) >> 2; + } nchars = elts[i].nchars; /* * xGlyphElt must be aligned on a 32-bit boundary; this is @@ -536,26 +561,21 @@ } req->length += len; - /* - * If the entire request does not fit into the remaining space in the - * buffer, flush the buffer first. - */ - if (dpy->bufptr + (len << 2) > dpy->bufmax) - _XFlush (dpy); - + glyphset = elts[0].glyphset; for (i = 0; i < nelt; i++) { /* * Switch glyphsets */ - if (elts[i].glyphset != req->glyphset) + if (elts[i].glyphset != glyphset) { + glyphset = elts[i].glyphset; BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt)); elt->len = 0xff; elt->deltax = 0; elt->deltay = 0; - Data32(dpy, &elts[i].glyphset, 4); + Data32(dpy, &glyphset, 4); } nchars = elts[i].nchars; xDst = elts[i].xOff; @@ -563,17 +583,21 @@ chars = elts[i].chars; while (nchars) { + int this_chars = nchars > MAX_16 ? MAX_16 : nchars; + int this_bytes = this_chars * 2; + BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt)) - elt->len = nchars > MAX_16 ? MAX_16 : nchars; + elt->len = this_chars; elt->deltax = xDst; elt->deltay = yDst; xDst = 0; yDst = 0; - Data16 (dpy, chars, elt->len * 2); - nchars -= elt->len; - chars += elt->len; + Data16 (dpy, chars, this_bytes); + nchars -= this_chars; + chars += this_chars; } } +#undef MAX_16 UnlockDisplay(dpy); SyncHandle(); @@ -594,6 +618,7 @@ { XExtDisplayInfo *info = XRenderFindDisplay (dpy); xRenderCompositeGlyphs32Req *req; + GlyphSet glyphset; long len; long elen; xGlyphElt *elt; @@ -607,6 +632,7 @@ RenderSimpleCheckExtension (dpy, info); LockDisplay(dpy); + GetReq(RenderCompositeGlyphs32, req); req->reqType = info->codes->major_opcode; req->renderReqType = X_RenderCompositeGlyphs32; @@ -622,37 +648,41 @@ * Compute the space necessary */ len = 0; + +#define MAX_32 254 + glyphset = elts[0].glyphset; for (i = 0; i < nelt; i++) { - if (elts[i].glyphset != req->glyphset) + /* + * Check for glyphset change + */ + if (elts[i].glyphset != glyphset) + { + glyphset = elts[i].glyphset; len += (SIZEOF (xGlyphElt) + 4) >> 2; + } nchars = elts[i].nchars; elen = SIZEOF(xGlyphElt) * ((nchars + MAX_32) / MAX_32) + nchars *4; len += (elen + 3) >> 2; } req->length += len; - /* - * If the entire request does not fit into the remaining space in the - * buffer, flush the buffer first. - */ - - if (dpy->bufptr + (len << 2) > dpy->bufmax) - _XFlush (dpy); + glyphset = elts[0].glyphset; for (i = 0; i < nelt; i++) { /* * Switch glyphsets */ - if (elts[i].glyphset != req->glyphset) + if (elts[i].glyphset != glyphset) { + glyphset = elts[i].glyphset; BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt)); elt->len = 0xff; elt->deltax = 0; elt->deltay = 0; - Data32(dpy, &elts[i].glyphset, 4); + Data32(dpy, &glyphset, 4); } nchars = elts[i].nchars; xDst = elts[i].xOff; @@ -660,17 +690,20 @@ chars = elts[i].chars; while (nchars) { + int this_chars = nchars > MAX_32 ? MAX_32 : nchars; + int this_bytes = this_chars * 4; BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt)) - elt->len = nchars > MAX_32 ? MAX_32 : nchars; + elt->len = this_chars; elt->deltax = xDst; elt->deltay = yDst; xDst = 0; yDst = 0; - Data32 (dpy, chars, elt->len * 4); - nchars -= elt->len; - chars += elt->len; + DataInt32 (dpy, chars, this_bytes); + nchars -= this_chars; + chars += this_chars; } } +#undef MAX_32 UnlockDisplay(dpy); SyncHandle(); Index: xc/lib/Xrender/Imakefile diff -u xc/lib/Xrender/Imakefile:1.3 xc/lib/Xrender/Imakefile:1.11 --- xc/lib/Xrender/Imakefile:1.3 Mon Nov 20 02:13:11 2000 +++ xc/lib/Xrender/Imakefile Thu Nov 14 16:01:18 2002 @@ -1,14 +1,90 @@ -XCOMM $XFree86: xc/lib/Xrender/Imakefile,v 1.3 2000/11/20 07:13:11 keithp Exp $ +XCOMM $XFree86: xc/lib/Xrender/Imakefile,v 1.11 2002/11/14 21:01:18 tsi Exp $ +#ifdef UseInstalled +XCOMM Allow for builds against old installed bits. Note that this requires +XCOMM that additional files be copied (or linked) into this directory. See +XCOMM NONSTANDARD_HEADERS below. + +#ifndef SharedLibXrender +#define SharedLibXrender YES +#endif + +#ifndef NormalLibXrender +#define NormalLibXrender (!SharedLibXrender | ForceNormalLib) +#endif + +#ifndef DebugLibXrender +#define DebugLibXrender NO +#endif + +#ifndef ProfileLibXrender +#define ProfileLibXrender NO +#endif + +#undef SharedXrenderRev +#define SharedXrenderRev 1.1 +SOXRENDERREV = SharedXrenderRev + +#if SharedLibXrender +#define SharedXft1Rev 1.2 +SharedLibReferences(XFT1,Xft,$(XFT1SRC),SOXFT1REV,SharedXft1Rev) +#else +ProjectUnsharedLibReferences(XFT1,Xft,$(XFT1SRC),BuildLibDir) +#endif + +#undef LinkBuildLibrary +#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\ + RemoveFile($(BUILDLIBDIR)/lib) @@\ + cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib . +#undef _LinkBuildLibrary +#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) + +#undef LinkBuildLibraryMaybe +#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\ + @if doit; then (set -x; \ @@\ + RemoveFile($(BUILDLIBDIR)/lib); \ @@\ + cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi + +#undef LdPreLibs +#define LdPreLibs -L$(BUILDLIBDIR) LdPreLib XLdPreLibs + +LDPRELIBS = LdPreLibs + +NONSTANDARD_HEADERS = extutil.h region.h render.h renderproto.h + +all:: $(NONSTANDARD_HEADERS) +includes depend:: $(NONSTANDARD_HEADERS) + +$(NONSTANDARD_HEADERS): + @echo Header file $@ is missing. + +#ifdef XBuildIncDir +RENDERCLEANDIR = $(BUILDINCROOT) +#else +RENDERCLEANDIR = $(BUILDINCDIR) +#endif + +clean:: + $(RM) -r $(RENDERCLEANDIR) + +#endif + #define DoNormalLib NormalLibXrender #define DoSharedLib SharedLibXrender #define DoDebugLib DebugLibXrender #define DoProfileLib ProfileLibXrender #define LibName Xrender #define SoRev SOXRENDERREV + +#ifdef XBuildIncDir #define IncSubdir X11 #define IncSubSubdir extensions +RENDERINCDIR = $(BUILDINCDIR) +#else +#define IncSubdir extensions +RENDERINCDIR = $(BUILDINCROOT) +#endif #include @@ -21,26 +97,48 @@ #endif DEFINES = $(ALLOC_DEFINES) +#ifdef UseInstalled + INCLUDES = -I$(RENDERINCDIR) -I$(INCROOT)/X11 -I$(INCROOT)/X11/extensions +#else INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) +#endif SRCS = Xrender.c \ - Composite.c \ - Glyph.c \ - Picture.c \ - FillRect.c \ - FillRects.c - + Color.c \ + Composite.c \ + Cursor.c \ + Glyph.c \ + Picture.c \ + FillRect.c \ + FillRects.c \ + Filter.c \ + Poly.c \ + Trap.c \ + Tri.c + OBJS = Xrender.o \ - Composite.o \ - Glyph.o \ - Picture.o \ - FillRect.o \ - FillRects.o + Color.o \ + Composite.o \ + Cursor.o \ + Glyph.o \ + Picture.o \ + FillRect.o \ + FillRects.o \ + Filter.o \ + Poly.o \ + Trap.o \ + Tri.o LINTLIBS = $(LINTXLIB) -HEADERS = Xrender.h +HEADERS = Xrender.h $(NONSTANDARD_HEADERS) #include DependTarget() + +#ifndef clean +/* Generate a distclean target */ +distclean:: clean + RemoveFile(Makefile) +#endif Index: xc/lib/Xrender/Picture.c diff -u xc/lib/Xrender/Picture.c:1.8 xc/lib/Xrender/Picture.c:1.9 --- xc/lib/Xrender/Picture.c:1.8 Sun Dec 16 13:27:55 2001 +++ xc/lib/Xrender/Picture.c Wed Sep 25 22:56:52 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Picture.c,v 1.8 2001/12/16 18:27:55 keithp Exp $ + * $XFree86: xc/lib/Xrender/Picture.c,v 1.9 2002/09/26 02:56:52 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -194,6 +194,34 @@ UnlockDisplay(dpy); SyncHandle(); } + +void +XRenderSetPictureTransform (Display *dpy, + Picture picture, + XTransform *transform) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderSetPictureTransformReq *req; + + RenderSimpleCheckExtension (dpy, info); + LockDisplay (dpy); + GetReq(RenderSetPictureTransform, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderSetPictureTransform; + req->picture = picture; + req->transform.matrix11 = transform->matrix[0][0]; + req->transform.matrix12 = transform->matrix[0][1]; + req->transform.matrix13 = transform->matrix[0][2]; + req->transform.matrix21 = transform->matrix[1][0]; + req->transform.matrix22 = transform->matrix[1][1]; + req->transform.matrix23 = transform->matrix[1][2]; + req->transform.matrix31 = transform->matrix[2][0]; + req->transform.matrix32 = transform->matrix[2][1]; + req->transform.matrix33 = transform->matrix[2][2]; + UnlockDisplay(dpy); + SyncHandle(); + +} void XRenderFreePicture (Display *dpy, Index: xc/lib/Xrender/Poly.c diff -u /dev/null xc/lib/Xrender/Poly.c:1.7 --- /dev/null Thu Feb 27 12:27:35 2003 +++ xc/lib/Xrender/Poly.c Tue Jun 4 19:22:36 2002 @@ -0,0 +1,300 @@ +/* + * $XFree86: xc/lib/Xrender/Poly.c,v 1.7 2002/06/04 23:22:36 keithp Exp $ + * + * Copyright © 2002 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 "Xrenderint.h" + +typedef struct _Edge Edge; + +struct _Edge { + XLineFixed edge; + XFixed current_x; + Bool clockWise; + Edge *next, *prev; +}; + +static int +CompareEdge (const void *o1, const void *o2) +{ + const Edge *e1 = o1, *e2 = o2; + + return e1->edge.p1.y - e2->edge.p1.y; +} + +static XFixed +XRenderComputeX (XLineFixed *line, XFixed y) +{ + XFixed dx = line->p2.x - line->p1.x; + double ex = (double) (y - line->p1.y) * (double) dx; + XFixed dy = line->p2.y - line->p1.y; + + return (XFixed) line->p1.x + (XFixed) (ex / dy); +} + +static double +XRenderComputeInverseSlope (XLineFixed *l) +{ + return (XFixedToDouble (l->p2.x - l->p1.x) / + XFixedToDouble (l->p2.y - l->p1.y)); +} + +static double +XRenderComputeXIntercept (XLineFixed *l, double inverse_slope) +{ + return XFixedToDouble (l->p1.x) - inverse_slope * XFixedToDouble (l->p1.y); +} + +static XFixed +XRenderComputeIntersect (XLineFixed *l1, XLineFixed *l2) +{ + /* + * x = m1y + b1 + * x = m2y + b2 + * m1y + b1 = m2y + b2 + * y * (m1 - m2) = b2 - b1 + * y = (b2 - b1) / (m1 - m2) + */ + double m1 = XRenderComputeInverseSlope (l1); + double b1 = XRenderComputeXIntercept (l1, m1); + double m2 = XRenderComputeInverseSlope (l2); + double b2 = XRenderComputeXIntercept (l2, m2); + + return XDoubleToFixed ((b2 - b1) / (m1 - m2)); +} + +static int +XRenderComputeTrapezoids (Edge *edges, + int nedges, + int winding, + XTrapezoid *traps) +{ + int ntraps = 0; + int inactive; + Edge *active; + Edge *e, *en, *next; + XFixed y, next_y, intersect; + + qsort (edges, nedges, sizeof (Edge), CompareEdge); + + y = edges[0].edge.p1.y; + active = 0; + inactive = 0; + while (active || inactive < nedges) + { + /* insert new active edges into list */ + while (inactive < nedges) + { + e = &edges[inactive]; + if (e->edge.p1.y > y) + break; + /* move this edge into the active list */ + inactive++; + e->next = active; + e->prev = 0; + if (active) + active->prev = e; + active = e; + } + /* compute x coordinates along this group */ + for (e = active; e; e = e->next) + e->current_x = XRenderComputeX (&e->edge, y); + + /* sort active list */ + for (e = active; e; e = next) + { + next = e->next; + /* + * Find one later in the list that belongs before the + * current one + */ + for (en = next; en; en = en->next) + { + if (en->current_x < e->current_x || + (en->current_x == e->current_x && + en->edge.p2.x < e->edge.p2.x)) + { + /* + * insert en before e + * + * extract en + */ + en->prev->next = en->next; + if (en->next) + en->next->prev = en->prev; + /* + * insert en + */ + if (e->prev) + e->prev->next = en; + else + active = en; + en->prev = e->prev; + e->prev = en; + en->next = e; + /* + * start over at en + */ + next = en; + break; + } + } + } +#if 0 + printf ("y: %6.3g:", y / 65536.0); + for (e = active; e; e = e->next) + { + printf (" %6.3g", e->current_x / 65536.0); + } + printf ("\n"); +#endif + /* find next inflection point */ + next_y = active->edge.p2.y; + for (e = active; e; e = en) + { + if (e->edge.p2.y < next_y) + next_y = e->edge.p2.y; + en = e->next; + /* check intersect */ + if (en && e->edge.p2.x > en->edge.p2.x) + { + intersect = XRenderComputeIntersect (&e->edge, &e->next->edge); + /* make sure this point is below the actual intersection */ + intersect = intersect + 1; + if (intersect < next_y) + next_y = intersect; + } + } + /* check next inactive point */ + if (inactive < nedges && edges[inactive].edge.p1.y < next_y) + next_y = edges[inactive].edge.p1.y; + + /* walk the list generating trapezoids */ + for (e = active; e && (en = e->next); e = en->next) + { + traps->top = y; + traps->bottom = next_y; + traps->left = e->edge; + traps->right = en->edge; + traps++; + ntraps++; + } + + y = next_y; + + /* delete inactive edges from list */ + for (e = active; e; e = next) + { + next = e->next; + if (e->edge.p2.y <= y) + { + if (e->prev) + e->prev->next = e->next; + else + active = e->next; + if (e->next) + e->next->prev = e->prev; + } + } + } + return ntraps; +} + +void +XRenderCompositeDoublePoly (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XPointDouble *fpoints, + int npoints, + int winding) +{ + Edge *edges; + XTrapezoid *traps; + int i, nedges, ntraps; + XFixed x, y, prevx = 0, prevy = 0, firstx = 0, firsty = 0; + XFixed top = 0, bottom = 0; /* GCCism */ + + edges = (Edge *) Xmalloc (npoints * sizeof (Edge) + + (npoints * npoints * sizeof (XTrapezoid))); + if (!edges) + return; + traps = (XTrapezoid *) (edges + npoints); + nedges = 0; + for (i = 0; i <= npoints; i++) + { + if (i == npoints) + { + x = firstx; + y = firsty; + } + else + { + x = XDoubleToFixed (fpoints[i].x); + y = XDoubleToFixed (fpoints[i].y); + } + if (i) + { + if (y < top) + top = y; + else if (y > bottom) + bottom = y; + if (prevy < y) + { + edges[nedges].edge.p1.x = prevx; + edges[nedges].edge.p1.y = prevy; + edges[nedges].edge.p2.x = x; + edges[nedges].edge.p2.y = y; + edges[nedges].clockWise = True; + nedges++; + } + else if (prevy > y) + { + edges[nedges].edge.p1.x = x; + edges[nedges].edge.p1.y = y; + edges[nedges].edge.p2.x = prevx; + edges[nedges].edge.p2.y = prevy; + edges[nedges].clockWise = False; + nedges++; + } + /* drop horizontal edges */ + } + else + { + top = y; + bottom = y; + firstx = x; + firsty = y; + } + prevx = x; + prevy = y; + } + ntraps = XRenderComputeTrapezoids (edges, nedges, winding, traps); + /* XXX adjust xSrc/xDst */ + XRenderCompositeTrapezoids (dpy, op, src, dst, maskFormat, xSrc, ySrc, traps, ntraps); + Xfree (edges); +} Index: xc/lib/Xrender/Trap.c diff -u /dev/null xc/lib/Xrender/Trap.c:1.3 --- /dev/null Thu Feb 27 12:27:35 2003 +++ xc/lib/Xrender/Trap.c Tue Nov 5 18:22:35 2002 @@ -0,0 +1,72 @@ +/* + * $XFree86: xc/lib/Xrender/Trap.c,v 1.3 2002/11/05 23:22:35 keithp Exp $ + * + * Copyright © 2002 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 "Xrenderint.h" + +void +XRenderCompositeTrapezoids (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XTrapezoid *traps, + int ntrap) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderTrapezoidsReq *req; + int n; + long len; + unsigned long max_req = dpy->bigreq_size ? dpy->bigreq_size : dpy->max_request_size; + + RenderSimpleCheckExtension (dpy, info); + LockDisplay(dpy); + while (ntrap) + { + GetReq(RenderTrapezoids, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderTrapezoids; + req->op = (CARD8) op; + req->src = src; + req->dst = dst; + req->maskFormat = maskFormat ? maskFormat->id : 0; + req->xSrc = xSrc; + req->ySrc = ySrc; + n = ntrap; + len = ((long) n) * (SIZEOF (xTrapezoid) >> 2); + if (len > (max_req - req->length)) { + n = (max_req - req->length) / (SIZEOF (xTrapezoid) >> 2); + len = ((long)n) * (SIZEOF (xTrapezoid) >> 2); + } + SetReqLen (req, len, len); + len <<= 2; + DataInt32 (dpy, (int *) traps, len); + ntrap -= n; + traps += n; + } + UnlockDisplay(dpy); + SyncHandle(); +} + Index: xc/lib/Xrender/Tri.c diff -u /dev/null xc/lib/Xrender/Tri.c:1.3 --- /dev/null Thu Feb 27 12:27:35 2003 +++ xc/lib/Xrender/Tri.c Tue Nov 5 18:22:35 2002 @@ -0,0 +1,167 @@ +/* + * $XFree86: xc/lib/Xrender/Tri.c,v 1.3 2002/11/05 23:22:35 keithp Exp $ + * + * Copyright © 2002 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 "Xrenderint.h" + +void +XRenderCompositeTriangles (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XTriangle *triangles, + int ntriangle) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderTrianglesReq *req; + int n; + long len; + + RenderSimpleCheckExtension (dpy, info); + LockDisplay(dpy); + while (ntriangle) + { + GetReq(RenderTriangles, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderTriangles; + req->op = (CARD8) op; + req->src = src; + req->dst = dst; + req->maskFormat = maskFormat ? maskFormat->id : 0; + req->xSrc = xSrc; + req->ySrc = ySrc; + n = ntriangle; + len = ((long) n) * (SIZEOF (xTriangle) >> 2); + if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) { + n = (dpy->max_request_size - req->length) / (SIZEOF (xTriangle) >> 2); + len = ((long)n) * (SIZEOF (xTriangle) >> 2); + } + SetReqLen (req, len, len); + len <<= 2; + DataInt32 (dpy, (int *) triangles, len); + ntriangle -= n; + triangles += n; + } + UnlockDisplay(dpy); + SyncHandle(); +} + +void +XRenderCompositeTriStrip (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XPointFixed *points, + int npoint) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderTriStripReq *req; + int n; + long len; + + RenderSimpleCheckExtension (dpy, info); + LockDisplay(dpy); + while (npoint > 2) + { + GetReq(RenderTriStrip, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderTriStrip; + req->op = (CARD8) op; + req->src = src; + req->dst = dst; + req->maskFormat = maskFormat ? maskFormat->id : 0; + req->xSrc = xSrc; + req->ySrc = ySrc; + n = npoint; + len = ((long) n) * (SIZEOF (xPointFixed) >> 2); + if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) { + n = (dpy->max_request_size - req->length) / (SIZEOF (xPointFixed) >> 2); + len = ((long)n) * (SIZEOF (xPointFixed) >> 2); + } + SetReqLen (req, len, len); + len <<= 2; + DataInt32 (dpy, (int *) points, len); + npoint -= (n - 2); + points += (n - 2); + } + UnlockDisplay(dpy); + SyncHandle(); +} + +void +XRenderCompositeTriFan (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XPointFixed *points, + int npoint) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + _Xconst XPointFixed *first = points; + xPointFixed *p; + xRenderTriFanReq *req; + int n; + long len; + + RenderSimpleCheckExtension (dpy, info); + LockDisplay(dpy); + points++; + npoint--; + while (npoint > 1) + { + GetReqExtra(RenderTriFan, SIZEOF (xPointFixed), req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderTriFan; + req->op = (CARD8) op; + req->src = src; + req->dst = dst; + req->maskFormat = maskFormat ? maskFormat->id : 0; + req->xSrc = xSrc; + req->ySrc = ySrc; + p = (xPointFixed *) (req + 1); + p->x = first->x; + p->y = first->y; + n = npoint; + len = ((long) n) * (SIZEOF (xPointFixed) >> 2); + if (!dpy->bigreq_size && len > (dpy->max_request_size - req->length)) { + n = (dpy->max_request_size - req->length) / (SIZEOF (xPointFixed) >> 2); + len = ((long)n) * (SIZEOF (xPointFixed) >> 2); + } + SetReqLen (req, len, len); + len <<= 2; + DataInt32 (dpy, (int *) points, len); + npoint -= (n - 1); + points += (n - 1); + } + UnlockDisplay(dpy); + SyncHandle(); +} Index: xc/lib/Xrender/Xrender-def.cpp diff -u xc/lib/Xrender/Xrender-def.cpp:1.3 xc/lib/Xrender/Xrender-def.cpp:1.4 --- xc/lib/Xrender/Xrender-def.cpp:1.3 Tue Feb 13 14:19:12 2001 +++ xc/lib/Xrender/Xrender-def.cpp Tue Oct 1 10:31:40 2002 @@ -1,29 +1,42 @@ LIBRARY Xrender VERSION LIBRARY_VERSION EXPORTS - XRenderComposite - XRenderFillRectangle - XRenderFillRectangles - XRenderAddGlyphs - XRenderCompositeString16 - XRenderCompositeString32 - XRenderCompositeString8 - XRenderCreateGlyphSet - XRenderFreeGlyphSet - XRenderFreeGlyphs - XRenderReferenceGlyphSet - XRenderChangePicture - XRenderCreatePicture - XRenderFreePicture -; _XRenderProcessPictureAttributes - XRenderFindDisplay - XRenderFindFormat - XRenderFindVisualFormat - XRenderQueryExtension - XRenderQueryFormats - XRenderQueryVersion -; _XRenderFindFormat -; _XRenderFindVisual - XRenderSetPictureClipRegion - -/* $XFree86: xc/lib/Xrender/Xrender-def.cpp,v 1.3 2001/02/13 19:19:12 dawes Exp $ */ +XRenderParseColor +XRenderComposite +XRenderCreateCursor +XRenderFillRectangle +XRenderFillRectangles +XRenderQueryFilters +XRenderSetPictureFilter +XRenderAddGlyphs +XRenderCompositeString16 +XRenderCompositeString32 +XRenderCompositeString8 +XRenderCompositeText16 +XRenderCompositeText32 +XRenderCompositeText8 +XRenderCreateGlyphSet +XRenderFreeGlyphSet +XRenderFreeGlyphs +XRenderReferenceGlyphSet +XRenderChangePicture +XRenderCreatePicture +XRenderFreePicture +XRenderSetPictureClipRectangles +XRenderSetPictureClipRegion +XRenderSetPictureTransform +XRenderCompositeDoublePoly +XRenderCompositeTrapezoids +XRenderCompositeTriFan +XRenderCompositeTriStrip +XRenderCompositeTriangles +XRenderFindDisplay +XRenderFindFormat +XRenderFindStandardFormat +XRenderFindVisualFormat +XRenderQueryExtension +XRenderQueryFormats +XRenderQuerySubpixelOrder +XRenderQueryVersion +XRenderSetSubpixelOrder +/* $XFree86: xc/lib/Xrender/Xrender-def.cpp,v 1.4 2002/10/01 14:31:40 alanh Exp $ */ Index: xc/lib/Xrender/Xrender.c diff -u xc/lib/Xrender/Xrender.c:1.8 xc/lib/Xrender/Xrender.c:1.14 --- xc/lib/Xrender/Xrender.c:1.8 Sun Dec 16 13:27:55 2001 +++ xc/lib/Xrender/Xrender.c Thu Nov 21 21:10:41 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Xrender.c,v 1.8 2001/12/16 18:27:55 keithp Exp $ + * $XFree86: xc/lib/Xrender/Xrender.c,v 1.14 2002/11/22 02:10:41 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -92,26 +92,17 @@ int *minor_versionp) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); - xRenderQueryVersionReply rep; - xRenderQueryVersionReq *req; + XRenderInfo *xri; - RenderCheckExtension (dpy, info, 0); + if (!XextHasExtension (info)) + return 0; - LockDisplay (dpy); - GetReq (RenderQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->renderReqType = X_RenderQueryVersion; - req->majorVersion = RENDER_MAJOR; - req->minorVersion = RENDER_MINOR; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); + if (!XRenderQueryFormats (dpy)) return 0; - } - *major_versionp = rep.majorVersion; - *minor_versionp = rep.minorVersion; - UnlockDisplay (dpy); - SyncHandle (); + + xri = (XRenderInfo *) info->data; + *major_versionp = xri->major_version; + *minor_versionp = xri->minor_version; return 1; } @@ -132,10 +123,48 @@ return _XVIDtoVisual (dpy, vid); } +typedef struct _renderVersionState { + unsigned long version_seq; + Bool error; + int major_version; + int minor_version; + +} _XrenderVersionState; + +static Bool +_XRenderVersionHandler (Display *dpy, + xReply *rep, + char *buf, + int len, + XPointer data) +{ + xRenderQueryVersionReply replbuf; + xRenderQueryVersionReply *repl; + _XrenderVersionState *state = (_XrenderVersionState *) data; + + if (dpy->last_request_read != state->version_seq) + return False; + if (rep->generic.type == X_Error) + { + state->error = True; + return False; + } + repl = (xRenderQueryVersionReply *) + _XGetAsyncReply(dpy, (char *)&replbuf, rep, buf, len, + (SIZEOF(xRenderQueryVersionReply) - SIZEOF(xReply)) >> 2, + True); + state->major_version = repl->majorVersion; + state->minor_version = repl->minorVersion; + return True; +} + Status XRenderQueryFormats (Display *dpy) { - XExtDisplayInfo *info = XRenderFindDisplay (dpy); + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + _XAsyncHandler async; + _XrenderVersionState async_state; + xRenderQueryVersionReq *vreq; xRenderQueryPictFormatsReply rep; xRenderQueryPictFormatsReq *req; XRenderInfo *xri; @@ -147,9 +176,11 @@ xPictScreen *xScreen; xPictDepth *xDepth; xPictVisual *xVisual; + CARD32 *xSubpixel; void *xData; int nf, ns, nd, nv; int rlength; + int nbytes; RenderCheckExtension (dpy, info, 0); LockDisplay (dpy); @@ -158,19 +189,50 @@ UnlockDisplay (dpy); return 1; } + GetReq (RenderQueryVersion, vreq); + vreq->reqType = info->codes->major_opcode; + vreq->renderReqType = X_RenderQueryVersion; + vreq->majorVersion = RENDER_MAJOR; + vreq->minorVersion = RENDER_MINOR; + + async_state.version_seq = dpy->request; + async_state.error = False; + async.next = dpy->async_handlers; + async.handler = _XRenderVersionHandler; + async.data = (XPointer) &async_state; + dpy->async_handlers = &async; + GetReq (RenderQueryPictFormats, req); req->reqType = info->codes->major_opcode; req->renderReqType = X_RenderQueryPictFormats; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { + + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) + { + DeqAsyncHandler (dpy, &async); UnlockDisplay (dpy); SyncHandle (); return 0; } + DeqAsyncHandler (dpy, &async); + if (async_state.error) + { + UnlockDisplay(dpy); + SyncHandle(); + return 0; + } + /* + * Check for the lack of sub-pixel data + */ + if (async_state.major_version == 0 && async_state.minor_version < 6) + rep.numSubpixel = 0; + xri = (XRenderInfo *) Xmalloc (sizeof (XRenderInfo) + - rep.numFormats * sizeof (XRenderPictFormat) + - rep.numScreens * sizeof (XRenderScreen) + - rep.numDepths * sizeof (XRenderDepth) + - rep.numVisuals * sizeof (XRenderVisual)); + rep.numFormats * sizeof (XRenderPictFormat) + + rep.numScreens * sizeof (XRenderScreen) + + rep.numDepths * sizeof (XRenderDepth) + + rep.numVisuals * sizeof (XRenderVisual)); + xri->major_version = async_state.major_version; + xri->minor_version = async_state.minor_version; xri->format = (XRenderPictFormat *) (xri + 1); xri->nformat = rep.numFormats; xri->screen = (XRenderScreen *) (xri->format + rep.numFormats); @@ -182,14 +244,16 @@ rlength = (rep.numFormats * sizeof (xPictFormInfo) + rep.numScreens * sizeof (xPictScreen) + rep.numDepths * sizeof (xPictDepth) + - rep.numVisuals * sizeof (xPictVisual)); + rep.numVisuals * sizeof (xPictVisual) + + rep.numSubpixel * 4); xData = (void *) Xmalloc (rlength); + nbytes = (int) rep.length << 2; - if (!xri || !xData) + if (!xri || !xData || nbytes < rlength) { if (xri) Xfree (xri); if (xData) Xfree (xData); - _XEatData (dpy, rlength); + _XEatData (dpy, nbytes); UnlockDisplay (dpy); SyncHandle (); return 0; @@ -223,6 +287,7 @@ screen->depths = depth; screen->ndepths = xScreen->nDepth; screen->fallback = _XRenderFindFormat (xri, xScreen->fallback); + screen->subpixel = SubPixelUnknown; xDepth = (xPictDepth *) (xScreen + 1); for (nd = 0; nd < screen->ndepths; nd++) { @@ -240,15 +305,63 @@ depth++; xDepth = (xPictDepth *) xVisual; } + screen++; xScreen = (xPictScreen *) xDepth; } + xSubpixel = (CARD32 *) xScreen; + screen = xri->screen; + for (ns = 0; ns < rep.numSubpixel; ns++) + { + screen->subpixel = *xSubpixel; + xSubpixel++; + screen++; + } info->data = (XPointer) xri; + /* + * Skip any extra data + */ + if (nbytes > rlength) + _XEatData (dpy, (unsigned long) (nbytes - rlength)); + UnlockDisplay (dpy); SyncHandle (); Xfree (xData); return 1; } +int +XRenderQuerySubpixelOrder (Display *dpy, int screen) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + XRenderInfo *xri; + + if (!XextHasExtension (info)) + return SubPixelUnknown; + + if (!XRenderQueryFormats (dpy)) + return SubPixelUnknown; + + xri = (XRenderInfo *) info->data; + return xri->screen[screen].subpixel; +} + +Bool +XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + XRenderInfo *xri; + + if (!XextHasExtension (info)) + return False; + + if (!XRenderQueryFormats (dpy)) + return False; + + xri = (XRenderInfo *) info->data; + xri->screen[screen].subpixel = subpixel; + return True; +} + XRenderPictFormat * XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual) { @@ -325,3 +438,220 @@ return 0; } +XRenderPictFormat * +XRenderFindStandardFormat (Display *dpy, + int format) +{ + static struct { + XRenderPictFormat templ; + unsigned long mask; + } standardFormats[PictStandardNUM] = { + /* PictStandardARGB32 */ + { + { + 0, /* id */ + PictTypeDirect, /* type */ + 32, /* depth */ + { /* direct */ + 16, /* direct.red */ + 0xff, /* direct.redMask */ + 8, /* direct.green */ + 0xff, /* direct.greenMask */ + 0, /* direct.blue */ + 0xff, /* direct.blueMask */ + 24, /* direct.alpha */ + 0xff, /* direct.alphaMask */ + }, + 0, /* colormap */ + }, + PictFormatType | + PictFormatDepth | + PictFormatRed | + PictFormatRedMask | + PictFormatGreen | + PictFormatGreenMask | + PictFormatBlue | + PictFormatBlueMask | + PictFormatAlpha | + PictFormatAlphaMask, + }, + /* PictStandardRGB24 */ + { + { + 0, /* id */ + PictTypeDirect, /* type */ + 24, /* depth */ + { /* direct */ + 16, /* direct.red */ + 0xff, /* direct.redMask */ + 8, /* direct.green */ + 0xff, /* direct.greenMask */ + 0, /* direct.blue */ + 0xff, /* direct.blueMask */ + 0, /* direct.alpha */ + 0x00, /* direct.alphaMask */ + }, + 0, /* colormap */ + }, + PictFormatType | + PictFormatDepth | + PictFormatRed | + PictFormatRedMask | + PictFormatGreen | + PictFormatGreenMask | + PictFormatBlue | + PictFormatBlueMask | + PictFormatAlphaMask, + }, + /* PictStandardA8 */ + { + { + 0, /* id */ + PictTypeDirect, /* type */ + 8, /* depth */ + { /* direct */ + 0, /* direct.red */ + 0x00, /* direct.redMask */ + 0, /* direct.green */ + 0x00, /* direct.greenMask */ + 0, /* direct.blue */ + 0x00, /* direct.blueMask */ + 0, /* direct.alpha */ + 0xff, /* direct.alphaMask */ + }, + 0, /* colormap */ + }, + PictFormatType | + PictFormatDepth | + PictFormatRedMask | + PictFormatGreenMask | + PictFormatBlueMask | + PictFormatAlpha | + PictFormatAlphaMask, + }, + /* PictStandardA4 */ + { + { + 0, /* id */ + PictTypeDirect, /* type */ + 4, /* depth */ + { /* direct */ + 0, /* direct.red */ + 0x00, /* direct.redMask */ + 0, /* direct.green */ + 0x00, /* direct.greenMask */ + 0, /* direct.blue */ + 0x00, /* direct.blueMask */ + 0, /* direct.alpha */ + 0x0f, /* direct.alphaMask */ + }, + 0, /* colormap */ + }, + PictFormatType | + PictFormatDepth | + PictFormatRedMask | + PictFormatGreenMask | + PictFormatBlueMask | + PictFormatAlpha | + PictFormatAlphaMask, + }, + /* PictStandardA1 */ + { + { + 0, /* id */ + PictTypeDirect, /* type */ + 1, /* depth */ + { /* direct */ + 0, /* direct.red */ + 0x00, /* direct.redMask */ + 0, /* direct.green */ + 0x00, /* direct.greenMask */ + 0, /* direct.blue */ + 0x00, /* direct.blueMask */ + 0, /* direct.alpha */ + 0x01, /* direct.alphaMask */ + }, + 0, /* colormap */ + }, + PictFormatType | + PictFormatDepth | + PictFormatRedMask | + PictFormatGreenMask | + PictFormatBlueMask | + PictFormatAlpha | + PictFormatAlphaMask, + }, + }; + + if (0 <= format && format < PictStandardNUM) + return XRenderFindFormat (dpy, + standardFormats[format].mask, + &standardFormats[format].templ, + 0); + return 0; +} + +XIndexValue * +XRenderQueryPictIndexValues(Display *dpy, + _Xconst XRenderPictFormat *format, + int *num) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderQueryPictIndexValuesReq *req; + xRenderQueryPictIndexValuesReply rep; + XIndexValue *values; + int nbytes, nread, rlength, i; + + RenderCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (RenderQueryPictIndexValues, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderQueryPictIndexValues; + req->format = format->id; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) + { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + + /* request data length */ + nbytes = (long)rep.length << 2; + /* bytes of actual data in the request */ + nread = rep.numIndexValues * SIZEOF (xIndexValue); + /* size of array returned to application */ + rlength = rep.numIndexValues * sizeof (XIndexValue); + + /* allocate returned data */ + values = (XIndexValue *)Xmalloc (rlength); + if (!values) + { + _XEatData (dpy, nbytes); + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + + /* read the values one at a time and convert */ + *num = rep.numIndexValues; + for(i = 0; i < rep.numIndexValues; i++) + { + xIndexValue value; + + _XRead (dpy, (char *) &value, SIZEOF (xIndexValue)); + values[i].pixel = value.pixel; + values[i].red = value.red; + values[i].green = value.green; + values[i].blue = value.blue; + values[i].alpha = value.alpha; + } + /* skip any padding */ + if(nbytes > nread) + { + _XEatData (dpy, (unsigned long) (nbytes - nread)); + } + UnlockDisplay (dpy); + SyncHandle (); + return values; +} Index: xc/lib/Xrender/Xrender.h diff -u xc/lib/Xrender/Xrender.h:1.10 xc/lib/Xrender/Xrender.h:1.18 --- xc/lib/Xrender/Xrender.h:1.10 Wed Dec 26 20:16:00 2001 +++ xc/lib/Xrender/Xrender.h Fri Nov 22 21:34:45 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Xrender.h,v 1.10 2001/12/27 01:16:00 keithp Exp $ + * $XFree86: xc/lib/Xrender/Xrender.h,v 1.18 2002/11/23 02:34:45 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -64,34 +64,6 @@ #define PictFormatAlphaMask (1 << 10) #define PictFormatColormap (1 << 11) -typedef struct { - Visual *visual; - XRenderPictFormat *format; -} XRenderVisual; - -typedef struct { - int depth; - int nvisuals; - XRenderVisual *visuals; -} XRenderDepth; - -typedef struct { - XRenderDepth *depths; - int ndepths; - XRenderPictFormat *fallback; -} XRenderScreen; - -typedef struct _XRenderInfo { - XRenderPictFormat *format; - int nformat; - XRenderScreen *screen; - int nscreen; - XRenderDepth *depth; - int ndepth; - XRenderVisual *visual; - int nvisual; -} XRenderInfo; - typedef struct _XRenderPictureAttributes { Bool repeat; Picture alpha_map; @@ -148,6 +120,55 @@ int yOff; } XGlyphElt32; +typedef double XDouble; + +typedef struct _XPointDouble { + XDouble x, y; +} XPointDouble; + +#define XDoubleToFixed(f) ((XFixed) ((f) * 65536)) +#define XFixedToDouble(f) (((XDouble) (f)) / 65536) + +typedef int XFixed; + +typedef struct _XPointFixed { + XFixed x, y; +} XPointFixed; + +typedef struct _XLineFixed { + XPointFixed p1, p2; +} XLineFixed; + +typedef struct _XTriangle { + XPointFixed p1, p2, p3; +} XTriangle; + +typedef struct _XTrapezoid { + XFixed top, bottom; + XLineFixed left, right; +} XTrapezoid; + +typedef struct _XTransform { + XFixed matrix[3][3]; +} XTransform; + +typedef struct _XFilters { + int nfilter; + char **filter; + int nalias; + short *alias; +} XFilters; + +typedef struct _XIndexValue { + unsigned long pixel; + unsigned short red, green, blue, alpha; +} XIndexValue; + +typedef struct _XAnimCursor { + Cursor cursor; + unsigned long delay; +} XAnimCursor; + _XFUNCPROTOBEGIN Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep); @@ -158,6 +179,10 @@ Status XRenderQueryFormats (Display *dpy); +int XRenderQuerySubpixelOrder (Display *dpy, int screen); + +Bool XRenderSetSubpixelOrder (Display *dpy, int screen, int subpixel); + XRenderPictFormat * XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual); @@ -167,6 +192,22 @@ _Xconst XRenderPictFormat *templ, int count); +#define PictStandardARGB32 0 +#define PictStandardRGB24 1 +#define PictStandardA8 2 +#define PictStandardA4 3 +#define PictStandardA1 4 +#define PictStandardNUM 5 + +XRenderPictFormat * +XRenderFindStandardFormat (Display *dpy, + int format); + +XIndexValue * +XRenderQueryPictIndexValues(Display *dpy, + _Xconst XRenderPictFormat *format, + int *num); + Picture XRenderCreatePicture (Display *dpy, Drawable drawable, @@ -194,6 +235,11 @@ Region r); void +XRenderSetPictureTransform (Display *dpy, + Picture picture, + XTransform *transform); + +void XRenderFreePicture (Display *dpy, Picture picture); @@ -334,6 +380,89 @@ _Xconst XRenderColor *color, _Xconst XRectangle *rectangles, int n_rects); + +void +XRenderCompositeTrapezoids (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XTrapezoid *traps, + int ntrap); + +void +XRenderCompositeTriangles (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XTriangle *triangles, + int ntriangle); + +void +XRenderCompositeTriStrip (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XPointFixed *points, + int npoint); + +void +XRenderCompositeTriFan (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + _Xconst XPointFixed *points, + int npoint); + +void +XRenderCompositeDoublePoly (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XPointDouble *fpoints, + int npoints, + int winding); +Status +XRenderParseColor(Display *dpy, + char *spec, + XRenderColor *def); + +Cursor +XRenderCreateCursor (Display *dpy, + Picture source, + unsigned int x, + unsigned int y); + +XFilters * +XRenderQueryFilters (Display *dpy, Drawable drawable); + +void +XRenderSetPictureFilter (Display *dpy, + Picture picture, + char *filter, + XFixed *params, + int nparams); + +Cursor +XRenderCreateAnimCursor (Display *dpy, + int ncursor, + XAnimCursor *cursors); _XFUNCPROTOEND Index: xc/lib/Xrender/Xrenderint.h diff -u xc/lib/Xrender/Xrenderint.h:1.2 xc/lib/Xrender/Xrenderint.h:1.4 --- xc/lib/Xrender/Xrenderint.h:1.2 Sun Aug 27 22:43:13 2000 +++ xc/lib/Xrender/Xrenderint.h Tue Nov 5 18:22:35 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Xrenderint.h,v 1.2 2000/08/28 02:43:13 tsi Exp $ + * $XFree86: xc/lib/Xrender/Xrenderint.h,v 1.4 2002/11/05 23:22:35 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -35,6 +35,43 @@ #include "Xrender.h" #include "renderproto.h" +typedef struct { + Visual *visual; + XRenderPictFormat *format; +} XRenderVisual; + +typedef struct { + int depth; + int nvisuals; + XRenderVisual *visuals; +} XRenderDepth; + +typedef struct { + XRenderDepth *depths; + int ndepths; + XRenderPictFormat *fallback; + int subpixel; +} XRenderScreen; + +typedef struct _XRenderInfo { + int major_version; + int minor_version; + XRenderPictFormat *format; + int nformat; + XRenderScreen *screen; + int nscreen; + XRenderDepth *depth; + int ndepth; + XRenderVisual *visual; + int nvisual; + int *subpixel; + int nsubpixel; + char **filter; + int nfilter; + short *filter_alias; + int nfilter_alias; +} XRenderInfo; + extern XExtensionInfo XRenderExtensionInfo; extern char XRenderExtensionName[]; @@ -46,5 +83,17 @@ XExtDisplayInfo * XRenderFindDisplay (Display *dpy); + +/* + * Xlib uses long for 32-bit values. Xrender uses int. This + * matters on alpha. Note that this macro assumes that int is 32 bits + * except on WORD64 machines where it is 64 bits. + */ + +#ifdef WORD64 +#define DataInt32(dpy,d,len) Data32(dpy,(long *) (d),len) +#else +#define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len) +#endif #endif /* _XRENDERINT_H_ */ Index: xc/lib/Xss/Imakefile diff -u xc/lib/Xss/Imakefile:3.2 xc/lib/Xss/Imakefile:3.4 --- xc/lib/Xss/Imakefile:3.2 Thu Jun 15 16:49:58 2000 +++ xc/lib/Xss/Imakefile Thu Jan 16 11:09:06 2003 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xss/Imakefile,v 3.2 2000/06/15 20:49:58 dawes Exp $ +XCOMM $XFree86: xc/lib/Xss/Imakefile,v 3.4 2003/01/16 16:09:06 eich Exp $ #define DoNormalLib NormalLibXss #define DoSharedLib SharedLibXss #define DoExtraLib SharedLibXss @@ -22,10 +22,11 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = $(SCRNSAVSRC) OBJS = $(SCRNSAVOBJ) LINTLIBS = $(LINTXLIB) + +#define IncludeSharedObjectInNormalLib #include Index: xc/lib/Xss/XScrnSaver.c diff -u xc/lib/Xss/XScrnSaver.c:3.1 xc/lib/Xss/XScrnSaver.c:3.2 --- xc/lib/Xss/XScrnSaver.c:3.1 Sat Oct 27 23:32:40 2001 +++ xc/lib/Xss/XScrnSaver.c Tue Oct 15 20:37:32 2002 @@ -26,16 +26,16 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xss/XScrnSaver.c,v 3.1 2001/10/28 03:32:40 tsi Exp $ */ +/* $XFree86: xc/lib/Xss/XScrnSaver.c,v 3.2 2002/10/16 00:37:32 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES #include #include -#include "Xext.h" /* in ../include */ -#include "extutil.h" /* in ../include */ -#include "saverproto.h" /* in ../include */ -#include "scrnsaver.h" +#include +#include +#include +#include static XExtensionInfo _screen_saver_info_data; Index: xc/lib/Xss/Xssos2.def diff -u xc/lib/Xss/Xssos2.def:3.2 xc/lib/Xss/Xssos2.def:removed --- xc/lib/Xss/Xssos2.def:3.2 Thu Apr 29 05:13:33 1999 +++ xc/lib/Xss/Xssos2.def Thu Feb 27 12:27:36 2003 @@ -1,19 +0,0 @@ -LIBRARY XSS -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xss/Xssos2.def,v 3.2 1999/04/29 09:13:33 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - XScreenSaverQueryExtension @ 1 - XScreenSaverQueryVersion @ 2 - XScreenSaverAllocInfo @ 3 - XScreenSaverQueryInfo @ 4 - XScreenSaverSelectInput @ 5 - XScreenSaverSetAttributes @ 6 - XScreenSaverUnsetAttributes @ 7 - XScreenSaverRegister @ 8 - XScreenSaverUnregister @ 9 - XScreenSaverGetRegistered @ 10 - Index: xc/lib/Xss/Xssos2.rsp diff -u xc/lib/Xss/Xssos2.rsp:3.0 xc/lib/Xss/Xssos2.rsp:removed --- xc/lib/Xss/Xssos2.rsp:3.0 Wed Jan 24 16:58:21 1996 +++ xc/lib/Xss/Xssos2.rsp Thu Feb 27 12:27:36 2003 @@ -1,3 +0,0 @@ -XScrnSaver.obj /NOL /NOD /BAT -Xss.dll - Index: xc/lib/Xt/Converters.c diff -u xc/lib/Xt/Converters.c:3.11 xc/lib/Xt/Converters.c:3.13 --- xc/lib/Xt/Converters.c:3.11 Fri Dec 14 14:56:09 2001 +++ xc/lib/Xt/Converters.c Mon Jun 3 16:59:19 2002 @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Converters.c,v 3.11 2001/12/14 19:56:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Converters.c,v 3.13 2002/06/03 20:59:19 dawes Exp $ */ /* @@ -72,7 +72,7 @@ #include #include /* for StringToDirectoryString */ -#ifdef __EMX__ +#ifdef __UNIXOS2__ #define IsNewline(str) ((str) == '\n' || (str) == '\r') #define IsWhitespace(str) ((str)== ' ' || (str) == '\t' || (str) == '\r') #else @@ -111,7 +111,7 @@ static XrmQuark XtQInt; static XrmQuark XtQPixel; static XrmQuark XtQPosition; -#ifdef __EMX__ +#ifdef __UNIXOS2__ XrmQuark _XtQString = 0; #else XrmQuark _XtQString; @@ -270,7 +270,7 @@ int val = 0; char ch; /* skip leading whitespace */ -#ifndef __EMX__ +#ifndef __UNIXOS2__ while ((ch = *string) == ' ' || ch == '\t') string++; #else while ((ch = *string) == ' ' || ch == '\t' || ch == '\r') string++; @@ -1035,7 +1035,7 @@ } /* Should really do XListFonts, but most servers support this */ - f = XCreateFontSet(display, "-*-*-*-R-*-*-*-120-*-*-*-*", + f = XCreateFontSet(display, "-*-*-*-R-*-*-*-120-*-*-*-*,*", &missing_charset_list, &missing_charset_count, &def_string); /* Free any returned missing charset list */ Index: xc/lib/Xt/Create.c diff -u xc/lib/Xt/Create.c:3.9 xc/lib/Xt/Create.c:3.10 --- xc/lib/Xt/Create.c:3.9 Fri Dec 14 14:56:10 2001 +++ xc/lib/Xt/Create.c Mon Dec 16 23:50:58 2002 @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Create.c,v 3.9 2001/12/14 19:56:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Create.c,v 3.10 2002/12/17 04:50:58 dawes Exp $ */ /* @@ -291,6 +291,7 @@ } } widget = (Widget) __XtMalloc((unsigned)(wsize + csize)); + bzero(widget, wsize + csize); widget->core.constraints = (csize ? (XtPointer)((char *)widget + wsize) : NULL); } Index: xc/lib/Xt/Display.c diff -u xc/lib/Xt/Display.c:3.13 xc/lib/Xt/Display.c:3.15 --- xc/lib/Xt/Display.c:3.13 Fri Dec 14 14:56:11 2001 +++ xc/lib/Xt/Display.c Tue Sep 17 21:25:01 2002 @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Display.c,v 3.13 2001/12/14 19:56:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Display.c,v 3.15 2002/09/18 01:25:01 dawes Exp $ */ /* @@ -275,7 +275,7 @@ #else char *ptr = strrchr(argv[0], '/'); #endif -#ifdef __EMX__ +#ifdef __UNIXOS2__ char *dot_ptr,*ptr2; ptr2 = strrchr(argv[0],'\\'); if (ptr2 > ptr) ptr = ptr2; @@ -822,6 +822,6 @@ *num_dpy_return = app_context->count; *dpy_return = (Display**)__XtMalloc(app_context->count * sizeof(Display*)); for (ii = 0; ii < app_context->count; ii++) - *dpy_return[ii] = app_context->list[ii]; + (*dpy_return)[ii] = app_context->list[ii]; UNLOCK_APP(app_context); } Index: xc/lib/Xt/Imakefile diff -u xc/lib/Xt/Imakefile:3.16 xc/lib/Xt/Imakefile:3.19 --- xc/lib/Xt/Imakefile:3.16 Mon Jul 23 09:15:42 2001 +++ xc/lib/Xt/Imakefile Thu Nov 14 16:01:19 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/Xt/Imakefile,v 3.16 2001/07/23 13:15:42 dawes Exp $ +XCOMM $XFree86: xc/lib/Xt/Imakefile,v 3.19 2002/11/14 21:01:19 tsi Exp $ #define DoNormalLib NormalLibXt #define DoSharedLib SharedLibXt @@ -33,7 +33,7 @@ #ifndef MotifBC #define MotifBC NO #endif - + /* "YES" allows illegal XtGetValues requests with NULL ArgVal to usually succeed, as R5 did. Some applications erroneously rely on this behavior. Support for this will be removed in a future release. */ @@ -242,17 +242,13 @@ #if DoSharedLib SpecialCObjectRule(sharedlib,$(_NOOP_),$(SHLIBDEF)) #endif -#if ItsyCompilerBug +#if defined(ItsyCompilerBug) SpecialCLibObjectRule(PassivGrab,$(_NOOP_),-O0) #endif STRINGS_FILES = StringDefs.c StringDefs.h Shell.h STRINGS_TMPLS = util/StrDefs.ct util/StrDefs.ht util/Shell.ht -#ifdef OS2Architecture -STRING_LIST = util\string.list -#else STRING_LIST = util/string.list -#endif ToolkitMakeStrings($(STRINGS_FILES),$(STRING_LIST),$(STRINGSABIOPTIONS),$(STRINGS_TMPLS),StringDefs.c) Index: xc/lib/Xt/Initialize.c diff -u xc/lib/Xt/Initialize.c:3.19 xc/lib/Xt/Initialize.c:3.20 --- xc/lib/Xt/Initialize.c:3.19 Fri Dec 14 14:56:21 2001 +++ xc/lib/Xt/Initialize.c Wed Apr 10 12:20:07 2002 @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Initialize.c,v 3.19 2001/12/14 19:56:21 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Initialize.c,v 3.20 2002/04/10 16:20:07 tsi Exp $ */ /* @@ -233,7 +233,9 @@ } else *dest = '\0'; #else +#ifdef X_NEEDS_PWPARAMS _Xgetpwparams pwparams; +#endif struct passwd *pw; char* ptr; @@ -275,7 +277,9 @@ else *dest = '\0'; #else +#ifdef X_NEEDS_PWPARAMS _Xgetpwparams pwparams; +#endif struct passwd *pw; static char *ptr; Index: xc/lib/Xt/Intrinsic.c diff -u xc/lib/Xt/Intrinsic.c:3.20 xc/lib/Xt/Intrinsic.c:3.22 --- xc/lib/Xt/Intrinsic.c:3.20 Fri Dec 14 14:56:21 2001 +++ xc/lib/Xt/Intrinsic.c Sat Jan 11 22:55:46 2003 @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.20 2001/12/14 19:56:21 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.22 2003/01/12 03:55:46 tsi Exp $ */ /* @@ -903,7 +903,7 @@ /* try the places set in the environment */ drive = getenv ("_XBASEDRIVE"); -#ifdef __EMX__ +#ifdef __UNIXOS2__ if (!drive) drive = getenv ("X11ROOT"); #endif @@ -918,7 +918,7 @@ return 1; } -#ifndef __EMX__ +#ifndef __UNIXOS2__ /* one last place to look */ drive = getenv ("HOMEDRIVE"); if (drive) { @@ -1119,7 +1119,7 @@ continue; } if (*colon == ':') -#ifdef __EMX__ +#ifdef __UNIXOS2__ if (colon > (path+1)) #endif break; @@ -1128,7 +1128,7 @@ if (Resolve(path, len, substitutions, num_substitutions, buf, '/')) { if (firstTime || strcmp(buf1,buf2) != 0) { -#ifdef __EMX__ +#ifdef __UNIXOS2__ { char *bufx = (char*)__XOS2RedirRoot(buf); strcpy(buf,bufx); @@ -1176,7 +1176,7 @@ String lang; { -#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(__EMX__) || defined (linux) +#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(__UNIXOS2__) || defined (linux) # ifdef hpux /* * We need to discriminated between HPUX 9 and HPUX 10. The equivalent @@ -1189,16 +1189,16 @@ # define STARTCHAR ':' # define ENDCHAR ';' # else - /* HPUX 10 */ - #define ENDCHAR ' ' - #endif + /* HPUX 10 */ +# define ENDCHAR ' ' +# endif # else # ifdef ultrix # define SKIPCOUNT 2 # define STARTCHAR '\001' # define ENDCHAR '\001' # else -# if defined(WIN32) || defined(__EMX__) +# if defined(WIN32) || defined(__UNIXOS2__) # define SKIPCOUNT 1 # define STARTCHAR '=' # define ENDCHAR ';' @@ -1354,7 +1354,7 @@ static char *implementation_default_path() #endif { -#if defined(WIN32) || defined(__EMX__) +#if defined(WIN32) || defined(__UNIXOS2__) /* if you know how to pass % thru the compiler let me know */ static char xfilesearchpath[] = XFILESEARCHPATHDEFAULT; static Bool fixed; Index: xc/lib/Xt/NextEvent.c diff -u xc/lib/Xt/NextEvent.c:3.24 xc/lib/Xt/NextEvent.c:3.26 --- xc/lib/Xt/NextEvent.c:3.24 Mon Dec 17 15:52:24 2001 +++ xc/lib/Xt/NextEvent.c Tue Jun 4 17:55:42 2002 @@ -58,13 +58,13 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/NextEvent.c,v 3.24 2001/12/17 20:52:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/NextEvent.c,v 3.26 2002/06/04 21:55:42 dawes Exp $ */ #include "IntrinsicI.h" #include #include -#ifdef __EMX__ +#ifdef __UNIXOS2__ #include #endif @@ -1591,10 +1591,11 @@ TimerEventRec *te_ptr = app->timerQueue; app->timerQueue = app->timerQueue->te_next; te_ptr->te_next = NULL; - if (te_ptr->te_proc != NULL) + if (te_ptr->te_proc != NULL) { TeCallProc(te_ptr); + did_timer = True; + } LOCK_PROCESS; - did_timer = True; te_ptr->te_next = freeTimerRecs; freeTimerRecs = te_ptr; UNLOCK_PROCESS; Index: xc/lib/Xt/TMparse.c diff -u xc/lib/Xt/TMparse.c:3.8 xc/lib/Xt/TMparse.c:3.9 --- xc/lib/Xt/TMparse.c:3.8 Fri Dec 14 14:56:31 2001 +++ xc/lib/Xt/TMparse.c Fri May 31 14:45:46 2002 @@ -32,7 +32,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/TMparse.c,v 3.8 2001/12/14 19:56:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMparse.c,v 3.9 2002/05/31 18:45:46 dawes Exp $ */ /* @@ -369,7 +369,7 @@ }; -#ifndef __EMX__ +#ifndef __UNIXOS2__ #define IsNewline(str) ((str) == '\n') #else #define IsNewline(str) ((str) == '\n' || (str) == '\r') @@ -385,7 +385,7 @@ ('a' <= *(str) && *(str) <= 'z') || \ ('0' <= *(str) && *(str) <= '9')) (str)++ -#ifndef __EMX__ +#ifndef __UNIXOS2__ #define ScanWhitespace(str) \ while (*(str) == ' ' || *(str) == '\t') (str)++ #else @@ -1802,7 +1802,7 @@ int len; char *eol, *production, productionbuf[500]; -#ifdef __EMX__ +#ifdef __UNIXOS2__ eol = strchr(currentProduction, '\r'); if (!eol) /* try '\n' as well below */ #endif Index: xc/lib/Xt/Vendor.c diff -u xc/lib/Xt/Vendor.c:1.6 xc/lib/Xt/Vendor.c:1.7 --- xc/lib/Xt/Vendor.c:1.6 Fri Dec 14 14:56:32 2001 +++ xc/lib/Xt/Vendor.c Fri May 31 14:45:46 2002 @@ -46,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Vendor.c,v 1.6 2001/12/14 19:56:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Vendor.c,v 1.7 2002/05/31 18:45:46 dawes Exp $ */ /* Make sure all wm properties can make it out of the resource manager */ @@ -64,7 +64,7 @@ * ***************************************************************************/ -#ifdef __EMX__ +#ifdef __UNIXOS2__ /* to fix the EditRes problem because of wrong linker semantics */ extern WidgetClass vendorShellWidgetClass; unsigned long _DLL_InitTerm(unsigned long mod,unsigned long flag) Index: xc/lib/Xt/Xt-def.cpp diff -u xc/lib/Xt/Xt-def.cpp:1.1.1.2 xc/lib/Xt/Xt-def.cpp:1.2 --- xc/lib/Xt/Xt-def.cpp:1.1.1.2 Tue Jan 16 17:25:29 2001 +++ xc/lib/Xt/Xt-def.cpp Fri May 31 14:45:46 2002 @@ -338,4 +338,6 @@ XtWindow XtWindowOfObject XtWindowToWidget + _XtWaitForSomething /* $Xorg: Xt-def.cpp,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ +/* $XFree86: xc/lib/Xt/Xt-def.cpp,v 1.2 2002/05/31 18:45:46 dawes Exp $ */ Index: xc/lib/Xt/Xtos.h diff -u xc/lib/Xt/Xtos.h:3.9 xc/lib/Xt/Xtos.h:3.10 --- xc/lib/Xt/Xtos.h:3.9 Fri Dec 14 14:56:33 2001 +++ xc/lib/Xt/Xtos.h Thu Apr 4 09:05:35 2002 @@ -48,7 +48,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Xtos.h,v 3.9 2001/12/14 19:56:33 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Xtos.h,v 3.10 2002/04/04 14:05:35 eich Exp $ */ #ifndef _Xtos_h #define _Xtos_h @@ -65,7 +65,8 @@ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \ defined(__s390x__) || \ - (defined(__hppa__) && defined(__LP64__)) + (defined(__hppa__) && defined(__LP64__)) || \ + defined(__x86_64__) || defined(x86_64) #define LONG64 #endif Index: xc/lib/Xt/Xtos2.def diff -u xc/lib/Xt/Xtos2.def:3.7 xc/lib/Xt/Xtos2.def:removed --- xc/lib/Xt/Xtos2.def:3.7 Thu Apr 29 05:13:33 1999 +++ xc/lib/Xt/Xtos2.def Thu Feb 27 12:27:42 2003 @@ -1,475 +0,0 @@ -LIBRARY Xt INITINSTANCE TERMINSTANCE -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xt/Xtos2.def,v 3.7 1999/04/29 09:13:33 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 32768 -EXPORTS - XtAppAddActionHook @ 1 - XtRemoveActionHook @ 2 - XtMalloc @ 3 - XtRealloc @ 4 - XtCalloc @ 5 - XtFree @ 6 - XtMergeArgLists @ 7 - XtAddCallback @ 8 - XtAddCallbacks @ 9 - XtRemoveCallback @ 10 - XtRemoveCallbacks @ 11 - XtRemoveAllCallbacks @ 12 - XtCallCallbacks @ 13 - XtHasCallbacks @ 14 - XtCallCallbackList @ 15 - XtSetMultiClickTime @ 16 - XtGetMultiClickTime @ 17 - XtSetTypeConverter @ 18 - XtAppSetTypeConverter @ 19 - XtAddConverter @ 20 - XtAppAddConverter @ 21 - XtCallConverter @ 22 - XtConvert @ 23 - XtConvertAndStore @ 24 - XtAppReleaseCacheRefs @ 25 - XtCallbackReleaseCacheRefList @ 26 - XtCallbackReleaseCacheRef @ 27 - XtDisplayStringConversionWarning @ 28 - XtStringConversionWarning @ 29 - XtCvtIntToBoolean @ 30 - XtCvtIntToShort @ 31 - XtCvtStringToBoolean @ 32 - XtCvtIntToBool @ 33 - XtCvtStringToBool @ 34 - XtCvtIntToColor @ 35 - XtCvtStringToPixel @ 36 - XtCvtStringToCursor @ 37 - XtCvtStringToDisplay @ 38 - XtCvtStringToFile @ 39 - XtCvtIntToFloat @ 40 - XtCvtStringToFloat @ 41 - XtCvtStringToFont @ 42 - XtCvtIntToFont @ 43 - XtCvtStringToFontSet @ 44 - XtCvtStringToFontStruct @ 45 - XtCvtStringToInt @ 46 - XtCvtStringToShort @ 47 - XtCvtStringToDimension @ 48 - XtCvtIntToUnsignedChar @ 49 - XtCvtStringToUnsignedChar @ 50 - XtCvtColorToPixel @ 51 - XtCvtIntToPixel @ 52 - XtCvtIntToPixmap @ 53 - XtCvtStringToInitialState @ 54 - XtCvtStringToVisual @ 55 - XtCvtStringToAtom @ 56 - XtCvtStringToDirectoryString @ 57 - XtCvtStringToCommandArgArray @ 58 - XtInitializeWidgetClass @ 59 - XtCreateWidget @ 60 - XtCreateManagedWidget @ 61 - XtCreatePopupShell @ 62 - XtAppCreateShell @ 63 - XtCreateApplicationShell @ 64 - XtDestroyWidget @ 65 - XtOpenDisplay @ 66 - XtDisplayInitialize @ 67 - XtCreateApplicationContext @ 68 - XtDestroyApplicationContext @ 69 - XtDatabase @ 70 - XtDisplayToApplicationContext @ 71 - XtCloseDisplay @ 72 - XtWidgetToApplicationContext @ 73 - XtGetApplicationNameAndClass @ 74 - XtGetErrorDatabase @ 75 - XtAppGetErrorDatabase @ 76 - XtGetErrorDatabaseText @ 77 - XtAppGetErrorDatabaseText @ 78 - XtErrorMsg @ 79 - XtAppErrorMsg @ 80 - XtWarningMsg @ 81 - XtAppWarningMsg @ 82 - XtSetErrorMsgHandler @ 83 - XtAppSetErrorMsgHandler @ 84 - XtSetWarningMsgHandler @ 85 - XtAppSetWarningMsgHandler @ 86 - XtError @ 87 - XtAppError @ 88 - XtWarning @ 89 - XtAppWarning @ 90 - XtSetErrorHandler @ 91 - XtAppSetErrorHandler @ 92 - XtSetWarningHandler @ 93 - XtAppSetWarningHandler @ 94 - XtBuildEventMask @ 95 - XtRemoveEventHandler @ 96 - XtAddEventHandler @ 97 - XtInsertEventHandler @ 98 - XtRemoveRawEventHandler @ 99 - XtInsertRawEventHandler @ 100 - XtAddRawEventHandler @ 101 - XtWindowToWidget @ 102 - XtDispatchEvent @ 103 - XtAddGrab @ 104 - XtRemoveGrab @ 105 - XtMainLoop @ 106 - XtAppMainLoop @ 107 - XtAddExposureToRegion @ 108 - XtLastTimestampProcessed @ 109 - XtIsRectObj @ 110 - XtIsWidget @ 111 - XtIsComposite @ 112 - XtIsConstraint @ 113 - XtIsShell @ 114 - XtIsOverrideShell @ 115 - XtIsWMShell @ 116 - XtIsVendorShell @ 117 - XtIsTransientShell @ 118 - XtIsTopLevelShell @ 119 - XtIsApplicationShell @ 120 - XtMapWidget @ 121 - XtUnmapWidget @ 122 - XtNewString @ 123 - XtIsSessionShell @ 124 - XtAllocateGC @ 125 - XtGetGC @ 126 - XtReleaseGC @ 127 - XtDestroyGC @ 128 - XtMakeGeometryRequest @ 129 - XtMakeResizeRequest @ 130 - XtResizeWindow @ 131 - XtResizeWidget @ 132 - XtConfigureWidget @ 133 - XtMoveWidget @ 134 - XtTranslateCoords @ 135 - XtQueryGeometry @ 136 - XtGetActionKeysym @ 137 - XtGetResourceList @ 138 - XtGetConstraintResourceList @ 139 - XtGetValues @ 140 - XtGetSubvalues @ 141 - XtToolkitInitialize @ 142 - XtSetLanguageProc @ 143 - XtScreenDatabase @ 144 - XtAppSetFallbackResources @ 145 - XtAppInitialize @ 146 - XtInitialize @ 147 - XtOpenApplication @ 148 - XtIsSubclass @ 149 - XtRealizeWidget @ 150 - XtUnrealizeWidget @ 151 - XtCreateWindow @ 152 - XtNameToWidget @ 153 - XtDisplayOfObject @ 154 - XtDisplay @ 155 - XtScreenOfObject @ 156 - XtScreen @ 157 - XtWindowOfObject @ 158 - XtWindow @ 159 - XtSuperclass @ 160 - XtClass @ 161 - XtIsManaged @ 162 - XtIsRealized @ 163 - XtIsSensitive @ 164 - XtParent @ 165 - XtName @ 166 - XtIsObject @ 167 - XtFindFile @ 168 - XtResolvePathname @ 169 - XtCallAcceptFocus @ 170 - XtSetKeyboardFocus @ 171 - XtUnmanageChildren @ 172 - XtUnmanageChild @ 173 - XtManageChildren @ 174 - XtManageChild @ 175 - XtSetMappedWhenManaged @ 176 - XtAddTimeOut @ 177 - XtAppAddTimeOut @ 178 - XtRemoveTimeOut @ 179 - XtAddWorkProc @ 180 - XtAppAddWorkProc @ 181 - XtRemoveWorkProc @ 182 - XtAddInput @ 183 - XtAppAddInput @ 184 - XtRemoveInput @ 185 - XtNextEvent @ 186 - XtAppNextEvent @ 187 - XtProcessEvent @ 188 - XtAppProcessEvent @ 189 - XtPending @ 190 - XtAppPending @ 191 - XtPeekEvent @ 192 - XtAppPeekEvent @ 193 - XtGrabKey @ 194 - XtGrabButton @ 195 - XtUngrabKey @ 196 - XtUngrabButton @ 197 - XtGrabKeyboard @ 198 - XtUngrabKeyboard @ 199 - XtGrabPointer @ 200 - XtUngrabPointer @ 201 - XtPopup @ 202 - XtPopupSpringLoaded @ 203 - XtPopdown @ 204 - XtCallbackPopdown @ 205 - XtCallbackNone @ 206 - XtCallbackNonexclusive @ 207 - XtCallbackExclusive @ 208 - XtGetSubresources @ 209 - XtGetApplicationResources @ 210 - XtSetSelectionTimeout @ 211 - XtAppSetSelectionTimeout @ 212 - XtGetSelectionTimeout @ 213 - XtAppGetSelectionTimeout @ 214 - XtOwnSelection @ 215 - XtOwnSelectionIncremental @ 216 - XtDisownSelection @ 217 - XtGetSelectionValue @ 218 - XtGetSelectionValueIncremental @ 219 - XtGetSelectionValues @ 220 - XtGetSelectionValuesIncremental @ 221 - XtGetSelectionRequest @ 222 - XtSetSensitive @ 223 - XtSetSubvalues @ 224 - XtSetValues @ 225 - XtSetWMColormapWindows @ 226 - XtAddActions @ 227 - XtAppAddActions @ 228 - XtGetActionList @ 229 - XtMenuPopupAction @ 230 - XtCallActionProc @ 231 - XtRegisterGrabAction @ 232 - XtConvertCase @ 233 - XtTranslateKeycode @ 234 - XtTranslateKey @ 235 - XtSetKeyTranslator @ 236 - XtRegisterCaseConverter @ 237 - XtGetKeysymTable @ 238 - XtKeysymToKeycodeList @ 239 - XtCvtStringToAcceleratorTable @ 240 - XtCvtStringToTranslationTable @ 241 - XtParseAcceleratorTable @ 242 - XtParseTranslationTable @ 243 - XtUninstallTranslations @ 244 - XtInstallAccelerators @ 245 - XtInstallAllAccelerators @ 246 - XtAugmentTranslations @ 247 - XtOverrideTranslations @ 248 - XtVaCreateWidget @ 249 - XtVaCreateManagedWidget @ 250 - XtVaAppCreateShell @ 251 - XtVaCreatePopupShell @ 252 - XtVaSetValues @ 253 - XtVaSetSubvalues @ 254 - XtVaAppInitialize @ 255 - XtVaOpenApplication @ 256 - XtVaGetSubresources @ 257 - XtVaGetApplicationResources @ 258 - XtVaGetValues @ 259 - XtVaGetSubvalues @ 260 - XtVaCreateArgsList @ 261 - XtCvtStringToRestartStyle @ 262 - XtCvtStringToGravity @ 263 - XtAppSetExitFlag @ 264 - XtAppGetExitFlag @ 265 - XtGetDisplays @ 266 - XtRemoveEventTypeHandler @ 267 - XtInsertEventTypeHandler @ 268 - XtRegisterDrawable @ 269 - XtUnregisterDrawable @ 270 - XtDispatchEventToWidget @ 271 - XtLastEventProcessed @ 272 - XtSetEventDispatcher @ 273 - XtRegisterExtensionSelector @ 274 - XtAppAddBlockHook @ 275 - XtRemoveBlockHook @ 276 - XtHooksOfDisplay @ 277 - XtGetClassExtension @ 278 - XtGetKeyboardFocusWidget @ 279 - XtChangeManagedSet @ 280 - XtAddSignal @ 281 - XtAppAddSignal @ 282 - XtRemoveSignal @ 283 - XtNoticeSignal @ 284 - XtReservePropertyAtom @ 285 - XtReleasePropertyAtom @ 286 - XtCreateSelectionRequest @ 287 - XtSendSelectionRequest @ 288 - XtCancelSelectionRequest @ 289 - XtSetSelectionParameters @ 290 - XtGetSelectionParameters @ 291 - XtSessionGetToken @ 292 - XtSessionReturnToken @ 293 - XtAppLock @ 294 - XtAppUnlock @ 295 - XtProcessLock @ 296 - XtProcessUnlock @ 297 - XtToolkitThreadInitialize @ 298 - _XtDoFreeBindings @ 299 - _XtAllocError @ 300 - _XtHeapInit @ 301 - _XtHeapAlloc @ 302 - _XtHeapFree @ 303 - _XtAddCallback @ 304 - _XtAddCallbackOnce @ 305 - _XtRemoveCallback @ 306 - _XtRemoveAllCallbacks @ 307 - _XtCompileCallbackList @ 308 - _XtGetCallbackList @ 309 - _XtCallConditionalCallbackList @ 310 - _XtSetDefaultConverterTable @ 311 - _XtFreeConverterTable @ 312 - _XtTableAddConverter @ 313 - _XtCacheFlushTag @ 314 - _XtConvert @ 315 - _XtConvertInitialize @ 316 - _XtAddDefaultConverters @ 317 - _XtCreateWidget @ 318 - _XtCreatePopupShell @ 319 - _XtAppCreateShell @ 320 - _XtDoPhase2Destroy @ 321 - _XtGetProcessContext @ 322 - _XtDefaultAppContext @ 323 - _XtAppInit @ 324 - _XtDestroyAppContexts @ 325 - _XtSortPerDisplayList @ 326 - _XtCloseDisplays @ 327 - _XtDefaultErrorMsg @ 328 - _XtDefaultWarningMsg @ 329 - _XtDefaultError @ 330 - _XtDefaultWarning @ 331 - _XtSetDefaultErrorHandlers @ 332 - _XtAllocWWTable @ 333 - _XtFreeWWTable @ 334 - _XtConvertTypeToMask @ 335 - _XtOnGrabList @ 336 - _XtEventInitialize @ 337 - _XtFreeEventTable @ 338 - _XtSendFocusEvent @ 339 - _XtFreePerWidgetInput @ 340 - _XtGetPerWidgetInput @ 341 - _XtFillAncestorList @ 342 - _XtFindRemapWidget @ 343 - _XtUngrabBadGrabs @ 344 - _XtGClistFree @ 345 - _XtMakeGeometryRequest @ 346 - _XtInherit @ 347 - _XtPreparseCommandLine @ 348 - _XtDisplayInitialize @ 349 - _XtCheckSubclassFlag @ 350 - _XtIsSubclassOf @ 351 - _XtWindowedAncestor @ 352 - _XtProcessKeyboardEvent @ 353 - _XtHandleFocus @ 354 - _XtRemoveAllInputs @ 355 - _XtRefreshMapping @ 356 - _XtDestroyServerGrabs @ 357 - _XtCheckServerGrabsOnWidget @ 358 - _XtProcessPointerEvent @ 359 - _XtPopup @ 360 - _XtCopyFromParent @ 361 - _XtCopyFromArg @ 362 - _XtCopyToArg @ 363 - _XtCompileResourceList @ 364 - _XtDependencies @ 365 - _XtResourceDependencies @ 366 - _XtConstraintResDependencies @ 367 - _XtCreateIndirectionTable @ 368 - _XtGetResources @ 369 - _XtResourceListInitialize @ 370 - _XtSetDefaultSelectionTimeout @ 371 - _XtShellGetCoordinates @ 372 - _XtInitializeActionData @ 373 - _XtBindActions @ 374 - _XtUnbindActions @ 375 - _XtFreeActions @ 376 - _XtRegisterGrabs @ 377 - _XtGrabInitialize @ 378 - _XtComputeLateBindings @ 379 - _XtAllocTMContext @ 380 - _XtMatchUsingDontCareMods @ 381 - _XtMatchUsingStandardMods @ 382 - _XtBuildKeysymTables @ 383 - _XtTranslateInitialize @ 384 - _XtAddTMConverters @ 385 - _XtPrintXlations @ 386 - _XtDisplayTranslations @ 387 - _XtDisplayAccelerators @ 388 - _XtDisplayInstalledAccelerators @ 389 - _XtPrintActions @ 390 - _XtPrintState @ 391 - _XtPrintEventSeq @ 392 - _XtGetQuarkIndex @ 393 - _XtGetTypeIndex @ 394 - _XtGetModifierIndex @ 395 - _XtRegularMatch @ 396 - _XtMatchAtom @ 397 - _XtTranslateEvent @ 398 - _XtTraverseStateTree @ 399 - _XtInstallTranslations @ 400 - _XtRemoveTranslations @ 401 - _XtDestroyTMData @ 402 - _XtCreateXlations @ 403 - _XtParseTreeToStateTree @ 404 - _XtAddEventSeqToStateTree @ 405 - _XtCvtMergeTranslations @ 406 - _XtGetTranslationValue @ 407 - _XtRemoveStateTreeByIndex @ 408 - _XtFreeTranslations @ 409 - _XtMergeTranslations @ 410 - _XtUnmergeTranslations @ 411 - _XtPopupInitialize @ 412 - _XtVaAppInitialize @ 413 - _XtVaOpenApplication @ 414 - _XtCountVaList @ 415 - _XtVaCreateTypedArgList @ 416 - _XtVaToArgList @ 417 - _XtVaToTypedArgList @ 418 - _XtPeekCallback @ 419 - _XtCreateHookObj @ 420 - _XtGetPerDisplay @ 421 - _XtGetPerDisplayInput @ 422 - _XtExtensionSelect @ 423 - _XtAddShellToHookObj @ 424 - _XtIsHookObject @ 425 - _XtGetUserName @ 426 - _XtWaitForSomething @ 427 - XtDirectConvert @ 433 - colorConvertArgs @ 435 - screenConvertArg @ 436 - XtCXtToolkitError @ 437 - _XtQString @ 438 - _XtAppDestroyCount @ 439 - _XtperDisplayList @ 440 - _XtGlobalTM @ 444 - XtStrings @ 445 - overrideShellClassRec @ 446 - overrideShellWidgetClass @ 447 - constraintClassRec @ 448 - constraintWidgetClass @ 449 - objectClassRec @ 450 - objectClass @ 451 - widgetClassRec @ 452 - widgetClass @ 453 - rectObjClassRec @ 454 - rectObjClass @ 455 - coreWidgetClass @ 457 - wmShellClassRec @ 458 - wmShellWidgetClass @ 459 - XtShellStrings @ 460 - topLevelShellClassRec @ 461 - topLevelShellWidgetClass @ 462 - transientShellClassRec @ 463 - transientShellWidgetClass @ 464 - shellClassRec @ 465 - shellWidgetClass @ 466 - compositeClassRec @ 467 - compositeWidgetClass @ 468 - applicationShellClassRec @ 469 - applicationShellWidgetClass @ 470 - _XtInheritTranslations @ 471 - sessionShellClassRec @ 472 - sessionShellWidgetClass @ 473 - vendorShellClassRec @ 474 - vendorShellWidgetClass @ 475 - hookObjClassRec @ 476 - hookObjectClass @ 477 Index: xc/lib/Xt/Xtos2.rsp diff -u xc/lib/Xt/Xtos2.rsp:3.3 xc/lib/Xt/Xtos2.rsp:removed --- xc/lib/Xt/Xtos2.rsp:3.3 Thu Apr 29 05:13:34 1999 +++ xc/lib/Xt/Xtos2.rsp Thu Feb 27 12:27:42 2003 @@ -1,12 +0,0 @@ -ActionHook.obj Alloc.obj ArgList.obj Callback.obj ClickTime.obj Composite.obj+ -Constraint.obj Convert.obj Converters.obj Core.obj Create.obj Destroy.obj+ -Display.obj Error.obj Event.obj EventUtil.obj Functions.obj GCManager.obj+ -Geometry.obj GetActKey.obj GetResList.obj GetValues.obj HookObj.obj Hooks.obj+ -Initialize.obj Intrinsic.obj Keyboard.obj Manage.obj NextEvent.obj Object.obj+ -PassivGrab.obj Pointer.obj Popup.obj PopupCB.obj RectObj.obj Resources.obj+ -ResConfig.obj Selection.obj SetSens.obj SetValues.obj SetWMCW.obj Shell.obj+ -StringDefs.obj TMaction.obj TMgrab.obj TMkey.obj TMparse.obj TMprint.obj+ -TMstate.obj Threads.obj VarCreate.obj VarGet.obj Varargs.obj Vendor.obj+ -/NOI /NOL /NOD /BAT -Xt.dll -Xt.map Index: xc/lib/Xt/sharedlib.c diff -u xc/lib/Xt/sharedlib.c:3.6 xc/lib/Xt/sharedlib.c:3.7 --- xc/lib/Xt/sharedlib.c:3.6 Fri Dec 14 14:56:33 2001 +++ xc/lib/Xt/sharedlib.c Fri May 31 14:45:46 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/sharedlib.c,v 3.6 2001/12/14 19:56:33 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/sharedlib.c,v 3.7 2002/05/31 18:45:46 dawes Exp $ */ #if (defined(SUNSHLIB) || defined(AIXSHLIB)) && !defined(SHAREDCODE) #include "IntrinsicI.h" @@ -35,7 +35,7 @@ #include "CreateI.h" -#if defined(AIXSHLIB) || defined(__EMX__) +#if defined(AIXSHLIB) || defined(__UNIXOS2__) WidgetClass vendorShellWidgetClass = (WidgetClass) &vendorShellClassRec; static void _XtVendorInitialize() Index: xc/lib/Xtst/XRecord.c diff -u xc/lib/Xtst/XRecord.c:1.4 xc/lib/Xtst/XRecord.c:1.6 --- xc/lib/Xtst/XRecord.c:1.4 Fri Dec 14 14:56:39 2001 +++ xc/lib/Xtst/XRecord.c Tue Oct 15 20:37:33 2002 @@ -50,17 +50,17 @@ /* * By Stephen Gildea, X Consortium, and Martha Zimet, NCD. */ -/* $XFree86: xc/lib/Xtst/XRecord.c,v 1.4 2001/12/14 19:56:39 dawes Exp $ */ +/* $XFree86: xc/lib/Xtst/XRecord.c,v 1.6 2002/10/16 00:37:33 dawes Exp $ */ #include #include #define NEED_EVENTS #define NEED_REPLIES #include -#include "Xext.h" +#include #include -#include "extutil.h" -#include "recordstr.h" +#include +#include extern unsigned long _XSetLastRequestRead(); @@ -822,7 +822,7 @@ if (current_index + datum_bytes > rep->length << 2) fprintf(stderr, "XRecord: %lu-byte reply claims %d-byte element (seq %lu)\n", - rep->length << 2, current_index + datum_bytes, + (long)rep->length << 2, current_index + datum_bytes, dpy->last_request_read); /* * This assignment (and indeed the whole buffer sharing Index: xc/lib/Xtst/XTest.c diff -u xc/lib/Xtst/XTest.c:1.5 xc/lib/Xtst/XTest.c:1.6 --- xc/lib/Xtst/XTest.c:1.5 Fri Dec 14 14:56:40 2001 +++ xc/lib/Xtst/XTest.c Tue Oct 15 20:37:33 2002 @@ -30,16 +30,16 @@ from The Open Group. */ -/* $XFree86: xc/lib/Xtst/XTest.c,v 1.5 2001/12/14 19:56:40 dawes Exp $ */ +/* $XFree86: xc/lib/Xtst/XTest.c,v 1.6 2002/10/16 00:37:33 dawes Exp $ */ #define NEED_REPLIES -#include "Xlibint.h" -#include "XTest.h" -#include "xteststr.h" -#include "Xext.h" -#include "extutil.h" -#include "XInput.h" -#include "XIproto.h" +#include +#include +#include +#include +#include +#include +#include static XExtensionInfo _xtest_info_data; static XExtensionInfo *xtest_info = &_xtest_info_data; Index: xc/lib/Xtst/Xtstos2.def diff -u xc/lib/Xtst/Xtstos2.def:3.5 xc/lib/Xtst/Xtstos2.def:removed --- xc/lib/Xtst/Xtstos2.def:3.5 Thu Apr 29 05:13:34 1999 +++ xc/lib/Xtst/Xtstos2.def Thu Feb 27 12:27:43 2003 @@ -1,37 +0,0 @@ -LIBRARY XTST -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xtst/Xtstos2.def,v 3.5 1999/04/29 09:13:34 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - XTestCompareCurrentCursorWithWindow @ 1 - XTestCompareCursorWithWindow @ 2 - XTestDiscard @ 3 - XTestFakeButtonEvent @ 4 - XTestFakeDeviceButtonEvent @ 5 - XTestFakeDeviceKeyEvent @ 6 - XTestFakeDeviceMotionEvent @ 7 - XTestFakeKeyEvent @ 8 - XTestFakeMotionEvent @ 9 - XTestFakeProximityEvent @ 10 - XTestFakeRelativeMotionEvent @ 11 - XTestGrabControl @ 12 - XTestQueryExtension @ 13 - XTestSetGContextOfGC @ 14 - XTestSetVisualIDOfVisual @ 15 - XRecordIdBaseMask @ 16 - XRecordQueryVersion @ 17 - XRecordCreateContext @ 18 - XRecordAllocRange @ 19 - XRecordRegisterClients @ 20 - XRecordUnregisterClients @ 21 - XRecordGetContext @ 22 - XRecordFreeState @ 23 - XRecordFreeData @ 24 - XRecordEnableContext @ 25 - XRecordEnableContextAsync @ 26 - XRecordProcessReplies @ 27 - XRecordDisableContext @ 28 - XRecordFreeContext @ 29 Index: xc/lib/Xtst/Xtstos2.rsp diff -u xc/lib/Xtst/Xtstos2.rsp:3.2 xc/lib/Xtst/Xtstos2.rsp:removed --- xc/lib/Xtst/Xtstos2.rsp:3.2 Fri May 10 02:55:38 1996 +++ xc/lib/Xtst/Xtstos2.rsp Thu Feb 27 12:27:43 2003 @@ -1,3 +0,0 @@ -Xtest.obj XRecord.obj /NOL /NOD /BAT -Xtst.dll -Xtst.map Index: xc/lib/Xv/Imakefile diff -u xc/lib/Xv/Imakefile:1.5 xc/lib/Xv/Imakefile:1.8 --- xc/lib/Xv/Imakefile:1.5 Sun May 23 04:23:10 1999 +++ xc/lib/Xv/Imakefile Fri Jan 3 21:48:24 2003 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xv/Imakefile,v 1.5 1999/05/23 08:23:10 dawes Exp $ +XCOMM $XFree86: xc/lib/Xv/Imakefile,v 1.8 2003/01/04 02:48:24 dawes Exp $ #define DoNormalLib NormalLibXv #define DoSharedLib SharedLibXv @@ -19,10 +19,11 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = Xv.c OBJS = Xv.o LINTLIBS = $(LINTXLIB) + +#define IncludeSharedObjectInNormalLib #include Index: xc/lib/Xv/Xv-def.cpp diff -u /dev/null xc/lib/Xv/Xv-def.cpp:1.1 --- /dev/null Thu Feb 27 12:27:44 2003 +++ xc/lib/Xv/Xv-def.cpp Mon Sep 30 18:02:17 2002 @@ -0,0 +1,27 @@ +LIBRARY Xv +VERSION LIBRARY_VERSION +EXPORTS +XvCreateImage +XvFreeAdaptorInfo +XvFreeEncodingInfo +XvGetPortAttribute +XvGetStill +XvGetVideo +XvGrabPort +XvListImageFormats +XvPutImage +XvPutStill +XvPutVideo +XvQueryAdaptors +XvQueryBestSize +XvQueryEncodings +XvQueryExtension +XvQueryPortAttributes +XvSelectPortNotify +XvSelectVideoNotify +XvSetPortAttribute +XvShmCreateImage +XvShmPutImage +XvStopVideo +XvUngrabPort +/* $XFree86: xc/lib/Xv/Xv-def.cpp,v 1.1 2002/09/30 22:02:17 alanh Exp $ */ Index: xc/lib/Xv/Xv.c diff -u xc/lib/Xv/Xv.c:1.15 xc/lib/Xv/Xv.c:1.16 --- xc/lib/Xv/Xv.c:1.15 Fri May 11 04:23:22 2001 +++ xc/lib/Xv/Xv.c Tue Oct 15 20:37:33 2002 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xv/Xv.c,v 1.15 2001/05/11 08:23:22 alanh Exp $ */ +/* $XFree86: xc/lib/Xv/Xv.c,v 1.16 2002/10/16 00:37:33 dawes Exp $ */ /* ** File: ** @@ -52,9 +52,9 @@ #include #include "Xvlibint.h" -#include "Xext.h" -#include "extutil.h" -#include "XShm.h" +#include +#include +#include static XExtensionInfo _xv_info_data; static XExtensionInfo *xv_info = &_xv_info_data; Index: xc/lib/Xv/Xvlibint.h diff -u xc/lib/Xv/Xvlibint.h:1.5 xc/lib/Xv/Xvlibint.h:1.6 --- xc/lib/Xv/Xvlibint.h:1.5 Wed Jul 25 11:04:53 2001 +++ xc/lib/Xv/Xvlibint.h Tue Oct 15 20:37:33 2002 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xv/Xvlibint.h,v 1.5 2001/07/25 15:04:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xv/Xvlibint.h,v 1.6 2002/10/16 00:37:33 dawes Exp $ */ #ifndef XVLIBINT_H #define XVLIBINT_H @@ -43,9 +43,9 @@ #define NEED_REPLIES -#include "Xlibint.h" -#include "Xvproto.h" -#include "Xvlib.h" +#include +#include +#include #if !defined(UNIXCPP) #define XvGetReq(name, req) \ Index: xc/lib/XvMC/Imakefile diff -u xc/lib/XvMC/Imakefile:1.4 xc/lib/XvMC/Imakefile:1.5 --- xc/lib/XvMC/Imakefile:1.4 Tue Oct 9 03:46:46 2001 +++ xc/lib/XvMC/Imakefile Tue Oct 15 20:37:33 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/XvMC/Imakefile,v 1.4 2001/10/09 07:46:46 alanh Exp $ +XCOMM $XFree86: xc/lib/XvMC/Imakefile,v 1.5 2002/10/16 00:37:33 dawes Exp $ #define DoNormalLib NormalLibXvMC #define DoSharedLib SharedLibXvMC @@ -19,7 +19,6 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = XvMC.c OBJS = XvMC.o LINTLIBS = $(LINTXLIB) Index: xc/lib/XvMC/XvMC.c diff -u xc/lib/XvMC/XvMC.c:1.4 xc/lib/XvMC/XvMC.c:1.5 --- xc/lib/XvMC/XvMC.c:1.4 Wed Nov 14 16:54:38 2001 +++ xc/lib/XvMC/XvMC.c Tue Oct 15 20:37:33 2002 @@ -1,11 +1,11 @@ -/* $XFree86: xc/lib/XvMC/XvMC.c,v 1.4 2001/11/14 21:54:38 mvojkovi Exp $ */ +/* $XFree86: xc/lib/XvMC/XvMC.c,v 1.5 2002/10/16 00:37:33 dawes Exp $ */ #define NEED_REPLIES #include #include "XvMClibint.h" -#include "Xext.h" -#include "extutil.h" +#include +#include static XExtensionInfo _xvmc_info_data; static XExtensionInfo *xvmc_info = &_xvmc_info_data; Index: xc/lib/XvMC/XvMClibint.h diff -u xc/lib/XvMC/XvMClibint.h:1.4 xc/lib/XvMC/XvMClibint.h:1.5 --- xc/lib/XvMC/XvMClibint.h:1.4 Wed Jul 25 11:04:54 2001 +++ xc/lib/XvMC/XvMClibint.h Tue Oct 15 20:37:33 2002 @@ -1,13 +1,13 @@ -/* $XFree86: xc/lib/XvMC/XvMClibint.h,v 1.4 2001/07/25 15:04:54 dawes Exp $ */ +/* $XFree86: xc/lib/XvMC/XvMClibint.h,v 1.5 2002/10/16 00:37:33 dawes Exp $ */ #ifndef _XVMCLIBINT_H #define _XVMCLIBINT_H #define NEED_REPLIES -#include "Xlibint.h" -#include "Xvproto.h" -#include "XvMCproto.h" -#include "XvMClib.h" +#include +#include +#include +#include #define XvMCCheckExtension(dpy, i, val) \ XextCheckExtension(dpy, i, xvmc_extension_name, val) Index: xc/lib/XvMC/hw/i810/I810XvMC.c diff -u xc/lib/XvMC/hw/i810/I810XvMC.c:1.7 xc/lib/XvMC/hw/i810/I810XvMC.c:1.11 --- xc/lib/XvMC/hw/i810/I810XvMC.c:1.7 Mon Dec 17 23:23:55 2001 +++ xc/lib/XvMC/hw/i810/I810XvMC.c Tue Nov 19 04:35:49 2002 @@ -33,7 +33,7 @@ ** ** ***************************************************************************/ -/* $XFree86: xc/lib/XvMC/hw/i810/I810XvMC.c,v 1.7 2001/12/18 04:23:55 dawes Exp $ */ +/* $XFree86: xc/lib/XvMC/hw/i810/I810XvMC.c,v 1.11 2002/11/19 09:35:49 alanh Exp $ */ #include #include #include @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include #include @@ -67,13 +67,13 @@ // Returns: drmBufPtr containing the information about the allocated page. ***************************************************************************/ drmBufPtr i810_get_free_buffer(i810XvMCContext *pI810XvMC) { - drm_i810_dma_t dma; + drmI810DMA dma; drmBufPtr buf; dma.granted = 0; dma.request_size = 4096; while(!dma.granted) { - if(GET_BUFFER(pI810XvMC, &dma) || !dma.granted) + if(GET_BUFFER(pI810XvMC, dma) || !dma.granted) FLUSH(pI810XvMC); } /* No DMA granted */ @@ -224,7 +224,7 @@ /* Get magic number and put it in privData for passing */ drmGetMagic(pI810XvMC->fd,&magic); - context->flags = (uint)magic; + context->flags = (unsigned long)magic; /* Pass control to the X server to create a drmContext for us and @@ -494,7 +494,7 @@ U and V surfaces. */ pI810Surface->offsets[0] = priv_data[0]; - if(((uint)pI810Surface->data + pI810Surface->offsets[0]) & 4095) { + if(((unsigned long)pI810Surface->data + pI810Surface->offsets[0]) & 4095) { printf("XvMCCreateSurface: Surface offset 0 is not 4096 aligned\n"); } @@ -507,13 +507,13 @@ else { /* Planar surface */ pI810Surface->offsets[1] = priv_data[1]; - if(((uint)pI810Surface->data + pI810Surface->offsets[1]) & 2047) { + if(((unsigned long)pI810Surface->data + pI810Surface->offsets[1]) & 2047) { printf("XvMCCreateSurface: Surface offset 1 is not 2048 aligned\n"); } - pI810Surface->offsets[2] = ((uint)pI810Surface->offsets[1] + + pI810Surface->offsets[2] = ((unsigned long)pI810Surface->offsets[1] + (1<<(pI810Surface->pitch - 1)) * 288); - if(((uint)pI810Surface->data + pI810Surface->offsets[2]) & 2047) { + if(((unsigned long)pI810Surface->data + pI810Surface->offsets[2]) & 2047) { printf("XvMCCreateSurface: Surface offset 2 is not 2048 aligned\n"); } @@ -523,9 +523,8 @@ free(priv_data); /* Clear the surface to 0 */ - memset((void *)((unsigned int)pI810Surface->data + - (unsigned int)pI810Surface->offsets[0]),0, - ((1<pitch) * surface->height)); + memset((void *)((unsigned long)pI810Surface->data + (unsigned long)pI810Surface->offsets[0]), + 0, ((1<pitch) * surface->height)); switch(surface->surface_type_id) { case FOURCC_YV12: @@ -735,12 +734,12 @@ #define PACK_CORR_DATA(d,b,n) \ memcpy(d,b,n); \ - d = (uint *)((uint)d + n); + d = (uint *)((unsigned long)d + n); #define MARK_CORR_DATA(d,n) \ do { \ - uint* q = (uint*)((uint)d - n); \ - while((uint)q < (uint)d) { \ + uint* q = (uint*)((unsigned long)d - n); \ + while((unsigned long)q < (unsigned long)d) { \ *q++ += 0x00330033; \ } \ }while(0); @@ -762,21 +761,21 @@ do { \ short *t = top,*b = bottom; \ PACK_CORR_DATA(d,t,16); \ - t = (short *)((uint)t + 16); \ + t = (short *)((unsigned long)t + 16); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 16); \ + b = (short *)((unsigned long)b + 16); \ PACK_CORR_DATA(d,t,16); \ - t = (short *)((uint)t + 16); \ + t = (short *)((unsigned long)t + 16); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 16); \ + b = (short *)((unsigned long)b + 16); \ PACK_CORR_DATA(d,t,16); \ - t = (short *)((uint)t + 16); \ + t = (short *)((unsigned long)t + 16); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 16); \ + b = (short *)((unsigned long)b + 16); \ PACK_CORR_DATA(d,t,16); \ - t = (short *)((uint)t + 16); \ + t = (short *)((unsigned long)t + 16); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 16); \ + b = (short *)((unsigned long)b + 16); \ }while(0); /* Used for DCT 0 when we need DCT 1. */ @@ -784,34 +783,34 @@ do{ \ short *t = top,*b = bottom; \ PACK_CORR_DATA(d,t,16); \ - t = (short *)((uint)t + 32); \ + t = (short *)((unsigned long)t + 32); \ PACK_CORR_DATA(d,t,16); \ - t = (short *)((uint)t + 32); \ + t = (short *)((unsigned long)t + 32); \ PACK_CORR_DATA(d,t,16); \ - t = (short *)((uint)t + 32); \ + t = (short *)((unsigned long)t + 32); \ PACK_CORR_DATA(d,t,16); \ - t = (short *)((uint)t + 32); \ + t = (short *)((unsigned long)t + 32); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 32); \ + b = (short *)((unsigned long)b + 32); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 32); \ + b = (short *)((unsigned long)b + 32); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 32); \ + b = (short *)((unsigned long)b + 32); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 32); \ + b = (short *)((unsigned long)b + 32); \ }while(0); #define PACK_CORR_DATA_SHORT(d,block) \ do { \ short *b = block; \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 32); \ + b = (short *)((unsigned long)b + 32); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 32); \ + b = (short *)((unsigned long)b + 32); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 32); \ + b = (short *)((unsigned long)b + 32); \ PACK_CORR_DATA(d,b,16); \ - b = (short *)((uint)b + 32); \ + b = (short *)((unsigned long)b + 32); \ }while(0); /* Lookup tables to speed common calculations */ @@ -989,10 +988,10 @@ *data++ = privFuture->mi3y; mc.idx = pDMA->idx; - mc.used = (uint)data - (uint)pDMA->address; + mc.used = (unsigned long)data - (unsigned long)pDMA->address; mc.last_render = ++pI810XvMC->last_render; privTarget->last_render = pI810XvMC->last_render; - I810_MC(pI810XvMC,&mc); + I810_MC(pI810XvMC,mc); } static __inline__ void renderError(void) { @@ -1253,7 +1252,7 @@ *dy++ = *(uint *)fmv; *dy++ = *(uint *)bmv; PACK_CORR_DATA(dy,block_ptr,ysize); - block_ptr = (short *)((uint)block_ptr + ysize); + block_ptr = (short *)((unsigned long)block_ptr + ysize); /* End Y Blocks */ fmv[0] /= 2; @@ -1270,7 +1269,7 @@ *du++ = *(uint *)fmv; *du++ = *(uint *)bmv; PACK_CORR_DATA(du,block_ptr,usize); - block_ptr = (short *)((uint)block_ptr + usize); + block_ptr = (short *)((unsigned long)block_ptr + usize); /* V Block */ *dv++ = GFXBLOCK + 4 + (vsize>>2); @@ -1280,7 +1279,7 @@ *dv++ = *(uint *)fmv; *dv++ = *(uint *)bmv; PACK_CORR_DATA(dv,block_ptr,vsize); - block_ptr = (short *)((uint)block_ptr + vsize); + block_ptr = (short *)((unsigned long)block_ptr + vsize); *datay = dy; *datau = du; @@ -1401,7 +1400,7 @@ *dy++ = *(uint *)fmv; *dy++ = *(uint *)bmv; PACK_CORR_DATA(dy,block_ptr,y1size); - block_ptr = (short *)((uint)block_ptr + y1size); + block_ptr = (short *)((unsigned long)block_ptr + y1size); /* Second Y Block */ *dy++ = GFXBLOCK + 4 + (y2size>>2); @@ -1411,7 +1410,7 @@ *dy++ = *(uint *)&fmv[2]; *dy++ = *(uint *)&bmv[2]; PACK_CORR_DATA(dy,block_ptr,y2size); - block_ptr = (short *)((uint)block_ptr + y2size); + block_ptr = (short *)((unsigned long)block_ptr + y2size); /* End Y Blocks */ fmv[0] /= 2; @@ -1434,7 +1433,7 @@ *du++ = *(uint *)fmv; *du++ = *(uint *)bmv; PACK_CORR_DATA(du,block_ptr,usize); - block_ptr = (short *)((uint)block_ptr + usize); + block_ptr = (short *)((unsigned long)block_ptr + usize); /* Second U block */ *du++ = GFXBLOCK + 4 + (usize>>2); @@ -1444,7 +1443,7 @@ *du++ = *(uint *)&fmv[2]; *du++ = *(uint *)&bmv[2]; PACK_CORR_DATA(du,block_ptr,usize); - block_ptr = (short *)((uint)block_ptr + usize); + block_ptr = (short *)((unsigned long)block_ptr + usize); /* End U Blocks */ /* V Blocks */ @@ -1455,7 +1454,7 @@ *dv++ = *(uint *)fmv; *dv++ = *(uint *)bmv; PACK_CORR_DATA(dv,block_ptr,vsize); - block_ptr = (short *)((uint)block_ptr + vsize); + block_ptr = (short *)((unsigned long)block_ptr + vsize); /* Second V Block */ *dv++ = GFXBLOCK + 4 + (vsize>>2); @@ -1465,7 +1464,7 @@ *dv++ = *(uint *)&fmv[2]; *dv++ = *(uint *)&bmv[2]; PACK_CORR_DATA(dv,block_ptr,vsize); - block_ptr = (short *)((uint)block_ptr + vsize); + block_ptr = (short *)((unsigned long)block_ptr + vsize); /* End V Blocks */ *datay = dy; @@ -1520,7 +1519,7 @@ *dy++ = *(uint *)fmv; *dy++ = *(uint *)bmv; PACK_CORR_DATA(dy,block_ptr,ysize); - block_ptr = (short *)((uint)block_ptr + ysize); + block_ptr = (short *)((unsigned long)block_ptr + ysize); /* End Y Blocks */ fmv[0] /= 2; @@ -1537,7 +1536,7 @@ *du++ = *(uint *)fmv; *du++ = *(uint *)bmv; PACK_CORR_DATA(du,block_ptr,usize); - block_ptr = (short *)((uint)block_ptr + usize); + block_ptr = (short *)((unsigned long)block_ptr + usize); /* V Block */ *dv++ = GFXBLOCK + 4 + (vsize>>2); @@ -1547,7 +1546,7 @@ *dv++ = *(uint *)fmv; *dv++ = *(uint *)bmv; PACK_CORR_DATA(dv,block_ptr,vsize); - block_ptr = (short *)((uint)block_ptr + vsize); + block_ptr = (short *)((unsigned long)block_ptr + vsize); *datay = dy; *datau = du; @@ -1608,7 +1607,7 @@ *dy++ = *(uint *)&fmv[0]; *dy++ = *(uint *)&bmv[0]; PACK_CORR_DATA(dy,block_ptr,y1size); - block_ptr = (short *)((uint)block_ptr + y1size); + block_ptr = (short *)((unsigned long)block_ptr + y1size); /* Second Y Block */ *dy++ = GFXBLOCK + 4 + (y2size>>2); @@ -1618,7 +1617,7 @@ *dy++ = *(uint *)&fmv[2]; *dy++ = *(uint *)&bmv[2]; PACK_CORR_DATA(dy,block_ptr,y2size); - block_ptr = (short *)((uint)block_ptr + y2size); + block_ptr = (short *)((unsigned long)block_ptr + y2size); /* End Y Blocks */ fmv[0] /= 2; @@ -1652,9 +1651,9 @@ *du++ = *(uint *)&fmv[2]; *du++ = *(uint *)&bmv[2]; if(usize) { - block_ptr = (short *)((uint)block_ptr + 16); + block_ptr = (short *)((unsigned long)block_ptr + 16); PACK_CORR_DATA_SHORT(du,block_ptr); - block_ptr = (short *)((uint)block_ptr + 112); + block_ptr = (short *)((unsigned long)block_ptr + 112); } /* End U Blocks */ @@ -1677,9 +1676,9 @@ *dv++ = *(uint *)&fmv[2]; *dv++ = *(uint *)&bmv[2]; if(vsize) { - block_ptr = (short *)((uint)block_ptr + 16); + block_ptr = (short *)((unsigned long)block_ptr + 16); PACK_CORR_DATA_SHORT(dv,block_ptr); - block_ptr = (short *)((uint)block_ptr + 112); + block_ptr = (short *)((unsigned long)block_ptr + 112); } /* End V Blocks */ @@ -1790,13 +1789,13 @@ *dy++ = *(uint *)&fmv[2]; *dy++ = *(uint *)&bmv[2]; if(dw1[1] & (1<<27)) { - top_left_b = (short *)((uint)top_left_b + 16); - bottom_left_b = (short *)((uint)bottom_left_b + 16); + top_left_b = (short *)((unsigned long)top_left_b + 16); + bottom_left_b = (short *)((unsigned long)bottom_left_b + 16); PACK_CORR_DATA_0to1(dy,top_left_b,bottom_left_b); } if(dw1[1] & (1<<26)) { - top_right_b = (short *)((uint)top_right_b + 16); - bottom_right_b = (short *)((uint)bottom_right_b + 16); + top_right_b = (short *)((unsigned long)top_right_b + 16); + bottom_right_b = (short *)((unsigned long)bottom_right_b + 16); PACK_CORR_DATA_0to1(dy,top_right_b,bottom_right_b); } /* End Y Blocks */ @@ -1832,9 +1831,9 @@ *du++ = *(uint *)&fmv[2]; *du++ = *(uint *)&bmv[2]; if(usize) { - block_ptr = (short *)((uint)block_ptr + 16); + block_ptr = (short *)((unsigned long)block_ptr + 16); PACK_CORR_DATA_SHORT(du,block_ptr); - block_ptr = (short *)((uint)block_ptr + 112); + block_ptr = (short *)((unsigned long)block_ptr + 112); } /* End U Blocks */ @@ -1857,9 +1856,9 @@ *dv++ = *(uint *)&fmv[2]; *dv++ = *(uint *)&bmv[2]; if(vsize) { - block_ptr = (short *)((uint)block_ptr + 16); + block_ptr = (short *)((unsigned long)block_ptr + 16); PACK_CORR_DATA_SHORT(dv,block_ptr); - block_ptr = (short *)((uint)block_ptr + 112); + block_ptr = (short *)((unsigned long)block_ptr + 112); } /* End V Blocks */ @@ -1912,7 +1911,7 @@ *dy++ = *(uint *)fmv; *dy++ = *(uint *)bmv; PACK_CORR_DATA(dy,block_ptr,ysize); - block_ptr = (short *)((uint)block_ptr + ysize); + block_ptr = (short *)((unsigned long)block_ptr + ysize); /* End Y Blocks */ fmv[0] /= 2; @@ -1931,7 +1930,7 @@ *du++ = *(uint *)fmv; *du++ = *(uint *)bmv; PACK_CORR_DATA(du,block_ptr,usize); - block_ptr = (short *)((uint)block_ptr + usize); + block_ptr = (short *)((unsigned long)block_ptr + usize); /* End U Block */ /* V Block */ @@ -1942,7 +1941,7 @@ *dv++ = *(uint *)fmv; *dv++ = *(uint *)bmv; PACK_CORR_DATA(dv,block_ptr,vsize); - block_ptr = (short *)((uint)block_ptr + vsize); + block_ptr = (short *)((unsigned long)block_ptr + vsize); /* End V Block */ *datay = dy; @@ -2031,13 +2030,13 @@ *dy++ = *(uint *)bmv; if(dw1 & (1<<27)) { PACK_CORR_DATA_1to0(dy,top_left_b,bottom_left_b); - top_left_b = (short *)((uint)top_left_b + 64); - bottom_left_b = (short *)((uint)bottom_left_b + 64); + top_left_b = (short *)((unsigned long)top_left_b + 64); + bottom_left_b = (short *)((unsigned long)bottom_left_b + 64); } if(dw1 & (1<<26)) { PACK_CORR_DATA_1to0(dy,top_right_b,bottom_right_b); - top_right_b = (short *)((uint)top_right_b + 64); - bottom_right_b = (short *)((uint)bottom_right_b + 64); + top_right_b = (short *)((unsigned long)top_right_b + 64); + bottom_right_b = (short *)((unsigned long)bottom_right_b + 64); } if(dw1 & (1<<27)) { PACK_CORR_DATA_1to0(dy,top_left_b,bottom_left_b); @@ -2063,7 +2062,7 @@ *du++ = *(uint *)fmv; *du++ = *(uint *)bmv; PACK_CORR_DATA(du,block_ptr,usize); - block_ptr = (short *)((uint)block_ptr + usize); + block_ptr = (short *)((unsigned long)block_ptr + usize); /* V Block */ *dv++ = GFXBLOCK + 4 + (vsize>>2); @@ -2073,7 +2072,7 @@ *dv++ = *(uint *)fmv; *dv++ = *(uint *)bmv; PACK_CORR_DATA(dv,block_ptr,vsize); - block_ptr = (short *)((uint)block_ptr + vsize); + block_ptr = (short *)((unsigned long)block_ptr + vsize); *datay = dy; *datau = du; @@ -2134,7 +2133,7 @@ *dy++ = *(uint *)fmv; *dy++ = *(uint *)bmv;; PACK_CORR_DATA(dy,block_ptr,y1size); - block_ptr = (short *)((uint)block_ptr + y1size); + block_ptr = (short *)((unsigned long)block_ptr + y1size); /* Second Y Block */ *dy++ = GFXBLOCK + 4 + (y2size>>2); @@ -2144,7 +2143,7 @@ *dy++ = *(uint *)&fmv[2]; *dy++ = *(uint *)&bmv[2]; PACK_CORR_DATA(dy,block_ptr,y2size); - block_ptr = (short *)((uint)block_ptr + y2size); + block_ptr = (short *)((unsigned long)block_ptr + y2size); fmv[0] /= 2; fmv[1] /= 2; @@ -2177,9 +2176,9 @@ *du++ = *(uint *)&fmv[2]; *du++ = *(uint *)&bmv[2]; if(dw1[1] & (1<<23)) { - block_ptr = (short *)((uint)block_ptr + 16); + block_ptr = (short *)((unsigned long)block_ptr + 16); PACK_CORR_DATA_SHORT(du,block_ptr); - block_ptr = (short *)((uint)block_ptr + 112); + block_ptr = (short *)((unsigned long)block_ptr + 112); } /* End U Blocks */ @@ -2202,9 +2201,9 @@ *dv++ = *(uint *)&fmv[2]; *dv++ = *(uint *)&bmv[2]; if(dw1[1] & (1<<22)) { - block_ptr = (short *)((uint)block_ptr + 16); + block_ptr = (short *)((unsigned long)block_ptr + 16); PACK_CORR_DATA_SHORT(dv,block_ptr); - block_ptr = (short *)((uint)block_ptr + 112); + block_ptr = (short *)((unsigned long)block_ptr + 112); } /* End V Blocks */ @@ -2317,13 +2316,13 @@ *dy++ = *(uint *)&fmv[2]; *dy++ = *(uint *)&bmv[2]; if(cbp & 0x20) { - top_left_b = (short *)((uint)top_left_b + 16); - bottom_left_b = (short *)((uint)bottom_left_b + 16); + top_left_b = (short *)((unsigned long)top_left_b + 16); + bottom_left_b = (short *)((unsigned long)bottom_left_b + 16); PACK_CORR_DATA_0to1(dy,top_left_b,bottom_left_b); } if(cbp & 0x10) { - top_right_b = (short *)((uint)top_right_b + 16); - bottom_right_b = (short *)((uint)bottom_right_b + 16); + top_right_b = (short *)((unsigned long)top_right_b + 16); + bottom_right_b = (short *)((unsigned long)bottom_right_b + 16); PACK_CORR_DATA_0to1(dy,top_right_b,bottom_right_b); } /* End Y Blocks */ @@ -2360,9 +2359,9 @@ *du++ = *(uint *)&fmv[2]; *du++ = *(uint *)&bmv[2]; if(cbp & (1<<23)) { - block_ptr = (short *)((uint)block_ptr + 16); + block_ptr = (short *)((unsigned long)block_ptr + 16); PACK_CORR_DATA_SHORT(du,block_ptr); - block_ptr = (short *)((uint)block_ptr + 112); + block_ptr = (short *)((unsigned long)block_ptr + 112); } /* End U Blocks */ @@ -2385,9 +2384,9 @@ *dv++ = *(uint *)&fmv[2]; *dv++ = *(uint *)&bmv[2]; if(cbp & (1<<22)) { - block_ptr = (short *)((uint)block_ptr + 16); + block_ptr = (short *)((unsigned long)block_ptr + 16); PACK_CORR_DATA_SHORT(dv,block_ptr); - block_ptr = (short *)((uint)block_ptr + 112); + block_ptr = (short *)((unsigned long)block_ptr + 112); } /* End V Blocks */ @@ -2534,7 +2533,7 @@ /* If buffers are almost full dispatch them */ if(datay) { - pDMAy->used = (uint)datay - (uint)pDMAy->address; + pDMAy->used = (unsigned long)datay - (unsigned long)pDMAy->address; if(pDMAy->used > 3520) { if(dirty_context) { dispatchYContext(privTarget,privPast,privFuture,pI810XvMC); @@ -2545,11 +2544,11 @@ datay = NULL; mc.last_render = ++pI810XvMC->last_render; privTarget->last_render = pI810XvMC->last_render; - I810_MC(pI810XvMC,&mc); + I810_MC(pI810XvMC,mc); } /* datay near full */ } /* if(datay) */ if(datau) { - pDMAu[u_index]->used = (uint)datau - (uint)pDMAu[u_index]->address; + pDMAu[u_index]->used = (unsigned long)datau - (unsigned long)pDMAu[u_index]->address; if(pDMAu[u_index]->used > 3904) { u_index++; datau = NULL; @@ -2559,7 +2558,7 @@ mc.used = pDMAu[j]->used; mc.last_render = ++pI810XvMC->last_render; privTarget->last_render = pI810XvMC->last_render; - I810_MC(pI810XvMC,&mc); + I810_MC(pI810XvMC,mc); } u_index = 0; dirty_context = 1; @@ -2567,7 +2566,7 @@ } /* datau near full */ } /* if(datau) */ if(datav) { - pDMAv[v_index]->used = (uint)datav - (uint)pDMAv[v_index]->address; + pDMAv[v_index]->used = (unsigned long)datav - (unsigned long)pDMAv[v_index]->address; if(pDMAv[v_index]->used > 3904) { v_index++; datav = NULL; @@ -2577,7 +2576,7 @@ mc.used = pDMAv[j]->used; mc.last_render = ++pI810XvMC->last_render; privTarget->last_render = pI810XvMC->last_render; - I810_MC(pI810XvMC,&mc); + I810_MC(pI810XvMC,mc); } v_index = 0; dirty_context = 1; @@ -2757,26 +2756,26 @@ dispatchYContext(privTarget,privPast,privFuture,pI810XvMC); } mc.idx = pDMAy->idx; - mc.used = (uint)datay - (uint)pDMAy->address; + mc.used = (unsigned long)datay - (unsigned long)pDMAy->address; mc.last_render = ++pI810XvMC->last_render; privTarget->last_render = pI810XvMC->last_render; - I810_MC(pI810XvMC,&mc); + I810_MC(pI810XvMC,mc); - pDMAu[u_index]->used = (uint)datau - (uint)pDMAu[u_index]->address; + pDMAu[u_index]->used = (unsigned long)datau - (unsigned long)pDMAu[u_index]->address; for(j=0; j<=u_index; j++) { mc.idx = pDMAu[j]->idx; mc.used = pDMAu[j]->used; mc.last_render = ++pI810XvMC->last_render; privTarget->last_render = pI810XvMC->last_render; - I810_MC(pI810XvMC,&mc); + I810_MC(pI810XvMC,mc); } - pDMAv[v_index]->used = (uint)datav - (uint)pDMAv[v_index]->address; + pDMAv[v_index]->used = (unsigned long)datav - (unsigned long)pDMAv[v_index]->address; for(j=0; j<=v_index; j++) { mc.idx = pDMAv[j]->idx; mc.used = pDMAv[j]->used; mc.last_render = ++pI810XvMC->last_render; privTarget->last_render = pI810XvMC->last_render; - I810_MC(pI810XvMC,&mc); + I810_MC(pI810XvMC,mc); } I810_UNLOCK(pI810XvMC); @@ -3132,20 +3131,20 @@ /* buffer locations, add the offset from the clipping */ if(pI810XvMC->current) { - pORegs->OBUF_1Y = (uint)pI810Surface->offset + - (uint)pI810Surface->offsets[0] + ysrc_offset; - pORegs->OBUF_1V = (uint)pI810Surface->offset + - (uint)pI810Surface->offsets[2] + uvsrc_offset; - pORegs->OBUF_1U = (uint)pI810Surface->offset + - (uint)pI810Surface->offsets[1] + uvsrc_offset; + pORegs->OBUF_1Y = (unsigned long)pI810Surface->offset + + (unsigned long)pI810Surface->offsets[0] + ysrc_offset; + pORegs->OBUF_1V = (unsigned long)pI810Surface->offset + + (unsigned long)pI810Surface->offsets[2] + uvsrc_offset; + pORegs->OBUF_1U = (unsigned long)pI810Surface->offset + + (unsigned long)pI810Surface->offsets[1] + uvsrc_offset; } else { - pORegs->OBUF_0Y = (uint)pI810Surface->offset + - (uint)pI810Surface->offsets[0] + ysrc_offset; - pORegs->OBUF_0V = (uint)pI810Surface->offset + - (uint)pI810Surface->offsets[2] + uvsrc_offset; - pORegs->OBUF_0U = (uint)pI810Surface->offset + - (uint)pI810Surface->offsets[1] + uvsrc_offset; + pORegs->OBUF_0Y = (unsigned long)pI810Surface->offset + + (unsigned long)pI810Surface->offsets[0] + ysrc_offset; + pORegs->OBUF_0V = (unsigned long)pI810Surface->offset + + (unsigned long)pI810Surface->offsets[2] + uvsrc_offset; + pORegs->OBUF_0U = (unsigned long)pI810Surface->offset + + (unsigned long)pI810Surface->offsets[1] + uvsrc_offset; } switch(surface->surface_type_id) { @@ -3546,7 +3545,7 @@ address (Client memeory address) or offset (physical offset from fb base) */ pI810Subpicture->offsets[0] = priv_data[0]; - if(((uint)pI810Subpicture->data + pI810Subpicture->offsets[0]) & 4095) { + if(((unsigned long)pI810Subpicture->data + pI810Subpicture->offsets[0]) & 4095) { printf("XvMCCreateSubpicture: Subpicture offset 0 is not 4096 aligned\n"); } @@ -3554,9 +3553,8 @@ free(priv_data); /* Clear the surface to 0 */ - memset((void *)((unsigned int)pI810Subpicture->data + - (unsigned int)pI810Subpicture->offsets[0]),0, - ((1<pitch) * subpicture->height)); + memset((void *)((unsigned long)pI810Subpicture->data + (unsigned long)pI810Subpicture->offsets[0]), + 0, ((1<pitch) * subpicture->height)); switch(subpicture->xvimage_id) { case FOURCC_IA44: @@ -3634,8 +3632,8 @@ } for(i=y; idata + - (uint)pI810Subpicture->offsets[0] + x + + memset((void *)((unsigned long)pI810Subpicture->data + + (unsigned long)pI810Subpicture->offsets[0] + x + (1<pitch) * i),(char)color,width); } @@ -3698,11 +3696,11 @@ } for(i=0; idata + - (uint)pI810Subpicture->offsets[0] + dstx + + memcpy((void *)((unsigned long)pI810Subpicture->data + + (unsigned long)pI810Subpicture->offsets[0] + dstx + (1<pitch) * (i + dsty)), - (void *)((uint)image->data + - (uint)image->offsets[0] + srcx + + (void *)((unsigned long)image->data + + (unsigned long)image->offsets[0] + srcx + image->pitches[0] * (i + srcy)) ,width); } @@ -4027,9 +4025,9 @@ *data++ = (2<<29) | (0x43<<22) | 0x4; *data++ = (0xcc<<16) | (1<<26) | (1<<(privTarget->pitch - 1)); *data++ = (target_surface->height<<15) | (target_surface->width>>1); - *data++ = (uint)privTarget->offset + (uint)privTarget->offsets[1]; + *data++ = (unsigned long)privTarget->offset + (unsigned long)privTarget->offsets[1]; *data++ = (1<<(privSource->pitch - 1)); - *data++ = (uint)privSource->offset + (uint)privSource->offsets[1]; + *data++ = (unsigned long)privSource->offset + (unsigned long)privSource->offsets[1]; /* Context 1 select */ *data++ = CMD_FLUSH; @@ -4116,9 +4114,9 @@ *data++ = (2<<29) | (0x43<<22) | 0x4; *data++ = (0xcc<<16) | (1<<26) | (1<<(privTarget->pitch - 1)); *data++ = (target_surface->height<<15) | (target_surface->width>>1); - *data++ = (uint)privTarget->offset + (uint)privTarget->offsets[2]; + *data++ = (unsigned long)privTarget->offset + (unsigned long)privTarget->offsets[2]; *data++ = (1<<(privSource->pitch - 1)); - *data++ = (uint)privSource->offset + (uint)privSource->offsets[2]; + *data++ = (unsigned long)privSource->offset + (unsigned long)privSource->offsets[2]; /* Context 1 select */ *data++ = CMD_FLUSH; @@ -4203,12 +4201,12 @@ /* Dispatch */ - pDMA->used = (uint)data - (uint)pDMA->address; + pDMA->used = (unsigned long)data - (unsigned long)pDMA->address; mc.idx = pDMA->idx; mc.used = pDMA->used; mc.last_render = ++pI810XvMC->last_render; privTarget->last_render = pI810XvMC->last_render; - I810_MC(pI810XvMC,&mc); + I810_MC(pI810XvMC,mc); I810_UNLOCK(pI810XvMC); return Success; Index: xc/lib/XvMC/hw/i810/I810XvMC.h diff -u xc/lib/XvMC/hw/i810/I810XvMC.h:1.2 xc/lib/XvMC/hw/i810/I810XvMC.h:1.4 --- xc/lib/XvMC/hw/i810/I810XvMC.h:1.2 Mon Dec 17 23:23:56 2001 +++ xc/lib/XvMC/hw/i810/I810XvMC.h Tue Nov 19 04:35:49 2002 @@ -32,7 +32,7 @@ * * ***************************************************************************/ -/* $XFree86: xc/lib/XvMC/hw/i810/I810XvMC.h,v 1.2 2001/12/18 04:23:56 dawes Exp $ */ +/* $XFree86: xc/lib/XvMC/hw/i810/I810XvMC.h,v 1.4 2002/11/19 09:35:49 alanh Exp $ */ #ifndef I810XVMC_H @@ -41,8 +41,9 @@ /* #define XVMC_DEBUG(x) do {x; }while(0); */ #define XVMC_DEBUG(x) -#include -#include +#include "xf86drm.h" +#include "i810_common.h" +#include /*************************************************************************** @@ -217,15 +218,6 @@ #define I810_DEFAULT16_COLORKEY 31 #define I810_DMA_BUF_NR 256 -/* IOCTL Numbers, these are defined in the kernel drm sources. */ -#define I810_IOCTL_OV0INFO 0x49 -#define I810_IOCTL_FSTATUS 0x4a -#define I810_IOCTL_OV0FLIP 0x4b -#define I810_IOCTL_MC 0x4c -#define I810_IOCTL_RSTATUS 0x4d -#define I810_IOCTL_FLUSH 0x43 -#define I810_IOCTL_GETBUF 0x45 - /* COMMANDS */ #define CMD_FLUSH ((4<<23) | 0x1) #define BOOLEAN_ENA_1 ((3<<29) | (3<<24) | (3<<2)) @@ -334,14 +326,13 @@ } \ }while(0); -/* IOCTLs */ -#define OVERLAY_INFO(c,i) ioctl(c->fd ,I810_IOCTL_OV0INFO, i) -#define OVERLAY_FLIP(c) ioctl(c->fd , I810_IOCTL_OV0FLIP) -#define GET_FSTATUS(c) ioctl(c->fd , I810_IOCTL_FSTATUS) -#define I810_MC(c,mc) ioctl(c->fd, I810_IOCTL_MC, mc) -#define GET_RSTATUS(c) ioctl(c->fd, I810_IOCTL_RSTATUS) -#define GET_BUFFER(c,dma) ioctl(c->fd, I810_IOCTL_GETBUF ,dma) -#define FLUSH(c) ioctl(c->fd, I810_IOCTL_FLUSH) +#define OVERLAY_INFO(c,i) drmCommandRead(c->fd, DRM_I810_OV0INFO, &i, sizeof(i)) +#define OVERLAY_FLIP(c) drmCommandNone(c->fd, DRM_I810_OV0FLIP) +#define GET_FSTATUS(c) drmCommandNone(c->fd, DRM_I810_FSTATUS) +#define I810_MC(c,mc) drmCommandWrite(c->fd, DRM_I810_MC, &mc, sizeof(mc)) +#define GET_RSTATUS(c) drmCommandNone(c->fd, DRM_I810_RSTATUS) +#define GET_BUFFER(c,dma) drmCommandWriteRead(c->fd, DRM_I810_GETBUF, &dma, sizeof(drmI810DMA)) +#define FLUSH(c) drmCommandNone(c->fd, DRM_I810_FLUSH) /* Definitions for temporary wire protocol hooks to be replaced Index: xc/lib/XvMC/hw/i810/Imakefile diff -u xc/lib/XvMC/hw/i810/Imakefile:1.1 xc/lib/XvMC/hw/i810/Imakefile:1.3 --- xc/lib/XvMC/hw/i810/Imakefile:1.1 Thu Sep 27 04:25:03 2001 +++ xc/lib/XvMC/hw/i810/Imakefile Wed Oct 30 13:42:57 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/XvMC/hw/i810/Imakefile,v 1.1 2001/09/27 08:25:03 alanh Exp $ +XCOMM $XFree86: xc/lib/XvMC/hw/i810/Imakefile,v 1.3 2002/10/30 18:42:57 alanh Exp $ #define DoNormalLib NormalLibXvMC #define DoSharedLib SharedLibXvMC #define DoDebugLib DebugLibXvMC @@ -19,11 +19,10 @@ DEFINES = $(ALLOC_DEFINES) -DTRUE=1 -DFALSE=0 INCLUDES = -I$(XINCLUDESRC) -I$(INCLUDESRC) -I$(XLIBSRC) -I$(EXTINCSRC) \ - -I$(XF86COMSRC) -I$(XF86OSSRC) -I$(XF86OSSRC)/linux/drm \ - -I$(XF86OSSRC)/linux/drm/kernel + -I$(XF86COMSRC) -I$(XF86OSSRC) -I$(XF86OSSRC)/linux/drm/kernel \ + -I$(XF86DRIVERSRC)/i810 SRCS = I810XvMC.c - OBJS = I810XvMC.o xf86drm.o xf86drmHash.o xf86drmI810.o \ - xf86drmRandom.o xf86drmSL.o + OBJS = I810XvMC.o xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o LINTLIBS = $(LINTXLIB) @@ -37,7 +36,6 @@ LinkSourceFile(xf86drmHash.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) LinkSourceFile(xf86drmRandom.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) LinkSourceFile(xf86drmSL.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) -LinkSourceFile(xf86drmI810.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) #endif Index: xc/lib/Xxf86dga/Imakefile diff -u xc/lib/Xxf86dga/Imakefile:3.2 xc/lib/Xxf86dga/Imakefile:3.5 --- xc/lib/Xxf86dga/Imakefile:3.2 Sun Mar 28 10:31:35 1999 +++ xc/lib/Xxf86dga/Imakefile Fri Jan 3 21:48:25 2003 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xxf86dga/Imakefile,v 3.2 1999/03/28 15:31:35 dawes Exp $ +XCOMM $XFree86: xc/lib/Xxf86dga/Imakefile,v 3.5 2003/01/04 02:48:25 dawes Exp $ #define DoNormalLib NormalLibXxf86dga #define DoSharedLib SharedLibXxf86dga #define DoExtraLib SharedLibXxf86dga @@ -22,10 +22,11 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = $(XF86DGASRCS) OBJS = $(XF86DGAOBJS) LINTLIBS = $(LINTXLIB) + +#define IncludeSharedObjectInNormalLib #include Index: xc/lib/Xxf86dga/XF86DGA.c diff -u xc/lib/Xxf86dga/XF86DGA.c:3.19 xc/lib/Xxf86dga/XF86DGA.c:3.22 --- xc/lib/Xxf86dga/XF86DGA.c:3.19 Fri Aug 17 22:41:30 2001 +++ xc/lib/Xxf86dga/XF86DGA.c Fri Dec 13 23:41:12 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86dga/XF86DGA.c,v 3.19 2001/08/18 02:41:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xxf86dga/XF86DGA.c,v 3.22 2002/12/14 04:41:12 dawes Exp $ */ /* Copyright (c) 1995 Jon Tombs @@ -8,7 +8,7 @@ /* THIS IS NOT AN X CONSORTIUM STANDARD */ -#ifdef __EMX__ /* needed here to override certain constants in X headers */ +#ifdef __UNIXOS2__ /* needed here to override certain constants in X headers */ #define INCL_DOS #define INCL_DOSIOCTL #include @@ -59,11 +59,11 @@ #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "xf86dga.h" -#include "xf86dgastr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include +#include extern XExtDisplayInfo* xdga_find_display(Display*); extern char *xdga_extension_name; @@ -358,14 +358,14 @@ # include #else -# if !defined(Lynx) -# if !defined(__EMX__) -# include -# endif -# else +# if defined(Lynx) && defined(NO_MMAP) # include # include # include +# else +# if !defined(__UNIXOS2__) +# include +# endif # endif #endif #include @@ -469,7 +469,7 @@ MapPtr mp; #if defined(ISC) && defined(HAS_SVR3_MMAP) struct kd_memloc mloc; -#elif defined(__EMX__) +#elif defined(__UNIXOS2__) APIRET rc; ULONG action; HFILE hfd; @@ -513,7 +513,7 @@ if ((vaddr = (void *)ioctl(mapFd, MAP, &mloc)) == (void *)-1) return NULL; -#elif defined (__EMX__) +#elif defined (__UNIXOS2__) /* * Dragon warning here! /dev/pmap$ is never closed, except on progam exit. * Consecutive calling of this routine will make PMAP$ driver run out @@ -547,7 +547,7 @@ } if (rc != 0) return NULL; -#elif defined (Lynx) +#elif defined(Lynx) && defined(NO_MMAP) vaddr = (void *)smem_create("XF86DGA", (char *)offset, size + delta, SM_READ|SM_WRITE); #else @@ -622,17 +622,19 @@ mp = sp->map; if (enable & XF86DGADirectGraphics) { -#if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \ - && !defined(__EMX__) +#if !defined(ISC) && !defined(HAS_SVR3_MMAP) \ + && !(defined(Lynx) && defined(NO_MMAP)) \ + && !defined(__UNIXOS2__) if (mp && mp->vaddr) mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ | PROT_WRITE); #endif } else { -#if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \ - && !defined(__EMX__) +#if !defined(ISC) && !defined(HAS_SVR3_MMAP) \ + && !(defined(Lynx) && defined(NO_MMAP)) \ + && !defined(__UNIXOS2__) if (mp && mp->vaddr) mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ); -#elif defined(Lynx) +#elif defined(Lynx) && defined(NO_MMAP) /* XXX this doesn't allow enable after disable */ smem_create(NULL, mp->vaddr, mp->size + mp->delta, SM_DETACH); smem_remove("XF86DGA"); Index: xc/lib/Xxf86dga/XF86DGA2.c diff -u xc/lib/Xxf86dga/XF86DGA2.c:1.18 xc/lib/Xxf86dga/XF86DGA2.c:1.21 --- xc/lib/Xxf86dga/XF86DGA2.c:1.18 Fri Aug 17 09:27:51 2001 +++ xc/lib/Xxf86dga/XF86DGA2.c Fri Dec 13 23:41:12 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86dga/XF86DGA2.c,v 1.18 2001/08/17 13:27:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xxf86dga/XF86DGA2.c,v 1.21 2002/12/14 04:41:12 dawes Exp $ */ /* Copyright (c) 1995 Jon Tombs @@ -8,7 +8,7 @@ /* THIS IS NOT AN X CONSORTIUM STANDARD */ -#ifdef __EMX__ /* needed here to override certain constants in X headers */ +#ifdef __UNIXOS2__ /* needed here to override certain constants in X headers */ #define INCL_DOS #define INCL_DOSIOCTL #include @@ -16,11 +16,11 @@ #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "xf86dga.h" -#include "xf86dgastr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include +#include #include @@ -726,14 +726,14 @@ # include #else -# if !defined(Lynx) -# if !defined(__EMX__) -# include -# endif -# else +# if defined(Lynx) && defined(NO_MMAP) # include # include # include +# else +# if !defined(__UNIXOS2__) +# include +# endif # endif #endif #include @@ -861,7 +861,7 @@ ) { #if defined(ISC) && defined(HAS_SVR3_MMAP) struct kd_memloc mloc; -#elif defined(__EMX__) +#elif defined(__UNIXOS2__) APIRET rc; ULONG action; HFILE hfd; @@ -883,7 +883,7 @@ if ((pMap->virtual = (void *)ioctl(pMap->fd, MAP, &mloc)) == (void *)-1) return False; -#elif defined (__EMX__) +#elif defined (__UNIXOS2__) /* * Dragon warning here! /dev/pmap$ is never closed, except on progam exit. * Consecutive calling of this routine will make PMAP$ driver run out @@ -917,7 +917,7 @@ } if (rc != 0) return False; -#elif defined (Lynx) +#elif defined (Lynx) && defined(NO_MMAP) pMap->virtual = smem_create("XF86DGA", (char*)base, size, SM_READ|SM_WRITE); #else #ifndef MAP_FILE @@ -933,8 +933,9 @@ return False; #endif -#if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \ - && !defined(__EMX__) +#if !defined(ISC) && !defined(HAS_SVR3_MMAP) \ + && !(defined(Lynx) && defined(NO_MMAP)) \ + && !defined(__UNIXOS2__) mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE); #endif @@ -946,10 +947,11 @@ static void DGAUnmapPhysical(DGAMapPtr pMap) { -#if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \ - && !defined(__EMX__) +#if !defined(ISC) && !defined(HAS_SVR3_MMAP) \ + && !(defined(Lynx) && defined(NO_MMAP)) \ + && !defined(__UNIXOS2__) mprotect(pMap->virtual,pMap->size, PROT_READ); -#elif defined(Lynx) +#elif defined(Lynx) && defined(NO_MMAP) /* XXX this doesn't allow enable after disable */ smem_create(NULL, pMap->virtual, pMap->size, SM_DETACH); smem_remove("XF86DGA"); Index: xc/lib/Xxf86dga/Xxf86dgaos2.def diff -u xc/lib/Xxf86dga/Xxf86dgaos2.def:3.2 xc/lib/Xxf86dga/Xxf86dgaos2.def:removed --- xc/lib/Xxf86dga/Xxf86dgaos2.def:3.2 Thu Apr 29 05:13:35 1999 +++ xc/lib/Xxf86dga/Xxf86dgaos2.def Thu Feb 27 12:27:45 2003 @@ -1,18 +0,0 @@ -LIBRARY XXF86DGA -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xxf86dga/Xxf86dgaos2.def,v 3.2 1999/04/29 09:13:35 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - XF86DGAQueryExtension @ 1 - XF86DGAQueryVersion @ 2 - XF86DGAGetVideoLL @ 3 - XF86DGADirectVideoLL @ 4 - XF86DGAGetViewPort @ 5 - XF86DGASetViewPort @ 6 - XF86DGAGetVidPage @ 7 - XF86DGASetVidPage @ 8 - XF86DGADirectVideo @ 9 - XF86DGAGetVideo @ 10 Index: xc/lib/Xxf86dga/Xxf86dgaos2.rsp diff -u xc/lib/Xxf86dga/Xxf86dgaos2.rsp:3.0 xc/lib/Xxf86dga/Xxf86dgaos2.rsp:removed --- xc/lib/Xxf86dga/Xxf86dgaos2.rsp:3.0 Wed Jan 24 16:58:43 1996 +++ xc/lib/Xxf86dga/Xxf86dgaos2.rsp Thu Feb 27 12:27:45 2003 @@ -1,3 +0,0 @@ -XF86DGA.obj /NOL /NOD /BAT -Xxf86dga.dll - Index: xc/lib/Xxf86misc/Imakefile diff -u xc/lib/Xxf86misc/Imakefile:3.1 xc/lib/Xxf86misc/Imakefile:3.4 --- xc/lib/Xxf86misc/Imakefile:3.1 Sun Dec 20 06:57:13 1998 +++ xc/lib/Xxf86misc/Imakefile Fri Jan 3 21:48:25 2003 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xxf86misc/Imakefile,v 3.1 1998/12/20 11:57:13 dawes Exp $ +XCOMM $XFree86: xc/lib/Xxf86misc/Imakefile,v 3.4 2003/01/04 02:48:25 dawes Exp $ #define DoNormalLib NormalLibXxf86misc #define DoSharedLib SharedLibXxf86misc #define DoExtraLib SharedLibXxf86misc @@ -22,10 +22,11 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = $(XF86MISCSRCS) OBJS = $(XF86MISCOBJS) LINTLIBS = $(LINTXLIB) + +#define IncludeSharedObjectInNormalLib #include Index: xc/lib/Xxf86misc/XF86Misc.c diff -u xc/lib/Xxf86misc/XF86Misc.c:3.9 xc/lib/Xxf86misc/XF86Misc.c:3.12 --- xc/lib/Xxf86misc/XF86Misc.c:3.9 Sat Oct 27 23:32:42 2001 +++ xc/lib/Xxf86misc/XF86Misc.c Tue Nov 19 23:04:57 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86misc/XF86Misc.c,v 3.9 2001/10/28 03:32:42 tsi Exp $ */ +/* $XFree86: xc/lib/Xxf86misc/XF86Misc.c,v 3.12 2002/11/20 04:04:57 dawes Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc @@ -8,10 +8,10 @@ #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "xf86mscstr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include static XExtensionInfo _xf86misc_info_data; static XExtensionInfo *xf86misc_info = &_xf86misc_info_data; @@ -26,7 +26,8 @@ * * *****************************************************************************/ -static int close_display(); +static int close_display(Display *dpy, XExtCodes *codes); + static /* const */ XExtensionHooks xf86misc_extension_hooks = { NULL, /* create_gc */ NULL, /* copy_gc */ @@ -80,7 +81,6 @@ xXF86MiscQueryVersionReq *req; XF86MiscCheckExtension (dpy, info, False); - LockDisplay(dpy); GetReq(XF86MiscQueryVersion, req); req->reqType = info->codes->major_opcode; @@ -94,9 +94,31 @@ *minorVersion = rep.minorVersion; UnlockDisplay(dpy); SyncHandle(); + if (*majorVersion > 0 || *minorVersion > 5) + XF86MiscSetClientVersion(dpy); + return True; } +Bool +XF86MiscSetClientVersion(Display *dpy) +{ + XExtDisplayInfo *info = find_display(dpy); + xXF86MiscSetClientVersionReq *req; + + XF86MiscCheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(XF86MiscSetClientVersion, req); + req->reqType = info->codes->major_opcode; + req->xf86miscReqType = X_XF86MiscSetClientVersion; + req->major = XF86MISC_MAJOR_VERSION; + req->minor = XF86MISC_MINOR_VERSION; + UnlockDisplay(dpy); + SyncHandle(); + return True; +} + Bool XF86MiscGetMouseSettings(dpy, mouseinfo) Display* dpy; XF86MiscMouseSettings *mouseinfo; @@ -179,11 +201,14 @@ { XExtDisplayInfo *info = find_display (dpy); xXF86MiscSetMouseSettingsReq *req; - + int majorVersion, minorVersion; + XF86MiscCheckExtension (dpy, info, False); - + XF86MiscQueryVersion(dpy, &majorVersion, &minorVersion); + LockDisplay(dpy); GetReq(XF86MiscSetMouseSettings, req); + req->reqType = info->codes->major_opcode; req->xf86miscReqType = X_XF86MiscSetMouseSettings; req->mousetype = mouseinfo->type; @@ -195,7 +220,16 @@ req->emulate3timeout = mouseinfo->emulate3timeout; req->chordmiddle = mouseinfo->chordmiddle; req->flags = mouseinfo->flags; - + if (majorVersion > 0 || minorVersion > 5) { + int len; + if ((len = strlen(mouseinfo->device))) { + req->devnamelen = len + 1; + len = (req->devnamelen + 3) >> 2; + SetReqLen(req,len,len); + Data(dpy, mouseinfo->device, req->devnamelen); + } + } + UnlockDisplay(dpy); SyncHandle(); return True; @@ -249,3 +283,74 @@ SyncHandle(); return rep.status; } + +Bool XF86MiscGetFilePaths(dpy, filpaths) + Display* dpy; + XF86MiscFilePaths *filpaths; +{ + XExtDisplayInfo *info = find_display (dpy); + xXF86MiscGetFilePathsReply rep; + xXF86MiscGetFilePathsReq *req; + + XF86MiscCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(XF86MiscGetFilePaths, req); + req->reqType = info->codes->major_opcode; + req->xf86miscReqType = X_XF86MiscGetFilePaths; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + + if (rep.configlen) { + if (!(filpaths->configfile = Xcalloc(rep.configlen + 1, 1))) { + _XEatData(dpy, ((rep.configlen+3) & ~3) + ((rep.modulelen+3) & ~3) + + ((rep.loglen+3) & ~3)); + return False; + } + } + + if (rep.modulelen) { + if (!(filpaths->modulepath = Xcalloc(rep.modulelen + 1, 1))) { + _XEatData(dpy, ((rep.configlen+3) & ~3) + ((rep.modulelen+3) & ~3) + + ((rep.loglen+3) & ~3)); + if (filpaths->configfile) + Xfree(filpaths->configfile); + return False; + } + } + + if (rep.loglen) { + if (!(filpaths->logfile = Xcalloc(rep.loglen + 1, 1))) { + _XEatData(dpy, ((rep.configlen+3) & ~3) + ((rep.modulelen+3) & ~3) + + ((rep.loglen+3) & ~3)); + if (filpaths->configfile) + Xfree(filpaths->configfile); + if (filpaths->modulepath) + Xfree(filpaths->modulepath); + return False; + } + } + + if (rep.configlen) + _XReadPad(dpy, filpaths->configfile, rep.configlen); + else + filpaths->configfile = ""; + + if (rep.modulelen) + _XReadPad(dpy, filpaths->modulepath, rep.modulelen); + else + filpaths->modulepath = ""; + + if (rep.loglen) + _XReadPad(dpy, filpaths->logfile, rep.loglen); + else + filpaths->logfile = ""; + + UnlockDisplay(dpy); + SyncHandle(); + return True; +} + Index: xc/lib/Xxf86misc/Xxf86misc-def.cpp diff -u xc/lib/Xxf86misc/Xxf86misc-def.cpp:1.1 xc/lib/Xxf86misc/Xxf86misc-def.cpp:1.2 --- xc/lib/Xxf86misc/Xxf86misc-def.cpp:1.1 Wed Aug 9 19:40:14 2000 +++ xc/lib/Xxf86misc/Xxf86misc-def.cpp Tue Nov 19 23:04:58 2002 @@ -6,8 +6,9 @@ XF86MiscGetKbdSettings XF86MiscSetMouseSettings XF86MiscGetMouseSettings + XF86MiscGetFilePaths ; XF86MiscSetSaver ; XF86MiscGetSaver -/* $XFree86: xc/lib/Xxf86misc/Xxf86misc-def.cpp,v 1.1 2000/08/09 23:40:14 dawes Exp $ */ +/* $XFree86: xc/lib/Xxf86misc/Xxf86misc-def.cpp,v 1.2 2002/11/20 04:04:58 dawes Exp $ */ Index: xc/lib/Xxf86misc/Xxf86miscos2.def diff -u xc/lib/Xxf86misc/Xxf86miscos2.def:3.2 xc/lib/Xxf86misc/Xxf86miscos2.def:removed --- xc/lib/Xxf86misc/Xxf86miscos2.def:3.2 Thu Apr 29 05:13:35 1999 +++ xc/lib/Xxf86misc/Xxf86miscos2.def Thu Feb 27 12:27:45 2003 @@ -1,13 +0,0 @@ -LIBRARY XXF86MISC -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xxf86misc/Xxf86miscos2.def,v 3.2 1999/04/29 09:13:35 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - XF86MiscQueryExtension @ 1 - XF86MiscQueryVersion @ 2 - XF86MiscSetSaver @ 3 - XF86MiscGetSaver @ 4 - Index: xc/lib/Xxf86misc/Xxf86miscos2.rsp diff -u xc/lib/Xxf86misc/Xxf86miscos2.rsp:3.0 xc/lib/Xxf86misc/Xxf86miscos2.rsp:removed --- xc/lib/Xxf86misc/Xxf86miscos2.rsp:3.0 Wed Jan 24 16:58:50 1996 +++ xc/lib/Xxf86misc/Xxf86miscos2.rsp Thu Feb 27 12:27:45 2003 @@ -1,3 +0,0 @@ -XF86Misc.obj /NOL /NOD /BAT -Xxf86msic.dll - Index: xc/lib/Xxf86rush/Imakefile diff -u xc/lib/Xxf86rush/Imakefile:1.1 xc/lib/Xxf86rush/Imakefile:1.2 --- xc/lib/Xxf86rush/Imakefile:1.1 Sat Sep 4 05:14:09 1999 +++ xc/lib/Xxf86rush/Imakefile Tue Oct 15 20:37:34 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xxf86rush/Imakefile,v 1.1 1999/09/04 09:14:09 dawes Exp $ +XCOMM $XFree86: xc/lib/Xxf86rush/Imakefile,v 1.2 2002/10/16 00:37:34 dawes Exp $ #define DoNormalLib NormalLibXxf86rush #define DoSharedLib SharedLibXxf86rush #define DoDebugLib DebugLibXxf86rush @@ -21,7 +21,6 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = $(XF86RUSHSRCS) OBJS = $(XF86RUSHOBJS) LINTLIBS = $(LINTXLIB) Index: xc/lib/Xxf86rush/XF86Rush.c diff -u xc/lib/Xxf86rush/XF86Rush.c:1.5 xc/lib/Xxf86rush/XF86Rush.c:1.6 --- xc/lib/Xxf86rush/XF86Rush.c:1.5 Tue Sep 26 11:56:59 2000 +++ xc/lib/Xxf86rush/XF86Rush.c Tue Oct 15 20:37:34 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86rush/XF86Rush.c,v 1.5 2000/09/26 15:56:59 tsi Exp $ */ +/* $XFree86: xc/lib/Xxf86rush/XF86Rush.c,v 1.6 2002/10/16 00:37:34 dawes Exp $ */ /* Copyright (c) 1998 Daryll Strauss @@ -9,10 +9,10 @@ #define NEED_EVENTS #define NEED_REPLIES -#include "Xlibint.h" -#include "xf86rushstr.h" -#include "Xext.h" -#include "extutil.h" +#include +#include +#include +#include static XExtensionInfo _xf86rush_info_data; static XExtensionInfo *xf86rush_info = &_xf86rush_info_data; Index: xc/lib/Xxf86vm/Imakefile diff -u xc/lib/Xxf86vm/Imakefile:3.1 xc/lib/Xxf86vm/Imakefile:3.4 --- xc/lib/Xxf86vm/Imakefile:3.1 Sun Dec 20 06:57:13 1998 +++ xc/lib/Xxf86vm/Imakefile Fri Jan 3 21:48:25 2003 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xxf86vm/Imakefile,v 3.1 1998/12/20 11:57:13 dawes Exp $ +XCOMM $XFree86: xc/lib/Xxf86vm/Imakefile,v 3.4 2003/01/04 02:48:25 dawes Exp $ #define DoNormalLib NormalLibXxf86vm #define DoSharedLib SharedLibXxf86vm #define DoExtraLib SharedLibXxf86vm @@ -22,10 +22,11 @@ #endif DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = $(VIDMODESRCS) OBJS = $(VIDMODEOBJS) LINTLIBS = $(LINTXLIB) + +#define IncludeSharedObjectInNormalLib #include Index: xc/lib/Xxf86vm/XF86VMode.c diff -u xc/lib/Xxf86vm/XF86VMode.c:3.32 xc/lib/Xxf86vm/XF86VMode.c:3.34 --- xc/lib/Xxf86vm/XF86VMode.c:3.32 Wed Jul 25 11:04:54 2001 +++ xc/lib/Xxf86vm/XF86VMode.c Sat Dec 21 19:46:51 2002 @@ -1,5 +1,5 @@ /* $XConsortium: XF86VMode.c /main/2 1995/11/14 18:17:58 kaleb $ */ -/* $XFree86: xc/lib/Xxf86vm/XF86VMode.c,v 3.32 2001/07/25 15:04:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xxf86vm/XF86VMode.c,v 3.34 2002/12/22 00:46:51 dawes Exp $ */ /* Copyright (c) 1995 Kaleb S. KEITHLEY @@ -35,17 +35,10 @@ #define NEED_EVENTS #define NEED_REPLIES -#ifndef XBUILD_IN_CLIENT -#include "Xlibint.h" -#include "xf86vmstr.h" -#include "Xext.h" -#include "extutil.h" -#else -#include "lib/X11/Xlibint.h" -#include "include/extensions/xf86vmstr.h" -#include "include/extensions/Xext.h" -#include "include/extensions/extutil.h" -#endif +#include +#include +#include +#include #ifdef DEBUG #include @@ -1203,6 +1196,36 @@ return False; } *size = rep.size; + UnlockDisplay(dpy); + SyncHandle(); + return True; +} + +Bool XF86VidModeGetPermissions( + Display *dpy, + int screen, + int *permissions +) +{ + XExtDisplayInfo *info = find_display (dpy); + xXF86VidModeGetPermissionsReq *req; + xXF86VidModeGetPermissionsReply rep; + + *permissions = 0; + + XF86VidModeCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(XF86VidModeGetPermissions, req); + req->reqType = info->codes->major_opcode; + req->xf86vidmodeReqType = X_XF86VidModeGetPermissions; + req->screen = screen; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return False; + } + *permissions = rep.permissions; UnlockDisplay(dpy); SyncHandle(); return True; Index: xc/lib/Xxf86vm/Xxf86vmos2.def diff -u xc/lib/Xxf86vm/Xxf86vmos2.def:3.2 xc/lib/Xxf86vm/Xxf86vmos2.def:removed --- xc/lib/Xxf86vm/Xxf86vmos2.def:3.2 Thu Apr 29 05:13:36 1999 +++ xc/lib/Xxf86vm/Xxf86vmos2.def Thu Feb 27 12:27:46 2003 @@ -1,16 +0,0 @@ -LIBRARY XXF86VM -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/Xxf86vm/Xxf86vmos2.def,v 3.2 1999/04/29 09:13:36 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 4096 -EXPORTS - XF86VidModeQueryExtension @ 1 - XF86VidModeQueryVersion @ 2 - XF86VidModeGetModeLine @ 3 - XF86VidModeModModeLine @ 4 - XF86VidModeSwitchMode @ 5 - XF86VidModeLockModeSwitch @ 6 - XF86VidModeGetMonitor @ 7 - Index: xc/lib/Xxf86vm/Xxf86vmos2.rsp diff -u xc/lib/Xxf86vm/Xxf86vmos2.rsp:3.0 xc/lib/Xxf86vm/Xxf86vmos2.rsp:removed --- xc/lib/Xxf86vm/Xxf86vmos2.rsp:3.0 Wed Jan 24 16:58:55 1996 +++ xc/lib/Xxf86vm/Xxf86vmos2.rsp Thu Feb 27 12:27:46 2003 @@ -1,3 +0,0 @@ -XF86VMode.obj /NOL /NOD /BAT -Xxf86vm.dll - Index: xc/lib/dps/Imakefile diff -u xc/lib/dps/Imakefile:1.13 xc/lib/dps/Imakefile:1.16 --- xc/lib/dps/Imakefile:1.13 Sat Apr 7 15:41:50 2001 +++ xc/lib/dps/Imakefile Tue Dec 31 08:15:41 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/dps/Imakefile,v 1.13 2001/04/07 19:41:50 alanh Exp $ +XCOMM $XFree86: xc/lib/dps/Imakefile,v 1.16 2002/12/31 13:15:41 alanh Exp $ #define DoNormalLib NormalLibDps #define DoSharedLib SharedLibDps @@ -191,11 +191,17 @@ psXops.c\ psl2ops.c -all :: $(HEADERS) +/* + * hv: HEADERS must be here, otherwise IncSubdir-triggered BuildIncludes + * will fail on systems without ln cmd + */ +HEADERS = psops.h dpsops.h + +all:: $(HEADERS) -includes :: $(DPSOPSCFILES) $(PSOPSCFILES) $(HEADERS) +includes:: $(DPSOPSCFILES) $(PSOPSCFILES) $(HEADERS) -$(DPSOPSCFILES) $(PSOPSCFILES): ProgramTargetName($(PSWRAP)) +$(DPSOPSCFILES) $(PSOPSCFILES): HostProgramTargetName($(PSWRAP)) SRCS = \ ${COMMONSOURCEFILES} \ @@ -218,23 +224,20 @@ .SUFFIXES: .psw .h -.psw.c : ProgramTargetName($(PSWRAP)) +.psw.c : HostProgramTargetName($(PSWRAP)) RunProgram(PSWRAP,-a -o $*.c -h $*.h $<) -.psw.h : ProgramTargetName($(PSWRAP)) +.psw.h : HostProgramTargetName($(PSWRAP)) RunProgram(PSWRAP,-a -h $*.h $< > /dev/null) -ProgramTargetName($(PSWRAP)): +HostProgramTargetName($(PSWRAP)): @echo "checking $@ over in $(PSWRAPSRC) first..."; \ cd $(PSWRAPSRC) && $(MAKE); \ echo "okay, continuing in $(CURRENT_DIR)" -HEADERS = psops.h dpsops.h - includes :: $(HEADERS) depend :: $(DPSOPSCFILES) $(PSOPSCFILES) -#ifndef OS2Architecture psops.h : $(PSOPSHEADERFILES) RemoveFile($@) ${CAT} $(PSOPSHEADERFILES) |\ @@ -259,25 +262,4 @@ ${RM} $(DERIVED_FILES) .sort .ttt .att psops.h dpsops.h *% DependTarget() -#else - -BuildIncludes($(HEADERS),IncSubdir,..) - -psops.h : $(PSOPSHEADERFILES) - .\genheader - RemoveFile($@) - $(CAT) psops.h.os2 >psops.h - -dpsops.h : psops.h $(DPSOPSHEADERFILES) - .\genheader - RemoveFile($@) - $(CAT) dpsops.h.os2 >dpsops.h -clean:: - RemoveFiles($(DPSOPSHEADERFILES) $(PSOPSHEADERFILES)) - RemoveFiles($(DPSOPSCFILES) $(PSOPSCFILES)) - RemoveFiles(.sort .ttt .att psops.h dpsops.h) - -depend:: - -#endif Index: xc/lib/dps/Xlibnet.h diff -u xc/lib/dps/Xlibnet.h:1.6 xc/lib/dps/Xlibnet.h:1.7 --- xc/lib/dps/Xlibnet.h:1.6 Sat Jun 30 18:41:44 2001 +++ xc/lib/dps/Xlibnet.h Fri May 31 14:45:48 2002 @@ -13,7 +13,7 @@ suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ -/* $XFree86: xc/lib/dps/Xlibnet.h,v 1.6 2001/06/30 22:41:44 tsi Exp $ */ +/* $XFree86: xc/lib/dps/Xlibnet.h,v 1.7 2002/05/31 18:45:48 dawes Exp $ */ /* * Xlibnet.h - Xlib networking include files for UNIX Systems. */ @@ -93,7 +93,7 @@ #ifdef NOFILE #define OPEN_MAX NOFILE #else -#if !defined(__EMX__) && !defined(__QNX__) +#if !defined(__UNIXOS2__) && !defined(__QNX__) #define OPEN_MAX NOFILES_MAX #else #define OPEN_MAX 256 Index: xc/lib/dps/cslibext.c diff -u xc/lib/dps/cslibext.c:1.3 xc/lib/dps/cslibext.c:1.4 --- xc/lib/dps/cslibext.c:1.3 Sat Oct 27 23:32:42 2001 +++ xc/lib/dps/cslibext.c Wed Sep 18 13:11:44 2002 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/lib/dps/cslibext.c,v 1.3 2001/10/28 03:32:42 tsi Exp $ */ +/* $XFree86: xc/lib/dps/cslibext.c,v 1.4 2002/09/18 17:11:44 tsi Exp $ */ #include #include @@ -245,7 +245,7 @@ { /* Fine, we downgrade the client */ char qbuf[256]; - sprintf(qbuf, "NX: server version %ld older than expected %d, client will downgrade", reply.good.serverVersion, DPSPROTOCOLVERSION); + sprintf(qbuf, "NX: server version %ld older than expected %d, client will downgrade", (long)reply.good.serverVersion, DPSPROTOCOLVERSION); DPSWarnProc(NULL, qbuf); } my->dpscapVersion = reply.good.dpscapVersion; Index: xc/lib/dps/csstartNX.c diff -u xc/lib/dps/csstartNX.c:1.6 xc/lib/dps/csstartNX.c:1.7 --- xc/lib/dps/csstartNX.c:1.6 Sat Oct 27 23:32:43 2001 +++ xc/lib/dps/csstartNX.c Fri May 31 14:45:48 2002 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/lib/dps/csstartNX.c,v 1.6 2001/10/28 03:32:43 tsi Exp $ */ +/* $XFree86: xc/lib/dps/csstartNX.c,v 1.7 2002/05/31 18:45:48 dawes Exp $ */ #include #include @@ -208,7 +208,7 @@ /* now try to start up the agent... */ if ((childPid = fork()) != -1) { if (childPid == 0) { /* Child process */ -#ifndef __EMX__ +#ifndef __UNIXOS2__ if (setsid() < 0) DPSWarnProc(NULL, "Agent unable to create session. Continuing...\n"); #endif Index: xc/lib/dps/dpsXpriv.c diff -u xc/lib/dps/dpsXpriv.c:1.6 xc/lib/dps/dpsXpriv.c:1.8 --- xc/lib/dps/dpsXpriv.c:1.6 Fri Nov 16 11:47:52 2001 +++ xc/lib/dps/dpsXpriv.c Mon Oct 21 09:32:53 2002 @@ -35,12 +35,13 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/lib/dps/dpsXpriv.c,v 1.6 2001/11/16 16:47:52 dawes Exp $ */ +/* $XFree86: xc/lib/dps/dpsXpriv.c,v 1.8 2002/10/21 13:32:53 alanh Exp $ */ #include #include #include #include +#include #include #ifdef GC @@ -191,14 +192,14 @@ static int BlockForEvent ( Display *dpy) { - long readfds; + fd_set readfds; XDPSQuitBlocking = false; /* XDPSQuitBlocking becomes true if a zombie status event or any output event is received by the status event handler for the currently-awaiting-results context. */ while (1) { - readfds = (1 << ConnectionNumber(dpy)); + FD_SET(ConnectionNumber(dpy), &readfds); if (select (ConnectionNumber(dpy)+1, (SELECT_TYPE) &readfds, (SELECT_TYPE) NULL, (SELECT_TYPE) NULL, (struct timeval *) NULL) < 0) { Index: xc/lib/dps/dpsops.h.os2 diff -u xc/lib/dps/dpsops.h.os2:1.1 xc/lib/dps/dpsops.h.os2:removed --- xc/lib/dps/dpsops.h.os2:1.1 Wed Apr 5 14:13:21 2000 +++ xc/lib/dps/dpsops.h.os2 Thu Feb 27 12:27:48 2003 @@ -1,1601 +0,0 @@ -/* - * dpsops.h - */ - -/* - * (c) Copyright 1988-1994 Adobe Systems Incorporated. - * All rights reserved. - * - * Permission to use, copy, modify, distribute, and sublicense this software - * and its documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notices appear in all copies and that - * both those copyright notices and this permission notice appear in - * supporting documentation and that the name of Adobe Systems Incorporated - * not be used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. No trademark license - * to use the Adobe trademarks is hereby granted. If the Adobe trademark - * "Display PostScript"(tm) is used to describe this software, its - * functionality or for any other purpose, such use shall be limited to a - * statement that this software works in conjunction with the Display - * PostScript system. Proper trademark attribution to reflect Adobe's - * ownership of the trademark shall be given whenever any such reference to - * the Display PostScript system is made. - * - * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR - * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. - * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE - * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT - * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE. - * - * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems - * Incorporated which may be registered in certain jurisdictions - * - * Author: Adobe Systems Incorporated - */ -#ifndef DPSOPS_H -#define DPSOPS_H - -#ifdef _NO_PROTO - -extern void DPSFontDirectory( /* DPSContext ctxt; */ ); - -extern void DPSGlobalFontDirectory( /* DPSContext ctxt; */ ); - -extern void DPSISOLatin1Encoding( /* DPSContext ctxt; */ ); - -extern void DPSSharedFontDirectory( /* DPSContext ctxt; */ ); - -extern void DPSStandardEncoding( /* DPSContext ctxt; */ ); - -extern void DPSUserObjects( /* DPSContext ctxt; */ ); - -extern void DPSabs( /* DPSContext ctxt; */ ); - -extern void DPSadd( /* DPSContext ctxt; */ ); - -extern void DPSaload( /* DPSContext ctxt; */ ); - -extern void DPSanchorsearch( /* DPSContext ctxt; int *truth; */ ); - -extern void DPSand( /* DPSContext ctxt; */ ); - -extern void DPSarc( /* DPSContext ctxt; float x, y, r, angle1, angle2; */ ); - -extern void DPSarcn( /* DPSContext ctxt; float x, y, r, angle1, angle2; */ ); - -extern void DPSarct( /* DPSContext ctxt; float x1, y1, x2, y2, r; */ ); - -extern void DPSarcto( /* DPSContext ctxt; float x1, y1, x2, y2, r; float *xt1, *yt1, *xt2, *yt2; */ ); - -extern void DPSarray( /* DPSContext ctxt; int len; */ ); - -extern void DPSashow( /* DPSContext ctxt; float x, y; char *s; */ ); - -extern void DPSastore( /* DPSContext ctxt; */ ); - -extern void DPSatan( /* DPSContext ctxt; */ ); - -extern void DPSawidthshow( /* DPSContext ctxt; float cx, cy; int c; float ax, ay; char *s; */ ); - -extern void DPSbanddevice( /* DPSContext ctxt; */ ); - -extern void DPSbegin( /* DPSContext ctxt; */ ); - -extern void DPSbind( /* DPSContext ctxt; */ ); - -extern void DPSbitshift( /* DPSContext ctxt; int shift; */ ); - -extern void DPSbytesavailable( /* DPSContext ctxt; int *n; */ ); - -extern void DPScachestatus( /* DPSContext ctxt; */ ); - -extern void DPSceiling( /* DPSContext ctxt; */ ); - -extern void DPScharpath( /* DPSContext ctxt; char *s; int b; */ ); - -extern void DPSclear( /* DPSContext ctxt; */ ); - -extern void DPScleardictstack( /* DPSContext ctxt; */ ); - -extern void DPScleartomark( /* DPSContext ctxt; */ ); - -extern void DPSclientXready( /* DPSContext ctxt; int i0, i1, i2, i3; */ ); - -extern void DPSclientsync( /* DPSContext ctxt; */ ); - -extern void DPSclip( /* DPSContext ctxt; */ ); - -extern void DPSclippath( /* DPSContext ctxt; */ ); - -extern void DPSclosefile( /* DPSContext ctxt; */ ); - -extern void DPSclosepath( /* DPSContext ctxt; */ ); - -extern void DPScolorimage( /* DPSContext ctxt; */ ); - -extern void DPSconcat( /* DPSContext ctxt; float m[]; */ ); - -extern void DPSconcatmatrix( /* DPSContext ctxt; */ ); - -extern void DPScondition( /* DPSContext ctxt; */ ); - -extern void DPScopy( /* DPSContext ctxt; int n; */ ); - -extern void DPScopypage( /* DPSContext ctxt; */ ); - -extern void DPScos( /* DPSContext ctxt; */ ); - -extern void DPScount( /* DPSContext ctxt; int *n; */ ); - -extern void DPScountdictstack( /* DPSContext ctxt; int *n; */ ); - -extern void DPScountexecstack( /* DPSContext ctxt; int *n; */ ); - -extern void DPScounttomark( /* DPSContext ctxt; int *n; */ ); - -extern void DPScshow( /* DPSContext ctxt; char *s; */ ); - -extern void DPScurrentXdrawingfunction( /* DPSContext ctxt; int *function; */ ); - -extern void DPScurrentXgcdrawable( /* DPSContext ctxt; int *gc, *draw, *x, *y; */ ); - -extern void DPScurrentXgcdrawablecolor( /* DPSContext ctxt; int *gc, *draw, *x, *y, colorInfo[]; */ ); - -extern void DPScurrentXoffset( /* DPSContext ctxt; int *x, *y; */ ); - -extern void DPScurrentblackgeneration( /* DPSContext ctxt; */ ); - -extern void DPScurrentcacheparams( /* DPSContext ctxt; */ ); - -extern void DPScurrentcmykcolor( /* DPSContext ctxt; float *c, *m, *y, *k; */ ); - -extern void DPScurrentcolor( /* DPSContext ctxt; */ ); - -extern void DPScurrentcolorrendering( /* DPSContext ctxt; */ ); - -extern void DPScurrentcolorscreen( /* DPSContext ctxt; */ ); - -extern void DPScurrentcolorspace( /* DPSContext ctxt; */ ); - -extern void DPScurrentcolortransfer( /* DPSContext ctxt; */ ); - -extern void DPScurrentcontext( /* DPSContext ctxt; int *cid; */ ); - -extern void DPScurrentdash( /* DPSContext ctxt; */ ); - -extern void DPScurrentdevparams( /* DPSContext ctxt; char *dev; */ ); - -extern void DPScurrentdict( /* DPSContext ctxt; */ ); - -extern void DPScurrentfile( /* DPSContext ctxt; */ ); - -extern void DPScurrentflat( /* DPSContext ctxt; float *flatness; */ ); - -extern void DPScurrentfont( /* DPSContext ctxt; */ ); - -extern void DPScurrentglobal( /* DPSContext ctxt; int *b; */ ); - -extern void DPScurrentgray( /* DPSContext ctxt; float *gray; */ ); - -extern void DPScurrentgstate( /* DPSContext ctxt; int gst; */ ); - -extern void DPScurrenthalftone( /* DPSContext ctxt; */ ); - -extern void DPScurrenthalftonephase( /* DPSContext ctxt; float *x, *y; */ ); - -extern void DPScurrenthsbcolor( /* DPSContext ctxt; float *h, *s, *b; */ ); - -extern void DPScurrentlinecap( /* DPSContext ctxt; int *linecap; */ ); - -extern void DPScurrentlinejoin( /* DPSContext ctxt; int *linejoin; */ ); - -extern void DPScurrentlinewidth( /* DPSContext ctxt; float *width; */ ); - -extern void DPScurrentmatrix( /* DPSContext ctxt; */ ); - -extern void DPScurrentmiterlimit( /* DPSContext ctxt; float *limit; */ ); - -extern void DPScurrentobjectformat( /* DPSContext ctxt; int *code; */ ); - -extern void DPScurrentoverprint( /* DPSContext ctxt; int *b; */ ); - -extern void DPScurrentpacking( /* DPSContext ctxt; int *b; */ ); - -extern void DPScurrentpagedevice( /* DPSContext ctxt; */ ); - -extern void DPScurrentpoint( /* DPSContext ctxt; float *x, *y; */ ); - -extern void DPScurrentrgbcolor( /* DPSContext ctxt; float *r, *g, *b; */ ); - -extern void DPScurrentscreen( /* DPSContext ctxt; */ ); - -extern void DPScurrentshared( /* DPSContext ctxt; int *b; */ ); - -extern void DPScurrentstrokeadjust( /* DPSContext ctxt; int *b; */ ); - -extern void DPScurrentsystemparams( /* DPSContext ctxt; */ ); - -extern void DPScurrenttransfer( /* DPSContext ctxt; */ ); - -extern void DPScurrentundercolorremoval( /* DPSContext ctxt; */ ); - -extern void DPScurrentuserparams( /* DPSContext ctxt; */ ); - -extern void DPScurveto( /* DPSContext ctxt; float x1, y1, x2, y2, x3, y3; */ ); - -extern void DPScvi( /* DPSContext ctxt; */ ); - -extern void DPScvlit( /* DPSContext ctxt; */ ); - -extern void DPScvn( /* DPSContext ctxt; */ ); - -extern void DPScvr( /* DPSContext ctxt; */ ); - -extern void DPScvrs( /* DPSContext ctxt; */ ); - -extern void DPScvs( /* DPSContext ctxt; */ ); - -extern void DPScvx( /* DPSContext ctxt; */ ); - -extern void DPSdef( /* DPSContext ctxt; */ ); - -extern void DPSdefaultmatrix( /* DPSContext ctxt; */ ); - -extern void DPSdefinefont( /* DPSContext ctxt; */ ); - -extern void DPSdefineresource( /* DPSContext ctxt; char *category; */ ); - -extern void DPSdefineusername( /* DPSContext ctxt; int i; char *username; */ ); - -extern void DPSdefineuserobject( /* DPSContext ctxt; */ ); - -extern void DPSdeletefile( /* DPSContext ctxt; char *filename; */ ); - -extern void DPSdetach( /* DPSContext ctxt; */ ); - -extern void DPSdeviceinfo( /* DPSContext ctxt; */ ); - -extern void DPSdict( /* DPSContext ctxt; int len; */ ); - -extern void DPSdictstack( /* DPSContext ctxt; */ ); - -extern void DPSdiv( /* DPSContext ctxt; */ ); - -extern void DPSdtransform( /* DPSContext ctxt; float x1, y1; float *x2, *y2; */ ); - -extern void DPSdup( /* DPSContext ctxt; */ ); - -extern void DPSecho( /* DPSContext ctxt; int b; */ ); - -extern void DPSend( /* DPSContext ctxt; */ ); - -extern void DPSeoclip( /* DPSContext ctxt; */ ); - -extern void DPSeofill( /* DPSContext ctxt; */ ); - -extern void DPSeoviewclip( /* DPSContext ctxt; */ ); - -extern void DPSeq( /* DPSContext ctxt; */ ); - -extern void DPSequals( /* DPSContext ctxt; */ ); - -extern void DPSequalsequals( /* DPSContext ctxt; */ ); - -extern void DPSerasepage( /* DPSContext ctxt; */ ); - -extern void DPSerrordict( /* DPSContext ctxt; */ ); - -extern void DPSexch( /* DPSContext ctxt; */ ); - -extern void DPSexec( /* DPSContext ctxt; */ ); - -extern void DPSexecform( /* DPSContext ctxt; */ ); - -extern void DPSexecstack( /* DPSContext ctxt; */ ); - -extern void DPSexecuserobject( /* DPSContext ctxt; int userObjIndex; */ ); - -extern void DPSexecuteonly( /* DPSContext ctxt; */ ); - -extern void DPSexit( /* DPSContext ctxt; */ ); - -extern void DPSexp( /* DPSContext ctxt; */ ); - -extern void DPSfalse( /* DPSContext ctxt; */ ); - -extern void DPSfile( /* DPSContext ctxt; char *name, *access; */ ); - -extern void DPSfilenameforall( /* DPSContext ctxt; */ ); - -extern void DPSfileposition( /* DPSContext ctxt; int *pos; */ ); - -extern void DPSfill( /* DPSContext ctxt; */ ); - -extern void DPSfilter( /* DPSContext ctxt; */ ); - -extern void DPSfindencoding( /* DPSContext ctxt; char *key; */ ); - -extern void DPSfindfont( /* DPSContext ctxt; char *name; */ ); - -extern void DPSfindresource( /* DPSContext ctxt; char *key, *category; */ ); - -extern void DPSflattenpath( /* DPSContext ctxt; */ ); - -extern void DPSfloor( /* DPSContext ctxt; */ ); - -extern void DPSflush( /* DPSContext ctxt; */ ); - -extern void DPSflushfile( /* DPSContext ctxt; */ ); - -extern void DPSfor( /* DPSContext ctxt; */ ); - -extern void DPSforall( /* DPSContext ctxt; */ ); - -extern void DPSfork( /* DPSContext ctxt; */ ); - -extern void DPSframedevice( /* DPSContext ctxt; */ ); - -extern void DPSgcheck( /* DPSContext ctxt; int *b; */ ); - -extern void DPSge( /* DPSContext ctxt; */ ); - -extern void DPSget( /* DPSContext ctxt; */ ); - -extern void DPSgetboolean( /* DPSContext ctxt; int *it; */ ); - -extern void DPSgetchararray( /* DPSContext ctxt; int size; char s[]; */ ); - -extern void DPSgetfloat( /* DPSContext ctxt; float *it; */ ); - -extern void DPSgetfloatarray( /* DPSContext ctxt; int size; float a[]; */ ); - -extern void DPSgetint( /* DPSContext ctxt; int *it; */ ); - -extern void DPSgetintarray( /* DPSContext ctxt; int size; int a[]; */ ); - -extern void DPSgetinterval( /* DPSContext ctxt; */ ); - -extern void DPSgetstring( /* DPSContext ctxt; char *s; */ ); - -extern void DPSglobaldict( /* DPSContext ctxt; */ ); - -extern void DPSglyphshow( /* DPSContext ctxt; char *name; */ ); - -extern void DPSgrestore( /* DPSContext ctxt; */ ); - -extern void DPSgrestoreall( /* DPSContext ctxt; */ ); - -extern void DPSgsave( /* DPSContext ctxt; */ ); - -extern void DPSgstate( /* DPSContext ctxt; */ ); - -extern void DPSgt( /* DPSContext ctxt; */ ); - -extern void DPSidentmatrix( /* DPSContext ctxt; */ ); - -extern void DPSidiv( /* DPSContext ctxt; */ ); - -extern void DPSidtransform( /* DPSContext ctxt; float x1, y1; float *x2, *y2; */ ); - -extern void DPSif( /* DPSContext ctxt; */ ); - -extern void DPSifelse( /* DPSContext ctxt; */ ); - -extern void DPSimage( /* DPSContext ctxt; */ ); - -extern void DPSimagemask( /* DPSContext ctxt; */ ); - -extern void DPSindex( /* DPSContext ctxt; int i; */ ); - -extern void DPSineofill( /* DPSContext ctxt; float x, y; int *b; */ ); - -extern void DPSinfill( /* DPSContext ctxt; float x, y; int *b; */ ); - -extern void DPSinitclip( /* DPSContext ctxt; */ ); - -extern void DPSinitgraphics( /* DPSContext ctxt; */ ); - -extern void DPSinitmatrix( /* DPSContext ctxt; */ ); - -extern void DPSinitviewclip( /* DPSContext ctxt; */ ); - -extern void DPSinstroke( /* DPSContext ctxt; float x, y; int *b; */ ); - -extern void DPSinueofill( /* DPSContext ctxt; float x, y; char nums[]; int n; char ops[]; int l; int *b; */ ); - -extern void DPSinufill( /* DPSContext ctxt; float x, y; char nums[]; int n; char ops[]; int l; int *b; */ ); - -extern void DPSinustroke( /* DPSContext ctxt; float x, y; char nums[]; int n; char ops[]; int l; int *b; */ ); - -extern void DPSinvertmatrix( /* DPSContext ctxt; */ ); - -extern void DPSitransform( /* DPSContext ctxt; float x1, y1; float *x2, *y2; */ ); - -extern void DPSjoin( /* DPSContext ctxt; */ ); - -extern void DPSknown( /* DPSContext ctxt; int *b; */ ); - -extern void DPSkshow( /* DPSContext ctxt; char *s; */ ); - -extern void DPSlanguagelevel( /* DPSContext ctxt; int *n; */ ); - -extern void DPSle( /* DPSContext ctxt; */ ); - -extern void DPSleftbracket( /* DPSContext ctxt; */ ); - -extern void DPSleftleft( /* DPSContext ctxt; */ ); - -extern void DPSlength( /* DPSContext ctxt; int *len; */ ); - -extern void DPSlineto( /* DPSContext ctxt; float x, y; */ ); - -extern void DPSln( /* DPSContext ctxt; */ ); - -extern void DPSload( /* DPSContext ctxt; */ ); - -extern void DPSlock( /* DPSContext ctxt; */ ); - -extern void DPSlog( /* DPSContext ctxt; */ ); - -extern void DPSloop( /* DPSContext ctxt; */ ); - -extern void DPSlt( /* DPSContext ctxt; */ ); - -extern void DPSmakefont( /* DPSContext ctxt; */ ); - -extern void DPSmakepattern( /* DPSContext ctxt; */ ); - -extern void DPSmark( /* DPSContext ctxt; */ ); - -extern void DPSmatrix( /* DPSContext ctxt; */ ); - -extern void DPSmaxlength( /* DPSContext ctxt; int *len; */ ); - -extern void DPSmod( /* DPSContext ctxt; */ ); - -extern void DPSmonitor( /* DPSContext ctxt; */ ); - -extern void DPSmoveto( /* DPSContext ctxt; float x, y; */ ); - -extern void DPSmul( /* DPSContext ctxt; */ ); - -extern void DPSne( /* DPSContext ctxt; */ ); - -extern void DPSneg( /* DPSContext ctxt; */ ); - -extern void DPSnewpath( /* DPSContext ctxt; */ ); - -extern void DPSnoaccess( /* DPSContext ctxt; */ ); - -extern void DPSnot( /* DPSContext ctxt; */ ); - -extern void DPSnotify( /* DPSContext ctxt; */ ); - -extern void DPSnull( /* DPSContext ctxt; */ ); - -extern void DPSnulldevice( /* DPSContext ctxt; */ ); - -extern void DPSor( /* DPSContext ctxt; */ ); - -extern void DPSpackedarray( /* DPSContext ctxt; */ ); - -extern void DPSpathbbox( /* DPSContext ctxt; float *llx, *lly, *urx, *ury; */ ); - -extern void DPSpathforall( /* DPSContext ctxt; */ ); - -extern void DPSpop( /* DPSContext ctxt; */ ); - -extern void DPSprint( /* DPSContext ctxt; */ ); - -extern void DPSprintobject( /* DPSContext ctxt; int tag; */ ); - -extern void DPSproduct( /* DPSContext ctxt; */ ); - -extern void DPSprompt( /* DPSContext ctxt; */ ); - -extern void DPSpstack( /* DPSContext ctxt; */ ); - -extern void DPSput( /* DPSContext ctxt; */ ); - -extern void DPSputinterval( /* DPSContext ctxt; */ ); - -extern void DPSquit( /* DPSContext ctxt; */ ); - -extern void DPSrand( /* DPSContext ctxt; */ ); - -extern void DPSrcheck( /* DPSContext ctxt; int *b; */ ); - -extern void DPSrcurveto( /* DPSContext ctxt; float x1, y1, x2, y2, x3, y3; */ ); - -extern void DPSread( /* DPSContext ctxt; int *b; */ ); - -extern void DPSreadhexstring( /* DPSContext ctxt; int *b; */ ); - -extern void DPSreadline( /* DPSContext ctxt; int *b; */ ); - -extern void DPSreadonly( /* DPSContext ctxt; */ ); - -extern void DPSreadstring( /* DPSContext ctxt; int *b; */ ); - -extern void DPSrealtime( /* DPSContext ctxt; int *i; */ ); - -extern void DPSrectclip( /* DPSContext ctxt; float x, y, w, h; */ ); - -extern void DPSrectfill( /* DPSContext ctxt; float x, y, w, h; */ ); - -extern void DPSrectstroke( /* DPSContext ctxt; float x, y, w, h; */ ); - -extern void DPSrectviewclip( /* DPSContext ctxt; float x, y, w, h; */ ); - -extern void DPSrenamefile( /* DPSContext ctxt; char *oldname, *newname; */ ); - -extern void DPSrenderbands( /* DPSContext ctxt; */ ); - -extern void DPSrepeat( /* DPSContext ctxt; */ ); - -extern void DPSresetfile( /* DPSContext ctxt; */ ); - -extern void DPSresourceforall( /* DPSContext ctxt; char *category; */ ); - -extern void DPSresourcestatus( /* DPSContext ctxt; char *key, *category; int *b; */ ); - -extern void DPSrestore( /* DPSContext ctxt; */ ); - -extern void DPSreversepath( /* DPSContext ctxt; */ ); - -extern void DPSrevision( /* DPSContext ctxt; int *n; */ ); - -extern void DPSrightbracket( /* DPSContext ctxt; */ ); - -extern void DPSrightright( /* DPSContext ctxt; */ ); - -extern void DPSrlineto( /* DPSContext ctxt; float x, y; */ ); - -extern void DPSrmoveto( /* DPSContext ctxt; float x, y; */ ); - -extern void DPSroll( /* DPSContext ctxt; int n, j; */ ); - -extern void DPSrootfont( /* DPSContext ctxt; */ ); - -extern void DPSrotate( /* DPSContext ctxt; float angle; */ ); - -extern void DPSround( /* DPSContext ctxt; */ ); - -extern void DPSrrand( /* DPSContext ctxt; */ ); - -extern void DPSrun( /* DPSContext ctxt; char *filename; */ ); - -extern void DPSsave( /* DPSContext ctxt; */ ); - -extern void DPSscale( /* DPSContext ctxt; float x, y; */ ); - -extern void DPSscalefont( /* DPSContext ctxt; float size; */ ); - -extern void DPSscheck( /* DPSContext ctxt; int *b; */ ); - -extern void DPSsearch( /* DPSContext ctxt; int *b; */ ); - -extern void DPSselectfont( /* DPSContext ctxt; char *name; float scale; */ ); - -extern void DPSsendboolean( /* DPSContext ctxt; int it; */ ); - -extern void DPSsendchararray( /* DPSContext ctxt; char s[]; int size; */ ); - -extern void DPSsendfloat( /* DPSContext ctxt; float it; */ ); - -extern void DPSsendfloatarray( /* DPSContext ctxt; float a[]; int size; */ ); - -extern void DPSsendint( /* DPSContext ctxt; int it; */ ); - -extern void DPSsendintarray( /* DPSContext ctxt; int a[]; int size; */ ); - -extern void DPSsendstring( /* DPSContext ctxt; char *s; */ ); - -extern void DPSserialnumber( /* DPSContext ctxt; int *n; */ ); - -extern void DPSsetXdrawingfunction( /* DPSContext ctxt; int function; */ ); - -extern void DPSsetXgcdrawable( /* DPSContext ctxt; int gc, draw, x, y; */ ); - -extern void DPSsetXgcdrawablecolor( /* DPSContext ctxt; int gc, draw, x, y, colorInfo[]; */ ); - -extern void DPSsetXoffset( /* DPSContext ctxt; int x, y; */ ); - -extern void DPSsetXrgbactual( /* DPSContext ctxt; float r, g, b; int *success; */ ); - -extern void DPSsetbbox( /* DPSContext ctxt; float llx, lly, urx, ury; */ ); - -extern void DPSsetblackgeneration( /* DPSContext ctxt; */ ); - -extern void DPSsetcachedevice( /* DPSContext ctxt; float wx, wy, llx, lly, urx, ury; */ ); - -extern void DPSsetcachelimit( /* DPSContext ctxt; int n; */ ); - -extern void DPSsetcacheparams( /* DPSContext ctxt; */ ); - -extern void DPSsetcharwidth( /* DPSContext ctxt; float wx, wy; */ ); - -extern void DPSsetcmykcolor( /* DPSContext ctxt; float c, m, y, k; */ ); - -extern void DPSsetcolor( /* DPSContext ctxt; */ ); - -extern void DPSsetcolorrendering( /* DPSContext ctxt; */ ); - -extern void DPSsetcolorscreen( /* DPSContext ctxt; */ ); - -extern void DPSsetcolorspace( /* DPSContext ctxt; */ ); - -extern void DPSsetcolortransfer( /* DPSContext ctxt; */ ); - -extern void DPSsetdash( /* DPSContext ctxt; float pat[]; int size; float offset; */ ); - -extern void DPSsetdevparams( /* DPSContext ctxt; */ ); - -extern void DPSsetfileposition( /* DPSContext ctxt; int pos; */ ); - -extern void DPSsetflat( /* DPSContext ctxt; float flatness; */ ); - -extern void DPSsetfont( /* DPSContext ctxt; int f; */ ); - -extern void DPSsetglobal( /* DPSContext ctxt; int b; */ ); - -extern void DPSsetgray( /* DPSContext ctxt; float gray; */ ); - -extern void DPSsetgstate( /* DPSContext ctxt; int gst; */ ); - -extern void DPSsethalftone( /* DPSContext ctxt; */ ); - -extern void DPSsethalftonephase( /* DPSContext ctxt; float x, y; */ ); - -extern void DPSsethsbcolor( /* DPSContext ctxt; float h, s, b; */ ); - -extern void DPSsetlinecap( /* DPSContext ctxt; int linecap; */ ); - -extern void DPSsetlinejoin( /* DPSContext ctxt; int linejoin; */ ); - -extern void DPSsetlinewidth( /* DPSContext ctxt; float width; */ ); - -extern void DPSsetmatrix( /* DPSContext ctxt; */ ); - -extern void DPSsetmiterlimit( /* DPSContext ctxt; float limit; */ ); - -extern void DPSsetobjectformat( /* DPSContext ctxt; int code; */ ); - -extern void DPSsetoverprint( /* DPSContext ctxt; int b; */ ); - -extern void DPSsetpacking( /* DPSContext ctxt; int b; */ ); - -extern void DPSsetpagedevice( /* DPSContext ctxt; */ ); - -extern void DPSsetpattern( /* DPSContext ctxt; */ ); - -extern void DPSsetrgbcolor( /* DPSContext ctxt; float r, g, b; */ ); - -extern void DPSsetscreen( /* DPSContext ctxt; */ ); - -extern void DPSsetshared( /* DPSContext ctxt; int b; */ ); - -extern void DPSsetstrokeadjust( /* DPSContext ctxt; int b; */ ); - -extern void DPSsetsystemparams( /* DPSContext ctxt; */ ); - -extern void DPSsettransfer( /* DPSContext ctxt; */ ); - -extern void DPSsetucacheparams( /* DPSContext ctxt; */ ); - -extern void DPSsetundercolorremoval( /* DPSContext ctxt; */ ); - -extern void DPSsetuserparams( /* DPSContext ctxt; */ ); - -extern void DPSsetvmthreshold( /* DPSContext ctxt; int i; */ ); - -extern void DPSshareddict( /* DPSContext ctxt; */ ); - -extern void DPSshow( /* DPSContext ctxt; char *s; */ ); - -extern void DPSshowpage( /* DPSContext ctxt; */ ); - -extern void DPSsin( /* DPSContext ctxt; */ ); - -extern void DPSsqrt( /* DPSContext ctxt; */ ); - -extern void DPSsrand( /* DPSContext ctxt; */ ); - -extern void DPSstack( /* DPSContext ctxt; */ ); - -extern void DPSstart( /* DPSContext ctxt; */ ); - -extern void DPSstartjob( /* DPSContext ctxt; int b; char *password; */ ); - -extern void DPSstatus( /* DPSContext ctxt; int *b; */ ); - -extern void DPSstatusdict( /* DPSContext ctxt; */ ); - -extern void DPSstop( /* DPSContext ctxt; */ ); - -extern void DPSstopped( /* DPSContext ctxt; */ ); - -extern void DPSstore( /* DPSContext ctxt; */ ); - -extern void DPSstring( /* DPSContext ctxt; int len; */ ); - -extern void DPSstringwidth( /* DPSContext ctxt; char *s; float *xp, *yp; */ ); - -extern void DPSstroke( /* DPSContext ctxt; */ ); - -extern void DPSstrokepath( /* DPSContext ctxt; */ ); - -extern void DPSsub( /* DPSContext ctxt; */ ); - -extern void DPSsystemdict( /* DPSContext ctxt; */ ); - -extern void DPStoken( /* DPSContext ctxt; int *b; */ ); - -extern void DPStransform( /* DPSContext ctxt; float x1, y1; float *x2, *y2; */ ); - -extern void DPStranslate( /* DPSContext ctxt; float x, y; */ ); - -extern void DPStrue( /* DPSContext ctxt; */ ); - -extern void DPStruncate( /* DPSContext ctxt; */ ); - -extern void DPStype( /* DPSContext ctxt; */ ); - -extern void DPSuappend( /* DPSContext ctxt; char nums[]; int n; char ops[]; int l; */ ); - -extern void DPSucache( /* DPSContext ctxt; */ ); - -extern void DPSucachestatus( /* DPSContext ctxt; */ ); - -extern void DPSueofill( /* DPSContext ctxt; char nums[]; int n; char ops[]; int l; */ ); - -extern void DPSufill( /* DPSContext ctxt; char nums[]; int n; char ops[]; int l; */ ); - -extern void DPSundef( /* DPSContext ctxt; char *name; */ ); - -extern void DPSundefinefont( /* DPSContext ctxt; char *name; */ ); - -extern void DPSundefineresource( /* DPSContext ctxt; char *key, *category; */ ); - -extern void DPSundefineuserobject( /* DPSContext ctxt; int userObjIndex; */ ); - -extern void DPSupath( /* DPSContext ctxt; int b; */ ); - -extern void DPSuserdict( /* DPSContext ctxt; */ ); - -extern void DPSusertime( /* DPSContext ctxt; int *milliseconds; */ ); - -extern void DPSustroke( /* DPSContext ctxt; char nums[]; int n; char ops[]; int l; */ ); - -extern void DPSustrokepath( /* DPSContext ctxt; char nums[]; int n; char ops[]; int l; */ ); - -extern void DPSversion( /* DPSContext ctxt; int bufsize; char buf[]; */ ); - -extern void DPSviewclip( /* DPSContext ctxt; */ ); - -extern void DPSviewclippath( /* DPSContext ctxt; */ ); - -extern void DPSvmreclaim( /* DPSContext ctxt; int code; */ ); - -extern void DPSvmstatus( /* DPSContext ctxt; int *level, *used, *maximum; */ ); - -extern void DPSwait( /* DPSContext ctxt; */ ); - -extern void DPSwcheck( /* DPSContext ctxt; int *b; */ ); - -extern void DPSwhere( /* DPSContext ctxt; int *b; */ ); - -extern void DPSwidthshow( /* DPSContext ctxt; float x, y; int c; char *s; */ ); - -extern void DPSwrite( /* DPSContext ctxt; */ ); - -extern void DPSwritehexstring( /* DPSContext ctxt; */ ); - -extern void DPSwriteobject( /* DPSContext ctxt; int tag; */ ); - -extern void DPSwritestring( /* DPSContext ctxt; */ ); - -extern void DPSwtranslation( /* DPSContext ctxt; float *x, *y; */ ); - -extern void DPSxcheck( /* DPSContext ctxt; int *b; */ ); - -extern void DPSxor( /* DPSContext ctxt; */ ); - -extern void DPSxshow( /* DPSContext ctxt; char *s; float numarray[]; int size; */ ); - -extern void DPSxyshow( /* DPSContext ctxt; char *s; float numarray[]; int size; */ ); - -extern void DPSyield( /* DPSContext ctxt; */ ); - -extern void DPSyshow( /* DPSContext ctxt; char *s; float numarray[]; int size; */ ); - -#else /* _NO_PROTO */ - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - -extern void DPSFontDirectory(DPSContext ctxt); - -extern void DPSGlobalFontDirectory(DPSContext ctxt); - -extern void DPSISOLatin1Encoding(DPSContext ctxt); - -extern void DPSSharedFontDirectory(DPSContext ctxt); - -extern void DPSStandardEncoding(DPSContext ctxt); - -extern void DPSUserObjects(DPSContext ctxt); - -extern void DPSabs(DPSContext ctxt); - -extern void DPSadd(DPSContext ctxt); - -extern void DPSaload(DPSContext ctxt); - -extern void DPSanchorsearch(DPSContext ctxt, int *truth); - -extern void DPSand(DPSContext ctxt); - -extern void DPSarc(DPSContext ctxt, float x, float y, float r, float angle1, float angle2); - -extern void DPSarcn(DPSContext ctxt, float x, float y, float r, float angle1, float angle2); - -extern void DPSarct(DPSContext ctxt, float x1, float y1, float x2, float y2, float r); - -extern void DPSarcto(DPSContext ctxt, float x1, float y1, float x2, float y2, float r, float *xt1, float *yt1, float *xt2, float *yt2); - -extern void DPSarray(DPSContext ctxt, int len); - -extern void DPSashow(DPSContext ctxt, float x, float y, const char *s); - -extern void DPSastore(DPSContext ctxt); - -extern void DPSatan(DPSContext ctxt); - -extern void DPSawidthshow(DPSContext ctxt, float cx, float cy, int c, float ax, float ay, const char *s); - -extern void DPSbanddevice(DPSContext ctxt); - -extern void DPSbegin(DPSContext ctxt); - -extern void DPSbind(DPSContext ctxt); - -extern void DPSbitshift(DPSContext ctxt, int shift); - -extern void DPSbytesavailable(DPSContext ctxt, int *n); - -extern void DPScachestatus(DPSContext ctxt); - -extern void DPSceiling(DPSContext ctxt); - -extern void DPScharpath(DPSContext ctxt, const char *s, int b); - -extern void DPSclear(DPSContext ctxt); - -extern void DPScleardictstack(DPSContext ctxt); - -extern void DPScleartomark(DPSContext ctxt); - -extern void DPSclientXready(DPSContext ctxt, int i0, int i1, int i2, int i3); - -extern void DPSclientsync(DPSContext ctxt); - -extern void DPSclip(DPSContext ctxt); - -extern void DPSclippath(DPSContext ctxt); - -extern void DPSclosefile(DPSContext ctxt); - -extern void DPSclosepath(DPSContext ctxt); - -extern void DPScolorimage(DPSContext ctxt); - -extern void DPSconcat(DPSContext ctxt, const float m[]); - -extern void DPSconcatmatrix(DPSContext ctxt); - -extern void DPScondition(DPSContext ctxt); - -extern void DPScopy(DPSContext ctxt, int n); - -extern void DPScopypage(DPSContext ctxt); - -extern void DPScos(DPSContext ctxt); - -extern void DPScount(DPSContext ctxt, int *n); - -extern void DPScountdictstack(DPSContext ctxt, int *n); - -extern void DPScountexecstack(DPSContext ctxt, int *n); - -extern void DPScounttomark(DPSContext ctxt, int *n); - -extern void DPScshow(DPSContext ctxt, const char *s); - -extern void DPScurrentXdrawingfunction(DPSContext ctxt, int *function); - -extern void DPScurrentXgcdrawable(DPSContext ctxt, int *gc, int *draw, int *x, int *y); - -extern void DPScurrentXgcdrawablecolor(DPSContext ctxt, int *gc, int *draw, int *x, int *y, int colorInfo[]); - -extern void DPScurrentXoffset(DPSContext ctxt, int *x, int *y); - -extern void DPScurrentblackgeneration(DPSContext ctxt); - -extern void DPScurrentcacheparams(DPSContext ctxt); - -extern void DPScurrentcmykcolor(DPSContext ctxt, float *c, float *m, float *y, float *k); - -extern void DPScurrentcolor(DPSContext ctxt); - -extern void DPScurrentcolorrendering(DPSContext ctxt); - -extern void DPScurrentcolorscreen(DPSContext ctxt); - -extern void DPScurrentcolorspace(DPSContext ctxt); - -extern void DPScurrentcolortransfer(DPSContext ctxt); - -extern void DPScurrentcontext(DPSContext ctxt, int *cid); - -extern void DPScurrentdash(DPSContext ctxt); - -extern void DPScurrentdevparams(DPSContext ctxt, const char *dev); - -extern void DPScurrentdict(DPSContext ctxt); - -extern void DPScurrentfile(DPSContext ctxt); - -extern void DPScurrentflat(DPSContext ctxt, float *flatness); - -extern void DPScurrentfont(DPSContext ctxt); - -extern void DPScurrentglobal(DPSContext ctxt, int *b); - -extern void DPScurrentgray(DPSContext ctxt, float *gray); - -extern void DPScurrentgstate(DPSContext ctxt, int gst); - -extern void DPScurrenthalftone(DPSContext ctxt); - -extern void DPScurrenthalftonephase(DPSContext ctxt, float *x, float *y); - -extern void DPScurrenthsbcolor(DPSContext ctxt, float *h, float *s, float *b); - -extern void DPScurrentlinecap(DPSContext ctxt, int *linecap); - -extern void DPScurrentlinejoin(DPSContext ctxt, int *linejoin); - -extern void DPScurrentlinewidth(DPSContext ctxt, float *width); - -extern void DPScurrentmatrix(DPSContext ctxt); - -extern void DPScurrentmiterlimit(DPSContext ctxt, float *limit); - -extern void DPScurrentobjectformat(DPSContext ctxt, int *code); - -extern void DPScurrentoverprint(DPSContext ctxt, int *b); - -extern void DPScurrentpacking(DPSContext ctxt, int *b); - -extern void DPScurrentpagedevice(DPSContext ctxt); - -extern void DPScurrentpoint(DPSContext ctxt, float *x, float *y); - -extern void DPScurrentrgbcolor(DPSContext ctxt, float *r, float *g, float *b); - -extern void DPScurrentscreen(DPSContext ctxt); - -extern void DPScurrentshared(DPSContext ctxt, int *b); - -extern void DPScurrentstrokeadjust(DPSContext ctxt, int *b); - -extern void DPScurrentsystemparams(DPSContext ctxt); - -extern void DPScurrenttransfer(DPSContext ctxt); - -extern void DPScurrentundercolorremoval(DPSContext ctxt); - -extern void DPScurrentuserparams(DPSContext ctxt); - -extern void DPScurveto(DPSContext ctxt, float x1, float y1, float x2, float y2, float x3, float y3); - -extern void DPScvi(DPSContext ctxt); - -extern void DPScvlit(DPSContext ctxt); - -extern void DPScvn(DPSContext ctxt); - -extern void DPScvr(DPSContext ctxt); - -extern void DPScvrs(DPSContext ctxt); - -extern void DPScvs(DPSContext ctxt); - -extern void DPScvx(DPSContext ctxt); - -extern void DPSdef(DPSContext ctxt); - -extern void DPSdefaultmatrix(DPSContext ctxt); - -extern void DPSdefinefont(DPSContext ctxt); - -extern void DPSdefineresource(DPSContext ctxt, const char *category); - -extern void DPSdefineusername(DPSContext ctxt, int i, const char *username); - -extern void DPSdefineuserobject(DPSContext ctxt); - -extern void DPSdeletefile(DPSContext ctxt, const char *filename); - -extern void DPSdetach(DPSContext ctxt); - -extern void DPSdeviceinfo(DPSContext ctxt); - -extern void DPSdict(DPSContext ctxt, int len); - -extern void DPSdictstack(DPSContext ctxt); - -extern void DPSdiv(DPSContext ctxt); - -extern void DPSdtransform(DPSContext ctxt, float x1, float y1, float *x2, float *y2); - -extern void DPSdup(DPSContext ctxt); - -extern void DPSecho(DPSContext ctxt, int b); - -extern void DPSend(DPSContext ctxt); - -extern void DPSeoclip(DPSContext ctxt); - -extern void DPSeofill(DPSContext ctxt); - -extern void DPSeoviewclip(DPSContext ctxt); - -extern void DPSeq(DPSContext ctxt); - -extern void DPSequals(DPSContext ctxt); - -extern void DPSequalsequals(DPSContext ctxt); - -extern void DPSerasepage(DPSContext ctxt); - -extern void DPSerrordict(DPSContext ctxt); - -extern void DPSexch(DPSContext ctxt); - -extern void DPSexec(DPSContext ctxt); - -extern void DPSexecform(DPSContext ctxt); - -extern void DPSexecstack(DPSContext ctxt); - -extern void DPSexecuserobject(DPSContext ctxt, int userObjIndex); - -extern void DPSexecuteonly(DPSContext ctxt); - -extern void DPSexit(DPSContext ctxt); - -extern void DPSexp(DPSContext ctxt); - -extern void DPSfalse(DPSContext ctxt); - -extern void DPSfile(DPSContext ctxt, const char *name, const char *access); - -extern void DPSfilenameforall(DPSContext ctxt); - -extern void DPSfileposition(DPSContext ctxt, int *pos); - -extern void DPSfill(DPSContext ctxt); - -extern void DPSfilter(DPSContext ctxt); - -extern void DPSfindencoding(DPSContext ctxt, const char *key); - -extern void DPSfindfont(DPSContext ctxt, const char *name); - -extern void DPSfindresource(DPSContext ctxt, const char *key, const char *category); - -extern void DPSflattenpath(DPSContext ctxt); - -extern void DPSfloor(DPSContext ctxt); - -extern void DPSflush(DPSContext ctxt); - -extern void DPSflushfile(DPSContext ctxt); - -extern void DPSfor(DPSContext ctxt); - -extern void DPSforall(DPSContext ctxt); - -extern void DPSfork(DPSContext ctxt); - -extern void DPSframedevice(DPSContext ctxt); - -extern void DPSgcheck(DPSContext ctxt, int *b); - -extern void DPSge(DPSContext ctxt); - -extern void DPSget(DPSContext ctxt); - -extern void DPSgetboolean(DPSContext ctxt, int *it); - -extern void DPSgetchararray(DPSContext ctxt, int size, char s[]); - -extern void DPSgetfloat(DPSContext ctxt, float *it); - -extern void DPSgetfloatarray(DPSContext ctxt, int size, float a[]); - -extern void DPSgetint(DPSContext ctxt, int *it); - -extern void DPSgetintarray(DPSContext ctxt, int size, int a[]); - -extern void DPSgetinterval(DPSContext ctxt); - -extern void DPSgetstring(DPSContext ctxt, char *s); - -extern void DPSglobaldict(DPSContext ctxt); - -extern void DPSglyphshow(DPSContext ctxt, const char *name); - -extern void DPSgrestore(DPSContext ctxt); - -extern void DPSgrestoreall(DPSContext ctxt); - -extern void DPSgsave(DPSContext ctxt); - -extern void DPSgstate(DPSContext ctxt); - -extern void DPSgt(DPSContext ctxt); - -extern void DPSidentmatrix(DPSContext ctxt); - -extern void DPSidiv(DPSContext ctxt); - -extern void DPSidtransform(DPSContext ctxt, float x1, float y1, float *x2, float *y2); - -extern void DPSif(DPSContext ctxt); - -extern void DPSifelse(DPSContext ctxt); - -extern void DPSimage(DPSContext ctxt); - -extern void DPSimagemask(DPSContext ctxt); - -extern void DPSindex(DPSContext ctxt, int i); - -extern void DPSineofill(DPSContext ctxt, float x, float y, int *b); - -extern void DPSinfill(DPSContext ctxt, float x, float y, int *b); - -extern void DPSinitclip(DPSContext ctxt); - -extern void DPSinitgraphics(DPSContext ctxt); - -extern void DPSinitmatrix(DPSContext ctxt); - -extern void DPSinitviewclip(DPSContext ctxt); - -extern void DPSinstroke(DPSContext ctxt, float x, float y, int *b); - -extern void DPSinueofill(DPSContext ctxt, float x, float y, const char nums[], int n, const char ops[], int l, int *b); - -extern void DPSinufill(DPSContext ctxt, float x, float y, const char nums[], int n, const char ops[], int l, int *b); - -extern void DPSinustroke(DPSContext ctxt, float x, float y, const char nums[], int n, const char ops[], int l, int *b); - -extern void DPSinvertmatrix(DPSContext ctxt); - -extern void DPSitransform(DPSContext ctxt, float x1, float y1, float *x2, float *y2); - -extern void DPSjoin(DPSContext ctxt); - -extern void DPSknown(DPSContext ctxt, int *b); - -extern void DPSkshow(DPSContext ctxt, const char *s); - -extern void DPSlanguagelevel(DPSContext ctxt, int *n); - -extern void DPSle(DPSContext ctxt); - -extern void DPSleftbracket(DPSContext ctxt); - -extern void DPSleftleft(DPSContext ctxt); - -extern void DPSlength(DPSContext ctxt, int *len); - -extern void DPSlineto(DPSContext ctxt, float x, float y); - -extern void DPSln(DPSContext ctxt); - -extern void DPSload(DPSContext ctxt); - -extern void DPSlock(DPSContext ctxt); - -extern void DPSlog(DPSContext ctxt); - -extern void DPSloop(DPSContext ctxt); - -extern void DPSlt(DPSContext ctxt); - -extern void DPSmakefont(DPSContext ctxt); - -extern void DPSmakepattern(DPSContext ctxt); - -extern void DPSmark(DPSContext ctxt); - -extern void DPSmatrix(DPSContext ctxt); - -extern void DPSmaxlength(DPSContext ctxt, int *len); - -extern void DPSmod(DPSContext ctxt); - -extern void DPSmonitor(DPSContext ctxt); - -extern void DPSmoveto(DPSContext ctxt, float x, float y); - -extern void DPSmul(DPSContext ctxt); - -extern void DPSne(DPSContext ctxt); - -extern void DPSneg(DPSContext ctxt); - -extern void DPSnewpath(DPSContext ctxt); - -extern void DPSnoaccess(DPSContext ctxt); - -extern void DPSnot(DPSContext ctxt); - -extern void DPSnotify(DPSContext ctxt); - -extern void DPSnull(DPSContext ctxt); - -extern void DPSnulldevice(DPSContext ctxt); - -extern void DPSor(DPSContext ctxt); - -extern void DPSpackedarray(DPSContext ctxt); - -extern void DPSpathbbox(DPSContext ctxt, float *llx, float *lly, float *urx, float *ury); - -extern void DPSpathforall(DPSContext ctxt); - -extern void DPSpop(DPSContext ctxt); - -extern void DPSprint(DPSContext ctxt); - -extern void DPSprintobject(DPSContext ctxt, int tag); - -extern void DPSproduct(DPSContext ctxt); - -extern void DPSprompt(DPSContext ctxt); - -extern void DPSpstack(DPSContext ctxt); - -extern void DPSput(DPSContext ctxt); - -extern void DPSputinterval(DPSContext ctxt); - -extern void DPSquit(DPSContext ctxt); - -extern void DPSrand(DPSContext ctxt); - -extern void DPSrcheck(DPSContext ctxt, int *b); - -extern void DPSrcurveto(DPSContext ctxt, float x1, float y1, float x2, float y2, float x3, float y3); - -extern void DPSread(DPSContext ctxt, int *b); - -extern void DPSreadhexstring(DPSContext ctxt, int *b); - -extern void DPSreadline(DPSContext ctxt, int *b); - -extern void DPSreadonly(DPSContext ctxt); - -extern void DPSreadstring(DPSContext ctxt, int *b); - -extern void DPSrealtime(DPSContext ctxt, int *i); - -extern void DPSrectclip(DPSContext ctxt, float x, float y, float w, float h); - -extern void DPSrectfill(DPSContext ctxt, float x, float y, float w, float h); - -extern void DPSrectstroke(DPSContext ctxt, float x, float y, float w, float h); - -extern void DPSrectviewclip(DPSContext ctxt, float x, float y, float w, float h); - -extern void DPSrenamefile(DPSContext ctxt, const char *oldname, const char *newname); - -extern void DPSrenderbands(DPSContext ctxt); - -extern void DPSrepeat(DPSContext ctxt); - -extern void DPSresetfile(DPSContext ctxt); - -extern void DPSresourceforall(DPSContext ctxt, const char *category); - -extern void DPSresourcestatus(DPSContext ctxt, const char *key, const char *category, int *b); - -extern void DPSrestore(DPSContext ctxt); - -extern void DPSreversepath(DPSContext ctxt); - -extern void DPSrevision(DPSContext ctxt, int *n); - -extern void DPSrightbracket(DPSContext ctxt); - -extern void DPSrightright(DPSContext ctxt); - -extern void DPSrlineto(DPSContext ctxt, float x, float y); - -extern void DPSrmoveto(DPSContext ctxt, float x, float y); - -extern void DPSroll(DPSContext ctxt, int n, int j); - -extern void DPSrootfont(DPSContext ctxt); - -extern void DPSrotate(DPSContext ctxt, float angle); - -extern void DPSround(DPSContext ctxt); - -extern void DPSrrand(DPSContext ctxt); - -extern void DPSrun(DPSContext ctxt, const char *filename); - -extern void DPSsave(DPSContext ctxt); - -extern void DPSscale(DPSContext ctxt, float x, float y); - -extern void DPSscalefont(DPSContext ctxt, float size); - -extern void DPSscheck(DPSContext ctxt, int *b); - -extern void DPSsearch(DPSContext ctxt, int *b); - -extern void DPSselectfont(DPSContext ctxt, const char *name, float scale); - -extern void DPSsendboolean(DPSContext ctxt, int it); - -extern void DPSsendchararray(DPSContext ctxt, const char s[], int size); - -extern void DPSsendfloat(DPSContext ctxt, float it); - -extern void DPSsendfloatarray(DPSContext ctxt, const float a[], int size); - -extern void DPSsendint(DPSContext ctxt, int it); - -extern void DPSsendintarray(DPSContext ctxt, const int a[], int size); - -extern void DPSsendstring(DPSContext ctxt, const char *s); - -extern void DPSserialnumber(DPSContext ctxt, int *n); - -extern void DPSsetXdrawingfunction(DPSContext ctxt, int function); - -extern void DPSsetXgcdrawable(DPSContext ctxt, int gc, int draw, int x, int y); - -extern void DPSsetXgcdrawablecolor(DPSContext ctxt, int gc, int draw, int x, int y, const int colorInfo[]); - -extern void DPSsetXoffset(DPSContext ctxt, int x, int y); - -extern void DPSsetXrgbactual(DPSContext ctxt, float r, float g, float b, int *success); - -extern void DPSsetbbox(DPSContext ctxt, float llx, float lly, float urx, float ury); - -extern void DPSsetblackgeneration(DPSContext ctxt); - -extern void DPSsetcachedevice(DPSContext ctxt, float wx, float wy, float llx, float lly, float urx, float ury); - -extern void DPSsetcachelimit(DPSContext ctxt, int n); - -extern void DPSsetcacheparams(DPSContext ctxt); - -extern void DPSsetcharwidth(DPSContext ctxt, float wx, float wy); - -extern void DPSsetcmykcolor(DPSContext ctxt, float c, float m, float y, float k); - -extern void DPSsetcolor(DPSContext ctxt); - -extern void DPSsetcolorrendering(DPSContext ctxt); - -extern void DPSsetcolorscreen(DPSContext ctxt); - -extern void DPSsetcolorspace(DPSContext ctxt); - -extern void DPSsetcolortransfer(DPSContext ctxt); - -extern void DPSsetdash(DPSContext ctxt, const float pat[], int size, float offset); - -extern void DPSsetdevparams(DPSContext ctxt); - -extern void DPSsetfileposition(DPSContext ctxt, int pos); - -extern void DPSsetflat(DPSContext ctxt, float flatness); - -extern void DPSsetfont(DPSContext ctxt, int f); - -extern void DPSsetglobal(DPSContext ctxt, int b); - -extern void DPSsetgray(DPSContext ctxt, float gray); - -extern void DPSsetgstate(DPSContext ctxt, int gst); - -extern void DPSsethalftone(DPSContext ctxt); - -extern void DPSsethalftonephase(DPSContext ctxt, float x, float y); - -extern void DPSsethsbcolor(DPSContext ctxt, float h, float s, float b); - -extern void DPSsetlinecap(DPSContext ctxt, int linecap); - -extern void DPSsetlinejoin(DPSContext ctxt, int linejoin); - -extern void DPSsetlinewidth(DPSContext ctxt, float width); - -extern void DPSsetmatrix(DPSContext ctxt); - -extern void DPSsetmiterlimit(DPSContext ctxt, float limit); - -extern void DPSsetobjectformat(DPSContext ctxt, int code); - -extern void DPSsetoverprint(DPSContext ctxt, int b); - -extern void DPSsetpacking(DPSContext ctxt, int b); - -extern void DPSsetpagedevice(DPSContext ctxt); - -extern void DPSsetpattern(DPSContext ctxt); - -extern void DPSsetrgbcolor(DPSContext ctxt, float r, float g, float b); - -extern void DPSsetscreen(DPSContext ctxt); - -extern void DPSsetshared(DPSContext ctxt, int b); - -extern void DPSsetstrokeadjust(DPSContext ctxt, int b); - -extern void DPSsetsystemparams(DPSContext ctxt); - -extern void DPSsettransfer(DPSContext ctxt); - -extern void DPSsetucacheparams(DPSContext ctxt); - -extern void DPSsetundercolorremoval(DPSContext ctxt); - -extern void DPSsetuserparams(DPSContext ctxt); - -extern void DPSsetvmthreshold(DPSContext ctxt, int i); - -extern void DPSshareddict(DPSContext ctxt); - -extern void DPSshow(DPSContext ctxt, const char *s); - -extern void DPSshowpage(DPSContext ctxt); - -extern void DPSsin(DPSContext ctxt); - -extern void DPSsqrt(DPSContext ctxt); - -extern void DPSsrand(DPSContext ctxt); - -extern void DPSstack(DPSContext ctxt); - -extern void DPSstart(DPSContext ctxt); - -extern void DPSstartjob(DPSContext ctxt, int b, const char *password); - -extern void DPSstatus(DPSContext ctxt, int *b); - -extern void DPSstatusdict(DPSContext ctxt); - -extern void DPSstop(DPSContext ctxt); - -extern void DPSstopped(DPSContext ctxt); - -extern void DPSstore(DPSContext ctxt); - -extern void DPSstring(DPSContext ctxt, int len); - -extern void DPSstringwidth(DPSContext ctxt, const char *s, float *xp, float *yp); - -extern void DPSstroke(DPSContext ctxt); - -extern void DPSstrokepath(DPSContext ctxt); - -extern void DPSsub(DPSContext ctxt); - -extern void DPSsystemdict(DPSContext ctxt); - -extern void DPStoken(DPSContext ctxt, int *b); - -extern void DPStransform(DPSContext ctxt, float x1, float y1, float *x2, float *y2); - -extern void DPStranslate(DPSContext ctxt, float x, float y); - -extern void DPStrue(DPSContext ctxt); - -extern void DPStruncate(DPSContext ctxt); - -extern void DPStype(DPSContext ctxt); - -extern void DPSuappend(DPSContext ctxt, const char nums[], int n, const char ops[], int l); - -extern void DPSucache(DPSContext ctxt); - -extern void DPSucachestatus(DPSContext ctxt); - -extern void DPSueofill(DPSContext ctxt, const char nums[], int n, const char ops[], int l); - -extern void DPSufill(DPSContext ctxt, const char nums[], int n, const char ops[], int l); - -extern void DPSundef(DPSContext ctxt, const char *name); - -extern void DPSundefinefont(DPSContext ctxt, const char *name); - -extern void DPSundefineresource(DPSContext ctxt, const char *key, const char *category); - -extern void DPSundefineuserobject(DPSContext ctxt, int userObjIndex); - -extern void DPSupath(DPSContext ctxt, int b); - -extern void DPSuserdict(DPSContext ctxt); - -extern void DPSusertime(DPSContext ctxt, int *milliseconds); - -extern void DPSustroke(DPSContext ctxt, const char nums[], int n, const char ops[], int l); - -extern void DPSustrokepath(DPSContext ctxt, const char nums[], int n, const char ops[], int l); - -extern void DPSversion(DPSContext ctxt, int bufsize, char buf[]); - -extern void DPSviewclip(DPSContext ctxt); - -extern void DPSviewclippath(DPSContext ctxt); - -extern void DPSvmreclaim(DPSContext ctxt, int code); - -extern void DPSvmstatus(DPSContext ctxt, int *level, int *used, int *maximum); - -extern void DPSwait(DPSContext ctxt); - -extern void DPSwcheck(DPSContext ctxt, int *b); - -extern void DPSwhere(DPSContext ctxt, int *b); - -extern void DPSwidthshow(DPSContext ctxt, float x, float y, int c, const char *s); - -extern void DPSwrite(DPSContext ctxt); - -extern void DPSwritehexstring(DPSContext ctxt); - -extern void DPSwriteobject(DPSContext ctxt, int tag); - -extern void DPSwritestring(DPSContext ctxt); - -extern void DPSwtranslation(DPSContext ctxt, float *x, float *y); - -extern void DPSxcheck(DPSContext ctxt, int *b); - -extern void DPSxor(DPSContext ctxt); - -extern void DPSxshow(DPSContext ctxt, const char *s, const float numarray[], int size); - -extern void DPSxyshow(DPSContext ctxt, const char *s, const float numarray[], int size); - -extern void DPSyield(DPSContext ctxt); - -extern void DPSyshow(DPSContext ctxt, const char *s, const float numarray[], int size); - -#if defined(__cplusplus) || defined(c_plusplus) -} -#endif - -#endif /* _NO_PROTO */ - -#endif /* DPSOPS_H */ Index: xc/lib/dps/dpsos2.def diff -u xc/lib/dps/dpsos2.def:1.1 xc/lib/dps/dpsos2.def:removed --- xc/lib/dps/dpsos2.def:1.1 Wed Apr 5 14:13:21 2000 +++ xc/lib/dps/dpsos2.def Thu Feb 27 12:27:48 2003 @@ -1,854 +0,0 @@ -LIBRARY dps -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/dps/dpsos2.def,v 1.1 2000/04/05 18:13:21 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 131072 -EXPORTS - CSDPSInit @ 1 - CSDPSHeadOfDpyExt @ 2 - DPSCAPChangeGC @ 3 - DPSCAPCreate @ 4 - DPSCAPDestroy @ 5 - DPSCAPOpenAgent @ 6 - DPSCAPStartUp @ 8 - DPSCAPWrite @ 9 - DPSCAPCloseDisplayProc @ 10 - DPSCAPCloseAgent @ 13 - DPSclientsync @ 14 - DPScurrentXgcdrawable @ 15 - DPScurrentXgcdrawablecolor @ 16 - DPScurrentXoffset @ 17 - DPSsetXgcdrawable @ 18 - DPSsetXgcdrawablecolor @ 19 - DPSsetXoffset @ 20 - DPSsetXrgbactual @ 21 - DPSclientXready @ 22 - DPSsetXdrawingfunction @ 23 - DPScurrentXdrawingfunction @ 24 - DPSWarnProc @ 25 - DPSFatalProc @ 26 - DPSCantHappen @ 27 - DPScolorimage @ 28 - DPScurrentblackgeneration @ 29 - DPScurrentcmykcolor @ 30 - DPScurrentcolorscreen @ 31 - DPScurrentcolortransfer @ 32 - DPScurrentundercolorremoval @ 33 - DPSsetblackgeneration @ 34 - DPSsetcmykcolor @ 35 - DPSsetcolorscreen @ 36 - DPSsetcolortransfer @ 37 - DPSsetundercolorremoval @ 38 - DPSeq @ 39 - DPSexit @ 40 - DPSfalse @ 41 - DPSfor @ 42 - DPSforall @ 43 - DPSge @ 44 - DPSgt @ 45 - DPSif @ 46 - DPSifelse @ 47 - DPSle @ 48 - DPSloop @ 49 - DPSlt @ 50 - DPSne @ 51 - DPSnot @ 52 - DPSor @ 53 - DPSrepeat @ 54 - DPSstop @ 55 - DPSstopped @ 56 - DPStrue @ 57 - DPSUserObjects @ 58 - DPScondition @ 59 - DPScurrentcontext @ 60 - DPScurrentobjectformat @ 61 - DPSdefineusername @ 62 - DPSdefineuserobject @ 63 - DPSdetach @ 64 - DPSexecuserobject @ 65 - DPSfork @ 66 - DPSjoin @ 67 - DPSlock @ 68 - DPSmonitor @ 69 - DPSnotify @ 70 - DPSsetobjectformat @ 71 - DPSsetvmthreshold @ 72 - DPSundefineuserobject @ 73 - DPSwait @ 74 - DPSyield @ 75 - DPSaload @ 76 - DPSanchorsearch @ 77 - DPSarray @ 78 - DPSastore @ 79 - DPSbegin @ 80 - DPSclear @ 81 - DPScleartomark @ 82 - DPScopy @ 83 - DPScount @ 84 - DPScounttomark @ 85 - DPScvi @ 86 - DPScvlit @ 87 - DPScvn @ 88 - DPScvr @ 89 - DPScvrs @ 90 - DPScvs @ 91 - DPScvx @ 92 - DPSdef @ 93 - DPSdict @ 94 - DPSdictstack @ 95 - DPSdup @ 96 - DPSend @ 97 - DPSexch @ 98 - DPSexecstack @ 99 - DPSexecuteonly @ 100 - DPSget @ 101 - DPSgetinterval @ 102 - DPSindex @ 103 - DPSknown @ 104 - DPSlength @ 105 - DPSload @ 106 - DPSmark @ 107 - DPSmatrix @ 108 - DPSmaxlength @ 109 - DPSnoaccess @ 110 - DPSnull @ 111 - DPSpackedarray @ 112 - DPSpop @ 113 - DPSput @ 114 - DPSputinterval @ 115 - DPSrcheck @ 116 - DPSreadonly @ 117 - DPSroll @ 118 - DPSscheck @ 119 - DPSsearch @ 120 - DPSshareddict @ 121 - DPSstatusdict @ 122 - DPSstore @ 123 - DPSstring @ 124 - DPSstringwidth @ 125 - DPSsystemdict @ 126 - DPSuserdict @ 127 - DPSwcheck @ 128 - DPSwhere @ 129 - DPSxcheck @ 130 - DPSCreatePSWDict @ 131 - DPSDestroyPSWDict @ 132 - DPSWDictLookup @ 133 - DPSWDictEnter @ 134 - DPSWDictRemove @ 135 - DPSMakeAtom @ 136 - DPSFontDirectory @ 137 - DPSISOLatin1Encoding @ 138 - DPSSharedFontDirectory @ 139 - DPSStandardEncoding @ 140 - DPScachestatus @ 141 - DPScurrentcacheparams @ 142 - DPScurrentfont @ 143 - DPSdefinefont @ 144 - DPSfindfont @ 145 - DPSmakefont @ 146 - DPSscalefont @ 147 - DPSselectfont @ 148 - DPSsetcachedevice @ 149 - DPSsetcachelimit @ 150 - DPSsetcacheparams @ 151 - DPSsetcharwidth @ 152 - DPSsetfont @ 153 - DPSundefinefont @ 154 - DPSconcat @ 155 - DPScurrentdash @ 156 - DPScurrentflat @ 157 - DPScurrentgray @ 158 - DPScurrentgstate @ 159 - DPScurrenthalftone @ 160 - DPScurrenthalftonephase @ 161 - DPScurrenthsbcolor @ 162 - DPScurrentlinecap @ 163 - DPScurrentlinejoin @ 164 - DPScurrentlinewidth @ 165 - DPScurrentmatrix @ 166 - DPScurrentmiterlimit @ 167 - DPScurrentpoint @ 168 - DPScurrentrgbcolor @ 169 - DPScurrentscreen @ 170 - DPScurrentstrokeadjust @ 171 - DPScurrenttransfer @ 172 - DPSdefaultmatrix @ 173 - DPSgrestore @ 174 - DPSgrestoreall @ 175 - DPSgsave @ 176 - DPSgstate @ 177 - DPSinitgraphics @ 178 - DPSinitmatrix @ 179 - DPSrotate @ 180 - DPSscale @ 181 - DPSsetdash @ 182 - DPSsetflat @ 183 - DPSsetgray @ 184 - DPSsetgstate @ 185 - DPSsethalftone @ 186 - DPSsethalftonephase @ 187 - DPSsethsbcolor @ 188 - DPSsetlinecap @ 189 - DPSsetlinejoin @ 190 - DPSsetlinewidth @ 191 - DPSsetmatrix @ 192 - DPSsetmiterlimit @ 193 - DPSsetrgbcolor @ 194 - DPSsetscreen @ 195 - DPSsetstrokeadjust @ 196 - DPSsettransfer @ 197 - DPStranslate @ 198 - DPSclientPrintProc @ 199 - DPSinnerProcWriteData @ 200 - DPSSafeSetLastNameIndex @ 201 - DPSCheckInitClientGlobals @ 202 - DPSPrivateCheckWait @ 203 - DPSPrivateDestroyContext @ 204 - DPSPrivateDestroySpace @ 205 - DPSCheckShared @ 206 - DPSDefaultPrivateHandler @ 207 - DPSCreateContext @ 208 - DPSInitCommonTextContextProcs @ 209 - DPSInitCommonContextProcs @ 210 - DPSInitPrivateContextProcs @ 211 - DPSInitPrivateContextFields @ 212 - DPSInitPrivateTextContextFields @ 213 - DPSInitCommonSpaceProcs @ 214 - DPSInitPrivateSpaceFields @ 215 - DPSequals @ 216 - DPSequalsequals @ 217 - DPSbytesavailable @ 218 - DPSclosefile @ 219 - DPScurrentfile @ 220 - DPSdeletefile @ 221 - DPSecho @ 222 - DPSfile @ 223 - DPSfilenameforall @ 224 - DPSfileposition @ 225 - DPSflush @ 226 - DPSflushfile @ 227 - DPSprint @ 228 - DPSprintobject @ 229 - DPSpstack @ 230 - DPSread @ 231 - DPSreadhexstring @ 232 - DPSreadline @ 233 - DPSreadstring @ 234 - DPSrenamefile @ 235 - DPSresetfile @ 236 - DPSsetfileposition @ 237 - DPSstack @ 238 - DPSstatus @ 239 - DPStoken @ 240 - DPSwrite @ 241 - DPSwritehexstring @ 242 - DPSwriteobject @ 243 - DPSwritestring @ 244 - DPSleftbracket @ 245 - DPSrightbracket @ 246 - DPSleftleft @ 247 - DPSrightright @ 248 - DPScshow @ 249 - DPScurrentcolor @ 250 - DPScurrentcolorrendering @ 251 - DPScurrentcolorspace @ 252 - DPScurrentdevparams @ 253 - DPScurrentglobal @ 254 - DPScurrentoverprint @ 255 - DPScurrentpagedevice @ 256 - DPScurrentsystemparams @ 257 - DPScurrentuserparams @ 258 - DPSdefineresource @ 259 - DPSexecform @ 260 - DPSfilter @ 261 - DPSfindencoding @ 262 - DPSfindresource @ 263 - DPSgcheck @ 264 - DPSglobaldict @ 265 - DPSGlobalFontDirectory @ 266 - DPSglyphshow @ 267 - DPSlanguagelevel @ 268 - DPSmakepattern @ 269 - DPSproduct @ 270 - DPSresourceforall @ 271 - DPSresourcestatus @ 272 - DPSrevision @ 273 - DPSrootfont @ 274 - DPSserialnumber @ 275 - DPSsetcolor @ 276 - DPSsetcolorrendering @ 277 - DPSsetcolorspace @ 278 - DPSsetdevparams @ 279 - DPSsetglobal @ 280 - DPSsetoverprint @ 281 - DPSsetpagedevice @ 282 - DPSsetpattern @ 283 - DPSsetsystemparams @ 284 - DPSsetuserparams @ 285 - DPSstartjob @ 286 - DPSundefineresource @ 287 - DPSabs @ 288 - DPSadd @ 289 - DPSand @ 290 - DPSatan @ 291 - DPSbitshift @ 292 - DPSceiling @ 293 - DPScos @ 294 - DPSdiv @ 295 - DPSexp @ 296 - DPSfloor @ 297 - DPSidiv @ 298 - DPSln @ 299 - DPSlog @ 300 - DPSmod @ 301 - DPSmul @ 302 - DPSneg @ 303 - DPSround @ 304 - DPSsin @ 305 - DPSsqrt @ 306 - DPSsub @ 307 - DPStruncate @ 308 - DPSxor @ 309 - DPSbanddevice @ 310 - DPSframedevice @ 311 - DPSnulldevice @ 312 - DPSrenderbands @ 313 - DPSconcatmatrix @ 314 - DPSdtransform @ 315 - DPSidentmatrix @ 316 - DPSidtransform @ 317 - DPSinvertmatrix @ 318 - DPSitransform @ 319 - DPStransform @ 320 - DPSgetboolean @ 321 - DPSgetchararray @ 322 - DPSgetfloat @ 323 - DPSgetfloatarray @ 324 - DPSgetint @ 325 - DPSgetintarray @ 326 - DPSgetstring @ 327 - DPSsendboolean @ 328 - DPSsendchararray @ 329 - DPSsendfloat @ 330 - DPSsendfloatarray @ 331 - DPSsendint @ 332 - DPSsendintarray @ 333 - DPSsendstring @ 334 - DPSarc @ 335 - DPSarcn @ 336 - DPSarct @ 337 - DPSarcto @ 338 - DPScharpath @ 339 - DPSclip @ 340 - DPSclippath @ 341 - DPSclosepath @ 342 - DPScurveto @ 343 - DPSeoclip @ 344 - DPSeoviewclip @ 345 - DPSflattenpath @ 346 - DPSinitclip @ 347 - DPSinitviewclip @ 348 - DPSlineto @ 349 - DPSmoveto @ 350 - DPSnewpath @ 351 - DPSpathbbox @ 352 - DPSpathforall @ 353 - DPSrcurveto @ 354 - DPSrectclip @ 355 - DPSrectviewclip @ 356 - DPSreversepath @ 357 - DPSrlineto @ 358 - DPSrmoveto @ 359 - DPSsetbbox @ 360 - DPSsetucacheparams @ 361 - DPSuappend @ 362 - DPSucache @ 363 - DPSucachestatus @ 364 - DPSupath @ 365 - DPSviewclip @ 366 - DPSviewclippath @ 367 - DPSashow @ 368 - DPSawidthshow @ 369 - DPScopypage @ 370 - DPSeofill @ 371 - DPSerasepage @ 372 - DPSfill @ 373 - DPSimage @ 374 - DPSimagemask @ 375 - DPSkshow @ 376 - DPSrectfill @ 377 - DPSrectstroke @ 378 - DPSshow @ 379 - DPSshowpage @ 380 - DPSstroke @ 381 - DPSstrokepath @ 382 - DPSueofill @ 383 - DPSufill @ 384 - DPSustroke @ 385 - DPSustrokepath @ 386 - DPSwidthshow @ 387 - DPSxshow @ 388 - DPSxyshow @ 389 - DPSyshow @ 390 - DPSInitClient @ 391 - DPSIncludePrivContext @ 392 - DPSSendPostScript @ 393 - DPSSendInterrupt @ 394 - DPSSendEOF @ 395 - DPSSendTerminate @ 396 - DPSSendDestroySpace @ 397 - DPSCheckRaiseError @ 399 - DPSInitSysNames @ 400 - DPSSetWh @ 401 - DPSOutOfMemory @ 402 - DPSbind @ 403 - DPScleardictstack @ 404 - DPScountdictstack @ 405 - DPScountexecstack @ 406 - DPScurrentdict @ 407 - DPScurrentpacking @ 408 - DPScurrentshared @ 409 - DPSdeviceinfo @ 410 - DPSerrordict @ 411 - DPSexec @ 412 - DPSprompt @ 413 - DPSquit @ 414 - DPSrand @ 415 - DPSrealtime @ 416 - DPSrestore @ 417 - DPSrrand @ 418 - DPSrun @ 419 - DPSsave @ 420 - DPSsetpacking @ 421 - DPSsetshared @ 422 - DPSsrand @ 423 - DPSstart @ 424 - DPStype @ 425 - DPSundef @ 426 - DPSusertime @ 427 - DPSversion @ 428 - DPSvmreclaim @ 429 - DPSvmstatus @ 430 - DPSineofill @ 431 - DPSinfill @ 432 - DPSinstroke @ 433 - DPSinueofill @ 434 - DPSinufill @ 435 - DPSinustroke @ 436 - DPSwtranslation @ 437 - PSclientsync @ 438 - PScurrentXgcdrawable @ 439 - PScurrentXgcdrawablecolor @ 440 - PScurrentXoffset @ 441 - PSsetXgcdrawable @ 442 - PSsetXgcdrawablecolor @ 443 - PSsetXoffset @ 444 - PSsetXrgbactual @ 445 - PSclientXready @ 446 - PSsetXdrawingfunction @ 447 - PScurrentXdrawingfunction @ 448 - PScolorimage @ 449 - PScurrentblackgeneration @ 450 - PScurrentcmykcolor @ 451 - PScurrentcolorscreen @ 452 - PScurrentcolortransfer @ 453 - PScurrentundercolorremoval @ 454 - PSsetblackgeneration @ 455 - PSsetcmykcolor @ 456 - PSsetcolorscreen @ 457 - PSsetcolortransfer @ 458 - PSsetundercolorremoval @ 459 - PSeq @ 460 - PSexit @ 461 - PSfalse @ 462 - PSfor @ 463 - PSforall @ 464 - PSge @ 465 - PSgt @ 466 - PSif @ 467 - PSifelse @ 468 - PSle @ 469 - PSloop @ 470 - PSlt @ 471 - PSne @ 472 - PSnot @ 473 - PSor @ 474 - PSrepeat @ 475 - PSstop @ 476 - PSstopped @ 477 - PStrue @ 478 - PSUserObjects @ 479 - PScondition @ 480 - PScurrentcontext @ 481 - PScurrentobjectformat @ 482 - PSdefineusername @ 483 - PSdefineuserobject @ 484 - PSdetach @ 485 - PSexecuserobject @ 486 - PSfork @ 487 - PSjoin @ 488 - PSlock @ 489 - PSmonitor @ 490 - PSnotify @ 491 - PSsetobjectformat @ 492 - PSsetvmthreshold @ 493 - PSundefineuserobject @ 494 - PSwait @ 495 - PSyield @ 496 - PSaload @ 497 - PSanchorsearch @ 498 - PSarray @ 499 - PSastore @ 500 - PSbegin @ 501 - PSclear @ 502 - PScleartomark @ 503 - PScopy @ 504 - PScount @ 505 - PScounttomark @ 506 - PScvi @ 507 - PScvlit @ 508 - PScvn @ 509 - PScvr @ 510 - PScvrs @ 511 - PScvs @ 512 - PScvx @ 513 - PSdef @ 514 - PSdict @ 515 - PSdictstack @ 516 - PSdup @ 517 - PSend @ 518 - PSexch @ 519 - PSexecstack @ 520 - PSexecuteonly @ 521 - PSget @ 522 - PSgetinterval @ 523 - PSindex @ 524 - PSknown @ 525 - PSlength @ 526 - PSload @ 527 - PSmark @ 528 - PSmatrix @ 529 - PSmaxlength @ 530 - PSnoaccess @ 531 - PSnull @ 532 - PSpackedarray @ 533 - PSpop @ 534 - PSput @ 535 - PSputinterval @ 536 - PSrcheck @ 537 - PSreadonly @ 538 - PSroll @ 539 - PSscheck @ 540 - PSsearch @ 541 - PSshareddict @ 542 - PSstatusdict @ 543 - PSstore @ 544 - PSstring @ 545 - PSstringwidth @ 546 - PSsystemdict @ 547 - PSuserdict @ 548 - PSwcheck @ 549 - PSwhere @ 550 - PSxcheck @ 551 - PSFontDirectory @ 552 - PSISOLatin1Encoding @ 553 - PSSharedFontDirectory @ 554 - PSStandardEncoding @ 555 - PScachestatus @ 556 - PScurrentcacheparams @ 557 - PScurrentfont @ 558 - PSdefinefont @ 559 - PSfindfont @ 560 - PSmakefont @ 561 - PSscalefont @ 562 - PSselectfont @ 563 - PSsetcachedevice @ 564 - PSsetcachelimit @ 565 - PSsetcacheparams @ 566 - PSsetcharwidth @ 567 - PSsetfont @ 568 - PSundefinefont @ 569 - PSconcat @ 570 - PScurrentdash @ 571 - PScurrentflat @ 572 - PScurrentgray @ 573 - PScurrentgstate @ 574 - PScurrenthalftone @ 575 - PScurrenthalftonephase @ 576 - PScurrenthsbcolor @ 577 - PScurrentlinecap @ 578 - PScurrentlinejoin @ 579 - PScurrentlinewidth @ 580 - PScurrentmatrix @ 581 - PScurrentmiterlimit @ 582 - PScurrentpoint @ 583 - PScurrentrgbcolor @ 584 - PScurrentscreen @ 585 - PScurrentstrokeadjust @ 586 - PScurrenttransfer @ 587 - PSdefaultmatrix @ 588 - PSgrestore @ 589 - PSgrestoreall @ 590 - PSgsave @ 591 - PSgstate @ 592 - PSinitgraphics @ 593 - PSinitmatrix @ 594 - PSrotate @ 595 - PSscale @ 596 - PSsetdash @ 597 - PSsetflat @ 598 - PSsetgray @ 599 - PSsetgstate @ 600 - PSsethalftone @ 601 - PSsethalftonephase @ 602 - PSsethsbcolor @ 603 - PSsetlinecap @ 604 - PSsetlinejoin @ 605 - PSsetlinewidth @ 606 - PSsetmatrix @ 607 - PSsetmiterlimit @ 608 - PSsetrgbcolor @ 609 - PSsetscreen @ 610 - PSsetstrokeadjust @ 611 - PSsettransfer @ 612 - PStranslate @ 613 - PSequals @ 614 - PSequalsequals @ 615 - PSbytesavailable @ 616 - PSclosefile @ 617 - PScurrentfile @ 618 - PSdeletefile @ 619 - PSecho @ 620 - PSfile @ 621 - PSfilenameforall @ 622 - PSfileposition @ 623 - PSflush @ 624 - PSflushfile @ 625 - PSprint @ 626 - PSprintobject @ 627 - PSpstack @ 628 - PSread @ 629 - PSreadhexstring @ 630 - PSreadline @ 631 - PSreadstring @ 632 - PSrenamefile @ 633 - PSresetfile @ 634 - PSsetfileposition @ 635 - PSstack @ 636 - PSstatus @ 637 - PStoken @ 638 - PSwrite @ 639 - PSwritehexstring @ 640 - PSwriteobject @ 641 - PSwritestring @ 642 - PSleftbracket @ 643 - PSrightbracket @ 644 - PSleftleft @ 645 - PSrightright @ 646 - PScshow @ 647 - PScurrentcolor @ 648 - PScurrentcolorrendering @ 649 - PScurrentcolorspace @ 650 - PScurrentdevparams @ 651 - PScurrentglobal @ 652 - PScurrentoverprint @ 653 - PScurrentpagedevice @ 654 - PScurrentsystemparams @ 655 - PScurrentuserparams @ 656 - PSdefineresource @ 657 - PSexecform @ 658 - PSfilter @ 659 - PSfindencoding @ 660 - PSfindresource @ 661 - PSgcheck @ 662 - PSglobaldict @ 663 - PSGlobalFontDirectory @ 664 - PSglyphshow @ 665 - PSlanguagelevel @ 666 - PSmakepattern @ 667 - PSproduct @ 668 - PSresourceforall @ 669 - PSresourcestatus @ 670 - PSrevision @ 671 - PSrootfont @ 672 - PSserialnumber @ 673 - PSsetcolor @ 674 - PSsetcolorrendering @ 675 - PSsetcolorspace @ 676 - PSsetdevparams @ 677 - PSsetglobal @ 678 - PSsetoverprint @ 679 - PSsetpagedevice @ 680 - PSsetpattern @ 681 - PSsetsystemparams @ 682 - PSsetuserparams @ 683 - PSstartjob @ 684 - PSundefineresource @ 685 - PSabs @ 686 - PSadd @ 687 - PSand @ 688 - PSatan @ 689 - PSbitshift @ 690 - PSceiling @ 691 - PScos @ 692 - PSdiv @ 693 - PSexp @ 694 - PSfloor @ 695 - PSidiv @ 696 - PSln @ 697 - PSlog @ 698 - PSmod @ 699 - PSmul @ 700 - PSneg @ 701 - PSround @ 702 - PSsin @ 703 - PSsqrt @ 704 - PSsub @ 705 - PStruncate @ 706 - PSxor @ 707 - PSbanddevice @ 708 - PSframedevice @ 709 - PSnulldevice @ 710 - PSrenderbands @ 711 - PSconcatmatrix @ 712 - PSdtransform @ 713 - PSidentmatrix @ 714 - PSidtransform @ 715 - PSinvertmatrix @ 716 - PSitransform @ 717 - PStransform @ 718 - PSgetboolean @ 719 - PSgetchararray @ 720 - PSgetfloat @ 721 - PSgetfloatarray @ 722 - PSgetint @ 723 - PSgetintarray @ 724 - PSgetstring @ 725 - PSsendboolean @ 726 - PSsendchararray @ 727 - PSsendfloat @ 728 - PSsendfloatarray @ 729 - PSsendint @ 730 - PSsendintarray @ 731 - PSsendstring @ 732 - PSarc @ 733 - PSarcn @ 734 - PSarct @ 735 - PSarcto @ 736 - PScharpath @ 737 - PSclip @ 738 - PSclippath @ 739 - PSclosepath @ 740 - PScurveto @ 741 - PSeoclip @ 742 - PSeoviewclip @ 743 - PSflattenpath @ 744 - PSinitclip @ 745 - PSinitviewclip @ 746 - PSlineto @ 747 - PSmoveto @ 748 - PSnewpath @ 749 - PSpathbbox @ 750 - PSpathforall @ 751 - PSrcurveto @ 752 - PSrectclip @ 753 - PSrectviewclip @ 754 - PSreversepath @ 755 - PSrlineto @ 756 - PSrmoveto @ 757 - PSsetbbox @ 758 - PSsetucacheparams @ 759 - PSuappend @ 760 - PSucache @ 761 - PSucachestatus @ 762 - PSupath @ 763 - PSviewclip @ 764 - PSviewclippath @ 765 - PSashow @ 766 - PSawidthshow @ 767 - PScopypage @ 768 - PSeofill @ 769 - PSerasepage @ 770 - PSfill @ 771 - PSimage @ 772 - PSimagemask @ 773 - PSkshow @ 774 - PSrectfill @ 775 - PSrectstroke @ 776 - PSshow @ 777 - PSshowpage @ 778 - PSstroke @ 779 - PSstrokepath @ 780 - PSueofill @ 781 - PSufill @ 782 - PSustroke @ 783 - PSustrokepath @ 784 - PSwidthshow @ 785 - PSxshow @ 786 - PSxyshow @ 787 - PSyshow @ 788 - PSbind @ 789 - PScleardictstack @ 790 - PScountdictstack @ 791 - PScountexecstack @ 792 - PScurrentdict @ 793 - PScurrentpacking @ 794 - PScurrentshared @ 795 - PSdeviceinfo @ 796 - PSerrordict @ 797 - PSexec @ 798 - PSprompt @ 799 - PSquit @ 800 - PSrand @ 801 - PSrealtime @ 802 - PSrestore @ 803 - PSrrand @ 804 - PSrun @ 805 - PSsave @ 806 - PSsetpacking @ 807 - PSsetshared @ 808 - PSsrand @ 809 - PSstart @ 810 - PStype @ 811 - PSundef @ 812 - PSusertime @ 813 - PSversion @ 814 - PSvmreclaim @ 815 - PSvmstatus @ 816 - PSineofill @ 817 - PSinfill @ 818 - PSinstroke @ 819 - PSinueofill @ 820 - PSinufill @ 821 - PSinustroke @ 822 - PSwtranslation @ 823 - XDPSLInit @824 - DPSWriteStringChars @ 825 - XDPSUnfreezeContext @ 826 - DPSGetCurrentContext @ 827 - DPSAwaitReturnValues @ 828 - DPSNewUserObjectIndex @ 829 - XDPSGetContextStatus @ 830 - XDPSRegisterStatusProc @ 831 - DPSDefaultTextBackstop @ 832 - DPSMapNames @ 833 - XDPSGetDefaultColorMaps @ 834 - XDPSCreateSimpleContext @ 835 - DPSGenerateExtensionRecID @ 836 - DPSWaitContext @ 837 - DPSAddContextExtensionRec @ 838 - DPSGetContextExtensionRec @ 839 - DPSChainContext @ 840 - DPSDestroySpace @ 841 - DPSUnchainContext @ 842 - DPSBinObjSeqWrite @ 843 - DPSSetResultTable @ 844 - XDPSSetStatusMask @ 845 - XDPSXIDFromContext @ 846 - DPSWritePostScript @ 847 - DPSRemoveContextExtensionRec @ 848 - DPSDefaultErrorProc @ 849 - DPSCreateTextContext @ 850 Index: xc/lib/dps/dpsos2.rsp diff -u xc/lib/dps/dpsos2.rsp:1.1 xc/lib/dps/dpsos2.rsp:removed --- xc/lib/dps/dpsos2.rsp:1.1 Wed Apr 5 14:13:21 2000 +++ xc/lib/dps/dpsos2.rsp Thu Feb 27 12:27:48 2003 @@ -1,13 +0,0 @@ -XDPS.obj csconndi.obj csfindNX.obj cslibext.obj cslibint.obj csopendi.obj+ -csstartNX.obj dpsXclient.obj dpsXcmu.obj dpsXops.obj dpsXpriv.obj+ -dpsXtdisp.obj dpsabbrev.obj dpsclient.obj dpsclrops.obj dpsctrlops.obj+ -dpsctxtops.obj dpsdataops.obj dpsdict.obj dpsexcept.obj dpsfontops.obj+ -dpsgsttops.obj dpsioops.obj dpsl2ops.obj dpsmathops.obj dpsmiscops.obj+ -dpsmtrxops.obj dpsopstack.obj dpspathops.obj dpspntops.obj dpsprintf.obj+ -dpssysnames.obj dpssysops.obj dpswinops.obj psXops.obj psclrops.obj+ -psctrlops.obj psctxtops.obj psdataops.obj psfontops.obj psgsttops.obj+ -psioops.obj psl2ops.obj psmathops.obj psmiscops.obj psmtrxops.obj+ -psopstack.obj pspathops.obj pspntops.obj pssysops.obj pswinops.obj+ -/NOI /NOL /NOD /BAT -dps.dll -dps.map Index: xc/lib/dps/psops.h.os2 diff -u xc/lib/dps/psops.h.os2:1.2 xc/lib/dps/psops.h.os2:removed --- xc/lib/dps/psops.h.os2:1.2 Wed Jun 7 18:02:57 2000 +++ xc/lib/dps/psops.h.os2 Thu Feb 27 12:27:48 2003 @@ -1,1602 +0,0 @@ -/* - * psops.h - */ -/* - * (c) Copyright 1988-1994 Adobe Systems Incorporated. - * All rights reserved. - * - * Permission to use, copy, modify, distribute, and sublicense this software - * and its documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notices appear in all copies and that - * both those copyright notices and this permission notice appear in - * supporting documentation and that the name of Adobe Systems Incorporated - * not be used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. No trademark license - * to use the Adobe trademarks is hereby granted. If the Adobe trademark - * "Display PostScript"(tm) is used to describe this software, its - * functionality or for any other purpose, such use shall be limited to a - * statement that this software works in conjunction with the Display - * PostScript system. Proper trademark attribution to reflect Adobe's - * ownership of the trademark shall be given whenever any such reference to - * the Display PostScript system is made. - * - * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR - * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. - * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE - * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT - * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE. - * - * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems - * Incorporated which may be registered in certain jurisdictions - * - * Author: Adobe Systems Incorporated - */ -/* $XFree86: xc/lib/dps/psops.h.os2,v 1.2 2000/06/07 22:02:57 tsi Exp $ */ - -#ifndef PSOPS_H -#define PSOPS_H - -#ifdef _NO_PROTO - -extern void PSFontDirectory(); - -extern void PSGlobalFontDirectory(); - -extern void PSISOLatin1Encoding(); - -extern void PSSharedFontDirectory(); - -extern void PSStandardEncoding(); - -extern void PSUserObjects(); - -extern void PSabs(); - -extern void PSadd(); - -extern void PSaload(); - -extern void PSanchorsearch( /* int *truth; */ ); - -extern void PSand(); - -extern void PSarc( /* float x, y, r, angle1, angle2; */ ); - -extern void PSarcn( /* float x, y, r, angle1, angle2; */ ); - -extern void PSarct( /* float x1, y1, x2, y2, r; */ ); - -extern void PSarcto( /* float x1, y1, x2, y2, r; float *xt1, *yt1, *xt2, *yt2; */ ); - -extern void PSarray( /* int len; */ ); - -extern void PSashow( /* float x, y; char *s; */ ); - -extern void PSastore(); - -extern void PSatan(); - -extern void PSawidthshow( /* float cx, cy; int c; float ax, ay; char *s; */ ); - -extern void PSbanddevice(); - -extern void PSbegin(); - -extern void PSbind(); - -extern void PSbitshift( /* int shift; */ ); - -extern void PSbytesavailable( /* int *n; */ ); - -extern void PScachestatus(); - -extern void PSceiling(); - -extern void PScharpath( /* char *s; int b; */ ); - -extern void PSclear(); - -extern void PScleardictstack(); - -extern void PScleartomark(); - -extern void PSclientXready( /* int i0, i1, i2, i3; */ ); - -extern void PSclientsync(); - -extern void PSclip(); - -extern void PSclippath(); - -extern void PSclosefile(); - -extern void PSclosepath(); - -extern void PScolorimage(); - -extern void PSconcat( /* float m[]; */ ); - -extern void PSconcatmatrix(); - -extern void PScondition(); - -extern void PScopy( /* int n; */ ); - -extern void PScopypage(); - -extern void PScos(); - -extern void PScount( /* int *n; */ ); - -extern void PScountdictstack( /* int *n; */ ); - -extern void PScountexecstack( /* int *n; */ ); - -extern void PScounttomark( /* int *n; */ ); - -extern void PScshow( /* char *s; */ ); - -extern void PScurrentXdrawingfunction( /* int *function; */ ); - -extern void PScurrentXgcdrawable( /* int *gc, *draw, *x, *y; */ ); - -extern void PScurrentXgcdrawablecolor( /* int *gc, *draw, *x, *y, colorInfo[]; */ ); - -extern void PScurrentXoffset( /* int *x, *y; */ ); - -extern void PScurrentblackgeneration(); - -extern void PScurrentcacheparams(); - -extern void PScurrentcmykcolor( /* float *c, *m, *y, *k; */ ); - -extern void PScurrentcolor(); - -extern void PScurrentcolorrendering(); - -extern void PScurrentcolorscreen(); - -extern void PScurrentcolorspace(); - -extern void PScurrentcolortransfer(); - -extern void PScurrentcontext( /* int *cid; */ ); - -extern void PScurrentdash(); - -extern void PScurrentdevparams( /* char *dev; */ ); - -extern void PScurrentdict(); - -extern void PScurrentfile(); - -extern void PScurrentflat( /* float *flatness; */ ); - -extern void PScurrentfont(); - -extern void PScurrentglobal( /* int *b; */ ); - -extern void PScurrentgray( /* float *gray; */ ); - -extern void PScurrentgstate( /* int gst; */ ); - -extern void PScurrenthalftone(); - -extern void PScurrenthalftonephase( /* float *x, *y; */ ); - -extern void PScurrenthsbcolor( /* float *h, *s, *b; */ ); - -extern void PScurrentlinecap( /* int *linecap; */ ); - -extern void PScurrentlinejoin( /* int *linejoin; */ ); - -extern void PScurrentlinewidth( /* float *width; */ ); - -extern void PScurrentmatrix(); - -extern void PScurrentmiterlimit( /* float *limit; */ ); - -extern void PScurrentobjectformat( /* int *code; */ ); - -extern void PScurrentoverprint( /* int *b; */ ); - -extern void PScurrentpacking( /* int *b; */ ); - -extern void PScurrentpagedevice(); - -extern void PScurrentpoint( /* float *x, *y; */ ); - -extern void PScurrentrgbcolor( /* float *r, *g, *b; */ ); - -extern void PScurrentscreen(); - -extern void PScurrentshared( /* int *b; */ ); - -extern void PScurrentstrokeadjust( /* int *b; */ ); - -extern void PScurrentsystemparams(); - -extern void PScurrenttransfer(); - -extern void PScurrentundercolorremoval(); - -extern void PScurrentuserparams(); - -extern void PScurveto( /* float x1, y1, x2, y2, x3, y3; */ ); - -extern void PScvi(); - -extern void PScvlit(); - -extern void PScvn(); - -extern void PScvr(); - -extern void PScvrs(); - -extern void PScvs(); - -extern void PScvx(); - -extern void PSdef(); - -extern void PSdefaultmatrix(); - -extern void PSdefinefont(); - -extern void PSdefineresource( /* char *category; */ ); - -extern void PSdefineusername( /* int i; char *username; */ ); - -extern void PSdefineuserobject(); - -extern void PSdeletefile( /* char *filename; */ ); - -extern void PSdetach(); - -extern void PSdeviceinfo(); - -extern void PSdict( /* int len; */ ); - -extern void PSdictstack(); - -extern void PSdiv(); - -extern void PSdtransform( /* float x1, y1; float *x2, *y2; */ ); - -extern void PSdup(); - -extern void PSecho( /* int b; */ ); - -extern void PSend(); - -extern void PSeoclip(); - -extern void PSeofill(); - -extern void PSeoviewclip(); - -extern void PSeq(); - -extern void PSequals(); - -extern void PSequalsequals(); - -extern void PSerasepage(); - -extern void PSerrordict(); - -extern void PSexch(); - -extern void PSexec(); - -extern void PSexecform(); - -extern void PSexecstack(); - -extern void PSexecuserobject( /* int userObjIndex; */ ); - -extern void PSexecuteonly(); - -extern void PSexit(); - -extern void PSexp(); - -extern void PSfalse(); - -extern void PSfile( /* char *name, *access; */ ); - -extern void PSfilenameforall(); - -extern void PSfileposition( /* int *pos; */ ); - -extern void PSfill(); - -extern void PSfilter(); - -extern void PSfindencoding( /* char *key; */ ); - -extern void PSfindfont( /* char *name; */ ); - -extern void PSfindresource( /* char *key, *category; */ ); - -extern void PSflattenpath(); - -extern void PSfloor(); - -extern void PSflush(); - -extern void PSflushfile(); - -extern void PSfor(); - -extern void PSforall(); - -extern void PSfork(); - -extern void PSframedevice(); - -extern void PSgcheck( /* int *b; */ ); - -extern void PSge(); - -extern void PSget(); - -extern void PSgetboolean( /* int *it; */ ); - -extern void PSgetchararray( /* int size; char s[]; */ ); - -extern void PSgetfloat( /* float *it; */ ); - -extern void PSgetfloatarray( /* int size; float a[]; */ ); - -extern void PSgetint( /* int *it; */ ); - -extern void PSgetintarray( /* int size; int a[]; */ ); - -extern void PSgetinterval(); - -extern void PSgetstring( /* char *s; */ ); - -extern void PSglobaldict(); - -extern void PSglyphshow( /* char *name; */ ); - -extern void PSgrestore(); - -extern void PSgrestoreall(); - -extern void PSgsave(); - -extern void PSgstate(); - -extern void PSgt(); - -extern void PSidentmatrix(); - -extern void PSidiv(); - -extern void PSidtransform( /* float x1, y1; float *x2, *y2; */ ); - -extern void PSif(); - -extern void PSifelse(); - -extern void PSimage(); - -extern void PSimagemask(); - -extern void PSindex( /* int i; */ ); - -extern void PSineofill( /* float x, y; int *b; */ ); - -extern void PSinfill( /* float x, y; int *b; */ ); - -extern void PSinitclip(); - -extern void PSinitgraphics(); - -extern void PSinitmatrix(); - -extern void PSinitviewclip(); - -extern void PSinstroke( /* float x, y; int *b; */ ); - -extern void PSinueofill( /* float x, y; char nums[]; int n; char ops[]; int l; int *b; */ ); - -extern void PSinufill( /* float x, y; char nums[]; int n; char ops[]; int l; int *b; */ ); - -extern void PSinustroke( /* float x, y; char nums[]; int n; char ops[]; int l; int *b; */ ); - -extern void PSinvertmatrix(); - -extern void PSitransform( /* float x1, y1; float *x2, *y2; */ ); - -extern void PSjoin(); - -extern void PSknown( /* int *b; */ ); - -extern void PSkshow( /* char *s; */ ); - -extern void PSlanguagelevel( /* int *n; */ ); - -extern void PSle(); - -extern void PSleftbracket(); - -extern void PSleftleft(); - -extern void PSlength( /* int *len; */ ); - -extern void PSlineto( /* float x, y; */ ); - -extern void PSln(); - -extern void PSload(); - -extern void PSlock(); - -extern void PSlog(); - -extern void PSloop(); - -extern void PSlt(); - -extern void PSmakefont(); - -extern void PSmakepattern(); - -extern void PSmark(); - -extern void PSmatrix(); - -extern void PSmaxlength( /* int *len; */ ); - -extern void PSmod(); - -extern void PSmonitor(); - -extern void PSmoveto( /* float x, y; */ ); - -extern void PSmul(); - -extern void PSne(); - -extern void PSneg(); - -extern void PSnewpath(); - -extern void PSnoaccess(); - -extern void PSnot(); - -extern void PSnotify(); - -extern void PSnull(); - -extern void PSnulldevice(); - -extern void PSor(); - -extern void PSpackedarray(); - -extern void PSpathbbox( /* float *llx, *lly, *urx, *ury; */ ); - -extern void PSpathforall(); - -extern void PSpop(); - -extern void PSprint(); - -extern void PSprintobject( /* int tag; */ ); - -extern void PSproduct(); - -extern void PSprompt(); - -extern void PSpstack(); - -extern void PSput(); - -extern void PSputinterval(); - -extern void PSquit(); - -extern void PSrand(); - -extern void PSrcheck( /* int *b; */ ); - -extern void PSrcurveto( /* float x1, y1, x2, y2, x3, y3; */ ); - -extern void PSread( /* int *b; */ ); - -extern void PSreadhexstring( /* int *b; */ ); - -extern void PSreadline( /* int *b; */ ); - -extern void PSreadonly(); - -extern void PSreadstring( /* int *b; */ ); - -extern void PSrealtime( /* int *i; */ ); - -extern void PSrectclip( /* float x, y, w, h; */ ); - -extern void PSrectfill( /* float x, y, w, h; */ ); - -extern void PSrectstroke( /* float x, y, w, h; */ ); - -extern void PSrectviewclip( /* float x, y, w, h; */ ); - -extern void PSrenamefile( /* char *oldname, *newname; */ ); - -extern void PSrenderbands(); - -extern void PSrepeat(); - -extern void PSresetfile(); - -extern void PSresourceforall( /* char *category; */ ); - -extern void PSresourcestatus( /* char *key, *category; int *b; */ ); - -extern void PSrestore(); - -extern void PSreversepath(); - -extern void PSrevision( /* int *n; */ ); - -extern void PSrightbracket(); - -extern void PSrightright(); - -extern void PSrlineto( /* float x, y; */ ); - -extern void PSrmoveto( /* float x, y; */ ); - -extern void PSroll( /* int n, j; */ ); - -extern void PSrootfont(); - -extern void PSrotate( /* float angle; */ ); - -extern void PSround(); - -extern void PSrrand(); - -extern void PSrun( /* char *filename; */ ); - -extern void PSsave(); - -extern void PSscale( /* float x, y; */ ); - -extern void PSscalefont( /* float size; */ ); - -extern void PSscheck( /* int *b; */ ); - -extern void PSsearch( /* int *b; */ ); - -extern void PSselectfont( /* char *name; float scale; */ ); - -extern void PSsendboolean( /* int it; */ ); - -extern void PSsendchararray( /* char s[]; int size; */ ); - -extern void PSsendfloat( /* float it; */ ); - -extern void PSsendfloatarray( /* float a[]; int size; */ ); - -extern void PSsendint( /* int it; */ ); - -extern void PSsendintarray( /* int a[]; int size; */ ); - -extern void PSsendstring( /* char *s; */ ); - -extern void PSserialnumber( /* int *n; */ ); - -extern void PSsetXdrawingfunction( /* int function; */ ); - -extern void PSsetXgcdrawable( /* int gc, draw, x, y; */ ); - -extern void PSsetXgcdrawablecolor( /* int gc, draw, x, y, colorInfo[]; */ ); - -extern void PSsetXoffset( /* int x, y; */ ); - -extern void PSsetXrgbactual( /* float r, g, b; int *success; */ ); - -extern void PSsetbbox( /* float llx, lly, urx, ury; */ ); - -extern void PSsetblackgeneration(); - -extern void PSsetcachedevice( /* float wx, wy, llx, lly, urx, ury; */ ); - -extern void PSsetcachelimit( /* int n; */ ); - -extern void PSsetcacheparams(); - -extern void PSsetcharwidth( /* float wx, wy; */ ); - -extern void PSsetcmykcolor( /* float c, m, y, k; */ ); - -extern void PSsetcolor(); - -extern void PSsetcolorrendering(); - -extern void PSsetcolorscreen(); - -extern void PSsetcolorspace(); - -extern void PSsetcolortransfer(); - -extern void PSsetdash( /* float pat[]; int size; float offset; */ ); - -extern void PSsetdevparams(); - -extern void PSsetfileposition( /* int pos; */ ); - -extern void PSsetflat( /* float flatness; */ ); - -extern void PSsetfont( /* int f; */ ); - -extern void PSsetglobal( /* int b; */ ); - -extern void PSsetgray( /* float gray; */ ); - -extern void PSsetgstate( /* int gst; */ ); - -extern void PSsethalftone(); - -extern void PSsethalftonephase( /* float x, y; */ ); - -extern void PSsethsbcolor( /* float h, s, b; */ ); - -extern void PSsetlinecap( /* int linecap; */ ); - -extern void PSsetlinejoin( /* int linejoin; */ ); - -extern void PSsetlinewidth( /* float width; */ ); - -extern void PSsetmatrix(); - -extern void PSsetmiterlimit( /* float limit; */ ); - -extern void PSsetobjectformat( /* int code; */ ); - -extern void PSsetoverprint( /* int b; */ ); - -extern void PSsetpacking( /* int b; */ ); - -extern void PSsetpagedevice(); - -extern void PSsetpattern(); - -extern void PSsetrgbcolor( /* float r, g, b; */ ); - -extern void PSsetscreen(); - -extern void PSsetshared( /* int b; */ ); - -extern void PSsetstrokeadjust( /* int b; */ ); - -extern void PSsetsystemparams(); - -extern void PSsettransfer(); - -extern void PSsetucacheparams(); - -extern void PSsetundercolorremoval(); - -extern void PSsetuserparams(); - -extern void PSsetvmthreshold( /* int i; */ ); - -extern void PSshareddict(); - -extern void PSshow( /* char *s; */ ); - -extern void PSshowpage(); - -extern void PSsin(); - -extern void PSsqrt(); - -extern void PSsrand(); - -extern void PSstack(); - -extern void PSstart(); - -extern void PSstartjob( /* int b; char *password; */ ); - -extern void PSstatus( /* int *b; */ ); - -extern void PSstatusdict(); - -extern void PSstop(); - -extern void PSstopped(); - -extern void PSstore(); - -extern void PSstring( /* int len; */ ); - -extern void PSstringwidth( /* char *s; float *xp, *yp; */ ); - -extern void PSstroke(); - -extern void PSstrokepath(); - -extern void PSsub(); - -extern void PSsystemdict(); - -extern void PStoken( /* int *b; */ ); - -extern void PStransform( /* float x1, y1; float *x2, *y2; */ ); - -extern void PStranslate( /* float x, y; */ ); - -extern void PStrue(); - -extern void PStruncate(); - -extern void PStype(); - -extern void PSuappend( /* char nums[]; int n; char ops[]; int l; */ ); - -extern void PSucache(); - -extern void PSucachestatus(); - -extern void PSueofill( /* char nums[]; int n; char ops[]; int l; */ ); - -extern void PSufill( /* char nums[]; int n; char ops[]; int l; */ ); - -extern void PSundef( /* char *name; */ ); - -extern void PSundefinefont( /* char *name; */ ); - -extern void PSundefineresource( /* char *key, *category; */ ); - -extern void PSundefineuserobject( /* int userObjIndex; */ ); - -extern void PSupath( /* int b; */ ); - -extern void PSuserdict(); - -extern void PSusertime( /* int *milliseconds; */ ); - -extern void PSustroke( /* char nums[]; int n; char ops[]; int l; */ ); - -extern void PSustrokepath( /* char nums[]; int n; char ops[]; int l; */ ); - -extern void PSversion( /* int bufsize; char buf[]; */ ); - -extern void PSviewclip(); - -extern void PSviewclippath(); - -extern void PSvmreclaim( /* int code; */ ); - -extern void PSvmstatus( /* int *level, *used, *maximum; */ ); - -extern void PSwait(); - -extern void PSwcheck( /* int *b; */ ); - -extern void PSwhere( /* int *b; */ ); - -extern void PSwidthshow( /* float x, y; int c; char *s; */ ); - -extern void PSwrite(); - -extern void PSwritehexstring(); - -extern void PSwriteobject( /* int tag; */ ); - -extern void PSwritestring(); - -extern void PSwtranslation( /* float *x, *y; */ ); - -extern void PSxcheck( /* int *b; */ ); - -extern void PSxor(); - -extern void PSxshow( /* char *s; float numarray[]; int size; */ ); - -extern void PSxyshow( /* char *s; float numarray[]; int size; */ ); - -extern void PSyield(); - -extern void PSyshow( /* char *s; float numarray[]; int size; */ ); - -#else /* _NO_PROTO */ - -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - -extern void PSFontDirectory( void ); - -extern void PSGlobalFontDirectory( void ); - -extern void PSISOLatin1Encoding( void ); - -extern void PSSharedFontDirectory( void ); - -extern void PSStandardEncoding( void ); - -extern void PSUserObjects( void ); - -extern void PSabs( void ); - -extern void PSadd( void ); - -extern void PSaload( void ); - -extern void PSanchorsearch(int *truth); - -extern void PSand( void ); - -extern void PSarc(float x, float y, float r, float angle1, float angle2); - -extern void PSarcn(float x, float y, float r, float angle1, float angle2); - -extern void PSarct(float x1, float y1, float x2, float y2, float r); - -extern void PSarcto(float x1, float y1, float x2, float y2, float r, float *xt1, float *yt1, float *xt2, float *yt2); - -extern void PSarray(int len); - -extern void PSashow(float x, float y, const char *s); - -extern void PSastore( void ); - -extern void PSatan( void ); - -extern void PSawidthshow(float cx, float cy, int c, float ax, float ay, const char *s); - -extern void PSbanddevice( void ); - -extern void PSbegin( void ); - -extern void PSbind( void ); - -extern void PSbitshift(int shift); - -extern void PSbytesavailable(int *n); - -extern void PScachestatus( void ); - -extern void PSceiling( void ); - -extern void PScharpath(const char *s, int b); - -extern void PSclear( void ); - -extern void PScleardictstack( void ); - -extern void PScleartomark( void ); - -extern void PSclientXready(int i0, int i1, int i2, int i3); - -extern void PSclientsync( void ); - -extern void PSclip( void ); - -extern void PSclippath( void ); - -extern void PSclosefile( void ); - -extern void PSclosepath( void ); - -extern void PScolorimage( void ); - -extern void PSconcat(const float m[]); - -extern void PSconcatmatrix( void ); - -extern void PScondition( void ); - -extern void PScopy(int n); - -extern void PScopypage( void ); - -extern void PScos( void ); - -extern void PScount(int *n); - -extern void PScountdictstack(int *n); - -extern void PScountexecstack(int *n); - -extern void PScounttomark(int *n); - -extern void PScshow(const char *s); - -extern void PScurrentXdrawingfunction(int *function); - -extern void PScurrentXgcdrawable(int *gc, int *draw, int *x, int *y); - -extern void PScurrentXgcdrawablecolor(int *gc, int *draw, int *x, int *y, int colorInfo[]); - -extern void PScurrentXoffset(int *x, int *y); - -extern void PScurrentblackgeneration( void ); - -extern void PScurrentcacheparams( void ); - -extern void PScurrentcmykcolor(float *c, float *m, float *y, float *k); - -extern void PScurrentcolor( void ); - -extern void PScurrentcolorrendering( void ); - -extern void PScurrentcolorscreen( void ); - -extern void PScurrentcolorspace( void ); - -extern void PScurrentcolortransfer( void ); - -extern void PScurrentcontext(int *cid); - -extern void PScurrentdash( void ); - -extern void PScurrentdevparams(const char *dev); - -extern void PScurrentdict( void ); - -extern void PScurrentfile( void ); - -extern void PScurrentflat(float *flatness); - -extern void PScurrentfont( void ); - -extern void PScurrentglobal(int *b); - -extern void PScurrentgray(float *gray); - -extern void PScurrentgstate(int gst); - -extern void PScurrenthalftone( void ); - -extern void PScurrenthalftonephase(float *x, float *y); - -extern void PScurrenthsbcolor(float *h, float *s, float *b); - -extern void PScurrentlinecap(int *linecap); - -extern void PScurrentlinejoin(int *linejoin); - -extern void PScurrentlinewidth(float *width); - -extern void PScurrentmatrix( void ); - -extern void PScurrentmiterlimit(float *limit); - -extern void PScurrentobjectformat(int *code); - -extern void PScurrentoverprint(int *b); - -extern void PScurrentpacking(int *b); - -extern void PScurrentpagedevice( void ); - -extern void PScurrentpoint(float *x, float *y); - -extern void PScurrentrgbcolor(float *r, float *g, float *b); - -extern void PScurrentscreen( void ); - -extern void PScurrentshared(int *b); - -extern void PScurrentstrokeadjust(int *b); - -extern void PScurrentsystemparams( void ); - -extern void PScurrenttransfer( void ); - -extern void PScurrentundercolorremoval( void ); - -extern void PScurrentuserparams( void ); - -extern void PScurveto(float x1, float y1, float x2, float y2, float x3, float y3); - -extern void PScvi( void ); - -extern void PScvlit( void ); - -extern void PScvn( void ); - -extern void PScvr( void ); - -extern void PScvrs( void ); - -extern void PScvs( void ); - -extern void PScvx( void ); - -extern void PSdef( void ); - -extern void PSdefaultmatrix( void ); - -extern void PSdefinefont( void ); - -extern void PSdefineresource(const char *category); - -extern void PSdefineusername(int i, const char *username); - -extern void PSdefineuserobject( void ); - -extern void PSdeletefile(const char *filename); - -extern void PSdetach( void ); - -extern void PSdeviceinfo( void ); - -extern void PSdict(int len); - -extern void PSdictstack( void ); - -extern void PSdiv( void ); - -extern void PSdtransform(float x1, float y1, float *x2, float *y2); - -extern void PSdup( void ); - -extern void PSecho(int b); - -extern void PSend( void ); - -extern void PSeoclip( void ); - -extern void PSeofill( void ); - -extern void PSeoviewclip( void ); - -extern void PSeq( void ); - -extern void PSequals( void ); - -extern void PSequalsequals( void ); - -extern void PSerasepage( void ); - -extern void PSerrordict( void ); - -extern void PSexch( void ); - -extern void PSexec( void ); - -extern void PSexecform( void ); - -extern void PSexecstack( void ); - -extern void PSexecuserobject(int userObjIndex); - -extern void PSexecuteonly( void ); - -extern void PSexit( void ); - -extern void PSexp( void ); - -extern void PSfalse( void ); - -extern void PSfile(const char *name, const char *access); - -extern void PSfilenameforall( void ); - -extern void PSfileposition(int *pos); - -extern void PSfill( void ); - -extern void PSfilter( void ); - -extern void PSfindencoding(const char *key); - -extern void PSfindfont(const char *name); - -extern void PSfindresource(const char *key, const char *category); - -extern void PSflattenpath( void ); - -extern void PSfloor( void ); - -extern void PSflush( void ); - -extern void PSflushfile( void ); - -extern void PSfor( void ); - -extern void PSforall( void ); - -extern void PSfork( void ); - -extern void PSframedevice( void ); - -extern void PSgcheck(int *b); - -extern void PSge( void ); - -extern void PSget( void ); - -extern void PSgetboolean(int *it); - -extern void PSgetchararray(int size, char s[]); - -extern void PSgetfloat(float *it); - -extern void PSgetfloatarray(int size, float a[]); - -extern void PSgetint(int *it); - -extern void PSgetintarray(int size, int a[]); - -extern void PSgetinterval( void ); - -extern void PSgetstring(char *s); - -extern void PSglobaldict( void ); - -extern void PSglyphshow(const char *name); - -extern void PSgrestore( void ); - -extern void PSgrestoreall( void ); - -extern void PSgsave( void ); - -extern void PSgstate( void ); - -extern void PSgt( void ); - -extern void PSidentmatrix( void ); - -extern void PSidiv( void ); - -extern void PSidtransform(float x1, float y1, float *x2, float *y2); - -extern void PSif( void ); - -extern void PSifelse( void ); - -extern void PSimage( void ); - -extern void PSimagemask( void ); - -extern void PSindex(int i); - -extern void PSineofill(float x, float y, int *b); - -extern void PSinfill(float x, float y, int *b); - -extern void PSinitclip( void ); - -extern void PSinitgraphics( void ); - -extern void PSinitmatrix( void ); - -extern void PSinitviewclip( void ); - -extern void PSinstroke(float x, float y, int *b); - -extern void PSinueofill(float x, float y, const char nums[], int n, const char ops[], int l, int *b); - -extern void PSinufill(float x, float y, const char nums[], int n, const char ops[], int l, int *b); - -extern void PSinustroke(float x, float y, const char nums[], int n, const char ops[], int l, int *b); - -extern void PSinvertmatrix( void ); - -extern void PSitransform(float x1, float y1, float *x2, float *y2); - -extern void PSjoin( void ); - -extern void PSknown(int *b); - -extern void PSkshow(const char *s); - -extern void PSlanguagelevel(int *n); - -extern void PSle( void ); - -extern void PSleftbracket( void ); - -extern void PSleftleft( void ); - -extern void PSlength(int *len); - -extern void PSlineto(float x, float y); - -extern void PSln( void ); - -extern void PSload( void ); - -extern void PSlock( void ); - -extern void PSlog( void ); - -extern void PSloop( void ); - -extern void PSlt( void ); - -extern void PSmakefont( void ); - -extern void PSmakepattern( void ); - -extern void PSmark( void ); - -extern void PSmatrix( void ); - -extern void PSmaxlength(int *len); - -extern void PSmod( void ); - -extern void PSmonitor( void ); - -extern void PSmoveto(float x, float y); - -extern void PSmul( void ); - -extern void PSne( void ); - -extern void PSneg( void ); - -extern void PSnewpath( void ); - -extern void PSnoaccess( void ); - -extern void PSnot( void ); - -extern void PSnotify( void ); - -extern void PSnull( void ); - -extern void PSnulldevice( void ); - -extern void PSor( void ); - -extern void PSpackedarray( void ); - -extern void PSpathbbox(float *llx, float *lly, float *urx, float *ury); - -extern void PSpathforall( void ); - -extern void PSpop( void ); - -extern void PSprint( void ); - -extern void PSprintobject(int tag); - -extern void PSproduct( void ); - -extern void PSprompt( void ); - -extern void PSpstack( void ); - -extern void PSput( void ); - -extern void PSputinterval( void ); - -extern void PSquit( void ); - -extern void PSrand( void ); - -extern void PSrcheck(int *b); - -extern void PSrcurveto(float x1, float y1, float x2, float y2, float x3, float y3); - -extern void PSread(int *b); - -extern void PSreadhexstring(int *b); - -extern void PSreadline(int *b); - -extern void PSreadonly( void ); - -extern void PSreadstring(int *b); - -extern void PSrealtime(int *i); - -extern void PSrectclip(float x, float y, float w, float h); - -extern void PSrectfill(float x, float y, float w, float h); - -extern void PSrectstroke(float x, float y, float w, float h); - -extern void PSrectviewclip(float x, float y, float w, float h); - -extern void PSrenamefile(const char *oldname, const char *newname); - -extern void PSrenderbands( void ); - -extern void PSrepeat( void ); - -extern void PSresetfile( void ); - -extern void PSresourceforall(const char *category); - -extern void PSresourcestatus(const char *key, const char *category, int *b); - -extern void PSrestore( void ); - -extern void PSreversepath( void ); - -extern void PSrevision(int *n); - -extern void PSrightbracket( void ); - -extern void PSrightright( void ); - -extern void PSrlineto(float x, float y); - -extern void PSrmoveto(float x, float y); - -extern void PSroll(int n, int j); - -extern void PSrootfont( void ); - -extern void PSrotate(float angle); - -extern void PSround( void ); - -extern void PSrrand( void ); - -extern void PSrun(const char *filename); - -extern void PSsave( void ); - -extern void PSscale(float x, float y); - -extern void PSscalefont(float size); - -extern void PSscheck(int *b); - -extern void PSsearch(int *b); - -extern void PSselectfont(const char *name, float scale); - -extern void PSsendboolean(int it); - -extern void PSsendchararray(const char s[], int size); - -extern void PSsendfloat(float it); - -extern void PSsendfloatarray(const float a[], int size); - -extern void PSsendint(int it); - -extern void PSsendintarray(const int a[], int size); - -extern void PSsendstring(const char *s); - -extern void PSserialnumber(int *n); - -extern void PSsetXdrawingfunction(int function); - -extern void PSsetXgcdrawable(int gc, int draw, int x, int y); - -extern void PSsetXgcdrawablecolor(int gc, int draw, int x, int y, const int colorInfo[]); - -extern void PSsetXoffset(int x, int y); - -extern void PSsetXrgbactual(float r, float g, float b, int *success); - -extern void PSsetbbox(float llx, float lly, float urx, float ury); - -extern void PSsetblackgeneration( void ); - -extern void PSsetcachedevice(float wx, float wy, float llx, float lly, float urx, float ury); - -extern void PSsetcachelimit(int n); - -extern void PSsetcacheparams( void ); - -extern void PSsetcharwidth(float wx, float wy); - -extern void PSsetcmykcolor(float c, float m, float y, float k); - -extern void PSsetcolor( void ); - -extern void PSsetcolorrendering( void ); - -extern void PSsetcolorscreen( void ); - -extern void PSsetcolorspace( void ); - -extern void PSsetcolortransfer( void ); - -extern void PSsetdash(const float pat[], int size, float offset); - -extern void PSsetdevparams( void ); - -extern void PSsetfileposition(int pos); - -extern void PSsetflat(float flatness); - -extern void PSsetfont(int f); - -extern void PSsetglobal(int b); - -extern void PSsetgray(float gray); - -extern void PSsetgstate(int gst); - -extern void PSsethalftone( void ); - -extern void PSsethalftonephase(float x, float y); - -extern void PSsethsbcolor(float h, float s, float b); - -extern void PSsetlinecap(int linecap); - -extern void PSsetlinejoin(int linejoin); - -extern void PSsetlinewidth(float width); - -extern void PSsetmatrix( void ); - -extern void PSsetmiterlimit(float limit); - -extern void PSsetobjectformat(int code); - -extern void PSsetoverprint(int b); - -extern void PSsetpacking(int b); - -extern void PSsetpagedevice( void ); - -extern void PSsetpattern( void ); - -extern void PSsetrgbcolor(float r, float g, float b); - -extern void PSsetscreen( void ); - -extern void PSsetshared(int b); - -extern void PSsetstrokeadjust(int b); - -extern void PSsetsystemparams( void ); - -extern void PSsettransfer( void ); - -extern void PSsetucacheparams( void ); - -extern void PSsetundercolorremoval( void ); - -extern void PSsetuserparams( void ); - -extern void PSsetvmthreshold(int i); - -extern void PSshareddict( void ); - -extern void PSshow(const char *s); - -extern void PSshowpage( void ); - -extern void PSsin( void ); - -extern void PSsqrt( void ); - -extern void PSsrand( void ); - -extern void PSstack( void ); - -extern void PSstart( void ); - -extern void PSstartjob(int b, const char *password); - -extern void PSstatus(int *b); - -extern void PSstatusdict( void ); - -extern void PSstop( void ); - -extern void PSstopped( void ); - -extern void PSstore( void ); - -extern void PSstring(int len); - -extern void PSstringwidth(const char *s, float *xp, float *yp); - -extern void PSstroke( void ); - -extern void PSstrokepath( void ); - -extern void PSsub( void ); - -extern void PSsystemdict( void ); - -extern void PStoken(int *b); - -extern void PStransform(float x1, float y1, float *x2, float *y2); - -extern void PStranslate(float x, float y); - -extern void PStrue( void ); - -extern void PStruncate( void ); - -extern void PStype( void ); - -extern void PSuappend(const char nums[], int n, const char ops[], int l); - -extern void PSucache( void ); - -extern void PSucachestatus( void ); - -extern void PSueofill(const char nums[], int n, const char ops[], int l); - -extern void PSufill(const char nums[], int n, const char ops[], int l); - -extern void PSundef(const char *name); - -extern void PSundefinefont(const char *name); - -extern void PSundefineresource(const char *key, const char *category); - -extern void PSundefineuserobject(int userObjIndex); - -extern void PSupath(int b); - -extern void PSuserdict( void ); - -extern void PSusertime(int *milliseconds); - -extern void PSustroke(const char nums[], int n, const char ops[], int l); - -extern void PSustrokepath(const char nums[], int n, const char ops[], int l); - -extern void PSversion(int bufsize, char buf[]); - -extern void PSviewclip( void ); - -extern void PSviewclippath( void ); - -extern void PSvmreclaim(int code); - -extern void PSvmstatus(int *level, int *used, int *maximum); - -extern void PSwait( void ); - -extern void PSwcheck(int *b); - -extern void PSwhere(int *b); - -extern void PSwidthshow(float x, float y, int c, const char *s); - -extern void PSwrite( void ); - -extern void PSwritehexstring( void ); - -extern void PSwriteobject(int tag); - -extern void PSwritestring( void ); - -extern void PSwtranslation(float *x, float *y); - -extern void PSxcheck(int *b); - -extern void PSxor( void ); - -extern void PSxshow(const char *s, const float numarray[], int size); - -extern void PSxyshow(const char *s, const float numarray[], int size); - -extern void PSyield( void ); - -extern void PSyshow(const char *s, const float numarray[], int size); - -#if defined(__cplusplus) || defined(c_plusplus) -} -#endif - -#endif /* _NO_PROTO */ - -#endif /* PSOPS_H */ Index: xc/lib/dpstk/dpstkos2.def diff -u xc/lib/dpstk/dpstkos2.def:1.1 xc/lib/dpstk/dpstkos2.def:removed --- xc/lib/dpstk/dpstkos2.def:1.1 Wed Apr 5 14:13:23 2000 +++ xc/lib/dpstk/dpstkos2.def Thu Feb 27 12:27:49 2003 @@ -1,69 +0,0 @@ -LIBRARY DPSTK -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/dpstk/dpstkos2.def,v 1.1 2000/04/05 18:13:23 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 32768 -EXPORTS - XDPSSetFileFunctions @ 1 - XDPSFileRewindFunc @ 2 - XDPSFileGetsFunc @ 3 - XDPSEmbeddedEPSFRewindFunc @ 4 - XDPSEmbeddedGetsFunc @ 5 - XDPSCreatePixmapForEPSF @ 6 - XDPSPixelsPerPoint @ 7 - XDPSSetImagingTimeout @ 8 - XDPSCheckImagingResults @ 9 - XDPSImageFileIntoDrawable 10 - _DPSPSetMatrix @ 11 - _DPSPClearArea @ 12 - _DPSPSetMaskTransfer @ 13 - _DPSPDefineExecFunction @ 14 - _DPSPSaveBeforeExec @ 15 - _DPSPCheckForError @ 16 - _XDPSSetComponentInitialized @ 17 - _XDPSTestComponentInitialized @ 18 - XDPSSetContextDepth @ 19 - XDPSSetContextDrawable @ 20 - XDPSSetContextRGBMap @ 21 - XDPSSetContextGrayMap @ 22 - XDPSSetContextParameters @ 23 - XDPSPushContextParameters @ 24 - XDPSPopContextParameters @ 25 - XDPSCaptureContextGState @ 26 - XDPSUpdateContextGState @ 27 - XDPSFreeContextGState @ 28 - XDPSSetContextGState @ 29 - XDPSPushContextGState @ 30 - XDPSPopContextGState @ 31 - XDPSRegisterContext @ 32 - XDPSGetSharedContext @ 33 - XDPSDestroySharedContext @ 34 - XDPSUnregisterContext @ 35 - XDPSFreeDisplayInfo @ 36 - XDPSChainTextContext @ 37 - XDPSExtensionPresent @ 38 - PSDefineAsUserObj @ 39 - PSRedefineUserObj @ 40 - PSUndefineUserObj @ 41 - DPSDefineAsUserObj @ 42 - DPSRedefineUserObj @ 43 - DPSUndefineUserObj @ 44 - PSReserveUserObjIndices @ 45 - DPSReserveUserObjIndices @ 46 - PSReturnUserObjIndices @ 47 - DPSReturnUserObjIndices @ 48 - _DPSSSetContextParameters @ 49 - _DPSSSetContextDrawable @ 50 - _DPSSInstallDPSlibDict @ 51 - _DPSSCaptureGState @ 52 - _DPSSUpdateGState @ 53 - _DPSSRestoreGState @ 54 - _DPSSDefineUserObject @ 55 - _DPSSUndefineUserObject @ 56 - PSDoUserPath @ 57 - DPSDoUserPath @ 58 - PSHitUserPath @ 59 - DPSHitUserPath @ 60 - Index: xc/lib/dpstk/dpstkos2.rsp diff -u xc/lib/dpstk/dpstkos2.rsp:1.1 xc/lib/dpstk/dpstkos2.rsp:removed --- xc/lib/dpstk/dpstkos2.rsp:1.1 Wed Apr 5 14:13:23 2000 +++ xc/lib/dpstk/dpstkos2.rsp Thu Feb 27 12:27:49 2003 @@ -1,4 +0,0 @@ -XDPSpreview.obj XDPSpwraps.obj XDPSshare.obj XDPSswraps.obj+ -XDPSuserpath.obj /NOI /NOL /NOD /BAT -dpstk.dll -dpstk.map Index: xc/lib/expat/Imakefile diff -u /dev/null xc/lib/expat/Imakefile:1.5 --- /dev/null Thu Feb 27 12:27:49 2003 +++ xc/lib/expat/Imakefile Tue Feb 26 00:09:53 2002 @@ -0,0 +1,63 @@ +XCOMM $XFree86: xc/lib/expat/Imakefile,v 1.5 2002/02/26 05:09:53 tsi Exp $ + +#define DoNormalLib NormalLibExpat +#define DoSharedLib SharedLibExpat +#define DoExtraLib SharedLibExpat +#define DoDebugLib DebugLibExpat +#define DoProfileLib ProfileLibExpat +#define HasSharedData YES +#define LibName expat +#define SoRev SOEXPATREV +#define LibHeaders YES + +#include + +MAJOR_VERSION = 1 +MINOR_VERSION = 95 +MICRO_VERSION = 2 + +EXPATTOP = $(TOP)/extras/expat +EXPATSRC = $(EXPATTOP)/lib +EXPATINC = $(EXPATTOP)/lib + +INCLUDES = -I$(EXPATINC) -I$(EXPATTOP) -I. + +/* + * Endianness (for short's) + * + * XML_BYTE_ORDER == 12 big endian + * XML_BYTE_ORDER == 21 little endian + * XML_BYTE_ORDER == anything else determined at run-time. + */ +DEFINES = -DVERSION=\"ExpatVersion\" -DXML_BYTE_ORDER=0 +REQUIREDLIBS=$(LDPRELIBS) + +SRCS = xmlparse.c xmltok.c xmlrole.c +OBJS = xmlparse.o xmltok.o xmlrole.o + +HEADERS = expat.h + +#include + +#if DoSharedLib && SharedDataSeparation +SpecialCObjectRule(sharedlib,NullParameter,$(SHLIBDEF)) +#endif + +clean:: + $(RM) expat.h + +depend:: expat.h + +DependTarget() + +expat.h: expat.h.in + sed -e 's/@EXPAT_MAJOR_VERSION@/$(MAJOR_VERSION)/' \ + -e 's/@EXPAT_MINOR_VERSION@/$(MINOR_VERSION)/' \ + -e 's/@EXPAT_EDIT@/$(MICRO_VERSION)/' expat.h.in > $@ + +LinkSourceFile(xmlparse.c,$(EXPATSRC)) +LinkSourceFile(xmltok.c,$(EXPATSRC)) +LinkSourceFile(xmlrole.c,$(EXPATSRC)) +LinkSourceFile(expat.h.in,$(EXPATINC)) + + Index: xc/lib/expat/config.h diff -u /dev/null xc/lib/expat/config.h:1.1 --- /dev/null Thu Feb 27 12:27:49 2003 +++ xc/lib/expat/config.h Mon Feb 18 17:29:28 2002 @@ -0,0 +1,61 @@ +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +#include + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define to `long' if doesn't define. */ +/* #undef off_t */ + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +#ifndef X_NOT_POSIX + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +#endif + +/* Define if you have the bcopy function. */ +/* #undef HAVE_BCOPY */ + +/* Define if you have the getpagesize function. */ +/* #undef HAVE_GETPAGESIZE */ + +/* Define if you have the memmove function. */ +#define HAVE_MEMMOVE 1 + +#if 0 +/* XXX these are apparently unused by the library in 1.95.2*/ +/* whether byteorder is bigendian */ +/* #undef WORDS_BIGENDIAN */ + +/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ +#define BYTEORDER 1234 +#endif + +#define XML_NS +#define XML_DTD + +#define XML_CONTEXT_BYTES 1024 + +#ifndef HAVE_MEMMOVE +#ifdef HAVE_BCOPY +#define memmove(d,s,l) bcopy((s),(d),(l)) +#else +#define memmove(d,s,l) ;punting on memmove; +#endif + +#endif Index: xc/lib/expat/expat-def.cpp diff -u /dev/null xc/lib/expat/expat-def.cpp:1.1 --- /dev/null Thu Feb 27 12:27:49 2003 +++ xc/lib/expat/expat-def.cpp Sun Apr 7 11:19:45 2002 @@ -0,0 +1,73 @@ +LIBRARY expat +VERSION LIBRARY_VERSION +EXPORTS +XML_DefaultCurrent +XML_ErrorString +XML_ExpatVersion +XML_ExpatVersionInfo +XML_ExternalEntityParserCreate +XML_GetBase +XML_GetBuffer +XML_GetCurrentByteCount +XML_GetCurrentByteIndex +XML_GetCurrentColumnNumber +XML_GetCurrentLineNumber +XML_GetErrorCode +XML_GetIdAttributeIndex +XML_GetInputContext +XML_GetSpecifiedAttributeCount +XML_Parse +XML_ParseBuffer +XML_ParserCreate +XML_ParserCreateNS +XML_ParserCreate_MM +XML_ParserFree +XML_SetAttlistDeclHandler +XML_SetBase +XML_SetCdataSectionHandler +XML_SetCharacterDataHandler +XML_SetCommentHandler +XML_SetDefaultHandler +XML_SetDefaultHandlerExpand +XML_SetDoctypeDeclHandler +XML_SetElementDeclHandler +XML_SetElementHandler +XML_SetEncoding +XML_SetEndCdataSectionHandler +XML_SetEndDoctypeDeclHandler +XML_SetEndElementHandler +XML_SetEndNamespaceDeclHandler +XML_SetEntityDeclHandler +XML_SetExternalEntityRefHandler +XML_SetExternalEntityRefHandlerArg +XML_SetNamespaceDeclHandler +XML_SetNotStandaloneHandler +XML_SetNotationDeclHandler +XML_SetParamEntityParsing +XML_SetProcessingInstructionHandler +XML_SetReturnNSTriplet +XML_SetStartCdataSectionHandler +XML_SetStartDoctypeDeclHandler +XML_SetStartElementHandler +XML_SetStartNamespaceDeclHandler +XML_SetUnknownEncodingHandler +XML_SetUnparsedEntityDeclHandler +XML_SetUserData +XML_SetXmlDeclHandler +XML_UseParserAsHandlerArg +XmlPrologStateInit +XmlPrologStateInitExternalEntity +XmlGetUtf16InternalEncoding +XmlGetUtf16InternalEncodingNS +XmlGetUtf8InternalEncoding +XmlGetUtf8InternalEncodingNS +XmlInitEncoding +XmlInitEncodingNS +XmlInitUnknownEncoding +XmlInitUnknownEncodingNS +XmlParseXmlDecl +XmlParseXmlDeclNS +XmlSizeOfUnknownEncoding +XmlUtf16Encode +XmlUtf8Encode +/* $XFree86: xc/lib/expat/expat-def.cpp,v 1.1 2002/04/07 15:19:45 alanh Exp $ */ Index: xc/lib/font/Imakefile diff -u xc/lib/font/Imakefile:3.33 xc/lib/font/Imakefile:3.35 --- xc/lib/font/Imakefile:3.33 Mon Aug 27 13:40:58 2001 +++ xc/lib/font/Imakefile Mon Oct 21 14:03:39 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/font/Imakefile,v 3.33 2001/08/27 17:40:58 dawes Exp $ +XCOMM $XFree86: xc/lib/font/Imakefile,v 3.35 2002/10/21 18:03:39 keithp Exp $ #include @@ -87,31 +87,39 @@ BUILTINPROFILEOBJS = builtins/profiled/?*.o BUILTINDONES = builtins/DONE #endif +#if BuildFontCache + FONTCACHEDIRS = fontcache +FONTCACHESHAREDOBJS = fontcache/?*.o +FONTCACHESTATICOBJS = fontcache/$(STATIC_OBJSDIR)?*.o + FONTCACHEDEBUGOBJS = fontcache/debugger/?*.o +FONTCACHEPROFILEOBJS = fontcache/profiled/?*.o + FONTCACHEDONES = fontcache/DONE +#endif - SUBDIRS = bitmap fontfile fc fontcache \ + SUBDIRS = bitmap fontfile fc $(FONTCACHEDIRS) \ $(SPEEDODIRS) $(TYPE1DIRS) \ $(FREETYPEDIRS) $(XTTDIRS) $(BUILTINDIRS) \ util $(STUBDIRS) - SHARED_OBJS = bitmap/?*.o fontfile/?*.o fc/?*.o fontcache/?*.o \ + SHARED_OBJS = bitmap/?*.o fontfile/?*.o fc/?*.o $(FONTCACHESHAREDOBJS) \ $(SPEEDOSHAREDOBJS) $(TYPE1SHAREDOBJS) \ $(FREETYPESHAREDOBJS) $(XTTSHAREDOBJS) \ $(BUILTINSHAREDOBJS) util/?*.o STATIC_OBJS = bitmap/$(STATIC_OBJSDIR)?*.o fontfile/$(STATIC_OBJSDIR)?*.o \ - fc/$(STATIC_OBJSDIR)?*.o fontcache/$(STATIC_OBJSDIR)?*.o \ + fc/$(STATIC_OBJSDIR)?*.o $(FONTCACHESTATICOBJS) \ $(SPEEDOSTATICOBJS) $(TYPE1STATICOBJS) \ $(FREETYPESTATICOBJS) $(XTTSTATICOBJS) \ $(BUILTINSTATICOBJS) util/$(STATIC_OBJSDIR)?*.o DEBUG_OBJS = bitmap/debugger/?*.o fontfile/debugger/?*.o fc/debugger/?*.o \ - fontcache/debugger/?*.o \ + $(FONTCACHEDEBUGOBJS) \ $(SPEEDODEBUGOBJS) $(TYPE1DEBUGOBJS) \ $(FREETYPEDEBUGOBJS) $(XTTDEBUGOBJS) \ $(BUILTINDEBUGOBJS) util/debugger/?*.o PROFILE_OBJS = bitmap/profiled/?*.o fontfile/profiled/?*.o fc/profiled/?*.o \ - fontcache/profiled/?*.o \ + $(FONTCACHEPROFILEOBJS) \ $(SPEEDOPROFILEOBJS) $(TYPE1PROFILEOBJS) \ $(FREETYPEPROFILEOBJS) $(XTTPROFILEOBJS) \ $(BUILTINPROFILEOBJS) util/profiled/?*.o - DONES = bitmap/DONE fontfile/DONE fc/DONE fontcache/DONE \ + DONES = bitmap/DONE fontfile/DONE fc/DONE $(FONTCACHEDONES) \ $(SPEEDODONES) $(TYPE1DONES) \ $(FREETYPEDONES) $(XTTDONES) \ $(BUILTINDONES) util/DONE Index: xc/lib/font/FreeType/Imakefile diff -u xc/lib/font/FreeType/Imakefile:1.17 xc/lib/font/FreeType/Imakefile:1.24 --- xc/lib/font/FreeType/Imakefile:1.17 Mon Aug 27 13:40:58 2001 +++ xc/lib/font/FreeType/Imakefile Wed Jan 1 17:08:40 2003 @@ -1,39 +1,47 @@ -XCOMM $XFree86: xc/lib/font/FreeType/Imakefile,v 1.17 2001/08/27 17:40:58 dawes Exp $ +XCOMM $XFree86: xc/lib/font/FreeType/Imakefile,v 1.24 2003/01/01 22:08:40 torrey Exp $ -XCOMM Imakefile created for the Freetype TrueType renderer. -XCOMM Mark Leisher -XCOMM Juliusz Chroboczek - #if BuildServer && DoLoadableServer #define IHaveSubdirs #define NoLibSubdirs #define PassCDebugFlags SUBDIRS = module #endif + +DEFINES = ServerExtraDefines StrcasecmpDefines -/* - * The variable `HasUsableFileMmap' should be set to YES if mmap(2) can - * reliably be used to access regular files. This should be done in - * the platform-specific `*.cf' files. - * - * mmap(2) use is optional in FreeType, so no harm is done if we miss - * a few architectures. - */ -#if HasUsableFileMmap -MMAPDEFINES = -DHAVE_MMAP=1 +#if FontLibSharedFreeType +FT2INCS = -I$(FREETYPE2INCDIR) -I$(FREETYPE2INCDIR)/include +#else + +FT2SOURCEDIR = $(TOP)/extras/freetype2/src +FT2INCDIR = $(TOP)/extras/freetype2/include + +FT2INCS = -I$(FT2INCDIR) \ + -I$(FT2SOURCEDIR)/base \ + -I$(FT2SOURCEDIR)/raster \ + -I$(FT2SOURCEDIR)/sfnt \ + -I$(FT2SOURCEDIR)/truetype \ + -I$(FT2SOURCEDIR)/cff \ + -I$(FT2SOURCEDIR)/type1 \ + -I$(FT2SOURCEDIR)/psaux \ + -I$(FT2SOURCEDIR)/psnames \ + -I$(FT2SOURCEDIR)/pshinter \ + -I$(FT2SOURCEDIR)/autohint + +FT2SRCS = ftbase.c ftinit.c ftglyph.c ftsystem.c fttype1.c ftxf86.c \ + raster.c sfnt.c truetype.c cff.c type1.c \ + psaux.c psnames.c pshinter.c autohint.c + +FT2OBJS = ftbase.o ftinit.o ftglyph.o ftsystem.o fttype1.o ftxf86.o \ + raster.o sfnt.o truetype.o cff.o type1.o \ + psaux.o psnames.o pshinter.o autohint.o #endif -DEFINES = ServerExtraDefines \ - -DTT_MAKE_OPTION_SINGLE_OBJECT=1 $(MMAPDEFINES) StrcasecmpDefines - - -/* Much of the source is simply #included by freetype.c */ -INCLUDES = -I. -I$(FONTINCSRC) -I../include -I$(SERVERSRC)/include \ - -I$(FTSOURCEDIR)/lib -I$(FTSOURCEDIR)/lib/extend \ - -I$(FTSOURCEDIR)/lib/arch/unix -I$(XTOP)/include +INCLUDES = -I. -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/include $(FT2INCS) -I$(INCLUDESRC) -SRCS = ftfuncs.c ftenc.c ftutil.c freetype.c ftxcmap.c -OBJS = ftfuncs.o ftenc.o ftutil.o freetype.o ftxcmap.o +SRCS = ftfuncs.c ftenc.c fttools.c $(FT2SRCS) +OBJS = ftfuncs.o ftenc.o fttools.o $(FT2OBJS) #if BuildFontLib #define DoNormalLib NormalLibFont @@ -45,9 +53,26 @@ SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) + +#if !FontLibSharedFreeType +LinkSourceFile(ftbase.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(ftinit.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(ftglyph.c,$(FT2SOURCEDIR)/base) +/* LinkSourceFile(ftsystem.c,$(FT2SOURCEDIR)/base) */ +LinkSourceFile(ftutil.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(fttype1.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(ftxf86.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(raster.c,$(FT2SOURCEDIR)/raster) +LinkSourceFile(sfnt.c,$(FT2SOURCEDIR)/sfnt) +LinkSourceFile(truetype.c,$(FT2SOURCEDIR)/truetype) +LinkSourceFile(cff.c,$(FT2SOURCEDIR)/cff) +LinkSourceFile(type1.c,$(FT2SOURCEDIR)/type1) +LinkSourceFile(psaux.c,$(FT2SOURCEDIR)/psaux) +LinkSourceFile(psnames.c,$(FT2SOURCEDIR)/psnames) +LinkSourceFile(pshinter.c,$(FT2SOURCEDIR)/pshinter) +LinkSourceFile(autohint.c,$(FT2SOURCEDIR)/autohint) +#endif -LinkSourceFile(freetype.c,$(FTSOURCEDIR)/lib/arch/unix) -LinkSourceFile(ftxcmap.c,$(FTSOURCEDIR)/lib/extend) #endif #if BuildServer && DoLoadableServer Index: xc/lib/font/FreeType/ft.h diff -u xc/lib/font/FreeType/ft.h:1.16 xc/lib/font/FreeType/ft.h:1.19 --- xc/lib/font/FreeType/ft.h:1.16 Mon Aug 13 17:46:46 2001 +++ xc/lib/font/FreeType/ft.h Mon Sep 30 20:02:09 2002 @@ -1,6 +1,6 @@ /* Copyright (c) 1997 by Mark Leisher -Copyright (c) 1998-2000 by Juliusz Chroboczek +Copyright (c) 1998-2002 by Juliusz Chroboczek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -21,7 +21,7 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/FreeType/ft.h,v 1.16 2001/08/13 21:46:46 dawes Exp $ */ +/* $XFree86: xc/lib/font/FreeType/ft.h,v 1.19 2002/10/01 00:02:09 alanh Exp $ */ #ifndef _FT_H_ #define _FT_H_ @@ -56,21 +56,15 @@ #define TWO_SIXTEENTH ((double)(1<<16)) #define TWO_SIXTH ((double)(1<<6)) -/* nameID macros for getting strings from the TT font. */ - -#define TTF_COPYRIGHT 0 -#define TTF_TYPEFACE 1 -#define TTF_PSNAME 6 - /* Data structures used across files */ -struct ttf_mapping +typedef struct _FTMapping { - int has_cmap; - TT_CharMap cmap; - int base; - struct _FontMap *mapping; /* allow inclusion without fontenc.h */ -}; + int named; + FT_CharMap cmap; + int base; + struct _FontMap *mapping; /* allow inclusion without fontenc.h */ +} FTMappingRec, *FTMappingPtr; /* Prototypes */ @@ -80,17 +74,15 @@ /* ftenc.c */ -int ttf_pick_cmap(char*, int, char*, TT_Face, struct ttf_mapping *); -int ftstrcasecmp(const char *s1, const char *s2); -unsigned ttf_remap(unsigned code, struct ttf_mapping *tm); +int FTPickMapping(char*, int, char*, FT_Face, FTMappingPtr); +unsigned FTRemap(FT_Face face, FTMappingPtr, unsigned code); -/* ftutil.c */ +/* fttools.c */ -long ttf_atol(char*, char**, int); -int ttf_u2a(int, char*, char*, int); +int FTu2a(int, char*, char*, int, int); int FTtoXReturnCode(int); -int ttf_GetEnglishName(TT_Face, char *, int); -int ttf_checkForTTCName(char*, char**, int*); +int FTGetEnglishName(FT_Face, int, char *, int); +int FTcheckForTTCName(char*, char**, int*); extern void ErrorF(const char*, ...); Index: xc/lib/font/FreeType/ft2build.h diff -u /dev/null xc/lib/font/FreeType/ft2build.h:1.3 --- /dev/null Thu Feb 27 12:27:49 2003 +++ xc/lib/font/FreeType/ft2build.h Mon Sep 30 20:02:10 2002 @@ -0,0 +1,41 @@ +/***************************************************************************/ +/* */ +/* ft2build.h */ +/* */ +/* FreeType 2 build and setup macros. */ +/* */ +/* Copyright 1996-2001 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* Modified for XFree86. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/* $XFree86: xc/lib/font/FreeType/ft2build.h,v 1.3 2002/10/01 00:02:10 alanh Exp $ */ + + /*************************************************************************/ + /* */ + /* This file corresponds to the default "ft2build.h" file for */ + /* FreeType 2. It uses the "freetype" include root. */ + /* */ + /* Note that specific platforms might use a different configuration. */ + /* See builds/unix/ft2unix.h for an example. */ + /* */ + /*************************************************************************/ + + +#ifndef __FT2_BUILD_GENERIC_H__ +#define __FT2_BUILD_GENERIC_H__ + +#include "ftheader.h" + +#endif /* __FT2_BUILD_GENERIC_H__ */ + + +/* END */ Index: xc/lib/font/FreeType/ftconfig.h diff -u /dev/null xc/lib/font/FreeType/ftconfig.h:1.5 --- /dev/null Thu Feb 27 12:27:49 2003 +++ xc/lib/font/FreeType/ftconfig.h Wed Oct 9 21:18:31 2002 @@ -0,0 +1,340 @@ +/***************************************************************************/ +/* */ +/* ftconfig.h */ +/* */ +/* ANSI-specific configuration file (specification only). */ +/* */ +/* Copyright 1996-2001, 2002 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* Modified for XFree86. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/* $XFree86: xc/lib/font/FreeType/ftconfig.h,v 1.5 2002/10/10 01:18:31 tsi Exp $ */ + + /*************************************************************************/ + /* */ + /* This header file contains a number of macro definitions that are used */ + /* by the rest of the engine. Most of the macros here are automatically */ + /* determined at compile time, and you should not need to change it to */ + /* port FreeType, except to compile the library with a non-ANSI */ + /* compiler. */ + /* */ + /* Note however that if some specific modifications are needed, we */ + /* advise you to place a modified copy in your build directory. */ + /* */ + /* The build directory is usually `freetype/builds/', and */ + /* contains system-specific files that are always included first when */ + /* building the library. */ + /* */ + /* This ANSI version should stay in `include/freetype/config'. */ + /* */ + /*************************************************************************/ + + +#ifndef __FTCONFIG_H__ +#define __FTCONFIG_H__ + +#include +#include FT_CONFIG_OPTIONS_H +#include FT_CONFIG_STANDARD_LIBRARY_H + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ + /* */ + /* These macros can be toggled to suit a specific system. The current */ + /* ones are defaults used to compile FreeType in an ANSI C environment */ + /* (16bit compilers are also supported). Copy this file to your own */ + /* `freetype/builds/' directory, and edit it to port the engine. */ + /* */ + /*************************************************************************/ + + + /* The number of bytes in an `int' type. */ + +#include "Xmd.h" + +#define FT_SIZEOF_INT 4 +#ifdef LONG64 +#define FT_SIZEOF_LONG 8 +#else +#define FT_SIZEOF_LONG 4 +#endif + +#if 0 /* ?!?!?!?! */ + /* The number of bytes in a `long' type. */ +#if FT_ULONG_MAX == 0x0FFFFFFFFUL +#define FT_SIZEOF_LONG 4 +#elif FT_ULONG_MAX > 0x0FFFFFFFFU && FT_ULONG_MAX == 0x0FFFFFFFFFFFFFFFFU +#define FT_SIZEOF_LONG 8 +#else +#error "Unsupported number of bytes in `long' type!" +#endif +#endif + + + /* Preferred alignment of data */ +#define FT_ALIGNMENT 8 + + + /* FT_UNUSED is a macro used to indicate that a given parameter is not */ + /* used -- this is only used to get rid of unpleasant compiler warnings */ +#ifndef FT_UNUSED +#define FT_UNUSED( arg ) ( (arg) = (arg) ) +#endif + + + /*************************************************************************/ + /* */ + /* AUTOMATIC CONFIGURATION MACROS */ + /* */ + /* These macros are computed from the ones defined above. Don't touch */ + /* their definition, unless you know precisely what you are doing. No */ + /* porter should need to mess with them. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Mac support */ + /* */ + /* This is the only necessary change, so it is defined here instead */ + /* providing a new configuration file. */ + /* */ +#if ( defined( __APPLE__ ) && !defined ( DARWIN_NO_CARBON ) ) || \ + ( defined( __MWERKS__ ) && defined( macintosh ) ) +#define FT_MACINTOSH 1 +#endif + + + /*************************************************************************/ + /* */ + /* IntN types */ + /* */ + /* Used to guarantee the size of some specific integers. */ + /* */ + typedef signed short FT_Int16; + typedef unsigned short FT_UInt16; + +#if FT_SIZEOF_INT == 4 + + typedef signed int FT_Int32; + typedef unsigned int FT_UInt32; + +#elif FT_SIZEOF_LONG == 4 + + typedef signed long FT_Int32; + typedef unsigned long FT_UInt32; + +#else +#error "no 32bit type found -- please check your configuration files" +#endif + + /* now, lookup for an integer type that is at least 32 bits */ +#if FT_SIZEOF_INT >= 4 + + typedef int FT_Fast; + typedef unsigned int FT_UFast; + +#elif FT_SIZEOF_LONG >= 4 + + typedef long FT_Fast; + typedef unsigned long FT_UFast; + +#endif + + + /* determine whether we have a 64-bit int type for platforms without */ + /* Autoconf */ +#if FT_SIZEOF_LONG == 8 + + /* FT_LONG64 must be defined if a 64-bit type is available */ +#define FT_LONG64 +#define FT_INT64 long + +#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 + +#elif defined( __BORLANDC__ ) /* Borland C++ */ + + /* XXXX: We should probably check the value of __BORLANDC__ in order */ + /* to test the compiler version. */ + + /* this compiler provides the __int64 type */ +#define FT_LONG64 +#define FT_INT64 __int64 + +#elif defined( __WATCOMC__ ) /* Watcom C++ */ + + /* Watcom doesn't provide 64-bit data types */ + +#elif defined( __MWKS__ ) /* Metrowerks CodeWarrior */ + + /* I don't know if it provides 64-bit data types, any suggestion */ + /* is welcome. */ + +#elif defined( __GNUC__ ) + + /* GCC provides the "long long" type */ +#define FT_LONG64 +#define FT_INT64 long long int + +#endif /* FT_SIZEOF_LONG == 8 */ + + + /*************************************************************************/ + /* */ + /* A 64-bit data type will create compilation problems if you compile */ + /* in strict ANSI mode. To avoid them, we disable their use if */ + /* __STDC__ is defined. You can however ignore this rule by */ + /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ + /* */ +#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) + +#ifdef __STDC__ + + /* undefine the 64-bit macros in strict ANSI compilation mode */ +#undef FT_LONG64 +#undef FT_INT64 + +#endif /* __STDC__ */ + +#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ + + +#ifdef FT_MAKE_OPTION_SINGLE_OBJECT + +#define FT_LOCAL( x ) static x +#define FT_LOCAL_DEF( x ) static x + +#else + +#ifdef __cplusplus +#define FT_LOCAL( x ) extern "C" x +#define FT_LOCAL_DEF( x ) extern "C" x +#else +#define FT_LOCAL( x ) extern x +#define FT_LOCAL_DEF( x ) x +#endif + +#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ + + +#ifndef FT_BASE + +#ifdef __cplusplus +#define FT_BASE( x ) extern "C" x +#else +#define FT_BASE( x ) extern x +#endif + +#endif /* !FT_BASE */ + + +#ifndef FT_BASE_DEF + +#ifdef __cplusplus +#define FT_BASE_DEF( x ) extern "C" x +#else +#define FT_BASE_DEF( x ) extern x +#endif + +#endif /* !FT_BASE_DEF */ + + +#ifndef FT_EXPORT + +#ifdef __cplusplus +#define FT_EXPORT( x ) extern "C" x +#else +#define FT_EXPORT( x ) extern x +#endif + +#endif /* !FT_EXPORT */ + + +#ifndef FT_EXPORT_DEF + +#ifdef __cplusplus +#define FT_EXPORT_DEF( x ) extern "C" x +#else +#define FT_EXPORT_DEF( x ) extern x +#endif + +#endif /* !FT_EXPORT_DEF */ + + +#ifndef FT_EXPORT_VAR + +#ifdef __cplusplus +#define FT_EXPORT_VAR( x ) extern "C" x +#else +#define FT_EXPORT_VAR( x ) extern x +#endif + +#endif /* !FT_EXPORT_VAR */ + + /* The following macros are needed to compile the library with a */ + /* C++ compiler and with 16bit compilers. */ + /* */ + + /* This is special. Within C++, you must specify `extern "C"' for */ + /* functions which are used via function pointers, and you also */ + /* must do that for structures which contain function pointers to */ + /* assure C linkage -- it's not possible to have (local) anonymous */ + /* functions which are accessed by (global) function pointers. */ + /* */ + /* */ + /* FT_CALLBACK_DEF is used to _define_ a callback function. */ + /* */ + /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ + /* contains pointers to callback functions. */ + /* */ + /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ + /* that contains pointers to callback functions. */ + /* */ + /* */ + /* Some 16bit compilers have to redefine these macros to insert */ + /* the infamous `_cdecl' or `__fastcall' declarations. */ + /* */ +#ifndef FT_CALLBACK_DEF +#ifdef __cplusplus +#define FT_CALLBACK_DEF( x ) extern "C" x +#else +#define FT_CALLBACK_DEF( x ) static x +#endif +#endif /* FT_CALLBACK_DEF */ + +#ifndef FT_CALLBACK_TABLE +#ifdef __cplusplus +#define FT_CALLBACK_TABLE extern "C" +#define FT_CALLBACK_TABLE_DEF extern "C" +#else +#define FT_CALLBACK_TABLE extern +#define FT_CALLBACK_TABLE_DEF /* nothing */ +#endif +#endif /* FT_CALLBACK_TABLE */ + + +FT_END_HEADER + + +#endif /* __FTCONFIG_H__ */ + + +/* END */ Index: xc/lib/font/FreeType/ftenc.c diff -u xc/lib/font/FreeType/ftenc.c:1.18 xc/lib/font/FreeType/ftenc.c:1.21 --- xc/lib/font/FreeType/ftenc.c:1.18 Sat Oct 27 23:32:43 2001 +++ xc/lib/font/FreeType/ftenc.c Mon Sep 30 20:02:10 2002 @@ -1,7 +1,5 @@ -/* $XFree86: xc/lib/font/FreeType/ftenc.c,v 1.18 2001/10/28 03:32:43 tsi Exp $ */ - /* -Copyright (c) 1998 by Juliusz Chroboczek +Copyright (c) 1998-2002 by Juliusz Chroboczek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -21,172 +19,194 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* $XFree86: xc/lib/font/FreeType/ftenc.c,v 1.21 2002/10/01 00:02:10 alanh Exp $ */ -/* TrueType-dependent encoding code */ -#include "fontmisc.h" /* defines xalloc and friends */ -#include "fontenc.h" -#include "ttconfig.h" -#include "freetype.h" -#include "ft.h" #ifndef FONTMODULE #include #else +#include "Xmd.h" +#include "Xdefs.h" #include "xf86_ansic.h" #endif +#include "fontmisc.h" +#include "fontenc.h" +#include "freetype/freetype.h" +#include "freetype/ttnameid.h" +#include "freetype/tttables.h" +#include "freetype/t1tables.h" +#include "freetype/ftxf86.h" +#include "ft.h" -static int find_cmap(int, int, int, TT_Face, TT_CharMap *); -static int find_cmap_default(TT_Face, struct ttf_mapping*); +static int find_cmap(int, int, int, FT_Face, FT_CharMap *); -int -ttf_pick_cmap(char *xlfd, int length, char *filename, TT_Face face, - struct ttf_mapping *tm) +static int +FTEncFontSpecific(char *encoding) { - FontEncPtr encoding; - FontMapPtr mapping; - TT_CharMap cmap; - - char *encoding_name=0; - - if(xlfd) - encoding_name=FontEncFromXLFD(xlfd, length); - if(!encoding_name) - encoding_name="iso8859-1"; - - if(!strcasecmp(encoding_name, "truetype-raw")) { - tm->has_cmap=0; - tm->base=0; - tm->mapping=0; - return 0; - } else { - if((encoding=FontEncFind(encoding_name, filename))) { - for(mapping=encoding->mappings; mapping; mapping=mapping->next) { - if(!find_cmap(mapping->type, mapping->pid, mapping->eid, face, - &cmap)) { - tm->has_cmap=1; - tm->cmap=cmap; - if(!strcasecmp(encoding_name, "microsoft-symbol")) { - /* deal with undocumented lossage */ - TT_Face_Properties properties; - if(!TT_Get_Face_Properties(face, &properties) && - properties.os2!=0) - tm->base=properties.os2->usFirstCharIndex-0x20; - else - tm->base=0; - } else - tm->base=0; - tm->mapping=mapping; - return 0; - } - } - } - } + char *p = encoding; - /* Failed to find a suitable mapping and cmap */ - return find_cmap_default(face, tm); + while(*p != '-') { + if(*p == '\0') + return 0; + p++; + } + p++; + return (strcasecmp(p, "fontspecific") == 0); } -static int -find_cmap_default(TT_Face face, struct ttf_mapping *tm) +int +FTPickMapping(char *xlfd, int length, char *filename, FT_Face face, + FTMappingPtr tm) { - TT_CharMap cmap; - - /* Try to find a Unicode charmap */ - if(!find_cmap(FONT_ENCODING_UNICODE, 0, 0, face, &cmap)) { - tm->has_cmap=1; - tm->cmap=cmap; - tm->base=0; - tm->mapping=0; - return 0; - } - - /* Try to get the first charmap in the file */ - if(!TT_Get_CharMap(face, 0, &cmap)) { - tm->has_cmap=1; - tm->cmap=cmap; - tm->base=0; - tm->mapping=0; - return 0; - } + FontEncPtr encoding; + FontMapPtr mapping; + FT_CharMap cmap; + int ftrc; + + char *encoding_name = 0; + + if(xlfd) + encoding_name = FontEncFromXLFD(xlfd, length); + if(!encoding_name) + encoding_name = "iso8859-1"; + + if(FTEncFontSpecific(encoding_name)) { + ftrc = FT_Select_Charmap(face, ft_encoding_adobe_custom); + if(ftrc != 0) { + ErrorF("FreeType: couldn't select custom Type 1 encoding\n"); + return -1; + } else { + tm->named = 0; + tm->cmap = face->charmap; + tm->base = 0; + tm->mapping = NULL; + return 0; + } + } - /* Tough. */ - tm->has_cmap=0; - tm->base=0; - tm->mapping=0; - return 0; + encoding = FontEncFind(encoding_name, filename); + if(encoding == NULL) { + ErrorF("FreeType: couldn't find encoding %s\n", encoding_name); + encoding = FontEncFind("iso8859-1", filename); + } + if(encoding == NULL) { + ErrorF("FreeType: couldn't find encoding iso8859-1.\n"); + return -1; + } + + if(FT_Has_PS_Glyph_Names(face)) { + for(mapping = encoding->mappings; mapping; mapping = mapping->next) { + if(mapping->type == FONT_ENCODING_POSTSCRIPT) { + tm->named = 1; + tm->base = 0; + tm->mapping = mapping; + return 0; + } + } + } + + for(mapping = encoding->mappings; mapping; mapping = mapping->next) { + if(find_cmap(mapping->type, mapping->pid, mapping->eid, face, + &cmap)) { + tm->named = 0; + tm->cmap = cmap; + if(strcasecmp(encoding_name, "microsoft-symbol") == 0) { + /* deal with undocumented lossage */ + TT_OS2 *os2; + os2 = FT_Get_Sfnt_Table(face, ft_sfnt_os2); + if(os2) + tm->base = os2->usFirstCharIndex - 0x20; + else + tm->base = 0; + } else + tm->base = 0; + tm->mapping = mapping; + return 0; + } + } + + return -1; } - static int -find_cmap(int type, int pid, int eid, TT_Face face, TT_CharMap *cmap) +find_cmap(int type, int pid, int eid, FT_Face face, FT_CharMap *cmap_return) { - int i, n; - unsigned short p,e; + int i, n; + FT_CharMap cmap = NULL; - n=TT_Get_CharMap_Count(face); + n = face->num_charmaps; - switch(type) { - case FONT_ENCODING_TRUETYPE: /* specific cmap */ - for(i=0; icharmaps[i]; + if(cmap->platform_id == pid && cmap->encoding_id == eid) { + *cmap_return = cmap; + return 1; + } + } + break; + case FONT_ENCODING_UNICODE: /* any Unicode cmap */ + /* prefer Microsoft Unicode */ + for(i=0; icharmaps[i]; + if(cmap->platform_id == TT_PLATFORM_MICROSOFT && + cmap->encoding_id == TT_MS_ID_UNICODE_CS) { + *cmap_return = cmap; + return 1; + } + } + break; + /* Try Apple Unicode */ + for(i=0; icharmaps[i]; + if(cmap->platform_id == TT_PLATFORM_APPLE_UNICODE) { + *cmap_return = cmap; + return 1; + } + } + /* ISO Unicode? */ + for(i=0; icharmaps[i]; + if(cmap->platform_id == TT_PLATFORM_ISO) { + *cmap_return = cmap; + return 1; + } + } + break; + default: + return 0; } - break; - default: - return 1; - } - return 1; + return 0; } unsigned -ttf_remap(unsigned code, struct ttf_mapping *tm) +FTRemap(FT_Face face, FTMappingPtr tm, unsigned code) { - unsigned index; - - if(tm->mapping) { - index=FontEncRecode(code, tm->mapping); - } else { - if(code<0x100 || !tm->has_cmap) - index=code; - else - return 0; - } - index += tm->base; - if(tm->has_cmap) - return TT_Char_Index(tm->cmap, index); - else - return index; + unsigned index; + char *name; + unsigned glyph_index; + + if(tm->mapping) { + if(tm->named) { + name = FontEncName(code, tm->mapping); + if(!name) + return 0; + glyph_index = FT_Get_Name_Index(face, name); + return glyph_index; + } else { + index = FontEncRecode(code, tm->mapping) + tm->base; + FT_Set_Charmap(face, tm->cmap); + glyph_index = FT_Get_Char_Index(face, index); + return glyph_index; + } + } else { + if(code < 0x100) { + index = code; + FT_Set_Charmap(face, tm->cmap); + glyph_index = FT_Get_Char_Index(face, index); + return glyph_index; + } else + return 0; + } } - Index: xc/lib/font/FreeType/ftfuncs.c diff -u xc/lib/font/FreeType/ftfuncs.c:1.21 xc/lib/font/FreeType/ftfuncs.c:1.27 --- xc/lib/font/FreeType/ftfuncs.c:1.21 Sat Oct 27 23:32:43 2001 +++ xc/lib/font/FreeType/ftfuncs.c Wed Feb 12 22:01:45 2003 @@ -1,6 +1,6 @@ /* Copyright (c) 1997 by Mark Leisher -Copyright (c) 1998-2001 by Juliusz Chroboczek +Copyright (c) 1998-2002 by Juliusz Chroboczek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -21,21 +21,29 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.21 2001/10/28 03:32:43 tsi Exp $ */ +/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.27 2003/02/13 03:01:45 dawes Exp $ */ -#ifndef FONT_MODULE +#include "fontmisc.h" + +#ifndef FONTMODULE #include +#include #else +#include "Xmd.h" +#include "Xdefs.h" #include "xf86_ansic.h" #endif -#include "fontmisc.h" #include "fntfilst.h" #include "fontutil.h" #include "FSproto.h" -#include "freetype.h" +#include "freetype/freetype.h" +#include "freetype/ftsizes.h" +#include "freetype/ttnameid.h" +#include "freetype/tttables.h" +#include "freetype/t1tables.h" +#include "freetype/ftxf86.h" -#include "ttconfig.h" #include "fontenc.h" #include "ft.h" #include "ftfuncs.h" @@ -43,518 +51,502 @@ /* The propery names for all the XLFD properties. */ static char *xlfd_props[] = { - "FOUNDRY", - "FAMILY_NAME", - "WEIGHT_NAME", - "SLANT", - "SETWIDTH_NAME", - "ADD_STYLE_NAME", - "PIXEL_SIZE", - "POINT_SIZE", - "RESOLUTION_X", - "RESOLUTION_Y", - "SPACING", - "AVERAGE_WIDTH", - "CHARSET_REGISTRY", - "CHARSET_ENCODING", + "FOUNDRY", + "FAMILY_NAME", + "WEIGHT_NAME", + "SLANT", + "SETWIDTH_NAME", + "ADD_STYLE_NAME", + "PIXEL_SIZE", + "POINT_SIZE", + "RESOLUTION_X", + "RESOLUTION_Y", + "SPACING", + "AVERAGE_WIDTH", + "CHARSET_REGISTRY", + "CHARSET_ENCODING", }; static int ftypeInitP = 0; /* is the engine initialised? */ -static TT_Engine ftypeEngine; /* the engine */ +static FT_Library ftypeLibrary; -static TTFFace *faceTable[NUMFACEBUCKETS]; +static FTFacePtr faceTable[NUMFACEBUCKETS]; static unsigned hash(char *string) { - int i; - unsigned u=0; - for(i=0; string[i]!='\0'; i++) - u=(u<<2)+(unsigned char)string[i]; - return u; + int i; + unsigned u = 0; + for(i = 0; string[i] != '\0'; i++) + u = (u<<2) + (unsigned char)string[i]; + return u; } static int ifloor(int x, int y) { - if(x>=0) - return x/y; - else - return x/y-1; + if(x >= 0) + return x/y; + else + return x/y - 1; } static int iceil(int x, int y) { - return ifloor(x+y-1, y); + return ifloor(x + y - 1, y); } static int -FreeTypeOpenFace(TTFFace **facep, char *fileName) +FreeTypeOpenFace(FTFacePtr *facep, char *fileName) { - int ftrc; - int bucket; - TTFFace *face, *otherFace; - char *realFileName; - int faceNumber; - - /* Make sure FreeType is initialized. */ - if (!ftypeInitP) { - /* Report initialization errors as an allocation error because X does - * not provide any other kind of error code related to intialization. - */ - if ((ftrc=TT_Init_FreeType(&ftypeEngine))) { - MUMBLE1("Error initializing ftypeEngine: %d\n", ftrc); - return AllocError; - } - ftypeInitP = 1; - } - - /* Try to find a matching face in the hashtable */ - bucket=hash(fileName)%NUMFACEBUCKETS; - otherFace=faceTable[bucket]; - while(otherFace) { - if(!strcmp(otherFace->filename,fileName)) - break; - otherFace=otherFace->next; - } - if(otherFace) { - MUMBLE1("Returning cached face: %s\n", otherFace->filename); - *facep=otherFace; - return Successful; - } + FT_Error ftrc; + int bucket; + FTFacePtr face, otherFace; + char *realFileName; + int faceNumber; + + if (!ftypeInitP) { + ftrc = FT_Init_FreeType(&ftypeLibrary); + if (ftrc != 0) { + ErrorF("FreeType: error initializing ftypeEngine: %d\n", ftrc); + return AllocError; + } + ftypeInitP = 1; + } + + /* Try to find a matching face in the hashtable */ + bucket = hash(fileName)%NUMFACEBUCKETS; + otherFace = faceTable[bucket]; + while(otherFace) { + if(strcmp(otherFace->filename, fileName) == 0) + break; + otherFace = otherFace->next; + } + if(otherFace) { + MUMBLE1("Returning cached face: %s\n", otherFace->filename); + *facep = otherFace; + return Successful; + } + + /* No cached match; need to make a new one */ + face = (FTFacePtr)xalloc(sizeof(FTFaceRec)); + if(face == NULL) { + return AllocError; + } - /* No cached match; need to make a new one */ - if((face=(TTFFace*)xalloc(sizeof(TTFFace)))==NULL) { - MUMBLE("Couldn't allocate TTFFace\n"); - return AllocError; - } - - if((face->filename=(char*)xalloc(strlen(fileName)+1))==NULL) { - xfree(face); - return AllocError; - } - strcpy(face->filename, fileName); - - face->instances=0; - - if(ttf_checkForTTCName(fileName, &realFileName, &faceNumber)) { - ftrc=TT_Open_Collection(ftypeEngine, realFileName, faceNumber, - &face->face); - xfree(realFileName); - } else { - ftrc=TT_Open_Face(ftypeEngine, fileName, &face->face); - } - if(ftrc) { - MUMBLE1("Couldn't open face: %d\n", ftrc); - xfree(face->filename); - xfree(face); - return BadFontPath; - } - if((ftrc=TT_Get_Face_Properties(face->face, &face->properties))) { - MUMBLE1("Couldn't get properties: %d\n", ftrc); - TT_Close_Face(face->face); - xfree(face->filename); - xfree(face); - return BadFontPath; - } - if((ftrc=TT_New_Glyph(face->face, &face->glyph))) { - MUMBLE1("Couldn't allocate glyph container: %d\n", ftrc); - TT_Close_Face(face->face); - xfree(face->filename); - xfree(face); - return BadFontPath; - } - - /* Insert face in hashtable and return it */ - face->next=faceTable[bucket]; - faceTable[bucket]=face; - *facep=face; - return Successful; + face->filename = (char*)xalloc(strlen(fileName)+1); + if(face->filename == NULL) { + xfree(face); + return AllocError; + } + strcpy(face->filename, fileName); + + face->instances = NULL; + face->active_instance = NULL; + + if(FTcheckForTTCName(fileName, &realFileName, &faceNumber)) { + ftrc = FT_New_Face(ftypeLibrary, realFileName, faceNumber, &face->face); + xfree(realFileName); + } else + ftrc = FT_New_Face(ftypeLibrary, fileName, 0, &face->face); + if(ftrc != 0) { + ErrorF("FreeType: couldn't open face %s: %d\n", fileName, ftrc); + xfree(face->filename); + xfree(face); + return BadFontPath; + } + + /* Insert face in hashtable and return it */ + face->next = faceTable[bucket]; + faceTable[bucket] = face; + *facep = face; + return Successful; } static void -FreeTypeFreeFace(TTFFace *face) +FreeTypeFreeFace(FTFacePtr face) { - int bucket; - TTFFace *otherFace; + int bucket; + FTFacePtr otherFace; - if(!face->instances) { - bucket=hash(face->filename)%NUMFACEBUCKETS; - if(faceTable[bucket]==face) - faceTable[bucket]=face->next; - else { - otherFace=faceTable[bucket]; - while(otherFace) { - if(otherFace->next==face) - break; - otherFace=otherFace->next; - } - if(otherFace && otherFace->next) - otherFace->next=otherFace->next->next; - else - ErrorF("Congratulations, \ -you've found a bug in the TrueType backend: freeing unknown face\n"); - } - MUMBLE1("Closing face: %s\n", face->filename); - TT_Close_Face(face->face); - xfree(face->filename); - xfree(face); - } + if(!face->instances) { + bucket = hash(face->filename) % NUMFACEBUCKETS; + if(faceTable[bucket] == face) + faceTable[bucket] = face->next; + else { + otherFace = faceTable[bucket]; + while(otherFace) { + if(otherFace->next == face) + break; + otherFace = otherFace->next; + } + if(otherFace && otherFace->next) + otherFace->next = otherFace->next->next; + else + ErrorF("FreeType: freeing unknown face\n"); + } + MUMBLE1("Closing face: %s\n", face->filename); + FT_Done_Face(face->face); + xfree(face->filename); + xfree(face); + } } static int -TransEqual(TTFNormalisedTransformation *t1, TTFNormalisedTransformation *t2) -{ - if(t1->scale!=t2->scale) - return 0; - else if(t1->xres!=t2->xres || t1->yres!=t2->yres) - return 0; - else if(t1->nonIdentity != t2->nonIdentity) - return 0; - else if(t1->nonIdentity && t2->nonIdentity) { - return - t1->matrix.xx == t2->matrix.xx && - t1->matrix.yx == t2->matrix.yx && - t1->matrix.yy == t2->matrix.yy && - t1->matrix.xy == t2->matrix.xy; - } else - return 1; +TransEqual(FTNormalisedTransformationPtr t1, FTNormalisedTransformationPtr t2) +{ + if(t1->scale != t2->scale) + return 0; + else if(t1->xres != t2->xres || t1->yres != t2->yres) + return 0; + else if(t1->nonIdentity != t2->nonIdentity) + return 0; + else if(t1->nonIdentity && t2->nonIdentity) { + return + t1->matrix.xx == t2->matrix.xx && + t1->matrix.yx == t2->matrix.yx && + t1->matrix.yy == t2->matrix.yy && + t1->matrix.xy == t2->matrix.xy; + } else + return 1; } static int -BitmapFormatEqual(FontBitmapFormat *f1, FontBitmapFormat *f2) +BitmapFormatEqual(FontBitmapFormatPtr f1, FontBitmapFormatPtr f2) { - return - f1->bit==f2->bit && - f1->byte==f2->byte && - f1->glyph==f2->glyph; + return + f1->bit == f2->bit && + f1->byte == f2->byte && + f1->glyph == f2->glyph; } static int -TTFInstanceMatch(TTFInstance *instance, - char *fileName, TTFNormalisedTransformation *trans, - int charcell, FontBitmapFormat *bmfmt) +FTInstanceMatch(FTInstancePtr instance, + char *fileName, FTNormalisedTransformationPtr trans, + int charcell, FontBitmapFormatPtr bmfmt) { - if(strcmp(instance->face->filename, fileName)) { - return 0; - } else if(!TransEqual(&instance->transformation, trans)) { - return 0; - } else if((charcell && instance->monospaced!=2) || - (!charcell && instance->monospaced==2)) { - return 0; - } else if(!BitmapFormatEqual(&instance->bmfmt, bmfmt)) { - return 0; - } else { - return 1; - } + if(strcmp(instance->face->filename, fileName) != 0) { + return 0; + } else if(!TransEqual(&instance->transformation, trans)) { + return 0; + } else if((charcell && instance->monospaced != FT_CHARCELL) || + (!charcell && instance->monospaced == FT_CHARCELL)) { + return 0; + } else if(!BitmapFormatEqual(&instance->bmfmt, bmfmt)) { + return 0; + } else { + return 1; + } } - static int -FreeTypeOpenInstance(TTFInstance **instancep, - char *fileName, TTFNormalisedTransformation *trans, - int charcell, FontBitmapFormat *bmfmt) +FreeTypeActivateInstance(FTInstancePtr instance) { - int ftrc, xrc; - TTFInstance *instance, *otherInstance; - TT_Face_Properties *properties; - TTFFace *face; + FT_Error ftrc; + if(instance->face->active_instance == instance) + return Successful; - xrc=FreeTypeOpenFace(&face, fileName); - if(xrc!=Successful) { - return xrc; - } - - /* Search for a matching instance */ - for(otherInstance=face->instances; - otherInstance; - otherInstance=otherInstance->next) { - if(TTFInstanceMatch(otherInstance, fileName, trans, charcell, bmfmt)) - break; - } - if(otherInstance) { - MUMBLE("Returning cached instance\n"); - otherInstance->refcount++; - *instancep=otherInstance; + ftrc = FT_Activate_Size(instance->size); + if(ftrc != 0) { + instance->face->active_instance = NULL; + ErrorF("FreeType: couldn't activate instance: %d\n", ftrc); + return FTtoXReturnCode(ftrc); + } + FT_Set_Transform(instance->face->face, + instance->transformation.nonIdentity ? + &instance->transformation.matrix : 0, + 0); + + instance->face->active_instance = instance; return Successful; - } +} - /* None matching found */ - if((instance=(TTFInstance*)xalloc(sizeof(TTFInstance)))==0) { - MUMBLE("Unable to allocate TTFInstance\n"); - return AllocError; - } - - instance->refcount=1; - instance->face=face; - properties=&instance->face->properties; - - instance->monospaced=charcell?2:0; - instance->charcellMetrics=0; - instance->width=0; - - instance->transformation=*trans; - instance->bmfmt=*bmfmt; - instance->nglyphs=properties->num_Glyphs; - instance->glyphs=0; - instance->available=0; - - if((ftrc=TT_New_Instance(instance->face->face, &instance->instance))) { - MUMBLE("Couldn't create instance\n"); - FreeTypeFreeFace(instance->face); - xfree(instance); - return FTtoXReturnCode(ftrc); - } - if((ftrc=TT_Set_Instance_Resolutions(instance->instance, - trans->xres, trans->yres))) { - TT_Done_Instance(instance->instance); - FreeTypeFreeFace(instance->face); - xfree(instance); - MUMBLE1("Couldn't set resolution: %d\n:", ftrc); - return FTtoXReturnCode(ftrc); - } - if((ftrc=TT_Set_Instance_CharSize(instance->instance, - (int)(trans->scale*(1<<6)+0.5)))) { - TT_Done_Instance(instance->instance); - FreeTypeFreeFace(instance->face); - xfree(instance); - MUMBLE1("Couldn't set charsize: %d\n", ftrc); - - return FTtoXReturnCode(ftrc); - } - if(trans->nonIdentity) { - int rotated, stretched; - stretched = - ((trans->matrix.xx>>8)*(trans->matrix.xx>>8) + - ((trans->matrix.yx>>8)*(trans->matrix.yx>>8)) != (1<<16)) || - ((trans->matrix.xy>>8) * (trans->matrix.xy>>8) + - (trans->matrix.yy>>8) * (trans->matrix.yy>>8) != (1<<16)); - rotated = trans->matrix.yx!=0 || trans->matrix.xy!=0; - TT_Set_Instance_Transform_Flags(instance->instance, rotated, stretched); - } - - if((ftrc=TT_Get_Instance_Metrics(instance->instance, &instance->imetrics))) { - TT_Done_Instance(instance->instance); - FreeTypeFreeFace(instance->face); - xfree(instance); - MUMBLE1("Couldn't get instance metrics: %d\n:", ftrc); - return FTtoXReturnCode(ftrc); - } - - /* maintain a linked list of instances */ - instance->next=instance->face->instances; - instance->face->instances=instance; +static int +FreeTypeOpenInstance(FTInstancePtr *instance_return, + char *fileName, FTNormalisedTransformationPtr trans, + int charcell, FontBitmapFormatPtr bmfmt) +{ + FT_Error ftrc; + int xrc; + FTInstancePtr instance, otherInstance; + FTFacePtr face; + + xrc = FreeTypeOpenFace(&face, fileName); + if(xrc != Successful) { + return xrc; + } + + /* Search for a matching instance */ + for(otherInstance = face->instances; + otherInstance; + otherInstance = otherInstance->next) { + if(FTInstanceMatch(otherInstance, fileName, trans, charcell, bmfmt)) + break; + } + if(otherInstance) { + MUMBLE("Returning cached instance\n"); + otherInstance->refcount++; + *instance_return = otherInstance; + return Successful; + } + + /* None matching found */ + instance = (FTInstancePtr)xalloc(sizeof(FTInstanceRec)); + if(instance == NULL) { + return AllocError; + } + + instance->refcount = 1; + instance->face = face; + + instance->monospaced = charcell?FT_CHARCELL:0; + instance->charcellMetrics = 0; + instance->width = 0; - *instancep=instance; - return Successful; + instance->transformation = *trans; + instance->bmfmt = *bmfmt; + instance->nglyphs = instance->face->face->num_glyphs; + instance->glyphs = NULL; + instance->available = NULL; + + ftrc = FT_New_Size(instance->face->face, &instance->size); + if(ftrc != 0) { + ErrorF("FreeType: couldn't create size object: %d\n", ftrc); + FreeTypeFreeFace(instance->face); + xfree(instance); + return FTtoXReturnCode(ftrc); + } + FreeTypeActivateInstance(instance); + ftrc = FT_Set_Char_Size(instance->face->face, + (int)(trans->scale*(1<<6)+0.5), + (int)(trans->scale*(1<<6)+0.5), + trans->xres, trans->yres); + if(ftrc != 0) { + FT_Done_Size(instance->size); + FreeTypeFreeFace(instance->face); + xfree(instance); + return FTtoXReturnCode(ftrc); + } + + /* maintain a linked list of instances */ + instance->next = instance->face->instances; + instance->face->instances = instance; + + *instance_return = instance; + return Successful; } static void -FreeTypeFreeInstance(TTFInstance *instance) +FreeTypeFreeInstance(FTInstancePtr instance) { - TTFInstance *otherInstance; - - instance->refcount--; - if(instance->refcount<=0) { - int i,j; + FTInstancePtr otherInstance; - if(instance->face->instances==instance) - instance->face->instances=instance->next; - else { - for(otherInstance=instance->face->instances; - otherInstance; - otherInstance=otherInstance->next) - if(otherInstance->next==instance) { - otherInstance->next=instance->next; - break; + if(instance->face->active_instance == instance) + instance->face->active_instance = NULL; + instance->refcount--; + if(instance->refcount <= 0) { + int i,j; + + if(instance->face->instances == instance) + instance->face->instances = instance->next; + else { + for(otherInstance = instance->face->instances; + otherInstance; + otherInstance = otherInstance->next) + if(otherInstance->next == instance) { + otherInstance->next = instance->next; + break; + } } - } - MUMBLE("Freeing instance\n"); - TT_Done_Instance(instance->instance); - FreeTypeFreeFace(instance->face); + FT_Done_Size(instance->size); + FreeTypeFreeFace(instance->face); - if(instance->charcellMetrics) { - xfree(instance->charcellMetrics); - } - if(instance->glyphs) { - for(i=0; inglyphs,FONTSEGMENTSIZE); i++) { - if(instance->glyphs[i]) { - for(j=0; javailable[i][j]==3) - xfree(instance->glyphs[i][j].bits); - } - xfree(instance->glyphs[i]); + if(instance->charcellMetrics) { + xfree(instance->charcellMetrics); } - } - xfree(instance->glyphs); - } - if(instance->available) { - for(i=0; inglyphs,FONTSEGMENTSIZE); i++) { - if(instance->available[i]) - xfree(instance->available[i]); - } - xfree(instance->available); + if(instance->glyphs) { + for(i = 0; i < iceil(instance->nglyphs, FONTSEGMENTSIZE); i++) { + if(instance->glyphs[i]) { + for(j = 0; j < FONTSEGMENTSIZE; j++) { + if(instance->available[i][j] == + FT_AVAILABLE_RASTERISED) + xfree(instance->glyphs[i][j].bits); + } + xfree(instance->glyphs[i]); + } + } + xfree(instance->glyphs); + } + if(instance->available) { + for(i = 0; i < iceil(instance->nglyphs, FONTSEGMENTSIZE); i++) { + if(instance->available[i]) + xfree(instance->available[i]); + } + xfree(instance->available); + } + xfree(instance); } - xfree(instance); - } } static int -FreeTypeInstanceFindGlyph(unsigned idx, TTFInstance *instance, +FreeTypeInstanceFindGlyph(unsigned idx, FTInstancePtr instance, CharInfoPtr **glyphs, int ***available, int *found, int *segmentP, int *offsetP) { - int segment, offset; + int segment, offset; - if(idx>instance->nglyphs) { - *found=0; - return Successful; - } + if(idx > instance->nglyphs) { + *found = 0; + return Successful; + } - if(!*available) { - if((*available= - (int**)xalloc(sizeof(int*)*iceil(instance->nglyphs, FONTSEGMENTSIZE))) - ==0) - return AllocError; - memset((char*)(*available), 0, - sizeof(int*)*iceil(instance->nglyphs, FONTSEGMENTSIZE)); - } - - segment=ifloor(idx, FONTSEGMENTSIZE); - offset=idx-segment*FONTSEGMENTSIZE; - - if(!(*available)[segment]) { - if(((*available)[segment]= - (int*)xalloc(sizeof(int)*FONTSEGMENTSIZE)) - ==0) - return AllocError; - memset((char*)(*available)[segment],0, - sizeof(int)*FONTSEGMENTSIZE); - } - - if(!*glyphs) { - if((*glyphs= - (CharInfoPtr*)xalloc(sizeof(CharInfoPtr)* - iceil(instance->nglyphs, FONTSEGMENTSIZE))) - ==0) - return AllocError; - memset((char*)(*glyphs), 0, - sizeof(CharInfoPtr)*iceil(instance->nglyphs, FONTSEGMENTSIZE)); - } - - if(!(*glyphs)[segment]) { - if(((*glyphs)[segment]= - (CharInfoPtr)xalloc(sizeof(CharInfoRec)*FONTSEGMENTSIZE)) - ==0) - return AllocError; - } - - *found=1; - *segmentP=segment; - *offsetP=offset; - return Successful; + if(*available == NULL) { + *available = + (int**)xalloc(sizeof(int*) * iceil(instance->nglyphs, + FONTSEGMENTSIZE)); + if(*available == NULL) + return AllocError; + memset((char*)(*available), 0, + sizeof(int*) * iceil(instance->nglyphs, FONTSEGMENTSIZE)); + } + + segment = ifloor(idx, FONTSEGMENTSIZE); + offset = idx - segment * FONTSEGMENTSIZE; + + if((*available)[segment] == NULL) { + (*available)[segment] = (int*)xalloc(sizeof(int) * FONTSEGMENTSIZE); + if((*available)[segment] == NULL) + return AllocError; + memset((char*)(*available)[segment], 0, sizeof(int) * FONTSEGMENTSIZE); + } + + if(*glyphs == NULL) { + *glyphs = (CharInfoPtr*)xalloc(sizeof(CharInfoPtr)* + iceil(instance->nglyphs, + FONTSEGMENTSIZE)); + if(*glyphs == NULL) + return AllocError; + memset((char*)(*glyphs), 0, + sizeof(CharInfoPtr)*iceil(instance->nglyphs, FONTSEGMENTSIZE)); + } + + if((*glyphs)[segment] == NULL) { + (*glyphs)[segment]= + (CharInfoPtr)xalloc(sizeof(CharInfoRec) * FONTSEGMENTSIZE); + if((*glyphs)[segment] == NULL) + return AllocError; + } + + *found = 1; + *segmentP = segment; + *offsetP = offset; + return Successful; } static int -FreeTypeInstanceGetGlyph(unsigned idx, CharInfoPtr *g, TTFInstance *instance) -{ - int found, segment, offset; - int xrc, ftrc; - int ***available; - CharInfoPtr **glyphs; - - available=&instance->available; - glyphs=&instance->glyphs; - - if((xrc=FreeTypeInstanceFindGlyph(idx, instance, glyphs, available, - &found, &segment, &offset)) - !=Successful) - return xrc; +FreeTypeInstanceGetGlyph(unsigned idx, CharInfoPtr *g, FTInstancePtr instance) +{ + int found, segment, offset; + FT_Error ftrc; + int xrc; + int ***available; + CharInfoPtr **glyphs; + + available = &instance->available; + glyphs = &instance->glyphs; - if(!found || (*available)[segment][offset]==1) { - *g=0; - return Successful; - } else if((*available)[segment][offset]==3) { - *g=&(*glyphs)[segment][offset]; - return Successful; - } + xrc = FreeTypeInstanceFindGlyph(idx, instance, glyphs, available, + &found, &segment, &offset); + if(xrc != Successful) + return xrc; - /* Tough: need to rasterise a new glyph. */ - if((ftrc=TT_Load_Glyph(instance->instance, instance->face->glyph, - idx, TTLOAD_DEFAULT))) { - return FTtoXReturnCode(ftrc); - } - - if(instance->monospaced==2 && (*available)[segment][offset]==0) - memcpy((char*)&(*glyphs)[segment][offset].metrics, - (char*)instance->charcellMetrics, - sizeof(xCharInfo)); - - xrc=FreeTypeRasteriseGlyph(&(*glyphs)[segment][offset], - instance, instance->monospaced==2); - if(xrc!=Successful) - return xrc; - else - (*available)[segment][offset]=3; + if(!found || (*available)[segment][offset] == FT_AVAILABLE_NO) { + *g = 0; + return Successful; + } else if((*available)[segment][offset] == FT_AVAILABLE_RASTERISED) { + *g = &(*glyphs)[segment][offset]; + return Successful; + } + + /* Tough: need to rasterise a new glyph. */ + FreeTypeActivateInstance(instance); + ftrc = FT_Load_Glyph(instance->face->face, idx, + FT_LOAD_RENDER | FT_LOAD_MONOCHROME); + if(ftrc != 0) + return FTtoXReturnCode(ftrc); + + if(instance->monospaced == FT_CHARCELL && + (*available)[segment][offset] == 0) + memcpy((char*)&(*glyphs)[segment][offset].metrics, + (char*)instance->charcellMetrics, + sizeof(xCharInfo)); + + xrc = FreeTypeRasteriseGlyph(&(*glyphs)[segment][offset], + instance, instance->monospaced == FT_CHARCELL); + if(xrc != Successful) + return xrc; + else + (*available)[segment][offset] = FT_AVAILABLE_RASTERISED; - /* Update the width to match the width of the font */ - if(instance->monospaced) { - if((*available)[segment][offset]>=3) - (*glyphs)[segment][offset].metrics.characterWidth=instance->width; - } - - /* return the glyph */ - if((*available)[segment][offset]>=3) - *g=&(*glyphs)[segment][offset]; - else - *g=0; - return Successful; + /* Update the width to match the width of the font */ + if(instance->monospaced) { + if((*available)[segment][offset] >= FT_AVAILABLE_RASTERISED) + (*glyphs)[segment][offset].metrics.characterWidth = instance->width; + } + + /* return the glyph */ + if((*available)[segment][offset] >= FT_AVAILABLE_RASTERISED) + *g = &(*glyphs)[segment][offset]; + else + *g = 0; + return Successful; } static int FreeTypeInstanceGetGlyphMetrics(unsigned idx, - xCharInfo **metrics, TTFInstance *instance) + xCharInfo **metrics, FTInstancePtr instance) { - CharInfoPtr g; - int xrc; - int found, segment, offset; - - if((xrc=FreeTypeInstanceFindGlyph(idx, instance, + CharInfoPtr g; + int xrc; + int found, segment, offset; + + xrc = FreeTypeInstanceFindGlyph(idx, instance, &instance->glyphs, &instance->available, - &found, &segment, &offset)) - !=Successful) - return xrc; + &found, &segment, &offset); + if(xrc != Successful) + return xrc; - if(!found) { - *metrics=0; - return Successful; - } + if(!found) { + *metrics = 0; + return Successful; + } - if(instance->available[segment][offset]==0) { - if(instance->monospaced<2) { /* not a charcell instance */ - if((xrc=FreeTypeInstanceGetGlyph(idx, &g, instance))!=Successful) - return xrc; - } else { - memcpy((char*)&instance->glyphs[segment][offset].metrics, - (char*)instance->charcellMetrics, - sizeof(xCharInfo)); - instance->available[segment][offset]=2; - } - } - - if(instance->available[segment][offset]>=2) { - *metrics=&instance->glyphs[segment][offset].metrics; - } else - *metrics=0; - - return Successful; + if(instance->available[segment][offset] == 0) { + if(instance->monospaced < FT_CHARCELL) { + xrc = FreeTypeInstanceGetGlyph(idx, &g, instance); + if(xrc != Successful) + return xrc; + } else { + memcpy((char*)&instance->glyphs[segment][offset].metrics, + (char*)instance->charcellMetrics, + sizeof(xCharInfo)); + instance->available[segment][offset] = FT_AVAILABLE_YES; + } + } + + if(instance->available[segment][offset] >= FT_AVAILABLE_YES) { + *metrics = &instance->glyphs[segment][offset].metrics; + } else + *metrics = 0; + + return Successful; } int -FreeTypeRasteriseGlyph(CharInfoPtr tgp, TTFInstance *instance, +FreeTypeRasteriseGlyph(CharInfoPtr tgp, FTInstancePtr instance, int hasMetrics) { #define TRANSFORM_X(x_value) \ @@ -566,136 +558,134 @@ (TWO_SIXTEENTH*TWO_SIXTH))+0.5)) #define TRANSFORM_X_RAW(value) \ - ((int)floor((double)(value)/instance->transformation.scale/TWO_SIXTH/(instance->imetrics.x_resolution/72.0)*1000.0+0.5)) + ((int)floor((double)(value)/instance->transformation.scale/TWO_SIXTH/(smetrics.x_ppem/72.0)*1000.0+0.5)) + + FTFacePtr face; + FT_Bitmap *bitmap; + char *raster = NULL; + FT_Size_Metrics smetrics; + FT_Glyph_Metrics *metrics; + int wd, ht, bpr; /* width, height, bytes per row */ + int dx, dy; + int leftSideBearing, rightSideBearing, characterWidth, rawCharacterWidth, + ascent, descent; + int i = 0, j; + + face = instance->face; + smetrics = instance->size->metrics; + + FreeTypeActivateInstance(instance); + + metrics = &face->face->glyph->metrics; + bitmap = &face->face->glyph->bitmap; + + if(hasMetrics) { + wd = tgp->metrics.rightSideBearing - tgp->metrics.leftSideBearing; + ht = tgp->metrics.ascent + tgp->metrics.descent; + dx = -tgp->metrics.leftSideBearing + + TRANSFORM_X(metrics->horiBearingX); + dy = tgp->metrics.ascent - TRANSFORM_Y(metrics->horiBearingY); + } else { + wd = bitmap->width; + ht = bitmap->rows; + dx = 0; + dy = 0; + /* The X convention is to consider a character with an empty + * bounding box as undefined. This convention is broken. */ + if(wd <= 0) wd = 1; + if(ht <= 0) ht = 1; + } + + /* Make sure rounding doesn't cause a crash in memcpy below */ + if(wd < bitmap->width) + wd = bitmap->width; + if(ht < bitmap->rows) + ht = bitmap->rows; + + bpr = (((wd + (instance->bmfmt.glyph<<3) - 1) >> 3) & + -instance->bmfmt.glyph); + if(tgp) { + raster = (char*)xalloc(ht * bpr); + if(raster == NULL) + return AllocError; + memset(raster, 0, ht * bpr); + } - TTFFace *face; - TT_Raster_Map raster; - TT_Glyph_Metrics metrics; - TT_Outline outline; - TT_BBox outline_bbox, *bbox; - int ftrc; - short xoff, yoff, xoff_pixels, yoff_pixels; - int wd, ht, bpr; /* width, height, bytes per row */ - int leftSideBearing, rightSideBearing, characterWidth, rawCharacterWidth, - ascent, descent; - int i=0; - - face=instance->face; - - TT_Get_Glyph_Metrics(face->glyph, &metrics); - if(instance->transformation.nonIdentity) { - TT_Get_Glyph_Outline(face->glyph, &outline); - TT_Transform_Outline(&outline, &instance->transformation.matrix); - TT_Get_Outline_BBox(&outline, &outline_bbox); - bbox=&outline_bbox; - } else { - bbox=&metrics.bbox; - } - - if(hasMetrics) { - xoff=-tgp->metrics.leftSideBearing<<6; - yoff=tgp->metrics.descent<<6; - wd=tgp->metrics.rightSideBearing - tgp->metrics.leftSideBearing; - ht=tgp->metrics.ascent + tgp->metrics.descent; - } else { - xoff=(63-bbox->xMin) & -64; - yoff=(63-bbox->yMin) & -64; - wd=(bbox->xMax+63+xoff) >> 6; - ht=(bbox->yMax+63+yoff) >> 6; - - /* The X convention is to consider a character with an empty - * bounding box as undefined. This convention is broken. */ - if(wd<=0) wd=1; - if(ht<=0) ht=1; - } - - /* Compute the number of bytes per row. */ - bpr=((wd+(instance->bmfmt.glyph<<3)-1)>>3) & -instance->bmfmt.glyph; - if(tgp) { - raster.flow = TT_Flow_Down; - raster.rows=ht; - raster.width=wd; - raster.cols=bpr; - raster.size = (long)raster.rows*raster.cols; - raster.bitmap = (void*)xalloc(ht*raster.cols); - if(raster.bitmap==NULL) return AllocError; - memset(raster.bitmap,0,(int)raster.size); - - ftrc=TT_Get_Glyph_Bitmap(face->glyph,&raster,xoff,yoff); - if(ftrc) { - MUMBLE("Failed to draw bitmap\n"); - /* Ignore error, return blank bitmap */ - } - tgp->bits=raster.bitmap; - - if(instance->bmfmt.bit==LSBFirst) { - BitOrderInvert((unsigned char*)(tgp->bits)+i*ht*bpr, ht*bpr); - } - - if(instance->bmfmt.byte!=instance->bmfmt.bit) - switch(instance->bmfmt.scan) { - case 1: - break; - case 2: - TwoByteSwap((unsigned char*)(tgp->bits)+i*ht*bpr, ht*bpr); - break; - case 4: - FourByteSwap((unsigned char*)(tgp->bits)+i*ht*bpr, ht*bpr); - break; - case 8: /* no util function for 64 bits! */ - { - int j,k; - char c, *cp=tgp->bits+i*ht*bpr; - for(j=ht*bpr; j>=0; j-=8, cp+=8) - for(k=0; k<4; k++) { - c=cp[k]; - cp[k]=cp[7-k]; - cp[7-k]=cp[k]; + if(dx == 0 && dy == 0 && bpr == bitmap->pitch) { + memcpy(raster, bitmap->buffer, bitmap->rows * bitmap->pitch); + } else if(dx == 0) { + for(i = MAX(0, -dy); i < bitmap->rows && i + dy < ht; i++) + memcpy(raster + (i + dy) * bpr, + bitmap->buffer + i * bitmap->pitch, + bitmap->pitch); + } else { + for(i = MAX(0, -dy); i < bitmap->rows && i + dy < ht; i++) { + for(j = MAX(0, -dx); j < bitmap->width && j + dx < wd; j++) { + int set; + set = (bitmap->buffer[i * bitmap->pitch + j / 8] & + 1 << (7 - j % 8)); + if(set) + raster[(i + dy) * bpr + (j + dx) / 8] |= + 1 << (7 - (j + dx) % 8); } } - break; - default: - ; - } - - } - - if(!hasMetrics) { - xoff_pixels = xoff>>6; - yoff_pixels = yoff>>6; - - /* Determine the glyph metrics. */ - leftSideBearing = -xoff_pixels; - rightSideBearing = wd - xoff_pixels; + } + + tgp->bits = raster; - characterWidth = TRANSFORM_X(metrics.advance); - rawCharacterWidth = TRANSFORM_X_RAW(metrics.advance); + if(instance->bmfmt.bit == LSBFirst) { + BitOrderInvert((unsigned char*)(tgp->bits), ht*bpr); + } - ascent = ht - yoff_pixels; - descent = yoff_pixels; - if(tgp) { - /* Set the glyph metrics. */ - tgp->metrics.attributes = (unsigned short)((short)rawCharacterWidth); - tgp->metrics.leftSideBearing = leftSideBearing; - tgp->metrics.rightSideBearing = rightSideBearing; - tgp->metrics.characterWidth = characterWidth; - tgp->metrics.ascent = ascent; - tgp->metrics.descent = descent; + if(instance->bmfmt.byte != instance->bmfmt.bit) { + switch(instance->bmfmt.scan) { + case 1: + break; + case 2: + TwoByteSwap((unsigned char*)(tgp->bits), ht*bpr); + break; + case 4: + FourByteSwap((unsigned char*)(tgp->bits), ht*bpr); + break; + default: + ; + } + } + + + if(!hasMetrics) { + leftSideBearing = TRANSFORM_X(metrics->horiBearingX); + rightSideBearing = wd + TRANSFORM_X(metrics->horiBearingX); + + characterWidth = TRANSFORM_X(metrics->horiAdvance); + rawCharacterWidth = TRANSFORM_X_RAW(metrics->horiAdvance); + + ascent = TRANSFORM_Y(metrics->horiBearingY); + descent = ht - TRANSFORM_Y(metrics->horiBearingY); + + if(tgp) { + /* Set the glyph metrics. */ + tgp->metrics.attributes = (unsigned short)((short)rawCharacterWidth); + tgp->metrics.leftSideBearing = leftSideBearing; + tgp->metrics.rightSideBearing = rightSideBearing; + tgp->metrics.characterWidth = characterWidth; + tgp->metrics.ascent = ascent; + tgp->metrics.descent = descent; + } } - } - return Successful; + return Successful; #undef TRANSFORM_X #undef TRANSFORM_Y #undef TRANSFORM_X_RAW } static void -FreeTypeFreeFont(TTFFont *font) +FreeTypeFreeFont(FTFontPtr font) { - FreeTypeFreeInstance(font->instance); - if(font->ranges) - xfree(font->ranges); - xfree(font); + FreeTypeFreeInstance(font->instance); + if(font->ranges) + xfree(font->ranges); + xfree(font); } /* Free a font. If freeProps is 0, don't free the properties. */ @@ -703,18 +693,18 @@ static void FreeTypeFreeXFont(FontPtr pFont, int freeProps) { - TTFFont *tf; - - if(pFont) { - if((tf=(TTFFont*)pFont->fontPrivate)) { - FreeTypeFreeFont(tf); - } - if(freeProps && pFont->info.nprops>0) { - xfree(pFont->info.isStringProp); - xfree(pFont->info.props); + FTFontPtr tf; + + if(pFont) { + if((tf = (FTFontPtr)pFont->fontPrivate)) { + FreeTypeFreeFont(tf); + } + if(freeProps && pFont->info.nprops>0) { + xfree(pFont->info.isStringProp); + xfree(pFont->info.props); + } + DestroyFontRec(pFont); } - DestroyFontRec(pFont); - } } @@ -723,129 +713,134 @@ static void FreeTypeUnloadXFont(FontPtr pFont) { - MUMBLE("Unloading\n"); - FreeTypeFreeXFont(pFont, 1); + MUMBLE("Unloading\n"); + FreeTypeFreeXFont(pFont, 1); } /* Add the font properties, including the Font name, the XLFD - * properties, some strings from the font, and various typographical - * data. We only provide data readily available in the tables in the - * font for now, altough FIGURE_WIDTH would be a good idea as it is - * used by Xaw. */ + properties, some strings from the font, and various typographical + data. We only provide data readily available in the tables in the + font for now, altough FIGURE_WIDTH would be a good idea as it is + used by Xaw. */ static int -FreeTypeAddProperties(TTFFont *font, FontScalablePtr vals, FontInfoPtr info, +FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info, char *fontname, int rawAverageWidth) { - int i, j, maxprops; - char *sp, *ep, val[MAXFONTNAMELEN]; - TT_Instance_Metrics imetrics; - int upm = 0; /* units per em */ - TTFFace *face; - TTFInstance *instance; - TTFNormalisedTransformation *trans; - int xlfdProps=0, hheaProps=0, os2Props=0, postProps=0; - - instance=font->instance; - face=instance->face; - trans=&instance->transformation; - - info->nprops=0; /* in case we abort */ - - strcpy(val, fontname); - if(FontParseXLFDName(val, vals, FONT_XLFD_REPLACE_VALUE)) { - xlfdProps=1; - } else { - MUMBLE("Couldn't parse XLFD\n"); - xlfdProps=0; - } - - /* What properties are we going to set? Check what tables there are. */ - if(face->properties.header) { - upm=face->properties.header->Units_Per_EM; - if(face->properties.horizontal) - hheaProps=1; - if(face->properties.os2) - os2Props=1; - if(face->properties.postscript) - postProps=1; - } - - - /* Compute an upper bound on the number of props in order to - * allocate the right size of vector. That's because we use - * wonderfully flexible data structures. */ - maxprops= - 1+ /* NAME */ - (xlfdProps?14:0)+ /* from XLFD */ - (hheaProps?5:0)+ /* from `hhea' table */ - 3+ /* from `name' table */ - (os2Props?6:0)+ /* from `os/2' table */ - (postProps?3:0)+ /* from `post' table */ - 2; /* type */ - - if ((info->props = - (FontPropPtr)xalloc(maxprops * sizeof(FontPropRec))) == 0) - return AllocError; - - if ((info->isStringProp = (char*)xalloc(maxprops)) == 0) { - xfree(info->props); - return AllocError; - } - - memset((char *)info->isStringProp, 0, maxprops); - - /* Add the FONT property as the very first */ - info->props[0].name = MakeAtom("FONT", 4, TRUE); - info->props[0].value = MakeAtom(val, strlen(val), TRUE); - info->isStringProp[0] = 1; - i=1; - - if(*val && *(sp=val+1)) { - for (i = 0, sp=val+1; i < 14; i++) { - /* Locate the next field. */ - if (i == 13) - /* Handle the case of the final field containing a subset - * specification. */ - for (ep = sp; *ep && *ep != '['; ep++); - else - for (ep = sp; *ep && *ep != '-'; ep++); - - /* Create the property name.*/ - info->props[i+1].name = - MakeAtom(xlfd_props[i], strlen(xlfd_props[i]), TRUE); - - switch(i) { - case 6: /* pixel size */ - info->props[i+1].value = - (int)(fabs(vals->pixel_matrix[3])+0.5); - break; - case 7: /* point size */ - info->props[i+1].value = - (int)(fabs(vals->point_matrix[3])*10.0 + 0.5); - break; - case 8: /* resolution x */ - info->props[i+1].value = vals->x; - break; - case 9: /* resolution y */ - info->props[i+1].value = vals->y; - break; - case 11: /* average width */ - info->props[i+1].value = vals->width; - break; - default: /* a string */ - info->props[i+1].value = MakeAtom(sp, ep - sp, TRUE); - info->isStringProp[i+1] = 1; - } - sp = ++ep; + int i, j, maxprops; + char *sp, *ep, val[MAXFONTNAMELEN], *vp; + FTFacePtr face; + FTInstancePtr instance; + FT_Size_Metrics smetrics; + FTNormalisedTransformationPtr trans; + int upm; + TT_OS2 *os2; + TT_Postscript *post; + PS_FontInfoRec t1info_rec, *t1info; + int xlfdProps = 0; + int ftrc; + + instance = font->instance; + face = instance->face; + smetrics = instance->size->metrics; + trans = &instance->transformation; + upm = face->face->units_per_EM; + + os2 = FT_Get_Sfnt_Table(face->face, ft_sfnt_os2); + post = FT_Get_Sfnt_Table(face->face, ft_sfnt_post); + ftrc = FT_Get_PS_Font_Info(face->face, &t1info_rec); + if(ftrc == 0) + t1info = &t1info_rec; + else + t1info = NULL; + + if(t1info) { + os2 = NULL; + post = NULL; + } + + info->nprops = 0; /* in case we abort */ + + strcpy(val, fontname); + if(FontParseXLFDName(val, vals, FONT_XLFD_REPLACE_VALUE)) { + xlfdProps = 1; + } else { + MUMBLE("Couldn't parse XLFD\n"); + xlfdProps = 0; + } + + maxprops= + 1 + /* NAME */ + (xlfdProps ? 14 : 0) + /* from XLFD */ + 8 + + (os2 ? 6 : 0) + + (post || t1info? 3 : 0) + + 2; /* type */ + + info->props = (FontPropPtr)xalloc(maxprops * sizeof(FontPropRec)); + if(info->props == NULL) + return AllocError; + + info->isStringProp = (char*)xalloc(maxprops); + if(info->isStringProp == NULL) { + xfree(info->props); + return AllocError; } + + memset((char *)info->isStringProp, 0, maxprops); + + i = 0; + + info->props[i].name = MakeAtom("FONT", 4, TRUE); + info->props[i].value = MakeAtom(val, strlen(val), TRUE); + info->isStringProp[i] = 1; i++; - } - /* the following two have already been properly scaled */ + if(*val && *(sp = val + 1)) { + for (j = 0, sp = val + 1; j < 14; j++) { + if (j == 13) + /* Handle the case of the final field containing a subset + specification. */ + for (ep = sp; *ep && *ep != '['; ep++); + else + for (ep = sp; *ep && *ep != '-'; ep++); + + info->props[i].name = + MakeAtom(xlfd_props[j], strlen(xlfd_props[j]), TRUE); + + switch(j) { + case 6: /* pixel size */ + info->props[i].value = + (int)(fabs(vals->pixel_matrix[3]) + 0.5); + i++; + break; + case 7: /* point size */ + info->props[i].value = + (int)(fabs(vals->point_matrix[3])*10.0 + 0.5); + i++; + break; + case 8: /* resolution x */ + info->props[i].value = vals->x; + i++; + break; + case 9: /* resolution y */ + info->props[i].value = vals->y; + i++; + break; + case 11: /* average width */ + info->props[i].value = vals->width; + i++; + break; + default: /* a string */ + info->props[i].value = MakeAtom(sp, ep - sp, TRUE); + info->isStringProp[i] = 1; + i++; + } + sp = ++ep; + } + } - if(hheaProps) { info->props[i].name = MakeAtom("RAW_AVERAGE_WIDTH", 17, TRUE); info->props[i].value = rawAverageWidth; i++; @@ -856,7 +851,7 @@ info->props[i].name = MakeAtom("RAW_ASCENT", 15, TRUE); info->props[i].value = - ((double)face->properties.horizontal->Ascender/(double)upm*1000.0); + ((double)face->face->ascender/(double)upm*1000.0); i++; info->props[i].name = MakeAtom("FONT_DESCENT", 12, TRUE); @@ -865,385 +860,443 @@ info->props[i].name = MakeAtom("RAW_DESCENT", 16, TRUE); info->props[i].value = - -((double)face->properties.horizontal->Descender/(double)upm*1000.0); + -((double)face->face->descender/(double)upm*1000.0); i++; - } - if((j=ttf_GetEnglishName(face->face, val, TTF_COPYRIGHT))>0) { - info->props[i].name = MakeAtom("COPYRIGHT", 9, TRUE); - info->props[i].value = MakeAtom(val, j, TRUE); - info->isStringProp[i] = 1; - i++; - } - - if((j=ttf_GetEnglishName(face->face, val, TTF_TYPEFACE))>0) { - info->props[i].name = MakeAtom("FACE_NAME", 9, TRUE); - info->props[i].value = MakeAtom(val, j, TRUE); - info->isStringProp[i] = 1; - i++; - } + j = FTGetEnglishName(face->face, TT_NAME_ID_COPYRIGHT, + val, MAXFONTNAMELEN); + vp = val; + if (j < 0) { + if(t1info && t1info->notice) { + vp = t1info->notice; + j = strlen(vp); + } + } + if(j > 0) { + info->props[i].name = MakeAtom("COPYRIGHT", 9, TRUE); + info->props[i].value = MakeAtom(vp, j, TRUE); + info->isStringProp[i] = 1; + i++; + } + + j = FTGetEnglishName(face->face, TT_NAME_ID_FULL_NAME, + val, MAXFONTNAMELEN); + vp = val; + if (j < 0) { + if(t1info && t1info->full_name) { + vp = t1info->full_name; + j = strlen(vp); + } + } + if(j > 0) { + info->props[i].name = MakeAtom("FACE_NAME", 9, TRUE); + info->props[i].value = MakeAtom(vp, j, TRUE); + info->isStringProp[i] = 1; + i++; + } - if((j=ttf_GetEnglishName(face->face, val, TTF_PSNAME))>0) { - info->props[i].name = MakeAtom("_ADOBE_POSTSCRIPT_FONTNAME", 26, TRUE); - info->props[i].value = MakeAtom(val, j, TRUE); - info->isStringProp[i] = 1; - i++; - } + j = FTGetEnglishName(face->face, TT_NAME_ID_PS_NAME, + val, MAXFONTNAMELEN); + vp = val; + if (j < 0) { + if(t1info && t1info->full_name) { + vp = t1info->full_name; + j = strlen(vp); + } + } + if(j > 0) { + info->props[i].name = MakeAtom("_ADOBE_POSTSCRIPT_FONTNAME", 26, TRUE); + info->props[i].value = MakeAtom(vp, j, TRUE); + info->isStringProp[i] = 1; + i++; + } /* These macros handle the case of a diagonal matrix. They convert - * FUnits into pixels. */ + FUnits into pixels. */ #define TRANSFORM_FUNITS_X(xval) \ ((int) \ floor((((double)(xval)/(double)upm) * \ - ((double)trans->matrix.xx/TWO_SIXTEENTH)*(double)imetrics.x_ppem)+\ + ((double)trans->matrix.xx/TWO_SIXTEENTH)*(double)smetrics.x_ppem)+\ 0.5)) #define TRANSFORM_FUNITS_Y(yval) \ ((int) \ floor((((double)(yval)/(double)upm) * \ - ((double)trans->matrix.yy/TWO_SIXTEENTH) * (double)imetrics.y_ppem)+\ + ((double)trans->matrix.yy/TWO_SIXTEENTH) * (double)smetrics.y_ppem)+\ 0.5)) /* In what follows, we assume the matrix is diagonal. In the rare - * case when it is not, the values will be somewhat wrong. */ + case when it is not, the values will be somewhat wrong. */ - if(TT_Get_Instance_Metrics(instance->instance, &imetrics)==0) { - if(os2Props) { - info->props[i].name = MakeAtom("SUBSCRIPT_SIZE",14,TRUE); - info->props[i].value = - TRANSFORM_FUNITS_Y(face->properties.os2->ySubscriptYSize); - i++; - info->props[i].name = MakeAtom("SUBSCRIPT_X",11,TRUE); - info->props[i].value = - TRANSFORM_FUNITS_X(face->properties.os2->ySubscriptXOffset); - i++; - info->props[i].name = MakeAtom("SUBSCRIPT_Y",11,TRUE); - info->props[i].value = - TRANSFORM_FUNITS_Y(face->properties.os2->ySubscriptYOffset); - i++; - info->props[i].name = MakeAtom("SUPERSCRIPT_SIZE",16,TRUE); - info->props[i].value = - TRANSFORM_FUNITS_Y(face->properties.os2->ySuperscriptYSize); - i++; - info->props[i].name = MakeAtom("SUPERSCRIPT_X",13,TRUE); - info->props[i].value = - TRANSFORM_FUNITS_X(face->properties.os2->ySuperscriptXOffset); - i++; - info->props[i].name = MakeAtom("SUPERSCRIPT_Y",13,TRUE); - info->props[i].value = - TRANSFORM_FUNITS_Y(face->properties.os2->ySuperscriptYOffset); - i++; - } - if(postProps) { - long underlineThickness, underlinePosition; - /* tk uses the following two */ - info->props[i].name = MakeAtom("UNDERLINE_THICKNESS",19,TRUE); - underlineThickness= - TRANSFORM_FUNITS_Y(face->properties.postscript->underlineThickness); - if(underlineThickness<=0) - underlineThickness=1; - info->props[i].value = underlineThickness; - i++; - info->props[i].name = MakeAtom("UNDERLINE_POSITION",18,TRUE); - /* PostScript and X use opposite conventions */ - underlinePosition= - TRANSFORM_FUNITS_Y(-face->properties.postscript->underlinePosition); - info->props[i].value = underlinePosition; - i++; - if(trans->matrix.xx == trans->matrix.yy) { - info->props[i].name = MakeAtom("ITALIC_ANGLE",12,TRUE); + if(os2) { + info->props[i].name = MakeAtom("SUBSCRIPT_SIZE",14,TRUE); + info->props[i].value = + TRANSFORM_FUNITS_Y(os2->ySubscriptYSize); + i++; + info->props[i].name = MakeAtom("SUBSCRIPT_X",11,TRUE); + info->props[i].value = + TRANSFORM_FUNITS_X(os2->ySubscriptXOffset); + i++; + info->props[i].name = MakeAtom("SUBSCRIPT_Y",11,TRUE); + info->props[i].value = + TRANSFORM_FUNITS_Y(os2->ySubscriptYOffset); + i++; + info->props[i].name = MakeAtom("SUPERSCRIPT_SIZE",16,TRUE); + info->props[i].value = + TRANSFORM_FUNITS_Y(os2->ySuperscriptYSize); + i++; + info->props[i].name = MakeAtom("SUPERSCRIPT_X",13,TRUE); + info->props[i].value = + TRANSFORM_FUNITS_X(os2->ySuperscriptXOffset); + i++; + info->props[i].name = MakeAtom("SUPERSCRIPT_Y",13,TRUE); info->props[i].value = - /* Convert from TT_Fixed to - * 64th of a degree counterclockwise from 3 o'clock */ - 90*64+(face->properties.postscript->italicAngle>>10); + TRANSFORM_FUNITS_Y(os2->ySuperscriptYOffset); i++; - } } + + if(post || t1info) { + int underlinePosition, underlineThickness; + + if(post) { + underlinePosition = TRANSFORM_FUNITS_Y(post->underlinePosition); + underlineThickness = TRANSFORM_FUNITS_Y(post->underlineThickness); + } else { + underlinePosition = + TRANSFORM_FUNITS_Y(t1info->underline_position); + underlineThickness = + TRANSFORM_FUNITS_Y(t1info->underline_thickness); + } + if(underlineThickness <= 0) + underlineThickness = 1; + + info->props[i].name = MakeAtom("UNDERLINE_THICKNESS",19,TRUE); + info->props[i].value = underlineThickness; + i++; + + info->props[i].name = MakeAtom("UNDERLINE_POSITION",18,TRUE); + info->props[i].value = underlinePosition; + i++; + + /* The italic angle is often unreliable for Type 1 fonts */ + if(post && trans->matrix.xx == trans->matrix.yy) { + info->props[i].name = MakeAtom("ITALIC_ANGLE",12,TRUE); + info->props[i].value = + /* Convert from TT_Fixed to + 64th of a degree counterclockwise from 3 o'clock */ + 90*64+(post->italicAngle >> 10); + i++; + } #undef TRANSFORM_FUNITS_X #undef TRANSFORM_FUNITS_Y - } - - info->props[i].name = MakeAtom("FONT_TYPE", 9, TRUE); - info->props[i].value = MakeAtom("TrueType", 8, TRUE); - i++; + } - info->props[i].name = MakeAtom("RASTERIZER_NAME", 15, TRUE); - info->props[i].value = MakeAtom("FreeType", 8, TRUE); - i++; + info->props[i].name = MakeAtom("FONT_TYPE", 9, TRUE); + vp = (char *)FT_Get_X11_Font_Format(face->face); + info->props[i].value = MakeAtom(vp, strlen(vp), TRUE); + info->isStringProp[i] = 1; + i++; + + info->props[i].name = MakeAtom("RASTERIZER_NAME", 15, TRUE); + info->props[i].value = MakeAtom("FreeType", 10, TRUE); + info->isStringProp[i] = 1; + i++; + + info->nprops = i; + return Successful; +} - info->nprops=i; - return Successful; +static int +FreeTypeFontGetGlyph(unsigned code, CharInfoPtr *g, FTFontPtr font) +{ + unsigned idx; + int i; + + /* As a special case, we pass 0 even when it is not in the ranges; + this will allow for the default glyph, which should exist in any + TrueType font. */ + + if(code > 0 && font->nranges) { + for(i = 0; i < font->nranges; i++) + if((code >= + font->ranges[i].min_char_low+ + (font->ranges[i].min_char_high<<8)) && + (code <= + font->ranges[i].max_char_low + + (font->ranges[i].max_char_high<<8))) + break; + if(i == font->nranges) { + *g = 0; + return Successful; + } + } + + idx = FTRemap(font->instance->face->face, &font->mapping, code); + + /* Only pass the default glyph if there is no first index */ + if(idx == 0 && + (code != 0 || + (font->mapping.mapping && + (font->mapping.mapping->encoding->first != 0 || + font->mapping.mapping->encoding->first_col != 0)))) { + *g = 0; + return Successful; + } else { + return FreeTypeInstanceGetGlyph(idx, g, font->instance); + } } static int -FreeTypeFontGetGlyph(unsigned code, CharInfoPtr *g, TTFFont *font) +FreeTypeFontGetGlyphMetrics(unsigned code, xCharInfo **metrics, FTFontPtr font) { - unsigned idx; - int i; + unsigned idx; + int i; - /* As a special case, we pass 0 even when it is not in the ranges; - * this will allow for the default glyph, which should exist in any - * TrueType font. */ + /* As a special case, we pass 0 even when it is not in the ranges; + this will allow for the default glyph, which should exist in any + TrueType font. */ - if(code>0 && font->nranges) { - for(i=0; inranges; i++) - if((code >= - font->ranges[i].min_char_low+ - (font->ranges[i].min_char_high<<8)) && - (code <= - font->ranges[i].max_char_low+(font->ranges[i].max_char_high<<8))) - break; - if(i==font->nranges) { - *g=0; - return Successful; + if(code>0 && font->nranges) { + for(i = 0; i < font->nranges; i++) + if((code >= + font->ranges[i].min_char_low+ + (font->ranges[i].min_char_high<<8)) && + (code <= + font->ranges[i].max_char_low+(font->ranges[i].max_char_high<<8))) + break; + if(i == font->nranges) { + *metrics = 0; + return Successful; + } } - } - - idx=ttf_remap(code, &font->mapping); - - /* Only pass the default glyph if there is no first index */ - if(idx==0 && - (code != 0 || - (font->mapping.mapping && - (font->mapping.mapping->encoding->first != 0 || - font->mapping.mapping->encoding->first_col != 0)))) { - *g=0; - return Successful; - } else { - return FreeTypeInstanceGetGlyph(idx, g, font->instance); - } -} + + idx = FTRemap(font->instance->face->face, &font->mapping, code); -static int -FreeTypeFontGetGlyphMetrics(unsigned code, xCharInfo **metrics, TTFFont *font) -{ - unsigned idx; - int i; - - /* As a special case, we pass 0 even when it is not in the ranges; - * this will allow for the default glyph, which should exist in any - * TrueType font. */ - - if(code>0 && font->nranges) { - for(i=0; inranges; i++) - if((code >= - font->ranges[i].min_char_low+ - (font->ranges[i].min_char_high<<8)) && - (code <= - font->ranges[i].max_char_low+(font->ranges[i].max_char_high<<8))) - break; - if(i==font->nranges) { - *metrics=0; - return Successful; - } - } - - idx=ttf_remap(code, &font->mapping); - - if(idx==0 && - (code!=0 || - (font->mapping.mapping && - (font->mapping.mapping->encoding->first != 0 || - font->mapping.mapping->encoding->first_col != 0)))) { - *metrics=0; - return Successful; - } else { - return FreeTypeInstanceGetGlyphMetrics(idx, metrics, font->instance); - } + if(idx == 0 && + (code != 0 || + (font->mapping.mapping && + (font->mapping.mapping->encoding->first != 0 || + font->mapping.mapping->encoding->first_col != 0)))) { + *metrics = 0; + return Successful; + } else { + return FreeTypeInstanceGetGlyphMetrics(idx, metrics, font->instance); + } } static int -FreeTypeFontGetDefaultGlyph(CharInfoPtr *g, TTFFont *font) +FreeTypeFontGetDefaultGlyph(CharInfoPtr *g, FTFontPtr font) { - /* Disable default glyph generation if there is a first index */ - if(font->mapping.mapping && - (font->mapping.mapping->encoding->first || - font->mapping.mapping->encoding->first_col)) { - *g=0; - return Successful; - } + /* Disable default glyph generation if there is a first index */ + if(font->mapping.mapping && + (font->mapping.mapping->encoding->first || + font->mapping.mapping->encoding->first_col)) { + *g = 0; + return Successful; + } - /* Using FreeTypeInstanceGetGlyph(0,...) would cause inconsistencies - * between metrics and glyphs in the unlikely case that 0 is not - * mapped to 0. */ - return FreeTypeFontGetGlyph(0, g, font); + /* Using FreeTypeInstanceGetGlyph(0,...) would cause inconsistencies + between metrics and glyphs in the unlikely case that 0 is not + mapped to 0. */ + return FreeTypeFontGetGlyph(0, g, font); } static int -FreeTypeLoadFont(TTFFont **fontp, char *fileName, +FreeTypeLoadFont(FTFontPtr *font_return, char *fileName, FontScalablePtr vals, FontEntryPtr entry, - FontBitmapFormat *bmfmt) + FontBitmapFormatPtr bmfmt) { - int xrc; - TTFFont *font; - TTFNormalisedTransformation trans; - int charcell; - - if((font=(TTFFont*)xalloc(sizeof(TTFFont)))==NULL) - return AllocError; - - /* Compute the transformation matrix. We use floating-point - * arithmetic for simplicity */ - - trans.xres=vals->x; - trans.yres=vals->y; - - /* This value cannot be 0. */ - trans.scale=MAX(hypot(vals->point_matrix[0],vals->point_matrix[2]), - hypot(vals->point_matrix[1],vals->point_matrix[3])); - trans.nonIdentity=0; - - /* Try to round stuff. We want approximate zeros to be exact zeros, - and if the elements on the diagonal are approximately equal, we - want them equal. We do this to avoid breaking hinting. */ - if(DIFFER(vals->point_matrix[0], vals->point_matrix[3])) { - trans.nonIdentity=1; - trans.matrix.xx= - (int)((vals->point_matrix[0]*(double)TWO_SIXTEENTH)/trans.scale); - trans.matrix.yy= - (int)((vals->point_matrix[3]*(double)TWO_SIXTEENTH)/trans.scale); - } else { - trans.matrix.xx=trans.matrix.yy= - ((vals->point_matrix[0]+vals->point_matrix[3])/2* - (double)TWO_SIXTEENTH)/trans.scale; - } - - if(DIFFER0(vals->point_matrix[1], trans.scale)) { - trans.matrix.yx= - (int)((vals->point_matrix[1]*(double)TWO_SIXTEENTH)/trans.scale); - trans.nonIdentity=1; - } else - trans.matrix.yx=0; - - if(DIFFER0(vals->point_matrix[2], trans.scale)) { - trans.matrix.xy= - (int)((vals->point_matrix[2]*(double)TWO_SIXTEENTH)/trans.scale); - trans.nonIdentity=1; - } else - trans.matrix.xy=0; - - /* Check for charcell in XLFD */ - charcell=0; - if(entry->name.ndashes==14) { - char *p; - int dashes=0; - for(p=entry->name.name; p<=entry->name.name+entry->name.length-2; p++) { - if(*p=='-') { - dashes++; - if(dashes==11) { - if(p[1]=='c' && p[2]=='-') - charcell=1; - break; - } - } - } - } - - if((xrc=FreeTypeOpenInstance(&font->instance, fileName, - &trans, charcell, bmfmt)) - !=Successful) - return xrc; + int xrc; + FTFontPtr font; + FTNormalisedTransformationRec trans; + int charcell; + + font = (FTFontPtr)xalloc(sizeof(FTFontRec)); + if(font == NULL) + return AllocError; - if(entry->name.ndashes==14) { - if(ttf_pick_cmap(entry->name.name, entry->name.length, fileName, - font->instance->face->face, &font->mapping)) - return BadFontFormat; - } else { - if(ttf_pick_cmap(0, 0, fileName, - font->instance->face->face, &font->mapping)) - return BadFontFormat; - } - - - font->nranges=vals->nranges; - font->ranges=0; - if(font->nranges) { - if((font->ranges=(fsRange*)xalloc(vals->nranges*sizeof(fsRange))) - ==NULL) { - FreeTypeFreeFont(font); - return AllocError; - } - memcpy((char*)font->ranges, (char*)vals->ranges, - vals->nranges*sizeof(fsRange)); - } - *fontp=font; + /* Compute the transformation matrix. We use floating-point + arithmetic for simplicity */ + + trans.xres = vals->x; + trans.yres = vals->y; + + /* This value cannot be 0. */ + trans.scale = MAX(hypot(vals->point_matrix[0], vals->point_matrix[2]), + hypot(vals->point_matrix[1], vals->point_matrix[3])); + trans.nonIdentity = 0; + + /* Try to round stuff. We want approximate zeros to be exact zeros, + and if the elements on the diagonal are approximately equal, we + want them equal. We do this to avoid breaking hinting. */ + if(DIFFER(vals->point_matrix[0], vals->point_matrix[3])) { + trans.nonIdentity = 1; + trans.matrix.xx = + (int)((vals->point_matrix[0]*(double)TWO_SIXTEENTH)/trans.scale); + trans.matrix.yy = + (int)((vals->point_matrix[3]*(double)TWO_SIXTEENTH)/trans.scale); + } else { + trans.matrix.xx = trans.matrix.yy = + ((vals->point_matrix[0] + vals->point_matrix[3])/2* + (double)TWO_SIXTEENTH)/trans.scale; + } + + if(DIFFER0(vals->point_matrix[1], trans.scale)) { + trans.matrix.yx = + (int)((vals->point_matrix[1]*(double)TWO_SIXTEENTH)/trans.scale); + trans.nonIdentity = 1; + } else + trans.matrix.yx = 0; + + if(DIFFER0(vals->point_matrix[2], trans.scale)) { + trans.matrix.xy = + (int)((vals->point_matrix[2]*(double)TWO_SIXTEENTH)/trans.scale); + trans.nonIdentity = 1; + } else + trans.matrix.xy=0; + + /* Check for charcell in XLFD */ + charcell = 0; + if(entry->name.ndashes == 14) { + char *p; + int dashes = 0; + for(p = entry->name.name; + p <= entry->name.name + entry->name.length - 2; + p++) { + if(*p == '-') { + dashes++; + if(dashes == 11) { + if(p[1]=='c' && p[2]=='-') + charcell=1; + break; + } + } + } + } + + xrc = FreeTypeOpenInstance(&font->instance, + fileName, &trans, charcell, bmfmt); + if(xrc != Successful) + return xrc; + + if(entry->name.ndashes == 14) { + if(FTPickMapping(entry->name.name, entry->name.length, fileName, + font->instance->face->face, &font->mapping)) + return BadFontFormat; + } else { + if(FTPickMapping(0, 0, fileName, + font->instance->face->face, &font->mapping)) + return BadFontFormat; + } + - return Successful; + font->nranges = vals->nranges; + font->ranges = 0; + if(font->nranges) { + font->ranges = (fsRange*)xalloc(vals->nranges*sizeof(fsRange)); + if(font->ranges == NULL) { + FreeTypeFreeFont(font); + return AllocError; + } + memcpy((char*)font->ranges, (char*)vals->ranges, + vals->nranges*sizeof(fsRange)); + } + *font_return = font; + + return Successful; } /* Given a BBox in FUnits, return a transformed BBox in pixels */ static void -transformBBox(TTFNormalisedTransformation *transformation, +transformBBox(FTNormalisedTransformationPtr transformation, int upm, int x_ppem, int y_ppem, int x1, int y1, int x2, int y2, int *tx1p, int *ty1p, int *tx2p, int *ty2p) { - double - xx1, yy1, xx2, yy2, - tx11, ty11, tx12, ty12, tx21, ty21, tx22, ty22, - tx1, ty1, tx2, ty2; - - /* Convert arguments to EM units */ - - xx1=((double)x1/(double)upm); - yy1=((double)y1/(double)upm); - xx2=((double)x2/(double)upm); - yy2=((double)y2/(double)upm); - - /* Apply transformation matrix */ - - if(!transformation->nonIdentity) { - tx1=xx1; - ty1=yy1; - tx2=xx2; - ty2=yy2; - } else { - /* Not an identity matrix, need to compute images of all corners */ - tx11= - (transformation->matrix.xx/TWO_SIXTEENTH)*xx1 + - (transformation->matrix.xy/TWO_SIXTEENTH)*yy1; - ty11= - (transformation->matrix.yx/TWO_SIXTEENTH)*xx1 + - (transformation->matrix.yy/TWO_SIXTEENTH)*yy1; - tx12= - (transformation->matrix.xx/TWO_SIXTEENTH)*xx1 + - (transformation->matrix.xy/TWO_SIXTEENTH)*yy2; - ty12= - (transformation->matrix.yx/TWO_SIXTEENTH)*xx1 + - (transformation->matrix.yy/TWO_SIXTEENTH)*yy2; - tx21= - (transformation->matrix.xx/TWO_SIXTEENTH)*xx2 + - (transformation->matrix.xy/TWO_SIXTEENTH)*yy1; - ty21= - (transformation->matrix.yx/TWO_SIXTEENTH)*xx2 + - (transformation->matrix.yy/TWO_SIXTEENTH)*yy1; - tx22= - (transformation->matrix.xx/TWO_SIXTEENTH)*xx2 + - (transformation->matrix.xy/TWO_SIXTEENTH)*yy2; - ty22= - (transformation->matrix.yx/TWO_SIXTEENTH)*xx2 + - (transformation->matrix.yy/TWO_SIXTEENTH)*yy2; - - /* Compute the corners of the new bounding box */ - - tx1=MIN(MIN(tx11,tx12),MIN(tx21,tx22)); - ty1=MIN(MIN(ty11,ty12),MIN(ty21,ty22)); - tx2=MAX(MAX(tx11,tx12),MAX(tx21,tx22)); - ty2=MAX(MAX(ty11,ty12),MAX(ty21,ty22)); - } - - - /* Convert to device space */ - *tx1p=(int)floor(tx1*(double)x_ppem); - *ty1p=(int)floor(ty1*(double)y_ppem); - *tx2p=(int)ceil(tx2*(double)x_ppem); - *ty2p=(int)ceil(ty2*(double)y_ppem); - - /* Ensure the resulting bounding box is not empty */ - if(*tx1p==*tx2p) - (*tx2p)++; - if(*ty1p==*ty2p) - (*ty2p)++; + double + xx1, yy1, xx2, yy2, + tx11, ty11, tx12, ty12, tx21, ty21, tx22, ty22, + tx1, ty1, tx2, ty2; + + /* Convert arguments to EM units */ + + xx1 = ((double)x1/(double)upm); + yy1 = ((double)y1/(double)upm); + xx2 = ((double)x2/(double)upm); + yy2 = ((double)y2/(double)upm); + + /* Apply transformation matrix */ + + if(!transformation->nonIdentity) { + tx1 = xx1; + ty1 = yy1; + tx2 = xx2; + ty2 = yy2; + } else { + /* Not an identity matrix, need to compute images of all corners */ + tx11 = + (transformation->matrix.xx/TWO_SIXTEENTH)*xx1 + + (transformation->matrix.xy/TWO_SIXTEENTH)*yy1; + ty11 = + (transformation->matrix.yx/TWO_SIXTEENTH)*xx1 + + (transformation->matrix.yy/TWO_SIXTEENTH)*yy1; + tx12 = + (transformation->matrix.xx/TWO_SIXTEENTH)*xx1 + + (transformation->matrix.xy/TWO_SIXTEENTH)*yy2; + ty12 = + (transformation->matrix.yx/TWO_SIXTEENTH)*xx1 + + (transformation->matrix.yy/TWO_SIXTEENTH)*yy2; + tx21 = + (transformation->matrix.xx/TWO_SIXTEENTH)*xx2 + + (transformation->matrix.xy/TWO_SIXTEENTH)*yy1; + ty21 = + (transformation->matrix.yx/TWO_SIXTEENTH)*xx2 + + (transformation->matrix.yy/TWO_SIXTEENTH)*yy1; + tx22 = + (transformation->matrix.xx/TWO_SIXTEENTH)*xx2 + + (transformation->matrix.xy/TWO_SIXTEENTH)*yy2; + ty22 = + (transformation->matrix.yx/TWO_SIXTEENTH)*xx2 + + (transformation->matrix.yy/TWO_SIXTEENTH)*yy2; + + /* Compute the corners of the new bounding box */ + + tx1 = MIN(MIN(tx11,tx12),MIN(tx21,tx22)); + ty1 = MIN(MIN(ty11,ty12),MIN(ty21,ty22)); + tx2 = MAX(MAX(tx11,tx12),MAX(tx21,tx22)); + ty2 = MAX(MAX(ty11,ty12),MAX(ty21,ty22)); + } + + + /* Convert to device space */ + *tx1p = (int)floor(tx1*(double)x_ppem); + *ty1p = (int)floor(ty1*(double)y_ppem); + *tx2p = (int)ceil(tx2*(double)x_ppem); + *ty2p = (int)ceil(ty2*(double)y_ppem); + + /* Ensure the resulting bounding box is not empty */ + if(*tx1p == *tx2p) + (*tx2p)++; + if(*ty1p == *ty2p) + (*ty2p)++; +} + +static int +is_fixed_width(FT_Face face) +{ + PS_FontInfoRec t1info_rec; + int ftrc; + + if(FT_IS_FIXED_WIDTH(face)) { + return 1; + } + + ftrc = FT_Get_PS_Font_Info(face, &t1info_rec); + if(ftrc == 0 && t1info_rec.is_fixed_pitch) { + return 1; + } + + return 0; } /* Do all the real work for OpenFont or FontInfo */ @@ -1251,33 +1304,33 @@ static int FreeTypeLoadXFont(char *fileName, - FontScalablePtr vals, FontPtr xf, FontInfoPtr info, - FontBitmapFormat *bmfmt, FontEntryPtr entry) + FontScalablePtr vals, FontPtr xf, FontInfoPtr info, + FontBitmapFormatPtr bmfmt, FontEntryPtr entry) { #define TRANSFORM_FUNITS_X(xval) \ ((int) \ floor((((double)(xval)/(double)upm) * \ - ((double)instance->transformation.matrix.xx/TWO_SIXTEENTH)*(double)imetrics.x_ppem)+0.5)) + ((double)instance->transformation.matrix.xx/TWO_SIXTEENTH)*(double)smetrics.x_ppem)+0.5)) #define TRANSFORM_FUNITS_X_DOWN(xval) \ ((int) \ floor((((double)(xval)/(double)upm) * \ - ((double)instance->transformation.matrix.xx/TWO_SIXTEENTH)*(double)imetrics.x_ppem))) + ((double)instance->transformation.matrix.xx/TWO_SIXTEENTH)*(double)smetrics.x_ppem))) #define TRANSFORM_FUNITS_X_UP(xval) \ ((int) \ ceil((((double)(xval)/(double)upm) * \ - ((double)instance->transformation.matrix.xx/TWO_SIXTEENTH)*(double)imetrics.x_ppem))) + ((double)instance->transformation.matrix.xx/TWO_SIXTEENTH)*(double)smetrics.x_ppem))) #define TRANSFORM_FUNITS_Y(yval) \ ((int) \ floor((((double)(yval)/(double)upm) * \ - ((double)instance->transformation.matrix.yy/TWO_SIXTEENTH)*(double)imetrics.x_ppem)+0.5)) + ((double)instance->transformation.matrix.yy/TWO_SIXTEENTH)*(double)smetrics.x_ppem)+0.5)) #define TRANSFORM_FUNITS_Y_DOWN(yval) \ ((int) \ floor((((double)(yval)/(double)upm) * \ - ((double)instance->transformation.matrix.yy/TWO_SIXTEENTH) * (double)imetrics.y_ppem))) + ((double)instance->transformation.matrix.yy/TWO_SIXTEENTH) * (double)smetrics.y_ppem))) #define TRANSFORM_FUNITS_Y_UP(yval) \ ((int) \ ceil((((double)(yval)/(double)upm) * \ - ((double)instance->transformation.matrix.yy/TWO_SIXTEENTH) * (double)imetrics.y_ppem))) + ((double)instance->transformation.matrix.yy/TWO_SIXTEENTH) * (double)smetrics.y_ppem))) #define TRANSFORM_FUNITS_RAW(value) \ ((long) \ floor(((double)(value)/(double)upm) * 1000.0 + 0.5)) @@ -1289,177 +1342,164 @@ ceil(((double)(value)/(double)upm) * 1000.0)) - TTFFont *font; - TTFInstance *instance; - TT_Instance_Metrics imetrics; - TTFFace *face; - TT_Face_Properties *properties; - int xrc, ftrc, i; - int charcell, constantWidth; - long rawWidth, rawAverageWidth, aw, code, lastCode, firstCode; - int upm, minLsb, maxRsb, ascent, descent, width, averageWidth; + FTFontPtr font; + FTInstancePtr instance; + FT_Size_Metrics smetrics; + FTFacePtr face; + int xrc, i; + int charcell, constantWidth; + long rawWidth, rawAverageWidth, aw, code, lastCode, firstCode; + int upm, minLsb, maxRsb, ascent, descent, width, averageWidth; - if((xrc=FreeTypeLoadFont(&font, fileName, vals, entry, bmfmt)) - !=Successful) - return xrc; + xrc = FreeTypeLoadFont(&font, fileName, vals, entry, bmfmt); + if(xrc != Successful) + return xrc; - instance=font->instance; - face=instance->face; - properties=&face->properties; - - if((ftrc=TT_Get_Instance_Metrics(instance->instance, &imetrics))) { - FreeTypeFreeFont(font); - return FTtoXReturnCode(ftrc); - } - - if(!properties->header || !properties->horizontal) { - FreeTypeFreeFont(font); - return BadFontFormat; - } - - upm = properties->header->Units_Per_EM; - charcell=(instance->monospaced==2); - constantWidth= charcell || - (properties->postscript && properties->postscript->isFixedPitch); - if(constantWidth && instance->monospaced==0) - instance->monospaced=1; - - /* There's no way to get the average width right without rasterising - * all of the glyphs. We make a serious attempt at getting it right - * for monospaced fonts, and try to provide a reasonable - * approximation for others. */ - - if(constantWidth) - aw=properties->horizontal->advance_Width_Max; - else if (properties->os2) - aw=properties->os2->xAvgCharWidth; - else - aw=properties->horizontal->advance_Width_Max/2; - if(constantWidth) - averageWidth = 10*TRANSFORM_FUNITS_X(aw); - else - averageWidth = TRANSFORM_FUNITS_X(aw*10L); - rawAverageWidth = TRANSFORM_FUNITS_RAW(aw*10L); + instance = font->instance; + face = instance->face; + smetrics = instance->size->metrics; + + upm = face->face->units_per_EM; + charcell = (instance->monospaced == FT_CHARCELL); + constantWidth = charcell || is_fixed_width(face->face); + if(constantWidth && instance->monospaced == 0) + instance->monospaced = FT_MONOSPACED; + + /* There's no way to get the average width right without rasterising + all of the glyphs. We make a serious attempt at getting it right + for monospaced fonts, and try to provide a reasonable + approximation for others. */ + + if(constantWidth) + aw = face->face->max_advance_width; + else + aw = face->face->max_advance_width / 2; + + if(constantWidth) + averageWidth = 10*TRANSFORM_FUNITS_X(aw); + else + averageWidth = TRANSFORM_FUNITS_X(aw*10L); + rawAverageWidth = TRANSFORM_FUNITS_RAW(aw*10L); - vals->width=averageWidth; + vals->width = averageWidth; - if(info) { - info->fontAscent = - TRANSFORM_FUNITS_Y(properties->horizontal->Ascender); - info->fontDescent = - -TRANSFORM_FUNITS_Y(properties->horizontal->Descender); - firstCode=0; - lastCode=0xFFFFL; - if(font->nranges) { - lastCode=0; - /* The ranges information does not have an effect on firstCode, - as we pass the default glyph at position 0. */ - for(i=0; inranges; i++) { - code=font->ranges[i].max_char_low+(font->ranges[i].max_char_high<<8); - if(lastCodemapping.mapping || - font->mapping.mapping->encoding->row_size == 0) { - /* linear indexing */ - lastCode=MIN(lastCode, - font->mapping.mapping ? - font->mapping.mapping->encoding->size-1 : - (font->mapping.has_cmap ? 0xFF : 0xFFFF)); - if(font->mapping.mapping && font->mapping.mapping->encoding->first) - firstCode=font->mapping.mapping->encoding->first; - info->firstRow=firstCode/0x100; - info->lastRow=lastCode/0x100; - info->firstCol= - (info->firstRow || info->lastRow) ? 0 : (firstCode & 0xFF); - info->lastCol=info->lastRow ? 0xFF : (lastCode & 0xFF); - } else { - /* matrix indexing */ - info->firstRow=font->mapping.mapping->encoding->first; - info->lastRow=MIN(font->mapping.mapping->encoding->size-1, - lastCode/0x100); - info->firstCol=font->mapping.mapping->encoding->first_col; - info->lastCol=MIN(font->mapping.mapping->encoding->row_size-1, - lastCode<0x100?lastCode:0xFF); - } - - /* firstCode and lastCode are not valid in case of a matrix - encoding */ - - transformBBox(&instance->transformation, upm, - instance->imetrics.x_ppem, instance->imetrics.y_ppem, - charcell? 0 : - properties->header->xMin - - properties->horizontal->min_Left_Side_Bearing, - properties->header->yMin, - charcell ? - properties->horizontal->advance_Width_Max : - properties->horizontal->xMax_Extent, - properties->header->yMax, - &minLsb, &descent, &maxRsb, &ascent); - descent=-descent; - - width = TRANSFORM_FUNITS_X(properties->horizontal->advance_Width_Max); - rawWidth = - TRANSFORM_FUNITS_RAW(properties->horizontal->advance_Width_Max); - instance->width=width; - - info->constantWidth=constantWidth; - info->constantMetrics=charcell; - - info->minbounds.leftSideBearing = minLsb; - info->minbounds.rightSideBearing = charcell?maxRsb:minLsb; - info->minbounds.characterWidth = constantWidth?width:-width; - info->minbounds.ascent = charcell?ascent:-descent; - info->minbounds.descent = charcell?descent:-ascent; - info->minbounds.attributes = - (unsigned short)(short)(constantWidth?rawWidth:-rawWidth); - - info->maxbounds.leftSideBearing = charcell?minLsb:maxRsb; - info->maxbounds.rightSideBearing = maxRsb; - info->maxbounds.characterWidth = width; - info->maxbounds.ascent = ascent; - info->maxbounds.descent = descent; - info->maxbounds.attributes = (unsigned short)(short)rawWidth; - - if(charcell && instance->charcellMetrics==0) { - if((instance->charcellMetrics=(xCharInfo*)xalloc(sizeof(xCharInfo))) - ==0) { - FreeTypeFreeFont(font); - return AllocError; - } - memcpy((char*)instance->charcellMetrics, - (char*)&info->maxbounds, sizeof(xCharInfo)); - } + if(info) { + info->fontAscent = + TRANSFORM_FUNITS_Y(face->face->ascender); + info->fontDescent = + -TRANSFORM_FUNITS_Y(face->face->descender); + firstCode = 0; + lastCode = 0xFFFFL; + if(font->nranges) { + lastCode = 0; + /* The ranges information does not have an effect on firstCode, + as we pass the default glyph at position 0. */ + for(i=0; inranges; i++) { + code = font->ranges[i].max_char_low + + (font->ranges[i].max_char_high<<8); + if(lastCode < code) + lastCode = code; + } + } + + if(!font->mapping.mapping || + font->mapping.mapping->encoding->row_size == 0) { + /* linear indexing */ + lastCode=MIN(lastCode, + font->mapping.mapping ? + font->mapping.mapping->encoding->size-1 : + 0xFF); + if(font->mapping.mapping && font->mapping.mapping->encoding->first) + firstCode = font->mapping.mapping->encoding->first; + info->firstRow = firstCode/0x100; + info->lastRow = lastCode/0x100; + info->firstCol = + (info->firstRow || info->lastRow) ? 0 : (firstCode & 0xFF); + info->lastCol = info->lastRow ? 0xFF : (lastCode & 0xFF); + } else { + /* matrix indexing */ + info->firstRow = font->mapping.mapping->encoding->first; + info->lastRow = MIN(font->mapping.mapping->encoding->size-1, + lastCode/0x100); + info->firstCol = font->mapping.mapping->encoding->first_col; + info->lastCol = MIN(font->mapping.mapping->encoding->row_size-1, + lastCode<0x100?lastCode:0xFF); + } - /* Glyph metrics are accurate */ - info->inkMetrics=1; + /* firstCode and lastCode are not valid in case of a matrix + encoding */ - memcpy((char *) &info->ink_maxbounds, - (char *) &info->maxbounds, sizeof(xCharInfo)); - memcpy((char *) &info->ink_minbounds, - (char *) &info->minbounds, sizeof(xCharInfo)); + transformBBox(&instance->transformation, upm, + smetrics.x_ppem, smetrics.y_ppem, + charcell? 0 : + face->face->bbox.xMin, + face->face->bbox.yMin, + charcell ? + face->face->max_advance_width : + face->face->bbox.xMax, + face->face->bbox.yMax, + &minLsb, &descent, &maxRsb, &ascent); + descent = -descent; + + width = TRANSFORM_FUNITS_X(face->face->max_advance_width); + rawWidth = + TRANSFORM_FUNITS_RAW(face->face->max_advance_width); + instance->width = width; + + info->constantWidth=constantWidth; + info->constantMetrics=charcell; + + info->minbounds.leftSideBearing = minLsb; + info->minbounds.rightSideBearing = charcell?maxRsb:minLsb; + info->minbounds.characterWidth = constantWidth?width:-width; + info->minbounds.ascent = charcell?ascent:-descent; + info->minbounds.descent = charcell?descent:-ascent; + info->minbounds.attributes = + (unsigned short)(short)(constantWidth?rawWidth:-rawWidth); + + info->maxbounds.leftSideBearing = charcell?minLsb:maxRsb; + info->maxbounds.rightSideBearing = maxRsb; + info->maxbounds.characterWidth = width; + info->maxbounds.ascent = ascent; + info->maxbounds.descent = descent; + info->maxbounds.attributes = (unsigned short)(short)rawWidth; + + if(charcell && instance->charcellMetrics == 0) { + instance->charcellMetrics = (xCharInfo*)xalloc(sizeof(xCharInfo)); + if(instance->charcellMetrics == 0) { + FreeTypeFreeFont(font); + return AllocError; + } + memcpy((char*)instance->charcellMetrics, + (char*)&info->maxbounds, sizeof(xCharInfo)); + } - /* XXX - hack */ - info->defaultCh=0; - } + /* Glyph metrics are accurate */ + info->inkMetrics=1; - if(xf) - xf->fontPrivate=(void*)font; + memcpy((char *)&info->ink_maxbounds, + (char *)&info->maxbounds, sizeof(xCharInfo)); + memcpy((char *)&info->ink_minbounds, + (char *)&info->minbounds, sizeof(xCharInfo)); + + /* XXX - hack */ + info->defaultCh=0; + } + + if(xf) + xf->fontPrivate = (void*)font; - if(info) { - if((xrc=FreeTypeAddProperties(font, vals, info, entry->name.name, - rawAverageWidth)) - !=Successful) { - FreeTypeFreeFont(font); - return xrc; + if(info) { + xrc = FreeTypeAddProperties(font, vals, info, entry->name.name, + rawAverageWidth); + if (xrc != Successful) { + FreeTypeFreeFont(font); + return xrc; + } } - } - return Successful; + return Successful; #undef TRANSFORM_FUNITS_X #undef TRANSFORM_FUNITS_X_DOWN #undef TRANSFORM_FUNITS_X_UP @@ -1478,40 +1518,40 @@ FontEncoding charEncoding, unsigned long *metricCount, xCharInfo **metrics) { - unsigned int code = 0; - TTFFont *tf; - xCharInfo **mp, *m; - - - /* The compiler is supposed to initialise all the fields to 0 */ - static xCharInfo noSuchChar; - - /* MUMBLE1("Get metrics for %ld characters\n", count);*/ - - tf = (TTFFont*)pFont->fontPrivate; - mp = metrics; - - while (count-- > 0) { - switch (charEncoding) { - case Linear8Bit: - case TwoD8Bit: - code = *chars++; - break; - case Linear16Bit: - case TwoD16Bit: - code = (*chars++ << 8); - code |= *chars++; - break; - } + unsigned int code = 0; + FTFontPtr tf; + xCharInfo **mp, *m; + + + /* The compiler is supposed to initialise all the fields to 0 */ + static xCharInfo noSuchChar; + + /* MUMBLE1("Get metrics for %ld characters\n", count);*/ + + tf = (FTFontPtr)pFont->fontPrivate; + mp = metrics; + + while (count-- > 0) { + switch (charEncoding) { + case Linear8Bit: + case TwoD8Bit: + code = *chars++; + break; + case Linear16Bit: + case TwoD16Bit: + code = (*chars++ << 8); + code |= *chars++; + break; + } - if(FreeTypeFontGetGlyphMetrics(code, &m, tf)==Successful && m!=0) { - *mp++=m; - } else - *mp++=&noSuchChar; - } + if(FreeTypeFontGetGlyphMetrics(code, &m, tf) == Successful && m!=0) { + *mp++ = m; + } else + *mp++ = &noSuchChar; + } - *metricCount = mp - metrics; - return Successful; + *metricCount = mp - metrics; + return Successful; } static int @@ -1519,85 +1559,85 @@ FontEncoding charEncoding, unsigned long *glyphCount, CharInfoPtr *glyphs) { - unsigned int code = 0; - TTFFont *tf; - CharInfoPtr *gp; - CharInfoPtr g; - - tf = (TTFFont*)pFont->fontPrivate; - gp = glyphs; - - while (count-- > 0) { - switch (charEncoding) { - case Linear8Bit: case TwoD8Bit: - code = *chars++; - break; - case Linear16Bit: case TwoD16Bit: - code = *chars++ << 8; - code |= *chars++; - break; - } + unsigned int code = 0; + FTFontPtr tf; + CharInfoPtr *gp; + CharInfoPtr g; + + tf = (FTFontPtr)pFont->fontPrivate; + gp = glyphs; + + while (count-- > 0) { + switch (charEncoding) { + case Linear8Bit: case TwoD8Bit: + code = *chars++; + break; + case Linear16Bit: case TwoD16Bit: + code = *chars++ << 8; + code |= *chars++; + break; + } - if(FreeTypeFontGetGlyph(code, &g, tf)==Successful && g!=0) { - *gp++ = g; - } else - if(FreeTypeFontGetDefaultGlyph(&g, tf)==Successful && g!=0) - *gp++ = g; - } + if(FreeTypeFontGetGlyph(code, &g, tf) == Successful && g!=0) { + *gp++ = g; + } else + if(FreeTypeFontGetDefaultGlyph(&g, tf) == Successful && g!=0) + *gp++ = g; + } - *glyphCount = gp - glyphs; - return Successful; + *glyphCount = gp - glyphs; + return Successful; } static int FreeTypeSetUpFont(FontPathElementPtr fpe, FontPtr xf, FontInfoPtr info, fsBitmapFormat format, fsBitmapFormatMask fmask, - FontBitmapFormat *bmfmt) + FontBitmapFormatPtr bmfmt) { - int xrc; - int image; + int xrc; + int image; - /* Get the default bitmap format information for this X installation. - * Also update it for the client if running in the font server. */ - FontDefaultFormat(&bmfmt->bit, &bmfmt->byte, &bmfmt->glyph, &bmfmt->scan); - if ((xrc = CheckFSFormat(format, fmask, &bmfmt->bit, &bmfmt->byte, - &bmfmt->scan, &bmfmt->glyph, - &image)) != Successful) { - MUMBLE1("Aborting after checking FS format: %d\n", xrc); - return xrc; - } + /* Get the default bitmap format information for this X installation. + Also update it for the client if running in the font server. */ + FontDefaultFormat(&bmfmt->bit, &bmfmt->byte, &bmfmt->glyph, &bmfmt->scan); + if ((xrc = CheckFSFormat(format, fmask, &bmfmt->bit, &bmfmt->byte, + &bmfmt->scan, &bmfmt->glyph, + &image)) != Successful) { + MUMBLE1("Aborting after checking FS format: %d\n", xrc); + return xrc; + } - if(xf) { - xf->refcnt = 0; - xf->bit = bmfmt->bit; - xf->byte = bmfmt->byte; - xf->glyph = bmfmt->glyph; - xf->scan = bmfmt->scan; - xf->format = format; - xf->get_glyphs = FreeTypeGetGlyphs; - xf->get_metrics = FreeTypeGetMetrics; - xf->unload_font = FreeTypeUnloadXFont; - xf->unload_glyphs = 0; - xf->fpe = fpe; - xf->svrPrivate = 0; - xf->fontPrivate = 0; /* we'll set it later */ - xf->fpePrivate = 0; - } - - info->defaultCh = 0; - info->noOverlap = 0; /* not updated */ - info->terminalFont = 0; /* not updated */ - info->constantMetrics = 0; /* we'll set it later */ - info->constantWidth = 0; /* we'll set it later */ - info->inkInside = 1; - info->inkMetrics = 1; - info->allExist=0; /* not updated */ - info->drawDirection = LeftToRight; /* we'll set it later */ - info->cachable = 1; /* we don't do licensing */ - info->anamorphic = 0; /* can hinting lead to anamorphic scaling? */ - info->maxOverlap = 0; /* we'll set it later. */ - info->pad = 0; /* ??? */ - return Successful; + if(xf) { + xf->refcnt = 0; + xf->bit = bmfmt->bit; + xf->byte = bmfmt->byte; + xf->glyph = bmfmt->glyph; + xf->scan = bmfmt->scan; + xf->format = format; + xf->get_glyphs = FreeTypeGetGlyphs; + xf->get_metrics = FreeTypeGetMetrics; + xf->unload_font = FreeTypeUnloadXFont; + xf->unload_glyphs = 0; + xf->fpe = fpe; + xf->svrPrivate = 0; + xf->fontPrivate = 0; /* we'll set it later */ + xf->fpePrivate = 0; + } + + info->defaultCh = 0; + info->noOverlap = 0; /* not updated */ + info->terminalFont = 0; /* not updated */ + info->constantMetrics = 0; /* we'll set it later */ + info->constantWidth = 0; /* we'll set it later */ + info->inkInside = 1; + info->inkMetrics = 1; + info->allExist=0; /* not updated */ + info->drawDirection = LeftToRight; /* we'll set it later */ + info->cachable = 1; /* we don't do licensing */ + info->anamorphic = 0; /* can hinting lead to anamorphic scaling? */ + info->maxOverlap = 0; /* we'll set it later. */ + info->pad = 0; /* ??? */ + return Successful; } /* Functions exported by the backend */ @@ -1608,44 +1648,45 @@ fsBitmapFormat format, fsBitmapFormatMask fmask, FontPtr non_cachable_font) { - int xrc; - FontPtr xf; - FontBitmapFormat bmfmt; - - MUMBLE1("Open Scalable %s, XLFD=",fileName); - #ifdef DEBUG_TRUETYPE - fwrite(entry->name.name, entry->name.length, 1, stdout); - #endif - MUMBLE("\n"); - - /* Reject ridiculously small values. Singular matrices are okay. */ - if(MAX(hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]), - hypot(vals->pixel_matrix[2], vals->pixel_matrix[3])) - <1.0) - return BadFontName; - - /* Create an X11 server-side font. */ - if (!(xf = CreateFontRec())) - return AllocError; - - if((xrc=FreeTypeSetUpFont(fpe, xf, &xf->info, format, fmask, &bmfmt)) - != Successful) { - DestroyFontRec(xf); - return xrc; - } - /* Load the font and fill its info structure. */ - if ((xrc = FreeTypeLoadXFont(fileName, vals, xf, &xf->info, &bmfmt, entry)) - != Successful) { - /* Free everything up at this level and return the error code. */ - MUMBLE1("Error during load: %d\n",xrc); - DestroyFontRec(xf); - return xrc; - } + int xrc; + FontPtr xf; + FontBitmapFormatRec bmfmt; + + MUMBLE1("Open Scalable %s, XLFD=",fileName); +#ifdef DEBUG_TRUETYPE + fwrite(entry->name.name, entry->name.length, 1, stdout); +#endif + MUMBLE("\n"); - /* Set the font and return. */ - *ppFont = xf; + /* Reject ridiculously small values. Singular matrices are okay. */ + if(MAX(hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]), + hypot(vals->pixel_matrix[2], vals->pixel_matrix[3])) + <1.0) + return BadFontName; + + /* Create an X11 server-side font. */ + xf = CreateFontRec(); + if (xf == NULL) + return AllocError; - return xrc; + xrc = FreeTypeSetUpFont(fpe, xf, &xf->info, format, fmask, &bmfmt); + if(xrc != Successful) { + DestroyFontRec(xf); + return xrc; + } + /* Load the font and fill its info structure. */ + xrc = FreeTypeLoadXFont(fileName, vals, xf, &xf->info, &bmfmt, entry); + if(xrc != Successful) { + /* Free everything up at this level and return the error code. */ + MUMBLE1("Error during load: %d\n",xrc); + DestroyFontRec(xf); + return xrc; + } + + /* Set the font and return. */ + *ppFont = xf; + + return xrc; } /* Routine to get requested font info. */ @@ -1655,34 +1696,33 @@ FontEntryPtr entry, FontNamePtr fontName, char *fileName, FontScalablePtr vals) { - int xrc; - FontBitmapFormat bmfmt; + int xrc; + FontBitmapFormatRec bmfmt; - MUMBLE("Get info, XLFD= "); - #ifdef DEBUG_TRUETYPE - fwrite(entry->name.name, entry->name.length, 1, stdout); - #endif - MUMBLE("\n"); - - if(MAX(hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]), - hypot(vals->pixel_matrix[2], vals->pixel_matrix[3])) - <1.0) - return BadFontName; + MUMBLE("Get info, XLFD= "); +#ifdef DEBUG_TRUETYPE + fwrite(entry->name.name, entry->name.length, 1, stdout); +#endif + MUMBLE("\n"); - if((xrc=FreeTypeSetUpFont(fpe, 0, info, 0, 0, &bmfmt)) - != Successful) { - return xrc; - } + if(MAX(hypot(vals->pixel_matrix[0], vals->pixel_matrix[1]), + hypot(vals->pixel_matrix[2], vals->pixel_matrix[3])) < 1.0) + return BadFontName; - bmfmt.glyph <<= 3; + xrc = FreeTypeSetUpFont(fpe, 0, info, 0, 0, &bmfmt); + if(xrc != Successful) { + return xrc; + } - if ((xrc = FreeTypeLoadXFont(fileName, vals, 0, info, &bmfmt, entry)) - != Successful) { - MUMBLE1("Error during load: %d\n", xrc); - return xrc; - } + bmfmt.glyph <<= 3; - return Successful; + xrc = FreeTypeLoadXFont(fileName, vals, 0, info, &bmfmt, entry); + if(xrc != Successful) { + MUMBLE1("Error during load: %d\n", xrc); + return xrc; + } + + return Successful; } /* Renderer registration. */ @@ -1691,24 +1731,40 @@ #define CAPABILITIES (CAP_CHARSUBSETTING | CAP_MATRIX) /* Set it up so file names with either upper or lower case can be - * loaded. We don't support compressed fonts. */ + loaded. We don't support compressed fonts. */ static FontRendererRec renderers[] = { - {".ttf", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".TTF", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".ttc", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, - {".TTC", 4, 0, FreeTypeOpenScalable, 0, - FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".ttf", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".TTF", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".ttc", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".TTC", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".otf", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".OTF", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".otc", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".OTC", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".pfa", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".PFA", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".pfb", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, + {".PFB", 4, 0, FreeTypeOpenScalable, 0, + FreeTypeGetInfoScalable, 0, CAPABILITIES}, }; static int num_renderers = sizeof(renderers) / sizeof(renderers[0]); void FreeTypeRegisterFontFileFunctions(void) { - int i; + int i; - for (i = 0; i < num_renderers; i++) - FontFileRegisterRenderer(&renderers[i]); + for (i = 0; i < num_renderers; i++) + FontFileRegisterRenderer(&renderers[i]); } Index: xc/lib/font/FreeType/ftfuncs.h diff -u xc/lib/font/FreeType/ftfuncs.h:1.9 xc/lib/font/FreeType/ftfuncs.h:1.12 --- xc/lib/font/FreeType/ftfuncs.h:1.9 Tue Nov 14 11:54:43 2000 +++ xc/lib/font/FreeType/ftfuncs.h Mon Sep 30 20:02:10 2002 @@ -1,5 +1,5 @@ /* -Copyright (c) 1998-2000 by Juliusz Chroboczek +Copyright (c) 1998-2002 by Juliusz Chroboczek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,9 +19,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* $XFree86: xc/lib/font/FreeType/ftfuncs.h,v 1.12 2002/10/01 00:02:10 alanh Exp $ */ -/* $XFree86: xc/lib/font/FreeType/ftfuncs.h,v 1.9 2000/11/14 16:54:43 dawes Exp $ */ - /* Number of buckets in the hashtable holding faces */ #define NUMFACEBUCKETS 32 @@ -31,97 +30,93 @@ /* A structure that holds bitmap order and padding info. */ typedef struct { - int bit; /* bit order */ - int byte; /* byte order */ - int glyph; /* glyph pad size */ - int scan; /* machine word size */ -} FontBitmapFormat; - -/* The data structures for holding font data */ - -/* Forward reference */ - -struct TTFInstance_s; - -/* At the lowest level, there is face; TTFFaces are in one-to-one - * correspondence with TrueType faces. Multiple instance may share - * the same face. */ -typedef struct TTFFace_s { - char *filename; - TT_Face face; - TT_Glyph glyph; - TT_Face_Properties properties; - struct TTFInstance_s *instances; /* linked list of associated instances */ - struct TTFFace_s *next; /* link to next face in bucket */ -} TTFFace; + int bit; /* bit order */ + int byte; /* byte order */ + int glyph; /* glyph pad size */ + int scan; /* machine word size */ +} FontBitmapFormatRec, *FontBitmapFormatPtr; + +struct FTSize_s; + +/* At the lowest level, there is face; FTFaces are in one-to-one + correspondence with TrueType faces. Multiple instance may share + the same face. */ + +typedef struct _FTFace { + char *filename; + FT_Face face; + struct _FTInstance *instances; + struct _FTInstance *active_instance; + struct _FTFace *next; /* link to next face in bucket */ +} FTFaceRec, *FTFacePtr; /* A transformation matrix with resolution information */ -typedef struct { - double scale; - int nonIdentity; /* if 0, matrix is the identity */ - TT_Matrix matrix; - int xres, yres; -} TTFNormalisedTransformation; +typedef struct _FTNormalisedTransformation { + double scale; + int nonIdentity; /* if 0, matrix is the identity */ + FT_Matrix matrix; + int xres, yres; +} FTNormalisedTransformationRec, *FTNormalisedTransformationPtr; + +#define FT_MONOSPACED 1 +#define FT_CHARCELL 2 + +#define FT_AVAILABLE_UNKNOWN 0 +#define FT_AVAILABLE_NO 1 +#define FT_AVAILABLE_YES 2 +#define FT_AVAILABLE_RASTERISED 3 /* An instance builds on a face by specifying the transformation - * matrix. Multiple fonts may share the same instance. */ + matrix. Multiple fonts may share the same instance. */ /* This structure caches bitmap data */ -typedef struct TTFInstance_s { - TTFFace *face; /* the associated face */ - TT_Instance instance; - TT_Instance_Metrics imetrics; - TTFNormalisedTransformation transformation; - int monospaced; /* 1 if it is a monospaced instance, - * 2 if it is a charcell instance */ - int width; /* the width of all glyphs if monospaced */ - xCharInfo *charcellMetrics; /* the metrics if charcell is 1 */ - FontBitmapFormat bmfmt; - unsigned nglyphs; - CharInfoPtr *glyphs; /* glyphs and available are used in parallel */ - int **available; /* 0=unknown */ - /* 1=known not to exist */ - /* 2=known to exist, not rasterised */ - /* 3=rasterised, glyph available */ - int refcount; - struct TTFInstance_s *next; /* link to next instance */ -} TTFInstance; +typedef struct _FTInstance { + FTFacePtr face; /* the associated face */ + FT_Size size; + FTNormalisedTransformationRec transformation; + int monospaced; + int width; /* the width of all glyphs if monospaced */ + xCharInfo *charcellMetrics; /* the metrics if charcell is 1 */ + FontBitmapFormatRec bmfmt; + unsigned nglyphs; + CharInfoPtr *glyphs; /* glyphs and available are used in parallel */ + int **available; + int refcount; + struct _FTInstance *next; /* link to next instance */ +} FTInstanceRec, *FTInstancePtr; /* A font is an instance with coding information; fonts are in - * one-to-one correspondence with X fonts */ -typedef struct { - TTFInstance *instance; - struct ttf_mapping mapping; /* defined in ft.h */ - int nranges; - fsRange *ranges; -} TTFFont; + one-to-one correspondence with X fonts */ +typedef struct _FTFont{ + FTInstancePtr instance; + FTMappingRec mapping; + int nranges; + fsRange *ranges; +} FTFontRec, *FTFontPtr; - /* Prototypes for some local functions */ -static int FreeTypeOpenFace(TTFFace **facep, char *fileName); -static void FreeTypeFreeFace(TTFFace *face); +static int FreeTypeOpenFace(FTFacePtr *facep, char *fileName); +static void FreeTypeFreeFace(FTFacePtr face); static int - FreeTypeOpenInstance(TTFInstance **instancep, - char *fileName, TTFNormalisedTransformation *trans, - int charcell, FontBitmapFormat *bmfmt); -static void FreeTypeFreeInstance(TTFInstance *instance); + FreeTypeOpenInstance(FTInstancePtr *instancep, + char *fileName, FTNormalisedTransformationPtr trans, + int charcell, FontBitmapFormatPtr bmfmt); +static void FreeTypeFreeInstance(FTInstancePtr instance); static int - FreeTypeInstanceGetGlyph(unsigned idx, CharInfoPtr *g, TTFInstance *instance); + FreeTypeInstanceGetGlyph(unsigned idx, CharInfoPtr *g, FTInstancePtr instance); static int -FreeTypeRasteriseGlyph(CharInfoPtr tgp, TTFInstance *instance, int hasMetrics); -static void FreeTypeFreeFont(TTFFont *font); +FreeTypeRasteriseGlyph(CharInfoPtr tgp, FTInstancePtr instance, int hasMetrics); +static void FreeTypeFreeFont(FTFontPtr font); static void FreeTypeFreeXFont(FontPtr pFont, int freeProps); static void FreeTypeUnloadXFont(FontPtr pFont); static int -FreeTypeAddProperties(TTFFont *font, FontScalablePtr vals, FontInfoPtr info, +FreeTypeAddProperties(FTFontPtr font, FontScalablePtr vals, FontInfoPtr info, char *fontname, int rawAverageWidth); -static int FreeTypeFontGetGlyph(unsigned code, CharInfoPtr *g, TTFFont *font); -static int FreeTypeFontGetDefaultGlyph(CharInfoPtr *g, TTFFont *font); +static int FreeTypeFontGetGlyph(unsigned code, CharInfoPtr *g, FTFontPtr font); +static int FreeTypeFontGetDefaultGlyph(CharInfoPtr *g, FTFontPtr font); static int -FreeTypeLoadFont(TTFFont **fontp, char *fileName, +FreeTypeLoadFont(FTFontPtr *fontp, char *fileName, FontScalablePtr vals, FontEntryPtr entry, - FontBitmapFormat *bmfmt); - - + FontBitmapFormatPtr bmfmt); Index: xc/lib/font/FreeType/ftheader.h diff -u /dev/null xc/lib/font/FreeType/ftheader.h:1.3 --- /dev/null Thu Feb 27 12:27:49 2003 +++ xc/lib/font/FreeType/ftheader.h Mon Sep 30 20:02:10 2002 @@ -0,0 +1,511 @@ +/***************************************************************************/ +/* */ +/* ftheader.h */ +/* */ +/* Build macros of the FreeType 2 library. */ +/* */ +/* Copyright 1996-2001, 2002 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ +/* $XFree86: xc/lib/font/FreeType/ftheader.h,v 1.3 2002/10/01 00:02:10 alanh Exp $ */ + +#ifndef __FT_HEADER_H__ +#define __FT_HEADER_H__ + + /*************************************************************************/ + /* */ + /* */ + /* FT_BEGIN_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_END_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_BEGIN_HEADER extern "C" { +#else +#define FT_BEGIN_HEADER /* nothing */ +#endif + + + /*************************************************************************/ + /* */ + /* */ + /* FT_END_HEADER */ + /* */ + /* */ + /* This macro is used in association with @FT_BEGIN_HEADER in header */ + /* files to ensure that the declarations within are properly */ + /* encapsulated in an `extern "C" { .. }' block when included from a */ + /* C++ compiler. */ + /* */ +#ifdef __cplusplus +#define FT_END_HEADER } +#else +#define FT_END_HEADER /* nothing */ +#endif + + + /*************************************************************************/ + /* */ + /* Aliases for the FreeType 2 public and configuration files. */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /*
*/ + /* header_file_macros */ + /* */ + /* */ + /* Header File Macros */ + /* */ + /* <Abstract> */ + /* Macro definitions used to #include specific header files. */ + /* */ + /* <Description> */ + /* The following macros are defined to the name of specific */ + /* FreeType 2 header files. They can be used directly in #include */ + /* statements as in: */ + /* */ + /* { */ + /* #include FT_FREETYPE_H */ + /* #include FT_MULTIPLE_MASTERS_H */ + /* #include FT_GLYPH_H */ + /* } */ + /* */ + /* There are several reasons why we are now using macros to name */ + /* public header files. The first one is that such macros are not */ + /* limited to the infamous 8.3 naming rule required by DOS (and */ + /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */ + /* */ + /* The second reason is that is allows for more flexibility in the */ + /* way FreeType 2 is installed on a given system. */ + /* */ + /*************************************************************************/ + + /* configuration files */ + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_CONFIG_CONFIG_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* FreeType 2 configuration data. */ + /* */ +#ifndef FT_CONFIG_CONFIG_H +#define FT_CONFIG_CONFIG_H <ftconfig.h> +#endif + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_CONFIG_STANDARD_LIBRARY_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* FreeType 2 configuration data. */ + /* */ +#ifndef FT_CONFIG_STANDARD_LIBRARY_H +#define FT_CONFIG_STANDARD_LIBRARY_H <ftstdlib.h> +#endif + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_CONFIG_OPTIONS_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* FreeType 2 project-specific configuration options. */ + /* */ +#ifndef FT_CONFIG_OPTIONS_H +#define FT_CONFIG_OPTIONS_H <ftoption.h> +#endif + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_CONFIG_MODULES_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the list of FreeType 2 modules that are statically linked to new */ + /* library instances in @FT_Init_FreeType. */ + /* */ +#ifndef FT_CONFIG_MODULES_H +#define FT_CONFIG_MODULES_H <ftmodule.h> +#endif + + /* public headers */ + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_FREETYPE_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the base FreeType 2 API. */ + /* */ +#define FT_FREETYPE_H <freetype/freetype.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_ERRORS_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the list of FreeType 2 error codes (and messages). */ + /* */ + /* It is included by @FT_FREETYPE_H. */ + /* */ +#define FT_ERRORS_H <freetype/fterrors.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_MODULE_ERRORS_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the list of FreeType 2 module error offsets (and messages). */ + /* */ +#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_SYSTEM_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the FreeType 2 interface to low-level operations (i.e. memory */ + /* management and stream i/o). */ + /* */ + /* It is included by @FT_FREETYPE_H. */ + /* */ +#define FT_SYSTEM_H <freetype/ftsystem.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_IMAGE_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* types definitions related to glyph images (i.e. bitmaps, outlines, */ + /* scan-converter parameters). */ + /* */ + /* It is included by @FT_FREETYPE_H. */ + /* */ +#define FT_IMAGE_H <freetype/ftimage.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_TYPES_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the basic data types defined by FreeType 2. */ + /* */ + /* It is included by @FT_FREETYPE_H. */ + /* */ +#define FT_TYPES_H <fttypes.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_LIST_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the list management API of FreeType 2. */ + /* */ + /* (Most applications will never need to include this file.) */ + /* */ +#define FT_LIST_H <freetype/ftlist.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_OUTLINE_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the scalable outline management API of FreeType 2. */ + /* */ +#define FT_OUTLINE_H <freetype/ftoutln.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_SIZES_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the API used to manage multiple @FT_Size objects per face. */ + /* */ +#define FT_SIZES_H <freetype/ftsizes.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_MODULE_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the module management API of FreeType 2. */ + /* */ +#define FT_MODULE_H <freetype/ftmodule.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_RENDER_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the renderer module management API of FreeType 2. */ + /* */ +#define FT_RENDER_H <freetype/ftrender.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_TYPE1_TABLES_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the types and API specific to the Type 1 format. */ + /* */ +#define FT_TYPE1_TABLES_H <freetype/t1tables.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_TRUETYPE_IDS_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the enumeration values used to identify name strings, languages, */ + /* encodings, etc. This file really contains a _large_ set of */ + /* constant macro definitions, taken from the TrueType and OpenType */ + /* specifications. */ + /* */ +#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_TRUETYPE_TABLES_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the types and API specific to the TrueType (as well as OpenType) */ + /* format. */ + /* */ +#define FT_TRUETYPE_TABLES_H <freetype/tttables.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_TRUETYPE_TAGS_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the definitions of TrueType 4-byte `tags' used to identify blocks */ + /* in SFNT-based font formats (i.e. TrueType and OpenType). */ + /* */ +#define FT_TRUETYPE_TAGS_H <freetype/tttags.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_BDF_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the definitions of an API to access BDF-specific strings from a */ + /* face. */ + /* */ +#define FT_BDF_H <freetype/ftbdf.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_GLYPH_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the API of the optional glyph management component. */ + /* */ +#define FT_GLYPH_H <freetype/ftglyph.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_BBOX_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the API of the optional exact bounding box computation routines. */ + /* */ +#define FT_BBOX_H <freetype/ftbbox.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_CACHE_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the API of the optional FreeType 2 cache sub-system. */ + /* */ +#define FT_CACHE_H <freetype/ftcache.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_CACHE_IMAGE_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the `glyph image' API of the FreeType 2 cache sub-system. */ + /* */ + /* It is used to define a cache for @FT_Glyph elements. You can also */ + /* see the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need */ + /* to store small glyph bitmaps, as it will use less memory. */ + /* */ +#define FT_CACHE_IMAGE_H <freetype/cache/ftcimage.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_CACHE_SMALL_BITMAPS_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the `small bitmaps' API of the FreeType 2 cache sub-system. */ + /* */ + /* It is used to define a cache for small glyph bitmaps in a */ + /* relatively memory-efficient way. You can also use the API defined */ + /* in @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, */ + /* including scalable outlines. */ + /* */ +#define FT_CACHE_SMALL_BITMAPS_H <freetype/cache/ftcsbits.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_CACHE_CHARMAP_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the `charmap' API of the FreeType 2 cache sub-system. */ + /* */ +#define FT_CACHE_CHARMAP_H <freetype/cache/ftccmap.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_MAC_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the Macintosh-specific FreeType 2 API. The latter is used to */ + /* access fonts embedded in resource forks. */ + /* */ + /* This header file must be explicitly included by client */ + /* applications compiled on the Mac (note that the base API still */ + /* works though). */ + /* */ +#define FT_MAC_H <freetype/ftmac.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_MULTIPLE_MASTERS_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the optional multiple-masters management API of FreeType 2. */ + /* */ +#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h> + + + /*************************************************************************/ + /* */ + /* @macro: */ + /* FT_SFNT_NAMES_H */ + /* */ + /* @description: */ + /* A macro used in #include statements to name the file containing */ + /* the optional FreeType 2 API used to access embedded `name' strings */ + /* in SFNT-based font formats (i.e. TrueType and OpenType). */ + /* */ +#define FT_SFNT_NAMES_H <freetype/ftsnames.h> + + /* */ + +#define FT_TRIGONOMETRY_H <freetype/fttrigon.h> +#define FT_SYNTHESIS_H <freetype/ftsynth.h> +#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h> + +#define FT_CACHE_MANAGER_H <freetype/cache/ftcmanag.h> + +#define FT_CACHE_INTERNAL_LRU_H <freetype/cache/ftlru.h> +#define FT_CACHE_INTERNAL_GLYPH_H <freetype/cache/ftcglyph.h> +#define FT_CACHE_INTERNAL_CACHE_H <freetype/cache/ftccache.h> + +#define FT_XFREE86_H <freetype/ftxf86.h> + + /* now include internal headers definitions from <freetype/internal/...> */ + +#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h> +#include FT_INTERNAL_INTERNAL_H + + +#endif /* __FT2_BUILD_H__ */ + + +/* END */ Index: xc/lib/font/FreeType/ftmodule.h diff -u /dev/null xc/lib/font/FreeType/ftmodule.h:1.3 --- /dev/null Thu Feb 27 12:27:49 2003 +++ xc/lib/font/FreeType/ftmodule.h Mon Sep 30 20:02:10 2002 @@ -0,0 +1,17 @@ +/* $XFree86: xc/lib/font/FreeType/ftmodule.h,v 1.3 2002/10/01 00:02:10 alanh Exp $ */ +FT_USE_MODULE(autohint_module_class) +FT_USE_MODULE(cff_driver_class) +/* FT_USE_MODULE(t1cid_driver_class) */ +/* FT_USE_MODULE(pcf_driver_class) */ +/* FT_USE_MODULE(bdf_driver_class) */ +FT_USE_MODULE(psaux_module_class) +FT_USE_MODULE(psnames_module_class) +FT_USE_MODULE(pshinter_module_class) +FT_USE_MODULE(ft_raster1_renderer_class) +FT_USE_MODULE(sfnt_module_class) +/* FT_USE_MODULE(ft_smooth_renderer_class) */ +FT_USE_MODULE(tt_driver_class) +FT_USE_MODULE(t1_driver_class) +/* FT_USE_MODULE(t42_driver_class) */ +/* FT_USE_MODULE(pfr_driver_class) */ +/* FT_USE_MODULE(winfnt_driver_class) */ Index: xc/lib/font/FreeType/ftoption.h diff -u /dev/null xc/lib/font/FreeType/ftoption.h:1.3 --- /dev/null Thu Feb 27 12:27:49 2003 +++ xc/lib/font/FreeType/ftoption.h Mon Sep 30 20:02:10 2002 @@ -0,0 +1,466 @@ +/***************************************************************************/ +/* */ +/* ftoption.h */ +/* */ +/* User-selectable configuration macros (specification only). */ +/* */ +/* Copyright 1996-2001, 2002 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* Modified for XFree86. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ +/* $XFree86: xc/lib/font/FreeType/ftoption.h,v 1.3 2002/10/01 00:02:10 alanh Exp $ */ + +#ifndef __FTOPTION_H__ +#define __FTOPTION_H__ + + +#include <ft2build.h> + + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* USER-SELECTABLE CONFIGURATION MACROS */ + /* */ + /* This file contains the default configuration macro definitions for */ + /* a standard build of the FreeType library. There are three ways to */ + /* use this file to build project-specific versions of the library: */ + /* */ + /* - You can modify this file by hand, but this is not recommended in */ + /* cases where you would like to build several versions of the */ + /* library from a single source directory. */ + /* */ + /* - You can put a copy of this file in your build directory, more */ + /* precisely in "$BUILD/freetype/config/ftoption.h", where "$BUILD" */ + /* is the name of a directory that is included _before_ the FreeType */ + /* include path during compilation. */ + /* */ + /* The default FreeType Makefiles and Jamfiles use the build */ + /* directory "builds/<system>" by default, but you can easily change */ + /* that for your own projects. */ + /* */ + /* - Copy the file <ft2build.h> to "$BUILD/ft2build.h" and modify it */ + /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ + /* locate this file during the build. For example, */ + /* */ + /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ + /* #include <freetype/config/ftheader.h> */ + /* */ + /* will use "$BUILD/myftoptions.h" instead of this file for macro */ + /* definitions. */ + /* */ + /* Note also that you can similarly pre-define the macro */ + /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ + /* that are statically linked to the library at compile time. By */ + /* default, this file is <freetype/config/ftmodule.h>. */ + /* */ + /* We highly recommend using the third method whenever possible. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* CMap support */ + /* */ + /* Define this if you want generic cmap support. */ + /* */ +#define FT_CONFIG_OPTION_USE_CMAPS + + + /*************************************************************************/ + /* */ + /* Convenience functions support */ + /* */ + /* Some functions of the FreeType 2 API are provided as a convenience */ + /* for client applications and developers. However, they are not */ + /* required to build and run the library itself. */ + /* */ + /* By defining this configuration macro, you'll disable the */ + /* compilation of these functions at build time. This can be useful */ + /* to reduce the library's code size when you don't need any of */ + /* these functions. */ + /* */ + /* All convenience functions are declared as such in their */ + /* documentation. */ + /* */ +#undef FT_CONFIG_OPTION_NO_CONVENIENCE_FUNCS + + + /*************************************************************************/ + /* */ + /* Module errors */ + /* */ + /* If this macro is set (which is _not_ the default), the higher byte */ + /* of an error code gives the module in which the error has occurred, */ + /* while the lower byte is the real error code. */ + /* */ + /* Setting this macro makes sense for debugging purposes only, since */ + /* it would break source compatibility of certain programs that use */ + /* FreeType 2. */ + /* */ + /* More details can be found in the files ftmoderr.h and fterrors.h. */ + /* */ +#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS + + + /*************************************************************************/ + /* */ + /* Alternate Glyph Image Format support */ + /* */ + /* By default, the glyph images returned by the FreeType glyph loader */ + /* can either be a pixmap or a vectorial outline defined through */ + /* Bezier control points. When defining the following configuration */ + /* macro, some font drivers will be able to register alternate */ + /* glyph image formats. */ + /* */ + /* Unset this macro if you are sure that you will never use a font */ + /* driver with an alternate glyph format; this will reduce the size of */ + /* the base layer code. */ + /* */ + /* Note that a few Type 1 fonts, as well as Windows `vector' fonts */ + /* use a vector `plotter' format that isn't supported when this */ + /* macro is undefined. */ + /* */ +#undef FT_CONFIG_OPTION_ALTERNATE_GLYPH_FORMATS + + + /*************************************************************************/ + /* */ + /* Glyph Postscript Names handling */ + /* */ + /* By default, FreeType 2 is compiled with the `PSNames' module. This */ + /* module is in charge of converting a glyph name string into a */ + /* Unicode value, or return a Macintosh standard glyph name for the */ + /* use with the TrueType `post' table. */ + /* */ + /* Undefine this macro if you do not want `PSNames' compiled in your */ + /* build of FreeType. This has the following effects: */ + /* */ + /* - The TrueType driver will provide its own set of glyph names, */ + /* if you build it to support postscript names in the TrueType */ + /* `post' table. */ + /* */ + /* - The Type 1 driver will not be able to synthetize a Unicode */ + /* charmap out of the glyphs found in the fonts. */ + /* */ + /* You would normally undefine this configuration macro when building */ + /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ + /* */ +#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Postscript Names to Unicode Values support */ + /* */ + /* By default, FreeType 2 is built with the `PSNames' module compiled */ + /* in. Among other things, the module is used to convert a glyph name */ + /* into a Unicode value. This is especially useful in order to */ + /* synthetize on the fly a Unicode charmap from the CFF/Type 1 driver */ + /* through a big table named the `Adobe Glyph List' (AGL). */ + /* */ + /* Undefine this macro if you do not want the Adobe Glyph List */ + /* compiled in your `PSNames' module. The Type 1 driver will not be */ + /* able to synthetize a Unicode charmap out of the glyphs found in the */ + /* fonts. */ + /* */ +#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST + + + /*************************************************************************/ + /* */ + /* Many compilers provide a non-ANSI 64-bit data type that can be used */ + /* by FreeType to speed up some computations. However, this will create */ + /* some problems when compiling the library in strict ANSI mode. */ + /* */ + /* For this reason, the use of 64-bit ints is normally disabled when */ + /* the __STDC__ macro is defined. You can however disable this by */ + /* defining here the macro FT_CONFIG_OPTION_FORCE_INT64. */ + /* */ + /* For most compilers, this will only create compilation warnings */ + /* when building the library. */ + /* */ + /* ObNote: The compiler-specific 64-bit integers are detected in the */ + /* file "ftconfig.h" either statically, or through Autoconf */ + /* on platforms that support it. */ + /* */ +#define FT_CONFIG_OPTION_FORCE_INT64 + + + /*************************************************************************/ + /* */ + /* DLL export compilation */ + /* */ + /* When compiling FreeType as a DLL, some systems/compilers need a */ + /* special keyword in front OR after the return type of function */ + /* declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ + /* will be later automatically defined as `extern return_type' to */ + /* allow normal compilation. */ + /* */ +#undef FT_EXPORT +#undef FT_EXPORT_DEF + + /*************************************************************************/ + /* */ + /* Debug level */ + /* */ + /* FreeType can be compiled in debug or trace mode. In debug mode, */ + /* errors are reported through the `ftdebug' component. In trace */ + /* mode, additional messages are sent to the standard output during */ + /* execution. */ + /* */ + /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ + /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ + /* */ + /* Don't define any of these macros to compile in `release' mode! */ + /* */ +#undef FT_DEBUG_LEVEL_ERROR +#undef FT_DEBUG_LEVEL_TRACE + + + /*************************************************************************/ + /* */ + /* Memory Debugging */ + /* */ + /* FreeType now comes with an integrated memory debugger that is */ + /* capable of detecting simple errors like memory leaks or double */ + /* deletes. To compile it within your build of the library, you */ + /* should define FT_DEBUG_MEMORY here. */ + /* */ + /* Note that the memory debugger is only activated at runtime when */ + /* when the _environment_ variable "FT_DEBUG_MEMORY" is also defined! */ + /* */ +#undef FT_DEBUG_MEMORY + + + /*************************************************************************/ + /* */ + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work. */ + /* */ + /* This must be greater than 4kByte. */ + /* */ +#define FT_RENDER_POOL_SIZE 16384L + + + /*************************************************************************/ + /* */ + /* FT_MAX_MODULES */ + /* */ + /* The maximum number of modules that can be registered in a single */ + /* FreeType library object. 16 is the default. */ + /* */ +#define FT_MAX_MODULES 16 + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ + /* embedded bitmaps in all formats using the SFNT module (namely */ + /* TrueType & OpenType). */ + /* */ +#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ + /* load and enumerate the glyph Postscript names in a TrueType or */ + /* OpenType file. */ + /* */ + /* Note that when you do not compile the `PSNames' module by undefining */ + /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ + /* contain additional code used to read the PS Names table from a font. */ + /* */ + /* (By default, the module uses `PSNames' to extract glyph names.) */ + /* */ +#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ + /* access the internal name table in a SFNT-based format like TrueType */ + /* or OpenType. The name table contains various strings used to */ + /* describe the font, like family name, copyright, version, etc. It */ + /* does not contain any glyph name though. */ + /* */ + /* Accessing SFNT names is done through the functions declared in */ + /* `freetype/ftnames.h'. */ + /* */ +#define TT_CONFIG_OPTION_SFNT_NAMES + + + /*************************************************************************/ + /* */ + /* TrueType CMap support */ + /* */ + /* Here you can fine-tune which TrueType CMap table format shall be */ + /* supported. */ +#define TT_CONFIG_CMAP_FORMAT_0 +#define TT_CONFIG_CMAP_FORMAT_2 +#define TT_CONFIG_CMAP_FORMAT_4 +#define TT_CONFIG_CMAP_FORMAT_6 +#define TT_CONFIG_CMAP_FORMAT_8 +#define TT_CONFIG_CMAP_FORMAT_10 +#define TT_CONFIG_CMAP_FORMAT_12 + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ + /* a bytecode interpreter in the TrueType driver. Note that there are */ + /* important patent issues related to the use of the interpreter. */ + /* */ + /* By undefining this, you will only compile the code necessary to load */ + /* TrueType glyphs without hinting. */ + /* */ +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ + /* bytecode interpreter with a huge switch statement, rather than a call */ + /* table. This results in smaller and faster code for a number of */ + /* architectures. */ + /* */ + /* Note however that on some compiler/processor combinations, undefining */ + /* this macro will generate faster, though larger, code. */ + /* */ +#define TT_CONFIG_OPTION_INTERPRETER_SWITCH + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ + /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ + /* required. */ + /* */ +#define T1_MAX_DICT_DEPTH 5 + + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ +#define T1_MAX_SUBRS_CALLS 16 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ + /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ + /* */ +#define T1_MAX_CHARSTRINGS_OPERANDS 256 + + + /*************************************************************************/ + /* */ + /* Define T1_CONFIG_OPTION_DISABLE_HINTER if you want to generate a */ + /* driver with no hinter. This can be useful to debug the parser. */ + /* */ +#undef T1_CONFIG_OPTION_DISABLE_HINTER + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ + /* files into an existing face. Note that if set, the T1 driver will be */ + /* unable to produce kerning distances. */ + /* */ +#define T1_CONFIG_OPTION_NO_AFM + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of the Multiple Masters font support in the Type 1 */ + /* driver. */ + /* */ +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT + + /* */ + +FT_END_HEADER + + +#endif /* __FTOPTION_H__ */ + + +/* END */ Index: xc/lib/font/FreeType/ftstdlib.h diff -u /dev/null xc/lib/font/FreeType/ftstdlib.h:1.5 --- /dev/null Thu Feb 27 12:27:49 2003 +++ xc/lib/font/FreeType/ftstdlib.h Sat Feb 22 01:00:36 2003 @@ -0,0 +1,111 @@ +/* ftstdlib.h -- modified for XFree86. */ +/* $XFree86: xc/lib/font/FreeType/ftstdlib.h,v 1.5 2003/02/22 06:00:36 dawes Exp $ */ + +#ifndef __FTSTDLIB_H__ +#define __FTSTDLIB_H__ + +#ifndef FONTMODULE + +#include <limits.h> + +#define FT_UINT_MAX UINT_MAX +#define FT_ULONG_MAX ULONG_MAX + +#include <ctype.h> + +#define ft_isalnum isalnum +#define ft_isupper isupper +#define ft_islower islower +#define ft_xdigit isxdigit + + +#include <string.h> + +#define ft_strlen strlen +#define ft_strcmp strcmp +#define ft_strncmp strncmp +#define ft_memcpy memcpy +#define ft_strcpy strcpy +#define ft_strncpy strncpy +#define ft_memset memset +#define ft_memmove memmove +#define ft_memcmp memcmp + +#include <stdio.h> + +#define ft_sprintf sprintf + +#include <stdlib.h> + +#define ft_qsort qsort +#define ft_exit exit + +#define ft_atoi atoi + +#include <setjmp.h> + +#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ + /* jmp_buf is defined as a macro */ + /* on certain platforms */ + +#define ft_setjmp setjmp /* same thing here */ +#define ft_longjmp longjmp /* " */ + + +#else + +#include "Xmd.h" +#define _XTYPEDEF_BOOL +#include "Xdefs.h" +#define DONT_DEFINE_WRAPPERS +#define DEFINE_SETJMP_WRAPPERS +#include "xf86_ansic.h" +#undef DONT_DEFINE_WRAPPERS + +#ifndef offsetof +#define offsetof(TYPE, MEMBER) ((xf86size_t)&((TYPE*)0)->MEMBER) +#endif + +#define FT_UINT_MAX 4294967295U +#ifdef LONG64 +#define FT_ULONG_MAX 18446744073709551615UL +#else +#define FT_ULONG_MAX 4294967295UL +#endif + +#define ft_isalnum xf86isalnum +#define ft_isupper xf86isupper +#define ft_islower xf86islower +#define ft_xdigit xf86isxdigit + +#define ft_strlen xf86strlen +#define ft_strcmp xf86strcmp +#define ft_strncmp xf86strncmp +#define ft_memcpy xf86memcpy +#define ft_strcpy xf86strcpy +#define ft_strncpy xf86strncpy +#define ft_memset xf86memset +#define ft_memmove xf86memmove +#define ft_memcmp xf86memcmp + +#define ft_sprintf xf86sprintf + +#define ft_qsort xf86qsort +#define ft_exit xf86exit + +#define ft_atoi xf86atoi + +#define ft_jmp_buf jmp_buf +#define ft_setjmp setjmp +#define ft_longjmp longjmp + +#endif /* FONTMODULE */ + + +#include <stdarg.h> + + +#endif /* __FTSTDLIB_H__ */ + + +/* END */ Index: xc/lib/font/FreeType/ftsystem.c diff -u /dev/null xc/lib/font/FreeType/ftsystem.c:1.3 --- /dev/null Thu Feb 27 12:27:50 2003 +++ xc/lib/font/FreeType/ftsystem.c Mon Sep 30 20:02:10 2002 @@ -0,0 +1,329 @@ +/***************************************************************************/ +/* */ +/* ftsystem.c */ +/* */ +/* ANSI-specific FreeType low-level system interface (body). */ +/* */ +/* Copyright 1996-2001, 2002 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* Modified for XFree86. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + +/* Modified for XFree86 */ +/* $XFree86: xc/lib/font/FreeType/ftsystem.c,v 1.3 2002/10/01 00:02:10 alanh Exp $ */ + + /*************************************************************************/ + /* */ + /* This file contains the default interface used by FreeType to access */ + /* low-level, i.e. memory management, i/o access as well as thread */ + /* synchronisation. It can be replaced by user-specific routines if */ + /* necessary. */ + /* */ + /*************************************************************************/ + + +#include <ft2build.h> +#include FT_CONFIG_CONFIG_H +#include FT_INTERNAL_DEBUG_H +#include FT_SYSTEM_H +#include FT_ERRORS_H +#include FT_TYPES_H + +#ifndef FONTMODULE +#include <stdio.h> +#include <stdlib.h> +#else +#include "Xmd.h" +#define _XTYPEDEF_BOOL +#include "Xdefs.h" +#define DONT_DEFINE_WRAPPERS +#include "xf86_ansic.h" +#undef DONT_DEFINE_WRAPPERS +#define malloc(x) xf86malloc(x) +#define realloc(x, y) xf86realloc(x, y) +#define free(x) xf86free(x) +#define FILE XF86FILE +#define fopen(x, y) xf86fopen(x, y) +#define fclose(x) xf86fclose(x) +#define fseek(x, y, z) xf86fseek(x, y, z) +#define ftell(x) xf86ftell(x) +#define SEEK_SET XF86_SEEK_SET +#define SEEK_END XF86_SEEK_END +#define fread(x, y, z, t) xf86fread(x, y, z, t) +#endif + + + /*************************************************************************/ + /* */ + /* MEMORY MANAGEMENT INTERFACE */ + /* */ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* It is not necessary to do any error checking for the */ + /* allocation-related functions. This will be done by the higher level */ + /* routines like FT_Alloc() or FT_Realloc(). */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* ft_alloc */ + /* */ + /* <Description> */ + /* The memory allocation function. */ + /* */ + /* <Input> */ + /* memory :: A pointer to the memory object. */ + /* */ + /* size :: The requested size in bytes. */ + /* */ + /* <Return> */ + /* The address of newly allocated block. */ + /* */ + FT_CALLBACK_DEF( void* ) + ft_alloc( FT_Memory memory, + long size ) + { + FT_UNUSED( memory ); + + return malloc( size ); + } + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* ft_realloc */ + /* */ + /* <Description> */ + /* The memory reallocation function. */ + /* */ + /* <Input> */ + /* memory :: A pointer to the memory object. */ + /* */ + /* cur_size :: The current size of the allocated memory block. */ + /* */ + /* new_size :: The newly requested size in bytes. */ + /* */ + /* block :: The current address of the block in memory. */ + /* */ + /* <Return> */ + /* The address of the reallocated memory block. */ + /* */ + FT_CALLBACK_DEF( void* ) + ft_realloc( FT_Memory memory, + long cur_size, + long new_size, + void* block ) + { + FT_UNUSED( memory ); + FT_UNUSED( cur_size ); + + return realloc( block, new_size ); + } + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* ft_free */ + /* */ + /* <Description> */ + /* The memory release function. */ + /* */ + /* <Input> */ + /* memory :: A pointer to the memory object. */ + /* */ + /* block :: The address of block in memory to be freed. */ + /* */ + FT_CALLBACK_DEF( void ) + ft_free( FT_Memory memory, + void* block ) + { + FT_UNUSED( memory ); + + free( block ); + } + + + /*************************************************************************/ + /* */ + /* RESOURCE MANAGEMENT INTERFACE */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ + /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ + /* messages during execution. */ + /* */ +#undef FT_COMPONENT +#define FT_COMPONENT trace_io + + /* We use the macro STREAM_FILE for convenience to extract the */ + /* system-specific stream handle from a given FreeType stream object */ +#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer ) + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* ft_ansi_stream_close */ + /* */ + /* <Description> */ + /* The function to close a stream. */ + /* */ + /* <Input> */ + /* stream :: A pointer to the stream object. */ + /* */ + FT_CALLBACK_DEF( void ) + ft_ansi_stream_close( FT_Stream stream ) + { + fclose( STREAM_FILE( stream ) ); + + stream->descriptor.pointer = NULL; + stream->size = 0; + stream->base = 0; + } + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* ft_ansi_stream_io */ + /* */ + /* <Description> */ + /* The function to open a stream. */ + /* */ + /* <Input> */ + /* stream :: A pointer to the stream object. */ + /* */ + /* offset :: The position in the data stream to start reading. */ + /* */ + /* buffer :: The address of buffer to store the read data. */ + /* */ + /* count :: The number of bytes to read from the stream. */ + /* */ + /* <Return> */ + /* The number of bytes actually read. */ + /* */ + FT_CALLBACK_DEF( unsigned long ) + ft_ansi_stream_io( FT_Stream stream, + unsigned long offset, + unsigned char* buffer, + unsigned long count ) + { + FILE* file; + + + file = STREAM_FILE( stream ); + + fseek( file, offset, SEEK_SET ); + + return (unsigned long)fread( buffer, 1, count, file ); + } + + + /* documentation is in ftobjs.h */ + + FT_EXPORT_DEF( FT_Error ) + FT_Stream_Open( FT_Stream stream, + const char* filepathname ) + { + FILE* file; + + + if ( !stream ) + return FT_Err_Invalid_Stream_Handle; + + file = fopen( filepathname, "rb" ); + if ( !file ) + { + FT_ERROR(( "FT_Stream_Open:" )); + FT_ERROR(( " could not open `%s'\n", filepathname )); + + return FT_Err_Cannot_Open_Resource; + } + + fseek( file, 0, SEEK_END ); + stream->size = ftell( file ); + fseek( file, 0, SEEK_SET ); + + stream->descriptor.pointer = file; + stream->pathname.pointer = (char*)filepathname; + stream->pos = 0; + + stream->read = ft_ansi_stream_io; + stream->close = ft_ansi_stream_close; + + FT_TRACE1(( "FT_Stream_Open:" )); + FT_TRACE1(( " opened `%s' (%d bytes) successfully\n", + filepathname, stream->size )); + + return FT_Err_Ok; + } + + +#ifdef FT_DEBUG_MEMORY + + extern FT_Int + ft_mem_debug_init( FT_Memory memory ); + + extern void + ft_mem_debug_done( FT_Memory memory ); + +#endif + + + /* documentation is in ftobjs.h */ + + FT_EXPORT_DEF( FT_Memory ) + FT_New_Memory( void ) + { + FT_Memory memory; + + + memory = (FT_Memory)malloc( sizeof ( *memory ) ); + if ( memory ) + { + memory->user = 0; + memory->alloc = ft_alloc; + memory->realloc = ft_realloc; + memory->free = ft_free; +#ifdef FT_DEBUG_MEMORY + ft_mem_debug_init( memory ); +#endif + } + + return memory; + } + + + /* documentation is in ftobjs.h */ + + FT_EXPORT_DEF( void ) + FT_Done_Memory( FT_Memory memory ) + { +#ifdef FT_DEBUG_MEMORY + ft_mem_debug_done( memory ); +#endif +#undef free + memory->free( memory, memory ); + } + + +/* END */ Index: xc/lib/font/FreeType/fttools.c diff -u /dev/null xc/lib/font/FreeType/fttools.c:1.4 --- /dev/null Thu Feb 27 12:27:50 2003 +++ xc/lib/font/FreeType/fttools.c Tue Feb 25 16:36:54 2003 @@ -0,0 +1,188 @@ +/* + Copyright (c) 1997 by Mark Leisher + Copyright (c) 1998-2002 by Juliusz Chroboczek + + 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 + AUTHORS OR COPYRIGHT HOLDERS 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/font/FreeType/fttools.c,v 1.4 2003/02/25 21:36:54 dawes Exp $ */ + +#include "fontmisc.h" +#ifndef FONTMODULE +#include <ctype.h> +#include <string.h> +#else +#include "Xmd.h" +#include "Xdefs.h" +#include "xf86_ansic.h" +#endif + +#include "font.h" +#include "freetype/freetype.h" +#include "freetype/ftsnames.h" +#include "freetype/ttnameid.h" +#include "ft.h" + +#ifndef LSBFirst +#define LSBFirst 0 +#define MSBFirst 1 +#endif + +#define LOBYTE(s,byte) ((byte)==LSBFirst?*(char*)(s):*((char*)(s)+1)) +#define HIBYTE(s,byte) ((byte)==LSBFirst?*((char*)(s)+1):*(char*)(s)) + +int FTtoXReturnCode(int rc) +{ + if(rc == 0x40) + return AllocError; + else return BadFontFormat; +} + +/* Convert slen bytes from UCS-2 to ISO 8859-1. Byte specifies the + endianness of the string, max the maximum number of bytes written into + to. */ +int +FTu2a(int slen, char *from, char *to, int byte, int max) +{ + int i, n; + + n = 0; + for (i = 0; i < slen; i += 2) { + if(n >= max) + break; + if(HIBYTE(from+i, byte)!=0) + *to++='?'; + else + *to++ = LOBYTE(from+i,byte); + n++; + } + *to = 0; + return n; +} + +static int +FTGetName(FT_Face face, int nid, int pid, int eid, FT_SfntName *name_return) +{ + FT_SfntName name; + int n, i; + + n = FT_Get_Sfnt_Name_Count(face); + if(n <= 0) + return 0; + + for(i = 0; i < n; i++) { + if(FT_Get_Sfnt_Name(face, i, &name)) + continue; + if(name.name_id == nid && + name.platform_id == pid && + (eid < 0 || name.encoding_id == eid)) { + switch(name.platform_id) { + case TT_PLATFORM_APPLE_UNICODE: + case TT_PLATFORM_MACINTOSH: + if(name.language_id != TT_MAC_LANGID_ENGLISH) + continue; + break; + case TT_PLATFORM_MICROSOFT: + if(name.language_id != TT_MS_LANGID_ENGLISH_UNITED_STATES && + name.language_id != TT_MS_LANGID_ENGLISH_UNITED_KINGDOM) + break; + continue; + break; + default: + break; + } + *name_return = name; + return 1; + } + } + return 0; +} + +int +FTGetEnglishName(FT_Face face, int nid, char *name_return, int name_len) +{ + FT_SfntName name; + int len; + + if(FTGetName(face, nid, + TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, &name) || + FTGetName(face, nid, + TT_PLATFORM_APPLE_UNICODE, -1, &name)) + return FTu2a(name.string_len, name.string, name_return, + MSBFirst, name_len); + + /* Pretend that Apple Roman is ISO 8859-1. */ + if(FTGetName(face, nid, TT_PLATFORM_MACINTOSH, TT_MAC_ID_ROMAN, &name)) { + len = name.string_len; + if(len > name_len) + len = name_len; + memcpy(name_return, name.string, name_len); + return len; + } + + /* Must be some font that can only be named in Polish or something. */ + return -1; +} + +int +FTcheckForTTCName(char *fileName, char **realFileName, int *faceNumber) +{ + int length; + int fn; + int i, j; + char *start, *realName; + + length = strlen(fileName); + if(length < 4) + return 0; + + if(strcasecmp(fileName + (length-4), ".ttc") != 0 && + strcasecmp(fileName + (length-4), ".otc") != 0) + return 0; + + realName = xalloc(length + 1); + if(realName == NULL) + return 0; + + strcpy(realName, fileName); + *realFileName=realName; + start = strchr(realName, ':'); + if(start) { + fn=0; + i=1; + while(isdigit(start[i])) { + fn *= 10; + fn += start[i]-'0'; + i++; + } + if(start[i]==':') { + *faceNumber = fn; + i++; + j = 0; + while(start[i]) { + start[j++] = start[i++]; + } + start[j] = '\0'; + return 1; + } + } + + *faceNumber = 0; + return 1; +} Index: xc/lib/font/FreeType/fttypes.h diff -u /dev/null xc/lib/font/FreeType/fttypes.h:1.3 --- /dev/null Thu Feb 27 12:27:50 2003 +++ xc/lib/font/FreeType/fttypes.h Mon Sep 30 20:02:10 2002 @@ -0,0 +1,538 @@ +/***************************************************************************/ +/* */ +/* fttypes.h */ +/* */ +/* FreeType simple types definitions (specification only). */ +/* */ +/* Copyright 1996-2001 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* Modified for XFree86. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ +/* $XFree86: xc/lib/font/FreeType/fttypes.h,v 1.3 2002/10/01 00:02:10 alanh Exp $ */ + +#ifndef __FTTYPES_H__ +#define __FTTYPES_H__ + + +#include <ft2build.h> +#include FT_SYSTEM_H +#include FT_IMAGE_H + +#ifndef FONTMODULE +#include <stddef.h> +#else +#include "Xmd.h" +#define _XTYPEDEF_BOOL +#include "Xdefs.h" +#include "xf86_ansic.h" +#ifndef size_t +#define DONT_DEFINE_WRAPPERS +#define size_t xf86size_t +#undef DONT_DEFINE_WRAPPERS +#endif +#endif + +FT_BEGIN_HEADER + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* basic_types */ + /* */ + /* <Title> */ + /* Basic Types */ + /* */ + /* <Abstract> */ + /* The basic data types defined by the library. */ + /* */ + /* <Description> */ + /* This section contains the basic data types defined by FreeType 2, */ + /* ranging from simple scalar types to font specific ones. */ + /* */ + /* <Order> */ + /* FT_Byte */ + /* FT_Char */ + /* FT_Int */ + /* FT_UInt */ + /* FT_Short */ + /* FT_UShort */ + /* FT_Long */ + /* FT_ULong */ + /* FT_Bool */ + /* FT_Offset */ + /* FT_PtrDist */ + /* FT_Error */ + /* FT_Fixed */ + /* FT_Pointer */ + /* FT_Pos */ + /* FT_Vector */ + /* FT_BBox */ + /* FT_Matrix */ + /* */ + /* FT_Generic */ + /* FT_Generic_Finalizer */ + /* */ + /* FT_Bitmap */ + /* FT_Pixel_Mode */ + /* FT_Palette_Mode */ + /* FT_Glyph_Format */ + /* FT_IMAGE_TAG */ + /* FT_Glyph_Format */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Bool */ + /* */ + /* <Description> */ + /* A typedef of unsigned char, used for simple booleans. */ + /* */ + typedef unsigned char FT_Bool; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_FWord */ + /* */ + /* <Description> */ + /* A signed 16-bit integer used to store a distance in original font */ + /* units. */ + /* */ + typedef signed short FT_FWord; /* distance in FUnits */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UFWord */ + /* */ + /* <Description> */ + /* An unsigned 16-bit integer used to store a distance in original */ + /* font units. */ + /* */ + typedef unsigned short FT_UFWord; /* unsigned distance */ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Char */ + /* */ + /* <Description> */ + /* A simple typedef for the _signed_ char type. */ + /* */ + typedef signed char FT_Char; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Byte */ + /* */ + /* <Description> */ + /* A simple typedef for the _unsigned_ char type. */ + /* */ + typedef unsigned char FT_Byte; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_String */ + /* */ + /* <Description> */ + /* A simple typedef for the char type, usually used for strings. */ + /* */ + typedef char FT_String; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Short */ + /* */ + /* <Description> */ + /* A typedef for signed short. */ + /* */ + typedef signed short FT_Short; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UShort */ + /* */ + /* <Description> */ + /* A typedef for unsigned short. */ + /* */ + typedef unsigned short FT_UShort; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Int */ + /* */ + /* <Description> */ + /* A typedef for the int type. */ + /* */ + typedef int FT_Int; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_UInt */ + /* */ + /* <Description> */ + /* A typedef for the unsigned int type. */ + /* */ + typedef unsigned int FT_UInt; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Long */ + /* */ + /* <Description> */ + /* A typedef for signed long. */ + /* */ + typedef signed long FT_Long; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ULong */ + /* */ + /* <Description> */ + /* A typedef for unsigned long. */ + /* */ + typedef unsigned long FT_ULong; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F2Dot14 */ + /* */ + /* <Description> */ + /* A signed 2.14 fixed float type used for unit vectors. */ + /* */ + typedef signed short FT_F2Dot14; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_F26Dot6 */ + /* */ + /* <Description> */ + /* A signed 26.6 fixed float type used for vectorial pixel */ + /* coordinates. */ + /* */ + typedef signed long FT_F26Dot6; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Fixed */ + /* */ + /* <Description> */ + /* This type is used to store 16.16 fixed float values, like scales */ + /* or matrix coefficients. */ + /* */ + typedef signed long FT_Fixed; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Error */ + /* */ + /* <Description> */ + /* The FreeType error code type. A value of 0 is always interpreted */ + /* as a successful operation. */ + /* */ + typedef int FT_Error; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Pointer */ + /* */ + /* <Description> */ + /* A simple typedef for a typeless pointer. */ + /* */ + typedef void* FT_Pointer; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_Offset */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI C `size_t' type, i.e. the largest */ + /* _unsigned_ integer type used to express a file size or position, */ + /* or a memory block size. */ + /* */ + typedef size_t FT_Offset; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_PtrDist */ + /* */ + /* <Description> */ + /* This is equivalent to the ANSI C `ptrdiff_t' type, i.e. the */ + /* largest _signed_ integer type used to express the distance */ + /* between two pointers. */ + /* */ + typedef size_t FT_PtrDist; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_UnitVector */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2D vector unit vector. Uses */ + /* FT_F2Dot14 types. */ + /* */ + /* <Fields> */ + /* x :: Horizontal coordinate. */ + /* */ + /* y :: Vertical coordinate. */ + /* */ + typedef struct FT_UnitVector_ + { + FT_F2Dot14 x; + FT_F2Dot14 y; + + } FT_UnitVector; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Matrix */ + /* */ + /* <Description> */ + /* A simple structure used to store a 2x2 matrix. Coefficients are */ + /* in 16.16 fixed float format. The computation performed is: */ + /* */ + /* { */ + /* x' = x*xx + y*xy */ + /* y' = x*yx + y*yy */ + /* } */ + /* */ + /* <Fields> */ + /* xx :: Matrix coefficient. */ + /* */ + /* xy :: Matrix coefficient. */ + /* */ + /* yx :: Matrix coefficient. */ + /* */ + /* yy :: Matrix coefficient. */ + /* */ + typedef struct FT_Matrix_ + { + FT_Fixed xx, xy; + FT_Fixed yx, yy; + + } FT_Matrix; + + + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* FT_Generic_Finalizer */ + /* */ + /* <Description> */ + /* Describes a function used to destroy the `client' data of any */ + /* FreeType object. See the description of the FT_Generic type for */ + /* details of usage. */ + /* */ + /* <Input> */ + /* The address of the FreeType object which is under finalization. */ + /* Its client data is accessed through its `generic' field. */ + /* */ + typedef void (*FT_Generic_Finalizer)(void* object); + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_Generic */ + /* */ + /* <Description> */ + /* Client applications often need to associate their own data to a */ + /* variety of FreeType core objects. For example, a text layout API */ + /* might want to associate a glyph cache to a given size object. */ + /* */ + /* Most FreeType object contains a `generic' field, of type */ + /* FT_Generic, which usage is left to client applications and font */ + /* servers. */ + /* */ + /* It can be used to store a pointer to client-specific data, as well */ + /* as the address of a `finalizer' function, which will be called by */ + /* FreeType when the object is destroyed (for example, the previous */ + /* client example would put the address of the glyph cache destructor */ + /* in the `finalizer' field). */ + /* */ + /* <Fields> */ + /* data :: A typeless pointer to any client-specified data. This */ + /* field is completely ignored by the FreeType library. */ + /* */ + /* finalizer :: A pointer to a `generic finalizer' function, which */ + /* will be called when the object is destroyed. If this */ + /* field is set to NULL, no code will be called. */ + /* */ + typedef struct FT_Generic_ + { + void* data; + FT_Generic_Finalizer finalizer; + + } FT_Generic; + + + /*************************************************************************/ + /* */ + /* <Macro> */ + /* FT_MAKE_TAG */ + /* */ + /* <Description> */ + /* This macro converts four letter tags which are used to label */ + /* TrueType tables into an unsigned long to be used within FreeType. */ + /* */ +#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \ + ( ( (FT_ULong)_x1 << 24 ) | \ + ( (FT_ULong)_x2 << 16 ) | \ + ( (FT_ULong)_x3 << 8 ) | \ + (FT_ULong)_x4 ) + + + /*************************************************************************/ + /*************************************************************************/ + /* */ + /* L I S T M A N A G E M E N T */ + /* */ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Section> */ + /* list_processing */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_ListNode */ + /* */ + /* <Description> */ + /* Many elements and objects in FreeType are listed through a */ + /* FT_List record (see FT_ListRec). As its name suggests, a */ + /* FT_ListNode is a handle to a single list element. */ + /* */ + typedef struct FT_ListNodeRec_* FT_ListNode; + + + /*************************************************************************/ + /* */ + /* <Type> */ + /* FT_List */ + /* */ + /* <Description> */ + /* A handle to a list record (see FT_ListRec). */ + /* */ + typedef struct FT_ListRec_* FT_List; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListNodeRec */ + /* */ + /* <Description> */ + /* A structure used to hold a single list element. */ + /* */ + /* <Fields> */ + /* prev :: The previous element in the list. NULL if first. */ + /* */ + /* next :: The next element in the list. NULL if last. */ + /* */ + /* data :: A typeless pointer to the listed object. */ + /* */ + typedef struct FT_ListNodeRec_ + { + FT_ListNode prev; + FT_ListNode next; + void* data; + + } FT_ListNodeRec; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_ListRec */ + /* */ + /* <Description> */ + /* A structure used to hold a simple doubly-linked list. These are */ + /* used in many parts of FreeType. */ + /* */ + /* <Fields> */ + /* head :: The head (first element) of doubly-linked list. */ + /* */ + /* tail :: The tail (last element) of doubly-linked list. */ + /* */ + typedef struct FT_ListRec_ + { + FT_ListNode head; + FT_ListNode tail; + + } FT_ListRec; + + + /* */ + +#define FT_IS_EMPTY( list ) ( (list).head == 0 ) + + /* return base error code (without module-specific prefix) */ +#define FT_ERROR_BASE( x ) ( (x) & 0xFF ) + + /* return module error code */ +#define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U ) + +#define FT_BOOL( x ) ( (FT_Bool)( x ) ) + +FT_END_HEADER + +#endif /* __FTTYPES_H__ */ + + +/* END */ Index: xc/lib/font/FreeType/ftutil.c diff -u xc/lib/font/FreeType/ftutil.c:1.11 xc/lib/font/FreeType/ftutil.c:removed --- xc/lib/font/FreeType/ftutil.c:1.11 Fri Aug 11 17:12:42 2000 +++ xc/lib/font/FreeType/ftutil.c Thu Feb 27 12:27:50 2003 @@ -1,251 +0,0 @@ -/* -Copyright (c) 1997 by Mark Leisher -Copyright (c) 1998 by Juliusz Chroboczek - -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 -AUTHORS OR COPYRIGHT HOLDERS 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/font/FreeType/ftutil.c,v 1.11 2000/08/11 21:12:42 dawes Exp $ */ - -#ifndef FONTMODULE -#include <ctype.h> -#endif -#include "font.h" -#include "ttconfig.h" -#include "freetype.h" -#include "ft.h" - -#ifndef LSBFirst -#define LSBFirst 0 -#define MSBFirst 1 -#endif - -#define LOBYTE(s,byte) ((byte)==LSBFirst?*(char*)(s):*((char*)(s)+1)) -#define HIBYTE(s,byte) ((byte)==LSBFirst?*((char*)(s)+1):*(char*)(s)) - -static unsigned char a2i[128] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -static unsigned char odigits[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static unsigned char ddigits[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static unsigned char hdigits[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, - 0x7e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -#define isdigok(m, d) (m[(d) >> 3] & (1 << ((d) & 7))) - -long -ttf_atol(char *s, char **end, int base) -{ - long v, neg; - unsigned char *dmap; - - if (s==0 || *s==0) - return 0; - - /* - * Make sure the radix is something recognizable. Default to 10. - */ - switch (base) { - case 8: dmap = odigits; break; - case 16: dmap = hdigits; break; - default: base = 10; dmap = ddigits; break; - } - - /* - * Check for a minus sign. - */ - neg = 0; - if (*s=='-') { - s++; - neg = 1; - } - - /* - * Check for the special hex prefix. - */ - if (*s=='0' && (*(s + 1)=='x' || *(s + 1)=='X')) { - base = 16; - dmap = hdigits; - s += 2; - } - - for (v = 0; isdigok(dmap, *s); s++) - v = (v * base) + a2i[(int) *s]; - - if (end != 0) - *end = s; - - return (!neg) ? v : -v; -} - -/* Take slen bytes from a Unicode string and convert them to ISO - * 8859-1. byte specifies the endianness of the string. */ -int -ttf_u2a(int slen, char *from, char *to, int byte) -{ - int i; - - for (i = 0; i < slen; i += 2) { - if(HIBYTE(from+i,byte)!=0) - *to++='?'; - else - *to++ = LOBYTE(from+i,byte); - } - *to = 0; - return (slen >> 1); -} - - -int FTtoXReturnCode(int rc) -{ - if(rc>>8==0x01) - return AllocError; - else return BadFontFormat; -} - - - -/* A generic routine to get a name from the TT name table. This - * routine tries to get a name in English. The encoding will be - * converted to ISO 8859-1. - * - * The particular name ID mut be provided (e.g. nameID = 0 for - * copyright string, nameID = 6 for Postscript name, nameID = 1 for - * typeface name. - * - * Returns the number of bytes added, -1 on failure. */ - -int -ttf_GetEnglishName(TT_Face face, char *name, int nameID) -{ - int i, nrec; - unsigned short slen; - unsigned short nrPlatformID, nrEncodingID, nrLanguageID, nrNameID; - char *s; - - nrec = TT_Get_Name_Count(face); - - for (i = 0; i < nrec; i++) { - if(TT_Get_Name_ID(face, i, &nrPlatformID, &nrEncodingID, - &nrLanguageID, &nrNameID)) - continue; - if (/* check for Microsoft, Unicode, English */ - (nrPlatformID==3 && nrEncodingID==1 && - nrNameID==nameID && - (nrLanguageID==0x0409 || nrLanguageID==0x0809 || - nrLanguageID==0x0c09 || nrLanguageID==0x1009 || - nrLanguageID==0x1409 || nrLanguageID==0x1809)) || - /* or for Apple, Unicode, English */ - ((nrPlatformID==0 && nrNameID==nameID && - nrLanguageID==0))) { - if(!TT_Get_Name_String(face, i, &s, &slen)) - return ttf_u2a(slen, s, name, MSBFirst); - } - } - - /* Must be some dodgy font. Pretend that Apple Roman is ISO 8859-1. */ - for (i = 0; i < nrec; i++) { - if(TT_Get_Name_ID(face, i, &nrPlatformID, &nrEncodingID, - &nrLanguageID, &nrNameID)) - continue; - /* Check for Apple, Roman, English */ - if (nrPlatformID==1 && nrEncodingID==0 && - nrLanguageID==0 && nrNameID==nameID) { - TT_Get_Name_String(face, i, &s, &slen); - memcpy(name,s,slen); - name[slen]=0; - return slen; - } - } - - /* Must be some font that can only be named in Polish or something. */ - return -1; -} - -int -ttf_checkForTTCName(char *fileName, char **realFileName, int *faceNumber) -{ - int length; - int fn; - int i, j; - char *start, *realName; - - length=strlen(fileName); - if(length<4) - return 0; - - if(strcasecmp(fileName+(length-4), ".ttc")) - return 0; - - if (!(realName = xalloc(length + 1))) - return 0; - - strcpy(realName, fileName); - *realFileName=realName; - start = strchr(realName, ':'); - if (start) { - fn=0; - i=1; - while(isdigit(start[i])) { - fn*=10; - fn+=start[i]-'0'; - i++; - } - if(start[i]==':') { - *faceNumber=fn; - i++; - j = 0; - while (start[i]) { - start[j++] = start[i++]; - } - start[j] = '\0'; - return 1; - } - } - - *faceNumber=0; - return 1; -} Index: xc/lib/font/FreeType/module/Imakefile diff -u xc/lib/font/FreeType/module/Imakefile:1.6 xc/lib/font/FreeType/module/Imakefile:1.11 --- xc/lib/font/FreeType/module/Imakefile:1.6 Sat Aug 14 06:49:17 1999 +++ xc/lib/font/FreeType/module/Imakefile Wed Oct 16 10:16:25 2002 @@ -1,41 +1,63 @@ -XCOMM $XFree86: xc/lib/font/FreeType/module/Imakefile,v 1.6 1999/08/14 10:49:17 dawes Exp $ +XCOMM $XFree86: xc/lib/font/FreeType/module/Imakefile,v 1.11 2002/10/16 14:16:25 tsi Exp $ -XCOMM Imakefile created for the Freetype TrueType renderer. -XCOMM Mark Leisher <mleisher@crl.nmsu.edu> -XCOMM Juliusz Chroboczek <jec@dcs.ed.ac.uk> +FT2SOURCEDIR = $(TOP)/extras/freetype2/src +FT2INCDIR = $(TOP)/extras/freetype2/include #define IHaveModules #include <Server.tmpl> -/* - * Note: mmap support isn't enabled here because it might not work on all - * architectures that might be using the portable modules. - * - * XXX It might be reasonable to allow that if MakeDllModules is set to YES. - */ - -DEFINES = -DTT_MAKE_OPTION_SINGLE_OBJECT=1 -DFONTMODULE - -/* Much of the source is simply #included by freetype.c */ -INCLUDES = -I.. -I$(FONTINCSRC) -I../../include -I$(XTOP)/include \ - -I$(SERVERSRC)/include -I$(FTSOURCEDIR)/lib \ - -I$(FTSOURCEDIR)/lib/extend -I$(FTSOURCEDIR)/lib/arch/unix +DEFINES = -DFONTMODULE -SRCS = ftfuncs.c ftenc.c ftutil.c freetype.c ftxcmap.c ftmodule.c +INCLUDES = -I.. -I$(FONTINCSRC) -I../../include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/include \ + -I$(FT2INCDIR) \ + -I$(FT2SOURCEDIR)/base \ + -I$(FT2SOURCEDIR)/raster \ + -I$(FT2SOURCEDIR)/sfnt \ + -I$(FT2SOURCEDIR)/truetype \ + -I$(FT2SOURCEDIR)/cff \ + -I$(FT2SOURCEDIR)/type1 \ + -I$(FT2SOURCEDIR)/psaux \ + -I$(FT2SOURCEDIR)/psnames \ + -I$(FT2SOURCEDIR)/pshinter \ + -I$(FT2SOURCEDIR)/autohint \ + -I$(INCLUDESRC) + +FT2SRCS = ftbase.c ftinit.c ftglyph.c ftsystem.c fttype1.c ftxf86.c \ + raster.c sfnt.c truetype.c cff.c type1.c \ + psaux.c psnames.c pshinter.c autohint.c +FT2OBJS = ftbase.o ftinit.o ftglyph.o ftsystem.o fttype1.o ftxf86.o \ + raster.o sfnt.o truetype.o cff.o type1.o \ + psaux.o psnames.o pshinter.o autohint.o -OBJS = ftfuncs.o ftenc.o ftutil.o freetype.o ftxcmap.o ftmodule.o +SRCS = ftfuncs.c ftenc.c fttools.c $(FT2SRCS) ftmodule.c +OBJS = ftfuncs.o ftenc.o fttools.o $(FT2OBJS) ftmodule.o -LinkSourceFile(freetype.c,$(FTSOURCEDIR)/lib/arch/unix) -LinkSourceFile(ftxcmap.c,$(FTSOURCEDIR)/lib/extend) LinkSourceFile(ftenc.c,..) LinkSourceFile(ftfuncs.c,..) -LinkSourceFile(ftutil.c,..) +LinkSourceFile(fttools.c,..) +LinkSourceFile(ftbase.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(ftinit.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(ftglyph.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(ftsystem.c,..) +LinkSourceFile(ftutil.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(fttype1.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(ftxf86.c,$(FT2SOURCEDIR)/base) +LinkSourceFile(raster.c,$(FT2SOURCEDIR)/raster) +LinkSourceFile(sfnt.c,$(FT2SOURCEDIR)/sfnt) +LinkSourceFile(truetype.c,$(FT2SOURCEDIR)/truetype) +LinkSourceFile(cff.c,$(FT2SOURCEDIR)/cff) +LinkSourceFile(type1.c,$(FT2SOURCEDIR)/type1) +LinkSourceFile(psaux.c,$(FT2SOURCEDIR)/psaux) +LinkSourceFile(psnames.c,$(FT2SOURCEDIR)/psnames) +LinkSourceFile(pshinter.c,$(FT2SOURCEDIR)/pshinter) +LinkSourceFile(autohint.c,$(FT2SOURCEDIR)/autohint) + ModuleObjectRule() LibraryModuleTarget(freetype,$(OBJS)) InstallLibraryModule(freetype,$(MODULEDIR),fonts) DependTarget() - InstallDriverSDKLibraryModule(freetype,$(DRIVERSDKMODULEDIR),fonts) Index: xc/lib/font/FreeType/module/ftmodule.c diff -u xc/lib/font/FreeType/module/ftmodule.c:1.10 xc/lib/font/FreeType/module/ftmodule.c:1.14 --- xc/lib/font/FreeType/module/ftmodule.c:1.10 Tue Sep 4 09:49:16 2001 +++ xc/lib/font/FreeType/module/ftmodule.c Wed Feb 12 22:01:45 2003 @@ -1,5 +1,5 @@ /* - * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. + * Copyright (C) 1998-2002 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 @@ -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.10 2001/09/04 13:49:16 dawes Exp $ */ +/* $XFree86: xc/lib/font/FreeType/module/ftmodule.c,v 1.14 2003/02/13 03:01:45 dawes Exp $ */ #include "misc.h" @@ -44,7 +44,7 @@ MODINFOSTRING1, MODINFOSTRING2, XF86_VERSION_CURRENT, - 1, 1, 10, + 2, 0, 2, ABI_CLASS_FONT, /* Font module */ ABI_FONT_VERSION, MOD_CLASS_FONT, Index: xc/lib/font/Speedo/set_trns.c diff -u xc/lib/font/Speedo/set_trns.c:1.4 xc/lib/font/Speedo/set_trns.c:1.5 --- xc/lib/font/Speedo/set_trns.c:1.4 Mon Aug 27 15:49:50 2001 +++ xc/lib/font/Speedo/set_trns.c Wed Sep 18 13:11:44 2002 @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/set_trns.c,v 1.4 2001/08/27 19:49:50 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/set_trns.c,v 1.5 2002/09/18 17:11:44 tsi Exp $ */ @@ -128,8 +128,8 @@ intsize[7] = 0; intsize[8] = 0; -n = ((format & BIT6)? (fix15)NEXT_BYTE(pointer): 0) + - ((format & BIT7)? (fix15)NEXT_BYTE(pointer): 0); +n = ((format & BIT6)? (fix15)NEXT_BYTE(pointer): 0); +n += ((format & BIT7)? (fix15)NEXT_BYTE(pointer): 0); for (i = 0; i < n; i++) /* For each entry in int table ... */ { format = NEXT_BYTE(pointer); /* Read format byte */ Index: xc/lib/font/Speedo/sperr.c diff -u xc/lib/font/Speedo/sperr.c:1.6 xc/lib/font/Speedo/sperr.c:1.7 --- xc/lib/font/Speedo/sperr.c:1.6 Fri Dec 14 14:56:41 2001 +++ xc/lib/font/Speedo/sperr.c Fri May 31 14:45:48 2002 @@ -52,11 +52,11 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/sperr.c,v 1.6 2001/12/14 19:56:41 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/sperr.c,v 1.7 2002/05/31 18:45:48 dawes Exp $ */ #include "spint.h" -#ifndef FONT_MODULE +#ifndef FONTMODULE #include <stdarg.h> #endif Index: xc/lib/font/Speedo/spinfo.c diff -u xc/lib/font/Speedo/spinfo.c:1.12 xc/lib/font/Speedo/spinfo.c:1.13 --- xc/lib/font/Speedo/spinfo.c:1.12 Fri Dec 14 14:56:42 2001 +++ xc/lib/font/Speedo/spinfo.c Tue Sep 10 12:14:33 2002 @@ -49,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.12 2001/12/14 19:56:42 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.13 2002/09/10 16:14:33 tsi Exp $ */ #include "fntfilst.h" #include "fontutil.h" @@ -359,6 +359,7 @@ pinfo->isStringProp = (char *) 0; xfree(pinfo->props); pinfo->props = (FontPropPtr) 0; + pinfo->nprops = 0; return; } bzero(pinfo->isStringProp, (sizeof(char) * nprops)); Index: xc/lib/font/Speedo/module/Imakefile diff -u xc/lib/font/Speedo/module/Imakefile:1.5 xc/lib/font/Speedo/module/Imakefile:1.6 --- xc/lib/font/Speedo/module/Imakefile:1.5 Sat Aug 14 06:49:18 1999 +++ xc/lib/font/Speedo/module/Imakefile Wed Feb 13 16:32:47 2002 @@ -1,10 +1,10 @@ -XCOMM $XFree86: xc/lib/font/Speedo/module/Imakefile,v 1.5 1999/08/14 10:49:18 dawes Exp $ +XCOMM $XFree86: xc/lib/font/Speedo/module/Imakefile,v 1.6 2002/02/13 21:32:47 dawes Exp $ #define IHaveModules #include <Server.tmpl> INCLUDES = -I$(FONTINCSRC) -I../../include -I$(SERVERSRC)/include \ - -I$(XTOP)/include -I../ + -I$(XINCLUDESRC) -I../ HEADERS = DEFINES = -DFONTMODULE Index: xc/lib/font/Type1/Imakefile diff -u xc/lib/font/Type1/Imakefile:1.11 xc/lib/font/Type1/Imakefile:1.12 --- xc/lib/font/Type1/Imakefile:1.11 Mon Aug 27 13:40:58 2001 +++ xc/lib/font/Type1/Imakefile Wed Feb 13 16:32:48 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/font/Type1/Imakefile,v 1.11 2001/08/27 17:40:58 dawes Exp $ +XCOMM $XFree86: xc/lib/font/Type1/Imakefile,v 1.12 2002/02/13 21:32:48 dawes Exp $ #if BuildServer && DoLoadableServer #define IHaveSubdirs @@ -12,7 +12,7 @@ SUBDIRS = module #endif -INCLUDES = -I$(FONTINCSRC) -I../include -I$(XTOP)/include \ +INCLUDES = -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) \ -I$(SERVERSRC)/include #if BuildCID Index: xc/lib/font/Type1/arith.c diff -u xc/lib/font/Type1/arith.c:1.5 xc/lib/font/Type1/arith.c:1.6 --- xc/lib/font/Type1/arith.c:1.5 Wed Jan 17 14:43:21 2001 +++ xc/lib/font/Type1/arith.c Mon Feb 18 15:51:57 2002 @@ -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.5 2001/01/17 19:43:21 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/arith.c,v 1.6 2002/02/18 20:51:57 herrb Exp $ */ /* ARITH CWEB V0006 ******** */ /* @@ -215,7 +215,7 @@ divisor >>= 1; if ((u1u2 >> (LONGSIZE - shift)) != 0 && shift != 0) - abort("DLdiv: dividend too large"); + Abort("DLdiv: dividend too large"); u1u2 = (u1u2 << shift) + ((shift == 0) ? 0 : u3u4 >> (LONGSIZE - shift)); u3u4 <<= shift; @@ -278,7 +278,7 @@ */ u1u2 = t; if (HIGHDIGIT(u1u2) != 0) - abort("divide algorithm error"); + Abort("divide algorithm error"); u1u2 = ASSEMBLE(u1u2, LOWDIGIT(u3)); u3 = LOWDIGIT(u3u4); q3q4 = ASSEMBLE(q3q4, qhat); Index: xc/lib/font/Type1/curves.c diff -u xc/lib/font/Type1/curves.c:1.7 xc/lib/font/Type1/curves.c:1.8 --- xc/lib/font/Type1/curves.c:1.7 Mon Aug 27 15:49:52 2001 +++ xc/lib/font/Type1/curves.c Mon Feb 18 15:51:57 2002 @@ -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.7 2001/08/27 19:49:52 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/curves.c,v 1.8 2002/02/18 20:51:57 herrb Exp $ */ /* :h1.CURVES Module - Stepping Beziers @@ -216,7 +216,7 @@ if ( TOOBIG(xB) || TOOBIG(yB) || TOOBIG(xC) || TOOBIG(yC) || TOOBIG(xD) || TOOBIG(yD) ) - abort("Beziers this big not yet supported"); + Abort("Beziers this big not yet supported"); return(StepBezierRecurse(&Info, (fractpel) 0, (fractpel) 0, xB, yB, xC, yC, xD, yD)); Index: xc/lib/font/Type1/hints.c diff -u xc/lib/font/Type1/hints.c:1.6 xc/lib/font/Type1/hints.c:1.7 --- xc/lib/font/Type1/hints.c:1.6 Mon Aug 27 15:49:52 2001 +++ xc/lib/font/Type1/hints.c Mon Feb 18 15:51:57 2002 @@ -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.6 2001/08/27 19:49:52 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/hints.c,v 1.7 2002/02/18 20:51:57 herrb Exp $ */ /* HINTS CWEB V0006 ******** */ /* @@ -170,7 +170,7 @@ } else /* error */ { - abort("ComputeHint: invalid orientation"); + Abort("ComputeHint: invalid orientation"); } IfTrace4((HintDebug > 1), @@ -204,7 +204,7 @@ } else /* error */ { - abort("ComputeHint: invalid hinttype"); + Abort("ComputeHint: invalid hinttype"); } IfTrace1((HintDebug > 1)," hintValue=%p", hintValue); @@ -221,7 +221,7 @@ } else /* error */ { - abort("ComputeHint: invalid orientation"); + Abort("ComputeHint: invalid orientation"); } } @@ -270,7 +270,7 @@ } else /* error */ { - abort("ProcessHint: invalid label"); + Abort("ProcessHint: invalid label"); } } else if (hP->adjusttype == 'r') /* Reverse */ @@ -286,18 +286,18 @@ } else /* error */ { - abort("ProcessHint: label is not in use"); + Abort("ProcessHint: label is not in use"); } } else /* error */ { - abort("ProcessHint: invalid label"); + Abort("ProcessHint: invalid label"); } } else /* error */ { - abort("ProcessHint: invalid adjusttype"); + Abort("ProcessHint: invalid adjusttype"); } IfTrace3((HintDebug > 1)," label=%d, thisHint=(%p,%p)\n", hP->label, thisHint.x, thisHint.y); @@ -389,7 +389,7 @@ else return(XofY(edge, y)); - abort("bad subpath chain"); + Abort("bad subpath chain"); /*NOTREACHED*/ } /* @@ -471,7 +471,7 @@ else if (ISBOTTOM(e1->flag) && y == e1->ymax) return(!ISDOWN(e2->flag)); else - abort("ImpliedHorizontalLine: why ask?"); + Abort("ImpliedHorizontalLine: why ask?"); /*NOTREACHED*/ } @@ -510,7 +510,7 @@ if (!ISBREAK(edge, next)) continue; if (edge->ymax < next->ymin) - abort("disjoint subpath?"); + Abort("disjoint subpath?"); /* 'edge' now contains an edgelist at the bottom of an edge, and 'next' contains the next subsequent edgelist in the subpath, which must be at @@ -571,7 +571,7 @@ break1->subpath = break2->subpath; if (ISBREAK(break1, break1->subpath)) - abort("unable to fix subpath break?"); + Abort("unable to fix subpath break?"); break2->subpath = next; Index: xc/lib/font/Type1/objects.c diff -u xc/lib/font/Type1/objects.c:1.9 xc/lib/font/Type1/objects.c:1.10 --- xc/lib/font/Type1/objects.c:1.9 Wed Jan 17 14:43:22 2001 +++ xc/lib/font/Type1/objects.c Mon Feb 18 15:51:57 2002 @@ -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.9 2001/01/17 19:43:22 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/objects.c,v 1.10 2002/02/18 20:51:57 herrb Exp $ */ /* OBJECTS CWEB V0025 ******** */ /* :h1.OBJECTS Module - TYPE1IMAGER Objects Common Routines @@ -306,14 +306,14 @@ size = (size + sizeof(long) - 1) & -(int)sizeof(long); extra = (extra + sizeof(long) - 1) & -(int)sizeof(long); if (size + extra <= 0) - abort("Non-positive allocate?"); + Abort("Non-positive allocate?"); r = (struct xobject *) xiMalloc(size + extra); while (r == NULL) { if (!GimeSpace()) { IfTrace1(TRUE, "malloc attempted %d bytes.\n", size + extra); - abort("We have REALLY run out of memory"); + Abort("We have REALLY run out of memory"); } r = (struct xobject *) xiMalloc(size + extra); } @@ -366,7 +366,7 @@ struct xobject *obj = (struct xobject *)objPtr; /* structure to free */ if (obj->type == INVALIDTYPE) - abort("Free of already freed object?"); + Abort("Free of already freed object?"); obj->type = INVALIDTYPE; if (MemoryDebug > 1) { @@ -803,7 +803,7 @@ char name[NAMESIZE]; /* buffer to store my copy of 'username' */ if (strlen(username) >= (unsigned)NAMESIZE) - abort("Pragmatics name too large"); + Abort("Pragmatics name too large"); strcpy(name, username); for (p = name; *p != '\0'; p++) *p = toupper(*p); @@ -986,7 +986,7 @@ ObjectPostMortem(obj); if (MustCrash) - abort("Terminating because of CrashOnUserError..."); + Abort("Terminating because of CrashOnUserError..."); else ErrorMessage = typemsg; @@ -1064,14 +1064,14 @@ if (obj != NULL) ObjectPostMortem(obj); if (MustCrash) - abort("Terminating because of CrashOnUserError..."); + Abort("Terminating because of CrashOnUserError..."); else ErrorMessage = string; return(ret); } /* -:h3.abort() - Crash Due to Error +:h3.Abort() - Crash Due to Error Defined in objects.h to be FatalError(), the server's abort routine. */ @@ -1112,7 +1112,7 @@ /* if (sizeof(short) != 2 || sizeof(INT32) != 4) - abort("Fundamental TYPE1IMAGER assumptions invalid in this port"); + Abort("Fundamental TYPE1IMAGER assumptions invalid in this port"); */ InitSpaces(); InitFonts(); Index: xc/lib/font/Type1/objects.h diff -u xc/lib/font/Type1/objects.h:1.12 xc/lib/font/Type1/objects.h:1.14 --- xc/lib/font/Type1/objects.h:1.12 Mon Aug 27 15:49:52 2001 +++ xc/lib/font/Type1/objects.h Tue Dec 24 12:42:59 2002 @@ -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.12 2001/08/27 19:49:52 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/objects.h,v 1.14 2002/12/24 17:42:59 tsi Exp $ */ /*SHARED*/ /*END SHARED*/ @@ -97,7 +97,8 @@ #ifndef OS_H extern void FatalError(const char *f, ...) -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#if defined(__GNUC__) && \ + ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4))) __attribute((noreturn)) #endif ; @@ -105,8 +106,7 @@ extern void ErrorF(const char *f, ...); #endif -#undef abort -#define abort(line) FatalError(line) +#define Abort(line) FatalError(line) #define Allocate(n,t,s) t1_Allocate(n,t,s) #define Free(obj) t1_Free(obj) #define NonObjectFree(a) xiFree((long *)(a)) Index: xc/lib/font/Type1/paths.c diff -u xc/lib/font/Type1/paths.c:1.6 xc/lib/font/Type1/paths.c:1.7 --- xc/lib/font/Type1/paths.c:1.6 Mon Aug 27 15:49:53 2001 +++ xc/lib/font/Type1/paths.c Mon Feb 18 15:51:57 2002 @@ -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.6 2001/08/27 19:49:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/paths.c,v 1.7 2002/02/18 20:51:57 herrb Exp $ */ /* PATHS CWEB V0021 ******** */ /* @@ -792,7 +792,7 @@ break; default: - abort("Reverse: bad path segment"); + Abort("Reverse: bad path segment"); } /* We need to reverse the order of segments too, so we break this segment @@ -860,7 +860,7 @@ for (p=p0; p->link->link != NULL; p=p->link) { ; } if (!LASTCLOSED(p->link->flag)) - abort("UnClose: no LASTCLOSED"); + Abort("UnClose: no LASTCLOSED"); Free(SplitPath(p0, p)); p0->flag &= ~ISCLOSED(ON); @@ -1025,7 +1025,7 @@ default: IfTrace1(TRUE,"path = %z\n", p); - abort("PathTransform: invalid segment"); + Abort("PathTransform: invalid segment"); } oldx += savex; oldy += savey; @@ -1177,7 +1177,7 @@ break; default: - abort("QueryPath: unknown segment"); + Abort("QueryPath: unknown segment"); } if (coerced) KillPath(path); @@ -1319,7 +1319,7 @@ case HINTTYPE: break; default: - abort("QueryBounds: unknown type"); + Abort("QueryBounds: unknown type"); } if (x < min.x) min.x = x; Index: xc/lib/font/Type1/regions.c diff -u xc/lib/font/Type1/regions.c:3.7 xc/lib/font/Type1/regions.c:3.8 --- xc/lib/font/Type1/regions.c:3.7 Mon Aug 27 15:49:53 2001 +++ xc/lib/font/Type1/regions.c Mon Feb 18 15:51:57 2002 @@ -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.7 2001/08/27 19:49:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/regions.c,v 3.8 2002/02/18 20:51:57 herrb Exp $ */ /* REGIONS CWEB V0023 LOTS */ /* :h1 id=regions.REGIONS Module - Regions Operator Handler @@ -234,7 +234,7 @@ register struct edgelist *next; /* loop variable */ if (area->references < 0) - abort("KillRegion: negative reference count"); + Abort("KillRegion: negative reference count"); if ( (--(area->references) > 1) || ( (area->references == 1) && !ISPERMANENT(area->flag) ) ) return; @@ -300,7 +300,7 @@ IfTrace2((RegionDebug),"....new edge: ymin=%d, ymax=%d ", (long)ymin, (long) ymax); if (ymin >= ymax) - abort("newedge: height not positive"); + Abort("newedge: height not positive"); /* We are going to copy the xvalues into a newly allocated area. It helps performance if the values are all "long" aligned. We can test @@ -366,7 +366,7 @@ for (p = beg; p != right; p = p->link) { if (p->link == NULL && right != NULL) - abort("discard(): ran off end"); + Abort("discard(): ran off end"); IfTrace1((RegionDebug > 0),"discarding %x\n", p); p->ymin = p->ymax = 32767; end = p; @@ -426,7 +426,7 @@ } while (area != NULL && area->ymin == y); if (count != 0) - abort("Unwind: uneven edges"); + Abort("Unwind: uneven edges"); } } /* @@ -651,7 +651,7 @@ break; default: - abort("Interior: path type error"); + Abort("Interior: path type error"); } /* We're done with this segment. Advance to the next path segment in @@ -730,7 +730,7 @@ } if (ymax < ymin) - abort("negative sized edge?"); + Abort("negative sized edge?"); (*R->newedgefcn)(R, R->edgexmin, R->edgexmax, ymin, ymax, @@ -974,9 +974,9 @@ if (y < list->ymin) break; if (y >= list->ymax) - abort("splitedge: above top of list"); + Abort("splitedge: above top of list"); if (y == list->ymin) - abort("splitedge: would be null"); + Abort("splitedge: would be null"); r = (struct edgelist *)Allocate(sizeof(struct edgelist), list, 0); /* @@ -1016,7 +1016,7 @@ Then, we return the caller a pointer to 'new': */ if (new == NULL) - abort("null splitedge"); + Abort("null splitedge"); lastlist->link = NULL; last->link = list; IfTrace1((RegionDebug > 1),"yields %x\n", new); @@ -1033,7 +1033,7 @@ register struct edgelist *bottom; /* bottommost region */ { if (BOTTOM(top) > TOP(bottom)) - abort("vertjoin not disjoint"); + Abort("vertjoin not disjoint"); for (; top->link != NULL; top=top->link) { ; } @@ -1141,7 +1141,7 @@ h0 = h = edge->ymax - edge->ymin; if (h <= 0) - abort("SwathUnion: 0 height swath?"); + Abort("SwathUnion: 0 height swath?"); before = before0; after = before->link; @@ -1446,7 +1446,7 @@ for (edge=region->anchor; VALIDEDGE(edge); edge=next) { if (edge->link == NULL) - abort("UnJumble: unpaired edge?"); + Abort("UnJumble: unpaired edge?"); next = edge->link->link; edge->link->link = NULL; anchor = SortSwath(anchor, edge, t1_SwathUnion); @@ -1484,9 +1484,9 @@ if (xmin != xmax || (xmin != R->xmin && xmax != R->xmax)) R->flag &= ~ISRECTANGULAR(ON); if (xmin < e->xmin || xmax > e->xmax) - abort("Tighten: existing edge bound was bad"); + Abort("Tighten: existing edge bound was bad"); if (xmin < R->xmin || xmax > R->xmax) - abort("Tighten: existing region bound was bad"); + Abort("Tighten: existing region bound was bad"); e->xmin = xmin; e->xmax = xmax; } @@ -1675,13 +1675,13 @@ edgecheck(struct edgelist *edge, int oldmin, int oldmax) { if (edge->type != EDGETYPE) - abort("EDGE ERROR: non EDGETYPE in list"); + Abort("EDGE ERROR: non EDGETYPE in list"); /* The following check is not valid if the region is jumbled so I took it out: */ /* if (edge->ymin < oldmax && edge->ymin != oldmin) - abort("EDGE ERROR: overlapping swaths"); */ + Abort("EDGE ERROR: overlapping swaths"); */ } static pel RegionDebugYMin = MINPEL; Index: xc/lib/font/Type1/spaces.c diff -u xc/lib/font/Type1/spaces.c:3.9 xc/lib/font/Type1/spaces.c:3.10 --- xc/lib/font/Type1/spaces.c:3.9 Mon Aug 27 15:49:53 2001 +++ xc/lib/font/Type1/spaces.c Mon Feb 18 15:51:57 2002 @@ -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.9 2001/08/27 19:49:53 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/spaces.c,v 3.10 2002/02/18 20:51:57 herrb Exp $ */ /* SPACES CWEB V0021 ******** */ /* :h1 id=spaces.SPACES Module - Handles Coordinate Spaces @@ -215,7 +215,7 @@ int rc = -1; /* return code for QueryDeviceState */ if (rc != 0) /* we only bother with this check once */ - abort("Context: QueryDeviceState didn't work"); + Abort("Context: QueryDeviceState didn't work"); M[0][0] = M[1][0] = M[0][1] = M[1][1] = 0.0; @@ -233,7 +233,7 @@ M[1][0] = -Yres; M[0][1] = -Xres; break; default: - abort("QueryDeviceState returned invalid orientation"); + Abort("QueryDeviceState returned invalid orientation"); } return(FindContext(M)); } @@ -257,7 +257,7 @@ if (i >= nextcontext) { if (i >= MAXCONTEXTS) - abort("Context: out of them"); + Abort("Context: out of them"); LONGCOPY(contexts[i].normal, M, sizeof(contexts[i].normal)); MatrixInvert(M, contexts[i].inverse); nextcontext++; @@ -896,7 +896,7 @@ D = M[1][1] * M[0][0] - M[1][0] * M[0][1]; if (D == 0.0) - abort("MatrixInvert: can't"); + Abort("MatrixInvert: can't"); Mprime[0][0] = tyy / D; Mprime[1][0] = -txy / D; Index: xc/lib/font/Type1/t1funcs.c diff -u xc/lib/font/Type1/t1funcs.c:3.26 xc/lib/font/Type1/t1funcs.c:3.30 --- xc/lib/font/Type1/t1funcs.c:3.26 Fri Dec 14 14:56:44 2001 +++ xc/lib/font/Type1/t1funcs.c Mon Dec 9 12:29:59 2002 @@ -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.26 2001/12/14 19:56:44 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1funcs.c,v 3.30 2002/12/09 17:29:59 dawes Exp $ */ /* @@ -341,7 +341,7 @@ bzero(cid, sizeof(cidglyphs)); /* heuristic for "maximum" size of pool we'll need: */ - size = 200000 + 120 * + size = 200000 + 600 * (int)hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) * sizeof(short); if (size < 0 || NULL == (pool = (long *) xalloc(size))) { @@ -549,9 +549,9 @@ /* heuristic for "maximum" size of pool we'll need: */ #ifdef BUILDCID - size = 400000 + 120 * + size = 400000 + 600 * #else - size = 200000 + 120 * + size = 200000 + 600 * #endif (int)hypot(vals->pixel_matrix[2], vals->pixel_matrix[3]) * sizeof(short); @@ -1390,7 +1390,7 @@ break; } default: - abort("xiFill: unknown format"); + Abort("xiFill: unknown format"); } } @@ -1469,11 +1469,11 @@ #ifdef BUILDCID Type1InitStdProps(); for (i=0; i < sizeof(Type1RendererInfo) / sizeof(FontRendererRec); i++) - FontFileRegisterRenderer(&Type1RendererInfo[i]); + FontFilePriorityRegisterRenderer(&Type1RendererInfo[i], -10); #else T1InitStdProps(); for (i=0; i < sizeof(renderers) / sizeof(FontRendererRec); i++) - FontFileRegisterRenderer(&renderers[i]); + FontFilePriorityRegisterRenderer(&renderers[i], -10); #endif } @@ -1549,7 +1549,7 @@ #define PAD(bits, pad) (((bits)+(pad)-1)&-(pad)) /* heuristic for "maximum" size of pool we'll need: */ - size = 200000 + 120 * + size = 200000 + 600 * (int)hypot(cid->pixel_matrix[2], cid->pixel_matrix[3]) * sizeof(short); if (size < 0 || NULL == (pool = (long *) xalloc(size))) { Index: xc/lib/font/Type1/t1info.c diff -u xc/lib/font/Type1/t1info.c:1.17 xc/lib/font/Type1/t1info.c:1.18 --- xc/lib/font/Type1/t1info.c:1.17 Fri Dec 14 14:56:44 2001 +++ xc/lib/font/Type1/t1info.c Tue Sep 10 12:14:33 2002 @@ -99,7 +99,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.17 2001/12/14 19:56:44 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.18 2002/09/10 16:14:33 tsi Exp $ */ #include "fntfilst.h" #include "fontutil.h" @@ -627,6 +627,7 @@ pInfo->isStringProp = (char *) 0; xfree(pInfo->props); pInfo->props = (FontPropPtr) 0; + pInfo->nprops = 0; return; } bzero(pInfo->isStringProp, (sizeof(char) * nprops)); Index: xc/lib/font/Type1/t1malloc.c diff -u xc/lib/font/Type1/t1malloc.c:1.10 xc/lib/font/Type1/t1malloc.c:1.11 --- xc/lib/font/Type1/t1malloc.c:1.10 Wed Jul 25 11:04:55 2001 +++ xc/lib/font/Type1/t1malloc.c Mon Feb 18 15:51:57 2002 @@ -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.10 2001/07/25 15:04:55 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1malloc.c,v 1.11 2002/02/18 20:51:57 herrb Exp $ */ /* MALLOC CWEB V0004 LOTS */ /* :h1.MALLOC - Fast Memory Allocation @@ -46,7 +46,7 @@ #else #include "os.h" #endif -#include "objects.h" /* get #define for abort() */ +#include "objects.h" /* get #define for Abort() */ /* @@ -240,9 +240,9 @@ the block is allocated) and should be repeated at the end of the block. */ if (size >= 0) - abort("free: bad size"); + Abort("free: bad size"); if (addr[-1 - size] != size) - abort("free: mismatched size"); + Abort("free: mismatched size"); /* Now make this a 'freeblock' structure and tack it on the FRONT of the free list (where uncombined blocks go): @@ -290,12 +290,12 @@ p = firstcombined->back; if (p == &firstfree) - abort("why are we combining?"); + Abort("why are we combining?"); addr = (long *) p; size = - p->size; if (--uncombined < 0) - abort("too many combine()s"); + Abort("too many combine()s"); if (addr[-1] < 0 && addr[size] < 0) { /* @@ -319,7 +319,7 @@ *addr = COMBINED; /* might help debug */ addr -= size2; if (addr[0] != size2) - abort("bad block above"); + Abort("bad block above"); unhook((struct freeblock *)addr); size += size2; } @@ -334,7 +334,7 @@ if (size2 > 0) { /* i.e., block below is free */ p->size = COMBINED; if (size2 != ((long *) p)[size2 - 1]) - abort("bad block below"); + Abort("bad block below"); unhook(p); size += size2; } @@ -587,7 +587,7 @@ for (i=0; i < MAXAREAS; i++) if (freearea[i] == NULL) break; if (i >= MAXAREAS) - abort("too many addmemory()s"); + Abort("too many addmemory()s"); aaddr = (long *) ( ((long) addr + sizeof(double) - 1) & - (long)sizeof(double) ); size -= (char *) aaddr - (char *) addr; freearea[i] = aaddr; @@ -644,13 +644,13 @@ for (p = firstfree.fore, i=uncombined; p != firstcombined; p = p->fore) { if (--i < 0) - abort("too many uncombined areas"); + Abort("too many uncombined areas"); size = p->size; printf(". . . area @ %p, size = %ld\n", p, -size); if (size >= 0 || size != ((int *) p)[-1 - size]) - abort("dumpchain: bad size"); + Abort("dumpchain: bad size"); if (p->back != back) - abort("dumpchain: bad back"); + Abort("dumpchain: bad back"); back = p; } printf("DUMPING COMBINED FREE LIST:\n"); @@ -658,13 +658,13 @@ size = p->size; printf(". . . area @ %p, size = %ld\n", p, size); if (size <= 0 || size != ((int *) p)[size - 1]) - abort("dumpchain: bad size"); + Abort("dumpchain: bad size"); if (p->back != back) - abort("dumpchain: bad back"); + Abort("dumpchain: bad back"); back = p; } if (back != lastfree.back) - abort("dumpchain: bad lastfree"); + Abort("dumpchain: bad lastfree"); } #ifdef notused @@ -708,20 +708,20 @@ printf("Free %ld bytes at %p\n", size * sizeof(long), area); if (size == 0) - abort("zero sized memory block"); + Abort("zero sized memory block"); for (p = firstfree.fore; p != NULL; p = p->fore) if ((long *) p == area) break; if ((long *) p != area) - abort("not found on forward chain"); + Abort("not found on forward chain"); for (p = lastfree.back; p != NULL; p = p->back) if ((long *) p == area) break; if ((long *) p != area) - abort("not found on backward chain"); + Abort("not found on backward chain"); } if (area[0] != area[size - 1]) - abort("unmatched check sizes"); + Abort("unmatched check sizes"); area += size; wholesize -= size; } Index: xc/lib/font/Type1/t1stub.c diff -u xc/lib/font/Type1/t1stub.c:1.8 xc/lib/font/Type1/t1stub.c:1.9 --- xc/lib/font/Type1/t1stub.c:1.8 Wed Jan 17 14:43:24 2001 +++ xc/lib/font/Type1/t1stub.c Mon Feb 18 15:51:57 2002 @@ -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.8 2001/01/17 19:43:24 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1stub.c,v 1.9 2002/02/18 20:51:57 herrb Exp $ */ #ifdef FONTMODULE #include "Xdefs.h" /* Bool declaration */ @@ -38,13 +38,13 @@ #include <stdio.h> #include "os.h" #endif -#include "objects.h" /* get #define for abort() */ +#include "objects.h" /* get #define for Abort() */ static void xiStub(void) { printf("xiStub called\n"); - abort("xiStub called"); + Abort("xiStub called"); } void Index: xc/lib/font/Type1/module/Imakefile diff -u xc/lib/font/Type1/module/Imakefile:1.6 xc/lib/font/Type1/module/Imakefile:1.7 --- xc/lib/font/Type1/module/Imakefile:1.6 Sat Aug 14 06:49:18 1999 +++ xc/lib/font/Type1/module/Imakefile Wed Feb 13 16:32:48 2002 @@ -1,9 +1,9 @@ -XCOMM $XFree86: xc/lib/font/Type1/module/Imakefile,v 1.6 1999/08/14 10:49:18 dawes Exp $ +XCOMM $XFree86: xc/lib/font/Type1/module/Imakefile,v 1.7 2002/02/13 21:32:48 dawes Exp $ #define IHaveModules #include <Server.tmpl> -INCLUDES = -I$(FONTINCSRC) -I../ -I../../include -I$(XTOP)/include \ +INCLUDES = -I$(FONTINCSRC) -I../ -I../../include -I$(XINCLUDESRC) \ -I$(SERVERSRC)/include #if BuildCID Index: xc/lib/font/Type1/module/type1mod.c diff -u xc/lib/font/Type1/module/type1mod.c:1.9 xc/lib/font/Type1/module/type1mod.c:1.10 --- xc/lib/font/Type1/module/type1mod.c:1.9 Tue Sep 4 09:49:16 2001 +++ xc/lib/font/Type1/module/type1mod.c Mon Dec 9 12:29:59 2002 @@ -23,7 +23,7 @@ * dealings in this Software without prior written authorization from the * XFree86 Project. */ -/* $XFree86: xc/lib/font/Type1/module/type1mod.c,v 1.9 2001/09/04 13:49:16 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/module/type1mod.c,v 1.10 2002/12/09 17:29:59 dawes Exp $ */ #include "misc.h" @@ -44,7 +44,7 @@ MODINFOSTRING1, MODINFOSTRING2, XF86_VERSION_CURRENT, - 1, 0, 1, + 1, 0, 2, ABI_CLASS_FONT, /* Font module */ ABI_FONT_VERSION, MOD_CLASS_FONT, Index: xc/lib/font/X-TrueType/Imakefile diff -u xc/lib/font/X-TrueType/Imakefile:1.8 xc/lib/font/X-TrueType/Imakefile:1.9 --- xc/lib/font/X-TrueType/Imakefile:1.8 Mon Aug 27 13:40:58 2001 +++ xc/lib/font/X-TrueType/Imakefile Wed Feb 13 16:32:48 2002 @@ -1,5 +1,5 @@ XCOMM X-TrueType Server - TrueType rasterizer for X -XCOMM $XFree86: xc/lib/font/X-TrueType/Imakefile,v 1.8 2001/08/27 17:40:58 dawes Exp $ +XCOMM $XFree86: xc/lib/font/X-TrueType/Imakefile,v 1.9 2002/02/13 21:32:48 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" @@ -9,7 +9,7 @@ #endif INCLUDES = -I. -I$(FONTINCSRC) -I../include -I../fontcache \ - -I$(XTOP)/include -I$(SERVERSRC)/include \ + -I$(XINCLUDESRC) -I$(SERVERSRC)/include \ -I$(FTSOURCEDIR)/lib -I$(FTSOURCEDIR)/lib/extend \ -I$(FTSOURCEDIR)/lib/arch/unix -I$(FONTLIBSRC)/FreeType Index: xc/lib/font/X-TrueType/module/Imakefile diff -u xc/lib/font/X-TrueType/module/Imakefile:1.7 xc/lib/font/X-TrueType/module/Imakefile:1.8 --- xc/lib/font/X-TrueType/module/Imakefile:1.7 Tue Nov 28 14:09:30 2000 +++ xc/lib/font/X-TrueType/module/Imakefile Wed Feb 13 16:32:48 2002 @@ -1,5 +1,5 @@ XCOMM X-TrueType Server - TrueType rasterizer for X -XCOMM $XFree86: xc/lib/font/X-TrueType/module/Imakefile,v 1.7 2000/11/28 19:09:30 dawes Exp $ +XCOMM $XFree86: xc/lib/font/X-TrueType/module/Imakefile,v 1.8 2002/02/13 21:32:48 dawes Exp $ #define IHaveModules #include <Server.tmpl> @@ -12,7 +12,7 @@ */ INCLUDES = -I.. -I$(FONTINCSRC) -I../../include -I../../fontcache \ - -I$(TOP)/include -I$(SERVERSRC)/include \ + -I$(XINCLUDESRC) -I$(SERVERSRC)/include \ -I$(FTSOURCEDIR)/lib -I$(FTSOURCEDIR)/lib/extend \ -I$(FTSOURCEDIR)/lib/arch/unix -I$(FONTLIBSRC)/FreeType Index: xc/lib/font/bitmap/bdfread.c diff -u xc/lib/font/bitmap/bdfread.c:1.11 xc/lib/font/bitmap/bdfread.c:1.12 --- xc/lib/font/bitmap/bdfread.c:1.11 Fri Dec 14 14:56:45 2001 +++ xc/lib/font/bitmap/bdfread.c Tue Sep 10 12:14:34 2002 @@ -50,7 +50,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bdfread.c,v 1.11 2001/12/14 19:56:45 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bdfread.c,v 1.12 2002/09/10 16:14:34 tsi Exp $ */ #ifndef FONTMODULE #include <ctype.h> @@ -602,6 +602,7 @@ } pFont->info.isStringProp = NULL; pFont->info.props = NULL; + pFont->info.nprops = 0; stringProps = (char *) xalloc((nProps + BDF_GENPROPS) * sizeof(char)); pFont->info.isStringProp = stringProps; Index: xc/lib/font/bitmap/bitmapfunc.c diff -u xc/lib/font/bitmap/bitmapfunc.c:3.14 xc/lib/font/bitmap/bitmapfunc.c:3.18 --- xc/lib/font/bitmap/bitmapfunc.c:3.14 Fri Dec 14 14:56:46 2001 +++ xc/lib/font/bitmap/bitmapfunc.c Tue Sep 24 16:48:52 2002 @@ -26,7 +26,7 @@ */ -/* $XFree86: xc/lib/font/bitmap/bitmapfunc.c,v 3.14 2001/12/14 19:56:46 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitmapfunc.c,v 3.18 2002/09/24 20:48:52 tsi Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -60,10 +60,7 @@ #ifdef X_GZIP_FONT_COMPRESSION { pcfReadFont, pcfReadFontInfo} , #endif -#ifdef __EMX__ - { pcfReadFont, pcfReadFontInfo}, #endif -#endif #ifdef SNFFORMAT { snfReadFont, snfReadFontInfo}, { snfReadFont, snfReadFontInfo}, @@ -100,12 +97,6 @@ BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, CAPABILITIES }, #endif -#ifdef __EMX__ - { ".pcz", 4, - BitmapOpenBitmap, BitmapOpenScalable, - BitmapGetInfoBitmap, BitmapGetInfoScalable, 0, - CAPABILITIES }, -#endif #endif #ifdef SNFFORMAT { ".snf", 4, BitmapOpenBitmap, BitmapOpenScalable, @@ -161,7 +152,8 @@ if (!file) return BadFontName; if (!(pFont = CreateFontRec())) { - fprintf(stderr, "Error: Couldn't allocate pFont (%d)\n", sizeof(FontRec)); + fprintf(stderr, "Error: Couldn't allocate pFont (%ld)\n", + (unsigned long)sizeof(FontRec)); FontFileClose (file); return AllocError; } Index: xc/lib/font/bitmap/bitmaputil.c diff -u xc/lib/font/bitmap/bitmaputil.c:1.7 xc/lib/font/bitmap/bitmaputil.c:1.11 --- xc/lib/font/bitmap/bitmaputil.c:1.7 Fri Dec 14 14:56:46 2001 +++ xc/lib/font/bitmap/bitmaputil.c Tue Feb 18 20:22:34 2003 @@ -27,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bitmaputil.c,v 1.7 2001/12/14 19:56:46 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitmaputil.c,v 1.11 2003/02/19 01:22:34 dawes Exp $ */ #include "fntfilst.h" #include "bitmap.h" @@ -53,8 +53,8 @@ maxbounds->field = (ci)->field; #define COMPUTE_MINMAX(ci) \ - if ((ci)->ascent != -(ci)->descent || \ - (ci)->leftSideBearing != (ci)->rightSideBearing || \ + if ((ci)->ascent || (ci)->descent || \ + (ci)->leftSideBearing || (ci)->rightSideBearing || \ (ci)->characterWidth) \ { \ MINMAX(ascent, (ci)); \ @@ -210,7 +210,8 @@ bitmapFont = (BitmapFontPtr) pFont->fontPrivate; bitmapFont->ink_metrics = (xCharInfo *) xalloc(bitmapFont->num_chars * sizeof(xCharInfo)); if (!bitmapFont->ink_metrics) { - fprintf(stderr, "Error: Couldn't allocate ink_metrics (%d*%d)\n", bitmapFont->num_chars, sizeof(xCharInfo)); + fprintf(stderr, "Error: Couldn't allocate ink_metrics (%d*%ld)\n", + bitmapFont->num_chars, (unsigned long)sizeof(xCharInfo)); return FALSE; } for (i = 0; i < bitmapFont->num_chars; i++) Index: xc/lib/font/bitmap/bitscale.c diff -u xc/lib/font/bitmap/bitscale.c:3.22 xc/lib/font/bitmap/bitscale.c:3.29 --- xc/lib/font/bitmap/bitscale.c:3.22 Fri Dec 14 14:56:46 2001 +++ xc/lib/font/bitmap/bitscale.c Sat Jan 11 22:55:46 2003 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bitscale.c,v 3.22 2001/12/14 19:56:46 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitscale.c,v 3.29 2003/01/12 03:55:46 tsi Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -50,7 +50,7 @@ #endif /* Should get this from elsewhere */ -extern int serverGeneration; +extern unsigned long serverGeneration; static void bitmapUnloadScalable (FontPtr pFont); static void ScaleBitmap ( FontPtr pFont, CharInfoPtr opci, @@ -91,9 +91,6 @@ #ifdef X_GZIP_FONT_COMPRESSION BitmapScaleBitmaps, #endif -#ifdef __EMX__ - BitmapScaleBitmaps, -#endif #endif #ifdef SNFFORMAT BitmapScaleBitmaps, @@ -143,9 +140,6 @@ #ifdef X_GZIP_FONT_COMPRESSION FindBestToScale, #endif -#ifdef __EMX__ - FindBestToScale, -#endif FindBestToScale, FindBestToScale, #ifdef X_GZIP_FONT_COMPRESSION @@ -159,7 +153,7 @@ FindPmfToScale, }; -static unsigned long fontGeneration = 0; /* initialization flag */ +static unsigned long bitscaleGeneration = 0; /* initialization flag */ static fontProp fontNamePropTable[] = { { "FOUNDRY", 0, atom }, @@ -631,7 +625,7 @@ the matrix appropriately */ vals->pixel_matrix[0] *= rescale_x; vals->pixel_matrix[1] *= rescale_x; - #ifdef NOTDEF +#ifdef NOTDEF /* This would force the pointsize and pixelsize fields in the FONT property to display as matrices to more accurately report the font being supplied. It might also break existing @@ -639,9 +633,9 @@ vals->values_supplied = vals->values_supplied & ~(PIXELSIZE_MASK | POINTSIZE_MASK) | PIXELSIZE_ARRAY; - #else /* NOTDEF */ +#else /* NOTDEF */ vals->values_supplied = vals->values_supplied & ~POINTSIZE_MASK; - #endif /* NOTDEF */ +#endif /* NOTDEF */ /* Recompute and reround the FontScalablePtr values after rescaling for the new width. */ FontFileCompleteXLFD(vals, vals); @@ -730,16 +724,17 @@ char *isStringProp; int nProps; - if (fontGeneration != serverGeneration) { + if (bitscaleGeneration != serverGeneration) { initFontPropTable(); - fontGeneration = serverGeneration; + bitscaleGeneration = serverGeneration; } nProps = NPROPS + 1 + sizeof(fontPropTable) / sizeof(fontProp) + sizeof(rawFontPropTable) / sizeof(fontProp); fp = (FontPropPtr) xalloc(sizeof(FontPropRec) * nProps); *pProps = fp; if (!fp) { - fprintf(stderr, "Error: Couldn't allocate font properties (%d*%d)\n", sizeof(FontPropRec), nProps); + fprintf(stderr, "Error: Couldn't allocate font properties (%ld*%d)\n", + (unsigned long)sizeof(FontPropRec), nProps); return 1; } isStringProp = (char *) xalloc (nProps); @@ -925,7 +920,8 @@ bitmapFont = 0; if (!(pf = CreateFontRec())) { - fprintf(stderr, "Error: Couldn't allocate FontRec (%d)\n", sizeof(FontRec)); + fprintf(stderr, "Error: Couldn't allocate FontRec (%ld)\n", + (unsigned long)sizeof(FontRec)); goto bail; } pf->refcnt = 0; @@ -992,7 +988,8 @@ bitmapFont = (BitmapFontPtr) xalloc(sizeof(BitmapFontRec)); if (!bitmapFont) { - fprintf(stderr, "Error: Couldn't allocate bitmapFont (%d)\n", sizeof(BitmapFontRec)); + fprintf(stderr, "Error: Couldn't allocate bitmapFont (%ld)\n", + (unsigned long)sizeof(BitmapFontRec)); goto bail; } nchars = (lastRow - firstRow + 1) * (lastCol - firstCol + 1); @@ -1012,14 +1009,16 @@ bitmapFont->pDefault = 0; bitmapFont->metrics = (CharInfoPtr) xalloc(nchars * sizeof(CharInfoRec)); if (!bitmapFont->metrics) { - fprintf(stderr, "Error: Couldn't allocate metrics (%d*%d)\n", nchars, sizeof(CharInfoRec)); + fprintf(stderr, "Error: Couldn't allocate metrics (%d*%ld)\n", + nchars, (unsigned long)sizeof(CharInfoRec)); goto bail; } bitmapFont->encoding = (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nchars), sizeof(CharInfoPtr*)); if (!bitmapFont->encoding) { - fprintf(stderr, "Error: Couldn't allocate encoding (%d*%d)\n", nchars, sizeof(CharInfoPtr)); + fprintf(stderr, "Error: Couldn't allocate encoding (%d*%ld)\n", + nchars, (unsigned long)sizeof(CharInfoPtr)); goto bail; } @@ -1336,7 +1335,9 @@ (INT32 *)xalloc((newWidth + 2) * 2 * sizeof(int)); if (!diffusion_workspace) { - fprintf(stderr, "Warning: Couldn't allocate diffusion workspace (%d)\n", (newWidth + 2) * 2 * sizeof(int)); + fprintf(stderr, "Warning: Couldn't allocate diffusion" + " workspace (%ld)\n", + (newWidth + 2) * 2 * (unsigned long)sizeof(int)); xfree(char_grayscale); char_grayscale = (unsigned char *)0; } @@ -1921,6 +1922,7 @@ return ret; *pFontInfo = pfont->info; + pfont->info.nprops = 0; pfont->info.props = NULL; pfont->info.isStringProp = NULL; Index: xc/lib/font/bitmap/pcfread.c diff -u xc/lib/font/bitmap/pcfread.c:1.18 xc/lib/font/bitmap/pcfread.c:1.20 --- xc/lib/font/bitmap/pcfread.c:1.18 Fri Dec 14 14:56:47 2001 +++ xc/lib/font/bitmap/pcfread.c Sat Jan 11 22:55:46 2003 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcfread.c,v 1.18 2001/12/14 19:56:47 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcfread.c,v 1.20 2003/01/12 03:55:46 tsi Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -49,24 +49,24 @@ void #if NeedVarargsPrototypes pcfError(char* message, ...) - #else - pcfError (message, va_alist) - char* message; - va_dcl - #endif - { - va_list args; - - #if NeedVarargsPrototypes - va_start (args, message); - #else - va_start (args); - #endif - - fprintf(stderr, "PCF Error: "); - vfprintf(stderr, message, args); - va_end (args); - } +#else +pcfError (message, va_alist) + char* message; + va_dcl +#endif +{ + va_list args; + +#if NeedVarargsPrototypes + va_start(args, message); +#else + va_start(args); +#endif + + fprintf(stderr, "PCF Error: "); + vfprintf(stderr, message, args); + va_end(args); +} /* Read PCF font files */ @@ -400,6 +400,7 @@ CARD32 *offsets = 0; Bool hasBDFAccelerators; + pFont->info.nprops = 0; pFont->info.props = 0; if (!(tables = pcfReadTOC(file, &ntables))) goto Bail; @@ -660,6 +661,7 @@ xfree(bitmaps); xfree(metrics); xfree(pFont->info.props); + pFont->info.nprops = 0; pFont->info.props = 0; xfree (pFont->info.isStringProp); xfree(bitmapFont); @@ -680,6 +682,7 @@ pFontInfo->isStringProp = NULL; pFontInfo->props = NULL; + pFontInfo->nprops = 0; if (!(tables = pcfReadTOC(file, &ntables))) goto Bail; @@ -731,6 +734,7 @@ xfree(tables); return Successful; Bail: + pFontInfo->nprops = 0; xfree (pFontInfo->props); xfree (pFontInfo->isStringProp); xfree(tables); @@ -782,6 +786,7 @@ Bool hasBDFAccelerators; CharInfoPtr pci; + pFont->info.nprops = 0; pFont->info.props = 0; if (!(tables = pcfReadTOC(file, &ntables))) @@ -988,6 +993,7 @@ xfree(bitmaps); xfree(metrics); xfree(pFont->info.props); + pFont->info.nprops = 0; pFont->info.props = 0; xfree (pFont->info.isStringProp); xfree(bitmapFont); Index: xc/lib/font/bitmap/pcfwrite.c diff -u xc/lib/font/bitmap/pcfwrite.c:1.8 xc/lib/font/bitmap/pcfwrite.c:1.10 --- xc/lib/font/bitmap/pcfwrite.c:1.8 Fri Dec 14 14:56:47 2001 +++ xc/lib/font/bitmap/pcfwrite.c Sat Jan 11 22:55:46 2003 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcfwrite.c,v 1.8 2001/12/14 19:56:47 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcfwrite.c,v 1.10 2003/01/12 03:55:46 tsi Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -38,10 +38,10 @@ #include "pcf.h" extern void pcfError( - #if NeedVarargsPrototypes - char* message, ... - #endif - ); +#if NeedVarargsPrototypes + char* message, ... +#endif + ); /* Write PCF font files */ @@ -361,6 +361,7 @@ if (current_position > table->offset) { printf("can't go backwards... %d > %d\n", (int)current_position, (int)table->offset); + xfree(offsetProps); return BadFontName; } while (current_position < table->offset) @@ -464,5 +465,7 @@ break; } } + + xfree(offsetProps); return Successful; } Index: xc/lib/font/bitmap/snfread.c diff -u xc/lib/font/bitmap/snfread.c:1.10 xc/lib/font/bitmap/snfread.c:1.11 --- xc/lib/font/bitmap/snfread.c:1.10 Fri Dec 14 14:56:47 2001 +++ xc/lib/font/bitmap/snfread.c Sat Jan 11 22:55:46 2003 @@ -49,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/snfread.c,v 1.10 2001/12/14 19:56:47 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/snfread.c,v 1.11 2003/01/12 03:55:46 tsi Exp $ */ #ifndef FONTMODULE #include <ctype.h> @@ -68,24 +68,24 @@ void #if NeedVarargsPrototypes snfError(char* message, ...) - #else - snfError (message, va_alist) - char* message; - va_dcl - #endif - { - va_list args; - - #if NeedVarargsPrototypes - va_start (args, message); - #else - va_start (args); - #endif - - fprintf(stderr, "SNF Error: "); - vfprintf(stderr, message, args); - va_end (args); - } +#else +snfError (message, va_alist) + char* message; + va_dcl +#endif +{ + va_list args; + +#if NeedVarargsPrototypes + va_start(args, message); +#else + va_start(args); +#endif + + fprintf(stderr, "SNF Error: "); + vfprintf(stderr, message, args); + va_end(args); +} static void snfUnloadFont(FontPtr pFont); Index: xc/lib/font/bitmap/module/Imakefile diff -u xc/lib/font/bitmap/module/Imakefile:1.5 xc/lib/font/bitmap/module/Imakefile:1.6 --- xc/lib/font/bitmap/module/Imakefile:1.5 Fri Dec 3 14:17:18 1999 +++ xc/lib/font/bitmap/module/Imakefile Wed Feb 13 16:32:48 2002 @@ -1,10 +1,10 @@ -XCOMM $XFree86: xc/lib/font/bitmap/module/Imakefile,v 1.5 1999/12/03 19:17:18 eich Exp $ +XCOMM $XFree86: xc/lib/font/bitmap/module/Imakefile,v 1.6 2002/02/13 21:32:48 dawes Exp $ #define IHaveModules #include <Server.tmpl> INCLUDES = -I$(FONTINCSRC) -I../../include -I$(SERVERSRC)/include \ - -I$(XTOP)/include -I../ + -I$(XINCLUDESRC) -I../ HEADERS = DEFINES = -DFONTMODULE -DBDFFORMAT -DSNFFORMAT -DPCFFORMAT Index: xc/lib/font/fc/fsconvert.c diff -u xc/lib/font/fc/fsconvert.c:1.10 xc/lib/font/fc/fsconvert.c:1.11 --- xc/lib/font/fc/fsconvert.c:1.10 Wed Jan 17 14:43:28 2001 +++ xc/lib/font/fc/fsconvert.c Tue Sep 10 12:14:35 2002 @@ -22,7 +22,7 @@ * * Author: Dave Lemke, Network Computing Devices, Inc */ -/* $XFree86: xc/lib/font/fc/fsconvert.c,v 1.10 2001/01/17 19:43:28 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fsconvert.c,v 1.11 2002/09/10 16:14:35 tsi Exp $ */ /* * FS data conversion */ @@ -127,6 +127,7 @@ if (dprop->value == BAD_RESOURCE) { xfree (pfi->props); + pfi->nprops = 0; pfi->props = 0; pfi->isStringProp = 0; return -1; @@ -144,6 +145,7 @@ if (pfi->props) { xfree (pfi->props); + pfi->nprops = 0; pfi->props = 0; } } @@ -723,6 +725,7 @@ pfont->scan = scan; pfont->glyph = glyph; + pfont->info.nprops = 0; pfont->info.props = 0; pfont->info.isStringProp = 0; Index: xc/lib/font/fc/fserve.c diff -u xc/lib/font/fc/fserve.c:3.21 xc/lib/font/fc/fserve.c:3.22 --- xc/lib/font/fc/fserve.c:3.21 Fri Dec 14 14:56:48 2001 +++ xc/lib/font/fc/fserve.c Fri May 31 14:45:49 2002 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fc/fserve.c,v 3.21 2001/12/14 19:56:48 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fserve.c,v 3.22 2002/05/31 18:45:49 dawes Exp $ */ /* * Copyright 1990 Network Computing Devices @@ -210,8 +210,8 @@ static Bool fs_name_check(char *name) { -#ifdef __EMX__ - /* OS/2 uses D:/XFree86/.... as fontfile pathnames, so check that +#ifdef __UNIXOS2__ + /* OS/2 uses D:/usr/X11R6/.... as fontfile pathnames, so check that * there is not only a protocol/ prefix, but also that the first chars * are not a drive letter */ Index: xc/lib/font/fc/fsio.c diff -u xc/lib/font/fc/fsio.c:3.15 xc/lib/font/fc/fsio.c:3.16 --- xc/lib/font/fc/fsio.c:3.15 Wed Jul 25 11:04:56 2001 +++ xc/lib/font/fc/fsio.c Fri May 31 14:45:49 2002 @@ -23,7 +23,7 @@ * * Author: Dave Lemke, Network Computing Devices, Inc */ -/* $XFree86: xc/lib/font/fc/fsio.c,v 3.15 2001/07/25 15:04:56 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fsio.c,v 3.16 2002/05/31 18:45:49 dawes Exp $ */ /* * font server i/o routines */ @@ -57,7 +57,7 @@ #define EINTR WSAEINTR #endif -#ifdef __EMX__ +#ifdef __UNIXOS2__ #define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t) #endif Index: xc/lib/font/fc/fslibos.h diff -u xc/lib/font/fc/fslibos.h:3.6 xc/lib/font/fc/fslibos.h:3.7 --- xc/lib/font/fc/fslibos.h:3.6 Fri Dec 14 14:56:49 2001 +++ xc/lib/font/fc/fslibos.h Fri May 31 14:45:49 2002 @@ -31,7 +31,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/fc/fslibos.h,v 3.6 2001/12/14 19:56:49 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fslibos.h,v 3.7 2002/05/31 18:45:49 dawes Exp $ */ /* * FSlib networking & os include file @@ -57,7 +57,7 @@ #endif #endif #ifndef OPEN_MAX -#if defined(SVR4) || defined(__EMX__) +#if defined(SVR4) || defined(__UNIXOS2__) #ifdef SCO325 #define OPEN_MAX sysconf(_SC_OPEN_MAX) #else Index: xc/lib/font/fontcache/fontcache.h diff -u xc/lib/font/fontcache/fontcache.h:1.5 xc/lib/font/fontcache/fontcache.h:1.7 --- xc/lib/font/fontcache/fontcache.h:1.5 Tue Jul 31 20:44:43 2001 +++ xc/lib/font/fontcache/fontcache.h Sat Jan 25 22:02:19 2003 @@ -26,7 +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.5 2001/08/01 00:44:43 tsi Exp $ */ +/* $XFree86: xc/lib/font/fontcache/fontcache.h,v 1.7 2003/01/26 03:02:19 dawes Exp $ */ #ifndef _FONTCACHE_H_ #define _FONTCACHE_H_ @@ -34,12 +34,13 @@ #include "fontmisc.h" #include "fontstruct.h" #include "fcqueue.h" +#define _FONTCACHE_SERVER_ #include <X11/extensions/fontcacheP.h> /* constant declarations */ #ifndef FC_DEFAULT_CACHE_SIZE -#define FC_DEFAULT_CACHE_SIZE 1024 /* in KB */ +#define FC_DEFAULT_CACHE_SIZE 5120 /* in KB */ #endif #define FC_CACHE_BALANCE 70 /* in percentage */ Index: xc/lib/font/fontfile/Imakefile diff -u xc/lib/font/fontfile/Imakefile:3.20 xc/lib/font/fontfile/Imakefile:3.21 --- xc/lib/font/fontfile/Imakefile:3.20 Sat Nov 3 18:03:00 2001 +++ xc/lib/font/fontfile/Imakefile Wed Feb 13 16:32:48 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/font/fontfile/Imakefile,v 3.20 2001/11/03 23:03:00 dawes Exp $ +XCOMM $XFree86: xc/lib/font/fontfile/Imakefile,v 3.21 2002/02/13 21:32:48 dawes Exp $ #include <Server.tmpl> @@ -14,7 +14,7 @@ #endif INCLUDES = -I$(FONTINCSRC) -I../include -I$(SERVERSRC)/include \ - -I$(XTOP)/include + -I$(INCLUDESRC) HEADERS = #ifdef FontFormatDefines FORMAT_DEFS = FontFormatDefines Index: xc/lib/font/fontfile/bufio.c diff -u xc/lib/font/fontfile/bufio.c:3.9 xc/lib/font/fontfile/bufio.c:3.10 --- xc/lib/font/fontfile/bufio.c:3.9 Fri Dec 14 14:56:50 2001 +++ xc/lib/font/fontfile/bufio.c Fri May 31 14:45:49 2002 @@ -27,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/bufio.c,v 3.9 2001/12/14 19:56:50 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/bufio.c,v 3.10 2002/05/31 18:45:49 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -122,7 +122,7 @@ BufFilePtr BufFileOpenRead (int fd) { -#ifdef __EMX__ +#ifdef __UNIXOS2__ /* hv: I'd bet WIN32 has the same effect here */ setmode(fd,O_BINARY); #endif @@ -149,7 +149,7 @@ { BufFilePtr f; -#ifdef __EMX__ +#ifdef __UNIXOS2__ /* hv: I'd bet WIN32 has the same effect here */ setmode(fd,O_BINARY); #endif Index: xc/lib/font/fontfile/dirfile.c diff -u xc/lib/font/fontfile/dirfile.c:3.14 xc/lib/font/fontfile/dirfile.c:3.15 --- xc/lib/font/fontfile/dirfile.c:3.14 Fri Dec 14 14:56:50 2001 +++ xc/lib/font/fontfile/dirfile.c Fri May 31 14:45:50 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/dirfile.c,v 3.14 2001/12/14 19:56:50 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/dirfile.c,v 3.15 2002/05/31 18:45:50 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -70,7 +70,7 @@ #ifdef FONTDIRATTRIB /* Check for font directory attributes */ -#ifndef __EMX__ +#ifndef __UNIXOS2__ if ((ptr = strchr(directory, ':'))) { #else /* OS/2 path might start with a drive letter, don't clip this */ @@ -107,7 +107,7 @@ sprintf(format, "%%%ds %%%d[^\n]\n", MAXFONTFILENAMELEN-1, MAXFONTNAMELEN-1); while ((count = fscanf(file, format, file_name, font_name)) != EOF) { -#ifdef __EMX__ +#ifdef __UNIXOS2__ /* strip any existing trailing CR */ for (i=0; i<strlen(font_name); i++) { if (font_name[i]=='\r') font_name[i] = '\0'; Index: xc/lib/font/fontfile/fileio.c diff -u xc/lib/font/fontfile/fileio.c:3.9 xc/lib/font/fontfile/fileio.c:3.10 --- xc/lib/font/fontfile/fileio.c:3.9 Fri Dec 14 14:56:51 2001 +++ xc/lib/font/fontfile/fileio.c Fri May 31 14:45:50 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fileio.c,v 3.9 2001/12/14 19:56:51 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fileio.c,v 3.10 2002/05/31 18:45:50 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -54,7 +54,7 @@ return 0; } len = strlen (name); -#ifndef __EMX__ +#ifndef __UNIXOS2__ if (len > 2 && !strcmp (name + len - 2, ".Z")) { #else if (len > 2 && (!strcmp (name + len - 4, ".pcz") || Index: xc/lib/font/fontfile/filewr.c diff -u xc/lib/font/fontfile/filewr.c:3.6 xc/lib/font/fontfile/filewr.c:3.7 --- xc/lib/font/fontfile/filewr.c:3.6 Fri Dec 14 14:56:51 2001 +++ xc/lib/font/fontfile/filewr.c Fri May 31 14:45:50 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/filewr.c,v 3.6 2001/12/14 19:56:51 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/filewr.c,v 3.7 2002/05/31 18:45:50 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -39,7 +39,7 @@ { int fd; -#if defined(WIN32) || defined(__EMX__) || defined(__CYGWIN__) +#if defined(WIN32) || defined(__UNIXOS2__) || defined(__CYGWIN__) fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0666); #else fd = creat (name, 0666); Index: xc/lib/font/fontfile/fontdir.c diff -u xc/lib/font/fontfile/fontdir.c:3.18 xc/lib/font/fontfile/fontdir.c:3.19 --- xc/lib/font/fontfile/fontdir.c:3.18 Fri Dec 14 14:56:51 2001 +++ xc/lib/font/fontfile/fontdir.c Fri May 31 14:45:50 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.18 2001/12/14 19:56:51 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.19 2002/05/31 18:45:50 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -109,7 +109,7 @@ #endif #ifdef FONTDIRATTRIB -#ifndef __EMX__ +#ifndef __UNIXOS2__ attrib = strchr(dirName, ':'); #else /* OS/2 uses the colon in the drive letter descriptor, skip this */ Index: xc/lib/font/fontfile/fontenc.c diff -u xc/lib/font/fontfile/fontenc.c:1.14 xc/lib/font/fontfile/fontenc.c:1.15 --- xc/lib/font/fontfile/fontenc.c:1.14 Thu Nov 1 22:06:40 2001 +++ xc/lib/font/fontfile/fontenc.c Wed Feb 19 22:25:19 2003 @@ -20,7 +20,7 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/fontfile/fontenc.c,v 1.14 2001/11/02 03:06:40 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontenc.c,v 1.15 2003/02/20 03:25:19 dawes Exp $ */ /* Backend-independent encoding code */ @@ -745,11 +745,13 @@ 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) { @@ -763,17 +765,21 @@ 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; + } + if(encoding->aliases) { + memcpy(new_aliases, encoding->aliases, numaliases*sizeof(char*)); + xfree(encoding->aliases); } - memcpy(new_aliases, encoding->aliases, numaliases*sizeof(char*)); new_aliases[numaliases] = new_name; new_aliases[numaliases+1] = NULL; - xfree(encoding->aliases); encoding->aliases = new_aliases; } Index: xc/lib/font/fontfile/fontfile.c diff -u xc/lib/font/fontfile/fontfile.c:3.15 xc/lib/font/fontfile/fontfile.c:3.16 --- xc/lib/font/fontfile/fontfile.c:3.15 Fri Dec 14 14:56:51 2001 +++ xc/lib/font/fontfile/fontfile.c Fri May 31 14:45:50 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fontfile.c,v 3.15 2001/12/14 19:56:51 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontfile.c,v 3.16 2002/05/31 18:45:50 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -48,7 +48,7 @@ FontFileNameCheck (char *name) { #ifndef NCD -#ifdef __EMX__ +#ifdef __UNIXOS2__ /* OS/2 uses D:/... as a path name for fonts, so accept this as a valid * path if it starts with a letter and a colon */ Index: xc/lib/font/fontfile/renderers.c diff -u xc/lib/font/fontfile/renderers.c:1.4 xc/lib/font/fontfile/renderers.c:1.7 --- xc/lib/font/fontfile/renderers.c:1.4 Fri Dec 14 14:56:52 2001 +++ xc/lib/font/fontfile/renderers.c Mon Dec 9 12:30:00 2002 @@ -25,33 +25,71 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/renderers.c,v 1.4 2001/12/14 19:56:52 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/renderers.c,v 1.7 2002/12/09 17:30:00 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium */ #include "fntfilst.h" +extern void ErrorF(const char *f, ...); static FontRenderersRec renderers; +/* + * XXX Maybe should allow unregistering renders. For now, just clear the + * list at each new generation. + */ +extern unsigned long serverGeneration; +static unsigned long rendererGeneration = 0; + Bool FontFileRegisterRenderer (FontRendererPtr renderer) { + return FontFilePriorityRegisterRenderer(renderer, 0); +} + +Bool +FontFilePriorityRegisterRenderer (FontRendererPtr renderer, int priority) +{ int i; - FontRendererPtr *new; + struct _FontRenderersElement *new; - for (i = 0; i < renderers.number; i++) - if (!strcmp (renderers.renderers[i]->fileSuffix, renderer->fileSuffix)) - return TRUE; - i = renderers.number + 1; - new = (FontRendererPtr *) xrealloc (renderers.renderers, sizeof *new * i); - if (!new) - return FALSE; - renderer->number = i - 1; - renderers.renderers = new; - renderers.renderers[i - 1] = renderer; - renderers.number = i; + if (rendererGeneration != serverGeneration) { + rendererGeneration = serverGeneration; + renderers.number = 0; + if (!renderers.renderers) + xfree(renderers.renderers); + renderers.renderers = NULL; + } + + for (i = 0; i < renderers.number; i++) { + if (!strcmp (renderers.renderers[i].renderer->fileSuffix, + renderer->fileSuffix)) { + if(renderers.renderers[i].priority >= priority) { + if(renderers.renderers[i].priority == priority) { + if (rendererGeneration == 1) + ErrorF("Warning: font renderer for \"%s\" " + "already registered at priority %d\n", + renderer->fileSuffix, priority); + } + return TRUE; + } else { + break; + } + } + } + + if(i >= renderers.number) { + new = xrealloc (renderers.renderers, sizeof(*new) * (i + 1)); + if (!new) + return FALSE; + renderers.renderers = new; + renderers.number = i + 1; + } + renderer->number = i; + renderers.renderers[i].renderer = renderer; + renderers.renderers[i].priority = priority; return TRUE; } @@ -65,7 +103,7 @@ fileLen = strlen (fileName); for (i = 0; i < renderers.number; i++) { - r = renderers.renderers[i]; + r = renderers.renderers[i].renderer; if (fileLen >= r->fileSuffixLen && !strcmp (fileName + fileLen - r->fileSuffixLen, r->fileSuffix)) { Index: xc/lib/font/fontfile/module/Imakefile diff -u xc/lib/font/fontfile/module/Imakefile:1.3 xc/lib/font/fontfile/module/Imakefile:1.4 --- xc/lib/font/fontfile/module/Imakefile:1.3 Sun Jun 13 09:47:35 1999 +++ xc/lib/font/fontfile/module/Imakefile Wed Feb 13 16:32:49 2002 @@ -1,8 +1,8 @@ -XCOMM $XFree86: xc/lib/font/fontfile/module/Imakefile,v 1.3 1999/06/13 13:47:35 dawes Exp $ +XCOMM $XFree86: xc/lib/font/fontfile/module/Imakefile,v 1.4 2002/02/13 21:32:49 dawes Exp $ #include <Server.tmpl> INCLUDES = -I$(FONTINCSRC) -I../../include -I$(SERVERSRC)/include \ - -I$(XTOP)/include + -I$(XINCLUDESRC) DEFINES = -DLOADABLEFONTS Index: xc/lib/font/include/fntfil.h diff -u xc/lib/font/include/fntfil.h:1.9 xc/lib/font/include/fntfil.h:1.10 --- xc/lib/font/include/fntfil.h:1.9 Fri Dec 14 14:56:54 2001 +++ xc/lib/font/include/fntfil.h Mon Dec 9 12:30:00 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fntfil.h,v 1.9 2001/12/14 19:56:54 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fntfil.h,v 1.10 2002/12/09 17:30:00 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -146,6 +146,8 @@ extern void FontDefaultFormat ( int *bit, int *byte, int *glyph, int *scan ); extern Bool FontFileRegisterRenderer ( FontRendererPtr renderer ); +extern Bool FontFilePriorityRegisterRenderer ( FontRendererPtr renderer, + int priority ); extern FontRendererPtr FontFileMatchRenderer ( char *fileName ); extern Bool FontFileAddScaledInstance ( FontEntryPtr entry, Index: xc/lib/font/include/fntfilst.h diff -u xc/lib/font/include/fntfilst.h:3.7 xc/lib/font/include/fntfilst.h:3.9 --- xc/lib/font/include/fntfilst.h:3.7 Fri Dec 14 14:56:54 2001 +++ xc/lib/font/include/fntfilst.h Tue Dec 10 17:23:52 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.7 2001/12/14 19:56:54 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.9 2002/12/10 22:23:52 tsi Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -164,7 +164,12 @@ typedef struct _FontRenders { int number; - FontRendererPtr *renderers; + struct _FontRenderersElement { + /* In order to preserve backward compatibility, the + priority field is made invisible to renderers */ + FontRendererPtr renderer; + int priority; + } *renderers; } FontRenderersRec, *FontRenderersPtr; typedef struct _BitmapInstance { Index: xc/lib/font/stubs/Imakefile diff -u xc/lib/font/stubs/Imakefile:1.3 xc/lib/font/stubs/Imakefile:1.4 --- xc/lib/font/stubs/Imakefile:1.3 Tue Dec 14 20:14:35 1999 +++ xc/lib/font/stubs/Imakefile Wed Feb 13 16:32:49 2002 @@ -1,8 +1,8 @@ -XCOMM $XFree86: xc/lib/font/stubs/Imakefile,v 1.3 1999/12/15 01:14:35 robin Exp $ +XCOMM $XFree86: xc/lib/font/stubs/Imakefile,v 1.4 2002/02/13 21:32:49 dawes Exp $ #include <Server.tmpl> -INCLUDES = -I$(FONTINCSRC) -I../include -I$(XTOP)/include +INCLUDES = -I$(FONTINCSRC) -I../include -I$(XINCLUDESRC) SRCS = cauthgen.c csignal.c delfntcid.c errorf.c fatalerror.c \ findoldfnt.c getcres.c getdefptsize.c getnewfntcid.c gettime.c \ initfshdl.c regfpefunc.c rmfshdl.c servclient.c setfntauth.c \ Index: xc/lib/font/util/atom.c diff -u xc/lib/font/util/atom.c:1.7 xc/lib/font/util/atom.c:1.10 --- xc/lib/font/util/atom.c:1.7 Fri Dec 14 14:56:55 2001 +++ xc/lib/font/util/atom.c Tue Sep 24 16:52:48 2002 @@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/util/atom.c,v 1.7 2001/12/14 19:56:55 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/atom.c,v 1.10 2002/09/24 20:52:48 tsi Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -82,7 +82,9 @@ newHashSize = hashSize * 2; newHashTable = (AtomListPtr *) xalloc (newHashSize * sizeof (AtomListPtr)); if (!newHashTable) { - fprintf(stderr, "ResizeHashTable(): Error: Couldn't allocate newHashTable (%d)\n", newHashSize * sizeof (AtomListPtr)); + fprintf(stderr, "ResizeHashTable(): Error: Couldn't allocate" + " newHashTable (%ld)\n", + newHashSize * (unsigned long)sizeof (AtomListPtr)); return FALSE; } bzero ((char *) newHashTable, newHashSize * sizeof (AtomListPtr)); @@ -123,7 +125,9 @@ reverseMapSize *= 2; reverseMap = (AtomListPtr *) xrealloc (reverseMap, reverseMapSize * sizeof (AtomListPtr)); if (!reverseMap) { - fprintf(stderr, "ResizeReverseMap(): Error: Couldn't reallocate reverseMap (%d)\n", reverseMapSize * sizeof(AtomListPtr)); + fprintf(stderr, "ResizeReverseMap(): Error: Couldn't reallocate" + " reverseMap (%ld)\n", + reverseMapSize * (unsigned long)sizeof(AtomListPtr)); ret = FALSE; } return ret; @@ -177,8 +181,9 @@ return None; a = (AtomListPtr) xalloc (sizeof (AtomListRec) + len + 1); if (a == NULL) { - fprintf(stderr, "MakeAtom(): Error: Couldn't allocate AtomListRec (%d)\n", sizeof (AtomListRec) + len + 1); - return None; + fprintf(stderr, "MakeAtom(): Error: Couldn't allocate AtomListRec" + " (%ld)\n", (unsigned long)sizeof (AtomListRec) + len + 1); + return None; } a->name = (char *) (a + 1); a->len = len; Index: xc/lib/font/util/fontxlfd.c diff -u xc/lib/font/util/fontxlfd.c:3.13 xc/lib/font/util/fontxlfd.c:3.15 --- xc/lib/font/util/fontxlfd.c:3.13 Fri Dec 14 14:56:56 2001 +++ xc/lib/font/util/fontxlfd.c Fri May 31 14:45:50 2002 @@ -27,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/fontxlfd.c,v 3.13 2001/12/14 19:56:56 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/fontxlfd.c,v 3.15 2002/05/31 18:45:50 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -196,8 +196,9 @@ #if defined(i386) || defined(__i386__) || \ defined(ia64) || defined(__ia64__) || \ defined(__alpha__) || defined(__alpha) || \ - defined(__hppa__) -#if !defined(__EMX__) + defined(__hppa__) || \ + defined(__x86_64__) || defined(__x86_64) +#if !defined(__UNIXOS2__) #include <float.h> /* if we have IEEE 754 fp, we can round to binary digits... */ @@ -258,7 +259,7 @@ } else #endif -#endif /* !__EMX__ */ +#endif /* !__UNIXOS2__ */ #endif /* i386 || __i386__ */ { /* Index: xc/lib/fontconfig/AUTHORS diff -u /dev/null xc/lib/fontconfig/AUTHORS:1.1.1.1 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/AUTHORS Thu Feb 14 18:34:11 2002 @@ -0,0 +1 @@ +Keith Packard <keithp@keithp.com> Index: xc/lib/fontconfig/COPYING diff -u /dev/null xc/lib/fontconfig/COPYING:1.1.1.1 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/COPYING Thu Feb 14 18:34:11 2002 @@ -0,0 +1,22 @@ +$XFree86: xc/lib/fontconfig/COPYING,v 1.1.1.1 2002/02/14 23:34:11 keithp Exp $ + +Copyright © 2001 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. + Index: xc/lib/fontconfig/ChangeLog diff -u /dev/null xc/lib/fontconfig/ChangeLog:1.8 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/ChangeLog Sat Aug 31 18:27:08 2002 @@ -0,0 +1,89 @@ +Sat Aug 31 15:21:22 PDT 2002 keithp + + Xrender and Xft had several bugs related to + rendering manually placed or poly-face text + + + Added more complete memory tracing in fontconfig + Checked with (patched) mozilla and found no leaks + + + Updated Latin orthographies by comparing those from + evertype.com with those from eki.ee. Tried to make + sensible choices, including chars that occured in both + and leaving some optional chars out that occured only + in one. + +Mon Aug 26 16:33:04 PDT 2002 keithp + + Owen discovered that FcLangSetHasLang wasn't actually + checking the language set. + +Mon Aug 26 13:37:23 PDT 2002 keithp + + Append a version number to cache filenames + +Thu Aug 22 11:36:18 PDT 2002 keithp + + + Add "contains" and "not_contains" operators and elements to + font configuration + + + Changed semantics of eq operator for LangSets to check for + FcLangEqual so that any match will do + + + FcFontList was using FcConfigCompareValue (...FcOpEqual) instead + of FcValueEqual to check for identical values when inserting into + the results. This broke when the above semantic change was made, + now it uses FcValueEqual which is "more correct" in any case. + +Thu Aug 22 00:32:29 PDT 2002 keithp + + + Reimplement FC_LANG as new datatype. Lists of strings + was consuming over a megabyte of memory for 401 fonts. + + + Freeze patterns loaded from cache files. This shares + common value lists and common patterns which saves + considerable memory. + + + Change the denotation of 'constant' charsets to use special + ref value instead of separate boolean. + + + Clean up leak tracing stuff, found several unannoted alloc/free + calls + +Tue Aug 20 16:17:37 PDT 2002 keithp + + + Fix memory leak when parsing matrices from XML + +Mon Aug 19 11:57:27 PDT 2002 keithp + + + Fix autoconf files to pass FONTCONFIG_PATH on + compile line so that ${prefix} gets substituted + correctly. + + + Use getc_unlocked/putc_unlocked on systems that + provide them to avoid damage done to stdio by posix + + + Eliminate FC_PATTERN and FcTypePattern in favor of + an extended api for FcConfigSubstitute which takes + both the font and the pattern. + + + Add 'sans serif' alias for 'sans-serif' as some apps + can't handle hyphens in family names + + + Eliminate pretense of support for libxml2 + + + Comment origins of Han orthographies + +Tue Jul 30 18:37:09 PDT 2002 keithp + + + Add binding property to edit element so that strong + binding values may be inserted by the config file. + The default remains weak. + +Sun 28 Jul 04:16:55 PDT 2002 keithp + + + Tagged release candidate 1 in the CVS tree and + placed fcpackage.rc1.tar.gz for distribution + +Thu Aug 1 08:55:08 PDT 2002 keithp + + + Fixed autoconf builds to always specify install + target files (for BSD). Also fixed to + define FONTCONFIG_PATH in config.h so that + nonstandard installs will actually work. Index: xc/lib/fontconfig/INSTALL diff -u /dev/null xc/lib/fontconfig/INSTALL:1.2 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/INSTALL Thu May 23 13:06:46 2002 @@ -0,0 +1,14 @@ +You can build fontconfig with either autoconf or imake. + +For autoconf: + + $ sh cvscompile.sh --sysconfdir=/etc --prefix=/usr + +For imake: + $ xmkmf -a + +These should both generate valid Makefiles, in either case: + + $ make + $ make install + Index: xc/lib/fontconfig/Imakefile diff -u /dev/null xc/lib/fontconfig/Imakefile:1.10 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/Imakefile Fri Jan 3 13:54:11 2003 @@ -0,0 +1,90 @@ +XCOMM $XFree86: xc/lib/fontconfig/Imakefile,v 1.10 2003/01/03 18:54:11 torrey Exp $ + +#define IHaveSubdirs +#define PassCDebugFlags + +LINTSUBDIRS=src fc-cache fc-list + +SUBDIRS=fontconfig $(LINTSUBDIRS) + +FONTCONFIG_REVISION=1 + +#ifndef FontconfigFontsConfDir +#if NothingOutsideProjectRoot +#define FontconfigFontsConfDir $(PROJECTROOT)/etc/fonts +#else +#define FontconfigFontsConfDir /etc/fonts +#endif +#endif + +FONTCONFIGFONTSCONFDIR=FontconfigFontsConfDir + +#ifdef DarwinArchitecture +MACFONTDIRS = ~/Library/Fonts /Library/Fonts /Network/Library/Fonts \ + /System/Library/Fonts +#endif + +#if NothingOutsideProjectRoot +FONTDIRS=$(FONTDIR) +#else +FONTDIRS=/usr/share/fonts $(FONTDIR) $(MACFONTDIRS) +#endif + +SUBSTVARS=prefix=$(PROJECTROOT) \ + exec_prefix=$(BINDIR) \ + libdir=$(USRLIBDIR) \ + includedir=$(INCROOT) \ + PACKAGE_VERSION=$(SOFONTCONFIGREV).$(FONTCONFIG_REVISION) + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +MakeLintLibSubdirs($(LINTSUBDIRS)) +MakeLintSubdirs($(LINTSUBDIRS),install.ln,install.ln) + +#ifndef InstallNamedTargetBackup +#define InstallNamedTargetBackup(step,srcname,flags,dest,dstname) @@\ +step:: srcname @@\ + MakeDir($(DESTDIR)dest) @@\ + MoveToBakFile($(DESTDIR)dest/dstname) @@\ + $(INSTALL) $(INSTALLFLAGS) flags srcname $(DESTDIR)dest/dstname +#endif /* InstallNamedTargetBackup */ + +#ifndef InstallNonExecFileBackup +#define InstallNonExecFileBackup(file,dest) @@\ +InstallNamedTargetBackup(install,file,$(INSTDATFLAGS),dest,file) +#endif /* InstallNonExecFileBackup */ + +InstallNonExecFileBackup(fonts.conf,$(FONTCONFIGFONTSCONFDIR)) +InstallNonExecFile(fonts.dtd,$(FONTCONFIGFONTSCONFDIR)) + +all:: fonts.conf + +fonts.conf: fonts.conf.in + RemoveFile($@) + sh ./setfontdirs $(FONTDIRS) + +clean:: + RemoveFile(fonts.conf) + +all:: fontconfig-config.script + +fontconfig-config.script: fontconfig-config.in + RemoveFile($@) + sh config/config-subst $(SUBSTVARS) < fontconfig-config.in > $@ + +InstallScript(fontconfig-config,$(BINDIR)) + +clean:: + RemoveFile(fontconfig-config.script) + +all:: fontconfig.pc + +fontconfig.pc: fontconfig.pc.in + RemoveFile($@) + sh config/config-subst $(SUBSTVARS) < fontconfig.pc.in > $@ + +InstallNonExecFile(fontconfig.pc,$(USRLIBDIR)/pkgconfig) + +clean:: + RemoveFile(fontconfig.pc) + Index: xc/lib/fontconfig/Makefile.in diff -u /dev/null xc/lib/fontconfig/Makefile.in:1.7 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/Makefile.in Thu Aug 1 11:57:25 2002 @@ -0,0 +1,95 @@ +# +# $XFree86: xc/lib/fontconfig/Makefile.in,v 1.7 2002/08/01 15:57:25 keithp Exp $ +# +# Copyright © 2002 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. +# + +TOPDIR = . + +include $(TOPDIR)/config/Makedefs + +DIRS = src fc-cache fc-list fontconfig + +all install clean:: + for d in $(DIRS); do (cd $$d && $(MAKE) $@); done + +# +# create fonts.conf file +# +all:: fonts.conf + +fonts.conf: fonts.conf.in + rm -f $@ + sh ./setfontdirs $(FC_DEFAULT_FONTS) $(X_FONT_DIR) + +clean:: + rm -f fonts.conf + +# +# installation directories +# + +install:: $(DESTDIR)$(CONFDIR) $(DESTDIR)$(BINDIR) +install:: $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBDIR)/pkgconfig + +$(DESTDIR)$(CONFDIR): + mkdir -p $@ + +$(DESTDIR)$(BINDIR): + mkdir -p $@ + +$(DESTDIR)$(LIBDIR): + mkdir -p $@ + +$(DESTDIR)$(LIBDIR)/pkgconfig: + mkdir -p $@ + +# +# install config files +# +install:: $(DESTDIR)$(CONFDIR)/fonts.conf $(DESTDIR)$(CONFDIR)/fonts.dtd + +$(DESTDIR)$(CONFDIR)/fonts.conf:: fonts.conf + if [ -f $@ ]; then \ + echo "Not overwriting existing $@"; \ + else \ + $(INSTALL_DATA) fonts.conf $(DESTDIR)$(CONFDIR)/fonts.conf; \ + fi + +$(DESTDIR)$(CONFDIR)/fonts.dtd:: fonts.dtd + $(INSTALL_DATA) fonts.dtd $(DESTDIR)$(CONFDIR)/fonts.dtd + +# +# install fontconfig-config script +# + +install:: $(DESTDIR)$(BINDIR)/fontconfig-config + +$(DESTDIR)$(BINDIR)/fontconfig-config: fontconfig-config + $(INSTALL_SCRIPT) $< $(DESTDIR)$(BINDIR)/$< + +# +# install pkgconfig control file +# +install:: $(DESTDIR)$(LIBDIR)/pkgconfig/fontconfig.pc + +$(DESTDIR)$(LIBDIR)/pkgconfig/fontconfig.pc: fontconfig.pc + $(INSTALL_DATA) $< $(DESTDIR)$(LIBDIR)/pkgconfig/$< Index: xc/lib/fontconfig/README diff -u /dev/null xc/lib/fontconfig/README:1.2 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/README Thu May 23 13:06:46 2002 @@ -0,0 +1,15 @@ + Fontconfig + Font configuration and customization library + Version 1.0.1 + 2002-5-23 + +This is the first public release of fontconfig, a font configuration and +customization library. Fontconfig is designed to locate fonts within the +system and select them according to requirements specified by applications. + +Fontconfig is not a rasterization library, nor does it impose a particular +rasterization library on the application. The X-specific library +'Xft' uses fontconfig along with freetype to specify and rasterize fonts. + +Keith Packard +keithp@keithp.com Index: xc/lib/fontconfig/config.h.in diff -u /dev/null xc/lib/fontconfig/config.h.in:1.4 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/config.h.in Mon Aug 19 15:31:59 2002 @@ -0,0 +1,138 @@ +/* config.h.in. Generated manually by keithp. */ + +/* Path library uses when config file is broken */ +#undef FC_DEFAULT_FONTS + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Use expat library for xml parsing */ +#undef HAVE_EXPAT + +/* expat uses old xmlparse.h include */ +#undef HAVE_XMLPARSE_H + +/* Define to 1 if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H + +/* whether system has freetype2 library */ +#undef HAVE_FREETYPE + +/* Define to 1 if you have the <ft2build.h> header file. */ +#undef HAVE_FT2BUILD_H + +/* Define to 1 if you have the `FT_Init_FreeType' function. */ +#undef HAVE_FT_INIT_FREETYPE + +/* Define to 1 if you have the `getopt' function. */ +#undef HAVE_GETOPT + +/* Define to 1 if you have the `getopt_long' function. */ +#undef HAVE_GETOPT_LONG + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if your system has a working `malloc' function. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + +/* Define to 1 if `stat' has the bug that it succeeds when given the + zero-length file name argument. */ +#undef HAVE_STAT_EMPTY_STRING_BUG + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strrchr' function. */ +#undef HAVE_STRRCHR + +/* Define to 1 if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Define to 1 if you have the `XML_ParserCreate' function. */ +#undef HAVE_XML_PARSERCREATE + +/* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +#undef LSTAT_FOLLOWS_SLASHED_SYMLINK + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Library major version */ +#undef PACKAGE_MAJOR + +/* Library minor version */ +#undef PACKAGE_MINOR + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Library revision */ +#undef PACKAGE_REVISION + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `int' if <sys/types.h> does not define. */ +#undef pid_t Index: xc/lib/fontconfig/configure.in diff -u /dev/null xc/lib/fontconfig/configure.in:1.8 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/configure.in Mon Aug 19 15:31:59 2002 @@ -0,0 +1,323 @@ +dnl +dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.8 2002/08/19 19:31:59 keithp Exp $ +dnl +dnl Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation, and that the name of Keith Packard not be used in +dnl advertising or publicity pertaining to distribution of the software without +dnl specific, written prior permission. Keith Packard makes no +dnl representations about the suitability of this software for any purpose. It +dnl is provided "as is" without express or implied warranty. +dnl +dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +dnl PERFORMANCE OF THIS SOFTWARE. +dnl + +# Process this file with autoconf to produce a configure script. + +AC_INIT(fontconfig, 1.0.1, fonts@xfree86.org) +AC_CONFIG_AUX_DIR(config) +AC_CONFIG_HEADER(config.h) + +AC_ARG_WITH(freetype_includes, [ --with-freetype-includes=DIR Use FreeType includes in DIR], freetype_includes=$withval, freetype_includes=yes) +AC_ARG_WITH(freetype_lib, [ --with-freetype-lib=DIR Use FreeType library in DIR], freetype_lib=$withval, freetype_lib=yes) +AC_ARG_WITH(freetype_config, [ --with-freetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes) +AC_ARG_WITH(expat, [ --with-expat=DIR Use Expat in DIR], expat=$withval, expat=yes) +AC_ARG_WITH(expat_includes, [ --with-expat-includes=DIR Use Expat includes in DIR], expat_includes=$withval, expat_includes=yes) +AC_ARG_WITH(expat_lib, [ --with-expat-lib=DIR Use Expat library in DIR], expat_lib=$withval, expat_lib=yes) +AC_ARG_WITH(default_fonts, [ --with-default-fonts=DIR Use fonts from DIR when config is busted], defaultfonts="$withval", default_fonts=yes) +AC_ARG_WITH(confdir, [ --with-confdir=DIR Use DIR to store configuration files (default /etc/fonts)], confdir="$withval", confdir=yes) + +# Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PATH_X + +PACKAGE_VERSION=1.0.1 + +# Set major version +PACKAGE_MAJOR=`echo $PACKAGE_VERSION | awk -F . '{ print $1 }'` +PACKAGE_MINOR=`echo $PACKAGE_VERSION | awk -F . '{ print $2 }'` +PACKAGE_REVISION=`echo $PACKAGE_VERSION | awk -F . '{ print $3 }'` +AC_SUBST(PACKAGE_VERSION) +AC_SUBST(PACKAGE_MAJOR) +AC_SUBST(PACKAGE_MINOR) +AC_SUBST(PACKAGE_REVISION) + +OBJEXT="o" +AC_SUBST(OBJEXT) + +AC_DEFINE_UNQUOTED(PACKAGE_MAJOR,$PACKAGE_MAJOR) +AC_DEFINE_UNQUOTED(PACKAGE_MINOR,$PACKAGE_MINOR) +AC_DEFINE_UNQUOTED(PACKAGE_REVISION,$PACKAGE_REVISION) + +# Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_PID_T + +# Checks for library functions. +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([memmove memset strchr strrchr strtol getopt getopt_long]) + +if test "$GCC" = "yes"; then + MKSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' + DSO_LDOPTS='-shared -Wl,-h,`echo $@ | sed '"'s/\.so\.\([[0-9][0-9]]*\).*/.so.\1/'"'`' + DSO_CFLAGS='' + DSO_PIC_CFLAGS='-fPIC -DPIC' +else + AC_CANONICAL_HOST + + MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@' + DSO_CFLAGS='' + DSO_PIC_CFLAGS='-KPIC -DPIC' + + case "$host" in + *solaris*) + DSO_LDOPTS='-G -z text -z defs -h $@' + LIBS="$LIBS -lc" + ;; + *) + DSO_LDOPTS='-shared -h $@' + ;; + esac +fi + +AC_SUBST(MKSHLIB) +AC_SUBST(DSO_LDOPTS) +AC_SUBST(DSO_CFLAGS) +AC_SUBST(DSO_PIC_CFLAGS) + +# +# Using x libraries, set X font directory +case "$no_x" in +yes) + ;; +*) + X_FONT_DIR="$x_libraries/X11/fonts" + AC_DEFINE_UNQUOTED(X_FONT_DIR,$X_FONT_DIR) + ;; +esac +AC_SUBST(X_FONT_DIR) + +# +# Check freetype configuration +# +case "$freetype_config" in +no) + ;; +yes) + AC_CHECK_PROG(ft_config,freetype-config,freetype-config,no) + ;; +*) + ft_config="$freetype_config" + ;; +esac + +case "$freetype_includes" in +no) + FREETYPE_CFLAGS="" + ;; +yes) + case "$ft_config" in + no) + FREETYPE_CFLAGS="" + ;; + *) + FREETYPE_CFLAGS="`$ft_config --cflags`" + ;; + esac + ;; +*) + FREETYPE_CFLAGS="-I$freetype_includes" + ;; +esac + +case "$freetype_lib" in +no) + freetype_lib="" + ;; +yes) + case "$ft_config" in + no) + freetype_lib="" + ;; + *) + freetype_lib="`$ft_config --libs`" + ;; + esac + ;; +*) + freetype_lib="-L$freetype_lib -lfreetype" + ;; +esac + +saved_LIBS="$LIBS" +LIBS="$LIBS $freetype_lib" +saved_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" +AC_CHECK_HEADERS(freetype/freetype.h) + +case "$ac_cv_header_freetype_freetype_h" in +no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + ;; +yes) + AC_CHECK_FUNCS(FT_Init_FreeType) + case "$ac_cv_func_FT_Init_FreeType" in + no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + ;; + yes) + AC_DEFINE(HAVE_FREETYPE) + AC_SUBST(FREETYPE_CFLAGS) + ;; + esac + ;; +esac + +case "$default_fonts" in +yes) + FC_DEFAULT_FONTS="/usr/share/fonts" + AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts") + ;; +*) + FC_DEFAULT_FONTS="$default_fonts" + AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts") + ;; +esac + +AC_SUBST(FC_DEFAULT_FONTS) + +# +# Set CONFDIR and FONTCONFIG_PATH +# + +case "$confdir" in +no|yes) + confdir=/etc/fonts + ;; +*) + ;; +esac +AC_SUBST(confdir) +CONFDIR='${confdir}' +AC_DEFINE_UNQUOTED(CONFDIR, "$CONFDIR") +AC_SUBST(CONFDIR) + +# +# Check expat configuration +# + +case "$expat" in +no) + ;; +*) + case "$expat_includes" in + yes|no) + expat_include_path="" + ;; + *) + expat_include_path="-I$expat_includes" + ;; + esac + case "$expat_lib" in + yes) + case "$expat" in + yes) + expat_library="-lexpat" + ;; + *) + expat_library="-L$expat/lib -lexpat" + ;; + esac + ;; + no) + ;; + *) + expat_library="-L$expat_lib -lexpat" + ;; + esac + + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $expat_include_path" + saved_LIBS="$LIBS" + LIBS="$LIBS $expat_library" + + AC_CHECK_HEADER(expat.h) + case "$ac_cv_header_expat_h" in + no) + AC_CHECK_HEADER(xmlparse.h) + case "$ac_cv_header_xmlparse_h" in + no) + have_expat_header=no; + ;; + yes) + HAVE_XMLPARSE_H=1 + AC_SUBST(HAVE_XMLPARSE_H) + AC_DEFINE_UNQUOTED(HAVE_XMLPARSE_H,$HAVE_XMLPARSE_H) + have_expat_header=yes + ;; + esac + ;; + yes) + have_expat_header=yes + ;; + esac + case "$have_expat_header" in + no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + expat=no + ;; + yes) + AC_CHECK_FUNCS(XML_ParserCreate) + case "$ac_cv_func_XML_ParserCreate" in + no) + CPPFLAGS="$saved_CPPFLAGS" + LIBS="$saved_LIBS" + expat=no + ;; + yes) + HAVE_EXPAT=1 + AC_SUBST(HAVE_EXPAT) + AC_DEFINE_UNQUOTED(HAVE_EXPAT,$HAVE_EXPAT) + ;; + esac + ;; + esac + ;; +esac + + +case "$expat" in +no) + AC_MSG_ERROR([cannot find expat library]) + ;; +esac + +AC_OUTPUT([Makefile + config/Makedefs + src/Makefile + fc-cache/Makefile + fc-list/Makefile + fontconfig/Makefile + fontconfig.pc + fontconfig-config]) + Index: xc/lib/fontconfig/cvscompile.sh diff -u /dev/null xc/lib/fontconfig/cvscompile.sh:1.2 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/cvscompile.sh Tue May 21 13:08:42 2002 @@ -0,0 +1,11 @@ +#!/bin/sh +autoconf +if [ x"$NO_CONFIGURE" = "x" ]; then + echo " + Running 'configure $@':" + if [ -z "$*" ]; then + echo " ** If you wish to pass arguments to ./configure, please" + echo " ** specify them on the command line." + fi + ./configure ${1+"$@"} && echo "Now type 'make' to compile" || exit 1 +fi + Index: xc/lib/fontconfig/findfonts diff -u /dev/null xc/lib/fontconfig/findfonts:1.2 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/findfonts Tue May 21 13:08:42 2002 @@ -0,0 +1,4 @@ +#!/bin/sh +for d in ${1+"$@"}; do + echo "$d" +done | sort -u | sed 's/^/ <dir>/' | sed 's;$;</dir>;' Index: xc/lib/fontconfig/fontconfig-config.in diff -u /dev/null xc/lib/fontconfig/fontconfig-config.in:1.2 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/fontconfig-config.in Fri May 24 01:19:30 2002 @@ -0,0 +1,94 @@ +#! /bin/sh + +prefix="@prefix@" +exec_prefix="@exec_prefix@" +libdir="@libdir@" +includedir="@includedir@" +version="@PACKAGE_VERSION@" + +usage() +{ + cat <<EOF +Usage: fontconfig-config [OPTIONS] [LIBRARIES] +Options: + [--prefix[=DIR]] + [--exec-prefix[=DIR]] + [--version] + [--libs] + [--cflags] +EOF + exit $1 +} + +if test $# -eq 0 ; then + usage 1 1>&2 +fi + +while test $# -gt 0 ; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + local_prefix=yes + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + local_prefix=yes + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --version) + echo $version + exit 0 + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +if test "$local_prefix" = "yes" ; then + if test "$exec_prefix_set" != "yes" ; then + exec_prefix=$prefix + fi +fi + +if test "$echo_prefix" = "yes" ; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes" ; then + echo $exec_prefix +fi + +if test "$echo_cflags" = "yes" ; then + cflags="-I${includedir}" + echo $cflags +fi + +if test "$echo_libs" = "yes" ; then + libs="-lfontconfig" + if test "${libdir}" != "/usr/lib" ; then + echo -L${libdir} $libs + else + echo $libs + fi +fi + +# EOF Index: xc/lib/fontconfig/fontconfig.pc.in diff -u /dev/null xc/lib/fontconfig/fontconfig.pc.in:1.2 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/fontconfig.pc.in Thu May 23 13:09:32 2002 @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Fontconfig +Description: Font configuration and customization library +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lfontconfig +Cflags: -I${includedir} Index: xc/lib/fontconfig/fonts.conf.in diff -u /dev/null xc/lib/fontconfig/fonts.conf.in:1.14 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/fonts.conf.in Thu Oct 3 18:06:27 2002 @@ -0,0 +1,310 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- /etc/fonts.conf file to configure system font access --> +<fontconfig> + +<!-- + The intent of this standard configuration file is to be adequate for + most environments. If you have a reasonably normal environment and + have found problems with this configuration, they are probably + things that others will also want fixed. Please send any suggested + changes to fonts@xfree86.org so that future releases can include + such changes. + + Note that the normal 'make install' procedure for XFree86 is to + replace any existing fonts.conf file with the new version. Place + any local customizations in local.conf which this file references. + + Keith Packard +--> + +<!-- FONTPATH_START --> + +<!-- + Common X11R6 font directories +--> + + <dir>/usr/X11R6/lib/X11/fonts</dir> + <dir>/usr/share/fonts</dir> + <dir>~/.fonts</dir> + +<!-- FONTPATH_END --> + +<!-- + Enable sub-pixel rendering + <match target="font"> + <test qual="all" name="rgba"> + <const>unknown</const> + </test> + <edit name="rgba" mode="assign"><const>rgb</const></edit> + </match> +--> + +<!-- + Accept deprecated 'mono' alias, replacing it with 'monospace' +--> + <match target="pattern"> + <test qual="any" name="family"> + <string>mono</string> + </test> + <edit name="family" mode="assign"> + <string>monospace</string> + </edit> + </match> + +<!-- + Accept alternate 'sans serif' spelling, replacing it with 'sans-serif' +--> + <match target="pattern"> + <test qual="any" name="family"> + <string>sans serif</string> + </test> + <edit name="family" mode="assign"> + <string>sans-serif</string> + </edit> + </match> + +<!-- + Accept deprecated 'sans' alias, replacing it with 'sans-serif' +--> + <match target="pattern"> + <test qual="any" name="family"> + <string>sans</string> + </test> + <edit name="family" mode="assign"> + <string>sans-serif</string> + </edit> + </match> + +<!-- + Mark common families with their generics so we'll get + something reasonable +--> + +<!-- + Serif faces + --> + <alias> + <family>Times</family> + <family>Times New Roman</family> + <family>Nimbus Roman No9 L</family> + <family>Luxi Serif</family> + <family>Kochi Mincho</family> + <family>AR PL SungtiL GB</family> + <family>AR PL Mingti2L Big5</family> + <family>Baekmuk Batang</family> + <default><family>serif</family></default> + </alias> +<!-- + Sans-serif faces + --> + <alias> + <family>Helvetica</family> + <family>Arial</family> + <family>Verdana</family> + <family>Nimbus Sans L</family> + <family>Luxi Sans</family> + <family>Kochi Gothic</family> + <family>AR PL KaitiM GB</family> + <family>AR PL KaitiM Big5</family> + <family>Baekmuk Dotum</family> + <family>SimSun</family> + <default><family>sans-serif</family></default> + </alias> +<!-- + Monospace faces + --> + <alias> + <family>Courier</family> + <family>Courier New</family> + <family>Andale Mono</family> + <family>Luxi Mono</family> + <family>Nimbus Mono L</family> + <family>NSimSun</family> + <default><family>monospace</family></default> + </alias> +<!-- + If the font still has no generic name, add sans-serif + --> + <match target="pattern"> + <test qual="all" name="family" compare="not_eq"> + <string>sans-serif</string> + </test> + <test qual="all" name="family" compare="not_eq"> + <string>serif</string> + </test> + <test qual="all" name="family" compare="not_eq"> + <string>monospace</string> + </test> + <edit name="family" mode="append_last"> + <string>sans-serif</string> + </edit> + </match> + +<!-- + Load per-user customization file +--> + <include ignore_missing="yes">~/.fonts.conf</include> + +<!-- + Load local system customization file +--> + <include ignore_missing="yes">local.conf</include> + +<!-- + Alias well known font names to available TrueType fonts +--> + <alias> + <family>Times</family> + <accept><family>Times New Roman</family></accept> + </alias> + <alias> + <family>Helvetica</family> + <accept><family>Verdana</family></accept> + </alias> + <alias> + <family>Arial</family> + <accept><family>Verdana</family></accept> + </alias> + <alias> + <family>Courier</family> + <accept><family>Courier New</family></accept> + </alias> + +<!-- + Provide required aliases for standard names +--> + <alias> + <family>serif</family> + <prefer> + <family>Times New Roman</family> + <family>Nimbus Roman No9 L</family> + <family>Luxi Serif</family> + <family>Times</family> + <family>Kochi Mincho</family> + <family>AR PL SungtiL GB</family> + <family>AR PL Mingti2L Big5</family> + <family>Baekmuk Batang</family> + </prefer> + </alias> + <alias> + <family>sans-serif</family> + <prefer> + <family>Verdana</family> + <family>Nimbus Sans L</family> + <family>Luxi Sans</family> + <family>Arial</family> + <family>Helvetica</family> + <family>Kochi Gothic</family> + <family>AR PL KaitiM GB</family> + <family>AR PL KaitiM Big5</family> + <family>Baekmuk Dotum</family> + <family>SimSun</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> + <family>Andale Mono</family> + <family>Courier New</family> + <family>Luxi Mono</family> + <family>Nimbus Mono L</family> + <family>Kochi Gothic</family> + <family>AR PL KaitiM GB</family> + <family>Baekmuk Dotum</family> + </prefer> + </alias> + +<!-- + Artificial oblique for fonts without an italic or oblique version + --> + + <match target="font"> + <!-- check to see if the font is roman --> + <test name="slant"> + <const>roman</const> + </test> + <!-- check to see if the pattern requested non-roman --> + <test target="pattern" name="slant" compare="not_eq"> + <const>roman</const> + </test> + <!-- multiply the matrix to slant the font --> + <edit name="matrix" mode="assign"> + <times> + <name>matrix</name> + <matrix><double>1</double><double>.2</double> + <double>0</double><double>1</double> + </matrix> + </times> + </edit> + <!-- pretend the font is oblique now --> + <edit name="slant" mode="assign"> + <const>oblique</const> + </edit> + </match> + + <config> +<!-- + These are the default Unicode chars that are expected to be blank + in fonts. All other blank chars are assumed to be broken and + won't appear in the resulting charsets + --> + <blank> + <int>0x0020</int> <!-- SPACE --> + <int>0x00a0</int> <!-- NO-BREAK SPACE --> + <int>0x00ad</int> <!-- SOFT HYPHEN --> + <int>0x115f</int> <!-- HANGUL CHOSEONG FILLER --> + <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER --> + <int>0x1680</int> <!-- OGHAM SPACE MARK --> + <int>0x2000</int> <!-- EN QUAD --> + <int>0x2001</int> <!-- EM QUAD --> + <int>0x2002</int> <!-- EN SPACE --> + <int>0x2003</int> <!-- EM SPACE --> + <int>0x2004</int> <!-- THREE-PER-EM SPACE --> + <int>0x2005</int> <!-- FOUR-PER-EM SPACE --> + <int>0x2006</int> <!-- SIX-PER-EM SPACE --> + <int>0x2007</int> <!-- FIGURE SPACE --> + <int>0x2008</int> <!-- PUNCTUATION SPACE --> + <int>0x2009</int> <!-- THIN SPACE --> + <int>0x200a</int> <!-- HAIR SPACE --> + <int>0x200b</int> <!-- ZERO WIDTH SPACE --> + <int>0x200c</int> <!-- ZERO WIDTH NON-JOINER --> + <int>0x200d</int> <!-- ZERO WIDTH JOINER --> + <int>0x200e</int> <!-- LEFT-TO-RIGHT MARK --> + <int>0x200f</int> <!-- RIGHT-TO-LEFT MARK --> + <int>0x2028</int> <!-- LINE SEPARATOR --> + <int>0x2029</int> <!-- PARAGRAPH SEPARATOR --> + <int>0x202a</int> <!-- LEFT-TO-RIGHT EMBEDDING --> + <int>0x202b</int> <!-- RIGHT-TO-LEFT EMBEDDING --> + <int>0x202c</int> <!-- POP DIRECTIONAL FORMATTING --> + <int>0x202d</int> <!-- LEFT-TO-RIGHT OVERRIDE --> + <int>0x202e</int> <!-- RIGHT-TO-LEFT OVERRIDE --> + <int>0x202f</int> <!-- NARROW NO-BREAK SPACE --> + <int>0x205f</int> <!-- MEDIUM MATHEMATICAL SPACE --> + <int>0x2060</int> <!-- WORD JOINER --> + <int>0x2061</int> <!-- FUNCTION APPLICATION --> + <int>0x2062</int> <!-- INVISIBLE TIMES --> + <int>0x2063</int> <!-- INVISIBLE SEPARATOR --> + <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING --> + <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING --> + <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING --> + <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING --> + <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES --> + <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES --> + <int>0x3000</int> <!-- IDEOGRAPHIC SPACE --> + <int>0x3164</int> <!-- HANGUL FILLER --> + <int>0xfeff</int> <!-- ZERO WIDTH NO-BREAK SPACE --> + <int>0xffa0</int> <!-- HALFWIDTH HANGUL FILLER --> + <int>0xfff9</int> <!-- INTERLINEAR ANNOTATION ANCHOR --> + <int>0xfffa</int> <!-- INTERLINEAR ANNOTATION SEPARATOR --> + <int>0xfffa</int> <!-- INTERLINEAR ANNOTATION TERMINATOR --> + </blank> +<!-- + Rescan configuration every 30 seconds when FcFontSetList is called + --> + <rescan> + <int>30</int> + </rescan> + </config> + +</fontconfig> Index: xc/lib/fontconfig/fonts.dtd diff -u /dev/null xc/lib/fontconfig/fonts.dtd:1.7 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/fonts.dtd Thu Aug 22 14:53:22 2002 @@ -0,0 +1,182 @@ +<!-- This is the Document Type Definition for font configuration files --> +<!ELEMENT fontconfig (dir | + cache | + include | + config | + match | + alias)* > + +<!-- + Add a directory that provides fonts +--> +<!ELEMENT dir (#PCDATA)> +<!ATTLIST dir xml:space (default|preserve) 'preserve'> + +<!-- + Define the per-user file that holds cache font information. + + If the filename begins with '~', it is replaced with the users + home directory path. +--> +<!ELEMENT cache (#PCDATA)> +<!ATTLIST cache xml:space (default|preserve) 'preserve'> + +<!-- + Reference another configuration file; note that this + is another complete font configuration file and not + just a file included by the XML parser. + + Set 'ignore_missing' to 'yes' if errors are to be ignored. + + If the filename begins with '~', it is replaced with the users + home directory path. +--> +<!ELEMENT include (#PCDATA)> +<!ATTLIST include + ignore_missing (no|yes) "no" + xml:space (default|preserve) "preserve"> + +<!-- + Global library configuration data + --> +<!ELEMENT config (blank|rescan)*> + +<!-- + Specify the set of Unicode encoding values which + represent glyphs that are allowed to contain no + data. With this list, fontconfig can examine + fonts for broken glyphs and eliminate them from + the set of valid Unicode chars. This idea + was borrowed from Mozilla + --> +<!ELEMENT blank (int)*> + +<!-- + Aliases are just a special case for multiple match elements + + They are syntactically equivalent to: + + <match> + <test name="family"> + <string value=[family]/> + </test> + <edit name="family" mode="prepend"> + <string value=[prefer]/> + ... + </edit> + <edit name="family" mode="append"> + <string value=[accept]/> + ... + </edit> + <edit name="family" mode="append_last"> + <string value=[default]/> + ... + </edit> + </match> +--> +<!-- + Periodically rescan the font configuration and + directories to synch internal state with filesystem + --> +<!ELEMENT rescan (int)> + + +<!ELEMENT alias (family*, prefer?, accept?, default?)> +<!ELEMENT prefer (family)*> +<!ELEMENT accept (family)*> +<!ELEMENT default (family)*> +<!ELEMENT family (#PCDATA)> +<!ATTLIST family xml:space (default|preserve) 'preserve'> + +<!ENTITY % expr 'int|double|string|matrix|bool|charset + |name|const + |or|and|eq|not_eq|less|less_eq|more|more_eq|contains|not_contains + |plus|minus|times|divide|not|if'> + +<!-- + Match and edit patterns. + + If 'target' is 'pattern', execute the match before selecting a font. + if 'target' is 'font', execute the match on the result of a font + selection. +--> +<!ELEMENT match (test*, edit*)> +<!ATTLIST match + target (pattern|font) "pattern"> + +<!-- + Match a field in a pattern + + if 'qual' is 'any', then the match succeeds if any value in the field matches. + if 'qual' is 'all', then the match succeeds only if all values match. + if 'qual' is 'first', then the match succeeds only if the first value matches. + if 'qual' is 'not_first', then the match succeeds only if any value other than + the first matches. + For match elements with target=font, if test 'target' is 'pattern', + then the test is applied to the pattern used in matching rather than + to the resulting font. +--> +<!ELEMENT test (%expr;)*> +<!ATTLIST test + qual (any|all|first|not_first) "any" + name CDATA #REQUIRED + target (pattern|font|default) "default" + compare (eq|not_eq|less|less_eq|more|more_eq|contains|not_contains) "eq"> + +<!-- + Edit a field in a pattern + + The enclosed values are used together to edit the list of values + associated with 'name'. + + If 'name' matches one of those used in a test element for this match element: + if 'mode' is 'assign', replace the matched value. + if 'mode' is 'assign_replace', replace all of the values + if 'mode' is 'prepend', insert before the matched value + if 'mode' is 'append', insert after the matched value + if 'mode' is 'prepend_first', insert before all of the values + if 'mode' is 'append_last', insert after all of the values + If 'name' doesn't match any of those used in a test element: + if 'mode' is 'assign' or 'assign_replace, replace all of the values + if 'mode' is 'prepend' or 'prepend_first', insert before all of the values + if 'mode' is 'append' or 'append_last', insert after all of the values +--> +<!ELEMENT edit (%expr;)*> +<!ATTLIST edit + name CDATA #REQUIRED + mode (assign|assign_replace|prepend|append|prepend_first|append_last) "assign" + binding (weak|strong) "weak"> + +<!-- + Elements of expressions follow +--> +<!ELEMENT int (#PCDATA)> +<!ATTLIST int xml:space (default|preserve) 'preserve'> +<!ELEMENT double (#PCDATA)> +<!ATTLIST double xml:space (default|preserve) 'preserve'> +<!ELEMENT string (#PCDATA)> +<!ATTLIST string xml:space (default|preserve) 'preserve'> +<!ELEMENT matrix (double,double,double,double)> +<!ELEMENT bool (true|false)> +<!ELEMENT charset (#PCDATA)> +<!ATTLIST charset xml:space (default|preserve) 'preserve'> +<!ELEMENT name (#PCDATA)> +<!ATTLIST name xml:space (default|preserve) 'preserve'> +<!ELEMENT const (#PCDATA)> +<!ATTLIST const xml:space (default|preserve) 'preserve'> +<!ELEMENT or (%expr;)*> +<!ELEMENT and (%expr;)*> +<!ELEMENT eq ((%expr;), (%expr;))> +<!ELEMENT not_eq ((%expr;), (%expr;))> +<!ELEMENT less ((%expr;), (%expr;))> +<!ELEMENT less_eq ((%expr;), (%expr;))> +<!ELEMENT more ((%expr;), (%expr;))> +<!ELEMENT more_eq ((%expr;), (%expr;))> +<!ELEMENT contains ((%expr;), (%expr;))> +<!ELEMENT not_contains ((%expr;), (%expr;))> +<!ELEMENT plus (%expr;)*> +<!ELEMENT minus (%expr;)*> +<!ELEMENT times (%expr;)*> +<!ELEMENT divide (%expr;)*> +<!ELEMENT not (%expr;)> +<!ELEMENT if ((%expr;), (%expr;), (%expr;))> Index: xc/lib/fontconfig/local.def diff -u /dev/null xc/lib/fontconfig/local.def:1.3 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/local.def Fri May 31 02:52:47 2002 @@ -0,0 +1,70 @@ +#ifndef SharedLibFontconfig +#define SharedLibFontconfig YES +#endif + +#ifndef NormalLibFontconfig +#define NormalLibFontconfig (!SharedLibFontconfig | ForceNormalLib) +#endif + +#ifndef DebugLibFontconfig +#define DebugLibFontconfig NO +#endif + +#ifndef ProfileLibFontconfig +#define ProfileLibFontconfig NO +#endif + +#define _FUse(a,b) b hello +#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp) +# define _FUseCat(a,b,c) b##c fllop +#else +# define _FUseCat(a,b,c) b/**/c +#endif + +#undef _Use +#undef _UseCat +#define _Use _FUse +#define _UseCat _FUseCat + +#ifndef ExpatClientLibs +#define ExpatClientLibs -lexpat +#endif +#ifndef ExpatClientDepLibs +#define ExpatClientDepLibs +#endif + +#ifndef FontconfigClientDepLibs +#define FontconfigClientDepLibs $(DEPFONTCONFIGLIB) $(DEPFREETYPE2LIB) ExpatClientDepLibs +#endif +#ifndef FontconfigClientLibs +#define FontconfigClientLibs $(FONTCONFIGLIB) $(FREETYPE2LIB) ExpatClientLibs +#endif + +#if SharedLibFontconfig +#define SharedFontconfigRev 1.0 +SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),SOXLIBREV,SharedFontconfigRev) +#else +ProjectUnsharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),BuildLibDir) +#endif + +FCCACHE=$(TOP)/fc-cache/fc-cache + +#undef LinkBuildLibrary +#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\ + RemoveFile($(BUILDLIBDIR)/lib) @@\ + cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib . +#undef _LinkBuildLibrary +#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) + +#undef LinkBuildLibraryMaybe +#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\ + @if doit; then (set -x; \ @@\ + RemoveFile($(BUILDLIBDIR)/lib); \ @@\ + cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi + +#ifdef LdPreLibs +# undef LdPreLibs +#endif +#define LdPreLibs -L$(BUILDLIBDIR) LdPreLib XLdPreLibs + +LDPRELIBS=LdPreLibs Index: xc/lib/fontconfig/setfontdirs diff -u /dev/null xc/lib/fontconfig/setfontdirs:1.6 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/setfontdirs Mon Jan 6 21:07:47 2003 @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $XFree86: xc/lib/fontconfig/setfontdirs,v 1.6 2003/01/07 02:07:47 dawes Exp $ +# +LC_ALL=C +export LC_ALL +FONTDIRS=fontdirs$$ +trap "rm $FONTDIRS" 0 +sh ./findfonts ${1+"$@"} > $FONTDIRS +cp fonts.conf.in fonts.conf +chmod +w fonts.conf +EDITOR=ed +(echo q | ed) > /dev/null 2>&1 +if [ $? -ne 0 ]; then + EDITOR=ex + (echo q | ex) > /dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "$0: *** Error: Cannot find 'ed' or 'ex' editor" + exit 1 + fi +fi +$EDITOR fonts.conf << EOF +/FONTPATH_END/a +<!-- Font directory list configured on `date` --> +. ++r $FONTDIRS +a + <dir>~/.fonts</dir> + +. +/FONTPATH_START/,/FONTPATH_END/d + +w +q +EOF + Index: xc/lib/fontconfig/config/Makedefs.in diff -u /dev/null xc/lib/fontconfig/config/Makedefs.in:1.4 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/config/Makedefs.in Mon Aug 19 15:32:00 2002 @@ -0,0 +1,76 @@ +# +# $XFree86: xc/lib/fontconfig/config/Makedefs.in,v 1.4 2002/08/19 19:32:00 keithp Exp $ +# +# Copyright © 2002 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. +# + +SHELL = @SHELL@ + +srcdir=@srcdir@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +bindir=@bindir@ +datadir=@datadir@ +includedir=@includedir@ +sysconfdir=@sysconfdir@ +confdir=@confdir@ + +DSO_LDOPTS=@DSO_LDOPTS@ +DSO_CFLAGS=@DSO_CFLAGS@ +DSO_PIC_CFLAGS=@DSO_PIC_CFLAGS@ + +INSTALL=@INSTALL@ +INSTALL_PROGRAM=@INSTALL_PROGRAM@ +INSTALL_SCRIPT=@INSTALL_SCRIPT@ +INSTALL_DATA=@INSTALL_DATA@ +MKSHLIB=@MKSHLIB@ +LN_S=@LN_S@ + +# shared libraries +LIBDIR=$(libdir) +# programs +BINDIR=$(bindir) +# font configuration files +CONFDIR=@CONFDIR@ +# include files +INCLUDEDIR=$(includedir)/fontconfig + +X_FONT_DIR=@X_FONT_DIR@ +FC_DEFAULT_FONTS=@FC_DEFAULT_FONTS@ +FCPATH_DEF=-DFONTCONFIG_PATH=\"$(CONFDIR)\" + +CDEBUGFLAGS=@CFLAGS@ + +INCLUDES=-I$(TOPDIR) -I$(srcdir) @CPPFLAGS@ + +CFLAGS=$(CDEBUGFLAGS) @DEFS@ $(FCPATH_DEF) $(INCLUDES) + +LIBBASE=libfontconfig.so +LIBFILE=$(LIBBASE).@PACKAGE_MAJOR@.@PACKAGE_MINOR@ +LIBMAJOR=$(LIBBASE).@PACKAGE_MAJOR@ + +LIBFONTCONFIG=-L$(SRCDIR) -lfontconfig + +SRCDIR=$(TOPDIR)/src + +INCDIR=$(TOPDIR)/fontconfig +HEADERS=$(INCDIR)/fontconfig.h $(INCDIR)/fcfreetype.h $(INCDIR)/fcprivate.h Index: xc/lib/fontconfig/config/config-subst diff -u /dev/null xc/lib/fontconfig/config/config-subst:1.2 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/config/config-subst Thu May 23 19:00:46 2002 @@ -0,0 +1,10 @@ +#!/bin/sh +script=config-subst.$$ +trap "rm $script" 0 +rm -f $script +for i in ${1+"$@"}; do + var="`echo "$i" | sed 's/=.*$//'`" + val="`echo "$i" | sed 's/^[^=]*=//'`" + echo "s;@$var@;$val;" >> $script +done +sed -f $script Index: xc/lib/fontconfig/config/config.guess diff -u /dev/null xc/lib/fontconfig/config/config.guess:1.1 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/config/config.guess Tue May 21 13:06:21 2002 @@ -0,0 +1,1391 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-02-13' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner <bothner@cygnus.com>. +# Please send patches to <config-patches@gnu.org>. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break + fi + done + rm -f $dummy.c $dummy.o $dummy.rel + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <<EOF >$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + mips:Linux:*:*) + cat >$dummy.c <<EOF +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ +int main (int argc, char *argv[]) { +#else +int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + *:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_emulations=`cd /; ld --help 2>&1 \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + elf_i?86) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + sparclinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32_sparc) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + armlinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32arm*) + echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" + exit 0 + ;; + armelf_linux*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + m68klinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32ppc | elf32ppclinux) + # Determine Lib Version + cat >$dummy.c <<EOF +#include <features.h> +#if defined(__GLIBC__) +extern char __libc_version[]; +extern char __libc_release[]; +#endif +main(argc, argv) + int argc; + char *argv[]; +{ +#if defined(__GLIBC__) + printf("%s %s\n", __libc_version, __libc_release); +#else + printf("unkown\n"); +#endif + return 0; +} +EOF + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 + ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + cat <<EOF >$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; + 1-0) UNAME_MACHINE="alphaev5" ;; + 1-1) UNAME_MACHINE="alphaev56" ;; + 1-101) UNAME_MACHINE="alphapca56" ;; + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) UNAME_MACHINE="alphaev67" ;; + esac + + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + test -z "$ld_supported_emulations" \ + && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c <<EOF +#include <features.h> +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i?86:*:5:7*) + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i?86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i?86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >$dummy.c <<EOF +#ifdef _SEQUENT_ +# include <sys/types.h> +# include <sys/utsname.h> +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include <sys/param.h> +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 <<EOF +$0: unable to guess system type + +This script, last modified $timestamp, has failed to recognize +the operating system you are using. It is advised that you +download the most up to date version of the config scripts from + + ftp://ftp.gnu.org/pub/gnu/config/ + +If the version you run ($0) is already up to date, please +send the following data and any information you think might be +pertinent to <config-patches@gnu.org> in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Index: xc/lib/fontconfig/config/config.sub diff -u /dev/null xc/lib/fontconfig/config/config.sub:1.1 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/config/config.sub Tue May 21 13:06:21 2002 @@ -0,0 +1,1355 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-02-13' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to <config-patches@gnu.org>. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ + | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp10 | pdp11 \ + | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | miprs64vr5000el | mcore \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ + | thumb | d10v | d30v | fr30 | avr | openrisc) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[234567]86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ + | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [cjt]90) + basic_machine=${basic_machine}-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4) + basic_machine=sh-unknown + ;; + sparc | sparcv9) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i[34567]86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Index: xc/lib/fontconfig/config/install.sh diff -u /dev/null xc/lib/fontconfig/config/install.sh:1.1 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/config/install.sh Tue May 21 13:06:21 2002 @@ -0,0 +1,240 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# +# $XFree86: xc/lib/fontconfig/config/install.sh,v 1.1 2002/05/21 17:06:21 keithp Exp $ +# + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +tranformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 Index: xc/lib/fontconfig/doc/fontconfig.tex diff -u /dev/null xc/lib/fontconfig/doc/fontconfig.tex:1.1.1.1 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/doc/fontconfig.tex Thu Feb 14 18:34:11 2002 @@ -0,0 +1,55 @@ +\documentclass[10pt]{article} +\usepackage{latexsym} +\usepackage{epsfig} +\usepackage{times} + +\begin{document} +\date{} +\title{The Fontconfig Library:\\ +Architecture and Users Guide} +\author{Keith Packard\\ +{\em XFree86 Core Team}\\ +keithp@keithp.com} +\maketitle +\thispagestyle{empty} + +\abstract + +The Fontconfig library provides for central administration and configuration +of fonts in a POSIX system. All font consumers can share a common database +of fonts and use common matching rules for font names. The set of available +fonts can be configured for each user and a set of configurable matching +rules allow for customizing the selection of fonts and configuring various +parameters related to rasterizing of those fonts for display in a variety of +media. The Fontconfig library is designed to co-exist peacefully with +existing font configuration and rasterization mechanisms; while it uses the +FreeType library to discover characteristics of available fonts, there +is no requirement to use FreeType for rasterization. + +\section {Introduction} + +\section {Configuration Files} + +\section {Application Interface} + +\subsection {Datatypes} + +\subsection {Font Set Interface} + +\subsection {Font Patterns} + +\subsection {Listing Available Fonts} + +\subsection {Using Font Names} + +\subsection {Manipulating Matrices} + +\subsection {UTF-8 Helper Functions} + +\section {Font Sub-System Interface} + +\subsection {Extending Font Names} + +\subsection {Executing Configuration Rules} + +\end{document} Index: xc/lib/fontconfig/fc-cache/Imakefile diff -u /dev/null xc/lib/fontconfig/fc-cache/Imakefile:1.8 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/fc-cache/Imakefile Mon Aug 19 15:32:00 2002 @@ -0,0 +1,22 @@ +XCOMM $XFree86: xc/lib/fontconfig/fc-cache/Imakefile,v 1.8 2002/08/19 19:32:00 keithp Exp $ + +#ifdef UseInstalled +/* building outside the tree, use private defines */ +#include "../local.def" +#endif + +INCLUDES=$(FREETYPE2INCLUDES) -I.. + +LOCAL_LIBRARIES=FontconfigClientLibs + DEPLIBS=FontconfigClientDepLibs + +SRCS=fc-cache.c +OBJS=fc-cache.o + +ComplexProgramTarget(fc-cache) +LinkBuildBinary(ProgramTargetName(fc-cache)) + +install:: + if [ x$${DESTDIR} = x ]; then \ + $(FCCACHE) -v -f;\ + fi Index: xc/lib/fontconfig/fc-cache/Makefile.in diff -u /dev/null xc/lib/fontconfig/fc-cache/Makefile.in:1.4 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/fc-cache/Makefile.in Thu Aug 1 11:57:26 2002 @@ -0,0 +1,53 @@ +# +# $XFree86: xc/lib/fontconfig/fc-cache/Makefile.in,v 1.4 2002/08/01 15:57:26 keithp Exp $ +# +# Copyright © 2002 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. +# + +TOPDIR=.. + +include $(TOPDIR)/config/Makedefs + +SRCS=fc-cache.c + +OBJS=fc-cache.o + +PROG=fc-cache + +all:: $(PROG) + +$(PROG): $(OBJS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG) + +$(OBJS): $(HEADERS) + +install:: $(DESTDIR)$(BINDIR) + +$(DESTDIR)$(BINDIR): + mkdir -p $@ + +install:: $(DESTDIR)$(BINDIR)/$(PROG) + +$(DESTDIR)$(BINDIR)/$(PROG): $(PROG) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(BINDIR)/$< + +clean:: + rm -f $(PROG) $(OBJS) Index: xc/lib/fontconfig/fc-cache/fc-cache.c diff -u /dev/null xc/lib/fontconfig/fc-cache/fc-cache.c:1.9 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/fc-cache/fc-cache.c Wed Sep 18 13:11:46 2002 @@ -0,0 +1,262 @@ +/* + * $XFree86: xc/lib/fontconfig/fc-cache/fc-cache.c,v 1.9 2002/09/18 17:11:46 tsi Exp $ + * + * Copyright © 2002 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 <fontconfig/fontconfig.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <errno.h> +#ifdef HAVE_CONFIG_H +#include <config.h> +#else +#ifdef linux +#define HAVE_GETOPT_LONG 1 +#endif +#define HAVE_GETOPT 1 +#endif + +#ifndef HAVE_GETOPT +#define HAVE_GETOPT 0 +#endif +#ifndef HAVE_GETOPT_LONG +#define HAVE_GETOPT_LONG 0 +#endif + +#if HAVE_GETOPT_LONG +#undef _GNU_SOURCE +#define _GNU_SOURCE +#include <getopt.h> +const struct option longopts[] = { + {"force", 0, 0, 'f'}, + {"version", 0, 0, 'V'}, + {"verbose", 0, 0, 'v'}, + {"help", 0, 0, '?'}, + {NULL,0,0,0}, +}; +#else +#if HAVE_GETOPT +extern char *optarg; +extern int optind, opterr, optopt; +#endif +#endif + +static void +usage (char *program) +{ + fprintf (stderr, "usage: %s [-fvV?] [--force] [--verbose] [--version] [--help] [dirs]\n", + program); + fprintf (stderr, "Build font information caches in [dirs]\n" + "(all directories in font configuration by default).\n"); + fprintf (stderr, "\n"); + fprintf (stderr, " -f, --force scan directories with apparently valid caches\n"); + fprintf (stderr, " -v, --verbose display status information while busy\n"); + fprintf (stderr, " -V, --version display font config version and exit\n"); + fprintf (stderr, " -?, --help display this help and exit\n"); + exit (1); +} + +static int +nsubdirs (FcStrSet *set) +{ + FcStrList *list; + int n = 0; + + list = FcStrListCreate (set); + if (!list) + return 0; + while (FcStrListNext (list)) + n++; + FcStrListDone (list); + return n; +} + +static int +scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool verbose) +{ + int ret = 0; + FcChar8 *dir; + FcFontSet *set; + FcStrSet *subdirs; + FcStrList *sublist; + struct stat statb; + + /* + * Now scan all of the directories into separate databases + * and write out the results + */ + while ((dir = FcStrListNext (list))) + { + if (verbose) + { + printf ("%s: \"%s\": ", program, dir); + fflush (stdout); + } + set = FcFontSetCreate (); + if (!set) + { + fprintf (stderr, "Can't create font set\n"); + ret++; + continue; + } + subdirs = FcStrSetCreate (); + if (!subdirs) + { + fprintf (stderr, "Can't create directory set\n"); + ret++; + continue; + } + + if (stat ((char *) dir, &statb) == -1) + { + if (errno == ENOENT || errno == ENOTDIR) + { + if (verbose) + printf ("no such directory, skipping\n"); + } + else + { + fprintf (stderr, "\"%s\": ", dir); + perror (""); + ret++; + } + continue; + } + if (!S_ISDIR (statb.st_mode)) + { + fprintf (stderr, "\"%s\": not a directory, skipping\n", dir); + continue; + } + if (!FcDirScan (set, subdirs, 0, FcConfigGetBlanks (config), dir, force)) + { + fprintf (stderr, "\"%s\": error scanning\n", dir); + ret++; + continue; + } + if (!force && FcDirCacheValid (dir)) + { + if (verbose) + printf ("skipping, %d fonts, %d dirs\n", + set->nfont, nsubdirs(subdirs)); + } + else + { + if (verbose) + printf ("caching, %d fonts, %d dirs\n", + set->nfont, nsubdirs (subdirs)); + if (!FcDirSave (set, subdirs, dir)) + { + fprintf (stderr, "Can't save cache in \"%s\"\n", dir); + ret++; + } + } + FcFontSetDestroy (set); + sublist = FcStrListCreate (subdirs); + if (!sublist) + { + fprintf (stderr, "Can't create subdir list in \"%s\"\n", dir); + ret++; + continue; + } + ret += scanDirs (sublist, config, program, force, verbose); + FcStrSetDestroy (subdirs); + } + FcStrListDone (list); + return ret; +} + +int +main (int argc, char **argv) +{ + FcStrSet *dirs; + FcStrList *list; + FcBool verbose = FcFalse; + FcBool force = FcFalse; + FcConfig *config; + int i; + int ret; +#if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + +#if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "fVv?", longopts, NULL)) != -1) +#else + while ((c = getopt (argc, argv, "fVv?")) != -1) +#endif + { + switch (c) { + case 'f': + force = FcTrue; + break; + case 'V': + fprintf (stderr, "fontconfig version %d.%d.%d\n", + FC_MAJOR, FC_MINOR, FC_REVISION); + exit (0); + case 'v': + verbose = FcTrue; + break; + default: + usage (argv[0]); + } + } + i = optind; +#else + i = 1; +#endif + + config = FcInitLoadConfig (); + if (!config) + { + fprintf (stderr, "%s: Can't init font config library\n", argv[0]); + return 1; + } + if (argv[i]) + { + dirs = FcStrSetCreate (); + if (!dirs) + { + fprintf (stderr, "%s: Can't create list of directories\n", + argv[0]); + return 1; + } + while (argv[i]) + { + if (!FcStrSetAdd (dirs, (FcChar8 *) argv[i])) + { + fprintf (stderr, "%s: Can't add directory\n", argv[0]); + return 1; + } + i++; + } + list = FcStrListCreate (dirs); + FcStrSetDestroy (dirs); + } + else + list = FcConfigGetConfigDirs (config); + ret = scanDirs (list, config, argv[0], force, verbose); + if (verbose) + printf ("%s: %s\n", argv[0], ret ? "failed" : "succeeded"); + return ret; +} Index: xc/lib/fontconfig/fc-cache/fc-cache.man diff -u /dev/null xc/lib/fontconfig/fc-cache/fc-cache.man:1.1.1.1 --- /dev/null Thu Feb 27 12:28:04 2003 +++ xc/lib/fontconfig/fc-cache/fc-cache.man Thu Feb 14 18:34:11 2002 @@ -0,0 +1,45 @@ +.\" +.\" Copyright © 2002 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. +.\" +.\" +.\" $XFree86: xc/lib/fontconfig/fc-cache/fc-cache.man,v 1.1.1.1 2002/02/14 23:34:11 keithp Exp $ +.\" +.TH FC-CACHE 1 __vendorversion__ +.SH NAME +fc-cache, fonts.cache \- create an index of FreeType font files in a directory +.SH SYNOPSIS +.B "fc-cache" +.RI [ directory-name +\|.\|.\|. ] +.SH DESCRIPTION +If directory arguments are not given, +.I fc-cache +uses each directory in the current font configuration. Each directory is +scanned for font files readable by FreeType. A cache is created which +contains properties of each font and the associated filename. This cache is +used to speed application startup when using the fontconfig library. +.SH FILES +.TP 15 +.B fonts.cache +Maps file names to font properties. Read by the fontconfig library at +application startup to locate appropriate fonts. +.SH "SEE ALSO" +fontconfig(3) Index: xc/lib/fontconfig/fc-lang/Imakefile diff -u /dev/null xc/lib/fontconfig/fc-lang/Imakefile:1.15 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/Imakefile Mon Aug 19 15:32:00 2002 @@ -0,0 +1,56 @@ +XCOMM $XFree86: xc/lib/fontconfig/fc-lang/Imakefile,v 1.15 2002/08/19 19:32:00 keithp Exp $ + +#ifdef UseInstalled +/* building outside the tree, use private defines */ +#include "../local.def" +#endif + +INCLUDES=$(FREETYPE2INCLUDES) -I.. -I../src + +LOCAL_LIBRARIES=FontconfigClientLibs + DEPLIBS=FontconfigClientDepLibs + +SRCS=fc-lang.c +OBJS=fc-lang.o + +TARG=fclang.h +TMPL=fclang.tmpl.h + +# +# Basic ISO 639-1 two letter language names, 639-2 are three-letter +# language codes +# + +ORTH=aa.orth ab.orth af.orth am.orth ar.orth ast.orth ava.orth ay.orth\ + az.orth bam.orth ba.orth be.orth bg.orth bho.orth bh.orth bin.orth\ + bi.orth bn.orth bo.orth br.orth bs.orth bua.orth ca.orth ce.orth\ + chm.orth ch.orth chr.orth co.orth cs.orth cu.orth cv.orth cy.orth\ + da.orth de.orth dz.orth el.orth en.orth eo.orth es.orth et.orth eu.orth\ + fa.orth fi.orth fj.orth fo.orth fr.orth ful.orth fur.orth fy.orth\ + ga.orth gd.orth gez.orth gl.orth gn.orth gu.orth gv.orth ha.orth\ + haw.orth he.orth hi.orth ho.orth hr.orth hu.orth hy.orth ia.orth\ + ibo.orth id.orth ie.orth ik.orth io.orth is.orth it.orth iu.orth ja.orth\ + kaa.orth ka.orth ki.orth kk.orth kl.orth km.orth kn.orth kok.orth\ + ko.orth ks.orth kum.orth ku.orth kv.orth kw.orth ky.orth la.orth lb.orth\ + lez.orth lo.orth lt.orth lv.orth mg.orth mh.orth mi.orth mk.orth ml.orth\ + mn.orth mo.orth mr.orth mt.orth my.orth nb.orth ne.orth nl.orth nn.orth\ + no.orth ny.orth oc.orth om.orth or.orth os.orth pl.orth pt.orth rm.orth\ + ro.orth ru.orth sah.orth sa.orth sco.orth sel.orth se.orth sh.orth\ + si.orth sk.orth sl.orth sma.orth smj.orth smn.orth sm.orth sms.orth\ + so.orth sq.orth sr.orth sv.orth sw.orth syr.orth ta.orth te.orth tg.orth\ + th.orth ti.orth tk.orth tl.orth tn.orth to.orth tr.orth ts.orth tt.orth\ + tw.orth tyv.orth ug.orth uk.orth ur.orth uz.orth ven.orth vi.orth\ + vo.orth vot.orth wa.orth wen.orth wo.orth xh.orth yap.orth yi.orth\ + yo.orth zh_cn.orth zh_hk.orth zh_mo.orth zh_sg.orth zh_tw.orth zu.orth + +all:: $(TARG) + +clean:: + $(RM) $(TARG) + +$(TARG): fc-lang $(ORTH) $(TMPL) + chmod +w $(TARG) + ./fc-lang $(ORTH) < $(TMPL) > $(TARG) + +ComplexProgramTarget(fc-lang) +LinkBuildBinary(ProgramTargetName(fc-lang)) Index: xc/lib/fontconfig/fc-lang/aa.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/aa.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/aa.orth Wed Aug 7 20:10:50 2002 @@ -0,0 +1,40 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/aa.orth,v 1.1 2002/08/08 00:10:50 keithp Exp $ +# +# Copyright © 2002 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. +# +# Afar (AA) +# +# Taken from http://www.arhotaba.com/waldegram.htm +# and http://www.arhotaba.com/alphabet.htm +# +0041-005a # afar doesn't use J, P, V or Z +0061-007a # afar doesn't use j, p, v or z +00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX +00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX +00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX +00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX +00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX +00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX +00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX +00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX +00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX +00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX Index: xc/lib/fontconfig/fc-lang/ab.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ab.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ab.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,45 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ab.orth,v 1.4 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Abkhazia (AB) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +#00ab # double angle quotes +#00bb # double angle quotes +0401 +040f +0410-044f +0451 +045f +049e-049f +04a6-04a9 +04ac-04ad +04b2-04b7 +04bc-04bf +04d8 +04d9 +04e0-0re1 +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/af.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/af.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/af.orth Fri Jul 12 15:19:15 2002 @@ -0,0 +1,46 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/af.orth,v 1.1 2002/07/12 19:19:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Afrikaans (AF) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c8 +00e8 +00c9 +00e9 +00ca +00ea +00cb +00eb +00ce +00ee +00cf +00ef +00d4 +00f4 +00db +00fb +0149 Index: xc/lib/fontconfig/fc-lang/am.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/am.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/am.orth Wed Aug 7 20:10:50 2002 @@ -0,0 +1,28 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/am.orth,v 1.1 2002/08/08 00:10:50 keithp Exp $ +# +# Copyright © 2002 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. +# +# Amharic (AM) +# +# The same as Ethiopic +# +include gez.orth Index: xc/lib/fontconfig/fc-lang/ar.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ar.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ar.orth Wed Jul 10 17:57:23 2002 @@ -0,0 +1,88 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ar.orth,v 1.3 2002/07/10 21:57:23 keithp Exp $ +# +# Copyright © 2002 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. +# +# Arabic (AR) +# +# General forms. Leave these out for now as most software +# expects presentation forms. +# +#060C # ARABIC COMMA +#061B # ARABIC SEMICOLON +#061F # ARABIC QUESTION MARK +#0621 # ARABIC LETTER HAMZA +#0622 # ARABIC LETTER ALEF WITH MADDA ABOVE +#0623 # ARABIC LETTER ALEF WITH HAMZA ABOVE +#0624 # ARABIC LETTER WAW WITH HAMZA ABOVE +#0625 # ARABIC LETTER ALEF WITH HAMZA BELOW +#0626 # ARABIC LETTER YEH WITH HAMZA ABOVE +#0627 # ARABIC LETTER ALEF +#0628 # ARABIC LETTER BEH +#0629 # ARABIC LETTER TEH MARBUTA +#062A # ARABIC LETTER TEH +#062B # ARABIC LETTER THEH +#062C # ARABIC LETTER JEEM +#062D # ARABIC LETTER HAH +#062E # ARABIC LETTER KHAH +#062F # ARABIC LETTER DAL +#0630 # ARABIC LETTER THAL +#0631 # ARABIC LETTER REH +#0632 # ARABIC LETTER ZAIN +#0633 # ARABIC LETTER SEEN +#0634 # ARABIC LETTER SHEEN +#0635 # ARABIC LETTER SAD +#0636 # ARABIC LETTER DAD +#0637 # ARABIC LETTER TAH +#0638 # ARABIC LETTER ZAH +#0639 # ARABIC LETTER AIN +#063A # ARABIC LETTER GHAIN +#0640 # ARABIC TATWEEL +#0641 # ARABIC LETTER FEH +#0642 # ARABIC LETTER QAF +#0643 # ARABIC LETTER KAF +#0644 # ARABIC LETTER LAM +#0645 # ARABIC LETTER MEEM +#0646 # ARABIC LETTER NOON +#0647 # ARABIC LETTER HEH +#0648 # ARABIC LETTER WAW +#0649 # ARABIC LETTER ALEF MAKSURA +#064A # ARABIC LETTER YEH +#064B # ARABIC FATHATAN +#064C # ARABIC DAMMATAN +#064D # ARABIC KASRATAN +#064E # ARABIC FATHA +#064F # ARABIC DAMMA +#0650 # ARABIC KASRA +#0651 # ARABIC SHADDA +#0652 # ARABIC SUKUN +# +# Data from Roozbeh Pournader <roozbeh@sharif.edu> +# +# Select fonts based on support for presentation forms; this may +# exclude some OpenType fonts, but the hope is those would be +# located by a clever shaper by Unicode codepoints in any case. +# +# General Forms: +#0621-063a +#0641-064a +# Presentations Forms: +fe80-fefc Index: xc/lib/fontconfig/fc-lang/ast.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ast.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ast.orth Wed Aug 7 13:34:15 2002 @@ -0,0 +1,47 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ast.orth,v 1.1 2002/08/07 17:34:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Orthography from http://www.everytype.com/alphabets/asturian.pdf +# +# Asturian (AST) +# +0040-005a +0060-007a +00a1 +00ab +00bb +00bf +00c1 +00c9 +00cd +00d1 +00d3 +00da +00dc +00e1 +00e9 +00ed +00f1 +00f3 +00fa +00fc Index: xc/lib/fontconfig/fc-lang/ava.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ava.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ava.orth Fri Jul 12 03:52:15 2002 @@ -0,0 +1,97 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ava.orth,v 1.1 2002/07/12 07:52:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Avaric (AVA) +# +0401 +0406 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 Index: xc/lib/fontconfig/fc-lang/ay.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ay.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ay.orth Wed Aug 7 20:10:50 2002 @@ -0,0 +1,37 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ay.orth,v 1.1 2002/08/08 00:10:50 keithp Exp $ +# +# Copyright © 2002 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. +# +# Aymara (KW) +# +# Orthography from http://www.aymara.org/arusa/qillqa_eng.html +# +0041-005a +0061-007a +00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS +00CF # LATIN CAPITAL LETTER I WITH DIAERESIS +00D1 # LATIN CAPITAL LETTER N WITH TILDE +00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +00E4 # LATIN SMALL LETTER A WITH DIAERESIS +00EF # LATIN SMALL LETTER I WITH DIAERESIS +00F1 # LATIN SMALL LETTER N WITH TILDE +00FC # LATIN SMALL LETTER U WITH DIAERESIS Index: xc/lib/fontconfig/fc-lang/az.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/az.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/az.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,66 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/az.orth,v 1.3 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Azerbaijani (AZ) +# +# The complete orthography is from http://www.evertype.com +# +# This has been verified with the latin and cyrillic orthographies found at +# http://www.eki.ee/letter +# +0041-005a +0061-007a +00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS +00C7 # LATIN CAPITAL LETTER C WITH CEDILLA +00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS +00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +00E4 # LATIN SMALL LETTER A WITH DIAERESIS +00E7 # LATIN SMALL LETTER C WITH CEDILLA +00F6 # LATIN SMALL LETTER O WITH DIAERESIS +00FC # LATIN SMALL LETTER U WITH DIAERESIS +011E # LATIN CAPITAL LETTER G WITH BREVE +011F # LATIN SMALL LETTER G WITH BREVE +0130 # LATIN CAPITAL LETTER I WITH DOT ABOVE +0131 # LATIN SMALL LETTER DOTLESS I +015E # LATIN CAPITAL LETTER S WITH CEDILLA * +015F # LATIN SMALL LETTER S WITH CEDILLA * +018F # LATIN CAPITAL LETTER SCHWA +0259 # LATIN SMALL LETTER SCHWA +#02BC # MODIFIER LETTER APOSTROPHE +0408 # CYRILLIC CAPITAL LETTER JE +0410-044f # CYRILLIC CAPITAL AND SMALL +0458 # CYRILLIC SMALL LETTER JE +0493 # CYRILLIC SMALL LETTER GHE WITH STROKE +0492 # CYRILLIC CAPITAL LETTER GHE WITH STROKE +049C # CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE +049D # CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE +04AE # CYRILLIC CAPITAL LETTER STRAIGHT U +04AF # CYRILLIC SMALL LETTER STRAIGHT U +04B8 # CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE +04B9 # CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE +04BA # CYRILLIC CAPITAL LETTER SHHA +04BB # CYRILLIC SMALL LETTER SHHA +04D8 # CYRILLIC CAPITAL LETTER SCHWA +04D9 # CYRILLIC SMALL LETTER SCHWA +04E8 # CYRILLIC CAPITAL LETTER BARRED O +04E9 # CYRILLIC SMALL LETTER BARRED O Index: xc/lib/fontconfig/fc-lang/ba.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ba.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ba.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,56 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ba.orth,v 1.4 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Bashkir (BA) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +#00AA # FEMININE ORDINAL INDICATOR +#00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK * +#0401 # CYRILLIC CAPITAL LETTER IO in evertype.com +#0451 # CYRILLIC SMALL LETTER IO in evertype.com + +0410-044f # CYRILLIC +0492 # CYRILLIC CAPITAL LETTER GHE WITH STROKE +0493 # CYRILLIC SMALL LETTER GHE WITH STROKE +0498 # CYRILLIC CAPITAL LETTER ZE WITH DESCENDER +0499 # CYRILLIC SMALL LETTER ZE WITH DESCENDER +04A0 # CYRILLIC CAPITAL LETTER BASHKIR KA +04A1 # CYRILLIC SMALL LETTER BASHKIR KA +04A2 # CYRILLIC CAPITAL LETTER EN WITH DESCENDER +04A3 # CYRILLIC SMALL LETTER EN WITH DESCENDER +04AA # CYRILLIC CAPITAL LETTER ES WITH DESCENDER +04AB # CYRILLIC SMALL LETTER ES WITH DESCENDER +04AE # CYRILLIC CAPITAL LETTER STRAIGHT U +04AF # CYRILLIC SMALL LETTER STRAIGHT U +04BA # CYRILLIC CAPITAL LETTER SHHA +04BB # CYRILLIC SMALL LETTER SHHA +04D8 # CYRILLIC CAPITAL LETTER SCHWA +04D9 # CYRILLIC SMALL LETTER SCHWA +04E8 # CYRILLIC CAPITAL LETTER BARRED O +04E9 # CYRILLIC SMALL LETTER BARRED O +#2018-2019 # single quotes +#201c-201d # double quotes +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/bam.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bam.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bam.orth Fri Jul 12 15:19:15 2002 @@ -0,0 +1,37 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bam.orth,v 1.1 2002/07/12 19:19:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Bambara (BAM) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +0190 +025b +014a +014b +019d +0272 +0186 +0254 Index: xc/lib/fontconfig/fc-lang/be.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/be.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/be.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,40 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/be.orth,v 1.4 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Byelorussian (BE) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +#00ab +#00bb +#02BC # MODIFIER LETTER APOSTROPHE +#0401 # CYRILLIC CAPITAL LETTER IO evertype.com +0406 # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I +040E # CYRILLIC CAPITAL LETTER SHORT U (Byelorussian) +0410-044f +#0451 # CYRILLIC SMALL LETTER IO evertype.com +0456 # CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I +045E # CYRILLIC SMALL LETTER SHORT U (Byelorussian) +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/bg.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bg.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bg.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,43 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bg.orth,v 1.4 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Bulgarian (BG) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +#0400 # CYRILLIC CAPITAL IE WITH GRAVE evertype.com +#040d # CYRILLIC CAPITAL I WITH GRAVE evertype.com +0410-042a +042c +042e-042f +0430-044a +044c +044e-044f +#0450 # CYRILLIC SMALL IE WITH GRAVE evertype.com +#045d # CYRILLIC SMALL I WITH GRAVE evertype.com +#0462 # CYRILLIC CAPITAL LETTER YAT evertype.com +#0463 # CYRILLIC SMALL LETTER YAT evertype.com +#046A # CYRILLIC CAPITAL LETTER BIG YUS evertype.com +#046B # CYRILLIC SMALL LETTER BIG YUS evertype.com Index: xc/lib/fontconfig/fc-lang/bh.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bh.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bh.orth Fri Jul 12 03:52:15 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bh.orth,v 1.1 2002/07/12 07:52:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Bihari (Devanagari script) (BH) +include hi.orth Index: xc/lib/fontconfig/fc-lang/bho.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bho.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bho.orth Fri Jul 12 03:52:15 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bho.orth,v 1.1 2002/07/12 07:52:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Bhojpuri (Devanagari script) (BHO) +include hi.orth Index: xc/lib/fontconfig/fc-lang/bi.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bi.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bi.orth Fri Jul 12 17:05:58 2002 @@ -0,0 +1,39 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bi.orth,v 1.2 2002/07/12 21:05:58 keithp Exp $ +# +# Copyright © 2002 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. +# +# Bislama (BI) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c9 +00e9 +00cf +00ef +#e000 # LATIN CAPITAL LETTER M WITH MACRON (no UCS code) +#e001 # LATIN SMALL LETTER M WITH MACRON (no UCS code) +#e002 # LATIN CAPITAL LETTER P WITH MACRON (no UCS code) +#e003 # LATIN SMALL LETTER P WITH MACRON (no UCS code) +00dc +00fc Index: xc/lib/fontconfig/fc-lang/bin.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bin.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bin.orth Wed Aug 7 20:10:50 2002 @@ -0,0 +1,55 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bin.orth,v 1.1 2002/08/08 00:10:50 keithp Exp $ +# +# Copyright © 2002 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. +# +# Edo or Bini (BIN) +# +# Orthography from http://www.ideography.co.uk/library/pdf/charsets.pdf +# +0041-005a +0061-007a +00C0 # LATIN CAPITAL LETTER A WITH GRAVE +00C1 # LATIN CAPITAL LETTER A WITH ACUTE +00C8 # LATIN CAPITAL LETTER E WITH GRAVE +00C9 # LATIN CAPITAL LETTER E WITH ACUTE +00CC # LATIN CAPITAL LETTER I WITH GRAVE +00CD # LATIN CAPITAL LETTER I WITH ACUTE +00D2 # LATIN CAPITAL LETTER O WITH GRAVE +00D3 # LATIN CAPITAL LETTER O WITH ACUTE +00D9 # LATIN CAPITAL LETTER U WITH GRAVE +00DA # LATIN CAPITAL LETTER U WITH ACUTE +00E0 # LATIN SMALL LETTER A WITH GRAVE +00E1 # LATIN SMALL LETTER A WITH ACUTE +00E8 # LATIN SMALL LETTER E WITH GRAVE +00E9 # LATIN SMALL LETTER E WITH ACUTE +00EC # LATIN SMALL LETTER I WITH GRAVE +00ED # LATIN SMALL LETTER I WITH ACUTE +00F2 # LATIN SMALL LETTER O WITH GRAVE +00F3 # LATIN SMALL LETTER O WITH ACUTE +00F9 # LATIN SMALL LETTER U WITH GRAVE +00FA # LATIN SMALL LETTER U WITH ACUTE +1EB8 # LATIN CAPITAL LETTER E WITH DOT BELOW +1EB9 # LATIN SMALL LETTER E WITH DOT BELOW +1ECC # LATIN CAPITAL LETTER O WITH DOT BELOW +1ECD # LATIN SMALL LETTER O WITH DOT BELOW +0300 # COMBINING GRAVE ACCENT (Varia) +0301 # COMBINING ACUTE ACCENT (Oxia, Tonos) Index: xc/lib/fontconfig/fc-lang/bn.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bn.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bn.orth Sun Jul 7 15:18:51 2002 @@ -0,0 +1,41 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bn.orth,v 1.1 2002/07/07 19:18:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Bengali (BN) +# +# Taken straight from the Unicode coverage for Bengali +0981-0983 +0985-098c +098f-0990 +0993-09a8 +09aa-09b0 +09b2 +09b6-09b9 +09bc +09be-09c4 +09c7-09c8 +09cb-09cd +09d7 +09dc-09dd +09df-09e3 +09e6-09fa Index: xc/lib/fontconfig/fc-lang/bo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bo.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bo.orth Fri Jul 12 17:05:58 2002 @@ -0,0 +1,39 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bo.orth,v 1.2 2002/07/12 21:05:58 keithp Exp $ +# +# Copyright © 2002 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. +# +# Tibetan (BO) +# +# Taken from the Unicode coverage of this language +# +0f40-0f47 +0f49-0f69 +0f71-0f76 +0f78 +0f7a-0f7d +0f80-0f81 +0f90-0f97 +0f99-0fb9 +# Fixed-form subjoined consonants +# These characters are used only for transliteration and transcription. +#0fba-0fbc + Index: xc/lib/fontconfig/fc-lang/br.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/br.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/br.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,47 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/br.orth,v 1.4 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Breton (BR) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +#0027 +0041-005a +0061-007a +#00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK * +#00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK * +00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX +00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX +00D1 # LATIN CAPITAL LETTER N WITH TILDE +00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX eki.ee +00D9 # LATIN CAPITAL LETTER U WITH GRAVE +00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX +00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX +00F1 # LATIN SMALL LETTER N WITH TILDE +00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX eki.ee +00F9 # LATIN SMALL LETTER U WITH GRAVE +00FC # LATIN SMALL LETTER U WITH DIAERESIS +#2019-201a # single quote and comma Index: xc/lib/fontconfig/fc-lang/bs.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bs.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bs.orth Fri Jul 12 15:19:15 2002 @@ -0,0 +1,39 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bs.orth,v 1.1 2002/07/12 19:19:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Bosnian (BS) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +0106 +0107 +010c +010d +0110 +0111 +0160 +0161 +017d +017e Index: xc/lib/fontconfig/fc-lang/bua.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/bua.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/bua.orth Mon Oct 21 13:03:47 2002 @@ -0,0 +1,102 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/bua.orth,v 1.2 2002/10/21 17:03:47 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Buriat (Buryat) (BUA) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +#0472 # CYRILLIC CAPITAL LETTER FITA (Historic cyrillic letter) +#0473 # CYRILLIC SMALL LETTER FITA (Historic cyrillic letter) +04ae +04af +04ba +04bb Index: xc/lib/fontconfig/fc-lang/ca.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ca.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ca.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,58 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ca.orth,v 1.3 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Catalan (CA) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +#00B7 # MIDDLE DOT +00C0 # LATIN CAPITAL LETTER A WITH GRAVE +00C7 # LATIN CAPITAL LETTER C WITH CEDILLA +00C8 # LATIN CAPITAL LETTER E WITH GRAVE +00C9 # LATIN CAPITAL LETTER E WITH ACUTE +00CD # LATIN CAPITAL LETTER I WITH ACUTE +00CF # LATIN CAPITAL LETTER I WITH DIAERESIS +#00D1 # LATIN CAPITAL LETTER N WITH TILDE "important" @ eki.ee +00D2 # LATIN CAPITAL LETTER O WITH GRAVE +00D3 # LATIN CAPITAL LETTER O WITH ACUTE +00DA # LATIN CAPITAL LETTER U WITH ACUTE +00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +00E0 # LATIN SMALL LETTER A WITH GRAVE +00E7 # LATIN SMALL LETTER C WITH CEDILLA +00E8 # LATIN SMALL LETTER E WITH GRAVE +00E9 # LATIN SMALL LETTER E WITH ACUTE +00ED # LATIN SMALL LETTER I WITH ACUTE +00EF # LATIN SMALL LETTER I WITH DIAERESIS +#00F1 # LATIN SMALL LETTER N WITH TILDE "important" @ eki.ee +00F2 # LATIN SMALL LETTER O WITH GRAVE +00F3 # LATIN SMALL LETTER O WITH ACUTE +00FA # LATIN SMALL LETTER U WITH ACUTE +00FC # LATIN SMALL LETTER U WITH DIAERESIS +013F # LATIN CAPITAL LETTER L WITH MIDDLE DOT +0140 # LATIN SMALL LETTER L WITH MIDDLE DOT +#2018-2019 # single quotes +#201c-201d # double quotes Index: xc/lib/fontconfig/fc-lang/ce.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ce.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ce.orth Fri Jul 12 03:52:15 2002 @@ -0,0 +1,97 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ce.orth,v 1.1 2002/07/12 07:52:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Chechen (CE) +# +0401 +0406 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 Index: xc/lib/fontconfig/fc-lang/ch.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ch.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ch.orth Fri Jul 12 15:19:15 2002 @@ -0,0 +1,35 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ch.orth,v 1.1 2002/07/12 19:19:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Chamorro (CH) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c2 +00e2 +00d1 +00f1 +00dc +00fc Index: xc/lib/fontconfig/fc-lang/chm.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/chm.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/chm.orth Fri Jul 12 03:52:15 2002 @@ -0,0 +1,109 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/chm.orth,v 1.1 2002/07/12 07:52:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Mari (Lower Cheremis / Upper Cheremis) (CHM) +# +# I've merged both of these languages together so that a font +# for 'chm' will cover both orthographies +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +04a4 +04a5 +04d2 +04d3 +04e6 +04e7 +04f0 +04f1 +04f8 +04f9 Index: xc/lib/fontconfig/fc-lang/chr.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/chr.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/chr.orth Sat Jul 6 19:59:15 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/chr.orth,v 1.2 2002/07/06 23:59:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Cherokee (chr) +13a0-13f4 Index: xc/lib/fontconfig/fc-lang/co.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/co.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/co.orth Sat Jul 6 19:59:15 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/co.orth,v 1.2 2002/07/06 23:59:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Corsican (CO) +include fr.orth Index: xc/lib/fontconfig/fc-lang/cs.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/cs.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/cs.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,67 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/cs.orth,v 1.3 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Czech (CS) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00C1 # LATIN CAPITAL LETTER A WITH ACUTE +#00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS evertype.com +00C9 # LATIN CAPITAL LETTER E WITH ACUTE +00CD # LATIN CAPITAL LETTER I WITH ACUTE +00D3 # LATIN CAPITAL LETTER O WITH ACUTE +#00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS evertype.com +00DA # LATIN CAPITAL LETTER U WITH ACUTE +#00DC # LATIN CAPITAL LETTER U WITH DIAERESIS evertype.com +00DD # LATIN CAPITAL LETTER Y WITH ACUTE +00E1 # LATIN SMALL LETTER A WITH ACUTE +#00E4 # LATIN SMALL LETTER A WITH DIAERESIS evertype.com +00E9 # LATIN SMALL LETTER E WITH ACUTE +00ED # LATIN SMALL LETTER I WITH ACUTE +00F3 # LATIN SMALL LETTER O WITH ACUTE +#00F6 # LATIN SMALL LETTER O WITH DIAERESIS evertype.com +00FA # LATIN SMALL LETTER U WITH ACUTE +#00FC # LATIN SMALL LETTER U WITH DIAERESIS evertype.com +00FD # LATIN SMALL LETTER Y WITH ACUTE +010C # LATIN CAPITAL LETTER C WITH CARON +010D # LATIN SMALL LETTER C WITH CARON +010E # LATIN CAPITAL LETTER D WITH CARON +010F # LATIN SMALL LETTER D WITH CARON +011A # LATIN CAPITAL LETTER E WITH CARON +011B # LATIN SMALL LETTER E WITH CARON +0147 # LATIN CAPITAL LETTER N WITH CARON +0148 # LATIN SMALL LETTER N WITH CARON +0158 # LATIN CAPITAL LETTER R WITH CARON +0159 # LATIN SMALL LETTER R WITH CARON +0160 # LATIN CAPITAL LETTER S WITH CARON +0161 # LATIN SMALL LETTER S WITH CARON +0164 # LATIN CAPITAL LETTER T WITH CARON +0165 # LATIN SMALL LETTER T WITH CARON +016E # LATIN CAPITAL LETTER U WITH RING ABOVE +016F # LATIN SMALL LETTER U WITH RING ABOVE +017D # LATIN CAPITAL LETTER Z WITH CARON +017E # LATIN SMALL LETTER Z WITH CARON Index: xc/lib/fontconfig/fc-lang/cu.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/cu.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/cu.orth Wed Aug 7 13:34:15 2002 @@ -0,0 +1,42 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/cu.orth,v 1.1 2002/08/07 17:34:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Old Church Slavonic (CU) +# +# Orthography from http://www.evertype.com/alphabets/old-church-slavonic.pdf +# +0401-0402 +0405-0406 +0408 +040b +040d +040f-0418 +041a-042c +042e-044c +044e-0450 +0452 +0455-456 +0458 +045b +045d +045f-0479 Index: xc/lib/fontconfig/fc-lang/cv.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/cv.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/cv.orth Fri Jul 12 03:52:15 2002 @@ -0,0 +1,109 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/cv.orth,v 1.1 2002/07/12 07:52:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Chuvash (CV) +# +# +# I'm guessing the c cedilla is really es with descender +# +#00c7 # C cedilla +#00e7 # c cedilla +04aa # capital es with descender +04ab # small es with descender +0102 +0103 +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +04d6 +04d7 +04f2 +04f3 Index: xc/lib/fontconfig/fc-lang/cy.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/cy.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/cy.orth Tue Aug 6 14:59:43 2002 @@ -0,0 +1,63 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/cy.orth,v 1.2 2002/08/06 18:59:43 keithp Exp $ +# +# Copyright © 2002 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. +# +# Welsh (CY) +# +# Coverage given by Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk> +# and separately by Jessica Perry Hekman <jphekman@arborius.net> +# with help from Mark Kille and Jerry Hunter. +# +0041-005a +0061-007a +00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX +00C9 # LATIN CAPITAL LETTER E WITH ACUTE +00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX +00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX +00CF # LATIN CAPITAL LETTER I WITH DIAERESIS +00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX +00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX +00E9 # LATIN SMALL LETTER E WITH ACUTE +00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX +00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX +00EF # LATIN SMALL LETTER I WITH DIAERESIS +00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX +00FF # LATIN SMALL LETTER Y WITH DIAERESIS +# +# Non-Latin-1 characters needed for Welsh: +# +0174 # LATIN CAPITAL LETTER W WITH CIRCUMFLEX +0175 # LATIN SMALL LETTER W WITH CIRCUMFLEX +0176 # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX +0177 # LATIN SMALL LETTER Y WITH CIRCUMFLEX +0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS +# +# And stricktly speaking for dictionary authors also: +# +1E80 # LATIN CAPITAL LETTER W WITH GRAVE +1E81 # LATIN SMALL LETTER W WITH GRAVE +1E82 # LATIN CAPITAL LETTER W WITH ACUTE +1E83 # LATIN SMALL LETTER W WITH ACUTE +1E84 # LATIN CAPITAL LETTER W WITH DIAERESIS +1E85 # LATIN SMALL LETTER W WITH DIAERESIS +1EF2 # LATIN CAPITAL LETTER Y WITH GRAVE +1EF3 # LATIN SMALL LETTER Y WITH GRAVE Index: xc/lib/fontconfig/fc-lang/da.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/da.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/da.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,89 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/da.orth,v 1.4 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Danish (DA) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# Note: +# The sources cited at www.evertype.com appear to have unified +# all of the nordic languages making the orthography significantly +# larger than needed for Danish. The orthography used here is +# just that from eki.ee with the evertype.com additions commented out +# +0041-005a +0061-007a +#00ab +#00bb +#00C0 # LATIN CAPITAL LETTER A WITH GRAVE +00C1 # LATIN CAPITAL LETTER A WITH ACUTE +#00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX +#00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS +00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE +00C6 # LATIN CAPITAL LETTER AE (ash) * +#00C7 # LATIN CAPITAL LETTER C WITH CEDILLA +#00C8 # LATIN CAPITAL LETTER E WITH GRAVE +00C9 # LATIN CAPITAL LETTER E WITH ACUTE +#00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX +#00CB # LATIN CAPITAL LETTER E WITH DIAERESIS +00CD # LATIN CAPITAL LETTER I WITH ACUTE +#00D0 # LATIN CAPITAL LETTER ETH (Icelandic) +00D3 # LATIN CAPITAL LETTER O WITH ACUTE +#00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX +#00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS +00D8 # LATIN CAPITAL LETTER O WITH STROKE +00DA # LATIN CAPITAL LETTER U WITH ACUTE +#00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +00DD # LATIN CAPITAL LETTER Y WITH ACUTE +#00DE # LATIN CAPITAL LETTER THORN (Icelandic) +#00E0 # LATIN SMALL LETTER A WITH GRAVE +00E1 # LATIN SMALL LETTER A WITH ACUTE +#00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX +#00E4 # LATIN SMALL LETTER A WITH DIAERESIS +00E5 # LATIN SMALL LETTER A WITH RING ABOVE +00E6 # LATIN SMALL LETTER AE (ash) * +#00E7 # LATIN SMALL LETTER C WITH CEDILLA +#00E8 # LATIN SMALL LETTER E WITH GRAVE +00E9 # LATIN SMALL LETTER E WITH ACUTE +#00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX +#00EB # LATIN SMALL LETTER E WITH DIAERESIS +00ED # LATIN SMALL LETTER I WITH ACUTE +#00F0 # LATIN SMALL LETTER ETH (Icelandic) +00F3 # LATIN SMALL LETTER O WITH ACUTE +#00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX +#00F6 # LATIN SMALL LETTER O WITH DIAERESIS +00F8 # LATIN SMALL LETTER O WITH STROKE +00FA # LATIN SMALL LETTER U WITH ACUTE +#00FC # LATIN SMALL LETTER U WITH DIAERESIS +00FD # LATIN SMALL LETTER Y WITH ACUTE +#00FE # LATIN SMALL LETTER THORN (Icelandic) +#0152 # LATIN CAPITAL LIGATURE OE +#0153 # LATIN SMALL LIGATURE OE +#01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +#01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +#01FC # LATIN CAPITAL LETTER AE WITH ACUTE (ash) * +#01FD # LATIN SMALL LETTER AE WITH ACUTE (ash) * +#01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +#01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/de.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/de.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/de.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,49 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/de.orth,v 1.4 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# German (DE) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +#00ab +#00bb +0041-005a +0061-007a +#00C0 # LATIN CAPITAL LETTER A WITH GRAVE eki.ee +00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS +#00C9 # LATIN CAPITAL LETTER E WITH ACUTE eki.ee +00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS +00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +00DF # LATIN SMALL LETTER SHARP S (German) +#00E0 # LATIN SMALL LETTER A WITH GRAVE eki.ee +00E4 # LATIN SMALL LETTER A WITH DIAERESIS +#00E9 # LATIN SMALL LETTER E WITH ACUTE eki.ee +00F6 # LATIN SMALL LETTER O WITH DIAERESIS +00FC # LATIN SMALL LETTER U WITH DIAERESIS +#2018 # single quotes +#201a # single quotes +#201c # double quotes +#201e # double quotes +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/dz.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/dz.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/dz.orth Wed Aug 7 20:10:50 2002 @@ -0,0 +1,28 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/dz.orth,v 1.1 2002/08/08 00:10:50 keithp Exp $ +# +# Copyright © 2002 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. +# +# Dzongkha (DZ) +# +# Uses Tibetan script +# +include bo.orth Index: xc/lib/fontconfig/fc-lang/el.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/el.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/el.orth Fri Jul 12 17:05:58 2002 @@ -0,0 +1,31 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/el.orth,v 1.3 2002/07/12 21:05:58 keithp Exp $ +# +# Copyright © 2002 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. +# +# Greek (EL) +0374-0375 +037a +037e +0384-038a +038c +038e-03a1 +03a3-03ce Index: xc/lib/fontconfig/fc-lang/en.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/en.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/en.orth Wed Oct 2 12:15:54 2002 @@ -0,0 +1,40 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/en.orth,v 1.3 2002/10/02 16:15:54 keithp Exp $ +# +# Copyright © 2002 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. +# +# English (EN) +0041-005a +0061-007a +00c0 +00c7-00cb +00cf +00d1 +00d4 +00d6 +00e0 +00e7-00eb +00ef +00f1 +00f4 +00f6 +#2018-2019 # single quotes +#201c-201d # double quotes Index: xc/lib/fontconfig/fc-lang/eo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/eo.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/eo.orth Sat Jul 6 19:59:15 2002 @@ -0,0 +1,32 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/eo.orth,v 1.2 2002/07/06 23:59:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Esperanto (EO) +0041-005a +0061-007a +0108-0109 +011c-011d +0124-0125 +0134-0135 +015c-015d +016c-016d Index: xc/lib/fontconfig/fc-lang/es.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/es.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/es.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,50 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/es.orth,v 1.3 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Spanish (ES) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +#00A1 # INVERTED EXCLAMATION MARK +#00BF # INVERTED QUESTION MARK +00C1 # LATIN CAPITAL LETTER A WITH ACUTE +#00C7 # LATIN CAPITAL LETTER C WITH CEDILLA important @eki.ee +00C9 # LATIN CAPITAL LETTER E WITH ACUTE +00CD # LATIN CAPITAL LETTER I WITH ACUTE +00D1 # LATIN CAPITAL LETTER N WITH TILDE +00D3 # LATIN CAPITAL LETTER O WITH ACUTE +00DA # LATIN CAPITAL LETTER U WITH ACUTE +00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +00E1 # LATIN SMALL LETTER A WITH ACUTE +#00E7 # LATIN SMALL LETTER C WITH CEDILLA important @eki.ee +00E9 # LATIN SMALL LETTER E WITH ACUTE +00ED # LATIN SMALL LETTER I WITH ACUTE +00F1 # LATIN SMALL LETTER N WITH TILDE +00F3 # LATIN SMALL LETTER O WITH ACUTE +00FA # LATIN SMALL LETTER U WITH ACUTE +00FC # LATIN SMALL LETTER U WITH DIAERESIS +# Index: xc/lib/fontconfig/fc-lang/et.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/et.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/et.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,47 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/et.orth,v 1.3 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Estonian (ET) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS +00D5 # LATIN CAPITAL LETTER O WITH TILDE +00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS +00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +00E4 # LATIN SMALL LETTER A WITH DIAERESIS +00F5 # LATIN SMALL LETTER O WITH TILDE +00F6 # LATIN SMALL LETTER O WITH DIAERESIS +00FC # LATIN SMALL LETTER U WITH DIAERESIS +0160 # LATIN CAPITAL LETTER S WITH CARON +0161 # LATIN SMALL LETTER S WITH CARON +017D # LATIN CAPITAL LETTER Z WITH CARON +017E # LATIN SMALL LETTER Z WITH CARON +#2018 # # single quote +#201a # # single quote +#201c # # double quote +#201e # # double quote Index: xc/lib/fontconfig/fc-lang/eu.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/eu.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/eu.orth Thu Aug 29 21:28:15 2002 @@ -0,0 +1,45 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/eu.orth,v 1.3 2002/08/30 01:28:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Basque (EU) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +# The orthography from evertype.com comes from the Académie de la Langue +# Basque prior to 1926. eki.ee adds some additional letters, marked here +# and commented out. I've also commented out some older letters +# from the evertype.com orthography which are (apparently) no longer +# in use +# +0041-005a +0061-007a +#00C7 # LATIN CAPITAL LETTER C WITH CEDILLA eki.ee +00D1 LATIN CAPITAL LETTER N WITH TILDE +00DC LATIN CAPITAL LETTER U WITH DIAERESIS +#00E7 # LATIN SMALL LETTER C WITH CEDILLA eki.ee +00F1 LATIN SMALL LETTER N WITH TILDE +00FC LATIN SMALL LETTER U WITH DIAERESIS +#0154 LATIN CAPITAL LETTER R WITH ACUTE evertype.com +#0155 LATIN SMALL LETTER R WITH ACUTE evertype.com Index: xc/lib/fontconfig/fc-lang/fa.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/fa.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fa.orth Wed Jul 10 17:57:23 2002 @@ -0,0 +1,53 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/fa.orth,v 1.2 2002/07/10 21:57:23 keithp Exp $ +# +# Copyright © 2002 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. +# +# Persian (FA) +# +# Data from Roozbeh Pournader <roozbeh@sharif.edu> +# +# Select fonts based on support for presentation forms; this may +# exclude some OpenType fonts, but the hope is those would be +# located by a clever shaper by Unicode codepoints in any case. +# +# General forms. +#0621-0624 +#0626-063a +#0641-0642 +#0644-0648 +#067e +#0686 +#0698 +#06a9 +#06af +#06cc +# Presentations Forms: +fb56-fb59 +fb7a-fb7d +fb8a-fb8b +fb8e-fb95 +fbfc-fbff +fe80-fe86 +fe89-fed8 +fedd-feee +#fef5-fef8 # These four happen very rarely +fefb-fefc Index: xc/lib/fontconfig/fc-lang/fc-lang.c diff -u /dev/null xc/lib/fontconfig/fc-lang/fc-lang.c:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fc-lang.c Fri Dec 13 21:03:58 2002 @@ -0,0 +1,395 @@ +/* + * $XFree86: xc/lib/fontconfig/fc-lang/fc-lang.c,v 1.4 2002/12/14 02:03:58 dawes Exp $ + * + * Copyright © 2002 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 "fcint.h" + +/* + * fc-lang + * + * Read a set of language orthographies and build C declarations for + * charsets which can then be used to identify which languages are + * supported by a given font. Note that it would be nice if + * this could be done while compiling the library, but this + * code uses a number of routines from the library. It's + * expediant to just ship the pre-built version along with the + * source orthographies. + */ + +static void +fatal (char *file, int lineno, char *msg) +{ + fprintf (stderr, "%s:%d: %s\n", file, lineno, msg); + exit (1); +} + +static char * +get_line (FILE *f, char *line, int *lineno) +{ + char *hash; + if (!fgets (line, 1024, f)) + return 0; + ++(*lineno); + hash = strchr (line, '#'); + if (hash) + *hash = '\0'; + if (line[0] == '\0' || line[0] == '\n' || line[0] == '\032' || line[0] == '\r') + return get_line (f, line, lineno); + return line; +} + +/* + * build a single charset from a source file + * + * The file format is quite simple, either + * a single hex value or a pair separated with a dash + * + * Comments begin with '#' + */ + +static FcCharSet * +scan (FILE *f, char *file) +{ + FcCharSet *c = 0; + FcCharSet *n; + int start, end, ucs4; + char line[1024]; + int lineno = 0; + + while (get_line (f, line, &lineno)) + { + if (!strncmp (line, "include", 7)) + { + file = strchr (line, ' '); + while (*file == ' ') + file++; + end = strlen (file); + if (file[end-1] == '\n') + file[end-1] = '\0'; + f = fopen (file, "r"); + if (!f) + fatal (file, 0, "can't open"); + c = scan (f, file); + fclose (f); + return c; + } + if (strchr (line, '-')) + { + if (sscanf (line, "%x-%x", &start, &end) != 2) + fatal (file, lineno, "parse error"); + } + else + { + if (sscanf (line, "%x", &start) != 1) + fatal (file, lineno, "parse error"); + end = start; + } + if (!c) + c = FcCharSetCreate (); + for (ucs4 = start; ucs4 <= end; ucs4++) + { + if (!FcCharSetAddChar (c, ucs4)) + fatal (file, lineno, "out of memory"); + } + } + n = FcCharSetFreeze (c); + FcCharSetDestroy (c); + return n; +} + +/* + * Convert a file name into a name suitable for C declarations + */ +static char * +get_name (char *file) +{ + char *name; + char *dot; + + dot = strchr (file, '.'); + if (!dot) + dot = file + strlen(file); + name = malloc (dot - file + 1); + strncpy (name, file, dot - file); + name[dot-file] = '\0'; + return name; +} + +/* + * Convert a C name into a language name + */ +static char * +get_lang (char *name) +{ + char *lang = malloc (strlen (name) + 1); + char *l = lang; + char c; + + while ((c = *name++)) + { + if (isupper (c)) + c = tolower (c); + if (c == '_') + c = '-'; + if (c == ' ') + continue; + *l++ = c; + } + *l++ = '\0'; + return lang; +} + +static int compare (const void *a, const void *b) +{ + const FcChar8 *const *as = a, *const *bs = b; + return FcStrCmpIgnoreCase (*as, *bs); +} + +#define MAX_LANG 1024 +#define MAX_LANG_SET_MAP ((MAX_LANG + 31) / 32) + +#define BitSet(map, id) ((map)[(id)>>5] |= ((FcChar32) 1 << ((id) & 0x1f))) +#define BitGet(map, id) ((map)[(id)>>5] >> ((id) & 0x1f)) & 1) + +int +main (int argc, char **argv) +{ + char *files[MAX_LANG]; + FcCharSet *sets[MAX_LANG]; + int duplicate[MAX_LANG]; + int country[MAX_LANG]; + char *names[MAX_LANG]; + char *langs[MAX_LANG]; + FILE *f; + int ncountry = 0; + int i = 0; + FcCharLeaf **leaves, **sleaves; + int total_leaves = 0; + int l, sl, tl; + int c; + char line[1024]; + FcChar32 map[MAX_LANG_SET_MAP]; + int num_lang_set_map; + + while (*++argv) + { + if (i == MAX_LANG) + fatal (*argv, 0, "Too many languages"); + files[i++] = *argv; + } + files[i] = 0; + qsort (files, i, sizeof (char *), compare); + i = 0; + while (files[i]) + { + f = fopen (files[i], "r"); + if (!f) + fatal (files[i], 0, strerror (errno)); + sets[i] = scan (f, files[i]); + names[i] = get_name (files[i]); + langs[i] = get_lang(names[i]); + if (strchr (langs[i], '-')) + country[ncountry++] = i; + + total_leaves += sets[i]->num; + i++; + fclose (f); + } + sets[i] = 0; + leaves = malloc (total_leaves * sizeof (FcCharLeaf *)); + tl = 0; + /* + * Find unique leaves + */ + for (i = 0; sets[i]; i++) + { + sleaves = sets[i]->leaves; + for (sl = 0; sl < sets[i]->num; sl++) + { + for (l = 0; l < tl; l++) + if (leaves[l] == sleaves[sl]) + break; + if (l == tl) + leaves[tl++] = sleaves[sl]; + } + } + + /* + * Scan the input until the marker is found + */ + + while (fgets (line, sizeof (line), stdin)) + { + if (!strncmp (line, "@@@", 3)) + break; + fputs (line, stdout); + } + + printf ("/* total size: %d unique leaves: %d */\n\n", + total_leaves, tl); + /* + * Dump leaves + */ + printf ("static const FcCharLeaf leaves[%d] = {\n", tl); + for (l = 0; l < tl; l++) + { + printf (" { { /* %d */", l); + for (i = 0; i < 256/32; i++) + { + if (i % 4 == 0) + printf ("\n "); + printf (" 0x%08x,", leaves[l]->map[i]); + } + printf ("\n } },\n"); + } + printf ("};\n\n"); + printf ("#define L(n) ((FcCharLeaf *) &leaves[n])\n\n"); + + /* + * Find duplicate charsets + */ + duplicate[0] = -1; + for (i = 1; sets[i]; i++) + { + int j; + + duplicate[i] = -1; + for (j = 0; j < i; j++) + if (sets[j] == sets[i]) + { + duplicate[i] = j; + break; + } + } + + /* + * Dump arrays + */ + for (i = 0; sets[i]; i++) + { + int n; + + if (duplicate[i] >= 0) + continue; + printf ("static const FcCharLeaf *leaves_%s[%d] = {\n", + names[i], sets[i]->num); + for (n = 0; n < sets[i]->num; n++) + { + if (n % 8 == 0) + printf (" "); + for (l = 0; l < tl; l++) + if (leaves[l] == sets[i]->leaves[n]) + break; + if (l == tl) + fatal (names[i], 0, "can't find leaf"); + printf (" L(%3d),", l); + if (n % 8 == 7) + printf ("\n"); + } + if (n % 8 != 0) + printf ("\n"); + printf ("};\n\n"); + + + printf ("static const FcChar16 numbers_%s[%d] = {\n", + names[i], sets[i]->num); + for (n = 0; n < sets[i]->num; n++) + { + if (n % 8 == 0) + printf (" "); + printf (" 0x%04x,", sets[i]->numbers[n]); + if (n % 8 == 7) + printf ("\n"); + } + if (n % 8 != 0) + printf ("\n"); + printf ("};\n\n"); + } + printf ("#undef L\n\n"); + /* + * Dump sets + */ + printf ("static const FcLangCharSet fcLangCharSets[] = {\n"); + for (i = 0; sets[i]; i++) + { + int j = duplicate[i]; + if (j < 0) + j = i; + printf (" { (FcChar8 *) \"%s\",\n" + " { FC_REF_CONSTANT, %d, " + "(FcCharLeaf **) leaves_%s, " + "(FcChar16 *) numbers_%s } },\n", + langs[i], + sets[j]->num, names[j], names[j]); + } + printf ("};\n\n"); + printf ("#define NUM_LANG_CHAR_SET %d\n", i); + num_lang_set_map = (i + 31) / 32; + printf ("#define NUM_LANG_SET_MAP %d\n", num_lang_set_map); + /* + * Dump indices with country codes + */ + if (ncountry) + { + int ncountry_ent = 0; + printf ("\n"); + printf ("static const FcChar32 fcLangCountrySets[][NUM_LANG_SET_MAP] = {\n"); + for (c = 0; c < ncountry; c++) + { + i = country[c]; + if (i >= 0) + { + int l = strchr (langs[i], '-') - langs[i]; + int d, k; + + for (k = 0; k < num_lang_set_map; k++) + map[k] = 0; + + BitSet (map, i); + for (d = c + 1; d < ncountry; d++) + { + int j = country[d]; + if (j >= 0 && !strncmp (langs[j], langs[i], l)) + { + BitSet(map, j); + country[d] = -1; + } + } + printf (" {"); + for (k = 0; k < num_lang_set_map; k++) + printf (" 0x%08x,", map[k]); + printf (" }, /* %*.*s */\n", + l, l, langs[i]); + ++ncountry_ent; + } + } + printf ("};\n\n"); + printf ("#define NUM_COUNTRY_SET %d\n", ncountry_ent); + } + + while (fgets (line, sizeof (line), stdin)) + fputs (line, stdout); + + fflush (stdout); + exit (ferror (stdout)); +} Index: xc/lib/fontconfig/fc-lang/fc-lang.man diff -u /dev/null xc/lib/fontconfig/fc-lang/fc-lang.man:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fc-lang.man Sat Jul 6 19:21:36 2002 @@ -0,0 +1,41 @@ +.\" +.\" Copyright © 2002 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. +.\" +.\" +.\" $XFree86: xc/lib/fontconfig/fc-lang/fc-lang.man,v 1.1 2002/07/06 23:21:36 keithp Exp $ +.\" +.TH FC-LANG 1 __vendorversion__ +.SH NAME +fc-lang, fclang.c \- create an database of language orthographies +.SH SYNOPSIS +.B "fc-lang" +.RI [ language-coverage +\|.\|.\|. ] +.SH DESCRIPTION +.I Fc-lang +builds the fclang.c file used in the fontconfig library to automatically +determine language coverage for fonts which don't contain this information. +.SH FILES +.TP 15 +.B fclang.tmpl.c +The template file in which the tables are inserted +.SH "SEE ALSO" +fontconfig(3) Index: xc/lib/fontconfig/fc-lang/fclang.h diff -u /dev/null xc/lib/fontconfig/fc-lang/fclang.h:1.21 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fclang.h Fri Dec 13 21:03:58 2002 @@ -0,0 +1,4006 @@ +/* + * $XFree86: xc/lib/fontconfig/fc-lang/fclang.h,v 1.21 2002/12/14 02:03:58 dawes Exp $ + * + * Copyright © 2002 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. + */ + +/* total size: 877 unique leaves: 599 */ + +static const FcCharLeaf leaves[599] = { + { { /* 0 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x08104404, 0x08104404, + } }, + { { /* 1 */ + 0xffff8002, 0xffffffff, 0x8002ffff, 0x00000000, + 0xc0000000, 0xf0fc33c0, 0x03000000, 0x00000000, + } }, + { { /* 2 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x0810cf00, 0x0810cf00, + } }, + { { /* 3 */ + 0x00000000, 0x00000000, 0x00000200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 4 */ + 0xffffff7f, 0xffffffff, 0x3d7f3d7f, 0xffffffff, + 0xffff3d7f, 0x7f3d7fff, 0xff7f7f3d, 0xffff7fff, + } }, + { { /* 5 */ + 0x7f3d7fff, 0xffffffff, 0x07ffff7f, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 6 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0xffffffff, 0x1fffffff, + } }, + { { /* 7 */ + 0x00000000, 0x00000000, 0x07ffffff, 0x07ffffff, + 0x00000000, 0x88000802, 0x140a2202, 0x140a2202, + } }, + { { /* 8 */ + 0xffff0042, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 9 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x10028010, 0x10028010, + } }, + { { /* 10 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x10400090, 0x10400090, + } }, + { { /* 11 */ + 0xc0000000, 0x00030000, 0xc0000000, 0x00000000, + 0x00008000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 12 */ + 0x00000000, 0x00000000, 0x02000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 13 */ + 0xffff0100, 0xffffffff, 0x0100ffff, 0x00000000, + 0x300c0000, 0x0f00c000, 0x03000000, 0x00000300, + } }, + { { /* 14 */ + 0xffff0000, 0xffffffff, 0x0000ffff, 0x00000000, + 0x030c0000, 0x0c00cc0f, 0x03000000, 0x00000300, + } }, + { { /* 15 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 16 */ + 0x00000000, 0x00000000, 0x00000c00, 0x00000000, + 0x20010040, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 17 */ + 0x00000000, 0x00000000, 0x08100000, 0x00040000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 18 */ + 0xffff4040, 0xffffffff, 0x4040ffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 19 */ + 0xffff0000, 0xffffd7ff, 0x0000d7ff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 20 */ + 0xffffffe0, 0x83ffffff, 0x00003fff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 21 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x10008200, 0x10008200, + } }, + { { /* 22 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x060c3303, 0x060c3303, + } }, + { { /* 23 */ + 0x00000003, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 24 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x03000000, 0x00003000, 0x00000000, + } }, + { { /* 25 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xfff99fee, 0xd3c5fdff, 0xb080399f, 0x07ffffcf, + } }, + { { /* 26 */ + 0x00000000, 0x00000000, 0xfffffeff, 0x3d7e03ff, + 0xfeff0003, 0x03ffffff, 0x00000000, 0x00000000, + } }, + { { /* 27 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x12120404, 0x12120404, + } }, + { { /* 28 */ + 0x000330c0, 0x00000000, 0x00000000, 0x60000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 29 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00000000, 0x0c00c000, 0x00000000, 0x00000000, + } }, + { { /* 30 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x140ca381, 0x140ca381, + } }, + { { /* 31 */ + 0x00000000, 0x80000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 32 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x10020004, 0x10020004, + } }, + { { /* 33 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00000000, 0x00000030, 0x000c0000, 0x030300c0, + } }, + { { /* 34 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xffffffff, 0x001fffff, + } }, + { { /* 35 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x1a10cfc5, 0x9a10cfc5, + } }, + { { /* 36 */ + 0x00000000, 0x00000000, 0x000c0000, 0x01000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 37 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x24082202, 0x24082202, + } }, + { { /* 38 */ + 0x0c00f000, 0x00000000, 0x03000180, 0x6000c033, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 39 */ + 0xfdffa966, 0xffffdfff, 0xa965dfff, 0x03ffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 40 */ + 0x0000000c, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 41 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00000000, 0x00000c00, 0x00c00000, 0x000c0000, + } }, + { { /* 42 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x0010c604, 0x8010c604, + } }, + { { /* 43 */ + 0x00000000, 0x00000000, 0x00000000, 0x01f00000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 44 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000003f, 0x00000000, 0x00000000, 0x000c0000, + } }, + { { /* 45 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x25082262, 0x25082262, + } }, + { { /* 46 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x90400010, 0x10400010, + } }, + { { /* 47 */ + 0x00000000, 0x00000000, 0x00000000, 0x44300000, + 0xffffd7f0, 0xfffffffb, 0x00007fff, 0x00000000, + } }, + { { /* 48 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00528f81, 0x00528f81, + } }, + { { /* 49 */ + 0x30000300, 0x00300030, 0x30000000, 0x00003000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 50 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x140a2202, 0x140a2202, + } }, + { { /* 51 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x10600010, 0x10600010, + } }, + { { /* 52 */ + 0x00000000, 0x00000000, 0x00000000, 0x60000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 53 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x10020000, 0x10020000, + } }, + { { /* 54 */ + 0x00000000, 0x00000000, 0x03c00000, 0x3c000000, + 0x003fcc00, 0x00000000, 0x00000000, 0xf0000000, + } }, + { { /* 55 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xfffffe7f, 0xffffffff, 0xe1ffffff, 0x18007fff, + } }, + { { /* 56 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00400030, 0x00400030, + } }, + { { /* 57 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x25092042, 0x25092042, + } }, + { { /* 58 */ + 0x00000000, 0x00000000, 0x00000c00, 0x00000000, + 0x20000402, 0x00180000, 0x00000000, 0x00000000, + } }, + { { /* 59 */ + 0x00000000, 0x00000000, 0x00880000, 0x00040000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 60 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x02041107, 0x02041107, + } }, + { { /* 61 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x9c508e14, 0x1c508e14, + } }, + { { /* 62 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x04082202, 0x04082202, + } }, + { { /* 63 */ + 0x00000c00, 0x00000003, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 64 */ + 0xc0000c0c, 0x00000000, 0x00c00003, 0x00000c03, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 65 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x020c1383, 0x020c1383, + } }, + { { /* 66 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x040a2202, 0x042a220a, + } }, + { { /* 67 */ + 0x00000000, 0x00000200, 0x00000000, 0x00000200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 68 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x20000000, 0x00000000, 0x02000000, + } }, + { { /* 69 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xfffbafee, 0xf3edfdff, 0x00013bbf, 0x0000ffc1, + } }, + { { /* 70 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00000080, 0x00000080, + } }, + { { /* 71 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x03000402, 0x00180000, 0x00000000, 0x00000000, + } }, + { { /* 72 */ + 0x00000000, 0x00000000, 0x00880000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 73 */ + 0x000c0003, 0x00000c00, 0x00003000, 0x00000c00, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 74 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x08000000, 0x00000000, 0x00000000, + } }, + { { /* 75 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xffff0000, 0x000007ff, + } }, + { { /* 76 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x14482202, 0x14482202, + } }, + { { /* 77 */ + 0x00000000, 0x00000000, 0x00030000, 0x00030000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 78 */ + 0x00000000, 0xfffe0000, 0x007fffff, 0xfffffffe, + 0x000000ff, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 79 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00003c00, 0x00000022, + } }, + { { /* 80 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00000200, 0x00000200, + } }, + { { /* 81 */ + 0xffff4002, 0xffffffff, 0x4002ffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 82 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x64092242, 0x64092242, + } }, + { { /* 83 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x060cb301, 0x060cb301, + } }, + { { /* 84 */ + 0x00000c7e, 0x031f8000, 0x0063f200, 0x000df840, + 0x00037e08, 0x08000dfa, 0x0df901bf, 0x5437e400, + } }, + { { /* 85 */ + 0x00000025, 0x40006fc0, 0x27f91be4, 0xdee00000, + 0x007ff83f, 0x00007f7f, 0x00000000, 0x00000000, + } }, + { { /* 86 */ + 0x00000000, 0x00000000, 0x00000000, 0x007f8000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 87 */ + 0x000000e7, 0x00000000, 0xfffffffe, 0xffffffff, + 0x780fffff, 0xfffffffe, 0xffffffff, 0x787fffff, + } }, + { { /* 88 */ + 0x43f36f8b, 0x9b462442, 0xe3e0e82c, 0x400a0004, + 0xdb365f65, 0x04497977, 0xe3f0ecd7, 0x08c56038, + } }, + { { /* 89 */ + 0x3403e602, 0x35518000, 0x7eabe0c8, 0x98698200, + 0x2942a948, 0x8060e803, 0xad93441c, 0x4568c03a, + } }, + { { /* 90 */ + 0x8656aa60, 0x02403f7a, 0x14618388, 0x21741020, + 0x07022021, 0x40bc3000, 0x4462a624, 0x0a2060a8, + } }, + { { /* 91 */ + 0x85740217, 0x9c840402, 0x14157bfb, 0x11e27f24, + 0x02efb665, 0x20ff1f75, 0x28403a70, 0x676326c3, + } }, + { { /* 92 */ + 0x20924dd9, 0x0fc946b0, 0x4850bc98, 0xa03f8638, + 0x88162388, 0x52323e09, 0xe3a422aa, 0xc72c00dd, + } }, + { { /* 93 */ + 0x26e1a166, 0x8f0a840b, 0x559e27eb, 0x89bbc241, + 0x85400014, 0x08496361, 0x8ad07f0c, 0x05cfff3e, + } }, + { { /* 94 */ + 0xa803ff1a, 0x7b407a41, 0x80024745, 0x38eb0500, + 0x0005d851, 0x710c9934, 0x01000397, 0x24046366, + } }, + { { /* 95 */ + 0x005180d0, 0x430ac000, 0x30c89071, 0x58000008, + 0xf7000e99, 0x00415f80, 0x941000b0, 0x62800018, + } }, + { { /* 96 */ + 0x09d00240, 0x01568200, 0x08015004, 0x05101d10, + 0x001084c1, 0x10504025, 0x4d8a410f, 0xa60d4009, + } }, + { { /* 97 */ + 0x914cab19, 0x098121c0, 0x0003c485, 0x80000652, + 0x00080b04, 0x0009041d, 0x905c4849, 0x16900009, + } }, + { { /* 98 */ + 0x22200c65, 0x24338412, 0x47960c03, 0x42250a04, + 0x90880028, 0x4f084900, 0xd3aa14a2, 0x3e87d830, + } }, + { { /* 99 */ + 0x1f618604, 0x41867ea4, 0x05b3c390, 0x211857a5, + 0x2a48241e, 0x4a041128, 0x161b0a40, 0x88400d60, + } }, + { { /* 100 */ + 0x9502020a, 0x10608221, 0x04000243, 0x80001444, + 0x0c040000, 0x70000000, 0x00c11a06, 0x0c00024a, + } }, + { { /* 101 */ + 0x00401a00, 0x40451404, 0xbdb30029, 0x052b0a78, + 0xbfa0bba9, 0x8379407c, 0xe81d12fc, 0xc5694bf6, + } }, + { { /* 102 */ + 0x044aeff6, 0xff022115, 0x402bed63, 0x0242d033, + 0x00131000, 0x59ca1b02, 0x020000a0, 0x2c41a703, + } }, + { { /* 103 */ + 0x8ff24880, 0x00000204, 0x10055800, 0x00489200, + 0x20011894, 0x34805004, 0x684c3200, 0x68be49ea, + } }, + { { /* 104 */ + 0x2e42184c, 0x21c9a820, 0x80b050b9, 0xff7c001e, + 0x14e0849a, 0x01e028c1, 0xac49870e, 0xdddb130f, + } }, + { { /* 105 */ + 0x89fbbe1a, 0x51a2a2e0, 0x32ca5502, 0x928b3e46, + 0x438f1dbf, 0x32186703, 0x33c03028, 0xa9230811, + } }, + { { /* 106 */ + 0x3a65c000, 0x04028fe3, 0x86252c4e, 0x00a1bf3d, + 0x8cd43a1a, 0x317c06c9, 0x950a00e0, 0x0edb018b, + } }, + { { /* 107 */ + 0x8c20e34b, 0xf0101182, 0xa7287d94, 0x40fbc9ac, + 0x06534484, 0x44445a90, 0x00013fc8, 0xf5d40048, + } }, + { { /* 108 */ + 0xec577701, 0x891dc442, 0x49286b83, 0xd2424109, + 0x59fe061d, 0x3a221800, 0x3b9fb7e4, 0xc0eaf003, + } }, + { { /* 109 */ + 0x82021386, 0xe4008980, 0x10a1b200, 0x0cc44b80, + 0x8944d309, 0x48341faf, 0x0c458259, 0x0450420a, + } }, + { { /* 110 */ + 0x10c8a040, 0x44503140, 0x01004004, 0x05408280, + 0x442c0108, 0x1a056a30, 0x051420a6, 0x645690cf, + } }, + { { /* 111 */ + 0x31000021, 0xcbf09c18, 0x63e2a120, 0x01b5104c, + 0x9a83538c, 0x3281b8b2, 0x0a84987a, 0x0c0233e7, + } }, + { { /* 112 */ + 0x9018d4cc, 0x9070a1a1, 0xe0048a1e, 0x0451c3d4, + 0x21c2439a, 0x53104844, 0x36400292, 0xf3bd0241, + } }, + { { /* 113 */ + 0xe8f0ab09, 0xa5d27dc0, 0xd24bc242, 0xd0afa43f, + 0x34a11aa0, 0x03d88247, 0x651bc452, 0xc83ad294, + } }, + { { /* 114 */ + 0x40c8001c, 0x33140e06, 0xb21b614f, 0xc0d00088, + 0xa898a02a, 0x166ba1c5, 0x85b42e50, 0x0604c08b, + } }, + { { /* 115 */ + 0x1e04f933, 0xa251056e, 0x76380400, 0x73b8ec07, + 0x18324406, 0xc8164081, 0x63097c8a, 0xaa042980, + } }, + { { /* 116 */ + 0xca9c1c24, 0x27604e0e, 0x83000990, 0x81040046, + 0x10816011, 0x0908540d, 0xcc0a000e, 0x0c000500, + } }, + { { /* 117 */ + 0xa0440430, 0x6784008b, 0x8a195288, 0x8b18865e, + 0x41602e59, 0x9cbe8c10, 0x891c6861, 0x00089800, + } }, + { { /* 118 */ + 0x089a8100, 0x41900018, 0xe4a14007, 0x640d0505, + 0x0e4d310e, 0xff0a4806, 0x2aa81632, 0x000b852e, + } }, + { { /* 119 */ + 0xca841800, 0x696c0e20, 0x16000032, 0x03905658, + 0x1a285120, 0x11248000, 0x432618e1, 0x0eaa5d52, + } }, + { { /* 120 */ + 0xae280fa0, 0x4500fa7b, 0x89406408, 0xc044c880, + 0xb1419005, 0x24c48424, 0x603a1a34, 0xc1949000, + } }, + { { /* 121 */ + 0x003a8246, 0xc106180d, 0x99100022, 0x1511e050, + 0x00824057, 0x020a041a, 0x8930004f, 0x444ad813, + } }, + { { /* 122 */ + 0xed228a02, 0x400510c0, 0x01021000, 0x31018808, + 0x02044600, 0x0708f000, 0xa2008900, 0x22020000, + } }, + { { /* 123 */ + 0x16100200, 0x10400042, 0x02605200, 0x200052f4, + 0x80308510, 0x42021100, 0x80b54308, 0x9a2070e1, + } }, + { { /* 124 */ + 0x08012040, 0xfc653500, 0xab0419c1, 0x62140286, + 0x00440087, 0x02449085, 0x0a85405c, 0x33803207, + } }, + { { /* 125 */ + 0xb8c00400, 0xc0d0ce20, 0x0080c030, 0x0d250508, + 0x00400a90, 0x080c0200, 0x40006505, 0x41026421, + } }, + { { /* 126 */ + 0x00000268, 0x847c0024, 0xde200002, 0x40498619, + 0x40000808, 0x20010084, 0x10108400, 0x01c742cd, + } }, + { { /* 127 */ + 0xd52a7038, 0x1d8f1968, 0x3e12be50, 0x81d92ef5, + 0x2412cec4, 0x732e0828, 0x4b3424ac, 0xd41d020c, + } }, + { { /* 128 */ + 0x80002a02, 0x08110097, 0x114411c4, 0x7d451786, + 0x064949d9, 0x87914000, 0xd8c4254c, 0x491444ba, + } }, + { { /* 129 */ + 0xc8001b92, 0x15800271, 0x0c000081, 0xc200096a, + 0x40024800, 0xba493021, 0x1c802080, 0x1008e2ac, + } }, + { { /* 130 */ + 0x00341004, 0x841400e1, 0x20000020, 0x10149800, + 0x04aa70c2, 0x54208688, 0x04130c62, 0x20109180, + } }, + { { /* 131 */ + 0x02064082, 0x54001c40, 0xe4e90383, 0x84802125, + 0x2000e433, 0xe60944c0, 0x81260a03, 0x080112da, + } }, + { { /* 132 */ + 0x97906901, 0xf8864001, 0x0081e24d, 0xa6510a0e, + 0x81ec011a, 0x8441c600, 0xb62cadb8, 0x8741a46f, + } }, + { { /* 133 */ + 0x4b028d54, 0x02681161, 0x2057bb60, 0x043350a0, + 0xb7b4a8c0, 0x01122402, 0x20009ad3, 0x00c82271, + } }, + { { /* 134 */ + 0x809e2081, 0xe1800c8a, 0x8151b009, 0x40281031, + 0x89a52a0e, 0x620e69b6, 0xd1444425, 0x4d548085, + } }, + { { /* 135 */ + 0x1fb12c75, 0x862dd807, 0x4841d87c, 0x226e414e, + 0x9e088200, 0xed37f80c, 0x75268c80, 0x08149313, + } }, + { { /* 136 */ + 0xc8040e32, 0x6ea6484e, 0x66702c4a, 0xba0126c0, + 0x185dd30c, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 137 */ + 0x00000000, 0x05400000, 0x81337020, 0x03a54f81, + 0x641055ec, 0x2344c318, 0x00341462, 0x1a090a43, + } }, + { { /* 138 */ + 0x13a5187b, 0xa8480102, 0xc5440440, 0xe2dd8106, + 0x2d481af0, 0x0416b626, 0x6e405058, 0x31128032, + } }, + { { /* 139 */ + 0x0c0007e4, 0x420a8208, 0x803b4840, 0x87134860, + 0x3428850d, 0xe5290319, 0x870a2345, 0x5c1825a9, + } }, + { { /* 140 */ + 0xd9c577a6, 0x03e85e00, 0xa7000081, 0x41c6cd54, + 0xa2042800, 0x2b0ab860, 0xda9e0020, 0x0e1a08ea, + } }, + { { /* 141 */ + 0x11c0427c, 0x03768908, 0x01058621, 0x18a80000, + 0xc44846a0, 0x20220d05, 0x91485422, 0x28978a01, + } }, + { { /* 142 */ + 0x00087898, 0x31221605, 0x08804240, 0x06a2fa4e, + 0x92110814, 0x9b042002, 0x06432e52, 0x90105000, + } }, + { { /* 143 */ + 0x85ba0041, 0x20203042, 0x05a04f0b, 0x40802708, + 0x1a930591, 0x0600df50, 0x3021a202, 0x4e800630, + } }, + { { /* 144 */ + 0x04c80cc4, 0x8001a004, 0xd4316000, 0x0a020880, + 0x00281c00, 0x00418e18, 0xca106ad0, 0x4b00f210, + } }, + { { /* 145 */ + 0x1506274d, 0x88900220, 0x82a85a00, 0x81504549, + 0x80002004, 0x2c088804, 0x000508d1, 0x4ac48001, + } }, + { { /* 146 */ + 0x0062e020, 0x0a42008e, 0x6a8c3055, 0xe0a5090e, + 0x42c42906, 0x80b34814, 0xb330803e, 0x731c0102, + } }, + { { /* 147 */ + 0x600d1494, 0x09400c20, 0xc040301a, 0xc094a451, + 0x05c88dca, 0xa40c96c2, 0x34040001, 0x011000c8, + } }, + { { /* 148 */ + 0xa9c9550d, 0x1c5a2428, 0x48370142, 0x100f7a4d, + 0x452a32b4, 0x9205317b, 0x5c44b894, 0x458a68d7, + } }, + { { /* 149 */ + 0x2ed15097, 0x42081943, 0x9d40d202, 0x20979840, + 0x064d5409, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 150 */ + 0x00000000, 0x84800000, 0x04215542, 0x17001c06, + 0x61107624, 0xb9ddff87, 0x5c0a659f, 0x3c00245d, + } }, + { { /* 151 */ + 0x0059adb0, 0x00000000, 0x00000000, 0x009b28d0, + 0x02000422, 0x44080108, 0xac409804, 0x90288d0a, + } }, + { { /* 152 */ + 0xe0018700, 0x00310400, 0x82211794, 0x10540019, + 0x021a2cb2, 0x40039c02, 0x88043d60, 0x7900080c, + } }, + { { /* 153 */ + 0xba3c1628, 0xcb088640, 0x90807274, 0x0000001e, + 0xd8000000, 0x9c87e188, 0x04124034, 0x2791ae64, + } }, + { { /* 154 */ + 0xe6fbe86b, 0x5366408f, 0x537feea6, 0xb5e4e32b, + 0x0002869f, 0x01228548, 0x08004402, 0x20a02116, + } }, + { { /* 155 */ + 0x02040004, 0x00052000, 0x01547e00, 0x01ac162c, + 0x10852a84, 0x05308c14, 0xb943fbc3, 0x906000ca, + } }, + { { /* 156 */ + 0x40326000, 0x80901200, 0x4c810b30, 0x40020054, + 0x1d6a0029, 0x02802000, 0x00048000, 0x150c2610, + } }, + { { /* 157 */ + 0x07018040, 0x0c24d94d, 0x18502810, 0x50205001, + 0x04d01000, 0x02017080, 0x21c30108, 0x00000132, + } }, + { { /* 158 */ + 0x07190088, 0x05600802, 0x4c0e0012, 0xf0a10405, + 0x00000002, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 159 */ + 0x00000000, 0x00000000, 0x00000000, 0x00800000, + 0x035a8e8d, 0x5a0421bd, 0x11703488, 0x00000026, + } }, + { { /* 160 */ + 0x10000000, 0x8804c502, 0xf801b815, 0x25ed147c, + 0x1bb0ed60, 0x1bd70589, 0x1a627af3, 0x0ac50d0c, + } }, + { { /* 161 */ + 0x524ae5d1, 0x63050490, 0x52440354, 0x16122b57, + 0x1101a872, 0x00182949, 0x10080948, 0x886c6000, + } }, + { { /* 162 */ + 0x058f916e, 0x39903012, 0x4930f840, 0x001b8880, + 0x00000000, 0x00428500, 0x98000058, 0x7014ea04, + } }, + { { /* 163 */ + 0x611d1628, 0x60005113, 0x00a71a24, 0x00000000, + 0x03c00000, 0x10187120, 0xa9270172, 0x89066004, + } }, + { { /* 164 */ + 0x020cc022, 0x40810900, 0x8ca0202d, 0x00000e34, + 0x00000000, 0x11012100, 0xc11a8011, 0x0892ec4c, + } }, + { { /* 165 */ + 0x85000040, 0x1806c7ac, 0x0512e03e, 0x00108000, + 0x80ce4008, 0x02106d01, 0x08568641, 0x0027011e, + } }, + { { /* 166 */ + 0x083d3750, 0x4e05e032, 0x048401c0, 0x01400081, + 0x00000000, 0x00000000, 0x00000000, 0x00591aa0, + } }, + { { /* 167 */ + 0x882443c8, 0xc8001d48, 0x72030152, 0x04049013, + 0x04008280, 0x0d148a10, 0x02088056, 0x2704a040, + } }, + { { /* 168 */ + 0x4c000000, 0x00000000, 0x00000000, 0xa3200000, + 0xa0ae1902, 0xdf002660, 0x7b15f010, 0x3ad08121, + } }, + { { /* 169 */ + 0x00284180, 0x48001003, 0x8014cc00, 0x00c414cf, + 0x30202000, 0x00000001, 0x00000000, 0x00000000, + } }, + { { /* 170 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000020, + } }, + { { /* 171 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000200, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 172 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xffff003f, 0x087fffff, + } }, + { { /* 173 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x0c0c0000, 0x000cc00c, 0x03000000, 0x00000000, + } }, + { { /* 174 */ + 0x00000000, 0x00000300, 0x00000000, 0x00000300, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 175 */ + 0xffff0000, 0xffffffff, 0x0040ffff, 0x00000000, + 0x0c0c0000, 0x0c00000c, 0x03000000, 0x00000300, + } }, + { { /* 176 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x0d10646e, 0x0d10646e, + } }, + { { /* 177 */ + 0x00000000, 0x01000300, 0x00000000, 0x00000300, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 178 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffffff, 0xffffffff, 0x0000003f, 0x00000000, + } }, + { { /* 179 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xfffddfec, 0xc3effdff, 0x40603ddf, 0x0000ffc3, + } }, + { { /* 180 */ + 0x00000000, 0xfffe0000, 0xffffffff, 0xffffffef, + 0x00007fff, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 181 */ + 0x43722f8b, 0x0b042000, 0xe340e82c, 0x40c82800, + 0x49375944, 0x04407976, 0xa3f02c93, 0x08c50038, + } }, + { { /* 182 */ + 0x0003ee02, 0x35508000, 0x1e23e1c8, 0xc4498200, + 0x2942ad5a, 0x8060c000, 0xa49a461c, 0x052ac003, + } }, + { { /* 183 */ + 0xd6462a44, 0x08003dda, 0x14208388, 0x01700020, + 0x03022021, 0x40ac3000, 0x44628620, 0x8a0020a0, + } }, + { { /* 184 */ + 0x80040253, 0x14840402, 0x10047bfb, 0x11e27fa4, + 0x00a42441, 0x20c01421, 0x70003a50, 0x27430002, + } }, + { { /* 185 */ + 0x208245c9, 0x0fc14630, 0x28503c88, 0xa0248602, + 0x88062388, 0x40000e19, 0xeb6422aa, 0xcd28001c, + } }, + { { /* 186 */ + 0x02e1a120, 0x8200840b, 0x549e279b, 0xa0b38141, + 0x85080010, 0x08002061, 0x08d02f08, 0x010fbe3e, + } }, + { { /* 187 */ + 0xa803f718, 0x5b080a41, 0x00020504, 0x382a0500, + 0x00015041, 0x21081910, 0x00000313, 0x04046122, + } }, + { { /* 188 */ + 0x100140d0, 0x40228000, 0x40488050, 0x10000008, + 0x370006d1, 0x00005e80, 0x941000a0, 0x60000018, + } }, + { { /* 189 */ + 0x00900240, 0x00548000, 0x00080000, 0x00100900, + 0x00000040, 0x10105020, 0x4c022400, 0x06010001, + } }, + { { /* 190 */ + 0x814c2918, 0x08012100, 0x00036485, 0x10214452, + 0x00080904, 0x0000000d, 0x80004988, 0x16910001, + } }, + { { /* 191 */ + 0x40000765, 0x04338492, 0x45928c00, 0x52200016, + 0xd0080228, 0x4c084300, 0xc32a40a2, 0x2e009810, + } }, + { { /* 192 */ + 0x16708000, 0x40826e84, 0x04b3c390, 0x21187c85, + 0x02c8041c, 0x4a001120, 0x361b0a48, 0x89005540, + } }, + { { /* 193 */ + 0x9902000a, 0x10400221, 0x04000242, 0x00000044, + 0x0c040000, 0x00000010, 0x00001216, 0x00000242, + } }, + { { /* 194 */ + 0x00401a20, 0x00000400, 0xb5b30009, 0x15230a18, + 0x1fe89ba0, 0x8379507c, 0xc09d10fd, 0x0560dbf6, + } }, + { { /* 195 */ + 0x0242ef92, 0xdf020110, 0x08226961, 0x02029035, + 0x00030000, 0x45aa1a02, 0x02000001, 0x28518101, + } }, + { { /* 196 */ + 0x02d26080, 0x00000280, 0x00011800, 0x00009200, + 0x20000880, 0x35000405, 0x60442000, 0x609e49e6, + } }, + { { /* 197 */ + 0x2a42104c, 0xa1482820, 0x802010b1, 0x7b9c000e, + 0x14a08490, 0x41e028c1, 0x8c490704, 0x0cc8100d, + } }, + { { /* 198 */ + 0x89ba8412, 0x142202c0, 0x0ac05500, 0x92833ec4, + 0x43871ca3, 0x22a04703, 0x03c03028, 0xa0200801, + } }, + { { /* 199 */ + 0x30448000, 0x000085a3, 0x2225200e, 0x0001b73c, + 0x8c503220, 0x315d0099, 0x940200a0, 0x0e4b0003, + } }, + { { /* 200 */ + 0x8c20e342, 0xd0910080, 0xa3281d94, 0x60c1499c, + 0x07134406, 0x44445a90, 0x00000f88, 0x95c40040, + } }, + { { /* 201 */ + 0x84477581, 0xc0534402, 0x01082b83, 0x92424000, + 0x09a60611, 0x32220800, 0x1bddb384, 0xc08af000, + } }, + { { /* 202 */ + 0x00020282, 0x6c008800, 0x00219200, 0x8c844180, + 0x09441308, 0x000007a7, 0x0c418051, 0x00d06002, + } }, + { { /* 203 */ + 0x10d0a000, 0x44003004, 0x01000000, 0x07008201, + 0x440e0100, 0x08056830, 0x051464b2, 0x441410e6, + } }, + { { /* 204 */ + 0x21000011, 0xcbc09c08, 0x40c2e120, 0x41b4304c, + 0x9a8310ac, 0x328198b2, 0x00849822, 0xbc123369, + } }, + { { /* 205 */ + 0xc03bd6c0, 0x0c53a1a1, 0xea008a1e, 0x05d8cbf0, + 0x21c34390, 0x4a1c4805, 0x324002d0, 0xd79d0041, + } }, + { { /* 206 */ + 0xe8b02b09, 0x24527dc0, 0xd04bc240, 0xc8aba000, + 0x34a98a80, 0x41c98000, 0x241f8010, 0x487b9200, + } }, + { { /* 207 */ + 0x00cc0000, 0x33008406, 0x001b410f, 0x80402000, + 0xa0988022, 0x006ba186, 0x85a42a30, 0x06044181, + } }, + { { /* 208 */ + 0x00046021, 0xa0010080, 0x46b80400, 0x03a0e90f, + 0x18200000, 0x081040a0, 0x0001380a, 0xa8000500, + } }, + { { /* 209 */ + 0xc28a0404, 0x2720000a, 0x830c0910, 0x00000802, + 0x10806211, 0x0808000c, 0x0c08000c, 0x08400000, + } }, + { { /* 210 */ + 0x00441410, 0x6404000b, 0x800150c0, 0x8984047e, + 0x41400658, 0x94a4c000, 0x09dca862, 0x00001800, + } }, + { { /* 211 */ + 0x000a8100, 0x41900008, 0xe4a14007, 0x64452501, + 0x0e7d11ee, 0xfb084800, 0x08a81616, 0x0009c92e, + } }, + { { /* 212 */ + 0x4a821800, 0x6b6406a0, 0x16000002, 0x83905648, + 0x002a73a0, 0x00248000, 0x470288f9, 0x0faa4d02, + } }, + { { /* 213 */ + 0x8e800000, 0x7554b87b, 0xd9402418, 0x040cc880, + 0xb0410000, 0x04428c24, 0x001a5a34, 0xc1108000, + } }, + { { /* 214 */ + 0x00328046, 0x8106180d, 0xcd920002, 0x74016014, + 0x00916112, 0x420ac098, 0x8420040f, 0x40029a13, + } }, + { { /* 215 */ + 0xfd228a62, 0x40808188, 0x21031000, 0x31010808, + 0x07044420, 0x0388b812, 0xa3008900, 0x22020000, + } }, + { { /* 216 */ + 0x46001210, 0x00410042, 0x52415680, 0x200052f0, + 0x82148610, 0x46021004, 0x8035430a, 0xd80060e0, + } }, + { { /* 217 */ + 0x08010041, 0x6c653400, 0xab0411c1, 0x22040286, + 0x00000003, 0x00009084, 0x02814015, 0x33000202, + } }, + { { /* 218 */ + 0x38400400, 0xc0c00e20, 0x00850030, 0x0d250500, + 0x81d04ad0, 0x020c2280, 0x6240b605, 0x62802679, + } }, + { { /* 219 */ + 0x080802ea, 0x8579dd67, 0xdea0081b, 0x40008735, + 0xd1000a8c, 0xa22505aa, 0x15108440, 0x0080404d, + } }, + { { /* 220 */ + 0x8d220012, 0x058f1968, 0x3a1a9080, 0x85618464, + 0x2002ccc0, 0x732e0820, 0x0b3420a4, 0x14150004, + } }, + { { /* 221 */ + 0x82002001, 0x08000057, 0x00445004, 0x79051212, + 0x000940d0, 0x84004000, 0xd844054c, 0x5114409a, + } }, + { { /* 222 */ + 0x40000b12, 0x15800201, 0x08002001, 0xc200084a, + 0x40020800, 0x98093020, 0x18800000, 0x0008e22c, + } }, + { { /* 223 */ + 0x00040004, 0x001410e0, 0x20008020, 0x10009800, + 0x00827082, 0x1c000288, 0x00014c22, 0x08209100, + } }, + { { /* 224 */ + 0x00404002, 0x44001c00, 0x7cc10383, 0x84002121, + 0x0002e002, 0xe20a44c0, 0x81260e03, 0x080002d0, + } }, + { { /* 225 */ + 0x96902921, 0xb8c24001, 0x00806241, 0xa6510a06, + 0x812c0112, 0x0400c600, 0xa2800cb0, 0x8640a429, + } }, + { { /* 226 */ + 0x4a028000, 0x02003041, 0x0057ba40, 0x20205001, + 0x24b08880, 0x01122002, 0x000402d3, 0x00000211, + } }, + { { /* 227 */ + 0x40040080, 0xe0000c82, 0x00003008, 0x00081011, + 0x81a40208, 0x420e40a0, 0xc0400400, 0x48000081, + } }, + { { /* 228 */ + 0x0f912df5, 0x0629d807, 0x4001007c, 0x824e4546, + 0x1008c000, 0xed363005, 0x65400c80, 0x0810930b, + } }, + { { /* 229 */ + 0xe8200600, 0x6082c80a, 0x403400ca, 0x12012e02, + 0x19489004, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 230 */ + 0x00000000, 0x05400000, 0x00311000, 0x02a54c00, + 0x44105520, 0x23040310, 0x80345422, 0x12010a03, + } }, + { { /* 231 */ + 0x01a1126b, 0xa0482000, 0x45400448, 0xe08d8000, + 0x28401af0, 0x04168626, 0x4c005018, 0x21120032, + } }, + { { /* 232 */ + 0x0d0005e4, 0x42008a08, 0x00334800, 0x87030860, + 0x34008501, 0xe4280109, 0x81002045, 0x5c1825a8, + } }, + { { /* 233 */ + 0xd80435a0, 0x02e01c02, 0x020000a1, 0x4146c050, + 0xa6046800, 0xbb8af260, 0xc8b60000, 0x600200e2, + } }, + { { /* 234 */ + 0x0080023e, 0x03728900, 0x00068681, 0x08880000, + 0x41404600, 0x20000e04, 0x10481622, 0x22178a00, + } }, + { { /* 235 */ + 0x00007418, 0x21021200, 0x08800200, 0x0420984a, + 0x12110000, 0x99040002, 0x04022a55, 0x10105000, + } }, + { { /* 236 */ + 0x459a0000, 0xa000b02a, 0x0208420a, 0x00002708, + 0x08128090, 0x04018740, 0x3020e202, 0x8c800630, + } }, + { { /* 237 */ + 0x04c004c4, 0x80002000, 0xd8314000, 0x02000080, + 0x00081400, 0x00000218, 0x8a100880, 0x40002010, + } }, + { { /* 238 */ + 0x1500010d, 0x00000000, 0x80a04000, 0x01500140, + 0x80002004, 0x04080004, 0x00000010, 0x4a049001, + } }, + { { /* 239 */ + 0x80000020, 0x0842000c, 0x2a8c3041, 0xc085090e, + 0x40c42906, 0x00100800, 0xb2308006, 0x21380102, + } }, + { { /* 240 */ + 0x030d0080, 0x09400420, 0x80000012, 0x80040410, + 0x004888ca, 0x24040602, 0x00040001, 0x01100008, + } }, + { { /* 241 */ + 0xa9c8550d, 0x0c522428, 0x48310000, 0x022f624d, + 0x412830a0, 0xd205057b, 0x1844a894, 0x45c26cc2, + } }, + { { /* 242 */ + 0x2ed14017, 0x02081901, 0x1500c202, 0x20919040, + 0x044d0401, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 243 */ + 0x00000000, 0x80800000, 0x04201542, 0x06000c02, + 0x60001404, 0xb9d99f87, 0x540a059f, 0x3810245d, + } }, + { { /* 244 */ + 0x004825b0, 0x00000000, 0x00000000, 0x00990850, + 0x02000420, 0x44080108, 0x28009840, 0x0008810a, + } }, + { { /* 245 */ + 0x40018400, 0x00210400, 0x82000794, 0x00500001, + 0x00002482, 0x00001c00, 0x80043c01, 0x49000800, + } }, + { { /* 246 */ + 0xf83c0228, 0xcb0886c0, 0xa0006230, 0x00000004, + 0x18000000, 0x0007a148, 0x00124024, 0x22852c40, + } }, + { { /* 247 */ + 0xe6b3a96f, 0x5126400f, 0x723b6c86, 0xb5a4e20b, + 0x0222859f, 0x0123854c, 0x40000402, 0x20202102, + } }, + { { /* 248 */ + 0x02240004, 0x00042080, 0x00047e00, 0x01a01604, + 0x10042a80, 0x0032d800, 0x3183fa81, 0x00200488, + } }, + { { /* 249 */ + 0x40872000, 0x84100000, 0x48800221, 0x00000074, + 0x114a0029, 0x02c80000, 0x00049000, 0x11000410, + } }, + { { /* 250 */ + 0xc5010010, 0x0000c957, 0x08102d00, 0x50204000, + 0x04501000, 0x00013088, 0x40020008, 0x00400012, + } }, + { { /* 251 */ + 0x01000010, 0x01200820, 0x08060010, 0xa0000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 252 */ + 0x00000000, 0x00000000, 0x00000000, 0x00800000, + 0x011e8a09, 0x18022138, 0x10700480, 0x00000006, + } }, + { { /* 253 */ + 0x10000000, 0x88044402, 0xf8013815, 0x21e9041c, + 0x1b306c60, 0x08820588, 0x1a607af3, 0x0ac5870c, + } }, + { { /* 254 */ + 0x524a00c1, 0x22050080, 0x50420114, 0x04902206, + 0x0000a800, 0x00002901, 0x10080840, 0x88480000, + } }, + { { /* 255 */ + 0x018f156f, 0x0b012000, 0x45107040, 0x000088a0, + 0x00000000, 0x00028100, 0x98000090, 0x7010e006, + } }, + { { /* 256 */ + 0x41091608, 0x00000101, 0x00963a20, 0x00000000, + 0x22400000, 0x021a7120, 0xa2270002, 0x80022000, + } }, + { { /* 257 */ + 0x0200c102, 0x00c10800, 0x8ca02029, 0x00000624, + 0x00000000, 0x01000100, 0x01180000, 0x00004020, + } }, + { { /* 258 */ + 0x04000000, 0x10020480, 0x0410803e, 0x00008000, + 0x80024000, 0x00004800, 0x00400200, 0x00000110, + } }, + { { /* 259 */ + 0x00252000, 0x08040020, 0x00800280, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x005802a0, + } }, + { { /* 260 */ + 0x08000200, 0x08000140, 0x20020000, 0x00041003, + 0x00000000, 0x00108200, 0x00800010, 0x07040000, + } }, + { { /* 261 */ + 0x44000000, 0x00000000, 0x00000000, 0xa2200000, + 0xa08c0000, 0x48300020, 0x59126008, 0x00100100, + } }, + { { /* 262 */ + 0x00084180, 0x08000001, 0x80044c00, 0x00801482, + 0x10212000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 263 */ + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + } }, + { { /* 264 */ + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0x0000000f, 0x00000000, 0x00000000, + } }, + { { /* 265 */ + 0x00000fff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 266 */ + 0x00000000, 0x00000000, 0x00820000, 0x00820000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 267 */ + 0xffff0000, 0xffff27bf, 0x000027bf, 0x00000000, + 0x00000000, 0x0c000000, 0x03000000, 0x000000c0, + } }, + { { /* 268 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 269 */ + 0xffff0042, 0xffffffff, 0x0042ffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x000000c0, + } }, + { { /* 270 */ + 0x00000000, 0x000c0000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 271 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00000000, 0x0000c00c, 0x00000000, 0x00000000, + } }, + { { /* 272 */ + 0x000c0003, 0x00003c00, 0x0000f000, 0x00003c00, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 273 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x98504f14, 0x18504f14, + } }, + { { /* 274 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xfef02596, 0x3bffecae, 0x33ff3f5f, 0x00000000, + } }, + { { /* 275 */ + 0x03c03030, 0x0000c000, 0x00000000, 0x600c0c03, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 276 */ + 0x000c3003, 0x18c00c0c, 0x00c03060, 0x60000c03, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 277 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00100002, 0x00100002, + } }, + { { /* 278 */ + 0x00000003, 0x18000000, 0x00003060, 0x00000c00, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 279 */ + 0x00000000, 0x00300000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 280 */ + 0xfdffb729, 0x000001ff, 0xb7290000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 281 */ + 0xfffddfec, 0xc3fffdff, 0x00803dcf, 0x0000ffc3, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 282 */ + 0x00000000, 0xffffffff, 0xffffffff, 0x00ffffff, + 0xffffffff, 0x000003ff, 0x00000000, 0x00000000, + } }, + { { /* 283 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00004004, 0x00004004, + } }, + { { /* 284 */ + 0x0f000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 285 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x02045101, 0x02045101, + } }, + { { /* 286 */ + 0x00000c00, 0x000000c3, 0x00000000, 0x18000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 287 */ + 0xffffffff, 0x0007f6fb, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 288 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x011c0661, 0x011c0661, + } }, + { { /* 289 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x1c58af16, 0x1c58af16, + } }, + { { /* 290 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x115c0671, 0x115c0671, + } }, + { { /* 291 */ + 0x00000000, 0x00000000, 0x00000000, 0x00300000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 292 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x040c2383, 0x040c2383, + } }, + { { /* 293 */ + 0xfff99fee, 0xf3cdfdff, 0xb0c0398f, 0x0001ffc3, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 294 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00080000, 0x00080000, + } }, + { { /* 295 */ + 0x030000f0, 0x00000000, 0x0c00001e, 0x1e000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 296 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x143c278f, 0x143c278f, + } }, + { { /* 297 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x02045301, 0x02045301, + } }, + { { /* 298 */ + 0xffff0042, 0xffffffff, 0x0042ffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 299 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00300000, 0x0c00c030, 0x03000000, 0x00000000, + } }, + { { /* 300 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00800000, 0x00000000, 0x00000000, + } }, + { { /* 301 */ + 0x30000000, 0x00000000, 0x00000000, 0x00000000, + 0x00040000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 302 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00000002, 0x00000002, + } }, + { { /* 303 */ + 0x00033000, 0x00000000, 0x00000c00, 0x600000c3, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 304 */ + 0xffff8f04, 0xffffffff, 0x8f04ffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 305 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xfc7fffe0, 0x2ffbffff, 0xff5f807f, 0x001c0000, + } }, + { { /* 306 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x24182212, 0x24182212, + } }, + { { /* 307 */ + 0x0000f000, 0x66000000, 0x00300180, 0x60000033, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 308 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00408030, 0x00408030, + } }, + { { /* 309 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00020032, 0x00020032, + } }, + { { /* 310 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00000016, 0x00000016, + } }, + { { /* 311 */ + 0x00033000, 0x00000000, 0x00000c00, 0x60000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 312 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00200034, 0x00200034, + } }, + { { /* 313 */ + 0x00033000, 0x00000000, 0x00000c00, 0x60000003, + 0x00000000, 0x00800000, 0x00000000, 0x0000c3f0, + } }, + { { /* 314 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00040000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 315 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00000880, 0x00000880, + } }, + { { /* 316 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x10400a33, 0x10400a33, + } }, + { { /* 317 */ + 0xffff0000, 0xffff1fff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 318 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xd63dc7ec, 0xc3bfc718, 0x00803dc7, 0x0007ff80, + } }, + { { /* 319 */ + 0xfffddfee, 0xc3effdff, 0x00603ddf, 0x0000ffc3, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 320 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x0c0c0000, 0x00cc0000, 0x00000000, 0x0000c00c, + } }, + { { /* 321 */ + 0xfffffffe, 0x87ffffff, 0x0fffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 322 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00c00000, 0x0000c00c, 0x03000000, 0x00000000, + } }, + { { /* 323 */ + 0x000fdfff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 324 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00100400, 0x00100400, + } }, + { { /* 325 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x18404084, 0x18404084, + } }, + { { /* 326 */ + 0xc0000000, 0x00030000, 0xc0000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 327 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00c00000, 0x0c00c00c, 0x03000000, 0x00000000, + } }, + { { /* 328 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00220008, 0x00220008, + } }, + { { /* 329 */ + 0x00000000, 0x00000300, 0x00000000, 0x00000300, + 0x00010040, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 330 */ + 0x00000000, 0x00000000, 0x08100000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 331 */ + 0x00000048, 0x00000200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 332 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x30000000, 0x00000000, 0x03000000, + } }, + { { /* 333 */ + 0xffff00d0, 0xffffffff, 0x00d0ffff, 0x00000000, + 0x00030000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 334 */ + 0xffff0002, 0xffffe5ff, 0x0002e5ff, 0x00000000, + 0x0c0c0000, 0x000c0000, 0x00000000, 0x00030000, + } }, + { { /* 335 */ + 0x000c0000, 0x30000000, 0x00000c30, 0x00030000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 336 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x263c370f, 0x263c370f, + } }, + { { /* 337 */ + 0x0003000c, 0x00000300, 0x00000000, 0x00000300, + 0x00000000, 0x00018003, 0x00000000, 0x00000000, + } }, + { { /* 338 */ + 0x0800024f, 0x00000008, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 339 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xffffffff, 0xffffffff, 0x03ffffff, + } }, + { { /* 340 */ + 0x00000000, 0x00000000, 0x077dfffe, 0x077dfffe, + 0x00000000, 0x00000000, 0x10400010, 0x10400010, + } }, + { { /* 341 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x10400010, 0x10400010, + } }, + { { /* 342 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x081047a4, 0x081047a4, + } }, + { { /* 343 */ + 0x0c0030c0, 0x00000000, 0x0f30001e, 0x66000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 344 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x000a0a09, 0x000a0a09, + } }, + { { /* 345 */ + 0x00000000, 0x00000000, 0x00000c00, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 346 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x00400810, 0x00400810, + } }, + { { /* 347 */ + 0x00000000, 0x00000000, 0x07fffffe, 0x07fffffe, + 0x00000000, 0x00000000, 0x0e3c770f, 0x0e3c770f, + } }, + { { /* 348 */ + 0x0c000000, 0x00000300, 0x00000018, 0x00000300, + 0x00000000, 0x00000000, 0x001fe000, 0x03000000, + } }, + { { /* 349 */ + 0x0000100f, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 350 */ + 0x00000000, 0xc0000000, 0x00000000, 0x0000000c, + 0x00000000, 0x33000000, 0x00003000, 0x00000000, + } }, + { { /* 351 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000280, 0x00000000, + } }, + { { /* 352 */ + 0x7f7b7f8b, 0xef553db4, 0xf35dfba8, 0x400b0243, + 0x8d3efb40, 0x8c2c7bf7, 0xe3fa6eff, 0xa8ed1d3a, + } }, + { { /* 353 */ + 0xcf83e602, 0x35558cf5, 0xffabe048, 0xd85992b9, + 0x2892ab18, 0x8020d7e9, 0xf583c438, 0x450ae74a, + } }, + { { /* 354 */ + 0x9714b000, 0x54007762, 0x1420d188, 0xc8c01020, + 0x00002121, 0x0c0413a8, 0x04408000, 0x082870c0, + } }, + { { /* 355 */ + 0x000408c0, 0x80000002, 0x14722b7b, 0x3bfb7924, + 0x1ae43327, 0x38ef9835, 0x28029ad1, 0xbf69a813, + } }, + { { /* 356 */ + 0x2fc665cf, 0xafc96b11, 0x5053340f, 0xa00486a2, + 0xe8090106, 0xc00e3f0f, 0x81450a88, 0xc6010010, + } }, + { { /* 357 */ + 0x26e1a161, 0xce00444b, 0xd4eec7aa, 0x85bbcadf, + 0xa5203a74, 0x8840436c, 0x8bd23f06, 0x3befff79, + } }, + { { /* 358 */ + 0xe8eff75a, 0x5b36fbcb, 0x1bfd0d49, 0x39ee0154, + 0x2e75d855, 0xa91abfd8, 0xf6bff3d7, 0xb40c67e0, + } }, + { { /* 359 */ + 0x081382c2, 0xd08bd49d, 0x1061065a, 0x59e074f2, + 0xb3128f9f, 0x6aaa0080, 0xb05e3230, 0x60ac9d7a, + } }, + { { /* 360 */ + 0xc900d303, 0x8a563098, 0x13907000, 0x18421f14, + 0x0008c060, 0x10808008, 0xec900400, 0xe6332817, + } }, + { { /* 361 */ + 0x90000758, 0x4e09f708, 0xfc83f485, 0x18c8af53, + 0x080c187c, 0x01146adf, 0xa734c80c, 0x2710a011, + } }, + { { /* 362 */ + 0x422228c5, 0x00210413, 0x41123010, 0x40001820, + 0xc60c022b, 0x10000300, 0x00220022, 0x02495810, + } }, + { { /* 363 */ + 0x9670a094, 0x1792eeb0, 0x05f2cb96, 0x23580025, + 0x42cc25de, 0x4a04cf38, 0x359f0c40, 0x8a001128, + } }, + { { /* 364 */ + 0x910a13fa, 0x10560229, 0x04200641, 0x84f00484, + 0x0c040000, 0x412c0400, 0x11541206, 0x00020a4b, + } }, + { { /* 365 */ + 0x00c00200, 0x00940000, 0xbfbb0001, 0x242b167c, + 0x7fa89bbb, 0xe3790c7f, 0xe00d10f4, 0x9f014132, + } }, + { { /* 366 */ + 0x35728652, 0xff1210b4, 0x4223cf27, 0x8602c06b, + 0x1fd33106, 0xa1aa3a0c, 0x02040812, 0x08012572, + } }, + { { /* 367 */ + 0x485040cc, 0x601062d0, 0x29001c80, 0x00109a00, + 0x22000004, 0x00800000, 0x68002020, 0x609ecbe6, + } }, + { { /* 368 */ + 0x3f73916e, 0x398260c0, 0x48301034, 0xbd5c0006, + 0xd6fb8cd1, 0x43e820e1, 0x084e0600, 0xc4d00500, + } }, + { { /* 369 */ + 0x89aa8d1f, 0x1602a6e1, 0x21ed0001, 0x1a8b3656, + 0x13a51fb7, 0x30a06502, 0x23c7b278, 0xe9226c93, + } }, + { { /* 370 */ + 0x3a74e47f, 0x98208fe3, 0x2625280e, 0xbf49bf9c, + 0xac543218, 0x1916b949, 0xb5220c60, 0x0659fbc1, + } }, + { { /* 371 */ + 0x8420e343, 0x800008d9, 0x20225500, 0x00a10184, + 0x20104800, 0x40801380, 0x00160d04, 0x80200040, + } }, + { { /* 372 */ + 0x8de7fd40, 0xe0985436, 0x091e7b8b, 0xd249fec8, + 0x8dee0611, 0xba221937, 0x9fdd77f4, 0xf0daf3ec, + } }, + { { /* 373 */ + 0xec424386, 0x26048d3f, 0xc021fa6c, 0x0cc2628e, + 0x0145d785, 0x559977ad, 0x4045e250, 0xa154260b, + } }, + { { /* 374 */ + 0x58199827, 0xa4103443, 0x411405f2, 0x07002280, + 0x426600b4, 0x15a17210, 0x41856025, 0x00000054, + } }, + { { /* 375 */ + 0x01040201, 0xcb70c820, 0x6a629320, 0x0095184c, + 0x9a8b1880, 0x3201aab2, 0x00c4d87a, 0x04c3f3e5, + } }, + { { /* 376 */ + 0xa238d44d, 0x5072a1a1, 0x84fc980a, 0x44d1c152, + 0x20c21094, 0x42104180, 0x3a000000, 0xd29d0240, + } }, + { { /* 377 */ + 0xa8b12f01, 0x2432bd40, 0xd04bd34d, 0xd0ada723, + 0x75a10a92, 0x01e9adac, 0x771f801a, 0xa01b9225, + } }, + { { /* 378 */ + 0x20cadfa1, 0x738c0602, 0x003b577f, 0x00d00bff, + 0x0088806a, 0x0029a1c4, 0x05242a05, 0x16234009, + } }, + { { /* 379 */ + 0x80056822, 0xa2112011, 0x64900004, 0x13824849, + 0x193023d5, 0x08922980, 0x88115402, 0xa0042001, + } }, + { { /* 380 */ + 0x81800400, 0x60228502, 0x0b010090, 0x12020022, + 0x00834011, 0x00001a01, 0x00000000, 0x00000000, + } }, + { { /* 381 */ + 0x00000000, 0x4684009f, 0x020012c8, 0x1a0004fc, + 0x0c4c2ede, 0x80b80402, 0x0afca826, 0x22288c02, + } }, + { { /* 382 */ + 0x8f7ba0e0, 0x2135c7d6, 0xf8b106c7, 0x62550713, + 0x8a19936e, 0xfb0e6efa, 0x48f91630, 0x7debcd2f, + } }, + { { /* 383 */ + 0x4e845892, 0x7a2e4ca0, 0x561eedea, 0x1190c649, + 0xe83a5324, 0x8124cfdb, 0x634218f1, 0x1a8a5853, + } }, + { { /* 384 */ + 0x24d37420, 0x0514aa3b, 0x89586018, 0xc0004800, + 0x91018268, 0x2cd684a4, 0xc4ba8886, 0x02100377, + } }, + { { /* 385 */ + 0x00388244, 0x404aae11, 0x510028c0, 0x15146044, + 0x10007310, 0x02480082, 0x40060205, 0x0000c003, + } }, + { { /* 386 */ + 0x0c020000, 0x02200008, 0x40009000, 0xd161b800, + 0x32744621, 0x3b8af800, 0x8b00050f, 0x2280bbd0, + } }, + { { /* 387 */ + 0x07690600, 0x00438040, 0x50005420, 0x250c41d0, + 0x83108410, 0x02281101, 0x00304008, 0x020040a1, + } }, + { { /* 388 */ + 0x20000040, 0xabe31500, 0xaa443180, 0xc624c2c6, + 0x8004ac13, 0x03d1b000, 0x4285611e, 0x1d9ff303, + } }, + { { /* 389 */ + 0x78e8440a, 0xc3925e26, 0x00852000, 0x4000b001, + 0x88424a90, 0x0c8dca04, 0x4203a705, 0x000422a1, + } }, + { { /* 390 */ + 0x0c018668, 0x10795564, 0xdea00002, 0x40c12000, + 0x5001488b, 0x04000380, 0x50040000, 0x80d0c05d, + } }, + { { /* 391 */ + 0x970aa010, 0x4dafbb20, 0x1e10d921, 0x83140460, + 0xa6d68848, 0x733fd83b, 0x497427bc, 0x92130ddc, + } }, + { { /* 392 */ + 0x8ba1142b, 0xd1392e75, 0x50503009, 0x69008808, + 0x024a49d4, 0x80164010, 0x89d7e564, 0x5316c020, + } }, + { { /* 393 */ + 0x86002b92, 0x15e0a345, 0x0c03008b, 0xe200196e, + 0x80067031, 0xa82916a5, 0x18802000, 0xe1487aac, + } }, + { { /* 394 */ + 0xb5d63207, 0x5f9132e8, 0x20e550a1, 0x10807c00, + 0x9d8a7280, 0x421f00aa, 0x02310e22, 0x04941100, + } }, + { { /* 395 */ + 0x40080022, 0x5c100010, 0xfcc80343, 0x0580a1a5, + 0x04008433, 0x6e080080, 0x81262a4b, 0x2901aad8, + } }, + { { /* 396 */ + 0x4490684d, 0xba880009, 0x00820040, 0x87d10000, + 0xb1e6215b, 0x80083161, 0xc2400800, 0xa600a069, + } }, + { { /* 397 */ + 0x4a328d58, 0x550a5d71, 0x2d579aa0, 0x4aa64005, + 0x30b12021, 0x01123fc6, 0x260a10c2, 0x50824462, + } }, + { { /* 398 */ + 0x80409880, 0x810004c0, 0x00002003, 0x38180000, + 0xf1a60200, 0x720e4434, 0x92e035a2, 0x09008101, + } }, + { { /* 399 */ + 0x00000400, 0x00008885, 0x00000000, 0x00804000, + 0x00000000, 0x00004040, 0x00000000, 0x00000000, + } }, + { { /* 400 */ + 0x00000000, 0x08000000, 0x00000082, 0x00000000, + 0x88000004, 0xe7efbfff, 0xffbfffff, 0xfdffefef, + } }, + { { /* 401 */ + 0xbffefbff, 0x057fffff, 0x85b30034, 0x42164706, + 0xe4105402, 0xb3058092, 0x81305422, 0x180b4263, + } }, + { { /* 402 */ + 0x13f5387b, 0xa9ea07e5, 0x05143c4c, 0x80020600, + 0xbd481ad9, 0xf496ee37, 0x7ec0705f, 0x355fbfb2, + } }, + { { /* 403 */ + 0x455fe644, 0x41469000, 0x063b1d40, 0xfe1362a1, + 0x39028505, 0x0c080548, 0x0000144f, 0x58183488, + } }, + { { /* 404 */ + 0xd8153077, 0x4bfbbd0e, 0x85008a90, 0xe61dc100, + 0xb386ed14, 0x639bff72, 0xd9befd92, 0x0a92887b, + } }, + { { /* 405 */ + 0x1cb2d3fe, 0x177ab980, 0xdc1782c9, 0x3980fffb, + 0x590c4260, 0x37df0f01, 0xb15094a3, 0x23070623, + } }, + { { /* 406 */ + 0x3102f85a, 0x310201f0, 0x1e820040, 0x056a3a0a, + 0x12805b84, 0xa7148002, 0xa04b2612, 0x90011069, + } }, + { { /* 407 */ + 0x848a1000, 0x3f801802, 0x42400708, 0x4e140110, + 0x180080b0, 0x0281c510, 0x10298202, 0x88000210, + } }, + { { /* 408 */ + 0x00420020, 0x11000280, 0x4413e000, 0xfe025804, + 0x30283c07, 0x04739798, 0xcb13ced1, 0x431f6210, + } }, + { { /* 409 */ + 0x55ac278d, 0xc892422e, 0x02885380, 0x78514039, + 0x8088292c, 0x2428b900, 0x080e0c41, 0x42004421, + } }, + { { /* 410 */ + 0x08680408, 0x12040006, 0x02903031, 0xe0855b3e, + 0x10442936, 0x10822814, 0x83344266, 0x531b013c, + } }, + { { /* 411 */ + 0x0e0d0404, 0x00510c22, 0xc0000012, 0x88000040, + 0x0000004a, 0x00000000, 0x5447dff6, 0x00088868, + } }, + { { /* 412 */ + 0x00000081, 0x40000000, 0x00000100, 0x02000000, + 0x00080600, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 413 */ + 0x00000080, 0x00000040, 0x00000000, 0x00001040, + 0x00000000, 0xf7fdefff, 0xfffeff7f, 0xfffffbff, + } }, + { { /* 414 */ + 0xbffffdff, 0x00ffffff, 0x042012c2, 0x07080c06, + 0x01101624, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 415 */ + 0xe0000000, 0xfffffffe, 0x7f79ffff, 0x00f928df, + 0x80120c32, 0xd53a0008, 0xecc2d858, 0x2fa89d18, + } }, + { { /* 416 */ + 0xe0109620, 0x2622d60c, 0x02060f97, 0x9055b240, + 0x501180a2, 0x04049800, 0x00004000, 0x00000000, + } }, + { { /* 417 */ + 0x00000000, 0x00000000, 0x00000000, 0xfffffbc0, + 0xdffbeffe, 0x62430b08, 0xfb3b41b6, 0x23896f74, + } }, + { { /* 418 */ + 0xecd7ae7f, 0x5960e047, 0x098fa096, 0xa030612c, + 0x2aaa090d, 0x4f7bd44e, 0x388bc4b2, 0x6110a9c6, + } }, + { { /* 419 */ + 0x42000014, 0x0202800c, 0x6485fe48, 0xe3f7d63e, + 0x0c073aa0, 0x0430e40c, 0x1002f680, 0x00000000, + } }, + { { /* 420 */ + 0x00000000, 0x00000000, 0x00000000, 0x00100000, + 0x00004000, 0x00004000, 0x00000100, 0x00000000, + } }, + { { /* 421 */ + 0x00000000, 0x40000000, 0x00000000, 0x00000400, + 0x00008000, 0x00000000, 0x00400400, 0x00000000, + } }, + { { /* 422 */ + 0x00000000, 0x40000000, 0x00000000, 0x00000800, + 0xfebdffe0, 0xffffffff, 0xfbe77f7f, 0xf7ffffbf, + } }, + { { /* 423 */ + 0xefffffff, 0xdff7ff7e, 0xfbdff6f7, 0x804fbffe, + 0x00000000, 0x00000000, 0x00000000, 0x7fffef00, + } }, + { { /* 424 */ + 0xb6f7ff7f, 0xb87e4406, 0x88313bf5, 0x00f41796, + 0x1391a960, 0x72490080, 0x0024f2f3, 0x42c88701, + } }, + { { /* 425 */ + 0x5048e3d3, 0x43052400, 0x4a4c0000, 0x10580227, + 0x01162820, 0x0014a809, 0x00000000, 0x00683ec0, + } }, + { { /* 426 */ + 0x00000000, 0x00000000, 0x00000000, 0xffe00000, + 0xfddbb7ff, 0x000000f7, 0xc72e4000, 0x00000180, + } }, + { { /* 427 */ + 0x00012000, 0x00004000, 0x00300000, 0xb4f7ffa8, + 0x03ffadf3, 0x00000120, 0x00000000, 0x00000000, + } }, + { { /* 428 */ + 0x00000000, 0x00000000, 0x00000000, 0xfffbf000, + 0xfdcf9df7, 0x15c301bf, 0x810a1827, 0x0a00a842, + } }, + { { /* 429 */ + 0x80088108, 0x18048008, 0x0012a3be, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 430 */ + 0x00000000, 0x00000000, 0x00000000, 0x90000000, + 0xdc3769e6, 0x3dff6bff, 0xf3f9fcf8, 0x00000004, + } }, + { { /* 431 */ + 0x80000000, 0xe7eebf6f, 0x5da2dffe, 0xc00b3fd8, + 0xa00c0984, 0x69100040, 0xb912e210, 0x5a0086a5, + } }, + { { /* 432 */ + 0x02896800, 0x6a809005, 0x00030010, 0x80000000, + 0x8e001ff9, 0x00000001, 0x00000000, 0x00000000, + } }, + { { /* 433 */ + 0x14000010, 0xa0c09512, 0x0c000200, 0x01000400, + 0x050002a3, 0x98800009, 0x00004000, 0x01004c00, + } }, + { { /* 434 */ + 0x04800008, 0x02840300, 0x00000824, 0x00040000, + 0x00000400, 0x20010904, 0x00001100, 0x22050030, + } }, + { { /* 435 */ + 0x00000108, 0x08104000, 0x01400000, 0x00001040, + 0x00010102, 0x10000040, 0x82012000, 0x10100002, + } }, + { { /* 436 */ + 0x00006002, 0x00000800, 0x00400000, 0x02100401, + 0x14400144, 0x013c4980, 0x880e8288, 0x50102014, + } }, + { { /* 437 */ + 0x80000824, 0x101000c1, 0x02800000, 0x02080101, + 0x04118000, 0x02200112, 0x00031020, 0x02000003, + } }, + { { /* 438 */ + 0x00000002, 0x090c1090, 0xa0004004, 0x60102290, + 0x00080000, 0x00414f45, 0x07071026, 0x40c00001, + } }, + { { /* 439 */ + 0x04580000, 0x0014800a, 0x00002800, 0x00002600, + 0x50988020, 0x02140018, 0x04013800, 0x00008008, + } }, + { { /* 440 */ + 0x41082004, 0x80000928, 0x20080280, 0x020e0a00, + 0x00010040, 0x16110200, 0x41800002, 0x08231400, + } }, + { { /* 441 */ + 0x40020020, 0x0080202f, 0x2015a008, 0x1c000002, + 0xc0040e00, 0x82028012, 0x00400000, 0x2002a004, + } }, + { { /* 442 */ + 0x20200001, 0xa0040000, 0x8890004c, 0xc4000080, + 0x10012500, 0x48100482, 0x60800110, 0x40008040, + } }, + { { /* 443 */ + 0x00040008, 0x04000044, 0x90000091, 0x000c1200, + 0x06040000, 0x08610480, 0x10010800, 0x080d0001, + } }, + { { /* 444 */ + 0x800204b4, 0x00140000, 0x00000000, 0x00200020, + 0x84100200, 0x01811000, 0x02000210, 0x03018800, + } }, + { { /* 445 */ + 0x04042804, 0x20001c92, 0x02100020, 0x4202490a, + 0x02420146, 0x00000803, 0x0008c008, 0x44050010, + } }, + { { /* 446 */ + 0x80222000, 0x00000800, 0x00008452, 0x10502140, + 0xe0410005, 0x00000400, 0x00a00008, 0x80080000, + } }, + { { /* 447 */ + 0x50180020, 0x00000009, 0x40080600, 0x00000000, + 0x56000020, 0x04000000, 0x00020006, 0x00208220, + } }, + { { /* 448 */ + 0x01210000, 0x40009000, 0x08c00140, 0x08110000, + 0x00004820, 0x02400810, 0x08800002, 0x00200000, + } }, + { { /* 449 */ + 0x00040a00, 0x00004000, 0x40000104, 0x84000000, + 0x02040048, 0x20000000, 0x00012000, 0x1b100000, + } }, + { { /* 450 */ + 0x00007000, 0x04000020, 0x10032000, 0x0804000a, + 0x00000008, 0x04020090, 0x88000014, 0x00000000, + } }, + { { /* 451 */ + 0x00000000, 0x08020008, 0x00040400, 0x40a00000, + 0x40000000, 0x00080090, 0x40800000, 0x20000388, + } }, + { { /* 452 */ + 0x02001080, 0x20010004, 0x12010004, 0x20008011, + 0x13200082, 0x02800000, 0x04098001, 0x00000004, + } }, + { { /* 453 */ + 0x00000000, 0x02801000, 0x00001000, 0x00000100, + 0x20010024, 0x00000050, 0x80200028, 0x00000020, + } }, + { { /* 454 */ + 0x01000000, 0x00a24000, 0x00000000, 0x82001010, + 0x00000800, 0x02000000, 0x40020002, 0x59000044, + } }, + { { /* 455 */ + 0x00000080, 0x0d040000, 0x04000000, 0x10020000, + 0x00022000, 0x00508000, 0x20080001, 0x000004a2, + } }, + { { /* 456 */ + 0xc0020400, 0x00310000, 0x80002000, 0x00002800, + 0x00000b60, 0x40200000, 0x00120000, 0x80000009, + } }, + { { /* 457 */ + 0x41000000, 0x00010008, 0x00880910, 0x20080888, + 0x04044020, 0x80482010, 0x00006000, 0x00020000, + } }, + { { /* 458 */ + 0x42405004, 0x00400020, 0x00000010, 0x00000886, + 0x00008000, 0x80021011, 0x00c00000, 0x42000000, + } }, + { { /* 459 */ + 0x4801201f, 0x40c00004, 0x20600480, 0x00000020, + 0x01000110, 0x22400040, 0x00000428, 0x00000000, + } }, + { { /* 460 */ + 0x0f00020f, 0x40401000, 0x00200048, 0x000c0092, + 0x81000421, 0x00040004, 0x00620001, 0x06000202, + } }, + { { /* 461 */ + 0x14001808, 0x00083800, 0x008c1028, 0x04120028, + 0x22008404, 0x40260880, 0x01100700, 0x00400000, + } }, + { { /* 462 */ + 0x20000020, 0x00200000, 0x00840000, 0x04108000, + 0x00000002, 0x00000000, 0x10000002, 0x04000402, + } }, + { { /* 463 */ + 0x10000000, 0x26a20000, 0x05000200, 0x82204000, + 0x80000000, 0x00048404, 0x80004800, 0x80000400, + } }, + { { /* 464 */ + 0x00000064, 0x00000050, 0x18804000, 0x00060000, + 0x00408002, 0x02020030, 0x00000000, 0x40000000, + } }, + { { /* 465 */ + 0x01208414, 0x00000600, 0x02018000, 0x10400000, + 0x04000840, 0x09200000, 0x2e000000, 0x04000304, + } }, + { { /* 466 */ + 0x00c01810, 0x20100010, 0x10400010, 0x02100000, + 0xa0000402, 0x48200000, 0x06080000, 0x01400000, + } }, + { { /* 467 */ + 0x40000008, 0x00001000, 0x10112800, 0xc2a09080, + 0x00008a02, 0x3a0000e9, 0x80611011, 0x40220000, + } }, + { { /* 468 */ + 0x20000020, 0x48381a00, 0x00028421, 0x54ea0800, + 0x01425100, 0x0490200c, 0x20020000, 0x00600800, + } }, + { { /* 469 */ + 0x00e0c201, 0x00004810, 0x10a10001, 0x00000040, + 0x80108084, 0x00042000, 0x00002000, 0x00000004, + } }, + { { /* 470 */ + 0x00010014, 0x03005d00, 0x00008102, 0x00120000, + 0x51009000, 0x04000480, 0x0021c200, 0x0a888056, + } }, + { { /* 471 */ + 0xd2b60004, 0x13800000, 0x204803a8, 0x04501921, + 0x0a003004, 0x02100010, 0x00091100, 0x01070080, + } }, + { { /* 472 */ + 0x42004020, 0x08300000, 0x002a2444, 0x04046081, + 0x40046008, 0x00120000, 0x10000108, 0x00000000, + } }, + { { /* 473 */ + 0x00000084, 0x08001000, 0x0012e001, 0x045880c0, + 0x00010000, 0x00800022, 0x02401000, 0x00000000, + } }, + { { /* 474 */ + 0x4000d000, 0x00000850, 0x01000009, 0x0d840000, + 0x01080000, 0x42008000, 0x20000828, 0x40100040, + } }, + { { /* 475 */ + 0x51000100, 0x32000000, 0x001a0894, 0x04000040, + 0x00002102, 0x03428000, 0x018c0080, 0x00234010, + } }, + { { /* 476 */ + 0x00000040, 0x185c4000, 0x03000000, 0x40020004, + 0xa20200c9, 0x00000220, 0x00101050, 0x00120004, + } }, + { { /* 477 */ + 0x00000040, 0x44002400, 0x00000228, 0x20000020, + 0x000a0008, 0x18010000, 0x3c08830c, 0x40000684, + } }, + { { /* 478 */ + 0x80101800, 0x02000280, 0x0020000c, 0x08009004, + 0x00040000, 0x0004000c, 0x00018000, 0x14001000, + } }, + { { /* 479 */ + 0x08240000, 0x00200000, 0x20420014, 0x58112000, + 0x10004048, 0x010050c0, 0x0408228c, 0x12282040, + } }, + { { /* 480 */ + 0x00000000, 0x00000020, 0x24002000, 0x00000000, + 0x00800a00, 0x00080910, 0x1019a000, 0x60200030, + } }, + { { /* 481 */ + 0x00000080, 0x00000080, 0x08000000, 0x800050a0, + 0x80044000, 0x04001010, 0x80008080, 0x00000000, + } }, + { { /* 482 */ + 0x00000040, 0x00800000, 0x000c4283, 0x01020000, + 0x00888000, 0x00104008, 0x20000000, 0x04000080, + } }, + { { /* 483 */ + 0x20000104, 0x1802c021, 0x08100000, 0x0000004e, + 0x80000001, 0x30c00080, 0x00000040, 0x00401200, + } }, + { { /* 484 */ + 0x04945288, 0x00940400, 0x06400104, 0x10002000, + 0x00080010, 0x00400420, 0x00000102, 0x00408010, + } }, + { { /* 485 */ + 0x05000000, 0x40002240, 0x00100000, 0x0e400024, + 0x00000080, 0x80000440, 0x01018410, 0xb1804004, + } }, + { { /* 486 */ + 0x25000800, 0x20000000, 0x00800000, 0x0000804c, + 0x10020020, 0x42001000, 0x00082000, 0x00002000, + } }, + { { /* 487 */ + 0x11500020, 0x40004053, 0x11280500, 0x80060014, + 0x004c0101, 0x60002008, 0x44000000, 0x01000036, + } }, + { { /* 488 */ + 0x00010028, 0x01180000, 0x84041804, 0x00098000, + 0x00800000, 0x00000000, 0x00400002, 0x10004001, + } }, + { { /* 489 */ + 0x0051a004, 0x00008100, 0x00000024, 0x40041000, + 0x00040000, 0x00042001, 0x00000000, 0x00008000, + } }, + { { /* 490 */ + 0x00000000, 0x00000000, 0x00000000, 0x20030000, + 0x00001840, 0x00020220, 0x04404002, 0x00204000, + } }, + { { /* 491 */ + 0x01008010, 0x00002080, 0x40008064, 0x00004031, + 0x10018090, 0x80304001, 0x000080a0, 0x80200040, + } }, + { { /* 492 */ + 0x00000001, 0x00000010, 0x00102088, 0x00800020, + 0x00120681, 0x100002a0, 0x00000042, 0x00000080, + } }, + { { /* 493 */ + 0x10000000, 0x21000a00, 0x00000200, 0x40000080, + 0x10110000, 0x00108200, 0x04000000, 0x00000400, + } }, + { { /* 494 */ + 0x80001000, 0x80002000, 0x40003008, 0x00000204, + 0x0801000a, 0x40000001, 0x00000000, 0x00000004, + } }, + { { /* 495 */ + 0x00000000, 0x00000000, 0x00020000, 0x00000000, + 0x88000000, 0x00002000, 0x08502000, 0x00840a00, + } }, + { { /* 496 */ + 0x31061808, 0x00000000, 0x00000000, 0x04000000, + 0x00000004, 0x00000240, 0x00100009, 0x00000000, + } }, + { { /* 497 */ + 0x00004002, 0x04002500, 0x00008040, 0x40a20100, + 0x00000001, 0x12412080, 0x04004008, 0x00042014, + } }, + { { /* 498 */ + 0x02000000, 0x00012000, 0x10000402, 0x000040c0, + 0x00080000, 0x5fe800a1, 0x04019402, 0x02000000, + } }, + { { /* 499 */ + 0x00040100, 0x00880000, 0x00401000, 0x00001012, + 0x00000000, 0x08004100, 0x00000010, 0x00000000, + } }, + { { /* 500 */ + 0x00000000, 0x00000000, 0x52020000, 0x10410080, + 0x00005000, 0x08400200, 0x80400010, 0x44400020, + } }, + { { /* 501 */ + 0x00084100, 0x10200d02, 0xa1200012, 0x00804804, + 0x00008212, 0xc6024000, 0x08100000, 0x205c1828, + } }, + { { /* 502 */ + 0x00000088, 0x00031000, 0x8000013f, 0x21184b44, + 0x100100f2, 0xa9002001, 0x08080840, 0x001b0001, + } }, + { { /* 503 */ + 0x28800112, 0x400020f0, 0x0910200c, 0x0a0010a0, + 0x80000020, 0x00000004, 0x1000000a, 0x00400000, + } }, + { { /* 504 */ + 0x00000000, 0x00002000, 0x00000080, 0x81000000, + 0x02c00020, 0x000004c5, 0x00000000, 0x00100100, + } }, + { { /* 505 */ + 0x20000000, 0x01080000, 0x00400022, 0x08000200, + 0x00408002, 0x20400028, 0x00000000, 0x00100000, + } }, + { { /* 506 */ + 0x08000008, 0x00420002, 0xa0a20003, 0x00022000, + 0x88000280, 0x65160000, 0x00040105, 0x00244041, + } }, + { { /* 507 */ + 0x80300000, 0x00184008, 0x00000880, 0x00201140, + 0x00000000, 0x02900000, 0x50004588, 0x00221043, + } }, + { { /* 508 */ + 0x12004000, 0x0b800000, 0x20002405, 0x0000000c, + 0x08000000, 0x11000410, 0x04000030, 0x00200043, + } }, + { { /* 509 */ + 0x80011000, 0x18008042, 0x11000000, 0x00001008, + 0x00008000, 0x24440000, 0x00800000, 0x80100005, + } }, + { { /* 510 */ + 0x00108204, 0x02102400, 0x00010001, 0x80000200, + 0xa080e80a, 0x00010000, 0x20008000, 0x80122200, + } }, + { { /* 511 */ + 0x88211404, 0x04208041, 0x20088020, 0x18040000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 512 */ + 0x00401004, 0x02100002, 0x40014210, 0x50006000, + 0x00080008, 0x20000820, 0x00100211, 0x10000000, + } }, + { { /* 513 */ + 0x91005400, 0x00000000, 0x00000000, 0x08000000, + 0x41610032, 0xa0029d44, 0x000000d2, 0x41020004, + } }, + { { /* 514 */ + 0x00800104, 0x020000c0, 0x04090030, 0x80000204, + 0x82004000, 0x00000020, 0x00000000, 0x00000000, + } }, + { { /* 515 */ + 0x00000080, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 516 */ + 0xc373ff8b, 0x1b0f6840, 0xf34ce9ac, 0xc0080200, + 0xca3e795c, 0x06487976, 0xf7f02fdf, 0xa8ff033a, + } }, + { { /* 517 */ + 0x233fef37, 0xfd59b004, 0xfffff3ca, 0xfff9de9f, + 0x7df7abff, 0x8eecc000, 0xffdbeebf, 0x45fad003, + } }, + { { /* 518 */ + 0xdffefae1, 0x10abbfef, 0xfcaaffeb, 0x24fdef3f, + 0x7f7678ad, 0xedfff00c, 0x2cfacff6, 0xeb6bf7f9, + } }, + { { /* 519 */ + 0x95bf1ffd, 0xbfbf6677, 0xfeb43bfb, 0x11e27bae, + 0x41bea681, 0x72c31435, 0x71917d70, 0x276b0003, + } }, + { { /* 520 */ + 0x70cf57cb, 0x0def4732, 0xfc747eda, 0xbdb4fe06, + 0x8bca3f9f, 0x58007e49, 0xebec228f, 0xddbb8a5c, + } }, + { { /* 521 */ + 0xb6e7ef60, 0xf293a40f, 0x549e37bb, 0x9bafd04b, + 0xf7d4c414, 0x0a1430b0, 0x88d02f08, 0x192fff7e, + } }, + { { /* 522 */ + 0xfb07ffda, 0x7beb7ff1, 0x0010c5ef, 0xfdff99ff, + 0x056779d7, 0xfdcbffe7, 0x4040c3ff, 0xbd8e6ff7, + } }, + { { /* 523 */ + 0x0497dffa, 0x5bfff4c0, 0xd0e7ed7b, 0xf8e0047e, + 0xb73eff9f, 0x882e7dfe, 0xbe7ffffd, 0xf6c483fe, + } }, + { { /* 524 */ + 0xb8fdf357, 0xef7dd680, 0x47885767, 0xc3dfff7d, + 0x37a9f0ff, 0x70fc7de0, 0xec9a3f6f, 0x86814cb3, + } }, + { { /* 525 */ + 0xdd5c3f9e, 0x4819f70d, 0x0007fea3, 0x38ffaf56, + 0xefb8980d, 0xb760403d, 0x9035d8ce, 0x3fff72bf, + } }, + { { /* 526 */ + 0x7a117ff7, 0xabfff7bb, 0x6fbeff00, 0xfe72a93c, + 0xf11bcfef, 0xf40adb6b, 0xef7ec3e6, 0xf6109b9c, + } }, + { { /* 527 */ + 0x16f4f048, 0x5182feb5, 0x15bbc7b1, 0xfbdf6e87, + 0x63cde43f, 0x7e7ec1ff, 0x7d5ffdeb, 0xfcfe777b, + } }, + { { /* 528 */ + 0xdbea960b, 0x53e86229, 0xfdef37df, 0xbd8136f5, + 0xfcbddc18, 0xffffd2e4, 0xffe03fd7, 0xabf87f6f, + } }, + { { /* 529 */ + 0x6ed99bae, 0xf115f5fb, 0xbdfb79a9, 0xadaf5a3c, + 0x1facdbba, 0x837971fc, 0xc35f7cf7, 0x0567dfff, + } }, + { { /* 530 */ + 0x8467ff9a, 0xdf8b1534, 0x3373f9f3, 0x5e1af7bd, + 0xa03fbf40, 0x01ebffff, 0xcfdddfc0, 0xabd37500, + } }, + { { /* 531 */ + 0xeed6f8c3, 0xb7ff43fd, 0x42275eaf, 0xf6869bac, + 0xf6bc27d7, 0x35b7f787, 0xe176aacd, 0xe29f49e7, + } }, + { { /* 532 */ + 0xaff2545c, 0x61d82b3f, 0xbbb8fc3b, 0x7b7dffcf, + 0x1ce0bf95, 0x43ff7dfd, 0xfffe5ff6, 0xc4ced3ef, + } }, + { { /* 533 */ + 0xadbc8db6, 0x11eb63dc, 0x23d0df59, 0xf3dbbeb4, + 0xdbc71fe7, 0xfae4ff63, 0x63f7b22b, 0xadbaed3b, + } }, + { { /* 534 */ + 0x7efffe01, 0x02bcfff7, 0xef3932ff, 0x8005fffc, + 0xbcf577fb, 0xfff7010d, 0xbf3afffb, 0xdfff0057, + } }, + { { /* 535 */ + 0xbd7def7b, 0xc8d4db88, 0xed7cfff3, 0x56ff5dee, + 0xac5f7e0d, 0xd57fff96, 0xc1403fee, 0xffe76ff9, + } }, + { { /* 536 */ + 0x8e77779b, 0xe45d6ebf, 0x5f1f6fcf, 0xfedfe07f, + 0x01fed7db, 0xfb7bff00, 0x1fdfffd4, 0xfffff800, + } }, + { { /* 537 */ + 0x007bfb8f, 0x7f5cbf00, 0x07f3ffff, 0x3de7eba0, + 0xfbd7f7bf, 0x6003ffbf, 0xbfedfffd, 0x027fefbb, + } }, + { { /* 538 */ + 0xddfdfe40, 0xe2f9fdff, 0xfb1f680b, 0xaffdfbe3, + 0xf7ed9fa4, 0xf80f7a7d, 0x0fd5eebe, 0xfd9fbb5d, + } }, + { { /* 539 */ + 0x3bf9f2db, 0xebccfe7f, 0x73fa876a, 0x9ffc95fc, + 0xfaf7109f, 0xbbcdddb7, 0xeccdf87e, 0x3c3ff366, + } }, + { { /* 540 */ + 0xb03ffffd, 0x067ee9f7, 0xfe0696ae, 0x5fd7d576, + 0xa3f33fd1, 0x6fb7cf07, 0x7f449fd1, 0xd3dd7b59, + } }, + { { /* 541 */ + 0xa9bdaf3b, 0xff3a7dcf, 0xf6ebfbe0, 0xffffb401, + 0xb7bf7afa, 0x0ffdc000, 0xff1fff7f, 0x95fffefc, + } }, + { { /* 542 */ + 0xb5dc0000, 0x3f3eef63, 0x001bfb7f, 0xfbf6e800, + 0xb8df9eef, 0x003fff9f, 0xf5ff7bd0, 0x3fffdfdb, + } }, + { { /* 543 */ + 0x00bffdf0, 0xbbbd8420, 0xffdedf37, 0x0ff3ff6d, + 0x5efb604c, 0xfafbfffb, 0x0219fe5e, 0xf9de79f4, + } }, + { { /* 544 */ + 0xebfaa7f7, 0xff3401eb, 0xef73ebd3, 0xc040afd7, + 0xdcff72bb, 0x2fd8f17f, 0xfe0bb8ec, 0x1f0bdda3, + } }, + { { /* 545 */ + 0x47cf8f1d, 0xffdeb12b, 0xda737fee, 0xcbc424ff, + 0xcbf2f75d, 0xb4edecfd, 0x4dddbff9, 0xfb8d99dd, + } }, + { { /* 546 */ + 0xaf7bbb7f, 0xc959ddfb, 0xfab5fc4f, 0x6d5fafe3, + 0x3f7dffff, 0xffdb7800, 0x7effb6ff, 0x022ffbaf, + } }, + { { /* 547 */ + 0xefc7ff9b, 0xffffffa5, 0xc7000007, 0xfff1f7ff, + 0x01bf7ffd, 0xfdbcdc00, 0xffffbff5, 0x3effff7f, + } }, + { { /* 548 */ + 0xbe000029, 0xff7ff9ff, 0xfd7e6efb, 0x039ecbff, + 0xfbdde300, 0xf6dfccff, 0x117fffff, 0xfbf6f800, + } }, + { { /* 549 */ + 0xd73ce7ef, 0xdfeffeef, 0xedbfc00b, 0xfdcdfedf, + 0x40fd7bf5, 0xb75fffff, 0xf930ffdf, 0xdc97fbdf, + } }, + { { /* 550 */ + 0xbff2fef3, 0xdfbf8fdf, 0xede6177f, 0x35530f7f, + 0x877e447c, 0x45bbfa12, 0x779eede0, 0xbfd98017, + } }, + { { /* 551 */ + 0xde897e55, 0x0447c16f, 0xf75d7ade, 0x290557ff, + 0xfe9586f7, 0xf32f97b3, 0x9f75cfff, 0xfb1771f7, + } }, + { { /* 552 */ + 0xee1934ee, 0xef6137cc, 0xef4c9fd6, 0xfbddd68f, + 0x6def7b73, 0xa431d7fe, 0x97d75e7f, 0xffd80f5b, + } }, + { { /* 553 */ + 0x7bce9d83, 0xdcff22ec, 0xef87763d, 0xfdeddfe7, + 0xa0fc4fff, 0xdbfc3b77, 0x7fdc3ded, 0xf5706fa9, + } }, + { { /* 554 */ + 0x2c403ffb, 0x847fff7f, 0xdeb7ec57, 0xf22fe69c, + 0xd5b50feb, 0xede7afeb, 0xfff08c2f, 0xe8f0537f, + } }, + { { /* 555 */ + 0xb5ffb99d, 0xe78fff66, 0xbe10d981, 0xe3c19c7c, + 0x27339cd1, 0xff6d0cbc, 0xefb7fcb7, 0xffffa0df, + } }, + { { /* 556 */ + 0xfe7bbf0b, 0x353fa3ff, 0x97cd13cc, 0xfb277637, + 0x7e6ccfd6, 0xed31ec50, 0xfc1c677c, 0x5fbff6fa, + } }, + { { /* 557 */ + 0xae2f0fba, 0x7ffea3ad, 0xde74fcf0, 0xf200ffef, + 0xfea2fbbf, 0xbcff3daf, 0x5fb9f694, 0x3f8ff3ad, + } }, + { { /* 558 */ + 0xa01ff26c, 0x01bfffef, 0x70057728, 0xda03ff35, + 0xc7fad2f9, 0x5c1d3fbf, 0xec33ff3a, 0xfe9cb7af, + } }, + { { /* 559 */ + 0x7a9f5236, 0xe722bffa, 0xfcff9ff7, 0xb61d2fbb, + 0x1dfded06, 0xefdf7dd7, 0xf166eb23, 0x0dc07ed9, + } }, + { { /* 560 */ + 0xdfbf3d3d, 0xba83c945, 0x9dd07dd1, 0xcf737b87, + 0xc3f59ff3, 0xc5fedf0d, 0x83020cb3, 0xaec0e879, + } }, + { { /* 561 */ + 0x6f0fc773, 0x093ffd7d, 0x0157fff1, 0x01ff62fb, + 0x3bf3fdb4, 0x43b2b013, 0xff305ed3, 0xeb9f0fff, + } }, + { { /* 562 */ + 0xf203feef, 0xfb893fef, 0x9e9937a9, 0xa72cdef9, + 0xc1f63733, 0xfe3e812e, 0xf2f75d20, 0x69d7d585, + } }, + { { /* 563 */ + 0xffffffff, 0xff6fdb07, 0xd97fc4ff, 0xbe0fefce, + 0xf05ef17b, 0xffb7f6cf, 0xef845ef7, 0x0edfd7cb, + } }, + { { /* 564 */ + 0xfcffff08, 0xffffee3f, 0xd7ff13ff, 0x7ffdaf0f, + 0x1ffabdc7, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 565 */ + 0x00000000, 0xe7400000, 0xf933bd38, 0xfeed7feb, + 0x7c767fe8, 0xffefb3f7, 0xd8b7feaf, 0xfbbfff6f, + } }, + { { /* 566 */ + 0xdbf7f8fb, 0xe2f91752, 0x754785c8, 0xe3ef9090, + 0x3f6d9ef4, 0x0536ee2e, 0x7ff3f7bc, 0x7f3fa07b, + } }, + { { /* 567 */ + 0xeb600567, 0x6601babe, 0x583ffcd8, 0x87dfcaf7, + 0xffa0bfcd, 0xfebf5bcd, 0xefa7b6fd, 0xdf9c77ef, + } }, + { { /* 568 */ + 0xf8773fb7, 0xb7fc9d27, 0xdfefcab5, 0xf1b6fb5a, + 0xef1fec39, 0x7ffbfbbf, 0xdafe000d, 0x4e7fbdfb, + } }, + { { /* 569 */ + 0x5ac033ff, 0x9ffebff5, 0x005fffbf, 0xfdf80000, + 0x6ffdffca, 0xa001cffd, 0xfbf2dfff, 0xff7fdfbf, + } }, + { { /* 570 */ + 0x080ffeda, 0xbfffba08, 0xeed77afd, 0x67f9fbeb, + 0xff93e044, 0x9f57df97, 0x08dffef7, 0xfedfdf80, + } }, + { { /* 571 */ + 0xf7feffc5, 0x6803fffb, 0x6bfa67fb, 0x5fe27fff, + 0xff73ffff, 0xe7fb87df, 0xf7a7ebfd, 0xefc7bf7e, + } }, + { { /* 572 */ + 0xdf821ef3, 0xdf7e76ff, 0xda7d79c9, 0x1e9befbe, + 0x77fb7ce0, 0xfffb87be, 0xffdb1bff, 0x4fe03f5c, + } }, + { { /* 573 */ + 0x5f0e7fff, 0xddbf77ff, 0xfffff04f, 0x0ff8ffff, + 0xfddfa3be, 0xfffdfc1c, 0xfb9e1f7d, 0xdedcbdff, + } }, + { { /* 574 */ + 0xbafb3f6f, 0xfbefdf7f, 0x2eec7d1b, 0xf2f7af8e, + 0xcfee7b0f, 0x77c61d96, 0xfff57e07, 0x7fdfd982, + } }, + { { /* 575 */ + 0xc7ff5ee6, 0x79effeee, 0xffcf9a56, 0xde5efe5f, + 0xf9e8896e, 0xe6c4f45e, 0xbe7c0001, 0xdddf3b7f, + } }, + { { /* 576 */ + 0xe9efd59d, 0xde5334ac, 0x4bf7f573, 0x9eff7b4f, + 0x476eb8fe, 0xff450dfb, 0xfbfeabfd, 0xddffe9d7, + } }, + { { /* 577 */ + 0x7fffedf7, 0x7eebddfd, 0xb7ffcfe7, 0xef91bde9, + 0xd77c5d75, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 578 */ + 0x00000000, 0xfa800000, 0xb4f1ffee, 0x2fefbf76, + 0x77bfb677, 0xfffd9fbf, 0xf6ae95bf, 0x7f3b75ff, + } }, + { { /* 579 */ + 0x0af9a7f5, 0x00000000, 0x00000000, 0x2bddfbd0, + 0x9a7ff633, 0xd6fcfdab, 0xbfebf9e6, 0xf41fdfdf, + } }, + { { /* 580 */ + 0xffffa6fd, 0xf37b4aff, 0xfef97fb7, 0x1d5cb6ff, + 0xe5ff7ff6, 0x24041f7b, 0xf99ebe05, 0xdff2dbe3, + } }, + { { /* 581 */ + 0xfdff6fef, 0xcbfcd679, 0xefffebfd, 0x0000001f, + 0x98000000, 0x8017e148, 0x00fe6a74, 0xfdf16d7f, + } }, + { { /* 582 */ + 0xfef3b87f, 0xf176e01f, 0x7b3fee96, 0xfffdeb8d, + 0xcbb3adff, 0xe17f84ef, 0xbff04daa, 0xfe3fbf3f, + } }, + { { /* 583 */ + 0xffd7ebff, 0xcf7fffdf, 0x85edfffb, 0x07bcd73f, + 0xfe0faeff, 0x76bffdaf, 0x37bbfaef, 0xa3ba7fdc, + } }, + { { /* 584 */ + 0x56f7b6ff, 0xe7df60f8, 0x4cdfff61, 0xff45b0fb, + 0x3ffa7ded, 0x18fc1fff, 0xe3afffff, 0xdf83c7d3, + } }, + { { /* 585 */ + 0xef7dfb57, 0x1378efff, 0x5ff7fec0, 0x5ee334bb, + 0xeff6f70d, 0x00bfd7fe, 0xf7f7f59d, 0xffe051de, + } }, + { { /* 586 */ + 0x037ffec9, 0xbfef5f01, 0x60a79ff1, 0xf1ffef1d, + 0x0000000f, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 587 */ + 0x00000000, 0x00000000, 0x00000000, 0x3c800000, + 0xd91ffb4d, 0xfee37b3a, 0xdc7f3fe9, 0x0000003f, + } }, + { { /* 588 */ + 0x50000000, 0xbe07f51f, 0xf91bfc1d, 0x71ffbc1e, + 0x5bbe6ff9, 0x9b1b5796, 0xfffc7fff, 0xafe7872e, + } }, + { { /* 589 */ + 0xf34febf5, 0xe725dffd, 0x5d440bdc, 0xfddd5747, + 0x7790ed3f, 0x8ac87d7f, 0xf3f9fafa, 0xef4b202a, + } }, + { { /* 590 */ + 0x79cff5ff, 0x0ba5abd3, 0xfb8ff77a, 0x001f8ebd, + 0x00000000, 0xfd4ef300, 0x88001a57, 0x7654aeac, + } }, + { { /* 591 */ + 0xcdff17ad, 0xf42fffb2, 0xdbff5baa, 0x00000002, + 0x73c00000, 0x2e3ff9ea, 0xbbfffa8e, 0xffd376bc, + } }, + { { /* 592 */ + 0x7e72eefe, 0xe7f77ebd, 0xcefdf77f, 0x00000ff5, + 0x00000000, 0xdb9ba900, 0x917fa4c7, 0x7ecef8ca, + } }, + { { /* 593 */ + 0xc7e77d7a, 0xdcaecbbd, 0x8f76fd7e, 0x7cf391d3, + 0x4c2f01e5, 0xa360ed77, 0x5ef807db, 0x21811df7, + } }, + { { /* 594 */ + 0x309c6be0, 0xfade3b3a, 0xc3f57f53, 0x07ba61cd, + 0x00000000, 0x00000000, 0x00000000, 0xbefe26e0, + } }, + { { /* 595 */ + 0xebb503f9, 0xe9cbe36d, 0xbfde9c2f, 0xabbf9f83, + 0xffd51ff7, 0xdffeb7df, 0xffeffdae, 0xeffdfb7e, + } }, + { { /* 596 */ + 0x6ebfaaff, 0x00000000, 0x00000000, 0xb6200000, + 0xbe9e7fcd, 0x58f162b3, 0xfd7bf10d, 0xbefde9f1, + } }, + { { /* 597 */ + 0x5f6dc6c3, 0x69ffff3d, 0xfbf4ffcf, 0x4ff7dcfb, + 0x11372000, 0x00000015, 0x00000000, 0x00000000, + } }, + { { /* 598 */ + 0x00003000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, +}; + +#define L(n) ((FcCharLeaf *) &leaves[n]) + +static const FcCharLeaf *leaves_aa[1] = { + L( 0), +}; + +static const FcChar16 numbers_aa[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_ab[1] = { + L( 1), +}; + +static const FcChar16 numbers_ab[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_af[2] = { + L( 2), L( 3), +}; + +static const FcChar16 numbers_af[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_am[2] = { + L( 4), L( 5), +}; + +static const FcChar16 numbers_am[2] = { + 0x0012, 0x0013, +}; + +static const FcCharLeaf *leaves_ar[1] = { + L( 6), +}; + +static const FcChar16 numbers_ar[1] = { + 0x00fe, +}; + +static const FcCharLeaf *leaves_ast[1] = { + L( 7), +}; + +static const FcChar16 numbers_ast[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_ava[1] = { + L( 8), +}; + +static const FcChar16 numbers_ava[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_ay[1] = { + L( 9), +}; + +static const FcChar16 numbers_ay[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_az[4] = { + L( 10), L( 11), L( 12), L( 13), +}; + +static const FcChar16 numbers_az[4] = { + 0x0000, 0x0001, 0x0002, 0x0004, +}; + +static const FcCharLeaf *leaves_ba[1] = { + L( 14), +}; + +static const FcChar16 numbers_ba[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_bam[3] = { + L( 15), L( 16), L( 17), +}; + +static const FcChar16 numbers_bam[3] = { + 0x0000, 0x0001, 0x0002, +}; + +static const FcCharLeaf *leaves_be[1] = { + L( 18), +}; + +static const FcChar16 numbers_be[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_bg[1] = { + L( 19), +}; + +static const FcChar16 numbers_bg[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_bh[1] = { + L( 20), +}; + +static const FcChar16 numbers_bh[1] = { + 0x0009, +}; + +static const FcCharLeaf *leaves_bi[1] = { + L( 21), +}; + +static const FcChar16 numbers_bi[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_bin[3] = { + L( 22), L( 23), L( 24), +}; + +static const FcChar16 numbers_bin[3] = { + 0x0000, 0x0003, 0x001e, +}; + +static const FcCharLeaf *leaves_bn[1] = { + L( 25), +}; + +static const FcChar16 numbers_bn[1] = { + 0x0009, +}; + +static const FcCharLeaf *leaves_bo[1] = { + L( 26), +}; + +static const FcChar16 numbers_bo[1] = { + 0x000f, +}; + +static const FcCharLeaf *leaves_br[1] = { + L( 27), +}; + +static const FcChar16 numbers_br[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_bs[2] = { + L( 15), L( 28), +}; + +static const FcChar16 numbers_bs[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_bua[1] = { + L( 29), +}; + +static const FcChar16 numbers_bua[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_ca[2] = { + L( 30), L( 31), +}; + +static const FcChar16 numbers_ca[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_ch[1] = { + L( 32), +}; + +static const FcChar16 numbers_ch[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_chm[1] = { + L( 33), +}; + +static const FcChar16 numbers_chm[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_chr[1] = { + L( 34), +}; + +static const FcChar16 numbers_chr[1] = { + 0x0013, +}; + +static const FcCharLeaf *leaves_co[2] = { + L( 35), L( 36), +}; + +static const FcChar16 numbers_co[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_cs[2] = { + L( 37), L( 38), +}; + +static const FcChar16 numbers_cs[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_cu[1] = { + L( 39), +}; + +static const FcChar16 numbers_cu[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_cv[2] = { + L( 40), L( 41), +}; + +static const FcChar16 numbers_cv[2] = { + 0x0001, 0x0004, +}; + +static const FcCharLeaf *leaves_cy[3] = { + L( 42), L( 43), L( 44), +}; + +static const FcChar16 numbers_cy[3] = { + 0x0000, 0x0001, 0x001e, +}; + +static const FcCharLeaf *leaves_da[1] = { + L( 45), +}; + +static const FcChar16 numbers_da[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_de[1] = { + L( 46), +}; + +static const FcChar16 numbers_de[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_el[1] = { + L( 47), +}; + +static const FcChar16 numbers_el[1] = { + 0x0003, +}; + +static const FcCharLeaf *leaves_en[1] = { + L( 48), +}; + +static const FcChar16 numbers_en[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_eo[2] = { + L( 15), L( 49), +}; + +static const FcChar16 numbers_eo[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_es[1] = { + L( 50), +}; + +static const FcChar16 numbers_es[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_et[2] = { + L( 51), L( 52), +}; + +static const FcChar16 numbers_et[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_eu[1] = { + L( 53), +}; + +static const FcChar16 numbers_eu[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_fa[2] = { + L( 54), L( 55), +}; + +static const FcChar16 numbers_fa[2] = { + 0x00fb, 0x00fe, +}; + +static const FcCharLeaf *leaves_fi[2] = { + L( 56), L( 52), +}; + +static const FcChar16 numbers_fi[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_fj[1] = { + L( 15), +}; + +static const FcChar16 numbers_fj[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_fo[1] = { + L( 57), +}; + +static const FcChar16 numbers_fo[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_ful[3] = { + L( 15), L( 58), L( 59), +}; + +static const FcChar16 numbers_ful[3] = { + 0x0000, 0x0001, 0x0002, +}; + +static const FcCharLeaf *leaves_fur[1] = { + L( 60), +}; + +static const FcChar16 numbers_fur[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_fy[1] = { + L( 61), +}; + +static const FcChar16 numbers_fy[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_ga[3] = { + L( 62), L( 63), L( 64), +}; + +static const FcChar16 numbers_ga[3] = { + 0x0000, 0x0001, 0x001e, +}; + +static const FcCharLeaf *leaves_gd[1] = { + L( 65), +}; + +static const FcChar16 numbers_gd[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_gn[3] = { + L( 66), L( 67), L( 68), +}; + +static const FcChar16 numbers_gn[3] = { + 0x0000, 0x0001, 0x001e, +}; + +static const FcCharLeaf *leaves_gu[1] = { + L( 69), +}; + +static const FcChar16 numbers_gu[1] = { + 0x000a, +}; + +static const FcCharLeaf *leaves_gv[1] = { + L( 70), +}; + +static const FcChar16 numbers_gv[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_ha[3] = { + L( 15), L( 71), L( 72), +}; + +static const FcChar16 numbers_ha[3] = { + 0x0000, 0x0001, 0x0002, +}; + +static const FcCharLeaf *leaves_haw[3] = { + L( 15), L( 73), L( 74), +}; + +static const FcChar16 numbers_haw[3] = { + 0x0000, 0x0001, 0x0002, +}; + +static const FcCharLeaf *leaves_he[1] = { + L( 75), +}; + +static const FcChar16 numbers_he[1] = { + 0x0005, +}; + +static const FcCharLeaf *leaves_hu[2] = { + L( 76), L( 77), +}; + +static const FcChar16 numbers_hu[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_hy[1] = { + L( 78), +}; + +static const FcChar16 numbers_hy[1] = { + 0x0005, +}; + +static const FcCharLeaf *leaves_ibo[2] = { + L( 15), L( 79), +}; + +static const FcChar16 numbers_ibo[2] = { + 0x0000, 0x001e, +}; + +static const FcCharLeaf *leaves_id[1] = { + L( 80), +}; + +static const FcChar16 numbers_id[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_ik[1] = { + L( 81), +}; + +static const FcChar16 numbers_ik[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_is[1] = { + L( 82), +}; + +static const FcChar16 numbers_is[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_it[1] = { + L( 83), +}; + +static const FcChar16 numbers_it[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_iu[3] = { + L( 84), L( 85), L( 86), +}; + +static const FcChar16 numbers_iu[3] = { + 0x0014, 0x0015, 0x0016, +}; + +static const FcCharLeaf *leaves_ja[84] = { + L( 87), L( 88), L( 89), L( 90), L( 91), L( 92), L( 93), L( 94), + L( 95), L( 96), L( 97), L( 98), L( 99), L(100), L(101), L(102), + L(103), L(104), L(105), L(106), L(107), L(108), L(109), L(110), + L(111), L(112), L(113), L(114), L(115), L(116), L(117), L(118), + L(119), L(120), L(121), L(122), L(123), L(124), L(125), L(126), + L(127), L(128), L(129), L(130), L(131), L(132), L(133), L(134), + L(135), L(136), L(137), L(138), L(139), L(140), L(141), L(142), + L(143), L(144), L(145), L(146), L(147), L(148), L(149), L(150), + L(151), L(152), L(153), L(154), L(155), L(156), L(157), L(158), + L(159), L(160), L(161), L(162), L(163), L(164), L(165), L(166), + L(167), L(168), L(169), L(170), +}; + +static const FcChar16 numbers_ja[84] = { + 0x0030, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, + 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, + 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, + 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, + 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, + 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, + 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, + 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, + 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, + 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, + 0x009d, 0x009e, 0x009f, 0x00ff, +}; + +static const FcCharLeaf *leaves_ka[2] = { + L(171), L(172), +}; + +static const FcChar16 numbers_ka[2] = { + 0x0005, 0x0010, +}; + +static const FcCharLeaf *leaves_kaa[1] = { + L(173), +}; + +static const FcChar16 numbers_kaa[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_ki[2] = { + L( 15), L(174), +}; + +static const FcChar16 numbers_ki[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_kk[1] = { + L(175), +}; + +static const FcChar16 numbers_kk[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_kl[2] = { + L(176), L(177), +}; + +static const FcChar16 numbers_kl[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_km[1] = { + L(178), +}; + +static const FcChar16 numbers_km[1] = { + 0x0017, +}; + +static const FcCharLeaf *leaves_kn[1] = { + L(179), +}; + +static const FcChar16 numbers_kn[1] = { + 0x000c, +}; + +static const FcCharLeaf *leaves_ko[129] = { + L(180), L(181), L(182), L(183), L(184), L(185), L(186), L(187), + L(188), L(189), L(190), L(191), L(192), L(193), L(194), L(195), + L(196), L(197), L(198), L(199), L(200), L(201), L(202), L(203), + L(204), L(205), L(206), L(207), L(208), L(209), L(210), L(211), + L(212), L(213), L(214), L(215), L(216), L(217), L(218), L(219), + L(220), L(221), L(222), L(223), L(224), L(225), L(226), L(227), + L(228), L(229), L(230), L(231), L(232), L(233), L(234), L(235), + L(236), L(237), L(238), L(239), L(240), L(241), L(242), L(243), + L(244), L(245), L(246), L(247), L(248), L(249), L(250), L(251), + L(252), L(253), L(254), L(255), L(256), L(257), L(258), L(259), + L(260), L(261), L(262), L(263), L(263), L(263), L(263), L(263), + L(263), L(263), L(263), L(263), L(263), L(263), L(263), L(263), + L(263), L(263), L(263), L(263), L(263), L(263), L(263), L(263), + L(263), L(263), L(263), L(263), L(263), L(263), L(263), L(263), + L(263), L(263), L(263), L(263), L(263), L(263), L(263), L(263), + L(263), L(263), L(263), L(263), L(263), L(263), L(264), L(263), + L(265), +}; + +static const FcChar16 numbers_ko[129] = { + 0x0031, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, + 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, + 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, + 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, + 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, + 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, + 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, + 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, + 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, + 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, + 0x009d, 0x009e, 0x009f, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, + 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, + 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x00c0, + 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, + 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x00d0, + 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00f9, + 0x00fa, +}; + +static const FcCharLeaf *leaves_ku[2] = { + L(266), L(267), +}; + +static const FcChar16 numbers_ku[2] = { + 0x0000, 0x0004, +}; + +static const FcCharLeaf *leaves_kum[1] = { + L(268), +}; + +static const FcChar16 numbers_kum[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_kv[1] = { + L(269), +}; + +static const FcChar16 numbers_kv[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_kw[3] = { + L( 15), L( 73), L(270), +}; + +static const FcChar16 numbers_kw[3] = { + 0x0000, 0x0001, 0x0002, +}; + +static const FcCharLeaf *leaves_ky[1] = { + L(271), +}; + +static const FcChar16 numbers_ky[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_la[2] = { + L( 15), L(272), +}; + +static const FcChar16 numbers_la[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_lb[1] = { + L(273), +}; + +static const FcChar16 numbers_lb[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_lo[1] = { + L(274), +}; + +static const FcChar16 numbers_lo[1] = { + 0x000e, +}; + +static const FcCharLeaf *leaves_lt[2] = { + L( 15), L(275), +}; + +static const FcChar16 numbers_lt[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_lv[2] = { + L( 15), L(276), +}; + +static const FcChar16 numbers_lv[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_mg[1] = { + L(277), +}; + +static const FcChar16 numbers_mg[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_mh[2] = { + L( 15), L(278), +}; + +static const FcChar16 numbers_mh[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_mi[3] = { + L( 15), L( 73), L(279), +}; + +static const FcChar16 numbers_mi[3] = { + 0x0000, 0x0001, 0x001e, +}; + +static const FcCharLeaf *leaves_mk[1] = { + L(280), +}; + +static const FcChar16 numbers_mk[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_ml[1] = { + L(281), +}; + +static const FcChar16 numbers_ml[1] = { + 0x000d, +}; + +static const FcCharLeaf *leaves_mn[1] = { + L(282), +}; + +static const FcChar16 numbers_mn[1] = { + 0x0018, +}; + +static const FcCharLeaf *leaves_mo[4] = { + L(283), L( 40), L(284), L(268), +}; + +static const FcChar16 numbers_mo[4] = { + 0x0000, 0x0001, 0x0002, 0x0004, +}; + +static const FcCharLeaf *leaves_mt[2] = { + L(285), L(286), +}; + +static const FcChar16 numbers_mt[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_my[1] = { + L(287), +}; + +static const FcChar16 numbers_my[1] = { + 0x0010, +}; + +static const FcCharLeaf *leaves_nb[1] = { + L(288), +}; + +static const FcChar16 numbers_nb[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_nl[1] = { + L(289), +}; + +static const FcChar16 numbers_nl[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_nn[1] = { + L(290), +}; + +static const FcChar16 numbers_nn[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_ny[2] = { + L( 15), L(291), +}; + +static const FcChar16 numbers_ny[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_oc[1] = { + L(292), +}; + +static const FcChar16 numbers_oc[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_or[1] = { + L(293), +}; + +static const FcChar16 numbers_or[1] = { + 0x000b, +}; + +static const FcCharLeaf *leaves_pl[2] = { + L(294), L(295), +}; + +static const FcChar16 numbers_pl[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_pt[1] = { + L(296), +}; + +static const FcChar16 numbers_pt[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_rm[1] = { + L(297), +}; + +static const FcChar16 numbers_rm[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_ro[3] = { + L(283), L( 40), L(284), +}; + +static const FcChar16 numbers_ro[3] = { + 0x0000, 0x0001, 0x0002, +}; + +static const FcCharLeaf *leaves_ru[1] = { + L(298), +}; + +static const FcChar16 numbers_ru[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_sah[1] = { + L(299), +}; + +static const FcChar16 numbers_sah[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_sco[3] = { + L( 15), L(300), L(301), +}; + +static const FcChar16 numbers_sco[3] = { + 0x0000, 0x0001, 0x0002, +}; + +static const FcCharLeaf *leaves_se[2] = { + L(302), L(303), +}; + +static const FcChar16 numbers_se[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_sh[1] = { + L(304), +}; + +static const FcChar16 numbers_sh[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_si[1] = { + L(305), +}; + +static const FcChar16 numbers_si[1] = { + 0x000d, +}; + +static const FcCharLeaf *leaves_sk[2] = { + L(306), L(307), +}; + +static const FcChar16 numbers_sk[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_sm[2] = { + L( 15), L( 74), +}; + +static const FcChar16 numbers_sm[2] = { + 0x0000, 0x0002, +}; + +static const FcCharLeaf *leaves_sma[1] = { + L(308), +}; + +static const FcChar16 numbers_sma[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_smj[1] = { + L(309), +}; + +static const FcChar16 numbers_smj[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_smn[2] = { + L(310), L(311), +}; + +static const FcChar16 numbers_smn[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_sms[3] = { + L(312), L(313), L(314), +}; + +static const FcChar16 numbers_sms[3] = { + 0x0000, 0x0001, 0x0002, +}; + +static const FcCharLeaf *leaves_sq[1] = { + L(315), +}; + +static const FcChar16 numbers_sq[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_sv[1] = { + L(316), +}; + +static const FcChar16 numbers_sv[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_syr[1] = { + L(317), +}; + +static const FcChar16 numbers_syr[1] = { + 0x0007, +}; + +static const FcCharLeaf *leaves_ta[1] = { + L(318), +}; + +static const FcChar16 numbers_ta[1] = { + 0x000b, +}; + +static const FcCharLeaf *leaves_te[1] = { + L(319), +}; + +static const FcChar16 numbers_te[1] = { + 0x000c, +}; + +static const FcCharLeaf *leaves_tg[1] = { + L(320), +}; + +static const FcChar16 numbers_tg[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_th[1] = { + L(321), +}; + +static const FcChar16 numbers_th[1] = { + 0x000e, +}; + +static const FcCharLeaf *leaves_tk[1] = { + L(322), +}; + +static const FcChar16 numbers_tk[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_tl[1] = { + L(323), +}; + +static const FcChar16 numbers_tl[1] = { + 0x0017, +}; + +static const FcCharLeaf *leaves_tn[1] = { + L(324), +}; + +static const FcChar16 numbers_tn[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_tr[2] = { + L(325), L(326), +}; + +static const FcChar16 numbers_tr[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_tt[1] = { + L(327), +}; + +static const FcChar16 numbers_tt[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_tw[5] = { + L(328), L(329), L(330), L(331), L(332), +}; + +static const FcChar16 numbers_tw[5] = { + 0x0000, 0x0001, 0x0002, 0x0003, 0x001e, +}; + +static const FcCharLeaf *leaves_uk[1] = { + L(333), +}; + +static const FcChar16 numbers_uk[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_uz[1] = { + L(334), +}; + +static const FcChar16 numbers_uz[1] = { + 0x0004, +}; + +static const FcCharLeaf *leaves_ven[2] = { + L( 15), L(335), +}; + +static const FcChar16 numbers_ven[2] = { + 0x0000, 0x001e, +}; + +static const FcCharLeaf *leaves_vi[4] = { + L(336), L(337), L(338), L(339), +}; + +static const FcChar16 numbers_vi[4] = { + 0x0000, 0x0001, 0x0003, 0x001e, +}; + +static const FcCharLeaf *leaves_vo[1] = { + L(340), +}; + +static const FcChar16 numbers_vo[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_vot[2] = { + L(341), L( 52), +}; + +static const FcChar16 numbers_vot[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_wa[1] = { + L(342), +}; + +static const FcChar16 numbers_wa[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_wen[2] = { + L(294), L(343), +}; + +static const FcChar16 numbers_wen[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_wo[2] = { + L(344), L(345), +}; + +static const FcChar16 numbers_wo[2] = { + 0x0000, 0x0001, +}; + +static const FcCharLeaf *leaves_yap[1] = { + L(346), +}; + +static const FcChar16 numbers_yap[1] = { + 0x0000, +}; + +static const FcCharLeaf *leaves_yo[4] = { + L(347), L(348), L(349), L(350), +}; + +static const FcChar16 numbers_yo[4] = { + 0x0000, 0x0001, 0x0003, 0x001e, +}; + +static const FcCharLeaf *leaves_zh_cn[82] = { + L(351), L(352), L(353), L(354), L(355), L(356), L(357), L(358), + L(359), L(360), L(361), L(362), L(363), L(364), L(365), L(366), + L(367), L(368), L(369), L(370), L(371), L(372), L(373), L(374), + L(375), L(376), L(377), L(378), L(379), L(380), L(381), L(382), + L(383), L(384), L(385), L(386), L(387), L(388), L(389), L(390), + L(391), L(392), L(393), L(394), L(395), L(396), L(397), L(398), + L(399), L(400), L(401), L(402), L(403), L(404), L(405), L(406), + L(407), L(408), L(409), L(410), L(411), L(412), L(413), L(414), + L(415), L(416), L(417), L(418), L(419), L(420), L(421), L(422), + L(423), L(424), L(425), L(426), L(427), L(428), L(429), L(430), + L(431), L(432), +}; + +static const FcChar16 numbers_zh_cn[82] = { + 0x0002, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, + 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, + 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, + 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, + 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, + 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, + 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, + 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, + 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, + 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, + 0x009e, 0x009f, +}; + +static const FcCharLeaf *leaves_zh_hk[83] = { + L(433), L(434), L(435), L(436), L(437), L(438), L(439), L(440), + L(441), L(442), L(443), L(444), L(445), L(446), L(447), L(448), + L(449), L(450), L(451), L(452), L(453), L(454), L(455), L(456), + L(457), L(458), L(459), L(460), L(461), L(462), L(463), L(464), + L(465), L(466), L(467), L(468), L(469), L(470), L(471), L(472), + L(473), L(474), L(475), L(476), L(477), L(478), L(479), L(480), + L(481), L(482), L(483), L(484), L(485), L(486), L(487), L(488), + L(489), L(490), L(491), L(492), L(493), L(494), L(495), L(496), + L(497), L(498), L(499), L(500), L(501), L(502), L(503), L(504), + L(505), L(506), L(507), L(508), L(509), L(510), L(511), L(512), + L(513), L(514), L(515), +}; + +static const FcChar16 numbers_zh_hk[83] = { + 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, + 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, + 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, + 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, + 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, + 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, + 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, + 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, + 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, + 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, + 0x009e, 0x009f, 0x00f9, +}; + +static const FcCharLeaf *leaves_zh_mo[83] = { + L(516), L(517), L(518), L(519), L(520), L(521), L(522), L(523), + L(524), L(525), L(526), L(527), L(528), L(529), L(530), L(531), + L(532), L(533), L(534), L(535), L(536), L(537), L(538), L(539), + L(540), L(541), L(542), L(543), L(544), L(545), L(546), L(547), + L(548), L(549), L(550), L(551), L(552), L(553), L(554), L(555), + L(556), L(557), L(558), L(559), L(560), L(561), L(562), L(563), + L(564), L(565), L(566), L(567), L(568), L(569), L(570), L(571), + L(572), L(573), L(574), L(575), L(576), L(577), L(578), L(579), + L(580), L(581), L(582), L(583), L(584), L(585), L(586), L(587), + L(588), L(589), L(590), L(591), L(592), L(593), L(594), L(595), + L(596), L(597), L(598), +}; + +static const FcChar16 numbers_zh_mo[83] = { + 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, + 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, + 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, + 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, + 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, + 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, + 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, + 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, + 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, + 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, + 0x009e, 0x009f, 0x00fa, +}; + +#undef L + +static const FcLangCharSet fcLangCharSets[] = { + { (FcChar8 *) "aa", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_aa, (FcChar16 *) numbers_aa } }, + { (FcChar8 *) "ab", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ab, (FcChar16 *) numbers_ab } }, + { (FcChar8 *) "af", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_af, (FcChar16 *) numbers_af } }, + { (FcChar8 *) "am", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } }, + { (FcChar8 *) "ar", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ar, (FcChar16 *) numbers_ar } }, + { (FcChar8 *) "ast", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ast, (FcChar16 *) numbers_ast } }, + { (FcChar8 *) "ava", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ava, (FcChar16 *) numbers_ava } }, + { (FcChar8 *) "ay", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ay, (FcChar16 *) numbers_ay } }, + { (FcChar8 *) "az", + { FC_REF_CONSTANT, 4, (FcCharLeaf **) leaves_az, (FcChar16 *) numbers_az } }, + { (FcChar8 *) "ba", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ba, (FcChar16 *) numbers_ba } }, + { (FcChar8 *) "bam", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_bam, (FcChar16 *) numbers_bam } }, + { (FcChar8 *) "be", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_be, (FcChar16 *) numbers_be } }, + { (FcChar8 *) "bg", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bg, (FcChar16 *) numbers_bg } }, + { (FcChar8 *) "bh", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } }, + { (FcChar8 *) "bho", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } }, + { (FcChar8 *) "bi", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bi, (FcChar16 *) numbers_bi } }, + { (FcChar8 *) "bin", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_bin, (FcChar16 *) numbers_bin } }, + { (FcChar8 *) "bn", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bn, (FcChar16 *) numbers_bn } }, + { (FcChar8 *) "bo", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bo, (FcChar16 *) numbers_bo } }, + { (FcChar8 *) "br", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_br, (FcChar16 *) numbers_br } }, + { (FcChar8 *) "bs", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_bs, (FcChar16 *) numbers_bs } }, + { (FcChar8 *) "bua", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bua, (FcChar16 *) numbers_bua } }, + { (FcChar8 *) "ca", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ca, (FcChar16 *) numbers_ca } }, + { (FcChar8 *) "ce", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ava, (FcChar16 *) numbers_ava } }, + { (FcChar8 *) "ch", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ch, (FcChar16 *) numbers_ch } }, + { (FcChar8 *) "chm", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_chm, (FcChar16 *) numbers_chm } }, + { (FcChar8 *) "chr", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_chr, (FcChar16 *) numbers_chr } }, + { (FcChar8 *) "co", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_co, (FcChar16 *) numbers_co } }, + { (FcChar8 *) "cs", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_cs, (FcChar16 *) numbers_cs } }, + { (FcChar8 *) "cu", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_cu, (FcChar16 *) numbers_cu } }, + { (FcChar8 *) "cv", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_cv, (FcChar16 *) numbers_cv } }, + { (FcChar8 *) "cy", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_cy, (FcChar16 *) numbers_cy } }, + { (FcChar8 *) "da", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_da, (FcChar16 *) numbers_da } }, + { (FcChar8 *) "de", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_de, (FcChar16 *) numbers_de } }, + { (FcChar8 *) "dz", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bo, (FcChar16 *) numbers_bo } }, + { (FcChar8 *) "el", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_el, (FcChar16 *) numbers_el } }, + { (FcChar8 *) "en", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_en, (FcChar16 *) numbers_en } }, + { (FcChar8 *) "eo", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_eo, (FcChar16 *) numbers_eo } }, + { (FcChar8 *) "es", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_es, (FcChar16 *) numbers_es } }, + { (FcChar8 *) "et", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_et, (FcChar16 *) numbers_et } }, + { (FcChar8 *) "eu", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_eu, (FcChar16 *) numbers_eu } }, + { (FcChar8 *) "fa", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_fa, (FcChar16 *) numbers_fa } }, + { (FcChar8 *) "fi", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_fi, (FcChar16 *) numbers_fi } }, + { (FcChar8 *) "fj", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "fo", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fo, (FcChar16 *) numbers_fo } }, + { (FcChar8 *) "fr", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_co, (FcChar16 *) numbers_co } }, + { (FcChar8 *) "ful", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_ful, (FcChar16 *) numbers_ful } }, + { (FcChar8 *) "fur", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fur, (FcChar16 *) numbers_fur } }, + { (FcChar8 *) "fy", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fy, (FcChar16 *) numbers_fy } }, + { (FcChar8 *) "ga", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_ga, (FcChar16 *) numbers_ga } }, + { (FcChar8 *) "gd", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_gd, (FcChar16 *) numbers_gd } }, + { (FcChar8 *) "gez", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } }, + { (FcChar8 *) "gl", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_es, (FcChar16 *) numbers_es } }, + { (FcChar8 *) "gn", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_gn, (FcChar16 *) numbers_gn } }, + { (FcChar8 *) "gu", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_gu, (FcChar16 *) numbers_gu } }, + { (FcChar8 *) "gv", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_gv, (FcChar16 *) numbers_gv } }, + { (FcChar8 *) "ha", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_ha, (FcChar16 *) numbers_ha } }, + { (FcChar8 *) "haw", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_haw, (FcChar16 *) numbers_haw } }, + { (FcChar8 *) "he", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_he, (FcChar16 *) numbers_he } }, + { (FcChar8 *) "hi", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } }, + { (FcChar8 *) "ho", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "hr", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_bs, (FcChar16 *) numbers_bs } }, + { (FcChar8 *) "hu", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_hu, (FcChar16 *) numbers_hu } }, + { (FcChar8 *) "hy", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_hy, (FcChar16 *) numbers_hy } }, + { (FcChar8 *) "ia", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "ibo", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ibo, (FcChar16 *) numbers_ibo } }, + { (FcChar8 *) "id", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_id, (FcChar16 *) numbers_id } }, + { (FcChar8 *) "ie", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "ik", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ik, (FcChar16 *) numbers_ik } }, + { (FcChar8 *) "io", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "is", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_is, (FcChar16 *) numbers_is } }, + { (FcChar8 *) "it", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_it, (FcChar16 *) numbers_it } }, + { (FcChar8 *) "iu", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_iu, (FcChar16 *) numbers_iu } }, + { (FcChar8 *) "ja", + { FC_REF_CONSTANT, 84, (FcCharLeaf **) leaves_ja, (FcChar16 *) numbers_ja } }, + { (FcChar8 *) "ka", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ka, (FcChar16 *) numbers_ka } }, + { (FcChar8 *) "kaa", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kaa, (FcChar16 *) numbers_kaa } }, + { (FcChar8 *) "ki", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ki, (FcChar16 *) numbers_ki } }, + { (FcChar8 *) "kk", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kk, (FcChar16 *) numbers_kk } }, + { (FcChar8 *) "kl", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_kl, (FcChar16 *) numbers_kl } }, + { (FcChar8 *) "km", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_km, (FcChar16 *) numbers_km } }, + { (FcChar8 *) "kn", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kn, (FcChar16 *) numbers_kn } }, + { (FcChar8 *) "ko", + { FC_REF_CONSTANT, 129, (FcCharLeaf **) leaves_ko, (FcChar16 *) numbers_ko } }, + { (FcChar8 *) "kok", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } }, + { (FcChar8 *) "ks", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } }, + { (FcChar8 *) "ku", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ku, (FcChar16 *) numbers_ku } }, + { (FcChar8 *) "kum", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kum, (FcChar16 *) numbers_kum } }, + { (FcChar8 *) "kv", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kv, (FcChar16 *) numbers_kv } }, + { (FcChar8 *) "kw", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_kw, (FcChar16 *) numbers_kw } }, + { (FcChar8 *) "ky", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ky, (FcChar16 *) numbers_ky } }, + { (FcChar8 *) "la", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_la, (FcChar16 *) numbers_la } }, + { (FcChar8 *) "lb", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_lb, (FcChar16 *) numbers_lb } }, + { (FcChar8 *) "lez", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ava, (FcChar16 *) numbers_ava } }, + { (FcChar8 *) "lo", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_lo, (FcChar16 *) numbers_lo } }, + { (FcChar8 *) "lt", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_lt, (FcChar16 *) numbers_lt } }, + { (FcChar8 *) "lv", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_lv, (FcChar16 *) numbers_lv } }, + { (FcChar8 *) "mg", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_mg, (FcChar16 *) numbers_mg } }, + { (FcChar8 *) "mh", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_mh, (FcChar16 *) numbers_mh } }, + { (FcChar8 *) "mi", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_mi, (FcChar16 *) numbers_mi } }, + { (FcChar8 *) "mk", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_mk, (FcChar16 *) numbers_mk } }, + { (FcChar8 *) "ml", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ml, (FcChar16 *) numbers_ml } }, + { (FcChar8 *) "mn", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_mn, (FcChar16 *) numbers_mn } }, + { (FcChar8 *) "mo", + { FC_REF_CONSTANT, 4, (FcCharLeaf **) leaves_mo, (FcChar16 *) numbers_mo } }, + { (FcChar8 *) "mr", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } }, + { (FcChar8 *) "mt", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_mt, (FcChar16 *) numbers_mt } }, + { (FcChar8 *) "my", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_my, (FcChar16 *) numbers_my } }, + { (FcChar8 *) "nb", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_nb, (FcChar16 *) numbers_nb } }, + { (FcChar8 *) "ne", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } }, + { (FcChar8 *) "nl", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_nl, (FcChar16 *) numbers_nl } }, + { (FcChar8 *) "nn", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_nn, (FcChar16 *) numbers_nn } }, + { (FcChar8 *) "no", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_nb, (FcChar16 *) numbers_nb } }, + { (FcChar8 *) "ny", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ny, (FcChar16 *) numbers_ny } }, + { (FcChar8 *) "oc", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_oc, (FcChar16 *) numbers_oc } }, + { (FcChar8 *) "om", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "or", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_or, (FcChar16 *) numbers_or } }, + { (FcChar8 *) "os", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kum, (FcChar16 *) numbers_kum } }, + { (FcChar8 *) "pl", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_pl, (FcChar16 *) numbers_pl } }, + { (FcChar8 *) "pt", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_pt, (FcChar16 *) numbers_pt } }, + { (FcChar8 *) "rm", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_rm, (FcChar16 *) numbers_rm } }, + { (FcChar8 *) "ro", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_ro, (FcChar16 *) numbers_ro } }, + { (FcChar8 *) "ru", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ru, (FcChar16 *) numbers_ru } }, + { (FcChar8 *) "sa", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_bh, (FcChar16 *) numbers_bh } }, + { (FcChar8 *) "sah", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sah, (FcChar16 *) numbers_sah } }, + { (FcChar8 *) "sco", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_sco, (FcChar16 *) numbers_sco } }, + { (FcChar8 *) "se", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_se, (FcChar16 *) numbers_se } }, + { (FcChar8 *) "sel", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_kum, (FcChar16 *) numbers_kum } }, + { (FcChar8 *) "sh", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sh, (FcChar16 *) numbers_sh } }, + { (FcChar8 *) "si", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_si, (FcChar16 *) numbers_si } }, + { (FcChar8 *) "sk", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_sk, (FcChar16 *) numbers_sk } }, + { (FcChar8 *) "sl", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_bs, (FcChar16 *) numbers_bs } }, + { (FcChar8 *) "sm", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_sm, (FcChar16 *) numbers_sm } }, + { (FcChar8 *) "sma", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sma, (FcChar16 *) numbers_sma } }, + { (FcChar8 *) "smj", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_smj, (FcChar16 *) numbers_smj } }, + { (FcChar8 *) "smn", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_smn, (FcChar16 *) numbers_smn } }, + { (FcChar8 *) "sms", + { FC_REF_CONSTANT, 3, (FcCharLeaf **) leaves_sms, (FcChar16 *) numbers_sms } }, + { (FcChar8 *) "so", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "sq", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sq, (FcChar16 *) numbers_sq } }, + { (FcChar8 *) "sr", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sh, (FcChar16 *) numbers_sh } }, + { (FcChar8 *) "sv", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_sv, (FcChar16 *) numbers_sv } }, + { (FcChar8 *) "sw", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "syr", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_syr, (FcChar16 *) numbers_syr } }, + { (FcChar8 *) "ta", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ta, (FcChar16 *) numbers_ta } }, + { (FcChar8 *) "te", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_te, (FcChar16 *) numbers_te } }, + { (FcChar8 *) "tg", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tg, (FcChar16 *) numbers_tg } }, + { (FcChar8 *) "th", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_th, (FcChar16 *) numbers_th } }, + { (FcChar8 *) "ti", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_am, (FcChar16 *) numbers_am } }, + { (FcChar8 *) "tk", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tk, (FcChar16 *) numbers_tk } }, + { (FcChar8 *) "tl", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tl, (FcChar16 *) numbers_tl } }, + { (FcChar8 *) "tn", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tn, (FcChar16 *) numbers_tn } }, + { (FcChar8 *) "to", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_sm, (FcChar16 *) numbers_sm } }, + { (FcChar8 *) "tr", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_tr, (FcChar16 *) numbers_tr } }, + { (FcChar8 *) "ts", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "tt", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_tt, (FcChar16 *) numbers_tt } }, + { (FcChar8 *) "tw", + { FC_REF_CONSTANT, 5, (FcCharLeaf **) leaves_tw, (FcChar16 *) numbers_tw } }, + { (FcChar8 *) "tyv", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ky, (FcChar16 *) numbers_ky } }, + { (FcChar8 *) "ug", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ar, (FcChar16 *) numbers_ar } }, + { (FcChar8 *) "uk", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_uk, (FcChar16 *) numbers_uk } }, + { (FcChar8 *) "ur", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_ar, (FcChar16 *) numbers_ar } }, + { (FcChar8 *) "uz", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_uz, (FcChar16 *) numbers_uz } }, + { (FcChar8 *) "ven", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_ven, (FcChar16 *) numbers_ven } }, + { (FcChar8 *) "vi", + { FC_REF_CONSTANT, 4, (FcCharLeaf **) leaves_vi, (FcChar16 *) numbers_vi } }, + { (FcChar8 *) "vo", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_vo, (FcChar16 *) numbers_vo } }, + { (FcChar8 *) "vot", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_vot, (FcChar16 *) numbers_vot } }, + { (FcChar8 *) "wa", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_wa, (FcChar16 *) numbers_wa } }, + { (FcChar8 *) "wen", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_wen, (FcChar16 *) numbers_wen } }, + { (FcChar8 *) "wo", + { FC_REF_CONSTANT, 2, (FcCharLeaf **) leaves_wo, (FcChar16 *) numbers_wo } }, + { (FcChar8 *) "xh", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + { (FcChar8 *) "yap", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_yap, (FcChar16 *) numbers_yap } }, + { (FcChar8 *) "yi", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_he, (FcChar16 *) numbers_he } }, + { (FcChar8 *) "yo", + { FC_REF_CONSTANT, 4, (FcCharLeaf **) leaves_yo, (FcChar16 *) numbers_yo } }, + { (FcChar8 *) "zh-cn", + { FC_REF_CONSTANT, 82, (FcCharLeaf **) leaves_zh_cn, (FcChar16 *) numbers_zh_cn } }, + { (FcChar8 *) "zh-hk", + { FC_REF_CONSTANT, 83, (FcCharLeaf **) leaves_zh_hk, (FcChar16 *) numbers_zh_hk } }, + { (FcChar8 *) "zh-mo", + { FC_REF_CONSTANT, 83, (FcCharLeaf **) leaves_zh_mo, (FcChar16 *) numbers_zh_mo } }, + { (FcChar8 *) "zh-sg", + { FC_REF_CONSTANT, 82, (FcCharLeaf **) leaves_zh_cn, (FcChar16 *) numbers_zh_cn } }, + { (FcChar8 *) "zh-tw", + { FC_REF_CONSTANT, 83, (FcCharLeaf **) leaves_zh_mo, (FcChar16 *) numbers_zh_mo } }, + { (FcChar8 *) "zu", + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, +}; + +#define NUM_LANG_CHAR_SET 175 +#define NUM_LANG_SET_MAP 6 + +static const FcChar32 fcLangCountrySets[][NUM_LANG_SET_MAP] = { + { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00003e00, }, /* zh */ +}; + +#define NUM_COUNTRY_SET 1 Index: xc/lib/fontconfig/fc-lang/fclang.tmpl.h diff -u /dev/null xc/lib/fontconfig/fc-lang/fclang.tmpl.h:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fclang.tmpl.h Mon Jul 8 03:31:51 2002 @@ -0,0 +1,25 @@ +/* + * $XFree86: xc/lib/fontconfig/fc-lang/fclang.tmpl.h,v 1.1 2002/07/08 07:31:51 keithp Exp $ + * + * Copyright © 2002 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. + */ + +@@@ Index: xc/lib/fontconfig/fc-lang/fi.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/fi.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fi.orth Thu Aug 29 21:28:16 2002 @@ -0,0 +1,52 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/fi.orth,v 1.3 2002/08/30 01:28:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Finnish (FI) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +#00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK * +00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS +00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE +#00C6 # LATIN CAPITAL LETTER AE (ash) * evertype.com +#00D5 # LATIN CAPITAL LETTER O WITH TILDE evertype.com +00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS +#00DC # LATIN CAPITAL LETTER U WITH DIAERESIS evertype.com +00E4 # LATIN SMALL LETTER A WITH DIAERESIS +00E5 # LATIN SMALL LETTER A WITH RING ABOVE +#00E6 # LATIN SMALL LETTER AE (ash) * evertype.com +#00F5 # LATIN SMALL LETTER O WITH TILDE evertype.com +00F6 # LATIN SMALL LETTER O WITH DIAERESIS +#00FC # LATIN SMALL LETTER U WITH DIAERESIS evertype.com +0160 # LATIN CAPITAL LETTER S WITH CARON +0161 # LATIN SMALL LETTER S WITH CARON +017D # LATIN CAPITAL LETTER Z WITH CARON +017E # LATIN SMALL LETTER Z WITH CARON +#2019 # single quote +#201d # double quote +#203a # angle quote + Index: xc/lib/fontconfig/fc-lang/fj.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/fj.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fj.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,34 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/fj.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Fijian (KW) +# +# Orthography guessed from http://www.deeptrans.com/deeptrans/german.html +# +# There may be diacritical marks used, but I couldn't find any information +# about them, nor any Fijian text using them. +# +# Fijian doesn't use h, x, z and uses f, j and p in loan words +# +0041-005a +0061-007a Index: xc/lib/fontconfig/fc-lang/fo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/fo.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fo.orth Thu Aug 29 21:28:16 2002 @@ -0,0 +1,59 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/fo.orth,v 1.3 2002/08/30 01:28:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Faroese (FO) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00C1 # LATIN CAPITAL LETTER A WITH ACUTE +#00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS evertype.com +#00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE evertype.com +00C6 # LATIN CAPITAL LETTER AE (ash) * +00CD # LATIN CAPITAL LETTER I WITH ACUTE +00D0 # LATIN CAPITAL LETTER ETH (Icelandic) +00D3 # LATIN CAPITAL LETTER O WITH ACUTE +#00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS evertype.com +00D8 # LATIN CAPITAL LETTER O WITH STROKE +00DA # LATIN CAPITAL LETTER U WITH ACUTE +#00DC # LATIN CAPITAL LETTER U WITH DIAERESIS evertype.com +00DD # LATIN CAPITAL LETTER Y WITH ACUTE +00E1 # LATIN SMALL LETTER A WITH ACUTE +#00E4 # LATIN SMALL LETTER A WITH DIAERESIS evertype.com +#00E5 # LATIN SMALL LETTER A WITH RING ABOVE evertype.com +00E6 # LATIN SMALL LETTER AE (ash) * +00ED # LATIN SMALL LETTER I WITH ACUTE +00F0 # LATIN SMALL LETTER ETH (Icelandic) +00F3 # LATIN SMALL LETTER O WITH ACUTE +#00F6 # LATIN SMALL LETTER O WITH DIAERESIS evertype.com +00F8 # LATIN SMALL LETTER O WITH STROKE +00FA # LATIN SMALL LETTER U WITH ACUTE +#00FC # LATIN SMALL LETTER U WITH DIAERESIS evertype.com +00FD # LATIN SMALL LETTER Y WITH ACUTE +#2018 # single quote +#201a # single quote +#201c # double quote +#201e # double quote Index: xc/lib/fontconfig/fc-lang/fr.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/fr.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fr.orth Mon Aug 12 18:20:11 2002 @@ -0,0 +1,58 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/fr.orth,v 1.4 2002/08/12 22:20:11 keithp Exp $ +# +# Copyright © 2002 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. +# +# French (FR) +0041-005a +0061-007a +00C0 # LATIN CAPITAL LETTER A WITH GRAVE +00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX +00E0 # LATIN SMALL LETTER A WITH GRAVE +00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX +00C7 # LATIN CAPITAL LETTER C WITH CEDILLA +00E7 # LATIN SMALL LETTER C WITH CEDILLA +00C8 # LATIN CAPITAL LETTER E WITH GRAVE +00E8 # LATIN SMALL LETTER E WITH GRAVE +00C9 # LATIN CAPITAL LETTER E WITH ACUTE +00E9 # LATIN SMALL LETTER E WITH ACUTE +00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX +00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX +00CB # LATIN CAPITAL LETTER E WITH DIAERESIS +00EB # LATIN SMALL LETTER E WITH DIAERESIS +00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX +00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX +00CF # LATIN CAPITAL LETTER I WITH DIAERESIS +00EF # LATIN SMALL LETTER I WITH DIAERESIS +00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX +00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX +0152 # LATIN CAPITAL LIGATURE OE +0153 # LATIN SMALL LIGATURE OE +00D9 # LATIN CAPITAL LETTER U WITH GRAVE +00F9 # LATIN SMALL LETTER U WITH GRAVE +00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX +00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX +00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +00FC # LATIN SMALL LETTER U WITH DIAERESIS +0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS +00FF # LATIN SMALL LETTER Y WITH DIAERESIS +00C6 # LATIN CAPITAL LETTER AE (ash) * +00E6 # LATIN SMALL LETTER AE (ash) * Index: xc/lib/fontconfig/fc-lang/ful.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ful.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ful.orth Fri Jul 12 15:19:15 2002 @@ -0,0 +1,38 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ful.orth,v 1.1 2002/07/12 19:19:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Fulah (Fula) (ful) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +0181 +0253 +018a +0257 +014a +014b +019d +0272 +01b3-01b4 Index: xc/lib/fontconfig/fc-lang/fur.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/fur.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fur.orth Wed Aug 7 13:34:15 2002 @@ -0,0 +1,39 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/fur.orth,v 1.1 2002/08/07 17:34:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Friulian (FUR) +# +# Orthography from http://www.evertype.com/alphabets/friulian.pdf +# +0041-005a +0061-007a +00c0-00c2 +00c8 +00cc +00d2 +00d9 +00e0-00e2 +00e8 +00ec +00f2 +00f9 Index: xc/lib/fontconfig/fc-lang/fy.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/fy.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/fy.orth Thu Aug 29 21:28:16 2002 @@ -0,0 +1,61 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/fy.orth,v 1.4 2002/08/30 01:28:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Frisian (FY) +# +# West Frisian orthography from +# http://www.evertype.com/alphabets/west-frisian.pdf +# +# +# Checked with orthography from eki.ee/letter which include +# a few others (commented out here). +# +# Added in ß from German orthography +# +0041-005a +0061-007a +00c2 +00c4 +00c9 +00ca +00cb +#00ce # eki.ee +00cf +00d4 +00d6 +00da +00db +00dc +00df +00e2 +00e4 +00e9 +00ea +00eb +#00ee # eki.ee +00ef +00f4 +00f6 +00fa +00fb +00fc Index: xc/lib/fontconfig/fc-lang/ga.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ga.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ga.orth Thu Aug 29 21:28:16 2002 @@ -0,0 +1,84 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ga.orth,v 1.4 2002/08/30 01:28:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Irish (GA) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +# The orthography from evertype.com includes the lenited consonants +# as indicated with seimhiu (dot above). I've included those here +# even though they're not present in the orthography listed from eki.ee; +# eki.ee mentions that the seimhiu form is still written but is +# often written by a following h instead. +# +0041-005a +0061-007a +#00C0 # LATIN CAPITAL LETTER A WITH GRAVE evertype.com +00C1 # LATIN CAPITAL LETTER A WITH ACUTE +#00C7 # LATIN CAPITAL LETTER C WITH CEDILLA evertype.com +#00C8 # LATIN CAPITAL LETTER E WITH GRAVE evertype.com +00C9 # LATIN CAPITAL LETTER E WITH ACUTE +#00CC # LATIN CAPITAL LETTER I WITH GRAVE evertype.com +00CD # LATIN CAPITAL LETTER I WITH ACUTE +#00D2 # LATIN CAPITAL LETTER O WITH GRAVE evertype.com +00D3 # LATIN CAPITAL LETTER O WITH ACUTE +#00D9 # LATIN CAPITAL LETTER U WITH GRAVE evertype.com +00DA # LATIN CAPITAL LETTER U WITH ACUTE +#00E0 # LATIN SMALL LETTER A WITH GRAVE evertype.com +00E1 # LATIN SMALL LETTER A WITH ACUTE +#00E7 # LATIN SMALL LETTER C WITH CEDILLA evertype.com +#00E8 # LATIN SMALL LETTER E WITH GRAVE evertype.com +00E9 # LATIN SMALL LETTER E WITH ACUTE +#00EC # LATIN SMALL LETTER I WITH GRAVE +00ED # LATIN SMALL LETTER I WITH ACUTE +#00F2 # LATIN SMALL LETTER O WITH GRAVE evertype.com +00F3 # LATIN SMALL LETTER O WITH ACUTE +#00F9 # LATIN SMALL LETTER U WITH GRAVE evertype.com +00FA # LATIN SMALL LETTER U WITH ACUTE +010A # LATIN CAPITAL LETTER C WITH DOT ABOVE +010B # LATIN SMALL LETTER C WITH DOT ABOVE +0120 # LATIN CAPITAL LETTER G WITH DOT ABOVE +0121 # LATIN SMALL LETTER G WITH DOT ABOVE +#017F # LATIN SMALL LETTER LONG S evertype.com +#027C # LATIN SMALL LETTER R WITH LONG LEG evertype.com +1E02 # LATIN CAPITAL LETTER B WITH DOT ABOVE +1E03 # LATIN SMALL LETTER B WITH DOT ABOVE +1E0A # LATIN CAPITAL LETTER D WITH DOT ABOVE +1E0B # LATIN SMALL LETTER D WITH DOT ABOVE +1E1E # LATIN CAPITAL LETTER F WITH DOT ABOVE +1E1F # LATIN SMALL LETTER F WITH DOT ABOVE +1E40 # LATIN CAPITAL LETTER M WITH DOT ABOVE +1E41 # LATIN SMALL LETTER M WITH DOT ABOVE +1E56 # LATIN CAPITAL LETTER P WITH DOT ABOVE +1E57 # LATIN SMALL LETTER P WITH DOT ABOVE +1E60 # LATIN CAPITAL LETTER S WITH DOT ABOVE +1E61 # LATIN SMALL LETTER S WITH DOT ABOVE +1E6A # LATIN CAPITAL LETTER T WITH DOT ABOVE +1E6B # LATIN SMALL LETTER T WITH DOT ABOVE +#1E9B # LATIN SMALL LETTER LONG S WITH DOT ABOVE evertype.com +#1680-169c # Ogham +#2018-2019 # single quotes +#201c-201d # double quotes +#204a # tironian sign et Index: xc/lib/fontconfig/fc-lang/gd.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/gd.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/gd.orth Thu Aug 29 21:28:16 2002 @@ -0,0 +1,51 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/gd.orth,v 1.3 2002/08/30 01:28:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Scots Gaelic (GD) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00c0 +00c1 +00c7 +00c8 +00c9 +00cc +00d2 +00d3 +00d9 +00e0 +00e1 +00e7 +00e8 +00e9 +00ec +00f2 +00f3 +00f9 +#2018-2019 # single quotes +#201c-201d # double quotes Index: xc/lib/fontconfig/fc-lang/gez.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/gez.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/gez.orth Sat Jul 13 15:10:03 2002 @@ -0,0 +1,57 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/gez.orth,v 1.2 2002/07/13 19:10:03 keithp Exp $ +# +# Copyright © 2002 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. +# +# Ethiopic (Geez) (eth) +# +# Taken from Unicode coverage (1200-137f) +# +# Sylables +1200-1206 +1208-1246 +1248 +124a-124d +1250-1256 +1258 +125a-125d +1260-1286 +1288 +128a-128d +1290-12ae +12b0 +12b2-12b5 +12b8-12be +12c0 +12c2-12c5 +12c8-12ce +12d0-12d6 +12d8-12ee +12f0-130e +1310 +1312-1315 +1318-131e +1320-1346 +1348-135a +#1361-1368 # punctuation +#1369-1371 # digits +#1372-137c # numbers +# Index: xc/lib/fontconfig/fc-lang/gl.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/gl.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/gl.orth Thu Aug 29 21:28:16 2002 @@ -0,0 +1,50 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/gl.orth,v 1.4 2002/08/30 01:28:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Galician (GL) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +#00a1 +#00ab +#00bb +#00bf +00c1 +00c9 +00cd +00d1 +00d3 +00da +00dc +00e1 +00e9 +00ed +00f1 +00f3 +00fa +00fc +#2019-201a # single qutoes Index: xc/lib/fontconfig/fc-lang/gn.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/gn.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/gn.orth Fri Jul 12 17:05:59 2002 @@ -0,0 +1,48 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/gn.orth,v 1.2 2002/07/12 21:05:59 keithp Exp $ +# +# Copyright © 2002 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. +# +# Guaraní (GN) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c1 +00e1 +00e3 +00c9 +00e9 +1ebd +#e005 # LATIN SMALL LETTER G WITH TILDE (no UCS) +00cd +00ed +0129 +00d1 +00f1 +00d3 +00f3 +00f5 +00da +00fa +0169 +1ef9 Index: xc/lib/fontconfig/fc-lang/gu.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/gu.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/gu.orth Sun Jul 7 15:18:51 2002 @@ -0,0 +1,41 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/gu.orth,v 1.1 2002/07/07 19:18:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Gujarati (GU) +# +# Taken from the Unicode coverage of this language +# +0a81-0a83 +0a85-0a8b +0a8d +0a8f-0a91 +0a93-0aa8 +0aaa-0ab0 +0ab2-0ab3 +0ab5-0ab9 +0abc-0ac5 +0ac7-0ac9 +0acb-0acd +0ad0 +0ae0 +0ae6-0aef Index: xc/lib/fontconfig/fc-lang/gv.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/gv.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/gv.orth Wed Aug 7 13:34:15 2002 @@ -0,0 +1,31 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/gv.orth,v 1.1 2002/08/07 17:34:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Manx Gaelic (GV) +# +# Orthography from http://www.evertype.com/alphabets/manx-gaelic.pdf +# +0041-005a +0061-007a +00c7 +00e7 Index: xc/lib/fontconfig/fc-lang/ha.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ha.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ha.orth Fri Jul 12 15:19:15 2002 @@ -0,0 +1,36 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ha.orth,v 1.1 2002/07/12 19:19:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Hausa (HA) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +0181 +0253 +018a +0257 +0198-0199 +01b3 # used in Niger +01b4 # used in Niger Index: xc/lib/fontconfig/fc-lang/haw.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/haw.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/haw.orth Fri Jul 12 15:19:15 2002 @@ -0,0 +1,35 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/haw.orth,v 1.1 2002/07/12 19:19:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Hawaiian (HAW) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +0100-0101 +0112-0113 +012a-012b +014c-014d +016a-016b +02bb Index: xc/lib/fontconfig/fc-lang/he.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/he.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/he.orth Sat Jul 6 19:59:15 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/he.orth,v 1.2 2002/07/06 23:59:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Hebrew (HE) +05d0-05ea Index: xc/lib/fontconfig/fc-lang/hi.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/hi.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/hi.orth Fri Jul 12 03:52:15 2002 @@ -0,0 +1,35 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/hi.orth,v 1.1 2002/07/12 07:52:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Hindi (Devanagari script) (HI) +# +# From Unicode coverage for Devanagari +# +0905-0914 # Independent vowels +0915-0939 # Consonants +093f-094c # Dependent vowel signs +094d # virama +#0958-095f # Additional consonants +#0960-0965 # Generic additions +#0966-096f # Digits +#0970 # Abbreviation sign Index: xc/lib/fontconfig/fc-lang/ho.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ho.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ho.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,33 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ho.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Hiri Motu (HO) +# +# I found one sample of Hiri Motu text, a translation of the first part of +# Genesis at +# http://rosettaproject.org:8080/live/search/showpages?ethnocode=POM&doctype=gen&version=1&scale=six +# +# It appears to use only ASCII glyphs, so we'll go with that for now +# +0041-005a +0061-007a Index: xc/lib/fontconfig/fc-lang/hr.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/hr.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/hr.orth Thu Aug 29 21:28:16 2002 @@ -0,0 +1,49 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/hr.orth,v 1.3 2002/08/30 01:28:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Croatian (HR) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +#00c0 # evertype.com +#00c8 # evertype.com +#00cc # evertype.com +#00d2 # evertype.com +#00d9 # evertype.com +#00e0 # evertype.com +#00e8 # evertype.com +#00ec # evertype.com +#00f2 # evertype.com +#00f9 # evertype.com +0106-0107 +010c-010d +0110-0111 +0160-0161 +017d-017e +#01c4-01cc # evertype.com +#01f1-01f5 # evertype.com +#0200-0217 # evertype.com Index: xc/lib/fontconfig/fc-lang/hu.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/hu.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/hu.orth Thu Aug 29 21:28:16 2002 @@ -0,0 +1,49 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/hu.orth,v 1.3 2002/08/30 01:28:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Hungarian (HU) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +#00C0 # LATIN CAPITAL LETTER A WITH GRAVE evertype.com +00c1 +00c9 +00cd +00d3 +00d6 +00da +00dc +#00E0 # LATIN SMALL LETTER A WITH GRAVE evertype.com +00e1 +00e9 +00ed +00f3 +00f6 +00fa +00fc +0150-0151 +0170-0171 Index: xc/lib/fontconfig/fc-lang/hy.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/hy.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/hy.orth Fri Jul 12 17:05:59 2002 @@ -0,0 +1,26 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/hy.orth,v 1.3 2002/07/12 21:05:59 keithp Exp $ +# +# Copyright © 2002 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. +# +# Armenian (HY) +0531-0556 +0561-0587 Index: xc/lib/fontconfig/fc-lang/ia.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ia.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ia.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ia.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Interlingua (IA) +# +# Orthography taken from http://www.geocities.com/linguablau/spelling_main.html +# +0041-005a +0061-007a Index: xc/lib/fontconfig/fc-lang/ibo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ibo.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ibo.orth Fri Jul 12 15:19:15 2002 @@ -0,0 +1,35 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ibo.orth,v 1.1 2002/07/12 19:19:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Igbo (Ibo) (IBO) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +1eca +1ecb +1ecc +1ecd +1ee1 +1ee5 Index: xc/lib/fontconfig/fc-lang/id.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/id.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/id.orth Fri Jul 12 15:19:15 2002 @@ -0,0 +1,31 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/id.orth,v 1.1 2002/07/12 19:19:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Indonesian (ID) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c9 +00e9 Index: xc/lib/fontconfig/fc-lang/ie.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ie.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ie.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ie.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Interlingue (IE) +# +# Orthography taken from http://www.kolumbus.fi/allkiv/itgr/itgrix.htm +# +0041-005a +0061-007a Index: xc/lib/fontconfig/fc-lang/ik.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ik.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ik.orth Fri Jul 12 03:52:15 2002 @@ -0,0 +1,100 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ik.orth,v 1.1 2002/07/12 07:52:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Inupiaq (Inupiak, Eskimo) (IK) +# +# I'm making a guess that this is language is set using Cyrillic +# +0401 +040e +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +045e Index: xc/lib/fontconfig/fc-lang/io.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/io.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/io.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/io.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Ido (IO) +# +# Orthography taken from http://www.homunculus.com/babel/aido.html +# +0041-005a +0061-007a Index: xc/lib/fontconfig/fc-lang/is.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/is.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/is.orth Thu Aug 29 21:28:16 2002 @@ -0,0 +1,64 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/is.orth,v 1.3 2002/08/30 01:28:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Icelandic (IS) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00c1 +#00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS evertype.com +#00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE evertype.com +00c6 +00c9 +#00CB # LATIN CAPITAL LETTER E WITH DIAERESIS evertype.com +00cd +00d0 +00d3 +#00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS eki.ee +#00D8 # LATIN CAPITAL LETTER O WITH STROKE evertype.com +00da +#00DC # LATIN CAPITAL LETTER U WITH DIAERESIS evertype.com +00dd +00de +00e1 +#00E4 # LATIN SMALL LETTER A WITH DIAERESIS evertype.com +#00E5 # LATIN SMALL LETTER A WITH RING ABOVE evertype.com +00e6 +00e9 +00ed +00f0 +00f3 +#00F6 # LATIN SMALL LETTER O WITH DIAERESIS eki.ee +#00F8 # LATIN SMALL LETTER O WITH STROKE evertype.com +00fa +#00FC # LATIN SMALL LETTER U WITH DIAERESIS evertype.com +00fd +00fe +#2018 # single quote +#201a # single quote +#201c # double quote +#201e # double quote Index: xc/lib/fontconfig/fc-lang/iso639-1 diff -u /dev/null xc/lib/fontconfig/fc-lang/iso639-1:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/iso639-1 Mon Aug 12 18:20:11 2002 @@ -0,0 +1,139 @@ +AA * Afar Djibouti, N Ethiopia Hamito-Semitic F., Cushitic Br. +AB * Abkhazian Abkhazia (Georgia) Caucasian F. +AF * Afrikaans South Africa, Namibia Indo-European F., Germanic Br. 10 +AM * Amharic Ethiopia Hamito-Semitic F., Semitic Br. 20 +AR * Arabic Middle East, N Africa Hamito-Semitic F., Semitic Br. 218 +AS Assamese Assam (India) Indo-European F., Indo-Iranian Br. 23 +AY * Aymara Bolivia, Peru Andean-Equatorial F., Andean Br. 2 +AZ * Azerbaijani Iran, Azerbaijan Uralo-Altaic F., Turkic Br. 15 +BA * Bashkir Bashkir (S Urals, Russia) Uralo-Altaic F., Turkic Br. 1 +BE * Byelorussian Byelorussia Indo-European F., Balto-Slavic Br. 10 +BG * Bulgarian Bulgaria, Yugoslavia, Greece Indo-European F., Balto-Slavic Br. 9 +BH * Bihari Bihar (India) Indo-European F., Indo-Iranian Br. +BI * Bislama Vanuatu, New Caledonia English based creole, Pacific +BN * Bengali, Bangla Bangladesh, West Bengal (India) Indo-European F., Indo-Iranian Br. 196 +BO * Tibetan Tibet, Bhutan, Nepal, India Sino-Tibetan F., Tibeto-Burmese Br. 5 BO from Bodskad +BR * Breton Britanny (W France) Indo-European F., Celtic Br. +CA * Catalan Catalania (NE Spain), Balearic Islands, Sardinia, S France, Andorra, Argentina Indo-European F., Italic Br. 9 +CO * Corsican Corsica (France) Indo-European F., Italic Br. +CS * Czech Czech Republic Indo-European F., Balto-Slavic Br. 11 +CY * Welsh Wales (United Kingdom) Indo-European F., Celtic Br. +DA * Danish Denmark, Germany Indo-European F., Germanic Br. 5 +DE * German Germany, Austria, Switzerland, U.S.A. Indo-European F., Germanic Br. 121 DE from Deutsch +DZ * Bhutani, Bhutanese Bhutan Sino-Tibetan F., Tibeto-Burmese Br. +EL * Greek Greece, Cyprus, Turkey Indo-European F., Hellenic Br. 12 +EN * English North America, British Isles, Australia, New Zealand, South Africa Indo-European F., Germanic Br. 470 +EO * Esperanto 2 Artificial language +ES * Spanish Spain, Latin America, U.S.A. Indo-European F., Italic Br. 381 +ET * Estonian Estonia Uralo-Altaic F., Finno-Ugric Br. 1 +EU * Basque W Pyrenees (France, Spain) (Isolate) EU from Euskera +FA * Persian Iran, Afghanistan Indo-European F., Indo-Iranian Br. 35 FA from Farsi +FI * Finnish, Suomi Finland, Russia, Sweden Uralo-Altaic F., Finno-Ugric Br. 6 +FJ * Fiji, Fijian Fiji Austric F., Malayo-Polynesian Br. +FO * Faroese, Faeroese Faeroe Islands (Denmark) Indo-European F., Germanic Br. +FR * French France, Belgium, Canada, U.S.A., Switzerland Indo-European F., Italic Br. 124 +FY * Frisian Frisian Islands (Netherlands-Germany) Indo-European F., Germanic Br. +GA * Irish Ireland Indo-European F., Celtic Br. GA from Gaeilge +GD * Scots Gaelic Scotland Indo-European F., Celtic Br. +GL * Galician Spanish Galicia Indo-European F., Italic Br. 4 +GN * Guaran? Paraguay, Bolivia, S Brazil Andean-Equatorial F., Equatorial Br. 4 +GU * Gujarati, Gujerati Gujarat (India), Bombay, Pakistan, South Africa Indo-European F., Indo-Iranian Br. 40 +HA * Hausa N Nigeria, Niger, Cameroun Hamito-Semitic F., Chadic Br. 37 +HE * Hebrew Israel Hamito-Semitic F., Semitic Br. 5 Formerly IW from Iwrith. See Note 4. +HI * Hindi India, Pakistan, Trinidad, Guyana, Fiji, Mauritius Indo-European F., Indo-Iranian Br. 418 Same as Urdu [UR] except for writing system. See Note 3. +HR * Croatian, Croat Croatia Indo-European F., Balto-Slavic Br. HR from Hrvatski. See Note 2. +HU * Hungarian, Magyar Hungary, Romania, Yugoslavia, Czechoslovakia Uralo-Altaic F., Finno-Ugric Br. 14 +HY * Armenian Armenia, Middle East Indo-European F., Armenian Br. 5 HY from Hayeren +IA * Interlingua Artificial language +ID * Indonesian, Bahasa Indonesia Indonesia, Malaysia, Thailand, Singapore, Brunei Austric F., Malayo-Polynesian Br. Formerly IN. See Note 4. +IE * Interlingue Artificial language. Prototype of Interlingua [IA] +IK * Inupiak Greenland, N Canada, Alaska (U.S.A.) Eskimo-Aleut F. +IS * Icelandic Iceland Indo-European F., Germanic Br. IS from Islenzk +IT * Italian Italy, U.S.A., France, Argentina, Switzerland, Canada, Brazil Indo-European F., Italic Br. 62 +IU * Inuktitut NE Canada Eskimo-Aleut F. See Note 5. +JA * Japanese, Nihongo Japan, Brazil, California (U.S.A.), Hawaii (U.S.A.) Japanese-Korean F. 126 +JW Javanese Java, Malaysia, Surinam Austric F., Malayo-Polynesian Br. 64 JW from Bahasa Jawa +KA * Georgian Georgia Caucasian F. 3 KA from Kartuli +KK * Kazakh Kazakhstan, Sinkiang (China), Afghanistan Uralo-Altaic F., Turkic Br. 8 +KL * Greenlandic Greenland Eskimo-Aleut F. KL from Kalaallisut +KM * Cambodian Cambodia, Thailand, Viet Nam Austric F., Austrio-Asiatic Br. 9 KM from Khmer +KN * Kannada Karnatuka (India) Dravidian F. 44 +KO * Korean, Choson-o South Korea, North Korea, NE China, Japan, Siberia, Hawaii (U.S.A.) Japanese-Korean F. 75 +KS * Kashmiri Kashmir (India-Pakistan) Indo-European F., Indo-Iranian Br. 4 +KU * Kurdish, Zimany Kurdy Turkey, Iran, Iraq, Syria Indo-European F., Indo-Iranian Br. 11 +KY * Kirghiz Kirghiz, Sinkiang (China), Afghanistan Uralo-Altaic F., Turkic Br. 2 KY from Kyrgyz +LA * Latin Indo-European F., Italic Br. Ancient language nearing extinction +LN Lingala, liNgala Zaire, Congo Niger-Kordofanian F., Non-Mande Br. 7 +LO * Laothian, Pha Xa Lao, Lao Laos, Thailand Sino-Tibetan F., Sino-Siamese Br. 4 +LT * Lithuanian Lithuania Indo-European F., Balto-Slavic Br. 3 +LV * Latvian, Lettish Latvia Indo-European F., Balto-Slavic Br. 2 +MG * Malagasy Madagascar Austric F., Malayo-Polynesian Br. 12 +MI * Maori New Zealand Austric F., Malayo-Polynesian Br. +MK * Macedonian Macedonia, Bulgaria, Greece Indo-European F., Balto-Slavic Br. 2 +ML * Malayalam Kerala (SW India) Dravidian F. 35 +MN * Mongolian Mongolia Uralo-Altaic F., Mongolic Br. +MO * Moldavian +MR * Marathi, Mahrati Maharashtra (W India) Indo-European F., Indo-Iranian Br. 69 +MS Malay Malaysia, Indonesia Austric F., Malayo-Polynesian Br. 155 MS from Bahasa Malaysia +MT * Maltese Malta Hamito-Semitic F., Semitic Br. +MY * Burmese Burma, Bangladesh Sino-Tibetan F., Tibeto-Burmese Br. 30 MY from Myanmasa +NA Nauru, Nauruan Nauru Austric F., Malayo-Polynesian Br. +NE * Nepali, Nepalese Nepal, Uttar Pradesh (India) Indo-European F., Indo-Iranian Br. 16 +NL * Dutch Netherlands, Belgium Indo-European F., Germanic Br. 21 NL from Nederlands +NO * Norwegian Norway Indo-European F., Germanic Br. 5 +OC * Occitan S France Indo-European F., Italic Br. 4 +OM * (Afan) Oromo, Galla Ethiopia, Kenya Hamito-Semitic F., Cushitic Br. 10 +OR * Oriya Orissa (E India) Indo-European F., Indo-Iranian Br. 31 +PA Punjabi Punjab (India), Pakistan Indo-European F., Indo-Iranian Br. 93 PA from Panjabi +PL * Polish Poland, U.S.A. Indo-European F., Balto-Slavic Br. 44 +PS Pashto, Pushto, Pushtu Afghanistan, Pakistan Indo-European F., Indo-Iranian Br. 21 +PT * Portuguese Brazil, Portugal, Spain, Uruguay, Argentina, Azores, Goa, Madeira Indo-European F., Italic Br. 182 +QU Quechua Peru, Ecuador, Bolivia Andean-Equatorial F., Andean Br. 8 +RM * Rhaeto-Romance, Rhaeto-Romanic, Romansch S Switzerland, N Italy, Tyrol (Austria) Indo-European F., Italic Br. +RN Kirundi, kiRundi Niger-Kordofanian F., Non-Mande Br. +RO * Romanian, Rumanian Rumania Indo-European F., Italic Br. 25 +RU * Russian Russia, former USSR republics Indo-European F., Balto-Slavic Br. 288 +RW Kinyarwanda, kinyaRuanda Rwanda, Burundi, Uganda, Zaire, Tanzania Niger-Kordofanian F., Non-Mande Br. RW from Rwanda +SA * Sanskrit India Indo-European F., Indo-Iranian Br. Ancient language +SD Sindhi Pakistan, Sind (India) Indo-European F., Indo-Iranian Br. 18 +SG Sangho, Sango-Ngbandi Central African Republic, Zaire Niger-Kordofanian F., Non-Mande Br. 4 +SH * Serbo-Croatian Croatia Indo-European F., Balto-Slavic Br. 20 See Note 2. +SI * Singhalese, Sinhalese Sri Lanka Indo-European F., Indo-Iranian Br. 13 +SK * Slovak Slovakia Indo-European F., Balto-Slavic Br. 5 +SL * Slovenian, Slovene Slovenia, Italy, Austria Indo-European F., Balto-Slavic Br. 2 +SM * Samoan Samoa Austric F., Malayo-Polynesian Br. +SN Shona, chiShona Rhodesia, Mozambique Niger-Kordofanian F., Non-Mande Br. 8 +SO * Somali Somalia, Ethiopia, Kenya Hamito-Semitic F., Cushitic Br. 5 +SQ * Albanian Albania, Kosovo (Yugoslavia), Italy, Greece Indo-European F., Albanian Br. 5 SQ from Shqip +SR * Serbian Serbia Indo-European F., Balto-Slavic Br. SR from Srpski. See Note 2. +SS Siswati, siSwati South Africa, Rhodesia, Swaziland Niger-Kordofanian F., Non-Mande Br. +ST Sesotho, siSuthu South Africa, Lesotho, Botswana Niger-Kordofanian F., Non-Mande Br. +SU Sundanese West Java Austric F., Malayo-Polynesian Br. 26 +SV * Swedish Sweden, Finland Indo-European F., Germanic Br. 9 SV from Svenska +SW * Swahili, kiSwahili Tanzania, Comoro Islands, Kenya, Mozambique, Zaire Niger-Kordofanian F., Non-Mande Br. 48 +TA * Tamil Tamil Nadu (S India), Sri Lanka, Malaysia, Singapore Dravidian F. 71 +TE * Telugu, Telegu Andhra Pradesh (India) Dravidian F. 73 +TG * Tajik, Tajiki Tadzhikstan Indo-European F., Indo-Iranian Br. 5 +TH * Thai Thailand 50 +TI * Tigrinya N Ethiopia Hamito-Semitic F., Semitic Br. 4 +TK * Turkmen, Turkoman, Turcoman Turkmenistan, Iran, Afghanistan Uralo-Altaic F., Turkic Br. 3 +TL * Tagalog Philippines Austric F., Malayo-Polynesian Br. 54 +TN * Setswana South Africa +TO * Tonga Niger-Kordofanian F., Non-Mande Br. 7 +TR * Turkish Turkey, Bulgaria, Yugoslavia, Cyprus, Greece Uralo-Altaic F., Turkic Br. 59 +TS * Tsonga 3 +TT * Tatar, Tartar Tatarstan Uralo-Altaic F., Turkic Br. 8 +TW * Twi, Tshi W Africa Niger-Kordofanian F., Non-Mande Br. +UG * Uigur, Uighur, Uyghur Sinkiang (China), Kazakhstan, Uzbekistan, Afghanistan Uralo-Altaic F., Turkic Br. 8 See Note 5. +UK * Ukrainian Ukraine, Canada, U.S.A. Indo-European F., Balto-Slavic Br. 47 +UR * Urdu Pakistan, India Indo-European F., Indo-Iranian Br. 102 Same as Hindi [HI] except for writing system. See Note 3. +UZ * Uzbek, Uzbeg, Usbek, Usbeg Uzbekstan, Tadzhikstan, Afghanistan Uralo-Altaic F., Turkic Br. 14 +VI * Vietnamese Viet Nam, Thailand, Cambodia, Laos, New Caledonia, France, Dakar Sino-Tibetan F., Sino-Siamese Br. 65 +VO * Volap?k Artificial language +WO * Wolof Senegal, Gambia Niger-Kordofanian F., Non-Mande Br. 7 +XH * Xhosa, Xosa, isiXhosa South Africa, Rhodesia, Swaziland Niger-Kordofanian F., Non-Mande Br. 8 +YI * Yiddish U.S.A., Israel, former USSR, Latin America, Canada, E Europe Indo-European F., Germanic Br. Formerly JI from Jiddisch. See Note 4. +YO * Yoruba Western, Lagos and Kwara States (Nigeria), Benin Niger-Kordofanian F., Non-Mande Br. 20 +ZA Zhuang, Chwang, Chuang China 15 See Note 5. +ZH * Chinese China Sino-Tibetan F., Sino-Siamese Br. 1,200 ZH from Zhongwen. See Note 1. +ZU * Zulu, isiZulu South Africa, Rhodesia, Swaziland Niger-Kordofanian F., Non-Mande Br. 9 Index: xc/lib/fontconfig/fc-lang/iso639-2 diff -u /dev/null xc/lib/fontconfig/fc-lang/iso639-2:1.10 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/iso639-2 Wed Aug 7 20:10:51 2002 @@ -0,0 +1,473 @@ +ISO 639-1 is the alpha-2 code. Multiple codes for the same language are to +be considered synonyms. Entries marked with '*' have Unicode orthographies +built. + + 639-2 639-1 Language Name (English) Language Name (French) + +* aar aa Afar afar +* abk ab Abkhazian abkhaze + ace Achinese aceh + ach Acoli acoli + ada Adangme adangme + afa Afro-Asiatic (Other) afro-asiatiques, autres langues + afh Afrihili afrihili +* afr af Afrikaans afrikaans + aka Akan akan + akk Akkadian akkadien +* alb/sqi* sq Albanian albanais + ale Aleut aléoute + alg Algonquian languages algonquines, langues +* amh am Amharic amharique + ang English, Old (ca.450-1100) anglo-saxon (ca.450-1100) + apa Apache languages apache +* ara ar Arabic arabe + arc Aramaic araméen +* arm/hye* hy Armenian arménien + arn Araucanian araucan + arp Arapaho arapaho + art Artificial (Other) artificielles, autres langues + arw Arawak arawak + asm as Assamese assamais +* ast Asturian; Bable asturien; bable + ath Athapascan languages athapascanes, langues + aus Australian languages australiennes, langues +* ava Avaric avar + ave ae Avestan avestique + awa Awadhi awadhi +* aym ay Aymara aymara +* aze az Azerbaijani azéri + bad Banda banda + bai Bamileke languages bamilékés, langues +* bak ba Bashkir bachkir + bal Baluchi baloutchi +* bam Bambara bambara + ban Balinese balinais +* baq/eus* eu Basque basque + bas Basa basa + bat Baltic (Other) baltiques, autres langues + bej Beja bedja +* bel be Belarusian biélorusse + bem Bemba bemba +* ben bn Bengali bengali + ber Berber (Other) berbères, autres langues + bho Bhojpuri bhojpuri +* bih bh Bihari bihari + bik Bikol bikol +* bin Bini bini +* bis bi Bislama bichlamar + bla Siksika blackfoot + bnt Bantu (Other) bantoues, autres langues +* tib/bod* bo Tibetan tibétain +* bos bs Bosnian bosniaque + bra Braj braj +* bre br Breton breton + btk Batak (Indonesia) batak (Indonésie) +* bua Buriat bouriate + bug Buginese bugi +* bul bg Bulgarian bulgare +* bur/mya* my Burmese birman + cad Caddo caddo + cai Central American Indian (Other) indiennes d'Amérique centrale, autres langues + car Carib caribe +* cat ca Catalan catalan + cau Caucasian (Other) caucasiennes, autres langues + ceb Cebuano cebuano + cel Celtic (Other) celtiques, autres langues +* cze/ces* cs Czech tchèque +* cha ch Chamorro chamorro + chb Chibcha chibcha +* che ce Chechen tchétchène + chg Chagatai djaghataï +* chi/zho* zh Chinese chinois + chk Chuukese chuuk +* chm Mari mari + chn Chinook jargon chinook, jargon + cho Choctaw choctaw + chp Chipewyan chipewyan +* chr Cherokee cherokee +* chu cu Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic slavon d'église; vieux slave; slavon liturgique; vieux bulgare +* chv cv Chuvash tchouvache + chy Cheyenne cheyenne + cmc Chamic languages chames, langues + cop Coptic copte +* cor kw Cornish cornique +* cos co Corsican corse + cpe Creoles and pidgins, English based (Other) créoles et pidgins anglais, autres + cpf Creoles and pidgins, French-based (Other) créoles et pidgins français, autres + cpp Creoles and pidgins, Portuguese-based (Other) créoles et pidgins portugais, autres + cre Cree cree + crp Creoles and pidgins (Other) créoles et pidgins divers + cus Cushitic (Other) couchitiques, autres langues +* wel/cym* cy Welsh gallois +* cze/ces* cs Czech tchèque + dak Dakota dakota +* dan da Danish danois + day Dayak dayak + del Delaware delaware + den Slave (Athapascan) esclave (athapascan) +* ger/deu* de German allemand + dgr Dogrib dogrib + din Dinka dinka + div Divehi maldivien + doi Dogri dogri + dra Dravidian (Other) dravidiennes, autres langues + dua Duala douala + dum Dutch, Middle (ca.1050-1350) néerlandais moyen (ca. 1050-1350) +* dut/nld* nl Dutch néerlandais + dyu Dyula dioula +* dzo dz Dzongkha dzongkha + efi Efik efik + egy Egyptian (Ancient) égyptien + eka Ekajuk ekajuk +* gre/ell* el Greek, Modern (1453-) grec moderne (après 1453) + elx Elamite élamite +* eng en English anglais + enm English, Middle (1100-1500) anglais moyen (1100-1500) +* epo eo Esperanto espéranto +* est et Estonian estonien +* baq/eus* eu Basque basque + ewe Ewe éwé + ewo Ewondo éwondo + fan Fang fang +* fao fo Faroese féroïen +* per/fas* fa Persian persan + fat Fanti fanti +* fij fj Fijian fidjien +* fin fi Finnish finnois + fiu Finno-Ugrian (Other) finno-ougriennes, autres langues + fon Fon fon +* fre/fra* fr French français + frm French, Middle (ca.1400-1800) français moyen (1400-1800) + fro French, Old (842-ca.1400) français ancien (842-ca.1400) +* fry fy Frisian frison +* ful Fulah peul +* fur Friulian frioulan + gaa Ga ga + gay Gayo gayo + gba Gbaya gbaya + gem Germanic (Other) germaniques, autres langues +* geo/kat* ka Georgian géorgien +* ger/deu* de German allemand +* gez Geez guèze + gil Gilbertese kiribati +* gla gd Gaelic; Scottish Gaelic gaélique; gaélique écossais +* gle ga Irish irlandais +* glg gl Gallegan galicien +* glv gv Manx manx; mannois + gmh German, Middle High (ca.1050-1500) allemand, moyen haut (ca. 1050-1500) + goh German, Old High (ca.750-1050) allemand, vieux haut (ca. 750-1050) + gon Gondi gond + gor Gorontalo gorontalo + got Gothic gothique + grb Grebo grebo + grc Greek, Ancient (to 1453) grec ancien (jusqu'à 1453) +* gre/ell* el Greek, Modern (1453-) grec moderne (après 1453) +* grn gn Guarani guarani +* guj gu Gujarati goudjrati + gwi Gwich´in gwich´in + hai Haida haida +* hau ha Hausa haoussa +* haw Hawaiian hawaïen +* heb he Hebrew hébreu + her hz Herero herero + hil Hiligaynon hiligaynon + him Himachali himachali +* hin hi Hindi hindi + hit Hittite hittite + hmn Hmong hmong +* hmo ho Hiri Motu hiri motu +* scr/hrv* hr Croatian croate +* hun hu Hungarian hongrois + hup Hupa hupa +* arm/hye* hy Armenian arménien + iba Iban iban +* ibo Igbo igbo +* ice/isl* is Icelandic islandais +* ido io Ido ido + ijo Ijo ijo +* iku iu Inuktitut inuktitut +* ile ie Interlingue interlingue + ilo Iloko ilocano +* ina ia Interlingua (International Auxiliary Language Association) interlingua (langue auxiliaire internationale) + inc Indic (Other) indo-aryennes, autres langues +* ind id Indonesian indonésien + ine Indo-European (Other) indo-européennes, autres langues +* ipk ik Inupiaq inupiaq + ira Iranian (Other) iraniennes, autres langues + iro Iroquoian languages iroquoises, langues (famille) +* ice/isl* is Icelandic islandais +* ita it Italian italien + jav jv Javanese javanais +* jpn ja Japanese japonais + jpr Judeo-Persian judéo-persan + jrb Judeo-Arabic judéo-arabe +* kaa Kara-Kalpak karakalpak + kab Kabyle kabyle + kac Kachin kachin +* kal kl Kalaallisut groenlandais + kam Kamba kamba +* kan kn Kannada kannada + kar Karen karen +* kas ks Kashmiri kashmiri +* geo/kat* ka Georgian géorgien + kau Kanuri kanouri + kaw Kawi kawi +* kaz kk Kazakh kazakh + kha Khasi khasi + khi Khoisan (Other) khoisan, autres langues +* khm km Khmer khmer + kho Khotanese khotanais +* kik ki Kikuyu; Gikuyu kikuyu + kin rw Kinyarwanda rwanda +* kir ky Kirghiz kirghize + kmb Kimbundu kimbundu +* kok Konkani konkani +* kom kv Komi kom + kon Kongo kongo +* kor ko Korean coréen + kos Kosraean kosrae + kpe Kpelle kpellé + kro Kru krou + kru Kurukh kurukh + kua kj Kuanyama; Kwanyama kuanyama; kwanyama +* kum Kumyk koumyk +* kur ku Kurdish kurde + kut Kutenai kutenai + lad Ladino judéo-espagnol + lah Lahnda lahnda + lam Lamba lamba +* lao lo Lao lao +* lat la Latin latin +* lav lv Latvian letton +* lez Lezghian lezghien + lin ln Lingala lingala +* lit lt Lithuanian lituanien + lol Mongo mongo + loz Lozi lozi +* ltz lb Luxembourgish; Letzeburgesch luxembourgeois + lua Luba-Lulua luba-lulua + lub Luba-Katanga luba-katanga + lug Ganda ganda + lui Luiseno luiseno + lun Lunda lunda + luo Luo (Kenya and Tanzania) luo (Kenya et Tanzanie) + lus lushai Lushai +* mac/mkd* mk Macedonian macédonien + mad Madurese madourais + mag Magahi magahi +* mah mh Marshallese marshall + mai Maithili maithili + mak Makasar makassar +* mal ml Malayalam malayalam + man Mandingo mandingue +* mao/mri* mi Maori maori + map Austronesian (Other) malayo-polynésiennes, autres langues +* mar mr Marathi marathe + mas Masai massaï + may/msa* ms Malay malais + mdr Mandar mandar + men Mende mendé + mga Irish, Middle (900-1200) irlandais moyen (900-1200) + mic Micmac micmac + min Minangkabau minangkabau + mis Miscellaneous languages diverses, langues +* mac/mkd* mk Macedonian macédonien + mkh Mon-Khmer (Other) môn-khmer, autres langues +* mlg mg Malagasy malgache +* mlt mt Maltese maltais + mnc Manchu mandchou + mni Manipuri manipuri + mno Manobo languages manobo, langues + moh Mohawk mohawk +* mol mo Moldavian moldave +* mon mn Mongolian mongol + mos Mossi moré +* mao/mri* mi Maori maori + may/msa* ms Malay malais + mul Multiple languages multilingue + mun Munda languages mounda, langues + mus Creek muskogee + mwr Marwari marvari +* bur/mya* my Burmese birman + myn Mayan languages maya, langues + nah Nahuatl nahuatl + nai North American Indian indiennes d'Amérique du Nord, autres langues + nau na Nauru nauruan + nav nv Navajo; Navaho navaho + nbl nr Ndebele, South; South Ndebele ndébélé du Sud + nde nd Ndebele, North; North Ndebele ndébélé du Nord + ndo ng Ndonga ndonga + nds Low German; Low Saxon; German, Low; Saxon, Low bas allemand; bas saxon; allemand, bas; saxon, bas +* nep ne Nepali népalais + new Newari newari + nia Nias nias + nic Niger-Kordofanian (Other) nigéro-congolaises, autres langues + niu Niuean niué +* dut/nld* nl Dutch néerlandais + non Norse, Old norrois, vieux +* nor no Norwegian norvégien +* nno nn Norwegian Nynorsk; Nynorsk, Norwegian norvégien nynorsk; nynorsk, norvégien +* nob nb Norwegian Bokmål; Bokmål, Norwegian norvégien bokmål; bokmål, norvégien + nso Sotho, Northern sotho du Nord + nub Nubian languages nubiennes, langues +* nya ny Chichewa; Chewa; Nyanja chichewa; chewa; nyanja + nym Nyamwezi nyamwezi + nyn Nyankole nyankolé + nyo Nyoro nyoro + nzi Nzima nzema +* oci oc Occitan (post 1500); Provençal occitan (après 1500); provençal + oji Ojibwa ojibwa +* ori or Oriya oriya +* orm om Oromo galla + osa Osage osage +* oss os Ossetian; Ossetic ossète + ota Turkish, Ottoman (1500-1928) turc ottoman (1500-1928) + oto Otomian languages otomangue, langues + paa Papuan (Other) papoues, autres langues + pag Pangasinan pangasinan + pal Pahlavi pahlavi + pam Pampanga pampangan + pan pa Panjabi pendjabi + pap Papiamento papiamento + pau Palauan palau + peo Persian, Old (ca.600-400 B.C.) perse, vieux (ca. 600-400 av. J.-C.) +* per/fas* fa Persian persan + phi Philippine (Other) philippines, autres langues + phn Phoenician phénicien + pli pi Pali pali +* pol pl Polish polonais + pon Pohnpeian pohnpei +* por pt Portuguese portugais + pra Prakrit languages prâkrit + pro Provençal, Old (to 1500) provençal ancien (jusqu'à 1500) + pus ps Pushto pachto + qaa-qtz Reserved for local use réservée à l'usage local + que qu Quechua quechua + raj Rajasthani rajasthani + rap Rapanui rapanui + rar Rarotongan rarotonga + roa Romance (Other) romanes, autres langues +* roh rm Raeto-Romance rhéto-roman + rom Romany tsigane +* rum/ron* ro Romanian roumain + run rn Rundi rundi +* rus ru Russian russe + sad Sandawe sandawe + sag sg Sango sango +* sah Yakut iakoute + sai South American Indian (Other) indiennes d'Amérique du Sud, autres langues + sal Salishan languages salish, langues + sam Samaritan Aramaic samaritain +* san sa Sanskrit sanskrit + sas Sasak sasak + sat Santali santal +* scc/srp* sr Serbian serbe +* sco Scots écossais +* scr/hrv* hr Croatian croate +* sel Selkup selkoupe + sem Semitic (Other) sémitiques, autres langues + sga Irish, Old (to 900) irlandais ancien (jusqu'à 900) + sgn Sign Languages langues des signes + shn Shan chan + sid Sidamo sidamo +* sin si Sinhalese singhalais + sio Siouan languages sioux, langues + sit Sino-Tibetan (Other) sino-tibétaines, autres langues + sla Slavic (Other) slaves, autres langues +* slo/slk* sk Slovak slovaque +* slv sl Slovenian slovène +* sma Southern Sami sami du Sud +* sme se Northern Sami sami du Nord + smi Sami languages (Other) sami, autres langues +* smj Lule Sami sami de Lule +* smn Inari Sami sami d'Inari +* smo sm Samoan samoan +* sms Skolt Sami sami skolt + sna sn Shona shona + snd sd Sindhi sindhi + snk Soninke soninké + sog Sogdian sogdien +* som so Somali somali + son Songhai songhai + sot st Sotho, Southern sotho du Sud +* spa es Spanish; Castilian espagnol; castillan +* alb/sqi* sq Albanian albanais + srd sc Sardinian sarde +* scc/srp* sr Serbian serbe +* sh Serbo-Croatian serbo-croate + srr Serer sérère + ssa Nilo-Saharan (Other) nilo-sahariennes, autres langues + ssw ss Swati swati + suk Sukuma sukuma + sun su Sundanese soundanais + sus Susu soussou + sux Sumerian sumérien +* swa sw Swahili swahili +* swe sv Swedish suédois +* syr Syriac syriaque + tah ty Tahitian tahitien + tai Tai (Other) thaïes, autres langues +* tam ta Tamil tamoul +* tat tt Tatar tatar +* tel te Telugu télougou + tem Timne temne + ter Tereno tereno + tet Tetum tetum +* tgk tg Tajik tadjik +* tgl tl Tagalog tagalog +* tha th Thai thaï +* tib/bod* bo Tibetan tibétain + tig Tigre tigré +* tir ti Tigrinya tigrigna + tiv Tiv tiv + tkl Tokelau tokelau + tli Tlingit tlingit + tmh Tamashek tamacheq + tog Tonga (Nyasa) tonga (Nyasa) +* ton to Tonga (Tonga Islands) tongan (Îles Tonga) + tpi Tok Pisin tok pisin + tsi Tsimshian tsimshian +* tsn tn Tswana tswana +* tso ts Tsonga tsonga +* tuk tk Turkmen turkmène + tum Tumbuka tumbuka + tup Tupi languages tupi, langues +* tur tr Turkish turc + tut Altaic (Other) altaïques, autres langues + tvl Tuvalu tuvalu +* twi tw Twi twi +* tyv Tuvinian touva + uga Ugaritic ougaritique +* uig ug Uighur ouïgour +* ukr uk Ukrainian ukrainien + umb Umbundu umbundu + und Undetermined indéterminée +* urd ur Urdu ourdou +* uzb uz Uzbek ouszbek + vai Vai vaï +* ven Venda venda +* vie vi Vietnamese vietnamien +* vol vo Volapük volapük +* vot Votic vote + wak Wakashan languages wakashennes, langues + wal Walamo walamo + war Waray waray + was Washo washo +* wel/cym* cy Welsh gallois +* wen Sorbian languages sorabes, langues +* wln wa Walloon wallon +* wol wo Wolof wolof +* xho xh Xhosa xhosa + yao Yao yao +* yap Yapese yapois +* yid yi Yiddish yiddish +* yor yo Yoruba yoruba + ypk Yupik languages yupik, langues + zap Zapotec zapotèque + zen Zenaga zenaga + zha za Zhuang; Chuang zhuang; chuang +* chi/zho* zh Chinese chinois + znd Zande zandé +* zul zu Zulu zoulou + zun Zuni zuni + Index: xc/lib/fontconfig/fc-lang/it.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/it.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/it.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,51 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/it.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Italian (IT) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00c0 +#00c1 +00c8-00c9 +00cc +00cd +#00ce +00cf +00d2-00d3 +00d9 +00da +00e0 +#00e1 +00e8-00e9 +00ec +00ed +#00ee +00ef +00f2-00f3 +00f9 +00fa Index: xc/lib/fontconfig/fc-lang/iu.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/iu.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/iu.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,77 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/iu.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Inuktitut (IU) +# +# Taken from alphabetic coverage of the Pigiarniq font as +# produced by the legislative assembly of Nunavut +# http://www.assembly.nu.ca/unicode/fonts/ +# +1401-1406 +140a-140b +142f-1434 +1438-1439 +1449 +144c-1451 +1455-1456 +1466 +146b-1470 +1472-1473 +1483 +1489-148e +1490-1491 +14a1 +14a3-14a8 +14aa-14ab +14bb +14c0-14c5 +14c7-14c8 +14d0 +14d3-14d8 +14da-14db +14ea +14ed-14f2 +14f4-14f5 +14fa +14fc +14fe +1500 +1502 +1505 +1526-152b +152d-152e +153e +1542 +1545-1549 +154b-154c +1550 +1553-155a +155d +1575-1577 +1579-157c +157e-1585 +158b-1596 +15a0-15a6 +15a8-15ae +166f +1670-1676 Index: xc/lib/fontconfig/fc-lang/ja.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ja.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ja.orth Mon Aug 19 15:32:00 2002 @@ -0,0 +1,6565 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ja.orth,v 1.4 2002/08/19 19:32:00 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage from JIS X 0208 (1990) +# +0x3000 # IDEOGRAPHIC SPACE +0x3001 # IDEOGRAPHIC COMMA +0x3002 # IDEOGRAPHIC FULL STOP +0x3005 # IDEOGRAPHIC ITERATION MARK +0x3006 # IDEOGRAPHIC CLOSING MARK +0x3007 # IDEOGRAPHIC NUMBER ZERO +0x3041 # HIRAGANA LETTER SMALL A +0x3042 # HIRAGANA LETTER A +0x3043 # HIRAGANA LETTER SMALL I +0x3044 # HIRAGANA LETTER I +0x3045 # HIRAGANA LETTER SMALL U +0x3046 # HIRAGANA LETTER U +0x3047 # HIRAGANA LETTER SMALL E +0x3048 # HIRAGANA LETTER E +0x3049 # HIRAGANA LETTER SMALL O +0x304A # HIRAGANA LETTER O +0x304B # HIRAGANA LETTER KA +0x304C # HIRAGANA LETTER GA +0x304D # HIRAGANA LETTER KI +0x304E # HIRAGANA LETTER GI +0x304F # HIRAGANA LETTER KU +0x3050 # HIRAGANA LETTER GU +0x3051 # HIRAGANA LETTER KE +0x3052 # HIRAGANA LETTER GE +0x3053 # HIRAGANA LETTER KO +0x3054 # HIRAGANA LETTER GO +0x3055 # HIRAGANA LETTER SA +0x3056 # HIRAGANA LETTER ZA +0x3057 # HIRAGANA LETTER SI +0x3058 # HIRAGANA LETTER ZI +0x3059 # HIRAGANA LETTER SU +0x305A # HIRAGANA LETTER ZU +0x305B # HIRAGANA LETTER SE +0x305C # HIRAGANA LETTER ZE +0x305D # HIRAGANA LETTER SO +0x305E # HIRAGANA LETTER ZO +0x305F # HIRAGANA LETTER TA +0x3060 # HIRAGANA LETTER DA +0x3061 # HIRAGANA LETTER TI +0x3062 # HIRAGANA LETTER DI +0x3063 # HIRAGANA LETTER SMALL TU +0x3064 # HIRAGANA LETTER TU +0x3065 # HIRAGANA LETTER DU +0x3066 # HIRAGANA LETTER TE +0x3067 # HIRAGANA LETTER DE +0x3068 # HIRAGANA LETTER TO +0x3069 # HIRAGANA LETTER DO +0x306A # HIRAGANA LETTER NA +0x306B # HIRAGANA LETTER NI +0x306C # HIRAGANA LETTER NU +0x306D # HIRAGANA LETTER NE +0x306E # HIRAGANA LETTER NO +0x306F # HIRAGANA LETTER HA +0x3070 # HIRAGANA LETTER BA +0x3071 # HIRAGANA LETTER PA +0x3072 # HIRAGANA LETTER HI +0x3073 # HIRAGANA LETTER BI +0x3074 # HIRAGANA LETTER PI +0x3075 # HIRAGANA LETTER HU +0x3076 # HIRAGANA LETTER BU +0x3077 # HIRAGANA LETTER PU +0x3078 # HIRAGANA LETTER HE +0x3079 # HIRAGANA LETTER BE +0x307A # HIRAGANA LETTER PE +0x307B # HIRAGANA LETTER HO +0x307C # HIRAGANA LETTER BO +0x307D # HIRAGANA LETTER PO +0x307E # HIRAGANA LETTER MA +0x307F # HIRAGANA LETTER MI +0x3080 # HIRAGANA LETTER MU +0x3081 # HIRAGANA LETTER ME +0x3082 # HIRAGANA LETTER MO +0x3083 # HIRAGANA LETTER SMALL YA +0x3084 # HIRAGANA LETTER YA +0x3085 # HIRAGANA LETTER SMALL YU +0x3086 # HIRAGANA LETTER YU +0x3087 # HIRAGANA LETTER SMALL YO +0x3088 # HIRAGANA LETTER YO +0x3089 # HIRAGANA LETTER RA +0x308A # HIRAGANA LETTER RI +0x308B # HIRAGANA LETTER RU +0x308C # HIRAGANA LETTER RE +0x308D # HIRAGANA LETTER RO +0x308E # HIRAGANA LETTER SMALL WA +0x308F # HIRAGANA LETTER WA +0x3090 # HIRAGANA LETTER WI +0x3091 # HIRAGANA LETTER WE +0x3092 # HIRAGANA LETTER WO +0x3093 # HIRAGANA LETTER N +0x309B # KATAKANA-HIRAGANA VOICED SOUND MARK +0x309C # KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK +0x309D # HIRAGANA ITERATION MARK +0x309E # HIRAGANA VOICED ITERATION MARK +0x30A1 # KATAKANA LETTER SMALL A +0x30A2 # KATAKANA LETTER A +0x30A3 # KATAKANA LETTER SMALL I +0x30A4 # KATAKANA LETTER I +0x30A5 # KATAKANA LETTER SMALL U +0x30A6 # KATAKANA LETTER U +0x30A7 # KATAKANA LETTER SMALL E +0x30A8 # KATAKANA LETTER E +0x30A9 # KATAKANA LETTER SMALL O +0x30AA # KATAKANA LETTER O +0x30AB # KATAKANA LETTER KA +0x30AC # KATAKANA LETTER GA +0x30AD # KATAKANA LETTER KI +0x30AE # KATAKANA LETTER GI +0x30AF # KATAKANA LETTER KU +0x30B0 # KATAKANA LETTER GU +0x30B1 # KATAKANA LETTER KE +0x30B2 # KATAKANA LETTER GE +0x30B3 # KATAKANA LETTER KO +0x30B4 # KATAKANA LETTER GO +0x30B5 # KATAKANA LETTER SA +0x30B6 # KATAKANA LETTER ZA +0x30B7 # KATAKANA LETTER SI +0x30B8 # KATAKANA LETTER ZI +0x30B9 # KATAKANA LETTER SU +0x30BA # KATAKANA LETTER ZU +0x30BB # KATAKANA LETTER SE +0x30BC # KATAKANA LETTER ZE +0x30BD # KATAKANA LETTER SO +0x30BE # KATAKANA LETTER ZO +0x30BF # KATAKANA LETTER TA +0x30C0 # KATAKANA LETTER DA +0x30C1 # KATAKANA LETTER TI +0x30C2 # KATAKANA LETTER DI +0x30C3 # KATAKANA LETTER SMALL TU +0x30C4 # KATAKANA LETTER TU +0x30C5 # KATAKANA LETTER DU +0x30C6 # KATAKANA LETTER TE +0x30C7 # KATAKANA LETTER DE +0x30C8 # KATAKANA LETTER TO +0x30C9 # KATAKANA LETTER DO +0x30CA # KATAKANA LETTER NA +0x30CB # KATAKANA LETTER NI +0x30CC # KATAKANA LETTER NU +0x30CD # KATAKANA LETTER NE +0x30CE # KATAKANA LETTER NO +0x30CF # KATAKANA LETTER HA +0x30D0 # KATAKANA LETTER BA +0x30D1 # KATAKANA LETTER PA +0x30D2 # KATAKANA LETTER HI +0x30D3 # KATAKANA LETTER BI +0x30D4 # KATAKANA LETTER PI +0x30D5 # KATAKANA LETTER HU +0x30D6 # KATAKANA LETTER BU +0x30D7 # KATAKANA LETTER PU +0x30D8 # KATAKANA LETTER HE +0x30D9 # KATAKANA LETTER BE +0x30DA # KATAKANA LETTER PE +0x30DB # KATAKANA LETTER HO +0x30DC # KATAKANA LETTER BO +0x30DD # KATAKANA LETTER PO +0x30DE # KATAKANA LETTER MA +0x30DF # KATAKANA LETTER MI +0x30E0 # KATAKANA LETTER MU +0x30E1 # KATAKANA LETTER ME +0x30E2 # KATAKANA LETTER MO +0x30E3 # KATAKANA LETTER SMALL YA +0x30E4 # KATAKANA LETTER YA +0x30E5 # KATAKANA LETTER SMALL YU +0x30E6 # KATAKANA LETTER YU +0x30E7 # KATAKANA LETTER SMALL YO +0x30E8 # KATAKANA LETTER YO +0x30E9 # KATAKANA LETTER RA +0x30EA # KATAKANA LETTER RI +0x30EB # KATAKANA LETTER RU +0x30EC # KATAKANA LETTER RE +0x30ED # KATAKANA LETTER RO +0x30EE # KATAKANA LETTER SMALL WA +0x30EF # KATAKANA LETTER WA +0x30F0 # KATAKANA LETTER WI +0x30F1 # KATAKANA LETTER WE +0x30F2 # KATAKANA LETTER WO +0x30F3 # KATAKANA LETTER N +0x30F4 # KATAKANA LETTER VU +0x30F5 # KATAKANA LETTER SMALL KA +0x30F6 # KATAKANA LETTER SMALL KE +0x30FB # KATAKANA MIDDLE DOT +0x30FC # KATAKANA-HIRAGANA PROLONGED SOUND MARK +0x30FD # KATAKANA ITERATION MARK +0x30FE # KATAKANA VOICED ITERATION MARK +0x4E00 # <CJK> +0x4E01 # <CJK> +0x4E03 # <CJK> +0x4E07 # <CJK> +0x4E08 # <CJK> +0x4E09 # <CJK> +0x4E0A # <CJK> +0x4E0B # <CJK> +0x4E0D # <CJK> +0x4E0E # <CJK> +0x4E10 # <CJK> +0x4E11 # <CJK> +0x4E14 # <CJK> +0x4E15 # <CJK> +0x4E16 # <CJK> +0x4E17 # <CJK> +0x4E18 # <CJK> +0x4E19 # <CJK> +0x4E1E # <CJK> +0x4E21 # <CJK> +0x4E26 # <CJK> +0x4E2A # <CJK> +0x4E2D # <CJK> +0x4E31 # <CJK> +0x4E32 # <CJK> +0x4E36 # <CJK> +0x4E38 # <CJK> +0x4E39 # <CJK> +0x4E3B # <CJK> +0x4E3C # <CJK> +0x4E3F # <CJK> +0x4E42 # <CJK> +0x4E43 # <CJK> +0x4E45 # <CJK> +0x4E4B # <CJK> +0x4E4D # <CJK> +0x4E4E # <CJK> +0x4E4F # <CJK> +0x4E55 # <CJK> +0x4E56 # <CJK> +0x4E57 # <CJK> +0x4E58 # <CJK> +0x4E59 # <CJK> +0x4E5D # <CJK> +0x4E5E # <CJK> +0x4E5F # <CJK> +0x4E62 # <CJK> +0x4E71 # <CJK> +0x4E73 # <CJK> +0x4E7E # <CJK> +0x4E80 # <CJK> +0x4E82 # <CJK> +0x4E85 # <CJK> +0x4E86 # <CJK> +0x4E88 # <CJK> +0x4E89 # <CJK> +0x4E8A # <CJK> +0x4E8B # <CJK> +0x4E8C # <CJK> +0x4E8E # <CJK> +0x4E91 # <CJK> +0x4E92 # <CJK> +0x4E94 # <CJK> +0x4E95 # <CJK> +0x4E98 # <CJK> +0x4E99 # <CJK> +0x4E9B # <CJK> +0x4E9C # <CJK> +0x4E9E # <CJK> +0x4E9F # <CJK> +0x4EA0 # <CJK> +0x4EA1 # <CJK> +0x4EA2 # <CJK> +0x4EA4 # <CJK> +0x4EA5 # <CJK> +0x4EA6 # <CJK> +0x4EA8 # <CJK> +0x4EAB # <CJK> +0x4EAC # <CJK> +0x4EAD # <CJK> +0x4EAE # <CJK> +0x4EB0 # <CJK> +0x4EB3 # <CJK> +0x4EB6 # <CJK> +0x4EBA # <CJK> +0x4EC0 # <CJK> +0x4EC1 # <CJK> +0x4EC2 # <CJK> +0x4EC4 # <CJK> +0x4EC6 # <CJK> +0x4EC7 # <CJK> +0x4ECA # <CJK> +0x4ECB # <CJK> +0x4ECD # <CJK> +0x4ECE # <CJK> +0x4ECF # <CJK> +0x4ED4 # <CJK> +0x4ED5 # <CJK> +0x4ED6 # <CJK> +0x4ED7 # <CJK> +0x4ED8 # <CJK> +0x4ED9 # <CJK> +0x4EDD # <CJK> +0x4EDE # <CJK> +0x4EDF # <CJK> +0x4EE3 # <CJK> +0x4EE4 # <CJK> +0x4EE5 # <CJK> +0x4EED # <CJK> +0x4EEE # <CJK> +0x4EF0 # <CJK> +0x4EF2 # <CJK> +0x4EF6 # <CJK> +0x4EF7 # <CJK> +0x4EFB # <CJK> +0x4F01 # <CJK> +0x4F09 # <CJK> +0x4F0A # <CJK> +0x4F0D # <CJK> +0x4F0E # <CJK> +0x4F0F # <CJK> +0x4F10 # <CJK> +0x4F11 # <CJK> +0x4F1A # <CJK> +0x4F1C # <CJK> +0x4F1D # <CJK> +0x4F2F # <CJK> +0x4F30 # <CJK> +0x4F34 # <CJK> +0x4F36 # <CJK> +0x4F38 # <CJK> +0x4F3A # <CJK> +0x4F3C # <CJK> +0x4F3D # <CJK> +0x4F43 # <CJK> +0x4F46 # <CJK> +0x4F47 # <CJK> +0x4F4D # <CJK> +0x4F4E # <CJK> +0x4F4F # <CJK> +0x4F50 # <CJK> +0x4F51 # <CJK> +0x4F53 # <CJK> +0x4F55 # <CJK> +0x4F57 # <CJK> +0x4F59 # <CJK> +0x4F5A # <CJK> +0x4F5B # <CJK> +0x4F5C # <CJK> +0x4F5D # <CJK> +0x4F5E # <CJK> +0x4F69 # <CJK> +0x4F6F # <CJK> +0x4F70 # <CJK> +0x4F73 # <CJK> +0x4F75 # <CJK> +0x4F76 # <CJK> +0x4F7B # <CJK> +0x4F7C # <CJK> +0x4F7F # <CJK> +0x4F83 # <CJK> +0x4F86 # <CJK> +0x4F88 # <CJK> +0x4F8B # <CJK> +0x4F8D # <CJK> +0x4F8F # <CJK> +0x4F91 # <CJK> +0x4F96 # <CJK> +0x4F98 # <CJK> +0x4F9B # <CJK> +0x4F9D # <CJK> +0x4FA0 # <CJK> +0x4FA1 # <CJK> +0x4FAB # <CJK> +0x4FAD # <CJK> +0x4FAE # <CJK> +0x4FAF # <CJK> +0x4FB5 # <CJK> +0x4FB6 # <CJK> +0x4FBF # <CJK> +0x4FC2 # <CJK> +0x4FC3 # <CJK> +0x4FC4 # <CJK> +0x4FCA # <CJK> +0x4FCE # <CJK> +0x4FD0 # <CJK> +0x4FD1 # <CJK> +0x4FD4 # <CJK> +0x4FD7 # <CJK> +0x4FD8 # <CJK> +0x4FDA # <CJK> +0x4FDB # <CJK> +0x4FDD # <CJK> +0x4FDF # <CJK> +0x4FE1 # <CJK> +0x4FE3 # <CJK> +0x4FE4 # <CJK> +0x4FE5 # <CJK> +0x4FEE # <CJK> +0x4FEF # <CJK> +0x4FF3 # <CJK> +0x4FF5 # <CJK> +0x4FF6 # <CJK> +0x4FF8 # <CJK> +0x4FFA # <CJK> +0x4FFE # <CJK> +0x5005 # <CJK> +0x5006 # <CJK> +0x5009 # <CJK> +0x500B # <CJK> +0x500D # <CJK> +0x500F # <CJK> +0x5011 # <CJK> +0x5012 # <CJK> +0x5014 # <CJK> +0x5016 # <CJK> +0x5019 # <CJK> +0x501A # <CJK> +0x501F # <CJK> +0x5021 # <CJK> +0x5023 # <CJK> +0x5024 # <CJK> +0x5025 # <CJK> +0x5026 # <CJK> +0x5028 # <CJK> +0x5029 # <CJK> +0x502A # <CJK> +0x502B # <CJK> +0x502C # <CJK> +0x502D # <CJK> +0x5036 # <CJK> +0x5039 # <CJK> +0x5043 # <CJK> +0x5047 # <CJK> +0x5048 # <CJK> +0x5049 # <CJK> +0x504F # <CJK> +0x5050 # <CJK> +0x5055 # <CJK> +0x5056 # <CJK> +0x505A # <CJK> +0x505C # <CJK> +0x5065 # <CJK> +0x506C # <CJK> +0x5072 # <CJK> +0x5074 # <CJK> +0x5075 # <CJK> +0x5076 # <CJK> +0x5078 # <CJK> +0x507D # <CJK> +0x5080 # <CJK> +0x5085 # <CJK> +0x508D # <CJK> +0x5091 # <CJK> +0x5098 # <CJK> +0x5099 # <CJK> +0x509A # <CJK> +0x50AC # <CJK> +0x50AD # <CJK> +0x50B2 # <CJK> +0x50B3 # <CJK> +0x50B4 # <CJK> +0x50B5 # <CJK> +0x50B7 # <CJK> +0x50BE # <CJK> +0x50C2 # <CJK> +0x50C5 # <CJK> +0x50C9 # <CJK> +0x50CA # <CJK> +0x50CD # <CJK> +0x50CF # <CJK> +0x50D1 # <CJK> +0x50D5 # <CJK> +0x50D6 # <CJK> +0x50DA # <CJK> +0x50DE # <CJK> +0x50E3 # <CJK> +0x50E5 # <CJK> +0x50E7 # <CJK> +0x50ED # <CJK> +0x50EE # <CJK> +0x50F5 # <CJK> +0x50F9 # <CJK> +0x50FB # <CJK> +0x5100 # <CJK> +0x5101 # <CJK> +0x5102 # <CJK> +0x5104 # <CJK> +0x5109 # <CJK> +0x5112 # <CJK> +0x5114 # <CJK> +0x5115 # <CJK> +0x5116 # <CJK> +0x5118 # <CJK> +0x511A # <CJK> +0x511F # <CJK> +0x5121 # <CJK> +0x512A # <CJK> +0x5132 # <CJK> +0x5137 # <CJK> +0x513A # <CJK> +0x513B # <CJK> +0x513C # <CJK> +0x513F # <CJK> +0x5140 # <CJK> +0x5141 # <CJK> +0x5143 # <CJK> +0x5144 # <CJK> +0x5145 # <CJK> +0x5146 # <CJK> +0x5147 # <CJK> +0x5148 # <CJK> +0x5149 # <CJK> +0x514B # <CJK> +0x514C # <CJK> +0x514D # <CJK> +0x514E # <CJK> +0x5150 # <CJK> +0x5152 # <CJK> +0x5154 # <CJK> +0x515A # <CJK> +0x515C # <CJK> +0x5162 # <CJK> +0x5165 # <CJK> +0x5168 # <CJK> +0x5169 # <CJK> +0x516A # <CJK> +0x516B # <CJK> +0x516C # <CJK> +0x516D # <CJK> +0x516E # <CJK> +0x5171 # <CJK> +0x5175 # <CJK> +0x5176 # <CJK> +0x5177 # <CJK> +0x5178 # <CJK> +0x517C # <CJK> +0x5180 # <CJK> +0x5182 # <CJK> +0x5185 # <CJK> +0x5186 # <CJK> +0x5189 # <CJK> +0x518A # <CJK> +0x518C # <CJK> +0x518D # <CJK> +0x518F # <CJK> +0x5190 # <CJK> +0x5191 # <CJK> +0x5192 # <CJK> +0x5193 # <CJK> +0x5195 # <CJK> +0x5196 # <CJK> +0x5197 # <CJK> +0x5199 # <CJK> +0x51A0 # <CJK> +0x51A2 # <CJK> +0x51A4 # <CJK> +0x51A5 # <CJK> +0x51A6 # <CJK> +0x51A8 # <CJK> +0x51A9 # <CJK> +0x51AA # <CJK> +0x51AB # <CJK> +0x51AC # <CJK> +0x51B0 # <CJK> +0x51B1 # <CJK> +0x51B2 # <CJK> +0x51B3 # <CJK> +0x51B4 # <CJK> +0x51B5 # <CJK> +0x51B6 # <CJK> +0x51B7 # <CJK> +0x51BD # <CJK> +0x51C4 # <CJK> +0x51C5 # <CJK> +0x51C6 # <CJK> +0x51C9 # <CJK> +0x51CB # <CJK> +0x51CC # <CJK> +0x51CD # <CJK> +0x51D6 # <CJK> +0x51DB # <CJK> +#0x51DC # <CJK> # not in kochi fonts +0x51DD # <CJK> +0x51E0 # <CJK> +0x51E1 # <CJK> +0x51E6 # <CJK> +0x51E7 # <CJK> +0x51E9 # <CJK> +0x51EA # <CJK> +0x51ED # <CJK> +0x51F0 # <CJK> +0x51F1 # <CJK> +0x51F5 # <CJK> +0x51F6 # <CJK> +0x51F8 # <CJK> +0x51F9 # <CJK> +0x51FA # <CJK> +0x51FD # <CJK> +0x51FE # <CJK> +0x5200 # <CJK> +0x5203 # <CJK> +0x5204 # <CJK> +0x5206 # <CJK> +0x5207 # <CJK> +0x5208 # <CJK> +0x520A # <CJK> +0x520B # <CJK> +0x520E # <CJK> +0x5211 # <CJK> +0x5214 # <CJK> +0x5217 # <CJK> +0x521D # <CJK> +0x5224 # <CJK> +0x5225 # <CJK> +0x5227 # <CJK> +0x5229 # <CJK> +0x522A # <CJK> +0x522E # <CJK> +0x5230 # <CJK> +0x5233 # <CJK> +0x5236 # <CJK> +0x5237 # <CJK> +0x5238 # <CJK> +0x5239 # <CJK> +0x523A # <CJK> +0x523B # <CJK> +0x5243 # <CJK> +0x5244 # <CJK> +0x5247 # <CJK> +0x524A # <CJK> +0x524B # <CJK> +0x524C # <CJK> +0x524D # <CJK> +0x524F # <CJK> +0x5254 # <CJK> +0x5256 # <CJK> +0x525B # <CJK> +0x525E # <CJK> +0x5263 # <CJK> +0x5264 # <CJK> +0x5265 # <CJK> +0x5269 # <CJK> +0x526A # <CJK> +0x526F # <CJK> +0x5270 # <CJK> +0x5271 # <CJK> +0x5272 # <CJK> +0x5273 # <CJK> +0x5274 # <CJK> +0x5275 # <CJK> +0x527D # <CJK> +0x527F # <CJK> +0x5283 # <CJK> +0x5287 # <CJK> +0x5288 # <CJK> +0x5289 # <CJK> +0x528D # <CJK> +0x5291 # <CJK> +0x5292 # <CJK> +0x5294 # <CJK> +0x529B # <CJK> +0x529F # <CJK> +0x52A0 # <CJK> +0x52A3 # <CJK> +0x52A9 # <CJK> +0x52AA # <CJK> +0x52AB # <CJK> +0x52AC # <CJK> +0x52AD # <CJK> +0x52B1 # <CJK> +0x52B4 # <CJK> +0x52B5 # <CJK> +0x52B9 # <CJK> +0x52BC # <CJK> +0x52BE # <CJK> +0x52C1 # <CJK> +0x52C3 # <CJK> +0x52C5 # <CJK> +0x52C7 # <CJK> +0x52C9 # <CJK> +0x52CD # <CJK> +0x52D2 # <CJK> +0x52D5 # <CJK> +0x52D7 # <CJK> +0x52D8 # <CJK> +0x52D9 # <CJK> +0x52DD # <CJK> +0x52DE # <CJK> +0x52DF # <CJK> +0x52E0 # <CJK> +0x52E2 # <CJK> +0x52E3 # <CJK> +0x52E4 # <CJK> +0x52E6 # <CJK> +0x52E7 # <CJK> +0x52F2 # <CJK> +0x52F3 # <CJK> +0x52F5 # <CJK> +0x52F8 # <CJK> +0x52F9 # <CJK> +0x52FA # <CJK> +0x52FE # <CJK> +0x52FF # <CJK> +0x5301 # <CJK> +0x5302 # <CJK> +0x5305 # <CJK> +0x5306 # <CJK> +0x5308 # <CJK> +0x530D # <CJK> +0x530F # <CJK> +0x5310 # <CJK> +0x5315 # <CJK> +0x5316 # <CJK> +0x5317 # <CJK> +0x5319 # <CJK> +0x531A # <CJK> +0x531D # <CJK> +0x5320 # <CJK> +0x5321 # <CJK> +0x5323 # <CJK> +0x532A # <CJK> +0x532F # <CJK> +0x5331 # <CJK> +0x5333 # <CJK> +0x5338 # <CJK> +0x5339 # <CJK> +0x533A # <CJK> +0x533B # <CJK> +0x533F # <CJK> +0x5340 # <CJK> +0x5341 # <CJK> +0x5343 # <CJK> +0x5345 # <CJK> +0x5346 # <CJK> +0x5347 # <CJK> +0x5348 # <CJK> +0x5349 # <CJK> +0x534A # <CJK> +0x534D # <CJK> +0x5351 # <CJK> +0x5352 # <CJK> +0x5353 # <CJK> +0x5354 # <CJK> +0x5357 # <CJK> +0x5358 # <CJK> +0x535A # <CJK> +0x535C # <CJK> +0x535E # <CJK> +0x5360 # <CJK> +0x5366 # <CJK> +0x5369 # <CJK> +0x536E # <CJK> +0x536F # <CJK> +0x5370 # <CJK> +0x5371 # <CJK> +0x5373 # <CJK> +0x5374 # <CJK> +0x5375 # <CJK> +0x5377 # <CJK> +0x5378 # <CJK> +0x537B # <CJK> +0x537F # <CJK> +0x5382 # <CJK> +0x5384 # <CJK> +0x5396 # <CJK> +0x5398 # <CJK> +0x539A # <CJK> +0x539F # <CJK> +0x53A0 # <CJK> +0x53A5 # <CJK> +0x53A6 # <CJK> +0x53A8 # <CJK> +0x53A9 # <CJK> +0x53AD # <CJK> +0x53AE # <CJK> +0x53B0 # <CJK> +0x53B3 # <CJK> +0x53B6 # <CJK> +0x53BB # <CJK> +0x53C2 # <CJK> +0x53C3 # <CJK> +0x53C8 # <CJK> +0x53C9 # <CJK> +0x53CA # <CJK> +0x53CB # <CJK> +0x53CC # <CJK> +0x53CD # <CJK> +0x53CE # <CJK> +0x53D4 # <CJK> +0x53D6 # <CJK> +0x53D7 # <CJK> +0x53D9 # <CJK> +0x53DB # <CJK> +0x53DF # <CJK> +0x53E1 # <CJK> +0x53E2 # <CJK> +0x53E3 # <CJK> +0x53E4 # <CJK> +0x53E5 # <CJK> +0x53E8 # <CJK> +0x53E9 # <CJK> +0x53EA # <CJK> +0x53EB # <CJK> +0x53EC # <CJK> +0x53ED # <CJK> +0x53EE # <CJK> +0x53EF # <CJK> +0x53F0 # <CJK> +0x53F1 # <CJK> +0x53F2 # <CJK> +0x53F3 # <CJK> +0x53F6 # <CJK> +0x53F7 # <CJK> +0x53F8 # <CJK> +0x53FA # <CJK> +0x5401 # <CJK> +0x5403 # <CJK> +0x5404 # <CJK> +0x5408 # <CJK> +0x5409 # <CJK> +0x540A # <CJK> +0x540B # <CJK> +0x540C # <CJK> +0x540D # <CJK> +0x540E # <CJK> +0x540F # <CJK> +0x5410 # <CJK> +0x5411 # <CJK> +0x541B # <CJK> +0x541D # <CJK> +0x541F # <CJK> +0x5420 # <CJK> +0x5426 # <CJK> +0x5429 # <CJK> +0x542B # <CJK> +0x542C # <CJK> +0x542D # <CJK> +0x542E # <CJK> +0x5436 # <CJK> +0x5438 # <CJK> +0x5439 # <CJK> +0x543B # <CJK> +0x543C # <CJK> +0x543D # <CJK> +0x543E # <CJK> +0x5440 # <CJK> +0x5442 # <CJK> +0x5446 # <CJK> +0x5448 # <CJK> +0x5449 # <CJK> +0x544A # <CJK> +0x544E # <CJK> +0x5451 # <CJK> +0x545F # <CJK> +0x5468 # <CJK> +0x546A # <CJK> +0x5470 # <CJK> +0x5471 # <CJK> +0x5473 # <CJK> +0x5475 # <CJK> +0x5476 # <CJK> +0x5477 # <CJK> +0x547B # <CJK> +0x547C # <CJK> +0x547D # <CJK> +0x5480 # <CJK> +0x5484 # <CJK> +0x5486 # <CJK> +0x548B # <CJK> +0x548C # <CJK> +0x548E # <CJK> +0x548F # <CJK> +0x5490 # <CJK> +0x5492 # <CJK> +0x54A2 # <CJK> +0x54A4 # <CJK> +0x54A5 # <CJK> +0x54A8 # <CJK> +0x54AB # <CJK> +0x54AC # <CJK> +0x54AF # <CJK> +0x54B2 # <CJK> +0x54B3 # <CJK> +0x54B8 # <CJK> +0x54BC # <CJK> +0x54BD # <CJK> +0x54BE # <CJK> +0x54C0 # <CJK> +0x54C1 # <CJK> +0x54C2 # <CJK> +0x54C4 # <CJK> +0x54C7 # <CJK> +0x54C8 # <CJK> +0x54C9 # <CJK> +0x54D8 # <CJK> +0x54E1 # <CJK> +0x54E2 # <CJK> +0x54E5 # <CJK> +0x54E6 # <CJK> +0x54E8 # <CJK> +0x54E9 # <CJK> +0x54ED # <CJK> +0x54EE # <CJK> +0x54F2 # <CJK> +0x54FA # <CJK> +0x54FD # <CJK> +0x5504 # <CJK> +0x5506 # <CJK> +0x5507 # <CJK> +0x550F # <CJK> +0x5510 # <CJK> +0x5514 # <CJK> +0x5516 # <CJK> +0x552E # <CJK> +0x552F # <CJK> +0x5531 # <CJK> +0x5533 # <CJK> +0x5538 # <CJK> +0x5539 # <CJK> +0x553E # <CJK> +0x5540 # <CJK> +0x5544 # <CJK> +0x5545 # <CJK> +0x5546 # <CJK> +0x554C # <CJK> +0x554F # <CJK> +0x5553 # <CJK> +0x5556 # <CJK> +0x5557 # <CJK> +0x555C # <CJK> +0x555D # <CJK> +0x5563 # <CJK> +0x557B # <CJK> +0x557C # <CJK> +0x557E # <CJK> +0x5580 # <CJK> +0x5583 # <CJK> +0x5584 # <CJK> +0x5587 # <CJK> +0x5589 # <CJK> +0x558A # <CJK> +0x558B # <CJK> +0x5598 # <CJK> +0x5599 # <CJK> +0x559A # <CJK> +0x559C # <CJK> +0x559D # <CJK> +0x559E # <CJK> +0x559F # <CJK> +0x55A7 # <CJK> +0x55A8 # <CJK> +0x55A9 # <CJK> +0x55AA # <CJK> +0x55AB # <CJK> +0x55AC # <CJK> +0x55AE # <CJK> +0x55B0 # <CJK> +0x55B6 # <CJK> +0x55C4 # <CJK> +0x55C5 # <CJK> +0x55C7 # <CJK> +0x55D4 # <CJK> +0x55DA # <CJK> +0x55DC # <CJK> +0x55DF # <CJK> +0x55E3 # <CJK> +0x55E4 # <CJK> +0x55F7 # <CJK> +0x55F9 # <CJK> +0x55FD # <CJK> +0x55FE # <CJK> +0x5606 # <CJK> +0x5609 # <CJK> +0x5614 # <CJK> +0x5616 # <CJK> +0x5617 # <CJK> +0x5618 # <CJK> +0x561B # <CJK> +0x5629 # <CJK> +0x562F # <CJK> +0x5631 # <CJK> +0x5632 # <CJK> +0x5634 # <CJK> +0x5636 # <CJK> +0x5638 # <CJK> +0x5642 # <CJK> +0x564C # <CJK> +0x564E # <CJK> +0x5650 # <CJK> +0x565B # <CJK> +0x5664 # <CJK> +0x5668 # <CJK> +0x566A # <CJK> +0x566B # <CJK> +0x566C # <CJK> +0x5674 # <CJK> +0x5678 # <CJK> +0x567A # <CJK> +0x5680 # <CJK> +0x5686 # <CJK> +0x5687 # <CJK> +0x568A # <CJK> +0x568F # <CJK> +0x5694 # <CJK> +0x56A0 # <CJK> +0x56A2 # <CJK> +0x56A5 # <CJK> +0x56AE # <CJK> +0x56B4 # <CJK> +0x56B6 # <CJK> +0x56BC # <CJK> +0x56C0 # <CJK> +0x56C1 # <CJK> +0x56C2 # <CJK> +0x56C3 # <CJK> +0x56C8 # <CJK> +0x56CE # <CJK> +0x56D1 # <CJK> +0x56D3 # <CJK> +0x56D7 # <CJK> +0x56D8 # <CJK> +0x56DA # <CJK> +0x56DB # <CJK> +0x56DE # <CJK> +0x56E0 # <CJK> +0x56E3 # <CJK> +0x56EE # <CJK> +0x56F0 # <CJK> +0x56F2 # <CJK> +0x56F3 # <CJK> +0x56F9 # <CJK> +0x56FA # <CJK> +0x56FD # <CJK> +0x56FF # <CJK> +0x5700 # <CJK> +0x5703 # <CJK> +0x5704 # <CJK> +0x5708 # <CJK> +0x5709 # <CJK> +0x570B # <CJK> +0x570D # <CJK> +0x570F # <CJK> +0x5712 # <CJK> +0x5713 # <CJK> +0x5716 # <CJK> +0x5718 # <CJK> +0x571C # <CJK> +0x571F # <CJK> +0x5726 # <CJK> +0x5727 # <CJK> +0x5728 # <CJK> +0x572D # <CJK> +0x5730 # <CJK> +0x5737 # <CJK> +0x5738 # <CJK> +0x573B # <CJK> +0x5740 # <CJK> +0x5742 # <CJK> +0x5747 # <CJK> +0x574A # <CJK> +0x574E # <CJK> +0x574F # <CJK> +0x5750 # <CJK> +0x5751 # <CJK> +0x5761 # <CJK> +0x5764 # <CJK> +0x5766 # <CJK> +0x5769 # <CJK> +0x576A # <CJK> +0x577F # <CJK> +0x5782 # <CJK> +0x5788 # <CJK> +0x5789 # <CJK> +0x578B # <CJK> +0x5793 # <CJK> +0x57A0 # <CJK> +0x57A2 # <CJK> +0x57A3 # <CJK> +0x57A4 # <CJK> +0x57AA # <CJK> +0x57B0 # <CJK> +0x57B3 # <CJK> +0x57C0 # <CJK> +0x57C3 # <CJK> +0x57C6 # <CJK> +0x57CB # <CJK> +0x57CE # <CJK> +0x57D2 # <CJK> +0x57D3 # <CJK> +0x57D4 # <CJK> +0x57D6 # <CJK> +0x57DC # <CJK> +0x57DF # <CJK> +0x57E0 # <CJK> +0x57E3 # <CJK> +0x57F4 # <CJK> +0x57F7 # <CJK> +0x57F9 # <CJK> +0x57FA # <CJK> +0x57FC # <CJK> +0x5800 # <CJK> +0x5802 # <CJK> +0x5805 # <CJK> +0x5806 # <CJK> +0x580A # <CJK> +0x580B # <CJK> +0x5815 # <CJK> +0x5819 # <CJK> +0x581D # <CJK> +0x5821 # <CJK> +0x5824 # <CJK> +0x582A # <CJK> +0x582F # <CJK> +0x5830 # <CJK> +0x5831 # <CJK> +0x5834 # <CJK> +0x5835 # <CJK> +0x583A # <CJK> +0x583D # <CJK> +0x5840 # <CJK> +0x5841 # <CJK> +0x584A # <CJK> +0x584B # <CJK> +0x5851 # <CJK> +0x5852 # <CJK> +0x5854 # <CJK> +0x5857 # <CJK> +0x5858 # <CJK> +0x5859 # <CJK> +0x585A # <CJK> +0x585E # <CJK> +0x5862 # <CJK> +0x5869 # <CJK> +0x586B # <CJK> +0x5870 # <CJK> +0x5872 # <CJK> +0x5875 # <CJK> +0x5879 # <CJK> +0x587E # <CJK> +0x5883 # <CJK> +0x5885 # <CJK> +0x5893 # <CJK> +0x5897 # <CJK> +0x589C # <CJK> +0x589F # <CJK> +0x58A8 # <CJK> +0x58AB # <CJK> +0x58AE # <CJK> +0x58B3 # <CJK> +0x58B8 # <CJK> +0x58B9 # <CJK> +0x58BA # <CJK> +0x58BB # <CJK> +0x58BE # <CJK> +0x58C1 # <CJK> +0x58C5 # <CJK> +0x58C7 # <CJK> +0x58CA # <CJK> +0x58CC # <CJK> +0x58D1 # <CJK> +0x58D3 # <CJK> +0x58D5 # <CJK> +0x58D7 # <CJK> +0x58D8 # <CJK> +0x58D9 # <CJK> +0x58DC # <CJK> +0x58DE # <CJK> +0x58DF # <CJK> +0x58E4 # <CJK> +0x58E5 # <CJK> +0x58EB # <CJK> +0x58EC # <CJK> +0x58EE # <CJK> +0x58EF # <CJK> +0x58F0 # <CJK> +0x58F1 # <CJK> +0x58F2 # <CJK> +0x58F7 # <CJK> +0x58F9 # <CJK> +0x58FA # <CJK> +0x58FB # <CJK> +0x58FC # <CJK> +0x58FD # <CJK> +0x5902 # <CJK> +0x5909 # <CJK> +0x590A # <CJK> +0x590F # <CJK> +0x5910 # <CJK> +0x5915 # <CJK> +0x5916 # <CJK> +0x5918 # <CJK> +0x5919 # <CJK> +0x591A # <CJK> +0x591B # <CJK> +0x591C # <CJK> +0x5922 # <CJK> +0x5925 # <CJK> +0x5927 # <CJK> +0x5929 # <CJK> +0x592A # <CJK> +0x592B # <CJK> +0x592C # <CJK> +0x592D # <CJK> +0x592E # <CJK> +0x5931 # <CJK> +0x5932 # <CJK> +0x5937 # <CJK> +0x5938 # <CJK> +0x593E # <CJK> +0x5944 # <CJK> +0x5947 # <CJK> +0x5948 # <CJK> +0x5949 # <CJK> +0x594E # <CJK> +0x594F # <CJK> +0x5950 # <CJK> +0x5951 # <CJK> +0x5954 # <CJK> +0x5955 # <CJK> +0x5957 # <CJK> +0x5958 # <CJK> +0x595A # <CJK> +0x5960 # <CJK> +0x5962 # <CJK> +0x5965 # <CJK> +0x5967 # <CJK> +0x5968 # <CJK> +0x5969 # <CJK> +0x596A # <CJK> +0x596C # <CJK> +0x596E # <CJK> +0x5973 # <CJK> +0x5974 # <CJK> +0x5978 # <CJK> +0x597D # <CJK> +0x5981 # <CJK> +0x5982 # <CJK> +0x5983 # <CJK> +0x5984 # <CJK> +0x598A # <CJK> +0x598D # <CJK> +0x5993 # <CJK> +0x5996 # <CJK> +0x5999 # <CJK> +0x599B # <CJK> +0x599D # <CJK> +0x59A3 # <CJK> +0x59A5 # <CJK> +0x59A8 # <CJK> +0x59AC # <CJK> +0x59B2 # <CJK> +0x59B9 # <CJK> +0x59BB # <CJK> +0x59BE # <CJK> +0x59C6 # <CJK> +0x59C9 # <CJK> +0x59CB # <CJK> +0x59D0 # <CJK> +0x59D1 # <CJK> +0x59D3 # <CJK> +0x59D4 # <CJK> +0x59D9 # <CJK> +0x59DA # <CJK> +0x59DC # <CJK> +0x59E5 # <CJK> +0x59E6 # <CJK> +0x59E8 # <CJK> +0x59EA # <CJK> +0x59EB # <CJK> +0x59F6 # <CJK> +0x59FB # <CJK> +0x59FF # <CJK> +0x5A01 # <CJK> +0x5A03 # <CJK> +0x5A09 # <CJK> +0x5A11 # <CJK> +0x5A18 # <CJK> +0x5A1A # <CJK> +0x5A1C # <CJK> +0x5A1F # <CJK> +0x5A20 # <CJK> +0x5A25 # <CJK> +0x5A29 # <CJK> +0x5A2F # <CJK> +0x5A35 # <CJK> +0x5A36 # <CJK> +0x5A3C # <CJK> +0x5A40 # <CJK> +0x5A41 # <CJK> +0x5A46 # <CJK> +0x5A49 # <CJK> +0x5A5A # <CJK> +0x5A62 # <CJK> +0x5A66 # <CJK> +0x5A6A # <CJK> +0x5A6C # <CJK> +0x5A7F # <CJK> +0x5A92 # <CJK> +0x5A9A # <CJK> +0x5A9B # <CJK> +0x5ABC # <CJK> +0x5ABD # <CJK> +0x5ABE # <CJK> +0x5AC1 # <CJK> +0x5AC2 # <CJK> +0x5AC9 # <CJK> +0x5ACB # <CJK> +0x5ACC # <CJK> +0x5AD0 # <CJK> +0x5AD6 # <CJK> +0x5AD7 # <CJK> +0x5AE1 # <CJK> +0x5AE3 # <CJK> +0x5AE6 # <CJK> +0x5AE9 # <CJK> +0x5AFA # <CJK> +0x5AFB # <CJK> +0x5B09 # <CJK> +0x5B0B # <CJK> +0x5B0C # <CJK> +0x5B16 # <CJK> +0x5B22 # <CJK> +0x5B2A # <CJK> +0x5B2C # <CJK> +0x5B30 # <CJK> +0x5B32 # <CJK> +0x5B36 # <CJK> +0x5B3E # <CJK> +0x5B40 # <CJK> +0x5B43 # <CJK> +0x5B45 # <CJK> +0x5B50 # <CJK> +0x5B51 # <CJK> +0x5B54 # <CJK> +0x5B55 # <CJK> +0x5B57 # <CJK> +0x5B58 # <CJK> +0x5B5A # <CJK> +0x5B5B # <CJK> +0x5B5C # <CJK> +0x5B5D # <CJK> +0x5B5F # <CJK> +0x5B63 # <CJK> +0x5B64 # <CJK> +0x5B65 # <CJK> +0x5B66 # <CJK> +0x5B69 # <CJK> +0x5B6B # <CJK> +0x5B70 # <CJK> +0x5B71 # <CJK> +0x5B73 # <CJK> +0x5B75 # <CJK> +0x5B78 # <CJK> +0x5B7A # <CJK> +0x5B80 # <CJK> +0x5B83 # <CJK> +0x5B85 # <CJK> +0x5B87 # <CJK> +0x5B88 # <CJK> +0x5B89 # <CJK> +0x5B8B # <CJK> +0x5B8C # <CJK> +0x5B8D # <CJK> +0x5B8F # <CJK> +0x5B95 # <CJK> +0x5B97 # <CJK> +0x5B98 # <CJK> +0x5B99 # <CJK> +0x5B9A # <CJK> +0x5B9B # <CJK> +0x5B9C # <CJK> +0x5B9D # <CJK> +0x5B9F # <CJK> +0x5BA2 # <CJK> +0x5BA3 # <CJK> +0x5BA4 # <CJK> +0x5BA5 # <CJK> +0x5BA6 # <CJK> +0x5BAE # <CJK> +0x5BB0 # <CJK> +0x5BB3 # <CJK> +0x5BB4 # <CJK> +0x5BB5 # <CJK> +0x5BB6 # <CJK> +0x5BB8 # <CJK> +0x5BB9 # <CJK> +0x5BBF # <CJK> +0x5BC2 # <CJK> +0x5BC3 # <CJK> +0x5BC4 # <CJK> +0x5BC5 # <CJK> +0x5BC6 # <CJK> +0x5BC7 # <CJK> +0x5BC9 # <CJK> +0x5BCC # <CJK> +0x5BD0 # <CJK> +0x5BD2 # <CJK> +0x5BD3 # <CJK> +0x5BD4 # <CJK> +0x5BDB # <CJK> +0x5BDD # <CJK> +0x5BDE # <CJK> +0x5BDF # <CJK> +0x5BE1 # <CJK> +0x5BE2 # <CJK> +0x5BE4 # <CJK> +0x5BE5 # <CJK> +0x5BE6 # <CJK> +0x5BE7 # <CJK> +0x5BE8 # <CJK> +0x5BE9 # <CJK> +0x5BEB # <CJK> +0x5BEE # <CJK> +0x5BF0 # <CJK> +0x5BF3 # <CJK> +0x5BF5 # <CJK> +0x5BF6 # <CJK> +0x5BF8 # <CJK> +0x5BFA # <CJK> +0x5BFE # <CJK> +0x5BFF # <CJK> +0x5C01 # <CJK> +0x5C02 # <CJK> +0x5C04 # <CJK> +0x5C05 # <CJK> +0x5C06 # <CJK> +0x5C07 # <CJK> +0x5C08 # <CJK> +0x5C09 # <CJK> +0x5C0A # <CJK> +0x5C0B # <CJK> +0x5C0D # <CJK> +0x5C0E # <CJK> +0x5C0F # <CJK> +0x5C11 # <CJK> +0x5C13 # <CJK> +0x5C16 # <CJK> +0x5C1A # <CJK> +0x5C20 # <CJK> +0x5C22 # <CJK> +0x5C24 # <CJK> +0x5C28 # <CJK> +0x5C2D # <CJK> +0x5C31 # <CJK> +0x5C38 # <CJK> +0x5C39 # <CJK> +0x5C3A # <CJK> +0x5C3B # <CJK> +0x5C3C # <CJK> +0x5C3D # <CJK> +0x5C3E # <CJK> +0x5C3F # <CJK> +0x5C40 # <CJK> +0x5C41 # <CJK> +0x5C45 # <CJK> +0x5C46 # <CJK> +0x5C48 # <CJK> +0x5C4A # <CJK> +0x5C4B # <CJK> +0x5C4D # <CJK> +0x5C4E # <CJK> +0x5C4F # <CJK> +0x5C50 # <CJK> +0x5C51 # <CJK> +0x5C53 # <CJK> +0x5C55 # <CJK> +0x5C5E # <CJK> +0x5C60 # <CJK> +0x5C61 # <CJK> +0x5C64 # <CJK> +0x5C65 # <CJK> +0x5C6C # <CJK> +0x5C6E # <CJK> +0x5C6F # <CJK> +0x5C71 # <CJK> +0x5C76 # <CJK> +0x5C79 # <CJK> +0x5C8C # <CJK> +0x5C90 # <CJK> +0x5C91 # <CJK> +0x5C94 # <CJK> +0x5CA1 # <CJK> +0x5CA8 # <CJK> +0x5CA9 # <CJK> +0x5CAB # <CJK> +0x5CAC # <CJK> +0x5CB1 # <CJK> +0x5CB3 # <CJK> +0x5CB6 # <CJK> +0x5CB7 # <CJK> +0x5CB8 # <CJK> +0x5CBB # <CJK> +0x5CBC # <CJK> +0x5CBE # <CJK> +0x5CC5 # <CJK> +0x5CC7 # <CJK> +0x5CD9 # <CJK> +0x5CE0 # <CJK> +0x5CE1 # <CJK> +0x5CE8 # <CJK> +0x5CE9 # <CJK> +0x5CEA # <CJK> +0x5CED # <CJK> +0x5CEF # <CJK> +0x5CF0 # <CJK> +0x5CF6 # <CJK> +0x5CFA # <CJK> +0x5CFB # <CJK> +0x5CFD # <CJK> +0x5D07 # <CJK> +0x5D0B # <CJK> +0x5D0E # <CJK> +0x5D11 # <CJK> +0x5D14 # <CJK> +0x5D15 # <CJK> +0x5D16 # <CJK> +0x5D17 # <CJK> +0x5D18 # <CJK> +0x5D19 # <CJK> +0x5D1A # <CJK> +0x5D1B # <CJK> +0x5D1F # <CJK> +0x5D22 # <CJK> +0x5D29 # <CJK> +0x5D4B # <CJK> +0x5D4C # <CJK> +0x5D4E # <CJK> +0x5D50 # <CJK> +0x5D52 # <CJK> +0x5D5C # <CJK> +0x5D69 # <CJK> +0x5D6C # <CJK> +0x5D6F # <CJK> +0x5D73 # <CJK> +0x5D76 # <CJK> +0x5D82 # <CJK> +0x5D84 # <CJK> +0x5D87 # <CJK> +0x5D8B # <CJK> +0x5D8C # <CJK> +0x5D90 # <CJK> +0x5D9D # <CJK> +0x5DA2 # <CJK> +0x5DAC # <CJK> +0x5DAE # <CJK> +0x5DB7 # <CJK> +0x5DBA # <CJK> +0x5DBC # <CJK> +0x5DBD # <CJK> +0x5DC9 # <CJK> +0x5DCC # <CJK> +0x5DCD # <CJK> +0x5DD2 # <CJK> +0x5DD3 # <CJK> +0x5DD6 # <CJK> +0x5DDB # <CJK> +0x5DDD # <CJK> +0x5DDE # <CJK> +0x5DE1 # <CJK> +0x5DE3 # <CJK> +0x5DE5 # <CJK> +0x5DE6 # <CJK> +0x5DE7 # <CJK> +0x5DE8 # <CJK> +0x5DEB # <CJK> +0x5DEE # <CJK> +0x5DF1 # <CJK> +0x5DF2 # <CJK> +0x5DF3 # <CJK> +0x5DF4 # <CJK> +0x5DF5 # <CJK> +0x5DF7 # <CJK> +0x5DFB # <CJK> +0x5DFD # <CJK> +0x5DFE # <CJK> +0x5E02 # <CJK> +0x5E03 # <CJK> +0x5E06 # <CJK> +0x5E0B # <CJK> +0x5E0C # <CJK> +0x5E11 # <CJK> +0x5E16 # <CJK> +0x5E19 # <CJK> +0x5E1A # <CJK> +0x5E1B # <CJK> +0x5E1D # <CJK> +0x5E25 # <CJK> +0x5E2B # <CJK> +0x5E2D # <CJK> +0x5E2F # <CJK> +0x5E30 # <CJK> +0x5E33 # <CJK> +0x5E36 # <CJK> +0x5E37 # <CJK> +0x5E38 # <CJK> +0x5E3D # <CJK> +0x5E40 # <CJK> +0x5E43 # <CJK> +0x5E44 # <CJK> +0x5E45 # <CJK> +0x5E47 # <CJK> +0x5E4C # <CJK> +0x5E4E # <CJK> +0x5E54 # <CJK> +0x5E55 # <CJK> +0x5E57 # <CJK> +0x5E5F # <CJK> +0x5E61 # <CJK> +0x5E62 # <CJK> +0x5E63 # <CJK> +0x5E64 # <CJK> +0x5E72 # <CJK> +0x5E73 # <CJK> +0x5E74 # <CJK> +0x5E75 # <CJK> +0x5E76 # <CJK> +0x5E78 # <CJK> +0x5E79 # <CJK> +0x5E7A # <CJK> +0x5E7B # <CJK> +0x5E7C # <CJK> +0x5E7D # <CJK> +0x5E7E # <CJK> +0x5E7F # <CJK> +0x5E81 # <CJK> +0x5E83 # <CJK> +0x5E84 # <CJK> +0x5E87 # <CJK> +0x5E8A # <CJK> +0x5E8F # <CJK> +0x5E95 # <CJK> +0x5E96 # <CJK> +0x5E97 # <CJK> +0x5E9A # <CJK> +0x5E9C # <CJK> +0x5EA0 # <CJK> +0x5EA6 # <CJK> +0x5EA7 # <CJK> +0x5EAB # <CJK> +0x5EAD # <CJK> +0x5EB5 # <CJK> +0x5EB6 # <CJK> +0x5EB7 # <CJK> +0x5EB8 # <CJK> +0x5EC1 # <CJK> +0x5EC2 # <CJK> +0x5EC3 # <CJK> +0x5EC8 # <CJK> +0x5EC9 # <CJK> +0x5ECA # <CJK> +0x5ECF # <CJK> +0x5ED0 # <CJK> +0x5ED3 # <CJK> +0x5ED6 # <CJK> +0x5EDA # <CJK> +0x5EDB # <CJK> +0x5EDD # <CJK> +0x5EDF # <CJK> +0x5EE0 # <CJK> +0x5EE1 # <CJK> +0x5EE2 # <CJK> +0x5EE3 # <CJK> +0x5EE8 # <CJK> +0x5EE9 # <CJK> +0x5EEC # <CJK> +0x5EF0 # <CJK> +0x5EF1 # <CJK> +0x5EF3 # <CJK> +0x5EF4 # <CJK> +0x5EF6 # <CJK> +0x5EF7 # <CJK> +0x5EF8 # <CJK> +0x5EFA # <CJK> +0x5EFB # <CJK> +0x5EFC # <CJK> +0x5EFE # <CJK> +0x5EFF # <CJK> +0x5F01 # <CJK> +0x5F03 # <CJK> +0x5F04 # <CJK> +0x5F09 # <CJK> +0x5F0A # <CJK> +0x5F0B # <CJK> +0x5F0C # <CJK> +0x5F0D # <CJK> +0x5F0F # <CJK> +0x5F10 # <CJK> +0x5F11 # <CJK> +0x5F13 # <CJK> +0x5F14 # <CJK> +0x5F15 # <CJK> +0x5F16 # <CJK> +0x5F17 # <CJK> +0x5F18 # <CJK> +0x5F1B # <CJK> +0x5F1F # <CJK> +0x5F25 # <CJK> +0x5F26 # <CJK> +0x5F27 # <CJK> +0x5F29 # <CJK> +0x5F2D # <CJK> +0x5F2F # <CJK> +0x5F31 # <CJK> +0x5F35 # <CJK> +0x5F37 # <CJK> +0x5F38 # <CJK> +0x5F3C # <CJK> +0x5F3E # <CJK> +0x5F41 # <CJK> +0x5F48 # <CJK> +0x5F4A # <CJK> +0x5F4C # <CJK> +0x5F4E # <CJK> +0x5F51 # <CJK> +0x5F53 # <CJK> +0x5F56 # <CJK> +0x5F57 # <CJK> +0x5F59 # <CJK> +0x5F5C # <CJK> +0x5F5D # <CJK> +0x5F61 # <CJK> +0x5F62 # <CJK> +0x5F66 # <CJK> +0x5F69 # <CJK> +0x5F6A # <CJK> +0x5F6B # <CJK> +0x5F6C # <CJK> +0x5F6D # <CJK> +0x5F70 # <CJK> +0x5F71 # <CJK> +0x5F73 # <CJK> +0x5F77 # <CJK> +0x5F79 # <CJK> +0x5F7C # <CJK> +0x5F7F # <CJK> +0x5F80 # <CJK> +0x5F81 # <CJK> +0x5F82 # <CJK> +0x5F83 # <CJK> +0x5F84 # <CJK> +0x5F85 # <CJK> +0x5F87 # <CJK> +0x5F88 # <CJK> +0x5F8A # <CJK> +0x5F8B # <CJK> +0x5F8C # <CJK> +0x5F90 # <CJK> +0x5F91 # <CJK> +0x5F92 # <CJK> +0x5F93 # <CJK> +0x5F97 # <CJK> +0x5F98 # <CJK> +0x5F99 # <CJK> +0x5F9E # <CJK> +0x5FA0 # <CJK> +0x5FA1 # <CJK> +0x5FA8 # <CJK> +0x5FA9 # <CJK> +0x5FAA # <CJK> +0x5FAD # <CJK> +0x5FAE # <CJK> +0x5FB3 # <CJK> +0x5FB4 # <CJK> +0x5FB9 # <CJK> +0x5FBC # <CJK> +0x5FBD # <CJK> +0x5FC3 # <CJK> +0x5FC5 # <CJK> +0x5FCC # <CJK> +0x5FCD # <CJK> +0x5FD6 # <CJK> +0x5FD7 # <CJK> +0x5FD8 # <CJK> +0x5FD9 # <CJK> +0x5FDC # <CJK> +0x5FDD # <CJK> +0x5FE0 # <CJK> +0x5FE4 # <CJK> +0x5FEB # <CJK> +0x5FF0 # <CJK> +0x5FF1 # <CJK> +0x5FF5 # <CJK> +0x5FF8 # <CJK> +0x5FFB # <CJK> +0x5FFD # <CJK> +0x5FFF # <CJK> +0x600E # <CJK> +0x600F # <CJK> +0x6010 # <CJK> +0x6012 # <CJK> +0x6015 # <CJK> +0x6016 # <CJK> +0x6019 # <CJK> +0x601B # <CJK> +0x601C # <CJK> +0x601D # <CJK> +0x6020 # <CJK> +0x6021 # <CJK> +0x6025 # <CJK> +0x6026 # <CJK> +0x6027 # <CJK> +0x6028 # <CJK> +0x6029 # <CJK> +0x602A # <CJK> +0x602B # <CJK> +0x602F # <CJK> +0x6031 # <CJK> +0x603A # <CJK> +0x6041 # <CJK> +0x6042 # <CJK> +0x6043 # <CJK> +0x6046 # <CJK> +0x604A # <CJK> +0x604B # <CJK> +0x604D # <CJK> +0x6050 # <CJK> +0x6052 # <CJK> +0x6055 # <CJK> +0x6059 # <CJK> +0x605A # <CJK> +0x605F # <CJK> +0x6060 # <CJK> +0x6062 # <CJK> +0x6063 # <CJK> +0x6064 # <CJK> +0x6065 # <CJK> +0x6068 # <CJK> +0x6069 # <CJK> +0x606A # <CJK> +0x606B # <CJK> +0x606C # <CJK> +0x606D # <CJK> +0x606F # <CJK> +0x6070 # <CJK> +0x6075 # <CJK> +0x6077 # <CJK> +0x6081 # <CJK> +0x6083 # <CJK> +0x6084 # <CJK> +0x6089 # <CJK> +0x608B # <CJK> +0x608C # <CJK> +0x608D # <CJK> +0x6092 # <CJK> +0x6094 # <CJK> +0x6096 # <CJK> +0x6097 # <CJK> +0x609A # <CJK> +0x609B # <CJK> +0x609F # <CJK> +0x60A0 # <CJK> +0x60A3 # <CJK> +0x60A6 # <CJK> +0x60A7 # <CJK> +0x60A9 # <CJK> +0x60AA # <CJK> +0x60B2 # <CJK> +0x60B3 # <CJK> +0x60B4 # <CJK> +0x60B5 # <CJK> +0x60B6 # <CJK> +0x60B8 # <CJK> +0x60BC # <CJK> +0x60BD # <CJK> +0x60C5 # <CJK> +0x60C6 # <CJK> +0x60C7 # <CJK> +0x60D1 # <CJK> +0x60D3 # <CJK> +0x60D8 # <CJK> +0x60DA # <CJK> +0x60DC # <CJK> +0x60DF # <CJK> +0x60E0 # <CJK> +0x60E1 # <CJK> +0x60E3 # <CJK> +0x60E7 # <CJK> +0x60E8 # <CJK> +0x60F0 # <CJK> +0x60F1 # <CJK> +0x60F3 # <CJK> +0x60F4 # <CJK> +0x60F6 # <CJK> +0x60F7 # <CJK> +0x60F9 # <CJK> +0x60FA # <CJK> +0x60FB # <CJK> +0x6100 # <CJK> +0x6101 # <CJK> +0x6103 # <CJK> +0x6106 # <CJK> +0x6108 # <CJK> +0x6109 # <CJK> +0x610D # <CJK> +0x610E # <CJK> +0x610F # <CJK> +0x6115 # <CJK> +0x611A # <CJK> +0x611B # <CJK> +0x611F # <CJK> +0x6121 # <CJK> +0x6127 # <CJK> +0x6128 # <CJK> +0x612C # <CJK> +0x6134 # <CJK> +0x613C # <CJK> +0x613D # <CJK> +0x613E # <CJK> +0x613F # <CJK> +0x6142 # <CJK> +0x6144 # <CJK> +0x6147 # <CJK> +0x6148 # <CJK> +0x614A # <CJK> +0x614B # <CJK> +0x614C # <CJK> +0x614D # <CJK> +0x614E # <CJK> +0x6153 # <CJK> +0x6155 # <CJK> +0x6158 # <CJK> +0x6159 # <CJK> +0x615A # <CJK> +0x615D # <CJK> +0x615F # <CJK> +0x6162 # <CJK> +0x6163 # <CJK> +0x6165 # <CJK> +0x6167 # <CJK> +0x6168 # <CJK> +0x616B # <CJK> +0x616E # <CJK> +0x616F # <CJK> +0x6170 # <CJK> +0x6171 # <CJK> +0x6173 # <CJK> +0x6174 # <CJK> +0x6175 # <CJK> +0x6176 # <CJK> +0x6177 # <CJK> +0x617E # <CJK> +0x6182 # <CJK> +0x6187 # <CJK> +0x618A # <CJK> +0x618E # <CJK> +0x6190 # <CJK> +0x6191 # <CJK> +0x6194 # <CJK> +0x6196 # <CJK> +0x6199 # <CJK> +0x619A # <CJK> +0x61A4 # <CJK> +0x61A7 # <CJK> +0x61A9 # <CJK> +0x61AB # <CJK> +0x61AC # <CJK> +0x61AE # <CJK> +0x61B2 # <CJK> +0x61B6 # <CJK> +0x61BA # <CJK> +0x61BE # <CJK> +0x61C3 # <CJK> +0x61C6 # <CJK> +0x61C7 # <CJK> +0x61C8 # <CJK> +0x61C9 # <CJK> +0x61CA # <CJK> +0x61CB # <CJK> +0x61CC # <CJK> +0x61CD # <CJK> +0x61D0 # <CJK> +0x61E3 # <CJK> +0x61E6 # <CJK> +0x61F2 # <CJK> +0x61F4 # <CJK> +0x61F6 # <CJK> +0x61F7 # <CJK> +0x61F8 # <CJK> +0x61FA # <CJK> +0x61FC # <CJK> +0x61FD # <CJK> +0x61FE # <CJK> +0x61FF # <CJK> +0x6200 # <CJK> +0x6208 # <CJK> +0x6209 # <CJK> +0x620A # <CJK> +0x620C # <CJK> +0x620D # <CJK> +0x620E # <CJK> +0x6210 # <CJK> +0x6211 # <CJK> +0x6212 # <CJK> +0x6214 # <CJK> +0x6216 # <CJK> +0x621A # <CJK> +0x621B # <CJK> +0x621D # <CJK> +0x621E # <CJK> +0x621F # <CJK> +0x6221 # <CJK> +0x6226 # <CJK> +0x622A # <CJK> +0x622E # <CJK> +0x622F # <CJK> +0x6230 # <CJK> +0x6232 # <CJK> +0x6233 # <CJK> +0x6234 # <CJK> +0x6238 # <CJK> +0x623B # <CJK> +0x623F # <CJK> +0x6240 # <CJK> +0x6241 # <CJK> +0x6247 # <CJK> +0x6248 # <CJK> +0x6249 # <CJK> +0x624B # <CJK> +0x624D # <CJK> +0x624E # <CJK> +0x6253 # <CJK> +0x6255 # <CJK> +0x6258 # <CJK> +0x625B # <CJK> +0x625E # <CJK> +0x6260 # <CJK> +0x6263 # <CJK> +0x6268 # <CJK> +0x626E # <CJK> +0x6271 # <CJK> +0x6276 # <CJK> +0x6279 # <CJK> +0x627C # <CJK> +0x627E # <CJK> +0x627F # <CJK> +0x6280 # <CJK> +0x6282 # <CJK> +0x6283 # <CJK> +0x6284 # <CJK> +0x6289 # <CJK> +0x628A # <CJK> +0x6291 # <CJK> +0x6292 # <CJK> +0x6293 # <CJK> +0x6294 # <CJK> +0x6295 # <CJK> +0x6296 # <CJK> +0x6297 # <CJK> +0x6298 # <CJK> +0x629B # <CJK> +0x629C # <CJK> +0x629E # <CJK> +0x62AB # <CJK> +0x62AC # <CJK> +0x62B1 # <CJK> +0x62B5 # <CJK> +0x62B9 # <CJK> +0x62BB # <CJK> +0x62BC # <CJK> +0x62BD # <CJK> +0x62C2 # <CJK> +0x62C5 # <CJK> +0x62C6 # <CJK> +0x62C7 # <CJK> +0x62C8 # <CJK> +0x62C9 # <CJK> +0x62CA # <CJK> +0x62CC # <CJK> +0x62CD # <CJK> +0x62CF # <CJK> +0x62D0 # <CJK> +0x62D1 # <CJK> +0x62D2 # <CJK> +0x62D3 # <CJK> +0x62D4 # <CJK> +0x62D7 # <CJK> +0x62D8 # <CJK> +0x62D9 # <CJK> +0x62DB # <CJK> +0x62DC # <CJK> +0x62DD # <CJK> +0x62E0 # <CJK> +0x62E1 # <CJK> +0x62EC # <CJK> +0x62ED # <CJK> +0x62EE # <CJK> +0x62EF # <CJK> +0x62F1 # <CJK> +0x62F3 # <CJK> +0x62F5 # <CJK> +0x62F6 # <CJK> +0x62F7 # <CJK> +0x62FE # <CJK> +0x62FF # <CJK> +0x6301 # <CJK> +0x6302 # <CJK> +0x6307 # <CJK> +0x6308 # <CJK> +0x6309 # <CJK> +0x630C # <CJK> +0x6311 # <CJK> +0x6319 # <CJK> +0x631F # <CJK> +0x6327 # <CJK> +0x6328 # <CJK> +0x632B # <CJK> +0x632F # <CJK> +0x633A # <CJK> +0x633D # <CJK> +0x633E # <CJK> +0x633F # <CJK> +0x6349 # <CJK> +0x634C # <CJK> +0x634D # <CJK> +0x634F # <CJK> +0x6350 # <CJK> +0x6355 # <CJK> +0x6357 # <CJK> +0x635C # <CJK> +0x6367 # <CJK> +0x6368 # <CJK> +0x6369 # <CJK> +0x636B # <CJK> +0x636E # <CJK> +0x6372 # <CJK> +0x6376 # <CJK> +0x6377 # <CJK> +0x637A # <CJK> +0x637B # <CJK> +0x6380 # <CJK> +0x6383 # <CJK> +0x6388 # <CJK> +0x6389 # <CJK> +0x638C # <CJK> +0x638E # <CJK> +0x638F # <CJK> +0x6392 # <CJK> +0x6396 # <CJK> +0x6398 # <CJK> +0x639B # <CJK> +0x639F # <CJK> +0x63A0 # <CJK> +0x63A1 # <CJK> +0x63A2 # <CJK> +0x63A3 # <CJK> +0x63A5 # <CJK> +0x63A7 # <CJK> +0x63A8 # <CJK> +0x63A9 # <CJK> +0x63AA # <CJK> +0x63AB # <CJK> +0x63AC # <CJK> +0x63B2 # <CJK> +0x63B4 # <CJK> +0x63B5 # <CJK> +0x63BB # <CJK> +0x63BE # <CJK> +0x63C0 # <CJK> +0x63C3 # <CJK> +0x63C4 # <CJK> +0x63C6 # <CJK> +0x63C9 # <CJK> +0x63CF # <CJK> +0x63D0 # <CJK> +0x63D2 # <CJK> +0x63D6 # <CJK> +0x63DA # <CJK> +0x63DB # <CJK> +0x63E1 # <CJK> +0x63E3 # <CJK> +0x63E9 # <CJK> +0x63EE # <CJK> +0x63F4 # <CJK> +0x63F6 # <CJK> +0x63FA # <CJK> +0x6406 # <CJK> +0x640D # <CJK> +0x640F # <CJK> +0x6413 # <CJK> +0x6416 # <CJK> +0x6417 # <CJK> +0x641C # <CJK> +0x6426 # <CJK> +0x6428 # <CJK> +0x642C # <CJK> +0x642D # <CJK> +0x6434 # <CJK> +0x6436 # <CJK> +0x643A # <CJK> +0x643E # <CJK> +0x6442 # <CJK> +0x644E # <CJK> +0x6458 # <CJK> +0x6467 # <CJK> +0x6469 # <CJK> +0x646F # <CJK> +0x6476 # <CJK> +0x6478 # <CJK> +0x647A # <CJK> +0x6483 # <CJK> +0x6488 # <CJK> +0x6492 # <CJK> +0x6493 # <CJK> +0x6495 # <CJK> +0x649A # <CJK> +0x649E # <CJK> +0x64A4 # <CJK> +0x64A5 # <CJK> +0x64A9 # <CJK> +0x64AB # <CJK> +0x64AD # <CJK> +0x64AE # <CJK> +0x64B0 # <CJK> +0x64B2 # <CJK> +0x64B9 # <CJK> +0x64BB # <CJK> +0x64BC # <CJK> +0x64C1 # <CJK> +0x64C2 # <CJK> +0x64C5 # <CJK> +0x64C7 # <CJK> +0x64CD # <CJK> +0x64D2 # <CJK> +0x64D4 # <CJK> +0x64D8 # <CJK> +0x64DA # <CJK> +0x64E0 # <CJK> +0x64E1 # <CJK> +0x64E2 # <CJK> +0x64E3 # <CJK> +0x64E6 # <CJK> +0x64E7 # <CJK> +0x64EC # <CJK> +0x64EF # <CJK> +0x64F1 # <CJK> +0x64F2 # <CJK> +0x64F4 # <CJK> +0x64F6 # <CJK> +0x64FA # <CJK> +0x64FD # <CJK> +0x64FE # <CJK> +0x6500 # <CJK> +0x6505 # <CJK> +0x6518 # <CJK> +0x651C # <CJK> +0x651D # <CJK> +0x6523 # <CJK> +0x6524 # <CJK> +0x652A # <CJK> +0x652B # <CJK> +0x652C # <CJK> +0x652F # <CJK> +0x6534 # <CJK> +0x6535 # <CJK> +0x6536 # <CJK> +0x6537 # <CJK> +0x6538 # <CJK> +0x6539 # <CJK> +0x653B # <CJK> +0x653E # <CJK> +0x653F # <CJK> +0x6545 # <CJK> +0x6548 # <CJK> +0x654D # <CJK> +0x654F # <CJK> +0x6551 # <CJK> +0x6555 # <CJK> +0x6556 # <CJK> +0x6557 # <CJK> +0x6558 # <CJK> +0x6559 # <CJK> +0x655D # <CJK> +0x655E # <CJK> +0x6562 # <CJK> +0x6563 # <CJK> +0x6566 # <CJK> +0x656C # <CJK> +0x6570 # <CJK> +0x6572 # <CJK> +0x6574 # <CJK> +0x6575 # <CJK> +0x6577 # <CJK> +0x6578 # <CJK> +0x6582 # <CJK> +0x6583 # <CJK> +0x6587 # <CJK> +0x6588 # <CJK> +0x6589 # <CJK> +0x658C # <CJK> +0x658E # <CJK> +0x6590 # <CJK> +0x6591 # <CJK> +0x6597 # <CJK> +0x6599 # <CJK> +0x659B # <CJK> +0x659C # <CJK> +0x659F # <CJK> +0x65A1 # <CJK> +0x65A4 # <CJK> +0x65A5 # <CJK> +0x65A7 # <CJK> +0x65AB # <CJK> +0x65AC # <CJK> +0x65AD # <CJK> +0x65AF # <CJK> +0x65B0 # <CJK> +0x65B7 # <CJK> +0x65B9 # <CJK> +0x65BC # <CJK> +0x65BD # <CJK> +0x65C1 # <CJK> +0x65C3 # <CJK> +0x65C4 # <CJK> +0x65C5 # <CJK> +0x65C6 # <CJK> +0x65CB # <CJK> +0x65CC # <CJK> +0x65CF # <CJK> +0x65D2 # <CJK> +0x65D7 # <CJK> +0x65D9 # <CJK> +0x65DB # <CJK> +0x65E0 # <CJK> +0x65E1 # <CJK> +0x65E2 # <CJK> +0x65E5 # <CJK> +0x65E6 # <CJK> +0x65E7 # <CJK> +0x65E8 # <CJK> +0x65E9 # <CJK> +0x65EC # <CJK> +0x65ED # <CJK> +0x65F1 # <CJK> +0x65FA # <CJK> +0x65FB # <CJK> +0x6602 # <CJK> +0x6603 # <CJK> +0x6606 # <CJK> +0x6607 # <CJK> +0x660A # <CJK> +0x660C # <CJK> +0x660E # <CJK> +0x660F # <CJK> +0x6613 # <CJK> +0x6614 # <CJK> +0x661C # <CJK> +0x661F # <CJK> +0x6620 # <CJK> +0x6625 # <CJK> +0x6627 # <CJK> +0x6628 # <CJK> +0x662D # <CJK> +0x662F # <CJK> +0x6634 # <CJK> +0x6635 # <CJK> +0x6636 # <CJK> +0x663C # <CJK> +0x663F # <CJK> +0x6641 # <CJK> +0x6642 # <CJK> +0x6643 # <CJK> +0x6644 # <CJK> +0x6649 # <CJK> +0x664B # <CJK> +0x664F # <CJK> +0x6652 # <CJK> +0x665D # <CJK> +0x665E # <CJK> +0x665F # <CJK> +0x6662 # <CJK> +0x6664 # <CJK> +0x6666 # <CJK> +0x6667 # <CJK> +0x6668 # <CJK> +0x6669 # <CJK> +0x666E # <CJK> +0x666F # <CJK> +0x6670 # <CJK> +0x6674 # <CJK> +0x6676 # <CJK> +0x667A # <CJK> +0x6681 # <CJK> +0x6683 # <CJK> +0x6684 # <CJK> +0x6687 # <CJK> +0x6688 # <CJK> +0x6689 # <CJK> +0x668E # <CJK> +0x6691 # <CJK> +0x6696 # <CJK> +0x6697 # <CJK> +0x6698 # <CJK> +0x669D # <CJK> +0x66A2 # <CJK> +0x66A6 # <CJK> +0x66AB # <CJK> +0x66AE # <CJK> +0x66B4 # <CJK> +0x66B8 # <CJK> +0x66B9 # <CJK> +0x66BC # <CJK> +0x66BE # <CJK> +0x66C1 # <CJK> +0x66C4 # <CJK> +0x66C7 # <CJK> +0x66C9 # <CJK> +0x66D6 # <CJK> +0x66D9 # <CJK> +0x66DA # <CJK> +0x66DC # <CJK> +0x66DD # <CJK> +0x66E0 # <CJK> +0x66E6 # <CJK> +0x66E9 # <CJK> +0x66F0 # <CJK> +0x66F2 # <CJK> +0x66F3 # <CJK> +0x66F4 # <CJK> +0x66F5 # <CJK> +0x66F7 # <CJK> +0x66F8 # <CJK> +0x66F9 # <CJK> +0x66FC # <CJK> +0x66FD # <CJK> +0x66FE # <CJK> +0x66FF # <CJK> +0x6700 # <CJK> +0x6703 # <CJK> +0x6708 # <CJK> +0x6709 # <CJK> +0x670B # <CJK> +0x670D # <CJK> +0x670F # <CJK> +0x6714 # <CJK> +0x6715 # <CJK> +0x6716 # <CJK> +0x6717 # <CJK> +0x671B # <CJK> +0x671D # <CJK> +0x671E # <CJK> +0x671F # <CJK> +0x6726 # <CJK> +0x6727 # <CJK> +0x6728 # <CJK> +0x672A # <CJK> +0x672B # <CJK> +0x672C # <CJK> +0x672D # <CJK> +0x672E # <CJK> +0x6731 # <CJK> +0x6734 # <CJK> +0x6736 # <CJK> +0x6737 # <CJK> +0x6738 # <CJK> +0x673A # <CJK> +0x673D # <CJK> +0x673F # <CJK> +0x6741 # <CJK> +0x6746 # <CJK> +0x6749 # <CJK> +0x674E # <CJK> +0x674F # <CJK> +0x6750 # <CJK> +0x6751 # <CJK> +0x6753 # <CJK> +0x6756 # <CJK> +0x6759 # <CJK> +0x675C # <CJK> +0x675E # <CJK> +0x675F # <CJK> +0x6760 # <CJK> +0x6761 # <CJK> +0x6762 # <CJK> +0x6763 # <CJK> +0x6764 # <CJK> +0x6765 # <CJK> +0x676A # <CJK> +0x676D # <CJK> +0x676F # <CJK> +0x6770 # <CJK> +0x6771 # <CJK> +0x6772 # <CJK> +0x6773 # <CJK> +0x6775 # <CJK> +0x6777 # <CJK> +0x677C # <CJK> +0x677E # <CJK> +0x677F # <CJK> +0x6785 # <CJK> +0x6787 # <CJK> +0x6789 # <CJK> +0x678B # <CJK> +0x678C # <CJK> +0x6790 # <CJK> +0x6795 # <CJK> +0x6797 # <CJK> +0x679A # <CJK> +0x679C # <CJK> +0x679D # <CJK> +0x67A0 # <CJK> +0x67A1 # <CJK> +0x67A2 # <CJK> +0x67A6 # <CJK> +0x67A9 # <CJK> +0x67AF # <CJK> +0x67B3 # <CJK> +0x67B4 # <CJK> +0x67B6 # <CJK> +0x67B7 # <CJK> +0x67B8 # <CJK> +0x67B9 # <CJK> +0x67C1 # <CJK> +0x67C4 # <CJK> +0x67C6 # <CJK> +0x67CA # <CJK> +0x67CE # <CJK> +0x67CF # <CJK> +0x67D0 # <CJK> +0x67D1 # <CJK> +0x67D3 # <CJK> +0x67D4 # <CJK> +0x67D8 # <CJK> +0x67DA # <CJK> +0x67DD # <CJK> +0x67DE # <CJK> +0x67E2 # <CJK> +0x67E4 # <CJK> +0x67E7 # <CJK> +0x67E9 # <CJK> +0x67EC # <CJK> +0x67EE # <CJK> +0x67EF # <CJK> +0x67F1 # <CJK> +0x67F3 # <CJK> +0x67F4 # <CJK> +0x67F5 # <CJK> +0x67FB # <CJK> +0x67FE # <CJK> +0x67FF # <CJK> +0x6802 # <CJK> +0x6803 # <CJK> +0x6804 # <CJK> +0x6813 # <CJK> +0x6816 # <CJK> +0x6817 # <CJK> +0x681E # <CJK> +0x6821 # <CJK> +0x6822 # <CJK> +0x6829 # <CJK> +0x682A # <CJK> +0x682B # <CJK> +0x6832 # <CJK> +0x6834 # <CJK> +0x6838 # <CJK> +0x6839 # <CJK> +0x683C # <CJK> +0x683D # <CJK> +0x6840 # <CJK> +0x6841 # <CJK> +0x6842 # <CJK> +0x6843 # <CJK> +0x6846 # <CJK> +0x6848 # <CJK> +0x684D # <CJK> +0x684E # <CJK> +0x6850 # <CJK> +0x6851 # <CJK> +0x6853 # <CJK> +0x6854 # <CJK> +0x6859 # <CJK> +0x685C # <CJK> +0x685D # <CJK> +0x685F # <CJK> +0x6863 # <CJK> +0x6867 # <CJK> +0x6874 # <CJK> +0x6876 # <CJK> +0x6877 # <CJK> +0x687E # <CJK> +0x687F # <CJK> +0x6881 # <CJK> +0x6883 # <CJK> +0x6885 # <CJK> +0x688D # <CJK> +0x688F # <CJK> +0x6893 # <CJK> +0x6894 # <CJK> +0x6897 # <CJK> +0x689B # <CJK> +0x689D # <CJK> +0x689F # <CJK> +0x68A0 # <CJK> +0x68A2 # <CJK> +0x68A6 # <CJK> +0x68A7 # <CJK> +0x68A8 # <CJK> +0x68AD # <CJK> +0x68AF # <CJK> +0x68B0 # <CJK> +0x68B1 # <CJK> +0x68B3 # <CJK> +0x68B5 # <CJK> +0x68B6 # <CJK> +0x68B9 # <CJK> +0x68BA # <CJK> +0x68BC # <CJK> +0x68C4 # <CJK> +0x68C6 # <CJK> +0x68C9 # <CJK> +0x68CA # <CJK> +0x68CB # <CJK> +0x68CD # <CJK> +0x68D2 # <CJK> +0x68D4 # <CJK> +0x68D5 # <CJK> +0x68D7 # <CJK> +0x68D8 # <CJK> +0x68DA # <CJK> +0x68DF # <CJK> +0x68E0 # <CJK> +0x68E1 # <CJK> +0x68E3 # <CJK> +0x68E7 # <CJK> +0x68EE # <CJK> +0x68EF # <CJK> +0x68F2 # <CJK> +0x68F9 # <CJK> +0x68FA # <CJK> +0x6900 # <CJK> +0x6901 # <CJK> +0x6904 # <CJK> +0x6905 # <CJK> +0x6908 # <CJK> +0x690B # <CJK> +0x690C # <CJK> +0x690D # <CJK> +0x690E # <CJK> +0x690F # <CJK> +0x6912 # <CJK> +0x6919 # <CJK> +0x691A # <CJK> +0x691B # <CJK> +0x691C # <CJK> +0x6921 # <CJK> +0x6922 # <CJK> +0x6923 # <CJK> +0x6925 # <CJK> +0x6926 # <CJK> +0x6928 # <CJK> +0x692A # <CJK> +0x6930 # <CJK> +0x6934 # <CJK> +0x6936 # <CJK> +0x6939 # <CJK> +0x693D # <CJK> +0x693F # <CJK> +0x694A # <CJK> +0x6953 # <CJK> +0x6954 # <CJK> +0x6955 # <CJK> +0x6959 # <CJK> +0x695A # <CJK> +0x695C # <CJK> +0x695D # <CJK> +0x695E # <CJK> +0x6960 # <CJK> +0x6961 # <CJK> +0x6962 # <CJK> +0x696A # <CJK> +0x696B # <CJK> +0x696D # <CJK> +0x696E # <CJK> +0x696F # <CJK> +0x6973 # <CJK> +0x6974 # <CJK> +0x6975 # <CJK> +0x6977 # <CJK> +0x6978 # <CJK> +0x6979 # <CJK> +0x697C # <CJK> +0x697D # <CJK> +0x697E # <CJK> +0x6981 # <CJK> +0x6982 # <CJK> +0x698A # <CJK> +0x698E # <CJK> +0x6991 # <CJK> +0x6994 # <CJK> +0x6995 # <CJK> +0x699B # <CJK> +0x699C # <CJK> +0x69A0 # <CJK> +0x69A7 # <CJK> +0x69AE # <CJK> +0x69B1 # <CJK> +0x69B2 # <CJK> +0x69B4 # <CJK> +0x69BB # <CJK> +0x69BE # <CJK> +0x69BF # <CJK> +0x69C1 # <CJK> +0x69C3 # <CJK> +0x69C7 # <CJK> +0x69CA # <CJK> +0x69CB # <CJK> +0x69CC # <CJK> +0x69CD # <CJK> +0x69CE # <CJK> +0x69D0 # <CJK> +0x69D3 # <CJK> +0x69D8 # <CJK> +0x69D9 # <CJK> +0x69DD # <CJK> +0x69DE # <CJK> +0x69E7 # <CJK> +0x69E8 # <CJK> +0x69EB # <CJK> +0x69ED # <CJK> +0x69F2 # <CJK> +0x69F9 # <CJK> +0x69FB # <CJK> +0x69FD # <CJK> +0x69FF # <CJK> +0x6A02 # <CJK> +0x6A05 # <CJK> +0x6A0A # <CJK> +0x6A0B # <CJK> +0x6A0C # <CJK> +0x6A12 # <CJK> +0x6A13 # <CJK> +0x6A14 # <CJK> +0x6A17 # <CJK> +0x6A19 # <CJK> +0x6A1B # <CJK> +0x6A1E # <CJK> +0x6A1F # <CJK> +0x6A21 # <CJK> +0x6A22 # <CJK> +0x6A23 # <CJK> +0x6A29 # <CJK> +0x6A2A # <CJK> +0x6A2B # <CJK> +0x6A2E # <CJK> +0x6A35 # <CJK> +0x6A36 # <CJK> +0x6A38 # <CJK> +0x6A39 # <CJK> +0x6A3A # <CJK> +0x6A3D # <CJK> +0x6A44 # <CJK> +0x6A47 # <CJK> +0x6A48 # <CJK> +0x6A4B # <CJK> +0x6A58 # <CJK> +0x6A59 # <CJK> +0x6A5F # <CJK> +0x6A61 # <CJK> +0x6A62 # <CJK> +0x6A66 # <CJK> +0x6A72 # <CJK> +0x6A78 # <CJK> +0x6A7F # <CJK> +0x6A80 # <CJK> +0x6A84 # <CJK> +0x6A8D # <CJK> +0x6A8E # <CJK> +0x6A90 # <CJK> +0x6A97 # <CJK> +0x6A9C # <CJK> +0x6AA0 # <CJK> +0x6AA2 # <CJK> +0x6AA3 # <CJK> +0x6AAA # <CJK> +0x6AAC # <CJK> +0x6AAE # <CJK> +0x6AB3 # <CJK> +0x6AB8 # <CJK> +0x6ABB # <CJK> +0x6AC1 # <CJK> +0x6AC2 # <CJK> +0x6AC3 # <CJK> +0x6AD1 # <CJK> +0x6AD3 # <CJK> +0x6ADA # <CJK> +0x6ADB # <CJK> +0x6ADE # <CJK> +0x6ADF # <CJK> +0x6AE8 # <CJK> +0x6AEA # <CJK> +0x6AFA # <CJK> +0x6AFB # <CJK> +0x6B04 # <CJK> +0x6B05 # <CJK> +0x6B0A # <CJK> +0x6B12 # <CJK> +0x6B16 # <CJK> +0x6B1D # <CJK> +0x6B1F # <CJK> +0x6B20 # <CJK> +0x6B21 # <CJK> +0x6B23 # <CJK> +0x6B27 # <CJK> +0x6B32 # <CJK> +0x6B37 # <CJK> +0x6B38 # <CJK> +0x6B39 # <CJK> +0x6B3A # <CJK> +0x6B3D # <CJK> +0x6B3E # <CJK> +0x6B43 # <CJK> +0x6B47 # <CJK> +0x6B49 # <CJK> +0x6B4C # <CJK> +0x6B4E # <CJK> +0x6B50 # <CJK> +0x6B53 # <CJK> +0x6B54 # <CJK> +0x6B59 # <CJK> +0x6B5B # <CJK> +0x6B5F # <CJK> +0x6B61 # <CJK> +0x6B62 # <CJK> +0x6B63 # <CJK> +0x6B64 # <CJK> +0x6B66 # <CJK> +0x6B69 # <CJK> +0x6B6A # <CJK> +0x6B6F # <CJK> +0x6B73 # <CJK> +0x6B74 # <CJK> +0x6B78 # <CJK> +0x6B79 # <CJK> +0x6B7B # <CJK> +0x6B7F # <CJK> +0x6B80 # <CJK> +0x6B83 # <CJK> +0x6B84 # <CJK> +0x6B86 # <CJK> +0x6B89 # <CJK> +0x6B8A # <CJK> +0x6B8B # <CJK> +0x6B8D # <CJK> +0x6B95 # <CJK> +0x6B96 # <CJK> +0x6B98 # <CJK> +0x6B9E # <CJK> +0x6BA4 # <CJK> +0x6BAA # <CJK> +0x6BAB # <CJK> +0x6BAF # <CJK> +0x6BB1 # <CJK> +0x6BB2 # <CJK> +0x6BB3 # <CJK> +0x6BB4 # <CJK> +0x6BB5 # <CJK> +0x6BB7 # <CJK> +0x6BBA # <CJK> +0x6BBB # <CJK> +0x6BBC # <CJK> +0x6BBF # <CJK> +0x6BC0 # <CJK> +0x6BC5 # <CJK> +0x6BC6 # <CJK> +0x6BCB # <CJK> +0x6BCD # <CJK> +0x6BCE # <CJK> +0x6BD2 # <CJK> +0x6BD3 # <CJK> +0x6BD4 # <CJK> +0x6BD8 # <CJK> +0x6BDB # <CJK> +0x6BDF # <CJK> +0x6BEB # <CJK> +0x6BEC # <CJK> +0x6BEF # <CJK> +0x6BF3 # <CJK> +0x6C08 # <CJK> +0x6C0F # <CJK> +0x6C11 # <CJK> +0x6C13 # <CJK> +0x6C14 # <CJK> +0x6C17 # <CJK> +0x6C1B # <CJK> +0x6C23 # <CJK> +0x6C24 # <CJK> +0x6C34 # <CJK> +0x6C37 # <CJK> +0x6C38 # <CJK> +0x6C3E # <CJK> +0x6C40 # <CJK> +0x6C41 # <CJK> +0x6C42 # <CJK> +0x6C4E # <CJK> +0x6C50 # <CJK> +0x6C55 # <CJK> +0x6C57 # <CJK> +0x6C5A # <CJK> +0x6C5D # <CJK> +0x6C5E # <CJK> +0x6C5F # <CJK> +0x6C60 # <CJK> +0x6C62 # <CJK> +0x6C68 # <CJK> +0x6C6A # <CJK> +0x6C70 # <CJK> +0x6C72 # <CJK> +0x6C73 # <CJK> +0x6C7A # <CJK> +0x6C7D # <CJK> +0x6C7E # <CJK> +0x6C81 # <CJK> +0x6C82 # <CJK> +0x6C83 # <CJK> +0x6C88 # <CJK> +0x6C8C # <CJK> +0x6C8D # <CJK> +0x6C90 # <CJK> +0x6C92 # <CJK> +0x6C93 # <CJK> +0x6C96 # <CJK> +0x6C99 # <CJK> +0x6C9A # <CJK> +0x6C9B # <CJK> +0x6CA1 # <CJK> +0x6CA2 # <CJK> +0x6CAB # <CJK> +0x6CAE # <CJK> +0x6CB1 # <CJK> +0x6CB3 # <CJK> +0x6CB8 # <CJK> +0x6CB9 # <CJK> +0x6CBA # <CJK> +0x6CBB # <CJK> +0x6CBC # <CJK> +0x6CBD # <CJK> +0x6CBE # <CJK> +0x6CBF # <CJK> +0x6CC1 # <CJK> +0x6CC4 # <CJK> +0x6CC5 # <CJK> +0x6CC9 # <CJK> +0x6CCA # <CJK> +0x6CCC # <CJK> +0x6CD3 # <CJK> +0x6CD5 # <CJK> +0x6CD7 # <CJK> +0x6CD9 # <CJK> +0x6CDB # <CJK> +0x6CDD # <CJK> +0x6CE1 # <CJK> +0x6CE2 # <CJK> +0x6CE3 # <CJK> +0x6CE5 # <CJK> +0x6CE8 # <CJK> +0x6CEA # <CJK> +0x6CEF # <CJK> +0x6CF0 # <CJK> +0x6CF1 # <CJK> +0x6CF3 # <CJK> +0x6D0B # <CJK> +0x6D0C # <CJK> +0x6D12 # <CJK> +0x6D17 # <CJK> +0x6D19 # <CJK> +0x6D1B # <CJK> +0x6D1E # <CJK> +0x6D1F # <CJK> +0x6D25 # <CJK> +0x6D29 # <CJK> +0x6D2A # <CJK> +0x6D2B # <CJK> +0x6D32 # <CJK> +0x6D33 # <CJK> +0x6D35 # <CJK> +0x6D36 # <CJK> +0x6D38 # <CJK> +0x6D3B # <CJK> +0x6D3D # <CJK> +0x6D3E # <CJK> +0x6D41 # <CJK> +0x6D44 # <CJK> +0x6D45 # <CJK> +0x6D59 # <CJK> +0x6D5A # <CJK> +0x6D5C # <CJK> +0x6D63 # <CJK> +0x6D64 # <CJK> +0x6D66 # <CJK> +0x6D69 # <CJK> +0x6D6A # <CJK> +0x6D6C # <CJK> +0x6D6E # <CJK> +0x6D74 # <CJK> +0x6D77 # <CJK> +0x6D78 # <CJK> +0x6D79 # <CJK> +0x6D85 # <CJK> +0x6D88 # <CJK> +0x6D8C # <CJK> +0x6D8E # <CJK> +0x6D93 # <CJK> +0x6D95 # <CJK> +0x6D99 # <CJK> +0x6D9B # <CJK> +0x6D9C # <CJK> +0x6DAF # <CJK> +0x6DB2 # <CJK> +0x6DB5 # <CJK> +0x6DB8 # <CJK> +0x6DBC # <CJK> +0x6DC0 # <CJK> +0x6DC5 # <CJK> +0x6DC6 # <CJK> +0x6DC7 # <CJK> +0x6DCB # <CJK> +0x6DCC # <CJK> +0x6DD1 # <CJK> +0x6DD2 # <CJK> +0x6DD5 # <CJK> +0x6DD8 # <CJK> +0x6DD9 # <CJK> +0x6DDE # <CJK> +0x6DE1 # <CJK> +0x6DE4 # <CJK> +0x6DE6 # <CJK> +0x6DE8 # <CJK> +0x6DEA # <CJK> +0x6DEB # <CJK> +0x6DEC # <CJK> +0x6DEE # <CJK> +0x6DF1 # <CJK> +0x6DF3 # <CJK> +0x6DF5 # <CJK> +0x6DF7 # <CJK> +0x6DF9 # <CJK> +0x6DFA # <CJK> +0x6DFB # <CJK> +0x6E05 # <CJK> +0x6E07 # <CJK> +0x6E08 # <CJK> +0x6E09 # <CJK> +0x6E0A # <CJK> +0x6E0B # <CJK> +0x6E13 # <CJK> +0x6E15 # <CJK> +0x6E19 # <CJK> +0x6E1A # <CJK> +0x6E1B # <CJK> +0x6E1D # <CJK> +0x6E1F # <CJK> +0x6E20 # <CJK> +0x6E21 # <CJK> +0x6E23 # <CJK> +0x6E24 # <CJK> +0x6E25 # <CJK> +0x6E26 # <CJK> +0x6E29 # <CJK> +0x6E2B # <CJK> +0x6E2C # <CJK> +0x6E2D # <CJK> +0x6E2E # <CJK> +0x6E2F # <CJK> +0x6E38 # <CJK> +0x6E3A # <CJK> +0x6E3E # <CJK> +0x6E43 # <CJK> +0x6E4A # <CJK> +0x6E4D # <CJK> +0x6E4E # <CJK> +0x6E56 # <CJK> +0x6E58 # <CJK> +0x6E5B # <CJK> +0x6E5F # <CJK> +0x6E67 # <CJK> +0x6E6B # <CJK> +0x6E6E # <CJK> +0x6E6F # <CJK> +0x6E72 # <CJK> +0x6E76 # <CJK> +0x6E7E # <CJK> +0x6E7F # <CJK> +0x6E80 # <CJK> +0x6E82 # <CJK> +0x6E8C # <CJK> +0x6E8F # <CJK> +0x6E90 # <CJK> +0x6E96 # <CJK> +0x6E98 # <CJK> +0x6E9C # <CJK> +0x6E9D # <CJK> +0x6E9F # <CJK> +0x6EA2 # <CJK> +0x6EA5 # <CJK> +0x6EAA # <CJK> +0x6EAF # <CJK> +0x6EB2 # <CJK> +0x6EB6 # <CJK> +0x6EB7 # <CJK> +0x6EBA # <CJK> +0x6EBD # <CJK> +0x6EC2 # <CJK> +0x6EC4 # <CJK> +0x6EC5 # <CJK> +0x6EC9 # <CJK> +0x6ECB # <CJK> +0x6ECC # <CJK> +0x6ED1 # <CJK> +0x6ED3 # <CJK> +0x6ED4 # <CJK> +0x6ED5 # <CJK> +0x6EDD # <CJK> +0x6EDE # <CJK> +0x6EEC # <CJK> +0x6EEF # <CJK> +0x6EF2 # <CJK> +0x6EF4 # <CJK> +0x6EF7 # <CJK> +0x6EF8 # <CJK> +0x6EFE # <CJK> +0x6EFF # <CJK> +0x6F01 # <CJK> +0x6F02 # <CJK> +0x6F06 # <CJK> +0x6F09 # <CJK> +0x6F0F # <CJK> +0x6F11 # <CJK> +0x6F13 # <CJK> +0x6F14 # <CJK> +0x6F15 # <CJK> +0x6F20 # <CJK> +0x6F22 # <CJK> +0x6F23 # <CJK> +0x6F2B # <CJK> +0x6F2C # <CJK> +0x6F31 # <CJK> +0x6F32 # <CJK> +0x6F38 # <CJK> +0x6F3E # <CJK> +0x6F3F # <CJK> +0x6F41 # <CJK> +0x6F45 # <CJK> +0x6F54 # <CJK> +0x6F58 # <CJK> +0x6F5B # <CJK> +0x6F5C # <CJK> +0x6F5F # <CJK> +0x6F64 # <CJK> +0x6F66 # <CJK> +0x6F6D # <CJK> +0x6F6E # <CJK> +0x6F6F # <CJK> +0x6F70 # <CJK> +0x6F74 # <CJK> +0x6F78 # <CJK> +0x6F7A # <CJK> +0x6F7C # <CJK> +0x6F80 # <CJK> +0x6F81 # <CJK> +0x6F82 # <CJK> +0x6F84 # <CJK> +0x6F86 # <CJK> +0x6F8E # <CJK> +0x6F91 # <CJK> +0x6F97 # <CJK> +0x6FA1 # <CJK> +0x6FA3 # <CJK> +0x6FA4 # <CJK> +0x6FAA # <CJK> +0x6FB1 # <CJK> +0x6FB3 # <CJK> +0x6FB9 # <CJK> +0x6FC0 # <CJK> +0x6FC1 # <CJK> +0x6FC2 # <CJK> +0x6FC3 # <CJK> +0x6FC6 # <CJK> +0x6FD4 # <CJK> +0x6FD5 # <CJK> +0x6FD8 # <CJK> +0x6FDB # <CJK> +0x6FDF # <CJK> +0x6FE0 # <CJK> +0x6FE1 # <CJK> +0x6FE4 # <CJK> +0x6FEB # <CJK> +0x6FEC # <CJK> +0x6FEE # <CJK> +0x6FEF # <CJK> +0x6FF1 # <CJK> +0x6FF3 # <CJK> +0x6FF6 # <CJK> +0x6FFA # <CJK> +0x6FFE # <CJK> +0x7001 # <CJK> +0x7009 # <CJK> +0x700B # <CJK> +0x700F # <CJK> +0x7011 # <CJK> +0x7015 # <CJK> +0x7018 # <CJK> +0x701A # <CJK> +0x701B # <CJK> +0x701D # <CJK> +0x701E # <CJK> +0x701F # <CJK> +0x7026 # <CJK> +0x7027 # <CJK> +0x702C # <CJK> +0x7030 # <CJK> +0x7032 # <CJK> +0x703E # <CJK> +0x704C # <CJK> +0x7051 # <CJK> +0x7058 # <CJK> +0x7063 # <CJK> +0x706B # <CJK> +0x706F # <CJK> +0x7070 # <CJK> +0x7078 # <CJK> +0x707C # <CJK> +0x707D # <CJK> +0x7089 # <CJK> +0x708A # <CJK> +0x708E # <CJK> +0x7092 # <CJK> +0x7099 # <CJK> +0x70AC # <CJK> +0x70AD # <CJK> +0x70AE # <CJK> +0x70AF # <CJK> +0x70B3 # <CJK> +0x70B8 # <CJK> +0x70B9 # <CJK> +0x70BA # <CJK> +0x70C8 # <CJK> +0x70CB # <CJK> +0x70CF # <CJK> +0x70D9 # <CJK> +0x70DD # <CJK> +0x70DF # <CJK> +0x70F1 # <CJK> +0x70F9 # <CJK> +0x70FD # <CJK> +0x7109 # <CJK> +0x7114 # <CJK> +0x7119 # <CJK> +0x711A # <CJK> +0x711C # <CJK> +0x7121 # <CJK> +0x7126 # <CJK> +0x7136 # <CJK> +0x713C # <CJK> +0x7149 # <CJK> +0x714C # <CJK> +0x714E # <CJK> +0x7155 # <CJK> +0x7156 # <CJK> +0x7159 # <CJK> +0x7162 # <CJK> +0x7164 # <CJK> +0x7165 # <CJK> +0x7166 # <CJK> +0x7167 # <CJK> +0x7169 # <CJK> +0x716C # <CJK> +0x716E # <CJK> +0x717D # <CJK> +0x7184 # <CJK> +0x7188 # <CJK> +0x718A # <CJK> +0x718F # <CJK> +0x7194 # <CJK> +0x7195 # <CJK> +#0x7199 # <CJK> # not in kochi fonts +0x719F # <CJK> +0x71A8 # <CJK> +0x71AC # <CJK> +0x71B1 # <CJK> +0x71B9 # <CJK> +0x71BE # <CJK> +0x71C3 # <CJK> +0x71C8 # <CJK> +0x71C9 # <CJK> +0x71CE # <CJK> +0x71D0 # <CJK> +0x71D2 # <CJK> +0x71D4 # <CJK> +0x71D5 # <CJK> +0x71D7 # <CJK> +0x71DF # <CJK> +0x71E0 # <CJK> +0x71E5 # <CJK> +0x71E6 # <CJK> +0x71E7 # <CJK> +0x71EC # <CJK> +0x71ED # <CJK> +0x71EE # <CJK> +0x71F5 # <CJK> +0x71F9 # <CJK> +0x71FB # <CJK> +0x71FC # <CJK> +0x71FF # <CJK> +0x7206 # <CJK> +0x720D # <CJK> +0x7210 # <CJK> +0x721B # <CJK> +0x7228 # <CJK> +0x722A # <CJK> +0x722C # <CJK> +0x722D # <CJK> +0x7230 # <CJK> +0x7232 # <CJK> +0x7235 # <CJK> +0x7236 # <CJK> +0x723A # <CJK> +0x723B # <CJK> +0x723C # <CJK> +0x723D # <CJK> +0x723E # <CJK> +0x723F # <CJK> +0x7240 # <CJK> +0x7246 # <CJK> +0x7247 # <CJK> +0x7248 # <CJK> +0x724B # <CJK> +0x724C # <CJK> +0x7252 # <CJK> +0x7258 # <CJK> +0x7259 # <CJK> +0x725B # <CJK> +0x725D # <CJK> +0x725F # <CJK> +0x7261 # <CJK> +0x7262 # <CJK> +0x7267 # <CJK> +0x7269 # <CJK> +0x7272 # <CJK> +0x7274 # <CJK> +0x7279 # <CJK> +0x727D # <CJK> +0x727E # <CJK> +0x7280 # <CJK> +0x7281 # <CJK> +0x7282 # <CJK> +0x7287 # <CJK> +0x7292 # <CJK> +0x7296 # <CJK> +0x72A0 # <CJK> +0x72A2 # <CJK> +0x72A7 # <CJK> +0x72AC # <CJK> +0x72AF # <CJK> +0x72B2 # <CJK> +0x72B6 # <CJK> +0x72B9 # <CJK> +0x72C2 # <CJK> +0x72C3 # <CJK> +0x72C4 # <CJK> +0x72C6 # <CJK> +0x72CE # <CJK> +0x72D0 # <CJK> +0x72D2 # <CJK> +0x72D7 # <CJK> +0x72D9 # <CJK> +0x72DB # <CJK> +0x72E0 # <CJK> +0x72E1 # <CJK> +0x72E2 # <CJK> +0x72E9 # <CJK> +0x72EC # <CJK> +0x72ED # <CJK> +0x72F7 # <CJK> +0x72F8 # <CJK> +0x72F9 # <CJK> +0x72FC # <CJK> +0x72FD # <CJK> +0x730A # <CJK> +0x7316 # <CJK> +0x7317 # <CJK> +0x731B # <CJK> +0x731C # <CJK> +0x731D # <CJK> +0x731F # <CJK> +0x7325 # <CJK> +0x7329 # <CJK> +0x732A # <CJK> +0x732B # <CJK> +0x732E # <CJK> +0x732F # <CJK> +0x7334 # <CJK> +0x7336 # <CJK> +0x7337 # <CJK> +0x733E # <CJK> +0x733F # <CJK> +0x7344 # <CJK> +0x7345 # <CJK> +0x734E # <CJK> +0x734F # <CJK> +0x7357 # <CJK> +0x7363 # <CJK> +0x7368 # <CJK> +0x736A # <CJK> +0x7370 # <CJK> +0x7372 # <CJK> +0x7375 # <CJK> +0x7378 # <CJK> +0x737A # <CJK> +0x737B # <CJK> +0x7384 # <CJK> +0x7387 # <CJK> +0x7389 # <CJK> +0x738B # <CJK> +0x7396 # <CJK> +0x73A9 # <CJK> +0x73B2 # <CJK> +0x73B3 # <CJK> +0x73BB # <CJK> +0x73C0 # <CJK> +0x73C2 # <CJK> +0x73C8 # <CJK> +0x73CA # <CJK> +0x73CD # <CJK> +0x73CE # <CJK> +0x73DE # <CJK> +0x73E0 # <CJK> +0x73E5 # <CJK> +0x73EA # <CJK> +0x73ED # <CJK> +0x73EE # <CJK> +0x73F1 # <CJK> +0x73F8 # <CJK> +0x73FE # <CJK> +0x7403 # <CJK> +0x7405 # <CJK> +0x7406 # <CJK> +0x7409 # <CJK> +0x7422 # <CJK> +0x7425 # <CJK> +0x7432 # <CJK> +0x7433 # <CJK> +0x7434 # <CJK> +0x7435 # <CJK> +0x7436 # <CJK> +0x743A # <CJK> +0x743F # <CJK> +0x7441 # <CJK> +0x7455 # <CJK> +0x7459 # <CJK> +0x745A # <CJK> +0x745B # <CJK> +0x745C # <CJK> +0x745E # <CJK> +0x745F # <CJK> +0x7460 # <CJK> +0x7463 # <CJK> +0x7464 # <CJK> +0x7469 # <CJK> +0x746A # <CJK> +0x746F # <CJK> +0x7470 # <CJK> +0x7473 # <CJK> +0x7476 # <CJK> +0x747E # <CJK> +0x7483 # <CJK> +0x748B # <CJK> +0x749E # <CJK> +0x74A2 # <CJK> +0x74A7 # <CJK> +0x74B0 # <CJK> +0x74BD # <CJK> +0x74CA # <CJK> +0x74CF # <CJK> +0x74D4 # <CJK> +0x74DC # <CJK> +0x74E0 # <CJK> +0x74E2 # <CJK> +0x74E3 # <CJK> +0x74E6 # <CJK> +0x74E7 # <CJK> +0x74E9 # <CJK> +0x74EE # <CJK> +0x74F0 # <CJK> +0x74F1 # <CJK> +0x74F2 # <CJK> +0x74F6 # <CJK> +0x74F7 # <CJK> +0x74F8 # <CJK> +0x7503 # <CJK> +0x7504 # <CJK> +0x7505 # <CJK> +0x750C # <CJK> +0x750D # <CJK> +0x750E # <CJK> +0x7511 # <CJK> +0x7513 # <CJK> +0x7515 # <CJK> +0x7518 # <CJK> +0x751A # <CJK> +0x751C # <CJK> +0x751E # <CJK> +0x751F # <CJK> +0x7523 # <CJK> +0x7525 # <CJK> +0x7526 # <CJK> +0x7528 # <CJK> +0x752B # <CJK> +0x752C # <CJK> +0x7530 # <CJK> +0x7531 # <CJK> +0x7532 # <CJK> +0x7533 # <CJK> +0x7537 # <CJK> +0x7538 # <CJK> +0x753A # <CJK> +0x753B # <CJK> +0x753C # <CJK> +0x7544 # <CJK> +0x7546 # <CJK> +0x7549 # <CJK> +0x754A # <CJK> +0x754B # <CJK> +0x754C # <CJK> +0x754D # <CJK> +0x754F # <CJK> +0x7551 # <CJK> +0x7554 # <CJK> +0x7559 # <CJK> +0x755A # <CJK> +0x755B # <CJK> +0x755C # <CJK> +0x755D # <CJK> +0x7560 # <CJK> +0x7562 # <CJK> +0x7564 # <CJK> +0x7565 # <CJK> +0x7566 # <CJK> +0x7567 # <CJK> +0x7569 # <CJK> +0x756A # <CJK> +0x756B # <CJK> +0x756D # <CJK> +0x7570 # <CJK> +0x7573 # <CJK> +0x7574 # <CJK> +0x7576 # <CJK> +0x7577 # <CJK> +0x7578 # <CJK> +0x757F # <CJK> +0x7582 # <CJK> +0x7586 # <CJK> +0x7587 # <CJK> +0x7589 # <CJK> +0x758A # <CJK> +0x758B # <CJK> +0x758E # <CJK> +0x758F # <CJK> +0x7591 # <CJK> +0x7594 # <CJK> +0x759A # <CJK> +0x759D # <CJK> +0x75A3 # <CJK> +0x75A5 # <CJK> +0x75AB # <CJK> +0x75B1 # <CJK> +0x75B2 # <CJK> +0x75B3 # <CJK> +0x75B5 # <CJK> +0x75B8 # <CJK> +0x75B9 # <CJK> +0x75BC # <CJK> +0x75BD # <CJK> +0x75BE # <CJK> +0x75C2 # <CJK> +0x75C3 # <CJK> +0x75C5 # <CJK> +0x75C7 # <CJK> +0x75CA # <CJK> +0x75CD # <CJK> +0x75D2 # <CJK> +0x75D4 # <CJK> +0x75D5 # <CJK> +0x75D8 # <CJK> +0x75D9 # <CJK> +0x75DB # <CJK> +0x75DE # <CJK> +0x75E2 # <CJK> +0x75E3 # <CJK> +0x75E9 # <CJK> +0x75F0 # <CJK> +0x75F2 # <CJK> +0x75F3 # <CJK> +0x75F4 # <CJK> +0x75FA # <CJK> +0x75FC # <CJK> +0x75FE # <CJK> +0x75FF # <CJK> +0x7601 # <CJK> +0x7609 # <CJK> +0x760B # <CJK> +0x760D # <CJK> +0x761F # <CJK> +0x7620 # <CJK> +0x7621 # <CJK> +0x7622 # <CJK> +0x7624 # <CJK> +0x7627 # <CJK> +0x7630 # <CJK> +0x7634 # <CJK> +0x763B # <CJK> +0x7642 # <CJK> +0x7646 # <CJK> +0x7647 # <CJK> +0x7648 # <CJK> +0x764C # <CJK> +0x7652 # <CJK> +0x7656 # <CJK> +0x7658 # <CJK> +0x765C # <CJK> +0x7661 # <CJK> +0x7662 # <CJK> +0x7667 # <CJK> +0x7668 # <CJK> +0x7669 # <CJK> +0x766A # <CJK> +0x766C # <CJK> +0x7670 # <CJK> +0x7672 # <CJK> +0x7676 # <CJK> +0x7678 # <CJK> +0x767A # <CJK> +0x767B # <CJK> +0x767C # <CJK> +0x767D # <CJK> +0x767E # <CJK> +0x7680 # <CJK> +0x7683 # <CJK> +0x7684 # <CJK> +0x7686 # <CJK> +0x7687 # <CJK> +0x7688 # <CJK> +0x768B # <CJK> +0x768E # <CJK> +0x7690 # <CJK> +0x7693 # <CJK> +0x7696 # <CJK> +0x7699 # <CJK> +0x769A # <CJK> +0x76AE # <CJK> +0x76B0 # <CJK> +0x76B4 # <CJK> +0x76B7 # <CJK> +0x76B8 # <CJK> +0x76B9 # <CJK> +0x76BA # <CJK> +0x76BF # <CJK> +0x76C2 # <CJK> +0x76C3 # <CJK> +0x76C6 # <CJK> +0x76C8 # <CJK> +0x76CA # <CJK> +0x76CD # <CJK> +0x76D2 # <CJK> +0x76D6 # <CJK> +0x76D7 # <CJK> +0x76DB # <CJK> +0x76DC # <CJK> +0x76DE # <CJK> +0x76DF # <CJK> +0x76E1 # <CJK> +0x76E3 # <CJK> +0x76E4 # <CJK> +0x76E5 # <CJK> +0x76E7 # <CJK> +0x76EA # <CJK> +0x76EE # <CJK> +0x76F2 # <CJK> +0x76F4 # <CJK> +0x76F8 # <CJK> +0x76FB # <CJK> +0x76FE # <CJK> +0x7701 # <CJK> +0x7704 # <CJK> +0x7707 # <CJK> +0x7708 # <CJK> +0x7709 # <CJK> +0x770B # <CJK> +0x770C # <CJK> +0x771B # <CJK> +0x771E # <CJK> +0x771F # <CJK> +0x7720 # <CJK> +0x7724 # <CJK> +0x7725 # <CJK> +0x7726 # <CJK> +0x7729 # <CJK> +0x7737 # <CJK> +0x7738 # <CJK> +0x773A # <CJK> +0x773C # <CJK> +0x7740 # <CJK> +0x7747 # <CJK> +0x775A # <CJK> +0x775B # <CJK> +0x7761 # <CJK> +0x7763 # <CJK> +0x7765 # <CJK> +0x7766 # <CJK> +0x7768 # <CJK> +0x776B # <CJK> +0x7779 # <CJK> +0x777E # <CJK> +0x777F # <CJK> +0x778B # <CJK> +0x778E # <CJK> +0x7791 # <CJK> +0x779E # <CJK> +0x77A0 # <CJK> +0x77A5 # <CJK> +0x77AC # <CJK> +0x77AD # <CJK> +0x77B0 # <CJK> +0x77B3 # <CJK> +0x77B6 # <CJK> +0x77B9 # <CJK> +0x77BB # <CJK> +0x77BC # <CJK> +0x77BD # <CJK> +0x77BF # <CJK> +0x77C7 # <CJK> +0x77CD # <CJK> +0x77D7 # <CJK> +0x77DA # <CJK> +0x77DB # <CJK> +0x77DC # <CJK> +0x77E2 # <CJK> +0x77E3 # <CJK> +0x77E5 # <CJK> +0x77E7 # <CJK> +0x77E9 # <CJK> +0x77ED # <CJK> +0x77EE # <CJK> +0x77EF # <CJK> +0x77F3 # <CJK> +0x77FC # <CJK> +0x7802 # <CJK> +0x780C # <CJK> +0x7812 # <CJK> +0x7814 # <CJK> +0x7815 # <CJK> +0x7820 # <CJK> +0x7825 # <CJK> +0x7826 # <CJK> +0x7827 # <CJK> +0x7832 # <CJK> +0x7834 # <CJK> +0x783A # <CJK> +0x783F # <CJK> +0x7845 # <CJK> +0x785D # <CJK> +0x786B # <CJK> +0x786C # <CJK> +0x786F # <CJK> +0x7872 # <CJK> +0x7874 # <CJK> +0x787C # <CJK> +0x7881 # <CJK> +0x7886 # <CJK> +0x7887 # <CJK> +0x788C # <CJK> +0x788D # <CJK> +0x788E # <CJK> +0x7891 # <CJK> +0x7893 # <CJK> +0x7895 # <CJK> +0x7897 # <CJK> +0x789A # <CJK> +0x78A3 # <CJK> +0x78A7 # <CJK> +0x78A9 # <CJK> +0x78AA # <CJK> +0x78AF # <CJK> +0x78B5 # <CJK> +0x78BA # <CJK> +0x78BC # <CJK> +0x78BE # <CJK> +0x78C1 # <CJK> +0x78C5 # <CJK> +0x78C6 # <CJK> +0x78CA # <CJK> +0x78CB # <CJK> +0x78D0 # <CJK> +0x78D1 # <CJK> +0x78D4 # <CJK> +0x78DA # <CJK> +0x78E7 # <CJK> +0x78E8 # <CJK> +0x78EC # <CJK> +0x78EF # <CJK> +0x78F4 # <CJK> +0x78FD # <CJK> +0x7901 # <CJK> +0x7907 # <CJK> +0x790E # <CJK> +0x7911 # <CJK> +0x7912 # <CJK> +0x7919 # <CJK> +0x7926 # <CJK> +0x792A # <CJK> +0x792B # <CJK> +0x792C # <CJK> +0x793A # <CJK> +0x793C # <CJK> +0x793E # <CJK> +0x7940 # <CJK> +0x7941 # <CJK> +0x7947 # <CJK> +0x7948 # <CJK> +0x7949 # <CJK> +0x7950 # <CJK> +0x7953 # <CJK> +0x7955 # <CJK> +0x7956 # <CJK> +0x7957 # <CJK> +0x795A # <CJK> +0x795D # <CJK> +0x795E # <CJK> +0x795F # <CJK> +0x7960 # <CJK> +0x7962 # <CJK> +0x7965 # <CJK> +0x7968 # <CJK> +0x796D # <CJK> +0x7977 # <CJK> +0x797A # <CJK> +0x797F # <CJK> +0x7980 # <CJK> +0x7981 # <CJK> +0x7984 # <CJK> +0x7985 # <CJK> +0x798A # <CJK> +0x798D # <CJK> +0x798E # <CJK> +0x798F # <CJK> +0x799D # <CJK> +0x79A6 # <CJK> +0x79A7 # <CJK> +0x79AA # <CJK> +0x79AE # <CJK> +0x79B0 # <CJK> +0x79B3 # <CJK> +0x79B9 # <CJK> +0x79BA # <CJK> +0x79BD # <CJK> +0x79BE # <CJK> +0x79BF # <CJK> +0x79C0 # <CJK> +0x79C1 # <CJK> +0x79C9 # <CJK> +0x79CB # <CJK> +0x79D1 # <CJK> +0x79D2 # <CJK> +0x79D5 # <CJK> +0x79D8 # <CJK> +0x79DF # <CJK> +0x79E1 # <CJK> +0x79E3 # <CJK> +0x79E4 # <CJK> +0x79E6 # <CJK> +0x79E7 # <CJK> +0x79E9 # <CJK> +0x79EC # <CJK> +0x79F0 # <CJK> +0x79FB # <CJK> +0x7A00 # <CJK> +0x7A08 # <CJK> +0x7A0B # <CJK> +0x7A0D # <CJK> +0x7A0E # <CJK> +0x7A14 # <CJK> +0x7A17 # <CJK> +0x7A18 # <CJK> +0x7A19 # <CJK> +0x7A1A # <CJK> +0x7A1C # <CJK> +0x7A1F # <CJK> +0x7A20 # <CJK> +0x7A2E # <CJK> +0x7A31 # <CJK> +0x7A32 # <CJK> +0x7A37 # <CJK> +0x7A3B # <CJK> +0x7A3C # <CJK> +0x7A3D # <CJK> +0x7A3E # <CJK> +0x7A3F # <CJK> +0x7A40 # <CJK> +0x7A42 # <CJK> +0x7A43 # <CJK> +0x7A46 # <CJK> +0x7A49 # <CJK> +0x7A4D # <CJK> +0x7A4E # <CJK> +0x7A4F # <CJK> +0x7A50 # <CJK> +0x7A57 # <CJK> +0x7A61 # <CJK> +0x7A62 # <CJK> +0x7A63 # <CJK> +0x7A69 # <CJK> +0x7A6B # <CJK> +0x7A70 # <CJK> +0x7A74 # <CJK> +0x7A76 # <CJK> +0x7A79 # <CJK> +0x7A7A # <CJK> +0x7A7D # <CJK> +0x7A7F # <CJK> +0x7A81 # <CJK> +0x7A83 # <CJK> +0x7A84 # <CJK> +0x7A88 # <CJK> +0x7A92 # <CJK> +0x7A93 # <CJK> +0x7A95 # <CJK> +0x7A96 # <CJK> +0x7A97 # <CJK> +0x7A98 # <CJK> +0x7A9F # <CJK> +0x7AA9 # <CJK> +0x7AAA # <CJK> +0x7AAE # <CJK> +0x7AAF # <CJK> +0x7AB0 # <CJK> +0x7AB6 # <CJK> +0x7ABA # <CJK> +0x7ABF # <CJK> +0x7AC3 # <CJK> +0x7AC4 # <CJK> +0x7AC5 # <CJK> +0x7AC7 # <CJK> +0x7AC8 # <CJK> +0x7ACA # <CJK> +0x7ACB # <CJK> +0x7ACD # <CJK> +0x7ACF # <CJK> +0x7AD2 # <CJK> +0x7AD3 # <CJK> +0x7AD5 # <CJK> +0x7AD9 # <CJK> +0x7ADA # <CJK> +0x7ADC # <CJK> +0x7ADD # <CJK> +0x7ADF # <CJK> +0x7AE0 # <CJK> +0x7AE1 # <CJK> +0x7AE2 # <CJK> +0x7AE3 # <CJK> +0x7AE5 # <CJK> +0x7AE6 # <CJK> +0x7AEA # <CJK> +0x7AED # <CJK> +0x7AEF # <CJK> +0x7AF0 # <CJK> +0x7AF6 # <CJK> +0x7AF8 # <CJK> +0x7AF9 # <CJK> +0x7AFA # <CJK> +0x7AFF # <CJK> +0x7B02 # <CJK> +0x7B04 # <CJK> +0x7B06 # <CJK> +0x7B08 # <CJK> +0x7B0A # <CJK> +0x7B0B # <CJK> +0x7B0F # <CJK> +0x7B11 # <CJK> +0x7B18 # <CJK> +0x7B19 # <CJK> +0x7B1B # <CJK> +0x7B1E # <CJK> +0x7B20 # <CJK> +0x7B25 # <CJK> +0x7B26 # <CJK> +0x7B28 # <CJK> +0x7B2C # <CJK> +0x7B33 # <CJK> +0x7B35 # <CJK> +0x7B36 # <CJK> +0x7B39 # <CJK> +0x7B45 # <CJK> +0x7B46 # <CJK> +0x7B48 # <CJK> +0x7B49 # <CJK> +0x7B4B # <CJK> +0x7B4C # <CJK> +0x7B4D # <CJK> +0x7B4F # <CJK> +0x7B50 # <CJK> +0x7B51 # <CJK> +0x7B52 # <CJK> +0x7B54 # <CJK> +0x7B56 # <CJK> +0x7B5D # <CJK> +0x7B65 # <CJK> +0x7B67 # <CJK> +0x7B6C # <CJK> +0x7B6E # <CJK> +0x7B70 # <CJK> +0x7B71 # <CJK> +0x7B74 # <CJK> +0x7B75 # <CJK> +0x7B7A # <CJK> +0x7B86 # <CJK> +0x7B87 # <CJK> +0x7B8B # <CJK> +0x7B8D # <CJK> +0x7B8F # <CJK> +0x7B92 # <CJK> +0x7B94 # <CJK> +0x7B95 # <CJK> +0x7B97 # <CJK> +0x7B98 # <CJK> +0x7B99 # <CJK> +0x7B9A # <CJK> +0x7B9C # <CJK> +0x7B9D # <CJK> +0x7B9F # <CJK> +0x7BA1 # <CJK> +0x7BAA # <CJK> +0x7BAD # <CJK> +0x7BB1 # <CJK> +0x7BB4 # <CJK> +0x7BB8 # <CJK> +0x7BC0 # <CJK> +0x7BC1 # <CJK> +0x7BC4 # <CJK> +0x7BC6 # <CJK> +0x7BC7 # <CJK> +0x7BC9 # <CJK> +0x7BCB # <CJK> +0x7BCC # <CJK> +0x7BCF # <CJK> +0x7BDD # <CJK> +0x7BE0 # <CJK> +0x7BE4 # <CJK> +0x7BE5 # <CJK> +0x7BE6 # <CJK> +0x7BE9 # <CJK> +0x7BED # <CJK> +0x7BF3 # <CJK> +0x7BF6 # <CJK> +0x7BF7 # <CJK> +0x7C00 # <CJK> +0x7C07 # <CJK> +0x7C0D # <CJK> +0x7C11 # <CJK> +0x7C12 # <CJK> +0x7C13 # <CJK> +0x7C14 # <CJK> +0x7C17 # <CJK> +0x7C1F # <CJK> +0x7C21 # <CJK> +0x7C23 # <CJK> +0x7C27 # <CJK> +0x7C2A # <CJK> +0x7C2B # <CJK> +0x7C37 # <CJK> +0x7C38 # <CJK> +0x7C3D # <CJK> +0x7C3E # <CJK> +0x7C3F # <CJK> +0x7C40 # <CJK> +0x7C43 # <CJK> +0x7C4C # <CJK> +0x7C4D # <CJK> +0x7C4F # <CJK> +0x7C50 # <CJK> +0x7C54 # <CJK> +0x7C56 # <CJK> +0x7C58 # <CJK> +0x7C5F # <CJK> +0x7C60 # <CJK> +0x7C64 # <CJK> +0x7C65 # <CJK> +0x7C6C # <CJK> +0x7C73 # <CJK> +0x7C75 # <CJK> +0x7C7E # <CJK> +0x7C81 # <CJK> +0x7C82 # <CJK> +0x7C83 # <CJK> +0x7C89 # <CJK> +0x7C8B # <CJK> +0x7C8D # <CJK> +0x7C90 # <CJK> +0x7C92 # <CJK> +0x7C95 # <CJK> +0x7C97 # <CJK> +0x7C98 # <CJK> +0x7C9B # <CJK> +0x7C9F # <CJK> +0x7CA1 # <CJK> +0x7CA2 # <CJK> +0x7CA4 # <CJK> +0x7CA5 # <CJK> +0x7CA7 # <CJK> +0x7CA8 # <CJK> +0x7CAB # <CJK> +0x7CAD # <CJK> +0x7CAE # <CJK> +0x7CB1 # <CJK> +0x7CB2 # <CJK> +0x7CB3 # <CJK> +0x7CB9 # <CJK> +0x7CBD # <CJK> +0x7CBE # <CJK> +0x7CC0 # <CJK> +0x7CC2 # <CJK> +0x7CC5 # <CJK> +0x7CCA # <CJK> +0x7CCE # <CJK> +0x7CD2 # <CJK> +0x7CD6 # <CJK> +0x7CD8 # <CJK> +0x7CDC # <CJK> +0x7CDE # <CJK> +0x7CDF # <CJK> +0x7CE0 # <CJK> +0x7CE2 # <CJK> +0x7CE7 # <CJK> +0x7CEF # <CJK> +0x7CF2 # <CJK> +0x7CF4 # <CJK> +0x7CF6 # <CJK> +0x7CF8 # <CJK> +0x7CFA # <CJK> +0x7CFB # <CJK> +0x7CFE # <CJK> +0x7D00 # <CJK> +0x7D02 # <CJK> +0x7D04 # <CJK> +0x7D05 # <CJK> +0x7D06 # <CJK> +0x7D0A # <CJK> +0x7D0B # <CJK> +0x7D0D # <CJK> +0x7D10 # <CJK> +0x7D14 # <CJK> +0x7D15 # <CJK> +0x7D17 # <CJK> +0x7D18 # <CJK> +0x7D19 # <CJK> +0x7D1A # <CJK> +0x7D1B # <CJK> +0x7D1C # <CJK> +0x7D20 # <CJK> +0x7D21 # <CJK> +0x7D22 # <CJK> +0x7D2B # <CJK> +0x7D2C # <CJK> +0x7D2E # <CJK> +0x7D2F # <CJK> +0x7D30 # <CJK> +0x7D32 # <CJK> +0x7D33 # <CJK> +0x7D35 # <CJK> +0x7D39 # <CJK> +0x7D3A # <CJK> +0x7D3F # <CJK> +0x7D42 # <CJK> +0x7D43 # <CJK> +0x7D44 # <CJK> +0x7D45 # <CJK> +0x7D46 # <CJK> +0x7D4B # <CJK> +0x7D4C # <CJK> +0x7D4E # <CJK> +0x7D4F # <CJK> +0x7D50 # <CJK> +0x7D56 # <CJK> +0x7D5B # <CJK> +0x7D5E # <CJK> +0x7D61 # <CJK> +0x7D62 # <CJK> +0x7D63 # <CJK> +0x7D66 # <CJK> +0x7D68 # <CJK> +0x7D6E # <CJK> +0x7D71 # <CJK> +0x7D72 # <CJK> +0x7D73 # <CJK> +0x7D75 # <CJK> +0x7D76 # <CJK> +0x7D79 # <CJK> +0x7D7D # <CJK> +0x7D89 # <CJK> +0x7D8F # <CJK> +0x7D93 # <CJK> +0x7D99 # <CJK> +0x7D9A # <CJK> +0x7D9B # <CJK> +0x7D9C # <CJK> +0x7D9F # <CJK> +0x7DA2 # <CJK> +0x7DA3 # <CJK> +0x7DAB # <CJK> +0x7DAC # <CJK> +0x7DAD # <CJK> +0x7DAE # <CJK> +0x7DAF # <CJK> +0x7DB0 # <CJK> +0x7DB1 # <CJK> +0x7DB2 # <CJK> +0x7DB4 # <CJK> +0x7DB5 # <CJK> +0x7DB8 # <CJK> +0x7DBA # <CJK> +0x7DBB # <CJK> +0x7DBD # <CJK> +0x7DBE # <CJK> +0x7DBF # <CJK> +0x7DC7 # <CJK> +0x7DCA # <CJK> +0x7DCB # <CJK> +0x7DCF # <CJK> +0x7DD1 # <CJK> +0x7DD2 # <CJK> +0x7DD5 # <CJK> +0x7DD8 # <CJK> +0x7DDA # <CJK> +0x7DDC # <CJK> +0x7DDD # <CJK> +0x7DDE # <CJK> +0x7DE0 # <CJK> +0x7DE1 # <CJK> +0x7DE4 # <CJK> +0x7DE8 # <CJK> +0x7DE9 # <CJK> +0x7DEC # <CJK> +0x7DEF # <CJK> +0x7DF2 # <CJK> +0x7DF4 # <CJK> +0x7DFB # <CJK> +0x7E01 # <CJK> +0x7E04 # <CJK> +0x7E05 # <CJK> +0x7E09 # <CJK> +0x7E0A # <CJK> +0x7E0B # <CJK> +0x7E12 # <CJK> +0x7E1B # <CJK> +0x7E1E # <CJK> +0x7E1F # <CJK> +0x7E21 # <CJK> +0x7E22 # <CJK> +0x7E23 # <CJK> +0x7E26 # <CJK> +0x7E2B # <CJK> +0x7E2E # <CJK> +0x7E31 # <CJK> +0x7E32 # <CJK> +0x7E35 # <CJK> +0x7E37 # <CJK> +0x7E39 # <CJK> +0x7E3A # <CJK> +0x7E3B # <CJK> +0x7E3D # <CJK> +0x7E3E # <CJK> +0x7E41 # <CJK> +0x7E43 # <CJK> +0x7E46 # <CJK> +0x7E4A # <CJK> +0x7E4B # <CJK> +0x7E4D # <CJK> +0x7E54 # <CJK> +0x7E55 # <CJK> +0x7E56 # <CJK> +0x7E59 # <CJK> +0x7E5A # <CJK> +0x7E5D # <CJK> +0x7E5E # <CJK> +0x7E66 # <CJK> +0x7E67 # <CJK> +0x7E69 # <CJK> +0x7E6A # <CJK> +0x7E6D # <CJK> +0x7E70 # <CJK> +0x7E79 # <CJK> +0x7E7B # <CJK> +0x7E7C # <CJK> +0x7E7D # <CJK> +0x7E7F # <CJK> +0x7E82 # <CJK> +0x7E83 # <CJK> +0x7E88 # <CJK> +0x7E89 # <CJK> +0x7E8C # <CJK> +0x7E8E # <CJK> +0x7E8F # <CJK> +0x7E90 # <CJK> +0x7E92 # <CJK> +0x7E93 # <CJK> +0x7E94 # <CJK> +0x7E96 # <CJK> +0x7E9B # <CJK> +0x7E9C # <CJK> +0x7F36 # <CJK> +0x7F38 # <CJK> +0x7F3A # <CJK> +0x7F45 # <CJK> +0x7F4C # <CJK> +0x7F4D # <CJK> +0x7F4E # <CJK> +0x7F50 # <CJK> +0x7F51 # <CJK> +0x7F54 # <CJK> +0x7F55 # <CJK> +0x7F58 # <CJK> +0x7F5F # <CJK> +0x7F60 # <CJK> +0x7F67 # <CJK> +0x7F68 # <CJK> +0x7F69 # <CJK> +0x7F6A # <CJK> +0x7F6B # <CJK> +0x7F6E # <CJK> +0x7F70 # <CJK> +0x7F72 # <CJK> +0x7F75 # <CJK> +0x7F77 # <CJK> +0x7F78 # <CJK> +0x7F79 # <CJK> +0x7F82 # <CJK> +0x7F83 # <CJK> +0x7F85 # <CJK> +0x7F86 # <CJK> +0x7F87 # <CJK> +0x7F88 # <CJK> +0x7F8A # <CJK> +0x7F8C # <CJK> +0x7F8E # <CJK> +0x7F94 # <CJK> +0x7F9A # <CJK> +0x7F9D # <CJK> +0x7F9E # <CJK> +0x7FA3 # <CJK> +0x7FA4 # <CJK> +0x7FA8 # <CJK> +0x7FA9 # <CJK> +0x7FAE # <CJK> +0x7FAF # <CJK> +0x7FB2 # <CJK> +0x7FB6 # <CJK> +0x7FB8 # <CJK> +0x7FB9 # <CJK> +0x7FBD # <CJK> +0x7FC1 # <CJK> +0x7FC5 # <CJK> +0x7FC6 # <CJK> +0x7FCA # <CJK> +0x7FCC # <CJK> +0x7FD2 # <CJK> +0x7FD4 # <CJK> +0x7FD5 # <CJK> +0x7FE0 # <CJK> +0x7FE1 # <CJK> +0x7FE6 # <CJK> +0x7FE9 # <CJK> +0x7FEB # <CJK> +0x7FF0 # <CJK> +0x7FF3 # <CJK> +0x7FF9 # <CJK> +0x7FFB # <CJK> +0x7FFC # <CJK> +0x8000 # <CJK> +0x8001 # <CJK> +0x8003 # <CJK> +0x8004 # <CJK> +0x8005 # <CJK> +0x8006 # <CJK> +0x800B # <CJK> +0x800C # <CJK> +0x8010 # <CJK> +0x8012 # <CJK> +0x8015 # <CJK> +0x8017 # <CJK> +0x8018 # <CJK> +0x8019 # <CJK> +0x801C # <CJK> +0x8021 # <CJK> +0x8028 # <CJK> +0x8033 # <CJK> +0x8036 # <CJK> +0x803B # <CJK> +0x803D # <CJK> +0x803F # <CJK> +0x8046 # <CJK> +0x804A # <CJK> +0x8052 # <CJK> +0x8056 # <CJK> +0x8058 # <CJK> +0x805A # <CJK> +0x805E # <CJK> +0x805F # <CJK> +0x8061 # <CJK> +0x8062 # <CJK> +0x8068 # <CJK> +0x806F # <CJK> +0x8070 # <CJK> +0x8072 # <CJK> +0x8073 # <CJK> +0x8074 # <CJK> +0x8076 # <CJK> +0x8077 # <CJK> +0x8079 # <CJK> +0x807D # <CJK> +0x807E # <CJK> +0x807F # <CJK> +0x8084 # <CJK> +0x8085 # <CJK> +0x8086 # <CJK> +0x8087 # <CJK> +0x8089 # <CJK> +0x808B # <CJK> +0x808C # <CJK> +0x8093 # <CJK> +0x8096 # <CJK> +0x8098 # <CJK> +0x809A # <CJK> +0x809B # <CJK> +0x809D # <CJK> +0x80A1 # <CJK> +0x80A2 # <CJK> +0x80A5 # <CJK> +0x80A9 # <CJK> +0x80AA # <CJK> +0x80AC # <CJK> +0x80AD # <CJK> +0x80AF # <CJK> +0x80B1 # <CJK> +0x80B2 # <CJK> +0x80B4 # <CJK> +0x80BA # <CJK> +0x80C3 # <CJK> +0x80C4 # <CJK> +0x80C6 # <CJK> +0x80CC # <CJK> +0x80CE # <CJK> +0x80D6 # <CJK> +0x80D9 # <CJK> +0x80DA # <CJK> +0x80DB # <CJK> +0x80DD # <CJK> +0x80DE # <CJK> +0x80E1 # <CJK> +0x80E4 # <CJK> +0x80E5 # <CJK> +0x80EF # <CJK> +0x80F1 # <CJK> +0x80F4 # <CJK> +0x80F8 # <CJK> +0x80FC # <CJK> +0x80FD # <CJK> +0x8102 # <CJK> +0x8105 # <CJK> +0x8106 # <CJK> +0x8107 # <CJK> +0x8108 # <CJK> +0x8109 # <CJK> +0x810A # <CJK> +0x811A # <CJK> +0x811B # <CJK> +0x8123 # <CJK> +0x8129 # <CJK> +0x812F # <CJK> +0x8131 # <CJK> +0x8133 # <CJK> +0x8139 # <CJK> +0x813E # <CJK> +0x8146 # <CJK> +0x814B # <CJK> +0x814E # <CJK> +0x8150 # <CJK> +0x8151 # <CJK> +0x8153 # <CJK> +0x8154 # <CJK> +0x8155 # <CJK> +0x815F # <CJK> +0x8165 # <CJK> +0x8166 # <CJK> +0x816B # <CJK> +0x816E # <CJK> +0x8170 # <CJK> +0x8171 # <CJK> +0x8174 # <CJK> +0x8178 # <CJK> +0x8179 # <CJK> +0x817A # <CJK> +0x817F # <CJK> +0x8180 # <CJK> +0x8182 # <CJK> +0x8183 # <CJK> +0x8188 # <CJK> +0x818A # <CJK> +0x818F # <CJK> +0x8193 # <CJK> +0x8195 # <CJK> +0x819A # <CJK> +0x819C # <CJK> +0x819D # <CJK> +0x81A0 # <CJK> +0x81A3 # <CJK> +0x81A4 # <CJK> +0x81A8 # <CJK> +0x81A9 # <CJK> +0x81B0 # <CJK> +0x81B3 # <CJK> +0x81B5 # <CJK> +0x81B8 # <CJK> +0x81BA # <CJK> +0x81BD # <CJK> +0x81BE # <CJK> +0x81BF # <CJK> +0x81C0 # <CJK> +0x81C2 # <CJK> +0x81C6 # <CJK> +0x81C8 # <CJK> +0x81C9 # <CJK> +0x81CD # <CJK> +0x81D1 # <CJK> +0x81D3 # <CJK> +0x81D8 # <CJK> +0x81D9 # <CJK> +0x81DA # <CJK> +0x81DF # <CJK> +0x81E0 # <CJK> +0x81E3 # <CJK> +0x81E5 # <CJK> +0x81E7 # <CJK> +0x81E8 # <CJK> +0x81EA # <CJK> +0x81ED # <CJK> +0x81F3 # <CJK> +0x81F4 # <CJK> +0x81FA # <CJK> +0x81FB # <CJK> +0x81FC # <CJK> +0x81FE # <CJK> +0x8201 # <CJK> +0x8202 # <CJK> +0x8205 # <CJK> +0x8207 # <CJK> +0x8208 # <CJK> +0x8209 # <CJK> +0x820A # <CJK> +0x820C # <CJK> +0x820D # <CJK> +0x820E # <CJK> +0x8210 # <CJK> +0x8212 # <CJK> +0x8216 # <CJK> +0x8217 # <CJK> +0x8218 # <CJK> +0x821B # <CJK> +0x821C # <CJK> +0x821E # <CJK> +0x821F # <CJK> +0x8229 # <CJK> +0x822A # <CJK> +0x822B # <CJK> +0x822C # <CJK> +0x822E # <CJK> +0x8233 # <CJK> +0x8235 # <CJK> +0x8236 # <CJK> +0x8237 # <CJK> +0x8238 # <CJK> +0x8239 # <CJK> +0x8240 # <CJK> +0x8247 # <CJK> +0x8258 # <CJK> +0x8259 # <CJK> +0x825A # <CJK> +0x825D # <CJK> +0x825F # <CJK> +0x8262 # <CJK> +0x8264 # <CJK> +0x8266 # <CJK> +0x8268 # <CJK> +0x826A # <CJK> +0x826B # <CJK> +0x826E # <CJK> +0x826F # <CJK> +0x8271 # <CJK> +0x8272 # <CJK> +0x8276 # <CJK> +0x8277 # <CJK> +0x8278 # <CJK> +0x827E # <CJK> +0x828B # <CJK> +0x828D # <CJK> +0x8292 # <CJK> +0x8299 # <CJK> +0x829D # <CJK> +0x829F # <CJK> +0x82A5 # <CJK> +0x82A6 # <CJK> +0x82AB # <CJK> +0x82AC # <CJK> +0x82AD # <CJK> +0x82AF # <CJK> +0x82B1 # <CJK> +0x82B3 # <CJK> +0x82B8 # <CJK> +0x82B9 # <CJK> +0x82BB # <CJK> +0x82BD # <CJK> +0x82C5 # <CJK> +0x82D1 # <CJK> +0x82D2 # <CJK> +0x82D3 # <CJK> +0x82D4 # <CJK> +0x82D7 # <CJK> +0x82D9 # <CJK> +0x82DB # <CJK> +0x82DC # <CJK> +0x82DE # <CJK> +0x82DF # <CJK> +0x82E1 # <CJK> +0x82E3 # <CJK> +0x82E5 # <CJK> +0x82E6 # <CJK> +0x82E7 # <CJK> +0x82EB # <CJK> +0x82F1 # <CJK> +0x82F3 # <CJK> +0x82F4 # <CJK> +0x82F9 # <CJK> +0x82FA # <CJK> +0x82FB # <CJK> +0x8302 # <CJK> +0x8303 # <CJK> +0x8304 # <CJK> +0x8305 # <CJK> +0x8306 # <CJK> +0x8309 # <CJK> +0x830E # <CJK> +0x8316 # <CJK> +0x8317 # <CJK> +0x8318 # <CJK> +0x831C # <CJK> +0x8323 # <CJK> +0x8328 # <CJK> +0x832B # <CJK> +0x832F # <CJK> +0x8331 # <CJK> +0x8332 # <CJK> +0x8334 # <CJK> +0x8335 # <CJK> +0x8336 # <CJK> +0x8338 # <CJK> +0x8339 # <CJK> +0x8340 # <CJK> +0x8345 # <CJK> +0x8349 # <CJK> +0x834A # <CJK> +0x834F # <CJK> +0x8350 # <CJK> +0x8352 # <CJK> +0x8358 # <CJK> +0x8373 # <CJK> +0x8375 # <CJK> +0x8377 # <CJK> +0x837B # <CJK> +0x837C # <CJK> +0x8385 # <CJK> +0x8387 # <CJK> +0x8389 # <CJK> +0x838A # <CJK> +0x838E # <CJK> +0x8393 # <CJK> +0x8396 # <CJK> +0x839A # <CJK> +0x839E # <CJK> +0x839F # <CJK> +0x83A0 # <CJK> +0x83A2 # <CJK> +0x83A8 # <CJK> +0x83AA # <CJK> +0x83AB # <CJK> +0x83B1 # <CJK> +0x83B5 # <CJK> +0x83BD # <CJK> +0x83C1 # <CJK> +0x83C5 # <CJK> +0x83CA # <CJK> +0x83CC # <CJK> +0x83CE # <CJK> +0x83D3 # <CJK> +0x83D6 # <CJK> +0x83D8 # <CJK> +0x83DC # <CJK> +0x83DF # <CJK> +0x83E0 # <CJK> +0x83E9 # <CJK> +0x83EB # <CJK> +0x83EF # <CJK> +0x83F0 # <CJK> +0x83F1 # <CJK> +0x83F2 # <CJK> +0x83F4 # <CJK> +0x83F7 # <CJK> +0x83FB # <CJK> +0x83FD # <CJK> +0x8403 # <CJK> +0x8404 # <CJK> +0x8407 # <CJK> +0x840B # <CJK> +0x840C # <CJK> +0x840D # <CJK> +0x840E # <CJK> +0x8413 # <CJK> +0x8420 # <CJK> +0x8422 # <CJK> +0x8429 # <CJK> +0x842A # <CJK> +0x842C # <CJK> +0x8431 # <CJK> +0x8435 # <CJK> +0x8438 # <CJK> +0x843C # <CJK> +0x843D # <CJK> +0x8446 # <CJK> +0x8449 # <CJK> +0x844E # <CJK> +0x8457 # <CJK> +0x845B # <CJK> +0x8461 # <CJK> +0x8462 # <CJK> +0x8463 # <CJK> +0x8466 # <CJK> +0x8469 # <CJK> +0x846B # <CJK> +0x846C # <CJK> +0x846D # <CJK> +0x846E # <CJK> +0x846F # <CJK> +0x8471 # <CJK> +0x8475 # <CJK> +0x8477 # <CJK> +0x8479 # <CJK> +0x847A # <CJK> +0x8482 # <CJK> +0x8484 # <CJK> +0x848B # <CJK> +0x8490 # <CJK> +0x8494 # <CJK> +0x8499 # <CJK> +0x849C # <CJK> +0x849F # <CJK> +0x84A1 # <CJK> +0x84AD # <CJK> +0x84B2 # <CJK> +0x84B8 # <CJK> +0x84B9 # <CJK> +0x84BB # <CJK> +0x84BC # <CJK> +0x84BF # <CJK> +0x84C1 # <CJK> +0x84C4 # <CJK> +0x84C6 # <CJK> +0x84C9 # <CJK> +0x84CA # <CJK> +0x84CB # <CJK> +0x84CD # <CJK> +0x84D0 # <CJK> +0x84D1 # <CJK> +0x84D6 # <CJK> +0x84D9 # <CJK> +0x84DA # <CJK> +0x84EC # <CJK> +0x84EE # <CJK> +0x84F4 # <CJK> +0x84FC # <CJK> +0x84FF # <CJK> +0x8500 # <CJK> +0x8506 # <CJK> +0x8511 # <CJK> +0x8513 # <CJK> +0x8514 # <CJK> +0x8515 # <CJK> +0x8517 # <CJK> +0x8518 # <CJK> +0x851A # <CJK> +0x851F # <CJK> +0x8521 # <CJK> +0x8526 # <CJK> +0x852C # <CJK> +0x852D # <CJK> +0x8535 # <CJK> +0x853D # <CJK> +0x8540 # <CJK> +0x8541 # <CJK> +0x8543 # <CJK> +0x8548 # <CJK> +0x8549 # <CJK> +0x854A # <CJK> +0x854B # <CJK> +0x854E # <CJK> +0x8555 # <CJK> +0x8557 # <CJK> +0x8558 # <CJK> +0x855A # <CJK> +0x8563 # <CJK> +0x8568 # <CJK> +0x8569 # <CJK> +0x856A # <CJK> +0x856D # <CJK> +0x8577 # <CJK> +0x857E # <CJK> +0x8580 # <CJK> +0x8584 # <CJK> +0x8587 # <CJK> +0x8588 # <CJK> +0x858A # <CJK> +0x8590 # <CJK> +0x8591 # <CJK> +0x8594 # <CJK> +0x8597 # <CJK> +0x8599 # <CJK> +0x859B # <CJK> +0x859C # <CJK> +0x85A4 # <CJK> +0x85A6 # <CJK> +0x85A8 # <CJK> +0x85A9 # <CJK> +0x85AA # <CJK> +0x85AB # <CJK> +0x85AC # <CJK> +0x85AE # <CJK> +0x85AF # <CJK> +0x85B9 # <CJK> +0x85BA # <CJK> +0x85C1 # <CJK> +0x85C9 # <CJK> +0x85CD # <CJK> +0x85CF # <CJK> +0x85D0 # <CJK> +0x85D5 # <CJK> +0x85DC # <CJK> +0x85DD # <CJK> +0x85E4 # <CJK> +0x85E5 # <CJK> +0x85E9 # <CJK> +0x85EA # <CJK> +0x85F7 # <CJK> +0x85F9 # <CJK> +0x85FA # <CJK> +0x85FB # <CJK> +0x85FE # <CJK> +0x8602 # <CJK> +0x8606 # <CJK> +0x8607 # <CJK> +0x860A # <CJK> +0x860B # <CJK> +0x8613 # <CJK> +0x8616 # <CJK> +0x8617 # <CJK> +0x861A # <CJK> +0x8622 # <CJK> +0x862D # <CJK> +0x862F # <CJK> +0x8630 # <CJK> +0x863F # <CJK> +0x864D # <CJK> +0x864E # <CJK> +0x8650 # <CJK> +0x8654 # <CJK> +0x8655 # <CJK> +0x865A # <CJK> +0x865C # <CJK> +0x865E # <CJK> +0x865F # <CJK> +0x8667 # <CJK> +0x866B # <CJK> +0x8671 # <CJK> +0x8679 # <CJK> +0x867B # <CJK> +0x868A # <CJK> +0x868B # <CJK> +0x868C # <CJK> +0x8693 # <CJK> +0x8695 # <CJK> +0x86A3 # <CJK> +0x86A4 # <CJK> +0x86A9 # <CJK> +0x86AA # <CJK> +0x86AB # <CJK> +0x86AF # <CJK> +0x86B0 # <CJK> +0x86B6 # <CJK> +0x86C4 # <CJK> +0x86C6 # <CJK> +0x86C7 # <CJK> +0x86C9 # <CJK> +0x86CB # <CJK> +0x86CD # <CJK> +0x86CE # <CJK> +0x86D4 # <CJK> +0x86D9 # <CJK> +0x86DB # <CJK> +0x86DE # <CJK> +0x86DF # <CJK> +0x86E4 # <CJK> +0x86E9 # <CJK> +0x86EC # <CJK> +0x86ED # <CJK> +0x86EE # <CJK> +0x86EF # <CJK> +0x86F8 # <CJK> +0x86F9 # <CJK> +0x86FB # <CJK> +0x86FE # <CJK> +0x8700 # <CJK> +0x8702 # <CJK> +0x8703 # <CJK> +0x8706 # <CJK> +0x8708 # <CJK> +0x8709 # <CJK> +0x870A # <CJK> +0x870D # <CJK> +0x8711 # <CJK> +0x8712 # <CJK> +0x8718 # <CJK> +0x871A # <CJK> +0x871C # <CJK> +0x8725 # <CJK> +0x8729 # <CJK> +0x8734 # <CJK> +0x8737 # <CJK> +0x873B # <CJK> +0x873F # <CJK> +0x8749 # <CJK> +0x874B # <CJK> +0x874C # <CJK> +0x874E # <CJK> +0x8753 # <CJK> +0x8755 # <CJK> +0x8757 # <CJK> +0x8759 # <CJK> +0x875F # <CJK> +0x8760 # <CJK> +0x8763 # <CJK> +0x8766 # <CJK> +0x8768 # <CJK> +0x876A # <CJK> +0x876E # <CJK> +0x8774 # <CJK> +0x8776 # <CJK> +0x8778 # <CJK> +0x877F # <CJK> +0x8782 # <CJK> +0x878D # <CJK> +0x879F # <CJK> +0x87A2 # <CJK> +0x87AB # <CJK> +0x87AF # <CJK> +0x87B3 # <CJK> +0x87BA # <CJK> +0x87BB # <CJK> +0x87BD # <CJK> +0x87C0 # <CJK> +0x87C4 # <CJK> +0x87C6 # <CJK> +0x87C7 # <CJK> +0x87CB # <CJK> +0x87D0 # <CJK> +0x87D2 # <CJK> +0x87E0 # <CJK> +0x87EF # <CJK> +0x87F2 # <CJK> +0x87F6 # <CJK> +0x87F7 # <CJK> +0x87F9 # <CJK> +0x87FB # <CJK> +0x87FE # <CJK> +0x8805 # <CJK> +0x880D # <CJK> +0x880E # <CJK> +0x880F # <CJK> +0x8811 # <CJK> +0x8815 # <CJK> +0x8816 # <CJK> +0x8821 # <CJK> +0x8822 # <CJK> +0x8823 # <CJK> +0x8827 # <CJK> +0x8831 # <CJK> +0x8836 # <CJK> +0x8839 # <CJK> +0x883B # <CJK> +0x8840 # <CJK> +0x8842 # <CJK> +0x8844 # <CJK> +0x8846 # <CJK> +0x884C # <CJK> +0x884D # <CJK> +0x8852 # <CJK> +0x8853 # <CJK> +0x8857 # <CJK> +0x8859 # <CJK> +0x885B # <CJK> +0x885D # <CJK> +0x885E # <CJK> +0x8861 # <CJK> +0x8862 # <CJK> +0x8863 # <CJK> +0x8868 # <CJK> +0x886B # <CJK> +0x8870 # <CJK> +0x8872 # <CJK> +0x8875 # <CJK> +0x8877 # <CJK> +0x887D # <CJK> +0x887E # <CJK> +0x887F # <CJK> +0x8881 # <CJK> +0x8882 # <CJK> +0x8888 # <CJK> +0x888B # <CJK> +0x888D # <CJK> +0x8892 # <CJK> +0x8896 # <CJK> +0x8897 # <CJK> +0x8899 # <CJK> +0x889E # <CJK> +0x88A2 # <CJK> +0x88A4 # <CJK> +0x88AB # <CJK> +0x88AE # <CJK> +0x88B0 # <CJK> +0x88B1 # <CJK> +0x88B4 # <CJK> +0x88B5 # <CJK> +0x88B7 # <CJK> +0x88BF # <CJK> +0x88C1 # <CJK> +0x88C2 # <CJK> +0x88C3 # <CJK> +0x88C4 # <CJK> +0x88C5 # <CJK> +0x88CF # <CJK> +0x88D4 # <CJK> +0x88D5 # <CJK> +0x88D8 # <CJK> +0x88D9 # <CJK> +0x88DC # <CJK> +0x88DD # <CJK> +0x88DF # <CJK> +0x88E1 # <CJK> +0x88E8 # <CJK> +0x88F2 # <CJK> +0x88F3 # <CJK> +0x88F4 # <CJK> +0x88F8 # <CJK> +0x88F9 # <CJK> +0x88FC # <CJK> +0x88FD # <CJK> +0x88FE # <CJK> +0x8902 # <CJK> +0x8904 # <CJK> +0x8907 # <CJK> +0x890A # <CJK> +0x890C # <CJK> +0x8910 # <CJK> +0x8912 # <CJK> +0x8913 # <CJK> +0x891D # <CJK> +0x891E # <CJK> +0x8925 # <CJK> +0x892A # <CJK> +0x892B # <CJK> +0x8936 # <CJK> +0x8938 # <CJK> +0x893B # <CJK> +0x8941 # <CJK> +0x8943 # <CJK> +0x8944 # <CJK> +0x894C # <CJK> +0x894D # <CJK> +0x8956 # <CJK> +0x895E # <CJK> +0x895F # <CJK> +0x8960 # <CJK> +0x8964 # <CJK> +0x8966 # <CJK> +0x896A # <CJK> +0x896D # <CJK> +0x896F # <CJK> +0x8972 # <CJK> +0x8974 # <CJK> +0x8977 # <CJK> +0x897E # <CJK> +0x897F # <CJK> +0x8981 # <CJK> +0x8983 # <CJK> +0x8986 # <CJK> +0x8987 # <CJK> +0x8988 # <CJK> +0x898A # <CJK> +0x898B # <CJK> +0x898F # <CJK> +0x8993 # <CJK> +0x8996 # <CJK> +0x8997 # <CJK> +0x8998 # <CJK> +0x899A # <CJK> +0x89A1 # <CJK> +0x89A6 # <CJK> +0x89A7 # <CJK> +0x89A9 # <CJK> +0x89AA # <CJK> +0x89AC # <CJK> +0x89AF # <CJK> +0x89B2 # <CJK> +0x89B3 # <CJK> +0x89BA # <CJK> +0x89BD # <CJK> +0x89BF # <CJK> +0x89C0 # <CJK> +0x89D2 # <CJK> +0x89DA # <CJK> +0x89DC # <CJK> +0x89DD # <CJK> +0x89E3 # <CJK> +0x89E6 # <CJK> +0x89E7 # <CJK> +0x89F4 # <CJK> +0x89F8 # <CJK> +0x8A00 # <CJK> +0x8A02 # <CJK> +0x8A03 # <CJK> +0x8A08 # <CJK> +0x8A0A # <CJK> +0x8A0C # <CJK> +0x8A0E # <CJK> +0x8A10 # <CJK> +0x8A13 # <CJK> +0x8A16 # <CJK> +0x8A17 # <CJK> +0x8A18 # <CJK> +0x8A1B # <CJK> +0x8A1D # <CJK> +0x8A1F # <CJK> +0x8A23 # <CJK> +0x8A25 # <CJK> +0x8A2A # <CJK> +0x8A2D # <CJK> +0x8A31 # <CJK> +0x8A33 # <CJK> +0x8A34 # <CJK> +0x8A36 # <CJK> +0x8A3A # <CJK> +0x8A3B # <CJK> +0x8A3C # <CJK> +0x8A41 # <CJK> +0x8A46 # <CJK> +0x8A48 # <CJK> +0x8A50 # <CJK> +0x8A51 # <CJK> +0x8A52 # <CJK> +0x8A54 # <CJK> +0x8A55 # <CJK> +0x8A5B # <CJK> +0x8A5E # <CJK> +0x8A60 # <CJK> +0x8A62 # <CJK> +0x8A63 # <CJK> +0x8A66 # <CJK> +0x8A69 # <CJK> +0x8A6B # <CJK> +0x8A6C # <CJK> +0x8A6D # <CJK> +0x8A6E # <CJK> +0x8A70 # <CJK> +0x8A71 # <CJK> +0x8A72 # <CJK> +0x8A73 # <CJK> +0x8A7C # <CJK> +0x8A82 # <CJK> +0x8A84 # <CJK> +0x8A85 # <CJK> +0x8A87 # <CJK> +0x8A89 # <CJK> +0x8A8C # <CJK> +0x8A8D # <CJK> +0x8A91 # <CJK> +0x8A93 # <CJK> +0x8A95 # <CJK> +0x8A98 # <CJK> +0x8A9A # <CJK> +0x8A9E # <CJK> +0x8AA0 # <CJK> +0x8AA1 # <CJK> +0x8AA3 # <CJK> +0x8AA4 # <CJK> +0x8AA5 # <CJK> +0x8AA6 # <CJK> +0x8AA8 # <CJK> +0x8AAC # <CJK> +0x8AAD # <CJK> +0x8AB0 # <CJK> +0x8AB2 # <CJK> +0x8AB9 # <CJK> +0x8ABC # <CJK> +0x8ABF # <CJK> +0x8AC2 # <CJK> +0x8AC4 # <CJK> +0x8AC7 # <CJK> +0x8ACB # <CJK> +0x8ACC # <CJK> +0x8ACD # <CJK> +0x8ACF # <CJK> +0x8AD2 # <CJK> +0x8AD6 # <CJK> +0x8ADA # <CJK> +0x8ADB # <CJK> +0x8ADC # <CJK> +0x8ADE # <CJK> +0x8AE0 # <CJK> +0x8AE1 # <CJK> +0x8AE2 # <CJK> +0x8AE4 # <CJK> +0x8AE6 # <CJK> +0x8AE7 # <CJK> +0x8AEB # <CJK> +0x8AED # <CJK> +0x8AEE # <CJK> +0x8AF1 # <CJK> +0x8AF3 # <CJK> +0x8AF7 # <CJK> +0x8AF8 # <CJK> +0x8AFA # <CJK> +0x8AFE # <CJK> +0x8B00 # <CJK> +0x8B01 # <CJK> +0x8B02 # <CJK> +0x8B04 # <CJK> +0x8B07 # <CJK> +0x8B0C # <CJK> +0x8B0E # <CJK> +0x8B10 # <CJK> +0x8B14 # <CJK> +0x8B16 # <CJK> +0x8B17 # <CJK> +0x8B19 # <CJK> +0x8B1A # <CJK> +0x8B1B # <CJK> +0x8B1D # <CJK> +0x8B20 # <CJK> +0x8B21 # <CJK> +0x8B26 # <CJK> +0x8B28 # <CJK> +0x8B2B # <CJK> +0x8B2C # <CJK> +0x8B33 # <CJK> +0x8B39 # <CJK> +0x8B3E # <CJK> +0x8B41 # <CJK> +0x8B49 # <CJK> +0x8B4C # <CJK> +0x8B4E # <CJK> +0x8B4F # <CJK> +0x8B56 # <CJK> +0x8B58 # <CJK> +0x8B5A # <CJK> +0x8B5B # <CJK> +0x8B5C # <CJK> +0x8B5F # <CJK> +0x8B66 # <CJK> +0x8B6B # <CJK> +0x8B6C # <CJK> +0x8B6F # <CJK> +0x8B70 # <CJK> +0x8B71 # <CJK> +0x8B72 # <CJK> +0x8B74 # <CJK> +0x8B77 # <CJK> +0x8B7D # <CJK> +0x8B80 # <CJK> +0x8B83 # <CJK> +0x8B8A # <CJK> +0x8B8C # <CJK> +0x8B8E # <CJK> +0x8B90 # <CJK> +0x8B92 # <CJK> +0x8B93 # <CJK> +0x8B96 # <CJK> +0x8B99 # <CJK> +0x8B9A # <CJK> +0x8C37 # <CJK> +0x8C3A # <CJK> +0x8C3F # <CJK> +0x8C41 # <CJK> +0x8C46 # <CJK> +0x8C48 # <CJK> +0x8C4A # <CJK> +0x8C4C # <CJK> +0x8C4E # <CJK> +0x8C50 # <CJK> +0x8C55 # <CJK> +0x8C5A # <CJK> +0x8C61 # <CJK> +0x8C62 # <CJK> +0x8C6A # <CJK> +0x8C6B # <CJK> +0x8C6C # <CJK> +0x8C78 # <CJK> +0x8C79 # <CJK> +0x8C7A # <CJK> +0x8C7C # <CJK> +0x8C82 # <CJK> +0x8C85 # <CJK> +0x8C89 # <CJK> +0x8C8A # <CJK> +0x8C8C # <CJK> +0x8C8D # <CJK> +0x8C8E # <CJK> +0x8C94 # <CJK> +0x8C98 # <CJK> +0x8C9D # <CJK> +0x8C9E # <CJK> +0x8CA0 # <CJK> +0x8CA1 # <CJK> +0x8CA2 # <CJK> +0x8CA7 # <CJK> +0x8CA8 # <CJK> +0x8CA9 # <CJK> +0x8CAA # <CJK> +0x8CAB # <CJK> +0x8CAC # <CJK> +0x8CAD # <CJK> +0x8CAE # <CJK> +0x8CAF # <CJK> +0x8CB0 # <CJK> +0x8CB2 # <CJK> +0x8CB3 # <CJK> +0x8CB4 # <CJK> +0x8CB6 # <CJK> +0x8CB7 # <CJK> +0x8CB8 # <CJK> +0x8CBB # <CJK> +0x8CBC # <CJK> +0x8CBD # <CJK> +0x8CBF # <CJK> +0x8CC0 # <CJK> +0x8CC1 # <CJK> +0x8CC2 # <CJK> +0x8CC3 # <CJK> +0x8CC4 # <CJK> +0x8CC7 # <CJK> +0x8CC8 # <CJK> +0x8CCA # <CJK> +0x8CCD # <CJK> +0x8CCE # <CJK> +0x8CD1 # <CJK> +0x8CD3 # <CJK> +0x8CDA # <CJK> +0x8CDB # <CJK> +0x8CDC # <CJK> +0x8CDE # <CJK> +0x8CE0 # <CJK> +0x8CE2 # <CJK> +0x8CE3 # <CJK> +0x8CE4 # <CJK> +0x8CE6 # <CJK> +0x8CEA # <CJK> +0x8CED # <CJK> +0x8CFA # <CJK> +0x8CFB # <CJK> +0x8CFC # <CJK> +0x8CFD # <CJK> +0x8D04 # <CJK> +0x8D05 # <CJK> +0x8D07 # <CJK> +0x8D08 # <CJK> +0x8D0A # <CJK> +0x8D0B # <CJK> +0x8D0D # <CJK> +0x8D0F # <CJK> +0x8D10 # <CJK> +0x8D13 # <CJK> +0x8D14 # <CJK> +0x8D16 # <CJK> +0x8D64 # <CJK> +0x8D66 # <CJK> +0x8D67 # <CJK> +0x8D6B # <CJK> +0x8D6D # <CJK> +0x8D70 # <CJK> +0x8D71 # <CJK> +0x8D73 # <CJK> +0x8D74 # <CJK> +0x8D77 # <CJK> +0x8D81 # <CJK> +0x8D85 # <CJK> +0x8D8A # <CJK> +0x8D99 # <CJK> +0x8DA3 # <CJK> +0x8DA8 # <CJK> +0x8DB3 # <CJK> +0x8DBA # <CJK> +0x8DBE # <CJK> +0x8DC2 # <CJK> +0x8DCB # <CJK> +0x8DCC # <CJK> +0x8DCF # <CJK> +0x8DD6 # <CJK> +0x8DDA # <CJK> +0x8DDB # <CJK> +0x8DDD # <CJK> +0x8DDF # <CJK> +0x8DE1 # <CJK> +0x8DE3 # <CJK> +0x8DE8 # <CJK> +0x8DEA # <CJK> +0x8DEB # <CJK> +0x8DEF # <CJK> +0x8DF3 # <CJK> +0x8DF5 # <CJK> +0x8DFC # <CJK> +0x8DFF # <CJK> +0x8E08 # <CJK> +0x8E09 # <CJK> +0x8E0A # <CJK> +0x8E0F # <CJK> +0x8E10 # <CJK> +0x8E1D # <CJK> +0x8E1E # <CJK> +0x8E1F # <CJK> +0x8E2A # <CJK> +0x8E30 # <CJK> +0x8E34 # <CJK> +0x8E35 # <CJK> +0x8E42 # <CJK> +0x8E44 # <CJK> +0x8E47 # <CJK> +0x8E48 # <CJK> +0x8E49 # <CJK> +0x8E4A # <CJK> +0x8E4C # <CJK> +0x8E50 # <CJK> +0x8E55 # <CJK> +0x8E59 # <CJK> +0x8E5F # <CJK> +0x8E60 # <CJK> +0x8E63 # <CJK> +0x8E64 # <CJK> +0x8E72 # <CJK> +0x8E74 # <CJK> +0x8E76 # <CJK> +0x8E7C # <CJK> +0x8E81 # <CJK> +0x8E84 # <CJK> +0x8E85 # <CJK> +0x8E87 # <CJK> +0x8E8A # <CJK> +0x8E8B # <CJK> +0x8E8D # <CJK> +0x8E91 # <CJK> +0x8E93 # <CJK> +0x8E94 # <CJK> +0x8E99 # <CJK> +0x8EA1 # <CJK> +0x8EAA # <CJK> +0x8EAB # <CJK> +0x8EAC # <CJK> +0x8EAF # <CJK> +0x8EB0 # <CJK> +0x8EB1 # <CJK> +0x8EBE # <CJK> +0x8EC5 # <CJK> +0x8EC6 # <CJK> +0x8EC8 # <CJK> +0x8ECA # <CJK> +0x8ECB # <CJK> +0x8ECC # <CJK> +0x8ECD # <CJK> +0x8ED2 # <CJK> +0x8EDB # <CJK> +0x8EDF # <CJK> +0x8EE2 # <CJK> +0x8EE3 # <CJK> +0x8EEB # <CJK> +0x8EF8 # <CJK> +0x8EFB # <CJK> +0x8EFC # <CJK> +0x8EFD # <CJK> +0x8EFE # <CJK> +0x8F03 # <CJK> +0x8F05 # <CJK> +0x8F09 # <CJK> +0x8F0A # <CJK> +0x8F0C # <CJK> +0x8F12 # <CJK> +0x8F13 # <CJK> +0x8F14 # <CJK> +0x8F15 # <CJK> +0x8F19 # <CJK> +0x8F1B # <CJK> +0x8F1C # <CJK> +0x8F1D # <CJK> +0x8F1F # <CJK> +0x8F26 # <CJK> +0x8F29 # <CJK> +0x8F2A # <CJK> +0x8F2F # <CJK> +0x8F33 # <CJK> +0x8F38 # <CJK> +0x8F39 # <CJK> +0x8F3B # <CJK> +0x8F3E # <CJK> +0x8F3F # <CJK> +0x8F42 # <CJK> +0x8F44 # <CJK> +0x8F45 # <CJK> +0x8F46 # <CJK> +0x8F49 # <CJK> +0x8F4C # <CJK> +0x8F4D # <CJK> +0x8F4E # <CJK> +0x8F57 # <CJK> +0x8F5C # <CJK> +0x8F5F # <CJK> +0x8F61 # <CJK> +0x8F62 # <CJK> +0x8F63 # <CJK> +0x8F64 # <CJK> +0x8F9B # <CJK> +0x8F9C # <CJK> +0x8F9E # <CJK> +0x8F9F # <CJK> +0x8FA3 # <CJK> +0x8FA7 # <CJK> +0x8FA8 # <CJK> +0x8FAD # <CJK> +0x8FAE # <CJK> +0x8FAF # <CJK> +0x8FB0 # <CJK> +0x8FB1 # <CJK> +0x8FB2 # <CJK> +0x8FB7 # <CJK> +0x8FBA # <CJK> +0x8FBB # <CJK> +0x8FBC # <CJK> +0x8FBF # <CJK> +0x8FC2 # <CJK> +0x8FC4 # <CJK> +0x8FC5 # <CJK> +0x8FCE # <CJK> +0x8FD1 # <CJK> +0x8FD4 # <CJK> +0x8FDA # <CJK> +0x8FE2 # <CJK> +0x8FE5 # <CJK> +0x8FE6 # <CJK> +0x8FE9 # <CJK> +0x8FEA # <CJK> +0x8FEB # <CJK> +0x8FED # <CJK> +0x8FEF # <CJK> +0x8FF0 # <CJK> +0x8FF4 # <CJK> +0x8FF7 # <CJK> +0x8FF8 # <CJK> +0x8FF9 # <CJK> +0x8FFA # <CJK> +0x8FFD # <CJK> +0x9000 # <CJK> +0x9001 # <CJK> +0x9003 # <CJK> +0x9005 # <CJK> +0x9006 # <CJK> +0x900B # <CJK> +0x900D # <CJK> +0x900E # <CJK> +0x900F # <CJK> +0x9010 # <CJK> +0x9011 # <CJK> +0x9013 # <CJK> +0x9014 # <CJK> +0x9015 # <CJK> +0x9016 # <CJK> +0x9017 # <CJK> +0x9019 # <CJK> +0x901A # <CJK> +0x901D # <CJK> +0x901E # <CJK> +0x901F # <CJK> +0x9020 # <CJK> +0x9021 # <CJK> +0x9022 # <CJK> +0x9023 # <CJK> +0x9027 # <CJK> +0x902E # <CJK> +0x9031 # <CJK> +0x9032 # <CJK> +0x9035 # <CJK> +0x9036 # <CJK> +0x9038 # <CJK> +0x9039 # <CJK> +0x903C # <CJK> +0x903E # <CJK> +0x9041 # <CJK> +0x9042 # <CJK> +0x9045 # <CJK> +0x9047 # <CJK> +0x9049 # <CJK> +0x904A # <CJK> +0x904B # <CJK> +0x904D # <CJK> +0x904E # <CJK> +0x904F # <CJK> +0x9050 # <CJK> +0x9051 # <CJK> +0x9052 # <CJK> +0x9053 # <CJK> +0x9054 # <CJK> +0x9055 # <CJK> +0x9056 # <CJK> +0x9058 # <CJK> +0x9059 # <CJK> +0x905C # <CJK> +0x905E # <CJK> +0x9060 # <CJK> +0x9061 # <CJK> +0x9063 # <CJK> +0x9065 # <CJK> +0x9068 # <CJK> +0x9069 # <CJK> +0x906D # <CJK> +0x906E # <CJK> +0x906F # <CJK> +0x9072 # <CJK> +0x9075 # <CJK> +0x9076 # <CJK> +0x9077 # <CJK> +0x9078 # <CJK> +0x907A # <CJK> +0x907C # <CJK> +0x907D # <CJK> +0x907F # <CJK> +0x9080 # <CJK> +0x9081 # <CJK> +0x9082 # <CJK> +0x9083 # <CJK> +0x9084 # <CJK> +0x9087 # <CJK> +0x9089 # <CJK> +0x908A # <CJK> +0x908F # <CJK> +0x9091 # <CJK> +0x90A3 # <CJK> +0x90A6 # <CJK> +0x90A8 # <CJK> +0x90AA # <CJK> +0x90AF # <CJK> +0x90B1 # <CJK> +0x90B5 # <CJK> +0x90B8 # <CJK> +0x90C1 # <CJK> +0x90CA # <CJK> +0x90CE # <CJK> +0x90DB # <CJK> +0x90E1 # <CJK> +0x90E2 # <CJK> +0x90E4 # <CJK> +0x90E8 # <CJK> +0x90ED # <CJK> +0x90F5 # <CJK> +0x90F7 # <CJK> +0x90FD # <CJK> +0x9102 # <CJK> +0x9112 # <CJK> +0x9119 # <CJK> +0x912D # <CJK> +0x9130 # <CJK> +0x9132 # <CJK> +0x9149 # <CJK> +0x914A # <CJK> +0x914B # <CJK> +0x914C # <CJK> +0x914D # <CJK> +0x914E # <CJK> +0x9152 # <CJK> +0x9154 # <CJK> +0x9156 # <CJK> +0x9158 # <CJK> +0x9162 # <CJK> +0x9163 # <CJK> +0x9165 # <CJK> +0x9169 # <CJK> +0x916A # <CJK> +0x916C # <CJK> +0x9172 # <CJK> +0x9173 # <CJK> +0x9175 # <CJK> +0x9177 # <CJK> +0x9178 # <CJK> +0x9182 # <CJK> +0x9187 # <CJK> +0x9189 # <CJK> +0x918B # <CJK> +0x918D # <CJK> +0x9190 # <CJK> +0x9192 # <CJK> +0x9197 # <CJK> +0x919C # <CJK> +0x91A2 # <CJK> +0x91A4 # <CJK> +0x91AA # <CJK> +0x91AB # <CJK> +0x91AF # <CJK> +0x91B4 # <CJK> +0x91B5 # <CJK> +0x91B8 # <CJK> +0x91BA # <CJK> +0x91C0 # <CJK> +0x91C1 # <CJK> +0x91C6 # <CJK> +0x91C7 # <CJK> +0x91C8 # <CJK> +0x91C9 # <CJK> +0x91CB # <CJK> +0x91CC # <CJK> +0x91CD # <CJK> +0x91CE # <CJK> +0x91CF # <CJK> +0x91D0 # <CJK> +0x91D1 # <CJK> +0x91D6 # <CJK> +0x91D8 # <CJK> +0x91DB # <CJK> +0x91DC # <CJK> +0x91DD # <CJK> +0x91DF # <CJK> +0x91E1 # <CJK> +0x91E3 # <CJK> +0x91E6 # <CJK> +0x91E7 # <CJK> +0x91F5 # <CJK> +0x91F6 # <CJK> +0x91FC # <CJK> +0x91FF # <CJK> +0x920D # <CJK> +0x920E # <CJK> +0x9211 # <CJK> +0x9214 # <CJK> +0x9215 # <CJK> +0x921E # <CJK> +0x9229 # <CJK> +0x922C # <CJK> +0x9234 # <CJK> +0x9237 # <CJK> +0x923F # <CJK> +0x9244 # <CJK> +0x9245 # <CJK> +0x9248 # <CJK> +0x9249 # <CJK> +0x924B # <CJK> +0x9250 # <CJK> +0x9257 # <CJK> +0x925A # <CJK> +0x925B # <CJK> +0x925E # <CJK> +0x9262 # <CJK> +0x9264 # <CJK> +0x9266 # <CJK> +0x9271 # <CJK> +0x927E # <CJK> +0x9280 # <CJK> +0x9283 # <CJK> +0x9285 # <CJK> +0x9291 # <CJK> +0x9293 # <CJK> +0x9295 # <CJK> +0x9296 # <CJK> +0x9298 # <CJK> +0x929A # <CJK> +0x929B # <CJK> +0x929C # <CJK> +0x92AD # <CJK> +0x92B7 # <CJK> +0x92B9 # <CJK> +0x92CF # <CJK> +0x92D2 # <CJK> +0x92E4 # <CJK> +0x92E9 # <CJK> +0x92EA # <CJK> +0x92ED # <CJK> +0x92F2 # <CJK> +0x92F3 # <CJK> +0x92F8 # <CJK> +0x92FA # <CJK> +0x92FC # <CJK> +0x9306 # <CJK> +0x930F # <CJK> +0x9310 # <CJK> +0x9318 # <CJK> +0x9319 # <CJK> +0x931A # <CJK> +0x9320 # <CJK> +0x9322 # <CJK> +0x9323 # <CJK> +0x9326 # <CJK> +0x9328 # <CJK> +0x932B # <CJK> +0x932C # <CJK> +0x932E # <CJK> +0x932F # <CJK> +0x9332 # <CJK> +0x9335 # <CJK> +0x933A # <CJK> +0x933B # <CJK> +0x9344 # <CJK> +0x934B # <CJK> +0x934D # <CJK> +0x9354 # <CJK> +0x9356 # <CJK> +0x935B # <CJK> +0x935C # <CJK> +0x9360 # <CJK> +0x936C # <CJK> +0x936E # <CJK> +0x9375 # <CJK> +0x937C # <CJK> +0x937E # <CJK> +0x938C # <CJK> +0x9394 # <CJK> +0x9396 # <CJK> +0x9397 # <CJK> +0x939A # <CJK> +0x93A7 # <CJK> +0x93AC # <CJK> +0x93AD # <CJK> +0x93AE # <CJK> +0x93B0 # <CJK> +0x93B9 # <CJK> +0x93C3 # <CJK> +0x93C8 # <CJK> +0x93D0 # <CJK> +0x93D1 # <CJK> +0x93D6 # <CJK> +0x93D7 # <CJK> +0x93D8 # <CJK> +0x93DD # <CJK> +0x93E1 # <CJK> +0x93E4 # <CJK> +0x93E5 # <CJK> +0x93E8 # <CJK> +0x9403 # <CJK> +0x9407 # <CJK> +0x9410 # <CJK> +0x9413 # <CJK> +0x9414 # <CJK> +0x9418 # <CJK> +0x9419 # <CJK> +0x941A # <CJK> +0x9421 # <CJK> +0x942B # <CJK> +0x9435 # <CJK> +0x9436 # <CJK> +0x9438 # <CJK> +0x943A # <CJK> +0x9441 # <CJK> +0x9444 # <CJK> +0x9451 # <CJK> +0x9452 # <CJK> +0x9453 # <CJK> +0x945A # <CJK> +0x945B # <CJK> +0x945E # <CJK> +0x9460 # <CJK> +0x9462 # <CJK> +0x946A # <CJK> +0x9470 # <CJK> +0x9475 # <CJK> +0x9477 # <CJK> +0x947C # <CJK> +0x947D # <CJK> +0x947E # <CJK> +0x947F # <CJK> +0x9481 # <CJK> +0x9577 # <CJK> +0x9580 # <CJK> +0x9582 # <CJK> +0x9583 # <CJK> +0x9587 # <CJK> +0x9589 # <CJK> +0x958A # <CJK> +0x958B # <CJK> +0x958F # <CJK> +0x9591 # <CJK> +0x9593 # <CJK> +0x9594 # <CJK> +0x9596 # <CJK> +0x9598 # <CJK> +0x9599 # <CJK> +0x95A0 # <CJK> +0x95A2 # <CJK> +0x95A3 # <CJK> +0x95A4 # <CJK> +0x95A5 # <CJK> +0x95A7 # <CJK> +0x95A8 # <CJK> +0x95AD # <CJK> +0x95B2 # <CJK> +0x95B9 # <CJK> +0x95BB # <CJK> +0x95BC # <CJK> +0x95BE # <CJK> +0x95C3 # <CJK> +0x95C7 # <CJK> +0x95CA # <CJK> +0x95CC # <CJK> +0x95CD # <CJK> +0x95D4 # <CJK> +0x95D5 # <CJK> +0x95D6 # <CJK> +0x95D8 # <CJK> +0x95DC # <CJK> +0x95E1 # <CJK> +0x95E2 # <CJK> +0x95E5 # <CJK> +0x961C # <CJK> +0x9621 # <CJK> +0x9628 # <CJK> +0x962A # <CJK> +0x962E # <CJK> +0x962F # <CJK> +0x9632 # <CJK> +0x963B # <CJK> +0x963F # <CJK> +0x9640 # <CJK> +0x9642 # <CJK> +0x9644 # <CJK> +0x964B # <CJK> +0x964C # <CJK> +0x964D # <CJK> +0x964F # <CJK> +0x9650 # <CJK> +0x965B # <CJK> +0x965C # <CJK> +0x965D # <CJK> +0x965E # <CJK> +0x965F # <CJK> +0x9662 # <CJK> +0x9663 # <CJK> +0x9664 # <CJK> +0x9665 # <CJK> +0x9666 # <CJK> +0x966A # <CJK> +0x966C # <CJK> +0x9670 # <CJK> +0x9672 # <CJK> +0x9673 # <CJK> +0x9675 # <CJK> +0x9676 # <CJK> +0x9677 # <CJK> +0x9678 # <CJK> +0x967A # <CJK> +0x967D # <CJK> +0x9685 # <CJK> +0x9686 # <CJK> +0x9688 # <CJK> +0x968A # <CJK> +0x968B # <CJK> +0x968D # <CJK> +0x968E # <CJK> +0x968F # <CJK> +0x9694 # <CJK> +0x9695 # <CJK> +0x9697 # <CJK> +0x9698 # <CJK> +0x9699 # <CJK> +0x969B # <CJK> +0x969C # <CJK> +0x96A0 # <CJK> +0x96A3 # <CJK> +0x96A7 # <CJK> +0x96A8 # <CJK> +0x96AA # <CJK> +0x96B0 # <CJK> +0x96B1 # <CJK> +0x96B2 # <CJK> +0x96B4 # <CJK> +0x96B6 # <CJK> +0x96B7 # <CJK> +0x96B8 # <CJK> +0x96B9 # <CJK> +0x96BB # <CJK> +0x96BC # <CJK> +0x96C0 # <CJK> +0x96C1 # <CJK> +0x96C4 # <CJK> +0x96C5 # <CJK> +0x96C6 # <CJK> +0x96C7 # <CJK> +0x96C9 # <CJK> +0x96CB # <CJK> +0x96CC # <CJK> +0x96CD # <CJK> +0x96CE # <CJK> +0x96D1 # <CJK> +0x96D5 # <CJK> +0x96D6 # <CJK> +0x96D9 # <CJK> +0x96DB # <CJK> +0x96DC # <CJK> +0x96E2 # <CJK> +0x96E3 # <CJK> +0x96E8 # <CJK> +0x96EA # <CJK> +0x96EB # <CJK> +0x96F0 # <CJK> +0x96F2 # <CJK> +0x96F6 # <CJK> +0x96F7 # <CJK> +0x96F9 # <CJK> +0x96FB # <CJK> +0x9700 # <CJK> +0x9704 # <CJK> +0x9706 # <CJK> +0x9707 # <CJK> +0x9708 # <CJK> +0x970A # <CJK> +0x970D # <CJK> +0x970E # <CJK> +0x970F # <CJK> +0x9711 # <CJK> +0x9713 # <CJK> +0x9716 # <CJK> +0x9719 # <CJK> +0x971C # <CJK> +0x971E # <CJK> +0x9724 # <CJK> +0x9727 # <CJK> +0x972A # <CJK> +0x9730 # <CJK> +0x9732 # <CJK> +0x9738 # <CJK> +0x9739 # <CJK> +0x973D # <CJK> +0x973E # <CJK> +0x9742 # <CJK> +0x9744 # <CJK> +0x9746 # <CJK> +0x9748 # <CJK> +0x9749 # <CJK> +0x9752 # <CJK> +0x9756 # <CJK> +0x9759 # <CJK> +0x975C # <CJK> +0x975E # <CJK> +0x9760 # <CJK> +0x9761 # <CJK> +0x9762 # <CJK> +0x9764 # <CJK> +0x9766 # <CJK> +0x9768 # <CJK> +0x9769 # <CJK> +0x976B # <CJK> +0x976D # <CJK> +0x9771 # <CJK> +0x9774 # <CJK> +0x9779 # <CJK> +0x977A # <CJK> +0x977C # <CJK> +0x9781 # <CJK> +0x9784 # <CJK> +0x9785 # <CJK> +0x9786 # <CJK> +0x978B # <CJK> +0x978D # <CJK> +0x978F # <CJK> +0x9790 # <CJK> +0x9798 # <CJK> +0x979C # <CJK> +0x97A0 # <CJK> +0x97A3 # <CJK> +0x97A6 # <CJK> +0x97A8 # <CJK> +0x97AB # <CJK> +0x97AD # <CJK> +0x97B3 # <CJK> +0x97B4 # <CJK> +0x97C3 # <CJK> +0x97C6 # <CJK> +0x97C8 # <CJK> +0x97CB # <CJK> +0x97D3 # <CJK> +0x97DC # <CJK> +0x97ED # <CJK> +0x97EE # <CJK> +0x97F2 # <CJK> +0x97F3 # <CJK> +0x97F5 # <CJK> +0x97F6 # <CJK> +0x97FB # <CJK> +0x97FF # <CJK> +0x9801 # <CJK> +0x9802 # <CJK> +0x9803 # <CJK> +0x9805 # <CJK> +0x9806 # <CJK> +0x9808 # <CJK> +0x980C # <CJK> +0x980F # <CJK> +0x9810 # <CJK> +0x9811 # <CJK> +0x9812 # <CJK> +0x9813 # <CJK> +0x9817 # <CJK> +0x9818 # <CJK> +0x981A # <CJK> +0x9821 # <CJK> +0x9824 # <CJK> +0x982C # <CJK> +0x982D # <CJK> +0x9834 # <CJK> +0x9837 # <CJK> +0x9838 # <CJK> +0x983B # <CJK> +0x983C # <CJK> +0x983D # <CJK> +0x9846 # <CJK> +0x984B # <CJK> +0x984C # <CJK> +0x984D # <CJK> +0x984E # <CJK> +0x984F # <CJK> +0x9854 # <CJK> +0x9855 # <CJK> +0x9858 # <CJK> +0x985B # <CJK> +0x985E # <CJK> +0x9867 # <CJK> +0x986B # <CJK> +0x986F # <CJK> +0x9870 # <CJK> +0x9871 # <CJK> +0x9873 # <CJK> +0x9874 # <CJK> +0x98A8 # <CJK> +0x98AA # <CJK> +0x98AF # <CJK> +0x98B1 # <CJK> +0x98B6 # <CJK> +0x98C3 # <CJK> +0x98C4 # <CJK> +0x98C6 # <CJK> +0x98DB # <CJK> +0x98DC # <CJK> +0x98DF # <CJK> +0x98E2 # <CJK> +0x98E9 # <CJK> +0x98EB # <CJK> +0x98ED # <CJK> +0x98EE # <CJK> +0x98EF # <CJK> +0x98F2 # <CJK> +0x98F4 # <CJK> +0x98FC # <CJK> +0x98FD # <CJK> +0x98FE # <CJK> +0x9903 # <CJK> +0x9905 # <CJK> +0x9909 # <CJK> +0x990A # <CJK> +0x990C # <CJK> +0x9910 # <CJK> +0x9912 # <CJK> +0x9913 # <CJK> +0x9914 # <CJK> +0x9918 # <CJK> +0x991D # <CJK> +0x991E # <CJK> +0x9920 # <CJK> +0x9921 # <CJK> +0x9924 # <CJK> +0x9928 # <CJK> +0x992C # <CJK> +0x992E # <CJK> +0x993D # <CJK> +0x993E # <CJK> +0x9942 # <CJK> +0x9945 # <CJK> +0x9949 # <CJK> +0x994B # <CJK> +0x994C # <CJK> +0x9950 # <CJK> +0x9951 # <CJK> +0x9952 # <CJK> +0x9955 # <CJK> +0x9957 # <CJK> +0x9996 # <CJK> +0x9997 # <CJK> +0x9998 # <CJK> +0x9999 # <CJK> +0x99A5 # <CJK> +0x99A8 # <CJK> +0x99AC # <CJK> +0x99AD # <CJK> +0x99AE # <CJK> +0x99B3 # <CJK> +0x99B4 # <CJK> +0x99BC # <CJK> +0x99C1 # <CJK> +0x99C4 # <CJK> +0x99C5 # <CJK> +0x99C6 # <CJK> +0x99C8 # <CJK> +0x99D0 # <CJK> +0x99D1 # <CJK> +0x99D2 # <CJK> +0x99D5 # <CJK> +0x99D8 # <CJK> +0x99DB # <CJK> +0x99DD # <CJK> +0x99DF # <CJK> +0x99E2 # <CJK> +0x99ED # <CJK> +0x99EE # <CJK> +0x99F1 # <CJK> +0x99F2 # <CJK> +0x99F8 # <CJK> +0x99FB # <CJK> +0x99FF # <CJK> +0x9A01 # <CJK> +0x9A05 # <CJK> +0x9A0E # <CJK> +0x9A0F # <CJK> +0x9A12 # <CJK> +0x9A13 # <CJK> +0x9A19 # <CJK> +0x9A28 # <CJK> +0x9A2B # <CJK> +0x9A30 # <CJK> +0x9A37 # <CJK> +0x9A3E # <CJK> +0x9A40 # <CJK> +0x9A42 # <CJK> +0x9A43 # <CJK> +0x9A45 # <CJK> +0x9A4D # <CJK> +0x9A55 # <CJK> +0x9A57 # <CJK> +0x9A5A # <CJK> +0x9A5B # <CJK> +0x9A5F # <CJK> +0x9A62 # <CJK> +0x9A64 # <CJK> +0x9A65 # <CJK> +0x9A69 # <CJK> +0x9A6A # <CJK> +0x9A6B # <CJK> +0x9AA8 # <CJK> +0x9AAD # <CJK> +0x9AB0 # <CJK> +0x9AB8 # <CJK> +0x9ABC # <CJK> +0x9AC0 # <CJK> +0x9AC4 # <CJK> +0x9ACF # <CJK> +0x9AD1 # <CJK> +0x9AD3 # <CJK> +0x9AD4 # <CJK> +0x9AD8 # <CJK> +0x9ADE # <CJK> +0x9ADF # <CJK> +0x9AE2 # <CJK> +0x9AE3 # <CJK> +0x9AE6 # <CJK> +0x9AEA # <CJK> +0x9AEB # <CJK> +0x9AED # <CJK> +0x9AEE # <CJK> +0x9AEF # <CJK> +0x9AF1 # <CJK> +0x9AF4 # <CJK> +0x9AF7 # <CJK> +0x9AFB # <CJK> +0x9B06 # <CJK> +0x9B18 # <CJK> +0x9B1A # <CJK> +0x9B1F # <CJK> +0x9B22 # <CJK> +0x9B23 # <CJK> +0x9B25 # <CJK> +0x9B27 # <CJK> +0x9B28 # <CJK> +0x9B29 # <CJK> +0x9B2A # <CJK> +0x9B2E # <CJK> +0x9B2F # <CJK> +0x9B31 # <CJK> +0x9B32 # <CJK> +0x9B3B # <CJK> +0x9B3C # <CJK> +0x9B41 # <CJK> +0x9B42 # <CJK> +0x9B43 # <CJK> +0x9B44 # <CJK> +0x9B45 # <CJK> +0x9B4D # <CJK> +0x9B4E # <CJK> +0x9B4F # <CJK> +0x9B51 # <CJK> +0x9B54 # <CJK> +0x9B58 # <CJK> +0x9B5A # <CJK> +0x9B6F # <CJK> +0x9B74 # <CJK> +0x9B83 # <CJK> +0x9B8E # <CJK> +0x9B91 # <CJK> +0x9B92 # <CJK> +0x9B93 # <CJK> +0x9B96 # <CJK> +0x9B97 # <CJK> +0x9B9F # <CJK> +0x9BA0 # <CJK> +0x9BA8 # <CJK> +0x9BAA # <CJK> +0x9BAB # <CJK> +0x9BAD # <CJK> +0x9BAE # <CJK> +0x9BB4 # <CJK> +0x9BB9 # <CJK> +0x9BC0 # <CJK> +0x9BC6 # <CJK> +0x9BC9 # <CJK> +0x9BCA # <CJK> +0x9BCF # <CJK> +0x9BD1 # <CJK> +0x9BD2 # <CJK> +0x9BD4 # <CJK> +0x9BD6 # <CJK> +0x9BDB # <CJK> +0x9BE1 # <CJK> +0x9BE2 # <CJK> +0x9BE3 # <CJK> +0x9BE4 # <CJK> +0x9BE8 # <CJK> +0x9BF0 # <CJK> +0x9BF1 # <CJK> +0x9BF2 # <CJK> +0x9BF5 # <CJK> +0x9C04 # <CJK> +0x9C06 # <CJK> +0x9C08 # <CJK> +0x9C09 # <CJK> +0x9C0A # <CJK> +0x9C0C # <CJK> +0x9C0D # <CJK> +0x9C10 # <CJK> +0x9C12 # <CJK> +0x9C13 # <CJK> +0x9C14 # <CJK> +0x9C15 # <CJK> +0x9C1B # <CJK> +0x9C21 # <CJK> +0x9C24 # <CJK> +0x9C25 # <CJK> +0x9C2D # <CJK> +0x9C2E # <CJK> +0x9C2F # <CJK> +0x9C30 # <CJK> +0x9C32 # <CJK> +0x9C39 # <CJK> +0x9C3A # <CJK> +0x9C3B # <CJK> +0x9C3E # <CJK> +0x9C46 # <CJK> +0x9C47 # <CJK> +0x9C48 # <CJK> +0x9C52 # <CJK> +0x9C57 # <CJK> +0x9C5A # <CJK> +0x9C60 # <CJK> +0x9C67 # <CJK> +0x9C76 # <CJK> +0x9C78 # <CJK> +0x9CE5 # <CJK> +0x9CE7 # <CJK> +0x9CE9 # <CJK> +0x9CEB # <CJK> +0x9CEC # <CJK> +0x9CF0 # <CJK> +0x9CF3 # <CJK> +0x9CF4 # <CJK> +0x9CF6 # <CJK> +0x9D03 # <CJK> +0x9D06 # <CJK> +0x9D07 # <CJK> +0x9D08 # <CJK> +0x9D09 # <CJK> +0x9D0E # <CJK> +0x9D12 # <CJK> +0x9D15 # <CJK> +0x9D1B # <CJK> +0x9D1F # <CJK> +0x9D23 # <CJK> +0x9D26 # <CJK> +0x9D28 # <CJK> +0x9D2A # <CJK> +0x9D2B # <CJK> +0x9D2C # <CJK> +0x9D3B # <CJK> +0x9D3E # <CJK> +0x9D3F # <CJK> +0x9D41 # <CJK> +0x9D44 # <CJK> +0x9D46 # <CJK> +0x9D48 # <CJK> +0x9D50 # <CJK> +0x9D51 # <CJK> +0x9D59 # <CJK> +0x9D5C # <CJK> +0x9D5D # <CJK> +0x9D5E # <CJK> +0x9D60 # <CJK> +0x9D61 # <CJK> +0x9D64 # <CJK> +0x9D6C # <CJK> +0x9D6F # <CJK> +0x9D72 # <CJK> +0x9D7A # <CJK> +0x9D87 # <CJK> +0x9D89 # <CJK> +0x9D8F # <CJK> +0x9D9A # <CJK> +0x9DA4 # <CJK> +0x9DA9 # <CJK> +0x9DAB # <CJK> +0x9DAF # <CJK> +0x9DB2 # <CJK> +0x9DB4 # <CJK> +0x9DB8 # <CJK> +0x9DBA # <CJK> +0x9DBB # <CJK> +0x9DC1 # <CJK> +0x9DC2 # <CJK> +0x9DC4 # <CJK> +0x9DC6 # <CJK> +0x9DCF # <CJK> +0x9DD3 # <CJK> +0x9DD9 # <CJK> +0x9DE6 # <CJK> +0x9DED # <CJK> +0x9DEF # <CJK> +0x9DF2 # <CJK> +0x9DF8 # <CJK> +0x9DF9 # <CJK> +0x9DFA # <CJK> +0x9DFD # <CJK> +0x9E1A # <CJK> +0x9E1B # <CJK> +0x9E1E # <CJK> +0x9E75 # <CJK> +0x9E78 # <CJK> +0x9E79 # <CJK> +0x9E7D # <CJK> +0x9E7F # <CJK> +0x9E81 # <CJK> +0x9E88 # <CJK> +0x9E8B # <CJK> +0x9E8C # <CJK> +0x9E91 # <CJK> +0x9E92 # <CJK> +0x9E93 # <CJK> +0x9E95 # <CJK> +0x9E97 # <CJK> +0x9E9D # <CJK> +0x9E9F # <CJK> +0x9EA5 # <CJK> +0x9EA6 # <CJK> +0x9EA9 # <CJK> +0x9EAA # <CJK> +0x9EAD # <CJK> +0x9EB8 # <CJK> +0x9EB9 # <CJK> +0x9EBA # <CJK> +0x9EBB # <CJK> +0x9EBC # <CJK> +0x9EBE # <CJK> +0x9EBF # <CJK> +0x9EC4 # <CJK> +0x9ECC # <CJK> +0x9ECD # <CJK> +0x9ECE # <CJK> +0x9ECF # <CJK> +0x9ED0 # <CJK> +0x9ED2 # <CJK> +0x9ED4 # <CJK> +0x9ED8 # <CJK> +0x9ED9 # <CJK> +0x9EDB # <CJK> +0x9EDC # <CJK> +0x9EDD # <CJK> +0x9EDE # <CJK> +0x9EE0 # <CJK> +0x9EE5 # <CJK> +0x9EE8 # <CJK> +0x9EEF # <CJK> +0x9EF4 # <CJK> +0x9EF6 # <CJK> +0x9EF7 # <CJK> +0x9EF9 # <CJK> +0x9EFB # <CJK> +0x9EFC # <CJK> +0x9EFD # <CJK> +0x9F07 # <CJK> +0x9F08 # <CJK> +0x9F0E # <CJK> +0x9F13 # <CJK> +0x9F15 # <CJK> +0x9F20 # <CJK> +0x9F21 # <CJK> +0x9F2C # <CJK> +0x9F3B # <CJK> +0x9F3E # <CJK> +0x9F4A # <CJK> +0x9F4B # <CJK> +0x9F4E # <CJK> +0x9F4F # <CJK> +0x9F52 # <CJK> +0x9F54 # <CJK> +0x9F5F # <CJK> +0x9F60 # <CJK> +0x9F61 # <CJK> +0x9F62 # <CJK> +0x9F63 # <CJK> +0x9F66 # <CJK> +0x9F67 # <CJK> +0x9F6A # <CJK> +0x9F6C # <CJK> +0x9F72 # <CJK> +0x9F76 # <CJK> +0x9F77 # <CJK> +0x9F8D # <CJK> +0x9F95 # <CJK> +0x9F9C # <CJK> +0x9F9D # <CJK> +0x9FA0 # <CJK> +0xFFE5 # FULLWIDTH YEN SIGN Index: xc/lib/fontconfig/fc-lang/ka.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ka.orth:1.3 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ka.orth Mon Jul 8 03:31:51 2002 @@ -0,0 +1,33 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ka.orth,v 1.3 2002/07/08 07:31:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Georgian (KA) +0589 # Armenian full stop (vertsaket) +10a0-10c5 +10d0-10f6 +#10f7-10f8 # additional letters for Mingrelian and Svan +10fb +#2018 # single quote +#201a # single quote +#201c # double quote +#201e # double quote Index: xc/lib/fontconfig/fc-lang/kaa.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/kaa.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/kaa.orth Mon Oct 21 13:03:47 2002 @@ -0,0 +1,110 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/kaa.orth,v 1.2 2002/10/21 17:03:47 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Kara-Kalpak (Karakalpak) (KAA) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +#0472 # CYRILLIC CAPITAL LETTER FITA (Historic cyrillic letter) +#0473 # CYRILLIC SMALL LETTER FITA (Historic cyrillic letter) +0492 +0493 +049a +049b +04a2 +04a3 +04ae +04af +04b2 +04b3 +04d8 +04d9 Index: xc/lib/fontconfig/fc-lang/ki.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ki.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/ki.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,33 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ki.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Kikuyu (KI) +# +# Orthography taken from http://www.ideography.co.uk/library/pdf/charsets.pdf +# +0041-005a +0061-007a +0128 # LATIN CAPITAL LETTER I WITH TILDE +0129 # LATIN SMALL LETTER I WITH TILDE +0168 # LATIN CAPITAL LETTER U WITH TILDE +0169 # LATIN SMALL LETTER U WITH TILDE Index: xc/lib/fontconfig/fc-lang/kk.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/kk.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/kk.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,45 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/kk.orth,v 1.4 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Kazakh (KK) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +#00ab +#00bb +#0401 +#0406 +0410-044f +#0451 +0456 +0492-0493 +049a-049b +04a2-04a3 +#04ae-04af +#04b0-04b1 +04ba-04bb +04d8-04d9 +04e8-04e9 +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/kl.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/kl.orth:1.4 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/kl.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,63 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/kl.orth,v 1.4 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Greenlandic (KL) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +#00ab +#00bb +00c1 +00c2 +00c3 +00c5 +00c6 +#00c9 +00ca +00cd +00ce +00d4 +00d8 +00da +00db +00e1 +00e2 +00e3 +00e5 +00e6 +#00e9 +00ea +00ed +00ee +00f4 +00f8 +00fa +00fb +0128-0129 +0138 +0168-0169 +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/km.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/km.orth:1.2 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/km.orth Fri Jul 12 17:05:59 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/km.orth,v 1.2 2002/07/12 21:05:59 keithp Exp $ +# +# Copyright © 2002 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. +# +# Khmer (KM) +# +# Taken from the Unicode coverage of this language +# +1780-17c5 + Index: xc/lib/fontconfig/fc-lang/kn.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/kn.orth:1.1 --- /dev/null Thu Feb 27 12:28:05 2003 +++ xc/lib/fontconfig/fc-lang/kn.orth Sun Jul 7 15:18:51 2002 @@ -0,0 +1,40 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/kn.orth,v 1.1 2002/07/07 19:18:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Kannada (KN) +# +# Taken from the Unicode coverage of this language +# +0c82-0c83 +0c85-0c8c +0c8e-0c90 +0c92-0ca8 +0caa-0cb3 +0cb5-0cb9 +0cbe-0cc4 +0cc6-0cc8 +0cca-0ccd +0cd5-0cd6 +0cde +0ce0-0ce1 +0ce6-0cef Index: xc/lib/fontconfig/fc-lang/ko.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ko.orth:1.4 --- /dev/null Thu Feb 27 12:28:06 2003 +++ xc/lib/fontconfig/fc-lang/ko.orth Mon Aug 19 15:32:01 2002 @@ -0,0 +1,16243 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ko.orth,v 1.4 2002/08/19 19:32:01 keithp Exp $ +# +# Copyright © 2002 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. +# +# Korean (KO) +# +# Coverage from KSC 5601-1992 +# +#0x3000 # IDEOGRAPHIC SPACE +#0x3001 # IDEOGRAPHIC COMMA +#0x3002 # IDEOGRAPHIC FULL STOP +0x3131 # HANGUL LETTER KIYEOK +0x3132 # HANGUL LETTER SSANGKIYEOK +0x3133 # HANGUL LETTER KIYEOK-SIOS +0x3134 # HANGUL LETTER NIEUN +0x3135 # HANGUL LETTER NIEUN-CIEUC +0x3136 # HANGUL LETTER NIEUN-HIEUH +0x3137 # HANGUL LETTER TIKEUT +0x3138 # HANGUL LETTER SSANGTIKEUT +0x3139 # HANGUL LETTER RIEUL +0x313A # HANGUL LETTER RIEUL-KIYEOK +0x313B # HANGUL LETTER RIEUL-MIEUM +0x313C # HANGUL LETTER RIEUL-PIEUP +0x313D # HANGUL LETTER RIEUL-SIOS +0x313E # HANGUL LETTER RIEUL-THIEUTH +0x313F # HANGUL LETTER RIEUL-PHIEUPH +0x3140 # HANGUL LETTER RIEUL-HIEUH +0x3141 # HANGUL LETTER MIEUM +0x3142 # HANGUL LETTER PIEUP +0x3143 # HANGUL LETTER SSANGPIEUP +0x3144 # HANGUL LETTER PIEUP-SIOS +0x3145 # HANGUL LETTER SIOS +0x3146 # HANGUL LETTER SSANGSIOS +0x3147 # HANGUL LETTER IEUNG +0x3148 # HANGUL LETTER CIEUC +0x3149 # HANGUL LETTER SSANGCIEUC +0x314A # HANGUL LETTER CHIEUCH +0x314B # HANGUL LETTER KHIEUKH +0x314C # HANGUL LETTER THIEUTH +0x314D # HANGUL LETTER PHIEUPH +0x314E # HANGUL LETTER HIEUH +0x314F # HANGUL LETTER A +0x3150 # HANGUL LETTER AE +0x3151 # HANGUL LETTER YA +0x3152 # HANGUL LETTER YAE +0x3153 # HANGUL LETTER EO +0x3154 # HANGUL LETTER E +0x3155 # HANGUL LETTER YEO +0x3156 # HANGUL LETTER YE +0x3157 # HANGUL LETTER O +0x3158 # HANGUL LETTER WA +0x3159 # HANGUL LETTER WAE +0x315A # HANGUL LETTER OE +0x315B # HANGUL LETTER YO +0x315C # HANGUL LETTER U +0x315D # HANGUL LETTER WEO +0x315E # HANGUL LETTER WE +0x315F # HANGUL LETTER WI +0x3160 # HANGUL LETTER YU +0x3161 # HANGUL LETTER EU +0x3162 # HANGUL LETTER YI +0x3163 # HANGUL LETTER I +#0x3164 # HANGUL FILLER +0x3165 # HANGUL LETTER SSANGNIEUN +0x3166 # HANGUL LETTER NIEUN-TIKEUT +0x3167 # HANGUL LETTER NIEUN-SIOS +0x3168 # HANGUL LETTER NIEUN-PANSIOS +0x3169 # HANGUL LETTER RIEUL-KIYEOK-SIOS +0x316A # HANGUL LETTER RIEUL-TIKEUT +0x316B # HANGUL LETTER RIEUL-PIEUP-SIOS +0x316C # HANGUL LETTER RIEUL-PANSIOS +0x316D # HANGUL LETTER RIEUL-YEORINHIEUH +0x316E # HANGUL LETTER MIEUM-PIEUP +0x316F # HANGUL LETTER MIEUM-SIOS +0x3170 # HANGUL LETTER MIEUM-PANSIOS +0x3171 # HANGUL LETTER KAPYEOUNMIEUM +0x3172 # HANGUL LETTER PIEUP-KIYEOK +0x3173 # HANGUL LETTER PIEUP-TIKEUT +0x3174 # HANGUL LETTER PIEUP-SIOS-KIYEOK +0x3175 # HANGUL LETTER PIEUP-SIOS-TIKEUT +0x3176 # HANGUL LETTER PIEUP-CIEUC +0x3177 # HANGUL LETTER PIEUP-THIEUTH +0x3178 # HANGUL LETTER KAPYEOUNPIEUP +0x3179 # HANGUL LETTER KAPYEOUNSSANGPIEUP +0x317A # HANGUL LETTER SIOS-KIYEOK +0x317B # HANGUL LETTER SIOS-NIEUN +0x317C # HANGUL LETTER SIOS-TIKEUT +0x317D # HANGUL LETTER SIOS-PIEUP +0x317E # HANGUL LETTER SIOS-CIEUC +0x317F # HANGUL LETTER PANSIOS +0x3180 # HANGUL LETTER SSANGIEUNG +0x3181 # HANGUL LETTER YESIEUNG +0x3182 # HANGUL LETTER YESIEUNG-SIOS +0x3183 # HANGUL LETTER YESIEUNG-PANSIOS +0x3184 # HANGUL LETTER KAPYEOUNPHIEUPH +0x3185 # HANGUL LETTER SSANGHIEUH +0x3186 # HANGUL LETTER YEORINHIEUH +0x3187 # HANGUL LETTER YO-YA +0x3188 # HANGUL LETTER YO-YAE +0x3189 # HANGUL LETTER YO-I +0x318A # HANGUL LETTER YU-YEO +0x318B # HANGUL LETTER YU-YE +0x318C # HANGUL LETTER YU-I +0x318D # HANGUL LETTER ARAEA +0x318E # HANGUL LETTER ARAEAE +#0x3200 # PARENTHESIZED HANGUL KIYEOK +#0x3201 # PARENTHESIZED HANGUL NIEUN +#0x3202 # PARENTHESIZED HANGUL TIKEUT +#0x3203 # PARENTHESIZED HANGUL RIEUL +#0x3204 # PARENTHESIZED HANGUL MIEUM +#0x3205 # PARENTHESIZED HANGUL PIEUP +#0x3206 # PARENTHESIZED HANGUL SIOS +#0x3207 # PARENTHESIZED HANGUL IEUNG +#0x3208 # PARENTHESIZED HANGUL CIEUC +#0x3209 # PARENTHESIZED HANGUL CHIEUCH +#0x320A # PARENTHESIZED HANGUL KHIEUKH +#0x320B # PARENTHESIZED HANGUL THIEUTH +#0x320C # PARENTHESIZED HANGUL PHIEUPH +#0x320D # PARENTHESIZED HANGUL HIEUH +#0x320E # PARENTHESIZED HANGUL KIYEOK A +#0x320F # PARENTHESIZED HANGUL NIEUN A +#0x3210 # PARENTHESIZED HANGUL TIKEUT A +#0x3211 # PARENTHESIZED HANGUL RIEUL A +#0x3212 # PARENTHESIZED HANGUL MIEUM A +#0x3213 # PARENTHESIZED HANGUL PIEUP A +#0x3214 # PARENTHESIZED HANGUL SIOS A +#0x3215 # PARENTHESIZED HANGUL IEUNG A +#0x3216 # PARENTHESIZED HANGUL CIEUC A +#0x3217 # PARENTHESIZED HANGUL CHIEUCH A +#0x3218 # PARENTHESIZED HANGUL KHIEUKH A +#0x3219 # PARENTHESIZED HANGUL THIEUTH A +#0x321A # PARENTHESIZED HANGUL PHIEUPH A +#0x321B # PARENTHESIZED HANGUL HIEUH A +#0x321C # PARENTHESIZED HANGUL CIEUC U +#0x3260 # CIRCLED HANGUL KIYEOK +#0x3261 # CIRCLED HANGUL NIEUN +#0x3262 # CIRCLED HANGUL TIKEUT +#0x3263 # CIRCLED HANGUL RIEUL +#0x3264 # CIRCLED HANGUL MIEUM +#0x3265 # CIRCLED HANGUL PIEUP +#0x3266 # CIRCLED HANGUL SIOS +#0x3267 # CIRCLED HANGUL IEUNG +#0x3268 # CIRCLED HANGUL CIEUC +#0x3269 # CIRCLED HANGUL CHIEUCH +#0x326A # CIRCLED HANGUL KHIEUKH +#0x326B # CIRCLED HANGUL THIEUTH +#0x326C # CIRCLED HANGUL PHIEUPH +#0x326D # CIRCLED HANGUL HIEUH +#0x326E # CIRCLED HANGUL KIYEOK A +#0x326F # CIRCLED HANGUL NIEUN A +#0x3270 # CIRCLED HANGUL TIKEUT A +#0x3271 # CIRCLED HANGUL RIEUL A +#0x3272 # CIRCLED HANGUL MIEUM A +#0x3273 # CIRCLED HANGUL PIEUP A +#0x3274 # CIRCLED HANGUL SIOS A +#0x3275 # CIRCLED HANGUL IEUNG A +#0x3276 # CIRCLED HANGUL CIEUC A +#0x3277 # CIRCLED HANGUL CHIEUCH A +#0x3278 # CIRCLED HANGUL KHIEUKH A +#0x3279 # CIRCLED HANGUL THIEUTH A +#0x327A # CIRCLED HANGUL PHIEUPH A +#0x327B # CIRCLED HANGUL HIEUH A +#0x327F # KOREAN STANDARD SYMBOL +0x4E00 # <CJK> +0x4E01 # <CJK> +0x4E03 # <CJK> +0x4E07 # <CJK> +0x4E08 # <CJK> +0x4E09 # <CJK> +0x4E0A # <CJK> +0x4E0B # <CJK> +0x4E0D # <CJK> +0x4E11 # <CJK> +0x4E14 # <CJK> +0x4E15 # <CJK> +0x4E16 # <CJK> +0x4E18 # <CJK> +0x4E19 # <CJK> +0x4E1E # <CJK> +0x4E2D # <CJK> +0x4E32 # <CJK> +0x4E38 # <CJK> +0x4E39 # <CJK> +0x4E3B # <CJK> +0x4E42 # <CJK> +0x4E43 # <CJK> +0x4E45 # <CJK> +0x4E4B # <CJK> +0x4E4D # <CJK> +0x4E4E # <CJK> +0x4E4F # <CJK> +0x4E56 # <CJK> +0x4E58 # <CJK> +0x4E59 # <CJK> +0x4E5D # <CJK> +0x4E5E # <CJK> +0x4E5F # <CJK> +0x4E6B # <CJK> +0x4E6D # <CJK> +0x4E73 # <CJK> +0x4E76 # <CJK> +0x4E77 # <CJK> +0x4E7E # <CJK> +0x4E82 # <CJK> +0x4E86 # <CJK> +0x4E88 # <CJK> +0x4E8B # <CJK> +0x4E8C # <CJK> +0x4E8E # <CJK> +0x4E90 # <CJK> +0x4E91 # <CJK> +0x4E92 # <CJK> +0x4E94 # <CJK> +0x4E95 # <CJK> +0x4E98 # <CJK> +0x4E9B # <CJK> +0x4E9E # <CJK> +0x4EA1 # <CJK> +0x4EA2 # <CJK> +0x4EA4 # <CJK> +0x4EA5 # <CJK> +0x4EA6 # <CJK> +0x4EA8 # <CJK> +0x4EAB # <CJK> +0x4EAC # <CJK> +0x4EAD # <CJK> +0x4EAE # <CJK> +0x4EB6 # <CJK> +0x4EBA # <CJK> +0x4EC0 # <CJK> +0x4EC1 # <CJK> +0x4EC4 # <CJK> +0x4EC7 # <CJK> +0x4ECA # <CJK> +0x4ECB # <CJK> +0x4ECD # <CJK> +0x4ED4 # <CJK> +0x4ED5 # <CJK> +0x4ED6 # <CJK> +0x4ED7 # <CJK> +0x4ED8 # <CJK> +0x4ED9 # <CJK> +0x4EDD # <CJK> +0x4EDF # <CJK> +0x4EE3 # <CJK> +0x4EE4 # <CJK> +0x4EE5 # <CJK> +0x4EF0 # <CJK> +0x4EF2 # <CJK> +0x4EF6 # <CJK> +0x4EF7 # <CJK> +0x4EFB # <CJK> +0x4F01 # <CJK> +0x4F09 # <CJK> +0x4F0A # <CJK> +0x4F0B # <CJK> +0x4F0D # <CJK> +0x4F0E # <CJK> +0x4F0F # <CJK> +0x4F10 # <CJK> +0x4F11 # <CJK> +0x4F2F # <CJK> +0x4F34 # <CJK> +0x4F36 # <CJK> +0x4F38 # <CJK> +0x4F3A # <CJK> +0x4F3C # <CJK> +0x4F3D # <CJK> +0x4F43 # <CJK> +0x4F46 # <CJK> +0x4F47 # <CJK> +0x4F48 # <CJK> +0x4F4D # <CJK> +0x4F4E # <CJK> +0x4F4F # <CJK> +0x4F50 # <CJK> +0x4F51 # <CJK> +0x4F55 # <CJK> +0x4F59 # <CJK> +0x4F5A # <CJK> +0x4F5B # <CJK> +0x4F5C # <CJK> +0x4F69 # <CJK> +0x4F6F # <CJK> +0x4F70 # <CJK> +0x4F73 # <CJK> +0x4F76 # <CJK> +0x4F7A # <CJK> +0x4F7E # <CJK> +0x4F7F # <CJK> +0x4F81 # <CJK> +0x4F83 # <CJK> +0x4F84 # <CJK> +0x4F86 # <CJK> +0x4F88 # <CJK> +0x4F8A # <CJK> +0x4F8B # <CJK> +0x4F8D # <CJK> +0x4F8F # <CJK> +0x4F91 # <CJK> +0x4F96 # <CJK> +0x4F98 # <CJK> +0x4F9B # <CJK> +0x4F9D # <CJK> +0x4FAE # <CJK> +0x4FAF # <CJK> +0x4FB5 # <CJK> +0x4FB6 # <CJK> +0x4FBF # <CJK> +0x4FC2 # <CJK> +0x4FC3 # <CJK> +0x4FC4 # <CJK> +0x4FC9 # <CJK> +0x4FCA # <CJK> +0x4FCE # <CJK> +0x4FD1 # <CJK> +0x4FD3 # <CJK> +0x4FD4 # <CJK> +0x4FD7 # <CJK> +0x4FDA # <CJK> +0x4FDD # <CJK> +0x4FDF # <CJK> +0x4FE0 # <CJK> +0x4FE1 # <CJK> +0x4FEE # <CJK> +0x4FEF # <CJK> +0x4FF1 # <CJK> +0x4FF3 # <CJK> +0x4FF5 # <CJK> +0x4FF8 # <CJK> +0x4FFA # <CJK> +0x5002 # <CJK> +0x5006 # <CJK> +0x5009 # <CJK> +0x500B # <CJK> +0x500D # <CJK> +0x5011 # <CJK> +0x5012 # <CJK> +0x5016 # <CJK> +0x5019 # <CJK> +0x501A # <CJK> +0x501C # <CJK> +0x501E # <CJK> +0x501F # <CJK> +0x5021 # <CJK> +0x5023 # <CJK> +0x5024 # <CJK> +0x5026 # <CJK> +0x5027 # <CJK> +0x5028 # <CJK> +0x502A # <CJK> +0x502B # <CJK> +0x502C # <CJK> +0x502D # <CJK> +0x503B # <CJK> +0x5043 # <CJK> +0x5047 # <CJK> +0x5048 # <CJK> +0x5049 # <CJK> +0x504F # <CJK> +0x5055 # <CJK> +0x505A # <CJK> +0x505C # <CJK> +0x5065 # <CJK> +0x5074 # <CJK> +0x5075 # <CJK> +0x5076 # <CJK> +0x5078 # <CJK> +0x5080 # <CJK> +0x5085 # <CJK> +0x508D # <CJK> +0x5091 # <CJK> +0x5098 # <CJK> +0x5099 # <CJK> +0x50AC # <CJK> +0x50AD # <CJK> +0x50B2 # <CJK> +0x50B3 # <CJK> +0x50B5 # <CJK> +0x50B7 # <CJK> +0x50BE # <CJK> +0x50C5 # <CJK> +0x50C9 # <CJK> +0x50CA # <CJK> +0x50CF # <CJK> +0x50D1 # <CJK> +0x50D5 # <CJK> +0x50D6 # <CJK> +0x50DA # <CJK> +0x50DE # <CJK> +0x50E5 # <CJK> +0x50E7 # <CJK> +0x50ED # <CJK> +0x50F9 # <CJK> +0x50FB # <CJK> +0x50FF # <CJK> +0x5100 # <CJK> +0x5101 # <CJK> +0x5104 # <CJK> +0x5106 # <CJK> +0x5109 # <CJK> +0x5112 # <CJK> +0x511F # <CJK> +0x5121 # <CJK> +0x512A # <CJK> +0x5132 # <CJK> +0x5137 # <CJK> +0x513A # <CJK> +0x513C # <CJK> +0x5140 # <CJK> +0x5141 # <CJK> +0x5143 # <CJK> +0x5144 # <CJK> +0x5145 # <CJK> +0x5146 # <CJK> +0x5147 # <CJK> +0x5148 # <CJK> +0x5149 # <CJK> +0x514B # <CJK> +0x514C # <CJK> +0x514D # <CJK> +0x514E # <CJK> +0x5152 # <CJK> +0x515C # <CJK> +0x5162 # <CJK> +0x5165 # <CJK> +0x5167 # <CJK> +0x5168 # <CJK> +0x5169 # <CJK> +0x516A # <CJK> +0x516B # <CJK> +0x516C # <CJK> +0x516D # <CJK> +0x516E # <CJK> +0x5171 # <CJK> +0x5175 # <CJK> +0x5176 # <CJK> +0x5177 # <CJK> +0x5178 # <CJK> +0x517C # <CJK> +0x5180 # <CJK> +0x5186 # <CJK> +0x518A # <CJK> +0x518D # <CJK> +0x5192 # <CJK> +0x5195 # <CJK> +0x5197 # <CJK> +0x51A0 # <CJK> +0x51A5 # <CJK> +0x51AA # <CJK> +0x51AC # <CJK> +0x51B6 # <CJK> +0x51B7 # <CJK> +0x51BD # <CJK> +0x51C4 # <CJK> +0x51C6 # <CJK> +0x51C9 # <CJK> +0x51CB # <CJK> +0x51CC # <CJK> +0x51CD # <CJK> +0x51DC # <CJK> +0x51DD # <CJK> +0x51DE # <CJK> +0x51E1 # <CJK> +0x51F0 # <CJK> +0x51F1 # <CJK> +0x51F6 # <CJK> +0x51F8 # <CJK> +0x51F9 # <CJK> +0x51FA # <CJK> +0x51FD # <CJK> +0x5200 # <CJK> +0x5203 # <CJK> +0x5206 # <CJK> +0x5207 # <CJK> +0x5208 # <CJK> +0x520A # <CJK> +0x520E # <CJK> +0x5211 # <CJK> +0x5217 # <CJK> +0x521D # <CJK> +0x5224 # <CJK> +0x5225 # <CJK> +0x5229 # <CJK> +0x522A # <CJK> +0x522E # <CJK> +0x5230 # <CJK> +0x5236 # <CJK> +0x5237 # <CJK> +0x5238 # <CJK> +0x5239 # <CJK> +0x523A # <CJK> +0x523B # <CJK> +0x5243 # <CJK> +0x5247 # <CJK> +0x524A # <CJK> +0x524B # <CJK> +0x524C # <CJK> +0x524D # <CJK> +0x5254 # <CJK> +0x5256 # <CJK> +0x525B # <CJK> +0x525D # <CJK> +0x5261 # <CJK> +0x5269 # <CJK> +0x526A # <CJK> +0x526F # <CJK> +0x5272 # <CJK> +0x5275 # <CJK> +0x527D # <CJK> +0x527F # <CJK> +0x5283 # <CJK> +0x5287 # <CJK> +0x5288 # <CJK> +0x5289 # <CJK> +0x528D # <CJK> +0x5291 # <CJK> +0x5292 # <CJK> +0x529B # <CJK> +0x529F # <CJK> +0x52A0 # <CJK> +0x52A3 # <CJK> +0x52A4 # <CJK> +0x52A9 # <CJK> +0x52AA # <CJK> +0x52AB # <CJK> +0x52BE # <CJK> +0x52C1 # <CJK> +0x52C3 # <CJK> +0x52C5 # <CJK> +0x52C7 # <CJK> +0x52C9 # <CJK> +0x52CD # <CJK> +0x52D2 # <CJK> +0x52D5 # <CJK> +0x52D6 # <CJK> +0x52D8 # <CJK> +0x52D9 # <CJK> +0x52DB # <CJK> +0x52DD # <CJK> +0x52DE # <CJK> +0x52DF # <CJK> +0x52E2 # <CJK> +0x52E3 # <CJK> +0x52E4 # <CJK> +0x52F3 # <CJK> +0x52F5 # <CJK> +0x52F8 # <CJK> +0x52FA # <CJK> +0x52FB # <CJK> +0x52FE # <CJK> +0x52FF # <CJK> +0x5305 # <CJK> +0x5308 # <CJK> +0x530D # <CJK> +0x530F # <CJK> +0x5310 # <CJK> +0x5315 # <CJK> +0x5316 # <CJK> +0x5317 # <CJK> +0x5319 # <CJK> +0x5320 # <CJK> +0x5321 # <CJK> +0x5323 # <CJK> +0x532A # <CJK> +0x532F # <CJK> +0x5339 # <CJK> +0x533F # <CJK> +0x5340 # <CJK> +0x5341 # <CJK> +0x5343 # <CJK> +0x5344 # <CJK> +0x5347 # <CJK> +0x5348 # <CJK> +0x5349 # <CJK> +0x534A # <CJK> +0x534D # <CJK> +0x5351 # <CJK> +0x5352 # <CJK> +0x5353 # <CJK> +0x5354 # <CJK> +0x5357 # <CJK> +0x535A # <CJK> +0x535C # <CJK> +0x535E # <CJK> +0x5360 # <CJK> +0x5366 # <CJK> +0x5368 # <CJK> +0x536F # <CJK> +0x5370 # <CJK> +0x5371 # <CJK> +0x5374 # <CJK> +0x5375 # <CJK> +0x5377 # <CJK> +0x537D # <CJK> +0x537F # <CJK> +0x5384 # <CJK> +0x5393 # <CJK> +0x5398 # <CJK> +0x539A # <CJK> +0x539F # <CJK> +0x53A0 # <CJK> +0x53A5 # <CJK> +0x53A6 # <CJK> +0x53AD # <CJK> +0x53BB # <CJK> +0x53C3 # <CJK> +0x53C8 # <CJK> +0x53C9 # <CJK> +0x53CA # <CJK> +0x53CB # <CJK> +0x53CD # <CJK> +0x53D4 # <CJK> +0x53D6 # <CJK> +0x53D7 # <CJK> +0x53DB # <CJK> +0x53E1 # <CJK> +0x53E2 # <CJK> +0x53E3 # <CJK> +0x53E4 # <CJK> +0x53E5 # <CJK> +0x53E9 # <CJK> +0x53EA # <CJK> +0x53EB # <CJK> +0x53EC # <CJK> +0x53ED # <CJK> +0x53EF # <CJK> +0x53F0 # <CJK> +0x53F1 # <CJK> +0x53F2 # <CJK> +0x53F3 # <CJK> +0x53F8 # <CJK> +0x5403 # <CJK> +0x5404 # <CJK> +0x5408 # <CJK> +0x5409 # <CJK> +0x540A # <CJK> +0x540C # <CJK> +0x540D # <CJK> +0x540E # <CJK> +0x540F # <CJK> +0x5410 # <CJK> +0x5411 # <CJK> +0x541B # <CJK> +0x541D # <CJK> +0x541F # <CJK> +0x5420 # <CJK> +0x5426 # <CJK> +0x5429 # <CJK> +0x542B # <CJK> +0x5433 # <CJK> +0x5438 # <CJK> +0x5439 # <CJK> +0x543B # <CJK> +0x543C # <CJK> +0x543E # <CJK> +0x5442 # <CJK> +0x5448 # <CJK> +0x544A # <CJK> +0x5451 # <CJK> +0x5468 # <CJK> +0x546A # <CJK> +0x5471 # <CJK> +0x5473 # <CJK> +0x5475 # <CJK> +0x547B # <CJK> +0x547C # <CJK> +0x547D # <CJK> +0x5480 # <CJK> +0x5486 # <CJK> +0x548C # <CJK> +0x548E # <CJK> +0x5490 # <CJK> +0x54A4 # <CJK> +0x54A8 # <CJK> +0x54AB # <CJK> +0x54AC # <CJK> +0x54B3 # <CJK> +0x54B8 # <CJK> +0x54BD # <CJK> +0x54C0 # <CJK> +0x54C1 # <CJK> +0x54C4 # <CJK> +0x54C8 # <CJK> +0x54C9 # <CJK> +0x54E1 # <CJK> +0x54E5 # <CJK> +0x54E8 # <CJK> +0x54ED # <CJK> +0x54EE # <CJK> +0x54F2 # <CJK> +0x54FA # <CJK> +0x5504 # <CJK> +0x5506 # <CJK> +0x5507 # <CJK> +0x550E # <CJK> +0x5510 # <CJK> +0x551C # <CJK> +0x552F # <CJK> +0x5531 # <CJK> +0x5535 # <CJK> +0x553E # <CJK> +0x5544 # <CJK> +0x5546 # <CJK> +0x554F # <CJK> +0x5553 # <CJK> +0x5556 # <CJK> +0x555E # <CJK> +0x5563 # <CJK> +0x557C # <CJK> +0x5580 # <CJK> +0x5584 # <CJK> +0x5586 # <CJK> +0x5587 # <CJK> +0x5589 # <CJK> +0x558A # <CJK> +0x5598 # <CJK> +0x5599 # <CJK> +0x559A # <CJK> +0x559C # <CJK> +0x559D # <CJK> +0x55A7 # <CJK> +0x55A9 # <CJK> +0x55AA # <CJK> +0x55AB # <CJK> +0x55AC # <CJK> +0x55AE # <CJK> +0x55C5 # <CJK> +0x55C7 # <CJK> +0x55D4 # <CJK> +0x55DA # <CJK> +0x55DC # <CJK> +0x55DF # <CJK> +0x55E3 # <CJK> +0x55E4 # <CJK> +0x55FD # <CJK> +0x55FE # <CJK> +0x5606 # <CJK> +0x5609 # <CJK> +0x5614 # <CJK> +0x5617 # <CJK> +0x562F # <CJK> +0x5632 # <CJK> +0x5634 # <CJK> +0x5636 # <CJK> +0x5653 # <CJK> +0x5668 # <CJK> +0x566B # <CJK> +0x5674 # <CJK> +0x5686 # <CJK> +0x56A5 # <CJK> +0x56AC # <CJK> +0x56AE # <CJK> +0x56B4 # <CJK> +0x56BC # <CJK> +0x56CA # <CJK> +0x56CD # <CJK> +0x56D1 # <CJK> +0x56DA # <CJK> +0x56DB # <CJK> +0x56DE # <CJK> +0x56E0 # <CJK> +0x56F0 # <CJK> +0x56F9 # <CJK> +0x56FA # <CJK> +0x5703 # <CJK> +0x5704 # <CJK> +0x5708 # <CJK> +0x570B # <CJK> +0x570D # <CJK> +0x5712 # <CJK> +0x5713 # <CJK> +0x5716 # <CJK> +0x5718 # <CJK> +0x571F # <CJK> +0x5728 # <CJK> +0x572D # <CJK> +0x5730 # <CJK> +0x573B # <CJK> +0x5740 # <CJK> +0x5742 # <CJK> +0x5747 # <CJK> +0x574A # <CJK> +0x574D # <CJK> +0x574E # <CJK> +0x5750 # <CJK> +0x5751 # <CJK> +0x5761 # <CJK> +0x5764 # <CJK> +0x5766 # <CJK> +0x576A # <CJK> +0x576E # <CJK> +0x5770 # <CJK> +0x5775 # <CJK> +0x577C # <CJK> +0x5782 # <CJK> +0x5788 # <CJK> +0x578B # <CJK> +0x5793 # <CJK> +0x57A0 # <CJK> +0x57A2 # <CJK> +0x57A3 # <CJK> +0x57C3 # <CJK> +0x57C7 # <CJK> +0x57C8 # <CJK> +0x57CB # <CJK> +0x57CE # <CJK> +0x57DF # <CJK> +0x57E0 # <CJK> +0x57F0 # <CJK> +0x57F4 # <CJK> +0x57F7 # <CJK> +0x57F9 # <CJK> +0x57FA # <CJK> +0x57FC # <CJK> +0x5800 # <CJK> +0x5802 # <CJK> +0x5805 # <CJK> +0x5806 # <CJK> +0x5808 # <CJK> +0x5809 # <CJK> +0x580A # <CJK> +0x581E # <CJK> +0x5821 # <CJK> +0x5824 # <CJK> +0x5827 # <CJK> +0x582A # <CJK> +0x582F # <CJK> +0x5830 # <CJK> +0x5831 # <CJK> +0x5834 # <CJK> +0x5835 # <CJK> +0x583A # <CJK> +0x584A # <CJK> +0x584B # <CJK> +0x584F # <CJK> +0x5851 # <CJK> +0x5854 # <CJK> +0x5857 # <CJK> +0x5858 # <CJK> +0x585A # <CJK> +0x585E # <CJK> +0x5861 # <CJK> +0x5862 # <CJK> +0x5864 # <CJK> +0x5875 # <CJK> +0x5879 # <CJK> +0x587C # <CJK> +0x587E # <CJK> +0x5883 # <CJK> +0x5885 # <CJK> +0x5889 # <CJK> +0x5893 # <CJK> +0x589C # <CJK> +0x589E # <CJK> +0x589F # <CJK> +0x58A8 # <CJK> +0x58A9 # <CJK> +0x58AE # <CJK> +0x58B3 # <CJK> +0x58BA # <CJK> +0x58BB # <CJK> +0x58BE # <CJK> +0x58C1 # <CJK> +0x58C5 # <CJK> +0x58C7 # <CJK> +0x58CE # <CJK> +0x58D1 # <CJK> +0x58D3 # <CJK> +0x58D5 # <CJK> +0x58D8 # <CJK> +0x58D9 # <CJK> +0x58DE # <CJK> +0x58DF # <CJK> +0x58E4 # <CJK> +0x58EB # <CJK> +0x58EC # <CJK> +0x58EF # <CJK> +0x58F9 # <CJK> +0x58FA # <CJK> +0x58FB # <CJK> +0x58FD # <CJK> +0x590F # <CJK> +0x5914 # <CJK> +0x5915 # <CJK> +0x5916 # <CJK> +0x5919 # <CJK> +0x591A # <CJK> +0x591C # <CJK> +0x5922 # <CJK> +0x5927 # <CJK> +0x5929 # <CJK> +0x592A # <CJK> +0x592B # <CJK> +0x592D # <CJK> +0x592E # <CJK> +0x5931 # <CJK> +0x5937 # <CJK> +0x593E # <CJK> +0x5944 # <CJK> +0x5947 # <CJK> +0x5948 # <CJK> +0x5949 # <CJK> +0x594E # <CJK> +0x594F # <CJK> +0x5950 # <CJK> +0x5951 # <CJK> +0x5954 # <CJK> +0x5955 # <CJK> +0x5957 # <CJK> +0x595A # <CJK> +0x5960 # <CJK> +0x5962 # <CJK> +0x5967 # <CJK> +0x596A # <CJK> +0x596B # <CJK> +0x596C # <CJK> +0x596D # <CJK> +0x596E # <CJK> +0x5973 # <CJK> +0x5974 # <CJK> +0x5978 # <CJK> +0x597D # <CJK> +0x5982 # <CJK> +0x5983 # <CJK> +0x5984 # <CJK> +0x598A # <CJK> +0x5993 # <CJK> +0x5996 # <CJK> +0x5997 # <CJK> +0x5999 # <CJK> +0x59A5 # <CJK> +0x59A8 # <CJK> +0x59AC # <CJK> +0x59B9 # <CJK> +0x59BB # <CJK> +0x59BE # <CJK> +0x59C3 # <CJK> +0x59C6 # <CJK> +0x59C9 # <CJK> +0x59CB # <CJK> +0x59D0 # <CJK> +0x59D1 # <CJK> +0x59D3 # <CJK> +0x59D4 # <CJK> +0x59D9 # <CJK> +0x59DA # <CJK> +0x59DC # <CJK> +0x59DD # <CJK> +0x59E6 # <CJK> +0x59E8 # <CJK> +0x59EA # <CJK> +0x59EC # <CJK> +0x59EE # <CJK> +0x59F8 # <CJK> +0x59FB # <CJK> +0x59FF # <CJK> +0x5A01 # <CJK> +0x5A03 # <CJK> +0x5A11 # <CJK> +0x5A18 # <CJK> +0x5A1B # <CJK> +0x5A1C # <CJK> +0x5A1F # <CJK> +0x5A20 # <CJK> +0x5A25 # <CJK> +0x5A29 # <CJK> +0x5A36 # <CJK> +0x5A3C # <CJK> +0x5A41 # <CJK> +0x5A46 # <CJK> +0x5A49 # <CJK> +0x5A5A # <CJK> +0x5A62 # <CJK> +0x5A66 # <CJK> +0x5A92 # <CJK> +0x5A9A # <CJK> +0x5A9B # <CJK> +0x5AA4 # <CJK> +0x5AC1 # <CJK> +0x5AC2 # <CJK> +0x5AC4 # <CJK> +0x5AC9 # <CJK> +0x5ACC # <CJK> +0x5AE1 # <CJK> +0x5AE6 # <CJK> +0x5AE9 # <CJK> +0x5B05 # <CJK> +0x5B09 # <CJK> +0x5B0B # <CJK> +0x5B0C # <CJK> +0x5B16 # <CJK> +0x5B2A # <CJK> +0x5B40 # <CJK> +0x5B43 # <CJK> +0x5B50 # <CJK> +0x5B51 # <CJK> +0x5B54 # <CJK> +0x5B55 # <CJK> +0x5B57 # <CJK> +0x5B58 # <CJK> +0x5B5A # <CJK> +0x5B5C # <CJK> +0x5B5D # <CJK> +0x5B5F # <CJK> +0x5B63 # <CJK> +0x5B64 # <CJK> +0x5B69 # <CJK> +0x5B6B # <CJK> +0x5B70 # <CJK> +0x5B71 # <CJK> +0x5B75 # <CJK> +0x5B78 # <CJK> +0x5B7A # <CJK> +0x5B7C # <CJK> +0x5B85 # <CJK> +0x5B87 # <CJK> +0x5B88 # <CJK> +0x5B89 # <CJK> +0x5B8B # <CJK> +0x5B8C # <CJK> +0x5B8F # <CJK> +0x5B93 # <CJK> +0x5B95 # <CJK> +0x5B96 # <CJK> +0x5B97 # <CJK> +0x5B98 # <CJK> +0x5B99 # <CJK> +0x5B9A # <CJK> +0x5B9B # <CJK> +0x5B9C # <CJK> +0x5BA2 # <CJK> +0x5BA3 # <CJK> +0x5BA4 # <CJK> +0x5BA5 # <CJK> +0x5BA6 # <CJK> +0x5BAC # <CJK> +0x5BAE # <CJK> +0x5BB0 # <CJK> +0x5BB3 # <CJK> +0x5BB4 # <CJK> +0x5BB5 # <CJK> +0x5BB6 # <CJK> +0x5BB8 # <CJK> +0x5BB9 # <CJK> +0x5BBF # <CJK> +0x5BC0 # <CJK> +0x5BC2 # <CJK> +0x5BC3 # <CJK> +0x5BC4 # <CJK> +0x5BC5 # <CJK> +0x5BC6 # <CJK> +0x5BC7 # <CJK> +0x5BCC # <CJK> +0x5BD0 # <CJK> +0x5BD2 # <CJK> +0x5BD3 # <CJK> +0x5BD4 # <CJK> +0x5BD7 # <CJK> +0x5BDE # <CJK> +0x5BDF # <CJK> +0x5BE1 # <CJK> +0x5BE2 # <CJK> +0x5BE4 # <CJK> +0x5BE5 # <CJK> +0x5BE6 # <CJK> +0x5BE7 # <CJK> +0x5BE8 # <CJK> +0x5BE9 # <CJK> +0x5BEB # <CJK> +0x5BEC # <CJK> +0x5BEE # <CJK> +0x5BEF # <CJK> +0x5BF5 # <CJK> +0x5BF6 # <CJK> +0x5BF8 # <CJK> +0x5BFA # <CJK> +0x5C01 # <CJK> +0x5C04 # <CJK> +0x5C07 # <CJK> +0x5C08 # <CJK> +0x5C09 # <CJK> +0x5C0A # <CJK> +0x5C0B # <CJK> +0x5C0D # <CJK> +0x5C0E # <CJK> +0x5C0F # <CJK> +0x5C11 # <CJK> +0x5C16 # <CJK> +0x5C19 # <CJK> +0x5C24 # <CJK> +0x5C28 # <CJK> +0x5C31 # <CJK> +0x5C38 # <CJK> +0x5C39 # <CJK> +0x5C3A # <CJK> +0x5C3B # <CJK> +0x5C3C # <CJK> +0x5C3E # <CJK> +0x5C3F # <CJK> +0x5C40 # <CJK> +0x5C45 # <CJK> +0x5C46 # <CJK> +0x5C48 # <CJK> +0x5C4B # <CJK> +0x5C4D # <CJK> +0x5C4E # <CJK> +0x5C51 # <CJK> +0x5C55 # <CJK> +0x5C5B # <CJK> +0x5C60 # <CJK> +0x5C62 # <CJK> +0x5C64 # <CJK> +0x5C65 # <CJK> +0x5C6C # <CJK> +0x5C6F # <CJK> +0x5C71 # <CJK> +0x5C79 # <CJK> +0x5C90 # <CJK> +0x5C91 # <CJK> +0x5CA1 # <CJK> +0x5CA9 # <CJK> +0x5CAB # <CJK> +0x5CAC # <CJK> +0x5CB1 # <CJK> +0x5CB3 # <CJK> +0x5CB5 # <CJK> +0x5CB7 # <CJK> +0x5CB8 # <CJK> +0x5CBA # <CJK> +0x5CBE # <CJK> +0x5CC0 # <CJK> +0x5CD9 # <CJK> +0x5CE0 # <CJK> +0x5CE8 # <CJK> +0x5CEF # <CJK> +0x5CF0 # <CJK> +0x5CF4 # <CJK> +0x5CF6 # <CJK> +0x5CFB # <CJK> +0x5CFD # <CJK> +0x5D07 # <CJK> +0x5D0D # <CJK> +0x5D0E # <CJK> +0x5D11 # <CJK> +0x5D14 # <CJK> +0x5D16 # <CJK> +0x5D17 # <CJK> +0x5D19 # <CJK> +0x5D27 # <CJK> +0x5D29 # <CJK> +0x5D4B # <CJK> +0x5D4C # <CJK> +0x5D50 # <CJK> +0x5D69 # <CJK> +0x5D6C # <CJK> +0x5D6F # <CJK> +0x5D87 # <CJK> +0x5D8B # <CJK> +0x5D9D # <CJK> +0x5DA0 # <CJK> +0x5DA2 # <CJK> +0x5DAA # <CJK> +0x5DB8 # <CJK> +0x5DBA # <CJK> +0x5DBC # <CJK> +0x5DBD # <CJK> +0x5DCD # <CJK> +0x5DD2 # <CJK> +0x5DD6 # <CJK> +0x5DDD # <CJK> +0x5DDE # <CJK> +0x5DE1 # <CJK> +0x5DE2 # <CJK> +0x5DE5 # <CJK> +0x5DE6 # <CJK> +0x5DE7 # <CJK> +0x5DE8 # <CJK> +0x5DEB # <CJK> +0x5DEE # <CJK> +0x5DF1 # <CJK> +0x5DF2 # <CJK> +0x5DF3 # <CJK> +0x5DF4 # <CJK> +0x5DF7 # <CJK> +0x5DFD # <CJK> +0x5DFE # <CJK> +0x5E02 # <CJK> +0x5E03 # <CJK> +0x5E06 # <CJK> +0x5E0C # <CJK> +0x5E11 # <CJK> +0x5E16 # <CJK> +0x5E19 # <CJK> +0x5E1B # <CJK> +0x5E1D # <CJK> +0x5E25 # <CJK> +0x5E2B # <CJK> +0x5E2D # <CJK> +0x5E33 # <CJK> +0x5E36 # <CJK> +0x5E38 # <CJK> +0x5E3D # <CJK> +0x5E3F # <CJK> +0x5E40 # <CJK> +0x5E44 # <CJK> +0x5E45 # <CJK> +0x5E47 # <CJK> +0x5E4C # <CJK> +0x5E55 # <CJK> +0x5E5F # <CJK> +0x5E61 # <CJK> +0x5E62 # <CJK> +0x5E63 # <CJK> +0x5E72 # <CJK> +0x5E73 # <CJK> +0x5E74 # <CJK> +0x5E77 # <CJK> +0x5E78 # <CJK> +0x5E79 # <CJK> +0x5E7B # <CJK> +0x5E7C # <CJK> +0x5E7D # <CJK> +0x5E7E # <CJK> +0x5E84 # <CJK> +0x5E87 # <CJK> +0x5E8A # <CJK> +0x5E8F # <CJK> +0x5E95 # <CJK> +0x5E97 # <CJK> +0x5E9A # <CJK> +0x5E9C # <CJK> +0x5EA0 # <CJK> +0x5EA6 # <CJK> +0x5EA7 # <CJK> +0x5EAB # <CJK> +0x5EAD # <CJK> +0x5EB5 # <CJK> +0x5EB6 # <CJK> +0x5EB7 # <CJK> +0x5EB8 # <CJK> +0x5EBE # <CJK> +0x5EC2 # <CJK> +0x5EC8 # <CJK> +0x5EC9 # <CJK> +0x5ECA # <CJK> +0x5ED0 # <CJK> +0x5ED3 # <CJK> +0x5ED6 # <CJK> +0x5EDA # <CJK> +0x5EDB # <CJK> +0x5EDF # <CJK> +0x5EE0 # <CJK> +0x5EE2 # <CJK> +0x5EE3 # <CJK> +0x5EEC # <CJK> +0x5EF3 # <CJK> +0x5EF6 # <CJK> +0x5EF7 # <CJK> +0x5EFA # <CJK> +0x5EFB # <CJK> +0x5F01 # <CJK> +0x5F04 # <CJK> +0x5F0A # <CJK> +0x5F0F # <CJK> +0x5F11 # <CJK> +0x5F13 # <CJK> +0x5F14 # <CJK> +0x5F15 # <CJK> +0x5F17 # <CJK> +0x5F18 # <CJK> +0x5F1B # <CJK> +0x5F1F # <CJK> +0x5F26 # <CJK> +0x5F27 # <CJK> +0x5F29 # <CJK> +0x5F31 # <CJK> +0x5F35 # <CJK> +0x5F3A # <CJK> +0x5F3C # <CJK> +0x5F48 # <CJK> +0x5F4A # <CJK> +0x5F4C # <CJK> +0x5F4E # <CJK> +0x5F56 # <CJK> +0x5F57 # <CJK> +0x5F59 # <CJK> +0x5F5B # <CJK> +0x5F62 # <CJK> +0x5F66 # <CJK> +0x5F67 # <CJK> +0x5F69 # <CJK> +0x5F6A # <CJK> +0x5F6B # <CJK> +0x5F6C # <CJK> +0x5F6D # <CJK> +0x5F70 # <CJK> +0x5F71 # <CJK> +0x5F77 # <CJK> +0x5F79 # <CJK> +0x5F7C # <CJK> +0x5F7F # <CJK> +0x5F80 # <CJK> +0x5F81 # <CJK> +0x5F85 # <CJK> +0x5F87 # <CJK> +0x5F8A # <CJK> +0x5F8B # <CJK> +0x5F8C # <CJK> +0x5F90 # <CJK> +0x5F91 # <CJK> +0x5F92 # <CJK> +0x5F97 # <CJK> +0x5F98 # <CJK> +0x5F99 # <CJK> +0x5F9E # <CJK> +0x5FA0 # <CJK> +0x5FA1 # <CJK> +0x5FA8 # <CJK> +0x5FA9 # <CJK> +0x5FAA # <CJK> +0x5FAE # <CJK> +0x5FB5 # <CJK> +0x5FB7 # <CJK> +0x5FB9 # <CJK> +0x5FBD # <CJK> +0x5FC3 # <CJK> +0x5FC5 # <CJK> +0x5FCC # <CJK> +0x5FCD # <CJK> +0x5FD6 # <CJK> +0x5FD7 # <CJK> +0x5FD8 # <CJK> +0x5FD9 # <CJK> +0x5FE0 # <CJK> +0x5FEB # <CJK> +0x5FF5 # <CJK> +0x5FFD # <CJK> +0x5FFF # <CJK> +0x600F # <CJK> +0x6012 # <CJK> +0x6016 # <CJK> +0x601C # <CJK> +0x601D # <CJK> +0x6020 # <CJK> +0x6021 # <CJK> +0x6025 # <CJK> +0x6027 # <CJK> +0x6028 # <CJK> +0x602A # <CJK> +0x602F # <CJK> +0x6041 # <CJK> +0x6042 # <CJK> +0x6043 # <CJK> +0x604D # <CJK> +0x6050 # <CJK> +0x6052 # <CJK> +0x6055 # <CJK> +0x6059 # <CJK> +0x605D # <CJK> +0x6062 # <CJK> +0x6063 # <CJK> +0x6064 # <CJK> +0x6065 # <CJK> +0x6068 # <CJK> +0x6069 # <CJK> +0x606A # <CJK> +0x606C # <CJK> +0x606D # <CJK> +0x606F # <CJK> +0x6070 # <CJK> +0x6085 # <CJK> +0x6089 # <CJK> +0x608C # <CJK> +0x608D # <CJK> +0x6094 # <CJK> +0x6096 # <CJK> +0x609A # <CJK> +0x609B # <CJK> +0x609F # <CJK> +0x60A0 # <CJK> +0x60A3 # <CJK> +0x60A4 # <CJK> +0x60A7 # <CJK> +0x60B0 # <CJK> +0x60B2 # <CJK> +0x60B3 # <CJK> +0x60B4 # <CJK> +0x60B6 # <CJK> +0x60B8 # <CJK> +0x60BC # <CJK> +0x60BD # <CJK> +0x60C5 # <CJK> +0x60C7 # <CJK> +0x60D1 # <CJK> +0x60DA # <CJK> +0x60DC # <CJK> +0x60DF # <CJK> +0x60E0 # <CJK> +0x60E1 # <CJK> +0x60F0 # <CJK> +0x60F1 # <CJK> +0x60F3 # <CJK> +0x60F6 # <CJK> +0x60F9 # <CJK> +0x60FA # <CJK> +0x60FB # <CJK> +0x6101 # <CJK> +0x6106 # <CJK> +0x6108 # <CJK> +0x6109 # <CJK> +0x610D # <CJK> +0x610E # <CJK> +0x610F # <CJK> +0x6115 # <CJK> +0x611A # <CJK> +0x611B # <CJK> +0x611F # <CJK> +0x6127 # <CJK> +0x6130 # <CJK> +0x6134 # <CJK> +0x6137 # <CJK> +0x613C # <CJK> +0x613E # <CJK> +0x613F # <CJK> +0x6142 # <CJK> +0x6144 # <CJK> +0x6147 # <CJK> +0x6148 # <CJK> +0x614A # <CJK> +0x614B # <CJK> +0x614C # <CJK> +0x6153 # <CJK> +0x6155 # <CJK> +0x6158 # <CJK> +0x6159 # <CJK> +0x615D # <CJK> +0x615F # <CJK> +0x6162 # <CJK> +0x6163 # <CJK> +0x6164 # <CJK> +0x6167 # <CJK> +0x6168 # <CJK> +0x616B # <CJK> +0x616E # <CJK> +0x6170 # <CJK> +0x6176 # <CJK> +0x6177 # <CJK> +0x617D # <CJK> +0x617E # <CJK> +0x6181 # <CJK> +0x6182 # <CJK> +0x618A # <CJK> +0x618E # <CJK> +0x6190 # <CJK> +0x6191 # <CJK> +0x6194 # <CJK> +0x6198 # <CJK> +0x6199 # <CJK> +0x619A # <CJK> +0x61A4 # <CJK> +0x61A7 # <CJK> +0x61A9 # <CJK> +0x61AB # <CJK> +0x61AC # <CJK> +0x61AE # <CJK> +0x61B2 # <CJK> +0x61B6 # <CJK> +0x61BA # <CJK> +0x61BE # <CJK> +0x61C3 # <CJK> +0x61C7 # <CJK> +0x61C8 # <CJK> +0x61C9 # <CJK> +0x61CA # <CJK> +0x61CB # <CJK> +0x61E6 # <CJK> +0x61F2 # <CJK> +0x61F6 # <CJK> +0x61F7 # <CJK> +0x61F8 # <CJK> +0x61FA # <CJK> +0x61FC # <CJK> +0x61FF # <CJK> +0x6200 # <CJK> +0x6207 # <CJK> +0x6208 # <CJK> +0x620A # <CJK> +0x620C # <CJK> +0x620D # <CJK> +0x620E # <CJK> +0x6210 # <CJK> +0x6211 # <CJK> +0x6212 # <CJK> +0x6216 # <CJK> +0x621A # <CJK> +0x621F # <CJK> +0x6221 # <CJK> +0x622A # <CJK> +0x622E # <CJK> +0x6230 # <CJK> +0x6231 # <CJK> +0x6234 # <CJK> +0x6236 # <CJK> +0x623E # <CJK> +0x623F # <CJK> +0x6240 # <CJK> +0x6241 # <CJK> +0x6247 # <CJK> +0x6248 # <CJK> +0x6249 # <CJK> +0x624B # <CJK> +0x624D # <CJK> +0x6253 # <CJK> +0x6258 # <CJK> +0x626E # <CJK> +0x6271 # <CJK> +0x6276 # <CJK> +0x6279 # <CJK> +0x627C # <CJK> +0x627F # <CJK> +0x6280 # <CJK> +0x6284 # <CJK> +0x6289 # <CJK> +0x628A # <CJK> +0x6291 # <CJK> +0x6292 # <CJK> +0x6295 # <CJK> +0x6297 # <CJK> +0x6298 # <CJK> +0x629B # <CJK> +0x62AB # <CJK> +0x62B1 # <CJK> +0x62B5 # <CJK> +0x62B9 # <CJK> +0x62BC # <CJK> +0x62BD # <CJK> +0x62C2 # <CJK> +0x62C7 # <CJK> +0x62C8 # <CJK> +0x62C9 # <CJK> +0x62CC # <CJK> +0x62CD # <CJK> +0x62CF # <CJK> +0x62D0 # <CJK> +0x62D2 # <CJK> +0x62D3 # <CJK> +0x62D4 # <CJK> +0x62D6 # <CJK> +0x62D7 # <CJK> +0x62D8 # <CJK> +0x62D9 # <CJK> +0x62DB # <CJK> +0x62DC # <CJK> +0x62EC # <CJK> +0x62ED # <CJK> +0x62EE # <CJK> +0x62EF # <CJK> +0x62F1 # <CJK> +0x62F3 # <CJK> +0x62F7 # <CJK> +0x62FE # <CJK> +0x62FF # <CJK> +0x6301 # <CJK> +0x6307 # <CJK> +0x6309 # <CJK> +0x6311 # <CJK> +0x632B # <CJK> +0x632F # <CJK> +0x633A # <CJK> +0x633B # <CJK> +0x633D # <CJK> +0x633E # <CJK> +0x6349 # <CJK> +0x634C # <CJK> +0x634F # <CJK> +0x6350 # <CJK> +0x6355 # <CJK> +0x6367 # <CJK> +0x6368 # <CJK> +0x636E # <CJK> +0x6372 # <CJK> +0x6377 # <CJK> +0x637A # <CJK> +0x637B # <CJK> +0x637F # <CJK> +0x6383 # <CJK> +0x6388 # <CJK> +0x6389 # <CJK> +0x638C # <CJK> +0x6392 # <CJK> +0x6396 # <CJK> +0x6398 # <CJK> +0x639B # <CJK> +0x63A0 # <CJK> +0x63A1 # <CJK> +0x63A2 # <CJK> +0x63A5 # <CJK> +0x63A7 # <CJK> +0x63A8 # <CJK> +0x63A9 # <CJK> +0x63AA # <CJK> +0x63C0 # <CJK> +0x63C4 # <CJK> +0x63C6 # <CJK> +0x63CF # <CJK> +0x63D0 # <CJK> +0x63D6 # <CJK> +0x63DA # <CJK> +0x63DB # <CJK> +0x63E1 # <CJK> +0x63ED # <CJK> +0x63EE # <CJK> +0x63F4 # <CJK> +0x63F6 # <CJK> +0x63F7 # <CJK> +0x640D # <CJK> +0x640F # <CJK> +0x6414 # <CJK> +0x6416 # <CJK> +0x6417 # <CJK> +0x641C # <CJK> +0x6422 # <CJK> +0x642C # <CJK> +0x642D # <CJK> +0x643A # <CJK> +0x643E # <CJK> +0x6458 # <CJK> +0x6460 # <CJK> +0x6469 # <CJK> +0x646F # <CJK> +0x6478 # <CJK> +0x6479 # <CJK> +0x647A # <CJK> +0x6488 # <CJK> +0x6491 # <CJK> +0x6492 # <CJK> +0x6493 # <CJK> +0x649A # <CJK> +0x649E # <CJK> +0x64A4 # <CJK> +0x64A5 # <CJK> +0x64AB # <CJK> +0x64AD # <CJK> +0x64AE # <CJK> +0x64B0 # <CJK> +0x64B2 # <CJK> +0x64BB # <CJK> +0x64C1 # <CJK> +0x64C4 # <CJK> +0x64C5 # <CJK> +0x64C7 # <CJK> +0x64CA # <CJK> +0x64CD # <CJK> +0x64CE # <CJK> +0x64D2 # <CJK> +0x64D4 # <CJK> +0x64D8 # <CJK> +0x64DA # <CJK> +0x64E1 # <CJK> +0x64E2 # <CJK> +0x64E5 # <CJK> +0x64E6 # <CJK> +0x64E7 # <CJK> +0x64EC # <CJK> +0x64F2 # <CJK> +0x64F4 # <CJK> +0x64FA # <CJK> +0x64FE # <CJK> +0x6500 # <CJK> +0x6504 # <CJK> +0x6518 # <CJK> +0x651D # <CJK> +0x6523 # <CJK> +0x652A # <CJK> +0x652B # <CJK> +0x652C # <CJK> +0x652F # <CJK> +0x6536 # <CJK> +0x6537 # <CJK> +0x6538 # <CJK> +0x6539 # <CJK> +0x653B # <CJK> +0x653E # <CJK> +0x653F # <CJK> +0x6545 # <CJK> +0x6548 # <CJK> +0x654D # <CJK> +0x654E # <CJK> +0x654F # <CJK> +0x6551 # <CJK> +0x6556 # <CJK> +0x6557 # <CJK> +0x655E # <CJK> +0x6562 # <CJK> +0x6563 # <CJK> +0x6566 # <CJK> +0x656C # <CJK> +0x656D # <CJK> +0x6572 # <CJK> +0x6574 # <CJK> +0x6575 # <CJK> +0x6577 # <CJK> +0x6578 # <CJK> +0x657E # <CJK> +0x6582 # <CJK> +0x6583 # <CJK> +0x6585 # <CJK> +0x6587 # <CJK> +0x658C # <CJK> +0x6590 # <CJK> +0x6591 # <CJK> +0x6597 # <CJK> +0x6599 # <CJK> +0x659B # <CJK> +0x659C # <CJK> +0x659F # <CJK> +0x65A1 # <CJK> +0x65A4 # <CJK> +0x65A5 # <CJK> +0x65A7 # <CJK> +0x65AB # <CJK> +0x65AC # <CJK> +0x65AF # <CJK> +0x65B0 # <CJK> +0x65B7 # <CJK> +0x65B9 # <CJK> +0x65BC # <CJK> +0x65BD # <CJK> +0x65C1 # <CJK> +0x65C5 # <CJK> +0x65CB # <CJK> +0x65CC # <CJK> +0x65CF # <CJK> +0x65D2 # <CJK> +0x65D7 # <CJK> +0x65E0 # <CJK> +0x65E3 # <CJK> +0x65E5 # <CJK> +0x65E6 # <CJK> +0x65E8 # <CJK> +0x65E9 # <CJK> +0x65EC # <CJK> +0x65ED # <CJK> +0x65F1 # <CJK> +0x65F4 # <CJK> +0x65FA # <CJK> +0x65FB # <CJK> +0x65FC # <CJK> +0x65FD # <CJK> +0x65FF # <CJK> +0x6606 # <CJK> +0x6607 # <CJK> +0x6609 # <CJK> +0x660A # <CJK> +0x660C # <CJK> +0x660E # <CJK> +0x660F # <CJK> +0x6610 # <CJK> +0x6611 # <CJK> +0x6613 # <CJK> +0x6614 # <CJK> +0x6615 # <CJK> +0x661E # <CJK> +0x661F # <CJK> +0x6620 # <CJK> +0x6625 # <CJK> +0x6627 # <CJK> +0x6628 # <CJK> +0x662D # <CJK> +0x662F # <CJK> +0x6630 # <CJK> +0x6631 # <CJK> +0x6634 # <CJK> +0x6636 # <CJK> +0x663A # <CJK> +0x663B # <CJK> +0x6641 # <CJK> +0x6642 # <CJK> +0x6643 # <CJK> +0x6644 # <CJK> +0x6649 # <CJK> +0x664B # <CJK> +0x664F # <CJK> +0x6659 # <CJK> +0x665B # <CJK> +0x665D # <CJK> +0x665E # <CJK> +0x665F # <CJK> +0x6664 # <CJK> +0x6665 # <CJK> +0x6666 # <CJK> +0x6667 # <CJK> +0x6668 # <CJK> +0x6669 # <CJK> +0x666B # <CJK> +0x666E # <CJK> +0x666F # <CJK> +0x6673 # <CJK> +0x6674 # <CJK> +0x6676 # <CJK> +0x6677 # <CJK> +0x6678 # <CJK> +0x667A # <CJK> +0x6684 # <CJK> +0x6687 # <CJK> +0x6688 # <CJK> +0x6689 # <CJK> +0x668E # <CJK> +0x6690 # <CJK> +0x6691 # <CJK> +0x6696 # <CJK> +0x6697 # <CJK> +0x6698 # <CJK> +0x669D # <CJK> +0x66A0 # <CJK> +0x66A2 # <CJK> +0x66AB # <CJK> +0x66AE # <CJK> +0x66B2 # <CJK> +0x66B3 # <CJK> +0x66B4 # <CJK> +0x66B9 # <CJK> +0x66BB # <CJK> +0x66BE # <CJK> +0x66C4 # <CJK> +0x66C6 # <CJK> +0x66C7 # <CJK> +0x66C9 # <CJK> +0x66D6 # <CJK> +0x66D9 # <CJK> +0x66DC # <CJK> +0x66DD # <CJK> +0x66E0 # <CJK> +0x66E6 # <CJK> +0x66F0 # <CJK> +0x66F2 # <CJK> +0x66F3 # <CJK> +0x66F4 # <CJK> +0x66F7 # <CJK> +0x66F8 # <CJK> +0x66F9 # <CJK> +0x66FA # <CJK> +0x66FC # <CJK> +0x66FE # <CJK> +0x66FF # <CJK> +0x6700 # <CJK> +0x6703 # <CJK> +0x6708 # <CJK> +0x6709 # <CJK> +0x670B # <CJK> +0x670D # <CJK> +0x6714 # <CJK> +0x6715 # <CJK> +0x6717 # <CJK> +0x671B # <CJK> +0x671D # <CJK> +0x671E # <CJK> +0x671F # <CJK> +0x6726 # <CJK> +0x6727 # <CJK> +0x6728 # <CJK> +0x672A # <CJK> +0x672B # <CJK> +0x672C # <CJK> +0x672D # <CJK> +0x672E # <CJK> +0x6731 # <CJK> +0x6734 # <CJK> +0x6736 # <CJK> +0x673A # <CJK> +0x673D # <CJK> +0x6746 # <CJK> +0x6749 # <CJK> +0x674E # <CJK> +0x674F # <CJK> +0x6750 # <CJK> +0x6751 # <CJK> +0x6753 # <CJK> +0x6756 # <CJK> +0x675C # <CJK> +0x675E # <CJK> +0x675F # <CJK> +0x676D # <CJK> +0x676F # <CJK> +0x6770 # <CJK> +0x6771 # <CJK> +0x6773 # <CJK> +0x6775 # <CJK> +0x6777 # <CJK> +0x677B # <CJK> +0x677E # <CJK> +0x677F # <CJK> +0x6787 # <CJK> +0x6789 # <CJK> +0x678B # <CJK> +0x678F # <CJK> +0x6790 # <CJK> +0x6793 # <CJK> +0x6795 # <CJK> +0x6797 # <CJK> +0x679A # <CJK> +0x679C # <CJK> +0x679D # <CJK> +0x67AF # <CJK> +0x67B0 # <CJK> +0x67B3 # <CJK> +0x67B6 # <CJK> +0x67B7 # <CJK> +0x67B8 # <CJK> +0x67BE # <CJK> +0x67C4 # <CJK> +0x67CF # <CJK> +0x67D0 # <CJK> +0x67D1 # <CJK> +0x67D2 # <CJK> +0x67D3 # <CJK> +0x67D4 # <CJK> +0x67DA # <CJK> +0x67DD # <CJK> +0x67E9 # <CJK> +0x67EC # <CJK> +0x67EF # <CJK> +0x67F0 # <CJK> +0x67F1 # <CJK> +0x67F3 # <CJK> +0x67F4 # <CJK> +0x67F5 # <CJK> +0x67F6 # <CJK> +0x67FB # <CJK> +0x67FE # <CJK> +0x6812 # <CJK> +0x6813 # <CJK> +0x6816 # <CJK> +0x6817 # <CJK> +0x6821 # <CJK> +0x6822 # <CJK> +0x682A # <CJK> +0x682F # <CJK> +0x6838 # <CJK> +0x6839 # <CJK> +0x683C # <CJK> +0x683D # <CJK> +0x6840 # <CJK> +0x6841 # <CJK> +0x6842 # <CJK> +0x6843 # <CJK> +0x6848 # <CJK> +0x684E # <CJK> +0x6850 # <CJK> +0x6851 # <CJK> +0x6853 # <CJK> +0x6854 # <CJK> +0x686D # <CJK> +0x6876 # <CJK> +0x687F # <CJK> +0x6881 # <CJK> +0x6885 # <CJK> +0x688F # <CJK> +0x6893 # <CJK> +0x6894 # <CJK> +0x6897 # <CJK> +0x689D # <CJK> +0x689F # <CJK> +0x68A1 # <CJK> +0x68A2 # <CJK> +0x68A7 # <CJK> +0x68A8 # <CJK> +0x68AD # <CJK> +0x68AF # <CJK> +0x68B0 # <CJK> +0x68B1 # <CJK> +0x68B3 # <CJK> +0x68B5 # <CJK> +0x68B6 # <CJK> +0x68C4 # <CJK> +0x68C5 # <CJK> +0x68C9 # <CJK> +0x68CB # <CJK> +0x68CD # <CJK> +0x68D2 # <CJK> +0x68D5 # <CJK> +0x68D7 # <CJK> +0x68D8 # <CJK> +0x68DA # <CJK> +0x68DF # <CJK> +0x68E0 # <CJK> +0x68E7 # <CJK> +0x68E8 # <CJK> +0x68EE # <CJK> +0x68F2 # <CJK> +0x68F9 # <CJK> +0x68FA # <CJK> +0x6900 # <CJK> +0x6905 # <CJK> +0x690D # <CJK> +0x690E # <CJK> +0x6912 # <CJK> +0x6927 # <CJK> +0x6930 # <CJK> +0x693D # <CJK> +0x693F # <CJK> +0x694A # <CJK> +0x6953 # <CJK> +0x6954 # <CJK> +0x6955 # <CJK> +0x6957 # <CJK> +0x6959 # <CJK> +0x695A # <CJK> +0x695E # <CJK> +0x6960 # <CJK> +0x6961 # <CJK> +0x6962 # <CJK> +0x6963 # <CJK> +0x6968 # <CJK> +0x696B # <CJK> +0x696D # <CJK> +0x696E # <CJK> +0x696F # <CJK> +0x6975 # <CJK> +0x6977 # <CJK> +0x6978 # <CJK> +0x6979 # <CJK> +0x6995 # <CJK> +0x699B # <CJK> +0x699C # <CJK> +0x69A5 # <CJK> +0x69A7 # <CJK> +0x69AE # <CJK> +0x69B4 # <CJK> +0x69BB # <CJK> +0x69C1 # <CJK> +0x69C3 # <CJK> +0x69CB # <CJK> +0x69CC # <CJK> +0x69CD # <CJK> +0x69D0 # <CJK> +0x69E8 # <CJK> +0x69EA # <CJK> +0x69FB # <CJK> +0x69FD # <CJK> +0x69FF # <CJK> +0x6A02 # <CJK> +0x6A0A # <CJK> +0x6A11 # <CJK> +0x6A13 # <CJK> +0x6A17 # <CJK> +0x6A19 # <CJK> +0x6A1E # <CJK> +0x6A1F # <CJK> +0x6A21 # <CJK> +0x6A23 # <CJK> +0x6A35 # <CJK> +0x6A38 # <CJK> +0x6A39 # <CJK> +0x6A3A # <CJK> +0x6A3D # <CJK> +0x6A44 # <CJK> +0x6A48 # <CJK> +0x6A4B # <CJK> +0x6A52 # <CJK> +0x6A53 # <CJK> +0x6A58 # <CJK> +0x6A59 # <CJK> +0x6A5F # <CJK> +0x6A61 # <CJK> +0x6A6B # <CJK> +0x6A80 # <CJK> +0x6A84 # <CJK> +0x6A89 # <CJK> +0x6A8D # <CJK> +0x6A8E # <CJK> +0x6A97 # <CJK> +0x6A9C # <CJK> +0x6AA2 # <CJK> +0x6AA3 # <CJK> +0x6AB3 # <CJK> +0x6ABB # <CJK> +0x6AC2 # <CJK> +0x6AC3 # <CJK> +0x6AD3 # <CJK> +0x6ADA # <CJK> +0x6ADB # <CJK> +0x6AF6 # <CJK> +0x6AFB # <CJK> +0x6B04 # <CJK> +0x6B0A # <CJK> +0x6B0C # <CJK> +0x6B12 # <CJK> +0x6B16 # <CJK> +0x6B20 # <CJK> +0x6B21 # <CJK> +0x6B23 # <CJK> +0x6B32 # <CJK> +0x6B3A # <CJK> +0x6B3D # <CJK> +0x6B3E # <CJK> +0x6B46 # <CJK> +0x6B47 # <CJK> +0x6B4C # <CJK> +0x6B4E # <CJK> +0x6B50 # <CJK> +0x6B5F # <CJK> +0x6B61 # <CJK> +0x6B62 # <CJK> +0x6B63 # <CJK> +0x6B64 # <CJK> +0x6B65 # <CJK> +0x6B66 # <CJK> +0x6B6A # <CJK> +0x6B72 # <CJK> +0x6B77 # <CJK> +0x6B78 # <CJK> +0x6B7B # <CJK> +0x6B7F # <CJK> +0x6B83 # <CJK> +0x6B84 # <CJK> +0x6B86 # <CJK> +0x6B89 # <CJK> +0x6B8A # <CJK> +0x6B96 # <CJK> +0x6B98 # <CJK> +0x6B9E # <CJK> +0x6BAE # <CJK> +0x6BAF # <CJK> +0x6BB2 # <CJK> +0x6BB5 # <CJK> +0x6BB7 # <CJK> +0x6BBA # <CJK> +0x6BBC # <CJK> +0x6BBF # <CJK> +0x6BC1 # <CJK> +0x6BC5 # <CJK> +0x6BC6 # <CJK> +0x6BCB # <CJK> +0x6BCD # <CJK> +0x6BCF # <CJK> +0x6BD2 # <CJK> +0x6BD3 # <CJK> +0x6BD4 # <CJK> +0x6BD6 # <CJK> +0x6BD7 # <CJK> +0x6BD8 # <CJK> +0x6BDB # <CJK> +0x6BEB # <CJK> +0x6BEC # <CJK> +0x6C08 # <CJK> +0x6C0F # <CJK> +0x6C11 # <CJK> +0x6C13 # <CJK> +0x6C23 # <CJK> +0x6C34 # <CJK> +0x6C37 # <CJK> +0x6C38 # <CJK> +0x6C3E # <CJK> +0x6C40 # <CJK> +0x6C41 # <CJK> +0x6C42 # <CJK> +0x6C4E # <CJK> +0x6C50 # <CJK> +0x6C55 # <CJK> +0x6C57 # <CJK> +0x6C5A # <CJK> +0x6C5D # <CJK> +0x6C5E # <CJK> +0x6C5F # <CJK> +0x6C60 # <CJK> +0x6C68 # <CJK> +0x6C6A # <CJK> +0x6C6D # <CJK> +0x6C70 # <CJK> +0x6C72 # <CJK> +0x6C76 # <CJK> +0x6C7A # <CJK> +0x6C7D # <CJK> +0x6C7E # <CJK> +0x6C81 # <CJK> +0x6C82 # <CJK> +0x6C83 # <CJK> +0x6C85 # <CJK> +0x6C86 # <CJK> +0x6C87 # <CJK> +0x6C88 # <CJK> +0x6C8C # <CJK> +0x6C90 # <CJK> +0x6C92 # <CJK> +0x6C93 # <CJK> +0x6C94 # <CJK> +0x6C95 # <CJK> +0x6C96 # <CJK> +0x6C99 # <CJK> +0x6C9A # <CJK> +0x6C9B # <CJK> +0x6CAB # <CJK> +0x6CAE # <CJK> +0x6CB3 # <CJK> +0x6CB8 # <CJK> +0x6CB9 # <CJK> +0x6CBB # <CJK> +0x6CBC # <CJK> +0x6CBD # <CJK> +0x6CBE # <CJK> +0x6CBF # <CJK> +0x6CC1 # <CJK> +0x6CC2 # <CJK> +0x6CC4 # <CJK> +0x6CC9 # <CJK> +0x6CCA # <CJK> +0x6CCC # <CJK> +0x6CD3 # <CJK> +0x6CD5 # <CJK> +0x6CD7 # <CJK> +0x6CDB # <CJK> +0x6CE1 # <CJK> +0x6CE2 # <CJK> +0x6CE3 # <CJK> +0x6CE5 # <CJK> +0x6CE8 # <CJK> +0x6CEB # <CJK> +0x6CEE # <CJK> +0x6CEF # <CJK> +0x6CF0 # <CJK> +0x6CF3 # <CJK> +0x6D0B # <CJK> +0x6D0C # <CJK> +0x6D11 # <CJK> +0x6D17 # <CJK> +0x6D19 # <CJK> +0x6D1B # <CJK> +0x6D1E # <CJK> +0x6D25 # <CJK> +0x6D27 # <CJK> +0x6D29 # <CJK> +0x6D2A # <CJK> +0x6D32 # <CJK> +0x6D35 # <CJK> +0x6D36 # <CJK> +0x6D38 # <CJK> +0x6D39 # <CJK> +0x6D3B # <CJK> +0x6D3D # <CJK> +0x6D3E # <CJK> +0x6D41 # <CJK> +0x6D59 # <CJK> +0x6D5A # <CJK> +0x6D5C # <CJK> +0x6D63 # <CJK> +0x6D66 # <CJK> +0x6D69 # <CJK> +0x6D6A # <CJK> +0x6D6C # <CJK> +0x6D6E # <CJK> +0x6D74 # <CJK> +0x6D77 # <CJK> +0x6D78 # <CJK> +0x6D79 # <CJK> +0x6D7F # <CJK> +0x6D85 # <CJK> +0x6D87 # <CJK> +0x6D88 # <CJK> +0x6D89 # <CJK> +0x6D8C # <CJK> +0x6D8D # <CJK> +0x6D8E # <CJK> +0x6D91 # <CJK> +0x6D93 # <CJK> +0x6D95 # <CJK> +0x6DAF # <CJK> +0x6DB2 # <CJK> +0x6DB5 # <CJK> +0x6DC0 # <CJK> +0x6DC3 # <CJK> +0x6DC4 # <CJK> +0x6DC5 # <CJK> +0x6DC6 # <CJK> +0x6DC7 # <CJK> +0x6DCB # <CJK> +0x6DCF # <CJK> +0x6DD1 # <CJK> +0x6DD8 # <CJK> +0x6DD9 # <CJK> +0x6DDA # <CJK> +0x6DDE # <CJK> +0x6DE1 # <CJK> +0x6DE8 # <CJK> +0x6DEA # <CJK> +0x6DEB # <CJK> +0x6DEE # <CJK> +0x6DF1 # <CJK> +0x6DF3 # <CJK> +0x6DF5 # <CJK> +0x6DF7 # <CJK> +0x6DF8 # <CJK> +0x6DF9 # <CJK> +0x6DFA # <CJK> +0x6DFB # <CJK> +0x6E17 # <CJK> +0x6E19 # <CJK> +0x6E1A # <CJK> +0x6E1B # <CJK> +0x6E1F # <CJK> +0x6E20 # <CJK> +0x6E21 # <CJK> +0x6E23 # <CJK> +0x6E24 # <CJK> +0x6E25 # <CJK> +0x6E26 # <CJK> +0x6E2B # <CJK> +0x6E2C # <CJK> +0x6E2D # <CJK> +0x6E2F # <CJK> +0x6E32 # <CJK> +0x6E34 # <CJK> +0x6E36 # <CJK> +0x6E38 # <CJK> +0x6E3A # <CJK> +0x6E3C # <CJK> +0x6E3D # <CJK> +0x6E3E # <CJK> +0x6E43 # <CJK> +0x6E44 # <CJK> +0x6E4A # <CJK> +0x6E4D # <CJK> +0x6E56 # <CJK> +0x6E58 # <CJK> +0x6E5B # <CJK> +0x6E5C # <CJK> +0x6E5E # <CJK> +0x6E5F # <CJK> +0x6E67 # <CJK> +0x6E6B # <CJK> +0x6E6E # <CJK> +0x6E6F # <CJK> +0x6E72 # <CJK> +0x6E73 # <CJK> +0x6E7A # <CJK> +0x6E90 # <CJK> +0x6E96 # <CJK> +0x6E9C # <CJK> +0x6E9D # <CJK> +0x6E9F # <CJK> +0x6EA2 # <CJK> +0x6EA5 # <CJK> +0x6EAA # <CJK> +0x6EAB # <CJK> +0x6EAF # <CJK> +0x6EB1 # <CJK> +0x6EB6 # <CJK> +0x6EBA # <CJK> +0x6EC2 # <CJK> +0x6EC4 # <CJK> +0x6EC5 # <CJK> +0x6EC9 # <CJK> +0x6ECB # <CJK> +0x6ECC # <CJK> +0x6ECE # <CJK> +0x6ED1 # <CJK> +0x6ED3 # <CJK> +0x6ED4 # <CJK> +0x6EEF # <CJK> +0x6EF4 # <CJK> +0x6EF8 # <CJK> +0x6EFE # <CJK> +0x6EFF # <CJK> +0x6F01 # <CJK> +0x6F02 # <CJK> +0x6F06 # <CJK> +0x6F0F # <CJK> +0x6F11 # <CJK> +0x6F14 # <CJK> +0x6F15 # <CJK> +0x6F20 # <CJK> +0x6F22 # <CJK> +0x6F23 # <CJK> +0x6F2B # <CJK> +0x6F2C # <CJK> +0x6F31 # <CJK> +0x6F32 # <CJK> +0x6F38 # <CJK> +0x6F3F # <CJK> +0x6F41 # <CJK> +0x6F51 # <CJK> +0x6F54 # <CJK> +0x6F57 # <CJK> +0x6F58 # <CJK> +0x6F5A # <CJK> +0x6F5B # <CJK> +0x6F5E # <CJK> +0x6F5F # <CJK> +0x6F62 # <CJK> +0x6F64 # <CJK> +0x6F6D # <CJK> +0x6F6E # <CJK> +0x6F70 # <CJK> +0x6F7A # <CJK> +0x6F7C # <CJK> +0x6F7D # <CJK> +0x6F7E # <CJK> +0x6F81 # <CJK> +0x6F84 # <CJK> +0x6F88 # <CJK> +0x6F8D # <CJK> +0x6F8E # <CJK> +0x6F90 # <CJK> +0x6F94 # <CJK> +0x6F97 # <CJK> +0x6FA3 # <CJK> +0x6FA4 # <CJK> +0x6FA7 # <CJK> +0x6FAE # <CJK> +0x6FAF # <CJK> +0x6FB1 # <CJK> +0x6FB3 # <CJK> +0x6FB9 # <CJK> +0x6FBE # <CJK> +0x6FC0 # <CJK> +0x6FC1 # <CJK> +0x6FC2 # <CJK> +0x6FC3 # <CJK> +0x6FCA # <CJK> +0x6FD5 # <CJK> +0x6FDA # <CJK> +0x6FDF # <CJK> +0x6FE0 # <CJK> +0x6FE1 # <CJK> +0x6FE4 # <CJK> +0x6FE9 # <CJK> +0x6FEB # <CJK> +0x6FEC # <CJK> +0x6FEF # <CJK> +0x6FF1 # <CJK> +0x6FFE # <CJK> +0x7001 # <CJK> +0x7005 # <CJK> +0x7006 # <CJK> +0x7009 # <CJK> +0x700B # <CJK> +0x700F # <CJK> +0x7011 # <CJK> +0x7015 # <CJK> +0x7018 # <CJK> +0x701A # <CJK> +0x701B # <CJK> +0x701C # <CJK> +0x701D # <CJK> +0x701E # <CJK> +0x701F # <CJK> +0x7023 # <CJK> +0x7027 # <CJK> +0x7028 # <CJK> +0x702F # <CJK> +0x7037 # <CJK> +0x703E # <CJK> +0x704C # <CJK> +0x7050 # <CJK> +0x7051 # <CJK> +0x7058 # <CJK> +0x705D # <CJK> +0x7063 # <CJK> +0x706B # <CJK> +0x7070 # <CJK> +0x7078 # <CJK> +0x707C # <CJK> +0x707D # <CJK> +0x7085 # <CJK> +0x708A # <CJK> +0x708E # <CJK> +0x7092 # <CJK> +0x7098 # <CJK> +0x7099 # <CJK> +0x709A # <CJK> +0x70A1 # <CJK> +0x70A4 # <CJK> +0x70AB # <CJK> +0x70AC # <CJK> +0x70AD # <CJK> +0x70AF # <CJK> +0x70B3 # <CJK> +0x70B7 # <CJK> +0x70B8 # <CJK> +0x70B9 # <CJK> +0x70C8 # <CJK> +0x70CB # <CJK> +0x70CF # <CJK> +0x70D8 # <CJK> +0x70D9 # <CJK> +0x70DD # <CJK> +0x70DF # <CJK> +0x70F1 # <CJK> +0x70F9 # <CJK> +0x70FD # <CJK> +0x7104 # <CJK> +0x7109 # <CJK> +0x710C # <CJK> +0x7119 # <CJK> +0x711A # <CJK> +0x711E # <CJK> +0x7121 # <CJK> +0x7126 # <CJK> +0x7130 # <CJK> +0x7136 # <CJK> +0x7147 # <CJK> +0x7149 # <CJK> +0x714A # <CJK> +0x714C # <CJK> +0x714E # <CJK> +0x7150 # <CJK> +0x7156 # <CJK> +0x7159 # <CJK> +0x715C # <CJK> +0x715E # <CJK> +0x7164 # <CJK> +0x7165 # <CJK> +0x7166 # <CJK> +0x7167 # <CJK> +0x7169 # <CJK> +0x716C # <CJK> +0x716E # <CJK> +0x717D # <CJK> +0x7184 # <CJK> +0x7189 # <CJK> +0x718A # <CJK> +0x718F # <CJK> +0x7192 # <CJK> +0x7194 # <CJK> +0x7199 # <CJK> +0x719F # <CJK> +0x71A2 # <CJK> +0x71AC # <CJK> +0x71B1 # <CJK> +0x71B9 # <CJK> +0x71BA # <CJK> +0x71BE # <CJK> +0x71C1 # <CJK> +0x71C3 # <CJK> +0x71C8 # <CJK> +0x71C9 # <CJK> +0x71CE # <CJK> +0x71D0 # <CJK> +0x71D2 # <CJK> +0x71D4 # <CJK> +0x71D5 # <CJK> +0x71DF # <CJK> +0x71E5 # <CJK> +0x71E6 # <CJK> +0x71E7 # <CJK> +0x71ED # <CJK> +0x71EE # <CJK> +0x71FB # <CJK> +0x71FC # <CJK> +0x71FE # <CJK> +0x71FF # <CJK> +0x7200 # <CJK> +0x7206 # <CJK> +0x7210 # <CJK> +0x721B # <CJK> +0x722A # <CJK> +0x722C # <CJK> +0x722D # <CJK> +0x7230 # <CJK> +0x7232 # <CJK> +0x7235 # <CJK> +0x7236 # <CJK> +0x723A # <CJK> +0x723B # <CJK> +0x723D # <CJK> +0x723E # <CJK> +0x7240 # <CJK> +0x7246 # <CJK> +0x7247 # <CJK> +0x7248 # <CJK> +0x724C # <CJK> +0x7252 # <CJK> +0x7258 # <CJK> +0x7259 # <CJK> +0x725B # <CJK> +0x725D # <CJK> +0x725F # <CJK> +0x7261 # <CJK> +0x7262 # <CJK> +0x7267 # <CJK> +0x7269 # <CJK> +0x7272 # <CJK> +0x7279 # <CJK> +0x727D # <CJK> +0x7280 # <CJK> +0x7281 # <CJK> +0x72A2 # <CJK> +0x72A7 # <CJK> +0x72AC # <CJK> +0x72AF # <CJK> +0x72C0 # <CJK> +0x72C2 # <CJK> +0x72C4 # <CJK> +0x72CE # <CJK> +0x72D0 # <CJK> +0x72D7 # <CJK> +0x72D9 # <CJK> +0x72E1 # <CJK> +0x72E9 # <CJK> +0x72F8 # <CJK> +0x72F9 # <CJK> +0x72FC # <CJK> +0x72FD # <CJK> +0x730A # <CJK> +0x7316 # <CJK> +0x731B # <CJK> +0x731C # <CJK> +0x731D # <CJK> +0x7325 # <CJK> +0x7329 # <CJK> +0x732A # <CJK> +0x732B # <CJK> +0x7336 # <CJK> +0x7337 # <CJK> +0x733E # <CJK> +0x733F # <CJK> +0x7344 # <CJK> +0x7345 # <CJK> +0x7350 # <CJK> +0x7352 # <CJK> +0x7357 # <CJK> +0x7368 # <CJK> +0x736A # <CJK> +0x7370 # <CJK> +0x7372 # <CJK> +0x7375 # <CJK> +0x7378 # <CJK> +0x737A # <CJK> +0x737B # <CJK> +0x7384 # <CJK> +0x7386 # <CJK> +0x7387 # <CJK> +0x7389 # <CJK> +0x738B # <CJK> +0x738E # <CJK> +0x7394 # <CJK> +0x7396 # <CJK> +0x7397 # <CJK> +0x7398 # <CJK> +0x739F # <CJK> +0x73A7 # <CJK> +0x73A9 # <CJK> +0x73AD # <CJK> +0x73B2 # <CJK> +0x73B3 # <CJK> +0x73B9 # <CJK> +0x73C0 # <CJK> +0x73C2 # <CJK> +0x73C9 # <CJK> +0x73CA # <CJK> +0x73CC # <CJK> +0x73CD # <CJK> +0x73CF # <CJK> +0x73D6 # <CJK> +0x73D9 # <CJK> +0x73DD # <CJK> +0x73DE # <CJK> +0x73E0 # <CJK> +0x73E3 # <CJK> +0x73E4 # <CJK> +0x73E5 # <CJK> +0x73E6 # <CJK> +0x73E9 # <CJK> +0x73EA # <CJK> +0x73ED # <CJK> +0x73F7 # <CJK> +0x73F9 # <CJK> +0x73FD # <CJK> +0x73FE # <CJK> +0x7401 # <CJK> +0x7403 # <CJK> +0x7405 # <CJK> +0x7406 # <CJK> +0x7407 # <CJK> +0x7409 # <CJK> +0x7413 # <CJK> +0x741B # <CJK> +0x7420 # <CJK> +0x7421 # <CJK> +0x7422 # <CJK> +0x7425 # <CJK> +0x7426 # <CJK> +0x7428 # <CJK> +0x742A # <CJK> +0x742B # <CJK> +0x742C # <CJK> +0x742E # <CJK> +0x742F # <CJK> +0x7430 # <CJK> +0x7433 # <CJK> +0x7434 # <CJK> +0x7435 # <CJK> +0x7436 # <CJK> +0x7438 # <CJK> +0x743A # <CJK> +0x743F # <CJK> +0x7440 # <CJK> +0x7441 # <CJK> +0x7443 # <CJK> +0x7444 # <CJK> +0x744B # <CJK> +0x7455 # <CJK> +0x7457 # <CJK> +0x7459 # <CJK> +0x745A # <CJK> +0x745B # <CJK> +0x745C # <CJK> +0x745E # <CJK> +0x745F # <CJK> +0x7460 # <CJK> +0x7462 # <CJK> +0x7464 # <CJK> +0x7465 # <CJK> +0x7468 # <CJK> +0x7469 # <CJK> +0x746A # <CJK> +0x746F # <CJK> +0x747E # <CJK> +0x7482 # <CJK> +0x7483 # <CJK> +0x7487 # <CJK> +0x7489 # <CJK> +0x748B # <CJK> +0x7498 # <CJK> +0x749C # <CJK> +0x749E # <CJK> +0x749F # <CJK> +0x74A1 # <CJK> +0x74A3 # <CJK> +0x74A5 # <CJK> +0x74A7 # <CJK> +0x74A8 # <CJK> +0x74AA # <CJK> +0x74B0 # <CJK> +0x74B2 # <CJK> +0x74B5 # <CJK> +0x74B9 # <CJK> +0x74BD # <CJK> +0x74BF # <CJK> +0x74C6 # <CJK> +0x74CA # <CJK> +0x74CF # <CJK> +0x74D4 # <CJK> +0x74D8 # <CJK> +0x74DA # <CJK> +0x74DC # <CJK> +0x74E0 # <CJK> +0x74E2 # <CJK> +0x74E3 # <CJK> +0x74E6 # <CJK> +0x74EE # <CJK> +0x74F7 # <CJK> +0x7501 # <CJK> +0x7504 # <CJK> +0x7511 # <CJK> +0x7515 # <CJK> +0x7518 # <CJK> +0x751A # <CJK> +0x751B # <CJK> +0x751F # <CJK> +0x7523 # <CJK> +0x7525 # <CJK> +0x7526 # <CJK> +0x7528 # <CJK> +0x752B # <CJK> +0x752C # <CJK> +0x7530 # <CJK> +0x7531 # <CJK> +0x7532 # <CJK> +0x7533 # <CJK> +0x7537 # <CJK> +0x7538 # <CJK> +0x753A # <CJK> +0x7547 # <CJK> +0x754C # <CJK> +0x754F # <CJK> +0x7551 # <CJK> +0x7553 # <CJK> +0x7554 # <CJK> +0x7559 # <CJK> +0x755B # <CJK> +0x755C # <CJK> +0x755D # <CJK> +0x7562 # <CJK> +0x7565 # <CJK> +0x7566 # <CJK> +0x756A # <CJK> +0x756F # <CJK> +0x7570 # <CJK> +0x7575 # <CJK> +0x7576 # <CJK> +0x7578 # <CJK> +0x757A # <CJK> +0x757F # <CJK> +0x7586 # <CJK> +0x7587 # <CJK> +0x758A # <CJK> +0x758B # <CJK> +0x758E # <CJK> +0x758F # <CJK> +0x7591 # <CJK> +0x759D # <CJK> +0x75A5 # <CJK> +0x75AB # <CJK> +0x75B1 # <CJK> +0x75B2 # <CJK> +0x75B3 # <CJK> +0x75B5 # <CJK> +0x75B8 # <CJK> +0x75B9 # <CJK> +0x75BC # <CJK> +0x75BD # <CJK> +0x75BE # <CJK> +0x75C2 # <CJK> +0x75C5 # <CJK> +0x75C7 # <CJK> +0x75CD # <CJK> +0x75D2 # <CJK> +0x75D4 # <CJK> +0x75D5 # <CJK> +0x75D8 # <CJK> +0x75D9 # <CJK> +0x75DB # <CJK> +0x75E2 # <CJK> +0x75F0 # <CJK> +0x75F2 # <CJK> +0x75F4 # <CJK> +0x75FA # <CJK> +0x75FC # <CJK> +0x7600 # <CJK> +0x760D # <CJK> +0x7619 # <CJK> +0x761F # <CJK> +0x7620 # <CJK> +0x7621 # <CJK> +0x7622 # <CJK> +0x7624 # <CJK> +0x7626 # <CJK> +0x763B # <CJK> +0x7642 # <CJK> +0x764C # <CJK> +0x764E # <CJK> +0x7652 # <CJK> +0x7656 # <CJK> +0x7661 # <CJK> +0x7664 # <CJK> +0x7669 # <CJK> +0x766C # <CJK> +0x7670 # <CJK> +0x7672 # <CJK> +0x7678 # <CJK> +0x767B # <CJK> +0x767C # <CJK> +0x767D # <CJK> +0x767E # <CJK> +0x7684 # <CJK> +0x7686 # <CJK> +0x7687 # <CJK> +0x768E # <CJK> +0x7690 # <CJK> +0x7693 # <CJK> +0x76AE # <CJK> +0x76BA # <CJK> +0x76BF # <CJK> +0x76C2 # <CJK> +0x76C3 # <CJK> +0x76C6 # <CJK> +0x76C8 # <CJK> +0x76CA # <CJK> +0x76D2 # <CJK> +0x76D6 # <CJK> +0x76DB # <CJK> +0x76DC # <CJK> +0x76DE # <CJK> +0x76DF # <CJK> +0x76E1 # <CJK> +0x76E3 # <CJK> +0x76E4 # <CJK> +0x76E7 # <CJK> +0x76EE # <CJK> +0x76F2 # <CJK> +0x76F4 # <CJK> +0x76F8 # <CJK> +0x76FC # <CJK> +0x76FE # <CJK> +0x7701 # <CJK> +0x7704 # <CJK> +0x7708 # <CJK> +0x7709 # <CJK> +0x770B # <CJK> +0x771E # <CJK> +0x7720 # <CJK> +0x7729 # <CJK> +0x7737 # <CJK> +0x7738 # <CJK> +0x773A # <CJK> +0x773C # <CJK> +0x7740 # <CJK> +0x774D # <CJK> +0x775B # <CJK> +0x7761 # <CJK> +0x7763 # <CJK> +0x7766 # <CJK> +0x776B # <CJK> +0x7779 # <CJK> +0x777E # <CJK> +0x777F # <CJK> +0x778B # <CJK> +0x7791 # <CJK> +0x779E # <CJK> +0x77A5 # <CJK> +0x77AC # <CJK> +0x77AD # <CJK> +0x77B0 # <CJK> +0x77B3 # <CJK> +0x77BB # <CJK> +0x77BC # <CJK> +0x77BF # <CJK> +0x77D7 # <CJK> +0x77DB # <CJK> +0x77DC # <CJK> +0x77E2 # <CJK> +0x77E3 # <CJK> +0x77E5 # <CJK> +0x77E9 # <CJK> +0x77ED # <CJK> +0x77EE # <CJK> +0x77EF # <CJK> +0x77F3 # <CJK> +0x7802 # <CJK> +0x7812 # <CJK> +0x7825 # <CJK> +0x7826 # <CJK> +0x7827 # <CJK> +0x782C # <CJK> +0x7832 # <CJK> +0x7834 # <CJK> +0x7845 # <CJK> +0x784F # <CJK> +0x785D # <CJK> +0x786B # <CJK> +0x786C # <CJK> +0x786F # <CJK> +0x787C # <CJK> +0x7881 # <CJK> +0x7887 # <CJK> +0x788C # <CJK> +0x788D # <CJK> +0x788E # <CJK> +0x7891 # <CJK> +0x7897 # <CJK> +0x78A3 # <CJK> +0x78A7 # <CJK> +0x78A9 # <CJK> +0x78BA # <CJK> +0x78BB # <CJK> +0x78BC # <CJK> +0x78C1 # <CJK> +0x78C5 # <CJK> +0x78CA # <CJK> +0x78CB # <CJK> +0x78CE # <CJK> +0x78D0 # <CJK> +0x78E8 # <CJK> +0x78EC # <CJK> +0x78EF # <CJK> +0x78F5 # <CJK> +0x78FB # <CJK> +0x7901 # <CJK> +0x790E # <CJK> +0x7916 # <CJK> +0x792A # <CJK> +0x792B # <CJK> +0x792C # <CJK> +0x793A # <CJK> +0x793E # <CJK> +0x7940 # <CJK> +0x7941 # <CJK> +0x7947 # <CJK> +0x7948 # <CJK> +0x7949 # <CJK> +0x7950 # <CJK> +0x7956 # <CJK> +0x7957 # <CJK> +0x795A # <CJK> +0x795B # <CJK> +0x795C # <CJK> +0x795D # <CJK> +0x795E # <CJK> +0x7960 # <CJK> +0x7965 # <CJK> +0x7968 # <CJK> +0x796D # <CJK> +0x797A # <CJK> +0x797F # <CJK> +0x7981 # <CJK> +0x798D # <CJK> +0x798E # <CJK> +0x798F # <CJK> +0x7991 # <CJK> +0x79A6 # <CJK> +0x79A7 # <CJK> +0x79AA # <CJK> +0x79AE # <CJK> +0x79B1 # <CJK> +0x79B3 # <CJK> +0x79B9 # <CJK> +0x79BD # <CJK> +0x79BE # <CJK> +0x79BF # <CJK> +0x79C0 # <CJK> +0x79C1 # <CJK> +0x79C9 # <CJK> +0x79CA # <CJK> +0x79CB # <CJK> +0x79D1 # <CJK> +0x79D2 # <CJK> +0x79D5 # <CJK> +0x79D8 # <CJK> +0x79DF # <CJK> +0x79E4 # <CJK> +0x79E6 # <CJK> +0x79E7 # <CJK> +0x79E9 # <CJK> +0x79FB # <CJK> +0x7A00 # <CJK> +0x7A05 # <CJK> +0x7A08 # <CJK> +0x7A0B # <CJK> +0x7A0D # <CJK> +0x7A14 # <CJK> +0x7A17 # <CJK> +0x7A19 # <CJK> +0x7A1A # <CJK> +0x7A1C # <CJK> +0x7A1F # <CJK> +0x7A20 # <CJK> +0x7A2E # <CJK> +0x7A31 # <CJK> +0x7A36 # <CJK> +0x7A37 # <CJK> +0x7A3B # <CJK> +0x7A3C # <CJK> +0x7A3D # <CJK> +0x7A3F # <CJK> +0x7A40 # <CJK> +0x7A46 # <CJK> +0x7A49 # <CJK> +0x7A4D # <CJK> +0x7A4E # <CJK> +0x7A57 # <CJK> +0x7A61 # <CJK> +0x7A62 # <CJK> +0x7A69 # <CJK> +0x7A6B # <CJK> +0x7A70 # <CJK> +0x7A74 # <CJK> +0x7A76 # <CJK> +0x7A79 # <CJK> +0x7A7A # <CJK> +0x7A7D # <CJK> +0x7A7F # <CJK> +0x7A81 # <CJK> +0x7A84 # <CJK> +0x7A88 # <CJK> +0x7A92 # <CJK> +0x7A93 # <CJK> +0x7A95 # <CJK> +0x7A98 # <CJK> +0x7A9F # <CJK> +0x7AA9 # <CJK> +0x7AAA # <CJK> +0x7AAE # <CJK> +0x7AAF # <CJK> +0x7ABA # <CJK> +0x7AC4 # <CJK> +0x7AC5 # <CJK> +0x7AC7 # <CJK> +0x7ACA # <CJK> +0x7ACB # <CJK> +0x7AD7 # <CJK> +0x7AD9 # <CJK> +0x7ADD # <CJK> +0x7ADF # <CJK> +0x7AE0 # <CJK> +0x7AE3 # <CJK> +0x7AE5 # <CJK> +0x7AEA # <CJK> +0x7AED # <CJK> +0x7AEF # <CJK> +0x7AF6 # <CJK> +0x7AF9 # <CJK> +0x7AFA # <CJK> +0x7AFF # <CJK> +0x7B0F # <CJK> +0x7B11 # <CJK> +0x7B19 # <CJK> +0x7B1B # <CJK> +0x7B1E # <CJK> +0x7B20 # <CJK> +0x7B26 # <CJK> +0x7B2C # <CJK> +0x7B2D # <CJK> +0x7B39 # <CJK> +0x7B46 # <CJK> +0x7B49 # <CJK> +0x7B4B # <CJK> +0x7B4C # <CJK> +0x7B4D # <CJK> +0x7B4F # <CJK> +0x7B50 # <CJK> +0x7B51 # <CJK> +0x7B52 # <CJK> +0x7B54 # <CJK> +0x7B56 # <CJK> +0x7B60 # <CJK> +0x7B6C # <CJK> +0x7B6E # <CJK> +0x7B75 # <CJK> +0x7B7D # <CJK> +0x7B87 # <CJK> +0x7B8B # <CJK> +0x7B8F # <CJK> +0x7B94 # <CJK> +0x7B95 # <CJK> +0x7B97 # <CJK> +0x7B9A # <CJK> +0x7B9D # <CJK> +0x7BA1 # <CJK> +0x7BAD # <CJK> +0x7BB1 # <CJK> +0x7BB4 # <CJK> +0x7BB8 # <CJK> +0x7BC0 # <CJK> +0x7BC1 # <CJK> +0x7BC4 # <CJK> +0x7BC6 # <CJK> +0x7BC7 # <CJK> +0x7BC9 # <CJK> +0x7BD2 # <CJK> +0x7BE0 # <CJK> +0x7BE4 # <CJK> +0x7BE9 # <CJK> +0x7C07 # <CJK> +0x7C12 # <CJK> +0x7C1E # <CJK> +0x7C21 # <CJK> +0x7C27 # <CJK> +0x7C2A # <CJK> +0x7C2B # <CJK> +0x7C3D # <CJK> +0x7C3E # <CJK> +0x7C3F # <CJK> +0x7C43 # <CJK> +0x7C4C # <CJK> +0x7C4D # <CJK> +0x7C60 # <CJK> +0x7C64 # <CJK> +0x7C6C # <CJK> +0x7C73 # <CJK> +0x7C83 # <CJK> +0x7C89 # <CJK> +0x7C92 # <CJK> +0x7C95 # <CJK> +0x7C97 # <CJK> +0x7C98 # <CJK> +0x7C9F # <CJK> +0x7CA5 # <CJK> +0x7CA7 # <CJK> +0x7CAE # <CJK> +0x7CB1 # <CJK> +0x7CB2 # <CJK> +0x7CB3 # <CJK> +0x7CB9 # <CJK> +0x7CBE # <CJK> +0x7CCA # <CJK> +0x7CD6 # <CJK> +0x7CDE # <CJK> +0x7CDF # <CJK> +0x7CE0 # <CJK> +0x7CE7 # <CJK> +0x7CFB # <CJK> +0x7CFE # <CJK> +0x7D00 # <CJK> +0x7D02 # <CJK> +0x7D04 # <CJK> +0x7D05 # <CJK> +0x7D06 # <CJK> +0x7D07 # <CJK> +0x7D08 # <CJK> +0x7D0A # <CJK> +0x7D0B # <CJK> +0x7D0D # <CJK> +0x7D10 # <CJK> +0x7D14 # <CJK> +0x7D17 # <CJK> +0x7D18 # <CJK> +0x7D19 # <CJK> +0x7D1A # <CJK> +0x7D1B # <CJK> +0x7D20 # <CJK> +0x7D21 # <CJK> +0x7D22 # <CJK> +0x7D2B # <CJK> +0x7D2C # <CJK> +0x7D2E # <CJK> +0x7D2F # <CJK> +0x7D30 # <CJK> +0x7D33 # <CJK> +0x7D35 # <CJK> +0x7D39 # <CJK> +0x7D3A # <CJK> +0x7D42 # <CJK> +0x7D43 # <CJK> +0x7D44 # <CJK> +0x7D45 # <CJK> +0x7D46 # <CJK> +0x7D50 # <CJK> +0x7D5E # <CJK> +0x7D61 # <CJK> +0x7D62 # <CJK> +0x7D66 # <CJK> +0x7D68 # <CJK> +0x7D6A # <CJK> +0x7D6E # <CJK> +0x7D71 # <CJK> +0x7D72 # <CJK> +0x7D73 # <CJK> +0x7D76 # <CJK> +0x7D79 # <CJK> +0x7D7F # <CJK> +0x7D8E # <CJK> +0x7D8F # <CJK> +0x7D93 # <CJK> +0x7D9C # <CJK> +0x7DA0 # <CJK> +0x7DA2 # <CJK> +0x7DAC # <CJK> +0x7DAD # <CJK> +0x7DB1 # <CJK> +0x7DB2 # <CJK> +0x7DB4 # <CJK> +0x7DB5 # <CJK> +0x7DB8 # <CJK> +0x7DBA # <CJK> +0x7DBB # <CJK> +0x7DBD # <CJK> +0x7DBE # <CJK> +0x7DBF # <CJK> +0x7DC7 # <CJK> +0x7DCA # <CJK> +0x7DCB # <CJK> +0x7DD6 # <CJK> +0x7DD8 # <CJK> +0x7DDA # <CJK> +0x7DDD # <CJK> +0x7DDE # <CJK> +0x7DE0 # <CJK> +0x7DE1 # <CJK> +0x7DE3 # <CJK> +0x7DE8 # <CJK> +0x7DE9 # <CJK> +0x7DEC # <CJK> +0x7DEF # <CJK> +0x7DF4 # <CJK> +0x7DFB # <CJK> +0x7E09 # <CJK> +0x7E0A # <CJK> +0x7E15 # <CJK> +0x7E1B # <CJK> +0x7E1D # <CJK> +0x7E1E # <CJK> +0x7E1F # <CJK> +0x7E21 # <CJK> +0x7E23 # <CJK> +0x7E2B # <CJK> +0x7E2E # <CJK> +0x7E2F # <CJK> +0x7E31 # <CJK> +0x7E37 # <CJK> +0x7E3D # <CJK> +0x7E3E # <CJK> +0x7E41 # <CJK> +0x7E43 # <CJK> +0x7E46 # <CJK> +0x7E47 # <CJK> +0x7E52 # <CJK> +0x7E54 # <CJK> +0x7E55 # <CJK> +0x7E5E # <CJK> +0x7E61 # <CJK> +0x7E69 # <CJK> +0x7E6A # <CJK> +0x7E6B # <CJK> +0x7E6D # <CJK> +0x7E70 # <CJK> +0x7E79 # <CJK> +0x7E7C # <CJK> +0x7E82 # <CJK> +0x7E8C # <CJK> +0x7E8F # <CJK> +0x7E93 # <CJK> +0x7E96 # <CJK> +0x7E98 # <CJK> +0x7E9B # <CJK> +0x7E9C # <CJK> +0x7F36 # <CJK> +0x7F38 # <CJK> +0x7F3A # <CJK> +0x7F4C # <CJK> +0x7F50 # <CJK> +0x7F54 # <CJK> +0x7F55 # <CJK> +0x7F6A # <CJK> +0x7F6B # <CJK> +0x7F6E # <CJK> +0x7F70 # <CJK> +0x7F72 # <CJK> +0x7F75 # <CJK> +0x7F77 # <CJK> +0x7F79 # <CJK> +0x7F85 # <CJK> +0x7F88 # <CJK> +0x7F8A # <CJK> +0x7F8C # <CJK> +0x7F8E # <CJK> +0x7F94 # <CJK> +0x7F9A # <CJK> +0x7F9E # <CJK> +0x7FA4 # <CJK> +0x7FA8 # <CJK> +0x7FA9 # <CJK> +0x7FB2 # <CJK> +0x7FB8 # <CJK> +0x7FB9 # <CJK> +0x7FBD # <CJK> +0x7FC1 # <CJK> +0x7FC5 # <CJK> +0x7FCA # <CJK> +0x7FCC # <CJK> +0x7FCE # <CJK> +0x7FD2 # <CJK> +0x7FD4 # <CJK> +0x7FD5 # <CJK> +0x7FDF # <CJK> +0x7FE0 # <CJK> +0x7FE1 # <CJK> +0x7FE9 # <CJK> +0x7FEB # <CJK> +0x7FF0 # <CJK> +0x7FF9 # <CJK> +0x7FFC # <CJK> +0x8000 # <CJK> +0x8001 # <CJK> +0x8003 # <CJK> +0x8005 # <CJK> +0x8006 # <CJK> +0x8009 # <CJK> +0x800C # <CJK> +0x8010 # <CJK> +0x8015 # <CJK> +0x8017 # <CJK> +0x8018 # <CJK> +0x802D # <CJK> +0x8033 # <CJK> +0x8036 # <CJK> +0x803D # <CJK> +0x803F # <CJK> +0x8043 # <CJK> +0x8046 # <CJK> +0x804A # <CJK> +0x8056 # <CJK> +0x8058 # <CJK> +0x805A # <CJK> +0x805E # <CJK> +0x806F # <CJK> +0x8070 # <CJK> +0x8072 # <CJK> +0x8073 # <CJK> +0x8077 # <CJK> +0x807D # <CJK> +0x807E # <CJK> +0x807F # <CJK> +0x8084 # <CJK> +0x8085 # <CJK> +0x8086 # <CJK> +0x8087 # <CJK> +0x8089 # <CJK> +0x808B # <CJK> +0x808C # <CJK> +0x8096 # <CJK> +0x809B # <CJK> +0x809D # <CJK> +0x80A1 # <CJK> +0x80A2 # <CJK> +0x80A5 # <CJK> +0x80A9 # <CJK> +0x80AA # <CJK> +0x80AF # <CJK> +0x80B1 # <CJK> +0x80B2 # <CJK> +0x80B4 # <CJK> +0x80BA # <CJK> +0x80C3 # <CJK> +0x80C4 # <CJK> +0x80CC # <CJK> +0x80CE # <CJK> +0x80DA # <CJK> +0x80DB # <CJK> +0x80DE # <CJK> +0x80E1 # <CJK> +0x80E4 # <CJK> +0x80E5 # <CJK> +0x80F1 # <CJK> +0x80F4 # <CJK> +0x80F8 # <CJK> +0x80FD # <CJK> +0x8102 # <CJK> +0x8105 # <CJK> +0x8106 # <CJK> +0x8107 # <CJK> +0x8108 # <CJK> +0x810A # <CJK> +0x8118 # <CJK> +0x811A # <CJK> +0x811B # <CJK> +0x8123 # <CJK> +0x8129 # <CJK> +0x812B # <CJK> +0x812F # <CJK> +0x8139 # <CJK> +0x813E # <CJK> +0x814B # <CJK> +0x814E # <CJK> +0x8150 # <CJK> +0x8151 # <CJK> +0x8154 # <CJK> +0x8155 # <CJK> +0x8165 # <CJK> +0x8166 # <CJK> +0x816B # <CJK> +0x8170 # <CJK> +0x8171 # <CJK> +0x8178 # <CJK> +0x8179 # <CJK> +0x817A # <CJK> +0x817F # <CJK> +0x8180 # <CJK> +0x8188 # <CJK> +0x818A # <CJK> +0x818F # <CJK> +0x819A # <CJK> +0x819C # <CJK> +0x819D # <CJK> +0x81A0 # <CJK> +0x81A3 # <CJK> +0x81A8 # <CJK> +0x81B3 # <CJK> +0x81B5 # <CJK> +0x81BA # <CJK> +0x81BD # <CJK> +0x81BE # <CJK> +0x81BF # <CJK> +0x81C0 # <CJK> +0x81C2 # <CJK> +0x81C6 # <CJK> +0x81CD # <CJK> +0x81D8 # <CJK> +0x81DF # <CJK> +0x81E3 # <CJK> +0x81E5 # <CJK> +0x81E7 # <CJK> +0x81E8 # <CJK> +0x81EA # <CJK> +0x81ED # <CJK> +0x81F3 # <CJK> +0x81F4 # <CJK> +0x81FA # <CJK> +0x81FB # <CJK> +0x81FC # <CJK> +0x81FE # <CJK> +0x8205 # <CJK> +0x8207 # <CJK> +0x8208 # <CJK> +0x820A # <CJK> +0x820C # <CJK> +0x820D # <CJK> +0x8212 # <CJK> +0x821B # <CJK> +0x821C # <CJK> +0x821E # <CJK> +0x821F # <CJK> +0x8221 # <CJK> +0x822A # <CJK> +0x822B # <CJK> +0x822C # <CJK> +0x8235 # <CJK> +0x8236 # <CJK> +0x8237 # <CJK> +0x8239 # <CJK> +0x8240 # <CJK> +0x8245 # <CJK> +0x8247 # <CJK> +0x8259 # <CJK> +0x8264 # <CJK> +0x8266 # <CJK> +0x826E # <CJK> +0x826F # <CJK> +0x8271 # <CJK> +0x8272 # <CJK> +0x8276 # <CJK> +0x8278 # <CJK> +0x827E # <CJK> +0x828B # <CJK> +0x828D # <CJK> +0x828E # <CJK> +0x8292 # <CJK> +0x8299 # <CJK> +0x829A # <CJK> +0x829D # <CJK> +0x829F # <CJK> +0x82A5 # <CJK> +0x82A6 # <CJK> +0x82A9 # <CJK> +0x82AC # <CJK> +0x82AD # <CJK> +0x82AE # <CJK> +0x82AF # <CJK> +0x82B1 # <CJK> +0x82B3 # <CJK> +0x82B7 # <CJK> +0x82B8 # <CJK> +0x82B9 # <CJK> +0x82BB # <CJK> +0x82BC # <CJK> +0x82BD # <CJK> +0x82BF # <CJK> +0x82D1 # <CJK> +0x82D2 # <CJK> +0x82D4 # <CJK> +0x82D5 # <CJK> +0x82D7 # <CJK> +0x82DB # <CJK> +0x82DE # <CJK> +0x82DF # <CJK> +0x82E1 # <CJK> +0x82E5 # <CJK> +0x82E6 # <CJK> +0x82E7 # <CJK> +0x82F1 # <CJK> +0x82FD # <CJK> +0x82FE # <CJK> +0x8301 # <CJK> +0x8302 # <CJK> +0x8303 # <CJK> +0x8304 # <CJK> +0x8305 # <CJK> +0x8309 # <CJK> +0x8317 # <CJK> +0x8328 # <CJK> +0x832B # <CJK> +0x832F # <CJK> +0x8331 # <CJK> +0x8334 # <CJK> +0x8335 # <CJK> +0x8336 # <CJK> +0x8338 # <CJK> +0x8339 # <CJK> +0x8340 # <CJK> +0x8347 # <CJK> +0x8349 # <CJK> +0x834A # <CJK> +0x834F # <CJK> +0x8351 # <CJK> +0x8352 # <CJK> +0x8373 # <CJK> +0x8377 # <CJK> +0x837B # <CJK> +0x8389 # <CJK> +0x838A # <CJK> +0x838E # <CJK> +0x8396 # <CJK> +0x8398 # <CJK> +0x839E # <CJK> +0x83A2 # <CJK> +0x83A9 # <CJK> +0x83AA # <CJK> +0x83AB # <CJK> +0x83BD # <CJK> +0x83C1 # <CJK> +0x83C5 # <CJK> +0x83C9 # <CJK> +0x83CA # <CJK> +0x83CC # <CJK> +0x83D3 # <CJK> +0x83D6 # <CJK> +0x83DC # <CJK> +0x83E9 # <CJK> +0x83EB # <CJK> +0x83EF # <CJK> +0x83F0 # <CJK> +0x83F1 # <CJK> +0x83F2 # <CJK> +0x83F4 # <CJK> +0x83F9 # <CJK> +0x83FD # <CJK> +0x8403 # <CJK> +0x8404 # <CJK> +0x840A # <CJK> +0x840C # <CJK> +0x840D # <CJK> +0x840E # <CJK> +0x8429 # <CJK> +0x842C # <CJK> +0x8431 # <CJK> +0x8438 # <CJK> +0x843D # <CJK> +0x8449 # <CJK> +0x8457 # <CJK> +0x845B # <CJK> +0x8461 # <CJK> +0x8463 # <CJK> +0x8466 # <CJK> +0x846B # <CJK> +0x846C # <CJK> +0x846F # <CJK> +0x8475 # <CJK> +0x847A # <CJK> +0x8490 # <CJK> +0x8494 # <CJK> +0x8499 # <CJK> +0x849C # <CJK> +0x84A1 # <CJK> +0x84B2 # <CJK> +0x84B8 # <CJK> +0x84BB # <CJK> +0x84BC # <CJK> +0x84BF # <CJK> +0x84C0 # <CJK> +0x84C2 # <CJK> +0x84C4 # <CJK> +0x84C6 # <CJK> +0x84C9 # <CJK> +0x84CB # <CJK> +0x84CD # <CJK> +0x84D1 # <CJK> +0x84DA # <CJK> +0x84EC # <CJK> +0x84EE # <CJK> +0x84F4 # <CJK> +0x84FC # <CJK> +0x8511 # <CJK> +0x8513 # <CJK> +0x8514 # <CJK> +0x8517 # <CJK> +0x8518 # <CJK> +0x851A # <CJK> +0x851E # <CJK> +0x8521 # <CJK> +0x8523 # <CJK> +0x8525 # <CJK> +0x852C # <CJK> +0x852D # <CJK> +0x852F # <CJK> +0x853D # <CJK> +0x853F # <CJK> +0x8541 # <CJK> +0x8543 # <CJK> +0x8549 # <CJK> +0x854E # <CJK> +0x8553 # <CJK> +0x8559 # <CJK> +0x8563 # <CJK> +0x8568 # <CJK> +0x8569 # <CJK> +0x856A # <CJK> +0x856D # <CJK> +0x8584 # <CJK> +0x8587 # <CJK> +0x858F # <CJK> +0x8591 # <CJK> +0x8594 # <CJK> +0x859B # <CJK> +0x85A6 # <CJK> +0x85A8 # <CJK> +0x85A9 # <CJK> +0x85AA # <CJK> +0x85AF # <CJK> +0x85B0 # <CJK> +0x85BA # <CJK> +0x85C1 # <CJK> +0x85C9 # <CJK> +0x85CD # <CJK> +0x85CE # <CJK> +0x85CF # <CJK> +0x85D5 # <CJK> +0x85DC # <CJK> +0x85DD # <CJK> +0x85E4 # <CJK> +0x85E5 # <CJK> +0x85E9 # <CJK> +0x85EA # <CJK> +0x85F7 # <CJK> +0x85FA # <CJK> +0x85FB # <CJK> +0x85FF # <CJK> +0x8602 # <CJK> +0x8606 # <CJK> +0x8607 # <CJK> +0x860A # <CJK> +0x8616 # <CJK> +0x8617 # <CJK> +0x861A # <CJK> +0x862D # <CJK> +0x863F # <CJK> +0x864E # <CJK> +0x8650 # <CJK> +0x8654 # <CJK> +0x8655 # <CJK> +0x865B # <CJK> +0x865C # <CJK> +0x865E # <CJK> +0x865F # <CJK> +0x8667 # <CJK> +0x8679 # <CJK> +0x868A # <CJK> +0x868C # <CJK> +0x8693 # <CJK> +0x86A3 # <CJK> +0x86A4 # <CJK> +0x86A9 # <CJK> +0x86C7 # <CJK> +0x86CB # <CJK> +0x86D4 # <CJK> +0x86D9 # <CJK> +0x86DB # <CJK> +0x86DF # <CJK> +0x86E4 # <CJK> +0x86ED # <CJK> +0x86FE # <CJK> +0x8700 # <CJK> +0x8702 # <CJK> +0x8703 # <CJK> +0x8708 # <CJK> +0x8718 # <CJK> +0x871A # <CJK> +0x871C # <CJK> +0x874E # <CJK> +0x8755 # <CJK> +0x8757 # <CJK> +0x875F # <CJK> +0x8766 # <CJK> +0x8768 # <CJK> +0x8774 # <CJK> +0x8776 # <CJK> +0x8778 # <CJK> +0x8782 # <CJK> +0x878D # <CJK> +0x879F # <CJK> +0x87A2 # <CJK> +0x87B3 # <CJK> +0x87BA # <CJK> +0x87C4 # <CJK> +0x87E0 # <CJK> +0x87EC # <CJK> +0x87EF # <CJK> +0x87F2 # <CJK> +0x87F9 # <CJK> +0x87FB # <CJK> +0x87FE # <CJK> +0x8805 # <CJK> +0x881F # <CJK> +0x8822 # <CJK> +0x8823 # <CJK> +0x8831 # <CJK> +0x8836 # <CJK> +0x883B # <CJK> +0x8840 # <CJK> +0x8846 # <CJK> +0x884C # <CJK> +0x884D # <CJK> +0x8852 # <CJK> +0x8853 # <CJK> +0x8857 # <CJK> +0x8859 # <CJK> +0x885B # <CJK> +0x885D # <CJK> +0x8861 # <CJK> +0x8862 # <CJK> +0x8863 # <CJK> +0x8868 # <CJK> +0x886B # <CJK> +0x8870 # <CJK> +0x8872 # <CJK> +0x8877 # <CJK> +0x887E # <CJK> +0x887F # <CJK> +0x8881 # <CJK> +0x8882 # <CJK> +0x8888 # <CJK> +0x888B # <CJK> +0x888D # <CJK> +0x8892 # <CJK> +0x8896 # <CJK> +0x8897 # <CJK> +0x889E # <CJK> +0x88AB # <CJK> +0x88B4 # <CJK> +0x88C1 # <CJK> +0x88C2 # <CJK> +0x88CF # <CJK> +0x88D4 # <CJK> +0x88D5 # <CJK> +0x88D9 # <CJK> +0x88DC # <CJK> +0x88DD # <CJK> +0x88DF # <CJK> +0x88E1 # <CJK> +0x88E8 # <CJK> +0x88F3 # <CJK> +0x88F4 # <CJK> +0x88F5 # <CJK> +0x88F8 # <CJK> +0x88FD # <CJK> +0x8907 # <CJK> +0x8910 # <CJK> +0x8912 # <CJK> +0x8913 # <CJK> +0x8918 # <CJK> +0x8919 # <CJK> +0x8925 # <CJK> +0x892A # <CJK> +0x8936 # <CJK> +0x8938 # <CJK> +0x893B # <CJK> +0x8941 # <CJK> +0x8944 # <CJK> +0x895F # <CJK> +0x8964 # <CJK> +0x896A # <CJK> +0x8972 # <CJK> +0x897F # <CJK> +0x8981 # <CJK> +0x8983 # <CJK> +0x8986 # <CJK> +0x8987 # <CJK> +0x898B # <CJK> +0x898F # <CJK> +0x8993 # <CJK> +0x8996 # <CJK> +0x89A1 # <CJK> +0x89A9 # <CJK> +0x89AA # <CJK> +0x89B2 # <CJK> +0x89BA # <CJK> +0x89BD # <CJK> +0x89C0 # <CJK> +0x89D2 # <CJK> +0x89E3 # <CJK> +0x89F4 # <CJK> +0x89F8 # <CJK> +0x8A00 # <CJK> +0x8A02 # <CJK> +0x8A03 # <CJK> +0x8A08 # <CJK> +0x8A0A # <CJK> +0x8A0C # <CJK> +0x8A0E # <CJK> +0x8A13 # <CJK> +0x8A16 # <CJK> +0x8A17 # <CJK> +0x8A18 # <CJK> +0x8A1B # <CJK> +0x8A1D # <CJK> +0x8A1F # <CJK> +0x8A23 # <CJK> +0x8A25 # <CJK> +0x8A2A # <CJK> +0x8A2D # <CJK> +0x8A31 # <CJK> +0x8A34 # <CJK> +0x8A36 # <CJK> +0x8A3A # <CJK> +0x8A3B # <CJK> +0x8A50 # <CJK> +0x8A54 # <CJK> +0x8A55 # <CJK> +0x8A5B # <CJK> +0x8A5E # <CJK> +0x8A60 # <CJK> +0x8A62 # <CJK> +0x8A63 # <CJK> +0x8A66 # <CJK> +0x8A69 # <CJK> +0x8A6D # <CJK> +0x8A6E # <CJK> +0x8A70 # <CJK> +0x8A71 # <CJK> +0x8A72 # <CJK> +0x8A73 # <CJK> +0x8A75 # <CJK> +0x8A79 # <CJK> +0x8A85 # <CJK> +0x8A87 # <CJK> +0x8A8C # <CJK> +0x8A8D # <CJK> +0x8A93 # <CJK> +0x8A95 # <CJK> +0x8A98 # <CJK> +0x8A9E # <CJK> +0x8AA0 # <CJK> +0x8AA1 # <CJK> +0x8AA3 # <CJK> +0x8AA4 # <CJK> +0x8AA5 # <CJK> +0x8AA6 # <CJK> +0x8AA8 # <CJK> +0x8AAA # <CJK> +0x8AB0 # <CJK> +0x8AB2 # <CJK> +0x8AB9 # <CJK> +0x8ABC # <CJK> +0x8ABE # <CJK> +0x8ABF # <CJK> +0x8AC2 # <CJK> +0x8AC4 # <CJK> +0x8AC7 # <CJK> +0x8ACB # <CJK> +0x8ACD # <CJK> +0x8ACF # <CJK> +0x8AD2 # <CJK> +0x8AD6 # <CJK> +0x8ADB # <CJK> +0x8ADC # <CJK> +0x8AE1 # <CJK> +0x8AE6 # <CJK> +0x8AE7 # <CJK> +0x8AEA # <CJK> +0x8AEB # <CJK> +0x8AED # <CJK> +0x8AEE # <CJK> +0x8AF1 # <CJK> +0x8AF6 # <CJK> +0x8AF7 # <CJK> +0x8AF8 # <CJK> +0x8AFA # <CJK> +0x8AFE # <CJK> +0x8B00 # <CJK> +0x8B01 # <CJK> +0x8B02 # <CJK> +0x8B04 # <CJK> +0x8B0E # <CJK> +0x8B10 # <CJK> +0x8B14 # <CJK> +0x8B16 # <CJK> +0x8B17 # <CJK> +0x8B19 # <CJK> +0x8B1A # <CJK> +0x8B1B # <CJK> +0x8B1D # <CJK> +0x8B20 # <CJK> +0x8B28 # <CJK> +0x8B2B # <CJK> +0x8B2C # <CJK> +0x8B33 # <CJK> +0x8B39 # <CJK> +0x8B41 # <CJK> +0x8B49 # <CJK> +0x8B4E # <CJK> +0x8B4F # <CJK> +0x8B58 # <CJK> +0x8B5A # <CJK> +0x8B5C # <CJK> +0x8B66 # <CJK> +0x8B6C # <CJK> +0x8B6F # <CJK> +0x8B70 # <CJK> +0x8B74 # <CJK> +0x8B77 # <CJK> +0x8B7D # <CJK> +0x8B80 # <CJK> +0x8B8A # <CJK> +0x8B90 # <CJK> +0x8B92 # <CJK> +0x8B93 # <CJK> +0x8B96 # <CJK> +0x8B9A # <CJK> +0x8C37 # <CJK> +0x8C3F # <CJK> +0x8C41 # <CJK> +0x8C46 # <CJK> +0x8C48 # <CJK> +0x8C4A # <CJK> +0x8C4C # <CJK> +0x8C55 # <CJK> +0x8C5A # <CJK> +0x8C61 # <CJK> +0x8C6A # <CJK> +0x8C6B # <CJK> +0x8C79 # <CJK> +0x8C7A # <CJK> +0x8C82 # <CJK> +0x8C8A # <CJK> +0x8C8C # <CJK> +0x8C9D # <CJK> +0x8C9E # <CJK> +0x8CA0 # <CJK> +0x8CA1 # <CJK> +0x8CA2 # <CJK> +0x8CA7 # <CJK> +0x8CA8 # <CJK> +0x8CA9 # <CJK> +0x8CAA # <CJK> +0x8CAB # <CJK> +0x8CAC # <CJK> +0x8CAF # <CJK> +0x8CB0 # <CJK> +0x8CB3 # <CJK> +0x8CB4 # <CJK> +0x8CB6 # <CJK> +0x8CB7 # <CJK> +0x8CB8 # <CJK> +0x8CBB # <CJK> +0x8CBC # <CJK> +0x8CBD # <CJK> +0x8CBF # <CJK> +0x8CC0 # <CJK> +0x8CC1 # <CJK> +0x8CC2 # <CJK> +0x8CC3 # <CJK> +0x8CC4 # <CJK> +0x8CC7 # <CJK> +0x8CC8 # <CJK> +0x8CCA # <CJK> +0x8CD1 # <CJK> +0x8CD3 # <CJK> +0x8CDA # <CJK> +0x8CDC # <CJK> +0x8CDE # <CJK> +0x8CE0 # <CJK> +0x8CE2 # <CJK> +0x8CE3 # <CJK> +0x8CE4 # <CJK> +0x8CE6 # <CJK> +0x8CEA # <CJK> +0x8CED # <CJK> +0x8CF4 # <CJK> +0x8CFB # <CJK> +0x8CFC # <CJK> +0x8CFD # <CJK> +0x8D04 # <CJK> +0x8D05 # <CJK> +0x8D07 # <CJK> +0x8D08 # <CJK> +0x8D0A # <CJK> +0x8D0D # <CJK> +0x8D13 # <CJK> +0x8D16 # <CJK> +0x8D64 # <CJK> +0x8D66 # <CJK> +0x8D6B # <CJK> +0x8D70 # <CJK> +0x8D73 # <CJK> +0x8D74 # <CJK> +0x8D77 # <CJK> +0x8D85 # <CJK> +0x8D8A # <CJK> +0x8D99 # <CJK> +0x8DA3 # <CJK> +0x8DA8 # <CJK> +0x8DB3 # <CJK> +0x8DBA # <CJK> +0x8DBE # <CJK> +0x8DC6 # <CJK> +0x8DCB # <CJK> +0x8DCC # <CJK> +0x8DCF # <CJK> +0x8DDB # <CJK> +0x8DDD # <CJK> +0x8DE1 # <CJK> +0x8DE3 # <CJK> +0x8DE8 # <CJK> +0x8DEF # <CJK> +0x8DF3 # <CJK> +0x8E0A # <CJK> +0x8E0F # <CJK> +0x8E10 # <CJK> +0x8E1E # <CJK> +0x8E2A # <CJK> +0x8E30 # <CJK> +0x8E35 # <CJK> +0x8E42 # <CJK> +0x8E44 # <CJK> +0x8E47 # <CJK> +0x8E48 # <CJK> +0x8E49 # <CJK> +0x8E4A # <CJK> +0x8E59 # <CJK> +0x8E5F # <CJK> +0x8E60 # <CJK> +0x8E74 # <CJK> +0x8E76 # <CJK> +0x8E81 # <CJK> +0x8E87 # <CJK> +0x8E8A # <CJK> +0x8E8D # <CJK> +0x8EAA # <CJK> +0x8EAB # <CJK> +0x8EAC # <CJK> +0x8EC0 # <CJK> +0x8ECA # <CJK> +0x8ECB # <CJK> +0x8ECC # <CJK> +0x8ECD # <CJK> +0x8ED2 # <CJK> +0x8EDF # <CJK> +0x8EEB # <CJK> +0x8EF8 # <CJK> +0x8EFB # <CJK> +0x8EFE # <CJK> +0x8F03 # <CJK> +0x8F05 # <CJK> +0x8F09 # <CJK> +0x8F12 # <CJK> +0x8F13 # <CJK> +0x8F14 # <CJK> +0x8F15 # <CJK> +0x8F1B # <CJK> +0x8F1C # <CJK> +0x8F1D # <CJK> +0x8F1E # <CJK> +0x8F1F # <CJK> +0x8F26 # <CJK> +0x8F27 # <CJK> +0x8F29 # <CJK> +0x8F2A # <CJK> +0x8F2F # <CJK> +0x8F33 # <CJK> +0x8F38 # <CJK> +0x8F39 # <CJK> +0x8F3B # <CJK> +0x8F3E # <CJK> +0x8F3F # <CJK> +0x8F44 # <CJK> +0x8F45 # <CJK> +0x8F49 # <CJK> +0x8F4D # <CJK> +0x8F4E # <CJK> +0x8F5D # <CJK> +0x8F5F # <CJK> +0x8F62 # <CJK> +0x8F9B # <CJK> +0x8F9C # <CJK> +0x8FA3 # <CJK> +0x8FA6 # <CJK> +0x8FA8 # <CJK> +0x8FAD # <CJK> +0x8FAF # <CJK> +0x8FB0 # <CJK> +0x8FB1 # <CJK> +0x8FB2 # <CJK> +0x8FC2 # <CJK> +0x8FC5 # <CJK> +0x8FCE # <CJK> +0x8FD1 # <CJK> +0x8FD4 # <CJK> +0x8FE6 # <CJK> +0x8FEA # <CJK> +0x8FEB # <CJK> +0x8FED # <CJK> +0x8FF0 # <CJK> +0x8FF2 # <CJK> +0x8FF7 # <CJK> +0x8FF9 # <CJK> +0x8FFD # <CJK> +0x9000 # <CJK> +0x9001 # <CJK> +0x9002 # <CJK> +0x9003 # <CJK> +0x9005 # <CJK> +0x9006 # <CJK> +0x9008 # <CJK> +0x900B # <CJK> +0x900D # <CJK> +0x900F # <CJK> +0x9010 # <CJK> +0x9011 # <CJK> +0x9014 # <CJK> +0x9015 # <CJK> +0x9017 # <CJK> +0x9019 # <CJK> +0x901A # <CJK> +0x901D # <CJK> +0x901E # <CJK> +0x901F # <CJK> +0x9020 # <CJK> +0x9021 # <CJK> +0x9022 # <CJK> +0x9023 # <CJK> +0x902E # <CJK> +0x9031 # <CJK> +0x9032 # <CJK> +0x9035 # <CJK> +0x9038 # <CJK> +0x903C # <CJK> +0x903E # <CJK> +0x9041 # <CJK> +0x9042 # <CJK> +0x9047 # <CJK> +0x904A # <CJK> +0x904B # <CJK> +0x904D # <CJK> +0x904E # <CJK> +0x9050 # <CJK> +0x9051 # <CJK> +0x9053 # <CJK> +0x9054 # <CJK> +0x9055 # <CJK> +0x9059 # <CJK> +0x905C # <CJK> +0x905D # <CJK> +0x905E # <CJK> +0x9060 # <CJK> +0x9061 # <CJK> +0x9063 # <CJK> +0x9069 # <CJK> +0x906D # <CJK> +0x906E # <CJK> +0x906F # <CJK> +0x9072 # <CJK> +0x9075 # <CJK> +0x9077 # <CJK> +0x9078 # <CJK> +0x907A # <CJK> +0x907C # <CJK> +0x907D # <CJK> +0x907F # <CJK> +0x9080 # <CJK> +0x9081 # <CJK> +0x9082 # <CJK> +0x9083 # <CJK> +0x9084 # <CJK> +0x9087 # <CJK> +0x9088 # <CJK> +0x908A # <CJK> +0x908F # <CJK> +0x9091 # <CJK> +0x9095 # <CJK> +0x9099 # <CJK> +0x90A2 # <CJK> +0x90A3 # <CJK> +0x90A6 # <CJK> +0x90A8 # <CJK> +0x90AA # <CJK> +0x90AF # <CJK> +0x90B0 # <CJK> +0x90B1 # <CJK> +0x90B5 # <CJK> +0x90B8 # <CJK> +0x90C1 # <CJK> +0x90CA # <CJK> +0x90DE # <CJK> +0x90E1 # <CJK> +0x90E8 # <CJK> +0x90ED # <CJK> +0x90F5 # <CJK> +0x90FD # <CJK> +0x9102 # <CJK> +0x9112 # <CJK> +0x9115 # <CJK> +0x9119 # <CJK> +0x9127 # <CJK> +0x912D # <CJK> +0x9132 # <CJK> +0x9149 # <CJK> +0x914A # <CJK> +0x914B # <CJK> +0x914C # <CJK> +0x914D # <CJK> +0x914E # <CJK> +0x9152 # <CJK> +0x9162 # <CJK> +0x9169 # <CJK> +0x916A # <CJK> +0x916C # <CJK> +0x9175 # <CJK> +0x9177 # <CJK> +0x9178 # <CJK> +0x9187 # <CJK> +0x9189 # <CJK> +0x918B # <CJK> +0x918D # <CJK> +0x9192 # <CJK> +0x919C # <CJK> +0x91AB # <CJK> +0x91AC # <CJK> +0x91AE # <CJK> +0x91AF # <CJK> +0x91B1 # <CJK> +0x91B4 # <CJK> +0x91B5 # <CJK> +0x91C0 # <CJK> +0x91C7 # <CJK> +0x91C9 # <CJK> +0x91CB # <CJK> +0x91CC # <CJK> +0x91CD # <CJK> +0x91CE # <CJK> +0x91CF # <CJK> +0x91D0 # <CJK> +0x91D1 # <CJK> +0x91D7 # <CJK> +0x91D8 # <CJK> +0x91DC # <CJK> +0x91DD # <CJK> +0x91E3 # <CJK> +0x91E7 # <CJK> +0x91EA # <CJK> +0x91F5 # <CJK> +0x920D # <CJK> +0x9210 # <CJK> +0x9211 # <CJK> +0x9212 # <CJK> +0x9217 # <CJK> +0x921E # <CJK> +0x9234 # <CJK> +0x923A # <CJK> +0x923F # <CJK> +0x9240 # <CJK> +0x9245 # <CJK> +0x9249 # <CJK> +0x9257 # <CJK> +0x925B # <CJK> +0x925E # <CJK> +0x9262 # <CJK> +0x9264 # <CJK> +0x9265 # <CJK> +0x9266 # <CJK> +0x9280 # <CJK> +0x9283 # <CJK> +0x9285 # <CJK> +0x9291 # <CJK> +0x9293 # <CJK> +0x9296 # <CJK> +0x9298 # <CJK> +0x929C # <CJK> +0x92B3 # <CJK> +0x92B6 # <CJK> +0x92B7 # <CJK> +0x92B9 # <CJK> +0x92CC # <CJK> +0x92CF # <CJK> +0x92D2 # <CJK> +0x92E4 # <CJK> +0x92EA # <CJK> +0x92F8 # <CJK> +0x92FC # <CJK> +0x9304 # <CJK> +0x9310 # <CJK> +0x9318 # <CJK> +0x931A # <CJK> +0x931E # <CJK> +0x931F # <CJK> +0x9320 # <CJK> +0x9321 # <CJK> +0x9322 # <CJK> +0x9324 # <CJK> +0x9326 # <CJK> +0x9328 # <CJK> +0x932B # <CJK> +0x932E # <CJK> +0x932F # <CJK> +0x9348 # <CJK> +0x934A # <CJK> +0x934B # <CJK> +0x934D # <CJK> +0x9354 # <CJK> +0x935B # <CJK> +0x936E # <CJK> +0x9375 # <CJK> +0x937C # <CJK> +0x937E # <CJK> +0x938C # <CJK> +0x9394 # <CJK> +0x9396 # <CJK> +0x939A # <CJK> +0x93A3 # <CJK> +0x93A7 # <CJK> +0x93AC # <CJK> +0x93AD # <CJK> +0x93B0 # <CJK> +0x93C3 # <CJK> +0x93D1 # <CJK> +0x93DE # <CJK> +0x93E1 # <CJK> +0x93E4 # <CJK> +0x93F6 # <CJK> +0x9404 # <CJK> +0x9418 # <CJK> +0x9425 # <CJK> +0x942B # <CJK> +0x9435 # <CJK> +0x9438 # <CJK> +0x9444 # <CJK> +0x9451 # <CJK> +0x9452 # <CJK> +0x945B # <CJK> +0x947D # <CJK> +0x947F # <CJK> +0x9577 # <CJK> +0x9580 # <CJK> +0x9583 # <CJK> +0x9589 # <CJK> +0x958B # <CJK> +0x958F # <CJK> +0x9591 # <CJK> +0x9592 # <CJK> +0x9593 # <CJK> +0x9594 # <CJK> +0x9598 # <CJK> +0x95A3 # <CJK> +0x95A4 # <CJK> +0x95A5 # <CJK> +0x95A8 # <CJK> +0x95AD # <CJK> +0x95B1 # <CJK> +0x95BB # <CJK> +0x95BC # <CJK> +0x95C7 # <CJK> +0x95CA # <CJK> +0x95D4 # <CJK> +0x95D5 # <CJK> +0x95D6 # <CJK> +0x95DC # <CJK> +0x95E1 # <CJK> +0x95E2 # <CJK> +0x961C # <CJK> +0x9621 # <CJK> +0x962A # <CJK> +0x962E # <CJK> +0x9632 # <CJK> +0x963B # <CJK> +0x963F # <CJK> +0x9640 # <CJK> +0x9642 # <CJK> +0x9644 # <CJK> +0x964B # <CJK> +0x964C # <CJK> +0x964D # <CJK> +0x9650 # <CJK> +0x965B # <CJK> +0x965C # <CJK> +0x965D # <CJK> +0x965E # <CJK> +0x965F # <CJK> +0x9662 # <CJK> +0x9663 # <CJK> +0x9664 # <CJK> +0x966A # <CJK> +0x9670 # <CJK> +0x9673 # <CJK> +0x9675 # <CJK> +0x9676 # <CJK> +0x9677 # <CJK> +0x9678 # <CJK> +0x967D # <CJK> +0x9685 # <CJK> +0x9686 # <CJK> +0x968A # <CJK> +0x968B # <CJK> +0x968D # <CJK> +0x968E # <CJK> +0x9694 # <CJK> +0x9695 # <CJK> +0x9698 # <CJK> +0x9699 # <CJK> +0x969B # <CJK> +0x969C # <CJK> +0x96A3 # <CJK> +0x96A7 # <CJK> +0x96A8 # <CJK> +0x96AA # <CJK> +0x96B1 # <CJK> +0x96B7 # <CJK> +0x96BB # <CJK> +0x96C0 # <CJK> +0x96C1 # <CJK> +0x96C4 # <CJK> +0x96C5 # <CJK> +0x96C6 # <CJK> +0x96C7 # <CJK> +0x96C9 # <CJK> +0x96CB # <CJK> +0x96CC # <CJK> +0x96CD # <CJK> +0x96CE # <CJK> +0x96D5 # <CJK> +0x96D6 # <CJK> +0x96D9 # <CJK> +0x96DB # <CJK> +0x96DC # <CJK> +0x96E2 # <CJK> +0x96E3 # <CJK> +0x96E8 # <CJK> +0x96E9 # <CJK> +0x96EA # <CJK> +0x96EF # <CJK> +0x96F0 # <CJK> +0x96F2 # <CJK> +0x96F6 # <CJK> +0x96F7 # <CJK> +0x96F9 # <CJK> +0x96FB # <CJK> +0x9700 # <CJK> +0x9706 # <CJK> +0x9707 # <CJK> +0x9711 # <CJK> +0x9713 # <CJK> +0x9716 # <CJK> +0x9719 # <CJK> +0x971C # <CJK> +0x971E # <CJK> +0x9727 # <CJK> +0x9730 # <CJK> +0x9732 # <CJK> +0x9739 # <CJK> +0x973D # <CJK> +0x9742 # <CJK> +0x9744 # <CJK> +0x9748 # <CJK> +0x9751 # <CJK> +0x9756 # <CJK> +0x975C # <CJK> +0x975E # <CJK> +0x9761 # <CJK> +0x9762 # <CJK> +0x9769 # <CJK> +0x976D # <CJK> +0x9774 # <CJK> +0x9777 # <CJK> +0x977A # <CJK> +0x978B # <CJK> +0x978D # <CJK> +0x978F # <CJK> +0x97A0 # <CJK> +0x97A8 # <CJK> +0x97AB # <CJK> +0x97AD # <CJK> +0x97C6 # <CJK> +0x97CB # <CJK> +0x97D3 # <CJK> +0x97DC # <CJK> +0x97F3 # <CJK> +0x97F6 # <CJK> +0x97FB # <CJK> +0x97FF # <CJK> +0x9800 # <CJK> +0x9801 # <CJK> +0x9802 # <CJK> +0x9803 # <CJK> +0x9805 # <CJK> +0x9806 # <CJK> +0x9808 # <CJK> +0x980A # <CJK> +0x980C # <CJK> +0x9810 # <CJK> +0x9811 # <CJK> +0x9812 # <CJK> +0x9813 # <CJK> +0x9817 # <CJK> +0x9818 # <CJK> +0x982D # <CJK> +0x9830 # <CJK> +0x9838 # <CJK> +0x9839 # <CJK> +0x983B # <CJK> +0x9846 # <CJK> +0x984C # <CJK> +0x984D # <CJK> +0x984E # <CJK> +0x9854 # <CJK> +0x9858 # <CJK> +0x985A # <CJK> +0x985E # <CJK> +0x9865 # <CJK> +0x9867 # <CJK> +0x986B # <CJK> +0x986F # <CJK> +0x98A8 # <CJK> +0x98AF # <CJK> +0x98B1 # <CJK> +0x98C4 # <CJK> +0x98C7 # <CJK> +0x98DB # <CJK> +0x98DC # <CJK> +0x98DF # <CJK> +0x98E1 # <CJK> +0x98E2 # <CJK> +0x98ED # <CJK> +0x98EE # <CJK> +0x98EF # <CJK> +0x98F4 # <CJK> +0x98FC # <CJK> +0x98FD # <CJK> +0x98FE # <CJK> +0x9903 # <CJK> +0x9909 # <CJK> +0x990A # <CJK> +0x990C # <CJK> +0x9910 # <CJK> +0x9913 # <CJK> +0x9918 # <CJK> +0x991E # <CJK> +0x9920 # <CJK> +0x9928 # <CJK> +0x9945 # <CJK> +0x9949 # <CJK> +0x994B # <CJK> +0x994C # <CJK> +0x994D # <CJK> +0x9951 # <CJK> +0x9952 # <CJK> +0x9954 # <CJK> +0x9957 # <CJK> +0x9996 # <CJK> +0x9999 # <CJK> +0x999D # <CJK> +0x99A5 # <CJK> +0x99A8 # <CJK> +0x99AC # <CJK> +0x99AD # <CJK> +0x99AE # <CJK> +0x99B1 # <CJK> +0x99B3 # <CJK> +0x99B4 # <CJK> +0x99B9 # <CJK> +0x99C1 # <CJK> +0x99D0 # <CJK> +0x99D1 # <CJK> +0x99D2 # <CJK> +0x99D5 # <CJK> +0x99D9 # <CJK> +0x99DD # <CJK> +0x99DF # <CJK> +0x99ED # <CJK> +0x99F1 # <CJK> +0x99FF # <CJK> +0x9A01 # <CJK> +0x9A08 # <CJK> +0x9A0E # <CJK> +0x9A0F # <CJK> +0x9A19 # <CJK> +0x9A2B # <CJK> +0x9A30 # <CJK> +0x9A36 # <CJK> +0x9A37 # <CJK> +0x9A40 # <CJK> +0x9A43 # <CJK> +0x9A45 # <CJK> +0x9A4D # <CJK> +0x9A55 # <CJK> +0x9A57 # <CJK> +0x9A5A # <CJK> +0x9A5B # <CJK> +0x9A5F # <CJK> +0x9A62 # <CJK> +0x9A65 # <CJK> +0x9A69 # <CJK> +0x9A6A # <CJK> +0x9AA8 # <CJK> +0x9AB8 # <CJK> +0x9AD3 # <CJK> +0x9AD4 # <CJK> +0x9AD8 # <CJK> +0x9AE5 # <CJK> +0x9AEE # <CJK> +0x9B1A # <CJK> +0x9B27 # <CJK> +0x9B2A # <CJK> +0x9B31 # <CJK> +0x9B3C # <CJK> +0x9B41 # <CJK> +0x9B42 # <CJK> +0x9B43 # <CJK> +0x9B44 # <CJK> +0x9B45 # <CJK> +0x9B4F # <CJK> +0x9B54 # <CJK> +0x9B5A # <CJK> +0x9B6F # <CJK> +0x9B8E # <CJK> +0x9B91 # <CJK> +0x9B9F # <CJK> +0x9BAB # <CJK> +0x9BAE # <CJK> +0x9BC9 # <CJK> +0x9BD6 # <CJK> +0x9BE4 # <CJK> +0x9BE8 # <CJK> +0x9C0D # <CJK> +0x9C10 # <CJK> +0x9C12 # <CJK> +0x9C15 # <CJK> +0x9C25 # <CJK> +0x9C32 # <CJK> +0x9C3B # <CJK> +0x9C47 # <CJK> +0x9C49 # <CJK> +0x9C57 # <CJK> +0x9CE5 # <CJK> +0x9CE7 # <CJK> +0x9CE9 # <CJK> +0x9CF3 # <CJK> +0x9CF4 # <CJK> +0x9CF6 # <CJK> +0x9D09 # <CJK> +0x9D1B # <CJK> +0x9D26 # <CJK> +0x9D28 # <CJK> +0x9D3B # <CJK> +0x9D51 # <CJK> +0x9D5D # <CJK> +0x9D60 # <CJK> +0x9D61 # <CJK> +0x9D6C # <CJK> +0x9D72 # <CJK> +0x9DA9 # <CJK> +0x9DAF # <CJK> +0x9DB4 # <CJK> +0x9DC4 # <CJK> +0x9DD7 # <CJK> +0x9DF2 # <CJK> +0x9DF8 # <CJK> +0x9DF9 # <CJK> +0x9DFA # <CJK> +0x9E1A # <CJK> +0x9E1E # <CJK> +0x9E75 # <CJK> +0x9E79 # <CJK> +0x9E7D # <CJK> +0x9E7F # <CJK> +0x9E92 # <CJK> +0x9E93 # <CJK> +0x9E97 # <CJK> +0x9E9D # <CJK> +0x9E9F # <CJK> +0x9EA5 # <CJK> +0x9EB4 # <CJK> +0x9EB5 # <CJK> +0x9EBB # <CJK> +0x9EBE # <CJK> +0x9EC3 # <CJK> +0x9ECD # <CJK> +0x9ECE # <CJK> +0x9ED1 # <CJK> +0x9ED4 # <CJK> +0x9ED8 # <CJK> +0x9EDB # <CJK> +0x9EDC # <CJK> +0x9EDE # <CJK> +0x9EE8 # <CJK> +0x9EF4 # <CJK> +0x9F07 # <CJK> +0x9F08 # <CJK> +0x9F0E # <CJK> +0x9F13 # <CJK> +0x9F20 # <CJK> +0x9F3B # <CJK> +0x9F4A # <CJK> +0x9F4B # <CJK> +0x9F4E # <CJK> +0x9F52 # <CJK> +0x9F5F # <CJK> +0x9F61 # <CJK> +0x9F67 # <CJK> +0x9F6A # <CJK> +0x9F6C # <CJK> +0x9F77 # <CJK> +0x9F8D # <CJK> +0x9F90 # <CJK> +0x9F95 # <CJK> +0x9F9C # <CJK> +0xAC00 # HANGUL SYLLABLE KIYEOK-A +0xAC01 # HANGUL SYLLABLE KIYEOK-A-KIYEOK +0xAC02 # HANGUL SYLLABLE KIYEOK-A-SSANGKIYEOK +0xAC03 # HANGUL SYLLABLE KIYEOK-A-KIYEOKSIOS +0xAC04 # HANGUL SYLLABLE KIYEOK-A-NIEUN +0xAC05 # HANGUL SYLLABLE KIYEOK-A-NIEUNCIEUC +0xAC06 # HANGUL SYLLABLE KIYEOK-A-NIEUNHIEUH +0xAC07 # HANGUL SYLLABLE KIYEOK-A-TIKEUT +0xAC08 # HANGUL SYLLABLE KIYEOK-A-RIEUL +0xAC09 # HANGUL SYLLABLE KIYEOK-A-RIEULKIYEOK +0xAC0A # HANGUL SYLLABLE KIYEOK-A-RIEULMIEUM +0xAC0B # HANGUL SYLLABLE KIYEOK-A-RIEULPIEUP +0xAC0C # HANGUL SYLLABLE KIYEOK-A-RIEULSIOS +0xAC0D # HANGUL SYLLABLE KIYEOK-A-RIEULTHIEUTH +0xAC0E # HANGUL SYLLABLE KIYEOK-A-RIEULPHIEUPH +0xAC0F # HANGUL SYLLABLE KIYEOK-A-RIEULHIEUH +0xAC10 # HANGUL SYLLABLE KIYEOK-A-MIEUM +0xAC11 # HANGUL SYLLABLE KIYEOK-A-PIEUP +0xAC12 # HANGUL SYLLABLE KIYEOK-A-PIEUPSIOS +0xAC13 # HANGUL SYLLABLE KIYEOK-A-SIOS +0xAC14 # HANGUL SYLLABLE KIYEOK-A-SSANGSIOS +0xAC15 # HANGUL SYLLABLE KIYEOK-A-IEUNG +0xAC16 # HANGUL SYLLABLE KIYEOK-A-CIEUC +0xAC17 # HANGUL SYLLABLE KIYEOK-A-CHIEUCH +0xAC18 # HANGUL SYLLABLE KIYEOK-A-KHIEUKH +0xAC19 # HANGUL SYLLABLE KIYEOK-A-THIEUTH +0xAC1A # HANGUL SYLLABLE KIYEOK-A-PHIEUPH +0xAC1B # HANGUL SYLLABLE KIYEOK-A-HIEUH +0xAC1C # HANGUL SYLLABLE KIYEOK-AE +0xAC1D # HANGUL SYLLABLE KIYEOK-AE-KIYEOK +0xAC1E # HANGUL SYLLABLE KIYEOK-AE-SSANGKIYEOK +0xAC1F # HANGUL SYLLABLE KIYEOK-AE-KIYEOKSIOS +0xAC20 # HANGUL SYLLABLE KIYEOK-AE-NIEUN +0xAC21 # HANGUL SYLLABLE KIYEOK-AE-NIEUNCIEUC +0xAC22 # HANGUL SYLLABLE KIYEOK-AE-NIEUNHIEUH +0xAC23 # HANGUL SYLLABLE KIYEOK-AE-TIKEUT +0xAC24 # HANGUL SYLLABLE KIYEOK-AE-RIEUL +0xAC25 # HANGUL SYLLABLE KIYEOK-AE-RIEULKIYEOK +0xAC26 # HANGUL SYLLABLE KIYEOK-AE-RIEULMIEUM +0xAC27 # HANGUL SYLLABLE KIYEOK-AE-RIEULPIEUP +0xAC28 # HANGUL SYLLABLE KIYEOK-AE-RIEULSIOS +0xAC29 # HANGUL SYLLABLE KIYEOK-AE-RIEULTHIEUTH +0xAC2A # HANGUL SYLLABLE KIYEOK-AE-RIEULPHIEUPH +0xAC2B # HANGUL SYLLABLE KIYEOK-AE-RIEULHIEUH +0xAC2C # HANGUL SYLLABLE KIYEOK-AE-MIEUM +0xAC2D # HANGUL SYLLABLE KIYEOK-AE-PIEUP +0xAC2E # HANGUL SYLLABLE KIYEOK-AE-PIEUPSIOS +0xAC2F # HANGUL SYLLABLE KIYEOK-AE-SIOS +0xAC30 # HANGUL SYLLABLE KIYEOK-AE-SSANGSIOS +0xAC31 # HANGUL SYLLABLE KIYEOK-AE-IEUNG +0xAC32 # HANGUL SYLLABLE KIYEOK-AE-CIEUC +0xAC33 # HANGUL SYLLABLE KIYEOK-AE-CHIEUCH +0xAC34 # HANGUL SYLLABLE KIYEOK-AE-KHIEUKH +0xAC35 # HANGUL SYLLABLE KIYEOK-AE-THIEUTH +0xAC36 # HANGUL SYLLABLE KIYEOK-AE-PHIEUPH +0xAC37 # HANGUL SYLLABLE KIYEOK-AE-HIEUH +0xAC38 # HANGUL SYLLABLE KIYEOK-YA +0xAC39 # HANGUL SYLLABLE KIYEOK-YA-KIYEOK +0xAC3A # HANGUL SYLLABLE KIYEOK-YA-SSANGKIYEOK +0xAC3B # HANGUL SYLLABLE KIYEOK-YA-KIYEOKSIOS +0xAC3C # HANGUL SYLLABLE KIYEOK-YA-NIEUN +0xAC3D # HANGUL SYLLABLE KIYEOK-YA-NIEUNCIEUC +0xAC3E # HANGUL SYLLABLE KIYEOK-YA-NIEUNHIEUH +0xAC3F # HANGUL SYLLABLE KIYEOK-YA-TIKEUT +0xAC40 # HANGUL SYLLABLE KIYEOK-YA-RIEUL +0xAC41 # HANGUL SYLLABLE KIYEOK-YA-RIEULKIYEOK +0xAC42 # HANGUL SYLLABLE KIYEOK-YA-RIEULMIEUM +0xAC43 # HANGUL SYLLABLE KIYEOK-YA-RIEULPIEUP +0xAC44 # HANGUL SYLLABLE KIYEOK-YA-RIEULSIOS +0xAC45 # HANGUL SYLLABLE KIYEOK-YA-RIEULTHIEUTH +0xAC46 # HANGUL SYLLABLE KIYEOK-YA-RIEULPHIEUPH +0xAC47 # HANGUL SYLLABLE KIYEOK-YA-RIEULHIEUH +0xAC48 # HANGUL SYLLABLE KIYEOK-YA-MIEUM +0xAC49 # HANGUL SYLLABLE KIYEOK-YA-PIEUP +0xAC4A # HANGUL SYLLABLE KIYEOK-YA-PIEUPSIOS +0xAC4B # HANGUL SYLLABLE KIYEOK-YA-SIOS +0xAC4C # HANGUL SYLLABLE KIYEOK-YA-SSANGSIOS +0xAC4D # HANGUL SYLLABLE KIYEOK-YA-IEUNG +0xAC4E # HANGUL SYLLABLE KIYEOK-YA-CIEUC +0xAC4F # HANGUL SYLLABLE KIYEOK-YA-CHIEUCH +0xAC50 # HANGUL SYLLABLE KIYEOK-YA-KHIEUKH +0xAC51 # HANGUL SYLLABLE KIYEOK-YA-THIEUTH +0xAC52 # HANGUL SYLLABLE KIYEOK-YA-PHIEUPH +0xAC53 # HANGUL SYLLABLE KIYEOK-YA-HIEUH +0xAC54 # HANGUL SYLLABLE KIYEOK-YAE +0xAC55 # HANGUL SYLLABLE KIYEOK-YAE-KIYEOK +0xAC56 # HANGUL SYLLABLE KIYEOK-YAE-SSANGKIYEOK +0xAC57 # HANGUL SYLLABLE KIYEOK-YAE-KIYEOKSIOS +0xAC58 # HANGUL SYLLABLE KIYEOK-YAE-NIEUN +0xAC59 # HANGUL SYLLABLE KIYEOK-YAE-NIEUNCIEUC +0xAC5A # HANGUL SYLLABLE KIYEOK-YAE-NIEUNHIEUH +0xAC5B # HANGUL SYLLABLE KIYEOK-YAE-TIKEUT +0xAC5C # HANGUL SYLLABLE KIYEOK-YAE-RIEUL +0xAC5D # HANGUL SYLLABLE KIYEOK-YAE-RIEULKIYEOK +0xAC5E # HANGUL SYLLABLE KIYEOK-YAE-RIEULMIEUM +0xAC5F # HANGUL SYLLABLE KIYEOK-YAE-RIEULPIEUP +0xAC60 # HANGUL SYLLABLE KIYEOK-YAE-RIEULSIOS +0xAC61 # HANGUL SYLLABLE KIYEOK-YAE-RIEULTHIEUTH +0xAC62 # HANGUL SYLLABLE KIYEOK-YAE-RIEULPHIEUPH +0xAC63 # HANGUL SYLLABLE KIYEOK-YAE-RIEULHIEUH +0xAC64 # HANGUL SYLLABLE KIYEOK-YAE-MIEUM +0xAC65 # HANGUL SYLLABLE KIYEOK-YAE-PIEUP +0xAC66 # HANGUL SYLLABLE KIYEOK-YAE-PIEUPSIOS +0xAC67 # HANGUL SYLLABLE KIYEOK-YAE-SIOS +0xAC68 # HANGUL SYLLABLE KIYEOK-YAE-SSANGSIOS +0xAC69 # HANGUL SYLLABLE KIYEOK-YAE-IEUNG +0xAC6A # HANGUL SYLLABLE KIYEOK-YAE-CIEUC +0xAC6B # HANGUL SYLLABLE KIYEOK-YAE-CHIEUCH +0xAC6C # HANGUL SYLLABLE KIYEOK-YAE-KHIEUKH +0xAC6D # HANGUL SYLLABLE KIYEOK-YAE-THIEUTH +0xAC6E # HANGUL SYLLABLE KIYEOK-YAE-PHIEUPH +0xAC6F # HANGUL SYLLABLE KIYEOK-YAE-HIEUH +0xAC70 # HANGUL SYLLABLE KIYEOK-EO +0xAC71 # HANGUL SYLLABLE KIYEOK-EO-KIYEOK +0xAC72 # HANGUL SYLLABLE KIYEOK-EO-SSANGKIYEOK +0xAC73 # HANGUL SYLLABLE KIYEOK-EO-KIYEOKSIOS +0xAC74 # HANGUL SYLLABLE KIYEOK-EO-NIEUN +0xAC75 # HANGUL SYLLABLE KIYEOK-EO-NIEUNCIEUC +0xAC76 # HANGUL SYLLABLE KIYEOK-EO-NIEUNHIEUH +0xAC77 # HANGUL SYLLABLE KIYEOK-EO-TIKEUT +0xAC78 # HANGUL SYLLABLE KIYEOK-EO-RIEUL +0xAC79 # HANGUL SYLLABLE KIYEOK-EO-RIEULKIYEOK +0xAC7A # HANGUL SYLLABLE KIYEOK-EO-RIEULMIEUM +0xAC7B # HANGUL SYLLABLE KIYEOK-EO-RIEULPIEUP +0xAC7C # HANGUL SYLLABLE KIYEOK-EO-RIEULSIOS +0xAC7D # HANGUL SYLLABLE KIYEOK-EO-RIEULTHIEUTH +0xAC7E # HANGUL SYLLABLE KIYEOK-EO-RIEULPHIEUPH +0xAC7F # HANGUL SYLLABLE KIYEOK-EO-RIEULHIEUH +0xAC80 # HANGUL SYLLABLE KIYEOK-EO-MIEUM +0xAC81 # HANGUL SYLLABLE KIYEOK-EO-PIEUP +0xAC82 # HANGUL SYLLABLE KIYEOK-EO-PIEUPSIOS +0xAC83 # HANGUL SYLLABLE KIYEOK-EO-SIOS +0xAC84 # HANGUL SYLLABLE KIYEOK-EO-SSANGSIOS +0xAC85 # HANGUL SYLLABLE KIYEOK-EO-IEUNG +0xAC86 # HANGUL SYLLABLE KIYEOK-EO-CIEUC +0xAC87 # HANGUL SYLLABLE KIYEOK-EO-CHIEUCH +0xAC88 # HANGUL SYLLABLE KIYEOK-EO-KHIEUKH +0xAC89 # HANGUL SYLLABLE KIYEOK-EO-THIEUTH +0xAC8A # HANGUL SYLLABLE KIYEOK-EO-PHIEUPH +0xAC8B # HANGUL SYLLABLE KIYEOK-EO-HIEUH +0xAC8C # HANGUL SYLLABLE KIYEOK-E +0xAC8D # HANGUL SYLLABLE KIYEOK-E-KIYEOK +0xAC8E # HANGUL SYLLABLE KIYEOK-E-SSANGKIYEOK +0xAC8F # HANGUL SYLLABLE KIYEOK-E-KIYEOKSIOS +0xAC90 # HANGUL SYLLABLE KIYEOK-E-NIEUN +0xAC91 # HANGUL SYLLABLE KIYEOK-E-NIEUNCIEUC +0xAC92 # HANGUL SYLLABLE KIYEOK-E-NIEUNHIEUH +0xAC93 # HANGUL SYLLABLE KIYEOK-E-TIKEUT +0xAC94 # HANGUL SYLLABLE KIYEOK-E-RIEUL +0xAC95 # HANGUL SYLLABLE KIYEOK-E-RIEULKIYEOK +0xAC96 # HANGUL SYLLABLE KIYEOK-E-RIEULMIEUM +0xAC97 # HANGUL SYLLABLE KIYEOK-E-RIEULPIEUP +0xAC98 # HANGUL SYLLABLE KIYEOK-E-RIEULSIOS +0xAC99 # HANGUL SYLLABLE KIYEOK-E-RIEULTHIEUTH +0xAC9A # HANGUL SYLLABLE KIYEOK-E-RIEULPHIEUPH +0xAC9B # HANGUL SYLLABLE KIYEOK-E-RIEULHIEUH +0xAC9C # HANGUL SYLLABLE KIYEOK-E-MIEUM +0xAC9D # HANGUL SYLLABLE KIYEOK-E-PIEUP +0xAC9E # HANGUL SYLLABLE KIYEOK-E-PIEUPSIOS +0xAC9F # HANGUL SYLLABLE KIYEOK-E-SIOS +0xACA0 # HANGUL SYLLABLE KIYEOK-E-SSANGSIOS +0xACA1 # HANGUL SYLLABLE KIYEOK-E-IEUNG +0xACA2 # HANGUL SYLLABLE KIYEOK-E-CIEUC +0xACA3 # HANGUL SYLLABLE KIYEOK-E-CHIEUCH +0xACA4 # HANGUL SYLLABLE KIYEOK-E-KHIEUKH +0xACA5 # HANGUL SYLLABLE KIYEOK-E-THIEUTH +0xACA6 # HANGUL SYLLABLE KIYEOK-E-PHIEUPH +0xACA7 # HANGUL SYLLABLE KIYEOK-E-HIEUH +0xACA8 # HANGUL SYLLABLE KIYEOK-YEO +0xACA9 # HANGUL SYLLABLE KIYEOK-YEO-KIYEOK +0xACAA # HANGUL SYLLABLE KIYEOK-YEO-SSANGKIYEOK +0xACAB # HANGUL SYLLABLE KIYEOK-YEO-KIYEOKSIOS +0xACAC # HANGUL SYLLABLE KIYEOK-YEO-NIEUN +0xACAD # HANGUL SYLLABLE KIYEOK-YEO-NIEUNCIEUC +0xACAE # HANGUL SYLLABLE KIYEOK-YEO-NIEUNHIEUH +0xACAF # HANGUL SYLLABLE KIYEOK-YEO-TIKEUT +0xACB0 # HANGUL SYLLABLE KIYEOK-YEO-RIEUL +0xACB1 # HANGUL SYLLABLE KIYEOK-YEO-RIEULKIYEOK +0xACB2 # HANGUL SYLLABLE KIYEOK-YEO-RIEULMIEUM +0xACB3 # HANGUL SYLLABLE KIYEOK-YEO-RIEULPIEUP +0xACB4 # HANGUL SYLLABLE KIYEOK-YEO-RIEULSIOS +0xACB5 # HANGUL SYLLABLE KIYEOK-YEO-RIEULTHIEUTH +0xACB6 # HANGUL SYLLABLE KIYEOK-YEO-RIEULPHIEUPH +0xACB7 # HANGUL SYLLABLE KIYEOK-YEO-RIEULHIEUH +0xACB8 # HANGUL SYLLABLE KIYEOK-YEO-MIEUM +0xACB9 # HANGUL SYLLABLE KIYEOK-YEO-PIEUP +0xACBA # HANGUL SYLLABLE KIYEOK-YEO-PIEUPSIOS +0xACBB # HANGUL SYLLABLE KIYEOK-YEO-SIOS +0xACBC # HANGUL SYLLABLE KIYEOK-YEO-SSANGSIOS +0xACBD # HANGUL SYLLABLE KIYEOK-YEO-IEUNG +0xACBE # HANGUL SYLLABLE KIYEOK-YEO-CIEUC +0xACBF # HANGUL SYLLABLE KIYEOK-YEO-CHIEUCH +0xACC0 # HANGUL SYLLABLE KIYEOK-YEO-KHIEUKH +0xACC1 # HANGUL SYLLABLE KIYEOK-YEO-THIEUTH +0xACC2 # HANGUL SYLLABLE KIYEOK-YEO-PHIEUPH +0xACC3 # HANGUL SYLLABLE KIYEOK-YEO-HIEUH +0xACC4 # HANGUL SYLLABLE KIYEOK-YE +0xACC5 # HANGUL SYLLABLE KIYEOK-YE-KIYEOK +0xACC6 # HANGUL SYLLABLE KIYEOK-YE-SSANGKIYEOK +0xACC7 # HANGUL SYLLABLE KIYEOK-YE-KIYEOKSIOS +0xACC8 # HANGUL SYLLABLE KIYEOK-YE-NIEUN +0xACC9 # HANGUL SYLLABLE KIYEOK-YE-NIEUNCIEUC +0xACCA # HANGUL SYLLABLE KIYEOK-YE-NIEUNHIEUH +0xACCB # HANGUL SYLLABLE KIYEOK-YE-TIKEUT +0xACCC # HANGUL SYLLABLE KIYEOK-YE-RIEUL +0xACCD # HANGUL SYLLABLE KIYEOK-YE-RIEULKIYEOK +0xACCE # HANGUL SYLLABLE KIYEOK-YE-RIEULMIEUM +0xACCF # HANGUL SYLLABLE KIYEOK-YE-RIEULPIEUP +0xACD0 # HANGUL SYLLABLE KIYEOK-YE-RIEULSIOS +0xACD1 # HANGUL SYLLABLE KIYEOK-YE-RIEULTHIEUTH +0xACD2 # HANGUL SYLLABLE KIYEOK-YE-RIEULPHIEUPH +0xACD3 # HANGUL SYLLABLE KIYEOK-YE-RIEULHIEUH +0xACD4 # HANGUL SYLLABLE KIYEOK-YE-MIEUM +0xACD5 # HANGUL SYLLABLE KIYEOK-YE-PIEUP +0xACD6 # HANGUL SYLLABLE KIYEOK-YE-PIEUPSIOS +0xACD7 # HANGUL SYLLABLE KIYEOK-YE-SIOS +0xACD8 # HANGUL SYLLABLE KIYEOK-YE-SSANGSIOS +0xACD9 # HANGUL SYLLABLE KIYEOK-YE-IEUNG +0xACDA # HANGUL SYLLABLE KIYEOK-YE-CIEUC +0xACDB # HANGUL SYLLABLE KIYEOK-YE-CHIEUCH +0xACDC # HANGUL SYLLABLE KIYEOK-YE-KHIEUKH +0xACDD # HANGUL SYLLABLE KIYEOK-YE-THIEUTH +0xACDE # HANGUL SYLLABLE KIYEOK-YE-PHIEUPH +0xACDF # HANGUL SYLLABLE KIYEOK-YE-HIEUH +0xACE0 # HANGUL SYLLABLE KIYEOK-O +0xACE1 # HANGUL SYLLABLE KIYEOK-O-KIYEOK +0xACE2 # HANGUL SYLLABLE KIYEOK-O-SSANGKIYEOK +0xACE3 # HANGUL SYLLABLE KIYEOK-O-KIYEOKSIOS +0xACE4 # HANGUL SYLLABLE KIYEOK-O-NIEUN +0xACE5 # HANGUL SYLLABLE KIYEOK-O-NIEUNCIEUC +0xACE6 # HANGUL SYLLABLE KIYEOK-O-NIEUNHIEUH +0xACE7 # HANGUL SYLLABLE KIYEOK-O-TIKEUT +0xACE8 # HANGUL SYLLABLE KIYEOK-O-RIEUL +0xACE9 # HANGUL SYLLABLE KIYEOK-O-RIEULKIYEOK +0xACEA # HANGUL SYLLABLE KIYEOK-O-RIEULMIEUM +0xACEB # HANGUL SYLLABLE KIYEOK-O-RIEULPIEUP +0xACEC # HANGUL SYLLABLE KIYEOK-O-RIEULSIOS +0xACED # HANGUL SYLLABLE KIYEOK-O-RIEULTHIEUTH +0xACEE # HANGUL SYLLABLE KIYEOK-O-RIEULPHIEUPH +0xACEF # HANGUL SYLLABLE KIYEOK-O-RIEULHIEUH +0xACF0 # HANGUL SYLLABLE KIYEOK-O-MIEUM +0xACF1 # HANGUL SYLLABLE KIYEOK-O-PIEUP +0xACF2 # HANGUL SYLLABLE KIYEOK-O-PIEUPSIOS +0xACF3 # HANGUL SYLLABLE KIYEOK-O-SIOS +0xACF4 # HANGUL SYLLABLE KIYEOK-O-SSANGSIOS +0xACF5 # HANGUL SYLLABLE KIYEOK-O-IEUNG +0xACF6 # HANGUL SYLLABLE KIYEOK-O-CIEUC +0xACF7 # HANGUL SYLLABLE KIYEOK-O-CHIEUCH +0xACF8 # HANGUL SYLLABLE KIYEOK-O-KHIEUKH +0xACF9 # HANGUL SYLLABLE KIYEOK-O-THIEUTH +0xACFA # HANGUL SYLLABLE KIYEOK-O-PHIEUPH +0xACFB # HANGUL SYLLABLE KIYEOK-O-HIEUH +0xACFC # HANGUL SYLLABLE KIYEOK-WA +0xACFD # HANGUL SYLLABLE KIYEOK-WA-KIYEOK +0xACFE # HANGUL SYLLABLE KIYEOK-WA-SSANGKIYEOK +0xACFF # HANGUL SYLLABLE KIYEOK-WA-KIYEOKSIOS +0xAD00 # HANGUL SYLLABLE KIYEOK-WA-NIEUN +0xAD01 # HANGUL SYLLABLE KIYEOK-WA-NIEUNCIEUC +0xAD02 # HANGUL SYLLABLE KIYEOK-WA-NIEUNHIEUH +0xAD03 # HANGUL SYLLABLE KIYEOK-WA-TIKEUT +0xAD04 # HANGUL SYLLABLE KIYEOK-WA-RIEUL +0xAD05 # HANGUL SYLLABLE KIYEOK-WA-RIEULKIYEOK +0xAD06 # HANGUL SYLLABLE KIYEOK-WA-RIEULMIEUM +0xAD07 # HANGUL SYLLABLE KIYEOK-WA-RIEULPIEUP +0xAD08 # HANGUL SYLLABLE KIYEOK-WA-RIEULSIOS +0xAD09 # HANGUL SYLLABLE KIYEOK-WA-RIEULTHIEUTH +0xAD0A # HANGUL SYLLABLE KIYEOK-WA-RIEULPHIEUPH +0xAD0B # HANGUL SYLLABLE KIYEOK-WA-RIEULHIEUH +0xAD0C # HANGUL SYLLABLE KIYEOK-WA-MIEUM +0xAD0D # HANGUL SYLLABLE KIYEOK-WA-PIEUP +0xAD0E # HANGUL SYLLABLE KIYEOK-WA-PIEUPSIOS +0xAD0F # HANGUL SYLLABLE KIYEOK-WA-SIOS +0xAD10 # HANGUL SYLLABLE KIYEOK-WA-SSANGSIOS +0xAD11 # HANGUL SYLLABLE KIYEOK-WA-IEUNG +0xAD12 # HANGUL SYLLABLE KIYEOK-WA-CIEUC +0xAD13 # HANGUL SYLLABLE KIYEOK-WA-CHIEUCH +0xAD14 # HANGUL SYLLABLE KIYEOK-WA-KHIEUKH +0xAD15 # HANGUL SYLLABLE KIYEOK-WA-THIEUTH +0xAD16 # HANGUL SYLLABLE KIYEOK-WA-PHIEUPH +0xAD17 # HANGUL SYLLABLE KIYEOK-WA-HIEUH +0xAD18 # HANGUL SYLLABLE KIYEOK-WAE +0xAD19 # HANGUL SYLLABLE KIYEOK-WAE-KIYEOK +0xAD1A # HANGUL SYLLABLE KIYEOK-WAE-SSANGKIYEOK +0xAD1B # HANGUL SYLLABLE KIYEOK-WAE-KIYEOKSIOS +0xAD1C # HANGUL SYLLABLE KIYEOK-WAE-NIEUN +0xAD1D # HANGUL SYLLABLE KIYEOK-WAE-NIEUNCIEUC +0xAD1E # HANGUL SYLLABLE KIYEOK-WAE-NIEUNHIEUH +0xAD1F # HANGUL SYLLABLE KIYEOK-WAE-TIKEUT +0xAD20 # HANGUL SYLLABLE KIYEOK-WAE-RIEUL +0xAD21 # HANGUL SYLLABLE KIYEOK-WAE-RIEULKIYEOK +0xAD22 # HANGUL SYLLABLE KIYEOK-WAE-RIEULMIEUM +0xAD23 # HANGUL SYLLABLE KIYEOK-WAE-RIEULPIEUP +0xAD24 # HANGUL SYLLABLE KIYEOK-WAE-RIEULSIOS +0xAD25 # HANGUL SYLLABLE KIYEOK-WAE-RIEULTHIEUTH +0xAD26 # HANGUL SYLLABLE KIYEOK-WAE-RIEULPHIEUPH +0xAD27 # HANGUL SYLLABLE KIYEOK-WAE-RIEULHIEUH +0xAD28 # HANGUL SYLLABLE KIYEOK-WAE-MIEUM +0xAD29 # HANGUL SYLLABLE KIYEOK-WAE-PIEUP +0xAD2A # HANGUL SYLLABLE KIYEOK-WAE-PIEUPSIOS +0xAD2B # HANGUL SYLLABLE KIYEOK-WAE-SIOS +0xAD2C # HANGUL SYLLABLE KIYEOK-WAE-SSANGSIOS +0xAD2D # HANGUL SYLLABLE KIYEOK-WAE-IEUNG +0xAD2E # HANGUL SYLLABLE KIYEOK-WAE-CIEUC +0xAD2F # HANGUL SYLLABLE KIYEOK-WAE-CHIEUCH +0xAD30 # HANGUL SYLLABLE KIYEOK-WAE-KHIEUKH +0xAD31 # HANGUL SYLLABLE KIYEOK-WAE-THIEUTH +0xAD32 # HANGUL SYLLABLE KIYEOK-WAE-PHIEUPH +0xAD33 # HANGUL SYLLABLE KIYEOK-WAE-HIEUH +0xAD34 # HANGUL SYLLABLE KIYEOK-OE +0xAD35 # HANGUL SYLLABLE KIYEOK-OE-KIYEOK +0xAD36 # HANGUL SYLLABLE KIYEOK-OE-SSANGKIYEOK +0xAD37 # HANGUL SYLLABLE KIYEOK-OE-KIYEOKSIOS +0xAD38 # HANGUL SYLLABLE KIYEOK-OE-NIEUN +0xAD39 # HANGUL SYLLABLE KIYEOK-OE-NIEUNCIEUC +0xAD3A # HANGUL SYLLABLE KIYEOK-OE-NIEUNHIEUH +0xAD3B # HANGUL SYLLABLE KIYEOK-OE-TIKEUT +0xAD3C # HANGUL SYLLABLE KIYEOK-OE-RIEUL +0xAD3D # HANGUL SYLLABLE KIYEOK-OE-RIEULKIYEOK +0xAD3E # HANGUL SYLLABLE KIYEOK-OE-RIEULMIEUM +0xAD3F # HANGUL SYLLABLE KIYEOK-OE-RIEULPIEUP +0xAD40 # HANGUL SYLLABLE KIYEOK-OE-RIEULSIOS +0xAD41 # HANGUL SYLLABLE KIYEOK-OE-RIEULTHIEUTH +0xAD42 # HANGUL SYLLABLE KIYEOK-OE-RIEULPHIEUPH +0xAD43 # HANGUL SYLLABLE KIYEOK-OE-RIEULHIEUH +0xAD44 # HANGUL SYLLABLE KIYEOK-OE-MIEUM +0xAD45 # HANGUL SYLLABLE KIYEOK-OE-PIEUP +0xAD46 # HANGUL SYLLABLE KIYEOK-OE-PIEUPSIOS +0xAD47 # HANGUL SYLLABLE KIYEOK-OE-SIOS +0xAD48 # HANGUL SYLLABLE KIYEOK-OE-SSANGSIOS +0xAD49 # HANGUL SYLLABLE KIYEOK-OE-IEUNG +0xAD4A # HANGUL SYLLABLE KIYEOK-OE-CIEUC +0xAD4B # HANGUL SYLLABLE KIYEOK-OE-CHIEUCH +0xAD4C # HANGUL SYLLABLE KIYEOK-OE-KHIEUKH +0xAD4D # HANGUL SYLLABLE KIYEOK-OE-THIEUTH +0xAD4E # HANGUL SYLLABLE KIYEOK-OE-PHIEUPH +0xAD4F # HANGUL SYLLABLE KIYEOK-OE-HIEUH +0xAD50 # HANGUL SYLLABLE KIYEOK-YO +0xAD51 # HANGUL SYLLABLE KIYEOK-YO-KIYEOK +0xAD52 # HANGUL SYLLABLE KIYEOK-YO-SSANGKIYEOK +0xAD53 # HANGUL SYLLABLE KIYEOK-YO-KIYEOKSIOS +0xAD54 # HANGUL SYLLABLE KIYEOK-YO-NIEUN +0xAD55 # HANGUL SYLLABLE KIYEOK-YO-NIEUNCIEUC +0xAD56 # HANGUL SYLLABLE KIYEOK-YO-NIEUNHIEUH +0xAD57 # HANGUL SYLLABLE KIYEOK-YO-TIKEUT +0xAD58 # HANGUL SYLLABLE KIYEOK-YO-RIEUL +0xAD59 # HANGUL SYLLABLE KIYEOK-YO-RIEULKIYEOK +0xAD5A # HANGUL SYLLABLE KIYEOK-YO-RIEULMIEUM +0xAD5B # HANGUL SYLLABLE KIYEOK-YO-RIEULPIEUP +0xAD5C # HANGUL SYLLABLE KIYEOK-YO-RIEULSIOS +0xAD5D # HANGUL SYLLABLE KIYEOK-YO-RIEULTHIEUTH +0xAD5E # HANGUL SYLLABLE KIYEOK-YO-RIEULPHIEUPH +0xAD5F # HANGUL SYLLABLE KIYEOK-YO-RIEULHIEUH +0xAD60 # HANGUL SYLLABLE KIYEOK-YO-MIEUM +0xAD61 # HANGUL SYLLABLE KIYEOK-YO-PIEUP +0xAD62 # HANGUL SYLLABLE KIYEOK-YO-PIEUPSIOS +0xAD63 # HANGUL SYLLABLE KIYEOK-YO-SIOS +0xAD64 # HANGUL SYLLABLE KIYEOK-YO-SSANGSIOS +0xAD65 # HANGUL SYLLABLE KIYEOK-YO-IEUNG +0xAD66 # HANGUL SYLLABLE KIYEOK-YO-CIEUC +0xAD67 # HANGUL SYLLABLE KIYEOK-YO-CHIEUCH +0xAD68 # HANGUL SYLLABLE KIYEOK-YO-KHIEUKH +0xAD69 # HANGUL SYLLABLE KIYEOK-YO-THIEUTH +0xAD6A # HANGUL SYLLABLE KIYEOK-YO-PHIEUPH +0xAD6B # HANGUL SYLLABLE KIYEOK-YO-HIEUH +0xAD6C # HANGUL SYLLABLE KIYEOK-U +0xAD6D # HANGUL SYLLABLE KIYEOK-U-KIYEOK +0xAD6E # HANGUL SYLLABLE KIYEOK-U-SSANGKIYEOK +0xAD6F # HANGUL SYLLABLE KIYEOK-U-KIYEOKSIOS +0xAD70 # HANGUL SYLLABLE KIYEOK-U-NIEUN +0xAD71 # HANGUL SYLLABLE KIYEOK-U-NIEUNCIEUC +0xAD72 # HANGUL SYLLABLE KIYEOK-U-NIEUNHIEUH +0xAD73 # HANGUL SYLLABLE KIYEOK-U-TIKEUT +0xAD74 # HANGUL SYLLABLE KIYEOK-U-RIEUL +0xAD75 # HANGUL SYLLABLE KIYEOK-U-RIEULKIYEOK +0xAD76 # HANGUL SYLLABLE KIYEOK-U-RIEULMIEUM +0xAD77 # HANGUL SYLLABLE KIYEOK-U-RIEULPIEUP +0xAD78 # HANGUL SYLLABLE KIYEOK-U-RIEULSIOS +0xAD79 # HANGUL SYLLABLE KIYEOK-U-RIEULTHIEUTH +0xAD7A # HANGUL SYLLABLE KIYEOK-U-RIEULPHIEUPH +0xAD7B # HANGUL SYLLABLE KIYEOK-U-RIEULHIEUH +0xAD7C # HANGUL SYLLABLE KIYEOK-U-MIEUM +0xAD7D # HANGUL SYLLABLE KIYEOK-U-PIEUP +0xAD7E # HANGUL SYLLABLE KIYEOK-U-PIEUPSIOS +0xAD7F # HANGUL SYLLABLE KIYEOK-U-SIOS +0xAD80 # HANGUL SYLLABLE KIYEOK-U-SSANGSIOS +0xAD81 # HANGUL SYLLABLE KIYEOK-U-IEUNG +0xAD82 # HANGUL SYLLABLE KIYEOK-U-CIEUC +0xAD83 # HANGUL SYLLABLE KIYEOK-U-CHIEUCH +0xAD84 # HANGUL SYLLABLE KIYEOK-U-KHIEUKH +0xAD85 # HANGUL SYLLABLE KIYEOK-U-THIEUTH +0xAD86 # HANGUL SYLLABLE KIYEOK-U-PHIEUPH +0xAD87 # HANGUL SYLLABLE KIYEOK-U-HIEUH +0xAD88 # HANGUL SYLLABLE KIYEOK-WEO +0xAD89 # HANGUL SYLLABLE KIYEOK-WEO-KIYEOK +0xAD8A # HANGUL SYLLABLE KIYEOK-WEO-SSANGKIYEOK +0xAD8B # HANGUL SYLLABLE KIYEOK-WEO-KIYEOKSIOS +0xAD8C # HANGUL SYLLABLE KIYEOK-WEO-NIEUN +0xAD8D # HANGUL SYLLABLE KIYEOK-WEO-NIEUNCIEUC +0xAD8E # HANGUL SYLLABLE KIYEOK-WEO-NIEUNHIEUH +0xAD8F # HANGUL SYLLABLE KIYEOK-WEO-TIKEUT +0xAD90 # HANGUL SYLLABLE KIYEOK-WEO-RIEUL +0xAD91 # HANGUL SYLLABLE KIYEOK-WEO-RIEULKIYEOK +0xAD92 # HANGUL SYLLABLE KIYEOK-WEO-RIEULMIEUM +0xAD93 # HANGUL SYLLABLE KIYEOK-WEO-RIEULPIEUP +0xAD94 # HANGUL SYLLABLE KIYEOK-WEO-RIEULSIOS +0xAD95 # HANGUL SYLLABLE KIYEOK-WEO-RIEULTHIEUTH +0xAD96 # HANGUL SYLLABLE KIYEOK-WEO-RIEULPHIEUPH +0xAD97 # HANGUL SYLLABLE KIYEOK-WEO-RIEULHIEUH +0xAD98 # HANGUL SYLLABLE KIYEOK-WEO-MIEUM +0xAD99 # HANGUL SYLLABLE KIYEOK-WEO-PIEUP +0xAD9A # HANGUL SYLLABLE KIYEOK-WEO-PIEUPSIOS +0xAD9B # HANGUL SYLLABLE KIYEOK-WEO-SIOS +0xAD9C # HANGUL SYLLABLE KIYEOK-WEO-SSANGSIOS +0xAD9D # HANGUL SYLLABLE KIYEOK-WEO-IEUNG +0xAD9E # HANGUL SYLLABLE KIYEOK-WEO-CIEUC +0xAD9F # HANGUL SYLLABLE KIYEOK-WEO-CHIEUCH +0xADA0 # HANGUL SYLLABLE KIYEOK-WEO-KHIEUKH +0xADA1 # HANGUL SYLLABLE KIYEOK-WEO-THIEUTH +0xADA2 # HANGUL SYLLABLE KIYEOK-WEO-PHIEUPH +0xADA3 # HANGUL SYLLABLE KIYEOK-WEO-HIEUH +0xADA4 # HANGUL SYLLABLE KIYEOK-WE +0xADA5 # HANGUL SYLLABLE KIYEOK-WE-KIYEOK +0xADA6 # HANGUL SYLLABLE KIYEOK-WE-SSANGKIYEOK +0xADA7 # HANGUL SYLLABLE KIYEOK-WE-KIYEOKSIOS +0xADA8 # HANGUL SYLLABLE KIYEOK-WE-NIEUN +0xADA9 # HANGUL SYLLABLE KIYEOK-WE-NIEUNCIEUC +0xADAA # HANGUL SYLLABLE KIYEOK-WE-NIEUNHIEUH +0xADAB # HANGUL SYLLABLE KIYEOK-WE-TIKEUT +0xADAC # HANGUL SYLLABLE KIYEOK-WE-RIEUL +0xADAD # HANGUL SYLLABLE KIYEOK-WE-RIEULKIYEOK +0xADAE # HANGUL SYLLABLE KIYEOK-WE-RIEULMIEUM +0xADAF # HANGUL SYLLABLE KIYEOK-WE-RIEULPIEUP +0xADB0 # HANGUL SYLLABLE KIYEOK-WE-RIEULSIOS +0xADB1 # HANGUL SYLLABLE KIYEOK-WE-RIEULTHIEUTH +0xADB2 # HANGUL SYLLABLE KIYEOK-WE-RIEULPHIEUPH +0xADB3 # HANGUL SYLLABLE KIYEOK-WE-RIEULHIEUH +0xADB4 # HANGUL SYLLABLE KIYEOK-WE-MIEUM +0xADB5 # HANGUL SYLLABLE KIYEOK-WE-PIEUP +0xADB6 # HANGUL SYLLABLE KIYEOK-WE-PIEUPSIOS +0xADB7 # HANGUL SYLLABLE KIYEOK-WE-SIOS +0xADB8 # HANGUL SYLLABLE KIYEOK-WE-SSANGSIOS +0xADB9 # HANGUL SYLLABLE KIYEOK-WE-IEUNG +0xADBA # HANGUL SYLLABLE KIYEOK-WE-CIEUC +0xADBB # HANGUL SYLLABLE KIYEOK-WE-CHIEUCH +0xADBC # HANGUL SYLLABLE KIYEOK-WE-KHIEUKH +0xADBD # HANGUL SYLLABLE KIYEOK-WE-THIEUTH +0xADBE # HANGUL SYLLABLE KIYEOK-WE-PHIEUPH +0xADBF # HANGUL SYLLABLE KIYEOK-WE-HIEUH +0xADC0 # HANGUL SYLLABLE KIYEOK-WI +0xADC1 # HANGUL SYLLABLE KIYEOK-WI-KIYEOK +0xADC2 # HANGUL SYLLABLE KIYEOK-WI-SSANGKIYEOK +0xADC3 # HANGUL SYLLABLE KIYEOK-WI-KIYEOKSIOS +0xADC4 # HANGUL SYLLABLE KIYEOK-WI-NIEUN +0xADC5 # HANGUL SYLLABLE KIYEOK-WI-NIEUNCIEUC +0xADC6 # HANGUL SYLLABLE KIYEOK-WI-NIEUNHIEUH +0xADC7 # HANGUL SYLLABLE KIYEOK-WI-TIKEUT +0xADC8 # HANGUL SYLLABLE KIYEOK-WI-RIEUL +0xADC9 # HANGUL SYLLABLE KIYEOK-WI-RIEULKIYEOK +0xADCA # HANGUL SYLLABLE KIYEOK-WI-RIEULMIEUM +0xADCB # HANGUL SYLLABLE KIYEOK-WI-RIEULPIEUP +0xADCC # HANGUL SYLLABLE KIYEOK-WI-RIEULSIOS +0xADCD # HANGUL SYLLABLE KIYEOK-WI-RIEULTHIEUTH +0xADCE # HANGUL SYLLABLE KIYEOK-WI-RIEULPHIEUPH +0xADCF # HANGUL SYLLABLE KIYEOK-WI-RIEULHIEUH +0xADD0 # HANGUL SYLLABLE KIYEOK-WI-MIEUM +0xADD1 # HANGUL SYLLABLE KIYEOK-WI-PIEUP +0xADD2 # HANGUL SYLLABLE KIYEOK-WI-PIEUPSIOS +0xADD3 # HANGUL SYLLABLE KIYEOK-WI-SIOS +0xADD4 # HANGUL SYLLABLE KIYEOK-WI-SSANGSIOS +0xADD5 # HANGUL SYLLABLE KIYEOK-WI-IEUNG +0xADD6 # HANGUL SYLLABLE KIYEOK-WI-CIEUC +0xADD7 # HANGUL SYLLABLE KIYEOK-WI-CHIEUCH +0xADD8 # HANGUL SYLLABLE KIYEOK-WI-KHIEUKH +0xADD9 # HANGUL SYLLABLE KIYEOK-WI-THIEUTH +0xADDA # HANGUL SYLLABLE KIYEOK-WI-PHIEUPH +0xADDB # HANGUL SYLLABLE KIYEOK-WI-HIEUH +0xADDC # HANGUL SYLLABLE KIYEOK-YU +0xADDD # HANGUL SYLLABLE KIYEOK-YU-KIYEOK +0xADDE # HANGUL SYLLABLE KIYEOK-YU-SSANGKIYEOK +0xADDF # HANGUL SYLLABLE KIYEOK-YU-KIYEOKSIOS +0xADE0 # HANGUL SYLLABLE KIYEOK-YU-NIEUN +0xADE1 # HANGUL SYLLABLE KIYEOK-YU-NIEUNCIEUC +0xADE2 # HANGUL SYLLABLE KIYEOK-YU-NIEUNHIEUH +0xADE3 # HANGUL SYLLABLE KIYEOK-YU-TIKEUT +0xADE4 # HANGUL SYLLABLE KIYEOK-YU-RIEUL +0xADE5 # HANGUL SYLLABLE KIYEOK-YU-RIEULKIYEOK +0xADE6 # HANGUL SYLLABLE KIYEOK-YU-RIEULMIEUM +0xADE7 # HANGUL SYLLABLE KIYEOK-YU-RIEULPIEUP +0xADE8 # HANGUL SYLLABLE KIYEOK-YU-RIEULSIOS +0xADE9 # HANGUL SYLLABLE KIYEOK-YU-RIEULTHIEUTH +0xADEA # HANGUL SYLLABLE KIYEOK-YU-RIEULPHIEUPH +0xADEB # HANGUL SYLLABLE KIYEOK-YU-RIEULHIEUH +0xADEC # HANGUL SYLLABLE KIYEOK-YU-MIEUM +0xADED # HANGUL SYLLABLE KIYEOK-YU-PIEUP +0xADEE # HANGUL SYLLABLE KIYEOK-YU-PIEUPSIOS +0xADEF # HANGUL SYLLABLE KIYEOK-YU-SIOS +0xADF0 # HANGUL SYLLABLE KIYEOK-YU-SSANGSIOS +0xADF1 # HANGUL SYLLABLE KIYEOK-YU-IEUNG +0xADF2 # HANGUL SYLLABLE KIYEOK-YU-CIEUC +0xADF3 # HANGUL SYLLABLE KIYEOK-YU-CHIEUCH +0xADF4 # HANGUL SYLLABLE KIYEOK-YU-KHIEUKH +0xADF5 # HANGUL SYLLABLE KIYEOK-YU-THIEUTH +0xADF6 # HANGUL SYLLABLE KIYEOK-YU-PHIEUPH +0xADF7 # HANGUL SYLLABLE KIYEOK-YU-HIEUH +0xADF8 # HANGUL SYLLABLE KIYEOK-EU +0xADF9 # HANGUL SYLLABLE KIYEOK-EU-KIYEOK +0xADFA # HANGUL SYLLABLE KIYEOK-EU-SSANGKIYEOK +0xADFB # HANGUL SYLLABLE KIYEOK-EU-KIYEOKSIOS +0xADFC # HANGUL SYLLABLE KIYEOK-EU-NIEUN +0xADFD # HANGUL SYLLABLE KIYEOK-EU-NIEUNCIEUC +0xADFE # HANGUL SYLLABLE KIYEOK-EU-NIEUNHIEUH +0xADFF # HANGUL SYLLABLE KIYEOK-EU-TIKEUT +0xAE00 # HANGUL SYLLABLE KIYEOK-EU-RIEUL +0xAE01 # HANGUL SYLLABLE KIYEOK-EU-RIEULKIYEOK +0xAE02 # HANGUL SYLLABLE KIYEOK-EU-RIEULMIEUM +0xAE03 # HANGUL SYLLABLE KIYEOK-EU-RIEULPIEUP +0xAE04 # HANGUL SYLLABLE KIYEOK-EU-RIEULSIOS +0xAE05 # HANGUL SYLLABLE KIYEOK-EU-RIEULTHIEUTH +0xAE06 # HANGUL SYLLABLE KIYEOK-EU-RIEULPHIEUPH +0xAE07 # HANGUL SYLLABLE KIYEOK-EU-RIEULHIEUH +0xAE08 # HANGUL SYLLABLE KIYEOK-EU-MIEUM +0xAE09 # HANGUL SYLLABLE KIYEOK-EU-PIEUP +0xAE0A # HANGUL SYLLABLE KIYEOK-EU-PIEUPSIOS +0xAE0B # HANGUL SYLLABLE KIYEOK-EU-SIOS +0xAE0C # HANGUL SYLLABLE KIYEOK-EU-SSANGSIOS +0xAE0D # HANGUL SYLLABLE KIYEOK-EU-IEUNG +0xAE0E # HANGUL SYLLABLE KIYEOK-EU-CIEUC +0xAE0F # HANGUL SYLLABLE KIYEOK-EU-CHIEUCH +0xAE10 # HANGUL SYLLABLE KIYEOK-EU-KHIEUKH +0xAE11 # HANGUL SYLLABLE KIYEOK-EU-THIEUTH +0xAE12 # HANGUL SYLLABLE KIYEOK-EU-PHIEUPH +0xAE13 # HANGUL SYLLABLE KIYEOK-EU-HIEUH +0xAE14 # HANGUL SYLLABLE KIYEOK-YI +0xAE15 # HANGUL SYLLABLE KIYEOK-YI-KIYEOK +0xAE16 # HANGUL SYLLABLE KIYEOK-YI-SSANGKIYEOK +0xAE17 # HANGUL SYLLABLE KIYEOK-YI-KIYEOKSIOS +0xAE18 # HANGUL SYLLABLE KIYEOK-YI-NIEUN +0xAE19 # HANGUL SYLLABLE KIYEOK-YI-NIEUNCIEUC +0xAE1A # HANGUL SYLLABLE KIYEOK-YI-NIEUNHIEUH +0xAE1B # HANGUL SYLLABLE KIYEOK-YI-TIKEUT +0xAE1C # HANGUL SYLLABLE KIYEOK-YI-RIEUL +0xAE1D # HANGUL SYLLABLE KIYEOK-YI-RIEULKIYEOK +0xAE1E # HANGUL SYLLABLE KIYEOK-YI-RIEULMIEUM +0xAE1F # HANGUL SYLLABLE KIYEOK-YI-RIEULPIEUP +0xAE20 # HANGUL SYLLABLE KIYEOK-YI-RIEULSIOS +0xAE21 # HANGUL SYLLABLE KIYEOK-YI-RIEULTHIEUTH +0xAE22 # HANGUL SYLLABLE KIYEOK-YI-RIEULPHIEUPH +0xAE23 # HANGUL SYLLABLE KIYEOK-YI-RIEULHIEUH +0xAE24 # HANGUL SYLLABLE KIYEOK-YI-MIEUM +0xAE25 # HANGUL SYLLABLE KIYEOK-YI-PIEUP +0xAE26 # HANGUL SYLLABLE KIYEOK-YI-PIEUPSIOS +0xAE27 # HANGUL SYLLABLE KIYEOK-YI-SIOS +0xAE28 # HANGUL SYLLABLE KIYEOK-YI-SSANGSIOS +0xAE29 # HANGUL SYLLABLE KIYEOK-YI-IEUNG +0xAE2A # HANGUL SYLLABLE KIYEOK-YI-CIEUC +0xAE2B # HANGUL SYLLABLE KIYEOK-YI-CHIEUCH +0xAE2C # HANGUL SYLLABLE KIYEOK-YI-KHIEUKH +0xAE2D # HANGUL SYLLABLE KIYEOK-YI-THIEUTH +0xAE2E # HANGUL SYLLABLE KIYEOK-YI-PHIEUPH +0xAE2F # HANGUL SYLLABLE KIYEOK-YI-HIEUH +0xAE30 # HANGUL SYLLABLE KIYEOK-I +0xAE31 # HANGUL SYLLABLE KIYEOK-I-KIYEOK +0xAE32 # HANGUL SYLLABLE KIYEOK-I-SSANGKIYEOK +0xAE33 # HANGUL SYLLABLE KIYEOK-I-KIYEOKSIOS +0xAE34 # HANGUL SYLLABLE KIYEOK-I-NIEUN +0xAE35 # HANGUL SYLLABLE KIYEOK-I-NIEUNCIEUC +0xAE36 # HANGUL SYLLABLE KIYEOK-I-NIEUNHIEUH +0xAE37 # HANGUL SYLLABLE KIYEOK-I-TIKEUT +0xAE38 # HANGUL SYLLABLE KIYEOK-I-RIEUL +0xAE39 # HANGUL SYLLABLE KIYEOK-I-RIEULKIYEOK +0xAE3A # HANGUL SYLLABLE KIYEOK-I-RIEULMIEUM +0xAE3B # HANGUL SYLLABLE KIYEOK-I-RIEULPIEUP +0xAE3C # HANGUL SYLLABLE KIYEOK-I-RIEULSIOS +0xAE3D # HANGUL SYLLABLE KIYEOK-I-RIEULTHIEUTH +0xAE3E # HANGUL SYLLABLE KIYEOK-I-RIEULPHIEUPH +0xAE3F # HANGUL SYLLABLE KIYEOK-I-RIEULHIEUH +0xAE40 # HANGUL SYLLABLE KIYEOK-I-MIEUM +0xAE41 # HANGUL SYLLABLE KIYEOK-I-PIEUP +0xAE42 # HANGUL SYLLABLE KIYEOK-I-PIEUPSIOS +0xAE43 # HANGUL SYLLABLE KIYEOK-I-SIOS +0xAE44 # HANGUL SYLLABLE KIYEOK-I-SSANGSIOS +0xAE45 # HANGUL SYLLABLE KIYEOK-I-IEUNG +0xAE46 # HANGUL SYLLABLE KIYEOK-I-CIEUC +0xAE47 # HANGUL SYLLABLE KIYEOK-I-CHIEUCH +0xAE48 # HANGUL SYLLABLE KIYEOK-I-KHIEUKH +0xAE49 # HANGUL SYLLABLE KIYEOK-I-THIEUTH +0xAE4A # HANGUL SYLLABLE KIYEOK-I-PHIEUPH +0xAE4B # HANGUL SYLLABLE KIYEOK-I-HIEUH +0xAE4C # HANGUL SYLLABLE SSANGKIYEOK-A +0xAE4D # HANGUL SYLLABLE SSANGKIYEOK-A-KIYEOK +0xAE4E # HANGUL SYLLABLE SSANGKIYEOK-A-SSANGKIYEOK +0xAE4F # HANGUL SYLLABLE SSANGKIYEOK-A-KIYEOKSIOS +0xAE50 # HANGUL SYLLABLE SSANGKIYEOK-A-NIEUN +0xAE51 # HANGUL SYLLABLE SSANGKIYEOK-A-NIEUNCIEUC +0xAE52 # HANGUL SYLLABLE SSANGKIYEOK-A-NIEUNHIEUH +0xAE53 # HANGUL SYLLABLE SSANGKIYEOK-A-TIKEUT +0xAE54 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEUL +0xAE55 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULKIYEOK +0xAE56 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULMIEUM +0xAE57 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULPIEUP +0xAE58 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULSIOS +0xAE59 # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULTHIEUTH +0xAE5A # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULPHIEUPH +0xAE5B # HANGUL SYLLABLE SSANGKIYEOK-A-RIEULHIEUH +0xAE5C # HANGUL SYLLABLE SSANGKIYEOK-A-MIEUM +0xAE5D # HANGUL SYLLABLE SSANGKIYEOK-A-PIEUP +0xAE5E # HANGUL SYLLABLE SSANGKIYEOK-A-PIEUPSIOS +0xAE5F # HANGUL SYLLABLE SSANGKIYEOK-A-SIOS +0xAE60 # HANGUL SYLLABLE SSANGKIYEOK-A-SSANGSIOS +0xAE61 # HANGUL SYLLABLE SSANGKIYEOK-A-IEUNG +0xAE62 # HANGUL SYLLABLE SSANGKIYEOK-A-CIEUC +0xAE63 # HANGUL SYLLABLE SSANGKIYEOK-A-CHIEUCH +0xAE64 # HANGUL SYLLABLE SSANGKIYEOK-A-KHIEUKH +0xAE65 # HANGUL SYLLABLE SSANGKIYEOK-A-THIEUTH +0xAE66 # HANGUL SYLLABLE SSANGKIYEOK-A-PHIEUPH +0xAE67 # HANGUL SYLLABLE SSANGKIYEOK-A-HIEUH +0xAE68 # HANGUL SYLLABLE SSANGKIYEOK-AE +0xAE69 # HANGUL SYLLABLE SSANGKIYEOK-AE-KIYEOK +0xAE6A # HANGUL SYLLABLE SSANGKIYEOK-AE-SSANGKIYEOK +0xAE6B # HANGUL SYLLABLE SSANGKIYEOK-AE-KIYEOKSIOS +0xAE6C # HANGUL SYLLABLE SSANGKIYEOK-AE-NIEUN +0xAE6D # HANGUL SYLLABLE SSANGKIYEOK-AE-NIEUNCIEUC +0xAE6E # HANGUL SYLLABLE SSANGKIYEOK-AE-NIEUNHIEUH +0xAE6F # HANGUL SYLLABLE SSANGKIYEOK-AE-TIKEUT +0xAE70 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEUL +0xAE71 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULKIYEOK +0xAE72 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULMIEUM +0xAE73 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULPIEUP +0xAE74 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULSIOS +0xAE75 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULTHIEUTH +0xAE76 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULPHIEUPH +0xAE77 # HANGUL SYLLABLE SSANGKIYEOK-AE-RIEULHIEUH +0xAE78 # HANGUL SYLLABLE SSANGKIYEOK-AE-MIEUM +0xAE79 # HANGUL SYLLABLE SSANGKIYEOK-AE-PIEUP +0xAE7A # HANGUL SYLLABLE SSANGKIYEOK-AE-PIEUPSIOS +0xAE7B # HANGUL SYLLABLE SSANGKIYEOK-AE-SIOS +0xAE7C # HANGUL SYLLABLE SSANGKIYEOK-AE-SSANGSIOS +0xAE7D # HANGUL SYLLABLE SSANGKIYEOK-AE-IEUNG +0xAE7E # HANGUL SYLLABLE SSANGKIYEOK-AE-CIEUC +0xAE7F # HANGUL SYLLABLE SSANGKIYEOK-AE-CHIEUCH +0xAE80 # HANGUL SYLLABLE SSANGKIYEOK-AE-KHIEUKH +0xAE81 # HANGUL SYLLABLE SSANGKIYEOK-AE-THIEUTH +0xAE82 # HANGUL SYLLABLE SSANGKIYEOK-AE-PHIEUPH +0xAE83 # HANGUL SYLLABLE SSANGKIYEOK-AE-HIEUH +0xAE84 # HANGUL SYLLABLE SSANGKIYEOK-YA +0xAE85 # HANGUL SYLLABLE SSANGKIYEOK-YA-KIYEOK +0xAE86 # HANGUL SYLLABLE SSANGKIYEOK-YA-SSANGKIYEOK +0xAE87 # HANGUL SYLLABLE SSANGKIYEOK-YA-KIYEOKSIOS +0xAE88 # HANGUL SYLLABLE SSANGKIYEOK-YA-NIEUN +0xAE89 # HANGUL SYLLABLE SSANGKIYEOK-YA-NIEUNCIEUC +0xAE8A # HANGUL SYLLABLE SSANGKIYEOK-YA-NIEUNHIEUH +0xAE8B # HANGUL SYLLABLE SSANGKIYEOK-YA-TIKEUT +0xAE8C # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEUL +0xAE8D # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULKIYEOK +0xAE8E # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULMIEUM +0xAE8F # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULPIEUP +0xAE90 # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULSIOS +0xAE91 # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULTHIEUTH +0xAE92 # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULPHIEUPH +0xAE93 # HANGUL SYLLABLE SSANGKIYEOK-YA-RIEULHIEUH +0xAE94 # HANGUL SYLLABLE SSANGKIYEOK-YA-MIEUM +0xAE95 # HANGUL SYLLABLE SSANGKIYEOK-YA-PIEUP +0xAE96 # HANGUL SYLLABLE SSANGKIYEOK-YA-PIEUPSIOS +0xAE97 # HANGUL SYLLABLE SSANGKIYEOK-YA-SIOS +0xAE98 # HANGUL SYLLABLE SSANGKIYEOK-YA-SSANGSIOS +0xAE99 # HANGUL SYLLABLE SSANGKIYEOK-YA-IEUNG +0xAE9A # HANGUL SYLLABLE SSANGKIYEOK-YA-CIEUC +0xAE9B # HANGUL SYLLABLE SSANGKIYEOK-YA-CHIEUCH +0xAE9C # HANGUL SYLLABLE SSANGKIYEOK-YA-KHIEUKH +0xAE9D # HANGUL SYLLABLE SSANGKIYEOK-YA-THIEUTH +0xAE9E # HANGUL SYLLABLE SSANGKIYEOK-YA-PHIEUPH +0xAE9F # HANGUL SYLLABLE SSANGKIYEOK-YA-HIEUH +0xAEA0 # HANGUL SYLLABLE SSANGKIYEOK-YAE +0xAEA1 # HANGUL SYLLABLE SSANGKIYEOK-YAE-KIYEOK +0xAEA2 # HANGUL SYLLABLE SSANGKIYEOK-YAE-SSANGKIYEOK +0xAEA3 # HANGUL SYLLABLE SSANGKIYEOK-YAE-KIYEOKSIOS +0xAEA4 # HANGUL SYLLABLE SSANGKIYEOK-YAE-NIEUN +0xAEA5 # HANGUL SYLLABLE SSANGKIYEOK-YAE-NIEUNCIEUC +0xAEA6 # HANGUL SYLLABLE SSANGKIYEOK-YAE-NIEUNHIEUH +0xAEA7 # HANGUL SYLLABLE SSANGKIYEOK-YAE-TIKEUT +0xAEA8 # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEUL +0xAEA9 # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULKIYEOK +0xAEAA # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULMIEUM +0xAEAB # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULPIEUP +0xAEAC # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULSIOS +0xAEAD # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULTHIEUTH +0xAEAE # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULPHIEUPH +0xAEAF # HANGUL SYLLABLE SSANGKIYEOK-YAE-RIEULHIEUH +0xAEB0 # HANGUL SYLLABLE SSANGKIYEOK-YAE-MIEUM +0xAEB1 # HANGUL SYLLABLE SSANGKIYEOK-YAE-PIEUP +0xAEB2 # HANGUL SYLLABLE SSANGKIYEOK-YAE-PIEUPSIOS +0xAEB3 # HANGUL SYLLABLE SSANGKIYEOK-YAE-SIOS +0xAEB4 # HANGUL SYLLABLE SSANGKIYEOK-YAE-SSANGSIOS +0xAEB5 # HANGUL SYLLABLE SSANGKIYEOK-YAE-IEUNG +0xAEB6 # HANGUL SYLLABLE SSANGKIYEOK-YAE-CIEUC +0xAEB7 # HANGUL SYLLABLE SSANGKIYEOK-YAE-CHIEUCH +0xAEB8 # HANGUL SYLLABLE SSANGKIYEOK-YAE-KHIEUKH +0xAEB9 # HANGUL SYLLABLE SSANGKIYEOK-YAE-THIEUTH +0xAEBA # HANGUL SYLLABLE SSANGKIYEOK-YAE-PHIEUPH +0xAEBB # HANGUL SYLLABLE SSANGKIYEOK-YAE-HIEUH +0xAEBC # HANGUL SYLLABLE SSANGKIYEOK-EO +0xAEBD # HANGUL SYLLABLE SSANGKIYEOK-EO-KIYEOK +0xAEBE # HANGUL SYLLABLE SSANGKIYEOK-EO-SSANGKIYEOK +0xAEBF # HANGUL SYLLABLE SSANGKIYEOK-EO-KIYEOKSIOS +0xAEC0 # HANGUL SYLLABLE SSANGKIYEOK-EO-NIEUN +0xAEC1 # HANGUL SYLLABLE SSANGKIYEOK-EO-NIEUNCIEUC +0xAEC2 # HANGUL SYLLABLE SSANGKIYEOK-EO-NIEUNHIEUH +0xAEC3 # HANGUL SYLLABLE SSANGKIYEOK-EO-TIKEUT +0xAEC4 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEUL +0xAEC5 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULKIYEOK +0xAEC6 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULMIEUM +0xAEC7 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULPIEUP +0xAEC8 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULSIOS +0xAEC9 # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULTHIEUTH +0xAECA # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULPHIEUPH +0xAECB # HANGUL SYLLABLE SSANGKIYEOK-EO-RIEULHIEUH +0xAECC # HANGUL SYLLABLE SSANGKIYEOK-EO-MIEUM +0xAECD # HANGUL SYLLABLE SSANGKIYEOK-EO-PIEUP +0xAECE # HANGUL SYLLABLE SSANGKIYEOK-EO-PIEUPSIOS +0xAECF # HANGUL SYLLABLE SSANGKIYEOK-EO-SIOS +0xAED0 # HANGUL SYLLABLE SSANGKIYEOK-EO-SSANGSIOS +0xAED1 # HANGUL SYLLABLE SSANGKIYEOK-EO-IEUNG +0xAED2 # HANGUL SYLLABLE SSANGKIYEOK-EO-CIEUC +0xAED3 # HANGUL SYLLABLE SSANGKIYEOK-EO-CHIEUCH +0xAED4 # HANGUL SYLLABLE SSANGKIYEOK-EO-KHIEUKH +0xAED5 # HANGUL SYLLABLE SSANGKIYEOK-EO-THIEUTH +0xAED6 # HANGUL SYLLABLE SSANGKIYEOK-EO-PHIEUPH +0xAED7 # HANGUL SYLLABLE SSANGKIYEOK-EO-HIEUH +0xAED8 # HANGUL SYLLABLE SSANGKIYEOK-E +0xAED9 # HANGUL SYLLABLE SSANGKIYEOK-E-KIYEOK +0xAEDA # HANGUL SYLLABLE SSANGKIYEOK-E-SSANGKIYEOK +0xAEDB # HANGUL SYLLABLE SSANGKIYEOK-E-KIYEOKSIOS +0xAEDC # HANGUL SYLLABLE SSANGKIYEOK-E-NIEUN +0xAEDD # HANGUL SYLLABLE SSANGKIYEOK-E-NIEUNCIEUC +0xAEDE # HANGUL SYLLABLE SSANGKIYEOK-E-NIEUNHIEUH +0xAEDF # HANGUL SYLLABLE SSANGKIYEOK-E-TIKEUT +0xAEE0 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEUL +0xAEE1 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULKIYEOK +0xAEE2 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULMIEUM +0xAEE3 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULPIEUP +0xAEE4 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULSIOS +0xAEE5 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULTHIEUTH +0xAEE6 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULPHIEUPH +0xAEE7 # HANGUL SYLLABLE SSANGKIYEOK-E-RIEULHIEUH +0xAEE8 # HANGUL SYLLABLE SSANGKIYEOK-E-MIEUM +0xAEE9 # HANGUL SYLLABLE SSANGKIYEOK-E-PIEUP +0xAEEA # HANGUL SYLLABLE SSANGKIYEOK-E-PIEUPSIOS +0xAEEB # HANGUL SYLLABLE SSANGKIYEOK-E-SIOS +0xAEEC # HANGUL SYLLABLE SSANGKIYEOK-E-SSANGSIOS +0xAEED # HANGUL SYLLABLE SSANGKIYEOK-E-IEUNG +0xAEEE # HANGUL SYLLABLE SSANGKIYEOK-E-CIEUC +0xAEEF # HANGUL SYLLABLE SSANGKIYEOK-E-CHIEUCH +0xAEF0 # HANGUL SYLLABLE SSANGKIYEOK-E-KHIEUKH +0xAEF1 # HANGUL SYLLABLE SSANGKIYEOK-E-THIEUTH +0xAEF2 # HANGUL SYLLABLE SSANGKIYEOK-E-PHIEUPH +0xAEF3 # HANGUL SYLLABLE SSANGKIYEOK-E-HIEUH +0xAEF4 # HANGUL SYLLABLE SSANGKIYEOK-YEO +0xAEF5 # HANGUL SYLLABLE SSANGKIYEOK-YEO-KIYEOK +0xAEF6 # HANGUL SYLLABLE SSANGKIYEOK-YEO-SSANGKIYEOK +0xAEF7 # HANGUL SYLLABLE SSANGKIYEOK-YEO-KIYEOKSIOS +0xAEF8 # HANGUL SYLLABLE SSANGKIYEOK-YEO-NIEUN +0xAEF9 # HANGUL SYLLABLE SSANGKIYEOK-YEO-NIEUNCIEUC +0xAEFA # HANGUL SYLLABLE SSANGKIYEOK-YEO-NIEUNHIEUH +0xAEFB # HANGUL SYLLABLE SSANGKIYEOK-YEO-TIKEUT +0xAEFC # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEUL +0xAEFD # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULKIYEOK +0xAEFE # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULMIEUM +0xAEFF # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULPIEUP +0xAF00 # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULSIOS +0xAF01 # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULTHIEUTH +0xAF02 # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULPHIEUPH +0xAF03 # HANGUL SYLLABLE SSANGKIYEOK-YEO-RIEULHIEUH +0xAF04 # HANGUL SYLLABLE SSANGKIYEOK-YEO-MIEUM +0xAF05 # HANGUL SYLLABLE SSANGKIYEOK-YEO-PIEUP +0xAF06 # HANGUL SYLLABLE SSANGKIYEOK-YEO-PIEUPSIOS +0xAF07 # HANGUL SYLLABLE SSANGKIYEOK-YEO-SIOS +0xAF08 # HANGUL SYLLABLE SSANGKIYEOK-YEO-SSANGSIOS +0xAF09 # HANGUL SYLLABLE SSANGKIYEOK-YEO-IEUNG +0xAF0A # HANGUL SYLLABLE SSANGKIYEOK-YEO-CIEUC +0xAF0B # HANGUL SYLLABLE SSANGKIYEOK-YEO-CHIEUCH +0xAF0C # HANGUL SYLLABLE SSANGKIYEOK-YEO-KHIEUKH +0xAF0D # HANGUL SYLLABLE SSANGKIYEOK-YEO-THIEUTH +0xAF0E # HANGUL SYLLABLE SSANGKIYEOK-YEO-PHIEUPH +0xAF0F # HANGUL SYLLABLE SSANGKIYEOK-YEO-HIEUH +0xAF10 # HANGUL SYLLABLE SSANGKIYEOK-YE +0xAF11 # HANGUL SYLLABLE SSANGKIYEOK-YE-KIYEOK +0xAF12 # HANGUL SYLLABLE SSANGKIYEOK-YE-SSANGKIYEOK +0xAF13 # HANGUL SYLLABLE SSANGKIYEOK-YE-KIYEOKSIOS +0xAF14 # HANGUL SYLLABLE SSANGKIYEOK-YE-NIEUN +0xAF15 # HANGUL SYLLABLE SSANGKIYEOK-YE-NIEUNCIEUC +0xAF16 # HANGUL SYLLABLE SSANGKIYEOK-YE-NIEUNHIEUH +0xAF17 # HANGUL SYLLABLE SSANGKIYEOK-YE-TIKEUT +0xAF18 # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEUL +0xAF19 # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULKIYEOK +0xAF1A # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULMIEUM +0xAF1B # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULPIEUP +0xAF1C # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULSIOS +0xAF1D # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULTHIEUTH +0xAF1E # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULPHIEUPH +0xAF1F # HANGUL SYLLABLE SSANGKIYEOK-YE-RIEULHIEUH +0xAF20 # HANGUL SYLLABLE SSANGKIYEOK-YE-MIEUM +0xAF21 # HANGUL SYLLABLE SSANGKIYEOK-YE-PIEUP +0xAF22 # HANGUL SYLLABLE SSANGKIYEOK-YE-PIEUPSIOS +0xAF23 # HANGUL SYLLABLE SSANGKIYEOK-YE-SIOS +0xAF24 # HANGUL SYLLABLE SSANGKIYEOK-YE-SSANGSIOS +0xAF25 # HANGUL SYLLABLE SSANGKIYEOK-YE-IEUNG +0xAF26 # HANGUL SYLLABLE SSANGKIYEOK-YE-CIEUC +0xAF27 # HANGUL SYLLABLE SSANGKIYEOK-YE-CHIEUCH +0xAF28 # HANGUL SYLLABLE SSANGKIYEOK-YE-KHIEUKH +0xAF29 # HANGUL SYLLABLE SSANGKIYEOK-YE-THIEUTH +0xAF2A # HANGUL SYLLABLE SSANGKIYEOK-YE-PHIEUPH +0xAF2B # HANGUL SYLLABLE SSANGKIYEOK-YE-HIEUH +0xAF2C # HANGUL SYLLABLE SSANGKIYEOK-O +0xAF2D # HANGUL SYLLABLE SSANGKIYEOK-O-KIYEOK +0xAF2E # HANGUL SYLLABLE SSANGKIYEOK-O-SSANGKIYEOK +0xAF2F # HANGUL SYLLABLE SSANGKIYEOK-O-KIYEOKSIOS +0xAF30 # HANGUL SYLLABLE SSANGKIYEOK-O-NIEUN +0xAF31 # HANGUL SYLLABLE SSANGKIYEOK-O-NIEUNCIEUC +0xAF32 # HANGUL SYLLABLE SSANGKIYEOK-O-NIEUNHIEUH +0xAF33 # HANGUL SYLLABLE SSANGKIYEOK-O-TIKEUT +0xAF34 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEUL +0xAF35 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULKIYEOK +0xAF36 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULMIEUM +0xAF37 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULPIEUP +0xAF38 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULSIOS +0xAF39 # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULTHIEUTH +0xAF3A # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULPHIEUPH +0xAF3B # HANGUL SYLLABLE SSANGKIYEOK-O-RIEULHIEUH +0xAF3C # HANGUL SYLLABLE SSANGKIYEOK-O-MIEUM +0xAF3D # HANGUL SYLLABLE SSANGKIYEOK-O-PIEUP +0xAF3E # HANGUL SYLLABLE SSANGKIYEOK-O-PIEUPSIOS +0xAF3F # HANGUL SYLLABLE SSANGKIYEOK-O-SIOS +0xAF40 # HANGUL SYLLABLE SSANGKIYEOK-O-SSANGSIOS +0xAF41 # HANGUL SYLLABLE SSANGKIYEOK-O-IEUNG +0xAF42 # HANGUL SYLLABLE SSANGKIYEOK-O-CIEUC +0xAF43 # HANGUL SYLLABLE SSANGKIYEOK-O-CHIEUCH +0xAF44 # HANGUL SYLLABLE SSANGKIYEOK-O-KHIEUKH +0xAF45 # HANGUL SYLLABLE SSANGKIYEOK-O-THIEUTH +0xAF46 # HANGUL SYLLABLE SSANGKIYEOK-O-PHIEUPH +0xAF47 # HANGUL SYLLABLE SSANGKIYEOK-O-HIEUH +0xAF48 # HANGUL SYLLABLE SSANGKIYEOK-WA +0xAF49 # HANGUL SYLLABLE SSANGKIYEOK-WA-KIYEOK +0xAF4A # HANGUL SYLLABLE SSANGKIYEOK-WA-SSANGKIYEOK +0xAF4B # HANGUL SYLLABLE SSANGKIYEOK-WA-KIYEOKSIOS +0xAF4C # HANGUL SYLLABLE SSANGKIYEOK-WA-NIEUN +0xAF4D # HANGUL SYLLABLE SSANGKIYEOK-WA-NIEUNCIEUC +0xAF4E # HANGUL SYLLABLE SSANGKIYEOK-WA-NIEUNHIEUH +0xAF4F # HANGUL SYLLABLE SSANGKIYEOK-WA-TIKEUT +0xAF50 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEUL +0xAF51 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULKIYEOK +0xAF52 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULMIEUM +0xAF53 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULPIEUP +0xAF54 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULSIOS +0xAF55 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULTHIEUTH +0xAF56 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULPHIEUPH +0xAF57 # HANGUL SYLLABLE SSANGKIYEOK-WA-RIEULHIEUH +0xAF58 # HANGUL SYLLABLE SSANGKIYEOK-WA-MIEUM +0xAF59 # HANGUL SYLLABLE SSANGKIYEOK-WA-PIEUP +0xAF5A # HANGUL SYLLABLE SSANGKIYEOK-WA-PIEUPSIOS +0xAF5B # HANGUL SYLLABLE SSANGKIYEOK-WA-SIOS +0xAF5C # HANGUL SYLLABLE SSANGKIYEOK-WA-SSANGSIOS +0xAF5D # HANGUL SYLLABLE SSANGKIYEOK-WA-IEUNG +0xAF5E # HANGUL SYLLABLE SSANGKIYEOK-WA-CIEUC +0xAF5F # HANGUL SYLLABLE SSANGKIYEOK-WA-CHIEUCH +0xAF60 # HANGUL SYLLABLE SSANGKIYEOK-WA-KHIEUKH +0xAF61 # HANGUL SYLLABLE SSANGKIYEOK-WA-THIEUTH +0xAF62 # HANGUL SYLLABLE SSANGKIYEOK-WA-PHIEUPH +0xAF63 # HANGUL SYLLABLE SSANGKIYEOK-WA-HIEUH +0xAF64 # HANGUL SYLLABLE SSANGKIYEOK-WAE +0xAF65 # HANGUL SYLLABLE SSANGKIYEOK-WAE-KIYEOK +0xAF66 # HANGUL SYLLABLE SSANGKIYEOK-WAE-SSANGKIYEOK +0xAF67 # HANGUL SYLLABLE SSANGKIYEOK-WAE-KIYEOKSIOS +0xAF68 # HANGUL SYLLABLE SSANGKIYEOK-WAE-NIEUN +0xAF69 # HANGUL SYLLABLE SSANGKIYEOK-WAE-NIEUNCIEUC +0xAF6A # HANGUL SYLLABLE SSANGKIYEOK-WAE-NIEUNHIEUH +0xAF6B # HANGUL SYLLABLE SSANGKIYEOK-WAE-TIKEUT +0xAF6C # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEUL +0xAF6D # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULKIYEOK +0xAF6E # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULMIEUM +0xAF6F # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULPIEUP +0xAF70 # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULSIOS +0xAF71 # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULTHIEUTH +0xAF72 # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULPHIEUPH +0xAF73 # HANGUL SYLLABLE SSANGKIYEOK-WAE-RIEULHIEUH +0xAF74 # HANGUL SYLLABLE SSANGKIYEOK-WAE-MIEUM +0xAF75 # HANGUL SYLLABLE SSANGKIYEOK-WAE-PIEUP +0xAF76 # HANGUL SYLLABLE SSANGKIYEOK-WAE-PIEUPSIOS +0xAF77 # HANGUL SYLLABLE SSANGKIYEOK-WAE-SIOS +0xAF78 # HANGUL SYLLABLE SSANGKIYEOK-WAE-SSANGSIOS +0xAF79 # HANGUL SYLLABLE SSANGKIYEOK-WAE-IEUNG +0xAF7A # HANGUL SYLLABLE SSANGKIYEOK-WAE-CIEUC +0xAF7B # HANGUL SYLLABLE SSANGKIYEOK-WAE-CHIEUCH +0xAF7C # HANGUL SYLLABLE SSANGKIYEOK-WAE-KHIEUKH +0xAF7D # HANGUL SYLLABLE SSANGKIYEOK-WAE-THIEUTH +0xAF7E # HANGUL SYLLABLE SSANGKIYEOK-WAE-PHIEUPH +0xAF7F # HANGUL SYLLABLE SSANGKIYEOK-WAE-HIEUH +0xAF80 # HANGUL SYLLABLE SSANGKIYEOK-OE +0xAF81 # HANGUL SYLLABLE SSANGKIYEOK-OE-KIYEOK +0xAF82 # HANGUL SYLLABLE SSANGKIYEOK-OE-SSANGKIYEOK +0xAF83 # HANGUL SYLLABLE SSANGKIYEOK-OE-KIYEOKSIOS +0xAF84 # HANGUL SYLLABLE SSANGKIYEOK-OE-NIEUN +0xAF85 # HANGUL SYLLABLE SSANGKIYEOK-OE-NIEUNCIEUC +0xAF86 # HANGUL SYLLABLE SSANGKIYEOK-OE-NIEUNHIEUH +0xAF87 # HANGUL SYLLABLE SSANGKIYEOK-OE-TIKEUT +0xAF88 # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEUL +0xAF89 # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULKIYEOK +0xAF8A # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULMIEUM +0xAF8B # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULPIEUP +0xAF8C # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULSIOS +0xAF8D # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULTHIEUTH +0xAF8E # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULPHIEUPH +0xAF8F # HANGUL SYLLABLE SSANGKIYEOK-OE-RIEULHIEUH +0xAF90 # HANGUL SYLLABLE SSANGKIYEOK-OE-MIEUM +0xAF91 # HANGUL SYLLABLE SSANGKIYEOK-OE-PIEUP +0xAF92 # HANGUL SYLLABLE SSANGKIYEOK-OE-PIEUPSIOS +0xAF93 # HANGUL SYLLABLE SSANGKIYEOK-OE-SIOS +0xAF94 # HANGUL SYLLABLE SSANGKIYEOK-OE-SSANGSIOS +0xAF95 # HANGUL SYLLABLE SSANGKIYEOK-OE-IEUNG +0xAF96 # HANGUL SYLLABLE SSANGKIYEOK-OE-CIEUC +0xAF97 # HANGUL SYLLABLE SSANGKIYEOK-OE-CHIEUCH +0xAF98 # HANGUL SYLLABLE SSANGKIYEOK-OE-KHIEUKH +0xAF99 # HANGUL SYLLABLE SSANGKIYEOK-OE-THIEUTH +0xAF9A # HANGUL SYLLABLE SSANGKIYEOK-OE-PHIEUPH +0xAF9B # HANGUL SYLLABLE SSANGKIYEOK-OE-HIEUH +0xAF9C # HANGUL SYLLABLE SSANGKIYEOK-YO +0xAF9D # HANGUL SYLLABLE SSANGKIYEOK-YO-KIYEOK +0xAF9E # HANGUL SYLLABLE SSANGKIYEOK-YO-SSANGKIYEOK +0xAF9F # HANGUL SYLLABLE SSANGKIYEOK-YO-KIYEOKSIOS +0xAFA0 # HANGUL SYLLABLE SSANGKIYEOK-YO-NIEUN +0xAFA1 # HANGUL SYLLABLE SSANGKIYEOK-YO-NIEUNCIEUC +0xAFA2 # HANGUL SYLLABLE SSANGKIYEOK-YO-NIEUNHIEUH +0xAFA3 # HANGUL SYLLABLE SSANGKIYEOK-YO-TIKEUT +0xAFA4 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEUL +0xAFA5 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULKIYEOK +0xAFA6 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULMIEUM +0xAFA7 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULPIEUP +0xAFA8 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULSIOS +0xAFA9 # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULTHIEUTH +0xAFAA # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULPHIEUPH +0xAFAB # HANGUL SYLLABLE SSANGKIYEOK-YO-RIEULHIEUH +0xAFAC # HANGUL SYLLABLE SSANGKIYEOK-YO-MIEUM +0xAFAD # HANGUL SYLLABLE SSANGKIYEOK-YO-PIEUP +0xAFAE # HANGUL SYLLABLE SSANGKIYEOK-YO-PIEUPSIOS +0xAFAF # HANGUL SYLLABLE SSANGKIYEOK-YO-SIOS +0xAFB0 # HANGUL SYLLABLE SSANGKIYEOK-YO-SSANGSIOS +0xAFB1 # HANGUL SYLLABLE SSANGKIYEOK-YO-IEUNG +0xAFB2 # HANGUL SYLLABLE SSANGKIYEOK-YO-CIEUC +0xAFB3 # HANGUL SYLLABLE SSANGKIYEOK-YO-CHIEUCH +0xAFB4 # HANGUL SYLLABLE SSANGKIYEOK-YO-KHIEUKH +0xAFB5 # HANGUL SYLLABLE SSANGKIYEOK-YO-THIEUTH +0xAFB6 # HANGUL SYLLABLE SSANGKIYEOK-YO-PHIEUPH +0xAFB7 # HANGUL SYLLABLE SSANGKIYEOK-YO-HIEUH +0xAFB8 # HANGUL SYLLABLE SSANGKIYEOK-U +0xAFB9 # HANGUL SYLLABLE SSANGKIYEOK-U-KIYEOK +0xAFBA # HANGUL SYLLABLE SSANGKIYEOK-U-SSANGKIYEOK +0xAFBB # HANGUL SYLLABLE SSANGKIYEOK-U-KIYEOKSIOS +0xAFBC # HANGUL SYLLABLE SSANGKIYEOK-U-NIEUN +0xAFBD # HANGUL SYLLABLE SSANGKIYEOK-U-NIEUNCIEUC +0xAFBE # HANGUL SYLLABLE SSANGKIYEOK-U-NIEUNHIEUH +0xAFBF # HANGUL SYLLABLE SSANGKIYEOK-U-TIKEUT +0xAFC0 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEUL +0xAFC1 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULKIYEOK +0xAFC2 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULMIEUM +0xAFC3 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULPIEUP +0xAFC4 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULSIOS +0xAFC5 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULTHIEUTH +0xAFC6 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULPHIEUPH +0xAFC7 # HANGUL SYLLABLE SSANGKIYEOK-U-RIEULHIEUH +0xAFC8 # HANGUL SYLLABLE SSANGKIYEOK-U-MIEUM +0xAFC9 # HANGUL SYLLABLE SSANGKIYEOK-U-PIEUP +0xAFCA # HANGUL SYLLABLE SSANGKIYEOK-U-PIEUPSIOS +0xAFCB # HANGUL SYLLABLE SSANGKIYEOK-U-SIOS +0xAFCC # HANGUL SYLLABLE SSANGKIYEOK-U-SSANGSIOS +0xAFCD # HANGUL SYLLABLE SSANGKIYEOK-U-IEUNG +0xAFCE # HANGUL SYLLABLE SSANGKIYEOK-U-CIEUC +0xAFCF # HANGUL SYLLABLE SSANGKIYEOK-U-CHIEUCH +0xAFD0 # HANGUL SYLLABLE SSANGKIYEOK-U-KHIEUKH +0xAFD1 # HANGUL SYLLABLE SSANGKIYEOK-U-THIEUTH +0xAFD2 # HANGUL SYLLABLE SSANGKIYEOK-U-PHIEUPH +0xAFD3 # HANGUL SYLLABLE SSANGKIYEOK-U-HIEUH +0xAFD4 # HANGUL SYLLABLE SSANGKIYEOK-WEO +0xAFD5 # HANGUL SYLLABLE SSANGKIYEOK-WEO-KIYEOK +0xAFD6 # HANGUL SYLLABLE SSANGKIYEOK-WEO-SSANGKIYEOK +0xAFD7 # HANGUL SYLLABLE SSANGKIYEOK-WEO-KIYEOKSIOS +0xAFD8 # HANGUL SYLLABLE SSANGKIYEOK-WEO-NIEUN +0xAFD9 # HANGUL SYLLABLE SSANGKIYEOK-WEO-NIEUNCIEUC +0xAFDA # HANGUL SYLLABLE SSANGKIYEOK-WEO-NIEUNHIEUH +0xAFDB # HANGUL SYLLABLE SSANGKIYEOK-WEO-TIKEUT +0xAFDC # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEUL +0xAFDD # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULKIYEOK +0xAFDE # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULMIEUM +0xAFDF # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULPIEUP +0xAFE0 # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULSIOS +0xAFE1 # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULTHIEUTH +0xAFE2 # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULPHIEUPH +0xAFE3 # HANGUL SYLLABLE SSANGKIYEOK-WEO-RIEULHIEUH +0xAFE4 # HANGUL SYLLABLE SSANGKIYEOK-WEO-MIEUM +0xAFE5 # HANGUL SYLLABLE SSANGKIYEOK-WEO-PIEUP +0xAFE6 # HANGUL SYLLABLE SSANGKIYEOK-WEO-PIEUPSIOS +0xAFE7 # HANGUL SYLLABLE SSANGKIYEOK-WEO-SIOS +0xAFE8 # HANGUL SYLLABLE SSANGKIYEOK-WEO-SSANGSIOS +0xAFE9 # HANGUL SYLLABLE SSANGKIYEOK-WEO-IEUNG +0xAFEA # HANGUL SYLLABLE SSANGKIYEOK-WEO-CIEUC +0xAFEB # HANGUL SYLLABLE SSANGKIYEOK-WEO-CHIEUCH +0xAFEC # HANGUL SYLLABLE SSANGKIYEOK-WEO-KHIEUKH +0xAFED # HANGUL SYLLABLE SSANGKIYEOK-WEO-THIEUTH +0xAFEE # HANGUL SYLLABLE SSANGKIYEOK-WEO-PHIEUPH +0xAFEF # HANGUL SYLLABLE SSANGKIYEOK-WEO-HIEUH +0xAFF0 # HANGUL SYLLABLE SSANGKIYEOK-WE +0xAFF1 # HANGUL SYLLABLE SSANGKIYEOK-WE-KIYEOK +0xAFF2 # HANGUL SYLLABLE SSANGKIYEOK-WE-SSANGKIYEOK +0xAFF3 # HANGUL SYLLABLE SSANGKIYEOK-WE-KIYEOKSIOS +0xAFF4 # HANGUL SYLLABLE SSANGKIYEOK-WE-NIEUN +0xAFF5 # HANGUL SYLLABLE SSANGKIYEOK-WE-NIEUNCIEUC +0xAFF6 # HANGUL SYLLABLE SSANGKIYEOK-WE-NIEUNHIEUH +0xAFF7 # HANGUL SYLLABLE SSANGKIYEOK-WE-TIKEUT +0xAFF8 # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEUL +0xAFF9 # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULKIYEOK +0xAFFA # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULMIEUM +0xAFFB # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULPIEUP +0xAFFC # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULSIOS +0xAFFD # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULTHIEUTH +0xAFFE # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULPHIEUPH +0xAFFF # HANGUL SYLLABLE SSANGKIYEOK-WE-RIEULHIEUH +0xB000 # HANGUL SYLLABLE SSANGKIYEOK-WE-MIEUM +0xB001 # HANGUL SYLLABLE SSANGKIYEOK-WE-PIEUP +0xB002 # HANGUL SYLLABLE SSANGKIYEOK-WE-PIEUPSIOS +0xB003 # HANGUL SYLLABLE SSANGKIYEOK-WE-SIOS +0xB004 # HANGUL SYLLABLE SSANGKIYEOK-WE-SSANGSIOS +0xB005 # HANGUL SYLLABLE SSANGKIYEOK-WE-IEUNG +0xB006 # HANGUL SYLLABLE SSANGKIYEOK-WE-CIEUC +0xB007 # HANGUL SYLLABLE SSANGKIYEOK-WE-CHIEUCH +0xB008 # HANGUL SYLLABLE SSANGKIYEOK-WE-KHIEUKH +0xB009 # HANGUL SYLLABLE SSANGKIYEOK-WE-THIEUTH +0xB00A # HANGUL SYLLABLE SSANGKIYEOK-WE-PHIEUPH +0xB00B # HANGUL SYLLABLE SSANGKIYEOK-WE-HIEUH +0xB00C # HANGUL SYLLABLE SSANGKIYEOK-WI +0xB00D # HANGUL SYLLABLE SSANGKIYEOK-WI-KIYEOK +0xB00E # HANGUL SYLLABLE SSANGKIYEOK-WI-SSANGKIYEOK +0xB00F # HANGUL SYLLABLE SSANGKIYEOK-WI-KIYEOKSIOS +0xB010 # HANGUL SYLLABLE SSANGKIYEOK-WI-NIEUN +0xB011 # HANGUL SYLLABLE SSANGKIYEOK-WI-NIEUNCIEUC +0xB012 # HANGUL SYLLABLE SSANGKIYEOK-WI-NIEUNHIEUH +0xB013 # HANGUL SYLLABLE SSANGKIYEOK-WI-TIKEUT +0xB014 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEUL +0xB015 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULKIYEOK +0xB016 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULMIEUM +0xB017 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULPIEUP +0xB018 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULSIOS +0xB019 # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULTHIEUTH +0xB01A # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULPHIEUPH +0xB01B # HANGUL SYLLABLE SSANGKIYEOK-WI-RIEULHIEUH +0xB01C # HANGUL SYLLABLE SSANGKIYEOK-WI-MIEUM +0xB01D # HANGUL SYLLABLE SSANGKIYEOK-WI-PIEUP +0xB01E # HANGUL SYLLABLE SSANGKIYEOK-WI-PIEUPSIOS +0xB01F # HANGUL SYLLABLE SSANGKIYEOK-WI-SIOS +0xB020 # HANGUL SYLLABLE SSANGKIYEOK-WI-SSANGSIOS +0xB021 # HANGUL SYLLABLE SSANGKIYEOK-WI-IEUNG +0xB022 # HANGUL SYLLABLE SSANGKIYEOK-WI-CIEUC +0xB023 # HANGUL SYLLABLE SSANGKIYEOK-WI-CHIEUCH +0xB024 # HANGUL SYLLABLE SSANGKIYEOK-WI-KHIEUKH +0xB025 # HANGUL SYLLABLE SSANGKIYEOK-WI-THIEUTH +0xB026 # HANGUL SYLLABLE SSANGKIYEOK-WI-PHIEUPH +0xB027 # HANGUL SYLLABLE SSANGKIYEOK-WI-HIEUH +0xB028 # HANGUL SYLLABLE SSANGKIYEOK-YU +0xB029 # HANGUL SYLLABLE SSANGKIYEOK-YU-KIYEOK +0xB02A # HANGUL SYLLABLE SSANGKIYEOK-YU-SSANGKIYEOK +0xB02B # HANGUL SYLLABLE SSANGKIYEOK-YU-KIYEOKSIOS +0xB02C # HANGUL SYLLABLE SSANGKIYEOK-YU-NIEUN +0xB02D # HANGUL SYLLABLE SSANGKIYEOK-YU-NIEUNCIEUC +0xB02E # HANGUL SYLLABLE SSANGKIYEOK-YU-NIEUNHIEUH +0xB02F # HANGUL SYLLABLE SSANGKIYEOK-YU-TIKEUT +0xB030 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEUL +0xB031 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULKIYEOK +0xB032 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULMIEUM +0xB033 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULPIEUP +0xB034 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULSIOS +0xB035 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULTHIEUTH +0xB036 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULPHIEUPH +0xB037 # HANGUL SYLLABLE SSANGKIYEOK-YU-RIEULHIEUH +0xB038 # HANGUL SYLLABLE SSANGKIYEOK-YU-MIEUM +0xB039 # HANGUL SYLLABLE SSANGKIYEOK-YU-PIEUP +0xB03A # HANGUL SYLLABLE SSANGKIYEOK-YU-PIEUPSIOS +0xB03B # HANGUL SYLLABLE SSANGKIYEOK-YU-SIOS +0xB03C # HANGUL SYLLABLE SSANGKIYEOK-YU-SSANGSIOS +0xB03D # HANGUL SYLLABLE SSANGKIYEOK-YU-IEUNG +0xB03E # HANGUL SYLLABLE SSANGKIYEOK-YU-CIEUC +0xB03F # HANGUL SYLLABLE SSANGKIYEOK-YU-CHIEUCH +0xB040 # HANGUL SYLLABLE SSANGKIYEOK-YU-KHIEUKH +0xB041 # HANGUL SYLLABLE SSANGKIYEOK-YU-THIEUTH +0xB042 # HANGUL SYLLABLE SSANGKIYEOK-YU-PHIEUPH +0xB043 # HANGUL SYLLABLE SSANGKIYEOK-YU-HIEUH +0xB044 # HANGUL SYLLABLE SSANGKIYEOK-EU +0xB045 # HANGUL SYLLABLE SSANGKIYEOK-EU-KIYEOK +0xB046 # HANGUL SYLLABLE SSANGKIYEOK-EU-SSANGKIYEOK +0xB047 # HANGUL SYLLABLE SSANGKIYEOK-EU-KIYEOKSIOS +0xB048 # HANGUL SYLLABLE SSANGKIYEOK-EU-NIEUN +0xB049 # HANGUL SYLLABLE SSANGKIYEOK-EU-NIEUNCIEUC +0xB04A # HANGUL SYLLABLE SSANGKIYEOK-EU-NIEUNHIEUH +0xB04B # HANGUL SYLLABLE SSANGKIYEOK-EU-TIKEUT +0xB04C # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEUL +0xB04D # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULKIYEOK +0xB04E # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULMIEUM +0xB04F # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULPIEUP +0xB050 # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULSIOS +0xB051 # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULTHIEUTH +0xB052 # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULPHIEUPH +0xB053 # HANGUL SYLLABLE SSANGKIYEOK-EU-RIEULHIEUH +0xB054 # HANGUL SYLLABLE SSANGKIYEOK-EU-MIEUM +0xB055 # HANGUL SYLLABLE SSANGKIYEOK-EU-PIEUP +0xB056 # HANGUL SYLLABLE SSANGKIYEOK-EU-PIEUPSIOS +0xB057 # HANGUL SYLLABLE SSANGKIYEOK-EU-SIOS +0xB058 # HANGUL SYLLABLE SSANGKIYEOK-EU-SSANGSIOS +0xB059 # HANGUL SYLLABLE SSANGKIYEOK-EU-IEUNG +0xB05A # HANGUL SYLLABLE SSANGKIYEOK-EU-CIEUC +0xB05B # HANGUL SYLLABLE SSANGKIYEOK-EU-CHIEUCH +0xB05C # HANGUL SYLLABLE SSANGKIYEOK-EU-KHIEUKH +0xB05D # HANGUL SYLLABLE SSANGKIYEOK-EU-THIEUTH +0xB05E # HANGUL SYLLABLE SSANGKIYEOK-EU-PHIEUPH +0xB05F # HANGUL SYLLABLE SSANGKIYEOK-EU-HIEUH +0xB060 # HANGUL SYLLABLE SSANGKIYEOK-YI +0xB061 # HANGUL SYLLABLE SSANGKIYEOK-YI-KIYEOK +0xB062 # HANGUL SYLLABLE SSANGKIYEOK-YI-SSANGKIYEOK +0xB063 # HANGUL SYLLABLE SSANGKIYEOK-YI-KIYEOKSIOS +0xB064 # HANGUL SYLLABLE SSANGKIYEOK-YI-NIEUN +0xB065 # HANGUL SYLLABLE SSANGKIYEOK-YI-NIEUNCIEUC +0xB066 # HANGUL SYLLABLE SSANGKIYEOK-YI-NIEUNHIEUH +0xB067 # HANGUL SYLLABLE SSANGKIYEOK-YI-TIKEUT +0xB068 # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEUL +0xB069 # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULKIYEOK +0xB06A # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULMIEUM +0xB06B # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULPIEUP +0xB06C # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULSIOS +0xB06D # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULTHIEUTH +0xB06E # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULPHIEUPH +0xB06F # HANGUL SYLLABLE SSANGKIYEOK-YI-RIEULHIEUH +0xB070 # HANGUL SYLLABLE SSANGKIYEOK-YI-MIEUM +0xB071 # HANGUL SYLLABLE SSANGKIYEOK-YI-PIEUP +0xB072 # HANGUL SYLLABLE SSANGKIYEOK-YI-PIEUPSIOS +0xB073 # HANGUL SYLLABLE SSANGKIYEOK-YI-SIOS +0xB074 # HANGUL SYLLABLE SSANGKIYEOK-YI-SSANGSIOS +0xB075 # HANGUL SYLLABLE SSANGKIYEOK-YI-IEUNG +0xB076 # HANGUL SYLLABLE SSANGKIYEOK-YI-CIEUC +0xB077 # HANGUL SYLLABLE SSANGKIYEOK-YI-CHIEUCH +0xB078 # HANGUL SYLLABLE SSANGKIYEOK-YI-KHIEUKH +0xB079 # HANGUL SYLLABLE SSANGKIYEOK-YI-THIEUTH +0xB07A # HANGUL SYLLABLE SSANGKIYEOK-YI-PHIEUPH +0xB07B # HANGUL SYLLABLE SSANGKIYEOK-YI-HIEUH +0xB07C # HANGUL SYLLABLE SSANGKIYEOK-I +0xB07D # HANGUL SYLLABLE SSANGKIYEOK-I-KIYEOK +0xB07E # HANGUL SYLLABLE SSANGKIYEOK-I-SSANGKIYEOK +0xB07F # HANGUL SYLLABLE SSANGKIYEOK-I-KIYEOKSIOS +0xB080 # HANGUL SYLLABLE SSANGKIYEOK-I-NIEUN +0xB081 # HANGUL SYLLABLE SSANGKIYEOK-I-NIEUNCIEUC +0xB082 # HANGUL SYLLABLE SSANGKIYEOK-I-NIEUNHIEUH +0xB083 # HANGUL SYLLABLE SSANGKIYEOK-I-TIKEUT +0xB084 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEUL +0xB085 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULKIYEOK +0xB086 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULMIEUM +0xB087 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULPIEUP +0xB088 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULSIOS +0xB089 # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULTHIEUTH +0xB08A # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULPHIEUPH +0xB08B # HANGUL SYLLABLE SSANGKIYEOK-I-RIEULHIEUH +0xB08C # HANGUL SYLLABLE SSANGKIYEOK-I-MIEUM +0xB08D # HANGUL SYLLABLE SSANGKIYEOK-I-PIEUP +0xB08E # HANGUL SYLLABLE SSANGKIYEOK-I-PIEUPSIOS +0xB08F # HANGUL SYLLABLE SSANGKIYEOK-I-SIOS +0xB090 # HANGUL SYLLABLE SSANGKIYEOK-I-SSANGSIOS +0xB091 # HANGUL SYLLABLE SSANGKIYEOK-I-IEUNG +0xB092 # HANGUL SYLLABLE SSANGKIYEOK-I-CIEUC +0xB093 # HANGUL SYLLABLE SSANGKIYEOK-I-CHIEUCH +0xB094 # HANGUL SYLLABLE SSANGKIYEOK-I-KHIEUKH +0xB095 # HANGUL SYLLABLE SSANGKIYEOK-I-THIEUTH +0xB096 # HANGUL SYLLABLE SSANGKIYEOK-I-PHIEUPH +0xB097 # HANGUL SYLLABLE SSANGKIYEOK-I-HIEUH +0xB098 # HANGUL SYLLABLE NIEUN-A +0xB099 # HANGUL SYLLABLE NIEUN-A-KIYEOK +0xB09A # HANGUL SYLLABLE NIEUN-A-SSANGKIYEOK +0xB09B # HANGUL SYLLABLE NIEUN-A-KIYEOKSIOS +0xB09C # HANGUL SYLLABLE NIEUN-A-NIEUN +0xB09D # HANGUL SYLLABLE NIEUN-A-NIEUNCIEUC +0xB09E # HANGUL SYLLABLE NIEUN-A-NIEUNHIEUH +0xB09F # HANGUL SYLLABLE NIEUN-A-TIKEUT +0xB0A0 # HANGUL SYLLABLE NIEUN-A-RIEUL +0xB0A1 # HANGUL SYLLABLE NIEUN-A-RIEULKIYEOK +0xB0A2 # HANGUL SYLLABLE NIEUN-A-RIEULMIEUM +0xB0A3 # HANGUL SYLLABLE NIEUN-A-RIEULPIEUP +0xB0A4 # HANGUL SYLLABLE NIEUN-A-RIEULSIOS +0xB0A5 # HANGUL SYLLABLE NIEUN-A-RIEULTHIEUTH +0xB0A6 # HANGUL SYLLABLE NIEUN-A-RIEULPHIEUPH +0xB0A7 # HANGUL SYLLABLE NIEUN-A-RIEULHIEUH +0xB0A8 # HANGUL SYLLABLE NIEUN-A-MIEUM +0xB0A9 # HANGUL SYLLABLE NIEUN-A-PIEUP +0xB0AA # HANGUL SYLLABLE NIEUN-A-PIEUPSIOS +0xB0AB # HANGUL SYLLABLE NIEUN-A-SIOS +0xB0AC # HANGUL SYLLABLE NIEUN-A-SSANGSIOS +0xB0AD # HANGUL SYLLABLE NIEUN-A-IEUNG +0xB0AE # HANGUL SYLLABLE NIEUN-A-CIEUC +0xB0AF # HANGUL SYLLABLE NIEUN-A-CHIEUCH +0xB0B0 # HANGUL SYLLABLE NIEUN-A-KHIEUKH +0xB0B1 # HANGUL SYLLABLE NIEUN-A-THIEUTH +0xB0B2 # HANGUL SYLLABLE NIEUN-A-PHIEUPH +0xB0B3 # HANGUL SYLLABLE NIEUN-A-HIEUH +0xB0B4 # HANGUL SYLLABLE NIEUN-AE +0xB0B5 # HANGUL SYLLABLE NIEUN-AE-KIYEOK +0xB0B6 # HANGUL SYLLABLE NIEUN-AE-SSANGKIYEOK +0xB0B7 # HANGUL SYLLABLE NIEUN-AE-KIYEOKSIOS +0xB0B8 # HANGUL SYLLABLE NIEUN-AE-NIEUN +0xB0B9 # HANGUL SYLLABLE NIEUN-AE-NIEUNCIEUC +0xB0BA # HANGUL SYLLABLE NIEUN-AE-NIEUNHIEUH +0xB0BB # HANGUL SYLLABLE NIEUN-AE-TIKEUT +0xB0BC # HANGUL SYLLABLE NIEUN-AE-RIEUL +0xB0BD # HANGUL SYLLABLE NIEUN-AE-RIEULKIYEOK +0xB0BE # HANGUL SYLLABLE NIEUN-AE-RIEULMIEUM +0xB0BF # HANGUL SYLLABLE NIEUN-AE-RIEULPIEUP +0xB0C0 # HANGUL SYLLABLE NIEUN-AE-RIEULSIOS +0xB0C1 # HANGUL SYLLABLE NIEUN-AE-RIEULTHIEUTH +0xB0C2 # HANGUL SYLLABLE NIEUN-AE-RIEULPHIEUPH +0xB0C3 # HANGUL SYLLABLE NIEUN-AE-RIEULHIEUH +0xB0C4 # HANGUL SYLLABLE NIEUN-AE-MIEUM +0xB0C5 # HANGUL SYLLABLE NIEUN-AE-PIEUP +0xB0C6 # HANGUL SYLLABLE NIEUN-AE-PIEUPSIOS +0xB0C7 # HANGUL SYLLABLE NIEUN-AE-SIOS +0xB0C8 # HANGUL SYLLABLE NIEUN-AE-SSANGSIOS +0xB0C9 # HANGUL SYLLABLE NIEUN-AE-IEUNG +0xB0CA # HANGUL SYLLABLE NIEUN-AE-CIEUC +0xB0CB # HANGUL SYLLABLE NIEUN-AE-CHIEUCH +0xB0CC # HANGUL SYLLABLE NIEUN-AE-KHIEUKH +0xB0CD # HANGUL SYLLABLE NIEUN-AE-THIEUTH +0xB0CE # HANGUL SYLLABLE NIEUN-AE-PHIEUPH +0xB0CF # HANGUL SYLLABLE NIEUN-AE-HIEUH +0xB0D0 # HANGUL SYLLABLE NIEUN-YA +0xB0D1 # HANGUL SYLLABLE NIEUN-YA-KIYEOK +0xB0D2 # HANGUL SYLLABLE NIEUN-YA-SSANGKIYEOK +0xB0D3 # HANGUL SYLLABLE NIEUN-YA-KIYEOKSIOS +0xB0D4 # HANGUL SYLLABLE NIEUN-YA-NIEUN +0xB0D5 # HANGUL SYLLABLE NIEUN-YA-NIEUNCIEUC +0xB0D6 # HANGUL SYLLABLE NIEUN-YA-NIEUNHIEUH +0xB0D7 # HANGUL SYLLABLE NIEUN-YA-TIKEUT +0xB0D8 # HANGUL SYLLABLE NIEUN-YA-RIEUL +0xB0D9 # HANGUL SYLLABLE NIEUN-YA-RIEULKIYEOK +0xB0DA # HANGUL SYLLABLE NIEUN-YA-RIEULMIEUM +0xB0DB # HANGUL SYLLABLE NIEUN-YA-RIEULPIEUP +0xB0DC # HANGUL SYLLABLE NIEUN-YA-RIEULSIOS +0xB0DD # HANGUL SYLLABLE NIEUN-YA-RIEULTHIEUTH +0xB0DE # HANGUL SYLLABLE NIEUN-YA-RIEULPHIEUPH +0xB0DF # HANGUL SYLLABLE NIEUN-YA-RIEULHIEUH +0xB0E0 # HANGUL SYLLABLE NIEUN-YA-MIEUM +0xB0E1 # HANGUL SYLLABLE NIEUN-YA-PIEUP +0xB0E2 # HANGUL SYLLABLE NIEUN-YA-PIEUPSIOS +0xB0E3 # HANGUL SYLLABLE NIEUN-YA-SIOS +0xB0E4 # HANGUL SYLLABLE NIEUN-YA-SSANGSIOS +0xB0E5 # HANGUL SYLLABLE NIEUN-YA-IEUNG +0xB0E6 # HANGUL SYLLABLE NIEUN-YA-CIEUC +0xB0E7 # HANGUL SYLLABLE NIEUN-YA-CHIEUCH +0xB0E8 # HANGUL SYLLABLE NIEUN-YA-KHIEUKH +0xB0E9 # HANGUL SYLLABLE NIEUN-YA-THIEUTH +0xB0EA # HANGUL SYLLABLE NIEUN-YA-PHIEUPH +0xB0EB # HANGUL SYLLABLE NIEUN-YA-HIEUH +0xB0EC # HANGUL SYLLABLE NIEUN-YAE +0xB0ED # HANGUL SYLLABLE NIEUN-YAE-KIYEOK +0xB0EE # HANGUL SYLLABLE NIEUN-YAE-SSANGKIYEOK +0xB0EF # HANGUL SYLLABLE NIEUN-YAE-KIYEOKSIOS +0xB0F0 # HANGUL SYLLABLE NIEUN-YAE-NIEUN +0xB0F1 # HANGUL SYLLABLE NIEUN-YAE-NIEUNCIEUC +0xB0F2 # HANGUL SYLLABLE NIEUN-YAE-NIEUNHIEUH +0xB0F3 # HANGUL SYLLABLE NIEUN-YAE-TIKEUT +0xB0F4 # HANGUL SYLLABLE NIEUN-YAE-RIEUL +0xB0F5 # HANGUL SYLLABLE NIEUN-YAE-RIEULKIYEOK +0xB0F6 # HANGUL SYLLABLE NIEUN-YAE-RIEULMIEUM +0xB0F7 # HANGUL SYLLABLE NIEUN-YAE-RIEULPIEUP +0xB0F8 # HANGUL SYLLABLE NIEUN-YAE-RIEULSIOS +0xB0F9 # HANGUL SYLLABLE NIEUN-YAE-RIEULTHIEUTH +0xB0FA # HANGUL SYLLABLE NIEUN-YAE-RIEULPHIEUPH +0xB0FB # HANGUL SYLLABLE NIEUN-YAE-RIEULHIEUH +0xB0FC # HANGUL SYLLABLE NIEUN-YAE-MIEUM +0xB0FD # HANGUL SYLLABLE NIEUN-YAE-PIEUP +0xB0FE # HANGUL SYLLABLE NIEUN-YAE-PIEUPSIOS +0xB0FF # HANGUL SYLLABLE NIEUN-YAE-SIOS +0xB100 # HANGUL SYLLABLE NIEUN-YAE-SSANGSIOS +0xB101 # HANGUL SYLLABLE NIEUN-YAE-IEUNG +0xB102 # HANGUL SYLLABLE NIEUN-YAE-CIEUC +0xB103 # HANGUL SYLLABLE NIEUN-YAE-CHIEUCH +0xB104 # HANGUL SYLLABLE NIEUN-YAE-KHIEUKH +0xB105 # HANGUL SYLLABLE NIEUN-YAE-THIEUTH +0xB106 # HANGUL SYLLABLE NIEUN-YAE-PHIEUPH +0xB107 # HANGUL SYLLABLE NIEUN-YAE-HIEUH +0xB108 # HANGUL SYLLABLE NIEUN-EO +0xB109 # HANGUL SYLLABLE NIEUN-EO-KIYEOK +0xB10A # HANGUL SYLLABLE NIEUN-EO-SSANGKIYEOK +0xB10B # HANGUL SYLLABLE NIEUN-EO-KIYEOKSIOS +0xB10C # HANGUL SYLLABLE NIEUN-EO-NIEUN +0xB10D # HANGUL SYLLABLE NIEUN-EO-NIEUNCIEUC +0xB10E # HANGUL SYLLABLE NIEUN-EO-NIEUNHIEUH +0xB10F # HANGUL SYLLABLE NIEUN-EO-TIKEUT +0xB110 # HANGUL SYLLABLE NIEUN-EO-RIEUL +0xB111 # HANGUL SYLLABLE NIEUN-EO-RIEULKIYEOK +0xB112 # HANGUL SYLLABLE NIEUN-EO-RIEULMIEUM +0xB113 # HANGUL SYLLABLE NIEUN-EO-RIEULPIEUP +0xB114 # HANGUL SYLLABLE NIEUN-EO-RIEULSIOS +0xB115 # HANGUL SYLLABLE NIEUN-EO-RIEULTHIEUTH +0xB116 # HANGUL SYLLABLE NIEUN-EO-RIEULPHIEUPH +0xB117 # HANGUL SYLLABLE NIEUN-EO-RIEULHIEUH +0xB118 # HANGUL SYLLABLE NIEUN-EO-MIEUM +0xB119 # HANGUL SYLLABLE NIEUN-EO-PIEUP +0xB11A # HANGUL SYLLABLE NIEUN-EO-PIEUPSIOS +0xB11B # HANGUL SYLLABLE NIEUN-EO-SIOS +0xB11C # HANGUL SYLLABLE NIEUN-EO-SSANGSIOS +0xB11D # HANGUL SYLLABLE NIEUN-EO-IEUNG +0xB11E # HANGUL SYLLABLE NIEUN-EO-CIEUC +0xB11F # HANGUL SYLLABLE NIEUN-EO-CHIEUCH +0xB120 # HANGUL SYLLABLE NIEUN-EO-KHIEUKH +0xB121 # HANGUL SYLLABLE NIEUN-EO-THIEUTH +0xB122 # HANGUL SYLLABLE NIEUN-EO-PHIEUPH +0xB123 # HANGUL SYLLABLE NIEUN-EO-HIEUH +0xB124 # HANGUL SYLLABLE NIEUN-E +0xB125 # HANGUL SYLLABLE NIEUN-E-KIYEOK +0xB126 # HANGUL SYLLABLE NIEUN-E-SSANGKIYEOK +0xB127 # HANGUL SYLLABLE NIEUN-E-KIYEOKSIOS +0xB128 # HANGUL SYLLABLE NIEUN-E-NIEUN +0xB129 # HANGUL SYLLABLE NIEUN-E-NIEUNCIEUC +0xB12A # HANGUL SYLLABLE NIEUN-E-NIEUNHIEUH +0xB12B # HANGUL SYLLABLE NIEUN-E-TIKEUT +0xB12C # HANGUL SYLLABLE NIEUN-E-RIEUL +0xB12D # HANGUL SYLLABLE NIEUN-E-RIEULKIYEOK +0xB12E # HANGUL SYLLABLE NIEUN-E-RIEULMIEUM +0xB12F # HANGUL SYLLABLE NIEUN-E-RIEULPIEUP +0xB130 # HANGUL SYLLABLE NIEUN-E-RIEULSIOS +0xB131 # HANGUL SYLLABLE NIEUN-E-RIEULTHIEUTH +0xB132 # HANGUL SYLLABLE NIEUN-E-RIEULPHIEUPH +0xB133 # HANGUL SYLLABLE NIEUN-E-RIEULHIEUH +0xB134 # HANGUL SYLLABLE NIEUN-E-MIEUM +0xB135 # HANGUL SYLLABLE NIEUN-E-PIEUP +0xB136 # HANGUL SYLLABLE NIEUN-E-PIEUPSIOS +0xB137 # HANGUL SYLLABLE NIEUN-E-SIOS +0xB138 # HANGUL SYLLABLE NIEUN-E-SSANGSIOS +0xB139 # HANGUL SYLLABLE NIEUN-E-IEUNG +0xB13A # HANGUL SYLLABLE NIEUN-E-CIEUC +0xB13B # HANGUL SYLLABLE NIEUN-E-CHIEUCH +0xB13C # HANGUL SYLLABLE NIEUN-E-KHIEUKH +0xB13D # HANGUL SYLLABLE NIEUN-E-THIEUTH +0xB13E # HANGUL SYLLABLE NIEUN-E-PHIEUPH +0xB13F # HANGUL SYLLABLE NIEUN-E-HIEUH +0xB140 # HANGUL SYLLABLE NIEUN-YEO +0xB141 # HANGUL SYLLABLE NIEUN-YEO-KIYEOK +0xB142 # HANGUL SYLLABLE NIEUN-YEO-SSANGKIYEOK +0xB143 # HANGUL SYLLABLE NIEUN-YEO-KIYEOKSIOS +0xB144 # HANGUL SYLLABLE NIEUN-YEO-NIEUN +0xB145 # HANGUL SYLLABLE NIEUN-YEO-NIEUNCIEUC +0xB146 # HANGUL SYLLABLE NIEUN-YEO-NIEUNHIEUH +0xB147 # HANGUL SYLLABLE NIEUN-YEO-TIKEUT +0xB148 # HANGUL SYLLABLE NIEUN-YEO-RIEUL +0xB149 # HANGUL SYLLABLE NIEUN-YEO-RIEULKIYEOK +0xB14A # HANGUL SYLLABLE NIEUN-YEO-RIEULMIEUM +0xB14B # HANGUL SYLLABLE NIEUN-YEO-RIEULPIEUP +0xB14C # HANGUL SYLLABLE NIEUN-YEO-RIEULSIOS +0xB14D # HANGUL SYLLABLE NIEUN-YEO-RIEULTHIEUTH +0xB14E # HANGUL SYLLABLE NIEUN-YEO-RIEULPHIEUPH +0xB14F # HANGUL SYLLABLE NIEUN-YEO-RIEULHIEUH +0xB150 # HANGUL SYLLABLE NIEUN-YEO-MIEUM +0xB151 # HANGUL SYLLABLE NIEUN-YEO-PIEUP +0xB152 # HANGUL SYLLABLE NIEUN-YEO-PIEUPSIOS +0xB153 # HANGUL SYLLABLE NIEUN-YEO-SIOS +0xB154 # HANGUL SYLLABLE NIEUN-YEO-SSANGSIOS +0xB155 # HANGUL SYLLABLE NIEUN-YEO-IEUNG +0xB156 # HANGUL SYLLABLE NIEUN-YEO-CIEUC +0xB157 # HANGUL SYLLABLE NIEUN-YEO-CHIEUCH +0xB158 # HANGUL SYLLABLE NIEUN-YEO-KHIEUKH +0xB159 # HANGUL SYLLABLE NIEUN-YEO-THIEUTH +0xB15A # HANGUL SYLLABLE NIEUN-YEO-PHIEUPH +0xB15B # HANGUL SYLLABLE NIEUN-YEO-HIEUH +0xB15C # HANGUL SYLLABLE NIEUN-YE +0xB15D # HANGUL SYLLABLE NIEUN-YE-KIYEOK +0xB15E # HANGUL SYLLABLE NIEUN-YE-SSANGKIYEOK +0xB15F # HANGUL SYLLABLE NIEUN-YE-KIYEOKSIOS +0xB160 # HANGUL SYLLABLE NIEUN-YE-NIEUN +0xB161 # HANGUL SYLLABLE NIEUN-YE-NIEUNCIEUC +0xB162 # HANGUL SYLLABLE NIEUN-YE-NIEUNHIEUH +0xB163 # HANGUL SYLLABLE NIEUN-YE-TIKEUT +0xB164 # HANGUL SYLLABLE NIEUN-YE-RIEUL +0xB165 # HANGUL SYLLABLE NIEUN-YE-RIEULKIYEOK +0xB166 # HANGUL SYLLABLE NIEUN-YE-RIEULMIEUM +0xB167 # HANGUL SYLLABLE NIEUN-YE-RIEULPIEUP +0xB168 # HANGUL SYLLABLE NIEUN-YE-RIEULSIOS +0xB169 # HANGUL SYLLABLE NIEUN-YE-RIEULTHIEUTH +0xB16A # HANGUL SYLLABLE NIEUN-YE-RIEULPHIEUPH +0xB16B # HANGUL SYLLABLE NIEUN-YE-RIEULHIEUH +0xB16C # HANGUL SYLLABLE NIEUN-YE-MIEUM +0xB16D # HANGUL SYLLABLE NIEUN-YE-PIEUP +0xB16E # HANGUL SYLLABLE NIEUN-YE-PIEUPSIOS +0xB16F # HANGUL SYLLABLE NIEUN-YE-SIOS +0xB170 # HANGUL SYLLABLE NIEUN-YE-SSANGSIOS +0xB171 # HANGUL SYLLABLE NIEUN-YE-IEUNG +0xB172 # HANGUL SYLLABLE NIEUN-YE-CIEUC +0xB173 # HANGUL SYLLABLE NIEUN-YE-CHIEUCH +0xB174 # HANGUL SYLLABLE NIEUN-YE-KHIEUKH +0xB175 # HANGUL SYLLABLE NIEUN-YE-THIEUTH +0xB176 # HANGUL SYLLABLE NIEUN-YE-PHIEUPH +0xB177 # HANGUL SYLLABLE NIEUN-YE-HIEUH +0xB178 # HANGUL SYLLABLE NIEUN-O +0xB179 # HANGUL SYLLABLE NIEUN-O-KIYEOK +0xB17A # HANGUL SYLLABLE NIEUN-O-SSANGKIYEOK +0xB17B # HANGUL SYLLABLE NIEUN-O-KIYEOKSIOS +0xB17C # HANGUL SYLLABLE NIEUN-O-NIEUN +0xB17D # HANGUL SYLLABLE NIEUN-O-NIEUNCIEUC +0xB17E # HANGUL SYLLABLE NIEUN-O-NIEUNHIEUH +0xB17F # HANGUL SYLLABLE NIEUN-O-TIKEUT +0xB180 # HANGUL SYLLABLE NIEUN-O-RIEUL +0xB181 # HANGUL SYLLABLE NIEUN-O-RIEULKIYEOK +0xB182 # HANGUL SYLLABLE NIEUN-O-RIEULMIEUM +0xB183 # HANGUL SYLLABLE NIEUN-O-RIEULPIEUP +0xB184 # HANGUL SYLLABLE NIEUN-O-RIEULSIOS +0xB185 # HANGUL SYLLABLE NIEUN-O-RIEULTHIEUTH +0xB186 # HANGUL SYLLABLE NIEUN-O-RIEULPHIEUPH +0xB187 # HANGUL SYLLABLE NIEUN-O-RIEULHIEUH +0xB188 # HANGUL SYLLABLE NIEUN-O-MIEUM +0xB189 # HANGUL SYLLABLE NIEUN-O-PIEUP +0xB18A # HANGUL SYLLABLE NIEUN-O-PIEUPSIOS +0xB18B # HANGUL SYLLABLE NIEUN-O-SIOS +0xB18C # HANGUL SYLLABLE NIEUN-O-SSANGSIOS +0xB18D # HANGUL SYLLABLE NIEUN-O-IEUNG +0xB18E # HANGUL SYLLABLE NIEUN-O-CIEUC +0xB18F # HANGUL SYLLABLE NIEUN-O-CHIEUCH +0xB190 # HANGUL SYLLABLE NIEUN-O-KHIEUKH +0xB191 # HANGUL SYLLABLE NIEUN-O-THIEUTH +0xB192 # HANGUL SYLLABLE NIEUN-O-PHIEUPH +0xB193 # HANGUL SYLLABLE NIEUN-O-HIEUH +0xB194 # HANGUL SYLLABLE NIEUN-WA +0xB195 # HANGUL SYLLABLE NIEUN-WA-KIYEOK +0xB196 # HANGUL SYLLABLE NIEUN-WA-SSANGKIYEOK +0xB197 # HANGUL SYLLABLE NIEUN-WA-KIYEOKSIOS +0xB198 # HANGUL SYLLABLE NIEUN-WA-NIEUN +0xB199 # HANGUL SYLLABLE NIEUN-WA-NIEUNCIEUC +0xB19A # HANGUL SYLLABLE NIEUN-WA-NIEUNHIEUH +0xB19B # HANGUL SYLLABLE NIEUN-WA-TIKEUT +0xB19C # HANGUL SYLLABLE NIEUN-WA-RIEUL +0xB19D # HANGUL SYLLABLE NIEUN-WA-RIEULKIYEOK +0xB19E # HANGUL SYLLABLE NIEUN-WA-RIEULMIEUM +0xB19F # HANGUL SYLLABLE NIEUN-WA-RIEULPIEUP +0xB1A0 # HANGUL SYLLABLE NIEUN-WA-RIEULSIOS +0xB1A1 # HANGUL SYLLABLE NIEUN-WA-RIEULTHIEUTH +0xB1A2 # HANGUL SYLLABLE NIEUN-WA-RIEULPHIEUPH +0xB1A3 # HANGUL SYLLABLE NIEUN-WA-RIEULHIEUH +0xB1A4 # HANGUL SYLLABLE NIEUN-WA-MIEUM +0xB1A5 # HANGUL SYLLABLE NIEUN-WA-PIEUP +0xB1A6 # HANGUL SYLLABLE NIEUN-WA-PIEUPSIOS +0xB1A7 # HANGUL SYLLABLE NIEUN-WA-SIOS +0xB1A8 # HANGUL SYLLABLE NIEUN-WA-SSANGSIOS +0xB1A9 # HANGUL SYLLABLE NIEUN-WA-IEUNG +0xB1AA # HANGUL SYLLABLE NIEUN-WA-CIEUC +0xB1AB # HANGUL SYLLABLE NIEUN-WA-CHIEUCH +0xB1AC # HANGUL SYLLABLE NIEUN-WA-KHIEUKH +0xB1AD # HANGUL SYLLABLE NIEUN-WA-THIEUTH +0xB1AE # HANGUL SYLLABLE NIEUN-WA-PHIEUPH +0xB1AF # HANGUL SYLLABLE NIEUN-WA-HIEUH +0xB1B0 # HANGUL SYLLABLE NIEUN-WAE +0xB1B1 # HANGUL SYLLABLE NIEUN-WAE-KIYEOK +0xB1B2 # HANGUL SYLLABLE NIEUN-WAE-SSANGKIYEOK +0xB1B3 # HANGUL SYLLABLE NIEUN-WAE-KIYEOKSIOS +0xB1B4 # HANGUL SYLLABLE NIEUN-WAE-NIEUN +0xB1B5 # HANGUL SYLLABLE NIEUN-WAE-NIEUNCIEUC +0xB1B6 # HANGUL SYLLABLE NIEUN-WAE-NIEUNHIEUH +0xB1B7 # HANGUL SYLLABLE NIEUN-WAE-TIKEUT +0xB1B8 # HANGUL SYLLABLE NIEUN-WAE-RIEUL +0xB1B9 # HANGUL SYLLABLE NIEUN-WAE-RIEULKIYEOK +0xB1BA # HANGUL SYLLABLE NIEUN-WAE-RIEULMIEUM +0xB1BB # HANGUL SYLLABLE NIEUN-WAE-RIEULPIEUP +0xB1BC # HANGUL SYLLABLE NIEUN-WAE-RIEULSIOS +0xB1BD # HANGUL SYLLABLE NIEUN-WAE-RIEULTHIEUTH +0xB1BE # HANGUL SYLLABLE NIEUN-WAE-RIEULPHIEUPH +0xB1BF # HANGUL SYLLABLE NIEUN-WAE-RIEULHIEUH +0xB1C0 # HANGUL SYLLABLE NIEUN-WAE-MIEUM +0xB1C1 # HANGUL SYLLABLE NIEUN-WAE-PIEUP +0xB1C2 # HANGUL SYLLABLE NIEUN-WAE-PIEUPSIOS +0xB1C3 # HANGUL SYLLABLE NIEUN-WAE-SIOS +0xB1C4 # HANGUL SYLLABLE NIEUN-WAE-SSANGSIOS +0xB1C5 # HANGUL SYLLABLE NIEUN-WAE-IEUNG +0xB1C6 # HANGUL SYLLABLE NIEUN-WAE-CIEUC +0xB1C7 # HANGUL SYLLABLE NIEUN-WAE-CHIEUCH +0xB1C8 # HANGUL SYLLABLE NIEUN-WAE-KHIEUKH +0xB1C9 # HANGUL SYLLABLE NIEUN-WAE-THIEUTH +0xB1CA # HANGUL SYLLABLE NIEUN-WAE-PHIEUPH +0xB1CB # HANGUL SYLLABLE NIEUN-WAE-HIEUH +0xB1CC # HANGUL SYLLABLE NIEUN-OE +0xB1CD # HANGUL SYLLABLE NIEUN-OE-KIYEOK +0xB1CE # HANGUL SYLLABLE NIEUN-OE-SSANGKIYEOK +0xB1CF # HANGUL SYLLABLE NIEUN-OE-KIYEOKSIOS +0xB1D0 # HANGUL SYLLABLE NIEUN-OE-NIEUN +0xB1D1 # HANGUL SYLLABLE NIEUN-OE-NIEUNCIEUC +0xB1D2 # HANGUL SYLLABLE NIEUN-OE-NIEUNHIEUH +0xB1D3 # HANGUL SYLLABLE NIEUN-OE-TIKEUT +0xB1D4 # HANGUL SYLLABLE NIEUN-OE-RIEUL +0xB1D5 # HANGUL SYLLABLE NIEUN-OE-RIEULKIYEOK +0xB1D6 # HANGUL SYLLABLE NIEUN-OE-RIEULMIEUM +0xB1D7 # HANGUL SYLLABLE NIEUN-OE-RIEULPIEUP +0xB1D8 # HANGUL SYLLABLE NIEUN-OE-RIEULSIOS +0xB1D9 # HANGUL SYLLABLE NIEUN-OE-RIEULTHIEUTH +0xB1DA # HANGUL SYLLABLE NIEUN-OE-RIEULPHIEUPH +0xB1DB # HANGUL SYLLABLE NIEUN-OE-RIEULHIEUH +0xB1DC # HANGUL SYLLABLE NIEUN-OE-MIEUM +0xB1DD # HANGUL SYLLABLE NIEUN-OE-PIEUP +0xB1DE # HANGUL SYLLABLE NIEUN-OE-PIEUPSIOS +0xB1DF # HANGUL SYLLABLE NIEUN-OE-SIOS +0xB1E0 # HANGUL SYLLABLE NIEUN-OE-SSANGSIOS +0xB1E1 # HANGUL SYLLABLE NIEUN-OE-IEUNG +0xB1E2 # HANGUL SYLLABLE NIEUN-OE-CIEUC +0xB1E3 # HANGUL SYLLABLE NIEUN-OE-CHIEUCH +0xB1E4 # HANGUL SYLLABLE NIEUN-OE-KHIEUKH +0xB1E5 # HANGUL SYLLABLE NIEUN-OE-THIEUTH +0xB1E6 # HANGUL SYLLABLE NIEUN-OE-PHIEUPH +0xB1E7 # HANGUL SYLLABLE NIEUN-OE-HIEUH +0xB1E8 # HANGUL SYLLABLE NIEUN-YO +0xB1E9 # HANGUL SYLLABLE NIEUN-YO-KIYEOK +0xB1EA # HANGUL SYLLABLE NIEUN-YO-SSANGKIYEOK +0xB1EB # HANGUL SYLLABLE NIEUN-YO-KIYEOKSIOS +0xB1EC # HANGUL SYLLABLE NIEUN-YO-NIEUN +0xB1ED # HANGUL SYLLABLE NIEUN-YO-NIEUNCIEUC +0xB1EE # HANGUL SYLLABLE NIEUN-YO-NIEUNHIEUH +0xB1EF # HANGUL SYLLABLE NIEUN-YO-TIKEUT +0xB1F0 # HANGUL SYLLABLE NIEUN-YO-RIEUL +0xB1F1 # HANGUL SYLLABLE NIEUN-YO-RIEULKIYEOK +0xB1F2 # HANGUL SYLLABLE NIEUN-YO-RIEULMIEUM +0xB1F3 # HANGUL SYLLABLE NIEUN-YO-RIEULPIEUP +0xB1F4 # HANGUL SYLLABLE NIEUN-YO-RIEULSIOS +0xB1F5 # HANGUL SYLLABLE NIEUN-YO-RIEULTHIEUTH +0xB1F6 # HANGUL SYLLABLE NIEUN-YO-RIEULPHIEUPH +0xB1F7 # HANGUL SYLLABLE NIEUN-YO-RIEULHIEUH +0xB1F8 # HANGUL SYLLABLE NIEUN-YO-MIEUM +0xB1F9 # HANGUL SYLLABLE NIEUN-YO-PIEUP +0xB1FA # HANGUL SYLLABLE NIEUN-YO-PIEUPSIOS +0xB1FB # HANGUL SYLLABLE NIEUN-YO-SIOS +0xB1FC # HANGUL SYLLABLE NIEUN-YO-SSANGSIOS +0xB1FD # HANGUL SYLLABLE NIEUN-YO-IEUNG +0xB1FE # HANGUL SYLLABLE NIEUN-YO-CIEUC +0xB1FF # HANGUL SYLLABLE NIEUN-YO-CHIEUCH +0xB200 # HANGUL SYLLABLE NIEUN-YO-KHIEUKH +0xB201 # HANGUL SYLLABLE NIEUN-YO-THIEUTH +0xB202 # HANGUL SYLLABLE NIEUN-YO-PHIEUPH +0xB203 # HANGUL SYLLABLE NIEUN-YO-HIEUH +0xB204 # HANGUL SYLLABLE NIEUN-U +0xB205 # HANGUL SYLLABLE NIEUN-U-KIYEOK +0xB206 # HANGUL SYLLABLE NIEUN-U-SSANGKIYEOK +0xB207 # HANGUL SYLLABLE NIEUN-U-KIYEOKSIOS +0xB208 # HANGUL SYLLABLE NIEUN-U-NIEUN +0xB209 # HANGUL SYLLABLE NIEUN-U-NIEUNCIEUC +0xB20A # HANGUL SYLLABLE NIEUN-U-NIEUNHIEUH +0xB20B # HANGUL SYLLABLE NIEUN-U-TIKEUT +0xB20C # HANGUL SYLLABLE NIEUN-U-RIEUL +0xB20D # HANGUL SYLLABLE NIEUN-U-RIEULKIYEOK +0xB20E # HANGUL SYLLABLE NIEUN-U-RIEULMIEUM +0xB20F # HANGUL SYLLABLE NIEUN-U-RIEULPIEUP +0xB210 # HANGUL SYLLABLE NIEUN-U-RIEULSIOS +0xB211 # HANGUL SYLLABLE NIEUN-U-RIEULTHIEUTH +0xB212 # HANGUL SYLLABLE NIEUN-U-RIEULPHIEUPH +0xB213 # HANGUL SYLLABLE NIEUN-U-RIEULHIEUH +0xB214 # HANGUL SYLLABLE NIEUN-U-MIEUM +0xB215 # HANGUL SYLLABLE NIEUN-U-PIEUP +0xB216 # HANGUL SYLLABLE NIEUN-U-PIEUPSIOS +0xB217 # HANGUL SYLLABLE NIEUN-U-SIOS +0xB218 # HANGUL SYLLABLE NIEUN-U-SSANGSIOS +0xB219 # HANGUL SYLLABLE NIEUN-U-IEUNG +0xB21A # HANGUL SYLLABLE NIEUN-U-CIEUC +0xB21B # HANGUL SYLLABLE NIEUN-U-CHIEUCH +0xB21C # HANGUL SYLLABLE NIEUN-U-KHIEUKH +0xB21D # HANGUL SYLLABLE NIEUN-U-THIEUTH +0xB21E # HANGUL SYLLABLE NIEUN-U-PHIEUPH +0xB21F # HANGUL SYLLABLE NIEUN-U-HIEUH +0xB220 # HANGUL SYLLABLE NIEUN-WEO +0xB221 # HANGUL SYLLABLE NIEUN-WEO-KIYEOK +0xB222 # HANGUL SYLLABLE NIEUN-WEO-SSANGKIYEOK +0xB223 # HANGUL SYLLABLE NIEUN-WEO-KIYEOKSIOS +0xB224 # HANGUL SYLLABLE NIEUN-WEO-NIEUN +0xB225 # HANGUL SYLLABLE NIEUN-WEO-NIEUNCIEUC +0xB226 # HANGUL SYLLABLE NIEUN-WEO-NIEUNHIEUH +0xB227 # HANGUL SYLLABLE NIEUN-WEO-TIKEUT +0xB228 # HANGUL SYLLABLE NIEUN-WEO-RIEUL +0xB229 # HANGUL SYLLABLE NIEUN-WEO-RIEULKIYEOK +0xB22A # HANGUL SYLLABLE NIEUN-WEO-RIEULMIEUM +0xB22B # HANGUL SYLLABLE NIEUN-WEO-RIEULPIEUP +0xB22C # HANGUL SYLLABLE NIEUN-WEO-RIEULSIOS +0xB22D # HANGUL SYLLABLE NIEUN-WEO-RIEULTHIEUTH +0xB22E # HANGUL SYLLABLE NIEUN-WEO-RIEULPHIEUPH +0xB22F # HANGUL SYLLABLE NIEUN-WEO-RIEULHIEUH +0xB230 # HANGUL SYLLABLE NIEUN-WEO-MIEUM +0xB231 # HANGUL SYLLABLE NIEUN-WEO-PIEUP +0xB232 # HANGUL SYLLABLE NIEUN-WEO-PIEUPSIOS +0xB233 # HANGUL SYLLABLE NIEUN-WEO-SIOS +0xB234 # HANGUL SYLLABLE NIEUN-WEO-SSANGSIOS +0xB235 # HANGUL SYLLABLE NIEUN-WEO-IEUNG +0xB236 # HANGUL SYLLABLE NIEUN-WEO-CIEUC +0xB237 # HANGUL SYLLABLE NIEUN-WEO-CHIEUCH +0xB238 # HANGUL SYLLABLE NIEUN-WEO-KHIEUKH +0xB239 # HANGUL SYLLABLE NIEUN-WEO-THIEUTH +0xB23A # HANGUL SYLLABLE NIEUN-WEO-PHIEUPH +0xB23B # HANGUL SYLLABLE NIEUN-WEO-HIEUH +0xB23C # HANGUL SYLLABLE NIEUN-WE +0xB23D # HANGUL SYLLABLE NIEUN-WE-KIYEOK +0xB23E # HANGUL SYLLABLE NIEUN-WE-SSANGKIYEOK +0xB23F # HANGUL SYLLABLE NIEUN-WE-KIYEOKSIOS +0xB240 # HANGUL SYLLABLE NIEUN-WE-NIEUN +0xB241 # HANGUL SYLLABLE NIEUN-WE-NIEUNCIEUC +0xB242 # HANGUL SYLLABLE NIEUN-WE-NIEUNHIEUH +0xB243 # HANGUL SYLLABLE NIEUN-WE-TIKEUT +0xB244 # HANGUL SYLLABLE NIEUN-WE-RIEUL +0xB245 # HANGUL SYLLABLE NIEUN-WE-RIEULKIYEOK +0xB246 # HANGUL SYLLABLE NIEUN-WE-RIEULMIEUM +0xB247 # HANGUL SYLLABLE NIEUN-WE-RIEULPIEUP +0xB248 # HANGUL SYLLABLE NIEUN-WE-RIEULSIOS +0xB249 # HANGUL SYLLABLE NIEUN-WE-RIEULTHIEUTH +0xB24A # HANGUL SYLLABLE NIEUN-WE-RIEULPHIEUPH +0xB24B # HANGUL SYLLABLE NIEUN-WE-RIEULHIEUH +0xB24C # HANGUL SYLLABLE NIEUN-WE-MIEUM +0xB24D # HANGUL SYLLABLE NIEUN-WE-PIEUP +0xB24E # HANGUL SYLLABLE NIEUN-WE-PIEUPSIOS +0xB24F # HANGUL SYLLABLE NIEUN-WE-SIOS +0xB250 # HANGUL SYLLABLE NIEUN-WE-SSANGSIOS +0xB251 # HANGUL SYLLABLE NIEUN-WE-IEUNG +0xB252 # HANGUL SYLLABLE NIEUN-WE-CIEUC +0xB253 # HANGUL SYLLABLE NIEUN-WE-CHIEUCH +0xB254 # HANGUL SYLLABLE NIEUN-WE-KHIEUKH +0xB255 # HANGUL SYLLABLE NIEUN-WE-THIEUTH +0xB256 # HANGUL SYLLABLE NIEUN-WE-PHIEUPH +0xB257 # HANGUL SYLLABLE NIEUN-WE-HIEUH +0xB258 # HANGUL SYLLABLE NIEUN-WI +0xB259 # HANGUL SYLLABLE NIEUN-WI-KIYEOK +0xB25A # HANGUL SYLLABLE NIEUN-WI-SSANGKIYEOK +0xB25B # HANGUL SYLLABLE NIEUN-WI-KIYEOKSIOS +0xB25C # HANGUL SYLLABLE NIEUN-WI-NIEUN +0xB25D # HANGUL SYLLABLE NIEUN-WI-NIEUNCIEUC +0xB25E # HANGUL SYLLABLE NIEUN-WI-NIEUNHIEUH +0xB25F # HANGUL SYLLABLE NIEUN-WI-TIKEUT +0xB260 # HANGUL SYLLABLE NIEUN-WI-RIEUL +0xB261 # HANGUL SYLLABLE NIEUN-WI-RIEULKIYEOK +0xB262 # HANGUL SYLLABLE NIEUN-WI-RIEULMIEUM +0xB263 # HANGUL SYLLABLE NIEUN-WI-RIEULPIEUP +0xB264 # HANGUL SYLLABLE NIEUN-WI-RIEULSIOS +0xB265 # HANGUL SYLLABLE NIEUN-WI-RIEULTHIEUTH +0xB266 # HANGUL SYLLABLE NIEUN-WI-RIEULPHIEUPH +0xB267 # HANGUL SYLLABLE NIEUN-WI-RIEULHIEUH +0xB268 # HANGUL SYLLABLE NIEUN-WI-MIEUM +0xB269 # HANGUL SYLLABLE NIEUN-WI-PIEUP +0xB26A # HANGUL SYLLABLE NIEUN-WI-PIEUPSIOS +0xB26B # HANGUL SYLLABLE NIEUN-WI-SIOS +0xB26C # HANGUL SYLLABLE NIEUN-WI-SSANGSIOS +0xB26D # HANGUL SYLLABLE NIEUN-WI-IEUNG +0xB26E # HANGUL SYLLABLE NIEUN-WI-CIEUC +0xB26F # HANGUL SYLLABLE NIEUN-WI-CHIEUCH +0xB270 # HANGUL SYLLABLE NIEUN-WI-KHIEUKH +0xB271 # HANGUL SYLLABLE NIEUN-WI-THIEUTH +0xB272 # HANGUL SYLLABLE NIEUN-WI-PHIEUPH +0xB273 # HANGUL SYLLABLE NIEUN-WI-HIEUH +0xB274 # HANGUL SYLLABLE NIEUN-YU +0xB275 # HANGUL SYLLABLE NIEUN-YU-KIYEOK +0xB276 # HANGUL SYLLABLE NIEUN-YU-SSANGKIYEOK +0xB277 # HANGUL SYLLABLE NIEUN-YU-KIYEOKSIOS +0xB278 # HANGUL SYLLABLE NIEUN-YU-NIEUN +0xB279 # HANGUL SYLLABLE NIEUN-YU-NIEUNCIEUC +0xB27A # HANGUL SYLLABLE NIEUN-YU-NIEUNHIEUH +0xB27B # HANGUL SYLLABLE NIEUN-YU-TIKEUT +0xB27C # HANGUL SYLLABLE NIEUN-YU-RIEUL +0xB27D # HANGUL SYLLABLE NIEUN-YU-RIEULKIYEOK +0xB27E # HANGUL SYLLABLE NIEUN-YU-RIEULMIEUM +0xB27F # HANGUL SYLLABLE NIEUN-YU-RIEULPIEUP +0xB280 # HANGUL SYLLABLE NIEUN-YU-RIEULSIOS +0xB281 # HANGUL SYLLABLE NIEUN-YU-RIEULTHIEUTH +0xB282 # HANGUL SYLLABLE NIEUN-YU-RIEULPHIEUPH +0xB283 # HANGUL SYLLABLE NIEUN-YU-RIEULHIEUH +0xB284 # HANGUL SYLLABLE NIEUN-YU-MIEUM +0xB285 # HANGUL SYLLABLE NIEUN-YU-PIEUP +0xB286 # HANGUL SYLLABLE NIEUN-YU-PIEUPSIOS +0xB287 # HANGUL SYLLABLE NIEUN-YU-SIOS +0xB288 # HANGUL SYLLABLE NIEUN-YU-SSANGSIOS +0xB289 # HANGUL SYLLABLE NIEUN-YU-IEUNG +0xB28A # HANGUL SYLLABLE NIEUN-YU-CIEUC +0xB28B # HANGUL SYLLABLE NIEUN-YU-CHIEUCH +0xB28C # HANGUL SYLLABLE NIEUN-YU-KHIEUKH +0xB28D # HANGUL SYLLABLE NIEUN-YU-THIEUTH +0xB28E # HANGUL SYLLABLE NIEUN-YU-PHIEUPH +0xB28F # HANGUL SYLLABLE NIEUN-YU-HIEUH +0xB290 # HANGUL SYLLABLE NIEUN-EU +0xB291 # HANGUL SYLLABLE NIEUN-EU-KIYEOK +0xB292 # HANGUL SYLLABLE NIEUN-EU-SSANGKIYEOK +0xB293 # HANGUL SYLLABLE NIEUN-EU-KIYEOKSIOS +0xB294 # HANGUL SYLLABLE NIEUN-EU-NIEUN +0xB295 # HANGUL SYLLABLE NIEUN-EU-NIEUNCIEUC +0xB296 # HANGUL SYLLABLE NIEUN-EU-NIEUNHIEUH +0xB297 # HANGUL SYLLABLE NIEUN-EU-TIKEUT +0xB298 # HANGUL SYLLABLE NIEUN-EU-RIEUL +0xB299 # HANGUL SYLLABLE NIEUN-EU-RIEULKIYEOK +0xB29A # HANGUL SYLLABLE NIEUN-EU-RIEULMIEUM +0xB29B # HANGUL SYLLABLE NIEUN-EU-RIEULPIEUP +0xB29C # HANGUL SYLLABLE NIEUN-EU-RIEULSIOS +0xB29D # HANGUL SYLLABLE NIEUN-EU-RIEULTHIEUTH +0xB29E # HANGUL SYLLABLE NIEUN-EU-RIEULPHIEUPH +0xB29F # HANGUL SYLLABLE NIEUN-EU-RIEULHIEUH +0xB2A0 # HANGUL SYLLABLE NIEUN-EU-MIEUM +0xB2A1 # HANGUL SYLLABLE NIEUN-EU-PIEUP +0xB2A2 # HANGUL SYLLABLE NIEUN-EU-PIEUPSIOS +0xB2A3 # HANGUL SYLLABLE NIEUN-EU-SIOS +0xB2A4 # HANGUL SYLLABLE NIEUN-EU-SSANGSIOS +0xB2A5 # HANGUL SYLLABLE NIEUN-EU-IEUNG +0xB2A6 # HANGUL SYLLABLE NIEUN-EU-CIEUC +0xB2A7 # HANGUL SYLLABLE NIEUN-EU-CHIEUCH +0xB2A8 # HANGUL SYLLABLE NIEUN-EU-KHIEUKH +0xB2A9 # HANGUL SYLLABLE NIEUN-EU-THIEUTH +0xB2AA # HANGUL SYLLABLE NIEUN-EU-PHIEUPH +0xB2AB # HANGUL SYLLABLE NIEUN-EU-HIEUH +0xB2AC # HANGUL SYLLABLE NIEUN-YI +0xB2AD # HANGUL SYLLABLE NIEUN-YI-KIYEOK +0xB2AE # HANGUL SYLLABLE NIEUN-YI-SSANGKIYEOK +0xB2AF # HANGUL SYLLABLE NIEUN-YI-KIYEOKSIOS +0xB2B0 # HANGUL SYLLABLE NIEUN-YI-NIEUN +0xB2B1 # HANGUL SYLLABLE NIEUN-YI-NIEUNCIEUC +0xB2B2 # HANGUL SYLLABLE NIEUN-YI-NIEUNHIEUH +0xB2B3 # HANGUL SYLLABLE NIEUN-YI-TIKEUT +0xB2B4 # HANGUL SYLLABLE NIEUN-YI-RIEUL +0xB2B5 # HANGUL SYLLABLE NIEUN-YI-RIEULKIYEOK +0xB2B6 # HANGUL SYLLABLE NIEUN-YI-RIEULMIEUM +0xB2B7 # HANGUL SYLLABLE NIEUN-YI-RIEULPIEUP +0xB2B8 # HANGUL SYLLABLE NIEUN-YI-RIEULSIOS +0xB2B9 # HANGUL SYLLABLE NIEUN-YI-RIEULTHIEUTH +0xB2BA # HANGUL SYLLABLE NIEUN-YI-RIEULPHIEUPH +0xB2BB # HANGUL SYLLABLE NIEUN-YI-RIEULHIEUH +0xB2BC # HANGUL SYLLABLE NIEUN-YI-MIEUM +0xB2BD # HANGUL SYLLABLE NIEUN-YI-PIEUP +0xB2BE # HANGUL SYLLABLE NIEUN-YI-PIEUPSIOS +0xB2BF # HANGUL SYLLABLE NIEUN-YI-SIOS +0xB2C0 # HANGUL SYLLABLE NIEUN-YI-SSANGSIOS +0xB2C1 # HANGUL SYLLABLE NIEUN-YI-IEUNG +0xB2C2 # HANGUL SYLLABLE NIEUN-YI-CIEUC +0xB2C3 # HANGUL SYLLABLE NIEUN-YI-CHIEUCH +0xB2C4 # HANGUL SYLLABLE NIEUN-YI-KHIEUKH +0xB2C5 # HANGUL SYLLABLE NIEUN-YI-THIEUTH +0xB2C6 # HANGUL SYLLABLE NIEUN-YI-PHIEUPH +0xB2C7 # HANGUL SYLLABLE NIEUN-YI-HIEUH +0xB2C8 # HANGUL SYLLABLE NIEUN-I +0xB2C9 # HANGUL SYLLABLE NIEUN-I-KIYEOK +0xB2CA # HANGUL SYLLABLE NIEUN-I-SSANGKIYEOK +0xB2CB # HANGUL SYLLABLE NIEUN-I-KIYEOKSIOS +0xB2CC # HANGUL SYLLABLE NIEUN-I-NIEUN +0xB2CD # HANGUL SYLLABLE NIEUN-I-NIEUNCIEUC +0xB2CE # HANGUL SYLLABLE NIEUN-I-NIEUNHIEUH +0xB2CF # HANGUL SYLLABLE NIEUN-I-TIKEUT +0xB2D0 # HANGUL SYLLABLE NIEUN-I-RIEUL +0xB2D1 # HANGUL SYLLABLE NIEUN-I-RIEULKIYEOK +0xB2D2 # HANGUL SYLLABLE NIEUN-I-RIEULMIEUM-<3/22/95> +0xB2D3 # HANGUL SYLLABLE NIEUN-I-RIEULPIEUP--<3/22/95> +0xB2D4 # HANGUL SYLLABLE NIEUN-I-RIEULSIOS---<3/22/95> +0xB2D5 # HANGUL SYLLABLE NIEUN-I-RIEULTHIEUTH<3/22/95> +0xB2D6 # HANGUL SYLLABLE NIEUN-I-RIEULPHIEUPH<3/22/95> +0xB2D7 # HANGUL SYLLABLE NIEUN-I-RIEULHIEUH +0xB2D8 # HANGUL SYLLABLE NIEUN-I-MIEUM +0xB2D9 # HANGUL SYLLABLE NIEUN-I-PIEUP +0xB2DA # HANGUL SYLLABLE NIEUN-I-PIEUPSIOS +0xB2DB # HANGUL SYLLABLE NIEUN-I-SIOS +0xB2DC # HANGUL SYLLABLE NIEUN-I-SSANGSIOS +0xB2DD # HANGUL SYLLABLE NIEUN-I-IEUNG +0xB2DE # HANGUL SYLLABLE NIEUN-I-CIEUC +0xB2DF # HANGUL SYLLABLE NIEUN-I-CHIEUCH +0xB2E0 # HANGUL SYLLABLE NIEUN-I-KHIEUKH +0xB2E1 # HANGUL SYLLABLE NIEUN-I-THIEUTH +0xB2E2 # HANGUL SYLLABLE NIEUN-I-PHIEUPH +0xB2E3 # HANGUL SYLLABLE NIEUN-I-HIEUH +0xB2E4 # HANGUL SYLLABLE TIKEUT-A +0xB2E5 # HANGUL SYLLABLE TIKEUT-A-KIYEOK +0xB2E6 # HANGUL SYLLABLE TIKEUT-A-SSANGKIYEOK +0xB2E7 # HANGUL SYLLABLE TIKEUT-A-KIYEOKSIOS +0xB2E8 # HANGUL SYLLABLE TIKEUT-A-NIEUN +0xB2E9 # HANGUL SYLLABLE TIKEUT-A-NIEUNCIEUC +0xB2EA # HANGUL SYLLABLE TIKEUT-A-NIEUNHIEUH +0xB2EB # HANGUL SYLLABLE TIKEUT-A-TIKEUT +0xB2EC # HANGUL SYLLABLE TIKEUT-A-RIEUL +0xB2ED # HANGUL SYLLABLE TIKEUT-A-RIEULKIYEOK +0xB2EE # HANGUL SYLLABLE TIKEUT-A-RIEULMIEUM +0xB2EF # HANGUL SYLLABLE TIKEUT-A-RIEULPIEUP +0xB2F0 # HANGUL SYLLABLE TIKEUT-A-RIEULSIOS +0xB2F1 # HANGUL SYLLABLE TIKEUT-A-RIEULTHIEUTH +0xB2F2 # HANGUL SYLLABLE TIKEUT-A-RIEULPHIEUPH +0xB2F3 # HANGUL SYLLABLE TIKEUT-A-RIEULHIEUH +0xB2F4 # HANGUL SYLLABLE TIKEUT-A-MIEUM +0xB2F5 # HANGUL SYLLABLE TIKEUT-A-PIEUP +0xB2F6 # HANGUL SYLLABLE TIKEUT-A-PIEUPSIOS +0xB2F7 # HANGUL SYLLABLE TIKEUT-A-SIOS +0xB2F8 # HANGUL SYLLABLE TIKEUT-A-SSANGSIOS +0xB2F9 # HANGUL SYLLABLE TIKEUT-A-IEUNG +0xB2FA # HANGUL SYLLABLE TIKEUT-A-CIEUC +0xB2FB # HANGUL SYLLABLE TIKEUT-A-CHIEUCH +0xB2FC # HANGUL SYLLABLE TIKEUT-A-KHIEUKH +0xB2FD # HANGUL SYLLABLE TIKEUT-A-THIEUTH +0xB2FE # HANGUL SYLLABLE TIKEUT-A-PHIEUPH +0xB2FF # HANGUL SYLLABLE TIKEUT-A-HIEUH +0xB300 # HANGUL SYLLABLE TIKEUT-AE +0xB301 # HANGUL SYLLABLE TIKEUT-AE-KIYEOK +0xB302 # HANGUL SYLLABLE TIKEUT-AE-SSANGKIYEOK +0xB303 # HANGUL SYLLABLE TIKEUT-AE-KIYEOKSIOS +0xB304 # HANGUL SYLLABLE TIKEUT-AE-NIEUN +0xB305 # HANGUL SYLLABLE TIKEUT-AE-NIEUNCIEUC +0xB306 # HANGUL SYLLABLE TIKEUT-AE-NIEUNHIEUH +0xB307 # HANGUL SYLLABLE TIKEUT-AE-TIKEUT +0xB308 # HANGUL SYLLABLE TIKEUT-AE-RIEUL +0xB309 # HANGUL SYLLABLE TIKEUT-AE-RIEULKIYEOK +0xB30A # HANGUL SYLLABLE TIKEUT-AE-RIEULMIEUM +0xB30B # HANGUL SYLLABLE TIKEUT-AE-RIEULPIEUP +0xB30C # HANGUL SYLLABLE TIKEUT-AE-RIEULSIOS +0xB30D # HANGUL SYLLABLE TIKEUT-AE-RIEULTHIEUTH +0xB30E # HANGUL SYLLABLE TIKEUT-AE-RIEULPHIEUPH +0xB30F # HANGUL SYLLABLE TIKEUT-AE-RIEULHIEUH +0xB310 # HANGUL SYLLABLE TIKEUT-AE-MIEUM +0xB311 # HANGUL SYLLABLE TIKEUT-AE-PIEUP +0xB312 # HANGUL SYLLABLE TIKEUT-AE-PIEUPSIOS +0xB313 # HANGUL SYLLABLE TIKEUT-AE-SIOS +0xB314 # HANGUL SYLLABLE TIKEUT-AE-SSANGSIOS +0xB315 # HANGUL SYLLABLE TIKEUT-AE-IEUNG +0xB316 # HANGUL SYLLABLE TIKEUT-AE-CIEUC +0xB317 # HANGUL SYLLABLE TIKEUT-AE-CHIEUCH +0xB318 # HANGUL SYLLABLE TIKEUT-AE-KHIEUKH +0xB319 # HANGUL SYLLABLE TIKEUT-AE-THIEUTH +0xB31A # HANGUL SYLLABLE TIKEUT-AE-PHIEUPH +0xB31B # HANGUL SYLLABLE TIKEUT-AE-HIEUH +0xB31C # HANGUL SYLLABLE TIKEUT-YA +0xB31D # HANGUL SYLLABLE TIKEUT-YA-KIYEOK +0xB31E # HANGUL SYLLABLE TIKEUT-YA-SSANGKIYEOK +0xB31F # HANGUL SYLLABLE TIKEUT-YA-KIYEOKSIOS +0xB320 # HANGUL SYLLABLE TIKEUT-YA-NIEUN +0xB321 # HANGUL SYLLABLE TIKEUT-YA-NIEUNCIEUC +0xB322 # HANGUL SYLLABLE TIKEUT-YA-NIEUNHIEUH +0xB323 # HANGUL SYLLABLE TIKEUT-YA-TIKEUT +0xB324 # HANGUL SYLLABLE TIKEUT-YA-RIEUL +0xB325 # HANGUL SYLLABLE TIKEUT-YA-RIEULKIYEOK +0xB326 # HANGUL SYLLABLE TIKEUT-YA-RIEULMIEUM +0xB327 # HANGUL SYLLABLE TIKEUT-YA-RIEULPIEUP +0xB328 # HANGUL SYLLABLE TIKEUT-YA-RIEULSIOS +0xB329 # HANGUL SYLLABLE TIKEUT-YA-RIEULTHIEUTH +0xB32A # HANGUL SYLLABLE TIKEUT-YA-RIEULPHIEUPH +0xB32B # HANGUL SYLLABLE TIKEUT-YA-RIEULHIEUH +0xB32C # HANGUL SYLLABLE TIKEUT-YA-MIEUM +0xB32D # HANGUL SYLLABLE TIKEUT-YA-PIEUP +0xB32E # HANGUL SYLLABLE TIKEUT-YA-PIEUPSIOS +0xB32F # HANGUL SYLLABLE TIKEUT-YA-SIOS +0xB330 # HANGUL SYLLABLE TIKEUT-YA-SSANGSIOS +0xB331 # HANGUL SYLLABLE TIKEUT-YA-IEUNG +0xB332 # HANGUL SYLLABLE TIKEUT-YA-CIEUC +0xB333 # HANGUL SYLLABLE TIKEUT-YA-CHIEUCH +0xB334 # HANGUL SYLLABLE TIKEUT-YA-KHIEUKH +0xB335 # HANGUL SYLLABLE TIKEUT-YA-THIEUTH +0xB336 # HANGUL SYLLABLE TIKEUT-YA-PHIEUPH +0xB337 # HANGUL SYLLABLE TIKEUT-YA-HIEUH +0xB338 # HANGUL SYLLABLE TIKEUT-YAE +0xB339 # HANGUL SYLLABLE TIKEUT-YAE-KIYEOK +0xB33A # HANGUL SYLLABLE TIKEUT-YAE-SSANGKIYEOK +0xB33B # HANGUL SYLLABLE TIKEUT-YAE-KIYEOKSIOS +0xB33C # HANGUL SYLLABLE TIKEUT-YAE-NIEUN +0xB33D # HANGUL SYLLABLE TIKEUT-YAE-NIEUNCIEUC +0xB33E # HANGUL SYLLABLE TIKEUT-YAE-NIEUNHIEUH +0xB33F # HANGUL SYLLABLE TIKEUT-YAE-TIKEUT +0xB340 # HANGUL SYLLABLE TIKEUT-YAE-RIEUL +0xB341 # HANGUL SYLLABLE TIKEUT-YAE-RIEULKIYEOK +0xB342 # HANGUL SYLLABLE TIKEUT-YAE-RIEULMIEUM +0xB343 # HANGUL SYLLABLE TIKEUT-YAE-RIEULPIEUP +0xB344 # HANGUL SYLLABLE TIKEUT-YAE-RIEULSIOS +0xB345 # HANGUL SYLLABLE TIKEUT-YAE-RIEULTHIEUTH +0xB346 # HANGUL SYLLABLE TIKEUT-YAE-RIEULPHIEUPH +0xB347 # HANGUL SYLLABLE TIKEUT-YAE-RIEULHIEUH +0xB348 # HANGUL SYLLABLE TIKEUT-YAE-MIEUM +0xB349 # HANGUL SYLLABLE TIKEUT-YAE-PIEUP +0xB34A # HANGUL SYLLABLE TIKEUT-YAE-PIEUPSIOS +0xB34B # HANGUL SYLLABLE TIKEUT-YAE-SIOS +0xB34C # HANGUL SYLLABLE TIKEUT-YAE-SSANGSIOS +0xB34D # HANGUL SYLLABLE TIKEUT-YAE-IEUNG +0xB34E # HANGUL SYLLABLE TIKEUT-YAE-CIEUC +0xB34F # HANGUL SYLLABLE TIKEUT-YAE-CHIEUCH +0xB350 # HANGUL SYLLABLE TIKEUT-YAE-KHIEUKH +0xB351 # HANGUL SYLLABLE TIKEUT-YAE-THIEUTH +0xB352 # HANGUL SYLLABLE TIKEUT-YAE-PHIEUPH +0xB353 # HANGUL SYLLABLE TIKEUT-YAE-HIEUH +0xB354 # HANGUL SYLLABLE TIKEUT-EO +0xB355 # HANGUL SYLLABLE TIKEUT-EO-KIYEOK +0xB356 # HANGUL SYLLABLE TIKEUT-EO-SSANGKIYEOK +0xB357 # HANGUL SYLLABLE TIKEUT-EO-KIYEOKSIOS +0xB358 # HANGUL SYLLABLE TIKEUT-EO-NIEUN +0xB359 # HANGUL SYLLABLE TIKEUT-EO-NIEUNCIEUC +0xB35A # HANGUL SYLLABLE TIKEUT-EO-NIEUNHIEUH +0xB35B # HANGUL SYLLABLE TIKEUT-EO-TIKEUT +0xB35C # HANGUL SYLLABLE TIKEUT-EO-RIEUL +0xB35D # HANGUL SYLLABLE TIKEUT-EO-RIEULKIYEOK +0xB35E # HANGUL SYLLABLE TIKEUT-EO-RIEULMIEUM +0xB35F # HANGUL SYLLABLE TIKEUT-EO-RIEULPIEUP +0xB360 # HANGUL SYLLABLE TIKEUT-EO-RIEULSIOS +0xB361 # HANGUL SYLLABLE TIKEUT-EO-RIEULTHIEUTH +0xB362 # HANGUL SYLLABLE TIKEUT-EO-RIEULPHIEUPH +0xB363 # HANGUL SYLLABLE TIKEUT-EO-RIEULHIEUH +0xB364 # HANGUL SYLLABLE TIKEUT-EO-MIEUM +0xB365 # HANGUL SYLLABLE TIKEUT-EO-PIEUP +0xB366 # HANGUL SYLLABLE TIKEUT-EO-PIEUPSIOS +0xB367 # HANGUL SYLLABLE TIKEUT-EO-SIOS +0xB368 # HANGUL SYLLABLE TIKEUT-EO-SSANGSIOS +0xB369 # HANGUL SYLLABLE TIKEUT-EO-IEUNG +0xB36A # HANGUL SYLLABLE TIKEUT-EO-CIEUC +0xB36B # HANGUL SYLLABLE TIKEUT-EO-CHIEUCH +0xB36C # HANGUL SYLLABLE TIKEUT-EO-KHIEUKH +0xB36D # HANGUL SYLLABLE TIKEUT-EO-THIEUTH +0xB36E # HANGUL SYLLABLE TIKEUT-EO-PHIEUPH +0xB36F # HANGUL SYLLABLE TIKEUT-EO-HIEUH +0xB370 # HANGUL SYLLABLE TIKEUT-E +0xB371 # HANGUL SYLLABLE TIKEUT-E-KIYEOK +0xB372 # HANGUL SYLLABLE TIKEUT-E-SSANGKIYEOK +0xB373 # HANGUL SYLLABLE TIKEUT-E-KIYEOKSIOS +0xB374 # HANGUL SYLLABLE TIKEUT-E-NIEUN +0xB375 # HANGUL SYLLABLE TIKEUT-E-NIEUNCIEUC +0xB376 # HANGUL SYLLABLE TIKEUT-E-NIEUNHIEUH +0xB377 # HANGUL SYLLABLE TIKEUT-E-TIKEUT +0xB378 # HANGUL SYLLABLE TIKEUT-E-RIEUL +0xB379 # HANGUL SYLLABLE TIKEUT-E-RIEULKIYEOK +0xB37A # HANGUL SYLLABLE TIKEUT-E-RIEULMIEUM +0xB37B # HANGUL SYLLABLE TIKEUT-E-RIEULPIEUP +0xB37C # HANGUL SYLLABLE TIKEUT-E-RIEULSIOS +0xB37D # HANGUL SYLLABLE TIKEUT-E-RIEULTHIEUTH +0xB37E # HANGUL SYLLABLE TIKEUT-E-RIEULPHIEUPH +0xB37F # HANGUL SYLLABLE TIKEUT-E-RIEULHIEUH +0xB380 # HANGUL SYLLABLE TIKEUT-E-MIEUM +0xB381 # HANGUL SYLLABLE TIKEUT-E-PIEUP +0xB382 # HANGUL SYLLABLE TIKEUT-E-PIEUPSIOS +0xB383 # HANGUL SYLLABLE TIKEUT-E-SIOS +0xB384 # HANGUL SYLLABLE TIKEUT-E-SSANGSIOS +0xB385 # HANGUL SYLLABLE TIKEUT-E-IEUNG +0xB386 # HANGUL SYLLABLE TIKEUT-E-CIEUC +0xB387 # HANGUL SYLLABLE TIKEUT-E-CHIEUCH +0xB388 # HANGUL SYLLABLE TIKEUT-E-KHIEUKH +0xB389 # HANGUL SYLLABLE TIKEUT-E-THIEUTH +0xB38A # HANGUL SYLLABLE TIKEUT-E-PHIEUPH +0xB38B # HANGUL SYLLABLE TIKEUT-E-HIEUH +0xB38C # HANGUL SYLLABLE TIKEUT-YEO +0xB38D # HANGUL SYLLABLE TIKEUT-YEO-KIYEOK +0xB38E # HANGUL SYLLABLE TIKEUT-YEO-SSANGKIYEOK +0xB38F # HANGUL SYLLABLE TIKEUT-YEO-KIYEOKSIOS +0xB390 # HANGUL SYLLABLE TIKEUT-YEO-NIEUN +0xB391 # HANGUL SYLLABLE TIKEUT-YEO-NIEUNCIEUC +0xB392 # HANGUL SYLLABLE TIKEUT-YEO-NIEUNHIEUH +0xB393 # HANGUL SYLLABLE TIKEUT-YEO-TIKEUT +0xB394 # HANGUL SYLLABLE TIKEUT-YEO-RIEUL +0xB395 # HANGUL SYLLABLE TIKEUT-YEO-RIEULKIYEOK +0xB396 # HANGUL SYLLABLE TIKEUT-YEO-RIEULMIEUM +0xB397 # HANGUL SYLLABLE TIKEUT-YEO-RIEULPIEUP +0xB398 # HANGUL SYLLABLE TIKEUT-YEO-RIEULSIOS +0xB399 # HANGUL SYLLABLE TIKEUT-YEO-RIEULTHIEUTH +0xB39A # HANGUL SYLLABLE TIKEUT-YEO-RIEULPHIEUPH +0xB39B # HANGUL SYLLABLE TIKEUT-YEO-RIEULHIEUH +0xB39C # HANGUL SYLLABLE TIKEUT-YEO-MIEUM +0xB39D # HANGUL SYLLABLE TIKEUT-YEO-PIEUP +0xB39E # HANGUL SYLLABLE TIKEUT-YEO-PIEUPSIOS +0xB39F # HANGUL SYLLABLE TIKEUT-YEO-SIOS +0xB3A0 # HANGUL SYLLABLE TIKEUT-YEO-SSANGSIOS +0xB3A1 # HANGUL SYLLABLE TIKEUT-YEO-IEUNG +0xB3A2 # HANGUL SYLLABLE TIKEUT-YEO-CIEUC +0xB3A3 # HANGUL SYLLABLE TIKEUT-YEO-CHIEUCH +0xB3A4 # HANGUL SYLLABLE TIKEUT-YEO-KHIEUKH +0xB3A5 # HANGUL SYLLABLE TIKEUT-YEO-THIEUTH +0xB3A6 # HANGUL SYLLABLE TIKEUT-YEO-PHIEUPH +0xB3A7 # HANGUL SYLLABLE TIKEUT-YEO-HIEUH +0xB3A8 # HANGUL SYLLABLE TIKEUT-YE +0xB3A9 # HANGUL SYLLABLE TIKEUT-YE-KIYEOK +0xB3AA # HANGUL SYLLABLE TIKEUT-YE-SSANGKIYEOK +0xB3AB # HANGUL SYLLABLE TIKEUT-YE-KIYEOKSIOS +0xB3AC # HANGUL SYLLABLE TIKEUT-YE-NIEUN +0xB3AD # HANGUL SYLLABLE TIKEUT-YE-NIEUNCIEUC +0xB3AE # HANGUL SYLLABLE TIKEUT-YE-NIEUNHIEUH +0xB3AF # HANGUL SYLLABLE TIKEUT-YE-TIKEUT +0xB3B0 # HANGUL SYLLABLE TIKEUT-YE-RIEUL +0xB3B1 # HANGUL SYLLABLE TIKEUT-YE-RIEULKIYEOK +0xB3B2 # HANGUL SYLLABLE TIKEUT-YE-RIEULMIEUM +0xB3B3 # HANGUL SYLLABLE TIKEUT-YE-RIEULPIEUP +0xB3B4 # HANGUL SYLLABLE TIKEUT-YE-RIEULSIOS +0xB3B5 # HANGUL SYLLABLE TIKEUT-YE-RIEULTHIEUTH +0xB3B6 # HANGUL SYLLABLE TIKEUT-YE-RIEULPHIEUPH +0xB3B7 # HANGUL SYLLABLE TIKEUT-YE-RIEULHIEUH +0xB3B8 # HANGUL SYLLABLE TIKEUT-YE-MIEUM +0xB3B9 # HANGUL SYLLABLE TIKEUT-YE-PIEUP +0xB3BA # HANGUL SYLLABLE TIKEUT-YE-PIEUPSIOS +0xB3BB # HANGUL SYLLABLE TIKEUT-YE-SIOS +0xB3BC # HANGUL SYLLABLE TIKEUT-YE-SSANGSIOS +0xB3BD # HANGUL SYLLABLE TIKEUT-YE-IEUNG +0xB3BE # HANGUL SYLLABLE TIKEUT-YE-CIEUC +0xB3BF # HANGUL SYLLABLE TIKEUT-YE-CHIEUCH +0xB3C0 # HANGUL SYLLABLE TIKEUT-YE-KHIEUKH +0xB3C1 # HANGUL SYLLABLE TIKEUT-YE-THIEUTH +0xB3C2 # HANGUL SYLLABLE TIKEUT-YE-PHIEUPH +0xB3C3 # HANGUL SYLLABLE TIKEUT-YE-HIEUH +0xB3C4 # HANGUL SYLLABLE TIKEUT-O +0xB3C5 # HANGUL SYLLABLE TIKEUT-O-KIYEOK +0xB3C6 # HANGUL SYLLABLE TIKEUT-O-SSANGKIYEOK +0xB3C7 # HANGUL SYLLABLE TIKEUT-O-KIYEOKSIOS +0xB3C8 # HANGUL SYLLABLE TIKEUT-O-NIEUN +0xB3C9 # HANGUL SYLLABLE TIKEUT-O-NIEUNCIEUC +0xB3CA # HANGUL SYLLABLE TIKEUT-O-NIEUNHIEUH +0xB3CB # HANGUL SYLLABLE TIKEUT-O-TIKEUT +0xB3CC # HANGUL SYLLABLE TIKEUT-O-RIEUL +0xB3CD # HANGUL SYLLABLE TIKEUT-O-RIEULKIYEOK +0xB3CE # HANGUL SYLLABLE TIKEUT-O-RIEULMIEUM +0xB3CF # HANGUL SYLLABLE TIKEUT-O-RIEULPIEUP +0xB3D0 # HANGUL SYLLABLE TIKEUT-O-RIEULSIOS +0xB3D1 # HANGUL SYLLABLE TIKEUT-O-RIEULTHIEUTH +0xB3D2 # HANGUL SYLLABLE TIKEUT-O-RIEULPHIEUPH +0xB3D3 # HANGUL SYLLABLE TIKEUT-O-RIEULHIEUH +0xB3D4 # HANGUL SYLLABLE TIKEUT-O-MIEUM +0xB3D5 # HANGUL SYLLABLE TIKEUT-O-PIEUP +0xB3D6 # HANGUL SYLLABLE TIKEUT-O-PIEUPSIOS +0xB3D7 # HANGUL SYLLABLE TIKEUT-O-SIOS +0xB3D8 # HANGUL SYLLABLE TIKEUT-O-SSANGSIOS +0xB3D9 # HANGUL SYLLABLE TIKEUT-O-IEUNG +0xB3DA # HANGUL SYLLABLE TIKEUT-O-CIEUC +0xB3DB # HANGUL SYLLABLE TIKEUT-O-CHIEUCH +0xB3DC # HANGUL SYLLABLE TIKEUT-O-KHIEUKH +0xB3DD # HANGUL SYLLABLE TIKEUT-O-THIEUTH +0xB3DE # HANGUL SYLLABLE TIKEUT-O-PHIEUPH +0xB3DF # HANGUL SYLLABLE TIKEUT-O-HIEUH +0xB3E0 # HANGUL SYLLABLE TIKEUT-WA +0xB3E1 # HANGUL SYLLABLE TIKEUT-WA-KIYEOK +0xB3E2 # HANGUL SYLLABLE TIKEUT-WA-SSANGKIYEOK +0xB3E3 # HANGUL SYLLABLE TIKEUT-WA-KIYEOKSIOS +0xB3E4 # HANGUL SYLLABLE TIKEUT-WA-NIEUN +0xB3E5 # HANGUL SYLLABLE TIKEUT-WA-NIEUNCIEUC +0xB3E6 # HANGUL SYLLABLE TIKEUT-WA-NIEUNHIEUH +0xB3E7 # HANGUL SYLLABLE TIKEUT-WA-TIKEUT +0xB3E8 # HANGUL SYLLABLE TIKEUT-WA-RIEUL +0xB3E9 # HANGUL SYLLABLE TIKEUT-WA-RIEULKIYEOK +0xB3EA # HANGUL SYLLABLE TIKEUT-WA-RIEULMIEUM +0xB3EB # HANGUL SYLLABLE TIKEUT-WA-RIEULPIEUP +0xB3EC # HANGUL SYLLABLE TIKEUT-WA-RIEULSIOS +0xB3ED # HANGUL SYLLABLE TIKEUT-WA-RIEULTHIEUTH +0xB3EE # HANGUL SYLLABLE TIKEUT-WA-RIEULPHIEUPH +0xB3EF # HANGUL SYLLABLE TIKEUT-WA-RIEULHIEUH +0xB3F0 # HANGUL SYLLABLE TIKEUT-WA-MIEUM +0xB3F1 # HANGUL SYLLABLE TIKEUT-WA-PIEUP +0xB3F2 # HANGUL SYLLABLE TIKEUT-WA-PIEUPSIOS +0xB3F3 # HANGUL SYLLABLE TIKEUT-WA-SIOS +0xB3F4 # HANGUL SYLLABLE TIKEUT-WA-SSANGSIOS +0xB3F5 # HANGUL SYLLABLE TIKEUT-WA-IEUNG +0xB3F6 # HANGUL SYLLABLE TIKEUT-WA-CIEUC +0xB3F7 # HANGUL SYLLABLE TIKEUT-WA-CHIEUCH +0xB3F8 # HANGUL SYLLABLE TIKEUT-WA-KHIEUKH +0xB3F9 # HANGUL SYLLABLE TIKEUT-WA-THIEUTH +0xB3FA # HANGUL SYLLABLE TIKEUT-WA-PHIEUPH +0xB3FB # HANGUL SYLLABLE TIKEUT-WA-HIEUH +0xB3FC # HANGUL SYLLABLE TIKEUT-WAE +0xB3FD # HANGUL SYLLABLE TIKEUT-WAE-KIYEOK +0xB3FE # HANGUL SYLLABLE TIKEUT-WAE-SSANGKIYEOK +0xB3FF # HANGUL SYLLABLE TIKEUT-WAE-KIYEOKSIOS +0xB400 # HANGUL SYLLABLE TIKEUT-WAE-NIEUN +0xB401 # HANGUL SYLLABLE TIKEUT-WAE-NIEUNCIEUC +0xB402 # HANGUL SYLLABLE TIKEUT-WAE-NIEUNHIEUH +0xB403 # HANGUL SYLLABLE TIKEUT-WAE-TIKEUT +0xB404 # HANGUL SYLLABLE TIKEUT-WAE-RIEUL +0xB405 # HANGUL SYLLABLE TIKEUT-WAE-RIEULKIYEOK +0xB406 # HANGUL SYLLABLE TIKEUT-WAE-RIEULMIEUM +0xB407 # HANGUL SYLLABLE TIKEUT-WAE-RIEULPIEUP +0xB408 # HANGUL SYLLABLE TIKEUT-WAE-RIEULSIOS +0xB409 # HANGUL SYLLABLE TIKEUT-WAE-RIEULTHIEUTH +0xB40A # HANGUL SYLLABLE TIKEUT-WAE-RIEULPHIEUPH +0xB40B # HANGUL SYLLABLE TIKEUT-WAE-RIEULHIEUH +0xB40C # HANGUL SYLLABLE TIKEUT-WAE-MIEUM +0xB40D # HANGUL SYLLABLE TIKEUT-WAE-PIEUP +0xB40E # HANGUL SYLLABLE TIKEUT-WAE-PIEUPSIOS +0xB40F # HANGUL SYLLABLE TIKEUT-WAE-SIOS +0xB410 # HANGUL SYLLABLE TIKEUT-WAE-SSANGSIOS +0xB411 # HANGUL SYLLABLE TIKEUT-WAE-IEUNG +0xB412 # HANGUL SYLLABLE TIKEUT-WAE-CIEUC +0xB413 # HANGUL SYLLABLE TIKEUT-WAE-CHIEUCH +0xB414 # HANGUL SYLLABLE TIKEUT-WAE-KHIEUKH +0xB415 # HANGUL SYLLABLE TIKEUT-WAE-THIEUTH +0xB416 # HANGUL SYLLABLE TIKEUT-WAE-PHIEUPH +0xB417 # HANGUL SYLLABLE TIKEUT-WAE-HIEUH +0xB418 # HANGUL SYLLABLE TIKEUT-OE +0xB419 # HANGUL SYLLABLE TIKEUT-OE-KIYEOK +0xB41A # HANGUL SYLLABLE TIKEUT-OE-SSANGKIYEOK +0xB41B # HANGUL SYLLABLE TIKEUT-OE-KIYEOKSIOS +0xB41C # HANGUL SYLLABLE TIKEUT-OE-NIEUN +0xB41D # HANGUL SYLLABLE TIKEUT-OE-NIEUNCIEUC +0xB41E # HANGUL SYLLABLE TIKEUT-OE-NIEUNHIEUH +0xB41F # HANGUL SYLLABLE TIKEUT-OE-TIKEUT +0xB420 # HANGUL SYLLABLE TIKEUT-OE-RIEUL +0xB421 # HANGUL SYLLABLE TIKEUT-OE-RIEULKIYEOK +0xB422 # HANGUL SYLLABLE TIKEUT-OE-RIEULMIEUM +0xB423 # HANGUL SYLLABLE TIKEUT-OE-RIEULPIEUP +0xB424 # HANGUL SYLLABLE TIKEUT-OE-RIEULSIOS +0xB425 # HANGUL SYLLABLE TIKEUT-OE-RIEULTHIEUTH +0xB426 # HANGUL SYLLABLE TIKEUT-OE-RIEULPHIEUPH +0xB427 # HANGUL SYLLABLE TIKEUT-OE-RIEULHIEUH +0xB428 # HANGUL SYLLABLE TIKEUT-OE-MIEUM +0xB429 # HANGUL SYLLABLE TIKEUT-OE-PIEUP +0xB42A # HANGUL SYLLABLE TIKEUT-OE-PIEUPSIOS +0xB42B # HANGUL SYLLABLE TIKEUT-OE-SIOS +0xB42C # HANGUL SYLLABLE TIKEUT-OE-SSANGSIOS +0xB42D # HANGUL SYLLABLE TIKEUT-OE-IEUNG +0xB42E # HANGUL SYLLABLE TIKEUT-OE-CIEUC +0xB42F # HANGUL SYLLABLE TIKEUT-OE-CHIEUCH +0xB430 # HANGUL SYLLABLE TIKEUT-OE-KHIEUKH +0xB431 # HANGUL SYLLABLE TIKEUT-OE-THIEUTH +0xB432 # HANGUL SYLLABLE TIKEUT-OE-PHIEUPH +0xB433 # HANGUL SYLLABLE TIKEUT-OE-HIEUH +0xB434 # HANGUL SYLLABLE TIKEUT-YO +0xB435 # HANGUL SYLLABLE TIKEUT-YO-KIYEOK +0xB436 # HANGUL SYLLABLE TIKEUT-YO-SSANGKIYEOK +0xB437 # HANGUL SYLLABLE TIKEUT-YO-KIYEOKSIOS +0xB438 # HANGUL SYLLABLE TIKEUT-YO-NIEUN +0xB439 # HANGUL SYLLABLE TIKEUT-YO-NIEUNCIEUC +0xB43A # HANGUL SYLLABLE TIKEUT-YO-NIEUNHIEUH +0xB43B # HANGUL SYLLABLE TIKEUT-YO-TIKEUT +0xB43C # HANGUL SYLLABLE TIKEUT-YO-RIEUL +0xB43D # HANGUL SYLLABLE TIKEUT-YO-RIEULKIYEOK +0xB43E # HANGUL SYLLABLE TIKEUT-YO-RIEULMIEUM +0xB43F # HANGUL SYLLABLE TIKEUT-YO-RIEULPIEUP +0xB440 # HANGUL SYLLABLE TIKEUT-YO-RIEULSIOS +0xB441 # HANGUL SYLLABLE TIKEUT-YO-RIEULTHIEUTH +0xB442 # HANGUL SYLLABLE TIKEUT-YO-RIEULPHIEUPH +0xB443 # HANGUL SYLLABLE TIKEUT-YO-RIEULHIEUH +0xB444 # HANGUL SYLLABLE TIKEUT-YO-MIEUM +0xB445 # HANGUL SYLLABLE TIKEUT-YO-PIEUP +0xB446 # HANGUL SYLLABLE TIKEUT-YO-PIEUPSIOS +0xB447 # HANGUL SYLLABLE TIKEUT-YO-SIOS +0xB448 # HANGUL SYLLABLE TIKEUT-YO-SSANGSIOS +0xB449 # HANGUL SYLLABLE TIKEUT-YO-IEUNG +0xB44A # HANGUL SYLLABLE TIKEUT-YO-CIEUC +0xB44B # HANGUL SYLLABLE TIKEUT-YO-CHIEUCH +0xB44C # HANGUL SYLLABLE TIKEUT-YO-KHIEUKH +0xB44D # HANGUL SYLLABLE TIKEUT-YO-THIEUTH +0xB44E # HANGUL SYLLABLE TIKEUT-YO-PHIEUPH +0xB44F # HANGUL SYLLABLE TIKEUT-YO-HIEUH +0xB450 # HANGUL SYLLABLE TIKEUT-U +0xB451 # HANGUL SYLLABLE TIKEUT-U-KIYEOK +0xB452 # HANGUL SYLLABLE TIKEUT-U-SSANGKIYEOK +0xB453 # HANGUL SYLLABLE TIKEUT-U-KIYEOKSIOS +0xB454 # HANGUL SYLLABLE TIKEUT-U-NIEUN +0xB455 # HANGUL SYLLABLE TIKEUT-U-NIEUNCIEUC +0xB456 # HANGUL SYLLABLE TIKEUT-U-NIEUNHIEUH +0xB457 # HANGUL SYLLABLE TIKEUT-U-TIKEUT +0xB458 # HANGUL SYLLABLE TIKEUT-U-RIEUL +0xB459 # HANGUL SYLLABLE TIKEUT-U-RIEULKIYEOK +0xB45A # HANGUL SYLLABLE TIKEUT-U-RIEULMIEUM +0xB45B # HANGUL SYLLABLE TIKEUT-U-RIEULPIEUP +0xB45C # HANGUL SYLLABLE TIKEUT-U-RIEULSIOS +0xB45D # HANGUL SYLLABLE TIKEUT-U-RIEULTHIEUTH +0xB45E # HANGUL SYLLABLE TIKEUT-U-RIEULPHIEUPH +0xB45F # HANGUL SYLLABLE TIKEUT-U-RIEULHIEUH +0xB460 # HANGUL SYLLABLE TIKEUT-U-MIEUM +0xB461 # HANGUL SYLLABLE TIKEUT-U-PIEUP +0xB462 # HANGUL SYLLABLE TIKEUT-U-PIEUPSIOS +0xB463 # HANGUL SYLLABLE TIKEUT-U-SIOS +0xB464 # HANGUL SYLLABLE TIKEUT-U-SSANGSIOS +0xB465 # HANGUL SYLLABLE TIKEUT-U-IEUNG +0xB466 # HANGUL SYLLABLE TIKEUT-U-CIEUC +0xB467 # HANGUL SYLLABLE TIKEUT-U-CHIEUCH +0xB468 # HANGUL SYLLABLE TIKEUT-U-KHIEUKH +0xB469 # HANGUL SYLLABLE TIKEUT-U-THIEUTH +0xB46A # HANGUL SYLLABLE TIKEUT-U-PHIEUPH +0xB46B # HANGUL SYLLABLE TIKEUT-U-HIEUH +0xB46C # HANGUL SYLLABLE TIKEUT-WEO +0xB46D # HANGUL SYLLABLE TIKEUT-WEO-KIYEOK +0xB46E # HANGUL SYLLABLE TIKEUT-WEO-SSANGKIYEOK +0xB46F # HANGUL SYLLABLE TIKEUT-WEO-KIYEOKSIOS +0xB470 # HANGUL SYLLABLE TIKEUT-WEO-NIEUN +0xB471 # HANGUL SYLLABLE TIKEUT-WEO-NIEUNCIEUC +0xB472 # HANGUL SYLLABLE TIKEUT-WEO-NIEUNHIEUH +0xB473 # HANGUL SYLLABLE TIKEUT-WEO-TIKEUT +0xB474 # HANGUL SYLLABLE TIKEUT-WEO-RIEUL +0xB475 # HANGUL SYLLABLE TIKEUT-WEO-RIEULKIYEOK +0xB476 # HANGUL SYLLABLE TIKEUT-WEO-RIEULMIEUM +0xB477 # HANGUL SYLLABLE TIKEUT-WEO-RIEULPIEUP +0xB478 # HANGUL SYLLABLE TIKEUT-WEO-RIEULSIOS +0xB479 # HANGUL SYLLABLE TIKEUT-WEO-RIEULTHIEUTH +0xB47A # HANGUL SYLLABLE TIKEUT-WEO-RIEULPHIEUPH +0xB47B # HANGUL SYLLABLE TIKEUT-WEO-RIEULHIEUH +0xB47C # HANGUL SYLLABLE TIKEUT-WEO-MIEUM +0xB47D # HANGUL SYLLABLE TIKEUT-WEO-PIEUP +0xB47E # HANGUL SYLLABLE TIKEUT-WEO-PIEUPSIOS +0xB47F # HANGUL SYLLABLE TIKEUT-WEO-SIOS +0xB480 # HANGUL SYLLABLE TIKEUT-WEO-SSANGSIOS +0xB481 # HANGUL SYLLABLE TIKEUT-WEO-IEUNG +0xB482 # HANGUL SYLLABLE TIKEUT-WEO-CIEUC +0xB483 # HANGUL SYLLABLE TIKEUT-WEO-CHIEUCH +0xB484 # HANGUL SYLLABLE TIKEUT-WEO-KHIEUKH +0xB485 # HANGUL SYLLABLE TIKEUT-WEO-THIEUTH +0xB486 # HANGUL SYLLABLE TIKEUT-WEO-PHIEUPH +0xB487 # HANGUL SYLLABLE TIKEUT-WEO-HIEUH +0xB488 # HANGUL SYLLABLE TIKEUT-WE +0xB489 # HANGUL SYLLABLE TIKEUT-WE-KIYEOK +0xB48A # HANGUL SYLLABLE TIKEUT-WE-SSANGKIYEOK +0xB48B # HANGUL SYLLABLE TIKEUT-WE-KIYEOKSIOS +0xB48C # HANGUL SYLLABLE TIKEUT-WE-NIEUN +0xB48D # HANGUL SYLLABLE TIKEUT-WE-NIEUNCIEUC +0xB48E # HANGUL SYLLABLE TIKEUT-WE-NIEUNHIEUH +0xB48F # HANGUL SYLLABLE TIKEUT-WE-TIKEUT +0xB490 # HANGUL SYLLABLE TIKEUT-WE-RIEUL +0xB491 # HANGUL SYLLABLE TIKEUT-WE-RIEULKIYEOK +0xB492 # HANGUL SYLLABLE TIKEUT-WE-RIEULMIEUM +0xB493 # HANGUL SYLLABLE TIKEUT-WE-RIEULPIEUP +0xB494 # HANGUL SYLLABLE TIKEUT-WE-RIEULSIOS +0xB495 # HANGUL SYLLABLE TIKEUT-WE-RIEULTHIEUTH +0xB496 # HANGUL SYLLABLE TIKEUT-WE-RIEULPHIEUPH +0xB497 # HANGUL SYLLABLE TIKEUT-WE-RIEULHIEUH +0xB498 # HANGUL SYLLABLE TIKEUT-WE-MIEUM +0xB499 # HANGUL SYLLABLE TIKEUT-WE-PIEUP +0xB49A # HANGUL SYLLABLE TIKEUT-WE-PIEUPSIOS +0xB49B # HANGUL SYLLABLE TIKEUT-WE-SIOS +0xB49C # HANGUL SYLLABLE TIKEUT-WE-SSANGSIOS +0xB49D # HANGUL SYLLABLE TIKEUT-WE-IEUNG +0xB49E # HANGUL SYLLABLE TIKEUT-WE-CIEUC +0xB49F # HANGUL SYLLABLE TIKEUT-WE-CHIEUCH +0xB4A0 # HANGUL SYLLABLE TIKEUT-WE-KHIEUKH +0xB4A1 # HANGUL SYLLABLE TIKEUT-WE-THIEUTH +0xB4A2 # HANGUL SYLLABLE TIKEUT-WE-PHIEUPH +0xB4A3 # HANGUL SYLLABLE TIKEUT-WE-HIEUH +0xB4A4 # HANGUL SYLLABLE TIKEUT-WI +0xB4A5 # HANGUL SYLLABLE TIKEUT-WI-KIYEOK +0xB4A6 # HANGUL SYLLABLE TIKEUT-WI-SSANGKIYEOK +0xB4A7 # HANGUL SYLLABLE TIKEUT-WI-KIYEOKSIOS +0xB4A8 # HANGUL SYLLABLE TIKEUT-WI-NIEUN +0xB4A9 # HANGUL SYLLABLE TIKEUT-WI-NIEUNCIEUC +0xB4AA # HANGUL SYLLABLE TIKEUT-WI-NIEUNHIEUH +0xB4AB # HANGUL SYLLABLE TIKEUT-WI-TIKEUT +0xB4AC # HANGUL SYLLABLE TIKEUT-WI-RIEUL +0xB4AD # HANGUL SYLLABLE TIKEUT-WI-RIEULKIYEOK +0xB4AE # HANGUL SYLLABLE TIKEUT-WI-RIEULMIEUM +0xB4AF # HANGUL SYLLABLE TIKEUT-WI-RIEULPIEUP +0xB4B0 # HANGUL SYLLABLE TIKEUT-WI-RIEULSIOS +0xB4B1 # HANGUL SYLLABLE TIKEUT-WI-RIEULTHIEUTH +0xB4B2 # HANGUL SYLLABLE TIKEUT-WI-RIEULPHIEUPH +0xB4B3 # HANGUL SYLLABLE TIKEUT-WI-RIEULHIEUH +0xB4B4 # HANGUL SYLLABLE TIKEUT-WI-MIEUM +0xB4B5 # HANGUL SYLLABLE TIKEUT-WI-PIEUP +0xB4B6 # HANGUL SYLLABLE TIKEUT-WI-PIEUPSIOS +0xB4B7 # HANGUL SYLLABLE TIKEUT-WI-SIOS +0xB4B8 # HANGUL SYLLABLE TIKEUT-WI-SSANGSIOS +0xB4B9 # HANGUL SYLLABLE TIKEUT-WI-IEUNG +0xB4BA # HANGUL SYLLABLE TIKEUT-WI-CIEUC +0xB4BB # HANGUL SYLLABLE TIKEUT-WI-CHIEUCH +0xB4BC # HANGUL SYLLABLE TIKEUT-WI-KHIEUKH +0xB4BD # HANGUL SYLLABLE TIKEUT-WI-THIEUTH +0xB4BE # HANGUL SYLLABLE TIKEUT-WI-PHIEUPH +0xB4BF # HANGUL SYLLABLE TIKEUT-WI-HIEUH +0xB4C0 # HANGUL SYLLABLE TIKEUT-YU +0xB4C1 # HANGUL SYLLABLE TIKEUT-YU-KIYEOK +0xB4C2 # HANGUL SYLLABLE TIKEUT-YU-SSANGKIYEOK +0xB4C3 # HANGUL SYLLABLE TIKEUT-YU-KIYEOKSIOS +0xB4C4 # HANGUL SYLLABLE TIKEUT-YU-NIEUN +0xB4C5 # HANGUL SYLLABLE TIKEUT-YU-NIEUNCIEUC +0xB4C6 # HANGUL SYLLABLE TIKEUT-YU-NIEUNHIEUH +0xB4C7 # HANGUL SYLLABLE TIKEUT-YU-TIKEUT +0xB4C8 # HANGUL SYLLABLE TIKEUT-YU-RIEUL +0xB4C9 # HANGUL SYLLABLE TIKEUT-YU-RIEULKIYEOK +0xB4CA # HANGUL SYLLABLE TIKEUT-YU-RIEULMIEUM +0xB4CB # HANGUL SYLLABLE TIKEUT-YU-RIEULPIEUP +0xB4CC # HANGUL SYLLABLE TIKEUT-YU-RIEULSIOS +0xB4CD # HANGUL SYLLABLE TIKEUT-YU-RIEULTHIEUTH +0xB4CE # HANGUL SYLLABLE TIKEUT-YU-RIEULPHIEUPH +0xB4CF # HANGUL SYLLABLE TIKEUT-YU-RIEULHIEUH +0xB4D0 # HANGUL SYLLABLE TIKEUT-YU-MIEUM +0xB4D1 # HANGUL SYLLABLE TIKEUT-YU-PIEUP +0xB4D2 # HANGUL SYLLABLE TIKEUT-YU-PIEUPSIOS +0xB4D3 # HANGUL SYLLABLE TIKEUT-YU-SIOS +0xB4D4 # HANGUL SYLLABLE TIKEUT-YU-SSANGSIOS +0xB4D5 # HANGUL SYLLABLE TIKEUT-YU-IEUNG +0xB4D6 # HANGUL SYLLABLE TIKEUT-YU-CIEUC +0xB4D7 # HANGUL SYLLABLE TIKEUT-YU-CHIEUCH +0xB4D8 # HANGUL SYLLABLE TIKEUT-YU-KHIEUKH +0xB4D9 # HANGUL SYLLABLE TIKEUT-YU-THIEUTH +0xB4DA # HANGUL SYLLABLE TIKEUT-YU-PHIEUPH +0xB4DB # HANGUL SYLLABLE TIKEUT-YU-HIEUH +0xB4DC # HANGUL SYLLABLE TIKEUT-EU +0xB4DD # HANGUL SYLLABLE TIKEUT-EU-KIYEOK +0xB4DE # HANGUL SYLLABLE TIKEUT-EU-SSANGKIYEOK +0xB4DF # HANGUL SYLLABLE TIKEUT-EU-KIYEOKSIOS +0xB4E0 # HANGUL SYLLABLE TIKEUT-EU-NIEUN +0xB4E1 # HANGUL SYLLABLE TIKEUT-EU-NIEUNCIEUC +0xB4E2 # HANGUL SYLLABLE TIKEUT-EU-NIEUNHIEUH +0xB4E3 # HANGUL SYLLABLE TIKEUT-EU-TIKEUT +0xB4E4 # HANGUL SYLLABLE TIKEUT-EU-RIEUL +0xB4E5 # HANGUL SYLLABLE TIKEUT-EU-RIEULKIYEOK +0xB4E6 # HANGUL SYLLABLE TIKEUT-EU-RIEULMIEUM +0xB4E7 # HANGUL SYLLABLE TIKEUT-EU-RIEULPIEUP +0xB4E8 # HANGUL SYLLABLE TIKEUT-EU-RIEULSIOS +0xB4E9 # HANGUL SYLLABLE TIKEUT-EU-RIEULTHIEUTH +0xB4EA # HANGUL SYLLABLE TIKEUT-EU-RIEULPHIEUPH +0xB4EB # HANGUL SYLLABLE TIKEUT-EU-RIEULHIEUH +0xB4EC # HANGUL SYLLABLE TIKEUT-EU-MIEUM +0xB4ED # HANGUL SYLLABLE TIKEUT-EU-PIEUP +0xB4EE # HANGUL SYLLABLE TIKEUT-EU-PIEUPSIOS +0xB4EF # HANGUL SYLLABLE TIKEUT-EU-SIOS +0xB4F0 # HANGUL SYLLABLE TIKEUT-EU-SSANGSIOS +0xB4F1 # HANGUL SYLLABLE TIKEUT-EU-IEUNG +0xB4F2 # HANGUL SYLLABLE TIKEUT-EU-CIEUC +0xB4F3 # HANGUL SYLLABLE TIKEUT-EU-CHIEUCH +0xB4F4 # HANGUL SYLLABLE TIKEUT-EU-KHIEUKH +0xB4F5 # HANGUL SYLLABLE TIKEUT-EU-THIEUTH +0xB4F6 # HANGUL SYLLABLE TIKEUT-EU-PHIEUPH +0xB4F7 # HANGUL SYLLABLE TIKEUT-EU-HIEUH +0xB4F8 # HANGUL SYLLABLE TIKEUT-YI +0xB4F9 # HANGUL SYLLABLE TIKEUT-YI-KIYEOK +0xB4FA # HANGUL SYLLABLE TIKEUT-YI-SSANGKIYEOK +0xB4FB # HANGUL SYLLABLE TIKEUT-YI-KIYEOKSIOS +0xB4FC # HANGUL SYLLABLE TIKEUT-YI-NIEUN +0xB4FD # HANGUL SYLLABLE TIKEUT-YI-NIEUNCIEUC +0xB4FE # HANGUL SYLLABLE TIKEUT-YI-NIEUNHIEUH +0xB4FF # HANGUL SYLLABLE TIKEUT-YI-TIKEUT +0xB500 # HANGUL SYLLABLE TIKEUT-YI-RIEUL +0xB501 # HANGUL SYLLABLE TIKEUT-YI-RIEULKIYEOK +0xB502 # HANGUL SYLLABLE TIKEUT-YI-RIEULMIEUM +0xB503 # HANGUL SYLLABLE TIKEUT-YI-RIEULPIEUP +0xB504 # HANGUL SYLLABLE TIKEUT-YI-RIEULSIOS +0xB505 # HANGUL SYLLABLE TIKEUT-YI-RIEULTHIEUTH +0xB506 # HANGUL SYLLABLE TIKEUT-YI-RIEULPHIEUPH +0xB507 # HANGUL SYLLABLE TIKEUT-YI-RIEULHIEUH +0xB508 # HANGUL SYLLABLE TIKEUT-YI-MIEUM +0xB509 # HANGUL SYLLABLE TIKEUT-YI-PIEUP +0xB50A # HANGUL SYLLABLE TIKEUT-YI-PIEUPSIOS +0xB50B # HANGUL SYLLABLE TIKEUT-YI-SIOS +0xB50C # HANGUL SYLLABLE TIKEUT-YI-SSANGSIOS +0xB50D # HANGUL SYLLABLE TIKEUT-YI-IEUNG +0xB50E # HANGUL SYLLABLE TIKEUT-YI-CIEUC +0xB50F # HANGUL SYLLABLE TIKEUT-YI-CHIEUCH +0xB510 # HANGUL SYLLABLE TIKEUT-YI-KHIEUKH +0xB511 # HANGUL SYLLABLE TIKEUT-YI-THIEUTH +0xB512 # HANGUL SYLLABLE TIKEUT-YI-PHIEUPH +0xB513 # HANGUL SYLLABLE TIKEUT-YI-HIEUH +0xB514 # HANGUL SYLLABLE TIKEUT-I +0xB515 # HANGUL SYLLABLE TIKEUT-I-KIYEOK +0xB516 # HANGUL SYLLABLE TIKEUT-I-SSANGKIYEOK +0xB517 # HANGUL SYLLABLE TIKEUT-I-KIYEOKSIOS +0xB518 # HANGUL SYLLABLE TIKEUT-I-NIEUN +0xB519 # HANGUL SYLLABLE TIKEUT-I-NIEUNCIEUC +0xB51A # HANGUL SYLLABLE TIKEUT-I-NIEUNHIEUH +0xB51B # HANGUL SYLLABLE TIKEUT-I-TIKEUT +0xB51C # HANGUL SYLLABLE TIKEUT-I-RIEUL +0xB51D # HANGUL SYLLABLE TIKEUT-I-RIEULKIYEOK +0xB51E # HANGUL SYLLABLE TIKEUT-I-RIEULMIEUM +0xB51F # HANGUL SYLLABLE TIKEUT-I-RIEULPIEUP +0xB520 # HANGUL SYLLABLE TIKEUT-I-RIEULSIOS +0xB521 # HANGUL SYLLABLE TIKEUT-I-RIEULTHIEUTH +0xB522 # HANGUL SYLLABLE TIKEUT-I-RIEULPHIEUPH +0xB523 # HANGUL SYLLABLE TIKEUT-I-RIEULHIEUH +0xB524 # HANGUL SYLLABLE TIKEUT-I-MIEUM +0xB525 # HANGUL SYLLABLE TIKEUT-I-PIEUP +0xB526 # HANGUL SYLLABLE TIKEUT-I-PIEUPSIOS +0xB527 # HANGUL SYLLABLE TIKEUT-I-SIOS +0xB528 # HANGUL SYLLABLE TIKEUT-I-SSANGSIOS +0xB529 # HANGUL SYLLABLE TIKEUT-I-IEUNG +0xB52A # HANGUL SYLLABLE TIKEUT-I-CIEUC +0xB52B # HANGUL SYLLABLE TIKEUT-I-CHIEUCH +0xB52C # HANGUL SYLLABLE TIKEUT-I-KHIEUKH +0xB52D # HANGUL SYLLABLE TIKEUT-I-THIEUTH +0xB52E # HANGUL SYLLABLE TIKEUT-I-PHIEUPH +0xB52F # HANGUL SYLLABLE TIKEUT-I-HIEUH +0xB530 # HANGUL SYLLABLE SSANGTIKEUT-A +0xB531 # HANGUL SYLLABLE SSANGTIKEUT-A-KIYEOK +0xB532 # HANGUL SYLLABLE SSANGTIKEUT-A-SSANGKIYEOK +0xB533 # HANGUL SYLLABLE SSANGTIKEUT-A-KIYEOKSIOS +0xB534 # HANGUL SYLLABLE SSANGTIKEUT-A-NIEUN +0xB535 # HANGUL SYLLABLE SSANGTIKEUT-A-NIEUNCIEUC +0xB536 # HANGUL SYLLABLE SSANGTIKEUT-A-NIEUNHIEUH +0xB537 # HANGUL SYLLABLE SSANGTIKEUT-A-TIKEUT +0xB538 # HANGUL SYLLABLE SSANGTIKEUT-A-RIEUL +0xB539 # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULKIYEOK +0xB53A # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULMIEUM +0xB53B # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULPIEUP +0xB53C # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULSIOS +0xB53D # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULTHIEUTH +0xB53E # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULPHIEUPH +0xB53F # HANGUL SYLLABLE SSANGTIKEUT-A-RIEULHIEUH +0xB540 # HANGUL SYLLABLE SSANGTIKEUT-A-MIEUM +0xB541 # HANGUL SYLLABLE SSANGTIKEUT-A-PIEUP +0xB542 # HANGUL SYLLABLE SSANGTIKEUT-A-PIEUPSIOS +0xB543 # HANGUL SYLLABLE SSANGTIKEUT-A-SIOS +0xB544 # HANGUL SYLLABLE SSANGTIKEUT-A-SSANGSIOS +0xB545 # HANGUL SYLLABLE SSANGTIKEUT-A-IEUNG +0xB546 # HANGUL SYLLABLE SSANGTIKEUT-A-CIEUC +0xB547 # HANGUL SYLLABLE SSANGTIKEUT-A-CHIEUCH +0xB548 # HANGUL SYLLABLE SSANGTIKEUT-A-KHIEUKH +0xB549 # HANGUL SYLLABLE SSANGTIKEUT-A-THIEUTH +0xB54A # HANGUL SYLLABLE SSANGTIKEUT-A-PHIEUPH +0xB54B # HANGUL SYLLABLE SSANGTIKEUT-A-HIEUH +0xB54C # HANGUL SYLLABLE SSANGTIKEUT-AE +0xB54D # HANGUL SYLLABLE SSANGTIKEUT-AE-KIYEOK +0xB54E # HANGUL SYLLABLE SSANGTIKEUT-AE-SSANGKIYEOK +0xB54F # HANGUL SYLLABLE SSANGTIKEUT-AE-KIYEOKSIOS +0xB550 # HANGUL SYLLABLE SSANGTIKEUT-AE-NIEUN +0xB551 # HANGUL SYLLABLE SSANGTIKEUT-AE-NIEUNCIEUC +0xB552 # HANGUL SYLLABLE SSANGTIKEUT-AE-NIEUNHIEUH +0xB553 # HANGUL SYLLABLE SSANGTIKEUT-AE-TIKEUT +0xB554 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEUL +0xB555 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULKIYEOK +0xB556 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULMIEUM +0xB557 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULPIEUP +0xB558 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULSIOS +0xB559 # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULTHIEUTH +0xB55A # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULPHIEUPH +0xB55B # HANGUL SYLLABLE SSANGTIKEUT-AE-RIEULHIEUH +0xB55C # HANGUL SYLLABLE SSANGTIKEUT-AE-MIEUM +0xB55D # HANGUL SYLLABLE SSANGTIKEUT-AE-PIEUP +0xB55E # HANGUL SYLLABLE SSANGTIKEUT-AE-PIEUPSIOS +0xB55F # HANGUL SYLLABLE SSANGTIKEUT-AE-SIOS +0xB560 # HANGUL SYLLABLE SSANGTIKEUT-AE-SSANGSIOS +0xB561 # HANGUL SYLLABLE SSANGTIKEUT-AE-IEUNG +0xB562 # HANGUL SYLLABLE SSANGTIKEUT-AE-CIEUC +0xB563 # HANGUL SYLLABLE SSANGTIKEUT-AE-CHIEUCH +0xB564 # HANGUL SYLLABLE SSANGTIKEUT-AE-KHIEUKH +0xB565 # HANGUL SYLLABLE SSANGTIKEUT-AE-THIEUTH +0xB566 # HANGUL SYLLABLE SSANGTIKEUT-AE-PHIEUPH +0xB567 # HANGUL SYLLABLE SSANGTIKEUT-AE-HIEUH +0xB568 # HANGUL SYLLABLE SSANGTIKEUT-YA +0xB569 # HANGUL SYLLABLE SSANGTIKEUT-YA-KIYEOK +0xB56A # HANGUL SYLLABLE SSANGTIKEUT-YA-SSANGKIYEOK +0xB56B # HANGUL SYLLABLE SSANGTIKEUT-YA-KIYEOKSIOS +0xB56C # HANGUL SYLLABLE SSANGTIKEUT-YA-NIEUN +0xB56D # HANGUL SYLLABLE SSANGTIKEUT-YA-NIEUNCIEUC +0xB56E # HANGUL SYLLABLE SSANGTIKEUT-YA-NIEUNHIEUH +0xB56F # HANGUL SYLLABLE SSANGTIKEUT-YA-TIKEUT +0xB570 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEUL +0xB571 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULKIYEOK +0xB572 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULMIEUM +0xB573 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULPIEUP +0xB574 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULSIOS +0xB575 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULTHIEUTH +0xB576 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULPHIEUPH +0xB577 # HANGUL SYLLABLE SSANGTIKEUT-YA-RIEULHIEUH +0xB578 # HANGUL SYLLABLE SSANGTIKEUT-YA-MIEUM +0xB579 # HANGUL SYLLABLE SSANGTIKEUT-YA-PIEUP +0xB57A # HANGUL SYLLABLE SSANGTIKEUT-YA-PIEUPSIOS +0xB57B # HANGUL SYLLABLE SSANGTIKEUT-YA-SIOS +0xB57C # HANGUL SYLLABLE SSANGTIKEUT-YA-SSANGSIOS +0xB57D # HANGUL SYLLABLE SSANGTIKEUT-YA-IEUNG +0xB57E # HANGUL SYLLABLE SSANGTIKEUT-YA-CIEUC +0xB57F # HANGUL SYLLABLE SSANGTIKEUT-YA-CHIEUCH +0xB580 # HANGUL SYLLABLE SSANGTIKEUT-YA-KHIEUKH +0xB581 # HANGUL SYLLABLE SSANGTIKEUT-YA-THIEUTH +0xB582 # HANGUL SYLLABLE SSANGTIKEUT-YA-PHIEUPH +0xB583 # HANGUL SYLLABLE SSANGTIKEUT-YA-HIEUH +0xB584 # HANGUL SYLLABLE SSANGTIKEUT-YAE +0xB585 # HANGUL SYLLABLE SSANGTIKEUT-YAE-KIYEOK +0xB586 # HANGUL SYLLABLE SSANGTIKEUT-YAE-SSANGKIYEOK +0xB587 # HANGUL SYLLABLE SSANGTIKEUT-YAE-KIYEOKSIOS +0xB588 # HANGUL SYLLABLE SSANGTIKEUT-YAE-NIEUN +0xB589 # HANGUL SYLLABLE SSANGTIKEUT-YAE-NIEUNCIEUC +0xB58A # HANGUL SYLLABLE SSANGTIKEUT-YAE-NIEUNHIEUH +0xB58B # HANGUL SYLLABLE SSANGTIKEUT-YAE-TIKEUT +0xB58C # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEUL +0xB58D # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULKIYEOK +0xB58E # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULMIEUM +0xB58F # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULPIEUP +0xB590 # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULSIOS +0xB591 # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULTHIEUTH +0xB592 # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULPHIEUPH +0xB593 # HANGUL SYLLABLE SSANGTIKEUT-YAE-RIEULHIEUH +0xB594 # HANGUL SYLLABLE SSANGTIKEUT-YAE-MIEUM +0xB595 # HANGUL SYLLABLE SSANGTIKEUT-YAE-PIEUP +0xB596 # HANGUL SYLLABLE SSANGTIKEUT-YAE-PIEUPSIOS +0xB597 # HANGUL SYLLABLE SSANGTIKEUT-YAE-SIOS +0xB598 # HANGUL SYLLABLE SSANGTIKEUT-YAE-SSANGSIOS +0xB599 # HANGUL SYLLABLE SSANGTIKEUT-YAE-IEUNG +0xB59A # HANGUL SYLLABLE SSANGTIKEUT-YAE-CIEUC +0xB59B # HANGUL SYLLABLE SSANGTIKEUT-YAE-CHIEUCH +0xB59C # HANGUL SYLLABLE SSANGTIKEUT-YAE-KHIEUKH +0xB59D # HANGUL SYLLABLE SSANGTIKEUT-YAE-THIEUTH +0xB59E # HANGUL SYLLABLE SSANGTIKEUT-YAE-PHIEUPH +0xB59F # HANGUL SYLLABLE SSANGTIKEUT-YAE-HIEUH +0xB5A0 # HANGUL SYLLABLE SSANGTIKEUT-EO +0xB5A1 # HANGUL SYLLABLE SSANGTIKEUT-EO-KIYEOK +0xB5A2 # HANGUL SYLLABLE SSANGTIKEUT-EO-SSANGKIYEOK +0xB5A3 # HANGUL SYLLABLE SSANGTIKEUT-EO-KIYEOKSIOS +0xB5A4 # HANGUL SYLLABLE SSANGTIKEUT-EO-NIEUN +0xB5A5 # HANGUL SYLLABLE SSANGTIKEUT-EO-NIEUNCIEUC +0xB5A6 # HANGUL SYLLABLE SSANGTIKEUT-EO-NIEUNHIEUH +0xB5A7 # HANGUL SYLLABLE SSANGTIKEUT-EO-TIKEUT +0xB5A8 # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEUL +0xB5A9 # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULKIYEOK +0xB5AA # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULMIEUM +0xB5AB # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULPIEUP +0xB5AC # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULSIOS +0xB5AD # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULTHIEUTH +0xB5AE # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULPHIEUPH +0xB5AF # HANGUL SYLLABLE SSANGTIKEUT-EO-RIEULHIEUH +0xB5B0 # HANGUL SYLLABLE SSANGTIKEUT-EO-MIEUM +0xB5B1 # HANGUL SYLLABLE SSANGTIKEUT-EO-PIEUP +0xB5B2 # HANGUL SYLLABLE SSANGTIKEUT-EO-PIEUPSIOS +0xB5B3 # HANGUL SYLLABLE SSANGTIKEUT-EO-SIOS +0xB5B4 # HANGUL SYLLABLE SSANGTIKEUT-EO-SSANGSIOS +0xB5B5 # HANGUL SYLLABLE SSANGTIKEUT-EO-IEUNG +0xB5B6 # HANGUL SYLLABLE SSANGTIKEUT-EO-CIEUC +0xB5B7 # HANGUL SYLLABLE SSANGTIKEUT-EO-CHIEUCH +0xB5B8 # HANGUL SYLLABLE SSANGTIKEUT-EO-KHIEUKH +0xB5B9 # HANGUL SYLLABLE SSANGTIKEUT-EO-THIEUTH +0xB5BA # HANGUL SYLLABLE SSANGTIKEUT-EO-PHIEUPH +0xB5BB # HANGUL SYLLABLE SSANGTIKEUT-EO-HIEUH +0xB5BC # HANGUL SYLLABLE SSANGTIKEUT-E +0xB5BD # HANGUL SYLLABLE SSANGTIKEUT-E-KIYEOK +0xB5BE # HANGUL SYLLABLE SSANGTIKEUT-E-SSANGKIYEOK +0xB5BF # HANGUL SYLLABLE SSANGTIKEUT-E-KIYEOKSIOS +0xB5C0 # HANGUL SYLLABLE SSANGTIKEUT-E-NIEUN +0xB5C1 # HANGUL SYLLABLE SSANGTIKEUT-E-NIEUNCIEUC +0xB5C2 # HANGUL SYLLABLE SSANGTIKEUT-E-NIEUNHIEUH +0xB5C3 # HANGUL SYLLABLE SSANGTIKEUT-E-TIKEUT +0xB5C4 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEUL +0xB5C5 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULKIYEOK +0xB5C6 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULMIEUM +0xB5C7 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULPIEUP +0xB5C8 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULSIOS +0xB5C9 # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULTHIEUTH +0xB5CA # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULPHIEUPH +0xB5CB # HANGUL SYLLABLE SSANGTIKEUT-E-RIEULHIEUH +0xB5CC # HANGUL SYLLABLE SSANGTIKEUT-E-MIEUM +0xB5CD # HANGUL SYLLABLE SSANGTIKEUT-E-PIEUP +0xB5CE # HANGUL SYLLABLE SSANGTIKEUT-E-PIEUPSIOS +0xB5CF # HANGUL SYLLABLE SSANGTIKEUT-E-SIOS +0xB5D0 # HANGUL SYLLABLE SSANGTIKEUT-E-SSANGSIOS +0xB5D1 # HANGUL SYLLABLE SSANGTIKEUT-E-IEUNG +0xB5D2 # HANGUL SYLLABLE SSANGTIKEUT-E-CIEUC +0xB5D3 # HANGUL SYLLABLE SSANGTIKEUT-E-CHIEUCH +0xB5D4 # HANGUL SYLLABLE SSANGTIKEUT-E-KHIEUKH +0xB5D5 # HANGUL SYLLABLE SSANGTIKEUT-E-THIEUTH +0xB5D6 # HANGUL SYLLABLE SSANGTIKEUT-E-PHIEUPH +0xB5D7 # HANGUL SYLLABLE SSANGTIKEUT-E-HIEUH +0xB5D8 # HANGUL SYLLABLE SSANGTIKEUT-YEO +0xB5D9 # HANGUL SYLLABLE SSANGTIKEUT-YEO-KIYEOK +0xB5DA # HANGUL SYLLABLE SSANGTIKEUT-YEO-SSANGKIYEOK +0xB5DB # HANGUL SYLLABLE SSANGTIKEUT-YEO-KIYEOKSIOS +0xB5DC # HANGUL SYLLABLE SSANGTIKEUT-YEO-NIEUN +0xB5DD # HANGUL SYLLABLE SSANGTIKEUT-YEO-NIEUNCIEUC +0xB5DE # HANGUL SYLLABLE SSANGTIKEUT-YEO-NIEUNHIEUH +0xB5DF # HANGUL SYLLABLE SSANGTIKEUT-YEO-TIKEUT +0xB5E0 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEUL +0xB5E1 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULKIYEOK +0xB5E2 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULMIEUM +0xB5E3 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULPIEUP +0xB5E4 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULSIOS +0xB5E5 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULTHIEUTH +0xB5E6 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULPHIEUPH +0xB5E7 # HANGUL SYLLABLE SSANGTIKEUT-YEO-RIEULHIEUH +0xB5E8 # HANGUL SYLLABLE SSANGTIKEUT-YEO-MIEUM +0xB5E9 # HANGUL SYLLABLE SSANGTIKEUT-YEO-PIEUP +0xB5EA # HANGUL SYLLABLE SSANGTIKEUT-YEO-PIEUPSIOS +0xB5EB # HANGUL SYLLABLE SSANGTIKEUT-YEO-SIOS +0xB5EC # HANGUL SYLLABLE SSANGTIKEUT-YEO-SSANGSIOS +0xB5ED # HANGUL SYLLABLE SSANGTIKEUT-YEO-IEUNG +0xB5EE # HANGUL SYLLABLE SSANGTIKEUT-YEO-CIEUC +0xB5EF # HANGUL SYLLABLE SSANGTIKEUT-YEO-CHIEUCH +0xB5F0 # HANGUL SYLLABLE SSANGTIKEUT-YEO-KHIEUKH +0xB5F1 # HANGUL SYLLABLE SSANGTIKEUT-YEO-THIEUTH +0xB5F2 # HANGUL SYLLABLE SSANGTIKEUT-YEO-PHIEUPH +0xB5F3 # HANGUL SYLLABLE SSANGTIKEUT-YEO-HIEUH +0xB5F4 # HANGUL SYLLABLE SSANGTIKEUT-YE +0xB5F5 # HANGUL SYLLABLE SSANGTIKEUT-YE-KIYEOK +0xB5F6 # HANGUL SYLLABLE SSANGTIKEUT-YE-SSANGKIYEOK +0xB5F7 # HANGUL SYLLABLE SSANGTIKEUT-YE-KIYEOKSIOS +0xB5F8 # HANGUL SYLLABLE SSANGTIKEUT-YE-NIEUN +0xB5F9 # HANGUL SYLLABLE SSANGTIKEUT-YE-NIEUNCIEUC +0xB5FA # HANGUL SYLLABLE SSANGTIKEUT-YE-NIEUNHIEUH +0xB5FB # HANGUL SYLLABLE SSANGTIKEUT-YE-TIKEUT +0xB5FC # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEUL +0xB5FD # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULKIYEOK +0xB5FE # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULMIEUM +0xB5FF # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULPIEUP +0xB600 # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULSIOS +0xB601 # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULTHIEUTH +0xB602 # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULPHIEUPH +0xB603 # HANGUL SYLLABLE SSANGTIKEUT-YE-RIEULHIEUH +0xB604 # HANGUL SYLLABLE SSANGTIKEUT-YE-MIEUM +0xB605 # HANGUL SYLLABLE SSANGTIKEUT-YE-PIEUP +0xB606 # HANGUL SYLLABLE SSANGTIKEUT-YE-PIEUPSIOS +0xB607 # HANGUL SYLLABLE SSANGTIKEUT-YE-SIOS +0xB608 # HANGUL SYLLABLE SSANGTIKEUT-YE-SSANGSIOS +0xB609 # HANGUL SYLLABLE SSANGTIKEUT-YE-IEUNG +0xB60A # HANGUL SYLLABLE SSANGTIKEUT-YE-CIEUC +0xB60B # HANGUL SYLLABLE SSANGTIKEUT-YE-CHIEUCH +0xB60C # HANGUL SYLLABLE SSANGTIKEUT-YE-KHIEUKH +0xB60D # HANGUL SYLLABLE SSANGTIKEUT-YE-THIEUTH +0xB60E # HANGUL SYLLABLE SSANGTIKEUT-YE-PHIEUPH +0xB60F # HANGUL SYLLABLE SSANGTIKEUT-YE-HIEUH +0xB610 # HANGUL SYLLABLE SSANGTIKEUT-O +0xB611 # HANGUL SYLLABLE SSANGTIKEUT-O-KIYEOK +0xB612 # HANGUL SYLLABLE SSANGTIKEUT-O-SSANGKIYEOK +0xB613 # HANGUL SYLLABLE SSANGTIKEUT-O-KIYEOKSIOS +0xB614 # HANGUL SYLLABLE SSANGTIKEUT-O-NIEUN +0xB615 # HANGUL SYLLABLE SSANGTIKEUT-O-NIEUNCIEUC +0xB616 # HANGUL SYLLABLE SSANGTIKEUT-O-NIEUNHIEUH +0xB617 # HANGUL SYLLABLE SSANGTIKEUT-O-TIKEUT +0xB618 # HANGUL SYLLABLE SSANGTIKEUT-O-RIEUL +0xB619 # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULKIYEOK +0xB61A # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULMIEUM +0xB61B # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULPIEUP +0xB61C # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULSIOS +0xB61D # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULTHIEUTH +0xB61E # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULPHIEUPH +0xB61F # HANGUL SYLLABLE SSANGTIKEUT-O-RIEULHIEUH +0xB620 # HANGUL SYLLABLE SSANGTIKEUT-O-MIEUM +0xB621 # HANGUL SYLLABLE SSANGTIKEUT-O-PIEUP +0xB622 # HANGUL SYLLABLE SSANGTIKEUT-O-PIEUPSIOS +0xB623 # HANGUL SYLLABLE SSANGTIKEUT-O-SIOS +0xB624 # HANGUL SYLLABLE SSANGTIKEUT-O-SSANGSIOS +0xB625 # HANGUL SYLLABLE SSANGTIKEUT-O-IEUNG +0xB626 # HANGUL SYLLABLE SSANGTIKEUT-O-CIEUC +0xB627 # HANGUL SYLLABLE SSANGTIKEUT-O-CHIEUCH +0xB628 # HANGUL SYLLABLE SSANGTIKEUT-O-KHIEUKH +0xB629 # HANGUL SYLLABLE SSANGTIKEUT-O-THIEUTH +0xB62A # HANGUL SYLLABLE SSANGTIKEUT-O-PHIEUPH +0xB62B # HANGUL SYLLABLE SSANGTIKEUT-O-HIEUH +0xB62C # HANGUL SYLLABLE SSANGTIKEUT-WA +0xB62D # HANGUL SYLLABLE SSANGTIKEUT-WA-KIYEOK +0xB62E # HANGUL SYLLABLE SSANGTIKEUT-WA-SSANGKIYEOK +0xB62F # HANGUL SYLLABLE SSANGTIKEUT-WA-KIYEOKSIOS +0xB630 # HANGUL SYLLABLE SSANGTIKEUT-WA-NIEUN +0xB631 # HANGUL SYLLABLE SSANGTIKEUT-WA-NIEUNCIEUC +0xB632 # HANGUL SYLLABLE SSANGTIKEUT-WA-NIEUNHIEUH +0xB633 # HANGUL SYLLABLE SSANGTIKEUT-WA-TIKEUT +0xB634 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEUL +0xB635 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULKIYEOK +0xB636 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULMIEUM +0xB637 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULPIEUP +0xB638 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULSIOS +0xB639 # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULTHIEUTH +0xB63A # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULPHIEUPH +0xB63B # HANGUL SYLLABLE SSANGTIKEUT-WA-RIEULHIEUH +0xB63C # HANGUL SYLLABLE SSANGTIKEUT-WA-MIEUM +0xB63D # HANGUL SYLLABLE SSANGTIKEUT-WA-PIEUP +0xB63E # HANGUL SYLLABLE SSANGTIKEUT-WA-PIEUPSIOS +0xB63F # HANGUL SYLLABLE SSANGTIKEUT-WA-SIOS +0xB640 # HANGUL SYLLABLE SSANGTIKEUT-WA-SSANGSIOS +0xB641 # HANGUL SYLLABLE SSANGTIKEUT-WA-IEUNG +0xB642 # HANGUL SYLLABLE SSANGTIKEUT-WA-CIEUC +0xB643 # HANGUL SYLLABLE SSANGTIKEUT-WA-CHIEUCH +0xB644 # HANGUL SYLLABLE SSANGTIKEUT-WA-KHIEUKH +0xB645 # HANGUL SYLLABLE SSANGTIKEUT-WA-THIEUTH +0xB646 # HANGUL SYLLABLE SSANGTIKEUT-WA-PHIEUPH +0xB647 # HANGUL SYLLABLE SSANGTIKEUT-WA-HIEUH +0xB648 # HANGUL SYLLABLE SSANGTIKEUT-WAE +0xB649 # HANGUL SYLLABLE SSANGTIKEUT-WAE-KIYEOK +0xB64A # HANGUL SYLLABLE SSANGTIKEUT-WAE-SSANGKIYEOK +0xB64B # HANGUL SYLLABLE SSANGTIKEUT-WAE-KIYEOKSIOS +0xB64C # HANGUL SYLLABLE SSANGTIKEUT-WAE-NIEUN +0xB64D # HANGUL SYLLABLE SSANGTIKEUT-WAE-NIEUNCIEUC +0xB64E # HANGUL SYLLABLE SSANGTIKEUT-WAE-NIEUNHIEUH +0xB64F # HANGUL SYLLABLE SSANGTIKEUT-WAE-TIKEUT +0xB650 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEUL +0xB651 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULKIYEOK +0xB652 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULMIEUM +0xB653 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULPIEUP +0xB654 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULSIOS +0xB655 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULTHIEUTH +0xB656 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULPHIEUPH +0xB657 # HANGUL SYLLABLE SSANGTIKEUT-WAE-RIEULHIEUH +0xB658 # HANGUL SYLLABLE SSANGTIKEUT-WAE-MIEUM +0xB659 # HANGUL SYLLABLE SSANGTIKEUT-WAE-PIEUP +0xB65A # HANGUL SYLLABLE SSANGTIKEUT-WAE-PIEUPSIOS +0xB65B # HANGUL SYLLABLE SSANGTIKEUT-WAE-SIOS +0xB65C # HANGUL SYLLABLE SSANGTIKEUT-WAE-SSANGSIOS +0xB65D # HANGUL SYLLABLE SSANGTIKEUT-WAE-IEUNG +0xB65E # HANGUL SYLLABLE SSANGTIKEUT-WAE-CIEUC +0xB65F # HANGUL SYLLABLE SSANGTIKEUT-WAE-CHIEUCH +0xB660 # HANGUL SYLLABLE SSANGTIKEUT-WAE-KHIEUKH +0xB661 # HANGUL SYLLABLE SSANGTIKEUT-WAE-THIEUTH +0xB662 # HANGUL SYLLABLE SSANGTIKEUT-WAE-PHIEUPH +0xB663 # HANGUL SYLLABLE SSANGTIKEUT-WAE-HIEUH +0xB664 # HANGUL SYLLABLE SSANGTIKEUT-OE +0xB665 # HANGUL SYLLABLE SSANGTIKEUT-OE-KIYEOK +0xB666 # HANGUL SYLLABLE SSANGTIKEUT-OE-SSANGKIYEOK +0xB667 # HANGUL SYLLABLE SSANGTIKEUT-OE-KIYEOKSIOS +0xB668 # HANGUL SYLLABLE SSANGTIKEUT-OE-NIEUN +0xB669 # HANGUL SYLLABLE SSANGTIKEUT-OE-NIEUNCIEUC +0xB66A # HANGUL SYLLABLE SSANGTIKEUT-OE-NIEUNHIEUH +0xB66B # HANGUL SYLLABLE SSANGTIKEUT-OE-TIKEUT +0xB66C # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEUL +0xB66D # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULKIYEOK +0xB66E # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULMIEUM +0xB66F # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULPIEUP +0xB670 # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULSIOS +0xB671 # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULTHIEUTH +0xB672 # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULPHIEUPH +0xB673 # HANGUL SYLLABLE SSANGTIKEUT-OE-RIEULHIEUH +0xB674 # HANGUL SYLLABLE SSANGTIKEUT-OE-MIEUM +0xB675 # HANGUL SYLLABLE SSANGTIKEUT-OE-PIEUP +0xB676 # HANGUL SYLLABLE SSANGTIKEUT-OE-PIEUPSIOS +0xB677 # HANGUL SYLLABLE SSANGTIKEUT-OE-SIOS +0xB678 # HANGUL SYLLABLE SSANGTIKEUT-OE-SSANGSIOS +0xB679 # HANGUL SYLLABLE SSANGTIKEUT-OE-IEUNG +0xB67A # HANGUL SYLLABLE SSANGTIKEUT-OE-CIEUC +0xB67B # HANGUL SYLLABLE SSANGTIKEUT-OE-CHIEUCH +0xB67C # HANGUL SYLLABLE SSANGTIKEUT-OE-KHIEUKH +0xB67D # HANGUL SYLLABLE SSANGTIKEUT-OE-THIEUTH +0xB67E # HANGUL SYLLABLE SSANGTIKEUT-OE-PHIEUPH +0xB67F # HANGUL SYLLABLE SSANGTIKEUT-OE-HIEUH +0xB680 # HANGUL SYLLABLE SSANGTIKEUT-YO +0xB681 # HANGUL SYLLABLE SSANGTIKEUT-YO-KIYEOK +0xB682 # HANGUL SYLLABLE SSANGTIKEUT-YO-SSANGKIYEOK +0xB683 # HANGUL SYLLABLE SSANGTIKEUT-YO-KIYEOKSIOS +0xB684 # HANGUL SYLLABLE SSANGTIKEUT-YO-NIEUN +0xB685 # HANGUL SYLLABLE SSANGTIKEUT-YO-NIEUNCIEUC +0xB686 # HANGUL SYLLABLE SSANGTIKEUT-YO-NIEUNHIEUH +0xB687 # HANGUL SYLLABLE SSANGTIKEUT-YO-TIKEUT +0xB688 # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEUL +0xB689 # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULKIYEOK +0xB68A # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULMIEUM +0xB68B # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULPIEUP +0xB68C # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULSIOS +0xB68D # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULTHIEUTH +0xB68E # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULPHIEUPH +0xB68F # HANGUL SYLLABLE SSANGTIKEUT-YO-RIEULHIEUH +0xB690 # HANGUL SYLLABLE SSANGTIKEUT-YO-MIEUM +0xB691 # HANGUL SYLLABLE SSANGTIKEUT-YO-PIEUP +0xB692 # HANGUL SYLLABLE SSANGTIKEUT-YO-PIEUPSIOS +0xB693 # HANGUL SYLLABLE SSANGTIKEUT-YO-SIOS +0xB694 # HANGUL SYLLABLE SSANGTIKEUT-YO-SSANGSIOS +0xB695 # HANGUL SYLLABLE SSANGTIKEUT-YO-IEUNG +0xB696 # HANGUL SYLLABLE SSANGTIKEUT-YO-CIEUC +0xB697 # HANGUL SYLLABLE SSANGTIKEUT-YO-CHIEUCH +0xB698 # HANGUL SYLLABLE SSANGTIKEUT-YO-KHIEUKH +0xB699 # HANGUL SYLLABLE SSANGTIKEUT-YO-THIEUTH +0xB69A # HANGUL SYLLABLE SSANGTIKEUT-YO-PHIEUPH +0xB69B # HANGUL SYLLABLE SSANGTIKEUT-YO-HIEUH +0xB69C # HANGUL SYLLABLE SSANGTIKEUT-U +0xB69D # HANGUL SYLLABLE SSANGTIKEUT-U-KIYEOK +0xB69E # HANGUL SYLLABLE SSANGTIKEUT-U-SSANGKIYEOK +0xB69F # HANGUL SYLLABLE SSANGTIKEUT-U-KIYEOKSIOS +0xB6A0 # HANGUL SYLLABLE SSANGTIKEUT-U-NIEUN +0xB6A1 # HANGUL SYLLABLE SSANGTIKEUT-U-NIEUNCIEUC +0xB6A2 # HANGUL SYLLABLE SSANGTIKEUT-U-NIEUNHIEUH +0xB6A3 # HANGUL SYLLABLE SSANGTIKEUT-U-TIKEUT +0xB6A4 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEUL +0xB6A5 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULKIYEOK +0xB6A6 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULMIEUM +0xB6A7 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULPIEUP +0xB6A8 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULSIOS +0xB6A9 # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULTHIEUTH +0xB6AA # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULPHIEUPH +0xB6AB # HANGUL SYLLABLE SSANGTIKEUT-U-RIEULHIEUH +0xB6AC # HANGUL SYLLABLE SSANGTIKEUT-U-MIEUM +0xB6AD # HANGUL SYLLABLE SSANGTIKEUT-U-PIEUP +0xB6AE # HANGUL SYLLABLE SSANGTIKEUT-U-PIEUPSIOS +0xB6AF # HANGUL SYLLABLE SSANGTIKEUT-U-SIOS +0xB6B0 # HANGUL SYLLABLE SSANGTIKEUT-U-SSANGSIOS +0xB6B1 # HANGUL SYLLABLE SSANGTIKEUT-U-IEUNG +0xB6B2 # HANGUL SYLLABLE SSANGTIKEUT-U-CIEUC +0xB6B3 # HANGUL SYLLABLE SSANGTIKEUT-U-CHIEUCH +0xB6B4 # HANGUL SYLLABLE SSANGTIKEUT-U-KHIEUKH +0xB6B5 # HANGUL SYLLABLE SSANGTIKEUT-U-THIEUTH +0xB6B6 # HANGUL SYLLABLE SSANGTIKEUT-U-PHIEUPH +0xB6B7 # HANGUL SYLLABLE SSANGTIKEUT-U-HIEUH +0xB6B8 # HANGUL SYLLABLE SSANGTIKEUT-WEO +0xB6B9 # HANGUL SYLLABLE SSANGTIKEUT-WEO-KIYEOK +0xB6BA # HANGUL SYLLABLE SSANGTIKEUT-WEO-SSANGKIYEOK +0xB6BB # HANGUL SYLLABLE SSANGTIKEUT-WEO-KIYEOKSIOS +0xB6BC # HANGUL SYLLABLE SSANGTIKEUT-WEO-NIEUN +0xB6BD # HANGUL SYLLABLE SSANGTIKEUT-WEO-NIEUNCIEUC +0xB6BE # HANGUL SYLLABLE SSANGTIKEUT-WEO-NIEUNHIEUH +0xB6BF # HANGUL SYLLABLE SSANGTIKEUT-WEO-TIKEUT +0xB6C0 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEUL +0xB6C1 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULKIYEOK +0xB6C2 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULMIEUM +0xB6C3 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULPIEUP +0xB6C4 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULSIOS +0xB6C5 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULTHIEUTH +0xB6C6 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULPHIEUPH +0xB6C7 # HANGUL SYLLABLE SSANGTIKEUT-WEO-RIEULHIEUH +0xB6C8 # HANGUL SYLLABLE SSANGTIKEUT-WEO-MIEUM +0xB6C9 # HANGUL SYLLABLE SSANGTIKEUT-WEO-PIEUP +0xB6CA # HANGUL SYLLABLE SSANGTIKEUT-WEO-PIEUPSIOS +0xB6CB # HANGUL SYLLABLE SSANGTIKEUT-WEO-SIOS +0xB6CC # HANGUL SYLLABLE SSANGTIKEUT-WEO-SSANGSIOS +0xB6CD # HANGUL SYLLABLE SSANGTIKEUT-WEO-IEUNG +0xB6CE # HANGUL SYLLABLE SSANGTIKEUT-WEO-CIEUC +0xB6CF # HANGUL SYLLABLE SSANGTIKEUT-WEO-CHIEUCH +0xB6D0 # HANGUL SYLLABLE SSANGTIKEUT-WEO-KHIEUKH +0xB6D1 # HANGUL SYLLABLE SSANGTIKEUT-WEO-THIEUTH +0xB6D2 # HANGUL SYLLABLE SSANGTIKEUT-WEO-PHIEUPH +0xB6D3 # HANGUL SYLLABLE SSANGTIKEUT-WEO-HIEUH +0xB6D4 # HANGUL SYLLABLE SSANGTIKEUT-WE +0xB6D5 # HANGUL SYLLABLE SSANGTIKEUT-WE-KIYEOK +0xB6D6 # HANGUL SYLLABLE SSANGTIKEUT-WE-SSANGKIYEOK +0xB6D7 # HANGUL SYLLABLE SSANGTIKEUT-WE-KIYEOKSIOS +0xB6D8 # HANGUL SYLLABLE SSANGTIKEUT-WE-NIEUN +0xB6D9 # HANGUL SYLLABLE SSANGTIKEUT-WE-NIEUNCIEUC +0xB6DA # HANGUL SYLLABLE SSANGTIKEUT-WE-NIEUNHIEUH +0xB6DB # HANGUL SYLLABLE SSANGTIKEUT-WE-TIKEUT +0xB6DC # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEUL +0xB6DD # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULKIYEOK +0xB6DE # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULMIEUM +0xB6DF # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULPIEUP +0xB6E0 # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULSIOS +0xB6E1 # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULTHIEUTH +0xB6E2 # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULPHIEUPH +0xB6E3 # HANGUL SYLLABLE SSANGTIKEUT-WE-RIEULHIEUH +0xB6E4 # HANGUL SYLLABLE SSANGTIKEUT-WE-MIEUM +0xB6E5 # HANGUL SYLLABLE SSANGTIKEUT-WE-PIEUP +0xB6E6 # HANGUL SYLLABLE SSANGTIKEUT-WE-PIEUPSIOS +0xB6E7 # HANGUL SYLLABLE SSANGTIKEUT-WE-SIOS +0xB6E8 # HANGUL SYLLABLE SSANGTIKEUT-WE-SSANGSIOS +0xB6E9 # HANGUL SYLLABLE SSANGTIKEUT-WE-IEUNG +0xB6EA # HANGUL SYLLABLE SSANGTIKEUT-WE-CIEUC +0xB6EB # HANGUL SYLLABLE SSANGTIKEUT-WE-CHIEUCH +0xB6EC # HANGUL SYLLABLE SSANGTIKEUT-WE-KHIEUKH +0xB6ED # HANGUL SYLLABLE SSANGTIKEUT-WE-THIEUTH +0xB6EE # HANGUL SYLLABLE SSANGTIKEUT-WE-PHIEUPH +0xB6EF # HANGUL SYLLABLE SSANGTIKEUT-WE-HIEUH +0xB6F0 # HANGUL SYLLABLE SSANGTIKEUT-WI +0xB6F1 # HANGUL SYLLABLE SSANGTIKEUT-WI-KIYEOK +0xB6F2 # HANGUL SYLLABLE SSANGTIKEUT-WI-SSANGKIYEOK +0xB6F3 # HANGUL SYLLABLE SSANGTIKEUT-WI-KIYEOKSIOS +0xB6F4 # HANGUL SYLLABLE SSANGTIKEUT-WI-NIEUN +0xB6F5 # HANGUL SYLLABLE SSANGTIKEUT-WI-NIEUNCIEUC +0xB6F6 # HANGUL SYLLABLE SSANGTIKEUT-WI-NIEUNHIEUH +0xB6F7 # HANGUL SYLLABLE SSANGTIKEUT-WI-TIKEUT +0xB6F8 # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEUL +0xB6F9 # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULKIYEOK +0xB6FA # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULMIEUM +0xB6FB # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULPIEUP +0xB6FC # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULSIOS +0xB6FD # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULTHIEUTH +0xB6FE # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULPHIEUPH +0xB6FF # HANGUL SYLLABLE SSANGTIKEUT-WI-RIEULHIEUH +0xB700 # HANGUL SYLLABLE SSANGTIKEUT-WI-MIEUM +0xB701 # HANGUL SYLLABLE SSANGTIKEUT-WI-PIEUP +0xB702 # HANGUL SYLLABLE SSANGTIKEUT-WI-PIEUPSIOS +0xB703 # HANGUL SYLLABLE SSANGTIKEUT-WI-SIOS +0xB704 # HANGUL SYLLABLE SSANGTIKEUT-WI-SSANGSIOS +0xB705 # HANGUL SYLLABLE SSANGTIKEUT-WI-IEUNG +0xB706 # HANGUL SYLLABLE SSANGTIKEUT-WI-CIEUC +0xB707 # HANGUL SYLLABLE SSANGTIKEUT-WI-CHIEUCH +0xB708 # HANGUL SYLLABLE SSANGTIKEUT-WI-KHIEUKH +0xB709 # HANGUL SYLLABLE SSANGTIKEUT-WI-THIEUTH +0xB70A # HANGUL SYLLABLE SSANGTIKEUT-WI-PHIEUPH +0xB70B # HANGUL SYLLABLE SSANGTIKEUT-WI-HIEUH +0xB70C # HANGUL SYLLABLE SSANGTIKEUT-YU +0xB70D # HANGUL SYLLABLE SSANGTIKEUT-YU-KIYEOK +0xB70E # HANGUL SYLLABLE SSANGTIKEUT-YU-SSANGKIYEOK +0xB70F # HANGUL SYLLABLE SSANGTIKEUT-YU-KIYEOKSIOS +0xB710 # HANGUL SYLLABLE SSANGTIKEUT-YU-NIEUN +0xB711 # HANGUL SYLLABLE SSANGTIKEUT-YU-NIEUNCIEUC +0xB712 # HANGUL SYLLABLE SSANGTIKEUT-YU-NIEUNHIEUH +0xB713 # HANGUL SYLLABLE SSANGTIKEUT-YU-TIKEUT +0xB714 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEUL +0xB715 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULKIYEOK +0xB716 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULMIEUM +0xB717 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULPIEUP +0xB718 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULSIOS +0xB719 # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULTHIEUTH +0xB71A # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULPHIEUPH +0xB71B # HANGUL SYLLABLE SSANGTIKEUT-YU-RIEULHIEUH +0xB71C # HANGUL SYLLABLE SSANGTIKEUT-YU-MIEUM +0xB71D # HANGUL SYLLABLE SSANGTIKEUT-YU-PIEUP +0xB71E # HANGUL SYLLABLE SSANGTIKEUT-YU-PIEUPSIOS +0xB71F # HANGUL SYLLABLE SSANGTIKEUT-YU-SIOS +0xB720 # HANGUL SYLLABLE SSANGTIKEUT-YU-SSANGSIOS +0xB721 # HANGUL SYLLABLE SSANGTIKEUT-YU-IEUNG +0xB722 # HANGUL SYLLABLE SSANGTIKEUT-YU-CIEUC +0xB723 # HANGUL SYLLABLE SSANGTIKEUT-YU-CHIEUCH +0xB724 # HANGUL SYLLABLE SSANGTIKEUT-YU-KHIEUKH +0xB725 # HANGUL SYLLABLE SSANGTIKEUT-YU-THIEUTH +0xB726 # HANGUL SYLLABLE SSANGTIKEUT-YU-PHIEUPH +0xB727 # HANGUL SYLLABLE SSANGTIKEUT-YU-HIEUH +0xB728 # HANGUL SYLLABLE SSANGTIKEUT-EU +0xB729 # HANGUL SYLLABLE SSANGTIKEUT-EU-KIYEOK +0xB72A # HANGUL SYLLABLE SSANGTIKEUT-EU-SSANGKIYEOK +0xB72B # HANGUL SYLLABLE SSANGTIKEUT-EU-KIYEOKSIOS +0xB72C # HANGUL SYLLABLE SSANGTIKEUT-EU-NIEUN +0xB72D # HANGUL SYLLABLE SSANGTIKEUT-EU-NIEUNCIEUC +0xB72E # HANGUL SYLLABLE SSANGTIKEUT-EU-NIEUNHIEUH +0xB72F # HANGUL SYLLABLE SSANGTIKEUT-EU-TIKEUT +0xB730 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEUL +0xB731 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULKIYEOK +0xB732 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULMIEUM +0xB733 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULPIEUP +0xB734 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULSIOS +0xB735 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULTHIEUTH +0xB736 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULPHIEUPH +0xB737 # HANGUL SYLLABLE SSANGTIKEUT-EU-RIEULHIEUH +0xB738 # HANGUL SYLLABLE SSANGTIKEUT-EU-MIEUM +0xB739 # HANGUL SYLLABLE SSANGTIKEUT-EU-PIEUP +0xB73A # HANGUL SYLLABLE SSANGTIKEUT-EU-PIEUPSIOS +0xB73B # HANGUL SYLLABLE SSANGTIKEUT-EU-SIOS +0xB73C # HANGUL SYLLABLE SSANGTIKEUT-EU-SSANGSIOS +0xB73D # HANGUL SYLLABLE SSANGTIKEUT-EU-IEUNG +0xB73E # HANGUL SYLLABLE SSANGTIKEUT-EU-CIEUC +0xB73F # HANGUL SYLLABLE SSANGTIKEUT-EU-CHIEUCH +0xB740 # HANGUL SYLLABLE SSANGTIKEUT-EU-KHIEUKH +0xB741 # HANGUL SYLLABLE SSANGTIKEUT-EU-THIEUTH +0xB742 # HANGUL SYLLABLE SSANGTIKEUT-EU-PHIEUPH +0xB743 # HANGUL SYLLABLE SSANGTIKEUT-EU-HIEUH +0xB744 # HANGUL SYLLABLE SSANGTIKEUT-YI +0xB745 # HANGUL SYLLABLE SSANGTIKEUT-YI-KIYEOK +0xB746 # HANGUL SYLLABLE SSANGTIKEUT-YI-SSANGKIYEOK +0xB747 # HANGUL SYLLABLE SSANGTIKEUT-YI-KIYEOKSIOS +0xB748 # HANGUL SYLLABLE SSANGTIKEUT-YI-NIEUN +0xB749 # HANGUL SYLLABLE SSANGTIKEUT-YI-NIEUNCIEUC +0xB74A # HANGUL SYLLABLE SSANGTIKEUT-YI-NIEUNHIEUH +0xB74B # HANGUL SYLLABLE SSANGTIKEUT-YI-TIKEUT +0xB74C # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEUL +0xB74D # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULKIYEOK +0xB74E # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULMIEUM +0xB74F # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULPIEUP +0xB750 # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULSIOS +0xB751 # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULTHIEUTH +0xB752 # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULPHIEUPH +0xB753 # HANGUL SYLLABLE SSANGTIKEUT-YI-RIEULHIEUH +0xB754 # HANGUL SYLLABLE SSANGTIKEUT-YI-MIEUM +0xB755 # HANGUL SYLLABLE SSANGTIKEUT-YI-PIEUP +0xB756 # HANGUL SYLLABLE SSANGTIKEUT-YI-PIEUPSIOS +0xB757 # HANGUL SYLLABLE SSANGTIKEUT-YI-SIOS +0xB758 # HANGUL SYLLABLE SSANGTIKEUT-YI-SSANGSIOS +0xB759 # HANGUL SYLLABLE SSANGTIKEUT-YI-IEUNG +0xB75A # HANGUL SYLLABLE SSANGTIKEUT-YI-CIEUC +0xB75B # HANGUL SYLLABLE SSANGTIKEUT-YI-CHIEUCH +0xB75C # HANGUL SYLLABLE SSANGTIKEUT-YI-KHIEUKH +0xB75D # HANGUL SYLLABLE SSANGTIKEUT-YI-THIEUTH +0xB75E # HANGUL SYLLABLE SSANGTIKEUT-YI-PHIEUPH +0xB75F # HANGUL SYLLABLE SSANGTIKEUT-YI-HIEUH +0xB760 # HANGUL SYLLABLE SSANGTIKEUT-I +0xB761 # HANGUL SYLLABLE SSANGTIKEUT-I-KIYEOK +0xB762 # HANGUL SYLLABLE SSANGTIKEUT-I-SSANGKIYEOK +0xB763 # HANGUL SYLLABLE SSANGTIKEUT-I-KIYEOKSIOS +0xB764 # HANGUL SYLLABLE SSANGTIKEUT-I-NIEUN +0xB765 # HANGUL SYLLABLE SSANGTIKEUT-I-NIEUNCIEUC +0xB766 # HANGUL SYLLABLE SSANGTIKEUT-I-NIEUNHIEUH +0xB767 # HANGUL SYLLABLE SSANGTIKEUT-I-TIKEUT +0xB768 # HANGUL SYLLABLE SSANGTIKEUT-I-RIEUL +0xB769 # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULKIYEOK +0xB76A # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULMIEUM +0xB76B # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULPIEUP +0xB76C # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULSIOS +0xB76D # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULTHIEUTH +0xB76E # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULPHIEUPH +0xB76F # HANGUL SYLLABLE SSANGTIKEUT-I-RIEULHIEUH +0xB770 # HANGUL SYLLABLE SSANGTIKEUT-I-MIEUM +0xB771 # HANGUL SYLLABLE SSANGTIKEUT-I-PIEUP +0xB772 # HANGUL SYLLABLE SSANGTIKEUT-I-PIEUPSIOS +0xB773 # HANGUL SYLLABLE SSANGTIKEUT-I-SIOS +0xB774 # HANGUL SYLLABLE SSANGTIKEUT-I-SSANGSIOS +0xB775 # HANGUL SYLLABLE SSANGTIKEUT-I-IEUNG +0xB776 # HANGUL SYLLABLE SSANGTIKEUT-I-CIEUC +0xB777 # HANGUL SYLLABLE SSANGTIKEUT-I-CHIEUCH +0xB778 # HANGUL SYLLABLE SSANGTIKEUT-I-KHIEUKH +0xB779 # HANGUL SYLLABLE SSANGTIKEUT-I-THIEUTH +0xB77A # HANGUL SYLLABLE SSANGTIKEUT-I-PHIEUPH +0xB77B # HANGUL SYLLABLE SSANGTIKEUT-I-HIEUH +0xB77C # HANGUL SYLLABLE RIEUL-A +0xB77D # HANGUL SYLLABLE RIEUL-A-KIYEOK +0xB77E # HANGUL SYLLABLE RIEUL-A-SSANGKIYEOK +0xB77F # HANGUL SYLLABLE RIEUL-A-KIYEOKSIOS +0xB780 # HANGUL SYLLABLE RIEUL-A-NIEUN +0xB781 # HANGUL SYLLABLE RIEUL-A-NIEUNCIEUC +0xB782 # HANGUL SYLLABLE RIEUL-A-NIEUNHIEUH +0xB783 # HANGUL SYLLABLE RIEUL-A-TIKEUT +0xB784 # HANGUL SYLLABLE RIEUL-A-RIEUL +0xB785 # HANGUL SYLLABLE RIEUL-A-RIEULKIYEOK +0xB786 # HANGUL SYLLABLE RIEUL-A-RIEULMIEUM +0xB787 # HANGUL SYLLABLE RIEUL-A-RIEULPIEUP +0xB788 # HANGUL SYLLABLE RIEUL-A-RIEULSIOS +0xB789 # HANGUL SYLLABLE RIEUL-A-RIEULTHIEUTH +0xB78A # HANGUL SYLLABLE RIEUL-A-RIEULPHIEUPH +0xB78B # HANGUL SYLLABLE RIEUL-A-RIEULHIEUH +0xB78C # HANGUL SYLLABLE RIEUL-A-MIEUM +0xB78D # HANGUL SYLLABLE RIEUL-A-PIEUP +0xB78E # HANGUL SYLLABLE RIEUL-A-PIEUPSIOS +0xB78F # HANGUL SYLLABLE RIEUL-A-SIOS +0xB790 # HANGUL SYLLABLE RIEUL-A-SSANGSIOS +0xB791 # HANGUL SYLLABLE RIEUL-A-IEUNG +0xB792 # HANGUL SYLLABLE RIEUL-A-CIEUC +0xB793 # HANGUL SYLLABLE RIEUL-A-CHIEUCH +0xB794 # HANGUL SYLLABLE RIEUL-A-KHIEUKH +0xB795 # HANGUL SYLLABLE RIEUL-A-THIEUTH +0xB796 # HANGUL SYLLABLE RIEUL-A-PHIEUPH +0xB797 # HANGUL SYLLABLE RIEUL-A-HIEUH +0xB798 # HANGUL SYLLABLE RIEUL-AE +0xB799 # HANGUL SYLLABLE RIEUL-AE-KIYEOK +0xB79A # HANGUL SYLLABLE RIEUL-AE-SSANGKIYEOK +0xB79B # HANGUL SYLLABLE RIEUL-AE-KIYEOKSIOS +0xB79C # HANGUL SYLLABLE RIEUL-AE-NIEUN +0xB79D # HANGUL SYLLABLE RIEUL-AE-NIEUNCIEUC +0xB79E # HANGUL SYLLABLE RIEUL-AE-NIEUNHIEUH +0xB79F # HANGUL SYLLABLE RIEUL-AE-TIKEUT +0xB7A0 # HANGUL SYLLABLE RIEUL-AE-RIEUL +0xB7A1 # HANGUL SYLLABLE RIEUL-AE-RIEULKIYEOK +0xB7A2 # HANGUL SYLLABLE RIEUL-AE-RIEULMIEUM +0xB7A3 # HANGUL SYLLABLE RIEUL-AE-RIEULPIEUP +0xB7A4 # HANGUL SYLLABLE RIEUL-AE-RIEULSIOS +0xB7A5 # HANGUL SYLLABLE RIEUL-AE-RIEULTHIEUTH +0xB7A6 # HANGUL SYLLABLE RIEUL-AE-RIEULPHIEUPH +0xB7A7 # HANGUL SYLLABLE RIEUL-AE-RIEULHIEUH +0xB7A8 # HANGUL SYLLABLE RIEUL-AE-MIEUM +0xB7A9 # HANGUL SYLLABLE RIEUL-AE-PIEUP +0xB7AA # HANGUL SYLLABLE RIEUL-AE-PIEUPSIOS +0xB7AB # HANGUL SYLLABLE RIEUL-AE-SIOS +0xB7AC # HANGUL SYLLABLE RIEUL-AE-SSANGSIOS +0xB7AD # HANGUL SYLLABLE RIEUL-AE-IEUNG +0xB7AE # HANGUL SYLLABLE RIEUL-AE-CIEUC +0xB7AF # HANGUL SYLLABLE RIEUL-AE-CHIEUCH +0xB7B0 # HANGUL SYLLABLE RIEUL-AE-KHIEUKH +0xB7B1 # HANGUL SYLLABLE RIEUL-AE-THIEUTH +0xB7B2 # HANGUL SYLLABLE RIEUL-AE-PHIEUPH +0xB7B3 # HANGUL SYLLABLE RIEUL-AE-HIEUH +0xB7B4 # HANGUL SYLLABLE RIEUL-YA +0xB7B5 # HANGUL SYLLABLE RIEUL-YA-KIYEOK +0xB7B6 # HANGUL SYLLABLE RIEUL-YA-SSANGKIYEOK +0xB7B7 # HANGUL SYLLABLE RIEUL-YA-KIYEOKSIOS +0xB7B8 # HANGUL SYLLABLE RIEUL-YA-NIEUN +0xB7B9 # HANGUL SYLLABLE RIEUL-YA-NIEUNCIEUC +0xB7BA # HANGUL SYLLABLE RIEUL-YA-NIEUNHIEUH +0xB7BB # HANGUL SYLLABLE RIEUL-YA-TIKEUT +0xB7BC # HANGUL SYLLABLE RIEUL-YA-RIEUL +0xB7BD # HANGUL SYLLABLE RIEUL-YA-RIEULKIYEOK +0xB7BE # HANGUL SYLLABLE RIEUL-YA-RIEULMIEUM +0xB7BF # HANGUL SYLLABLE RIEUL-YA-RIEULPIEUP +0xB7C0 # HANGUL SYLLABLE RIEUL-YA-RIEULSIOS +0xB7C1 # HANGUL SYLLABLE RIEUL-YA-RIEULTHIEUTH +0xB7C2 # HANGUL SYLLABLE RIEUL-YA-RIEULPHIEUPH +0xB7C3 # HANGUL SYLLABLE RIEUL-YA-RIEULHIEUH +0xB7C4 # HANGUL SYLLABLE RIEUL-YA-MIEUM +0xB7C5 # HANGUL SYLLABLE RIEUL-YA-PIEUP +0xB7C6 # HANGUL SYLLABLE RIEUL-YA-PIEUPSIOS +0xB7C7 # HANGUL SYLLABLE RIEUL-YA-SIOS +0xB7C8 # HANGUL SYLLABLE RIEUL-YA-SSANGSIOS +0xB7C9 # HANGUL SYLLABLE RIEUL-YA-IEUNG +0xB7CA # HANGUL SYLLABLE RIEUL-YA-CIEUC +0xB7CB # HANGUL SYLLABLE RIEUL-YA-CHIEUCH +0xB7CC # HANGUL SYLLABLE RIEUL-YA-KHIEUKH +0xB7CD # HANGUL SYLLABLE RIEUL-YA-THIEUTH +0xB7CE # HANGUL SYLLABLE RIEUL-YA-PHIEUPH +0xB7CF # HANGUL SYLLABLE RIEUL-YA-HIEUH +0xB7D0 # HANGUL SYLLABLE RIEUL-YAE +0xB7D1 # HANGUL SYLLABLE RIEUL-YAE-KIYEOK +0xB7D2 # HANGUL SYLLABLE RIEUL-YAE-SSANGKIYEOK +0xB7D3 # HANGUL SYLLABLE RIEUL-YAE-KIYEOKSIOS +0xB7D4 # HANGUL SYLLABLE RIEUL-YAE-NIEUN +0xB7D5 # HANGUL SYLLABLE RIEUL-YAE-NIEUNCIEUC +0xB7D6 # HANGUL SYLLABLE RIEUL-YAE-NIEUNHIEUH +0xB7D7 # HANGUL SYLLABLE RIEUL-YAE-TIKEUT +0xB7D8 # HANGUL SYLLABLE RIEUL-YAE-RIEUL +0xB7D9 # HANGUL SYLLABLE RIEUL-YAE-RIEULKIYEOK +0xB7DA # HANGUL SYLLABLE RIEUL-YAE-RIEULMIEUM +0xB7DB # HANGUL SYLLABLE RIEUL-YAE-RIEULPIEUP +0xB7DC # HANGUL SYLLABLE RIEUL-YAE-RIEULSIOS +0xB7DD # HANGUL SYLLABLE RIEUL-YAE-RIEULTHIEUTH +0xB7DE # HANGUL SYLLABLE RIEUL-YAE-RIEULPHIEUPH +0xB7DF # HANGUL SYLLABLE RIEUL-YAE-RIEULHIEUH +0xB7E0 # HANGUL SYLLABLE RIEUL-YAE-MIEUM +0xB7E1 # HANGUL SYLLABLE RIEUL-YAE-PIEUP +0xB7E2 # HANGUL SYLLABLE RIEUL-YAE-PIEUPSIOS +0xB7E3 # HANGUL SYLLABLE RIEUL-YAE-SIOS +0xB7E4 # HANGUL SYLLABLE RIEUL-YAE-SSANGSIOS +0xB7E5 # HANGUL SYLLABLE RIEUL-YAE-IEUNG +0xB7E6 # HANGUL SYLLABLE RIEUL-YAE-CIEUC +0xB7E7 # HANGUL SYLLABLE RIEUL-YAE-CHIEUCH +0xB7E8 # HANGUL SYLLABLE RIEUL-YAE-KHIEUKH +0xB7E9 # HANGUL SYLLABLE RIEUL-YAE-THIEUTH +0xB7EA # HANGUL SYLLABLE RIEUL-YAE-PHIEUPH +0xB7EB # HANGUL SYLLABLE RIEUL-YAE-HIEUH +0xB7EC # HANGUL SYLLABLE RIEUL-EO +0xB7ED # HANGUL SYLLABLE RIEUL-EO-KIYEOK +0xB7EE # HANGUL SYLLABLE RIEUL-EO-SSANGKIYEOK +0xB7EF # HANGUL SYLLABLE RIEUL-EO-KIYEOKSIOS +0xB7F0 # HANGUL SYLLABLE RIEUL-EO-NIEUN +0xB7F1 # HANGUL SYLLABLE RIEUL-EO-NIEUNCIEUC +0xB7F2 # HANGUL SYLLABLE RIEUL-EO-NIEUNHIEUH +0xB7F3 # HANGUL SYLLABLE RIEUL-EO-TIKEUT +0xB7F4 # HANGUL SYLLABLE RIEUL-EO-RIEUL +0xB7F5 # HANGUL SYLLABLE RIEUL-EO-RIEULKIYEOK +0xB7F6 # HANGUL SYLLABLE RIEUL-EO-RIEULMIEUM +0xB7F7 # HANGUL SYLLABLE RIEUL-EO-RIEULPIEUP +0xB7F8 # HANGUL SYLLABLE RIEUL-EO-RIEULSIOS +0xB7F9 # HANGUL SYLLABLE RIEUL-EO-RIEULTHIEUTH +0xB7FA # HANGUL SYLLABLE RIEUL-EO-RIEULPHIEUPH +0xB7FB # HANGUL SYLLABLE RIEUL-EO-RIEULHIEUH +0xB7FC # HANGUL SYLLABLE RIEUL-EO-MIEUM +0xB7FD # HANGUL SYLLABLE RIEUL-EO-PIEUP +0xB7FE # HANGUL SYLLABLE RIEUL-EO-PIEUPSIOS +0xB7FF # HANGUL SYLLABLE RIEUL-EO-SIOS +0xB800 # HANGUL SYLLABLE RIEUL-EO-SSANGSIOS +0xB801 # HANGUL SYLLABLE RIEUL-EO-IEUNG +0xB802 # HANGUL SYLLABLE RIEUL-EO-CIEUC +0xB803 # HANGUL SYLLABLE RIEUL-EO-CHIEUCH +0xB804 # HANGUL SYLLABLE RIEUL-EO-KHIEUKH +0xB805 # HANGUL SYLLABLE RIEUL-EO-THIEUTH +0xB806 # HANGUL SYLLABLE RIEUL-EO-PHIEUPH +0xB807 # HANGUL SYLLABLE RIEUL-EO-HIEUH +0xB808 # HANGUL SYLLABLE RIEUL-E +0xB809 # HANGUL SYLLABLE RIEUL-E-KIYEOK +0xB80A # HANGUL SYLLABLE RIEUL-E-SSANGKIYEOK +0xB80B # HANGUL SYLLABLE RIEUL-E-KIYEOKSIOS +0xB80C # HANGUL SYLLABLE RIEUL-E-NIEUN +0xB80D # HANGUL SYLLABLE RIEUL-E-NIEUNCIEUC +0xB80E # HANGUL SYLLABLE RIEUL-E-NIEUNHIEUH +0xB80F # HANGUL SYLLABLE RIEUL-E-TIKEUT +0xB810 # HANGUL SYLLABLE RIEUL-E-RIEUL +0xB811 # HANGUL SYLLABLE RIEUL-E-RIEULKIYEOK +0xB812 # HANGUL SYLLABLE RIEUL-E-RIEULMIEUM +0xB813 # HANGUL SYLLABLE RIEUL-E-RIEULPIEUP +0xB814 # HANGUL SYLLABLE RIEUL-E-RIEULSIOS +0xB815 # HANGUL SYLLABLE RIEUL-E-RIEULTHIEUTH +0xB816 # HANGUL SYLLABLE RIEUL-E-RIEULPHIEUPH +0xB817 # HANGUL SYLLABLE RIEUL-E-RIEULHIEUH +0xB818 # HANGUL SYLLABLE RIEUL-E-MIEUM +0xB819 # HANGUL SYLLABLE RIEUL-E-PIEUP +0xB81A # HANGUL SYLLABLE RIEUL-E-PIEUPSIOS +0xB81B # HANGUL SYLLABLE RIEUL-E-SIOS +0xB81C # HANGUL SYLLABLE RIEUL-E-SSANGSIOS +0xB81D # HANGUL SYLLABLE RIEUL-E-IEUNG +0xB81E # HANGUL SYLLABLE RIEUL-E-CIEUC +0xB81F # HANGUL SYLLABLE RIEUL-E-CHIEUCH +0xB820 # HANGUL SYLLABLE RIEUL-E-KHIEUKH +0xB821 # HANGUL SYLLABLE RIEUL-E-THIEUTH +0xB822 # HANGUL SYLLABLE RIEUL-E-PHIEUPH +0xB823 # HANGUL SYLLABLE RIEUL-E-HIEUH +0xB824 # HANGUL SYLLABLE RIEUL-YEO +0xB825 # HANGUL SYLLABLE RIEUL-YEO-KIYEOK +0xB826 # HANGUL SYLLABLE RIEUL-YEO-SSANGKIYEOK +0xB827 # HANGUL SYLLABLE RIEUL-YEO-KIYEOKSIOS +0xB828 # HANGUL SYLLABLE RIEUL-YEO-NIEUN +0xB829 # HANGUL SYLLABLE RIEUL-YEO-NIEUNCIEUC +0xB82A # HANGUL SYLLABLE RIEUL-YEO-NIEUNHIEUH +0xB82B # HANGUL SYLLABLE RIEUL-YEO-TIKEUT +0xB82C # HANGUL SYLLABLE RIEUL-YEO-RIEUL +0xB82D # HANGUL SYLLABLE RIEUL-YEO-RIEULKIYEOK +0xB82E # HANGUL SYLLABLE RIEUL-YEO-RIEULMIEUM +0xB82F # HANGUL SYLLABLE RIEUL-YEO-RIEULPIEUP +0xB830 # HANGUL SYLLABLE RIEUL-YEO-RIEULSIOS +0xB831 # HANGUL SYLLABLE RIEUL-YEO-RIEULTHIEUTH +0xB832 # HANGUL SYLLABLE RIEUL-YEO-RIEULPHIEUPH +0xB833 # HANGUL SYLLABLE RIEUL-YEO-RIEULHIEUH +0xB834 # HANGUL SYLLABLE RIEUL-YEO-MIEUM +0xB835 # HANGUL SYLLABLE RIEUL-YEO-PIEUP +0xB836 # HANGUL SYLLABLE RIEUL-YEO-PIEUPSIOS +0xB837 # HANGUL SYLLABLE RIEUL-YEO-SIOS +0xB838 # HANGUL SYLLABLE RIEUL-YEO-SSANGSIOS +0xB839 # HANGUL SYLLABLE RIEUL-YEO-IEUNG +0xB83A # HANGUL SYLLABLE RIEUL-YEO-CIEUC +0xB83B # HANGUL SYLLABLE RIEUL-YEO-CHIEUCH +0xB83C # HANGUL SYLLABLE RIEUL-YEO-KHIEUKH +0xB83D # HANGUL SYLLABLE RIEUL-YEO-THIEUTH +0xB83E # HANGUL SYLLABLE RIEUL-YEO-PHIEUPH +0xB83F # HANGUL SYLLABLE RIEUL-YEO-HIEUH +0xB840 # HANGUL SYLLABLE RIEUL-YE +0xB841 # HANGUL SYLLABLE RIEUL-YE-KIYEOK +0xB842 # HANGUL SYLLABLE RIEUL-YE-SSANGKIYEOK +0xB843 # HANGUL SYLLABLE RIEUL-YE-KIYEOKSIOS +0xB844 # HANGUL SYLLABLE RIEUL-YE-NIEUN +0xB845 # HANGUL SYLLABLE RIEUL-YE-NIEUNCIEUC +0xB846 # HANGUL SYLLABLE RIEUL-YE-NIEUNHIEUH +0xB847 # HANGUL SYLLABLE RIEUL-YE-TIKEUT +0xB848 # HANGUL SYLLABLE RIEUL-YE-RIEUL +0xB849 # HANGUL SYLLABLE RIEUL-YE-RIEULKIYEOK +0xB84A # HANGUL SYLLABLE RIEUL-YE-RIEULMIEUM +0xB84B # HANGUL SYLLABLE RIEUL-YE-RIEULPIEUP +0xB84C # HANGUL SYLLABLE RIEUL-YE-RIEULSIOS +0xB84D # HANGUL SYLLABLE RIEUL-YE-RIEULTHIEUTH +0xB84E # HANGUL SYLLABLE RIEUL-YE-RIEULPHIEUPH +0xB84F # HANGUL SYLLABLE RIEUL-YE-RIEULHIEUH +0xB850 # HANGUL SYLLABLE RIEUL-YE-MIEUM +0xB851 # HANGUL SYLLABLE RIEUL-YE-PIEUP +0xB852 # HANGUL SYLLABLE RIEUL-YE-PIEUPSIOS +0xB853 # HANGUL SYLLABLE RIEUL-YE-SIOS +0xB854 # HANGUL SYLLABLE RIEUL-YE-SSANGSIOS +0xB855 # HANGUL SYLLABLE RIEUL-YE-IEUNG +0xB856 # HANGUL SYLLABLE RIEUL-YE-CIEUC +0xB857 # HANGUL SYLLABLE RIEUL-YE-CHIEUCH +0xB858 # HANGUL SYLLABLE RIEUL-YE-KHIEUKH +0xB859 # HANGUL SYLLABLE RIEUL-YE-THIEUTH +0xB85A # HANGUL SYLLABLE RIEUL-YE-PHIEUPH +0xB85B # HANGUL SYLLABLE RIEUL-YE-HIEUH +0xB85C # HANGUL SYLLABLE RIEUL-O +0xB85D # HANGUL SYLLABLE RIEUL-O-KIYEOK +0xB85E # HANGUL SYLLABLE RIEUL-O-SSANGKIYEOK +0xB85F # HANGUL SYLLABLE RIEUL-O-KIYEOKSIOS +0xB860 # HANGUL SYLLABLE RIEUL-O-NIEUN +0xB861 # HANGUL SYLLABLE RIEUL-O-NIEUNCIEUC +0xB862 # HANGUL SYLLABLE RIEUL-O-NIEUNHIEUH +0xB863 # HANGUL SYLLABLE RIEUL-O-TIKEUT +0xB864 # HANGUL SYLLABLE RIEUL-O-RIEUL +0xB865 # HANGUL SYLLABLE RIEUL-O-RIEULKIYEOK +0xB866 # HANGUL SYLLABLE RIEUL-O-RIEULMIEUM +0xB867 # HANGUL SYLLABLE RIEUL-O-RIEULPIEUP +0xB868 # HANGUL SYLLABLE RIEUL-O-RIEULSIOS +0xB869 # HANGUL SYLLABLE RIEUL-O-RIEULTHIEUTH +0xB86A # HANGUL SYLLABLE RIEUL-O-RIEULPHIEUPH +0xB86B # HANGUL SYLLABLE RIEUL-O-RIEULHIEUH +0xB86C # HANGUL SYLLABLE RIEUL-O-MIEUM +0xB86D # HANGUL SYLLABLE RIEUL-O-PIEUP +0xB86E # HANGUL SYLLABLE RIEUL-O-PIEUPSIOS +0xB86F # HANGUL SYLLABLE RIEUL-O-SIOS +0xB870 # HANGUL SYLLABLE RIEUL-O-SSANGSIOS +0xB871 # HANGUL SYLLABLE RIEUL-O-IEUNG +0xB872 # HANGUL SYLLABLE RIEUL-O-CIEUC +0xB873 # HANGUL SYLLABLE RIEUL-O-CHIEUCH +0xB874 # HANGUL SYLLABLE RIEUL-O-KHIEUKH +0xB875 # HANGUL SYLLABLE RIEUL-O-THIEUTH +0xB876 # HANGUL SYLLABLE RIEUL-O-PHIEUPH +0xB877 # HANGUL SYLLABLE RIEUL-O-HIEUH +0xB878 # HANGUL SYLLABLE RIEUL-WA +0xB879 # HANGUL SYLLABLE RIEUL-WA-KIYEOK +0xB87A # HANGUL SYLLABLE RIEUL-WA-SSANGKIYEOK +0xB87B # HANGUL SYLLABLE RIEUL-WA-KIYEOKSIOS +0xB87C # HANGUL SYLLABLE RIEUL-WA-NIEUN +0xB87D # HANGUL SYLLABLE RIEUL-WA-NIEUNCIEUC +0xB87E # HANGUL SYLLABLE RIEUL-WA-NIEUNHIEUH +0xB87F # HANGUL SYLLABLE RIEUL-WA-TIKEUT +0xB880 # HANGUL SYLLABLE RIEUL-WA-RIEUL +0xB881 # HANGUL SYLLABLE RIEUL-WA-RIEULKIYEOK +0xB882 # HANGUL SYLLABLE RIEUL-WA-RIEULMIEUM +0xB883 # HANGUL SYLLABLE RIEUL-WA-RIEULPIEUP +0xB884 # HANGUL SYLLABLE RIEUL-WA-RIEULSIOS +0xB885 # HANGUL SYLLABLE RIEUL-WA-RIEULTHIEUTH +0xB886 # HANGUL SYLLABLE RIEUL-WA-RIEULPHIEUPH +0xB887 # HANGUL SYLLABLE RIEUL-WA-RIEULHIEUH +0xB888 # HANGUL SYLLABLE RIEUL-WA-MIEUM +0xB889 # HANGUL SYLLABLE RIEUL-WA-PIEUP +0xB88A # HANGUL SYLLABLE RIEUL-WA-PIEUPSIOS +0xB88B # HANGUL SYLLABLE RIEUL-WA-SIOS +0xB88C # HANGUL SYLLABLE RIEUL-WA-SSANGSIOS +0xB88D # HANGUL SYLLABLE RIEUL-WA-IEUNG +0xB88E # HANGUL SYLLABLE RIEUL-WA-CIEUC +0xB88F # HANGUL SYLLABLE RIEUL-WA-CHIEUCH +0xB890 # HANGUL SYLLABLE RIEUL-WA-KHIEUKH +0xB891 # HANGUL SYLLABLE RIEUL-WA-THIEUTH +0xB892 # HANGUL SYLLABLE RIEUL-WA-PHIEUPH +0xB893 # HANGUL SYLLABLE RIEUL-WA-HIEUH +0xB894 # HANGUL SYLLABLE RIEUL-WAE +0xB895 # HANGUL SYLLABLE RIEUL-WAE-KIYEOK +0xB896 # HANGUL SYLLABLE RIEUL-WAE-SSANGKIYEOK +0xB897 # HANGUL SYLLABLE RIEUL-WAE-KIYEOKSIOS +0xB898 # HANGUL SYLLABLE RIEUL-WAE-NIEUN +0xB899 # HANGUL SYLLABLE RIEUL-WAE-NIEUNCIEUC +0xB89A # HANGUL SYLLABLE RIEUL-WAE-NIEUNHIEUH +0xB89B # HANGUL SYLLABLE RIEUL-WAE-TIKEUT +0xB89C # HANGUL SYLLABLE RIEUL-WAE-RIEUL +0xB89D # HANGUL SYLLABLE RIEUL-WAE-RIEULKIYEOK +0xB89E # HANGUL SYLLABLE RIEUL-WAE-RIEULMIEUM +0xB89F # HANGUL SYLLABLE RIEUL-WAE-RIEULPIEUP +0xB8A0 # HANGUL SYLLABLE RIEUL-WAE-RIEULSIOS +0xB8A1 # HANGUL SYLLABLE RIEUL-WAE-RIEULTHIEUTH +0xB8A2 # HANGUL SYLLABLE RIEUL-WAE-RIEULPHIEUPH +0xB8A3 # HANGUL SYLLABLE RIEUL-WAE-RIEULHIEUH +0xB8A4 # HANGUL SYLLABLE RIEUL-WAE-MIEUM +0xB8A5 # HANGUL SYLLABLE RIEUL-WAE-PIEUP +0xB8A6 # HANGUL SYLLABLE RIEUL-WAE-PIEUPSIOS +0xB8A7 # HANGUL SYLLABLE RIEUL-WAE-SIOS +0xB8A8 # HANGUL SYLLABLE RIEUL-WAE-SSANGSIOS +0xB8A9 # HANGUL SYLLABLE RIEUL-WAE-IEUNG +0xB8AA # HANGUL SYLLABLE RIEUL-WAE-CIEUC +0xB8AB # HANGUL SYLLABLE RIEUL-WAE-CHIEUCH +0xB8AC # HANGUL SYLLABLE RIEUL-WAE-KHIEUKH +0xB8AD # HANGUL SYLLABLE RIEUL-WAE-THIEUTH +0xB8AE # HANGUL SYLLABLE RIEUL-WAE-PHIEUPH +0xB8AF # HANGUL SYLLABLE RIEUL-WAE-HIEUH +0xB8B0 # HANGUL SYLLABLE RIEUL-OE +0xB8B1 # HANGUL SYLLABLE RIEUL-OE-KIYEOK +0xB8B2 # HANGUL SYLLABLE RIEUL-OE-SSANGKIYEOK +0xB8B3 # HANGUL SYLLABLE RIEUL-OE-KIYEOKSIOS +0xB8B4 # HANGUL SYLLABLE RIEUL-OE-NIEUN +0xB8B5 # HANGUL SYLLABLE RIEUL-OE-NIEUNCIEUC +0xB8B6 # HANGUL SYLLABLE RIEUL-OE-NIEUNHIEUH +0xB8B7 # HANGUL SYLLABLE RIEUL-OE-TIKEUT +0xB8B8 # HANGUL SYLLABLE RIEUL-OE-RIEUL +0xB8B9 # HANGUL SYLLABLE RIEUL-OE-RIEULKIYEOK +0xB8BA # HANGUL SYLLABLE RIEUL-OE-RIEULMIEUM +0xB8BB # HANGUL SYLLABLE RIEUL-OE-RIEULPIEUP +0xB8BC # HANGUL SYLLABLE RIEUL-OE-RIEULSIOS +0xB8BD # HANGUL SYLLABLE RIEUL-OE-RIEULTHIEUTH +0xB8BE # HANGUL SYLLABLE RIEUL-OE-RIEULPHIEUPH +0xB8BF # HANGUL SYLLABLE RIEUL-OE-RIEULHIEUH +0xB8C0 # HANGUL SYLLABLE RIEUL-OE-MIEUM +0xB8C1 # HANGUL SYLLABLE RIEUL-OE-PIEUP +0xB8C2 # HANGUL SYLLABLE RIEUL-OE-PIEUPSIOS +0xB8C3 # HANGUL SYLLABLE RIEUL-OE-SIOS +0xB8C4 # HANGUL SYLLABLE RIEUL-OE-SSANGSIOS +0xB8C5 # HANGUL SYLLABLE RIEUL-OE-IEUNG +0xB8C6 # HANGUL SYLLABLE RIEUL-OE-CIEUC +0xB8C7 # HANGUL SYLLABLE RIEUL-OE-CHIEUCH +0xB8C8 # HANGUL SYLLABLE RIEUL-OE-KHIEUKH +0xB8C9 # HANGUL SYLLABLE RIEUL-OE-THIEUTH +0xB8CA # HANGUL SYLLABLE RIEUL-OE-PHIEUPH +0xB8CB # HANGUL SYLLABLE RIEUL-OE-HIEUH +0xB8CC # HANGUL SYLLABLE RIEUL-YO +0xB8CD # HANGUL SYLLABLE RIEUL-YO-KIYEOK +0xB8CE # HANGUL SYLLABLE RIEUL-YO-SSANGKIYEOK +0xB8CF # HANGUL SYLLABLE RIEUL-YO-KIYEOKSIOS +0xB8D0 # HANGUL SYLLABLE RIEUL-YO-NIEUN +0xB8D1 # HANGUL SYLLABLE RIEUL-YO-NIEUNCIEUC +0xB8D2 # HANGUL SYLLABLE RIEUL-YO-NIEUNHIEUH +0xB8D3 # HANGUL SYLLABLE RIEUL-YO-TIKEUT +0xB8D4 # HANGUL SYLLABLE RIEUL-YO-RIEUL +0xB8D5 # HANGUL SYLLABLE RIEUL-YO-RIEULKIYEOK +0xB8D6 # HANGUL SYLLABLE RIEUL-YO-RIEULMIEUM +0xB8D7 # HANGUL SYLLABLE RIEUL-YO-RIEULPIEUP +0xB8D8 # HANGUL SYLLABLE RIEUL-YO-RIEULSIOS +0xB8D9 # HANGUL SYLLABLE RIEUL-YO-RIEULTHIEUTH +0xB8DA # HANGUL SYLLABLE RIEUL-YO-RIEULPHIEUPH +0xB8DB # HANGUL SYLLABLE RIEUL-YO-RIEULHIEUH +0xB8DC # HANGUL SYLLABLE RIEUL-YO-MIEUM +0xB8DD # HANGUL SYLLABLE RIEUL-YO-PIEUP +0xB8DE # HANGUL SYLLABLE RIEUL-YO-PIEUPSIOS +0xB8DF # HANGUL SYLLABLE RIEUL-YO-SIOS +0xB8E0 # HANGUL SYLLABLE RIEUL-YO-SSANGSIOS +0xB8E1 # HANGUL SYLLABLE RIEUL-YO-IEUNG +0xB8E2 # HANGUL SYLLABLE RIEUL-YO-CIEUC +0xB8E3 # HANGUL SYLLABLE RIEUL-YO-CHIEUCH +0xB8E4 # HANGUL SYLLABLE RIEUL-YO-KHIEUKH +0xB8E5 # HANGUL SYLLABLE RIEUL-YO-THIEUTH +0xB8E6 # HANGUL SYLLABLE RIEUL-YO-PHIEUPH +0xB8E7 # HANGUL SYLLABLE RIEUL-YO-HIEUH +0xB8E8 # HANGUL SYLLABLE RIEUL-U +0xB8E9 # HANGUL SYLLABLE RIEUL-U-KIYEOK +0xB8EA # HANGUL SYLLABLE RIEUL-U-SSANGKIYEOK +0xB8EB # HANGUL SYLLABLE RIEUL-U-KIYEOKSIOS +0xB8EC # HANGUL SYLLABLE RIEUL-U-NIEUN +0xB8ED # HANGUL SYLLABLE RIEUL-U-NIEUNCIEUC +0xB8EE # HANGUL SYLLABLE RIEUL-U-NIEUNHIEUH +0xB8EF # HANGUL SYLLABLE RIEUL-U-TIKEUT +0xB8F0 # HANGUL SYLLABLE RIEUL-U-RIEUL +0xB8F1 # HANGUL SYLLABLE RIEUL-U-RIEULKIYEOK +0xB8F2 # HANGUL SYLLABLE RIEUL-U-RIEULMIEUM +0xB8F3 # HANGUL SYLLABLE RIEUL-U-RIEULPIEUP +0xB8F4 # HANGUL SYLLABLE RIEUL-U-RIEULSIOS +0xB8F5 # HANGUL SYLLABLE RIEUL-U-RIEULTHIEUTH +0xB8F6 # HANGUL SYLLABLE RIEUL-U-RIEULPHIEUPH +0xB8F7 # HANGUL SYLLABLE RIEUL-U-RIEULHIEUH +0xB8F8 # HANGUL SYLLABLE RIEUL-U-MIEUM +0xB8F9 # HANGUL SYLLABLE RIEUL-U-PIEUP +0xB8FA # HANGUL SYLLABLE RIEUL-U-PIEUPSIOS +0xB8FB # HANGUL SYLLABLE RIEUL-U-SIOS +0xB8FC # HANGUL SYLLABLE RIEUL-U-SSANGSIOS +0xB8FD # HANGUL SYLLABLE RIEUL-U-IEUNG +0xB8FE # HANGUL SYLLABLE RIEUL-U-CIEUC +0xB8FF # HANGUL SYLLABLE RIEUL-U-CHIEUCH +0xB900 # HANGUL SYLLABLE RIEUL-U-KHIEUKH +0xB901 # HANGUL SYLLABLE RIEUL-U-THIEUTH +0xB902 # HANGUL SYLLABLE RIEUL-U-PHIEUPH +0xB903 # HANGUL SYLLABLE RIEUL-U-HIEUH +0xB904 # HANGUL SYLLABLE RIEUL-WEO +0xB905 # HANGUL SYLLABLE RIEUL-WEO-KIYEOK +0xB906 # HANGUL SYLLABLE RIEUL-WEO-SSANGKIYEOK +0xB907 # HANGUL SYLLABLE RIEUL-WEO-KIYEOKSIOS +0xB908 # HANGUL SYLLABLE RIEUL-WEO-NIEUN +0xB909 # HANGUL SYLLABLE RIEUL-WEO-NIEUNCIEUC +0xB90A # HANGUL SYLLABLE RIEUL-WEO-NIEUNHIEUH +0xB90B # HANGUL SYLLABLE RIEUL-WEO-TIKEUT +0xB90C # HANGUL SYLLABLE RIEUL-WEO-RIEUL +0xB90D # HANGUL SYLLABLE RIEUL-WEO-RIEULKIYEOK +0xB90E # HANGUL SYLLABLE RIEUL-WEO-RIEULMIEUM +0xB90F # HANGUL SYLLABLE RIEUL-WEO-RIEULPIEUP +0xB910 # HANGUL SYLLABLE RIEUL-WEO-RIEULSIOS +0xB911 # HANGUL SYLLABLE RIEUL-WEO-RIEULTHIEUTH +0xB912 # HANGUL SYLLABLE RIEUL-WEO-RIEULPHIEUPH +0xB913 # HANGUL SYLLABLE RIEUL-WEO-RIEULHIEUH +0xB914 # HANGUL SYLLABLE RIEUL-WEO-MIEUM +0xB915 # HANGUL SYLLABLE RIEUL-WEO-PIEUP +0xB916 # HANGUL SYLLABLE RIEUL-WEO-PIEUPSIOS +0xB917 # HANGUL SYLLABLE RIEUL-WEO-SIOS +0xB918 # HANGUL SYLLABLE RIEUL-WEO-SSANGSIOS +0xB919 # HANGUL SYLLABLE RIEUL-WEO-IEUNG +0xB91A # HANGUL SYLLABLE RIEUL-WEO-CIEUC +0xB91B # HANGUL SYLLABLE RIEUL-WEO-CHIEUCH +0xB91C # HANGUL SYLLABLE RIEUL-WEO-KHIEUKH +0xB91D # HANGUL SYLLABLE RIEUL-WEO-THIEUTH +0xB91E # HANGUL SYLLABLE RIEUL-WEO-PHIEUPH +0xB91F # HANGUL SYLLABLE RIEUL-WEO-HIEUH +0xB920 # HANGUL SYLLABLE RIEUL-WE +0xB921 # HANGUL SYLLABLE RIEUL-WE-KIYEOK +0xB922 # HANGUL SYLLABLE RIEUL-WE-SSANGKIYEOK +0xB923 # HANGUL SYLLABLE RIEUL-WE-KIYEOKSIOS +0xB924 # HANGUL SYLLABLE RIEUL-WE-NIEUN +0xB925 # HANGUL SYLLABLE RIEUL-WE-NIEUNCIEUC +0xB926 # HANGUL SYLLABLE RIEUL-WE-NIEUNHIEUH +0xB927 # HANGUL SYLLABLE RIEUL-WE-TIKEUT +0xB928 # HANGUL SYLLABLE RIEUL-WE-RIEUL +0xB929 # HANGUL SYLLABLE RIEUL-WE-RIEULKIYEOK +0xB92A # HANGUL SYLLABLE RIEUL-WE-RIEULMIEUM +0xB92B # HANGUL SYLLABLE RIEUL-WE-RIEULPIEUP +0xB92C # HANGUL SYLLABLE RIEUL-WE-RIEULSIOS +0xB92D # HANGUL SYLLABLE RIEUL-WE-RIEULTHIEUTH +0xB92E # HANGUL SYLLABLE RIEUL-WE-RIEULPHIEUPH +0xB92F # HANGUL SYLLABLE RIEUL-WE-RIEULHIEUH +0xB930 # HANGUL SYLLABLE RIEUL-WE-MIEUM +0xB931 # HANGUL SYLLABLE RIEUL-WE-PIEUP +0xB932 # HANGUL SYLLABLE RIEUL-WE-PIEUPSIOS +0xB933 # HANGUL SYLLABLE RIEUL-WE-SIOS +0xB934 # HANGUL SYLLABLE RIEUL-WE-SSANGSIOS +0xB935 # HANGUL SYLLABLE RIEUL-WE-IEUNG +0xB936 # HANGUL SYLLABLE RIEUL-WE-CIEUC +0xB937 # HANGUL SYLLABLE RIEUL-WE-CHIEUCH +0xB938 # HANGUL SYLLABLE RIEUL-WE-KHIEUKH +0xB939 # HANGUL SYLLABLE RIEUL-WE-THIEUTH +0xB93A # HANGUL SYLLABLE RIEUL-WE-PHIEUPH +0xB93B # HANGUL SYLLABLE RIEUL-WE-HIEUH +0xB93C # HANGUL SYLLABLE RIEUL-WI +0xB93D # HANGUL SYLLABLE RIEUL-WI-KIYEOK +0xB93E # HANGUL SYLLABLE RIEUL-WI-SSANGKIYEOK +0xB93F # HANGUL SYLLABLE RIEUL-WI-KIYEOKSIOS +0xB940 # HANGUL SYLLABLE RIEUL-WI-NIEUN +0xB941 # HANGUL SYLLABLE RIEUL-WI-NIEUNCIEUC +0xB942 # HANGUL SYLLABLE RIEUL-WI-NIEUNHIEUH +0xB943 # HANGUL SYLLABLE RIEUL-WI-TIKEUT +0xB944 # HANGUL SYLLABLE RIEUL-WI-RIEUL +0xB945 # HANGUL SYLLABLE RIEUL-WI-RIEULKIYEOK +0xB946 # HANGUL SYLLABLE RIEUL-WI-RIEULMIEUM +0xB947 # HANGUL SYLLABLE RIEUL-WI-RIEULPIEUP +0xB948 # HANGUL SYLLABLE RIEUL-WI-RIEULSIOS +0xB949 # HANGUL SYLLABLE RIEUL-WI-RIEULTHIEUTH +0xB94A # HANGUL SYLLABLE RIEUL-WI-RIEULPHIEUPH +0xB94B # HANGUL SYLLABLE RIEUL-WI-RIEULHIEUH +0xB94C # HANGUL SYLLABLE RIEUL-WI-MIEUM +0xB94D # HANGUL SYLLABLE RIEUL-WI-PIEUP +0xB94E # HANGUL SYLLABLE RIEUL-WI-PIEUPSIOS +0xB94F # HANGUL SYLLABLE RIEUL-WI-SIOS +0xB950 # HANGUL SYLLABLE RIEUL-WI-SSANGSIOS +0xB951 # HANGUL SYLLABLE RIEUL-WI-IEUNG +0xB952 # HANGUL SYLLABLE RIEUL-WI-CIEUC +0xB953 # HANGUL SYLLABLE RIEUL-WI-CHIEUCH +0xB954 # HANGUL SYLLABLE RIEUL-WI-KHIEUKH +0xB955 # HANGUL SYLLABLE RIEUL-WI-THIEUTH +0xB956 # HANGUL SYLLABLE RIEUL-WI-PHIEUPH +0xB957 # HANGUL SYLLABLE RIEUL-WI-HIEUH +0xB958 # HANGUL SYLLABLE RIEUL-YU +0xB959 # HANGUL SYLLABLE RIEUL-YU-KIYEOK +0xB95A # HANGUL SYLLABLE RIEUL-YU-SSANGKIYEOK +0xB95B # HANGUL SYLLABLE RIEUL-YU-KIYEOKSIOS +0xB95C # HANGUL SYLLABLE RIEUL-YU-NIEUN +0xB95D # HANGUL SYLLABLE RIEUL-YU-NIEUNCIEUC +0xB95E # HANGUL SYLLABLE RIEUL-YU-NIEUNHIEUH +0xB95F # HANGUL SYLLABLE RIEUL-YU-TIKEUT +0xB960 # HANGUL SYLLABLE RIEUL-YU-RIEUL +0xB961 # HANGUL SYLLABLE RIEUL-YU-RIEULKIYEOK +0xB962 # HANGUL SYLLABLE RIEUL-YU-RIEULMIEUM +0xB963 # HANGUL SYLLABLE RIEUL-YU-RIEULPIEUP +0xB964 # HANGUL SYLLABLE RIEUL-YU-RIEULSIOS +0xB965 # HANGUL SYLLABLE RIEUL-YU-RIEULTHIEUTH +0xB966 # HANGUL SYLLABLE RIEUL-YU-RIEULPHIEUPH +0xB967 # HANGUL SYLLABLE RIEUL-YU-RIEULHIEUH +0xB968 # HANGUL SYLLABLE RIEUL-YU-MIEUM +0xB969 # HANGUL SYLLABLE RIEUL-YU-PIEUP +0xB96A # HANGUL SYLLABLE RIEUL-YU-PIEUPSIOS +0xB96B # HANGUL SYLLABLE RIEUL-YU-SIOS +0xB96C # HANGUL SYLLABLE RIEUL-YU-SSANGSIOS +0xB96D # HANGUL SYLLABLE RIEUL-YU-IEUNG +0xB96E # HANGUL SYLLABLE RIEUL-YU-CIEUC +0xB96F # HANGUL SYLLABLE RIEUL-YU-CHIEUCH +0xB970 # HANGUL SYLLABLE RIEUL-YU-KHIEUKH +0xB971 # HANGUL SYLLABLE RIEUL-YU-THIEUTH +0xB972 # HANGUL SYLLABLE RIEUL-YU-PHIEUPH +0xB973 # HANGUL SYLLABLE RIEUL-YU-HIEUH +0xB974 # HANGUL SYLLABLE RIEUL-EU +0xB975 # HANGUL SYLLABLE RIEUL-EU-KIYEOK +0xB976 # HANGUL SYLLABLE RIEUL-EU-SSANGKIYEOK +0xB977 # HANGUL SYLLABLE RIEUL-EU-KIYEOKSIOS +0xB978 # HANGUL SYLLABLE RIEUL-EU-NIEUN +0xB979 # HANGUL SYLLABLE RIEUL-EU-NIEUNCIEUC +0xB97A # HANGUL SYLLABLE RIEUL-EU-NIEUNHIEUH +0xB97B # HANGUL SYLLABLE RIEUL-EU-TIKEUT +0xB97C # HANGUL SYLLABLE RIEUL-EU-RIEUL +0xB97D # HANGUL SYLLABLE RIEUL-EU-RIEULKIYEOK +0xB97E # HANGUL SYLLABLE RIEUL-EU-RIEULMIEUM +0xB97F # HANGUL SYLLABLE RIEUL-EU-RIEULPIEUP +0xB980 # HANGUL SYLLABLE RIEUL-EU-RIEULSIOS +0xB981 # HANGUL SYLLABLE RIEUL-EU-RIEULTHIEUTH +0xB982 # HANGUL SYLLABLE RIEUL-EU-RIEULPHIEUPH +0xB983 # HANGUL SYLLABLE RIEUL-EU-RIEULHIEUH +0xB984 # HANGUL SYLLABLE RIEUL-EU-MIEUM +0xB985 # HANGUL SYLLABLE RIEUL-EU-PIEUP +0xB986 # HANGUL SYLLABLE RIEUL-EU-PIEUPSIOS +0xB987 # HANGUL SYLLABLE RIEUL-EU-SIOS +0xB988 # HANGUL SYLLABLE RIEUL-EU-SSANGSIOS +0xB989 # HANGUL SYLLABLE RIEUL-EU-IEUNG +0xB98A # HANGUL SYLLABLE RIEUL-EU-CIEUC +0xB98B # HANGUL SYLLABLE RIEUL-EU-CHIEUCH +0xB98C # HANGUL SYLLABLE RIEUL-EU-KHIEUKH +0xB98D # HANGUL SYLLABLE RIEUL-EU-THIEUTH +0xB98E # HANGUL SYLLABLE RIEUL-EU-PHIEUPH +0xB98F # HANGUL SYLLABLE RIEUL-EU-HIEUH +0xB990 # HANGUL SYLLABLE RIEUL-YI +0xB991 # HANGUL SYLLABLE RIEUL-YI-KIYEOK +0xB992 # HANGUL SYLLABLE RIEUL-YI-SSANGKIYEOK +0xB993 # HANGUL SYLLABLE RIEUL-YI-KIYEOKSIOS +0xB994 # HANGUL SYLLABLE RIEUL-YI-NIEUN +0xB995 # HANGUL SYLLABLE RIEUL-YI-NIEUNCIEUC +0xB996 # HANGUL SYLLABLE RIEUL-YI-NIEUNHIEUH +0xB997 # HANGUL SYLLABLE RIEUL-YI-TIKEUT +0xB998 # HANGUL SYLLABLE RIEUL-YI-RIEUL +0xB999 # HANGUL SYLLABLE RIEUL-YI-RIEULKIYEOK +0xB99A # HANGUL SYLLABLE RIEUL-YI-RIEULMIEUM +0xB99B # HANGUL SYLLABLE RIEUL-YI-RIEULPIEUP +0xB99C # HANGUL SYLLABLE RIEUL-YI-RIEULSIOS +0xB99D # HANGUL SYLLABLE RIEUL-YI-RIEULTHIEUTH +0xB99E # HANGUL SYLLABLE RIEUL-YI-RIEULPHIEUPH +0xB99F # HANGUL SYLLABLE RIEUL-YI-RIEULHIEUH +0xB9A0 # HANGUL SYLLABLE RIEUL-YI-MIEUM +0xB9A1 # HANGUL SYLLABLE RIEUL-YI-PIEUP +0xB9A2 # HANGUL SYLLABLE RIEUL-YI-PIEUPSIOS +0xB9A3 # HANGUL SYLLABLE RIEUL-YI-SIOS +0xB9A4 # HANGUL SYLLABLE RIEUL-YI-SSANGSIOS +0xB9A5 # HANGUL SYLLABLE RIEUL-YI-IEUNG +0xB9A6 # HANGUL SYLLABLE RIEUL-YI-CIEUC +0xB9A7 # HANGUL SYLLABLE RIEUL-YI-CHIEUCH +0xB9A8 # HANGUL SYLLABLE RIEUL-YI-KHIEUKH +0xB9A9 # HANGUL SYLLABLE RIEUL-YI-THIEUTH +0xB9AA # HANGUL SYLLABLE RIEUL-YI-PHIEUPH +0xB9AB # HANGUL SYLLABLE RIEUL-YI-HIEUH +0xB9AC # HANGUL SYLLABLE RIEUL-I +0xB9AD # HANGUL SYLLABLE RIEUL-I-KIYEOK +0xB9AE # HANGUL SYLLABLE RIEUL-I-SSANGKIYEOK +0xB9AF # HANGUL SYLLABLE RIEUL-I-KIYEOKSIOS +0xB9B0 # HANGUL SYLLABLE RIEUL-I-NIEUN +0xB9B1 # HANGUL SYLLABLE RIEUL-I-NIEUNCIEUC +0xB9B2 # HANGUL SYLLABLE RIEUL-I-NIEUNHIEUH +0xB9B3 # HANGUL SYLLABLE RIEUL-I-TIKEUT +0xB9B4 # HANGUL SYLLABLE RIEUL-I-RIEUL +0xB9B5 # HANGUL SYLLABLE RIEUL-I-RIEULKIYEOK +0xB9B6 # HANGUL SYLLABLE RIEUL-I-RIEULMIEUM +0xB9B7 # HANGUL SYLLABLE RIEUL-I-RIEULPIEUP +0xB9B8 # HANGUL SYLLABLE RIEUL-I-RIEULSIOS +0xB9B9 # HANGUL SYLLABLE RIEUL-I-RIEULTHIEUTH +0xB9BA # HANGUL SYLLABLE RIEUL-I-RIEULPHIEUPH +0xB9BB # HANGUL SYLLABLE RIEUL-I-RIEULHIEUH +0xB9BC # HANGUL SYLLABLE RIEUL-I-MIEUM +0xB9BD # HANGUL SYLLABLE RIEUL-I-PIEUP +0xB9BE # HANGUL SYLLABLE RIEUL-I-PIEUPSIOS +0xB9BF # HANGUL SYLLABLE RIEUL-I-SIOS +0xB9C0 # HANGUL SYLLABLE RIEUL-I-SSANGSIOS +0xB9C1 # HANGUL SYLLABLE RIEUL-I-IEUNG +0xB9C2 # HANGUL SYLLABLE RIEUL-I-CIEUC +0xB9C3 # HANGUL SYLLABLE RIEUL-I-CHIEUCH +0xB9C4 # HANGUL SYLLABLE RIEUL-I-KHIEUKH +0xB9C5 # HANGUL SYLLABLE RIEUL-I-THIEUTH +0xB9C6 # HANGUL SYLLABLE RIEUL-I-PHIEUPH +0xB9C7 # HANGUL SYLLABLE RIEUL-I-HIEUH +0xB9C8 # HANGUL SYLLABLE MIEUM-A +0xB9C9 # HANGUL SYLLABLE MIEUM-A-KIYEOK +0xB9CA # HANGUL SYLLABLE MIEUM-A-SSANGKIYEOK +0xB9CB # HANGUL SYLLABLE MIEUM-A-KIYEOKSIOS +0xB9CC # HANGUL SYLLABLE MIEUM-A-NIEUN +0xB9CD # HANGUL SYLLABLE MIEUM-A-NIEUNCIEUC +0xB9CE # HANGUL SYLLABLE MIEUM-A-NIEUNHIEUH +0xB9CF # HANGUL SYLLABLE MIEUM-A-TIKEUT +0xB9D0 # HANGUL SYLLABLE MIEUM-A-RIEUL +0xB9D1 # HANGUL SYLLABLE MIEUM-A-RIEULKIYEOK +0xB9D2 # HANGUL SYLLABLE MIEUM-A-RIEULMIEUM +0xB9D3 # HANGUL SYLLABLE MIEUM-A-RIEULPIEUP +0xB9D4 # HANGUL SYLLABLE MIEUM-A-RIEULSIOS +0xB9D5 # HANGUL SYLLABLE MIEUM-A-RIEULTHIEUTH +0xB9D6 # HANGUL SYLLABLE MIEUM-A-RIEULPHIEUPH +0xB9D7 # HANGUL SYLLABLE MIEUM-A-RIEULHIEUH +0xB9D8 # HANGUL SYLLABLE MIEUM-A-MIEUM +0xB9D9 # HANGUL SYLLABLE MIEUM-A-PIEUP +0xB9DA # HANGUL SYLLABLE MIEUM-A-PIEUPSIOS +0xB9DB # HANGUL SYLLABLE MIEUM-A-SIOS +0xB9DC # HANGUL SYLLABLE MIEUM-A-SSANGSIOS +0xB9DD # HANGUL SYLLABLE MIEUM-A-IEUNG +0xB9DE # HANGUL SYLLABLE MIEUM-A-CIEUC +0xB9DF # HANGUL SYLLABLE MIEUM-A-CHIEUCH +0xB9E0 # HANGUL SYLLABLE MIEUM-A-KHIEUKH +0xB9E1 # HANGUL SYLLABLE MIEUM-A-THIEUTH +0xB9E2 # HANGUL SYLLABLE MIEUM-A-PHIEUPH +0xB9E3 # HANGUL SYLLABLE MIEUM-A-HIEUH +0xB9E4 # HANGUL SYLLABLE MIEUM-AE +0xB9E5 # HANGUL SYLLABLE MIEUM-AE-KIYEOK +0xB9E6 # HANGUL SYLLABLE MIEUM-AE-SSANGKIYEOK +0xB9E7 # HANGUL SYLLABLE MIEUM-AE-KIYEOKSIOS +0xB9E8 # HANGUL SYLLABLE MIEUM-AE-NIEUN +0xB9E9 # HANGUL SYLLABLE MIEUM-AE-NIEUNCIEUC +0xB9EA # HANGUL SYLLABLE MIEUM-AE-NIEUNHIEUH +0xB9EB # HANGUL SYLLABLE MIEUM-AE-TIKEUT +0xB9EC # HANGUL SYLLABLE MIEUM-AE-RIEUL +0xB9ED # HANGUL SYLLABLE MIEUM-AE-RIEULKIYEOK +0xB9EE # HANGUL SYLLABLE MIEUM-AE-RIEULMIEUM +0xB9EF # HANGUL SYLLABLE MIEUM-AE-RIEULPIEUP +0xB9F0 # HANGUL SYLLABLE MIEUM-AE-RIEULSIOS +0xB9F1 # HANGUL SYLLABLE MIEUM-AE-RIEULTHIEUTH +0xB9F2 # HANGUL SYLLABLE MIEUM-AE-RIEULPHIEUPH +0xB9F3 # HANGUL SYLLABLE MIEUM-AE-RIEULHIEUH +0xB9F4 # HANGUL SYLLABLE MIEUM-AE-MIEUM +0xB9F5 # HANGUL SYLLABLE MIEUM-AE-PIEUP +0xB9F6 # HANGUL SYLLABLE MIEUM-AE-PIEUPSIOS +0xB9F7 # HANGUL SYLLABLE MIEUM-AE-SIOS +0xB9F8 # HANGUL SYLLABLE MIEUM-AE-SSANGSIOS +0xB9F9 # HANGUL SYLLABLE MIEUM-AE-IEUNG +0xB9FA # HANGUL SYLLABLE MIEUM-AE-CIEUC +0xB9FB # HANGUL SYLLABLE MIEUM-AE-CHIEUCH +0xB9FC # HANGUL SYLLABLE MIEUM-AE-KHIEUKH +0xB9FD # HANGUL SYLLABLE MIEUM-AE-THIEUTH +0xB9FE # HANGUL SYLLABLE MIEUM-AE-PHIEUPH +0xB9FF # HANGUL SYLLABLE MIEUM-AE-HIEUH +0xBA00 # HANGUL SYLLABLE MIEUM-YA +0xBA01 # HANGUL SYLLABLE MIEUM-YA-KIYEOK +0xBA02 # HANGUL SYLLABLE MIEUM-YA-SSANGKIYEOK +0xBA03 # HANGUL SYLLABLE MIEUM-YA-KIYEOKSIOS +0xBA04 # HANGUL SYLLABLE MIEUM-YA-NIEUN +0xBA05 # HANGUL SYLLABLE MIEUM-YA-NIEUNCIEUC +0xBA06 # HANGUL SYLLABLE MIEUM-YA-NIEUNHIEUH +0xBA07 # HANGUL SYLLABLE MIEUM-YA-TIKEUT +0xBA08 # HANGUL SYLLABLE MIEUM-YA-RIEUL +0xBA09 # HANGUL SYLLABLE MIEUM-YA-RIEULKIYEOK +0xBA0A # HANGUL SYLLABLE MIEUM-YA-RIEULMIEUM +0xBA0B # HANGUL SYLLABLE MIEUM-YA-RIEULPIEUP +0xBA0C # HANGUL SYLLABLE MIEUM-YA-RIEULSIOS +0xBA0D # HANGUL SYLLABLE MIEUM-YA-RIEULTHIEUTH +0xBA0E # HANGUL SYLLABLE MIEUM-YA-RIEULPHIEUPH +0xBA0F # HANGUL SYLLABLE MIEUM-YA-RIEULHIEUH +0xBA10 # HANGUL SYLLABLE MIEUM-YA-MIEUM +0xBA11 # HANGUL SYLLABLE MIEUM-YA-PIEUP +0xBA12 # HANGUL SYLLABLE MIEUM-YA-PIEUPSIOS +0xBA13 # HANGUL SYLLABLE MIEUM-YA-SIOS +0xBA14 # HANGUL SYLLABLE MIEUM-YA-SSANGSIOS +0xBA15 # HANGUL SYLLABLE MIEUM-YA-IEUNG +0xBA16 # HANGUL SYLLABLE MIEUM-YA-CIEUC +0xBA17 # HANGUL SYLLABLE MIEUM-YA-CHIEUCH +0xBA18 # HANGUL SYLLABLE MIEUM-YA-KHIEUKH +0xBA19 # HANGUL SYLLABLE MIEUM-YA-THIEUTH +0xBA1A # HANGUL SYLLABLE MIEUM-YA-PHIEUPH +0xBA1B # HANGUL SYLLABLE MIEUM-YA-HIEUH +0xBA1C # HANGUL SYLLABLE MIEUM-YAE +0xBA1D # HANGUL SYLLABLE MIEUM-YAE-KIYEOK +0xBA1E # HANGUL SYLLABLE MIEUM-YAE-SSANGKIYEOK +0xBA1F # HANGUL SYLLABLE MIEUM-YAE-KIYEOKSIOS +0xBA20 # HANGUL SYLLABLE MIEUM-YAE-NIEUN +0xBA21 # HANGUL SYLLABLE MIEUM-YAE-NIEUNCIEUC +0xBA22 # HANGUL SYLLABLE MIEUM-YAE-NIEUNHIEUH +0xBA23 # HANGUL SYLLABLE MIEUM-YAE-TIKEUT +0xBA24 # HANGUL SYLLABLE MIEUM-YAE-RIEUL +0xBA25 # HANGUL SYLLABLE MIEUM-YAE-RIEULKIYEOK +0xBA26 # HANGUL SYLLABLE MIEUM-YAE-RIEULMIEUM +0xBA27 # HANGUL SYLLABLE MIEUM-YAE-RIEULPIEUP +0xBA28 # HANGUL SYLLABLE MIEUM-YAE-RIEULSIOS +0xBA29 # HANGUL SYLLABLE MIEUM-YAE-RIEULTHIEUTH +0xBA2A # HANGUL SYLLABLE MIEUM-YAE-RIEULPHIEUPH +0xBA2B # HANGUL SYLLABLE MIEUM-YAE-RIEULHIEUH +0xBA2C # HANGUL SYLLABLE MIEUM-YAE-MIEUM +0xBA2D # HANGUL SYLLABLE MIEUM-YAE-PIEUP +0xBA2E # HANGUL SYLLABLE MIEUM-YAE-PIEUPSIOS +0xBA2F # HANGUL SYLLABLE MIEUM-YAE-SIOS +0xBA30 # HANGUL SYLLABLE MIEUM-YAE-SSANGSIOS +0xBA31 # HANGUL SYLLABLE MIEUM-YAE-IEUNG +0xBA32 # HANGUL SYLLABLE MIEUM-YAE-CIEUC +0xBA33 # HANGUL SYLLABLE MIEUM-YAE-CHIEUCH +0xBA34 # HANGUL SYLLABLE MIEUM-YAE-KHIEUKH +0xBA35 # HANGUL SYLLABLE MIEUM-YAE-THIEUTH +0xBA36 # HANGUL SYLLABLE MIEUM-YAE-PHIEUPH +0xBA37 # HANGUL SYLLABLE MIEUM-YAE-HIEUH +0xBA38 # HANGUL SYLLABLE MIEUM-EO +0xBA39 # HANGUL SYLLABLE MIEUM-EO-KIYEOK +0xBA3A # HANGUL SYLLABLE MIEUM-EO-SSANGKIYEOK +0xBA3B # HANGUL SYLLABLE MIEUM-EO-KIYEOKSIOS +0xBA3C # HANGUL SYLLABLE MIEUM-EO-NIEUN +0xBA3D # HANGUL SYLLABLE MIEUM-EO-NIEUNCIEUC +0xBA3E # HANGUL SYLLABLE MIEUM-EO-NIEUNHIEUH +0xBA3F # HANGUL SYLLABLE MIEUM-EO-TIKEUT +0xBA40 # HANGUL SYLLABLE MIEUM-EO-RIEUL +0xBA41 # HANGUL SYLLABLE MIEUM-EO-RIEULKIYEOK +0xBA42 # HANGUL SYLLABLE MIEUM-EO-RIEULMIEUM +0xBA43 # HANGUL SYLLABLE MIEUM-EO-RIEULPIEUP +0xBA44 # HANGUL SYLLABLE MIEUM-EO-RIEULSIOS +0xBA45 # HANGUL SYLLABLE MIEUM-EO-RIEULTHIEUTH +0xBA46 # HANGUL SYLLABLE MIEUM-EO-RIEULPHIEUPH +0xBA47 # HANGUL SYLLABLE MIEUM-EO-RIEULHIEUH +0xBA48 # HANGUL SYLLABLE MIEUM-EO-MIEUM +0xBA49 # HANGUL SYLLABLE MIEUM-EO-PIEUP +0xBA4A # HANGUL SYLLABLE MIEUM-EO-PIEUPSIOS +0xBA4B # HANGUL SYLLABLE MIEUM-EO-SIOS +0xBA4C # HANGUL SYLLABLE MIEUM-EO-SSANGSIOS +0xBA4D # HANGUL SYLLABLE MIEUM-EO-IEUNG +0xBA4E # HANGUL SYLLABLE MIEUM-EO-CIEUC +0xBA4F # HANGUL SYLLABLE MIEUM-EO-CHIEUCH +0xBA50 # HANGUL SYLLABLE MIEUM-EO-KHIEUKH +0xBA51 # HANGUL SYLLABLE MIEUM-EO-THIEUTH +0xBA52 # HANGUL SYLLABLE MIEUM-EO-PHIEUPH +0xBA53 # HANGUL SYLLABLE MIEUM-EO-HIEUH +0xBA54 # HANGUL SYLLABLE MIEUM-E +0xBA55 # HANGUL SYLLABLE MIEUM-E-KIYEOK +0xBA56 # HANGUL SYLLABLE MIEUM-E-SSANGKIYEOK +0xBA57 # HANGUL SYLLABLE MIEUM-E-KIYEOKSIOS +0xBA58 # HANGUL SYLLABLE MIEUM-E-NIEUN +0xBA59 # HANGUL SYLLABLE MIEUM-E-NIEUNCIEUC +0xBA5A # HANGUL SYLLABLE MIEUM-E-NIEUNHIEUH +0xBA5B # HANGUL SYLLABLE MIEUM-E-TIKEUT +0xBA5C # HANGUL SYLLABLE MIEUM-E-RIEUL +0xBA5D # HANGUL SYLLABLE MIEUM-E-RIEULKIYEOK +0xBA5E # HANGUL SYLLABLE MIEUM-E-RIEULMIEUM +0xBA5F # HANGUL SYLLABLE MIEUM-E-RIEULPIEUP +0xBA60 # HANGUL SYLLABLE MIEUM-E-RIEULSIOS +0xBA61 # HANGUL SYLLABLE MIEUM-E-RIEULTHIEUTH +0xBA62 # HANGUL SYLLABLE MIEUM-E-RIEULPHIEUPH +0xBA63 # HANGUL SYLLABLE MIEUM-E-RIEULHIEUH +0xBA64 # HANGUL SYLLABLE MIEUM-E-MIEUM +0xBA65 # HANGUL SYLLABLE MIEUM-E-PIEUP +0xBA66 # HANGUL SYLLABLE MIEUM-E-PIEUPSIOS +0xBA67 # HANGUL SYLLABLE MIEUM-E-SIOS +0xBA68 # HANGUL SYLLABLE MIEUM-E-SSANGSIOS +0xBA69 # HANGUL SYLLABLE MIEUM-E-IEUNG +0xBA6A # HANGUL SYLLABLE MIEUM-E-CIEUC +0xBA6B # HANGUL SYLLABLE MIEUM-E-CHIEUCH +0xBA6C # HANGUL SYLLABLE MIEUM-E-KHIEUKH +0xBA6D # HANGUL SYLLABLE MIEUM-E-THIEUTH +0xBA6E # HANGUL SYLLABLE MIEUM-E-PHIEUPH +0xBA6F # HANGUL SYLLABLE MIEUM-E-HIEUH +0xBA70 # HANGUL SYLLABLE MIEUM-YEO +0xBA71 # HANGUL SYLLABLE MIEUM-YEO-KIYEOK +0xBA72 # HANGUL SYLLABLE MIEUM-YEO-SSANGKIYEOK +0xBA73 # HANGUL SYLLABLE MIEUM-YEO-KIYEOKSIOS +0xBA74 # HANGUL SYLLABLE MIEUM-YEO-NIEUN +0xBA75 # HANGUL SYLLABLE MIEUM-YEO-NIEUNCIEUC +0xBA76 # HANGUL SYLLABLE MIEUM-YEO-NIEUNHIEUH +0xBA77 # HANGUL SYLLABLE MIEUM-YEO-TIKEUT +0xBA78 # HANGUL SYLLABLE MIEUM-YEO-RIEUL +0xBA79 # HANGUL SYLLABLE MIEUM-YEO-RIEULKIYEOK +0xBA7A # HANGUL SYLLABLE MIEUM-YEO-RIEULMIEUM +0xBA7B # HANGUL SYLLABLE MIEUM-YEO-RIEULPIEUP +0xBA7C # HANGUL SYLLABLE MIEUM-YEO-RIEULSIOS +0xBA7D # HANGUL SYLLABLE MIEUM-YEO-RIEULTHIEUTH +0xBA7E # HANGUL SYLLABLE MIEUM-YEO-RIEULPHIEUPH +0xBA7F # HANGUL SYLLABLE MIEUM-YEO-RIEULHIEUH +0xBA80 # HANGUL SYLLABLE MIEUM-YEO-MIEUM +0xBA81 # HANGUL SYLLABLE MIEUM-YEO-PIEUP +0xBA82 # HANGUL SYLLABLE MIEUM-YEO-PIEUPSIOS +0xBA83 # HANGUL SYLLABLE MIEUM-YEO-SIOS +0xBA84 # HANGUL SYLLABLE MIEUM-YEO-SSANGSIOS +0xBA85 # HANGUL SYLLABLE MIEUM-YEO-IEUNG +0xBA86 # HANGUL SYLLABLE MIEUM-YEO-CIEUC +0xBA87 # HANGUL SYLLABLE MIEUM-YEO-CHIEUCH +0xBA88 # HANGUL SYLLABLE MIEUM-YEO-KHIEUKH +0xBA89 # HANGUL SYLLABLE MIEUM-YEO-THIEUTH +0xBA8A # HANGUL SYLLABLE MIEUM-YEO-PHIEUPH +0xBA8B # HANGUL SYLLABLE MIEUM-YEO-HIEUH +0xBA8C # HANGUL SYLLABLE MIEUM-YE +0xBA8D # HANGUL SYLLABLE MIEUM-YE-KIYEOK +0xBA8E # HANGUL SYLLABLE MIEUM-YE-SSANGKIYEOK +0xBA8F # HANGUL SYLLABLE MIEUM-YE-KIYEOKSIOS +0xBA90 # HANGUL SYLLABLE MIEUM-YE-NIEUN +0xBA91 # HANGUL SYLLABLE MIEUM-YE-NIEUNCIEUC +0xBA92 # HANGUL SYLLABLE MIEUM-YE-NIEUNHIEUH +0xBA93 # HANGUL SYLLABLE MIEUM-YE-TIKEUT +0xBA94 # HANGUL SYLLABLE MIEUM-YE-RIEUL +0xBA95 # HANGUL SYLLABLE MIEUM-YE-RIEULKIYEOK +0xBA96 # HANGUL SYLLABLE MIEUM-YE-RIEULMIEUM +0xBA97 # HANGUL SYLLABLE MIEUM-YE-RIEULPIEUP +0xBA98 # HANGUL SYLLABLE MIEUM-YE-RIEULSIOS +0xBA99 # HANGUL SYLLABLE MIEUM-YE-RIEULTHIEUTH +0xBA9A # HANGUL SYLLABLE MIEUM-YE-RIEULPHIEUPH +0xBA9B # HANGUL SYLLABLE MIEUM-YE-RIEULHIEUH +0xBA9C # HANGUL SYLLABLE MIEUM-YE-MIEUM +0xBA9D # HANGUL SYLLABLE MIEUM-YE-PIEUP +0xBA9E # HANGUL SYLLABLE MIEUM-YE-PIEUPSIOS +0xBA9F # HANGUL SYLLABLE MIEUM-YE-SIOS +0xBAA0 # HANGUL SYLLABLE MIEUM-YE-SSANGSIOS +0xBAA1 # HANGUL SYLLABLE MIEUM-YE-IEUNG +0xBAA2 # HANGUL SYLLABLE MIEUM-YE-CIEUC +0xBAA3 # HANGUL SYLLABLE MIEUM-YE-CHIEUCH +0xBAA4 # HANGUL SYLLABLE MIEUM-YE-KHIEUKH +0xBAA5 # HANGUL SYLLABLE MIEUM-YE-THIEUTH +0xBAA6 # HANGUL SYLLABLE MIEUM-YE-PHIEUPH +0xBAA7 # HANGUL SYLLABLE MIEUM-YE-HIEUH +0xBAA8 # HANGUL SYLLABLE MIEUM-O +0xBAA9 # HANGUL SYLLABLE MIEUM-O-KIYEOK +0xBAAA # HANGUL SYLLABLE MIEUM-O-SSANGKIYEOK +0xBAAB # HANGUL SYLLABLE MIEUM-O-KIYEOKSIOS +0xBAAC # HANGUL SYLLABLE MIEUM-O-NIEUN +0xBAAD # HANGUL SYLLABLE MIEUM-O-NIEUNCIEUC +0xBAAE # HANGUL SYLLABLE MIEUM-O-NIEUNHIEUH +0xBAAF # HANGUL SYLLABLE MIEUM-O-TIKEUT +0xBAB0 # HANGUL SYLLABLE MIEUM-O-RIEUL +0xBAB1 # HANGUL SYLLABLE MIEUM-O-RIEULKIYEOK +0xBAB2 # HANGUL SYLLABLE MIEUM-O-RIEULMIEUM +0xBAB3 # HANGUL SYLLABLE MIEUM-O-RIEULPIEUP +0xBAB4 # HANGUL SYLLABLE MIEUM-O-RIEULSIOS +0xBAB5 # HANGUL SYLLABLE MIEUM-O-RIEULTHIEUTH +0xBAB6 # HANGUL SYLLABLE MIEUM-O-RIEULPHIEUPH +0xBAB7 # HANGUL SYLLABLE MIEUM-O-RIEULHIEUH +0xBAB8 # HANGUL SYLLABLE MIEUM-O-MIEUM +0xBAB9 # HANGUL SYLLABLE MIEUM-O-PIEUP +0xBABA # HANGUL SYLLABLE MIEUM-O-PIEUPSIOS +0xBABB # HANGUL SYLLABLE MIEUM-O-SIOS +0xBABC # HANGUL SYLLABLE MIEUM-O-SSANGSIOS +0xBABD # HANGUL SYLLABLE MIEUM-O-IEUNG +0xBABE # HANGUL SYLLABLE MIEUM-O-CIEUC +0xBABF # HANGUL SYLLABLE MIEUM-O-CHIEUCH +0xBAC0 # HANGUL SYLLABLE MIEUM-O-KHIEUKH +0xBAC1 # HANGUL SYLLABLE MIEUM-O-THIEUTH +0xBAC2 # HANGUL SYLLABLE MIEUM-O-PHIEUPH +0xBAC3 # HANGUL SYLLABLE MIEUM-O-HIEUH +0xBAC4 # HANGUL SYLLABLE MIEUM-WA +0xBAC5 # HANGUL SYLLABLE MIEUM-WA-KIYEOK +0xBAC6 # HANGUL SYLLABLE MIEUM-WA-SSANGKIYEOK +0xBAC7 # HANGUL SYLLABLE MIEUM-WA-KIYEOKSIOS +0xBAC8 # HANGUL SYLLABLE MIEUM-WA-NIEUN +0xBAC9 # HANGUL SYLLABLE MIEUM-WA-NIEUNCIEUC +0xBACA # HANGUL SYLLABLE MIEUM-WA-NIEUNHIEUH +0xBACB # HANGUL SYLLABLE MIEUM-WA-TIKEUT +0xBACC # HANGUL SYLLABLE MIEUM-WA-RIEUL +0xBACD # HANGUL SYLLABLE MIEUM-WA-RIEULKIYEOK +0xBACE # HANGUL SYLLABLE MIEUM-WA-RIEULMIEUM +0xBACF # HANGUL SYLLABLE MIEUM-WA-RIEULPIEUP +0xBAD0 # HANGUL SYLLABLE MIEUM-WA-RIEULSIOS +0xBAD1 # HANGUL SYLLABLE MIEUM-WA-RIEULTHIEUTH +0xBAD2 # HANGUL SYLLABLE MIEUM-WA-RIEULPHIEUPH +0xBAD3 # HANGUL SYLLABLE MIEUM-WA-RIEULHIEUH +0xBAD4 # HANGUL SYLLABLE MIEUM-WA-MIEUM +0xBAD5 # HANGUL SYLLABLE MIEUM-WA-PIEUP +0xBAD6 # HANGUL SYLLABLE MIEUM-WA-PIEUPSIOS +0xBAD7 # HANGUL SYLLABLE MIEUM-WA-SIOS +0xBAD8 # HANGUL SYLLABLE MIEUM-WA-SSANGSIOS +0xBAD9 # HANGUL SYLLABLE MIEUM-WA-IEUNG +0xBADA # HANGUL SYLLABLE MIEUM-WA-CIEUC +0xBADB # HANGUL SYLLABLE MIEUM-WA-CHIEUCH +0xBADC # HANGUL SYLLABLE MIEUM-WA-KHIEUKH +0xBADD # HANGUL SYLLABLE MIEUM-WA-THIEUTH +0xBADE # HANGUL SYLLABLE MIEUM-WA-PHIEUPH +0xBADF # HANGUL SYLLABLE MIEUM-WA-HIEUH +0xBAE0 # HANGUL SYLLABLE MIEUM-WAE +0xBAE1 # HANGUL SYLLABLE MIEUM-WAE-KIYEOK +0xBAE2 # HANGUL SYLLABLE MIEUM-WAE-SSANGKIYEOK +0xBAE3 # HANGUL SYLLABLE MIEUM-WAE-KIYEOKSIOS +0xBAE4 # HANGUL SYLLABLE MIEUM-WAE-NIEUN +0xBAE5 # HANGUL SYLLABLE MIEUM-WAE-NIEUNCIEUC +0xBAE6 # HANGUL SYLLABLE MIEUM-WAE-NIEUNHIEUH +0xBAE7 # HANGUL SYLLABLE MIEUM-WAE-TIKEUT +0xBAE8 # HANGUL SYLLABLE MIEUM-WAE-RIEUL +0xBAE9 # HANGUL SYLLABLE MIEUM-WAE-RIEULKIYEOK +0xBAEA # HANGUL SYLLABLE MIEUM-WAE-RIEULMIEUM +0xBAEB # HANGUL SYLLABLE MIEUM-WAE-RIEULPIEUP +0xBAEC # HANGUL SYLLABLE MIEUM-WAE-RIEULSIOS +0xBAED # HANGUL SYLLABLE MIEUM-WAE-RIEULTHIEUTH +0xBAEE # HANGUL SYLLABLE MIEUM-WAE-RIEULPHIEUPH +0xBAEF # HANGUL SYLLABLE MIEUM-WAE-RIEULHIEUH +0xBAF0 # HANGUL SYLLABLE MIEUM-WAE-MIEUM +0xBAF1 # HANGUL SYLLABLE MIEUM-WAE-PIEUP +0xBAF2 # HANGUL SYLLABLE MIEUM-WAE-PIEUPSIOS +0xBAF3 # HANGUL SYLLABLE MIEUM-WAE-SIOS +0xBAF4 # HANGUL SYLLABLE MIEUM-WAE-SSANGSIOS +0xBAF5 # HANGUL SYLLABLE MIEUM-WAE-IEUNG +0xBAF6 # HANGUL SYLLABLE MIEUM-WAE-CIEUC +0xBAF7 # HANGUL SYLLABLE MIEUM-WAE-CHIEUCH +0xBAF8 # HANGUL SYLLABLE MIEUM-WAE-KHIEUKH +0xBAF9 # HANGUL SYLLABLE MIEUM-WAE-THIEUTH +0xBAFA # HANGUL SYLLABLE MIEUM-WAE-PHIEUPH +0xBAFB # HANGUL SYLLABLE MIEUM-WAE-HIEUH +0xBAFC # HANGUL SYLLABLE MIEUM-OE +0xBAFD # HANGUL SYLLABLE MIEUM-OE-KIYEOK +0xBAFE # HANGUL SYLLABLE MIEUM-OE-SSANGKIYEOK +0xBAFF # HANGUL SYLLABLE MIEUM-OE-KIYEOKSIOS +0xBB00 # HANGUL SYLLABLE MIEUM-OE-NIEUN +0xBB01 # HANGUL SYLLABLE MIEUM-OE-NIEUNCIEUC +0xBB02 # HANGUL SYLLABLE MIEUM-OE-NIEUNHIEUH +0xBB03 # HANGUL SYLLABLE MIEUM-OE-TIKEUT +0xBB04 # HANGUL SYLLABLE MIEUM-OE-RIEUL +0xBB05 # HANGUL SYLLABLE MIEUM-OE-RIEULKIYEOK +0xBB06 # HANGUL SYLLABLE MIEUM-OE-RIEULMIEUM +0xBB07 # HANGUL SYLLABLE MIEUM-OE-RIEULPIEUP +0xBB08 # HANGUL SYLLABLE MIEUM-OE-RIEULSIOS +0xBB09 # HANGUL SYLLABLE MIEUM-OE-RIEULTHIEUTH +0xBB0A # HANGUL SYLLABLE MIEUM-OE-RIEULPHIEUPH +0xBB0B # HANGUL SYLLABLE MIEUM-OE-RIEULHIEUH +0xBB0C # HANGUL SYLLABLE MIEUM-OE-MIEUM +0xBB0D # HANGUL SYLLABLE MIEUM-OE-PIEUP +0xBB0E # HANGUL SYLLABLE MIEUM-OE-PIEUPSIOS +0xBB0F # HANGUL SYLLABLE MIEUM-OE-SIOS +0xBB10 # HANGUL SYLLABLE MIEUM-OE-SSANGSIOS +0xBB11 # HANGUL SYLLABLE MIEUM-OE-IEUNG +0xBB12 # HANGUL SYLLABLE MIEUM-OE-CIEUC +0xBB13 # HANGUL SYLLABLE MIEUM-OE-CHIEUCH +0xBB14 # HANGUL SYLLABLE MIEUM-OE-KHIEUKH +0xBB15 # HANGUL SYLLABLE MIEUM-OE-THIEUTH +0xBB16 # HANGUL SYLLABLE MIEUM-OE-PHIEUPH +0xBB17 # HANGUL SYLLABLE MIEUM-OE-HIEUH +0xBB18 # HANGUL SYLLABLE MIEUM-YO +0xBB19 # HANGUL SYLLABLE MIEUM-YO-KIYEOK +0xBB1A # HANGUL SYLLABLE MIEUM-YO-SSANGKIYEOK +0xBB1B # HANGUL SYLLABLE MIEUM-YO-KIYEOKSIOS +0xBB1C # HANGUL SYLLABLE MIEUM-YO-NIEUN +0xBB1D # HANGUL SYLLABLE MIEUM-YO-NIEUNCIEUC +0xBB1E # HANGUL SYLLABLE MIEUM-YO-NIEUNHIEUH +0xBB1F # HANGUL SYLLABLE MIEUM-YO-TIKEUT +0xBB20 # HANGUL SYLLABLE MIEUM-YO-RIEUL +0xBB21 # HANGUL SYLLABLE MIEUM-YO-RIEULKIYEOK +0xBB22 # HANGUL SYLLABLE MIEUM-YO-RIEULMIEUM +0xBB23 # HANGUL SYLLABLE MIEUM-YO-RIEULPIEUP +0xBB24 # HANGUL SYLLABLE MIEUM-YO-RIEULSIOS +0xBB25 # HANGUL SYLLABLE MIEUM-YO-RIEULTHIEUTH +0xBB26 # HANGUL SYLLABLE MIEUM-YO-RIEULPHIEUPH +0xBB27 # HANGUL SYLLABLE MIEUM-YO-RIEULHIEUH +0xBB28 # HANGUL SYLLABLE MIEUM-YO-MIEUM +0xBB29 # HANGUL SYLLABLE MIEUM-YO-PIEUP +0xBB2A # HANGUL SYLLABLE MIEUM-YO-PIEUPSIOS +0xBB2B # HANGUL SYLLABLE MIEUM-YO-SIOS +0xBB2C # HANGUL SYLLABLE MIEUM-YO-SSANGSIOS +0xBB2D # HANGUL SYLLABLE MIEUM-YO-IEUNG +0xBB2E # HANGUL SYLLABLE MIEUM-YO-CIEUC +0xBB2F # HANGUL SYLLABLE MIEUM-YO-CHIEUCH +0xBB30 # HANGUL SYLLABLE MIEUM-YO-KHIEUKH +0xBB31 # HANGUL SYLLABLE MIEUM-YO-THIEUTH +0xBB32 # HANGUL SYLLABLE MIEUM-YO-PHIEUPH +0xBB33 # HANGUL SYLLABLE MIEUM-YO-HIEUH +0xBB34 # HANGUL SYLLABLE MIEUM-U +0xBB35 # HANGUL SYLLABLE MIEUM-U-KIYEOK +0xBB36 # HANGUL SYLLABLE MIEUM-U-SSANGKIYEOK +0xBB37 # HANGUL SYLLABLE MIEUM-U-KIYEOKSIOS +0xBB38 # HANGUL SYLLABLE MIEUM-U-NIEUN +0xBB39 # HANGUL SYLLABLE MIEUM-U-NIEUNCIEUC +0xBB3A # HANGUL SYLLABLE MIEUM-U-NIEUNHIEUH +0xBB3B # HANGUL SYLLABLE MIEUM-U-TIKEUT +0xBB3C # HANGUL SYLLABLE MIEUM-U-RIEUL +0xBB3D # HANGUL SYLLABLE MIEUM-U-RIEULKIYEOK +0xBB3E # HANGUL SYLLABLE MIEUM-U-RIEULMIEUM +0xBB3F # HANGUL SYLLABLE MIEUM-U-RIEULPIEUP +0xBB40 # HANGUL SYLLABLE MIEUM-U-RIEULSIOS +0xBB41 # HANGUL SYLLABLE MIEUM-U-RIEULTHIEUTH +0xBB42 # HANGUL SYLLABLE MIEUM-U-RIEULPHIEUPH +0xBB43 # HANGUL SYLLABLE MIEUM-U-RIEULHIEUH +0xBB44 # HANGUL SYLLABLE MIEUM-U-MIEUM +0xBB45 # HANGUL SYLLABLE MIEUM-U-PIEUP +0xBB46 # HANGUL SYLLABLE MIEUM-U-PIEUPSIOS +0xBB47 # HANGUL SYLLABLE MIEUM-U-SIOS +0xBB48 # HANGUL SYLLABLE MIEUM-U-SSANGSIOS +0xBB49 # HANGUL SYLLABLE MIEUM-U-IEUNG +0xBB4A # HANGUL SYLLABLE MIEUM-U-CIEUC +0xBB4B # HANGUL SYLLABLE MIEUM-U-CHIEUCH +0xBB4C # HANGUL SYLLABLE MIEUM-U-KHIEUKH +0xBB4D # HANGUL SYLLABLE MIEUM-U-THIEUTH +0xBB4E # HANGUL SYLLABLE MIEUM-U-PHIEUPH +0xBB4F # HANGUL SYLLABLE MIEUM-U-HIEUH +0xBB50 # HANGUL SYLLABLE MIEUM-WEO +0xBB51 # HANGUL SYLLABLE MIEUM-WEO-KIYEOK +0xBB52 # HANGUL SYLLABLE MIEUM-WEO-SSANGKIYEOK +0xBB53 # HANGUL SYLLABLE MIEUM-WEO-KIYEOKSIOS +0xBB54 # HANGUL SYLLABLE MIEUM-WEO-NIEUN +0xBB55 # HANGUL SYLLABLE MIEUM-WEO-NIEUNCIEUC +0xBB56 # HANGUL SYLLABLE MIEUM-WEO-NIEUNHIEUH +0xBB57 # HANGUL SYLLABLE MIEUM-WEO-TIKEUT +0xBB58 # HANGUL SYLLABLE MIEUM-WEO-RIEUL +0xBB59 # HANGUL SYLLABLE MIEUM-WEO-RIEULKIYEOK +0xBB5A # HANGUL SYLLABLE MIEUM-WEO-RIEULMIEUM +0xBB5B # HANGUL SYLLABLE MIEUM-WEO-RIEULPIEUP +0xBB5C # HANGUL SYLLABLE MIEUM-WEO-RIEULSIOS +0xBB5D # HANGUL SYLLABLE MIEUM-WEO-RIEULTHIEUTH +0xBB5E # HANGUL SYLLABLE MIEUM-WEO-RIEULPHIEUPH +0xBB5F # HANGUL SYLLABLE MIEUM-WEO-RIEULHIEUH +0xBB60 # HANGUL SYLLABLE MIEUM-WEO-MIEUM +0xBB61 # HANGUL SYLLABLE MIEUM-WEO-PIEUP +0xBB62 # HANGUL SYLLABLE MIEUM-WEO-PIEUPSIOS +0xBB63 # HANGUL SYLLABLE MIEUM-WEO-SIOS +0xBB64 # HANGUL SYLLABLE MIEUM-WEO-SSANGSIOS +0xBB65 # HANGUL SYLLABLE MIEUM-WEO-IEUNG +0xBB66 # HANGUL SYLLABLE MIEUM-WEO-CIEUC +0xBB67 # HANGUL SYLLABLE MIEUM-WEO-CHIEUCH +0xBB68 # HANGUL SYLLABLE MIEUM-WEO-KHIEUKH +0xBB69 # HANGUL SYLLABLE MIEUM-WEO-THIEUTH +0xBB6A # HANGUL SYLLABLE MIEUM-WEO-PHIEUPH +0xBB6B # HANGUL SYLLABLE MIEUM-WEO-HIEUH +0xBB6C # HANGUL SYLLABLE MIEUM-WE +0xBB6D # HANGUL SYLLABLE MIEUM-WE-KIYEOK +0xBB6E # HANGUL SYLLABLE MIEUM-WE-SSANGKIYEOK +0xBB6F # HANGUL SYLLABLE MIEUM-WE-KIYEOKSIOS +0xBB70 # HANGUL SYLLABLE MIEUM-WE-NIEUN +0xBB71 # HANGUL SYLLABLE MIEUM-WE-NIEUNCIEUC +0xBB72 # HANGUL SYLLABLE MIEUM-WE-NIEUNHIEUH +0xBB73 # HANGUL SYLLABLE MIEUM-WE-TIKEUT +0xBB74 # HANGUL SYLLABLE MIEUM-WE-RIEUL +0xBB75 # HANGUL SYLLABLE MIEUM-WE-RIEULKIYEOK +0xBB76 # HANGUL SYLLABLE MIEUM-WE-RIEULMIEUM +0xBB77 # HANGUL SYLLABLE MIEUM-WE-RIEULPIEUP +0xBB78 # HANGUL SYLLABLE MIEUM-WE-RIEULSIOS +0xBB79 # HANGUL SYLLABLE MIEUM-WE-RIEULTHIEUTH +0xBB7A # HANGUL SYLLABLE MIEUM-WE-RIEULPHIEUPH +0xBB7B # HANGUL SYLLABLE MIEUM-WE-RIEULHIEUH +0xBB7C # HANGUL SYLLABLE MIEUM-WE-MIEUM +0xBB7D # HANGUL SYLLABLE MIEUM-WE-PIEUP +0xBB7E # HANGUL SYLLABLE MIEUM-WE-PIEUPSIOS +0xBB7F # HANGUL SYLLABLE MIEUM-WE-SIOS +0xBB80 # HANGUL SYLLABLE MIEUM-WE-SSANGSIOS +0xBB81 # HANGUL SYLLABLE MIEUM-WE-IEUNG +0xBB82 # HANGUL SYLLABLE MIEUM-WE-CIEUC +0xBB83 # HANGUL SYLLABLE MIEUM-WE-CHIEUCH +0xBB84 # HANGUL SYLLABLE MIEUM-WE-KHIEUKH +0xBB85 # HANGUL SYLLABLE MIEUM-WE-THIEUTH +0xBB86 # HANGUL SYLLABLE MIEUM-WE-PHIEUPH +0xBB87 # HANGUL SYLLABLE MIEUM-WE-HIEUH +0xBB88 # HANGUL SYLLABLE MIEUM-WI +0xBB89 # HANGUL SYLLABLE MIEUM-WI-KIYEOK +0xBB8A # HANGUL SYLLABLE MIEUM-WI-SSANGKIYEOK +0xBB8B # HANGUL SYLLABLE MIEUM-WI-KIYEOKSIOS +0xBB8C # HANGUL SYLLABLE MIEUM-WI-NIEUN +0xBB8D # HANGUL SYLLABLE MIEUM-WI-NIEUNCIEUC +0xBB8E # HANGUL SYLLABLE MIEUM-WI-NIEUNHIEUH +0xBB8F # HANGUL SYLLABLE MIEUM-WI-TIKEUT +0xBB90 # HANGUL SYLLABLE MIEUM-WI-RIEUL +0xBB91 # HANGUL SYLLABLE MIEUM-WI-RIEULKIYEOK +0xBB92 # HANGUL SYLLABLE MIEUM-WI-RIEULMIEUM +0xBB93 # HANGUL SYLLABLE MIEUM-WI-RIEULPIEUP +0xBB94 # HANGUL SYLLABLE MIEUM-WI-RIEULSIOS +0xBB95 # HANGUL SYLLABLE MIEUM-WI-RIEULTHIEUTH +0xBB96 # HANGUL SYLLABLE MIEUM-WI-RIEULPHIEUPH +0xBB97 # HANGUL SYLLABLE MIEUM-WI-RIEULHIEUH +0xBB98 # HANGUL SYLLABLE MIEUM-WI-MIEUM +0xBB99 # HANGUL SYLLABLE MIEUM-WI-PIEUP +0xBB9A # HANGUL SYLLABLE MIEUM-WI-PIEUPSIOS +0xBB9B # HANGUL SYLLABLE MIEUM-WI-SIOS +0xBB9C # HANGUL SYLLABLE MIEUM-WI-SSANGSIOS +0xBB9D # HANGUL SYLLABLE MIEUM-WI-IEUNG +0xBB9E # HANGUL SYLLABLE MIEUM-WI-CIEUC +0xBB9F # HANGUL SYLLABLE MIEUM-WI-CHIEUCH +0xBBA0 # HANGUL SYLLABLE MIEUM-WI-KHIEUKH +0xBBA1 # HANGUL SYLLABLE MIEUM-WI-THIEUTH +0xBBA2 # HANGUL SYLLABLE MIEUM-WI-PHIEUPH +0xBBA3 # HANGUL SYLLABLE MIEUM-WI-HIEUH +0xBBA4 # HANGUL SYLLABLE MIEUM-YU +0xBBA5 # HANGUL SYLLABLE MIEUM-YU-KIYEOK +0xBBA6 # HANGUL SYLLABLE MIEUM-YU-SSANGKIYEOK +0xBBA7 # HANGUL SYLLABLE MIEUM-YU-KIYEOKSIOS +0xBBA8 # HANGUL SYLLABLE MIEUM-YU-NIEUN +0xBBA9 # HANGUL SYLLABLE MIEUM-YU-NIEUNCIEUC +0xBBAA # HANGUL SYLLABLE MIEUM-YU-NIEUNHIEUH +0xBBAB # HANGUL SYLLABLE MIEUM-YU-TIKEUT +0xBBAC # HANGUL SYLLABLE MIEUM-YU-RIEUL +0xBBAD # HANGUL SYLLABLE MIEUM-YU-RIEULKIYEOK +0xBBAE # HANGUL SYLLABLE MIEUM-YU-RIEULMIEUM +0xBBAF # HANGUL SYLLABLE MIEUM-YU-RIEULPIEUP +0xBBB0 # HANGUL SYLLABLE MIEUM-YU-RIEULSIOS +0xBBB1 # HANGUL SYLLABLE MIEUM-YU-RIEULTHIEUTH +0xBBB2 # HANGUL SYLLABLE MIEUM-YU-RIEULPHIEUPH +0xBBB3 # HANGUL SYLLABLE MIEUM-YU-RIEULHIEUH +0xBBB4 # HANGUL SYLLABLE MIEUM-YU-MIEUM +0xBBB5 # HANGUL SYLLABLE MIEUM-YU-PIEUP +0xBBB6 # HANGUL SYLLABLE MIEUM-YU-PIEUPSIOS +0xBBB7 # HANGUL SYLLABLE MIEUM-YU-SIOS +0xBBB8 # HANGUL SYLLABLE MIEUM-YU-SSANGSIOS +0xBBB9 # HANGUL SYLLABLE MIEUM-YU-IEUNG +0xBBBA # HANGUL SYLLABLE MIEUM-YU-CIEUC +0xBBBB # HANGUL SYLLABLE MIEUM-YU-CHIEUCH +0xBBBC # HANGUL SYLLABLE MIEUM-YU-KHIEUKH +0xBBBD # HANGUL SYLLABLE MIEUM-YU-THIEUTH +0xBBBE # HANGUL SYLLABLE MIEUM-YU-PHIEUPH +0xBBBF # HANGUL SYLLABLE MIEUM-YU-HIEUH +0xBBC0 # HANGUL SYLLABLE MIEUM-EU +0xBBC1 # HANGUL SYLLABLE MIEUM-EU-KIYEOK +0xBBC2 # HANGUL SYLLABLE MIEUM-EU-SSANGKIYEOK +0xBBC3 # HANGUL SYLLABLE MIEUM-EU-KIYEOKSIOS +0xBBC4 # HANGUL SYLLABLE MIEUM-EU-NIEUN +0xBBC5 # HANGUL SYLLABLE MIEUM-EU-NIEUNCIEUC +0xBBC6 # HANGUL SYLLABLE MIEUM-EU-NIEUNHIEUH +0xBBC7 # HANGUL SYLLABLE MIEUM-EU-TIKEUT +0xBBC8 # HANGUL SYLLABLE MIEUM-EU-RIEUL +0xBBC9 # HANGUL SYLLABLE MIEUM-EU-RIEULKIYEOK +0xBBCA # HANGUL SYLLABLE MIEUM-EU-RIEULMIEUM +0xBBCB # HANGUL SYLLABLE MIEUM-EU-RIEULPIEUP +0xBBCC # HANGUL SYLLABLE MIEUM-EU-RIEULSIOS +0xBBCD # HANGUL SYLLABLE MIEUM-EU-RIEULTHIEUTH +0xBBCE # HANGUL SYLLABLE MIEUM-EU-RIEULPHIEUPH +0xBBCF # HANGUL SYLLABLE MIEUM-EU-RIEULHIEUH +0xBBD0 # HANGUL SYLLABLE MIEUM-EU-MIEUM +0xBBD1 # HANGUL SYLLABLE MIEUM-EU-PIEUP +0xBBD2 # HANGUL SYLLABLE MIEUM-EU-PIEUPSIOS +0xBBD3 # HANGUL SYLLABLE MIEUM-EU-SIOS +0xBBD4 # HANGUL SYLLABLE MIEUM-EU-SSANGSIOS +0xBBD5 # HANGUL SYLLABLE MIEUM-EU-IEUNG +0xBBD6 # HANGUL SYLLABLE MIEUM-EU-CIEUC +0xBBD7 # HANGUL SYLLABLE MIEUM-EU-CHIEUCH +0xBBD8 # HANGUL SYLLABLE MIEUM-EU-KHIEUKH +0xBBD9 # HANGUL SYLLABLE MIEUM-EU-THIEUTH +0xBBDA # HANGUL SYLLABLE MIEUM-EU-PHIEUPH +0xBBDB # HANGUL SYLLABLE MIEUM-EU-HIEUH +0xBBDC # HANGUL SYLLABLE MIEUM-YI +0xBBDD # HANGUL SYLLABLE MIEUM-YI-KIYEOK +0xBBDE # HANGUL SYLLABLE MIEUM-YI-SSANGKIYEOK +0xBBDF # HANGUL SYLLABLE MIEUM-YI-KIYEOKSIOS +0xBBE0 # HANGUL SYLLABLE MIEUM-YI-NIEUN +0xBBE1 # HANGUL SYLLABLE MIEUM-YI-NIEUNCIEUC +0xBBE2 # HANGUL SYLLABLE MIEUM-YI-NIEUNHIEUH +0xBBE3 # HANGUL SYLLABLE MIEUM-YI-TIKEUT +0xBBE4 # HANGUL SYLLABLE MIEUM-YI-RIEUL +0xBBE5 # HANGUL SYLLABLE MIEUM-YI-RIEULKIYEOK +0xBBE6 # HANGUL SYLLABLE MIEUM-YI-RIEULMIEUM +0xBBE7 # HANGUL SYLLABLE MIEUM-YI-RIEULPIEUP +0xBBE8 # HANGUL SYLLABLE MIEUM-YI-RIEULSIOS +0xBBE9 # HANGUL SYLLABLE MIEUM-YI-RIEULTHIEUTH +0xBBEA # HANGUL SYLLABLE MIEUM-YI-RIEULPHIEUPH +0xBBEB # HANGUL SYLLABLE MIEUM-YI-RIEULHIEUH +0xBBEC # HANGUL SYLLABLE MIEUM-YI-MIEUM +0xBBED # HANGUL SYLLABLE MIEUM-YI-PIEUP +0xBBEE # HANGUL SYLLABLE MIEUM-YI-PIEUPSIOS +0xBBEF # HANGUL SYLLABLE MIEUM-YI-SIOS +0xBBF0 # HANGUL SYLLABLE MIEUM-YI-SSANGSIOS +0xBBF1 # HANGUL SYLLABLE MIEUM-YI-IEUNG +0xBBF2 # HANGUL SYLLABLE MIEUM-YI-CIEUC +0xBBF3 # HANGUL SYLLABLE MIEUM-YI-CHIEUCH +0xBBF4 # HANGUL SYLLABLE MIEUM-YI-KHIEUKH +0xBBF5 # HANGUL SYLLABLE MIEUM-YI-THIEUTH +0xBBF6 # HANGUL SYLLABLE MIEUM-YI-PHIEUPH +0xBBF7 # HANGUL SYLLABLE MIEUM-YI-HIEUH +0xBBF8 # HANGUL SYLLABLE MIEUM-I +0xBBF9 # HANGUL SYLLABLE MIEUM-I-KIYEOK +0xBBFA # HANGUL SYLLABLE MIEUM-I-SSANGKIYEOK +0xBBFB # HANGUL SYLLABLE MIEUM-I-KIYEOKSIOS +0xBBFC # HANGUL SYLLABLE MIEUM-I-NIEUN +0xBBFD # HANGUL SYLLABLE MIEUM-I-NIEUNCIEUC +0xBBFE # HANGUL SYLLABLE MIEUM-I-NIEUNHIEUH +0xBBFF # HANGUL SYLLABLE MIEUM-I-TIKEUT +0xBC00 # HANGUL SYLLABLE MIEUM-I-RIEUL +0xBC01 # HANGUL SYLLABLE MIEUM-I-RIEULKIYEOK +0xBC02 # HANGUL SYLLABLE MIEUM-I-RIEULMIEUM +0xBC03 # HANGUL SYLLABLE MIEUM-I-RIEULPIEUP +0xBC04 # HANGUL SYLLABLE MIEUM-I-RIEULSIOS +0xBC05 # HANGUL SYLLABLE MIEUM-I-RIEULTHIEUTH +0xBC06 # HANGUL SYLLABLE MIEUM-I-RIEULPHIEUPH +0xBC07 # HANGUL SYLLABLE MIEUM-I-RIEULHIEUH +0xBC08 # HANGUL SYLLABLE MIEUM-I-MIEUM +0xBC09 # HANGUL SYLLABLE MIEUM-I-PIEUP +0xBC0A # HANGUL SYLLABLE MIEUM-I-PIEUPSIOS +0xBC0B # HANGUL SYLLABLE MIEUM-I-SIOS +0xBC0C # HANGUL SYLLABLE MIEUM-I-SSANGSIOS +0xBC0D # HANGUL SYLLABLE MIEUM-I-IEUNG +0xBC0E # HANGUL SYLLABLE MIEUM-I-CIEUC +0xBC0F # HANGUL SYLLABLE MIEUM-I-CHIEUCH +0xBC10 # HANGUL SYLLABLE MIEUM-I-KHIEUKH +0xBC11 # HANGUL SYLLABLE MIEUM-I-THIEUTH +0xBC12 # HANGUL SYLLABLE MIEUM-I-PHIEUPH +0xBC13 # HANGUL SYLLABLE MIEUM-I-HIEUH +0xBC14 # HANGUL SYLLABLE PIEUP-A +0xBC15 # HANGUL SYLLABLE PIEUP-A-KIYEOK +0xBC16 # HANGUL SYLLABLE PIEUP-A-SSANGKIYEOK +0xBC17 # HANGUL SYLLABLE PIEUP-A-KIYEOKSIOS +0xBC18 # HANGUL SYLLABLE PIEUP-A-NIEUN +0xBC19 # HANGUL SYLLABLE PIEUP-A-NIEUNCIEUC +0xBC1A # HANGUL SYLLABLE PIEUP-A-NIEUNHIEUH +0xBC1B # HANGUL SYLLABLE PIEUP-A-TIKEUT +0xBC1C # HANGUL SYLLABLE PIEUP-A-RIEUL +0xBC1D # HANGUL SYLLABLE PIEUP-A-RIEULKIYEOK +0xBC1E # HANGUL SYLLABLE PIEUP-A-RIEULMIEUM +0xBC1F # HANGUL SYLLABLE PIEUP-A-RIEULPIEUP +0xBC20 # HANGUL SYLLABLE PIEUP-A-RIEULSIOS +0xBC21 # HANGUL SYLLABLE PIEUP-A-RIEULTHIEUTH +0xBC22 # HANGUL SYLLABLE PIEUP-A-RIEULPHIEUPH +0xBC23 # HANGUL SYLLABLE PIEUP-A-RIEULHIEUH +0xBC24 # HANGUL SYLLABLE PIEUP-A-MIEUM +0xBC25 # HANGUL SYLLABLE PIEUP-A-PIEUP +0xBC26 # HANGUL SYLLABLE PIEUP-A-PIEUPSIOS +0xBC27 # HANGUL SYLLABLE PIEUP-A-SIOS +0xBC28 # HANGUL SYLLABLE PIEUP-A-SSANGSIOS +0xBC29 # HANGUL SYLLABLE PIEUP-A-IEUNG +0xBC2A # HANGUL SYLLABLE PIEUP-A-CIEUC +0xBC2B # HANGUL SYLLABLE PIEUP-A-CHIEUCH +0xBC2C # HANGUL SYLLABLE PIEUP-A-KHIEUKH +0xBC2D # HANGUL SYLLABLE PIEUP-A-THIEUTH +0xBC2E # HANGUL SYLLABLE PIEUP-A-PHIEUPH +0xBC2F # HANGUL SYLLABLE PIEUP-A-HIEUH +0xBC30 # HANGUL SYLLABLE PIEUP-AE +0xBC31 # HANGUL SYLLABLE PIEUP-AE-KIYEOK +0xBC32 # HANGUL SYLLABLE PIEUP-AE-SSANGKIYEOK +0xBC33 # HANGUL SYLLABLE PIEUP-AE-KIYEOKSIOS +0xBC34 # HANGUL SYLLABLE PIEUP-AE-NIEUN +0xBC35 # HANGUL SYLLABLE PIEUP-AE-NIEUNCIEUC +0xBC36 # HANGUL SYLLABLE PIEUP-AE-NIEUNHIEUH +0xBC37 # HANGUL SYLLABLE PIEUP-AE-TIKEUT +0xBC38 # HANGUL SYLLABLE PIEUP-AE-RIEUL +0xBC39 # HANGUL SYLLABLE PIEUP-AE-RIEULKIYEOK +0xBC3A # HANGUL SYLLABLE PIEUP-AE-RIEULMIEUM +0xBC3B # HANGUL SYLLABLE PIEUP-AE-RIEULPIEUP +0xBC3C # HANGUL SYLLABLE PIEUP-AE-RIEULSIOS +0xBC3D # HANGUL SYLLABLE PIEUP-AE-RIEULTHIEUTH +0xBC3E # HANGUL SYLLABLE PIEUP-AE-RIEULPHIEUPH +0xBC3F # HANGUL SYLLABLE PIEUP-AE-RIEULHIEUH +0xBC40 # HANGUL SYLLABLE PIEUP-AE-MIEUM +0xBC41 # HANGUL SYLLABLE PIEUP-AE-PIEUP +0xBC42 # HANGUL SYLLABLE PIEUP-AE-PIEUPSIOS +0xBC43 # HANGUL SYLLABLE PIEUP-AE-SIOS +0xBC44 # HANGUL SYLLABLE PIEUP-AE-SSANGSIOS +0xBC45 # HANGUL SYLLABLE PIEUP-AE-IEUNG +0xBC46 # HANGUL SYLLABLE PIEUP-AE-CIEUC +0xBC47 # HANGUL SYLLABLE PIEUP-AE-CHIEUCH +0xBC48 # HANGUL SYLLABLE PIEUP-AE-KHIEUKH +0xBC49 # HANGUL SYLLABLE PIEUP-AE-THIEUTH +0xBC4A # HANGUL SYLLABLE PIEUP-AE-PHIEUPH +0xBC4B # HANGUL SYLLABLE PIEUP-AE-HIEUH +0xBC4C # HANGUL SYLLABLE PIEUP-YA +0xBC4D # HANGUL SYLLABLE PIEUP-YA-KIYEOK +0xBC4E # HANGUL SYLLABLE PIEUP-YA-SSANGKIYEOK +0xBC4F # HANGUL SYLLABLE PIEUP-YA-KIYEOKSIOS +0xBC50 # HANGUL SYLLABLE PIEUP-YA-NIEUN +0xBC51 # HANGUL SYLLABLE PIEUP-YA-NIEUNCIEUC +0xBC52 # HANGUL SYLLABLE PIEUP-YA-NIEUNHIEUH +0xBC53 # HANGUL SYLLABLE PIEUP-YA-TIKEUT +0xBC54 # HANGUL SYLLABLE PIEUP-YA-RIEUL +0xBC55 # HANGUL SYLLABLE PIEUP-YA-RIEULKIYEOK +0xBC56 # HANGUL SYLLABLE PIEUP-YA-RIEULMIEUM +0xBC57 # HANGUL SYLLABLE PIEUP-YA-RIEULPIEUP +0xBC58 # HANGUL SYLLABLE PIEUP-YA-RIEULSIOS +0xBC59 # HANGUL SYLLABLE PIEUP-YA-RIEULTHIEUTH +0xBC5A # HANGUL SYLLABLE PIEUP-YA-RIEULPHIEUPH +0xBC5B # HANGUL SYLLABLE PIEUP-YA-RIEULHIEUH +0xBC5C # HANGUL SYLLABLE PIEUP-YA-MIEUM +0xBC5D # HANGUL SYLLABLE PIEUP-YA-PIEUP +0xBC5E # HANGUL SYLLABLE PIEUP-YA-PIEUPSIOS +0xBC5F # HANGUL SYLLABLE PIEUP-YA-SIOS +0xBC60 # HANGUL SYLLABLE PIEUP-YA-SSANGSIOS +0xBC61 # HANGUL SYLLABLE PIEUP-YA-IEUNG +0xBC62 # HANGUL SYLLABLE PIEUP-YA-CIEUC +0xBC63 # HANGUL SYLLABLE PIEUP-YA-CHIEUCH +0xBC64 # HANGUL SYLLABLE PIEUP-YA-KHIEUKH +0xBC65 # HANGUL SYLLABLE PIEUP-YA-THIEUTH +0xBC66 # HANGUL SYLLABLE PIEUP-YA-PHIEUPH +0xBC67 # HANGUL SYLLABLE PIEUP-YA-HIEUH +0xBC68 # HANGUL SYLLABLE PIEUP-YAE +0xBC69 # HANGUL SYLLABLE PIEUP-YAE-KIYEOK +0xBC6A # HANGUL SYLLABLE PIEUP-YAE-SSANGKIYEOK +0xBC6B # HANGUL SYLLABLE PIEUP-YAE-KIYEOKSIOS +0xBC6C # HANGUL SYLLABLE PIEUP-YAE-NIEUN +0xBC6D # HANGUL SYLLABLE PIEUP-YAE-NIEUNCIEUC +0xBC6E # HANGUL SYLLABLE PIEUP-YAE-NIEUNHIEUH +0xBC6F # HANGUL SYLLABLE PIEUP-YAE-TIKEUT +0xBC70 # HANGUL SYLLABLE PIEUP-YAE-RIEUL +0xBC71 # HANGUL SYLLABLE PIEUP-YAE-RIEULKIYEOK +0xBC72 # HANGUL SYLLABLE PIEUP-YAE-RIEULMIEUM +0xBC73 # HANGUL SYLLABLE PIEUP-YAE-RIEULPIEUP +0xBC74 # HANGUL SYLLABLE PIEUP-YAE-RIEULSIOS +0xBC75 # HANGUL SYLLABLE PIEUP-YAE-RIEULTHIEUTH +0xBC76 # HANGUL SYLLABLE PIEUP-YAE-RIEULPHIEUPH +0xBC77 # HANGUL SYLLABLE PIEUP-YAE-RIEULHIEUH +0xBC78 # HANGUL SYLLABLE PIEUP-YAE-MIEUM +0xBC79 # HANGUL SYLLABLE PIEUP-YAE-PIEUP +0xBC7A # HANGUL SYLLABLE PIEUP-YAE-PIEUPSIOS +0xBC7B # HANGUL SYLLABLE PIEUP-YAE-SIOS +0xBC7C # HANGUL SYLLABLE PIEUP-YAE-SSANGSIOS +0xBC7D # HANGUL SYLLABLE PIEUP-YAE-IEUNG +0xBC7E # HANGUL SYLLABLE PIEUP-YAE-CIEUC +0xBC7F # HANGUL SYLLABLE PIEUP-YAE-CHIEUCH +0xBC80 # HANGUL SYLLABLE PIEUP-YAE-KHIEUKH +0xBC81 # HANGUL SYLLABLE PIEUP-YAE-THIEUTH +0xBC82 # HANGUL SYLLABLE PIEUP-YAE-PHIEUPH +0xBC83 # HANGUL SYLLABLE PIEUP-YAE-HIEUH +0xBC84 # HANGUL SYLLABLE PIEUP-EO +0xBC85 # HANGUL SYLLABLE PIEUP-EO-KIYEOK +0xBC86 # HANGUL SYLLABLE PIEUP-EO-SSANGKIYEOK +0xBC87 # HANGUL SYLLABLE PIEUP-EO-KIYEOKSIOS +0xBC88 # HANGUL SYLLABLE PIEUP-EO-NIEUN +0xBC89 # HANGUL SYLLABLE PIEUP-EO-NIEUNCIEUC +0xBC8A # HANGUL SYLLABLE PIEUP-EO-NIEUNHIEUH +0xBC8B # HANGUL SYLLABLE PIEUP-EO-TIKEUT +0xBC8C # HANGUL SYLLABLE PIEUP-EO-RIEUL +0xBC8D # HANGUL SYLLABLE PIEUP-EO-RIEULKIYEOK +0xBC8E # HANGUL SYLLABLE PIEUP-EO-RIEULMIEUM +0xBC8F # HANGUL SYLLABLE PIEUP-EO-RIEULPIEUP +0xBC90 # HANGUL SYLLABLE PIEUP-EO-RIEULSIOS +0xBC91 # HANGUL SYLLABLE PIEUP-EO-RIEULTHIEUTH +0xBC92 # HANGUL SYLLABLE PIEUP-EO-RIEULPHIEUPH +0xBC93 # HANGUL SYLLABLE PIEUP-EO-RIEULHIEUH +0xBC94 # HANGUL SYLLABLE PIEUP-EO-MIEUM +0xBC95 # HANGUL SYLLABLE PIEUP-EO-PIEUP +0xBC96 # HANGUL SYLLABLE PIEUP-EO-PIEUPSIOS +0xBC97 # HANGUL SYLLABLE PIEUP-EO-SIOS +0xBC98 # HANGUL SYLLABLE PIEUP-EO-SSANGSIOS +0xBC99 # HANGUL SYLLABLE PIEUP-EO-IEUNG +0xBC9A # HANGUL SYLLABLE PIEUP-EO-CIEUC +0xBC9B # HANGUL SYLLABLE PIEUP-EO-CHIEUCH +0xBC9C # HANGUL SYLLABLE PIEUP-EO-KHIEUKH +0xBC9D # HANGUL SYLLABLE PIEUP-EO-THIEUTH +0xBC9E # HANGUL SYLLABLE PIEUP-EO-PHIEUPH +0xBC9F # HANGUL SYLLABLE PIEUP-EO-HIEUH +0xBCA0 # HANGUL SYLLABLE PIEUP-E +0xBCA1 # HANGUL SYLLABLE PIEUP-E-KIYEOK +0xBCA2 # HANGUL SYLLABLE PIEUP-E-SSANGKIYEOK +0xBCA3 # HANGUL SYLLABLE PIEUP-E-KIYEOKSIOS +0xBCA4 # HANGUL SYLLABLE PIEUP-E-NIEUN +0xBCA5 # HANGUL SYLLABLE PIEUP-E-NIEUNCIEUC +0xBCA6 # HANGUL SYLLABLE PIEUP-E-NIEUNHIEUH +0xBCA7 # HANGUL SYLLABLE PIEUP-E-TIKEUT +0xBCA8 # HANGUL SYLLABLE PIEUP-E-RIEUL +0xBCA9 # HANGUL SYLLABLE PIEUP-E-RIEULKIYEOK +0xBCAA # HANGUL SYLLABLE PIEUP-E-RIEULMIEUM +0xBCAB # HANGUL SYLLABLE PIEUP-E-RIEULPIEUP +0xBCAC # HANGUL SYLLABLE PIEUP-E-RIEULSIOS +0xBCAD # HANGUL SYLLABLE PIEUP-E-RIEULTHIEUTH +0xBCAE # HANGUL SYLLABLE PIEUP-E-RIEULPHIEUPH +0xBCAF # HANGUL SYLLABLE PIEUP-E-RIEULHIEUH +0xBCB0 # HANGUL SYLLABLE PIEUP-E-MIEUM +0xBCB1 # HANGUL SYLLABLE PIEUP-E-PIEUP +0xBCB2 # HANGUL SYLLABLE PIEUP-E-PIEUPSIOS +0xBCB3 # HANGUL SYLLABLE PIEUP-E-SIOS +0xBCB4 # HANGUL SYLLABLE PIEUP-E-SSANGSIOS +0xBCB5 # HANGUL SYLLABLE PIEUP-E-IEUNG +0xBCB6 # HANGUL SYLLABLE PIEUP-E-CIEUC +0xBCB7 # HANGUL SYLLABLE PIEUP-E-CHIEUCH +0xBCB8 # HANGUL SYLLABLE PIEUP-E-KHIEUKH +0xBCB9 # HANGUL SYLLABLE PIEUP-E-THIEUTH +0xBCBA # HANGUL SYLLABLE PIEUP-E-PHIEUPH +0xBCBB # HANGUL SYLLABLE PIEUP-E-HIEUH +0xBCBC # HANGUL SYLLABLE PIEUP-YEO +0xBCBD # HANGUL SYLLABLE PIEUP-YEO-KIYEOK +0xBCBE # HANGUL SYLLABLE PIEUP-YEO-SSANGKIYEOK +0xBCBF # HANGUL SYLLABLE PIEUP-YEO-KIYEOKSIOS +0xBCC0 # HANGUL SYLLABLE PIEUP-YEO-NIEUN +0xBCC1 # HANGUL SYLLABLE PIEUP-YEO-NIEUNCIEUC +0xBCC2 # HANGUL SYLLABLE PIEUP-YEO-NIEUNHIEUH +0xBCC3 # HANGUL SYLLABLE PIEUP-YEO-TIKEUT +0xBCC4 # HANGUL SYLLABLE PIEUP-YEO-RIEUL +0xBCC5 # HANGUL SYLLABLE PIEUP-YEO-RIEULKIYEOK +0xBCC6 # HANGUL SYLLABLE PIEUP-YEO-RIEULMIEUM +0xBCC7 # HANGUL SYLLABLE PIEUP-YEO-RIEULPIEUP +0xBCC8 # HANGUL SYLLABLE PIEUP-YEO-RIEULSIOS +0xBCC9 # HANGUL SYLLABLE PIEUP-YEO-RIEULTHIEUTH +0xBCCA # HANGUL SYLLABLE PIEUP-YEO-RIEULPHIEUPH +0xBCCB # HANGUL SYLLABLE PIEUP-YEO-RIEULHIEUH +0xBCCC # HANGUL SYLLABLE PIEUP-YEO-MIEUM +0xBCCD # HANGUL SYLLABLE PIEUP-YEO-PIEUP +0xBCCE # HANGUL SYLLABLE PIEUP-YEO-PIEUPSIOS +0xBCCF # HANGUL SYLLABLE PIEUP-YEO-SIOS +0xBCD0 # HANGUL SYLLABLE PIEUP-YEO-SSANGSIOS +0xBCD1 # HANGUL SYLLABLE PIEUP-YEO-IEUNG +0xBCD2 # HANGUL SYLLABLE PIEUP-YEO-CIEUC +0xBCD3 # HANGUL SYLLABLE PIEUP-YEO-CHIEUCH +0xBCD4 # HANGUL SYLLABLE PIEUP-YEO-KHIEUKH +0xBCD5 # HANGUL SYLLABLE PIEUP-YEO-THIEUTH +0xBCD6 # HANGUL SYLLABLE PIEUP-YEO-PHIEUPH +0xBCD7 # HANGUL SYLLABLE PIEUP-YEO-HIEUH +0xBCD8 # HANGUL SYLLABLE PIEUP-YE +0xBCD9 # HANGUL SYLLABLE PIEUP-YE-KIYEOK +0xBCDA # HANGUL SYLLABLE PIEUP-YE-SSANGKIYEOK +0xBCDB # HANGUL SYLLABLE PIEUP-YE-KIYEOKSIOS +0xBCDC # HANGUL SYLLABLE PIEUP-YE-NIEUN +0xBCDD # HANGUL SYLLABLE PIEUP-YE-NIEUNCIEUC +0xBCDE # HANGUL SYLLABLE PIEUP-YE-NIEUNHIEUH +0xBCDF # HANGUL SYLLABLE PIEUP-YE-TIKEUT +0xBCE0 # HANGUL SYLLABLE PIEUP-YE-RIEUL +0xBCE1 # HANGUL SYLLABLE PIEUP-YE-RIEULKIYEOK +0xBCE2 # HANGUL SYLLABLE PIEUP-YE-RIEULMIEUM +0xBCE3 # HANGUL SYLLABLE PIEUP-YE-RIEULPIEUP +0xBCE4 # HANGUL SYLLABLE PIEUP-YE-RIEULSIOS +0xBCE5 # HANGUL SYLLABLE PIEUP-YE-RIEULTHIEUTH +0xBCE6 # HANGUL SYLLABLE PIEUP-YE-RIEULPHIEUPH +0xBCE7 # HANGUL SYLLABLE PIEUP-YE-RIEULHIEUH +0xBCE8 # HANGUL SYLLABLE PIEUP-YE-MIEUM +0xBCE9 # HANGUL SYLLABLE PIEUP-YE-PIEUP +0xBCEA # HANGUL SYLLABLE PIEUP-YE-PIEUPSIOS +0xBCEB # HANGUL SYLLABLE PIEUP-YE-SIOS +0xBCEC # HANGUL SYLLABLE PIEUP-YE-SSANGSIOS +0xBCED # HANGUL SYLLABLE PIEUP-YE-IEUNG +0xBCEE # HANGUL SYLLABLE PIEUP-YE-CIEUC +0xBCEF # HANGUL SYLLABLE PIEUP-YE-CHIEUCH +0xBCF0 # HANGUL SYLLABLE PIEUP-YE-KHIEUKH +0xBCF1 # HANGUL SYLLABLE PIEUP-YE-THIEUTH +0xBCF2 # HANGUL SYLLABLE PIEUP-YE-PHIEUPH +0xBCF3 # HANGUL SYLLABLE PIEUP-YE-HIEUH +0xBCF4 # HANGUL SYLLABLE PIEUP-O +0xBCF5 # HANGUL SYLLABLE PIEUP-O-KIYEOK +0xBCF6 # HANGUL SYLLABLE PIEUP-O-SSANGKIYEOK +0xBCF7 # HANGUL SYLLABLE PIEUP-O-KIYEOKSIOS +0xBCF8 # HANGUL SYLLABLE PIEUP-O-NIEUN +0xBCF9 # HANGUL SYLLABLE PIEUP-O-NIEUNCIEUC +0xBCFA # HANGUL SYLLABLE PIEUP-O-NIEUNHIEUH +0xBCFB # HANGUL SYLLABLE PIEUP-O-TIKEUT +0xBCFC # HANGUL SYLLABLE PIEUP-O-RIEUL +0xBCFD # HANGUL SYLLABLE PIEUP-O-RIEULKIYEOK +0xBCFE # HANGUL SYLLABLE PIEUP-O-RIEULMIEUM +0xBCFF # HANGUL SYLLABLE PIEUP-O-RIEULPIEUP +0xBD00 # HANGUL SYLLABLE PIEUP-O-RIEULSIOS +0xBD01 # HANGUL SYLLABLE PIEUP-O-RIEULTHIEUTH +0xBD02 # HANGUL SYLLABLE PIEUP-O-RIEULPHIEUPH +0xBD03 # HANGUL SYLLABLE PIEUP-O-RIEULHIEUH +0xBD04 # HANGUL SYLLABLE PIEUP-O-MIEUM +0xBD05 # HANGUL SYLLABLE PIEUP-O-PIEUP +0xBD06 # HANGUL SYLLABLE PIEUP-O-PIEUPSIOS +0xBD07 # HANGUL SYLLABLE PIEUP-O-SIOS +0xBD08 # HANGUL SYLLABLE PIEUP-O-SSANGSIOS +0xBD09 # HANGUL SYLLABLE PIEUP-O-IEUNG +0xBD0A # HANGUL SYLLABLE PIEUP-O-CIEUC +0xBD0B # HANGUL SYLLABLE PIEUP-O-CHIEUCH +0xBD0C # HANGUL SYLLABLE PIEUP-O-KHIEUKH +0xBD0D # HANGUL SYLLABLE PIEUP-O-THIEUTH +0xBD0E # HANGUL SYLLABLE PIEUP-O-PHIEUPH +0xBD0F # HANGUL SYLLABLE PIEUP-O-HIEUH +0xBD10 # HANGUL SYLLABLE PIEUP-WA +0xBD11 # HANGUL SYLLABLE PIEUP-WA-KIYEOK +0xBD12 # HANGUL SYLLABLE PIEUP-WA-SSANGKIYEOK +0xBD13 # HANGUL SYLLABLE PIEUP-WA-KIYEOKSIOS +0xBD14 # HANGUL SYLLABLE PIEUP-WA-NIEUN +0xBD15 # HANGUL SYLLABLE PIEUP-WA-NIEUNCIEUC +0xBD16 # HANGUL SYLLABLE PIEUP-WA-NIEUNHIEUH +0xBD17 # HANGUL SYLLABLE PIEUP-WA-TIKEUT +0xBD18 # HANGUL SYLLABLE PIEUP-WA-RIEUL +0xBD19 # HANGUL SYLLABLE PIEUP-WA-RIEULKIYEOK +0xBD1A # HANGUL SYLLABLE PIEUP-WA-RIEULMIEUM +0xBD1B # HANGUL SYLLABLE PIEUP-WA-RIEULPIEUP +0xBD1C # HANGUL SYLLABLE PIEUP-WA-RIEULSIOS +0xBD1D # HANGUL SYLLABLE PIEUP-WA-RIEULTHIEUTH +0xBD1E # HANGUL SYLLABLE PIEUP-WA-RIEULPHIEUPH +0xBD1F # HANGUL SYLLABLE PIEUP-WA-RIEULHIEUH +0xBD20 # HANGUL SYLLABLE PIEUP-WA-MIEUM +0xBD21 # HANGUL SYLLABLE PIEUP-WA-PIEUP +0xBD22 # HANGUL SYLLABLE PIEUP-WA-PIEUPSIOS +0xBD23 # HANGUL SYLLABLE PIEUP-WA-SIOS +0xBD24 # HANGUL SYLLABLE PIEUP-WA-SSANGSIOS +0xBD25 # HANGUL SYLLABLE PIEUP-WA-IEUNG +0xBD26 # HANGUL SYLLABLE PIEUP-WA-CIEUC +0xBD27 # HANGUL SYLLABLE PIEUP-WA-CHIEUCH +0xBD28 # HANGUL SYLLABLE PIEUP-WA-KHIEUKH +0xBD29 # HANGUL SYLLABLE PIEUP-WA-THIEUTH +0xBD2A # HANGUL SYLLABLE PIEUP-WA-PHIEUPH +0xBD2B # HANGUL SYLLABLE PIEUP-WA-HIEUH +0xBD2C # HANGUL SYLLABLE PIEUP-WAE +0xBD2D # HANGUL SYLLABLE PIEUP-WAE-KIYEOK +0xBD2E # HANGUL SYLLABLE PIEUP-WAE-SSANGKIYEOK +0xBD2F # HANGUL SYLLABLE PIEUP-WAE-KIYEOKSIOS +0xBD30 # HANGUL SYLLABLE PIEUP-WAE-NIEUN +0xBD31 # HANGUL SYLLABLE PIEUP-WAE-NIEUNCIEUC +0xBD32 # HANGUL SYLLABLE PIEUP-WAE-NIEUNHIEUH +0xBD33 # HANGUL SYLLABLE PIEUP-WAE-TIKEUT +0xBD34 # HANGUL SYLLABLE PIEUP-WAE-RIEUL +0xBD35 # HANGUL SYLLABLE PIEUP-WAE-RIEULKIYEOK +0xBD36 # HANGUL SYLLABLE PIEUP-WAE-RIEULMIEUM +0xBD37 # HANGUL SYLLABLE PIEUP-WAE-RIEULPIEUP +0xBD38 # HANGUL SYLLABLE PIEUP-WAE-RIEULSIOS +0xBD39 # HANGUL SYLLABLE PIEUP-WAE-RIEULTHIEUTH +0xBD3A # HANGUL SYLLABLE PIEUP-WAE-RIEULPHIEUPH +0xBD3B # HANGUL SYLLABLE PIEUP-WAE-RIEULHIEUH +0xBD3C # HANGUL SYLLABLE PIEUP-WAE-MIEUM +0xBD3D # HANGUL SYLLABLE PIEUP-WAE-PIEUP +0xBD3E # HANGUL SYLLABLE PIEUP-WAE-PIEUPSIOS +0xBD3F # HANGUL SYLLABLE PIEUP-WAE-SIOS +0xBD40 # HANGUL SYLLABLE PIEUP-WAE-SSANGSIOS +0xBD41 # HANGUL SYLLABLE PIEUP-WAE-IEUNG +0xBD42 # HANGUL SYLLABLE PIEUP-WAE-CIEUC +0xBD43 # HANGUL SYLLABLE PIEUP-WAE-CHIEUCH +0xBD44 # HANGUL SYLLABLE PIEUP-WAE-KHIEUKH +0xBD45 # HANGUL SYLLABLE PIEUP-WAE-THIEUTH +0xBD46 # HANGUL SYLLABLE PIEUP-WAE-PHIEUPH +0xBD47 # HANGUL SYLLABLE PIEUP-WAE-HIEUH +0xBD48 # HANGUL SYLLABLE PIEUP-OE +0xBD49 # HANGUL SYLLABLE PIEUP-OE-KIYEOK +0xBD4A # HANGUL SYLLABLE PIEUP-OE-SSANGKIYEOK +0xBD4B # HANGUL SYLLABLE PIEUP-OE-KIYEOKSIOS +0xBD4C # HANGUL SYLLABLE PIEUP-OE-NIEUN +0xBD4D # HANGUL SYLLABLE PIEUP-OE-NIEUNCIEUC +0xBD4E # HANGUL SYLLABLE PIEUP-OE-NIEUNHIEUH +0xBD4F # HANGUL SYLLABLE PIEUP-OE-TIKEUT +0xBD50 # HANGUL SYLLABLE PIEUP-OE-RIEUL +0xBD51 # HANGUL SYLLABLE PIEUP-OE-RIEULKIYEOK +0xBD52 # HANGUL SYLLABLE PIEUP-OE-RIEULMIEUM +0xBD53 # HANGUL SYLLABLE PIEUP-OE-RIEULPIEUP +0xBD54 # HANGUL SYLLABLE PIEUP-OE-RIEULSIOS +0xBD55 # HANGUL SYLLABLE PIEUP-OE-RIEULTHIEUTH +0xBD56 # HANGUL SYLLABLE PIEUP-OE-RIEULPHIEUPH +0xBD57 # HANGUL SYLLABLE PIEUP-OE-RIEULHIEUH +0xBD58 # HANGUL SYLLABLE PIEUP-OE-MIEUM +0xBD59 # HANGUL SYLLABLE PIEUP-OE-PIEUP +0xBD5A # HANGUL SYLLABLE PIEUP-OE-PIEUPSIOS +0xBD5B # HANGUL SYLLABLE PIEUP-OE-SIOS +0xBD5C # HANGUL SYLLABLE PIEUP-OE-SSANGSIOS +0xBD5D # HANGUL SYLLABLE PIEUP-OE-IEUNG +0xBD5E # HANGUL SYLLABLE PIEUP-OE-CIEUC +0xBD5F # HANGUL SYLLABLE PIEUP-OE-CHIEUCH +0xBD60 # HANGUL SYLLABLE PIEUP-OE-KHIEUKH +0xBD61 # HANGUL SYLLABLE PIEUP-OE-THIEUTH +0xBD62 # HANGUL SYLLABLE PIEUP-OE-PHIEUPH +0xBD63 # HANGUL SYLLABLE PIEUP-OE-HIEUH +0xBD64 # HANGUL SYLLABLE PIEUP-YO +0xBD65 # HANGUL SYLLABLE PIEUP-YO-KIYEOK +0xBD66 # HANGUL SYLLABLE PIEUP-YO-SSANGKIYEOK +0xBD67 # HANGUL SYLLABLE PIEUP-YO-KIYEOKSIOS +0xBD68 # HANGUL SYLLABLE PIEUP-YO-NIEUN +0xBD69 # HANGUL SYLLABLE PIEUP-YO-NIEUNCIEUC +0xBD6A # HANGUL SYLLABLE PIEUP-YO-NIEUNHIEUH +0xBD6B # HANGUL SYLLABLE PIEUP-YO-TIKEUT +0xBD6C # HANGUL SYLLABLE PIEUP-YO-RIEUL +0xBD6D # HANGUL SYLLABLE PIEUP-YO-RIEULKIYEOK +0xBD6E # HANGUL SYLLABLE PIEUP-YO-RIEULMIEUM +0xBD6F # HANGUL SYLLABLE PIEUP-YO-RIEULPIEUP +0xBD70 # HANGUL SYLLABLE PIEUP-YO-RIEULSIOS +0xBD71 # HANGUL SYLLABLE PIEUP-YO-RIEULTHIEUTH +0xBD72 # HANGUL SYLLABLE PIEUP-YO-RIEULPHIEUPH +0xBD73 # HANGUL SYLLABLE PIEUP-YO-RIEULHIEUH +0xBD74 # HANGUL SYLLABLE PIEUP-YO-MIEUM +0xBD75 # HANGUL SYLLABLE PIEUP-YO-PIEUP +0xBD76 # HANGUL SYLLABLE PIEUP-YO-PIEUPSIOS +0xBD77 # HANGUL SYLLABLE PIEUP-YO-SIOS +0xBD78 # HANGUL SYLLABLE PIEUP-YO-SSANGSIOS +0xBD79 # HANGUL SYLLABLE PIEUP-YO-IEUNG +0xBD7A # HANGUL SYLLABLE PIEUP-YO-CIEUC +0xBD7B # HANGUL SYLLABLE PIEUP-YO-CHIEUCH +0xBD7C # HANGUL SYLLABLE PIEUP-YO-KHIEUKH +0xBD7D # HANGUL SYLLABLE PIEUP-YO-THIEUTH +0xBD7E # HANGUL SYLLABLE PIEUP-YO-PHIEUPH +0xBD7F # HANGUL SYLLABLE PIEUP-YO-HIEUH +0xBD80 # HANGUL SYLLABLE PIEUP-U +0xBD81 # HANGUL SYLLABLE PIEUP-U-KIYEOK +0xBD82 # HANGUL SYLLABLE PIEUP-U-SSANGKIYEOK +0xBD83 # HANGUL SYLLABLE PIEUP-U-KIYEOKSIOS +0xBD84 # HANGUL SYLLABLE PIEUP-U-NIEUN +0xBD85 # HANGUL SYLLABLE PIEUP-U-NIEUNCIEUC +0xBD86 # HANGUL SYLLABLE PIEUP-U-NIEUNHIEUH +0xBD87 # HANGUL SYLLABLE PIEUP-U-TIKEUT +0xBD88 # HANGUL SYLLABLE PIEUP-U-RIEUL +0xBD89 # HANGUL SYLLABLE PIEUP-U-RIEULKIYEOK +0xBD8A # HANGUL SYLLABLE PIEUP-U-RIEULMIEUM +0xBD8B # HANGUL SYLLABLE PIEUP-U-RIEULPIEUP +0xBD8C # HANGUL SYLLABLE PIEUP-U-RIEULSIOS +0xBD8D # HANGUL SYLLABLE PIEUP-U-RIEULTHIEUTH +0xBD8E # HANGUL SYLLABLE PIEUP-U-RIEULPHIEUPH +0xBD8F # HANGUL SYLLABLE PIEUP-U-RIEULHIEUH +0xBD90 # HANGUL SYLLABLE PIEUP-U-MIEUM +0xBD91 # HANGUL SYLLABLE PIEUP-U-PIEUP +0xBD92 # HANGUL SYLLABLE PIEUP-U-PIEUPSIOS +0xBD93 # HANGUL SYLLABLE PIEUP-U-SIOS +0xBD94 # HANGUL SYLLABLE PIEUP-U-SSANGSIOS +0xBD95 # HANGUL SYLLABLE PIEUP-U-IEUNG +0xBD96 # HANGUL SYLLABLE PIEUP-U-CIEUC +0xBD97 # HANGUL SYLLABLE PIEUP-U-CHIEUCH +0xBD98 # HANGUL SYLLABLE PIEUP-U-KHIEUKH +0xBD99 # HANGUL SYLLABLE PIEUP-U-THIEUTH +0xBD9A # HANGUL SYLLABLE PIEUP-U-PHIEUPH +0xBD9B # HANGUL SYLLABLE PIEUP-U-HIEUH +0xBD9C # HANGUL SYLLABLE PIEUP-WEO +0xBD9D # HANGUL SYLLABLE PIEUP-WEO-KIYEOK +0xBD9E # HANGUL SYLLABLE PIEUP-WEO-SSANGKIYEOK +0xBD9F # HANGUL SYLLABLE PIEUP-WEO-KIYEOKSIOS +0xBDA0 # HANGUL SYLLABLE PIEUP-WEO-NIEUN +0xBDA1 # HANGUL SYLLABLE PIEUP-WEO-NIEUNCIEUC +0xBDA2 # HANGUL SYLLABLE PIEUP-WEO-NIEUNHIEUH +0xBDA3 # HANGUL SYLLABLE PIEUP-WEO-TIKEUT +0xBDA4 # HANGUL SYLLABLE PIEUP-WEO-RIEUL +0xBDA5 # HANGUL SYLLABLE PIEUP-WEO-RIEULKIYEOK +0xBDA6 # HANGUL SYLLABLE PIEUP-WEO-RIEULMIEUM +0xBDA7 # HANGUL SYLLABLE PIEUP-WEO-RIEULPIEUP +0xBDA8 # HANGUL SYLLABLE PIEUP-WEO-RIEULSIOS +0xBDA9 # HANGUL SYLLABLE PIEUP-WEO-RIEULTHIEUTH +0xBDAA # HANGUL SYLLABLE PIEUP-WEO-RIEULPHIEUPH +0xBDAB # HANGUL SYLLABLE PIEUP-WEO-RIEULHIEUH +0xBDAC # HANGUL SYLLABLE PIEUP-WEO-MIEUM +0xBDAD # HANGUL SYLLABLE PIEUP-WEO-PIEUP +0xBDAE # HANGUL SYLLABLE PIEUP-WEO-PIEUPSIOS +0xBDAF # HANGUL SYLLABLE PIEUP-WEO-SIOS +0xBDB0 # HANGUL SYLLABLE PIEUP-WEO-SSANGSIOS +0xBDB1 # HANGUL SYLLABLE PIEUP-WEO-IEUNG +0xBDB2 # HANGUL SYLLABLE PIEUP-WEO-CIEUC +0xBDB3 # HANGUL SYLLABLE PIEUP-WEO-CHIEUCH +0xBDB4 # HANGUL SYLLABLE PIEUP-WEO-KHIEUKH +0xBDB5 # HANGUL SYLLABLE PIEUP-WEO-THIEUTH +0xBDB6 # HANGUL SYLLABLE PIEUP-WEO-PHIEUPH +0xBDB7 # HANGUL SYLLABLE PIEUP-WEO-HIEUH +0xBDB8 # HANGUL SYLLABLE PIEUP-WE +0xBDB9 # HANGUL SYLLABLE PIEUP-WE-KIYEOK +0xBDBA # HANGUL SYLLABLE PIEUP-WE-SSANGKIYEOK +0xBDBB # HANGUL SYLLABLE PIEUP-WE-KIYEOKSIOS +0xBDBC # HANGUL SYLLABLE PIEUP-WE-NIEUN +0xBDBD # HANGUL SYLLABLE PIEUP-WE-NIEUNCIEUC +0xBDBE # HANGUL SYLLABLE PIEUP-WE-NIEUNHIEUH +0xBDBF # HANGUL SYLLABLE PIEUP-WE-TIKEUT +0xBDC0 # HANGUL SYLLABLE PIEUP-WE-RIEUL +0xBDC1 # HANGUL SYLLABLE PIEUP-WE-RIEULKIYEOK +0xBDC2 # HANGUL SYLLABLE PIEUP-WE-RIEULMIEUM +0xBDC3 # HANGUL SYLLABLE PIEUP-WE-RIEULPIEUP +0xBDC4 # HANGUL SYLLABLE PIEUP-WE-RIEULSIOS +0xBDC5 # HANGUL SYLLABLE PIEUP-WE-RIEULTHIEUTH +0xBDC6 # HANGUL SYLLABLE PIEUP-WE-RIEULPHIEUPH +0xBDC7 # HANGUL SYLLABLE PIEUP-WE-RIEULHIEUH +0xBDC8 # HANGUL SYLLABLE PIEUP-WE-MIEUM +0xBDC9 # HANGUL SYLLABLE PIEUP-WE-PIEUP +0xBDCA # HANGUL SYLLABLE PIEUP-WE-PIEUPSIOS +0xBDCB # HANGUL SYLLABLE PIEUP-WE-SIOS +0xBDCC # HANGUL SYLLABLE PIEUP-WE-SSANGSIOS +0xBDCD # HANGUL SYLLABLE PIEUP-WE-IEUNG +0xBDCE # HANGUL SYLLABLE PIEUP-WE-CIEUC +0xBDCF # HANGUL SYLLABLE PIEUP-WE-CHIEUCH +0xBDD0 # HANGUL SYLLABLE PIEUP-WE-KHIEUKH +0xBDD1 # HANGUL SYLLABLE PIEUP-WE-THIEUTH +0xBDD2 # HANGUL SYLLABLE PIEUP-WE-PHIEUPH +0xBDD3 # HANGUL SYLLABLE PIEUP-WE-HIEUH +0xBDD4 # HANGUL SYLLABLE PIEUP-WI +0xBDD5 # HANGUL SYLLABLE PIEUP-WI-KIYEOK +0xBDD6 # HANGUL SYLLABLE PIEUP-WI-SSANGKIYEOK +0xBDD7 # HANGUL SYLLABLE PIEUP-WI-KIYEOKSIOS +0xBDD8 # HANGUL SYLLABLE PIEUP-WI-NIEUN +0xBDD9 # HANGUL SYLLABLE PIEUP-WI-NIEUNCIEUC +0xBDDA # HANGUL SYLLABLE PIEUP-WI-NIEUNHIEUH +0xBDDB # HANGUL SYLLABLE PIEUP-WI-TIKEUT +0xBDDC # HANGUL SYLLABLE PIEUP-WI-RIEUL +0xBDDD # HANGUL SYLLABLE PIEUP-WI-RIEULKIYEOK +0xBDDE # HANGUL SYLLABLE PIEUP-WI-RIEULMIEUM +0xBDDF # HANGUL SYLLABLE PIEUP-WI-RIEULPIEUP +0xBDE0 # HANGUL SYLLABLE PIEUP-WI-RIEULSIOS +0xBDE1 # HANGUL SYLLABLE PIEUP-WI-RIEULTHIEUTH +0xBDE2 # HANGUL SYLLABLE PIEUP-WI-RIEULPHIEUPH +0xBDE3 # HANGUL SYLLABLE PIEUP-WI-RIEULHIEUH +0xBDE4 # HANGUL SYLLABLE PIEUP-WI-MIEUM +0xBDE5 # HANGUL SYLLABLE PIEUP-WI-PIEUP +0xBDE6 # HANGUL SYLLABLE PIEUP-WI-PIEUPSIOS +0xBDE7 # HANGUL SYLLABLE PIEUP-WI-SIOS +0xBDE8 # HANGUL SYLLABLE PIEUP-WI-SSANGSIOS +0xBDE9 # HANGUL SYLLABLE PIEUP-WI-IEUNG +0xBDEA # HANGUL SYLLABLE PIEUP-WI-CIEUC +0xBDEB # HANGUL SYLLABLE PIEUP-WI-CHIEUCH +0xBDEC # HANGUL SYLLABLE PIEUP-WI-KHIEUKH +0xBDED # HANGUL SYLLABLE PIEUP-WI-THIEUTH +0xBDEE # HANGUL SYLLABLE PIEUP-WI-PHIEUPH +0xBDEF # HANGUL SYLLABLE PIEUP-WI-HIEUH +0xBDF0 # HANGUL SYLLABLE PIEUP-YU +0xBDF1 # HANGUL SYLLABLE PIEUP-YU-KIYEOK +0xBDF2 # HANGUL SYLLABLE PIEUP-YU-SSANGKIYEOK +0xBDF3 # HANGUL SYLLABLE PIEUP-YU-KIYEOKSIOS +0xBDF4 # HANGUL SYLLABLE PIEUP-YU-NIEUN +0xBDF5 # HANGUL SYLLABLE PIEUP-YU-NIEUNCIEUC +0xBDF6 # HANGUL SYLLABLE PIEUP-YU-NIEUNHIEUH +0xBDF7 # HANGUL SYLLABLE PIEUP-YU-TIKEUT +0xBDF8 # HANGUL SYLLABLE PIEUP-YU-RIEUL +0xBDF9 # HANGUL SYLLABLE PIEUP-YU-RIEULKIYEOK +0xBDFA # HANGUL SYLLABLE PIEUP-YU-RIEULMIEUM +0xBDFB # HANGUL SYLLABLE PIEUP-YU-RIEULPIEUP +0xBDFC # HANGUL SYLLABLE PIEUP-YU-RIEULSIOS +0xBDFD # HANGUL SYLLABLE PIEUP-YU-RIEULTHIEUTH +0xBDFE # HANGUL SYLLABLE PIEUP-YU-RIEULPHIEUPH +0xBDFF # HANGUL SYLLABLE PIEUP-YU-RIEULHIEUH +0xBE00 # HANGUL SYLLABLE PIEUP-YU-MIEUM +0xBE01 # HANGUL SYLLABLE PIEUP-YU-PIEUP +0xBE02 # HANGUL SYLLABLE PIEUP-YU-PIEUPSIOS +0xBE03 # HANGUL SYLLABLE PIEUP-YU-SIOS +0xBE04 # HANGUL SYLLABLE PIEUP-YU-SSANGSIOS +0xBE05 # HANGUL SYLLABLE PIEUP-YU-IEUNG +0xBE06 # HANGUL SYLLABLE PIEUP-YU-CIEUC +0xBE07 # HANGUL SYLLABLE PIEUP-YU-CHIEUCH +0xBE08 # HANGUL SYLLABLE PIEUP-YU-KHIEUKH +0xBE09 # HANGUL SYLLABLE PIEUP-YU-THIEUTH +0xBE0A # HANGUL SYLLABLE PIEUP-YU-PHIEUPH +0xBE0B # HANGUL SYLLABLE PIEUP-YU-HIEUH +0xBE0C # HANGUL SYLLABLE PIEUP-EU +0xBE0D # HANGUL SYLLABLE PIEUP-EU-KIYEOK +0xBE0E # HANGUL SYLLABLE PIEUP-EU-SSANGKIYEOK +0xBE0F # HANGUL SYLLABLE PIEUP-EU-KIYEOKSIOS +0xBE10 # HANGUL SYLLABLE PIEUP-EU-NIEUN +0xBE11 # HANGUL SYLLABLE PIEUP-EU-NIEUNCIEUC +0xBE12 # HANGUL SYLLABLE PIEUP-EU-NIEUNHIEUH +0xBE13 # HANGUL SYLLABLE PIEUP-EU-TIKEUT +0xBE14 # HANGUL SYLLABLE PIEUP-EU-RIEUL +0xBE15 # HANGUL SYLLABLE PIEUP-EU-RIEULKIYEOK +0xBE16 # HANGUL SYLLABLE PIEUP-EU-RIEULMIEUM +0xBE17 # HANGUL SYLLABLE PIEUP-EU-RIEULPIEUP +0xBE18 # HANGUL SYLLABLE PIEUP-EU-RIEULSIOS +0xBE19 # HANGUL SYLLABLE PIEUP-EU-RIEULTHIEUTH +0xBE1A # HANGUL SYLLABLE PIEUP-EU-RIEULPHIEUPH +0xBE1B # HANGUL SYLLABLE PIEUP-EU-RIEULHIEUH +0xBE1C # HANGUL SYLLABLE PIEUP-EU-MIEUM +0xBE1D # HANGUL SYLLABLE PIEUP-EU-PIEUP +0xBE1E # HANGUL SYLLABLE PIEUP-EU-PIEUPSIOS +0xBE1F # HANGUL SYLLABLE PIEUP-EU-SIOS +0xBE20 # HANGUL SYLLABLE PIEUP-EU-SSANGSIOS +0xBE21 # HANGUL SYLLABLE PIEUP-EU-IEUNG +0xBE22 # HANGUL SYLLABLE PIEUP-EU-CIEUC +0xBE23 # HANGUL SYLLABLE PIEUP-EU-CHIEUCH +0xBE24 # HANGUL SYLLABLE PIEUP-EU-KHIEUKH +0xBE25 # HANGUL SYLLABLE PIEUP-EU-THIEUTH +0xBE26 # HANGUL SYLLABLE PIEUP-EU-PHIEUPH +0xBE27 # HANGUL SYLLABLE PIEUP-EU-HIEUH +0xBE28 # HANGUL SYLLABLE PIEUP-YI +0xBE29 # HANGUL SYLLABLE PIEUP-YI-KIYEOK +0xBE2A # HANGUL SYLLABLE PIEUP-YI-SSANGKIYEOK +0xBE2B # HANGUL SYLLABLE PIEUP-YI-KIYEOKSIOS +0xBE2C # HANGUL SYLLABLE PIEUP-YI-NIEUN +0xBE2D # HANGUL SYLLABLE PIEUP-YI-NIEUNCIEUC +0xBE2E # HANGUL SYLLABLE PIEUP-YI-NIEUNHIEUH +0xBE2F # HANGUL SYLLABLE PIEUP-YI-TIKEUT +0xBE30 # HANGUL SYLLABLE PIEUP-YI-RIEUL +0xBE31 # HANGUL SYLLABLE PIEUP-YI-RIEULKIYEOK +0xBE32 # HANGUL SYLLABLE PIEUP-YI-RIEULMIEUM +0xBE33 # HANGUL SYLLABLE PIEUP-YI-RIEULPIEUP +0xBE34 # HANGUL SYLLABLE PIEUP-YI-RIEULSIOS +0xBE35 # HANGUL SYLLABLE PIEUP-YI-RIEULTHIEUTH +0xBE36 # HANGUL SYLLABLE PIEUP-YI-RIEULPHIEUPH +0xBE37 # HANGUL SYLLABLE PIEUP-YI-RIEULHIEUH +0xBE38 # HANGUL SYLLABLE PIEUP-YI-MIEUM +0xBE39 # HANGUL SYLLABLE PIEUP-YI-PIEUP +0xBE3A # HANGUL SYLLABLE PIEUP-YI-PIEUPSIOS +0xBE3B # HANGUL SYLLABLE PIEUP-YI-SIOS +0xBE3C # HANGUL SYLLABLE PIEUP-YI-SSANGSIOS +0xBE3D # HANGUL SYLLABLE PIEUP-YI-IEUNG +0xBE3E # HANGUL SYLLABLE PIEUP-YI-CIEUC +0xBE3F # HANGUL SYLLABLE PIEUP-YI-CHIEUCH +0xBE40 # HANGUL SYLLABLE PIEUP-YI-KHIEUKH +0xBE41 # HANGUL SYLLABLE PIEUP-YI-THIEUTH +0xBE42 # HANGUL SYLLABLE PIEUP-YI-PHIEUPH +0xBE43 # HANGUL SYLLABLE PIEUP-YI-HIEUH +0xBE44 # HANGUL SYLLABLE PIEUP-I +0xBE45 # HANGUL SYLLABLE PIEUP-I-KIYEOK +0xBE46 # HANGUL SYLLABLE PIEUP-I-SSANGKIYEOK +0xBE47 # HANGUL SYLLABLE PIEUP-I-KIYEOKSIOS +0xBE48 # HANGUL SYLLABLE PIEUP-I-NIEUN +0xBE49 # HANGUL SYLLABLE PIEUP-I-NIEUNCIEUC +0xBE4A # HANGUL SYLLABLE PIEUP-I-NIEUNHIEUH +0xBE4B # HANGUL SYLLABLE PIEUP-I-TIKEUT +0xBE4C # HANGUL SYLLABLE PIEUP-I-RIEUL +0xBE4D # HANGUL SYLLABLE PIEUP-I-RIEULKIYEOK +0xBE4E # HANGUL SYLLABLE PIEUP-I-RIEULMIEUM +0xBE4F # HANGUL SYLLABLE PIEUP-I-RIEULPIEUP +0xBE50 # HANGUL SYLLABLE PIEUP-I-RIEULSIOS +0xBE51 # HANGUL SYLLABLE PIEUP-I-RIEULTHIEUTH +0xBE52 # HANGUL SYLLABLE PIEUP-I-RIEULPHIEUPH +0xBE53 # HANGUL SYLLABLE PIEUP-I-RIEULHIEUH +0xBE54 # HANGUL SYLLABLE PIEUP-I-MIEUM +0xBE55 # HANGUL SYLLABLE PIEUP-I-PIEUP +0xBE56 # HANGUL SYLLABLE PIEUP-I-PIEUPSIOS +0xBE57 # HANGUL SYLLABLE PIEUP-I-SIOS +0xBE58 # HANGUL SYLLABLE PIEUP-I-SSANGSIOS +0xBE59 # HANGUL SYLLABLE PIEUP-I-IEUNG +0xBE5A # HANGUL SYLLABLE PIEUP-I-CIEUC +0xBE5B # HANGUL SYLLABLE PIEUP-I-CHIEUCH +0xBE5C # HANGUL SYLLABLE PIEUP-I-KHIEUKH +0xBE5D # HANGUL SYLLABLE PIEUP-I-THIEUTH +0xBE5E # HANGUL SYLLABLE PIEUP-I-PHIEUPH +0xBE5F # HANGUL SYLLABLE PIEUP-I-HIEUH +0xBE60 # HANGUL SYLLABLE SSANGPIEUP-A +0xBE61 # HANGUL SYLLABLE SSANGPIEUP-A-KIYEOK +0xBE62 # HANGUL SYLLABLE SSANGPIEUP-A-SSANGKIYEOK +0xBE63 # HANGUL SYLLABLE SSANGPIEUP-A-KIYEOKSIOS +0xBE64 # HANGUL SYLLABLE SSANGPIEUP-A-NIEUN +0xBE65 # HANGUL SYLLABLE SSANGPIEUP-A-NIEUNCIEUC +0xBE66 # HANGUL SYLLABLE SSANGPIEUP-A-NIEUNHIEUH +0xBE67 # HANGUL SYLLABLE SSANGPIEUP-A-TIKEUT +0xBE68 # HANGUL SYLLABLE SSANGPIEUP-A-RIEUL +0xBE69 # HANGUL SYLLABLE SSANGPIEUP-A-RIEULKIYEOK +0xBE6A # HANGUL SYLLABLE SSANGPIEUP-A-RIEULMIEUM +0xBE6B # HANGUL SYLLABLE SSANGPIEUP-A-RIEULPIEUP +0xBE6C # HANGUL SYLLABLE SSANGPIEUP-A-RIEULSIOS +0xBE6D # HANGUL SYLLABLE SSANGPIEUP-A-RIEULTHIEUTH +0xBE6E # HANGUL SYLLABLE SSANGPIEUP-A-RIEULPHIEUPH +0xBE6F # HANGUL SYLLABLE SSANGPIEUP-A-RIEULHIEUH +0xBE70 # HANGUL SYLLABLE SSANGPIEUP-A-MIEUM +0xBE71 # HANGUL SYLLABLE SSANGPIEUP-A-PIEUP +0xBE72 # HANGUL SYLLABLE SSANGPIEUP-A-PIEUPSIOS +0xBE73 # HANGUL SYLLABLE SSANGPIEUP-A-SIOS +0xBE74 # HANGUL SYLLABLE SSANGPIEUP-A-SSANGSIOS +0xBE75 # HANGUL SYLLABLE SSANGPIEUP-A-IEUNG +0xBE76 # HANGUL SYLLABLE SSANGPIEUP-A-CIEUC +0xBE77 # HANGUL SYLLABLE SSANGPIEUP-A-CHIEUCH +0xBE78 # HANGUL SYLLABLE SSANGPIEUP-A-KHIEUKH +0xBE79 # HANGUL SYLLABLE SSANGPIEUP-A-THIEUTH +0xBE7A # HANGUL SYLLABLE SSANGPIEUP-A-PHIEUPH +0xBE7B # HANGUL SYLLABLE SSANGPIEUP-A-HIEUH +0xBE7C # HANGUL SYLLABLE SSANGPIEUP-AE +0xBE7D # HANGUL SYLLABLE SSANGPIEUP-AE-KIYEOK +0xBE7E # HANGUL SYLLABLE SSANGPIEUP-AE-SSANGKIYEOK +0xBE7F # HANGUL SYLLABLE SSANGPIEUP-AE-KIYEOKSIOS +0xBE80 # HANGUL SYLLABLE SSANGPIEUP-AE-NIEUN +0xBE81 # HANGUL SYLLABLE SSANGPIEUP-AE-NIEUNCIEUC +0xBE82 # HANGUL SYLLABLE SSANGPIEUP-AE-NIEUNHIEUH +0xBE83 # HANGUL SYLLABLE SSANGPIEUP-AE-TIKEUT +0xBE84 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEUL +0xBE85 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULKIYEOK +0xBE86 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULMIEUM +0xBE87 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULPIEUP +0xBE88 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULSIOS +0xBE89 # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULTHIEUTH +0xBE8A # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULPHIEUPH +0xBE8B # HANGUL SYLLABLE SSANGPIEUP-AE-RIEULHIEUH +0xBE8C # HANGUL SYLLABLE SSANGPIEUP-AE-MIEUM +0xBE8D # HANGUL SYLLABLE SSANGPIEUP-AE-PIEUP +0xBE8E # HANGUL SYLLABLE SSANGPIEUP-AE-PIEUPSIOS +0xBE8F # HANGUL SYLLABLE SSANGPIEUP-AE-SIOS +0xBE90 # HANGUL SYLLABLE SSANGPIEUP-AE-SSANGSIOS +0xBE91 # HANGUL SYLLABLE SSANGPIEUP-AE-IEUNG +0xBE92 # HANGUL SYLLABLE SSANGPIEUP-AE-CIEUC +0xBE93 # HANGUL SYLLABLE SSANGPIEUP-AE-CHIEUCH +0xBE94 # HANGUL SYLLABLE SSANGPIEUP-AE-KHIEUKH +0xBE95 # HANGUL SYLLABLE SSANGPIEUP-AE-THIEUTH +0xBE96 # HANGUL SYLLABLE SSANGPIEUP-AE-PHIEUPH +0xBE97 # HANGUL SYLLABLE SSANGPIEUP-AE-HIEUH +0xBE98 # HANGUL SYLLABLE SSANGPIEUP-YA +0xBE99 # HANGUL SYLLABLE SSANGPIEUP-YA-KIYEOK +0xBE9A # HANGUL SYLLABLE SSANGPIEUP-YA-SSANGKIYEOK +0xBE9B # HANGUL SYLLABLE SSANGPIEUP-YA-KIYEOKSIOS +0xBE9C # HANGUL SYLLABLE SSANGPIEUP-YA-NIEUN +0xBE9D # HANGUL SYLLABLE SSANGPIEUP-YA-NIEUNCIEUC +0xBE9E # HANGUL SYLLABLE SSANGPIEUP-YA-NIEUNHIEUH +0xBE9F # HANGUL SYLLABLE SSANGPIEUP-YA-TIKEUT +0xBEA0 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEUL +0xBEA1 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULKIYEOK +0xBEA2 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULMIEUM +0xBEA3 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULPIEUP +0xBEA4 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULSIOS +0xBEA5 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULTHIEUTH +0xBEA6 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULPHIEUPH +0xBEA7 # HANGUL SYLLABLE SSANGPIEUP-YA-RIEULHIEUH +0xBEA8 # HANGUL SYLLABLE SSANGPIEUP-YA-MIEUM +0xBEA9 # HANGUL SYLLABLE SSANGPIEUP-YA-PIEUP +0xBEAA # HANGUL SYLLABLE SSANGPIEUP-YA-PIEUPSIOS +0xBEAB # HANGUL SYLLABLE SSANGPIEUP-YA-SIOS +0xBEAC # HANGUL SYLLABLE SSANGPIEUP-YA-SSANGSIOS +0xBEAD # HANGUL SYLLABLE SSANGPIEUP-YA-IEUNG +0xBEAE # HANGUL SYLLABLE SSANGPIEUP-YA-CIEUC +0xBEAF # HANGUL SYLLABLE SSANGPIEUP-YA-CHIEUCH +0xBEB0 # HANGUL SYLLABLE SSANGPIEUP-YA-KHIEUKH +0xBEB1 # HANGUL SYLLABLE SSANGPIEUP-YA-THIEUTH +0xBEB2 # HANGUL SYLLABLE SSANGPIEUP-YA-PHIEUPH +0xBEB3 # HANGUL SYLLABLE SSANGPIEUP-YA-HIEUH +0xBEB4 # HANGUL SYLLABLE SSANGPIEUP-YAE +0xBEB5 # HANGUL SYLLABLE SSANGPIEUP-YAE-KIYEOK +0xBEB6 # HANGUL SYLLABLE SSANGPIEUP-YAE-SSANGKIYEOK +0xBEB7 # HANGUL SYLLABLE SSANGPIEUP-YAE-KIYEOKSIOS +0xBEB8 # HANGUL SYLLABLE SSANGPIEUP-YAE-NIEUN +0xBEB9 # HANGUL SYLLABLE SSANGPIEUP-YAE-NIEUNCIEUC +0xBEBA # HANGUL SYLLABLE SSANGPIEUP-YAE-NIEUNHIEUH +0xBEBB # HANGUL SYLLABLE SSANGPIEUP-YAE-TIKEUT +0xBEBC # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEUL +0xBEBD # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULKIYEOK +0xBEBE # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULMIEUM +0xBEBF # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULPIEUP +0xBEC0 # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULSIOS +0xBEC1 # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULTHIEUTH +0xBEC2 # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULPHIEUPH +0xBEC3 # HANGUL SYLLABLE SSANGPIEUP-YAE-RIEULHIEUH +0xBEC4 # HANGUL SYLLABLE SSANGPIEUP-YAE-MIEUM +0xBEC5 # HANGUL SYLLABLE SSANGPIEUP-YAE-PIEUP +0xBEC6 # HANGUL SYLLABLE SSANGPIEUP-YAE-PIEUPSIOS +0xBEC7 # HANGUL SYLLABLE SSANGPIEUP-YAE-SIOS +0xBEC8 # HANGUL SYLLABLE SSANGPIEUP-YAE-SSANGSIOS +0xBEC9 # HANGUL SYLLABLE SSANGPIEUP-YAE-IEUNG +0xBECA # HANGUL SYLLABLE SSANGPIEUP-YAE-CIEUC +0xBECB # HANGUL SYLLABLE SSANGPIEUP-YAE-CHIEUCH +0xBECC # HANGUL SYLLABLE SSANGPIEUP-YAE-KHIEUKH +0xBECD # HANGUL SYLLABLE SSANGPIEUP-YAE-THIEUTH +0xBECE # HANGUL SYLLABLE SSANGPIEUP-YAE-PHIEUPH +0xBECF # HANGUL SYLLABLE SSANGPIEUP-YAE-HIEUH +0xBED0 # HANGUL SYLLABLE SSANGPIEUP-EO +0xBED1 # HANGUL SYLLABLE SSANGPIEUP-EO-KIYEOK +0xBED2 # HANGUL SYLLABLE SSANGPIEUP-EO-SSANGKIYEOK +0xBED3 # HANGUL SYLLABLE SSANGPIEUP-EO-KIYEOKSIOS +0xBED4 # HANGUL SYLLABLE SSANGPIEUP-EO-NIEUN +0xBED5 # HANGUL SYLLABLE SSANGPIEUP-EO-NIEUNCIEUC +0xBED6 # HANGUL SYLLABLE SSANGPIEUP-EO-NIEUNHIEUH +0xBED7 # HANGUL SYLLABLE SSANGPIEUP-EO-TIKEUT +0xBED8 # HANGUL SYLLABLE SSANGPIEUP-EO-RIEUL +0xBED9 # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULKIYEOK +0xBEDA # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULMIEUM +0xBEDB # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULPIEUP +0xBEDC # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULSIOS +0xBEDD # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULTHIEUTH +0xBEDE # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULPHIEUPH +0xBEDF # HANGUL SYLLABLE SSANGPIEUP-EO-RIEULHIEUH +0xBEE0 # HANGUL SYLLABLE SSANGPIEUP-EO-MIEUM +0xBEE1 # HANGUL SYLLABLE SSANGPIEUP-EO-PIEUP +0xBEE2 # HANGUL SYLLABLE SSANGPIEUP-EO-PIEUPSIOS +0xBEE3 # HANGUL SYLLABLE SSANGPIEUP-EO-SIOS +0xBEE4 # HANGUL SYLLABLE SSANGPIEUP-EO-SSANGSIOS +0xBEE5 # HANGUL SYLLABLE SSANGPIEUP-EO-IEUNG +0xBEE6 # HANGUL SYLLABLE SSANGPIEUP-EO-CIEUC +0xBEE7 # HANGUL SYLLABLE SSANGPIEUP-EO-CHIEUCH +0xBEE8 # HANGUL SYLLABLE SSANGPIEUP-EO-KHIEUKH +0xBEE9 # HANGUL SYLLABLE SSANGPIEUP-EO-THIEUTH +0xBEEA # HANGUL SYLLABLE SSANGPIEUP-EO-PHIEUPH +0xBEEB # HANGUL SYLLABLE SSANGPIEUP-EO-HIEUH +0xBEEC # HANGUL SYLLABLE SSANGPIEUP-E +0xBEED # HANGUL SYLLABLE SSANGPIEUP-E-KIYEOK +0xBEEE # HANGUL SYLLABLE SSANGPIEUP-E-SSANGKIYEOK +0xBEEF # HANGUL SYLLABLE SSANGPIEUP-E-KIYEOKSIOS +0xBEF0 # HANGUL SYLLABLE SSANGPIEUP-E-NIEUN +0xBEF1 # HANGUL SYLLABLE SSANGPIEUP-E-NIEUNCIEUC +0xBEF2 # HANGUL SYLLABLE SSANGPIEUP-E-NIEUNHIEUH +0xBEF3 # HANGUL SYLLABLE SSANGPIEUP-E-TIKEUT +0xBEF4 # HANGUL SYLLABLE SSANGPIEUP-E-RIEUL +0xBEF5 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULKIYEOK +0xBEF6 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULMIEUM +0xBEF7 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULPIEUP +0xBEF8 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULSIOS +0xBEF9 # HANGUL SYLLABLE SSANGPIEUP-E-RIEULTHIEUTH +0xBEFA # HANGUL SYLLABLE SSANGPIEUP-E-RIEULPHIEUPH +0xBEFB # HANGUL SYLLABLE SSANGPIEUP-E-RIEULHIEUH +0xBEFC # HANGUL SYLLABLE SSANGPIEUP-E-MIEUM +0xBEFD # HANGUL SYLLABLE SSANGPIEUP-E-PIEUP +0xBEFE # HANGUL SYLLABLE SSANGPIEUP-E-PIEUPSIOS +0xBEFF # HANGUL SYLLABLE SSANGPIEUP-E-SIOS +0xBF00 # HANGUL SYLLABLE SSANGPIEUP-E-SSANGSIOS +0xBF01 # HANGUL SYLLABLE SSANGPIEUP-E-IEUNG +0xBF02 # HANGUL SYLLABLE SSANGPIEUP-E-CIEUC +0xBF03 # HANGUL SYLLABLE SSANGPIEUP-E-CHIEUCH +0xBF04 # HANGUL SYLLABLE SSANGPIEUP-E-KHIEUKH +0xBF05 # HANGUL SYLLABLE SSANGPIEUP-E-THIEUTH +0xBF06 # HANGUL SYLLABLE SSANGPIEUP-E-PHIEUPH +0xBF07 # HANGUL SYLLABLE SSANGPIEUP-E-HIEUH +0xBF08 # HANGUL SYLLABLE SSANGPIEUP-YEO +0xBF09 # HANGUL SYLLABLE SSANGPIEUP-YEO-KIYEOK +0xBF0A # HANGUL SYLLABLE SSANGPIEUP-YEO-SSANGKIYEOK +0xBF0B # HANGUL SYLLABLE SSANGPIEUP-YEO-KIYEOKSIOS +0xBF0C # HANGUL SYLLABLE SSANGPIEUP-YEO-NIEUN +0xBF0D # HANGUL SYLLABLE SSANGPIEUP-YEO-NIEUNCIEUC +0xBF0E # HANGUL SYLLABLE SSANGPIEUP-YEO-NIEUNHIEUH +0xBF0F # HANGUL SYLLABLE SSANGPIEUP-YEO-TIKEUT +0xBF10 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEUL +0xBF11 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULKIYEOK +0xBF12 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULMIEUM +0xBF13 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULPIEUP +0xBF14 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULSIOS +0xBF15 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULTHIEUTH +0xBF16 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULPHIEUPH +0xBF17 # HANGUL SYLLABLE SSANGPIEUP-YEO-RIEULHIEUH +0xBF18 # HANGUL SYLLABLE SSANGPIEUP-YEO-MIEUM +0xBF19 # HANGUL SYLLABLE SSANGPIEUP-YEO-PIEUP +0xBF1A # HANGUL SYLLABLE SSANGPIEUP-YEO-PIEUPSIOS +0xBF1B # HANGUL SYLLABLE SSANGPIEUP-YEO-SIOS +0xBF1C # HANGUL SYLLABLE SSANGPIEUP-YEO-SSANGSIOS +0xBF1D # HANGUL SYLLABLE SSANGPIEUP-YEO-IEUNG +0xBF1E # HANGUL SYLLABLE SSANGPIEUP-YEO-CIEUC +0xBF1F # HANGUL SYLLABLE SSANGPIEUP-YEO-CHIEUCH +0xBF20 # HANGUL SYLLABLE SSANGPIEUP-YEO-KHIEUKH +0xBF21 # HANGUL SYLLABLE SSANGPIEUP-YEO-THIEUTH +0xBF22 # HANGUL SYLLABLE SSANGPIEUP-YEO-PHIEUPH +0xBF23 # HANGUL SYLLABLE SSANGPIEUP-YEO-HIEUH +0xBF24 # HANGUL SYLLABLE SSANGPIEUP-YE +0xBF25 # HANGUL SYLLABLE SSANGPIEUP-YE-KIYEOK +0xBF26 # HANGUL SYLLABLE SSANGPIEUP-YE-SSANGKIYEOK +0xBF27 # HANGUL SYLLABLE SSANGPIEUP-YE-KIYEOKSIOS +0xBF28 # HANGUL SYLLABLE SSANGPIEUP-YE-NIEUN +0xBF29 # HANGUL SYLLABLE SSANGPIEUP-YE-NIEUNCIEUC +0xBF2A # HANGUL SYLLABLE SSANGPIEUP-YE-NIEUNHIEUH +0xBF2B # HANGUL SYLLABLE SSANGPIEUP-YE-TIKEUT +0xBF2C # HANGUL SYLLABLE SSANGPIEUP-YE-RIEUL +0xBF2D # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULKIYEOK +0xBF2E # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULMIEUM +0xBF2F # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULPIEUP +0xBF30 # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULSIOS +0xBF31 # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULTHIEUTH +0xBF32 # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULPHIEUPH +0xBF33 # HANGUL SYLLABLE SSANGPIEUP-YE-RIEULHIEUH +0xBF34 # HANGUL SYLLABLE SSANGPIEUP-YE-MIEUM +0xBF35 # HANGUL SYLLABLE SSANGPIEUP-YE-PIEUP +0xBF36 # HANGUL SYLLABLE SSANGPIEUP-YE-PIEUPSIOS +0xBF37 # HANGUL SYLLABLE SSANGPIEUP-YE-SIOS +0xBF38 # HANGUL SYLLABLE SSANGPIEUP-YE-SSANGSIOS +0xBF39 # HANGUL SYLLABLE SSANGPIEUP-YE-IEUNG +0xBF3A # HANGUL SYLLABLE SSANGPIEUP-YE-CIEUC +0xBF3B # HANGUL SYLLABLE SSANGPIEUP-YE-CHIEUCH +0xBF3C # HANGUL SYLLABLE SSANGPIEUP-YE-KHIEUKH +0xBF3D # HANGUL SYLLABLE SSANGPIEUP-YE-THIEUTH +0xBF3E # HANGUL SYLLABLE SSANGPIEUP-YE-PHIEUPH +0xBF3F # HANGUL SYLLABLE SSANGPIEUP-YE-HIEUH +0xBF40 # HANGUL SYLLABLE SSANGPIEUP-O +0xBF41 # HANGUL SYLLABLE SSANGPIEUP-O-KIYEOK +0xBF42 # HANGUL SYLLABLE SSANGPIEUP-O-SSANGKIYEOK +0xBF43 # HANGUL SYLLABLE SSANGPIEUP-O-KIYEOKSIOS +0xBF44 # HANGUL SYLLABLE SSANGPIEUP-O-NIEUN +0xBF45 # HANGUL SYLLABLE SSANGPIEUP-O-NIEUNCIEUC +0xBF46 # HANGUL SYLLABLE SSANGPIEUP-O-NIEUNHIEUH +0xBF47 # HANGUL SYLLABLE SSANGPIEUP-O-TIKEUT +0xBF48 # HANGUL SYLLABLE SSANGPIEUP-O-RIEUL +0xBF49 # HANGUL SYLLABLE SSANGPIEUP-O-RIEULKIYEOK +0xBF4A # HANGUL SYLLABLE SSANGPIEUP-O-RIEULMIEUM +0xBF4B # HANGUL SYLLABLE SSANGPIEUP-O-RIEULPIEUP +0xBF4C # HANGUL SYLLABLE SSANGPIEUP-O-RIEULSIOS +0xBF4D # HANGUL SYLLABLE SSANGPIEUP-O-RIEULTHIEUTH +0xBF4E # HANGUL SYLLABLE SSANGPIEUP-O-RIEULPHIEUPH +0xBF4F # HANGUL SYLLABLE SSANGPIEUP-O-RIEULHIEUH +0xBF50 # HANGUL SYLLABLE SSANGPIEUP-O-MIEUM +0xBF51 # HANGUL SYLLABLE SSANGPIEUP-O-PIEUP +0xBF52 # HANGUL SYLLABLE SSANGPIEUP-O-PIEUPSIOS +0xBF53 # HANGUL SYLLABLE SSANGPIEUP-O-SIOS +0xBF54 # HANGUL SYLLABLE SSANGPIEUP-O-SSANGSIOS +0xBF55 # HANGUL SYLLABLE SSANGPIEUP-O-IEUNG +0xBF56 # HANGUL SYLLABLE SSANGPIEUP-O-CIEUC +0xBF57 # HANGUL SYLLABLE SSANGPIEUP-O-CHIEUCH +0xBF58 # HANGUL SYLLABLE SSANGPIEUP-O-KHIEUKH +0xBF59 # HANGUL SYLLABLE SSANGPIEUP-O-THIEUTH +0xBF5A # HANGUL SYLLABLE SSANGPIEUP-O-PHIEUPH +0xBF5B # HANGUL SYLLABLE SSANGPIEUP-O-HIEUH +0xBF5C # HANGUL SYLLABLE SSANGPIEUP-WA +0xBF5D # HANGUL SYLLABLE SSANGPIEUP-WA-KIYEOK +0xBF5E # HANGUL SYLLABLE SSANGPIEUP-WA-SSANGKIYEOK +0xBF5F # HANGUL SYLLABLE SSANGPIEUP-WA-KIYEOKSIOS +0xBF60 # HANGUL SYLLABLE SSANGPIEUP-WA-NIEUN +0xBF61 # HANGUL SYLLABLE SSANGPIEUP-WA-NIEUNCIEUC +0xBF62 # HANGUL SYLLABLE SSANGPIEUP-WA-NIEUNHIEUH +0xBF63 # HANGUL SYLLABLE SSANGPIEUP-WA-TIKEUT +0xBF64 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEUL +0xBF65 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULKIYEOK +0xBF66 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULMIEUM +0xBF67 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULPIEUP +0xBF68 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULSIOS +0xBF69 # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULTHIEUTH +0xBF6A # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULPHIEUPH +0xBF6B # HANGUL SYLLABLE SSANGPIEUP-WA-RIEULHIEUH +0xBF6C # HANGUL SYLLABLE SSANGPIEUP-WA-MIEUM +0xBF6D # HANGUL SYLLABLE SSANGPIEUP-WA-PIEUP +0xBF6E # HANGUL SYLLABLE SSANGPIEUP-WA-PIEUPSIOS +0xBF6F # HANGUL SYLLABLE SSANGPIEUP-WA-SIOS +0xBF70 # HANGUL SYLLABLE SSANGPIEUP-WA-SSANGSIOS +0xBF71 # HANGUL SYLLABLE SSANGPIEUP-WA-IEUNG +0xBF72 # HANGUL SYLLABLE SSANGPIEUP-WA-CIEUC +0xBF73 # HANGUL SYLLABLE SSANGPIEUP-WA-CHIEUCH +0xBF74 # HANGUL SYLLABLE SSANGPIEUP-WA-KHIEUKH +0xBF75 # HANGUL SYLLABLE SSANGPIEUP-WA-THIEUTH +0xBF76 # HANGUL SYLLABLE SSANGPIEUP-WA-PHIEUPH +0xBF77 # HANGUL SYLLABLE SSANGPIEUP-WA-HIEUH +0xBF78 # HANGUL SYLLABLE SSANGPIEUP-WAE +0xBF79 # HANGUL SYLLABLE SSANGPIEUP-WAE-KIYEOK +0xBF7A # HANGUL SYLLABLE SSANGPIEUP-WAE-SSANGKIYEOK +0xBF7B # HANGUL SYLLABLE SSANGPIEUP-WAE-KIYEOKSIOS +0xBF7C # HANGUL SYLLABLE SSANGPIEUP-WAE-NIEUN +0xBF7D # HANGUL SYLLABLE SSANGPIEUP-WAE-NIEUNCIEUC +0xBF7E # HANGUL SYLLABLE SSANGPIEUP-WAE-NIEUNHIEUH +0xBF7F # HANGUL SYLLABLE SSANGPIEUP-WAE-TIKEUT +0xBF80 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEUL +0xBF81 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULKIYEOK +0xBF82 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULMIEUM +0xBF83 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULPIEUP +0xBF84 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULSIOS +0xBF85 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULTHIEUTH +0xBF86 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULPHIEUPH +0xBF87 # HANGUL SYLLABLE SSANGPIEUP-WAE-RIEULHIEUH +0xBF88 # HANGUL SYLLABLE SSANGPIEUP-WAE-MIEUM +0xBF89 # HANGUL SYLLABLE SSANGPIEUP-WAE-PIEUP +0xBF8A # HANGUL SYLLABLE SSANGPIEUP-WAE-PIEUPSIOS +0xBF8B # HANGUL SYLLABLE SSANGPIEUP-WAE-SIOS +0xBF8C # HANGUL SYLLABLE SSANGPIEUP-WAE-SSANGSIOS +0xBF8D # HANGUL SYLLABLE SSANGPIEUP-WAE-IEUNG +0xBF8E # HANGUL SYLLABLE SSANGPIEUP-WAE-CIEUC +0xBF8F # HANGUL SYLLABLE SSANGPIEUP-WAE-CHIEUCH +0xBF90 # HANGUL SYLLABLE SSANGPIEUP-WAE-KHIEUKH +0xBF91 # HANGUL SYLLABLE SSANGPIEUP-WAE-THIEUTH +0xBF92 # HANGUL SYLLABLE SSANGPIEUP-WAE-PHIEUPH +0xBF93 # HANGUL SYLLABLE SSANGPIEUP-WAE-HIEUH +0xBF94 # HANGUL SYLLABLE SSANGPIEUP-OE +0xBF95 # HANGUL SYLLABLE SSANGPIEUP-OE-KIYEOK +0xBF96 # HANGUL SYLLABLE SSANGPIEUP-OE-SSANGKIYEOK +0xBF97 # HANGUL SYLLABLE SSANGPIEUP-OE-KIYEOKSIOS +0xBF98 # HANGUL SYLLABLE SSANGPIEUP-OE-NIEUN +0xBF99 # HANGUL SYLLABLE SSANGPIEUP-OE-NIEUNCIEUC +0xBF9A # HANGUL SYLLABLE SSANGPIEUP-OE-NIEUNHIEUH +0xBF9B # HANGUL SYLLABLE SSANGPIEUP-OE-TIKEUT +0xBF9C # HANGUL SYLLABLE SSANGPIEUP-OE-RIEUL +0xBF9D # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULKIYEOK +0xBF9E # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULMIEUM +0xBF9F # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULPIEUP +0xBFA0 # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULSIOS +0xBFA1 # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULTHIEUTH +0xBFA2 # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULPHIEUPH +0xBFA3 # HANGUL SYLLABLE SSANGPIEUP-OE-RIEULHIEUH +0xBFA4 # HANGUL SYLLABLE SSANGPIEUP-OE-MIEUM +0xBFA5 # HANGUL SYLLABLE SSANGPIEUP-OE-PIEUP +0xBFA6 # HANGUL SYLLABLE SSANGPIEUP-OE-PIEUPSIOS +0xBFA7 # HANGUL SYLLABLE SSANGPIEUP-OE-SIOS +0xBFA8 # HANGUL SYLLABLE SSANGPIEUP-OE-SSANGSIOS +0xBFA9 # HANGUL SYLLABLE SSANGPIEUP-OE-IEUNG +0xBFAA # HANGUL SYLLABLE SSANGPIEUP-OE-CIEUC +0xBFAB # HANGUL SYLLABLE SSANGPIEUP-OE-CHIEUCH +0xBFAC # HANGUL SYLLABLE SSANGPIEUP-OE-KHIEUKH +0xBFAD # HANGUL SYLLABLE SSANGPIEUP-OE-THIEUTH +0xBFAE # HANGUL SYLLABLE SSANGPIEUP-OE-PHIEUPH +0xBFAF # HANGUL SYLLABLE SSANGPIEUP-OE-HIEUH +0xBFB0 # HANGUL SYLLABLE SSANGPIEUP-YO +0xBFB1 # HANGUL SYLLABLE SSANGPIEUP-YO-KIYEOK +0xBFB2 # HANGUL SYLLABLE SSANGPIEUP-YO-SSANGKIYEOK +0xBFB3 # HANGUL SYLLABLE SSANGPIEUP-YO-KIYEOKSIOS +0xBFB4 # HANGUL SYLLABLE SSANGPIEUP-YO-NIEUN +0xBFB5 # HANGUL SYLLABLE SSANGPIEUP-YO-NIEUNCIEUC +0xBFB6 # HANGUL SYLLABLE SSANGPIEUP-YO-NIEUNHIEUH +0xBFB7 # HANGUL SYLLABLE SSANGPIEUP-YO-TIKEUT +0xBFB8 # HANGUL SYLLABLE SSANGPIEUP-YO-RIEUL +0xBFB9 # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULKIYEOK +0xBFBA # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULMIEUM +0xBFBB # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULPIEUP +0xBFBC # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULSIOS +0xBFBD # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULTHIEUTH +0xBFBE # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULPHIEUPH +0xBFBF # HANGUL SYLLABLE SSANGPIEUP-YO-RIEULHIEUH +0xBFC0 # HANGUL SYLLABLE SSANGPIEUP-YO-MIEUM +0xBFC1 # HANGUL SYLLABLE SSANGPIEUP-YO-PIEUP +0xBFC2 # HANGUL SYLLABLE SSANGPIEUP-YO-PIEUPSIOS +0xBFC3 # HANGUL SYLLABLE SSANGPIEUP-YO-SIOS +0xBFC4 # HANGUL SYLLABLE SSANGPIEUP-YO-SSANGSIOS +0xBFC5 # HANGUL SYLLABLE SSANGPIEUP-YO-IEUNG +0xBFC6 # HANGUL SYLLABLE SSANGPIEUP-YO-CIEUC +0xBFC7 # HANGUL SYLLABLE SSANGPIEUP-YO-CHIEUCH +0xBFC8 # HANGUL SYLLABLE SSANGPIEUP-YO-KHIEUKH +0xBFC9 # HANGUL SYLLABLE SSANGPIEUP-YO-THIEUTH +0xBFCA # HANGUL SYLLABLE SSANGPIEUP-YO-PHIEUPH +0xBFCB # HANGUL SYLLABLE SSANGPIEUP-YO-HIEUH +0xBFCC # HANGUL SYLLABLE SSANGPIEUP-U +0xBFCD # HANGUL SYLLABLE SSANGPIEUP-U-KIYEOK +0xBFCE # HANGUL SYLLABLE SSANGPIEUP-U-SSANGKIYEOK +0xBFCF # HANGUL SYLLABLE SSANGPIEUP-U-KIYEOKSIOS +0xBFD0 # HANGUL SYLLABLE SSANGPIEUP-U-NIEUN +0xBFD1 # HANGUL SYLLABLE SSANGPIEUP-U-NIEUNCIEUC +0xBFD2 # HANGUL SYLLABLE SSANGPIEUP-U-NIEUNHIEUH +0xBFD3 # HANGUL SYLLABLE SSANGPIEUP-U-TIKEUT +0xBFD4 # HANGUL SYLLABLE SSANGPIEUP-U-RIEUL +0xBFD5 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULKIYEOK +0xBFD6 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULMIEUM +0xBFD7 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULPIEUP +0xBFD8 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULSIOS +0xBFD9 # HANGUL SYLLABLE SSANGPIEUP-U-RIEULTHIEUTH +0xBFDA # HANGUL SYLLABLE SSANGPIEUP-U-RIEULPHIEUPH +0xBFDB # HANGUL SYLLABLE SSANGPIEUP-U-RIEULHIEUH +0xBFDC # HANGUL SYLLABLE SSANGPIEUP-U-MIEUM +0xBFDD # HANGUL SYLLABLE SSANGPIEUP-U-PIEUP +0xBFDE # HANGUL SYLLABLE SSANGPIEUP-U-PIEUPSIOS +0xBFDF # HANGUL SYLLABLE SSANGPIEUP-U-SIOS +0xBFE0 # HANGUL SYLLABLE SSANGPIEUP-U-SSANGSIOS +0xBFE1 # HANGUL SYLLABLE SSANGPIEUP-U-IEUNG +0xBFE2 # HANGUL SYLLABLE SSANGPIEUP-U-CIEUC +0xBFE3 # HANGUL SYLLABLE SSANGPIEUP-U-CHIEUCH +0xBFE4 # HANGUL SYLLABLE SSANGPIEUP-U-KHIEUKH +0xBFE5 # HANGUL SYLLABLE SSANGPIEUP-U-THIEUTH +0xBFE6 # HANGUL SYLLABLE SSANGPIEUP-U-PHIEUPH +0xBFE7 # HANGUL SYLLABLE SSANGPIEUP-U-HIEUH +0xBFE8 # HANGUL SYLLABLE SSANGPIEUP-WEO +0xBFE9 # HANGUL SYLLABLE SSANGPIEUP-WEO-KIYEOK +0xBFEA # HANGUL SYLLABLE SSANGPIEUP-WEO-SSANGKIYEOK +0xBFEB # HANGUL SYLLABLE SSANGPIEUP-WEO-KIYEOKSIOS +0xBFEC # HANGUL SYLLABLE SSANGPIEUP-WEO-NIEUN +0xBFED # HANGUL SYLLABLE SSANGPIEUP-WEO-NIEUNCIEUC +0xBFEE # HANGUL SYLLABLE SSANGPIEUP-WEO-NIEUNHIEUH +0xBFEF # HANGUL SYLLABLE SSANGPIEUP-WEO-TIKEUT +0xBFF0 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEUL +0xBFF1 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULKIYEOK +0xBFF2 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULMIEUM +0xBFF3 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULPIEUP +0xBFF4 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULSIOS +0xBFF5 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULTHIEUTH +0xBFF6 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULPHIEUPH +0xBFF7 # HANGUL SYLLABLE SSANGPIEUP-WEO-RIEULHIEUH +0xBFF8 # HANGUL SYLLABLE SSANGPIEUP-WEO-MIEUM +0xBFF9 # HANGUL SYLLABLE SSANGPIEUP-WEO-PIEUP +0xBFFA # HANGUL SYLLABLE SSANGPIEUP-WEO-PIEUPSIOS +0xBFFB # HANGUL SYLLABLE SSANGPIEUP-WEO-SIOS +0xBFFC # HANGUL SYLLABLE SSANGPIEUP-WEO-SSANGSIOS +0xBFFD # HANGUL SYLLABLE SSANGPIEUP-WEO-IEUNG +0xBFFE # HANGUL SYLLABLE SSANGPIEUP-WEO-CIEUC +0xBFFF # HANGUL SYLLABLE SSANGPIEUP-WEO-CHIEUCH +0xC000 # HANGUL SYLLABLE SSANGPIEUP-WEO-KHIEUKH +0xC001 # HANGUL SYLLABLE SSANGPIEUP-WEO-THIEUTH +0xC002 # HANGUL SYLLABLE SSANGPIEUP-WEO-PHIEUPH +0xC003 # HANGUL SYLLABLE SSANGPIEUP-WEO-HIEUH +0xC004 # HANGUL SYLLABLE SSANGPIEUP-WE +0xC005 # HANGUL SYLLABLE SSANGPIEUP-WE-KIYEOK +0xC006 # HANGUL SYLLABLE SSANGPIEUP-WE-SSANGKIYEOK +0xC007 # HANGUL SYLLABLE SSANGPIEUP-WE-KIYEOKSIOS +0xC008 # HANGUL SYLLABLE SSANGPIEUP-WE-NIEUN +0xC009 # HANGUL SYLLABLE SSANGPIEUP-WE-NIEUNCIEUC +0xC00A # HANGUL SYLLABLE SSANGPIEUP-WE-NIEUNHIEUH +0xC00B # HANGUL SYLLABLE SSANGPIEUP-WE-TIKEUT +0xC00C # HANGUL SYLLABLE SSANGPIEUP-WE-RIEUL +0xC00D # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULKIYEOK +0xC00E # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULMIEUM +0xC00F # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULPIEUP +0xC010 # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULSIOS +0xC011 # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULTHIEUTH +0xC012 # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULPHIEUPH +0xC013 # HANGUL SYLLABLE SSANGPIEUP-WE-RIEULHIEUH +0xC014 # HANGUL SYLLABLE SSANGPIEUP-WE-MIEUM +0xC015 # HANGUL SYLLABLE SSANGPIEUP-WE-PIEUP +0xC016 # HANGUL SYLLABLE SSANGPIEUP-WE-PIEUPSIOS +0xC017 # HANGUL SYLLABLE SSANGPIEUP-WE-SIOS +0xC018 # HANGUL SYLLABLE SSANGPIEUP-WE-SSANGSIOS +0xC019 # HANGUL SYLLABLE SSANGPIEUP-WE-IEUNG +0xC01A # HANGUL SYLLABLE SSANGPIEUP-WE-CIEUC +0xC01B # HANGUL SYLLABLE SSANGPIEUP-WE-CHIEUCH +0xC01C # HANGUL SYLLABLE SSANGPIEUP-WE-KHIEUKH +0xC01D # HANGUL SYLLABLE SSANGPIEUP-WE-THIEUTH +0xC01E # HANGUL SYLLABLE SSANGPIEUP-WE-PHIEUPH +0xC01F # HANGUL SYLLABLE SSANGPIEUP-WE-HIEUH +0xC020 # HANGUL SYLLABLE SSANGPIEUP-WI +0xC021 # HANGUL SYLLABLE SSANGPIEUP-WI-KIYEOK +0xC022 # HANGUL SYLLABLE SSANGPIEUP-WI-SSANGKIYEOK +0xC023 # HANGUL SYLLABLE SSANGPIEUP-WI-KIYEOKSIOS +0xC024 # HANGUL SYLLABLE SSANGPIEUP-WI-NIEUN +0xC025 # HANGUL SYLLABLE SSANGPIEUP-WI-NIEUNCIEUC +0xC026 # HANGUL SYLLABLE SSANGPIEUP-WI-NIEUNHIEUH +0xC027 # HANGUL SYLLABLE SSANGPIEUP-WI-TIKEUT +0xC028 # HANGUL SYLLABLE SSANGPIEUP-WI-RIEUL +0xC029 # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULKIYEOK +0xC02A # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULMIEUM +0xC02B # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULPIEUP +0xC02C # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULSIOS +0xC02D # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULTHIEUTH +0xC02E # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULPHIEUPH +0xC02F # HANGUL SYLLABLE SSANGPIEUP-WI-RIEULHIEUH +0xC030 # HANGUL SYLLABLE SSANGPIEUP-WI-MIEUM +0xC031 # HANGUL SYLLABLE SSANGPIEUP-WI-PIEUP +0xC032 # HANGUL SYLLABLE SSANGPIEUP-WI-PIEUPSIOS +0xC033 # HANGUL SYLLABLE SSANGPIEUP-WI-SIOS +0xC034 # HANGUL SYLLABLE SSANGPIEUP-WI-SSANGSIOS +0xC035 # HANGUL SYLLABLE SSANGPIEUP-WI-IEUNG +0xC036 # HANGUL SYLLABLE SSANGPIEUP-WI-CIEUC +0xC037 # HANGUL SYLLABLE SSANGPIEUP-WI-CHIEUCH +0xC038 # HANGUL SYLLABLE SSANGPIEUP-WI-KHIEUKH +0xC039 # HANGUL SYLLABLE SSANGPIEUP-WI-THIEUTH +0xC03A # HANGUL SYLLABLE SSANGPIEUP-WI-PHIEUPH +0xC03B # HANGUL SYLLABLE SSANGPIEUP-WI-HIEUH +0xC03C # HANGUL SYLLABLE SSANGPIEUP-YU +0xC03D # HANGUL SYLLABLE SSANGPIEUP-YU-KIYEOK +0xC03E # HANGUL SYLLABLE SSANGPIEUP-YU-SSANGKIYEOK +0xC03F # HANGUL SYLLABLE SSANGPIEUP-YU-KIYEOKSIOS +0xC040 # HANGUL SYLLABLE SSANGPIEUP-YU-NIEUN +0xC041 # HANGUL SYLLABLE SSANGPIEUP-YU-NIEUNCIEUC +0xC042 # HANGUL SYLLABLE SSANGPIEUP-YU-NIEUNHIEUH +0xC043 # HANGUL SYLLABLE SSANGPIEUP-YU-TIKEUT +0xC044 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEUL +0xC045 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULKIYEOK +0xC046 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULMIEUM +0xC047 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULPIEUP +0xC048 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULSIOS +0xC049 # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULTHIEUTH +0xC04A # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULPHIEUPH +0xC04B # HANGUL SYLLABLE SSANGPIEUP-YU-RIEULHIEUH +0xC04C # HANGUL SYLLABLE SSANGPIEUP-YU-MIEUM +0xC04D # HANGUL SYLLABLE SSANGPIEUP-YU-PIEUP +0xC04E # HANGUL SYLLABLE SSANGPIEUP-YU-PIEUPSIOS +0xC04F # HANGUL SYLLABLE SSANGPIEUP-YU-SIOS +0xC050 # HANGUL SYLLABLE SSANGPIEUP-YU-SSANGSIOS +0xC051 # HANGUL SYLLABLE SSANGPIEUP-YU-IEUNG +0xC052 # HANGUL SYLLABLE SSANGPIEUP-YU-CIEUC +0xC053 # HANGUL SYLLABLE SSANGPIEUP-YU-CHIEUCH +0xC054 # HANGUL SYLLABLE SSANGPIEUP-YU-KHIEUKH +0xC055 # HANGUL SYLLABLE SSANGPIEUP-YU-THIEUTH +0xC056 # HANGUL SYLLABLE SSANGPIEUP-YU-PHIEUPH +0xC057 # HANGUL SYLLABLE SSANGPIEUP-YU-HIEUH +0xC058 # HANGUL SYLLABLE SSANGPIEUP-EU +0xC059 # HANGUL SYLLABLE SSANGPIEUP-EU-KIYEOK +0xC05A # HANGUL SYLLABLE SSANGPIEUP-EU-SSANGKIYEOK +0xC05B # HANGUL SYLLABLE SSANGPIEUP-EU-KIYEOKSIOS +0xC05C # HANGUL SYLLABLE SSANGPIEUP-EU-NIEUN +0xC05D # HANGUL SYLLABLE SSANGPIEUP-EU-NIEUNCIEUC +0xC05E # HANGUL SYLLABLE SSANGPIEUP-EU-NIEUNHIEUH +0xC05F # HANGUL SYLLABLE SSANGPIEUP-EU-TIKEUT +0xC060 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEUL +0xC061 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULKIYEOK +0xC062 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULMIEUM +0xC063 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULPIEUP +0xC064 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULSIOS +0xC065 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULTHIEUTH +0xC066 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULPHIEUPH +0xC067 # HANGUL SYLLABLE SSANGPIEUP-EU-RIEULHIEUH +0xC068 # HANGUL SYLLABLE SSANGPIEUP-EU-MIEUM +0xC069 # HANGUL SYLLABLE SSANGPIEUP-EU-PIEUP +0xC06A # HANGUL SYLLABLE SSANGPIEUP-EU-PIEUPSIOS +0xC06B # HANGUL SYLLABLE SSANGPIEUP-EU-SIOS +0xC06C # HANGUL SYLLABLE SSANGPIEUP-EU-SSANGSIOS +0xC06D # HANGUL SYLLABLE SSANGPIEUP-EU-IEUNG +0xC06E # HANGUL SYLLABLE SSANGPIEUP-EU-CIEUC +0xC06F # HANGUL SYLLABLE SSANGPIEUP-EU-CHIEUCH +0xC070 # HANGUL SYLLABLE SSANGPIEUP-EU-KHIEUKH +0xC071 # HANGUL SYLLABLE SSANGPIEUP-EU-THIEUTH +0xC072 # HANGUL SYLLABLE SSANGPIEUP-EU-PHIEUPH +0xC073 # HANGUL SYLLABLE SSANGPIEUP-EU-HIEUH +0xC074 # HANGUL SYLLABLE SSANGPIEUP-YI +0xC075 # HANGUL SYLLABLE SSANGPIEUP-YI-KIYEOK +0xC076 # HANGUL SYLLABLE SSANGPIEUP-YI-SSANGKIYEOK +0xC077 # HANGUL SYLLABLE SSANGPIEUP-YI-KIYEOKSIOS +0xC078 # HANGUL SYLLABLE SSANGPIEUP-YI-NIEUN +0xC079 # HANGUL SYLLABLE SSANGPIEUP-YI-NIEUNCIEUC +0xC07A # HANGUL SYLLABLE SSANGPIEUP-YI-NIEUNHIEUH +0xC07B # HANGUL SYLLABLE SSANGPIEUP-YI-TIKEUT +0xC07C # HANGUL SYLLABLE SSANGPIEUP-YI-RIEUL +0xC07D # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULKIYEOK +0xC07E # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULMIEUM +0xC07F # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULPIEUP +0xC080 # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULSIOS +0xC081 # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULTHIEUTH +0xC082 # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULPHIEUPH +0xC083 # HANGUL SYLLABLE SSANGPIEUP-YI-RIEULHIEUH +0xC084 # HANGUL SYLLABLE SSANGPIEUP-YI-MIEUM +0xC085 # HANGUL SYLLABLE SSANGPIEUP-YI-PIEUP +0xC086 # HANGUL SYLLABLE SSANGPIEUP-YI-PIEUPSIOS +0xC087 # HANGUL SYLLABLE SSANGPIEUP-YI-SIOS +0xC088 # HANGUL SYLLABLE SSANGPIEUP-YI-SSANGSIOS +0xC089 # HANGUL SYLLABLE SSANGPIEUP-YI-IEUNG +0xC08A # HANGUL SYLLABLE SSANGPIEUP-YI-CIEUC +0xC08B # HANGUL SYLLABLE SSANGPIEUP-YI-CHIEUCH +0xC08C # HANGUL SYLLABLE SSANGPIEUP-YI-KHIEUKH +0xC08D # HANGUL SYLLABLE SSANGPIEUP-YI-THIEUTH +0xC08E # HANGUL SYLLABLE SSANGPIEUP-YI-PHIEUPH +0xC08F # HANGUL SYLLABLE SSANGPIEUP-YI-HIEUH +0xC090 # HANGUL SYLLABLE SSANGPIEUP-I +0xC091 # HANGUL SYLLABLE SSANGPIEUP-I-KIYEOK +0xC092 # HANGUL SYLLABLE SSANGPIEUP-I-SSANGKIYEOK +0xC093 # HANGUL SYLLABLE SSANGPIEUP-I-KIYEOKSIOS +0xC094 # HANGUL SYLLABLE SSANGPIEUP-I-NIEUN +0xC095 # HANGUL SYLLABLE SSANGPIEUP-I-NIEUNCIEUC +0xC096 # HANGUL SYLLABLE SSANGPIEUP-I-NIEUNHIEUH +0xC097 # HANGUL SYLLABLE SSANGPIEUP-I-TIKEUT +0xC098 # HANGUL SYLLABLE SSANGPIEUP-I-RIEUL +0xC099 # HANGUL SYLLABLE SSANGPIEUP-I-RIEULKIYEOK +0xC09A # HANGUL SYLLABLE SSANGPIEUP-I-RIEULMIEUM +0xC09B # HANGUL SYLLABLE SSANGPIEUP-I-RIEULPIEUP +0xC09C # HANGUL SYLLABLE SSANGPIEUP-I-RIEULSIOS +0xC09D # HANGUL SYLLABLE SSANGPIEUP-I-RIEULTHIEUTH +0xC09E # HANGUL SYLLABLE SSANGPIEUP-I-RIEULPHIEUPH +0xC09F # HANGUL SYLLABLE SSANGPIEUP-I-RIEULHIEUH +0xC0A0 # HANGUL SYLLABLE SSANGPIEUP-I-MIEUM +0xC0A1 # HANGUL SYLLABLE SSANGPIEUP-I-PIEUP +0xC0A2 # HANGUL SYLLABLE SSANGPIEUP-I-PIEUPSIOS +0xC0A3 # HANGUL SYLLABLE SSANGPIEUP-I-SIOS +0xC0A4 # HANGUL SYLLABLE SSANGPIEUP-I-SSANGSIOS +0xC0A5 # HANGUL SYLLABLE SSANGPIEUP-I-IEUNG +0xC0A6 # HANGUL SYLLABLE SSANGPIEUP-I-CIEUC +0xC0A7 # HANGUL SYLLABLE SSANGPIEUP-I-CHIEUCH +0xC0A8 # HANGUL SYLLABLE SSANGPIEUP-I-KHIEUKH +0xC0A9 # HANGUL SYLLABLE SSANGPIEUP-I-THIEUTH +0xC0AA # HANGUL SYLLABLE SSANGPIEUP-I-PHIEUPH +0xC0AB # HANGUL SYLLABLE SSANGPIEUP-I-HIEUH +0xC0AC # HANGUL SYLLABLE SIOS-A +0xC0AD # HANGUL SYLLABLE SIOS-A-KIYEOK +0xC0AE # HANGUL SYLLABLE SIOS-A-SSANGKIYEOK +0xC0AF # HANGUL SYLLABLE SIOS-A-KIYEOKSIOS +0xC0B0 # HANGUL SYLLABLE SIOS-A-NIEUN +0xC0B1 # HANGUL SYLLABLE SIOS-A-NIEUNCIEUC +0xC0B2 # HANGUL SYLLABLE SIOS-A-NIEUNHIEUH +0xC0B3 # HANGUL SYLLABLE SIOS-A-TIKEUT +0xC0B4 # HANGUL SYLLABLE SIOS-A-RIEUL +0xC0B5 # HANGUL SYLLABLE SIOS-A-RIEULKIYEOK +0xC0B6 # HANGUL SYLLABLE SIOS-A-RIEULMIEUM +0xC0B7 # HANGUL SYLLABLE SIOS-A-RIEULPIEUP +0xC0B8 # HANGUL SYLLABLE SIOS-A-RIEULSIOS +0xC0B9 # HANGUL SYLLABLE SIOS-A-RIEULTHIEUTH +0xC0BA # HANGUL SYLLABLE SIOS-A-RIEULPHIEUPH +0xC0BB # HANGUL SYLLABLE SIOS-A-RIEULHIEUH +0xC0BC # HANGUL SYLLABLE SIOS-A-MIEUM +0xC0BD # HANGUL SYLLABLE SIOS-A-PIEUP +0xC0BE # HANGUL SYLLABLE SIOS-A-PIEUPSIOS +0xC0BF # HANGUL SYLLABLE SIOS-A-SIOS +0xC0C0 # HANGUL SYLLABLE SIOS-A-SSANGSIOS +0xC0C1 # HANGUL SYLLABLE SIOS-A-IEUNG +0xC0C2 # HANGUL SYLLABLE SIOS-A-CIEUC +0xC0C3 # HANGUL SYLLABLE SIOS-A-CHIEUCH +0xC0C4 # HANGUL SYLLABLE SIOS-A-KHIEUKH +0xC0C5 # HANGUL SYLLABLE SIOS-A-THIEUTH +0xC0C6 # HANGUL SYLLABLE SIOS-A-PHIEUPH +0xC0C7 # HANGUL SYLLABLE SIOS-A-HIEUH +0xC0C8 # HANGUL SYLLABLE SIOS-AE +0xC0C9 # HANGUL SYLLABLE SIOS-AE-KIYEOK +0xC0CA # HANGUL SYLLABLE SIOS-AE-SSANGKIYEOK +0xC0CB # HANGUL SYLLABLE SIOS-AE-KIYEOKSIOS +0xC0CC # HANGUL SYLLABLE SIOS-AE-NIEUN +0xC0CD # HANGUL SYLLABLE SIOS-AE-NIEUNCIEUC +0xC0CE # HANGUL SYLLABLE SIOS-AE-NIEUNHIEUH +0xC0CF # HANGUL SYLLABLE SIOS-AE-TIKEUT +0xC0D0 # HANGUL SYLLABLE SIOS-AE-RIEUL +0xC0D1 # HANGUL SYLLABLE SIOS-AE-RIEULKIYEOK +0xC0D2 # HANGUL SYLLABLE SIOS-AE-RIEULMIEUM +0xC0D3 # HANGUL SYLLABLE SIOS-AE-RIEULPIEUP +0xC0D4 # HANGUL SYLLABLE SIOS-AE-RIEULSIOS +0xC0D5 # HANGUL SYLLABLE SIOS-AE-RIEULTHIEUTH +0xC0D6 # HANGUL SYLLABLE SIOS-AE-RIEULPHIEUPH +0xC0D7 # HANGUL SYLLABLE SIOS-AE-RIEULHIEUH +0xC0D8 # HANGUL SYLLABLE SIOS-AE-MIEUM +0xC0D9 # HANGUL SYLLABLE SIOS-AE-PIEUP +0xC0DA # HANGUL SYLLABLE SIOS-AE-PIEUPSIOS +0xC0DB # HANGUL SYLLABLE SIOS-AE-SIOS +0xC0DC # HANGUL SYLLABLE SIOS-AE-SSANGSIOS +0xC0DD # HANGUL SYLLABLE SIOS-AE-IEUNG +0xC0DE # HANGUL SYLLABLE SIOS-AE-CIEUC +0xC0DF # HANGUL SYLLABLE SIOS-AE-CHIEUCH +0xC0E0 # HANGUL SYLLABLE SIOS-AE-KHIEUKH +0xC0E1 # HANGUL SYLLABLE SIOS-AE-THIEUTH +0xC0E2 # HANGUL SYLLABLE SIOS-AE-PHIEUPH +0xC0E3 # HANGUL SYLLABLE SIOS-AE-HIEUH +0xC0E4 # HANGUL SYLLABLE SIOS-YA +0xC0E5 # HANGUL SYLLABLE SIOS-YA-KIYEOK +0xC0E6 # HANGUL SYLLABLE SIOS-YA-SSANGKIYEOK +0xC0E7 # HANGUL SYLLABLE SIOS-YA-KIYEOKSIOS +0xC0E8 # HANGUL SYLLABLE SIOS-YA-NIEUN +0xC0E9 # HANGUL SYLLABLE SIOS-YA-NIEUNCIEUC +0xC0EA # HANGUL SYLLABLE SIOS-YA-NIEUNHIEUH +0xC0EB # HANGUL SYLLABLE SIOS-YA-TIKEUT +0xC0EC # HANGUL SYLLABLE SIOS-YA-RIEUL +0xC0ED # HANGUL SYLLABLE SIOS-YA-RIEULKIYEOK +0xC0EE # HANGUL SYLLABLE SIOS-YA-RIEULMIEUM +0xC0EF # HANGUL SYLLABLE SIOS-YA-RIEULPIEUP +0xC0F0 # HANGUL SYLLABLE SIOS-YA-RIEULSIOS +0xC0F1 # HANGUL SYLLABLE SIOS-YA-RIEULTHIEUTH +0xC0F2 # HANGUL SYLLABLE SIOS-YA-RIEULPHIEUPH +0xC0F3 # HANGUL SYLLABLE SIOS-YA-RIEULHIEUH +0xC0F4 # HANGUL SYLLABLE SIOS-YA-MIEUM +0xC0F5 # HANGUL SYLLABLE SIOS-YA-PIEUP +0xC0F6 # HANGUL SYLLABLE SIOS-YA-PIEUPSIOS +0xC0F7 # HANGUL SYLLABLE SIOS-YA-SIOS +0xC0F8 # HANGUL SYLLABLE SIOS-YA-SSANGSIOS +0xC0F9 # HANGUL SYLLABLE SIOS-YA-IEUNG +0xC0FA # HANGUL SYLLABLE SIOS-YA-CIEUC +0xC0FB # HANGUL SYLLABLE SIOS-YA-CHIEUCH +0xC0FC # HANGUL SYLLABLE SIOS-YA-KHIEUKH +0xC0FD # HANGUL SYLLABLE SIOS-YA-THIEUTH +0xC0FE # HANGUL SYLLABLE SIOS-YA-PHIEUPH +0xC0FF # HANGUL SYLLABLE SIOS-YA-HIEUH +0xC100 # HANGUL SYLLABLE SIOS-YAE +0xC101 # HANGUL SYLLABLE SIOS-YAE-KIYEOK +0xC102 # HANGUL SYLLABLE SIOS-YAE-SSANGKIYEOK +0xC103 # HANGUL SYLLABLE SIOS-YAE-KIYEOKSIOS +0xC104 # HANGUL SYLLABLE SIOS-YAE-NIEUN +0xC105 # HANGUL SYLLABLE SIOS-YAE-NIEUNCIEUC +0xC106 # HANGUL SYLLABLE SIOS-YAE-NIEUNHIEUH +0xC107 # HANGUL SYLLABLE SIOS-YAE-TIKEUT +0xC108 # HANGUL SYLLABLE SIOS-YAE-RIEUL +0xC109 # HANGUL SYLLABLE SIOS-YAE-RIEULKIYEOK +0xC10A # HANGUL SYLLABLE SIOS-YAE-RIEULMIEUM +0xC10B # HANGUL SYLLABLE SIOS-YAE-RIEULPIEUP +0xC10C # HANGUL SYLLABLE SIOS-YAE-RIEULSIOS +0xC10D # HANGUL SYLLABLE SIOS-YAE-RIEULTHIEUTH +0xC10E # HANGUL SYLLABLE SIOS-YAE-RIEULPHIEUPH +0xC10F # HANGUL SYLLABLE SIOS-YAE-RIEULHIEUH +0xC110 # HANGUL SYLLABLE SIOS-YAE-MIEUM +0xC111 # HANGUL SYLLABLE SIOS-YAE-PIEUP +0xC112 # HANGUL SYLLABLE SIOS-YAE-PIEUPSIOS +0xC113 # HANGUL SYLLABLE SIOS-YAE-SIOS +0xC114 # HANGUL SYLLABLE SIOS-YAE-SSANGSIOS +0xC115 # HANGUL SYLLABLE SIOS-YAE-IEUNG +0xC116 # HANGUL SYLLABLE SIOS-YAE-CIEUC +0xC117 # HANGUL SYLLABLE SIOS-YAE-CHIEUCH +0xC118 # HANGUL SYLLABLE SIOS-YAE-KHIEUKH +0xC119 # HANGUL SYLLABLE SIOS-YAE-THIEUTH +0xC11A # HANGUL SYLLABLE SIOS-YAE-PHIEUPH +0xC11B # HANGUL SYLLABLE SIOS-YAE-HIEUH +0xC11C # HANGUL SYLLABLE SIOS-EO +0xC11D # HANGUL SYLLABLE SIOS-EO-KIYEOK +0xC11E # HANGUL SYLLABLE SIOS-EO-SSANGKIYEOK +0xC11F # HANGUL SYLLABLE SIOS-EO-KIYEOKSIOS +0xC120 # HANGUL SYLLABLE SIOS-EO-NIEUN +0xC121 # HANGUL SYLLABLE SIOS-EO-NIEUNCIEUC +0xC122 # HANGUL SYLLABLE SIOS-EO-NIEUNHIEUH +0xC123 # HANGUL SYLLABLE SIOS-EO-TIKEUT +0xC124 # HANGUL SYLLABLE SIOS-EO-RIEUL +0xC125 # HANGUL SYLLABLE SIOS-EO-RIEULKIYEOK +0xC126 # HANGUL SYLLABLE SIOS-EO-RIEULMIEUM +0xC127 # HANGUL SYLLABLE SIOS-EO-RIEULPIEUP +0xC128 # HANGUL SYLLABLE SIOS-EO-RIEULSIOS +0xC129 # HANGUL SYLLABLE SIOS-EO-RIEULTHIEUTH +0xC12A # HANGUL SYLLABLE SIOS-EO-RIEULPHIEUPH +0xC12B # HANGUL SYLLABLE SIOS-EO-RIEULHIEUH +0xC12C # HANGUL SYLLABLE SIOS-EO-MIEUM +0xC12D # HANGUL SYLLABLE SIOS-EO-PIEUP +0xC12E # HANGUL SYLLABLE SIOS-EO-PIEUPSIOS +0xC12F # HANGUL SYLLABLE SIOS-EO-SIOS +0xC130 # HANGUL SYLLABLE SIOS-EO-SSANGSIOS +0xC131 # HANGUL SYLLABLE SIOS-EO-IEUNG +0xC132 # HANGUL SYLLABLE SIOS-EO-CIEUC +0xC133 # HANGUL SYLLABLE SIOS-EO-CHIEUCH +0xC134 # HANGUL SYLLABLE SIOS-EO-KHIEUKH +0xC135 # HANGUL SYLLABLE SIOS-EO-THIEUTH +0xC136 # HANGUL SYLLABLE SIOS-EO-PHIEUPH +0xC137 # HANGUL SYLLABLE SIOS-EO-HIEUH +0xC138 # HANGUL SYLLABLE SIOS-E +0xC139 # HANGUL SYLLABLE SIOS-E-KIYEOK +0xC13A # HANGUL SYLLABLE SIOS-E-SSANGKIYEOK +0xC13B # HANGUL SYLLABLE SIOS-E-KIYEOKSIOS +0xC13C # HANGUL SYLLABLE SIOS-E-NIEUN +0xC13D # HANGUL SYLLABLE SIOS-E-NIEUNCIEUC +0xC13E # HANGUL SYLLABLE SIOS-E-NIEUNHIEUH +0xC13F # HANGUL SYLLABLE SIOS-E-TIKEUT +0xC140 # HANGUL SYLLABLE SIOS-E-RIEUL +0xC141 # HANGUL SYLLABLE SIOS-E-RIEULKIYEOK +0xC142 # HANGUL SYLLABLE SIOS-E-RIEULMIEUM +0xC143 # HANGUL SYLLABLE SIOS-E-RIEULPIEUP +0xC144 # HANGUL SYLLABLE SIOS-E-RIEULSIOS +0xC145 # HANGUL SYLLABLE SIOS-E-RIEULTHIEUTH +0xC146 # HANGUL SYLLABLE SIOS-E-RIEULPHIEUPH +0xC147 # HANGUL SYLLABLE SIOS-E-RIEULHIEUH +0xC148 # HANGUL SYLLABLE SIOS-E-MIEUM +0xC149 # HANGUL SYLLABLE SIOS-E-PIEUP +0xC14A # HANGUL SYLLABLE SIOS-E-PIEUPSIOS +0xC14B # HANGUL SYLLABLE SIOS-E-SIOS +0xC14C # HANGUL SYLLABLE SIOS-E-SSANGSIOS +0xC14D # HANGUL SYLLABLE SIOS-E-IEUNG +0xC14E # HANGUL SYLLABLE SIOS-E-CIEUC +0xC14F # HANGUL SYLLABLE SIOS-E-CHIEUCH +0xC150 # HANGUL SYLLABLE SIOS-E-KHIEUKH +0xC151 # HANGUL SYLLABLE SIOS-E-THIEUTH +0xC152 # HANGUL SYLLABLE SIOS-E-PHIEUPH +0xC153 # HANGUL SYLLABLE SIOS-E-HIEUH +0xC154 # HANGUL SYLLABLE SIOS-YEO +0xC155 # HANGUL SYLLABLE SIOS-YEO-KIYEOK +0xC156 # HANGUL SYLLABLE SIOS-YEO-SSANGKIYEOK +0xC157 # HANGUL SYLLABLE SIOS-YEO-KIYEOKSIOS +0xC158 # HANGUL SYLLABLE SIOS-YEO-NIEUN +0xC159 # HANGUL SYLLABLE SIOS-YEO-NIEUNCIEUC +0xC15A # HANGUL SYLLABLE SIOS-YEO-NIEUNHIEUH +0xC15B # HANGUL SYLLABLE SIOS-YEO-TIKEUT +0xC15C # HANGUL SYLLABLE SIOS-YEO-RIEUL +0xC15D # HANGUL SYLLABLE SIOS-YEO-RIEULKIYEOK +0xC15E # HANGUL SYLLABLE SIOS-YEO-RIEULMIEUM +0xC15F # HANGUL SYLLABLE SIOS-YEO-RIEULPIEUP +0xC160 # HANGUL SYLLABLE SIOS-YEO-RIEULSIOS +0xC161 # HANGUL SYLLABLE SIOS-YEO-RIEULTHIEUTH +0xC162 # HANGUL SYLLABLE SIOS-YEO-RIEULPHIEUPH +0xC163 # HANGUL SYLLABLE SIOS-YEO-RIEULHIEUH +0xC164 # HANGUL SYLLABLE SIOS-YEO-MIEUM +0xC165 # HANGUL SYLLABLE SIOS-YEO-PIEUP +0xC166 # HANGUL SYLLABLE SIOS-YEO-PIEUPSIOS +0xC167 # HANGUL SYLLABLE SIOS-YEO-SIOS +0xC168 # HANGUL SYLLABLE SIOS-YEO-SSANGSIOS +0xC169 # HANGUL SYLLABLE SIOS-YEO-IEUNG +0xC16A # HANGUL SYLLABLE SIOS-YEO-CIEUC +0xC16B # HANGUL SYLLABLE SIOS-YEO-CHIEUCH +0xC16C # HANGUL SYLLABLE SIOS-YEO-KHIEUKH +0xC16D # HANGUL SYLLABLE SIOS-YEO-THIEUTH +0xC16E # HANGUL SYLLABLE SIOS-YEO-PHIEUPH +0xC16F # HANGUL SYLLABLE SIOS-YEO-HIEUH +0xC170 # HANGUL SYLLABLE SIOS-YE +0xC171 # HANGUL SYLLABLE SIOS-YE-KIYEOK +0xC172 # HANGUL SYLLABLE SIOS-YE-SSANGKIYEOK +0xC173 # HANGUL SYLLABLE SIOS-YE-KIYEOKSIOS +0xC174 # HANGUL SYLLABLE SIOS-YE-NIEUN +0xC175 # HANGUL SYLLABLE SIOS-YE-NIEUNCIEUC +0xC176 # HANGUL SYLLABLE SIOS-YE-NIEUNHIEUH +0xC177 # HANGUL SYLLABLE SIOS-YE-TIKEUT +0xC178 # HANGUL SYLLABLE SIOS-YE-RIEUL +0xC179 # HANGUL SYLLABLE SIOS-YE-RIEULKIYEOK +0xC17A # HANGUL SYLLABLE SIOS-YE-RIEULMIEUM +0xC17B # HANGUL SYLLABLE SIOS-YE-RIEULPIEUP +0xC17C # HANGUL SYLLABLE SIOS-YE-RIEULSIOS +0xC17D # HANGUL SYLLABLE SIOS-YE-RIEULTHIEUTH +0xC17E # HANGUL SYLLABLE SIOS-YE-RIEULPHIEUPH +0xC17F # HANGUL SYLLABLE SIOS-YE-RIEULHIEUH +0xC180 # HANGUL SYLLABLE SIOS-YE-MIEUM +0xC181 # HANGUL SYLLABLE SIOS-YE-PIEUP +0xC182 # HANGUL SYLLABLE SIOS-YE-PIEUPSIOS +0xC183 # HANGUL SYLLABLE SIOS-YE-SIOS +0xC184 # HANGUL SYLLABLE SIOS-YE-SSANGSIOS +0xC185 # HANGUL SYLLABLE SIOS-YE-IEUNG +0xC186 # HANGUL SYLLABLE SIOS-YE-CIEUC +0xC187 # HANGUL SYLLABLE SIOS-YE-CHIEUCH +0xC188 # HANGUL SYLLABLE SIOS-YE-KHIEUKH +0xC189 # HANGUL SYLLABLE SIOS-YE-THIEUTH +0xC18A # HANGUL SYLLABLE SIOS-YE-PHIEUPH +0xC18B # HANGUL SYLLABLE SIOS-YE-HIEUH +0xC18C # HANGUL SYLLABLE SIOS-O +0xC18D # HANGUL SYLLABLE SIOS-O-KIYEOK +0xC18E # HANGUL SYLLABLE SIOS-O-SSANGKIYEOK +0xC18F # HANGUL SYLLABLE SIOS-O-KIYEOKSIOS +0xC190 # HANGUL SYLLABLE SIOS-O-NIEUN +0xC191 # HANGUL SYLLABLE SIOS-O-NIEUNCIEUC +0xC192 # HANGUL SYLLABLE SIOS-O-NIEUNHIEUH +0xC193 # HANGUL SYLLABLE SIOS-O-TIKEUT +0xC194 # HANGUL SYLLABLE SIOS-O-RIEUL +0xC195 # HANGUL SYLLABLE SIOS-O-RIEULKIYEOK +0xC196 # HANGUL SYLLABLE SIOS-O-RIEULMIEUM +0xC197 # HANGUL SYLLABLE SIOS-O-RIEULPIEUP +0xC198 # HANGUL SYLLABLE SIOS-O-RIEULSIOS +0xC199 # HANGUL SYLLABLE SIOS-O-RIEULTHIEUTH +0xC19A # HANGUL SYLLABLE SIOS-O-RIEULPHIEUPH +0xC19B # HANGUL SYLLABLE SIOS-O-RIEULHIEUH +0xC19C # HANGUL SYLLABLE SIOS-O-MIEUM +0xC19D # HANGUL SYLLABLE SIOS-O-PIEUP +0xC19E # HANGUL SYLLABLE SIOS-O-PIEUPSIOS +0xC19F # HANGUL SYLLABLE SIOS-O-SIOS +0xC1A0 # HANGUL SYLLABLE SIOS-O-SSANGSIOS +0xC1A1 # HANGUL SYLLABLE SIOS-O-IEUNG +0xC1A2 # HANGUL SYLLABLE SIOS-O-CIEUC +0xC1A3 # HANGUL SYLLABLE SIOS-O-CHIEUCH +0xC1A4 # HANGUL SYLLABLE SIOS-O-KHIEUKH +0xC1A5 # HANGUL SYLLABLE SIOS-O-THIEUTH +0xC1A6 # HANGUL SYLLABLE SIOS-O-PHIEUPH +0xC1A7 # HANGUL SYLLABLE SIOS-O-HIEUH +0xC1A8 # HANGUL SYLLABLE SIOS-WA +0xC1A9 # HANGUL SYLLABLE SIOS-WA-KIYEOK +0xC1AA # HANGUL SYLLABLE SIOS-WA-SSANGKIYEOK +0xC1AB # HANGUL SYLLABLE SIOS-WA-KIYEOKSIOS +0xC1AC # HANGUL SYLLABLE SIOS-WA-NIEUN +0xC1AD # HANGUL SYLLABLE SIOS-WA-NIEUNCIEUC +0xC1AE # HANGUL SYLLABLE SIOS-WA-NIEUNHIEUH +0xC1AF # HANGUL SYLLABLE SIOS-WA-TIKEUT +0xC1B0 # HANGUL SYLLABLE SIOS-WA-RIEUL +0xC1B1 # HANGUL SYLLABLE SIOS-WA-RIEULKIYEOK +0xC1B2 # HANGUL SYLLABLE SIOS-WA-RIEULMIEUM +0xC1B3 # HANGUL SYLLABLE SIOS-WA-RIEULPIEUP +0xC1B4 # HANGUL SYLLABLE SIOS-WA-RIEULSIOS +0xC1B5 # HANGUL SYLLABLE SIOS-WA-RIEULTHIEUTH +0xC1B6 # HANGUL SYLLABLE SIOS-WA-RIEULPHIEUPH +0xC1B7 # HANGUL SYLLABLE SIOS-WA-RIEULHIEUH +0xC1B8 # HANGUL SYLLABLE SIOS-WA-MIEUM +0xC1B9 # HANGUL SYLLABLE SIOS-WA-PIEUP +0xC1BA # HANGUL SYLLABLE SIOS-WA-PIEUPSIOS +0xC1BB # HANGUL SYLLABLE SIOS-WA-SIOS +0xC1BC # HANGUL SYLLABLE SIOS-WA-SSANGSIOS +0xC1BD # HANGUL SYLLABLE SIOS-WA-IEUNG +0xC1BE # HANGUL SYLLABLE SIOS-WA-CIEUC +0xC1BF # HANGUL SYLLABLE SIOS-WA-CHIEUCH +0xC1C0 # HANGUL SYLLABLE SIOS-WA-KHIEUKH +0xC1C1 # HANGUL SYLLABLE SIOS-WA-THIEUTH +0xC1C2 # HANGUL SYLLABLE SIOS-WA-PHIEUPH +0xC1C3 # HANGUL SYLLABLE SIOS-WA-HIEUH +0xC1C4 # HANGUL SYLLABLE SIOS-WAE +0xC1C5 # HANGUL SYLLABLE SIOS-WAE-KIYEOK +0xC1C6 # HANGUL SYLLABLE SIOS-WAE-SSANGKIYEOK +0xC1C7 # HANGUL SYLLABLE SIOS-WAE-KIYEOKSIOS +0xC1C8 # HANGUL SYLLABLE SIOS-WAE-NIEUN +0xC1C9 # HANGUL SYLLABLE SIOS-WAE-NIEUNCIEUC +0xC1CA # HANGUL SYLLABLE SIOS-WAE-NIEUNHIEUH +0xC1CB # HANGUL SYLLABLE SIOS-WAE-TIKEUT +0xC1CC # HANGUL SYLLABLE SIOS-WAE-RIEUL +0xC1CD # HANGUL SYLLABLE SIOS-WAE-RIEULKIYEOK +0xC1CE # HANGUL SYLLABLE SIOS-WAE-RIEULMIEUM +0xC1CF # HANGUL SYLLABLE SIOS-WAE-RIEULPIEUP +0xC1D0 # HANGUL SYLLABLE SIOS-WAE-RIEULSIOS +0xC1D1 # HANGUL SYLLABLE SIOS-WAE-RIEULTHIEUTH +0xC1D2 # HANGUL SYLLABLE SIOS-WAE-RIEULPHIEUPH +0xC1D3 # HANGUL SYLLABLE SIOS-WAE-RIEULHIEUH +0xC1D4 # HANGUL SYLLABLE SIOS-WAE-MIEUM +0xC1D5 # HANGUL SYLLABLE SIOS-WAE-PIEUP +0xC1D6 # HANGUL SYLLABLE SIOS-WAE-PIEUPSIOS +0xC1D7 # HANGUL SYLLABLE SIOS-WAE-SIOS +0xC1D8 # HANGUL SYLLABLE SIOS-WAE-SSANGSIOS +0xC1D9 # HANGUL SYLLABLE SIOS-WAE-IEUNG +0xC1DA # HANGUL SYLLABLE SIOS-WAE-CIEUC +0xC1DB # HANGUL SYLLABLE SIOS-WAE-CHIEUCH +0xC1DC # HANGUL SYLLABLE SIOS-WAE-KHIEUKH +0xC1DD # HANGUL SYLLABLE SIOS-WAE-THIEUTH +0xC1DE # HANGUL SYLLABLE SIOS-WAE-PHIEUPH +0xC1DF # HANGUL SYLLABLE SIOS-WAE-HIEUH +0xC1E0 # HANGUL SYLLABLE SIOS-OE +0xC1E1 # HANGUL SYLLABLE SIOS-OE-KIYEOK +0xC1E2 # HANGUL SYLLABLE SIOS-OE-SSANGKIYEOK +0xC1E3 # HANGUL SYLLABLE SIOS-OE-KIYEOKSIOS +0xC1E4 # HANGUL SYLLABLE SIOS-OE-NIEUN +0xC1E5 # HANGUL SYLLABLE SIOS-OE-NIEUNCIEUC +0xC1E6 # HANGUL SYLLABLE SIOS-OE-NIEUNHIEUH +0xC1E7 # HANGUL SYLLABLE SIOS-OE-TIKEUT +0xC1E8 # HANGUL SYLLABLE SIOS-OE-RIEUL +0xC1E9 # HANGUL SYLLABLE SIOS-OE-RIEULKIYEOK +0xC1EA # HANGUL SYLLABLE SIOS-OE-RIEULMIEUM +0xC1EB # HANGUL SYLLABLE SIOS-OE-RIEULPIEUP +0xC1EC # HANGUL SYLLABLE SIOS-OE-RIEULSIOS +0xC1ED # HANGUL SYLLABLE SIOS-OE-RIEULTHIEUTH +0xC1EE # HANGUL SYLLABLE SIOS-OE-RIEULPHIEUPH +0xC1EF # HANGUL SYLLABLE SIOS-OE-RIEULHIEUH +0xC1F0 # HANGUL SYLLABLE SIOS-OE-MIEUM +0xC1F1 # HANGUL SYLLABLE SIOS-OE-PIEUP +0xC1F2 # HANGUL SYLLABLE SIOS-OE-PIEUPSIOS +0xC1F3 # HANGUL SYLLABLE SIOS-OE-SIOS +0xC1F4 # HANGUL SYLLABLE SIOS-OE-SSANGSIOS +0xC1F5 # HANGUL SYLLABLE SIOS-OE-IEUNG +0xC1F6 # HANGUL SYLLABLE SIOS-OE-CIEUC +0xC1F7 # HANGUL SYLLABLE SIOS-OE-CHIEUCH +0xC1F8 # HANGUL SYLLABLE SIOS-OE-KHIEUKH +0xC1F9 # HANGUL SYLLABLE SIOS-OE-THIEUTH +0xC1FA # HANGUL SYLLABLE SIOS-OE-PHIEUPH +0xC1FB # HANGUL SYLLABLE SIOS-OE-HIEUH +0xC1FC # HANGUL SYLLABLE SIOS-YO +0xC1FD # HANGUL SYLLABLE SIOS-YO-KIYEOK +0xC1FE # HANGUL SYLLABLE SIOS-YO-SSANGKIYEOK +0xC1FF # HANGUL SYLLABLE SIOS-YO-KIYEOKSIOS +0xC200 # HANGUL SYLLABLE SIOS-YO-NIEUN +0xC201 # HANGUL SYLLABLE SIOS-YO-NIEUNCIEUC +0xC202 # HANGUL SYLLABLE SIOS-YO-NIEUNHIEUH +0xC203 # HANGUL SYLLABLE SIOS-YO-TIKEUT +0xC204 # HANGUL SYLLABLE SIOS-YO-RIEUL +0xC205 # HANGUL SYLLABLE SIOS-YO-RIEULKIYEOK +0xC206 # HANGUL SYLLABLE SIOS-YO-RIEULMIEUM +0xC207 # HANGUL SYLLABLE SIOS-YO-RIEULPIEUP +0xC208 # HANGUL SYLLABLE SIOS-YO-RIEULSIOS +0xC209 # HANGUL SYLLABLE SIOS-YO-RIEULTHIEUTH +0xC20A # HANGUL SYLLABLE SIOS-YO-RIEULPHIEUPH +0xC20B # HANGUL SYLLABLE SIOS-YO-RIEULHIEUH +0xC20C # HANGUL SYLLABLE SIOS-YO-MIEUM +0xC20D # HANGUL SYLLABLE SIOS-YO-PIEUP +0xC20E # HANGUL SYLLABLE SIOS-YO-PIEUPSIOS +0xC20F # HANGUL SYLLABLE SIOS-YO-SIOS +0xC210 # HANGUL SYLLABLE SIOS-YO-SSANGSIOS +0xC211 # HANGUL SYLLABLE SIOS-YO-IEUNG +0xC212 # HANGUL SYLLABLE SIOS-YO-CIEUC +0xC213 # HANGUL SYLLABLE SIOS-YO-CHIEUCH +0xC214 # HANGUL SYLLABLE SIOS-YO-KHIEUKH +0xC215 # HANGUL SYLLABLE SIOS-YO-THIEUTH +0xC216 # HANGUL SYLLABLE SIOS-YO-PHIEUPH +0xC217 # HANGUL SYLLABLE SIOS-YO-HIEUH +0xC218 # HANGUL SYLLABLE SIOS-U +0xC219 # HANGUL SYLLABLE SIOS-U-KIYEOK +0xC21A # HANGUL SYLLABLE SIOS-U-SSANGKIYEOK +0xC21B # HANGUL SYLLABLE SIOS-U-KIYEOKSIOS +0xC21C # HANGUL SYLLABLE SIOS-U-NIEUN +0xC21D # HANGUL SYLLABLE SIOS-U-NIEUNCIEUC +0xC21E # HANGUL SYLLABLE SIOS-U-NIEUNHIEUH +0xC21F # HANGUL SYLLABLE SIOS-U-TIKEUT +0xC220 # HANGUL SYLLABLE SIOS-U-RIEUL +0xC221 # HANGUL SYLLABLE SIOS-U-RIEULKIYEOK +0xC222 # HANGUL SYLLABLE SIOS-U-RIEULMIEUM +0xC223 # HANGUL SYLLABLE SIOS-U-RIEULPIEUP +0xC224 # HANGUL SYLLABLE SIOS-U-RIEULSIOS +0xC225 # HANGUL SYLLABLE SIOS-U-RIEULTHIEUTH +0xC226 # HANGUL SYLLABLE SIOS-U-RIEULPHIEUPH +0xC227 # HANGUL SYLLABLE SIOS-U-RIEULHIEUH +0xC228 # HANGUL SYLLABLE SIOS-U-MIEUM +0xC229 # HANGUL SYLLABLE SIOS-U-PIEUP +0xC22A # HANGUL SYLLABLE SIOS-U-PIEUPSIOS +0xC22B # HANGUL SYLLABLE SIOS-U-SIOS +0xC22C # HANGUL SYLLABLE SIOS-U-SSANGSIOS +0xC22D # HANGUL SYLLABLE SIOS-U-IEUNG +0xC22E # HANGUL SYLLABLE SIOS-U-CIEUC +0xC22F # HANGUL SYLLABLE SIOS-U-CHIEUCH +0xC230 # HANGUL SYLLABLE SIOS-U-KHIEUKH +0xC231 # HANGUL SYLLABLE SIOS-U-THIEUTH +0xC232 # HANGUL SYLLABLE SIOS-U-PHIEUPH +0xC233 # HANGUL SYLLABLE SIOS-U-HIEUH +0xC234 # HANGUL SYLLABLE SIOS-WEO +0xC235 # HANGUL SYLLABLE SIOS-WEO-KIYEOK +0xC236 # HANGUL SYLLABLE SIOS-WEO-SSANGKIYEOK +0xC237 # HANGUL SYLLABLE SIOS-WEO-KIYEOKSIOS +0xC238 # HANGUL SYLLABLE SIOS-WEO-NIEUN +0xC239 # HANGUL SYLLABLE SIOS-WEO-NIEUNCIEUC +0xC23A # HANGUL SYLLABLE SIOS-WEO-NIEUNHIEUH +0xC23B # HANGUL SYLLABLE SIOS-WEO-TIKEUT +0xC23C # HANGUL SYLLABLE SIOS-WEO-RIEUL +0xC23D # HANGUL SYLLABLE SIOS-WEO-RIEULKIYEOK +0xC23E # HANGUL SYLLABLE SIOS-WEO-RIEULMIEUM +0xC23F # HANGUL SYLLABLE SIOS-WEO-RIEULPIEUP +0xC240 # HANGUL SYLLABLE SIOS-WEO-RIEULSIOS +0xC241 # HANGUL SYLLABLE SIOS-WEO-RIEULTHIEUTH +0xC242 # HANGUL SYLLABLE SIOS-WEO-RIEULPHIEUPH +0xC243 # HANGUL SYLLABLE SIOS-WEO-RIEULHIEUH +0xC244 # HANGUL SYLLABLE SIOS-WEO-MIEUM +0xC245 # HANGUL SYLLABLE SIOS-WEO-PIEUP +0xC246 # HANGUL SYLLABLE SIOS-WEO-PIEUPSIOS +0xC247 # HANGUL SYLLABLE SIOS-WEO-SIOS +0xC248 # HANGUL SYLLABLE SIOS-WEO-SSANGSIOS +0xC249 # HANGUL SYLLABLE SIOS-WEO-IEUNG +0xC24A # HANGUL SYLLABLE SIOS-WEO-CIEUC +0xC24B # HANGUL SYLLABLE SIOS-WEO-CHIEUCH +0xC24C # HANGUL SYLLABLE SIOS-WEO-KHIEUKH +0xC24D # HANGUL SYLLABLE SIOS-WEO-THIEUTH +0xC24E # HANGUL SYLLABLE SIOS-WEO-PHIEUPH +0xC24F # HANGUL SYLLABLE SIOS-WEO-HIEUH +0xC250 # HANGUL SYLLABLE SIOS-WE +0xC251 # HANGUL SYLLABLE SIOS-WE-KIYEOK +0xC252 # HANGUL SYLLABLE SIOS-WE-SSANGKIYEOK +0xC253 # HANGUL SYLLABLE SIOS-WE-KIYEOKSIOS +0xC254 # HANGUL SYLLABLE SIOS-WE-NIEUN +0xC255 # HANGUL SYLLABLE SIOS-WE-NIEUNCIEUC +0xC256 # HANGUL SYLLABLE SIOS-WE-NIEUNHIEUH +0xC257 # HANGUL SYLLABLE SIOS-WE-TIKEUT +0xC258 # HANGUL SYLLABLE SIOS-WE-RIEUL +0xC259 # HANGUL SYLLABLE SIOS-WE-RIEULKIYEOK +0xC25A # HANGUL SYLLABLE SIOS-WE-RIEULMIEUM +0xC25B # HANGUL SYLLABLE SIOS-WE-RIEULPIEUP +0xC25C # HANGUL SYLLABLE SIOS-WE-RIEULSIOS +0xC25D # HANGUL SYLLABLE SIOS-WE-RIEULTHIEUTH +0xC25E # HANGUL SYLLABLE SIOS-WE-RIEULPHIEUPH +0xC25F # HANGUL SYLLABLE SIOS-WE-RIEULHIEUH +0xC260 # HANGUL SYLLABLE SIOS-WE-MIEUM +0xC261 # HANGUL SYLLABLE SIOS-WE-PIEUP +0xC262 # HANGUL SYLLABLE SIOS-WE-PIEUPSIOS +0xC263 # HANGUL SYLLABLE SIOS-WE-SIOS +0xC264 # HANGUL SYLLABLE SIOS-WE-SSANGSIOS +0xC265 # HANGUL SYLLABLE SIOS-WE-IEUNG +0xC266 # HANGUL SYLLABLE SIOS-WE-CIEUC +0xC267 # HANGUL SYLLABLE SIOS-WE-CHIEUCH +0xC268 # HANGUL SYLLABLE SIOS-WE-KHIEUKH +0xC269 # HANGUL SYLLABLE SIOS-WE-THIEUTH +0xC26A # HANGUL SYLLABLE SIOS-WE-PHIEUPH +0xC26B # HANGUL SYLLABLE SIOS-WE-HIEUH +0xC26C # HANGUL SYLLABLE SIOS-WI +0xC26D # HANGUL SYLLABLE SIOS-WI-KIYEOK +0xC26E # HANGUL SYLLABLE SIOS-WI-SSANGKIYEOK +0xC26F # HANGUL SYLLABLE SIOS-WI-KIYEOKSIOS +0xC270 # HANGUL SYLLABLE SIOS-WI-NIEUN +0xC271 # HANGUL SYLLABLE SIOS-WI-NIEUNCIEUC +0xC272 # HANGUL SYLLABLE SIOS-WI-NIEUNHIEUH +0xC273 # HANGUL SYLLABLE SIOS-WI-TIKEUT +0xC274 # HANGUL SYLLABLE SIOS-WI-RIEUL +0xC275 # HANGUL SYLLABLE SIOS-WI-RIEULKIYEOK +0xC276 # HANGUL SYLLABLE SIOS-WI-RIEULMIEUM +0xC277 # HANGUL SYLLABLE SIOS-WI-RIEULPIEUP +0xC278 # HANGUL SYLLABLE SIOS-WI-RIEULSIOS +0xC279 # HANGUL SYLLABLE SIOS-WI-RIEULTHIEUTH +0xC27A # HANGUL SYLLABLE SIOS-WI-RIEULPHIEUPH +0xC27B # HANGUL SYLLABLE SIOS-WI-RIEULHIEUH +0xC27C # HANGUL SYLLABLE SIOS-WI-MIEUM +0xC27D # HANGUL SYLLABLE SIOS-WI-PIEUP +0xC27E # HANGUL SYLLABLE SIOS-WI-PIEUPSIOS +0xC27F # HANGUL SYLLABLE SIOS-WI-SIOS +0xC280 # HANGUL SYLLABLE SIOS-WI-SSANGSIOS +0xC281 # HANGUL SYLLABLE SIOS-WI-IEUNG +0xC282 # HANGUL SYLLABLE SIOS-WI-CIEUC +0xC283 # HANGUL SYLLABLE SIOS-WI-CHIEUCH +0xC284 # HANGUL SYLLABLE SIOS-WI-KHIEUKH +0xC285 # HANGUL SYLLABLE SIOS-WI-THIEUTH +0xC286 # HANGUL SYLLABLE SIOS-WI-PHIEUPH +0xC287 # HANGUL SYLLABLE SIOS-WI-HIEUH +0xC288 # HANGUL SYLLABLE SIOS-YU +0xC289 # HANGUL SYLLABLE SIOS-YU-KIYEOK +0xC28A # HANGUL SYLLABLE SIOS-YU-SSANGKIYEOK +0xC28B # HANGUL SYLLABLE SIOS-YU-KIYEOKSIOS +0xC28C # HANGUL SYLLABLE SIOS-YU-NIEUN +0xC28D # HANGUL SYLLABLE SIOS-YU-NIEUNCIEUC +0xC28E # HANGUL SYLLABLE SIOS-YU-NIEUNHIEUH +0xC28F # HANGUL SYLLABLE SIOS-YU-TIKEUT +0xC290 # HANGUL SYLLABLE SIOS-YU-RIEUL +0xC291 # HANGUL SYLLABLE SIOS-YU-RIEULKIYEOK +0xC292 # HANGUL SYLLABLE SIOS-YU-RIEULMIEUM +0xC293 # HANGUL SYLLABLE SIOS-YU-RIEULPIEUP +0xC294 # HANGUL SYLLABLE SIOS-YU-RIEULSIOS +0xC295 # HANGUL SYLLABLE SIOS-YU-RIEULTHIEUTH +0xC296 # HANGUL SYLLABLE SIOS-YU-RIEULPHIEUPH +0xC297 # HANGUL SYLLABLE SIOS-YU-RIEULHIEUH +0xC298 # HANGUL SYLLABLE SIOS-YU-MIEUM +0xC299 # HANGUL SYLLABLE SIOS-YU-PIEUP +0xC29A # HANGUL SYLLABLE SIOS-YU-PIEUPSIOS +0xC29B # HANGUL SYLLABLE SIOS-YU-SIOS +0xC29C # HANGUL SYLLABLE SIOS-YU-SSANGSIOS +0xC29D # HANGUL SYLLABLE SIOS-YU-IEUNG +0xC29E # HANGUL SYLLABLE SIOS-YU-CIEUC +0xC29F # HANGUL SYLLABLE SIOS-YU-CHIEUCH +0xC2A0 # HANGUL SYLLABLE SIOS-YU-KHIEUKH +0xC2A1 # HANGUL SYLLABLE SIOS-YU-THIEUTH +0xC2A2 # HANGUL SYLLABLE SIOS-YU-PHIEUPH +0xC2A3 # HANGUL SYLLABLE SIOS-YU-HIEUH +0xC2A4 # HANGUL SYLLABLE SIOS-EU +0xC2A5 # HANGUL SYLLABLE SIOS-EU-KIYEOK +0xC2A6 # HANGUL SYLLABLE SIOS-EU-SSANGKIYEOK +0xC2A7 # HANGUL SYLLABLE SIOS-EU-KIYEOKSIOS +0xC2A8 # HANGUL SYLLABLE SIOS-EU-NIEUN +0xC2A9 # HANGUL SYLLABLE SIOS-EU-NIEUNCIEUC +0xC2AA # HANGUL SYLLABLE SIOS-EU-NIEUNHIEUH +0xC2AB # HANGUL SYLLABLE SIOS-EU-TIKEUT +0xC2AC # HANGUL SYLLABLE SIOS-EU-RIEUL +0xC2AD # HANGUL SYLLABLE SIOS-EU-RIEULKIYEOK +0xC2AE # HANGUL SYLLABLE SIOS-EU-RIEULMIEUM +0xC2AF # HANGUL SYLLABLE SIOS-EU-RIEULPIEUP +0xC2B0 # HANGUL SYLLABLE SIOS-EU-RIEULSIOS +0xC2B1 # HANGUL SYLLABLE SIOS-EU-RIEULTHIEUTH +0xC2B2 # HANGUL SYLLABLE SIOS-EU-RIEULPHIEUPH +0xC2B3 # HANGUL SYLLABLE SIOS-EU-RIEULHIEUH +0xC2B4 # HANGUL SYLLABLE SIOS-EU-MIEUM +0xC2B5 # HANGUL SYLLABLE SIOS-EU-PIEUP +0xC2B6 # HANGUL SYLLABLE SIOS-EU-PIEUPSIOS +0xC2B7 # HANGUL SYLLABLE SIOS-EU-SIOS +0xC2B8 # HANGUL SYLLABLE SIOS-EU-SSANGSIOS +0xC2B9 # HANGUL SYLLABLE SIOS-EU-IEUNG +0xC2BA # HANGUL SYLLABLE SIOS-EU-CIEUC +0xC2BB # HANGUL SYLLABLE SIOS-EU-CHIEUCH +0xC2BC # HANGUL SYLLABLE SIOS-EU-KHIEUKH +0xC2BD # HANGUL SYLLABLE SIOS-EU-THIEUTH +0xC2BE # HANGUL SYLLABLE SIOS-EU-PHIEUPH +0xC2BF # HANGUL SYLLABLE SIOS-EU-HIEUH +0xC2C0 # HANGUL SYLLABLE SIOS-YI +0xC2C1 # HANGUL SYLLABLE SIOS-YI-KIYEOK +0xC2C2 # HANGUL SYLLABLE SIOS-YI-SSANGKIYEOK +0xC2C3 # HANGUL SYLLABLE SIOS-YI-KIYEOKSIOS +0xC2C4 # HANGUL SYLLABLE SIOS-YI-NIEUN +0xC2C5 # HANGUL SYLLABLE SIOS-YI-NIEUNCIEUC +0xC2C6 # HANGUL SYLLABLE SIOS-YI-NIEUNHIEUH +0xC2C7 # HANGUL SYLLABLE SIOS-YI-TIKEUT +0xC2C8 # HANGUL SYLLABLE SIOS-YI-RIEUL +0xC2C9 # HANGUL SYLLABLE SIOS-YI-RIEULKIYEOK +0xC2CA # HANGUL SYLLABLE SIOS-YI-RIEULMIEUM +0xC2CB # HANGUL SYLLABLE SIOS-YI-RIEULPIEUP +0xC2CC # HANGUL SYLLABLE SIOS-YI-RIEULSIOS +0xC2CD # HANGUL SYLLABLE SIOS-YI-RIEULTHIEUTH +0xC2CE # HANGUL SYLLABLE SIOS-YI-RIEULPHIEUPH +0xC2CF # HANGUL SYLLABLE SIOS-YI-RIEULHIEUH +0xC2D0 # HANGUL SYLLABLE SIOS-YI-MIEUM +0xC2D1 # HANGUL SYLLABLE SIOS-YI-PIEUP +0xC2D2 # HANGUL SYLLABLE SIOS-YI-PIEUPSIOS +0xC2D3 # HANGUL SYLLABLE SIOS-YI-SIOS +0xC2D4 # HANGUL SYLLABLE SIOS-YI-SSANGSIOS +0xC2D5 # HANGUL SYLLABLE SIOS-YI-IEUNG +0xC2D6 # HANGUL SYLLABLE SIOS-YI-CIEUC +0xC2D7 # HANGUL SYLLABLE SIOS-YI-CHIEUCH +0xC2D8 # HANGUL SYLLABLE SIOS-YI-KHIEUKH +0xC2D9 # HANGUL SYLLABLE SIOS-YI-THIEUTH +0xC2DA # HANGUL SYLLABLE SIOS-YI-PHIEUPH +0xC2DB # HANGUL SYLLABLE SIOS-YI-HIEUH +0xC2DC # HANGUL SYLLABLE SIOS-I +0xC2DD # HANGUL SYLLABLE SIOS-I-KIYEOK +0xC2DE # HANGUL SYLLABLE SIOS-I-SSANGKIYEOK +0xC2DF # HANGUL SYLLABLE SIOS-I-KIYEOKSIOS +0xC2E0 # HANGUL SYLLABLE SIOS-I-NIEUN +0xC2E1 # HANGUL SYLLABLE SIOS-I-NIEUNCIEUC +0xC2E2 # HANGUL SYLLABLE SIOS-I-NIEUNHIEUH +0xC2E3 # HANGUL SYLLABLE SIOS-I-TIKEUT +0xC2E4 # HANGUL SYLLABLE SIOS-I-RIEUL +0xC2E5 # HANGUL SYLLABLE SIOS-I-RIEULKIYEOK +0xC2E6 # HANGUL SYLLABLE SIOS-I-RIEULMIEUM +0xC2E7 # HANGUL SYLLABLE SIOS-I-RIEULPIEUP +0xC2E8 # HANGUL SYLLABLE SIOS-I-RIEULSIOS +0xC2E9 # HANGUL SYLLABLE SIOS-I-RIEULTHIEUTH +0xC2EA # HANGUL SYLLABLE SIOS-I-RIEULPHIEUPH +0xC2EB # HANGUL SYLLABLE SIOS-I-RIEULHIEUH +0xC2EC # HANGUL SYLLABLE SIOS-I-MIEUM +0xC2ED # HANGUL SYLLABLE SIOS-I-PIEUP +0xC2EE # HANGUL SYLLABLE SIOS-I-PIEUPSIOS +0xC2EF # HANGUL SYLLABLE SIOS-I-SIOS +0xC2F0 # HANGUL SYLLABLE SIOS-I-SSANGSIOS +0xC2F1 # HANGUL SYLLABLE SIOS-I-IEUNG +0xC2F2 # HANGUL SYLLABLE SIOS-I-CIEUC +0xC2F3 # HANGUL SYLLABLE SIOS-I-CHIEUCH +0xC2F4 # HANGUL SYLLABLE SIOS-I-KHIEUKH +0xC2F5 # HANGUL SYLLABLE SIOS-I-THIEUTH +0xC2F6 # HANGUL SYLLABLE SIOS-I-PHIEUPH +0xC2F7 # HANGUL SYLLABLE SIOS-I-HIEUH +0xC2F8 # HANGUL SYLLABLE SSANGSIOS-A +0xC2F9 # HANGUL SYLLABLE SSANGSIOS-A-KIYEOK +0xC2FA # HANGUL SYLLABLE SSANGSIOS-A-SSANGKIYEOK +0xC2FB # HANGUL SYLLABLE SSANGSIOS-A-KIYEOKSIOS +0xC2FC # HANGUL SYLLABLE SSANGSIOS-A-NIEUN +0xC2FD # HANGUL SYLLABLE SSANGSIOS-A-NIEUNCIEUC +0xC2FE # HANGUL SYLLABLE SSANGSIOS-A-NIEUNHIEUH +0xC2FF # HANGUL SYLLABLE SSANGSIOS-A-TIKEUT +0xC300 # HANGUL SYLLABLE SSANGSIOS-A-RIEUL +0xC301 # HANGUL SYLLABLE SSANGSIOS-A-RIEULKIYEOK +0xC302 # HANGUL SYLLABLE SSANGSIOS-A-RIEULMIEUM +0xC303 # HANGUL SYLLABLE SSANGSIOS-A-RIEULPIEUP +0xC304 # HANGUL SYLLABLE SSANGSIOS-A-RIEULSIOS +0xC305 # HANGUL SYLLABLE SSANGSIOS-A-RIEULTHIEUTH +0xC306 # HANGUL SYLLABLE SSANGSIOS-A-RIEULPHIEUPH +0xC307 # HANGUL SYLLABLE SSANGSIOS-A-RIEULHIEUH +0xC308 # HANGUL SYLLABLE SSANGSIOS-A-MIEUM +0xC309 # HANGUL SYLLABLE SSANGSIOS-A-PIEUP +0xC30A # HANGUL SYLLABLE SSANGSIOS-A-PIEUPSIOS +0xC30B # HANGUL SYLLABLE SSANGSIOS-A-SIOS +0xC30C # HANGUL SYLLABLE SSANGSIOS-A-SSANGSIOS +0xC30D # HANGUL SYLLABLE SSANGSIOS-A-IEUNG +0xC30E # HANGUL SYLLABLE SSANGSIOS-A-CIEUC +0xC30F # HANGUL SYLLABLE SSANGSIOS-A-CHIEUCH +0xC310 # HANGUL SYLLABLE SSANGSIOS-A-KHIEUKH +0xC311 # HANGUL SYLLABLE SSANGSIOS-A-THIEUTH +0xC312 # HANGUL SYLLABLE SSANGSIOS-A-PHIEUPH +0xC313 # HANGUL SYLLABLE SSANGSIOS-A-HIEUH +0xC314 # HANGUL SYLLABLE SSANGSIOS-AE +0xC315 # HANGUL SYLLABLE SSANGSIOS-AE-KIYEOK +0xC316 # HANGUL SYLLABLE SSANGSIOS-AE-SSANGKIYEOK +0xC317 # HANGUL SYLLABLE SSANGSIOS-AE-KIYEOKSIOS +0xC318 # HANGUL SYLLABLE SSANGSIOS-AE-NIEUN +0xC319 # HANGUL SYLLABLE SSANGSIOS-AE-NIEUNCIEUC +0xC31A # HANGUL SYLLABLE SSANGSIOS-AE-NIEUNHIEUH +0xC31B # HANGUL SYLLABLE SSANGSIOS-AE-TIKEUT +0xC31C # HANGUL SYLLABLE SSANGSIOS-AE-RIEUL +0xC31D # HANGUL SYLLABLE SSANGSIOS-AE-RIEULKIYEOK +0xC31E # HANGUL SYLLABLE SSANGSIOS-AE-RIEULMIEUM +0xC31F # HANGUL SYLLABLE SSANGSIOS-AE-RIEULPIEUP +0xC320 # HANGUL SYLLABLE SSANGSIOS-AE-RIEULSIOS +0xC321 # HANGUL SYLLABLE SSANGSIOS-AE-RIEULTHIEUTH +0xC322 # HANGUL SYLLABLE SSANGSIOS-AE-RIEULPHIEUPH +0xC323 # HANGUL SYLLABLE SSANGSIOS-AE-RIEULHIEUH +0xC324 # HANGUL SYLLABLE SSANGSIOS-AE-MIEUM +0xC325 # HANGUL SYLLABLE SSANGSIOS-AE-PIEUP +0xC326 # HANGUL SYLLABLE SSANGSIOS-AE-PIEUPSIOS +0xC327 # HANGUL SYLLABLE SSANGSIOS-AE-SIOS +0xC328 # HANGUL SYLLABLE SSANGSIOS-AE-SSANGSIOS +0xC329 # HANGUL SYLLABLE SSANGSIOS-AE-IEUNG +0xC32A # HANGUL SYLLABLE SSANGSIOS-AE-CIEUC +0xC32B # HANGUL SYLLABLE SSANGSIOS-AE-CHIEUCH +0xC32C # HANGUL SYLLABLE SSANGSIOS-AE-KHIEUKH +0xC32D # HANGUL SYLLABLE SSANGSIOS-AE-THIEUTH +0xC32E # HANGUL SYLLABLE SSANGSIOS-AE-PHIEUPH +0xC32F # HANGUL SYLLABLE SSANGSIOS-AE-HIEUH +0xC330 # HANGUL SYLLABLE SSANGSIOS-YA +0xC331 # HANGUL SYLLABLE SSANGSIOS-YA-KIYEOK +0xC332 # HANGUL SYLLABLE SSANGSIOS-YA-SSANGKIYEOK +0xC333 # HANGUL SYLLABLE SSANGSIOS-YA-KIYEOKSIOS +0xC334 # HANGUL SYLLABLE SSANGSIOS-YA-NIEUN +0xC335 # HANGUL SYLLABLE SSANGSIOS-YA-NIEUNCIEUC +0xC336 # HANGUL SYLLABLE SSANGSIOS-YA-NIEUNHIEUH +0xC337 # HANGUL SYLLABLE SSANGSIOS-YA-TIKEUT +0xC338 # HANGUL SYLLABLE SSANGSIOS-YA-RIEUL +0xC339 # HANGUL SYLLABLE SSANGSIOS-YA-RIEULKIYEOK +0xC33A # HANGUL SYLLABLE SSANGSIOS-YA-RIEULMIEUM +0xC33B # HANGUL SYLLABLE SSANGSIOS-YA-RIEULPIEUP +0xC33C # HANGUL SYLLABLE SSANGSIOS-YA-RIEULSIOS +0xC33D # HANGUL SYLLABLE SSANGSIOS-YA-RIEULTHIEUTH +0xC33E # HANGUL SYLLABLE SSANGSIOS-YA-RIEULPHIEUPH +0xC33F # HANGUL SYLLABLE SSANGSIOS-YA-RIEULHIEUH +0xC340 # HANGUL SYLLABLE SSANGSIOS-YA-MIEUM +0xC341 # HANGUL SYLLABLE SSANGSIOS-YA-PIEUP +0xC342 # HANGUL SYLLABLE SSANGSIOS-YA-PIEUPSIOS +0xC343 # HANGUL SYLLABLE SSANGSIOS-YA-SIOS +0xC344 # HANGUL SYLLABLE SSANGSIOS-YA-SSANGSIOS +0xC345 # HANGUL SYLLABLE SSANGSIOS-YA-IEUNG +0xC346 # HANGUL SYLLABLE SSANGSIOS-YA-CIEUC +0xC347 # HANGUL SYLLABLE SSANGSIOS-YA-CHIEUCH +0xC348 # HANGUL SYLLABLE SSANGSIOS-YA-KHIEUKH +0xC349 # HANGUL SYLLABLE SSANGSIOS-YA-THIEUTH +0xC34A # HANGUL SYLLABLE SSANGSIOS-YA-PHIEUPH +0xC34B # HANGUL SYLLABLE SSANGSIOS-YA-HIEUH +0xC34C # HANGUL SYLLABLE SSANGSIOS-YAE +0xC34D # HANGUL SYLLABLE SSANGSIOS-YAE-KIYEOK +0xC34E # HANGUL SYLLABLE SSANGSIOS-YAE-SSANGKIYEOK +0xC34F # HANGUL SYLLABLE SSANGSIOS-YAE-KIYEOKSIOS +0xC350 # HANGUL SYLLABLE SSANGSIOS-YAE-NIEUN +0xC351 # HANGUL SYLLABLE SSANGSIOS-YAE-NIEUNCIEUC +0xC352 # HANGUL SYLLABLE SSANGSIOS-YAE-NIEUNHIEUH +0xC353 # HANGUL SYLLABLE SSANGSIOS-YAE-TIKEUT +0xC354 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEUL +0xC355 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULKIYEOK +0xC356 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULMIEUM +0xC357 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULPIEUP +0xC358 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULSIOS +0xC359 # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULTHIEUTH +0xC35A # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULPHIEUPH +0xC35B # HANGUL SYLLABLE SSANGSIOS-YAE-RIEULHIEUH +0xC35C # HANGUL SYLLABLE SSANGSIOS-YAE-MIEUM +0xC35D # HANGUL SYLLABLE SSANGSIOS-YAE-PIEUP +0xC35E # HANGUL SYLLABLE SSANGSIOS-YAE-PIEUPSIOS +0xC35F # HANGUL SYLLABLE SSANGSIOS-YAE-SIOS +0xC360 # HANGUL SYLLABLE SSANGSIOS-YAE-SSANGSIOS +0xC361 # HANGUL SYLLABLE SSANGSIOS-YAE-IEUNG +0xC362 # HANGUL SYLLABLE SSANGSIOS-YAE-CIEUC +0xC363 # HANGUL SYLLABLE SSANGSIOS-YAE-CHIEUCH +0xC364 # HANGUL SYLLABLE SSANGSIOS-YAE-KHIEUKH +0xC365 # HANGUL SYLLABLE SSANGSIOS-YAE-THIEUTH +0xC366 # HANGUL SYLLABLE SSANGSIOS-YAE-PHIEUPH +0xC367 # HANGUL SYLLABLE SSANGSIOS-YAE-HIEUH +0xC368 # HANGUL SYLLABLE SSANGSIOS-EO +0xC369 # HANGUL SYLLABLE SSANGSIOS-EO-KIYEOK +0xC36A # HANGUL SYLLABLE SSANGSIOS-EO-SSANGKIYEOK +0xC36B # HANGUL SYLLABLE SSANGSIOS-EO-KIYEOKSIOS +0xC36C # HANGUL SYLLABLE SSANGSIOS-EO-NIEUN +0xC36D # HANGUL SYLLABLE SSANGSIOS-EO-NIEUNCIEUC +0xC36E # HANGUL SYLLABLE SSANGSIOS-EO-NIEUNHIEUH +0xC36F # HANGUL SYLLABLE SSANGSIOS-EO-TIKEUT +0xC370 # HANGUL SYLLABLE SSANGSIOS-EO-RIEUL +0xC371 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULKIYEOK +0xC372 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULMIEUM +0xC373 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULPIEUP +0xC374 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULSIOS +0xC375 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULTHIEUTH +0xC376 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULPHIEUPH +0xC377 # HANGUL SYLLABLE SSANGSIOS-EO-RIEULHIEUH +0xC378 # HANGUL SYLLABLE SSANGSIOS-EO-MIEUM +0xC379 # HANGUL SYLLABLE SSANGSIOS-EO-PIEUP +0xC37A # HANGUL SYLLABLE SSANGSIOS-EO-PIEUPSIOS +0xC37B # HANGUL SYLLABLE SSANGSIOS-EO-SIOS +0xC37C # HANGUL SYLLABLE SSANGSIOS-EO-SSANGSIOS +0xC37D # HANGUL SYLLABLE SSANGSIOS-EO-IEUNG +0xC37E # HANGUL SYLLABLE SSANGSIOS-EO-CIEUC +0xC37F # HANGUL SYLLABLE SSANGSIOS-EO-CHIEUCH +0xC380 # HANGUL SYLLABLE SSANGSIOS-EO-KHIEUKH +0xC381 # HANGUL SYLLABLE SSANGSIOS-EO-THIEUTH +0xC382 # HANGUL SYLLABLE SSANGSIOS-EO-PHIEUPH +0xC383 # HANGUL SYLLABLE SSANGSIOS-EO-HIEUH +0xC384 # HANGUL SYLLABLE SSANGSIOS-E +0xC385 # HANGUL SYLLABLE SSANGSIOS-E-KIYEOK +0xC386 # HANGUL SYLLABLE SSANGSIOS-E-SSANGKIYEOK +0xC387 # HANGUL SYLLABLE SSANGSIOS-E-KIYEOKSIOS +0xC388 # HANGUL SYLLABLE SSANGSIOS-E-NIEUN +0xC389 # HANGUL SYLLABLE SSANGSIOS-E-NIEUNCIEUC +0xC38A # HANGUL SYLLABLE SSANGSIOS-E-NIEUNHIEUH +0xC38B # HANGUL SYLLABLE SSANGSIOS-E-TIKEUT +0xC38C # HANGUL SYLLABLE SSANGSIOS-E-RIEUL +0xC38D # HANGUL SYLLABLE SSANGSIOS-E-RIEULKIYEOK +0xC38E # HANGUL SYLLABLE SSANGSIOS-E-RIEULMIEUM +0xC38F # HANGUL SYLLABLE SSANGSIOS-E-RIEULPIEUP +0xC390 # HANGUL SYLLABLE SSANGSIOS-E-RIEULSIOS +0xC391 # HANGUL SYLLABLE SSANGSIOS-E-RIEULTHIEUTH +0xC392 # HANGUL SYLLABLE SSANGSIOS-E-RIEULPHIEUPH +0xC393 # HANGUL SYLLABLE SSANGSIOS-E-RIEULHIEUH +0xC394 # HANGUL SYLLABLE SSANGSIOS-E-MIEUM +0xC395 # HANGUL SYLLABLE SSANGSIOS-E-PIEUP +0xC396 # HANGUL SYLLABLE SSANGSIOS-E-PIEUPSIOS +0xC397 # HANGUL SYLLABLE SSANGSIOS-E-SIOS +0xC398 # HANGUL SYLLABLE SSANGSIOS-E-SSANGSIOS +0xC399 # HANGUL SYLLABLE SSANGSIOS-E-IEUNG +0xC39A # HANGUL SYLLABLE SSANGSIOS-E-CIEUC +0xC39B # HANGUL SYLLABLE SSANGSIOS-E-CHIEUCH +0xC39C # HANGUL SYLLABLE SSANGSIOS-E-KHIEUKH +0xC39D # HANGUL SYLLABLE SSANGSIOS-E-THIEUTH +0xC39E # HANGUL SYLLABLE SSANGSIOS-E-PHIEUPH +0xC39F # HANGUL SYLLABLE SSANGSIOS-E-HIEUH +0xC3A0 # HANGUL SYLLABLE SSANGSIOS-YEO +0xC3A1 # HANGUL SYLLABLE SSANGSIOS-YEO-KIYEOK +0xC3A2 # HANGUL SYLLABLE SSANGSIOS-YEO-SSANGKIYEOK +0xC3A3 # HANGUL SYLLABLE SSANGSIOS-YEO-KIYEOKSIOS +0xC3A4 # HANGUL SYLLABLE SSANGSIOS-YEO-NIEUN +0xC3A5 # HANGUL SYLLABLE SSANGSIOS-YEO-NIEUNCIEUC +0xC3A6 # HANGUL SYLLABLE SSANGSIOS-YEO-NIEUNHIEUH +0xC3A7 # HANGUL SYLLABLE SSANGSIOS-YEO-TIKEUT +0xC3A8 # HANGUL SYLLABLE SSANGSIOS-YEO-RIEUL +0xC3A9 # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULKIYEOK +0xC3AA # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULMIEUM +0xC3AB # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULPIEUP +0xC3AC # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULSIOS +0xC3AD # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULTHIEUTH +0xC3AE # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULPHIEUPH +0xC3AF # HANGUL SYLLABLE SSANGSIOS-YEO-RIEULHIEUH +0xC3B0 # HANGUL SYLLABLE SSANGSIOS-YEO-MIEUM +0xC3B1 # HANGUL SYLLABLE SSANGSIOS-YEO-PIEUP +0xC3B2 # HANGUL SYLLABLE SSANGSIOS-YEO-PIEUPSIOS +0xC3B3 # HANGUL SYLLABLE SSANGSIOS-YEO-SIOS +0xC3B4 # HANGUL SYLLABLE SSANGSIOS-YEO-SSANGSIOS +0xC3B5 # HANGUL SYLLABLE SSANGSIOS-YEO-IEUNG +0xC3B6 # HANGUL SYLLABLE SSANGSIOS-YEO-CIEUC +0xC3B7 # HANGUL SYLLABLE SSANGSIOS-YEO-CHIEUCH +0xC3B8 # HANGUL SYLLABLE SSANGSIOS-YEO-KHIEUKH +0xC3B9 # HANGUL SYLLABLE SSANGSIOS-YEO-THIEUTH +0xC3BA # HANGUL SYLLABLE SSANGSIOS-YEO-PHIEUPH +0xC3BB # HANGUL SYLLABLE SSANGSIOS-YEO-HIEUH +0xC3BC # HANGUL SYLLABLE SSANGSIOS-YE +0xC3BD # HANGUL SYLLABLE SSANGSIOS-YE-KIYEOK +0xC3BE # HANGUL SYLLABLE SSANGSIOS-YE-SSANGKIYEOK +0xC3BF # HANGUL SYLLABLE SSANGSIOS-YE-KIYEOKSIOS +0xC3C0 # HANGUL SYLLABLE SSANGSIOS-YE-NIEUN +0xC3C1 # HANGUL SYLLABLE SSANGSIOS-YE-NIEUNCIEUC +0xC3C2 # HANGUL SYLLABLE SSANGSIOS-YE-NIEUNHIEUH +0xC3C3 # HANGUL SYLLABLE SSANGSIOS-YE-TIKEUT +0xC3C4 # HANGUL SYLLABLE SSANGSIOS-YE-RIEUL +0xC3C5 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULKIYEOK +0xC3C6 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULMIEUM +0xC3C7 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULPIEUP +0xC3C8 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULSIOS +0xC3C9 # HANGUL SYLLABLE SSANGSIOS-YE-RIEULTHIEUTH +0xC3CA # HANGUL SYLLABLE SSANGSIOS-YE-RIEULPHIEUPH +0xC3CB # HANGUL SYLLABLE SSANGSIOS-YE-RIEULHIEUH +0xC3CC # HANGUL SYLLABLE SSANGSIOS-YE-MIEUM +0xC3CD # HANGUL SYLLABLE SSANGSIOS-YE-PIEUP +0xC3CE # HANGUL SYLLABLE SSANGSIOS-YE-PIEUPSIOS +0xC3CF # HANGUL SYLLABLE SSANGSIOS-YE-SIOS +0xC3D0 # HANGUL SYLLABLE SSANGSIOS-YE-SSANGSIOS +0xC3D1 # HANGUL SYLLABLE SSANGSIOS-YE-IEUNG +0xC3D2 # HANGUL SYLLABLE SSANGSIOS-YE-CIEUC +0xC3D3 # HANGUL SYLLABLE SSANGSIOS-YE-CHIEUCH +0xC3D4 # HANGUL SYLLABLE SSANGSIOS-YE-KHIEUKH +0xC3D5 # HANGUL SYLLABLE SSANGSIOS-YE-THIEUTH +0xC3D6 # HANGUL SYLLABLE SSANGSIOS-YE-PHIEUPH +0xC3D7 # HANGUL SYLLABLE SSANGSIOS-YE-HIEUH +0xC3D8 # HANGUL SYLLABLE SSANGSIOS-O +0xC3D9 # HANGUL SYLLABLE SSANGSIOS-O-KIYEOK +0xC3DA # HANGUL SYLLABLE SSANGSIOS-O-SSANGKIYEOK +0xC3DB # HANGUL SYLLABLE SSANGSIOS-O-KIYEOKSIOS +0xC3DC # HANGUL SYLLABLE SSANGSIOS-O-NIEUN +0xC3DD # HANGUL SYLLABLE SSANGSIOS-O-NIEUNCIEUC +0xC3DE # HANGUL SYLLABLE SSANGSIOS-O-NIEUNHIEUH +0xC3DF # HANGUL SYLLABLE SSANGSIOS-O-TIKEUT +0xC3E0 # HANGUL SYLLABLE SSANGSIOS-O-RIEUL +0xC3E1 # HANGUL SYLLABLE SSANGSIOS-O-RIEULKIYEOK +0xC3E2 # HANGUL SYLLABLE SSANGSIOS-O-RIEULMIEUM +0xC3E3 # HANGUL SYLLABLE SSANGSIOS-O-RIEULPIEUP +0xC3E4 # HANGUL SYLLABLE SSANGSIOS-O-RIEULSIOS +0xC3E5 # HANGUL SYLLABLE SSANGSIOS-O-RIEULTHIEUTH +0xC3E6 # HANGUL SYLLABLE SSANGSIOS-O-RIEULPHIEUPH +0xC3E7 # HANGUL SYLLABLE SSANGSIOS-O-RIEULHIEUH +0xC3E8 # HANGUL SYLLABLE SSANGSIOS-O-MIEUM +0xC3E9 # HANGUL SYLLABLE SSANGSIOS-O-PIEUP +0xC3EA # HANGUL SYLLABLE SSANGSIOS-O-PIEUPSIOS +0xC3EB # HANGUL SYLLABLE SSANGSIOS-O-SIOS +0xC3EC # HANGUL SYLLABLE SSANGSIOS-O-SSANGSIOS +0xC3ED # HANGUL SYLLABLE SSANGSIOS-O-IEUNG +0xC3EE # HANGUL SYLLABLE SSANGSIOS-O-CIEUC +0xC3EF # HANGUL SYLLABLE SSANGSIOS-O-CHIEUCH +0xC3F0 # HANGUL SYLLABLE SSANGSIOS-O-KHIEUKH +0xC3F1 # HANGUL SYLLABLE SSANGSIOS-O-THIEUTH +0xC3F2 # HANGUL SYLLABLE SSANGSIOS-O-PHIEUPH +0xC3F3 # HANGUL SYLLABLE SSANGSIOS-O-HIEUH +0xC3F4 # HANGUL SYLLABLE SSANGSIOS-WA +0xC3F5 # HANGUL SYLLABLE SSANGSIOS-WA-KIYEOK +0xC3F6 # HANGUL SYLLABLE SSANGSIOS-WA-SSANGKIYEOK +0xC3F7 # HANGUL SYLLABLE SSANGSIOS-WA-KIYEOKSIOS +0xC3F8 # HANGUL SYLLABLE SSANGSIOS-WA-NIEUN +0xC3F9 # HANGUL SYLLABLE SSANGSIOS-WA-NIEUNCIEUC +0xC3FA # HANGUL SYLLABLE SSANGSIOS-WA-NIEUNHIEUH +0xC3FB # HANGUL SYLLABLE SSANGSIOS-WA-TIKEUT +0xC3FC # HANGUL SYLLABLE SSANGSIOS-WA-RIEUL +0xC3FD # HANGUL SYLLABLE SSANGSIOS-WA-RIEULKIYEOK +0xC3FE # HANGUL SYLLABLE SSANGSIOS-WA-RIEULMIEUM +0xC3FF # HANGUL SYLLABLE SSANGSIOS-WA-RIEULPIEUP +0xC400 # HANGUL SYLLABLE SSANGSIOS-WA-RIEULSIOS +0xC401 # HANGUL SYLLABLE SSANGSIOS-WA-RIEULTHIEUTH +0xC402 # HANGUL SYLLABLE SSANGSIOS-WA-RIEULPHIEUPH +0xC403 # HANGUL SYLLABLE SSANGSIOS-WA-RIEULHIEUH +0xC404 # HANGUL SYLLABLE SSANGSIOS-WA-MIEUM +0xC405 # HANGUL SYLLABLE SSANGSIOS-WA-PIEUP +0xC406 # HANGUL SYLLABLE SSANGSIOS-WA-PIEUPSIOS +0xC407 # HANGUL SYLLABLE SSANGSIOS-WA-SIOS +0xC408 # HANGUL SYLLABLE SSANGSIOS-WA-SSANGSIOS +0xC409 # HANGUL SYLLABLE SSANGSIOS-WA-IEUNG +0xC40A # HANGUL SYLLABLE SSANGSIOS-WA-CIEUC +0xC40B # HANGUL SYLLABLE SSANGSIOS-WA-CHIEUCH +0xC40C # HANGUL SYLLABLE SSANGSIOS-WA-KHIEUKH +0xC40D # HANGUL SYLLABLE SSANGSIOS-WA-THIEUTH +0xC40E # HANGUL SYLLABLE SSANGSIOS-WA-PHIEUPH +0xC40F # HANGUL SYLLABLE SSANGSIOS-WA-HIEUH +0xC410 # HANGUL SYLLABLE SSANGSIOS-WAE +0xC411 # HANGUL SYLLABLE SSANGSIOS-WAE-KIYEOK +0xC412 # HANGUL SYLLABLE SSANGSIOS-WAE-SSANGKIYEOK +0xC413 # HANGUL SYLLABLE SSANGSIOS-WAE-KIYEOKSIOS +0xC414 # HANGUL SYLLABLE SSANGSIOS-WAE-NIEUN +0xC415 # HANGUL SYLLABLE SSANGSIOS-WAE-NIEUNCIEUC +0xC416 # HANGUL SYLLABLE SSANGSIOS-WAE-NIEUNHIEUH +0xC417 # HANGUL SYLLABLE SSANGSIOS-WAE-TIKEUT +0xC418 # HANGUL SYLLABLE SSANGSIOS-WAE-RIEUL +0xC419 # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULKIYEOK +0xC41A # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULMIEUM +0xC41B # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULPIEUP +0xC41C # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULSIOS +0xC41D # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULTHIEUTH +0xC41E # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULPHIEUPH +0xC41F # HANGUL SYLLABLE SSANGSIOS-WAE-RIEULHIEUH +0xC420 # HANGUL SYLLABLE SSANGSIOS-WAE-MIEUM +0xC421 # HANGUL SYLLABLE SSANGSIOS-WAE-PIEUP +0xC422 # HANGUL SYLLABLE SSANGSIOS-WAE-PIEUPSIOS +0xC423 # HANGUL SYLLABLE SSANGSIOS-WAE-SIOS +0xC424 # HANGUL SYLLABLE SSANGSIOS-WAE-SSANGSIOS +0xC425 # HANGUL SYLLABLE SSANGSIOS-WAE-IEUNG +0xC426 # HANGUL SYLLABLE SSANGSIOS-WAE-CIEUC +0xC427 # HANGUL SYLLABLE SSANGSIOS-WAE-CHIEUCH +0xC428 # HANGUL SYLLABLE SSANGSIOS-WAE-KHIEUKH +0xC429 # HANGUL SYLLABLE SSANGSIOS-WAE-THIEUTH +0xC42A # HANGUL SYLLABLE SSANGSIOS-WAE-PHIEUPH +0xC42B # HANGUL SYLLABLE SSANGSIOS-WAE-HIEUH +0xC42C # HANGUL SYLLABLE SSANGSIOS-OE +0xC42D # HANGUL SYLLABLE SSANGSIOS-OE-KIYEOK +0xC42E # HANGUL SYLLABLE SSANGSIOS-OE-SSANGKIYEOK +0xC42F # HANGUL SYLLABLE SSANGSIOS-OE-KIYEOKSIOS +0xC430 # HANGUL SYLLABLE SSANGSIOS-OE-NIEUN +0xC431 # HANGUL SYLLABLE SSANGSIOS-OE-NIEUNCIEUC +0xC432 # HANGUL SYLLABLE SSANGSIOS-OE-NIEUNHIEUH +0xC433 # HANGUL SYLLABLE SSANGSIOS-OE-TIKEUT +0xC434 # HANGUL SYLLABLE SSANGSIOS-OE-RIEUL +0xC435 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULKIYEOK +0xC436 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULMIEUM +0xC437 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULPIEUP +0xC438 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULSIOS +0xC439 # HANGUL SYLLABLE SSANGSIOS-OE-RIEULTHIEUTH +0xC43A # HANGUL SYLLABLE SSANGSIOS-OE-RIEULPHIEUPH +0xC43B # HANGUL SYLLABLE SSANGSIOS-OE-RIEULHIEUH +0xC43C # HANGUL SYLLABLE SSANGSIOS-OE-MIEUM +0xC43D # HANGUL SYLLABLE SSANGSIOS-OE-PIEUP +0xC43E # HANGUL SYLLABLE SSANGSIOS-OE-PIEUPSIOS +0xC43F # HANGUL SYLLABLE SSANGSIOS-OE-SIOS +0xC440 # HANGUL SYLLABLE SSANGSIOS-OE-SSANGSIOS +0xC441 # HANGUL SYLLABLE SSANGSIOS-OE-IEUNG +0xC442 # HANGUL SYLLABLE SSANGSIOS-OE-CIEUC +0xC443 # HANGUL SYLLABLE SSANGSIOS-OE-CHIEUCH +0xC444 # HANGUL SYLLABLE SSANGSIOS-OE-KHIEUKH +0xC445 # HANGUL SYLLABLE SSANGSIOS-OE-THIEUTH +0xC446 # HANGUL SYLLABLE SSANGSIOS-OE-PHIEUPH +0xC447 # HANGUL SYLLABLE SSANGSIOS-OE-HIEUH +0xC448 # HANGUL SYLLABLE SSANGSIOS-YO +0xC449 # HANGUL SYLLABLE SSANGSIOS-YO-KIYEOK +0xC44A # HANGUL SYLLABLE SSANGSIOS-YO-SSANGKIYEOK +0xC44B # HANGUL SYLLABLE SSANGSIOS-YO-KIYEOKSIOS +0xC44C # HANGUL SYLLABLE SSANGSIOS-YO-NIEUN +0xC44D # HANGUL SYLLABLE SSANGSIOS-YO-NIEUNCIEUC +0xC44E # HANGUL SYLLABLE SSANGSIOS-YO-NIEUNHIEUH +0xC44F # HANGUL SYLLABLE SSANGSIOS-YO-TIKEUT +0xC450 # HANGUL SYLLABLE SSANGSIOS-YO-RIEUL +0xC451 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULKIYEOK +0xC452 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULMIEUM +0xC453 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULPIEUP +0xC454 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULSIOS +0xC455 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULTHIEUTH +0xC456 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULPHIEUPH +0xC457 # HANGUL SYLLABLE SSANGSIOS-YO-RIEULHIEUH +0xC458 # HANGUL SYLLABLE SSANGSIOS-YO-MIEUM +0xC459 # HANGUL SYLLABLE SSANGSIOS-YO-PIEUP +0xC45A # HANGUL SYLLABLE SSANGSIOS-YO-PIEUPSIOS +0xC45B # HANGUL SYLLABLE SSANGSIOS-YO-SIOS +0xC45C # HANGUL SYLLABLE SSANGSIOS-YO-SSANGSIOS +0xC45D # HANGUL SYLLABLE SSANGSIOS-YO-IEUNG +0xC45E # HANGUL SYLLABLE SSANGSIOS-YO-CIEUC +0xC45F # HANGUL SYLLABLE SSANGSIOS-YO-CHIEUCH +0xC460 # HANGUL SYLLABLE SSANGSIOS-YO-KHIEUKH +0xC461 # HANGUL SYLLABLE SSANGSIOS-YO-THIEUTH +0xC462 # HANGUL SYLLABLE SSANGSIOS-YO-PHIEUPH +0xC463 # HANGUL SYLLABLE SSANGSIOS-YO-HIEUH +0xC464 # HANGUL SYLLABLE SSANGSIOS-U +0xC465 # HANGUL SYLLABLE SSANGSIOS-U-KIYEOK +0xC466 # HANGUL SYLLABLE SSANGSIOS-U-SSANGKIYEOK +0xC467 # HANGUL SYLLABLE SSANGSIOS-U-KIYEOKSIOS +0xC468 # HANGUL SYLLABLE SSANGSIOS-U-NIEUN +0xC469 # HANGUL SYLLABLE SSANGSIOS-U-NIEUNCIEUC +0xC46A # HANGUL SYLLABLE SSANGSIOS-U-NIEUNHIEUH +0xC46B # HANGUL SYLLABLE SSANGSIOS-U-TIKEUT +0xC46C # HANGUL SYLLABLE SSANGSIOS-U-RIEUL +0xC46D # HANGUL SYLLABLE SSANGSIOS-U-RIEULKIYEOK +0xC46E # HANGUL SYLLABLE SSANGSIOS-U-RIEULMIEUM +0xC46F # HANGUL SYLLABLE SSANGSIOS-U-RIEULPIEUP +0xC470 # HANGUL SYLLABLE SSANGSIOS-U-RIEULSIOS +0xC471 # HANGUL SYLLABLE SSANGSIOS-U-RIEULTHIEUTH +0xC472 # HANGUL SYLLABLE SSANGSIOS-U-RIEULPHIEUPH +0xC473 # HANGUL SYLLABLE SSANGSIOS-U-RIEULHIEUH +0xC474 # HANGUL SYLLABLE SSANGSIOS-U-MIEUM +0xC475 # HANGUL SYLLABLE SSANGSIOS-U-PIEUP +0xC476 # HANGUL SYLLABLE SSANGSIOS-U-PIEUPSIOS +0xC477 # HANGUL SYLLABLE SSANGSIOS-U-SIOS +0xC478 # HANGUL SYLLABLE SSANGSIOS-U-SSANGSIOS +0xC479 # HANGUL SYLLABLE SSANGSIOS-U-IEUNG +0xC47A # HANGUL SYLLABLE SSANGSIOS-U-CIEUC +0xC47B # HANGUL SYLLABLE SSANGSIOS-U-CHIEUCH +0xC47C # HANGUL SYLLABLE SSANGSIOS-U-KHIEUKH +0xC47D # HANGUL SYLLABLE SSANGSIOS-U-THIEUTH +0xC47E # HANGUL SYLLABLE SSANGSIOS-U-PHIEUPH +0xC47F # HANGUL SYLLABLE SSANGSIOS-U-HIEUH +0xC480 # HANGUL SYLLABLE SSANGSIOS-WEO +0xC481 # HANGUL SYLLABLE SSANGSIOS-WEO-KIYEOK +0xC482 # HANGUL SYLLABLE SSANGSIOS-WEO-SSANGKIYEOK +0xC483 # HANGUL SYLLABLE SSANGSIOS-WEO-KIYEOKSIOS +0xC484 # HANGUL SYLLABLE SSANGSIOS-WEO-NIEUN +0xC485 # HANGUL SYLLABLE SSANGSIOS-WEO-NIEUNCIEUC +0xC486 # HANGUL SYLLABLE SSANGSIOS-WEO-NIEUNHIEUH +0xC487 # HANGUL SYLLABLE SSANGSIOS-WEO-TIKEUT +0xC488 # HANGUL SYLLABLE SSANGSIOS-WEO-RIEUL +0xC489 # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULKIYEOK +0xC48A # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULMIEUM +0xC48B # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULPIEUP +0xC48C # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULSIOS +0xC48D # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULTHIEUTH +0xC48E # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULPHIEUPH +0xC48F # HANGUL SYLLABLE SSANGSIOS-WEO-RIEULHIEUH +0xC490 # HANGUL SYLLABLE SSANGSIOS-WEO-MIEUM +0xC491 # HANGUL SYLLABLE SSANGSIOS-WEO-PIEUP +0xC492 # HANGUL SYLLABLE SSANGSIOS-WEO-PIEUPSIOS +0xC493 # HANGUL SYLLABLE SSANGSIOS-WEO-SIOS +0xC494 # HANGUL SYLLABLE SSANGSIOS-WEO-SSANGSIOS +0xC495 # HANGUL SYLLABLE SSANGSIOS-WEO-IEUNG +0xC496 # HANGUL SYLLABLE SSANGSIOS-WEO-CIEUC +0xC497 # HANGUL SYLLABLE SSANGSIOS-WEO-CHIEUCH +0xC498 # HANGUL SYLLABLE SSANGSIOS-WEO-KHIEUKH +0xC499 # HANGUL SYLLABLE SSANGSIOS-WEO-THIEUTH +0xC49A # HANGUL SYLLABLE SSANGSIOS-WEO-PHIEUPH +0xC49B # HANGUL SYLLABLE SSANGSIOS-WEO-HIEUH +0xC49C # HANGUL SYLLABLE SSANGSIOS-WE +0xC49D # HANGUL SYLLABLE SSANGSIOS-WE-KIYEOK +0xC49E # HANGUL SYLLABLE SSANGSIOS-WE-SSANGKIYEOK +0xC49F # HANGUL SYLLABLE SSANGSIOS-WE-KIYEOKSIOS +0xC4A0 # HANGUL SYLLABLE SSANGSIOS-WE-NIEUN +0xC4A1 # HANGUL SYLLABLE SSANGSIOS-WE-NIEUNCIEUC +0xC4A2 # HANGUL SYLLABLE SSANGSIOS-WE-NIEUNHIEUH +0xC4A3 # HANGUL SYLLABLE SSANGSIOS-WE-TIKEUT +0xC4A4 # HANGUL SYLLABLE SSANGSIOS-WE-RIEUL +0xC4A5 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULKIYEOK +0xC4A6 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULMIEUM +0xC4A7 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULPIEUP +0xC4A8 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULSIOS +0xC4A9 # HANGUL SYLLABLE SSANGSIOS-WE-RIEULTHIEUTH +0xC4AA # HANGUL SYLLABLE SSANGSIOS-WE-RIEULPHIEUPH +0xC4AB # HANGUL SYLLABLE SSANGSIOS-WE-RIEULHIEUH +0xC4AC # HANGUL SYLLABLE SSANGSIOS-WE-MIEUM +0xC4AD # HANGUL SYLLABLE SSANGSIOS-WE-PIEUP +0xC4AE # HANGUL SYLLABLE SSANGSIOS-WE-PIEUPSIOS +0xC4AF # HANGUL SYLLABLE SSANGSIOS-WE-SIOS +0xC4B0 # HANGUL SYLLABLE SSANGSIOS-WE-SSANGSIOS +0xC4B1 # HANGUL SYLLABLE SSANGSIOS-WE-IEUNG +0xC4B2 # HANGUL SYLLABLE SSANGSIOS-WE-CIEUC +0xC4B3 # HANGUL SYLLABLE SSANGSIOS-WE-CHIEUCH +0xC4B4 # HANGUL SYLLABLE SSANGSIOS-WE-KHIEUKH +0xC4B5 # HANGUL SYLLABLE SSANGSIOS-WE-THIEUTH +0xC4B6 # HANGUL SYLLABLE SSANGSIOS-WE-PHIEUPH +0xC4B7 # HANGUL SYLLABLE SSANGSIOS-WE-HIEUH +0xC4B8 # HANGUL SYLLABLE SSANGSIOS-WI +0xC4B9 # HANGUL SYLLABLE SSANGSIOS-WI-KIYEOK +0xC4BA # HANGUL SYLLABLE SSANGSIOS-WI-SSANGKIYEOK +0xC4BB # HANGUL SYLLABLE SSANGSIOS-WI-KIYEOKSIOS +0xC4BC # HANGUL SYLLABLE SSANGSIOS-WI-NIEUN +0xC4BD # HANGUL SYLLABLE SSANGSIOS-WI-NIEUNCIEUC +0xC4BE # HANGUL SYLLABLE SSANGSIOS-WI-NIEUNHIEUH +0xC4BF # HANGUL SYLLABLE SSANGSIOS-WI-TIKEUT +0xC4C0 # HANGUL SYLLABLE SSANGSIOS-WI-RIEUL +0xC4C1 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULKIYEOK +0xC4C2 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULMIEUM +0xC4C3 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULPIEUP +0xC4C4 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULSIOS +0xC4C5 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULTHIEUTH +0xC4C6 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULPHIEUPH +0xC4C7 # HANGUL SYLLABLE SSANGSIOS-WI-RIEULHIEUH +0xC4C8 # HANGUL SYLLABLE SSANGSIOS-WI-MIEUM +0xC4C9 # HANGUL SYLLABLE SSANGSIOS-WI-PIEUP +0xC4CA # HANGUL SYLLABLE SSANGSIOS-WI-PIEUPSIOS +0xC4CB # HANGUL SYLLABLE SSANGSIOS-WI-SIOS +0xC4CC # HANGUL SYLLABLE SSANGSIOS-WI-SSANGSIOS +0xC4CD # HANGUL SYLLABLE SSANGSIOS-WI-IEUNG +0xC4CE # HANGUL SYLLABLE SSANGSIOS-WI-CIEUC +0xC4CF # HANGUL SYLLABLE SSANGSIOS-WI-CHIEUCH +0xC4D0 # HANGUL SYLLABLE SSANGSIOS-WI-KHIEUKH +0xC4D1 # HANGUL SYLLABLE SSANGSIOS-WI-THIEUTH +0xC4D2 # HANGUL SYLLABLE SSANGSIOS-WI-PHIEUPH +0xC4D3 # HANGUL SYLLABLE SSANGSIOS-WI-HIEUH +0xC4D4 # HANGUL SYLLABLE SSANGSIOS-YU +0xC4D5 # HANGUL SYLLABLE SSANGSIOS-YU-KIYEOK +0xC4D6 # HANGUL SYLLABLE SSANGSIOS-YU-SSANGKIYEOK +0xC4D7 # HANGUL SYLLABLE SSANGSIOS-YU-KIYEOKSIOS +0xC4D8 # HANGUL SYLLABLE SSANGSIOS-YU-NIEUN +0xC4D9 # HANGUL SYLLABLE SSANGSIOS-YU-NIEUNCIEUC +0xC4DA # HANGUL SYLLABLE SSANGSIOS-YU-NIEUNHIEUH +0xC4DB # HANGUL SYLLABLE SSANGSIOS-YU-TIKEUT +0xC4DC # HANGUL SYLLABLE SSANGSIOS-YU-RIEUL +0xC4DD # HANGUL SYLLABLE SSANGSIOS-YU-RIEULKIYEOK +0xC4DE # HANGUL SYLLABLE SSANGSIOS-YU-RIEULMIEUM +0xC4DF # HANGUL SYLLABLE SSANGSIOS-YU-RIEULPIEUP +0xC4E0 # HANGUL SYLLABLE SSANGSIOS-YU-RIEULSIOS +0xC4E1 # HANGUL SYLLABLE SSANGSIOS-YU-RIEULTHIEUTH +0xC4E2 # HANGUL SYLLABLE SSANGSIOS-YU-RIEULPHIEUPH +0xC4E3 # HANGUL SYLLABLE SSANGSIOS-YU-RIEULHIEUH +0xC4E4 # HANGUL SYLLABLE SSANGSIOS-YU-MIEUM +0xC4E5 # HANGUL SYLLABLE SSANGSIOS-YU-PIEUP +0xC4E6 # HANGUL SYLLABLE SSANGSIOS-YU-PIEUPSIOS +0xC4E7 # HANGUL SYLLABLE SSANGSIOS-YU-SIOS +0xC4E8 # HANGUL SYLLABLE SSANGSIOS-YU-SSANGSIOS +0xC4E9 # HANGUL SYLLABLE SSANGSIOS-YU-IEUNG +0xC4EA # HANGUL SYLLABLE SSANGSIOS-YU-CIEUC +0xC4EB # HANGUL SYLLABLE SSANGSIOS-YU-CHIEUCH +0xC4EC # HANGUL SYLLABLE SSANGSIOS-YU-KHIEUKH +0xC4ED # HANGUL SYLLABLE SSANGSIOS-YU-THIEUTH +0xC4EE # HANGUL SYLLABLE SSANGSIOS-YU-PHIEUPH +0xC4EF # HANGUL SYLLABLE SSANGSIOS-YU-HIEUH +0xC4F0 # HANGUL SYLLABLE SSANGSIOS-EU +0xC4F1 # HANGUL SYLLABLE SSANGSIOS-EU-KIYEOK +0xC4F2 # HANGUL SYLLABLE SSANGSIOS-EU-SSANGKIYEOK +0xC4F3 # HANGUL SYLLABLE SSANGSIOS-EU-KIYEOKSIOS +0xC4F4 # HANGUL SYLLABLE SSANGSIOS-EU-NIEUN +0xC4F5 # HANGUL SYLLABLE SSANGSIOS-EU-NIEUNCIEUC +0xC4F6 # HANGUL SYLLABLE SSANGSIOS-EU-NIEUNHIEUH +0xC4F7 # HANGUL SYLLABLE SSANGSIOS-EU-TIKEUT +0xC4F8 # HANGUL SYLLABLE SSANGSIOS-EU-RIEUL +0xC4F9 # HANGUL SYLLABLE SSANGSIOS-EU-RIEULKIYEOK +0xC4FA # HANGUL SYLLABLE SSANGSIOS-EU-RIEULMIEUM +0xC4FB # HANGUL SYLLABLE SSANGSIOS-EU-RIEULPIEUP +0xC4FC # HANGUL SYLLABLE SSANGSIOS-EU-RIEULSIOS +0xC4FD # HANGUL SYLLABLE SSANGSIOS-EU-RIEULTHIEUTH +0xC4FE # HANGUL SYLLABLE SSANGSIOS-EU-RIEULPHIEUPH +0xC4FF # HANGUL SYLLABLE SSANGSIOS-EU-RIEULHIEUH +0xC500 # HANGUL SYLLABLE SSANGSIOS-EU-MIEUM +0xC501 # HANGUL SYLLABLE SSANGSIOS-EU-PIEUP +0xC502 # HANGUL SYLLABLE SSANGSIOS-EU-PIEUPSIOS +0xC503 # HANGUL SYLLABLE SSANGSIOS-EU-SIOS +0xC504 # HANGUL SYLLABLE SSANGSIOS-EU-SSANGSIOS +0xC505 # HANGUL SYLLABLE SSANGSIOS-EU-IEUNG +0xC506 # HANGUL SYLLABLE SSANGSIOS-EU-CIEUC +0xC507 # HANGUL SYLLABLE SSANGSIOS-EU-CHIEUCH +0xC508 # HANGUL SYLLABLE SSANGSIOS-EU-KHIEUKH +0xC509 # HANGUL SYLLABLE SSANGSIOS-EU-THIEUTH +0xC50A # HANGUL SYLLABLE SSANGSIOS-EU-PHIEUPH +0xC50B # HANGUL SYLLABLE SSANGSIOS-EU-HIEUH +0xC50C # HANGUL SYLLABLE SSANGSIOS-YI +0xC50D # HANGUL SYLLABLE SSANGSIOS-YI-KIYEOK +0xC50E # HANGUL SYLLABLE SSANGSIOS-YI-SSANGKIYEOK +0xC50F # HANGUL SYLLABLE SSANGSIOS-YI-KIYEOKSIOS +0xC510 # HANGUL SYLLABLE SSANGSIOS-YI-NIEUN +0xC511 # HANGUL SYLLABLE SSANGSIOS-YI-NIEUNCIEUC +0xC512 # HANGUL SYLLABLE SSANGSIOS-YI-NIEUNHIEUH +0xC513 # HANGUL SYLLABLE SSANGSIOS-YI-TIKEUT +0xC514 # HANGUL SYLLABLE SSANGSIOS-YI-RIEUL +0xC515 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULKIYEOK +0xC516 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULMIEUM +0xC517 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULPIEUP +0xC518 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULSIOS +0xC519 # HANGUL SYLLABLE SSANGSIOS-YI-RIEULTHIEUTH +0xC51A # HANGUL SYLLABLE SSANGSIOS-YI-RIEULPHIEUPH +0xC51B # HANGUL SYLLABLE SSANGSIOS-YI-RIEULHIEUH +0xC51C # HANGUL SYLLABLE SSANGSIOS-YI-MIEUM +0xC51D # HANGUL SYLLABLE SSANGSIOS-YI-PIEUP +0xC51E # HANGUL SYLLABLE SSANGSIOS-YI-PIEUPSIOS +0xC51F # HANGUL SYLLABLE SSANGSIOS-YI-SIOS +0xC520 # HANGUL SYLLABLE SSANGSIOS-YI-SSANGSIOS +0xC521 # HANGUL SYLLABLE SSANGSIOS-YI-IEUNG +0xC522 # HANGUL SYLLABLE SSANGSIOS-YI-CIEUC +0xC523 # HANGUL SYLLABLE SSANGSIOS-YI-CHIEUCH +0xC524 # HANGUL SYLLABLE SSANGSIOS-YI-KHIEUKH +0xC525 # HANGUL SYLLABLE SSANGSIOS-YI-THIEUTH +0xC526 # HANGUL SYLLABLE SSANGSIOS-YI-PHIEUPH +0xC527 # HANGUL SYLLABLE SSANGSIOS-YI-HIEUH +0xC528 # HANGUL SYLLABLE SSANGSIOS-I +0xC529 # HANGUL SYLLABLE SSANGSIOS-I-KIYEOK +0xC52A # HANGUL SYLLABLE SSANGSIOS-I-SSANGKIYEOK +0xC52B # HANGUL SYLLABLE SSANGSIOS-I-KIYEOKSIOS +0xC52C # HANGUL SYLLABLE SSANGSIOS-I-NIEUN +0xC52D # HANGUL SYLLABLE SSANGSIOS-I-NIEUNCIEUC +0xC52E # HANGUL SYLLABLE SSANGSIOS-I-NIEUNHIEUH +0xC52F # HANGUL SYLLABLE SSANGSIOS-I-TIKEUT +0xC530 # HANGUL SYLLABLE SSANGSIOS-I-RIEUL +0xC531 # HANGUL SYLLABLE SSANGSIOS-I-RIEULKIYEOK +0xC532 # HANGUL SYLLABLE SSANGSIOS-I-RIEULMIEUM +0xC533 # HANGUL SYLLABLE SSANGSIOS-I-RIEULPIEUP +0xC534 # HANGUL SYLLABLE SSANGSIOS-I-RIEULSIOS +0xC535 # HANGUL SYLLABLE SSANGSIOS-I-RIEULTHIEUTH +0xC536 # HANGUL SYLLABLE SSANGSIOS-I-RIEULPHIEUPH +0xC537 # HANGUL SYLLABLE SSANGSIOS-I-RIEULHIEUH +0xC538 # HANGUL SYLLABLE SSANGSIOS-I-MIEUM +0xC539 # HANGUL SYLLABLE SSANGSIOS-I-PIEUP +0xC53A # HANGUL SYLLABLE SSANGSIOS-I-PIEUPSIOS +0xC53B # HANGUL SYLLABLE SSANGSIOS-I-SIOS +0xC53C # HANGUL SYLLABLE SSANGSIOS-I-SSANGSIOS +0xC53D # HANGUL SYLLABLE SSANGSIOS-I-IEUNG +0xC53E # HANGUL SYLLABLE SSANGSIOS-I-CIEUC +0xC53F # HANGUL SYLLABLE SSANGSIOS-I-CHIEUCH +0xC540 # HANGUL SYLLABLE SSANGSIOS-I-KHIEUKH +0xC541 # HANGUL SYLLABLE SSANGSIOS-I-THIEUTH +0xC542 # HANGUL SYLLABLE SSANGSIOS-I-PHIEUPH +0xC543 # HANGUL SYLLABLE SSANGSIOS-I-HIEUH +0xC544 # HANGUL SYLLABLE IEUNG-A +0xC545 # HANGUL SYLLABLE IEUNG-A-KIYEOK +0xC546 # HANGUL SYLLABLE IEUNG-A-SSANGKIYEOK +0xC547 # HANGUL SYLLABLE IEUNG-A-KIYEOKSIOS +0xC548 # HANGUL SYLLABLE IEUNG-A-NIEUN +0xC549 # HANGUL SYLLABLE IEUNG-A-NIEUNCIEUC +0xC54A # HANGUL SYLLABLE IEUNG-A-NIEUNHIEUH +0xC54B # HANGUL SYLLABLE IEUNG-A-TIKEUT +0xC54C # HANGUL SYLLABLE IEUNG-A-RIEUL +0xC54D # HANGUL SYLLABLE IEUNG-A-RIEULKIYEOK +0xC54E # HANGUL SYLLABLE IEUNG-A-RIEULMIEUM +0xC54F # HANGUL SYLLABLE IEUNG-A-RIEULPIEUP +0xC550 # HANGUL SYLLABLE IEUNG-A-RIEULSIOS +0xC551 # HANGUL SYLLABLE IEUNG-A-RIEULTHIEUTH +0xC552 # HANGUL SYLLABLE IEUNG-A-RIEULPHIEUPH +0xC553 # HANGUL SYLLABLE IEUNG-A-RIEULHIEUH +0xC554 # HANGUL SYLLABLE IEUNG-A-MIEUM +0xC555 # HANGUL SYLLABLE IEUNG-A-PIEUP +0xC556 # HANGUL SYLLABLE IEUNG-A-PIEUPSIOS +0xC557 # HANGUL SYLLABLE IEUNG-A-SIOS +0xC558 # HANGUL SYLLABLE IEUNG-A-SSANGSIOS +0xC559 # HANGUL SYLLABLE IEUNG-A-IEUNG +0xC55A # HANGUL SYLLABLE IEUNG-A-CIEUC +0xC55B # HANGUL SYLLABLE IEUNG-A-CHIEUCH +0xC55C # HANGUL SYLLABLE IEUNG-A-KHIEUKH +0xC55D # HANGUL SYLLABLE IEUNG-A-THIEUTH +0xC55E # HANGUL SYLLABLE IEUNG-A-PHIEUPH +0xC55F # HANGUL SYLLABLE IEUNG-A-HIEUH +0xC560 # HANGUL SYLLABLE IEUNG-AE +0xC561 # HANGUL SYLLABLE IEUNG-AE-KIYEOK +0xC562 # HANGUL SYLLABLE IEUNG-AE-SSANGKIYEOK +0xC563 # HANGUL SYLLABLE IEUNG-AE-KIYEOKSIOS +0xC564 # HANGUL SYLLABLE IEUNG-AE-NIEUN +0xC565 # HANGUL SYLLABLE IEUNG-AE-NIEUNCIEUC +0xC566 # HANGUL SYLLABLE IEUNG-AE-NIEUNHIEUH +0xC567 # HANGUL SYLLABLE IEUNG-AE-TIKEUT +0xC568 # HANGUL SYLLABLE IEUNG-AE-RIEUL +0xC569 # HANGUL SYLLABLE IEUNG-AE-RIEULKIYEOK +0xC56A # HANGUL SYLLABLE IEUNG-AE-RIEULMIEUM +0xC56B # HANGUL SYLLABLE IEUNG-AE-RIEULPIEUP +0xC56C # HANGUL SYLLABLE IEUNG-AE-RIEULSIOS +0xC56D # HANGUL SYLLABLE IEUNG-AE-RIEULTHIEUTH +0xC56E # HANGUL SYLLABLE IEUNG-AE-RIEULPHIEUPH +0xC56F # HANGUL SYLLABLE IEUNG-AE-RIEULHIEUH +0xC570 # HANGUL SYLLABLE IEUNG-AE-MIEUM +0xC571 # HANGUL SYLLABLE IEUNG-AE-PIEUP +0xC572 # HANGUL SYLLABLE IEUNG-AE-PIEUPSIOS +0xC573 # HANGUL SYLLABLE IEUNG-AE-SIOS +0xC574 # HANGUL SYLLABLE IEUNG-AE-SSANGSIOS +0xC575 # HANGUL SYLLABLE IEUNG-AE-IEUNG +0xC576 # HANGUL SYLLABLE IEUNG-AE-CIEUC +0xC577 # HANGUL SYLLABLE IEUNG-AE-CHIEUCH +0xC578 # HANGUL SYLLABLE IEUNG-AE-KHIEUKH +0xC579 # HANGUL SYLLABLE IEUNG-AE-THIEUTH +0xC57A # HANGUL SYLLABLE IEUNG-AE-PHIEUPH +0xC57B # HANGUL SYLLABLE IEUNG-AE-HIEUH +0xC57C # HANGUL SYLLABLE IEUNG-YA +0xC57D # HANGUL SYLLABLE IEUNG-YA-KIYEOK +0xC57E # HANGUL SYLLABLE IEUNG-YA-SSANGKIYEOK +0xC57F # HANGUL SYLLABLE IEUNG-YA-KIYEOKSIOS +0xC580 # HANGUL SYLLABLE IEUNG-YA-NIEUN +0xC581 # HANGUL SYLLABLE IEUNG-YA-NIEUNCIEUC +0xC582 # HANGUL SYLLABLE IEUNG-YA-NIEUNHIEUH +0xC583 # HANGUL SYLLABLE IEUNG-YA-TIKEUT +0xC584 # HANGUL SYLLABLE IEUNG-YA-RIEUL +0xC585 # HANGUL SYLLABLE IEUNG-YA-RIEULKIYEOK +0xC586 # HANGUL SYLLABLE IEUNG-YA-RIEULMIEUM +0xC587 # HANGUL SYLLABLE IEUNG-YA-RIEULPIEUP +0xC588 # HANGUL SYLLABLE IEUNG-YA-RIEULSIOS +0xC589 # HANGUL SYLLABLE IEUNG-YA-RIEULTHIEUTH +0xC58A # HANGUL SYLLABLE IEUNG-YA-RIEULPHIEUPH +0xC58B # HANGUL SYLLABLE IEUNG-YA-RIEULHIEUH +0xC58C # HANGUL SYLLABLE IEUNG-YA-MIEUM +0xC58D # HANGUL SYLLABLE IEUNG-YA-PIEUP +0xC58E # HANGUL SYLLABLE IEUNG-YA-PIEUPSIOS +0xC58F # HANGUL SYLLABLE IEUNG-YA-SIOS +0xC590 # HANGUL SYLLABLE IEUNG-YA-SSANGSIOS +0xC591 # HANGUL SYLLABLE IEUNG-YA-IEUNG +0xC592 # HANGUL SYLLABLE IEUNG-YA-CIEUC +0xC593 # HANGUL SYLLABLE IEUNG-YA-CHIEUCH +0xC594 # HANGUL SYLLABLE IEUNG-YA-KHIEUKH +0xC595 # HANGUL SYLLABLE IEUNG-YA-THIEUTH +0xC596 # HANGUL SYLLABLE IEUNG-YA-PHIEUPH +0xC597 # HANGUL SYLLABLE IEUNG-YA-HIEUH +0xC598 # HANGUL SYLLABLE IEUNG-YAE +0xC599 # HANGUL SYLLABLE IEUNG-YAE-KIYEOK +0xC59A # HANGUL SYLLABLE IEUNG-YAE-SSANGKIYEOK +0xC59B # HANGUL SYLLABLE IEUNG-YAE-KIYEOKSIOS +0xC59C # HANGUL SYLLABLE IEUNG-YAE-NIEUN +0xC59D # HANGUL SYLLABLE IEUNG-YAE-NIEUNCIEUC +0xC59E # HANGUL SYLLABLE IEUNG-YAE-NIEUNHIEUH +0xC59F # HANGUL SYLLABLE IEUNG-YAE-TIKEUT +0xC5A0 # HANGUL SYLLABLE IEUNG-YAE-RIEUL +0xC5A1 # HANGUL SYLLABLE IEUNG-YAE-RIEULKIYEOK +0xC5A2 # HANGUL SYLLABLE IEUNG-YAE-RIEULMIEUM +0xC5A3 # HANGUL SYLLABLE IEUNG-YAE-RIEULPIEUP +0xC5A4 # HANGUL SYLLABLE IEUNG-YAE-RIEULSIOS +0xC5A5 # HANGUL SYLLABLE IEUNG-YAE-RIEULTHIEUTH +0xC5A6 # HANGUL SYLLABLE IEUNG-YAE-RIEULPHIEUPH +0xC5A7 # HANGUL SYLLABLE IEUNG-YAE-RIEULHIEUH +0xC5A8 # HANGUL SYLLABLE IEUNG-YAE-MIEUM +0xC5A9 # HANGUL SYLLABLE IEUNG-YAE-PIEUP +0xC5AA # HANGUL SYLLABLE IEUNG-YAE-PIEUPSIOS +0xC5AB # HANGUL SYLLABLE IEUNG-YAE-SIOS +0xC5AC # HANGUL SYLLABLE IEUNG-YAE-SSANGSIOS +0xC5AD # HANGUL SYLLABLE IEUNG-YAE-IEUNG +0xC5AE # HANGUL SYLLABLE IEUNG-YAE-CIEUC +0xC5AF # HANGUL SYLLABLE IEUNG-YAE-CHIEUCH +0xC5B0 # HANGUL SYLLABLE IEUNG-YAE-KHIEUKH +0xC5B1 # HANGUL SYLLABLE IEUNG-YAE-THIEUTH +0xC5B2 # HANGUL SYLLABLE IEUNG-YAE-PHIEUPH +0xC5B3 # HANGUL SYLLABLE IEUNG-YAE-HIEUH +0xC5B4 # HANGUL SYLLABLE IEUNG-EO +0xC5B5 # HANGUL SYLLABLE IEUNG-EO-KIYEOK +0xC5B6 # HANGUL SYLLABLE IEUNG-EO-SSANGKIYEOK +0xC5B7 # HANGUL SYLLABLE IEUNG-EO-KIYEOKSIOS +0xC5B8 # HANGUL SYLLABLE IEUNG-EO-NIEUN +0xC5B9 # HANGUL SYLLABLE IEUNG-EO-NIEUNCIEUC +0xC5BA # HANGUL SYLLABLE IEUNG-EO-NIEUNHIEUH +0xC5BB # HANGUL SYLLABLE IEUNG-EO-TIKEUT +0xC5BC # HANGUL SYLLABLE IEUNG-EO-RIEUL +0xC5BD # HANGUL SYLLABLE IEUNG-EO-RIEULKIYEOK +0xC5BE # HANGUL SYLLABLE IEUNG-EO-RIEULMIEUM +0xC5BF # HANGUL SYLLABLE IEUNG-EO-RIEULPIEUP +0xC5C0 # HANGUL SYLLABLE IEUNG-EO-RIEULSIOS +0xC5C1 # HANGUL SYLLABLE IEUNG-EO-RIEULTHIEUTH +0xC5C2 # HANGUL SYLLABLE IEUNG-EO-RIEULPHIEUPH +0xC5C3 # HANGUL SYLLABLE IEUNG-EO-RIEULHIEUH +0xC5C4 # HANGUL SYLLABLE IEUNG-EO-MIEUM +0xC5C5 # HANGUL SYLLABLE IEUNG-EO-PIEUP +0xC5C6 # HANGUL SYLLABLE IEUNG-EO-PIEUPSIOS +0xC5C7 # HANGUL SYLLABLE IEUNG-EO-SIOS +0xC5C8 # HANGUL SYLLABLE IEUNG-EO-SSANGSIOS +0xC5C9 # HANGUL SYLLABLE IEUNG-EO-IEUNG +0xC5CA # HANGUL SYLLABLE IEUNG-EO-CIEUC +0xC5CB # HANGUL SYLLABLE IEUNG-EO-CHIEUCH +0xC5CC # HANGUL SYLLABLE IEUNG-EO-KHIEUKH +0xC5CD # HANGUL SYLLABLE IEUNG-EO-THIEUTH +0xC5CE # HANGUL SYLLABLE IEUNG-EO-PHIEUPH +0xC5CF # HANGUL SYLLABLE IEUNG-EO-HIEUH +0xC5D0 # HANGUL SYLLABLE IEUNG-E +0xC5D1 # HANGUL SYLLABLE IEUNG-E-KIYEOK +0xC5D2 # HANGUL SYLLABLE IEUNG-E-SSANGKIYEOK +0xC5D3 # HANGUL SYLLABLE IEUNG-E-KIYEOKSIOS +0xC5D4 # HANGUL SYLLABLE IEUNG-E-NIEUN +0xC5D5 # HANGUL SYLLABLE IEUNG-E-NIEUNCIEUC +0xC5D6 # HANGUL SYLLABLE IEUNG-E-NIEUNHIEUH +0xC5D7 # HANGUL SYLLABLE IEUNG-E-TIKEUT +0xC5D8 # HANGUL SYLLABLE IEUNG-E-RIEUL +0xC5D9 # HANGUL SYLLABLE IEUNG-E-RIEULKIYEOK +0xC5DA # HANGUL SYLLABLE IEUNG-E-RIEULMIEUM +0xC5DB # HANGUL SYLLABLE IEUNG-E-RIEULPIEUP +0xC5DC # HANGUL SYLLABLE IEUNG-E-RIEULSIOS +0xC5DD # HANGUL SYLLABLE IEUNG-E-RIEULTHIEUTH +0xC5DE # HANGUL SYLLABLE IEUNG-E-RIEULPHIEUPH +0xC5DF # HANGUL SYLLABLE IEUNG-E-RIEULHIEUH +0xC5E0 # HANGUL SYLLABLE IEUNG-E-MIEUM +0xC5E1 # HANGUL SYLLABLE IEUNG-E-PIEUP +0xC5E2 # HANGUL SYLLABLE IEUNG-E-PIEUPSIOS +0xC5E3 # HANGUL SYLLABLE IEUNG-E-SIOS +0xC5E4 # HANGUL SYLLABLE IEUNG-E-SSANGSIOS +0xC5E5 # HANGUL SYLLABLE IEUNG-E-IEUNG +0xC5E6 # HANGUL SYLLABLE IEUNG-E-CIEUC +0xC5E7 # HANGUL SYLLABLE IEUNG-E-CHIEUCH +0xC5E8 # HANGUL SYLLABLE IEUNG-E-KHIEUKH +0xC5E9 # HANGUL SYLLABLE IEUNG-E-THIEUTH +0xC5EA # HANGUL SYLLABLE IEUNG-E-PHIEUPH +0xC5EB # HANGUL SYLLABLE IEUNG-E-HIEUH +0xC5EC # HANGUL SYLLABLE IEUNG-YEO +0xC5ED # HANGUL SYLLABLE IEUNG-YEO-KIYEOK +0xC5EE # HANGUL SYLLABLE IEUNG-YEO-SSANGKIYEOK +0xC5EF # HANGUL SYLLABLE IEUNG-YEO-KIYEOKSIOS +0xC5F0 # HANGUL SYLLABLE IEUNG-YEO-NIEUN +0xC5F1 # HANGUL SYLLABLE IEUNG-YEO-NIEUNCIEUC +0xC5F2 # HANGUL SYLLABLE IEUNG-YEO-NIEUNHIEUH +0xC5F3 # HANGUL SYLLABLE IEUNG-YEO-TIKEUT +0xC5F4 # HANGUL SYLLABLE IEUNG-YEO-RIEUL +0xC5F5 # HANGUL SYLLABLE IEUNG-YEO-RIEULKIYEOK +0xC5F6 # HANGUL SYLLABLE IEUNG-YEO-RIEULMIEUM +0xC5F7 # HANGUL SYLLABLE IEUNG-YEO-RIEULPIEUP +0xC5F8 # HANGUL SYLLABLE IEUNG-YEO-RIEULSIOS +0xC5F9 # HANGUL SYLLABLE IEUNG-YEO-RIEULTHIEUTH +0xC5FA # HANGUL SYLLABLE IEUNG-YEO-RIEULPHIEUPH +0xC5FB # HANGUL SYLLABLE IEUNG-YEO-RIEULHIEUH +0xC5FC # HANGUL SYLLABLE IEUNG-YEO-MIEUM +0xC5FD # HANGUL SYLLABLE IEUNG-YEO-PIEUP +0xC5FE # HANGUL SYLLABLE IEUNG-YEO-PIEUPSIOS +0xC5FF # HANGUL SYLLABLE IEUNG-YEO-SIOS +0xC600 # HANGUL SYLLABLE IEUNG-YEO-SSANGSIOS +0xC601 # HANGUL SYLLABLE IEUNG-YEO-IEUNG +0xC602 # HANGUL SYLLABLE IEUNG-YEO-CIEUC +0xC603 # HANGUL SYLLABLE IEUNG-YEO-CHIEUCH +0xC604 # HANGUL SYLLABLE IEUNG-YEO-KHIEUKH +0xC605 # HANGUL SYLLABLE IEUNG-YEO-THIEUTH +0xC606 # HANGUL SYLLABLE IEUNG-YEO-PHIEUPH +0xC607 # HANGUL SYLLABLE IEUNG-YEO-HIEUH +0xC608 # HANGUL SYLLABLE IEUNG-YE +0xC609 # HANGUL SYLLABLE IEUNG-YE-KIYEOK +0xC60A # HANGUL SYLLABLE IEUNG-YE-SSANGKIYEOK +0xC60B # HANGUL SYLLABLE IEUNG-YE-KIYEOKSIOS +0xC60C # HANGUL SYLLABLE IEUNG-YE-NIEUN +0xC60D # HANGUL SYLLABLE IEUNG-YE-NIEUNCIEUC +0xC60E # HANGUL SYLLABLE IEUNG-YE-NIEUNHIEUH +0xC60F # HANGUL SYLLABLE IEUNG-YE-TIKEUT +0xC610 # HANGUL SYLLABLE IEUNG-YE-RIEUL +0xC611 # HANGUL SYLLABLE IEUNG-YE-RIEULKIYEOK +0xC612 # HANGUL SYLLABLE IEUNG-YE-RIEULMIEUM +0xC613 # HANGUL SYLLABLE IEUNG-YE-RIEULPIEUP +0xC614 # HANGUL SYLLABLE IEUNG-YE-RIEULSIOS +0xC615 # HANGUL SYLLABLE IEUNG-YE-RIEULTHIEUTH +0xC616 # HANGUL SYLLABLE IEUNG-YE-RIEULPHIEUPH +0xC617 # HANGUL SYLLABLE IEUNG-YE-RIEULHIEUH +0xC618 # HANGUL SYLLABLE IEUNG-YE-MIEUM +0xC619 # HANGUL SYLLABLE IEUNG-YE-PIEUP +0xC61A # HANGUL SYLLABLE IEUNG-YE-PIEUPSIOS +0xC61B # HANGUL SYLLABLE IEUNG-YE-SIOS +0xC61C # HANGUL SYLLABLE IEUNG-YE-SSANGSIOS +0xC61D # HANGUL SYLLABLE IEUNG-YE-IEUNG +0xC61E # HANGUL SYLLABLE IEUNG-YE-CIEUC +0xC61F # HANGUL SYLLABLE IEUNG-YE-CHIEUCH +0xC620 # HANGUL SYLLABLE IEUNG-YE-KHIEUKH +0xC621 # HANGUL SYLLABLE IEUNG-YE-THIEUTH +0xC622 # HANGUL SYLLABLE IEUNG-YE-PHIEUPH +0xC623 # HANGUL SYLLABLE IEUNG-YE-HIEUH +0xC624 # HANGUL SYLLABLE IEUNG-O +0xC625 # HANGUL SYLLABLE IEUNG-O-KIYEOK +0xC626 # HANGUL SYLLABLE IEUNG-O-SSANGKIYEOK +0xC627 # HANGUL SYLLABLE IEUNG-O-KIYEOKSIOS +0xC628 # HANGUL SYLLABLE IEUNG-O-NIEUN +0xC629 # HANGUL SYLLABLE IEUNG-O-NIEUNCIEUC +0xC62A # HANGUL SYLLABLE IEUNG-O-NIEUNHIEUH +0xC62B # HANGUL SYLLABLE IEUNG-O-TIKEUT +0xC62C # HANGUL SYLLABLE IEUNG-O-RIEUL +0xC62D # HANGUL SYLLABLE IEUNG-O-RIEULKIYEOK +0xC62E # HANGUL SYLLABLE IEUNG-O-RIEULMIEUM +0xC62F # HANGUL SYLLABLE IEUNG-O-RIEULPIEUP +0xC630 # HANGUL SYLLABLE IEUNG-O-RIEULSIOS +0xC631 # HANGUL SYLLABLE IEUNG-O-RIEULTHIEUTH +0xC632 # HANGUL SYLLABLE IEUNG-O-RIEULPHIEUPH +0xC633 # HANGUL SYLLABLE IEUNG-O-RIEULHIEUH +0xC634 # HANGUL SYLLABLE IEUNG-O-MIEUM +0xC635 # HANGUL SYLLABLE IEUNG-O-PIEUP +0xC636 # HANGUL SYLLABLE IEUNG-O-PIEUPSIOS +0xC637 # HANGUL SYLLABLE IEUNG-O-SIOS +0xC638 # HANGUL SYLLABLE IEUNG-O-SSANGSIOS +0xC639 # HANGUL SYLLABLE IEUNG-O-IEUNG +0xC63A # HANGUL SYLLABLE IEUNG-O-CIEUC +0xC63B # HANGUL SYLLABLE IEUNG-O-CHIEUCH +0xC63C # HANGUL SYLLABLE IEUNG-O-KHIEUKH +0xC63D # HANGUL SYLLABLE IEUNG-O-THIEUTH +0xC63E # HANGUL SYLLABLE IEUNG-O-PHIEUPH +0xC63F # HANGUL SYLLABLE IEUNG-O-HIEUH +0xC640 # HANGUL SYLLABLE IEUNG-WA +0xC641 # HANGUL SYLLABLE IEUNG-WA-KIYEOK +0xC642 # HANGUL SYLLABLE IEUNG-WA-SSANGKIYEOK +0xC643 # HANGUL SYLLABLE IEUNG-WA-KIYEOKSIOS +0xC644 # HANGUL SYLLABLE IEUNG-WA-NIEUN +0xC645 # HANGUL SYLLABLE IEUNG-WA-NIEUNCIEUC +0xC646 # HANGUL SYLLABLE IEUNG-WA-NIEUNHIEUH +0xC647 # HANGUL SYLLABLE IEUNG-WA-TIKEUT +0xC648 # HANGUL SYLLABLE IEUNG-WA-RIEUL +0xC649 # HANGUL SYLLABLE IEUNG-WA-RIEULKIYEOK +0xC64A # HANGUL SYLLABLE IEUNG-WA-RIEULMIEUM +0xC64B # HANGUL SYLLABLE IEUNG-WA-RIEULPIEUP +0xC64C # HANGUL SYLLABLE IEUNG-WA-RIEULSIOS +0xC64D # HANGUL SYLLABLE IEUNG-WA-RIEULTHIEUTH +0xC64E # HANGUL SYLLABLE IEUNG-WA-RIEULPHIEUPH +0xC64F # HANGUL SYLLABLE IEUNG-WA-RIEULHIEUH +0xC650 # HANGUL SYLLABLE IEUNG-WA-MIEUM +0xC651 # HANGUL SYLLABLE IEUNG-WA-PIEUP +0xC652 # HANGUL SYLLABLE IEUNG-WA-PIEUPSIOS +0xC653 # HANGUL SYLLABLE IEUNG-WA-SIOS +0xC654 # HANGUL SYLLABLE IEUNG-WA-SSANGSIOS +0xC655 # HANGUL SYLLABLE IEUNG-WA-IEUNG +0xC656 # HANGUL SYLLABLE IEUNG-WA-CIEUC +0xC657 # HANGUL SYLLABLE IEUNG-WA-CHIEUCH +0xC658 # HANGUL SYLLABLE IEUNG-WA-KHIEUKH +0xC659 # HANGUL SYLLABLE IEUNG-WA-THIEUTH +0xC65A # HANGUL SYLLABLE IEUNG-WA-PHIEUPH +0xC65B # HANGUL SYLLABLE IEUNG-WA-HIEUH +0xC65C # HANGUL SYLLABLE IEUNG-WAE +0xC65D # HANGUL SYLLABLE IEUNG-WAE-KIYEOK +0xC65E # HANGUL SYLLABLE IEUNG-WAE-SSANGKIYEOK +0xC65F # HANGUL SYLLABLE IEUNG-WAE-KIYEOKSIOS +0xC660 # HANGUL SYLLABLE IEUNG-WAE-NIEUN +0xC661 # HANGUL SYLLABLE IEUNG-WAE-NIEUNCIEUC +0xC662 # HANGUL SYLLABLE IEUNG-WAE-NIEUNHIEUH +0xC663 # HANGUL SYLLABLE IEUNG-WAE-TIKEUT +0xC664 # HANGUL SYLLABLE IEUNG-WAE-RIEUL +0xC665 # HANGUL SYLLABLE IEUNG-WAE-RIEULKIYEOK +0xC666 # HANGUL SYLLABLE IEUNG-WAE-RIEULMIEUM +0xC667 # HANGUL SYLLABLE IEUNG-WAE-RIEULPIEUP +0xC668 # HANGUL SYLLABLE IEUNG-WAE-RIEULSIOS +0xC669 # HANGUL SYLLABLE IEUNG-WAE-RIEULTHIEUTH +0xC66A # HANGUL SYLLABLE IEUNG-WAE-RIEULPHIEUPH +0xC66B # HANGUL SYLLABLE IEUNG-WAE-RIEULHIEUH +0xC66C # HANGUL SYLLABLE IEUNG-WAE-MIEUM +0xC66D # HANGUL SYLLABLE IEUNG-WAE-PIEUP +0xC66E # HANGUL SYLLABLE IEUNG-WAE-PIEUPSIOS +0xC66F # HANGUL SYLLABLE IEUNG-WAE-SIOS +0xC670 # HANGUL SYLLABLE IEUNG-WAE-SSANGSIOS +0xC671 # HANGUL SYLLABLE IEUNG-WAE-IEUNG +0xC672 # HANGUL SYLLABLE IEUNG-WAE-CIEUC +0xC673 # HANGUL SYLLABLE IEUNG-WAE-CHIEUCH +0xC674 # HANGUL SYLLABLE IEUNG-WAE-KHIEUKH +0xC675 # HANGUL SYLLABLE IEUNG-WAE-THIEUTH +0xC676 # HANGUL SYLLABLE IEUNG-WAE-PHIEUPH +0xC677 # HANGUL SYLLABLE IEUNG-WAE-HIEUH +0xC678 # HANGUL SYLLABLE IEUNG-OE +0xC679 # HANGUL SYLLABLE IEUNG-OE-KIYEOK +0xC67A # HANGUL SYLLABLE IEUNG-OE-SSANGKIYEOK +0xC67B # HANGUL SYLLABLE IEUNG-OE-KIYEOKSIOS +0xC67C # HANGUL SYLLABLE IEUNG-OE-NIEUN +0xC67D # HANGUL SYLLABLE IEUNG-OE-NIEUNCIEUC +0xC67E # HANGUL SYLLABLE IEUNG-OE-NIEUNHIEUH +0xC67F # HANGUL SYLLABLE IEUNG-OE-TIKEUT +0xC680 # HANGUL SYLLABLE IEUNG-OE-RIEUL +0xC681 # HANGUL SYLLABLE IEUNG-OE-RIEULKIYEOK +0xC682 # HANGUL SYLLABLE IEUNG-OE-RIEULMIEUM +0xC683 # HANGUL SYLLABLE IEUNG-OE-RIEULPIEUP +0xC684 # HANGUL SYLLABLE IEUNG-OE-RIEULSIOS +0xC685 # HANGUL SYLLABLE IEUNG-OE-RIEULTHIEUTH +0xC686 # HANGUL SYLLABLE IEUNG-OE-RIEULPHIEUPH +0xC687 # HANGUL SYLLABLE IEUNG-OE-RIEULHIEUH +0xC688 # HANGUL SYLLABLE IEUNG-OE-MIEUM +0xC689 # HANGUL SYLLABLE IEUNG-OE-PIEUP +0xC68A # HANGUL SYLLABLE IEUNG-OE-PIEUPSIOS +0xC68B # HANGUL SYLLABLE IEUNG-OE-SIOS +0xC68C # HANGUL SYLLABLE IEUNG-OE-SSANGSIOS +0xC68D # HANGUL SYLLABLE IEUNG-OE-IEUNG +0xC68E # HANGUL SYLLABLE IEUNG-OE-CIEUC +0xC68F # HANGUL SYLLABLE IEUNG-OE-CHIEUCH +0xC690 # HANGUL SYLLABLE IEUNG-OE-KHIEUKH +0xC691 # HANGUL SYLLABLE IEUNG-OE-THIEUTH +0xC692 # HANGUL SYLLABLE IEUNG-OE-PHIEUPH +0xC693 # HANGUL SYLLABLE IEUNG-OE-HIEUH +0xC694 # HANGUL SYLLABLE IEUNG-YO +0xC695 # HANGUL SYLLABLE IEUNG-YO-KIYEOK +0xC696 # HANGUL SYLLABLE IEUNG-YO-SSANGKIYEOK +0xC697 # HANGUL SYLLABLE IEUNG-YO-KIYEOKSIOS +0xC698 # HANGUL SYLLABLE IEUNG-YO-NIEUN +0xC699 # HANGUL SYLLABLE IEUNG-YO-NIEUNCIEUC +0xC69A # HANGUL SYLLABLE IEUNG-YO-NIEUNHIEUH +0xC69B # HANGUL SYLLABLE IEUNG-YO-TIKEUT +0xC69C # HANGUL SYLLABLE IEUNG-YO-RIEUL +0xC69D # HANGUL SYLLABLE IEUNG-YO-RIEULKIYEOK +0xC69E # HANGUL SYLLABLE IEUNG-YO-RIEULMIEUM +0xC69F # HANGUL SYLLABLE IEUNG-YO-RIEULPIEUP +0xC6A0 # HANGUL SYLLABLE IEUNG-YO-RIEULSIOS +0xC6A1 # HANGUL SYLLABLE IEUNG-YO-RIEULTHIEUTH +0xC6A2 # HANGUL SYLLABLE IEUNG-YO-RIEULPHIEUPH +0xC6A3 # HANGUL SYLLABLE IEUNG-YO-RIEULHIEUH +0xC6A4 # HANGUL SYLLABLE IEUNG-YO-MIEUM +0xC6A5 # HANGUL SYLLABLE IEUNG-YO-PIEUP +0xC6A6 # HANGUL SYLLABLE IEUNG-YO-PIEUPSIOS +0xC6A7 # HANGUL SYLLABLE IEUNG-YO-SIOS +0xC6A8 # HANGUL SYLLABLE IEUNG-YO-SSANGSIOS +0xC6A9 # HANGUL SYLLABLE IEUNG-YO-IEUNG +0xC6AA # HANGUL SYLLABLE IEUNG-YO-CIEUC +0xC6AB # HANGUL SYLLABLE IEUNG-YO-CHIEUCH +0xC6AC # HANGUL SYLLABLE IEUNG-YO-KHIEUKH +0xC6AD # HANGUL SYLLABLE IEUNG-YO-THIEUTH +0xC6AE # HANGUL SYLLABLE IEUNG-YO-PHIEUPH +0xC6AF # HANGUL SYLLABLE IEUNG-YO-HIEUH +0xC6B0 # HANGUL SYLLABLE IEUNG-U +0xC6B1 # HANGUL SYLLABLE IEUNG-U-KIYEOK +0xC6B2 # HANGUL SYLLABLE IEUNG-U-SSANGKIYEOK +0xC6B3 # HANGUL SYLLABLE IEUNG-U-KIYEOKSIOS +0xC6B4 # HANGUL SYLLABLE IEUNG-U-NIEUN +0xC6B5 # HANGUL SYLLABLE IEUNG-U-NIEUNCIEUC +0xC6B6 # HANGUL SYLLABLE IEUNG-U-NIEUNHIEUH +0xC6B7 # HANGUL SYLLABLE IEUNG-U-TIKEUT +0xC6B8 # HANGUL SYLLABLE IEUNG-U-RIEUL +0xC6B9 # HANGUL SYLLABLE IEUNG-U-RIEULKIYEOK +0xC6BA # HANGUL SYLLABLE IEUNG-U-RIEULMIEUM +0xC6BB # HANGUL SYLLABLE IEUNG-U-RIEULPIEUP +0xC6BC # HANGUL SYLLABLE IEUNG-U-RIEULSIOS +0xC6BD # HANGUL SYLLABLE IEUNG-U-RIEULTHIEUTH +0xC6BE # HANGUL SYLLABLE IEUNG-U-RIEULPHIEUPH +0xC6BF # HANGUL SYLLABLE IEUNG-U-RIEULHIEUH +0xC6C0 # HANGUL SYLLABLE IEUNG-U-MIEUM +0xC6C1 # HANGUL SYLLABLE IEUNG-U-PIEUP +0xC6C2 # HANGUL SYLLABLE IEUNG-U-PIEUPSIOS +0xC6C3 # HANGUL SYLLABLE IEUNG-U-SIOS +0xC6C4 # HANGUL SYLLABLE IEUNG-U-SSANGSIOS +0xC6C5 # HANGUL SYLLABLE IEUNG-U-IEUNG +0xC6C6 # HANGUL SYLLABLE IEUNG-U-CIEUC +0xC6C7 # HANGUL SYLLABLE IEUNG-U-CHIEUCH +0xC6C8 # HANGUL SYLLABLE IEUNG-U-KHIEUKH +0xC6C9 # HANGUL SYLLABLE IEUNG-U-THIEUTH +0xC6CA # HANGUL SYLLABLE IEUNG-U-PHIEUPH +0xC6CB # HANGUL SYLLABLE IEUNG-U-HIEUH +0xC6CC # HANGUL SYLLABLE IEUNG-WEO +0xC6CD # HANGUL SYLLABLE IEUNG-WEO-KIYEOK +0xC6CE # HANGUL SYLLABLE IEUNG-WEO-SSANGKIYEOK +0xC6CF # HANGUL SYLLABLE IEUNG-WEO-KIYEOKSIOS +0xC6D0 # HANGUL SYLLABLE IEUNG-WEO-NIEUN +0xC6D1 # HANGUL SYLLABLE IEUNG-WEO-NIEUNCIEUC +0xC6D2 # HANGUL SYLLABLE IEUNG-WEO-NIEUNHIEUH +0xC6D3 # HANGUL SYLLABLE IEUNG-WEO-TIKEUT +0xC6D4 # HANGUL SYLLABLE IEUNG-WEO-RIEUL +0xC6D5 # HANGUL SYLLABLE IEUNG-WEO-RIEULKIYEOK +0xC6D6 # HANGUL SYLLABLE IEUNG-WEO-RIEULMIEUM +0xC6D7 # HANGUL SYLLABLE IEUNG-WEO-RIEULPIEUP +0xC6D8 # HANGUL SYLLABLE IEUNG-WEO-RIEULSIOS +0xC6D9 # HANGUL SYLLABLE IEUNG-WEO-RIEULTHIEUTH +0xC6DA # HANGUL SYLLABLE IEUNG-WEO-RIEULPHIEUPH +0xC6DB # HANGUL SYLLABLE IEUNG-WEO-RIEULHIEUH +0xC6DC # HANGUL SYLLABLE IEUNG-WEO-MIEUM +0xC6DD # HANGUL SYLLABLE IEUNG-WEO-PIEUP +0xC6DE # HANGUL SYLLABLE IEUNG-WEO-PIEUPSIOS +0xC6DF # HANGUL SYLLABLE IEUNG-WEO-SIOS +0xC6E0 # HANGUL SYLLABLE IEUNG-WEO-SSANGSIOS +0xC6E1 # HANGUL SYLLABLE IEUNG-WEO-IEUNG +0xC6E2 # HANGUL SYLLABLE IEUNG-WEO-CIEUC +0xC6E3 # HANGUL SYLLABLE IEUNG-WEO-CHIEUCH +0xC6E4 # HANGUL SYLLABLE IEUNG-WEO-KHIEUKH +0xC6E5 # HANGUL SYLLABLE IEUNG-WEO-THIEUTH +0xC6E6 # HANGUL SYLLABLE IEUNG-WEO-PHIEUPH +0xC6E7 # HANGUL SYLLABLE IEUNG-WEO-HIEUH +0xC6E8 # HANGUL SYLLABLE IEUNG-WE +0xC6E9 # HANGUL SYLLABLE IEUNG-WE-KIYEOK +0xC6EA # HANGUL SYLLABLE IEUNG-WE-SSANGKIYEOK +0xC6EB # HANGUL SYLLABLE IEUNG-WE-KIYEOKSIOS +0xC6EC # HANGUL SYLLABLE IEUNG-WE-NIEUN +0xC6ED # HANGUL SYLLABLE IEUNG-WE-NIEUNCIEUC +0xC6EE # HANGUL SYLLABLE IEUNG-WE-NIEUNHIEUH +0xC6EF # HANGUL SYLLABLE IEUNG-WE-TIKEUT +0xC6F0 # HANGUL SYLLABLE IEUNG-WE-RIEUL +0xC6F1 # HANGUL SYLLABLE IEUNG-WE-RIEULKIYEOK +0xC6F2 # HANGUL SYLLABLE IEUNG-WE-RIEULMIEUM +0xC6F3 # HANGUL SYLLABLE IEUNG-WE-RIEULPIEUP +0xC6F4 # HANGUL SYLLABLE IEUNG-WE-RIEULSIOS +0xC6F5 # HANGUL SYLLABLE IEUNG-WE-RIEULTHIEUTH +0xC6F6 # HANGUL SYLLABLE IEUNG-WE-RIEULPHIEUPH +0xC6F7 # HANGUL SYLLABLE IEUNG-WE-RIEULHIEUH +0xC6F8 # HANGUL SYLLABLE IEUNG-WE-MIEUM +0xC6F9 # HANGUL SYLLABLE IEUNG-WE-PIEUP +0xC6FA # HANGUL SYLLABLE IEUNG-WE-PIEUPSIOS +0xC6FB # HANGUL SYLLABLE IEUNG-WE-SIOS +0xC6FC # HANGUL SYLLABLE IEUNG-WE-SSANGSIOS +0xC6FD # HANGUL SYLLABLE IEUNG-WE-IEUNG +0xC6FE # HANGUL SYLLABLE IEUNG-WE-CIEUC +0xC6FF # HANGUL SYLLABLE IEUNG-WE-CHIEUCH +0xC700 # HANGUL SYLLABLE IEUNG-WE-KHIEUKH +0xC701 # HANGUL SYLLABLE IEUNG-WE-THIEUTH +0xC702 # HANGUL SYLLABLE IEUNG-WE-PHIEUPH +0xC703 # HANGUL SYLLABLE IEUNG-WE-HIEUH +0xC704 # HANGUL SYLLABLE IEUNG-WI +0xC705 # HANGUL SYLLABLE IEUNG-WI-KIYEOK +0xC706 # HANGUL SYLLABLE IEUNG-WI-SSANGKIYEOK +0xC707 # HANGUL SYLLABLE IEUNG-WI-KIYEOKSIOS +0xC708 # HANGUL SYLLABLE IEUNG-WI-NIEUN +0xC709 # HANGUL SYLLABLE IEUNG-WI-NIEUNCIEUC +0xC70A # HANGUL SYLLABLE IEUNG-WI-NIEUNHIEUH +0xC70B # HANGUL SYLLABLE IEUNG-WI-TIKEUT +0xC70C # HANGUL SYLLABLE IEUNG-WI-RIEUL +0xC70D # HANGUL SYLLABLE IEUNG-WI-RIEULKIYEOK +0xC70E # HANGUL SYLLABLE IEUNG-WI-RIEULMIEUM +0xC70F # HANGUL SYLLABLE IEUNG-WI-RIEULPIEUP +0xC710 # HANGUL SYLLABLE IEUNG-WI-RIEULSIOS +0xC711 # HANGUL SYLLABLE IEUNG-WI-RIEULTHIEUTH +0xC712 # HANGUL SYLLABLE IEUNG-WI-RIEULPHIEUPH +0xC713 # HANGUL SYLLABLE IEUNG-WI-RIEULHIEUH +0xC714 # HANGUL SYLLABLE IEUNG-WI-MIEUM +0xC715 # HANGUL SYLLABLE IEUNG-WI-PIEUP +0xC716 # HANGUL SYLLABLE IEUNG-WI-PIEUPSIOS +0xC717 # HANGUL SYLLABLE IEUNG-WI-SIOS +0xC718 # HANGUL SYLLABLE IEUNG-WI-SSANGSIOS +0xC719 # HANGUL SYLLABLE IEUNG-WI-IEUNG +0xC71A # HANGUL SYLLABLE IEUNG-WI-CIEUC +0xC71B # HANGUL SYLLABLE IEUNG-WI-CHIEUCH +0xC71C # HANGUL SYLLABLE IEUNG-WI-KHIEUKH +0xC71D # HANGUL SYLLABLE IEUNG-WI-THIEUTH +0xC71E # HANGUL SYLLABLE IEUNG-WI-PHIEUPH +0xC71F # HANGUL SYLLABLE IEUNG-WI-HIEUH +0xC720 # HANGUL SYLLABLE IEUNG-YU +0xC721 # HANGUL SYLLABLE IEUNG-YU-KIYEOK +0xC722 # HANGUL SYLLABLE IEUNG-YU-SSANGKIYEOK +0xC723 # HANGUL SYLLABLE IEUNG-YU-KIYEOKSIOS +0xC724 # HANGUL SYLLABLE IEUNG-YU-NIEUN +0xC725 # HANGUL SYLLABLE IEUNG-YU-NIEUNCIEUC +0xC726 # HANGUL SYLLABLE IEUNG-YU-NIEUNHIEUH +0xC727 # HANGUL SYLLABLE IEUNG-YU-TIKEUT +0xC728 # HANGUL SYLLABLE IEUNG-YU-RIEUL +0xC729 # HANGUL SYLLABLE IEUNG-YU-RIEULKIYEOK +0xC72A # HANGUL SYLLABLE IEUNG-YU-RIEULMIEUM +0xC72B # HANGUL SYLLABLE IEUNG-YU-RIEULPIEUP +0xC72C # HANGUL SYLLABLE IEUNG-YU-RIEULSIOS +0xC72D # HANGUL SYLLABLE IEUNG-YU-RIEULTHIEUTH +0xC72E # HANGUL SYLLABLE IEUNG-YU-RIEULPHIEUPH +0xC72F # HANGUL SYLLABLE IEUNG-YU-RIEULHIEUH +0xC730 # HANGUL SYLLABLE IEUNG-YU-MIEUM +0xC731 # HANGUL SYLLABLE IEUNG-YU-PIEUP +0xC732 # HANGUL SYLLABLE IEUNG-YU-PIEUPSIOS +0xC733 # HANGUL SYLLABLE IEUNG-YU-SIOS +0xC734 # HANGUL SYLLABLE IEUNG-YU-SSANGSIOS +0xC735 # HANGUL SYLLABLE IEUNG-YU-IEUNG +0xC736 # HANGUL SYLLABLE IEUNG-YU-CIEUC +0xC737 # HANGUL SYLLABLE IEUNG-YU-CHIEUCH +0xC738 # HANGUL SYLLABLE IEUNG-YU-KHIEUKH +0xC739 # HANGUL SYLLABLE IEUNG-YU-THIEUTH +0xC73A # HANGUL SYLLABLE IEUNG-YU-PHIEUPH +0xC73B # HANGUL SYLLABLE IEUNG-YU-HIEUH +0xC73C # HANGUL SYLLABLE IEUNG-EU +0xC73D # HANGUL SYLLABLE IEUNG-EU-KIYEOK +0xC73E # HANGUL SYLLABLE IEUNG-EU-SSANGKIYEOK +0xC73F # HANGUL SYLLABLE IEUNG-EU-KIYEOKSIOS +0xC740 # HANGUL SYLLABLE IEUNG-EU-NIEUN +0xC741 # HANGUL SYLLABLE IEUNG-EU-NIEUNCIEUC +0xC742 # HANGUL SYLLABLE IEUNG-EU-NIEUNHIEUH +0xC743 # HANGUL SYLLABLE IEUNG-EU-TIKEUT +0xC744 # HANGUL SYLLABLE IEUNG-EU-RIEUL +0xC745 # HANGUL SYLLABLE IEUNG-EU-RIEULKIYEOK +0xC746 # HANGUL SYLLABLE IEUNG-EU-RIEULMIEUM +0xC747 # HANGUL SYLLABLE IEUNG-EU-RIEULPIEUP +0xC748 # HANGUL SYLLABLE IEUNG-EU-RIEULSIOS +0xC749 # HANGUL SYLLABLE IEUNG-EU-RIEULTHIEUTH +0xC74A # HANGUL SYLLABLE IEUNG-EU-RIEULPHIEUPH +0xC74B # HANGUL SYLLABLE IEUNG-EU-RIEULHIEUH +0xC74C # HANGUL SYLLABLE IEUNG-EU-MIEUM +0xC74D # HANGUL SYLLABLE IEUNG-EU-PIEUP +0xC74E # HANGUL SYLLABLE IEUNG-EU-PIEUPSIOS +0xC74F # HANGUL SYLLABLE IEUNG-EU-SIOS +0xC750 # HANGUL SYLLABLE IEUNG-EU-SSANGSIOS +0xC751 # HANGUL SYLLABLE IEUNG-EU-IEUNG +0xC752 # HANGUL SYLLABLE IEUNG-EU-CIEUC +0xC753 # HANGUL SYLLABLE IEUNG-EU-CHIEUCH +0xC754 # HANGUL SYLLABLE IEUNG-EU-KHIEUKH +0xC755 # HANGUL SYLLABLE IEUNG-EU-THIEUTH +0xC756 # HANGUL SYLLABLE IEUNG-EU-PHIEUPH +0xC757 # HANGUL SYLLABLE IEUNG-EU-HIEUH +0xC758 # HANGUL SYLLABLE IEUNG-YI +0xC759 # HANGUL SYLLABLE IEUNG-YI-KIYEOK +0xC75A # HANGUL SYLLABLE IEUNG-YI-SSANGKIYEOK +0xC75B # HANGUL SYLLABLE IEUNG-YI-KIYEOKSIOS +0xC75C # HANGUL SYLLABLE IEUNG-YI-NIEUN +0xC75D # HANGUL SYLLABLE IEUNG-YI-NIEUNCIEUC +0xC75E # HANGUL SYLLABLE IEUNG-YI-NIEUNHIEUH +0xC75F # HANGUL SYLLABLE IEUNG-YI-TIKEUT +0xC760 # HANGUL SYLLABLE IEUNG-YI-RIEUL +0xC761 # HANGUL SYLLABLE IEUNG-YI-RIEULKIYEOK +0xC762 # HANGUL SYLLABLE IEUNG-YI-RIEULMIEUM +0xC763 # HANGUL SYLLABLE IEUNG-YI-RIEULPIEUP +0xC764 # HANGUL SYLLABLE IEUNG-YI-RIEULSIOS +0xC765 # HANGUL SYLLABLE IEUNG-YI-RIEULTHIEUTH +0xC766 # HANGUL SYLLABLE IEUNG-YI-RIEULPHIEUPH +0xC767 # HANGUL SYLLABLE IEUNG-YI-RIEULHIEUH +0xC768 # HANGUL SYLLABLE IEUNG-YI-MIEUM +0xC769 # HANGUL SYLLABLE IEUNG-YI-PIEUP +0xC76A # HANGUL SYLLABLE IEUNG-YI-PIEUPSIOS +0xC76B # HANGUL SYLLABLE IEUNG-YI-SIOS +0xC76C # HANGUL SYLLABLE IEUNG-YI-SSANGSIOS +0xC76D # HANGUL SYLLABLE IEUNG-YI-IEUNG +0xC76E # HANGUL SYLLABLE IEUNG-YI-CIEUC +0xC76F # HANGUL SYLLABLE IEUNG-YI-CHIEUCH +0xC770 # HANGUL SYLLABLE IEUNG-YI-KHIEUKH +0xC771 # HANGUL SYLLABLE IEUNG-YI-THIEUTH +0xC772 # HANGUL SYLLABLE IEUNG-YI-PHIEUPH +0xC773 # HANGUL SYLLABLE IEUNG-YI-HIEUH +0xC774 # HANGUL SYLLABLE IEUNG-I +0xC775 # HANGUL SYLLABLE IEUNG-I-KIYEOK +0xC776 # HANGUL SYLLABLE IEUNG-I-SSANGKIYEOK +0xC777 # HANGUL SYLLABLE IEUNG-I-KIYEOKSIOS +0xC778 # HANGUL SYLLABLE IEUNG-I-NIEUN +0xC779 # HANGUL SYLLABLE IEUNG-I-NIEUNCIEUC +0xC77A # HANGUL SYLLABLE IEUNG-I-NIEUNHIEUH +0xC77B # HANGUL SYLLABLE IEUNG-I-TIKEUT +0xC77C # HANGUL SYLLABLE IEUNG-I-RIEUL +0xC77D # HANGUL SYLLABLE IEUNG-I-RIEULKIYEOK +0xC77E # HANGUL SYLLABLE IEUNG-I-RIEULMIEUM +0xC77F # HANGUL SYLLABLE IEUNG-I-RIEULPIEUP +0xC780 # HANGUL SYLLABLE IEUNG-I-RIEULSIOS +0xC781 # HANGUL SYLLABLE IEUNG-I-RIEULTHIEUTH +0xC782 # HANGUL SYLLABLE IEUNG-I-RIEULPHIEUPH +0xC783 # HANGUL SYLLABLE IEUNG-I-RIEULHIEUH +0xC784 # HANGUL SYLLABLE IEUNG-I-MIEUM +0xC785 # HANGUL SYLLABLE IEUNG-I-PIEUP +0xC786 # HANGUL SYLLABLE IEUNG-I-PIEUPSIOS +0xC787 # HANGUL SYLLABLE IEUNG-I-SIOS +0xC788 # HANGUL SYLLABLE IEUNG-I-SSANGSIOS +0xC789 # HANGUL SYLLABLE IEUNG-I-IEUNG +0xC78A # HANGUL SYLLABLE IEUNG-I-CIEUC +0xC78B # HANGUL SYLLABLE IEUNG-I-CHIEUCH +0xC78C # HANGUL SYLLABLE IEUNG-I-KHIEUKH +0xC78D # HANGUL SYLLABLE IEUNG-I-THIEUTH +0xC78E # HANGUL SYLLABLE IEUNG-I-PHIEUPH +0xC78F # HANGUL SYLLABLE IEUNG-I-HIEUH +0xC790 # HANGUL SYLLABLE CIEUC-A +0xC791 # HANGUL SYLLABLE CIEUC-A-KIYEOK +0xC792 # HANGUL SYLLABLE CIEUC-A-SSANGKIYEOK +0xC793 # HANGUL SYLLABLE CIEUC-A-KIYEOKSIOS +0xC794 # HANGUL SYLLABLE CIEUC-A-NIEUN +0xC795 # HANGUL SYLLABLE CIEUC-A-NIEUNCIEUC +0xC796 # HANGUL SYLLABLE CIEUC-A-NIEUNHIEUH +0xC797 # HANGUL SYLLABLE CIEUC-A-TIKEUT +0xC798 # HANGUL SYLLABLE CIEUC-A-RIEUL +0xC799 # HANGUL SYLLABLE CIEUC-A-RIEULKIYEOK +0xC79A # HANGUL SYLLABLE CIEUC-A-RIEULMIEUM +0xC79B # HANGUL SYLLABLE CIEUC-A-RIEULPIEUP +0xC79C # HANGUL SYLLABLE CIEUC-A-RIEULSIOS +0xC79D # HANGUL SYLLABLE CIEUC-A-RIEULTHIEUTH +0xC79E # HANGUL SYLLABLE CIEUC-A-RIEULPHIEUPH +0xC79F # HANGUL SYLLABLE CIEUC-A-RIEULHIEUH +0xC7A0 # HANGUL SYLLABLE CIEUC-A-MIEUM +0xC7A1 # HANGUL SYLLABLE CIEUC-A-PIEUP +0xC7A2 # HANGUL SYLLABLE CIEUC-A-PIEUPSIOS +0xC7A3 # HANGUL SYLLABLE CIEUC-A-SIOS +0xC7A4 # HANGUL SYLLABLE CIEUC-A-SSANGSIOS +0xC7A5 # HANGUL SYLLABLE CIEUC-A-IEUNG +0xC7A6 # HANGUL SYLLABLE CIEUC-A-CIEUC +0xC7A7 # HANGUL SYLLABLE CIEUC-A-CHIEUCH +0xC7A8 # HANGUL SYLLABLE CIEUC-A-KHIEUKH +0xC7A9 # HANGUL SYLLABLE CIEUC-A-THIEUTH +0xC7AA # HANGUL SYLLABLE CIEUC-A-PHIEUPH +0xC7AB # HANGUL SYLLABLE CIEUC-A-HIEUH +0xC7AC # HANGUL SYLLABLE CIEUC-AE +0xC7AD # HANGUL SYLLABLE CIEUC-AE-KIYEOK +0xC7AE # HANGUL SYLLABLE CIEUC-AE-SSANGKIYEOK +0xC7AF # HANGUL SYLLABLE CIEUC-AE-KIYEOKSIOS +0xC7B0 # HANGUL SYLLABLE CIEUC-AE-NIEUN +0xC7B1 # HANGUL SYLLABLE CIEUC-AE-NIEUNCIEUC +0xC7B2 # HANGUL SYLLABLE CIEUC-AE-NIEUNHIEUH +0xC7B3 # HANGUL SYLLABLE CIEUC-AE-TIKEUT +0xC7B4 # HANGUL SYLLABLE CIEUC-AE-RIEUL +0xC7B5 # HANGUL SYLLABLE CIEUC-AE-RIEULKIYEOK +0xC7B6 # HANGUL SYLLABLE CIEUC-AE-RIEULMIEUM +0xC7B7 # HANGUL SYLLABLE CIEUC-AE-RIEULPIEUP +0xC7B8 # HANGUL SYLLABLE CIEUC-AE-RIEULSIOS +0xC7B9 # HANGUL SYLLABLE CIEUC-AE-RIEULTHIEUTH +0xC7BA # HANGUL SYLLABLE CIEUC-AE-RIEULPHIEUPH +0xC7BB # HANGUL SYLLABLE CIEUC-AE-RIEULHIEUH +0xC7BC # HANGUL SYLLABLE CIEUC-AE-MIEUM +0xC7BD # HANGUL SYLLABLE CIEUC-AE-PIEUP +0xC7BE # HANGUL SYLLABLE CIEUC-AE-PIEUPSIOS +0xC7BF # HANGUL SYLLABLE CIEUC-AE-SIOS +0xC7C0 # HANGUL SYLLABLE CIEUC-AE-SSANGSIOS +0xC7C1 # HANGUL SYLLABLE CIEUC-AE-IEUNG +0xC7C2 # HANGUL SYLLABLE CIEUC-AE-CIEUC +0xC7C3 # HANGUL SYLLABLE CIEUC-AE-CHIEUCH +0xC7C4 # HANGUL SYLLABLE CIEUC-AE-KHIEUKH +0xC7C5 # HANGUL SYLLABLE CIEUC-AE-THIEUTH +0xC7C6 # HANGUL SYLLABLE CIEUC-AE-PHIEUPH +0xC7C7 # HANGUL SYLLABLE CIEUC-AE-HIEUH +0xC7C8 # HANGUL SYLLABLE CIEUC-YA +0xC7C9 # HANGUL SYLLABLE CIEUC-YA-KIYEOK +0xC7CA # HANGUL SYLLABLE CIEUC-YA-SSANGKIYEOK +0xC7CB # HANGUL SYLLABLE CIEUC-YA-KIYEOKSIOS +0xC7CC # HANGUL SYLLABLE CIEUC-YA-NIEUN +0xC7CD # HANGUL SYLLABLE CIEUC-YA-NIEUNCIEUC +0xC7CE # HANGUL SYLLABLE CIEUC-YA-NIEUNHIEUH +0xC7CF # HANGUL SYLLABLE CIEUC-YA-TIKEUT +0xC7D0 # HANGUL SYLLABLE CIEUC-YA-RIEUL +0xC7D1 # HANGUL SYLLABLE CIEUC-YA-RIEULKIYEOK +0xC7D2 # HANGUL SYLLABLE CIEUC-YA-RIEULMIEUM +0xC7D3 # HANGUL SYLLABLE CIEUC-YA-RIEULPIEUP +0xC7D4 # HANGUL SYLLABLE CIEUC-YA-RIEULSIOS +0xC7D5 # HANGUL SYLLABLE CIEUC-YA-RIEULTHIEUTH +0xC7D6 # HANGUL SYLLABLE CIEUC-YA-RIEULPHIEUPH +0xC7D7 # HANGUL SYLLABLE CIEUC-YA-RIEULHIEUH +0xC7D8 # HANGUL SYLLABLE CIEUC-YA-MIEUM +0xC7D9 # HANGUL SYLLABLE CIEUC-YA-PIEUP +0xC7DA # HANGUL SYLLABLE CIEUC-YA-PIEUPSIOS +0xC7DB # HANGUL SYLLABLE CIEUC-YA-SIOS +0xC7DC # HANGUL SYLLABLE CIEUC-YA-SSANGSIOS +0xC7DD # HANGUL SYLLABLE CIEUC-YA-IEUNG +0xC7DE # HANGUL SYLLABLE CIEUC-YA-CIEUC +0xC7DF # HANGUL SYLLABLE CIEUC-YA-CHIEUCH +0xC7E0 # HANGUL SYLLABLE CIEUC-YA-KHIEUKH +0xC7E1 # HANGUL SYLLABLE CIEUC-YA-THIEUTH +0xC7E2 # HANGUL SYLLABLE CIEUC-YA-PHIEUPH +0xC7E3 # HANGUL SYLLABLE CIEUC-YA-HIEUH +0xC7E4 # HANGUL SYLLABLE CIEUC-YAE +0xC7E5 # HANGUL SYLLABLE CIEUC-YAE-KIYEOK +0xC7E6 # HANGUL SYLLABLE CIEUC-YAE-SSANGKIYEOK +0xC7E7 # HANGUL SYLLABLE CIEUC-YAE-KIYEOKSIOS +0xC7E8 # HANGUL SYLLABLE CIEUC-YAE-NIEUN +0xC7E9 # HANGUL SYLLABLE CIEUC-YAE-NIEUNCIEUC +0xC7EA # HANGUL SYLLABLE CIEUC-YAE-NIEUNHIEUH +0xC7EB # HANGUL SYLLABLE CIEUC-YAE-TIKEUT +0xC7EC # HANGUL SYLLABLE CIEUC-YAE-RIEUL +0xC7ED # HANGUL SYLLABLE CIEUC-YAE-RIEULKIYEOK +0xC7EE # HANGUL SYLLABLE CIEUC-YAE-RIEULMIEUM +0xC7EF # HANGUL SYLLABLE CIEUC-YAE-RIEULPIEUP +0xC7F0 # HANGUL SYLLABLE CIEUC-YAE-RIEULSIOS +0xC7F1 # HANGUL SYLLABLE CIEUC-YAE-RIEULTHIEUTH +0xC7F2 # HANGUL SYLLABLE CIEUC-YAE-RIEULPHIEUPH +0xC7F3 # HANGUL SYLLABLE CIEUC-YAE-RIEULHIEUH +0xC7F4 # HANGUL SYLLABLE CIEUC-YAE-MIEUM +0xC7F5 # HANGUL SYLLABLE CIEUC-YAE-PIEUP +0xC7F6 # HANGUL SYLLABLE CIEUC-YAE-PIEUPSIOS +0xC7F7 # HANGUL SYLLABLE CIEUC-YAE-SIOS +0xC7F8 # HANGUL SYLLABLE CIEUC-YAE-SSANGSIOS +0xC7F9 # HANGUL SYLLABLE CIEUC-YAE-IEUNG +0xC7FA # HANGUL SYLLABLE CIEUC-YAE-CIEUC +0xC7FB # HANGUL SYLLABLE CIEUC-YAE-CHIEUCH +0xC7FC # HANGUL SYLLABLE CIEUC-YAE-KHIEUKH +0xC7FD # HANGUL SYLLABLE CIEUC-YAE-THIEUTH +0xC7FE # HANGUL SYLLABLE CIEUC-YAE-PHIEUPH +0xC7FF # HANGUL SYLLABLE CIEUC-YAE-HIEUH +0xC800 # HANGUL SYLLABLE CIEUC-EO +0xC801 # HANGUL SYLLABLE CIEUC-EO-KIYEOK +0xC802 # HANGUL SYLLABLE CIEUC-EO-SSANGKIYEOK +0xC803 # HANGUL SYLLABLE CIEUC-EO-KIYEOKSIOS +0xC804 # HANGUL SYLLABLE CIEUC-EO-NIEUN +0xC805 # HANGUL SYLLABLE CIEUC-EO-NIEUNCIEUC +0xC806 # HANGUL SYLLABLE CIEUC-EO-NIEUNHIEUH +0xC807 # HANGUL SYLLABLE CIEUC-EO-TIKEUT +0xC808 # HANGUL SYLLABLE CIEUC-EO-RIEUL +0xC809 # HANGUL SYLLABLE CIEUC-EO-RIEULKIYEOK +0xC80A # HANGUL SYLLABLE CIEUC-EO-RIEULMIEUM +0xC80B # HANGUL SYLLABLE CIEUC-EO-RIEULPIEUP +0xC80C # HANGUL SYLLABLE CIEUC-EO-RIEULSIOS +0xC80D # HANGUL SYLLABLE CIEUC-EO-RIEULTHIEUTH +0xC80E # HANGUL SYLLABLE CIEUC-EO-RIEULPHIEUPH +0xC80F # HANGUL SYLLABLE CIEUC-EO-RIEULHIEUH +0xC810 # HANGUL SYLLABLE CIEUC-EO-MIEUM +0xC811 # HANGUL SYLLABLE CIEUC-EO-PIEUP +0xC812 # HANGUL SYLLABLE CIEUC-EO-PIEUPSIOS +0xC813 # HANGUL SYLLABLE CIEUC-EO-SIOS +0xC814 # HANGUL SYLLABLE CIEUC-EO-SSANGSIOS +0xC815 # HANGUL SYLLABLE CIEUC-EO-IEUNG +0xC816 # HANGUL SYLLABLE CIEUC-EO-CIEUC +0xC817 # HANGUL SYLLABLE CIEUC-EO-CHIEUCH +0xC818 # HANGUL SYLLABLE CIEUC-EO-KHIEUKH +0xC819 # HANGUL SYLLABLE CIEUC-EO-THIEUTH +0xC81A # HANGUL SYLLABLE CIEUC-EO-PHIEUPH +0xC81B # HANGUL SYLLABLE CIEUC-EO-HIEUH +0xC81C # HANGUL SYLLABLE CIEUC-E +0xC81D # HANGUL SYLLABLE CIEUC-E-KIYEOK +0xC81E # HANGUL SYLLABLE CIEUC-E-SSANGKIYEOK +0xC81F # HANGUL SYLLABLE CIEUC-E-KIYEOKSIOS +0xC820 # HANGUL SYLLABLE CIEUC-E-NIEUN +0xC821 # HANGUL SYLLABLE CIEUC-E-NIEUNCIEUC +0xC822 # HANGUL SYLLABLE CIEUC-E-NIEUNHIEUH +0xC823 # HANGUL SYLLABLE CIEUC-E-TIKEUT +0xC824 # HANGUL SYLLABLE CIEUC-E-RIEUL +0xC825 # HANGUL SYLLABLE CIEUC-E-RIEULKIYEOK +0xC826 # HANGUL SYLLABLE CIEUC-E-RIEULMIEUM +0xC827 # HANGUL SYLLABLE CIEUC-E-RIEULPIEUP +0xC828 # HANGUL SYLLABLE CIEUC-E-RIEULSIOS +0xC829 # HANGUL SYLLABLE CIEUC-E-RIEULTHIEUTH +0xC82A # HANGUL SYLLABLE CIEUC-E-RIEULPHIEUPH +0xC82B # HANGUL SYLLABLE CIEUC-E-RIEULHIEUH +0xC82C # HANGUL SYLLABLE CIEUC-E-MIEUM +0xC82D # HANGUL SYLLABLE CIEUC-E-PIEUP +0xC82E # HANGUL SYLLABLE CIEUC-E-PIEUPSIOS +0xC82F # HANGUL SYLLABLE CIEUC-E-SIOS +0xC830 # HANGUL SYLLABLE CIEUC-E-SSANGSIOS +0xC831 # HANGUL SYLLABLE CIEUC-E-IEUNG +0xC832 # HANGUL SYLLABLE CIEUC-E-CIEUC +0xC833 # HANGUL SYLLABLE CIEUC-E-CHIEUCH +0xC834 # HANGUL SYLLABLE CIEUC-E-KHIEUKH +0xC835 # HANGUL SYLLABLE CIEUC-E-THIEUTH +0xC836 # HANGUL SYLLABLE CIEUC-E-PHIEUPH +0xC837 # HANGUL SYLLABLE CIEUC-E-HIEUH +0xC838 # HANGUL SYLLABLE CIEUC-YEO +0xC839 # HANGUL SYLLABLE CIEUC-YEO-KIYEOK +0xC83A # HANGUL SYLLABLE CIEUC-YEO-SSANGKIYEOK +0xC83B # HANGUL SYLLABLE CIEUC-YEO-KIYEOKSIOS +0xC83C # HANGUL SYLLABLE CIEUC-YEO-NIEUN +0xC83D # HANGUL SYLLABLE CIEUC-YEO-NIEUNCIEUC +0xC83E # HANGUL SYLLABLE CIEUC-YEO-NIEUNHIEUH +0xC83F # HANGUL SYLLABLE CIEUC-YEO-TIKEUT +0xC840 # HANGUL SYLLABLE CIEUC-YEO-RIEUL +0xC841 # HANGUL SYLLABLE CIEUC-YEO-RIEULKIYEOK +0xC842 # HANGUL SYLLABLE CIEUC-YEO-RIEULMIEUM +0xC843 # HANGUL SYLLABLE CIEUC-YEO-RIEULPIEUP +0xC844 # HANGUL SYLLABLE CIEUC-YEO-RIEULSIOS +0xC845 # HANGUL SYLLABLE CIEUC-YEO-RIEULTHIEUTH +0xC846 # HANGUL SYLLABLE CIEUC-YEO-RIEULPHIEUPH +0xC847 # HANGUL SYLLABLE CIEUC-YEO-RIEULHIEUH +0xC848 # HANGUL SYLLABLE CIEUC-YEO-MIEUM +0xC849 # HANGUL SYLLABLE CIEUC-YEO-PIEUP +0xC84A # HANGUL SYLLABLE CIEUC-YEO-PIEUPSIOS +0xC84B # HANGUL SYLLABLE CIEUC-YEO-SIOS +0xC84C # HANGUL SYLLABLE CIEUC-YEO-SSANGSIOS +0xC84D # HANGUL SYLLABLE CIEUC-YEO-IEUNG +0xC84E # HANGUL SYLLABLE CIEUC-YEO-CIEUC +0xC84F # HANGUL SYLLABLE CIEUC-YEO-CHIEUCH +0xC850 # HANGUL SYLLABLE CIEUC-YEO-KHIEUKH +0xC851 # HANGUL SYLLABLE CIEUC-YEO-THIEUTH +0xC852 # HANGUL SYLLABLE CIEUC-YEO-PHIEUPH +0xC853 # HANGUL SYLLABLE CIEUC-YEO-HIEUH +0xC854 # HANGUL SYLLABLE CIEUC-YE +0xC855 # HANGUL SYLLABLE CIEUC-YE-KIYEOK +0xC856 # HANGUL SYLLABLE CIEUC-YE-SSANGKIYEOK +0xC857 # HANGUL SYLLABLE CIEUC-YE-KIYEOKSIOS +0xC858 # HANGUL SYLLABLE CIEUC-YE-NIEUN +0xC859 # HANGUL SYLLABLE CIEUC-YE-NIEUNCIEUC +0xC85A # HANGUL SYLLABLE CIEUC-YE-NIEUNHIEUH +0xC85B # HANGUL SYLLABLE CIEUC-YE-TIKEUT +0xC85C # HANGUL SYLLABLE CIEUC-YE-RIEUL +0xC85D # HANGUL SYLLABLE CIEUC-YE-RIEULKIYEOK +0xC85E # HANGUL SYLLABLE CIEUC-YE-RIEULMIEUM +0xC85F # HANGUL SYLLABLE CIEUC-YE-RIEULPIEUP +0xC860 # HANGUL SYLLABLE CIEUC-YE-RIEULSIOS +0xC861 # HANGUL SYLLABLE CIEUC-YE-RIEULTHIEUTH +0xC862 # HANGUL SYLLABLE CIEUC-YE-RIEULPHIEUPH +0xC863 # HANGUL SYLLABLE CIEUC-YE-RIEULHIEUH +0xC864 # HANGUL SYLLABLE CIEUC-YE-MIEUM +0xC865 # HANGUL SYLLABLE CIEUC-YE-PIEUP +0xC866 # HANGUL SYLLABLE CIEUC-YE-PIEUPSIOS +0xC867 # HANGUL SYLLABLE CIEUC-YE-SIOS +0xC868 # HANGUL SYLLABLE CIEUC-YE-SSANGSIOS +0xC869 # HANGUL SYLLABLE CIEUC-YE-IEUNG +0xC86A # HANGUL SYLLABLE CIEUC-YE-CIEUC +0xC86B # HANGUL SYLLABLE CIEUC-YE-CHIEUCH +0xC86C # HANGUL SYLLABLE CIEUC-YE-KHIEUKH +0xC86D # HANGUL SYLLABLE CIEUC-YE-THIEUTH +0xC86E # HANGUL SYLLABLE CIEUC-YE-PHIEUPH +0xC86F # HANGUL SYLLABLE CIEUC-YE-HIEUH +0xC870 # HANGUL SYLLABLE CIEUC-O +0xC871 # HANGUL SYLLABLE CIEUC-O-KIYEOK +0xC872 # HANGUL SYLLABLE CIEUC-O-SSANGKIYEOK +0xC873 # HANGUL SYLLABLE CIEUC-O-KIYEOKSIOS +0xC874 # HANGUL SYLLABLE CIEUC-O-NIEUN +0xC875 # HANGUL SYLLABLE CIEUC-O-NIEUNCIEUC +0xC876 # HANGUL SYLLABLE CIEUC-O-NIEUNHIEUH +0xC877 # HANGUL SYLLABLE CIEUC-O-TIKEUT +0xC878 # HANGUL SYLLABLE CIEUC-O-RIEUL +0xC879 # HANGUL SYLLABLE CIEUC-O-RIEULKIYEOK +0xC87A # HANGUL SYLLABLE CIEUC-O-RIEULMIEUM +0xC87B # HANGUL SYLLABLE CIEUC-O-RIEULPIEUP +0xC87C # HANGUL SYLLABLE CIEUC-O-RIEULSIOS +0xC87D # HANGUL SYLLABLE CIEUC-O-RIEULTHIEUTH +0xC87E # HANGUL SYLLABLE CIEUC-O-RIEULPHIEUPH +0xC87F # HANGUL SYLLABLE CIEUC-O-RIEULHIEUH +0xC880 # HANGUL SYLLABLE CIEUC-O-MIEUM +0xC881 # HANGUL SYLLABLE CIEUC-O-PIEUP +0xC882 # HANGUL SYLLABLE CIEUC-O-PIEUPSIOS +0xC883 # HANGUL SYLLABLE CIEUC-O-SIOS +0xC884 # HANGUL SYLLABLE CIEUC-O-SSANGSIOS +0xC885 # HANGUL SYLLABLE CIEUC-O-IEUNG +0xC886 # HANGUL SYLLABLE CIEUC-O-CIEUC +0xC887 # HANGUL SYLLABLE CIEUC-O-CHIEUCH +0xC888 # HANGUL SYLLABLE CIEUC-O-KHIEUKH +0xC889 # HANGUL SYLLABLE CIEUC-O-THIEUTH +0xC88A # HANGUL SYLLABLE CIEUC-O-PHIEUPH +0xC88B # HANGUL SYLLABLE CIEUC-O-HIEUH +0xC88C # HANGUL SYLLABLE CIEUC-WA +0xC88D # HANGUL SYLLABLE CIEUC-WA-KIYEOK +0xC88E # HANGUL SYLLABLE CIEUC-WA-SSANGKIYEOK +0xC88F # HANGUL SYLLABLE CIEUC-WA-KIYEOKSIOS +0xC890 # HANGUL SYLLABLE CIEUC-WA-NIEUN +0xC891 # HANGUL SYLLABLE CIEUC-WA-NIEUNCIEUC +0xC892 # HANGUL SYLLABLE CIEUC-WA-NIEUNHIEUH +0xC893 # HANGUL SYLLABLE CIEUC-WA-TIKEUT +0xC894 # HANGUL SYLLABLE CIEUC-WA-RIEUL +0xC895 # HANGUL SYLLABLE CIEUC-WA-RIEULKIYEOK +0xC896 # HANGUL SYLLABLE CIEUC-WA-RIEULMIEUM +0xC897 # HANGUL SYLLABLE CIEUC-WA-RIEULPIEUP +0xC898 # HANGUL SYLLABLE CIEUC-WA-RIEULSIOS +0xC899 # HANGUL SYLLABLE CIEUC-WA-RIEULTHIEUTH +0xC89A # HANGUL SYLLABLE CIEUC-WA-RIEULPHIEUPH +0xC89B # HANGUL SYLLABLE CIEUC-WA-RIEULHIEUH +0xC89C # HANGUL SYLLABLE CIEUC-WA-MIEUM +0xC89D # HANGUL SYLLABLE CIEUC-WA-PIEUP +0xC89E # HANGUL SYLLABLE CIEUC-WA-PIEUPSIOS +0xC89F # HANGUL SYLLABLE CIEUC-WA-SIOS +0xC8A0 # HANGUL SYLLABLE CIEUC-WA-SSANGSIOS +0xC8A1 # HANGUL SYLLABLE CIEUC-WA-IEUNG +0xC8A2 # HANGUL SYLLABLE CIEUC-WA-CIEUC +0xC8A3 # HANGUL SYLLABLE CIEUC-WA-CHIEUCH +0xC8A4 # HANGUL SYLLABLE CIEUC-WA-KHIEUKH +0xC8A5 # HANGUL SYLLABLE CIEUC-WA-THIEUTH +0xC8A6 # HANGUL SYLLABLE CIEUC-WA-PHIEUPH +0xC8A7 # HANGUL SYLLABLE CIEUC-WA-HIEUH +0xC8A8 # HANGUL SYLLABLE CIEUC-WAE +0xC8A9 # HANGUL SYLLABLE CIEUC-WAE-KIYEOK +0xC8AA # HANGUL SYLLABLE CIEUC-WAE-SSANGKIYEOK +0xC8AB # HANGUL SYLLABLE CIEUC-WAE-KIYEOKSIOS +0xC8AC # HANGUL SYLLABLE CIEUC-WAE-NIEUN +0xC8AD # HANGUL SYLLABLE CIEUC-WAE-NIEUNCIEUC +0xC8AE # HANGUL SYLLABLE CIEUC-WAE-NIEUNHIEUH +0xC8AF # HANGUL SYLLABLE CIEUC-WAE-TIKEUT +0xC8B0 # HANGUL SYLLABLE CIEUC-WAE-RIEUL +0xC8B1 # HANGUL SYLLABLE CIEUC-WAE-RIEULKIYEOK +0xC8B2 # HANGUL SYLLABLE CIEUC-WAE-RIEULMIEUM +0xC8B3 # HANGUL SYLLABLE CIEUC-WAE-RIEULPIEUP +0xC8B4 # HANGUL SYLLABLE CIEUC-WAE-RIEULSIOS +0xC8B5 # HANGUL SYLLABLE CIEUC-WAE-RIEULTHIEUTH +0xC8B6 # HANGUL SYLLABLE CIEUC-WAE-RIEULPHIEUPH +0xC8B7 # HANGUL SYLLABLE CIEUC-WAE-RIEULHIEUH +0xC8B8 # HANGUL SYLLABLE CIEUC-WAE-MIEUM +0xC8B9 # HANGUL SYLLABLE CIEUC-WAE-PIEUP +0xC8BA # HANGUL SYLLABLE CIEUC-WAE-PIEUPSIOS +0xC8BB # HANGUL SYLLABLE CIEUC-WAE-SIOS +0xC8BC # HANGUL SYLLABLE CIEUC-WAE-SSANGSIOS +0xC8BD # HANGUL SYLLABLE CIEUC-WAE-IEUNG +0xC8BE # HANGUL SYLLABLE CIEUC-WAE-CIEUC +0xC8BF # HANGUL SYLLABLE CIEUC-WAE-CHIEUCH +0xC8C0 # HANGUL SYLLABLE CIEUC-WAE-KHIEUKH +0xC8C1 # HANGUL SYLLABLE CIEUC-WAE-THIEUTH +0xC8C2 # HANGUL SYLLABLE CIEUC-WAE-PHIEUPH +0xC8C3 # HANGUL SYLLABLE CIEUC-WAE-HIEUH +0xC8C4 # HANGUL SYLLABLE CIEUC-OE +0xC8C5 # HANGUL SYLLABLE CIEUC-OE-KIYEOK +0xC8C6 # HANGUL SYLLABLE CIEUC-OE-SSANGKIYEOK +0xC8C7 # HANGUL SYLLABLE CIEUC-OE-KIYEOKSIOS +0xC8C8 # HANGUL SYLLABLE CIEUC-OE-NIEUN +0xC8C9 # HANGUL SYLLABLE CIEUC-OE-NIEUNCIEUC +0xC8CA # HANGUL SYLLABLE CIEUC-OE-NIEUNHIEUH +0xC8CB # HANGUL SYLLABLE CIEUC-OE-TIKEUT +0xC8CC # HANGUL SYLLABLE CIEUC-OE-RIEUL +0xC8CD # HANGUL SYLLABLE CIEUC-OE-RIEULKIYEOK +0xC8CE # HANGUL SYLLABLE CIEUC-OE-RIEULMIEUM +0xC8CF # HANGUL SYLLABLE CIEUC-OE-RIEULPIEUP +0xC8D0 # HANGUL SYLLABLE CIEUC-OE-RIEULSIOS +0xC8D1 # HANGUL SYLLABLE CIEUC-OE-RIEULTHIEUTH +0xC8D2 # HANGUL SYLLABLE CIEUC-OE-RIEULPHIEUPH +0xC8D3 # HANGUL SYLLABLE CIEUC-OE-RIEULHIEUH +0xC8D4 # HANGUL SYLLABLE CIEUC-OE-MIEUM +0xC8D5 # HANGUL SYLLABLE CIEUC-OE-PIEUP +0xC8D6 # HANGUL SYLLABLE CIEUC-OE-PIEUPSIOS +0xC8D7 # HANGUL SYLLABLE CIEUC-OE-SIOS +0xC8D8 # HANGUL SYLLABLE CIEUC-OE-SSANGSIOS +0xC8D9 # HANGUL SYLLABLE CIEUC-OE-IEUNG +0xC8DA # HANGUL SYLLABLE CIEUC-OE-CIEUC +0xC8DB # HANGUL SYLLABLE CIEUC-OE-CHIEUCH +0xC8DC # HANGUL SYLLABLE CIEUC-OE-KHIEUKH +0xC8DD # HANGUL SYLLABLE CIEUC-OE-THIEUTH +0xC8DE # HANGUL SYLLABLE CIEUC-OE-PHIEUPH +0xC8DF # HANGUL SYLLABLE CIEUC-OE-HIEUH +0xC8E0 # HANGUL SYLLABLE CIEUC-YO +0xC8E1 # HANGUL SYLLABLE CIEUC-YO-KIYEOK +0xC8E2 # HANGUL SYLLABLE CIEUC-YO-SSANGKIYEOK +0xC8E3 # HANGUL SYLLABLE CIEUC-YO-KIYEOKSIOS +0xC8E4 # HANGUL SYLLABLE CIEUC-YO-NIEUN +0xC8E5 # HANGUL SYLLABLE CIEUC-YO-NIEUNCIEUC +0xC8E6 # HANGUL SYLLABLE CIEUC-YO-NIEUNHIEUH +0xC8E7 # HANGUL SYLLABLE CIEUC-YO-TIKEUT +0xC8E8 # HANGUL SYLLABLE CIEUC-YO-RIEUL +0xC8E9 # HANGUL SYLLABLE CIEUC-YO-RIEULKIYEOK +0xC8EA # HANGUL SYLLABLE CIEUC-YO-RIEULMIEUM +0xC8EB # HANGUL SYLLABLE CIEUC-YO-RIEULPIEUP +0xC8EC # HANGUL SYLLABLE CIEUC-YO-RIEULSIOS +0xC8ED # HANGUL SYLLABLE CIEUC-YO-RIEULTHIEUTH +0xC8EE # HANGUL SYLLABLE CIEUC-YO-RIEULPHIEUPH +0xC8EF # HANGUL SYLLABLE CIEUC-YO-RIEULHIEUH +0xC8F0 # HANGUL SYLLABLE CIEUC-YO-MIEUM +0xC8F1 # HANGUL SYLLABLE CIEUC-YO-PIEUP +0xC8F2 # HANGUL SYLLABLE CIEUC-YO-PIEUPSIOS +0xC8F3 # HANGUL SYLLABLE CIEUC-YO-SIOS +0xC8F4 # HANGUL SYLLABLE CIEUC-YO-SSANGSIOS +0xC8F5 # HANGUL SYLLABLE CIEUC-YO-IEUNG +0xC8F6 # HANGUL SYLLABLE CIEUC-YO-CIEUC +0xC8F7 # HANGUL SYLLABLE CIEUC-YO-CHIEUCH +0xC8F8 # HANGUL SYLLABLE CIEUC-YO-KHIEUKH +0xC8F9 # HANGUL SYLLABLE CIEUC-YO-THIEUTH +0xC8FA # HANGUL SYLLABLE CIEUC-YO-PHIEUPH +0xC8FB # HANGUL SYLLABLE CIEUC-YO-HIEUH +0xC8FC # HANGUL SYLLABLE CIEUC-U +0xC8FD # HANGUL SYLLABLE CIEUC-U-KIYEOK +0xC8FE # HANGUL SYLLABLE CIEUC-U-SSANGKIYEOK +0xC8FF # HANGUL SYLLABLE CIEUC-U-KIYEOKSIOS +0xC900 # HANGUL SYLLABLE CIEUC-U-NIEUN +0xC901 # HANGUL SYLLABLE CIEUC-U-NIEUNCIEUC +0xC902 # HANGUL SYLLABLE CIEUC-U-NIEUNHIEUH +0xC903 # HANGUL SYLLABLE CIEUC-U-TIKEUT +0xC904 # HANGUL SYLLABLE CIEUC-U-RIEUL +0xC905 # HANGUL SYLLABLE CIEUC-U-RIEULKIYEOK +0xC906 # HANGUL SYLLABLE CIEUC-U-RIEULMIEUM +0xC907 # HANGUL SYLLABLE CIEUC-U-RIEULPIEUP +0xC908 # HANGUL SYLLABLE CIEUC-U-RIEULSIOS +0xC909 # HANGUL SYLLABLE CIEUC-U-RIEULTHIEUTH +0xC90A # HANGUL SYLLABLE CIEUC-U-RIEULPHIEUPH +0xC90B # HANGUL SYLLABLE CIEUC-U-RIEULHIEUH +0xC90C # HANGUL SYLLABLE CIEUC-U-MIEUM +0xC90D # HANGUL SYLLABLE CIEUC-U-PIEUP +0xC90E # HANGUL SYLLABLE CIEUC-U-PIEUPSIOS +0xC90F # HANGUL SYLLABLE CIEUC-U-SIOS +0xC910 # HANGUL SYLLABLE CIEUC-U-SSANGSIOS +0xC911 # HANGUL SYLLABLE CIEUC-U-IEUNG +0xC912 # HANGUL SYLLABLE CIEUC-U-CIEUC +0xC913 # HANGUL SYLLABLE CIEUC-U-CHIEUCH +0xC914 # HANGUL SYLLABLE CIEUC-U-KHIEUKH +0xC915 # HANGUL SYLLABLE CIEUC-U-THIEUTH +0xC916 # HANGUL SYLLABLE CIEUC-U-PHIEUPH +0xC917 # HANGUL SYLLABLE CIEUC-U-HIEUH +0xC918 # HANGUL SYLLABLE CIEUC-WEO +0xC919 # HANGUL SYLLABLE CIEUC-WEO-KIYEOK +0xC91A # HANGUL SYLLABLE CIEUC-WEO-SSANGKIYEOK +0xC91B # HANGUL SYLLABLE CIEUC-WEO-KIYEOKSIOS +0xC91C # HANGUL SYLLABLE CIEUC-WEO-NIEUN +0xC91D # HANGUL SYLLABLE CIEUC-WEO-NIEUNCIEUC +0xC91E # HANGUL SYLLABLE CIEUC-WEO-NIEUNHIEUH +0xC91F # HANGUL SYLLABLE CIEUC-WEO-TIKEUT +0xC920 # HANGUL SYLLABLE CIEUC-WEO-RIEUL +0xC921 # HANGUL SYLLABLE CIEUC-WEO-RIEULKIYEOK +0xC922 # HANGUL SYLLABLE CIEUC-WEO-RIEULMIEUM +0xC923 # HANGUL SYLLABLE CIEUC-WEO-RIEULPIEUP +0xC924 # HANGUL SYLLABLE CIEUC-WEO-RIEULSIOS +0xC925 # HANGUL SYLLABLE CIEUC-WEO-RIEULTHIEUTH +0xC926 # HANGUL SYLLABLE CIEUC-WEO-RIEULPHIEUPH +0xC927 # HANGUL SYLLABLE CIEUC-WEO-RIEULHIEUH +0xC928 # HANGUL SYLLABLE CIEUC-WEO-MIEUM +0xC929 # HANGUL SYLLABLE CIEUC-WEO-PIEUP +0xC92A # HANGUL SYLLABLE CIEUC-WEO-PIEUPSIOS +0xC92B # HANGUL SYLLABLE CIEUC-WEO-SIOS +0xC92C # HANGUL SYLLABLE CIEUC-WEO-SSANGSIOS +0xC92D # HANGUL SYLLABLE CIEUC-WEO-IEUNG +0xC92E # HANGUL SYLLABLE CIEUC-WEO-CIEUC +0xC92F # HANGUL SYLLABLE CIEUC-WEO-CHIEUCH +0xC930 # HANGUL SYLLABLE CIEUC-WEO-KHIEUKH +0xC931 # HANGUL SYLLABLE CIEUC-WEO-THIEUTH +0xC932 # HANGUL SYLLABLE CIEUC-WEO-PHIEUPH +0xC933 # HANGUL SYLLABLE CIEUC-WEO-HIEUH +0xC934 # HANGUL SYLLABLE CIEUC-WE +0xC935 # HANGUL SYLLABLE CIEUC-WE-KIYEOK +0xC936 # HANGUL SYLLABLE CIEUC-WE-SSANGKIYEOK +0xC937 # HANGUL SYLLABLE CIEUC-WE-KIYEOKSIOS +0xC938 # HANGUL SYLLABLE CIEUC-WE-NIEUN +0xC939 # HANGUL SYLLABLE CIEUC-WE-NIEUNCIEUC +0xC93A # HANGUL SYLLABLE CIEUC-WE-NIEUNHIEUH +0xC93B # HANGUL SYLLABLE CIEUC-WE-TIKEUT +0xC93C # HANGUL SYLLABLE CIEUC-WE-RIEUL +0xC93D # HANGUL SYLLABLE CIEUC-WE-RIEULKIYEOK +0xC93E # HANGUL SYLLABLE CIEUC-WE-RIEULMIEUM +0xC93F # HANGUL SYLLABLE CIEUC-WE-RIEULPIEUP +0xC940 # HANGUL SYLLABLE CIEUC-WE-RIEULSIOS +0xC941 # HANGUL SYLLABLE CIEUC-WE-RIEULTHIEUTH +0xC942 # HANGUL SYLLABLE CIEUC-WE-RIEULPHIEUPH +0xC943 # HANGUL SYLLABLE CIEUC-WE-RIEULHIEUH +0xC944 # HANGUL SYLLABLE CIEUC-WE-MIEUM +0xC945 # HANGUL SYLLABLE CIEUC-WE-PIEUP +0xC946 # HANGUL SYLLABLE CIEUC-WE-PIEUPSIOS +0xC947 # HANGUL SYLLABLE CIEUC-WE-SIOS +0xC948 # HANGUL SYLLABLE CIEUC-WE-SSANGSIOS +0xC949 # HANGUL SYLLABLE CIEUC-WE-IEUNG +0xC94A # HANGUL SYLLABLE CIEUC-WE-CIEUC +0xC94B # HANGUL SYLLABLE CIEUC-WE-CHIEUCH +0xC94C # HANGUL SYLLABLE CIEUC-WE-KHIEUKH +0xC94D # HANGUL SYLLABLE CIEUC-WE-THIEUTH +0xC94E # HANGUL SYLLABLE CIEUC-WE-PHIEUPH +0xC94F # HANGUL SYLLABLE CIEUC-WE-HIEUH +0xC950 # HANGUL SYLLABLE CIEUC-WI +0xC951 # HANGUL SYLLABLE CIEUC-WI-KIYEOK +0xC952 # HANGUL SYLLABLE CIEUC-WI-SSANGKIYEOK +0xC953 # HANGUL SYLLABLE CIEUC-WI-KIYEOKSIOS +0xC954 # HANGUL SYLLABLE CIEUC-WI-NIEUN +0xC955 # HANGUL SYLLABLE CIEUC-WI-NIEUNCIEUC +0xC956 # HANGUL SYLLABLE CIEUC-WI-NIEUNHIEUH +0xC957 # HANGUL SYLLABLE CIEUC-WI-TIKEUT +0xC958 # HANGUL SYLLABLE CIEUC-WI-RIEUL +0xC959 # HANGUL SYLLABLE CIEUC-WI-RIEULKIYEOK +0xC95A # HANGUL SYLLABLE CIEUC-WI-RIEULMIEUM +0xC95B # HANGUL SYLLABLE CIEUC-WI-RIEULPIEUP +0xC95C # HANGUL SYLLABLE CIEUC-WI-RIEULSIOS +0xC95D # HANGUL SYLLABLE CIEUC-WI-RIEULTHIEUTH +0xC95E # HANGUL SYLLABLE CIEUC-WI-RIEULPHIEUPH +0xC95F # HANGUL SYLLABLE CIEUC-WI-RIEULHIEUH +0xC960 # HANGUL SYLLABLE CIEUC-WI-MIEUM +0xC961 # HANGUL SYLLABLE CIEUC-WI-PIEUP +0xC962 # HANGUL SYLLABLE CIEUC-WI-PIEUPSIOS +0xC963 # HANGUL SYLLABLE CIEUC-WI-SIOS +0xC964 # HANGUL SYLLABLE CIEUC-WI-SSANGSIOS +0xC965 # HANGUL SYLLABLE CIEUC-WI-IEUNG +0xC966 # HANGUL SYLLABLE CIEUC-WI-CIEUC +0xC967 # HANGUL SYLLABLE CIEUC-WI-CHIEUCH +0xC968 # HANGUL SYLLABLE CIEUC-WI-KHIEUKH +0xC969 # HANGUL SYLLABLE CIEUC-WI-THIEUTH +0xC96A # HANGUL SYLLABLE CIEUC-WI-PHIEUPH +0xC96B # HANGUL SYLLABLE CIEUC-WI-HIEUH +0xC96C # HANGUL SYLLABLE CIEUC-YU +0xC96D # HANGUL SYLLABLE CIEUC-YU-KIYEOK +0xC96E # HANGUL SYLLABLE CIEUC-YU-SSANGKIYEOK +0xC96F # HANGUL SYLLABLE CIEUC-YU-KIYEOKSIOS +0xC970 # HANGUL SYLLABLE CIEUC-YU-NIEUN +0xC971 # HANGUL SYLLABLE CIEUC-YU-NIEUNCIEUC +0xC972 # HANGUL SYLLABLE CIEUC-YU-NIEUNHIEUH +0xC973 # HANGUL SYLLABLE CIEUC-YU-TIKEUT +0xC974 # HANGUL SYLLABLE CIEUC-YU-RIEUL +0xC975 # HANGUL SYLLABLE CIEUC-YU-RIEULKIYEOK +0xC976 # HANGUL SYLLABLE CIEUC-YU-RIEULMIEUM +0xC977 # HANGUL SYLLABLE CIEUC-YU-RIEULPIEUP +0xC978 # HANGUL SYLLABLE CIEUC-YU-RIEULSIOS +0xC979 # HANGUL SYLLABLE CIEUC-YU-RIEULTHIEUTH +0xC97A # HANGUL SYLLABLE CIEUC-YU-RIEULPHIEUPH +0xC97B # HANGUL SYLLABLE CIEUC-YU-RIEULHIEUH +0xC97C # HANGUL SYLLABLE CIEUC-YU-MIEUM +0xC97D # HANGUL SYLLABLE CIEUC-YU-PIEUP +0xC97E # HANGUL SYLLABLE CIEUC-YU-PIEUPSIOS +0xC97F # HANGUL SYLLABLE CIEUC-YU-SIOS +0xC980 # HANGUL SYLLABLE CIEUC-YU-SSANGSIOS +0xC981 # HANGUL SYLLABLE CIEUC-YU-IEUNG +0xC982 # HANGUL SYLLABLE CIEUC-YU-CIEUC +0xC983 # HANGUL SYLLABLE CIEUC-YU-CHIEUCH +0xC984 # HANGUL SYLLABLE CIEUC-YU-KHIEUKH +0xC985 # HANGUL SYLLABLE CIEUC-YU-THIEUTH +0xC986 # HANGUL SYLLABLE CIEUC-YU-PHIEUPH +0xC987 # HANGUL SYLLABLE CIEUC-YU-HIEUH +0xC988 # HANGUL SYLLABLE CIEUC-EU +0xC989 # HANGUL SYLLABLE CIEUC-EU-KIYEOK +0xC98A # HANGUL SYLLABLE CIEUC-EU-SSANGKIYEOK +0xC98B # HANGUL SYLLABLE CIEUC-EU-KIYEOKSIOS +0xC98C # HANGUL SYLLABLE CIEUC-EU-NIEUN +0xC98D # HANGUL SYLLABLE CIEUC-EU-NIEUNCIEUC +0xC98E # HANGUL SYLLABLE CIEUC-EU-NIEUNHIEUH +0xC98F # HANGUL SYLLABLE CIEUC-EU-TIKEUT +0xC990 # HANGUL SYLLABLE CIEUC-EU-RIEUL +0xC991 # HANGUL SYLLABLE CIEUC-EU-RIEULKIYEOK +0xC992 # HANGUL SYLLABLE CIEUC-EU-RIEULMIEUM +0xC993 # HANGUL SYLLABLE CIEUC-EU-RIEULPIEUP +0xC994 # HANGUL SYLLABLE CIEUC-EU-RIEULSIOS +0xC995 # HANGUL SYLLABLE CIEUC-EU-RIEULTHIEUTH +0xC996 # HANGUL SYLLABLE CIEUC-EU-RIEULPHIEUPH +0xC997 # HANGUL SYLLABLE CIEUC-EU-RIEULHIEUH +0xC998 # HANGUL SYLLABLE CIEUC-EU-MIEUM +0xC999 # HANGUL SYLLABLE CIEUC-EU-PIEUP +0xC99A # HANGUL SYLLABLE CIEUC-EU-PIEUPSIOS +0xC99B # HANGUL SYLLABLE CIEUC-EU-SIOS +0xC99C # HANGUL SYLLABLE CIEUC-EU-SSANGSIOS +0xC99D # HANGUL SYLLABLE CIEUC-EU-IEUNG +0xC99E # HANGUL SYLLABLE CIEUC-EU-CIEUC +0xC99F # HANGUL SYLLABLE CIEUC-EU-CHIEUCH +0xC9A0 # HANGUL SYLLABLE CIEUC-EU-KHIEUKH +0xC9A1 # HANGUL SYLLABLE CIEUC-EU-THIEUTH +0xC9A2 # HANGUL SYLLABLE CIEUC-EU-PHIEUPH +0xC9A3 # HANGUL SYLLABLE CIEUC-EU-HIEUH +0xC9A4 # HANGUL SYLLABLE CIEUC-YI +0xC9A5 # HANGUL SYLLABLE CIEUC-YI-KIYEOK +0xC9A6 # HANGUL SYLLABLE CIEUC-YI-SSANGKIYEOK +0xC9A7 # HANGUL SYLLABLE CIEUC-YI-KIYEOKSIOS +0xC9A8 # HANGUL SYLLABLE CIEUC-YI-NIEUN +0xC9A9 # HANGUL SYLLABLE CIEUC-YI-NIEUNCIEUC +0xC9AA # HANGUL SYLLABLE CIEUC-YI-NIEUNHIEUH +0xC9AB # HANGUL SYLLABLE CIEUC-YI-TIKEUT +0xC9AC # HANGUL SYLLABLE CIEUC-YI-RIEUL +0xC9AD # HANGUL SYLLABLE CIEUC-YI-RIEULKIYEOK +0xC9AE # HANGUL SYLLABLE CIEUC-YI-RIEULMIEUM +0xC9AF # HANGUL SYLLABLE CIEUC-YI-RIEULPIEUP +0xC9B0 # HANGUL SYLLABLE CIEUC-YI-RIEULSIOS +0xC9B1 # HANGUL SYLLABLE CIEUC-YI-RIEULTHIEUTH +0xC9B2 # HANGUL SYLLABLE CIEUC-YI-RIEULPHIEUPH +0xC9B3 # HANGUL SYLLABLE CIEUC-YI-RIEULHIEUH +0xC9B4 # HANGUL SYLLABLE CIEUC-YI-MIEUM +0xC9B5 # HANGUL SYLLABLE CIEUC-YI-PIEUP +0xC9B6 # HANGUL SYLLABLE CIEUC-YI-PIEUPSIOS +0xC9B7 # HANGUL SYLLABLE CIEUC-YI-SIOS +0xC9B8 # HANGUL SYLLABLE CIEUC-YI-SSANGSIOS +0xC9B9 # HANGUL SYLLABLE CIEUC-YI-IEUNG +0xC9BA # HANGUL SYLLABLE CIEUC-YI-CIEUC +0xC9BB # HANGUL SYLLABLE CIEUC-YI-CHIEUCH +0xC9BC # HANGUL SYLLABLE CIEUC-YI-KHIEUKH +0xC9BD # HANGUL SYLLABLE CIEUC-YI-THIEUTH +0xC9BE # HANGUL SYLLABLE CIEUC-YI-PHIEUPH +0xC9BF # HANGUL SYLLABLE CIEUC-YI-HIEUH +0xC9C0 # HANGUL SYLLABLE CIEUC-I +0xC9C1 # HANGUL SYLLABLE CIEUC-I-KIYEOK +0xC9C2 # HANGUL SYLLABLE CIEUC-I-SSANGKIYEOK +0xC9C3 # HANGUL SYLLABLE CIEUC-I-KIYEOKSIOS +0xC9C4 # HANGUL SYLLABLE CIEUC-I-NIEUN +0xC9C5 # HANGUL SYLLABLE CIEUC-I-NIEUNCIEUC +0xC9C6 # HANGUL SYLLABLE CIEUC-I-NIEUNHIEUH +0xC9C7 # HANGUL SYLLABLE CIEUC-I-TIKEUT +0xC9C8 # HANGUL SYLLABLE CIEUC-I-RIEUL +0xC9C9 # HANGUL SYLLABLE CIEUC-I-RIEULKIYEOK +0xC9CA # HANGUL SYLLABLE CIEUC-I-RIEULMIEUM +0xC9CB # HANGUL SYLLABLE CIEUC-I-RIEULPIEUP +0xC9CC # HANGUL SYLLABLE CIEUC-I-RIEULSIOS +0xC9CD # HANGUL SYLLABLE CIEUC-I-RIEULTHIEUTH +0xC9CE # HANGUL SYLLABLE CIEUC-I-RIEULPHIEUPH +0xC9CF # HANGUL SYLLABLE CIEUC-I-RIEULHIEUH +0xC9D0 # HANGUL SYLLABLE CIEUC-I-MIEUM +0xC9D1 # HANGUL SYLLABLE CIEUC-I-PIEUP +0xC9D2 # HANGUL SYLLABLE CIEUC-I-PIEUPSIOS +0xC9D3 # HANGUL SYLLABLE CIEUC-I-SIOS +0xC9D4 # HANGUL SYLLABLE CIEUC-I-SSANGSIOS +0xC9D5 # HANGUL SYLLABLE CIEUC-I-IEUNG +0xC9D6 # HANGUL SYLLABLE CIEUC-I-CIEUC +0xC9D7 # HANGUL SYLLABLE CIEUC-I-CHIEUCH +0xC9D8 # HANGUL SYLLABLE CIEUC-I-KHIEUKH +0xC9D9 # HANGUL SYLLABLE CIEUC-I-THIEUTH +0xC9DA # HANGUL SYLLABLE CIEUC-I-PHIEUPH +0xC9DB # HANGUL SYLLABLE CIEUC-I-HIEUH +0xC9DC # HANGUL SYLLABLE SSANGCIEUC-A +0xC9DD # HANGUL SYLLABLE SSANGCIEUC-A-KIYEOK +0xC9DE # HANGUL SYLLABLE SSANGCIEUC-A-SSANGKIYEOK +0xC9DF # HANGUL SYLLABLE SSANGCIEUC-A-KIYEOKSIOS +0xC9E0 # HANGUL SYLLABLE SSANGCIEUC-A-NIEUN +0xC9E1 # HANGUL SYLLABLE SSANGCIEUC-A-NIEUNCIEUC +0xC9E2 # HANGUL SYLLABLE SSANGCIEUC-A-NIEUNHIEUH +0xC9E3 # HANGUL SYLLABLE SSANGCIEUC-A-TIKEUT +0xC9E4 # HANGUL SYLLABLE SSANGCIEUC-A-RIEUL +0xC9E5 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULKIYEOK +0xC9E6 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULMIEUM +0xC9E7 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULPIEUP +0xC9E8 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULSIOS +0xC9E9 # HANGUL SYLLABLE SSANGCIEUC-A-RIEULTHIEUTH +0xC9EA # HANGUL SYLLABLE SSANGCIEUC-A-RIEULPHIEUPH +0xC9EB # HANGUL SYLLABLE SSANGCIEUC-A-RIEULHIEUH +0xC9EC # HANGUL SYLLABLE SSANGCIEUC-A-MIEUM +0xC9ED # HANGUL SYLLABLE SSANGCIEUC-A-PIEUP +0xC9EE # HANGUL SYLLABLE SSANGCIEUC-A-PIEUPSIOS +0xC9EF # HANGUL SYLLABLE SSANGCIEUC-A-SIOS +0xC9F0 # HANGUL SYLLABLE SSANGCIEUC-A-SSANGSIOS +0xC9F1 # HANGUL SYLLABLE SSANGCIEUC-A-IEUNG +0xC9F2 # HANGUL SYLLABLE SSANGCIEUC-A-CIEUC +0xC9F3 # HANGUL SYLLABLE SSANGCIEUC-A-CHIEUCH +0xC9F4 # HANGUL SYLLABLE SSANGCIEUC-A-KHIEUKH +0xC9F5 # HANGUL SYLLABLE SSANGCIEUC-A-THIEUTH +0xC9F6 # HANGUL SYLLABLE SSANGCIEUC-A-PHIEUPH +0xC9F7 # HANGUL SYLLABLE SSANGCIEUC-A-HIEUH +0xC9F8 # HANGUL SYLLABLE SSANGCIEUC-AE +0xC9F9 # HANGUL SYLLABLE SSANGCIEUC-AE-KIYEOK +0xC9FA # HANGUL SYLLABLE SSANGCIEUC-AE-SSANGKIYEOK +0xC9FB # HANGUL SYLLABLE SSANGCIEUC-AE-KIYEOKSIOS +0xC9FC # HANGUL SYLLABLE SSANGCIEUC-AE-NIEUN +0xC9FD # HANGUL SYLLABLE SSANGCIEUC-AE-NIEUNCIEUC +0xC9FE # HANGUL SYLLABLE SSANGCIEUC-AE-NIEUNHIEUH +0xC9FF # HANGUL SYLLABLE SSANGCIEUC-AE-TIKEUT +0xCA00 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEUL +0xCA01 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULKIYEOK +0xCA02 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULMIEUM +0xCA03 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULPIEUP +0xCA04 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULSIOS +0xCA05 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULTHIEUTH +0xCA06 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULPHIEUPH +0xCA07 # HANGUL SYLLABLE SSANGCIEUC-AE-RIEULHIEUH +0xCA08 # HANGUL SYLLABLE SSANGCIEUC-AE-MIEUM +0xCA09 # HANGUL SYLLABLE SSANGCIEUC-AE-PIEUP +0xCA0A # HANGUL SYLLABLE SSANGCIEUC-AE-PIEUPSIOS +0xCA0B # HANGUL SYLLABLE SSANGCIEUC-AE-SIOS +0xCA0C # HANGUL SYLLABLE SSANGCIEUC-AE-SSANGSIOS +0xCA0D # HANGUL SYLLABLE SSANGCIEUC-AE-IEUNG +0xCA0E # HANGUL SYLLABLE SSANGCIEUC-AE-CIEUC +0xCA0F # HANGUL SYLLABLE SSANGCIEUC-AE-CHIEUCH +0xCA10 # HANGUL SYLLABLE SSANGCIEUC-AE-KHIEUKH +0xCA11 # HANGUL SYLLABLE SSANGCIEUC-AE-THIEUTH +0xCA12 # HANGUL SYLLABLE SSANGCIEUC-AE-PHIEUPH +0xCA13 # HANGUL SYLLABLE SSANGCIEUC-AE-HIEUH +0xCA14 # HANGUL SYLLABLE SSANGCIEUC-YA +0xCA15 # HANGUL SYLLABLE SSANGCIEUC-YA-KIYEOK +0xCA16 # HANGUL SYLLABLE SSANGCIEUC-YA-SSANGKIYEOK +0xCA17 # HANGUL SYLLABLE SSANGCIEUC-YA-KIYEOKSIOS +0xCA18 # HANGUL SYLLABLE SSANGCIEUC-YA-NIEUN +0xCA19 # HANGUL SYLLABLE SSANGCIEUC-YA-NIEUNCIEUC +0xCA1A # HANGUL SYLLABLE SSANGCIEUC-YA-NIEUNHIEUH +0xCA1B # HANGUL SYLLABLE SSANGCIEUC-YA-TIKEUT +0xCA1C # HANGUL SYLLABLE SSANGCIEUC-YA-RIEUL +0xCA1D # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULKIYEOK +0xCA1E # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULMIEUM +0xCA1F # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULPIEUP +0xCA20 # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULSIOS +0xCA21 # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULTHIEUTH +0xCA22 # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULPHIEUPH +0xCA23 # HANGUL SYLLABLE SSANGCIEUC-YA-RIEULHIEUH +0xCA24 # HANGUL SYLLABLE SSANGCIEUC-YA-MIEUM +0xCA25 # HANGUL SYLLABLE SSANGCIEUC-YA-PIEUP +0xCA26 # HANGUL SYLLABLE SSANGCIEUC-YA-PIEUPSIOS +0xCA27 # HANGUL SYLLABLE SSANGCIEUC-YA-SIOS +0xCA28 # HANGUL SYLLABLE SSANGCIEUC-YA-SSANGSIOS +0xCA29 # HANGUL SYLLABLE SSANGCIEUC-YA-IEUNG +0xCA2A # HANGUL SYLLABLE SSANGCIEUC-YA-CIEUC +0xCA2B # HANGUL SYLLABLE SSANGCIEUC-YA-CHIEUCH +0xCA2C # HANGUL SYLLABLE SSANGCIEUC-YA-KHIEUKH +0xCA2D # HANGUL SYLLABLE SSANGCIEUC-YA-THIEUTH +0xCA2E # HANGUL SYLLABLE SSANGCIEUC-YA-PHIEUPH +0xCA2F # HANGUL SYLLABLE SSANGCIEUC-YA-HIEUH +0xCA30 # HANGUL SYLLABLE SSANGCIEUC-YAE +0xCA31 # HANGUL SYLLABLE SSANGCIEUC-YAE-KIYEOK +0xCA32 # HANGUL SYLLABLE SSANGCIEUC-YAE-SSANGKIYEOK +0xCA33 # HANGUL SYLLABLE SSANGCIEUC-YAE-KIYEOKSIOS +0xCA34 # HANGUL SYLLABLE SSANGCIEUC-YAE-NIEUN +0xCA35 # HANGUL SYLLABLE SSANGCIEUC-YAE-NIEUNCIEUC +0xCA36 # HANGUL SYLLABLE SSANGCIEUC-YAE-NIEUNHIEUH +0xCA37 # HANGUL SYLLABLE SSANGCIEUC-YAE-TIKEUT +0xCA38 # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEUL +0xCA39 # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULKIYEOK +0xCA3A # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULMIEUM +0xCA3B # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULPIEUP +0xCA3C # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULSIOS +0xCA3D # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULTHIEUTH +0xCA3E # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULPHIEUPH +0xCA3F # HANGUL SYLLABLE SSANGCIEUC-YAE-RIEULHIEUH +0xCA40 # HANGUL SYLLABLE SSANGCIEUC-YAE-MIEUM +0xCA41 # HANGUL SYLLABLE SSANGCIEUC-YAE-PIEUP +0xCA42 # HANGUL SYLLABLE SSANGCIEUC-YAE-PIEUPSIOS +0xCA43 # HANGUL SYLLABLE SSANGCIEUC-YAE-SIOS +0xCA44 # HANGUL SYLLABLE SSANGCIEUC-YAE-SSANGSIOS +0xCA45 # HANGUL SYLLABLE SSANGCIEUC-YAE-IEUNG +0xCA46 # HANGUL SYLLABLE SSANGCIEUC-YAE-CIEUC +0xCA47 # HANGUL SYLLABLE SSANGCIEUC-YAE-CHIEUCH +0xCA48 # HANGUL SYLLABLE SSANGCIEUC-YAE-KHIEUKH +0xCA49 # HANGUL SYLLABLE SSANGCIEUC-YAE-THIEUTH +0xCA4A # HANGUL SYLLABLE SSANGCIEUC-YAE-PHIEUPH +0xCA4B # HANGUL SYLLABLE SSANGCIEUC-YAE-HIEUH +0xCA4C # HANGUL SYLLABLE SSANGCIEUC-EO +0xCA4D # HANGUL SYLLABLE SSANGCIEUC-EO-KIYEOK +0xCA4E # HANGUL SYLLABLE SSANGCIEUC-EO-SSANGKIYEOK +0xCA4F # HANGUL SYLLABLE SSANGCIEUC-EO-KIYEOKSIOS +0xCA50 # HANGUL SYLLABLE SSANGCIEUC-EO-NIEUN +0xCA51 # HANGUL SYLLABLE SSANGCIEUC-EO-NIEUNCIEUC +0xCA52 # HANGUL SYLLABLE SSANGCIEUC-EO-NIEUNHIEUH +0xCA53 # HANGUL SYLLABLE SSANGCIEUC-EO-TIKEUT +0xCA54 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEUL +0xCA55 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULKIYEOK +0xCA56 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULMIEUM +0xCA57 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULPIEUP +0xCA58 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULSIOS +0xCA59 # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULTHIEUTH +0xCA5A # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULPHIEUPH +0xCA5B # HANGUL SYLLABLE SSANGCIEUC-EO-RIEULHIEUH +0xCA5C # HANGUL SYLLABLE SSANGCIEUC-EO-MIEUM +0xCA5D # HANGUL SYLLABLE SSANGCIEUC-EO-PIEUP +0xCA5E # HANGUL SYLLABLE SSANGCIEUC-EO-PIEUPSIOS +0xCA5F # HANGUL SYLLABLE SSANGCIEUC-EO-SIOS +0xCA60 # HANGUL SYLLABLE SSANGCIEUC-EO-SSANGSIOS +0xCA61 # HANGUL SYLLABLE SSANGCIEUC-EO-IEUNG +0xCA62 # HANGUL SYLLABLE SSANGCIEUC-EO-CIEUC +0xCA63 # HANGUL SYLLABLE SSANGCIEUC-EO-CHIEUCH +0xCA64 # HANGUL SYLLABLE SSANGCIEUC-EO-KHIEUKH +0xCA65 # HANGUL SYLLABLE SSANGCIEUC-EO-THIEUTH +0xCA66 # HANGUL SYLLABLE SSANGCIEUC-EO-PHIEUPH +0xCA67 # HANGUL SYLLABLE SSANGCIEUC-EO-HIEUH +0xCA68 # HANGUL SYLLABLE SSANGCIEUC-E +0xCA69 # HANGUL SYLLABLE SSANGCIEUC-E-KIYEOK +0xCA6A # HANGUL SYLLABLE SSANGCIEUC-E-SSANGKIYEOK +0xCA6B # HANGUL SYLLABLE SSANGCIEUC-E-KIYEOKSIOS +0xCA6C # HANGUL SYLLABLE SSANGCIEUC-E-NIEUN +0xCA6D # HANGUL SYLLABLE SSANGCIEUC-E-NIEUNCIEUC +0xCA6E # HANGUL SYLLABLE SSANGCIEUC-E-NIEUNHIEUH +0xCA6F # HANGUL SYLLABLE SSANGCIEUC-E-TIKEUT +0xCA70 # HANGUL SYLLABLE SSANGCIEUC-E-RIEUL +0xCA71 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULKIYEOK +0xCA72 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULMIEUM +0xCA73 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULPIEUP +0xCA74 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULSIOS +0xCA75 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULTHIEUTH +0xCA76 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULPHIEUPH +0xCA77 # HANGUL SYLLABLE SSANGCIEUC-E-RIEULHIEUH +0xCA78 # HANGUL SYLLABLE SSANGCIEUC-E-MIEUM +0xCA79 # HANGUL SYLLABLE SSANGCIEUC-E-PIEUP +0xCA7A # HANGUL SYLLABLE SSANGCIEUC-E-PIEUPSIOS +0xCA7B # HANGUL SYLLABLE SSANGCIEUC-E-SIOS +0xCA7C # HANGUL SYLLABLE SSANGCIEUC-E-SSANGSIOS +0xCA7D # HANGUL SYLLABLE SSANGCIEUC-E-IEUNG +0xCA7E # HANGUL SYLLABLE SSANGCIEUC-E-CIEUC +0xCA7F # HANGUL SYLLABLE SSANGCIEUC-E-CHIEUCH +0xCA80 # HANGUL SYLLABLE SSANGCIEUC-E-KHIEUKH +0xCA81 # HANGUL SYLLABLE SSANGCIEUC-E-THIEUTH +0xCA82 # HANGUL SYLLABLE SSANGCIEUC-E-PHIEUPH +0xCA83 # HANGUL SYLLABLE SSANGCIEUC-E-HIEUH +0xCA84 # HANGUL SYLLABLE SSANGCIEUC-YEO +0xCA85 # HANGUL SYLLABLE SSANGCIEUC-YEO-KIYEOK +0xCA86 # HANGUL SYLLABLE SSANGCIEUC-YEO-SSANGKIYEOK +0xCA87 # HANGUL SYLLABLE SSANGCIEUC-YEO-KIYEOKSIOS +0xCA88 # HANGUL SYLLABLE SSANGCIEUC-YEO-NIEUN +0xCA89 # HANGUL SYLLABLE SSANGCIEUC-YEO-NIEUNCIEUC +0xCA8A # HANGUL SYLLABLE SSANGCIEUC-YEO-NIEUNHIEUH +0xCA8B # HANGUL SYLLABLE SSANGCIEUC-YEO-TIKEUT +0xCA8C # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEUL +0xCA8D # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULKIYEOK +0xCA8E # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULMIEUM +0xCA8F # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULPIEUP +0xCA90 # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULSIOS +0xCA91 # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULTHIEUTH +0xCA92 # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULPHIEUPH +0xCA93 # HANGUL SYLLABLE SSANGCIEUC-YEO-RIEULHIEUH +0xCA94 # HANGUL SYLLABLE SSANGCIEUC-YEO-MIEUM +0xCA95 # HANGUL SYLLABLE SSANGCIEUC-YEO-PIEUP +0xCA96 # HANGUL SYLLABLE SSANGCIEUC-YEO-PIEUPSIOS +0xCA97 # HANGUL SYLLABLE SSANGCIEUC-YEO-SIOS +0xCA98 # HANGUL SYLLABLE SSANGCIEUC-YEO-SSANGSIOS +0xCA99 # HANGUL SYLLABLE SSANGCIEUC-YEO-IEUNG +0xCA9A # HANGUL SYLLABLE SSANGCIEUC-YEO-CIEUC +0xCA9B # HANGUL SYLLABLE SSANGCIEUC-YEO-CHIEUCH +0xCA9C # HANGUL SYLLABLE SSANGCIEUC-YEO-KHIEUKH +0xCA9D # HANGUL SYLLABLE SSANGCIEUC-YEO-THIEUTH +0xCA9E # HANGUL SYLLABLE SSANGCIEUC-YEO-PHIEUPH +0xCA9F # HANGUL SYLLABLE SSANGCIEUC-YEO-HIEUH +0xCAA0 # HANGUL SYLLABLE SSANGCIEUC-YE +0xCAA1 # HANGUL SYLLABLE SSANGCIEUC-YE-KIYEOK +0xCAA2 # HANGUL SYLLABLE SSANGCIEUC-YE-SSANGKIYEOK +0xCAA3 # HANGUL SYLLABLE SSANGCIEUC-YE-KIYEOKSIOS +0xCAA4 # HANGUL SYLLABLE SSANGCIEUC-YE-NIEUN +0xCAA5 # HANGUL SYLLABLE SSANGCIEUC-YE-NIEUNCIEUC +0xCAA6 # HANGUL SYLLABLE SSANGCIEUC-YE-NIEUNHIEUH +0xCAA7 # HANGUL SYLLABLE SSANGCIEUC-YE-TIKEUT +0xCAA8 # HANGUL SYLLABLE SSANGCIEUC-YE-RIEUL +0xCAA9 # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULKIYEOK +0xCAAA # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULMIEUM +0xCAAB # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULPIEUP +0xCAAC # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULSIOS +0xCAAD # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULTHIEUTH +0xCAAE # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULPHIEUPH +0xCAAF # HANGUL SYLLABLE SSANGCIEUC-YE-RIEULHIEUH +0xCAB0 # HANGUL SYLLABLE SSANGCIEUC-YE-MIEUM +0xCAB1 # HANGUL SYLLABLE SSANGCIEUC-YE-PIEUP +0xCAB2 # HANGUL SYLLABLE SSANGCIEUC-YE-PIEUPSIOS +0xCAB3 # HANGUL SYLLABLE SSANGCIEUC-YE-SIOS +0xCAB4 # HANGUL SYLLABLE SSANGCIEUC-YE-SSANGSIOS +0xCAB5 # HANGUL SYLLABLE SSANGCIEUC-YE-IEUNG +0xCAB6 # HANGUL SYLLABLE SSANGCIEUC-YE-CIEUC +0xCAB7 # HANGUL SYLLABLE SSANGCIEUC-YE-CHIEUCH +0xCAB8 # HANGUL SYLLABLE SSANGCIEUC-YE-KHIEUKH +0xCAB9 # HANGUL SYLLABLE SSANGCIEUC-YE-THIEUTH +0xCABA # HANGUL SYLLABLE SSANGCIEUC-YE-PHIEUPH +0xCABB # HANGUL SYLLABLE SSANGCIEUC-YE-HIEUH +0xCABC # HANGUL SYLLABLE SSANGCIEUC-O +0xCABD # HANGUL SYLLABLE SSANGCIEUC-O-KIYEOK +0xCABE # HANGUL SYLLABLE SSANGCIEUC-O-SSANGKIYEOK +0xCABF # HANGUL SYLLABLE SSANGCIEUC-O-KIYEOKSIOS +0xCAC0 # HANGUL SYLLABLE SSANGCIEUC-O-NIEUN +0xCAC1 # HANGUL SYLLABLE SSANGCIEUC-O-NIEUNCIEUC +0xCAC2 # HANGUL SYLLABLE SSANGCIEUC-O-NIEUNHIEUH +0xCAC3 # HANGUL SYLLABLE SSANGCIEUC-O-TIKEUT +0xCAC4 # HANGUL SYLLABLE SSANGCIEUC-O-RIEUL +0xCAC5 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULKIYEOK +0xCAC6 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULMIEUM +0xCAC7 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULPIEUP +0xCAC8 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULSIOS +0xCAC9 # HANGUL SYLLABLE SSANGCIEUC-O-RIEULTHIEUTH +0xCACA # HANGUL SYLLABLE SSANGCIEUC-O-RIEULPHIEUPH +0xCACB # HANGUL SYLLABLE SSANGCIEUC-O-RIEULHIEUH +0xCACC # HANGUL SYLLABLE SSANGCIEUC-O-MIEUM +0xCACD # HANGUL SYLLABLE SSANGCIEUC-O-PIEUP +0xCACE # HANGUL SYLLABLE SSANGCIEUC-O-PIEUPSIOS +0xCACF # HANGUL SYLLABLE SSANGCIEUC-O-SIOS +0xCAD0 # HANGUL SYLLABLE SSANGCIEUC-O-SSANGSIOS +0xCAD1 # HANGUL SYLLABLE SSANGCIEUC-O-IEUNG +0xCAD2 # HANGUL SYLLABLE SSANGCIEUC-O-CIEUC +0xCAD3 # HANGUL SYLLABLE SSANGCIEUC-O-CHIEUCH +0xCAD4 # HANGUL SYLLABLE SSANGCIEUC-O-KHIEUKH +0xCAD5 # HANGUL SYLLABLE SSANGCIEUC-O-THIEUTH +0xCAD6 # HANGUL SYLLABLE SSANGCIEUC-O-PHIEUPH +0xCAD7 # HANGUL SYLLABLE SSANGCIEUC-O-HIEUH +0xCAD8 # HANGUL SYLLABLE SSANGCIEUC-WA +0xCAD9 # HANGUL SYLLABLE SSANGCIEUC-WA-KIYEOK +0xCADA # HANGUL SYLLABLE SSANGCIEUC-WA-SSANGKIYEOK +0xCADB # HANGUL SYLLABLE SSANGCIEUC-WA-KIYEOKSIOS +0xCADC # HANGUL SYLLABLE SSANGCIEUC-WA-NIEUN +0xCADD # HANGUL SYLLABLE SSANGCIEUC-WA-NIEUNCIEUC +0xCADE # HANGUL SYLLABLE SSANGCIEUC-WA-NIEUNHIEUH +0xCADF # HANGUL SYLLABLE SSANGCIEUC-WA-TIKEUT +0xCAE0 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEUL +0xCAE1 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULKIYEOK +0xCAE2 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULMIEUM +0xCAE3 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULPIEUP +0xCAE4 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULSIOS +0xCAE5 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULTHIEUTH +0xCAE6 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULPHIEUPH +0xCAE7 # HANGUL SYLLABLE SSANGCIEUC-WA-RIEULHIEUH +0xCAE8 # HANGUL SYLLABLE SSANGCIEUC-WA-MIEUM +0xCAE9 # HANGUL SYLLABLE SSANGCIEUC-WA-PIEUP +0xCAEA # HANGUL SYLLABLE SSANGCIEUC-WA-PIEUPSIOS +0xCAEB # HANGUL SYLLABLE SSANGCIEUC-WA-SIOS +0xCAEC # HANGUL SYLLABLE SSANGCIEUC-WA-SSANGSIOS +0xCAED # HANGUL SYLLABLE SSANGCIEUC-WA-IEUNG +0xCAEE # HANGUL SYLLABLE SSANGCIEUC-WA-CIEUC +0xCAEF # HANGUL SYLLABLE SSANGCIEUC-WA-CHIEUCH +0xCAF0 # HANGUL SYLLABLE SSANGCIEUC-WA-KHIEUKH +0xCAF1 # HANGUL SYLLABLE SSANGCIEUC-WA-THIEUTH +0xCAF2 # HANGUL SYLLABLE SSANGCIEUC-WA-PHIEUPH +0xCAF3 # HANGUL SYLLABLE SSANGCIEUC-WA-HIEUH +0xCAF4 # HANGUL SYLLABLE SSANGCIEUC-WAE +0xCAF5 # HANGUL SYLLABLE SSANGCIEUC-WAE-KIYEOK +0xCAF6 # HANGUL SYLLABLE SSANGCIEUC-WAE-SSANGKIYEOK +0xCAF7 # HANGUL SYLLABLE SSANGCIEUC-WAE-KIYEOKSIOS +0xCAF8 # HANGUL SYLLABLE SSANGCIEUC-WAE-NIEUN +0xCAF9 # HANGUL SYLLABLE SSANGCIEUC-WAE-NIEUNCIEUC +0xCAFA # HANGUL SYLLABLE SSANGCIEUC-WAE-NIEUNHIEUH +0xCAFB # HANGUL SYLLABLE SSANGCIEUC-WAE-TIKEUT +0xCAFC # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEUL +0xCAFD # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULKIYEOK +0xCAFE # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULMIEUM +0xCAFF # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULPIEUP +0xCB00 # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULSIOS +0xCB01 # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULTHIEUTH +0xCB02 # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULPHIEUPH +0xCB03 # HANGUL SYLLABLE SSANGCIEUC-WAE-RIEULHIEUH +0xCB04 # HANGUL SYLLABLE SSANGCIEUC-WAE-MIEUM +0xCB05 # HANGUL SYLLABLE SSANGCIEUC-WAE-PIEUP +0xCB06 # HANGUL SYLLABLE SSANGCIEUC-WAE-PIEUPSIOS +0xCB07 # HANGUL SYLLABLE SSANGCIEUC-WAE-SIOS +0xCB08 # HANGUL SYLLABLE SSANGCIEUC-WAE-SSANGSIOS +0xCB09 # HANGUL SYLLABLE SSANGCIEUC-WAE-IEUNG +0xCB0A # HANGUL SYLLABLE SSANGCIEUC-WAE-CIEUC +0xCB0B # HANGUL SYLLABLE SSANGCIEUC-WAE-CHIEUCH +0xCB0C # HANGUL SYLLABLE SSANGCIEUC-WAE-KHIEUKH +0xCB0D # HANGUL SYLLABLE SSANGCIEUC-WAE-THIEUTH +0xCB0E # HANGUL SYLLABLE SSANGCIEUC-WAE-PHIEUPH +0xCB0F # HANGUL SYLLABLE SSANGCIEUC-WAE-HIEUH +0xCB10 # HANGUL SYLLABLE SSANGCIEUC-OE +0xCB11 # HANGUL SYLLABLE SSANGCIEUC-OE-KIYEOK +0xCB12 # HANGUL SYLLABLE SSANGCIEUC-OE-SSANGKIYEOK +0xCB13 # HANGUL SYLLABLE SSANGCIEUC-OE-KIYEOKSIOS +0xCB14 # HANGUL SYLLABLE SSANGCIEUC-OE-NIEUN +0xCB15 # HANGUL SYLLABLE SSANGCIEUC-OE-NIEUNCIEUC +0xCB16 # HANGUL SYLLABLE SSANGCIEUC-OE-NIEUNHIEUH +0xCB17 # HANGUL SYLLABLE SSANGCIEUC-OE-TIKEUT +0xCB18 # HANGUL SYLLABLE SSANGCIEUC-OE-RIEUL +0xCB19 # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULKIYEOK +0xCB1A # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULMIEUM +0xCB1B # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULPIEUP +0xCB1C # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULSIOS +0xCB1D # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULTHIEUTH +0xCB1E # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULPHIEUPH +0xCB1F # HANGUL SYLLABLE SSANGCIEUC-OE-RIEULHIEUH +0xCB20 # HANGUL SYLLABLE SSANGCIEUC-OE-MIEUM +0xCB21 # HANGUL SYLLABLE SSANGCIEUC-OE-PIEUP +0xCB22 # HANGUL SYLLABLE SSANGCIEUC-OE-PIEUPSIOS +0xCB23 # HANGUL SYLLABLE SSANGCIEUC-OE-SIOS +0xCB24 # HANGUL SYLLABLE SSANGCIEUC-OE-SSANGSIOS +0xCB25 # HANGUL SYLLABLE SSANGCIEUC-OE-IEUNG +0xCB26 # HANGUL SYLLABLE SSANGCIEUC-OE-CIEUC +0xCB27 # HANGUL SYLLABLE SSANGCIEUC-OE-CHIEUCH +0xCB28 # HANGUL SYLLABLE SSANGCIEUC-OE-KHIEUKH +0xCB29 # HANGUL SYLLABLE SSANGCIEUC-OE-THIEUTH +0xCB2A # HANGUL SYLLABLE SSANGCIEUC-OE-PHIEUPH +0xCB2B # HANGUL SYLLABLE SSANGCIEUC-OE-HIEUH +0xCB2C # HANGUL SYLLABLE SSANGCIEUC-YO +0xCB2D # HANGUL SYLLABLE SSANGCIEUC-YO-KIYEOK +0xCB2E # HANGUL SYLLABLE SSANGCIEUC-YO-SSANGKIYEOK +0xCB2F # HANGUL SYLLABLE SSANGCIEUC-YO-KIYEOKSIOS +0xCB30 # HANGUL SYLLABLE SSANGCIEUC-YO-NIEUN +0xCB31 # HANGUL SYLLABLE SSANGCIEUC-YO-NIEUNCIEUC +0xCB32 # HANGUL SYLLABLE SSANGCIEUC-YO-NIEUNHIEUH +0xCB33 # HANGUL SYLLABLE SSANGCIEUC-YO-TIKEUT +0xCB34 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEUL +0xCB35 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULKIYEOK +0xCB36 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULMIEUM +0xCB37 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULPIEUP +0xCB38 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULSIOS +0xCB39 # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULTHIEUTH +0xCB3A # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULPHIEUPH +0xCB3B # HANGUL SYLLABLE SSANGCIEUC-YO-RIEULHIEUH +0xCB3C # HANGUL SYLLABLE SSANGCIEUC-YO-MIEUM +0xCB3D # HANGUL SYLLABLE SSANGCIEUC-YO-PIEUP +0xCB3E # HANGUL SYLLABLE SSANGCIEUC-YO-PIEUPSIOS +0xCB3F # HANGUL SYLLABLE SSANGCIEUC-YO-SIOS +0xCB40 # HANGUL SYLLABLE SSANGCIEUC-YO-SSANGSIOS +0xCB41 # HANGUL SYLLABLE SSANGCIEUC-YO-IEUNG +0xCB42 # HANGUL SYLLABLE SSANGCIEUC-YO-CIEUC +0xCB43 # HANGUL SYLLABLE SSANGCIEUC-YO-CHIEUCH +0xCB44 # HANGUL SYLLABLE SSANGCIEUC-YO-KHIEUKH +0xCB45 # HANGUL SYLLABLE SSANGCIEUC-YO-THIEUTH +0xCB46 # HANGUL SYLLABLE SSANGCIEUC-YO-PHIEUPH +0xCB47 # HANGUL SYLLABLE SSANGCIEUC-YO-HIEUH +0xCB48 # HANGUL SYLLABLE SSANGCIEUC-U +0xCB49 # HANGUL SYLLABLE SSANGCIEUC-U-KIYEOK +0xCB4A # HANGUL SYLLABLE SSANGCIEUC-U-SSANGKIYEOK +0xCB4B # HANGUL SYLLABLE SSANGCIEUC-U-KIYEOKSIOS +0xCB4C # HANGUL SYLLABLE SSANGCIEUC-U-NIEUN +0xCB4D # HANGUL SYLLABLE SSANGCIEUC-U-NIEUNCIEUC +0xCB4E # HANGUL SYLLABLE SSANGCIEUC-U-NIEUNHIEUH +0xCB4F # HANGUL SYLLABLE SSANGCIEUC-U-TIKEUT +0xCB50 # HANGUL SYLLABLE SSANGCIEUC-U-RIEUL +0xCB51 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULKIYEOK +0xCB52 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULMIEUM +0xCB53 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULPIEUP +0xCB54 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULSIOS +0xCB55 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULTHIEUTH +0xCB56 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULPHIEUPH +0xCB57 # HANGUL SYLLABLE SSANGCIEUC-U-RIEULHIEUH +0xCB58 # HANGUL SYLLABLE SSANGCIEUC-U-MIEUM +0xCB59 # HANGUL SYLLABLE SSANGCIEUC-U-PIEUP +0xCB5A # HANGUL SYLLABLE SSANGCIEUC-U-PIEUPSIOS +0xCB5B # HANGUL SYLLABLE SSANGCIEUC-U-SIOS +0xCB5C # HANGUL SYLLABLE SSANGCIEUC-U-SSANGSIOS +0xCB5D # HANGUL SYLLABLE SSANGCIEUC-U-IEUNG +0xCB5E # HANGUL SYLLABLE SSANGCIEUC-U-CIEUC +0xCB5F # HANGUL SYLLABLE SSANGCIEUC-U-CHIEUCH +0xCB60 # HANGUL SYLLABLE SSANGCIEUC-U-KHIEUKH +0xCB61 # HANGUL SYLLABLE SSANGCIEUC-U-THIEUTH +0xCB62 # HANGUL SYLLABLE SSANGCIEUC-U-PHIEUPH +0xCB63 # HANGUL SYLLABLE SSANGCIEUC-U-HIEUH +0xCB64 # HANGUL SYLLABLE SSANGCIEUC-WEO +0xCB65 # HANGUL SYLLABLE SSANGCIEUC-WEO-KIYEOK +0xCB66 # HANGUL SYLLABLE SSANGCIEUC-WEO-SSANGKIYEOK +0xCB67 # HANGUL SYLLABLE SSANGCIEUC-WEO-KIYEOKSIOS +0xCB68 # HANGUL SYLLABLE SSANGCIEUC-WEO-NIEUN +0xCB69 # HANGUL SYLLABLE SSANGCIEUC-WEO-NIEUNCIEUC +0xCB6A # HANGUL SYLLABLE SSANGCIEUC-WEO-NIEUNHIEUH +0xCB6B # HANGUL SYLLABLE SSANGCIEUC-WEO-TIKEUT +0xCB6C # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEUL +0xCB6D # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULKIYEOK +0xCB6E # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULMIEUM +0xCB6F # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULPIEUP +0xCB70 # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULSIOS +0xCB71 # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULTHIEUTH +0xCB72 # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULPHIEUPH +0xCB73 # HANGUL SYLLABLE SSANGCIEUC-WEO-RIEULHIEUH +0xCB74 # HANGUL SYLLABLE SSANGCIEUC-WEO-MIEUM +0xCB75 # HANGUL SYLLABLE SSANGCIEUC-WEO-PIEUP +0xCB76 # HANGUL SYLLABLE SSANGCIEUC-WEO-PIEUPSIOS +0xCB77 # HANGUL SYLLABLE SSANGCIEUC-WEO-SIOS +0xCB78 # HANGUL SYLLABLE SSANGCIEUC-WEO-SSANGSIOS +0xCB79 # HANGUL SYLLABLE SSANGCIEUC-WEO-IEUNG +0xCB7A # HANGUL SYLLABLE SSANGCIEUC-WEO-CIEUC +0xCB7B # HANGUL SYLLABLE SSANGCIEUC-WEO-CHIEUCH +0xCB7C # HANGUL SYLLABLE SSANGCIEUC-WEO-KHIEUKH +0xCB7D # HANGUL SYLLABLE SSANGCIEUC-WEO-THIEUTH +0xCB7E # HANGUL SYLLABLE SSANGCIEUC-WEO-PHIEUPH +0xCB7F # HANGUL SYLLABLE SSANGCIEUC-WEO-HIEUH +0xCB80 # HANGUL SYLLABLE SSANGCIEUC-WE +0xCB81 # HANGUL SYLLABLE SSANGCIEUC-WE-KIYEOK +0xCB82 # HANGUL SYLLABLE SSANGCIEUC-WE-SSANGKIYEOK +0xCB83 # HANGUL SYLLABLE SSANGCIEUC-WE-KIYEOKSIOS +0xCB84 # HANGUL SYLLABLE SSANGCIEUC-WE-NIEUN +0xCB85 # HANGUL SYLLABLE SSANGCIEUC-WE-NIEUNCIEUC +0xCB86 # HANGUL SYLLABLE SSANGCIEUC-WE-NIEUNHIEUH +0xCB87 # HANGUL SYLLABLE SSANGCIEUC-WE-TIKEUT +0xCB88 # HANGUL SYLLABLE SSANGCIEUC-WE-RIEUL +0xCB89 # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULKIYEOK +0xCB8A # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULMIEUM +0xCB8B # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULPIEUP +0xCB8C # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULSIOS +0xCB8D # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULTHIEUTH +0xCB8E # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULPHIEUPH +0xCB8F # HANGUL SYLLABLE SSANGCIEUC-WE-RIEULHIEUH +0xCB90 # HANGUL SYLLABLE SSANGCIEUC-WE-MIEUM +0xCB91 # HANGUL SYLLABLE SSANGCIEUC-WE-PIEUP +0xCB92 # HANGUL SYLLABLE SSANGCIEUC-WE-PIEUPSIOS +0xCB93 # HANGUL SYLLABLE SSANGCIEUC-WE-SIOS +0xCB94 # HANGUL SYLLABLE SSANGCIEUC-WE-SSANGSIOS +0xCB95 # HANGUL SYLLABLE SSANGCIEUC-WE-IEUNG +0xCB96 # HANGUL SYLLABLE SSANGCIEUC-WE-CIEUC +0xCB97 # HANGUL SYLLABLE SSANGCIEUC-WE-CHIEUCH +0xCB98 # HANGUL SYLLABLE SSANGCIEUC-WE-KHIEUKH +0xCB99 # HANGUL SYLLABLE SSANGCIEUC-WE-THIEUTH +0xCB9A # HANGUL SYLLABLE SSANGCIEUC-WE-PHIEUPH +0xCB9B # HANGUL SYLLABLE SSANGCIEUC-WE-HIEUH +0xCB9C # HANGUL SYLLABLE SSANGCIEUC-WI +0xCB9D # HANGUL SYLLABLE SSANGCIEUC-WI-KIYEOK +0xCB9E # HANGUL SYLLABLE SSANGCIEUC-WI-SSANGKIYEOK +0xCB9F # HANGUL SYLLABLE SSANGCIEUC-WI-KIYEOKSIOS +0xCBA0 # HANGUL SYLLABLE SSANGCIEUC-WI-NIEUN +0xCBA1 # HANGUL SYLLABLE SSANGCIEUC-WI-NIEUNCIEUC +0xCBA2 # HANGUL SYLLABLE SSANGCIEUC-WI-NIEUNHIEUH +0xCBA3 # HANGUL SYLLABLE SSANGCIEUC-WI-TIKEUT +0xCBA4 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEUL +0xCBA5 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULKIYEOK +0xCBA6 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULMIEUM +0xCBA7 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULPIEUP +0xCBA8 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULSIOS +0xCBA9 # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULTHIEUTH +0xCBAA # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULPHIEUPH +0xCBAB # HANGUL SYLLABLE SSANGCIEUC-WI-RIEULHIEUH +0xCBAC # HANGUL SYLLABLE SSANGCIEUC-WI-MIEUM +0xCBAD # HANGUL SYLLABLE SSANGCIEUC-WI-PIEUP +0xCBAE # HANGUL SYLLABLE SSANGCIEUC-WI-PIEUPSIOS +0xCBAF # HANGUL SYLLABLE SSANGCIEUC-WI-SIOS +0xCBB0 # HANGUL SYLLABLE SSANGCIEUC-WI-SSANGSIOS +0xCBB1 # HANGUL SYLLABLE SSANGCIEUC-WI-IEUNG +0xCBB2 # HANGUL SYLLABLE SSANGCIEUC-WI-CIEUC +0xCBB3 # HANGUL SYLLABLE SSANGCIEUC-WI-CHIEUCH +0xCBB4 # HANGUL SYLLABLE SSANGCIEUC-WI-KHIEUKH +0xCBB5 # HANGUL SYLLABLE SSANGCIEUC-WI-THIEUTH +0xCBB6 # HANGUL SYLLABLE SSANGCIEUC-WI-PHIEUPH +0xCBB7 # HANGUL SYLLABLE SSANGCIEUC-WI-HIEUH +0xCBB8 # HANGUL SYLLABLE SSANGCIEUC-YU +0xCBB9 # HANGUL SYLLABLE SSANGCIEUC-YU-KIYEOK +0xCBBA # HANGUL SYLLABLE SSANGCIEUC-YU-SSANGKIYEOK +0xCBBB # HANGUL SYLLABLE SSANGCIEUC-YU-KIYEOKSIOS +0xCBBC # HANGUL SYLLABLE SSANGCIEUC-YU-NIEUN +0xCBBD # HANGUL SYLLABLE SSANGCIEUC-YU-NIEUNCIEUC +0xCBBE # HANGUL SYLLABLE SSANGCIEUC-YU-NIEUNHIEUH +0xCBBF # HANGUL SYLLABLE SSANGCIEUC-YU-TIKEUT +0xCBC0 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEUL +0xCBC1 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULKIYEOK +0xCBC2 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULMIEUM +0xCBC3 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULPIEUP +0xCBC4 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULSIOS +0xCBC5 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULTHIEUTH +0xCBC6 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULPHIEUPH +0xCBC7 # HANGUL SYLLABLE SSANGCIEUC-YU-RIEULHIEUH +0xCBC8 # HANGUL SYLLABLE SSANGCIEUC-YU-MIEUM +0xCBC9 # HANGUL SYLLABLE SSANGCIEUC-YU-PIEUP +0xCBCA # HANGUL SYLLABLE SSANGCIEUC-YU-PIEUPSIOS +0xCBCB # HANGUL SYLLABLE SSANGCIEUC-YU-SIOS +0xCBCC # HANGUL SYLLABLE SSANGCIEUC-YU-SSANGSIOS +0xCBCD # HANGUL SYLLABLE SSANGCIEUC-YU-IEUNG +0xCBCE # HANGUL SYLLABLE SSANGCIEUC-YU-CIEUC +0xCBCF # HANGUL SYLLABLE SSANGCIEUC-YU-CHIEUCH +0xCBD0 # HANGUL SYLLABLE SSANGCIEUC-YU-KHIEUKH +0xCBD1 # HANGUL SYLLABLE SSANGCIEUC-YU-THIEUTH +0xCBD2 # HANGUL SYLLABLE SSANGCIEUC-YU-PHIEUPH +0xCBD3 # HANGUL SYLLABLE SSANGCIEUC-YU-HIEUH +0xCBD4 # HANGUL SYLLABLE SSANGCIEUC-EU +0xCBD5 # HANGUL SYLLABLE SSANGCIEUC-EU-KIYEOK +0xCBD6 # HANGUL SYLLABLE SSANGCIEUC-EU-SSANGKIYEOK +0xCBD7 # HANGUL SYLLABLE SSANGCIEUC-EU-KIYEOKSIOS +0xCBD8 # HANGUL SYLLABLE SSANGCIEUC-EU-NIEUN +0xCBD9 # HANGUL SYLLABLE SSANGCIEUC-EU-NIEUNCIEUC +0xCBDA # HANGUL SYLLABLE SSANGCIEUC-EU-NIEUNHIEUH +0xCBDB # HANGUL SYLLABLE SSANGCIEUC-EU-TIKEUT +0xCBDC # HANGUL SYLLABLE SSANGCIEUC-EU-RIEUL +0xCBDD # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULKIYEOK +0xCBDE # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULMIEUM +0xCBDF # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULPIEUP +0xCBE0 # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULSIOS +0xCBE1 # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULTHIEUTH +0xCBE2 # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULPHIEUPH +0xCBE3 # HANGUL SYLLABLE SSANGCIEUC-EU-RIEULHIEUH +0xCBE4 # HANGUL SYLLABLE SSANGCIEUC-EU-MIEUM +0xCBE5 # HANGUL SYLLABLE SSANGCIEUC-EU-PIEUP +0xCBE6 # HANGUL SYLLABLE SSANGCIEUC-EU-PIEUPSIOS +0xCBE7 # HANGUL SYLLABLE SSANGCIEUC-EU-SIOS +0xCBE8 # HANGUL SYLLABLE SSANGCIEUC-EU-SSANGSIOS +0xCBE9 # HANGUL SYLLABLE SSANGCIEUC-EU-IEUNG +0xCBEA # HANGUL SYLLABLE SSANGCIEUC-EU-CIEUC +0xCBEB # HANGUL SYLLABLE SSANGCIEUC-EU-CHIEUCH +0xCBEC # HANGUL SYLLABLE SSANGCIEUC-EU-KHIEUKH +0xCBED # HANGUL SYLLABLE SSANGCIEUC-EU-THIEUTH +0xCBEE # HANGUL SYLLABLE SSANGCIEUC-EU-PHIEUPH +0xCBEF # HANGUL SYLLABLE SSANGCIEUC-EU-HIEUH +0xCBF0 # HANGUL SYLLABLE SSANGCIEUC-YI +0xCBF1 # HANGUL SYLLABLE SSANGCIEUC-YI-KIYEOK +0xCBF2 # HANGUL SYLLABLE SSANGCIEUC-YI-SSANGKIYEOK +0xCBF3 # HANGUL SYLLABLE SSANGCIEUC-YI-KIYEOKSIOS +0xCBF4 # HANGUL SYLLABLE SSANGCIEUC-YI-NIEUN +0xCBF5 # HANGUL SYLLABLE SSANGCIEUC-YI-NIEUNCIEUC +0xCBF6 # HANGUL SYLLABLE SSANGCIEUC-YI-NIEUNHIEUH +0xCBF7 # HANGUL SYLLABLE SSANGCIEUC-YI-TIKEUT +0xCBF8 # HANGUL SYLLABLE SSANGCIEUC-YI-RIEUL +0xCBF9 # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULKIYEOK +0xCBFA # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULMIEUM +0xCBFB # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULPIEUP +0xCBFC # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULSIOS +0xCBFD # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULTHIEUTH +0xCBFE # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULPHIEUPH +0xCBFF # HANGUL SYLLABLE SSANGCIEUC-YI-RIEULHIEUH +0xCC00 # HANGUL SYLLABLE SSANGCIEUC-YI-MIEUM +0xCC01 # HANGUL SYLLABLE SSANGCIEUC-YI-PIEUP +0xCC02 # HANGUL SYLLABLE SSANGCIEUC-YI-PIEUPSIOS +0xCC03 # HANGUL SYLLABLE SSANGCIEUC-YI-SIOS +0xCC04 # HANGUL SYLLABLE SSANGCIEUC-YI-SSANGSIOS +0xCC05 # HANGUL SYLLABLE SSANGCIEUC-YI-IEUNG +0xCC06 # HANGUL SYLLABLE SSANGCIEUC-YI-CIEUC +0xCC07 # HANGUL SYLLABLE SSANGCIEUC-YI-CHIEUCH +0xCC08 # HANGUL SYLLABLE SSANGCIEUC-YI-KHIEUKH +0xCC09 # HANGUL SYLLABLE SSANGCIEUC-YI-THIEUTH +0xCC0A # HANGUL SYLLABLE SSANGCIEUC-YI-PHIEUPH +0xCC0B # HANGUL SYLLABLE SSANGCIEUC-YI-HIEUH +0xCC0C # HANGUL SYLLABLE SSANGCIEUC-I +0xCC0D # HANGUL SYLLABLE SSANGCIEUC-I-KIYEOK +0xCC0E # HANGUL SYLLABLE SSANGCIEUC-I-SSANGKIYEOK +0xCC0F # HANGUL SYLLABLE SSANGCIEUC-I-KIYEOKSIOS +0xCC10 # HANGUL SYLLABLE SSANGCIEUC-I-NIEUN +0xCC11 # HANGUL SYLLABLE SSANGCIEUC-I-NIEUNCIEUC +0xCC12 # HANGUL SYLLABLE SSANGCIEUC-I-NIEUNHIEUH +0xCC13 # HANGUL SYLLABLE SSANGCIEUC-I-TIKEUT +0xCC14 # HANGUL SYLLABLE SSANGCIEUC-I-RIEUL +0xCC15 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULKIYEOK +0xCC16 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULMIEUM +0xCC17 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULPIEUP +0xCC18 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULSIOS +0xCC19 # HANGUL SYLLABLE SSANGCIEUC-I-RIEULTHIEUTH +0xCC1A # HANGUL SYLLABLE SSANGCIEUC-I-RIEULPHIEUPH +0xCC1B # HANGUL SYLLABLE SSANGCIEUC-I-RIEULHIEUH +0xCC1C # HANGUL SYLLABLE SSANGCIEUC-I-MIEUM +0xCC1D # HANGUL SYLLABLE SSANGCIEUC-I-PIEUP +0xCC1E # HANGUL SYLLABLE SSANGCIEUC-I-PIEUPSIOS +0xCC1F # HANGUL SYLLABLE SSANGCIEUC-I-SIOS +0xCC20 # HANGUL SYLLABLE SSANGCIEUC-I-SSANGSIOS +0xCC21 # HANGUL SYLLABLE SSANGCIEUC-I-IEUNG +0xCC22 # HANGUL SYLLABLE SSANGCIEUC-I-CIEUC +0xCC23 # HANGUL SYLLABLE SSANGCIEUC-I-CHIEUCH +0xCC24 # HANGUL SYLLABLE SSANGCIEUC-I-KHIEUKH +0xCC25 # HANGUL SYLLABLE SSANGCIEUC-I-THIEUTH +0xCC26 # HANGUL SYLLABLE SSANGCIEUC-I-PHIEUPH +0xCC27 # HANGUL SYLLABLE SSANGCIEUC-I-HIEUH +0xCC28 # HANGUL SYLLABLE CHIEUCH-A +0xCC29 # HANGUL SYLLABLE CHIEUCH-A-KIYEOK +0xCC2A # HANGUL SYLLABLE CHIEUCH-A-SSANGKIYEOK +0xCC2B # HANGUL SYLLABLE CHIEUCH-A-KIYEOKSIOS +0xCC2C # HANGUL SYLLABLE CHIEUCH-A-NIEUN +0xCC2D # HANGUL SYLLABLE CHIEUCH-A-NIEUNCIEUC +0xCC2E # HANGUL SYLLABLE CHIEUCH-A-NIEUNHIEUH +0xCC2F # HANGUL SYLLABLE CHIEUCH-A-TIKEUT +0xCC30 # HANGUL SYLLABLE CHIEUCH-A-RIEUL +0xCC31 # HANGUL SYLLABLE CHIEUCH-A-RIEULKIYEOK +0xCC32 # HANGUL SYLLABLE CHIEUCH-A-RIEULMIEUM +0xCC33 # HANGUL SYLLABLE CHIEUCH-A-RIEULPIEUP +0xCC34 # HANGUL SYLLABLE CHIEUCH-A-RIEULSIOS +0xCC35 # HANGUL SYLLABLE CHIEUCH-A-RIEULTHIEUTH +0xCC36 # HANGUL SYLLABLE CHIEUCH-A-RIEULPHIEUPH +0xCC37 # HANGUL SYLLABLE CHIEUCH-A-RIEULHIEUH +0xCC38 # HANGUL SYLLABLE CHIEUCH-A-MIEUM +0xCC39 # HANGUL SYLLABLE CHIEUCH-A-PIEUP +0xCC3A # HANGUL SYLLABLE CHIEUCH-A-PIEUPSIOS +0xCC3B # HANGUL SYLLABLE CHIEUCH-A-SIOS +0xCC3C # HANGUL SYLLABLE CHIEUCH-A-SSANGSIOS +0xCC3D # HANGUL SYLLABLE CHIEUCH-A-IEUNG +0xCC3E # HANGUL SYLLABLE CHIEUCH-A-CIEUC +0xCC3F # HANGUL SYLLABLE CHIEUCH-A-CHIEUCH +0xCC40 # HANGUL SYLLABLE CHIEUCH-A-KHIEUKH +0xCC41 # HANGUL SYLLABLE CHIEUCH-A-THIEUTH +0xCC42 # HANGUL SYLLABLE CHIEUCH-A-PHIEUPH +0xCC43 # HANGUL SYLLABLE CHIEUCH-A-HIEUH +0xCC44 # HANGUL SYLLABLE CHIEUCH-AE +0xCC45 # HANGUL SYLLABLE CHIEUCH-AE-KIYEOK +0xCC46 # HANGUL SYLLABLE CHIEUCH-AE-SSANGKIYEOK +0xCC47 # HANGUL SYLLABLE CHIEUCH-AE-KIYEOKSIOS +0xCC48 # HANGUL SYLLABLE CHIEUCH-AE-NIEUN +0xCC49 # HANGUL SYLLABLE CHIEUCH-AE-NIEUNCIEUC +0xCC4A # HANGUL SYLLABLE CHIEUCH-AE-NIEUNHIEUH +0xCC4B # HANGUL SYLLABLE CHIEUCH-AE-TIKEUT +0xCC4C # HANGUL SYLLABLE CHIEUCH-AE-RIEUL +0xCC4D # HANGUL SYLLABLE CHIEUCH-AE-RIEULKIYEOK +0xCC4E # HANGUL SYLLABLE CHIEUCH-AE-RIEULMIEUM +0xCC4F # HANGUL SYLLABLE CHIEUCH-AE-RIEULPIEUP +0xCC50 # HANGUL SYLLABLE CHIEUCH-AE-RIEULSIOS +0xCC51 # HANGUL SYLLABLE CHIEUCH-AE-RIEULTHIEUTH +0xCC52 # HANGUL SYLLABLE CHIEUCH-AE-RIEULPHIEUPH +0xCC53 # HANGUL SYLLABLE CHIEUCH-AE-RIEULHIEUH +0xCC54 # HANGUL SYLLABLE CHIEUCH-AE-MIEUM +0xCC55 # HANGUL SYLLABLE CHIEUCH-AE-PIEUP +0xCC56 # HANGUL SYLLABLE CHIEUCH-AE-PIEUPSIOS +0xCC57 # HANGUL SYLLABLE CHIEUCH-AE-SIOS +0xCC58 # HANGUL SYLLABLE CHIEUCH-AE-SSANGSIOS +0xCC59 # HANGUL SYLLABLE CHIEUCH-AE-IEUNG +0xCC5A # HANGUL SYLLABLE CHIEUCH-AE-CIEUC +0xCC5B # HANGUL SYLLABLE CHIEUCH-AE-CHIEUCH +0xCC5C # HANGUL SYLLABLE CHIEUCH-AE-KHIEUKH +0xCC5D # HANGUL SYLLABLE CHIEUCH-AE-THIEUTH +0xCC5E # HANGUL SYLLABLE CHIEUCH-AE-PHIEUPH +0xCC5F # HANGUL SYLLABLE CHIEUCH-AE-HIEUH +0xCC60 # HANGUL SYLLABLE CHIEUCH-YA +0xCC61 # HANGUL SYLLABLE CHIEUCH-YA-KIYEOK +0xCC62 # HANGUL SYLLABLE CHIEUCH-YA-SSANGKIYEOK +0xCC63 # HANGUL SYLLABLE CHIEUCH-YA-KIYEOKSIOS +0xCC64 # HANGUL SYLLABLE CHIEUCH-YA-NIEUN +0xCC65 # HANGUL SYLLABLE CHIEUCH-YA-NIEUNCIEUC +0xCC66 # HANGUL SYLLABLE CHIEUCH-YA-NIEUNHIEUH +0xCC67 # HANGUL SYLLABLE CHIEUCH-YA-TIKEUT +0xCC68 # HANGUL SYLLABLE CHIEUCH-YA-RIEUL +0xCC69 # HANGUL SYLLABLE CHIEUCH-YA-RIEULKIYEOK +0xCC6A # HANGUL SYLLABLE CHIEUCH-YA-RIEULMIEUM +0xCC6B # HANGUL SYLLABLE CHIEUCH-YA-RIEULPIEUP +0xCC6C # HANGUL SYLLABLE CHIEUCH-YA-RIEULSIOS +0xCC6D # HANGUL SYLLABLE CHIEUCH-YA-RIEULTHIEUTH +0xCC6E # HANGUL SYLLABLE CHIEUCH-YA-RIEULPHIEUPH +0xCC6F # HANGUL SYLLABLE CHIEUCH-YA-RIEULHIEUH +0xCC70 # HANGUL SYLLABLE CHIEUCH-YA-MIEUM +0xCC71 # HANGUL SYLLABLE CHIEUCH-YA-PIEUP +0xCC72 # HANGUL SYLLABLE CHIEUCH-YA-PIEUPSIOS +0xCC73 # HANGUL SYLLABLE CHIEUCH-YA-SIOS +0xCC74 # HANGUL SYLLABLE CHIEUCH-YA-SSANGSIOS +0xCC75 # HANGUL SYLLABLE CHIEUCH-YA-IEUNG +0xCC76 # HANGUL SYLLABLE CHIEUCH-YA-CIEUC +0xCC77 # HANGUL SYLLABLE CHIEUCH-YA-CHIEUCH +0xCC78 # HANGUL SYLLABLE CHIEUCH-YA-KHIEUKH +0xCC79 # HANGUL SYLLABLE CHIEUCH-YA-THIEUTH +0xCC7A # HANGUL SYLLABLE CHIEUCH-YA-PHIEUPH +0xCC7B # HANGUL SYLLABLE CHIEUCH-YA-HIEUH +0xCC7C # HANGUL SYLLABLE CHIEUCH-YAE +0xCC7D # HANGUL SYLLABLE CHIEUCH-YAE-KIYEOK +0xCC7E # HANGUL SYLLABLE CHIEUCH-YAE-SSANGKIYEOK +0xCC7F # HANGUL SYLLABLE CHIEUCH-YAE-KIYEOKSIOS +0xCC80 # HANGUL SYLLABLE CHIEUCH-YAE-NIEUN +0xCC81 # HANGUL SYLLABLE CHIEUCH-YAE-NIEUNCIEUC +0xCC82 # HANGUL SYLLABLE CHIEUCH-YAE-NIEUNHIEUH +0xCC83 # HANGUL SYLLABLE CHIEUCH-YAE-TIKEUT +0xCC84 # HANGUL SYLLABLE CHIEUCH-YAE-RIEUL +0xCC85 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULKIYEOK +0xCC86 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULMIEUM +0xCC87 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULPIEUP +0xCC88 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULSIOS +0xCC89 # HANGUL SYLLABLE CHIEUCH-YAE-RIEULTHIEUTH +0xCC8A # HANGUL SYLLABLE CHIEUCH-YAE-RIEULPHIEUPH +0xCC8B # HANGUL SYLLABLE CHIEUCH-YAE-RIEULHIEUH +0xCC8C # HANGUL SYLLABLE CHIEUCH-YAE-MIEUM +0xCC8D # HANGUL SYLLABLE CHIEUCH-YAE-PIEUP +0xCC8E # HANGUL SYLLABLE CHIEUCH-YAE-PIEUPSIOS +0xCC8F # HANGUL SYLLABLE CHIEUCH-YAE-SIOS +0xCC90 # HANGUL SYLLABLE CHIEUCH-YAE-SSANGSIOS +0xCC91 # HANGUL SYLLABLE CHIEUCH-YAE-IEUNG +0xCC92 # HANGUL SYLLABLE CHIEUCH-YAE-CIEUC +0xCC93 # HANGUL SYLLABLE CHIEUCH-YAE-CHIEUCH +0xCC94 # HANGUL SYLLABLE CHIEUCH-YAE-KHIEUKH +0xCC95 # HANGUL SYLLABLE CHIEUCH-YAE-THIEUTH +0xCC96 # HANGUL SYLLABLE CHIEUCH-YAE-PHIEUPH +0xCC97 # HANGUL SYLLABLE CHIEUCH-YAE-HIEUH +0xCC98 # HANGUL SYLLABLE CHIEUCH-EO +0xCC99 # HANGUL SYLLABLE CHIEUCH-EO-KIYEOK +0xCC9A # HANGUL SYLLABLE CHIEUCH-EO-SSANGKIYEOK +0xCC9B # HANGUL SYLLABLE CHIEUCH-EO-KIYEOKSIOS +0xCC9C # HANGUL SYLLABLE CHIEUCH-EO-NIEUN +0xCC9D # HANGUL SYLLABLE CHIEUCH-EO-NIEUNCIEUC +0xCC9E # HANGUL SYLLABLE CHIEUCH-EO-NIEUNHIEUH +0xCC9F # HANGUL SYLLABLE CHIEUCH-EO-TIKEUT +0xCCA0 # HANGUL SYLLABLE CHIEUCH-EO-RIEUL +0xCCA1 # HANGUL SYLLABLE CHIEUCH-EO-RIEULKIYEOK +0xCCA2 # HANGUL SYLLABLE CHIEUCH-EO-RIEULMIEUM +0xCCA3 # HANGUL SYLLABLE CHIEUCH-EO-RIEULPIEUP +0xCCA4 # HANGUL SYLLABLE CHIEUCH-EO-RIEULSIOS +0xCCA5 # HANGUL SYLLABLE CHIEUCH-EO-RIEULTHIEUTH +0xCCA6 # HANGUL SYLLABLE CHIEUCH-EO-RIEULPHIEUPH +0xCCA7 # HANGUL SYLLABLE CHIEUCH-EO-RIEULHIEUH +0xCCA8 # HANGUL SYLLABLE CHIEUCH-EO-MIEUM +0xCCA9 # HANGUL SYLLABLE CHIEUCH-EO-PIEUP +0xCCAA # HANGUL SYLLABLE CHIEUCH-EO-PIEUPSIOS +0xCCAB # HANGUL SYLLABLE CHIEUCH-EO-SIOS +0xCCAC # HANGUL SYLLABLE CHIEUCH-EO-SSANGSIOS +0xCCAD # HANGUL SYLLABLE CHIEUCH-EO-IEUNG +0xCCAE # HANGUL SYLLABLE CHIEUCH-EO-CIEUC +0xCCAF # HANGUL SYLLABLE CHIEUCH-EO-CHIEUCH +0xCCB0 # HANGUL SYLLABLE CHIEUCH-EO-KHIEUKH +0xCCB1 # HANGUL SYLLABLE CHIEUCH-EO-THIEUTH +0xCCB2 # HANGUL SYLLABLE CHIEUCH-EO-PHIEUPH +0xCCB3 # HANGUL SYLLABLE CHIEUCH-EO-HIEUH +0xCCB4 # HANGUL SYLLABLE CHIEUCH-E +0xCCB5 # HANGUL SYLLABLE CHIEUCH-E-KIYEOK +0xCCB6 # HANGUL SYLLABLE CHIEUCH-E-SSANGKIYEOK +0xCCB7 # HANGUL SYLLABLE CHIEUCH-E-KIYEOKSIOS +0xCCB8 # HANGUL SYLLABLE CHIEUCH-E-NIEUN +0xCCB9 # HANGUL SYLLABLE CHIEUCH-E-NIEUNCIEUC +0xCCBA # HANGUL SYLLABLE CHIEUCH-E-NIEUNHIEUH +0xCCBB # HANGUL SYLLABLE CHIEUCH-E-TIKEUT +0xCCBC # HANGUL SYLLABLE CHIEUCH-E-RIEUL +0xCCBD # HANGUL SYLLABLE CHIEUCH-E-RIEULKIYEOK +0xCCBE # HANGUL SYLLABLE CHIEUCH-E-RIEULMIEUM +0xCCBF # HANGUL SYLLABLE CHIEUCH-E-RIEULPIEUP +0xCCC0 # HANGUL SYLLABLE CHIEUCH-E-RIEULSIOS +0xCCC1 # HANGUL SYLLABLE CHIEUCH-E-RIEULTHIEUTH +0xCCC2 # HANGUL SYLLABLE CHIEUCH-E-RIEULPHIEUPH +0xCCC3 # HANGUL SYLLABLE CHIEUCH-E-RIEULHIEUH +0xCCC4 # HANGUL SYLLABLE CHIEUCH-E-MIEUM +0xCCC5 # HANGUL SYLLABLE CHIEUCH-E-PIEUP +0xCCC6 # HANGUL SYLLABLE CHIEUCH-E-PIEUPSIOS +0xCCC7 # HANGUL SYLLABLE CHIEUCH-E-SIOS +0xCCC8 # HANGUL SYLLABLE CHIEUCH-E-SSANGSIOS +0xCCC9 # HANGUL SYLLABLE CHIEUCH-E-IEUNG +0xCCCA # HANGUL SYLLABLE CHIEUCH-E-CIEUC +0xCCCB # HANGUL SYLLABLE CHIEUCH-E-CHIEUCH +0xCCCC # HANGUL SYLLABLE CHIEUCH-E-KHIEUKH +0xCCCD # HANGUL SYLLABLE CHIEUCH-E-THIEUTH +0xCCCE # HANGUL SYLLABLE CHIEUCH-E-PHIEUPH +0xCCCF # HANGUL SYLLABLE CHIEUCH-E-HIEUH +0xCCD0 # HANGUL SYLLABLE CHIEUCH-YEO +0xCCD1 # HANGUL SYLLABLE CHIEUCH-YEO-KIYEOK +0xCCD2 # HANGUL SYLLABLE CHIEUCH-YEO-SSANGKIYEOK +0xCCD3 # HANGUL SYLLABLE CHIEUCH-YEO-KIYEOKSIOS +0xCCD4 # HANGUL SYLLABLE CHIEUCH-YEO-NIEUN +0xCCD5 # HANGUL SYLLABLE CHIEUCH-YEO-NIEUNCIEUC +0xCCD6 # HANGUL SYLLABLE CHIEUCH-YEO-NIEUNHIEUH +0xCCD7 # HANGUL SYLLABLE CHIEUCH-YEO-TIKEUT +0xCCD8 # HANGUL SYLLABLE CHIEUCH-YEO-RIEUL +0xCCD9 # HANGUL SYLLABLE CHIEUCH-YEO-RIEULKIYEOK +0xCCDA # HANGUL SYLLABLE CHIEUCH-YEO-RIEULMIEUM +0xCCDB # HANGUL SYLLABLE CHIEUCH-YEO-RIEULPIEUP +0xCCDC # HANGUL SYLLABLE CHIEUCH-YEO-RIEULSIOS +0xCCDD # HANGUL SYLLABLE CHIEUCH-YEO-RIEULTHIEUTH +0xCCDE # HANGUL SYLLABLE CHIEUCH-YEO-RIEULPHIEUPH +0xCCDF # HANGUL SYLLABLE CHIEUCH-YEO-RIEULHIEUH +0xCCE0 # HANGUL SYLLABLE CHIEUCH-YEO-MIEUM +0xCCE1 # HANGUL SYLLABLE CHIEUCH-YEO-PIEUP +0xCCE2 # HANGUL SYLLABLE CHIEUCH-YEO-PIEUPSIOS +0xCCE3 # HANGUL SYLLABLE CHIEUCH-YEO-SIOS +0xCCE4 # HANGUL SYLLABLE CHIEUCH-YEO-SSANGSIOS +0xCCE5 # HANGUL SYLLABLE CHIEUCH-YEO-IEUNG +0xCCE6 # HANGUL SYLLABLE CHIEUCH-YEO-CIEUC +0xCCE7 # HANGUL SYLLABLE CHIEUCH-YEO-CHIEUCH +0xCCE8 # HANGUL SYLLABLE CHIEUCH-YEO-KHIEUKH +0xCCE9 # HANGUL SYLLABLE CHIEUCH-YEO-THIEUTH +0xCCEA # HANGUL SYLLABLE CHIEUCH-YEO-PHIEUPH +0xCCEB # HANGUL SYLLABLE CHIEUCH-YEO-HIEUH +0xCCEC # HANGUL SYLLABLE CHIEUCH-YE +0xCCED # HANGUL SYLLABLE CHIEUCH-YE-KIYEOK +0xCCEE # HANGUL SYLLABLE CHIEUCH-YE-SSANGKIYEOK +0xCCEF # HANGUL SYLLABLE CHIEUCH-YE-KIYEOKSIOS +0xCCF0 # HANGUL SYLLABLE CHIEUCH-YE-NIEUN +0xCCF1 # HANGUL SYLLABLE CHIEUCH-YE-NIEUNCIEUC +0xCCF2 # HANGUL SYLLABLE CHIEUCH-YE-NIEUNHIEUH +0xCCF3 # HANGUL SYLLABLE CHIEUCH-YE-TIKEUT +0xCCF4 # HANGUL SYLLABLE CHIEUCH-YE-RIEUL +0xCCF5 # HANGUL SYLLABLE CHIEUCH-YE-RIEULKIYEOK +0xCCF6 # HANGUL SYLLABLE CHIEUCH-YE-RIEULMIEUM +0xCCF7 # HANGUL SYLLABLE CHIEUCH-YE-RIEULPIEUP +0xCCF8 # HANGUL SYLLABLE CHIEUCH-YE-RIEULSIOS +0xCCF9 # HANGUL SYLLABLE CHIEUCH-YE-RIEULTHIEUTH +0xCCFA # HANGUL SYLLABLE CHIEUCH-YE-RIEULPHIEUPH +0xCCFB # HANGUL SYLLABLE CHIEUCH-YE-RIEULHIEUH +0xCCFC # HANGUL SYLLABLE CHIEUCH-YE-MIEUM +0xCCFD # HANGUL SYLLABLE CHIEUCH-YE-PIEUP +0xCCFE # HANGUL SYLLABLE CHIEUCH-YE-PIEUPSIOS +0xCCFF # HANGUL SYLLABLE CHIEUCH-YE-SIOS +0xCD00 # HANGUL SYLLABLE CHIEUCH-YE-SSANGSIOS +0xCD01 # HANGUL SYLLABLE CHIEUCH-YE-IEUNG +0xCD02 # HANGUL SYLLABLE CHIEUCH-YE-CIEUC +0xCD03 # HANGUL SYLLABLE CHIEUCH-YE-CHIEUCH +0xCD04 # HANGUL SYLLABLE CHIEUCH-YE-KHIEUKH +0xCD05 # HANGUL SYLLABLE CHIEUCH-YE-THIEUTH +0xCD06 # HANGUL SYLLABLE CHIEUCH-YE-PHIEUPH +0xCD07 # HANGUL SYLLABLE CHIEUCH-YE-HIEUH +0xCD08 # HANGUL SYLLABLE CHIEUCH-O +0xCD09 # HANGUL SYLLABLE CHIEUCH-O-KIYEOK +0xCD0A # HANGUL SYLLABLE CHIEUCH-O-SSANGKIYEOK +0xCD0B # HANGUL SYLLABLE CHIEUCH-O-KIYEOKSIOS +0xCD0C # HANGUL SYLLABLE CHIEUCH-O-NIEUN +0xCD0D # HANGUL SYLLABLE CHIEUCH-O-NIEUNCIEUC +0xCD0E # HANGUL SYLLABLE CHIEUCH-O-NIEUNHIEUH +0xCD0F # HANGUL SYLLABLE CHIEUCH-O-TIKEUT +0xCD10 # HANGUL SYLLABLE CHIEUCH-O-RIEUL +0xCD11 # HANGUL SYLLABLE CHIEUCH-O-RIEULKIYEOK +0xCD12 # HANGUL SYLLABLE CHIEUCH-O-RIEULMIEUM +0xCD13 # HANGUL SYLLABLE CHIEUCH-O-RIEULPIEUP +0xCD14 # HANGUL SYLLABLE CHIEUCH-O-RIEULSIOS +0xCD15 # HANGUL SYLLABLE CHIEUCH-O-RIEULTHIEUTH +0xCD16 # HANGUL SYLLABLE CHIEUCH-O-RIEULPHIEUPH +0xCD17 # HANGUL SYLLABLE CHIEUCH-O-RIEULHIEUH +0xCD18 # HANGUL SYLLABLE CHIEUCH-O-MIEUM +0xCD19 # HANGUL SYLLABLE CHIEUCH-O-PIEUP +0xCD1A # HANGUL SYLLABLE CHIEUCH-O-PIEUPSIOS +0xCD1B # HANGUL SYLLABLE CHIEUCH-O-SIOS +0xCD1C # HANGUL SYLLABLE CHIEUCH-O-SSANGSIOS +0xCD1D # HANGUL SYLLABLE CHIEUCH-O-IEUNG +0xCD1E # HANGUL SYLLABLE CHIEUCH-O-CIEUC +0xCD1F # HANGUL SYLLABLE CHIEUCH-O-CHIEUCH +0xCD20 # HANGUL SYLLABLE CHIEUCH-O-KHIEUKH +0xCD21 # HANGUL SYLLABLE CHIEUCH-O-THIEUTH +0xCD22 # HANGUL SYLLABLE CHIEUCH-O-PHIEUPH +0xCD23 # HANGUL SYLLABLE CHIEUCH-O-HIEUH +0xCD24 # HANGUL SYLLABLE CHIEUCH-WA +0xCD25 # HANGUL SYLLABLE CHIEUCH-WA-KIYEOK +0xCD26 # HANGUL SYLLABLE CHIEUCH-WA-SSANGKIYEOK +0xCD27 # HANGUL SYLLABLE CHIEUCH-WA-KIYEOKSIOS +0xCD28 # HANGUL SYLLABLE CHIEUCH-WA-NIEUN +0xCD29 # HANGUL SYLLABLE CHIEUCH-WA-NIEUNCIEUC +0xCD2A # HANGUL SYLLABLE CHIEUCH-WA-NIEUNHIEUH +0xCD2B # HANGUL SYLLABLE CHIEUCH-WA-TIKEUT +0xCD2C # HANGUL SYLLABLE CHIEUCH-WA-RIEUL +0xCD2D # HANGUL SYLLABLE CHIEUCH-WA-RIEULKIYEOK +0xCD2E # HANGUL SYLLABLE CHIEUCH-WA-RIEULMIEUM +0xCD2F # HANGUL SYLLABLE CHIEUCH-WA-RIEULPIEUP +0xCD30 # HANGUL SYLLABLE CHIEUCH-WA-RIEULSIOS +0xCD31 # HANGUL SYLLABLE CHIEUCH-WA-RIEULTHIEUTH +0xCD32 # HANGUL SYLLABLE CHIEUCH-WA-RIEULPHIEUPH +0xCD33 # HANGUL SYLLABLE CHIEUCH-WA-RIEULHIEUH +0xCD34 # HANGUL SYLLABLE CHIEUCH-WA-MIEUM +0xCD35 # HANGUL SYLLABLE CHIEUCH-WA-PIEUP +0xCD36 # HANGUL SYLLABLE CHIEUCH-WA-PIEUPSIOS +0xCD37 # HANGUL SYLLABLE CHIEUCH-WA-SIOS +0xCD38 # HANGUL SYLLABLE CHIEUCH-WA-SSANGSIOS +0xCD39 # HANGUL SYLLABLE CHIEUCH-WA-IEUNG +0xCD3A # HANGUL SYLLABLE CHIEUCH-WA-CIEUC +0xCD3B # HANGUL SYLLABLE CHIEUCH-WA-CHIEUCH +0xCD3C # HANGUL SYLLABLE CHIEUCH-WA-KHIEUKH +0xCD3D # HANGUL SYLLABLE CHIEUCH-WA-THIEUTH +0xCD3E # HANGUL SYLLABLE CHIEUCH-WA-PHIEUPH +0xCD3F # HANGUL SYLLABLE CHIEUCH-WA-HIEUH +0xCD40 # HANGUL SYLLABLE CHIEUCH-WAE +0xCD41 # HANGUL SYLLABLE CHIEUCH-WAE-KIYEOK +0xCD42 # HANGUL SYLLABLE CHIEUCH-WAE-SSANGKIYEOK +0xCD43 # HANGUL SYLLABLE CHIEUCH-WAE-KIYEOKSIOS +0xCD44 # HANGUL SYLLABLE CHIEUCH-WAE-NIEUN +0xCD45 # HANGUL SYLLABLE CHIEUCH-WAE-NIEUNCIEUC +0xCD46 # HANGUL SYLLABLE CHIEUCH-WAE-NIEUNHIEUH +0xCD47 # HANGUL SYLLABLE CHIEUCH-WAE-TIKEUT +0xCD48 # HANGUL SYLLABLE CHIEUCH-WAE-RIEUL +0xCD49 # HANGUL SYLLABLE CHIEUCH-WAE-RIEULKIYEOK +0xCD4A # HANGUL SYLLABLE CHIEUCH-WAE-RIEULMIEUM +0xCD4B # HANGUL SYLLABLE CHIEUCH-WAE-RIEULPIEUP +0xCD4C # HANGUL SYLLABLE CHIEUCH-WAE-RIEULSIOS +0xCD4D # HANGUL SYLLABLE CHIEUCH-WAE-RIEULTHIEUTH +0xCD4E # HANGUL SYLLABLE CHIEUCH-WAE-RIEULPHIEUPH +0xCD4F # HANGUL SYLLABLE CHIEUCH-WAE-RIEULHIEUH +0xCD50 # HANGUL SYLLABLE CHIEUCH-WAE-MIEUM +0xCD51 # HANGUL SYLLABLE CHIEUCH-WAE-PIEUP +0xCD52 # HANGUL SYLLABLE CHIEUCH-WAE-PIEUPSIOS +0xCD53 # HANGUL SYLLABLE CHIEUCH-WAE-SIOS +0xCD54 # HANGUL SYLLABLE CHIEUCH-WAE-SSANGSIOS +0xCD55 # HANGUL SYLLABLE CHIEUCH-WAE-IEUNG +0xCD56 # HANGUL SYLLABLE CHIEUCH-WAE-CIEUC +0xCD57 # HANGUL SYLLABLE CHIEUCH-WAE-CHIEUCH +0xCD58 # HANGUL SYLLABLE CHIEUCH-WAE-KHIEUKH +0xCD59 # HANGUL SYLLABLE CHIEUCH-WAE-THIEUTH +0xCD5A # HANGUL SYLLABLE CHIEUCH-WAE-PHIEUPH +0xCD5B # HANGUL SYLLABLE CHIEUCH-WAE-HIEUH +0xCD5C # HANGUL SYLLABLE CHIEUCH-OE +0xCD5D # HANGUL SYLLABLE CHIEUCH-OE-KIYEOK +0xCD5E # HANGUL SYLLABLE CHIEUCH-OE-SSANGKIYEOK +0xCD5F # HANGUL SYLLABLE CHIEUCH-OE-KIYEOKSIOS +0xCD60 # HANGUL SYLLABLE CHIEUCH-OE-NIEUN +0xCD61 # HANGUL SYLLABLE CHIEUCH-OE-NIEUNCIEUC +0xCD62 # HANGUL SYLLABLE CHIEUCH-OE-NIEUNHIEUH +0xCD63 # HANGUL SYLLABLE CHIEUCH-OE-TIKEUT +0xCD64 # HANGUL SYLLABLE CHIEUCH-OE-RIEUL +0xCD65 # HANGUL SYLLABLE CHIEUCH-OE-RIEULKIYEOK +0xCD66 # HANGUL SYLLABLE CHIEUCH-OE-RIEULMIEUM +0xCD67 # HANGUL SYLLABLE CHIEUCH-OE-RIEULPIEUP +0xCD68 # HANGUL SYLLABLE CHIEUCH-OE-RIEULSIOS +0xCD69 # HANGUL SYLLABLE CHIEUCH-OE-RIEULTHIEUTH +0xCD6A # HANGUL SYLLABLE CHIEUCH-OE-RIEULPHIEUPH +0xCD6B # HANGUL SYLLABLE CHIEUCH-OE-RIEULHIEUH +0xCD6C # HANGUL SYLLABLE CHIEUCH-OE-MIEUM +0xCD6D # HANGUL SYLLABLE CHIEUCH-OE-PIEUP +0xCD6E # HANGUL SYLLABLE CHIEUCH-OE-PIEUPSIOS +0xCD6F # HANGUL SYLLABLE CHIEUCH-OE-SIOS +0xCD70 # HANGUL SYLLABLE CHIEUCH-OE-SSANGSIOS +0xCD71 # HANGUL SYLLABLE CHIEUCH-OE-IEUNG +0xCD72 # HANGUL SYLLABLE CHIEUCH-OE-CIEUC +0xCD73 # HANGUL SYLLABLE CHIEUCH-OE-CHIEUCH +0xCD74 # HANGUL SYLLABLE CHIEUCH-OE-KHIEUKH +0xCD75 # HANGUL SYLLABLE CHIEUCH-OE-THIEUTH +0xCD76 # HANGUL SYLLABLE CHIEUCH-OE-PHIEUPH +0xCD77 # HANGUL SYLLABLE CHIEUCH-OE-HIEUH +0xCD78 # HANGUL SYLLABLE CHIEUCH-YO +0xCD79 # HANGUL SYLLABLE CHIEUCH-YO-KIYEOK +0xCD7A # HANGUL SYLLABLE CHIEUCH-YO-SSANGKIYEOK +0xCD7B # HANGUL SYLLABLE CHIEUCH-YO-KIYEOKSIOS +0xCD7C # HANGUL SYLLABLE CHIEUCH-YO-NIEUN +0xCD7D # HANGUL SYLLABLE CHIEUCH-YO-NIEUNCIEUC +0xCD7E # HANGUL SYLLABLE CHIEUCH-YO-NIEUNHIEUH +0xCD7F # HANGUL SYLLABLE CHIEUCH-YO-TIKEUT +0xCD80 # HANGUL SYLLABLE CHIEUCH-YO-RIEUL +0xCD81 # HANGUL SYLLABLE CHIEUCH-YO-RIEULKIYEOK +0xCD82 # HANGUL SYLLABLE CHIEUCH-YO-RIEULMIEUM +0xCD83 # HANGUL SYLLABLE CHIEUCH-YO-RIEULPIEUP +0xCD84 # HANGUL SYLLABLE CHIEUCH-YO-RIEULSIOS +0xCD85 # HANGUL SYLLABLE CHIEUCH-YO-RIEULTHIEUTH +0xCD86 # HANGUL SYLLABLE CHIEUCH-YO-RIEULPHIEUPH +0xCD87 # HANGUL SYLLABLE CHIEUCH-YO-RIEULHIEUH +0xCD88 # HANGUL SYLLABLE CHIEUCH-YO-MIEUM +0xCD89 # HANGUL SYLLABLE CHIEUCH-YO-PIEUP +0xCD8A # HANGUL SYLLABLE CHIEUCH-YO-PIEUPSIOS +0xCD8B # HANGUL SYLLABLE CHIEUCH-YO-SIOS +0xCD8C # HANGUL SYLLABLE CHIEUCH-YO-SSANGSIOS +0xCD8D # HANGUL SYLLABLE CHIEUCH-YO-IEUNG +0xCD8E # HANGUL SYLLABLE CHIEUCH-YO-CIEUC +0xCD8F # HANGUL SYLLABLE CHIEUCH-YO-CHIEUCH +0xCD90 # HANGUL SYLLABLE CHIEUCH-YO-KHIEUKH +0xCD91 # HANGUL SYLLABLE CHIEUCH-YO-THIEUTH +0xCD92 # HANGUL SYLLABLE CHIEUCH-YO-PHIEUPH +0xCD93 # HANGUL SYLLABLE CHIEUCH-YO-HIEUH +0xCD94 # HANGUL SYLLABLE CHIEUCH-U +0xCD95 # HANGUL SYLLABLE CHIEUCH-U-KIYEOK +0xCD96 # HANGUL SYLLABLE CHIEUCH-U-SSANGKIYEOK +0xCD97 # HANGUL SYLLABLE CHIEUCH-U-KIYEOKSIOS +0xCD98 # HANGUL SYLLABLE CHIEUCH-U-NIEUN +0xCD99 # HANGUL SYLLABLE CHIEUCH-U-NIEUNCIEUC +0xCD9A # HANGUL SYLLABLE CHIEUCH-U-NIEUNHIEUH +0xCD9B # HANGUL SYLLABLE CHIEUCH-U-TIKEUT +0xCD9C # HANGUL SYLLABLE CHIEUCH-U-RIEUL +0xCD9D # HANGUL SYLLABLE CHIEUCH-U-RIEULKIYEOK +0xCD9E # HANGUL SYLLABLE CHIEUCH-U-RIEULMIEUM +0xCD9F # HANGUL SYLLABLE CHIEUCH-U-RIEULPIEUP +0xCDA0 # HANGUL SYLLABLE CHIEUCH-U-RIEULSIOS +0xCDA1 # HANGUL SYLLABLE CHIEUCH-U-RIEULTHIEUTH +0xCDA2 # HANGUL SYLLABLE CHIEUCH-U-RIEULPHIEUPH +0xCDA3 # HANGUL SYLLABLE CHIEUCH-U-RIEULHIEUH +0xCDA4 # HANGUL SYLLABLE CHIEUCH-U-MIEUM +0xCDA5 # HANGUL SYLLABLE CHIEUCH-U-PIEUP +0xCDA6 # HANGUL SYLLABLE CHIEUCH-U-PIEUPSIOS +0xCDA7 # HANGUL SYLLABLE CHIEUCH-U-SIOS +0xCDA8 # HANGUL SYLLABLE CHIEUCH-U-SSANGSIOS +0xCDA9 # HANGUL SYLLABLE CHIEUCH-U-IEUNG +0xCDAA # HANGUL SYLLABLE CHIEUCH-U-CIEUC +0xCDAB # HANGUL SYLLABLE CHIEUCH-U-CHIEUCH +0xCDAC # HANGUL SYLLABLE CHIEUCH-U-KHIEUKH +0xCDAD # HANGUL SYLLABLE CHIEUCH-U-THIEUTH +0xCDAE # HANGUL SYLLABLE CHIEUCH-U-PHIEUPH +0xCDAF # HANGUL SYLLABLE CHIEUCH-U-HIEUH +0xCDB0 # HANGUL SYLLABLE CHIEUCH-WEO +0xCDB1 # HANGUL SYLLABLE CHIEUCH-WEO-KIYEOK +0xCDB2 # HANGUL SYLLABLE CHIEUCH-WEO-SSANGKIYEOK +0xCDB3 # HANGUL SYLLABLE CHIEUCH-WEO-KIYEOKSIOS +0xCDB4 # HANGUL SYLLABLE CHIEUCH-WEO-NIEUN +0xCDB5 # HANGUL SYLLABLE CHIEUCH-WEO-NIEUNCIEUC +0xCDB6 # HANGUL SYLLABLE CHIEUCH-WEO-NIEUNHIEUH +0xCDB7 # HANGUL SYLLABLE CHIEUCH-WEO-TIKEUT +0xCDB8 # HANGUL SYLLABLE CHIEUCH-WEO-RIEUL +0xCDB9 # HANGUL SYLLABLE CHIEUCH-WEO-RIEULKIYEOK +0xCDBA # HANGUL SYLLABLE CHIEUCH-WEO-RIEULMIEUM +0xCDBB # HANGUL SYLLABLE CHIEUCH-WEO-RIEULPIEUP +0xCDBC # HANGUL SYLLABLE CHIEUCH-WEO-RIEULSIOS +0xCDBD # HANGUL SYLLABLE CHIEUCH-WEO-RIEULTHIEUTH +0xCDBE # HANGUL SYLLABLE CHIEUCH-WEO-RIEULPHIEUPH +0xCDBF # HANGUL SYLLABLE CHIEUCH-WEO-RIEULHIEUH +0xCDC0 # HANGUL SYLLABLE CHIEUCH-WEO-MIEUM +0xCDC1 # HANGUL SYLLABLE CHIEUCH-WEO-PIEUP +0xCDC2 # HANGUL SYLLABLE CHIEUCH-WEO-PIEUPSIOS +0xCDC3 # HANGUL SYLLABLE CHIEUCH-WEO-SIOS +0xCDC4 # HANGUL SYLLABLE CHIEUCH-WEO-SSANGSIOS +0xCDC5 # HANGUL SYLLABLE CHIEUCH-WEO-IEUNG +0xCDC6 # HANGUL SYLLABLE CHIEUCH-WEO-CIEUC +0xCDC7 # HANGUL SYLLABLE CHIEUCH-WEO-CHIEUCH +0xCDC8 # HANGUL SYLLABLE CHIEUCH-WEO-KHIEUKH +0xCDC9 # HANGUL SYLLABLE CHIEUCH-WEO-THIEUTH +0xCDCA # HANGUL SYLLABLE CHIEUCH-WEO-PHIEUPH +0xCDCB # HANGUL SYLLABLE CHIEUCH-WEO-HIEUH +0xCDCC # HANGUL SYLLABLE CHIEUCH-WE +0xCDCD # HANGUL SYLLABLE CHIEUCH-WE-KIYEOK +0xCDCE # HANGUL SYLLABLE CHIEUCH-WE-SSANGKIYEOK +0xCDCF # HANGUL SYLLABLE CHIEUCH-WE-KIYEOKSIOS +0xCDD0 # HANGUL SYLLABLE CHIEUCH-WE-NIEUN +0xCDD1 # HANGUL SYLLABLE CHIEUCH-WE-NIEUNCIEUC +0xCDD2 # HANGUL SYLLABLE CHIEUCH-WE-NIEUNHIEUH +0xCDD3 # HANGUL SYLLABLE CHIEUCH-WE-TIKEUT +0xCDD4 # HANGUL SYLLABLE CHIEUCH-WE-RIEUL +0xCDD5 # HANGUL SYLLABLE CHIEUCH-WE-RIEULKIYEOK +0xCDD6 # HANGUL SYLLABLE CHIEUCH-WE-RIEULMIEUM +0xCDD7 # HANGUL SYLLABLE CHIEUCH-WE-RIEULPIEUP +0xCDD8 # HANGUL SYLLABLE CHIEUCH-WE-RIEULSIOS +0xCDD9 # HANGUL SYLLABLE CHIEUCH-WE-RIEULTHIEUTH +0xCDDA # HANGUL SYLLABLE CHIEUCH-WE-RIEULPHIEUPH +0xCDDB # HANGUL SYLLABLE CHIEUCH-WE-RIEULHIEUH +0xCDDC # HANGUL SYLLABLE CHIEUCH-WE-MIEUM +0xCDDD # HANGUL SYLLABLE CHIEUCH-WE-PIEUP +0xCDDE # HANGUL SYLLABLE CHIEUCH-WE-PIEUPSIOS +0xCDDF # HANGUL SYLLABLE CHIEUCH-WE-SIOS +0xCDE0 # HANGUL SYLLABLE CHIEUCH-WE-SSANGSIOS +0xCDE1 # HANGUL SYLLABLE CHIEUCH-WE-IEUNG +0xCDE2 # HANGUL SYLLABLE CHIEUCH-WE-CIEUC +0xCDE3 # HANGUL SYLLABLE CHIEUCH-WE-CHIEUCH +0xCDE4 # HANGUL SYLLABLE CHIEUCH-WE-KHIEUKH +0xCDE5 # HANGUL SYLLABLE CHIEUCH-WE-THIEUTH +0xCDE6 # HANGUL SYLLABLE CHIEUCH-WE-PHIEUPH +0xCDE7 # HANGUL SYLLABLE CHIEUCH-WE-HIEUH +0xCDE8 # HANGUL SYLLABLE CHIEUCH-WI +0xCDE9 # HANGUL SYLLABLE CHIEUCH-WI-KIYEOK +0xCDEA # HANGUL SYLLABLE CHIEUCH-WI-SSANGKIYEOK +0xCDEB # HANGUL SYLLABLE CHIEUCH-WI-KIYEOKSIOS +0xCDEC # HANGUL SYLLABLE CHIEUCH-WI-NIEUN +0xCDED # HANGUL SYLLABLE CHIEUCH-WI-NIEUNCIEUC +0xCDEE # HANGUL SYLLABLE CHIEUCH-WI-NIEUNHIEUH +0xCDEF # HANGUL SYLLABLE CHIEUCH-WI-TIKEUT +0xCDF0 # HANGUL SYLLABLE CHIEUCH-WI-RIEUL +0xCDF1 # HANGUL SYLLABLE CHIEUCH-WI-RIEULKIYEOK +0xCDF2 # HANGUL SYLLABLE CHIEUCH-WI-RIEULMIEUM +0xCDF3 # HANGUL SYLLABLE CHIEUCH-WI-RIEULPIEUP +0xCDF4 # HANGUL SYLLABLE CHIEUCH-WI-RIEULSIOS +0xCDF5 # HANGUL SYLLABLE CHIEUCH-WI-RIEULTHIEUTH +0xCDF6 # HANGUL SYLLABLE CHIEUCH-WI-RIEULPHIEUPH +0xCDF7 # HANGUL SYLLABLE CHIEUCH-WI-RIEULHIEUH +0xCDF8 # HANGUL SYLLABLE CHIEUCH-WI-MIEUM +0xCDF9 # HANGUL SYLLABLE CHIEUCH-WI-PIEUP +0xCDFA # HANGUL SYLLABLE CHIEUCH-WI-PIEUPSIOS +0xCDFB # HANGUL SYLLABLE CHIEUCH-WI-SIOS +0xCDFC # HANGUL SYLLABLE CHIEUCH-WI-SSANGSIOS +0xCDFD # HANGUL SYLLABLE CHIEUCH-WI-IEUNG +0xCDFE # HANGUL SYLLABLE CHIEUCH-WI-CIEUC +0xCDFF # HANGUL SYLLABLE CHIEUCH-WI-CHIEUCH +0xCE00 # HANGUL SYLLABLE CHIEUCH-WI-KHIEUKH +0xCE01 # HANGUL SYLLABLE CHIEUCH-WI-THIEUTH +0xCE02 # HANGUL SYLLABLE CHIEUCH-WI-PHIEUPH +0xCE03 # HANGUL SYLLABLE CHIEUCH-WI-HIEUH +0xCE04 # HANGUL SYLLABLE CHIEUCH-YU +0xCE05 # HANGUL SYLLABLE CHIEUCH-YU-KIYEOK +0xCE06 # HANGUL SYLLABLE CHIEUCH-YU-SSANGKIYEOK +0xCE07 # HANGUL SYLLABLE CHIEUCH-YU-KIYEOKSIOS +0xCE08 # HANGUL SYLLABLE CHIEUCH-YU-NIEUN +0xCE09 # HANGUL SYLLABLE CHIEUCH-YU-NIEUNCIEUC +0xCE0A # HANGUL SYLLABLE CHIEUCH-YU-NIEUNHIEUH +0xCE0B # HANGUL SYLLABLE CHIEUCH-YU-TIKEUT +0xCE0C # HANGUL SYLLABLE CHIEUCH-YU-RIEUL +0xCE0D # HANGUL SYLLABLE CHIEUCH-YU-RIEULKIYEOK +0xCE0E # HANGUL SYLLABLE CHIEUCH-YU-RIEULMIEUM +0xCE0F # HANGUL SYLLABLE CHIEUCH-YU-RIEULPIEUP +0xCE10 # HANGUL SYLLABLE CHIEUCH-YU-RIEULSIOS +0xCE11 # HANGUL SYLLABLE CHIEUCH-YU-RIEULTHIEUTH +0xCE12 # HANGUL SYLLABLE CHIEUCH-YU-RIEULPHIEUPH +0xCE13 # HANGUL SYLLABLE CHIEUCH-YU-RIEULHIEUH +0xCE14 # HANGUL SYLLABLE CHIEUCH-YU-MIEUM +0xCE15 # HANGUL SYLLABLE CHIEUCH-YU-PIEUP +0xCE16 # HANGUL SYLLABLE CHIEUCH-YU-PIEUPSIOS +0xCE17 # HANGUL SYLLABLE CHIEUCH-YU-SIOS +0xCE18 # HANGUL SYLLABLE CHIEUCH-YU-SSANGSIOS +0xCE19 # HANGUL SYLLABLE CHIEUCH-YU-IEUNG +0xCE1A # HANGUL SYLLABLE CHIEUCH-YU-CIEUC +0xCE1B # HANGUL SYLLABLE CHIEUCH-YU-CHIEUCH +0xCE1C # HANGUL SYLLABLE CHIEUCH-YU-KHIEUKH +0xCE1D # HANGUL SYLLABLE CHIEUCH-YU-THIEUTH +0xCE1E # HANGUL SYLLABLE CHIEUCH-YU-PHIEUPH +0xCE1F # HANGUL SYLLABLE CHIEUCH-YU-HIEUH +0xCE20 # HANGUL SYLLABLE CHIEUCH-EU +0xCE21 # HANGUL SYLLABLE CHIEUCH-EU-KIYEOK +0xCE22 # HANGUL SYLLABLE CHIEUCH-EU-SSANGKIYEOK +0xCE23 # HANGUL SYLLABLE CHIEUCH-EU-KIYEOKSIOS +0xCE24 # HANGUL SYLLABLE CHIEUCH-EU-NIEUN +0xCE25 # HANGUL SYLLABLE CHIEUCH-EU-NIEUNCIEUC +0xCE26 # HANGUL SYLLABLE CHIEUCH-EU-NIEUNHIEUH +0xCE27 # HANGUL SYLLABLE CHIEUCH-EU-TIKEUT +0xCE28 # HANGUL SYLLABLE CHIEUCH-EU-RIEUL +0xCE29 # HANGUL SYLLABLE CHIEUCH-EU-RIEULKIYEOK +0xCE2A # HANGUL SYLLABLE CHIEUCH-EU-RIEULMIEUM +0xCE2B # HANGUL SYLLABLE CHIEUCH-EU-RIEULPIEUP +0xCE2C # HANGUL SYLLABLE CHIEUCH-EU-RIEULSIOS +0xCE2D # HANGUL SYLLABLE CHIEUCH-EU-RIEULTHIEUTH +0xCE2E # HANGUL SYLLABLE CHIEUCH-EU-RIEULPHIEUPH +0xCE2F # HANGUL SYLLABLE CHIEUCH-EU-RIEULHIEUH +0xCE30 # HANGUL SYLLABLE CHIEUCH-EU-MIEUM +0xCE31 # HANGUL SYLLABLE CHIEUCH-EU-PIEUP +0xCE32 # HANGUL SYLLABLE CHIEUCH-EU-PIEUPSIOS +0xCE33 # HANGUL SYLLABLE CHIEUCH-EU-SIOS +0xCE34 # HANGUL SYLLABLE CHIEUCH-EU-SSANGSIOS +0xCE35 # HANGUL SYLLABLE CHIEUCH-EU-IEUNG +0xCE36 # HANGUL SYLLABLE CHIEUCH-EU-CIEUC +0xCE37 # HANGUL SYLLABLE CHIEUCH-EU-CHIEUCH +0xCE38 # HANGUL SYLLABLE CHIEUCH-EU-KHIEUKH +0xCE39 # HANGUL SYLLABLE CHIEUCH-EU-THIEUTH +0xCE3A # HANGUL SYLLABLE CHIEUCH-EU-PHIEUPH +0xCE3B # HANGUL SYLLABLE CHIEUCH-EU-HIEUH +0xCE3C # HANGUL SYLLABLE CHIEUCH-YI +0xCE3D # HANGUL SYLLABLE CHIEUCH-YI-KIYEOK +0xCE3E # HANGUL SYLLABLE CHIEUCH-YI-SSANGKIYEOK +0xCE3F # HANGUL SYLLABLE CHIEUCH-YI-KIYEOKSIOS +0xCE40 # HANGUL SYLLABLE CHIEUCH-YI-NIEUN +0xCE41 # HANGUL SYLLABLE CHIEUCH-YI-NIEUNCIEUC +0xCE42 # HANGUL SYLLABLE CHIEUCH-YI-NIEUNHIEUH +0xCE43 # HANGUL SYLLABLE CHIEUCH-YI-TIKEUT +0xCE44 # HANGUL SYLLABLE CHIEUCH-YI-RIEUL +0xCE45 # HANGUL SYLLABLE CHIEUCH-YI-RIEULKIYEOK +0xCE46 # HANGUL SYLLABLE CHIEUCH-YI-RIEULMIEUM +0xCE47 # HANGUL SYLLABLE CHIEUCH-YI-RIEULPIEUP +0xCE48 # HANGUL SYLLABLE CHIEUCH-YI-RIEULSIOS +0xCE49 # HANGUL SYLLABLE CHIEUCH-YI-RIEULTHIEUTH +0xCE4A # HANGUL SYLLABLE CHIEUCH-YI-RIEULPHIEUPH +0xCE4B # HANGUL SYLLABLE CHIEUCH-YI-RIEULHIEUH +0xCE4C # HANGUL SYLLABLE CHIEUCH-YI-MIEUM +0xCE4D # HANGUL SYLLABLE CHIEUCH-YI-PIEUP +0xCE4E # HANGUL SYLLABLE CHIEUCH-YI-PIEUPSIOS +0xCE4F # HANGUL SYLLABLE CHIEUCH-YI-SIOS +0xCE50 # HANGUL SYLLABLE CHIEUCH-YI-SSANGSIOS +0xCE51 # HANGUL SYLLABLE CHIEUCH-YI-IEUNG +0xCE52 # HANGUL SYLLABLE CHIEUCH-YI-CIEUC +0xCE53 # HANGUL SYLLABLE CHIEUCH-YI-CHIEUCH +0xCE54 # HANGUL SYLLABLE CHIEUCH-YI-KHIEUKH +0xCE55 # HANGUL SYLLABLE CHIEUCH-YI-THIEUTH +0xCE56 # HANGUL SYLLABLE CHIEUCH-YI-PHIEUPH +0xCE57 # HANGUL SYLLABLE CHIEUCH-YI-HIEUH +0xCE58 # HANGUL SYLLABLE CHIEUCH-I +0xCE59 # HANGUL SYLLABLE CHIEUCH-I-KIYEOK +0xCE5A # HANGUL SYLLABLE CHIEUCH-I-SSANGKIYEOK +0xCE5B # HANGUL SYLLABLE CHIEUCH-I-KIYEOKSIOS +0xCE5C # HANGUL SYLLABLE CHIEUCH-I-NIEUN +0xCE5D # HANGUL SYLLABLE CHIEUCH-I-NIEUNCIEUC +0xCE5E # HANGUL SYLLABLE CHIEUCH-I-NIEUNHIEUH +0xCE5F # HANGUL SYLLABLE CHIEUCH-I-TIKEUT +0xCE60 # HANGUL SYLLABLE CHIEUCH-I-RIEUL +0xCE61 # HANGUL SYLLABLE CHIEUCH-I-RIEULKIYEOK +0xCE62 # HANGUL SYLLABLE CHIEUCH-I-RIEULMIEUM +0xCE63 # HANGUL SYLLABLE CHIEUCH-I-RIEULPIEUP +0xCE64 # HANGUL SYLLABLE CHIEUCH-I-RIEULSIOS +0xCE65 # HANGUL SYLLABLE CHIEUCH-I-RIEULTHIEUTH +0xCE66 # HANGUL SYLLABLE CHIEUCH-I-RIEULPHIEUPH +0xCE67 # HANGUL SYLLABLE CHIEUCH-I-RIEULHIEUH +0xCE68 # HANGUL SYLLABLE CHIEUCH-I-MIEUM +0xCE69 # HANGUL SYLLABLE CHIEUCH-I-PIEUP +0xCE6A # HANGUL SYLLABLE CHIEUCH-I-PIEUPSIOS +0xCE6B # HANGUL SYLLABLE CHIEUCH-I-SIOS +0xCE6C # HANGUL SYLLABLE CHIEUCH-I-SSANGSIOS +0xCE6D # HANGUL SYLLABLE CHIEUCH-I-IEUNG +0xCE6E # HANGUL SYLLABLE CHIEUCH-I-CIEUC +0xCE6F # HANGUL SYLLABLE CHIEUCH-I-CHIEUCH +0xCE70 # HANGUL SYLLABLE CHIEUCH-I-KHIEUKH +0xCE71 # HANGUL SYLLABLE CHIEUCH-I-THIEUTH +0xCE72 # HANGUL SYLLABLE CHIEUCH-I-PHIEUPH +0xCE73 # HANGUL SYLLABLE CHIEUCH-I-HIEUH +0xCE74 # HANGUL SYLLABLE KHIEUKH-A +0xCE75 # HANGUL SYLLABLE KHIEUKH-A-KIYEOK +0xCE76 # HANGUL SYLLABLE KHIEUKH-A-SSANGKIYEOK +0xCE77 # HANGUL SYLLABLE KHIEUKH-A-KIYEOKSIOS +0xCE78 # HANGUL SYLLABLE KHIEUKH-A-NIEUN +0xCE79 # HANGUL SYLLABLE KHIEUKH-A-NIEUNCIEUC +0xCE7A # HANGUL SYLLABLE KHIEUKH-A-NIEUNHIEUH +0xCE7B # HANGUL SYLLABLE KHIEUKH-A-TIKEUT +0xCE7C # HANGUL SYLLABLE KHIEUKH-A-RIEUL +0xCE7D # HANGUL SYLLABLE KHIEUKH-A-RIEULKIYEOK +0xCE7E # HANGUL SYLLABLE KHIEUKH-A-RIEULMIEUM +0xCE7F # HANGUL SYLLABLE KHIEUKH-A-RIEULPIEUP +0xCE80 # HANGUL SYLLABLE KHIEUKH-A-RIEULSIOS +0xCE81 # HANGUL SYLLABLE KHIEUKH-A-RIEULTHIEUTH +0xCE82 # HANGUL SYLLABLE KHIEUKH-A-RIEULPHIEUPH +0xCE83 # HANGUL SYLLABLE KHIEUKH-A-RIEULHIEUH +0xCE84 # HANGUL SYLLABLE KHIEUKH-A-MIEUM +0xCE85 # HANGUL SYLLABLE KHIEUKH-A-PIEUP +0xCE86 # HANGUL SYLLABLE KHIEUKH-A-PIEUPSIOS +0xCE87 # HANGUL SYLLABLE KHIEUKH-A-SIOS +0xCE88 # HANGUL SYLLABLE KHIEUKH-A-SSANGSIOS +0xCE89 # HANGUL SYLLABLE KHIEUKH-A-IEUNG +0xCE8A # HANGUL SYLLABLE KHIEUKH-A-CIEUC +0xCE8B # HANGUL SYLLABLE KHIEUKH-A-CHIEUCH +0xCE8C # HANGUL SYLLABLE KHIEUKH-A-KHIEUKH +0xCE8D # HANGUL SYLLABLE KHIEUKH-A-THIEUTH +0xCE8E # HANGUL SYLLABLE KHIEUKH-A-PHIEUPH +0xCE8F # HANGUL SYLLABLE KHIEUKH-A-HIEUH +0xCE90 # HANGUL SYLLABLE KHIEUKH-AE +0xCE91 # HANGUL SYLLABLE KHIEUKH-AE-KIYEOK +0xCE92 # HANGUL SYLLABLE KHIEUKH-AE-SSANGKIYEOK +0xCE93 # HANGUL SYLLABLE KHIEUKH-AE-KIYEOKSIOS +0xCE94 # HANGUL SYLLABLE KHIEUKH-AE-NIEUN +0xCE95 # HANGUL SYLLABLE KHIEUKH-AE-NIEUNCIEUC +0xCE96 # HANGUL SYLLABLE KHIEUKH-AE-NIEUNHIEUH +0xCE97 # HANGUL SYLLABLE KHIEUKH-AE-TIKEUT +0xCE98 # HANGUL SYLLABLE KHIEUKH-AE-RIEUL +0xCE99 # HANGUL SYLLABLE KHIEUKH-AE-RIEULKIYEOK +0xCE9A # HANGUL SYLLABLE KHIEUKH-AE-RIEULMIEUM +0xCE9B # HANGUL SYLLABLE KHIEUKH-AE-RIEULPIEUP +0xCE9C # HANGUL SYLLABLE KHIEUKH-AE-RIEULSIOS +0xCE9D # HANGUL SYLLABLE KHIEUKH-AE-RIEULTHIEUTH +0xCE9E # HANGUL SYLLABLE KHIEUKH-AE-RIEULPHIEUPH +0xCE9F # HANGUL SYLLABLE KHIEUKH-AE-RIEULHIEUH +0xCEA0 # HANGUL SYLLABLE KHIEUKH-AE-MIEUM +0xCEA1 # HANGUL SYLLABLE KHIEUKH-AE-PIEUP +0xCEA2 # HANGUL SYLLABLE KHIEUKH-AE-PIEUPSIOS +0xCEA3 # HANGUL SYLLABLE KHIEUKH-AE-SIOS +0xCEA4 # HANGUL SYLLABLE KHIEUKH-AE-SSANGSIOS +0xCEA5 # HANGUL SYLLABLE KHIEUKH-AE-IEUNG +0xCEA6 # HANGUL SYLLABLE KHIEUKH-AE-CIEUC +0xCEA7 # HANGUL SYLLABLE KHIEUKH-AE-CHIEUCH +0xCEA8 # HANGUL SYLLABLE KHIEUKH-AE-KHIEUKH +0xCEA9 # HANGUL SYLLABLE KHIEUKH-AE-THIEUTH +0xCEAA # HANGUL SYLLABLE KHIEUKH-AE-PHIEUPH +0xCEAB # HANGUL SYLLABLE KHIEUKH-AE-HIEUH +0xCEAC # HANGUL SYLLABLE KHIEUKH-YA +0xCEAD # HANGUL SYLLABLE KHIEUKH-YA-KIYEOK +0xCEAE # HANGUL SYLLABLE KHIEUKH-YA-SSANGKIYEOK +0xCEAF # HANGUL SYLLABLE KHIEUKH-YA-KIYEOKSIOS +0xCEB0 # HANGUL SYLLABLE KHIEUKH-YA-NIEUN +0xCEB1 # HANGUL SYLLABLE KHIEUKH-YA-NIEUNCIEUC +0xCEB2 # HANGUL SYLLABLE KHIEUKH-YA-NIEUNHIEUH +0xCEB3 # HANGUL SYLLABLE KHIEUKH-YA-TIKEUT +0xCEB4 # HANGUL SYLLABLE KHIEUKH-YA-RIEUL +0xCEB5 # HANGUL SYLLABLE KHIEUKH-YA-RIEULKIYEOK +0xCEB6 # HANGUL SYLLABLE KHIEUKH-YA-RIEULMIEUM +0xCEB7 # HANGUL SYLLABLE KHIEUKH-YA-RIEULPIEUP +0xCEB8 # HANGUL SYLLABLE KHIEUKH-YA-RIEULSIOS +0xCEB9 # HANGUL SYLLABLE KHIEUKH-YA-RIEULTHIEUTH +0xCEBA # HANGUL SYLLABLE KHIEUKH-YA-RIEULPHIEUPH +0xCEBB # HANGUL SYLLABLE KHIEUKH-YA-RIEULHIEUH +0xCEBC # HANGUL SYLLABLE KHIEUKH-YA-MIEUM +0xCEBD # HANGUL SYLLABLE KHIEUKH-YA-PIEUP +0xCEBE # HANGUL SYLLABLE KHIEUKH-YA-PIEUPSIOS +0xCEBF # HANGUL SYLLABLE KHIEUKH-YA-SIOS +0xCEC0 # HANGUL SYLLABLE KHIEUKH-YA-SSANGSIOS +0xCEC1 # HANGUL SYLLABLE KHIEUKH-YA-IEUNG +0xCEC2 # HANGUL SYLLABLE KHIEUKH-YA-CIEUC +0xCEC3 # HANGUL SYLLABLE KHIEUKH-YA-CHIEUCH +0xCEC4 # HANGUL SYLLABLE KHIEUKH-YA-KHIEUKH +0xCEC5 # HANGUL SYLLABLE KHIEUKH-YA-THIEUTH +0xCEC6 # HANGUL SYLLABLE KHIEUKH-YA-PHIEUPH +0xCEC7 # HANGUL SYLLABLE KHIEUKH-YA-HIEUH +0xCEC8 # HANGUL SYLLABLE KHIEUKH-YAE +0xCEC9 # HANGUL SYLLABLE KHIEUKH-YAE-KIYEOK +0xCECA # HANGUL SYLLABLE KHIEUKH-YAE-SSANGKIYEOK +0xCECB # HANGUL SYLLABLE KHIEUKH-YAE-KIYEOKSIOS +0xCECC # HANGUL SYLLABLE KHIEUKH-YAE-NIEUN +0xCECD # HANGUL SYLLABLE KHIEUKH-YAE-NIEUNCIEUC +0xCECE # HANGUL SYLLABLE KHIEUKH-YAE-NIEUNHIEUH +0xCECF # HANGUL SYLLABLE KHIEUKH-YAE-TIKEUT +0xCED0 # HANGUL SYLLABLE KHIEUKH-YAE-RIEUL +0xCED1 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULKIYEOK +0xCED2 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULMIEUM +0xCED3 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULPIEUP +0xCED4 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULSIOS +0xCED5 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULTHIEUTH +0xCED6 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULPHIEUPH +0xCED7 # HANGUL SYLLABLE KHIEUKH-YAE-RIEULHIEUH +0xCED8 # HANGUL SYLLABLE KHIEUKH-YAE-MIEUM +0xCED9 # HANGUL SYLLABLE KHIEUKH-YAE-PIEUP +0xCEDA # HANGUL SYLLABLE KHIEUKH-YAE-PIEUPSIOS +0xCEDB # HANGUL SYLLABLE KHIEUKH-YAE-SIOS +0xCEDC # HANGUL SYLLABLE KHIEUKH-YAE-SSANGSIOS +0xCEDD # HANGUL SYLLABLE KHIEUKH-YAE-IEUNG +0xCEDE # HANGUL SYLLABLE KHIEUKH-YAE-CIEUC +0xCEDF # HANGUL SYLLABLE KHIEUKH-YAE-CHIEUCH +0xCEE0 # HANGUL SYLLABLE KHIEUKH-YAE-KHIEUKH +0xCEE1 # HANGUL SYLLABLE KHIEUKH-YAE-THIEUTH +0xCEE2 # HANGUL SYLLABLE KHIEUKH-YAE-PHIEUPH +0xCEE3 # HANGUL SYLLABLE KHIEUKH-YAE-HIEUH +0xCEE4 # HANGUL SYLLABLE KHIEUKH-EO +0xCEE5 # HANGUL SYLLABLE KHIEUKH-EO-KIYEOK +0xCEE6 # HANGUL SYLLABLE KHIEUKH-EO-SSANGKIYEOK +0xCEE7 # HANGUL SYLLABLE KHIEUKH-EO-KIYEOKSIOS +0xCEE8 # HANGUL SYLLABLE KHIEUKH-EO-NIEUN +0xCEE9 # HANGUL SYLLABLE KHIEUKH-EO-NIEUNCIEUC +0xCEEA # HANGUL SYLLABLE KHIEUKH-EO-NIEUNHIEUH +0xCEEB # HANGUL SYLLABLE KHIEUKH-EO-TIKEUT +0xCEEC # HANGUL SYLLABLE KHIEUKH-EO-RIEUL +0xCEED # HANGUL SYLLABLE KHIEUKH-EO-RIEULKIYEOK +0xCEEE # HANGUL SYLLABLE KHIEUKH-EO-RIEULMIEUM +0xCEEF # HANGUL SYLLABLE KHIEUKH-EO-RIEULPIEUP +0xCEF0 # HANGUL SYLLABLE KHIEUKH-EO-RIEULSIOS +0xCEF1 # HANGUL SYLLABLE KHIEUKH-EO-RIEULTHIEUTH +0xCEF2 # HANGUL SYLLABLE KHIEUKH-EO-RIEULPHIEUPH +0xCEF3 # HANGUL SYLLABLE KHIEUKH-EO-RIEULHIEUH +0xCEF4 # HANGUL SYLLABLE KHIEUKH-EO-MIEUM +0xCEF5 # HANGUL SYLLABLE KHIEUKH-EO-PIEUP +0xCEF6 # HANGUL SYLLABLE KHIEUKH-EO-PIEUPSIOS +0xCEF7 # HANGUL SYLLABLE KHIEUKH-EO-SIOS +0xCEF8 # HANGUL SYLLABLE KHIEUKH-EO-SSANGSIOS +0xCEF9 # HANGUL SYLLABLE KHIEUKH-EO-IEUNG +0xCEFA # HANGUL SYLLABLE KHIEUKH-EO-CIEUC +0xCEFB # HANGUL SYLLABLE KHIEUKH-EO-CHIEUCH +0xCEFC # HANGUL SYLLABLE KHIEUKH-EO-KHIEUKH +0xCEFD # HANGUL SYLLABLE KHIEUKH-EO-THIEUTH +0xCEFE # HANGUL SYLLABLE KHIEUKH-EO-PHIEUPH +0xCEFF # HANGUL SYLLABLE KHIEUKH-EO-HIEUH +0xCF00 # HANGUL SYLLABLE KHIEUKH-E +0xCF01 # HANGUL SYLLABLE KHIEUKH-E-KIYEOK +0xCF02 # HANGUL SYLLABLE KHIEUKH-E-SSANGKIYEOK +0xCF03 # HANGUL SYLLABLE KHIEUKH-E-KIYEOKSIOS +0xCF04 # HANGUL SYLLABLE KHIEUKH-E-NIEUN +0xCF05 # HANGUL SYLLABLE KHIEUKH-E-NIEUNCIEUC +0xCF06 # HANGUL SYLLABLE KHIEUKH-E-NIEUNHIEUH +0xCF07 # HANGUL SYLLABLE KHIEUKH-E-TIKEUT +0xCF08 # HANGUL SYLLABLE KHIEUKH-E-RIEUL +0xCF09 # HANGUL SYLLABLE KHIEUKH-E-RIEULKIYEOK +0xCF0A # HANGUL SYLLABLE KHIEUKH-E-RIEULMIEUM +0xCF0B # HANGUL SYLLABLE KHIEUKH-E-RIEULPIEUP +0xCF0C # HANGUL SYLLABLE KHIEUKH-E-RIEULSIOS +0xCF0D # HANGUL SYLLABLE KHIEUKH-E-RIEULTHIEUTH +0xCF0E # HANGUL SYLLABLE KHIEUKH-E-RIEULPHIEUPH +0xCF0F # HANGUL SYLLABLE KHIEUKH-E-RIEULHIEUH +0xCF10 # HANGUL SYLLABLE KHIEUKH-E-MIEUM +0xCF11 # HANGUL SYLLABLE KHIEUKH-E-PIEUP +0xCF12 # HANGUL SYLLABLE KHIEUKH-E-PIEUPSIOS +0xCF13 # HANGUL SYLLABLE KHIEUKH-E-SIOS +0xCF14 # HANGUL SYLLABLE KHIEUKH-E-SSANGSIOS +0xCF15 # HANGUL SYLLABLE KHIEUKH-E-IEUNG +0xCF16 # HANGUL SYLLABLE KHIEUKH-E-CIEUC +0xCF17 # HANGUL SYLLABLE KHIEUKH-E-CHIEUCH +0xCF18 # HANGUL SYLLABLE KHIEUKH-E-KHIEUKH +0xCF19 # HANGUL SYLLABLE KHIEUKH-E-THIEUTH +0xCF1A # HANGUL SYLLABLE KHIEUKH-E-PHIEUPH +0xCF1B # HANGUL SYLLABLE KHIEUKH-E-HIEUH +0xCF1C # HANGUL SYLLABLE KHIEUKH-YEO +0xCF1D # HANGUL SYLLABLE KHIEUKH-YEO-KIYEOK +0xCF1E # HANGUL SYLLABLE KHIEUKH-YEO-SSANGKIYEOK +0xCF1F # HANGUL SYLLABLE KHIEUKH-YEO-KIYEOKSIOS +0xCF20 # HANGUL SYLLABLE KHIEUKH-YEO-NIEUN +0xCF21 # HANGUL SYLLABLE KHIEUKH-YEO-NIEUNCIEUC +0xCF22 # HANGUL SYLLABLE KHIEUKH-YEO-NIEUNHIEUH +0xCF23 # HANGUL SYLLABLE KHIEUKH-YEO-TIKEUT +0xCF24 # HANGUL SYLLABLE KHIEUKH-YEO-RIEUL +0xCF25 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULKIYEOK +0xCF26 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULMIEUM +0xCF27 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULPIEUP +0xCF28 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULSIOS +0xCF29 # HANGUL SYLLABLE KHIEUKH-YEO-RIEULTHIEUTH +0xCF2A # HANGUL SYLLABLE KHIEUKH-YEO-RIEULPHIEUPH +0xCF2B # HANGUL SYLLABLE KHIEUKH-YEO-RIEULHIEUH +0xCF2C # HANGUL SYLLABLE KHIEUKH-YEO-MIEUM +0xCF2D # HANGUL SYLLABLE KHIEUKH-YEO-PIEUP +0xCF2E # HANGUL SYLLABLE KHIEUKH-YEO-PIEUPSIOS +0xCF2F # HANGUL SYLLABLE KHIEUKH-YEO-SIOS +0xCF30 # HANGUL SYLLABLE KHIEUKH-YEO-SSANGSIOS +0xCF31 # HANGUL SYLLABLE KHIEUKH-YEO-IEUNG +0xCF32 # HANGUL SYLLABLE KHIEUKH-YEO-CIEUC +0xCF33 # HANGUL SYLLABLE KHIEUKH-YEO-CHIEUCH +0xCF34 # HANGUL SYLLABLE KHIEUKH-YEO-KHIEUKH +0xCF35 # HANGUL SYLLABLE KHIEUKH-YEO-THIEUTH +0xCF36 # HANGUL SYLLABLE KHIEUKH-YEO-PHIEUPH +0xCF37 # HANGUL SYLLABLE KHIEUKH-YEO-HIEUH +0xCF38 # HANGUL SYLLABLE KHIEUKH-YE +0xCF39 # HANGUL SYLLABLE KHIEUKH-YE-KIYEOK +0xCF3A # HANGUL SYLLABLE KHIEUKH-YE-SSANGKIYEOK +0xCF3B # HANGUL SYLLABLE KHIEUKH-YE-KIYEOKSIOS +0xCF3C # HANGUL SYLLABLE KHIEUKH-YE-NIEUN +0xCF3D # HANGUL SYLLABLE KHIEUKH-YE-NIEUNCIEUC +0xCF3E # HANGUL SYLLABLE KHIEUKH-YE-NIEUNHIEUH +0xCF3F # HANGUL SYLLABLE KHIEUKH-YE-TIKEUT +0xCF40 # HANGUL SYLLABLE KHIEUKH-YE-RIEUL +0xCF41 # HANGUL SYLLABLE KHIEUKH-YE-RIEULKIYEOK +0xCF42 # HANGUL SYLLABLE KHIEUKH-YE-RIEULMIEUM +0xCF43 # HANGUL SYLLABLE KHIEUKH-YE-RIEULPIEUP +0xCF44 # HANGUL SYLLABLE KHIEUKH-YE-RIEULSIOS +0xCF45 # HANGUL SYLLABLE KHIEUKH-YE-RIEULTHIEUTH +0xCF46 # HANGUL SYLLABLE KHIEUKH-YE-RIEULPHIEUPH +0xCF47 # HANGUL SYLLABLE KHIEUKH-YE-RIEULHIEUH +0xCF48 # HANGUL SYLLABLE KHIEUKH-YE-MIEUM +0xCF49 # HANGUL SYLLABLE KHIEUKH-YE-PIEUP +0xCF4A # HANGUL SYLLABLE KHIEUKH-YE-PIEUPSIOS +0xCF4B # HANGUL SYLLABLE KHIEUKH-YE-SIOS +0xCF4C # HANGUL SYLLABLE KHIEUKH-YE-SSANGSIOS +0xCF4D # HANGUL SYLLABLE KHIEUKH-YE-IEUNG +0xCF4E # HANGUL SYLLABLE KHIEUKH-YE-CIEUC +0xCF4F # HANGUL SYLLABLE KHIEUKH-YE-CHIEUCH +0xCF50 # HANGUL SYLLABLE KHIEUKH-YE-KHIEUKH +0xCF51 # HANGUL SYLLABLE KHIEUKH-YE-THIEUTH +0xCF52 # HANGUL SYLLABLE KHIEUKH-YE-PHIEUPH +0xCF53 # HANGUL SYLLABLE KHIEUKH-YE-HIEUH +0xCF54 # HANGUL SYLLABLE KHIEUKH-O +0xCF55 # HANGUL SYLLABLE KHIEUKH-O-KIYEOK +0xCF56 # HANGUL SYLLABLE KHIEUKH-O-SSANGKIYEOK +0xCF57 # HANGUL SYLLABLE KHIEUKH-O-KIYEOKSIOS +0xCF58 # HANGUL SYLLABLE KHIEUKH-O-NIEUN +0xCF59 # HANGUL SYLLABLE KHIEUKH-O-NIEUNCIEUC +0xCF5A # HANGUL SYLLABLE KHIEUKH-O-NIEUNHIEUH +0xCF5B # HANGUL SYLLABLE KHIEUKH-O-TIKEUT +0xCF5C # HANGUL SYLLABLE KHIEUKH-O-RIEUL +0xCF5D # HANGUL SYLLABLE KHIEUKH-O-RIEULKIYEOK +0xCF5E # HANGUL SYLLABLE KHIEUKH-O-RIEULMIEUM +0xCF5F # HANGUL SYLLABLE KHIEUKH-O-RIEULPIEUP +0xCF60 # HANGUL SYLLABLE KHIEUKH-O-RIEULSIOS +0xCF61 # HANGUL SYLLABLE KHIEUKH-O-RIEULTHIEUTH +0xCF62 # HANGUL SYLLABLE KHIEUKH-O-RIEULPHIEUPH +0xCF63 # HANGUL SYLLABLE KHIEUKH-O-RIEULHIEUH +0xCF64 # HANGUL SYLLABLE KHIEUKH-O-MIEUM +0xCF65 # HANGUL SYLLABLE KHIEUKH-O-PIEUP +0xCF66 # HANGUL SYLLABLE KHIEUKH-O-PIEUPSIOS +0xCF67 # HANGUL SYLLABLE KHIEUKH-O-SIOS +0xCF68 # HANGUL SYLLABLE KHIEUKH-O-SSANGSIOS +0xCF69 # HANGUL SYLLABLE KHIEUKH-O-IEUNG +0xCF6A # HANGUL SYLLABLE KHIEUKH-O-CIEUC +0xCF6B # HANGUL SYLLABLE KHIEUKH-O-CHIEUCH +0xCF6C # HANGUL SYLLABLE KHIEUKH-O-KHIEUKH +0xCF6D # HANGUL SYLLABLE KHIEUKH-O-THIEUTH +0xCF6E # HANGUL SYLLABLE KHIEUKH-O-PHIEUPH +0xCF6F # HANGUL SYLLABLE KHIEUKH-O-HIEUH +0xCF70 # HANGUL SYLLABLE KHIEUKH-WA +0xCF71 # HANGUL SYLLABLE KHIEUKH-WA-KIYEOK +0xCF72 # HANGUL SYLLABLE KHIEUKH-WA-SSANGKIYEOK +0xCF73 # HANGUL SYLLABLE KHIEUKH-WA-KIYEOKSIOS +0xCF74 # HANGUL SYLLABLE KHIEUKH-WA-NIEUN +0xCF75 # HANGUL SYLLABLE KHIEUKH-WA-NIEUNCIEUC +0xCF76 # HANGUL SYLLABLE KHIEUKH-WA-NIEUNHIEUH +0xCF77 # HANGUL SYLLABLE KHIEUKH-WA-TIKEUT +0xCF78 # HANGUL SYLLABLE KHIEUKH-WA-RIEUL +0xCF79 # HANGUL SYLLABLE KHIEUKH-WA-RIEULKIYEOK +0xCF7A # HANGUL SYLLABLE KHIEUKH-WA-RIEULMIEUM +0xCF7B # HANGUL SYLLABLE KHIEUKH-WA-RIEULPIEUP +0xCF7C # HANGUL SYLLABLE KHIEUKH-WA-RIEULSIOS +0xCF7D # HANGUL SYLLABLE KHIEUKH-WA-RIEULTHIEUTH +0xCF7E # HANGUL SYLLABLE KHIEUKH-WA-RIEULPHIEUPH +0xCF7F # HANGUL SYLLABLE KHIEUKH-WA-RIEULHIEUH +0xCF80 # HANGUL SYLLABLE KHIEUKH-WA-MIEUM +0xCF81 # HANGUL SYLLABLE KHIEUKH-WA-PIEUP +0xCF82 # HANGUL SYLLABLE KHIEUKH-WA-PIEUPSIOS +0xCF83 # HANGUL SYLLABLE KHIEUKH-WA-SIOS +0xCF84 # HANGUL SYLLABLE KHIEUKH-WA-SSANGSIOS +0xCF85 # HANGUL SYLLABLE KHIEUKH-WA-IEUNG +0xCF86 # HANGUL SYLLABLE KHIEUKH-WA-CIEUC +0xCF87 # HANGUL SYLLABLE KHIEUKH-WA-CHIEUCH +0xCF88 # HANGUL SYLLABLE KHIEUKH-WA-KHIEUKH +0xCF89 # HANGUL SYLLABLE KHIEUKH-WA-THIEUTH +0xCF8A # HANGUL SYLLABLE KHIEUKH-WA-PHIEUPH +0xCF8B # HANGUL SYLLABLE KHIEUKH-WA-HIEUH +0xCF8C # HANGUL SYLLABLE KHIEUKH-WAE +0xCF8D # HANGUL SYLLABLE KHIEUKH-WAE-KIYEOK +0xCF8E # HANGUL SYLLABLE KHIEUKH-WAE-SSANGKIYEOK +0xCF8F # HANGUL SYLLABLE KHIEUKH-WAE-KIYEOKSIOS +0xCF90 # HANGUL SYLLABLE KHIEUKH-WAE-NIEUN +0xCF91 # HANGUL SYLLABLE KHIEUKH-WAE-NIEUNCIEUC +0xCF92 # HANGUL SYLLABLE KHIEUKH-WAE-NIEUNHIEUH +0xCF93 # HANGUL SYLLABLE KHIEUKH-WAE-TIKEUT +0xCF94 # HANGUL SYLLABLE KHIEUKH-WAE-RIEUL +0xCF95 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULKIYEOK +0xCF96 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULMIEUM +0xCF97 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULPIEUP +0xCF98 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULSIOS +0xCF99 # HANGUL SYLLABLE KHIEUKH-WAE-RIEULTHIEUTH +0xCF9A # HANGUL SYLLABLE KHIEUKH-WAE-RIEULPHIEUPH +0xCF9B # HANGUL SYLLABLE KHIEUKH-WAE-RIEULHIEUH +0xCF9C # HANGUL SYLLABLE KHIEUKH-WAE-MIEUM +0xCF9D # HANGUL SYLLABLE KHIEUKH-WAE-PIEUP +0xCF9E # HANGUL SYLLABLE KHIEUKH-WAE-PIEUPSIOS +0xCF9F # HANGUL SYLLABLE KHIEUKH-WAE-SIOS +0xCFA0 # HANGUL SYLLABLE KHIEUKH-WAE-SSANGSIOS +0xCFA1 # HANGUL SYLLABLE KHIEUKH-WAE-IEUNG +0xCFA2 # HANGUL SYLLABLE KHIEUKH-WAE-CIEUC +0xCFA3 # HANGUL SYLLABLE KHIEUKH-WAE-CHIEUCH +0xCFA4 # HANGUL SYLLABLE KHIEUKH-WAE-KHIEUKH +0xCFA5 # HANGUL SYLLABLE KHIEUKH-WAE-THIEUTH +0xCFA6 # HANGUL SYLLABLE KHIEUKH-WAE-PHIEUPH +0xCFA7 # HANGUL SYLLABLE KHIEUKH-WAE-HIEUH +0xCFA8 # HANGUL SYLLABLE KHIEUKH-OE +0xCFA9 # HANGUL SYLLABLE KHIEUKH-OE-KIYEOK +0xCFAA # HANGUL SYLLABLE KHIEUKH-OE-SSANGKIYEOK +0xCFAB # HANGUL SYLLABLE KHIEUKH-OE-KIYEOKSIOS +0xCFAC # HANGUL SYLLABLE KHIEUKH-OE-NIEUN +0xCFAD # HANGUL SYLLABLE KHIEUKH-OE-NIEUNCIEUC +0xCFAE # HANGUL SYLLABLE KHIEUKH-OE-NIEUNHIEUH +0xCFAF # HANGUL SYLLABLE KHIEUKH-OE-TIKEUT +0xCFB0 # HANGUL SYLLABLE KHIEUKH-OE-RIEUL +0xCFB1 # HANGUL SYLLABLE KHIEUKH-OE-RIEULKIYEOK +0xCFB2 # HANGUL SYLLABLE KHIEUKH-OE-RIEULMIEUM +0xCFB3 # HANGUL SYLLABLE KHIEUKH-OE-RIEULPIEUP +0xCFB4 # HANGUL SYLLABLE KHIEUKH-OE-RIEULSIOS +0xCFB5 # HANGUL SYLLABLE KHIEUKH-OE-RIEULTHIEUTH +0xCFB6 # HANGUL SYLLABLE KHIEUKH-OE-RIEULPHIEUPH +0xCFB7 # HANGUL SYLLABLE KHIEUKH-OE-RIEULHIEUH +0xCFB8 # HANGUL SYLLABLE KHIEUKH-OE-MIEUM +0xCFB9 # HANGUL SYLLABLE KHIEUKH-OE-PIEUP +0xCFBA # HANGUL SYLLABLE KHIEUKH-OE-PIEUPSIOS +0xCFBB # HANGUL SYLLABLE KHIEUKH-OE-SIOS +0xCFBC # HANGUL SYLLABLE KHIEUKH-OE-SSANGSIOS +0xCFBD # HANGUL SYLLABLE KHIEUKH-OE-IEUNG +0xCFBE # HANGUL SYLLABLE KHIEUKH-OE-CIEUC +0xCFBF # HANGUL SYLLABLE KHIEUKH-OE-CHIEUCH +0xCFC0 # HANGUL SYLLABLE KHIEUKH-OE-KHIEUKH +0xCFC1 # HANGUL SYLLABLE KHIEUKH-OE-THIEUTH +0xCFC2 # HANGUL SYLLABLE KHIEUKH-OE-PHIEUPH +0xCFC3 # HANGUL SYLLABLE KHIEUKH-OE-HIEUH +0xCFC4 # HANGUL SYLLABLE KHIEUKH-YO +0xCFC5 # HANGUL SYLLABLE KHIEUKH-YO-KIYEOK +0xCFC6 # HANGUL SYLLABLE KHIEUKH-YO-SSANGKIYEOK +0xCFC7 # HANGUL SYLLABLE KHIEUKH-YO-KIYEOKSIOS +0xCFC8 # HANGUL SYLLABLE KHIEUKH-YO-NIEUN +0xCFC9 # HANGUL SYLLABLE KHIEUKH-YO-NIEUNCIEUC +0xCFCA # HANGUL SYLLABLE KHIEUKH-YO-NIEUNHIEUH +0xCFCB # HANGUL SYLLABLE KHIEUKH-YO-TIKEUT +0xCFCC # HANGUL SYLLABLE KHIEUKH-YO-RIEUL +0xCFCD # HANGUL SYLLABLE KHIEUKH-YO-RIEULKIYEOK +0xCFCE # HANGUL SYLLABLE KHIEUKH-YO-RIEULMIEUM +0xCFCF # HANGUL SYLLABLE KHIEUKH-YO-RIEULPIEUP +0xCFD0 # HANGUL SYLLABLE KHIEUKH-YO-RIEULSIOS +0xCFD1 # HANGUL SYLLABLE KHIEUKH-YO-RIEULTHIEUTH +0xCFD2 # HANGUL SYLLABLE KHIEUKH-YO-RIEULPHIEUPH +0xCFD3 # HANGUL SYLLABLE KHIEUKH-YO-RIEULHIEUH +0xCFD4 # HANGUL SYLLABLE KHIEUKH-YO-MIEUM +0xCFD5 # HANGUL SYLLABLE KHIEUKH-YO-PIEUP +0xCFD6 # HANGUL SYLLABLE KHIEUKH-YO-PIEUPSIOS +0xCFD7 # HANGUL SYLLABLE KHIEUKH-YO-SIOS +0xCFD8 # HANGUL SYLLABLE KHIEUKH-YO-SSANGSIOS +0xCFD9 # HANGUL SYLLABLE KHIEUKH-YO-IEUNG +0xCFDA # HANGUL SYLLABLE KHIEUKH-YO-CIEUC +0xCFDB # HANGUL SYLLABLE KHIEUKH-YO-CHIEUCH +0xCFDC # HANGUL SYLLABLE KHIEUKH-YO-KHIEUKH +0xCFDD # HANGUL SYLLABLE KHIEUKH-YO-THIEUTH +0xCFDE # HANGUL SYLLABLE KHIEUKH-YO-PHIEUPH +0xCFDF # HANGUL SYLLABLE KHIEUKH-YO-HIEUH +0xCFE0 # HANGUL SYLLABLE KHIEUKH-U +0xCFE1 # HANGUL SYLLABLE KHIEUKH-U-KIYEOK +0xCFE2 # HANGUL SYLLABLE KHIEUKH-U-SSANGKIYEOK +0xCFE3 # HANGUL SYLLABLE KHIEUKH-U-KIYEOKSIOS +0xCFE4 # HANGUL SYLLABLE KHIEUKH-U-NIEUN +0xCFE5 # HANGUL SYLLABLE KHIEUKH-U-NIEUNCIEUC +0xCFE6 # HANGUL SYLLABLE KHIEUKH-U-NIEUNHIEUH +0xCFE7 # HANGUL SYLLABLE KHIEUKH-U-TIKEUT +0xCFE8 # HANGUL SYLLABLE KHIEUKH-U-RIEUL +0xCFE9 # HANGUL SYLLABLE KHIEUKH-U-RIEULKIYEOK +0xCFEA # HANGUL SYLLABLE KHIEUKH-U-RIEULMIEUM +0xCFEB # HANGUL SYLLABLE KHIEUKH-U-RIEULPIEUP +0xCFEC # HANGUL SYLLABLE KHIEUKH-U-RIEULSIOS +0xCFED # HANGUL SYLLABLE KHIEUKH-U-RIEULTHIEUTH +0xCFEE # HANGUL SYLLABLE KHIEUKH-U-RIEULPHIEUPH +0xCFEF # HANGUL SYLLABLE KHIEUKH-U-RIEULHIEUH +0xCFF0 # HANGUL SYLLABLE KHIEUKH-U-MIEUM +0xCFF1 # HANGUL SYLLABLE KHIEUKH-U-PIEUP +0xCFF2 # HANGUL SYLLABLE KHIEUKH-U-PIEUPSIOS +0xCFF3 # HANGUL SYLLABLE KHIEUKH-U-SIOS +0xCFF4 # HANGUL SYLLABLE KHIEUKH-U-SSANGSIOS +0xCFF5 # HANGUL SYLLABLE KHIEUKH-U-IEUNG +0xCFF6 # HANGUL SYLLABLE KHIEUKH-U-CIEUC +0xCFF7 # HANGUL SYLLABLE KHIEUKH-U-CHIEUCH +0xCFF8 # HANGUL SYLLABLE KHIEUKH-U-KHIEUKH +0xCFF9 # HANGUL SYLLABLE KHIEUKH-U-THIEUTH +0xCFFA # HANGUL SYLLABLE KHIEUKH-U-PHIEUPH +0xCFFB # HANGUL SYLLABLE KHIEUKH-U-HIEUH +0xCFFC # HANGUL SYLLABLE KHIEUKH-WEO +0xCFFD # HANGUL SYLLABLE KHIEUKH-WEO-KIYEOK +0xCFFE # HANGUL SYLLABLE KHIEUKH-WEO-SSANGKIYEOK +0xCFFF # HANGUL SYLLABLE KHIEUKH-WEO-KIYEOKSIOS +0xD000 # HANGUL SYLLABLE KHIEUKH-WEO-NIEUN +0xD001 # HANGUL SYLLABLE KHIEUKH-WEO-NIEUNCIEUC +0xD002 # HANGUL SYLLABLE KHIEUKH-WEO-NIEUNHIEUH +0xD003 # HANGUL SYLLABLE KHIEUKH-WEO-TIKEUT +0xD004 # HANGUL SYLLABLE KHIEUKH-WEO-RIEUL +0xD005 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULKIYEOK +0xD006 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULMIEUM +0xD007 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULPIEUP +0xD008 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULSIOS +0xD009 # HANGUL SYLLABLE KHIEUKH-WEO-RIEULTHIEUTH +0xD00A # HANGUL SYLLABLE KHIEUKH-WEO-RIEULPHIEUPH +0xD00B # HANGUL SYLLABLE KHIEUKH-WEO-RIEULHIEUH +0xD00C # HANGUL SYLLABLE KHIEUKH-WEO-MIEUM +0xD00D # HANGUL SYLLABLE KHIEUKH-WEO-PIEUP +0xD00E # HANGUL SYLLABLE KHIEUKH-WEO-PIEUPSIOS +0xD00F # HANGUL SYLLABLE KHIEUKH-WEO-SIOS +0xD010 # HANGUL SYLLABLE KHIEUKH-WEO-SSANGSIOS +0xD011 # HANGUL SYLLABLE KHIEUKH-WEO-IEUNG +0xD012 # HANGUL SYLLABLE KHIEUKH-WEO-CIEUC +0xD013 # HANGUL SYLLABLE KHIEUKH-WEO-CHIEUCH +0xD014 # HANGUL SYLLABLE KHIEUKH-WEO-KHIEUKH +0xD015 # HANGUL SYLLABLE KHIEUKH-WEO-THIEUTH +0xD016 # HANGUL SYLLABLE KHIEUKH-WEO-PHIEUPH +0xD017 # HANGUL SYLLABLE KHIEUKH-WEO-HIEUH +0xD018 # HANGUL SYLLABLE KHIEUKH-WE +0xD019 # HANGUL SYLLABLE KHIEUKH-WE-KIYEOK +0xD01A # HANGUL SYLLABLE KHIEUKH-WE-SSANGKIYEOK +0xD01B # HANGUL SYLLABLE KHIEUKH-WE-KIYEOKSIOS +0xD01C # HANGUL SYLLABLE KHIEUKH-WE-NIEUN +0xD01D # HANGUL SYLLABLE KHIEUKH-WE-NIEUNCIEUC +0xD01E # HANGUL SYLLABLE KHIEUKH-WE-NIEUNHIEUH +0xD01F # HANGUL SYLLABLE KHIEUKH-WE-TIKEUT +0xD020 # HANGUL SYLLABLE KHIEUKH-WE-RIEUL +0xD021 # HANGUL SYLLABLE KHIEUKH-WE-RIEULKIYEOK +0xD022 # HANGUL SYLLABLE KHIEUKH-WE-RIEULMIEUM +0xD023 # HANGUL SYLLABLE KHIEUKH-WE-RIEULPIEUP +0xD024 # HANGUL SYLLABLE KHIEUKH-WE-RIEULSIOS +0xD025 # HANGUL SYLLABLE KHIEUKH-WE-RIEULTHIEUTH +0xD026 # HANGUL SYLLABLE KHIEUKH-WE-RIEULPHIEUPH +0xD027 # HANGUL SYLLABLE KHIEUKH-WE-RIEULHIEUH +0xD028 # HANGUL SYLLABLE KHIEUKH-WE-MIEUM +0xD029 # HANGUL SYLLABLE KHIEUKH-WE-PIEUP +0xD02A # HANGUL SYLLABLE KHIEUKH-WE-PIEUPSIOS +0xD02B # HANGUL SYLLABLE KHIEUKH-WE-SIOS +0xD02C # HANGUL SYLLABLE KHIEUKH-WE-SSANGSIOS +0xD02D # HANGUL SYLLABLE KHIEUKH-WE-IEUNG +0xD02E # HANGUL SYLLABLE KHIEUKH-WE-CIEUC +0xD02F # HANGUL SYLLABLE KHIEUKH-WE-CHIEUCH +0xD030 # HANGUL SYLLABLE KHIEUKH-WE-KHIEUKH +0xD031 # HANGUL SYLLABLE KHIEUKH-WE-THIEUTH +0xD032 # HANGUL SYLLABLE KHIEUKH-WE-PHIEUPH +0xD033 # HANGUL SYLLABLE KHIEUKH-WE-HIEUH +0xD034 # HANGUL SYLLABLE KHIEUKH-WI +0xD035 # HANGUL SYLLABLE KHIEUKH-WI-KIYEOK +0xD036 # HANGUL SYLLABLE KHIEUKH-WI-SSANGKIYEOK +0xD037 # HANGUL SYLLABLE KHIEUKH-WI-KIYEOKSIOS +0xD038 # HANGUL SYLLABLE KHIEUKH-WI-NIEUN +0xD039 # HANGUL SYLLABLE KHIEUKH-WI-NIEUNCIEUC +0xD03A # HANGUL SYLLABLE KHIEUKH-WI-NIEUNHIEUH +0xD03B # HANGUL SYLLABLE KHIEUKH-WI-TIKEUT +0xD03C # HANGUL SYLLABLE KHIEUKH-WI-RIEUL +0xD03D # HANGUL SYLLABLE KHIEUKH-WI-RIEULKIYEOK +0xD03E # HANGUL SYLLABLE KHIEUKH-WI-RIEULMIEUM +0xD03F # HANGUL SYLLABLE KHIEUKH-WI-RIEULPIEUP +0xD040 # HANGUL SYLLABLE KHIEUKH-WI-RIEULSIOS +0xD041 # HANGUL SYLLABLE KHIEUKH-WI-RIEULTHIEUTH +0xD042 # HANGUL SYLLABLE KHIEUKH-WI-RIEULPHIEUPH +0xD043 # HANGUL SYLLABLE KHIEUKH-WI-RIEULHIEUH +0xD044 # HANGUL SYLLABLE KHIEUKH-WI-MIEUM +0xD045 # HANGUL SYLLABLE KHIEUKH-WI-PIEUP +0xD046 # HANGUL SYLLABLE KHIEUKH-WI-PIEUPSIOS +0xD047 # HANGUL SYLLABLE KHIEUKH-WI-SIOS +0xD048 # HANGUL SYLLABLE KHIEUKH-WI-SSANGSIOS +0xD049 # HANGUL SYLLABLE KHIEUKH-WI-IEUNG +0xD04A # HANGUL SYLLABLE KHIEUKH-WI-CIEUC +0xD04B # HANGUL SYLLABLE KHIEUKH-WI-CHIEUCH +0xD04C # HANGUL SYLLABLE KHIEUKH-WI-KHIEUKH +0xD04D # HANGUL SYLLABLE KHIEUKH-WI-THIEUTH +0xD04E # HANGUL SYLLABLE KHIEUKH-WI-PHIEUPH +0xD04F # HANGUL SYLLABLE KHIEUKH-WI-HIEUH +0xD050 # HANGUL SYLLABLE KHIEUKH-YU +0xD051 # HANGUL SYLLABLE KHIEUKH-YU-KIYEOK +0xD052 # HANGUL SYLLABLE KHIEUKH-YU-SSANGKIYEOK +0xD053 # HANGUL SYLLABLE KHIEUKH-YU-KIYEOKSIOS +0xD054 # HANGUL SYLLABLE KHIEUKH-YU-NIEUN +0xD055 # HANGUL SYLLABLE KHIEUKH-YU-NIEUNCIEUC +0xD056 # HANGUL SYLLABLE KHIEUKH-YU-NIEUNHIEUH +0xD057 # HANGUL SYLLABLE KHIEUKH-YU-TIKEUT +0xD058 # HANGUL SYLLABLE KHIEUKH-YU-RIEUL +0xD059 # HANGUL SYLLABLE KHIEUKH-YU-RIEULKIYEOK +0xD05A # HANGUL SYLLABLE KHIEUKH-YU-RIEULMIEUM +0xD05B # HANGUL SYLLABLE KHIEUKH-YU-RIEULPIEUP +0xD05C # HANGUL SYLLABLE KHIEUKH-YU-RIEULSIOS +0xD05D # HANGUL SYLLABLE KHIEUKH-YU-RIEULTHIEUTH +0xD05E # HANGUL SYLLABLE KHIEUKH-YU-RIEULPHIEUPH +0xD05F # HANGUL SYLLABLE KHIEUKH-YU-RIEULHIEUH +0xD060 # HANGUL SYLLABLE KHIEUKH-YU-MIEUM +0xD061 # HANGUL SYLLABLE KHIEUKH-YU-PIEUP +0xD062 # HANGUL SYLLABLE KHIEUKH-YU-PIEUPSIOS +0xD063 # HANGUL SYLLABLE KHIEUKH-YU-SIOS +0xD064 # HANGUL SYLLABLE KHIEUKH-YU-SSANGSIOS +0xD065 # HANGUL SYLLABLE KHIEUKH-YU-IEUNG +0xD066 # HANGUL SYLLABLE KHIEUKH-YU-CIEUC +0xD067 # HANGUL SYLLABLE KHIEUKH-YU-CHIEUCH +0xD068 # HANGUL SYLLABLE KHIEUKH-YU-KHIEUKH +0xD069 # HANGUL SYLLABLE KHIEUKH-YU-THIEUTH +0xD06A # HANGUL SYLLABLE KHIEUKH-YU-PHIEUPH +0xD06B # HANGUL SYLLABLE KHIEUKH-YU-HIEUH +0xD06C # HANGUL SYLLABLE KHIEUKH-EU +0xD06D # HANGUL SYLLABLE KHIEUKH-EU-KIYEOK +0xD06E # HANGUL SYLLABLE KHIEUKH-EU-SSANGKIYEOK +0xD06F # HANGUL SYLLABLE KHIEUKH-EU-KIYEOKSIOS +0xD070 # HANGUL SYLLABLE KHIEUKH-EU-NIEUN +0xD071 # HANGUL SYLLABLE KHIEUKH-EU-NIEUNCIEUC +0xD072 # HANGUL SYLLABLE KHIEUKH-EU-NIEUNHIEUH +0xD073 # HANGUL SYLLABLE KHIEUKH-EU-TIKEUT +0xD074 # HANGUL SYLLABLE KHIEUKH-EU-RIEUL +0xD075 # HANGUL SYLLABLE KHIEUKH-EU-RIEULKIYEOK +0xD076 # HANGUL SYLLABLE KHIEUKH-EU-RIEULMIEUM +0xD077 # HANGUL SYLLABLE KHIEUKH-EU-RIEULPIEUP +0xD078 # HANGUL SYLLABLE KHIEUKH-EU-RIEULSIOS +0xD079 # HANGUL SYLLABLE KHIEUKH-EU-RIEULTHIEUTH +0xD07A # HANGUL SYLLABLE KHIEUKH-EU-RIEULPHIEUPH +0xD07B # HANGUL SYLLABLE KHIEUKH-EU-RIEULHIEUH +0xD07C # HANGUL SYLLABLE KHIEUKH-EU-MIEUM +0xD07D # HANGUL SYLLABLE KHIEUKH-EU-PIEUP +0xD07E # HANGUL SYLLABLE KHIEUKH-EU-PIEUPSIOS +0xD07F # HANGUL SYLLABLE KHIEUKH-EU-SIOS +0xD080 # HANGUL SYLLABLE KHIEUKH-EU-SSANGSIOS +0xD081 # HANGUL SYLLABLE KHIEUKH-EU-IEUNG +0xD082 # HANGUL SYLLABLE KHIEUKH-EU-CIEUC +0xD083 # HANGUL SYLLABLE KHIEUKH-EU-CHIEUCH +0xD084 # HANGUL SYLLABLE KHIEUKH-EU-KHIEUKH +0xD085 # HANGUL SYLLABLE KHIEUKH-EU-THIEUTH +0xD086 # HANGUL SYLLABLE KHIEUKH-EU-PHIEUPH +0xD087 # HANGUL SYLLABLE KHIEUKH-EU-HIEUH +0xD088 # HANGUL SYLLABLE KHIEUKH-YI +0xD089 # HANGUL SYLLABLE KHIEUKH-YI-KIYEOK +0xD08A # HANGUL SYLLABLE KHIEUKH-YI-SSANGKIYEOK +0xD08B # HANGUL SYLLABLE KHIEUKH-YI-KIYEOKSIOS +0xD08C # HANGUL SYLLABLE KHIEUKH-YI-NIEUN +0xD08D # HANGUL SYLLABLE KHIEUKH-YI-NIEUNCIEUC +0xD08E # HANGUL SYLLABLE KHIEUKH-YI-NIEUNHIEUH +0xD08F # HANGUL SYLLABLE KHIEUKH-YI-TIKEUT +0xD090 # HANGUL SYLLABLE KHIEUKH-YI-RIEUL +0xD091 # HANGUL SYLLABLE KHIEUKH-YI-RIEULKIYEOK +0xD092 # HANGUL SYLLABLE KHIEUKH-YI-RIEULMIEUM +0xD093 # HANGUL SYLLABLE KHIEUKH-YI-RIEULPIEUP +0xD094 # HANGUL SYLLABLE KHIEUKH-YI-RIEULSIOS +0xD095 # HANGUL SYLLABLE KHIEUKH-YI-RIEULTHIEUTH +0xD096 # HANGUL SYLLABLE KHIEUKH-YI-RIEULPHIEUPH +0xD097 # HANGUL SYLLABLE KHIEUKH-YI-RIEULHIEUH +0xD098 # HANGUL SYLLABLE KHIEUKH-YI-MIEUM +0xD099 # HANGUL SYLLABLE KHIEUKH-YI-PIEUP +0xD09A # HANGUL SYLLABLE KHIEUKH-YI-PIEUPSIOS +0xD09B # HANGUL SYLLABLE KHIEUKH-YI-SIOS +0xD09C # HANGUL SYLLABLE KHIEUKH-YI-SSANGSIOS +0xD09D # HANGUL SYLLABLE KHIEUKH-YI-IEUNG +0xD09E # HANGUL SYLLABLE KHIEUKH-YI-CIEUC +0xD09F # HANGUL SYLLABLE KHIEUKH-YI-CHIEUCH +0xD0A0 # HANGUL SYLLABLE KHIEUKH-YI-KHIEUKH +0xD0A1 # HANGUL SYLLABLE KHIEUKH-YI-THIEUTH +0xD0A2 # HANGUL SYLLABLE KHIEUKH-YI-PHIEUPH +0xD0A3 # HANGUL SYLLABLE KHIEUKH-YI-HIEUH +0xD0A4 # HANGUL SYLLABLE KHIEUKH-I +0xD0A5 # HANGUL SYLLABLE KHIEUKH-I-KIYEOK +0xD0A6 # HANGUL SYLLABLE KHIEUKH-I-SSANGKIYEOK +0xD0A7 # HANGUL SYLLABLE KHIEUKH-I-KIYEOKSIOS +0xD0A8 # HANGUL SYLLABLE KHIEUKH-I-NIEUN +0xD0A9 # HANGUL SYLLABLE KHIEUKH-I-NIEUNCIEUC +0xD0AA # HANGUL SYLLABLE KHIEUKH-I-NIEUNHIEUH +0xD0AB # HANGUL SYLLABLE KHIEUKH-I-TIKEUT +0xD0AC # HANGUL SYLLABLE KHIEUKH-I-RIEUL +0xD0AD # HANGUL SYLLABLE KHIEUKH-I-RIEULKIYEOK +0xD0AE # HANGUL SYLLABLE KHIEUKH-I-RIEULMIEUM +0xD0AF # HANGUL SYLLABLE KHIEUKH-I-RIEULPIEUP +0xD0B0 # HANGUL SYLLABLE KHIEUKH-I-RIEULSIOS +0xD0B1 # HANGUL SYLLABLE KHIEUKH-I-RIEULTHIEUTH +0xD0B2 # HANGUL SYLLABLE KHIEUKH-I-RIEULPHIEUPH +0xD0B3 # HANGUL SYLLABLE KHIEUKH-I-RIEULHIEUH +0xD0B4 # HANGUL SYLLABLE KHIEUKH-I-MIEUM +0xD0B5 # HANGUL SYLLABLE KHIEUKH-I-PIEUP +0xD0B6 # HANGUL SYLLABLE KHIEUKH-I-PIEUPSIOS +0xD0B7 # HANGUL SYLLABLE KHIEUKH-I-SIOS +0xD0B8 # HANGUL SYLLABLE KHIEUKH-I-SSANGSIOS +0xD0B9 # HANGUL SYLLABLE KHIEUKH-I-IEUNG +0xD0BA # HANGUL SYLLABLE KHIEUKH-I-CIEUC +0xD0BB # HANGUL SYLLABLE KHIEUKH-I-CHIEUCH +0xD0BC # HANGUL SYLLABLE KHIEUKH-I-KHIEUKH +0xD0BD # HANGUL SYLLABLE KHIEUKH-I-THIEUTH +0xD0BE # HANGUL SYLLABLE KHIEUKH-I-PHIEUPH +0xD0BF # HANGUL SYLLABLE KHIEUKH-I-HIEUH +0xD0C0 # HANGUL SYLLABLE THIEUTH-A +0xD0C1 # HANGUL SYLLABLE THIEUTH-A-KIYEOK +0xD0C2 # HANGUL SYLLABLE THIEUTH-A-SSANGKIYEOK +0xD0C3 # HANGUL SYLLABLE THIEUTH-A-KIYEOKSIOS +0xD0C4 # HANGUL SYLLABLE THIEUTH-A-NIEUN +0xD0C5 # HANGUL SYLLABLE THIEUTH-A-NIEUNCIEUC +0xD0C6 # HANGUL SYLLABLE THIEUTH-A-NIEUNHIEUH +0xD0C7 # HANGUL SYLLABLE THIEUTH-A-TIKEUT +0xD0C8 # HANGUL SYLLABLE THIEUTH-A-RIEUL +0xD0C9 # HANGUL SYLLABLE THIEUTH-A-RIEULKIYEOK +0xD0CA # HANGUL SYLLABLE THIEUTH-A-RIEULMIEUM +0xD0CB # HANGUL SYLLABLE THIEUTH-A-RIEULPIEUP +0xD0CC # HANGUL SYLLABLE THIEUTH-A-RIEULSIOS +0xD0CD # HANGUL SYLLABLE THIEUTH-A-RIEULTHIEUTH +0xD0CE # HANGUL SYLLABLE THIEUTH-A-RIEULPHIEUPH +0xD0CF # HANGUL SYLLABLE THIEUTH-A-RIEULHIEUH +0xD0D0 # HANGUL SYLLABLE THIEUTH-A-MIEUM +0xD0D1 # HANGUL SYLLABLE THIEUTH-A-PIEUP +0xD0D2 # HANGUL SYLLABLE THIEUTH-A-PIEUPSIOS +0xD0D3 # HANGUL SYLLABLE THIEUTH-A-SIOS +0xD0D4 # HANGUL SYLLABLE THIEUTH-A-SSANGSIOS +0xD0D5 # HANGUL SYLLABLE THIEUTH-A-IEUNG +0xD0D6 # HANGUL SYLLABLE THIEUTH-A-CIEUC +0xD0D7 # HANGUL SYLLABLE THIEUTH-A-CHIEUCH +0xD0D8 # HANGUL SYLLABLE THIEUTH-A-KHIEUKH +0xD0D9 # HANGUL SYLLABLE THIEUTH-A-THIEUTH +0xD0DA # HANGUL SYLLABLE THIEUTH-A-PHIEUPH +0xD0DB # HANGUL SYLLABLE THIEUTH-A-HIEUH +0xD0DC # HANGUL SYLLABLE THIEUTH-AE +0xD0DD # HANGUL SYLLABLE THIEUTH-AE-KIYEOK +0xD0DE # HANGUL SYLLABLE THIEUTH-AE-SSANGKIYEOK +0xD0DF # HANGUL SYLLABLE THIEUTH-AE-KIYEOKSIOS +0xD0E0 # HANGUL SYLLABLE THIEUTH-AE-NIEUN +0xD0E1 # HANGUL SYLLABLE THIEUTH-AE-NIEUNCIEUC +0xD0E2 # HANGUL SYLLABLE THIEUTH-AE-NIEUNHIEUH +0xD0E3 # HANGUL SYLLABLE THIEUTH-AE-TIKEUT +0xD0E4 # HANGUL SYLLABLE THIEUTH-AE-RIEUL +0xD0E5 # HANGUL SYLLABLE THIEUTH-AE-RIEULKIYEOK +0xD0E6 # HANGUL SYLLABLE THIEUTH-AE-RIEULMIEUM +0xD0E7 # HANGUL SYLLABLE THIEUTH-AE-RIEULPIEUP +0xD0E8 # HANGUL SYLLABLE THIEUTH-AE-RIEULSIOS +0xD0E9 # HANGUL SYLLABLE THIEUTH-AE-RIEULTHIEUTH +0xD0EA # HANGUL SYLLABLE THIEUTH-AE-RIEULPHIEUPH +0xD0EB # HANGUL SYLLABLE THIEUTH-AE-RIEULHIEUH +0xD0EC # HANGUL SYLLABLE THIEUTH-AE-MIEUM +0xD0ED # HANGUL SYLLABLE THIEUTH-AE-PIEUP +0xD0EE # HANGUL SYLLABLE THIEUTH-AE-PIEUPSIOS +0xD0EF # HANGUL SYLLABLE THIEUTH-AE-SIOS +0xD0F0 # HANGUL SYLLABLE THIEUTH-AE-SSANGSIOS +0xD0F1 # HANGUL SYLLABLE THIEUTH-AE-IEUNG +0xD0F2 # HANGUL SYLLABLE THIEUTH-AE-CIEUC +0xD0F3 # HANGUL SYLLABLE THIEUTH-AE-CHIEUCH +0xD0F4 # HANGUL SYLLABLE THIEUTH-AE-KHIEUKH +0xD0F5 # HANGUL SYLLABLE THIEUTH-AE-THIEUTH +0xD0F6 # HANGUL SYLLABLE THIEUTH-AE-PHIEUPH +0xD0F7 # HANGUL SYLLABLE THIEUTH-AE-HIEUH +0xD0F8 # HANGUL SYLLABLE THIEUTH-YA +0xD0F9 # HANGUL SYLLABLE THIEUTH-YA-KIYEOK +0xD0FA # HANGUL SYLLABLE THIEUTH-YA-SSANGKIYEOK +0xD0FB # HANGUL SYLLABLE THIEUTH-YA-KIYEOKSIOS +0xD0FC # HANGUL SYLLABLE THIEUTH-YA-NIEUN +0xD0FD # HANGUL SYLLABLE THIEUTH-YA-NIEUNCIEUC +0xD0FE # HANGUL SYLLABLE THIEUTH-YA-NIEUNHIEUH +0xD0FF # HANGUL SYLLABLE THIEUTH-YA-TIKEUT +0xD100 # HANGUL SYLLABLE THIEUTH-YA-RIEUL +0xD101 # HANGUL SYLLABLE THIEUTH-YA-RIEULKIYEOK +0xD102 # HANGUL SYLLABLE THIEUTH-YA-RIEULMIEUM +0xD103 # HANGUL SYLLABLE THIEUTH-YA-RIEULPIEUP +0xD104 # HANGUL SYLLABLE THIEUTH-YA-RIEULSIOS +0xD105 # HANGUL SYLLABLE THIEUTH-YA-RIEULTHIEUTH +0xD106 # HANGUL SYLLABLE THIEUTH-YA-RIEULPHIEUPH +0xD107 # HANGUL SYLLABLE THIEUTH-YA-RIEULHIEUH +0xD108 # HANGUL SYLLABLE THIEUTH-YA-MIEUM +0xD109 # HANGUL SYLLABLE THIEUTH-YA-PIEUP +0xD10A # HANGUL SYLLABLE THIEUTH-YA-PIEUPSIOS +0xD10B # HANGUL SYLLABLE THIEUTH-YA-SIOS +0xD10C # HANGUL SYLLABLE THIEUTH-YA-SSANGSIOS +0xD10D # HANGUL SYLLABLE THIEUTH-YA-IEUNG +0xD10E # HANGUL SYLLABLE THIEUTH-YA-CIEUC +0xD10F # HANGUL SYLLABLE THIEUTH-YA-CHIEUCH +0xD110 # HANGUL SYLLABLE THIEUTH-YA-KHIEUKH +0xD111 # HANGUL SYLLABLE THIEUTH-YA-THIEUTH +0xD112 # HANGUL SYLLABLE THIEUTH-YA-PHIEUPH +0xD113 # HANGUL SYLLABLE THIEUTH-YA-HIEUH +0xD114 # HANGUL SYLLABLE THIEUTH-YAE +0xD115 # HANGUL SYLLABLE THIEUTH-YAE-KIYEOK +0xD116 # HANGUL SYLLABLE THIEUTH-YAE-SSANGKIYEOK +0xD117 # HANGUL SYLLABLE THIEUTH-YAE-KIYEOKSIOS +0xD118 # HANGUL SYLLABLE THIEUTH-YAE-NIEUN +0xD119 # HANGUL SYLLABLE THIEUTH-YAE-NIEUNCIEUC +0xD11A # HANGUL SYLLABLE THIEUTH-YAE-NIEUNHIEUH +0xD11B # HANGUL SYLLABLE THIEUTH-YAE-TIKEUT +0xD11C # HANGUL SYLLABLE THIEUTH-YAE-RIEUL +0xD11D # HANGUL SYLLABLE THIEUTH-YAE-RIEULKIYEOK +0xD11E # HANGUL SYLLABLE THIEUTH-YAE-RIEULMIEUM +0xD11F # HANGUL SYLLABLE THIEUTH-YAE-RIEULPIEUP +0xD120 # HANGUL SYLLABLE THIEUTH-YAE-RIEULSIOS +0xD121 # HANGUL SYLLABLE THIEUTH-YAE-RIEULTHIEUTH +0xD122 # HANGUL SYLLABLE THIEUTH-YAE-RIEULPHIEUPH +0xD123 # HANGUL SYLLABLE THIEUTH-YAE-RIEULHIEUH +0xD124 # HANGUL SYLLABLE THIEUTH-YAE-MIEUM +0xD125 # HANGUL SYLLABLE THIEUTH-YAE-PIEUP +0xD126 # HANGUL SYLLABLE THIEUTH-YAE-PIEUPSIOS +0xD127 # HANGUL SYLLABLE THIEUTH-YAE-SIOS +0xD128 # HANGUL SYLLABLE THIEUTH-YAE-SSANGSIOS +0xD129 # HANGUL SYLLABLE THIEUTH-YAE-IEUNG +0xD12A # HANGUL SYLLABLE THIEUTH-YAE-CIEUC +0xD12B # HANGUL SYLLABLE THIEUTH-YAE-CHIEUCH +0xD12C # HANGUL SYLLABLE THIEUTH-YAE-KHIEUKH +0xD12D # HANGUL SYLLABLE THIEUTH-YAE-THIEUTH +0xD12E # HANGUL SYLLABLE THIEUTH-YAE-PHIEUPH +0xD12F # HANGUL SYLLABLE THIEUTH-YAE-HIEUH +0xD130 # HANGUL SYLLABLE THIEUTH-EO +0xD131 # HANGUL SYLLABLE THIEUTH-EO-KIYEOK +0xD132 # HANGUL SYLLABLE THIEUTH-EO-SSANGKIYEOK +0xD133 # HANGUL SYLLABLE THIEUTH-EO-KIYEOKSIOS +0xD134 # HANGUL SYLLABLE THIEUTH-EO-NIEUN +0xD135 # HANGUL SYLLABLE THIEUTH-EO-NIEUNCIEUC +0xD136 # HANGUL SYLLABLE THIEUTH-EO-NIEUNHIEUH +0xD137 # HANGUL SYLLABLE THIEUTH-EO-TIKEUT +0xD138 # HANGUL SYLLABLE THIEUTH-EO-RIEUL +0xD139 # HANGUL SYLLABLE THIEUTH-EO-RIEULKIYEOK +0xD13A # HANGUL SYLLABLE THIEUTH-EO-RIEULMIEUM +0xD13B # HANGUL SYLLABLE THIEUTH-EO-RIEULPIEUP +0xD13C # HANGUL SYLLABLE THIEUTH-EO-RIEULSIOS +0xD13D # HANGUL SYLLABLE THIEUTH-EO-RIEULTHIEUTH +0xD13E # HANGUL SYLLABLE THIEUTH-EO-RIEULPHIEUPH +0xD13F # HANGUL SYLLABLE THIEUTH-EO-RIEULHIEUH +0xD140 # HANGUL SYLLABLE THIEUTH-EO-MIEUM +0xD141 # HANGUL SYLLABLE THIEUTH-EO-PIEUP +0xD142 # HANGUL SYLLABLE THIEUTH-EO-PIEUPSIOS +0xD143 # HANGUL SYLLABLE THIEUTH-EO-SIOS +0xD144 # HANGUL SYLLABLE THIEUTH-EO-SSANGSIOS +0xD145 # HANGUL SYLLABLE THIEUTH-EO-IEUNG +0xD146 # HANGUL SYLLABLE THIEUTH-EO-CIEUC +0xD147 # HANGUL SYLLABLE THIEUTH-EO-CHIEUCH +0xD148 # HANGUL SYLLABLE THIEUTH-EO-KHIEUKH +0xD149 # HANGUL SYLLABLE THIEUTH-EO-THIEUTH +0xD14A # HANGUL SYLLABLE THIEUTH-EO-PHIEUPH +0xD14B # HANGUL SYLLABLE THIEUTH-EO-HIEUH +0xD14C # HANGUL SYLLABLE THIEUTH-E +0xD14D # HANGUL SYLLABLE THIEUTH-E-KIYEOK +0xD14E # HANGUL SYLLABLE THIEUTH-E-SSANGKIYEOK +0xD14F # HANGUL SYLLABLE THIEUTH-E-KIYEOKSIOS +0xD150 # HANGUL SYLLABLE THIEUTH-E-NIEUN +0xD151 # HANGUL SYLLABLE THIEUTH-E-NIEUNCIEUC +0xD152 # HANGUL SYLLABLE THIEUTH-E-NIEUNHIEUH +0xD153 # HANGUL SYLLABLE THIEUTH-E-TIKEUT +0xD154 # HANGUL SYLLABLE THIEUTH-E-RIEUL +0xD155 # HANGUL SYLLABLE THIEUTH-E-RIEULKIYEOK +0xD156 # HANGUL SYLLABLE THIEUTH-E-RIEULMIEUM +0xD157 # HANGUL SYLLABLE THIEUTH-E-RIEULPIEUP +0xD158 # HANGUL SYLLABLE THIEUTH-E-RIEULSIOS +0xD159 # HANGUL SYLLABLE THIEUTH-E-RIEULTHIEUTH +0xD15A # HANGUL SYLLABLE THIEUTH-E-RIEULPHIEUPH +0xD15B # HANGUL SYLLABLE THIEUTH-E-RIEULHIEUH +0xD15C # HANGUL SYLLABLE THIEUTH-E-MIEUM +0xD15D # HANGUL SYLLABLE THIEUTH-E-PIEUP +0xD15E # HANGUL SYLLABLE THIEUTH-E-PIEUPSIOS +0xD15F # HANGUL SYLLABLE THIEUTH-E-SIOS +0xD160 # HANGUL SYLLABLE THIEUTH-E-SSANGSIOS +0xD161 # HANGUL SYLLABLE THIEUTH-E-IEUNG +0xD162 # HANGUL SYLLABLE THIEUTH-E-CIEUC +0xD163 # HANGUL SYLLABLE THIEUTH-E-CHIEUCH +0xD164 # HANGUL SYLLABLE THIEUTH-E-KHIEUKH +0xD165 # HANGUL SYLLABLE THIEUTH-E-THIEUTH +0xD166 # HANGUL SYLLABLE THIEUTH-E-PHIEUPH +0xD167 # HANGUL SYLLABLE THIEUTH-E-HIEUH +0xD168 # HANGUL SYLLABLE THIEUTH-YEO +0xD169 # HANGUL SYLLABLE THIEUTH-YEO-KIYEOK +0xD16A # HANGUL SYLLABLE THIEUTH-YEO-SSANGKIYEOK +0xD16B # HANGUL SYLLABLE THIEUTH-YEO-KIYEOKSIOS +0xD16C # HANGUL SYLLABLE THIEUTH-YEO-NIEUN +0xD16D # HANGUL SYLLABLE THIEUTH-YEO-NIEUNCIEUC +0xD16E # HANGUL SYLLABLE THIEUTH-YEO-NIEUNHIEUH +0xD16F # HANGUL SYLLABLE THIEUTH-YEO-TIKEUT +0xD170 # HANGUL SYLLABLE THIEUTH-YEO-RIEUL +0xD171 # HANGUL SYLLABLE THIEUTH-YEO-RIEULKIYEOK +0xD172 # HANGUL SYLLABLE THIEUTH-YEO-RIEULMIEUM +0xD173 # HANGUL SYLLABLE THIEUTH-YEO-RIEULPIEUP +0xD174 # HANGUL SYLLABLE THIEUTH-YEO-RIEULSIOS +0xD175 # HANGUL SYLLABLE THIEUTH-YEO-RIEULTHIEUTH +0xD176 # HANGUL SYLLABLE THIEUTH-YEO-RIEULPHIEUPH +0xD177 # HANGUL SYLLABLE THIEUTH-YEO-RIEULHIEUH +0xD178 # HANGUL SYLLABLE THIEUTH-YEO-MIEUM +0xD179 # HANGUL SYLLABLE THIEUTH-YEO-PIEUP +0xD17A # HANGUL SYLLABLE THIEUTH-YEO-PIEUPSIOS +0xD17B # HANGUL SYLLABLE THIEUTH-YEO-SIOS +0xD17C # HANGUL SYLLABLE THIEUTH-YEO-SSANGSIOS +0xD17D # HANGUL SYLLABLE THIEUTH-YEO-IEUNG +0xD17E # HANGUL SYLLABLE THIEUTH-YEO-CIEUC +0xD17F # HANGUL SYLLABLE THIEUTH-YEO-CHIEUCH +0xD180 # HANGUL SYLLABLE THIEUTH-YEO-KHIEUKH +0xD181 # HANGUL SYLLABLE THIEUTH-YEO-THIEUTH +0xD182 # HANGUL SYLLABLE THIEUTH-YEO-PHIEUPH +0xD183 # HANGUL SYLLABLE THIEUTH-YEO-HIEUH +0xD184 # HANGUL SYLLABLE THIEUTH-YE +0xD185 # HANGUL SYLLABLE THIEUTH-YE-KIYEOK +0xD186 # HANGUL SYLLABLE THIEUTH-YE-SSANGKIYEOK +0xD187 # HANGUL SYLLABLE THIEUTH-YE-KIYEOKSIOS +0xD188 # HANGUL SYLLABLE THIEUTH-YE-NIEUN +0xD189 # HANGUL SYLLABLE THIEUTH-YE-NIEUNCIEUC +0xD18A # HANGUL SYLLABLE THIEUTH-YE-NIEUNHIEUH +0xD18B # HANGUL SYLLABLE THIEUTH-YE-TIKEUT +0xD18C # HANGUL SYLLABLE THIEUTH-YE-RIEUL +0xD18D # HANGUL SYLLABLE THIEUTH-YE-RIEULKIYEOK +0xD18E # HANGUL SYLLABLE THIEUTH-YE-RIEULMIEUM +0xD18F # HANGUL SYLLABLE THIEUTH-YE-RIEULPIEUP +0xD190 # HANGUL SYLLABLE THIEUTH-YE-RIEULSIOS +0xD191 # HANGUL SYLLABLE THIEUTH-YE-RIEULTHIEUTH +0xD192 # HANGUL SYLLABLE THIEUTH-YE-RIEULPHIEUPH +0xD193 # HANGUL SYLLABLE THIEUTH-YE-RIEULHIEUH +0xD194 # HANGUL SYLLABLE THIEUTH-YE-MIEUM +0xD195 # HANGUL SYLLABLE THIEUTH-YE-PIEUP +0xD196 # HANGUL SYLLABLE THIEUTH-YE-PIEUPSIOS +0xD197 # HANGUL SYLLABLE THIEUTH-YE-SIOS +0xD198 # HANGUL SYLLABLE THIEUTH-YE-SSANGSIOS +0xD199 # HANGUL SYLLABLE THIEUTH-YE-IEUNG +0xD19A # HANGUL SYLLABLE THIEUTH-YE-CIEUC +0xD19B # HANGUL SYLLABLE THIEUTH-YE-CHIEUCH +0xD19C # HANGUL SYLLABLE THIEUTH-YE-KHIEUKH +0xD19D # HANGUL SYLLABLE THIEUTH-YE-THIEUTH +0xD19E # HANGUL SYLLABLE THIEUTH-YE-PHIEUPH +0xD19F # HANGUL SYLLABLE THIEUTH-YE-HIEUH +0xD1A0 # HANGUL SYLLABLE THIEUTH-O +0xD1A1 # HANGUL SYLLABLE THIEUTH-O-KIYEOK +0xD1A2 # HANGUL SYLLABLE THIEUTH-O-SSANGKIYEOK +0xD1A3 # HANGUL SYLLABLE THIEUTH-O-KIYEOKSIOS +0xD1A4 # HANGUL SYLLABLE THIEUTH-O-NIEUN +0xD1A5 # HANGUL SYLLABLE THIEUTH-O-NIEUNCIEUC +0xD1A6 # HANGUL SYLLABLE THIEUTH-O-NIEUNHIEUH +0xD1A7 # HANGUL SYLLABLE THIEUTH-O-TIKEUT +0xD1A8 # HANGUL SYLLABLE THIEUTH-O-RIEUL +0xD1A9 # HANGUL SYLLABLE THIEUTH-O-RIEULKIYEOK +0xD1AA # HANGUL SYLLABLE THIEUTH-O-RIEULMIEUM +0xD1AB # HANGUL SYLLABLE THIEUTH-O-RIEULPIEUP +0xD1AC # HANGUL SYLLABLE THIEUTH-O-RIEULSIOS +0xD1AD # HANGUL SYLLABLE THIEUTH-O-RIEULTHIEUTH +0xD1AE # HANGUL SYLLABLE THIEUTH-O-RIEULPHIEUPH +0xD1AF # HANGUL SYLLABLE THIEUTH-O-RIEULHIEUH +0xD1B0 # HANGUL SYLLABLE THIEUTH-O-MIEUM +0xD1B1 # HANGUL SYLLABLE THIEUTH-O-PIEUP +0xD1B2 # HANGUL SYLLABLE THIEUTH-O-PIEUPSIOS +0xD1B3 # HANGUL SYLLABLE THIEUTH-O-SIOS +0xD1B4 # HANGUL SYLLABLE THIEUTH-O-SSANGSIOS +0xD1B5 # HANGUL SYLLABLE THIEUTH-O-IEUNG +0xD1B6 # HANGUL SYLLABLE THIEUTH-O-CIEUC +0xD1B7 # HANGUL SYLLABLE THIEUTH-O-CHIEUCH +0xD1B8 # HANGUL SYLLABLE THIEUTH-O-KHIEUKH +0xD1B9 # HANGUL SYLLABLE THIEUTH-O-THIEUTH +0xD1BA # HANGUL SYLLABLE THIEUTH-O-PHIEUPH +0xD1BB # HANGUL SYLLABLE THIEUTH-O-HIEUH +0xD1BC # HANGUL SYLLABLE THIEUTH-WA +0xD1BD # HANGUL SYLLABLE THIEUTH-WA-KIYEOK +0xD1BE # HANGUL SYLLABLE THIEUTH-WA-SSANGKIYEOK +0xD1BF # HANGUL SYLLABLE THIEUTH-WA-KIYEOKSIOS +0xD1C0 # HANGUL SYLLABLE THIEUTH-WA-NIEUN +0xD1C1 # HANGUL SYLLABLE THIEUTH-WA-NIEUNCIEUC +0xD1C2 # HANGUL SYLLABLE THIEUTH-WA-NIEUNHIEUH +0xD1C3 # HANGUL SYLLABLE THIEUTH-WA-TIKEUT +0xD1C4 # HANGUL SYLLABLE THIEUTH-WA-RIEUL +0xD1C5 # HANGUL SYLLABLE THIEUTH-WA-RIEULKIYEOK +0xD1C6 # HANGUL SYLLABLE THIEUTH-WA-RIEULMIEUM +0xD1C7 # HANGUL SYLLABLE THIEUTH-WA-RIEULPIEUP +0xD1C8 # HANGUL SYLLABLE THIEUTH-WA-RIEULSIOS +0xD1C9 # HANGUL SYLLABLE THIEUTH-WA-RIEULTHIEUTH +0xD1CA # HANGUL SYLLABLE THIEUTH-WA-RIEULPHIEUPH +0xD1CB # HANGUL SYLLABLE THIEUTH-WA-RIEULHIEUH +0xD1CC # HANGUL SYLLABLE THIEUTH-WA-MIEUM +0xD1CD # HANGUL SYLLABLE THIEUTH-WA-PIEUP +0xD1CE # HANGUL SYLLABLE THIEUTH-WA-PIEUPSIOS +0xD1CF # HANGUL SYLLABLE THIEUTH-WA-SIOS +0xD1D0 # HANGUL SYLLABLE THIEUTH-WA-SSANGSIOS +0xD1D1 # HANGUL SYLLABLE THIEUTH-WA-IEUNG +0xD1D2 # HANGUL SYLLABLE THIEUTH-WA-CIEUC +0xD1D3 # HANGUL SYLLABLE THIEUTH-WA-CHIEUCH +0xD1D4 # HANGUL SYLLABLE THIEUTH-WA-KHIEUKH +0xD1D5 # HANGUL SYLLABLE THIEUTH-WA-THIEUTH +0xD1D6 # HANGUL SYLLABLE THIEUTH-WA-PHIEUPH +0xD1D7 # HANGUL SYLLABLE THIEUTH-WA-HIEUH +0xD1D8 # HANGUL SYLLABLE THIEUTH-WAE +0xD1D9 # HANGUL SYLLABLE THIEUTH-WAE-KIYEOK +0xD1DA # HANGUL SYLLABLE THIEUTH-WAE-SSANGKIYEOK +0xD1DB # HANGUL SYLLABLE THIEUTH-WAE-KIYEOKSIOS +0xD1DC # HANGUL SYLLABLE THIEUTH-WAE-NIEUN +0xD1DD # HANGUL SYLLABLE THIEUTH-WAE-NIEUNCIEUC +0xD1DE # HANGUL SYLLABLE THIEUTH-WAE-NIEUNHIEUH +0xD1DF # HANGUL SYLLABLE THIEUTH-WAE-TIKEUT +0xD1E0 # HANGUL SYLLABLE THIEUTH-WAE-RIEUL +0xD1E1 # HANGUL SYLLABLE THIEUTH-WAE-RIEULKIYEOK +0xD1E2 # HANGUL SYLLABLE THIEUTH-WAE-RIEULMIEUM +0xD1E3 # HANGUL SYLLABLE THIEUTH-WAE-RIEULPIEUP +0xD1E4 # HANGUL SYLLABLE THIEUTH-WAE-RIEULSIOS +0xD1E5 # HANGUL SYLLABLE THIEUTH-WAE-RIEULTHIEUTH +0xD1E6 # HANGUL SYLLABLE THIEUTH-WAE-RIEULPHIEUPH +0xD1E7 # HANGUL SYLLABLE THIEUTH-WAE-RIEULHIEUH +0xD1E8 # HANGUL SYLLABLE THIEUTH-WAE-MIEUM +0xD1E9 # HANGUL SYLLABLE THIEUTH-WAE-PIEUP +0xD1EA # HANGUL SYLLABLE THIEUTH-WAE-PIEUPSIOS +0xD1EB # HANGUL SYLLABLE THIEUTH-WAE-SIOS +0xD1EC # HANGUL SYLLABLE THIEUTH-WAE-SSANGSIOS +0xD1ED # HANGUL SYLLABLE THIEUTH-WAE-IEUNG +0xD1EE # HANGUL SYLLABLE THIEUTH-WAE-CIEUC +0xD1EF # HANGUL SYLLABLE THIEUTH-WAE-CHIEUCH +0xD1F0 # HANGUL SYLLABLE THIEUTH-WAE-KHIEUKH +0xD1F1 # HANGUL SYLLABLE THIEUTH-WAE-THIEUTH +0xD1F2 # HANGUL SYLLABLE THIEUTH-WAE-PHIEUPH +0xD1F3 # HANGUL SYLLABLE THIEUTH-WAE-HIEUH +0xD1F4 # HANGUL SYLLABLE THIEUTH-OE +0xD1F5 # HANGUL SYLLABLE THIEUTH-OE-KIYEOK +0xD1F6 # HANGUL SYLLABLE THIEUTH-OE-SSANGKIYEOK +0xD1F7 # HANGUL SYLLABLE THIEUTH-OE-KIYEOKSIOS +0xD1F8 # HANGUL SYLLABLE THIEUTH-OE-NIEUN +0xD1F9 # HANGUL SYLLABLE THIEUTH-OE-NIEUNCIEUC +0xD1FA # HANGUL SYLLABLE THIEUTH-OE-NIEUNHIEUH +0xD1FB # HANGUL SYLLABLE THIEUTH-OE-TIKEUT +0xD1FC # HANGUL SYLLABLE THIEUTH-OE-RIEUL +0xD1FD # HANGUL SYLLABLE THIEUTH-OE-RIEULKIYEOK +0xD1FE # HANGUL SYLLABLE THIEUTH-OE-RIEULMIEUM +0xD1FF # HANGUL SYLLABLE THIEUTH-OE-RIEULPIEUP +0xD200 # HANGUL SYLLABLE THIEUTH-OE-RIEULSIOS +0xD201 # HANGUL SYLLABLE THIEUTH-OE-RIEULTHIEUTH +0xD202 # HANGUL SYLLABLE THIEUTH-OE-RIEULPHIEUPH +0xD203 # HANGUL SYLLABLE THIEUTH-OE-RIEULHIEUH +0xD204 # HANGUL SYLLABLE THIEUTH-OE-MIEUM +0xD205 # HANGUL SYLLABLE THIEUTH-OE-PIEUP +0xD206 # HANGUL SYLLABLE THIEUTH-OE-PIEUPSIOS +0xD207 # HANGUL SYLLABLE THIEUTH-OE-SIOS +0xD208 # HANGUL SYLLABLE THIEUTH-OE-SSANGSIOS +0xD209 # HANGUL SYLLABLE THIEUTH-OE-IEUNG +0xD20A # HANGUL SYLLABLE THIEUTH-OE-CIEUC +0xD20B # HANGUL SYLLABLE THIEUTH-OE-CHIEUCH +0xD20C # HANGUL SYLLABLE THIEUTH-OE-KHIEUKH +0xD20D # HANGUL SYLLABLE THIEUTH-OE-THIEUTH +0xD20E # HANGUL SYLLABLE THIEUTH-OE-PHIEUPH +0xD20F # HANGUL SYLLABLE THIEUTH-OE-HIEUH +0xD210 # HANGUL SYLLABLE THIEUTH-YO +0xD211 # HANGUL SYLLABLE THIEUTH-YO-KIYEOK +0xD212 # HANGUL SYLLABLE THIEUTH-YO-SSANGKIYEOK +0xD213 # HANGUL SYLLABLE THIEUTH-YO-KIYEOKSIOS +0xD214 # HANGUL SYLLABLE THIEUTH-YO-NIEUN +0xD215 # HANGUL SYLLABLE THIEUTH-YO-NIEUNCIEUC +0xD216 # HANGUL SYLLABLE THIEUTH-YO-NIEUNHIEUH +0xD217 # HANGUL SYLLABLE THIEUTH-YO-TIKEUT +0xD218 # HANGUL SYLLABLE THIEUTH-YO-RIEUL +0xD219 # HANGUL SYLLABLE THIEUTH-YO-RIEULKIYEOK +0xD21A # HANGUL SYLLABLE THIEUTH-YO-RIEULMIEUM +0xD21B # HANGUL SYLLABLE THIEUTH-YO-RIEULPIEUP +0xD21C # HANGUL SYLLABLE THIEUTH-YO-RIEULSIOS +0xD21D # HANGUL SYLLABLE THIEUTH-YO-RIEULTHIEUTH +0xD21E # HANGUL SYLLABLE THIEUTH-YO-RIEULPHIEUPH +0xD21F # HANGUL SYLLABLE THIEUTH-YO-RIEULHIEUH +0xD220 # HANGUL SYLLABLE THIEUTH-YO-MIEUM +0xD221 # HANGUL SYLLABLE THIEUTH-YO-PIEUP +0xD222 # HANGUL SYLLABLE THIEUTH-YO-PIEUPSIOS +0xD223 # HANGUL SYLLABLE THIEUTH-YO-SIOS +0xD224 # HANGUL SYLLABLE THIEUTH-YO-SSANGSIOS +0xD225 # HANGUL SYLLABLE THIEUTH-YO-IEUNG +0xD226 # HANGUL SYLLABLE THIEUTH-YO-CIEUC +0xD227 # HANGUL SYLLABLE THIEUTH-YO-CHIEUCH +0xD228 # HANGUL SYLLABLE THIEUTH-YO-KHIEUKH +0xD229 # HANGUL SYLLABLE THIEUTH-YO-THIEUTH +0xD22A # HANGUL SYLLABLE THIEUTH-YO-PHIEUPH +0xD22B # HANGUL SYLLABLE THIEUTH-YO-HIEUH +0xD22C # HANGUL SYLLABLE THIEUTH-U +0xD22D # HANGUL SYLLABLE THIEUTH-U-KIYEOK +0xD22E # HANGUL SYLLABLE THIEUTH-U-SSANGKIYEOK +0xD22F # HANGUL SYLLABLE THIEUTH-U-KIYEOKSIOS +0xD230 # HANGUL SYLLABLE THIEUTH-U-NIEUN +0xD231 # HANGUL SYLLABLE THIEUTH-U-NIEUNCIEUC +0xD232 # HANGUL SYLLABLE THIEUTH-U-NIEUNHIEUH +0xD233 # HANGUL SYLLABLE THIEUTH-U-TIKEUT +0xD234 # HANGUL SYLLABLE THIEUTH-U-RIEUL +0xD235 # HANGUL SYLLABLE THIEUTH-U-RIEULKIYEOK +0xD236 # HANGUL SYLLABLE THIEUTH-U-RIEULMIEUM +0xD237 # HANGUL SYLLABLE THIEUTH-U-RIEULPIEUP +0xD238 # HANGUL SYLLABLE THIEUTH-U-RIEULSIOS +0xD239 # HANGUL SYLLABLE THIEUTH-U-RIEULTHIEUTH +0xD23A # HANGUL SYLLABLE THIEUTH-U-RIEULPHIEUPH +0xD23B # HANGUL SYLLABLE THIEUTH-U-RIEULHIEUH +0xD23C # HANGUL SYLLABLE THIEUTH-U-MIEUM +0xD23D # HANGUL SYLLABLE THIEUTH-U-PIEUP +0xD23E # HANGUL SYLLABLE THIEUTH-U-PIEUPSIOS +0xD23F # HANGUL SYLLABLE THIEUTH-U-SIOS +0xD240 # HANGUL SYLLABLE THIEUTH-U-SSANGSIOS +0xD241 # HANGUL SYLLABLE THIEUTH-U-IEUNG +0xD242 # HANGUL SYLLABLE THIEUTH-U-CIEUC +0xD243 # HANGUL SYLLABLE THIEUTH-U-CHIEUCH +0xD244 # HANGUL SYLLABLE THIEUTH-U-KHIEUKH +0xD245 # HANGUL SYLLABLE THIEUTH-U-THIEUTH +0xD246 # HANGUL SYLLABLE THIEUTH-U-PHIEUPH +0xD247 # HANGUL SYLLABLE THIEUTH-U-HIEUH +0xD248 # HANGUL SYLLABLE THIEUTH-WEO +0xD249 # HANGUL SYLLABLE THIEUTH-WEO-KIYEOK +0xD24A # HANGUL SYLLABLE THIEUTH-WEO-SSANGKIYEOK +0xD24B # HANGUL SYLLABLE THIEUTH-WEO-KIYEOKSIOS +0xD24C # HANGUL SYLLABLE THIEUTH-WEO-NIEUN +0xD24D # HANGUL SYLLABLE THIEUTH-WEO-NIEUNCIEUC +0xD24E # HANGUL SYLLABLE THIEUTH-WEO-NIEUNHIEUH +0xD24F # HANGUL SYLLABLE THIEUTH-WEO-TIKEUT +0xD250 # HANGUL SYLLABLE THIEUTH-WEO-RIEUL +0xD251 # HANGUL SYLLABLE THIEUTH-WEO-RIEULKIYEOK +0xD252 # HANGUL SYLLABLE THIEUTH-WEO-RIEULMIEUM +0xD253 # HANGUL SYLLABLE THIEUTH-WEO-RIEULPIEUP +0xD254 # HANGUL SYLLABLE THIEUTH-WEO-RIEULSIOS +0xD255 # HANGUL SYLLABLE THIEUTH-WEO-RIEULTHIEUTH +0xD256 # HANGUL SYLLABLE THIEUTH-WEO-RIEULPHIEUPH +0xD257 # HANGUL SYLLABLE THIEUTH-WEO-RIEULHIEUH +0xD258 # HANGUL SYLLABLE THIEUTH-WEO-MIEUM +0xD259 # HANGUL SYLLABLE THIEUTH-WEO-PIEUP +0xD25A # HANGUL SYLLABLE THIEUTH-WEO-PIEUPSIOS +0xD25B # HANGUL SYLLABLE THIEUTH-WEO-SIOS +0xD25C # HANGUL SYLLABLE THIEUTH-WEO-SSANGSIOS +0xD25D # HANGUL SYLLABLE THIEUTH-WEO-IEUNG +0xD25E # HANGUL SYLLABLE THIEUTH-WEO-CIEUC +0xD25F # HANGUL SYLLABLE THIEUTH-WEO-CHIEUCH +0xD260 # HANGUL SYLLABLE THIEUTH-WEO-KHIEUKH +0xD261 # HANGUL SYLLABLE THIEUTH-WEO-THIEUTH +0xD262 # HANGUL SYLLABLE THIEUTH-WEO-PHIEUPH +0xD263 # HANGUL SYLLABLE THIEUTH-WEO-HIEUH +0xD264 # HANGUL SYLLABLE THIEUTH-WE +0xD265 # HANGUL SYLLABLE THIEUTH-WE-KIYEOK +0xD266 # HANGUL SYLLABLE THIEUTH-WE-SSANGKIYEOK +0xD267 # HANGUL SYLLABLE THIEUTH-WE-KIYEOKSIOS +0xD268 # HANGUL SYLLABLE THIEUTH-WE-NIEUN +0xD269 # HANGUL SYLLABLE THIEUTH-WE-NIEUNCIEUC +0xD26A # HANGUL SYLLABLE THIEUTH-WE-NIEUNHIEUH +0xD26B # HANGUL SYLLABLE THIEUTH-WE-TIKEUT +0xD26C # HANGUL SYLLABLE THIEUTH-WE-RIEUL +0xD26D # HANGUL SYLLABLE THIEUTH-WE-RIEULKIYEOK +0xD26E # HANGUL SYLLABLE THIEUTH-WE-RIEULMIEUM +0xD26F # HANGUL SYLLABLE THIEUTH-WE-RIEULPIEUP +0xD270 # HANGUL SYLLABLE THIEUTH-WE-RIEULSIOS +0xD271 # HANGUL SYLLABLE THIEUTH-WE-RIEULTHIEUTH +0xD272 # HANGUL SYLLABLE THIEUTH-WE-RIEULPHIEUPH +0xD273 # HANGUL SYLLABLE THIEUTH-WE-RIEULHIEUH +0xD274 # HANGUL SYLLABLE THIEUTH-WE-MIEUM +0xD275 # HANGUL SYLLABLE THIEUTH-WE-PIEUP +0xD276 # HANGUL SYLLABLE THIEUTH-WE-PIEUPSIOS +0xD277 # HANGUL SYLLABLE THIEUTH-WE-SIOS +0xD278 # HANGUL SYLLABLE THIEUTH-WE-SSANGSIOS +0xD279 # HANGUL SYLLABLE THIEUTH-WE-IEUNG +0xD27A # HANGUL SYLLABLE THIEUTH-WE-CIEUC +0xD27B # HANGUL SYLLABLE THIEUTH-WE-CHIEUCH +0xD27C # HANGUL SYLLABLE THIEUTH-WE-KHIEUKH +0xD27D # HANGUL SYLLABLE THIEUTH-WE-THIEUTH +0xD27E # HANGUL SYLLABLE THIEUTH-WE-PHIEUPH +0xD27F # HANGUL SYLLABLE THIEUTH-WE-HIEUH +0xD280 # HANGUL SYLLABLE THIEUTH-WI +0xD281 # HANGUL SYLLABLE THIEUTH-WI-KIYEOK +0xD282 # HANGUL SYLLABLE THIEUTH-WI-SSANGKIYEOK +0xD283 # HANGUL SYLLABLE THIEUTH-WI-KIYEOKSIOS +0xD284 # HANGUL SYLLABLE THIEUTH-WI-NIEUN +0xD285 # HANGUL SYLLABLE THIEUTH-WI-NIEUNCIEUC +0xD286 # HANGUL SYLLABLE THIEUTH-WI-NIEUNHIEUH +0xD287 # HANGUL SYLLABLE THIEUTH-WI-TIKEUT +0xD288 # HANGUL SYLLABLE THIEUTH-WI-RIEUL +0xD289 # HANGUL SYLLABLE THIEUTH-WI-RIEULKIYEOK +0xD28A # HANGUL SYLLABLE THIEUTH-WI-RIEULMIEUM +0xD28B # HANGUL SYLLABLE THIEUTH-WI-RIEULPIEUP +0xD28C # HANGUL SYLLABLE THIEUTH-WI-RIEULSIOS +0xD28D # HANGUL SYLLABLE THIEUTH-WI-RIEULTHIEUTH +0xD28E # HANGUL SYLLABLE THIEUTH-WI-RIEULPHIEUPH +0xD28F # HANGUL SYLLABLE THIEUTH-WI-RIEULHIEUH +0xD290 # HANGUL SYLLABLE THIEUTH-WI-MIEUM +0xD291 # HANGUL SYLLABLE THIEUTH-WI-PIEUP +0xD292 # HANGUL SYLLABLE THIEUTH-WI-PIEUPSIOS +0xD293 # HANGUL SYLLABLE THIEUTH-WI-SIOS +0xD294 # HANGUL SYLLABLE THIEUTH-WI-SSANGSIOS +0xD295 # HANGUL SYLLABLE THIEUTH-WI-IEUNG +0xD296 # HANGUL SYLLABLE THIEUTH-WI-CIEUC +0xD297 # HANGUL SYLLABLE THIEUTH-WI-CHIEUCH +0xD298 # HANGUL SYLLABLE THIEUTH-WI-KHIEUKH +0xD299 # HANGUL SYLLABLE THIEUTH-WI-THIEUTH +0xD29A # HANGUL SYLLABLE THIEUTH-WI-PHIEUPH +0xD29B # HANGUL SYLLABLE THIEUTH-WI-HIEUH +0xD29C # HANGUL SYLLABLE THIEUTH-YU +0xD29D # HANGUL SYLLABLE THIEUTH-YU-KIYEOK +0xD29E # HANGUL SYLLABLE THIEUTH-YU-SSANGKIYEOK +0xD29F # HANGUL SYLLABLE THIEUTH-YU-KIYEOKSIOS +0xD2A0 # HANGUL SYLLABLE THIEUTH-YU-NIEUN +0xD2A1 # HANGUL SYLLABLE THIEUTH-YU-NIEUNCIEUC +0xD2A2 # HANGUL SYLLABLE THIEUTH-YU-NIEUNHIEUH +0xD2A3 # HANGUL SYLLABLE THIEUTH-YU-TIKEUT +0xD2A4 # HANGUL SYLLABLE THIEUTH-YU-RIEUL +0xD2A5 # HANGUL SYLLABLE THIEUTH-YU-RIEULKIYEOK +0xD2A6 # HANGUL SYLLABLE THIEUTH-YU-RIEULMIEUM +0xD2A7 # HANGUL SYLLABLE THIEUTH-YU-RIEULPIEUP +0xD2A8 # HANGUL SYLLABLE THIEUTH-YU-RIEULSIOS +0xD2A9 # HANGUL SYLLABLE THIEUTH-YU-RIEULTHIEUTH +0xD2AA # HANGUL SYLLABLE THIEUTH-YU-RIEULPHIEUPH +0xD2AB # HANGUL SYLLABLE THIEUTH-YU-RIEULHIEUH +0xD2AC # HANGUL SYLLABLE THIEUTH-YU-MIEUM +0xD2AD # HANGUL SYLLABLE THIEUTH-YU-PIEUP +0xD2AE # HANGUL SYLLABLE THIEUTH-YU-PIEUPSIOS +0xD2AF # HANGUL SYLLABLE THIEUTH-YU-SIOS +0xD2B0 # HANGUL SYLLABLE THIEUTH-YU-SSANGSIOS +0xD2B1 # HANGUL SYLLABLE THIEUTH-YU-IEUNG +0xD2B2 # HANGUL SYLLABLE THIEUTH-YU-CIEUC +0xD2B3 # HANGUL SYLLABLE THIEUTH-YU-CHIEUCH +0xD2B4 # HANGUL SYLLABLE THIEUTH-YU-KHIEUKH +0xD2B5 # HANGUL SYLLABLE THIEUTH-YU-THIEUTH +0xD2B6 # HANGUL SYLLABLE THIEUTH-YU-PHIEUPH +0xD2B7 # HANGUL SYLLABLE THIEUTH-YU-HIEUH +0xD2B8 # HANGUL SYLLABLE THIEUTH-EU +0xD2B9 # HANGUL SYLLABLE THIEUTH-EU-KIYEOK +0xD2BA # HANGUL SYLLABLE THIEUTH-EU-SSANGKIYEOK +0xD2BB # HANGUL SYLLABLE THIEUTH-EU-KIYEOKSIOS +0xD2BC # HANGUL SYLLABLE THIEUTH-EU-NIEUN +0xD2BD # HANGUL SYLLABLE THIEUTH-EU-NIEUNCIEUC +0xD2BE # HANGUL SYLLABLE THIEUTH-EU-NIEUNHIEUH +0xD2BF # HANGUL SYLLABLE THIEUTH-EU-TIKEUT +0xD2C0 # HANGUL SYLLABLE THIEUTH-EU-RIEUL +0xD2C1 # HANGUL SYLLABLE THIEUTH-EU-RIEULKIYEOK +0xD2C2 # HANGUL SYLLABLE THIEUTH-EU-RIEULMIEUM +0xD2C3 # HANGUL SYLLABLE THIEUTH-EU-RIEULPIEUP +0xD2C4 # HANGUL SYLLABLE THIEUTH-EU-RIEULSIOS +0xD2C5 # HANGUL SYLLABLE THIEUTH-EU-RIEULTHIEUTH +0xD2C6 # HANGUL SYLLABLE THIEUTH-EU-RIEULPHIEUPH +0xD2C7 # HANGUL SYLLABLE THIEUTH-EU-RIEULHIEUH +0xD2C8 # HANGUL SYLLABLE THIEUTH-EU-MIEUM +0xD2C9 # HANGUL SYLLABLE THIEUTH-EU-PIEUP +0xD2CA # HANGUL SYLLABLE THIEUTH-EU-PIEUPSIOS +0xD2CB # HANGUL SYLLABLE THIEUTH-EU-SIOS +0xD2CC # HANGUL SYLLABLE THIEUTH-EU-SSANGSIOS +0xD2CD # HANGUL SYLLABLE THIEUTH-EU-IEUNG +0xD2CE # HANGUL SYLLABLE THIEUTH-EU-CIEUC +0xD2CF # HANGUL SYLLABLE THIEUTH-EU-CHIEUCH +0xD2D0 # HANGUL SYLLABLE THIEUTH-EU-KHIEUKH +0xD2D1 # HANGUL SYLLABLE THIEUTH-EU-THIEUTH +0xD2D2 # HANGUL SYLLABLE THIEUTH-EU-PHIEUPH +0xD2D3 # HANGUL SYLLABLE THIEUTH-EU-HIEUH +0xD2D4 # HANGUL SYLLABLE THIEUTH-YI +0xD2D5 # HANGUL SYLLABLE THIEUTH-YI-KIYEOK +0xD2D6 # HANGUL SYLLABLE THIEUTH-YI-SSANGKIYEOK +0xD2D7 # HANGUL SYLLABLE THIEUTH-YI-KIYEOKSIOS +0xD2D8 # HANGUL SYLLABLE THIEUTH-YI-NIEUN +0xD2D9 # HANGUL SYLLABLE THIEUTH-YI-NIEUNCIEUC +0xD2DA # HANGUL SYLLABLE THIEUTH-YI-NIEUNHIEUH +0xD2DB # HANGUL SYLLABLE THIEUTH-YI-TIKEUT +0xD2DC # HANGUL SYLLABLE THIEUTH-YI-RIEUL +0xD2DD # HANGUL SYLLABLE THIEUTH-YI-RIEULKIYEOK +0xD2DE # HANGUL SYLLABLE THIEUTH-YI-RIEULMIEUM +0xD2DF # HANGUL SYLLABLE THIEUTH-YI-RIEULPIEUP +0xD2E0 # HANGUL SYLLABLE THIEUTH-YI-RIEULSIOS +0xD2E1 # HANGUL SYLLABLE THIEUTH-YI-RIEULTHIEUTH +0xD2E2 # HANGUL SYLLABLE THIEUTH-YI-RIEULPHIEUPH +0xD2E3 # HANGUL SYLLABLE THIEUTH-YI-RIEULHIEUH +0xD2E4 # HANGUL SYLLABLE THIEUTH-YI-MIEUM +0xD2E5 # HANGUL SYLLABLE THIEUTH-YI-PIEUP +0xD2E6 # HANGUL SYLLABLE THIEUTH-YI-PIEUPSIOS +0xD2E7 # HANGUL SYLLABLE THIEUTH-YI-SIOS +0xD2E8 # HANGUL SYLLABLE THIEUTH-YI-SSANGSIOS +0xD2E9 # HANGUL SYLLABLE THIEUTH-YI-IEUNG +0xD2EA # HANGUL SYLLABLE THIEUTH-YI-CIEUC +0xD2EB # HANGUL SYLLABLE THIEUTH-YI-CHIEUCH +0xD2EC # HANGUL SYLLABLE THIEUTH-YI-KHIEUKH +0xD2ED # HANGUL SYLLABLE THIEUTH-YI-THIEUTH +0xD2EE # HANGUL SYLLABLE THIEUTH-YI-PHIEUPH +0xD2EF # HANGUL SYLLABLE THIEUTH-YI-HIEUH +0xD2F0 # HANGUL SYLLABLE THIEUTH-I +0xD2F1 # HANGUL SYLLABLE THIEUTH-I-KIYEOK +0xD2F2 # HANGUL SYLLABLE THIEUTH-I-SSANGKIYEOK +0xD2F3 # HANGUL SYLLABLE THIEUTH-I-KIYEOKSIOS +0xD2F4 # HANGUL SYLLABLE THIEUTH-I-NIEUN +0xD2F5 # HANGUL SYLLABLE THIEUTH-I-NIEUNCIEUC +0xD2F6 # HANGUL SYLLABLE THIEUTH-I-NIEUNHIEUH +0xD2F7 # HANGUL SYLLABLE THIEUTH-I-TIKEUT +0xD2F8 # HANGUL SYLLABLE THIEUTH-I-RIEUL +0xD2F9 # HANGUL SYLLABLE THIEUTH-I-RIEULKIYEOK +0xD2FA # HANGUL SYLLABLE THIEUTH-I-RIEULMIEUM +0xD2FB # HANGUL SYLLABLE THIEUTH-I-RIEULPIEUP +0xD2FC # HANGUL SYLLABLE THIEUTH-I-RIEULSIOS +0xD2FD # HANGUL SYLLABLE THIEUTH-I-RIEULTHIEUTH +0xD2FE # HANGUL SYLLABLE THIEUTH-I-RIEULPHIEUPH +0xD2FF # HANGUL SYLLABLE THIEUTH-I-RIEULHIEUH +0xD300 # HANGUL SYLLABLE THIEUTH-I-MIEUM +0xD301 # HANGUL SYLLABLE THIEUTH-I-PIEUP +0xD302 # HANGUL SYLLABLE THIEUTH-I-PIEUPSIOS +0xD303 # HANGUL SYLLABLE THIEUTH-I-SIOS +0xD304 # HANGUL SYLLABLE THIEUTH-I-SSANGSIOS +0xD305 # HANGUL SYLLABLE THIEUTH-I-IEUNG +0xD306 # HANGUL SYLLABLE THIEUTH-I-CIEUC +0xD307 # HANGUL SYLLABLE THIEUTH-I-CHIEUCH +0xD308 # HANGUL SYLLABLE THIEUTH-I-KHIEUKH +0xD309 # HANGUL SYLLABLE THIEUTH-I-THIEUTH +0xD30A # HANGUL SYLLABLE THIEUTH-I-PHIEUPH +0xD30B # HANGUL SYLLABLE THIEUTH-I-HIEUH +0xD30C # HANGUL SYLLABLE PHIEUPH-A +0xD30D # HANGUL SYLLABLE PHIEUPH-A-KIYEOK +0xD30E # HANGUL SYLLABLE PHIEUPH-A-SSANGKIYEOK +0xD30F # HANGUL SYLLABLE PHIEUPH-A-KIYEOKSIOS +0xD310 # HANGUL SYLLABLE PHIEUPH-A-NIEUN +0xD311 # HANGUL SYLLABLE PHIEUPH-A-NIEUNCIEUC +0xD312 # HANGUL SYLLABLE PHIEUPH-A-NIEUNHIEUH +0xD313 # HANGUL SYLLABLE PHIEUPH-A-TIKEUT +0xD314 # HANGUL SYLLABLE PHIEUPH-A-RIEUL +0xD315 # HANGUL SYLLABLE PHIEUPH-A-RIEULKIYEOK +0xD316 # HANGUL SYLLABLE PHIEUPH-A-RIEULMIEUM +0xD317 # HANGUL SYLLABLE PHIEUPH-A-RIEULPIEUP +0xD318 # HANGUL SYLLABLE PHIEUPH-A-RIEULSIOS +0xD319 # HANGUL SYLLABLE PHIEUPH-A-RIEULTHIEUTH +0xD31A # HANGUL SYLLABLE PHIEUPH-A-RIEULPHIEUPH +0xD31B # HANGUL SYLLABLE PHIEUPH-A-RIEULHIEUH +0xD31C # HANGUL SYLLABLE PHIEUPH-A-MIEUM +0xD31D # HANGUL SYLLABLE PHIEUPH-A-PIEUP +0xD31E # HANGUL SYLLABLE PHIEUPH-A-PIEUPSIOS +0xD31F # HANGUL SYLLABLE PHIEUPH-A-SIOS +0xD320 # HANGUL SYLLABLE PHIEUPH-A-SSANGSIOS +0xD321 # HANGUL SYLLABLE PHIEUPH-A-IEUNG +0xD322 # HANGUL SYLLABLE PHIEUPH-A-CIEUC +0xD323 # HANGUL SYLLABLE PHIEUPH-A-CHIEUCH +0xD324 # HANGUL SYLLABLE PHIEUPH-A-KHIEUKH +0xD325 # HANGUL SYLLABLE PHIEUPH-A-THIEUTH +0xD326 # HANGUL SYLLABLE PHIEUPH-A-PHIEUPH +0xD327 # HANGUL SYLLABLE PHIEUPH-A-HIEUH +0xD328 # HANGUL SYLLABLE PHIEUPH-AE +0xD329 # HANGUL SYLLABLE PHIEUPH-AE-KIYEOK +0xD32A # HANGUL SYLLABLE PHIEUPH-AE-SSANGKIYEOK +0xD32B # HANGUL SYLLABLE PHIEUPH-AE-KIYEOKSIOS +0xD32C # HANGUL SYLLABLE PHIEUPH-AE-NIEUN +0xD32D # HANGUL SYLLABLE PHIEUPH-AE-NIEUNCIEUC +0xD32E # HANGUL SYLLABLE PHIEUPH-AE-NIEUNHIEUH +0xD32F # HANGUL SYLLABLE PHIEUPH-AE-TIKEUT +0xD330 # HANGUL SYLLABLE PHIEUPH-AE-RIEUL +0xD331 # HANGUL SYLLABLE PHIEUPH-AE-RIEULKIYEOK +0xD332 # HANGUL SYLLABLE PHIEUPH-AE-RIEULMIEUM +0xD333 # HANGUL SYLLABLE PHIEUPH-AE-RIEULPIEUP +0xD334 # HANGUL SYLLABLE PHIEUPH-AE-RIEULSIOS +0xD335 # HANGUL SYLLABLE PHIEUPH-AE-RIEULTHIEUTH +0xD336 # HANGUL SYLLABLE PHIEUPH-AE-RIEULPHIEUPH +0xD337 # HANGUL SYLLABLE PHIEUPH-AE-RIEULHIEUH +0xD338 # HANGUL SYLLABLE PHIEUPH-AE-MIEUM +0xD339 # HANGUL SYLLABLE PHIEUPH-AE-PIEUP +0xD33A # HANGUL SYLLABLE PHIEUPH-AE-PIEUPSIOS +0xD33B # HANGUL SYLLABLE PHIEUPH-AE-SIOS +0xD33C # HANGUL SYLLABLE PHIEUPH-AE-SSANGSIOS +0xD33D # HANGUL SYLLABLE PHIEUPH-AE-IEUNG +0xD33E # HANGUL SYLLABLE PHIEUPH-AE-CIEUC +0xD33F # HANGUL SYLLABLE PHIEUPH-AE-CHIEUCH +0xD340 # HANGUL SYLLABLE PHIEUPH-AE-KHIEUKH +0xD341 # HANGUL SYLLABLE PHIEUPH-AE-THIEUTH +0xD342 # HANGUL SYLLABLE PHIEUPH-AE-PHIEUPH +0xD343 # HANGUL SYLLABLE PHIEUPH-AE-HIEUH +0xD344 # HANGUL SYLLABLE PHIEUPH-YA +0xD345 # HANGUL SYLLABLE PHIEUPH-YA-KIYEOK +0xD346 # HANGUL SYLLABLE PHIEUPH-YA-SSANGKIYEOK +0xD347 # HANGUL SYLLABLE PHIEUPH-YA-KIYEOKSIOS +0xD348 # HANGUL SYLLABLE PHIEUPH-YA-NIEUN +0xD349 # HANGUL SYLLABLE PHIEUPH-YA-NIEUNCIEUC +0xD34A # HANGUL SYLLABLE PHIEUPH-YA-NIEUNHIEUH +0xD34B # HANGUL SYLLABLE PHIEUPH-YA-TIKEUT +0xD34C # HANGUL SYLLABLE PHIEUPH-YA-RIEUL +0xD34D # HANGUL SYLLABLE PHIEUPH-YA-RIEULKIYEOK +0xD34E # HANGUL SYLLABLE PHIEUPH-YA-RIEULMIEUM +0xD34F # HANGUL SYLLABLE PHIEUPH-YA-RIEULPIEUP +0xD350 # HANGUL SYLLABLE PHIEUPH-YA-RIEULSIOS +0xD351 # HANGUL SYLLABLE PHIEUPH-YA-RIEULTHIEUTH +0xD352 # HANGUL SYLLABLE PHIEUPH-YA-RIEULPHIEUPH +0xD353 # HANGUL SYLLABLE PHIEUPH-YA-RIEULHIEUH +0xD354 # HANGUL SYLLABLE PHIEUPH-YA-MIEUM +0xD355 # HANGUL SYLLABLE PHIEUPH-YA-PIEUP +0xD356 # HANGUL SYLLABLE PHIEUPH-YA-PIEUPSIOS +0xD357 # HANGUL SYLLABLE PHIEUPH-YA-SIOS +0xD358 # HANGUL SYLLABLE PHIEUPH-YA-SSANGSIOS +0xD359 # HANGUL SYLLABLE PHIEUPH-YA-IEUNG +0xD35A # HANGUL SYLLABLE PHIEUPH-YA-CIEUC +0xD35B # HANGUL SYLLABLE PHIEUPH-YA-CHIEUCH +0xD35C # HANGUL SYLLABLE PHIEUPH-YA-KHIEUKH +0xD35D # HANGUL SYLLABLE PHIEUPH-YA-THIEUTH +0xD35E # HANGUL SYLLABLE PHIEUPH-YA-PHIEUPH +0xD35F # HANGUL SYLLABLE PHIEUPH-YA-HIEUH +0xD360 # HANGUL SYLLABLE PHIEUPH-YAE +0xD361 # HANGUL SYLLABLE PHIEUPH-YAE-KIYEOK +0xD362 # HANGUL SYLLABLE PHIEUPH-YAE-SSANGKIYEOK +0xD363 # HANGUL SYLLABLE PHIEUPH-YAE-KIYEOKSIOS +0xD364 # HANGUL SYLLABLE PHIEUPH-YAE-NIEUN +0xD365 # HANGUL SYLLABLE PHIEUPH-YAE-NIEUNCIEUC +0xD366 # HANGUL SYLLABLE PHIEUPH-YAE-NIEUNHIEUH +0xD367 # HANGUL SYLLABLE PHIEUPH-YAE-TIKEUT +0xD368 # HANGUL SYLLABLE PHIEUPH-YAE-RIEUL +0xD369 # HANGUL SYLLABLE PHIEUPH-YAE-RIEULKIYEOK +0xD36A # HANGUL SYLLABLE PHIEUPH-YAE-RIEULMIEUM +0xD36B # HANGUL SYLLABLE PHIEUPH-YAE-RIEULPIEUP +0xD36C # HANGUL SYLLABLE PHIEUPH-YAE-RIEULSIOS +0xD36D # HANGUL SYLLABLE PHIEUPH-YAE-RIEULTHIEUTH +0xD36E # HANGUL SYLLABLE PHIEUPH-YAE-RIEULPHIEUPH +0xD36F # HANGUL SYLLABLE PHIEUPH-YAE-RIEULHIEUH +0xD370 # HANGUL SYLLABLE PHIEUPH-YAE-MIEUM +0xD371 # HANGUL SYLLABLE PHIEUPH-YAE-PIEUP +0xD372 # HANGUL SYLLABLE PHIEUPH-YAE-PIEUPSIOS +0xD373 # HANGUL SYLLABLE PHIEUPH-YAE-SIOS +0xD374 # HANGUL SYLLABLE PHIEUPH-YAE-SSANGSIOS +0xD375 # HANGUL SYLLABLE PHIEUPH-YAE-IEUNG +0xD376 # HANGUL SYLLABLE PHIEUPH-YAE-CIEUC +0xD377 # HANGUL SYLLABLE PHIEUPH-YAE-CHIEUCH +0xD378 # HANGUL SYLLABLE PHIEUPH-YAE-KHIEUKH +0xD379 # HANGUL SYLLABLE PHIEUPH-YAE-THIEUTH +0xD37A # HANGUL SYLLABLE PHIEUPH-YAE-PHIEUPH +0xD37B # HANGUL SYLLABLE PHIEUPH-YAE-HIEUH +0xD37C # HANGUL SYLLABLE PHIEUPH-EO +0xD37D # HANGUL SYLLABLE PHIEUPH-EO-KIYEOK +0xD37E # HANGUL SYLLABLE PHIEUPH-EO-SSANGKIYEOK +0xD37F # HANGUL SYLLABLE PHIEUPH-EO-KIYEOKSIOS +0xD380 # HANGUL SYLLABLE PHIEUPH-EO-NIEUN +0xD381 # HANGUL SYLLABLE PHIEUPH-EO-NIEUNCIEUC +0xD382 # HANGUL SYLLABLE PHIEUPH-EO-NIEUNHIEUH +0xD383 # HANGUL SYLLABLE PHIEUPH-EO-TIKEUT +0xD384 # HANGUL SYLLABLE PHIEUPH-EO-RIEUL +0xD385 # HANGUL SYLLABLE PHIEUPH-EO-RIEULKIYEOK +0xD386 # HANGUL SYLLABLE PHIEUPH-EO-RIEULMIEUM +0xD387 # HANGUL SYLLABLE PHIEUPH-EO-RIEULPIEUP +0xD388 # HANGUL SYLLABLE PHIEUPH-EO-RIEULSIOS +0xD389 # HANGUL SYLLABLE PHIEUPH-EO-RIEULTHIEUTH +0xD38A # HANGUL SYLLABLE PHIEUPH-EO-RIEULPHIEUPH +0xD38B # HANGUL SYLLABLE PHIEUPH-EO-RIEULHIEUH +0xD38C # HANGUL SYLLABLE PHIEUPH-EO-MIEUM +0xD38D # HANGUL SYLLABLE PHIEUPH-EO-PIEUP +0xD38E # HANGUL SYLLABLE PHIEUPH-EO-PIEUPSIOS +0xD38F # HANGUL SYLLABLE PHIEUPH-EO-SIOS +0xD390 # HANGUL SYLLABLE PHIEUPH-EO-SSANGSIOS +0xD391 # HANGUL SYLLABLE PHIEUPH-EO-IEUNG +0xD392 # HANGUL SYLLABLE PHIEUPH-EO-CIEUC +0xD393 # HANGUL SYLLABLE PHIEUPH-EO-CHIEUCH +0xD394 # HANGUL SYLLABLE PHIEUPH-EO-KHIEUKH +0xD395 # HANGUL SYLLABLE PHIEUPH-EO-THIEUTH +0xD396 # HANGUL SYLLABLE PHIEUPH-EO-PHIEUPH +0xD397 # HANGUL SYLLABLE PHIEUPH-EO-HIEUH +0xD398 # HANGUL SYLLABLE PHIEUPH-E +0xD399 # HANGUL SYLLABLE PHIEUPH-E-KIYEOK +0xD39A # HANGUL SYLLABLE PHIEUPH-E-SSANGKIYEOK +0xD39B # HANGUL SYLLABLE PHIEUPH-E-KIYEOKSIOS +0xD39C # HANGUL SYLLABLE PHIEUPH-E-NIEUN +0xD39D # HANGUL SYLLABLE PHIEUPH-E-NIEUNCIEUC +0xD39E # HANGUL SYLLABLE PHIEUPH-E-NIEUNHIEUH +0xD39F # HANGUL SYLLABLE PHIEUPH-E-TIKEUT +0xD3A0 # HANGUL SYLLABLE PHIEUPH-E-RIEUL +0xD3A1 # HANGUL SYLLABLE PHIEUPH-E-RIEULKIYEOK +0xD3A2 # HANGUL SYLLABLE PHIEUPH-E-RIEULMIEUM +0xD3A3 # HANGUL SYLLABLE PHIEUPH-E-RIEULPIEUP +0xD3A4 # HANGUL SYLLABLE PHIEUPH-E-RIEULSIOS +0xD3A5 # HANGUL SYLLABLE PHIEUPH-E-RIEULTHIEUTH +0xD3A6 # HANGUL SYLLABLE PHIEUPH-E-RIEULPHIEUPH +0xD3A7 # HANGUL SYLLABLE PHIEUPH-E-RIEULHIEUH +0xD3A8 # HANGUL SYLLABLE PHIEUPH-E-MIEUM +0xD3A9 # HANGUL SYLLABLE PHIEUPH-E-PIEUP +0xD3AA # HANGUL SYLLABLE PHIEUPH-E-PIEUPSIOS +0xD3AB # HANGUL SYLLABLE PHIEUPH-E-SIOS +0xD3AC # HANGUL SYLLABLE PHIEUPH-E-SSANGSIOS +0xD3AD # HANGUL SYLLABLE PHIEUPH-E-IEUNG +0xD3AE # HANGUL SYLLABLE PHIEUPH-E-CIEUC +0xD3AF # HANGUL SYLLABLE PHIEUPH-E-CHIEUCH +0xD3B0 # HANGUL SYLLABLE PHIEUPH-E-KHIEUKH +0xD3B1 # HANGUL SYLLABLE PHIEUPH-E-THIEUTH +0xD3B2 # HANGUL SYLLABLE PHIEUPH-E-PHIEUPH +0xD3B3 # HANGUL SYLLABLE PHIEUPH-E-HIEUH +0xD3B4 # HANGUL SYLLABLE PHIEUPH-YEO +0xD3B5 # HANGUL SYLLABLE PHIEUPH-YEO-KIYEOK +0xD3B6 # HANGUL SYLLABLE PHIEUPH-YEO-SSANGKIYEOK +0xD3B7 # HANGUL SYLLABLE PHIEUPH-YEO-KIYEOKSIOS +0xD3B8 # HANGUL SYLLABLE PHIEUPH-YEO-NIEUN +0xD3B9 # HANGUL SYLLABLE PHIEUPH-YEO-NIEUNCIEUC +0xD3BA # HANGUL SYLLABLE PHIEUPH-YEO-NIEUNHIEUH +0xD3BB # HANGUL SYLLABLE PHIEUPH-YEO-TIKEUT +0xD3BC # HANGUL SYLLABLE PHIEUPH-YEO-RIEUL +0xD3BD # HANGUL SYLLABLE PHIEUPH-YEO-RIEULKIYEOK +0xD3BE # HANGUL SYLLABLE PHIEUPH-YEO-RIEULMIEUM +0xD3BF # HANGUL SYLLABLE PHIEUPH-YEO-RIEULPIEUP +0xD3C0 # HANGUL SYLLABLE PHIEUPH-YEO-RIEULSIOS +0xD3C1 # HANGUL SYLLABLE PHIEUPH-YEO-RIEULTHIEUTH +0xD3C2 # HANGUL SYLLABLE PHIEUPH-YEO-RIEULPHIEUPH +0xD3C3 # HANGUL SYLLABLE PHIEUPH-YEO-RIEULHIEUH +0xD3C4 # HANGUL SYLLABLE PHIEUPH-YEO-MIEUM +0xD3C5 # HANGUL SYLLABLE PHIEUPH-YEO-PIEUP +0xD3C6 # HANGUL SYLLABLE PHIEUPH-YEO-PIEUPSIOS +0xD3C7 # HANGUL SYLLABLE PHIEUPH-YEO-SIOS +0xD3C8 # HANGUL SYLLABLE PHIEUPH-YEO-SSANGSIOS +0xD3C9 # HANGUL SYLLABLE PHIEUPH-YEO-IEUNG +0xD3CA # HANGUL SYLLABLE PHIEUPH-YEO-CIEUC +0xD3CB # HANGUL SYLLABLE PHIEUPH-YEO-CHIEUCH +0xD3CC # HANGUL SYLLABLE PHIEUPH-YEO-KHIEUKH +0xD3CD # HANGUL SYLLABLE PHIEUPH-YEO-THIEUTH +0xD3CE # HANGUL SYLLABLE PHIEUPH-YEO-PHIEUPH +0xD3CF # HANGUL SYLLABLE PHIEUPH-YEO-HIEUH +0xD3D0 # HANGUL SYLLABLE PHIEUPH-YE +0xD3D1 # HANGUL SYLLABLE PHIEUPH-YE-KIYEOK +0xD3D2 # HANGUL SYLLABLE PHIEUPH-YE-SSANGKIYEOK +0xD3D3 # HANGUL SYLLABLE PHIEUPH-YE-KIYEOKSIOS +0xD3D4 # HANGUL SYLLABLE PHIEUPH-YE-NIEUN +0xD3D5 # HANGUL SYLLABLE PHIEUPH-YE-NIEUNCIEUC +0xD3D6 # HANGUL SYLLABLE PHIEUPH-YE-NIEUNHIEUH +0xD3D7 # HANGUL SYLLABLE PHIEUPH-YE-TIKEUT +0xD3D8 # HANGUL SYLLABLE PHIEUPH-YE-RIEUL +0xD3D9 # HANGUL SYLLABLE PHIEUPH-YE-RIEULKIYEOK +0xD3DA # HANGUL SYLLABLE PHIEUPH-YE-RIEULMIEUM +0xD3DB # HANGUL SYLLABLE PHIEUPH-YE-RIEULPIEUP +0xD3DC # HANGUL SYLLABLE PHIEUPH-YE-RIEULSIOS +0xD3DD # HANGUL SYLLABLE PHIEUPH-YE-RIEULTHIEUTH +0xD3DE # HANGUL SYLLABLE PHIEUPH-YE-RIEULPHIEUPH +0xD3DF # HANGUL SYLLABLE PHIEUPH-YE-RIEULHIEUH +0xD3E0 # HANGUL SYLLABLE PHIEUPH-YE-MIEUM +0xD3E1 # HANGUL SYLLABLE PHIEUPH-YE-PIEUP +0xD3E2 # HANGUL SYLLABLE PHIEUPH-YE-PIEUPSIOS +0xD3E3 # HANGUL SYLLABLE PHIEUPH-YE-SIOS +0xD3E4 # HANGUL SYLLABLE PHIEUPH-YE-SSANGSIOS +0xD3E5 # HANGUL SYLLABLE PHIEUPH-YE-IEUNG +0xD3E6 # HANGUL SYLLABLE PHIEUPH-YE-CIEUC +0xD3E7 # HANGUL SYLLABLE PHIEUPH-YE-CHIEUCH +0xD3E8 # HANGUL SYLLABLE PHIEUPH-YE-KHIEUKH +0xD3E9 # HANGUL SYLLABLE PHIEUPH-YE-THIEUTH +0xD3EA # HANGUL SYLLABLE PHIEUPH-YE-PHIEUPH +0xD3EB # HANGUL SYLLABLE PHIEUPH-YE-HIEUH +0xD3EC # HANGUL SYLLABLE PHIEUPH-O +0xD3ED # HANGUL SYLLABLE PHIEUPH-O-KIYEOK +0xD3EE # HANGUL SYLLABLE PHIEUPH-O-SSANGKIYEOK +0xD3EF # HANGUL SYLLABLE PHIEUPH-O-KIYEOKSIOS +0xD3F0 # HANGUL SYLLABLE PHIEUPH-O-NIEUN +0xD3F1 # HANGUL SYLLABLE PHIEUPH-O-NIEUNCIEUC +0xD3F2 # HANGUL SYLLABLE PHIEUPH-O-NIEUNHIEUH +0xD3F3 # HANGUL SYLLABLE PHIEUPH-O-TIKEUT +0xD3F4 # HANGUL SYLLABLE PHIEUPH-O-RIEUL +0xD3F5 # HANGUL SYLLABLE PHIEUPH-O-RIEULKIYEOK +0xD3F6 # HANGUL SYLLABLE PHIEUPH-O-RIEULMIEUM +0xD3F7 # HANGUL SYLLABLE PHIEUPH-O-RIEULPIEUP +0xD3F8 # HANGUL SYLLABLE PHIEUPH-O-RIEULSIOS +0xD3F9 # HANGUL SYLLABLE PHIEUPH-O-RIEULTHIEUTH +0xD3FA # HANGUL SYLLABLE PHIEUPH-O-RIEULPHIEUPH +0xD3FB # HANGUL SYLLABLE PHIEUPH-O-RIEULHIEUH +0xD3FC # HANGUL SYLLABLE PHIEUPH-O-MIEUM +0xD3FD # HANGUL SYLLABLE PHIEUPH-O-PIEUP +0xD3FE # HANGUL SYLLABLE PHIEUPH-O-PIEUPSIOS +0xD3FF # HANGUL SYLLABLE PHIEUPH-O-SIOS +0xD400 # HANGUL SYLLABLE PHIEUPH-O-SSANGSIOS +0xD401 # HANGUL SYLLABLE PHIEUPH-O-IEUNG +0xD402 # HANGUL SYLLABLE PHIEUPH-O-CIEUC +0xD403 # HANGUL SYLLABLE PHIEUPH-O-CHIEUCH +0xD404 # HANGUL SYLLABLE PHIEUPH-O-KHIEUKH +0xD405 # HANGUL SYLLABLE PHIEUPH-O-THIEUTH +0xD406 # HANGUL SYLLABLE PHIEUPH-O-PHIEUPH +0xD407 # HANGUL SYLLABLE PHIEUPH-O-HIEUH +0xD408 # HANGUL SYLLABLE PHIEUPH-WA +0xD409 # HANGUL SYLLABLE PHIEUPH-WA-KIYEOK +0xD40A # HANGUL SYLLABLE PHIEUPH-WA-SSANGKIYEOK +0xD40B # HANGUL SYLLABLE PHIEUPH-WA-KIYEOKSIOS +0xD40C # HANGUL SYLLABLE PHIEUPH-WA-NIEUN +0xD40D # HANGUL SYLLABLE PHIEUPH-WA-NIEUNCIEUC +0xD40E # HANGUL SYLLABLE PHIEUPH-WA-NIEUNHIEUH +0xD40F # HANGUL SYLLABLE PHIEUPH-WA-TIKEUT +0xD410 # HANGUL SYLLABLE PHIEUPH-WA-RIEUL +0xD411 # HANGUL SYLLABLE PHIEUPH-WA-RIEULKIYEOK +0xD412 # HANGUL SYLLABLE PHIEUPH-WA-RIEULMIEUM +0xD413 # HANGUL SYLLABLE PHIEUPH-WA-RIEULPIEUP +0xD414 # HANGUL SYLLABLE PHIEUPH-WA-RIEULSIOS +0xD415 # HANGUL SYLLABLE PHIEUPH-WA-RIEULTHIEUTH +0xD416 # HANGUL SYLLABLE PHIEUPH-WA-RIEULPHIEUPH +0xD417 # HANGUL SYLLABLE PHIEUPH-WA-RIEULHIEUH +0xD418 # HANGUL SYLLABLE PHIEUPH-WA-MIEUM +0xD419 # HANGUL SYLLABLE PHIEUPH-WA-PIEUP +0xD41A # HANGUL SYLLABLE PHIEUPH-WA-PIEUPSIOS +0xD41B # HANGUL SYLLABLE PHIEUPH-WA-SIOS +0xD41C # HANGUL SYLLABLE PHIEUPH-WA-SSANGSIOS +0xD41D # HANGUL SYLLABLE PHIEUPH-WA-IEUNG +0xD41E # HANGUL SYLLABLE PHIEUPH-WA-CIEUC +0xD41F # HANGUL SYLLABLE PHIEUPH-WA-CHIEUCH +0xD420 # HANGUL SYLLABLE PHIEUPH-WA-KHIEUKH +0xD421 # HANGUL SYLLABLE PHIEUPH-WA-THIEUTH +0xD422 # HANGUL SYLLABLE PHIEUPH-WA-PHIEUPH +0xD423 # HANGUL SYLLABLE PHIEUPH-WA-HIEUH +0xD424 # HANGUL SYLLABLE PHIEUPH-WAE +0xD425 # HANGUL SYLLABLE PHIEUPH-WAE-KIYEOK +0xD426 # HANGUL SYLLABLE PHIEUPH-WAE-SSANGKIYEOK +0xD427 # HANGUL SYLLABLE PHIEUPH-WAE-KIYEOKSIOS +0xD428 # HANGUL SYLLABLE PHIEUPH-WAE-NIEUN +0xD429 # HANGUL SYLLABLE PHIEUPH-WAE-NIEUNCIEUC +0xD42A # HANGUL SYLLABLE PHIEUPH-WAE-NIEUNHIEUH +0xD42B # HANGUL SYLLABLE PHIEUPH-WAE-TIKEUT +0xD42C # HANGUL SYLLABLE PHIEUPH-WAE-RIEUL +0xD42D # HANGUL SYLLABLE PHIEUPH-WAE-RIEULKIYEOK +0xD42E # HANGUL SYLLABLE PHIEUPH-WAE-RIEULMIEUM +0xD42F # HANGUL SYLLABLE PHIEUPH-WAE-RIEULPIEUP +0xD430 # HANGUL SYLLABLE PHIEUPH-WAE-RIEULSIOS +0xD431 # HANGUL SYLLABLE PHIEUPH-WAE-RIEULTHIEUTH +0xD432 # HANGUL SYLLABLE PHIEUPH-WAE-RIEULPHIEUPH +0xD433 # HANGUL SYLLABLE PHIEUPH-WAE-RIEULHIEUH +0xD434 # HANGUL SYLLABLE PHIEUPH-WAE-MIEUM +0xD435 # HANGUL SYLLABLE PHIEUPH-WAE-PIEUP +0xD436 # HANGUL SYLLABLE PHIEUPH-WAE-PIEUPSIOS +0xD437 # HANGUL SYLLABLE PHIEUPH-WAE-SIOS +0xD438 # HANGUL SYLLABLE PHIEUPH-WAE-SSANGSIOS +0xD439 # HANGUL SYLLABLE PHIEUPH-WAE-IEUNG +0xD43A # HANGUL SYLLABLE PHIEUPH-WAE-CIEUC +0xD43B # HANGUL SYLLABLE PHIEUPH-WAE-CHIEUCH +0xD43C # HANGUL SYLLABLE PHIEUPH-WAE-KHIEUKH +0xD43D # HANGUL SYLLABLE PHIEUPH-WAE-THIEUTH +0xD43E # HANGUL SYLLABLE PHIEUPH-WAE-PHIEUPH +0xD43F # HANGUL SYLLABLE PHIEUPH-WAE-HIEUH +0xD440 # HANGUL SYLLABLE PHIEUPH-OE +0xD441 # HANGUL SYLLABLE PHIEUPH-OE-KIYEOK +0xD442 # HANGUL SYLLABLE PHIEUPH-OE-SSANGKIYEOK +0xD443 # HANGUL SYLLABLE PHIEUPH-OE-KIYEOKSIOS +0xD444 # HANGUL SYLLABLE PHIEUPH-OE-NIEUN +0xD445 # HANGUL SYLLABLE PHIEUPH-OE-NIEUNCIEUC +0xD446 # HANGUL SYLLABLE PHIEUPH-OE-NIEUNHIEUH +0xD447 # HANGUL SYLLABLE PHIEUPH-OE-TIKEUT +0xD448 # HANGUL SYLLABLE PHIEUPH-OE-RIEUL +0xD449 # HANGUL SYLLABLE PHIEUPH-OE-RIEULKIYEOK +0xD44A # HANGUL SYLLABLE PHIEUPH-OE-RIEULMIEUM +0xD44B # HANGUL SYLLABLE PHIEUPH-OE-RIEULPIEUP +0xD44C # HANGUL SYLLABLE PHIEUPH-OE-RIEULSIOS +0xD44D # HANGUL SYLLABLE PHIEUPH-OE-RIEULTHIEUTH +0xD44E # HANGUL SYLLABLE PHIEUPH-OE-RIEULPHIEUPH +0xD44F # HANGUL SYLLABLE PHIEUPH-OE-RIEULHIEUH +0xD450 # HANGUL SYLLABLE PHIEUPH-OE-MIEUM +0xD451 # HANGUL SYLLABLE PHIEUPH-OE-PIEUP +0xD452 # HANGUL SYLLABLE PHIEUPH-OE-PIEUPSIOS +0xD453 # HANGUL SYLLABLE PHIEUPH-OE-SIOS +0xD454 # HANGUL SYLLABLE PHIEUPH-OE-SSANGSIOS +0xD455 # HANGUL SYLLABLE PHIEUPH-OE-IEUNG +0xD456 # HANGUL SYLLABLE PHIEUPH-OE-CIEUC +0xD457 # HANGUL SYLLABLE PHIEUPH-OE-CHIEUCH +0xD458 # HANGUL SYLLABLE PHIEUPH-OE-KHIEUKH +0xD459 # HANGUL SYLLABLE PHIEUPH-OE-THIEUTH +0xD45A # HANGUL SYLLABLE PHIEUPH-OE-PHIEUPH +0xD45B # HANGUL SYLLABLE PHIEUPH-OE-HIEUH +0xD45C # HANGUL SYLLABLE PHIEUPH-YO +0xD45D # HANGUL SYLLABLE PHIEUPH-YO-KIYEOK +0xD45E # HANGUL SYLLABLE PHIEUPH-YO-SSANGKIYEOK +0xD45F # HANGUL SYLLABLE PHIEUPH-YO-KIYEOKSIOS +0xD460 # HANGUL SYLLABLE PHIEUPH-YO-NIEUN +0xD461 # HANGUL SYLLABLE PHIEUPH-YO-NIEUNCIEUC +0xD462 # HANGUL SYLLABLE PHIEUPH-YO-NIEUNHIEUH +0xD463 # HANGUL SYLLABLE PHIEUPH-YO-TIKEUT +0xD464 # HANGUL SYLLABLE PHIEUPH-YO-RIEUL +0xD465 # HANGUL SYLLABLE PHIEUPH-YO-RIEULKIYEOK +0xD466 # HANGUL SYLLABLE PHIEUPH-YO-RIEULMIEUM +0xD467 # HANGUL SYLLABLE PHIEUPH-YO-RIEULPIEUP +0xD468 # HANGUL SYLLABLE PHIEUPH-YO-RIEULSIOS +0xD469 # HANGUL SYLLABLE PHIEUPH-YO-RIEULTHIEUTH +0xD46A # HANGUL SYLLABLE PHIEUPH-YO-RIEULPHIEUPH +0xD46B # HANGUL SYLLABLE PHIEUPH-YO-RIEULHIEUH +0xD46C # HANGUL SYLLABLE PHIEUPH-YO-MIEUM +0xD46D # HANGUL SYLLABLE PHIEUPH-YO-PIEUP +0xD46E # HANGUL SYLLABLE PHIEUPH-YO-PIEUPSIOS +0xD46F # HANGUL SYLLABLE PHIEUPH-YO-SIOS +0xD470 # HANGUL SYLLABLE PHIEUPH-YO-SSANGSIOS +0xD471 # HANGUL SYLLABLE PHIEUPH-YO-IEUNG +0xD472 # HANGUL SYLLABLE PHIEUPH-YO-CIEUC +0xD473 # HANGUL SYLLABLE PHIEUPH-YO-CHIEUCH +0xD474 # HANGUL SYLLABLE PHIEUPH-YO-KHIEUKH +0xD475 # HANGUL SYLLABLE PHIEUPH-YO-THIEUTH +0xD476 # HANGUL SYLLABLE PHIEUPH-YO-PHIEUPH +0xD477 # HANGUL SYLLABLE PHIEUPH-YO-HIEUH +0xD478 # HANGUL SYLLABLE PHIEUPH-U +0xD479 # HANGUL SYLLABLE PHIEUPH-U-KIYEOK +0xD47A # HANGUL SYLLABLE PHIEUPH-U-SSANGKIYEOK +0xD47B # HANGUL SYLLABLE PHIEUPH-U-KIYEOKSIOS +0xD47C # HANGUL SYLLABLE PHIEUPH-U-NIEUN +0xD47D # HANGUL SYLLABLE PHIEUPH-U-NIEUNCIEUC +0xD47E # HANGUL SYLLABLE PHIEUPH-U-NIEUNHIEUH +0xD47F # HANGUL SYLLABLE PHIEUPH-U-TIKEUT +0xD480 # HANGUL SYLLABLE PHIEUPH-U-RIEUL +0xD481 # HANGUL SYLLABLE PHIEUPH-U-RIEULKIYEOK +0xD482 # HANGUL SYLLABLE PHIEUPH-U-RIEULMIEUM +0xD483 # HANGUL SYLLABLE PHIEUPH-U-RIEULPIEUP +0xD484 # HANGUL SYLLABLE PHIEUPH-U-RIEULSIOS +0xD485 # HANGUL SYLLABLE PHIEUPH-U-RIEULTHIEUTH +0xD486 # HANGUL SYLLABLE PHIEUPH-U-RIEULPHIEUPH +0xD487 # HANGUL SYLLABLE PHIEUPH-U-RIEULHIEUH +0xD488 # HANGUL SYLLABLE PHIEUPH-U-MIEUM +0xD489 # HANGUL SYLLABLE PHIEUPH-U-PIEUP +0xD48A # HANGUL SYLLABLE PHIEUPH-U-PIEUPSIOS +0xD48B # HANGUL SYLLABLE PHIEUPH-U-SIOS +0xD48C # HANGUL SYLLABLE PHIEUPH-U-SSANGSIOS +0xD48D # HANGUL SYLLABLE PHIEUPH-U-IEUNG +0xD48E # HANGUL SYLLABLE PHIEUPH-U-CIEUC +0xD48F # HANGUL SYLLABLE PHIEUPH-U-CHIEUCH +0xD490 # HANGUL SYLLABLE PHIEUPH-U-KHIEUKH +0xD491 # HANGUL SYLLABLE PHIEUPH-U-THIEUTH +0xD492 # HANGUL SYLLABLE PHIEUPH-U-PHIEUPH +0xD493 # HANGUL SYLLABLE PHIEUPH-U-HIEUH +0xD494 # HANGUL SYLLABLE PHIEUPH-WEO +0xD495 # HANGUL SYLLABLE PHIEUPH-WEO-KIYEOK +0xD496 # HANGUL SYLLABLE PHIEUPH-WEO-SSANGKIYEOK +0xD497 # HANGUL SYLLABLE PHIEUPH-WEO-KIYEOKSIOS +0xD498 # HANGUL SYLLABLE PHIEUPH-WEO-NIEUN +0xD499 # HANGUL SYLLABLE PHIEUPH-WEO-NIEUNCIEUC +0xD49A # HANGUL SYLLABLE PHIEUPH-WEO-NIEUNHIEUH +0xD49B # HANGUL SYLLABLE PHIEUPH-WEO-TIKEUT +0xD49C # HANGUL SYLLABLE PHIEUPH-WEO-RIEUL +0xD49D # HANGUL SYLLABLE PHIEUPH-WEO-RIEULKIYEOK +0xD49E # HANGUL SYLLABLE PHIEUPH-WEO-RIEULMIEUM +0xD49F # HANGUL SYLLABLE PHIEUPH-WEO-RIEULPIEUP +0xD4A0 # HANGUL SYLLABLE PHIEUPH-WEO-RIEULSIOS +0xD4A1 # HANGUL SYLLABLE PHIEUPH-WEO-RIEULTHIEUTH +0xD4A2 # HANGUL SYLLABLE PHIEUPH-WEO-RIEULPHIEUPH +0xD4A3 # HANGUL SYLLABLE PHIEUPH-WEO-RIEULHIEUH +0xD4A4 # HANGUL SYLLABLE PHIEUPH-WEO-MIEUM +0xD4A5 # HANGUL SYLLABLE PHIEUPH-WEO-PIEUP +0xD4A6 # HANGUL SYLLABLE PHIEUPH-WEO-PIEUPSIOS +0xD4A7 # HANGUL SYLLABLE PHIEUPH-WEO-SIOS +0xD4A8 # HANGUL SYLLABLE PHIEUPH-WEO-SSANGSIOS +0xD4A9 # HANGUL SYLLABLE PHIEUPH-WEO-IEUNG +0xD4AA # HANGUL SYLLABLE PHIEUPH-WEO-CIEUC +0xD4AB # HANGUL SYLLABLE PHIEUPH-WEO-CHIEUCH +0xD4AC # HANGUL SYLLABLE PHIEUPH-WEO-KHIEUKH +0xD4AD # HANGUL SYLLABLE PHIEUPH-WEO-THIEUTH +0xD4AE # HANGUL SYLLABLE PHIEUPH-WEO-PHIEUPH +0xD4AF # HANGUL SYLLABLE PHIEUPH-WEO-HIEUH +0xD4B0 # HANGUL SYLLABLE PHIEUPH-WE +0xD4B1 # HANGUL SYLLABLE PHIEUPH-WE-KIYEOK +0xD4B2 # HANGUL SYLLABLE PHIEUPH-WE-SSANGKIYEOK +0xD4B3 # HANGUL SYLLABLE PHIEUPH-WE-KIYEOKSIOS +0xD4B4 # HANGUL SYLLABLE PHIEUPH-WE-NIEUN +0xD4B5 # HANGUL SYLLABLE PHIEUPH-WE-NIEUNCIEUC +0xD4B6 # HANGUL SYLLABLE PHIEUPH-WE-NIEUNHIEUH +0xD4B7 # HANGUL SYLLABLE PHIEUPH-WE-TIKEUT +0xD4B8 # HANGUL SYLLABLE PHIEUPH-WE-RIEUL +0xD4B9 # HANGUL SYLLABLE PHIEUPH-WE-RIEULKIYEOK +0xD4BA # HANGUL SYLLABLE PHIEUPH-WE-RIEULMIEUM +0xD4BB # HANGUL SYLLABLE PHIEUPH-WE-RIEULPIEUP +0xD4BC # HANGUL SYLLABLE PHIEUPH-WE-RIEULSIOS +0xD4BD # HANGUL SYLLABLE PHIEUPH-WE-RIEULTHIEUTH +0xD4BE # HANGUL SYLLABLE PHIEUPH-WE-RIEULPHIEUPH +0xD4BF # HANGUL SYLLABLE PHIEUPH-WE-RIEULHIEUH +0xD4C0 # HANGUL SYLLABLE PHIEUPH-WE-MIEUM +0xD4C1 # HANGUL SYLLABLE PHIEUPH-WE-PIEUP +0xD4C2 # HANGUL SYLLABLE PHIEUPH-WE-PIEUPSIOS +0xD4C3 # HANGUL SYLLABLE PHIEUPH-WE-SIOS +0xD4C4 # HANGUL SYLLABLE PHIEUPH-WE-SSANGSIOS +0xD4C5 # HANGUL SYLLABLE PHIEUPH-WE-IEUNG +0xD4C6 # HANGUL SYLLABLE PHIEUPH-WE-CIEUC +0xD4C7 # HANGUL SYLLABLE PHIEUPH-WE-CHIEUCH +0xD4C8 # HANGUL SYLLABLE PHIEUPH-WE-KHIEUKH +0xD4C9 # HANGUL SYLLABLE PHIEUPH-WE-THIEUTH +0xD4CA # HANGUL SYLLABLE PHIEUPH-WE-PHIEUPH +0xD4CB # HANGUL SYLLABLE PHIEUPH-WE-HIEUH +0xD4CC # HANGUL SYLLABLE PHIEUPH-WI +0xD4CD # HANGUL SYLLABLE PHIEUPH-WI-KIYEOK +0xD4CE # HANGUL SYLLABLE PHIEUPH-WI-SSANGKIYEOK +0xD4CF # HANGUL SYLLABLE PHIEUPH-WI-KIYEOKSIOS +0xD4D0 # HANGUL SYLLABLE PHIEUPH-WI-NIEUN +0xD4D1 # HANGUL SYLLABLE PHIEUPH-WI-NIEUNCIEUC +0xD4D2 # HANGUL SYLLABLE PHIEUPH-WI-NIEUNHIEUH +0xD4D3 # HANGUL SYLLABLE PHIEUPH-WI-TIKEUT +0xD4D4 # HANGUL SYLLABLE PHIEUPH-WI-RIEUL +0xD4D5 # HANGUL SYLLABLE PHIEUPH-WI-RIEULKIYEOK +0xD4D6 # HANGUL SYLLABLE PHIEUPH-WI-RIEULMIEUM +0xD4D7 # HANGUL SYLLABLE PHIEUPH-WI-RIEULPIEUP +0xD4D8 # HANGUL SYLLABLE PHIEUPH-WI-RIEULSIOS +0xD4D9 # HANGUL SYLLABLE PHIEUPH-WI-RIEULTHIEUTH +0xD4DA # HANGUL SYLLABLE PHIEUPH-WI-RIEULPHIEUPH +0xD4DB # HANGUL SYLLABLE PHIEUPH-WI-RIEULHIEUH +0xD4DC # HANGUL SYLLABLE PHIEUPH-WI-MIEUM +0xD4DD # HANGUL SYLLABLE PHIEUPH-WI-PIEUP +0xD4DE # HANGUL SYLLABLE PHIEUPH-WI-PIEUPSIOS +0xD4DF # HANGUL SYLLABLE PHIEUPH-WI-SIOS +0xD4E0 # HANGUL SYLLABLE PHIEUPH-WI-SSANGSIOS +0xD4E1 # HANGUL SYLLABLE PHIEUPH-WI-IEUNG +0xD4E2 # HANGUL SYLLABLE PHIEUPH-WI-CIEUC +0xD4E3 # HANGUL SYLLABLE PHIEUPH-WI-CHIEUCH +0xD4E4 # HANGUL SYLLABLE PHIEUPH-WI-KHIEUKH +0xD4E5 # HANGUL SYLLABLE PHIEUPH-WI-THIEUTH +0xD4E6 # HANGUL SYLLABLE PHIEUPH-WI-PHIEUPH +0xD4E7 # HANGUL SYLLABLE PHIEUPH-WI-HIEUH +0xD4E8 # HANGUL SYLLABLE PHIEUPH-YU +0xD4E9 # HANGUL SYLLABLE PHIEUPH-YU-KIYEOK +0xD4EA # HANGUL SYLLABLE PHIEUPH-YU-SSANGKIYEOK +0xD4EB # HANGUL SYLLABLE PHIEUPH-YU-KIYEOKSIOS +0xD4EC # HANGUL SYLLABLE PHIEUPH-YU-NIEUN +0xD4ED # HANGUL SYLLABLE PHIEUPH-YU-NIEUNCIEUC +0xD4EE # HANGUL SYLLABLE PHIEUPH-YU-NIEUNHIEUH +0xD4EF # HANGUL SYLLABLE PHIEUPH-YU-TIKEUT +0xD4F0 # HANGUL SYLLABLE PHIEUPH-YU-RIEUL +0xD4F1 # HANGUL SYLLABLE PHIEUPH-YU-RIEULKIYEOK +0xD4F2 # HANGUL SYLLABLE PHIEUPH-YU-RIEULMIEUM +0xD4F3 # HANGUL SYLLABLE PHIEUPH-YU-RIEULPIEUP +0xD4F4 # HANGUL SYLLABLE PHIEUPH-YU-RIEULSIOS +0xD4F5 # HANGUL SYLLABLE PHIEUPH-YU-RIEULTHIEUTH +0xD4F6 # HANGUL SYLLABLE PHIEUPH-YU-RIEULPHIEUPH +0xD4F7 # HANGUL SYLLABLE PHIEUPH-YU-RIEULHIEUH +0xD4F8 # HANGUL SYLLABLE PHIEUPH-YU-MIEUM +0xD4F9 # HANGUL SYLLABLE PHIEUPH-YU-PIEUP +0xD4FA # HANGUL SYLLABLE PHIEUPH-YU-PIEUPSIOS +0xD4FB # HANGUL SYLLABLE PHIEUPH-YU-SIOS +0xD4FC # HANGUL SYLLABLE PHIEUPH-YU-SSANGSIOS +0xD4FD # HANGUL SYLLABLE PHIEUPH-YU-IEUNG +0xD4FE # HANGUL SYLLABLE PHIEUPH-YU-CIEUC +0xD4FF # HANGUL SYLLABLE PHIEUPH-YU-CHIEUCH +0xD500 # HANGUL SYLLABLE PHIEUPH-YU-KHIEUKH +0xD501 # HANGUL SYLLABLE PHIEUPH-YU-THIEUTH +0xD502 # HANGUL SYLLABLE PHIEUPH-YU-PHIEUPH +0xD503 # HANGUL SYLLABLE PHIEUPH-YU-HIEUH +0xD504 # HANGUL SYLLABLE PHIEUPH-EU +0xD505 # HANGUL SYLLABLE PHIEUPH-EU-KIYEOK +0xD506 # HANGUL SYLLABLE PHIEUPH-EU-SSANGKIYEOK +0xD507 # HANGUL SYLLABLE PHIEUPH-EU-KIYEOKSIOS +0xD508 # HANGUL SYLLABLE PHIEUPH-EU-NIEUN +0xD509 # HANGUL SYLLABLE PHIEUPH-EU-NIEUNCIEUC +0xD50A # HANGUL SYLLABLE PHIEUPH-EU-NIEUNHIEUH +0xD50B # HANGUL SYLLABLE PHIEUPH-EU-TIKEUT +0xD50C # HANGUL SYLLABLE PHIEUPH-EU-RIEUL +0xD50D # HANGUL SYLLABLE PHIEUPH-EU-RIEULKIYEOK +0xD50E # HANGUL SYLLABLE PHIEUPH-EU-RIEULMIEUM +0xD50F # HANGUL SYLLABLE PHIEUPH-EU-RIEULPIEUP +0xD510 # HANGUL SYLLABLE PHIEUPH-EU-RIEULSIOS +0xD511 # HANGUL SYLLABLE PHIEUPH-EU-RIEULTHIEUTH +0xD512 # HANGUL SYLLABLE PHIEUPH-EU-RIEULPHIEUPH +0xD513 # HANGUL SYLLABLE PHIEUPH-EU-RIEULHIEUH +0xD514 # HANGUL SYLLABLE PHIEUPH-EU-MIEUM +0xD515 # HANGUL SYLLABLE PHIEUPH-EU-PIEUP +0xD516 # HANGUL SYLLABLE PHIEUPH-EU-PIEUPSIOS +0xD517 # HANGUL SYLLABLE PHIEUPH-EU-SIOS +0xD518 # HANGUL SYLLABLE PHIEUPH-EU-SSANGSIOS +0xD519 # HANGUL SYLLABLE PHIEUPH-EU-IEUNG +0xD51A # HANGUL SYLLABLE PHIEUPH-EU-CIEUC +0xD51B # HANGUL SYLLABLE PHIEUPH-EU-CHIEUCH +0xD51C # HANGUL SYLLABLE PHIEUPH-EU-KHIEUKH +0xD51D # HANGUL SYLLABLE PHIEUPH-EU-THIEUTH +0xD51E # HANGUL SYLLABLE PHIEUPH-EU-PHIEUPH +0xD51F # HANGUL SYLLABLE PHIEUPH-EU-HIEUH +0xD520 # HANGUL SYLLABLE PHIEUPH-YI +0xD521 # HANGUL SYLLABLE PHIEUPH-YI-KIYEOK +0xD522 # HANGUL SYLLABLE PHIEUPH-YI-SSANGKIYEOK +0xD523 # HANGUL SYLLABLE PHIEUPH-YI-KIYEOKSIOS +0xD524 # HANGUL SYLLABLE PHIEUPH-YI-NIEUN +0xD525 # HANGUL SYLLABLE PHIEUPH-YI-NIEUNCIEUC +0xD526 # HANGUL SYLLABLE PHIEUPH-YI-NIEUNHIEUH +0xD527 # HANGUL SYLLABLE PHIEUPH-YI-TIKEUT +0xD528 # HANGUL SYLLABLE PHIEUPH-YI-RIEUL +0xD529 # HANGUL SYLLABLE PHIEUPH-YI-RIEULKIYEOK +0xD52A # HANGUL SYLLABLE PHIEUPH-YI-RIEULMIEUM +0xD52B # HANGUL SYLLABLE PHIEUPH-YI-RIEULPIEUP +0xD52C # HANGUL SYLLABLE PHIEUPH-YI-RIEULSIOS +0xD52D # HANGUL SYLLABLE PHIEUPH-YI-RIEULTHIEUTH +0xD52E # HANGUL SYLLABLE PHIEUPH-YI-RIEULPHIEUPH +0xD52F # HANGUL SYLLABLE PHIEUPH-YI-RIEULHIEUH +0xD530 # HANGUL SYLLABLE PHIEUPH-YI-MIEUM +0xD531 # HANGUL SYLLABLE PHIEUPH-YI-PIEUP +0xD532 # HANGUL SYLLABLE PHIEUPH-YI-PIEUPSIOS +0xD533 # HANGUL SYLLABLE PHIEUPH-YI-SIOS +0xD534 # HANGUL SYLLABLE PHIEUPH-YI-SSANGSIOS +0xD535 # HANGUL SYLLABLE PHIEUPH-YI-IEUNG +0xD536 # HANGUL SYLLABLE PHIEUPH-YI-CIEUC +0xD537 # HANGUL SYLLABLE PHIEUPH-YI-CHIEUCH +0xD538 # HANGUL SYLLABLE PHIEUPH-YI-KHIEUKH +0xD539 # HANGUL SYLLABLE PHIEUPH-YI-THIEUTH +0xD53A # HANGUL SYLLABLE PHIEUPH-YI-PHIEUPH +0xD53B # HANGUL SYLLABLE PHIEUPH-YI-HIEUH +0xD53C # HANGUL SYLLABLE PHIEUPH-I +0xD53D # HANGUL SYLLABLE PHIEUPH-I-KIYEOK +0xD53E # HANGUL SYLLABLE PHIEUPH-I-SSANGKIYEOK +0xD53F # HANGUL SYLLABLE PHIEUPH-I-KIYEOKSIOS +0xD540 # HANGUL SYLLABLE PHIEUPH-I-NIEUN +0xD541 # HANGUL SYLLABLE PHIEUPH-I-NIEUNCIEUC +0xD542 # HANGUL SYLLABLE PHIEUPH-I-NIEUNHIEUH +0xD543 # HANGUL SYLLABLE PHIEUPH-I-TIKEUT +0xD544 # HANGUL SYLLABLE PHIEUPH-I-RIEUL +0xD545 # HANGUL SYLLABLE PHIEUPH-I-RIEULKIYEOK +0xD546 # HANGUL SYLLABLE PHIEUPH-I-RIEULMIEUM +0xD547 # HANGUL SYLLABLE PHIEUPH-I-RIEULPIEUP +0xD548 # HANGUL SYLLABLE PHIEUPH-I-RIEULSIOS +0xD549 # HANGUL SYLLABLE PHIEUPH-I-RIEULTHIEUTH +0xD54A # HANGUL SYLLABLE PHIEUPH-I-RIEULPHIEUPH +0xD54B # HANGUL SYLLABLE PHIEUPH-I-RIEULHIEUH +0xD54C # HANGUL SYLLABLE PHIEUPH-I-MIEUM +0xD54D # HANGUL SYLLABLE PHIEUPH-I-PIEUP +0xD54E # HANGUL SYLLABLE PHIEUPH-I-PIEUPSIOS +0xD54F # HANGUL SYLLABLE PHIEUPH-I-SIOS +0xD550 # HANGUL SYLLABLE PHIEUPH-I-SSANGSIOS +0xD551 # HANGUL SYLLABLE PHIEUPH-I-IEUNG +0xD552 # HANGUL SYLLABLE PHIEUPH-I-CIEUC +0xD553 # HANGUL SYLLABLE PHIEUPH-I-CHIEUCH +0xD554 # HANGUL SYLLABLE PHIEUPH-I-KHIEUKH +0xD555 # HANGUL SYLLABLE PHIEUPH-I-THIEUTH +0xD556 # HANGUL SYLLABLE PHIEUPH-I-PHIEUPH +0xD557 # HANGUL SYLLABLE PHIEUPH-I-HIEUH +0xD558 # HANGUL SYLLABLE HIEUH-A +0xD559 # HANGUL SYLLABLE HIEUH-A-KIYEOK +0xD55A # HANGUL SYLLABLE HIEUH-A-SSANGKIYEOK +0xD55B # HANGUL SYLLABLE HIEUH-A-KIYEOKSIOS +0xD55C # HANGUL SYLLABLE HIEUH-A-NIEUN +0xD55D # HANGUL SYLLABLE HIEUH-A-NIEUNCIEUC +0xD55E # HANGUL SYLLABLE HIEUH-A-NIEUNHIEUH +0xD55F # HANGUL SYLLABLE HIEUH-A-TIKEUT +0xD560 # HANGUL SYLLABLE HIEUH-A-RIEUL +0xD561 # HANGUL SYLLABLE HIEUH-A-RIEULKIYEOK +0xD562 # HANGUL SYLLABLE HIEUH-A-RIEULMIEUM +0xD563 # HANGUL SYLLABLE HIEUH-A-RIEULPIEUP +0xD564 # HANGUL SYLLABLE HIEUH-A-RIEULSIOS +0xD565 # HANGUL SYLLABLE HIEUH-A-RIEULTHIEUTH +0xD566 # HANGUL SYLLABLE HIEUH-A-RIEULPHIEUPH +0xD567 # HANGUL SYLLABLE HIEUH-A-RIEULHIEUH +0xD568 # HANGUL SYLLABLE HIEUH-A-MIEUM +0xD569 # HANGUL SYLLABLE HIEUH-A-PIEUP +0xD56A # HANGUL SYLLABLE HIEUH-A-PIEUPSIOS +0xD56B # HANGUL SYLLABLE HIEUH-A-SIOS +0xD56C # HANGUL SYLLABLE HIEUH-A-SSANGSIOS +0xD56D # HANGUL SYLLABLE HIEUH-A-IEUNG +0xD56E # HANGUL SYLLABLE HIEUH-A-CIEUC +0xD56F # HANGUL SYLLABLE HIEUH-A-CHIEUCH +0xD570 # HANGUL SYLLABLE HIEUH-A-KHIEUKH +0xD571 # HANGUL SYLLABLE HIEUH-A-THIEUTH +0xD572 # HANGUL SYLLABLE HIEUH-A-PHIEUPH +0xD573 # HANGUL SYLLABLE HIEUH-A-HIEUH +0xD574 # HANGUL SYLLABLE HIEUH-AE +0xD575 # HANGUL SYLLABLE HIEUH-AE-KIYEOK +0xD576 # HANGUL SYLLABLE HIEUH-AE-SSANGKIYEOK +0xD577 # HANGUL SYLLABLE HIEUH-AE-KIYEOKSIOS +0xD578 # HANGUL SYLLABLE HIEUH-AE-NIEUN +0xD579 # HANGUL SYLLABLE HIEUH-AE-NIEUNCIEUC +0xD57A # HANGUL SYLLABLE HIEUH-AE-NIEUNHIEUH +0xD57B # HANGUL SYLLABLE HIEUH-AE-TIKEUT +0xD57C # HANGUL SYLLABLE HIEUH-AE-RIEUL +0xD57D # HANGUL SYLLABLE HIEUH-AE-RIEULKIYEOK +0xD57E # HANGUL SYLLABLE HIEUH-AE-RIEULMIEUM +0xD57F # HANGUL SYLLABLE HIEUH-AE-RIEULPIEUP +0xD580 # HANGUL SYLLABLE HIEUH-AE-RIEULSIOS +0xD581 # HANGUL SYLLABLE HIEUH-AE-RIEULTHIEUTH +0xD582 # HANGUL SYLLABLE HIEUH-AE-RIEULPHIEUPH +0xD583 # HANGUL SYLLABLE HIEUH-AE-RIEULHIEUH +0xD584 # HANGUL SYLLABLE HIEUH-AE-MIEUM +0xD585 # HANGUL SYLLABLE HIEUH-AE-PIEUP +0xD586 # HANGUL SYLLABLE HIEUH-AE-PIEUPSIOS +0xD587 # HANGUL SYLLABLE HIEUH-AE-SIOS +0xD588 # HANGUL SYLLABLE HIEUH-AE-SSANGSIOS +0xD589 # HANGUL SYLLABLE HIEUH-AE-IEUNG +0xD58A # HANGUL SYLLABLE HIEUH-AE-CIEUC +0xD58B # HANGUL SYLLABLE HIEUH-AE-CHIEUCH +0xD58C # HANGUL SYLLABLE HIEUH-AE-KHIEUKH +0xD58D # HANGUL SYLLABLE HIEUH-AE-THIEUTH +0xD58E # HANGUL SYLLABLE HIEUH-AE-PHIEUPH +0xD58F # HANGUL SYLLABLE HIEUH-AE-HIEUH +0xD590 # HANGUL SYLLABLE HIEUH-YA +0xD591 # HANGUL SYLLABLE HIEUH-YA-KIYEOK +0xD592 # HANGUL SYLLABLE HIEUH-YA-SSANGKIYEOK +0xD593 # HANGUL SYLLABLE HIEUH-YA-KIYEOKSIOS +0xD594 # HANGUL SYLLABLE HIEUH-YA-NIEUN +0xD595 # HANGUL SYLLABLE HIEUH-YA-NIEUNCIEUC +0xD596 # HANGUL SYLLABLE HIEUH-YA-NIEUNHIEUH +0xD597 # HANGUL SYLLABLE HIEUH-YA-TIKEUT +0xD598 # HANGUL SYLLABLE HIEUH-YA-RIEUL +0xD599 # HANGUL SYLLABLE HIEUH-YA-RIEULKIYEOK +0xD59A # HANGUL SYLLABLE HIEUH-YA-RIEULMIEUM +0xD59B # HANGUL SYLLABLE HIEUH-YA-RIEULPIEUP +0xD59C # HANGUL SYLLABLE HIEUH-YA-RIEULSIOS +0xD59D # HANGUL SYLLABLE HIEUH-YA-RIEULTHIEUTH +0xD59E # HANGUL SYLLABLE HIEUH-YA-RIEULPHIEUPH +0xD59F # HANGUL SYLLABLE HIEUH-YA-RIEULHIEUH +0xD5A0 # HANGUL SYLLABLE HIEUH-YA-MIEUM +0xD5A1 # HANGUL SYLLABLE HIEUH-YA-PIEUP +0xD5A2 # HANGUL SYLLABLE HIEUH-YA-PIEUPSIOS +0xD5A3 # HANGUL SYLLABLE HIEUH-YA-SIOS +0xD5A4 # HANGUL SYLLABLE HIEUH-YA-SSANGSIOS +0xD5A5 # HANGUL SYLLABLE HIEUH-YA-IEUNG +0xD5A6 # HANGUL SYLLABLE HIEUH-YA-CIEUC +0xD5A7 # HANGUL SYLLABLE HIEUH-YA-CHIEUCH +0xD5A8 # HANGUL SYLLABLE HIEUH-YA-KHIEUKH +0xD5A9 # HANGUL SYLLABLE HIEUH-YA-THIEUTH +0xD5AA # HANGUL SYLLABLE HIEUH-YA-PHIEUPH +0xD5AB # HANGUL SYLLABLE HIEUH-YA-HIEUH +0xD5AC # HANGUL SYLLABLE HIEUH-YAE +0xD5AD # HANGUL SYLLABLE HIEUH-YAE-KIYEOK +0xD5AE # HANGUL SYLLABLE HIEUH-YAE-SSANGKIYEOK +0xD5AF # HANGUL SYLLABLE HIEUH-YAE-KIYEOKSIOS +0xD5B0 # HANGUL SYLLABLE HIEUH-YAE-NIEUN +0xD5B1 # HANGUL SYLLABLE HIEUH-YAE-NIEUNCIEUC +0xD5B2 # HANGUL SYLLABLE HIEUH-YAE-NIEUNHIEUH +0xD5B3 # HANGUL SYLLABLE HIEUH-YAE-TIKEUT +0xD5B4 # HANGUL SYLLABLE HIEUH-YAE-RIEUL +0xD5B5 # HANGUL SYLLABLE HIEUH-YAE-RIEULKIYEOK +0xD5B6 # HANGUL SYLLABLE HIEUH-YAE-RIEULMIEUM +0xD5B7 # HANGUL SYLLABLE HIEUH-YAE-RIEULPIEUP +0xD5B8 # HANGUL SYLLABLE HIEUH-YAE-RIEULSIOS +0xD5B9 # HANGUL SYLLABLE HIEUH-YAE-RIEULTHIEUTH +0xD5BA # HANGUL SYLLABLE HIEUH-YAE-RIEULPHIEUPH +0xD5BB # HANGUL SYLLABLE HIEUH-YAE-RIEULHIEUH +0xD5BC # HANGUL SYLLABLE HIEUH-YAE-MIEUM +0xD5BD # HANGUL SYLLABLE HIEUH-YAE-PIEUP +0xD5BE # HANGUL SYLLABLE HIEUH-YAE-PIEUPSIOS +0xD5BF # HANGUL SYLLABLE HIEUH-YAE-SIOS +0xD5C0 # HANGUL SYLLABLE HIEUH-YAE-SSANGSIOS +0xD5C1 # HANGUL SYLLABLE HIEUH-YAE-IEUNG +0xD5C2 # HANGUL SYLLABLE HIEUH-YAE-CIEUC +0xD5C3 # HANGUL SYLLABLE HIEUH-YAE-CHIEUCH +0xD5C4 # HANGUL SYLLABLE HIEUH-YAE-KHIEUKH +0xD5C5 # HANGUL SYLLABLE HIEUH-YAE-THIEUTH +0xD5C6 # HANGUL SYLLABLE HIEUH-YAE-PHIEUPH +0xD5C7 # HANGUL SYLLABLE HIEUH-YAE-HIEUH +0xD5C8 # HANGUL SYLLABLE HIEUH-EO +0xD5C9 # HANGUL SYLLABLE HIEUH-EO-KIYEOK +0xD5CA # HANGUL SYLLABLE HIEUH-EO-SSANGKIYEOK +0xD5CB # HANGUL SYLLABLE HIEUH-EO-KIYEOKSIOS +0xD5CC # HANGUL SYLLABLE HIEUH-EO-NIEUN +0xD5CD # HANGUL SYLLABLE HIEUH-EO-NIEUNCIEUC +0xD5CE # HANGUL SYLLABLE HIEUH-EO-NIEUNHIEUH +0xD5CF # HANGUL SYLLABLE HIEUH-EO-TIKEUT +0xD5D0 # HANGUL SYLLABLE HIEUH-EO-RIEUL +0xD5D1 # HANGUL SYLLABLE HIEUH-EO-RIEULKIYEOK +0xD5D2 # HANGUL SYLLABLE HIEUH-EO-RIEULMIEUM +0xD5D3 # HANGUL SYLLABLE HIEUH-EO-RIEULPIEUP +0xD5D4 # HANGUL SYLLABLE HIEUH-EO-RIEULSIOS +0xD5D5 # HANGUL SYLLABLE HIEUH-EO-RIEULTHIEUTH +0xD5D6 # HANGUL SYLLABLE HIEUH-EO-RIEULPHIEUPH +0xD5D7 # HANGUL SYLLABLE HIEUH-EO-RIEULHIEUH +0xD5D8 # HANGUL SYLLABLE HIEUH-EO-MIEUM +0xD5D9 # HANGUL SYLLABLE HIEUH-EO-PIEUP +0xD5DA # HANGUL SYLLABLE HIEUH-EO-PIEUPSIOS +0xD5DB # HANGUL SYLLABLE HIEUH-EO-SIOS +0xD5DC # HANGUL SYLLABLE HIEUH-EO-SSANGSIOS +0xD5DD # HANGUL SYLLABLE HIEUH-EO-IEUNG +0xD5DE # HANGUL SYLLABLE HIEUH-EO-CIEUC +0xD5DF # HANGUL SYLLABLE HIEUH-EO-CHIEUCH +0xD5E0 # HANGUL SYLLABLE HIEUH-EO-KHIEUKH +0xD5E1 # HANGUL SYLLABLE HIEUH-EO-THIEUTH +0xD5E2 # HANGUL SYLLABLE HIEUH-EO-PHIEUPH +0xD5E3 # HANGUL SYLLABLE HIEUH-EO-HIEUH +0xD5E4 # HANGUL SYLLABLE HIEUH-E +0xD5E5 # HANGUL SYLLABLE HIEUH-E-KIYEOK +0xD5E6 # HANGUL SYLLABLE HIEUH-E-SSANGKIYEOK +0xD5E7 # HANGUL SYLLABLE HIEUH-E-KIYEOKSIOS +0xD5E8 # HANGUL SYLLABLE HIEUH-E-NIEUN +0xD5E9 # HANGUL SYLLABLE HIEUH-E-NIEUNCIEUC +0xD5EA # HANGUL SYLLABLE HIEUH-E-NIEUNHIEUH +0xD5EB # HANGUL SYLLABLE HIEUH-E-TIKEUT +0xD5EC # HANGUL SYLLABLE HIEUH-E-RIEUL +0xD5ED # HANGUL SYLLABLE HIEUH-E-RIEULKIYEOK +0xD5EE # HANGUL SYLLABLE HIEUH-E-RIEULMIEUM +0xD5EF # HANGUL SYLLABLE HIEUH-E-RIEULPIEUP +0xD5F0 # HANGUL SYLLABLE HIEUH-E-RIEULSIOS +0xD5F1 # HANGUL SYLLABLE HIEUH-E-RIEULTHIEUTH +0xD5F2 # HANGUL SYLLABLE HIEUH-E-RIEULPHIEUPH +0xD5F3 # HANGUL SYLLABLE HIEUH-E-RIEULHIEUH +0xD5F4 # HANGUL SYLLABLE HIEUH-E-MIEUM +0xD5F5 # HANGUL SYLLABLE HIEUH-E-PIEUP +0xD5F6 # HANGUL SYLLABLE HIEUH-E-PIEUPSIOS +0xD5F7 # HANGUL SYLLABLE HIEUH-E-SIOS +0xD5F8 # HANGUL SYLLABLE HIEUH-E-SSANGSIOS +0xD5F9 # HANGUL SYLLABLE HIEUH-E-IEUNG +0xD5FA # HANGUL SYLLABLE HIEUH-E-CIEUC +0xD5FB # HANGUL SYLLABLE HIEUH-E-CHIEUCH +0xD5FC # HANGUL SYLLABLE HIEUH-E-KHIEUKH +0xD5FD # HANGUL SYLLABLE HIEUH-E-THIEUTH +0xD5FE # HANGUL SYLLABLE HIEUH-E-PHIEUPH +0xD5FF # HANGUL SYLLABLE HIEUH-E-HIEUH +0xD600 # HANGUL SYLLABLE HIEUH-YEO +0xD601 # HANGUL SYLLABLE HIEUH-YEO-KIYEOK +0xD602 # HANGUL SYLLABLE HIEUH-YEO-SSANGKIYEOK +0xD603 # HANGUL SYLLABLE HIEUH-YEO-KIYEOKSIOS +0xD604 # HANGUL SYLLABLE HIEUH-YEO-NIEUN +0xD605 # HANGUL SYLLABLE HIEUH-YEO-NIEUNCIEUC +0xD606 # HANGUL SYLLABLE HIEUH-YEO-NIEUNHIEUH +0xD607 # HANGUL SYLLABLE HIEUH-YEO-TIKEUT +0xD608 # HANGUL SYLLABLE HIEUH-YEO-RIEUL +0xD609 # HANGUL SYLLABLE HIEUH-YEO-RIEULKIYEOK +0xD60A # HANGUL SYLLABLE HIEUH-YEO-RIEULMIEUM +0xD60B # HANGUL SYLLABLE HIEUH-YEO-RIEULPIEUP +0xD60C # HANGUL SYLLABLE HIEUH-YEO-RIEULSIOS +0xD60D # HANGUL SYLLABLE HIEUH-YEO-RIEULTHIEUTH +0xD60E # HANGUL SYLLABLE HIEUH-YEO-RIEULPHIEUPH +0xD60F # HANGUL SYLLABLE HIEUH-YEO-RIEULHIEUH +0xD610 # HANGUL SYLLABLE HIEUH-YEO-MIEUM +0xD611 # HANGUL SYLLABLE HIEUH-YEO-PIEUP +0xD612 # HANGUL SYLLABLE HIEUH-YEO-PIEUPSIOS +0xD613 # HANGUL SYLLABLE HIEUH-YEO-SIOS +0xD614 # HANGUL SYLLABLE HIEUH-YEO-SSANGSIOS +0xD615 # HANGUL SYLLABLE HIEUH-YEO-IEUNG +0xD616 # HANGUL SYLLABLE HIEUH-YEO-CIEUC +0xD617 # HANGUL SYLLABLE HIEUH-YEO-CHIEUCH +0xD618 # HANGUL SYLLABLE HIEUH-YEO-KHIEUKH +0xD619 # HANGUL SYLLABLE HIEUH-YEO-THIEUTH +0xD61A # HANGUL SYLLABLE HIEUH-YEO-PHIEUPH +0xD61B # HANGUL SYLLABLE HIEUH-YEO-HIEUH +0xD61C # HANGUL SYLLABLE HIEUH-YE +0xD61D # HANGUL SYLLABLE HIEUH-YE-KIYEOK +0xD61E # HANGUL SYLLABLE HIEUH-YE-SSANGKIYEOK +0xD61F # HANGUL SYLLABLE HIEUH-YE-KIYEOKSIOS +0xD620 # HANGUL SYLLABLE HIEUH-YE-NIEUN +0xD621 # HANGUL SYLLABLE HIEUH-YE-NIEUNCIEUC +0xD622 # HANGUL SYLLABLE HIEUH-YE-NIEUNHIEUH +0xD623 # HANGUL SYLLABLE HIEUH-YE-TIKEUT +0xD624 # HANGUL SYLLABLE HIEUH-YE-RIEUL +0xD625 # HANGUL SYLLABLE HIEUH-YE-RIEULKIYEOK +0xD626 # HANGUL SYLLABLE HIEUH-YE-RIEULMIEUM +0xD627 # HANGUL SYLLABLE HIEUH-YE-RIEULPIEUP +0xD628 # HANGUL SYLLABLE HIEUH-YE-RIEULSIOS +0xD629 # HANGUL SYLLABLE HIEUH-YE-RIEULTHIEUTH +0xD62A # HANGUL SYLLABLE HIEUH-YE-RIEULPHIEUPH +0xD62B # HANGUL SYLLABLE HIEUH-YE-RIEULHIEUH +0xD62C # HANGUL SYLLABLE HIEUH-YE-MIEUM +0xD62D # HANGUL SYLLABLE HIEUH-YE-PIEUP +0xD62E # HANGUL SYLLABLE HIEUH-YE-PIEUPSIOS +0xD62F # HANGUL SYLLABLE HIEUH-YE-SIOS +0xD630 # HANGUL SYLLABLE HIEUH-YE-SSANGSIOS +0xD631 # HANGUL SYLLABLE HIEUH-YE-IEUNG +0xD632 # HANGUL SYLLABLE HIEUH-YE-CIEUC +0xD633 # HANGUL SYLLABLE HIEUH-YE-CHIEUCH +0xD634 # HANGUL SYLLABLE HIEUH-YE-KHIEUKH +0xD635 # HANGUL SYLLABLE HIEUH-YE-THIEUTH +0xD636 # HANGUL SYLLABLE HIEUH-YE-PHIEUPH +0xD637 # HANGUL SYLLABLE HIEUH-YE-HIEUH +0xD638 # HANGUL SYLLABLE HIEUH-O +0xD639 # HANGUL SYLLABLE HIEUH-O-KIYEOK +0xD63A # HANGUL SYLLABLE HIEUH-O-SSANGKIYEOK +0xD63B # HANGUL SYLLABLE HIEUH-O-KIYEOKSIOS +0xD63C # HANGUL SYLLABLE HIEUH-O-NIEUN +0xD63D # HANGUL SYLLABLE HIEUH-O-NIEUNCIEUC +0xD63E # HANGUL SYLLABLE HIEUH-O-NIEUNHIEUH +0xD63F # HANGUL SYLLABLE HIEUH-O-TIKEUT +0xD640 # HANGUL SYLLABLE HIEUH-O-RIEUL +0xD641 # HANGUL SYLLABLE HIEUH-O-RIEULKIYEOK +0xD642 # HANGUL SYLLABLE HIEUH-O-RIEULMIEUM +0xD643 # HANGUL SYLLABLE HIEUH-O-RIEULPIEUP +0xD644 # HANGUL SYLLABLE HIEUH-O-RIEULSIOS +0xD645 # HANGUL SYLLABLE HIEUH-O-RIEULTHIEUTH +0xD646 # HANGUL SYLLABLE HIEUH-O-RIEULPHIEUPH +0xD647 # HANGUL SYLLABLE HIEUH-O-RIEULHIEUH +0xD648 # HANGUL SYLLABLE HIEUH-O-MIEUM +0xD649 # HANGUL SYLLABLE HIEUH-O-PIEUP +0xD64A # HANGUL SYLLABLE HIEUH-O-PIEUPSIOS +0xD64B # HANGUL SYLLABLE HIEUH-O-SIOS +0xD64C # HANGUL SYLLABLE HIEUH-O-SSANGSIOS +0xD64D # HANGUL SYLLABLE HIEUH-O-IEUNG +0xD64E # HANGUL SYLLABLE HIEUH-O-CIEUC +0xD64F # HANGUL SYLLABLE HIEUH-O-CHIEUCH +0xD650 # HANGUL SYLLABLE HIEUH-O-KHIEUKH +0xD651 # HANGUL SYLLABLE HIEUH-O-THIEUTH +0xD652 # HANGUL SYLLABLE HIEUH-O-PHIEUPH +0xD653 # HANGUL SYLLABLE HIEUH-O-HIEUH +0xD654 # HANGUL SYLLABLE HIEUH-WA +0xD655 # HANGUL SYLLABLE HIEUH-WA-KIYEOK +0xD656 # HANGUL SYLLABLE HIEUH-WA-SSANGKIYEOK +0xD657 # HANGUL SYLLABLE HIEUH-WA-KIYEOKSIOS +0xD658 # HANGUL SYLLABLE HIEUH-WA-NIEUN +0xD659 # HANGUL SYLLABLE HIEUH-WA-NIEUNCIEUC +0xD65A # HANGUL SYLLABLE HIEUH-WA-NIEUNHIEUH +0xD65B # HANGUL SYLLABLE HIEUH-WA-TIKEUT +0xD65C # HANGUL SYLLABLE HIEUH-WA-RIEUL +0xD65D # HANGUL SYLLABLE HIEUH-WA-RIEULKIYEOK +0xD65E # HANGUL SYLLABLE HIEUH-WA-RIEULMIEUM +0xD65F # HANGUL SYLLABLE HIEUH-WA-RIEULPIEUP +0xD660 # HANGUL SYLLABLE HIEUH-WA-RIEULSIOS +0xD661 # HANGUL SYLLABLE HIEUH-WA-RIEULTHIEUTH +0xD662 # HANGUL SYLLABLE HIEUH-WA-RIEULPHIEUPH +0xD663 # HANGUL SYLLABLE HIEUH-WA-RIEULHIEUH +0xD664 # HANGUL SYLLABLE HIEUH-WA-MIEUM +0xD665 # HANGUL SYLLABLE HIEUH-WA-PIEUP +0xD666 # HANGUL SYLLABLE HIEUH-WA-PIEUPSIOS +0xD667 # HANGUL SYLLABLE HIEUH-WA-SIOS +0xD668 # HANGUL SYLLABLE HIEUH-WA-SSANGSIOS +0xD669 # HANGUL SYLLABLE HIEUH-WA-IEUNG +0xD66A # HANGUL SYLLABLE HIEUH-WA-CIEUC +0xD66B # HANGUL SYLLABLE HIEUH-WA-CHIEUCH +0xD66C # HANGUL SYLLABLE HIEUH-WA-KHIEUKH +0xD66D # HANGUL SYLLABLE HIEUH-WA-THIEUTH +0xD66E # HANGUL SYLLABLE HIEUH-WA-PHIEUPH +0xD66F # HANGUL SYLLABLE HIEUH-WA-HIEUH +0xD670 # HANGUL SYLLABLE HIEUH-WAE +0xD671 # HANGUL SYLLABLE HIEUH-WAE-KIYEOK +0xD672 # HANGUL SYLLABLE HIEUH-WAE-SSANGKIYEOK +0xD673 # HANGUL SYLLABLE HIEUH-WAE-KIYEOKSIOS +0xD674 # HANGUL SYLLABLE HIEUH-WAE-NIEUN +0xD675 # HANGUL SYLLABLE HIEUH-WAE-NIEUNCIEUC +0xD676 # HANGUL SYLLABLE HIEUH-WAE-NIEUNHIEUH +0xD677 # HANGUL SYLLABLE HIEUH-WAE-TIKEUT +0xD678 # HANGUL SYLLABLE HIEUH-WAE-RIEUL +0xD679 # HANGUL SYLLABLE HIEUH-WAE-RIEULKIYEOK +0xD67A # HANGUL SYLLABLE HIEUH-WAE-RIEULMIEUM +0xD67B # HANGUL SYLLABLE HIEUH-WAE-RIEULPIEUP +0xD67C # HANGUL SYLLABLE HIEUH-WAE-RIEULSIOS +0xD67D # HANGUL SYLLABLE HIEUH-WAE-RIEULTHIEUTH +0xD67E # HANGUL SYLLABLE HIEUH-WAE-RIEULPHIEUPH +0xD67F # HANGUL SYLLABLE HIEUH-WAE-RIEULHIEUH +0xD680 # HANGUL SYLLABLE HIEUH-WAE-MIEUM +0xD681 # HANGUL SYLLABLE HIEUH-WAE-PIEUP +0xD682 # HANGUL SYLLABLE HIEUH-WAE-PIEUPSIOS +0xD683 # HANGUL SYLLABLE HIEUH-WAE-SIOS +0xD684 # HANGUL SYLLABLE HIEUH-WAE-SSANGSIOS +0xD685 # HANGUL SYLLABLE HIEUH-WAE-IEUNG +0xD686 # HANGUL SYLLABLE HIEUH-WAE-CIEUC +0xD687 # HANGUL SYLLABLE HIEUH-WAE-CHIEUCH +0xD688 # HANGUL SYLLABLE HIEUH-WAE-KHIEUKH +0xD689 # HANGUL SYLLABLE HIEUH-WAE-THIEUTH +0xD68A # HANGUL SYLLABLE HIEUH-WAE-PHIEUPH +0xD68B # HANGUL SYLLABLE HIEUH-WAE-HIEUH +0xD68C # HANGUL SYLLABLE HIEUH-OE +0xD68D # HANGUL SYLLABLE HIEUH-OE-KIYEOK +0xD68E # HANGUL SYLLABLE HIEUH-OE-SSANGKIYEOK +0xD68F # HANGUL SYLLABLE HIEUH-OE-KIYEOKSIOS +0xD690 # HANGUL SYLLABLE HIEUH-OE-NIEUN +0xD691 # HANGUL SYLLABLE HIEUH-OE-NIEUNCIEUC +0xD692 # HANGUL SYLLABLE HIEUH-OE-NIEUNHIEUH +0xD693 # HANGUL SYLLABLE HIEUH-OE-TIKEUT +0xD694 # HANGUL SYLLABLE HIEUH-OE-RIEUL +0xD695 # HANGUL SYLLABLE HIEUH-OE-RIEULKIYEOK +0xD696 # HANGUL SYLLABLE HIEUH-OE-RIEULMIEUM +0xD697 # HANGUL SYLLABLE HIEUH-OE-RIEULPIEUP +0xD698 # HANGUL SYLLABLE HIEUH-OE-RIEULSIOS +0xD699 # HANGUL SYLLABLE HIEUH-OE-RIEULTHIEUTH +0xD69A # HANGUL SYLLABLE HIEUH-OE-RIEULPHIEUPH +0xD69B # HANGUL SYLLABLE HIEUH-OE-RIEULHIEUH +0xD69C # HANGUL SYLLABLE HIEUH-OE-MIEUM +0xD69D # HANGUL SYLLABLE HIEUH-OE-PIEUP +0xD69E # HANGUL SYLLABLE HIEUH-OE-PIEUPSIOS +0xD69F # HANGUL SYLLABLE HIEUH-OE-SIOS +0xD6A0 # HANGUL SYLLABLE HIEUH-OE-SSANGSIOS +0xD6A1 # HANGUL SYLLABLE HIEUH-OE-IEUNG +0xD6A2 # HANGUL SYLLABLE HIEUH-OE-CIEUC +0xD6A3 # HANGUL SYLLABLE HIEUH-OE-CHIEUCH +0xD6A4 # HANGUL SYLLABLE HIEUH-OE-KHIEUKH +0xD6A5 # HANGUL SYLLABLE HIEUH-OE-THIEUTH +0xD6A6 # HANGUL SYLLABLE HIEUH-OE-PHIEUPH +0xD6A7 # HANGUL SYLLABLE HIEUH-OE-HIEUH +0xD6A8 # HANGUL SYLLABLE HIEUH-YO +0xD6A9 # HANGUL SYLLABLE HIEUH-YO-KIYEOK +0xD6AA # HANGUL SYLLABLE HIEUH-YO-SSANGKIYEOK +0xD6AB # HANGUL SYLLABLE HIEUH-YO-KIYEOKSIOS +0xD6AC # HANGUL SYLLABLE HIEUH-YO-NIEUN +0xD6AD # HANGUL SYLLABLE HIEUH-YO-NIEUNCIEUC +0xD6AE # HANGUL SYLLABLE HIEUH-YO-NIEUNHIEUH +0xD6AF # HANGUL SYLLABLE HIEUH-YO-TIKEUT +0xD6B0 # HANGUL SYLLABLE HIEUH-YO-RIEUL +0xD6B1 # HANGUL SYLLABLE HIEUH-YO-RIEULKIYEOK +0xD6B2 # HANGUL SYLLABLE HIEUH-YO-RIEULMIEUM +0xD6B3 # HANGUL SYLLABLE HIEUH-YO-RIEULPIEUP +0xD6B4 # HANGUL SYLLABLE HIEUH-YO-RIEULSIOS +0xD6B5 # HANGUL SYLLABLE HIEUH-YO-RIEULTHIEUTH +0xD6B6 # HANGUL SYLLABLE HIEUH-YO-RIEULPHIEUPH +0xD6B7 # HANGUL SYLLABLE HIEUH-YO-RIEULHIEUH +0xD6B8 # HANGUL SYLLABLE HIEUH-YO-MIEUM +0xD6B9 # HANGUL SYLLABLE HIEUH-YO-PIEUP +0xD6BA # HANGUL SYLLABLE HIEUH-YO-PIEUPSIOS +0xD6BB # HANGUL SYLLABLE HIEUH-YO-SIOS +0xD6BC # HANGUL SYLLABLE HIEUH-YO-SSANGSIOS +0xD6BD # HANGUL SYLLABLE HIEUH-YO-IEUNG +0xD6BE # HANGUL SYLLABLE HIEUH-YO-CIEUC +0xD6BF # HANGUL SYLLABLE HIEUH-YO-CHIEUCH +0xD6C0 # HANGUL SYLLABLE HIEUH-YO-KHIEUKH +0xD6C1 # HANGUL SYLLABLE HIEUH-YO-THIEUTH +0xD6C2 # HANGUL SYLLABLE HIEUH-YO-PHIEUPH +0xD6C3 # HANGUL SYLLABLE HIEUH-YO-HIEUH +0xD6C4 # HANGUL SYLLABLE HIEUH-U +0xD6C5 # HANGUL SYLLABLE HIEUH-U-KIYEOK +0xD6C6 # HANGUL SYLLABLE HIEUH-U-SSANGKIYEOK +0xD6C7 # HANGUL SYLLABLE HIEUH-U-KIYEOKSIOS +0xD6C8 # HANGUL SYLLABLE HIEUH-U-NIEUN +0xD6C9 # HANGUL SYLLABLE HIEUH-U-NIEUNCIEUC +0xD6CA # HANGUL SYLLABLE HIEUH-U-NIEUNHIEUH +0xD6CB # HANGUL SYLLABLE HIEUH-U-TIKEUT +0xD6CC # HANGUL SYLLABLE HIEUH-U-RIEUL +0xD6CD # HANGUL SYLLABLE HIEUH-U-RIEULKIYEOK +0xD6CE # HANGUL SYLLABLE HIEUH-U-RIEULMIEUM +0xD6CF # HANGUL SYLLABLE HIEUH-U-RIEULPIEUP +0xD6D0 # HANGUL SYLLABLE HIEUH-U-RIEULSIOS +0xD6D1 # HANGUL SYLLABLE HIEUH-U-RIEULTHIEUTH +0xD6D2 # HANGUL SYLLABLE HIEUH-U-RIEULPHIEUPH +0xD6D3 # HANGUL SYLLABLE HIEUH-U-RIEULHIEUH +0xD6D4 # HANGUL SYLLABLE HIEUH-U-MIEUM +0xD6D5 # HANGUL SYLLABLE HIEUH-U-PIEUP +0xD6D6 # HANGUL SYLLABLE HIEUH-U-PIEUPSIOS +0xD6D7 # HANGUL SYLLABLE HIEUH-U-SIOS +0xD6D8 # HANGUL SYLLABLE HIEUH-U-SSANGSIOS +0xD6D9 # HANGUL SYLLABLE HIEUH-U-IEUNG +0xD6DA # HANGUL SYLLABLE HIEUH-U-CIEUC +0xD6DB # HANGUL SYLLABLE HIEUH-U-CHIEUCH +0xD6DC # HANGUL SYLLABLE HIEUH-U-KHIEUKH +0xD6DD # HANGUL SYLLABLE HIEUH-U-THIEUTH +0xD6DE # HANGUL SYLLABLE HIEUH-U-PHIEUPH +0xD6DF # HANGUL SYLLABLE HIEUH-U-HIEUH +0xD6E0 # HANGUL SYLLABLE HIEUH-WEO +0xD6E1 # HANGUL SYLLABLE HIEUH-WEO-KIYEOK +0xD6E2 # HANGUL SYLLABLE HIEUH-WEO-SSANGKIYEOK +0xD6E3 # HANGUL SYLLABLE HIEUH-WEO-KIYEOKSIOS +0xD6E4 # HANGUL SYLLABLE HIEUH-WEO-NIEUN +0xD6E5 # HANGUL SYLLABLE HIEUH-WEO-NIEUNCIEUC +0xD6E6 # HANGUL SYLLABLE HIEUH-WEO-NIEUNHIEUH +0xD6E7 # HANGUL SYLLABLE HIEUH-WEO-TIKEUT +0xD6E8 # HANGUL SYLLABLE HIEUH-WEO-RIEUL +0xD6E9 # HANGUL SYLLABLE HIEUH-WEO-RIEULKIYEOK +0xD6EA # HANGUL SYLLABLE HIEUH-WEO-RIEULMIEUM +0xD6EB # HANGUL SYLLABLE HIEUH-WEO-RIEULPIEUP +0xD6EC # HANGUL SYLLABLE HIEUH-WEO-RIEULSIOS +0xD6ED # HANGUL SYLLABLE HIEUH-WEO-RIEULTHIEUTH +0xD6EE # HANGUL SYLLABLE HIEUH-WEO-RIEULPHIEUPH +0xD6EF # HANGUL SYLLABLE HIEUH-WEO-RIEULHIEUH +0xD6F0 # HANGUL SYLLABLE HIEUH-WEO-MIEUM +0xD6F1 # HANGUL SYLLABLE HIEUH-WEO-PIEUP +0xD6F2 # HANGUL SYLLABLE HIEUH-WEO-PIEUPSIOS +0xD6F3 # HANGUL SYLLABLE HIEUH-WEO-SIOS +0xD6F4 # HANGUL SYLLABLE HIEUH-WEO-SSANGSIOS +0xD6F5 # HANGUL SYLLABLE HIEUH-WEO-IEUNG +0xD6F6 # HANGUL SYLLABLE HIEUH-WEO-CIEUC +0xD6F7 # HANGUL SYLLABLE HIEUH-WEO-CHIEUCH +0xD6F8 # HANGUL SYLLABLE HIEUH-WEO-KHIEUKH +0xD6F9 # HANGUL SYLLABLE HIEUH-WEO-THIEUTH +0xD6FA # HANGUL SYLLABLE HIEUH-WEO-PHIEUPH +0xD6FB # HANGUL SYLLABLE HIEUH-WEO-HIEUH +0xD6FC # HANGUL SYLLABLE HIEUH-WE +0xD6FD # HANGUL SYLLABLE HIEUH-WE-KIYEOK +0xD6FE # HANGUL SYLLABLE HIEUH-WE-SSANGKIYEOK +0xD6FF # HANGUL SYLLABLE HIEUH-WE-KIYEOKSIOS +0xD700 # HANGUL SYLLABLE HIEUH-WE-NIEUN +0xD701 # HANGUL SYLLABLE HIEUH-WE-NIEUNCIEUC +0xD702 # HANGUL SYLLABLE HIEUH-WE-NIEUNHIEUH +0xD703 # HANGUL SYLLABLE HIEUH-WE-TIKEUT +0xD704 # HANGUL SYLLABLE HIEUH-WE-RIEUL +0xD705 # HANGUL SYLLABLE HIEUH-WE-RIEULKIYEOK +0xD706 # HANGUL SYLLABLE HIEUH-WE-RIEULMIEUM +0xD707 # HANGUL SYLLABLE HIEUH-WE-RIEULPIEUP +0xD708 # HANGUL SYLLABLE HIEUH-WE-RIEULSIOS +0xD709 # HANGUL SYLLABLE HIEUH-WE-RIEULTHIEUTH +0xD70A # HANGUL SYLLABLE HIEUH-WE-RIEULPHIEUPH +0xD70B # HANGUL SYLLABLE HIEUH-WE-RIEULHIEUH +0xD70C # HANGUL SYLLABLE HIEUH-WE-MIEUM +0xD70D # HANGUL SYLLABLE HIEUH-WE-PIEUP +0xD70E # HANGUL SYLLABLE HIEUH-WE-PIEUPSIOS +0xD70F # HANGUL SYLLABLE HIEUH-WE-SIOS +0xD710 # HANGUL SYLLABLE HIEUH-WE-SSANGSIOS +0xD711 # HANGUL SYLLABLE HIEUH-WE-IEUNG +0xD712 # HANGUL SYLLABLE HIEUH-WE-CIEUC +0xD713 # HANGUL SYLLABLE HIEUH-WE-CHIEUCH +0xD714 # HANGUL SYLLABLE HIEUH-WE-KHIEUKH +0xD715 # HANGUL SYLLABLE HIEUH-WE-THIEUTH +0xD716 # HANGUL SYLLABLE HIEUH-WE-PHIEUPH +0xD717 # HANGUL SYLLABLE HIEUH-WE-HIEUH +0xD718 # HANGUL SYLLABLE HIEUH-WI +0xD719 # HANGUL SYLLABLE HIEUH-WI-KIYEOK +0xD71A # HANGUL SYLLABLE HIEUH-WI-SSANGKIYEOK +0xD71B # HANGUL SYLLABLE HIEUH-WI-KIYEOKSIOS +0xD71C # HANGUL SYLLABLE HIEUH-WI-NIEUN +0xD71D # HANGUL SYLLABLE HIEUH-WI-NIEUNCIEUC +0xD71E # HANGUL SYLLABLE HIEUH-WI-NIEUNHIEUH +0xD71F # HANGUL SYLLABLE HIEUH-WI-TIKEUT +0xD720 # HANGUL SYLLABLE HIEUH-WI-RIEUL +0xD721 # HANGUL SYLLABLE HIEUH-WI-RIEULKIYEOK +0xD722 # HANGUL SYLLABLE HIEUH-WI-RIEULMIEUM +0xD723 # HANGUL SYLLABLE HIEUH-WI-RIEULPIEUP +0xD724 # HANGUL SYLLABLE HIEUH-WI-RIEULSIOS +0xD725 # HANGUL SYLLABLE HIEUH-WI-RIEULTHIEUTH +0xD726 # HANGUL SYLLABLE HIEUH-WI-RIEULPHIEUPH +0xD727 # HANGUL SYLLABLE HIEUH-WI-RIEULHIEUH +0xD728 # HANGUL SYLLABLE HIEUH-WI-MIEUM +0xD729 # HANGUL SYLLABLE HIEUH-WI-PIEUP +0xD72A # HANGUL SYLLABLE HIEUH-WI-PIEUPSIOS +0xD72B # HANGUL SYLLABLE HIEUH-WI-SIOS +0xD72C # HANGUL SYLLABLE HIEUH-WI-SSANGSIOS +0xD72D # HANGUL SYLLABLE HIEUH-WI-IEUNG +0xD72E # HANGUL SYLLABLE HIEUH-WI-CIEUC +0xD72F # HANGUL SYLLABLE HIEUH-WI-CHIEUCH +0xD730 # HANGUL SYLLABLE HIEUH-WI-KHIEUKH +0xD731 # HANGUL SYLLABLE HIEUH-WI-THIEUTH +0xD732 # HANGUL SYLLABLE HIEUH-WI-PHIEUPH +0xD733 # HANGUL SYLLABLE HIEUH-WI-HIEUH +0xD734 # HANGUL SYLLABLE HIEUH-YU +0xD735 # HANGUL SYLLABLE HIEUH-YU-KIYEOK +0xD736 # HANGUL SYLLABLE HIEUH-YU-SSANGKIYEOK +0xD737 # HANGUL SYLLABLE HIEUH-YU-KIYEOKSIOS +0xD738 # HANGUL SYLLABLE HIEUH-YU-NIEUN +0xD739 # HANGUL SYLLABLE HIEUH-YU-NIEUNCIEUC +0xD73A # HANGUL SYLLABLE HIEUH-YU-NIEUNHIEUH +0xD73B # HANGUL SYLLABLE HIEUH-YU-TIKEUT +0xD73C # HANGUL SYLLABLE HIEUH-YU-RIEUL +0xD73D # HANGUL SYLLABLE HIEUH-YU-RIEULKIYEOK +0xD73E # HANGUL SYLLABLE HIEUH-YU-RIEULMIEUM +0xD73F # HANGUL SYLLABLE HIEUH-YU-RIEULPIEUP +0xD740 # HANGUL SYLLABLE HIEUH-YU-RIEULSIOS +0xD741 # HANGUL SYLLABLE HIEUH-YU-RIEULTHIEUTH +0xD742 # HANGUL SYLLABLE HIEUH-YU-RIEULPHIEUPH +0xD743 # HANGUL SYLLABLE HIEUH-YU-RIEULHIEUH +0xD744 # HANGUL SYLLABLE HIEUH-YU-MIEUM +0xD745 # HANGUL SYLLABLE HIEUH-YU-PIEUP +0xD746 # HANGUL SYLLABLE HIEUH-YU-PIEUPSIOS +0xD747 # HANGUL SYLLABLE HIEUH-YU-SIOS +0xD748 # HANGUL SYLLABLE HIEUH-YU-SSANGSIOS +0xD749 # HANGUL SYLLABLE HIEUH-YU-IEUNG +0xD74A # HANGUL SYLLABLE HIEUH-YU-CIEUC +0xD74B # HANGUL SYLLABLE HIEUH-YU-CHIEUCH +0xD74C # HANGUL SYLLABLE HIEUH-YU-KHIEUKH +0xD74D # HANGUL SYLLABLE HIEUH-YU-THIEUTH +0xD74E # HANGUL SYLLABLE HIEUH-YU-PHIEUPH +0xD74F # HANGUL SYLLABLE HIEUH-YU-HIEUH +0xD750 # HANGUL SYLLABLE HIEUH-EU +0xD751 # HANGUL SYLLABLE HIEUH-EU-KIYEOK +0xD752 # HANGUL SYLLABLE HIEUH-EU-SSANGKIYEOK +0xD753 # HANGUL SYLLABLE HIEUH-EU-KIYEOKSIOS +0xD754 # HANGUL SYLLABLE HIEUH-EU-NIEUN +0xD755 # HANGUL SYLLABLE HIEUH-EU-NIEUNCIEUC +0xD756 # HANGUL SYLLABLE HIEUH-EU-NIEUNHIEUH +0xD757 # HANGUL SYLLABLE HIEUH-EU-TIKEUT +0xD758 # HANGUL SYLLABLE HIEUH-EU-RIEUL +0xD759 # HANGUL SYLLABLE HIEUH-EU-RIEULKIYEOK +0xD75A # HANGUL SYLLABLE HIEUH-EU-RIEULMIEUM +0xD75B # HANGUL SYLLABLE HIEUH-EU-RIEULPIEUP +0xD75C # HANGUL SYLLABLE HIEUH-EU-RIEULSIOS +0xD75D # HANGUL SYLLABLE HIEUH-EU-RIEULTHIEUTH +0xD75E # HANGUL SYLLABLE HIEUH-EU-RIEULPHIEUPH +0xD75F # HANGUL SYLLABLE HIEUH-EU-RIEULHIEUH +0xD760 # HANGUL SYLLABLE HIEUH-EU-MIEUM +0xD761 # HANGUL SYLLABLE HIEUH-EU-PIEUP +0xD762 # HANGUL SYLLABLE HIEUH-EU-PIEUPSIOS +0xD763 # HANGUL SYLLABLE HIEUH-EU-SIOS +0xD764 # HANGUL SYLLABLE HIEUH-EU-SSANGSIOS +0xD765 # HANGUL SYLLABLE HIEUH-EU-IEUNG +0xD766 # HANGUL SYLLABLE HIEUH-EU-CIEUC +0xD767 # HANGUL SYLLABLE HIEUH-EU-CHIEUCH +0xD768 # HANGUL SYLLABLE HIEUH-EU-KHIEUKH +0xD769 # HANGUL SYLLABLE HIEUH-EU-THIEUTH +0xD76A # HANGUL SYLLABLE HIEUH-EU-PHIEUPH +0xD76B # HANGUL SYLLABLE HIEUH-EU-HIEUH +0xD76C # HANGUL SYLLABLE HIEUH-YI +0xD76D # HANGUL SYLLABLE HIEUH-YI-KIYEOK +0xD76E # HANGUL SYLLABLE HIEUH-YI-SSANGKIYEOK +0xD76F # HANGUL SYLLABLE HIEUH-YI-KIYEOKSIOS +0xD770 # HANGUL SYLLABLE HIEUH-YI-NIEUN +0xD771 # HANGUL SYLLABLE HIEUH-YI-NIEUNCIEUC +0xD772 # HANGUL SYLLABLE HIEUH-YI-NIEUNHIEUH +0xD773 # HANGUL SYLLABLE HIEUH-YI-TIKEUT +0xD774 # HANGUL SYLLABLE HIEUH-YI-RIEUL +0xD775 # HANGUL SYLLABLE HIEUH-YI-RIEULKIYEOK +0xD776 # HANGUL SYLLABLE HIEUH-YI-RIEULMIEUM +0xD777 # HANGUL SYLLABLE HIEUH-YI-RIEULPIEUP +0xD778 # HANGUL SYLLABLE HIEUH-YI-RIEULSIOS +0xD779 # HANGUL SYLLABLE HIEUH-YI-RIEULTHIEUTH +0xD77A # HANGUL SYLLABLE HIEUH-YI-RIEULPHIEUPH +0xD77B # HANGUL SYLLABLE HIEUH-YI-RIEULHIEUH +0xD77C # HANGUL SYLLABLE HIEUH-YI-MIEUM +0xD77D # HANGUL SYLLABLE HIEUH-YI-PIEUP +0xD77E # HANGUL SYLLABLE HIEUH-YI-PIEUPSIOS +0xD77F # HANGUL SYLLABLE HIEUH-YI-SIOS +0xD780 # HANGUL SYLLABLE HIEUH-YI-SSANGSIOS +0xD781 # HANGUL SYLLABLE HIEUH-YI-IEUNG +0xD782 # HANGUL SYLLABLE HIEUH-YI-CIEUC +0xD783 # HANGUL SYLLABLE HIEUH-YI-CHIEUCH +0xD784 # HANGUL SYLLABLE HIEUH-YI-KHIEUKH +0xD785 # HANGUL SYLLABLE HIEUH-YI-THIEUTH +0xD786 # HANGUL SYLLABLE HIEUH-YI-PHIEUPH +0xD787 # HANGUL SYLLABLE HIEUH-YI-HIEUH +0xD788 # HANGUL SYLLABLE HIEUH-I +0xD789 # HANGUL SYLLABLE HIEUH-I-KIYEOK +0xD78A # HANGUL SYLLABLE HIEUH-I-SSANGKIYEOK +0xD78B # HANGUL SYLLABLE HIEUH-I-KIYEOKSIOS +0xD78C # HANGUL SYLLABLE HIEUH-I-NIEUN +0xD78D # HANGUL SYLLABLE HIEUH-I-NIEUNCIEUC +0xD78E # HANGUL SYLLABLE HIEUH-I-NIEUNHIEUH +0xD78F # HANGUL SYLLABLE HIEUH-I-TIKEUT +0xD790 # HANGUL SYLLABLE HIEUH-I-RIEUL +0xD791 # HANGUL SYLLABLE HIEUH-I-RIEULKIYEOK +0xD792 # HANGUL SYLLABLE HIEUH-I-RIEULMIEUM +0xD793 # HANGUL SYLLABLE HIEUH-I-RIEULPIEUP +0xD794 # HANGUL SYLLABLE HIEUH-I-RIEULSIOS +0xD795 # HANGUL SYLLABLE HIEUH-I-RIEULTHIEUTH +0xD796 # HANGUL SYLLABLE HIEUH-I-RIEULPHIEUPH +0xD797 # HANGUL SYLLABLE HIEUH-I-RIEULHIEUH +0xD798 # HANGUL SYLLABLE HIEUH-I-MIEUM +0xD799 # HANGUL SYLLABLE HIEUH-I-PIEUP +0xD79A # HANGUL SYLLABLE HIEUH-I-PIEUPSIOS +0xD79B # HANGUL SYLLABLE HIEUH-I-SIOS +0xD79C # HANGUL SYLLABLE HIEUH-I-SSANGSIOS +0xD79D # HANGUL SYLLABLE HIEUH-I-IEUNG +0xD79E # HANGUL SYLLABLE HIEUH-I-CIEUC +0xD79F # HANGUL SYLLABLE HIEUH-I-CHIEUCH +0xD7A0 # HANGUL SYLLABLE HIEUH-I-KHIEUKH +0xD7A1 # HANGUL SYLLABLE HIEUH-I-THIEUTH +0xD7A2 # HANGUL SYLLABLE HIEUH-I-PHIEUPH +0xD7A3 # HANGUL SYLLABLE HIEUH-I-HIEUH +0xF900 # <CJK> +0xF901 # <CJK> +0xF902 # <CJK> +0xF903 # <CJK> +0xF904 # <CJK> +0xF905 # <CJK> +0xF906 # <CJK> +0xF907 # <CJK> +0xF908 # <CJK> +0xF909 # <CJK> +0xF90A # <CJK> +0xF90B # <CJK> +0xF90C # <CJK> +0xF90D # <CJK> +0xF90E # <CJK> +0xF90F # <CJK> +0xF910 # <CJK> +0xF911 # <CJK> +0xF912 # <CJK> +0xF913 # <CJK> +0xF914 # <CJK> +0xF915 # <CJK> +0xF916 # <CJK> +0xF917 # <CJK> +0xF918 # <CJK> +0xF919 # <CJK> +0xF91A # <CJK> +0xF91B # <CJK> +0xF91C # <CJK> +0xF91D # <CJK> +0xF91E # <CJK> +0xF91F # <CJK> +0xF920 # <CJK> +0xF921 # <CJK> +0xF922 # <CJK> +0xF923 # <CJK> +0xF924 # <CJK> +0xF925 # <CJK> +0xF926 # <CJK> +0xF927 # <CJK> +0xF928 # <CJK> +0xF929 # <CJK> +0xF92A # <CJK> +0xF92B # <CJK> +0xF92C # <CJK> +0xF92D # <CJK> +0xF92E # <CJK> +0xF92F # <CJK> +0xF930 # <CJK> +0xF931 # <CJK> +0xF932 # <CJK> +0xF933 # <CJK> +0xF934 # <CJK> +0xF935 # <CJK> +0xF936 # <CJK> +0xF937 # <CJK> +0xF938 # <CJK> +0xF939 # <CJK> +0xF93A # <CJK> +0xF93B # <CJK> +0xF93C # <CJK> +0xF93D # <CJK> +0xF93E # <CJK> +0xF93F # <CJK> +0xF940 # <CJK> +0xF941 # <CJK> +0xF942 # <CJK> +0xF943 # <CJK> +0xF944 # <CJK> +0xF945 # <CJK> +0xF946 # <CJK> +0xF947 # <CJK> +0xF948 # <CJK> +0xF949 # <CJK> +0xF94A # <CJK> +0xF94B # <CJK> +0xF94C # <CJK> +0xF94D # <CJK> +0xF94E # <CJK> +0xF94F # <CJK> +0xF950 # <CJK> +0xF951 # <CJK> +0xF952 # <CJK> +0xF953 # <CJK> +0xF954 # <CJK> +0xF955 # <CJK> +0xF956 # <CJK> +0xF957 # <CJK> +0xF958 # <CJK> +0xF959 # <CJK> +0xF95A # <CJK> +0xF95B # <CJK> +0xF95C # <CJK> +0xF95D # <CJK> +0xF95E # <CJK> +0xF95F # <CJK> +0xF960 # <CJK> +0xF961 # <CJK> +0xF962 # <CJK> +0xF963 # <CJK> +0xF964 # <CJK> +0xF965 # <CJK> +0xF966 # <CJK> +0xF967 # <CJK> +0xF968 # <CJK> +0xF969 # <CJK> +0xF96A # <CJK> +0xF96B # <CJK> +0xF96C # <CJK> +0xF96D # <CJK> +0xF96E # <CJK> +0xF96F # <CJK> +0xF970 # <CJK> +0xF971 # <CJK> +0xF972 # <CJK> +0xF973 # <CJK> +0xF974 # <CJK> +0xF975 # <CJK> +0xF976 # <CJK> +0xF977 # <CJK> +0xF978 # <CJK> +0xF979 # <CJK> +0xF97A # <CJK> +0xF97B # <CJK> +0xF97C # <CJK> +0xF97D # <CJK> +0xF97E # <CJK> +0xF97F # <CJK> +0xF980 # <CJK> +0xF981 # <CJK> +0xF982 # <CJK> +0xF983 # <CJK> +0xF984 # <CJK> +0xF985 # <CJK> +0xF986 # <CJK> +0xF987 # <CJK> +0xF988 # <CJK> +0xF989 # <CJK> +0xF98A # <CJK> +0xF98B # <CJK> +0xF98C # <CJK> +0xF98D # <CJK> +0xF98E # <CJK> +0xF98F # <CJK> +0xF990 # <CJK> +0xF991 # <CJK> +0xF992 # <CJK> +0xF993 # <CJK> +0xF994 # <CJK> +0xF995 # <CJK> +0xF996 # <CJK> +0xF997 # <CJK> +0xF998 # <CJK> +0xF999 # <CJK> +0xF99A # <CJK> +0xF99B # <CJK> +0xF99C # <CJK> +0xF99D # <CJK> +0xF99E # <CJK> +0xF99F # <CJK> +0xF9A0 # <CJK> +0xF9A1 # <CJK> +0xF9A2 # <CJK> +0xF9A3 # <CJK> +0xF9A4 # <CJK> +0xF9A5 # <CJK> +0xF9A6 # <CJK> +0xF9A7 # <CJK> +0xF9A8 # <CJK> +0xF9A9 # <CJK> +0xF9AA # <CJK> +0xF9AB # <CJK> +0xF9AC # <CJK> +0xF9AD # <CJK> +0xF9AE # <CJK> +0xF9AF # <CJK> +0xF9B0 # <CJK> +0xF9B1 # <CJK> +0xF9B2 # <CJK> +0xF9B3 # <CJK> +0xF9B4 # <CJK> +0xF9B5 # <CJK> +0xF9B6 # <CJK> +0xF9B7 # <CJK> +0xF9B8 # <CJK> +0xF9B9 # <CJK> +0xF9BA # <CJK> +0xF9BB # <CJK> +0xF9BC # <CJK> +0xF9BD # <CJK> +0xF9BE # <CJK> +0xF9BF # <CJK> +0xF9C0 # <CJK> +0xF9C1 # <CJK> +0xF9C2 # <CJK> +0xF9C3 # <CJK> +0xF9C4 # <CJK> +0xF9C5 # <CJK> +0xF9C6 # <CJK> +0xF9C7 # <CJK> +0xF9C8 # <CJK> +0xF9C9 # <CJK> +0xF9CA # <CJK> +0xF9CB # <CJK> +0xF9CC # <CJK> +0xF9CD # <CJK> +0xF9CE # <CJK> +0xF9CF # <CJK> +0xF9D0 # <CJK> +0xF9D1 # <CJK> +0xF9D2 # <CJK> +0xF9D3 # <CJK> +0xF9D4 # <CJK> +0xF9D5 # <CJK> +0xF9D6 # <CJK> +0xF9D7 # <CJK> +0xF9D8 # <CJK> +0xF9D9 # <CJK> +0xF9DA # <CJK> +0xF9DB # <CJK> +0xF9DC # <CJK> +0xF9DD # <CJK> +0xF9DE # <CJK> +0xF9DF # <CJK> +0xF9E0 # <CJK> +0xF9E1 # <CJK> +0xF9E2 # <CJK> +0xF9E3 # <CJK> +0xF9E4 # <CJK> +0xF9E5 # <CJK> +0xF9E6 # <CJK> +0xF9E7 # <CJK> +0xF9E8 # <CJK> +0xF9E9 # <CJK> +0xF9EA # <CJK> +0xF9EB # <CJK> +0xF9EC # <CJK> +0xF9ED # <CJK> +0xF9EE # <CJK> +0xF9EF # <CJK> +0xF9F0 # <CJK> +0xF9F1 # <CJK> +0xF9F2 # <CJK> +0xF9F3 # <CJK> +0xF9F4 # <CJK> +0xF9F5 # <CJK> +0xF9F6 # <CJK> +0xF9F7 # <CJK> +0xF9F8 # <CJK> +0xF9F9 # <CJK> +0xF9FA # <CJK> +0xF9FB # <CJK> +0xF9FC # <CJK> +0xF9FD # <CJK> +0xF9FE # <CJK> +0xF9FF # <CJK> +0xFA00 # <CJK> +0xFA01 # <CJK> +0xFA02 # <CJK> +0xFA03 # <CJK> +0xFA04 # <CJK> +0xFA05 # <CJK> +0xFA06 # <CJK> +0xFA07 # <CJK> +0xFA08 # <CJK> +0xFA09 # <CJK> +0xFA0A # <CJK> +0xFA0B # <CJK> +#0xFFE6 # FULLWIDTH WON SIGN Index: xc/lib/fontconfig/fc-lang/kok.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/kok.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/kok.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/kok.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Kokani (Devanagari script) (KOK) +include hi.orth Index: xc/lib/fontconfig/fc-lang/ks.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ks.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ks.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ks.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Kashmiri (Devanagari script) (KS) +include hi.orth Index: xc/lib/fontconfig/fc-lang/ku.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ku.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ku.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,94 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ku.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Kurdish (KU) +# +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0427 +0428 +0429 +042a +042d +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0447 +0448 +0449 +044a +044d +04ba +04bb +04d8 +04d9 +04e6 +04e7 +051 # Latin Q +057 # Latin W +071 # Latin q +077 # Latin w Index: xc/lib/fontconfig/fc-lang/kum.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/kum.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/kum.orth Fri Jul 12 03:58:16 2002 @@ -0,0 +1,96 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/kum.orth,v 1.1 2002/07/12 07:58:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Kumyk (KUM) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 Index: xc/lib/fontconfig/fc-lang/kv.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/kv.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/kv.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,101 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/kv.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Komi (Komi-Permyak/Komi-Siryan) (KV) +# +# I've taken Komi-Permyak as it contains two extra codepoints +0401 +0406 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +0456 +04e6 +04e7 Index: xc/lib/fontconfig/fc-lang/kw.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/kw.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/kw.orth Wed Aug 7 13:34:15 2002 @@ -0,0 +1,35 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/kw.orth,v 1.1 2002/08/07 17:34:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Cornish (KW) +# +# Orthography from http://www.evertype.com/alphabets/cornish.pdf +# +0041-005a +0061-007a +0100-0101 +0112-0113 +012a-012b +014c-014d +016a-016b +0232-0233 Index: xc/lib/fontconfig/fc-lang/ky.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ky.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ky.orth Mon Oct 21 13:03:47 2002 @@ -0,0 +1,102 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ky.orth,v 1.2 2002/10/21 17:03:47 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Kirgiz (KY) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +#0472 # CYRILLIC CAPITAL LETTER FITA (Historic cyrillic letter) +#0473 # CYRILLIC SMALL LETTER FITA (Historic cyrillic letter) +04a2 +04a3 +04ae +04af Index: xc/lib/fontconfig/fc-lang/la.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/la.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/la.orth Sat Jul 6 19:59:16 2002 @@ -0,0 +1,31 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/la.orth,v 1.2 2002/07/06 23:59:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Latin (LA) +0041-005a +0061-007a +0100-0101 +0112-0113 +012a-012d +014c-014f +016a-016d Index: xc/lib/fontconfig/fc-lang/lb.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/lb.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/lb.orth Fri Jul 12 17:06:00 2002 @@ -0,0 +1,62 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/lb.orth,v 1.2 2002/07/12 21:06:00 keithp Exp $ +# +# Copyright © 2002 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. +# +# Luxembourgish (Letzeburgesch) (LB) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +# +# Required characters +# +00c4 +00e4 +00c9 +00e9 +00cb +00eb +00d6 +00f6 +00dc +00fc +# +# Important characters +# +00c2 +00e2 +00c8 +00e8 +00ca +00ea +00ce +00ee +#e006 # LATIN CAPITAL LETTER M WITH CIRCUMFLEX (no UCS) +#e007 # LATIN SMALL LETTER M WITH CIRCUMFLEX (no UCS) +#e008 # LATIN CAPITAL LETTER N WITH CIRCUMFLEX (no UCS) +#e009 # LATIN SMALL LETTER N WITH CIRCUMFLEX (no UCS) +00d4 +00f4 +00db +00fb +00df Index: xc/lib/fontconfig/fc-lang/lez.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/lez.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/lez.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,97 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/lez.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Lezghian (Lezgian) (LEZ) +# +0401 +0406 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 Index: xc/lib/fontconfig/fc-lang/lo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/lo.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/lo.orth Sun Jul 7 15:18:51 2002 @@ -0,0 +1,45 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/lo.orth,v 1.1 2002/07/07 19:18:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Lao (LO) +# +# Taken from the Unicode coverage of this language +# +0e81-0e82 +0e84 +0e87-0e88 +0e8a +0e8d +0e94-0e97 +0e99-0e9f +0ea1-0ea3 +0ea5 +0ea7 +0eaa-0eab +0ead-0eb9 +0ebb-0ebd +0ec0-0ec4 +0ec6 +0ec8-0ecd +0ed0-0ed9 +0edc-0edd Index: xc/lib/fontconfig/fc-lang/lt.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/lt.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/lt.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,43 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/lt.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Lithuanian (LT) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +0104-0105 +010c-010d +#0106-0109 +0116-0117 +0118-0119 +012e-012f +0160-0161 +016a-016b +0172-0173 +017d-017e +#2019-201a # single quotes +#201d-201e # double quotes Index: xc/lib/fontconfig/fc-lang/lv.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/lv.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/lv.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,44 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/lv.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Latvian (LV) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +0100-0101 +010c-010d +0112-0113 +0122-0123 +012a-012b +0136-0137 +013b-013c +0145-0146 +014c-014d +0156-0157 +0160-0161 +016a-016b +017d-017e Index: xc/lib/fontconfig/fc-lang/mg.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/mg.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/mg.orth Fri Jul 12 17:06:00 2002 @@ -0,0 +1,35 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/mg.orth,v 1.2 2002/07/12 21:06:00 keithp Exp $ +# +# Copyright © 2002 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. +# +# Malagasy (MG) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c1 +00e1 +#e010 # LATIN CAPITAL LETTER N WITH DIAERESIS +#e011 # LATIN SMALL LETTER N WITH DIAERESIS +00d4 +00f4 Index: xc/lib/fontconfig/fc-lang/mh.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/mh.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/mh.orth Fri Jul 12 17:06:00 2002 @@ -0,0 +1,45 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/mh.orth,v 1.2 2002/07/12 21:06:00 keithp Exp $ +# +# Copyright © 2002 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. +# +# Marshallese (MH) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +0100 +0101 +013b +013c +#e00a # LATIN CAPITAL LETTER M WITH CEDILLA (no UCS) +#e00b # LATIN SMALL LETTER M WITH CEDILLA (no UCS) +#e00c # LATIN CAPITAL LETTER N WITH MACRON (no UCS) +#e00d # LATIN SMALL LETTER N WITH MACRON (no UCS) +0145 +0146 +014c +014d +#e00e # LATIN CAPITAL LETTER O WITH CEDILLA (no UCS) +#e00f # LATIN SMALL LETTER O WITH CEDILLA (no UCS) +016a +016b Index: xc/lib/fontconfig/fc-lang/mi.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/mi.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/mi.orth Sat Jul 27 19:13:28 2002 @@ -0,0 +1,35 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/mi.orth,v 1.2 2002/07/27 23:13:28 keithp Exp $ +# +# Copyright © 2002 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. +# +# Maori (MI) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +0100-0101 +0112-0113 +012a-012b +014c-014d +016a-016b +1e34-1e35 # Ngai Tahu specific Index: xc/lib/fontconfig/fc-lang/mk.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/mk.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/mk.orth Fri Jul 12 17:06:00 2002 @@ -0,0 +1,40 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/mk.orth,v 1.3 2002/07/12 21:06:00 keithp Exp $ +# +# Copyright © 2002 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. +# +# Macedonian (MK) +0400 # CYRILLIC CAPITAL LETTER IE WITH GRAVE +0403 +0405 +0408-040a +040c +040d # CYRILLIC CAPITAL LETTER I WITH GRAVE +040f +0410-0418 +041a-0428 +0450 # CYRILLIC SMALL LETTER IE WITH GRAVE +0453 +0455 +0458-045a +045c +045d # CYRILLIC SMALL LETTER I WITH GRAVE +045f Index: xc/lib/fontconfig/fc-lang/ml.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ml.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ml.orth Sun Jul 7 15:18:51 2002 @@ -0,0 +1,38 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ml.orth,v 1.1 2002/07/07 19:18:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Malayalam (ML) +# +# Taken from the Unicode coverage of this language +# +0d02-0d03 +0d05-0d0c +0d0e-0d10 +0d12-0d28 +0d2a-0d39 +0d3e-0d43 +0d46-0d48 +0d4a-0d4d +0d57 +0d60-0d61 +0d66-0d6f Index: xc/lib/fontconfig/fc-lang/mn.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/mn.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/mn.orth Fri Jul 12 17:06:00 2002 @@ -0,0 +1,37 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/mn.orth,v 1.2 2002/07/12 21:06:00 keithp Exp $ +# +# Copyright © 2002 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. +# +# Mongolian (MN) +# +# Taken from the Unicode coverage of this language +# +# Basic letters +1820-1842 +# Todo letters +1843-185c +# Sibe letters +185d-1872 +# Manchu letters +1873-1877 +# Extensions for Sanskrit and Tibetan +1880-18a9 Index: xc/lib/fontconfig/fc-lang/mo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/mo.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/mo.orth Fri Jul 12 17:06:00 2002 @@ -0,0 +1,37 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/mo.orth,v 1.3 2002/07/12 21:06:00 keithp Exp $ +# +# Copyright © 2002 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. +# +# Moldavian (MO) +0041-005a +0061-007a +00c2 +00ce +00e2 +00ee +0102-0103 +0218-021b # Comma below forms (preferred over cedilla) +0401 +0410-044f +0451 +#2019-201a # single quotes +#201d-201e # double quotes Index: xc/lib/fontconfig/fc-lang/mr.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/mr.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/mr.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/mr.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Marathi (Devanagari script) (MR) +include hi.orth Index: xc/lib/fontconfig/fc-lang/mt.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/mt.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/mt.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,67 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/mt.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Maltese (MT) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00c0 +#00c1 +#00c2 +00c8 +#00c9 +#00ca +00cc +#00cd +00ce +00d2 +#00d3 +#00d4 +00d9 +#00da +#00db +00e0 +#00e1 +#00e2 +00e8 +#00e9 +#00ea +00ec +#00ed +00ee +00f2 +#00f3 +#00f4 +00f9 +#00fa +#00fb +010a-010b +0120-0121 +0126-0127 +017b-017c +#02bc +# Index: xc/lib/fontconfig/fc-lang/my.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/my.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/my.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,37 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/my.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Burmese (Myanmar) (MY) +# +# Orthography from Unicode range (U+1000-U+1059) +# +# Consonants +1000-1020 +# Independent vowels +1021 +1023-1027 +1029-102a +# Dependent vowel signs +102c-1032 +# Pali and Sanskrit extensions +#1050-1059 Index: xc/lib/fontconfig/fc-lang/nb.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/nb.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/nb.orth Fri Jul 12 05:12:37 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/nb.orth,v 1.1 2002/07/12 09:12:37 keithp Exp $ +# +# Copyright © 2002 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. +# +# Norwegian Bokmål (NB) +include no.orth Index: xc/lib/fontconfig/fc-lang/ne.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ne.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ne.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ne.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Nepali (Devanagari script) (NE) +include hi.orth Index: xc/lib/fontconfig/fc-lang/nl.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/nl.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/nl.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,63 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/nl.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Dutch (NL) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00c1 +00c2 +00c4 +00c8 +00c9 +00ca +00cb +00cd +00cf +00d3 +00d4 +00d6 +00da +00db +00dc +00e1 +00e2 +00e4 +00e8 +00e9 +00ea +00eb +00ed +00ef +00f3 +00f4 +00f6 +00fa +00fb +00fc +#0132-0133 # IJ and ij ligatures + Index: xc/lib/fontconfig/fc-lang/nn.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/nn.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/nn.orth Fri Jul 12 05:12:37 2002 @@ -0,0 +1,43 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/nn.orth,v 1.1 2002/07/12 09:12:37 keithp Exp $ +# +# Copyright © 2002 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. +# +# Norwegian Nynorsk (NN) +0041-005a +0061-007a +#00ab # double angle quotes +#00bb # double angle quotes +00c0 +00c4-00c6 +00c9-00ca +00d2-00d4 +00d6 +00d8 +00dc +00e0 +00e4-00e6 +00e9-00ea +00f2-00f4 +00f6 +00f8 +00fc +#2039-203a # single quotes Index: xc/lib/fontconfig/fc-lang/no.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/no.orth:1.4 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/no.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,68 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/no.orth,v 1.4 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Norwegian (Bokmål) (NO) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +#00ab +#00bb +00c0 +#00c1 +#00c2 +#00c4 +00c5 +00c6 +#00c7 +#00c8 +00c9 +00ca +#00cb +00d2 +00d3 +00d4 +#00d6 +00d8 +#00dc +00e0 +#00e1 +#00e2 +#00e4 +00e5 +00e6 +#00e7 +#00e8 +00e9 +00ea +#00eb +00f2 +00f3 +00f4 +#00f6 +00f8 +#00fc +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/ny.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ny.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ny.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,30 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ny.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Chichewa (NY) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +0174-0175 Index: xc/lib/fontconfig/fc-lang/oc.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/oc.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/oc.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,53 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/oc.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Occitan (OC) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00c0 +00c1 +00c7 +00c8 +00c9 +#00cb +00cd +#00cf +00d2 +00d3 +00da +00e0 +00e1 +00e7 +00e8 +00e9 +#00eb +00ed +#00ef +00f2 +00f3 +00fa Index: xc/lib/fontconfig/fc-lang/om.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/om.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/om.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/om.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Oromo or Galla (OM) +# +# Orthography taken from http://www.ideography.co.uk/library/pdf/charsets.pdf +# +0041-005a # Oromo doesn't use v or z +0061-007a Index: xc/lib/fontconfig/fc-lang/or.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/or.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/or.orth Sun Jul 7 15:18:51 2002 @@ -0,0 +1,41 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/or.orth,v 1.1 2002/07/07 19:18:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Oriya (OR) +# +# Taken from the Unicode coverage of this language +# +0b01-0b03 +0b05-0b0c +0b0f-0b10 +0b13-0b28 +0b2a-0b30 +0b32-0b33 +0b36-0b39 +0b3c-0b43 +0b47-0b48 +0b4b-0b4d +0b56-0b57 +0b5c-0b5d +0b5f-0b61 +0b66-0b70 Index: xc/lib/fontconfig/fc-lang/os.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/os.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/os.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,96 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/os.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Ossetic (OS) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 Index: xc/lib/fontconfig/fc-lang/pl.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/pl.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/pl.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,41 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/pl.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Polish (PL) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00d3 +00f3 +0104-0105 +0106-0107 +0118-0119 +0141-0142 +0143-0144 +015a-015b +0179-017a +017b-017c Index: xc/lib/fontconfig/fc-lang/pt.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/pt.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/pt.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,64 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/pt.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Portuguese (PT) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +#00bb +00c0 +00c1 +00c2 +00c3 +00c7 +00c8 +00c9 +00ca +00cd +00d2 +00d3 +00d4 +00d5 +00da +00dc +00e0 +00e1 +00e2 +00e3 +00e7 +00e8 +00e9 +00ea +00ed +00f2 +00f3 +00f4 +00f5 +00fa +00fc +##203a # angle quote +# Index: xc/lib/fontconfig/fc-lang/rm.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/rm.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/rm.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,45 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/rm.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Rhaeto-Romance (Romansch) (RM) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00c0 +00c8 +00c9 +00cc +00ce +00d2 +00d9 +00e0 +00e8 +00e9 +00ec +00ee +00f2 +00f9 Index: xc/lib/fontconfig/fc-lang/ro.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ro.orth:1.4 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ro.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,38 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ro.orth,v 1.4 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Romanian (RO) +# +# Sources: +# www.eki.ee/letter +# +0041-005a +0061-007a +00c2 +00ce +00e2 +00ee +0102-0103 +0218-021b # comma-below forms (preferred over cedilla) +#2019-201a # single quotes +#201d-201e # double quotes Index: xc/lib/fontconfig/fc-lang/ru.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ru.orth:1.4 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ru.orth Mon Oct 21 13:03:47 2002 @@ -0,0 +1,38 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ru.orth,v 1.4 2002/10/21 17:03:47 keithp Exp $ +# +# Copyright © 2002 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. +# +# Russian (RU) +#00ab +#00bb +0401 +0406 +0410-044f +0451 +0456 +#0462 # CYRILLIC CAPITAL LETTER YAT +#0463 # CYRILLIC SMALL LETTER YAT +#0472 # CYRILLIC CAPITAL LETTER FITA +#0473 # CYRILLIC SMALL LETTER FITA +#0474 # CYRILLIC CAPITAL LETTER IZHITSA +#0475 # CYRILLIC SMALL LETTER IZHITSA +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/sa.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sa.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sa.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sa.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Sanskrit (Devanagari script) (SA) +include hi.orth Index: xc/lib/fontconfig/fc-lang/sah.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sah.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sah.orth Mon Oct 21 13:03:47 2002 @@ -0,0 +1,108 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sah.orth,v 1.2 2002/10/21 17:03:47 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Yakut (SAH) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +#0472 # CYRILLIC CAPITAL LETTER FITA +#0473 # CYRILLIC SMALL LETTER FITA +0494 +0495 +04a4 +04a5 +04ae +04af +04ba +04bb +04d8 +04d9 Index: xc/lib/fontconfig/fc-lang/sco.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sco.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sco.orth Wed Aug 7 13:34:15 2002 @@ -0,0 +1,32 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sco.orth,v 1.1 2002/08/07 17:34:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Scots (CU) +# +# Orthography from http://www.evertype.com/alphabets/scots.pdf +# +0041-005a +0061-007a +01b7 +021c-021d +0292 Index: xc/lib/fontconfig/fc-lang/se.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/se.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/se.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,37 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/se.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# North Sámi (SE) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c1 +00e1 +010c-010d +0110-0111 +014a-014b +0160-0161 +0166-0167 +017d-017e Index: xc/lib/fontconfig/fc-lang/sel.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sel.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sel.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,96 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sel.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Selkup (Ostyak-Samoyed) (SEL) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 Index: xc/lib/fontconfig/fc-lang/sh.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sh.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sh.orth Sat Jul 6 19:59:19 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sh.orth,v 1.2 2002/07/06 23:59:19 keithp Exp $ +# +# Copyright © 2002 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. +# +# Serbo-Croatian (SH) +include sr.orth Index: xc/lib/fontconfig/fc-lang/si.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/si.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/si.orth Fri Jul 12 17:06:00 2002 @@ -0,0 +1,40 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/si.orth,v 1.2 2002/07/12 21:06:00 keithp Exp $ +# +# Copyright © 2002 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. +# +# Sinhala (Sinhalese) (SI) +# +# Taken from the Unicode coverage of this language +# +# Independent vowels +0d85-0d96 +# Consonants +0d9a-0db1 +0db3-0dbb +0dbd +0dc0-0dc6 +# Dependent vowel signs +0dcf-0dd4 +0dd6 +0dd8-0ddf +# Additional dependent vowel signs +0df2-0df4 Index: xc/lib/fontconfig/fc-lang/sk.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sk.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sk.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,63 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sk.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Slovak (SK) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00c1 +00c4 +00c9 +00cd +00d3 +00d4 +#00d6 # evertype.com +00da +#00dc # evertype.com +00dd +00e1 +00e4 +00e9 +00ed +00f3 +00f4 +#00f6 # evertype.com +00fa +#00fc # evertype.com +00fd +010c-010d +010e-010f +0139-013a +013d-013e +0147-0148 +#0150-0151 # evertype.com +0154-0155 +0160-0161 +0164-0165 +#0170-0171 # evertype.com +017d-017e +# Index: xc/lib/fontconfig/fc-lang/sl.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sl.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sl.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,88 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sl.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Slovenian (SL) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +# +# Included in eki.ee +# +#00C4 LATIN CAPITAL LETTER A WITH DIAERESIS +#00D6 LATIN CAPITAL LETTER O WITH DIAERESIS +#00DC LATIN CAPITAL LETTER U WITH DIAERESIS +#00E4 LATIN SMALL LETTER A WITH DIAERESIS +#00F6 LATIN SMALL LETTER O WITH DIAERESIS +#00FC LATIN SMALL LETTER U WITH DIAERESIS +0106 LATIN CAPITAL LETTER C WITH ACUTE +0107 LATIN SMALL LETTER C WITH ACUTE +010C LATIN CAPITAL LETTER C WITH CARON +010D LATIN SMALL LETTER C WITH CARON +0110 LATIN CAPITAL LETTER D WITH STROKE +0111 LATIN SMALL LETTER D WITH STROKE +0160 LATIN CAPITAL LETTER S WITH CARON +0161 LATIN SMALL LETTER S WITH CARON +017D LATIN CAPITAL LETTER Z WITH CARON +017E LATIN SMALL LETTER Z WITH CARON +# +# According to evertype.com: +# +# In slovenian, these letters are often used to transliterate +# Serbian and Macedonian letters +# +#01C5 LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON +#01C6 LATIN SMALL LETTER DZ WITH CARON +#01C8 LATIN CAPITAL LETTER L WITH SMALL LETTER J +#01C9 LATIN SMALL LETTER LJ +#01CB LATIN CAPITAL LETTER N WITH SMALL LETTER J +#01CC LATIN SMALL LETTER NJ +#01F2 LATIN CAPITAL LETTER D WITH SMALL LETTER Z +#01F3 LATIN SMALL LETTER DZ +#01F4 LATIN CAPITAL LETTER G WITH ACUTE +#01F5 LATIN SMALL LETTER G WITH ACUTE +#1E30 LATIN CAPITAL LETTER K WITH ACUTE +#1E31 LATIN SMALL LETTER K WITH ACUTE +# +# These are the transliteration target letters which are +# not used in Slovenian at all +# +#0402 CYRILLIC CAPITAL LETTER DJE (Serbocroatian) +#0403 CYRILLIC CAPITAL LETTER GJE +#0405 CYRILLIC CAPITAL LETTER DZE +#0409 CYRILLIC CAPITAL LETTER LJE +#040A CYRILLIC CAPITAL LETTER NJE +#040B CYRILLIC CAPITAL LETTER TSHE (Serbocroatian) +#040C CYRILLIC CAPITAL LETTER KJE +#040F CYRILLIC CAPITAL LETTER DZHE +#0452 CYRILLIC SMALL LETTER DJE (Serbocroatian) +#0453 CYRILLIC SMALL LETTER GJE +#0455 CYRILLIC SMALL LETTER DZE +#0459 CYRILLIC SMALL LETTER LJE +#045A CYRILLIC SMALL LETTER NJE +#045B CYRILLIC SMALL LETTER TSHE (Serbocroatian) +#045C CYRILLIC SMALL LETTER KJE +#045F CYRILLIC SMALL LETTER DZHE Index: xc/lib/fontconfig/fc-lang/sm.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sm.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sm.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,30 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sm.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Samoan (AF) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +02bb Index: xc/lib/fontconfig/fc-lang/sma.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sma.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sma.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,37 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sma.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# South Sámi (SMA) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c4 +00e4 +00c5 +00e5 +00d6 +00f6 +00cf +00ef Index: xc/lib/fontconfig/fc-lang/smj.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/smj.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/smj.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,37 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/smj.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Lule Sámi (SMJ) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c1 +00e1 +00c4 +00e4 +00c5 +00e5 +00d1 +00f1 Index: xc/lib/fontconfig/fc-lang/smn.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/smn.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/smn.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,40 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/smn.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Inari Sámi (SMN) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c1 +00e1 +00c2 +00e2 +00c4 +00e4 +010c-010d +0110-0111 +014a-014b +0160-0161 +017d-017e Index: xc/lib/fontconfig/fc-lang/sms.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sms.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sms.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,48 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sms.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Skolt Sámi (SMJ) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c2 +00e2 +00c4 +00e4 +00c5 +00e5 +010c-010d +0110-0111 +01b7 +0292 +01ee-01ef +01e6-01e7 +01e4-01e5 +01e8-01e9 +014a-014b +00d5 +00f5 +0160-0161 +017d-017e Index: xc/lib/fontconfig/fc-lang/so.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/so.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/so.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/so.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Somali (SO) +# +# Orthography taken from http://www.ideography.co.uk/library/pdf/charsets.pdf +# +0041-005a # Somali doesn't use p, v or z +0061-007a Index: xc/lib/fontconfig/fc-lang/sq.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sq.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sq.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,35 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sq.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Albanian (SQ) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00c7 +00cb +00e7 +00eb Index: xc/lib/fontconfig/fc-lang/sr.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sr.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sr.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,45 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sr.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Serbian (SR) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +# evertype.com marks a subset of the standard Cyrillic alphabet; I've +# simply included all of it here. +# +0402 +0408 +0409 +040a +040b +040f +0410-044f +0452 +0458 +0459 +045a +045b +045f Index: xc/lib/fontconfig/fc-lang/sv.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sv.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sv.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,100 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sv.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Swedish (SV) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +# evertype.com includes a large number of additional precomposed letters +# not marked by eki.ee; I've left those commented out here +# +0041-005a +0061-007a +#00bb +00c0 +00c1 +#00c2 +#00c3 +00c4 +00c5 +#00c6 +#00c7 +#00c8 +00c9 +#00ca +00cb +#00cc +#00cd +#00ce +#00cf +#00d0 +#00d1 +#00d2 +#00d3 +#00d4 +00d6 +#00d7 +#00d8 +#00d9 +#00da +#00db +00dc +#00dd +00e0 +00e1 +#00e2 +#00e3 +00e4 +00e5 +#00e6 +#00e7 +#00e8 +00e9 +#00ea +00eb +#00ec +#00ed +#00ee +#00ef +#00f0 +#00f1 +#00f2 +#00f3 +#00f4 +00f6 +#00f8 +#00f9 +#00fa +#00fb +00fc +#00fd +#0106-0107 # C, c with acute +#010c-010d # C, c with caron +#0141-0144 # L, l with stroke N, n with acute +#0158-015b # R, r with caron S, s with acute +#0160-0161 # S, s with caron +#2019 # single quote +#201d # double quote +#203a # angle quote Index: xc/lib/fontconfig/fc-lang/sw.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/sw.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/sw.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/sw.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Swahili (SW) +# +# Orthography taken from http://www.ideography.co.uk/library/pdf/charsets.pdf +# +0041-005a # Swahili doesn't use f, q or x and uses r only for loan words +0061-007a Index: xc/lib/fontconfig/fc-lang/syr.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/syr.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/syr.orth Wed Aug 7 13:34:15 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/syr.orth,v 1.1 2002/08/07 17:34:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Syriac (SYR) +# +# Coverage given by Emil Soleyman-Zomalan <emil@nishra.com> +# +0710-072c # Syriac letters +0730-073f # Syriac points (vowels) Index: xc/lib/fontconfig/fc-lang/ta.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ta.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ta.orth Sun Jul 7 15:18:51 2002 @@ -0,0 +1,43 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ta.orth,v 1.1 2002/07/07 19:18:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Tamil (TA) +# +# Taken from the Unicode coverage of this language +# +0b82-0b83 +0b85-0b8a +0b8e-0b90 +0b92-0b95 +0b99-0b9a +0b9c +0b9e-0b9f +0ba3-0ba4 +0ba8-0baa +0bae-0bb5 +0bb7-0bb9 +0bbe-0bc2 +0bc6-0bc8 +0bca-0bcd +0bd7 +0be7-0bf2 Index: xc/lib/fontconfig/fc-lang/te.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/te.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/te.orth Sun Jul 7 15:18:51 2002 @@ -0,0 +1,39 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/te.orth,v 1.1 2002/07/07 19:18:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Telugu (GE) +# +# Taken from the Unicode coverage of this language +# +0c01-0c03 +0c05-0c0c +0c0e-0c10 +0c12-0c28 +0c2a-0c33 +0c35-0c39 +0c3e-0c44 +0c46-0c48 +0c4a-0c4d +0c55-0c56 +0c60-0c61 +0c66-0c6f Index: xc/lib/fontconfig/fc-lang/tg.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/tg.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/tg.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,108 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/tg.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Tajik (TG) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +0492 +0493 +049a +049b +04b2 +04b3 +04b6 +04b7 +04e2 +04e3 +04ee +04ef Index: xc/lib/fontconfig/fc-lang/th.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/th.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/th.orth Sat Jul 6 19:59:19 2002 @@ -0,0 +1,26 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/th.orth,v 1.2 2002/07/06 23:59:19 keithp Exp $ +# +# Copyright © 2002 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. +# +# Thai (TH) +0e01-0e3a +0e3f-0e5b Index: xc/lib/fontconfig/fc-lang/ti.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ti.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ti.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,28 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ti.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Tigrigna (TI) +# +# The same as Ethiopic +# +include gez.orth Index: xc/lib/fontconfig/fc-lang/tk.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/tk.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/tk.orth Mon Oct 21 13:03:47 2002 @@ -0,0 +1,106 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/tk.orth,v 1.2 2002/10/21 17:03:47 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Turkmen (TK) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +#0472 # CYRILLIC CAPITAL LETTER FITA +#0473 # CYRILLIC SMALL LETTER FITA +0496 +0497 +04a2 +04a3 +04ae +04af +04d8 +04d9 Index: xc/lib/fontconfig/fc-lang/tl.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/tl.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/tl.orth Fri Jul 12 17:06:00 2002 @@ -0,0 +1,34 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/tl.orth,v 1.2 2002/07/12 21:06:00 keithp Exp $ +# +# Copyright © 2002 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. +# +# Tagalog (TL) +# +# Taken from the Unicode coverage of this language +# +# Independent vowels +1700-1702 +# Consonants +1703-170c +170e-1711 +# Dependent vowel signs +1712-1713 Index: xc/lib/fontconfig/fc-lang/tn.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/tn.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/tn.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,33 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/tn.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Tswana (TN) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00ca +00ea +00d4 +00f4 Index: xc/lib/fontconfig/fc-lang/to.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/to.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/to.orth Wed Aug 7 13:34:15 2002 @@ -0,0 +1,30 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/to.orth,v 1.2 2002/08/07 17:34:15 keithp Exp $ +# +# Copyright © 2002 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. +# +# Tonga (TO) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +02bb Index: xc/lib/fontconfig/fc-lang/tr.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/tr.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/tr.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,49 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/tr.orth,v 1.3 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Turkish (TR) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +0041-005a +0061-007a +00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX +00C7 LATIN CAPITAL LETTER C WITH CEDILLA +00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX +00D6 LATIN CAPITAL LETTER O WITH DIAERESIS +00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX +00DC LATIN CAPITAL LETTER U WITH DIAERESIS +00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX +00E7 LATIN SMALL LETTER C WITH CEDILLA +00EE LATIN SMALL LETTER I WITH CIRCUMFLEX +00F6 LATIN SMALL LETTER O WITH DIAERESIS +00FB LATIN SMALL LETTER U WITH CIRCUMFLEX +00FC LATIN SMALL LETTER U WITH DIAERESIS +011E LATIN CAPITAL LETTER G WITH BREVE +011F LATIN SMALL LETTER G WITH BREVE +0130 LATIN CAPITAL LETTER I WITH DOT ABOVE +0131 LATIN SMALL LETTER DOTLESS I +015E LATIN CAPITAL LETTER S WITH CEDILLA * +015F LATIN SMALL LETTER S WITH CEDILLA * Index: xc/lib/fontconfig/fc-lang/ts.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ts.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ts.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ts.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Tsonga (TS) +# +# Orthography taken from http://www.eki.ee/letter +# +0041-005a +0061-007a Index: xc/lib/fontconfig/fc-lang/tt.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/tt.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/tt.orth Mon Oct 21 13:03:47 2002 @@ -0,0 +1,108 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/tt.orth,v 1.2 2002/10/21 17:03:47 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Tatar (TT) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +#0472 # CYRILLIC CAPITAL LETTER FITA +#0473 # CYRILLIC SMALL LETTER FITA +0496 +0497 +04a2 +04a3 +04ae +04af +04ba +04bb +04d8 +04d9 Index: xc/lib/fontconfig/fc-lang/tw.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/tw.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/tw.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,50 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/tw.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Twi (tw) +# +# Orthography taken from http://www.ideography.co.uk/library/pdf/charsets.pdf +# +0041-005a +0061-007a +00C3 # LATIN CAPITAL LETTER A WITH TILDE +00E3 # LATIN SMALL LETTER A WITH TILDE +00D1 # LATIN CAPITAL LETTER N WITH TILDE +00D5 # LATIN CAPITAL LETTER O WITH TILDE +00F1 # LATIN SMALL LETTER N WITH TILDE +00F5 # LATIN SMALL LETTER O WITH TILDE +0128 # LATIN CAPITAL LETTER I WITH TILDE +0129 # LATIN SMALL LETTER I WITH TILDE +0168 # LATIN CAPITAL LETTER U WITH TILDE +0169 # LATIN SMALL LETTER U WITH TILDE +0186 # LATIN CAPITAL LETTER OPEN O +0254 # LATIN SMALL LETTER OPEN O +0190 # LATIN CAPITAL LETTER OPEN E +025B # LATIN SMALL LETTER OPEN E +0303 # COMBINING TILDE +0306 # COMBINING BREVE (Vrachy) +0329 # COMBINING VERTICAL LINE BELOW +1EBC # LATIN CAPITAL LETTER E WITH TILDE +1EBD # LATIN SMALL LETTER E WITH TILDE +1EF8 # LATIN CAPITAL LETTER Y WITH TILDE +1EF9 # LATIN SMALL LETTER Y WITH TILDE Index: xc/lib/fontconfig/fc-lang/tyv.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/tyv.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/tyv.orth Mon Oct 21 13:03:47 2002 @@ -0,0 +1,102 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/tyv.orth,v 1.2 2002/10/21 17:03:47 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Tuvinian (TYV) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +0429 +042a +042b +042c +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +0449 +044a +044b +044c +044d +044e +044f +0451 +#0472 # CYRILLIC CAPITAL LETTER FITA +#0473 # CYRILLIC SMALL LETTER FITA +04a2 +04a3 +04ae +04af Index: xc/lib/fontconfig/fc-lang/ug.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ug.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ug.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ug.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Uighur (UG) +# +# Uighur is written in a varient of Perso-Arabic, but I haven't found +# any references which define the variations. So, for now we'll use Arabic +# fonts +include ar.orth Index: xc/lib/fontconfig/fc-lang/uk.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/uk.orth:1.4 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/uk.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,43 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/uk.orth,v 1.4 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Ukrainian (UK) +# +# Sources: +# www.evertype.com +# www.eki.ee/letter +# +#00ab +#00bb +#0401 # evertype.com +0404 +0406 +0407 +0410-044f +#0451 # evertype.com +0454 +0456 +0457 +0490 +0491 +#2039-203a # angle quotes Index: xc/lib/fontconfig/fc-lang/ur.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ur.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ur.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ur.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Urdu (UR) +# +# Urdu is written in a varient of Perso-Arabic, but I haven't found +# any references which define the variations. So, for now we'll use Arabic +# fonts +include ar.orth Index: xc/lib/fontconfig/fc-lang/uz.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/uz.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/uz.orth Fri Jul 12 03:52:16 2002 @@ -0,0 +1,98 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/uz.orth,v 1.1 2002/07/12 07:52:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Coverage taken from TITUS (Thesaurus Indogermanischer Text und +# Sprachmaterialien) +# +# http://titus.uni-frankfurt.de/unicode/alphabet/nslatest.htm +# +# Uzbek (UZ) +# +0401 +0410 +0411 +0412 +0413 +0414 +0415 +0416 +0417 +0418 +0419 +041a +041b +041c +041d +041e +041f +0420 +0421 +0422 +0423 +0424 +0425 +0426 +0427 +0428 +042a +042d +042e +042f +0430 +0431 +0432 +0433 +0434 +0435 +0436 +0437 +0438 +0439 +043a +043b +043c +043d +043e +043f +0440 +0441 +0442 +0443 +0444 +0445 +0446 +0447 +0448 +044a +044d +044e +044f +0451 +0492 +0493 +049a +049b +04b2 +04b3 +04f0 +04f1 Index: xc/lib/fontconfig/fc-lang/ven.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/ven.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/ven.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,34 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/ven.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Venda (VEN) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +1e12-1e13 +1e3c-1e3d +1e44-1e45 +1e4a-1e4b +1e70-1e71 Index: xc/lib/fontconfig/fc-lang/vi.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/vi.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/vi.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,58 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/vi.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Vietnamese (VI) +# +# Information extracted from email sent by Markus Kuhn about the +# standard Vietnamese character set (TCVN 6909:2001) +# +0041-005a +0061-007a +00c0-00c3 +00c8-00ca +00cc-00cd +00d2-00d5 +00d9-00da +00dd +00e0-00e3 +00e8-00ea +00ec-00ed +00f2-00f5 +00f9-00fa +00fd +0102-0103 +0110-0111 +0128-0129 +0168-0169 +01a0-01a1 +01af-01b0 +# diacritical marks +0300-0303 +0306 +0309 +031b +0323 +# more precomposed latin +1ea0-1ef9 +# double quote marks +#201c-201d Index: xc/lib/fontconfig/fc-lang/vo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/vo.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/vo.orth Sat Jul 6 19:59:19 2002 @@ -0,0 +1,36 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/vo.orth,v 1.2 2002/07/06 23:59:19 keithp Exp $ +# +# Copyright © 2002 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. +# +# Volapük (VO) +0041-0050 +0052-0056 +0058-005a +0061-0070 +0072-0076 +0078-007a +00c4 +00d6 +00dc +00e4 +00f6 +00fc Index: xc/lib/fontconfig/fc-lang/vot.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/vot.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/vot.orth Thu Aug 29 21:28:17 2002 @@ -0,0 +1,40 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/vot.orth,v 1.2 2002/08/30 01:28:17 keithp Exp $ +# +# Copyright © 2002 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. +# +# Orthography from http://www.everytype.com/alphabets/votic.pdf +# +# Votic (VOT) +# +# Sources: +# www.evertype.com +# +0041-005a +0061-007a +00c4 +00d6 +00dc +00e4 +00f6 +00fc +0160-0161 +017d-017e Index: xc/lib/fontconfig/fc-lang/wa.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/wa.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/wa.orth Sun Jul 7 15:30:52 2002 @@ -0,0 +1,47 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/wa.orth,v 1.1 2002/07/07 19:30:52 keithp Exp $ +# +# Copyright © 2002 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. +# +# Walloon (WA) +# +# Data from private communication with Pablo Saratxaga <pablo@mandrakesoft.com> +# +0041-005a +0061-007a +00c2 # A circumflex +00c5 # A ring +00c7 # C cedilla +00c8 # E grave +00c9 # E acute +00ca # E circumflex +00ce # I circumflex +00d4 # O circumflex +00db # U circumflex +00e2 # a circumflex +00e5 # a ring +00e7 # c cedilla +00e8 # e grave +00e9 # e acute +00ea # e circumflex +00ee # i circumflex +00f4 # o circumflex +00fb # u circumflex Index: xc/lib/fontconfig/fc-lang/wen.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/wen.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/wen.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,42 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/wen.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Sorbian languages (lower and upper) (WEN) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +0106-0107 +010c-010d +011a-011b +0141-0142 +0143-0144 +00d3 +00f3 +0154-0155 +0158-0159 +015a-015b +0160-0161 +0179-017a +017d-017e Index: xc/lib/fontconfig/fc-lang/wo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/wo.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/wo.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,42 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/wo.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Wolof (WO) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c0 +00e0 +00c3 +00e3 +00c9 +00e9 +00cb +00eb +00d1 +00f1 +014a-014b +00d3 +00f3 Index: xc/lib/fontconfig/fc-lang/xh.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/xh.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/xh.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/xh.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Xhosa (XH) +# +# Orthography taken from http://www.ideography.co.uk/library/pdf/charsets.pdf +# +0041-005a +0061-007a Index: xc/lib/fontconfig/fc-lang/yap.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/yap.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/yap.orth Fri Jul 12 15:19:16 2002 @@ -0,0 +1,35 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/yap.orth,v 1.1 2002/07/12 19:19:16 keithp Exp $ +# +# Copyright © 2002 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. +# +# Yapese (YAP) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c4 +00e4 +00cb +00eb +00d6 +00f6 Index: xc/lib/fontconfig/fc-lang/yi.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/yi.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/yi.orth Sat Jul 6 19:59:19 2002 @@ -0,0 +1,25 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/yi.orth,v 1.2 2002/07/06 23:59:19 keithp Exp $ +# +# Copyright © 2002 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. +# +# Yiddish (YI) +include he.orth Index: xc/lib/fontconfig/fc-lang/yo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/yo.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/yo.orth Fri Jul 12 17:06:02 2002 @@ -0,0 +1,86 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/yo.orth,v 1.2 2002/07/12 21:06:02 keithp Exp $ +# +# Copyright © 2002 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. +# +# Yoruba (YO) +# +# Orthography from http://www.eki.ee/letter +# +0041-005a +0061-007a +00c0 +00c1 +00c2 +00c3 +00c8 +00c9 +00ca +00cc +00cd +00ce +00d2 +00d3 +00d4 +00d5 +00d9 +00da +00db +00e0 +00e1 +00e2 +00e3 +00e8 +00e9 +00ea +00ec +00ed +00ee +00f2 +00f3 +00f4 +00f5 +00f9 +00fa +00fb +011a-011b +0128-0129 +0143-0144 +0168-0169 +01cd-01ce +01cf-01d0 +01d1-01d2 +01d3-01d4 +01f8-01f9 # LATIN LETTER N WITH GRAVE +0300 +0301 +0302 +0303 +030c +1e3e-1e3f +1e62-1e63 +1eb8-1eb9 +1ebc-1ebd +1ecc-1ecd +# LATIN CAPTIAL LETTER M WITH MACRON (no UCS code) +# LATIN CAPTIAL LETTER N WITH MACRON (no UCS code) +# LATIN SMALL LETTER M WITH MACRON (no UCS code) +# LATIN SMALL LETTER N WITH MACRON (no UCS code) Index: xc/lib/fontconfig/fc-lang/zh_cn.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/zh_cn.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/zh_cn.orth Mon Aug 19 15:32:02 2002 @@ -0,0 +1,6792 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/zh_cn.orth,v 1.3 2002/08/19 19:32:02 keithp Exp $ +# +# Copyright © 2002 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. +# +# Chinese (simplified) (ZH-CN) +# +# Coverage computed from GB2312 +# +0x02C7 # CARON (Mandarin Chinese third tone) +0x02C9 # MODIFIER LETTER MACRON (Mandarin Chinese first tone) +0x4E00 # <CJK> +0x4E01 # <CJK> +0x4E03 # <CJK> +0x4E07 # <CJK> +0x4E08 # <CJK> +0x4E09 # <CJK> +0x4E0A # <CJK> +0x4E0B # <CJK> +0x4E0C # <CJK> +0x4E0D # <CJK> +0x4E0E # <CJK> +0x4E10 # <CJK> +0x4E11 # <CJK> +0x4E13 # <CJK> +0x4E14 # <CJK> +0x4E15 # <CJK> +0x4E16 # <CJK> +0x4E18 # <CJK> +0x4E19 # <CJK> +0x4E1A # <CJK> +0x4E1B # <CJK> +0x4E1C # <CJK> +0x4E1D # <CJK> +0x4E1E # <CJK> +0x4E22 # <CJK> +0x4E24 # <CJK> +0x4E25 # <CJK> +0x4E27 # <CJK> +0x4E28 # <CJK> +0x4E2A # <CJK> +0x4E2B # <CJK> +0x4E2C # <CJK> +0x4E2D # <CJK> +0x4E30 # <CJK> +0x4E32 # <CJK> +0x4E34 # <CJK> +0x4E36 # <CJK> +0x4E38 # <CJK> +0x4E39 # <CJK> +0x4E3A # <CJK> +0x4E3B # <CJK> +0x4E3D # <CJK> +0x4E3E # <CJK> +0x4E3F # <CJK> +0x4E43 # <CJK> +0x4E45 # <CJK> +0x4E47 # <CJK> +0x4E48 # <CJK> +0x4E49 # <CJK> +0x4E4B # <CJK> +0x4E4C # <CJK> +0x4E4D # <CJK> +0x4E4E # <CJK> +0x4E4F # <CJK> +0x4E50 # <CJK> +0x4E52 # <CJK> +0x4E53 # <CJK> +0x4E54 # <CJK> +0x4E56 # <CJK> +0x4E58 # <CJK> +0x4E59 # <CJK> +0x4E5C # <CJK> +0x4E5D # <CJK> +0x4E5E # <CJK> +0x4E5F # <CJK> +0x4E60 # <CJK> +0x4E61 # <CJK> +0x4E66 # <CJK> +0x4E69 # <CJK> +0x4E70 # <CJK> +0x4E71 # <CJK> +0x4E73 # <CJK> +0x4E7E # <CJK> +0x4E86 # <CJK> +0x4E88 # <CJK> +0x4E89 # <CJK> +0x4E8B # <CJK> +0x4E8C # <CJK> +0x4E8D # <CJK> +0x4E8E # <CJK> +0x4E8F # <CJK> +0x4E91 # <CJK> +0x4E92 # <CJK> +0x4E93 # <CJK> +0x4E94 # <CJK> +0x4E95 # <CJK> +0x4E98 # <CJK> +0x4E9A # <CJK> +0x4E9B # <CJK> +0x4E9F # <CJK> +0x4EA0 # <CJK> +0x4EA1 # <CJK> +0x4EA2 # <CJK> +0x4EA4 # <CJK> +0x4EA5 # <CJK> +0x4EA6 # <CJK> +0x4EA7 # <CJK> +0x4EA8 # <CJK> +0x4EA9 # <CJK> +0x4EAB # <CJK> +0x4EAC # <CJK> +0x4EAD # <CJK> +0x4EAE # <CJK> +0x4EB2 # <CJK> +0x4EB3 # <CJK> +0x4EB5 # <CJK> +0x4EBA # <CJK> +0x4EBB # <CJK> +0x4EBF # <CJK> +0x4EC0 # <CJK> +0x4EC1 # <CJK> +0x4EC2 # <CJK> +0x4EC3 # <CJK> +0x4EC4 # <CJK> +0x4EC5 # <CJK> +0x4EC6 # <CJK> +0x4EC7 # <CJK> +0x4EC9 # <CJK> +0x4ECA # <CJK> +0x4ECB # <CJK> +0x4ECD # <CJK> +0x4ECE # <CJK> +0x4ED1 # <CJK> +0x4ED3 # <CJK> +0x4ED4 # <CJK> +0x4ED5 # <CJK> +0x4ED6 # <CJK> +0x4ED7 # <CJK> +0x4ED8 # <CJK> +0x4ED9 # <CJK> +0x4EDD # <CJK> +0x4EDE # <CJK> +0x4EDF # <CJK> +0x4EE1 # <CJK> +0x4EE3 # <CJK> +0x4EE4 # <CJK> +0x4EE5 # <CJK> +0x4EE8 # <CJK> +0x4EEA # <CJK> +0x4EEB # <CJK> +0x4EEC # <CJK> +0x4EF0 # <CJK> +0x4EF2 # <CJK> +0x4EF3 # <CJK> +0x4EF5 # <CJK> +0x4EF6 # <CJK> +0x4EF7 # <CJK> +0x4EFB # <CJK> +0x4EFD # <CJK> +0x4EFF # <CJK> +0x4F01 # <CJK> +0x4F09 # <CJK> +0x4F0A # <CJK> +0x4F0D # <CJK> +0x4F0E # <CJK> +0x4F0F # <CJK> +0x4F10 # <CJK> +0x4F11 # <CJK> +0x4F17 # <CJK> +0x4F18 # <CJK> +0x4F19 # <CJK> +0x4F1A # <CJK> +0x4F1B # <CJK> +0x4F1E # <CJK> +0x4F1F # <CJK> +0x4F20 # <CJK> +0x4F22 # <CJK> +0x4F24 # <CJK> +0x4F25 # <CJK> +0x4F26 # <CJK> +0x4F27 # <CJK> +0x4F2A # <CJK> +0x4F2B # <CJK> +0x4F2F # <CJK> +0x4F30 # <CJK> +0x4F32 # <CJK> +0x4F34 # <CJK> +0x4F36 # <CJK> +0x4F38 # <CJK> +0x4F3A # <CJK> +0x4F3C # <CJK> +0x4F3D # <CJK> +0x4F43 # <CJK> +0x4F46 # <CJK> +0x4F4D # <CJK> +0x4F4E # <CJK> +0x4F4F # <CJK> +0x4F50 # <CJK> +0x4F51 # <CJK> +0x4F53 # <CJK> +0x4F55 # <CJK> +0x4F57 # <CJK> +0x4F58 # <CJK> +0x4F59 # <CJK> +0x4F5A # <CJK> +0x4F5B # <CJK> +0x4F5C # <CJK> +0x4F5D # <CJK> +0x4F5E # <CJK> +0x4F5F # <CJK> +0x4F60 # <CJK> +0x4F63 # <CJK> +0x4F64 # <CJK> +0x4F65 # <CJK> +0x4F67 # <CJK> +0x4F69 # <CJK> +0x4F6C # <CJK> +0x4F6F # <CJK> +0x4F70 # <CJK> +0x4F73 # <CJK> +0x4F74 # <CJK> +0x4F76 # <CJK> +0x4F7B # <CJK> +0x4F7C # <CJK> +0x4F7E # <CJK> +0x4F7F # <CJK> +0x4F83 # <CJK> +0x4F84 # <CJK> +0x4F88 # <CJK> +0x4F89 # <CJK> +0x4F8B # <CJK> +0x4F8D # <CJK> +0x4F8F # <CJK> +0x4F91 # <CJK> +0x4F94 # <CJK> +0x4F97 # <CJK> +0x4F9B # <CJK> +0x4F9D # <CJK> +0x4FA0 # <CJK> +0x4FA3 # <CJK> +0x4FA5 # <CJK> +0x4FA6 # <CJK> +0x4FA7 # <CJK> +0x4FA8 # <CJK> +0x4FA9 # <CJK> +0x4FAA # <CJK> +0x4FAC # <CJK> +0x4FAE # <CJK> +0x4FAF # <CJK> +0x4FB5 # <CJK> +0x4FBF # <CJK> +0x4FC3 # <CJK> +0x4FC4 # <CJK> +0x4FC5 # <CJK> +0x4FCA # <CJK> +0x4FCE # <CJK> +0x4FCF # <CJK> +0x4FD0 # <CJK> +0x4FD1 # <CJK> +0x4FD7 # <CJK> +0x4FD8 # <CJK> +0x4FDA # <CJK> +0x4FDC # <CJK> +0x4FDD # <CJK> +0x4FDE # <CJK> +0x4FDF # <CJK> +0x4FE1 # <CJK> +0x4FE3 # <CJK> +0x4FE6 # <CJK> +0x4FE8 # <CJK> +0x4FE9 # <CJK> +0x4FEA # <CJK> +0x4FED # <CJK> +0x4FEE # <CJK> +0x4FEF # <CJK> +0x4FF1 # <CJK> +0x4FF3 # <CJK> +0x4FF8 # <CJK> +0x4FFA # <CJK> +0x4FFE # <CJK> +0x500C # <CJK> +0x500D # <CJK> +0x500F # <CJK> +0x5012 # <CJK> +0x5014 # <CJK> +0x5018 # <CJK> +0x5019 # <CJK> +0x501A # <CJK> +0x501C # <CJK> +0x501F # <CJK> +0x5021 # <CJK> +0x5025 # <CJK> +0x5026 # <CJK> +0x5028 # <CJK> +0x5029 # <CJK> +0x502A # <CJK> +0x502C # <CJK> +0x502D # <CJK> +0x502E # <CJK> +0x503A # <CJK> +0x503C # <CJK> +0x503E # <CJK> +0x5043 # <CJK> +0x5047 # <CJK> +0x5048 # <CJK> +0x504C # <CJK> +0x504E # <CJK> +0x504F # <CJK> +0x5055 # <CJK> +0x505A # <CJK> +0x505C # <CJK> +0x5065 # <CJK> +0x506C # <CJK> +0x5076 # <CJK> +0x5077 # <CJK> +0x507B # <CJK> +0x507E # <CJK> +0x507F # <CJK> +0x5080 # <CJK> +0x5085 # <CJK> +0x5088 # <CJK> +0x508D # <CJK> +0x50A3 # <CJK> +0x50A5 # <CJK> +0x50A7 # <CJK> +0x50A8 # <CJK> +0x50A9 # <CJK> +0x50AC # <CJK> +0x50B2 # <CJK> +0x50BA # <CJK> +0x50BB # <CJK> +0x50CF # <CJK> +0x50D6 # <CJK> +0x50DA # <CJK> +0x50E6 # <CJK> +0x50E7 # <CJK> +0x50EC # <CJK> +0x50ED # <CJK> +0x50EE # <CJK> +0x50F3 # <CJK> +0x50F5 # <CJK> +0x50FB # <CJK> +0x5106 # <CJK> +0x5107 # <CJK> +0x510B # <CJK> +0x5112 # <CJK> +0x5121 # <CJK> +0x513F # <CJK> +0x5140 # <CJK> +0x5141 # <CJK> +0x5143 # <CJK> +0x5144 # <CJK> +0x5145 # <CJK> +0x5146 # <CJK> +0x5148 # <CJK> +0x5149 # <CJK> +0x514B # <CJK> +0x514D # <CJK> +0x5151 # <CJK> +0x5154 # <CJK> +0x5155 # <CJK> +0x5156 # <CJK> +0x515A # <CJK> +0x515C # <CJK> +0x5162 # <CJK> +0x5165 # <CJK> +0x5168 # <CJK> +0x516B # <CJK> +0x516C # <CJK> +0x516D # <CJK> +0x516E # <CJK> +0x5170 # <CJK> +0x5171 # <CJK> +0x5173 # <CJK> +0x5174 # <CJK> +0x5175 # <CJK> +0x5176 # <CJK> +0x5177 # <CJK> +0x5178 # <CJK> +0x5179 # <CJK> +0x517B # <CJK> +0x517C # <CJK> +0x517D # <CJK> +0x5180 # <CJK> +0x5181 # <CJK> +0x5182 # <CJK> +0x5185 # <CJK> +0x5188 # <CJK> +0x5189 # <CJK> +0x518C # <CJK> +0x518D # <CJK> +0x5192 # <CJK> +0x5195 # <CJK> +0x5196 # <CJK> +0x5197 # <CJK> +0x5199 # <CJK> +0x519B # <CJK> +0x519C # <CJK> +0x51A0 # <CJK> +0x51A2 # <CJK> +0x51A4 # <CJK> +0x51A5 # <CJK> +0x51AB # <CJK> +0x51AC # <CJK> +0x51AF # <CJK> +0x51B0 # <CJK> +0x51B1 # <CJK> +0x51B2 # <CJK> +0x51B3 # <CJK> +0x51B5 # <CJK> +0x51B6 # <CJK> +0x51B7 # <CJK> +0x51BB # <CJK> +0x51BC # <CJK> +0x51BD # <CJK> +0x51C0 # <CJK> +0x51C4 # <CJK> +0x51C6 # <CJK> +0x51C7 # <CJK> +0x51C9 # <CJK> +0x51CB # <CJK> +0x51CC # <CJK> +0x51CF # <CJK> +0x51D1 # <CJK> +0x51DB # <CJK> +0x51DD # <CJK> +0x51E0 # <CJK> +0x51E1 # <CJK> +0x51E4 # <CJK> +0x51EB # <CJK> +0x51ED # <CJK> +0x51EF # <CJK> +0x51F0 # <CJK> +0x51F3 # <CJK> +0x51F5 # <CJK> +0x51F6 # <CJK> +0x51F8 # <CJK> +0x51F9 # <CJK> +0x51FA # <CJK> +0x51FB # <CJK> +0x51FC # <CJK> +0x51FD # <CJK> +0x51FF # <CJK> +0x5200 # <CJK> +0x5201 # <CJK> +0x5202 # <CJK> +0x5203 # <CJK> +0x5206 # <CJK> +0x5207 # <CJK> +0x5208 # <CJK> +0x520A # <CJK> +0x520D # <CJK> +0x520E # <CJK> +0x5211 # <CJK> +0x5212 # <CJK> +0x5216 # <CJK> +0x5217 # <CJK> +0x5218 # <CJK> +0x5219 # <CJK> +0x521A # <CJK> +0x521B # <CJK> +0x521D # <CJK> +0x5220 # <CJK> +0x5224 # <CJK> +0x5228 # <CJK> +0x5229 # <CJK> +0x522B # <CJK> +0x522D # <CJK> +0x522E # <CJK> +0x5230 # <CJK> +0x5233 # <CJK> +0x5236 # <CJK> +0x5237 # <CJK> +0x5238 # <CJK> +0x5239 # <CJK> +0x523A # <CJK> +0x523B # <CJK> +0x523D # <CJK> +0x523F # <CJK> +0x5240 # <CJK> +0x5241 # <CJK> +0x5242 # <CJK> +0x5243 # <CJK> +0x524A # <CJK> +0x524C # <CJK> +0x524D # <CJK> +0x5250 # <CJK> +0x5251 # <CJK> +0x5254 # <CJK> +0x5256 # <CJK> +0x525C # <CJK> +0x525E # <CJK> +0x5261 # <CJK> +0x5265 # <CJK> +0x5267 # <CJK> +0x5269 # <CJK> +0x526A # <CJK> +0x526F # <CJK> +0x5272 # <CJK> +0x527D # <CJK> +0x527F # <CJK> +0x5281 # <CJK> +0x5282 # <CJK> +0x5288 # <CJK> +0x5290 # <CJK> +0x5293 # <CJK> +0x529B # <CJK> +0x529D # <CJK> +0x529E # <CJK> +0x529F # <CJK> +0x52A0 # <CJK> +0x52A1 # <CJK> +0x52A2 # <CJK> +0x52A3 # <CJK> +0x52A8 # <CJK> +0x52A9 # <CJK> +0x52AA # <CJK> +0x52AB # <CJK> +0x52AC # <CJK> +0x52AD # <CJK> +0x52B1 # <CJK> +0x52B2 # <CJK> +0x52B3 # <CJK> +0x52BE # <CJK> +0x52BF # <CJK> +0x52C3 # <CJK> +0x52C7 # <CJK> +0x52C9 # <CJK> +0x52CB # <CJK> +0x52D0 # <CJK> +0x52D2 # <CJK> +0x52D6 # <CJK> +0x52D8 # <CJK> +0x52DF # <CJK> +0x52E4 # <CJK> +0x52F0 # <CJK> +0x52F9 # <CJK> +0x52FA # <CJK> +0x52FE # <CJK> +0x52FF # <CJK> +0x5300 # <CJK> +0x5305 # <CJK> +0x5306 # <CJK> +0x5308 # <CJK> +0x530D # <CJK> +0x530F # <CJK> +0x5310 # <CJK> +0x5315 # <CJK> +0x5316 # <CJK> +0x5317 # <CJK> +0x5319 # <CJK> +0x531A # <CJK> +0x531D # <CJK> +0x5320 # <CJK> +0x5321 # <CJK> +0x5323 # <CJK> +0x5326 # <CJK> +0x532A # <CJK> +0x532E # <CJK> +0x5339 # <CJK> +0x533A # <CJK> +0x533B # <CJK> +0x533E # <CJK> +0x533F # <CJK> +0x5341 # <CJK> +0x5343 # <CJK> +0x5345 # <CJK> +0x5347 # <CJK> +0x5348 # <CJK> +0x5349 # <CJK> +0x534A # <CJK> +0x534E # <CJK> +0x534F # <CJK> +0x5351 # <CJK> +0x5352 # <CJK> +0x5353 # <CJK> +0x5355 # <CJK> +0x5356 # <CJK> +0x5357 # <CJK> +0x535A # <CJK> +0x535C # <CJK> +0x535E # <CJK> +0x535F # <CJK> +0x5360 # <CJK> +0x5361 # <CJK> +0x5362 # <CJK> +0x5363 # <CJK> +0x5364 # <CJK> +0x5366 # <CJK> +0x5367 # <CJK> +0x5369 # <CJK> +0x536B # <CJK> +0x536E # <CJK> +0x536F # <CJK> +0x5370 # <CJK> +0x5371 # <CJK> +0x5373 # <CJK> +0x5374 # <CJK> +0x5375 # <CJK> +0x5377 # <CJK> +0x5378 # <CJK> +0x537A # <CJK> +0x537F # <CJK> +0x5382 # <CJK> +0x5384 # <CJK> +0x5385 # <CJK> +0x5386 # <CJK> +0x5389 # <CJK> +0x538B # <CJK> +0x538C # <CJK> +0x538D # <CJK> +0x5395 # <CJK> +0x5398 # <CJK> +0x539A # <CJK> +0x539D # <CJK> +0x539F # <CJK> +0x53A2 # <CJK> +0x53A3 # <CJK> +0x53A5 # <CJK> +0x53A6 # <CJK> +0x53A8 # <CJK> +0x53A9 # <CJK> +0x53AE # <CJK> +0x53B6 # <CJK> +0x53BB # <CJK> +0x53BF # <CJK> +0x53C1 # <CJK> +0x53C2 # <CJK> +0x53C8 # <CJK> +0x53C9 # <CJK> +0x53CA # <CJK> +0x53CB # <CJK> +0x53CC # <CJK> +0x53CD # <CJK> +0x53D1 # <CJK> +0x53D4 # <CJK> +0x53D6 # <CJK> +0x53D7 # <CJK> +0x53D8 # <CJK> +0x53D9 # <CJK> +0x53DB # <CJK> +0x53DF # <CJK> +0x53E0 # <CJK> +0x53E3 # <CJK> +0x53E4 # <CJK> +0x53E5 # <CJK> +0x53E6 # <CJK> +0x53E8 # <CJK> +0x53E9 # <CJK> +0x53EA # <CJK> +0x53EB # <CJK> +0x53EC # <CJK> +0x53ED # <CJK> +0x53EE # <CJK> +0x53EF # <CJK> +0x53F0 # <CJK> +0x53F1 # <CJK> +0x53F2 # <CJK> +0x53F3 # <CJK> +0x53F5 # <CJK> +0x53F6 # <CJK> +0x53F7 # <CJK> +0x53F8 # <CJK> +0x53F9 # <CJK> +0x53FB # <CJK> +0x53FC # <CJK> +0x53FD # <CJK> +0x5401 # <CJK> +0x5403 # <CJK> +0x5404 # <CJK> +0x5406 # <CJK> +0x5408 # <CJK> +0x5409 # <CJK> +0x540A # <CJK> +0x540C # <CJK> +0x540D # <CJK> +0x540E # <CJK> +0x540F # <CJK> +0x5410 # <CJK> +0x5411 # <CJK> +0x5412 # <CJK> +0x5413 # <CJK> +0x5415 # <CJK> +0x5416 # <CJK> +0x5417 # <CJK> +0x541B # <CJK> +0x541D # <CJK> +0x541E # <CJK> +0x541F # <CJK> +0x5420 # <CJK> +0x5421 # <CJK> +0x5423 # <CJK> +0x5426 # <CJK> +0x5427 # <CJK> +0x5428 # <CJK> +0x5429 # <CJK> +0x542B # <CJK> +0x542C # <CJK> +0x542D # <CJK> +0x542E # <CJK> +0x542F # <CJK> +0x5431 # <CJK> +0x5432 # <CJK> +0x5434 # <CJK> +0x5435 # <CJK> +0x5438 # <CJK> +0x5439 # <CJK> +0x543B # <CJK> +0x543C # <CJK> +0x543E # <CJK> +0x5440 # <CJK> +0x5443 # <CJK> +0x5446 # <CJK> +0x5448 # <CJK> +0x544A # <CJK> +0x544B # <CJK> +0x5450 # <CJK> +0x5452 # <CJK> +0x5453 # <CJK> +0x5454 # <CJK> +0x5455 # <CJK> +0x5456 # <CJK> +0x5457 # <CJK> +0x5458 # <CJK> +0x5459 # <CJK> +0x545B # <CJK> +0x545C # <CJK> +0x5462 # <CJK> +0x5464 # <CJK> +0x5466 # <CJK> +0x5468 # <CJK> +0x5471 # <CJK> +0x5472 # <CJK> +0x5473 # <CJK> +0x5475 # <CJK> +0x5476 # <CJK> +0x5477 # <CJK> +0x5478 # <CJK> +0x547B # <CJK> +0x547C # <CJK> +0x547D # <CJK> +0x5480 # <CJK> +0x5482 # <CJK> +0x5484 # <CJK> +0x5486 # <CJK> +0x548B # <CJK> +0x548C # <CJK> +0x548E # <CJK> +0x548F # <CJK> +0x5490 # <CJK> +0x5492 # <CJK> +0x5494 # <CJK> +0x5495 # <CJK> +0x5496 # <CJK> +0x5499 # <CJK> +0x549A # <CJK> +0x549B # <CJK> +0x549D # <CJK> +0x54A3 # <CJK> +0x54A4 # <CJK> +0x54A6 # <CJK> +0x54A7 # <CJK> +0x54A8 # <CJK> +0x54A9 # <CJK> +0x54AA # <CJK> +0x54AB # <CJK> +0x54AC # <CJK> +0x54AD # <CJK> +0x54AF # <CJK> +0x54B1 # <CJK> +0x54B3 # <CJK> +0x54B4 # <CJK> +0x54B8 # <CJK> +0x54BB # <CJK> +0x54BD # <CJK> +0x54BF # <CJK> +0x54C0 # <CJK> +0x54C1 # <CJK> +0x54C2 # <CJK> +0x54C4 # <CJK> +0x54C6 # <CJK> +0x54C7 # <CJK> +0x54C8 # <CJK> +0x54C9 # <CJK> +0x54CC # <CJK> +0x54CD # <CJK> +0x54CE # <CJK> +0x54CF # <CJK> +0x54D0 # <CJK> +0x54D1 # <CJK> +0x54D2 # <CJK> +0x54D3 # <CJK> +0x54D4 # <CJK> +0x54D5 # <CJK> +0x54D7 # <CJK> +0x54D9 # <CJK> +0x54DA # <CJK> +0x54DC # <CJK> +0x54DD # <CJK> +0x54DE # <CJK> +0x54DF # <CJK> +0x54E5 # <CJK> +0x54E6 # <CJK> +0x54E7 # <CJK> +0x54E8 # <CJK> +0x54E9 # <CJK> +0x54EA # <CJK> +0x54ED # <CJK> +0x54EE # <CJK> +0x54F2 # <CJK> +0x54F3 # <CJK> +0x54FA # <CJK> +0x54FC # <CJK> +0x54FD # <CJK> +0x54FF # <CJK> +0x5501 # <CJK> +0x5506 # <CJK> +0x5507 # <CJK> +0x5509 # <CJK> +0x550F # <CJK> +0x5510 # <CJK> +0x5511 # <CJK> +0x5514 # <CJK> +0x551B # <CJK> +0x5520 # <CJK> +0x5522 # <CJK> +0x5523 # <CJK> +0x5524 # <CJK> +0x5527 # <CJK> +0x552A # <CJK> +0x552C # <CJK> +0x552E # <CJK> +0x552F # <CJK> +0x5530 # <CJK> +0x5531 # <CJK> +0x5533 # <CJK> +0x5537 # <CJK> +0x553C # <CJK> +0x553E # <CJK> +0x553F # <CJK> +0x5541 # <CJK> +0x5543 # <CJK> +0x5544 # <CJK> +0x5546 # <CJK> +0x5549 # <CJK> +0x554A # <CJK> +0x5550 # <CJK> +0x5555 # <CJK> +0x5556 # <CJK> +0x555C # <CJK> +0x5561 # <CJK> +0x5564 # <CJK> +0x5565 # <CJK> +0x5566 # <CJK> +0x5567 # <CJK> +0x556A # <CJK> +0x556C # <CJK> +0x556D # <CJK> +0x556E # <CJK> +0x5575 # <CJK> +0x5576 # <CJK> +0x5577 # <CJK> +0x5578 # <CJK> +0x557B # <CJK> +0x557C # <CJK> +0x557E # <CJK> +0x5580 # <CJK> +0x5581 # <CJK> +0x5582 # <CJK> +0x5583 # <CJK> +0x5584 # <CJK> +0x5587 # <CJK> +0x5588 # <CJK> +0x5589 # <CJK> +0x558A # <CJK> +0x558B # <CJK> +0x558F # <CJK> +0x5591 # <CJK> +0x5594 # <CJK> +0x5598 # <CJK> +0x5599 # <CJK> +0x559C # <CJK> +0x559D # <CJK> +0x559F # <CJK> +0x55A7 # <CJK> +0x55B1 # <CJK> +0x55B3 # <CJK> +0x55B5 # <CJK> +0x55B7 # <CJK> +0x55B9 # <CJK> +0x55BB # <CJK> +0x55BD # <CJK> +0x55BE # <CJK> +0x55C4 # <CJK> +0x55C5 # <CJK> +0x55C9 # <CJK> +0x55CC # <CJK> +0x55CD # <CJK> +0x55D1 # <CJK> +0x55D2 # <CJK> +0x55D3 # <CJK> +0x55D4 # <CJK> +0x55D6 # <CJK> +0x55DC # <CJK> +0x55DD # <CJK> +0x55DF # <CJK> +0x55E1 # <CJK> +0x55E3 # <CJK> +0x55E4 # <CJK> +0x55E5 # <CJK> +0x55E6 # <CJK> +0x55E8 # <CJK> +0x55EA # <CJK> +0x55EB # <CJK> +0x55EC # <CJK> +0x55EF # <CJK> +0x55F2 # <CJK> +0x55F3 # <CJK> +0x55F5 # <CJK> +0x55F7 # <CJK> +0x55FD # <CJK> +0x55FE # <CJK> +0x5600 # <CJK> +0x5601 # <CJK> +0x5608 # <CJK> +0x5609 # <CJK> +0x560C # <CJK> +0x560E # <CJK> +0x560F # <CJK> +0x5618 # <CJK> +0x561B # <CJK> +0x561E # <CJK> +0x561F # <CJK> +0x5623 # <CJK> +0x5624 # <CJK> +0x5627 # <CJK> +0x562C # <CJK> +0x562D # <CJK> +0x5631 # <CJK> +0x5632 # <CJK> +0x5634 # <CJK> +0x5636 # <CJK> +0x5639 # <CJK> +0x563B # <CJK> +0x563F # <CJK> +0x564C # <CJK> +0x564D # <CJK> +0x564E # <CJK> +0x5654 # <CJK> +0x5657 # <CJK> +0x5658 # <CJK> +0x5659 # <CJK> +0x565C # <CJK> +0x5662 # <CJK> +0x5664 # <CJK> +0x5668 # <CJK> +0x5669 # <CJK> +0x566A # <CJK> +0x566B # <CJK> +0x566C # <CJK> +0x5671 # <CJK> +0x5676 # <CJK> +0x567B # <CJK> +0x567C # <CJK> +0x5685 # <CJK> +0x5686 # <CJK> +0x568E # <CJK> +0x568F # <CJK> +0x5693 # <CJK> +0x56A3 # <CJK> +0x56AF # <CJK> +0x56B7 # <CJK> +0x56BC # <CJK> +0x56CA # <CJK> +0x56D4 # <CJK> +0x56D7 # <CJK> +0x56DA # <CJK> +0x56DB # <CJK> +0x56DD # <CJK> +0x56DE # <CJK> +0x56DF # <CJK> +0x56E0 # <CJK> +0x56E1 # <CJK> +0x56E2 # <CJK> +0x56E4 # <CJK> +0x56EB # <CJK> +0x56ED # <CJK> +0x56F0 # <CJK> +0x56F1 # <CJK> +0x56F4 # <CJK> +0x56F5 # <CJK> +0x56F9 # <CJK> +0x56FA # <CJK> +0x56FD # <CJK> +0x56FE # <CJK> +0x56FF # <CJK> +0x5703 # <CJK> +0x5704 # <CJK> +0x5706 # <CJK> +0x5708 # <CJK> +0x5709 # <CJK> +0x570A # <CJK> +0x571C # <CJK> +0x571F # <CJK> +0x5723 # <CJK> +0x5728 # <CJK> +0x5729 # <CJK> +0x572A # <CJK> +0x572C # <CJK> +0x572D # <CJK> +0x572E # <CJK> +0x572F # <CJK> +0x5730 # <CJK> +0x5733 # <CJK> +0x5739 # <CJK> +0x573A # <CJK> +0x573B # <CJK> +0x573E # <CJK> +0x5740 # <CJK> +0x5742 # <CJK> +0x5747 # <CJK> +0x574A # <CJK> +0x574C # <CJK> +0x574D # <CJK> +0x574E # <CJK> +0x574F # <CJK> +0x5750 # <CJK> +0x5751 # <CJK> +0x5757 # <CJK> +0x575A # <CJK> +0x575B # <CJK> +0x575C # <CJK> +0x575D # <CJK> +0x575E # <CJK> +0x575F # <CJK> +0x5760 # <CJK> +0x5761 # <CJK> +0x5764 # <CJK> +0x5766 # <CJK> +0x5768 # <CJK> +0x5769 # <CJK> +0x576A # <CJK> +0x576B # <CJK> +0x576D # <CJK> +0x576F # <CJK> +0x5773 # <CJK> +0x5776 # <CJK> +0x5777 # <CJK> +0x577B # <CJK> +0x577C # <CJK> +0x5782 # <CJK> +0x5783 # <CJK> +0x5784 # <CJK> +0x5785 # <CJK> +0x5786 # <CJK> +0x578B # <CJK> +0x578C # <CJK> +0x5792 # <CJK> +0x5793 # <CJK> +0x579B # <CJK> +0x57A0 # <CJK> +0x57A1 # <CJK> +0x57A2 # <CJK> +0x57A3 # <CJK> +0x57A4 # <CJK> +0x57A6 # <CJK> +0x57A7 # <CJK> +0x57A9 # <CJK> +0x57AB # <CJK> +0x57AD # <CJK> +0x57AE # <CJK> +0x57B2 # <CJK> +0x57B4 # <CJK> +0x57B8 # <CJK> +0x57C2 # <CJK> +0x57C3 # <CJK> +0x57CB # <CJK> +0x57CE # <CJK> +0x57CF # <CJK> +0x57D2 # <CJK> +0x57D4 # <CJK> +0x57D5 # <CJK> +0x57D8 # <CJK> +0x57D9 # <CJK> +0x57DA # <CJK> +0x57DD # <CJK> +0x57DF # <CJK> +0x57E0 # <CJK> +0x57E4 # <CJK> +0x57ED # <CJK> +0x57EF # <CJK> +0x57F4 # <CJK> +0x57F8 # <CJK> +0x57F9 # <CJK> +0x57FA # <CJK> +0x57FD # <CJK> +0x5800 # <CJK> +0x5802 # <CJK> +0x5806 # <CJK> +0x5807 # <CJK> +0x580B # <CJK> +0x580D # <CJK> +0x5811 # <CJK> +0x5815 # <CJK> +0x5819 # <CJK> +0x581E # <CJK> +0x5820 # <CJK> +0x5821 # <CJK> +0x5824 # <CJK> +0x582A # <CJK> +0x5830 # <CJK> +0x5835 # <CJK> +0x5844 # <CJK> +0x584C # <CJK> +0x584D # <CJK> +0x5851 # <CJK> +0x5854 # <CJK> +0x5858 # <CJK> +0x585E # <CJK> +0x5865 # <CJK> +0x586B # <CJK> +0x586C # <CJK> +0x587E # <CJK> +0x5880 # <CJK> +0x5881 # <CJK> +0x5883 # <CJK> +0x5885 # <CJK> +0x5889 # <CJK> +0x5892 # <CJK> +0x5893 # <CJK> +0x5899 # <CJK> +0x589A # <CJK> +0x589E # <CJK> +0x589F # <CJK> +0x58A8 # <CJK> +0x58A9 # <CJK> +0x58BC # <CJK> +0x58C1 # <CJK> +0x58C5 # <CJK> +0x58D1 # <CJK> +0x58D5 # <CJK> +0x58E4 # <CJK> +0x58EB # <CJK> +0x58EC # <CJK> +0x58EE # <CJK> +0x58F0 # <CJK> +0x58F3 # <CJK> +0x58F6 # <CJK> +0x58F9 # <CJK> +0x5902 # <CJK> +0x5904 # <CJK> +0x5907 # <CJK> +0x590D # <CJK> +0x590F # <CJK> +0x5914 # <CJK> +0x5915 # <CJK> +0x5916 # <CJK> +0x5919 # <CJK> +0x591A # <CJK> +0x591C # <CJK> +0x591F # <CJK> +0x5924 # <CJK> +0x5925 # <CJK> +0x5927 # <CJK> +0x5929 # <CJK> +0x592A # <CJK> +0x592B # <CJK> +0x592D # <CJK> +0x592E # <CJK> +0x592F # <CJK> +0x5931 # <CJK> +0x5934 # <CJK> +0x5937 # <CJK> +0x5938 # <CJK> +0x5939 # <CJK> +0x593A # <CJK> +0x593C # <CJK> +0x5941 # <CJK> +0x5942 # <CJK> +0x5944 # <CJK> +0x5947 # <CJK> +0x5948 # <CJK> +0x5949 # <CJK> +0x594B # <CJK> +0x594E # <CJK> +0x594F # <CJK> +0x5951 # <CJK> +0x5954 # <CJK> +0x5955 # <CJK> +0x5956 # <CJK> +0x5957 # <CJK> +0x5958 # <CJK> +0x595A # <CJK> +0x5960 # <CJK> +0x5962 # <CJK> +0x5965 # <CJK> +0x5973 # <CJK> +0x5974 # <CJK> +0x5976 # <CJK> +0x5978 # <CJK> +0x5979 # <CJK> +0x597D # <CJK> +0x5981 # <CJK> +0x5982 # <CJK> +0x5983 # <CJK> +0x5984 # <CJK> +0x5986 # <CJK> +0x5987 # <CJK> +0x5988 # <CJK> +0x598A # <CJK> +0x598D # <CJK> +0x5992 # <CJK> +0x5993 # <CJK> +0x5996 # <CJK> +0x5997 # <CJK> +0x5999 # <CJK> +0x599E # <CJK> +0x59A3 # <CJK> +0x59A4 # <CJK> +0x59A5 # <CJK> +0x59A8 # <CJK> +0x59A9 # <CJK> +0x59AA # <CJK> +0x59AB # <CJK> +0x59AE # <CJK> +0x59AF # <CJK> +0x59B2 # <CJK> +0x59B9 # <CJK> +0x59BB # <CJK> +0x59BE # <CJK> +0x59C6 # <CJK> +0x59CA # <CJK> +0x59CB # <CJK> +0x59D0 # <CJK> +0x59D1 # <CJK> +0x59D2 # <CJK> +0x59D3 # <CJK> +0x59D4 # <CJK> +0x59D7 # <CJK> +0x59D8 # <CJK> +0x59DA # <CJK> +0x59DC # <CJK> +0x59DD # <CJK> +0x59E3 # <CJK> +0x59E5 # <CJK> +0x59E8 # <CJK> +0x59EC # <CJK> +0x59F9 # <CJK> +0x59FB # <CJK> +0x59FF # <CJK> +0x5A01 # <CJK> +0x5A03 # <CJK> +0x5A04 # <CJK> +0x5A05 # <CJK> +0x5A06 # <CJK> +0x5A07 # <CJK> +0x5A08 # <CJK> +0x5A09 # <CJK> +0x5A0C # <CJK> +0x5A11 # <CJK> +0x5A13 # <CJK> +0x5A18 # <CJK> +0x5A1C # <CJK> +0x5A1F # <CJK> +0x5A20 # <CJK> +0x5A23 # <CJK> +0x5A25 # <CJK> +0x5A29 # <CJK> +0x5A31 # <CJK> +0x5A32 # <CJK> +0x5A34 # <CJK> +0x5A36 # <CJK> +0x5A3C # <CJK> +0x5A40 # <CJK> +0x5A46 # <CJK> +0x5A49 # <CJK> +0x5A4A # <CJK> +0x5A55 # <CJK> +0x5A5A # <CJK> +0x5A62 # <CJK> +0x5A67 # <CJK> +0x5A6A # <CJK> +0x5A74 # <CJK> +0x5A75 # <CJK> +0x5A76 # <CJK> +0x5A77 # <CJK> +0x5A7A # <CJK> +0x5A7F # <CJK> +0x5A92 # <CJK> +0x5A9A # <CJK> +0x5A9B # <CJK> +0x5AAA # <CJK> +0x5AB2 # <CJK> +0x5AB3 # <CJK> +0x5AB5 # <CJK> +0x5AB8 # <CJK> +0x5ABE # <CJK> +0x5AC1 # <CJK> +0x5AC2 # <CJK> +0x5AC9 # <CJK> +0x5ACC # <CJK> +0x5AD2 # <CJK> +0x5AD4 # <CJK> +0x5AD6 # <CJK> +0x5AD8 # <CJK> +0x5ADC # <CJK> +0x5AE0 # <CJK> +0x5AE1 # <CJK> +0x5AE3 # <CJK> +0x5AE6 # <CJK> +0x5AE9 # <CJK> +0x5AEB # <CJK> +0x5AF1 # <CJK> +0x5B09 # <CJK> +0x5B16 # <CJK> +0x5B17 # <CJK> +0x5B32 # <CJK> +0x5B34 # <CJK> +0x5B37 # <CJK> +0x5B40 # <CJK> +0x5B50 # <CJK> +0x5B51 # <CJK> +0x5B53 # <CJK> +0x5B54 # <CJK> +0x5B55 # <CJK> +0x5B57 # <CJK> +0x5B58 # <CJK> +0x5B59 # <CJK> +0x5B5A # <CJK> +0x5B5B # <CJK> +0x5B5C # <CJK> +0x5B5D # <CJK> +0x5B5F # <CJK> +0x5B62 # <CJK> +0x5B63 # <CJK> +0x5B64 # <CJK> +0x5B65 # <CJK> +0x5B66 # <CJK> +0x5B69 # <CJK> +0x5B6A # <CJK> +0x5B6C # <CJK> +0x5B70 # <CJK> +0x5B71 # <CJK> +0x5B73 # <CJK> +0x5B75 # <CJK> +0x5B7A # <CJK> +0x5B7D # <CJK> +0x5B80 # <CJK> +0x5B81 # <CJK> +0x5B83 # <CJK> +0x5B84 # <CJK> +0x5B85 # <CJK> +0x5B87 # <CJK> +0x5B88 # <CJK> +0x5B89 # <CJK> +0x5B8B # <CJK> +0x5B8C # <CJK> +0x5B8F # <CJK> +0x5B93 # <CJK> +0x5B95 # <CJK> +0x5B97 # <CJK> +0x5B98 # <CJK> +0x5B99 # <CJK> +0x5B9A # <CJK> +0x5B9B # <CJK> +0x5B9C # <CJK> +0x5B9D # <CJK> +0x5B9E # <CJK> +0x5BA0 # <CJK> +0x5BA1 # <CJK> +0x5BA2 # <CJK> +0x5BA3 # <CJK> +0x5BA4 # <CJK> +0x5BA5 # <CJK> +0x5BA6 # <CJK> +0x5BAA # <CJK> +0x5BAB # <CJK> +0x5BB0 # <CJK> +0x5BB3 # <CJK> +0x5BB4 # <CJK> +0x5BB5 # <CJK> +0x5BB6 # <CJK> +0x5BB8 # <CJK> +0x5BB9 # <CJK> +0x5BBD # <CJK> +0x5BBE # <CJK> +0x5BBF # <CJK> +0x5BC2 # <CJK> +0x5BC4 # <CJK> +0x5BC5 # <CJK> +0x5BC6 # <CJK> +0x5BC7 # <CJK> +0x5BCC # <CJK> +0x5BD0 # <CJK> +0x5BD2 # <CJK> +0x5BD3 # <CJK> +0x5BDD # <CJK> +0x5BDE # <CJK> +0x5BDF # <CJK> +0x5BE1 # <CJK> +0x5BE4 # <CJK> +0x5BE5 # <CJK> +0x5BE8 # <CJK> +0x5BEE # <CJK> +0x5BF0 # <CJK> +0x5BF8 # <CJK> +0x5BF9 # <CJK> +0x5BFA # <CJK> +0x5BFB # <CJK> +0x5BFC # <CJK> +0x5BFF # <CJK> +0x5C01 # <CJK> +0x5C04 # <CJK> +0x5C06 # <CJK> +0x5C09 # <CJK> +0x5C0A # <CJK> +0x5C0F # <CJK> +0x5C11 # <CJK> +0x5C14 # <CJK> +0x5C15 # <CJK> +0x5C16 # <CJK> +0x5C18 # <CJK> +0x5C1A # <CJK> +0x5C1C # <CJK> +0x5C1D # <CJK> +0x5C22 # <CJK> +0x5C24 # <CJK> +0x5C25 # <CJK> +0x5C27 # <CJK> +0x5C2C # <CJK> +0x5C31 # <CJK> +0x5C34 # <CJK> +0x5C38 # <CJK> +0x5C39 # <CJK> +0x5C3A # <CJK> +0x5C3B # <CJK> +0x5C3C # <CJK> +0x5C3D # <CJK> +0x5C3E # <CJK> +0x5C3F # <CJK> +0x5C40 # <CJK> +0x5C41 # <CJK> +0x5C42 # <CJK> +0x5C45 # <CJK> +0x5C48 # <CJK> +0x5C49 # <CJK> +0x5C4A # <CJK> +0x5C4B # <CJK> +0x5C4E # <CJK> +0x5C4F # <CJK> +0x5C50 # <CJK> +0x5C51 # <CJK> +0x5C55 # <CJK> +0x5C59 # <CJK> +0x5C5E # <CJK> +0x5C60 # <CJK> +0x5C61 # <CJK> +0x5C63 # <CJK> +0x5C65 # <CJK> +0x5C66 # <CJK> +0x5C6E # <CJK> +0x5C6F # <CJK> +0x5C71 # <CJK> +0x5C79 # <CJK> +0x5C7A # <CJK> +0x5C7F # <CJK> +0x5C81 # <CJK> +0x5C82 # <CJK> +0x5C88 # <CJK> +0x5C8C # <CJK> +0x5C8D # <CJK> +0x5C90 # <CJK> +0x5C91 # <CJK> +0x5C94 # <CJK> +0x5C96 # <CJK> +0x5C97 # <CJK> +0x5C98 # <CJK> +0x5C99 # <CJK> +0x5C9A # <CJK> +0x5C9B # <CJK> +0x5C9C # <CJK> +0x5CA2 # <CJK> +0x5CA3 # <CJK> +0x5CA9 # <CJK> +0x5CAB # <CJK> +0x5CAC # <CJK> +0x5CAD # <CJK> +0x5CB1 # <CJK> +0x5CB3 # <CJK> +0x5CB5 # <CJK> +0x5CB7 # <CJK> +0x5CB8 # <CJK> +0x5CBD # <CJK> +0x5CBF # <CJK> +0x5CC1 # <CJK> +0x5CC4 # <CJK> +0x5CCB # <CJK> +0x5CD2 # <CJK> +0x5CD9 # <CJK> +0x5CE1 # <CJK> +0x5CE4 # <CJK> +0x5CE5 # <CJK> +0x5CE6 # <CJK> +0x5CE8 # <CJK> +0x5CEA # <CJK> +0x5CED # <CJK> +0x5CF0 # <CJK> +0x5CFB # <CJK> +0x5D02 # <CJK> +0x5D03 # <CJK> +0x5D06 # <CJK> +0x5D07 # <CJK> +0x5D0E # <CJK> +0x5D14 # <CJK> +0x5D16 # <CJK> +0x5D1B # <CJK> +0x5D1E # <CJK> +0x5D24 # <CJK> +0x5D26 # <CJK> +0x5D27 # <CJK> +0x5D29 # <CJK> +0x5D2D # <CJK> +0x5D2E # <CJK> +0x5D34 # <CJK> +0x5D3D # <CJK> +0x5D3E # <CJK> +0x5D47 # <CJK> +0x5D4A # <CJK> +0x5D4B # <CJK> +0x5D4C # <CJK> +0x5D58 # <CJK> +0x5D5B # <CJK> +0x5D5D # <CJK> +0x5D69 # <CJK> +0x5D6B # <CJK> +0x5D6C # <CJK> +0x5D6F # <CJK> +0x5D74 # <CJK> +0x5D82 # <CJK> +0x5D99 # <CJK> +0x5D9D # <CJK> +0x5DB7 # <CJK> +0x5DC5 # <CJK> +0x5DCD # <CJK> +0x5DDB # <CJK> +0x5DDD # <CJK> +0x5DDE # <CJK> +0x5DE1 # <CJK> +0x5DE2 # <CJK> +0x5DE5 # <CJK> +0x5DE6 # <CJK> +0x5DE7 # <CJK> +0x5DE8 # <CJK> +0x5DE9 # <CJK> +0x5DEB # <CJK> +0x5DEE # <CJK> +0x5DEF # <CJK> +0x5DF1 # <CJK> +0x5DF2 # <CJK> +0x5DF3 # <CJK> +0x5DF4 # <CJK> +0x5DF7 # <CJK> +0x5DFD # <CJK> +0x5DFE # <CJK> +0x5E01 # <CJK> +0x5E02 # <CJK> +0x5E03 # <CJK> +0x5E05 # <CJK> +0x5E06 # <CJK> +0x5E08 # <CJK> +0x5E0C # <CJK> +0x5E0F # <CJK> +0x5E10 # <CJK> +0x5E11 # <CJK> +0x5E14 # <CJK> +0x5E15 # <CJK> +0x5E16 # <CJK> +0x5E18 # <CJK> +0x5E19 # <CJK> +0x5E1A # <CJK> +0x5E1B # <CJK> +0x5E1C # <CJK> +0x5E1D # <CJK> +0x5E26 # <CJK> +0x5E27 # <CJK> +0x5E2D # <CJK> +0x5E2E # <CJK> +0x5E31 # <CJK> +0x5E37 # <CJK> +0x5E38 # <CJK> +0x5E3B # <CJK> +0x5E3C # <CJK> +0x5E3D # <CJK> +0x5E42 # <CJK> +0x5E44 # <CJK> +0x5E45 # <CJK> +0x5E4C # <CJK> +0x5E54 # <CJK> +0x5E55 # <CJK> +0x5E5B # <CJK> +0x5E5E # <CJK> +0x5E61 # <CJK> +0x5E62 # <CJK> +0x5E72 # <CJK> +0x5E73 # <CJK> +0x5E74 # <CJK> +0x5E76 # <CJK> +0x5E78 # <CJK> +0x5E7A # <CJK> +0x5E7B # <CJK> +0x5E7C # <CJK> +0x5E7D # <CJK> +0x5E7F # <CJK> +0x5E80 # <CJK> +0x5E84 # <CJK> +0x5E86 # <CJK> +0x5E87 # <CJK> +0x5E8A # <CJK> +0x5E8B # <CJK> +0x5E8F # <CJK> +0x5E90 # <CJK> +0x5E91 # <CJK> +0x5E93 # <CJK> +0x5E94 # <CJK> +0x5E95 # <CJK> +0x5E96 # <CJK> +0x5E97 # <CJK> +0x5E99 # <CJK> +0x5E9A # <CJK> +0x5E9C # <CJK> +0x5E9E # <CJK> +0x5E9F # <CJK> +0x5EA0 # <CJK> +0x5EA5 # <CJK> +0x5EA6 # <CJK> +0x5EA7 # <CJK> +0x5EAD # <CJK> +0x5EB3 # <CJK> +0x5EB5 # <CJK> +0x5EB6 # <CJK> +0x5EB7 # <CJK> +0x5EB8 # <CJK> +0x5EB9 # <CJK> +0x5EBE # <CJK> +0x5EC9 # <CJK> +0x5ECA # <CJK> +0x5ED1 # <CJK> +0x5ED2 # <CJK> +0x5ED3 # <CJK> +0x5ED6 # <CJK> +0x5EDB # <CJK> +0x5EE8 # <CJK> +0x5EEA # <CJK> +0x5EF4 # <CJK> +0x5EF6 # <CJK> +0x5EF7 # <CJK> +0x5EFA # <CJK> +0x5EFE # <CJK> +0x5EFF # <CJK> +0x5F00 # <CJK> +0x5F01 # <CJK> +0x5F02 # <CJK> +0x5F03 # <CJK> +0x5F04 # <CJK> +0x5F08 # <CJK> +0x5F0A # <CJK> +0x5F0B # <CJK> +0x5F0F # <CJK> +0x5F11 # <CJK> +0x5F13 # <CJK> +0x5F15 # <CJK> +0x5F17 # <CJK> +0x5F18 # <CJK> +0x5F1B # <CJK> +0x5F1F # <CJK> +0x5F20 # <CJK> +0x5F25 # <CJK> +0x5F26 # <CJK> +0x5F27 # <CJK> +0x5F29 # <CJK> +0x5F2A # <CJK> +0x5F2D # <CJK> +0x5F2F # <CJK> +0x5F31 # <CJK> +0x5F39 # <CJK> +0x5F3A # <CJK> +0x5F3C # <CJK> +0x5F40 # <CJK> +0x5F50 # <CJK> +0x5F52 # <CJK> +0x5F53 # <CJK> +0x5F55 # <CJK> +0x5F56 # <CJK> +0x5F57 # <CJK> +0x5F58 # <CJK> +0x5F5D # <CJK> +0x5F61 # <CJK> +0x5F62 # <CJK> +0x5F64 # <CJK> +0x5F66 # <CJK> +0x5F69 # <CJK> +0x5F6A # <CJK> +0x5F6C # <CJK> +0x5F6D # <CJK> +0x5F70 # <CJK> +0x5F71 # <CJK> +0x5F73 # <CJK> +0x5F77 # <CJK> +0x5F79 # <CJK> +0x5F7B # <CJK> +0x5F7C # <CJK> +0x5F80 # <CJK> +0x5F81 # <CJK> +0x5F82 # <CJK> +0x5F84 # <CJK> +0x5F85 # <CJK> +0x5F87 # <CJK> +0x5F88 # <CJK> +0x5F89 # <CJK> +0x5F8A # <CJK> +0x5F8B # <CJK> +0x5F8C # <CJK> +0x5F90 # <CJK> +0x5F92 # <CJK> +0x5F95 # <CJK> +0x5F97 # <CJK> +0x5F98 # <CJK> +0x5F99 # <CJK> +0x5F9C # <CJK> +0x5FA1 # <CJK> +0x5FA8 # <CJK> +0x5FAA # <CJK> +0x5FAD # <CJK> +0x5FAE # <CJK> +0x5FB5 # <CJK> +0x5FB7 # <CJK> +0x5FBC # <CJK> +0x5FBD # <CJK> +0x5FC3 # <CJK> +0x5FC4 # <CJK> +0x5FC5 # <CJK> +0x5FC6 # <CJK> +0x5FC9 # <CJK> +0x5FCC # <CJK> +0x5FCD # <CJK> +0x5FCF # <CJK> +0x5FD0 # <CJK> +0x5FD1 # <CJK> +0x5FD2 # <CJK> +0x5FD6 # <CJK> +0x5FD7 # <CJK> +0x5FD8 # <CJK> +0x5FD9 # <CJK> +0x5FDD # <CJK> +0x5FE0 # <CJK> +0x5FE1 # <CJK> +0x5FE4 # <CJK> +0x5FE7 # <CJK> +0x5FEA # <CJK> +0x5FEB # <CJK> +0x5FED # <CJK> +0x5FEE # <CJK> +0x5FF1 # <CJK> +0x5FF5 # <CJK> +0x5FF8 # <CJK> +0x5FFB # <CJK> +0x5FFD # <CJK> +0x5FFE # <CJK> +0x5FFF # <CJK> +0x6000 # <CJK> +0x6001 # <CJK> +0x6002 # <CJK> +0x6003 # <CJK> +0x6004 # <CJK> +0x6005 # <CJK> +0x6006 # <CJK> +0x600A # <CJK> +0x600D # <CJK> +0x600E # <CJK> +0x600F # <CJK> +0x6012 # <CJK> +0x6014 # <CJK> +0x6015 # <CJK> +0x6016 # <CJK> +0x6019 # <CJK> +0x601B # <CJK> +0x601C # <CJK> +0x601D # <CJK> +0x6020 # <CJK> +0x6021 # <CJK> +0x6025 # <CJK> +0x6026 # <CJK> +0x6027 # <CJK> +0x6028 # <CJK> +0x6029 # <CJK> +0x602A # <CJK> +0x602B # <CJK> +0x602F # <CJK> +0x6035 # <CJK> +0x603B # <CJK> +0x603C # <CJK> +0x603F # <CJK> +0x6041 # <CJK> +0x6042 # <CJK> +0x6043 # <CJK> +0x604B # <CJK> +0x604D # <CJK> +0x6050 # <CJK> +0x6052 # <CJK> +0x6055 # <CJK> +0x6059 # <CJK> +0x605A # <CJK> +0x605D # <CJK> +0x6062 # <CJK> +0x6063 # <CJK> +0x6064 # <CJK> +0x6067 # <CJK> +0x6068 # <CJK> +0x6069 # <CJK> +0x606A # <CJK> +0x606B # <CJK> +0x606C # <CJK> +0x606D # <CJK> +0x606F # <CJK> +0x6070 # <CJK> +0x6073 # <CJK> +0x6076 # <CJK> +0x6078 # <CJK> +0x6079 # <CJK> +0x607A # <CJK> +0x607B # <CJK> +0x607C # <CJK> +0x607D # <CJK> +0x607F # <CJK> +0x6083 # <CJK> +0x6084 # <CJK> +0x6089 # <CJK> +0x608C # <CJK> +0x608D # <CJK> +0x6092 # <CJK> +0x6094 # <CJK> +0x6096 # <CJK> +0x609A # <CJK> +0x609B # <CJK> +0x609D # <CJK> +0x609F # <CJK> +0x60A0 # <CJK> +0x60A3 # <CJK> +0x60A6 # <CJK> +0x60A8 # <CJK> +0x60AB # <CJK> +0x60AC # <CJK> +0x60AD # <CJK> +0x60AF # <CJK> +0x60B1 # <CJK> +0x60B2 # <CJK> +0x60B4 # <CJK> +0x60B8 # <CJK> +0x60BB # <CJK> +0x60BC # <CJK> +0x60C5 # <CJK> +0x60C6 # <CJK> +0x60CA # <CJK> +0x60CB # <CJK> +0x60D1 # <CJK> +0x60D5 # <CJK> +0x60D8 # <CJK> +0x60DA # <CJK> +0x60DC # <CJK> +0x60DD # <CJK> +0x60DF # <CJK> +0x60E0 # <CJK> +0x60E6 # <CJK> +0x60E7 # <CJK> +0x60E8 # <CJK> +0x60E9 # <CJK> +0x60EB # <CJK> +0x60EC # <CJK> +0x60ED # <CJK> +0x60EE # <CJK> +0x60EF # <CJK> +0x60F0 # <CJK> +0x60F3 # <CJK> +0x60F4 # <CJK> +0x60F6 # <CJK> +0x60F9 # <CJK> +0x60FA # <CJK> +0x6100 # <CJK> +0x6101 # <CJK> +0x6106 # <CJK> +0x6108 # <CJK> +0x6109 # <CJK> +0x610D # <CJK> +0x610E # <CJK> +0x610F # <CJK> +0x6115 # <CJK> +0x611A # <CJK> +0x611F # <CJK> +0x6120 # <CJK> +0x6123 # <CJK> +0x6124 # <CJK> +0x6126 # <CJK> +0x6127 # <CJK> +0x612B # <CJK> +0x613F # <CJK> +0x6148 # <CJK> +0x614A # <CJK> +0x614C # <CJK> +0x614E # <CJK> +0x6151 # <CJK> +0x6155 # <CJK> +0x615D # <CJK> +0x6162 # <CJK> +0x6167 # <CJK> +0x6168 # <CJK> +0x6170 # <CJK> +0x6175 # <CJK> +0x6177 # <CJK> +0x618B # <CJK> +0x618E # <CJK> +0x6194 # <CJK> +0x619D # <CJK> +0x61A7 # <CJK> +0x61A8 # <CJK> +0x61A9 # <CJK> +0x61AC # <CJK> +0x61B7 # <CJK> +0x61BE # <CJK> +0x61C2 # <CJK> +0x61C8 # <CJK> +0x61CA # <CJK> +0x61CB # <CJK> +0x61D1 # <CJK> +0x61D2 # <CJK> +0x61D4 # <CJK> +0x61E6 # <CJK> +0x61F5 # <CJK> +0x61FF # <CJK> +0x6206 # <CJK> +0x6208 # <CJK> +0x620A # <CJK> +0x620B # <CJK> +0x620C # <CJK> +0x620D # <CJK> +0x620E # <CJK> +0x620F # <CJK> +0x6210 # <CJK> +0x6211 # <CJK> +0x6212 # <CJK> +0x6215 # <CJK> +0x6216 # <CJK> +0x6217 # <CJK> +0x6218 # <CJK> +0x621A # <CJK> +0x621B # <CJK> +0x621F # <CJK> +0x6221 # <CJK> +0x6222 # <CJK> +0x6224 # <CJK> +0x6225 # <CJK> +0x622A # <CJK> +0x622C # <CJK> +0x622E # <CJK> +0x6233 # <CJK> +0x6234 # <CJK> +0x6237 # <CJK> +0x623D # <CJK> +0x623E # <CJK> +0x623F # <CJK> +0x6240 # <CJK> +0x6241 # <CJK> +0x6243 # <CJK> +0x6247 # <CJK> +0x6248 # <CJK> +0x6249 # <CJK> +0x624B # <CJK> +0x624C # <CJK> +0x624D # <CJK> +0x624E # <CJK> +0x6251 # <CJK> +0x6252 # <CJK> +0x6253 # <CJK> +0x6254 # <CJK> +0x6258 # <CJK> +0x625B # <CJK> +0x6263 # <CJK> +0x6266 # <CJK> +0x6267 # <CJK> +0x6269 # <CJK> +0x626A # <CJK> +0x626B # <CJK> +0x626C # <CJK> +0x626D # <CJK> +0x626E # <CJK> +0x626F # <CJK> +0x6270 # <CJK> +0x6273 # <CJK> +0x6276 # <CJK> +0x6279 # <CJK> +0x627C # <CJK> +0x627E # <CJK> +0x627F # <CJK> +0x6280 # <CJK> +0x6284 # <CJK> +0x6289 # <CJK> +0x628A # <CJK> +0x6291 # <CJK> +0x6292 # <CJK> +0x6293 # <CJK> +0x6295 # <CJK> +0x6296 # <CJK> +0x6297 # <CJK> +0x6298 # <CJK> +0x629A # <CJK> +0x629B # <CJK> +0x629F # <CJK> +0x62A0 # <CJK> +0x62A1 # <CJK> +0x62A2 # <CJK> +0x62A4 # <CJK> +0x62A5 # <CJK> +0x62A8 # <CJK> +0x62AB # <CJK> +0x62AC # <CJK> +0x62B1 # <CJK> +0x62B5 # <CJK> +0x62B9 # <CJK> +0x62BB # <CJK> +0x62BC # <CJK> +0x62BD # <CJK> +0x62BF # <CJK> +0x62C2 # <CJK> +0x62C4 # <CJK> +0x62C5 # <CJK> +0x62C6 # <CJK> +0x62C7 # <CJK> +0x62C8 # <CJK> +0x62C9 # <CJK> +0x62CA # <CJK> +0x62CC # <CJK> +0x62CD # <CJK> +0x62CE # <CJK> +0x62D0 # <CJK> +0x62D2 # <CJK> +0x62D3 # <CJK> +0x62D4 # <CJK> +0x62D6 # <CJK> +0x62D7 # <CJK> +0x62D8 # <CJK> +0x62D9 # <CJK> +0x62DA # <CJK> +0x62DB # <CJK> +0x62DC # <CJK> +0x62DF # <CJK> +0x62E2 # <CJK> +0x62E3 # <CJK> +0x62E5 # <CJK> +0x62E6 # <CJK> +0x62E7 # <CJK> +0x62E8 # <CJK> +0x62E9 # <CJK> +0x62EC # <CJK> +0x62ED # <CJK> +0x62EE # <CJK> +0x62EF # <CJK> +0x62F1 # <CJK> +0x62F3 # <CJK> +0x62F4 # <CJK> +0x62F6 # <CJK> +0x62F7 # <CJK> +0x62FC # <CJK> +0x62FD # <CJK> +0x62FE # <CJK> +0x62FF # <CJK> +0x6301 # <CJK> +0x6302 # <CJK> +0x6307 # <CJK> +0x6308 # <CJK> +0x6309 # <CJK> +0x630E # <CJK> +0x6311 # <CJK> +0x6316 # <CJK> +0x631A # <CJK> +0x631B # <CJK> +0x631D # <CJK> +0x631E # <CJK> +0x631F # <CJK> +0x6320 # <CJK> +0x6321 # <CJK> +0x6322 # <CJK> +0x6323 # <CJK> +0x6324 # <CJK> +0x6325 # <CJK> +0x6328 # <CJK> +0x632A # <CJK> +0x632B # <CJK> +0x632F # <CJK> +0x6332 # <CJK> +0x6339 # <CJK> +0x633A # <CJK> +0x633D # <CJK> +0x6342 # <CJK> +0x6343 # <CJK> +0x6345 # <CJK> +0x6346 # <CJK> +0x6349 # <CJK> +0x634B # <CJK> +0x634C # <CJK> +0x634D # <CJK> +0x634E # <CJK> +0x634F # <CJK> +0x6350 # <CJK> +0x6355 # <CJK> +0x635E # <CJK> +0x635F # <CJK> +0x6361 # <CJK> +0x6362 # <CJK> +0x6363 # <CJK> +0x6367 # <CJK> +0x6369 # <CJK> +0x636D # <CJK> +0x636E # <CJK> +0x6371 # <CJK> +0x6376 # <CJK> +0x6377 # <CJK> +0x637A # <CJK> +0x637B # <CJK> +0x6380 # <CJK> +0x6382 # <CJK> +0x6387 # <CJK> +0x6388 # <CJK> +0x6389 # <CJK> +0x638A # <CJK> +0x638C # <CJK> +0x638E # <CJK> +0x638F # <CJK> +0x6390 # <CJK> +0x6392 # <CJK> +0x6396 # <CJK> +0x6398 # <CJK> +0x63A0 # <CJK> +0x63A2 # <CJK> +0x63A3 # <CJK> +0x63A5 # <CJK> +0x63A7 # <CJK> +0x63A8 # <CJK> +0x63A9 # <CJK> +0x63AA # <CJK> +0x63AC # <CJK> +0x63AD # <CJK> +0x63AE # <CJK> +0x63B0 # <CJK> +0x63B3 # <CJK> +0x63B4 # <CJK> +0x63B7 # <CJK> +0x63B8 # <CJK> +0x63BA # <CJK> +0x63BC # <CJK> +0x63BE # <CJK> +0x63C4 # <CJK> +0x63C6 # <CJK> +0x63C9 # <CJK> +0x63CD # <CJK> +0x63CE # <CJK> +0x63CF # <CJK> +0x63D0 # <CJK> +0x63D2 # <CJK> +0x63D6 # <CJK> +0x63DE # <CJK> +0x63E0 # <CJK> +0x63E1 # <CJK> +0x63E3 # <CJK> +0x63E9 # <CJK> +0x63EA # <CJK> +0x63ED # <CJK> +0x63F2 # <CJK> +0x63F4 # <CJK> +0x63F6 # <CJK> +0x63F8 # <CJK> +0x63FD # <CJK> +0x63FF # <CJK> +0x6400 # <CJK> +0x6401 # <CJK> +0x6402 # <CJK> +0x6405 # <CJK> +0x640B # <CJK> +0x640C # <CJK> +0x640F # <CJK> +0x6410 # <CJK> +0x6413 # <CJK> +0x6414 # <CJK> +0x641B # <CJK> +0x641C # <CJK> +0x641E # <CJK> +0x6420 # <CJK> +0x6421 # <CJK> +0x6426 # <CJK> +0x642A # <CJK> +0x642C # <CJK> +0x642D # <CJK> +0x6434 # <CJK> +0x643A # <CJK> +0x643D # <CJK> +0x643F # <CJK> +0x6441 # <CJK> +0x6444 # <CJK> +0x6445 # <CJK> +0x6446 # <CJK> +0x6447 # <CJK> +0x6448 # <CJK> +0x644A # <CJK> +0x6452 # <CJK> +0x6454 # <CJK> +0x6458 # <CJK> +0x645E # <CJK> +0x6467 # <CJK> +0x6469 # <CJK> +0x646D # <CJK> +0x6478 # <CJK> +0x6479 # <CJK> +0x647A # <CJK> +0x6482 # <CJK> +0x6484 # <CJK> +0x6485 # <CJK> +0x6487 # <CJK> +0x6491 # <CJK> +0x6492 # <CJK> +0x6495 # <CJK> +0x6496 # <CJK> +0x6499 # <CJK> +0x649E # <CJK> +0x64A4 # <CJK> +0x64A9 # <CJK> +0x64AC # <CJK> +0x64AD # <CJK> +0x64AE # <CJK> +0x64B0 # <CJK> +0x64B5 # <CJK> +0x64B7 # <CJK> +0x64B8 # <CJK> +0x64BA # <CJK> +0x64BC # <CJK> +0x64C0 # <CJK> +0x64C2 # <CJK> +0x64C5 # <CJK> +0x64CD # <CJK> +0x64CE # <CJK> +0x64D0 # <CJK> +0x64D2 # <CJK> +0x64D7 # <CJK> +0x64D8 # <CJK> +0x64DE # <CJK> +0x64E2 # <CJK> +0x64E4 # <CJK> +0x64E6 # <CJK> +0x6500 # <CJK> +0x6509 # <CJK> +0x6512 # <CJK> +0x6518 # <CJK> +0x6525 # <CJK> +0x652B # <CJK> +0x652E # <CJK> +0x652F # <CJK> +0x6534 # <CJK> +0x6535 # <CJK> +0x6536 # <CJK> +0x6538 # <CJK> +0x6539 # <CJK> +0x653B # <CJK> +0x653E # <CJK> +0x653F # <CJK> +0x6545 # <CJK> +0x6548 # <CJK> +0x6549 # <CJK> +0x654C # <CJK> +0x654F # <CJK> +0x6551 # <CJK> +0x6555 # <CJK> +0x6556 # <CJK> +0x6559 # <CJK> +0x655B # <CJK> +0x655D # <CJK> +0x655E # <CJK> +0x6562 # <CJK> +0x6563 # <CJK> +0x6566 # <CJK> +0x656B # <CJK> +0x656C # <CJK> +0x6570 # <CJK> +0x6572 # <CJK> +0x6574 # <CJK> +0x6577 # <CJK> +0x6587 # <CJK> +0x658B # <CJK> +0x658C # <CJK> +0x6590 # <CJK> +0x6591 # <CJK> +0x6593 # <CJK> +0x6597 # <CJK> +0x6599 # <CJK> +0x659B # <CJK> +0x659C # <CJK> +0x659F # <CJK> +0x65A1 # <CJK> +0x65A4 # <CJK> +0x65A5 # <CJK> +0x65A7 # <CJK> +0x65A9 # <CJK> +0x65AB # <CJK> +0x65AD # <CJK> +0x65AF # <CJK> +0x65B0 # <CJK> +0x65B9 # <CJK> +0x65BC # <CJK> +0x65BD # <CJK> +0x65C1 # <CJK> +0x65C3 # <CJK> +0x65C4 # <CJK> +0x65C5 # <CJK> +0x65C6 # <CJK> +0x65CB # <CJK> +0x65CC # <CJK> +0x65CE # <CJK> +0x65CF # <CJK> +0x65D2 # <CJK> +0x65D6 # <CJK> +0x65D7 # <CJK> +0x65E0 # <CJK> +0x65E2 # <CJK> +0x65E5 # <CJK> +0x65E6 # <CJK> +0x65E7 # <CJK> +0x65E8 # <CJK> +0x65E9 # <CJK> +0x65EC # <CJK> +0x65ED # <CJK> +0x65EE # <CJK> +0x65EF # <CJK> +0x65F0 # <CJK> +0x65F1 # <CJK> +0x65F6 # <CJK> +0x65F7 # <CJK> +0x65FA # <CJK> +0x6600 # <CJK> +0x6602 # <CJK> +0x6603 # <CJK> +0x6606 # <CJK> +0x660A # <CJK> +0x660C # <CJK> +0x660E # <CJK> +0x660F # <CJK> +0x6613 # <CJK> +0x6614 # <CJK> +0x6615 # <CJK> +0x6619 # <CJK> +0x661D # <CJK> +0x661F # <CJK> +0x6620 # <CJK> +0x6625 # <CJK> +0x6627 # <CJK> +0x6628 # <CJK> +0x662D # <CJK> +0x662F # <CJK> +0x6631 # <CJK> +0x6634 # <CJK> +0x6635 # <CJK> +0x6636 # <CJK> +0x663C # <CJK> +0x663E # <CJK> +0x6641 # <CJK> +0x6643 # <CJK> +0x664B # <CJK> +0x664C # <CJK> +0x664F # <CJK> +0x6652 # <CJK> +0x6653 # <CJK> +0x6654 # <CJK> +0x6655 # <CJK> +0x6656 # <CJK> +0x6657 # <CJK> +0x665A # <CJK> +0x665F # <CJK> +0x6661 # <CJK> +0x6664 # <CJK> +0x6666 # <CJK> +0x6668 # <CJK> +0x666E # <CJK> +0x666F # <CJK> +0x6670 # <CJK> +0x6674 # <CJK> +0x6676 # <CJK> +0x6677 # <CJK> +0x667A # <CJK> +0x667E # <CJK> +0x6682 # <CJK> +0x6684 # <CJK> +0x6687 # <CJK> +0x668C # <CJK> +0x6691 # <CJK> +0x6696 # <CJK> +0x6697 # <CJK> +0x669D # <CJK> +0x66A7 # <CJK> +0x66A8 # <CJK> +0x66AE # <CJK> +0x66B4 # <CJK> +0x66B9 # <CJK> +0x66BE # <CJK> +0x66D9 # <CJK> +0x66DB # <CJK> +0x66DC # <CJK> +0x66DD # <CJK> +0x66E6 # <CJK> +0x66E9 # <CJK> +0x66F0 # <CJK> +0x66F2 # <CJK> +0x66F3 # <CJK> +0x66F4 # <CJK> +0x66F7 # <CJK> +0x66F9 # <CJK> +0x66FC # <CJK> +0x66FE # <CJK> +0x66FF # <CJK> +0x6700 # <CJK> +0x6708 # <CJK> +0x6709 # <CJK> +0x670A # <CJK> +0x670B # <CJK> +0x670D # <CJK> +0x6710 # <CJK> +0x6714 # <CJK> +0x6715 # <CJK> +0x6717 # <CJK> +0x671B # <CJK> +0x671D # <CJK> +0x671F # <CJK> +0x6726 # <CJK> +0x6728 # <CJK> +0x672A # <CJK> +0x672B # <CJK> +0x672C # <CJK> +0x672D # <CJK> +0x672F # <CJK> +0x6731 # <CJK> +0x6734 # <CJK> +0x6735 # <CJK> +0x673A # <CJK> +0x673D # <CJK> +0x6740 # <CJK> +0x6742 # <CJK> +0x6743 # <CJK> +0x6746 # <CJK> +0x6748 # <CJK> +0x6749 # <CJK> +0x674C # <CJK> +0x674E # <CJK> +0x674F # <CJK> +0x6750 # <CJK> +0x6751 # <CJK> +0x6753 # <CJK> +0x6756 # <CJK> +0x675C # <CJK> +0x675E # <CJK> +0x675F # <CJK> +0x6760 # <CJK> +0x6761 # <CJK> +0x6765 # <CJK> +0x6768 # <CJK> +0x6769 # <CJK> +0x676A # <CJK> +0x676D # <CJK> +0x676F # <CJK> +0x6770 # <CJK> +0x6772 # <CJK> +0x6773 # <CJK> +0x6775 # <CJK> +0x6777 # <CJK> +0x677C # <CJK> +0x677E # <CJK> +0x677F # <CJK> +0x6781 # <CJK> +0x6784 # <CJK> +0x6787 # <CJK> +0x6789 # <CJK> +0x678B # <CJK> +0x6790 # <CJK> +0x6795 # <CJK> +0x6797 # <CJK> +0x6798 # <CJK> +0x679A # <CJK> +0x679C # <CJK> +0x679D # <CJK> +0x679E # <CJK> +0x67A2 # <CJK> +0x67A3 # <CJK> +0x67A5 # <CJK> +0x67A7 # <CJK> +0x67A8 # <CJK> +0x67AA # <CJK> +0x67AB # <CJK> +0x67AD # <CJK> +0x67AF # <CJK> +0x67B0 # <CJK> +0x67B3 # <CJK> +0x67B5 # <CJK> +0x67B6 # <CJK> +0x67B7 # <CJK> +0x67B8 # <CJK> +0x67C1 # <CJK> +0x67C3 # <CJK> +0x67C4 # <CJK> +0x67CF # <CJK> +0x67D0 # <CJK> +0x67D1 # <CJK> +0x67D2 # <CJK> +0x67D3 # <CJK> +0x67D4 # <CJK> +0x67D8 # <CJK> +0x67D9 # <CJK> +0x67DA # <CJK> +0x67DC # <CJK> +0x67DD # <CJK> +0x67DE # <CJK> +0x67E0 # <CJK> +0x67E2 # <CJK> +0x67E5 # <CJK> +0x67E9 # <CJK> +0x67EC # <CJK> +0x67EF # <CJK> +0x67F0 # <CJK> +0x67F1 # <CJK> +0x67F3 # <CJK> +0x67F4 # <CJK> +0x67FD # <CJK> +0x67FF # <CJK> +0x6800 # <CJK> +0x6805 # <CJK> +0x6807 # <CJK> +0x6808 # <CJK> +0x6809 # <CJK> +0x680A # <CJK> +0x680B # <CJK> +0x680C # <CJK> +0x680E # <CJK> +0x680F # <CJK> +0x6811 # <CJK> +0x6813 # <CJK> +0x6816 # <CJK> +0x6817 # <CJK> +0x681D # <CJK> +0x6821 # <CJK> +0x6829 # <CJK> +0x682A # <CJK> +0x6832 # <CJK> +0x6833 # <CJK> +0x6837 # <CJK> +0x6838 # <CJK> +0x6839 # <CJK> +0x683C # <CJK> +0x683D # <CJK> +0x683E # <CJK> +0x6840 # <CJK> +0x6841 # <CJK> +0x6842 # <CJK> +0x6843 # <CJK> +0x6844 # <CJK> +0x6845 # <CJK> +0x6846 # <CJK> +0x6848 # <CJK> +0x6849 # <CJK> +0x684A # <CJK> +0x684C # <CJK> +0x684E # <CJK> +0x6850 # <CJK> +0x6851 # <CJK> +0x6853 # <CJK> +0x6854 # <CJK> +0x6855 # <CJK> +0x6860 # <CJK> +0x6861 # <CJK> +0x6862 # <CJK> +0x6863 # <CJK> +0x6864 # <CJK> +0x6865 # <CJK> +0x6866 # <CJK> +0x6867 # <CJK> +0x6868 # <CJK> +0x6869 # <CJK> +0x686B # <CJK> +0x6874 # <CJK> +0x6876 # <CJK> +0x6877 # <CJK> +0x6881 # <CJK> +0x6883 # <CJK> +0x6885 # <CJK> +0x6886 # <CJK> +0x688F # <CJK> +0x6893 # <CJK> +0x6897 # <CJK> +0x68A2 # <CJK> +0x68A6 # <CJK> +0x68A7 # <CJK> +0x68A8 # <CJK> +0x68AD # <CJK> +0x68AF # <CJK> +0x68B0 # <CJK> +0x68B3 # <CJK> +0x68B5 # <CJK> +0x68C0 # <CJK> +0x68C2 # <CJK> +0x68C9 # <CJK> +0x68CB # <CJK> +0x68CD # <CJK> +0x68D2 # <CJK> +0x68D5 # <CJK> +0x68D8 # <CJK> +0x68DA # <CJK> +0x68E0 # <CJK> +0x68E3 # <CJK> +0x68EE # <CJK> +0x68F0 # <CJK> +0x68F1 # <CJK> +0x68F5 # <CJK> +0x68F9 # <CJK> +0x68FA # <CJK> +0x68FC # <CJK> +0x6901 # <CJK> +0x6905 # <CJK> +0x690B # <CJK> +0x690D # <CJK> +0x690E # <CJK> +0x6910 # <CJK> +0x6912 # <CJK> +0x691F # <CJK> +0x6920 # <CJK> +0x6924 # <CJK> +0x692D # <CJK> +0x6930 # <CJK> +0x6934 # <CJK> +0x6939 # <CJK> +0x693D # <CJK> +0x693F # <CJK> +0x6942 # <CJK> +0x6954 # <CJK> +0x6957 # <CJK> +0x695A # <CJK> +0x695D # <CJK> +0x695E # <CJK> +0x6960 # <CJK> +0x6963 # <CJK> +0x6966 # <CJK> +0x696B # <CJK> +0x696E # <CJK> +0x6971 # <CJK> +0x6977 # <CJK> +0x6978 # <CJK> +0x6979 # <CJK> +0x697C # <CJK> +0x6980 # <CJK> +0x6982 # <CJK> +0x6984 # <CJK> +0x6986 # <CJK> +0x6987 # <CJK> +0x6988 # <CJK> +0x6989 # <CJK> +0x698D # <CJK> +0x6994 # <CJK> +0x6995 # <CJK> +0x6998 # <CJK> +0x699B # <CJK> +0x699C # <CJK> +0x69A7 # <CJK> +0x69A8 # <CJK> +0x69AB # <CJK> +0x69AD # <CJK> +0x69B1 # <CJK> +0x69B4 # <CJK> +0x69B7 # <CJK> +0x69BB # <CJK> +0x69C1 # <CJK> +0x69CA # <CJK> +0x69CC # <CJK> +0x69CE # <CJK> +0x69D0 # <CJK> +0x69D4 # <CJK> +0x69DB # <CJK> +0x69DF # <CJK> +0x69E0 # <CJK> +0x69ED # <CJK> +0x69F2 # <CJK> +0x69FD # <CJK> +0x69FF # <CJK> +0x6A0A # <CJK> +0x6A17 # <CJK> +0x6A18 # <CJK> +0x6A1F # <CJK> +0x6A21 # <CJK> +0x6A28 # <CJK> +0x6A2A # <CJK> +0x6A2F # <CJK> +0x6A31 # <CJK> +0x6A35 # <CJK> +0x6A3D # <CJK> +0x6A3E # <CJK> +0x6A44 # <CJK> +0x6A47 # <CJK> +0x6A50 # <CJK> +0x6A58 # <CJK> +0x6A59 # <CJK> +0x6A5B # <CJK> +0x6A61 # <CJK> +0x6A65 # <CJK> +0x6A71 # <CJK> +0x6A79 # <CJK> +0x6A7C # <CJK> +0x6A80 # <CJK> +0x6A84 # <CJK> +0x6A8E # <CJK> +0x6A90 # <CJK> +0x6A91 # <CJK> +0x6A97 # <CJK> +0x6AA0 # <CJK> +0x6AA9 # <CJK> +0x6AAB # <CJK> +0x6AAC # <CJK> +0x6B20 # <CJK> +0x6B21 # <CJK> +0x6B22 # <CJK> +0x6B23 # <CJK> +0x6B24 # <CJK> +0x6B27 # <CJK> +0x6B32 # <CJK> +0x6B37 # <CJK> +0x6B39 # <CJK> +0x6B3A # <CJK> +0x6B3E # <CJK> +0x6B43 # <CJK> +0x6B46 # <CJK> +0x6B47 # <CJK> +0x6B49 # <CJK> +0x6B4C # <CJK> +0x6B59 # <CJK> +0x6B62 # <CJK> +0x6B63 # <CJK> +0x6B64 # <CJK> +0x6B65 # <CJK> +0x6B66 # <CJK> +0x6B67 # <CJK> +0x6B6A # <CJK> +0x6B79 # <CJK> +0x6B7B # <CJK> +0x6B7C # <CJK> +0x6B81 # <CJK> +0x6B82 # <CJK> +0x6B83 # <CJK> +0x6B84 # <CJK> +0x6B86 # <CJK> +0x6B87 # <CJK> +0x6B89 # <CJK> +0x6B8A # <CJK> +0x6B8B # <CJK> +0x6B8D # <CJK> +0x6B92 # <CJK> +0x6B93 # <CJK> +0x6B96 # <CJK> +0x6B9A # <CJK> +0x6B9B # <CJK> +0x6BA1 # <CJK> +0x6BAA # <CJK> +0x6BB3 # <CJK> +0x6BB4 # <CJK> +0x6BB5 # <CJK> +0x6BB7 # <CJK> +0x6BBF # <CJK> +0x6BC1 # <CJK> +0x6BC2 # <CJK> +0x6BC5 # <CJK> +0x6BCB # <CJK> +0x6BCD # <CJK> +0x6BCF # <CJK> +0x6BD2 # <CJK> +0x6BD3 # <CJK> +0x6BD4 # <CJK> +0x6BD5 # <CJK> +0x6BD6 # <CJK> +0x6BD7 # <CJK> +0x6BD9 # <CJK> +0x6BDB # <CJK> +0x6BE1 # <CJK> +0x6BEA # <CJK> +0x6BEB # <CJK> +0x6BEF # <CJK> +0x6BF3 # <CJK> +0x6BF5 # <CJK> +0x6BF9 # <CJK> +0x6BFD # <CJK> +0x6C05 # <CJK> +0x6C06 # <CJK> +0x6C07 # <CJK> +0x6C0D # <CJK> +0x6C0F # <CJK> +0x6C10 # <CJK> +0x6C11 # <CJK> +0x6C13 # <CJK> +0x6C14 # <CJK> +0x6C15 # <CJK> +0x6C16 # <CJK> +0x6C18 # <CJK> +0x6C19 # <CJK> +0x6C1A # <CJK> +0x6C1B # <CJK> +0x6C1F # <CJK> +0x6C21 # <CJK> +0x6C22 # <CJK> +0x6C24 # <CJK> +0x6C26 # <CJK> +0x6C27 # <CJK> +0x6C28 # <CJK> +0x6C29 # <CJK> +0x6C2A # <CJK> +0x6C2E # <CJK> +0x6C2F # <CJK> +0x6C30 # <CJK> +0x6C32 # <CJK> +0x6C34 # <CJK> +0x6C35 # <CJK> +0x6C38 # <CJK> +0x6C3D # <CJK> +0x6C40 # <CJK> +0x6C41 # <CJK> +0x6C42 # <CJK> +0x6C46 # <CJK> +0x6C47 # <CJK> +0x6C49 # <CJK> +0x6C4A # <CJK> +0x6C50 # <CJK> +0x6C54 # <CJK> +0x6C55 # <CJK> +0x6C57 # <CJK> +0x6C5B # <CJK> +0x6C5C # <CJK> +0x6C5D # <CJK> +0x6C5E # <CJK> +0x6C5F # <CJK> +0x6C60 # <CJK> +0x6C61 # <CJK> +0x6C64 # <CJK> +0x6C68 # <CJK> +0x6C69 # <CJK> +0x6C6A # <CJK> +0x6C70 # <CJK> +0x6C72 # <CJK> +0x6C74 # <CJK> +0x6C76 # <CJK> +0x6C79 # <CJK> +0x6C7D # <CJK> +0x6C7E # <CJK> +0x6C81 # <CJK> +0x6C82 # <CJK> +0x6C83 # <CJK> +0x6C85 # <CJK> +0x6C86 # <CJK> +0x6C88 # <CJK> +0x6C89 # <CJK> +0x6C8C # <CJK> +0x6C8F # <CJK> +0x6C90 # <CJK> +0x6C93 # <CJK> +0x6C94 # <CJK> +0x6C99 # <CJK> +0x6C9B # <CJK> +0x6C9F # <CJK> +0x6CA1 # <CJK> +0x6CA3 # <CJK> +0x6CA4 # <CJK> +0x6CA5 # <CJK> +0x6CA6 # <CJK> +0x6CA7 # <CJK> +0x6CA9 # <CJK> +0x6CAA # <CJK> +0x6CAB # <CJK> +0x6CAD # <CJK> +0x6CAE # <CJK> +0x6CB1 # <CJK> +0x6CB2 # <CJK> +0x6CB3 # <CJK> +0x6CB8 # <CJK> +0x6CB9 # <CJK> +0x6CBB # <CJK> +0x6CBC # <CJK> +0x6CBD # <CJK> +0x6CBE # <CJK> +0x6CBF # <CJK> +0x6CC4 # <CJK> +0x6CC5 # <CJK> +0x6CC9 # <CJK> +0x6CCA # <CJK> +0x6CCC # <CJK> +0x6CD0 # <CJK> +0x6CD3 # <CJK> +0x6CD4 # <CJK> +0x6CD5 # <CJK> +0x6CD6 # <CJK> +0x6CD7 # <CJK> +0x6CDB # <CJK> +0x6CDE # <CJK> +0x6CE0 # <CJK> +0x6CE1 # <CJK> +0x6CE2 # <CJK> +0x6CE3 # <CJK> +0x6CE5 # <CJK> +0x6CE8 # <CJK> +0x6CEA # <CJK> +0x6CEB # <CJK> +0x6CEE # <CJK> +0x6CEF # <CJK> +0x6CF0 # <CJK> +0x6CF1 # <CJK> +0x6CF3 # <CJK> +0x6CF5 # <CJK> +0x6CF6 # <CJK> +0x6CF7 # <CJK> +0x6CF8 # <CJK> +0x6CFA # <CJK> +0x6CFB # <CJK> +0x6CFC # <CJK> +0x6CFD # <CJK> +0x6CFE # <CJK> +0x6D01 # <CJK> +0x6D04 # <CJK> +0x6D07 # <CJK> +0x6D0B # <CJK> +0x6D0C # <CJK> +0x6D0E # <CJK> +0x6D12 # <CJK> +0x6D17 # <CJK> +0x6D19 # <CJK> +0x6D1A # <CJK> +0x6D1B # <CJK> +0x6D1E # <CJK> +0x6D25 # <CJK> +0x6D27 # <CJK> +0x6D2A # <CJK> +0x6D2B # <CJK> +0x6D2E # <CJK> +0x6D31 # <CJK> +0x6D32 # <CJK> +0x6D33 # <CJK> +0x6D35 # <CJK> +0x6D39 # <CJK> +0x6D3B # <CJK> +0x6D3C # <CJK> +0x6D3D # <CJK> +0x6D3E # <CJK> +0x6D41 # <CJK> +0x6D43 # <CJK> +0x6D45 # <CJK> +0x6D46 # <CJK> +0x6D47 # <CJK> +0x6D48 # <CJK> +0x6D4A # <CJK> +0x6D4B # <CJK> +0x6D4D # <CJK> +0x6D4E # <CJK> +0x6D4F # <CJK> +0x6D51 # <CJK> +0x6D52 # <CJK> +0x6D53 # <CJK> +0x6D54 # <CJK> +0x6D59 # <CJK> +0x6D5A # <CJK> +0x6D5C # <CJK> +0x6D5E # <CJK> +0x6D60 # <CJK> +0x6D63 # <CJK> +0x6D66 # <CJK> +0x6D69 # <CJK> +0x6D6A # <CJK> +0x6D6E # <CJK> +0x6D6F # <CJK> +0x6D74 # <CJK> +0x6D77 # <CJK> +0x6D78 # <CJK> +0x6D7C # <CJK> +0x6D82 # <CJK> +0x6D85 # <CJK> +0x6D88 # <CJK> +0x6D89 # <CJK> +0x6D8C # <CJK> +0x6D8E # <CJK> +0x6D91 # <CJK> +0x6D93 # <CJK> +0x6D94 # <CJK> +0x6D95 # <CJK> +0x6D9B # <CJK> +0x6D9D # <CJK> +0x6D9E # <CJK> +0x6D9F # <CJK> +0x6DA0 # <CJK> +0x6DA1 # <CJK> +0x6DA3 # <CJK> +0x6DA4 # <CJK> +0x6DA6 # <CJK> +0x6DA7 # <CJK> +0x6DA8 # <CJK> +0x6DA9 # <CJK> +0x6DAA # <CJK> +0x6DAB # <CJK> +0x6DAE # <CJK> +0x6DAF # <CJK> +0x6DB2 # <CJK> +0x6DB5 # <CJK> +0x6DB8 # <CJK> +0x6DBF # <CJK> +0x6DC0 # <CJK> +0x6DC4 # <CJK> +0x6DC5 # <CJK> +0x6DC6 # <CJK> +0x6DC7 # <CJK> +0x6DCB # <CJK> +0x6DCC # <CJK> +0x6DD1 # <CJK> +0x6DD6 # <CJK> +0x6DD8 # <CJK> +0x6DD9 # <CJK> +0x6DDD # <CJK> +0x6DDE # <CJK> +0x6DE0 # <CJK> +0x6DE1 # <CJK> +0x6DE4 # <CJK> +0x6DE6 # <CJK> +0x6DEB # <CJK> +0x6DEC # <CJK> +0x6DEE # <CJK> +0x6DF1 # <CJK> +0x6DF3 # <CJK> +0x6DF7 # <CJK> +0x6DF9 # <CJK> +0x6DFB # <CJK> +0x6DFC # <CJK> +0x6E05 # <CJK> +0x6E0A # <CJK> +0x6E0C # <CJK> +0x6E0D # <CJK> +0x6E0E # <CJK> +0x6E10 # <CJK> +0x6E11 # <CJK> +0x6E14 # <CJK> +0x6E16 # <CJK> +0x6E17 # <CJK> +0x6E1A # <CJK> +0x6E1D # <CJK> +0x6E20 # <CJK> +0x6E21 # <CJK> +0x6E23 # <CJK> +0x6E24 # <CJK> +0x6E25 # <CJK> +0x6E29 # <CJK> +0x6E2B # <CJK> +0x6E2D # <CJK> +0x6E2F # <CJK> +0x6E32 # <CJK> +0x6E34 # <CJK> +0x6E38 # <CJK> +0x6E3A # <CJK> +0x6E43 # <CJK> +0x6E44 # <CJK> +0x6E4D # <CJK> +0x6E4E # <CJK> +0x6E53 # <CJK> +0x6E54 # <CJK> +0x6E56 # <CJK> +0x6E58 # <CJK> +0x6E5B # <CJK> +0x6E5F # <CJK> +0x6E6B # <CJK> +0x6E6E # <CJK> +0x6E7E # <CJK> +0x6E7F # <CJK> +0x6E83 # <CJK> +0x6E85 # <CJK> +0x6E86 # <CJK> +0x6E89 # <CJK> +0x6E8F # <CJK> +0x6E90 # <CJK> +0x6E98 # <CJK> +0x6E9C # <CJK> +0x6E9F # <CJK> +0x6EA2 # <CJK> +0x6EA5 # <CJK> +0x6EA7 # <CJK> +0x6EAA # <CJK> +0x6EAF # <CJK> +0x6EB1 # <CJK> +0x6EB2 # <CJK> +0x6EB4 # <CJK> +0x6EB6 # <CJK> +0x6EB7 # <CJK> +0x6EBA # <CJK> +0x6EBB # <CJK> +0x6EBD # <CJK> +0x6EC1 # <CJK> +0x6EC2 # <CJK> +0x6EC7 # <CJK> +0x6ECB # <CJK> +0x6ECF # <CJK> +0x6ED1 # <CJK> +0x6ED3 # <CJK> +0x6ED4 # <CJK> +0x6ED5 # <CJK> +0x6ED7 # <CJK> +0x6EDA # <CJK> +0x6EDE # <CJK> +0x6EDF # <CJK> +0x6EE0 # <CJK> +0x6EE1 # <CJK> +0x6EE2 # <CJK> +0x6EE4 # <CJK> +0x6EE5 # <CJK> +0x6EE6 # <CJK> +0x6EE8 # <CJK> +0x6EE9 # <CJK> +0x6EF4 # <CJK> +0x6EF9 # <CJK> +0x6F02 # <CJK> +0x6F06 # <CJK> +0x6F09 # <CJK> +0x6F0F # <CJK> +0x6F13 # <CJK> +0x6F14 # <CJK> +0x6F15 # <CJK> +0x6F20 # <CJK> +0x6F24 # <CJK> +0x6F29 # <CJK> +0x6F2A # <CJK> +0x6F2B # <CJK> +0x6F2D # <CJK> +0x6F2F # <CJK> +0x6F31 # <CJK> +0x6F33 # <CJK> +0x6F36 # <CJK> +0x6F3E # <CJK> +0x6F46 # <CJK> +0x6F47 # <CJK> +0x6F4B # <CJK> +0x6F4D # <CJK> +0x6F58 # <CJK> +0x6F5C # <CJK> +0x6F5E # <CJK> +0x6F62 # <CJK> +0x6F66 # <CJK> +0x6F6D # <CJK> +0x6F6E # <CJK> +0x6F72 # <CJK> +0x6F74 # <CJK> +0x6F78 # <CJK> +0x6F7A # <CJK> +0x6F7C # <CJK> +0x6F84 # <CJK> +0x6F88 # <CJK> +0x6F89 # <CJK> +0x6F8C # <CJK> +0x6F8D # <CJK> +0x6F8E # <CJK> +0x6F9C # <CJK> +0x6FA1 # <CJK> +0x6FA7 # <CJK> +0x6FB3 # <CJK> +0x6FB6 # <CJK> +0x6FB9 # <CJK> +0x6FC0 # <CJK> +0x6FC2 # <CJK> +0x6FC9 # <CJK> +0x6FD1 # <CJK> +0x6FD2 # <CJK> +0x6FDE # <CJK> +0x6FE0 # <CJK> +0x6FE1 # <CJK> +0x6FEE # <CJK> +0x6FEF # <CJK> +0x7011 # <CJK> +0x701A # <CJK> +0x701B # <CJK> +0x7023 # <CJK> +0x7035 # <CJK> +0x7039 # <CJK> +0x704C # <CJK> +0x704F # <CJK> +0x705E # <CJK> +0x706B # <CJK> +0x706C # <CJK> +0x706D # <CJK> +0x706F # <CJK> +0x7070 # <CJK> +0x7075 # <CJK> +0x7076 # <CJK> +0x7078 # <CJK> +0x707C # <CJK> +0x707E # <CJK> +0x707F # <CJK> +0x7080 # <CJK> +0x7085 # <CJK> +0x7089 # <CJK> +0x708A # <CJK> +0x708E # <CJK> +0x7092 # <CJK> +0x7094 # <CJK> +0x7095 # <CJK> +0x7096 # <CJK> +0x7099 # <CJK> +0x709C # <CJK> +0x709D # <CJK> +0x70AB # <CJK> +0x70AC # <CJK> +0x70AD # <CJK> +0x70AE # <CJK> +0x70AF # <CJK> +0x70B1 # <CJK> +0x70B3 # <CJK> +0x70B7 # <CJK> +0x70B8 # <CJK> +0x70B9 # <CJK> +0x70BB # <CJK> +0x70BC # <CJK> +0x70BD # <CJK> +0x70C0 # <CJK> +0x70C1 # <CJK> +0x70C2 # <CJK> +0x70C3 # <CJK> +0x70C8 # <CJK> +0x70CA # <CJK> +0x70D8 # <CJK> +0x70D9 # <CJK> +0x70DB # <CJK> +0x70DF # <CJK> +0x70E4 # <CJK> +0x70E6 # <CJK> +0x70E7 # <CJK> +0x70E8 # <CJK> +0x70E9 # <CJK> +0x70EB # <CJK> +0x70EC # <CJK> +0x70ED # <CJK> +0x70EF # <CJK> +0x70F7 # <CJK> +0x70F9 # <CJK> +0x70FD # <CJK> +0x7109 # <CJK> +0x710A # <CJK> +0x7110 # <CJK> +0x7113 # <CJK> +0x7115 # <CJK> +0x7116 # <CJK> +0x7118 # <CJK> +0x7119 # <CJK> +0x711A # <CJK> +0x7126 # <CJK> +0x712F # <CJK> +0x7130 # <CJK> +0x7131 # <CJK> +0x7136 # <CJK> +0x7145 # <CJK> +0x714A # <CJK> +0x714C # <CJK> +0x714E # <CJK> +0x715C # <CJK> +0x715E # <CJK> +0x7164 # <CJK> +0x7166 # <CJK> +0x7167 # <CJK> +0x7168 # <CJK> +0x716E # <CJK> +0x7172 # <CJK> +0x7173 # <CJK> +0x7178 # <CJK> +0x717A # <CJK> +0x717D # <CJK> +0x7184 # <CJK> +0x718A # <CJK> +0x718F # <CJK> +0x7194 # <CJK> +0x7198 # <CJK> +0x7199 # <CJK> +0x719F # <CJK> +0x71A0 # <CJK> +0x71A8 # <CJK> +0x71AC # <CJK> +0x71B3 # <CJK> +0x71B5 # <CJK> +0x71B9 # <CJK> +0x71C3 # <CJK> +0x71CE # <CJK> +0x71D4 # <CJK> +0x71D5 # <CJK> +0x71E0 # <CJK> +0x71E5 # <CJK> +0x71E7 # <CJK> +0x71EE # <CJK> +0x71F9 # <CJK> +0x7206 # <CJK> +0x721D # <CJK> +0x7228 # <CJK> +0x722A # <CJK> +0x722C # <CJK> +0x7230 # <CJK> +0x7231 # <CJK> +0x7235 # <CJK> +0x7236 # <CJK> +0x7237 # <CJK> +0x7238 # <CJK> +0x7239 # <CJK> +0x723B # <CJK> +0x723D # <CJK> +0x723F # <CJK> +0x7247 # <CJK> +0x7248 # <CJK> +0x724C # <CJK> +0x724D # <CJK> +0x7252 # <CJK> +0x7256 # <CJK> +0x7259 # <CJK> +0x725B # <CJK> +0x725D # <CJK> +0x725F # <CJK> +0x7261 # <CJK> +0x7262 # <CJK> +0x7266 # <CJK> +0x7267 # <CJK> +0x7269 # <CJK> +0x726E # <CJK> +0x726F # <CJK> +0x7272 # <CJK> +0x7275 # <CJK> +0x7279 # <CJK> +0x727A # <CJK> +0x727E # <CJK> +0x727F # <CJK> +0x7280 # <CJK> +0x7281 # <CJK> +0x7284 # <CJK> +0x728A # <CJK> +0x728B # <CJK> +0x728D # <CJK> +0x728F # <CJK> +0x7292 # <CJK> +0x729F # <CJK> +0x72AC # <CJK> +0x72AD # <CJK> +0x72AF # <CJK> +0x72B0 # <CJK> +0x72B4 # <CJK> +0x72B6 # <CJK> +0x72B7 # <CJK> +0x72B8 # <CJK> +0x72B9 # <CJK> +0x72C1 # <CJK> +0x72C2 # <CJK> +0x72C3 # <CJK> +0x72C4 # <CJK> +0x72C8 # <CJK> +0x72CD # <CJK> +0x72CE # <CJK> +0x72D0 # <CJK> +0x72D2 # <CJK> +0x72D7 # <CJK> +0x72D9 # <CJK> +0x72DE # <CJK> +0x72E0 # <CJK> +0x72E1 # <CJK> +0x72E8 # <CJK> +0x72E9 # <CJK> +0x72EC # <CJK> +0x72ED # <CJK> +0x72EE # <CJK> +0x72EF # <CJK> +0x72F0 # <CJK> +0x72F1 # <CJK> +0x72F2 # <CJK> +0x72F3 # <CJK> +0x72F4 # <CJK> +0x72F7 # <CJK> +0x72F8 # <CJK> +0x72FA # <CJK> +0x72FB # <CJK> +0x72FC # <CJK> +0x7301 # <CJK> +0x7303 # <CJK> +0x730A # <CJK> +0x730E # <CJK> +0x7313 # <CJK> +0x7315 # <CJK> +0x7316 # <CJK> +0x7317 # <CJK> +0x731B # <CJK> +0x731C # <CJK> +0x731D # <CJK> +0x731E # <CJK> +0x7321 # <CJK> +0x7322 # <CJK> +0x7325 # <CJK> +0x7329 # <CJK> +0x732A # <CJK> +0x732B # <CJK> +0x732C # <CJK> +0x732E # <CJK> +0x7331 # <CJK> +0x7334 # <CJK> +0x7337 # <CJK> +0x7338 # <CJK> +0x7339 # <CJK> +0x733E # <CJK> +0x733F # <CJK> +0x734D # <CJK> +0x7350 # <CJK> +0x7352 # <CJK> +0x7357 # <CJK> +0x7360 # <CJK> +0x736C # <CJK> +0x736D # <CJK> +0x736F # <CJK> +0x737E # <CJK> +0x7384 # <CJK> +0x7387 # <CJK> +0x7389 # <CJK> +0x738B # <CJK> +0x738E # <CJK> +0x7391 # <CJK> +0x7396 # <CJK> +0x739B # <CJK> +0x739F # <CJK> +0x73A2 # <CJK> +0x73A9 # <CJK> +0x73AB # <CJK> +0x73AE # <CJK> +0x73AF # <CJK> +0x73B0 # <CJK> +0x73B2 # <CJK> +0x73B3 # <CJK> +0x73B7 # <CJK> +0x73BA # <CJK> +0x73BB # <CJK> +0x73C0 # <CJK> +0x73C2 # <CJK> +0x73C8 # <CJK> +0x73C9 # <CJK> +0x73CA # <CJK> +0x73CD # <CJK> +0x73CF # <CJK> +0x73D0 # <CJK> +0x73D1 # <CJK> +0x73D9 # <CJK> +0x73DE # <CJK> +0x73E0 # <CJK> +0x73E5 # <CJK> +0x73E7 # <CJK> +0x73E9 # <CJK> +0x73ED # <CJK> +0x73F2 # <CJK> +0x7403 # <CJK> +0x7405 # <CJK> +0x7406 # <CJK> +0x7409 # <CJK> +0x740A # <CJK> +0x740F # <CJK> +0x7410 # <CJK> +0x741A # <CJK> +0x741B # <CJK> +0x7422 # <CJK> +0x7425 # <CJK> +0x7426 # <CJK> +0x7428 # <CJK> +0x742A # <CJK> +0x742C # <CJK> +0x742E # <CJK> +0x7430 # <CJK> +0x7433 # <CJK> +0x7434 # <CJK> +0x7435 # <CJK> +0x7436 # <CJK> +0x743C # <CJK> +0x7441 # <CJK> +0x7455 # <CJK> +0x7457 # <CJK> +0x7459 # <CJK> +0x745A # <CJK> +0x745B # <CJK> +0x745C # <CJK> +0x745E # <CJK> +0x745F # <CJK> +0x746D # <CJK> +0x7470 # <CJK> +0x7476 # <CJK> +0x7477 # <CJK> +0x747E # <CJK> +0x7480 # <CJK> +0x7481 # <CJK> +0x7483 # <CJK> +0x7487 # <CJK> +0x748B # <CJK> +0x748E # <CJK> +0x7490 # <CJK> +0x749C # <CJK> +0x749E # <CJK> +0x74A7 # <CJK> +0x74A8 # <CJK> +0x74A9 # <CJK> +0x74BA # <CJK> +0x74D2 # <CJK> +0x74DC # <CJK> +0x74DE # <CJK> +0x74E0 # <CJK> +0x74E2 # <CJK> +0x74E3 # <CJK> +0x74E4 # <CJK> +0x74E6 # <CJK> +0x74EE # <CJK> +0x74EF # <CJK> +0x74F4 # <CJK> +0x74F6 # <CJK> +0x74F7 # <CJK> +0x74FF # <CJK> +0x7504 # <CJK> +0x750D # <CJK> +0x750F # <CJK> +0x7511 # <CJK> +0x7513 # <CJK> +0x7518 # <CJK> +0x7519 # <CJK> +0x751A # <CJK> +0x751C # <CJK> +0x751F # <CJK> +0x7525 # <CJK> +0x7528 # <CJK> +0x7529 # <CJK> +0x752B # <CJK> +0x752C # <CJK> +0x752D # <CJK> +0x752F # <CJK> +0x7530 # <CJK> +0x7531 # <CJK> +0x7532 # <CJK> +0x7533 # <CJK> +0x7535 # <CJK> +0x7537 # <CJK> +0x7538 # <CJK> +0x753A # <CJK> +0x753B # <CJK> +0x753E # <CJK> +0x7540 # <CJK> +0x7545 # <CJK> +0x7548 # <CJK> +0x754B # <CJK> +0x754C # <CJK> +0x754E # <CJK> +0x754F # <CJK> +0x7554 # <CJK> +0x7559 # <CJK> +0x755A # <CJK> +0x755B # <CJK> +0x755C # <CJK> +0x7565 # <CJK> +0x7566 # <CJK> +0x756A # <CJK> +0x7572 # <CJK> +0x7574 # <CJK> +0x7578 # <CJK> +0x7579 # <CJK> +0x757F # <CJK> +0x7583 # <CJK> +0x7586 # <CJK> +0x758B # <CJK> +0x758F # <CJK> +0x7591 # <CJK> +0x7592 # <CJK> +0x7594 # <CJK> +0x7596 # <CJK> +0x7597 # <CJK> +0x7599 # <CJK> +0x759A # <CJK> +0x759D # <CJK> +0x759F # <CJK> +0x75A0 # <CJK> +0x75A1 # <CJK> +0x75A3 # <CJK> +0x75A4 # <CJK> +0x75A5 # <CJK> +0x75AB # <CJK> +0x75AC # <CJK> +0x75AE # <CJK> +0x75AF # <CJK> +0x75B0 # <CJK> +0x75B1 # <CJK> +0x75B2 # <CJK> +0x75B3 # <CJK> +0x75B4 # <CJK> +0x75B5 # <CJK> +0x75B8 # <CJK> +0x75B9 # <CJK> +0x75BC # <CJK> +0x75BD # <CJK> +0x75BE # <CJK> +0x75C2 # <CJK> +0x75C3 # <CJK> +0x75C4 # <CJK> +0x75C5 # <CJK> +0x75C7 # <CJK> +0x75C8 # <CJK> +0x75C9 # <CJK> +0x75CA # <CJK> +0x75CD # <CJK> +0x75D2 # <CJK> +0x75D4 # <CJK> +0x75D5 # <CJK> +0x75D6 # <CJK> +0x75D8 # <CJK> +0x75DB # <CJK> +0x75DE # <CJK> +0x75E2 # <CJK> +0x75E3 # <CJK> +0x75E4 # <CJK> +0x75E6 # <CJK> +0x75E7 # <CJK> +0x75E8 # <CJK> +0x75EA # <CJK> +0x75EB # <CJK> +0x75F0 # <CJK> +0x75F1 # <CJK> +0x75F4 # <CJK> +0x75F9 # <CJK> +0x75FC # <CJK> +0x75FF # <CJK> +0x7600 # <CJK> +0x7601 # <CJK> +0x7603 # <CJK> +0x7605 # <CJK> +0x760A # <CJK> +0x760C # <CJK> +0x7610 # <CJK> +0x7615 # <CJK> +0x7617 # <CJK> +0x7618 # <CJK> +0x7619 # <CJK> +0x761B # <CJK> +0x761F # <CJK> +0x7620 # <CJK> +0x7622 # <CJK> +0x7624 # <CJK> +0x7625 # <CJK> +0x7626 # <CJK> +0x7629 # <CJK> +0x762A # <CJK> +0x762B # <CJK> +0x762D # <CJK> +0x7630 # <CJK> +0x7633 # <CJK> +0x7634 # <CJK> +0x7635 # <CJK> +0x7638 # <CJK> +0x763C # <CJK> +0x763E # <CJK> +0x763F # <CJK> +0x7640 # <CJK> +0x7643 # <CJK> +0x764C # <CJK> +0x764D # <CJK> +0x7654 # <CJK> +0x7656 # <CJK> +0x765C # <CJK> +0x765E # <CJK> +0x7663 # <CJK> +0x766B # <CJK> +0x766F # <CJK> +0x7678 # <CJK> +0x767B # <CJK> +0x767D # <CJK> +0x767E # <CJK> +0x7682 # <CJK> +0x7684 # <CJK> +0x7686 # <CJK> +0x7687 # <CJK> +0x7688 # <CJK> +0x768B # <CJK> +0x768E # <CJK> +0x7691 # <CJK> +0x7693 # <CJK> +0x7696 # <CJK> +0x7699 # <CJK> +0x76A4 # <CJK> +0x76AE # <CJK> +0x76B1 # <CJK> +0x76B2 # <CJK> +0x76B4 # <CJK> +0x76BF # <CJK> +0x76C2 # <CJK> +0x76C5 # <CJK> +0x76C6 # <CJK> +0x76C8 # <CJK> +0x76CA # <CJK> +0x76CD # <CJK> +0x76CE # <CJK> +0x76CF # <CJK> +0x76D0 # <CJK> +0x76D1 # <CJK> +0x76D2 # <CJK> +0x76D4 # <CJK> +0x76D6 # <CJK> +0x76D7 # <CJK> +0x76D8 # <CJK> +0x76DB # <CJK> +0x76DF # <CJK> +0x76E5 # <CJK> +0x76EE # <CJK> +0x76EF # <CJK> +0x76F1 # <CJK> +0x76F2 # <CJK> +0x76F4 # <CJK> +0x76F8 # <CJK> +0x76F9 # <CJK> +0x76FC # <CJK> +0x76FE # <CJK> +0x7701 # <CJK> +0x7704 # <CJK> +0x7707 # <CJK> +0x7708 # <CJK> +0x7709 # <CJK> +0x770B # <CJK> +0x770D # <CJK> +0x7719 # <CJK> +0x771A # <CJK> +0x771F # <CJK> +0x7720 # <CJK> +0x7722 # <CJK> +0x7726 # <CJK> +0x7728 # <CJK> +0x7729 # <CJK> +0x772D # <CJK> +0x772F # <CJK> +0x7735 # <CJK> +0x7736 # <CJK> +0x7737 # <CJK> +0x7738 # <CJK> +0x773A # <CJK> +0x773C # <CJK> +0x7740 # <CJK> +0x7741 # <CJK> +0x7743 # <CJK> +0x7747 # <CJK> +0x7750 # <CJK> +0x7751 # <CJK> +0x775A # <CJK> +0x775B # <CJK> +0x7761 # <CJK> +0x7762 # <CJK> +0x7763 # <CJK> +0x7765 # <CJK> +0x7766 # <CJK> +0x7768 # <CJK> +0x776B # <CJK> +0x776C # <CJK> +0x7779 # <CJK> +0x777D # <CJK> +0x777E # <CJK> +0x777F # <CJK> +0x7780 # <CJK> +0x7784 # <CJK> +0x7785 # <CJK> +0x778C # <CJK> +0x778D # <CJK> +0x778E # <CJK> +0x7791 # <CJK> +0x7792 # <CJK> +0x779F # <CJK> +0x77A0 # <CJK> +0x77A2 # <CJK> +0x77A5 # <CJK> +0x77A7 # <CJK> +0x77A9 # <CJK> +0x77AA # <CJK> +0x77AC # <CJK> +0x77B0 # <CJK> +0x77B3 # <CJK> +0x77B5 # <CJK> +0x77BB # <CJK> +0x77BD # <CJK> +0x77BF # <CJK> +0x77CD # <CJK> +0x77D7 # <CJK> +0x77DB # <CJK> +0x77DC # <CJK> +0x77E2 # <CJK> +0x77E3 # <CJK> +0x77E5 # <CJK> +0x77E7 # <CJK> +0x77E9 # <CJK> +0x77EB # <CJK> +0x77EC # <CJK> +0x77ED # <CJK> +0x77EE # <CJK> +0x77F3 # <CJK> +0x77F6 # <CJK> +0x77F8 # <CJK> +0x77FD # <CJK> +0x77FE # <CJK> +0x77FF # <CJK> +0x7800 # <CJK> +0x7801 # <CJK> +0x7802 # <CJK> +0x7809 # <CJK> +0x780C # <CJK> +0x780D # <CJK> +0x7811 # <CJK> +0x7812 # <CJK> +0x7814 # <CJK> +0x7816 # <CJK> +0x7817 # <CJK> +0x7818 # <CJK> +0x781A # <CJK> +0x781C # <CJK> +0x781D # <CJK> +0x781F # <CJK> +0x7823 # <CJK> +0x7825 # <CJK> +0x7826 # <CJK> +0x7827 # <CJK> +0x7829 # <CJK> +0x782C # <CJK> +0x782D # <CJK> +0x7830 # <CJK> +0x7834 # <CJK> +0x7837 # <CJK> +0x7838 # <CJK> +0x7839 # <CJK> +0x783A # <CJK> +0x783B # <CJK> +0x783C # <CJK> +0x783E # <CJK> +0x7840 # <CJK> +0x7845 # <CJK> +0x7847 # <CJK> +0x784C # <CJK> +0x784E # <CJK> +0x7850 # <CJK> +0x7852 # <CJK> +0x7855 # <CJK> +0x7856 # <CJK> +0x7857 # <CJK> +0x785D # <CJK> +0x786A # <CJK> +0x786B # <CJK> +0x786C # <CJK> +0x786D # <CJK> +0x786E # <CJK> +0x7877 # <CJK> +0x787C # <CJK> +0x7887 # <CJK> +0x7889 # <CJK> +0x788C # <CJK> +0x788D # <CJK> +0x788E # <CJK> +0x7891 # <CJK> +0x7893 # <CJK> +0x7897 # <CJK> +0x7898 # <CJK> +0x789A # <CJK> +0x789B # <CJK> +0x789C # <CJK> +0x789F # <CJK> +0x78A1 # <CJK> +0x78A3 # <CJK> +0x78A5 # <CJK> +0x78A7 # <CJK> +0x78B0 # <CJK> +0x78B1 # <CJK> +0x78B2 # <CJK> +0x78B3 # <CJK> +0x78B4 # <CJK> +0x78B9 # <CJK> +0x78BE # <CJK> +0x78C1 # <CJK> +0x78C5 # <CJK> +0x78C9 # <CJK> +0x78CA # <CJK> +0x78CB # <CJK> +0x78D0 # <CJK> +0x78D4 # <CJK> +0x78D5 # <CJK> +0x78D9 # <CJK> +0x78E8 # <CJK> +0x78EC # <CJK> +0x78F2 # <CJK> +0x78F4 # <CJK> +0x78F7 # <CJK> +0x78FA # <CJK> +0x7901 # <CJK> +0x7905 # <CJK> +0x7913 # <CJK> +0x791E # <CJK> +0x7924 # <CJK> +0x7934 # <CJK> +0x793A # <CJK> +0x793B # <CJK> +0x793C # <CJK> +0x793E # <CJK> +0x7940 # <CJK> +0x7941 # <CJK> +0x7946 # <CJK> +0x7948 # <CJK> +0x7949 # <CJK> +0x7953 # <CJK> +0x7956 # <CJK> +0x7957 # <CJK> +0x795A # <CJK> +0x795B # <CJK> +0x795C # <CJK> +0x795D # <CJK> +0x795E # <CJK> +0x795F # <CJK> +0x7960 # <CJK> +0x7962 # <CJK> +0x7965 # <CJK> +0x7967 # <CJK> +0x7968 # <CJK> +0x796D # <CJK> +0x796F # <CJK> +0x7977 # <CJK> +0x7978 # <CJK> +0x797A # <CJK> +0x7980 # <CJK> +0x7981 # <CJK> +0x7984 # <CJK> +0x7985 # <CJK> +0x798A # <CJK> +0x798F # <CJK> +0x799A # <CJK> +0x79A7 # <CJK> +0x79B3 # <CJK> +0x79B9 # <CJK> +0x79BA # <CJK> +0x79BB # <CJK> +0x79BD # <CJK> +0x79BE # <CJK> +0x79C0 # <CJK> +0x79C1 # <CJK> +0x79C3 # <CJK> +0x79C6 # <CJK> +0x79C9 # <CJK> +0x79CB # <CJK> +0x79CD # <CJK> +0x79D1 # <CJK> +0x79D2 # <CJK> +0x79D5 # <CJK> +0x79D8 # <CJK> +0x79DF # <CJK> +0x79E3 # <CJK> +0x79E4 # <CJK> +0x79E6 # <CJK> +0x79E7 # <CJK> +0x79E9 # <CJK> +0x79EB # <CJK> +0x79ED # <CJK> +0x79EF # <CJK> +0x79F0 # <CJK> +0x79F8 # <CJK> +0x79FB # <CJK> +0x79FD # <CJK> +0x7A00 # <CJK> +0x7A02 # <CJK> +0x7A03 # <CJK> +0x7A06 # <CJK> +0x7A0B # <CJK> +0x7A0D # <CJK> +0x7A0E # <CJK> +0x7A14 # <CJK> +0x7A17 # <CJK> +0x7A1A # <CJK> +0x7A1E # <CJK> +0x7A20 # <CJK> +0x7A23 # <CJK> +0x7A33 # <CJK> +0x7A37 # <CJK> +0x7A39 # <CJK> +0x7A3B # <CJK> +0x7A3C # <CJK> +0x7A3D # <CJK> +0x7A3F # <CJK> +0x7A46 # <CJK> +0x7A51 # <CJK> +0x7A57 # <CJK> +0x7A70 # <CJK> +0x7A74 # <CJK> +0x7A76 # <CJK> +0x7A77 # <CJK> +0x7A78 # <CJK> +0x7A79 # <CJK> +0x7A7A # <CJK> +0x7A7F # <CJK> +0x7A80 # <CJK> +0x7A81 # <CJK> +0x7A83 # <CJK> +0x7A84 # <CJK> +0x7A86 # <CJK> +0x7A88 # <CJK> +0x7A8D # <CJK> +0x7A91 # <CJK> +0x7A92 # <CJK> +0x7A95 # <CJK> +0x7A96 # <CJK> +0x7A97 # <CJK> +0x7A98 # <CJK> +0x7A9C # <CJK> +0x7A9D # <CJK> +0x7A9F # <CJK> +0x7AA0 # <CJK> +0x7AA5 # <CJK> +0x7AA6 # <CJK> +0x7AA8 # <CJK> +0x7AAC # <CJK> +0x7AAD # <CJK> +0x7AB3 # <CJK> +0x7ABF # <CJK> +0x7ACB # <CJK> +0x7AD6 # <CJK> +0x7AD9 # <CJK> +0x7ADE # <CJK> +0x7ADF # <CJK> +0x7AE0 # <CJK> +0x7AE3 # <CJK> +0x7AE5 # <CJK> +0x7AE6 # <CJK> +0x7AED # <CJK> +0x7AEF # <CJK> +0x7AF9 # <CJK> +0x7AFA # <CJK> +0x7AFD # <CJK> +0x7AFF # <CJK> +0x7B03 # <CJK> +0x7B04 # <CJK> +0x7B06 # <CJK> +0x7B08 # <CJK> +0x7B0A # <CJK> +0x7B0B # <CJK> +0x7B0F # <CJK> +0x7B11 # <CJK> +0x7B14 # <CJK> +0x7B15 # <CJK> +0x7B19 # <CJK> +0x7B1B # <CJK> +0x7B1E # <CJK> +0x7B20 # <CJK> +0x7B24 # <CJK> +0x7B25 # <CJK> +0x7B26 # <CJK> +0x7B28 # <CJK> +0x7B2A # <CJK> +0x7B2B # <CJK> +0x7B2C # <CJK> +0x7B2E # <CJK> +0x7B31 # <CJK> +0x7B33 # <CJK> +0x7B38 # <CJK> +0x7B3A # <CJK> +0x7B3C # <CJK> +0x7B3E # <CJK> +0x7B45 # <CJK> +0x7B47 # <CJK> +0x7B49 # <CJK> +0x7B4B # <CJK> +0x7B4C # <CJK> +0x7B4F # <CJK> +0x7B50 # <CJK> +0x7B51 # <CJK> +0x7B52 # <CJK> +0x7B54 # <CJK> +0x7B56 # <CJK> +0x7B58 # <CJK> +0x7B5A # <CJK> +0x7B5B # <CJK> +0x7B5D # <CJK> +0x7B60 # <CJK> +0x7B62 # <CJK> +0x7B6E # <CJK> +0x7B71 # <CJK> +0x7B72 # <CJK> +0x7B75 # <CJK> +0x7B77 # <CJK> +0x7B79 # <CJK> +0x7B7B # <CJK> +0x7B7E # <CJK> +0x7B80 # <CJK> +0x7B85 # <CJK> +0x7B8D # <CJK> +0x7B90 # <CJK> +0x7B94 # <CJK> +0x7B95 # <CJK> +0x7B97 # <CJK> +0x7B9C # <CJK> +0x7B9D # <CJK> +0x7BA1 # <CJK> +0x7BA2 # <CJK> +0x7BA6 # <CJK> +0x7BA7 # <CJK> +0x7BA8 # <CJK> +0x7BA9 # <CJK> +0x7BAA # <CJK> +0x7BAB # <CJK> +0x7BAC # <CJK> +0x7BAD # <CJK> +0x7BB1 # <CJK> +0x7BB4 # <CJK> +0x7BB8 # <CJK> +0x7BC1 # <CJK> +0x7BC6 # <CJK> +0x7BC7 # <CJK> +0x7BCC # <CJK> +0x7BD1 # <CJK> +0x7BD3 # <CJK> +0x7BD9 # <CJK> +0x7BDA # <CJK> +0x7BDD # <CJK> +0x7BE1 # <CJK> +0x7BE5 # <CJK> +0x7BE6 # <CJK> +0x7BEA # <CJK> +0x7BEE # <CJK> +0x7BF1 # <CJK> +0x7BF7 # <CJK> +0x7BFC # <CJK> +0x7BFE # <CJK> +0x7C07 # <CJK> +0x7C0B # <CJK> +0x7C0C # <CJK> +0x7C0F # <CJK> +0x7C16 # <CJK> +0x7C1F # <CJK> +0x7C26 # <CJK> +0x7C27 # <CJK> +0x7C2A # <CJK> +0x7C38 # <CJK> +0x7C3F # <CJK> +0x7C40 # <CJK> +0x7C41 # <CJK> +0x7C4D # <CJK> +0x7C73 # <CJK> +0x7C74 # <CJK> +0x7C7B # <CJK> +0x7C7C # <CJK> +0x7C7D # <CJK> +0x7C89 # <CJK> +0x7C91 # <CJK> +0x7C92 # <CJK> +0x7C95 # <CJK> +0x7C97 # <CJK> +0x7C98 # <CJK> +0x7C9C # <CJK> +0x7C9D # <CJK> +0x7C9E # <CJK> +0x7C9F # <CJK> +0x7CA2 # <CJK> +0x7CA4 # <CJK> +0x7CA5 # <CJK> +0x7CAA # <CJK> +0x7CAE # <CJK> +0x7CB1 # <CJK> +0x7CB2 # <CJK> +0x7CB3 # <CJK> +0x7CB9 # <CJK> +0x7CBC # <CJK> +0x7CBD # <CJK> +0x7CBE # <CJK> +0x7CC1 # <CJK> +0x7CC5 # <CJK> +0x7CC7 # <CJK> +0x7CC8 # <CJK> +0x7CCA # <CJK> +0x7CCC # <CJK> +0x7CCD # <CJK> +0x7CD5 # <CJK> +0x7CD6 # <CJK> +0x7CD7 # <CJK> +0x7CD9 # <CJK> +0x7CDC # <CJK> +0x7CDF # <CJK> +0x7CE0 # <CJK> +0x7CE8 # <CJK> +0x7CEF # <CJK> +0x7CF8 # <CJK> +0x7CFB # <CJK> +0x7D0A # <CJK> +0x7D20 # <CJK> +0x7D22 # <CJK> +0x7D27 # <CJK> +0x7D2B # <CJK> +0x7D2F # <CJK> +0x7D6E # <CJK> +0x7D77 # <CJK> +0x7DA6 # <CJK> +0x7DAE # <CJK> +0x7E3B # <CJK> +0x7E41 # <CJK> +0x7E47 # <CJK> +0x7E82 # <CJK> +0x7E9B # <CJK> +0x7E9F # <CJK> +0x7EA0 # <CJK> +0x7EA1 # <CJK> +0x7EA2 # <CJK> +0x7EA3 # <CJK> +0x7EA4 # <CJK> +0x7EA5 # <CJK> +0x7EA6 # <CJK> +0x7EA7 # <CJK> +0x7EA8 # <CJK> +0x7EA9 # <CJK> +0x7EAA # <CJK> +0x7EAB # <CJK> +0x7EAC # <CJK> +0x7EAD # <CJK> +0x7EAF # <CJK> +0x7EB0 # <CJK> +0x7EB1 # <CJK> +0x7EB2 # <CJK> +0x7EB3 # <CJK> +0x7EB5 # <CJK> +0x7EB6 # <CJK> +0x7EB7 # <CJK> +0x7EB8 # <CJK> +0x7EB9 # <CJK> +0x7EBA # <CJK> +0x7EBD # <CJK> +0x7EBE # <CJK> +0x7EBF # <CJK> +0x7EC0 # <CJK> +0x7EC1 # <CJK> +0x7EC2 # <CJK> +0x7EC3 # <CJK> +0x7EC4 # <CJK> +0x7EC5 # <CJK> +0x7EC6 # <CJK> +0x7EC7 # <CJK> +0x7EC8 # <CJK> +0x7EC9 # <CJK> +0x7ECA # <CJK> +0x7ECB # <CJK> +0x7ECC # <CJK> +0x7ECD # <CJK> +0x7ECE # <CJK> +0x7ECF # <CJK> +0x7ED0 # <CJK> +0x7ED1 # <CJK> +0x7ED2 # <CJK> +0x7ED3 # <CJK> +0x7ED4 # <CJK> +0x7ED5 # <CJK> +0x7ED7 # <CJK> +0x7ED8 # <CJK> +0x7ED9 # <CJK> +0x7EDA # <CJK> +0x7EDB # <CJK> +0x7EDC # <CJK> +0x7EDD # <CJK> +0x7EDE # <CJK> +0x7EDF # <CJK> +0x7EE0 # <CJK> +0x7EE1 # <CJK> +0x7EE2 # <CJK> +0x7EE3 # <CJK> +0x7EE5 # <CJK> +0x7EE6 # <CJK> +0x7EE7 # <CJK> +0x7EE8 # <CJK> +0x7EE9 # <CJK> +0x7EEA # <CJK> +0x7EEB # <CJK> +0x7EED # <CJK> +0x7EEE # <CJK> +0x7EEF # <CJK> +0x7EF0 # <CJK> +0x7EF1 # <CJK> +0x7EF2 # <CJK> +0x7EF3 # <CJK> +0x7EF4 # <CJK> +0x7EF5 # <CJK> +0x7EF6 # <CJK> +0x7EF7 # <CJK> +0x7EF8 # <CJK> +0x7EFA # <CJK> +0x7EFB # <CJK> +0x7EFC # <CJK> +0x7EFD # <CJK> +0x7EFE # <CJK> +0x7EFF # <CJK> +0x7F00 # <CJK> +0x7F01 # <CJK> +0x7F02 # <CJK> +0x7F03 # <CJK> +0x7F04 # <CJK> +0x7F05 # <CJK> +0x7F06 # <CJK> +0x7F07 # <CJK> +0x7F08 # <CJK> +0x7F09 # <CJK> +0x7F0B # <CJK> +0x7F0C # <CJK> +0x7F0D # <CJK> +0x7F0E # <CJK> +0x7F0F # <CJK> +0x7F11 # <CJK> +0x7F12 # <CJK> +0x7F13 # <CJK> +0x7F14 # <CJK> +0x7F15 # <CJK> +0x7F16 # <CJK> +0x7F17 # <CJK> +0x7F18 # <CJK> +0x7F19 # <CJK> +0x7F1A # <CJK> +0x7F1B # <CJK> +0x7F1C # <CJK> +0x7F1D # <CJK> +0x7F1F # <CJK> +0x7F20 # <CJK> +0x7F21 # <CJK> +0x7F22 # <CJK> +0x7F23 # <CJK> +0x7F24 # <CJK> +0x7F25 # <CJK> +0x7F26 # <CJK> +0x7F27 # <CJK> +0x7F28 # <CJK> +0x7F29 # <CJK> +0x7F2A # <CJK> +0x7F2B # <CJK> +0x7F2C # <CJK> +0x7F2D # <CJK> +0x7F2E # <CJK> +0x7F2F # <CJK> +0x7F30 # <CJK> +0x7F31 # <CJK> +0x7F32 # <CJK> +0x7F33 # <CJK> +0x7F34 # <CJK> +0x7F35 # <CJK> +0x7F36 # <CJK> +0x7F38 # <CJK> +0x7F3A # <CJK> +0x7F42 # <CJK> +0x7F44 # <CJK> +0x7F45 # <CJK> +0x7F50 # <CJK> +0x7F51 # <CJK> +0x7F54 # <CJK> +0x7F55 # <CJK> +0x7F57 # <CJK> +0x7F58 # <CJK> +0x7F5A # <CJK> +0x7F5F # <CJK> +0x7F61 # <CJK> +0x7F62 # <CJK> +0x7F68 # <CJK> +0x7F69 # <CJK> +0x7F6A # <CJK> +0x7F6E # <CJK> +0x7F71 # <CJK> +0x7F72 # <CJK> +0x7F74 # <CJK> +0x7F79 # <CJK> +0x7F7E # <CJK> +0x7F81 # <CJK> +0x7F8A # <CJK> +0x7F8C # <CJK> +0x7F8E # <CJK> +0x7F94 # <CJK> +0x7F9A # <CJK> +0x7F9D # <CJK> +0x7F9E # <CJK> +0x7F9F # <CJK> +0x7FA1 # <CJK> +0x7FA4 # <CJK> +0x7FA7 # <CJK> +0x7FAF # <CJK> +0x7FB0 # <CJK> +0x7FB2 # <CJK> +0x7FB8 # <CJK> +0x7FB9 # <CJK> +0x7FBC # <CJK> +0x7FBD # <CJK> +0x7FBF # <CJK> +0x7FC1 # <CJK> +0x7FC5 # <CJK> +0x7FCA # <CJK> +0x7FCC # <CJK> +0x7FCE # <CJK> +0x7FD4 # <CJK> +0x7FD5 # <CJK> +0x7FD8 # <CJK> +0x7FDF # <CJK> +0x7FE0 # <CJK> +0x7FE1 # <CJK> +0x7FE5 # <CJK> +0x7FE6 # <CJK> +0x7FE9 # <CJK> +0x7FEE # <CJK> +0x7FF0 # <CJK> +0x7FF1 # <CJK> +0x7FF3 # <CJK> +0x7FFB # <CJK> +0x7FFC # <CJK> +0x8000 # <CJK> +0x8001 # <CJK> +0x8003 # <CJK> +0x8004 # <CJK> +0x8005 # <CJK> +0x8006 # <CJK> +0x800B # <CJK> +0x800C # <CJK> +0x800D # <CJK> +0x8010 # <CJK> +0x8012 # <CJK> +0x8014 # <CJK> +0x8015 # <CJK> +0x8016 # <CJK> +0x8017 # <CJK> +0x8018 # <CJK> +0x8019 # <CJK> +0x801C # <CJK> +0x8020 # <CJK> +0x8022 # <CJK> +0x8025 # <CJK> +0x8026 # <CJK> +0x8027 # <CJK> +0x8028 # <CJK> +0x8029 # <CJK> +0x802A # <CJK> +0x8031 # <CJK> +0x8033 # <CJK> +0x8035 # <CJK> +0x8036 # <CJK> +0x8037 # <CJK> +0x8038 # <CJK> +0x803B # <CJK> +0x803D # <CJK> +0x803F # <CJK> +0x8042 # <CJK> +0x8043 # <CJK> +0x8046 # <CJK> +0x804A # <CJK> +0x804B # <CJK> +0x804C # <CJK> +0x804D # <CJK> +0x8052 # <CJK> +0x8054 # <CJK> +0x8058 # <CJK> +0x805A # <CJK> +0x8069 # <CJK> +0x806A # <CJK> +0x8071 # <CJK> +0x807F # <CJK> +0x8080 # <CJK> +0x8083 # <CJK> +0x8084 # <CJK> +0x8086 # <CJK> +0x8087 # <CJK> +0x8089 # <CJK> +0x808B # <CJK> +0x808C # <CJK> +0x8093 # <CJK> +0x8096 # <CJK> +0x8098 # <CJK> +0x809A # <CJK> +0x809B # <CJK> +0x809C # <CJK> +0x809D # <CJK> +0x809F # <CJK> +0x80A0 # <CJK> +0x80A1 # <CJK> +0x80A2 # <CJK> +0x80A4 # <CJK> +0x80A5 # <CJK> +0x80A9 # <CJK> +0x80AA # <CJK> +0x80AB # <CJK> +0x80AD # <CJK> +0x80AE # <CJK> +0x80AF # <CJK> +0x80B1 # <CJK> +0x80B2 # <CJK> +0x80B4 # <CJK> +0x80B7 # <CJK> +0x80BA # <CJK> +0x80BC # <CJK> +0x80BD # <CJK> +0x80BE # <CJK> +0x80BF # <CJK> +0x80C0 # <CJK> +0x80C1 # <CJK> +0x80C2 # <CJK> +0x80C3 # <CJK> +0x80C4 # <CJK> +0x80C6 # <CJK> +0x80CC # <CJK> +0x80CD # <CJK> +0x80CE # <CJK> +0x80D6 # <CJK> +0x80D7 # <CJK> +0x80D9 # <CJK> +0x80DA # <CJK> +0x80DB # <CJK> +0x80DC # <CJK> +0x80DD # <CJK> +0x80DE # <CJK> +0x80E1 # <CJK> +0x80E4 # <CJK> +0x80E5 # <CJK> +0x80E7 # <CJK> +0x80E8 # <CJK> +0x80E9 # <CJK> +0x80EA # <CJK> +0x80EB # <CJK> +0x80EC # <CJK> +0x80ED # <CJK> +0x80EF # <CJK> +0x80F0 # <CJK> +0x80F1 # <CJK> +0x80F2 # <CJK> +0x80F3 # <CJK> +0x80F4 # <CJK> +0x80F6 # <CJK> +0x80F8 # <CJK> +0x80FA # <CJK> +0x80FC # <CJK> +0x80FD # <CJK> +0x8102 # <CJK> +0x8106 # <CJK> +0x8109 # <CJK> +0x810A # <CJK> +0x810D # <CJK> +0x810E # <CJK> +0x810F # <CJK> +0x8110 # <CJK> +0x8111 # <CJK> +0x8112 # <CJK> +0x8113 # <CJK> +0x8114 # <CJK> +0x8116 # <CJK> +0x8118 # <CJK> +0x811A # <CJK> +0x811E # <CJK> +0x812C # <CJK> +0x812F # <CJK> +0x8131 # <CJK> +0x8132 # <CJK> +0x8136 # <CJK> +0x8138 # <CJK> +0x813E # <CJK> +0x8146 # <CJK> +0x8148 # <CJK> +0x814A # <CJK> +0x814B # <CJK> +0x814C # <CJK> +0x8150 # <CJK> +0x8151 # <CJK> +0x8153 # <CJK> +0x8154 # <CJK> +0x8155 # <CJK> +0x8159 # <CJK> +0x815A # <CJK> +0x8160 # <CJK> +0x8165 # <CJK> +0x8167 # <CJK> +0x8169 # <CJK> +0x816D # <CJK> +0x816E # <CJK> +0x8170 # <CJK> +0x8171 # <CJK> +0x8174 # <CJK> +0x8179 # <CJK> +0x817A # <CJK> +0x817B # <CJK> +0x817C # <CJK> +0x817D # <CJK> +0x817E # <CJK> +0x817F # <CJK> +0x8180 # <CJK> +0x8182 # <CJK> +0x8188 # <CJK> +0x818A # <CJK> +0x818F # <CJK> +0x8191 # <CJK> +0x8198 # <CJK> +0x819B # <CJK> +0x819C # <CJK> +0x819D # <CJK> +0x81A3 # <CJK> +0x81A6 # <CJK> +0x81A8 # <CJK> +0x81AA # <CJK> +0x81B3 # <CJK> +0x81BA # <CJK> +0x81BB # <CJK> +0x81C0 # <CJK> +0x81C1 # <CJK> +0x81C2 # <CJK> +0x81C3 # <CJK> +0x81C6 # <CJK> +0x81CA # <CJK> +0x81CC # <CJK> +0x81E3 # <CJK> +0x81E7 # <CJK> +0x81EA # <CJK> +0x81EC # <CJK> +0x81ED # <CJK> +0x81F3 # <CJK> +0x81F4 # <CJK> +0x81FB # <CJK> +0x81FC # <CJK> +0x81FE # <CJK> +0x8200 # <CJK> +0x8201 # <CJK> +0x8202 # <CJK> +0x8204 # <CJK> +0x8205 # <CJK> +0x8206 # <CJK> +0x820C # <CJK> +0x820D # <CJK> +0x8210 # <CJK> +0x8212 # <CJK> +0x8214 # <CJK> +0x821B # <CJK> +0x821C # <CJK> +0x821E # <CJK> +0x821F # <CJK> +0x8221 # <CJK> +0x8222 # <CJK> +0x8223 # <CJK> +0x8228 # <CJK> +0x822A # <CJK> +0x822B # <CJK> +0x822C # <CJK> +0x822D # <CJK> +0x822F # <CJK> +0x8230 # <CJK> +0x8231 # <CJK> +0x8233 # <CJK> +0x8234 # <CJK> +0x8235 # <CJK> +0x8236 # <CJK> +0x8237 # <CJK> +0x8238 # <CJK> +0x8239 # <CJK> +0x823B # <CJK> +0x823E # <CJK> +0x8244 # <CJK> +0x8247 # <CJK> +0x8249 # <CJK> +0x824B # <CJK> +0x824F # <CJK> +0x8258 # <CJK> +0x825A # <CJK> +0x825F # <CJK> +0x8268 # <CJK> +0x826E # <CJK> +0x826F # <CJK> +0x8270 # <CJK> +0x8272 # <CJK> +0x8273 # <CJK> +0x8274 # <CJK> +0x8279 # <CJK> +0x827A # <CJK> +0x827D # <CJK> +0x827E # <CJK> +0x827F # <CJK> +0x8282 # <CJK> +0x8284 # <CJK> +0x8288 # <CJK> +0x828A # <CJK> +0x828B # <CJK> +0x828D # <CJK> +0x828E # <CJK> +0x828F # <CJK> +0x8291 # <CJK> +0x8292 # <CJK> +0x8297 # <CJK> +0x8298 # <CJK> +0x8299 # <CJK> +0x829C # <CJK> +0x829D # <CJK> +0x829F # <CJK> +0x82A1 # <CJK> +0x82A4 # <CJK> +0x82A5 # <CJK> +0x82A6 # <CJK> +0x82A8 # <CJK> +0x82A9 # <CJK> +0x82AA # <CJK> +0x82AB # <CJK> +0x82AC # <CJK> +0x82AD # <CJK> +0x82AE # <CJK> +0x82AF # <CJK> +0x82B0 # <CJK> +0x82B1 # <CJK> +0x82B3 # <CJK> +0x82B4 # <CJK> +0x82B7 # <CJK> +0x82B8 # <CJK> +0x82B9 # <CJK> +0x82BD # <CJK> +0x82BE # <CJK> +0x82C1 # <CJK> +0x82C4 # <CJK> +0x82C7 # <CJK> +0x82C8 # <CJK> +0x82CA # <CJK> +0x82CB # <CJK> +0x82CC # <CJK> +0x82CD # <CJK> +0x82CE # <CJK> +0x82CF # <CJK> +0x82D1 # <CJK> +0x82D2 # <CJK> +0x82D3 # <CJK> +0x82D4 # <CJK> +0x82D5 # <CJK> +0x82D7 # <CJK> +0x82D8 # <CJK> +0x82DB # <CJK> +0x82DC # <CJK> +0x82DE # <CJK> +0x82DF # <CJK> +0x82E0 # <CJK> +0x82E1 # <CJK> +0x82E3 # <CJK> +0x82E4 # <CJK> +0x82E5 # <CJK> +0x82E6 # <CJK> +0x82EB # <CJK> +0x82EF # <CJK> +0x82F1 # <CJK> +0x82F4 # <CJK> +0x82F7 # <CJK> +0x82F9 # <CJK> +0x82FB # <CJK> +0x8301 # <CJK> +0x8302 # <CJK> +0x8303 # <CJK> +0x8304 # <CJK> +0x8305 # <CJK> +0x8306 # <CJK> +0x8307 # <CJK> +0x8308 # <CJK> +0x8309 # <CJK> +0x830C # <CJK> +0x830E # <CJK> +0x830F # <CJK> +0x8311 # <CJK> +0x8314 # <CJK> +0x8315 # <CJK> +0x8317 # <CJK> +0x831A # <CJK> +0x831B # <CJK> +0x831C # <CJK> +0x8327 # <CJK> +0x8328 # <CJK> +0x832B # <CJK> +0x832C # <CJK> +0x832D # <CJK> +0x832F # <CJK> +0x8331 # <CJK> +0x8333 # <CJK> +0x8334 # <CJK> +0x8335 # <CJK> +0x8336 # <CJK> +0x8338 # <CJK> +0x8339 # <CJK> +0x833A # <CJK> +0x833C # <CJK> +0x8340 # <CJK> +0x8343 # <CJK> +0x8346 # <CJK> +0x8347 # <CJK> +0x8349 # <CJK> +0x834F # <CJK> +0x8350 # <CJK> +0x8351 # <CJK> +0x8352 # <CJK> +0x8354 # <CJK> +0x835A # <CJK> +0x835B # <CJK> +0x835C # <CJK> +0x835E # <CJK> +0x835F # <CJK> +0x8360 # <CJK> +0x8361 # <CJK> +0x8363 # <CJK> +0x8364 # <CJK> +0x8365 # <CJK> +0x8366 # <CJK> +0x8367 # <CJK> +0x8368 # <CJK> +0x8369 # <CJK> +0x836A # <CJK> +0x836B # <CJK> +0x836C # <CJK> +0x836D # <CJK> +0x836E # <CJK> +0x836F # <CJK> +0x8377 # <CJK> +0x8378 # <CJK> +0x837B # <CJK> +0x837C # <CJK> +0x837D # <CJK> +0x8385 # <CJK> +0x8386 # <CJK> +0x8389 # <CJK> +0x838E # <CJK> +0x8392 # <CJK> +0x8393 # <CJK> +0x8398 # <CJK> +0x839B # <CJK> +0x839C # <CJK> +0x839E # <CJK> +0x83A0 # <CJK> +0x83A8 # <CJK> +0x83A9 # <CJK> +0x83AA # <CJK> +0x83AB # <CJK> +0x83B0 # <CJK> +0x83B1 # <CJK> +0x83B2 # <CJK> +0x83B3 # <CJK> +0x83B4 # <CJK> +0x83B6 # <CJK> +0x83B7 # <CJK> +0x83B8 # <CJK> +0x83B9 # <CJK> +0x83BA # <CJK> +0x83BC # <CJK> +0x83BD # <CJK> +0x83C0 # <CJK> +0x83C1 # <CJK> +0x83C5 # <CJK> +0x83C7 # <CJK> +0x83CA # <CJK> +0x83CC # <CJK> +0x83CF # <CJK> +0x83D4 # <CJK> +0x83D6 # <CJK> +0x83D8 # <CJK> +0x83DC # <CJK> +0x83DD # <CJK> +0x83DF # <CJK> +0x83E0 # <CJK> +0x83E1 # <CJK> +0x83E5 # <CJK> +0x83E9 # <CJK> +0x83EA # <CJK> +0x83F0 # <CJK> +0x83F1 # <CJK> +0x83F2 # <CJK> +0x83F8 # <CJK> +0x83F9 # <CJK> +0x83FD # <CJK> +0x8401 # <CJK> +0x8403 # <CJK> +0x8404 # <CJK> +0x8406 # <CJK> +0x840B # <CJK> +0x840C # <CJK> +0x840D # <CJK> +0x840E # <CJK> +0x840F # <CJK> +0x8411 # <CJK> +0x8418 # <CJK> +0x841C # <CJK> +0x841D # <CJK> +0x8424 # <CJK> +0x8425 # <CJK> +0x8426 # <CJK> +0x8427 # <CJK> +0x8428 # <CJK> +0x8431 # <CJK> +0x8438 # <CJK> +0x843C # <CJK> +0x843D # <CJK> +0x8446 # <CJK> +0x8451 # <CJK> +0x8457 # <CJK> +0x8459 # <CJK> +0x845A # <CJK> +0x845B # <CJK> +0x845C # <CJK> +0x8461 # <CJK> +0x8463 # <CJK> +0x8469 # <CJK> +0x846B # <CJK> +0x846C # <CJK> +0x846D # <CJK> +0x8471 # <CJK> +0x8473 # <CJK> +0x8475 # <CJK> +0x8476 # <CJK> +0x8478 # <CJK> +0x847A # <CJK> +0x8482 # <CJK> +0x8487 # <CJK> +0x8488 # <CJK> +0x8489 # <CJK> +0x848B # <CJK> +0x848C # <CJK> +0x848E # <CJK> +0x8497 # <CJK> +0x8499 # <CJK> +0x849C # <CJK> +0x84A1 # <CJK> +0x84AF # <CJK> +0x84B2 # <CJK> +0x84B4 # <CJK> +0x84B8 # <CJK> +0x84B9 # <CJK> +0x84BA # <CJK> +0x84BD # <CJK> +0x84BF # <CJK> +0x84C1 # <CJK> +0x84C4 # <CJK> +0x84C9 # <CJK> +0x84CA # <CJK> +0x84CD # <CJK> +0x84D0 # <CJK> +0x84D1 # <CJK> +0x84D3 # <CJK> +0x84D6 # <CJK> +0x84DD # <CJK> +0x84DF # <CJK> +0x84E0 # <CJK> +0x84E3 # <CJK> +0x84E5 # <CJK> +0x84E6 # <CJK> +0x84EC # <CJK> +0x84F0 # <CJK> +0x84FC # <CJK> +0x84FF # <CJK> +0x850C # <CJK> +0x8511 # <CJK> +0x8513 # <CJK> +0x8517 # <CJK> +0x851A # <CJK> +0x851F # <CJK> +0x8521 # <CJK> +0x852B # <CJK> +0x852C # <CJK> +0x8537 # <CJK> +0x8538 # <CJK> +0x8539 # <CJK> +0x853A # <CJK> +0x853B # <CJK> +0x853C # <CJK> +0x853D # <CJK> +0x8543 # <CJK> +0x8548 # <CJK> +0x8549 # <CJK> +0x854A # <CJK> +0x8556 # <CJK> +0x8559 # <CJK> +0x855E # <CJK> +0x8564 # <CJK> +0x8568 # <CJK> +0x8572 # <CJK> +0x8574 # <CJK> +0x8579 # <CJK> +0x857A # <CJK> +0x857B # <CJK> +0x857E # <CJK> +0x8584 # <CJK> +0x8585 # <CJK> +0x8587 # <CJK> +0x858F # <CJK> +0x859B # <CJK> +0x859C # <CJK> +0x85A4 # <CJK> +0x85A8 # <CJK> +0x85AA # <CJK> +0x85AE # <CJK> +0x85AF # <CJK> +0x85B0 # <CJK> +0x85B7 # <CJK> +0x85B9 # <CJK> +0x85C1 # <CJK> +0x85C9 # <CJK> +0x85CF # <CJK> +0x85D0 # <CJK> +0x85D3 # <CJK> +0x85D5 # <CJK> +0x85DC # <CJK> +0x85E4 # <CJK> +0x85E9 # <CJK> +0x85FB # <CJK> +0x85FF # <CJK> +0x8605 # <CJK> +0x8611 # <CJK> +0x8616 # <CJK> +0x8627 # <CJK> +0x8629 # <CJK> +0x8638 # <CJK> +0x863C # <CJK> +0x864D # <CJK> +0x864E # <CJK> +0x864F # <CJK> +0x8650 # <CJK> +0x8651 # <CJK> +0x8654 # <CJK> +0x865A # <CJK> +0x865E # <CJK> +0x8662 # <CJK> +0x866B # <CJK> +0x866C # <CJK> +0x866E # <CJK> +0x8671 # <CJK> +0x8679 # <CJK> +0x867A # <CJK> +0x867B # <CJK> +0x867C # <CJK> +0x867D # <CJK> +0x867E # <CJK> +0x867F # <CJK> +0x8680 # <CJK> +0x8681 # <CJK> +0x8682 # <CJK> +0x868A # <CJK> +0x868B # <CJK> +0x868C # <CJK> +0x868D # <CJK> +0x8693 # <CJK> +0x8695 # <CJK> +0x869C # <CJK> +0x869D # <CJK> +0x86A3 # <CJK> +0x86A4 # <CJK> +0x86A7 # <CJK> +0x86A8 # <CJK> +0x86A9 # <CJK> +0x86AA # <CJK> +0x86AC # <CJK> +0x86AF # <CJK> +0x86B0 # <CJK> +0x86B1 # <CJK> +0x86B4 # <CJK> +0x86B5 # <CJK> +0x86B6 # <CJK> +0x86BA # <CJK> +0x86C0 # <CJK> +0x86C4 # <CJK> +0x86C6 # <CJK> +0x86C7 # <CJK> +0x86C9 # <CJK> +0x86CA # <CJK> +0x86CB # <CJK> +0x86CE # <CJK> +0x86CF # <CJK> +0x86D0 # <CJK> +0x86D1 # <CJK> +0x86D4 # <CJK> +0x86D8 # <CJK> +0x86D9 # <CJK> +0x86DB # <CJK> +0x86DE # <CJK> +0x86DF # <CJK> +0x86E4 # <CJK> +0x86E9 # <CJK> +0x86ED # <CJK> +0x86EE # <CJK> +0x86F0 # <CJK> +0x86F1 # <CJK> +0x86F2 # <CJK> +0x86F3 # <CJK> +0x86F4 # <CJK> +0x86F8 # <CJK> +0x86F9 # <CJK> +0x86FE # <CJK> +0x8700 # <CJK> +0x8702 # <CJK> +0x8703 # <CJK> +0x8707 # <CJK> +0x8708 # <CJK> +0x8709 # <CJK> +0x870A # <CJK> +0x870D # <CJK> +0x8712 # <CJK> +0x8713 # <CJK> +0x8715 # <CJK> +0x8717 # <CJK> +0x8718 # <CJK> +0x871A # <CJK> +0x871C # <CJK> +0x871E # <CJK> +0x8721 # <CJK> +0x8722 # <CJK> +0x8723 # <CJK> +0x8725 # <CJK> +0x8729 # <CJK> +0x872E # <CJK> +0x8731 # <CJK> +0x8734 # <CJK> +0x8737 # <CJK> +0x873B # <CJK> +0x873E # <CJK> +0x873F # <CJK> +0x8747 # <CJK> +0x8748 # <CJK> +0x8749 # <CJK> +0x874C # <CJK> +0x874E # <CJK> +0x8753 # <CJK> +0x8757 # <CJK> +0x8759 # <CJK> +0x8760 # <CJK> +0x8763 # <CJK> +0x8764 # <CJK> +0x8765 # <CJK> +0x876E # <CJK> +0x8770 # <CJK> +0x8774 # <CJK> +0x8776 # <CJK> +0x877B # <CJK> +0x877C # <CJK> +0x877D # <CJK> +0x877E # <CJK> +0x8782 # <CJK> +0x8783 # <CJK> +0x8785 # <CJK> +0x8788 # <CJK> +0x878B # <CJK> +0x878D # <CJK> +0x8793 # <CJK> +0x8797 # <CJK> +0x879F # <CJK> +0x87A8 # <CJK> +0x87AB # <CJK> +0x87AC # <CJK> +0x87AD # <CJK> +0x87AF # <CJK> +0x87B3 # <CJK> +0x87B5 # <CJK> +0x87BA # <CJK> +0x87BD # <CJK> +0x87C0 # <CJK> +0x87C6 # <CJK> +0x87CA # <CJK> +0x87CB # <CJK> +0x87D1 # <CJK> +0x87D2 # <CJK> +0x87D3 # <CJK> +0x87DB # <CJK> +0x87E0 # <CJK> +0x87E5 # <CJK> +0x87EA # <CJK> +0x87EE # <CJK> +0x87F9 # <CJK> +0x87FE # <CJK> +0x8803 # <CJK> +0x880A # <CJK> +0x8813 # <CJK> +0x8815 # <CJK> +0x8816 # <CJK> +0x881B # <CJK> +0x8821 # <CJK> +0x8822 # <CJK> +0x8832 # <CJK> +0x8839 # <CJK> +0x883C # <CJK> +0x8840 # <CJK> +0x8844 # <CJK> +0x8845 # <CJK> +0x884C # <CJK> +0x884D # <CJK> +0x8854 # <CJK> +0x8857 # <CJK> +0x8859 # <CJK> +0x8861 # <CJK> +0x8862 # <CJK> +0x8863 # <CJK> +0x8864 # <CJK> +0x8865 # <CJK> +0x8868 # <CJK> +0x8869 # <CJK> +0x886B # <CJK> +0x886C # <CJK> +0x886E # <CJK> +0x8870 # <CJK> +0x8872 # <CJK> +0x8877 # <CJK> +0x887D # <CJK> +0x887E # <CJK> +0x887F # <CJK> +0x8881 # <CJK> +0x8882 # <CJK> +0x8884 # <CJK> +0x8885 # <CJK> +0x8888 # <CJK> +0x888B # <CJK> +0x888D # <CJK> +0x8892 # <CJK> +0x8896 # <CJK> +0x889C # <CJK> +0x88A2 # <CJK> +0x88A4 # <CJK> +0x88AB # <CJK> +0x88AD # <CJK> +0x88B1 # <CJK> +0x88B7 # <CJK> +0x88BC # <CJK> +0x88C1 # <CJK> +0x88C2 # <CJK> +0x88C5 # <CJK> +0x88C6 # <CJK> +0x88C9 # <CJK> +0x88CE # <CJK> +0x88D2 # <CJK> +0x88D4 # <CJK> +0x88D5 # <CJK> +0x88D8 # <CJK> +0x88D9 # <CJK> +0x88DF # <CJK> +0x88E2 # <CJK> +0x88E3 # <CJK> +0x88E4 # <CJK> +0x88E5 # <CJK> +0x88E8 # <CJK> +0x88F0 # <CJK> +0x88F1 # <CJK> +0x88F3 # <CJK> +0x88F4 # <CJK> +0x88F8 # <CJK> +0x88F9 # <CJK> +0x88FC # <CJK> +0x88FE # <CJK> +0x8902 # <CJK> +0x890A # <CJK> +0x8910 # <CJK> +0x8912 # <CJK> +0x8913 # <CJK> +0x8919 # <CJK> +0x891A # <CJK> +0x891B # <CJK> +0x8921 # <CJK> +0x8925 # <CJK> +0x892A # <CJK> +0x892B # <CJK> +0x8930 # <CJK> +0x8934 # <CJK> +0x8936 # <CJK> +0x8941 # <CJK> +0x8944 # <CJK> +0x895E # <CJK> +0x895F # <CJK> +0x8966 # <CJK> +0x897B # <CJK> +0x897F # <CJK> +0x8981 # <CJK> +0x8983 # <CJK> +0x8986 # <CJK> +0x89C1 # <CJK> +0x89C2 # <CJK> +0x89C4 # <CJK> +0x89C5 # <CJK> +0x89C6 # <CJK> +0x89C7 # <CJK> +0x89C8 # <CJK> +0x89C9 # <CJK> +0x89CA # <CJK> +0x89CB # <CJK> +0x89CC # <CJK> +0x89CE # <CJK> +0x89CF # <CJK> +0x89D0 # <CJK> +0x89D1 # <CJK> +0x89D2 # <CJK> +0x89D6 # <CJK> +0x89DA # <CJK> +0x89DC # <CJK> +0x89DE # <CJK> +0x89E3 # <CJK> +0x89E5 # <CJK> +0x89E6 # <CJK> +0x89EB # <CJK> +0x89EF # <CJK> +0x89F3 # <CJK> +0x8A00 # <CJK> +0x8A07 # <CJK> +0x8A3E # <CJK> +0x8A48 # <CJK> +0x8A79 # <CJK> +0x8A89 # <CJK> +0x8A8A # <CJK> +0x8A93 # <CJK> +0x8B07 # <CJK> +0x8B26 # <CJK> +0x8B66 # <CJK> +0x8B6C # <CJK> +0x8BA0 # <CJK> +0x8BA1 # <CJK> +0x8BA2 # <CJK> +0x8BA3 # <CJK> +0x8BA4 # <CJK> +0x8BA5 # <CJK> +0x8BA6 # <CJK> +0x8BA7 # <CJK> +0x8BA8 # <CJK> +0x8BA9 # <CJK> +0x8BAA # <CJK> +0x8BAB # <CJK> +0x8BAD # <CJK> +0x8BAE # <CJK> +0x8BAF # <CJK> +0x8BB0 # <CJK> +0x8BB2 # <CJK> +0x8BB3 # <CJK> +0x8BB4 # <CJK> +0x8BB5 # <CJK> +0x8BB6 # <CJK> +0x8BB7 # <CJK> +0x8BB8 # <CJK> +0x8BB9 # <CJK> +0x8BBA # <CJK> +0x8BBC # <CJK> +0x8BBD # <CJK> +0x8BBE # <CJK> +0x8BBF # <CJK> +0x8BC0 # <CJK> +0x8BC1 # <CJK> +0x8BC2 # <CJK> +0x8BC3 # <CJK> +0x8BC4 # <CJK> +0x8BC5 # <CJK> +0x8BC6 # <CJK> +0x8BC8 # <CJK> +0x8BC9 # <CJK> +0x8BCA # <CJK> +0x8BCB # <CJK> +0x8BCC # <CJK> +0x8BCD # <CJK> +0x8BCE # <CJK> +0x8BCF # <CJK> +0x8BD1 # <CJK> +0x8BD2 # <CJK> +0x8BD3 # <CJK> +0x8BD4 # <CJK> +0x8BD5 # <CJK> +0x8BD6 # <CJK> +0x8BD7 # <CJK> +0x8BD8 # <CJK> +0x8BD9 # <CJK> +0x8BDA # <CJK> +0x8BDB # <CJK> +0x8BDC # <CJK> +0x8BDD # <CJK> +0x8BDE # <CJK> +0x8BDF # <CJK> +0x8BE0 # <CJK> +0x8BE1 # <CJK> +0x8BE2 # <CJK> +0x8BE3 # <CJK> +0x8BE4 # <CJK> +0x8BE5 # <CJK> +0x8BE6 # <CJK> +0x8BE7 # <CJK> +0x8BE8 # <CJK> +0x8BE9 # <CJK> +0x8BEB # <CJK> +0x8BEC # <CJK> +0x8BED # <CJK> +0x8BEE # <CJK> +0x8BEF # <CJK> +0x8BF0 # <CJK> +0x8BF1 # <CJK> +0x8BF2 # <CJK> +0x8BF3 # <CJK> +0x8BF4 # <CJK> +0x8BF5 # <CJK> +0x8BF6 # <CJK> +0x8BF7 # <CJK> +0x8BF8 # <CJK> +0x8BF9 # <CJK> +0x8BFA # <CJK> +0x8BFB # <CJK> +0x8BFC # <CJK> +0x8BFD # <CJK> +0x8BFE # <CJK> +0x8BFF # <CJK> +0x8C00 # <CJK> +0x8C01 # <CJK> +0x8C02 # <CJK> +0x8C03 # <CJK> +0x8C04 # <CJK> +0x8C05 # <CJK> +0x8C06 # <CJK> +0x8C07 # <CJK> +0x8C08 # <CJK> +0x8C0A # <CJK> +0x8C0B # <CJK> +0x8C0C # <CJK> +0x8C0D # <CJK> +0x8C0E # <CJK> +0x8C0F # <CJK> +0x8C10 # <CJK> +0x8C11 # <CJK> +0x8C12 # <CJK> +0x8C13 # <CJK> +0x8C14 # <CJK> +0x8C15 # <CJK> +0x8C16 # <CJK> +0x8C17 # <CJK> +0x8C18 # <CJK> +0x8C19 # <CJK> +0x8C1A # <CJK> +0x8C1B # <CJK> +0x8C1C # <CJK> +0x8C1D # <CJK> +0x8C1F # <CJK> +0x8C20 # <CJK> +0x8C21 # <CJK> +0x8C22 # <CJK> +0x8C23 # <CJK> +0x8C24 # <CJK> +0x8C25 # <CJK> +0x8C26 # <CJK> +0x8C27 # <CJK> +0x8C28 # <CJK> +0x8C29 # <CJK> +0x8C2A # <CJK> +0x8C2B # <CJK> +0x8C2C # <CJK> +0x8C2D # <CJK> +0x8C2E # <CJK> +0x8C2F # <CJK> +0x8C30 # <CJK> +0x8C31 # <CJK> +0x8C32 # <CJK> +0x8C33 # <CJK> +0x8C34 # <CJK> +0x8C35 # <CJK> +0x8C36 # <CJK> +0x8C37 # <CJK> +0x8C41 # <CJK> +0x8C46 # <CJK> +0x8C47 # <CJK> +0x8C49 # <CJK> +0x8C4C # <CJK> +0x8C55 # <CJK> +0x8C5A # <CJK> +0x8C61 # <CJK> +0x8C62 # <CJK> +0x8C6A # <CJK> +0x8C6B # <CJK> +0x8C73 # <CJK> +0x8C78 # <CJK> +0x8C79 # <CJK> +0x8C7A # <CJK> +0x8C82 # <CJK> +0x8C85 # <CJK> +0x8C89 # <CJK> +0x8C8A # <CJK> +0x8C8C # <CJK> +0x8C94 # <CJK> +0x8C98 # <CJK> +0x8D1D # <CJK> +0x8D1E # <CJK> +0x8D1F # <CJK> +0x8D21 # <CJK> +0x8D22 # <CJK> +0x8D23 # <CJK> +0x8D24 # <CJK> +0x8D25 # <CJK> +0x8D26 # <CJK> +0x8D27 # <CJK> +0x8D28 # <CJK> +0x8D29 # <CJK> +0x8D2A # <CJK> +0x8D2B # <CJK> +0x8D2C # <CJK> +0x8D2D # <CJK> +0x8D2E # <CJK> +0x8D2F # <CJK> +0x8D30 # <CJK> +0x8D31 # <CJK> +0x8D32 # <CJK> +0x8D33 # <CJK> +0x8D34 # <CJK> +0x8D35 # <CJK> +0x8D36 # <CJK> +0x8D37 # <CJK> +0x8D38 # <CJK> +0x8D39 # <CJK> +0x8D3A # <CJK> +0x8D3B # <CJK> +0x8D3C # <CJK> +0x8D3D # <CJK> +0x8D3E # <CJK> +0x8D3F # <CJK> +0x8D40 # <CJK> +0x8D41 # <CJK> +0x8D42 # <CJK> +0x8D43 # <CJK> +0x8D44 # <CJK> +0x8D45 # <CJK> +0x8D46 # <CJK> +0x8D47 # <CJK> +0x8D48 # <CJK> +0x8D49 # <CJK> +0x8D4A # <CJK> +0x8D4B # <CJK> +0x8D4C # <CJK> +0x8D4D # <CJK> +0x8D4E # <CJK> +0x8D4F # <CJK> +0x8D50 # <CJK> +0x8D53 # <CJK> +0x8D54 # <CJK> +0x8D55 # <CJK> +0x8D56 # <CJK> +0x8D58 # <CJK> +0x8D59 # <CJK> +0x8D5A # <CJK> +0x8D5B # <CJK> +0x8D5C # <CJK> +0x8D5D # <CJK> +0x8D5E # <CJK> +0x8D60 # <CJK> +0x8D61 # <CJK> +0x8D62 # <CJK> +0x8D63 # <CJK> +0x8D64 # <CJK> +0x8D66 # <CJK> +0x8D67 # <CJK> +0x8D6B # <CJK> +0x8D6D # <CJK> +0x8D70 # <CJK> +0x8D73 # <CJK> +0x8D74 # <CJK> +0x8D75 # <CJK> +0x8D76 # <CJK> +0x8D77 # <CJK> +0x8D81 # <CJK> +0x8D84 # <CJK> +0x8D85 # <CJK> +0x8D8A # <CJK> +0x8D8B # <CJK> +0x8D91 # <CJK> +0x8D94 # <CJK> +0x8D9F # <CJK> +0x8DA3 # <CJK> +0x8DB1 # <CJK> +0x8DB3 # <CJK> +0x8DB4 # <CJK> +0x8DB5 # <CJK> +0x8DB8 # <CJK> +0x8DBA # <CJK> +0x8DBC # <CJK> +0x8DBE # <CJK> +0x8DBF # <CJK> +0x8DC3 # <CJK> +0x8DC4 # <CJK> +0x8DC6 # <CJK> +0x8DCB # <CJK> +0x8DCC # <CJK> +0x8DCE # <CJK> +0x8DCF # <CJK> +0x8DD1 # <CJK> +0x8DD6 # <CJK> +0x8DD7 # <CJK> +0x8DDA # <CJK> +0x8DDB # <CJK> +0x8DDD # <CJK> +0x8DDE # <CJK> +0x8DDF # <CJK> +0x8DE3 # <CJK> +0x8DE4 # <CJK> +0x8DE8 # <CJK> +0x8DEA # <CJK> +0x8DEB # <CJK> +0x8DEC # <CJK> +0x8DEF # <CJK> +0x8DF3 # <CJK> +0x8DF5 # <CJK> +0x8DF7 # <CJK> +0x8DF8 # <CJK> +0x8DF9 # <CJK> +0x8DFA # <CJK> +0x8DFB # <CJK> +0x8DFD # <CJK> +0x8E05 # <CJK> +0x8E09 # <CJK> +0x8E0A # <CJK> +0x8E0C # <CJK> +0x8E0F # <CJK> +0x8E14 # <CJK> +0x8E1D # <CJK> +0x8E1E # <CJK> +0x8E1F # <CJK> +0x8E22 # <CJK> +0x8E23 # <CJK> +0x8E29 # <CJK> +0x8E2A # <CJK> +0x8E2C # <CJK> +0x8E2E # <CJK> +0x8E2F # <CJK> +0x8E31 # <CJK> +0x8E35 # <CJK> +0x8E39 # <CJK> +0x8E3A # <CJK> +0x8E3D # <CJK> +0x8E40 # <CJK> +0x8E41 # <CJK> +0x8E42 # <CJK> +0x8E44 # <CJK> +0x8E47 # <CJK> +0x8E48 # <CJK> +0x8E49 # <CJK> +0x8E4A # <CJK> +0x8E4B # <CJK> +0x8E51 # <CJK> +0x8E52 # <CJK> +0x8E59 # <CJK> +0x8E66 # <CJK> +0x8E69 # <CJK> +0x8E6C # <CJK> +0x8E6D # <CJK> +0x8E6F # <CJK> +0x8E70 # <CJK> +0x8E72 # <CJK> +0x8E74 # <CJK> +0x8E76 # <CJK> +0x8E7C # <CJK> +0x8E7F # <CJK> +0x8E81 # <CJK> +0x8E85 # <CJK> +0x8E87 # <CJK> +0x8E8F # <CJK> +0x8E90 # <CJK> +0x8E94 # <CJK> +0x8E9C # <CJK> +0x8E9E # <CJK> +0x8EAB # <CJK> +0x8EAC # <CJK> +0x8EAF # <CJK> +0x8EB2 # <CJK> +0x8EBA # <CJK> +0x8ECE # <CJK> +0x8F66 # <CJK> +0x8F67 # <CJK> +0x8F68 # <CJK> +0x8F69 # <CJK> +0x8F6B # <CJK> +0x8F6C # <CJK> +0x8F6D # <CJK> +0x8F6E # <CJK> +0x8F6F # <CJK> +0x8F70 # <CJK> +0x8F71 # <CJK> +0x8F72 # <CJK> +0x8F73 # <CJK> +0x8F74 # <CJK> +0x8F75 # <CJK> +0x8F76 # <CJK> +0x8F77 # <CJK> +0x8F78 # <CJK> +0x8F79 # <CJK> +0x8F7A # <CJK> +0x8F7B # <CJK> +0x8F7C # <CJK> +0x8F7D # <CJK> +0x8F7E # <CJK> +0x8F7F # <CJK> +0x8F81 # <CJK> +0x8F82 # <CJK> +0x8F83 # <CJK> +0x8F84 # <CJK> +0x8F85 # <CJK> +0x8F86 # <CJK> +0x8F87 # <CJK> +0x8F88 # <CJK> +0x8F89 # <CJK> +0x8F8A # <CJK> +0x8F8B # <CJK> +0x8F8D # <CJK> +0x8F8E # <CJK> +0x8F8F # <CJK> +0x8F90 # <CJK> +0x8F91 # <CJK> +0x8F93 # <CJK> +0x8F94 # <CJK> +0x8F95 # <CJK> +0x8F96 # <CJK> +0x8F97 # <CJK> +0x8F98 # <CJK> +0x8F99 # <CJK> +0x8F9A # <CJK> +0x8F9B # <CJK> +0x8F9C # <CJK> +0x8F9E # <CJK> +0x8F9F # <CJK> +0x8FA3 # <CJK> +0x8FA8 # <CJK> +0x8FA9 # <CJK> +0x8FAB # <CJK> +0x8FB0 # <CJK> +0x8FB1 # <CJK> +0x8FB6 # <CJK> +0x8FB9 # <CJK> +0x8FBD # <CJK> +0x8FBE # <CJK> +0x8FC1 # <CJK> +0x8FC2 # <CJK> +0x8FC4 # <CJK> +0x8FC5 # <CJK> +0x8FC7 # <CJK> +0x8FC8 # <CJK> +0x8FCE # <CJK> +0x8FD0 # <CJK> +0x8FD1 # <CJK> +0x8FD3 # <CJK> +0x8FD4 # <CJK> +0x8FD5 # <CJK> +0x8FD8 # <CJK> +0x8FD9 # <CJK> +0x8FDB # <CJK> +0x8FDC # <CJK> +0x8FDD # <CJK> +0x8FDE # <CJK> +0x8FDF # <CJK> +0x8FE2 # <CJK> +0x8FE4 # <CJK> +0x8FE5 # <CJK> +0x8FE6 # <CJK> +0x8FE8 # <CJK> +0x8FE9 # <CJK> +0x8FEA # <CJK> +0x8FEB # <CJK> +0x8FED # <CJK> +0x8FEE # <CJK> +0x8FF0 # <CJK> +0x8FF3 # <CJK> +0x8FF7 # <CJK> +0x8FF8 # <CJK> +0x8FF9 # <CJK> +0x8FFD # <CJK> +0x9000 # <CJK> +0x9001 # <CJK> +0x9002 # <CJK> +0x9003 # <CJK> +0x9004 # <CJK> +0x9005 # <CJK> +0x9006 # <CJK> +0x9009 # <CJK> +0x900A # <CJK> +0x900B # <CJK> +0x900D # <CJK> +0x900F # <CJK> +0x9010 # <CJK> +0x9011 # <CJK> +0x9012 # <CJK> +0x9014 # <CJK> +0x9016 # <CJK> +0x9017 # <CJK> +0x901A # <CJK> +0x901B # <CJK> +0x901D # <CJK> +0x901E # <CJK> +0x901F # <CJK> +0x9020 # <CJK> +0x9021 # <CJK> +0x9022 # <CJK> +0x9026 # <CJK> +0x902D # <CJK> +0x902E # <CJK> +0x902F # <CJK> +0x9035 # <CJK> +0x9036 # <CJK> +0x9038 # <CJK> +0x903B # <CJK> +0x903C # <CJK> +0x903E # <CJK> +0x9041 # <CJK> +0x9042 # <CJK> +0x9044 # <CJK> +0x9047 # <CJK> +0x904D # <CJK> +0x904F # <CJK> +0x9050 # <CJK> +0x9051 # <CJK> +0x9052 # <CJK> +0x9053 # <CJK> +0x9057 # <CJK> +0x9058 # <CJK> +0x905B # <CJK> +0x9062 # <CJK> +0x9063 # <CJK> +0x9065 # <CJK> +0x9068 # <CJK> +0x906D # <CJK> +0x906E # <CJK> +0x9074 # <CJK> +0x9075 # <CJK> +0x907D # <CJK> +0x907F # <CJK> +0x9080 # <CJK> +0x9082 # <CJK> +0x9083 # <CJK> +0x9088 # <CJK> +0x908B # <CJK> +0x9091 # <CJK> +0x9093 # <CJK> +0x9095 # <CJK> +0x9097 # <CJK> +0x9099 # <CJK> +0x909B # <CJK> +0x909D # <CJK> +0x90A1 # <CJK> +0x90A2 # <CJK> +0x90A3 # <CJK> +0x90A6 # <CJK> +0x90AA # <CJK> +0x90AC # <CJK> +0x90AE # <CJK> +0x90AF # <CJK> +0x90B0 # <CJK> +0x90B1 # <CJK> +0x90B3 # <CJK> +0x90B4 # <CJK> +0x90B5 # <CJK> +0x90B6 # <CJK> +0x90B8 # <CJK> +0x90B9 # <CJK> +0x90BA # <CJK> +0x90BB # <CJK> +0x90BE # <CJK> +0x90C1 # <CJK> +0x90C4 # <CJK> +0x90C5 # <CJK> +0x90C7 # <CJK> +0x90CA # <CJK> +0x90CE # <CJK> +0x90CF # <CJK> +0x90D0 # <CJK> +0x90D1 # <CJK> +0x90D3 # <CJK> +0x90D7 # <CJK> +0x90DB # <CJK> +0x90DC # <CJK> +0x90DD # <CJK> +0x90E1 # <CJK> +0x90E2 # <CJK> +0x90E6 # <CJK> +0x90E7 # <CJK> +0x90E8 # <CJK> +0x90EB # <CJK> +0x90ED # <CJK> +0x90EF # <CJK> +0x90F4 # <CJK> +0x90F8 # <CJK> +0x90FD # <CJK> +0x90FE # <CJK> +0x9102 # <CJK> +0x9104 # <CJK> +0x9119 # <CJK> +0x911E # <CJK> +0x9122 # <CJK> +0x9123 # <CJK> +0x912F # <CJK> +0x9131 # <CJK> +0x9139 # <CJK> +0x9143 # <CJK> +0x9146 # <CJK> +0x9149 # <CJK> +0x914A # <CJK> +0x914B # <CJK> +0x914C # <CJK> +0x914D # <CJK> +0x914E # <CJK> +0x914F # <CJK> +0x9150 # <CJK> +0x9152 # <CJK> +0x9157 # <CJK> +0x915A # <CJK> +0x915D # <CJK> +0x915E # <CJK> +0x9161 # <CJK> +0x9162 # <CJK> +0x9163 # <CJK> +0x9164 # <CJK> +0x9165 # <CJK> +0x9169 # <CJK> +0x916A # <CJK> +0x916C # <CJK> +0x916E # <CJK> +0x916F # <CJK> +0x9170 # <CJK> +0x9171 # <CJK> +0x9172 # <CJK> +0x9174 # <CJK> +0x9175 # <CJK> +0x9176 # <CJK> +0x9177 # <CJK> +0x9178 # <CJK> +0x9179 # <CJK> +0x917D # <CJK> +0x917E # <CJK> +0x917F # <CJK> +0x9185 # <CJK> +0x9187 # <CJK> +0x9189 # <CJK> +0x918B # <CJK> +0x918C # <CJK> +0x918D # <CJK> +0x9190 # <CJK> +0x9191 # <CJK> +0x9192 # <CJK> +0x919A # <CJK> +0x919B # <CJK> +0x91A2 # <CJK> +0x91A3 # <CJK> +0x91AA # <CJK> +0x91AD # <CJK> +0x91AE # <CJK> +0x91AF # <CJK> +0x91B4 # <CJK> +0x91B5 # <CJK> +0x91BA # <CJK> +0x91C7 # <CJK> +0x91C9 # <CJK> +0x91CA # <CJK> +0x91CC # <CJK> +0x91CD # <CJK> +0x91CE # <CJK> +0x91CF # <CJK> +0x91D1 # <CJK> +0x91DC # <CJK> +0x9274 # <CJK> +0x928E # <CJK> +0x92AE # <CJK> +0x92C8 # <CJK> +0x933E # <CJK> +0x936A # <CJK> +0x938F # <CJK> +0x93CA # <CJK> +0x93D6 # <CJK> +0x943E # <CJK> +0x946B # <CJK> +0x9485 # <CJK> +0x9486 # <CJK> +0x9487 # <CJK> +0x9488 # <CJK> +0x9489 # <CJK> +0x948A # <CJK> +0x948B # <CJK> +0x948C # <CJK> +0x948D # <CJK> +0x948E # <CJK> +0x948F # <CJK> +0x9490 # <CJK> +0x9492 # <CJK> +0x9493 # <CJK> +0x9494 # <CJK> +0x9495 # <CJK> +0x9497 # <CJK> +0x9499 # <CJK> +0x949A # <CJK> +0x949B # <CJK> +0x949C # <CJK> +0x949D # <CJK> +0x949E # <CJK> +0x949F # <CJK> +0x94A0 # <CJK> +0x94A1 # <CJK> +0x94A2 # <CJK> +0x94A3 # <CJK> +0x94A4 # <CJK> +0x94A5 # <CJK> +0x94A6 # <CJK> +0x94A7 # <CJK> +0x94A8 # <CJK> +0x94A9 # <CJK> +0x94AA # <CJK> +0x94AB # <CJK> +0x94AC # <CJK> +0x94AD # <CJK> +0x94AE # <CJK> +0x94AF # <CJK> +0x94B0 # <CJK> +0x94B1 # <CJK> +0x94B2 # <CJK> +0x94B3 # <CJK> +0x94B4 # <CJK> +0x94B5 # <CJK> +0x94B6 # <CJK> +0x94B7 # <CJK> +0x94B8 # <CJK> +0x94B9 # <CJK> +0x94BA # <CJK> +0x94BB # <CJK> +0x94BC # <CJK> +0x94BD # <CJK> +0x94BE # <CJK> +0x94BF # <CJK> +0x94C0 # <CJK> +0x94C1 # <CJK> +0x94C2 # <CJK> +0x94C3 # <CJK> +0x94C4 # <CJK> +0x94C5 # <CJK> +0x94C6 # <CJK> +0x94C8 # <CJK> +0x94C9 # <CJK> +0x94CA # <CJK> +0x94CB # <CJK> +0x94CC # <CJK> +0x94CD # <CJK> +0x94CE # <CJK> +0x94D0 # <CJK> +0x94D1 # <CJK> +0x94D2 # <CJK> +0x94D5 # <CJK> +0x94D6 # <CJK> +0x94D7 # <CJK> +0x94D8 # <CJK> +0x94D9 # <CJK> +0x94DB # <CJK> +0x94DC # <CJK> +0x94DD # <CJK> +0x94DE # <CJK> +0x94DF # <CJK> +0x94E0 # <CJK> +0x94E1 # <CJK> +0x94E2 # <CJK> +0x94E3 # <CJK> +0x94E4 # <CJK> +0x94E5 # <CJK> +0x94E7 # <CJK> +0x94E8 # <CJK> +0x94E9 # <CJK> +0x94EA # <CJK> +0x94EB # <CJK> +0x94EC # <CJK> +0x94ED # <CJK> +0x94EE # <CJK> +0x94EF # <CJK> +0x94F0 # <CJK> +0x94F1 # <CJK> +0x94F2 # <CJK> +0x94F3 # <CJK> +0x94F4 # <CJK> +0x94F5 # <CJK> +0x94F6 # <CJK> +0x94F7 # <CJK> +0x94F8 # <CJK> +0x94F9 # <CJK> +0x94FA # <CJK> +0x94FC # <CJK> +0x94FD # <CJK> +0x94FE # <CJK> +0x94FF # <CJK> +0x9500 # <CJK> +0x9501 # <CJK> +0x9502 # <CJK> +0x9503 # <CJK> +0x9504 # <CJK> +0x9505 # <CJK> +0x9506 # <CJK> +0x9507 # <CJK> +0x9508 # <CJK> +0x9509 # <CJK> +0x950A # <CJK> +0x950B # <CJK> +0x950C # <CJK> +0x950D # <CJK> +0x950E # <CJK> +0x950F # <CJK> +0x9510 # <CJK> +0x9511 # <CJK> +0x9512 # <CJK> +0x9513 # <CJK> +0x9514 # <CJK> +0x9515 # <CJK> +0x9516 # <CJK> +0x9517 # <CJK> +0x9518 # <CJK> +0x9519 # <CJK> +0x951A # <CJK> +0x951B # <CJK> +0x951D # <CJK> +0x951E # <CJK> +0x951F # <CJK> +0x9521 # <CJK> +0x9522 # <CJK> +0x9523 # <CJK> +0x9524 # <CJK> +0x9525 # <CJK> +0x9526 # <CJK> +0x9528 # <CJK> +0x9529 # <CJK> +0x952A # <CJK> +0x952B # <CJK> +0x952C # <CJK> +0x952D # <CJK> +0x952E # <CJK> +0x952F # <CJK> +0x9530 # <CJK> +0x9531 # <CJK> +0x9532 # <CJK> +0x9534 # <CJK> +0x9535 # <CJK> +0x9536 # <CJK> +0x9537 # <CJK> +0x9538 # <CJK> +0x9539 # <CJK> +0x953A # <CJK> +0x953B # <CJK> +0x953C # <CJK> +0x953E # <CJK> +0x953F # <CJK> +0x9540 # <CJK> +0x9541 # <CJK> +0x9542 # <CJK> +0x9544 # <CJK> +0x9545 # <CJK> +0x9546 # <CJK> +0x9547 # <CJK> +0x9549 # <CJK> +0x954A # <CJK> +0x954C # <CJK> +0x954D # <CJK> +0x954E # <CJK> +0x954F # <CJK> +0x9550 # <CJK> +0x9551 # <CJK> +0x9552 # <CJK> +0x9553 # <CJK> +0x9554 # <CJK> +0x9556 # <CJK> +0x9557 # <CJK> +0x9558 # <CJK> +0x9559 # <CJK> +0x955B # <CJK> +0x955C # <CJK> +0x955D # <CJK> +0x955E # <CJK> +0x955F # <CJK> +0x9561 # <CJK> +0x9562 # <CJK> +0x9563 # <CJK> +0x9564 # <CJK> +0x9565 # <CJK> +0x9566 # <CJK> +0x9567 # <CJK> +0x9568 # <CJK> +0x9569 # <CJK> +0x956A # <CJK> +0x956B # <CJK> +0x956C # <CJK> +0x956D # <CJK> +0x956F # <CJK> +0x9570 # <CJK> +0x9571 # <CJK> +0x9572 # <CJK> +0x9573 # <CJK> +0x9576 # <CJK> +0x957F # <CJK> +0x95E8 # <CJK> +0x95E9 # <CJK> +0x95EA # <CJK> +0x95EB # <CJK> +0x95ED # <CJK> +0x95EE # <CJK> +0x95EF # <CJK> +0x95F0 # <CJK> +0x95F1 # <CJK> +0x95F2 # <CJK> +0x95F3 # <CJK> +0x95F4 # <CJK> +0x95F5 # <CJK> +0x95F6 # <CJK> +0x95F7 # <CJK> +0x95F8 # <CJK> +0x95F9 # <CJK> +0x95FA # <CJK> +0x95FB # <CJK> +0x95FC # <CJK> +0x95FD # <CJK> +0x95FE # <CJK> +0x9600 # <CJK> +0x9601 # <CJK> +0x9602 # <CJK> +0x9603 # <CJK> +0x9604 # <CJK> +0x9605 # <CJK> +0x9606 # <CJK> +0x9608 # <CJK> +0x9609 # <CJK> +0x960A # <CJK> +0x960B # <CJK> +0x960C # <CJK> +0x960D # <CJK> +0x960E # <CJK> +0x960F # <CJK> +0x9610 # <CJK> +0x9611 # <CJK> +0x9612 # <CJK> +0x9614 # <CJK> +0x9615 # <CJK> +0x9616 # <CJK> +0x9617 # <CJK> +0x9619 # <CJK> +0x961A # <CJK> +0x961C # <CJK> +0x961D # <CJK> +0x961F # <CJK> +0x9621 # <CJK> +0x9622 # <CJK> +0x962A # <CJK> +0x962E # <CJK> +0x9631 # <CJK> +0x9632 # <CJK> +0x9633 # <CJK> +0x9634 # <CJK> +0x9635 # <CJK> +0x9636 # <CJK> +0x963B # <CJK> +0x963C # <CJK> +0x963D # <CJK> +0x963F # <CJK> +0x9640 # <CJK> +0x9642 # <CJK> +0x9644 # <CJK> +0x9645 # <CJK> +0x9646 # <CJK> +0x9647 # <CJK> +0x9648 # <CJK> +0x9649 # <CJK> +0x964B # <CJK> +0x964C # <CJK> +0x964D # <CJK> +0x9650 # <CJK> +0x9654 # <CJK> +0x9655 # <CJK> +0x965B # <CJK> +0x965F # <CJK> +0x9661 # <CJK> +0x9662 # <CJK> +0x9664 # <CJK> +0x9667 # <CJK> +0x9668 # <CJK> +0x9669 # <CJK> +0x966A # <CJK> +0x966C # <CJK> +0x9672 # <CJK> +0x9674 # <CJK> +0x9675 # <CJK> +0x9676 # <CJK> +0x9677 # <CJK> +0x9685 # <CJK> +0x9686 # <CJK> +0x9688 # <CJK> +0x968B # <CJK> +0x968D # <CJK> +0x968F # <CJK> +0x9690 # <CJK> +0x9694 # <CJK> +0x9697 # <CJK> +0x9698 # <CJK> +0x9699 # <CJK> +0x969C # <CJK> +0x96A7 # <CJK> +0x96B0 # <CJK> +0x96B3 # <CJK> +0x96B6 # <CJK> +0x96B9 # <CJK> +0x96BC # <CJK> +0x96BD # <CJK> +0x96BE # <CJK> +0x96C0 # <CJK> +0x96C1 # <CJK> +0x96C4 # <CJK> +0x96C5 # <CJK> +0x96C6 # <CJK> +0x96C7 # <CJK> +0x96C9 # <CJK> +0x96CC # <CJK> +0x96CD # <CJK> +0x96CE # <CJK> +0x96CF # <CJK> +0x96D2 # <CJK> +0x96D5 # <CJK> +0x96E0 # <CJK> +0x96E8 # <CJK> +0x96E9 # <CJK> +0x96EA # <CJK> +0x96EF # <CJK> +0x96F3 # <CJK> +0x96F6 # <CJK> +0x96F7 # <CJK> +0x96F9 # <CJK> +0x96FE # <CJK> +0x9700 # <CJK> +0x9701 # <CJK> +0x9704 # <CJK> +0x9706 # <CJK> +0x9707 # <CJK> +0x9708 # <CJK> +0x9709 # <CJK> +0x970D # <CJK> +0x970E # <CJK> +0x970F # <CJK> +0x9713 # <CJK> +0x9716 # <CJK> +0x971C # <CJK> +0x971E # <CJK> +0x972A # <CJK> +0x972D # <CJK> +0x9730 # <CJK> +0x9732 # <CJK> +0x9738 # <CJK> +0x9739 # <CJK> +0x973E # <CJK> +0x9752 # <CJK> +0x9753 # <CJK> +0x9756 # <CJK> +0x9759 # <CJK> +0x975B # <CJK> +0x975E # <CJK> +0x9760 # <CJK> +0x9761 # <CJK> +0x9762 # <CJK> +0x9765 # <CJK> +0x9769 # <CJK> +0x9773 # <CJK> +0x9774 # <CJK> +0x9776 # <CJK> +0x977C # <CJK> +0x9785 # <CJK> +0x978B # <CJK> +0x978D # <CJK> +0x9791 # <CJK> +0x9792 # <CJK> +0x9794 # <CJK> +0x9798 # <CJK> +0x97A0 # <CJK> +0x97A3 # <CJK> +0x97AB # <CJK> +0x97AD # <CJK> +0x97AF # <CJK> +0x97B2 # <CJK> +0x97B4 # <CJK> +0x97E6 # <CJK> +0x97E7 # <CJK> +0x97E9 # <CJK> +0x97EA # <CJK> +0x97EB # <CJK> +0x97EC # <CJK> +0x97ED # <CJK> +0x97F3 # <CJK> +0x97F5 # <CJK> +0x97F6 # <CJK> +0x9875 # <CJK> +0x9876 # <CJK> +0x9877 # <CJK> +0x9878 # <CJK> +0x9879 # <CJK> +0x987A # <CJK> +0x987B # <CJK> +0x987C # <CJK> +0x987D # <CJK> +0x987E # <CJK> +0x987F # <CJK> +0x9880 # <CJK> +0x9881 # <CJK> +0x9882 # <CJK> +0x9883 # <CJK> +0x9884 # <CJK> +0x9885 # <CJK> +0x9886 # <CJK> +0x9887 # <CJK> +0x9888 # <CJK> +0x9889 # <CJK> +0x988A # <CJK> +0x988C # <CJK> +0x988D # <CJK> +0x988F # <CJK> +0x9890 # <CJK> +0x9891 # <CJK> +0x9893 # <CJK> +0x9894 # <CJK> +0x9896 # <CJK> +0x9897 # <CJK> +0x9898 # <CJK> +0x989A # <CJK> +0x989B # <CJK> +0x989C # <CJK> +0x989D # <CJK> +0x989E # <CJK> +0x989F # <CJK> +0x98A0 # <CJK> +0x98A1 # <CJK> +0x98A2 # <CJK> +0x98A4 # <CJK> +0x98A5 # <CJK> +0x98A6 # <CJK> +0x98A7 # <CJK> +0x98CE # <CJK> +0x98D1 # <CJK> +0x98D2 # <CJK> +0x98D3 # <CJK> +0x98D5 # <CJK> +0x98D8 # <CJK> +0x98D9 # <CJK> +0x98DA # <CJK> +0x98DE # <CJK> +0x98DF # <CJK> +0x98E7 # <CJK> +0x98E8 # <CJK> +0x990D # <CJK> +0x9910 # <CJK> +0x992E # <CJK> +0x9954 # <CJK> +0x9955 # <CJK> +0x9963 # <CJK> +0x9965 # <CJK> +0x9967 # <CJK> +0x9968 # <CJK> +0x9969 # <CJK> +0x996A # <CJK> +0x996B # <CJK> +0x996C # <CJK> +0x996D # <CJK> +0x996E # <CJK> +0x996F # <CJK> +0x9970 # <CJK> +0x9971 # <CJK> +0x9972 # <CJK> +0x9974 # <CJK> +0x9975 # <CJK> +0x9976 # <CJK> +0x9977 # <CJK> +0x997A # <CJK> +0x997C # <CJK> +0x997D # <CJK> +0x997F # <CJK> +0x9980 # <CJK> +0x9981 # <CJK> +0x9984 # <CJK> +0x9985 # <CJK> +0x9986 # <CJK> +0x9987 # <CJK> +0x9988 # <CJK> +0x998A # <CJK> +0x998B # <CJK> +0x998D # <CJK> +0x998F # <CJK> +0x9990 # <CJK> +0x9991 # <CJK> +0x9992 # <CJK> +0x9993 # <CJK> +0x9994 # <CJK> +0x9995 # <CJK> +0x9996 # <CJK> +0x9997 # <CJK> +0x9998 # <CJK> +0x9999 # <CJK> +0x99A5 # <CJK> +0x99A8 # <CJK> +0x9A6C # <CJK> +0x9A6D # <CJK> +0x9A6E # <CJK> +0x9A6F # <CJK> +0x9A70 # <CJK> +0x9A71 # <CJK> +0x9A73 # <CJK> +0x9A74 # <CJK> +0x9A75 # <CJK> +0x9A76 # <CJK> +0x9A77 # <CJK> +0x9A78 # <CJK> +0x9A79 # <CJK> +0x9A7A # <CJK> +0x9A7B # <CJK> +0x9A7C # <CJK> +0x9A7D # <CJK> +0x9A7E # <CJK> +0x9A7F # <CJK> +0x9A80 # <CJK> +0x9A81 # <CJK> +0x9A82 # <CJK> +0x9A84 # <CJK> +0x9A85 # <CJK> +0x9A86 # <CJK> +0x9A87 # <CJK> +0x9A88 # <CJK> +0x9A8A # <CJK> +0x9A8B # <CJK> +0x9A8C # <CJK> +0x9A8F # <CJK> +0x9A90 # <CJK> +0x9A91 # <CJK> +0x9A92 # <CJK> +0x9A93 # <CJK> +0x9A96 # <CJK> +0x9A97 # <CJK> +0x9A98 # <CJK> +0x9A9A # <CJK> +0x9A9B # <CJK> +0x9A9C # <CJK> +0x9A9D # <CJK> +0x9A9E # <CJK> +0x9A9F # <CJK> +0x9AA0 # <CJK> +0x9AA1 # <CJK> +0x9AA2 # <CJK> +0x9AA3 # <CJK> +0x9AA4 # <CJK> +0x9AA5 # <CJK> +0x9AA7 # <CJK> +0x9AA8 # <CJK> +0x9AB0 # <CJK> +0x9AB1 # <CJK> +0x9AB6 # <CJK> +0x9AB7 # <CJK> +0x9AB8 # <CJK> +0x9ABA # <CJK> +0x9ABC # <CJK> +0x9AC0 # <CJK> +0x9AC1 # <CJK> +0x9AC2 # <CJK> +0x9AC5 # <CJK> +0x9ACB # <CJK> +0x9ACC # <CJK> +0x9AD1 # <CJK> +0x9AD3 # <CJK> +0x9AD8 # <CJK> +0x9ADF # <CJK> +0x9AE1 # <CJK> +0x9AE6 # <CJK> +0x9AEB # <CJK> +0x9AED # <CJK> +0x9AEF # <CJK> +0x9AF9 # <CJK> +0x9AFB # <CJK> +0x9B03 # <CJK> +0x9B08 # <CJK> +0x9B0F # <CJK> +0x9B13 # <CJK> +0x9B1F # <CJK> +0x9B23 # <CJK> +0x9B2F # <CJK> +0x9B32 # <CJK> +0x9B3B # <CJK> +0x9B3C # <CJK> +0x9B41 # <CJK> +0x9B42 # <CJK> +0x9B43 # <CJK> +0x9B44 # <CJK> +0x9B45 # <CJK> +0x9B47 # <CJK> +0x9B48 # <CJK> +0x9B49 # <CJK> +0x9B4D # <CJK> +0x9B4F # <CJK> +0x9B51 # <CJK> +0x9B54 # <CJK> +0x9C7C # <CJK> +0x9C7F # <CJK> +0x9C81 # <CJK> +0x9C82 # <CJK> +0x9C85 # <CJK> +0x9C86 # <CJK> +0x9C87 # <CJK> +0x9C88 # <CJK> +0x9C8B # <CJK> +0x9C8D # <CJK> +0x9C8E # <CJK> +0x9C90 # <CJK> +0x9C91 # <CJK> +0x9C92 # <CJK> +0x9C94 # <CJK> +0x9C95 # <CJK> +0x9C9A # <CJK> +0x9C9B # <CJK> +0x9C9C # <CJK> +0x9C9E # <CJK> +0x9C9F # <CJK> +0x9CA0 # <CJK> +0x9CA1 # <CJK> +0x9CA2 # <CJK> +0x9CA3 # <CJK> +0x9CA4 # <CJK> +0x9CA5 # <CJK> +0x9CA6 # <CJK> +0x9CA7 # <CJK> +0x9CA8 # <CJK> +0x9CA9 # <CJK> +0x9CAB # <CJK> +0x9CAD # <CJK> +0x9CAE # <CJK> +0x9CB0 # <CJK> +0x9CB1 # <CJK> +0x9CB2 # <CJK> +0x9CB3 # <CJK> +0x9CB4 # <CJK> +0x9CB5 # <CJK> +0x9CB6 # <CJK> +0x9CB7 # <CJK> +0x9CB8 # <CJK> +0x9CBA # <CJK> +0x9CBB # <CJK> +0x9CBC # <CJK> +0x9CBD # <CJK> +0x9CC3 # <CJK> +0x9CC4 # <CJK> +0x9CC5 # <CJK> +0x9CC6 # <CJK> +0x9CC7 # <CJK> +0x9CCA # <CJK> +0x9CCB # <CJK> +0x9CCC # <CJK> +0x9CCD # <CJK> +0x9CCE # <CJK> +0x9CCF # <CJK> +0x9CD0 # <CJK> +0x9CD3 # <CJK> +0x9CD4 # <CJK> +0x9CD5 # <CJK> +0x9CD6 # <CJK> +0x9CD7 # <CJK> +0x9CD8 # <CJK> +0x9CD9 # <CJK> +0x9CDC # <CJK> +0x9CDD # <CJK> +0x9CDE # <CJK> +0x9CDF # <CJK> +0x9CE2 # <CJK> +0x9E1F # <CJK> +0x9E20 # <CJK> +0x9E21 # <CJK> +0x9E22 # <CJK> +0x9E23 # <CJK> +0x9E25 # <CJK> +0x9E26 # <CJK> +0x9E28 # <CJK> +0x9E29 # <CJK> +0x9E2A # <CJK> +0x9E2B # <CJK> +0x9E2C # <CJK> +0x9E2D # <CJK> +0x9E2F # <CJK> +0x9E31 # <CJK> +0x9E32 # <CJK> +0x9E33 # <CJK> +0x9E35 # <CJK> +0x9E36 # <CJK> +0x9E37 # <CJK> +0x9E38 # <CJK> +0x9E39 # <CJK> +0x9E3A # <CJK> +0x9E3D # <CJK> +0x9E3E # <CJK> +0x9E3F # <CJK> +0x9E41 # <CJK> +0x9E42 # <CJK> +0x9E43 # <CJK> +0x9E44 # <CJK> +0x9E45 # <CJK> +0x9E46 # <CJK> +0x9E47 # <CJK> +0x9E48 # <CJK> +0x9E49 # <CJK> +0x9E4A # <CJK> +0x9E4B # <CJK> +0x9E4C # <CJK> +0x9E4E # <CJK> +0x9E4F # <CJK> +0x9E51 # <CJK> +0x9E55 # <CJK> +0x9E57 # <CJK> +0x9E58 # <CJK> +0x9E5A # <CJK> +0x9E5B # <CJK> +0x9E5C # <CJK> +0x9E5E # <CJK> +0x9E63 # <CJK> +0x9E64 # <CJK> +0x9E66 # <CJK> +0x9E67 # <CJK> +0x9E68 # <CJK> +0x9E69 # <CJK> +0x9E6A # <CJK> +0x9E6B # <CJK> +0x9E6C # <CJK> +0x9E6D # <CJK> +0x9E70 # <CJK> +0x9E71 # <CJK> +0x9E73 # <CJK> +0x9E7E # <CJK> +0x9E7F # <CJK> +0x9E82 # <CJK> +0x9E87 # <CJK> +0x9E88 # <CJK> +0x9E8B # <CJK> +0x9E92 # <CJK> +0x9E93 # <CJK> +0x9E9D # <CJK> +0x9E9F # <CJK> +0x9EA6 # <CJK> +0x9EB4 # <CJK> +0x9EB8 # <CJK> +0x9EBB # <CJK> +0x9EBD # <CJK> +0x9EBE # <CJK> +0x9EC4 # <CJK> +0x9EC9 # <CJK> +0x9ECD # <CJK> +0x9ECE # <CJK> +0x9ECF # <CJK> +0x9ED1 # <CJK> +0x9ED4 # <CJK> +0x9ED8 # <CJK> +0x9EDB # <CJK> +0x9EDC # <CJK> +0x9EDD # <CJK> +0x9EDF # <CJK> +0x9EE0 # <CJK> +0x9EE2 # <CJK> +0x9EE5 # <CJK> +0x9EE7 # <CJK> +0x9EE9 # <CJK> +0x9EEA # <CJK> +0x9EEF # <CJK> +0x9EF9 # <CJK> +0x9EFB # <CJK> +0x9EFC # <CJK> +0x9EFE # <CJK> +0x9F0B # <CJK> +0x9F0D # <CJK> +0x9F0E # <CJK> +0x9F10 # <CJK> +0x9F13 # <CJK> +0x9F17 # <CJK> +0x9F19 # <CJK> +0x9F20 # <CJK> +0x9F22 # <CJK> +0x9F2C # <CJK> +0x9F2F # <CJK> +0x9F37 # <CJK> +0x9F39 # <CJK> +0x9F3B # <CJK> +0x9F3D # <CJK> +0x9F3E # <CJK> +0x9F44 # <CJK> +0x9F50 # <CJK> +0x9F51 # <CJK> +0x9F7F # <CJK> +0x9F80 # <CJK> +0x9F83 # <CJK> +0x9F84 # <CJK> +0x9F85 # <CJK> +0x9F86 # <CJK> +0x9F87 # <CJK> +0x9F88 # <CJK> +0x9F89 # <CJK> +0x9F8A # <CJK> +0x9F8B # <CJK> +0x9F8C # <CJK> +0x9F99 # <CJK> +0x9F9A # <CJK> +0x9F9B # <CJK> +0x9F9F # <CJK> +0x9FA0 # <CJK> Index: xc/lib/fontconfig/fc-lang/zh_hk.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/zh_hk.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/zh_hk.orth Mon Jul 8 22:28:26 2002 @@ -0,0 +1,2240 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/zh_hk.orth,v 1.1 2002/07/09 02:28:26 keithp Exp $ +# +# Copyright © 2002 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. +# +# Chinese Hong Kong Supplementary Character Set (ZH-HK) +# +# Taken from the HKSCS-2001, including only the non-PUA BMP glyphs +# as encoded in ISO/IEC 10646-1:2000 +4E04 +4E1A +4E1C +4E21 +4E24 +4E28 +4E2A +4E2C +4E2F +4E36 +4E37 +4E3D +4E3F +4E49 +4E5A +4E5B +4E6A +4E78 +4E80 +4E81 +4E85 +4E87 +4E89 +4E98 +4E9A +4EA0 +4EA3 +4EB7 +4EBB +4EBC +4EBF +4ECE +4EEA +4EEB +4EEE +4EF8 +4F03 +4F17 +4F1A +4F28 +4F29 +4F32 +4F37 +4F39 +4F42 +4F45 +4F4B +4F72 +4F8A +4FA2 +4FA8 +4FAB +4FB0 +4FBD +4FC8 +4FCC +4FE4 +4FE5 +4FF0 +4FF2 +4FF9 +4FFD +5003 +5008 +502E +5034 +503B +5056 +5058 +5066 +506C +5081 +5088 +5090 +50A6 +50BC +50CD +50D0 +50D9 +50DF +50E1 +50F4 +50FC +5101 +510D +510E +512B +5156 +5160 +516A +5174 +5179 +5182 +5186 +5188 +5196 +519A +519C +51A7 +51A8 +51AB +51AE +51B2 +51B3 +51B4 +51B5 +51B8 +51C3 +51C7 +51C9 +51CF +51D1 +51D2 +51D3 +51DB +51DF +51E2 +51E4 +51ED +51F4 +51FC +51FE +5202 +5205 +520B +521F +5220 +5226 +5227 +5234 +523C +5257 +5259 +5260 +5268 +5273 +5279 +528F +5290 +5294 +529A +52A1 +52A4 +52A8 +52B5 +52B9 +52C5 +52CC +52D0 +52D1 +52E0 +52E1 +52F9 +5301 +5324 +5327 +532C +5332 +5333 +5338 +533B +5342 +534E +535D +535F +5364 +5367 +5369 +536D +5374 +537D +537E +5393 +53A0 +53A2 +53A6 +53A8 +53A9 +53AA +53AB +53AE +53B0 +53B6 +53C1 +53C2 +53C5 +53CC +53D0 +53D1 +53D2 +53D8 +53D9 +53DA +53E0 +53F6 +53F7 +53FE +5413 +5414 +5416 +541A +5421 +5423 +542F +5432 +5434 +544B +544D +5469 +546A +546D +5485 +548F +5493 +5494 +5497 +549C +549E +54A3 +54A4 +54B2 +54B4 +54B9 +54CB +54CC +54CD +54D0 +54DA +54E3 +54EF +5502 +550D +5513 +5518 +551E +5523 +5525 +5528 +552B +553F +5547 +5549 +5553 +555D +5569 +556B +5571 +5572 +5573 +5579 +5586 +5590 +55A9 +55B0 +55B4 +55B9 +55BA +55BC +55C1 +55D7 +55D8 +55DE +55EA +55EC +55F0 +55F1 +55F5 +55FB +5605 +5611 +561E +5620 +5621 +5622 +5623 +5625 +562D +5637 +5643 +564D +564F +5650 +5652 +5654 +565D +5661 +567A +567B +567C +5689 +568A +568B +5692 +569E +569F +56A1 +56A4 +56AF +56B1 +56B9 +56BF +56D6 +56E2 +56ED +56EF +56F1 +56FD +5700 +5715 +571D +5732 +573D +573F +5742 +5743 +5746 +5754 +5757 +575B +575F +5767 +577A +577E +577F +5788 +578A +578D +5790 +579C +57A1 +57A7 +57AA +57B4 +57BB +57BE +57C4 +57C8 +57D7 +57DD +57DE +57E6 +57EF +57FE +5803 +5812 +5822 +5826 +583A +5840 +5844 +5847 +585C +585F +5869 +586C +5872 +5873 +5892 +5899 +589A +58A7 +58AA +58B0 +58B5 +58B6 +58BB +58CB +58D0 +58DC +58E0 +58F0 +58F2 +58F3 +58FB +5902 +5904 +5905 +5907 +590A +5911 +591F +5932 +5934 +5965 +5975 +5989 +5994 +599A +599F +59AC +59B0 +59B7 +59B8 +59C4 +59C9 +59D9 +59EB +59EF +59F0 +59F8 +59F9 +5A02 +5A0B +5A0D +5A12 +5A1A +5A21 +5A24 +5A27 +5A2A +5A2B +5A2C +5A3D +5A45 +5A54 +5A59 +5A61 +5A63 +5A68 +5A6B +5A6E +5A71 +5A79 +5A7E +5A81 +5A82 +5A86 +5A88 +5A91 +5A96 +5A99 +5AA0 +5AA1 +5AAB +5AC3 +5ACE +5ACF +5AD3 +5AE4 +5AF0 +5AF2 +5AFA +5AFE +5B0D +5B11 +5B15 +5B1F +5B2B +5B41 +5B44 +5B46 +5B4A +5B4F +5B66 +5B68 +5B6D +5B74 +5B76 +5B7C +5B80 +5B82 +5B90 +5B96 +5B9D +5B9E +5B9F +5BAA +5BC3 +5BD5 +5BD7 +5BF3 +5BFF +5C05 +5C13 +5C14 +5C1C +5C1E +5C20 +5C23 +5C49 +5C4A +5C53 +5C5E +5C85 +5C99 +5C9A +5C9C +5C9E +5CBA +5CC1 +5CC2 +5CD1 +5CE5 +5CE9 +5CEF +5CF5 +5D10 +5D15 +5D18 +5D2C +5D2F +5D3E +5D46 +5D48 +5D56 +5D57 +5D5B +5D70 +5D74 +5D7B +5D85 +5D8B +5D8E +5DA4 +5DAB +5DB6 +5DB9 +5DC1 +5DD7 +5DDB +5DF5 +5E09 +5E0B +5E12 +5E2E +5E42 +5E48 +5E5E +5E7A +5E7F +5E83 +5E86 +5E92 +5E99 +5EBD +5ECD +5ED0 +5EF4 +5EF8 +5EF9 +5EFB +5EFC +5F0C +5F0D +5F0E +5F25 +5F3A +5F4D +5F50 +5F51 +5F5C +5F61 +5F63 +5F72 +5F7B +5F83 +5FA4 +5FA7 +5FB1 +5FBA +5FC2 +5FC4 +5FDB +5FDF +6023 +6031 +603B +604A +6052 +6075 +6077 +607E +609E +60A4 +60A7 +60B3 +60D7 +60DE +60E3 +60E7 +60E8 +60E9 +60FD +6107 +610C +6119 +6122 +6130 +613D +6142 +6150 +6159 +615C +6160 +6164 +616F +617D +6181 +6187 +6195 +6198 +6199 +619C +61B7 +61B9 +61C0 +61CF +61D0 +61D3 +61DA +61E2 +622C +6237 +6239 +624C +6268 +6282 +6285 +6290 +629D +62A4 +62A6 +62C3 +62C5 +62D5 +62DF +62E5 +6318 +632E +6331 +6335 +6337 +6364 +636C +6379 +637F +638B +63B9 +63C1 +63D1 +63DE +63E2 +63E6 +63F8 +63FB +63FC +63FE +6407 +6432 +6438 +643A +643B +645A +6471 +647C +648D +6491 +64AF +64B4 +64B6 +64C0 +64D3 +64DD +64E1 +64E5 +64E7 +64EA +650A +6511 +651E +651F +6530 +6534 +6535 +654D +655F +656B +656D +6585 +6586 +6588 +6589 +658B +65B5 +65BE +65D1 +65D4 +65E0 +65E3 +65FF +6618 +661E +6623 +6630 +6644 +6648 +664B +6653 +6657 +6663 +6667 +666B +6673 +667D +6685 +668E +6692 +669A +66A4 +66AD +66B3 +66B6 +66BF +66CD +66CE +66F1 +6702 +670C +670E +6716 +6719 +671E +6725 +6736 +6744 +6761 +6762 +6767 +676B +678F +67A0 +67A4 +67AC +67B1 +67BF +67D6 +67D7 +67F9 +67FE +6800 +6801 +6802 +6803 +6804 +680D +6810 +681B +681E +6822 +6836 +6837 +683E +6847 +684A +6855 +6856 +685D +6865 +6884 +6888 +6898 +68A6 +68B6 +68B9 +68BD +68C3 +68C5 +68CA +6900 +6901 +6902 +6903 +6909 +6918 +6919 +691A +691B +692C +6936 +693E +6943 +6946 +6955 +6961 +6964 +6967 +6972 +6973 +6980 +6985 +698A +6998 +699F +69A2 +69B2 +69C0 +69D1 +69D5 +69D6 +69E1 +69E9 +69F9 +69FA +6A03 +6A0B +6A0C +6A1A +6A1C +6A2B +6A2C +6A2D +6A33 +6A43 +6A45 +6A4C +6A52 +6A53 +6A57 +6A63 +6A65 +6A71 +6A74 +6A7A +6A82 +6A8A +6A8F +6A99 +6A9D +6AA7 +6AAB +6AB1 +6AB2 +6AB5 +6ABE +6AC8 +6AC9 +6ACA +6AD4 +6AD8 +6AF6 +6B05 +6B1D +6B35 +6B52 +6B57 +6B6F +6B74 +6B7A +6B81 +6BC1 +6BDC +6BE1 +6BEA +6BFA +6C1C +6C31 +6C35 +6C37 +6C39 +6C3A +6C3D +6C49 +6C58 +6C5A +6C6E +6C75 +6C79 +6C7F +6C9F +6CA2 +6CAA +6CAF +6CB2 +6CCB +6CCE +6CDF +6CEA +6CFF +6D02 +6D05 +6D06 +6D24 +6D26 +6D4E +6D57 +6D5B +6D5C +6D71 +6D72 +6D81 +6D8F +6D96 +6DA4 +6DA5 +6DB1 +6DB9 +6DFE +6E02 +6E04 +6E0A +6E0F +6E15 +6E18 +6E29 +6E2A +6E4F +6E50 +6E59 +6E76 +6E7C +6E86 +6E8B +6E9A +6EB5 +6EB8 +6EBB +6ED9 +6EDA +6EDB +6EDD +6EE2 +6EE8 +6EE9 +6EFA +6F04 +6F0B +6F0C +6F16 +6F17 +6F24 +6F34 +6F3D +6F44 +6F56 +6F5C +6F74 +6F79 +6F81 +6F8A +6F9D +6F9F +6FB5 +6FBB +6FBE +6FD3 +6FD9 +6FDA +6FF6 +6FF8 +7003 +701E +702C +704B +704D +7050 +7054 +705C +7067 +706C +706F +7075 +7077 +7079 +707E +707F +7081 +7089 +708B +708F +70A0 +70A3 +70A5 +70A6 +70A7 +70B9 +70BB +70BC +70BD +70C0 +70C4 +70CC +70D0 +70D5 +70D6 +70DF +70F1 +70F5 +70FE +7105 +711D +7129 +712B +712C +7133 +7134 +7135 +713B +713E +7140 +7145 +714A +714F +7151 +716B +7171 +7173 +7175 +7176 +7177 +717A +717C +717E +7188 +718C +718E +7191 +7196 +7198 +71A2 +71A3 +71AD +71B4 +71B7 +71BA +71D1 +71DD +71EB +71F5 +71F6 +7200 +7209 +720E +720F +7215 +7216 +7217 +7224 +722B +722E +7240 +7250 +7255 +7257 +725C +7266 +7282 +7287 +728F +7294 +729F +72AD +72B2 +72CD +72E2 +7302 +7304 +7310 +7328 +732A +732B +732C +732E +7338 +7339 +7341 +7348 +734F +7371 +7374 +738C +738F +7398 +739C +739E +73A7 +73AA +73BA +73C9 +73CE +73CF +73D0 +73D5 +73E1 +73E2 +73E4 +73E6 +73EF +73F3 +73F7 +73F9 +73FB +7402 +7411 +7412 +7414 +7415 +7417 +7419 +741C +741E +741F +7437 +7438 +7439 +743C +7443 +7445 +7447 +7448 +7449 +7453 +7456 +745D +7460 +7465 +7468 +746B +746C +7474 +7476 +747A +7482 +748C +748D +7499 +749B +74A4 +74B4 +74B9 +74C8 +74CC +74D0 +74D3 +74E7 +74F0 +74F1 +74F2 +74F8 +7505 +750E +7519 +751E +7534 +7535 +753B +7542 +7546 +754A +754D +7551 +7553 +7555 +7560 +7567 +756D +756E +7572 +757A +7583 +758D +758E +7592 +759E +75B1 +75B4 +75C3 +75C8 +75DC +7602 +7607 +762C +763B +7640 +764D +764E +764F +7651 +7654 +7666 +7667 +766F +7673 +7674 +7676 +767A +7690 +76A1 +76A5 +76B7 +76CC +76D6 +76D9 +770C +770E +770F +771E +7724 +7726 +772B +7740 +7743 +7758 +7772 +7777 +7778 +777A +777B +7793 +7798 +77AF +77B9 +77BE +77C3 +77C5 +77CB +77DD +77E6 +77F4 +77FE +7808 +7818 +781C +781E +7839 +783C +783D +7842 +7844 +7847 +784B +7851 +7853 +7854 +7866 +787A +7881 +7888 +788D +78AF +78B1 +78B6 +78B8 +78B9 +78C7 +78D2 +78D3 +78D7 +78D8 +78E4 +78EE +78F0 +78F1 +78F5 +7906 +792E +7932 +7933 +7934 +7936 +793B +793C +7958 +7959 +7962 +7971 +797E +7980 +7983 +7986 +7987 +7991 +7999 +799D +799F +79A5 +79A9 +79C4 +79C6 +79CC +79D4 +79E2 +79F1 +79F4 +7A06 +7A2A +7A2D +7A3A +7A3E +7A43 +7A45 +7A49 +7A65 +7A7D +7A83 +7A91 +7A93 +7AB0 +7ABB +7ABC +7AC2 +7AC3 +7AC8 +7AC9 +7ACF +7AD3 +7ADA +7ADB +7ADC +7ADD +7AE2 +7AE7 +7AE9 +7AEA +7AFE +7B0B +7B0C +7B14 +7B1F +7B27 +7B29 +7B39 +7B42 +7B43 +7B55 +7B62 +7B6C +7B6F +7B7B +7B92 +7BA2 +7BA3 +7BB2 +7BCF +7BD0 +7BEC +7BFA +7BFC +7C12 +7C15 +7C1B +7C35 +7C42 +7C44 +7C51 +7C56 +7C5D +7C6D +7C70 +7C74 +7C7B +7C7C +7C7E +7C83 +7C86 +7C8E +7C9C +7CA6 +7CA7 +7CAC +7CAE +7CB8 +7CC2 +7CC3 +7CC7 +7CC9 +7CCD +7CD3 +7CDA +7CE6 +7CED +7CF3 +7CF5 +7CF9 +7CFC +7D25 +7D4D +7D5A +7D5D +7D89 +7D8B +7D97 +7DA4 +7DA8 +7DAB +7DB3 +7DCD +7DCF +7DD0 +7DD3 +7DD4 +7DDC +7DE4 +7DE5 +7DF5 +7DFD +7DFE +7E07 +7E27 +7E5B +7E65 +7E67 +7E6C +7E6E +7E7F +7E8E +7E92 +7E9F +7EA4 +7EAC +7EBA +7EC7 +7ECF +7EDF +7F06 +7F37 +7F40 +7F41 +7F47 +7F49 +7F4E +7F52 +7F53 +7F71 +7F78 +7F8F +7F93 +7F97 +7FA3 +7FAE +7FB4 +7FDD +7FE7 +7FFA +8002 +8008 +801D +8020 +8025 +802E +802F +8031 +803B +803C +8054 +805B +8061 +8062 +8063 +8066 +8080 +809F +80A7 +80B6 +80B7 +80BC +80BD +80C6 +80E9 +80EC +80F6 +8103 +8107 +8109 +810C +810E +8112 +8114 +8117 +811A +812A +8132 +8134 +8137 +8142 +8148 +8156 +8159 +815A +816D +817C +8184 +8193 +81A5 +81AA +81B6 +81C1 +81C8 +81E4 +81EF +81F6 +8218 +821A +8226 +8229 +822D +823E +8254 +8262 +8265 +8276 +8279 +827A +827B +8287 +82A6 +82AA +82BF +82C4 +82CA +82CF +82D0 +82D8 +82E2 +82EE +82F7 +82F8 +82FC +82FD +82FF +830B +8318 +831A +831D +833D +8357 +8362 +8363 +8366 +836F +8385 +8391 +839C +83AC +83B9 +83BE +83CD +83D3 +83ED +8405 +8414 +8416 +8418 +841C +8420 +8421 +8424 +8426 +842E +843E +8448 +844A +8453 +8455 +8458 +845C +8462 +8464 +8471 +8472 +847F +8480 +8488 +8492 +8493 +8496 +84A3 +84AD +84BD +84BE +84DA +84DE +84E1 +84E2 +84E4 +84E5 +84F8 +8503 +8505 +8510 +8533 +8534 +8538 +8542 +854B +854C +8552 +855A +855F +856F +8570 +8573 +8597 +85C1 +85D6 +85E0 +85EE +85FC +8602 +860D +860F +8610 +8614 +8616 +8628 +862F +8642 +8645 +866C +8672 +867E +8692 +86A0 +86AD +86B2 +86EF +8770 +8771 +877D +8786 +878B +878C +87A5 +87A9 +87B1 +87C1 +87CE +87D6 +87DA +87EE +87F5 +8804 +880F +8818 +8827 +882D +8842 +8845 +8846 +884F +885E +8860 +8864 +8865 +886E +8884 +8887 +888F +8890 +889C +88A0 +88AE +88B4 +88B5 +88BF +88C5 +88C7 +88CF +88E6 +88F5 +88FF +8900 +8924 +8943 +8947 +894D +8954 +8965 +8977 +8980 +8987 +8989 +898A +8991 +8994 +89A5 +89A7 +89A9 +89BC +89C1 +89C6 +89E7 +8A1C +8A29 +8A2B +8A38 +8A3D +8A49 +8A67 +8A7E +8A90 +8A94 +8A9C +8AA9 +8AAF +8AB4 +8ADA +8AEA +8B0C +8B1F +8B2D +8B3F +8B43 +8B4C +8B4D +8B5E +8B62 +8B69 +8B81 +8B83 +8B90 +8B9B +8BA0 +8BBE +8BE2 +8C51 +8C9B +8C9F +8CAD +8CCD +8CD4 +8CD6 +8CDB +8CE9 +8CEB +8CF2 +8CF7 +8D03 +8D0B +8D0C +8D11 +8D12 +8D18 +8D1C +8D1D +8D7A +8D82 +8DA6 +8DA9 +8DC0 +8DC3 +8DD4 +8E01 +8E0E +8E28 +8E2A +8E2D +8E3A +8E46 +8E4F +8E68 +8E71 +8E75 +8E77 +8E7E +8E80 +8EA7 +8EAD +8EB0 +8EB6 +8EB9 +8EBC +8EC3 +8ECE +8EDA +8EE2 +8EE4 +8EED +8EF2 +8F19 +8F2D +8F30 +8F41 +8F4A +8F5C +8F66 +8F67 +8F6E +8F93 +8FA0 +8FA5 +8FA7 +8FB3 +8FB5 +8FB6 +8FB7 +8FB8 +8FB9 +8FBA +8FBB +8FBC +8FBE +8FC1 +8FCA +8FCC +8FCF +8FD0 +8FDA +8FF9 +9008 +9012 +9033 +9037 +904C +9056 +9061 +9064 +906C +90A8 +90AE +90BB +90C4 +9151 +9159 +915C +915E +9167 +9170 +9176 +917C +918C +918E +91A9 +91B6 +91BB +91C4 +91D6 +91DF +91E5 +91F6 +91FA +91FE +9208 +920E +9213 +9221 +9228 +922A +922B +9235 +923C +9241 +9244 +9255 +9258 +925D +925F +9262 +926B +926E +9277 +9281 +9284 +9289 +928F +92AE +92B1 +92B9 +92BA +92BE +92BF +92D4 +92DB +92E3 +92E5 +92EB +92EC +92F2 +92F3 +92F4 +92F6 +92FD +9303 +9307 +932C +9330 +9331 +9340 +9341 +9342 +9343 +9344 +9345 +9348 +935F +9362 +9366 +9368 +9369 +936B +936E +9373 +9374 +9378 +937D +9381 +9384 +9385 +9386 +9387 +9390 +939C +93A0 +93AD +93B8 +93BB +93BD +93BF +93C6 +93CB +93D3 +93DB +93E0 +93F0 +93F1 +93F3 +93F4 +9401 +9404 +9408 +9417 +941B +941D +9424 +9425 +9426 +9427 +942D +943E +9442 +9443 +944D +9454 +9458 +945B +9465 +9467 +946C +9479 +947B +9485 +949F +94A2 +94C1 +94C3 +94DC +94F6 +952D +9547 +9578 +957F +9585 +9596 +9597 +9599 +95A0 +95A2 +95A6 +95A7 +95AA +95E8 +95F4 +961D +9633 +9638 +9641 +9645 +9656 +9669 +967B +9681 +968F +9696 +96A3 +96A5 +96B6 +96BD +96F4 +9703 +971B +9721 +9731 +9736 +9740 +9741 +9751 +9755 +9757 +975D +975F +976D +9771 +9787 +9789 +979B +979F +97B1 +97B2 +97B4 +97B8 +97BA +97BD +97BE +97C0 +97C2 +97C8 +97D2 +97E0 +97E6 +97EE +97F2 +97F5 +9814 +9815 +981F +9823 +982E +9833 +9834 +9847 +984B +9866 +9868 +986C +9875 +98B4 +98B7 +98B9 +98C3 +98C7 +98C8 +98CA +98CE +98DC +98DE +98E0 +98E1 +98E6 +98EC +98F1 +98F5 +990E +9919 +991C +9937 +9938 +9939 +993B +9940 +9942 +994A +994D +995D +9962 +9963 +999B +99A4 +99AA +99B8 +99BC +99C4 +99C5 +99DA +99E0 +99E1 +99E6 +99F5 +9A0C +9A10 +9A1F +9A21 +9A26 +9A2F +9A3B +9A3C +9A58 +9A5C +9A63 +9A6C +9A8F +9AB2 +9AB6 +9ABA +9ABD +9AD7 +9AE0 +9AE2 +9AF4 +9AFF +9B02 +9B09 +9B0F +9B14 +9B2A +9B2D +9B34 +9B39 +9B40 +9B50 +9B69 +9B7F +9B81 +9B83 +9B8B +9B8D +9B8E +9B8F +9B97 +9B9D +9B9F +9BB0 +9BCF +9BDD +9BE9 +9BED +9BF1 +9BF4 +9BFF +9C02 +9C0A +9C0C +9C10 +9C15 +9C1B +9C1F +9C20 +9C26 +9C2F +9C35 +9C3A +9C45 +9C4F +9C53 +9C5D +9C72 +9C7B +9C7C +9D02 +9D0C +9D16 +9D21 +9D34 +9D39 +9D44 +9D49 +9D4E +9D50 +9D5E +9D6D +9D6E +9D7C +9D7E +9D83 +9D93 +9DA5 +9DAB +9DBD +9DC0 +9DC4 +9DC9 +9DD4 +9DFC +9E0A +9E0C +9E0E +9E18 +9E1C +9E1F +9E7B +9E81 +9E84 +9E85 +9E90 +9E95 +9E96 +9E98 +9E9E +9EA2 +9EA6 +9EA8 +9EAA +9EAB +9EAC +9EAF +9EB1 +9EBD +9EBF +9EC1 +9EC4 +9EC6 +9EC7 +9EE2 +9EF1 +9EF8 +9EFE +9F02 +9F08 +9F17 +9F26 +9F27 +9F39 +9F44 +9F45 +9F50 +9F53 +9F5A +9F62 +9F69 +9F7F +9F8E +9F99 +9F9F +9FA5 +F907 Index: xc/lib/fontconfig/fc-lang/zh_mo.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/zh_mo.orth:1.1 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/zh_mo.orth Mon Jul 8 03:31:51 2002 @@ -0,0 +1,27 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/zh_mo.orth,v 1.1 2002/07/08 07:31:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Chinese in Macau (ZH-MO) +# +# Just use Big5 as for ZH-TW +include zh_tw.orth Index: xc/lib/fontconfig/fc-lang/zh_sg.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/zh_sg.orth:1.2 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/zh_sg.orth Mon Aug 19 15:32:03 2002 @@ -0,0 +1,27 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/zh_sg.orth,v 1.2 2002/08/19 19:32:03 keithp Exp $ +# +# Copyright © 2002 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. +# +# Chinese in Singapore (ZH-SG) +# +# Just use GB2312 as for ZH-CN +include zh_cn.orth Index: xc/lib/fontconfig/fc-lang/zh_tw.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/zh_tw.orth:1.3 --- /dev/null Thu Feb 27 12:28:07 2003 +++ xc/lib/fontconfig/fc-lang/zh_tw.orth Mon Jul 8 22:28:26 2002 @@ -0,0 +1,13105 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/zh_tw.orth,v 1.3 2002/07/09 02:28:26 keithp Exp $ +# +# Copyright © 2002 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. +# +# Chinese (traditional) ZH-TW +# +# Made by trimming the Big5 -> unicode mapping down to just Chinese glyphs +# +#0x3000 # ideographic space +#0x3001 # ideographic comma +#0x3002 # ideographic full stop +#0x3003 # ditto mark +#0x3005 # ideographic iteration mark +#0x3021 # Suzhou numeral 1 +#0x3022 # Suzhou numeral 2 +#0x3023 # Suzhou numeral 3 +#0x3024 # Suzhou numeral 4 +#0x3025 # Suzhou numeral 5 +#0x3026 # Suzhou numeral 6 +#0x3027 # Suzhou numeral 7 +#0x3028 # Suzhou numeral 8 +#0x3029 # Suzhou numeral 9 +# Han +0x4E00 +0x4E01 +0x4E03 +0x4E07 +0x4E08 +0x4E09 +0x4E0A +0x4E0B +0x4E0C +0x4E0D +0x4E0E +0x4E0F +0x4E10 +0x4E11 +0x4E14 +0x4E15 +0x4E16 +0x4E18 +0x4E19 +0x4E1E +0x4E1F +0x4E26 +0x4E2B +0x4E2D +0x4E2E +0x4E30 +0x4E31 +0x4E32 +0x4E33 +0x4E38 +0x4E39 +0x4E3B +0x4E3C +0x4E42 +0x4E43 +0x4E45 +0x4E47 +0x4E48 +0x4E4B +0x4E4D +0x4E4E +0x4E4F +0x4E52 +0x4E53 +0x4E56 +0x4E58 +0x4E59 +0x4E5C +0x4E5D +0x4E5E +0x4E5F +0x4E69 +0x4E73 +0x4E7E +0x4E7F +0x4E82 +0x4E83 +0x4E84 +0x4E86 +0x4E88 +0x4E8B +0x4E8C +0x4E8D +0x4E8E +0x4E91 +0x4E92 +0x4E93 +0x4E94 +0x4E95 +0x4E99 +0x4E9B +0x4E9E +0x4E9F +0x4EA1 +0x4EA2 +0x4EA4 +0x4EA5 +0x4EA6 +0x4EA8 +0x4EAB +0x4EAC +0x4EAD +0x4EAE +0x4EB3 +0x4EB6 +0x4EB9 +0x4EBA +0x4EC0 +0x4EC1 +0x4EC2 +0x4EC3 +0x4EC4 +0x4EC6 +0x4EC7 +0x4EC8 +0x4EC9 +0x4ECA +0x4ECB +0x4ECD +0x4ED4 +0x4ED5 +0x4ED6 +0x4ED7 +0x4ED8 +0x4ED9 +0x4EDA +0x4EDC +0x4EDD +0x4EDE +0x4EDF +0x4EE1 +0x4EE3 +0x4EE4 +0x4EE5 +0x4EE8 +0x4EE9 +0x4EF0 +0x4EF1 +0x4EF2 +0x4EF3 +0x4EF4 +0x4EF5 +0x4EF6 +0x4EF7 +0x4EFB +0x4EFD +0x4EFF +0x4F00 +0x4F01 +0x4F02 +0x4F04 +0x4F05 +0x4F08 +0x4F09 +0x4F0A +0x4F0B +0x4F0D +0x4F0E +0x4F0F +0x4F10 +0x4F11 +0x4F12 +0x4F13 +0x4F14 +0x4F15 +0x4F18 +0x4F19 +0x4F1D +0x4F22 +0x4F2C +0x4F2D +0x4F2F +0x4F30 +0x4F33 +0x4F34 +0x4F36 +0x4F38 +0x4F3A +0x4F3B +0x4F3C +0x4F3D +0x4F3E +0x4F3F +0x4F41 +0x4F43 +0x4F46 +0x4F47 +0x4F48 +0x4F49 +0x4F4C +0x4F4D +0x4F4E +0x4F4F +0x4F50 +0x4F51 +0x4F52 +0x4F53 +0x4F54 +0x4F55 +0x4F56 +0x4F57 +0x4F58 +0x4F59 +0x4F5A +0x4F5B +0x4F5C +0x4F5D +0x4F5E +0x4F5F +0x4F60 +0x4F61 +0x4F62 +0x4F63 +0x4F64 +0x4F67 +0x4F69 +0x4F6A +0x4F6B +0x4F6C +0x4F6E +0x4F6F +0x4F70 +0x4F73 +0x4F74 +0x4F75 +0x4F76 +0x4F77 +0x4F78 +0x4F79 +0x4F7A +0x4F7B +0x4F7C +0x4F7D +0x4F7E +0x4F7F +0x4F80 +0x4F81 +0x4F82 +0x4F83 +0x4F84 +0x4F85 +0x4F86 +0x4F87 +0x4F88 +0x4F89 +0x4F8B +0x4F8D +0x4F8F +0x4F90 +0x4F91 +0x4F92 +0x4F94 +0x4F95 +0x4F96 +0x4F97 +0x4F98 +0x4F9A +0x4F9B +0x4F9C +0x4F9D +0x4F9E +0x4FAE +0x4FAF +0x4FB2 +0x4FB3 +0x4FB5 +0x4FB6 +0x4FB7 +0x4FB9 +0x4FBA +0x4FBB +0x4FBF +0x4FC0 +0x4FC1 +0x4FC2 +0x4FC3 +0x4FC4 +0x4FC5 +0x4FC7 +0x4FC9 +0x4FCA +0x4FCB +0x4FCD +0x4FCE +0x4FCF +0x4FD0 +0x4FD1 +0x4FD3 +0x4FD4 +0x4FD6 +0x4FD7 +0x4FD8 +0x4FD9 +0x4FDA +0x4FDB +0x4FDC +0x4FDD +0x4FDE +0x4FDF +0x4FE0 +0x4FE1 +0x4FEC +0x4FEE +0x4FEF +0x4FF1 +0x4FF3 +0x4FF4 +0x4FF5 +0x4FF6 +0x4FF7 +0x4FF8 +0x4FFA +0x4FFE +0x5000 +0x5005 +0x5006 +0x5007 +0x5009 +0x500B +0x500C +0x500D +0x500E +0x500F +0x5011 +0x5012 +0x5013 +0x5014 +0x5015 +0x5016 +0x5017 +0x5018 +0x5019 +0x501A +0x501B +0x501C +0x501E +0x501F +0x5020 +0x5021 +0x5022 +0x5023 +0x5025 +0x5026 +0x5027 +0x5028 +0x5029 +0x502A +0x502B +0x502C +0x502D +0x502F +0x5030 +0x5031 +0x5033 +0x5035 +0x5037 +0x503C +0x5040 +0x5041 +0x5043 +0x5045 +0x5046 +0x5047 +0x5048 +0x5049 +0x504A +0x504B +0x504C +0x504D +0x504E +0x504F +0x5051 +0x5053 +0x5055 +0x5057 +0x505A +0x505B +0x505C +0x505D +0x505E +0x505F +0x5060 +0x5061 +0x5062 +0x5063 +0x5064 +0x5065 +0x5068 +0x5069 +0x506A +0x506B +0x506D +0x506E +0x506F +0x5070 +0x5072 +0x5073 +0x5074 +0x5075 +0x5076 +0x5077 +0x507A +0x507D +0x5080 +0x5082 +0x5083 +0x5085 +0x5087 +0x508B +0x508C +0x508D +0x508E +0x5091 +0x5092 +0x5094 +0x5095 +0x5096 +0x5098 +0x5099 +0x509A +0x509B +0x509C +0x509D +0x509E +0x50A2 +0x50A3 +0x50AC +0x50AD +0x50AE +0x50AF +0x50B0 +0x50B1 +0x50B2 +0x50B3 +0x50B4 +0x50B5 +0x50B6 +0x50B7 +0x50B8 +0x50BA +0x50BB +0x50BD +0x50BE +0x50BF +0x50C1 +0x50C2 +0x50C4 +0x50C5 +0x50C6 +0x50C7 +0x50C8 +0x50C9 +0x50CA +0x50CB +0x50CE +0x50CF +0x50D1 +0x50D3 +0x50D4 +0x50D5 +0x50D6 +0x50D7 +0x50DA +0x50DB +0x50DD +0x50E0 +0x50E3 +0x50E4 +0x50E5 +0x50E6 +0x50E7 +0x50E8 +0x50E9 +0x50EA +0x50EC +0x50ED +0x50EE +0x50EF +0x50F0 +0x50F1 +0x50F3 +0x50F5 +0x50F6 +0x50F8 +0x50F9 +0x50FB +0x50FD +0x50FE +0x50FF +0x5100 +0x5102 +0x5103 +0x5104 +0x5105 +0x5106 +0x5107 +0x5108 +0x5109 +0x510A +0x510B +0x510C +0x5110 +0x5111 +0x5112 +0x5113 +0x5114 +0x5115 +0x5117 +0x5118 +0x511A +0x511C +0x511F +0x5120 +0x5121 +0x5122 +0x5124 +0x5125 +0x5126 +0x5129 +0x512A +0x512D +0x512E +0x5130 +0x5131 +0x5132 +0x5133 +0x5134 +0x5135 +0x5137 +0x5138 +0x5139 +0x513A +0x513B +0x513C +0x513D +0x513F +0x5140 +0x5141 +0x5143 +0x5144 +0x5145 +0x5146 +0x5147 +0x5148 +0x5149 +0x514B +0x514C +0x514D +0x5152 +0x5154 +0x5155 +0x5157 +0x5159 +0x515A +0x515B +0x515C +0x515D +0x515E +0x515F +0x5161 +0x5162 +0x5163 +0x5165 +0x5167 +0x5168 +0x5169 +0x516B +0x516C +0x516D +0x516E +0x5171 +0x5175 +0x5176 +0x5177 +0x5178 +0x517C +0x5180 +0x5187 +0x5189 +0x518A +0x518D +0x518F +0x5191 +0x5192 +0x5193 +0x5194 +0x5195 +0x5197 +0x5198 +0x519E +0x51A0 +0x51A2 +0x51A4 +0x51A5 +0x51AA +0x51AC +0x51B0 +0x51B1 +0x51B6 +0x51B7 +0x51B9 +0x51BC +0x51BD +0x51BE +0x51C4 +0x51C5 +0x51C6 +0x51C8 +0x51CA +0x51CB +0x51CC +0x51CD +0x51CE +0x51D0 +0x51D4 +0x51D7 +0x51D8 +0x51DC +0x51DD +0x51DE +0x51E0 +0x51E1 +0x51F0 +0x51F1 +0x51F3 +0x51F5 +0x51F6 +0x51F8 +0x51F9 +0x51FA +0x51FD +0x5200 +0x5201 +0x5203 +0x5206 +0x5207 +0x5208 +0x5209 +0x520A +0x520C +0x520E +0x5210 +0x5211 +0x5212 +0x5213 +0x5216 +0x5217 +0x521C +0x521D +0x521E +0x5221 +0x5224 +0x5225 +0x5228 +0x5229 +0x522A +0x522E +0x5230 +0x5231 +0x5232 +0x5233 +0x5235 +0x5236 +0x5237 +0x5238 +0x523A +0x523B +0x5241 +0x5243 +0x5244 +0x5246 +0x5247 +0x5249 +0x524A +0x524B +0x524C +0x524D +0x524E +0x5252 +0x5254 +0x5255 +0x5256 +0x525A +0x525B +0x525C +0x525D +0x525E +0x525F +0x5261 +0x5262 +0x5269 +0x526A +0x526B +0x526C +0x526D +0x526E +0x526F +0x5272 +0x5274 +0x5275 +0x5277 +0x5278 +0x527A +0x527B +0x527C +0x527D +0x527F +0x5280 +0x5281 +0x5282 +0x5283 +0x5284 +0x5287 +0x5288 +0x5289 +0x528A +0x528B +0x528C +0x528D +0x5291 +0x5293 +0x5296 +0x5297 +0x5298 +0x5299 +0x529B +0x529F +0x52A0 +0x52A3 +0x52A6 +0x52A9 +0x52AA +0x52AB +0x52AC +0x52AD +0x52AE +0x52BB +0x52BC +0x52BE +0x52C0 +0x52C1 +0x52C2 +0x52C3 +0x52C7 +0x52C9 +0x52CD +0x52D2 +0x52D3 +0x52D5 +0x52D6 +0x52D7 +0x52D8 +0x52D9 +0x52DB +0x52DD +0x52DE +0x52DF +0x52E2 +0x52E3 +0x52E4 +0x52E6 +0x52E9 +0x52EB +0x52EF +0x52F0 +0x52F1 +0x52F3 +0x52F4 +0x52F5 +0x52F7 +0x52F8 +0x52FA +0x52FB +0x52FC +0x52FE +0x52FF +0x5305 +0x5306 +0x5308 +0x5309 +0x530A +0x530B +0x530D +0x530E +0x530F +0x5310 +0x5311 +0x5312 +0x5315 +0x5316 +0x5317 +0x5319 +0x531A +0x531C +0x531D +0x531F +0x5320 +0x5321 +0x5322 +0x5323 +0x532A +0x532D +0x532F +0x5330 +0x5331 +0x5334 +0x5337 +0x5339 +0x533C +0x533D +0x533E +0x533F +0x5340 +0x5341 +0x5343 +0x5344 +0x5345 +0x5347 +0x5348 +0x5349 +0x534A +0x534C +0x534D +0x5351 +0x5352 +0x5353 +0x5354 +0x5357 +0x535A +0x535C +0x535E +0x5360 +0x5361 +0x5363 +0x5366 +0x536C +0x536E +0x536F +0x5370 +0x5371 +0x5372 +0x5373 +0x5375 +0x5377 +0x5378 +0x5379 +0x537B +0x537C +0x537F +0x5382 +0x5384 +0x538A +0x538E +0x538F +0x5392 +0x5394 +0x5396 +0x5397 +0x5398 +0x5399 +0x539A +0x539C +0x539D +0x539E +0x539F +0x53A4 +0x53A5 +0x53A7 +0x53AC +0x53AD +0x53B2 +0x53B4 +0x53B9 +0x53BB +0x53C3 +0x53C8 +0x53C9 +0x53CA +0x53CB +0x53CD +0x53D4 +0x53D6 +0x53D7 +0x53DB +0x53DF +0x53E1 +0x53E2 +0x53E3 +0x53E4 +0x53E5 +0x53E6 +0x53E8 +0x53E9 +0x53EA +0x53EB +0x53EC +0x53ED +0x53EE +0x53EF +0x53F0 +0x53F1 +0x53F2 +0x53F3 +0x53F5 +0x53F8 +0x53FB +0x53FC +0x5401 +0x5403 +0x5404 +0x5406 +0x5407 +0x5408 +0x5409 +0x540A +0x540B +0x540C +0x540D +0x540E +0x540F +0x5410 +0x5411 +0x5412 +0x5418 +0x5419 +0x541B +0x541C +0x541D +0x541E +0x541F +0x5420 +0x5424 +0x5425 +0x5426 +0x5427 +0x5428 +0x5429 +0x542A +0x542B +0x542C +0x542D +0x542E +0x5430 +0x5431 +0x5433 +0x5435 +0x5436 +0x5437 +0x5438 +0x5439 +0x543B +0x543C +0x543D +0x543E +0x5440 +0x5441 +0x5442 +0x5443 +0x5445 +0x5446 +0x5447 +0x5448 +0x544A +0x544E +0x544F +0x5454 +0x5460 +0x5461 +0x5462 +0x5463 +0x5464 +0x5465 +0x5466 +0x5467 +0x5468 +0x546B +0x546C +0x546F +0x5470 +0x5471 +0x5472 +0x5473 +0x5474 +0x5475 +0x5476 +0x5477 +0x5478 +0x547A +0x547B +0x547C +0x547D +0x547E +0x547F +0x5480 +0x5481 +0x5482 +0x5484 +0x5486 +0x5487 +0x5488 +0x548B +0x548C +0x548D +0x548E +0x5490 +0x5491 +0x5492 +0x5495 +0x5496 +0x5498 +0x549A +0x54A0 +0x54A1 +0x54A2 +0x54A5 +0x54A6 +0x54A7 +0x54A8 +0x54A9 +0x54AA +0x54AB +0x54AC +0x54AD +0x54AE +0x54AF +0x54B0 +0x54B1 +0x54B3 +0x54B6 +0x54B7 +0x54B8 +0x54BA +0x54BB +0x54BC +0x54BD +0x54BE +0x54BF +0x54C0 +0x54C1 +0x54C2 +0x54C3 +0x54C4 +0x54C5 +0x54C6 +0x54C7 +0x54C8 +0x54C9 +0x54CE +0x54CF +0x54D6 +0x54DE +0x54E0 +0x54E1 +0x54E2 +0x54E4 +0x54E5 +0x54E6 +0x54E7 +0x54E8 +0x54E9 +0x54EA +0x54EB +0x54ED +0x54EE +0x54F1 +0x54F2 +0x54F3 +0x54F7 +0x54F8 +0x54FA +0x54FB +0x54FC +0x54FD +0x54FF +0x5501 +0x5503 +0x5504 +0x5505 +0x5506 +0x5507 +0x5508 +0x5509 +0x550A +0x550B +0x550C +0x550E +0x550F +0x5510 +0x5511 +0x5512 +0x5514 +0x5517 +0x551A +0x5526 +0x5527 +0x552A +0x552C +0x552D +0x552E +0x552F +0x5530 +0x5531 +0x5532 +0x5533 +0x5534 +0x5535 +0x5536 +0x5537 +0x5538 +0x5539 +0x553B +0x553C +0x553E +0x5540 +0x5541 +0x5543 +0x5544 +0x5545 +0x5546 +0x5548 +0x554A +0x554B +0x554D +0x554E +0x554F +0x5550 +0x5551 +0x5552 +0x5555 +0x5556 +0x5557 +0x555C +0x555E +0x555F +0x5561 +0x5562 +0x5563 +0x5564 +0x5565 +0x5566 +0x556A +0x5575 +0x5576 +0x5577 +0x557B +0x557C +0x557D +0x557E +0x557F +0x5580 +0x5581 +0x5582 +0x5583 +0x5584 +0x5587 +0x5588 +0x5589 +0x558A +0x558B +0x558C +0x558D +0x558E +0x558F +0x5591 +0x5592 +0x5593 +0x5594 +0x5595 +0x5598 +0x5599 +0x559A +0x559C +0x559D +0x559F +0x55A1 +0x55A2 +0x55A3 +0x55A4 +0x55A5 +0x55A6 +0x55A7 +0x55A8 +0x55AA +0x55AB +0x55AC +0x55AD +0x55AE +0x55B1 +0x55B2 +0x55B3 +0x55B5 +0x55BB +0x55BF +0x55C0 +0x55C2 +0x55C3 +0x55C4 +0x55C5 +0x55C6 +0x55C7 +0x55C8 +0x55C9 +0x55CA +0x55CB +0x55CC +0x55CD +0x55CE +0x55CF +0x55D0 +0x55D1 +0x55D2 +0x55D3 +0x55D4 +0x55D5 +0x55D6 +0x55D9 +0x55DA +0x55DB +0x55DC +0x55DD +0x55DF +0x55E1 +0x55E2 +0x55E3 +0x55E4 +0x55E5 +0x55E6 +0x55E7 +0x55E8 +0x55E9 +0x55EF +0x55F2 +0x55F6 +0x55F7 +0x55F9 +0x55FA +0x55FC +0x55FD +0x55FE +0x55FF +0x5600 +0x5601 +0x5602 +0x5604 +0x5606 +0x5608 +0x5609 +0x560C +0x560D +0x560E +0x560F +0x5610 +0x5612 +0x5613 +0x5614 +0x5615 +0x5616 +0x5617 +0x561B +0x561C +0x561D +0x561F +0x5627 +0x5629 +0x562A +0x562C +0x562E +0x562F +0x5630 +0x5632 +0x5633 +0x5634 +0x5635 +0x5636 +0x5638 +0x5639 +0x563A +0x563B +0x563D +0x563E +0x563F +0x5640 +0x5641 +0x5642 +0x5645 +0x5646 +0x5648 +0x5649 +0x564A +0x564C +0x564E +0x5653 +0x5657 +0x5658 +0x5659 +0x565A +0x565E +0x5660 +0x5662 +0x5663 +0x5664 +0x5665 +0x5666 +0x5668 +0x5669 +0x566A +0x566B +0x566C +0x566D +0x566E +0x566F +0x5670 +0x5671 +0x5672 +0x5673 +0x5674 +0x5676 +0x5677 +0x5678 +0x5679 +0x567E +0x567F +0x5680 +0x5681 +0x5682 +0x5683 +0x5684 +0x5685 +0x5686 +0x5687 +0x568C +0x568D +0x568E +0x568F +0x5690 +0x5693 +0x5695 +0x5697 +0x5698 +0x5699 +0x569A +0x569C +0x569D +0x56A5 +0x56A6 +0x56A7 +0x56A8 +0x56AA +0x56AB +0x56AC +0x56AD +0x56AE +0x56B2 +0x56B3 +0x56B4 +0x56B5 +0x56B6 +0x56B7 +0x56BC +0x56BD +0x56BE +0x56C0 +0x56C1 +0x56C2 +0x56C3 +0x56C5 +0x56C6 +0x56C8 +0x56C9 +0x56CA +0x56CB +0x56CC +0x56CD +0x56D1 +0x56D3 +0x56D4 +0x56D7 +0x56DA +0x56DB +0x56DD +0x56DE +0x56DF +0x56E0 +0x56E1 +0x56E4 +0x56E5 +0x56E7 +0x56EA +0x56EB +0x56EE +0x56F0 +0x56F7 +0x56F9 +0x56FA +0x56FF +0x5701 +0x5702 +0x5703 +0x5704 +0x5707 +0x5708 +0x5709 +0x570A +0x570B +0x570C +0x570D +0x5712 +0x5713 +0x5714 +0x5716 +0x5718 +0x571A +0x571B +0x571C +0x571E +0x571F +0x5720 +0x5722 +0x5723 +0x5728 +0x5729 +0x572A +0x572C +0x572D +0x572E +0x572F +0x5730 +0x5733 +0x5734 +0x573B +0x573E +0x5740 +0x5741 +0x5745 +0x5747 +0x5749 +0x574A +0x574B +0x574C +0x574D +0x574E +0x574F +0x5750 +0x5751 +0x5752 +0x5761 +0x5762 +0x5764 +0x5766 +0x5768 +0x5769 +0x576A +0x576B +0x576D +0x576F +0x5770 +0x5771 +0x5772 +0x5773 +0x5774 +0x5775 +0x5776 +0x5777 +0x577B +0x577C +0x577D +0x5780 +0x5782 +0x5783 +0x578B +0x578C +0x578F +0x5793 +0x5794 +0x5795 +0x5797 +0x5798 +0x5799 +0x579A +0x579B +0x579D +0x579E +0x579F +0x57A0 +0x57A2 +0x57A3 +0x57A4 +0x57A5 +0x57AE +0x57B5 +0x57B6 +0x57B8 +0x57B9 +0x57BA +0x57BC +0x57BD +0x57BF +0x57C1 +0x57C2 +0x57C3 +0x57C6 +0x57C7 +0x57CB +0x57CC +0x57CE +0x57CF +0x57D0 +0x57D2 +0x57D4 +0x57D5 +0x57DC +0x57DF +0x57E0 +0x57E1 +0x57E2 +0x57E3 +0x57E4 +0x57E5 +0x57E7 +0x57E9 +0x57EC +0x57ED +0x57EE +0x57F0 +0x57F1 +0x57F2 +0x57F3 +0x57F4 +0x57F5 +0x57F6 +0x57F7 +0x57F8 +0x57F9 +0x57FA +0x57FB +0x57FC +0x57FD +0x5800 +0x5801 +0x5802 +0x5804 +0x5805 +0x5806 +0x5807 +0x5808 +0x5809 +0x580A +0x580B +0x580C +0x580D +0x580E +0x5810 +0x5814 +0x5819 +0x581B +0x581C +0x581D +0x581E +0x5820 +0x5821 +0x5823 +0x5824 +0x5825 +0x5827 +0x5828 +0x5829 +0x582A +0x582C +0x582D +0x582E +0x582F +0x5830 +0x5831 +0x5832 +0x5833 +0x5834 +0x5835 +0x5836 +0x5837 +0x5838 +0x5839 +0x583B +0x583D +0x583F +0x5848 +0x5849 +0x584A +0x584B +0x584C +0x584D +0x584E +0x584F +0x5851 +0x5852 +0x5853 +0x5854 +0x5855 +0x5857 +0x5858 +0x5859 +0x585A +0x585B +0x585D +0x585E +0x5862 +0x5863 +0x5864 +0x5865 +0x5868 +0x586B +0x586D +0x586F +0x5871 +0x5874 +0x5875 +0x5876 +0x5879 +0x587A +0x587B +0x587C +0x587D +0x587E +0x587F +0x5880 +0x5881 +0x5882 +0x5883 +0x5885 +0x5886 +0x5887 +0x5888 +0x5889 +0x588A +0x588B +0x588E +0x588F +0x5890 +0x5891 +0x5893 +0x5894 +0x5898 +0x589C +0x589D +0x589E +0x589F +0x58A0 +0x58A1 +0x58A3 +0x58A5 +0x58A6 +0x58A8 +0x58A9 +0x58AB +0x58AC +0x58AE +0x58AF +0x58B1 +0x58B3 +0x58BA +0x58BC +0x58BD +0x58BE +0x58BF +0x58C1 +0x58C2 +0x58C5 +0x58C6 +0x58C7 +0x58C8 +0x58C9 +0x58CE +0x58CF +0x58D1 +0x58D2 +0x58D3 +0x58D4 +0x58D5 +0x58D6 +0x58D8 +0x58D9 +0x58DA +0x58DB +0x58DD +0x58DE +0x58DF +0x58E2 +0x58E3 +0x58E4 +0x58E7 +0x58E8 +0x58E9 +0x58EB +0x58EC +0x58EF +0x58F4 +0x58F9 +0x58FA +0x58FC +0x58FD +0x58FE +0x58FF +0x5903 +0x5906 +0x590C +0x590D +0x590E +0x590F +0x5912 +0x5914 +0x5915 +0x5916 +0x5917 +0x5919 +0x591A +0x591C +0x5920 +0x5922 +0x5924 +0x5925 +0x5927 +0x5929 +0x592A +0x592B +0x592C +0x592D +0x592E +0x592F +0x5931 +0x5937 +0x5938 +0x593C +0x593E +0x5940 +0x5944 +0x5945 +0x5947 +0x5948 +0x5949 +0x594A +0x594E +0x594F +0x5950 +0x5951 +0x5953 +0x5954 +0x5955 +0x5957 +0x5958 +0x595A +0x595C +0x5960 +0x5961 +0x5962 +0x5967 +0x5969 +0x596A +0x596B +0x596D +0x596E +0x5970 +0x5971 +0x5972 +0x5973 +0x5974 +0x5976 +0x5977 +0x5978 +0x5979 +0x597B +0x597C +0x597D +0x597E +0x597F +0x5980 +0x5981 +0x5982 +0x5983 +0x5984 +0x5985 +0x598A +0x598D +0x598E +0x598F +0x5990 +0x5992 +0x5993 +0x5996 +0x5997 +0x5998 +0x5999 +0x599D +0x599E +0x59A0 +0x59A1 +0x59A2 +0x59A3 +0x59A4 +0x59A5 +0x59A6 +0x59A7 +0x59A8 +0x59AE +0x59AF +0x59B1 +0x59B2 +0x59B3 +0x59B4 +0x59B5 +0x59B6 +0x59B9 +0x59BA +0x59BB +0x59BC +0x59BD +0x59BE +0x59C0 +0x59C1 +0x59C3 +0x59C5 +0x59C6 +0x59C7 +0x59C8 +0x59CA +0x59CB +0x59CC +0x59CD +0x59CE +0x59CF +0x59D0 +0x59D1 +0x59D2 +0x59D3 +0x59D4 +0x59D6 +0x59D8 +0x59DA +0x59DB +0x59DC +0x59DD +0x59DE +0x59E0 +0x59E1 +0x59E3 +0x59E4 +0x59E5 +0x59E6 +0x59E8 +0x59E9 +0x59EA +0x59EC +0x59ED +0x59EE +0x59F1 +0x59F2 +0x59F3 +0x59F4 +0x59F5 +0x59F6 +0x59F7 +0x59FA +0x59FB +0x59FC +0x59FD +0x59FE +0x59FF +0x5A00 +0x5A01 +0x5A03 +0x5A09 +0x5A0A +0x5A0C +0x5A0F +0x5A11 +0x5A13 +0x5A15 +0x5A16 +0x5A17 +0x5A18 +0x5A19 +0x5A1B +0x5A1C +0x5A1E +0x5A1F +0x5A20 +0x5A23 +0x5A25 +0x5A29 +0x5A2D +0x5A2E +0x5A33 +0x5A35 +0x5A36 +0x5A37 +0x5A38 +0x5A39 +0x5A3C +0x5A3E +0x5A40 +0x5A41 +0x5A42 +0x5A43 +0x5A44 +0x5A46 +0x5A47 +0x5A48 +0x5A49 +0x5A4A +0x5A4C +0x5A4D +0x5A50 +0x5A51 +0x5A52 +0x5A53 +0x5A55 +0x5A56 +0x5A57 +0x5A58 +0x5A5A +0x5A5B +0x5A5C +0x5A5D +0x5A5E +0x5A5F +0x5A60 +0x5A62 +0x5A64 +0x5A65 +0x5A66 +0x5A67 +0x5A69 +0x5A6A +0x5A6C +0x5A6D +0x5A70 +0x5A77 +0x5A78 +0x5A7A +0x5A7B +0x5A7C +0x5A7D +0x5A7F +0x5A83 +0x5A84 +0x5A8A +0x5A8B +0x5A8C +0x5A8E +0x5A8F +0x5A90 +0x5A92 +0x5A93 +0x5A94 +0x5A95 +0x5A97 +0x5A9A +0x5A9B +0x5A9C +0x5A9D +0x5A9E +0x5A9F +0x5AA2 +0x5AA5 +0x5AA6 +0x5AA7 +0x5AA9 +0x5AAC +0x5AAE +0x5AAF +0x5AB0 +0x5AB1 +0x5AB2 +0x5AB3 +0x5AB4 +0x5AB5 +0x5AB6 +0x5AB7 +0x5AB8 +0x5AB9 +0x5ABA +0x5ABB +0x5ABC +0x5ABD +0x5ABE +0x5ABF +0x5AC0 +0x5AC1 +0x5AC2 +0x5AC4 +0x5AC6 +0x5AC7 +0x5AC8 +0x5AC9 +0x5ACA +0x5ACB +0x5ACC +0x5ACD +0x5AD5 +0x5AD6 +0x5AD7 +0x5AD8 +0x5AD9 +0x5ADA +0x5ADB +0x5ADC +0x5ADD +0x5ADE +0x5ADF +0x5AE0 +0x5AE1 +0x5AE2 +0x5AE3 +0x5AE5 +0x5AE6 +0x5AE8 +0x5AE9 +0x5AEA +0x5AEB +0x5AEC +0x5AED +0x5AEE +0x5AF3 +0x5AF4 +0x5AF5 +0x5AF6 +0x5AF7 +0x5AF8 +0x5AF9 +0x5AFB +0x5AFD +0x5AFF +0x5B01 +0x5B02 +0x5B03 +0x5B05 +0x5B07 +0x5B08 +0x5B09 +0x5B0B +0x5B0C +0x5B0F +0x5B10 +0x5B13 +0x5B14 +0x5B16 +0x5B17 +0x5B19 +0x5B1A +0x5B1B +0x5B1D +0x5B1E +0x5B20 +0x5B21 +0x5B23 +0x5B24 +0x5B25 +0x5B26 +0x5B27 +0x5B28 +0x5B2A +0x5B2C +0x5B2D +0x5B2E +0x5B2F +0x5B30 +0x5B32 +0x5B34 +0x5B38 +0x5B3C +0x5B3D +0x5B3E +0x5B3F +0x5B40 +0x5B43 +0x5B45 +0x5B47 +0x5B48 +0x5B4B +0x5B4C +0x5B4D +0x5B4E +0x5B50 +0x5B51 +0x5B53 +0x5B54 +0x5B55 +0x5B56 +0x5B57 +0x5B58 +0x5B5A +0x5B5B +0x5B5C +0x5B5D +0x5B5F +0x5B62 +0x5B63 +0x5B64 +0x5B65 +0x5B69 +0x5B6B +0x5B6C +0x5B6E +0x5B70 +0x5B71 +0x5B72 +0x5B73 +0x5B75 +0x5B77 +0x5B78 +0x5B7A +0x5B7B +0x5B7D +0x5B7F +0x5B81 +0x5B83 +0x5B84 +0x5B85 +0x5B87 +0x5B88 +0x5B89 +0x5B8B +0x5B8C +0x5B8E +0x5B8F +0x5B92 +0x5B93 +0x5B95 +0x5B97 +0x5B98 +0x5B99 +0x5B9A +0x5B9B +0x5B9C +0x5BA2 +0x5BA3 +0x5BA4 +0x5BA5 +0x5BA6 +0x5BA7 +0x5BA8 +0x5BAC +0x5BAD +0x5BAE +0x5BB0 +0x5BB3 +0x5BB4 +0x5BB5 +0x5BB6 +0x5BB8 +0x5BB9 +0x5BBF +0x5BC0 +0x5BC1 +0x5BC2 +0x5BC4 +0x5BC5 +0x5BC6 +0x5BC7 +0x5BCA +0x5BCB +0x5BCC +0x5BCD +0x5BCE +0x5BD0 +0x5BD1 +0x5BD2 +0x5BD3 +0x5BD4 +0x5BD6 +0x5BD8 +0x5BD9 +0x5BDE +0x5BDF +0x5BE0 +0x5BE1 +0x5BE2 +0x5BE3 +0x5BE4 +0x5BE5 +0x5BE6 +0x5BE7 +0x5BE8 +0x5BE9 +0x5BEA +0x5BEB +0x5BEC +0x5BEE +0x5BEF +0x5BF0 +0x5BF1 +0x5BF2 +0x5BF5 +0x5BF6 +0x5BF8 +0x5BFA +0x5C01 +0x5C03 +0x5C04 +0x5C07 +0x5C08 +0x5C09 +0x5C0A +0x5C0B +0x5C0C +0x5C0D +0x5C0E +0x5C0F +0x5C10 +0x5C11 +0x5C12 +0x5C15 +0x5C16 +0x5C1A +0x5C1F +0x5C22 +0x5C24 +0x5C25 +0x5C28 +0x5C2A +0x5C2C +0x5C30 +0x5C31 +0x5C33 +0x5C37 +0x5C38 +0x5C39 +0x5C3A +0x5C3B +0x5C3C +0x5C3E +0x5C3F +0x5C40 +0x5C41 +0x5C44 +0x5C45 +0x5C46 +0x5C47 +0x5C48 +0x5C4B +0x5C4C +0x5C4D +0x5C4E +0x5C4F +0x5C50 +0x5C51 +0x5C54 +0x5C55 +0x5C56 +0x5C58 +0x5C59 +0x5C5C +0x5C5D +0x5C60 +0x5C62 +0x5C63 +0x5C64 +0x5C65 +0x5C67 +0x5C68 +0x5C69 +0x5C6A +0x5C6C +0x5C6D +0x5C6E +0x5C6F +0x5C71 +0x5C73 +0x5C74 +0x5C79 +0x5C7A +0x5C7B +0x5C7C +0x5C7E +0x5C86 +0x5C88 +0x5C89 +0x5C8A +0x5C8B +0x5C8C +0x5C8D +0x5C8F +0x5C90 +0x5C91 +0x5C92 +0x5C93 +0x5C94 +0x5C95 +0x5C9D +0x5C9F +0x5CA0 +0x5CA1 +0x5CA2 +0x5CA3 +0x5CA4 +0x5CA5 +0x5CA6 +0x5CA7 +0x5CA8 +0x5CA9 +0x5CAA +0x5CAB +0x5CAC +0x5CAD +0x5CAE +0x5CAF +0x5CB0 +0x5CB1 +0x5CB3 +0x5CB5 +0x5CB6 +0x5CB7 +0x5CB8 +0x5CC6 +0x5CC7 +0x5CC8 +0x5CC9 +0x5CCA +0x5CCB +0x5CCC +0x5CCE +0x5CCF +0x5CD0 +0x5CD2 +0x5CD3 +0x5CD4 +0x5CD6 +0x5CD7 +0x5CD8 +0x5CD9 +0x5CDA +0x5CDB +0x5CDE +0x5CDF +0x5CE8 +0x5CEA +0x5CEC +0x5CED +0x5CEE +0x5CF0 +0x5CF1 +0x5CF4 +0x5CF6 +0x5CF7 +0x5CF8 +0x5CF9 +0x5CFB +0x5CFD +0x5CFF +0x5D00 +0x5D01 +0x5D06 +0x5D07 +0x5D0B +0x5D0C +0x5D0D +0x5D0E +0x5D0F +0x5D11 +0x5D12 +0x5D14 +0x5D16 +0x5D17 +0x5D19 +0x5D1A +0x5D1B +0x5D1D +0x5D1E +0x5D1F +0x5D20 +0x5D22 +0x5D23 +0x5D24 +0x5D25 +0x5D26 +0x5D27 +0x5D28 +0x5D29 +0x5D2E +0x5D30 +0x5D31 +0x5D32 +0x5D33 +0x5D34 +0x5D35 +0x5D36 +0x5D37 +0x5D38 +0x5D39 +0x5D3A +0x5D3C +0x5D3D +0x5D3F +0x5D40 +0x5D41 +0x5D42 +0x5D43 +0x5D45 +0x5D47 +0x5D49 +0x5D4A +0x5D4B +0x5D4C +0x5D4E +0x5D50 +0x5D51 +0x5D52 +0x5D55 +0x5D59 +0x5D5E +0x5D62 +0x5D63 +0x5D65 +0x5D67 +0x5D68 +0x5D69 +0x5D6B +0x5D6C +0x5D6F +0x5D71 +0x5D72 +0x5D77 +0x5D79 +0x5D7A +0x5D7C +0x5D7D +0x5D7E +0x5D7F +0x5D80 +0x5D81 +0x5D82 +0x5D84 +0x5D86 +0x5D87 +0x5D88 +0x5D89 +0x5D8A +0x5D8D +0x5D92 +0x5D93 +0x5D94 +0x5D95 +0x5D97 +0x5D99 +0x5D9A +0x5D9C +0x5D9D +0x5D9E +0x5D9F +0x5DA0 +0x5DA1 +0x5DA2 +0x5DA7 +0x5DA8 +0x5DA9 +0x5DAA +0x5DAC +0x5DAD +0x5DAE +0x5DAF +0x5DB0 +0x5DB1 +0x5DB2 +0x5DB4 +0x5DB5 +0x5DB7 +0x5DB8 +0x5DBA +0x5DBC +0x5DBD +0x5DC0 +0x5DC2 +0x5DC3 +0x5DC6 +0x5DC7 +0x5DC9 +0x5DCB +0x5DCD +0x5DCF +0x5DD1 +0x5DD2 +0x5DD4 +0x5DD5 +0x5DD6 +0x5DD8 +0x5DDD +0x5DDE +0x5DDF +0x5DE0 +0x5DE1 +0x5DE2 +0x5DE5 +0x5DE6 +0x5DE7 +0x5DE8 +0x5DEB +0x5DEE +0x5DF0 +0x5DF1 +0x5DF2 +0x5DF3 +0x5DF4 +0x5DF7 +0x5DF9 +0x5DFD +0x5DFE +0x5DFF +0x5E02 +0x5E03 +0x5E04 +0x5E06 +0x5E0A +0x5E0C +0x5E0E +0x5E11 +0x5E14 +0x5E15 +0x5E16 +0x5E17 +0x5E18 +0x5E19 +0x5E1A +0x5E1B +0x5E1D +0x5E1F +0x5E20 +0x5E21 +0x5E22 +0x5E23 +0x5E24 +0x5E25 +0x5E28 +0x5E29 +0x5E2B +0x5E2D +0x5E33 +0x5E34 +0x5E36 +0x5E37 +0x5E38 +0x5E3D +0x5E3E +0x5E40 +0x5E41 +0x5E43 +0x5E44 +0x5E45 +0x5E4A +0x5E4B +0x5E4C +0x5E4D +0x5E4E +0x5E4F +0x5E53 +0x5E54 +0x5E55 +0x5E57 +0x5E58 +0x5E59 +0x5E5B +0x5E5C +0x5E5D +0x5E5F +0x5E60 +0x5E61 +0x5E62 +0x5E63 +0x5E66 +0x5E67 +0x5E68 +0x5E69 +0x5E6A +0x5E6B +0x5E6C +0x5E6D +0x5E6E +0x5E6F +0x5E70 +0x5E72 +0x5E73 +0x5E74 +0x5E75 +0x5E76 +0x5E78 +0x5E79 +0x5E7B +0x5E7C +0x5E7D +0x5E7E +0x5E80 +0x5E82 +0x5E84 +0x5E87 +0x5E88 +0x5E89 +0x5E8A +0x5E8B +0x5E8C +0x5E8D +0x5E8F +0x5E95 +0x5E96 +0x5E97 +0x5E9A +0x5E9B +0x5E9C +0x5EA0 +0x5EA2 +0x5EA3 +0x5EA4 +0x5EA5 +0x5EA6 +0x5EA7 +0x5EA8 +0x5EAA +0x5EAB +0x5EAC +0x5EAD +0x5EAE +0x5EB0 +0x5EB1 +0x5EB2 +0x5EB3 +0x5EB4 +0x5EB5 +0x5EB6 +0x5EB7 +0x5EB8 +0x5EB9 +0x5EBE +0x5EC1 +0x5EC2 +0x5EC4 +0x5EC5 +0x5EC6 +0x5EC7 +0x5EC8 +0x5EC9 +0x5ECA +0x5ECB +0x5ECC +0x5ECE +0x5ED1 +0x5ED2 +0x5ED3 +0x5ED4 +0x5ED5 +0x5ED6 +0x5ED7 +0x5ED8 +0x5ED9 +0x5EDA +0x5EDB +0x5EDC +0x5EDD +0x5EDE +0x5EDF +0x5EE0 +0x5EE1 +0x5EE2 +0x5EE3 +0x5EE5 +0x5EE6 +0x5EE7 +0x5EE8 +0x5EE9 +0x5EEC +0x5EEE +0x5EEF +0x5EF1 +0x5EF2 +0x5EF3 +0x5EF6 +0x5EF7 +0x5EFA +0x5EFE +0x5EFF +0x5F01 +0x5F02 +0x5F04 +0x5F05 +0x5F07 +0x5F08 +0x5F0A +0x5F0B +0x5F0F +0x5F12 +0x5F13 +0x5F14 +0x5F15 +0x5F17 +0x5F18 +0x5F1A +0x5F1B +0x5F1D +0x5F1F +0x5F22 +0x5F23 +0x5F24 +0x5F26 +0x5F27 +0x5F28 +0x5F29 +0x5F2D +0x5F2E +0x5F30 +0x5F31 +0x5F33 +0x5F35 +0x5F36 +0x5F37 +0x5F38 +0x5F3C +0x5F40 +0x5F43 +0x5F44 +0x5F46 +0x5F48 +0x5F49 +0x5F4A +0x5F4B +0x5F4C +0x5F4E +0x5F4F +0x5F54 +0x5F56 +0x5F57 +0x5F58 +0x5F59 +0x5F5D +0x5F62 +0x5F64 +0x5F65 +0x5F67 +0x5F69 +0x5F6A +0x5F6B +0x5F6C +0x5F6D +0x5F6F +0x5F70 +0x5F71 +0x5F73 +0x5F74 +0x5F76 +0x5F77 +0x5F78 +0x5F79 +0x5F7C +0x5F7D +0x5F7E +0x5F7F +0x5F80 +0x5F81 +0x5F82 +0x5F85 +0x5F86 +0x5F87 +0x5F88 +0x5F89 +0x5F8A +0x5F8B +0x5F8C +0x5F90 +0x5F91 +0x5F92 +0x5F96 +0x5F97 +0x5F98 +0x5F99 +0x5F9B +0x5F9C +0x5F9E +0x5F9F +0x5FA0 +0x5FA1 +0x5FA5 +0x5FA6 +0x5FA8 +0x5FA9 +0x5FAA +0x5FAB +0x5FAC +0x5FAD +0x5FAE +0x5FAF +0x5FB2 +0x5FB5 +0x5FB6 +0x5FB7 +0x5FB9 +0x5FBB +0x5FBC +0x5FBD +0x5FBE +0x5FBF +0x5FC0 +0x5FC1 +0x5FC3 +0x5FC5 +0x5FC9 +0x5FCC +0x5FCD +0x5FCF +0x5FD0 +0x5FD1 +0x5FD2 +0x5FD4 +0x5FD5 +0x5FD6 +0x5FD7 +0x5FD8 +0x5FD9 +0x5FDD +0x5FDE +0x5FE0 +0x5FE1 +0x5FE3 +0x5FE4 +0x5FE5 +0x5FE8 +0x5FEA +0x5FEB +0x5FED +0x5FEE +0x5FEF +0x5FF1 +0x5FF3 +0x5FF4 +0x5FF5 +0x5FF7 +0x5FF8 +0x5FFA +0x5FFB +0x5FFD +0x5FFF +0x6000 +0x6009 +0x600A +0x600B +0x600C +0x600D +0x600E +0x600F +0x6010 +0x6011 +0x6012 +0x6013 +0x6014 +0x6015 +0x6016 +0x6017 +0x6019 +0x601A +0x601B +0x601C +0x601D +0x601E +0x6020 +0x6021 +0x6022 +0x6024 +0x6025 +0x6026 +0x6027 +0x6028 +0x6029 +0x602A +0x602B +0x602C +0x602D +0x602E +0x602F +0x6032 +0x6033 +0x6034 +0x6035 +0x6037 +0x6039 +0x6040 +0x6041 +0x6042 +0x6043 +0x6044 +0x6045 +0x6046 +0x6047 +0x6049 +0x604C +0x604D +0x6050 +0x6053 +0x6054 +0x6055 +0x6058 +0x6059 +0x605A +0x605B +0x605D +0x605E +0x605F +0x6062 +0x6063 +0x6064 +0x6065 +0x6066 +0x6067 +0x6068 +0x6069 +0x606A +0x606B +0x606C +0x606D +0x606E +0x606F +0x6070 +0x6072 +0x607F +0x6080 +0x6081 +0x6083 +0x6084 +0x6085 +0x6086 +0x6087 +0x6088 +0x6089 +0x608A +0x608C +0x608D +0x608E +0x6090 +0x6092 +0x6094 +0x6095 +0x6096 +0x6097 +0x609A +0x609B +0x609C +0x609D +0x609F +0x60A0 +0x60A2 +0x60A3 +0x60A8 +0x60B0 +0x60B1 +0x60B2 +0x60B4 +0x60B5 +0x60B6 +0x60B7 +0x60B8 +0x60B9 +0x60BA +0x60BB +0x60BC +0x60BD +0x60BE +0x60BF +0x60C0 +0x60C1 +0x60C3 +0x60C4 +0x60C5 +0x60C6 +0x60C7 +0x60C8 +0x60C9 +0x60CA +0x60CB +0x60CC +0x60CD +0x60CE +0x60CF +0x60D1 +0x60D3 +0x60D4 +0x60D5 +0x60D8 +0x60D9 +0x60DA +0x60DB +0x60DC +0x60DD +0x60DF +0x60E0 +0x60E1 +0x60E2 +0x60E4 +0x60E6 +0x60F0 +0x60F1 +0x60F2 +0x60F3 +0x60F4 +0x60F5 +0x60F6 +0x60F7 +0x60F8 +0x60F9 +0x60FA +0x60FB +0x60FC +0x60FE +0x60FF +0x6100 +0x6101 +0x6103 +0x6104 +0x6105 +0x6106 +0x6108 +0x6109 +0x610A +0x610B +0x610D +0x610E +0x610F +0x6110 +0x6112 +0x6113 +0x6114 +0x6115 +0x6116 +0x6118 +0x611A +0x611B +0x611C +0x611D +0x611F +0x6123 +0x6127 +0x6128 +0x6129 +0x612B +0x612C +0x612E +0x612F +0x6132 +0x6134 +0x6136 +0x6137 +0x613B +0x613E +0x613F +0x6140 +0x6141 +0x6144 +0x6145 +0x6146 +0x6147 +0x6148 +0x6149 +0x614A +0x614B +0x614C +0x614D +0x614E +0x614F +0x6152 +0x6153 +0x6154 +0x6155 +0x6156 +0x6158 +0x615A +0x615B +0x615D +0x615E +0x615F +0x6161 +0x6162 +0x6163 +0x6165 +0x6166 +0x6167 +0x6168 +0x616A +0x616B +0x616C +0x616E +0x6170 +0x6171 +0x6172 +0x6173 +0x6174 +0x6175 +0x6176 +0x6177 +0x6179 +0x617A +0x617C +0x617E +0x6180 +0x6182 +0x6183 +0x6189 +0x618A +0x618B +0x618C +0x618D +0x618E +0x6190 +0x6191 +0x6192 +0x6193 +0x6194 +0x6196 +0x619A +0x619B +0x619D +0x619F +0x61A1 +0x61A2 +0x61A4 +0x61A7 +0x61A8 +0x61A9 +0x61AA +0x61AB +0x61AC +0x61AD +0x61AE +0x61AF +0x61B0 +0x61B1 +0x61B2 +0x61B3 +0x61B4 +0x61B5 +0x61B6 +0x61B8 +0x61BA +0x61BC +0x61BE +0x61BF +0x61C1 +0x61C2 +0x61C3 +0x61C5 +0x61C6 +0x61C7 +0x61C8 +0x61C9 +0x61CA +0x61CB +0x61CC +0x61CD +0x61D6 +0x61D8 +0x61DE +0x61DF +0x61E0 +0x61E3 +0x61E4 +0x61E5 +0x61E6 +0x61E7 +0x61E8 +0x61E9 +0x61EA +0x61EB +0x61ED +0x61EE +0x61F0 +0x61F1 +0x61F2 +0x61F5 +0x61F6 +0x61F7 +0x61F8 +0x61F9 +0x61FA +0x61FB +0x61FC +0x61FD +0x61FE +0x61FF +0x6200 +0x6201 +0x6203 +0x6204 +0x6207 +0x6208 +0x6209 +0x620A +0x620C +0x620D +0x620E +0x6210 +0x6211 +0x6212 +0x6214 +0x6215 +0x6216 +0x6219 +0x621A +0x621B +0x621F +0x6220 +0x6221 +0x6222 +0x6223 +0x6224 +0x6225 +0x6227 +0x6229 +0x622A +0x622B +0x622D +0x622E +0x6230 +0x6232 +0x6233 +0x6234 +0x6236 +0x623A +0x623D +0x623E +0x623F +0x6240 +0x6241 +0x6242 +0x6243 +0x6246 +0x6247 +0x6248 +0x6249 +0x624A +0x624B +0x624D +0x624E +0x6250 +0x6251 +0x6252 +0x6253 +0x6254 +0x6258 +0x6259 +0x625A +0x625B +0x625C +0x625E +0x6260 +0x6261 +0x6262 +0x6263 +0x6264 +0x6265 +0x6266 +0x626D +0x626E +0x626F +0x6270 +0x6271 +0x6272 +0x6273 +0x6274 +0x6276 +0x6277 +0x6279 +0x627A +0x627B +0x627C +0x627D +0x627E +0x627F +0x6280 +0x6281 +0x6283 +0x6284 +0x6286 +0x6287 +0x6288 +0x6289 +0x628A +0x628C +0x628E +0x628F +0x6291 +0x6292 +0x6293 +0x6294 +0x6295 +0x6296 +0x6297 +0x6298 +0x62A8 +0x62A9 +0x62AA +0x62AB +0x62AC +0x62AD +0x62AE +0x62AF +0x62B0 +0x62B1 +0x62B3 +0x62B4 +0x62B5 +0x62B6 +0x62B8 +0x62B9 +0x62BB +0x62BC +0x62BD +0x62BE +0x62BF +0x62C2 +0x62C4 +0x62C6 +0x62C7 +0x62C8 +0x62C9 +0x62CA +0x62CB +0x62CC +0x62CD +0x62CE +0x62CF +0x62D0 +0x62D1 +0x62D2 +0x62D3 +0x62D4 +0x62D6 +0x62D7 +0x62D8 +0x62D9 +0x62DA +0x62DB +0x62DC +0x62EB +0x62EC +0x62ED +0x62EE +0x62EF +0x62F0 +0x62F1 +0x62F2 +0x62F3 +0x62F4 +0x62F5 +0x62F6 +0x62F7 +0x62F8 +0x62F9 +0x62FA +0x62FB +0x62FC +0x62FD +0x62FE +0x62FF +0x6300 +0x6301 +0x6302 +0x6303 +0x6307 +0x6308 +0x6309 +0x630B +0x630C +0x630D +0x630E +0x630F +0x6310 +0x6311 +0x6313 +0x6314 +0x6315 +0x6316 +0x6328 +0x6329 +0x632A +0x632B +0x632C +0x632D +0x632F +0x6332 +0x6333 +0x6334 +0x6336 +0x6338 +0x6339 +0x633A +0x633B +0x633C +0x633D +0x633E +0x6340 +0x6341 +0x6342 +0x6343 +0x6344 +0x6345 +0x6346 +0x6347 +0x6348 +0x6349 +0x634A +0x634B +0x634C +0x634D +0x634E +0x634F +0x6350 +0x6351 +0x6354 +0x6355 +0x6356 +0x6357 +0x6358 +0x6359 +0x635A +0x6365 +0x6367 +0x6368 +0x6369 +0x636B +0x636D +0x636E +0x636F +0x6370 +0x6371 +0x6372 +0x6375 +0x6376 +0x6377 +0x6378 +0x637A +0x637B +0x637C +0x637D +0x6380 +0x6381 +0x6382 +0x6383 +0x6384 +0x6385 +0x6387 +0x6388 +0x6389 +0x638A +0x638C +0x638D +0x638E +0x638F +0x6390 +0x6391 +0x6392 +0x6394 +0x6396 +0x6397 +0x6398 +0x6399 +0x639B +0x639C +0x639D +0x639E +0x639F +0x63A0 +0x63A1 +0x63A2 +0x63A3 +0x63A4 +0x63A5 +0x63A7 +0x63A8 +0x63A9 +0x63AA +0x63AB +0x63AC +0x63AD +0x63AE +0x63AF +0x63B0 +0x63B1 +0x63BD +0x63BE +0x63C0 +0x63C2 +0x63C3 +0x63C4 +0x63C5 +0x63C6 +0x63C7 +0x63C8 +0x63C9 +0x63CA +0x63CB +0x63CC +0x63CD +0x63CE +0x63CF +0x63D0 +0x63D2 +0x63D3 +0x63D5 +0x63D6 +0x63D7 +0x63D8 +0x63D9 +0x63DA +0x63DB +0x63DC +0x63DD +0x63DF +0x63E0 +0x63E1 +0x63E3 +0x63E4 +0x63E5 +0x63E7 +0x63E8 +0x63E9 +0x63EA +0x63EB +0x63ED +0x63EE +0x63EF +0x63F0 +0x63F1 +0x63F2 +0x63F3 +0x63F4 +0x63F5 +0x63F6 +0x63F9 +0x6406 +0x6409 +0x640A +0x640B +0x640C +0x640D +0x640E +0x640F +0x6410 +0x6412 +0x6413 +0x6414 +0x6415 +0x6416 +0x6417 +0x6418 +0x641A +0x641B +0x641C +0x641E +0x641F +0x6420 +0x6421 +0x6422 +0x6423 +0x6424 +0x6425 +0x6426 +0x6427 +0x6428 +0x642A +0x642B +0x642C +0x642D +0x642E +0x642F +0x6430 +0x6433 +0x6434 +0x6435 +0x6436 +0x6437 +0x6439 +0x643D +0x643E +0x643F +0x6440 +0x6441 +0x6443 +0x644B +0x644D +0x644E +0x6450 +0x6451 +0x6452 +0x6453 +0x6454 +0x6458 +0x6459 +0x645B +0x645C +0x645D +0x645E +0x645F +0x6460 +0x6461 +0x6465 +0x6466 +0x6467 +0x6468 +0x6469 +0x646B +0x646C +0x646D +0x646E +0x646F +0x6470 +0x6472 +0x6473 +0x6474 +0x6475 +0x6476 +0x6477 +0x6478 +0x6479 +0x647A +0x647B +0x647D +0x647F +0x6482 +0x6485 +0x6487 +0x6488 +0x6489 +0x648A +0x648B +0x648C +0x648F +0x6490 +0x6492 +0x6493 +0x6495 +0x6496 +0x6497 +0x6498 +0x6499 +0x649A +0x649C +0x649D +0x649E +0x649F +0x64A0 +0x64A2 +0x64A3 +0x64A4 +0x64A5 +0x64A6 +0x64A9 +0x64AB +0x64AC +0x64AD +0x64AE +0x64B0 +0x64B1 +0x64B2 +0x64B3 +0x64BB +0x64BC +0x64BD +0x64BE +0x64BF +0x64C1 +0x64C2 +0x64C3 +0x64C4 +0x64C5 +0x64C7 +0x64C9 +0x64CA +0x64CB +0x64CD +0x64CE +0x64CF +0x64D0 +0x64D2 +0x64D4 +0x64D6 +0x64D7 +0x64D8 +0x64D9 +0x64DA +0x64DB +0x64E0 +0x64E2 +0x64E3 +0x64E4 +0x64E6 +0x64E8 +0x64E9 +0x64EB +0x64EC +0x64ED +0x64EF +0x64F0 +0x64F1 +0x64F2 +0x64F3 +0x64F4 +0x64F7 +0x64F8 +0x64FA +0x64FB +0x64FC +0x64FD +0x64FE +0x64FF +0x6500 +0x6501 +0x6503 +0x6504 +0x6506 +0x6507 +0x6509 +0x650C +0x650D +0x650E +0x650F +0x6510 +0x6513 +0x6514 +0x6515 +0x6516 +0x6517 +0x6518 +0x6519 +0x651B +0x651C +0x651D +0x6520 +0x6521 +0x6522 +0x6523 +0x6524 +0x6525 +0x6526 +0x6529 +0x652A +0x652B +0x652C +0x652D +0x652E +0x652F +0x6532 +0x6533 +0x6536 +0x6537 +0x6538 +0x6539 +0x653B +0x653D +0x653E +0x653F +0x6541 +0x6543 +0x6545 +0x6546 +0x6548 +0x6549 +0x654A +0x654F +0x6551 +0x6553 +0x6554 +0x6555 +0x6556 +0x6557 +0x6558 +0x6559 +0x655C +0x655D +0x655E +0x6562 +0x6563 +0x6564 +0x6565 +0x6566 +0x6567 +0x6568 +0x656A +0x656C +0x656F +0x6572 +0x6573 +0x6574 +0x6575 +0x6576 +0x6577 +0x6578 +0x6579 +0x657A +0x657B +0x657C +0x657F +0x6580 +0x6581 +0x6582 +0x6583 +0x6584 +0x6587 +0x658C +0x6590 +0x6591 +0x6592 +0x6594 +0x6595 +0x6596 +0x6597 +0x6599 +0x659B +0x659C +0x659D +0x659E +0x659F +0x65A0 +0x65A1 +0x65A2 +0x65A4 +0x65A5 +0x65A7 +0x65A8 +0x65AA +0x65AB +0x65AC +0x65AE +0x65AF +0x65B0 +0x65B2 +0x65B3 +0x65B6 +0x65B7 +0x65B8 +0x65B9 +0x65BB +0x65BC +0x65BD +0x65BF +0x65C1 +0x65C2 +0x65C3 +0x65C4 +0x65C5 +0x65C6 +0x65CB +0x65CC +0x65CD +0x65CE +0x65CF +0x65D0 +0x65D2 +0x65D3 +0x65D6 +0x65D7 +0x65DA +0x65DB +0x65DD +0x65DE +0x65DF +0x65E1 +0x65E2 +0x65E5 +0x65E6 +0x65E8 +0x65E9 +0x65EC +0x65ED +0x65EE +0x65EF +0x65F0 +0x65F1 +0x65F2 +0x65F3 +0x65F4 +0x65F5 +0x65FA +0x65FB +0x65FC +0x65FD +0x6600 +0x6602 +0x6603 +0x6604 +0x6605 +0x6606 +0x6607 +0x6608 +0x6609 +0x660A +0x660B +0x660C +0x660D +0x660E +0x660F +0x6610 +0x6611 +0x6612 +0x6613 +0x6614 +0x6615 +0x661C +0x661D +0x661F +0x6620 +0x6621 +0x6622 +0x6624 +0x6625 +0x6626 +0x6627 +0x6628 +0x662B +0x662D +0x662E +0x662F +0x6631 +0x6632 +0x6633 +0x6634 +0x6635 +0x6636 +0x6639 +0x663A +0x6641 +0x6642 +0x6643 +0x6645 +0x6647 +0x6649 +0x664A +0x664C +0x664F +0x6651 +0x6652 +0x6659 +0x665A +0x665B +0x665C +0x665D +0x665E +0x665F +0x6661 +0x6662 +0x6664 +0x6665 +0x6666 +0x6668 +0x666A +0x666C +0x666E +0x666F +0x6670 +0x6671 +0x6672 +0x6674 +0x6676 +0x6677 +0x6678 +0x6679 +0x667A +0x667B +0x667C +0x667E +0x6680 +0x6684 +0x6686 +0x6687 +0x6688 +0x6689 +0x668A +0x668B +0x668C +0x668D +0x6690 +0x6691 +0x6694 +0x6695 +0x6696 +0x6697 +0x6698 +0x6699 +0x669D +0x669F +0x66A0 +0x66A1 +0x66A2 +0x66A8 +0x66A9 +0x66AA +0x66AB +0x66AE +0x66AF +0x66B0 +0x66B1 +0x66B2 +0x66B4 +0x66B5 +0x66B7 +0x66B8 +0x66B9 +0x66BA +0x66BB +0x66BD +0x66BE +0x66C0 +0x66C4 +0x66C6 +0x66C7 +0x66C8 +0x66C9 +0x66CA +0x66CB +0x66CC +0x66CF +0x66D2 +0x66D6 +0x66D8 +0x66D9 +0x66DA +0x66DB +0x66DC +0x66DD +0x66DE +0x66E0 +0x66E3 +0x66E4 +0x66E6 +0x66E8 +0x66E9 +0x66EB +0x66EC +0x66ED +0x66EE +0x66F0 +0x66F2 +0x66F3 +0x66F4 +0x66F6 +0x66F7 +0x66F8 +0x66F9 +0x66FC +0x66FE +0x66FF +0x6700 +0x6701 +0x6703 +0x6704 +0x6705 +0x6708 +0x6709 +0x670A +0x670B +0x670D +0x670F +0x6710 +0x6712 +0x6713 +0x6714 +0x6715 +0x6717 +0x6718 +0x671B +0x671D +0x671F +0x6720 +0x6721 +0x6722 +0x6723 +0x6726 +0x6727 +0x6728 +0x672A +0x672B +0x672C +0x672D +0x672E +0x6731 +0x6733 +0x6734 +0x6735 +0x6738 +0x6739 +0x673A +0x673B +0x673C +0x673D +0x673E +0x673F +0x6745 +0x6746 +0x6747 +0x6748 +0x6749 +0x674B +0x674C +0x674D +0x674E +0x674F +0x6750 +0x6751 +0x6753 +0x6755 +0x6756 +0x6757 +0x6759 +0x675A +0x675C +0x675D +0x675E +0x675F +0x6760 +0x676A +0x676C +0x676D +0x676F +0x6770 +0x6771 +0x6772 +0x6773 +0x6774 +0x6775 +0x6776 +0x6777 +0x6778 +0x6779 +0x677A +0x677B +0x677C +0x677D +0x677E +0x677F +0x6781 +0x6783 +0x6784 +0x6785 +0x6786 +0x6787 +0x6789 +0x678B +0x678C +0x678D +0x678E +0x6790 +0x6791 +0x6792 +0x6793 +0x6794 +0x6795 +0x6797 +0x6798 +0x6799 +0x679A +0x679C +0x679D +0x679F +0x67AE +0x67AF +0x67B0 +0x67B2 +0x67B3 +0x67B4 +0x67B5 +0x67B6 +0x67B7 +0x67B8 +0x67B9 +0x67BA +0x67BB +0x67C0 +0x67C1 +0x67C2 +0x67C3 +0x67C4 +0x67C5 +0x67C6 +0x67C8 +0x67C9 +0x67CA +0x67CB +0x67CC +0x67CD +0x67CE +0x67CF +0x67D0 +0x67D1 +0x67D2 +0x67D3 +0x67D4 +0x67D8 +0x67D9 +0x67DA +0x67DB +0x67DC +0x67DD +0x67DE +0x67DF +0x67E2 +0x67E3 +0x67E4 +0x67E5 +0x67E6 +0x67E7 +0x67E9 +0x67EA +0x67EB +0x67EC +0x67ED +0x67EE +0x67EF +0x67F0 +0x67F1 +0x67F2 +0x67F3 +0x67F4 +0x67F5 +0x67F6 +0x67F7 +0x67F8 +0x67FA +0x67FC +0x67FF +0x6812 +0x6813 +0x6814 +0x6816 +0x6817 +0x6818 +0x681A +0x681C +0x681D +0x681F +0x6820 +0x6821 +0x6825 +0x6826 +0x6828 +0x6829 +0x682A +0x682B +0x682D +0x682E +0x682F +0x6831 +0x6832 +0x6833 +0x6834 +0x6835 +0x6838 +0x6839 +0x683A +0x683B +0x683C +0x683D +0x6840 +0x6841 +0x6842 +0x6843 +0x6844 +0x6845 +0x6846 +0x6848 +0x6849 +0x684B +0x684C +0x684D +0x684E +0x684F +0x6850 +0x6851 +0x6853 +0x6854 +0x686B +0x686D +0x686E +0x686F +0x6871 +0x6872 +0x6874 +0x6875 +0x6876 +0x6877 +0x6878 +0x6879 +0x687B +0x687C +0x687D +0x687E +0x687F +0x6880 +0x6881 +0x6882 +0x6883 +0x6885 +0x6886 +0x6887 +0x6889 +0x688A +0x688B +0x688C +0x688F +0x6890 +0x6891 +0x6892 +0x6893 +0x6894 +0x6896 +0x6897 +0x689B +0x689C +0x689D +0x689F +0x68A0 +0x68A1 +0x68A2 +0x68A3 +0x68A4 +0x68A7 +0x68A8 +0x68A9 +0x68AA +0x68AB +0x68AC +0x68AD +0x68AE +0x68AF +0x68B0 +0x68B1 +0x68B2 +0x68B3 +0x68B4 +0x68B5 +0x68C4 +0x68C6 +0x68C7 +0x68C8 +0x68C9 +0x68CB +0x68CC +0x68CD +0x68CE +0x68D0 +0x68D1 +0x68D2 +0x68D3 +0x68D4 +0x68D5 +0x68D6 +0x68D7 +0x68D8 +0x68DA +0x68DC +0x68DD +0x68DE +0x68DF +0x68E0 +0x68E1 +0x68E3 +0x68E4 +0x68E6 +0x68E7 +0x68E8 +0x68E9 +0x68EA +0x68EB +0x68EC +0x68EE +0x68EF +0x68F0 +0x68F1 +0x68F2 +0x68F3 +0x68F4 +0x68F5 +0x68F6 +0x68F7 +0x68F8 +0x68F9 +0x68FA +0x68FB +0x68FC +0x68FD +0x6904 +0x6905 +0x6906 +0x6907 +0x6908 +0x690A +0x690B +0x690C +0x690D +0x690E +0x690F +0x6910 +0x6911 +0x6912 +0x6913 +0x6914 +0x6915 +0x6917 +0x6925 +0x692A +0x692F +0x6930 +0x6932 +0x6933 +0x6934 +0x6935 +0x6937 +0x6938 +0x6939 +0x693B +0x693C +0x693D +0x693F +0x6940 +0x6941 +0x6942 +0x6944 +0x6945 +0x6948 +0x6949 +0x694A +0x694B +0x694C +0x694E +0x694F +0x6951 +0x6952 +0x6953 +0x6954 +0x6956 +0x6957 +0x6958 +0x6959 +0x695A +0x695B +0x695C +0x695D +0x695E +0x695F +0x6960 +0x6962 +0x6963 +0x6965 +0x6966 +0x6968 +0x6969 +0x696A +0x696B +0x696C +0x696D +0x696E +0x696F +0x6970 +0x6971 +0x6974 +0x6975 +0x6976 +0x6977 +0x6978 +0x6979 +0x697A +0x697B +0x6982 +0x6983 +0x6986 +0x698D +0x698E +0x6990 +0x6991 +0x6993 +0x6994 +0x6995 +0x6996 +0x6997 +0x6999 +0x699A +0x699B +0x699C +0x699E +0x69A0 +0x69A1 +0x69A3 +0x69A4 +0x69A5 +0x69A6 +0x69A7 +0x69A8 +0x69A9 +0x69AA +0x69AB +0x69AC +0x69AD +0x69AE +0x69AF +0x69B0 +0x69B1 +0x69B3 +0x69B4 +0x69B5 +0x69B6 +0x69B7 +0x69B9 +0x69BB +0x69BC +0x69BD +0x69BE +0x69BF +0x69C1 +0x69C2 +0x69C3 +0x69C4 +0x69C6 +0x69C9 +0x69CA +0x69CB +0x69CC +0x69CD +0x69CE +0x69CF +0x69D0 +0x69D3 +0x69D4 +0x69D9 +0x69E2 +0x69E4 +0x69E5 +0x69E6 +0x69E7 +0x69E8 +0x69EB +0x69EC +0x69ED +0x69EE +0x69F1 +0x69F2 +0x69F3 +0x69F4 +0x69F6 +0x69F7 +0x69F8 +0x69FB +0x69FC +0x69FD +0x69FE +0x69FF +0x6A00 +0x6A01 +0x6A02 +0x6A04 +0x6A05 +0x6A06 +0x6A07 +0x6A08 +0x6A09 +0x6A0A +0x6A0D +0x6A0F +0x6A11 +0x6A13 +0x6A14 +0x6A15 +0x6A16 +0x6A17 +0x6A18 +0x6A19 +0x6A1B +0x6A1D +0x6A1E +0x6A1F +0x6A20 +0x6A21 +0x6A23 +0x6A25 +0x6A26 +0x6A27 +0x6A28 +0x6A32 +0x6A34 +0x6A35 +0x6A38 +0x6A39 +0x6A3A +0x6A3B +0x6A3C +0x6A3D +0x6A3E +0x6A3F +0x6A40 +0x6A41 +0x6A44 +0x6A46 +0x6A47 +0x6A48 +0x6A49 +0x6A4B +0x6A4D +0x6A4E +0x6A4F +0x6A50 +0x6A51 +0x6A54 +0x6A55 +0x6A56 +0x6A58 +0x6A59 +0x6A5A +0x6A5B +0x6A5D +0x6A5E +0x6A5F +0x6A60 +0x6A61 +0x6A62 +0x6A64 +0x6A66 +0x6A67 +0x6A68 +0x6A69 +0x6A6A +0x6A6B +0x6A6D +0x6A6F +0x6A76 +0x6A7E +0x6A7F +0x6A80 +0x6A81 +0x6A83 +0x6A84 +0x6A85 +0x6A87 +0x6A89 +0x6A8C +0x6A8D +0x6A8E +0x6A90 +0x6A91 +0x6A92 +0x6A93 +0x6A94 +0x6A95 +0x6A96 +0x6A97 +0x6A9A +0x6A9B +0x6A9C +0x6A9E +0x6A9F +0x6AA0 +0x6AA1 +0x6AA2 +0x6AA3 +0x6AA4 +0x6AA5 +0x6AA6 +0x6AA8 +0x6AAC +0x6AAD +0x6AAE +0x6AAF +0x6AB3 +0x6AB4 +0x6AB6 +0x6AB7 +0x6AB8 +0x6AB9 +0x6ABA +0x6ABB +0x6ABD +0x6AC2 +0x6AC3 +0x6AC5 +0x6AC6 +0x6AC7 +0x6ACB +0x6ACC +0x6ACD +0x6ACF +0x6AD0 +0x6AD1 +0x6AD3 +0x6AD9 +0x6ADA +0x6ADB +0x6ADC +0x6ADD +0x6ADE +0x6ADF +0x6AE0 +0x6AE1 +0x6AE5 +0x6AE7 +0x6AE8 +0x6AEA +0x6AEB +0x6AEC +0x6AEE +0x6AEF +0x6AF0 +0x6AF1 +0x6AF3 +0x6AF8 +0x6AF9 +0x6AFA +0x6AFB +0x6AFC +0x6B00 +0x6B02 +0x6B03 +0x6B04 +0x6B08 +0x6B09 +0x6B0A +0x6B0B +0x6B0F +0x6B10 +0x6B11 +0x6B12 +0x6B13 +0x6B16 +0x6B17 +0x6B18 +0x6B19 +0x6B1A +0x6B1E +0x6B20 +0x6B21 +0x6B23 +0x6B25 +0x6B28 +0x6B2C +0x6B2D +0x6B2F +0x6B31 +0x6B32 +0x6B33 +0x6B34 +0x6B36 +0x6B37 +0x6B38 +0x6B39 +0x6B3A +0x6B3B +0x6B3C +0x6B3D +0x6B3E +0x6B3F +0x6B41 +0x6B42 +0x6B43 +0x6B45 +0x6B46 +0x6B47 +0x6B48 +0x6B49 +0x6B4A +0x6B4B +0x6B4C +0x6B4D +0x6B4E +0x6B50 +0x6B51 +0x6B54 +0x6B55 +0x6B56 +0x6B59 +0x6B5B +0x6B5C +0x6B5E +0x6B5F +0x6B60 +0x6B61 +0x6B62 +0x6B63 +0x6B64 +0x6B65 +0x6B66 +0x6B67 +0x6B6A +0x6B6D +0x6B72 +0x6B76 +0x6B77 +0x6B78 +0x6B79 +0x6B7B +0x6B7E +0x6B7F +0x6B80 +0x6B82 +0x6B83 +0x6B84 +0x6B86 +0x6B88 +0x6B89 +0x6B8A +0x6B8C +0x6B8D +0x6B8E +0x6B8F +0x6B91 +0x6B94 +0x6B95 +0x6B96 +0x6B97 +0x6B98 +0x6B99 +0x6B9B +0x6B9E +0x6B9F +0x6BA0 +0x6BA2 +0x6BA3 +0x6BA4 +0x6BA5 +0x6BA6 +0x6BA7 +0x6BAA +0x6BAB +0x6BAD +0x6BAE +0x6BAF +0x6BB0 +0x6BB2 +0x6BB3 +0x6BB5 +0x6BB6 +0x6BB7 +0x6BBA +0x6BBC +0x6BBD +0x6BBF +0x6BC0 +0x6BC3 +0x6BC4 +0x6BC5 +0x6BC6 +0x6BC7 +0x6BC8 +0x6BC9 +0x6BCA +0x6BCB +0x6BCC +0x6BCD +0x6BCF +0x6BD0 +0x6BD2 +0x6BD3 +0x6BD4 +0x6BD6 +0x6BD7 +0x6BD8 +0x6BDA +0x6BDB +0x6BDE +0x6BE0 +0x6BE2 +0x6BE3 +0x6BE4 +0x6BE6 +0x6BE7 +0x6BE8 +0x6BEB +0x6BEC +0x6BEF +0x6BF0 +0x6BF2 +0x6BF3 +0x6BF7 +0x6BF8 +0x6BF9 +0x6BFB +0x6BFC +0x6BFD +0x6BFE +0x6BFF +0x6C00 +0x6C01 +0x6C02 +0x6C03 +0x6C04 +0x6C05 +0x6C06 +0x6C08 +0x6C09 +0x6C0B +0x6C0C +0x6C0D +0x6C0F +0x6C10 +0x6C11 +0x6C13 +0x6C14 +0x6C15 +0x6C16 +0x6C18 +0x6C19 +0x6C1A +0x6C1B +0x6C1D +0x6C1F +0x6C20 +0x6C21 +0x6C23 +0x6C24 +0x6C25 +0x6C26 +0x6C27 +0x6C28 +0x6C2A +0x6C2B +0x6C2C +0x6C2E +0x6C2F +0x6C30 +0x6C33 +0x6C34 +0x6C36 +0x6C38 +0x6C3B +0x6C3E +0x6C3F +0x6C40 +0x6C41 +0x6C42 +0x6C43 +0x6C46 +0x6C4A +0x6C4B +0x6C4C +0x6C4D +0x6C4E +0x6C4F +0x6C50 +0x6C52 +0x6C54 +0x6C55 +0x6C57 +0x6C59 +0x6C5B +0x6C5C +0x6C5D +0x6C5E +0x6C5F +0x6C60 +0x6C61 +0x6C65 +0x6C66 +0x6C67 +0x6C68 +0x6C69 +0x6C6A +0x6C6B +0x6C6D +0x6C6F +0x6C70 +0x6C71 +0x6C72 +0x6C73 +0x6C74 +0x6C76 +0x6C78 +0x6C7A +0x6C7B +0x6C7D +0x6C7E +0x6C80 +0x6C81 +0x6C82 +0x6C83 +0x6C84 +0x6C85 +0x6C86 +0x6C87 +0x6C88 +0x6C89 +0x6C8A +0x6C8B +0x6C8C +0x6C8D +0x6C8E +0x6C8F +0x6C90 +0x6C92 +0x6C93 +0x6C94 +0x6C95 +0x6C96 +0x6C98 +0x6C99 +0x6C9A +0x6C9B +0x6C9C +0x6C9D +0x6CAB +0x6CAC +0x6CAD +0x6CAE +0x6CB0 +0x6CB1 +0x6CB3 +0x6CB4 +0x6CB6 +0x6CB7 +0x6CB8 +0x6CB9 +0x6CBA +0x6CBB +0x6CBC +0x6CBD +0x6CBE +0x6CBF +0x6CC0 +0x6CC1 +0x6CC2 +0x6CC3 +0x6CC4 +0x6CC5 +0x6CC6 +0x6CC7 +0x6CC9 +0x6CCA +0x6CCC +0x6CCD +0x6CCF +0x6CD0 +0x6CD1 +0x6CD2 +0x6CD3 +0x6CD4 +0x6CD5 +0x6CD6 +0x6CD7 +0x6CD9 +0x6CDA +0x6CDB +0x6CDC +0x6CDD +0x6CDE +0x6CE0 +0x6CE1 +0x6CE2 +0x6CE3 +0x6CE5 +0x6CE7 +0x6CE8 +0x6CE9 +0x6CEB +0x6CEC +0x6CED +0x6CEE +0x6CEF +0x6CF0 +0x6CF1 +0x6CF2 +0x6CF3 +0x6CF5 +0x6CF9 +0x6D00 +0x6D01 +0x6D03 +0x6D04 +0x6D07 +0x6D08 +0x6D09 +0x6D0A +0x6D0B +0x6D0C +0x6D0D +0x6D0E +0x6D0F +0x6D10 +0x6D11 +0x6D12 +0x6D16 +0x6D17 +0x6D18 +0x6D19 +0x6D1A +0x6D1B +0x6D1D +0x6D1E +0x6D1F +0x6D20 +0x6D22 +0x6D25 +0x6D27 +0x6D28 +0x6D29 +0x6D2A +0x6D2B +0x6D2C +0x6D2D +0x6D2E +0x6D2F +0x6D30 +0x6D31 +0x6D32 +0x6D33 +0x6D34 +0x6D35 +0x6D36 +0x6D37 +0x6D38 +0x6D39 +0x6D3A +0x6D3B +0x6D3C +0x6D3D +0x6D3E +0x6D3F +0x6D40 +0x6D41 +0x6D42 +0x6D58 +0x6D59 +0x6D5A +0x6D5E +0x6D5F +0x6D60 +0x6D61 +0x6D62 +0x6D63 +0x6D64 +0x6D65 +0x6D66 +0x6D67 +0x6D68 +0x6D69 +0x6D6A +0x6D6C +0x6D6D +0x6D6E +0x6D6F +0x6D70 +0x6D74 +0x6D75 +0x6D76 +0x6D77 +0x6D78 +0x6D79 +0x6D7A +0x6D7B +0x6D7C +0x6D7D +0x6D7E +0x6D7F +0x6D80 +0x6D82 +0x6D83 +0x6D84 +0x6D85 +0x6D86 +0x6D87 +0x6D88 +0x6D89 +0x6D8A +0x6D8B +0x6D8C +0x6D8D +0x6D8E +0x6D90 +0x6D91 +0x6D92 +0x6D93 +0x6D94 +0x6D95 +0x6D97 +0x6D98 +0x6DAA +0x6DAB +0x6DAC +0x6DAE +0x6DAF +0x6DB2 +0x6DB3 +0x6DB4 +0x6DB5 +0x6DB7 +0x6DB8 +0x6DBA +0x6DBB +0x6DBC +0x6DBD +0x6DBE +0x6DBF +0x6DC0 +0x6DC2 +0x6DC4 +0x6DC5 +0x6DC6 +0x6DC7 +0x6DC8 +0x6DC9 +0x6DCA +0x6DCB +0x6DCC +0x6DCD +0x6DCF +0x6DD0 +0x6DD1 +0x6DD2 +0x6DD3 +0x6DD4 +0x6DD5 +0x6DD6 +0x6DD7 +0x6DD8 +0x6DD9 +0x6DDA +0x6DDB +0x6DDC +0x6DDD +0x6DDE +0x6DDF +0x6DE0 +0x6DE1 +0x6DE2 +0x6DE3 +0x6DE4 +0x6DE5 +0x6DE6 +0x6DE8 +0x6DE9 +0x6DEA +0x6DEB +0x6DEC +0x6DED +0x6DEE +0x6DEF +0x6DF0 +0x6DF1 +0x6DF2 +0x6DF3 +0x6DF4 +0x6DF5 +0x6DF6 +0x6DF7 +0x6DF9 +0x6DFA +0x6DFB +0x6DFC +0x6DFD +0x6E00 +0x6E03 +0x6E05 +0x6E19 +0x6E1A +0x6E1B +0x6E1C +0x6E1D +0x6E1F +0x6E20 +0x6E21 +0x6E22 +0x6E23 +0x6E24 +0x6E25 +0x6E26 +0x6E27 +0x6E28 +0x6E2B +0x6E2C +0x6E2D +0x6E2E +0x6E2F +0x6E30 +0x6E31 +0x6E32 +0x6E33 +0x6E34 +0x6E35 +0x6E36 +0x6E38 +0x6E39 +0x6E3A +0x6E3B +0x6E3C +0x6E3D +0x6E3E +0x6E3F +0x6E40 +0x6E41 +0x6E43 +0x6E44 +0x6E45 +0x6E46 +0x6E47 +0x6E49 +0x6E4A +0x6E4B +0x6E4D +0x6E4E +0x6E51 +0x6E52 +0x6E53 +0x6E54 +0x6E55 +0x6E56 +0x6E58 +0x6E5A +0x6E5B +0x6E5C +0x6E5D +0x6E5E +0x6E5F +0x6E60 +0x6E61 +0x6E62 +0x6E63 +0x6E64 +0x6E65 +0x6E66 +0x6E67 +0x6E68 +0x6E69 +0x6E6B +0x6E6E +0x6E6F +0x6E71 +0x6E72 +0x6E73 +0x6E74 +0x6E77 +0x6E78 +0x6E79 +0x6E88 +0x6E89 +0x6E8D +0x6E8E +0x6E8F +0x6E90 +0x6E92 +0x6E93 +0x6E94 +0x6E96 +0x6E97 +0x6E98 +0x6E99 +0x6E9B +0x6E9C +0x6E9D +0x6E9E +0x6E9F +0x6EA0 +0x6EA1 +0x6EA2 +0x6EA3 +0x6EA4 +0x6EA5 +0x6EA6 +0x6EA7 +0x6EAA +0x6EAB +0x6EAE +0x6EAF +0x6EB0 +0x6EB1 +0x6EB2 +0x6EB3 +0x6EB4 +0x6EB6 +0x6EB7 +0x6EB9 +0x6EBA +0x6EBC +0x6EBD +0x6EBE +0x6EBF +0x6EC0 +0x6EC1 +0x6EC2 +0x6EC3 +0x6EC4 +0x6EC5 +0x6EC6 +0x6EC7 +0x6EC8 +0x6EC9 +0x6ECA +0x6ECB +0x6ECC +0x6ECD +0x6ECE +0x6ECF +0x6ED0 +0x6ED1 +0x6ED2 +0x6ED3 +0x6ED4 +0x6ED5 +0x6ED6 +0x6ED8 +0x6EDC +0x6EEB +0x6EEC +0x6EED +0x6EEE +0x6EEF +0x6EF1 +0x6EF2 +0x6EF4 +0x6EF5 +0x6EF6 +0x6EF7 +0x6EF8 +0x6EF9 +0x6EFB +0x6EFC +0x6EFD +0x6EFE +0x6EFF +0x6F00 +0x6F01 +0x6F02 +0x6F03 +0x6F05 +0x6F06 +0x6F07 +0x6F08 +0x6F09 +0x6F0A +0x6F0D +0x6F0E +0x6F0F +0x6F12 +0x6F13 +0x6F14 +0x6F15 +0x6F18 +0x6F19 +0x6F1A +0x6F1C +0x6F1E +0x6F1F +0x6F20 +0x6F21 +0x6F22 +0x6F23 +0x6F25 +0x6F26 +0x6F27 +0x6F29 +0x6F2A +0x6F2B +0x6F2C +0x6F2D +0x6F2E +0x6F2F +0x6F30 +0x6F31 +0x6F32 +0x6F33 +0x6F35 +0x6F36 +0x6F37 +0x6F38 +0x6F39 +0x6F3A +0x6F3B +0x6F3C +0x6F3E +0x6F3F +0x6F40 +0x6F41 +0x6F43 +0x6F4E +0x6F4F +0x6F50 +0x6F51 +0x6F52 +0x6F53 +0x6F54 +0x6F55 +0x6F57 +0x6F58 +0x6F5A +0x6F5B +0x6F5D +0x6F5E +0x6F5F +0x6F60 +0x6F61 +0x6F62 +0x6F63 +0x6F64 +0x6F66 +0x6F67 +0x6F69 +0x6F6A +0x6F6B +0x6F6C +0x6F6D +0x6F6E +0x6F6F +0x6F70 +0x6F72 +0x6F73 +0x6F76 +0x6F77 +0x6F78 +0x6F7A +0x6F7B +0x6F7C +0x6F7D +0x6F7E +0x6F7F +0x6F80 +0x6F82 +0x6F84 +0x6F85 +0x6F86 +0x6F87 +0x6F88 +0x6F89 +0x6F8B +0x6F8C +0x6F8D +0x6F8E +0x6F90 +0x6F92 +0x6F93 +0x6F94 +0x6F95 +0x6F96 +0x6F97 +0x6F9E +0x6FA0 +0x6FA1 +0x6FA2 +0x6FA3 +0x6FA4 +0x6FA5 +0x6FA6 +0x6FA7 +0x6FA8 +0x6FA9 +0x6FAA +0x6FAB +0x6FAC +0x6FAD +0x6FAE +0x6FAF +0x6FB0 +0x6FB1 +0x6FB2 +0x6FB3 +0x6FB4 +0x6FB6 +0x6FB8 +0x6FB9 +0x6FBA +0x6FBC +0x6FBD +0x6FBF +0x6FC0 +0x6FC1 +0x6FC2 +0x6FC3 +0x6FC4 +0x6FC6 +0x6FC7 +0x6FC8 +0x6FC9 +0x6FCA +0x6FCB +0x6FCC +0x6FCD +0x6FCE +0x6FCF +0x6FD4 +0x6FD5 +0x6FD8 +0x6FDB +0x6FDC +0x6FDD +0x6FDE +0x6FDF +0x6FE0 +0x6FE1 +0x6FE2 +0x6FE3 +0x6FE4 +0x6FE6 +0x6FE7 +0x6FE8 +0x6FE9 +0x6FEB +0x6FEC +0x6FED +0x6FEE +0x6FEF +0x6FF0 +0x6FF1 +0x6FF2 +0x6FF4 +0x6FF7 +0x6FFA +0x6FFB +0x6FFC +0x6FFE +0x6FFF +0x7000 +0x7001 +0x7004 +0x7005 +0x7006 +0x7007 +0x7009 +0x700A +0x700B +0x700C +0x700D +0x700E +0x700F +0x7011 +0x7014 +0x7015 +0x7016 +0x7017 +0x7018 +0x7019 +0x701A +0x701B +0x701C +0x701D +0x701F +0x7020 +0x7021 +0x7022 +0x7023 +0x7024 +0x7026 +0x7027 +0x7028 +0x7029 +0x702A +0x702B +0x702F +0x7030 +0x7031 +0x7032 +0x7033 +0x7034 +0x7035 +0x7037 +0x7038 +0x7039 +0x703A +0x703B +0x703C +0x703E +0x703F +0x7040 +0x7041 +0x7042 +0x7043 +0x7044 +0x7045 +0x7046 +0x7048 +0x7049 +0x704A +0x704C +0x7051 +0x7052 +0x7055 +0x7056 +0x7057 +0x7058 +0x705A +0x705B +0x705D +0x705E +0x705F +0x7060 +0x7061 +0x7062 +0x7063 +0x7064 +0x7065 +0x7066 +0x7068 +0x7069 +0x706A +0x706B +0x7070 +0x7071 +0x7074 +0x7076 +0x7078 +0x707A +0x707C +0x707D +0x7082 +0x7083 +0x7084 +0x7085 +0x7086 +0x708A +0x708E +0x7091 +0x7092 +0x7093 +0x7094 +0x7095 +0x7096 +0x7098 +0x7099 +0x709A +0x709F +0x70A1 +0x70A4 +0x70A9 +0x70AB +0x70AC +0x70AD +0x70AE +0x70AF +0x70B0 +0x70B1 +0x70B3 +0x70B4 +0x70B5 +0x70B7 +0x70B8 +0x70BA +0x70BE +0x70C5 +0x70C6 +0x70C7 +0x70C8 +0x70CA +0x70CB +0x70CD +0x70CE +0x70CF +0x70D1 +0x70D2 +0x70D3 +0x70D4 +0x70D7 +0x70D8 +0x70D9 +0x70DA +0x70DC +0x70DD +0x70DE +0x70E0 +0x70E1 +0x70E2 +0x70E4 +0x70EF +0x70F0 +0x70F3 +0x70F4 +0x70F6 +0x70F7 +0x70F8 +0x70F9 +0x70FA +0x70FB +0x70FC +0x70FD +0x70FF +0x7100 +0x7102 +0x7104 +0x7106 +0x7109 +0x710A +0x710B +0x710C +0x710D +0x710E +0x7110 +0x7113 +0x7117 +0x7119 +0x711A +0x711B +0x711C +0x711E +0x711F +0x7120 +0x7121 +0x7122 +0x7123 +0x7125 +0x7126 +0x7128 +0x712E +0x712F +0x7130 +0x7131 +0x7132 +0x7136 +0x713A +0x7141 +0x7142 +0x7143 +0x7144 +0x7146 +0x7147 +0x7149 +0x714B +0x714C +0x714D +0x714E +0x7150 +0x7152 +0x7153 +0x7154 +0x7156 +0x7158 +0x7159 +0x715A +0x715C +0x715D +0x715E +0x715F +0x7160 +0x7161 +0x7162 +0x7163 +0x7164 +0x7165 +0x7166 +0x7167 +0x7168 +0x7169 +0x716A +0x716C +0x716E +0x7170 +0x7172 +0x7178 +0x717B +0x717D +0x7180 +0x7181 +0x7182 +0x7184 +0x7185 +0x7186 +0x7187 +0x7189 +0x718A +0x718F +0x7190 +0x7192 +0x7194 +0x7197 +0x7199 +0x719A +0x719B +0x719C +0x719D +0x719E +0x719F +0x71A0 +0x71A1 +0x71A4 +0x71A5 +0x71A7 +0x71A8 +0x71A9 +0x71AA +0x71AC +0x71AF +0x71B0 +0x71B1 +0x71B2 +0x71B3 +0x71B5 +0x71B8 +0x71B9 +0x71BC +0x71BD +0x71BE +0x71BF +0x71C0 +0x71C1 +0x71C2 +0x71C3 +0x71C4 +0x71C5 +0x71C6 +0x71C7 +0x71C8 +0x71C9 +0x71CA +0x71CB +0x71CE +0x71CF +0x71D0 +0x71D2 +0x71D4 +0x71D5 +0x71D6 +0x71D8 +0x71D9 +0x71DA +0x71DB +0x71DC +0x71DF +0x71E0 +0x71E1 +0x71E2 +0x71E4 +0x71E5 +0x71E6 +0x71E7 +0x71E8 +0x71EC +0x71ED +0x71EE +0x71F0 +0x71F1 +0x71F2 +0x71F4 +0x71F8 +0x71F9 +0x71FB +0x71FC +0x71FD +0x71FE +0x71FF +0x7201 +0x7202 +0x7203 +0x7205 +0x7206 +0x7207 +0x720A +0x720C +0x720D +0x7210 +0x7213 +0x7214 +0x7219 +0x721A +0x721B +0x721D +0x721E +0x721F +0x7222 +0x7223 +0x7226 +0x7227 +0x7228 +0x7229 +0x722A +0x722C +0x722D +0x7230 +0x7235 +0x7236 +0x7238 +0x7239 +0x723A +0x723B +0x723D +0x723E +0x723F +0x7241 +0x7242 +0x7244 +0x7246 +0x7247 +0x7248 +0x7249 +0x724A +0x724B +0x724C +0x724F +0x7252 +0x7253 +0x7256 +0x7258 +0x7259 +0x725A +0x725B +0x725D +0x725E +0x725F +0x7260 +0x7261 +0x7262 +0x7263 +0x7267 +0x7269 +0x726A +0x726C +0x726E +0x726F +0x7270 +0x7272 +0x7273 +0x7274 +0x7276 +0x7277 +0x7278 +0x7279 +0x727B +0x727C +0x727D +0x727E +0x727F +0x7280 +0x7281 +0x7284 +0x7285 +0x7286 +0x7288 +0x7289 +0x728B +0x728C +0x728D +0x728E +0x7290 +0x7291 +0x7292 +0x7293 +0x7295 +0x7296 +0x7297 +0x7298 +0x729A +0x729B +0x729D +0x729E +0x72A1 +0x72A2 +0x72A3 +0x72A4 +0x72A5 +0x72A6 +0x72A7 +0x72A8 +0x72A9 +0x72AA +0x72AC +0x72AE +0x72AF +0x72B0 +0x72B4 +0x72B5 +0x72BA +0x72BD +0x72BF +0x72C0 +0x72C1 +0x72C2 +0x72C3 +0x72C4 +0x72C5 +0x72C6 +0x72C9 +0x72CA +0x72CB +0x72CC +0x72CE +0x72D0 +0x72D1 +0x72D2 +0x72D4 +0x72D6 +0x72D7 +0x72D8 +0x72D9 +0x72DA +0x72DC +0x72DF +0x72E0 +0x72E1 +0x72E3 +0x72E4 +0x72E6 +0x72E8 +0x72E9 +0x72EA +0x72EB +0x72F3 +0x72F4 +0x72F6 +0x72F7 +0x72F8 +0x72F9 +0x72FA +0x72FB +0x72FC +0x72FD +0x72FE +0x72FF +0x7300 +0x7301 +0x7307 +0x7308 +0x730A +0x730B +0x730C +0x730F +0x7311 +0x7312 +0x7313 +0x7316 +0x7317 +0x7318 +0x7319 +0x731B +0x731C +0x731D +0x731E +0x7322 +0x7323 +0x7325 +0x7326 +0x7327 +0x7329 +0x732D +0x7330 +0x7331 +0x7332 +0x7333 +0x7334 +0x7335 +0x7336 +0x7337 +0x733A +0x733B +0x733C +0x733E +0x733F +0x7340 +0x7342 +0x7343 +0x7344 +0x7345 +0x7349 +0x734A +0x734C +0x734D +0x734E +0x7350 +0x7351 +0x7352 +0x7357 +0x7358 +0x7359 +0x735A +0x735B +0x735D +0x735E +0x735F +0x7360 +0x7361 +0x7362 +0x7365 +0x7366 +0x7367 +0x7368 +0x7369 +0x736A +0x736B +0x736C +0x736E +0x736F +0x7370 +0x7372 +0x7373 +0x7375 +0x7376 +0x7377 +0x7378 +0x737A +0x737B +0x737C +0x737D +0x737E +0x737F +0x7380 +0x7381 +0x7382 +0x7383 +0x7384 +0x7385 +0x7386 +0x7387 +0x7388 +0x7389 +0x738A +0x738B +0x738E +0x7392 +0x7393 +0x7394 +0x7395 +0x7396 +0x7397 +0x739D +0x739F +0x73A0 +0x73A1 +0x73A2 +0x73A4 +0x73A5 +0x73A6 +0x73A8 +0x73A9 +0x73AB +0x73AC +0x73AD +0x73B2 +0x73B3 +0x73B4 +0x73B5 +0x73B6 +0x73B7 +0x73B8 +0x73B9 +0x73BB +0x73BC +0x73BE +0x73BF +0x73C0 +0x73C2 +0x73C3 +0x73C5 +0x73C6 +0x73C7 +0x73C8 +0x73CA +0x73CB +0x73CC +0x73CD +0x73D2 +0x73D3 +0x73D4 +0x73D6 +0x73D7 +0x73D8 +0x73D9 +0x73DA +0x73DB +0x73DC +0x73DD +0x73DE +0x73E0 +0x73E3 +0x73E5 +0x73E7 +0x73E8 +0x73E9 +0x73EA +0x73EB +0x73ED +0x73EE +0x73F4 +0x73F5 +0x73F6 +0x73F8 +0x73FA +0x73FC +0x73FD +0x73FE +0x73FF +0x7400 +0x7401 +0x7403 +0x7404 +0x7405 +0x7406 +0x7407 +0x7408 +0x7409 +0x740A +0x740B +0x740C +0x740D +0x7416 +0x741A +0x741B +0x741D +0x7420 +0x7421 +0x7422 +0x7423 +0x7424 +0x7425 +0x7426 +0x7428 +0x7429 +0x742A +0x742B +0x742C +0x742D +0x742E +0x742F +0x7430 +0x7431 +0x7432 +0x7433 +0x7434 +0x7435 +0x7436 +0x743A +0x743F +0x7440 +0x7441 +0x7442 +0x7444 +0x7446 +0x744A +0x744B +0x744D +0x744E +0x744F +0x7450 +0x7451 +0x7452 +0x7454 +0x7455 +0x7457 +0x7459 +0x745A +0x745B +0x745C +0x745E +0x745F +0x7462 +0x7463 +0x7464 +0x7467 +0x7469 +0x746A +0x746D +0x746E +0x746F +0x7470 +0x7471 +0x7472 +0x7473 +0x7475 +0x7479 +0x747C +0x747D +0x747E +0x747F +0x7480 +0x7481 +0x7483 +0x7485 +0x7486 +0x7487 +0x7488 +0x7489 +0x748A +0x748B +0x7490 +0x7492 +0x7494 +0x7495 +0x7497 +0x7498 +0x749A +0x749C +0x749E +0x749F +0x74A0 +0x74A1 +0x74A3 +0x74A5 +0x74A6 +0x74A7 +0x74A8 +0x74A9 +0x74AA +0x74AB +0x74AD +0x74AF +0x74B0 +0x74B1 +0x74B2 +0x74B5 +0x74B6 +0x74B7 +0x74B8 +0x74BA +0x74BB +0x74BD +0x74BE +0x74BF +0x74C0 +0x74C1 +0x74C2 +0x74C3 +0x74C5 +0x74CA +0x74CB +0x74CF +0x74D4 +0x74D5 +0x74D6 +0x74D7 +0x74D8 +0x74D9 +0x74DA +0x74DB +0x74DC +0x74DD +0x74DE +0x74DF +0x74E0 +0x74E1 +0x74E2 +0x74E3 +0x74E4 +0x74E5 +0x74E6 +0x74E8 +0x74E9 +0x74EC +0x74EE +0x74F4 +0x74F5 +0x74F6 +0x74F7 +0x74FB +0x74FD +0x74FE +0x74FF +0x7500 +0x7502 +0x7503 +0x7504 +0x7507 +0x7508 +0x750B +0x750C +0x750D +0x750F +0x7510 +0x7511 +0x7512 +0x7513 +0x7514 +0x7515 +0x7516 +0x7517 +0x7518 +0x751A +0x751C +0x751D +0x751F +0x7521 +0x7522 +0x7525 +0x7526 +0x7528 +0x7529 +0x752A +0x752B +0x752C +0x752D +0x752E +0x752F +0x7530 +0x7531 +0x7532 +0x7533 +0x7537 +0x7538 +0x7539 +0x753A +0x753D +0x753E +0x753F +0x7540 +0x7547 +0x7548 +0x754B +0x754C +0x754E +0x754F +0x7554 +0x7559 +0x755A +0x755B +0x755C +0x755D +0x755F +0x7562 +0x7563 +0x7564 +0x7565 +0x7566 +0x756A +0x756B +0x756C +0x756F +0x7570 +0x7576 +0x7577 +0x7578 +0x7579 +0x757D +0x757E +0x757F +0x7580 +0x7584 +0x7586 +0x7587 +0x758A +0x758B +0x758C +0x758F +0x7590 +0x7591 +0x7594 +0x7595 +0x7598 +0x7599 +0x759A +0x759D +0x75A2 +0x75A3 +0x75A4 +0x75A5 +0x75A7 +0x75AA +0x75AB +0x75B0 +0x75B2 +0x75B3 +0x75B5 +0x75B6 +0x75B8 +0x75B9 +0x75BA +0x75BB +0x75BC +0x75BD +0x75BE +0x75BF +0x75C0 +0x75C1 +0x75C2 +0x75C4 +0x75C5 +0x75C7 +0x75CA +0x75CB +0x75CC +0x75CD +0x75CE +0x75CF +0x75D0 +0x75D1 +0x75D2 +0x75D4 +0x75D5 +0x75D7 +0x75D8 +0x75D9 +0x75DA +0x75DB +0x75DD +0x75DE +0x75DF +0x75E0 +0x75E1 +0x75E2 +0x75E3 +0x75E4 +0x75E6 +0x75E7 +0x75ED +0x75EF +0x75F0 +0x75F1 +0x75F2 +0x75F3 +0x75F4 +0x75F5 +0x75F6 +0x75F7 +0x75F8 +0x75F9 +0x75FA +0x75FB +0x75FC +0x75FD +0x75FE +0x75FF +0x7600 +0x7601 +0x7603 +0x7608 +0x7609 +0x760A +0x760B +0x760C +0x760D +0x760F +0x7610 +0x7611 +0x7613 +0x7614 +0x7615 +0x7616 +0x7619 +0x761A +0x761B +0x761C +0x761D +0x761E +0x761F +0x7620 +0x7621 +0x7622 +0x7623 +0x7624 +0x7625 +0x7626 +0x7627 +0x7628 +0x7629 +0x762D +0x762F +0x7630 +0x7631 +0x7632 +0x7633 +0x7634 +0x7635 +0x7638 +0x763A +0x763C +0x763D +0x7642 +0x7643 +0x7646 +0x7647 +0x7648 +0x7649 +0x764C +0x7650 +0x7652 +0x7653 +0x7656 +0x7657 +0x7658 +0x7659 +0x765A +0x765C +0x765F +0x7660 +0x7661 +0x7662 +0x7664 +0x7665 +0x7669 +0x766A +0x766C +0x766D +0x766E +0x7670 +0x7671 +0x7672 +0x7675 +0x7678 +0x7679 +0x767B +0x767C +0x767D +0x767E +0x767F +0x7681 +0x7682 +0x7684 +0x7686 +0x7687 +0x7688 +0x7689 +0x768A +0x768B +0x768E +0x768F +0x7692 +0x7693 +0x7695 +0x7696 +0x7699 +0x769A +0x769B +0x769C +0x769D +0x769E +0x76A4 +0x76A6 +0x76AA +0x76AB +0x76AD +0x76AE +0x76AF +0x76B0 +0x76B4 +0x76B5 +0x76B8 +0x76BA +0x76BB +0x76BD +0x76BE +0x76BF +0x76C2 +0x76C3 +0x76C4 +0x76C5 +0x76C6 +0x76C8 +0x76C9 +0x76CA +0x76CD +0x76CE +0x76D2 +0x76D3 +0x76D4 +0x76DA +0x76DB +0x76DC +0x76DD +0x76DE +0x76DF +0x76E1 +0x76E3 +0x76E4 +0x76E5 +0x76E6 +0x76E7 +0x76E9 +0x76EA +0x76EC +0x76ED +0x76EE +0x76EF +0x76F0 +0x76F1 +0x76F2 +0x76F3 +0x76F4 +0x76F5 +0x76F7 +0x76F8 +0x76F9 +0x76FA +0x76FB +0x76FC +0x76FE +0x7701 +0x7703 +0x7704 +0x7705 +0x7707 +0x7708 +0x7709 +0x770A +0x770B +0x7710 +0x7711 +0x7712 +0x7713 +0x7715 +0x7719 +0x771A +0x771B +0x771D +0x771F +0x7720 +0x7722 +0x7723 +0x7725 +0x7727 +0x7728 +0x7729 +0x772D +0x772F +0x7731 +0x7732 +0x7733 +0x7734 +0x7735 +0x7736 +0x7737 +0x7738 +0x7739 +0x773A +0x773B +0x773C +0x773D +0x773E +0x7744 +0x7745 +0x7746 +0x7747 +0x774A +0x774B +0x774C +0x774D +0x774E +0x774F +0x7752 +0x7754 +0x7755 +0x7756 +0x7759 +0x775A +0x775B +0x775C +0x775E +0x775F +0x7760 +0x7761 +0x7762 +0x7763 +0x7765 +0x7766 +0x7767 +0x7768 +0x7769 +0x776A +0x776B +0x776C +0x776D +0x776E +0x776F +0x7779 +0x777C +0x777D +0x777E +0x777F +0x7780 +0x7781 +0x7782 +0x7783 +0x7784 +0x7785 +0x7787 +0x7788 +0x7789 +0x778B +0x778C +0x778D +0x778E +0x778F +0x7791 +0x7795 +0x7797 +0x7799 +0x779A +0x779B +0x779C +0x779D +0x779E +0x779F +0x77A0 +0x77A1 +0x77A2 +0x77A3 +0x77A5 +0x77A7 +0x77A8 +0x77AA +0x77AB +0x77AC +0x77AD +0x77B0 +0x77B1 +0x77B2 +0x77B3 +0x77B4 +0x77B5 +0x77B6 +0x77B7 +0x77BA +0x77BB +0x77BC +0x77BD +0x77BF +0x77C2 +0x77C4 +0x77C7 +0x77C9 +0x77CA +0x77CC +0x77CD +0x77CE +0x77CF +0x77D0 +0x77D3 +0x77D4 +0x77D5 +0x77D7 +0x77D8 +0x77D9 +0x77DA +0x77DB +0x77DC +0x77DE +0x77E0 +0x77E2 +0x77E3 +0x77E5 +0x77E7 +0x77E8 +0x77E9 +0x77EC +0x77ED +0x77EE +0x77EF +0x77F0 +0x77F1 +0x77F2 +0x77F3 +0x77F7 +0x77F8 +0x77F9 +0x77FA +0x77FB +0x77FC +0x77FD +0x7802 +0x7803 +0x7805 +0x7806 +0x7809 +0x780C +0x780D +0x780E +0x780F +0x7810 +0x7811 +0x7812 +0x7813 +0x7814 +0x781D +0x781F +0x7820 +0x7821 +0x7822 +0x7823 +0x7825 +0x7826 +0x7827 +0x7828 +0x7829 +0x782A +0x782B +0x782C +0x782D +0x782E +0x782F +0x7830 +0x7831 +0x7832 +0x7833 +0x7834 +0x7835 +0x7837 +0x7838 +0x7843 +0x7845 +0x7848 +0x7849 +0x784A +0x784C +0x784D +0x784E +0x7850 +0x7852 +0x785C +0x785D +0x785E +0x7860 +0x7862 +0x7864 +0x7865 +0x7868 +0x7869 +0x786A +0x786B +0x786C +0x786D +0x786E +0x786F +0x7870 +0x7871 +0x7879 +0x787B +0x787C +0x787E +0x787F +0x7880 +0x7883 +0x7884 +0x7885 +0x7886 +0x7887 +0x7889 +0x788C +0x788E +0x788F +0x7891 +0x7893 +0x7894 +0x7895 +0x7896 +0x7897 +0x7898 +0x7899 +0x789A +0x789E +0x789F +0x78A0 +0x78A1 +0x78A2 +0x78A3 +0x78A4 +0x78A5 +0x78A7 +0x78A8 +0x78A9 +0x78AA +0x78AB +0x78AC +0x78AD +0x78B0 +0x78B2 +0x78B3 +0x78B4 +0x78BA +0x78BB +0x78BC +0x78BE +0x78C1 +0x78C3 +0x78C4 +0x78C5 +0x78C8 +0x78C9 +0x78CA +0x78CB +0x78CC +0x78CD +0x78CE +0x78CF +0x78D0 +0x78D1 +0x78D4 +0x78D5 +0x78DA +0x78DB +0x78DD +0x78DE +0x78DF +0x78E0 +0x78E1 +0x78E2 +0x78E3 +0x78E5 +0x78E7 +0x78E8 +0x78E9 +0x78EA +0x78EC +0x78ED +0x78EF +0x78F2 +0x78F3 +0x78F4 +0x78F7 +0x78F9 +0x78FA +0x78FB +0x78FC +0x78FD +0x78FE +0x78FF +0x7901 +0x7902 +0x7904 +0x7905 +0x7909 +0x790C +0x790E +0x7910 +0x7911 +0x7912 +0x7913 +0x7914 +0x7917 +0x7919 +0x791B +0x791C +0x791D +0x791E +0x7921 +0x7923 +0x7924 +0x7925 +0x7926 +0x7927 +0x7928 +0x7929 +0x792A +0x792B +0x792C +0x792D +0x792F +0x7931 +0x7935 +0x7938 +0x7939 +0x793A +0x793D +0x793E +0x793F +0x7940 +0x7941 +0x7942 +0x7944 +0x7945 +0x7946 +0x7947 +0x7948 +0x7949 +0x794A +0x794B +0x794C +0x794F +0x7950 +0x7951 +0x7952 +0x7953 +0x7954 +0x7955 +0x7956 +0x7957 +0x795A +0x795B +0x795C +0x795D +0x795E +0x795F +0x7960 +0x7961 +0x7963 +0x7964 +0x7965 +0x7967 +0x7968 +0x7969 +0x796A +0x796B +0x796D +0x7970 +0x7972 +0x7973 +0x7974 +0x7979 +0x797A +0x797C +0x797D +0x797F +0x7981 +0x7982 +0x7988 +0x798A +0x798B +0x798D +0x798E +0x798F +0x7990 +0x7992 +0x7993 +0x7994 +0x7995 +0x7996 +0x7997 +0x7998 +0x799A +0x799B +0x799C +0x79A0 +0x79A1 +0x79A2 +0x79A4 +0x79A6 +0x79A7 +0x79A8 +0x79AA +0x79AB +0x79AC +0x79AD +0x79AE +0x79B0 +0x79B1 +0x79B2 +0x79B3 +0x79B4 +0x79B6 +0x79B7 +0x79B8 +0x79B9 +0x79BA +0x79BB +0x79BD +0x79BE +0x79BF +0x79C0 +0x79C1 +0x79C5 +0x79C8 +0x79C9 +0x79CB +0x79CD +0x79CE +0x79CF +0x79D1 +0x79D2 +0x79D5 +0x79D6 +0x79D8 +0x79DC +0x79DD +0x79DE +0x79DF +0x79E0 +0x79E3 +0x79E4 +0x79E6 +0x79E7 +0x79E9 +0x79EA +0x79EB +0x79EC +0x79ED +0x79EE +0x79F6 +0x79F7 +0x79F8 +0x79FA +0x79FB +0x7A00 +0x7A02 +0x7A03 +0x7A04 +0x7A05 +0x7A08 +0x7A0A +0x7A0B +0x7A0C +0x7A0D +0x7A10 +0x7A11 +0x7A12 +0x7A13 +0x7A14 +0x7A15 +0x7A17 +0x7A18 +0x7A19 +0x7A1A +0x7A1B +0x7A1C +0x7A1E +0x7A1F +0x7A20 +0x7A22 +0x7A26 +0x7A28 +0x7A2B +0x7A2E +0x7A2F +0x7A30 +0x7A31 +0x7A37 +0x7A39 +0x7A3B +0x7A3C +0x7A3D +0x7A3F +0x7A40 +0x7A44 +0x7A46 +0x7A47 +0x7A48 +0x7A4A +0x7A4B +0x7A4C +0x7A4D +0x7A4E +0x7A54 +0x7A56 +0x7A57 +0x7A58 +0x7A5A +0x7A5B +0x7A5C +0x7A5F +0x7A60 +0x7A61 +0x7A62 +0x7A67 +0x7A68 +0x7A69 +0x7A6B +0x7A6C +0x7A6D +0x7A6E +0x7A70 +0x7A71 +0x7A74 +0x7A75 +0x7A76 +0x7A78 +0x7A79 +0x7A7A +0x7A7B +0x7A7E +0x7A7F +0x7A80 +0x7A81 +0x7A84 +0x7A85 +0x7A86 +0x7A87 +0x7A88 +0x7A89 +0x7A8A +0x7A8B +0x7A8C +0x7A8F +0x7A90 +0x7A92 +0x7A94 +0x7A95 +0x7A96 +0x7A97 +0x7A98 +0x7A99 +0x7A9E +0x7A9F +0x7AA0 +0x7AA2 +0x7AA3 +0x7AA8 +0x7AA9 +0x7AAA +0x7AAB +0x7AAC +0x7AAE +0x7AAF +0x7AB1 +0x7AB2 +0x7AB3 +0x7AB4 +0x7AB5 +0x7AB6 +0x7AB7 +0x7AB8 +0x7ABA +0x7ABE +0x7ABF +0x7AC0 +0x7AC1 +0x7AC4 +0x7AC5 +0x7AC7 +0x7ACA +0x7ACB +0x7AD1 +0x7AD8 +0x7AD9 +0x7ADF +0x7AE0 +0x7AE3 +0x7AE4 +0x7AE5 +0x7AE6 +0x7AEB +0x7AED +0x7AEE +0x7AEF +0x7AF6 +0x7AF7 +0x7AF9 +0x7AFA +0x7AFB +0x7AFD +0x7AFF +0x7B00 +0x7B01 +0x7B04 +0x7B05 +0x7B06 +0x7B08 +0x7B09 +0x7B0A +0x7B0E +0x7B0F +0x7B10 +0x7B11 +0x7B12 +0x7B13 +0x7B18 +0x7B19 +0x7B1A +0x7B1B +0x7B1D +0x7B1E +0x7B20 +0x7B22 +0x7B23 +0x7B24 +0x7B25 +0x7B26 +0x7B28 +0x7B2A +0x7B2B +0x7B2C +0x7B2D +0x7B2E +0x7B2F +0x7B30 +0x7B31 +0x7B32 +0x7B33 +0x7B34 +0x7B35 +0x7B38 +0x7B3B +0x7B40 +0x7B44 +0x7B45 +0x7B46 +0x7B47 +0x7B48 +0x7B49 +0x7B4A +0x7B4B +0x7B4C +0x7B4D +0x7B4E +0x7B4F +0x7B50 +0x7B51 +0x7B52 +0x7B54 +0x7B56 +0x7B58 +0x7B60 +0x7B61 +0x7B63 +0x7B64 +0x7B65 +0x7B66 +0x7B67 +0x7B69 +0x7B6D +0x7B6E +0x7B70 +0x7B71 +0x7B72 +0x7B73 +0x7B74 +0x7B75 +0x7B76 +0x7B77 +0x7B78 +0x7B82 +0x7B84 +0x7B85 +0x7B87 +0x7B88 +0x7B8A +0x7B8B +0x7B8C +0x7B8D +0x7B8E +0x7B8F +0x7B90 +0x7B91 +0x7B94 +0x7B95 +0x7B96 +0x7B97 +0x7B98 +0x7B99 +0x7B9B +0x7B9C +0x7B9D +0x7BA0 +0x7BA1 +0x7BA4 +0x7BAC +0x7BAD +0x7BAF +0x7BB1 +0x7BB4 +0x7BB5 +0x7BB7 +0x7BB8 +0x7BB9 +0x7BBE +0x7BC0 +0x7BC1 +0x7BC4 +0x7BC6 +0x7BC7 +0x7BC9 +0x7BCA +0x7BCB +0x7BCC +0x7BCE +0x7BD4 +0x7BD5 +0x7BD8 +0x7BD9 +0x7BDA +0x7BDB +0x7BDC +0x7BDD +0x7BDE +0x7BDF +0x7BE0 +0x7BE1 +0x7BE2 +0x7BE3 +0x7BE4 +0x7BE5 +0x7BE6 +0x7BE7 +0x7BE8 +0x7BE9 +0x7BEA +0x7BEB +0x7BF0 +0x7BF1 +0x7BF2 +0x7BF3 +0x7BF4 +0x7BF7 +0x7BF8 +0x7BF9 +0x7BFB +0x7BFD +0x7BFE +0x7BFF +0x7C00 +0x7C01 +0x7C02 +0x7C03 +0x7C05 +0x7C06 +0x7C07 +0x7C09 +0x7C0A +0x7C0B +0x7C0C +0x7C0D +0x7C0E +0x7C0F +0x7C10 +0x7C11 +0x7C19 +0x7C1C +0x7C1D +0x7C1E +0x7C1F +0x7C20 +0x7C21 +0x7C22 +0x7C23 +0x7C25 +0x7C26 +0x7C27 +0x7C28 +0x7C29 +0x7C2A +0x7C2B +0x7C2C +0x7C2D +0x7C30 +0x7C33 +0x7C37 +0x7C38 +0x7C39 +0x7C3B +0x7C3C +0x7C3D +0x7C3E +0x7C3F +0x7C40 +0x7C43 +0x7C45 +0x7C47 +0x7C48 +0x7C49 +0x7C4A +0x7C4C +0x7C4D +0x7C50 +0x7C53 +0x7C54 +0x7C57 +0x7C59 +0x7C5A +0x7C5B +0x7C5C +0x7C5F +0x7C60 +0x7C63 +0x7C64 +0x7C65 +0x7C66 +0x7C67 +0x7C69 +0x7C6A +0x7C6B +0x7C6C +0x7C6E +0x7C6F +0x7C72 +0x7C73 +0x7C75 +0x7C78 +0x7C79 +0x7C7A +0x7C7D +0x7C7F +0x7C80 +0x7C81 +0x7C84 +0x7C85 +0x7C88 +0x7C89 +0x7C8A +0x7C8C +0x7C8D +0x7C91 +0x7C92 +0x7C94 +0x7C95 +0x7C96 +0x7C97 +0x7C98 +0x7C9E +0x7C9F +0x7CA1 +0x7CA2 +0x7CA3 +0x7CA5 +0x7CA8 +0x7CAF +0x7CB1 +0x7CB2 +0x7CB3 +0x7CB4 +0x7CB5 +0x7CB9 +0x7CBA +0x7CBB +0x7CBC +0x7CBD +0x7CBE +0x7CBF +0x7CC5 +0x7CC8 +0x7CCA +0x7CCB +0x7CCC +0x7CCE +0x7CD0 +0x7CD1 +0x7CD2 +0x7CD4 +0x7CD5 +0x7CD6 +0x7CD7 +0x7CD9 +0x7CDC +0x7CDD +0x7CDE +0x7CDF +0x7CE0 +0x7CE2 +0x7CE7 +0x7CE8 +0x7CEA +0x7CEC +0x7CEE +0x7CEF +0x7CF0 +0x7CF1 +0x7CF2 +0x7CF4 +0x7CF6 +0x7CF7 +0x7CF8 +0x7CFB +0x7CFD +0x7CFE +0x7D00 +0x7D01 +0x7D02 +0x7D03 +0x7D04 +0x7D05 +0x7D06 +0x7D07 +0x7D08 +0x7D09 +0x7D0A +0x7D0B +0x7D0C +0x7D0D +0x7D0E +0x7D0F +0x7D10 +0x7D11 +0x7D12 +0x7D13 +0x7D14 +0x7D15 +0x7D16 +0x7D17 +0x7D18 +0x7D19 +0x7D1A +0x7D1B +0x7D1C +0x7D1D +0x7D1E +0x7D1F +0x7D20 +0x7D21 +0x7D22 +0x7D28 +0x7D29 +0x7D2B +0x7D2C +0x7D2E +0x7D2F +0x7D30 +0x7D31 +0x7D32 +0x7D33 +0x7D35 +0x7D36 +0x7D38 +0x7D39 +0x7D3A +0x7D3B +0x7D3C +0x7D3D +0x7D3E +0x7D3F +0x7D40 +0x7D41 +0x7D42 +0x7D43 +0x7D44 +0x7D45 +0x7D46 +0x7D47 +0x7D4A +0x7D4E +0x7D4F +0x7D50 +0x7D51 +0x7D52 +0x7D53 +0x7D54 +0x7D55 +0x7D56 +0x7D58 +0x7D5B +0x7D5C +0x7D5E +0x7D5F +0x7D61 +0x7D62 +0x7D63 +0x7D66 +0x7D67 +0x7D68 +0x7D69 +0x7D6A +0x7D6B +0x7D6D +0x7D6E +0x7D6F +0x7D70 +0x7D71 +0x7D72 +0x7D73 +0x7D79 +0x7D7A +0x7D7B +0x7D7C +0x7D7D +0x7D7F +0x7D80 +0x7D81 +0x7D83 +0x7D84 +0x7D85 +0x7D86 +0x7D88 +0x7D8C +0x7D8D +0x7D8E +0x7D8F +0x7D91 +0x7D92 +0x7D93 +0x7D94 +0x7D96 +0x7D9C +0x7D9D +0x7D9E +0x7D9F +0x7DA0 +0x7DA1 +0x7DA2 +0x7DA3 +0x7DA6 +0x7DA7 +0x7DA9 +0x7DAA +0x7DAC +0x7DAD +0x7DAE +0x7DAF +0x7DB0 +0x7DB1 +0x7DB2 +0x7DB4 +0x7DB5 +0x7DB7 +0x7DB8 +0x7DB9 +0x7DBA +0x7DBB +0x7DBC +0x7DBD +0x7DBE +0x7DBF +0x7DC0 +0x7DC1 +0x7DC2 +0x7DC4 +0x7DC5 +0x7DC6 +0x7DC7 +0x7DC9 +0x7DCA +0x7DCB +0x7DCC +0x7DCE +0x7DD2 +0x7DD7 +0x7DD8 +0x7DD9 +0x7DDA +0x7DDB +0x7DDD +0x7DDE +0x7DDF +0x7DE0 +0x7DE1 +0x7DE3 +0x7DE6 +0x7DE7 +0x7DE8 +0x7DE9 +0x7DEA +0x7DEC +0x7DEE +0x7DEF +0x7DF0 +0x7DF1 +0x7DF2 +0x7DF3 +0x7DF4 +0x7DF6 +0x7DF7 +0x7DF9 +0x7DFA +0x7DFB +0x7E03 +0x7E08 +0x7E09 +0x7E0A +0x7E0B +0x7E0C +0x7E0D +0x7E0E +0x7E0F +0x7E10 +0x7E11 +0x7E12 +0x7E13 +0x7E14 +0x7E15 +0x7E16 +0x7E17 +0x7E1A +0x7E1B +0x7E1C +0x7E1D +0x7E1E +0x7E1F +0x7E20 +0x7E21 +0x7E22 +0x7E23 +0x7E24 +0x7E25 +0x7E29 +0x7E2A +0x7E2B +0x7E2D +0x7E2E +0x7E2F +0x7E30 +0x7E31 +0x7E32 +0x7E33 +0x7E34 +0x7E35 +0x7E36 +0x7E37 +0x7E38 +0x7E39 +0x7E3A +0x7E3B +0x7E3C +0x7E3D +0x7E3E +0x7E3F +0x7E40 +0x7E41 +0x7E42 +0x7E43 +0x7E44 +0x7E45 +0x7E46 +0x7E47 +0x7E48 +0x7E49 +0x7E4C +0x7E50 +0x7E51 +0x7E52 +0x7E53 +0x7E54 +0x7E55 +0x7E56 +0x7E57 +0x7E58 +0x7E59 +0x7E5A +0x7E5C +0x7E5E +0x7E5F +0x7E60 +0x7E61 +0x7E62 +0x7E63 +0x7E68 +0x7E69 +0x7E6A +0x7E6B +0x7E6D +0x7E6F +0x7E70 +0x7E72 +0x7E73 +0x7E74 +0x7E75 +0x7E76 +0x7E77 +0x7E78 +0x7E79 +0x7E7A +0x7E7B +0x7E7C +0x7E7D +0x7E7E +0x7E80 +0x7E81 +0x7E82 +0x7E86 +0x7E87 +0x7E88 +0x7E8A +0x7E8B +0x7E8C +0x7E8D +0x7E8F +0x7E91 +0x7E93 +0x7E94 +0x7E95 +0x7E96 +0x7E97 +0x7E98 +0x7E99 +0x7E9A +0x7E9B +0x7E9C +0x7F36 +0x7F38 +0x7F39 +0x7F3A +0x7F3D +0x7F3E +0x7F3F +0x7F43 +0x7F44 +0x7F45 +0x7F48 +0x7F4A +0x7F4B +0x7F4C +0x7F4D +0x7F4F +0x7F50 +0x7F51 +0x7F54 +0x7F55 +0x7F58 +0x7F5B +0x7F5C +0x7F5D +0x7F5E +0x7F5F +0x7F60 +0x7F61 +0x7F63 +0x7F65 +0x7F66 +0x7F67 +0x7F68 +0x7F69 +0x7F6A +0x7F6B +0x7F6C +0x7F6D +0x7F6E +0x7F70 +0x7F72 +0x7F73 +0x7F75 +0x7F76 +0x7F77 +0x7F79 +0x7F7A +0x7F7B +0x7F7C +0x7F7D +0x7F7E +0x7F7F +0x7F83 +0x7F85 +0x7F86 +0x7F87 +0x7F88 +0x7F89 +0x7F8A +0x7F8B +0x7F8C +0x7F8D +0x7F8E +0x7F91 +0x7F92 +0x7F94 +0x7F95 +0x7F96 +0x7F9A +0x7F9B +0x7F9C +0x7F9D +0x7F9E +0x7FA0 +0x7FA1 +0x7FA2 +0x7FA4 +0x7FA5 +0x7FA6 +0x7FA7 +0x7FA8 +0x7FA9 +0x7FAC +0x7FAD +0x7FAF +0x7FB0 +0x7FB1 +0x7FB2 +0x7FB3 +0x7FB5 +0x7FB6 +0x7FB7 +0x7FB8 +0x7FB9 +0x7FBA +0x7FBB +0x7FBC +0x7FBD +0x7FBE +0x7FBF +0x7FC0 +0x7FC1 +0x7FC2 +0x7FC3 +0x7FC5 +0x7FC7 +0x7FC9 +0x7FCA +0x7FCB +0x7FCC +0x7FCD +0x7FCE +0x7FCF +0x7FD0 +0x7FD1 +0x7FD2 +0x7FD4 +0x7FD5 +0x7FD7 +0x7FDB +0x7FDC +0x7FDE +0x7FDF +0x7FE0 +0x7FE1 +0x7FE2 +0x7FE3 +0x7FE5 +0x7FE6 +0x7FE8 +0x7FE9 +0x7FEA +0x7FEB +0x7FEC +0x7FED +0x7FEE +0x7FEF +0x7FF0 +0x7FF1 +0x7FF2 +0x7FF3 +0x7FF4 +0x7FF5 +0x7FF7 +0x7FF8 +0x7FF9 +0x7FFB +0x7FFC +0x7FFD +0x7FFE +0x7FFF +0x8000 +0x8001 +0x8003 +0x8004 +0x8005 +0x8006 +0x8007 +0x800B +0x800C +0x800D +0x800E +0x800F +0x8010 +0x8011 +0x8012 +0x8014 +0x8015 +0x8016 +0x8017 +0x8018 +0x8019 +0x801B +0x801C +0x801E +0x801F +0x8021 +0x8024 +0x8026 +0x8028 +0x8029 +0x802A +0x802C +0x8030 +0x8033 +0x8034 +0x8035 +0x8036 +0x8037 +0x8039 +0x803D +0x803E +0x803F +0x8043 +0x8046 +0x8047 +0x8048 +0x804A +0x804F +0x8050 +0x8051 +0x8052 +0x8056 +0x8058 +0x805A +0x805C +0x805D +0x805E +0x8064 +0x8067 +0x806C +0x806F +0x8070 +0x8071 +0x8072 +0x8073 +0x8075 +0x8076 +0x8077 +0x8078 +0x8079 +0x807D +0x807E +0x807F +0x8082 +0x8084 +0x8085 +0x8086 +0x8087 +0x8089 +0x808A +0x808B +0x808C +0x808F +0x8090 +0x8092 +0x8093 +0x8095 +0x8096 +0x8098 +0x8099 +0x809A +0x809B +0x809C +0x809D +0x80A1 +0x80A2 +0x80A3 +0x80A5 +0x80A9 +0x80AA +0x80AB +0x80AD +0x80AE +0x80AF +0x80B1 +0x80B2 +0x80B4 +0x80B5 +0x80B8 +0x80BA +0x80C2 +0x80C3 +0x80C4 +0x80C5 +0x80C7 +0x80C8 +0x80C9 +0x80CA +0x80CC +0x80CD +0x80CE +0x80CF +0x80D0 +0x80D1 +0x80D4 +0x80D5 +0x80D6 +0x80D7 +0x80D8 +0x80D9 +0x80DA +0x80DB +0x80DC +0x80DD +0x80DE +0x80E0 +0x80E1 +0x80E3 +0x80E4 +0x80E5 +0x80E6 +0x80ED +0x80EF +0x80F0 +0x80F1 +0x80F2 +0x80F3 +0x80F4 +0x80F5 +0x80F8 +0x80F9 +0x80FA +0x80FB +0x80FC +0x80FD +0x80FE +0x8100 +0x8101 +0x8102 +0x8105 +0x8106 +0x8108 +0x810A +0x8115 +0x8116 +0x8118 +0x8119 +0x811B +0x811D +0x811E +0x811F +0x8121 +0x8122 +0x8123 +0x8124 +0x8125 +0x8127 +0x8129 +0x812B +0x812C +0x812D +0x812F +0x8130 +0x8139 +0x813A +0x813D +0x813E +0x8143 +0x8144 +0x8146 +0x8147 +0x814A +0x814B +0x814C +0x814D +0x814E +0x814F +0x8150 +0x8151 +0x8152 +0x8153 +0x8154 +0x8155 +0x815B +0x815C +0x815E +0x8160 +0x8161 +0x8162 +0x8164 +0x8165 +0x8166 +0x8167 +0x8169 +0x816B +0x816E +0x816F +0x8170 +0x8171 +0x8172 +0x8173 +0x8174 +0x8176 +0x8177 +0x8178 +0x8179 +0x817A +0x817F +0x8180 +0x8182 +0x8183 +0x8186 +0x8187 +0x8188 +0x8189 +0x818A +0x818B +0x818C +0x818D +0x818F +0x8195 +0x8197 +0x8198 +0x8199 +0x819A +0x819B +0x819C +0x819D +0x819E +0x819F +0x81A0 +0x81A2 +0x81A3 +0x81A6 +0x81A7 +0x81A8 +0x81A9 +0x81AB +0x81AC +0x81AE +0x81B0 +0x81B1 +0x81B2 +0x81B3 +0x81B4 +0x81B5 +0x81B7 +0x81B9 +0x81BA +0x81BB +0x81BC +0x81BD +0x81BE +0x81BF +0x81C0 +0x81C2 +0x81C3 +0x81C4 +0x81C5 +0x81C6 +0x81C7 +0x81C9 +0x81CA +0x81CC +0x81CD +0x81CF +0x81D0 +0x81D1 +0x81D2 +0x81D5 +0x81D7 +0x81D8 +0x81D9 +0x81DA +0x81DB +0x81DD +0x81DE +0x81DF +0x81E0 +0x81E1 +0x81E2 +0x81E3 +0x81E5 +0x81E6 +0x81E7 +0x81E8 +0x81E9 +0x81EA +0x81EC +0x81ED +0x81EE +0x81F2 +0x81F3 +0x81F4 +0x81F7 +0x81F8 +0x81F9 +0x81FA +0x81FB +0x81FC +0x81FE +0x81FF +0x8200 +0x8201 +0x8202 +0x8204 +0x8205 +0x8207 +0x8208 +0x8209 +0x820A +0x820B +0x820C +0x820D +0x8210 +0x8211 +0x8212 +0x8214 +0x8215 +0x8216 +0x821B +0x821C +0x821D +0x821E +0x821F +0x8220 +0x8221 +0x8222 +0x8225 +0x8228 +0x822A +0x822B +0x822C +0x822F +0x8232 +0x8233 +0x8234 +0x8235 +0x8236 +0x8237 +0x8238 +0x8239 +0x823A +0x823C +0x823D +0x823F +0x8240 +0x8242 +0x8244 +0x8245 +0x8247 +0x8249 +0x824B +0x824E +0x824F +0x8250 +0x8251 +0x8252 +0x8253 +0x8255 +0x8256 +0x8257 +0x8258 +0x8259 +0x825A +0x825B +0x825C +0x825E +0x825F +0x8261 +0x8263 +0x8264 +0x8266 +0x8268 +0x8269 +0x826B +0x826C +0x826D +0x826E +0x826F +0x8271 +0x8272 +0x8274 +0x8275 +0x8277 +0x8278 +0x827C +0x827D +0x827E +0x827F +0x8280 +0x8283 +0x8284 +0x8285 +0x828A +0x828B +0x828D +0x828E +0x828F +0x8290 +0x8291 +0x8292 +0x8293 +0x8294 +0x8298 +0x8299 +0x829A +0x829B +0x829D +0x829E +0x829F +0x82A0 +0x82A1 +0x82A2 +0x82A3 +0x82A4 +0x82A5 +0x82A7 +0x82A8 +0x82A9 +0x82AB +0x82AC +0x82AD +0x82AE +0x82AF +0x82B0 +0x82B1 +0x82B3 +0x82B4 +0x82B5 +0x82B6 +0x82B7 +0x82B8 +0x82B9 +0x82BA +0x82BB +0x82BC +0x82BD +0x82BE +0x82C0 +0x82C2 +0x82C3 +0x82D1 +0x82D2 +0x82D3 +0x82D4 +0x82D5 +0x82D6 +0x82D7 +0x82D9 +0x82DB +0x82DC +0x82DE +0x82DF +0x82E0 +0x82E1 +0x82E3 +0x82E4 +0x82E5 +0x82E6 +0x82E7 +0x82E8 +0x82EA +0x82EB +0x82EC +0x82ED +0x82EF +0x82F0 +0x82F1 +0x82F2 +0x82F3 +0x82F4 +0x82F5 +0x82F6 +0x82F9 +0x82FA +0x82FB +0x82FE +0x8300 +0x8301 +0x8302 +0x8303 +0x8304 +0x8305 +0x8306 +0x8307 +0x8308 +0x8309 +0x830C +0x830D +0x8316 +0x8317 +0x8319 +0x831B +0x831C +0x831E +0x8320 +0x8322 +0x8324 +0x8325 +0x8326 +0x8327 +0x8328 +0x8329 +0x832A +0x832B +0x832C +0x832D +0x832F +0x8331 +0x8332 +0x8333 +0x8334 +0x8335 +0x8336 +0x8337 +0x8338 +0x8339 +0x833A +0x833B +0x833C +0x833F +0x8340 +0x8341 +0x8342 +0x8343 +0x8344 +0x8345 +0x8347 +0x8348 +0x8349 +0x834A +0x834B +0x834C +0x834D +0x834E +0x834F +0x8350 +0x8351 +0x8352 +0x8353 +0x8354 +0x8356 +0x8373 +0x8374 +0x8375 +0x8376 +0x8377 +0x8378 +0x837A +0x837B +0x837C +0x837D +0x837E +0x837F +0x8381 +0x8383 +0x8386 +0x8387 +0x8388 +0x8389 +0x838A +0x838B +0x838C +0x838D +0x838E +0x838F +0x8390 +0x8392 +0x8393 +0x8394 +0x8395 +0x8396 +0x8397 +0x8398 +0x8399 +0x839A +0x839B +0x839D +0x839E +0x83A0 +0x83A2 +0x83A3 +0x83A4 +0x83A5 +0x83A6 +0x83A7 +0x83A8 +0x83A9 +0x83AA +0x83AB +0x83AE +0x83AF +0x83B0 +0x83BD +0x83BF +0x83C0 +0x83C1 +0x83C2 +0x83C3 +0x83C4 +0x83C5 +0x83C6 +0x83C7 +0x83C8 +0x83C9 +0x83CA +0x83CB +0x83CC +0x83CE +0x83CF +0x83D1 +0x83D4 +0x83D5 +0x83D6 +0x83D7 +0x83D8 +0x83D9 +0x83DB +0x83DC +0x83DD +0x83DE +0x83DF +0x83E0 +0x83E1 +0x83E2 +0x83E3 +0x83E4 +0x83E5 +0x83E7 +0x83E8 +0x83E9 +0x83EA +0x83EB +0x83EC +0x83EE +0x83EF +0x83F0 +0x83F1 +0x83F2 +0x83F3 +0x83F4 +0x83F5 +0x83F6 +0x83F8 +0x83F9 +0x83FA +0x83FB +0x83FC +0x83FD +0x83FE +0x83FF +0x8401 +0x8403 +0x8404 +0x8406 +0x8407 +0x8409 +0x840A +0x840B +0x840C +0x840D +0x840E +0x840F +0x8410 +0x8411 +0x8412 +0x8413 +0x841B +0x8423 +0x8429 +0x842B +0x842C +0x842D +0x842F +0x8430 +0x8431 +0x8432 +0x8433 +0x8434 +0x8435 +0x8436 +0x8437 +0x8438 +0x8439 +0x843A +0x843B +0x843C +0x843D +0x843F +0x8440 +0x8442 +0x8443 +0x8444 +0x8445 +0x8446 +0x8447 +0x8449 +0x844B +0x844C +0x844D +0x844E +0x8450 +0x8451 +0x8452 +0x8454 +0x8456 +0x8457 +0x8459 +0x845A +0x845B +0x845D +0x845E +0x845F +0x8460 +0x8461 +0x8463 +0x8465 +0x8466 +0x8467 +0x8468 +0x8469 +0x846B +0x846C +0x846D +0x846E +0x846F +0x8470 +0x8473 +0x8474 +0x8475 +0x8476 +0x8477 +0x8478 +0x8479 +0x847A +0x847D +0x847E +0x8482 +0x8486 +0x848D +0x848E +0x848F +0x8490 +0x8491 +0x8494 +0x8497 +0x8498 +0x8499 +0x849A +0x849B +0x849C +0x849D +0x849E +0x849F +0x84A0 +0x84A1 +0x84A2 +0x84A4 +0x84A7 +0x84A8 +0x84A9 +0x84AA +0x84AB +0x84AC +0x84AE +0x84AF +0x84B0 +0x84B1 +0x84B2 +0x84B4 +0x84B6 +0x84B8 +0x84B9 +0x84BA +0x84BB +0x84BC +0x84BF +0x84C0 +0x84C1 +0x84C2 +0x84C4 +0x84C5 +0x84C6 +0x84C7 +0x84C9 +0x84CA +0x84CB +0x84CC +0x84CD +0x84CE +0x84CF +0x84D0 +0x84D1 +0x84D2 +0x84D3 +0x84D4 +0x84D6 +0x84D7 +0x84DB +0x84E7 +0x84E8 +0x84E9 +0x84EA +0x84EB +0x84EC +0x84EE +0x84EF +0x84F0 +0x84F1 +0x84F2 +0x84F3 +0x84F4 +0x84F6 +0x84F7 +0x84F9 +0x84FA +0x84FB +0x84FC +0x84FD +0x84FE +0x84FF +0x8500 +0x8502 +0x8506 +0x8507 +0x8508 +0x8509 +0x850A +0x850B +0x850C +0x850D +0x850E +0x850F +0x8511 +0x8512 +0x8513 +0x8514 +0x8515 +0x8516 +0x8517 +0x8518 +0x8519 +0x851A +0x851C +0x851D +0x851E +0x851F +0x8520 +0x8521 +0x8523 +0x8524 +0x8525 +0x8526 +0x8527 +0x8528 +0x8529 +0x852A +0x852B +0x852C +0x852D +0x852E +0x852F +0x8530 +0x8531 +0x853B +0x853D +0x853E +0x8540 +0x8541 +0x8543 +0x8544 +0x8545 +0x8546 +0x8547 +0x8548 +0x8549 +0x854A +0x854D +0x854E +0x8551 +0x8553 +0x8554 +0x8555 +0x8556 +0x8557 +0x8558 +0x8559 +0x855B +0x855D +0x855E +0x8560 +0x8561 +0x8562 +0x8563 +0x8564 +0x8565 +0x8566 +0x8567 +0x8568 +0x8569 +0x856A +0x856B +0x856C +0x856D +0x856E +0x8571 +0x8575 +0x8576 +0x8577 +0x8578 +0x8579 +0x857A +0x857B +0x857C +0x857E +0x8580 +0x8581 +0x8582 +0x8583 +0x8584 +0x8585 +0x8586 +0x8587 +0x8588 +0x8589 +0x858A +0x858B +0x858C +0x858D +0x858E +0x858F +0x8590 +0x8591 +0x8594 +0x8595 +0x8596 +0x8598 +0x8599 +0x859A +0x859B +0x859C +0x859D +0x859E +0x859F +0x85A0 +0x85A1 +0x85A2 +0x85A3 +0x85A4 +0x85A6 +0x85A7 +0x85A8 +0x85A9 +0x85AA +0x85AF +0x85B0 +0x85B1 +0x85B3 +0x85B4 +0x85B5 +0x85B6 +0x85B7 +0x85B8 +0x85B9 +0x85BA +0x85BD +0x85BE +0x85BF +0x85C0 +0x85C2 +0x85C3 +0x85C4 +0x85C5 +0x85C6 +0x85C7 +0x85C8 +0x85C9 +0x85CB +0x85CD +0x85CE +0x85CF +0x85D0 +0x85D1 +0x85D2 +0x85D5 +0x85D7 +0x85D8 +0x85D9 +0x85DA +0x85DC +0x85DD +0x85DE +0x85DF +0x85E1 +0x85E2 +0x85E3 +0x85E4 +0x85E5 +0x85E6 +0x85E8 +0x85E9 +0x85EA +0x85EB +0x85EC +0x85ED +0x85EF +0x85F0 +0x85F1 +0x85F2 +0x85F6 +0x85F7 +0x85F8 +0x85F9 +0x85FA +0x85FB +0x85FD +0x85FE +0x85FF +0x8600 +0x8601 +0x8604 +0x8605 +0x8606 +0x8607 +0x8609 +0x860A +0x860B +0x860C +0x8611 +0x8617 +0x8618 +0x8619 +0x861A +0x861B +0x861C +0x861E +0x861F +0x8620 +0x8621 +0x8622 +0x8623 +0x8624 +0x8625 +0x8626 +0x8627 +0x8629 +0x862A +0x862C +0x862D +0x862E +0x8631 +0x8632 +0x8633 +0x8634 +0x8635 +0x8636 +0x8638 +0x8639 +0x863A +0x863B +0x863C +0x863E +0x863F +0x8640 +0x8643 +0x8646 +0x8647 +0x8648 +0x864B +0x864C +0x864D +0x864E +0x8650 +0x8652 +0x8653 +0x8654 +0x8655 +0x8656 +0x8659 +0x865B +0x865C +0x865E +0x865F +0x8661 +0x8662 +0x8663 +0x8664 +0x8665 +0x8667 +0x8668 +0x8669 +0x866A +0x866B +0x866D +0x866E +0x866F +0x8670 +0x8671 +0x8673 +0x8674 +0x8677 +0x8679 +0x867A +0x867B +0x867C +0x8685 +0x8686 +0x8687 +0x868A +0x868B +0x868C +0x868D +0x868E +0x8690 +0x8691 +0x8693 +0x8694 +0x8695 +0x8696 +0x8697 +0x8698 +0x8699 +0x869A +0x869C +0x869D +0x869E +0x86A1 +0x86A2 +0x86A3 +0x86A4 +0x86A5 +0x86A7 +0x86A8 +0x86A9 +0x86AA +0x86AF +0x86B0 +0x86B1 +0x86B3 +0x86B4 +0x86B5 +0x86B6 +0x86B7 +0x86B8 +0x86B9 +0x86BA +0x86BB +0x86BC +0x86BD +0x86BE +0x86BF +0x86C0 +0x86C1 +0x86C2 +0x86C3 +0x86C4 +0x86C5 +0x86C6 +0x86C7 +0x86C8 +0x86C9 +0x86CB +0x86CC +0x86D0 +0x86D1 +0x86D3 +0x86D4 +0x86D6 +0x86D7 +0x86D8 +0x86D9 +0x86DA +0x86DB +0x86DC +0x86DD +0x86DE +0x86DF +0x86E2 +0x86E3 +0x86E4 +0x86E6 +0x86E8 +0x86E9 +0x86EA +0x86EB +0x86EC +0x86ED +0x86F5 +0x86F6 +0x86F7 +0x86F8 +0x86F9 +0x86FA +0x86FB +0x86FE +0x8700 +0x8701 +0x8702 +0x8703 +0x8704 +0x8705 +0x8706 +0x8707 +0x8708 +0x8709 +0x870A +0x870B +0x870C +0x870D +0x870E +0x8711 +0x8712 +0x8713 +0x8718 +0x8719 +0x871A +0x871B +0x871C +0x871E +0x8720 +0x8721 +0x8722 +0x8723 +0x8724 +0x8725 +0x8726 +0x8727 +0x8728 +0x8729 +0x872A +0x872C +0x872D +0x872E +0x8730 +0x8731 +0x8732 +0x8733 +0x8734 +0x8735 +0x8737 +0x8738 +0x873A +0x873B +0x873C +0x873E +0x873F +0x8740 +0x8741 +0x8742 +0x8743 +0x8746 +0x874C +0x874D +0x874E +0x874F +0x8750 +0x8751 +0x8752 +0x8753 +0x8754 +0x8755 +0x8756 +0x8757 +0x8758 +0x8759 +0x875A +0x875B +0x875C +0x875D +0x875E +0x875F +0x8760 +0x8761 +0x8762 +0x8763 +0x8764 +0x8765 +0x8766 +0x8767 +0x8768 +0x8769 +0x876A +0x876B +0x876C +0x876D +0x876E +0x876F +0x8773 +0x8774 +0x8775 +0x8776 +0x8777 +0x8778 +0x8779 +0x877A +0x877B +0x8781 +0x8782 +0x8783 +0x8784 +0x8785 +0x8787 +0x8788 +0x8789 +0x878D +0x878F +0x8790 +0x8791 +0x8792 +0x8793 +0x8794 +0x8796 +0x8797 +0x8798 +0x879A +0x879B +0x879C +0x879D +0x879E +0x879F +0x87A2 +0x87A3 +0x87A4 +0x87AA +0x87AB +0x87AC +0x87AD +0x87AE +0x87AF +0x87B0 +0x87B2 +0x87B3 +0x87B4 +0x87B5 +0x87B6 +0x87B7 +0x87B8 +0x87B9 +0x87BA +0x87BB +0x87BC +0x87BD +0x87BE +0x87BF +0x87C0 +0x87C2 +0x87C3 +0x87C4 +0x87C5 +0x87C6 +0x87C8 +0x87C9 +0x87CA +0x87CB +0x87CC +0x87D1 +0x87D2 +0x87D3 +0x87D4 +0x87D7 +0x87D8 +0x87D9 +0x87DB +0x87DC +0x87DD +0x87DE +0x87DF +0x87E0 +0x87E1 +0x87E2 +0x87E3 +0x87E4 +0x87E5 +0x87E6 +0x87E7 +0x87E8 +0x87EA +0x87EB +0x87EC +0x87ED +0x87EF +0x87F2 +0x87F3 +0x87F4 +0x87F6 +0x87F7 +0x87F9 +0x87FA +0x87FB +0x87FC +0x87FE +0x87FF +0x8800 +0x8801 +0x8802 +0x8803 +0x8805 +0x8806 +0x8808 +0x8809 +0x880A +0x880B +0x880C +0x880D +0x8810 +0x8811 +0x8813 +0x8814 +0x8815 +0x8816 +0x8817 +0x8819 +0x881B +0x881C +0x881D +0x881F +0x8820 +0x8821 +0x8822 +0x8823 +0x8824 +0x8825 +0x8826 +0x8828 +0x8829 +0x882A +0x882B +0x882C +0x882E +0x882F +0x8830 +0x8831 +0x8832 +0x8833 +0x8835 +0x8836 +0x8837 +0x8838 +0x8839 +0x883B +0x883C +0x883D +0x883E +0x883F +0x8840 +0x8841 +0x8843 +0x8844 +0x8848 +0x884A +0x884B +0x884C +0x884D +0x884E +0x8852 +0x8853 +0x8855 +0x8856 +0x8857 +0x8859 +0x885A +0x885B +0x885D +0x8861 +0x8862 +0x8863 +0x8867 +0x8868 +0x8869 +0x886A +0x886B +0x886D +0x886F +0x8870 +0x8871 +0x8872 +0x8874 +0x8875 +0x8876 +0x8877 +0x8879 +0x887C +0x887D +0x887E +0x887F +0x8880 +0x8881 +0x8882 +0x8883 +0x8888 +0x8889 +0x888B +0x888C +0x888D +0x888E +0x8891 +0x8892 +0x8893 +0x8895 +0x8896 +0x8897 +0x8898 +0x8899 +0x889A +0x889B +0x889E +0x889F +0x88A1 +0x88A2 +0x88A4 +0x88A7 +0x88A8 +0x88AA +0x88AB +0x88AC +0x88B1 +0x88B2 +0x88B6 +0x88B7 +0x88B8 +0x88B9 +0x88BA +0x88BC +0x88BD +0x88BE +0x88C0 +0x88C1 +0x88C2 +0x88C9 +0x88CA +0x88CB +0x88CC +0x88CD +0x88CE +0x88D0 +0x88D2 +0x88D4 +0x88D5 +0x88D6 +0x88D7 +0x88D8 +0x88D9 +0x88DA +0x88DB +0x88DC +0x88DD +0x88DE +0x88DF +0x88E1 +0x88E7 +0x88E8 +0x88EB +0x88EC +0x88EE +0x88EF +0x88F0 +0x88F1 +0x88F2 +0x88F3 +0x88F4 +0x88F6 +0x88F7 +0x88F8 +0x88F9 +0x88FA +0x88FB +0x88FC +0x88FD +0x88FE +0x8901 +0x8902 +0x8905 +0x8906 +0x8907 +0x8909 +0x890A +0x890B +0x890C +0x890E +0x8910 +0x8911 +0x8912 +0x8913 +0x8914 +0x8915 +0x8916 +0x8917 +0x8918 +0x8919 +0x891A +0x891E +0x891F +0x8921 +0x8922 +0x8923 +0x8925 +0x8926 +0x8927 +0x8929 +0x892A +0x892B +0x892C +0x892D +0x892E +0x892F +0x8930 +0x8931 +0x8932 +0x8933 +0x8935 +0x8936 +0x8937 +0x8938 +0x893B +0x893C +0x893D +0x893E +0x8941 +0x8942 +0x8944 +0x8946 +0x8949 +0x894B +0x894C +0x894F +0x8950 +0x8951 +0x8952 +0x8953 +0x8956 +0x8957 +0x8958 +0x8959 +0x895A +0x895B +0x895C +0x895D +0x895E +0x895F +0x8960 +0x8961 +0x8962 +0x8963 +0x8964 +0x8966 +0x8969 +0x896A +0x896B +0x896C +0x896D +0x896E +0x896F +0x8971 +0x8972 +0x8973 +0x8974 +0x8976 +0x8979 +0x897A +0x897B +0x897C +0x897E +0x897F +0x8981 +0x8982 +0x8983 +0x8985 +0x8986 +0x8988 +0x898B +0x898F +0x8993 +0x8995 +0x8996 +0x8997 +0x8998 +0x899B +0x899C +0x899D +0x899E +0x899F +0x89A1 +0x89A2 +0x89A3 +0x89A4 +0x89A6 +0x89AA +0x89AC +0x89AD +0x89AE +0x89AF +0x89B2 +0x89B6 +0x89B7 +0x89B9 +0x89BA +0x89BD +0x89BE +0x89BF +0x89C0 +0x89D2 +0x89D3 +0x89D4 +0x89D5 +0x89D6 +0x89D9 +0x89DA +0x89DB +0x89DC +0x89DD +0x89DF +0x89E0 +0x89E1 +0x89E2 +0x89E3 +0x89E4 +0x89E5 +0x89E6 +0x89E8 +0x89E9 +0x89EB +0x89EC +0x89ED +0x89F0 +0x89F1 +0x89F2 +0x89F3 +0x89F4 +0x89F6 +0x89F7 +0x89F8 +0x89FA +0x89FB +0x89FC +0x89FE +0x89FF +0x8A00 +0x8A02 +0x8A03 +0x8A04 +0x8A07 +0x8A08 +0x8A0A +0x8A0C +0x8A0E +0x8A0F +0x8A10 +0x8A11 +0x8A12 +0x8A13 +0x8A15 +0x8A16 +0x8A17 +0x8A18 +0x8A1B +0x8A1D +0x8A1E +0x8A1F +0x8A22 +0x8A23 +0x8A25 +0x8A27 +0x8A2A +0x8A2C +0x8A2D +0x8A30 +0x8A31 +0x8A34 +0x8A36 +0x8A39 +0x8A3A +0x8A3B +0x8A3C +0x8A3E +0x8A3F +0x8A40 +0x8A41 +0x8A44 +0x8A45 +0x8A46 +0x8A48 +0x8A4A +0x8A4C +0x8A4D +0x8A4E +0x8A4F +0x8A50 +0x8A51 +0x8A52 +0x8A54 +0x8A55 +0x8A56 +0x8A57 +0x8A58 +0x8A59 +0x8A5B +0x8A5E +0x8A60 +0x8A61 +0x8A62 +0x8A63 +0x8A66 +0x8A68 +0x8A69 +0x8A6B +0x8A6C +0x8A6D +0x8A6E +0x8A70 +0x8A71 +0x8A72 +0x8A73 +0x8A74 +0x8A75 +0x8A76 +0x8A77 +0x8A79 +0x8A7A +0x8A7B +0x8A7C +0x8A7F +0x8A81 +0x8A82 +0x8A83 +0x8A84 +0x8A85 +0x8A86 +0x8A87 +0x8A8B +0x8A8C +0x8A8D +0x8A8F +0x8A91 +0x8A92 +0x8A93 +0x8A95 +0x8A96 +0x8A98 +0x8A99 +0x8A9A +0x8A9E +0x8AA0 +0x8AA1 +0x8AA3 +0x8AA4 +0x8AA5 +0x8AA6 +0x8AA7 +0x8AA8 +0x8AAA +0x8AAB +0x8AB0 +0x8AB2 +0x8AB6 +0x8AB8 +0x8AB9 +0x8ABA +0x8ABB +0x8ABC +0x8ABD +0x8ABE +0x8ABF +0x8AC0 +0x8AC2 +0x8AC3 +0x8AC4 +0x8AC5 +0x8AC6 +0x8AC7 +0x8AC8 +0x8AC9 +0x8ACB +0x8ACD +0x8ACF +0x8AD1 +0x8AD2 +0x8AD3 +0x8AD4 +0x8AD5 +0x8AD6 +0x8AD7 +0x8AD8 +0x8AD9 +0x8ADB +0x8ADC +0x8ADD +0x8ADE +0x8ADF +0x8AE0 +0x8AE1 +0x8AE2 +0x8AE4 +0x8AE6 +0x8AE7 +0x8AE8 +0x8AEB +0x8AED +0x8AEE +0x8AEF +0x8AF0 +0x8AF1 +0x8AF2 +0x8AF3 +0x8AF4 +0x8AF5 +0x8AF6 +0x8AF7 +0x8AF8 +0x8AFA +0x8AFB +0x8AFC +0x8AFE +0x8AFF +0x8B00 +0x8B01 +0x8B02 +0x8B04 +0x8B05 +0x8B06 +0x8B07 +0x8B08 +0x8B0A +0x8B0B +0x8B0D +0x8B0E +0x8B0F +0x8B10 +0x8B11 +0x8B12 +0x8B13 +0x8B14 +0x8B15 +0x8B16 +0x8B17 +0x8B18 +0x8B19 +0x8B1A +0x8B1B +0x8B1C +0x8B1D +0x8B1E +0x8B20 +0x8B22 +0x8B23 +0x8B24 +0x8B25 +0x8B26 +0x8B27 +0x8B28 +0x8B2A +0x8B2B +0x8B2C +0x8B2E +0x8B2F +0x8B30 +0x8B31 +0x8B33 +0x8B35 +0x8B36 +0x8B37 +0x8B39 +0x8B3A +0x8B3B +0x8B3C +0x8B3D +0x8B3E +0x8B40 +0x8B41 +0x8B42 +0x8B45 +0x8B46 +0x8B47 +0x8B48 +0x8B49 +0x8B4A +0x8B4B +0x8B4E +0x8B4F +0x8B50 +0x8B51 +0x8B52 +0x8B53 +0x8B54 +0x8B55 +0x8B56 +0x8B57 +0x8B58 +0x8B59 +0x8B5A +0x8B5C +0x8B5D +0x8B5F +0x8B60 +0x8B63 +0x8B65 +0x8B66 +0x8B67 +0x8B68 +0x8B6A +0x8B6B +0x8B6C +0x8B6D +0x8B6F +0x8B70 +0x8B74 +0x8B77 +0x8B78 +0x8B79 +0x8B7A +0x8B7B +0x8B7D +0x8B7E +0x8B7F +0x8B80 +0x8B82 +0x8B84 +0x8B85 +0x8B86 +0x8B88 +0x8B8A +0x8B8B +0x8B8C +0x8B8E +0x8B92 +0x8B93 +0x8B94 +0x8B95 +0x8B96 +0x8B98 +0x8B99 +0x8B9A +0x8B9C +0x8B9E +0x8B9F +0x8C37 +0x8C39 +0x8C3B +0x8C3C +0x8C3D +0x8C3E +0x8C3F +0x8C41 +0x8C42 +0x8C43 +0x8C45 +0x8C46 +0x8C47 +0x8C48 +0x8C49 +0x8C4A +0x8C4B +0x8C4C +0x8C4D +0x8C4E +0x8C4F +0x8C50 +0x8C54 +0x8C55 +0x8C56 +0x8C57 +0x8C5A +0x8C5C +0x8C5D +0x8C5F +0x8C61 +0x8C62 +0x8C64 +0x8C65 +0x8C66 +0x8C68 +0x8C69 +0x8C6A +0x8C6B +0x8C6C +0x8C6D +0x8C6F +0x8C70 +0x8C71 +0x8C72 +0x8C73 +0x8C75 +0x8C76 +0x8C77 +0x8C78 +0x8C79 +0x8C7A +0x8C7B +0x8C7D +0x8C80 +0x8C81 +0x8C82 +0x8C84 +0x8C85 +0x8C86 +0x8C89 +0x8C8A +0x8C8C +0x8C8D +0x8C8F +0x8C90 +0x8C91 +0x8C92 +0x8C93 +0x8C94 +0x8C95 +0x8C97 +0x8C98 +0x8C99 +0x8C9A +0x8C9C +0x8C9D +0x8C9E +0x8CA0 +0x8CA1 +0x8CA2 +0x8CA3 +0x8CA4 +0x8CA5 +0x8CA7 +0x8CA8 +0x8CA9 +0x8CAA +0x8CAB +0x8CAC +0x8CAF +0x8CB0 +0x8CB2 +0x8CB3 +0x8CB4 +0x8CB5 +0x8CB6 +0x8CB7 +0x8CB8 +0x8CB9 +0x8CBA +0x8CBB +0x8CBC +0x8CBD +0x8CBE +0x8CBF +0x8CC0 +0x8CC1 +0x8CC2 +0x8CC3 +0x8CC4 +0x8CC5 +0x8CC7 +0x8CC8 +0x8CCA +0x8CCC +0x8CCF +0x8CD1 +0x8CD2 +0x8CD3 +0x8CD5 +0x8CD7 +0x8CD9 +0x8CDA +0x8CDC +0x8CDD +0x8CDE +0x8CDF +0x8CE0 +0x8CE1 +0x8CE2 +0x8CE3 +0x8CE4 +0x8CE5 +0x8CE6 +0x8CE7 +0x8CE8 +0x8CEA +0x8CEC +0x8CED +0x8CEE +0x8CF0 +0x8CF1 +0x8CF3 +0x8CF4 +0x8CF5 +0x8CF8 +0x8CF9 +0x8CFA +0x8CFB +0x8CFC +0x8CFD +0x8CFE +0x8D00 +0x8D02 +0x8D04 +0x8D05 +0x8D06 +0x8D07 +0x8D08 +0x8D09 +0x8D0A +0x8D0D +0x8D0F +0x8D10 +0x8D13 +0x8D14 +0x8D15 +0x8D16 +0x8D17 +0x8D19 +0x8D1B +0x8D64 +0x8D66 +0x8D67 +0x8D68 +0x8D69 +0x8D6B +0x8D6C +0x8D6D +0x8D6E +0x8D6F +0x8D70 +0x8D72 +0x8D73 +0x8D74 +0x8D76 +0x8D77 +0x8D78 +0x8D79 +0x8D7B +0x8D7D +0x8D80 +0x8D81 +0x8D84 +0x8D85 +0x8D89 +0x8D8A +0x8D8C +0x8D8D +0x8D8E +0x8D8F +0x8D90 +0x8D91 +0x8D92 +0x8D93 +0x8D94 +0x8D95 +0x8D96 +0x8D99 +0x8D9B +0x8D9C +0x8D9F +0x8DA0 +0x8DA1 +0x8DA3 +0x8DA5 +0x8DA7 +0x8DA8 +0x8DAA +0x8DAB +0x8DAC +0x8DAD +0x8DAE +0x8DAF +0x8DB2 +0x8DB3 +0x8DB4 +0x8DB5 +0x8DB6 +0x8DB7 +0x8DB9 +0x8DBA +0x8DBC +0x8DBE +0x8DBF +0x8DC1 +0x8DC2 +0x8DC5 +0x8DC6 +0x8DC7 +0x8DC8 +0x8DCB +0x8DCC +0x8DCD +0x8DCE +0x8DCF +0x8DD0 +0x8DD1 +0x8DD3 +0x8DD5 +0x8DD6 +0x8DD7 +0x8DD8 +0x8DD9 +0x8DDA +0x8DDB +0x8DDC +0x8DDD +0x8DDF +0x8DE0 +0x8DE1 +0x8DE2 +0x8DE3 +0x8DE4 +0x8DE6 +0x8DE7 +0x8DE8 +0x8DE9 +0x8DEA +0x8DEB +0x8DEC +0x8DEE +0x8DEF +0x8DF0 +0x8DF1 +0x8DF2 +0x8DF3 +0x8DF4 +0x8DFA +0x8DFC +0x8DFD +0x8DFE +0x8DFF +0x8E00 +0x8E02 +0x8E03 +0x8E04 +0x8E05 +0x8E06 +0x8E07 +0x8E09 +0x8E0A +0x8E0D +0x8E0F +0x8E10 +0x8E11 +0x8E12 +0x8E13 +0x8E14 +0x8E15 +0x8E16 +0x8E17 +0x8E18 +0x8E19 +0x8E1A +0x8E1B +0x8E1C +0x8E1D +0x8E1E +0x8E1F +0x8E20 +0x8E21 +0x8E22 +0x8E23 +0x8E24 +0x8E25 +0x8E26 +0x8E27 +0x8E29 +0x8E2B +0x8E2E +0x8E30 +0x8E31 +0x8E33 +0x8E34 +0x8E35 +0x8E36 +0x8E38 +0x8E39 +0x8E3C +0x8E3D +0x8E3E +0x8E3F +0x8E40 +0x8E41 +0x8E42 +0x8E44 +0x8E45 +0x8E47 +0x8E48 +0x8E49 +0x8E4A +0x8E4B +0x8E4C +0x8E4D +0x8E4E +0x8E50 +0x8E53 +0x8E54 +0x8E55 +0x8E56 +0x8E57 +0x8E59 +0x8E5A +0x8E5B +0x8E5C +0x8E5D +0x8E5E +0x8E5F +0x8E60 +0x8E61 +0x8E62 +0x8E63 +0x8E64 +0x8E65 +0x8E66 +0x8E67 +0x8E69 +0x8E6A +0x8E6C +0x8E6D +0x8E6F +0x8E72 +0x8E73 +0x8E74 +0x8E76 +0x8E78 +0x8E7A +0x8E7B +0x8E7C +0x8E81 +0x8E82 +0x8E84 +0x8E85 +0x8E86 +0x8E87 +0x8E88 +0x8E89 +0x8E8A +0x8E8B +0x8E8C +0x8E8D +0x8E8E +0x8E90 +0x8E91 +0x8E92 +0x8E93 +0x8E94 +0x8E95 +0x8E96 +0x8E97 +0x8E98 +0x8E9A +0x8E9D +0x8E9E +0x8E9F +0x8EA0 +0x8EA1 +0x8EA3 +0x8EA4 +0x8EA5 +0x8EA6 +0x8EA8 +0x8EA9 +0x8EAA +0x8EAB +0x8EAC +0x8EB2 +0x8EBA +0x8EBD +0x8EC0 +0x8EC2 +0x8EC9 +0x8ECA +0x8ECB +0x8ECC +0x8ECD +0x8ECF +0x8ED1 +0x8ED2 +0x8ED3 +0x8ED4 +0x8ED7 +0x8ED8 +0x8EDB +0x8EDC +0x8EDD +0x8EDE +0x8EDF +0x8EE0 +0x8EE1 +0x8EE5 +0x8EE6 +0x8EE7 +0x8EE8 +0x8EE9 +0x8EEB +0x8EEC +0x8EEE +0x8EEF +0x8EF1 +0x8EF4 +0x8EF5 +0x8EF6 +0x8EF7 +0x8EF8 +0x8EF9 +0x8EFA +0x8EFB +0x8EFC +0x8EFE +0x8EFF +0x8F00 +0x8F01 +0x8F02 +0x8F03 +0x8F05 +0x8F06 +0x8F07 +0x8F08 +0x8F09 +0x8F0A +0x8F0B +0x8F0D +0x8F0E +0x8F10 +0x8F11 +0x8F12 +0x8F13 +0x8F14 +0x8F15 +0x8F16 +0x8F17 +0x8F18 +0x8F1A +0x8F1B +0x8F1C +0x8F1D +0x8F1E +0x8F1F +0x8F20 +0x8F23 +0x8F24 +0x8F25 +0x8F26 +0x8F29 +0x8F2A +0x8F2C +0x8F2E +0x8F2F +0x8F32 +0x8F33 +0x8F34 +0x8F35 +0x8F36 +0x8F37 +0x8F38 +0x8F39 +0x8F3B +0x8F3E +0x8F3F +0x8F40 +0x8F42 +0x8F43 +0x8F44 +0x8F45 +0x8F46 +0x8F47 +0x8F48 +0x8F49 +0x8F4B +0x8F4D +0x8F4E +0x8F4F +0x8F50 +0x8F51 +0x8F52 +0x8F53 +0x8F54 +0x8F55 +0x8F56 +0x8F57 +0x8F58 +0x8F59 +0x8F5A +0x8F5B +0x8F5D +0x8F5E +0x8F5F +0x8F60 +0x8F61 +0x8F62 +0x8F63 +0x8F64 +0x8F9B +0x8F9C +0x8F9F +0x8FA3 +0x8FA6 +0x8FA8 +0x8FAD +0x8FAE +0x8FAF +0x8FB0 +0x8FB1 +0x8FB2 +0x8FB4 +0x8FBF +0x8FC2 +0x8FC4 +0x8FC5 +0x8FC6 +0x8FC9 +0x8FCB +0x8FCD +0x8FCE +0x8FD1 +0x8FD2 +0x8FD3 +0x8FD4 +0x8FD5 +0x8FD6 +0x8FD7 +0x8FE0 +0x8FE1 +0x8FE2 +0x8FE3 +0x8FE4 +0x8FE5 +0x8FE6 +0x8FE8 +0x8FEA +0x8FEB +0x8FED +0x8FEE +0x8FF0 +0x8FF4 +0x8FF5 +0x8FF6 +0x8FF7 +0x8FF8 +0x8FFA +0x8FFB +0x8FFC +0x8FFD +0x8FFE +0x8FFF +0x9000 +0x9001 +0x9002 +0x9003 +0x9004 +0x9005 +0x9006 +0x900B +0x900C +0x900D +0x900F +0x9010 +0x9011 +0x9014 +0x9015 +0x9016 +0x9017 +0x9019 +0x901A +0x901B +0x901C +0x901D +0x901E +0x901F +0x9020 +0x9021 +0x9022 +0x9023 +0x9024 +0x902D +0x902E +0x902F +0x9031 +0x9032 +0x9034 +0x9035 +0x9036 +0x9038 +0x903C +0x903D +0x903E +0x903F +0x9041 +0x9042 +0x9044 +0x9047 +0x9049 +0x904A +0x904B +0x904D +0x904E +0x904F +0x9050 +0x9051 +0x9052 +0x9053 +0x9054 +0x9055 +0x9058 +0x9059 +0x905B +0x905C +0x905D +0x905E +0x9060 +0x9062 +0x9063 +0x9067 +0x9068 +0x9069 +0x906B +0x906D +0x906E +0x906F +0x9070 +0x9072 +0x9073 +0x9074 +0x9075 +0x9076 +0x9077 +0x9078 +0x9079 +0x907A +0x907B +0x907C +0x907D +0x907E +0x907F +0x9080 +0x9081 +0x9082 +0x9083 +0x9084 +0x9085 +0x9086 +0x9087 +0x9088 +0x908A +0x908B +0x908D +0x908F +0x9090 +0x9091 +0x9094 +0x9095 +0x9097 +0x9098 +0x9099 +0x909B +0x909E +0x909F +0x90A0 +0x90A1 +0x90A2 +0x90A3 +0x90A5 +0x90A6 +0x90A7 +0x90AA +0x90AF +0x90B0 +0x90B1 +0x90B2 +0x90B3 +0x90B4 +0x90B5 +0x90B6 +0x90B8 +0x90BD +0x90BE +0x90BF +0x90C1 +0x90C3 +0x90C5 +0x90C7 +0x90C8 +0x90CA +0x90CB +0x90CE +0x90D4 +0x90D5 +0x90D6 +0x90D7 +0x90D8 +0x90D9 +0x90DA +0x90DB +0x90DC +0x90DD +0x90DF +0x90E0 +0x90E1 +0x90E2 +0x90E3 +0x90E4 +0x90E5 +0x90E8 +0x90E9 +0x90EA +0x90EB +0x90EC +0x90ED +0x90EF +0x90F0 +0x90F1 +0x90F2 +0x90F3 +0x90F4 +0x90F5 +0x90F9 +0x90FA +0x90FB +0x90FC +0x90FD +0x90FE +0x90FF +0x9100 +0x9101 +0x9102 +0x9103 +0x9104 +0x9105 +0x9106 +0x9107 +0x9108 +0x9109 +0x910B +0x910D +0x910E +0x910F +0x9110 +0x9111 +0x9112 +0x9114 +0x9116 +0x9117 +0x9118 +0x9119 +0x911A +0x911B +0x911C +0x911D +0x911E +0x911F +0x9120 +0x9121 +0x9122 +0x9123 +0x9124 +0x9126 +0x9127 +0x9128 +0x9129 +0x912A +0x912B +0x912C +0x912D +0x912E +0x912F +0x9130 +0x9131 +0x9132 +0x9133 +0x9134 +0x9135 +0x9136 +0x9138 +0x9139 +0x913A +0x913B +0x913E +0x913F +0x9140 +0x9141 +0x9143 +0x9144 +0x9145 +0x9146 +0x9147 +0x9148 +0x9149 +0x914A +0x914B +0x914C +0x914D +0x914E +0x914F +0x9150 +0x9152 +0x9153 +0x9155 +0x9156 +0x9157 +0x9158 +0x915A +0x915F +0x9160 +0x9161 +0x9162 +0x9163 +0x9164 +0x9165 +0x9168 +0x9169 +0x916A +0x916C +0x916E +0x916F +0x9172 +0x9173 +0x9174 +0x9175 +0x9177 +0x9178 +0x9179 +0x917A +0x9180 +0x9181 +0x9182 +0x9183 +0x9184 +0x9185 +0x9186 +0x9187 +0x9189 +0x918A +0x918B +0x918D +0x918F +0x9190 +0x9191 +0x9192 +0x9193 +0x9199 +0x919A +0x919B +0x919C +0x919D +0x919E +0x919F +0x91A0 +0x91A1 +0x91A2 +0x91A3 +0x91A5 +0x91A7 +0x91A8 +0x91AA +0x91AB +0x91AC +0x91AD +0x91AE +0x91AF +0x91B0 +0x91B1 +0x91B2 +0x91B3 +0x91B4 +0x91B5 +0x91B7 +0x91B9 +0x91BA +0x91BC +0x91BD +0x91BE +0x91C0 +0x91C1 +0x91C2 +0x91C3 +0x91C5 +0x91C6 +0x91C7 +0x91C9 +0x91CB +0x91CC +0x91CD +0x91CE +0x91CF +0x91D0 +0x91D1 +0x91D3 +0x91D4 +0x91D5 +0x91D7 +0x91D8 +0x91D9 +0x91DA +0x91DC +0x91DD +0x91E2 +0x91E3 +0x91E4 +0x91E6 +0x91E7 +0x91E8 +0x91E9 +0x91EA +0x91EB +0x91EC +0x91ED +0x91EE +0x91F1 +0x91F3 +0x91F4 +0x91F5 +0x91F7 +0x91F8 +0x91F9 +0x91FD +0x91FF +0x9200 +0x9201 +0x9202 +0x9203 +0x9204 +0x9205 +0x9206 +0x9207 +0x9209 +0x920A +0x920C +0x920D +0x920F +0x9210 +0x9211 +0x9212 +0x9214 +0x9215 +0x9216 +0x9217 +0x9219 +0x921A +0x921C +0x921E +0x9223 +0x9224 +0x9225 +0x9226 +0x9227 +0x922D +0x922E +0x9230 +0x9231 +0x9232 +0x9233 +0x9234 +0x9236 +0x9237 +0x9238 +0x9239 +0x923A +0x923D +0x923E +0x923F +0x9240 +0x9245 +0x9246 +0x9248 +0x9249 +0x924A +0x924B +0x924C +0x924D +0x924E +0x924F +0x9250 +0x9251 +0x9252 +0x9253 +0x9254 +0x9256 +0x9257 +0x925A +0x925B +0x925E +0x9260 +0x9261 +0x9263 +0x9264 +0x9265 +0x9266 +0x9267 +0x926C +0x926D +0x926F +0x9270 +0x9272 +0x9276 +0x9278 +0x9279 +0x927A +0x927B +0x927C +0x927D +0x927E +0x927F +0x9280 +0x9282 +0x9283 +0x9285 +0x9286 +0x9287 +0x9288 +0x928A +0x928B +0x928C +0x928D +0x928E +0x9291 +0x9293 +0x9294 +0x9295 +0x9296 +0x9297 +0x9298 +0x9299 +0x929A +0x929B +0x929C +0x929D +0x92A0 +0x92A1 +0x92A2 +0x92A3 +0x92A4 +0x92A5 +0x92A6 +0x92A7 +0x92A8 +0x92A9 +0x92AA +0x92AB +0x92AC +0x92B2 +0x92B3 +0x92B4 +0x92B5 +0x92B6 +0x92B7 +0x92BB +0x92BC +0x92C0 +0x92C1 +0x92C2 +0x92C3 +0x92C4 +0x92C5 +0x92C6 +0x92C7 +0x92C8 +0x92C9 +0x92CA +0x92CB +0x92CC +0x92CD +0x92CE +0x92CF +0x92D0 +0x92D1 +0x92D2 +0x92D3 +0x92D5 +0x92D7 +0x92D8 +0x92D9 +0x92DD +0x92DE +0x92DF +0x92E0 +0x92E1 +0x92E4 +0x92E6 +0x92E7 +0x92E8 +0x92E9 +0x92EA +0x92EE +0x92EF +0x92F0 +0x92F1 +0x92F7 +0x92F8 +0x92F9 +0x92FA +0x92FB +0x92FC +0x92FE +0x92FF +0x9300 +0x9301 +0x9302 +0x9304 +0x9306 +0x9308 +0x9309 +0x930B +0x930C +0x930D +0x930E +0x930F +0x9310 +0x9312 +0x9313 +0x9314 +0x9315 +0x9316 +0x9318 +0x9319 +0x931A +0x931B +0x931D +0x931E +0x931F +0x9320 +0x9321 +0x9322 +0x9323 +0x9324 +0x9325 +0x9326 +0x9327 +0x9328 +0x9329 +0x932A +0x932B +0x932D +0x932E +0x932F +0x9333 +0x9334 +0x9335 +0x9336 +0x9338 +0x9339 +0x933C +0x9346 +0x9347 +0x9349 +0x934A +0x934B +0x934C +0x934D +0x934E +0x934F +0x9350 +0x9351 +0x9352 +0x9354 +0x9355 +0x9356 +0x9357 +0x9358 +0x9359 +0x935A +0x935B +0x935C +0x935E +0x9360 +0x9361 +0x9363 +0x9364 +0x9365 +0x9367 +0x936A +0x936C +0x936D +0x9370 +0x9371 +0x9375 +0x9376 +0x9377 +0x9379 +0x937A +0x937B +0x937C +0x937E +0x9380 +0x9382 +0x9383 +0x9388 +0x9389 +0x938A +0x938C +0x938D +0x938E +0x938F +0x9391 +0x9392 +0x9394 +0x9395 +0x9396 +0x9397 +0x9398 +0x9399 +0x939A +0x939B +0x939D +0x939E +0x939F +0x93A1 +0x93A2 +0x93A3 +0x93A4 +0x93A5 +0x93A6 +0x93A7 +0x93A8 +0x93A9 +0x93AA +0x93AC +0x93AE +0x93AF +0x93B0 +0x93B1 +0x93B2 +0x93B3 +0x93B4 +0x93B5 +0x93B7 +0x93C0 +0x93C2 +0x93C3 +0x93C4 +0x93C7 +0x93C8 +0x93CA +0x93CC +0x93CD +0x93CE +0x93CF +0x93D0 +0x93D1 +0x93D2 +0x93D4 +0x93D5 +0x93D6 +0x93D7 +0x93D8 +0x93D9 +0x93DA +0x93DC +0x93DD +0x93DE +0x93DF +0x93E1 +0x93E2 +0x93E3 +0x93E4 +0x93E6 +0x93E7 +0x93E8 +0x93EC +0x93EE +0x93F5 +0x93F6 +0x93F7 +0x93F8 +0x93F9 +0x93FA +0x93FB +0x93FC +0x93FD +0x93FE +0x93FF +0x9400 +0x9403 +0x9406 +0x9407 +0x9409 +0x940A +0x940B +0x940C +0x940D +0x940E +0x940F +0x9410 +0x9411 +0x9412 +0x9413 +0x9414 +0x9415 +0x9416 +0x9418 +0x9419 +0x9420 +0x9428 +0x9429 +0x942A +0x942B +0x942C +0x942E +0x9430 +0x9431 +0x9432 +0x9433 +0x9435 +0x9436 +0x9437 +0x9438 +0x9439 +0x943A +0x943B +0x943C +0x943D +0x943F +0x9440 +0x9444 +0x9445 +0x9446 +0x9447 +0x9448 +0x9449 +0x944A +0x944B +0x944C +0x944F +0x9450 +0x9451 +0x9452 +0x9455 +0x9457 +0x945D +0x945E +0x9460 +0x9462 +0x9463 +0x9464 +0x9468 +0x9469 +0x946A +0x946B +0x946D +0x946E +0x946F +0x9470 +0x9471 +0x9472 +0x9473 +0x9474 +0x9475 +0x9476 +0x9477 +0x9478 +0x947C +0x947D +0x947E +0x947F +0x9480 +0x9481 +0x9482 +0x9483 +0x9577 +0x957A +0x957B +0x957C +0x957D +0x9580 +0x9582 +0x9583 +0x9586 +0x9588 +0x9589 +0x958B +0x958C +0x958D +0x958E +0x958F +0x9590 +0x9591 +0x9592 +0x9593 +0x9594 +0x9598 +0x959B +0x959C +0x959E +0x959F +0x95A1 +0x95A3 +0x95A4 +0x95A5 +0x95A8 +0x95A9 +0x95AB +0x95AC +0x95AD +0x95AE +0x95B0 +0x95B1 +0x95B5 +0x95B6 +0x95B7 +0x95B9 +0x95BA +0x95BB +0x95BC +0x95BD +0x95BE +0x95BF +0x95C0 +0x95C3 +0x95C5 +0x95C6 +0x95C7 +0x95C8 +0x95C9 +0x95CA +0x95CB +0x95CC +0x95CD +0x95D0 +0x95D1 +0x95D2 +0x95D3 +0x95D4 +0x95D5 +0x95D6 +0x95DA +0x95DB +0x95DC +0x95DE +0x95DF +0x95E0 +0x95E1 +0x95E2 +0x95E3 +0x95E4 +0x95E5 +0x961C +0x961E +0x9620 +0x9621 +0x9622 +0x9623 +0x9624 +0x9628 +0x962A +0x962C +0x962D +0x962E +0x962F +0x9630 +0x9631 +0x9632 +0x9639 +0x963A +0x963B +0x963C +0x963D +0x963F +0x9640 +0x9642 +0x9643 +0x9644 +0x964A +0x964B +0x964C +0x964D +0x964E +0x964F +0x9650 +0x9651 +0x9653 +0x9654 +0x9658 +0x965B +0x965C +0x965D +0x965E +0x965F +0x9661 +0x9662 +0x9663 +0x9664 +0x966A +0x966B +0x966C +0x966D +0x966F +0x9670 +0x9671 +0x9672 +0x9673 +0x9674 +0x9675 +0x9676 +0x9677 +0x9678 +0x967C +0x967D +0x967E +0x9680 +0x9683 +0x9684 +0x9685 +0x9686 +0x9687 +0x9688 +0x9689 +0x968A +0x968B +0x968D +0x968E +0x9691 +0x9692 +0x9693 +0x9694 +0x9695 +0x9697 +0x9698 +0x9699 +0x969B +0x969C +0x969E +0x96A1 +0x96A2 +0x96A4 +0x96A7 +0x96A8 +0x96A9 +0x96AA +0x96AC +0x96AE +0x96B0 +0x96B1 +0x96B3 +0x96B4 +0x96B8 +0x96B9 +0x96BB +0x96BC +0x96BF +0x96C0 +0x96C1 +0x96C2 +0x96C3 +0x96C4 +0x96C5 +0x96C6 +0x96C7 +0x96C8 +0x96C9 +0x96CA +0x96CB +0x96CC +0x96CD +0x96CE +0x96D2 +0x96D3 +0x96D4 +0x96D5 +0x96D6 +0x96D7 +0x96D8 +0x96D9 +0x96DA +0x96DB +0x96DC +0x96DD +0x96DE +0x96DF +0x96E1 +0x96E2 +0x96E3 +0x96E5 +0x96E8 +0x96E9 +0x96EA +0x96EF +0x96F0 +0x96F1 +0x96F2 +0x96F5 +0x96F6 +0x96F7 +0x96F8 +0x96F9 +0x96FA +0x96FB +0x96FD +0x96FF +0x9700 +0x9702 +0x9704 +0x9705 +0x9706 +0x9707 +0x9708 +0x9709 +0x970B +0x970D +0x970E +0x970F +0x9710 +0x9711 +0x9712 +0x9713 +0x9716 +0x9718 +0x9719 +0x971C +0x971D +0x971E +0x971F +0x9720 +0x9722 +0x9723 +0x9724 +0x9725 +0x9726 +0x9727 +0x9728 +0x9729 +0x972A +0x972B +0x972C +0x972E +0x972F +0x9730 +0x9732 +0x9735 +0x9738 +0x9739 +0x973A +0x973D +0x973E +0x973F +0x9742 +0x9743 +0x9744 +0x9746 +0x9747 +0x9748 +0x9749 +0x974B +0x9752 +0x9756 +0x9758 +0x975A +0x975B +0x975C +0x975E +0x9760 +0x9761 +0x9762 +0x9766 +0x9768 +0x9769 +0x976A +0x976C +0x976E +0x9770 +0x9772 +0x9773 +0x9774 +0x9776 +0x9777 +0x9778 +0x977A +0x977B +0x977C +0x977D +0x977E +0x977F +0x9780 +0x9781 +0x9782 +0x9783 +0x9784 +0x9785 +0x9788 +0x978A +0x978B +0x978D +0x978E +0x978F +0x9794 +0x9797 +0x9798 +0x9799 +0x979A +0x979C +0x979D +0x979E +0x97A0 +0x97A1 +0x97A2 +0x97A3 +0x97A4 +0x97A5 +0x97A6 +0x97A8 +0x97AA +0x97AB +0x97AC +0x97AD +0x97AE +0x97B3 +0x97B6 +0x97B7 +0x97B9 +0x97BB +0x97BF +0x97C1 +0x97C3 +0x97C4 +0x97C5 +0x97C6 +0x97C7 +0x97C9 +0x97CB +0x97CC +0x97CD +0x97CE +0x97CF +0x97D0 +0x97D3 +0x97D4 +0x97D5 +0x97D6 +0x97D7 +0x97D8 +0x97D9 +0x97DC +0x97DD +0x97DE +0x97DF +0x97E1 +0x97E3 +0x97E5 +0x97ED +0x97F0 +0x97F1 +0x97F3 +0x97F6 +0x97F8 +0x97F9 +0x97FA +0x97FB +0x97FD +0x97FE +0x97FF +0x9800 +0x9801 +0x9802 +0x9803 +0x9804 +0x9805 +0x9806 +0x9807 +0x9808 +0x980A +0x980C +0x980D +0x980E +0x980F +0x9810 +0x9811 +0x9812 +0x9813 +0x9816 +0x9817 +0x9818 +0x981B +0x981C +0x981D +0x981E +0x9820 +0x9821 +0x9824 +0x9826 +0x9827 +0x9828 +0x9829 +0x982B +0x982D +0x982F +0x9830 +0x9832 +0x9835 +0x9837 +0x9838 +0x9839 +0x983B +0x9841 +0x9843 +0x9844 +0x9845 +0x9846 +0x9848 +0x9849 +0x984A +0x984C +0x984D +0x984E +0x984F +0x9850 +0x9851 +0x9852 +0x9853 +0x9857 +0x9858 +0x9859 +0x985B +0x985C +0x985D +0x985E +0x985F +0x9860 +0x9862 +0x9863 +0x9864 +0x9865 +0x9867 +0x9869 +0x986A +0x986B +0x986F +0x9870 +0x9871 +0x9872 +0x9873 +0x9874 +0x98A8 +0x98A9 +0x98AC +0x98AD +0x98AE +0x98AF +0x98B1 +0x98B2 +0x98B3 +0x98B6 +0x98B8 +0x98BA +0x98BB +0x98BC +0x98BD +0x98BE +0x98BF +0x98C0 +0x98C1 +0x98C2 +0x98C4 +0x98C6 +0x98C9 +0x98CB +0x98CC +0x98DB +0x98DF +0x98E2 +0x98E3 +0x98E5 +0x98E7 +0x98E9 +0x98EA +0x98EB +0x98ED +0x98EF +0x98F2 +0x98F4 +0x98F6 +0x98F9 +0x98FA +0x98FC +0x98FD +0x98FE +0x9900 +0x9902 +0x9903 +0x9905 +0x9907 +0x9908 +0x9909 +0x990A +0x990C +0x9910 +0x9911 +0x9912 +0x9913 +0x9914 +0x9915 +0x9916 +0x9917 +0x9918 +0x991A +0x991B +0x991E +0x991F +0x9921 +0x9924 +0x9925 +0x9927 +0x9928 +0x9929 +0x992A +0x992B +0x992C +0x992D +0x992E +0x992F +0x9930 +0x9931 +0x9932 +0x9933 +0x9935 +0x993A +0x993C +0x993D +0x993E +0x993F +0x9941 +0x9943 +0x9945 +0x9947 +0x9948 +0x9949 +0x994B +0x994C +0x994E +0x9950 +0x9951 +0x9952 +0x9953 +0x9954 +0x9955 +0x9956 +0x9957 +0x9958 +0x9959 +0x995B +0x995C +0x995E +0x995F +0x9961 +0x9996 +0x9997 +0x9998 +0x9999 +0x999C +0x999D +0x999E +0x99A1 +0x99A3 +0x99A5 +0x99A6 +0x99A7 +0x99A8 +0x99AB +0x99AC +0x99AD +0x99AE +0x99AF +0x99B0 +0x99B1 +0x99B2 +0x99B3 +0x99B4 +0x99B5 +0x99B9 +0x99BA +0x99BB +0x99BD +0x99C1 +0x99C2 +0x99C3 +0x99C7 +0x99C9 +0x99CB +0x99CC +0x99CD +0x99CE +0x99CF +0x99D0 +0x99D1 +0x99D2 +0x99D3 +0x99D4 +0x99D5 +0x99D6 +0x99D7 +0x99D8 +0x99D9 +0x99DB +0x99DC +0x99DD +0x99DF +0x99E2 +0x99E3 +0x99E4 +0x99E5 +0x99E7 +0x99E9 +0x99EA +0x99EC +0x99ED +0x99EE +0x99F0 +0x99F1 +0x99F4 +0x99F6 +0x99F7 +0x99F8 +0x99F9 +0x99FA +0x99FB +0x99FC +0x99FD +0x99FE +0x99FF +0x9A01 +0x9A02 +0x9A03 +0x9A04 +0x9A05 +0x9A06 +0x9A07 +0x9A09 +0x9A0A +0x9A0B +0x9A0D +0x9A0E +0x9A0F +0x9A11 +0x9A14 +0x9A15 +0x9A16 +0x9A19 +0x9A1A +0x9A1B +0x9A1C +0x9A1D +0x9A1E +0x9A20 +0x9A22 +0x9A23 +0x9A24 +0x9A25 +0x9A27 +0x9A29 +0x9A2A +0x9A2B +0x9A2C +0x9A2D +0x9A2E +0x9A30 +0x9A31 +0x9A32 +0x9A34 +0x9A35 +0x9A36 +0x9A37 +0x9A38 +0x9A39 +0x9A3A +0x9A3D +0x9A3E +0x9A3F +0x9A40 +0x9A41 +0x9A42 +0x9A43 +0x9A44 +0x9A45 +0x9A46 +0x9A48 +0x9A49 +0x9A4A +0x9A4C +0x9A4D +0x9A4E +0x9A4F +0x9A50 +0x9A52 +0x9A53 +0x9A54 +0x9A55 +0x9A56 +0x9A57 +0x9A59 +0x9A5A +0x9A5B +0x9A5E +0x9A5F +0x9A60 +0x9A62 +0x9A64 +0x9A65 +0x9A66 +0x9A67 +0x9A68 +0x9A69 +0x9A6A +0x9A6B +0x9AA8 +0x9AAB +0x9AAD +0x9AAF +0x9AB0 +0x9AB1 +0x9AB3 +0x9AB4 +0x9AB7 +0x9AB8 +0x9AB9 +0x9ABB +0x9ABC +0x9ABE +0x9ABF +0x9AC0 +0x9AC1 +0x9AC2 +0x9AC6 +0x9AC7 +0x9ACA +0x9ACD +0x9ACF +0x9AD0 +0x9AD1 +0x9AD2 +0x9AD3 +0x9AD4 +0x9AD5 +0x9AD6 +0x9AD8 +0x9ADC +0x9ADF +0x9AE1 +0x9AE3 +0x9AE6 +0x9AE7 +0x9AEB +0x9AEC +0x9AED +0x9AEE +0x9AEF +0x9AF1 +0x9AF2 +0x9AF3 +0x9AF6 +0x9AF7 +0x9AF9 +0x9AFA +0x9AFB +0x9AFC +0x9AFD +0x9AFE +0x9B01 +0x9B03 +0x9B04 +0x9B05 +0x9B06 +0x9B08 +0x9B0A +0x9B0B +0x9B0C +0x9B0D +0x9B0E +0x9B10 +0x9B11 +0x9B12 +0x9B15 +0x9B16 +0x9B17 +0x9B18 +0x9B19 +0x9B1A +0x9B1E +0x9B1F +0x9B20 +0x9B22 +0x9B23 +0x9B24 +0x9B25 +0x9B27 +0x9B28 +0x9B29 +0x9B2B +0x9B2E +0x9B2F +0x9B31 +0x9B32 +0x9B33 +0x9B35 +0x9B37 +0x9B3A +0x9B3B +0x9B3C +0x9B3E +0x9B3F +0x9B41 +0x9B42 +0x9B43 +0x9B44 +0x9B45 +0x9B46 +0x9B48 +0x9B4A +0x9B4B +0x9B4C +0x9B4D +0x9B4E +0x9B4F +0x9B51 +0x9B52 +0x9B54 +0x9B55 +0x9B56 +0x9B58 +0x9B59 +0x9B5A +0x9B5B +0x9B5F +0x9B60 +0x9B61 +0x9B64 +0x9B66 +0x9B67 +0x9B68 +0x9B6C +0x9B6F +0x9B70 +0x9B71 +0x9B74 +0x9B75 +0x9B76 +0x9B77 +0x9B7A +0x9B7B +0x9B7C +0x9B7D +0x9B7E +0x9B80 +0x9B82 +0x9B85 +0x9B86 +0x9B87 +0x9B88 +0x9B90 +0x9B91 +0x9B92 +0x9B93 +0x9B95 +0x9B9A +0x9B9B +0x9B9E +0x9BA0 +0x9BA1 +0x9BA2 +0x9BA4 +0x9BA5 +0x9BA6 +0x9BA8 +0x9BAA +0x9BAB +0x9BAD +0x9BAE +0x9BAF +0x9BB5 +0x9BB6 +0x9BB8 +0x9BB9 +0x9BBD +0x9BBF +0x9BC0 +0x9BC1 +0x9BC3 +0x9BC4 +0x9BC6 +0x9BC7 +0x9BC8 +0x9BC9 +0x9BCA +0x9BD3 +0x9BD4 +0x9BD5 +0x9BD6 +0x9BD7 +0x9BD9 +0x9BDA +0x9BDB +0x9BDC +0x9BDE +0x9BE0 +0x9BE1 +0x9BE2 +0x9BE4 +0x9BE5 +0x9BE6 +0x9BE7 +0x9BE8 +0x9BEA +0x9BEB +0x9BEC +0x9BF0 +0x9BF7 +0x9BF8 +0x9BFD +0x9C05 +0x9C06 +0x9C07 +0x9C08 +0x9C09 +0x9C0B +0x9C0D +0x9C0E +0x9C12 +0x9C13 +0x9C14 +0x9C17 +0x9C1C +0x9C1D +0x9C21 +0x9C23 +0x9C24 +0x9C25 +0x9C28 +0x9C29 +0x9C2B +0x9C2C +0x9C2D +0x9C31 +0x9C32 +0x9C33 +0x9C34 +0x9C36 +0x9C37 +0x9C39 +0x9C3B +0x9C3C +0x9C3D +0x9C3E +0x9C3F +0x9C40 +0x9C41 +0x9C44 +0x9C46 +0x9C48 +0x9C49 +0x9C4A +0x9C4B +0x9C4C +0x9C4D +0x9C4E +0x9C50 +0x9C52 +0x9C54 +0x9C55 +0x9C56 +0x9C57 +0x9C58 +0x9C59 +0x9C5E +0x9C5F +0x9C60 +0x9C62 +0x9C63 +0x9C66 +0x9C67 +0x9C68 +0x9C6D +0x9C6E +0x9C71 +0x9C73 +0x9C74 +0x9C75 +0x9C77 +0x9C78 +0x9C79 +0x9C7A +0x9CE5 +0x9CE6 +0x9CE7 +0x9CE9 +0x9CEA +0x9CED +0x9CF1 +0x9CF2 +0x9CF3 +0x9CF4 +0x9CF5 +0x9CF6 +0x9CF7 +0x9CF9 +0x9CFA +0x9CFB +0x9CFC +0x9CFD +0x9CFF +0x9D00 +0x9D03 +0x9D04 +0x9D05 +0x9D06 +0x9D07 +0x9D08 +0x9D09 +0x9D10 +0x9D12 +0x9D14 +0x9D15 +0x9D17 +0x9D18 +0x9D19 +0x9D1B +0x9D1D +0x9D1E +0x9D1F +0x9D20 +0x9D22 +0x9D23 +0x9D25 +0x9D26 +0x9D28 +0x9D29 +0x9D2D +0x9D2E +0x9D2F +0x9D30 +0x9D31 +0x9D33 +0x9D36 +0x9D37 +0x9D38 +0x9D3B +0x9D3D +0x9D3E +0x9D3F +0x9D40 +0x9D41 +0x9D42 +0x9D43 +0x9D45 +0x9D4A +0x9D4B +0x9D4C +0x9D4F +0x9D51 +0x9D52 +0x9D53 +0x9D54 +0x9D56 +0x9D57 +0x9D58 +0x9D59 +0x9D5A +0x9D5B +0x9D5C +0x9D5D +0x9D5F +0x9D60 +0x9D61 +0x9D67 +0x9D68 +0x9D69 +0x9D6A +0x9D6B +0x9D6C +0x9D6F +0x9D70 +0x9D71 +0x9D72 +0x9D73 +0x9D74 +0x9D75 +0x9D77 +0x9D78 +0x9D79 +0x9D7B +0x9D7D +0x9D7F +0x9D80 +0x9D81 +0x9D82 +0x9D84 +0x9D85 +0x9D86 +0x9D87 +0x9D88 +0x9D89 +0x9D8A +0x9D8B +0x9D8C +0x9D90 +0x9D92 +0x9D94 +0x9D96 +0x9D97 +0x9D98 +0x9D99 +0x9D9A +0x9D9B +0x9D9C +0x9D9D +0x9D9E +0x9D9F +0x9DA0 +0x9DA1 +0x9DA2 +0x9DA3 +0x9DA4 +0x9DA6 +0x9DA7 +0x9DA8 +0x9DA9 +0x9DAA +0x9DAC +0x9DAD +0x9DAF +0x9DB1 +0x9DB2 +0x9DB3 +0x9DB4 +0x9DB5 +0x9DB6 +0x9DB7 +0x9DB8 +0x9DB9 +0x9DBA +0x9DBB +0x9DBC +0x9DBE +0x9DBF +0x9DC1 +0x9DC2 +0x9DC3 +0x9DC5 +0x9DC7 +0x9DC8 +0x9DCA +0x9DCB +0x9DCC +0x9DCD +0x9DCE +0x9DCF +0x9DD0 +0x9DD1 +0x9DD2 +0x9DD3 +0x9DD5 +0x9DD6 +0x9DD7 +0x9DD8 +0x9DD9 +0x9DDA +0x9DDB +0x9DDC +0x9DDD +0x9DDE +0x9DDF +0x9DE1 +0x9DE2 +0x9DE3 +0x9DE4 +0x9DE5 +0x9DE6 +0x9DE8 +0x9DE9 +0x9DEB +0x9DEC +0x9DED +0x9DEE +0x9DEF +0x9DF0 +0x9DF2 +0x9DF3 +0x9DF4 +0x9DF5 +0x9DF6 +0x9DF7 +0x9DF8 +0x9DF9 +0x9DFA +0x9DFB +0x9DFD +0x9DFE +0x9DFF +0x9E00 +0x9E01 +0x9E02 +0x9E03 +0x9E04 +0x9E05 +0x9E06 +0x9E07 +0x9E09 +0x9E0B +0x9E0D +0x9E0F +0x9E10 +0x9E11 +0x9E12 +0x9E13 +0x9E14 +0x9E15 +0x9E17 +0x9E19 +0x9E1A +0x9E1B +0x9E1D +0x9E1E +0x9E75 +0x9E79 +0x9E7A +0x9E7C +0x9E7D +0x9E7F +0x9E80 +0x9E82 +0x9E83 +0x9E86 +0x9E87 +0x9E88 +0x9E89 +0x9E8A +0x9E8B +0x9E8C +0x9E8D +0x9E8E +0x9E91 +0x9E92 +0x9E93 +0x9E94 +0x9E97 +0x9E99 +0x9E9A +0x9E9B +0x9E9C +0x9E9D +0x9E9F +0x9EA0 +0x9EA1 +0x9EA4 +0x9EA5 +0x9EA7 +0x9EA9 +0x9EAD +0x9EAE +0x9EB0 +0x9EB4 +0x9EB5 +0x9EB6 +0x9EB7 +0x9EBB +0x9EBC +0x9EBE +0x9EC0 +0x9EC2 +0x9EC3 +0x9EC8 +0x9ECC +0x9ECD +0x9ECE +0x9ECF +0x9ED0 +0x9ED1 +0x9ED3 +0x9ED4 +0x9ED5 +0x9ED6 +0x9ED8 +0x9EDA +0x9EDB +0x9EDC +0x9EDD +0x9EDE +0x9EDF +0x9EE0 +0x9EE4 +0x9EE5 +0x9EE6 +0x9EE7 +0x9EE8 +0x9EEB +0x9EED +0x9EEE +0x9EEF +0x9EF0 +0x9EF2 +0x9EF3 +0x9EF4 +0x9EF5 +0x9EF6 +0x9EF7 +0x9EF9 +0x9EFA +0x9EFB +0x9EFC +0x9EFD +0x9EFF +0x9F00 +0x9F01 +0x9F06 +0x9F07 +0x9F09 +0x9F0A +0x9F0E +0x9F0F +0x9F10 +0x9F12 +0x9F13 +0x9F15 +0x9F16 +0x9F18 +0x9F19 +0x9F1A +0x9F1B +0x9F1C +0x9F1E +0x9F20 +0x9F22 +0x9F23 +0x9F24 +0x9F25 +0x9F28 +0x9F29 +0x9F2A +0x9F2B +0x9F2C +0x9F2D +0x9F2E +0x9F2F +0x9F30 +0x9F31 +0x9F32 +0x9F33 +0x9F34 +0x9F35 +0x9F36 +0x9F37 +0x9F38 +0x9F3B +0x9F3D +0x9F3E +0x9F40 +0x9F41 +0x9F42 +0x9F43 +0x9F46 +0x9F47 +0x9F48 +0x9F49 +0x9F4A +0x9F4B +0x9F4C +0x9F4D +0x9F4E +0x9F4F +0x9F52 +0x9F54 +0x9F55 +0x9F56 +0x9F57 +0x9F58 +0x9F59 +0x9F5B +0x9F5C +0x9F5D +0x9F5E +0x9F5F +0x9F60 +0x9F61 +0x9F63 +0x9F64 +0x9F65 +0x9F66 +0x9F67 +0x9F6A +0x9F6B +0x9F6C +0x9F6E +0x9F6F +0x9F70 +0x9F71 +0x9F72 +0x9F74 +0x9F75 +0x9F76 +0x9F77 +0x9F78 +0x9F79 +0x9F7A +0x9F7B +0x9F7E +0x9F8D +0x9F90 +0x9F91 +0x9F92 +0x9F94 +0x9F95 +0x9F98 +0x9F9C +0x9FA0 +0x9FA2 +0x9FA4 +0xFA0C +0xFA0D Index: xc/lib/fontconfig/fc-lang/zu.orth diff -u /dev/null xc/lib/fontconfig/fc-lang/zu.orth:1.1 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fc-lang/zu.orth Wed Aug 7 20:10:51 2002 @@ -0,0 +1,29 @@ +# +# $XFree86: xc/lib/fontconfig/fc-lang/zu.orth,v 1.1 2002/08/08 00:10:51 keithp Exp $ +# +# Copyright © 2002 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. +# +# Zulu (zu) +# +# Orthography taken from http://www.ideography.co.uk/library/pdf/charsets.pdf +# +0041-005a +0061-007a Index: xc/lib/fontconfig/fc-list/Imakefile diff -u /dev/null xc/lib/fontconfig/fc-list/Imakefile:1.6 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fc-list/Imakefile Mon Aug 19 15:32:04 2002 @@ -0,0 +1,17 @@ +XCOMM $XFree86: xc/lib/fontconfig/fc-list/Imakefile,v 1.6 2002/08/19 19:32:04 keithp Exp $ + +#ifdef UseInstalled +/* building outside the tree, use private defines */ +#include "../local.def" +#endif + +INCLUDES=$(FREETYPE2INCLUDES) -I.. + +LOCAL_LIBRARIES=FontconfigClientLibs + DEPLIBS=FontconfigClientDepLibs + +SRCS=fc-list.c +OBJS=fc-list.o + +ComplexProgramTarget(fc-list) +LinkBuildBinary(ProgramTargetName(fc-list)) Index: xc/lib/fontconfig/fc-list/Makefile.in diff -u /dev/null xc/lib/fontconfig/fc-list/Makefile.in:1.4 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fc-list/Makefile.in Thu Aug 1 11:57:26 2002 @@ -0,0 +1,54 @@ +# +# $XFree86: xc/lib/fontconfig/fc-list/Makefile.in,v 1.4 2002/08/01 15:57:26 keithp Exp $ +# +# Copyright © 2002 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. +# + +TOPDIR=.. + +include $(TOPDIR)/config/Makedefs + +SRCS=fc-list.c + +OBJS=fc-list.o + +PROG=fc-list + +all:: $(PROG) + +$(PROG): $(OBJS) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG) + +$(OBJS): $(HEADERS) + +install:: $(DESTDIR)$(BINDIR) + +$(DESTDIR)$(BINDIR): + mkdir -p $@ + +install:: $(DESTDIR)$(BINDIR)/$(PROG) + +$(DESTDIR)$(BINDIR)/$(PROG): $(PROG) + $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(BINDIR)/$< + +clean:: + rm -f $(PROG) $(OBJS) + Index: xc/lib/fontconfig/fc-list/fc-list.c diff -u /dev/null xc/lib/fontconfig/fc-list/fc-list.c:1.6 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fc-list/fc-list.c Wed Jul 3 19:15:32 2002 @@ -0,0 +1,150 @@ +/* + * $XFree86: xc/lib/fontconfig/fc-list/fc-list.c,v 1.6 2002/07/03 23:15:32 keithp Exp $ + * + * Copyright © 2002 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 <fontconfig/fontconfig.h> +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> +#ifdef HAVE_CONFIG_H +#include <config.h> +#else +#ifdef linux +#define HAVE_GETOPT_LONG 1 +#endif +#define HAVE_GETOPT 1 +#endif + +#ifndef HAVE_GETOPT +#define HAVE_GETOPT 0 +#endif +#ifndef HAVE_GETOPT_LONG +#define HAVE_GETOPT_LONG 0 +#endif + +#if HAVE_GETOPT_LONG +#undef _GNU_SOURCE +#define _GNU_SOURCE +#include <getopt.h> +const struct option longopts[] = { + {"version", 0, 0, 'V'}, + {"verbose", 0, 0, 'v'}, + {"help", 0, 0, '?'}, + {NULL,0,0,0}, +}; +#else +#if HAVE_GETOPT +extern char *optarg; +extern int optind, opterr, optopt; +#endif +#endif + +static void usage (char *program) +{ + fprintf (stderr, "usage: %s [-vV?] [--verbose] [--version] [--help] [pattern] {element ...} \n", + program); + fprintf (stderr, "List fonts matching [pattern]\n"); + fprintf (stderr, "\n"); + fprintf (stderr, " -v, --verbose display status information while busy\n"); + fprintf (stderr, " -V, --version display font config version and exit\n"); + fprintf (stderr, " -?, --help display this help and exit\n"); + exit (1); +} + +int +main (int argc, char **argv) +{ + int verbose = 0; + int i; + FcObjectSet *os = 0; + FcFontSet *fs; + FcPattern *pat; +#if HAVE_GETOPT_LONG || HAVE_GETOPT + int c; + +#if HAVE_GETOPT_LONG + while ((c = getopt_long (argc, argv, "Vv?", longopts, NULL)) != -1) +#else + while ((c = getopt (argc, argv, "Vv?")) != -1) +#endif + { + switch (c) { + case 'V': + fprintf (stderr, "fontconfig version %d.%d.%d\n", + FC_MAJOR, FC_MINOR, FC_REVISION); + exit (0); + case 'v': + verbose = 1; + break; + default: + usage (argv[0]); + } + } + i = optind; +#else + i = 1; +#endif + + if (!FcInit ()) + { + fprintf (stderr, "Can't init font config library\n"); + return 1; + } + if (argv[i]) + { + pat = FcNameParse ((FcChar8 *) argv[i]); + while (argv[++i]) + { + if (!os) + os = FcObjectSetCreate (); + FcObjectSetAdd (os, argv[i]); + } + } + else + pat = FcPatternCreate (); + + if (!os) + os = FcObjectSetBuild (FC_FAMILY, FC_STYLE, 0); + fs = FcFontList (0, pat, os); + if (pat) + FcPatternDestroy (pat); + + if (fs) + { + int j; + + for (j = 0; j < fs->nfont; j++) + { + FcChar8 *font; + FcChar8 *file; + + font = FcNameUnparse (fs->fonts[j]); + if (FcPatternGetString (fs->fonts[j], FC_FILE, 0, &file) == FcResultMatch) + printf ("%s: ", file); + printf ("%s\n", font); + free (font); + } + FcFontSetDestroy (fs); + } + return 0; +} Index: xc/lib/fontconfig/fc-list/fc-list.man diff -u /dev/null xc/lib/fontconfig/fc-list/fc-list.man:1.1.1.1 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fc-list/fc-list.man Thu Feb 14 18:34:13 2002 @@ -0,0 +1,36 @@ +.\" +.\" Copyright © 2002 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. +.\" +.\" +.\" $XFree86: xc/lib/fontconfig/fc-list/fc-list.man,v 1.1.1.1 2002/02/14 23:34:13 keithp Exp $ +.\" +.TH FC-LIST 1 __vendorversion__ +.SH NAME +fc-list \- list available fonts +.SH SYNOPSIS +.B "fc-list" +.RI [ font-pattern ] +.SH DESCRIPTION +If font pattern is not given, +.I fc-list +lists all available faces and styles in the current font configuration. +.SH "SEE ALSO" +fontconfig(3) Index: xc/lib/fontconfig/fontconfig/Imakefile diff -u /dev/null xc/lib/fontconfig/fontconfig/Imakefile:1.2 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fontconfig/Imakefile Tue Feb 19 20:01:21 2002 @@ -0,0 +1,8 @@ +#define IncSubdir fontconfig + +HEADERS=fcfreetype.h fcprivate.h fontconfig.h + +BuildIncludes($(HEADERS),IncSubdir,..) +#if BuildLibraries +InstallMultipleFlags($(HEADERS),$(INCDIR)/IncSubdir,$(INSTINCFLAGS)) +#endif Index: xc/lib/fontconfig/fontconfig/Makefile.in diff -u /dev/null xc/lib/fontconfig/fontconfig/Makefile.in:1.4 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fontconfig/Makefile.in Sat Aug 31 18:17:31 2002 @@ -0,0 +1,39 @@ +# +# $XFree86: xc/lib/fontconfig/fontconfig/Makefile.in,v 1.4 2002/08/31 22:17:31 keithp Exp $ +# +# Copyright © 2002 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. +# + +TOPDIR=.. + +include $(TOPDIR)/config/Makedefs + +all:: + +install:: $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_DATA) fcfreetype.h $(DESTDIR)$(INCLUDEDIR)/fcfreetype.h + $(INSTALL_DATA) fcprivate.h $(DESTDIR)$(INCLUDEDIR)/fcprivate.h + $(INSTALL_DATA) fontconfig.h $(DESTDIR)$(INCLUDEDIR)/fontconfig.h + +$(DESTDIR)$(INCLUDEDIR): + mkdir -p $@ + +clean:: Index: xc/lib/fontconfig/fontconfig/fcfreetype.h diff -u /dev/null xc/lib/fontconfig/fontconfig/fcfreetype.h:1.4 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fontconfig/fcfreetype.h Fri Oct 11 13:53:03 2002 @@ -0,0 +1,41 @@ +/* + * $XFree86: xc/lib/fontconfig/fontconfig/fcfreetype.h,v 1.4 2002/10/11 17:53:03 keithp Exp $ + * + * Copyright © 2001 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. + */ + +#ifndef _FCFREETYPE_H_ +#define _FCFREETYPE_H_ +#include <freetype/freetype.h> + +FT_UInt +FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4); + +FcCharSet * +FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks); + +FcResult +FcPatternGetFTFace (const FcPattern *p, const char *object, int n, FT_Face *f); + +FcBool +FcPatternAddFTFace (FcPattern *p, const char *object, const FT_Face f); + +#endif Index: xc/lib/fontconfig/fontconfig/fcprivate.h diff -u /dev/null xc/lib/fontconfig/fontconfig/fcprivate.h:1.7 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fontconfig/fcprivate.h Wed Dec 4 05:28:03 2002 @@ -0,0 +1,123 @@ +/* + * $XFree86: xc/lib/fontconfig/fontconfig/fcprivate.h,v 1.7 2002/12/04 10:28:03 eich Exp $ + * + * Copyright © 2001 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. + */ + +#ifndef _FCPRIVATE_H_ +#define _FCPRIVATE_H_ + +/* + * I tried this with functions that took va_list* arguments + * but portability concerns made me change these functions + * into macros (sigh). + */ + +#define FcPatternVapBuild(result, orig, va) \ +{ \ + FcPattern *__p__ = (orig); \ + const char *__o__; \ + FcValue __v__; \ + \ + if (!__p__) \ + { \ + __p__ = FcPatternCreate (); \ + if (!__p__) \ + goto _FcPatternVapBuild_bail0; \ + } \ + for (;;) \ + { \ + __o__ = va_arg (va, const char *); \ + if (!__o__) \ + break; \ + __v__.type = va_arg (va, FcType); \ + switch (__v__.type) { \ + case FcTypeVoid: \ + goto _FcPatternVapBuild_bail1; \ + case FcTypeInteger: \ + __v__.u.i = va_arg (va, int); \ + break; \ + case FcTypeDouble: \ + __v__.u.d = va_arg (va, double); \ + break; \ + case FcTypeString: \ + __v__.u.s = va_arg (va, FcChar8 *); \ + break; \ + case FcTypeBool: \ + __v__.u.b = va_arg (va, FcBool); \ + break; \ + case FcTypeMatrix: \ + __v__.u.m = va_arg (va, FcMatrix *); \ + break; \ + case FcTypeCharSet: \ + __v__.u.c = va_arg (va, FcCharSet *); \ + break; \ + case FcTypeFTFace: \ + __v__.u.f = va_arg (va, FT_Face); \ + break; \ + case FcTypeLangSet: \ + __v__.u.l = va_arg (va, FcLangSet *); \ + break; \ + } \ + if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \ + goto _FcPatternVapBuild_bail1; \ + } \ + result = __p__; \ + goto _FcPatternVapBuild_return; \ + \ +_FcPatternVapBuild_bail1: \ + if (!orig) \ + FcPatternDestroy (__p__); \ +_FcPatternVapBuild_bail0: \ + result = (void*)0; \ + \ +_FcPatternVapBuild_return: \ + ; \ +} + + +#define FcObjectSetVapBuild(__ret__, __first__, __va__) \ +{ \ + FcObjectSet *__os__; \ + const char *__ob__; \ + \ + __ret__ = 0; \ + __os__ = FcObjectSetCreate (); \ + if (!__os__) \ + goto _FcObjectSetVapBuild_bail0; \ + __ob__ = __first__; \ + while (__ob__) \ + { \ + if (!FcObjectSetAdd (__os__, __ob__)) \ + goto _FcObjectSetVapBuild_bail1; \ + __ob__ = va_arg (__va__, const char *); \ + } \ + __ret__ = __os__; \ + \ +_FcObjectSetVapBuild_bail1: \ + if (!__ret__ && __os__) \ + FcObjectSetDestroy (__os__); \ +_FcObjectSetVapBuild_bail0: \ + ; \ +} + +#endif /* _FCPRIVATE_H_ */ + Index: xc/lib/fontconfig/fontconfig/fontconfig.h diff -u /dev/null xc/lib/fontconfig/fontconfig/fontconfig.h:1.32 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/fontconfig/fontconfig.h Fri Oct 11 13:53:03 2002 @@ -0,0 +1,777 @@ +/* + * $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.32 2002/10/11 17:53:03 keithp Exp $ + * + * Copyright © 2001 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. + */ + +#ifndef _FONTCONFIG_H_ +#define _FONTCONFIG_H_ + +#include <stdarg.h> + +typedef unsigned char FcChar8; +typedef unsigned short FcChar16; +typedef unsigned int FcChar32; +typedef int FcBool; + +/* + * Current Fontconfig version number + */ +#define FC_MAJOR 1 +#define FC_MINOR 0 +#define FC_REVISION 2 + +#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION)) + +/* + * Current font cache file format version + * This is appended to the cache files so that multiple + * versions of the library will peacefully coexist + * + * Change this value whenever the disk format for the cache file + * changes in any non-compatible way. Try to avoid such changes as + * it means multiple copies of the font information. + */ + +#define FC_CACHE_VERSION "1" + +#define FcTrue 1 +#define FcFalse 0 + +#define FC_FAMILY "family" /* String */ +#define FC_STYLE "style" /* String */ +#define FC_SLANT "slant" /* Int */ +#define FC_WEIGHT "weight" /* Int */ +#define FC_SIZE "size" /* Double */ +#define FC_ASPECT "aspect" /* Double */ +#define FC_PIXEL_SIZE "pixelsize" /* Double */ +#define FC_SPACING "spacing" /* Int */ +#define FC_FOUNDRY "foundry" /* String */ +#define FC_ANTIALIAS "antialias" /* Bool (depends) */ +#define FC_HINTING "hinting" /* Bool (true) */ +#define FC_VERTICAL_LAYOUT "verticallayout" /* Bool (false) */ +#define FC_AUTOHINT "autohint" /* Bool (false) */ +#define FC_GLOBAL_ADVANCE "globaladvance" /* Bool (true) */ +#define FC_FILE "file" /* String */ +#define FC_INDEX "index" /* Int */ +#define FC_FT_FACE "ftface" /* FT_Face */ +#define FC_RASTERIZER "rasterizer" /* String */ +#define FC_OUTLINE "outline" /* Bool */ +#define FC_SCALABLE "scalable" /* Bool */ +#define FC_SCALE "scale" /* double */ +#define FC_DPI "dpi" /* double */ +#define FC_RGBA "rgba" /* Int */ +#define FC_MINSPACE "minspace" /* Bool use minimum line spacing */ +#define FC_SOURCE "source" /* String (X11, freetype) */ +#define FC_CHARSET "charset" /* CharSet */ +#define FC_LANG "lang" /* String RFC 3066 langs */ +#define FC_FONTVERSION "fontversion" /* Int from 'head' table */ + +#define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION +#define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION + +/* Adjust outline rasterizer */ +#define FC_CHAR_WIDTH "charwidth" /* Int */ +#define FC_CHAR_HEIGHT "charheight"/* Int */ +#define FC_MATRIX "matrix" /* FcMatrix */ + +#define FC_WEIGHT_LIGHT 0 +#define FC_WEIGHT_MEDIUM 100 +#define FC_WEIGHT_DEMIBOLD 180 +#define FC_WEIGHT_BOLD 200 +#define FC_WEIGHT_BLACK 210 + +#define FC_SLANT_ROMAN 0 +#define FC_SLANT_ITALIC 100 +#define FC_SLANT_OBLIQUE 110 + +#define FC_PROPORTIONAL 0 +#define FC_MONO 100 +#define FC_CHARCELL 110 + +/* sub-pixel order */ +#define FC_RGBA_UNKNOWN 0 +#define FC_RGBA_RGB 1 +#define FC_RGBA_BGR 2 +#define FC_RGBA_VRGB 3 +#define FC_RGBA_VBGR 4 +#define FC_RGBA_NONE 5 + +typedef enum _FcType { + FcTypeVoid, + FcTypeInteger, + FcTypeDouble, + FcTypeString, + FcTypeBool, + FcTypeMatrix, + FcTypeCharSet, + FcTypeFTFace, + FcTypeLangSet +} FcType; + +typedef struct _FcMatrix { + double xx, xy, yx, yy; +} FcMatrix; + +#define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, \ + (m)->xy = (m)->yx = 0) + +/* + * A data structure to represent the available glyphs in a font. + * This is represented as a sparse boolean btree. + */ + +typedef struct _FcCharSet FcCharSet; + +typedef struct _FcObjectType { + const char *object; + FcType type; +} FcObjectType; + +typedef struct _FcConstant { + const FcChar8 *name; + const char *object; + int value; +} FcConstant; + +typedef enum _FcResult { + FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId +} FcResult; + +typedef struct _FcPattern FcPattern; + +typedef struct _FcLangSet FcLangSet; + +typedef struct _FcValue { + FcType type; + union { + const FcChar8 *s; + int i; + FcBool b; + double d; + const FcMatrix *m; + const FcCharSet *c; + void *f; + const FcPattern *p; + const FcLangSet *l; + } u; +} FcValue; + +typedef struct _FcFontSet { + int nfont; + int sfont; + FcPattern **fonts; +} FcFontSet; + +typedef struct _FcObjectSet { + int nobject; + int sobject; + const char **objects; +} FcObjectSet; + +typedef enum _FcMatchKind { + FcMatchPattern, FcMatchFont +} FcMatchKind; + +typedef enum _FcLangResult { + FcLangEqual, FcLangDifferentCountry, FcLangDifferentLang +} FcLangResult; + +typedef enum _FcSetName { + FcSetSystem = 0, + FcSetApplication = 1 +} FcSetName; + +typedef struct _FcAtomic FcAtomic; + +#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ +#define _FCFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ +#define _FCFUNCPROTOEND } +#else +#define _FCFUNCPROTOBEGIN +#define _FCFUNCPROTOEND +#endif + +typedef enum { FcEndianBig, FcEndianLittle } FcEndian; + +typedef struct _FcConfig FcConfig; + +typedef struct _FcGlobalCache FcFileCache; + +typedef struct _FcBlanks FcBlanks; + +typedef struct _FcStrList FcStrList; + +typedef struct _FcStrSet FcStrSet; + +_FCFUNCPROTOBEGIN + +FcBool +FcDirCacheValid (const FcChar8 *cache_file); + +/* fcblanks.c */ +FcBlanks * +FcBlanksCreate (void); + +void +FcBlanksDestroy (FcBlanks *b); + +FcBool +FcBlanksAdd (FcBlanks *b, FcChar32 ucs4); + +FcBool +FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4); + +/* fccfg.c */ +FcChar8 * +FcConfigFilename (const FcChar8 *url); + +FcConfig * +FcConfigCreate (void); + +void +FcConfigDestroy (FcConfig *config); + +FcBool +FcConfigSetCurrent (FcConfig *config); + +FcConfig * +FcConfigGetCurrent (void); + +FcBool +FcConfigUptoDate (FcConfig *config); + +FcBool +FcConfigBuildFonts (FcConfig *config); + +FcStrList * +FcConfigGetFontDirs (FcConfig *config); + +FcStrList * +FcConfigGetConfigDirs (FcConfig *config); + +FcStrList * +FcConfigGetConfigFiles (FcConfig *config); + +FcChar8 * +FcConfigGetCache (FcConfig *config); + +FcBlanks * +FcConfigGetBlanks (FcConfig *config); + +int +FcConfigGetRescanInverval (FcConfig *config); + +FcBool +FcConfigSetRescanInverval (FcConfig *config, int rescanInterval); + +FcFontSet * +FcConfigGetFonts (FcConfig *config, + FcSetName set); + +FcBool +FcConfigAppFontAddFile (FcConfig *config, + const FcChar8 *file); + +FcBool +FcConfigAppFontAddDir (FcConfig *config, + const FcChar8 *dir); + +void +FcConfigAppFontClear (FcConfig *config); + +FcBool +FcConfigSubstituteWithPat (FcConfig *config, + FcPattern *p, + FcPattern *p_pat, + FcMatchKind kind); + +FcBool +FcConfigSubstitute (FcConfig *config, + FcPattern *p, + FcMatchKind kind); + +/* fccharset.c */ +FcCharSet * +FcCharSetCreate (void); + +void +FcCharSetDestroy (FcCharSet *fcs); + +FcBool +FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4); + +FcCharSet * +FcCharSetCopy (FcCharSet *src); + +FcBool +FcCharSetEqual (const FcCharSet *a, const FcCharSet *b); + +FcCharSet * +FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b); + +FcCharSet * +FcCharSetUnion (const FcCharSet *a, const FcCharSet *b); + +FcCharSet * +FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b); + +FcBool +FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4); + +FcChar32 +FcCharSetCount (const FcCharSet *a); + +FcChar32 +FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b); + +FcChar32 +FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b); + +FcBool +FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b); + +#define FC_CHARSET_MAP_SIZE (256/32) +#define FC_CHARSET_DONE ((FcChar32) -1) + +FcChar32 +FcCharSetFirstPage (const FcCharSet *a, + FcChar32 map[FC_CHARSET_MAP_SIZE], + FcChar32 *next); + +FcChar32 +FcCharSetNextPage (const FcCharSet *a, + FcChar32 map[FC_CHARSET_MAP_SIZE], + FcChar32 *next); + + +/* fcdbg.c */ +void +FcValuePrint (const FcValue v); + +void +FcPatternPrint (const FcPattern *p); + +void +FcFontSetPrint (const FcFontSet *s); + +/* fcdefault.c */ +void +FcDefaultSubstitute (FcPattern *pattern); + +/* fcdir.c */ +FcBool +FcFileScan (FcFontSet *set, + FcStrSet *dirs, + FcFileCache *cache, + FcBlanks *blanks, + const FcChar8 *file, + FcBool force); + +FcBool +FcDirScan (FcFontSet *set, + FcStrSet *dirs, + FcFileCache *cache, + FcBlanks *blanks, + const FcChar8 *dir, + FcBool force); + +FcBool +FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); + +/* fcfreetype.c */ +FcPattern * +FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count); + +/* fcfs.c */ + +FcFontSet * +FcFontSetCreate (void); + +void +FcFontSetDestroy (FcFontSet *s); + +FcBool +FcFontSetAdd (FcFontSet *s, FcPattern *font); + +/* fcinit.c */ +FcConfig * +FcInitLoadConfig (void); + +FcConfig * +FcInitLoadConfigAndFonts (void); + +FcBool +FcInit (void); + +int +FcGetVersion (void); + +FcBool +FcInitReinitialize (void); + +FcBool +FcInitBringUptoDate (void); + +/* fclang.c */ +FcLangSet * +FcLangSetCreate (void); + +void +FcLangSetDestroy (FcLangSet *ls); + +FcLangSet * +FcLangSetCopy (const FcLangSet *ls); + +FcBool +FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang); + +FcLangResult +FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang); + +FcLangResult +FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb); + +FcBool +FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb); + +FcChar32 +FcLangSetHash (const FcLangSet *ls); + +/* fclist.c */ +FcObjectSet * +FcObjectSetCreate (void); + +FcBool +FcObjectSetAdd (FcObjectSet *os, const char *object); + +void +FcObjectSetDestroy (FcObjectSet *os); + +FcObjectSet * +FcObjectSetVaBuild (const char *first, va_list va); + +FcObjectSet * +FcObjectSetBuild (const char *first, ...); + +FcFontSet * +FcFontSetList (FcConfig *config, + FcFontSet **sets, + int nsets, + FcPattern *p, + FcObjectSet *os); + +FcFontSet * +FcFontList (FcConfig *config, + FcPattern *p, + FcObjectSet *os); + +/* fcatomic.c */ + +FcAtomic * +FcAtomicCreate (const FcChar8 *file); + +FcBool +FcAtomicLock (FcAtomic *atomic); + +FcChar8 * +FcAtomicNewFile (FcAtomic *atomic); + +FcChar8 * +FcAtomicOrigFile (FcAtomic *atomic); + +FcBool +FcAtomicReplaceOrig (FcAtomic *atomic); + +void +FcAtomicDeleteNew (FcAtomic *atomic); + +void +FcAtomicUnlock (FcAtomic *atomic); + +void +FcAtomicDestroy (FcAtomic *atomic); + +/* fcmatch.c */ +FcPattern * +FcFontSetMatch (FcConfig *config, + FcFontSet **sets, + int nsets, + FcPattern *p, + FcResult *result); + +FcPattern * +FcFontMatch (FcConfig *config, + FcPattern *p, + FcResult *result); + +FcPattern * +FcFontRenderPrepare (FcConfig *config, + FcPattern *pat, + FcPattern *font); + +FcFontSet * +FcFontSetSort (FcConfig *config, + FcFontSet **sets, + int nsets, + FcPattern *p, + FcBool trim, + FcCharSet **csp, + FcResult *result); + +FcFontSet * +FcFontSort (FcConfig *config, + FcPattern *p, + FcBool trim, + FcCharSet **csp, + FcResult *result); + +void +FcFontSetSortDestroy (FcFontSet *fs); + +/* fcmatrix.c */ +FcMatrix * +FcMatrixCopy (const FcMatrix *mat); + +FcBool +FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2); + +void +FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b); + +void +FcMatrixRotate (FcMatrix *m, double c, double s); + +void +FcMatrixScale (FcMatrix *m, double sx, double sy); + +void +FcMatrixShear (FcMatrix *m, double sh, double sv); + +/* fcname.c */ + +FcBool +FcNameRegisterObjectTypes (const FcObjectType *types, int ntype); + +FcBool +FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype); + +const FcObjectType * +FcNameGetObjectType (const char *object); + +FcBool +FcNameRegisterConstants (const FcConstant *consts, int nconsts); + +FcBool +FcNameUnregisterConstants (const FcConstant *consts, int nconsts); + +const FcConstant * +FcNameGetConstant (FcChar8 *string); + +FcBool +FcNameConstant (FcChar8 *string, int *result); + +FcPattern * +FcNameParse (const FcChar8 *name); + +FcChar8 * +FcNameUnparse (FcPattern *pat); + +/* fcpat.c */ +FcPattern * +FcPatternCreate (void); + +FcPattern * +FcPatternDuplicate (const FcPattern *p); + +void +FcPatternReference (FcPattern *p); + +void +FcValueDestroy (FcValue v); + +FcBool +FcValueEqual (FcValue va, FcValue vb); + +FcValue +FcValueSave (FcValue v); + +void +FcPatternDestroy (FcPattern *p); + +FcBool +FcPatternEqual (const FcPattern *pa, const FcPattern *pb); + +FcBool +FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os); + +FcChar32 +FcPatternHash (const FcPattern *p); + +FcBool +FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append); + +FcBool +FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append); + +FcResult +FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v); + +FcBool +FcPatternDel (FcPattern *p, const char *object); + +FcBool +FcPatternAddInteger (FcPattern *p, const char *object, int i); + +FcBool +FcPatternAddDouble (FcPattern *p, const char *object, double d); + +FcBool +FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s); + +FcBool +FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s); + +FcBool +FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c); + +FcBool +FcPatternAddBool (FcPattern *p, const char *object, FcBool b); + +FcBool +FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls); + +FcResult +FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i); + +FcResult +FcPatternGetDouble (const FcPattern *p, const char *object, int n, double *d); + +FcResult +FcPatternGetString (const FcPattern *p, const char *object, int n, FcChar8 ** s); + +FcResult +FcPatternGetMatrix (const FcPattern *p, const char *object, int n, FcMatrix **s); + +FcResult +FcPatternGetCharSet (const FcPattern *p, const char *object, int n, FcCharSet **c); + +FcResult +FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b); + +FcResult +FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls); + +FcPattern * +FcPatternVaBuild (FcPattern *orig, va_list va); + +FcPattern * +FcPatternBuild (FcPattern *orig, ...); + +/* fcstr.c */ + +FcChar8 * +FcStrCopy (const FcChar8 *s); + +FcChar8 * +FcStrCopyFilename (const FcChar8 *s); + +#define FcToLower(c) (('A' <= (c) && (c) <= 'Z') ? (c) - 'A' + 'a' : (c)) + +int +FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); + +int +FcStrCmp (const FcChar8 *s1, const FcChar8 *s2); + +int +FcUtf8ToUcs4 (const FcChar8 *src_orig, + FcChar32 *dst, + int len); + +FcBool +FcUtf8Len (const FcChar8 *string, + int len, + int *nchar, + int *wchar); + +#define FC_UTF8_MAX_LEN 6 + +int +FcUcs4ToUtf8 (FcChar32 ucs4, + FcChar8 dest[FC_UTF8_MAX_LEN]); + +int +FcUtf16ToUcs4 (const FcChar8 *src_orig, + FcEndian endian, + FcChar32 *dst, + int len); /* in bytes */ + +FcBool +FcUtf16Len (const FcChar8 *string, + FcEndian endian, + int len, /* in bytes */ + int *nchar, + int *wchar); + +FcChar8 * +FcStrDirname (const FcChar8 *file); + +FcChar8 * +FcStrBasename (const FcChar8 *file); + +FcStrSet * +FcStrSetCreate (void); + +FcBool +FcStrSetMember (FcStrSet *set, const FcChar8 *s); + +FcBool +FcStrSetEqual (FcStrSet *sa, FcStrSet *sb); + +FcBool +FcStrSetAdd (FcStrSet *set, const FcChar8 *s); + +FcBool +FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s); + +FcBool +FcStrSetDel (FcStrSet *set, const FcChar8 *s); + +void +FcStrSetDestroy (FcStrSet *set); + +FcStrList * +FcStrListCreate (FcStrSet *set); + +FcChar8 * +FcStrListNext (FcStrList *list); + +void +FcStrListDone (FcStrList *list); + +/* fcxml.c */ +FcBool +FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain); + +_FCFUNCPROTOEND + +#endif /* _FONTCONFIG_H_ */ Index: xc/lib/fontconfig/src/Imakefile diff -u /dev/null xc/lib/fontconfig/src/Imakefile:1.9 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/src/Imakefile Mon Aug 19 15:32:05 2002 @@ -0,0 +1,48 @@ +#ifdef UseInstalled +/* building outside the tree, use private defines */ +#include "../local.def" +#endif + +#define LibHeaders NO + +FONTCONFIGSRC=. + +FC_DEFAULT_FONTS=$(FONTDIR)/Type1 + +#define DoNormalLib NormalLibFontconfig +#define DoSharedLib SharedLibFontconfig +#define DoExtraLib SharedLibFontconfig +#define DoDebugLib DebugLibFontconfig +#define DoProfileLib ProfileLibFontconfig +#define HasSharedData YES +#define LibName fontconfig +SOFONTCONFIGREV=1.0 +#define SoRev SOFONTCONFIGREV + +#include <Threads.tmpl> + +INCLUDES=$(FREETYPE2INCLUDES) -I.. + +DEFINES=-DFC_DEFAULT_FONTS='"$(FC_DEFAULT_FONTS)"' -DHAVE_EXPAT + +EXPATLIB=-lexpat +REQUIREDLIBS=$(LDPRELIBS) $(FREETYPE2LIB) $(EXPATLIB) + +SRCS=fcatomic.c fcblanks.c fccache.c fccfg.c fccharset.c fcdbg.c \ + fcdefault.c fcdir.c fcfreetype.c fcfs.c fcinit.c fclang.c fclist.c \ + fcmatch.c fcmatrix.c fcname.c fcpat.c fcstr.c fcxml.c + +OBJS=fcatomic.o fcblanks.o fccache.o fccfg.o fccharset.o fcdbg.o \ + fcdefault.o fcdir.o fcfreetype.o fcfs.o fcinit.o fclang.o fclist.o \ + fcmatch.o fcmatrix.o fcname.o fcpat.o fcstr.o fcxml.o + +#include <Library.tmpl> + +#if DoSharedLib && SharedDataSeparation +SpecialCObjectRule(sharedlib,NullParameter,$(SHLIBDEF)) +#endif + +MANSUFFIX = $(LIBMANSUFFIX) +InstallManPage(fontconfig,$(LIBMANDIR)) +DependTarget() + Index: xc/lib/fontconfig/src/Makefile.in diff -u /dev/null xc/lib/fontconfig/src/Makefile.in:1.6 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/src/Makefile.in Thu Aug 1 11:57:26 2002 @@ -0,0 +1,120 @@ +# +# $XFree86: xc/lib/fontconfig/src/Makefile.in,v 1.6 2002/08/01 15:57:26 keithp Exp $ +# +# Copyright © 2002 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. +# + +TOPDIR=.. + +include $(TOPDIR)/config/Makedefs + +LIBS=@LIBS@ + +SRCS=fcatomic.c \ + fcblanks.c \ + fccache.c \ + fccfg.c \ + fccharset.c \ + fcdbg.c \ + fcdefault.c \ + fcdir.c \ + fcfreetype.c \ + fcfs.c \ + fcinit.c \ + fclang.c \ + fclist.c \ + fcmatch.c \ + fcmatrix.c \ + fcname.c \ + fcpat.c \ + fcstr.c \ + fcxml.c + +OBJS=fcatomic.@OBJEXT@ \ + fcblanks.@OBJEXT@ \ + fccache.@OBJEXT@ \ + fccfg.@OBJEXT@ \ + fccharset.@OBJEXT@ \ + fcdbg.@OBJEXT@ \ + fcdefault.@OBJEXT@ \ + fcdir.@OBJEXT@ \ + fcfreetype.@OBJEXT@ \ + fcfs.@OBJEXT@ \ + fcinit.@OBJEXT@ \ + fclang.@OBJEXT@ \ + fclist.@OBJEXT@ \ + fcmatch.@OBJEXT@ \ + fcmatrix.@OBJEXT@ \ + fcname.@OBJEXT@ \ + fcpat.@OBJEXT@ \ + fcstr.@OBJEXT@ \ + fcxml.@OBJEXT@ + +.c.@OBJEXT@: + $(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) -c $< -o $@ + +all:: $(LIBFILE) $(LIBMAJOR) $(LIBBASE) + +# +# build the library and the various version links +# +$(LIBFILE): $(OBJS) + rm -f $@ + $(MKSHLIB) $(OBJS) $(LIBS) + +$(LIBMAJOR): $(LIBFILE) + rm -f $@ + $(LN_S) $(LIBFILE) $(LIBMAJOR) + +$(LIBBASE): $(LIBMAJOR) + rm -f $@ + $(LN_S) $(LIBMAJOR) $(LIBBASE) + +$(OBJS): fcint.h $(HEADERS) + +# +# install directories +# +install:: $(DESTDIR)$(LIBDIR) + +$(DESTDIR)$(LIBDIR): + mkdir -p $@ + +# +# install library +# + +install:: $(DESTDIR)$(LIBDIR)/$(LIB) $(DESTDIR)$(LIBDIR)/$(LIBMAJOR) +install:: $(DESTDIR)$(LIBDIR)/$(LIBBASE) + +$(DESTDIR)$(LIBDIR)/$(LIBFILE): $(LIBFILE) + $(INSTALL_PROGRAM) $< $(DESTDIR)$(LIBDIR)/$< + +$(DESTDIR)$(LIBDIR)/$(LIBMAJOR): $(DESTDIR)$(LIBDIR)/$(LIBFILE) + rm -f $(DESTDIR)$(LIBDIR)/$(LIBMAJOR) + $(LN_S) $(LIBFILE) $(DESTDIR)$(LIBDIR)/$(LIBMAJOR) + +$(DESTDIR)$(LIBDIR)/$(LIBBASE): $(DESTDIR)$(LIBDIR)/$(LIBMAJOR) + rm -f $(DESTDIR)$(LIBDIR)/$(LIBBASE) + $(LN_S) $(LIBMAJOR) $(DESTDIR)$(LIBDIR)/$(LIBBASE) + +clean:: + rm -f $(LIBFILE) $(LIBMAJOR) $(LIBBASE) $(OBJS) Index: xc/lib/fontconfig/src/fcatomic.c diff -u /dev/null xc/lib/fontconfig/src/fcatomic.c:1.3 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/src/fcatomic.c Sat Aug 31 18:17:31 2002 @@ -0,0 +1,189 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcatomic.c,v 1.3 2002/08/31 22:17:31 keithp Exp $ + * + * Copyright © 2002 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. + */ + +/* + * fcatomic.c + * + * Lock cache and configuration files for atomic update + * + * Uses only regular filesystem calls so it should + * work even in the absense of functioning file locking + * + * Four files: + * file - the data file accessed by other apps. + * new - a new version of the data file while it's being written + * lck - the lock file + * tmp - a temporary file made unique with mkstemp + * + * Here's how it works: + * Create 'tmp' and store our PID in it + * Attempt to link it to 'lck' + * Unlink 'tmp' + * If the link succeeded, the lock is held + */ + +#include "fcint.h" +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +#include <stdlib.h> +#include <time.h> + +#define NEW_NAME ".NEW" +#define LCK_NAME ".LCK" +#define TMP_NAME ".TMP-XXXXXX" + +FcAtomic * +FcAtomicCreate (const FcChar8 *file) +{ + int file_len = strlen ((char *) file); + int new_len = file_len + sizeof (NEW_NAME); + int lck_len = file_len + sizeof (LCK_NAME); + int tmp_len = file_len + sizeof (TMP_NAME); + int total_len = (sizeof (FcAtomic) + + file_len + 1 + + new_len + 1 + + lck_len + 1 + + tmp_len + 1); + FcAtomic *atomic = malloc (total_len); + if (!atomic) + return 0; + FcMemAlloc (FC_MEM_ATOMIC, total_len); + + atomic->file = (FcChar8 *) (atomic + 1); + strcpy ((char *) atomic->file, (char *) file); + + atomic->new = atomic->file + file_len + 1; + strcpy ((char *) atomic->new, (char *) file); + strcat ((char *) atomic->new, NEW_NAME); + + atomic->lck = atomic->new + new_len + 1; + strcpy ((char *) atomic->lck, (char *) file); + strcat ((char *) atomic->lck, LCK_NAME); + + atomic->tmp = atomic->lck + lck_len + 1; + + return atomic; +} + +FcBool +FcAtomicLock (FcAtomic *atomic) +{ + int fd = -1; + FILE *f = 0; + int ret; + struct stat lck_stat; + + strcpy ((char *) atomic->tmp, (char *) atomic->file); + strcat ((char *) atomic->tmp, TMP_NAME); + fd = mkstemp ((char *) atomic->tmp); + if (fd < 0) + return FcFalse; + f = fdopen (fd, "w"); + if (!f) + { + close (fd); + unlink ((char *) atomic->tmp); + return FcFalse; + } + ret = fprintf (f, "%ld\n", (long)getpid()); + if (ret <= 0) + { + fclose (f); + unlink ((char *) atomic->tmp); + return FcFalse; + } + if (fclose (f) == EOF) + { + unlink ((char *) atomic->tmp); + return FcFalse; + } + ret = link ((char *) atomic->tmp, (char *) atomic->lck); + (void) unlink ((char *) atomic->tmp); + if (ret < 0) + { + /* + * If the file is around and old (> 10 minutes), + * assume the lock is stale. This assumes that any + * machines sharing the same filesystem will have clocks + * reasonably close to each other. + */ + if (stat ((char *) atomic->lck, &lck_stat) >= 0) + { + time_t now = time (0); + if ((long int) (now - lck_stat.st_mtime) > 10 * 60) + { + if (unlink ((char *) atomic->lck) == 0) + return FcAtomicLock (atomic); + } + } + return FcFalse; + } + (void) unlink ((char *) atomic->new); + return FcTrue; +} + +FcChar8 * +FcAtomicNewFile (FcAtomic *atomic) +{ + return atomic->new; +} + +FcChar8 * +FcAtomicOrigFile (FcAtomic *atomic) +{ + return atomic->file; +} + +FcBool +FcAtomicReplaceOrig (FcAtomic *atomic) +{ + if (rename ((char *) atomic->new, (char *) atomic->file) < 0) + return FcFalse; + return FcTrue; +} + +void +FcAtomicDeleteNew (FcAtomic *atomic) +{ + unlink ((char *) atomic->new); +} + +void +FcAtomicUnlock (FcAtomic *atomic) +{ + unlink ((char *) atomic->lck); +} + +void +FcAtomicDestroy (FcAtomic *atomic) +{ + FcMemFree (FC_MEM_ATOMIC, sizeof (FcAtomic) + + strlen ((char *) atomic->file) * 4 + 1 + + sizeof (NEW_NAME) + sizeof (LCK_NAME) + + sizeof (TMP_NAME)); + + free (atomic); +} Index: xc/lib/fontconfig/src/fcblanks.c diff -u /dev/null xc/lib/fontconfig/src/fcblanks.c:1.2 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/src/fcblanks.c Sat Aug 31 18:17:31 2002 @@ -0,0 +1,92 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcblanks.c,v 1.2 2002/08/31 22:17:31 keithp Exp $ + * + * Copyright © 2002 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 "fcint.h" + +FcBlanks * +FcBlanksCreate (void) +{ + FcBlanks *b; + + b = malloc (sizeof (FcBlanks)); + if (!b) + return 0; + FcMemAlloc (FC_MEM_BLANKS, sizeof (FcBlanks)); + b->nblank = 0; + b->sblank = 0; + b->blanks = 0; + return b; +} + +void +FcBlanksDestroy (FcBlanks *b) +{ + if (b->blanks) + { + FcMemFree (FC_MEM_BLANKS, b->sblank * sizeof (FcChar32)); + free (b->blanks); + } + FcMemFree (FC_MEM_BLANKS, sizeof (FcBlanks)); + free (b); +} + +FcBool +FcBlanksAdd (FcBlanks *b, FcChar32 ucs4) +{ + FcChar32 *c; + int sblank; + + for (sblank = 0; sblank < b->nblank; sblank++) + if (b->blanks[sblank] == ucs4) + return FcTrue; + + if (b->nblank == b->sblank) + { + sblank = b->sblank + 32; + if (b->blanks) + c = (FcChar32 *) realloc (b->blanks, sblank * sizeof (FcChar32)); + else + c = (FcChar32 *) malloc (sblank * sizeof (FcChar32)); + if (!c) + return FcFalse; + if (b->sblank) + FcMemFree (FC_MEM_BLANKS, b->sblank * sizeof (FcChar32)); + FcMemAlloc (FC_MEM_BLANKS, sblank * sizeof (FcChar32)); + b->sblank = sblank; + b->blanks = c; + } + b->blanks[b->nblank++] = ucs4; + return FcTrue; +} + +FcBool +FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4) +{ + int i; + + for (i = 0; i < b->nblank; i++) + if (b->blanks[i] == ucs4) + return FcTrue; + return FcFalse; +} Index: xc/lib/fontconfig/src/fccache.c diff -u /dev/null xc/lib/fontconfig/src/fccache.c:1.14 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/src/fccache.c Wed Sep 25 20:16:23 2002 @@ -0,0 +1,1082 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fccache.c,v 1.14 2002/09/26 00:16:23 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 "fcint.h" + +/* + * POSIX has broken stdio so that getc must do thread-safe locking, + * this is a serious performance problem for applications doing large + * amounts of IO with getc (as is done here). If available, use + * the getc_unlocked varient instead. + */ + +#if defined(getc_unlocked) || defined(_IO_getc_unlocked) +#define GETC(f) getc_unlocked(f) +#define PUTC(c,f) putc_unlocked(c,f) +#else +#define GETC(f) getc(f) +#define PUTC(c,f) putc(c,f) +#endif + +#define FC_DBG_CACHE_REF 1024 + +static FcChar8 * +FcCacheReadString (FILE *f, FcChar8 *dest, int len) +{ + int c; + FcBool escape; + FcChar8 *d; + int size; + int i; + + while ((c = GETC (f)) != EOF) + if (c == '"') + break; + if (c == EOF) + return FcFalse; + if (len == 0) + return FcFalse; + + size = len; + i = 0; + d = dest; + escape = FcFalse; + while ((c = GETC (f)) != EOF) + { + if (!escape) + { + switch (c) { + case '"': + c = '\0'; + break; + case '\\': + escape = FcTrue; + continue; + } + } + if (i == size) + { + FcChar8 *new = malloc (size * 2); /* freed in caller */ + if (!new) + break; + memcpy (new, d, size); + size *= 2; + if (d != dest) + free (d); + d = new; + } + d[i++] = c; + if (c == '\0') + return d; + escape = FcFalse; + } + if (d != dest) + free (d); + return 0; +} + +static FcBool +FcCacheReadUlong (FILE *f, unsigned long *dest) +{ + unsigned long t; + int c; + + while ((c = GETC (f)) != EOF) + { + if (!isspace (c)) + break; + } + if (c == EOF) + return FcFalse; + t = 0; + for (;;) + { + if (c == EOF || isspace (c)) + break; + if (!isdigit (c)) + return FcFalse; + t = t * 10 + (c - '0'); + c = GETC (f); + } + *dest = t; + return FcTrue; +} + +static FcBool +FcCacheReadInt (FILE *f, int *dest) +{ + unsigned long t; + FcBool ret; + + ret = FcCacheReadUlong (f, &t); + if (ret) + *dest = (int) t; + return ret; +} + +static FcBool +FcCacheReadTime (FILE *f, time_t *dest) +{ + unsigned long t; + FcBool ret; + + ret = FcCacheReadUlong (f, &t); + if (ret) + *dest = (time_t) t; + return ret; +} + +static FcBool +FcCacheWriteChars (FILE *f, const FcChar8 *chars) +{ + FcChar8 c; + while ((c = *chars++)) + { + switch (c) { + case '"': + case '\\': + if (PUTC ('\\', f) == EOF) + return FcFalse; + /* fall through */ + default: + if (PUTC (c, f) == EOF) + return FcFalse; + } + } + return FcTrue; +} + +static FcBool +FcCacheWriteString (FILE *f, const FcChar8 *string) +{ + + if (PUTC ('"', f) == EOF) + return FcFalse; + if (!FcCacheWriteChars (f, string)) + return FcFalse; + if (PUTC ('"', f) == EOF) + return FcFalse; + return FcTrue; +} + +static FcBool +FcCacheWritePath (FILE *f, const FcChar8 *dir, const FcChar8 *file) +{ + if (PUTC ('"', f) == EOF) + return FcFalse; + if (dir) + if (!FcCacheWriteChars (f, dir)) + return FcFalse; + if (dir && dir[strlen((const char *) dir) - 1] != '/') + if (PUTC ('/', f) == EOF) + return FcFalse; + if (!FcCacheWriteChars (f, file)) + return FcFalse; + if (PUTC ('"', f) == EOF) + return FcFalse; + return FcTrue; +} + +static FcBool +FcCacheWriteUlong (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 FcFalse; + temp = temp - pow * digit; + pow = pow / 10; + } + return FcTrue; +} + +static FcBool +FcCacheWriteInt (FILE *f, int i) +{ + return FcCacheWriteUlong (f, (unsigned long) i); +} + +static FcBool +FcCacheWriteTime (FILE *f, time_t t) +{ + return FcCacheWriteUlong (f, (unsigned long) t); +} + +static FcBool +FcCacheFontSetAdd (FcFontSet *set, + FcStrSet *dirs, + const FcChar8 *dir, + int dir_len, + const FcChar8 *file, + const FcChar8 *name) +{ + FcChar8 path_buf[8192], *path; + int len; + FcBool ret = FcFalse; + FcPattern *font; + FcPattern *frozen; + + path = path_buf; + len = (dir_len + 1 + strlen ((const char *) file) + 1); + if (len > sizeof (path_buf)) + { + path = malloc (len); /* freed down below */ + if (!path) + return FcFalse; + } + strncpy ((char *) path, (const char *) dir, dir_len); + if (dir[dir_len - 1] != '/') + path[dir_len++] = '/'; + strcpy ((char *) path + dir_len, (const char *) file); + if (!FcStrCmp (name, FC_FONT_FILE_DIR)) + { + if (FcDebug () & FC_DBG_CACHEV) + printf (" dir cache dir \"%s\"\n", path); + ret = FcStrSetAdd (dirs, path); + } + else if (!FcStrCmp (name, FC_FONT_FILE_INVALID)) + { + ret = FcTrue; + } + else + { + font = FcNameParse (name); + if (font) + { + if (FcDebug () & FC_DBG_CACHEV) + printf (" dir cache file \"%s\"\n", file); + ret = FcPatternAddString (font, FC_FILE, path); + if (ret) + { + frozen = FcPatternFreeze (font); + ret = (frozen != 0); + if (ret) + ret = FcFontSetAdd (set, frozen); + } + FcPatternDestroy (font); + } + } + if (path != path_buf) free (path); + return ret; + +} + +static unsigned int +FcCacheHash (const FcChar8 *string) +{ + unsigned int h = 0; + FcChar8 c; + + while ((c = *string++)) + h = (h << 1) ^ c; + return 0; +} + +/* + * Verify the saved timestamp for a file + */ +FcBool +FcGlobalCacheCheckTime (FcGlobalCacheInfo *info) +{ + struct stat statb; + + if (stat ((char *) info->file, &statb) < 0) + { + if (FcDebug () & FC_DBG_CACHE) + printf (" file missing\n"); + return FcFalse; + } + if (statb.st_mtime != info->time) + { + if (FcDebug () & FC_DBG_CACHE) + printf (" timestamp mismatch (was %d is %d)\n", + (int) info->time, (int) statb.st_mtime); + return FcFalse; + } + return FcTrue; +} + +void +FcGlobalCacheReferenced (FcGlobalCache *cache, + FcGlobalCacheInfo *info) +{ + if (!info->referenced) + { + info->referenced = FcTrue; + cache->referenced++; + if (FcDebug () & FC_DBG_CACHE_REF) + printf ("Reference %d %s\n", cache->referenced, info->file); + } +} + +/* + * Break a path into dir/base elements and compute the base hash + * and the dir length. This is shared between the functions + * which walk the file caches + */ + +typedef struct _FcFilePathInfo { + const FcChar8 *dir; + int dir_len; + const FcChar8 *base; + unsigned int base_hash; +} FcFilePathInfo; + +static FcFilePathInfo +FcFilePathInfoGet (const FcChar8 *path) +{ + FcFilePathInfo i; + FcChar8 *slash; + + slash = (FcChar8 *) strrchr ((const char *) path, '/'); + if (slash) + { + i.dir = path; + i.dir_len = slash - path; + if (!i.dir_len) + i.dir_len = 1; + i.base = slash + 1; + } + else + { + i.dir = (const FcChar8 *) "."; + i.dir_len = 1; + i.base = path; + } + i.base_hash = FcCacheHash (i.base); + return i; +} + +FcGlobalCacheDir * +FcGlobalCacheDirGet (FcGlobalCache *cache, + const FcChar8 *dir, + int len, + FcBool create_missing) +{ + unsigned int hash = FcCacheHash (dir); + FcGlobalCacheDir *d, **prev; + + for (prev = &cache->ents[hash % FC_GLOBAL_CACHE_DIR_HASH_SIZE]; + (d = *prev); + prev = &(*prev)->next) + { + if (d->info.hash == hash && d->len == len && + !strncmp ((const char *) d->info.file, + (const char *) dir, len)) + break; + } + if (!(d = *prev)) + { + int i; + if (!create_missing) + return 0; + d = malloc (sizeof (FcGlobalCacheDir) + len + 1); + if (!d) + return 0; + FcMemAlloc (FC_MEM_CACHE, sizeof (FcGlobalCacheDir) + len + 1); + d->next = *prev; + *prev = d; + d->info.hash = hash; + d->info.file = (FcChar8 *) (d + 1); + strncpy ((char *) d->info.file, (const char *) dir, len); + d->info.file[len] = '\0'; + d->info.time = 0; + d->info.referenced = FcFalse; + d->len = len; + for (i = 0; i < FC_GLOBAL_CACHE_FILE_HASH_SIZE; i++) + d->ents[i] = 0; + d->subdirs = 0; + } + return d; +} + +static FcGlobalCacheInfo * +FcGlobalCacheDirAdd (FcGlobalCache *cache, + const FcChar8 *dir, + time_t time, + FcBool replace) +{ + FcGlobalCacheDir *d; + FcFilePathInfo i; + FcGlobalCacheSubdir *subdir; + FcGlobalCacheDir *parent; + + /* + * Add this directory to the cache + */ + d = FcGlobalCacheDirGet (cache, dir, strlen ((const char *) dir), FcTrue); + if (!d) + return 0; + d->info.time = time; + i = FcFilePathInfoGet (dir); + /* + * Add this directory to the subdirectory list of the parent + */ + parent = FcGlobalCacheDirGet (cache, i.dir, i.dir_len, FcTrue); + if (!parent) + return 0; + subdir = malloc (sizeof (FcGlobalCacheSubdir)); + if (!subdir) + return 0; + FcMemAlloc (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir)); + subdir->ent = d; + subdir->next = parent->subdirs; + parent->subdirs = subdir; + return &d->info; +} + +static void +FcGlobalCacheDirDestroy (FcGlobalCacheDir *d) +{ + FcGlobalCacheFile *f, *next; + int h; + FcGlobalCacheSubdir *s, *nexts; + + for (h = 0; h < FC_GLOBAL_CACHE_FILE_HASH_SIZE; h++) + for (f = d->ents[h]; f; f = next) + { + next = f->next; + FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheFile) + + strlen ((char *) f->info.file) + 1 + + strlen ((char *) f->name) + 1); + free (f); + } + for (s = d->subdirs; s; s = nexts) + { + nexts = s->next; + FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir)); + free (s); + } + FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheDir) + d->len + 1); + free (d); +} + +FcBool +FcGlobalCacheScanDir (FcFontSet *set, + FcStrSet *dirs, + FcGlobalCache *cache, + const FcChar8 *dir) +{ + FcGlobalCacheDir *d = FcGlobalCacheDirGet (cache, dir, + strlen ((const char *) dir), + FcFalse); + FcGlobalCacheFile *f; + int h; + int dir_len; + FcGlobalCacheSubdir *subdir; + + if (FcDebug() & FC_DBG_CACHE) + printf ("FcGlobalCacheScanDir %s\n", dir); + + if (!d) + { + if (FcDebug () & FC_DBG_CACHE) + printf ("\tNo dir cache entry\n"); + return FcFalse; + } + + if (!FcGlobalCacheCheckTime (&d->info)) + { + if (FcDebug () & FC_DBG_CACHE) + printf ("\tdir cache entry time mismatch\n"); + return FcFalse; + } + + dir_len = strlen ((const char *) dir); + for (h = 0; h < FC_GLOBAL_CACHE_FILE_HASH_SIZE; h++) + for (f = d->ents[h]; f; f = f->next) + { + if (FcDebug() & FC_DBG_CACHEV) + printf ("FcGlobalCacheScanDir add file %s\n", f->info.file); + if (!FcCacheFontSetAdd (set, dirs, dir, dir_len, + f->info.file, f->name)) + { + cache->broken = FcTrue; + return FcFalse; + } + FcGlobalCacheReferenced (cache, &f->info); + } + for (subdir = d->subdirs; subdir; subdir = subdir->next) + { + FcFilePathInfo info = FcFilePathInfoGet (subdir->ent->info.file); + + if (!FcCacheFontSetAdd (set, dirs, dir, dir_len, + info.base, FC_FONT_FILE_DIR)) + { + cache->broken = FcTrue; + return FcFalse; + } + FcGlobalCacheReferenced (cache, &subdir->ent->info); + } + + FcGlobalCacheReferenced (cache, &d->info); + + return FcTrue; +} + +/* + * Locate the cache entry for a particular file + */ +FcGlobalCacheFile * +FcGlobalCacheFileGet (FcGlobalCache *cache, + const FcChar8 *file, + int id, + int *count) +{ + FcFilePathInfo i = FcFilePathInfoGet (file); + FcGlobalCacheDir *d = FcGlobalCacheDirGet (cache, i.dir, + i.dir_len, FcFalse); + FcGlobalCacheFile *f, *match = 0; + int max = -1; + + if (!d) + return 0; + for (f = d->ents[i.base_hash % FC_GLOBAL_CACHE_FILE_HASH_SIZE]; f; f = f->next) + { + if (f->info.hash == i.base_hash && + !strcmp ((const char *) f->info.file, (const char *) i.base)) + { + if (f->id == id) + match = f; + if (f->id > max) + max = f->id; + } + } + if (count) + *count = max; + return match; +} + +/* + * Add a file entry to the cache + */ +static FcGlobalCacheInfo * +FcGlobalCacheFileAdd (FcGlobalCache *cache, + const FcChar8 *path, + int id, + time_t time, + const FcChar8 *name, + FcBool replace) +{ + FcFilePathInfo i = FcFilePathInfoGet (path); + FcGlobalCacheDir *d = FcGlobalCacheDirGet (cache, i.dir, + i.dir_len, FcTrue); + FcGlobalCacheFile *f, **prev; + int size; + + if (!d) + return 0; + for (prev = &d->ents[i.base_hash % FC_GLOBAL_CACHE_FILE_HASH_SIZE]; + (f = *prev); + prev = &(*prev)->next) + { + if (f->info.hash == i.base_hash && + f->id == id && + !strcmp ((const char *) f->info.file, (const char *) i.base)) + { + break; + } + } + if (*prev) + { + if (!replace) + return 0; + + f = *prev; + if (f->info.referenced) + cache->referenced--; + *prev = f->next; + FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheFile) + + strlen ((char *) f->info.file) + 1 + + strlen ((char *) f->name) + 1); + free (f); + } + size = (sizeof (FcGlobalCacheFile) + + strlen ((char *) i.base) + 1 + + strlen ((char *) name) + 1); + f = malloc (size); + if (!f) + return 0; + FcMemAlloc (FC_MEM_CACHE, size); + f->next = *prev; + *prev = f; + f->info.hash = i.base_hash; + f->info.file = (FcChar8 *) (f + 1); + f->info.time = time; + f->info.referenced = FcFalse; + f->id = id; + f->name = f->info.file + strlen ((char *) i.base) + 1; + strcpy ((char *) f->info.file, (const char *) i.base); + strcpy ((char *) f->name, (const char *) name); + return &f->info; +} + +FcGlobalCache * +FcGlobalCacheCreate (void) +{ + FcGlobalCache *cache; + int h; + + cache = malloc (sizeof (FcGlobalCache)); + if (!cache) + return 0; + FcMemAlloc (FC_MEM_CACHE, sizeof (FcGlobalCache)); + for (h = 0; h < FC_GLOBAL_CACHE_DIR_HASH_SIZE; h++) + cache->ents[h] = 0; + cache->entries = 0; + cache->referenced = 0; + cache->updated = FcFalse; + cache->broken = FcFalse; + return cache; +} + +void +FcGlobalCacheDestroy (FcGlobalCache *cache) +{ + FcGlobalCacheDir *d, *next; + int h; + + for (h = 0; h < FC_GLOBAL_CACHE_DIR_HASH_SIZE; h++) + { + for (d = cache->ents[h]; d; d = next) + { + next = d->next; + FcGlobalCacheDirDestroy (d); + } + } + FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCache)); + free (cache); +} + +/* + * Cache file syntax is quite simple: + * + * "file_name" id time "font_name" \n + */ + +void +FcGlobalCacheLoad (FcGlobalCache *cache, + const FcChar8 *cache_file) +{ + FILE *f; + FcChar8 file_buf[8192], *file; + int id; + time_t time; + FcChar8 name_buf[8192], *name; + FcGlobalCacheInfo *info; + + f = fopen ((char *) cache_file, "r"); + if (!f) + return; + + cache->updated = FcFalse; + file = 0; + name = 0; + while ((file = FcCacheReadString (f, file_buf, sizeof (file_buf))) && + FcCacheReadInt (f, &id) && + FcCacheReadTime (f, &time) && + (name = FcCacheReadString (f, name_buf, sizeof (name_buf)))) + { + if (FcDebug () & FC_DBG_CACHEV) + printf ("FcGlobalCacheLoad \"%s\" \"%20.20s\"\n", file, name); + if (!FcStrCmp (name, FC_FONT_FILE_DIR)) + info = FcGlobalCacheDirAdd (cache, file, time, FcFalse); + else + info = FcGlobalCacheFileAdd (cache, file, id, time, name, FcFalse); + if (!info) + cache->broken = FcTrue; + else + cache->entries++; + if (FcDebug () & FC_DBG_CACHE_REF) + printf ("FcGlobalCacheLoad entry %d %s\n", + cache->entries, file); + if (file != file_buf) + free (file); + if (name != name_buf) + free (name); + file = 0; + name = 0; + } + if (file && file != file_buf) + free (file); + if (name && name != name_buf) + free (name); + fclose (f); +} + +FcBool +FcGlobalCacheUpdate (FcGlobalCache *cache, + const FcChar8 *file, + int id, + const FcChar8 *name) +{ + const FcChar8 *match; + struct stat statb; + FcGlobalCacheInfo *info; + + match = file; + + if (stat ((char *) file, &statb) < 0) + return FcFalse; + if (S_ISDIR (statb.st_mode)) + info = FcGlobalCacheDirAdd (cache, file, statb.st_mtime, + FcTrue); + else + info = FcGlobalCacheFileAdd (cache, file, id, statb.st_mtime, + name, FcTrue); + if (info) + { + FcGlobalCacheReferenced (cache, info); + cache->updated = FcTrue; + } + else + cache->broken = FcTrue; + return info != 0; +} + +FcBool +FcGlobalCacheSave (FcGlobalCache *cache, + const FcChar8 *cache_file) +{ + FILE *f; + int dir_hash, file_hash; + FcGlobalCacheDir *dir; + FcGlobalCacheFile *file; + FcAtomic *atomic; + + if (!cache->updated && cache->referenced == cache->entries) + return FcTrue; + + if (cache->broken) + return FcFalse; + + /* Set-UID programs can't safely update the cache */ + if (getuid () != geteuid ()) + return FcFalse; + + atomic = FcAtomicCreate (cache_file); + if (!atomic) + goto bail0; + if (!FcAtomicLock (atomic)) + goto bail1; + f = fopen ((char *) FcAtomicNewFile(atomic), "w"); + if (!f) + goto bail2; + + for (dir_hash = 0; dir_hash < FC_GLOBAL_CACHE_DIR_HASH_SIZE; dir_hash++) + { + for (dir = cache->ents[dir_hash]; dir; dir = dir->next) + { + if (!dir->info.referenced) + continue; + if (!FcCacheWriteString (f, dir->info.file)) + goto bail4; + if (PUTC (' ', f) == EOF) + goto bail4; + if (!FcCacheWriteInt (f, 0)) + goto bail4; + if (PUTC (' ', f) == EOF) + goto bail4; + if (!FcCacheWriteTime (f, dir->info.time)) + goto bail4; + if (PUTC (' ', f) == EOF) + goto bail4; + if (!FcCacheWriteString (f, (FcChar8 *) FC_FONT_FILE_DIR)) + goto bail4; + if (PUTC ('\n', f) == EOF) + goto bail4; + + for (file_hash = 0; file_hash < FC_GLOBAL_CACHE_FILE_HASH_SIZE; file_hash++) + { + for (file = dir->ents[file_hash]; file; file = file->next) + { + if (!file->info.referenced) + continue; + if (!FcCacheWritePath (f, dir->info.file, file->info.file)) + goto bail4; + if (PUTC (' ', f) == EOF) + goto bail4; + if (!FcCacheWriteInt (f, file->id < 0 ? 0 : file->id)) + goto bail4; + if (PUTC (' ', f) == EOF) + goto bail4; + if (!FcCacheWriteTime (f, file->info.time)) + goto bail4; + if (PUTC (' ', f) == EOF) + goto bail4; + if (!FcCacheWriteString (f, file->name)) + goto bail4; + if (PUTC ('\n', f) == EOF) + goto bail4; + } + } + } + } + + if (fclose (f) == EOF) + goto bail3; + + if (!FcAtomicReplaceOrig (atomic)) + goto bail3; + + FcAtomicUnlock (atomic); + FcAtomicDestroy (atomic); + + cache->updated = FcFalse; + return FcTrue; + +bail4: + fclose (f); +bail3: + FcAtomicDeleteNew (atomic); +bail2: + FcAtomicUnlock (atomic); +bail1: + FcAtomicDestroy (atomic); +bail0: + return FcFalse; +} + +FcBool +FcDirCacheValid (const FcChar8 *dir) +{ + FcChar8 *cache_file = FcStrPlus (dir, (FcChar8 *) "/" FC_DIR_CACHE_FILE); + struct stat file_stat, dir_stat; + + if (stat ((char *) dir, &dir_stat) < 0) + { + FcStrFree (cache_file); + return FcFalse; + } + if (stat ((char *) cache_file, &file_stat) < 0) + { + FcStrFree (cache_file); + return FcFalse; + } + FcStrFree (cache_file); + /* + * If the directory has been modified more recently than + * the cache file, the cache is not valid + */ + if (dir_stat.st_mtime - file_stat.st_mtime > 0) + return FcFalse; + return FcTrue; +} + +FcBool +FcDirCacheReadDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir) +{ + FcChar8 *cache_file = FcStrPlus (dir, (FcChar8 *) "/" FC_DIR_CACHE_FILE); + FILE *f; + FcChar8 *base; + int id; + int dir_len; + FcChar8 file_buf[8192], *file; + FcChar8 name_buf[8192], *name; + FcBool ret = FcFalse; + + if (!cache_file) + goto bail0; + + if (FcDebug () & FC_DBG_CACHE) + printf ("FcDirCacheReadDir cache_file \"%s\"\n", cache_file); + + f = fopen ((char *) cache_file, "r"); + if (!f) + { + if (FcDebug () & FC_DBG_CACHE) + printf (" no cache file\n"); + goto bail1; + } + + if (!FcDirCacheValid (dir)) + { + if (FcDebug () & FC_DBG_CACHE) + printf (" cache file older than directory\n"); + goto bail2; + } + + base = (FcChar8 *) strrchr ((char *) cache_file, '/'); + if (!base) + goto bail2; + base++; + dir_len = base - cache_file; + + file = 0; + name = 0; + while ((file = FcCacheReadString (f, file_buf, sizeof (file_buf))) && + FcCacheReadInt (f, &id) && + (name = FcCacheReadString (f, name_buf, sizeof (name_buf)))) + { + if (!FcCacheFontSetAdd (set, dirs, cache_file, dir_len, + file, name)) + goto bail3; + if (file != file_buf) + free (file); + if (name != name_buf) + free (name); + file = name = 0; + } + if (FcDebug () & FC_DBG_CACHE) + printf (" cache loaded\n"); + + ret = FcTrue; +bail3: + if (file && file != file_buf) + free (file); + if (name && name != name_buf) + free (name); +bail2: + fclose (f); +bail1: + FcStrFree (cache_file); +bail0: + return ret; +} + +/* + * return the path from the directory containing 'cache' to 'file' + */ + +static const FcChar8 * +FcFileBaseName (const FcChar8 *cache, const FcChar8 *file) +{ + const FcChar8 *cache_slash; + + cache_slash = (const FcChar8 *) strrchr ((const char *) cache, '/'); + if (cache_slash && !strncmp ((const char *) cache, (const char *) file, + (cache_slash + 1) - cache)) + return file + ((cache_slash + 1) - cache); + return file; +} + +FcBool +FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir) +{ + FcChar8 *cache_file = FcStrPlus (dir, (FcChar8 *) "/" FC_DIR_CACHE_FILE); + FcPattern *font; + FILE *f; + FcChar8 *name; + const FcChar8 *file, *base; + int n; + int id; + FcBool ret; + FcStrList *list; + + if (!cache_file) + goto bail0; + if (FcDebug () & FC_DBG_CACHE) + printf ("FcDirCacheWriteDir cache_file \"%s\"\n", cache_file); + + f = fopen ((char *) cache_file, "w"); + if (!f) + { + if (FcDebug () & FC_DBG_CACHE) + printf (" can't create \"%s\"\n", cache_file); + goto bail1; + } + + list = FcStrListCreate (dirs); + if (!list) + goto bail2; + + while ((dir = FcStrListNext (list))) + { + base = FcFileBaseName (cache_file, dir); + if (!FcCacheWriteString (f, base)) + goto bail3; + if (PUTC (' ', f) == EOF) + goto bail3; + if (!FcCacheWriteInt (f, 0)) + goto bail3; + if (PUTC (' ', f) == EOF) + goto bail3; + if (!FcCacheWriteString (f, FC_FONT_FILE_DIR)) + goto bail3; + if (PUTC ('\n', f) == EOF) + goto bail3; + } + + for (n = 0; n < set->nfont; n++) + { + font = set->fonts[n]; + if (FcPatternGetString (font, FC_FILE, 0, (FcChar8 **) &file) != FcResultMatch) + goto bail3; + base = FcFileBaseName (cache_file, file); + if (FcPatternGetInteger (font, FC_INDEX, 0, &id) != FcResultMatch) + goto bail3; + if (FcDebug () & FC_DBG_CACHEV) + printf (" write file \"%s\"\n", base); + if (!FcCacheWriteString (f, base)) + goto bail3; + if (PUTC (' ', f) == EOF) + goto bail3; + if (!FcCacheWriteInt (f, id)) + goto bail3; + if (PUTC (' ', f) == EOF) + goto bail3; + name = FcNameUnparse (font); + if (!name) + goto bail3; + ret = FcCacheWriteString (f, name); + FcStrFree (name); + if (!ret) + goto bail3; + if (PUTC ('\n', f) == EOF) + goto bail3; + } + + FcStrListDone (list); + + if (fclose (f) == EOF) + goto bail1; + + FcStrFree (cache_file); + + if (FcDebug () & FC_DBG_CACHE) + printf (" cache written\n"); + return FcTrue; + +bail3: + FcStrListDone (list); +bail2: + fclose (f); +bail1: + unlink ((char *) cache_file); + FcStrFree (cache_file); +bail0: + return FcFalse; +} Index: xc/lib/fontconfig/src/fccfg.c diff -u /dev/null xc/lib/fontconfig/src/fccfg.c:1.24 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/src/fccfg.c Fri Dec 20 21:31:53 2002 @@ -0,0 +1,1502 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.24 2002/12/21 02:31:53 dawes 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 "fcint.h" + +FcConfig *_fcConfig; + +FcConfig * +FcConfigCreate (void) +{ + FcSetName set; + FcConfig *config; + + config = malloc (sizeof (FcConfig)); + if (!config) + goto bail0; + FcMemAlloc (FC_MEM_CONFIG, sizeof (FcConfig)); + + config->configDirs = FcStrSetCreate (); + if (!config->configDirs) + goto bail1; + + config->configFiles = FcStrSetCreate (); + if (!config->configFiles) + goto bail2; + + config->fontDirs = FcStrSetCreate (); + if (!config->fontDirs) + goto bail3; + + config->cache = 0; + if (!FcConfigSetCache (config, (FcChar8 *) ("~/" FC_USER_CACHE_FILE))) + goto bail4; + + config->blanks = 0; + + config->substPattern = 0; + config->substFont = 0; + config->maxObjects = 0; + for (set = FcSetSystem; set <= FcSetApplication; set++) + config->fonts[set] = 0; + + config->rescanTime = time(0); + config->rescanInterval = 30; + + return config; + +bail4: + FcStrSetDestroy (config->fontDirs); +bail3: + FcStrSetDestroy (config->configFiles); +bail2: + FcStrSetDestroy (config->configDirs); +bail1: + free (config); + FcMemFree (FC_MEM_CONFIG, sizeof (FcConfig)); +bail0: + return 0; +} + +typedef struct _FcFileTime { + time_t time; + FcBool set; +} FcFileTime; + +static FcFileTime +FcConfigNewestFile (FcStrSet *files) +{ + FcStrList *list = FcStrListCreate (files); + FcFileTime newest = { 0, FcFalse }; + FcChar8 *file; + struct stat statb; + + if (list) + { + while ((file = FcStrListNext (list))) + if (stat ((char *) file, &statb) == 0) + if (!newest.set || statb.st_mtime - newest.time > 0) + newest.time = statb.st_mtime; + FcStrListDone (list); + } + return newest; +} + +FcBool +FcConfigUptoDate (FcConfig *config) +{ + FcFileTime config_time, font_time; + time_t now = time(0); + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return FcFalse; + } + config_time = FcConfigNewestFile (config->configFiles); + font_time = FcConfigNewestFile (config->configDirs); + if ((config_time.set && config_time.time - config->rescanTime > 0) || + (font_time.set && font_time.time - config->rescanTime) > 0) + { + return FcFalse; + } + config->rescanTime = now; + return FcTrue; +} + +static void +FcSubstDestroy (FcSubst *s) +{ + FcSubst *n; + + while (s) + { + n = s->next; + FcTestDestroy (s->test); + FcEditDestroy (s->edit); + s = n; + } +} + +void +FcConfigDestroy (FcConfig *config) +{ + FcSetName set; + + if (config == _fcConfig) + _fcConfig = 0; + + FcStrSetDestroy (config->configDirs); + FcStrSetDestroy (config->fontDirs); + FcStrSetDestroy (config->configFiles); + + FcStrFree (config->cache); + + FcSubstDestroy (config->substPattern); + FcSubstDestroy (config->substFont); + for (set = FcSetSystem; set <= FcSetApplication; set++) + if (config->fonts[set]) + FcFontSetDestroy (config->fonts[set]); + free (config); + FcMemFree (FC_MEM_CONFIG, sizeof (FcConfig)); +} + +/* + * Scan the current list of directories in the configuration + * and build the set of available fonts. Update the + * per-user cache file to reflect the new configuration + */ + +FcBool +FcConfigBuildFonts (FcConfig *config) +{ + FcFontSet *fonts; + FcGlobalCache *cache; + FcStrList *list; + FcChar8 *dir; + + fonts = FcFontSetCreate (); + if (!fonts) + goto bail0; + + cache = FcGlobalCacheCreate (); + if (!cache) + goto bail1; + + FcGlobalCacheLoad (cache, config->cache); + + list = FcConfigGetFontDirs (config); + if (!list) + goto bail1; + + while ((dir = FcStrListNext (list))) + { + if (FcDebug () & FC_DBG_FONTSET) + printf ("scan dir %s\n", dir); + FcDirScan (fonts, config->fontDirs, cache, config->blanks, dir, FcFalse); + } + + FcStrListDone (list); + + if (FcDebug () & FC_DBG_FONTSET) + FcFontSetPrint (fonts); + + FcGlobalCacheSave (cache, config->cache); + FcGlobalCacheDestroy (cache); + + FcConfigSetFonts (config, fonts, FcSetSystem); + + return FcTrue; +bail1: + FcFontSetDestroy (fonts); +bail0: + return FcFalse; +} + +FcBool +FcConfigSetCurrent (FcConfig *config) +{ + if (!config->fonts) + if (!FcConfigBuildFonts (config)) + return FcFalse; + + if (_fcConfig) + FcConfigDestroy (_fcConfig); + _fcConfig = config; + return FcTrue; +} + +FcConfig * +FcConfigGetCurrent (void) +{ + if (!_fcConfig) + if (!FcInit ()) + return 0; + return _fcConfig; +} + +FcBool +FcConfigAddConfigDir (FcConfig *config, + const FcChar8 *d) +{ + return FcStrSetAddFilename (config->configDirs, d); +} + +FcStrList * +FcConfigGetConfigDirs (FcConfig *config) +{ + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + return FcStrListCreate (config->configDirs); +} + +FcBool +FcConfigAddFontDir (FcConfig *config, + const FcChar8 *d) +{ + return FcStrSetAddFilename (config->fontDirs, d); +} + +FcBool +FcConfigAddDir (FcConfig *config, + const FcChar8 *d) +{ + return (FcConfigAddConfigDir (config, d) && + FcConfigAddFontDir (config, d)); +} + +FcStrList * +FcConfigGetFontDirs (FcConfig *config) +{ + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + return FcStrListCreate (config->fontDirs); +} + +FcBool +FcConfigAddConfigFile (FcConfig *config, + const FcChar8 *f) +{ + FcBool ret; + FcChar8 *file = FcConfigFilename (f); + + if (!file) + return FcFalse; + + ret = FcStrSetAdd (config->configFiles, file); + FcStrFree (file); + return ret; +} + +FcStrList * +FcConfigGetConfigFiles (FcConfig *config) +{ + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + return FcStrListCreate (config->configFiles); +} + +FcBool +FcConfigSetCache (FcConfig *config, + const FcChar8 *c) +{ + FcChar8 *new = FcStrCopyFilename (c); + + if (!new) + return FcFalse; + if (config->cache) + FcStrFree (config->cache); + config->cache = new; + return FcTrue; +} + +FcChar8 * +FcConfigGetCache (FcConfig *config) +{ + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + return config->cache; +} + +FcFontSet * +FcConfigGetFonts (FcConfig *config, + FcSetName set) +{ + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + return config->fonts[set]; +} + +void +FcConfigSetFonts (FcConfig *config, + FcFontSet *fonts, + FcSetName set) +{ + if (config->fonts[set]) + FcFontSetDestroy (config->fonts[set]); + config->fonts[set] = fonts; +} + + + +FcBlanks * +FcConfigGetBlanks (FcConfig *config) +{ + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + return config->blanks; +} + +FcBool +FcConfigAddBlank (FcConfig *config, + FcChar32 blank) +{ + FcBlanks *b; + + b = config->blanks; + if (!b) + { + b = FcBlanksCreate (); + if (!b) + return FcFalse; + } + if (!FcBlanksAdd (b, blank)) + return FcFalse; + config->blanks = b; + return FcTrue; +} + +int +FcConfigGetRescanInverval (FcConfig *config) +{ + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + return config->rescanInterval; +} + +FcBool +FcConfigSetRescanInverval (FcConfig *config, int rescanInterval) +{ + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return FcFalse; + } + config->rescanInterval = rescanInterval; + return FcTrue; +} + +FcBool +FcConfigAddEdit (FcConfig *config, + FcTest *test, + FcEdit *edit, + FcMatchKind kind) +{ + FcSubst *subst, **prev; + FcTest *t; + int num; + + subst = (FcSubst *) malloc (sizeof (FcSubst)); + if (!subst) + return FcFalse; + FcMemAlloc (FC_MEM_SUBST, sizeof (FcSubst)); + if (kind == FcMatchPattern) + prev = &config->substPattern; + else + prev = &config->substFont; + for (; *prev; prev = &(*prev)->next); + *prev = subst; + subst->next = 0; + subst->test = test; + subst->edit = edit; + num = 0; + for (t = test; t; t = t->next) + { + if (t->kind == FcMatchDefault) + t->kind = kind; + num++; + } + if (config->maxObjects < num) + config->maxObjects = num; + if (FcDebug () & FC_DBG_EDIT) + { + printf ("Add Subst "); + FcSubstPrint (subst); + } + return FcTrue; +} + +typedef struct _FcSubState { + FcPatternElt *elt; + FcValueList *value; +} FcSubState; + +static FcValue +FcConfigPromote (FcValue v, FcValue u) +{ + if (v.type == FcTypeInteger) + { + v.type = FcTypeDouble; + v.u.d = (double) v.u.i; + } + else if (v.type == FcTypeVoid && u.type == FcTypeMatrix) + { + v.u.m = &FcIdentityMatrix; + v.type = FcTypeMatrix; + } + else if (v.type == FcTypeString && u.type == FcTypeLangSet) + { + v.u.l = FcLangSetPromote (v.u.s); + v.type = FcTypeLangSet; + } + return v; +} + +FcBool +FcConfigCompareValue (FcValue m, + FcOp op, + FcValue v) +{ + FcBool ret = FcFalse; + + m = FcConfigPromote (m, v); + v = FcConfigPromote (v, m); + if (m.type == v.type) + { + switch (m.type) { + case FcTypeInteger: + break; /* FcConfigPromote prevents this from happening */ + case FcTypeDouble: + switch (op) { + case FcOpEqual: + case FcOpContains: + ret = m.u.d == v.u.d; + break; + case FcOpNotEqual: + case FcOpNotContains: + ret = m.u.d != v.u.d; + break; + case FcOpLess: + ret = m.u.d < v.u.d; + break; + case FcOpLessEqual: + ret = m.u.d <= v.u.d; + break; + case FcOpMore: + ret = m.u.d > v.u.d; + break; + case FcOpMoreEqual: + ret = m.u.d >= v.u.d; + break; + default: + break; + } + break; + case FcTypeBool: + switch (op) { + case FcOpEqual: + case FcOpContains: + ret = m.u.b == v.u.b; + break; + case FcOpNotEqual: + case FcOpNotContains: + ret = m.u.b != v.u.b; + break; + default: + break; + } + break; + case FcTypeString: + switch (op) { + case FcOpEqual: + case FcOpContains: + ret = FcStrCmpIgnoreCase (m.u.s, v.u.s) == 0; + break; + case FcOpNotEqual: + case FcOpNotContains: + ret = FcStrCmpIgnoreCase (m.u.s, v.u.s) != 0; + break; + default: + break; + } + break; + case FcTypeMatrix: + switch (op) { + case FcOpEqual: + case FcOpContains: + ret = FcMatrixEqual (m.u.m, v.u.m); + break; + case FcOpNotEqual: + case FcOpNotContains: + ret = !FcMatrixEqual (m.u.m, v.u.m); + break; + default: + break; + } + break; + case FcTypeCharSet: + switch (op) { + case FcOpContains: + /* m contains v if v is a subset of m */ + ret = FcCharSetIsSubset (v.u.c, m.u.c); + break; + case FcOpNotContains: + /* m contains v if v is a subset of m */ + ret = !FcCharSetIsSubset (v.u.c, m.u.c); + break; + case FcOpEqual: + ret = FcCharSetEqual (m.u.c, v.u.c); + break; + case FcOpNotEqual: + ret = !FcCharSetEqual (m.u.c, v.u.c); + break; + default: + break; + } + break; + case FcTypeLangSet: + switch (op) { + case FcOpContains: + ret = FcLangSetCompare (v.u.l, m.u.l) != FcLangDifferentLang; + break; + case FcOpNotContains: + ret = FcLangSetCompare (v.u.l, m.u.l) == FcLangDifferentLang; + break; + case FcOpEqual: + ret = FcLangSetEqual (v.u.l, m.u.l); + break; + case FcOpNotEqual: + ret = !FcLangSetEqual (v.u.l, m.u.l); + break; + default: + break; + } + break; + case FcTypeVoid: + switch (op) { + case FcOpEqual: + case FcOpContains: + ret = FcTrue; + break; + default: + break; + } + break; + case FcTypeFTFace: + switch (op) { + case FcOpEqual: + case FcOpContains: + ret = m.u.f == v.u.f; + break; + case FcOpNotEqual: + case FcOpNotContains: + ret = m.u.f != v.u.f; + break; + default: + break; + } + break; + } + } + else + { + if (op == FcOpNotEqual || op == FcOpNotContains) + ret = FcTrue; + } + return ret; +} + + +static FcValue +FcConfigEvaluate (FcPattern *p, FcExpr *e) +{ + FcValue v, vl, vr; + FcResult r; + FcMatrix *m; + + switch (e->op) { + case FcOpInteger: + v.type = FcTypeInteger; + v.u.i = e->u.ival; + break; + case FcOpDouble: + v.type = FcTypeDouble; + v.u.d = e->u.dval; + break; + case FcOpString: + v.type = FcTypeString; + v.u.s = e->u.sval; + v = FcValueSave (v); + break; + case FcOpMatrix: + v.type = FcTypeMatrix; + v.u.m = e->u.mval; + v = FcValueSave (v); + break; + case FcOpCharSet: + v.type = FcTypeCharSet; + v.u.c = e->u.cval; + v = FcValueSave (v); + break; + case FcOpBool: + v.type = FcTypeBool; + v.u.b = e->u.bval; + break; + case FcOpField: + r = FcPatternGet (p, e->u.field, 0, &v); + if (r != FcResultMatch) + v.type = FcTypeVoid; + break; + case FcOpConst: + if (FcNameConstant (e->u.constant, &v.u.i)) + v.type = FcTypeInteger; + else + v.type = FcTypeVoid; + break; + case FcOpQuest: + vl = FcConfigEvaluate (p, e->u.tree.left); + if (vl.type == FcTypeBool) + { + if (vl.u.b) + v = FcConfigEvaluate (p, e->u.tree.right->u.tree.left); + else + v = FcConfigEvaluate (p, e->u.tree.right->u.tree.right); + } + else + v.type = FcTypeVoid; + FcValueDestroy (vl); + break; + case FcOpEqual: + case FcOpNotEqual: + case FcOpLess: + case FcOpLessEqual: + case FcOpMore: + case FcOpMoreEqual: + case FcOpContains: + case FcOpNotContains: + vl = FcConfigEvaluate (p, e->u.tree.left); + vr = FcConfigEvaluate (p, e->u.tree.right); + v.type = FcTypeBool; + v.u.b = FcConfigCompareValue (vl, e->op, vr); + FcValueDestroy (vl); + FcValueDestroy (vr); + break; + case FcOpOr: + case FcOpAnd: + case FcOpPlus: + case FcOpMinus: + case FcOpTimes: + case FcOpDivide: + vl = FcConfigEvaluate (p, e->u.tree.left); + vr = FcConfigEvaluate (p, e->u.tree.right); + vl = FcConfigPromote (vl, vr); + vr = FcConfigPromote (vr, vl); + if (vl.type == vr.type) + { + switch (vl.type) { + case FcTypeDouble: + switch (e->op) { + case FcOpPlus: + v.type = FcTypeDouble; + v.u.d = vl.u.d + vr.u.d; + break; + case FcOpMinus: + v.type = FcTypeDouble; + v.u.d = vl.u.d - vr.u.d; + break; + case FcOpTimes: + v.type = FcTypeDouble; + v.u.d = vl.u.d * vr.u.d; + break; + case FcOpDivide: + v.type = FcTypeDouble; + v.u.d = vl.u.d / vr.u.d; + break; + default: + v.type = FcTypeVoid; + break; + } + if (v.type == FcTypeDouble && + v.u.d == (double) (int) v.u.d) + { + v.type = FcTypeInteger; + v.u.i = (int) v.u.d; + } + break; + case FcTypeBool: + switch (e->op) { + case FcOpOr: + v.type = FcTypeBool; + v.u.b = vl.u.b || vr.u.b; + break; + case FcOpAnd: + v.type = FcTypeBool; + v.u.b = vl.u.b && vr.u.b; + break; + default: + v.type = FcTypeVoid; + break; + } + break; + case FcTypeString: + switch (e->op) { + case FcOpPlus: + v.type = FcTypeString; + v.u.s = FcStrPlus (vl.u.s, vr.u.s); + if (!v.u.s) + v.type = FcTypeVoid; + break; + default: + v.type = FcTypeVoid; + break; + } + break; + case FcTypeMatrix: + switch (e->op) { + case FcOpTimes: + v.type = FcTypeMatrix; + m = malloc (sizeof (FcMatrix)); + if (m) + { + FcMemAlloc (FC_MEM_MATRIX, sizeof (FcMatrix)); + FcMatrixMultiply (m, vl.u.m, vr.u.m); + v.u.m = m; + } + else + { + v.type = FcTypeVoid; + } + break; + default: + v.type = FcTypeVoid; + break; + } + break; + default: + v.type = FcTypeVoid; + break; + } + } + else + v.type = FcTypeVoid; + FcValueDestroy (vl); + FcValueDestroy (vr); + break; + case FcOpNot: + vl = FcConfigEvaluate (p, e->u.tree.left); + switch (vl.type) { + case FcTypeBool: + v.type = FcTypeBool; + v.u.b = !vl.u.b; + break; + default: + v.type = FcTypeVoid; + break; + } + FcValueDestroy (vl); + break; + default: + v.type = FcTypeVoid; + break; + } + return v; +} + +static FcValueList * +FcConfigMatchValueList (FcPattern *p, + FcTest *t, + FcValueList *values) +{ + FcValueList *ret = 0; + FcExpr *e = t->expr; + FcValue value; + FcValueList *v; + + while (e) + { + if (e->op == FcOpComma) + { + value = FcConfigEvaluate (p, e->u.tree.left); + e = e->u.tree.right; + } + else + { + value = FcConfigEvaluate (p, e); + e = 0; + } + + for (v = values; v; v = v->next) + { + if (FcConfigCompareValue (v->value, t->op, value)) + { + if (!ret) + ret = v; + } + else + { + if (t->qual == FcQualAll) + { + ret = 0; + break; + } + } + } + FcValueDestroy (value); + } + return ret; +} + +static FcValueList * +FcConfigValues (FcPattern *p, FcExpr *e, FcValueBinding binding) +{ + FcValueList *l; + + if (!e) + return 0; + l = (FcValueList *) malloc (sizeof (FcValueList)); + if (!l) + return 0; + FcMemAlloc (FC_MEM_VALLIST, sizeof (FcValueList)); + if (e->op == FcOpComma) + { + l->value = FcConfigEvaluate (p, e->u.tree.left); + l->next = FcConfigValues (p, e->u.tree.right, binding); + } + else + { + l->value = FcConfigEvaluate (p, e); + l->next = 0; + } + l->binding = binding; + while (l && l->value.type == FcTypeVoid) + { + FcValueList *next = l->next; + + FcMemFree (FC_MEM_VALLIST, sizeof (FcValueList)); + free (l); + l = next; + } + return l; +} + +static FcBool +FcConfigAdd (FcValueList **head, + FcValueList *position, + FcBool append, + FcValueList *new) +{ + FcValueList **prev, *last; + + if (append) + { + if (position) + prev = &position->next; + else + for (prev = head; *prev; prev = &(*prev)->next) + ; + } + else + { + if (position) + { + for (prev = head; *prev; prev = &(*prev)->next) + { + if (*prev == position) + break; + } + } + else + prev = head; + + if (FcDebug () & FC_DBG_EDIT) + { + if (!*prev) + printf ("position not on list\n"); + } + } + + if (FcDebug () & FC_DBG_EDIT) + { + printf ("%s list before ", append ? "Append" : "Prepend"); + FcValueListPrint (*head); + printf ("\n"); + } + + if (new) + { + last = new; + while (last->next) + last = last->next; + + last->next = *prev; + *prev = new; + } + + if (FcDebug () & FC_DBG_EDIT) + { + printf ("%s list after ", append ? "Append" : "Prepend"); + FcValueListPrint (*head); + printf ("\n"); + } + + return FcTrue; +} + +static void +FcConfigDel (FcValueList **head, + FcValueList *position) +{ + FcValueList **prev; + + for (prev = head; *prev; prev = &(*prev)->next) + { + if (*prev == position) + { + *prev = position->next; + position->next = 0; + FcValueListDestroy (position); + break; + } + } +} + +static void +FcConfigPatternAdd (FcPattern *p, + const char *object, + FcValueList *list, + FcBool append) +{ + if (list) + { + FcPatternElt *e = FcPatternInsertElt (p, object); + + if (!e) + return; + FcConfigAdd (&e->values, 0, append, list); + } +} + +/* + * Delete all values associated with a field + */ +static void +FcConfigPatternDel (FcPattern *p, + const char *object) +{ + FcPatternElt *e = FcPatternFindElt (p, object); + if (!e) + return; + while (e->values) + FcConfigDel (&e->values, e->values); +} + +static void +FcConfigPatternCanon (FcPattern *p, + const char *object) +{ + FcPatternElt *e = FcPatternFindElt (p, object); + if (!e) + return; + if (!e->values) + FcPatternDel (p, object); +} + +FcBool +FcConfigSubstituteWithPat (FcConfig *config, + FcPattern *p, + FcPattern *p_pat, + FcMatchKind kind) +{ + FcSubst *s; + FcSubState *st; + int i; + FcTest *t; + FcEdit *e; + FcValueList *l; + FcPattern *m; + + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return FcFalse; + } + + st = (FcSubState *) malloc (config->maxObjects * sizeof (FcSubState)); + if (!st && config->maxObjects) + return FcFalse; + FcMemAlloc (FC_MEM_SUBSTATE, config->maxObjects * sizeof (FcSubState)); + + if (FcDebug () & FC_DBG_EDIT) + { + printf ("FcConfigSubstitute "); + FcPatternPrint (p); + } + if (kind == FcMatchPattern) + s = config->substPattern; + else + s = config->substFont; + for (; s; s = s->next) + { + /* + * Check the tests to see if + * they all match the pattern + */ + for (t = s->test, i = 0; t; t = t->next, i++) + { + if (FcDebug () & FC_DBG_EDIT) + { + printf ("FcConfigSubstitute test "); + FcTestPrint (t); + } + st[i].elt = 0; + if (kind == FcMatchFont && t->kind == FcMatchPattern) + m = p_pat; + else + m = p; + if (m) + st[i].elt = FcPatternFindElt (m, t->field); + else + st[i].elt = 0; + /* + * If there's no such field in the font, + * then FcQualAll matches while FcQualAny does not + */ + if (!st[i].elt) + { + if (t->qual == FcQualAll) + { + st[i].value = 0; + continue; + } + else + break; + } + /* + * Check to see if there is a match, mark the location + * to apply match-relative edits + */ + st[i].value = FcConfigMatchValueList (m, t, st[i].elt->values); + if (!st[i].value) + break; + if (t->qual == FcQualFirst && st[i].value != st[i].elt->values) + break; + if (t->qual == FcQualNotFirst && st[i].value == st[i].elt->values) + break; + } + if (t) + { + if (FcDebug () & FC_DBG_EDIT) + printf ("No match\n"); + continue; + } + if (FcDebug () & FC_DBG_EDIT) + { + printf ("Substitute "); + FcSubstPrint (s); + } + for (e = s->edit; e; e = e->next) + { + /* + * Evaluate the list of expressions + */ + l = FcConfigValues (p, e->expr, e->binding); + /* + * Locate any test associated with this field, skipping + * tests associated with the pattern when substituting in + * the font + */ + for (t = s->test, i = 0; t; t = t->next, i++) + { + if ((t->kind == FcMatchFont || kind == FcMatchPattern) && + !FcStrCmpIgnoreCase ((FcChar8 *) t->field, + (FcChar8 *) e->field)) + { + if (!st[i].elt) + t = 0; + break; + } + } + switch (e->op) { + case FcOpAssign: + /* + * If there was a test, then replace the matched + * value with the new list of values + */ + if (t) + { + FcValueList *thisValue = st[i].value; + FcValueList *nextValue = thisValue ? thisValue->next : 0; + + /* + * Append the new list of values after the current value + */ + FcConfigAdd (&st[i].elt->values, thisValue, FcTrue, l); + /* + * Delete the marked value + */ + FcConfigDel (&st[i].elt->values, thisValue); + /* + * Adjust any pointers into the value list to ensure + * future edits occur at the same place + */ + for (t = s->test, i = 0; t; t = t->next, i++) + { + if (st[i].value == thisValue) + st[i].value = nextValue; + } + break; + } + /* fall through ... */ + case FcOpAssignReplace: + /* + * Delete all of the values and insert + * the new set + */ + FcConfigPatternDel (p, e->field); + FcConfigPatternAdd (p, e->field, l, FcTrue); + /* + * Adjust any pointers into the value list as they no + * longer point to anything valid + */ + if (t) + { + FcPatternElt *thisElt = st[i].elt; + for (t = s->test, i = 0; t; t = t->next, i++) + { + if (st[i].elt == thisElt) + st[i].value = 0; + } + } + break; + case FcOpPrepend: + if (t) + { + FcConfigAdd (&st[i].elt->values, st[i].value, FcFalse, l); + break; + } + /* fall through ... */ + case FcOpPrependFirst: + FcConfigPatternAdd (p, e->field, l, FcFalse); + break; + case FcOpAppend: + if (t) + { + FcConfigAdd (&st[i].elt->values, st[i].value, FcTrue, l); + break; + } + /* fall through ... */ + case FcOpAppendLast: + FcConfigPatternAdd (p, e->field, l, FcTrue); + break; + default: + break; + } + } + /* + * Now go through the pattern and eliminate + * any properties without data + */ + for (e = s->edit; e; e = e->next) + FcConfigPatternCanon (p, e->field); + + if (FcDebug () & FC_DBG_EDIT) + { + printf ("FcConfigSubstitute edit"); + FcPatternPrint (p); + } + } + FcMemFree (FC_MEM_SUBSTATE, config->maxObjects * sizeof (FcSubState)); + free (st); + if (FcDebug () & FC_DBG_EDIT) + { + printf ("FcConfigSubstitute done"); + FcPatternPrint (p); + } + return FcTrue; +} + +FcBool +FcConfigSubstitute (FcConfig *config, + FcPattern *p, + FcMatchKind kind) +{ + return FcConfigSubstituteWithPat (config, p, 0, kind); +} + +#ifndef FONTCONFIG_PATH +#define FONTCONFIG_PATH "/etc/fonts" +#endif + +#ifndef FONTCONFIG_FILE +#define FONTCONFIG_FILE "fonts.conf" +#endif + +static FcChar8 * +FcConfigFileExists (const FcChar8 *dir, const FcChar8 *file) +{ + FcChar8 *path; + + if (!dir) + dir = (FcChar8 *) ""; + path = malloc (strlen ((char *) dir) + 1 + strlen ((char *) file) + 1); + if (!path) + return 0; + + strcpy ((char *) path, (const char *) dir); + /* make sure there's a single separating / */ + if ((!path[0] || path[strlen((char *) path)-1] != '/') && file[0] != '/') + strcat ((char *) path, "/"); + strcat ((char *) path, (char *) file); + + FcMemAlloc (FC_MEM_STRING, strlen ((char *) path) + 1); + if (access ((char *) path, R_OK) == 0) + return path; + + FcStrFree (path); + return 0; +} + +static FcChar8 ** +FcConfigGetPath (void) +{ + FcChar8 **path; + FcChar8 *env, *e, *colon; + FcChar8 *dir; + int npath; + int i; + + npath = 2; /* default dir + null */ + env = (FcChar8 *) getenv ("FONTCONFIG_PATH"); + if (env) + { + e = env; + npath++; + while (*e) + if (*e++ == ':') + npath++; + } + path = calloc (npath, sizeof (FcChar8 *)); + if (!path) + goto bail0; + i = 0; + + if (env) + { + e = env; + while (*e) + { + colon = (FcChar8 *) strchr ((char *) e, ':'); + if (!colon) + colon = e + strlen ((char *) e); + path[i] = malloc (colon - e + 1); + if (!path[i]) + goto bail1; + strncpy ((char *) path[i], (const char *) e, colon - e); + path[i][colon - e] = '\0'; + if (*colon) + e = colon + 1; + else + e = colon; + i++; + } + } + + dir = (FcChar8 *) FONTCONFIG_PATH; + path[i] = malloc (strlen ((char *) dir) + 1); + if (!path[i]) + goto bail1; + strcpy ((char *) path[i], (const char *) dir); + return path; + +bail1: + for (i = 0; path[i]; i++) + free (path[i]); + free (path); +bail0: + return 0; +} + +static void +FcConfigFreePath (FcChar8 **path) +{ + FcChar8 **p; + + for (p = path; *p; p++) + free (*p); + free (path); +} + +FcChar8 * +FcConfigFilename (const FcChar8 *url) +{ + FcChar8 *file, *dir, **path, **p; + + if (!url || !*url) + { + url = (FcChar8 *) getenv ("FONTCONFIG_FILE"); + if (!url) + url = (FcChar8 *) FONTCONFIG_FILE; + } + file = 0; + switch (*url) { + case '~': + dir = (FcChar8 *) getenv ("HOME"); + if (dir) + file = FcConfigFileExists (dir, url + 1); + else + file = 0; + break; + case '/': + file = FcConfigFileExists (0, url); + break; + default: + path = FcConfigGetPath (); + if (!path) + return 0; + for (p = path; *p; p++) + { + file = FcConfigFileExists (*p, url); + if (file) + break; + } + FcConfigFreePath (path); + break; + } + return file; +} + +/* + * Manage the application-specific fonts + */ + +FcBool +FcConfigAppFontAddFile (FcConfig *config, + const FcChar8 *file) +{ + FcFontSet *set; + FcStrSet *subdirs; + FcStrList *sublist; + FcChar8 *subdir; + + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return FcFalse; + } + + subdirs = FcStrSetCreate (); + if (!subdirs) + return FcFalse; + + set = FcConfigGetFonts (config, FcSetApplication); + if (!set) + { + set = FcFontSetCreate (); + if (!set) + { + FcStrSetDestroy (subdirs); + return FcFalse; + } + FcConfigSetFonts (config, set, FcSetApplication); + } + + if (!FcFileScan (set, subdirs, 0, config->blanks, file, FcFalse)) + { + FcStrSetDestroy (subdirs); + return FcFalse; + } + if ((sublist = FcStrListCreate (subdirs))) + { + while ((subdir = FcStrListNext (sublist))) + { + FcConfigAppFontAddDir (config, subdir); + } + FcStrListDone (sublist); + } + return FcTrue; +} + +FcBool +FcConfigAppFontAddDir (FcConfig *config, + const FcChar8 *dir) +{ + FcFontSet *set; + FcStrSet *subdirs; + FcStrList *sublist; + FcChar8 *subdir; + + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return FcFalse; + } + subdirs = FcStrSetCreate (); + if (!subdirs) + return FcFalse; + + set = FcConfigGetFonts (config, FcSetApplication); + if (!set) + { + set = FcFontSetCreate (); + if (!set) + { + FcStrSetDestroy (subdirs); + return FcFalse; + } + FcConfigSetFonts (config, set, FcSetApplication); + } + + if (!FcDirScan (set, subdirs, 0, config->blanks, dir, FcFalse)) + { + FcStrSetDestroy (subdirs); + return FcFalse; + } + if ((sublist = FcStrListCreate (subdirs))) + { + while ((subdir = FcStrListNext (sublist))) + { + FcConfigAppFontAddDir (config, subdir); + } + FcStrListDone (sublist); + } + return FcTrue; +} + +void +FcConfigAppFontClear (FcConfig *config) +{ + FcConfigSetFonts (config, 0, FcSetApplication); +} Index: xc/lib/fontconfig/src/fccharset.c diff -u /dev/null xc/lib/fontconfig/src/fccharset.c:1.19 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/src/fccharset.c Sat Aug 31 18:17:32 2002 @@ -0,0 +1,1929 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fccharset.c,v 1.19 2002/08/31 22:17:32 keithp Exp $ + * + * Copyright © 2001 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 <stdlib.h> +#include "fcint.h" + +/* #define CHECK */ + +/* #define CHATTY */ + +FcCharSet * +FcCharSetCreate (void) +{ + FcCharSet *fcs; + + fcs = (FcCharSet *) malloc (sizeof (FcCharSet)); + if (!fcs) + return 0; + FcMemAlloc (FC_MEM_CHARSET, sizeof (FcCharSet)); + fcs->ref = 1; + fcs->num = 0; + fcs->leaves = 0; + fcs->numbers = 0; + return fcs; +} + +FcCharSet * +FcCharSetNew (void); + +FcCharSet * +FcCharSetNew (void) +{ + return FcCharSetCreate (); +} + + +void +FcCharSetDestroy (FcCharSet *fcs) +{ + int i; + if (fcs->ref == FC_REF_CONSTANT) + return; + if (--fcs->ref > 0) + return; + for (i = 0; i < fcs->num; i++) + { + FcMemFree (FC_MEM_CHARLEAF, sizeof (FcCharLeaf)); + free (fcs->leaves[i]); + } + if (fcs->leaves) + { + FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcCharLeaf *)); + free (fcs->leaves); + } + if (fcs->numbers) + { + FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcChar16)); + free (fcs->numbers); + } + FcMemFree (FC_MEM_CHARSET, sizeof (FcCharSet)); + free (fcs); +} + +/* + * Locate the leaf containing the specified char, return + * its index if it exists, otherwise return negative of + * the (position + 1) where it should be inserted + */ + +static int +FcCharSetFindLeafPos (const FcCharSet *fcs, FcChar32 ucs4) +{ + FcChar16 *numbers = fcs->numbers; + FcChar16 page; + int low = 0; + int high = fcs->num - 1; + + if (!numbers) + return -1; + ucs4 >>= 8; + while (low <= high) + { + int mid = (low + high) >> 1; + page = numbers[mid]; + if (page == ucs4) + return mid; + if (page < ucs4) + low = mid + 1; + else + high = mid - 1; + } + if (high < 0 || (high < fcs->num && numbers[high] < ucs4)) + high++; + return -(high + 1); +} + +static FcCharLeaf * +FcCharSetFindLeaf (const FcCharSet *fcs, FcChar32 ucs4) +{ + int pos = FcCharSetFindLeafPos (fcs, ucs4); + if (pos >= 0) + return fcs->leaves[pos]; + return 0; +} + +static FcBool +FcCharSetPutLeaf (FcCharSet *fcs, + FcChar32 ucs4, + FcCharLeaf *leaf, + int pos) +{ + FcCharLeaf **leaves; + FcChar16 *numbers; + + ucs4 >>= 8; + if (ucs4 >= 0x10000) + return FcFalse; + if (!fcs->leaves) + leaves = malloc (sizeof (FcCharLeaf *)); + else + leaves = realloc (fcs->leaves, (fcs->num + 1) * sizeof (FcCharLeaf *)); + if (!leaves) + return FcFalse; + if (fcs->num) + FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcCharLeaf *)); + FcMemAlloc (FC_MEM_CHARSET, (fcs->num + 1) * sizeof (FcCharLeaf *)); + fcs->leaves = leaves; + if (!fcs->numbers) + numbers = malloc (sizeof (FcChar16)); + else + numbers = realloc (fcs->numbers, (fcs->num + 1) * sizeof (FcChar16)); + if (!numbers) + return FcFalse; + if (fcs->num) + FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcChar16)); + FcMemAlloc (FC_MEM_CHARSET, (fcs->num + 1) * sizeof (FcChar16)); + fcs->numbers = numbers; + + memmove (fcs->leaves + pos + 1, fcs->leaves + pos, + (fcs->num - pos) * sizeof (FcCharLeaf *)); + memmove (fcs->numbers + pos + 1, fcs->numbers + pos, + (fcs->num - pos) * sizeof (FcChar16)); + fcs->numbers[pos] = (FcChar16) ucs4; + fcs->leaves[pos] = leaf; + fcs->num++; + return FcTrue; +} + +/* + * Locate the leaf containing the specified char, creating it + * if desired + */ + +static FcCharLeaf * +FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4) +{ + int pos; + FcCharLeaf *leaf; + + pos = FcCharSetFindLeafPos (fcs, ucs4); + if (pos >= 0) + return fcs->leaves[pos]; + + leaf = calloc (1, sizeof (FcCharLeaf)); + if (!leaf) + return 0; + + pos = -pos - 1; + if (!FcCharSetPutLeaf (fcs, ucs4, leaf, pos)) + { + free (leaf); + return 0; + } + FcMemAlloc (FC_MEM_CHARLEAF, sizeof (FcCharLeaf)); + return leaf; +} + +static FcBool +FcCharSetInsertLeaf (FcCharSet *fcs, FcChar32 ucs4, FcCharLeaf *leaf) +{ + int pos; + + pos = FcCharSetFindLeafPos (fcs, ucs4); + if (pos >= 0) + { + FcMemFree (FC_MEM_CHARLEAF, sizeof (FcCharLeaf)); + free (fcs->leaves[pos]); + fcs->leaves[pos] = leaf; + return FcTrue; + } + pos = -pos - 1; + return FcCharSetPutLeaf (fcs, ucs4, leaf, pos); +} + +FcBool +FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4) +{ + FcCharLeaf *leaf; + FcChar32 *b; + + if (fcs->ref == FC_REF_CONSTANT) + return FcFalse; + leaf = FcCharSetFindLeafCreate (fcs, ucs4); + if (!leaf) + return FcFalse; + b = &leaf->map[(ucs4 & 0xff) >> 5]; + *b |= (1 << (ucs4 & 0x1f)); + return FcTrue; +} + +/* + * An iterator for the leaves of a charset + */ + +typedef struct _fcCharSetIter { + FcCharLeaf *leaf; + FcChar32 ucs4; + int pos; +} FcCharSetIter; + +/* + * Set iter->leaf to the leaf containing iter->ucs4 or higher + */ + +static void +FcCharSetIterSet (const FcCharSet *fcs, FcCharSetIter *iter) +{ + int pos = FcCharSetFindLeafPos (fcs, iter->ucs4); + + if (pos < 0) + { + pos = -pos - 1; + if (pos == fcs->num) + { + iter->ucs4 = ~0; + iter->leaf = 0; + return; + } + iter->ucs4 = (FcChar32) fcs->numbers[pos] << 8; + } + iter->leaf = fcs->leaves[pos]; + iter->pos = pos; +#ifdef CHATTY + printf ("set %08x: %08x\n", iter->ucs4, (FcChar32) iter->leaf); +#endif +} + +static void +FcCharSetIterNext (const FcCharSet *fcs, FcCharSetIter *iter) +{ + int pos = iter->pos + 1; + if (pos >= fcs->num) + { + iter->ucs4 = ~0; + iter->leaf = 0; + } + else + { + iter->ucs4 = (FcChar32) fcs->numbers[pos] << 8; + iter->leaf = fcs->leaves[pos]; + iter->pos = pos; + } +} + +#ifdef CHATTY +static void +FcCharSetDump (const FcCharSet *fcs) +{ + int pos; + + printf ("fcs %08x:\n", (FcChar32) fcs); + for (pos = 0; pos < fcs->num; pos++) + { + FcCharLeaf *leaf = fcs->leaves[pos]; + FcChar32 ucs4 = (FcChar32) fcs->numbers[pos] << 8; + + printf (" %08x: %08x\n", ucs4, (FcChar32) leaf); + } +} +#endif + +static void +FcCharSetIterStart (const FcCharSet *fcs, FcCharSetIter *iter) +{ +#ifdef CHATTY + FcCharSetDump (fcs); +#endif + iter->ucs4 = 0; + FcCharSetIterSet (fcs, iter); +} + +FcCharSet * +FcCharSetCopy (FcCharSet *src) +{ + if (src->ref != FC_REF_CONSTANT) + src->ref++; + return src; +} + +FcBool +FcCharSetEqual (const FcCharSet *a, const FcCharSet *b) +{ + FcCharSetIter ai, bi; + int i; + + if (a == b) + return FcTrue; + for (FcCharSetIterStart (a, &ai), FcCharSetIterStart (b, &bi); + ai.leaf && bi.leaf; + FcCharSetIterNext (a, &ai), FcCharSetIterNext (b, &bi)) + { + if (ai.ucs4 != bi.ucs4) + return FcFalse; + for (i = 0; i < 256/32; i++) + if (ai.leaf->map[i] != bi.leaf->map[i]) + return FcFalse; + } + return ai.leaf == bi.leaf; +} + +static FcBool +FcCharSetAddLeaf (FcCharSet *fcs, + FcChar32 ucs4, + FcCharLeaf *leaf) +{ + FcCharLeaf *new = FcCharSetFindLeafCreate (fcs, ucs4); + if (!new) + return FcFalse; + *new = *leaf; + return FcTrue; +} + +static FcCharSet * +FcCharSetOperate (const FcCharSet *a, + const FcCharSet *b, + FcBool (*overlap) (FcCharLeaf *result, + const FcCharLeaf *al, + const FcCharLeaf *bl), + FcBool aonly, + FcBool bonly) +{ + FcCharSet *fcs; + FcCharSetIter ai, bi; + + fcs = FcCharSetCreate (); + if (!fcs) + goto bail0; + FcCharSetIterStart (a, &ai); + FcCharSetIterStart (b, &bi); + while ((ai.leaf || (bonly && bi.leaf)) && (bi.leaf || (aonly && ai.leaf))) + { + if (ai.ucs4 < bi.ucs4) + { + if (aonly) + { + if (!FcCharSetAddLeaf (fcs, ai.ucs4, ai.leaf)) + goto bail1; + FcCharSetIterNext (a, &ai); + } + else + { + ai.ucs4 = bi.ucs4; + FcCharSetIterSet (a, &ai); + } + } + else if (bi.ucs4 < ai.ucs4 ) + { + if (bonly) + { + if (!FcCharSetAddLeaf (fcs, bi.ucs4, bi.leaf)) + goto bail1; + FcCharSetIterNext (b, &bi); + } + else + { + bi.ucs4 = ai.ucs4; + FcCharSetIterSet (b, &bi); + } + } + else + { + FcCharLeaf leaf; + + if ((*overlap) (&leaf, ai.leaf, bi.leaf)) + { + if (!FcCharSetAddLeaf (fcs, ai.ucs4, &leaf)) + goto bail1; + } + FcCharSetIterNext (a, &ai); + FcCharSetIterNext (b, &bi); + } + } + return fcs; +bail1: + FcCharSetDestroy (fcs); +bail0: + return 0; +} + +static FcBool +FcCharSetIntersectLeaf (FcCharLeaf *result, + const FcCharLeaf *al, + const FcCharLeaf *bl) +{ + int i; + FcBool nonempty = FcFalse; + + for (i = 0; i < 256/32; i++) + if ((result->map[i] = al->map[i] & bl->map[i])) + nonempty = FcTrue; + return nonempty; +} + +FcCharSet * +FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b) +{ + return FcCharSetOperate (a, b, FcCharSetIntersectLeaf, FcFalse, FcFalse); +} + +static FcBool +FcCharSetUnionLeaf (FcCharLeaf *result, + const FcCharLeaf *al, + const FcCharLeaf *bl) +{ + int i; + + for (i = 0; i < 256/32; i++) + result->map[i] = al->map[i] | bl->map[i]; + return FcTrue; +} + +FcCharSet * +FcCharSetUnion (const FcCharSet *a, const FcCharSet *b) +{ + return FcCharSetOperate (a, b, FcCharSetUnionLeaf, FcTrue, FcTrue); +} + +static FcBool +FcCharSetSubtractLeaf (FcCharLeaf *result, + const FcCharLeaf *al, + const FcCharLeaf *bl) +{ + int i; + FcBool nonempty = FcFalse; + + for (i = 0; i < 256/32; i++) + if ((result->map[i] = al->map[i] & ~bl->map[i])) + nonempty = FcTrue; + return nonempty; +} + +FcCharSet * +FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b) +{ + return FcCharSetOperate (a, b, FcCharSetSubtractLeaf, FcTrue, FcFalse); +} + +FcBool +FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4) +{ + FcCharLeaf *leaf = FcCharSetFindLeaf (fcs, ucs4); + if (!leaf) + return FcFalse; + return (leaf->map[(ucs4 & 0xff) >> 5] & (1 << (ucs4 & 0x1f))) != 0; +} + +static FcChar32 +FcCharSetPopCount (FcChar32 c1) +{ + /* hackmem 169 */ + FcChar32 c2 = (c1 >> 1) & 033333333333; + c2 = c1 - c2 - ((c2 >> 1) & 033333333333); + return (((c2 + (c2 >> 3)) & 030707070707) % 077); +} + +FcChar32 +FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b) +{ + FcCharSetIter ai, bi; + FcChar32 count = 0; + + FcCharSetIterStart (a, &ai); + FcCharSetIterStart (b, &bi); + while (ai.leaf && bi.leaf) + { + if (ai.ucs4 == bi.ucs4) + { + FcChar32 *am = ai.leaf->map; + FcChar32 *bm = bi.leaf->map; + int i = 256/32; + while (i--) + count += FcCharSetPopCount (*am++ & *bm++); + FcCharSetIterNext (a, &ai); + } + else if (ai.ucs4 < bi.ucs4) + { + ai.ucs4 = bi.ucs4; + FcCharSetIterSet (a, &ai); + } + if (bi.ucs4 < ai.ucs4) + { + bi.ucs4 = ai.ucs4; + FcCharSetIterSet (b, &bi); + } + } + return count; +} + +FcChar32 +FcCharSetCount (const FcCharSet *a) +{ + FcCharSetIter ai; + FcChar32 count = 0; + + for (FcCharSetIterStart (a, &ai); ai.leaf; FcCharSetIterNext (a, &ai)) + { + int i = 256/32; + FcChar32 *am = ai.leaf->map; + + while (i--) + count += FcCharSetPopCount (*am++); + } + return count; +} + +FcChar32 +FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b) +{ + FcCharSetIter ai, bi; + FcChar32 count = 0; + + FcCharSetIterStart (a, &ai); + FcCharSetIterStart (b, &bi); + while (ai.leaf) + { + if (ai.ucs4 <= bi.ucs4) + { + FcChar32 *am = ai.leaf->map; + int i = 256/32; + if (ai.ucs4 == bi.ucs4) + { + FcChar32 *bm = bi.leaf->map;; + while (i--) + count += FcCharSetPopCount (*am++ & ~*bm++); + } + else + { + while (i--) + count += FcCharSetPopCount (*am++); + } + FcCharSetIterNext (a, &ai); + } + else if (bi.leaf) + { + bi.ucs4 = ai.ucs4; + FcCharSetIterSet (b, &bi); + } + } + return count; +} + +/* + * return FcTrue iff a is a subset of b + */ +FcBool +FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b) +{ + int ai, bi; + FcChar16 an, bn; + + if (a == b) return FcTrue; + bi = 0; + ai = 0; + while (ai < a->num && bi < b->num) + { + an = a->numbers[ai]; + bn = b->numbers[bi]; + if (an == bn) + { + FcChar32 *am = a->leaves[ai]->map; + FcChar32 *bm = b->leaves[bi]->map; + + if (am != bm) + { + int i = 256/32; + while (i--) + if (*am++ & ~*bm++) + return FcFalse; + } + ai++; + bi++; + } + else if (an < bn) + return FcFalse; + else + { + int low = bi + 1; + int high = b->num - 1; + + while (low <= high) + { + int mid = (low + high) >> 1; + bn = b->numbers[mid]; + if (bn == an) + { + high = mid; + break; + } + if (bn < an) + low = mid + 1; + else + high = mid - 1; + } + bi = high; + while (bi < b->num && b->numbers[bi] < an) + bi++; + } + } + return FcTrue; +} + +/* + * These two functions efficiently walk the entire charmap for + * other software (like pango) that want their own copy + */ + +FcChar32 +FcCharSetNextPage (const FcCharSet *a, + FcChar32 map[FC_CHARSET_MAP_SIZE], + FcChar32 *next) +{ + FcCharSetIter ai; + FcChar32 page; + + ai.ucs4 = *next; + FcCharSetIterSet (a, &ai); + if (!ai.leaf) + return FC_CHARSET_DONE; + + /* + * Save current information + */ + page = ai.ucs4; + memcpy (map, ai.leaf->map, sizeof (ai.leaf->map)); + /* + * Step to next page + */ + FcCharSetIterNext (a, &ai); + *next = ai.ucs4; + + return page; +} + +FcChar32 +FcCharSetFirstPage (const FcCharSet *a, + FcChar32 map[FC_CHARSET_MAP_SIZE], + FcChar32 *next) +{ + *next = 0; + return FcCharSetNextPage (a, map, next); +} + +/* + * old coverage API, rather hard to use correctly + */ +FcChar32 +FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result); + +FcChar32 +FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result) +{ + FcCharSetIter ai; + + ai.ucs4 = page; + FcCharSetIterSet (a, &ai); + if (!ai.leaf) + { + memset (result, '\0', 256 / 8); + page = 0; + } + else + { + memcpy (result, ai.leaf->map, sizeof (ai.leaf->map)); + FcCharSetIterNext (a, &ai); + page = ai.ucs4; + } + return page; +} + +/* + * ASCII representation of charsets. + * + * Each leaf is represented as 9 32-bit values, the code of the first character followed + * by 8 32 bit values for the leaf itself. Each value is encoded as 5 ASCII characters, + * only 85 different values are used to avoid control characters as well as the other + * characters used to encode font names. 85**5 > 2^32 so things work out, but + * it's not exactly human readable output. As a special case, 0 is encoded as a space + */ + +static const unsigned char charToValue[256] = { + /* "" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\b" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\020" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\030" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* " " */ 0xff, 0x00, 0xff, 0x01, 0x02, 0x03, 0x04, 0xff, + /* "(" */ 0x05, 0x06, 0x07, 0x08, 0xff, 0xff, 0x09, 0x0a, + /* "0" */ 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, + /* "8" */ 0x13, 0x14, 0xff, 0x15, 0x16, 0xff, 0x17, 0x18, + /* "@" */ 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, + /* "H" */ 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + /* "P" */ 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, + /* "X" */ 0x31, 0x32, 0x33, 0x34, 0xff, 0x35, 0x36, 0xff, + /* "`" */ 0xff, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, + /* "h" */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, + /* "p" */ 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, + /* "x" */ 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0xff, + /* "\200" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\210" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\220" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\230" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\240" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\250" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\260" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\270" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\300" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\310" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\320" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\330" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\340" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\350" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\360" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + /* "\370" */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + +static const FcChar8 valueToChar[0x55] = { + /* 0x00 */ '!', '#', '$', '%', '&', '(', ')', '*', + /* 0x08 */ '+', '.', '/', '0', '1', '2', '3', '4', + /* 0x10 */ '5', '6', '7', '8', '9', ';', '<', '>', + /* 0x18 */ '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', + /* 0x20 */ 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', + /* 0x28 */ 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', + /* 0x30 */ 'W', 'X', 'Y', 'Z', '[', ']', '^', 'a', + /* 0x38 */ 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', + /* 0x40 */ 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', + /* 0x48 */ 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', + /* 0x50 */ 'z', '{', '|', '}', '~', +}; + +static FcChar8 * +FcCharSetParseValue (FcChar8 *string, FcChar32 *value) +{ + int i; + FcChar32 v; + FcChar32 c; + + if (*string == ' ') + { + v = 0; + string++; + } + else + { + v = 0; + for (i = 0; i < 5; i++) + { + if (!(c = (FcChar32) (unsigned char) *string++)) + return 0; + c = charToValue[c]; + if (c == 0xff) + return 0; + v = v * 85 + c; + } + } + *value = v; + return string; +} + +static FcBool +FcCharSetUnparseValue (FcStrBuf *buf, FcChar32 value) +{ + int i; + if (value == 0) + { + return FcStrBufChar (buf, ' '); + } + else + { + FcChar8 string[6]; + FcChar8 *s = string + 5; + string[5] = '\0'; + for (i = 0; i < 5; i++) + { + *--s = valueToChar[value % 85]; + value /= 85; + } + for (i = 0; i < 5; i++) + if (!FcStrBufChar (buf, *s++)) + return FcFalse; + } + return FcTrue; +} + +typedef struct _FcCharLeafEnt FcCharLeafEnt; + +struct _FcCharLeafEnt { + FcCharLeafEnt *next; + FcChar32 hash; + FcCharLeaf leaf; +}; + +#define FC_CHAR_LEAF_BLOCK (4096 / sizeof (FcCharLeafEnt)) + +static FcCharLeafEnt * +FcCharLeafEntCreate (void) +{ + static FcCharLeafEnt *block; + static int remain; + + if (!remain) + { + block = malloc (FC_CHAR_LEAF_BLOCK * sizeof (FcCharLeafEnt)); + if (!block) + return 0; + FcMemAlloc (FC_MEM_CHARLEAF, FC_CHAR_LEAF_BLOCK * sizeof (FcCharLeafEnt)); + remain = FC_CHAR_LEAF_BLOCK; + } + remain--; + return block++; +} + +#define FC_CHAR_LEAF_HASH_SIZE 257 + +static FcChar32 +FcCharLeafHash (FcCharLeaf *leaf) +{ + FcChar32 hash = 0; + int i; + + for (i = 0; i < 256/32; i++) + hash = ((hash << 1) | (hash >> 31)) ^ leaf->map[i]; + return hash; +} + +static int FcCharLeafTotal; +static int FcCharLeafUsed; + +static FcCharLeaf * +FcCharSetFreezeLeaf (FcCharLeaf *leaf) +{ + static FcCharLeafEnt *hashTable[FC_CHAR_LEAF_HASH_SIZE]; + FcChar32 hash = FcCharLeafHash (leaf); + FcCharLeafEnt **bucket = &hashTable[hash % FC_CHAR_LEAF_HASH_SIZE]; + FcCharLeafEnt *ent; + + FcCharLeafTotal++; + for (ent = *bucket; ent; ent = ent->next) + { + if (ent->hash == hash && !memcmp (&ent->leaf, leaf, sizeof (FcCharLeaf))) + return &ent->leaf; + } + + ent = FcCharLeafEntCreate(); + if (!ent) + return 0; + FcCharLeafUsed++; + ent->leaf = *leaf; + ent->hash = hash; + ent->next = *bucket; + *bucket = ent; + return &ent->leaf; +} + +typedef struct _FcCharSetEnt FcCharSetEnt; + +struct _FcCharSetEnt { + FcCharSetEnt *next; + FcChar32 hash; + FcCharSet set; +}; + +#define FC_CHAR_SET_HASH_SIZE 67 + +static FcChar32 +FcCharSetHash (FcCharSet *fcs) +{ + FcChar32 hash = 0; + FcChar32 *p; + int i; + + /* hash in leaves */ + p = (FcChar32 *) fcs->leaves; + for (i = 0; i < fcs->num * sizeof (FcCharLeaf *) / sizeof (FcChar32); i++) + hash = ((hash << 1) | (hash >> 31)) ^ *p++; + /* hash in numbers */ + for (i = 0; i < fcs->num; i++) + hash = ((hash << 1) | (hash >> 31)) ^ fcs->numbers[i]; + return hash; +} + +static int FcCharSetTotal; +static int FcCharSetUsed; +static int FcCharSetTotalEnts, FcCharSetUsedEnts; + +static FcCharSet * +FcCharSetFreezeBase (FcCharSet *fcs) +{ + static FcCharSetEnt *hashTable[FC_CHAR_SET_HASH_SIZE]; + FcChar32 hash = FcCharSetHash (fcs); + FcCharSetEnt **bucket = &hashTable[hash % FC_CHAR_SET_HASH_SIZE]; + FcCharSetEnt *ent; + int size; + + FcCharSetTotal++; + FcCharSetTotalEnts += fcs->num; + for (ent = *bucket; ent; ent = ent->next) + { + if (ent->hash == hash && + ent->set.num == fcs->num && + !memcmp (ent->set.leaves, fcs->leaves, + fcs->num * sizeof (FcCharLeaf *)) && + !memcmp (ent->set.numbers, fcs->numbers, + fcs->num * sizeof (FcChar16))) + { + return &ent->set; + } + } + + size = (sizeof (FcCharSetEnt) + + fcs->num * sizeof (FcCharLeaf *) + + fcs->num * sizeof (FcChar16)); + ent = malloc (size); + if (!ent) + return 0; + FcMemAlloc (FC_MEM_CHARSET, size); + FcCharSetUsed++; + FcCharSetUsedEnts += fcs->num; + + ent->set.ref = FC_REF_CONSTANT; + ent->set.num = fcs->num; + if (fcs->num) + { + ent->set.leaves = (FcCharLeaf **) (ent + 1); + ent->set.numbers = (FcChar16 *) (ent->set.leaves + fcs->num); + memcpy (ent->set.leaves, fcs->leaves, fcs->num * sizeof (FcCharLeaf *)); + memcpy (ent->set.numbers, fcs->numbers, fcs->num * sizeof (FcChar16)); + } + else + { + ent->set.leaves = 0; + ent->set.numbers = 0; + } + + ent->hash = hash; + ent->next = *bucket; + *bucket = ent; + return &ent->set; +} + +FcCharSet * +FcCharSetFreeze (FcCharSet *fcs) +{ + FcCharSet *b; + FcCharSet *n = 0; + FcCharLeaf *l; + int i; + + b = FcCharSetCreate (); + if (!b) + goto bail0; + for (i = 0; i < fcs->num; i++) + { + l = FcCharSetFreezeLeaf (fcs->leaves[i]); + if (!l) + goto bail1; + if (!FcCharSetInsertLeaf (b, fcs->numbers[i] << 8, l)) + goto bail1; + } + n = FcCharSetFreezeBase (b); +bail1: + if (b->leaves) + { + FcMemFree (FC_MEM_CHARSET, b->num * sizeof (FcCharLeaf *)); + free (b->leaves); + } + if (b->numbers) + { + FcMemFree (FC_MEM_CHARSET, b->num * sizeof (FcChar16)); + free (b->numbers); + } + FcMemFree (FC_MEM_CHARSET, sizeof (FcCharSet)); + free (b); +bail0: + return n; +} + +FcCharSet * +FcNameParseCharSet (FcChar8 *string) +{ + FcCharSet *c, *n = 0; + FcChar32 ucs4; + FcCharLeaf *leaf; + FcCharLeaf temp; + FcChar32 bits; + int i; + + c = FcCharSetCreate (); + if (!c) + goto bail0; + while (*string) + { + string = FcCharSetParseValue (string, &ucs4); + if (!string) + goto bail1; + bits = 0; + for (i = 0; i < 256/32; i++) + { + string = FcCharSetParseValue (string, &temp.map[i]); + if (!string) + goto bail1; + bits |= temp.map[i]; + } + if (bits) + { + leaf = FcCharSetFreezeLeaf (&temp); + if (!leaf) + goto bail1; + if (!FcCharSetInsertLeaf (c, ucs4, leaf)) + goto bail1; + } + } +#ifdef CHATTY + printf (" %8s %8s %8s %8s\n", "total", "totalmem", "new", "newmem"); + printf ("Leaves: %8d %8d %8d %8d\n", + FcCharLeafTotal, sizeof (FcCharLeaf) * FcCharLeafTotal, + FcCharLeafUsed, sizeof (FcCharLeaf) * FcCharLeafUsed); + printf ("Charsets: %8d %8d %8d %8d\n", + FcCharSetTotal, sizeof (FcCharSet) * FcCharSetTotal, + FcCharSetUsed, sizeof (FcCharSet) * FcCharSetUsed); + printf ("Tables: %8d %8d %8d %8d\n", + FcCharSetTotalEnts, FcCharSetTotalEnts * (sizeof (FcCharLeaf *) + sizeof (FcChar16)), + FcCharSetUsedEnts, FcCharSetUsedEnts * (sizeof (FcCharLeaf *) + sizeof (FcChar16))); + printf ("Total: %8s %8d %8s %8d\n", + "", + sizeof (FcCharLeaf) * FcCharLeafTotal + + sizeof (FcCharSet) * FcCharSetTotal + + FcCharSetTotalEnts * (sizeof (FcCharLeaf *) + sizeof (FcChar16)), + "", + sizeof (FcCharLeaf) * FcCharLeafUsed + + sizeof (FcCharSet) * FcCharSetUsed + + FcCharSetUsedEnts * (sizeof (FcCharLeaf *) + sizeof (FcChar16))); +#endif + n = FcCharSetFreezeBase (c); +bail1: + if (c->leaves) + { + FcMemFree (FC_MEM_CHARSET, c->num * sizeof (FcCharLeaf *)); + free (c->leaves); + } + if (c->numbers) + { + FcMemFree (FC_MEM_CHARSET, c->num * sizeof (FcChar16)); + free (c->numbers); + } + FcMemFree (FC_MEM_CHARSET, sizeof (FcCharSet)); + free (c); +bail0: + return n; +} + +FcBool +FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c) +{ + FcCharSetIter ci; + int i; +#ifdef CHECK + int len = buf->len; +#endif + + for (FcCharSetIterStart (c, &ci); + ci.leaf; + FcCharSetIterNext (c, &ci)) + { + if (!FcCharSetUnparseValue (buf, ci.ucs4)) + return FcFalse; + for (i = 0; i < 256/32; i++) + if (!FcCharSetUnparseValue (buf, ci.leaf->map[i])) + return FcFalse; + } +#ifdef CHECK + { + FcCharSet *check; + FcChar32 missing; + FcCharSetIter ci, checki; + + /* null terminate for parser */ + FcStrBufChar (buf, '\0'); + /* step back over null for life after test */ + buf->len--; + check = FcNameParseCharSet (buf->buf + len); + FcCharSetIterStart (c, &ci); + FcCharSetIterStart (check, &checki); + while (ci.leaf || checki.leaf) + { + if (ci.ucs4 < checki.ucs4) + { + printf ("Missing leaf node at 0x%x\n", ci.ucs4); + FcCharSetIterNext (c, &ci); + } + else if (checki.ucs4 < ci.ucs4) + { + printf ("Extra leaf node at 0x%x\n", checki.ucs4); + FcCharSetIterNext (check, &checki); + } + else + { + int i = 256/32; + FcChar32 *cm = ci.leaf->map; + FcChar32 *checkm = checki.leaf->map; + + for (i = 0; i < 256; i += 32) + { + if (*cm != *checkm) + printf ("Mismatching sets at 0x%08x: 0x%08x != 0x%08x\n", + ci.ucs4 + i, *cm, *checkm); + cm++; + checkm++; + } + FcCharSetIterNext (c, &ci); + FcCharSetIterNext (check, &checki); + } + } + if ((missing = FcCharSetSubtractCount (c, check))) + printf ("%d missing in reparsed result\n", missing); + if ((missing = FcCharSetSubtractCount (check, c))) + printf ("%d extra in reparsed result\n", missing); + FcCharSetDestroy (check); + } +#endif + + return FcTrue; +} + +/* + * Figure out whether the available freetype has FT_Get_Next_Char + */ + +#if FREETYPE_MAJOR > 2 +# define HAS_NEXT_CHAR +#else +# if FREETYPE_MAJOR == 2 +# if FREETYPE_MINOR > 0 +# define HAS_NEXT_CHAR +# else +# if FREETYPE_MINOR == 0 +# if FREETYPE_PATCH >= 9 +# define HAS_NEXT_CHAR +# endif +# endif +# endif +# endif +#endif + +/* + * For our purposes, this approximation is sufficient + */ +#ifndef HAS_NEXT_CHAR +#define FT_Get_First_Char(face, gi) ((*(gi) = 1), 1) +#define FT_Get_Next_Char(face, ucs4, gi) ((ucs4) >= 0xffffff ? \ + (*(gi) = 0), 0 : \ + (*(gi) = 1), (ucs4) + 1) +#warning "No FT_Get_Next_Char" +#endif + +typedef struct _FcCharEnt { + FcChar16 bmp; + unsigned char encode; +} FcCharEnt; + +struct _FcCharMap { + const FcCharEnt *ent; + int nent; +}; + +typedef struct _FcFontDecode { + FT_Encoding encoding; + const FcCharMap *map; + FcChar32 max; +} FcFontDecode; + +static const FcCharEnt AppleRomanEnt[] = { + { 0x0020, 0x20 }, /* SPACE */ + { 0x0021, 0x21 }, /* EXCLAMATION MARK */ + { 0x0022, 0x22 }, /* QUOTATION MARK */ + { 0x0023, 0x23 }, /* NUMBER SIGN */ + { 0x0024, 0x24 }, /* DOLLAR SIGN */ + { 0x0025, 0x25 }, /* PERCENT SIGN */ + { 0x0026, 0x26 }, /* AMPERSAND */ + { 0x0027, 0x27 }, /* APOSTROPHE */ + { 0x0028, 0x28 }, /* LEFT PARENTHESIS */ + { 0x0029, 0x29 }, /* RIGHT PARENTHESIS */ + { 0x002A, 0x2A }, /* ASTERISK */ + { 0x002B, 0x2B }, /* PLUS SIGN */ + { 0x002C, 0x2C }, /* COMMA */ + { 0x002D, 0x2D }, /* HYPHEN-MINUS */ + { 0x002E, 0x2E }, /* FULL STOP */ + { 0x002F, 0x2F }, /* SOLIDUS */ + { 0x0030, 0x30 }, /* DIGIT ZERO */ + { 0x0031, 0x31 }, /* DIGIT ONE */ + { 0x0032, 0x32 }, /* DIGIT TWO */ + { 0x0033, 0x33 }, /* DIGIT THREE */ + { 0x0034, 0x34 }, /* DIGIT FOUR */ + { 0x0035, 0x35 }, /* DIGIT FIVE */ + { 0x0036, 0x36 }, /* DIGIT SIX */ + { 0x0037, 0x37 }, /* DIGIT SEVEN */ + { 0x0038, 0x38 }, /* DIGIT EIGHT */ + { 0x0039, 0x39 }, /* DIGIT NINE */ + { 0x003A, 0x3A }, /* COLON */ + { 0x003B, 0x3B }, /* SEMICOLON */ + { 0x003C, 0x3C }, /* LESS-THAN SIGN */ + { 0x003D, 0x3D }, /* EQUALS SIGN */ + { 0x003E, 0x3E }, /* GREATER-THAN SIGN */ + { 0x003F, 0x3F }, /* QUESTION MARK */ + { 0x0040, 0x40 }, /* COMMERCIAL AT */ + { 0x0041, 0x41 }, /* LATIN CAPITAL LETTER A */ + { 0x0042, 0x42 }, /* LATIN CAPITAL LETTER B */ + { 0x0043, 0x43 }, /* LATIN CAPITAL LETTER C */ + { 0x0044, 0x44 }, /* LATIN CAPITAL LETTER D */ + { 0x0045, 0x45 }, /* LATIN CAPITAL LETTER E */ + { 0x0046, 0x46 }, /* LATIN CAPITAL LETTER F */ + { 0x0047, 0x47 }, /* LATIN CAPITAL LETTER G */ + { 0x0048, 0x48 }, /* LATIN CAPITAL LETTER H */ + { 0x0049, 0x49 }, /* LATIN CAPITAL LETTER I */ + { 0x004A, 0x4A }, /* LATIN CAPITAL LETTER J */ + { 0x004B, 0x4B }, /* LATIN CAPITAL LETTER K */ + { 0x004C, 0x4C }, /* LATIN CAPITAL LETTER L */ + { 0x004D, 0x4D }, /* LATIN CAPITAL LETTER M */ + { 0x004E, 0x4E }, /* LATIN CAPITAL LETTER N */ + { 0x004F, 0x4F }, /* LATIN CAPITAL LETTER O */ + { 0x0050, 0x50 }, /* LATIN CAPITAL LETTER P */ + { 0x0051, 0x51 }, /* LATIN CAPITAL LETTER Q */ + { 0x0052, 0x52 }, /* LATIN CAPITAL LETTER R */ + { 0x0053, 0x53 }, /* LATIN CAPITAL LETTER S */ + { 0x0054, 0x54 }, /* LATIN CAPITAL LETTER T */ + { 0x0055, 0x55 }, /* LATIN CAPITAL LETTER U */ + { 0x0056, 0x56 }, /* LATIN CAPITAL LETTER V */ + { 0x0057, 0x57 }, /* LATIN CAPITAL LETTER W */ + { 0x0058, 0x58 }, /* LATIN CAPITAL LETTER X */ + { 0x0059, 0x59 }, /* LATIN CAPITAL LETTER Y */ + { 0x005A, 0x5A }, /* LATIN CAPITAL LETTER Z */ + { 0x005B, 0x5B }, /* LEFT SQUARE BRACKET */ + { 0x005C, 0x5C }, /* REVERSE SOLIDUS */ + { 0x005D, 0x5D }, /* RIGHT SQUARE BRACKET */ + { 0x005E, 0x5E }, /* CIRCUMFLEX ACCENT */ + { 0x005F, 0x5F }, /* LOW LINE */ + { 0x0060, 0x60 }, /* GRAVE ACCENT */ + { 0x0061, 0x61 }, /* LATIN SMALL LETTER A */ + { 0x0062, 0x62 }, /* LATIN SMALL LETTER B */ + { 0x0063, 0x63 }, /* LATIN SMALL LETTER C */ + { 0x0064, 0x64 }, /* LATIN SMALL LETTER D */ + { 0x0065, 0x65 }, /* LATIN SMALL LETTER E */ + { 0x0066, 0x66 }, /* LATIN SMALL LETTER F */ + { 0x0067, 0x67 }, /* LATIN SMALL LETTER G */ + { 0x0068, 0x68 }, /* LATIN SMALL LETTER H */ + { 0x0069, 0x69 }, /* LATIN SMALL LETTER I */ + { 0x006A, 0x6A }, /* LATIN SMALL LETTER J */ + { 0x006B, 0x6B }, /* LATIN SMALL LETTER K */ + { 0x006C, 0x6C }, /* LATIN SMALL LETTER L */ + { 0x006D, 0x6D }, /* LATIN SMALL LETTER M */ + { 0x006E, 0x6E }, /* LATIN SMALL LETTER N */ + { 0x006F, 0x6F }, /* LATIN SMALL LETTER O */ + { 0x0070, 0x70 }, /* LATIN SMALL LETTER P */ + { 0x0071, 0x71 }, /* LATIN SMALL LETTER Q */ + { 0x0072, 0x72 }, /* LATIN SMALL LETTER R */ + { 0x0073, 0x73 }, /* LATIN SMALL LETTER S */ + { 0x0074, 0x74 }, /* LATIN SMALL LETTER T */ + { 0x0075, 0x75 }, /* LATIN SMALL LETTER U */ + { 0x0076, 0x76 }, /* LATIN SMALL LETTER V */ + { 0x0077, 0x77 }, /* LATIN SMALL LETTER W */ + { 0x0078, 0x78 }, /* LATIN SMALL LETTER X */ + { 0x0079, 0x79 }, /* LATIN SMALL LETTER Y */ + { 0x007A, 0x7A }, /* LATIN SMALL LETTER Z */ + { 0x007B, 0x7B }, /* LEFT CURLY BRACKET */ + { 0x007C, 0x7C }, /* VERTICAL LINE */ + { 0x007D, 0x7D }, /* RIGHT CURLY BRACKET */ + { 0x007E, 0x7E }, /* TILDE */ + { 0x00A0, 0xCA }, /* NO-BREAK SPACE */ + { 0x00A1, 0xC1 }, /* INVERTED EXCLAMATION MARK */ + { 0x00A2, 0xA2 }, /* CENT SIGN */ + { 0x00A3, 0xA3 }, /* POUND SIGN */ + { 0x00A5, 0xB4 }, /* YEN SIGN */ + { 0x00A7, 0xA4 }, /* SECTION SIGN */ + { 0x00A8, 0xAC }, /* DIAERESIS */ + { 0x00A9, 0xA9 }, /* COPYRIGHT SIGN */ + { 0x00AA, 0xBB }, /* FEMININE ORDINAL INDICATOR */ + { 0x00AB, 0xC7 }, /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ + { 0x00AC, 0xC2 }, /* NOT SIGN */ + { 0x00AE, 0xA8 }, /* REGISTERED SIGN */ + { 0x00AF, 0xF8 }, /* MACRON */ + { 0x00B0, 0xA1 }, /* DEGREE SIGN */ + { 0x00B1, 0xB1 }, /* PLUS-MINUS SIGN */ + { 0x00B4, 0xAB }, /* ACUTE ACCENT */ + { 0x00B5, 0xB5 }, /* MICRO SIGN */ + { 0x00B6, 0xA6 }, /* PILCROW SIGN */ + { 0x00B7, 0xE1 }, /* MIDDLE DOT */ + { 0x00B8, 0xFC }, /* CEDILLA */ + { 0x00BA, 0xBC }, /* MASCULINE ORDINAL INDICATOR */ + { 0x00BB, 0xC8 }, /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ + { 0x00BF, 0xC0 }, /* INVERTED QUESTION MARK */ + { 0x00C0, 0xCB }, /* LATIN CAPITAL LETTER A WITH GRAVE */ + { 0x00C1, 0xE7 }, /* LATIN CAPITAL LETTER A WITH ACUTE */ + { 0x00C2, 0xE5 }, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ + { 0x00C3, 0xCC }, /* LATIN CAPITAL LETTER A WITH TILDE */ + { 0x00C4, 0x80 }, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ + { 0x00C5, 0x81 }, /* LATIN CAPITAL LETTER A WITH RING ABOVE */ + { 0x00C6, 0xAE }, /* LATIN CAPITAL LETTER AE */ + { 0x00C7, 0x82 }, /* LATIN CAPITAL LETTER C WITH CEDILLA */ + { 0x00C8, 0xE9 }, /* LATIN CAPITAL LETTER E WITH GRAVE */ + { 0x00C9, 0x83 }, /* LATIN CAPITAL LETTER E WITH ACUTE */ + { 0x00CA, 0xE6 }, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ + { 0x00CB, 0xE8 }, /* LATIN CAPITAL LETTER E WITH DIAERESIS */ + { 0x00CC, 0xED }, /* LATIN CAPITAL LETTER I WITH GRAVE */ + { 0x00CD, 0xEA }, /* LATIN CAPITAL LETTER I WITH ACUTE */ + { 0x00CE, 0xEB }, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ + { 0x00CF, 0xEC }, /* LATIN CAPITAL LETTER I WITH DIAERESIS */ + { 0x00D1, 0x84 }, /* LATIN CAPITAL LETTER N WITH TILDE */ + { 0x00D2, 0xF1 }, /* LATIN CAPITAL LETTER O WITH GRAVE */ + { 0x00D3, 0xEE }, /* LATIN CAPITAL LETTER O WITH ACUTE */ + { 0x00D4, 0xEF }, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ + { 0x00D5, 0xCD }, /* LATIN CAPITAL LETTER O WITH TILDE */ + { 0x00D6, 0x85 }, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ + { 0x00D8, 0xAF }, /* LATIN CAPITAL LETTER O WITH STROKE */ + { 0x00D9, 0xF4 }, /* LATIN CAPITAL LETTER U WITH GRAVE */ + { 0x00DA, 0xF2 }, /* LATIN CAPITAL LETTER U WITH ACUTE */ + { 0x00DB, 0xF3 }, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ + { 0x00DC, 0x86 }, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ + { 0x00DF, 0xA7 }, /* LATIN SMALL LETTER SHARP S */ + { 0x00E0, 0x88 }, /* LATIN SMALL LETTER A WITH GRAVE */ + { 0x00E1, 0x87 }, /* LATIN SMALL LETTER A WITH ACUTE */ + { 0x00E2, 0x89 }, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ + { 0x00E3, 0x8B }, /* LATIN SMALL LETTER A WITH TILDE */ + { 0x00E4, 0x8A }, /* LATIN SMALL LETTER A WITH DIAERESIS */ + { 0x00E5, 0x8C }, /* LATIN SMALL LETTER A WITH RING ABOVE */ + { 0x00E6, 0xBE }, /* LATIN SMALL LETTER AE */ + { 0x00E7, 0x8D }, /* LATIN SMALL LETTER C WITH CEDILLA */ + { 0x00E8, 0x8F }, /* LATIN SMALL LETTER E WITH GRAVE */ + { 0x00E9, 0x8E }, /* LATIN SMALL LETTER E WITH ACUTE */ + { 0x00EA, 0x90 }, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */ + { 0x00EB, 0x91 }, /* LATIN SMALL LETTER E WITH DIAERESIS */ + { 0x00EC, 0x93 }, /* LATIN SMALL LETTER I WITH GRAVE */ + { 0x00ED, 0x92 }, /* LATIN SMALL LETTER I WITH ACUTE */ + { 0x00EE, 0x94 }, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ + { 0x00EF, 0x95 }, /* LATIN SMALL LETTER I WITH DIAERESIS */ + { 0x00F1, 0x96 }, /* LATIN SMALL LETTER N WITH TILDE */ + { 0x00F2, 0x98 }, /* LATIN SMALL LETTER O WITH GRAVE */ + { 0x00F3, 0x97 }, /* LATIN SMALL LETTER O WITH ACUTE */ + { 0x00F4, 0x99 }, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ + { 0x00F5, 0x9B }, /* LATIN SMALL LETTER O WITH TILDE */ + { 0x00F6, 0x9A }, /* LATIN SMALL LETTER O WITH DIAERESIS */ + { 0x00F7, 0xD6 }, /* DIVISION SIGN */ + { 0x00F8, 0xBF }, /* LATIN SMALL LETTER O WITH STROKE */ + { 0x00F9, 0x9D }, /* LATIN SMALL LETTER U WITH GRAVE */ + { 0x00FA, 0x9C }, /* LATIN SMALL LETTER U WITH ACUTE */ + { 0x00FB, 0x9E }, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */ + { 0x00FC, 0x9F }, /* LATIN SMALL LETTER U WITH DIAERESIS */ + { 0x00FF, 0xD8 }, /* LATIN SMALL LETTER Y WITH DIAERESIS */ + { 0x0131, 0xF5 }, /* LATIN SMALL LETTER DOTLESS I */ + { 0x0152, 0xCE }, /* LATIN CAPITAL LIGATURE OE */ + { 0x0153, 0xCF }, /* LATIN SMALL LIGATURE OE */ + { 0x0178, 0xD9 }, /* LATIN CAPITAL LETTER Y WITH DIAERESIS */ + { 0x0192, 0xC4 }, /* LATIN SMALL LETTER F WITH HOOK */ + { 0x02C6, 0xF6 }, /* MODIFIER LETTER CIRCUMFLEX ACCENT */ + { 0x02C7, 0xFF }, /* CARON */ + { 0x02D8, 0xF9 }, /* BREVE */ + { 0x02D9, 0xFA }, /* DOT ABOVE */ + { 0x02DA, 0xFB }, /* RING ABOVE */ + { 0x02DB, 0xFE }, /* OGONEK */ + { 0x02DC, 0xF7 }, /* SMALL TILDE */ + { 0x02DD, 0xFD }, /* DOUBLE ACUTE ACCENT */ + { 0x03A9, 0xBD }, /* GREEK CAPITAL LETTER OMEGA */ + { 0x03C0, 0xB9 }, /* GREEK SMALL LETTER PI */ + { 0x2013, 0xD0 }, /* EN DASH */ + { 0x2014, 0xD1 }, /* EM DASH */ + { 0x2018, 0xD4 }, /* LEFT SINGLE QUOTATION MARK */ + { 0x2019, 0xD5 }, /* RIGHT SINGLE QUOTATION MARK */ + { 0x201A, 0xE2 }, /* SINGLE LOW-9 QUOTATION MARK */ + { 0x201C, 0xD2 }, /* LEFT DOUBLE QUOTATION MARK */ + { 0x201D, 0xD3 }, /* RIGHT DOUBLE QUOTATION MARK */ + { 0x201E, 0xE3 }, /* DOUBLE LOW-9 QUOTATION MARK */ + { 0x2020, 0xA0 }, /* DAGGER */ + { 0x2021, 0xE0 }, /* DOUBLE DAGGER */ + { 0x2022, 0xA5 }, /* BULLET */ + { 0x2026, 0xC9 }, /* HORIZONTAL ELLIPSIS */ + { 0x2030, 0xE4 }, /* PER MILLE SIGN */ + { 0x2039, 0xDC }, /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */ + { 0x203A, 0xDD }, /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */ + { 0x2044, 0xDA }, /* FRACTION SLASH */ + { 0x20AC, 0xDB }, /* EURO SIGN */ + { 0x2122, 0xAA }, /* TRADE MARK SIGN */ + { 0x2202, 0xB6 }, /* PARTIAL DIFFERENTIAL */ + { 0x2206, 0xC6 }, /* INCREMENT */ + { 0x220F, 0xB8 }, /* N-ARY PRODUCT */ + { 0x2211, 0xB7 }, /* N-ARY SUMMATION */ + { 0x221A, 0xC3 }, /* SQUARE ROOT */ + { 0x221E, 0xB0 }, /* INFINITY */ + { 0x222B, 0xBA }, /* INTEGRAL */ + { 0x2248, 0xC5 }, /* ALMOST EQUAL TO */ + { 0x2260, 0xAD }, /* NOT EQUAL TO */ + { 0x2264, 0xB2 }, /* LESS-THAN OR EQUAL TO */ + { 0x2265, 0xB3 }, /* GREATER-THAN OR EQUAL TO */ + { 0x25CA, 0xD7 }, /* LOZENGE */ + { 0xF8FF, 0xF0 }, /* Apple logo */ + { 0xFB01, 0xDE }, /* LATIN SMALL LIGATURE FI */ + { 0xFB02, 0xDF }, /* LATIN SMALL LIGATURE FL */ +}; + +static const FcCharMap AppleRoman = { + AppleRomanEnt, + sizeof (AppleRomanEnt) / sizeof (AppleRomanEnt[0]) +}; + +static const FcCharEnt AdobeSymbolEnt[] = { + { 0x0020, 0x20 }, /* SPACE # space */ + { 0x0021, 0x21 }, /* EXCLAMATION MARK # exclam */ + { 0x0023, 0x23 }, /* NUMBER SIGN # numbersign */ + { 0x0025, 0x25 }, /* PERCENT SIGN # percent */ + { 0x0026, 0x26 }, /* AMPERSAND # ampersand */ + { 0x0028, 0x28 }, /* LEFT PARENTHESIS # parenleft */ + { 0x0029, 0x29 }, /* RIGHT PARENTHESIS # parenright */ + { 0x002B, 0x2B }, /* PLUS SIGN # plus */ + { 0x002C, 0x2C }, /* COMMA # comma */ + { 0x002E, 0x2E }, /* FULL STOP # period */ + { 0x002F, 0x2F }, /* SOLIDUS # slash */ + { 0x0030, 0x30 }, /* DIGIT ZERO # zero */ + { 0x0031, 0x31 }, /* DIGIT ONE # one */ + { 0x0032, 0x32 }, /* DIGIT TWO # two */ + { 0x0033, 0x33 }, /* DIGIT THREE # three */ + { 0x0034, 0x34 }, /* DIGIT FOUR # four */ + { 0x0035, 0x35 }, /* DIGIT FIVE # five */ + { 0x0036, 0x36 }, /* DIGIT SIX # six */ + { 0x0037, 0x37 }, /* DIGIT SEVEN # seven */ + { 0x0038, 0x38 }, /* DIGIT EIGHT # eight */ + { 0x0039, 0x39 }, /* DIGIT NINE # nine */ + { 0x003A, 0x3A }, /* COLON # colon */ + { 0x003B, 0x3B }, /* SEMICOLON # semicolon */ + { 0x003C, 0x3C }, /* LESS-THAN SIGN # less */ + { 0x003D, 0x3D }, /* EQUALS SIGN # equal */ + { 0x003E, 0x3E }, /* GREATER-THAN SIGN # greater */ + { 0x003F, 0x3F }, /* QUESTION MARK # question */ + { 0x005B, 0x5B }, /* LEFT SQUARE BRACKET # bracketleft */ + { 0x005D, 0x5D }, /* RIGHT SQUARE BRACKET # bracketright */ + { 0x005F, 0x5F }, /* LOW LINE # underscore */ + { 0x007B, 0x7B }, /* LEFT CURLY BRACKET # braceleft */ + { 0x007C, 0x7C }, /* VERTICAL LINE # bar */ + { 0x007D, 0x7D }, /* RIGHT CURLY BRACKET # braceright */ + { 0x00A0, 0x20 }, /* NO-BREAK SPACE # space */ + { 0x00AC, 0xD8 }, /* NOT SIGN # logicalnot */ + { 0x00B0, 0xB0 }, /* DEGREE SIGN # degree */ + { 0x00B1, 0xB1 }, /* PLUS-MINUS SIGN # plusminus */ + { 0x00B5, 0x6D }, /* MICRO SIGN # mu */ + { 0x00D7, 0xB4 }, /* MULTIPLICATION SIGN # multiply */ + { 0x00F7, 0xB8 }, /* DIVISION SIGN # divide */ + { 0x0192, 0xA6 }, /* LATIN SMALL LETTER F WITH HOOK # florin */ + { 0x0391, 0x41 }, /* GREEK CAPITAL LETTER ALPHA # Alpha */ + { 0x0392, 0x42 }, /* GREEK CAPITAL LETTER BETA # Beta */ + { 0x0393, 0x47 }, /* GREEK CAPITAL LETTER GAMMA # Gamma */ + { 0x0394, 0x44 }, /* GREEK CAPITAL LETTER DELTA # Delta */ + { 0x0395, 0x45 }, /* GREEK CAPITAL LETTER EPSILON # Epsilon */ + { 0x0396, 0x5A }, /* GREEK CAPITAL LETTER ZETA # Zeta */ + { 0x0397, 0x48 }, /* GREEK CAPITAL LETTER ETA # Eta */ + { 0x0398, 0x51 }, /* GREEK CAPITAL LETTER THETA # Theta */ + { 0x0399, 0x49 }, /* GREEK CAPITAL LETTER IOTA # Iota */ + { 0x039A, 0x4B }, /* GREEK CAPITAL LETTER KAPPA # Kappa */ + { 0x039B, 0x4C }, /* GREEK CAPITAL LETTER LAMDA # Lambda */ + { 0x039C, 0x4D }, /* GREEK CAPITAL LETTER MU # Mu */ + { 0x039D, 0x4E }, /* GREEK CAPITAL LETTER NU # Nu */ + { 0x039E, 0x58 }, /* GREEK CAPITAL LETTER XI # Xi */ + { 0x039F, 0x4F }, /* GREEK CAPITAL LETTER OMICRON # Omicron */ + { 0x03A0, 0x50 }, /* GREEK CAPITAL LETTER PI # Pi */ + { 0x03A1, 0x52 }, /* GREEK CAPITAL LETTER RHO # Rho */ + { 0x03A3, 0x53 }, /* GREEK CAPITAL LETTER SIGMA # Sigma */ + { 0x03A4, 0x54 }, /* GREEK CAPITAL LETTER TAU # Tau */ + { 0x03A5, 0x55 }, /* GREEK CAPITAL LETTER UPSILON # Upsilon */ + { 0x03A6, 0x46 }, /* GREEK CAPITAL LETTER PHI # Phi */ + { 0x03A7, 0x43 }, /* GREEK CAPITAL LETTER CHI # Chi */ + { 0x03A8, 0x59 }, /* GREEK CAPITAL LETTER PSI # Psi */ + { 0x03A9, 0x57 }, /* GREEK CAPITAL LETTER OMEGA # Omega */ + { 0x03B1, 0x61 }, /* GREEK SMALL LETTER ALPHA # alpha */ + { 0x03B2, 0x62 }, /* GREEK SMALL LETTER BETA # beta */ + { 0x03B3, 0x67 }, /* GREEK SMALL LETTER GAMMA # gamma */ + { 0x03B4, 0x64 }, /* GREEK SMALL LETTER DELTA # delta */ + { 0x03B5, 0x65 }, /* GREEK SMALL LETTER EPSILON # epsilon */ + { 0x03B6, 0x7A }, /* GREEK SMALL LETTER ZETA # zeta */ + { 0x03B7, 0x68 }, /* GREEK SMALL LETTER ETA # eta */ + { 0x03B8, 0x71 }, /* GREEK SMALL LETTER THETA # theta */ + { 0x03B9, 0x69 }, /* GREEK SMALL LETTER IOTA # iota */ + { 0x03BA, 0x6B }, /* GREEK SMALL LETTER KAPPA # kappa */ + { 0x03BB, 0x6C }, /* GREEK SMALL LETTER LAMDA # lambda */ + { 0x03BC, 0x6D }, /* GREEK SMALL LETTER MU # mu */ + { 0x03BD, 0x6E }, /* GREEK SMALL LETTER NU # nu */ + { 0x03BE, 0x78 }, /* GREEK SMALL LETTER XI # xi */ + { 0x03BF, 0x6F }, /* GREEK SMALL LETTER OMICRON # omicron */ + { 0x03C0, 0x70 }, /* GREEK SMALL LETTER PI # pi */ + { 0x03C1, 0x72 }, /* GREEK SMALL LETTER RHO # rho */ + { 0x03C2, 0x56 }, /* GREEK SMALL LETTER FINAL SIGMA # sigma1 */ + { 0x03C3, 0x73 }, /* GREEK SMALL LETTER SIGMA # sigma */ + { 0x03C4, 0x74 }, /* GREEK SMALL LETTER TAU # tau */ + { 0x03C5, 0x75 }, /* GREEK SMALL LETTER UPSILON # upsilon */ + { 0x03C6, 0x66 }, /* GREEK SMALL LETTER PHI # phi */ + { 0x03C7, 0x63 }, /* GREEK SMALL LETTER CHI # chi */ + { 0x03C8, 0x79 }, /* GREEK SMALL LETTER PSI # psi */ + { 0x03C9, 0x77 }, /* GREEK SMALL LETTER OMEGA # omega */ + { 0x03D1, 0x4A }, /* GREEK THETA SYMBOL # theta1 */ + { 0x03D2, 0xA1 }, /* GREEK UPSILON WITH HOOK SYMBOL # Upsilon1 */ + { 0x03D5, 0x6A }, /* GREEK PHI SYMBOL # phi1 */ + { 0x03D6, 0x76 }, /* GREEK PI SYMBOL # omega1 */ + { 0x2022, 0xB7 }, /* BULLET # bullet */ + { 0x2026, 0xBC }, /* HORIZONTAL ELLIPSIS # ellipsis */ + { 0x2032, 0xA2 }, /* PRIME # minute */ + { 0x2033, 0xB2 }, /* DOUBLE PRIME # second */ + { 0x2044, 0xA4 }, /* FRACTION SLASH # fraction */ + { 0x20AC, 0xA0 }, /* EURO SIGN # Euro */ + { 0x2111, 0xC1 }, /* BLACK-LETTER CAPITAL I # Ifraktur */ + { 0x2118, 0xC3 }, /* SCRIPT CAPITAL P # weierstrass */ + { 0x211C, 0xC2 }, /* BLACK-LETTER CAPITAL R # Rfraktur */ + { 0x2126, 0x57 }, /* OHM SIGN # Omega */ + { 0x2135, 0xC0 }, /* ALEF SYMBOL # aleph */ + { 0x2190, 0xAC }, /* LEFTWARDS ARROW # arrowleft */ + { 0x2191, 0xAD }, /* UPWARDS ARROW # arrowup */ + { 0x2192, 0xAE }, /* RIGHTWARDS ARROW # arrowright */ + { 0x2193, 0xAF }, /* DOWNWARDS ARROW # arrowdown */ + { 0x2194, 0xAB }, /* LEFT RIGHT ARROW # arrowboth */ + { 0x21B5, 0xBF }, /* DOWNWARDS ARROW WITH CORNER LEFTWARDS # carriagereturn */ + { 0x21D0, 0xDC }, /* LEFTWARDS DOUBLE ARROW # arrowdblleft */ + { 0x21D1, 0xDD }, /* UPWARDS DOUBLE ARROW # arrowdblup */ + { 0x21D2, 0xDE }, /* RIGHTWARDS DOUBLE ARROW # arrowdblright */ + { 0x21D3, 0xDF }, /* DOWNWARDS DOUBLE ARROW # arrowdbldown */ + { 0x21D4, 0xDB }, /* LEFT RIGHT DOUBLE ARROW # arrowdblboth */ + { 0x2200, 0x22 }, /* FOR ALL # universal */ + { 0x2202, 0xB6 }, /* PARTIAL DIFFERENTIAL # partialdiff */ + { 0x2203, 0x24 }, /* THERE EXISTS # existential */ + { 0x2205, 0xC6 }, /* EMPTY SET # emptyset */ + { 0x2206, 0x44 }, /* INCREMENT # Delta */ + { 0x2207, 0xD1 }, /* NABLA # gradient */ + { 0x2208, 0xCE }, /* ELEMENT OF # element */ + { 0x2209, 0xCF }, /* NOT AN ELEMENT OF # notelement */ + { 0x220B, 0x27 }, /* CONTAINS AS MEMBER # suchthat */ + { 0x220F, 0xD5 }, /* N-ARY PRODUCT # product */ + { 0x2211, 0xE5 }, /* N-ARY SUMMATION # summation */ + { 0x2212, 0x2D }, /* MINUS SIGN # minus */ + { 0x2215, 0xA4 }, /* DIVISION SLASH # fraction */ + { 0x2217, 0x2A }, /* ASTERISK OPERATOR # asteriskmath */ + { 0x221A, 0xD6 }, /* SQUARE ROOT # radical */ + { 0x221D, 0xB5 }, /* PROPORTIONAL TO # proportional */ + { 0x221E, 0xA5 }, /* INFINITY # infinity */ + { 0x2220, 0xD0 }, /* ANGLE # angle */ + { 0x2227, 0xD9 }, /* LOGICAL AND # logicaland */ + { 0x2228, 0xDA }, /* LOGICAL OR # logicalor */ + { 0x2229, 0xC7 }, /* INTERSECTION # intersection */ + { 0x222A, 0xC8 }, /* UNION # union */ + { 0x222B, 0xF2 }, /* INTEGRAL # integral */ + { 0x2234, 0x5C }, /* THEREFORE # therefore */ + { 0x223C, 0x7E }, /* TILDE OPERATOR # similar */ + { 0x2245, 0x40 }, /* APPROXIMATELY EQUAL TO # congruent */ + { 0x2248, 0xBB }, /* ALMOST EQUAL TO # approxequal */ + { 0x2260, 0xB9 }, /* NOT EQUAL TO # notequal */ + { 0x2261, 0xBA }, /* IDENTICAL TO # equivalence */ + { 0x2264, 0xA3 }, /* LESS-THAN OR EQUAL TO # lessequal */ + { 0x2265, 0xB3 }, /* GREATER-THAN OR EQUAL TO # greaterequal */ + { 0x2282, 0xCC }, /* SUBSET OF # propersubset */ + { 0x2283, 0xC9 }, /* SUPERSET OF # propersuperset */ + { 0x2284, 0xCB }, /* NOT A SUBSET OF # notsubset */ + { 0x2286, 0xCD }, /* SUBSET OF OR EQUAL TO # reflexsubset */ + { 0x2287, 0xCA }, /* SUPERSET OF OR EQUAL TO # reflexsuperset */ + { 0x2295, 0xC5 }, /* CIRCLED PLUS # circleplus */ + { 0x2297, 0xC4 }, /* CIRCLED TIMES # circlemultiply */ + { 0x22A5, 0x5E }, /* UP TACK # perpendicular */ + { 0x22C5, 0xD7 }, /* DOT OPERATOR # dotmath */ + { 0x2320, 0xF3 }, /* TOP HALF INTEGRAL # integraltp */ + { 0x2321, 0xF5 }, /* BOTTOM HALF INTEGRAL # integralbt */ + { 0x2329, 0xE1 }, /* LEFT-POINTING ANGLE BRACKET # angleleft */ + { 0x232A, 0xF1 }, /* RIGHT-POINTING ANGLE BRACKET # angleright */ + { 0x25CA, 0xE0 }, /* LOZENGE # lozenge */ + { 0x2660, 0xAA }, /* BLACK SPADE SUIT # spade */ + { 0x2663, 0xA7 }, /* BLACK CLUB SUIT # club */ + { 0x2665, 0xA9 }, /* BLACK HEART SUIT # heart */ + { 0x2666, 0xA8 }, /* BLACK DIAMOND SUIT # diamond */ + { 0xF6D9, 0xD3 }, /* COPYRIGHT SIGN SERIF # copyrightserif (CUS) */ + { 0xF6DA, 0xD2 }, /* REGISTERED SIGN SERIF # registerserif (CUS) */ + { 0xF6DB, 0xD4 }, /* TRADE MARK SIGN SERIF # trademarkserif (CUS) */ + { 0xF8E5, 0x60 }, /* RADICAL EXTENDER # radicalex (CUS) */ + { 0xF8E6, 0xBD }, /* VERTICAL ARROW EXTENDER # arrowvertex (CUS) */ + { 0xF8E7, 0xBE }, /* HORIZONTAL ARROW EXTENDER # arrowhorizex (CUS) */ + { 0xF8E8, 0xE2 }, /* REGISTERED SIGN SANS SERIF # registersans (CUS) */ + { 0xF8E9, 0xE3 }, /* COPYRIGHT SIGN SANS SERIF # copyrightsans (CUS) */ + { 0xF8EA, 0xE4 }, /* TRADE MARK SIGN SANS SERIF # trademarksans (CUS) */ + { 0xF8EB, 0xE6 }, /* LEFT PAREN TOP # parenlefttp (CUS) */ + { 0xF8EC, 0xE7 }, /* LEFT PAREN EXTENDER # parenleftex (CUS) */ + { 0xF8ED, 0xE8 }, /* LEFT PAREN BOTTOM # parenleftbt (CUS) */ + { 0xF8EE, 0xE9 }, /* LEFT SQUARE BRACKET TOP # bracketlefttp (CUS) */ + { 0xF8EF, 0xEA }, /* LEFT SQUARE BRACKET EXTENDER # bracketleftex (CUS) */ + { 0xF8F0, 0xEB }, /* LEFT SQUARE BRACKET BOTTOM # bracketleftbt (CUS) */ + { 0xF8F1, 0xEC }, /* LEFT CURLY BRACKET TOP # bracelefttp (CUS) */ + { 0xF8F2, 0xED }, /* LEFT CURLY BRACKET MID # braceleftmid (CUS) */ + { 0xF8F3, 0xEE }, /* LEFT CURLY BRACKET BOTTOM # braceleftbt (CUS) */ + { 0xF8F4, 0xEF }, /* CURLY BRACKET EXTENDER # braceex (CUS) */ + { 0xF8F5, 0xF4 }, /* INTEGRAL EXTENDER # integralex (CUS) */ + { 0xF8F6, 0xF6 }, /* RIGHT PAREN TOP # parenrighttp (CUS) */ + { 0xF8F7, 0xF7 }, /* RIGHT PAREN EXTENDER # parenrightex (CUS) */ + { 0xF8F8, 0xF8 }, /* RIGHT PAREN BOTTOM # parenrightbt (CUS) */ + { 0xF8F9, 0xF9 }, /* RIGHT SQUARE BRACKET TOP # bracketrighttp (CUS) */ + { 0xF8FA, 0xFA }, /* RIGHT SQUARE BRACKET EXTENDER # bracketrightex (CUS) */ + { 0xF8FB, 0xFB }, /* RIGHT SQUARE BRACKET BOTTOM # bracketrightbt (CUS) */ + { 0xF8FC, 0xFC }, /* RIGHT CURLY BRACKET TOP # bracerighttp (CUS) */ + { 0xF8FD, 0xFD }, /* RIGHT CURLY BRACKET MID # bracerightmid (CUS) */ + { 0xF8FE, 0xFE }, /* RIGHT CURLY BRACKET BOTTOM # bracerightbt (CUS) */ +}; + +static const FcCharMap AdobeSymbol = { + AdobeSymbolEnt, + sizeof (AdobeSymbolEnt) / sizeof (AdobeSymbolEnt[0]), +}; + +static const FcFontDecode fcFontDecoders[] = { + { ft_encoding_unicode, 0, (1 << 21) - 1 }, + { ft_encoding_symbol, &AdobeSymbol, (1 << 16) - 1 }, + { ft_encoding_apple_roman, &AppleRoman, (1 << 16) - 1 }, +}; + +#define NUM_DECODE (sizeof (fcFontDecoders) / sizeof (fcFontDecoders[0])) + +FcChar32 +FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map) +{ + int low, high, mid; + FcChar16 bmp; + + low = 0; + high = map->nent - 1; + if (ucs4 < map->ent[low].bmp || map->ent[high].bmp < ucs4) + return ~0; + while (low <= high) + { + mid = (high + low) >> 1; + bmp = map->ent[mid].bmp; + if (ucs4 == bmp) + return (FT_ULong) map->ent[mid].encode; + if (ucs4 < bmp) + high = mid - 1; + else + low = mid + 1; + } + return ~0; +} + +FcChar32 +FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map) +{ + int i; + + for (i = 0; i < map->nent; i++) + if (map->ent[i].encode == private) + return (FcChar32) map->ent[i].bmp; + return ~0; +} + +const FcCharMap * +FcFreeTypeGetPrivateMap (FT_Encoding encoding) +{ + int i; + + for (i = 0; i < NUM_DECODE; i++) + if (fcFontDecoders[i].encoding == encoding) + return fcFontDecoders[i].map; + return 0; +} + +/* + * Map a UCS4 glyph to a glyph index. Use all available encoding + * tables to try and find one that works. This information is expected + * to be cached by higher levels, so performance isn't critical + */ + +FT_UInt +FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4) +{ + int initial, offset, decode; + FT_UInt glyphindex; + FcChar32 charcode; + + initial = 0; + /* + * Find the current encoding + */ + if (face->charmap) + { + for (; initial < NUM_DECODE; initial++) + if (fcFontDecoders[initial].encoding == face->charmap->encoding) + break; + if (initial == NUM_DECODE) + initial = 0; + } + /* + * Check each encoding for the glyph, starting with the current one + */ + for (offset = 0; offset < NUM_DECODE; offset++) + { + decode = (initial + offset) % NUM_DECODE; + if (!face->charmap || face->charmap->encoding != fcFontDecoders[decode].encoding) + if (FT_Select_Charmap (face, fcFontDecoders[decode].encoding) != 0) + continue; + if (fcFontDecoders[decode].map) + { + charcode = FcFreeTypeUcs4ToPrivate (ucs4, fcFontDecoders[decode].map); + if (charcode == ~0) + continue; + } + else + charcode = ucs4; + glyphindex = FT_Get_Char_Index (face, (FT_ULong) charcode); + if (glyphindex) + return glyphindex; + } + return 0; +} + +static FcBool +FcFreeTypeCheckGlyph (FT_Face face, FcChar32 ucs4, + FT_UInt glyph, FcBlanks *blanks) +{ + FT_Int load_flags = FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING; + FT_GlyphSlot slot; + + /* + * When using scalable fonts, only report those glyphs + * which can be scaled; otherwise those fonts will + * only be available at some sizes, and never when + * transformed. Avoid this by simply reporting bitmap-only + * glyphs as missing + */ + if (face->face_flags & FT_FACE_FLAG_SCALABLE) + load_flags |= FT_LOAD_NO_BITMAP; + + if (FT_Load_Glyph (face, glyph, load_flags)) + return FcFalse; + + slot = face->glyph; + if (!glyph) + return FcFalse; + + switch (slot->format) { + case ft_glyph_format_bitmap: + /* + * Bitmaps are assumed to be reasonable; if + * this proves to be a rash assumption, this + * code can be easily modified + */ + return FcTrue; + case ft_glyph_format_outline: + /* + * Glyphs with contours are always OK + */ + if (slot->outline.n_contours != 0) + return FcTrue; + /* + * Glyphs with no contours are only OK if + * they're members of the Blanks set specified + * in the configuration. If blanks isn't set, + * then allow any glyph to be blank + */ + if (!blanks || FcBlanksIsMember (blanks, ucs4)) + return FcTrue; + /* fall through ... */ + default: + break; + } + return FcFalse; +} + +FcCharSet * +FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks) +{ + FcChar32 page, off, max, ucs4; +#ifdef CHECK + FcChar32 font_max = 0; +#endif + FcCharSet *fcs; + FcCharLeaf *leaf; + const FcCharMap *map; + int o; + int i; + FT_UInt glyph; + + fcs = FcCharSetCreate (); + if (!fcs) + goto bail0; + + for (o = 0; o < NUM_DECODE; o++) + { + if (FT_Select_Charmap (face, fcFontDecoders[o].encoding) != 0) + continue; + map = fcFontDecoders[o].map; + if (map) + { + /* + * Non-Unicode tables are easy; there's a list of all possible + * characters + */ + for (i = 0; i < map->nent; i++) + { + ucs4 = map->ent[i].bmp; + glyph = FT_Get_Char_Index (face, map->ent[i].encode); + if (glyph && FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks)) + { + leaf = FcCharSetFindLeafCreate (fcs, ucs4); + if (!leaf) + goto bail1; + leaf->map[(ucs4 & 0xff) >> 5] |= (1 << (ucs4 & 0x1f)); +#ifdef CHECK + if (ucs4 > font_max) + font_max = ucs4; +#endif + } + } + } + else + { + FT_UInt gindex; + + max = fcFontDecoders[o].max; + /* + * Find the first encoded character in the font + */ + if (FT_Get_Char_Index (face, 0)) + { + ucs4 = 0; + gindex = 1; + } + else + { + ucs4 = FT_Get_Next_Char (face, 0, &gindex); + if (!ucs4) + gindex = 0; + } + + while (gindex) + { + page = ucs4 >> 8; + leaf = 0; + while ((ucs4 >> 8) == page) + { + glyph = FT_Get_Char_Index (face, ucs4); + if (glyph && FcFreeTypeCheckGlyph (face, ucs4, + glyph, blanks)) + { + if (!leaf) + { + leaf = FcCharSetFindLeafCreate (fcs, ucs4); + if (!leaf) + goto bail1; + } + off = ucs4 & 0xff; + leaf->map[off >> 5] |= (1 << (off & 0x1f)); +#ifdef CHECK + if (ucs4 > font_max) + font_max = ucs4; +#endif + } + ucs4++; + } + ucs4 = FT_Get_Next_Char (face, ucs4 - 1, &gindex); + if (!ucs4) + gindex = 0; + } +#ifdef CHECK + for (ucs4 = 0; ucs4 < 0x10000; ucs4++) + { + FcBool FT_Has, FC_Has; + + FT_Has = FT_Get_Char_Index (face, ucs4) != 0; + FC_Has = FcCharSetHasChar (fcs, ucs4); + if (FT_Has != FC_Has) + { + printf ("0x%08x FT says %d FC says %d\n", ucs4, FT_Has, FC_Has); + } + } +#endif + } + } +#ifdef CHECK + printf ("%d glyphs %d encoded\n", (int) face->num_glyphs, FcCharSetCount (fcs)); + for (ucs4 = 0; ucs4 <= font_max; ucs4++) + { + FcBool has_char = FcFreeTypeCharIndex (face, ucs4) != 0; + FcBool has_bit = FcCharSetHasChar (fcs, ucs4); + + if (has_char && !has_bit) + printf ("Bitmap missing char 0x%x\n", ucs4); + else if (!has_char && has_bit) + printf ("Bitmap extra char 0x%x\n", ucs4); + } +#endif + return fcs; +bail1: + FcCharSetDestroy (fcs); +bail0: + return 0; +} + Index: xc/lib/fontconfig/src/fcdbg.c diff -u /dev/null xc/lib/fontconfig/src/fcdbg.c:1.11 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/src/fcdbg.c Thu Nov 21 21:12:16 2002 @@ -0,0 +1,315 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcdbg.c,v 1.11 2002/11/22 02:12:16 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 <stdio.h> +#include <stdlib.h> +#include "fcint.h" + +void +FcValuePrint (const FcValue v) +{ + switch (v.type) { + case FcTypeVoid: + printf (" <void>"); + break; + case FcTypeInteger: + printf (" %d", v.u.i); + break; + case FcTypeDouble: + printf (" %g", v.u.d); + break; + case FcTypeString: + printf (" \"%s\"", v.u.s); + break; + case FcTypeBool: + printf (" %s", v.u.b ? "FcTrue" : "FcFalse"); + break; + case FcTypeMatrix: + printf (" (%f %f; %f %f)", v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy); + break; + case FcTypeCharSet: /* XXX */ + printf (" set"); + break; + case FcTypeLangSet: + printf (" langset"); + break; + case FcTypeFTFace: + printf (" face"); + break; + } +} + +void +FcValueListPrint (const FcValueList *l) +{ + for (; l; l = l->next) + { + FcValuePrint (l->value); + if (l->binding == FcValueBindingWeak) + printf ("(w)"); + } +} + +void +FcPatternPrint (const FcPattern *p) +{ + int i; + FcPatternElt *e; + + if (!p) + { + printf ("Null pattern\n"); + return; + } + printf ("Pattern %d of %d\n", p->num, p->size); + for (i = 0; i < p->num; i++) + { + e = &p->elts[i]; + printf ("\t%s:", e->object); + FcValueListPrint (e->values); + printf ("\n"); + } + printf ("\n"); +} + +void +FcOpPrint (FcOp op) +{ + switch (op) { + case FcOpInteger: printf ("Integer"); break; + case FcOpDouble: printf ("Double"); break; + case FcOpString: printf ("String"); break; + case FcOpMatrix: printf ("Matrix"); break; + case FcOpBool: printf ("Bool"); break; + case FcOpCharSet: printf ("CharSet"); break; + case FcOpField: printf ("Field"); break; + case FcOpConst: printf ("Const"); break; + case FcOpAssign: printf ("Assign"); break; + case FcOpAssignReplace: printf ("AssignReplace"); break; + case FcOpPrepend: printf ("Prepend"); break; + case FcOpPrependFirst: printf ("PrependFirst"); break; + case FcOpAppend: printf ("Append"); break; + case FcOpAppendLast: printf ("AppendLast"); break; + case FcOpQuest: printf ("Quest"); break; + case FcOpOr: printf ("Or"); break; + case FcOpAnd: printf ("And"); break; + case FcOpEqual: printf ("Equal"); break; + case FcOpNotEqual: printf ("NotEqual"); break; + case FcOpLess: printf ("Less"); break; + case FcOpLessEqual: printf ("LessEqual"); break; + case FcOpMore: printf ("More"); break; + case FcOpMoreEqual: printf ("MoreEqual"); break; + case FcOpContains: printf ("Contains"); break; + case FcOpNotContains: printf ("NotContains"); break; + case FcOpPlus: printf ("Plus"); break; + case FcOpMinus: printf ("Minus"); break; + case FcOpTimes: printf ("Times"); break; + case FcOpDivide: printf ("Divide"); break; + case FcOpNot: printf ("Not"); break; + case FcOpNil: printf ("Nil"); break; + case FcOpComma: printf ("Comma"); break; + case FcOpInvalid: printf ("Invalid"); break; + } +} + +void +FcExprPrint (const FcExpr *expr) +{ + switch (expr->op) { + case FcOpInteger: printf ("%d", expr->u.ival); break; + case FcOpDouble: printf ("%g", expr->u.dval); break; + case FcOpString: printf ("\"%s\"", expr->u.sval); break; + case FcOpMatrix: printf ("[%g %g %g %g]", + expr->u.mval->xx, + expr->u.mval->xy, + expr->u.mval->yx, + expr->u.mval->yy); break; + case FcOpBool: printf ("%s", expr->u.bval ? "true" : "false"); break; + case FcOpCharSet: printf ("charset\n"); break; + case FcOpNil: printf ("nil\n"); break; + case FcOpField: printf ("%s", expr->u.field); break; + case FcOpConst: printf ("%s", expr->u.constant); break; + case FcOpQuest: + FcExprPrint (expr->u.tree.left); + printf (" quest "); + FcExprPrint (expr->u.tree.right->u.tree.left); + printf (" colon "); + FcExprPrint (expr->u.tree.right->u.tree.right); + break; + case FcOpAssign: + case FcOpAssignReplace: + case FcOpPrependFirst: + case FcOpPrepend: + case FcOpAppend: + case FcOpAppendLast: + case FcOpOr: + case FcOpAnd: + case FcOpEqual: + case FcOpNotEqual: + case FcOpLess: + case FcOpLessEqual: + case FcOpMore: + case FcOpMoreEqual: + case FcOpContains: + case FcOpNotContains: + case FcOpPlus: + case FcOpMinus: + case FcOpTimes: + case FcOpDivide: + case FcOpComma: + FcExprPrint (expr->u.tree.left); + printf (" "); + switch (expr->op) { + case FcOpAssign: printf ("Assign"); break; + case FcOpAssignReplace: printf ("AssignReplace"); break; + case FcOpPrependFirst: printf ("PrependFirst"); break; + case FcOpPrepend: printf ("Prepend"); break; + case FcOpAppend: printf ("Append"); break; + case FcOpAppendLast: printf ("AppendLast"); break; + case FcOpOr: printf ("Or"); break; + case FcOpAnd: printf ("And"); break; + case FcOpEqual: printf ("Equal"); break; + case FcOpNotEqual: printf ("NotEqual"); break; + case FcOpLess: printf ("Less"); break; + case FcOpLessEqual: printf ("LessEqual"); break; + case FcOpMore: printf ("More"); break; + case FcOpMoreEqual: printf ("MoreEqual"); break; + case FcOpContains: printf ("Contains"); break; + case FcOpNotContains: printf ("NotContains"); break; + case FcOpPlus: printf ("Plus"); break; + case FcOpMinus: printf ("Minus"); break; + case FcOpTimes: printf ("Times"); break; + case FcOpDivide: printf ("Divide"); break; + case FcOpComma: printf ("Comma"); break; + default: break; + } + printf (" "); + FcExprPrint (expr->u.tree.right); + break; + case FcOpNot: + printf ("Not "); + FcExprPrint (expr->u.tree.left); + break; + case FcOpInvalid: printf ("Invalid"); break; + } +} + +void +FcTestPrint (const FcTest *test) +{ + switch (test->kind) { + case FcMatchPattern: + printf ("pattern "); + break; + case FcMatchFont: + printf ("font "); + break; + } + switch (test->qual) { + case FcQualAny: + printf ("any "); + break; + case FcQualAll: + printf ("all "); + break; + case FcQualFirst: + printf ("first "); + break; + case FcQualNotFirst: + printf ("not_first "); + break; + } + printf ("%s ", test->field); + FcOpPrint (test->op); + printf (" "); + FcExprPrint (test->expr); + printf ("\n"); +} + +void +FcEditPrint (const FcEdit *edit) +{ + printf ("Edit %s ", edit->field); + FcOpPrint (edit->op); + printf (" "); + FcExprPrint (edit->expr); +} + +void +FcSubstPrint (const FcSubst *subst) +{ + FcEdit *e; + FcTest *t; + + printf ("match\n"); + for (t = subst->test; t; t = t->next) + { + printf ("\t"); + FcTestPrint (t); + } + printf ("edit\n"); + for (e = subst->edit; e; e = e->next) + { + printf ("\t"); + FcEditPrint (e); + printf (";\n"); + } + printf ("\n"); +} + +void +FcFontSetPrint (const FcFontSet *s) +{ + int i; + + printf ("FontSet %d of %d\n", s->nfont, s->sfont); + for (i = 0; i < s->nfont; i++) + { + printf ("Font %d ", i); + FcPatternPrint (s->fonts[i]); + } +} + +int +FcDebug (void) +{ + static int initialized; + static int debug; + + if (!initialized) + { + char *e; + + initialized = 1; + e = getenv ("FC_DEBUG"); + if (e) + { + printf ("FC_DEBUG=%s\n", e); + debug = atoi (e); + if (debug < 0) + debug = 0; + } + } + return debug; +} Index: xc/lib/fontconfig/src/fcdefault.c diff -u /dev/null xc/lib/fontconfig/src/fcdefault.c:1.3 --- /dev/null Thu Feb 27 12:28:08 2003 +++ xc/lib/fontconfig/src/fcdefault.c Wed Sep 25 20:17:28 2002 @@ -0,0 +1,144 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcdefault.c,v 1.3 2002/09/26 00:17:28 keithp Exp $ + * + * Copyright © 2001 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 "fcint.h" +#include <locale.h> + +static struct { + char *field; + FcBool value; +} FcBoolDefaults[] = { + { FC_HINTING, FcTrue }, /* !FT_LOAD_NO_HINTING */ + { FC_VERTICAL_LAYOUT, FcFalse }, /* FC_LOAD_VERTICAL_LAYOUT */ + { FC_AUTOHINT, FcFalse }, /* FC_LOAD_FORCE_AUTOHINT */ + { FC_GLOBAL_ADVANCE, FcTrue }, /* !FC_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */ +}; + +#define NUM_FC_BOOL_DEFAULTS (sizeof FcBoolDefaults / sizeof FcBoolDefaults[0]) + +void +FcDefaultSubstitute (FcPattern *pattern) +{ + FcValue v; + int i; + + if (FcPatternGet (pattern, FC_STYLE, 0, &v) == FcResultNoMatch) + { + if (FcPatternGet (pattern, FC_WEIGHT, 0, &v) == FcResultNoMatch ) + { + FcPatternAddInteger (pattern, FC_WEIGHT, FC_WEIGHT_MEDIUM); + } + if (FcPatternGet (pattern, FC_SLANT, 0, &v) == FcResultNoMatch) + { + FcPatternAddInteger (pattern, FC_SLANT, FC_SLANT_ROMAN); + } + } + + for (i = 0; i < NUM_FC_BOOL_DEFAULTS; i++) + if (FcPatternGet (pattern, FcBoolDefaults[i].field, 0, &v) == FcResultNoMatch) + FcPatternAddBool (pattern, FcBoolDefaults[i].field, FcBoolDefaults[i].value); + + if (FcPatternGet (pattern, FC_PIXEL_SIZE, 0, &v) == FcResultNoMatch) + { + double dpi, size, scale; + + if (FcPatternGetDouble (pattern, FC_SIZE, 0, &size) != FcResultMatch) + { + size = 12.0; + (void) FcPatternDel (pattern, FC_SIZE); + FcPatternAddDouble (pattern, FC_SIZE, size); + } + if (FcPatternGetDouble (pattern, FC_SCALE, 0, &scale) != FcResultMatch) + { + scale = 1.0; + (void) FcPatternDel (pattern, FC_SCALE); + FcPatternAddDouble (pattern, FC_SCALE, scale); + } + size *= scale; + if (FcPatternGetDouble (pattern, FC_DPI, 0, &dpi) != FcResultMatch) + { + dpi = 75.0; + (void) FcPatternDel (pattern, FC_DPI); + FcPatternAddDouble (pattern, FC_DPI, dpi); + } + size *= dpi / 72.0; + FcPatternAddDouble (pattern, FC_PIXEL_SIZE, size); + } + + if (FcPatternGet (pattern, FC_LANG, 0, &v) == FcResultNoMatch) + { + char *lang; + char *territory; + char *after; + int lang_len, territory_len; + char lang_local[128]; + char *ctype = setlocale (LC_CTYPE, NULL); + + /* + * Check if setlocale (LC_ALL, "") has been called + */ + if (!ctype || !strcmp (ctype, "C")) + { + ctype = getenv ("LC_ALL"); + if (!ctype) + { + ctype = getenv ("LC_CTYPE"); + if (!ctype) + ctype = getenv ("LANG"); + } + } + if (ctype) + { + lang = ctype; + territory = strchr (ctype, '_'); + if (territory) + { + lang_len = territory - lang; + territory = territory + 1; + after = strchr (territory, '.'); + if (!after) + { + after = strchr (territory, '@'); + if (!after) + after = territory + strlen (territory); + } + territory_len = after - territory; + if (lang_len + 1 + territory_len + 1 <= sizeof (lang_local)) + { + strncpy (lang_local, lang, lang_len); + lang_local[lang_len] = '-'; + strncpy (lang_local + lang_len + 1, territory, territory_len); + lang_local[lang_len + 1 + territory_len] = '\0'; + FcPatternAddString (pattern, FC_LANG, (FcChar8 *) lang_local); + } + } + else + FcPatternAddString (pattern, FC_LANG, (FcChar8 *) lang); + } + } + if (FcPatternGet (pattern, FC_FONTVERSION, 0, &v) == FcResultNoMatch) + { + FcPatternAddInteger (pattern, FC_FONTVERSION, 0x7fffffff); + } +} Index: xc/lib/fontconfig/src/fcdir.c diff -u /dev/null xc/lib/fontconfig/src/fcdir.c:1.10 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcdir.c Wed Sep 25 20:15:53 2002 @@ -0,0 +1,225 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcdir.c,v 1.10 2002/09/26 00:15:53 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 "fcint.h" +#include <dirent.h> + +static FcBool +FcFileIsDir (const FcChar8 *file) +{ + struct stat statb; + + if (stat ((const char *) file, &statb) != 0) + return FcFalse; + return S_ISDIR(statb.st_mode); +} + +FcBool +FcFileScan (FcFontSet *set, + FcStrSet *dirs, + FcGlobalCache *cache, + FcBlanks *blanks, + const FcChar8 *file, + FcBool force) +{ + int id; + FcChar8 *name; + FcPattern *font; + FcBool ret = FcTrue; + FcBool isDir; + int count = 0; + FcGlobalCacheFile *cache_file; + FcGlobalCacheDir *cache_dir; + FcBool need_scan; + + if (force) + cache = 0; + id = 0; + do + { + need_scan = FcTrue; + font = 0; + /* + * Check the cache + */ + if (cache) + { + if ((cache_file = FcGlobalCacheFileGet (cache, file, id, &count))) + { + /* + * Found a cache entry for the file + */ + if (FcGlobalCacheCheckTime (&cache_file->info)) + { + name = cache_file->name; + need_scan = FcFalse; + FcGlobalCacheReferenced (cache, &cache_file->info); + /* "." means the file doesn't contain a font */ + if (FcStrCmp (name, FC_FONT_FILE_INVALID) != 0) + { + font = FcNameParse (name); + if (font) + if (!FcPatternAddString (font, FC_FILE, file)) + ret = FcFalse; + } + } + } + else if ((cache_dir = FcGlobalCacheDirGet (cache, file, + strlen ((const char *) file), + FcFalse))) + { + if (FcGlobalCacheCheckTime (&cache_dir->info)) + { + font = 0; + need_scan = FcFalse; + FcGlobalCacheReferenced (cache, &cache_dir->info); + if (!FcStrSetAdd (dirs, file)) + ret = FcFalse; + } + } + } + /* + * Nothing in the cache, scan the file + */ + if (need_scan) + { + if (FcDebug () & FC_DBG_SCAN) + { + printf ("\tScanning file %s...", file); + fflush (stdout); + } + font = FcFreeTypeQuery (file, id, blanks, &count); + if (FcDebug () & FC_DBG_SCAN) + printf ("done\n"); + isDir = FcFalse; + if (!font && FcFileIsDir (file)) + { + isDir = FcTrue; + ret = FcStrSetAdd (dirs, file); + if (cache && ret) + FcGlobalCacheUpdate (cache, file, 0, FC_FONT_FILE_DIR); + } + /* + * Update the cache + */ + if (cache && font) + { + FcChar8 *unparse; + + unparse = FcNameUnparse (font); + if (unparse) + { + (void) FcGlobalCacheUpdate (cache, file, id, unparse); + FcStrFree (unparse); + } + } + } + /* + * Add the font + */ + if (font) + { + if (!FcFontSetAdd (set, font)) + { + FcPatternDestroy (font); + font = 0; + ret = FcFalse; + } + } + id++; + } while (font && ret && id < count); + return ret; +} + +#define FC_MAX_FILE_LEN 4096 + +FcBool +FcDirScan (FcFontSet *set, + FcStrSet *dirs, + FcGlobalCache *cache, + FcBlanks *blanks, + const FcChar8 *dir, + FcBool force) +{ + DIR *d; + struct dirent *e; + FcChar8 *file; + FcChar8 *base; + FcBool ret = FcTrue; + + if (!force) + { + /* + * Check fonts.cache-<version> file + */ + if (FcDirCacheReadDir (set, dirs, dir)) + return FcTrue; + + /* + * Check ~/.fonts.cache-<version> file + */ + if (cache && FcGlobalCacheScanDir (set, dirs, cache, dir)) + return FcTrue; + } + + /* freed below */ + file = (FcChar8 *) malloc (strlen ((char *) dir) + 1 + FC_MAX_FILE_LEN + 1); + if (!file) + return FcFalse; + + strcpy ((char *) file, (char *) dir); + strcat ((char *) file, "/"); + base = file + strlen ((char *) file); + + d = opendir ((char *) dir); + + if (!d) + { + free (file); + /* Don't complain about missing directories */ + if (errno == ENOENT) + return FcTrue; + return FcFalse; + } + while (ret && (e = readdir (d))) + { + if (e->d_name[0] != '.' && strlen (e->d_name) < FC_MAX_FILE_LEN) + { + strcpy ((char *) base, (char *) e->d_name); + ret = FcFileScan (set, dirs, cache, blanks, file, force); + } + } + free (file); + closedir (d); + if (ret && cache) + FcGlobalCacheUpdate (cache, dir, 0, 0); + + return ret; +} + +FcBool +FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir) +{ + return FcDirCacheWriteDir (set, dirs, dir); +} Index: xc/lib/fontconfig/src/fcfreetype.c diff -u /dev/null xc/lib/fontconfig/src/fcfreetype.c:1.12 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcfreetype.c Wed Sep 25 20:17:28 2002 @@ -0,0 +1,583 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcfreetype.c,v 1.12 2002/09/26 00:17:28 keithp Exp $ + * + * Copyright © 2001 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 <stdlib.h> +#include <stdio.h> +#include <string.h> +#include "fcint.h" +#include <freetype/freetype.h> +#include <freetype/internal/ftobjs.h> +#include <freetype/tttables.h> +#include <freetype/ftsnames.h> +#include <freetype/ttnameid.h> + +/* + * Keep Han languages separated by eliminating languages + * that the codePageRange bits says aren't supported + */ + +static const struct { + int bit; + const FcChar8 *lang; +} FcCodePageRange[] = { + { 17, (const FcChar8 *) "ja" }, + { 18, (const FcChar8 *) "zh-cn" }, + { 19, (const FcChar8 *) "ko" }, + { 20, (const FcChar8 *) "zh-tw" }, +}; + +#define NUM_CODE_PAGE_RANGE (sizeof FcCodePageRange / sizeof FcCodePageRange[0]) + +FcBool +FcFreeTypeIsExclusiveLang (const FcChar8 *lang) +{ + int i; + + for (i = 0; i < NUM_CODE_PAGE_RANGE; i++) + { + if (FcLangCompare (lang, FcCodePageRange[i].lang) != FcLangDifferentLang) + return FcTrue; + } + return FcFalse; +} + +#define FC_NAME_PRIO_LANG 0x0f00 +#define FC_NAME_PRIO_LANG_ENGLISH 0x0200 +#define FC_NAME_PRIO_LANG_LATIN 0x0100 +#define FC_NAME_PRIO_LANG_NONE 0x0000 + +#define FC_NAME_PRIO_ENC 0x00f0 +#define FC_NAME_PRIO_ENC_UNICODE 0x0010 +#define FC_NAME_PRIO_ENC_NONE 0x0000 + +#define FC_NAME_PRIO_NAME 0x000f +#define FC_NAME_PRIO_NAME_FAMILY 0x0002 +#define FC_NAME_PRIO_NAME_PS 0x0001 +#define FC_NAME_PRIO_NAME_NONE 0x0000 + +static FcBool +FcUcs4IsLatin (FcChar32 ucs4) +{ + FcChar32 page = ucs4 >> 8; + + if (page <= 2) + return FcTrue; + if (page == 0x1e) + return FcTrue; + if (0x20 <= page && page <= 0x23) + return FcTrue; + if (page == 0xfb) + return FcTrue; + if (page == 0xff) + return FcTrue; + return FcFalse; +} + +static FcBool +FcUtf8IsLatin (FcChar8 *str, int len) +{ + while (len) + { + FcChar32 ucs4; + int clen = FcUtf8ToUcs4 (str, &ucs4, len); + if (clen <= 0) + return FcFalse; + if (!FcUcs4IsLatin (ucs4)) + return FcFalse; + len -= clen; + str += clen; + } + return FcTrue; +} + +FcPattern * +FcFreeTypeQuery (const FcChar8 *file, + int id, + FcBlanks *blanks, + int *count) +{ + FT_Face face; + FcPattern *pat; + int slant; + int weight; + int i; + FcCharSet *cs; + FcLangSet *ls; + FT_Library ftLibrary; + FcChar8 *family; + FcChar8 *style; + TT_OS2 *os2; + TT_Header *head; + const FcChar8 *exclusiveLang = 0; + FT_SfntName sname; + FT_UInt snamei, snamec; + FcBool family_allocated = FcFalse; + FcBool style_allocated = FcFalse; + int family_prio = 0; + int style_prio = 0; + + if (FT_Init_FreeType (&ftLibrary)) + return 0; + + if (FT_New_Face (ftLibrary, (char *) file, id, &face)) + goto bail; + + *count = face->num_faces; + + pat = FcPatternCreate (); + if (!pat) + goto bail0; + + if (!FcPatternAddBool (pat, FC_OUTLINE, + (face->face_flags & FT_FACE_FLAG_SCALABLE) != 0)) + goto bail1; + + if (!FcPatternAddBool (pat, FC_SCALABLE, + (face->face_flags & FT_FACE_FLAG_SCALABLE) != 0)) + goto bail1; + + + slant = FC_SLANT_ROMAN; + if (face->style_flags & FT_STYLE_FLAG_ITALIC) + slant = FC_SLANT_ITALIC; + + if (!FcPatternAddInteger (pat, FC_SLANT, slant)) + goto bail1; + + weight = FC_WEIGHT_MEDIUM; + if (face->style_flags & FT_STYLE_FLAG_BOLD) + weight = FC_WEIGHT_BOLD; + + if (!FcPatternAddInteger (pat, FC_WEIGHT, weight)) + goto bail1; + + /* + * Grub through the name table looking for family + * and style names. FreeType makes quite a hash + * of them + */ + family = 0; + style = 0; + snamec = FT_Get_Sfnt_Name_Count (face); + for (snamei = 0; snamei < snamec; snamei++) + { + FcChar8 *utf8; + int len; + int wchar; + FcChar8 *src; + int src_len; + FcChar8 *u8; + FcChar32 ucs4; + int ilen, olen; + int prio = 0; + + const FcCharMap *map; + enum { + FcNameEncodingUtf16, + FcNameEncodingAppleRoman, + FcNameEncodingLatin1 + } encoding; + + + if (FT_Get_Sfnt_Name (face, snamei, &sname) != 0) + break; + + /* + * Look for Unicode strings + */ + switch (sname.platform_id) { + case TT_PLATFORM_APPLE_UNICODE: + /* + * All APPLE_UNICODE encodings are Utf16 BE + * + * Because there's no language id for Unicode, + * assume it's English + */ + prio |= FC_NAME_PRIO_LANG_ENGLISH; + prio |= FC_NAME_PRIO_ENC_UNICODE; + encoding = FcNameEncodingUtf16; + break; + case TT_PLATFORM_MACINTOSH: + switch (sname.encoding_id) { + case TT_MAC_ID_ROMAN: + encoding = FcNameEncodingAppleRoman; + break; + default: + continue; + } + switch (sname.language_id) { + case TT_MAC_LANGID_ENGLISH: + prio |= FC_NAME_PRIO_LANG_ENGLISH; + break; + default: + /* + * Sometimes Microsoft language ids + * end up in the macintosh table. This + * is often accompanied by data in + * some mystic encoding. Ignore these names + */ + if (sname.language_id >= 0x100) + continue; + break; + } + break; + case TT_PLATFORM_MICROSOFT: + switch (sname.encoding_id) { + case TT_MS_ID_UNICODE_CS: + encoding = FcNameEncodingUtf16; + prio |= FC_NAME_PRIO_ENC_UNICODE; + break; + default: + continue; + } + switch (sname.language_id & 0xff) { + case 0x09: + prio |= FC_NAME_PRIO_LANG_ENGLISH; + break; + default: + break; + } + break; + case TT_PLATFORM_ISO: + switch (sname.encoding_id) { + case TT_ISO_ID_10646: + encoding = FcNameEncodingUtf16; + prio |= FC_NAME_PRIO_ENC_UNICODE; + break; + case TT_ISO_ID_7BIT_ASCII: + case TT_ISO_ID_8859_1: + encoding = FcNameEncodingLatin1; + break; + default: + continue; + } + break; + default: + continue; + } + + /* + * Look for family and style names + */ + switch (sname.name_id) { + case TT_NAME_ID_FONT_FAMILY: + prio |= FC_NAME_PRIO_NAME_FAMILY; + break; + case TT_NAME_ID_PS_NAME: + prio |= FC_NAME_PRIO_NAME_PS; + break; + case TT_NAME_ID_FONT_SUBFAMILY: + break; + default: + continue; + } + + src = (FcChar8 *) sname.string; + src_len = sname.string_len; + + switch (encoding) { + case FcNameEncodingUtf16: + /* + * Convert Utf16 to Utf8 + */ + + if (!FcUtf16Len (src, FcEndianBig, src_len, &len, &wchar)) + continue; + + /* + * Allocate plenty of space. Freed below + */ + utf8 = malloc (len * FC_UTF8_MAX_LEN + 1); + if (!utf8) + continue; + + u8 = utf8; + + while ((ilen = FcUtf16ToUcs4 (src, FcEndianBig, &ucs4, src_len)) > 0) + { + src_len -= ilen; + src += ilen; + olen = FcUcs4ToUtf8 (ucs4, u8); + u8 += olen; + } + *u8 = '\0'; + break; + case FcNameEncodingLatin1: + /* + * Convert Latin1 to Utf8. Freed below + */ + utf8 = malloc (src_len * 2 + 1); + if (!utf8) + continue; + + u8 = utf8; + while (src_len > 0) + { + ucs4 = *src++; + src_len--; + olen = FcUcs4ToUtf8 (ucs4, u8); + u8 += olen; + } + *u8 = '\0'; + break; + case FcNameEncodingAppleRoman: + /* + * Convert AppleRoman to Utf8 + */ + map = FcFreeTypeGetPrivateMap (ft_encoding_apple_roman); + if (!map) + continue; + + /* freed below */ + utf8 = malloc (src_len * 3 + 1); + if (!utf8) + continue; + + u8 = utf8; + while (src_len > 0) + { + ucs4 = FcFreeTypePrivateToUcs4 (*src++, map); + src_len--; + olen = FcUcs4ToUtf8 (ucs4, u8); + u8 += olen; + } + *u8 = '\0'; + break; + default: + continue; + } + if ((prio & FC_NAME_PRIO_LANG) == FC_NAME_PRIO_LANG_NONE) + if (FcUtf8IsLatin (utf8, strlen ((char *) utf8))) + prio |= FC_NAME_PRIO_LANG_LATIN; + + if (FcDebug () & FC_DBG_SCANV) + printf ("\nfound name (name %d platform %d encoding %d language 0x%x prio 0x%x) %s\n", + sname.name_id, sname.platform_id, + sname.encoding_id, sname.language_id, + prio, utf8); + + switch (sname.name_id) { + case TT_NAME_ID_FONT_FAMILY: + case TT_NAME_ID_PS_NAME: + if (!family || prio > family_prio) + { + if (family) + free (family); + family = utf8; + utf8 = 0; + family_allocated = FcTrue; + family_prio = prio; + } + break; + case TT_NAME_ID_FONT_SUBFAMILY: + if (!style || prio > style_prio) + { + if (style) + free (style); + style = utf8; + utf8 = 0; + style_allocated = FcTrue; + style_prio = prio; + } + break; + } + if (utf8) + free (utf8); + } + + if (!family) + family = (FcChar8 *) face->family_name; + + if (!style) + style = (FcChar8 *) face->style_name; + + if (!family) + { + FcChar8 *start, *end; + + start = (FcChar8 *) strrchr ((char *) file, '/'); + if (start) + start++; + else + start = (FcChar8 *) file; + end = (FcChar8 *) strrchr ((char *) start, '.'); + if (!end) + end = start + strlen ((char *) start); + /* freed below */ + family = malloc (end - start + 1); + strncpy ((char *) family, (char *) start, end - start); + family[end - start] = '\0'; + family_allocated = FcTrue; + } + + if (FcDebug() & FC_DBG_SCAN) + printf ("\"%s\" \"%s\" ", family, style ? style : (FcChar8 *) "<none>"); + + if (!FcPatternAddString (pat, FC_FAMILY, family)) + { + if (family_allocated) + free (family); + if (style_allocated) + free (style); + goto bail1; + } + + if (family_allocated) + free (family); + + if (style) + { + if (!FcPatternAddString (pat, FC_STYLE, style)) + { + if (style_allocated) + free (style); + goto bail1; + } + if (style_allocated) + free (style); + } + + if (!FcPatternAddString (pat, FC_FILE, file)) + goto bail1; + + if (!FcPatternAddInteger (pat, FC_INDEX, id)) + goto bail1; + + if (!FcPatternAddString (pat, FC_SOURCE, (FcChar8 *) "FreeType")) + goto bail1; + +#if 1 + if ((face->face_flags & FT_FACE_FLAG_FIXED_WIDTH) != 0) + if (!FcPatternAddInteger (pat, FC_SPACING, FC_MONO)) + goto bail1; +#endif + + /* + * Find the font revision (if available) + */ + head = (TT_Header *) FT_Get_Sfnt_Table (face, ft_sfnt_head); + if (head) + { + if (!FcPatternAddInteger (pat, FC_FONTVERSION, head->Font_Revision)) + goto bail1; + } + else + { + if (!FcPatternAddInteger (pat, FC_FONTVERSION, 0)) + goto bail1; + } + + /* + * Get the OS/2 table and poke about + */ + os2 = (TT_OS2 *) FT_Get_Sfnt_Table (face, ft_sfnt_os2); + if (os2 && os2->version >= 0x0001 && os2->version != 0xffff) + { + for (i = 0; i < NUM_CODE_PAGE_RANGE; i++) + { + FT_ULong bits; + int bit; + if (FcCodePageRange[i].bit < 32) + { + bits = os2->ulCodePageRange1; + bit = FcCodePageRange[i].bit; + } + else + { + bits = os2->ulCodePageRange2; + bit = FcCodePageRange[i].bit - 32; + } + if (bits & (1 << bit)) + { + /* + * If the font advertises support for multiple + * "exclusive" languages, then include support + * for any language found to have coverage + */ + if (exclusiveLang) + { + exclusiveLang = 0; + break; + } + exclusiveLang = FcCodePageRange[i].lang; + } + } + } + + /* + * Compute the unicode coverage for the font + */ + cs = FcFreeTypeCharSet (face, blanks); + if (!cs) + goto bail1; + + /* + * Skip over PCF fonts that have no encoded characters; they're + * usually just Unicode fonts transcoded to some legacy encoding + */ + if (FcCharSetCount (cs) == 0) + { + if (!strcmp(FT_MODULE_CLASS(&face->driver->root)->module_name, "pcf")) + goto bail2; + } + + if (!FcPatternAddCharSet (pat, FC_CHARSET, cs)) + goto bail2; + + ls = FcFreeTypeLangSet (cs, exclusiveLang); + if (!ls) + goto bail2; + + if (!FcPatternAddLangSet (pat, FC_LANG, ls)) + goto bail2; + + /* + * Drop our reference to the charset + */ + FcCharSetDestroy (cs); + + if (!(face->face_flags & FT_FACE_FLAG_SCALABLE)) + { + for (i = 0; i < face->num_fixed_sizes; i++) + if (!FcPatternAddDouble (pat, FC_PIXEL_SIZE, + (double) face->available_sizes[i].height)) + goto bail1; + if (!FcPatternAddBool (pat, FC_ANTIALIAS, FcFalse)) + goto bail1; + } + + FT_Done_Face (face); + FT_Done_FreeType (ftLibrary); + return pat; + +bail2: + FcCharSetDestroy (cs); +bail1: + FcPatternDestroy (pat); +bail0: + FT_Done_Face (face); +bail: + FT_Done_FreeType (ftLibrary); + return 0; +} Index: xc/lib/fontconfig/src/fcfs.c diff -u /dev/null xc/lib/fontconfig/src/fcfs.c:1.2 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcfs.c Wed Jun 19 16:08:22 2002 @@ -0,0 +1,82 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcfs.c,v 1.2 2002/06/19 20:08:22 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 <stdlib.h> +#include "fcint.h" + +FcFontSet * +FcFontSetCreate (void) +{ + FcFontSet *s; + + s = (FcFontSet *) malloc (sizeof (FcFontSet)); + if (!s) + return 0; + FcMemAlloc (FC_MEM_FONTSET, sizeof (FcFontSet)); + s->nfont = 0; + s->sfont = 0; + s->fonts = 0; + return s; +} + +void +FcFontSetDestroy (FcFontSet *s) +{ + int i; + + for (i = 0; i < s->nfont; i++) + FcPatternDestroy (s->fonts[i]); + if (s->fonts) + { + FcMemFree (FC_MEM_FONTPTR, s->sfont * sizeof (FcPattern *)); + free (s->fonts); + } + FcMemFree (FC_MEM_FONTSET, sizeof (FcFontSet)); + free (s); +} + +FcBool +FcFontSetAdd (FcFontSet *s, FcPattern *font) +{ + FcPattern **f; + int sfont; + + if (s->nfont == s->sfont) + { + sfont = s->sfont + 32; + if (s->fonts) + f = (FcPattern **) realloc (s->fonts, sfont * sizeof (FcPattern *)); + else + f = (FcPattern **) malloc (sfont * sizeof (FcPattern *)); + if (!f) + return FcFalse; + if (s->sfont) + FcMemFree (FC_MEM_FONTPTR, s->sfont * sizeof (FcPattern *)); + FcMemAlloc (FC_MEM_FONTPTR, sfont * sizeof (FcPattern *)); + s->sfont = sfont; + s->fonts = f; + } + s->fonts[s->nfont++] = font; + return FcTrue; +} Index: xc/lib/fontconfig/src/fcinit.c diff -u /dev/null xc/lib/fontconfig/src/fcinit.c:1.8 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcinit.c Sat Aug 31 18:17:32 2002 @@ -0,0 +1,251 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcinit.c,v 1.8 2002/08/31 22:17:32 keithp Exp $ + * + * Copyright © 2001 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 <stdlib.h> +#include "fcint.h" + +static FcConfig * +FcInitFallbackConfig (void) +{ + FcConfig *config; + + config = FcConfigCreate (); + if (!config) + goto bail0; + if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS)) + goto bail1; + return config; + +bail1: + FcConfigDestroy (config); +bail0: + return 0; +} + +int +FcGetVersion (void) +{ + return FC_VERSION; +} + +/* + * Load the configuration files + */ +FcConfig * +FcInitLoadConfig (void) +{ + FcConfig *config; + + config = FcConfigCreate (); + if (!config) + return FcFalse; + + if (!FcConfigParseAndLoad (config, 0, FcTrue)) + { + FcConfigDestroy (config); + return FcInitFallbackConfig (); + } + + return config; +} + +/* + * Load the configuration files and scan for available fonts + */ +FcConfig * +FcInitLoadConfigAndFonts (void) +{ + FcConfig *config = FcInitLoadConfig (); + + if (!config) + return 0; + if (!FcConfigBuildFonts (config)) + { + FcConfigDestroy (config); + return 0; + } + return config; +} + +/* + * Initialize the default library configuration + */ +FcBool +FcInit (void) +{ + FcConfig *config; + + if (_fcConfig) + return FcTrue; + config = FcInitLoadConfigAndFonts (); + if (!config) + return FcTrue; + FcConfigSetCurrent (config); + if (FcDebug() & FC_DBG_MEMORY) + FcMemReport (); + return FcTrue; +} + +/* + * Reread the configuration and available font lists + */ +FcBool +FcInitReinitialize (void) +{ + FcConfig *config; + + config = FcInitLoadConfigAndFonts (); + if (!config) + return FcFalse; + FcConfigSetCurrent (config); + return FcTrue; +} + +FcBool +FcInitBringUptoDate (void) +{ + FcConfig *config = FcConfigGetCurrent (); + time_t now; + + /* + * rescanInterval == 0 disables automatic up to date + */ + if (config->rescanInterval == 0) + return FcTrue; + /* + * Check no more often than rescanInterval seconds + */ + now = time (0); + if (config->rescanTime + config->rescanInterval - now > 0) + return FcTrue; + /* + * If up to date, don't reload configuration + */ + if (FcConfigUptoDate (0)) + return FcTrue; + return FcInitReinitialize (); +} + +static struct { + char *name; + int alloc_count; + int alloc_mem; + int free_count; + int free_mem; +} FcInUse[FC_MEM_NUM] = { + { "charset" }, + { "charleaf" }, + { "fontset" }, + { "fontptr" }, + { "objectset" }, + { "objectptr" }, + { "matrix" }, + { "pattern" }, + { "patelt" }, + { "vallist" }, + { "substate" }, + { "string" }, + { "listbuck" }, + { "strset" }, + { "strlist" }, + { "config" }, + { "langset" }, + { "atomic" }, + { "blanks" }, + { "cache" }, + { "strbuf" }, + { "subst" }, + { "objecttype" }, + { "constant" }, + { "test" }, + { "expr" }, + { "vstack" }, + { "attr" }, + { "pstack" }, +}; + +static int FcAllocCount, FcAllocMem; +static int FcFreeCount, FcFreeMem; + +static int FcMemNotice = 1*1024*1024; + +static int FcAllocNotify, FcFreeNotify; + +void +FcValueListReport (void); + +void +FcMemReport (void) +{ + int i; + printf ("Fc Memory Usage:\n"); + printf ("\t Which Alloc Free Active\n"); + printf ("\t count bytes count bytes count bytes\n"); + for (i = 0; i < FC_MEM_NUM; i++) + printf ("\t%8.8s%8d%8d%8d%8d%8d%8d\n", + FcInUse[i].name, + FcInUse[i].alloc_count, FcInUse[i].alloc_mem, + FcInUse[i].free_count, FcInUse[i].free_mem, + FcInUse[i].alloc_count - FcInUse[i].free_count, + FcInUse[i].alloc_mem - FcInUse[i].free_mem); + printf ("\t%8.8s%8d%8d%8d%8d%8d%8d\n", + "Total", + FcAllocCount, FcAllocMem, + FcFreeCount, FcFreeMem, + FcAllocCount - FcFreeCount, + FcAllocMem - FcFreeMem); + FcAllocNotify = 0; + FcFreeNotify = 0; + FcValueListReport (); +} + +void +FcMemAlloc (int kind, int size) +{ + if (FcDebug() & FC_DBG_MEMORY) + { + FcInUse[kind].alloc_count++; + FcInUse[kind].alloc_mem += size; + FcAllocCount++; + FcAllocMem += size; + FcAllocNotify += size; + if (FcAllocNotify > FcMemNotice) + FcMemReport (); + } +} + +void +FcMemFree (int kind, int size) +{ + if (FcDebug() & FC_DBG_MEMORY) + { + FcInUse[kind].free_count++; + FcInUse[kind].free_mem += size; + FcFreeCount++; + FcFreeMem += size; + FcFreeNotify += size; + if (FcFreeNotify > FcMemNotice) + FcMemReport (); + } +} Index: xc/lib/fontconfig/src/fcint.h diff -u /dev/null xc/lib/fontconfig/src/fcint.h:1.28 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcint.h Wed Sep 25 20:15:54 2002 @@ -0,0 +1,639 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcint.h,v 1.28 2002/09/26 00:15:54 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. + */ + +#ifndef _FCINT_H_ +#define _FCINT_H_ + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <ctype.h> +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <time.h> +#include <fontconfig/fontconfig.h> +#include <fontconfig/fcprivate.h> +#include <fontconfig/fcfreetype.h> +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +typedef struct _FcSymbolic { + const char *name; + int value; +} FcSymbolic; + +#ifndef FC_CONFIG_PATH +#define FC_CONFIG_PATH "fonts.conf" +#endif + +#define FC_FONT_FILE_INVALID ((FcChar8 *) ".") +#define FC_FONT_FILE_DIR ((FcChar8 *) ".dir") + +#define FC_DBG_MATCH 1 +#define FC_DBG_MATCHV 2 +#define FC_DBG_EDIT 4 +#define FC_DBG_FONTSET 8 +#define FC_DBG_CACHE 16 +#define FC_DBG_CACHEV 32 +#define FC_DBG_PARSE 64 +#define FC_DBG_SCAN 128 +#define FC_DBG_SCANV 256 +#define FC_DBG_MEMORY 512 + +#define FC_MEM_CHARSET 0 +#define FC_MEM_CHARLEAF 1 +#define FC_MEM_FONTSET 2 +#define FC_MEM_FONTPTR 3 +#define FC_MEM_OBJECTSET 4 +#define FC_MEM_OBJECTPTR 5 +#define FC_MEM_MATRIX 6 +#define FC_MEM_PATTERN 7 +#define FC_MEM_PATELT 8 +#define FC_MEM_VALLIST 9 +#define FC_MEM_SUBSTATE 10 +#define FC_MEM_STRING 11 +#define FC_MEM_LISTBUCK 12 +#define FC_MEM_STRSET 13 +#define FC_MEM_STRLIST 14 +#define FC_MEM_CONFIG 15 +#define FC_MEM_LANGSET 16 +#define FC_MEM_ATOMIC 17 +#define FC_MEM_BLANKS 18 +#define FC_MEM_CACHE 19 +#define FC_MEM_STRBUF 20 +#define FC_MEM_SUBST 21 +#define FC_MEM_OBJECTTYPE 22 +#define FC_MEM_CONSTANT 23 +#define FC_MEM_TEST 24 +#define FC_MEM_EXPR 25 +#define FC_MEM_VSTACK 26 +#define FC_MEM_ATTR 27 +#define FC_MEM_PSTACK 28 + +#define FC_MEM_NUM 29 + +typedef enum _FcValueBinding { + FcValueBindingWeak, FcValueBindingStrong +} FcValueBinding; + +typedef struct _FcValueList { + struct _FcValueList *next; + FcValue value; + FcValueBinding binding; +} FcValueList; + +typedef struct _FcPatternElt { + const char *object; + FcValueList *values; +} FcPatternElt; + + +struct _FcPattern { + int num; + int size; + FcPatternElt *elts; + int ref; +}; + +typedef enum _FcOp { + FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpBool, FcOpCharSet, + FcOpNil, + FcOpField, FcOpConst, + FcOpAssign, FcOpAssignReplace, + FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast, + FcOpQuest, + FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual, FcOpContains, FcOpNotContains, + FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual, + FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide, + FcOpNot, FcOpComma, FcOpInvalid +} FcOp; + +typedef struct _FcExpr { + FcOp op; + union { + int ival; + double dval; + FcChar8 *sval; + FcMatrix *mval; + FcBool bval; + FcCharSet *cval; + char *field; + FcChar8 *constant; + struct { + struct _FcExpr *left, *right; + } tree; + } u; +} FcExpr; + +typedef enum _FcQual { + FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst +} FcQual; + +#define FcMatchDefault ((FcMatchKind) -1) + +typedef struct _FcTest { + struct _FcTest *next; + FcMatchKind kind; + FcQual qual; + const char *field; + FcOp op; + FcExpr *expr; +} FcTest; + +typedef struct _FcEdit { + struct _FcEdit *next; + const char *field; + FcOp op; + FcExpr *expr; + FcValueBinding binding; +} FcEdit; + +typedef struct _FcSubst { + struct _FcSubst *next; + FcTest *test; + FcEdit *edit; +} FcSubst; + +typedef struct _FcCharLeaf { + FcChar32 map[256/32]; +} FcCharLeaf; + +#define FC_REF_CONSTANT -1 + +struct _FcCharSet { + int ref; /* reference count */ + int num; /* size of leaves and numbers arrays */ + FcCharLeaf **leaves; + FcChar16 *numbers; +}; + +struct _FcStrSet { + int ref; /* reference count */ + int num; + int size; + FcChar8 **strs; +}; + +struct _FcStrList { + FcStrSet *set; + int n; +}; + +typedef struct _FcStrBuf { + FcChar8 *buf; + FcBool allocated; + FcBool failed; + int len; + int size; +} FcStrBuf; + +/* + * The per-user ~/.fonts.cache-<version> file is loaded into + * this data structure. Each directory gets a substructure + * which is validated by comparing the directory timestamp with + * that saved in the cache. When valid, the entire directory cache + * can be immediately loaded without reading the directory. Otherwise, + * the files are checked individually; updated files are loaded into the + * cache which is then rewritten to the users home directory + */ + +#define FC_GLOBAL_CACHE_DIR_HASH_SIZE 37 +#define FC_GLOBAL_CACHE_FILE_HASH_SIZE 67 + +typedef struct _FcGlobalCacheInfo { + unsigned int hash; + FcChar8 *file; + time_t time; + FcBool referenced; +} FcGlobalCacheInfo; + +typedef struct _FcGlobalCacheFile { + struct _FcGlobalCacheFile *next; + FcGlobalCacheInfo info; + int id; + FcChar8 *name; +} FcGlobalCacheFile; + +typedef struct _FcGlobalCacheDir FcGlobalCacheDir; + +typedef struct _FcGlobalCacheSubdir { + struct _FcGlobalCacheSubdir *next; + FcGlobalCacheDir *ent; +} FcGlobalCacheSubdir; + +struct _FcGlobalCacheDir { + struct _FcGlobalCacheDir *next; + FcGlobalCacheInfo info; + int len; + FcGlobalCacheFile *ents[FC_GLOBAL_CACHE_FILE_HASH_SIZE]; + FcGlobalCacheSubdir *subdirs; +}; + +typedef struct _FcGlobalCache { + FcGlobalCacheDir *ents[FC_GLOBAL_CACHE_DIR_HASH_SIZE]; + FcBool updated; + FcBool broken; + int entries; + int referenced; +} FcGlobalCache; + +struct _FcAtomic { + FcChar8 *file; /* original file name */ + FcChar8 *new; /* temp file name -- write data here */ + FcChar8 *lck; /* lockfile name (used for locking) */ + FcChar8 *tmp; /* tmpfile name (used for locking) */ +}; + +struct _FcBlanks { + int nblank; + int sblank; + FcChar32 *blanks; +}; + +struct _FcConfig { + /* + * File names loaded from the configuration -- saved here as the + * cache file must be consulted before the directories are scanned, + * and those directives may occur in any order + */ + FcStrSet *configDirs; /* directories to scan for fonts */ + FcChar8 *cache; /* name of per-user cache file */ + /* + * Set of allowed blank chars -- used to + * trim fonts of bogus glyphs + */ + FcBlanks *blanks; + /* + * List of directories containing fonts, + * built by recursively scanning the set + * of configured directories + */ + FcStrSet *fontDirs; + /* + * Names of all of the configuration files used + * to create this configuration + */ + FcStrSet *configFiles; /* config files loaded */ + /* + * Substitution instructions for patterns and fonts; + * maxObjects is used to allocate appropriate intermediate storage + * while performing a whole set of substitutions + */ + FcSubst *substPattern; /* substitutions for patterns */ + FcSubst *substFont; /* substitutions for fonts */ + int maxObjects; /* maximum number of tests in all substs */ + /* + * The set of fonts loaded from the listed directories; the + * order within the set does not determine the font selection, + * except in the case of identical matches in which case earlier fonts + * match preferrentially + */ + FcFontSet *fonts[FcSetApplication + 1]; + /* + * Fontconfig can periodically rescan the system configuration + * and font directories. This rescanning occurs when font + * listing requests are made, but no more often than rescanInterval + * seconds apart. + */ + time_t rescanTime; /* last time information was scanned */ + int rescanInterval; /* interval between scans */ +}; + +extern FcConfig *_fcConfig; + +typedef struct _FcCharMap FcCharMap; + +/* fcblanks.c */ + +/* fccache.c */ + +FcGlobalCache * +FcGlobalCacheCreate (void); + +void +FcGlobalCacheDestroy (FcGlobalCache *cache); + +FcBool +FcGlobalCacheCheckTime (FcGlobalCacheInfo *info); + +void +FcGlobalCacheReferenced (FcGlobalCache *cache, + FcGlobalCacheInfo *info); + +FcGlobalCacheDir * +FcGlobalCacheDirGet (FcGlobalCache *cache, + const FcChar8 *dir, + int len, + FcBool create_missing); + +FcBool +FcGlobalCacheScanDir (FcFontSet *set, + FcStrSet *dirs, + FcGlobalCache *cache, + const FcChar8 *dir); + +FcGlobalCacheFile * +FcGlobalCacheFileGet (FcGlobalCache *cache, + const FcChar8 *file, + int id, + int *count); + + +void +FcGlobalCacheLoad (FcGlobalCache *cache, + const FcChar8 *cache_file); + +FcBool +FcGlobalCacheUpdate (FcGlobalCache *cache, + const FcChar8 *file, + int id, + const FcChar8 *name); + +FcBool +FcGlobalCacheSave (FcGlobalCache *cache, + const FcChar8 *cache_file); + +FcBool +FcDirCacheReadDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); + +FcBool +FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); + +/* fccfg.c */ + +FcBool +FcConfigAddConfigDir (FcConfig *config, + const FcChar8 *d); + +FcBool +FcConfigAddFontDir (FcConfig *config, + const FcChar8 *d); + +FcBool +FcConfigAddDir (FcConfig *config, + const FcChar8 *d); + +FcBool +FcConfigAddConfigFile (FcConfig *config, + const FcChar8 *f); + +FcBool +FcConfigSetCache (FcConfig *config, + const FcChar8 *c); + +FcBool +FcConfigAddBlank (FcConfig *config, + FcChar32 blank); + +FcBool +FcConfigAddEdit (FcConfig *config, + FcTest *test, + FcEdit *edit, + FcMatchKind kind); + +void +FcConfigSetFonts (FcConfig *config, + FcFontSet *fonts, + FcSetName set); + +FcBool +FcConfigCompareValue (const FcValue m, + FcOp op, + const FcValue v); + +/* fccharset.c */ +FcCharSet * +FcCharSetFreeze (FcCharSet *cs); + +FcBool +FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c); + +FcCharSet * +FcNameParseCharSet (FcChar8 *string); + +FcChar32 +FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map); + +FcChar32 +FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map); + +const FcCharMap * +FcFreeTypeGetPrivateMap (FT_Encoding encoding); + +/* fcdbg.c */ +void +FcValueListPrint (const FcValueList *l); + +void +FcOpPrint (FcOp op); + +void +FcTestPrint (const FcTest *test); + +void +FcExprPrint (const FcExpr *expr); + +void +FcEditPrint (const FcEdit *edit); + +void +FcSubstPrint (const FcSubst *subst); + +int +FcDebug (void); + +/* fcdir.c */ + +/* fcfont.c */ +int +FcFontDebug (void); + +/* fcfreetype.c */ +FcBool +FcFreeTypeIsExclusiveLang (const FcChar8 *lang); + +FcBool +FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang); + +/* fcfs.c */ +/* fcgram.y */ +int +FcConfigparse (void); + +int +FcConfigwrap (void); + +void +FcConfigerror (char *fmt, ...); + +char * +FcConfigSaveField (const char *field); + +FcTest * +FcTestCreate (FcMatchKind kind, + FcQual qual, + const FcChar8 *field, + FcOp compare, + FcExpr *expr); + +void +FcTestDestroy (FcTest *test); + +FcExpr * +FcExprCreateInteger (int i); + +FcExpr * +FcExprCreateDouble (double d); + +FcExpr * +FcExprCreateString (const FcChar8 *s); + +FcExpr * +FcExprCreateMatrix (const FcMatrix *m); + +FcExpr * +FcExprCreateBool (FcBool b); + +FcExpr * +FcExprCreateNil (void); + +FcExpr * +FcExprCreateField (const char *field); + +FcExpr * +FcExprCreateConst (const FcChar8 *constant); + +FcExpr * +FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right); + +void +FcExprDestroy (FcExpr *e); + +FcEdit * +FcEditCreate (const char *field, FcOp op, FcExpr *expr, FcValueBinding binding); + +void +FcEditDestroy (FcEdit *e); + +/* fcinit.c */ + +void +FcMemReport (void); + +void +FcMemAlloc (int kind, int size); + +void +FcMemFree (int kind, int size); + +/* fclang.c */ +FcLangSet * +FcFreeTypeLangSet (const FcCharSet *charset, + const FcChar8 *exclusiveLang); + +FcLangResult +FcLangCompare (const FcChar8 *s1, const FcChar8 *s2); + +const FcCharSet * +FcCharSetForLang (const FcChar8 *lang); + +FcLangSet * +FcLangSetPromote (const FcChar8 *lang); + +FcLangSet * +FcNameParseLangSet (const FcChar8 *string); + +FcBool +FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls); + +/* fclist.c */ + +/* fcmatch.c */ + +/* fcname.c */ + +FcBool +FcNameBool (FcChar8 *v, FcBool *result); + +/* fcpat.c */ +void +FcValueListDestroy (FcValueList *l); + +FcPatternElt * +FcPatternFindElt (const FcPattern *p, const char *object); + +FcPatternElt * +FcPatternInsertElt (FcPattern *p, const char *object); + +FcBool +FcPatternAddWithBinding (FcPattern *p, + const char *object, + FcValue value, + FcValueBinding binding, + FcBool append); + +FcPattern * +FcPatternFreeze (FcPattern *p); + +/* fcrender.c */ + +/* fcmatrix.c */ + +extern const FcMatrix FcIdentityMatrix; + +void +FcMatrixFree (FcMatrix *mat); + +/* fcstr.c */ +FcChar8 * +FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); + +void +FcStrFree (FcChar8 *s); + +void +FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size); + +void +FcStrBufDestroy (FcStrBuf *buf); + +FcChar8 * +FcStrBufDone (FcStrBuf *buf); + +FcBool +FcStrBufChar (FcStrBuf *buf, FcChar8 c); + +FcBool +FcStrBufString (FcStrBuf *buf, const FcChar8 *s); + +FcBool +FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len); + +int +FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); + +#endif /* _FC_INT_H_ */ Index: xc/lib/fontconfig/src/fcknownsets.h diff -u /dev/null xc/lib/fontconfig/src/fcknownsets.h:1.1 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcknownsets.h Sat Jun 29 16:31:02 2002 @@ -0,0 +1,1895 @@ +/* total size: 412 unique leaves: 403 */ + +static const FcCharLeaf leaves[403] = { + { { /* 0 */ + 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, + } }, + { { /* 1 */ + 0xfffffffe, 0x87ffffff, 0x0fffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 2 */ + 0x33180000, 0x00000044, 0x00000000, 0x00000000, + 0x00000000, 0x00001000, 0x00000000, 0x00000000, + } }, + { { /* 3 */ + 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 4 */ + 0x43722f8b, 0x0b042000, 0xe340e82c, 0x40c82800, + 0x49375944, 0x04407976, 0xa3f02c93, 0x08c50038, + } }, + { { /* 5 */ + 0x0003ee02, 0x35508000, 0x1e23e1c8, 0xc4498200, + 0x2942ad5a, 0x8060c000, 0xa49a461c, 0x052ac003, + } }, + { { /* 6 */ + 0xd6462a44, 0x08003dda, 0x14208388, 0x01700020, + 0x03022021, 0x40ac3000, 0x44628620, 0x8a0020a0, + } }, + { { /* 7 */ + 0x80040253, 0x14840402, 0x10047bfb, 0x11e27fa4, + 0x00a42441, 0x20c01421, 0x70003a50, 0x27430002, + } }, + { { /* 8 */ + 0x208245c9, 0x0fc14630, 0x28503c88, 0xa0248602, + 0x88062388, 0x40000e19, 0xeb6422aa, 0xcd28001c, + } }, + { { /* 9 */ + 0x02e1a120, 0x8200840b, 0x549e279b, 0xa0b38141, + 0x85080010, 0x08002061, 0x08d02f08, 0x010fbe3e, + } }, + { { /* 10 */ + 0xa803f718, 0x5b080a41, 0x00020504, 0x382a0500, + 0x00015041, 0x21081910, 0x00000313, 0x04046122, + } }, + { { /* 11 */ + 0x100140d0, 0x40228000, 0x40488050, 0x10000008, + 0x370006d1, 0x00005e80, 0x941000a0, 0x60000018, + } }, + { { /* 12 */ + 0x00900240, 0x00548000, 0x00080000, 0x00100900, + 0x00000040, 0x10105020, 0x4c022400, 0x06010001, + } }, + { { /* 13 */ + 0x814c2918, 0x08012100, 0x00036485, 0x10214452, + 0x00080904, 0x0000000d, 0x80004988, 0x16910001, + } }, + { { /* 14 */ + 0x40000765, 0x04338492, 0x45928c00, 0x52200016, + 0xd0080228, 0x4c084300, 0xc32a40a2, 0x2e009810, + } }, + { { /* 15 */ + 0x16708000, 0x40826e84, 0x04b3c390, 0x21187c85, + 0x02c8041c, 0x4a001120, 0x361b0a48, 0x89005540, + } }, + { { /* 16 */ + 0x9902000a, 0x10400221, 0x04000242, 0x00000044, + 0x0c040000, 0x00000010, 0x00001216, 0x00000242, + } }, + { { /* 17 */ + 0x00401a20, 0x00000400, 0xb5b30009, 0x15230a18, + 0x1fe89ba0, 0x8379507c, 0xc09d10fd, 0x0560dbf6, + } }, + { { /* 18 */ + 0x0242ef92, 0xdf020110, 0x08226961, 0x02029035, + 0x00030000, 0x45aa1a02, 0x02000001, 0x28518101, + } }, + { { /* 19 */ + 0x02d26080, 0x00000280, 0x00011800, 0x00009200, + 0x20000880, 0x35000405, 0x60442000, 0x609e49e6, + } }, + { { /* 20 */ + 0x2a42104c, 0xa1482820, 0x802010b1, 0x7b9c000e, + 0x14a08490, 0x41e028c1, 0x8c490704, 0x0cc8100d, + } }, + { { /* 21 */ + 0x89ba8412, 0x142202c0, 0x0ac05500, 0x92833ec4, + 0x43871ca3, 0x22a04703, 0x03c03028, 0xa0200801, + } }, + { { /* 22 */ + 0x30448000, 0x000085a3, 0x2225200e, 0x0001b73c, + 0x8c503220, 0x315d0099, 0x940200a0, 0x0e4b0003, + } }, + { { /* 23 */ + 0x8c20e342, 0xd0910080, 0xa3281d94, 0x60c1499c, + 0x07134406, 0x44445a90, 0x00000f88, 0x95c40040, + } }, + { { /* 24 */ + 0x84477581, 0xc0534402, 0x01082b83, 0x92424000, + 0x09a60611, 0x32220800, 0x1bddb384, 0xc08af000, + } }, + { { /* 25 */ + 0x00020282, 0x6c008800, 0x00219200, 0x8c844180, + 0x09441308, 0x000007a7, 0x0c418051, 0x00d06002, + } }, + { { /* 26 */ + 0x10d0a000, 0x44003004, 0x01000000, 0x07008201, + 0x440e0100, 0x08056830, 0x051464b2, 0x441410e6, + } }, + { { /* 27 */ + 0x21000011, 0xcbc09c08, 0x40c2e120, 0x41b4304c, + 0x9a8310ac, 0x328198b2, 0x00849822, 0xbc123369, + } }, + { { /* 28 */ + 0xc03bd6c0, 0x0c53a1a1, 0xea008a1e, 0x05d8cbf0, + 0x21c34390, 0x4a1c4805, 0x324002d0, 0xd79d0041, + } }, + { { /* 29 */ + 0xe8b02b09, 0x24527dc0, 0xd04bc240, 0xc8aba000, + 0x34a98a80, 0x41c98000, 0x241f8010, 0x487b9200, + } }, + { { /* 30 */ + 0x00cc0000, 0x33008406, 0x001b410f, 0x80402000, + 0xa0988022, 0x006ba186, 0x85a42a30, 0x06044181, + } }, + { { /* 31 */ + 0x00046021, 0xa0010080, 0x46b80400, 0x03a0e90f, + 0x18200000, 0x081040a0, 0x0001380a, 0xa8000500, + } }, + { { /* 32 */ + 0xc28a0404, 0x2720000a, 0x830c0910, 0x00000802, + 0x10806211, 0x0808000c, 0x0c08000c, 0x08400000, + } }, + { { /* 33 */ + 0x00441410, 0x6404000b, 0x800150c0, 0x8984047e, + 0x41400658, 0x94a4c000, 0x09dca862, 0x00001800, + } }, + { { /* 34 */ + 0x000a8100, 0x41900008, 0xe4a14007, 0x64452501, + 0x0e7d11ee, 0xfb084800, 0x08a81616, 0x0009c92e, + } }, + { { /* 35 */ + 0x4a821800, 0x6b6406a0, 0x16000002, 0x83905648, + 0x002a73a0, 0x00248000, 0x470288f9, 0x0faa4d02, + } }, + { { /* 36 */ + 0x8e800000, 0x7554b87b, 0xd9402418, 0x040cc880, + 0xb0410000, 0x04428c24, 0x001a5a34, 0xc1108000, + } }, + { { /* 37 */ + 0x00328046, 0x8106180d, 0xcd920002, 0x74016014, + 0x00916112, 0x420ac098, 0x8420040f, 0x40029a13, + } }, + { { /* 38 */ + 0xfd228a62, 0x40808188, 0x21031000, 0x31010808, + 0x07044420, 0x0388b812, 0xa3008900, 0x22020000, + } }, + { { /* 39 */ + 0x46001210, 0x00410042, 0x52415680, 0x200052f0, + 0x82148610, 0x46021004, 0x8035430a, 0xd80060e0, + } }, + { { /* 40 */ + 0x08010041, 0x6c653400, 0xab0411c1, 0x22040286, + 0x00000003, 0x00009084, 0x02814015, 0x33000202, + } }, + { { /* 41 */ + 0x38400400, 0xc0c00e20, 0x00850030, 0x0d250500, + 0x81d04ad0, 0x020c2280, 0x6240b605, 0x62802679, + } }, + { { /* 42 */ + 0x080802ea, 0x8579dd67, 0xdea0081b, 0x40008735, + 0xd1000a8c, 0xa22505aa, 0x15108440, 0x0080404d, + } }, + { { /* 43 */ + 0x8d220012, 0x058f1968, 0x3a1a9080, 0x85618464, + 0x2002ccc0, 0x732e0820, 0x0b3420a4, 0x14150004, + } }, + { { /* 44 */ + 0x82002001, 0x08000057, 0x00445004, 0x79051212, + 0x000940d0, 0x84004000, 0xd844054c, 0x5114409a, + } }, + { { /* 45 */ + 0x40000b12, 0x15800201, 0x08002001, 0xc200084a, + 0x40020800, 0x98093020, 0x18800000, 0x0008e22c, + } }, + { { /* 46 */ + 0x00040004, 0x001410e0, 0x20008020, 0x10009800, + 0x00827082, 0x1c000288, 0x00014c22, 0x08209100, + } }, + { { /* 47 */ + 0x00404002, 0x44001c00, 0x7cc10383, 0x84002121, + 0x0002e002, 0xe20a44c0, 0x81260e03, 0x080002d0, + } }, + { { /* 48 */ + 0x96902921, 0xb8c24001, 0x00806241, 0xa6510a06, + 0x812c0112, 0x0400c600, 0xa2800cb0, 0x8640a429, + } }, + { { /* 49 */ + 0x4a028000, 0x02003041, 0x0057ba40, 0x20205001, + 0x24b08880, 0x01122002, 0x000402d3, 0x00000211, + } }, + { { /* 50 */ + 0x40040080, 0xe0000c82, 0x00003008, 0x00081011, + 0x81a40208, 0x420e40a0, 0xc0400400, 0x48000081, + } }, + { { /* 51 */ + 0x0f912df5, 0x0629d807, 0x4001007c, 0x824e4546, + 0x1008c000, 0xed363005, 0x65400c80, 0x0810930b, + } }, + { { /* 52 */ + 0xe8200600, 0x6082c80a, 0x403400ca, 0x12012e02, + 0x19489004, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 53 */ + 0x00000000, 0x05400000, 0x00311000, 0x02a54c00, + 0x44105520, 0x23040310, 0x80345422, 0x12010a03, + } }, + { { /* 54 */ + 0x01a1126b, 0xa0482000, 0x45400448, 0xe08d8000, + 0x28401af0, 0x04168626, 0x4c005018, 0x21120032, + } }, + { { /* 55 */ + 0x0d0005e4, 0x42008a08, 0x00334800, 0x87030860, + 0x34008501, 0xe4280109, 0x81002045, 0x5c1825a8, + } }, + { { /* 56 */ + 0xd80435a0, 0x02e01c02, 0x020000a1, 0x4146c050, + 0xa6046800, 0xbb8af260, 0xc8b60000, 0x600200e2, + } }, + { { /* 57 */ + 0x0080023e, 0x03728900, 0x00068681, 0x08880000, + 0x41404600, 0x20000e04, 0x10481622, 0x22178a00, + } }, + { { /* 58 */ + 0x00007418, 0x21021200, 0x08800200, 0x0420984a, + 0x12110000, 0x99040002, 0x04022a55, 0x10105000, + } }, + { { /* 59 */ + 0x459a0000, 0xa000b02a, 0x0208420a, 0x00002708, + 0x08128090, 0x04018740, 0x3020e202, 0x8c800630, + } }, + { { /* 60 */ + 0x04c004c4, 0x80002000, 0xd8314000, 0x02000080, + 0x00081400, 0x00000218, 0x8a100880, 0x40002010, + } }, + { { /* 61 */ + 0x1500010d, 0x00000000, 0x80a04000, 0x01500140, + 0x80002004, 0x04080004, 0x00000010, 0x4a049001, + } }, + { { /* 62 */ + 0x80000020, 0x0842000c, 0x2a8c3041, 0xc085090e, + 0x40c42906, 0x00100800, 0xb2308006, 0x21380102, + } }, + { { /* 63 */ + 0x030d0080, 0x09400420, 0x80000012, 0x80040410, + 0x004888ca, 0x24040602, 0x00040001, 0x01100008, + } }, + { { /* 64 */ + 0xa9c8550d, 0x0c522428, 0x48310000, 0x022f624d, + 0x412830a0, 0xd205057b, 0x1844a894, 0x45c26cc2, + } }, + { { /* 65 */ + 0x2ed14017, 0x02081901, 0x1500c202, 0x20919040, + 0x044d0401, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 66 */ + 0x00000000, 0x80800000, 0x04201542, 0x06000c02, + 0x60001404, 0xb9d99f87, 0x540a059f, 0x3810245d, + } }, + { { /* 67 */ + 0x004825b0, 0x00000000, 0x00000000, 0x00990850, + 0x02000420, 0x44080108, 0x28009840, 0x0008810a, + } }, + { { /* 68 */ + 0x40018400, 0x00210400, 0x82000794, 0x00500001, + 0x00002482, 0x00001c00, 0x80043c01, 0x49000800, + } }, + { { /* 69 */ + 0xf83c0228, 0xcb0886c0, 0xa0006230, 0x00000004, + 0x18000000, 0x0007a148, 0x00124024, 0x22852c40, + } }, + { { /* 70 */ + 0xe6b3a96f, 0x5126400f, 0x723b6c86, 0xb5a4e20b, + 0x0222859f, 0x0123854c, 0x40000402, 0x20202102, + } }, + { { /* 71 */ + 0x02240004, 0x00042080, 0x00047e00, 0x01a01604, + 0x10042a80, 0x0032d800, 0x3183fa81, 0x00200488, + } }, + { { /* 72 */ + 0x40872000, 0x84100000, 0x48800221, 0x00000074, + 0x114a0029, 0x02c80000, 0x00049000, 0x11000410, + } }, + { { /* 73 */ + 0xc5010010, 0x0000c957, 0x08102d00, 0x50204000, + 0x04501000, 0x00013088, 0x40020008, 0x00400012, + } }, + { { /* 74 */ + 0x01000010, 0x01200820, 0x08060010, 0xa0000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 75 */ + 0x00000000, 0x00000000, 0x00000000, 0x00800000, + 0x011e8a09, 0x18022138, 0x10700480, 0x00000006, + } }, + { { /* 76 */ + 0x10000000, 0x88044402, 0xf8013815, 0x21e9041c, + 0x1b306c60, 0x08820588, 0x1a607af3, 0x0ac5870c, + } }, + { { /* 77 */ + 0x524a00c1, 0x22050080, 0x50420114, 0x04902206, + 0x0000a800, 0x00002901, 0x10080840, 0x88480000, + } }, + { { /* 78 */ + 0x018f156f, 0x0b012000, 0x45107040, 0x000088a0, + 0x00000000, 0x00028100, 0x98000090, 0x7010e006, + } }, + { { /* 79 */ + 0x41091608, 0x00000101, 0x00963a20, 0x00000000, + 0x22400000, 0x021a7120, 0xa2270002, 0x80022000, + } }, + { { /* 80 */ + 0x0200c102, 0x00c10800, 0x8ca02029, 0x00000624, + 0x00000000, 0x01000100, 0x01180000, 0x00004020, + } }, + { { /* 81 */ + 0x04000000, 0x10020480, 0x0410803e, 0x00008000, + 0x80024000, 0x00004800, 0x00400200, 0x00000110, + } }, + { { /* 82 */ + 0x00252000, 0x08040020, 0x00800280, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x005802a0, + } }, + { { /* 83 */ + 0x08000200, 0x08000140, 0x20020000, 0x00041003, + 0x00000000, 0x00108200, 0x00800010, 0x07040000, + } }, + { { /* 84 */ + 0x44000000, 0x00000000, 0x00000000, 0xa2200000, + 0xa08c0000, 0x48300020, 0x59126008, 0x00100100, + } }, + { { /* 85 */ + 0x00084180, 0x08000001, 0x80044c00, 0x00801482, + 0x10212000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 86 */ + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + } }, + { { /* 87 */ + 0x00000fff, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 88 */ + 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00530180, 0x00800000, 0x00800000, + } }, + { { /* 89 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xfffe0000, 0xfffe03fb, 0x000003fb, 0x00000000, + } }, + { { /* 90 */ + 0xffff0002, 0xffffffff, 0x0002ffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 91 */ + 0x33210000, 0x080d0063, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 92 */ + 0x00400008, 0x00000802, 0x00000000, 0x03ff03ff, + 0x000f0000, 0x00000000, 0x00140000, 0x00000000, + } }, + { { /* 93 */ + 0xe402098d, 0x20305fa1, 0x00040000, 0x00000cc3, + 0x000000cc, 0x80000020, 0x00000000, 0x00000000, + } }, + { { /* 94 */ + 0x00040000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 95 */ + 0x00000000, 0x00000000, 0x00000000, 0x000fffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 96 */ + 0x3999900f, 0x99999939, 0x00000804, 0x00000000, + 0x00000000, 0x300c0003, 0x0000c8c0, 0x00008000, + } }, + { { /* 97 */ + 0x00000060, 0x00000000, 0x00000005, 0x0000a400, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 98 */ + 0xa03fffef, 0x00000000, 0xfffffffe, 0xffffffff, + 0x780fffff, 0xfffffffe, 0xffffffff, 0x787fffff, + } }, + { { /* 99 */ + 0x00000000, 0x02060000, 0x00000000, 0x00000000, + 0x00000000, 0x000001f0, 0x00000000, 0x00000000, + } }, + { { /* 100 */ + 0x01102008, 0x084008cc, 0x00822600, 0x78000000, + 0x7000c000, 0x00000002, 0x00002010, 0x00000000, + } }, + { { /* 101 */ + 0x43f36f8b, 0x9b462542, 0xe3e0e82c, 0x400a0004, + 0xdb365f65, 0x04497977, 0xe3f0ecd7, 0x18c5603a, + } }, + { { /* 102 */ + 0x3403e60b, 0x37518000, 0x7eebe0c8, 0x98698200, + 0x2d56ad48, 0x8060e803, 0xad93661c, 0xc568c03a, + } }, + { { /* 103 */ + 0xc656aa60, 0x02403f7e, 0x146183cd, 0x21751020, + 0x07122021, 0x40bc3000, 0x4562a624, 0x0a3060a8, + } }, + { { /* 104 */ + 0x85740217, 0x9c840402, 0x14157ffb, 0x11e27f34, + 0x22efb665, 0x60ff1f75, 0x38403a70, 0x676336c3, + } }, + { { /* 105 */ + 0x20b24dd9, 0x0fc946b0, 0x4850bc98, 0xa03f8638, + 0x98162388, 0x5232be49, 0xeba422ab, 0xc72c00dd, + } }, + { { /* 106 */ + 0x26e1a1e7, 0x8f0a841b, 0x559e27eb, 0x89bfc241, + 0x85480014, 0x084d6361, 0xaad07f0c, 0x05cfff3e, + } }, + { { /* 107 */ + 0xa803ff1a, 0x7b407a41, 0x80024745, 0x38eb0500, + 0x1005dc51, 0x710c9b34, 0x01000397, 0xa4046366, + } }, + { { /* 108 */ + 0x005180d0, 0x430ac000, 0x30c89071, 0x58000008, + 0xf7000ed9, 0x00415f80, 0x941000b0, 0x62800018, + } }, + { { /* 109 */ + 0x09d00240, 0x01568200, 0x08015004, 0x05101d10, + 0x001084c1, 0x10504025, 0x4d8a410f, 0xa60d4009, + } }, + { { /* 110 */ + 0x914cab19, 0x098121c0, 0x0203c485, 0x80000672, + 0x00080b04, 0x0009141d, 0x905c49c9, 0x16900009, + } }, + { { /* 111 */ + 0x22200c65, 0x24338412, 0x47960c03, 0x42250a04, + 0xd0880028, 0x4f0c4900, 0xd3aa14a2, 0x3e87d830, + } }, + { { /* 112 */ + 0x1f618e04, 0x41867ea4, 0x2dbbc390, 0x211857ad, + 0x2a48241e, 0x4e041138, 0x161b0a40, 0x88400d60, + } }, + { { /* 113 */ + 0x9502020a, 0x10608221, 0x04000243, 0x80001444, + 0x0c040000, 0x70000000, 0x00c11a06, 0x0c00024a, + } }, + { { /* 114 */ + 0x00401a00, 0x40451404, 0xbdf30029, 0x052b0a78, + 0xbfa0bba9, 0x8379407c, 0xe91d12fd, 0xc5695bf6, + } }, + { { /* 115 */ + 0x444aeff6, 0xff022115, 0x402bed63, 0x0242d033, + 0x00131000, 0x5dca1b42, 0x020000a0, 0x2c61a703, + } }, + { { /* 116 */ + 0x8ff24880, 0x00000284, 0x100d5804, 0x0048b200, + 0x20011894, 0x37805004, 0x684d3200, 0x68be49ea, + } }, + { { /* 117 */ + 0x2e42184c, 0x21c9a820, 0x80b050b9, 0xff7c001e, + 0x14e0849a, 0x01e028c1, 0xac49870e, 0xdddb130f, + } }, + { { /* 118 */ + 0x89fbbe1a, 0x51b2a2e2, 0x32ca5522, 0x928b3ec6, + 0x438f1dbf, 0x32986703, 0x73c03028, 0xa9230811, + } }, + { { /* 119 */ + 0x3a65c000, 0x04028fe3, 0xa6252c4e, 0x00a1bf3d, + 0x8cd43e3a, 0x317c06c9, 0xd52a00e0, 0x0edf018b, + } }, + { { /* 120 */ + 0x8c22e34b, 0xf0911183, 0xa7287d94, 0x40fbc9ac, + 0x07534484, 0x44445a90, 0x00013fc8, 0xf5d40048, + } }, + { { /* 121 */ + 0xec5f7701, 0x891dc442, 0x49286b83, 0xd2424109, + 0x59fe061d, 0x3a221840, 0x3b9fb7e4, 0xc0eaf003, + } }, + { { /* 122 */ + 0x82021386, 0xe4008980, 0x10a1b200, 0x0cc44b80, + 0x8944d309, 0x48341faf, 0x0c458259, 0x0470420a, + } }, + { { /* 123 */ + 0x10c8a040, 0x44503140, 0x01004004, 0x05408281, + 0x642c0108, 0x1a056a30, 0x051460a6, 0x645690cf, + } }, + { { /* 124 */ + 0x31000021, 0xcbf09c18, 0x63e2e120, 0x01b5104c, + 0x9a83538c, 0x3281b8b2, 0x0a84987a, 0x0c0233e7, + } }, + { { /* 125 */ + 0xd038d6cd, 0x9872e1b1, 0xe2848a1e, 0x0459c3f4, + 0x23c2439a, 0xd3144845, 0x36400292, 0xffbd0241, + } }, + { { /* 126 */ + 0xe8f0eb09, 0xa5d27dc0, 0xd24bc242, 0xd0afa47f, + 0x34a11aa0, 0x0bd88247, 0x651bc453, 0xc83ad294, + } }, + { { /* 127 */ + 0x40c8001e, 0x33140e06, 0xb21f615f, 0xc0d00088, + 0xa898a02a, 0x166ba1c5, 0x85b4af50, 0x0604c08b, + } }, + { { /* 128 */ + 0x1e04f933, 0xa251056e, 0x76380400, 0x73b8ed07, + 0x19324406, 0xc8164081, 0x63097c8a, 0xaa042984, + } }, + { { /* 129 */ + 0xca9c1c24, 0x27614e0e, 0x830009d0, 0xc10c0846, + 0x10816011, 0x0908540d, 0xcc0a000e, 0x0c000514, + } }, + { { /* 130 */ + 0xa0440430, 0x6784008b, 0x8a195288, 0x8b18865e, + 0x41602e59, 0x9cbe8c10, 0x895c6861, 0x00089800, + } }, + { { /* 131 */ + 0x089a8100, 0xc1900018, 0xf4a14007, 0x640d8505, + 0x0e4d314e, 0xff0a4806, 0x2ea81632, 0x000b852e, + } }, + { { /* 132 */ + 0xca841810, 0x696c0e20, 0x16000032, 0x0390d658, + 0x1a6851a0, 0x11249000, 0x432698e1, 0x1fae5d52, + } }, + { { /* 133 */ + 0xae280fa0, 0x5700fafb, 0x99406408, 0xc044c880, + 0xb1419005, 0xa4c48424, 0x603a1a34, 0xc1949000, + } }, + { { /* 134 */ + 0x003a8246, 0xc106180d, 0x99100022, 0x1511e050, + 0x00824157, 0x022a041a, 0x8930004f, 0x446ad813, + } }, + { { /* 135 */ + 0xed228aa2, 0x400511c0, 0x01021000, 0x31018808, + 0x02044620, 0x0f08f800, 0xa2008900, 0x22020000, + } }, + { { /* 136 */ + 0x16108210, 0x10400042, 0x126052c0, 0x200052f4, + 0x82308510, 0x42021100, 0x80b5430a, 0xda2070e1, + } }, + { { /* 137 */ + 0x08012040, 0xfc653500, 0xab0419c1, 0x62140286, + 0x00440087, 0x42469085, 0x0a85405c, 0x33803207, + } }, + { { /* 138 */ + 0xb8c00400, 0xc0d0ce30, 0x0080c030, 0x0da50508, + 0x00400a90, 0x280c0200, 0x40446705, 0x41226429, + } }, + { { /* 139 */ + 0x000002e8, 0x847c4664, 0xde200002, 0x4049861d, + 0xc0000a08, 0x20010084, 0x10108400, 0x01c742cd, + } }, + { { /* 140 */ + 0xd52a703a, 0x1d8f9968, 0x3e12be50, 0x81d9aef5, + 0x2412cec4, 0x732e0828, 0x4b3424ac, 0xd41d020c, + } }, + { { /* 141 */ + 0x80002a02, 0x08110097, 0x114411c4, 0x7d451786, + 0x5e4949dd, 0x87914040, 0xd8c4254c, 0x491444ba, + } }, + { { /* 142 */ + 0xc8001b92, 0x15800271, 0x0c0000c1, 0xc200096a, + 0x40024800, 0xba493021, 0x1c802080, 0x1008e2ac, + } }, + { { /* 143 */ + 0x00341004, 0x841400e3, 0x20004020, 0x14149810, + 0x04aa70c2, 0x54208688, 0x04130c62, 0x20109180, + } }, + { { /* 144 */ + 0x02064082, 0x54011c40, 0xe4e90383, 0x84802125, + 0x2810e433, 0xe60944c0, 0x81260a03, 0x080112da, + } }, + { { /* 145 */ + 0x97906901, 0xf8864001, 0x0081e24d, 0xa6510a0e, + 0x81ec011a, 0x8441c600, 0xb62eadb8, 0x8741acef, + } }, + { { /* 146 */ + 0x4b028d54, 0x02681161, 0x2057bb60, 0x043350a0, + 0xf7b4a8c0, 0x01122402, 0x20009ad3, 0x00c82271, + } }, + { { /* 147 */ + 0x809e2081, 0xe1800c8a, 0x8151b009, 0x40281031, + 0x89a52a0e, 0x620e69b6, 0xd1444425, 0x4d548085, + } }, + { { /* 148 */ + 0x1fb12c75, 0x862dd807, 0x5841d97c, 0x226e414e, + 0x9e088200, 0xedb7f80d, 0x75668c80, 0x08149313, + } }, + { { /* 149 */ + 0xc8040e32, 0x6ea6484e, 0x66742c4a, 0xba0126c0, + 0x185dd70c, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 150 */ + 0x00000000, 0x05400000, 0x813370a0, 0x03a54f81, + 0x641055ec, 0x2344c31a, 0x00341462, 0x1a090a43, + } }, + { { /* 151 */ + 0x13a5187b, 0xa8480102, 0xc5440440, 0xe2dd8106, + 0x2d481af0, 0x0416b626, 0x6e405058, 0x31128032, + } }, + { { /* 152 */ + 0x0c0007e4, 0x420a8208, 0x803b4840, 0x87134860, + 0x3428850d, 0xe5290319, 0x870a2345, 0x5c1825a9, + } }, + { { /* 153 */ + 0xd9c577a6, 0x03e85e00, 0xa7000081, 0x41c6cd54, + 0xa2042800, 0x2b0ab860, 0xda9e0020, 0x0e1a08ea, + } }, + { { /* 154 */ + 0x11c0427e, 0x03768908, 0x01058621, 0x98a80004, + 0xc44846a0, 0x20220d05, 0x914854a2, 0x28d78a01, + } }, + { { /* 155 */ + 0x00087898, 0x31221605, 0x08804340, 0x06a2fa4e, + 0x92110814, 0x9b142002, 0x16432e52, 0x90105000, + } }, + { { /* 156 */ + 0x85ba0041, 0x20203042, 0x07a84f0b, 0x40802f08, + 0x1a930591, 0x0601df50, 0x3021a202, 0x4e800630, + } }, + { { /* 157 */ + 0x04c80cc4, 0x8001a004, 0xd4316000, 0x0a020880, + 0x00281c00, 0x00418e18, 0xca106ad0, 0x4b00f210, + } }, + { { /* 158 */ + 0x1506274d, 0x88900220, 0x82a85a00, 0x81504549, + 0x80002004, 0x2c088804, 0x000508d1, 0x4ac48001, + } }, + { { /* 159 */ + 0x0062e0a0, 0x0a42008e, 0x6a8c3055, 0xe0a5090e, + 0x42c42906, 0x80b34814, 0xb330803e, 0x733c0102, + } }, + { { /* 160 */ + 0x700d1494, 0x09400c20, 0xc040301a, 0xc094a451, + 0x05c88dca, 0xa40c96c2, 0x34040001, 0x011000c8, + } }, + { { /* 161 */ + 0xa9cd550d, 0x1cda2428, 0x48370142, 0x120f7a4d, + 0x452a32b4, 0xd20531fb, 0xdc44b894, 0x45ca68d7, + } }, + { { /* 162 */ + 0x2ed15097, 0x42081943, 0x9d48d202, 0xa0979840, + 0x064d5409, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 163 */ + 0x00000000, 0x84800000, 0x04215542, 0x17001c06, + 0x61107624, 0xb9ddff87, 0x5c0a659f, 0x3c11245d, + } }, + { { /* 164 */ + 0x005dadb0, 0x00000000, 0x00000000, 0x00db28d0, + 0x02000422, 0x44080108, 0xac409804, 0x90288d0a, + } }, + { { /* 165 */ + 0xe0018700, 0x00310400, 0x82211794, 0x10540019, + 0x021a2cb2, 0x40039c02, 0x8804bd60, 0x7900080c, + } }, + { { /* 166 */ + 0xba3c1628, 0xcb088640, 0x90807274, 0x0000001e, + 0xd8000000, 0x9c87e188, 0x04124034, 0x2791ae64, + } }, + { { /* 167 */ + 0xe6fbe86b, 0x5366408f, 0x537feea6, 0xb5e4e3ab, + 0x0002869f, 0x01228548, 0x48004402, 0x20a02116, + } }, + { { /* 168 */ + 0x02240004, 0x00052080, 0x01547e00, 0x01ac162c, + 0x10852a84, 0x05308c14, 0xfdc3fbc3, 0x906060fa, + } }, + { { /* 169 */ + 0x40336440, 0x96901200, 0x4e834b31, 0x418200d4, + 0x1d6a0129, 0x02802080, 0x02ad8000, 0x9f0c2691, + } }, + { { /* 170 */ + 0x67018044, 0x0c24d96f, 0x18d02910, 0x50215001, + 0x04d01000, 0x02017090, 0x61c30148, 0x01000132, + } }, + { { /* 171 */ + 0x07190088, 0x05620802, 0x4c0e0132, 0xf0a10405, + 0x00000002, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 172 */ + 0x00000000, 0x00000000, 0x00000000, 0x00800000, + 0x035e8e8d, 0x5a0421bd, 0x11703488, 0x00000026, + } }, + { { /* 173 */ + 0x10000000, 0x8804c502, 0xf801b815, 0x25ed147c, + 0x3bb0ed60, 0x1bd78589, 0x1a627af3, 0x0ac50d0c, + } }, + { { /* 174 */ + 0x524ae5d1, 0x6b0d0490, 0x5266a35c, 0x16122b57, + 0x1101a872, 0x00182949, 0x10080948, 0x886c6000, + } }, + { { /* 175 */ + 0x058f916e, 0x39903012, 0x49b0f840, 0x001b88a0, + 0x00000000, 0x00428500, 0x98000058, 0x7014ea04, + } }, + { { /* 176 */ + 0x611d1628, 0x60005193, 0x00a71a24, 0x00000000, + 0x43c00000, 0x10187120, 0xa9270172, 0x89066004, + } }, + { { /* 177 */ + 0x020cc022, 0x40810900, 0x8ca0602d, 0x00000e34, + 0x00000000, 0x11012100, 0xd31a8011, 0x0892ec4c, + } }, + { { /* 178 */ + 0x85000040, 0x1806c7ac, 0x0512e03e, 0x00348000, + 0x80cec008, 0x0a126d01, 0x08568641, 0x0027011e, + } }, + { { /* 179 */ + 0x083d3751, 0x4e05e032, 0x048401c0, 0x01400081, + 0x00000000, 0x00000000, 0x00000000, 0x00591aa0, + } }, + { { /* 180 */ + 0x882443c8, 0xc8001d48, 0x72030152, 0x04059813, + 0x04008280, 0x0d148a10, 0x02088056, 0x2704a040, + } }, + { { /* 181 */ + 0x4e000000, 0x00000000, 0x00000000, 0xa3200000, + 0xa0ae1902, 0xdf002660, 0x7b17f010, 0x3ad08121, + } }, + { { /* 182 */ + 0x00284180, 0x48001003, 0x8014cc00, 0x00c414cf, + 0x30202000, 0x00000001, 0x00000000, 0x00000000, + } }, + { { /* 183 */ + 0x00000000, 0x00000200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x10000000, 0x00000000, + } }, + { { /* 184 */ + 0xffffc000, 0x00003fff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 185 */ + 0xfffffffe, 0xffffffff, 0x7fffffff, 0xfffffffe, + 0xffffffff, 0x00000000, 0x00000000, 0x0000003f, + } }, + { { /* 186 */ + 0x08080002, 0x00000800, 0x00002000, 0x00000800, + 0x00000000, 0x00000000, 0x15554000, 0x960c3703, + } }, + { { /* 187 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00030190, 0x00800280, 0x00800000, + } }, + { { /* 188 */ + 0x00000002, 0x00000000, 0x00020000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 189 */ + 0x00100000, 0x08010040, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 190 */ + 0x00400008, 0xa80a8008, 0x28000020, 0x10000420, + 0x000c0000, 0x00800000, 0x00000000, 0x00000000, + } }, + { { /* 191 */ + 0x64028100, 0x20f04e21, 0x01001110, 0x10004007, + 0x02000000, 0x00000020, 0x00000000, 0x00000000, + } }, + { { /* 192 */ + 0x00040000, 0x00000008, 0x00000000, 0x20000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 193 */ + 0x00000000, 0x00000000, 0x00000000, 0x00080000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 194 */ + 0x00000000, 0x00000000, 0x00000000, 0x00400000, + 0x00000000, 0x000c0003, 0x0000c8c0, 0x00000000, + } }, + { { /* 195 */ + 0x00000060, 0x01020000, 0x01020005, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 196 */ + 0x00000000, 0x00000040, 0x00400002, 0x00020000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 197 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 198 */ + 0x00000000, 0x00000000, 0x00000000, 0x00008000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 199 */ + 0x00080028, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 200 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000080, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 201 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 202 */ + 0x7f7b7f8b, 0xef553db4, 0xf35dfba8, 0x400b0243, + 0x8d3efb40, 0x8c2c7bf7, 0xe3fa6eff, 0xa8ed1d3a, + } }, + { { /* 203 */ + 0xcf83e602, 0x35558cf5, 0xffabe048, 0xd85992b9, + 0x2892ab18, 0x8020d7e9, 0xf583c438, 0x450ae74a, + } }, + { { /* 204 */ + 0x9714b000, 0x54007762, 0x1420d188, 0xc8c01020, + 0x00002121, 0x0c0413a8, 0x04408000, 0x082870c0, + } }, + { { /* 205 */ + 0x000408c0, 0x80000002, 0x14722b7b, 0x3bfb7924, + 0x1ae43327, 0x38ef9835, 0x28029ad1, 0xbf69a813, + } }, + { { /* 206 */ + 0x2fc665cf, 0x2fc96b11, 0x5053340e, 0xa00486a2, + 0xe8090106, 0xc00e0f0f, 0x81450a88, 0xc6010010, + } }, + { { /* 207 */ + 0x26e1a161, 0xce00444b, 0xd4eec7aa, 0x85bbcadf, + 0xa5203a74, 0x8840436c, 0x8bd23f06, 0x3befff79, + } }, + { { /* 208 */ + 0xe8eff75a, 0x5b36fbcb, 0x1be10d49, 0x39ee0154, + 0x2275d855, 0xa91ab9d8, 0xf0a7f3d7, 0xb40c67e0, + } }, + { { /* 209 */ + 0x081382c2, 0xd08bd491, 0x1061065a, 0x590074f2, + 0xb3128f9f, 0x0aaa0080, 0xb05e0230, 0x60a0857a, + } }, + { { /* 210 */ + 0xc900d303, 0x8a563098, 0x13907004, 0x00421f14, + 0x0008c060, 0x10808008, 0xec900400, 0xe6332817, + } }, + { { /* 211 */ + 0x90000758, 0x4e093708, 0xfc83f485, 0x18c8af53, + 0x080c187c, 0x01146adf, 0xa734c80c, 0x2710a011, + } }, + { { /* 212 */ + 0x422228c5, 0x00210413, 0x51123010, 0x40001820, + 0xc60c022b, 0x10000300, 0x00220022, 0x02495810, + } }, + { { /* 213 */ + 0x9670a094, 0x1792eeb0, 0x05f2cb96, 0x23580025, + 0x42cc25de, 0x4a04c938, 0x359f0c40, 0x8a001128, + } }, + { { /* 214 */ + 0x910a139a, 0x125e26a9, 0xae204e51, 0x84f00484, + 0x0c040000, 0x412c0400, 0x11541206, 0x00020a4b, + } }, + { { /* 215 */ + 0x00c00200, 0x80940000, 0xbfbb0001, 0x242b167c, + 0x7fa89bbb, 0xe3790c7f, 0xe00d10f4, 0x9f014132, + } }, + { { /* 216 */ + 0x35728652, 0xff1210b4, 0x4223cf27, 0x8602c47b, + 0x1cd33106, 0xa1aa3a0c, 0x02040812, 0x08012572, + } }, + { { /* 217 */ + 0x485040c0, 0x60106ad0, 0x39009c80, 0x00109a00, + 0x22000004, 0x00800000, 0x68002020, 0x609ecbe6, + } }, + { { /* 218 */ + 0x3f73916e, 0x218260c0, 0x48301034, 0xbd5c0006, + 0xd6fb8cd1, 0x43e820e1, 0x084e0600, 0xc4d00500, + } }, + { { /* 219 */ + 0x89aa8d1f, 0x5602a6e9, 0x23ed1001, 0x1a8b3656, + 0x13a51fb7, 0x30a06502, 0x23c7b278, 0xe9226c93, + } }, + { { /* 220 */ + 0x3a74e41f, 0x98a08fe3, 0x26252d0f, 0xfc49bf9c, + 0xac543218, 0x1916b949, 0xb5220c60, 0x0659fbc1, + } }, + { { /* 221 */ + 0x8420e343, 0x800048d9, 0x20225502, 0x00a18184, + 0x20104800, 0x40801380, 0x00160d04, 0x80200040, + } }, + { { /* 222 */ + 0x8de7fd40, 0xe0985436, 0x091e788b, 0xda49fec8, + 0x8dee0611, 0xba221937, 0x9fdd77f4, 0xf0daf3ec, + } }, + { { /* 223 */ + 0xec424386, 0x26048d3f, 0xca31fe6c, 0x0cc6628e, + 0x0145d785, 0x559977ad, 0x4045e250, 0xa154260b, + } }, + { { /* 224 */ + 0x58199827, 0xa6103443, 0x413405f2, 0x07003280, + 0x426600b4, 0x14217210, 0x41856025, 0x00000054, + } }, + { { /* 225 */ + 0x01040201, 0xcb70c820, 0x6a729320, 0x2095184c, + 0x9a8b1880, 0x3201aab2, 0x00c4d87a, 0x04c233e5, + } }, + { { /* 226 */ + 0xa238d44d, 0x5072b1a1, 0x84fc980a, 0x44d5e1d6, + 0x20c21094, 0x42104180, 0x22000000, 0xd29d0240, + } }, + { { /* 227 */ + 0xa8b12f01, 0xa63abf40, 0xd25bd35f, 0xd0ada723, + 0x75a10a92, 0x01e9adac, 0x771f801a, 0xa01b9225, + } }, + { { /* 228 */ + 0x20cadfa1, 0x77884602, 0x003b577f, 0x20d00bfe, + 0x0088806a, 0x0029a1c4, 0x05242a05, 0x16234009, + } }, + { { /* 229 */ + 0x00056822, 0xa2312010, 0x64901004, 0x1b8a4cc9, + 0x19302255, 0x08922980, 0x88115402, 0xa0042001, + } }, + { { /* 230 */ + 0x80000400, 0x6422850a, 0x0b810090, 0x1242882a, + 0x00834011, 0x00001a01, 0x00000000, 0x00000000, + } }, + { { /* 231 */ + 0x00000000, 0x4685009f, 0x0a0032c8, 0x1a010cfc, + 0x00402ed8, 0x80b80402, 0x0afca826, 0x22288c02, + } }, + { { /* 232 */ + 0x887ba0e0, 0x2135cfd6, 0xf8b106c7, 0x62558613, + 0x8a19936e, 0xfb0e6efa, 0x48f91630, 0x7c6bcd2f, + } }, + { { /* 233 */ + 0x4e845892, 0x7a2e4ca0, 0x561eedeb, 0x1592ce49, + 0xe8225324, 0x8124cfdb, 0x634218f1, 0x1a8a5853, + } }, + { { /* 234 */ + 0x24d37420, 0x0514ae3b, 0x8d547458, 0xe904d80a, + 0x91018268, 0x2cd684a4, 0xc4ba8886, 0x02100377, + } }, + { { /* 235 */ + 0x00388244, 0xc46fae91, 0x73442c44, 0x1515704d, + 0x10007310, 0x02480082, 0x40060205, 0x0000c003, + } }, + { { /* 236 */ + 0x0c020000, 0x92200008, 0x4040b050, 0xd161b804, + 0x32744621, 0x3b8af800, 0x8b00050f, 0x2280bbd0, + } }, + { { /* 237 */ + 0x07690600, 0x00c38040, 0x50005420, 0x250cc1d0, + 0x83108410, 0x02281101, 0x00304008, 0x020040a1, + } }, + { { /* 238 */ + 0x20000040, 0xabe33f88, 0xaa443180, 0x0624c2c6, + 0x8004ac13, 0x0251b000, 0x4285611e, 0x1d9ff303, + } }, + { { /* 239 */ + 0x78e8440a, 0xc3925e26, 0x00852082, 0x4080b041, + 0x88424a90, 0x0c8dca04, 0x4203a705, 0x000422a1, + } }, + { { /* 240 */ + 0x0c018668, 0x10f9d764, 0xdea00402, 0x60c12000, + 0x50014888, 0x04000080, 0x50040000, 0x80d0c05d, + } }, + { { /* 241 */ + 0x970aa010, 0x4dafbba0, 0x1e10dd61, 0x831404e0, + 0xa6d68848, 0x7327d83b, 0x497427bc, 0x92130ddc, + } }, + { { /* 242 */ + 0x8ba1142b, 0xd5392e75, 0x5450300b, 0x79109a18, + 0x024a49d4, 0x80164010, 0x89d7e564, 0x5316c020, + } }, + { { /* 243 */ + 0x86002a12, 0x15e8ab65, 0x0c0000cb, 0xe200596e, + 0x00067031, 0xa82916a4, 0x18802000, 0xe1487aac, + } }, + { { /* 244 */ + 0x84563207, 0x519132e8, 0x202550a1, 0x10807c00, + 0x9d8a7280, 0x421f00aa, 0x02310e22, 0x04941100, + } }, + { { /* 245 */ + 0x40080022, 0x5c100010, 0xe4c80343, 0x0580a1a5, + 0x04008433, 0x6e080080, 0x81262a4b, 0x2901aad8, + } }, + { { /* 246 */ + 0x4490684d, 0xba880009, 0x00820040, 0x84d10000, + 0xb1e6215b, 0x80083161, 0xc2400800, 0xa600a069, + } }, + { { /* 247 */ + 0x4a328d40, 0x550a5d71, 0x2d579aa0, 0x4aa64005, + 0x30b12021, 0x01123f06, 0x260a10c2, 0x50824402, + } }, + { { /* 248 */ + 0x80409880, 0x810004c0, 0x00002003, 0x38180000, + 0xf1a60200, 0x420e4434, 0x92e005a2, 0x09008101, + } }, + { { /* 249 */ + 0x00000400, 0x00008885, 0x00000000, 0x00804000, + 0x00000000, 0x00004040, 0x00000000, 0x00000000, + } }, + { { /* 250 */ + 0x00000000, 0x08000000, 0x00000082, 0x00000000, + 0x88000004, 0xe7efbcff, 0xffbfe7f8, 0xf1f92fec, + } }, + { { /* 251 */ + 0xbff8e271, 0x05704301, 0x85b30004, 0x42164706, + 0xe4105402, 0xb3040092, 0x81305422, 0x180b4263, + } }, + { { /* 252 */ + 0x13f5387b, 0xa9ea0705, 0x05143c4c, 0x80020600, + 0xbd481ad9, 0xf496ee37, 0x7ec0705f, 0x355fb832, + } }, + { { /* 253 */ + 0x455f8644, 0x41469000, 0x003b1d40, 0xce1362a1, + 0x39028505, 0x0c080548, 0x0000144f, 0x58003488, + } }, + { { /* 254 */ + 0xd8150071, 0x4be3bd00, 0x85008a90, 0xe61dc100, + 0xb386ed14, 0x639bff72, 0xd9bee592, 0x0a92887b, + } }, + { { /* 255 */ + 0x1c82d3fe, 0x177ab980, 0xc41782c9, 0x39809ffb, + 0x590c4260, 0x37c70f01, 0xb15094a3, 0x20070623, + } }, + { { /* 256 */ + 0x3102f85a, 0x310201c0, 0x1e820040, 0x056a3a0a, + 0x12805a04, 0xa7148002, 0xa04b2612, 0x90011069, + } }, + { { /* 257 */ + 0x848a1000, 0x3f801802, 0x42400708, 0x4e140110, + 0x180080b0, 0x0281c510, 0x10298202, 0x88000210, + } }, + { { /* 258 */ + 0x00420020, 0x11000280, 0x4413e000, 0xfe025804, + 0x30283c07, 0x04739798, 0xcb13ced1, 0x43196210, + } }, + { { /* 259 */ + 0x55ac278d, 0xc892422e, 0x02885380, 0x18514039, + 0x8088292c, 0x2428b900, 0x080e0c41, 0x42004421, + } }, + { { /* 260 */ + 0x08680408, 0x12040006, 0x02903031, 0xe0855b3e, + 0x10442936, 0x10822814, 0x83344266, 0x531b013c, + } }, + { { /* 261 */ + 0x0e0d0404, 0x00510c22, 0xc0000012, 0x88000040, + 0x0000004a, 0x00000000, 0x544403f6, 0x00088868, + } }, + { { /* 262 */ + 0x00000081, 0x40000000, 0x00000100, 0x02000000, + 0x00080600, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 263 */ + 0x00000080, 0x00000040, 0x00000000, 0x00001040, + 0x00000000, 0xf7cdef3f, 0x7ce2ff73, 0x7ffff8fe, + } }, + { { /* 264 */ + 0x3f89fdfe, 0x009333fc, 0x042012c2, 0x07080c06, + 0x01101624, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 265 */ + 0xe0000000, 0xfff3fffe, 0x7f79fc9f, 0x00f928df, + 0x80120c32, 0xd53a0008, 0xec021858, 0x2e289d18, + } }, + { { /* 266 */ + 0xe0109620, 0x2622d60c, 0x02000f91, 0x9055b240, + 0x501180a2, 0x04049800, 0x00004000, 0x00000000, + } }, + { { /* 267 */ + 0x00000000, 0x00000000, 0x00000000, 0xf991fbc0, + 0xdffb0ff8, 0x62430808, 0xfb3b41b6, 0x23896f74, + } }, + { { /* 268 */ + 0xecd7ae7f, 0x5900e047, 0x0989a096, 0xa030612c, + 0x2aaa090d, 0x4f7bd44e, 0x388bc4b2, 0x6110a9c6, + } }, + { { /* 269 */ + 0x42000014, 0x0202800c, 0x64853e48, 0x83f7d63e, + 0x0c073aa0, 0x04300400, 0x1002f680, 0x00000000, + } }, + { { /* 270 */ + 0x00000000, 0x00000000, 0x00000000, 0x00100000, + 0x00004000, 0x00004000, 0x00000100, 0x00000000, + } }, + { { /* 271 */ + 0x00000000, 0x40000000, 0x00000000, 0x00000400, + 0x00008000, 0x00000000, 0x00400400, 0x00000000, + } }, + { { /* 272 */ + 0x00000000, 0x40000000, 0x00000000, 0x00000800, + 0xe2bc4f00, 0xc83e7fe7, 0x3b00007f, 0xc7c73e0e, + } }, + { { /* 273 */ + 0x0f83193f, 0x1e31f37e, 0x38033687, 0x8041a008, + 0x00000000, 0x00000000, 0x00000000, 0x7f9fef00, + } }, + { { /* 274 */ + 0xb017c367, 0xb87e4406, 0x88313bf5, 0x00f41796, + 0x1391a960, 0x42490080, 0x0024f2f3, 0x42c88701, + } }, + { { /* 275 */ + 0x5048e3d3, 0x43052400, 0x4a4c0000, 0x10580227, + 0x01102820, 0x0014a809, 0x00000000, 0x006822c0, + } }, + { { /* 276 */ + 0x00000000, 0x00000000, 0x00000000, 0xffe00000, + 0x31db87ff, 0x00000091, 0xc1204000, 0x00000180, + } }, + { { /* 277 */ + 0x00012000, 0x00004000, 0x00300000, 0xb4f7e028, + 0x03c4adf3, 0x00000120, 0x00000000, 0x00000000, + } }, + { { /* 278 */ + 0x00000000, 0x00000000, 0x00000000, 0xfe7bf000, + 0x45c39df4, 0x15c301b2, 0x810a0027, 0x0a00a842, + } }, + { { /* 279 */ + 0x80088108, 0x18048008, 0x0012a3be, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 280 */ + 0x00000000, 0x00000000, 0x00000000, 0x90000000, + 0x10006806, 0x01000810, 0xc0400008, 0x00000004, + } }, + { { /* 281 */ + 0x80000000, 0xe1eea06f, 0x41a2c438, 0xc00b2018, + 0xa00c0804, 0x09100040, 0x8112e210, 0x420086a5, + } }, + { { /* 282 */ + 0x02896800, 0x0a809005, 0x00030010, 0x80000000, + 0x8e001819, 0x00000001, 0x00000000, 0x00000000, + } }, + { { /* 283 */ + 0x00000010, 0x00000000, 0x40000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000028, + } }, + { { /* 284 */ + 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, + 0x00000000, 0x00838080, 0x00800000, 0x00800000, + } }, + { { /* 285 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x02002e80, 0x00000000, + } }, + { { /* 286 */ + 0x33180000, 0x082400e0, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 287 */ + 0x00000228, 0x00000000, 0x00000000, 0x000003ff, + 0x03cf0000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 288 */ + 0xc4200000, 0x00304e29, 0x00040000, 0x000000c3, + 0x02200000, 0x80000020, 0x00000000, 0x00000000, + } }, + { { /* 289 */ + 0x11111005, 0x10101010, 0xffff0000, 0x001fffff, + 0x0038fffe, 0x300c0003, 0x0000c8c0, 0x0000003c, + } }, + { { /* 290 */ + 0x00000060, 0x00000000, 0x00000005, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 291 */ + 0x6037ff0f, 0x000003fe, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 292 */ + 0xffffffe0, 0x000003ff, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 293 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000008, 0x00000000, 0x00000000, + } }, + { { /* 294 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x7000c000, 0x00000002, 0x00264010, 0x00000000, + } }, + { { /* 295 */ + 0xc373ff8b, 0x1b0f6840, 0xf34ce9ac, 0xc0080200, + 0xca3e795c, 0x06487976, 0xf7f02fdf, 0xa8ff033a, + } }, + { { /* 296 */ + 0x233fef37, 0xfd59b004, 0xfffff3ca, 0xfff9de9f, + 0x7df7abff, 0x8eecc000, 0xffdbeebf, 0x45fad003, + } }, + { { /* 297 */ + 0xdffefae1, 0x10abbfef, 0xfcaaffeb, 0x24fdef3f, + 0x7f7678ad, 0xedfff00c, 0x2cfacff6, 0xeb6bf7f9, + } }, + { { /* 298 */ + 0x95bf1ffd, 0xbfbf6677, 0xfeb43bfb, 0x11e27bae, + 0x41bea681, 0x72c31435, 0x71917d70, 0x276b0003, + } }, + { { /* 299 */ + 0x70cf57cb, 0x0def4732, 0xfc747eda, 0xbdb4fe06, + 0x8bca3f9f, 0x58007e49, 0xebec228f, 0xddbb8a5c, + } }, + { { /* 300 */ + 0xb6e7ef60, 0xf293a40f, 0x549e37bb, 0x9bafd04b, + 0xf7d4c414, 0x0a1430b0, 0x88d02f08, 0x192fff7e, + } }, + { { /* 301 */ + 0xfb07ffda, 0x7beb7ff1, 0x0010c5ef, 0xfdff99ff, + 0x056779d7, 0xfdcbffe7, 0x4040c3ff, 0xbd8e6ff7, + } }, + { { /* 302 */ + 0x0497dffa, 0x5bfff4c0, 0xd0e7ed7b, 0xf8e0047e, + 0xb73eff9f, 0x882e7dfe, 0xbe7ffffd, 0xf6c483fe, + } }, + { { /* 303 */ + 0xb8fdf357, 0xef7dd680, 0x47885767, 0xc3dfff7d, + 0x37a9f0ff, 0x70fc7de0, 0xec9a3f6f, 0x86814cb3, + } }, + { { /* 304 */ + 0xdd5c3f9e, 0x4819f70d, 0x0007fea3, 0x38ffaf56, + 0xefb8980d, 0xb760403d, 0x9035d8ce, 0x3fff72bf, + } }, + { { /* 305 */ + 0x7a117ff7, 0xabfff7bb, 0x6fbeff00, 0xfe72a93c, + 0xf11bcfef, 0xfc0adb6b, 0xef7ec3e6, 0xf6109b9c, + } }, + { { /* 306 */ + 0x16f4f048, 0x5182feb5, 0x15bbc7b1, 0xfbdf6e87, + 0x63cde43f, 0x7e7ec1ff, 0x7d5ffdeb, 0xfcfe777b, + } }, + { { /* 307 */ + 0xdbea960b, 0x53e86229, 0xfdef37df, 0xbd8136f5, + 0xfcbddc18, 0xffffd2e4, 0xffe03fd7, 0xaff87f6f, + } }, + { { /* 308 */ + 0x6ed99bae, 0xf115f5fb, 0xbdfb79a9, 0xadaf5a3c, + 0x1facdbba, 0x837971fc, 0xc35f7cf7, 0x0567dfff, + } }, + { { /* 309 */ + 0x8467ff9a, 0xdf8b1534, 0x3373f9f3, 0x5e1af7bd, + 0xa03fbf40, 0x01ebffff, 0xcfdddfc0, 0xabd37500, + } }, + { { /* 310 */ + 0xeed6f8c3, 0xb7ff43fd, 0x42275eaf, 0xf6869bac, + 0xf6bc27d7, 0x35b7f787, 0xe176aacd, 0xe29f49e7, + } }, + { { /* 311 */ + 0xaff2545c, 0x61d82b3f, 0xbbb8fc3b, 0x7b7dffcf, + 0x1ce0bf95, 0x43ff7dfd, 0xfffe5ff6, 0xc4ced3ef, + } }, + { { /* 312 */ + 0xadbc8db6, 0x11eb63dc, 0x23d0df59, 0xf3dbbeb4, + 0xdbc71fe7, 0xfae4ff63, 0x63f7b22b, 0xadbaed3b, + } }, + { { /* 313 */ + 0x7efffe01, 0x02bcfff7, 0xef3d32ff, 0x8005fffc, + 0xbcf577fb, 0xfff7010d, 0xbf3afffb, 0xdfff0057, + } }, + { { /* 314 */ + 0xbd7def7b, 0xc8d4db88, 0xed7cfff3, 0x56ff5dee, + 0xac5f7e0d, 0xd57fff96, 0xc1403fee, 0xffe76ff9, + } }, + { { /* 315 */ + 0x8e77779b, 0xe45d6ebf, 0x5f1f6fcf, 0xfedfe07f, + 0x01fed7db, 0xfb7bff00, 0x1fdfffd4, 0xfffff800, + } }, + { { /* 316 */ + 0x007bfb8f, 0x7f5cbf00, 0x07f3ffff, 0x3de7eba0, + 0xfbd7f7bf, 0x6003ffbf, 0xbfedfffd, 0x027fefbb, + } }, + { { /* 317 */ + 0xddfdfe40, 0xe2f9fdff, 0xfb1f680b, 0xaffdfbe3, + 0xf7ed9fa4, 0xf80f7a7d, 0x0fd5eebe, 0xfd9fbb5d, + } }, + { { /* 318 */ + 0x3bf9f2db, 0xebccfe7f, 0x73fa876a, 0x9ffc95fc, + 0xfaf7109f, 0xbbcdddb7, 0xeccdf87e, 0x3c3ff366, + } }, + { { /* 319 */ + 0xb03ffffd, 0x067ee9f7, 0xfe0696ae, 0x5fd7d576, + 0xa3f33fd1, 0x6fb7cf07, 0x7f449fd1, 0xd3dd7b59, + } }, + { { /* 320 */ + 0xa9bdaf3b, 0xff3a7dcf, 0xf6ebfbe0, 0xffffb401, + 0xb7bf7afa, 0x0ffdc000, 0xff1fff7f, 0x95fffefc, + } }, + { { /* 321 */ + 0xb5dc0000, 0x3f3eef63, 0x001bfb7f, 0xfbf6e800, + 0xb8df9eef, 0x003fff9f, 0xf5ff7bd0, 0x3fffdfdb, + } }, + { { /* 322 */ + 0x00bffdf0, 0xbbbd8420, 0xffdedf37, 0x0ff3ff6d, + 0x5efb604c, 0xfafbfffb, 0x0219fe5e, 0xf9de79f4, + } }, + { { /* 323 */ + 0xebfaa7f7, 0xff3401eb, 0xef73ebd3, 0xc040afd7, + 0xdcff72bb, 0x2fd8f17f, 0xfe0bb8ec, 0x1f0bdda3, + } }, + { { /* 324 */ + 0x47cf8f1d, 0xffdeb12b, 0xda737fee, 0xcbc424ff, + 0xcbf2f75d, 0xb4edecfd, 0x4dddbff9, 0xfb8d99dd, + } }, + { { /* 325 */ + 0xaf7bbb7f, 0xc959ddfb, 0xfab5fc4f, 0x6d5fafe3, + 0x3f7dffff, 0xffdb7800, 0x7effb6ff, 0x022ffbaf, + } }, + { { /* 326 */ + 0xefc7ff9b, 0xffffffa5, 0xc7000007, 0xfff1f7ff, + 0x01bf7ffd, 0xfdbcdc00, 0xffffbff5, 0x3effff7f, + } }, + { { /* 327 */ + 0xbe000029, 0xff7ff9ff, 0xfd7e6efb, 0x039ecbff, + 0xfbdde300, 0xf6dfccff, 0x117fffff, 0xfbf6f800, + } }, + { { /* 328 */ + 0xd73ce7ef, 0xdfeffeef, 0xedbfc00b, 0xfdcdfedf, + 0x40fd7bf5, 0xb75fffff, 0xf930ffdf, 0xdc97fbdf, + } }, + { { /* 329 */ + 0xbff2fef3, 0xdfbf8fdf, 0xede6177f, 0x35530f7f, + 0x877e447c, 0x45bbfa12, 0x779eede0, 0xbfd98017, + } }, + { { /* 330 */ + 0xde897e55, 0x0447c16f, 0xf75d7ade, 0x290557ff, + 0xfe9586f7, 0xf32f97b3, 0x9f75cfff, 0xfb1771f7, + } }, + { { /* 331 */ + 0xee1934ee, 0xef6137cc, 0xef4c9fd6, 0xfbddd68f, + 0x6def7b73, 0xa431d7fe, 0x97d75e7f, 0xffd80f5b, + } }, + { { /* 332 */ + 0x7bce9d83, 0xdcff22ec, 0xef87763d, 0xfdeddfe7, + 0xa0fc4fff, 0xdbfc3b77, 0x7fdc3ded, 0xf5706fa9, + } }, + { { /* 333 */ + 0x2c403ffb, 0x847fff7f, 0xdeb7ec57, 0xf22fe69c, + 0xd5b50feb, 0xede7afeb, 0xfff08c2f, 0xe8f0537f, + } }, + { { /* 334 */ + 0xb5ffb99d, 0xe78fff66, 0xbe10d981, 0xe3c19c7c, + 0x27339cd1, 0xff6d0cbc, 0xefb7fcb7, 0xffffa0df, + } }, + { { /* 335 */ + 0xfe7bbf0b, 0x353fa3ff, 0x97cd13cc, 0xfb277637, + 0x7e6ccfd6, 0xed31ec50, 0xfc1c677c, 0x5fbff6fa, + } }, + { { /* 336 */ + 0xae2f0fba, 0x7ffea3ad, 0xde74fcf0, 0xf200ffef, + 0xfea2fbbf, 0xbcff3daf, 0x5fb9f694, 0x3f8ff3ad, + } }, + { { /* 337 */ + 0xa01ff26c, 0x01bfffef, 0x70057728, 0xda03ff35, + 0xc7fad2fb, 0x5c1d3fbf, 0xec33ff3a, 0xfe9cb7af, + } }, + { { /* 338 */ + 0x7a9f5236, 0xe722bffa, 0xfcff9ff7, 0xb61d2fbb, + 0x1dfded06, 0xefdf7dd7, 0xf166eb23, 0x0dc07ed9, + } }, + { { /* 339 */ + 0xdfbf3d3d, 0xba83c945, 0x9dd07dd1, 0xcf737b87, + 0xc3f59ff3, 0xc5fedf0d, 0x83020cb3, 0xaec0e879, + } }, + { { /* 340 */ + 0x6f0fc773, 0x093ffd7d, 0x0157fff1, 0x01ff62fb, + 0x3bf3fdb4, 0x43b2b013, 0xff305ed3, 0xeb9f0fff, + } }, + { { /* 341 */ + 0xf203feef, 0xfb893fef, 0x9e9937a9, 0xa72cdef9, + 0xc1f63733, 0xfe3e81ae, 0xf2f75d20, 0x69d7d585, + } }, + { { /* 342 */ + 0xffffffff, 0xff6fdb07, 0xd97fc4ff, 0xbe0fefce, + 0xf05ef17b, 0xffb7f6cf, 0xef845ef7, 0x0edfd7cb, + } }, + { { /* 343 */ + 0xfcffff08, 0xffffee3f, 0xd7ff13ff, 0x7ffdaf0f, + 0x1ffabdc7, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 344 */ + 0x00000000, 0xe7400000, 0xf933bd38, 0xfeed7feb, + 0x7c767fe8, 0xffefb3f7, 0xd8b7feaf, 0xfbbfff6f, + } }, + { { /* 345 */ + 0xdbf7f8fb, 0xe2f91752, 0x754785c8, 0xe3ef9090, + 0x3f6d9ef4, 0x0536ee2e, 0x7ff3f7bc, 0x7f3fa07b, + } }, + { { /* 346 */ + 0xeb600567, 0x6601babe, 0x583ffcd8, 0x87dfcaf7, + 0xffa0bfcd, 0xfebf5bcd, 0xefa7b6fd, 0xdf9c77ef, + } }, + { { /* 347 */ + 0xf8773fb7, 0xb7fc9d27, 0xdfefcab5, 0xf1b6fb5a, + 0xef1fec39, 0x7ffbfbbf, 0xdafe000d, 0x4e7fbdfb, + } }, + { { /* 348 */ + 0x5ac033ff, 0x9ffebff5, 0x005fffbf, 0xfdf80000, + 0x6ffdffca, 0xa001cffd, 0xfbf2dfff, 0xff7fdfbf, + } }, + { { /* 349 */ + 0x080ffeda, 0xbfffba08, 0xeed77afd, 0x67f9fbeb, + 0xff93e044, 0x9f57df97, 0x08dffef7, 0xfedfdf80, + } }, + { { /* 350 */ + 0xf7feffc5, 0x6803fffb, 0x6bfa67fb, 0x5fe27fff, + 0xff73ffff, 0xe7fb87df, 0xf7a7ebfd, 0xefc7bf7e, + } }, + { { /* 351 */ + 0xdf821ef3, 0xdf7e76ff, 0xda7d79c9, 0x1e9befbe, + 0x77fb7ce0, 0xfffb87be, 0xffdb1bff, 0x4fe03f5c, + } }, + { { /* 352 */ + 0x5f0e7fff, 0xddbf77ff, 0xfffff04f, 0x0ff8ffff, + 0xfddfa3be, 0xfffdfc1c, 0xfb9e1f7d, 0xdedcbdff, + } }, + { { /* 353 */ + 0xbafb3f6f, 0xfbefdf7f, 0x2eec7d1b, 0xf2f7af8e, + 0xcfee7b0f, 0x77c61d96, 0xfff5fe07, 0x7fdfd982, + } }, + { { /* 354 */ + 0xc7ff5ee6, 0x79effeee, 0xffcf9a56, 0xde5efe5f, + 0xf9e8896e, 0xe6c4f45e, 0xbe7c0001, 0xdddf3b7f, + } }, + { { /* 355 */ + 0xe9efd59d, 0xde5334ac, 0x4bf7f573, 0x9eff7b4f, + 0x476eb8fe, 0xff450dfb, 0xfbfeabfd, 0xddffe9d7, + } }, + { { /* 356 */ + 0x7fffedf7, 0x7eebddfd, 0xb7ffcfe7, 0xef91bde9, + 0xd77c5d75, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 357 */ + 0x00000000, 0xfa800000, 0xb4f1ffee, 0x2fefbf76, + 0x77bfb677, 0xfffd9fbf, 0xf6ae95bf, 0x7f3b75ff, + } }, + { { /* 358 */ + 0x0af9a7f5, 0x00000000, 0x00000000, 0x2bddfbd0, + 0x9a7ff633, 0xd6fcfdab, 0xbfebf9e6, 0xf41fdfdf, + } }, + { { /* 359 */ + 0xffffa6fd, 0xf37b4aff, 0xfef97fb7, 0x1d5cb6ff, + 0xe5ff7ff6, 0x24041f7b, 0xf99ebe05, 0xdff2dbe3, + } }, + { { /* 360 */ + 0xfdff6fef, 0xcbfcd679, 0xefffebfd, 0x0000001f, + 0x98000000, 0x8017e148, 0x00fe6a74, 0xfdf16d7f, + } }, + { { /* 361 */ + 0xfef3b87f, 0xf176e01f, 0x7b3fee96, 0xfffdeb8d, + 0xcbb3adff, 0xe17f84ef, 0xbff04daa, 0xfe3fbf3f, + } }, + { { /* 362 */ + 0xffd7ebff, 0xcf7fffdf, 0x85edfffb, 0x07bcd73f, + 0xfe0faeff, 0x76bffdaf, 0x37bbfaef, 0xa3ba7fdc, + } }, + { { /* 363 */ + 0x56f7b6ff, 0xe7df60f8, 0x4cdfff61, 0xff45b0fb, + 0x3ffa7ded, 0x1afc1fff, 0xe3afffff, 0xdf83c7d3, + } }, + { { /* 364 */ + 0xef7dfb57, 0x1378efff, 0x5ff7fec0, 0x5ee334bb, + 0xeff6f70d, 0x00bfd7fe, 0xf7f7f59d, 0xffe051de, + } }, + { { /* 365 */ + 0x037ffec9, 0xbfef5f01, 0x60a79ff1, 0xf1ffef1d, + 0x0000000f, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 366 */ + 0x00000000, 0x00000000, 0x00000000, 0x3c800000, + 0xd91ffb4d, 0xfee37b3a, 0xdc7f3fe9, 0x0000003f, + } }, + { { /* 367 */ + 0x50000000, 0xbe07f51f, 0xf91bfc1d, 0x71ffbc1e, + 0x5bbe6ff9, 0x9b1b5796, 0xfffc7fff, 0xafe7872e, + } }, + { { /* 368 */ + 0xf34febf5, 0xe725dffd, 0x5d440bdc, 0xfddd5747, + 0x7790ed3f, 0x8ac87d7f, 0xf3f9fafa, 0xef4b202a, + } }, + { { /* 369 */ + 0x79cff5ff, 0x0ba5abd3, 0xfb8ff77a, 0x001f8ebd, + 0x00000000, 0xfd4ef300, 0x88001a57, 0x7654aeac, + } }, + { { /* 370 */ + 0xcdff17ad, 0xf42fffb2, 0xdbff5baa, 0x00000002, + 0x73c00000, 0x2e3ff9ea, 0xbbfffa8e, 0xffd376bc, + } }, + { { /* 371 */ + 0x7e72eefe, 0xe7f77ebd, 0xcefdf77f, 0x00000ff5, + 0x00000000, 0xdb9ba900, 0x917fa4c7, 0x7ecef8ca, + } }, + { { /* 372 */ + 0xc7e77d7a, 0xdcaecbbd, 0x8f76fd7e, 0x7cf391d3, + 0x4c2f01e5, 0xa360ed77, 0x5ef807db, 0x21811df7, + } }, + { { /* 373 */ + 0x309c6be0, 0xfade3b3a, 0xc3f57f53, 0x07ba61cd, + 0x00000000, 0x00000000, 0x00000000, 0xbefe26e0, + } }, + { { /* 374 */ + 0xebb503f9, 0xe9cbe36d, 0xbfde9c2f, 0xabbf9f83, + 0xffd51ff7, 0xdffeb7df, 0xffeffdae, 0xeffdfb7e, + } }, + { { /* 375 */ + 0x6ebfaaff, 0x00000000, 0x00000000, 0xb6200000, + 0xbe9e7fcd, 0x58f162b3, 0xfd7bf10d, 0xbefde9f1, + } }, + { { /* 376 */ + 0x5f6dc6c3, 0x69ffff3d, 0xfbf4ffcf, 0x4ff7dcfb, + 0x11372000, 0x00000015, 0x00000000, 0x00000000, + } }, + { { /* 377 */ + 0x00003000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 378 */ + 0x00000000, 0xfffb0000, 0xfef7fe1f, 0x00000f7f, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 379 */ + 0xffffff7a, 0x97ffffff, 0x7ffffffe, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000002b, + } }, + { { /* 380 */ + 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, + 0x00000000, 0x09f37bd1, 0xb4d86a96, 0x34d86a96, + } }, + { { /* 381 */ + 0x0f03f0fc, 0x66000000, 0xc333019e, 0x1803c00c, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 382 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x2b000080, 0x00000000, + } }, + { { /* 383 */ + 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, + 0x00000000, 0x08e37ad1, 0x00000000, 0x00000000, + } }, + { { /* 384 */ + 0xffff41f2, 0xffffffff, 0x41f2ffff, 0x00000000, + 0x00030000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 385 */ + 0x77180000, 0x06010047, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 386 */ + 0x00400000, 0x00000004, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 387 */ + 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, + 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, + } }, + { { /* 388 */ + 0x00000000, 0x00000004, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 389 */ + 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, + 0x00000000, 0x28ff7ff9, 0x00040000, 0x80000000, + } }, + { { /* 390 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0xffffd760, 0xfffffffb, 0x00007fff, 0x00000000, + } }, + { { /* 391 */ + 0x77380000, 0x06010047, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 392 */ + 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, + 0x00000000, 0xffffffff, 0x9ffeffff, 0x9ffeffff, + } }, + { { /* 393 */ + 0xc0000000, 0x00030000, 0xc0000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 394 */ + 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, + 0x00000000, 0xffffffef, 0xfe000400, 0x98000000, + } }, + { { /* 395 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0xfbff0000, 0xffff000f, 0x001f07ff, + } }, + { { /* 396 */ + 0x7718c000, 0x06010047, 0x00000000, 0x00000000, + 0x00000000, 0x00000400, 0x00000000, 0x00000000, + } }, + { { /* 397 */ + 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, + 0x00000000, 0x7bfffffd, 0x00800001, 0x9a90cf85, + } }, + { { /* 398 */ + 0x88001000, 0x07fffffe, 0x0007ffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 399 */ + 0x7718f000, 0x06010047, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 400 */ + 0x00000000, 0xffffffff, 0xffffffff, 0x7fffffff, + 0x00000000, 0x7bff7aff, 0x91e80270, 0x10e80270, + } }, + { { /* 401 */ + 0x03cc30f3, 0x18c0cc0c, 0x0cc0307e, 0x7e0c0c03, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + } }, + { { /* 402 */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x02000000, 0x00000000, + } }, +}; + +#define L(n) ((FcCharLeaf *) &leaves[n]) + +static const FcCharLeaf *leaves_Thai_874[3] = { + L( 0), L( 1), L( 2), +}; + +static const FcChar16 numbers_Thai_874[3] = { + 0x0000, 0x000e, 0x0020, +}; + +static const FcCharLeaf *leaves_Korean_949[85] = { + L( 3), L( 4), L( 5), L( 6), L( 7), L( 8), L( 9), L( 10), + L( 11), L( 12), L( 13), L( 14), L( 15), L( 16), L( 17), L( 18), + L( 19), L( 20), L( 21), L( 22), L( 23), L( 24), L( 25), L( 26), + L( 27), L( 28), L( 29), L( 30), L( 31), L( 32), L( 33), L( 34), + L( 35), L( 36), L( 37), L( 38), L( 39), L( 40), L( 41), L( 42), + L( 43), L( 44), L( 45), L( 46), L( 47), L( 48), L( 49), L( 50), + L( 51), L( 52), L( 53), L( 54), L( 55), L( 56), L( 57), L( 58), + L( 59), L( 60), L( 61), L( 62), L( 63), L( 64), L( 65), L( 66), + L( 67), L( 68), L( 69), L( 70), L( 71), L( 72), L( 73), L( 74), + L( 75), L( 76), L( 77), L( 78), L( 79), L( 80), L( 81), L( 82), + L( 83), L( 84), L( 85), L( 86), L( 87), +}; + +static const FcChar16 numbers_Korean_949[85] = { + 0x0000, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, + 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, + 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, + 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, + 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, + 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, + 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, + 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, + 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, + 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, + 0x009d, 0x009e, 0x009f, 0x00f9, 0x00fa, +}; + +static const FcCharLeaf *leaves_Japanese_932[98] = { + L( 88), L( 89), L( 90), L( 91), L( 92), L( 93), L( 94), L( 95), + L( 96), L( 97), L( 98), L( 99), L(100), L(101), L(102), L(103), + L(104), L(105), L(106), L(107), L(108), L(109), L(110), L(111), + L(112), L(113), L(114), L(115), L(116), L(117), L(118), L(119), + L(120), L(121), L(122), L(123), L(124), L(125), L(126), L(127), + L(128), L(129), L(130), L(131), L(132), L(133), L(134), L(135), + L(136), L(137), L(138), L(139), L(140), L(141), L(142), L(143), + L(144), L(145), L(146), L(147), L(148), L(149), L(150), L(151), + L(152), L(153), L(154), L(155), L(156), L(157), L(158), L(159), + L(160), L(161), L(162), L(163), L(164), L(165), L(166), L(167), + L(168), L(169), L(170), L(171), L(172), L(173), L(174), L(175), + L(176), L(177), L(178), L(179), L(180), L(181), L(182), L(183), + L(184), L(185), +}; + +static const FcChar16 numbers_Japanese_932[98] = { + 0x0000, 0x0003, 0x0004, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, + 0x0025, 0x0026, 0x0030, 0x0032, 0x0033, 0x004e, 0x004f, 0x0050, + 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, + 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, 0x0060, + 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, + 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, + 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, + 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, 0x0080, + 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, + 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, 0x0090, + 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, + 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, 0x00f9, + 0x00fa, 0x00ff, +}; + +static const FcCharLeaf *leaves_SimplifiedChinese_936[98] = { + L(186), L(187), L(188), L(189), L(190), L(191), L(192), L(193), + L(194), L(195), L(196), L(197), L(198), L(199), L(200), L(201), + L(202), L(203), L(204), L(205), L(206), L(207), L(208), L(209), + L(210), L(211), L(212), L(213), L(214), L(215), L(216), L(217), + L(218), L(219), L(220), L(221), L(222), L(223), L(224), L(225), + L(226), L(227), L(228), L(229), L(230), L(231), L(232), L(233), + L(234), L(235), L(236), L(237), L(238), L(239), L(240), L(241), + L(242), L(243), L(244), L(245), L(246), L(247), L(248), L(249), + L(250), L(251), L(252), L(253), L(254), L(255), L(256), L(257), + L(258), L(259), L(260), L(261), L(262), L(263), L(264), L(265), + L(266), L(267), L(268), L(269), L(270), L(271), L(272), L(273), + L(274), L(275), L(276), L(277), L(278), L(279), L(280), L(281), + L(282), L(283), +}; + +static const FcChar16 numbers_SimplifiedChinese_936[98] = { + 0x0001, 0x0002, 0x0004, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, + 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x0030, 0x0031, 0x0049, + 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, + 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, + 0x005e, 0x005f, 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, + 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, + 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, + 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, + 0x007e, 0x007f, 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, + 0x0086, 0x0087, 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, + 0x008e, 0x008f, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, + 0x0096, 0x0097, 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009e, + 0x009f, 0x00ff, +}; + +static const FcCharLeaf *leaves_TraditionalChinese_950[97] = { + L(284), L(285), L( 89), L(286), L(287), L(288), L(289), L(290), + L(291), L(292), L(293), L(294), L(295), L(296), L(297), L(298), + L(299), L(300), L(301), L(302), L(303), L(304), L(305), L(306), + L(307), L(308), L(309), L(310), L(311), L(312), L(313), L(314), + L(315), L(316), L(317), L(318), L(319), L(320), L(321), L(322), + L(323), L(324), L(325), L(326), L(327), L(328), L(329), L(330), + L(331), L(332), L(333), L(334), L(335), L(336), L(337), L(338), + L(339), L(340), L(341), L(342), L(343), L(344), L(345), L(346), + L(347), L(348), L(349), L(350), L(351), L(352), L(353), L(354), + L(355), L(356), L(357), L(358), L(359), L(360), L(361), L(362), + L(363), L(364), L(365), L(366), L(367), L(368), L(369), L(370), + L(371), L(372), L(373), L(374), L(375), L(376), L(377), L(378), + L(379), +}; + +static const FcChar16 numbers_TraditionalChinese_950[97] = { + 0x0000, 0x0002, 0x0003, 0x0020, 0x0021, 0x0022, 0x0025, 0x0026, + 0x0030, 0x0031, 0x0032, 0x0033, 0x004e, 0x004f, 0x0050, 0x0051, + 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, + 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, + 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, + 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, + 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, + 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f, 0x0080, 0x0081, + 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, + 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, 0x0090, 0x0091, + 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, + 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, 0x00fa, 0x00fe, + 0x00ff, +}; + +static const FcCharLeaf *leaves_Latin2_1250[3] = { + L(380), L(381), L(382), +}; + +static const FcChar16 numbers_Latin2_1250[3] = { + 0x0000, 0x0001, 0x0002, +}; + +static const FcCharLeaf *leaves_Cyrillic_1251[4] = { + L(383), L(384), L(385), L(386), +}; + +static const FcChar16 numbers_Cyrillic_1251[4] = { + 0x0000, 0x0004, 0x0020, 0x0021, +}; + +static const FcCharLeaf *leaves_Latin1_1252[3] = { + L(387), L(385), L(388), +}; + +static const FcChar16 numbers_Latin1_1252[3] = { + 0x0000, 0x0020, 0x0021, +}; + +static const FcCharLeaf *leaves_Greek_1253[4] = { + L(389), L(390), L(391), L(388), +}; + +static const FcChar16 numbers_Greek_1253[4] = { + 0x0000, 0x0003, 0x0020, 0x0021, +}; + +static const FcCharLeaf *leaves_Turkish_1254[4] = { + L(392), L(393), L(385), L(388), +}; + +static const FcChar16 numbers_Turkish_1254[4] = { + 0x0000, 0x0001, 0x0020, 0x0021, +}; + +static const FcCharLeaf *leaves_Hebrew_1255[4] = { + L(394), L(395), L(396), L(388), +}; + +static const FcChar16 numbers_Hebrew_1255[4] = { + 0x0000, 0x0005, 0x0020, 0x0021, +}; + +static const FcCharLeaf *leaves_Arabic_1256[4] = { + L(397), L(398), L(399), L(388), +}; + +static const FcChar16 numbers_Arabic_1256[4] = { + 0x0000, 0x0006, 0x0020, 0x0021, +}; + +static const FcCharLeaf *leaves_Windows_Baltic_1257[5] = { + L(400), L(401), L(402), L(385), L(388), +}; + +static const FcChar16 numbers_Windows_Baltic_1257[5] = { + 0x0000, 0x0001, 0x0002, 0x0020, 0x0021, +}; + +#undef L + +static const FcCharSet fcCharSet_Thai_874 = { + 1, FcTrue, 3, (FcCharLeaf **) leaves_Thai_874, (FcChar16 *) numbers_Thai_874 +}; + +#define fcCharSet_Thai_874_size 193 + +static const FcCharSet fcCharSet_Korean_949 = { + 1, FcTrue, 85, (FcCharLeaf **) leaves_Korean_949, (FcChar16 *) numbers_Korean_949 +}; + +#define fcCharSet_Korean_949_size 4984 + +static const FcCharSet fcCharSet_Japanese_932 = { + 1, FcTrue, 98, (FcCharLeaf **) leaves_Japanese_932, (FcChar16 *) numbers_Japanese_932 +}; + +#define fcCharSet_Japanese_932_size 7485 + +static const FcCharSet fcCharSet_SimplifiedChinese_936 = { + 1, FcTrue, 98, (FcCharLeaf **) leaves_SimplifiedChinese_936, (FcChar16 *) numbers_SimplifiedChinese_936 +}; + +#define fcCharSet_SimplifiedChinese_936_size 6494 + +static const FcCharSet fcCharSet_TraditionalChinese_950 = { + 1, FcTrue, 97, (FcCharLeaf **) leaves_TraditionalChinese_950, (FcChar16 *) numbers_TraditionalChinese_950 +}; + +#define fcCharSet_TraditionalChinese_950_size 13588 + +static const FcCharSet fcCharSet_Latin2_1250 = { + 1, FcTrue, 3, (FcCharLeaf **) leaves_Latin2_1250, (FcChar16 *) numbers_Latin2_1250 +}; + +#define fcCharSet_Latin2_1250_size 191 + +static const FcCharSet fcCharSet_Cyrillic_1251 = { + 1, FcTrue, 4, (FcCharLeaf **) leaves_Cyrillic_1251, (FcChar16 *) numbers_Cyrillic_1251 +}; + +#define fcCharSet_Cyrillic_1251_size 207 + +static const FcCharSet fcCharSet_Latin1_1252 = { + 1, FcTrue, 3, (FcCharLeaf **) leaves_Latin1_1252, (FcChar16 *) numbers_Latin1_1252 +}; + +#define fcCharSet_Latin1_1252_size 207 + +static const FcCharSet fcCharSet_Greek_1253 = { + 1, FcTrue, 4, (FcCharLeaf **) leaves_Greek_1253, (FcChar16 *) numbers_Greek_1253 +}; + +#define fcCharSet_Greek_1253_size 207 + +static const FcCharSet fcCharSet_Turkish_1254 = { + 1, FcTrue, 4, (FcCharLeaf **) leaves_Turkish_1254, (FcChar16 *) numbers_Turkish_1254 +}; + +#define fcCharSet_Turkish_1254_size 207 + +static const FcCharSet fcCharSet_Hebrew_1255 = { + 1, FcTrue, 4, (FcCharLeaf **) leaves_Hebrew_1255, (FcChar16 *) numbers_Hebrew_1255 +}; + +#define fcCharSet_Hebrew_1255_size 207 + +static const FcCharSet fcCharSet_Arabic_1256 = { + 1, FcTrue, 4, (FcCharLeaf **) leaves_Arabic_1256, (FcChar16 *) numbers_Arabic_1256 +}; + +#define fcCharSet_Arabic_1256_size 209 + +static const FcCharSet fcCharSet_Windows_Baltic_1257 = { + 1, FcTrue, 5, (FcCharLeaf **) leaves_Windows_Baltic_1257, (FcChar16 *) numbers_Windows_Baltic_1257 +}; + +#define fcCharSet_Windows_Baltic_1257_size 207 + Index: xc/lib/fontconfig/src/fclang.c diff -u /dev/null xc/lib/fontconfig/src/fclang.c:1.8 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fclang.c Fri Dec 13 21:03:59 2002 @@ -0,0 +1,508 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fclang.c,v 1.8 2002/12/14 02:03:59 dawes Exp $ + * + * Copyright © 2002 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 "fcint.h" + +typedef struct { + FcChar8 *lang; + FcCharSet charset; +} FcLangCharSet; + +#include "../fc-lang/fclang.h" + +struct _FcLangSet { + FcChar32 map[NUM_LANG_SET_MAP]; + FcStrSet *extra; +}; + +#define FcLangSetBitSet(ls, id) ((ls)->map[(id)>>5] |= ((FcChar32) 1 << ((id) & 0x1f))) +#define FcLangSetBitGet(ls, id) (((ls)->map[(id)>>5] >> ((id) & 0x1f)) & 1) + +FcLangSet * +FcFreeTypeLangSet (const FcCharSet *charset, + const FcChar8 *exclusiveLang) +{ + int i; + FcChar32 missing; + const FcCharSet *exclusiveCharset = 0; + FcLangSet *ls; + + + if (exclusiveLang) + exclusiveCharset = FcCharSetForLang (exclusiveLang); + ls = FcLangSetCreate (); + if (!ls) + return 0; + for (i = 0; i < NUM_LANG_CHAR_SET; i++) + { + /* + * Check for Han charsets to make fonts + * which advertise support for a single language + * not support other Han languages + */ + if (exclusiveCharset && + FcFreeTypeIsExclusiveLang (fcLangCharSets[i].lang) && + fcLangCharSets[i].charset.leaves != exclusiveCharset->leaves) + { + continue; + } + missing = FcCharSetSubtractCount (&fcLangCharSets[i].charset, charset); + if (FcDebug() & FC_DBG_SCANV) + { + if (missing && missing < 10) + { + FcCharSet *missed = FcCharSetSubtract (&fcLangCharSets[i].charset, + charset); + FcChar32 ucs4; + FcChar32 map[FC_CHARSET_MAP_SIZE]; + FcChar32 next; + + printf ("\n%s(%d) ", fcLangCharSets[i].lang, missing); + printf ("{"); + for (ucs4 = FcCharSetFirstPage (missed, map, &next); + ucs4 != FC_CHARSET_DONE; + ucs4 = FcCharSetNextPage (missed, map, &next)) + { + int i, j; + for (i = 0; i < FC_CHARSET_MAP_SIZE; i++) + if (map[i]) + { + for (j = 0; j < 32; j++) + if (map[i] & (1 << j)) + printf (" %04x", ucs4 + i * 32 + j); + } + } + printf (" }\n\t"); + FcCharSetDestroy (missed); + } + else + printf ("%s(%d) ", fcLangCharSets[i].lang, missing); + } + if (!missing) + FcLangSetBitSet (ls, i); + } + + if (FcDebug() & FC_DBG_SCANV) + printf ("\n"); + + + return ls; +} + +#define FcLangEnd(c) ((c) == '-' || (c) == '\0') + +FcLangResult +FcLangCompare (const FcChar8 *s1, const FcChar8 *s2) +{ + FcChar8 c1, c2; + FcLangResult result = FcLangDifferentLang; + + for (;;) + { + c1 = *s1++; + c2 = *s2++; + + c1 = FcToLower (c1); + c2 = FcToLower (c2); + if (c1 != c2) + { + if (FcLangEnd (c1) && FcLangEnd (c2)) + result = FcLangDifferentCountry; + return result; + } + else if (!c1) + return FcLangEqual; + else if (c1 == '-') + result = FcLangDifferentCountry; + } +} + +const FcCharSet * +FcCharSetForLang (const FcChar8 *lang) +{ + int i; + int country = -1; + for (i = 0; i < NUM_LANG_CHAR_SET; i++) + { + switch (FcLangCompare (lang, fcLangCharSets[i].lang)) { + case FcLangEqual: + return &fcLangCharSets[i].charset; + case FcLangDifferentCountry: + if (country == -1) + country = i; + default: + break; + } + } + if (country == -1) + return 0; + return &fcLangCharSets[i].charset; +} + +FcLangSet * +FcLangSetCreate (void) +{ + FcLangSet *ls; + + ls = malloc (sizeof (FcLangSet)); + if (!ls) + return 0; + FcMemAlloc (FC_MEM_LANGSET, sizeof (FcLangSet)); + memset (ls->map, '\0', sizeof (ls->map)); + ls->extra = 0; + return ls; +} + +void +FcLangSetDestroy (FcLangSet *ls) +{ + if (ls->extra) + FcStrSetDestroy (ls->extra); + FcMemFree (FC_MEM_LANGSET, sizeof (FcLangSet)); + free (ls); +} + +FcLangSet * +FcLangSetCopy (const FcLangSet *ls) +{ + FcLangSet *new; + + new = FcLangSetCreate (); + if (!new) + goto bail0; + memcpy (new->map, ls->map, sizeof (new->map)); + if (ls->extra) + { + FcStrList *list; + FcChar8 *extra; + + new->extra = FcStrSetCreate (); + if (!new->extra) + goto bail1; + + list = FcStrListCreate (ls->extra); + if (!list) + goto bail1; + + while ((extra = FcStrListNext (list))) + if (!FcStrSetAdd (new->extra, extra)) + { + FcStrListDone (list); + goto bail1; + } + FcStrListDone (list); + } + return new; +bail1: + FcLangSetDestroy (new); +bail0: + return 0; +} + +static int +FcLangSetIndex (const FcChar8 *lang) +{ + int low, high, mid; + int cmp; + + low = 0; + high = NUM_LANG_CHAR_SET - 1; + while (low <= high) + { + mid = (high + low) >> 1; + cmp = FcStrCmpIgnoreCase (fcLangCharSets[mid].lang, lang); + if (cmp == 0) + return mid; + if (cmp < 0) + low = mid + 1; + else + high = mid - 1; + } + if (cmp < 0) + mid++; + return -(mid + 1); +} + +FcBool +FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang) +{ + int id; + + id = FcLangSetIndex (lang); + if (id >= 0) + { + FcLangSetBitSet (ls, id); + return FcTrue; + } + if (!ls->extra) + { + ls->extra = FcStrSetCreate (); + if (!ls->extra) + return FcFalse; + } + return FcStrSetAdd (ls->extra, lang); +} + +FcLangResult +FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang) +{ + int id; + FcLangResult best, r; + int i; + + id = FcLangSetIndex (lang); + if (id < 0) + id = -id - 1; + else if (FcLangSetBitGet (ls, id)) + return FcLangEqual; + best = FcLangDifferentLang; + for (i = id - 1; i >= 0; i--) + { + r = FcLangCompare (lang, fcLangCharSets[i].lang); + if (r == FcLangDifferentLang) + break; + if (FcLangSetBitGet (ls, i) && r < best) + best = r; + } + for (i = id; i < NUM_LANG_CHAR_SET; i++) + { + r = FcLangCompare (lang, fcLangCharSets[i].lang); + if (r == FcLangDifferentLang) + break; + if (FcLangSetBitGet (ls, i) && r < best) + best = r; + } + if (ls->extra) + { + FcStrList *list = FcStrListCreate (ls->extra); + FcChar8 *extra; + FcLangResult r; + + if (list) + { + while (best > FcLangEqual && (extra = FcStrListNext (list))) + { + r = FcLangCompare (lang, extra); + if (r < best) + best = r; + } + FcStrListDone (list); + } + } + return best; +} + +static FcLangResult +FcLangSetCompareStrSet (const FcLangSet *ls, FcStrSet *set) +{ + FcStrList *list = FcStrListCreate (set); + FcLangResult r, best = FcLangDifferentLang; + FcChar8 *extra; + + if (list) + { + while (best > FcLangEqual && (extra = FcStrListNext (list))) + { + r = FcLangSetHasLang (ls, extra); + if (r < best) + best = r; + } + FcStrListDone (list); + } + return best; +} + +FcLangResult +FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb) +{ + int i, j; + FcLangResult best, r; + + for (i = 0; i < NUM_LANG_SET_MAP; i++) + if (lsa->map[i] & lsb->map[i]) + return FcLangEqual; + best = FcLangDifferentLang; + for (j = 0; j < NUM_COUNTRY_SET; j++) + for (i = 0; i < NUM_LANG_SET_MAP; i++) + if ((lsa->map[i] & fcLangCountrySets[j][i]) && + (lsb->map[i] & fcLangCountrySets[j][i])) + { + best = FcLangDifferentCountry; + break; + } + if (lsa->extra) + { + r = FcLangSetCompareStrSet (lsb, lsa->extra); + if (r < best) + best = r; + } + if (best > FcLangEqual && lsb->extra) + { + r = FcLangSetCompareStrSet (lsa, lsb->extra); + if (r < best) + best = r; + } + return best; +} + +/* + * Used in computing values -- mustn't allocate any storage + */ +FcLangSet * +FcLangSetPromote (const FcChar8 *lang) +{ + static FcLangSet ls; + static FcStrSet strs; + static FcChar8 *str; + int id; + + memset (ls.map, '\0', sizeof (ls.map)); + ls.extra = 0; + id = FcLangSetIndex (lang); + if (id > 0) + { + FcLangSetBitSet (&ls, id); + } + else + { + ls.extra = &strs; + strs.num = 1; + strs.size = 1; + strs.strs = &str; + strs.ref = 1; + str = (FcChar8 *) lang; + } + return &ls; +} + +FcChar32 +FcLangSetHash (const FcLangSet *ls) +{ + FcChar32 h = 0; + int i; + + for (i = 0; i < NUM_LANG_SET_MAP; i++) + h ^= ls->map[i]; + if (ls->extra) + h ^= ls->extra->num; + return h; +} + +FcLangSet * +FcNameParseLangSet (const FcChar8 *string) +{ + FcChar8 lang[32]; + const FcChar8 *end, *next; + FcLangSet *ls; + + ls = FcLangSetCreate (); + if (!ls) + goto bail0; + + while (string && *string) + { + end = (FcChar8 *) strchr ((char *) string, '|'); + if (!end) + { + end = string + strlen ((char *) string); + next = end; + } + else + next = end + 1; + if (end - string < sizeof (lang) - 1) + { + strncpy ((char *) lang, (char *) string, end - string); + lang[end-string] = '\0'; + if (!FcLangSetAdd (ls, lang)) + goto bail1; + } + string = next; + } + return ls; +bail1: + FcLangSetDestroy (ls); +bail0: + return 0; +} + +FcBool +FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls) +{ + int i, bit; + FcChar32 bits; + FcBool first = FcTrue; + + for (i = 0; i < NUM_LANG_SET_MAP; i++) + { + if ((bits = ls->map[i])) + { + for (bit = 0; bit <= 31; bit++) + if (bits & (1 << bit)) + { + int id = (i << 5) | bit; + if (!first) + if (!FcStrBufChar (buf, '|')) + return FcFalse; + if (!FcStrBufString (buf, fcLangCharSets[id].lang)) + return FcFalse; + first = FcFalse; + } + } + } + if (ls->extra) + { + FcStrList *list = FcStrListCreate (ls->extra); + FcChar8 *extra; + + if (!list) + return FcFalse; + while ((extra = FcStrListNext (list))) + { + if (!first) + if (!FcStrBufChar (buf, '|')) + return FcFalse; + if (!FcStrBufString (buf, extra)); + return FcFalse; + first = FcFalse; + } + } + return FcTrue; +} + +FcBool +FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb) +{ + int i; + + for (i = 0; i < NUM_LANG_SET_MAP; i++) + { + if (lsa->map[i] != lsb->map[i]) + return FcFalse; + } + if (!lsa->extra && !lsb->extra) + return FcTrue; + if (lsa->extra && lsb->extra) + return FcStrSetEqual (lsa->extra, lsb->extra); + return FcFalse; +} Index: xc/lib/fontconfig/src/fclist.c diff -u /dev/null xc/lib/fontconfig/src/fclist.c:1.12 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fclist.c Wed Sep 18 13:11:46 2002 @@ -0,0 +1,494 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.12 2002/09/18 17:11:46 tsi 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 <stdlib.h> +#include "fcint.h" + +FcObjectSet * +FcObjectSetCreate (void) +{ + FcObjectSet *os; + + os = (FcObjectSet *) malloc (sizeof (FcObjectSet)); + if (!os) + return 0; + FcMemAlloc (FC_MEM_OBJECTSET, sizeof (FcObjectSet)); + os->nobject = 0; + os->sobject = 0; + os->objects = 0; + return os; +} + +FcBool +FcObjectSetAdd (FcObjectSet *os, const char *object) +{ + int s; + const char **objects; + int high, low, mid, c; + + if (os->nobject == os->sobject) + { + s = os->sobject + 4; + if (os->objects) + objects = (const char **) realloc ((void *) os->objects, + s * sizeof (const char *)); + else + objects = (const char **) malloc (s * sizeof (const char *)); + if (!objects) + return FcFalse; + if (os->sobject) + FcMemFree (FC_MEM_OBJECTPTR, os->sobject * sizeof (const char *)); + FcMemAlloc (FC_MEM_OBJECTPTR, s * sizeof (const char *)); + os->objects = objects; + os->sobject = s; + } + high = os->nobject - 1; + low = 0; + mid = 0; + c = 1; + while (low <= high) + { + mid = (low + high) >> 1; + c = strcmp (os->objects[mid], object); + if (c == 0) + return FcTrue; + if (c < 0) + low = mid + 1; + else + high = mid - 1; + } + if (c < 0) + mid++; + memmove (os->objects + mid + 1, os->objects + mid, + (os->nobject - mid) * sizeof (const char *)); + os->objects[mid] = object; + os->nobject++; + return FcTrue; +} + +void +FcObjectSetDestroy (FcObjectSet *os) +{ + if (os->objects) + { + FcMemFree (FC_MEM_OBJECTPTR, os->sobject * sizeof (const char *)); + free ((void *) os->objects); + } + FcMemFree (FC_MEM_OBJECTSET, sizeof (FcObjectSet)); + free (os); +} + +FcObjectSet * +FcObjectSetVaBuild (const char *first, va_list va) +{ + FcObjectSet *ret; + + FcObjectSetVapBuild (ret, first, va); + return ret; +} + +FcObjectSet * +FcObjectSetBuild (const char *first, ...) +{ + va_list va; + FcObjectSet *os; + + va_start (va, first); + FcObjectSetVapBuild (os, first, va); + va_end (va); + return os; +} + +static FcBool +FcListValueListMatchAny (FcValueList *v1orig, + FcValueList *v2orig) +{ + FcValueList *v1, *v2; + + for (v1 = v1orig; v1; v1 = v1->next) + for (v2 = v2orig; v2; v2 = v2->next) + if (FcConfigCompareValue (v2->value, FcOpContains, v1->value)) + return FcTrue; + return FcFalse; +} + +static FcBool +FcListValueListEqual (FcValueList *v1orig, + FcValueList *v2orig) +{ + FcValueList *v1, *v2; + + for (v1 = v1orig; v1; v1 = v1->next) + { + for (v2 = v2orig; v2; v2 = v2->next) + if (FcValueEqual (v1->value, v2->value)) + break; + if (!v2) + return FcFalse; + } + for (v2 = v2orig; v2; v2 = v2->next) + { + for (v1 = v1orig; v1; v1 = v1->next) + if (FcValueEqual (v1->value, v2->value)) + break; + if (!v1) + return FcFalse; + } + return FcTrue; +} + +static FcBool +FcListPatternEqual (FcPattern *p1, + FcPattern *p2, + FcObjectSet *os) +{ + int i; + FcPatternElt *e1, *e2; + + for (i = 0; i < os->nobject; i++) + { + e1 = FcPatternFindElt (p1, os->objects[i]); + e2 = FcPatternFindElt (p2, os->objects[i]); + if (!e1 && !e2) + continue; + if (!e1 || !e2) + return FcFalse; + if (!FcListValueListEqual (e1->values, e2->values)) + return FcFalse; + } + return FcTrue; +} + +/* + * FcTrue iff all objects in "p" match "font" + */ + +static FcBool +FcListPatternMatchAny (FcPattern *p, + FcPattern *font) +{ + int i; + FcPatternElt *e; + + for (i = 0; i < p->num; i++) + { + e = FcPatternFindElt (font, p->elts[i].object); + if (!e) + return FcFalse; + if (!FcListValueListMatchAny (p->elts[i].values, e->values)) + return FcFalse; + } + return FcTrue; +} + +static FcChar32 +FcListStringHash (const FcChar8 *s) +{ + FcChar32 h = 0; + FcChar8 c; + + while ((c = *s++)) + { + c = FcToLower (c); + h = ((h << 3) ^ (h >> 3)) ^ c; + } + return h; +} + +static FcChar32 +FcListMatrixHash (const FcMatrix *m) +{ + int xx = (int) (m->xx * 100), + xy = (int) (m->xy * 100), + yx = (int) (m->yx * 100), + yy = (int) (m->yy * 100); + + return ((FcChar32) xx) ^ ((FcChar32) xy) ^ ((FcChar32) yx) ^ ((FcChar32) yy); +} + +static FcChar32 +FcListValueHash (FcValue v) +{ + switch (v.type) { + case FcTypeVoid: + return 0; + case FcTypeInteger: + return (FcChar32) v.u.i; + case FcTypeDouble: + return (FcChar32) (int) v.u.d; + case FcTypeString: + return FcListStringHash (v.u.s); + case FcTypeBool: + return (FcChar32) v.u.b; + case FcTypeMatrix: + return FcListMatrixHash (v.u.m); + case FcTypeCharSet: + return FcCharSetCount (v.u.c); + case FcTypeFTFace: + return (long) v.u.f; + case FcTypeLangSet: + return FcLangSetHash (v.u.l); + } + return 0; +} + +static FcChar32 +FcListValueListHash (FcValueList *list) +{ + FcChar32 h = 0; + + while (list) + { + h = h ^ FcListValueHash (list->value); + list = list->next; + } + return h; +} + +static FcChar32 +FcListPatternHash (FcPattern *font, + FcObjectSet *os) +{ + int n; + FcPatternElt *e; + FcChar32 h = 0; + + for (n = 0; n < os->nobject; n++) + { + e = FcPatternFindElt (font, os->objects[n]); + if (e) + h = h ^ FcListValueListHash (e->values); + } + return h; +} + +typedef struct _FcListBucket { + struct _FcListBucket *next; + FcChar32 hash; + FcPattern *pattern; +} FcListBucket; + +#define FC_LIST_HASH_SIZE 4099 + +typedef struct _FcListHashTable { + int entries; + FcListBucket *buckets[FC_LIST_HASH_SIZE]; +} FcListHashTable; + +static void +FcListHashTableInit (FcListHashTable *table) +{ + table->entries = 0; + memset (table->buckets, '\0', sizeof (table->buckets)); +} + +static void +FcListHashTableCleanup (FcListHashTable *table) +{ + int i; + FcListBucket *bucket, *next; + + for (i = 0; i < FC_LIST_HASH_SIZE; i++) + { + for (bucket = table->buckets[i]; bucket; bucket = next) + { + next = bucket->next; + FcPatternDestroy (bucket->pattern); + FcMemFree (FC_MEM_LISTBUCK, sizeof (FcListBucket)); + free (bucket); + } + table->buckets[i] = 0; + } + table->entries = 0; +} + +static FcBool +FcListAppend (FcListHashTable *table, + FcPattern *font, + FcObjectSet *os) +{ + int o; + FcPatternElt *e; + FcValueList *v; + FcChar32 hash; + FcListBucket **prev, *bucket; + + hash = FcListPatternHash (font, os); + for (prev = &table->buckets[hash % FC_LIST_HASH_SIZE]; + (bucket = *prev); prev = &(bucket->next)) + { + if (bucket->hash == hash && + FcListPatternEqual (bucket->pattern, font, os)) + return FcTrue; + } + bucket = (FcListBucket *) malloc (sizeof (FcListBucket)); + if (!bucket) + goto bail0; + FcMemAlloc (FC_MEM_LISTBUCK, sizeof (FcListBucket)); + bucket->next = 0; + bucket->hash = hash; + bucket->pattern = FcPatternCreate (); + if (!bucket->pattern) + goto bail1; + + for (o = 0; o < os->nobject; o++) + { + e = FcPatternFindElt (font, os->objects[o]); + if (e) + { + for (v = e->values; v; v = v->next) + { + if (!FcPatternAdd (bucket->pattern, + os->objects[o], + v->value, FcTrue)) + goto bail2; + } + } + } + *prev = bucket; + ++table->entries; + + return FcTrue; + +bail2: + FcPatternDestroy (bucket->pattern); +bail1: + FcMemFree (FC_MEM_LISTBUCK, sizeof (FcListBucket)); + free (bucket); +bail0: + return FcFalse; +} + +FcFontSet * +FcFontSetList (FcConfig *config, + FcFontSet **sets, + int nsets, + FcPattern *p, + FcObjectSet *os) +{ + FcFontSet *ret; + FcFontSet *s; + int f; + int set; + FcListHashTable table; + int i; + FcListBucket *bucket; + + if (!config) + { + if (!FcInitBringUptoDate ()) + goto bail0; + + config = FcConfigGetCurrent (); + if (!config) + goto bail0; + } + FcListHashTableInit (&table); + /* + * Walk all available fonts adding those that + * match to the hash table + */ + for (set = 0; set < nsets; set++) + { + s = sets[set]; + if (!s) + continue; + for (f = 0; f < s->nfont; f++) + if (FcListPatternMatchAny (p, s->fonts[f])) + if (!FcListAppend (&table, s->fonts[f], os)) + goto bail1; + } +#if 0 + { + int max = 0; + int full = 0; + int ents = 0; + int len; + for (i = 0; i < FC_LIST_HASH_SIZE; i++) + { + if ((bucket = table.buckets[i])) + { + len = 0; + for (; bucket; bucket = bucket->next) + { + ents++; + len++; + } + if (len > max) + max = len; + full++; + } + } + printf ("used: %d max: %d avg: %g\n", full, max, + (double) ents / FC_LIST_HASH_SIZE); + } +#endif + /* + * Walk the hash table and build + * a font set + */ + ret = FcFontSetCreate (); + if (!ret) + goto bail0; + for (i = 0; i < FC_LIST_HASH_SIZE; i++) + while ((bucket = table.buckets[i])) + { + if (!FcFontSetAdd (ret, bucket->pattern)) + goto bail2; + table.buckets[i] = bucket->next; + FcMemFree (FC_MEM_LISTBUCK, sizeof (FcListBucket)); + free (bucket); + } + + return ret; + +bail2: + FcFontSetDestroy (ret); +bail1: + FcListHashTableCleanup (&table); +bail0: + return 0; +} + +FcFontSet * +FcFontList (FcConfig *config, + FcPattern *p, + FcObjectSet *os) +{ + FcFontSet *sets[2]; + int nsets; + + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + nsets = 0; + if (config->fonts[FcSetSystem]) + sets[nsets++] = config->fonts[FcSetSystem]; + if (config->fonts[FcSetApplication]) + sets[nsets++] = config->fonts[FcSetApplication]; + return FcFontSetList (config, sets, nsets, p, os); +} Index: xc/lib/fontconfig/src/fcmatch.c diff -u /dev/null xc/lib/fontconfig/src/fcmatch.c:1.21 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcmatch.c Wed Sep 25 20:17:28 2002 @@ -0,0 +1,745 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.21 2002/09/26 00:17:28 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 <string.h> +#include <ctype.h> +#include "fcint.h" +#include <stdio.h> + +static double +FcCompareInteger (char *object, FcValue value1, FcValue value2) +{ + int v; + + if (value2.type != FcTypeInteger || value1.type != FcTypeInteger) + return -1.0; + v = value2.u.i - value1.u.i; + if (v < 0) + v = -v; + return (double) v; +} + +static double +FcCompareString (char *object, FcValue value1, FcValue value2) +{ + if (value2.type != FcTypeString || value1.type != FcTypeString) + return -1.0; + return (double) FcStrCmpIgnoreCase (value1.u.s, value2.u.s) != 0; +} + +static double +FcCompareFamily (char *object, FcValue value1, FcValue value2) +{ + if (value2.type != FcTypeString || value1.type != FcTypeString) + return -1.0; + return (double) FcStrCmpIgnoreBlanksAndCase (value1.u.s, value2.u.s) != 0; +} + +static double +FcCompareLang (char *object, FcValue value1, FcValue value2) +{ + FcLangResult result; + + switch (value1.type) { + case FcTypeLangSet: + switch (value2.type) { + case FcTypeLangSet: + result = FcLangSetCompare (value1.u.l, value2.u.l); + break; + case FcTypeString: + result = FcLangSetHasLang (value1.u.l, value2.u.s); + break; + default: + return -1.0; + } + break; + case FcTypeString: + switch (value2.type) { + case FcTypeLangSet: + result = FcLangSetHasLang (value2.u.l, value1.u.s); + break; + case FcTypeString: + result = FcLangCompare (value1.u.s, value2.u.s); + break; + default: + return -1.0; + } + break; + default: + return -1.0; + } + switch (result) { + case FcLangEqual: + return 0; + case FcLangDifferentCountry: + return 1; + case FcLangDifferentLang: + default: + return 2; + } +} + +static double +FcCompareBool (char *object, FcValue value1, FcValue value2) +{ + if (value2.type != FcTypeBool || value1.type != FcTypeBool) + return -1.0; + return (double) value2.u.b != value1.u.b; +} + +static double +FcCompareCharSet (char *object, FcValue value1, FcValue value2) +{ + if (value2.type != FcTypeCharSet || value1.type != FcTypeCharSet) + return -1.0; + return (double) FcCharSetSubtractCount (value1.u.c, value2.u.c); +} + +static double +FcCompareSize (char *object, FcValue value1, FcValue value2) +{ + double v1, v2, v; + + switch (value1.type) { + case FcTypeInteger: + v1 = value1.u.i; + break; + case FcTypeDouble: + v1 = value1.u.d; + break; + default: + return -1; + } + switch (value2.type) { + case FcTypeInteger: + v2 = value2.u.i; + break; + case FcTypeDouble: + v2 = value2.u.d; + break; + default: + return -1; + } + if (v2 == 0) + return 0; + v = v2 - v1; + if (v < 0) + v = -v; + return v; +} + +typedef struct _FcMatcher { + char *object; + double (*compare) (char *object, FcValue value1, FcValue value2); + int strong, weak; +} FcMatcher; + +/* + * Order is significant, it defines the precedence of + * each value, earlier values are more significant than + * later values + */ +static FcMatcher _FcMatchers [] = { + { FC_FOUNDRY, FcCompareString, 0, 0 }, +#define MATCH_FOUNDRY 0 + + { FC_CHARSET, FcCompareCharSet, 1, 1 }, +#define MATCH_CHARSET 1 + + { FC_FAMILY, FcCompareFamily, 2, 4 }, +#define MATCH_FAMILY 2 + + { FC_LANG, FcCompareLang, 3, 3 }, +#define MATCH_LANG 3 + + { FC_SPACING, FcCompareInteger, 5, 5 }, +#define MATCH_SPACING 4 + + { FC_PIXEL_SIZE, FcCompareSize, 6, 6 }, +#define MATCH_PIXEL_SIZE 5 + + { FC_STYLE, FcCompareString, 7, 7 }, +#define MATCH_STYLE 6 + + { FC_SLANT, FcCompareInteger, 8, 8 }, +#define MATCH_SLANT 7 + + { FC_WEIGHT, FcCompareInteger, 9, 9 }, +#define MATCH_WEIGHT 8 + + { FC_ANTIALIAS, FcCompareBool, 10, 10 }, +#define MATCH_ANTIALIAS 9 + + { FC_RASTERIZER, FcCompareString, 11, 11 }, +#define MATCH_RASTERIZER 10 + + { FC_OUTLINE, FcCompareBool, 12, 12 }, +#define MATCH_OUTLINE 11 + + { FC_FONTVERSION, FcCompareInteger, 13, 13 }, +#define MATCH_FONTVERSION 12 +}; + +#define NUM_MATCH_VALUES 14 + +static FcBool +FcCompareValueList (const char *object, + FcValueList *v1orig, /* pattern */ + FcValueList *v2orig, /* target */ + FcValue *bestValue, + double *value, + FcResult *result) +{ + FcValueList *v1, *v2; + double v, best, bestStrong, bestWeak; + int i; + int j; + + /* + * Locate the possible matching entry by examining the + * first few characters in object + */ + i = -1; + switch (FcToLower (object[0])) { + case 'f': + switch (FcToLower (object[1])) { + case 'o': + switch (FcToLower (object[2])) { + case 'u': + i = MATCH_FOUNDRY; break; + case 'n': + i = MATCH_FONTVERSION; break; + } + break; + case 'a': + i = MATCH_FAMILY; break; + } + break; + case 'c': + i = MATCH_CHARSET; break; + case 'a': + i = MATCH_ANTIALIAS; break; + case 'l': + i = MATCH_LANG; break; + case 's': + switch (FcToLower (object[1])) { + case 'p': + i = MATCH_SPACING; break; + case 't': + i = MATCH_STYLE; break; + case 'l': + i = MATCH_SLANT; break; + } + break; + case 'p': + i = MATCH_PIXEL_SIZE; break; + case 'w': + i = MATCH_WEIGHT; break; + case 'r': + i = MATCH_RASTERIZER; break; + case 'o': + i = MATCH_OUTLINE; break; + } + if (i == -1 || + FcStrCmpIgnoreCase ((FcChar8 *) _FcMatchers[i].object, + (FcChar8 *) object) != 0) + { + if (bestValue) + *bestValue = v2orig->value; + return FcTrue; + } +#if 0 + for (i = 0; i < NUM_MATCHER; i++) + { + if (!FcStrCmpIgnoreCase ((FcChar8 *) _FcMatchers[i].object, + (FcChar8 *) object)) + break; + } + if (i == NUM_MATCHER) + { + if (bestValue) + *bestValue = v2orig->value; + return FcTrue; + } +#endif + best = 1e99; + bestStrong = 1e99; + bestWeak = 1e99; + j = 0; + for (v1 = v1orig; v1; v1 = v1->next) + { + for (v2 = v2orig; v2; v2 = v2->next) + { + v = (*_FcMatchers[i].compare) (_FcMatchers[i].object, + v1->value, + v2->value); + if (v < 0) + { + *result = FcResultTypeMismatch; + return FcFalse; + } + if (FcDebug () & FC_DBG_MATCHV) + printf (" v %g j %d ", v, j); + v = v * 100 + j; + if (v < best) + { + if (bestValue) + *bestValue = v2->value; + best = v; + } + if (v1->binding == FcValueBindingStrong) + { + if (v < bestStrong) + bestStrong = v; + } + else + { + if (v < bestWeak) + bestWeak = v; + } + } + j++; + } + if (FcDebug () & FC_DBG_MATCHV) + { + printf (" %s: %g ", object, best); + FcValueListPrint (v1orig); + printf (", "); + FcValueListPrint (v2orig); + printf ("\n"); + } + if (value) + { + int weak = _FcMatchers[i].weak; + int strong = _FcMatchers[i].strong; + if (weak == strong) + value[strong] += best; + else + { + value[weak] += bestWeak; + value[strong] += bestStrong; + } + } + return FcTrue; +} + +/* + * Return a value indicating the distance between the two lists of + * values + */ + +static FcBool +FcCompare (FcPattern *pat, + FcPattern *fnt, + double *value, + FcResult *result) +{ + int i, i1, i2; + + for (i = 0; i < NUM_MATCH_VALUES; i++) + value[i] = 0.0; + + i1 = 0; + i2 = 0; + while (i1 < pat->num && i2 < fnt->num) + { + i = strcmp (pat->elts[i1].object, fnt->elts[i2].object); + if (i > 0) + i2++; + else if (i < 0) + i1++; + else + { + if (!FcCompareValueList (pat->elts[i1].object, + pat->elts[i1].values, + fnt->elts[i2].values, + 0, + value, + result)) + return FcFalse; + i1++; + i2++; + } + } + return FcTrue; +#if 0 + for (i1 = 0; i1 < pat->num; i1++) + { + for (i2 = 0; i2 < fnt->num; i2++) + { + if (!strcmp (pat->elts[i1].object, fnt->elts[i2].object)) + { + break; + } + } + } + return FcTrue; +#endif +} + +FcPattern * +FcFontRenderPrepare (FcConfig *config, + FcPattern *pat, + FcPattern *font) +{ + FcPattern *new; + int i; + FcPatternElt *fe, *pe; + FcValue v; + FcResult result; + + new = FcPatternCreate (); + if (!new) + return 0; + for (i = 0; i < font->num; i++) + { + fe = &font->elts[i]; + pe = FcPatternFindElt (pat, fe->object); + if (pe) + { + if (!FcCompareValueList (pe->object, pe->values, + fe->values, &v, 0, &result)) + { + FcPatternDestroy (new); + return 0; + } + } + else + v = fe->values->value; + FcPatternAdd (new, fe->object, v, FcFalse); + } + for (i = 0; i < pat->num; i++) + { + pe = &pat->elts[i]; + fe = FcPatternFindElt (font, pe->object); + if (!fe) + FcPatternAdd (new, pe->object, pe->values->value, FcTrue); + } + FcConfigSubstituteWithPat (config, new, pat, FcMatchFont); + return new; +} + +FcPattern * +FcFontSetMatch (FcConfig *config, + FcFontSet **sets, + int nsets, + FcPattern *p, + FcResult *result) +{ + double score[NUM_MATCH_VALUES], bestscore[NUM_MATCH_VALUES]; + int f; + FcFontSet *s; + FcPattern *best; + int i; + int set; + + for (i = 0; i < NUM_MATCH_VALUES; i++) + bestscore[i] = 0; + best = 0; + if (FcDebug () & FC_DBG_MATCH) + { + printf ("Match "); + FcPatternPrint (p); + } + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + for (set = 0; set < nsets; set++) + { + s = sets[set]; + if (!s) + continue; + for (f = 0; f < s->nfont; f++) + { + if (FcDebug () & FC_DBG_MATCHV) + { + printf ("Font %d ", f); + FcPatternPrint (s->fonts[f]); + } + if (!FcCompare (p, s->fonts[f], score, result)) + return 0; + if (FcDebug () & FC_DBG_MATCHV) + { + printf ("Score"); + for (i = 0; i < NUM_MATCH_VALUES; i++) + { + printf (" %g", score[i]); + } + printf ("\n"); + } + for (i = 0; i < NUM_MATCH_VALUES; i++) + { + if (best && bestscore[i] < score[i]) + break; + if (!best || score[i] < bestscore[i]) + { + for (i = 0; i < NUM_MATCH_VALUES; i++) + bestscore[i] = score[i]; + best = s->fonts[f]; + break; + } + } + } + } + if (FcDebug () & FC_DBG_MATCH) + { + printf ("Best score"); + for (i = 0; i < NUM_MATCH_VALUES; i++) + printf (" %g", bestscore[i]); + FcPatternPrint (best); + } + if (!best) + { + *result = FcResultNoMatch; + return 0; + } + return FcFontRenderPrepare (config, p, best); +} + +FcPattern * +FcFontMatch (FcConfig *config, + FcPattern *p, + FcResult *result) +{ + FcFontSet *sets[2]; + int nsets; + + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + nsets = 0; + if (config->fonts[FcSetSystem]) + sets[nsets++] = config->fonts[FcSetSystem]; + if (config->fonts[FcSetApplication]) + sets[nsets++] = config->fonts[FcSetApplication]; + return FcFontSetMatch (config, sets, nsets, p, result); +} + +typedef struct _FcSortNode { + FcPattern *pattern; + double score[NUM_MATCH_VALUES]; +} FcSortNode; + +static int +FcSortCompare (const void *aa, const void *ab) +{ + FcSortNode *a = *(FcSortNode **) aa; + FcSortNode *b = *(FcSortNode **) ab; + double *as = &a->score[0]; + double *bs = &b->score[0]; + double ad = 0, bd = 0; + int i; + + i = NUM_MATCH_VALUES; + while (i-- && (ad = *as++) == (bd = *bs++)) + ; + return ad < bd ? -1 : ad > bd ? 1 : 0; +} + +static FcBool +FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **cs, FcBool trim) +{ + FcCharSet *ncs; + FcSortNode *node; + + while (nnode--) + { + node = *n++; + if (FcPatternGetCharSet (node->pattern, FC_CHARSET, 0, &ncs) == + FcResultMatch) + { + /* + * If this font isn't a subset of the previous fonts, + * add it to the list + */ + if (!trim || !*cs || !FcCharSetIsSubset (ncs, *cs)) + { + if (*cs) + { + ncs = FcCharSetUnion (ncs, *cs); + if (!ncs) + return FcFalse; + FcCharSetDestroy (*cs); + } + else + ncs = FcCharSetCopy (ncs); + *cs = ncs; + FcPatternReference (node->pattern); + if (FcDebug () & FC_DBG_MATCH) + { + printf ("Add "); + FcPatternPrint (node->pattern); + } + if (!FcFontSetAdd (fs, node->pattern)) + { + FcPatternDestroy (node->pattern); + return FcFalse; + } + } + } + } + return FcTrue; +} + +void +FcFontSetSortDestroy (FcFontSet *fs) +{ + FcFontSetDestroy (fs); +} + +FcFontSet * +FcFontSetSort (FcConfig *config, + FcFontSet **sets, + int nsets, + FcPattern *p, + FcBool trim, + FcCharSet **csp, + FcResult *result) +{ + FcFontSet *ret; + FcFontSet *s; + FcSortNode *nodes; + FcSortNode **nodeps, **nodep; + int nnodes; + FcSortNode *new; + FcCharSet *cs; + int set; + int f; + int i; + + if (FcDebug () & FC_DBG_MATCH) + { + printf ("Sort "); + FcPatternPrint (p); + } + nnodes = 0; + for (set = 0; set < nsets; set++) + { + s = sets[set]; + if (!s) + continue; + nnodes += s->nfont; + } + if (!nnodes) + goto bail0; + /* freed below */ + nodes = malloc (nnodes * sizeof (FcSortNode) + nnodes * sizeof (FcSortNode *)); + if (!nodes) + goto bail0; + nodeps = (FcSortNode **) (nodes + nnodes); + + new = nodes; + nodep = nodeps; + for (set = 0; set < nsets; set++) + { + s = sets[set]; + if (!s) + continue; + for (f = 0; f < s->nfont; f++) + { + if (FcDebug () & FC_DBG_MATCHV) + { + printf ("Font %d ", f); + FcPatternPrint (s->fonts[f]); + } + new->pattern = s->fonts[f]; + if (!FcCompare (p, new->pattern, new->score, result)) + goto bail1; + if (FcDebug () & FC_DBG_MATCHV) + { + printf ("Score"); + for (i = 0; i < NUM_MATCH_VALUES; i++) + { + printf (" %g", new->score[i]); + } + printf ("\n"); + } + *nodep = new; + new++; + nodep++; + } + } + + nnodes = new - nodes; + + qsort (nodeps, nnodes, sizeof (FcSortNode *), + FcSortCompare); + + ret = FcFontSetCreate (); + if (!ret) + goto bail1; + + cs = 0; + + if (!FcSortWalk (nodeps, nnodes, ret, &cs, trim)) + goto bail2; + + if (csp) + *csp = cs; + else + FcCharSetDestroy (cs); + + free (nodes); + + return ret; + +bail2: + if (cs) + FcCharSetDestroy (cs); + FcFontSetDestroy (ret); +bail1: + free (nodes); +bail0: + return 0; +} + +FcFontSet * +FcFontSort (FcConfig *config, + FcPattern *p, + FcBool trim, + FcCharSet **csp, + FcResult *result) +{ + FcFontSet *sets[2]; + int nsets; + + if (!config) + { + config = FcConfigGetCurrent (); + if (!config) + return 0; + } + nsets = 0; + if (config->fonts[FcSetSystem]) + sets[nsets++] = config->fonts[FcSetSystem]; + if (config->fonts[FcSetApplication]) + sets[nsets++] = config->fonts[FcSetApplication]; + return FcFontSetSort (config, sets, nsets, p, trim, csp, result); +} Index: xc/lib/fontconfig/src/fcmatrix.c diff -u /dev/null xc/lib/fontconfig/src/fcmatrix.c:1.2 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcmatrix.c Sun Jul 28 06:50:59 2002 @@ -0,0 +1,117 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcmatrix.c,v 1.2 2002/07/28 10:50:59 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 <math.h> +#include <stdlib.h> +#include <ctype.h> +#include "fcint.h" + +const FcMatrix FcIdentityMatrix = { 1, 0, 0, 1 }; + +FcMatrix * +FcMatrixCopy (const FcMatrix *mat) +{ + FcMatrix *r; + if(!mat) + return 0; + r = (FcMatrix *) malloc (sizeof (*r) ); + if (!r) + return 0; + FcMemAlloc (FC_MEM_MATRIX, sizeof (FcMatrix)); + *r = *mat; + return r; +} + +void +FcMatrixFree (FcMatrix *mat) +{ + if (mat != &FcIdentityMatrix) + { + FcMemFree (FC_MEM_MATRIX, sizeof (FcMatrix)); + free (mat); + } +} + +FcBool +FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2) +{ + if(mat1 == mat2) return FcTrue; + if(mat1 == 0 || mat2 == 0) return FcFalse; + return mat1->xx == mat2->xx && + mat1->xy == mat2->xy && + mat1->yx == mat2->yx && + mat1->yy == mat2->yy; +} + +void +FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b) +{ + FcMatrix 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 +FcMatrixRotate (FcMatrix *m, double c, double s) +{ + FcMatrix r; + + /* + * X Coordinate system is upside down, swap to make + * rotations counterclockwise + */ + r.xx = c; + r.xy = -s; + r.yx = s; + r.yy = c; + FcMatrixMultiply (m, &r, m); +} + +void +FcMatrixScale (FcMatrix *m, double sx, double sy) +{ + FcMatrix r; + + r.xx = sx; + r.xy = 0; + r.yx = 0; + r.yy = sy; + FcMatrixMultiply (m, &r, m); +} + +void +FcMatrixShear (FcMatrix *m, double sh, double sv) +{ + FcMatrix r; + + r.xx = 1; + r.xy = sh; + r.yx = sv; + r.yy = 1; + FcMatrixMultiply (m, &r, m); +} Index: xc/lib/fontconfig/src/fcname.c diff -u /dev/null xc/lib/fontconfig/src/fcname.c:1.16 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcname.c Wed Oct 2 03:11:30 2002 @@ -0,0 +1,580 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.16 2002/10/02 07:11:30 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 <ctype.h> +#include <stdlib.h> +#include <string.h> +#include <stdio.h> +#include "fcint.h" + +static const FcObjectType _FcBaseObjectTypes[] = { + { FC_FAMILY, FcTypeString, }, + { FC_STYLE, FcTypeString, }, + { FC_SLANT, FcTypeInteger, }, + { FC_WEIGHT, FcTypeInteger, }, + { FC_SIZE, FcTypeDouble, }, + { FC_ASPECT, FcTypeDouble, }, + { FC_PIXEL_SIZE, FcTypeDouble, }, + { FC_SPACING, FcTypeInteger, }, + { FC_FOUNDRY, FcTypeString, }, +/* { FC_CORE, FcTypeBool, }, */ + { FC_ANTIALIAS, FcTypeBool, }, + { FC_HINTING, FcTypeBool, }, + { FC_VERTICAL_LAYOUT, FcTypeBool, }, + { FC_AUTOHINT, FcTypeBool, }, + { FC_GLOBAL_ADVANCE, FcTypeBool, }, +/* { FC_XLFD, FcTypeString, }, */ + { FC_FILE, FcTypeString, }, + { FC_INDEX, FcTypeInteger, }, + { FC_RASTERIZER, FcTypeString, }, + { FC_OUTLINE, FcTypeBool, }, + { FC_SCALABLE, FcTypeBool, }, + { FC_DPI, FcTypeDouble }, + { FC_RGBA, FcTypeInteger, }, + { FC_SCALE, FcTypeDouble, }, +/* { FC_RENDER, FcTypeBool, },*/ + { FC_MINSPACE, FcTypeBool, }, + { FC_CHAR_WIDTH, FcTypeInteger }, + { FC_CHAR_HEIGHT, FcTypeInteger }, + { FC_MATRIX, FcTypeMatrix }, + { FC_CHARSET, FcTypeCharSet }, + { FC_LANG, FcTypeLangSet }, + { FC_FONTVERSION, FcTypeInteger }, +}; + +#define NUM_OBJECT_TYPES (sizeof _FcBaseObjectTypes / sizeof _FcBaseObjectTypes[0]) + +typedef struct _FcObjectTypeList FcObjectTypeList; + +struct _FcObjectTypeList { + const FcObjectTypeList *next; + const FcObjectType *types; + int ntypes; +}; + +static const FcObjectTypeList _FcBaseObjectTypesList = { + 0, + _FcBaseObjectTypes, + NUM_OBJECT_TYPES +}; + +static const FcObjectTypeList *_FcObjectTypes = &_FcBaseObjectTypesList; + +FcBool +FcNameRegisterObjectTypes (const FcObjectType *types, int ntypes) +{ + FcObjectTypeList *l; + + l = (FcObjectTypeList *) malloc (sizeof (FcObjectTypeList)); + if (!l) + return FcFalse; + FcMemAlloc (FC_MEM_OBJECTTYPE, sizeof (FcObjectTypeList)); + l->types = types; + l->ntypes = ntypes; + l->next = _FcObjectTypes; + _FcObjectTypes = l; + return FcTrue; +} + +FcBool +FcNameUnregisterObjectTypes (const FcObjectType *types, int ntypes) +{ + const FcObjectTypeList *l, **prev; + + for (prev = &_FcObjectTypes; + (l = *prev); + prev = (const FcObjectTypeList **) &(l->next)) + { + if (l->types == types && l->ntypes == ntypes) + { + *prev = l->next; + FcMemFree (FC_MEM_OBJECTTYPE, sizeof (FcObjectTypeList)); + free ((void *) l); + return FcTrue; + } + } + return FcFalse; +} + +const FcObjectType * +FcNameGetObjectType (const char *object) +{ + int i; + const FcObjectTypeList *l; + const FcObjectType *t; + + for (l = _FcObjectTypes; l; l = l->next) + { + for (i = 0; i < l->ntypes; i++) + { + t = &l->types[i]; + if (!strcmp (object, t->object)) + return t; + } + } + return 0; +} + +static const FcConstant _FcBaseConstants[] = { + { (FcChar8 *) "light", "weight", FC_WEIGHT_LIGHT, }, + { (FcChar8 *) "medium", "weight", FC_WEIGHT_MEDIUM, }, + { (FcChar8 *) "demibold", "weight", FC_WEIGHT_DEMIBOLD, }, + { (FcChar8 *) "bold", "weight", FC_WEIGHT_BOLD, }, + { (FcChar8 *) "black", "weight", FC_WEIGHT_BLACK, }, + + { (FcChar8 *) "roman", "slant", FC_SLANT_ROMAN, }, + { (FcChar8 *) "italic", "slant", FC_SLANT_ITALIC, }, + { (FcChar8 *) "oblique", "slant", FC_SLANT_OBLIQUE, }, + + { (FcChar8 *) "proportional", "spacing", FC_PROPORTIONAL, }, + { (FcChar8 *) "mono", "spacing", FC_MONO, }, + { (FcChar8 *) "charcell", "spacing", FC_CHARCELL, }, + + { (FcChar8 *) "unknown", "rgba", FC_RGBA_UNKNOWN }, + { (FcChar8 *) "rgb", "rgba", FC_RGBA_RGB, }, + { (FcChar8 *) "bgr", "rgba", FC_RGBA_BGR, }, + { (FcChar8 *) "vrgb", "rgba", FC_RGBA_VRGB }, + { (FcChar8 *) "vbgr", "rgba", FC_RGBA_VBGR }, + { (FcChar8 *) "none", "rgba", FC_RGBA_NONE }, +}; + +#define NUM_FC_CONSTANTS (sizeof _FcBaseConstants/sizeof _FcBaseConstants[0]) + +typedef struct _FcConstantList FcConstantList; + +struct _FcConstantList { + const FcConstantList *next; + const FcConstant *consts; + int nconsts; +}; + +static const FcConstantList _FcBaseConstantList = { + 0, + _FcBaseConstants, + NUM_FC_CONSTANTS +}; + +static const FcConstantList *_FcConstants = &_FcBaseConstantList; + +FcBool +FcNameRegisterConstants (const FcConstant *consts, int nconsts) +{ + FcConstantList *l; + + l = (FcConstantList *) malloc (sizeof (FcConstantList)); + if (!l) + return FcFalse; + FcMemAlloc (FC_MEM_CONSTANT, sizeof (FcConstantList)); + l->consts = consts; + l->nconsts = nconsts; + l->next = _FcConstants; + _FcConstants = l; + return FcTrue; +} + +FcBool +FcNameUnregisterConstants (const FcConstant *consts, int nconsts) +{ + const FcConstantList *l, **prev; + + for (prev = &_FcConstants; + (l = *prev); + prev = (const FcConstantList **) &(l->next)) + { + if (l->consts == consts && l->nconsts == nconsts) + { + *prev = l->next; + FcMemFree (FC_MEM_CONSTANT, sizeof (FcConstantList)); + free ((void *) l); + return FcTrue; + } + } + return FcFalse; +} + +const FcConstant * +FcNameGetConstant (FcChar8 *string) +{ + const FcConstantList *l; + int i; + + for (l = _FcConstants; l; l = l->next) + { + for (i = 0; i < l->nconsts; i++) + if (!FcStrCmpIgnoreCase (string, l->consts[i].name)) + return &l->consts[i]; + } + return 0; +} + +FcBool +FcNameConstant (FcChar8 *string, int *result) +{ + const FcConstant *c; + + if ((c = FcNameGetConstant(string))) + { + *result = c->value; + return FcTrue; + } + return FcFalse; +} + +FcBool +FcNameBool (FcChar8 *v, FcBool *result) +{ + char c0, c1; + + c0 = *v; + if (isupper (c0)) + c0 = tolower (c0); + if (c0 == 't' || c0 == 'y' || c0 == '1') + { + *result = FcTrue; + return FcTrue; + } + if (c0 == 'f' || c0 == 'n' || c0 == '0') + { + *result = FcFalse; + return FcTrue; + } + if (c0 == 'o') + { + c1 = v[1]; + if (isupper (c1)) + c1 = tolower (c1); + if (c1 == 'n') + { + *result = FcTrue; + return FcTrue; + } + if (c1 == 'f') + { + *result = FcFalse; + return FcTrue; + } + } + return FcFalse; +} + +static FcValue +FcNameConvert (FcType type, FcChar8 *string, FcMatrix *m) +{ + FcValue v; + + v.type = type; + switch (v.type) { + case FcTypeInteger: + if (!FcNameConstant (string, &v.u.i)) + v.u.i = atoi ((char *) string); + break; + case FcTypeString: + v.u.s = string; + break; + case FcTypeBool: + if (!FcNameBool (string, &v.u.b)) + v.u.b = FcFalse; + break; + case FcTypeDouble: + v.u.d = strtod ((char *) string, 0); + break; + case FcTypeMatrix: + v.u.m = m; + sscanf ((char *) string, "%lg %lg %lg %lg", &m->xx, &m->xy, &m->yx, &m->yy); + break; + case FcTypeCharSet: + v.u.c = FcNameParseCharSet (string); + break; + case FcTypeLangSet: + v.u.l = FcNameParseLangSet (string); + break; + default: + break; + } + return v; +} + +static const FcChar8 * +FcNameFindNext (const FcChar8 *cur, const char *delim, FcChar8 *save, FcChar8 *last) +{ + FcChar8 c; + + while ((c = *cur)) + { + if (c == '\\') + { + ++cur; + if (!(c = *cur)) + break; + } + else if (strchr (delim, c)) + break; + ++cur; + *save++ = c; + } + *save = 0; + *last = *cur; + if (*cur) + cur++; + return cur; +} + +FcPattern * +FcNameParse (const FcChar8 *name) +{ + FcChar8 *save; + FcPattern *pat; + double d; + FcChar8 *e; + FcChar8 delim; + FcValue v; + FcMatrix m; + const FcObjectType *t; + const FcConstant *c; + + /* freed below */ + save = malloc (strlen ((char *) name) + 1); + if (!save) + goto bail0; + pat = FcPatternCreate (); + if (!pat) + goto bail1; + + for (;;) + { + name = FcNameFindNext (name, "-,:", save, &delim); + if (save[0]) + { + if (!FcPatternAddString (pat, FC_FAMILY, save)) + goto bail2; + } + if (delim != ',') + break; + } + if (delim == '-') + { + for (;;) + { + name = FcNameFindNext (name, "-,:", save, &delim); + d = strtod ((char *) save, (char **) &e); + if (e != save) + { + if (!FcPatternAddDouble (pat, FC_SIZE, d)) + goto bail2; + } + if (delim != ',') + break; + } + } + while (delim == ':') + { + name = FcNameFindNext (name, "=_:", save, &delim); + if (save[0]) + { + if (delim == '=' || delim == '_') + { + t = FcNameGetObjectType ((char *) save); + for (;;) + { + name = FcNameFindNext (name, ":,", save, &delim); + if (t) + { + v = FcNameConvert (t->type, save, &m); + if (!FcPatternAdd (pat, t->object, v, FcTrue)) + { + switch (v.type) { + case FcTypeCharSet: + FcCharSetDestroy ((FcCharSet *) v.u.c); + break; + case FcTypeLangSet: + FcLangSetDestroy ((FcLangSet *) v.u.l); + break; + default: + break; + } + goto bail2; + } + switch (v.type) { + case FcTypeCharSet: + FcCharSetDestroy ((FcCharSet *) v.u.c); + break; + case FcTypeLangSet: + FcLangSetDestroy ((FcLangSet *) v.u.l); + break; + default: + break; + } + } + if (delim != ',') + break; + } + } + else + { + if ((c = FcNameGetConstant (save))) + { + if (!FcPatternAddInteger (pat, c->object, c->value)) + goto bail2; + } + } + } + } + + free (save); + return pat; + +bail2: + FcPatternDestroy (pat); +bail1: + free (save); +bail0: + return 0; +} +static FcBool +FcNameUnparseString (FcStrBuf *buf, + const FcChar8 *string, + const FcChar8 *escape) +{ + FcChar8 c; + while ((c = *string++)) + { + if (escape && strchr ((char *) escape, (char) c)) + { + if (!FcStrBufChar (buf, escape[0])) + return FcFalse; + } + if (!FcStrBufChar (buf, c)) + return FcFalse; + } + return FcTrue; +} + +static FcBool +FcNameUnparseValue (FcStrBuf *buf, + FcValue v, + FcChar8 *escape) +{ + FcChar8 temp[1024]; + + switch (v.type) { + case FcTypeVoid: + return FcTrue; + case FcTypeInteger: + sprintf ((char *) temp, "%d", v.u.i); + return FcNameUnparseString (buf, temp, 0); + case FcTypeDouble: + sprintf ((char *) temp, "%g", v.u.d); + return FcNameUnparseString (buf, temp, 0); + case FcTypeString: + return FcNameUnparseString (buf, v.u.s, escape); + case FcTypeBool: + return FcNameUnparseString (buf, v.u.b ? (FcChar8 *) "True" : (FcChar8 *) "False", 0); + case FcTypeMatrix: + sprintf ((char *) temp, "%g %g %g %g", + v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy); + return FcNameUnparseString (buf, temp, 0); + case FcTypeCharSet: + return FcNameUnparseCharSet (buf, v.u.c); + case FcTypeLangSet: + return FcNameUnparseLangSet (buf, v.u.l); + case FcTypeFTFace: + return FcTrue; + } + return FcFalse; +} + +static FcBool +FcNameUnparseValueList (FcStrBuf *buf, + FcValueList *v, + FcChar8 *escape) +{ + while (v) + { + if (!FcNameUnparseValue (buf, v->value, escape)) + return FcFalse; + if ((v = v->next)) + if (!FcNameUnparseString (buf, (FcChar8 *) ",", 0)) + return FcFalse; + } + return FcTrue; +} + +#define FC_ESCAPE_FIXED "\\-:," +#define FC_ESCAPE_VARIABLE "\\=_:," + +FcChar8 * +FcNameUnparse (FcPattern *pat) +{ + FcStrBuf buf; + FcChar8 buf_static[8192]; + int i; + FcPatternElt *e; + const FcObjectTypeList *l; + const FcObjectType *o; + + FcStrBufInit (&buf, buf_static, sizeof (buf_static)); + e = FcPatternFindElt (pat, FC_FAMILY); + if (e) + { + if (!FcNameUnparseValueList (&buf, e->values, (FcChar8 *) FC_ESCAPE_FIXED)) + goto bail0; + } + e = FcPatternFindElt (pat, FC_SIZE); + if (e) + { + if (!FcNameUnparseString (&buf, (FcChar8 *) "-", 0)) + goto bail0; + if (!FcNameUnparseValueList (&buf, e->values, (FcChar8 *) FC_ESCAPE_FIXED)) + goto bail0; + } + for (l = _FcObjectTypes; l; l = l->next) + { + for (i = 0; i < l->ntypes; i++) + { + o = &l->types[i]; + if (!strcmp (o->object, FC_FAMILY) || + !strcmp (o->object, FC_SIZE) || + !strcmp (o->object, FC_FILE)) + continue; + + e = FcPatternFindElt (pat, o->object); + if (e) + { + if (!FcNameUnparseString (&buf, (FcChar8 *) ":", 0)) + goto bail0; + if (!FcNameUnparseString (&buf, (FcChar8 *) o->object, (FcChar8 *) FC_ESCAPE_VARIABLE)) + goto bail0; + if (!FcNameUnparseString (&buf, (FcChar8 *) "=", 0)) + goto bail0; + if (!FcNameUnparseValueList (&buf, e->values, + (FcChar8 *) FC_ESCAPE_VARIABLE)) + goto bail0; + } + } + } + return FcStrBufDone (&buf); +bail0: + FcStrBufDestroy (&buf); + return 0; +} Index: xc/lib/fontconfig/src/fcpat.c diff -u /dev/null xc/lib/fontconfig/src/fcpat.c:1.20 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcpat.c Fri Oct 11 13:53:03 2002 @@ -0,0 +1,1065 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcpat.c,v 1.20 2002/10/11 17:53:03 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 <stdlib.h> +#include <string.h> +#include <assert.h> +#include "fcint.h" + +FcPattern * +FcPatternCreate (void) +{ + FcPattern *p; + + p = (FcPattern *) malloc (sizeof (FcPattern)); + if (!p) + return 0; + FcMemAlloc (FC_MEM_PATTERN, sizeof (FcPattern)); + p->num = 0; + p->size = 0; + p->elts = 0; + p->ref = 1; + return p; +} + +void +FcValueDestroy (FcValue v) +{ + switch (v.type) { + case FcTypeString: + FcStrFree ((FcChar8 *) v.u.s); + break; + case FcTypeMatrix: + FcMatrixFree ((FcMatrix *) v.u.m); + break; + case FcTypeCharSet: + FcCharSetDestroy ((FcCharSet *) v.u.c); + break; + case FcTypeLangSet: + FcLangSetDestroy ((FcLangSet *) v.u.l); + break; + default: + break; + } +} + +FcValue +FcValueSave (FcValue v) +{ + switch (v.type) { + case FcTypeString: + v.u.s = FcStrCopy (v.u.s); + if (!v.u.s) + v.type = FcTypeVoid; + break; + case FcTypeMatrix: + v.u.m = FcMatrixCopy (v.u.m); + if (!v.u.m) + v.type = FcTypeVoid; + break; + case FcTypeCharSet: + v.u.c = FcCharSetCopy ((FcCharSet *) v.u.c); + if (!v.u.c) + v.type = FcTypeVoid; + break; + case FcTypeLangSet: + v.u.l = FcLangSetCopy (v.u.l); + if (!v.u.l) + v.type = FcTypeVoid; + break; + default: + break; + } + return v; +} + +void +FcValueListDestroy (FcValueList *l) +{ + FcValueList *next; + for (; l; l = next) + { + switch (l->value.type) { + case FcTypeString: + FcStrFree ((FcChar8 *) l->value.u.s); + break; + case FcTypeMatrix: + FcMatrixFree ((FcMatrix *) l->value.u.m); + break; + case FcTypeCharSet: + FcCharSetDestroy ((FcCharSet *) l->value.u.c); + break; + case FcTypeLangSet: + FcLangSetDestroy ((FcLangSet *) l->value.u.l); + break; + default: + break; + } + next = l->next; + FcMemFree (FC_MEM_VALLIST, sizeof (FcValueList)); + free (l); + } +} + +FcBool +FcValueEqual (FcValue va, FcValue vb) +{ + if (va.type != vb.type) + { + if (va.type == FcTypeInteger) + { + va.type = FcTypeDouble; + va.u.d = va.u.i; + } + if (vb.type == FcTypeInteger) + { + vb.type = FcTypeDouble; + vb.u.d = vb.u.i; + } + if (va.type != vb.type) + return FcFalse; + } + switch (va.type) { + case FcTypeVoid: + return FcTrue; + case FcTypeInteger: + return va.u.i == vb.u.i; + case FcTypeDouble: + return va.u.d == vb.u.d; + case FcTypeString: + return FcStrCmpIgnoreCase (va.u.s, vb.u.s) == 0; + case FcTypeBool: + return va.u.b == vb.u.b; + case FcTypeMatrix: + return FcMatrixEqual (va.u.m, vb.u.m); + case FcTypeCharSet: + return FcCharSetEqual (va.u.c, vb.u.c); + case FcTypeFTFace: + return va.u.f == vb.u.f; + case FcTypeLangSet: + return FcLangSetEqual (va.u.l, vb.u.l); + } + return FcFalse; +} + +static FcChar32 +FcDoubleHash (double d) +{ + if (d < 0) + d = -d; + if (d > 0xffffffff) + d = 0xffffffff; + return (FcChar32) d; +} + +static FcChar32 +FcStringHash (const FcChar8 *s) +{ + FcChar8 c; + FcChar32 h = 0; + + if (s) + while ((c = *s++)) + h = ((h << 1) | (h >> 31)) ^ c; + return h; +} + +static FcChar32 +FcValueHash (FcValue v) +{ + switch (v.type) { + case FcTypeVoid: + return 0; + case FcTypeInteger: + return (FcChar32) v.u.i; + case FcTypeDouble: + return FcDoubleHash (v.u.d); + case FcTypeString: + return FcStringHash (v.u.s); + case FcTypeBool: + return (FcChar32) v.u.b; + case FcTypeMatrix: + return (FcDoubleHash (v.u.m->xx) ^ + FcDoubleHash (v.u.m->xy) ^ + FcDoubleHash (v.u.m->yx) ^ + FcDoubleHash (v.u.m->yy)); + case FcTypeCharSet: + return (FcChar32) v.u.c->num; + case FcTypeFTFace: + return FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->family_name) ^ + FcStringHash ((const FcChar8 *) ((FT_Face) v.u.f)->style_name); + case FcTypeLangSet: + return FcLangSetHash (v.u.l); + } + return FcFalse; +} + +static FcBool +FcValueListEqual (FcValueList *la, FcValueList *lb) +{ + if (la == lb) + return FcTrue; + + while (la && lb) + { + if (!FcValueEqual (la->value, lb->value)) + return FcFalse; + la = la->next; + lb = lb->next; + } + if (la || lb) + return FcFalse; + return FcTrue; +} + +static FcChar32 +FcValueListHash (FcValueList *l) +{ + FcChar32 hash = 0; + + while (l) + { + hash = ((hash << 1) | (hash >> 31)) ^ FcValueHash (l->value); + l = l->next; + } + return hash; +} + +void +FcPatternDestroy (FcPattern *p) +{ + int i; + + if (p->ref == FC_REF_CONSTANT || --p->ref > 0) + return; + + for (i = 0; i < p->num; i++) + FcValueListDestroy (p->elts[i].values); + + p->num = 0; + if (p->elts) + { + FcMemFree (FC_MEM_PATELT, p->size * sizeof (FcPatternElt)); + free (p->elts); + p->elts = 0; + } + p->size = 0; + FcMemFree (FC_MEM_PATTERN, sizeof (FcPattern)); + free (p); +} + +#define FC_VALUE_LIST_HASH_SIZE 257 +#define FC_PATTERN_HASH_SIZE 67 + +typedef struct _FcValueListEnt FcValueListEnt; + +struct _FcValueListEnt { + FcValueListEnt *next; + FcValueList *list; + FcChar32 hash, pad; +}; + +typedef union _FcValueListAlign { + FcValueListEnt ent; + FcValueList list; +} FcValueListAlign; + +static int FcValueListFrozenCount[FcTypeLangSet + 1]; +static int FcValueListFrozenBytes[FcTypeLangSet + 1]; +static char *FcValueListFrozenName[] = { + "Void", + "Integer", + "Double", + "String", + "Bool", + "Matrix", + "CharSet", + "FTFace", + "LangSet" +}; + +void +FcValueListReport (void); + +void +FcValueListReport (void) +{ + FcType t; + + printf ("Fc Frozen Values:\n"); + printf ("\t%8s %9s %9s\n", "Type", "Count", "Bytes"); + for (t = FcTypeVoid; t <= FcTypeLangSet; t++) + printf ("\t%8s %9d %9d\n", FcValueListFrozenName[t], + FcValueListFrozenCount[t], FcValueListFrozenBytes[t]); +} + +static FcValueListEnt * +FcValueListEntCreate (FcValueList *h) +{ + FcValueListAlign *ea; + FcValueListEnt *e; + FcValueList *l, *new; + int n; + int string_size = 0; + FcChar8 *strs; + int size; + + n = 0; + for (l = h; l; l = l->next) + { + if (l->value.type == FcTypeString) + string_size += strlen ((char *) l->value.u.s) + 1; + n++; + } + size = sizeof (FcValueListAlign) + n * sizeof (FcValueList) + string_size; + FcValueListFrozenCount[h->value.type]++; + FcValueListFrozenBytes[h->value.type] += size; + ea = malloc (size); + if (!ea) + return 0; + FcMemAlloc (FC_MEM_VALLIST, size); + e = &ea->ent; + e->list = (FcValueList *) (ea + 1); + strs = (FcChar8 *) (e->list + n); + new = e->list; + for (l = h; l; l = l->next, new++) + { + if (l->value.type == FcTypeString) + { + new->value.type = FcTypeString; + new->value.u.s = strs; + strcpy ((char *) strs, (char *) l->value.u.s); + strs += strlen ((char *) strs) + 1; + } + else + { + new->value = l->value; + new->value = FcValueSave (new->value); + } + new->binding = l->binding; + if (l->next) + new->next = new + 1; + else + new->next = 0; + } + return e; +} + +static int FcValueListTotal; +static int FcValueListUsed; + +static FcValueList * +FcValueListFreeze (FcValueList *l) +{ + static FcValueListEnt *hashTable[FC_VALUE_LIST_HASH_SIZE]; + FcChar32 hash = FcValueListHash (l); + FcValueListEnt **bucket = &hashTable[hash % FC_VALUE_LIST_HASH_SIZE]; + FcValueListEnt *ent; + + FcValueListTotal++; + for (ent = *bucket; ent; ent = ent->next) + { + if (ent->hash == hash && FcValueListEqual (ent->list, l)) + return ent->list; + } + + ent = FcValueListEntCreate (l); + if (!ent) + return 0; + + FcValueListUsed++; + ent->hash = hash; + ent->next = *bucket; + *bucket = ent; + return ent->list; +} + +static FcChar32 +FcPatternBaseHash (FcPattern *b) +{ + FcChar32 hash = b->num; + int i; + + for (i = 0; i < b->num; i++) + hash = ((hash << 1) | (hash >> 31)) ^ ((long) b->elts[i].values); + return hash; +} + +typedef struct _FcPatternEnt FcPatternEnt; + +struct _FcPatternEnt { + FcPatternEnt *next; + FcChar32 hash; + FcPattern pattern; +}; + +static int FcPatternTotal; +static int FcPatternUsed; + +static FcPattern * +FcPatternBaseFreeze (FcPattern *b) +{ + static FcPatternEnt *hashTable[FC_VALUE_LIST_HASH_SIZE]; + FcChar32 hash = FcPatternBaseHash (b); + FcPatternEnt **bucket = &hashTable[hash % FC_VALUE_LIST_HASH_SIZE]; + FcPatternEnt *ent; + int i; + char *objects; + int size_objects; + int size; + + FcPatternTotal++; + for (ent = *bucket; ent; ent = ent->next) + { + if (ent->hash == hash && b->num == ent->pattern.num) + { + for (i = 0; i < b->num; i++) + { + if (strcmp (b->elts[i].object, ent->pattern.elts[i].object)) + break; + if (b->elts[i].values != ent->pattern.elts[i].values) + break; + } + if (i == b->num) + return &ent->pattern; + } + } + + /* + * Compute size of pattern + elts + object names + */ + size_objects = 0; + for (i = 0; i < b->num; i++) + size_objects += strlen (b->elts[i].object) + 1; + + size = sizeof (FcPatternEnt) + b->num*sizeof (FcPatternElt) + size_objects; + ent = malloc (size); + if (!ent) + return 0; + + FcMemAlloc (FC_MEM_PATTERN, size); + FcPatternUsed++; + + ent->pattern.elts = (FcPatternElt *) (ent + 1); + ent->pattern.num = b->num; + ent->pattern.size = b->num; + ent->pattern.ref = FC_REF_CONSTANT; + + objects = (char *) (ent->pattern.elts + b->num); + for (i = 0; i < b->num; i++) + { + ent->pattern.elts[i].values = b->elts[i].values; + strcpy (objects, b->elts[i].object); + ent->pattern.elts[i].object = objects; + objects += strlen (objects) + 1; + } + + ent->hash = hash; + ent->next = *bucket; + *bucket = ent; + return &ent->pattern; +} + +FcPattern * +FcPatternFreeze (FcPattern *p) +{ + FcPattern *b, *n = 0; + int size; + int i; + + size = sizeof (FcPattern) + p->num * sizeof (FcPatternElt); + b = (FcPattern *) malloc (size); + if (!b) + return 0; + FcMemAlloc (FC_MEM_PATTERN, size); + b->num = p->num; + b->size = b->num; + b->ref = 1; + b->elts = (FcPatternElt *) (b + 1); + /* + * Freeze object lists + */ + for (i = 0; i < p->num; i++) + { + b->elts[i].object = p->elts[i].object; + b->elts[i].values = FcValueListFreeze (p->elts[i].values); + if (!b->elts[i].values) + goto bail; + } + /* + * Freeze base + */ + n = FcPatternBaseFreeze (b); +#ifdef CHATTY + if (FcDebug() & FC_DBG_MEMORY) + { + printf ("ValueLists: total %9d used %9d\n", FcValueListTotal, FcValueListUsed); + printf ("Patterns: total %9d used %9d\n", FcPatternTotal, FcPatternUsed); + } +#endif +bail: + free (b); +#ifdef DEBUG + assert (FcPatternEqual (n, p)); +#endif + return n; +} + +static int +FcPatternPosition (const FcPattern *p, const char *object) +{ + int low, high, mid, c; + + low = 0; + high = p->num - 1; + c = 1; + mid = 0; + while (low <= high) + { + mid = (low + high) >> 1; + c = strcmp (p->elts[mid].object, object); + if (c == 0) + return mid; + if (c < 0) + low = mid + 1; + else + high = mid - 1; + } + if (c < 0) + mid++; + return -(mid + 1); +} + +FcPatternElt * +FcPatternFindElt (const FcPattern *p, const char *object) +{ + int i = FcPatternPosition (p, object); + if (i < 0) + return 0; + return &p->elts[i]; +} + +FcPatternElt * +FcPatternInsertElt (FcPattern *p, const char *object) +{ + int i; + FcPatternElt *e; + + i = FcPatternPosition (p, object); + if (i < 0) + { + i = -i - 1; + + /* grow array */ + if (p->num + 1 >= p->size) + { + int s = p->size + 16; + if (p->elts) + e = (FcPatternElt *) realloc (p->elts, s * sizeof (FcPatternElt)); + else + e = (FcPatternElt *) malloc (s * sizeof (FcPatternElt)); + if (!e) + return FcFalse; + p->elts = e; + if (p->size) + FcMemFree (FC_MEM_PATELT, p->size * sizeof (FcPatternElt)); + FcMemAlloc (FC_MEM_PATELT, s * sizeof (FcPatternElt)); + while (p->size < s) + { + p->elts[p->size].object = 0; + p->elts[p->size].values = 0; + p->size++; + } + } + + /* move elts up */ + memmove (p->elts + i + 1, + p->elts + i, + sizeof (FcPatternElt) * + (p->num - i)); + + /* bump count */ + p->num++; + + p->elts[i].object = object; + p->elts[i].values = 0; + } + + return &p->elts[i]; +} + +FcBool +FcPatternEqual (const FcPattern *pa, const FcPattern *pb) +{ + int i; + + if (pa == pb) + return FcTrue; + + if (pa->num != pb->num) + return FcFalse; + for (i = 0; i < pa->num; i++) + { + if (strcmp (pa->elts[i].object, pb->elts[i].object) != 0) + return FcFalse; + if (!FcValueListEqual (pa->elts[i].values, pb->elts[i].values)) + return FcFalse; + } + return FcTrue; +} + +FcChar32 +FcPatternHash (const FcPattern *p) +{ + int i; + FcChar32 h = 0; + + for (i = 0; i < p->num; i++) + { + h = (((h << 1) | (h >> 31)) ^ + FcStringHash ((const FcChar8 *) p->elts[i].object) ^ + FcValueListHash (p->elts[i].values)); + } + return h; +} + +FcBool +FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os) +{ + FcPatternElt *ea, *eb; + int i; + + for (i = 0; i < os->nobject; i++) + { + ea = FcPatternFindElt (pa, os->objects[i]); + eb = FcPatternFindElt (pb, os->objects[i]); + if (ea) + { + if (!eb) + return FcFalse; + if (!FcValueListEqual (ea->values, eb->values)) + return FcFalse; + } + else + { + if (eb) + return FcFalse; + } + } + return FcTrue; +} + +FcBool +FcPatternAddWithBinding (FcPattern *p, + const char *object, + FcValue value, + FcValueBinding binding, + FcBool append) +{ + FcPatternElt *e; + FcValueList *new, **prev; + + if (p->ref == FC_REF_CONSTANT) + goto bail0; + + new = (FcValueList *) malloc (sizeof (FcValueList)); + if (!new) + goto bail0; + + FcMemAlloc (FC_MEM_VALLIST, sizeof (FcValueList)); + /* dup string */ + value = FcValueSave (value); + if (value.type == FcTypeVoid) + goto bail1; + + new->value = value; + new->binding = binding; + new->next = 0; + + e = FcPatternInsertElt (p, object); + if (!e) + goto bail2; + + if (append) + { + for (prev = &e->values; *prev; prev = &(*prev)->next); + *prev = new; + } + else + { + new->next = e->values; + e->values = new; + } + + return FcTrue; + +bail2: + switch (value.type) { + case FcTypeString: + FcStrFree ((FcChar8 *) value.u.s); + break; + case FcTypeMatrix: + FcMatrixFree ((FcMatrix *) value.u.m); + break; + case FcTypeCharSet: + FcCharSetDestroy ((FcCharSet *) value.u.c); + break; + case FcTypeLangSet: + FcLangSetDestroy ((FcLangSet *) value.u.l); + break; + default: + break; + } +bail1: + FcMemFree (FC_MEM_VALLIST, sizeof (FcValueList)); + free (new); +bail0: + return FcFalse; +} + +FcBool +FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append) +{ + return FcPatternAddWithBinding (p, object, value, FcValueBindingStrong, append); +} + +FcBool +FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append) +{ + return FcPatternAddWithBinding (p, object, value, FcValueBindingWeak, append); +} + +FcBool +FcPatternDel (FcPattern *p, const char *object) +{ + FcPatternElt *e; + int i; + + e = FcPatternFindElt (p, object); + if (!e) + return FcFalse; + + i = e - p->elts; + + /* destroy value */ + FcValueListDestroy (e->values); + + /* shuffle existing ones down */ + memmove (e, e+1, (p->elts + p->num - (e + 1)) * sizeof (FcPatternElt)); + p->num--; + p->elts[p->num].object = 0; + p->elts[p->num].values = 0; + return FcTrue; +} + +FcBool +FcPatternAddInteger (FcPattern *p, const char *object, int i) +{ + FcValue v; + + v.type = FcTypeInteger; + v.u.i = i; + return FcPatternAdd (p, object, v, FcTrue); +} + +FcBool +FcPatternAddDouble (FcPattern *p, const char *object, double d) +{ + FcValue v; + + v.type = FcTypeDouble; + v.u.d = d; + return FcPatternAdd (p, object, v, FcTrue); +} + + +FcBool +FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s) +{ + FcValue v; + + v.type = FcTypeString; + v.u.s = s; + return FcPatternAdd (p, object, v, FcTrue); +} + +FcBool +FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s) +{ + FcValue v; + + v.type = FcTypeMatrix; + v.u.m = (FcMatrix *) s; + return FcPatternAdd (p, object, v, FcTrue); +} + + +FcBool +FcPatternAddBool (FcPattern *p, const char *object, FcBool b) +{ + FcValue v; + + v.type = FcTypeBool; + v.u.b = b; + return FcPatternAdd (p, object, v, FcTrue); +} + +FcBool +FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c) +{ + FcValue v; + + v.type = FcTypeCharSet; + v.u.c = (FcCharSet *) c; + return FcPatternAdd (p, object, v, FcTrue); +} + +FcBool +FcPatternAddFTFace (FcPattern *p, const char *object, const FT_Face f) +{ + FcValue v; + + v.type = FcTypeFTFace; + v.u.f = (void *) f; + return FcPatternAdd (p, object, v, FcTrue); +} + +FcBool +FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls) +{ + FcValue v; + + v.type = FcTypeLangSet; + v.u.l = (FcLangSet *) ls; + return FcPatternAdd (p, object, v, FcTrue); +} + +FcResult +FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v) +{ + FcPatternElt *e; + FcValueList *l; + + e = FcPatternFindElt (p, object); + if (!e) + return FcResultNoMatch; + for (l = e->values; l; l = l->next) + { + if (!id) + { + *v = l->value; + return FcResultMatch; + } + id--; + } + return FcResultNoId; +} + +FcResult +FcPatternGetInteger (const FcPattern *p, const char *object, int id, int *i) +{ + FcValue v; + FcResult r; + + r = FcPatternGet (p, object, id, &v); + if (r != FcResultMatch) + return r; + switch (v.type) { + case FcTypeDouble: + *i = (int) v.u.d; + break; + case FcTypeInteger: + *i = v.u.i; + break; + default: + return FcResultTypeMismatch; + } + return FcResultMatch; +} + +FcResult +FcPatternGetDouble (const FcPattern *p, const char *object, int id, double *d) +{ + FcValue v; + FcResult r; + + r = FcPatternGet (p, object, id, &v); + if (r != FcResultMatch) + return r; + switch (v.type) { + case FcTypeDouble: + *d = v.u.d; + break; + case FcTypeInteger: + *d = (double) v.u.i; + break; + default: + return FcResultTypeMismatch; + } + return FcResultMatch; +} + +FcResult +FcPatternGetString (const FcPattern *p, const char *object, int id, FcChar8 ** s) +{ + FcValue v; + FcResult r; + + r = FcPatternGet (p, object, id, &v); + if (r != FcResultMatch) + return r; + if (v.type != FcTypeString) + return FcResultTypeMismatch; + *s = (FcChar8 *) v.u.s; + return FcResultMatch; +} + +FcResult +FcPatternGetMatrix(const FcPattern *p, const char *object, int id, FcMatrix **m) +{ + FcValue v; + FcResult r; + + r = FcPatternGet (p, object, id, &v); + if (r != FcResultMatch) + return r; + if (v.type != FcTypeMatrix) + return FcResultTypeMismatch; + *m = (FcMatrix *) v.u.m; + return FcResultMatch; +} + + +FcResult +FcPatternGetBool(const FcPattern *p, const char *object, int id, FcBool *b) +{ + FcValue v; + FcResult r; + + r = FcPatternGet (p, object, id, &v); + if (r != FcResultMatch) + return r; + if (v.type != FcTypeBool) + return FcResultTypeMismatch; + *b = v.u.b; + return FcResultMatch; +} + +FcResult +FcPatternGetCharSet(const FcPattern *p, const char *object, int id, FcCharSet **c) +{ + FcValue v; + FcResult r; + + r = FcPatternGet (p, object, id, &v); + if (r != FcResultMatch) + return r; + if (v.type != FcTypeCharSet) + return FcResultTypeMismatch; + *c = (FcCharSet *) v.u.c; + return FcResultMatch; +} + +FcResult +FcPatternGetFTFace(const FcPattern *p, const char *object, int id, FT_Face *f) +{ + FcValue v; + FcResult r; + + r = FcPatternGet (p, object, id, &v); + if (r != FcResultMatch) + return r; + if (v.type != FcTypeFTFace) + return FcResultTypeMismatch; + *f = (FT_Face) v.u.f; + return FcResultMatch; +} + +FcResult +FcPatternGetLangSet(const FcPattern *p, const char *object, int id, FcLangSet **ls) +{ + FcValue v; + FcResult r; + + r = FcPatternGet (p, object, id, &v); + if (r != FcResultMatch) + return r; + if (v.type != FcTypeLangSet) + return FcResultTypeMismatch; + *ls = (FcLangSet *) v.u.l; + return FcResultMatch; +} + +FcPattern * +FcPatternDuplicate (const FcPattern *orig) +{ + FcPattern *new; + int i; + FcValueList *l; + + new = FcPatternCreate (); + if (!new) + goto bail0; + + for (i = 0; i < orig->num; i++) + { + for (l = orig->elts[i].values; l; l = l->next) + if (!FcPatternAdd (new, orig->elts[i].object, l->value, FcTrue)) + goto bail1; + } + + return new; + +bail1: + FcPatternDestroy (new); +bail0: + return 0; +} + +void +FcPatternReference (FcPattern *p) +{ + if (p->ref != FC_REF_CONSTANT) + p->ref++; +} + +FcPattern * +FcPatternVaBuild (FcPattern *orig, va_list va) +{ + FcPattern *ret; + + FcPatternVapBuild (ret, orig, va); + return ret; +} + +FcPattern * +FcPatternBuild (FcPattern *orig, ...) +{ + va_list va; + + va_start (va, orig); + FcPatternVapBuild (orig, orig, va); + va_end (va); + return orig; +} Index: xc/lib/fontconfig/src/fcstr.c diff -u /dev/null xc/lib/fontconfig/src/fcstr.c:1.11 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcstr.c Fri Dec 13 20:59:38 2002 @@ -0,0 +1,641 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcstr.c,v 1.11 2002/12/14 01:59:38 dawes 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 <stdlib.h> +#include <ctype.h> +#include <string.h> +#include "fcint.h" + +FcChar8 * +FcStrCopy (const FcChar8 *s) +{ + FcChar8 *r; + + if (!s) + return 0; + r = (FcChar8 *) malloc (strlen ((char *) s) + 1); + if (!r) + return 0; + FcMemAlloc (FC_MEM_STRING, strlen ((char *) s) + 1); + strcpy ((char *) r, (char *) s); + return r; +} + +FcChar8 * +FcStrPlus (const FcChar8 *s1, const FcChar8 *s2) +{ + int l = strlen ((char *)s1) + strlen ((char *) s2) + 1; + FcChar8 *s = malloc (l); + + if (!s) + return 0; + FcMemAlloc (FC_MEM_STRING, l); + strcpy ((char *) s, (char *) s1); + strcat ((char *) s, (char *) s2); + return s; +} + +void +FcStrFree (FcChar8 *s) +{ + FcMemFree (FC_MEM_STRING, strlen ((char *) s) + 1); + free (s); +} + +int +FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2) +{ + FcChar8 c1, c2; + + for (;;) + { + c1 = *s1++; + c2 = *s2++; + if (!c1 || !c2) + break; + c1 = FcToLower (c1); + c2 = FcToLower (c2); + if (c1 != c2) + break; + } + return (int) c1 - (int) c2; +} + +int +FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2) +{ + FcChar8 c1, c2; + + for (;;) + { + do + c1 = *s1++; + while (c1 == ' '); + do + c2 = *s2++; + while (c2 == ' '); + if (!c1 || !c2) + break; + c1 = FcToLower (c1); + c2 = FcToLower (c2); + if (c1 != c2) + break; + } + return (int) c1 - (int) c2; +} + +int +FcStrCmp (const FcChar8 *s1, const FcChar8 *s2) +{ + FcChar8 c1, c2; + + if (s1 == s2) + return 0; + for (;;) + { + c1 = *s1++; + c2 = *s2++; + if (!c1 || !c2) + break; + if (c1 != c2) + break; + } + return (int) c1 - (int) c2; +} + +int +FcUtf8ToUcs4 (const FcChar8 *src_orig, + FcChar32 *dst, + int len) +{ + const FcChar8 *src = src_orig; + FcChar8 s; + int extra; + FcChar32 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; +} + +FcBool +FcUtf8Len (const FcChar8 *string, + int len, + int *nchar, + int *wchar) +{ + int n; + int clen; + FcChar32 c; + FcChar32 max; + + n = 0; + max = 0; + while (len) + { + clen = FcUtf8ToUcs4 (string, &c, len); + if (clen <= 0) /* malformed UTF8 string */ + return FcFalse; + if (c > max) + max = c; + string += clen; + len -= clen; + n++; + } + *nchar = n; + if (max >= 0x10000) + *wchar = 4; + else if (max > 0x100) + *wchar = 2; + else + *wchar = 1; + return FcTrue; +} + +int +FcUcs4ToUtf8 (FcChar32 ucs4, + FcChar8 dest[FC_UTF8_MAX_LEN]) +{ + int bits; + FcChar8 *d = dest; + + if (ucs4 < 0x80) { *d++= ucs4; bits= -6; } + else if (ucs4 < 0x800) { *d++= ((ucs4 >> 6) & 0x1F) | 0xC0; bits= 0; } + else if (ucs4 < 0x10000) { *d++= ((ucs4 >> 12) & 0x0F) | 0xE0; bits= 6; } + else if (ucs4 < 0x200000) { *d++= ((ucs4 >> 18) & 0x07) | 0xF0; bits= 12; } + else if (ucs4 < 0x4000000) { *d++= ((ucs4 >> 24) & 0x03) | 0xF8; bits= 18; } + else if (ucs4 < 0x80000000) { *d++= ((ucs4 >> 30) & 0x01) | 0xFC; bits= 24; } + else return 0; + + for ( ; bits >= 0; bits-= 6) { + *d++= ((ucs4 >> bits) & 0x3F) | 0x80; + } + return d - dest; +} + +#define GetUtf16(src,endian) \ + ((FcChar16) ((src)[endian == FcEndianBig ? 0 : 1] << 8) | \ + (FcChar16) ((src)[endian == FcEndianBig ? 1 : 0])) + +int +FcUtf16ToUcs4 (const FcChar8 *src_orig, + FcEndian endian, + FcChar32 *dst, + int len) /* in bytes */ +{ + const FcChar8 *src = src_orig; + FcChar16 a, b; + FcChar32 result; + + if (len < 2) + return 0; + + a = GetUtf16 (src, endian); src += 2; len -= 2; + + /* + * Check for surrogate + */ + if ((a & 0xfc00) == 0xd800) + { + if (len < 2) + return 0; + b = GetUtf16 (src, endian); src += 2; len -= 2; + /* + * Check for invalid surrogate sequence + */ + if ((b & 0xfc00) != 0xdc00) + return 0; + result = ((((FcChar32) a & 0x3ff) << 10) | + ((FcChar32) b & 0x3ff)) + 0x10000; + } + else + result = a; + *dst = result; + return src - src_orig; +} + +FcBool +FcUtf16Len (const FcChar8 *string, + FcEndian endian, + int len, /* in bytes */ + int *nchar, + int *wchar) +{ + int n; + int clen; + FcChar32 c; + FcChar32 max; + + n = 0; + max = 0; + while (len) + { + clen = FcUtf16ToUcs4 (string, endian, &c, len); + if (clen <= 0) /* malformed UTF8 string */ + return FcFalse; + if (c > max) + max = c; + string += clen; + len -= clen; + n++; + } + *nchar = n; + if (max >= 0x10000) + *wchar = 4; + else if (max > 0x100) + *wchar = 2; + else + *wchar = 1; + return FcTrue; +} + +void +FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size) +{ + buf->buf = init; + buf->allocated = FcFalse; + buf->failed = FcFalse; + buf->len = 0; + buf->size = size; +} + +void +FcStrBufDestroy (FcStrBuf *buf) +{ + if (buf->allocated) + { + FcMemFree (FC_MEM_STRBUF, buf->size); + free (buf->buf); + FcStrBufInit (buf, 0, 0); + } +} + +FcChar8 * +FcStrBufDone (FcStrBuf *buf) +{ + FcChar8 *ret; + + ret = malloc (buf->len + 1); + if (ret) + { + FcMemAlloc (FC_MEM_STRING, buf->len + 1); + memcpy (ret, buf->buf, buf->len); + ret[buf->len] = '\0'; + } + FcStrBufDestroy (buf); + return ret; +} + +FcBool +FcStrBufChar (FcStrBuf *buf, FcChar8 c) +{ + if (buf->len == buf->size) + { + FcChar8 *new; + int size; + + if (buf->allocated) + { + size = buf->size * 2; + new = realloc (buf->buf, size); + } + else + { + size = buf->size + 1024; + new = malloc (size); + if (new) + { + buf->allocated = FcTrue; + memcpy (new, buf->buf, buf->len); + } + } + if (!new) + { + buf->failed = FcTrue; + return FcFalse; + } + if (buf->size) + FcMemFree (FC_MEM_STRBUF, buf->size); + FcMemAlloc (FC_MEM_STRBUF, size); + buf->size = size; + buf->buf = new; + } + buf->buf[buf->len++] = c; + return FcTrue; +} + +FcBool +FcStrBufString (FcStrBuf *buf, const FcChar8 *s) +{ + FcChar8 c; + while ((c = *s++)) + if (!FcStrBufChar (buf, c)) + return FcFalse; + return FcTrue; +} + +FcBool +FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len) +{ + while (len-- > 0) + if (!FcStrBufChar (buf, *s++)) + return FcFalse; + return FcTrue; +} + +FcChar8 * +FcStrCopyFilename (const FcChar8 *s) +{ + FcChar8 *new; + + if (*s == '~') + { + FcChar8 *home = (FcChar8 *) getenv ("HOME"); + int size = strlen ((char *) home) + strlen ((char *) s); + if (!home) + return 0; + new = (FcChar8 *) malloc (size); + if (!new) + return 0; + FcMemAlloc (FC_MEM_STRING, size); + strcpy ((char *) new, (char *) home); + strcat ((char *) new, (char *) s + 1); + } + else + { + int size = strlen ((char *) s) + 1; + new = (FcChar8 *) malloc (size); + if (!new) + return 0; + FcMemAlloc (FC_MEM_STRING, size); + strcpy ((char *) new, (const char *) s); + } + return new; +} + +FcChar8 * +FcStrDirname (const FcChar8 *file) +{ + FcChar8 *slash; + FcChar8 *dir; + + slash = (FcChar8 *) strrchr ((char *) file, '/'); + if (!slash) + return FcStrCopy ((FcChar8 *) "."); + dir = malloc ((slash - file) + 1); + if (!dir) + return 0; + FcMemAlloc (FC_MEM_STRING, (slash - file) + 1); + strncpy ((char *) dir, (const char *) file, slash - file); + dir[slash - file] = '\0'; + return dir; +} + +FcChar8 * +FcStrBasename (const FcChar8 *file) +{ + FcChar8 *slash; + + slash = (FcChar8 *) strrchr ((char *) file, '/'); + if (!slash) + return FcStrCopy (file); + return FcStrCopy (slash + 1); +} + +FcStrSet * +FcStrSetCreate (void) +{ + FcStrSet *set = malloc (sizeof (FcStrSet)); + if (!set) + return 0; + FcMemAlloc (FC_MEM_STRSET, sizeof (FcStrSet)); + set->ref = 1; + set->num = 0; + set->size = 0; + set->strs = 0; + return set; +} + +static FcBool +_FcStrSetAppend (FcStrSet *set, FcChar8 *s) +{ + if (FcStrSetMember (set, s)) + { + FcStrFree (s); + return FcTrue; + } + if (set->num == set->size) + { + FcChar8 **strs = malloc ((set->size + 2) * sizeof (FcChar8 *)); + + if (!strs) + return FcFalse; + FcMemAlloc (FC_MEM_STRSET, (set->size + 2) * sizeof (FcChar8 *)); + set->size = set->size + 1; + if (set->num) + memcpy (strs, set->strs, set->num * sizeof (FcChar8 *)); + if (set->strs) + free (set->strs); + set->strs = strs; + } + set->strs[set->num++] = s; + set->strs[set->num] = 0; + return FcTrue; +} + +FcBool +FcStrSetMember (FcStrSet *set, const FcChar8 *s) +{ + int i; + + for (i = 0; i < set->num; i++) + if (!FcStrCmp (set->strs[i], s)) + return FcTrue; + return FcFalse; +} + +FcBool +FcStrSetEqual (FcStrSet *sa, FcStrSet *sb) +{ + int i; + if (sa->num != sb->num) + return FcFalse; + for (i = 0; i < sa->num; i++) + if (!FcStrSetMember (sb, sa->strs[i])) + return FcFalse; + return FcTrue; +} + +FcBool +FcStrSetAdd (FcStrSet *set, const FcChar8 *s) +{ + FcChar8 *new = FcStrCopy (s); + if (!new) + return FcFalse; + if (!_FcStrSetAppend (set, new)) + { + FcStrFree (new); + return FcFalse; + } + return FcTrue; +} + +FcBool +FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s) +{ + FcChar8 *new = FcStrCopyFilename (s); + if (!new) + return FcFalse; + if (!_FcStrSetAppend (set, new)) + { + FcStrFree (new); + return FcFalse; + } + return FcTrue; +} + +FcBool +FcStrSetDel (FcStrSet *set, const FcChar8 *s) +{ + int i; + + for (i = 0; i < set->num; i++) + if (!FcStrCmp (set->strs[i], s)) + { + FcStrFree (set->strs[i]); + /* + * copy remaining string pointers and trailing + * NULL + */ + memmove (&set->strs[i], &set->strs[i+1], + (set->num - i) * sizeof (FcChar8 *)); + set->num--; + return FcTrue; + } + return FcFalse; +} + +void +FcStrSetDestroy (FcStrSet *set) +{ + if (--set->ref == 0) + { + int i; + + for (i = 0; i < set->num; i++) + FcStrFree (set->strs[i]); + FcMemFree (FC_MEM_STRSET, (set->size) * sizeof (FcChar8 *)); + if (set->strs) + free (set->strs); + FcMemFree (FC_MEM_STRSET, sizeof (FcStrSet)); + free (set); + } +} + +FcStrList * +FcStrListCreate (FcStrSet *set) +{ + FcStrList *list; + + list = malloc (sizeof (FcStrList)); + if (!list) + return 0; + FcMemAlloc (FC_MEM_STRLIST, sizeof (FcStrList)); + list->set = set; + set->ref++; + list->n = 0; + return list; +} + +FcChar8 * +FcStrListNext (FcStrList *list) +{ + if (list->n >= list->set->num) + return 0; + return list->set->strs[list->n++]; +} + +void +FcStrListDone (FcStrList *list) +{ + FcStrSetDestroy (list->set); + FcMemFree (FC_MEM_STRLIST, sizeof (FcStrList)); + free (list); +} Index: xc/lib/fontconfig/src/fcxml.c diff -u /dev/null xc/lib/fontconfig/src/fcxml.c:1.22 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fcxml.c Sat Aug 31 18:17:32 2002 @@ -0,0 +1,1842 @@ +/* + * $XFree86: xc/lib/fontconfig/src/fcxml.c,v 1.22 2002/08/31 22:17:32 keithp Exp $ + * + * Copyright © 2002 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 <stdarg.h> +#include "fcint.h" + +#ifndef HAVE_XMLPARSE_H +#define HAVE_XMLPARSE_H 0 +#endif + +#if HAVE_XMLPARSE_H +#include <xmlparse.h> +#else +#include <expat.h> +#endif + +FcTest * +FcTestCreate (FcMatchKind kind, + FcQual qual, + const FcChar8 *field, + FcOp compare, + FcExpr *expr) +{ + FcTest *test = (FcTest *) malloc (sizeof (FcTest)); + + if (test) + { + FcMemAlloc (FC_MEM_TEST, sizeof (FcTest)); + test->next = 0; + test->kind = kind; + test->qual = qual; + test->field = (char *) FcStrCopy (field); + test->op = compare; + test->expr = expr; + } + return test; +} + +void +FcTestDestroy (FcTest *test) +{ + if (test->next) + FcTestDestroy (test->next); + FcExprDestroy (test->expr); + FcStrFree ((FcChar8 *) test->field); + FcMemFree (FC_MEM_TEST, sizeof (FcTest)); + free (test); +} + +FcExpr * +FcExprCreateInteger (int i) +{ + FcExpr *e = (FcExpr *) malloc (sizeof (FcExpr)); + + if (e) + { + FcMemAlloc (FC_MEM_EXPR, sizeof (FcExpr)); + e->op = FcOpInteger; + e->u.ival = i; + } + return e; +} + +FcExpr * +FcExprCreateDouble (double d) +{ + FcExpr *e = (FcExpr *) malloc (sizeof (FcExpr)); + + if (e) + { + FcMemAlloc (FC_MEM_EXPR, sizeof (FcExpr)); + e->op = FcOpDouble; + e->u.dval = d; + } + return e; +} + +FcExpr * +FcExprCreateString (const FcChar8 *s) +{ + FcExpr *e = (FcExpr *) malloc (sizeof (FcExpr)); + + if (e) + { + FcMemAlloc (FC_MEM_EXPR, sizeof (FcExpr)); + e->op = FcOpString; + e->u.sval = FcStrCopy (s); + } + return e; +} + +FcExpr * +FcExprCreateMatrix (const FcMatrix *m) +{ + FcExpr *e = (FcExpr *) malloc (sizeof (FcExpr)); + + if (e) + { + FcMemAlloc (FC_MEM_EXPR, sizeof (FcExpr)); + e->op = FcOpMatrix; + e->u.mval = FcMatrixCopy (m); + } + return e; +} + +FcExpr * +FcExprCreateBool (FcBool b) +{ + FcExpr *e = (FcExpr *) malloc (sizeof (FcExpr)); + + if (e) + { + FcMemAlloc (FC_MEM_EXPR, sizeof (FcExpr)); + e->op = FcOpBool; + e->u.bval = b; + } + return e; +} + +FcExpr * +FcExprCreateNil (void) +{ + FcExpr *e = (FcExpr *) malloc (sizeof (FcExpr)); + + if (e) + { + FcMemAlloc (FC_MEM_EXPR, sizeof (FcExpr)); + e->op = FcOpNil; + } + return e; +} + +FcExpr * +FcExprCreateField (const char *field) +{ + FcExpr *e = (FcExpr *) malloc (sizeof (FcExpr)); + + if (e) + { + FcMemAlloc (FC_MEM_EXPR, sizeof (FcExpr)); + e->op = FcOpField; + e->u.field = (char *) FcStrCopy ((FcChar8 *) field); + } + return e; +} + +FcExpr * +FcExprCreateConst (const FcChar8 *constant) +{ + FcExpr *e = (FcExpr *) malloc (sizeof (FcExpr)); + + if (e) + { + FcMemAlloc (FC_MEM_EXPR, sizeof (FcExpr)); + e->op = FcOpConst; + e->u.constant = FcStrCopy (constant); + } + return e; +} + +FcExpr * +FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right) +{ + FcExpr *e = (FcExpr *) malloc (sizeof (FcExpr)); + + if (e) + { + FcMemAlloc (FC_MEM_EXPR, sizeof (FcExpr)); + e->op = op; + e->u.tree.left = left; + e->u.tree.right = right; + } + return e; +} + +void +FcExprDestroy (FcExpr *e) +{ + switch (e->op) { + case FcOpInteger: + break; + case FcOpDouble: + break; + case FcOpString: + FcStrFree (e->u.sval); + break; + case FcOpMatrix: + FcMatrixFree (e->u.mval); + break; + case FcOpCharSet: + FcCharSetDestroy (e->u.cval); + break; + case FcOpBool: + break; + case FcOpField: + FcStrFree ((FcChar8 *) e->u.field); + break; + case FcOpConst: + FcStrFree (e->u.constant); + break; + case FcOpAssign: + case FcOpAssignReplace: + case FcOpPrepend: + case FcOpPrependFirst: + case FcOpAppend: + case FcOpAppendLast: + break; + case FcOpOr: + case FcOpAnd: + case FcOpEqual: + case FcOpNotEqual: + case FcOpLess: + case FcOpLessEqual: + case FcOpMore: + case FcOpMoreEqual: + case FcOpContains: + case FcOpNotContains: + case FcOpPlus: + case FcOpMinus: + case FcOpTimes: + case FcOpDivide: + case FcOpQuest: + case FcOpComma: + FcExprDestroy (e->u.tree.right); + /* fall through */ + case FcOpNot: + FcExprDestroy (e->u.tree.left); + break; + case FcOpNil: + case FcOpInvalid: + break; + } + FcMemFree (FC_MEM_EXPR, sizeof (FcExpr)); + free (e); +} + +FcEdit * +FcEditCreate (const char *field, FcOp op, FcExpr *expr, FcValueBinding binding) +{ + FcEdit *e = (FcEdit *) malloc (sizeof (FcEdit)); + + if (e) + { + e->next = 0; + e->field = field; /* already saved in grammar */ + e->op = op; + e->expr = expr; + e->binding = binding; + } + return e; +} + +void +FcEditDestroy (FcEdit *e) +{ + if (e->next) + FcEditDestroy (e->next); + FcStrFree ((FcChar8 *) e->field); + if (e->expr) + FcExprDestroy (e->expr); +} + +char * +FcConfigSaveField (const char *field) +{ + return (char *) FcStrCopy ((FcChar8 *) field); +} + +typedef enum _FcElement { + FcElementNone, + FcElementFontconfig, + FcElementDir, + FcElementCache, + FcElementInclude, + FcElementConfig, + FcElementMatch, + FcElementAlias, + + FcElementBlank, + FcElementRescan, + + FcElementPrefer, + FcElementAccept, + FcElementDefault, + FcElementFamily, + + FcElementTest, + FcElementEdit, + FcElementInt, + FcElementDouble, + FcElementString, + FcElementMatrix, + FcElementBool, + FcElementCharset, + FcElementName, + FcElementConst, + FcElementOr, + FcElementAnd, + FcElementEq, + FcElementNotEq, + FcElementLess, + FcElementLessEq, + FcElementMore, + FcElementMoreEq, + FcElementContains, + FcElementNotContains, + FcElementPlus, + FcElementMinus, + FcElementTimes, + FcElementDivide, + FcElementNot, + FcElementIf, + FcElementUnknown +} FcElement; + +static FcElement +FcElementMap (const XML_Char *name) +{ + static struct { + char *name; + FcElement element; + } fcElementMap[] = { + { "fontconfig", FcElementFontconfig }, + { "dir", FcElementDir }, + { "cache", FcElementCache }, + { "include", FcElementInclude }, + { "config", FcElementConfig }, + { "match", FcElementMatch }, + { "alias", FcElementAlias }, + + { "blank", FcElementBlank }, + { "rescan", FcElementRescan }, + + { "prefer", FcElementPrefer }, + { "accept", FcElementAccept }, + { "default", FcElementDefault }, + { "family", FcElementFamily }, + + { "test", FcElementTest }, + { "edit", FcElementEdit }, + { "int", FcElementInt }, + { "double", FcElementDouble }, + { "string", FcElementString }, + { "matrix", FcElementMatrix }, + { "bool", FcElementBool }, + { "charset", FcElementCharset }, + { "name", FcElementName }, + { "const", FcElementConst }, + { "or", FcElementOr }, + { "and", FcElementAnd }, + { "eq", FcElementEq }, + { "not_eq", FcElementNotEq }, + { "less", FcElementLess }, + { "less_eq", FcElementLessEq }, + { "more", FcElementMore }, + { "more_eq", FcElementMoreEq }, + { "contains", FcElementContains }, + { "not_contains",FcElementNotContains }, + { "plus", FcElementPlus }, + { "minus", FcElementMinus }, + { "times", FcElementTimes }, + { "divide", FcElementDivide }, + { "not", FcElementNot }, + { "if", FcElementIf }, + + { 0, 0 } + }; + + int i; + for (i = 0; fcElementMap[i].name; i++) + if (!strcmp ((char *) name, fcElementMap[i].name)) + return fcElementMap[i].element; + return FcElementUnknown; +} + +typedef struct _FcPStack { + struct _FcPStack *prev; + FcElement element; + FcChar8 **attr; + FcStrBuf str; +} FcPStack; + +typedef enum _FcVStackTag { + FcVStackNone, + + FcVStackString, + FcVStackFamily, + FcVStackField, + FcVStackConstant, + + FcVStackPrefer, + FcVStackAccept, + FcVStackDefault, + + FcVStackInteger, + FcVStackDouble, + FcVStackMatrix, + FcVStackBool, + + FcVStackTest, + FcVStackExpr, + FcVStackEdit +} FcVStackTag; + +typedef struct _FcVStack { + struct _FcVStack *prev; + FcPStack *pstack; /* related parse element */ + FcVStackTag tag; + union { + FcChar8 *string; + + int integer; + double _double; + FcMatrix *matrix; + FcBool bool; + + FcTest *test; + FcQual qual; + FcOp op; + FcExpr *expr; + FcEdit *edit; + } u; +} FcVStack; + +typedef struct _FcConfigParse { + FcPStack *pstack; + FcVStack *vstack; + FcBool error; + const FcChar8 *name; + FcConfig *config; + XML_Parser parser; +} FcConfigParse; + +typedef enum _FcConfigSeverity { + FcSevereInfo, FcSevereWarning, FcSevereError +} FcConfigSeverity; + +static void +FcConfigMessage (FcConfigParse *parse, FcConfigSeverity severe, char *fmt, ...) +{ + char *s = "unknown"; + va_list args; + + va_start (args, fmt); + + switch (severe) { + case FcSevereInfo: s = "info"; break; + case FcSevereWarning: s = "warning"; break; + case FcSevereError: s = "error"; break; + } + if (parse) + { + if (parse->name) + fprintf (stderr, "Fontconfig %s: \"%s\", line %d: ", s, + parse->name, XML_GetCurrentLineNumber (parse->parser)); + else + fprintf (stderr, "Fontconfig %s: line %d: ", s, + XML_GetCurrentLineNumber (parse->parser)); + if (severe >= FcSevereError) + parse->error = FcTrue; + } + else + fprintf (stderr, "Fontconfig %s: ", s); + vfprintf (stderr, fmt, args); + fprintf (stderr, "\n"); + va_end (args); +} + +static void +FcVStackPush (FcConfigParse *parse, FcVStack *vstack) +{ + vstack->prev = parse->vstack; + vstack->pstack = parse->pstack ? parse->pstack->prev : 0; + parse->vstack = vstack; +} + +static FcVStack * +FcVStackCreate (void) +{ + FcVStack *new; + + new = malloc (sizeof (FcVStack)); + if (!new) + return 0; + FcMemAlloc (FC_MEM_VSTACK, sizeof (FcVStack)); + new->tag = FcVStackNone; + new->prev = 0; + return new; +} + +static void +FcVStackDestroy (FcVStack *vstack) +{ + FcVStack *prev; + + for (; vstack; vstack = prev) + { + prev = vstack->prev; + switch (vstack->tag) { + case FcVStackNone: + break; + case FcVStackString: + case FcVStackFamily: + case FcVStackField: + case FcVStackConstant: + FcStrFree (vstack->u.string); + break; + case FcVStackInteger: + case FcVStackDouble: + break; + case FcVStackMatrix: + FcMatrixFree (vstack->u.matrix); + break; + case FcVStackBool: + break; + case FcVStackTest: + FcTestDestroy (vstack->u.test); + break; + case FcVStackExpr: + case FcVStackPrefer: + case FcVStackAccept: + case FcVStackDefault: + FcExprDestroy (vstack->u.expr); + break; + case FcVStackEdit: + FcEditDestroy (vstack->u.edit); + break; + } + FcMemFree (FC_MEM_VSTACK, sizeof (FcVStack)); + free (vstack); + } +} + +static FcBool +FcVStackPushString (FcConfigParse *parse, FcVStackTag tag, FcChar8 *string) +{ + FcVStack *vstack = FcVStackCreate (); + if (!vstack) + return FcFalse; + vstack->u.string = string; + vstack->tag = tag; + FcVStackPush (parse, vstack); + return FcTrue; +} + +static FcBool +FcVStackPushInteger (FcConfigParse *parse, int integer) +{ + FcVStack *vstack = FcVStackCreate (); + if (!vstack) + return FcFalse; + vstack->u.integer = integer; + vstack->tag = FcVStackInteger; + FcVStackPush (parse, vstack); + return FcTrue; +} + +static FcBool +FcVStackPushDouble (FcConfigParse *parse, double _double) +{ + FcVStack *vstack = FcVStackCreate (); + if (!vstack) + return FcFalse; + vstack->u._double = _double; + vstack->tag = FcVStackDouble; + FcVStackPush (parse, vstack); + return FcTrue; +} + +static FcBool +FcVStackPushMatrix (FcConfigParse *parse, FcMatrix *matrix) +{ + FcVStack *vstack = FcVStackCreate (); + if (!vstack) + return FcFalse; + matrix = FcMatrixCopy (matrix); + if (!matrix) + { + FcVStackDestroy (vstack); + return FcFalse; + } + vstack->u.matrix = matrix; + vstack->tag = FcVStackMatrix; + FcVStackPush (parse, vstack); + return FcTrue; +} + +static FcBool +FcVStackPushBool (FcConfigParse *parse, FcBool bool) +{ + FcVStack *vstack = FcVStackCreate (); + if (!vstack) + return FcFalse; + vstack->u.bool = bool; + vstack->tag = FcVStackBool; + FcVStackPush (parse, vstack); + return FcTrue; +} + +static FcBool +FcVStackPushTest (FcConfigParse *parse, FcTest *test) +{ + FcVStack *vstack = FcVStackCreate (); + if (!vstack) + return FcFalse; + vstack->u.test = test; + vstack->tag = FcVStackTest; + FcVStackPush (parse, vstack); + return FcTrue; +} + +static FcBool +FcVStackPushExpr (FcConfigParse *parse, FcVStackTag tag, FcExpr *expr) +{ + FcVStack *vstack = FcVStackCreate (); + if (!vstack) + return FcFalse; + vstack->u.expr = expr; + vstack->tag = tag; + FcVStackPush (parse, vstack); + return FcTrue; +} + +static FcBool +FcVStackPushEdit (FcConfigParse *parse, FcEdit *edit) +{ + FcVStack *vstack = FcVStackCreate (); + if (!vstack) + return FcFalse; + vstack->u.edit = edit; + vstack->tag = FcVStackEdit; + FcVStackPush (parse, vstack); + return FcTrue; +} + +static FcVStack * +FcVStackFetch (FcConfigParse *parse, int off) +{ + FcVStack *vstack; + + for (vstack = parse->vstack; vstack && off-- > 0; vstack = vstack->prev); + return vstack; +} + +static void +FcVStackClear (FcConfigParse *parse) +{ + while (parse->vstack && parse->vstack->pstack == parse->pstack) + { + FcVStack *vstack = parse->vstack; + parse->vstack = vstack->prev; + vstack->prev = 0; + FcVStackDestroy (vstack); + } +} + +static FcVStack * +FcVStackPop (FcConfigParse *parse) +{ + FcVStack *vstack = parse->vstack; + + if (!vstack || vstack->pstack != parse->pstack) + return 0; + parse->vstack = vstack->prev; + vstack->prev = 0; + return vstack; +} + +static int +FcVStackElements (FcConfigParse *parse) +{ + int h = 0; + FcVStack *vstack = parse->vstack; + while (vstack && vstack->pstack == parse->pstack) + { + h++; + vstack = vstack->prev; + } + return h; +} + +static FcChar8 ** +FcConfigSaveAttr (const XML_Char **attr) +{ + int n; + int slen; + int i; + FcChar8 **new; + FcChar8 *s; + + if (!attr) + return 0; + slen = 0; + for (i = 0; attr[i]; i++) + slen += strlen (attr[i]) + 1; + n = i; + new = malloc ((i + 1) * sizeof (FcChar8 *) + slen); + if (!new) + return 0; + FcMemAlloc (FC_MEM_ATTR, 1); /* size is too expensive */ + s = (FcChar8 *) (new + (i + 1)); + for (i = 0; attr[i]; i++) + { + new[i] = s; + strcpy ((char *) s, (char *) attr[i]); + s += strlen ((char *) s) + 1; + } + new[i] = 0; + return new; +} + +static FcBool +FcPStackPush (FcConfigParse *parse, FcElement element, const XML_Char **attr) +{ + FcPStack *new = malloc (sizeof (FcPStack)); + + if (!new) + return FcFalse; + FcMemAlloc (FC_MEM_PSTACK, sizeof (FcPStack)); + new->prev = parse->pstack; + new->element = element; + if (attr) + { + new->attr = FcConfigSaveAttr (attr); + if (!new->attr) + FcConfigMessage (parse, FcSevereError, "out of memory"); + } + else + new->attr = 0; + FcStrBufInit (&new->str, 0, 0); + parse->pstack = new; + return FcTrue; +} + +static FcBool +FcPStackPop (FcConfigParse *parse) +{ + FcPStack *old; + + if (!parse->pstack) + { + FcConfigMessage (parse, FcSevereError, "mismatching element"); + return FcFalse; + } + FcVStackClear (parse); + old = parse->pstack; + parse->pstack = old->prev; + FcStrBufDestroy (&old->str); + if (old->attr) + { + FcMemFree (FC_MEM_ATTR, 1); /* size is to expensive */ + free (old->attr); + } + FcMemFree (FC_MEM_PSTACK, sizeof (FcPStack)); + free (old); + return FcTrue; +} + +static FcBool +FcConfigInit (FcConfigParse *parse, const FcChar8 *name, FcConfig *config, XML_Parser parser) +{ + parse->pstack = 0; + parse->vstack = 0; + parse->error = FcFalse; + parse->name = name; + parse->config = config; + parse->parser = parser; + return FcTrue; +} + +static void +FcConfigCleanup (FcConfigParse *parse) +{ + while (parse->pstack) + FcPStackPop (parse); +} + +static const FcChar8 * +FcConfigGetAttribute (FcConfigParse *parse, char *attr) +{ + FcChar8 **attrs; + if (!parse->pstack) + return 0; + + attrs = parse->pstack->attr; + while (*attrs) + { + if (!strcmp ((char *) *attrs, attr)) + return attrs[1]; + attrs += 2; + } + return 0; +} + +static void +FcStartElement(void *userData, const XML_Char *name, const XML_Char **attr) +{ + FcConfigParse *parse = userData; + FcElement element; + + element = FcElementMap (name); + if (element == FcElementUnknown) + FcConfigMessage (parse, FcSevereWarning, "unknown element \"%s\"", name); + + if (!FcPStackPush (parse, element, attr)) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + return; + } + return; +} + +static void +FcParseBlank (FcConfigParse *parse) +{ + int n = FcVStackElements (parse); + while (n-- > 0) + { + FcVStack *v = FcVStackFetch (parse, n); + if (v->tag != FcVStackInteger) + FcConfigMessage (parse, FcSevereError, "non-integer blank"); + else + { + if (!parse->config->blanks) + { + parse->config->blanks = FcBlanksCreate (); + if (!parse->config->blanks) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + break; + } + } + if (!FcBlanksAdd (parse->config->blanks, v->u.integer)) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + break; + } + } + } +} + +static void +FcParseRescan (FcConfigParse *parse) +{ + int n = FcVStackElements (parse); + while (n-- > 0) + { + FcVStack *v = FcVStackFetch (parse, n); + if (v->tag != FcVStackInteger) + FcConfigMessage (parse, FcSevereWarning, "non-integer rescan"); + else + parse->config->rescanInterval = v->u.integer; + } +} + +static void +FcParseInt (FcConfigParse *parse) +{ + FcChar8 *s, *end; + int l; + + if (!parse->pstack) + return; + s = FcStrBufDone (&parse->pstack->str); + if (!s) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + return; + } + end = 0; + l = (int) strtol ((char *) s, (char **)&end, 0); + if (end != s + strlen ((char *) s)) + FcConfigMessage (parse, FcSevereError, "\"%s\": not a valid integer", s); + else + FcVStackPushInteger (parse, l); + FcStrFree (s); +} + +/* + * idea copied from glib g_ascii_strtod with + * permission of the author (Alexander Larsson) + */ + +#include <locale.h> + +static double +FcStrtod (char *s, char **end) +{ + struct lconv *locale_data; + char *dot; + double v; + + /* + * Have to swap the decimal point to match the current locale + * if that locale doesn't use 0x2e + */ + if ((dot = strchr (s, 0x2e)) && + (locale_data = localeconv ()) && + (locale_data->decimal_point[0] != 0x2e || + locale_data->decimal_point[1] != 0)) + { + char buf[128]; + int slen = strlen (s); + int dlen = strlen (locale_data->decimal_point); + + if (slen + dlen > sizeof (buf)) + { + if (end) + *end = s; + v = 0; + } + else + { + char *buf_end; + /* mantissa */ + strncpy (buf, s, dot - s); + /* decimal point */ + strcpy (buf + (dot - s), locale_data->decimal_point); + /* rest of number */ + strcpy (buf + (dot - s) + dlen, dot + 1); + buf_end = 0; + v = strtod (buf, &buf_end); + if (buf_end) + buf_end = s + (buf_end - buf); + if (end) + *end = buf_end; + } + } + else + v = strtod (s, end); + return v; +} + +static void +FcParseDouble (FcConfigParse *parse) +{ + FcChar8 *s, *end; + double d; + + if (!parse->pstack) + return; + s = FcStrBufDone (&parse->pstack->str); + if (!s) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + return; + } + end = 0; + d = FcStrtod ((char *) s, (char **)&end); + if (end != s + strlen ((char *) s)) + FcConfigMessage (parse, FcSevereError, "\"%s\": not a valid double", s); + else + FcVStackPushDouble (parse, d); + FcStrFree (s); +} + +static void +FcParseString (FcConfigParse *parse, FcVStackTag tag) +{ + FcChar8 *s; + + if (!parse->pstack) + return; + s = FcStrBufDone (&parse->pstack->str); + if (!s) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + return; + } + if (!FcVStackPushString (parse, tag, s)) + FcStrFree (s); +} + +static void +FcParseMatrix (FcConfigParse *parse) +{ + FcVStack *vstack; + enum { m_done, m_xx, m_xy, m_yx, m_yy } matrix_state = m_yy; + FcMatrix m; + + while ((vstack = FcVStackPop (parse))) + { + double v; + switch (vstack->tag) { + case FcVStackInteger: + v = vstack->u.integer; + break; + case FcVStackDouble: + v = vstack->u._double; + break; + default: + FcConfigMessage (parse, FcSevereError, "non-double matrix element"); + v = 1.0; + break; + } + switch (matrix_state) { + case m_xx: m.xx = v; break; + case m_xy: m.xy = v; break; + case m_yx: m.yx = v; break; + case m_yy: m.yy = v; break; + default: break; + } + FcVStackDestroy (vstack); + matrix_state--; + } + if (matrix_state != m_done) + FcConfigMessage (parse, FcSevereError, "wrong number of matrix elements"); + else + FcVStackPushMatrix (parse, &m); +} + +static FcBool +FcConfigLexBool (const FcChar8 *bool) +{ + if (*bool == 't' || *bool == 'T') + return FcTrue; + if (*bool == 'y' || *bool == 'Y') + return FcTrue; + if (*bool == '1') + return FcTrue; + return FcFalse; +} + +static void +FcParseBool (FcConfigParse *parse) +{ + FcChar8 *s; + + if (!parse->pstack) + return; + s = FcStrBufDone (&parse->pstack->str); + if (!s) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + return; + } + FcVStackPushBool (parse, FcConfigLexBool (s)); + FcStrFree (s); +} + +static void +FcParseFamilies (FcConfigParse *parse, FcVStackTag tag) +{ + FcVStack *vstack; + FcExpr *left, *expr = 0, *new; + + while ((vstack = FcVStackPop (parse))) + { + if (vstack->tag != FcVStackFamily) + { + FcConfigMessage (parse, FcSevereWarning, "non-family"); + FcVStackDestroy (vstack); + continue; + } + left = vstack->u.expr; + vstack->tag = FcVStackNone; + FcVStackDestroy (vstack); + if (expr) + { + new = FcExprCreateOp (left, FcOpComma, expr); + if (!new) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + FcExprDestroy (left); + FcExprDestroy (expr); + break; + } + expr = new; + } + else + expr = left; + } + if (expr) + { + if (!FcVStackPushExpr (parse, tag, expr)) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + if (expr) + FcExprDestroy (expr); + } + } +} + +static void +FcParseFamily (FcConfigParse *parse) +{ + FcChar8 *s; + FcExpr *expr; + + if (!parse->pstack) + return; + s = FcStrBufDone (&parse->pstack->str); + if (!s) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + return; + } + expr = FcExprCreateString (s); + FcStrFree (s); + if (expr) + FcVStackPushExpr (parse, FcVStackFamily, expr); +} + +static void +FcParseAlias (FcConfigParse *parse) +{ + FcExpr *family = 0, *accept = 0, *prefer = 0, *def = 0, *new = 0; + FcEdit *edit = 0, *next; + FcVStack *vstack; + FcTest *test; + + while ((vstack = FcVStackPop (parse))) + { + switch (vstack->tag) { + case FcVStackFamily: + if (family) + { + new = FcExprCreateOp (vstack->u.expr, FcOpComma, family); + if (!new) + FcConfigMessage (parse, FcSevereError, "out of memory"); + else + family = new; + } + else + new = vstack->u.expr; + if (new) + { + family = new; + vstack->tag = FcVStackNone; + } + break; + case FcVStackPrefer: + if (prefer) + FcExprDestroy (prefer); + prefer = vstack->u.expr; + vstack->tag = FcVStackNone; + break; + case FcVStackAccept: + if (accept) + FcExprDestroy (accept); + accept = vstack->u.expr; + vstack->tag = FcVStackNone; + break; + case FcVStackDefault: + if (def) + FcExprDestroy (def); + def = vstack->u.expr; + vstack->tag = FcVStackNone; + break; + default: + FcConfigMessage (parse, FcSevereWarning, "bad alias"); + break; + } + FcVStackDestroy (vstack); + } + if (!family) + { + FcConfigMessage (parse, FcSevereError, "missing family in alias"); + if (prefer) + FcExprDestroy (prefer); + if (accept) + FcExprDestroy (accept); + if (def) + FcExprDestroy (def); + return; + } + if (prefer) + { + edit = FcEditCreate (FcConfigSaveField ("family"), + FcOpPrepend, + prefer, + FcValueBindingWeak); + if (edit) + edit->next = 0; + else + FcExprDestroy (prefer); + } + if (accept) + { + next = edit; + edit = FcEditCreate (FcConfigSaveField ("family"), + FcOpAppend, + accept, + FcValueBindingWeak); + if (edit) + edit->next = next; + else + FcExprDestroy (accept); + } + if (def) + { + next = edit; + edit = FcEditCreate (FcConfigSaveField ("family"), + FcOpAppendLast, + def, + FcValueBindingWeak); + if (edit) + edit->next = next; + else + FcExprDestroy (def); + } + if (edit) + { + test = FcTestCreate (FcMatchPattern, + FcQualAny, + (FcChar8 *) FC_FAMILY, + FcOpEqual, + family); + if (test) + if (!FcConfigAddEdit (parse->config, test, edit, FcMatchPattern)) + FcTestDestroy (test); + } + else + FcExprDestroy (family); +} + +static FcExpr * +FcPopExpr (FcConfigParse *parse) +{ + FcVStack *vstack = FcVStackPop (parse); + FcExpr *expr = 0; + if (!vstack) + return 0; + switch (vstack->tag) { + case FcVStackNone: + break; + case FcVStackString: + case FcVStackFamily: + expr = FcExprCreateString (vstack->u.string); + break; + case FcVStackField: + expr = FcExprCreateField ((char *) vstack->u.string); + break; + case FcVStackConstant: + expr = FcExprCreateConst (vstack->u.string); + break; + case FcVStackPrefer: + case FcVStackAccept: + case FcVStackDefault: + expr = vstack->u.expr; + vstack->tag = FcVStackNone; + break; + case FcVStackInteger: + expr = FcExprCreateInteger (vstack->u.integer); + break; + case FcVStackDouble: + expr = FcExprCreateDouble (vstack->u._double); + break; + case FcVStackMatrix: + expr = FcExprCreateMatrix (vstack->u.matrix); + break; + case FcVStackBool: + expr = FcExprCreateBool (vstack->u.bool); + break; + case FcVStackTest: + break; + case FcVStackExpr: + expr = vstack->u.expr; + vstack->tag = FcVStackNone; + break; + case FcVStackEdit: + break; + } + FcVStackDestroy (vstack); + return expr; +} + +static FcExpr * +FcPopExprs (FcConfigParse *parse, FcOp op) +{ + FcExpr *left, *expr = 0, *new; + + while ((left = FcPopExpr (parse))) + { + if (expr) + { + new = FcExprCreateOp (left, op, expr); + if (!new) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + FcExprDestroy (left); + FcExprDestroy (expr); + break; + } + expr = new; + } + else + expr = left; + } + return expr; +} + +static void +FcParseExpr (FcConfigParse *parse, FcOp op) +{ + FcExpr *expr = FcPopExprs (parse, op); + if (expr) + FcVStackPushExpr (parse, FcVStackExpr, expr); +} + +static void +FcParseInclude (FcConfigParse *parse) +{ + FcChar8 *s; + const FcChar8 *i; + FcBool ignore_missing = FcFalse; + + s = FcStrBufDone (&parse->pstack->str); + if (!s) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + return; + } + i = FcConfigGetAttribute (parse, "ignore_missing"); + if (i && FcConfigLexBool ((FcChar8 *) i) == FcTrue) + ignore_missing = FcTrue; + if (!FcConfigParseAndLoad (parse->config, s, !ignore_missing)) + parse->error = FcTrue; + FcStrFree (s); +} + +typedef struct _FcOpMap { + char *name; + FcOp op; +} FcOpMap; + +static FcOp +FcConfigLexOp (const FcChar8 *op, const FcOpMap *map, int nmap) +{ + int i; + + for (i = 0; i < nmap; i++) + if (!strcmp ((char *) op, map[i].name)) + return map[i].op; + return FcOpInvalid; +} + +static const FcOpMap fcCompareOps[] = { + { "eq", FcOpEqual }, + { "not_eq", FcOpNotEqual }, + { "less", FcOpLess }, + { "less_eq", FcOpLessEqual }, + { "more", FcOpMore }, + { "more_eq", FcOpMoreEqual }, + { "contains", FcOpContains }, + { "not_contains", FcOpNotContains } +}; + +#define NUM_COMPARE_OPS (sizeof fcCompareOps / sizeof fcCompareOps[0]) + +static FcOp +FcConfigLexCompare (const FcChar8 *compare) +{ + return FcConfigLexOp (compare, fcCompareOps, NUM_COMPARE_OPS); +} + + +static void +FcParseTest (FcConfigParse *parse) +{ + const FcChar8 *kind_string; + FcMatchKind kind; + const FcChar8 *qual_string; + FcQual qual; + const FcChar8 *name; + const FcChar8 *compare_string; + FcOp compare; + FcExpr *expr; + FcTest *test; + + kind_string = FcConfigGetAttribute (parse, "target"); + if (!kind_string) + kind = FcMatchDefault; + else + { + if (!strcmp ((char *) kind_string, "pattern")) + kind = FcMatchPattern; + else if (!strcmp ((char *) kind_string, "font")) + kind = FcMatchFont; + else if (!strcmp ((char *) kind_string, "default")) + kind = FcMatchDefault; + else + { + FcConfigMessage (parse, FcSevereWarning, "invalid test target \"%s\"", kind_string); + return; + } + } + qual_string = FcConfigGetAttribute (parse, "qual"); + if (!qual_string) + qual = FcQualAny; + else + { + if (!strcmp ((char *) qual_string, "any")) + qual = FcQualAny; + else if (!strcmp ((char *) qual_string, "all")) + qual = FcQualAll; + else if (!strcmp ((char *) qual_string, "first")) + qual = FcQualFirst; + else if (!strcmp ((char *) qual_string, "not_first")) + qual = FcQualNotFirst; + else + { + FcConfigMessage (parse, FcSevereWarning, "invalid test qual \"%s\"", qual_string); + return; + } + } + name = FcConfigGetAttribute (parse, "name"); + if (!name) + { + FcConfigMessage (parse, FcSevereWarning, "missing test name"); + return; + } + compare_string = FcConfigGetAttribute (parse, "compare"); + if (!compare_string) + compare = FcOpEqual; + else + { + compare = FcConfigLexCompare (compare_string); + if (compare == FcOpInvalid) + { + FcConfigMessage (parse, FcSevereWarning, "invalid test compare \"%s\"", compare_string); + return; + } + } + expr = FcPopExprs (parse, FcOpComma); + if (!expr) + { + FcConfigMessage (parse, FcSevereWarning, "missing test expression"); + return; + } + test = FcTestCreate (kind, qual, name, compare, expr); + if (!test) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + return; + } + FcVStackPushTest (parse, test); +} + +static const FcOpMap fcModeOps[] = { + { "assign", FcOpAssign }, + { "assign_replace", FcOpAssignReplace }, + { "prepend", FcOpPrepend }, + { "prepend_first", FcOpPrependFirst }, + { "append", FcOpAppend }, + { "append_last", FcOpAppendLast }, +}; + +#define NUM_MODE_OPS (sizeof fcModeOps / sizeof fcModeOps[0]) + +static FcOp +FcConfigLexMode (const FcChar8 *mode) +{ + return FcConfigLexOp (mode, fcModeOps, NUM_MODE_OPS); +} + +static void +FcParseEdit (FcConfigParse *parse) +{ + const FcChar8 *name; + const FcChar8 *mode_string; + const FcChar8 *binding_string; + FcOp mode; + FcValueBinding binding; + FcExpr *expr; + FcEdit *edit; + + name = FcConfigGetAttribute (parse, "name"); + if (!name) + { + FcConfigMessage (parse, FcSevereWarning, "missing edit name"); + return; + } + mode_string = FcConfigGetAttribute (parse, "mode"); + if (!mode_string) + mode = FcOpAssign; + else + { + mode = FcConfigLexMode (mode_string); + if (mode == FcOpInvalid) + { + FcConfigMessage (parse, FcSevereWarning, "invalid edit mode \"%s\"", mode_string); + return; + } + } + binding_string = FcConfigGetAttribute (parse, "binding"); + if (!binding_string) + binding = FcValueBindingWeak; + else + { + if (!strcmp ((char *) binding_string, "weak")) + binding = FcValueBindingWeak; + else if (!strcmp ((char *) binding_string, "strong")) + binding = FcValueBindingStrong; + else + { + FcConfigMessage (parse, FcSevereWarning, "invalid edit binding \"%s\"", binding_string); + return; + } + } + expr = FcPopExprs (parse, FcOpComma); + edit = FcEditCreate ((char *) FcStrCopy (name), mode, expr, binding); + if (!edit) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + FcExprDestroy (expr); + return; + } + if (!FcVStackPushEdit (parse, edit)) + FcEditDestroy (edit); +} + +static void +FcParseMatch (FcConfigParse *parse) +{ + const FcChar8 *kind_name; + FcMatchKind kind; + FcTest *test = 0; + FcEdit *edit = 0; + FcVStack *vstack; + + kind_name = FcConfigGetAttribute (parse, "target"); + if (!kind_name) + kind = FcMatchPattern; + else + { + if (!strcmp ((char *) kind_name, "pattern")) + kind = FcMatchPattern; + else if (!strcmp ((char *) kind_name, "font")) + kind = FcMatchFont; + else + { + FcConfigMessage (parse, FcSevereWarning, "invalid match target \"%s\"", kind_name); + return; + } + } + while ((vstack = FcVStackPop (parse))) + { + switch (vstack->tag) { + case FcVStackTest: + vstack->u.test->next = test; + test = vstack->u.test; + vstack->tag = FcVStackNone; + break; + case FcVStackEdit: + vstack->u.edit->next = edit; + edit = vstack->u.edit; + vstack->tag = FcVStackNone; + break; + default: + FcConfigMessage (parse, FcSevereWarning, "invalid match element"); + break; + } + FcVStackDestroy (vstack); + } + if (!FcConfigAddEdit (parse->config, test, edit, kind)) + FcConfigMessage (parse, FcSevereError, "out of memory"); +} + +static void +FcEndElement(void *userData, const XML_Char *name) +{ + FcConfigParse *parse = userData; + FcChar8 *data; + + if (!parse->pstack) + return; + switch (parse->pstack->element) { + case FcElementNone: + break; + case FcElementFontconfig: + break; + case FcElementDir: + data = FcStrBufDone (&parse->pstack->str); + if (!data) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + break; + } + if (!FcConfigAddDir (parse->config, data)) + FcConfigMessage (parse, FcSevereError, "out of memory"); + FcStrFree (data); + break; + case FcElementCache: + data = FcStrBufDone (&parse->pstack->str); + if (!data) + { + FcConfigMessage (parse, FcSevereError, "out of memory"); + break; + } + if (!FcConfigSetCache (parse->config, data)) + FcConfigMessage (parse, FcSevereError, "out of memory"); + FcStrFree (data); + break; + case FcElementInclude: + FcParseInclude (parse); + break; + case FcElementConfig: + break; + case FcElementMatch: + FcParseMatch (parse); + break; + case FcElementAlias: + FcParseAlias (parse); + break; + + case FcElementBlank: + FcParseBlank (parse); + break; + case FcElementRescan: + FcParseRescan (parse); + break; + + case FcElementPrefer: + FcParseFamilies (parse, FcVStackPrefer); + break; + case FcElementAccept: + FcParseFamilies (parse, FcVStackAccept); + break; + case FcElementDefault: + FcParseFamilies (parse, FcVStackDefault); + break; + case FcElementFamily: + FcParseFamily (parse); + break; + + case FcElementTest: + FcParseTest (parse); + break; + case FcElementEdit: + FcParseEdit (parse); + break; + + case FcElementInt: + FcParseInt (parse); + break; + case FcElementDouble: + FcParseDouble (parse); + break; + case FcElementString: + FcParseString (parse, FcVStackString); + break; + case FcElementMatrix: + FcParseMatrix (parse); + break; + case FcElementBool: + FcParseBool (parse); + break; + case FcElementCharset: +/* FcParseCharset (parse); */ + break; + + case FcElementName: + FcParseString (parse, FcVStackField); + break; + case FcElementConst: + FcParseString (parse, FcVStackConstant); + break; + case FcElementOr: + FcParseExpr (parse, FcOpOr); + break; + case FcElementAnd: + FcParseExpr (parse, FcOpAnd); + break; + case FcElementEq: + FcParseExpr (parse, FcOpEqual); + break; + case FcElementNotEq: + FcParseExpr (parse, FcOpNotEqual); + break; + case FcElementLess: + FcParseExpr (parse, FcOpLess); + break; + case FcElementLessEq: + FcParseExpr (parse, FcOpLessEqual); + break; + case FcElementMore: + FcParseExpr (parse, FcOpMore); + break; + case FcElementMoreEq: + FcParseExpr (parse, FcOpMoreEqual); + break; + case FcElementContains: + FcParseExpr (parse, FcOpContains); + break; + case FcElementNotContains: + FcParseExpr (parse, FcOpNotContains); + break; + case FcElementPlus: + FcParseExpr (parse, FcOpPlus); + break; + case FcElementMinus: + FcParseExpr (parse, FcOpMinus); + break; + case FcElementTimes: + FcParseExpr (parse, FcOpTimes); + break; + case FcElementDivide: + FcParseExpr (parse, FcOpDivide); + break; + case FcElementNot: + FcParseExpr (parse, FcOpNot); + break; + case FcElementIf: + FcParseExpr (parse, FcOpQuest); + break; + case FcElementUnknown: + break; + } + (void) FcPStackPop (parse); +} + +static void +FcCharacterData (void *userData, const XML_Char *s, int len) +{ + FcConfigParse *parse = userData; + + if (!parse->pstack) + return; + if (!FcStrBufData (&parse->pstack->str, (FcChar8 *) s, len)) + FcConfigMessage (parse, FcSevereError, "out of memory"); +} + +static void +FcStartDoctypeDecl (void *userData, + const XML_Char *doctypeName, + const XML_Char *sysid, + const XML_Char *pubid, + int has_internal_subset) +{ + FcConfigParse *parse = userData; + + if (strcmp ((char *) doctypeName, "fontconfig") != 0) + FcConfigMessage (parse, FcSevereError, "invalid doctype \"%s\"", doctypeName); +} + +static void +FcEndDoctypeDecl (void *userData) +{ +} + +FcBool +FcConfigParseAndLoad (FcConfig *config, + const FcChar8 *name, + FcBool complain) +{ + + XML_Parser p; + FcChar8 *filename; + FILE *f; + int len; + void *buf; + FcConfigParse parse; + FcBool error = FcTrue; + + filename = FcConfigFilename (name); + if (!filename) + goto bail0; + + if (!FcStrSetAdd (config->configFiles, filename)) + { + FcStrFree (filename); + goto bail0; + } + + f = fopen ((char *) filename, "r"); + FcStrFree (filename); + if (!f) + goto bail0; + + p = XML_ParserCreate ("UTF-8"); + if (!p) + goto bail1; + + if (!FcConfigInit (&parse, name, config, p)) + goto bail2; + + XML_SetUserData (p, &parse); + + XML_SetDoctypeDeclHandler (p, FcStartDoctypeDecl, FcEndDoctypeDecl); + XML_SetElementHandler (p, FcStartElement, FcEndElement); + XML_SetCharacterDataHandler (p, FcCharacterData); + + do { + buf = XML_GetBuffer (p, BUFSIZ); + if (!buf) + { + FcConfigMessage (&parse, FcSevereError, "cannot get parse buffer"); + goto bail3; + } + len = fread (buf, 1, BUFSIZ, f); + if (len < 0) + { + FcConfigMessage (&parse, FcSevereError, "failed reading config file"); + goto bail3; + } + if (!XML_ParseBuffer (p, len, len == 0)) + { + FcConfigMessage (&parse, FcSevereError, "%s", + XML_ErrorString (XML_GetErrorCode (p))); + goto bail3; + } + } while (len != 0); + error = parse.error; +bail3: + FcConfigCleanup (&parse); +bail2: + XML_ParserFree (p); +bail1: + fclose (f); +bail0: + if (error && complain) + { + if (name) + FcConfigMessage (0, FcSevereError, "Cannot load config file \"%s\"", name); + else + FcConfigMessage (0, FcSevereError, "Cannot load default config file"); + return FcFalse; + } + return FcTrue; +} Index: xc/lib/fontconfig/src/fontconfig-def.cpp diff -u /dev/null xc/lib/fontconfig/src/fontconfig-def.cpp:1.1 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fontconfig-def.cpp Wed Apr 10 07:28:10 2002 @@ -0,0 +1,170 @@ +LIBRARY fontconfig +VERSION LIBRARY_VERSION +EXPORTS +FcAtomicCreate +FcAtomicDeleteNew +FcAtomicDestroy +FcAtomicLock +FcAtomicNewFile +FcAtomicOrigFile +FcAtomicReplaceOrig +FcAtomicUnlock +FcAvlDelete +FcAvlInsert +FcBlanksAdd +FcBlanksCreate +FcBlanksDestroy +FcBlanksIsMember +FcFileCacheCreate +FcFileCacheDestroy +FcFileCacheFind +FcFileCacheLoad +FcFileCacheReadDir +FcFileCacheSave +FcFileCacheUpdate +FcFileCacheWriteDir +FcConfigAddBlank +FcConfigAddConfigFile +FcConfigAddDir +FcConfigAddEdit +FcConfigAppFontAddDir +FcConfigAppFontAddFile +FcConfigAppFontClear +FcConfigBuildFonts +FcConfigCompareValue +FcConfigCreate +FcConfigDestroy +FcConfigFilename +FcConfigGetBlanks +FcConfigGetCache +FcConfigGetConfigFiles +FcConfigGetCurrent +FcConfigGetDirs +FcConfigGetFonts +FcConfigSetCache +FcConfigSetCurrent +FcConfigSetFonts +FcConfigSubstitute +FcCharSetAddChar +FcCharSetCopy +FcCharSetCount +FcCharSetCoverage +FcCharSetCreate +FcCharSetDestroy +FcCharSetEqual +FcCharSetHasChar +FcCharSetIntersect +FcCharSetIntersectCount +FcCharSetNew +FcCharSetSubtract +FcCharSetSubtractCount +FcCharSetUnion +FcFreeTypeCharIndex +FcFreeTypeCharSet +FcNameParseCharSet +FcNameUnparseCharSet +FcDebug +FcEditPrint +FcExprPrint +FcFontSetPrint +FcOpPrint +FcPatternPrint +FcSubstPrint +FcTestPrint +FcValueListPrint +FcValuePrint +FcDefaultSubstitute +FcDirSave +FcDirScan +FcFileScan +FcFreeTypeQuery +FcFontSetAdd +FcFontSetCreate +FcFontSetDestroy +FcInit +FcInitConfig +FcInitFonts +FcMemAlloc +FcMemFree +FcMemReport +FcFontList +FcFontSetList +FcObjectSetAdd +FcObjectSetBuild +FcObjectSetCreate +FcObjectSetDestroy +FcObjectSetVaBuild +FcFontMatch +FcFontRenderPrepare +FcFontSetMatch +FcFontSetSort +FcMatrixCopy +FcMatrixEqual +FcMatrixFree +FcMatrixMultiply +FcMatrixRotate +FcMatrixScale +FcMatrixShear +FcNameBool +FcNameConstant +FcNameGetConstant +FcNameGetObjectType +FcNameParse +FcNameRegisterConstants +FcNameRegisterObjectTypes +FcNameUnparse +FcNameUnregisterConstants +FcNameUnregisterObjectTypes +FcPatternAdd +FcPatternAddBool +FcPatternAddCharSet +FcPatternAddDouble +FcPatternAddInteger +FcPatternAddMatrix +FcPatternAddString +FcPatternBuild +FcPatternCreate +FcPatternDel +FcPatternDestroy +FcPatternDuplicate +FcPatternFind +FcPatternGet +FcPatternGetBool +FcPatternGetCharSet +FcPatternGetDouble +FcPatternGetInteger +FcPatternGetMatrix +FcPatternGetString +FcPatternVaBuild +FcValueDestroy +FcValueListDestroy +FcValueSave +FcStrBufChar +FcStrBufData +FcStrBufDestroy +FcStrBufDone +FcStrBufInit +FcStrBufString +FcStrCmpIgnoreCase +FcStrCopy +FcStrFree +FcStrPlus +FcUtf8Len +FcUtf8ToUcs4 +FcConfigParseAndLoad +FcConfigSaveField +FcEditCreate +FcEditDestroy +FcExprCreateBool +FcExprCreateConst +FcExprCreateDouble +FcExprCreateField +FcExprCreateInteger +FcExprCreateMatrix +FcExprCreateNil +FcExprCreateOp +FcExprCreateString +FcExprDestroy +FcTestCreate +FcTestDestroy +/* $XFree86: xc/lib/fontconfig/src/fontconfig-def.cpp,v 1.1 2002/04/10 11:28:10 alanh Exp $ */ Index: xc/lib/fontconfig/src/fontconfig.man diff -u /dev/null xc/lib/fontconfig/src/fontconfig.man:1.8 --- /dev/null Thu Feb 27 12:28:09 2003 +++ xc/lib/fontconfig/src/fontconfig.man Sun Feb 16 12:44:36 2003 @@ -0,0 +1,1472 @@ +.\" +.\" $XFree86: xc/lib/fontconfig/src/fontconfig.man,v 1.8 2003/02/16 17:44:36 herrb Exp $ +.\" +.\" Copyright © 2002 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. +.\" +.de TQ +.br +.ns +.TP +\\$1 +.. +.TH FONTCONFIG 3 "Version 1.0" "XFree86" + +.SH NAME +fontconfig \- Font configuration and customization library + +.SH SYNOPSIS +.nf +.B #include <fontconfig/fontconfig.h> +.B #include <fontconfig/fcfreetype.h> +.fi +.SH DESCRIPTION +.B Fontconfig +is a library designed to provide system-wide font configuration, +customization and application access. + +.SH FUNCTIONAL OVERVIEW +Fontconfig contains two essential modules, the configuration module which +builds an internal configuration from XML files and the matching module +which accepts font patterns and returns the nearest matching font. + +.SS FONT CONFIGURATION +The configuration module consists of the FcConfig datatype, libexpat and +FcConfigParse which walks over an XML tree and ammends a configuration with +data found within. From an external perspective, configuration of the +library consists of generating a valid XML tree and feeding that to +FcConfigParse. The only other mechanism provided to applications for +changing the running configuration is to add fonts and directories to the +list of application-provided font files. +.P +The intent is to make font configurations relatively static, and shared by +as many applications as possible. It is hoped that this will lead to more +stable font selection when passing names from one application to another. +XML was chosen as a configuration file format because it provides a format +which is easy for external agents to edit while retaining the correct +structure and syntax. +.P +Font configuration is separate from font matching; applications needing to +do their own matching can access the available fonts from the library and +perform private matching. The intent is to permit applications to pick and +choose appropriate functionality from the library instead of forcing them to +choose between this library and a private configuration mechanism. The hope +is that this will ensure that configuration of fonts for all applications +can be centralized in one place. Centralizing font configuration will make +simplify and regularize font installation and customization. + +.SS FONT PROPERTIES +While font patterns may contain essentially any properties, there are some +well known properties with associated types. Fontconfig uses some of these +properties for font matching and font completion. Others are provided as a +convenience for the applications rendering mechanism. +.sp +.nf +.ta 1i 2.75i 3.5i 5.5i +.lc \(em +Property CPP symbol Type Description + +family FC_FAMILY String Font family name +style FC_STYLE String Font style. Overrides weight and slant +slant FC_SLANT Int Italic, oblique or roman +weight FC_WEIGHT Int Light, medium, demibold, bold or black +size FC_SIZE Double Point size +aspect FC_ASPECT Double Stretches glyphs horizontally before hinting +pixelsize FC_PIXEL_SIZE Double Pixel size +spacing FC_SPACING Int Proportional, monospace or charcell +foundry FC_FOUNDRY String Font foundry name +antialias FC_ANTIALIAS Bool Whether glyphs can be antialiased +hinting FC_HINTING Bool Whether the rasterizer should use hinting +verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout +autohint FC_AUTOHINT Bool Use autohinter instead of normal hinter +globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data +file FC_FILE String The filename holding the font +index FC_INDEX Int The index of the font within the file +ftface FC_FT_FACE FT_Face Use the specified FreeType face object +rasterizer FC_RASTERIZER String Which rasterizer is in use +outline FC_OUTLINE Bool Whether the glyphs are outlines +scalable FC_SCALABLE Bool Whether glyphs can be scaled +scale FC_SCALE Double Scale factor for point->pixel conversions +dpi FC_DPI Double Target dots per inch +rgba FC_RGBA Int unknown, rgb, bgr, vrgb, vbgr, none - subpixel geometry +minspace FC_MINSPACE Bool Eliminate leading from line spacing +charset FC_CHARSET CharSet Unicode chars encoded by the font +lang FC_LANG String List of RFC-3066-style languages this font supports +.DT +.fi + +.SS FONT MATCHING +Fontconfig performs matching by measuring the distance from a provided +pattern to all of the available fonts in the system. The closest matching +font is selected. This ensures that a font will always be returned, but +doesn't ensure that it is anything like the requested pattern. +.P +Font matching starts with an application constructed pattern. The desired +attributes of the resulting font are collected together in an FcPattern +object. Each property of the pattern can contain one or more values; these +are listed in priority order; matches earlier in the list are considered +"closer" than matches later in the list. +.P +The initial pattern is modified by applying the list of editing instructions +specific to patterns found in the configuration; each consists of a match +predicate and a set of editing operations. They are executed in the order +they appeared in the configuration. Each match causes the associated +sequence of editing operations to be applied. +.P +After the pattern has been edited, a sequence of default substitutions are +performed to canonicalize the set of available properties; this avoids the +need for the lower layers to constantly provide default values for various +font properties during rendering. +.P +The canonical font pattern is finally matched against all available fonts. +The distance from the pattern to the font is measured for each of several +properties: foundry, charset, family, lang, spacing, pixelsize, style, +slant, weight, antialias, rasterizer and outline. This list is in priority +order -- results of comparing earlier elements of this list weigh more +heavily than later elements. +.P +There is one special case to this rule; family names are split into two +bindings; strong and weak. Strong family names are given greater precedence +in the match than lang elements while weak family names are given lower +precedence than lang elements. This permits the document language to drive +font selection when any document specified font is unavailable. +.P +The pattern representing that font is augmented to include any properties +found in the pattern but not found in the font itself; this permits the +application to pass rendering instructions or any other data through the +matching system. Finally, the list of editing instructions specific to +fonts found in the configuration are applied to the pattern. This modified +pattern is returned to the application. +.P +The return value contains sufficient information to locate and rasterize the +font, including the file name, pixel size and other rendering data. As +none of the information involved pertains to the FreeType library, +applications are free to use any rasterization engine or even to take +the identified font file and access it directly. +.P +The match/edit sequences in the configuration are performed in two passes +because there are essentially two different operations necessary -- the +first is to modify how fonts are selected; aliasing families and adding +suitable defaults. The second is to modify how the selected fonts are +rasterized. Those must apply to the selected font, not the original pattern +as false matches will often occur. +.SS FONT LIST MATCHING +.P +While many applications want to locate a single font best matching their +search criteria, other applications need to build a set of fonts which can +be used to present any Unicode data. Fontconfig provides an API to generate +a list sorted by the nearness of each font to the pattern. Every font in +the system is considered, the best matching fonts are placed first. The +application then can select whether the remaining fonts are unconditionally +included in the list, or whether they are included only if they cover +portions of Unicode not covered by any of the preceeding fonts. +.P +The list resulting from this match is represented by references to the +original font patterns and so consumes very little memory. Using a list +entry involves creating a pattern which combines the information from the +font with the information from the original pattern and executing the font +substitutions. +.SS FONT NAMES +Fontconfig provides a textual representation for patterns that the library +can both accept and generate. The representation is in three parts, first a +list of family names, second a list of point sizes and finally a list of +additional properties: +.nf + <families>-<point sizes>:<name1>=<values1>:<name2>=<values2>... +.fi +Values in a list are separated with commas. The name needn't include either +families or point sizes; they can be elided. In addition, there are +symbolic constants that simultaneously indicate both a name and a value. +Here are some examples: +.sp +.nf +.ta 1i 3i + Times-12 12 point Times Roman + Times-12:bold 12 point Times Bold + Courier:italic Courier Italic in the default size + Monospace:matrix=1 .1 0 1 The users preferred monospace font + with artificial obliquing +.fi +.DT + +.SH LANG TAGS +.P +Each font in the database contains a list of languages it supports. This is +computed by comparing the Unicode coverage of the font with the orthography +of each language. Languages are tagged using an RFC-3066 compatible naming +and occur in two parts -- the ISO639 language tag followed a hyphen and then +by the ISO 3166 country code. The hyphen and country code may be elided. + +.P +Fontconfig has orthographies for several languages built into the library. +No provision has been made for adding new ones aside from rebuilding the +library. It currently supports 122 of the 139 languages named in ISO 639-1, +141 of the languages with two-letter codes from ISO 639-2 and another 30 +languages with only three-letter codes. + +.SH DATATYPES + +.TP +.B FcChar8 +.TQ +.B FcChar16 +.TQ +.B FcChar32 +.TQ +.B FcBool +These are primitive datatypes; the FcChar* types hold precisely the number +of bits stated (if supported by the C implementation). FcBool holds +one of two CPP symbols: FcFalse or FcTrue. + +.TP +.B FcMatrix +An FcMatrix holds an affine transformation, usually used to reshape glyphs. +A small set of matrix operations are provided to manipulate these. +.sp +.nf + typedef struct _FcMatrix { + double xx, xy, yx, yy; + } FcMatrix; +.fi + +.TP +.B FcCharSet +An FcCharSet is an abstract type that holds the set of encoded unicode chars +in a font. Operations to build and compare these sets are provided. + +.TP +.B FcType +Tags the kind of data stored in an FcValue. + +.TP +.B FcValue +An FcValue object holds a single value with one of a number of different +types. The 'type' tag indicates which member is valid. +.sp +.nf + typedef struct _FcValue { + FcType type; + union { + const FcChar8 *s; + int i; + FcBool b; + double d; + const FcMatrix *m; + const FcCharSet *c; + } u; + } FcValue; +.fi +.P +.ta 1i 2i 3i 4i +.nf +.lc \(em + type Union member Datatype +  + FcTypeVoid (none) (none) + FcTypeInteger i int + FcTypeDouble d double + FcTypeString s char * + FcTypeBool b b + FcTypeMatrix m FcMatrix * + FcTypeCharSet c FcCharSet * +.fi +.DT +.TP +.B FcPattern +holds a set of names with associated value lists; each name refers to a +property of a font. FcPatterns are used as inputs to the matching code as +well as holding information about specific fonts. Each property can hold +one or more values; conventionally all of the same type, although the +interface doesn't demand that. + +.TP +.B FcFontSet +.sp +.nf + typedef struct _FcFontSet { + int nfont; + int sfont; + FcPattern **fonts; + } FcFontSet; +.fi +An FcFontSet contains a list of FcPatterns. Internally fontconfig uses this +data structure to hold sets of fonts. Externally, fontconfig returns the +results of listing fonts in this format. 'nfont' holds the number of +patterns in the 'fonts' array; 'sfont' is used to indicate the size of that +array. + +.TP +.B FcStrSet +.B FcStrList +FcStrSet holds a list of strings that can be appended to and enumerated. +Its unique characteristic is that the enumeration works even while strings +are appended during enumeration. FcStrList is used during enumeration to +safely and correctly walk the list of strings even while that list is edited +in the middle of enumeration. + +.TP +.B FcObjectSet +.sp +.nf + typedef struct _FcObjectSet { + int nobject; + int sobject; + const char **objects; + } FcObjectSet; +.fi +.sp +holds a set of names and is used to specify which fields from fonts are +placed in the the list of returned patterns when listing fonts. + +.TP +.B FcObjectType +.sp + typedef struct _FcObjectType { + const char *object; + FcType type; + } FcObjectType; +.fi +marks the type of a pattern element generated when parsing font names. +Applications can add new object types so that font names may contain the new +elements. + +.TP +.B FcConstant +.sp + typedef struct _FcConstant { + const FcChar8 *name; + const char *object; + int value; + } FcConstant; +.fi +Provides for symbolic constants for new pattern elements. When 'name' is +seen in a font name, an 'object' element is created with value 'value'. + +.TP +.B FcBlanks +holds a list of Unicode chars which are expected to be blank; unexpectedly +blank chars are assumed to be invalid and are elided from the charset +associated with the font. + +.TP +.B FcFileCache +holds the per-user cache information for use while loading the font +database. This is built automatically for the current configuration when +that is loaded. Applications must always pass '0' when one is requested. + +.TP +.B FcConfig +holds a complete configuration of the library; there is one default +configuration, other can be constructed from XML data structures. All +public entry points that need global data can take an optional FcConfig* +argument; passing 0 uses the default configuration. FcConfig objects hold two +sets of fonts, the first contains those specified by the configuration, the +second set holds those added by the application at run-time. Interfaces +that need to reference a particulat set use one of the FcSetName enumerated +values. + +.TP +.B FcSetName +Specifies one of the two sets of fonts available in a configuration; +FcSetSystem for those fonts specified in the configuration and +FcSetApplication which holds fonts provided by the application. + +.TP +.B FcResult +Used as a return type for functions manipulating FcPattern objects. +.P +.ta 1i 3i 4i +.lc \(em + Result code Meaning +.br +  +.br + FcResultMatch Object exists with the specified ID +.br + FcResultNoMatch Object doesn't exist at all +.br + FcResultTypeMismatch Object exists, but the type doesn't match +.br + FcResultNoId Object exists, but has fewer values than specified +.br +.DT + +.TP +.B FcAtomic +Used for locking access to config files. Provides a safe way to update +configuration files. + +.SH FUNCTIONS + +.SS FcMatrix +FcMatrix structures hold an affine transformation in matrix form. +.TP +#define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, (m)->xy = (m)->yx = 0) +Initializes a matrix to the identify transformation. + +.TP +FcMatrix *FcMatrixCopy (const FcMatrix *mat) +Allocates a new FcMatrix and copies 'mat' into it. + +.TP +FcBool FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2) +Returns FcTrue if 'mat1' and 'mat2' are equal, else FcFalse. + +.TP +void FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b) +Multiplies 'a' and 'b' together, placing the result in 'result'. 'result' +may refer to the sam matrix as either 'a' or 'b'. + +.TP +void FcMatrixRotate (FcMatrix *m, double c, double s) +If 'c' is cos(angle) and 's' is sin(angle), FcMatrixRotate rotates the +matrix by 'angle'. + +.TP +void FcMatrixScale (FcMatrix *m, double sx, double sy) +Scales 'm' by 'sx' in the horizontal dimension and 'sy' in the +vertical dimension. + +.TP +void FcMatrixShear (FcMatrix *m, double sh, double sv) +Shears 'm' by 'sh' in the horizontal direction and 'sv' in the +vertical direction. + +.SS FcCharSet +An FcCharSet is a boolean array indicating a set of unicode chars. Those +associated with a font are marked constant and cannot be edited. +FcCharSets may be reference counted internally to reduce memory consumption; +this may be visible to applications as the result of FcCharSetCopy may +return it's argument, and that CharSet may remain unmodifiable. + +.TP +FcCharSet *FcCharSetCreate (void) +Creates an empty FcCharSet object. + +.TP +void FcCharSetDestroy (FcCharSet *fcs) +Frees an FcCharSet object. + +.TP +FcBool FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4) +Adds a single unicode char to the set, returning FcFalse on +failure, either as a result of a constant set or from running out of memory. + +.TP +FcCharSet *FcCharSetCopy (FcCharSet *src) +Makes a copy of 'src'; note that this may not actually do anything more than +increment the reference count on 'src'. + +.TP +FcBool FcCharSetEqual (const FcCharSet *a, const FcCharSet *b) +Returns whether 'a' and 'b' contain the same set of unicode chars. + +.TP +FcCharSet *FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b) +Returns a set including only those chars found in both 'a' and 'b'. + +.TP +FcCharSet *FcCharSetUnion (const FcCharSet *a, const FcCharSet *b); +Returns a set including only those chars found in either 'a' or 'b'. + +.TP +FcCharSet *FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b) +Returns a set including only those chars found in 'a' but not 'b'. + +.TP +FcBool FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4) +Returns whether 'fcs' contains the char 'ucs4'. + +.TP +FcChar32 FcCharSetCount (const FcCharSet *a) +Returns the total number of unicode chars in 'a'. + +.TP +FcChar32 FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b) +Returns the number of chars that are in both 'a' and 'b'. + +.TP +FcChar32 FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b) +Returns the number of chars that are in 'a' but not in 'b'. + +.TP +FcBool FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b) +Returns whether 'a' is a subset of 'b'. + +.TP +FcChar32 FcCharSetFirstPage (const FcCharSet *a, FcChar32 [FC_CHARSET_MAP_SIZE], FcChar32 *next) +Builds an array of bits marking the first page of Unicode coverage of 'a'. +Returns the base of the array. 'next' contains the next page in the font. + +.TP +FcChar32 FcCharSetNextPage (const FcCharSet *a, FcChar32 [FC_CHARSET_MAP_SIZE], FcChar32 *next) +Builds an array of bits marking the Unicode coverage of 'a' for page '*next'. +Returns the base of the array. 'next' contains the next page in the font. + +.SS FcValue +FcValue is a structure containing a type tag and a union of all possible +datatypes. The tag is an enum of type +.B FcType +and is intended to provide a measure of run-time +typechecking, although that depends on careful programming. + +.TP +void FcValueDestroy (FcValue v) +Frees any memory referenced by `v'. Values of type FcTypeString, +FcTypeMatrix and FcTypeCharSet reference memory, the other types do not. + +.TP +FcValue FcValueSave (FcValue v) +Returns a copy of `v' duplicating any object referenced by it so that `v' +may be safely destroyed without harming the new value. + +.SS FcPattern +An FcPattern is an opaque type that holds both patterns to match against the +available fonts, as well as the information about each font. + +.TP +FcPattern *FcPatternCreate (void) +Creates a pattern with no properties; used to build patterns from scratch. + +.TP +void FcPatternDestroy (FcPattern *p) +Destroys a pattern, in the process destroying all related values. + +.TP +FcBool FcPatternEqual (const FcPattern *pa, const FcPattern *pb); +Returns whether 'pa' and 'pb' are exactly alike. + +.TP +FcBool FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os) +Returns whether 'pa' and 'pb' have exactly the same values for all of the +objects in 'os'. + +.TP +FcChar32 FcPatternHash (const FcPattern *p) +Returns a 32-bit number which is the same for any two patterns which are +exactly alike. + +.TP +FcBool FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append) +Adds a single value to the list of values associated with the property named +`object'. If `append' is FcTrue, the value is added at the end of any +existing list, otherwise it is inserted at the begining. `value' is saved +(with FcValueSave) when inserted into the pattern so that the library +retains no reference to any application-supplied data structure. + +.TP +FcBool FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append) +FcPatternAddWeak is essentially the same as FcPatternAdd except that any +values added to the list have binding 'weak' instead of 'strong'. + +.TP +FcBool FcPatternAddInteger (FcPattern *p, const char *object, int i) +.TQ +FcBool FcPatternAddDouble (FcPattern *p, const char *object, double d) +.TQ +FcBool FcPatternAddString (FcPattern *p, const char *object, const char *s) +.TQ +FcBool FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s) +.TQ +FcBool FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c) +.TQ +FcBool FcPatternAddBool (FcPattern *p, const char *object, FcBool b) +These are all convenience functions that insert objects of the specified +type into the pattern. Use these in preference to FcPatternAdd as they +will provide compile-time typechecking. These all append values to +any existing list of values. + +.TP +FcResult FcPatternGet (FcPattern *p, const char *object, int id, FcValue *v) +Returns in `v' the `id'th value associated with the property `object'. +The value returned is not a copy, but rather refers to the data stored +within the pattern directly. Applications must not free this value. + +.TP +FcResult FcPatternGetInteger (FcPattern *p, const char *object, int n, int *i); +.TQ +FcResult FcPatternGetDouble (FcPattern *p, const char *object, int n, double *d); +.TQ +FcResult FcPatternGetString (FcPattern *p, const char *object, int n, char **const s); +.TQ +FcResult FcPatternGetMatrix (FcPattern *p, const char *object, int n, FcMatrix **s); +.TQ +FcResult FcPatternGetCharSet (FcPattern *p, const char *object, int n, FcCharSet **c); +.TQ +FcResult FcPatternGetBool (FcPattern *p, const char *object, int n, FcBool *b); +These are convenience functions that call FcPatternGet and verify that the +returned data is of the expected type. They return FcResultTypeMismatch if +this is not the case. Note that these (like FcPatternGet) do not make a +copy of any data structure referenced by the return value. Use these +in preference to FcPatternGet to provide compile-time typechecking. + +.TP +FcPattern *FcPatternBuild (FcPattern *orig, ...); +.TQ +FcPattern *FcPatternVaBuild (FcPattern *orig, va_list va) +Builds a pattern using a list of objects, types and values. Each +value to be entered in the pattern is specified with three arguments: +.IP +1. Object name, a string describing the property to be added. +.IP +2. Object type, one of the FcType enumerated values +.IP +3. Value, not an FcValue, but the raw type as passed to any of the +FcPatternAdd<type> functions. Must match the type of the second argument. +.IP +The argument list is terminated by a null object name, no object type nor +value need be passed for this. The values are added to `pattern', if +`pattern' is null, a new pattern is created. In either case, the pattern is +returned. Example: +.RS +.IP +pattern = FcPatternBuild (0, FC_FAMILY, FtTypeString, "Times", (char *) 0); +.RE +.IP +FcPatternVaBuild is used when the arguments are already in the form of a +varargs value. + +.TP +FcBool FcPatternDel (FcPattern *p, const char *object) +Deletes all values associated with the property `object', returning +whether the property existed or not. + +.TP +void FcPatternPrint (const FcPattern *p) +Prints an easily readable version of the pattern to stdout. There is +no provision for reparsing data in this format, it's just for diagnostics +and debugging. + +.TP +void FcDefaultSubstitute (FcPattern *pattern) +Supplies default values for underspecified font patterns: +.RS +.IP \(bu +Patterns without a specified style or weight are set to Medium +.IP \(bu +Patterns without a specified style or slant are set to Roman +.IP \(bu +Patterns without a specified pixel size are given one computed from +any specified point size (default 12), dpi (default 75) and scale (default +1). +.RE + +.TP +FcPattern *FcNameParse (const char *name) +Converts 'name' from the standard text format described above into a pattern. + +.TP +FcChar8 *FcNameUnparse (FcPattern *pat) +Converts the given pattern into the standard text format described above. +The return value is not static, but instead refers to newly allocated memory +which should be freed by the caller. + +.SS FcFontSet +An FcFontSet simply holds a list of patterns; these are used to return the +results of listing available fonts. +.TP +FcFontSet *FcFontSetCreate (void) +Creates an empty font set. + +.TP +void FcFontSetDestroy (FcFontSet *s); +Destroys a font set. Note that this destroys any referenced patterns as +well. + +.TP +FcBool FcFontSetAdd (FcFontSet *s, FcPattern *font) +Adds a pattern to a font set. Note that the pattern is not copied before +being inserted into the set. + +.SS FcObjectSet +An FcObjectSet holds a list of pattern property names; it is used to +indiciate which properties are to be returned in the patterns from +FcFontList. + +.TP +FcObjectSet *FcObjectSetCreate (void) +Creates an empty set. + +.TP +FcBool FcObjectSetAdd (FcObjectSet *os, const char *object) +Adds a proprety name to the set. + +.TP +void FcObjectSetDestroy (FcObjectSet *os) +Destroys an object set. + + +.TP +FcObjectSet *FcObjectSetBuild (const char *first, ...) +.TQ +FcObjectSet *FcObjectSetVaBuild (const char *first, va_list va) +These build an object set from a null-terminated list of property names. + +.SS FcObjectType +Provides for applcation-specified font name object types so that new +pattern elements can be generated from font names. + +.TP +FcBool FcNameRegisterObjectTypes (const FcObjectType *types, int ntype) +Register 'ntype' new object types. + +.TP +FcBool FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype) +Unregister 'ntype' object types. + +.TP +const FcObjectType *FcNameGetObjectType (const char *object) +Return the object type for the pattern element named 'object'. + +.SS FcConstant +Provides for application-specified symbolic constants for font names. + +.TP +FcBool FcNameRegisterConstants (const FcConstant *consts, int nconsts) +Register 'nconsts' new symbolic constants. + +.TP +FcBool FcNameUnregisterConstants (const FcConstant *consts, int nconsts) +Unregister 'nconsts' symbolic constants. + +.TP +const FcConstant *FcNameGetConstant (FcChar8 *string) +Return the FcConstant structure related to symbolic constant 'string'. + +.TP +FcBool FcNameConstant (FcChar8 *string, int *result); +Returns whether a symbolic constant with name 'string' is registered, +placing the value of the constant in 'result' if present. + +.SS FcBlanks +An FcBlanks object holds a list of Unicode chars which are expected to +be blank when drawn. When scanning new fonts, any glyphs which are +empty and not in this list will be assumed to be broken and not placed in +the FcCharSet associated with the font. This provides a significantly more +accurate CharSet for applications. + +.TP +FcBlanks *FcBlanksCreate (void) +Creates an empty FcBlanks object. + +.TP +void FcBlanksDestroy (FcBlanks *b) +Destroys an FcBlanks object, freeing any associated memory. + +.TP +FcBool FcBlanksAdd (FcBlanks *b, FcChar32 ucs4) +Adds a single character to an FcBlanks object, returning FcFalse +if this process ran out of memory. + +.TP +FcBool FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4) +Returns whether the specified FcBlanks object contains the indicated Unicode +value. + +.SS FcConfig +An FcConfig object holds the internal representation of a configuration. +There is a default configuration which applications may use by passing 0 to +any function using the data within an FcConfig. + +.TP +FcConfig *FcConfigCreate (void) +Creates an empty configuration. + +.TP +void FcConfigDestroy (FcConfig *config) +Destroys a configuration and any data associated with it. Note that calling +this function with the return from FcConfigGetCurrent will place the library +in an indeterminate state. + +.TP +FcBool FcConfigSetCurrent (FcConfig *config) +Sets the current default configuration to 'config'. Implicitly calls +FcConfigBuildFonts if necessary, returning FcFalse if that call fails. + +.TP +FcConfig *FcConfigGetCurrent (void) +Returns the current default configuration. + +.TP +FcBool FcConfigUptoDate (FcConfig *config) +Checks all of the files related to 'config' and returns whether the +in-memory version is in sync with the disk version. + +.TP +FcBool FcConfigBuildFonts (FcConfig *config) +Builds the set of available fonts for the given configuration. Note that +any changes to the configuration after this call have indeterminate effects. +Returns FcFalse if this operation runs out of memory. + +.TP +FcStrList *FcConfigGetConfigDirs (FcConfig *config) +Returns the list of font directories specified in the configuration files +for 'config'. Does not include any subdirectories. + +.TP +FcStrList *FcConfigGetFontDirs (FcConfig *config) +Returns the list of font directories in 'config'. This includes the +configured font directories along with any directories below those in the +filesystem. + +.TP +FcStrList *FcConfigGetConfigFiles (FcConfig *config) +Returns the list of known configuration files used to generate 'config'. +Note that this will not include any configuration done with FcConfigParse. + +.TP +char *FcConfigGetCache (FcConfig *config) +Returns the name of the file used to store per-user font information. + +.TP +FcFontSet *FcConfigGetFonts (FcConfig *config, FcSetName set) +Returns one of the two sets of fonts from the configuration as specified +by 'set'. + +.TP +FcBlanks *FcConfigGetBlanks (FcConfig *config) +Returns the FcBlanks object associated with the given configuration, if no +blanks were present in the configuration, this function will return 0. + +.TP +int FcConfigGetRescanInverval (FcConfig *config) +Returns the interval between automatic checks of the configuration (in +seconds) specified in 'config'. The configuration is checked during +a call to FcFontList when this interval has passed since the last check. + +.TP +FcBool FcConfigSetRescanInverval (FcConfig *config, int rescanInterval) +Sets the rescan interval; returns FcFalse if an error occurred. + +.TP +FcBool FcConfigAppFontAddFile (FcConfig *config, const char *file) +Adds an application-specific font to the configuration. + +.TP +FcBool FcConfigAppFontAddDir (FcConfig *config, const char *dir) +Scans the specified directory for fonts, adding each one found to the +application-specific set of fonts. + +.TP +void FcConfigAppFontClear (FcConfig *config) +Clears the set of application-specific fonts. + +.TP +FcBool FcConfigSubstituteWithPat (FcConfig *config, FcPattern *p, FcPattern *p_pat FcMatchKind kind) +Performs the sequence of pattern modification operations, if 'kind' is +FcMatchPattern, then those tagged as pattern operations are applied, else +if 'kind' is FcMatchFont, those tagged as font operations are applied and +p_pat is used for <test> elements with target=pattern. + +.TP +FcBool FcConfigSubstitute (FcConfig *config, FcPattern *p, FcMatchKind kind) +Calls FcConfigSubstituteWithPat setting p_pat to NULL. + +.TP +FcPattern *FcFontMatch (FcConfig *config, FcPattern *p, FcResult *result) +Returns the font in 'config' most close matching 'p'. This function +should be called only after FcConfigSubstitute and FcDefaultSubstitute have +been called for 'p'; otherwise the results will not be correct. + +.TP +FcFontSet *FcFontSort (FcConfig *config, FcPattern *p, FcBool trim, FcCharSet **csp, FcResult *result) Returns the list of fonts sorted by +closeness to 'p'. If 'trim' is FcTrue, elements in the list which don't +include Unicode coverage not provided by earlier elements in the list are +elided. The union of Unicode coverage of all of the fonts is returned +in 'csp', if 'csp' is not NULL. This function should be called only after +FcConfigSubstitute and FcDefaultSubstitute have been called for 'p'; +otherwise the results will not be correct. +.P +The returned FcFontSet references FcPattern structures which may be shared +by the return value from multiple FcFontSort calls, applications must not +modify these patterns. Instead, they should be passed, along with 'p' to +FcFontRenderPrepare which combines them into a complete pattern. +.P +The FcFontSet returned by FcFontSort is destroyed by caling FcFontSetDestroy. + +.TP +FcPattern *FcFontRenderPrepare (FcConfig *config, FcPattern *pat, FcPattern *font) +Creates a new pattern consisting of elements of 'font' not appearing +in 'pat', elements of 'pat' not appearing in 'font' and the best matching +value from 'pat' for elements appearing in both. The result is passed to +FcConfigSubstitute with 'kind' FcMatchFont and then returned. + +.TP +FcFontSet *FcFontList (FcConfig *config, FcPattern *p, FcObjectSet *os) +Selects fonts matching 'p', creates patterns from those fonts containing +only the objects in 'os' and returns the set of unique such patterns. + +.TP +char *FcConfigFilename (const char *name) +Given the specified external entity name, return the associated filename. +This provides applications a way to convert various configuration file +references into filename form. +.P +A null or empty 'name' indicates that the default configuration file should +be used; which file this references can be overridden with the +FC_CONFIG_FILE environment variable. Next, if the name starts with '~', it +refers to a file in the current users home directory. Otherwise if the name +doesn't start with '/', it refers to a file in the default configuration +directory; the built-in default directory can be overridden with the +FC_CONFIG_DIR environment variable. + +.SS Initialization +These functions provide some control over how the library is initialized. + +.TP +FcConfig *FcInitLoadConfig (void) +Loads the default configuration file and returns the resulting configuration. +Does not load any font information. + +.TP +FcConfig *FcInitLoadConfigAndFonts (void) +Loads the default configuration file and builds information about the +available fonts. Returns the resulting configuration. + +.TP +FcBool FcInit (void) +Loads the default configuration file and the fonts referenced therein and +sets the default configuration to that result. Returns whether this +process succeeded or not. If the default configuration has already +been loaded, this routine does nothing and returns FcTrue. + +.TP +int FcGetVersion (void) +Returns the version number of the library. + +.TP +FcBool FcInitReinitialize (void) +Forces the default configuration file to be reloaded and resets the default +configuration. + +.TP +FcBool FcInitBringUptoDate (void) +Checks the rescan interval in the default configuration, checking the +configuration if the interval has passed and reloading the configuration if +when any changes are detected. + +.SS FcAtomic +These functions provide a safe way to update config files, allowing ongoing +reading of the old config file while locked for writing and ensuring that a +consistent and complete version of the config file is always available. + +.TP +FcAtomic * FcAtomicCreate (const FcChar8 *file) +Creates a data structure containing data needed to control access to 'file'. +Writing is done to a separate file. Once that file is complete, the original +configuration file is atomically replaced so that reading process always see +a consistent and complete file without the need to lock for reading. + +.TP +FcBool FcAtomicLock (FcAtomic *atomic) +Attempts to lock the file referenced by 'atomic'. Returns FcFalse if the +file is locked by another process, else returns FcTrue and leaves the file +locked. + +.TP +FcChar8 *FcAtomicNewFile (FcAtomic *atomic) +Returns the filename for writing a new version of the file referenced +by 'atomic'. + +.TP +FcChar8 *FcAtomicOrigFile (FcAtomic *atomic) +Returns the file refernced by 'atomic'. + +.TP +FcBool FcAtomicReplaceOrig (FcAtomic *atomic) +Replaces the original file referenced by 'atomic' with the new file. + +.TP +void FcAtomicDeleteNew (FcAtomic *atomic) +Deletes the new file. + +.TP +void FcAtomicUnlock (FcAtomic *atomic) +Unlocks the file. + +.TP +void FcAtomicDestroy (FcAtomic *atomic) +Destroys 'atomic'. + +.SS FreeType specific functions +.nf +.B #include <fontconfig/fcfreetype.h> +.fi +While the fontconfig library doesn't insist that FreeType be used as the +rasterization mechanism for fonts, it does provide some convenience +functions. + +.TP +FT_UInt FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4) +Maps a Unicode char to a glyph index. This function uses information from +several possible underlying encoding tables to work around broken fonts. +As a result, this function isn't designed to be used in performance +sensitive areas; results from this function are intended to be cached by +higher level functions. + +.TP +FcCharSet *FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks) Scans a +FreeType face and returns the set of encoded Unicode chars. This scans +several encoding tables to build as complete a list as possible. +If 'blanks' is not 0, the glyphs in the font are examined and any blank glyphs +not in 'blanks' are not placed in the returned FcCharSet. + +.TP +FcPattern *FcFreeTypeQuery (const char *file, int id, FcBlanks *blanks, int *count) +Constructs a pattern representing the 'id'th font in 'file'. The number +of fonts in 'file' is returned in 'count'. + +.SS XML specific functions +.TP +FcBool FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain) +Walks the configuration in 'file' and constructs the internal representation +in 'config'. Any include files referenced from within 'file' will be loaded +with FcConfigLoad and also parsed. If 'complain' is FcFalse, no warning +will be displayed if 'file' does not exist. + +.SS File and Directory routines + +.TP +FcBool FcFileScan (FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, FcBlanks *blanks, const char *file, FcBool force) +Scans a single file and adds all fonts found to 'set'. If 'force' is FcTrue, +then the file is scanned even if associated information is found in 'cache'. +If 'file' is a directory, it is added to 'dirs'. + +.TP +FcBool FcDirScan (FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, FcBlanks *blanks, const char *dir, FcBool force) +Scans an entire directory and adds all fonts found to 'set'. If 'force' is +FcTrue, then the directory and all files within it are scanned even if +information is present in the per-directory cache file or 'cache'. Any +subdirectories found are added to 'dirs'. + +.TP +FcBool FcDirSave (FcFontSet *set, FcStrSet *dirs, const char *dir) +Creates the per-directory cache file for 'dir' and populates it with the +fonts in 'set' and subdirectories in 'dirs'. + +.TP +FcBool FcDirCacheValid (const FcChar8 *cache_file) +Returns FcTrue if 'cache_file' is no older than the directory containing it, +else FcFalse. + +.SS FcStrSet and FcStrList +A data structure for enumerating strings, used to list directories while +scanning the configuration as directories are added while scanning. + +.TP +FcStrSet *FcStrSetCreate (void) +Create an empty set. + +.TP +FcBool FcStrSetMember (FcStrSet *set, const FcChar8 *s) +Returns whether 's' is a member of 'set'. + +.TP +FcBool FcStrSetAdd (FcStrSet *set, const FcChar8 *s) +Adds a copy of 's' to 'set'. + +.TP +FcBool FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s) +Adds a copy 's' to 'set', The copy is created with FcStrCopyFilename +so that leading '~' values are replaced with the value of the HOME +environment variable. + +.TP +FcBool FcStrSetDel (FcStrSet *set, const FcChar8 *s) +Removes 's' from 'set', returning FcTrue if 's' was a member else FcFalse. + +.TP +void FcStrSetDestroy (FcStrSet *set) +Destroys 'set'. + +.TP +FcStrList *FcStrListCreate (FcStrSet *set) +Creates an enumerator to list the strings in 'set'. + +.TP +FcChar8 *FcStrListNext (FcStrList *list) +Returns the next string in 'set'. + +.TP +void FcStrListDone (FcStrList *list) +Destroys the enumerator 'list'. + +.SS String utilities + +.TP +int FcUtf8ToUcs4 (FcChar8 *src, FcChar32 *dst, int len) +Converts the next Unicode char from 'src' into 'dst' and returns the number +of bytes containing the char. 'src' nust be at least 'len' bytes long. + +.TP +int FcUcs4ToUtf8 (FcChar32 src, FcChar8 dst[FC_UTF8_MAX_LEN]) +Converts the Unicode char from 'src' into 'dst' and returns the +number of bytes needed to encode the char. + +.TP +FcBool FcUtf8Len (FcChar8 *src, int len, int *nchar, int *wchar) +Counts the number of Unicode chars in 'len' bytes of 'src'. Places that +count in 'nchar'. 'wchar' contains 1, 2 or 4 depending on the number of +bytes needed to hold the largest unicode char counted. The return value +indicates whether 'src' is a well-formed UTF8 string. + +.TP +int FcUtf16ToUcs4 (FcChar8 *src, FcEndian endian, FcChar32 *dst, int len) +Converts the next Unicode char from 'src' into 'dst' and returns the +number of bytes containing the char. 'src' must be at least 'len' bytes +long. Bytes of 'src' are combined into 16-bit units according to 'endian'. + +.TP +FcBool FcUtf16Len (FcChar8 *src, FcEndian endian, int len, int *nchar, int *wchar) +Counts the number of Unicode chars in 'len' bytes of 'src'. Bytes of 'src' +are combined into 16-bit units according to 'endian'. Places that +count in 'nchar'. 'wchar' contains 1, 2 or 4 depending on the number of +bytes needed to hold the largest unicode char counted. The return value +indicates whether 'string' is a well-formed UTF16 string. + +.TP +FcChar8 *FcStrCopy (const FcChar8 *s) +Allocates memory, copies 's' and returns the resulting buffer. Yes, this +is 'strdup', but that function isn't available on every platform. + +.TP +FcChar8 *FcStrCopyFilename (const FcChar8 *s) +Just like FcStrCopy except that it converts any leading '~' characters +in 's' to the value of the HOME environment variable. + +.TP +int FcStrCmpIgnoreCase (const char *s1, const char *s2) +Returns the usual <0, 0, >0 result of comparing 's1' and 's2'. This test +is case-insensitive in the ASCII range and will operate properly with UTF8 +encoded strings, although it does not check for well formed strings. + +.TP +FcChar8 *FcStrDirname (const FcChar8 *file) +Returns the directory containing 'file'. + +.TP +FcChar8 *FcStrBasename (const FcChar8 *file) +Returns the filename of 'file' stripped of any leading directory names. + +.SH CONFIGURATION FILE FORMAT +Configuration files for fontconfig are stored in XML format; this +format makes external configuration tools easier to write and ensures that +they will generate syntactically correct configuration files. As XML +files are plain text, they can also be manipulated by the expert user using +a text editor. +.P +The fontconfig document type definition resides in the external entity +"fonts.dtd"; this is normally stored in the default font configuration +directory (/etc/fonts). Each configuration file should contain the +following structure: +.sp +.nf + <?xml version="1.0"?> + <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> + <fontconfig> + ... + </fontconfig> +.fi +.P +.SS <fontconfig> +This is the top level element for a font configuration and can contain +<dir>, <cache>, <include>, <match> and <alias> elements in any order. + +.SS <dir> +This element contains a directory name which will be scanned for font files +to include in the set of available fonts. + +.SS <cache> +This element contains a file name for the per-user cache of font +information. If it starts with '~', it refers to a file in the users +home directory. This file is used to hold information about fonts that +isn't present in the per-directory cache files. It is automatically +maintained by the fontconfig library. The default for this file +is ``~/.fonts.cache-<version>'', where <version> is the font configuration +file version number (currently 1). + +.SS <include ignore_missing="no"> +This element contains the name of an additional configuration file. When +the XML datatype is traversed by FcConfigParse, the contents of the file +will also be incorporated into the configuration by passing the filename to +FcConfigLoadAndParse. If 'ignore_missing' is set to "yes" instead of the +default "no", a missing file will elicit no warning message from the library. + +.SS <config> +This element provides a place to consolodate additional configuration +information. <config> can contain <blank> and <rescan> elements in any +order. + +.SS <blank> +Fonts often include "broken" glyphs which appear in the encoding but are +drawn as blanks on the screen. Within the <blank> element, place each +Unicode characters which is supposed to be blank in an <int> element. +Characters outside of this set which are drawn as blank will be elided from +the set of characters supported by the font. <b + +.SS <rescan> +The <rescan> element holds an <int> element which indicates the default +interval between automatic checks for font configuration changes. +Fontconfig will validate all of the configuration files and directories and +automatically rebuild the internal datastructures when this interval passes. + +.SS <match target="pattern"> +This element holds first a (possibly empty) list of <test> elements and then +a (possibly empty) list of <edit> elements. Patterns which match all of the +tests are subjected to all the edits. If 'target' is set to "font" instead +of the default "pattern", then this element applies to the font name +resulting from a match rather than a font pattern to be matched. + +.SS <test qual="any" name="property" compare="eq"> +This element contains a single value which is compared with the pattern +property "property" (substitute any of the property names seen +above). 'compare' can be one of "eq", "not_eq", "less", "less_eq", "more", or +"more_eq". 'qual' may either be the default, "any", in which case the match +succeeds if any value associated with the property matches the test value, or +"all", in which case all of the values associated with the property must +match the test value. + +.SS <edit name="property" mode="assign" binding="weak"> +This element contains a list of expression elements (any of the value or +operator elements). The expression elements are evaluated at run-time and +modify the property "property". The modification depends on whether +"property" was matched by one of the associated <test> elements, if so, the +modification may affect the first matched value. Any values inserted into +the property are given the indicated binding. 'mode' is one of: +.nf +.RS +.ta 1i 3i 5i +Mode Operation with match Operation without match + +"assign" Replace matching value Replace all values +"assign_replace" Replace all values Replace all values +"prepend" Insert before matching value Insert at head of list +"prepend_first" Insert at head of list Insert at head of list +"append" Append after matching value Append at end of list +"append_last" Append at end of list Append at end of list +.RE +.DT +.fi +.SS <int> +.SS <double> +.SS <string> +.SS <bool> +These elements hold a single value of the indicated type. <bool> elements +hold either true or false. +.SS <matrix> +This element holds the four <double> elements of an affine transformation. +.SS <name> +Holds a property name. Evaluates to the first value from the property of +the font, not the pattern. +.SS <const> +Holds the name of a constant; these are always integers and serve as +symbolic names for common font values: +.RS +.sp +.nf +.ta 1i 2i 3i +.lc \(em +Constant Property CPP symbol + +light weight FC_WEIGHT_LIGHT +medium weight FC_WEIGHT_MEDIUM +demibold weight FC_WEIGHT_DEMIBOLD +bold weight FC_WEIGHT_BOLD +black weight FC_WEIGHT_BLACK +roman slant FC_SLANT_ROMAN +italic slant FC_SLANT_ITALIC +oblique slant FC_SLANT_OBLIQUE +proportional spacing FC_PROPORTIONAL +mono spacing FC_MONO +charcell spacing FC_CHARCELL +unknown rgba FC_RGBA_UNKNOWN +rgb rgba FC_RGBA_RGB +bgr rgba FC_RGBA_BGR +vrgb rgba FC_RGBA_VRGB +vbgr rgba FC_RGBA_VBGR +none rgba FC_RGBA_NONE +.DT +.fi +.RE +.SS <or> +.SS <and> +.SS <plus> +.SS <minus> +.SS <times> +.SS <divide> +These elements perform the specified operation on a list of expression +elements. <or> and <and> are boolean, not bitwise. +.SS <eq> +.SS <not_eq> +.SS <less> +.SS <less_eq> +.SS <more> +.SS <more_eq> +These elements compare two values, producing a boolean result. +.SS <not> +Inverts the boolean sense of its one expression element +.SS <if> +This element takes three expression elements; if the value of the first is +true, it produces the value of the second, otherwise it produces the value +of the third. +.SS <alias> +Alias elements provide a shorthand notation for the set of common match +operations needed to substitute one font family for another. They contain a +<family> element followed by optional <prefer>, <accept> and <default> +elements. Fonts matching the <family> element are edited to prepend the +list of <prefer>ed families before the matching <family>, append the +<accept>able familys after the matching <family> and append the <default> +families to the end of the family list. +.SS <family> +Holds a single font family name +.SS <prefer> +.SS <accept> +.SS <default> +These hold a list of <family> elements to be used by the <alias> element. +.SH EXAMPLE CONFIGURATION FILE +.SS System configuration file +This is an example of a system-wide configuration file +.sp +.nf +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- /etc/fonts/fonts.conf file to configure system font access --> +<fontconfig> +<!-- + Find fonts in these directories +--> +<dir>/usr/X11R6/lib/X11/fonts/truetype</dir> +<dir>/usr/X11R6/lib/X11/fonts/Type1</dir> + +<!-- + Accept deprecated 'mono' alias, replacing it with 'monospace' +--> +<match target="pattern"> + <test qual="any" name="family"><string>mono</string></test> + <edit name="family" mode="assign"><string>monospace</string></edit> +</match> + +<!-- + Names not including any well known alias are given 'sans' +--> +<match target="pattern"> + <test qual="all" name="family" mode="not_eq">sans</test> + <test qual="all" name="family" mode="not_eq">serif</test> + <test qual="all" name="family" mode="not_eq">monospace</test> + <edit name="family" mode="append_last"><string>sans</string></edit> +</match> + +<!-- + Load per-user customization file, but don't complain + if it doesn't exist +--> +<include ignore_missing="yes">~/.fonts.conf</include> + +<!-- + Alias well known font names to available TrueType fonts. + These substitute TrueType faces for similar Type1 + faces to improve screen appearance. +--> +<alias> + <family>Times</family> + <prefer><family>Times New Roman</family></prefer> + <default><family>serif</family></default> +</alias> +<alias> + <family>Helvetica</family> + <prefer><family>Verdana</family></prefer> + <default><family>sans</family></default> +</alias> +<alias> + <family>Courier</family> + <prefer><family>Courier New</family></prefer> + <default><family>monospace</family></default> +</alias> + +<!-- + Provide required aliases for standard names + Do these after the users configuration file so that + any aliases there are used preferentially +--> +<alias> + <family>serif</family> + <prefer><family>Times New Roman</family></prefer> +</alias> +<alias> + <family>sans</family> + <prefer><family>Verdana</family></prefer> +</alias> +<alias> + <family>monospace</family> + <prefer><family>Andale Mono</family></prefer> +</alias> +</fontconfig> +.fi +.SS User configuration file +This is an example of a per-user configuration file that lives in +~/.fonts.conf +.sp +.nf +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<!-- ~/.fonts.conf for per-user font configuration --> +<fontconfig> + +<!-- + Private font directory +--> +<dir>~/misc/fonts</dir> + +<!-- + use rgb sub-pixel ordering to improve glyph appearance on + LCD screens. Changes affecting rendering, but not matching + should always use target="font". +--> +<match target="font"> + <edit name="rgba" mode="assign"><const>rgb</const></edit> +</match> +</fontconfig> +.fi +.SH FILES +.B fonts.conf +contains configuration information for the fontconfig library +consisting of directories to look at for font information as well as +instructions on editing program specified font patterns before attempting to +match the available fonts. It is in xml format. + +.B fonts.dtd +is a DTD that describes the format of the configuration files. + +.B local.conf +is sourced by the default system-wide fonts.conf file. +Note that the normal 'make install' procedure for XFree86 is to +replace any existing fonts.conf file with the new version. Place +any local customizations in local.conf which this file references. + +.B ~/.fonts.conf +is the conventional location for per-user font configuration, although the +actual location is specified in the global fonts.conf file. + +.B ~/.fonts.cache-* +is the conventional repository of font information that isn't found in the +per-directory caches. This file is automatically maintained by fontconfig. + +.SH AUTHOR +Keith Packard, member of the XFree86 Project, Inc. Index: xc/lib/fontenc/Imakefile diff -u xc/lib/fontenc/Imakefile:1.5 xc/lib/fontenc/Imakefile:1.6 --- xc/lib/fontenc/Imakefile:1.5 Thu Nov 15 14:10:04 2001 +++ xc/lib/fontenc/Imakefile Wed Feb 13 16:32:49 2002 @@ -1,7 +1,7 @@ -XCOMM $XFree86: xc/lib/fontenc/Imakefile,v 1.5 2001/11/15 19:10:04 dawes Exp $ +XCOMM $XFree86: xc/lib/fontenc/Imakefile,v 1.6 2002/02/13 21:32:49 dawes Exp $ INCLUDES = -I$(FONTINCSRC) -I$(FONTLIBSRC)/include -I$(FONTLIBSRC)/fontfile \ - -I$(XTOP)/include + -I$(INCLUDESRC) FONTENCDEFS = -DFONTENC_NO_LIBFONT \ -DFONT_ENCODINGS_DIRECTORY=\"$(FONTDIR)/encodings/encodings.dir\" Index: xc/lib/freetype2/Imakefile diff -u xc/lib/freetype2/Imakefile:1.6 xc/lib/freetype2/Imakefile:1.9 --- xc/lib/freetype2/Imakefile:1.6 Mon Jan 14 12:11:47 2002 +++ xc/lib/freetype2/Imakefile Wed Jan 1 17:08:39 2003 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/Imakefile,v 1.6 2002/01/14 17:11:47 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/Imakefile,v 1.9 2003/01/01 22:08:39 torrey Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -20,58 +20,85 @@ FREETYPESRC = $(FREETYPETOP)/src FREETYPEINC = $(FREETYPETOP)/include/freetype +#ifdef DarwinArchitecture +# if DarwinQuartzSupport +DEFINES = -DTARGET_API_MAC_CARBON=TRUE +REQUIREDLIBS = -framework Carbon +# else +DEFINES = -DDARWIN_NO_CARBON +# endif +#endif + INCLUDES = -I. $(FREETYPE2INCLUDES)\ -I$(FREETYPESRC)\ -I$(FREETYPESRC)/base\ -I$(FREETYPESRC)/autohint\ - -I$(FREETYPESRC)/sfnt\ + -I$(FREETYPESRC)/bdf\ -I$(FREETYPESRC)/cff\ - -I$(FREETYPESRC)/psnames\ + -I$(FREETYPESRC)/cid\ + -I$(FREETYPESRC)/pcf\ + -I$(FREETYPESRC)/pfr\ -I$(FREETYPESRC)/psaux\ -I$(FREETYPESRC)/pshinter\ - -I$(FREETYPESRC)/truetype\ - -I$(FREETYPESRC)/type1\ - -I$(FREETYPESRC)/cid\ + -I$(FREETYPESRC)/psnames\ -I$(FREETYPESRC)/raster\ + -I$(FREETYPESRC)/sfnt\ -I$(FREETYPESRC)/smooth\ - -I$(FREETYPESRC)/winfonts\ - -I$(FREETYPESRC)/pcf + -I$(FREETYPESRC)/truetype\ + -I$(FREETYPESRC)/type1\ + -I$(FREETYPESRC)/type42\ + -I$(FREETYPESRC)/winfonts SUBDIRS=freetype HEADERS=ft2build.h SRCS_BASE = ftbase.c \ + ftbdf.c \ ftbbox.c \ ftdebug.c \ - ftextend.c \ ftglyph.c \ ftinit.c \ ftmm.c \ ftsynth.c \ - ftsystem.c + ftsystem.c \ + fttype1.c \ + ftxf86.c OBJS_BASE = ftbase.o \ + ftbdf.o \ ftbbox.o \ ftdebug.o \ - ftextend.o \ ftglyph.o \ ftinit.o \ ftmm.o \ ftsynth.o \ - ftsystem.o + ftsystem.o \ + fttype1.o \ + ftxf86.o + +#if defined(DarwinArchitecture) && DarwinQuartzSupport +SRCS_MACBASE = ftmac.c +OBJS_MACBASE = ftmac.o +#endif SRCS_AUTOHINT = autohint.c OBJS_AUTOHINT = autohint.o -SRCS_SFNT = sfnt.c -OBJS_SFNT = sfnt.o +SRCS_BDF = bdf.c +OBJS_BDF = bdf.o SRCS_CFF = cff.c OBJS_CFF = cff.o -SRCS_PSNAMES = psnames.c -OBJS_PSNAMES = psnames.o +SRCS_CID = type1cid.c +OBJS_CID = type1cid.o + +SRCS_PCF = pcf.c +OBJS_PCF = pcf.o + +SRCS_PFR = pfr.c +OBJS_PFR = pfr.o SRCS_PSAUX = psaux.c OBJS_PSAUX = psaux.o @@ -79,36 +106,68 @@ SRCS_PSHINTER = pshinter.c OBJS_PSHINTER = pshinter.o -SRCS_TRUETYPE = truetype.c -OBJS_TRUETYPE = truetype.o - -SRCS_TYPE1 = type1.c -OBJS_TYPE1 = type1.o - -SRCS_CID = type1cid.c -OBJS_CID = type1cid.o +SRCS_PSNAMES = psnames.c +OBJS_PSNAMES = psnames.o SRCS_RASTER = raster.c OBJS_RASTER = raster.o +SRCS_SFNT = sfnt.c +OBJS_SFNT = sfnt.o + SRCS_SMOOTH = smooth.c OBJS_SMOOTH = smooth.o +SRCS_TRUETYPE = truetype.c +OBJS_TRUETYPE = truetype.o + +SRCS_TYPE1 = type1.c +OBJS_TYPE1 = type1.o + +SRCS_TYPE42 = type42.c +OBJS_TYPE42 = type42.o + SRCS_WINFONTS = winfnt.c OBJS_WINFONTS = winfnt.o -SRCS_PCF = pcf.c -OBJS_PCF = pcf.o +SRCS = $(SRCS_BASE)\ + $(SRCS_MACBASE)\ + $(SRCS_AUTOHINT)\ + $(SRCS_BDF)\ + $(SRCS_CFF)\ + $(SRCS_CID)\ + $(SRCS_PCF)\ + $(SRCS_PFR)\ + $(SRCS_PSAUX)\ + $(SRCS_PSHINTER)\ + $(SRCS_PSNAMES)\ + $(SRCS_RASTER)\ + $(SRCS_SFNT)\ + $(SRCS_SMOOTH)\ + $(SRCS_TRUETYPE)\ + $(SRCS_TYPE1)\ + $(SRCS_TYPE42)\ + $(SRCS_WINFONTS) + +OBJS = $(OBJS_BASE)\ + $(OBJS_MACBASE)\ + $(OBJS_AUTOHINT)\ + $(OBJS_BDF)\ + $(OBJS_CFF)\ + $(OBJS_CID)\ + $(OBJS_PCF)\ + $(OBJS_PFR)\ + $(OBJS_PSAUX)\ + $(OBJS_PSHINTER)\ + $(OBJS_PSNAMES)\ + $(OBJS_RASTER)\ + $(OBJS_SFNT)\ + $(OBJS_SMOOTH)\ + $(OBJS_TRUETYPE)\ + $(OBJS_TYPE1)\ + $(OBJS_TYPE42)\ + $(OBJS_WINFONTS) -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_PCF) $(SRCS_PSHINTER) - -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_PCF) $(OBJS_PSHINTER) #include <Library.tmpl> @@ -127,29 +186,37 @@ LinkSourceFile(ft2build.h,$(FREETYPETOP)/include) LinkSourceFile(ftbase.c,$(FREETYPESRC)/base) +LinkSourceFile(ftbdf.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(fttype1.c,$(FREETYPESRC)/base) +LinkSourceFile(ftxf86.c,$(FREETYPESRC)/base) +#if defined(DarwinArchitecture) && DarwinQuartzSupport +LinkSourceFile(ftmac.c,$(FREETYPESRC)/base) +#endif + LinkSourceFile(autohint.c,$(FREETYPESRC)/autohint) -LinkSourceFile(sfnt.c,$(FREETYPESRC)/sfnt) +LinkSourceFile(bdf.c,$(FREETYPESRC)/bdf) LinkSourceFile(cff.c,$(FREETYPESRC)/cff) -LinkSourceFile(psnames.c,$(FREETYPESRC)/psnames) +LinkSourceFile(type1cid.c,$(FREETYPESRC)/cid) +LinkSourceFile(pcf.c,$(FREETYPESRC)/pcf) +LinkSourceFile(pfr.c,$(FREETYPESRC)/pfr) LinkSourceFile(psaux.c,$(FREETYPESRC)/psaux) LinkSourceFile(pshinter.c,$(FREETYPESRC)/pshinter) -LinkSourceFile(truetype.c,$(FREETYPESRC)/truetype) -LinkSourceFile(type1.c,$(FREETYPESRC)/type1) -LinkSourceFile(type1cid.c,$(FREETYPESRC)/cid) +LinkSourceFile(psnames.c,$(FREETYPESRC)/psnames) LinkSourceFile(raster.c,$(FREETYPESRC)/raster) +LinkSourceFile(sfnt.c,$(FREETYPESRC)/sfnt) LinkSourceFile(smooth.c,$(FREETYPESRC)/smooth) +LinkSourceFile(truetype.c,$(FREETYPESRC)/truetype) +LinkSourceFile(type1.c,$(FREETYPESRC)/type1) +LinkSourceFile(type42.c,$(FREETYPESRC)/type42) LinkSourceFile(winfnt.c,$(FREETYPESRC)/winfonts) -LinkSourceFile(pcf.c,$(FREETYPESRC)/pcf) DependTarget() Index: xc/lib/freetype2/freetype-def.cpp diff -u xc/lib/freetype2/freetype-def.cpp:1.1 xc/lib/freetype2/freetype-def.cpp:1.2 --- xc/lib/freetype2/freetype-def.cpp:1.1 Thu Apr 5 15:29:38 2001 +++ xc/lib/freetype2/freetype-def.cpp Fri May 31 14:45:50 2002 @@ -7,14 +7,18 @@ autohinter_interface cff_driver_class FT_Access_Frame +#ifndef __UNIXOS2__ FT_Add64 +#endif FT_Add_Module FT_Alloc FT_Attach_File FT_Attach_Stream FT_Create_Extensions FT_Destroy_Extensions +#ifndef __UNIXOS2__ FT_Div64by32 +#endif FT_DivFix FT_Done_Extensions FT_Done_Face @@ -64,7 +68,9 @@ FT_Lookup_Renderer FT_MulDiv FT_MulFix +#ifndef __UNIXOS2__ FT_MulTo64 +#endif FT_New_Face FT_New_GlyphSlot FT_New_Library @@ -108,7 +114,9 @@ FT_Set_Renderer FT_Set_Transform FT_Skip_Stream +#ifndef __UNIXOS2__ FT_Sqrt64 +#endif FT_SqrtFixed FT_Stream_Pos FT_Vector_Transform @@ -132,9 +140,11 @@ FT_Done_Memory FT_New_Memory FT_New_Stream +#ifndef __UNIXOS2__ _cygwin_dll_entry@12 _cygwin_noncygwin_dll_entry@12 dll_main@12 +#endif ps_table_funcs psaux_module_class t1_builder_funcs @@ -148,7 +158,6 @@ sfnt_module_class ft_grays_raster ft_smooth_renderer_class -grays_raster_render TT_New_Context TT_RunIns tt_default_graphics_state @@ -157,4 +166,4 @@ t1cid_driver_class winfnt_driver_class -/* $XFree86: xc/lib/freetype2/freetype-def.cpp,v 1.1 2001/04/05 19:29:38 dawes Exp $ */ +/* $XFree86: xc/lib/freetype2/freetype-def.cpp,v 1.2 2002/05/31 18:45:50 dawes Exp $ */ Index: xc/lib/freetype2/freetype/Imakefile diff -u xc/lib/freetype2/freetype/Imakefile:1.7 xc/lib/freetype2/freetype/Imakefile:1.8 --- xc/lib/freetype2/freetype/Imakefile:1.7 Mon Jan 14 17:59:06 2002 +++ xc/lib/freetype2/freetype/Imakefile Thu Jun 20 04:26:17 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/Imakefile,v 1.7 2002/01/14 22:59:06 herrb Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/Imakefile,v 1.8 2002/06/20 08:26:17 keithp Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -12,8 +12,10 @@ HEADERS= \ freetype.h \ ftbbox.h \ + ftbdf.h \ ftcache.h \ ftchapters.h \ + fterrdef.h \ fterrors.h \ ftglyph.h \ ftimage.h \ @@ -27,9 +29,12 @@ ftsizes.h \ ftsnames.h \ ftsynth.h \ + ftsysio.h \ + ftsysmem.h \ ftsystem.h \ fttrigon.h \ fttypes.h \ + ftxf86.h \ t1tables.h \ ttnameid.h \ tttables.h \ @@ -40,8 +45,10 @@ LinkSourceFile(freetype.h,$(FREETYPEINC)) LinkSourceFile(ftbbox.h,$(FREETYPEINC)) +LinkSourceFile(ftbdf.h,$(FREETYPEINC)) LinkSourceFile(ftcache.h,$(FREETYPEINC)) LinkSourceFile(ftchapters.h,$(FREETYPEINC)) +LinkSourceFile(fterrdef.h,$(FREETYPEINC)) LinkSourceFile(fterrors.h,$(FREETYPEINC)) LinkSourceFile(ftglyph.h,$(FREETYPEINC)) LinkSourceFile(ftimage.h,$(FREETYPEINC)) @@ -55,9 +62,12 @@ LinkSourceFile(ftsizes.h,$(FREETYPEINC)) LinkSourceFile(ftsnames.h,$(FREETYPEINC)) LinkSourceFile(ftsynth.h,$(FREETYPEINC)) +LinkSourceFile(ftsysio.h,$(FREETYPEINC)) +LinkSourceFile(ftsysmem.h,$(FREETYPEINC)) LinkSourceFile(ftsystem.h,$(FREETYPEINC)) LinkSourceFile(fttrigon.h,$(FREETYPEINC)) LinkSourceFile(fttypes.h,$(FREETYPEINC)) +LinkSourceFile(ftxf86.h,$(FREETYPEINC)) LinkSourceFile(t1tables.h,$(FREETYPEINC)) LinkSourceFile(ttnameid.h,$(FREETYPEINC)) LinkSourceFile(tttables.h,$(FREETYPEINC)) Index: xc/lib/freetype2/freetype/cache/Imakefile diff -u xc/lib/freetype2/freetype/cache/Imakefile:1.2 xc/lib/freetype2/freetype/cache/Imakefile:1.3 --- xc/lib/freetype2/freetype/cache/Imakefile:1.2 Mon Jan 14 17:59:07 2002 +++ xc/lib/freetype2/freetype/cache/Imakefile Thu Jun 20 04:26:17 2002 @@ -1,10 +1,12 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/cache/Imakefile,v 1.2 2002/01/14 22:59:07 herrb Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/cache/Imakefile,v 1.3 2002/06/20 08:26:17 keithp Exp $ FREETYPETOP = $(TOP)/extras/freetype2 FREETYPESRC = $(FREETYPETOP)/src FREETYPEINC = $(FREETYPETOP)/include/freetype HEADERS= \ + ftccache.h \ + ftccmap.h \ ftcglyph.h \ ftcimage.h \ ftcmanag.h \ @@ -14,6 +16,8 @@ BuildIncludes($(HEADERS),freetype2/freetype/cache,../../..) InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2/freetype/cache,$(INSTINCFLAGS)) +LinkSourceFile(ftccache.h,$(FREETYPEINC)/cache) +LinkSourceFile(ftccmap.h,$(FREETYPEINC)/cache) LinkSourceFile(ftcglyph.h,$(FREETYPEINC)/cache) LinkSourceFile(ftcimage.h,$(FREETYPEINC)/cache) LinkSourceFile(ftcmanag.h,$(FREETYPEINC)/cache) Index: xc/lib/freetype2/freetype/config/Imakefile diff -u xc/lib/freetype2/freetype/config/Imakefile:1.8 xc/lib/freetype2/freetype/config/Imakefile:1.9 --- xc/lib/freetype2/freetype/config/Imakefile:1.8 Tue Jan 15 17:55:27 2002 +++ xc/lib/freetype2/freetype/config/Imakefile Thu Jun 20 04:26:18 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/config/Imakefile,v 1.8 2002/01/15 22:55:27 herrb Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/config/Imakefile,v 1.9 2002/06/20 08:26:18 keithp Exp $ FREETYPETOP = $(TOP)/extras/freetype2 FREETYPESRC = $(FREETYPETOP)/src @@ -8,7 +8,8 @@ ftconfig.h \ ftheader.h \ ftmodule.h \ - ftoption.h + ftoption.h \ + ftstdlib.h BuildIncludes($(HEADERS),freetype2/freetype/config,../../..) InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2/freetype/config,$(INSTINCFLAGS)) @@ -17,6 +18,7 @@ LinkSourceFile(ftheader.h,$(FREETYPEINC)/config) LinkSourceFile(ftmodule.h,$(FREETYPEINC)/config) LinkSourceFile(ftoption.h,$(FREETYPEINC)/config) +LinkSourceFile(ftstdlib.h,$(FREETYPEINC)/config) XCOMM Build and install a configure-compatible freetype-config Index: xc/lib/freetype2/freetype/internal/Imakefile diff -u xc/lib/freetype2/freetype/internal/Imakefile:1.4 xc/lib/freetype2/freetype/internal/Imakefile:1.5 --- xc/lib/freetype2/freetype/internal/Imakefile:1.4 Mon Jan 14 17:59:07 2002 +++ xc/lib/freetype2/freetype/internal/Imakefile Thu Jun 20 04:26:20 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/internal/Imakefile,v 1.4 2002/01/14 22:59:07 herrb Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/internal/Imakefile,v 1.5 2002/06/20 08:26:20 keithp Exp $ FREETYPETOP = $(TOP)/extras/freetype2 FREETYPESRC = $(FREETYPETOP)/src @@ -6,44 +6,56 @@ HEADERS= \ autohint.h \ + bdftypes.h \ cfftypes.h \ fnttypes.h \ ftcalc.h \ + ftcore.h \ ftdebug.h \ ftdriver.h \ - ftextend.h \ + ftexcept.h \ + ftgloadr.h \ + fthash.h \ ftmemory.h \ + ftobject.h \ ftobjs.h \ ftstream.h \ + fttrace.h \ internal.h \ pcftypes.h \ psaux.h \ - psglobal.h \ pshints.h \ psnames.h \ sfnt.h \ t1types.h \ + t42types.h \ tttypes.h BuildIncludes($(HEADERS),freetype2/freetype/internal,../../..) InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2/freetype/internal,$(INSTINCFLAGS)) LinkSourceFile(autohint.h,$(FREETYPEINC)/internal) +LinkSourceFile(bdftypes.h,$(FREETYPEINC)/internal) LinkSourceFile(cfftypes.h,$(FREETYPEINC)/internal) LinkSourceFile(fnttypes.h,$(FREETYPEINC)/internal) LinkSourceFile(ftcalc.h,$(FREETYPEINC)/internal) +LinkSourceFile(ftcore.h,$(FREETYPEINC)/internal) LinkSourceFile(ftdebug.h,$(FREETYPEINC)/internal) LinkSourceFile(ftdriver.h,$(FREETYPEINC)/internal) -LinkSourceFile(ftextend.h,$(FREETYPEINC)/internal) +LinkSourceFile(ftexcept.h,$(FREETYPEINC)/internal) +LinkSourceFile(ftgloadr.h,$(FREETYPEINC)/internal) +LinkSourceFile(fthash.h,$(FREETYPEINC)/internal) LinkSourceFile(ftmemory.h,$(FREETYPEINC)/internal) +LinkSourceFile(ftobject.h,$(FREETYPEINC)/internal) LinkSourceFile(ftobjs.h,$(FREETYPEINC)/internal) LinkSourceFile(ftstream.h,$(FREETYPEINC)/internal) +LinkSourceFile(fttrace.h,$(FREETYPEINC)/internal) LinkSourceFile(internal.h,$(FREETYPEINC)/internal) LinkSourceFile(pcftypes.h,$(FREETYPEINC)/internal) LinkSourceFile(psaux.h,$(FREETYPEINC)/internal) LinkSourceFile(pshints.h,$(FREETYPEINC)/internal) -LinkSourceFile(psglobal.h,$(FREETYPEINC)/internal) LinkSourceFile(psnames.h,$(FREETYPEINC)/internal) LinkSourceFile(sfnt.h,$(FREETYPEINC)/internal) LinkSourceFile(t1types.h,$(FREETYPEINC)/internal) +LinkSourceFile(t42types.h,$(FREETYPEINC)/internal) LinkSourceFile(tttypes.h,$(FREETYPEINC)/internal) Index: xc/lib/libxml2/config.h diff -u /dev/null xc/lib/libxml2/config.h:1.2 --- /dev/null Thu Feb 27 12:28:11 2003 +++ xc/lib/libxml2/config.h Fri Feb 15 01:02:05 2002 @@ -0,0 +1,195 @@ +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if you have the strftime function. */ +#define HAVE_STRFTIME 1 + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +#define PACKAGE "libxml2" +#define VERSION "2.4.14" +#define HAVE_LIBZ 1 +/* #undef HAVE_LIBM */ +#define HAVE_ISINF 1 +/* #undef HAVE_ISNAN */ +/* #undef HAVE_LIBHISTORY */ +/* #undef HAVE_LIBREADLINE */ +#define SOCKLEN_T socklen_t +/* #undef HAVE_LIBPTHREAD */ +/* #undef HAVE_PTHREAD_H */ + +/* Define if you have the _stat function. */ +/* #undef HAVE__STAT */ + +/* Define if you have the class function. */ +/* #undef HAVE_CLASS */ + +/* Define if you have the finite function. */ +#define HAVE_FINITE 1 + +/* Define if you have the fp_class function. */ +/* #undef HAVE_FP_CLASS */ + +/* Define if you have the fpclass function. */ +/* #undef HAVE_FPCLASS */ + +/* Define if you have the fprintf function. */ +#define HAVE_FPRINTF 1 + +/* Define if you have the isnand function. */ +/* #undef HAVE_ISNAND */ + +/* Define if you have the localtime function. */ +#define HAVE_LOCALTIME 1 + +/* Define if you have the printf function. */ +#define HAVE_PRINTF 1 + +/* Define if you have the signal function. */ +#define HAVE_SIGNAL 1 + +/* Define if you have the snprintf function. */ +#define HAVE_SNPRINTF 1 + +/* Define if you have the sprintf function. */ +#define HAVE_SPRINTF 1 + +/* Define if you have the sscanf function. */ +#define HAVE_SSCANF 1 + +/* Define if you have the stat function. */ +#define HAVE_STAT 1 + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the strerror function. */ +#define HAVE_STRERROR 1 + +/* Define if you have the strftime function. */ +#define HAVE_STRFTIME 1 + +/* Define if you have the strndup function. */ +#define HAVE_STRNDUP 1 + +/* Define if you have the vfprintf function. */ +#define HAVE_VFPRINTF 1 + +/* Define if you have the vsnprintf function. */ +#define HAVE_VSNPRINTF 1 + +/* Define if you have the vsprintf function. */ +#define HAVE_VSPRINTF 1 + +/* Define if you have the <ansidecl.h> header file. */ +/* #undef HAVE_ANSIDECL_H */ + +/* Define if you have the <arpa/inet.h> header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define if you have the <ctype.h> header file. */ +#define HAVE_CTYPE_H 1 + +/* Define if you have the <dirent.h> header file. */ +#define HAVE_DIRENT_H 1 + +/* Define if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the <float.h> header file. */ +#define HAVE_FLOAT_H 1 + +/* Define if you have the <fp_class.h> header file. */ +/* #undef HAVE_FP_CLASS_H */ + +/* Define if you have the <ieeefp.h> header file. */ +/* #undef HAVE_IEEEFP_H */ + +/* Define if you have the <malloc.h> header file. */ +#define HAVE_MALLOC_H 1 + +/* Define if you have the <math.h> header file. */ +#define HAVE_MATH_H 1 + +/* Define if you have the <nan.h> header file. */ +/* #undef HAVE_NAN_H */ + +/* Define if you have the <ndir.h> header file. */ +/* #undef HAVE_NDIR_H */ + +/* Define if you have the <netdb.h> header file. */ +#define HAVE_NETDB_H 1 + +/* Define if you have the <netinet/in.h> header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define if you have the <signal.h> header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define if you have the <stdarg.h> header file. */ +#define HAVE_STDARG_H 1 + +/* Define if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if you have the <string.h> header file. */ +/* #undef HAVE_STRING_H */ + +/* Define if you have the <sys/dir.h> header file. */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define if you have the <sys/mman.h> header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define if you have the <sys/ndir.h> header file. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define if you have the <sys/select.h> header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define if you have the <sys/socket.h> header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Define if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the <zlib.h> header file. */ +#define HAVE_ZLIB_H 1 + +/* Define if you have the inet library (-linet). */ +/* #undef HAVE_LIBINET */ + +/* Define if you have the nsl library (-lnsl). */ +/* #undef HAVE_LIBNSL */ + +/* Define if you have the socket library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Name of package */ +#define PACKAGE "libxml2" + +/* Version number of package */ +#define VERSION "2.4.14" + +/* Define if compiler has function prototypes */ +#define PROTOTYPES 1 + Index: xc/lib/psres/psresos2.def diff -u xc/lib/psres/psresos2.def:1.1 xc/lib/psres/psresos2.def:removed --- xc/lib/psres/psresos2.def:1.1 Wed Apr 5 14:13:25 2000 +++ xc/lib/psres/psresos2.def Thu Feb 27 12:28:12 2003 @@ -1,29 +0,0 @@ -LIBRARY psres -DESCRIPTION "@#XFREE86:4.0#@ $XFree86: xc/lib/psres/psresos2.def,v 1.1 2000/04/05 18:13:25 dawes Exp $" -CODE - PRELOAD -DATA - MULTIPLE NONSHARED -STACKSIZE 32768 -EXPORTS - CheckPSResourceTime @ 1 - EnumeratePSResourceFiles @ 2 - FreePSResourceStorage @ 3 - InSavedList @ 4 - ListPSResourceFiles @ 5 - ListPSResourceTypes @ 6 - PSResEncoding @ 7 - PSResFileWarningHandler @ 8 - PSResFontAFM @ 9 - PSResFontBDF @ 10 - PSResFontBDFSizes @ 11 - PSResFontFamily @ 12 - PSResFontOutline @ 13 - PSResFontPrebuilt @ 14 - PSResForm @ 15 - PSResFree @ 16 - PSResMalloc @ 17 - PSResPattern @ 18 - PSResProcSet @ 19 - PSResRealloc @ 20 - SetPSResourcePolicy @ 21 Index: xc/lib/psres/psresos2.rsp diff -u xc/lib/psres/psresos2.rsp:1.1 xc/lib/psres/psresos2.rsp:removed --- xc/lib/psres/psresos2.rsp:1.1 Wed Apr 5 14:13:26 2000 +++ xc/lib/psres/psresos2.rsp Thu Feb 27 12:28:12 2003 @@ -1,3 +0,0 @@ -PSres.obj /NOI /NOL /NOD /BAT -psres.dll -psres.map Index: xc/lib/xkbfile/XKBrules.h diff -u xc/lib/xkbfile/XKBrules.h:3.2 xc/lib/xkbfile/XKBrules.h:3.5 --- xc/lib/xkbfile/XKBrules.h:3.2 Wed Jan 17 14:43:40 2001 +++ xc/lib/xkbfile/XKBrules.h Mon Nov 25 20:43:25 2002 @@ -27,6 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/xkbfile/XKBrules.h,v 3.5 2002/11/26 01:43:25 dawes Exp $ */ /***====================================================================***/ @@ -53,6 +54,9 @@ } XkbRF_DescribeVarsRec,*XkbRF_DescribeVarsPtr; typedef struct _XkbRF_Rule { + int number; + int layout_num; + int variant_num; char * model; char * layout; char * variant; @@ -67,10 +71,17 @@ unsigned flags; } XkbRF_RuleRec,*XkbRF_RulePtr; +typedef struct _XkbRF_Group { + int number; + char * name; + char * words; +} XkbRF_GroupRec, *XkbRF_GroupPtr; + #define XkbRF_PendingMatch (1L<<1) -#define XkbRF_Delayed (1L<<2) +#define XkbRF_Option (1L<<2) #define XkbRF_Append (1L<<3) -#define XkbRF_Invalid (1L<<4) +#define XkbRF_Normal (1L<<4) +#define XkbRF_Invalid (1L<<5) typedef struct _XkbRF_Rules { XkbRF_DescribeVarsRec models; @@ -85,63 +96,15 @@ unsigned short sz_rules; unsigned short num_rules; XkbRF_RulePtr rules; + unsigned short sz_groups; + unsigned short num_groups; + XkbRF_GroupPtr groups; } XkbRF_RulesRec, *XkbRF_RulesPtr; /***====================================================================***/ _XFUNCPROTOBEGIN -extern Bool XkbRF_ApplyRule( -#if NeedFunctionPrototypes - XkbRF_RulePtr /* rule */, - XkbComponentNamesPtr /* names */ -#endif -); - -extern Bool XkbRF_CheckApplyRule( -#if NeedFunctionPrototypes - XkbRF_RulePtr /* rule */, - XkbRF_VarDefsPtr /* defs */, - XkbComponentNamesPtr /* names */ -#endif -); - -extern void XkbRF_ClearPartialMatches( -#if NeedFunctionPrototypes - XkbRF_RulesPtr /* rules */ -#endif -); - -extern Bool XkbRF_ApplyPartialMatches( -#if NeedFunctionPrototypes - XkbRF_RulesPtr /* rules */, - XkbComponentNamesPtr /* names */ -#endif -); - -extern void XkbRF_CheckApplyDelayedRules( -#if NeedFunctionPrototypes - XkbRF_RulesPtr /* rules */, - XkbRF_VarDefsPtr /* defs */, - XkbComponentNamesPtr /* names */ -#endif -); - -extern Bool XkbRF_CheckApplyRules( -#if NeedFunctionPrototypes - XkbRF_RulesPtr /* rules */, - XkbRF_VarDefsPtr /* defs */, - XkbComponentNamesPtr /* names */ -#endif -); - -extern char * XkbRF_SubstituteVars( -#if NeedFunctionPrototypes - char * /* p_name */, - XkbRF_VarDefsPtr /* defs */ -#endif -); - extern Bool XkbRF_GetComponents( #if NeedFunctionPrototypes XkbRF_RulesPtr /* rules */, @@ -155,6 +118,8 @@ XkbRF_RulesPtr /* rules */ #endif ); + +extern XkbRF_GroupPtr XkbRF_AddGroup(XkbRF_RulesPtr rules); extern Bool XkbRF_LoadRules( #if NeedFunctionPrototypes Index: xc/lib/xkbfile/cout.c diff -u xc/lib/xkbfile/cout.c:3.7 xc/lib/xkbfile/cout.c:3.8 --- xc/lib/xkbfile/cout.c:3.7 Sat Oct 27 23:32:46 2001 +++ xc/lib/xkbfile/cout.c Mon Feb 3 15:12:00 2003 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/cout.c,v 3.7 2001/10/28 03:32:46 tsi Exp $ */ + /* $XFree86: xc/lib/xkbfile/cout.c,v 3.8 2003/02/03 20:12:00 paulo Exp $ */ #include <stdio.h> #include <ctype.h> @@ -1208,7 +1208,7 @@ if (tmp==NULL) tmp= name; else tmp++; - hdrdef= (char *)_XkbCalloc(strlen(tmp+1),sizeof(char)); + hdrdef= (char *)_XkbCalloc(strlen(tmp)+1,sizeof(char)); if (hdrdef) { strcpy(hdrdef,tmp); tmp= hdrdef; Index: xc/lib/xkbfile/maprules.c diff -u xc/lib/xkbfile/maprules.c:3.14 xc/lib/xkbfile/maprules.c:3.17 --- xc/lib/xkbfile/maprules.c:3.14 Sat Oct 27 23:32:47 2001 +++ xc/lib/xkbfile/maprules.c Mon Nov 25 20:43:25 2002 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.14 2001/10/28 03:32:47 tsi Exp $ */ +/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.17 2002/11/26 01:43:25 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -67,11 +67,13 @@ #endif #ifdef DEBUG -#define PR_DEBUG(s) fprintf(stderr,s) -#define PR_DEBUG1(s,a) fprintf(stderr,s,a) +#define PR_DEBUG(s) fprintf(stderr,s) +#define PR_DEBUG1(s,a) fprintf(stderr,s,a) +#define PR_DEBUG2(s,a,b) fprintf(stderr,s,a,b) #else #define PR_DEBUG(s) #define PR_DEBUG1(s,a) +#define PR_DEBUG2(s,a,b) #endif /***====================================================================***/ @@ -252,8 +254,12 @@ }; typedef struct _RemapSpec { + int number; int num_remap; - int remap[MAX_WORDS]; + struct { + int word; + int index; + } remap[MAX_WORDS]; } RemapSpec; typedef struct _FileSpec { @@ -261,8 +267,49 @@ struct _FileSpec * pending; } FileSpec; +typedef struct { + char * model; + char * layout[XkbNumKbdGroups+1]; + char * variant[XkbNumKbdGroups+1]; + char * options; +} XkbRF_MultiDefsRec, *XkbRF_MultiDefsPtr; + +#define NDX_BUFF_SIZE 4 + /***====================================================================***/ +static char* +#if NeedFunctionPrototypes +get_index(char *str, int *ndx) +#else +get_index(str, ndx) + char *str; + int *ndx; +#endif +{ + char ndx_buf[NDX_BUFF_SIZE]; + char *end; + + if (*str != '[') { + *ndx = 0; + return str; + } + str++; + end = strchr(str, ']'); + if (end == NULL) { + *ndx = -1; + return str - 1; + } + if ( (end - str) >= NDX_BUFF_SIZE) { + *ndx = -1; + return end + 1; + } + strncpy(ndx_buf, str, end - str); + ndx_buf[end - str] = '\0'; + *ndx = atoi(ndx_buf); + return end + 1; +} + static void #if NeedFunctionPrototypes SetUpRemap(InputLine *line,RemapSpec *remap) @@ -273,16 +320,20 @@ #endif { char * tok,*str; -unsigned present; +unsigned present, l_ndx_present, v_ndx_present; register int i; +int len, ndx; +_Xstrtokparams strtok_buf; #ifdef DEBUG Bool found; #endif -_Xstrtokparams strtok_buf; + - present= 0; + l_ndx_present = v_ndx_present = present= 0; str= &line->line[1]; + len = remap->number; bzero((char *)remap,sizeof(RemapSpec)); + remap->number = len; while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) { #ifdef DEBUG found= False; @@ -291,17 +342,40 @@ if (strcmp(tok,"=")==0) continue; for (i=0;i<MAX_WORDS;i++) { - if (strcmp(cname[i],tok)==0) { + len = strlen(cname[i]); + if (strncmp(cname[i],tok,len)==0) { + if(strlen(tok) > len) { + char *end = get_index(tok+len, &ndx); + if ((i != LAYOUT && i != VARIANT) || + *end != '\0' || ndx == -1) + break; + if (ndx < 1 || ndx > XkbNumKbdGroups) { + PR_DEBUG2("Illegal %s index: %d\n", cname[i], ndx); + PR_DEBUG1("Index must be in range 1..%d\n", + XkbNumKbdGroups); + break; + } + } else { + ndx = 0; + } #ifdef DEBUG found= True; #endif if (present&(1<<i)) { - PR_DEBUG1("Component \"%s\" listed twice\n",tok); - PR_DEBUG("Second definition ignored\n"); - break; + if ((i == LAYOUT && l_ndx_present&(1<<ndx)) || + (i == VARIANT && v_ndx_present&(1<<ndx)) ) { + PR_DEBUG1("Component \"%s\" listed twice\n",tok); + PR_DEBUG("Second definition ignored\n"); + break; + } } - present|= (1<<i); - remap->remap[remap->num_remap++]= i; + present |= (1<<i); + if (i == LAYOUT) + l_ndx_present |= 1 << ndx; + if (i == VARIANT) + v_ndx_present |= 1 << ndx; + remap->remap[remap->num_remap].word= i; + remap->remap[remap->num_remap++].index= ndx; break; } } @@ -314,8 +388,8 @@ if ((present&PART_MASK)==0) { #ifdef DEBUG unsigned mask= PART_MASK; - fprintf(stderr,"Mapping needs at one of "); - for (i=0;(i<MAX_WORDS)&mask;i++) { + fprintf(stderr,"Mapping needs at least one of "); + for (i=0; (i<MAX_WORDS); i++) { if ((1L<<i)&mask) { mask&= ~(1L<<i); if (mask) fprintf(stderr,"\"%s,\" ",cname[i]); @@ -347,6 +421,7 @@ remap->num_remap= 0; return; } + remap->number++; return; } @@ -384,23 +459,52 @@ #if NeedFunctionPrototypes CheckLine( InputLine * line, RemapSpec * remap, - XkbRF_RulePtr rule) + XkbRF_RulePtr rule, + XkbRF_GroupPtr group) #else -CheckLine(line,remap,rule) +CheckLine(line,remap,rule,group) InputLine * line; RemapSpec * remap; XkbRF_RulePtr rule; + XkbRF_GroupsPtr group; #endif { char * str,*tok; -register int nread; +register int nread, i; FileSpec tmp; _Xstrtokparams strtok_buf; +Bool append = False; if (line->line[0]=='!') { - SetUpRemap(line,remap); - return False; + if (line->line[1] == '$' || + (line->line[1] == ' ' && line->line[2] == '$')) { + char *gname = strchr(line->line, '$'); + char *words = strchr(gname, ' '); + if(!words) + return False; + *words++ = '\0'; + for (; *words; words++) { + if (*words != '=' && *words != ' ') + break; + } + if (*words == '\0') + return False; + group->name = _XkbDupString(gname); + group->words = _XkbDupString(words); + for (i = 1, words = group->words; *words; words++) { + if ( *words == ' ') { + *words++ = '\0'; + i++; + } + } + group->number = i; + return True; + } else { + SetUpRemap(line,remap); + return False; + } } + if (remap->num_remap==0) { PR_DEBUG("Must have a mapping before first line of data\n"); PR_DEBUG("Illegal line of data ignored\n"); @@ -419,23 +523,24 @@ PR_DEBUG1("Extra word \"%s\" ignored\n",tok); continue; } - tmp.name[remap->remap[nread]]= tok; + tmp.name[remap->remap[nread].word]= tok; + if (*tok == '+' || *tok == '|') + append = True; } if (nread<remap->num_remap) { - PR_DEBUG("Too few words on a line\n"); + PR_DEBUG1("Too few words on a line: %s\n", line->line); PR_DEBUG("line ignored\n"); return False; } - if ((tmp.name[MODEL]!=NULL)&&(strcmp(tmp.name[MODEL],"*")==0)) - tmp.name[MODEL]= NULL; - if ((tmp.name[LAYOUT]!=NULL)&&(strcmp(tmp.name[LAYOUT],"*")==0)) - tmp.name[LAYOUT]= NULL; - if ((tmp.name[VARIANT]!=NULL)&&(strcmp(tmp.name[VARIANT],"*")==0)) - tmp.name[VARIANT]= NULL; rule->flags= 0; + rule->number = remap->number; if (tmp.name[OPTION]) - rule->flags|= XkbRF_Delayed|XkbRF_Append; + rule->flags|= XkbRF_Option; + else if (append) + rule->flags|= XkbRF_Append; + else + rule->flags|= XkbRF_Normal; rule->model= _XkbDupString(tmp.name[MODEL]); rule->layout= _XkbDupString(tmp.name[LAYOUT]); rule->variant= _XkbDupString(tmp.name[VARIANT]); @@ -447,6 +552,16 @@ rule->compat= _XkbDupString(tmp.name[COMPAT]); rule->geometry= _XkbDupString(tmp.name[GEOMETRY]); rule->keymap= _XkbDupString(tmp.name[KEYMAP]); + + rule->layout_num = rule->variant_num = 0; + for (i = 0; i < nread; i++) { + if (remap->remap[i].index) { + if (remap->remap[i].word == LAYOUT) + rule->layout_num = remap->remap[i].index; + if (remap->remap[i].word == VARIANT) + rule->variant_num = remap->remap[i].index; + } + } return True; } @@ -463,15 +578,128 @@ if ((!str1)||(!str2)) return str1; - len= strlen(str1)+strlen(str2)+1; + len= strlen(str1)+strlen(str2)+1; str1= _XkbTypedRealloc(str1,len,char); if (str1) strcat(str1,str2); return str1; } -Bool +static void +#if NeedFunctionPrototypes +squeeze_spaces(char *p1) +#else +squeeze_spaces(p1) + char *p1; +#endif +{ + char *p2; + for (p2 = p1; *p2; p2++) { + *p1 = *p2; + if (*p1 != ' ') p1++; + } + *p1 = '\0'; +} + +static Bool #if NeedFunctionPrototypes +MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) +#else +MakeMultiDefs(mdefs, defs) + XkbRF_MultiDefsPtr mdefs + XkbRF_VarDefsPtr defs; +#endif +{ + + bzero((char *)mdefs,sizeof(XkbRF_MultiDefsRec)); + mdefs->model = defs->model; + mdefs->options = _XkbDupString(defs->options); + if (mdefs->options) squeeze_spaces(mdefs->options); + + if (defs->layout) { + if (!strchr(defs->layout, ',')) { + mdefs->layout[0] = defs->layout; + } else { + char *p; + int i; + mdefs->layout[1] = _XkbDupString(defs->layout); + if (mdefs->layout[1] == NULL) + return False; + squeeze_spaces(mdefs->layout[1]); + p = mdefs->layout[1]; + for (i = 2; i <= XkbNumKbdGroups; i++) { + if ((p = strchr(p, ','))) { + *p++ = '\0'; + mdefs->layout[i] = p; + } else { + break; + } + } + if (p && (p = strchr(p, ','))) + *p = '\0'; + } + } + + if (defs->variant) { + if (!strchr(defs->variant, ',')) { + mdefs->variant[0] = defs->variant; + } else { + char *p; + int i; + mdefs->variant[1] = _XkbDupString(defs->variant); + if (mdefs->variant[1] == NULL) + return False; + squeeze_spaces(mdefs->variant[1]); + p = mdefs->variant[1]; + for (i = 2; i <= XkbNumKbdGroups; i++) { + if ((p = strchr(p, ','))) { + *p++ = '\0'; + mdefs->variant[i] = p; + } else { + break; + } + } + if (p && (p = strchr(p, ','))) + *p = '\0'; + } + } + return True; +} + +static void +#if NeedFunctionPrototypes +FreeMultiDefs(XkbRF_MultiDefsPtr defs) +#else +FreeMultiDefs(defs) + XkbRF_MultiDefsPtr defs; +#endif +{ + if (defs->options) _XkbFree(defs->options); + if (defs->layout[1]) _XkbFree(defs->layout[1]); + if (defs->variant[1]) _XkbFree(defs->variant[1]); +} + +static void +#if NeedFunctionPrototypes +Apply(char *src, char **dst) +#else +Apply(src, dst) + char *src; + char *dst; +#endif +{ + if (src) { + if (*src == '+' || *src == '!') { + *dst= _Concat(*dst, src); + } else { + if (*dst == NULL) + *dst= _XkbDupString(src); + } + } +} + +static void +#if NeedFunctionPrototypes XkbRF_ApplyRule( XkbRF_RulePtr rule, XkbComponentNamesPtr names) #else @@ -481,86 +709,129 @@ #endif { rule->flags&= ~XkbRF_PendingMatch; /* clear the flag because it's applied */ - if ((rule->flags&XkbRF_Append)==0) { - if ((names->keycodes==NULL)&&(rule->keycodes!=NULL)) - names->keycodes= _XkbDupString(rule->keycodes); - - if ((names->symbols==NULL)&&(rule->symbols!=NULL)) - names->symbols= _XkbDupString(rule->symbols); - - if ((names->types==NULL)&&(rule->types!=NULL)) - names->types= _XkbDupString(rule->types); - - if ((names->compat==NULL)&&(rule->compat!=NULL)) - names->compat= _XkbDupString(rule->compat); - if ((names->geometry==NULL)&&(rule->geometry!=NULL)) - names->geometry= _XkbDupString(rule->geometry); - - if ((names->keymap==NULL)&&(rule->keymap!=NULL)) - names->keymap= _XkbDupString(rule->keymap); - } - else { - if (rule->keycodes) - names->keycodes= _Concat(names->keycodes,rule->keycodes); - if (rule->symbols) - names->symbols= _Concat(names->symbols,rule->symbols); - if (rule->types) - names->types= _Concat(names->types,rule->types); - if (rule->compat) - names->compat= _Concat(names->compat,rule->compat); - if (rule->geometry) - names->geometry= _Concat(names->geometry,rule->geometry); - if (rule->keymap) - names->keymap= _Concat(names->keymap,rule->keymap); - } - return (names->keycodes && names->symbols && names->types && - names->compat && names->geometry ) || names->keymap; + Apply(rule->keycodes, &names->keycodes); + Apply(rule->symbols, &names->symbols); + Apply(rule->types, &names->types); + Apply(rule->compat, &names->compat); + Apply(rule->geometry, &names->geometry); + Apply(rule->keymap, &names->keymap); } -#define CHECK_MATCH(r,d) ((((r)[0]=='?')&&((r)[1]=='\0'))||(strcmp(r,d)==0)) +static Bool +#if NeedFunctionPrototypes +CheckGroup( XkbRF_RulesPtr rules, + char * group_name, + char * name) +#else +XkbRF_CheckApplyRule(rules,group,name) + XkbRF_RulesPtr rules; + char * group_name; + char * name; +#endif +{ + int i; + char *p; + XkbRF_GroupPtr group; + + for (i = 0, group = rules->groups; i < rules->num_groups; i++, group++) { + if (! strcmp(group->name, group_name)) { + break; + } + } + if (i == rules->num_groups) + return False; + for (i = 0, p = group->words; i < group->number; i++, p += strlen(p)+1) { + if (! strcmp(p, name)) { + return True; + } + } + return False; +} -Bool +static int #if NeedFunctionPrototypes XkbRF_CheckApplyRule( XkbRF_RulePtr rule, - XkbRF_VarDefsPtr defs, - XkbComponentNamesPtr names) + XkbRF_MultiDefsPtr mdefs, + XkbComponentNamesPtr names, + XkbRF_RulesPtr rules) #else -XkbRF_CheckApplyRule(rule,defs,names) +XkbRF_CheckApplyRule(rule,mdefs,names) XkbRF_RulePtr rule; - XkbRF_VarDefsPtr defs; + XkbRF_MultiDefsPtr mdefs; XkbComponentNamesPtr names; + XkbRF_RulesPtr rules; #endif { - if (rule->model!=NULL) { - if ((!defs->model)||(!CHECK_MATCH(rule->model,defs->model))) - return False; - } - if (rule->layout!=NULL) { - if ((!defs->layout)||(!CHECK_MATCH(rule->layout,defs->layout))) - return False; + Bool pending = False; + + if (rule->model != NULL) { + if(mdefs->model == NULL) + return 0; + if (strcmp(rule->model, "*") == 0) { + pending = True; + } else { + if (rule->model[0] == '$') { + if (!CheckGroup(rules, rule->model, mdefs->model)) + return 0; + } else { + if (strcmp(rule->model, mdefs->model) != 0) + return 0; + } + } } - if (rule->variant!=NULL) { - if ((!defs->variant)||(!CHECK_MATCH(rule->variant,defs->variant))) - return False; + if (rule->option != NULL) { + if (mdefs->options == NULL) + return 0; + if ((!MatchOneOf(rule->option,mdefs->options))) + return 0; + } + + if (rule->layout != NULL) { + if(mdefs->layout[rule->layout_num] == NULL || + *mdefs->layout[rule->layout_num] == '\0') + return 0; + if (strcmp(rule->layout, "*") == 0) { + pending = True; + } else { + if (rule->layout[0] == '$') { + if (!CheckGroup(rules, rule->layout, + mdefs->layout[rule->layout_num])) + return 0; + } else { + if (strcmp(rule->layout, mdefs->layout[rule->layout_num]) != 0) + return 0; + } + } } - if (rule->option!=NULL) { - if ((!defs->options)||(!MatchOneOf(rule->option,defs->options))) - return False; + if (rule->variant != NULL) { + if (mdefs->variant[rule->variant_num] == NULL || + *mdefs->variant[rule->variant_num] == '\0') + return 0; + if (strcmp(rule->variant, "*") == 0) { + pending = True; + } else { + if (rule->variant[0] == '$') { + if (!CheckGroup(rules, rule->variant, + mdefs->variant[rule->variant_num])) + return 0; + } else { + if (strcmp(rule->variant, + mdefs->variant[rule->variant_num]) != 0) + return 0; + } + } } - - if ((!rule->option)&& - ((!rule->model)||(!rule->layout)||(!rule->variant))) { - /* partial map -- partial maps are applied in the order they */ - /* appear, but all partial maps come before any options. */ - rule->flags|= XkbRF_PendingMatch; - return False; + if (pending) { + rule->flags|= XkbRF_PendingMatch; + return rule->number; } /* exact match, apply it now */ - return XkbRF_ApplyRule(rule,names); + XkbRF_ApplyRule(rule,names); + return rule->number; } -void +static void #if NeedFunctionPrototypes XkbRF_ClearPartialMatches(XkbRF_RulesPtr rules) #else @@ -576,7 +847,7 @@ } } -Bool +static void #if NeedFunctionPrototypes XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules,XkbComponentNamesPtr names) #else @@ -587,78 +858,57 @@ { int i; XkbRF_RulePtr rule; -Bool complete; - complete= False; - for (rule=rules->rules,i=0;(i<rules->num_rules)&&(!complete);i++,rule++) { + for (rule = rules->rules, i = 0; i < rules->num_rules; i++, rule++) { if ((rule->flags&XkbRF_PendingMatch)==0) - continue; - complete= XkbRF_ApplyRule(rule,names); - } - return complete; -} - -void -#if NeedFunctionPrototypes -XkbRF_CheckApplyDelayedRules( XkbRF_RulesPtr rules, - XkbRF_VarDefsPtr defs, - XkbComponentNamesPtr names) -#else -XkbRF_CheckApplyDelayedRules(rules,defs,names) - XkbRF_RulesPtr rules; - XkbRF_VarDefsPtr defs; - XkbComponentNamesPtr names; -#endif -{ -int i; -XkbRF_RulePtr rule; - - for (rule=rules->rules,i=0;(i<rules->num_rules);i++,rule++) { - if ((rule->flags&XkbRF_Delayed)==0) continue; - XkbRF_CheckApplyRule(rule,defs,names); + XkbRF_ApplyRule(rule,names); } - return; } -Bool +static void #if NeedFunctionPrototypes XkbRF_CheckApplyRules( XkbRF_RulesPtr rules, - XkbRF_VarDefsPtr defs, - XkbComponentNamesPtr names) + XkbRF_MultiDefsPtr mdefs, + XkbComponentNamesPtr names, + int flags) #else -XkbRF_CheckApplyRules(rules,defs,names) +XkbRF_CheckApplyRules(rules, mdefs, names, flags) XkbRF_RulesPtr rules; - XkbRF_VarDefsPtr defs; + XkbRF_MultiDefsPtr mdefs; XkbComponentNamesPtr names; + int flags; #endif { int i; XkbRF_RulePtr rule; -Bool complete; +int skip; - complete= False; - for (rule=rules->rules,i=0;(i<rules->num_rules)&&(!complete);i++,rule++) { - if ((rule->flags&XkbRF_Delayed)!=0) + for (rule = rules->rules, i=0; i < rules->num_rules; rule++, i++) { + if ((rule->flags & flags) != flags) continue; - complete= XkbRF_CheckApplyRule(rule,defs,names); + skip = XkbRF_CheckApplyRule(rule, mdefs, names, rules); + if (skip && !(flags & XkbRF_Option)) { + for ( ;(i < rules->num_rules) && (rule->number == skip); + rule++, i++); + rule--; i--; + } } - return complete; } /***====================================================================***/ -char * +static char * #if NeedFunctionPrototypes -XkbRF_SubstituteVars(char *name,XkbRF_VarDefsPtr defs) +XkbRF_SubstituteVars(char *name, XkbRF_MultiDefsPtr mdefs) #else -XkbRF_SubstituteVars(name,defs) +XkbRF_SubstituteVars(name, mdefs) char * name; - XkbRF_VarDefsPtr defs; + XkbRF_MultiDefsPtr mdefs; #endif { -char *str,*outstr,*orig; -int len; +char *str, *outstr, *orig, *var; +int len, ndx; orig= name; str= index(name,'%'); @@ -676,17 +926,22 @@ extra_len= 2; str++; } - - if ((str[1]=='l')&&defs->layout) - len+= strlen(defs->layout)+extra_len; - else if ((str[1]=='m')&&defs->model) - len+= strlen(defs->model)+extra_len; - else if ((str[1]=='v')&&defs->variant) - len+= strlen(defs->variant)+extra_len; - if ((pfx=='(')&&(str[2]==')')) { + var = str + 1; + str = get_index(var + 1, &ndx); + if (ndx == -1) { + str = index(str,'%'); + continue; + } + if ((*var=='l') && mdefs->layout[ndx] && *mdefs->layout[ndx]) + len+= strlen(mdefs->layout[ndx])+extra_len; + else if ((*var=='m')&&mdefs->model) + len+= strlen(mdefs->model)+extra_len; + else if ((*var=='v') && mdefs->variant[ndx] && *mdefs->variant[ndx]) + len+= strlen(mdefs->variant[ndx])+extra_len; + if ((pfx=='(')&&(*str==')')) { str++; } - str= index(&str[1],'%'); + str= index(&str[0],'%'); } name= (char *)_XkbAlloc(len+1); str= orig; @@ -706,26 +961,30 @@ } else pfx= '\0'; - if ((str[0]=='l')&&(defs->layout)) { + var = str; + str = get_index(var + 1, &ndx); + if (ndx == -1) { + continue; + } + if ((*var=='l') && mdefs->layout[ndx] && *mdefs->layout[ndx]) { if (pfx) *outstr++= pfx; - strcpy(outstr,defs->layout); - outstr+= strlen(defs->layout); + strcpy(outstr,mdefs->layout[ndx]); + outstr+= strlen(mdefs->layout[ndx]); if (sfx) *outstr++= sfx; } - else if ((str[0]=='m')&&(defs->model)) { + else if ((*var=='m')&&(mdefs->model)) { if (pfx) *outstr++= pfx; - strcpy(outstr,defs->model); - outstr+= strlen(defs->model); + strcpy(outstr,mdefs->model); + outstr+= strlen(mdefs->model); if (sfx) *outstr++= sfx; } - else if ((str[0]=='v')&&(defs->variant)) { + else if ((*var=='v') && mdefs->variant[ndx] && *mdefs->variant[ndx]) { if (pfx) *outstr++= pfx; - strcpy(outstr,defs->variant); - outstr+= strlen(defs->variant); + strcpy(outstr,mdefs->variant[ndx]); + outstr+= strlen(mdefs->variant[ndx]); if (sfx) *outstr++= sfx; } - str++; - if ((pfx=='(')&&(str[0]==')')) + if ((pfx=='(')&&(*str==')')) str++; } else { @@ -752,26 +1011,32 @@ XkbComponentNamesPtr names; #endif { -Bool complete; + XkbRF_MultiDefsRec mdefs; + + MakeMultiDefs(&mdefs, defs); bzero((char *)names,sizeof(XkbComponentNamesRec)); XkbRF_ClearPartialMatches(rules); - complete= XkbRF_CheckApplyRules(rules,defs,names); - if (!complete) - complete= XkbRF_ApplyPartialMatches(rules,names); - XkbRF_CheckApplyDelayedRules(rules,defs,names); + XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Normal); + XkbRF_ApplyPartialMatches(rules, names); + XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Append); + XkbRF_ApplyPartialMatches(rules, names); + XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Option); + if (names->keycodes) - names->keycodes= XkbRF_SubstituteVars(names->keycodes,defs); + names->keycodes= XkbRF_SubstituteVars(names->keycodes, &mdefs); if (names->symbols) - names->symbols= XkbRF_SubstituteVars(names->symbols,defs); + names->symbols= XkbRF_SubstituteVars(names->symbols, &mdefs); if (names->types) - names->types= XkbRF_SubstituteVars(names->types,defs); + names->types= XkbRF_SubstituteVars(names->types, &mdefs); if (names->compat) - names->compat= XkbRF_SubstituteVars(names->compat,defs); + names->compat= XkbRF_SubstituteVars(names->compat, &mdefs); if (names->geometry) - names->geometry= XkbRF_SubstituteVars(names->geometry,defs); + names->geometry= XkbRF_SubstituteVars(names->geometry, &mdefs); if (names->keymap) - names->keymap= XkbRF_SubstituteVars(names->keymap,defs); + names->keymap= XkbRF_SubstituteVars(names->keymap, &mdefs); + + FreeMultiDefs(&mdefs); return (names->keycodes && names->symbols && names->types && names->compat && names->geometry ) || names->keymap; } @@ -805,6 +1070,33 @@ return &rules->rules[rules->num_rules++]; } +XkbRF_GroupPtr +#if NeedFunctionPrototypes +XkbRF_AddGroup(XkbRF_RulesPtr rules) +#else +XkbRF_AddGroup(rules) + XkbRF_RulesPtr rules; +#endif +{ + if (rules->sz_groups<1) { + rules->sz_groups= 16; + rules->num_groups= 0; + rules->groups= _XkbTypedCalloc(rules->sz_groups,XkbRF_GroupRec); + } + else if (rules->num_groups >= rules->sz_groups) { + rules->sz_groups *= 2; + rules->groups= _XkbTypedRealloc(rules->groups,rules->sz_groups, + XkbRF_GroupRec); + } + if (!rules->groups) { + rules->sz_groups= rules->num_groups= 0; + return NULL; + } + + bzero((char *)&rules->groups[rules->num_groups],sizeof(XkbRF_GroupRec)); + return &rules->groups[rules->num_groups++]; +} + Bool #if NeedFunctionPrototypes XkbRF_LoadRules(FILE *file, XkbRF_RulesPtr rules) @@ -817,16 +1109,25 @@ InputLine line; RemapSpec remap; XkbRF_RuleRec trule,*rule; +XkbRF_GroupRec tgroup,*group; if (!(rules && file)) return False; bzero((char *)&remap,sizeof(RemapSpec)); + bzero((char *)&tgroup,sizeof(XkbRF_GroupRec)); InitInputLine(&line); while (GetInputLine(file,&line,True)) { - if (CheckLine(&line,&remap,&trule)) { - if ((rule= XkbRF_AddRule(rules))!=NULL) { - *rule= trule; - bzero((char *)&trule,sizeof(XkbRF_RuleRec)); + if (CheckLine(&line,&remap,&trule,&tgroup)) { + if (tgroup.number) { + if ((group= XkbRF_AddGroup(rules))!=NULL) { + *group= tgroup; + bzero((char *)&tgroup,sizeof(XkbRF_GroupRec)); + } + } else { + if ((rule= XkbRF_AddRule(rules))!=NULL) { + *rule= trule; + bzero((char *)&trule,sizeof(XkbRF_RuleRec)); + } } } line.num_line= 0; @@ -1198,6 +1499,7 @@ { int i; XkbRF_RulePtr rule; +XkbRF_GroupPtr group; if (!rules) return; @@ -1230,6 +1532,16 @@ _XkbFree(rules->rules); rules->num_rules= rules->sz_rules= 0; rules->rules= NULL; + } + + if (rules->groups) { + for (i=0, group=rules->groups;i<rules->num_groups;i++,group++) { + if (group->name) _XkbFree(group->name); + if (group->words) _XkbFree(group->words); + } + _XkbFree(rules->groups); + rules->num_groups= 0; + rules->groups= NULL; } if (freeRules) _XkbFree(rules); Index: xc/lib/xkbfile/xkberrs.c diff -u xc/lib/xkbfile/xkberrs.c:3.4 xc/lib/xkbfile/xkberrs.c:3.5 --- xc/lib/xkbfile/xkberrs.c:3.4 Sun Jul 29 01:01:13 2001 +++ xc/lib/xkbfile/xkberrs.c Fri Nov 8 08:35:43 2002 @@ -24,14 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkberrs.c,v 3.4 2001/07/29 05:01:13 tsi Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkberrs.c,v 3.5 2002/11/08 13:35:43 alanh Exp $ */ #include <stdio.h> #include <ctype.h> #include <stdlib.h> -#include <X11/Xlib.h> -#include <X11/XKBlib.h> -#include <X11/extensions/XKBfile.h> char * _XkbErrMessages[] = { "success", /* _XkbSuccess */ Index: xc/lib/xkbfile/xkbmisc.c diff -u xc/lib/xkbfile/xkbmisc.c:1.3 xc/lib/xkbfile/xkbmisc.c:1.4 --- xc/lib/xkbfile/xkbmisc.c:1.3 Sun Jul 29 01:01:13 2001 +++ xc/lib/xkbfile/xkbmisc.c Fri Dec 20 15:18:35 2002 @@ -24,14 +24,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbmisc.c,v 1.3 2001/07/29 05:01:13 tsi Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbmisc.c,v 1.4 2002/12/20 20:18:35 paulo Exp $ */ #include <stdio.h> #include <ctype.h> #include <stdlib.h> -#define XK_CYRILLIC - #include <X11/Xos.h> #include <X11/Xfuncs.h> @@ -69,19 +67,78 @@ #endif { unsigned set,rtrn; -unsigned char ch; - set= (ks & (~0xff)); - ch= (char)(ks&0xff); + set= (ks & (~0xff)) >> 8; rtrn= 0; switch (set) { case 0: /* latin 1 */ - if (((ch>=XK_A)&&(ch<=XK_Z))|| - ((ch>=XK_Agrave)&&(ch<=XK_THORN)&&(ch!=XK_multiply))) { + if (((ks>=XK_A)&&(ks<=XK_Z))|| + ((ks>=XK_Agrave)&&(ks<=XK_THORN)&&(ks!=XK_multiply))) { + rtrn|= _XkbKSUpper; + } + if (((ks>=XK_a)&&(ks<=XK_z))|| + ((ks>=XK_agrave)&&(ks<=XK_ydiaeresis))) { + rtrn|= _XkbKSLower; + } + break; + case 1: /* latin 2 */ + if (((ks>=XK_Aogonek)&&(ks<=XK_Zabovedot)&&(ks!=XK_breve))|| + ((ks>=XK_Racute)&&(ks<=XK_Tcedilla))) { + rtrn|= _XkbKSUpper; + } + if (((ks>=XK_aogonek)&&(ks<=XK_zabovedot)&&(ks!=XK_caron))|| + ((ks>=XK_racute)&&(ks<=XK_tcedilla))) { + rtrn|= _XkbKSLower; + } + break; + case 2: /* latin 3 */ + if (((ks>=XK_Hstroke)&&(ks<=XK_Jcircumflex))|| + ((ks>=XK_Cabovedot)&&(ks<=XK_Scircumflex))) { + rtrn|= _XkbKSUpper; + } + if (((ks>=XK_hstroke)&&(ks<=XK_jcircumflex))|| + ((ks>=XK_cabovedot)&&(ks<=XK_scircumflex))) { + rtrn|= _XkbKSLower; + } + break; + case 3: /* latin 4 */ + if (((ks>=XK_Rcedilla)&&(ks<=XK_Tslash))|| + (ks==XK_ENG)|| + ((ks>=XK_Amacron)&&(ks<=XK_Umacron))) { + rtrn|= _XkbKSUpper; + } + if (((ks>=XK_rcedilla)&&(ks<=XK_tslash))|| + (ks==XK_eng)|| + ((ks>=XK_amacron)&&(ks<=XK_umacron))) { + rtrn|= _XkbKSLower; + } + break; + case 18: /* latin 8 */ + if ((ks==XK_Babovedot)|| + ((ks>=XK_Dabovedot)&&(ks<=XK_Wacute))|| + ((ks>=XK_Ygrave)&&(ks<=XK_Fabovedot))|| + (ks==XK_Mabovedot)|| + (ks==XK_Pabovedot)|| + (ks==XK_Sabovedot)|| + (ks==XK_Wdiaeresis)|| + ((ks>=XK_Wcircumflex)&&(ks<=XK_Ycircumflex))) { + rtrn|= _XkbKSUpper; + } + if ((ks==XK_babovedot)|| + (ks==XK_dabovedot)|| + (ks==XK_fabovedot)|| + (ks==XK_mabovedot)|| + ((ks>=XK_wgrave)&&(ks<=XK_wacute))|| + (ks==XK_ygrave)|| + ((ks>=XK_wdiaeresis)&&(ks<=XK_ycircumflex))) { + rtrn|= _XkbKSLower; + } + break; + case 19: /* latin 9 */ + if ((ks==XK_OE)||(ks==XK_Ydiaeresis)) { rtrn|= _XkbKSUpper; } - if (((ch>=XK_a)&&(ch<=XK_z))|| - ((ch>=XK_agrave)&&(ch<=XK_ydiaeresis))) { + if (ks==XK_oe) { rtrn|= _XkbKSLower; } break; Index: xc/lib/xkbfile/xkbtext.c diff -u xc/lib/xkbfile/xkbtext.c:3.10 xc/lib/xkbfile/xkbtext.c:3.11 --- xc/lib/xkbfile/xkbtext.c:3.10 Sat Oct 27 23:32:47 2001 +++ xc/lib/xkbfile/xkbtext.c Sat Dec 21 13:49:02 2002 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.10 2001/10/28 03:32:47 tsi Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.11 2002/12/21 18:49:02 paulo Exp $ */ #include <stdio.h> #include <ctype.h> @@ -873,7 +873,7 @@ } return rtrn; } - sprintf(buf,"0x%x",type); + sprintf(buf,"Private"); return buf; } Index: xc/lib/xkbfile/xkmread.c diff -u xc/lib/xkbfile/xkmread.c:1.5 xc/lib/xkbfile/xkmread.c:1.6 --- xc/lib/xkbfile/xkmread.c:1.5 Wed Jul 25 11:04:58 2001 +++ xc/lib/xkbfile/xkmread.c Wed Feb 13 17:09:42 2002 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.5 2001/07/25 15:04:58 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.6 2002/02/13 22:09:42 herrb Exp $ */ #include <stdio.h> @@ -171,7 +171,7 @@ int * pNRead; #endif { -unsigned long val; +CARD32 val; if ((fread(&val,4,1,file)==1)&&(pNRead)) (*pNRead)+= 4; Index: xc/lib/xtrans/Xtrans.c diff -u xc/lib/xtrans/Xtrans.c:3.26 xc/lib/xtrans/Xtrans.c:3.28 --- xc/lib/xtrans/Xtrans.c:3.26 Fri Dec 14 14:57:04 2001 +++ xc/lib/xtrans/Xtrans.c Wed Nov 20 18:00:36 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtrans.c,v 3.26 2001/12/14 19:57:04 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtrans.c,v 3.28 2002/11/20 23:00:36 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -100,9 +100,6 @@ #endif /* !LOCALCONN */ { &TRANS(SocketUNIXFuncs), TRANS_SOCKET_UNIX_INDEX }, #endif /* UNIXCONN */ -#if defined(OS2PIPECONN) - { &TRANS(OS2LocalFuncs), TRANS_LOCAL_LOCAL_INDEX }, -#endif /* OS2PIPECONN */ #if defined(LOCALCONN) { &TRANS(LocalFuncs), TRANS_LOCAL_LOCAL_INDEX }, #ifndef sun @@ -112,7 +109,9 @@ { &TRANS(NAMEDFuncs), TRANS_LOCAL_NAMED_INDEX }, #endif #ifndef sun +#ifndef SCO325 { &TRANS(ISCFuncs), TRANS_LOCAL_ISC_INDEX }, +#endif { &TRANS(SCOFuncs), TRANS_LOCAL_SCO_INDEX }, #endif /* sun */ #endif /* LOCALCONN */ @@ -671,7 +670,7 @@ break; case 1: /* Set to non-blocking mode */ -#if defined(O_NONBLOCK) && (!defined(ultrix) && !defined(hpux) && !defined(AIXV3) && !defined(uniosu) && !defined(__EMX__) && !defined(SCO)) && !defined(__QNX__) +#if defined(O_NONBLOCK) && (!defined(ultrix) && !defined(hpux) && !defined(AIXV3) && !defined(uniosu) && !defined(__UNIXOS2__) && !defined(SCO)) && !defined(__QNX__) ret = fcntl (fd, F_GETFL, 0); if (ret != -1) ret = fcntl (fd, F_SETFL, ret | O_NONBLOCK); @@ -683,13 +682,13 @@ ret = ioctl (fd, FIOSNBIO, &arg); } #else -#if (defined(AIXV3) || defined(uniosu) || defined(WIN32) || defined(__EMX__) || defined(__QNX__)) && defined(FIONBIO) +#if (defined(AIXV3) || defined(uniosu) || defined(WIN32) || defined(__UNIXOS2__) || defined(__QNX__)) && defined(FIONBIO) { int arg; arg = 1; /* IBM TCP/IP understands this option too well: it causes TRANS(Read) to fail * eventually with EWOULDBLOCK */ -#ifndef __EMX__ +#ifndef __UNIXOS2__ ret = ioctl (fd, FIONBIO, &arg); #else /* ret = ioctl(fd, FIONBIO, &arg, sizeof(int));*/ @@ -1236,7 +1235,7 @@ #endif /* CRAY */ -#if (defined(SYSV) && defined(i386) && !defined(SCO325)) || defined(WIN32) || defined(__sxg__) || defined(__EMX__) +#if (defined(SYSV) && defined(i386) && !defined(SCO325)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) /* * emulate readv @@ -1268,7 +1267,7 @@ #endif /* SYSV && i386 || WIN32 || __sxg__ */ -#if (defined(SYSV) && defined(i386) && !defined(SCO325)) || defined(WIN32) || defined(__sxg__) || defined(__EMX__) +#if (defined(SYSV) && defined(i386) && !defined(SCO325)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) /* * emulate writev Index: xc/lib/xtrans/Xtransdnet.c diff -u xc/lib/xtrans/Xtransdnet.c:3.6 xc/lib/xtrans/Xtransdnet.c:3.7 --- xc/lib/xtrans/Xtransdnet.c:3.6 Fri Dec 14 14:57:05 2001 +++ xc/lib/xtrans/Xtransdnet.c Mon Nov 25 20:12:30 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransdnet.c,v 3.6 2001/12/14 19:57:05 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransdnet.c,v 3.7 2002/11/26 01:12:30 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -377,7 +377,7 @@ /* Set a flag to indicate that this connection is a listener */ - ciptr->flags = 1; + ciptr->flags = 1 | (ciptr->flags & TRANS_KEEPFLAGS); return 0; } Index: xc/lib/xtrans/Xtransint.h diff -u xc/lib/xtrans/Xtransint.h:3.31 xc/lib/xtrans/Xtransint.h:3.35 --- xc/lib/xtrans/Xtransint.h:3.31 Fri Dec 14 14:57:05 2001 +++ xc/lib/xtrans/Xtransint.h Mon Nov 25 20:12:30 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransint.h,v 3.31 2001/12/14 19:57:05 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransint.h,v 3.35 2002/11/26 01:12:30 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -72,10 +72,12 @@ * message. */ -#ifndef __EMX__ +#ifndef XTRANSDEBUG +# ifndef __UNIXOS2__ # define XTRANSDEBUG 1 -#else -#define XTRANSDEBUG 1 +# else +# define XTRANSDEBUG 1 +# endif #endif #ifdef WIN32 @@ -98,7 +100,7 @@ #endif #include <netinet/in.h> #include <arpa/inet.h> -#ifdef __EMX__ +#ifdef __UNIXOS2__ #include <sys/ioctl.h> #endif @@ -144,7 +146,7 @@ #ifdef NOFILE #define OPEN_MAX NOFILE #else -#if !defined(__EMX__) && !defined(__QNX__) +#if !defined(__UNIXOS2__) && !defined(__QNX__) #define OPEN_MAX NOFILES_MAX #else #define OPEN_MAX 256 @@ -166,7 +168,7 @@ #endif /* TRANS_OPEN_MAX */ -#ifdef __EMX__ +#ifdef __UNIXOS2__ #define ESET(val) #else #define ESET(val) errno = val @@ -366,14 +368,17 @@ #define TRANS_LOCAL (1<<1) /* local transport */ #define TRANS_DISABLED (1<<2) /* Don't open this one */ #define TRANS_NOLISTEN (1<<3) /* Don't listen on this one */ +#define TRANS_NOUNLINK (1<<4) /* Dont unlink transport endpoints */ +/* Flags to preserve when setting others */ +#define TRANS_KEEPFLAGS (TRANS_NOUNLINK) /* * readv() and writev() don't exist or don't work correctly on some * systems, so they may be emulated. */ -#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(SCO325)) || defined(WIN32) || defined(__sxg__) || defined(__EMX__) +#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(SCO325)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) #define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt) @@ -390,7 +395,7 @@ #endif /* CRAY || (SYSV && i386) || WIN32 || __sxg__ || */ -#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(SCO325)) || defined(WIN32) || defined(__sxg__) || defined(__EMX__) +#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(SCO325)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) #define WRITEV(ciptr, iov, iovcnt) TRANS(WriteV)(ciptr, iov, iovcnt) Index: xc/lib/xtrans/Xtranslcl.c diff -u xc/lib/xtrans/Xtranslcl.c:3.37 xc/lib/xtrans/Xtranslcl.c:3.39 --- xc/lib/xtrans/Xtranslcl.c:3.37 Fri Dec 14 14:57:05 2001 +++ xc/lib/xtrans/Xtranslcl.c Mon Nov 25 20:12:30 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtranslcl.c,v 3.37 2001/12/14 19:57:05 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtranslcl.c,v 3.39 2002/11/26 01:12:30 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -836,12 +836,15 @@ #ifndef sun + +/* SCO doesnt use the ISC transport type - it causes problems */ +#ifndef SCO325 + /* - * connect_spipe is used by both the SCO and ISC connection types. + * connect_spipe is used by the ISC connection type. */ static int connect_spipe(int fd1, int fd2) - { long temp; struct strfdinsert sbuf; @@ -863,7 +866,7 @@ } /* - * connect_spipe is used by both the SCO and ISC connection types. + * named_spipe is used by ISC connection type. */ static int @@ -885,7 +888,7 @@ } else { ret = fd; } - + return(ret); } @@ -907,9 +910,9 @@ mode_t spmode; struct stat filestat; #endif - + PRMSG(2,"ISCOpenClient(%s)\n", port, 0,0 ); - + #if !defined(ISCDEVNODENAME) PRMSG(1,"ISCOpenClient: Protocol is not supported by a ISC connection\n", 0,0,0); return -1; @@ -934,7 +937,7 @@ } } } - + if (server < 0) { /* try the alternate path */ if (stat(server_dev_path, &filestat) != -1) { @@ -946,7 +949,7 @@ } } } - + if (server < 0) { PRMSG(1,"ISCOpenClient: can't open either device %s or %s\n", server_path, server_dev_path, 0 ); @@ -976,7 +979,7 @@ buf.offset = 0; buf.fildes = fd; buf.flags = 0; - + if (ioctl(fds, I_FDINSERT, &buf) < 0 || ioctl(server, I_SENDFD, fds) < 0) { PRMSG(1,"ISCOpenClient: ioctl(I_FDINSERT or I_SENDFD) failed\n", @@ -990,7 +993,7 @@ /* * Everything looks good: fill in the XtransConnInfo structure. */ - + if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0) { PRMSG(1,"ISCOpenClient: failed to fill in addr info\n", @@ -1018,16 +1021,16 @@ char server_path[64],server_unix_path[64]; unsigned int mode = 0; #endif - + PRMSG(2,"ISCOpenServer(%s)\n", port, 0,0 ); - + #if !defined(ISCDEVNODENAME) PRMSG(1,"ISCOpenServer: Protocol is not supported by a ISC connection\n", 0,0,0); return -1; #else (void) sprintf(server_path, ISCDEVNODENAME, port); (void) sprintf(server_unix_path, ISCTMPNODENAME, port); - + #ifdef HAS_STICKY_DIR_BIT mode = 01777; #else @@ -1046,15 +1049,15 @@ X_ISC_DIR, errno, 0); return(-1); } - + unlink(server_path); - + if( ((fds=open(DEV_SPX, O_RDWR)) < 0) || ((fd =open(DEV_SPX, O_RDWR)) < 0)) { PRMSG(1,"ISCOpenServer: failed to open %s\n", DEV_SPX, 0,0 ); return -1; } - + if( (connect_spipe(fds, fd) < 0) || (named_spipe(fds, server_path) < 0)) { PRMSG(1,"ISCOpenServer: failed connect pipes\n", 0,0,0 ); @@ -1062,22 +1065,22 @@ close(fds); return -1; } - + #if !defined(UNIXCONN) /* * If the UNIX Domain socket transport is not being used, then link this * device to the path /tmp/.X11-unix/X path. */ #define X_UNIX_DIR "/tmp/.X11-unix" - + if (trans_mkdir(X_UNIX_DIR, mode) == -1) { PRMSG (1, "ISCOpenServer: mkdir(%s) failed, errno = %d\n", X_UNIX_DIR, errno, 0); return(-1); } - + unlink(server_unix_path); - + #ifdef SVR4 /* we prefer symbolic links because hard links can't cross file systems */ if( symlink(server_path, server_unix_path) < 0 ) @@ -1104,11 +1107,11 @@ */ #endif /* SVR4 */ #endif /* !UNIXCONN */ - + /* * Everything looks good: fill in the XtransConnInfo structure. */ - + if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0) { PRMSG(1,"ISCOpenServer: failed to fill in addr info\n", @@ -1127,9 +1130,9 @@ { struct strrecvfd str; - + PRMSG(2,"ISCAccept(%d)\n", ciptr->fd, 0,0 ); - + while (ioctl(ciptr->fd, I_RECVFD, &str) < 0) { if (errno != EAGAIN) { PRMSG(1,"ISCAccept: Can't read fildes", 0,0,0 ); @@ -1137,11 +1140,11 @@ return(-1); } } - + /* * Everything looks good: fill in the XtransConnInfo structure. */ - + newciptr->addrlen=ciptr->addrlen; if( (newciptr->addr=(char *)xalloc(newciptr->addrlen)) == NULL ) { PRMSG(1, @@ -1151,9 +1154,9 @@ *status = TRANS_ACCEPT_BAD_MALLOC; return -1; } - + memcpy(newciptr->addr,ciptr->addr,newciptr->addrlen); - + newciptr->peeraddrlen=newciptr->addrlen; if( (newciptr->peeraddr=(char *)xalloc(newciptr->peeraddrlen)) == NULL ) { PRMSG(1, @@ -1164,25 +1167,33 @@ *status = TRANS_ACCEPT_BAD_MALLOC; return -1; } - + memcpy(newciptr->peeraddr,newciptr->addr,newciptr->peeraddrlen); - + *status = 0; return(str.fd); } #endif /* TRANS_SERVER */ +#endif /* !SCO325 */ - /* SCO */ +/* + * 2002-11-09 (jkj@sco.com) + * + * This code has been modified to match what is in the actual SCO X server. + * This greatly helps inter-operability between X11R6 and X11R5 (the native + * SCO server). Mainly, it relies on streams nodes existing in /dev, not + * creating them or unlinking them, which breaks the native X server. + */ + #ifdef TRANS_CLIENT static int TRANS(SCOOpenClient)(XtransConnInfo ciptr, char *port) - { #ifdef SCORNODENAME int fd, server, fl, ret; @@ -1193,60 +1204,61 @@ long temp; extern int getmsg(), putmsg(); #endif - + PRMSG(2,"SCOOpenClient(%s)\n", port, 0,0 ); - + #if !defined(SCORNODENAME) PRMSG(1,"SCOOpenClient: Protocol is not supported by a SCO connection\n", 0,0,0); return -1; #else (void) sprintf(server_path, SCORNODENAME, port); - + if ((server = open(server_path, O_RDWR)) < 0) { PRMSG(1,"SCOOpenClient: failed to open %s\n", server_path, 0,0 ); return -1; } - + if ((fd = open(DEV_SPX, O_RDWR)) < 0) { PRMSG(1,"SCOOpenClient: failed to open %s\n", DEV_SPX, 0,0 ); close(server); return -1; } - + (void) write(server, &server, 1); ctlbuf.len = 0; ctlbuf.maxlen = sizeof(long); ctlbuf.buf = (caddr_t)&temp; fl = 0; - + savef = signal(SIGALRM, _dummy); alarm_time = alarm(10); - + ret = getmsg(server, &ctlbuf, 0, &fl); - + (void) alarm(alarm_time); (void) signal(SIGALRM, savef); - + if (ret < 0) { PRMSG(1,"SCOOpenClient: error from getmsg\n", 0,0,0 ); close(fd); close(server); return -1; } - + /* The msg we got via getmsg is the result of an * I_FDINSERT, so if we do a putmsg with whatever * we recieved, we're doing another I_FDINSERT ... */ (void) putmsg(fd, &ctlbuf, 0, 0); (void) fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0)|O_NDELAY); - + (void) close(server); - + /* * Everything looks good: fill in the XtransConnInfo structure. */ - + + ciptr->flags |= TRANS_NOUNLINK; if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0) { PRMSG(1,"SCOOpenClient: failed to fill addr info\n", @@ -1254,7 +1266,7 @@ close(fd); return -1; } - + return(fd); #endif /* !SCORNODENAME */ @@ -1267,57 +1279,82 @@ static int TRANS(SCOOpenServer)(XtransConnInfo ciptr, char *port) - { #ifdef SCORNODENAME char serverR_path[64]; char serverS_path[64]; - int fdr = -1; - int fds = -1; + struct flock mylock; + int fdr = -1; + int fds = -1; + long temp; + struct strfdinsert sbuf; #endif - + PRMSG(2,"SCOOpenServer(%s)\n", port, 0,0 ); - + #if !defined(SCORNODENAME) PRMSG(1,"SCOOpenServer: Protocol is not supported by a SCO connection\n", 0,0,0); return -1; #else (void) sprintf(serverR_path, SCORNODENAME, port); (void) sprintf(serverS_path, SCOSNODENAME, port); - - unlink(serverR_path); - unlink(serverS_path); - - if ((fds = open(DEV_SPX, O_RDWR)) < 0 || - (fdr = open(DEV_SPX, O_RDWR)) < 0 ) { - PRMSG(2,"SCOOpenServer: failed to open %s\n", DEV_SPX, 0,0 ); + + fds = open (serverS_path, O_RDWR | O_NDELAY); + if (fds < 0) { + PRMSG(1,"SCOOpenServer: failed to open %s", serverS_path, 0, 0); return -1; } - - if (connect_spipe(fds, fdr) != -1 && - named_spipe(fds, serverS_path) != -1 && - named_spipe(fdr, serverR_path) != -1) { - PRMSG(2,"SCOOpenServer: connect pipes\n", 0,0,0 ); - } else { - PRMSG(2,"SCOOpenServer: failed to connect pipes\n", 0,0,0 ); - close(fds); - close(fdr); + + /* + * Lock the connection device for the duration of the server. + * This resolves multiple server starts especially on SMP machines. + */ + mylock.l_type = F_WRLCK; + mylock.l_whence = 0; + mylock.l_start = 0; + mylock.l_len = 0; + if (fcntl (fds, F_SETLK, &mylock) < 0) { + PRMSG(1,"SCOOpenServer: failed to lock %s", serverS_path, 0, 0); + close (fds); + return -1; + } + + fdr = open (serverR_path, O_RDWR | O_NDELAY); + if (fds < 0) { + PRMSG(1,"SCOOpenServer: failed to open %s", serverR_path, 0, 0); + close (fds); return -1; } - + + sbuf.databuf.maxlen = 0; + sbuf.databuf.len = -1; + sbuf.databuf.buf = NULL; + sbuf.ctlbuf.maxlen = sizeof(long); + sbuf.ctlbuf.len = sizeof(long); + sbuf.ctlbuf.buf = (caddr_t)&temp; + sbuf.offset = 0; + sbuf.flags = 0; + sbuf.fildes = fdr; + + if (ioctl(fds, I_FDINSERT, &sbuf) < 0) { + PRMSG(1,"SCOOpenServer: ioctl(I_FDINSERT) failed on %s", serverS_path, 0, 0); + close (fdr); + close (fds); + return -1; + } + /* * Everything looks good: fill in the XtransConnInfo structure. */ - - if (TRANS(FillAddrInfo) (ciptr, serverS_path, serverR_path) == 0) - { - PRMSG(1,"SCOOpenServer: failed to fill in addr info\n", - 0,0,0); + + ciptr->flags |= TRANS_NOUNLINK; + if (TRANS(FillAddrInfo) (ciptr, serverS_path, serverR_path) == 0) { + PRMSG(1,"SCOOpenServer: failed to fill in addr info\n", 0,0,0); close(fds); close(fdr); return -1; } - + return(fds); #endif /* !SCORNODENAME */ @@ -1325,36 +1362,47 @@ static int TRANS(SCOAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status) - { - char c; - int fd; - + char c; + int fd; + long temp; + struct strfdinsert sbuf; + PRMSG(2,"SCOAccept(%d)\n", ciptr->fd, 0,0 ); - + if (read(ciptr->fd, &c, 1) < 0) { PRMSG(1,"SCOAccept: can't read from client",0,0,0); *status = TRANS_ACCEPT_MISC_ERROR; return(-1); } - + if( (fd = open(DEV_SPX, O_RDWR)) < 0 ) { PRMSG(1,"SCOAccept: can't open \"%s\"",DEV_SPX, 0,0 ); *status = TRANS_ACCEPT_MISC_ERROR; return(-1); } - - if (connect_spipe(ciptr->fd, fd) < 0) { - PRMSG(1,"SCOAccept: can't connect pipes", 0,0,0 ); - (void) close(fd); + + sbuf.databuf.maxlen = 0; + sbuf.databuf.len = -1; + sbuf.databuf.buf = NULL; + sbuf.ctlbuf.maxlen = sizeof(long); + sbuf.ctlbuf.len = sizeof(long); + sbuf.ctlbuf.buf = (caddr_t)&temp; + sbuf.offset = 0; + sbuf.flags = 0; + sbuf.fildes = fd; + + if (ioctl(ciptr->fd, I_FDINSERT, &sbuf) < 0) { + PRMSG(1,"SCOAccept: ioctl(I_FDINSERT) failed", 0, 0, 0); + close (fd); *status = TRANS_ACCEPT_MISC_ERROR; - return(-1); + return -1; } - + /* * Everything looks good: fill in the XtransConnInfo structure. */ - + newciptr->addrlen=ciptr->addrlen; if( (newciptr->addr=(char *)xalloc(newciptr->addrlen)) == NULL ) { PRMSG(1, @@ -1364,9 +1412,10 @@ *status = TRANS_ACCEPT_BAD_MALLOC; return -1; } - + memcpy(newciptr->addr,ciptr->addr,newciptr->addrlen); - + newciptr->flags |= TRANS_NOUNLINK; + newciptr->peeraddrlen=newciptr->addrlen; if( (newciptr->peeraddr=(char *)xalloc(newciptr->peeraddrlen)) == NULL ) { PRMSG(1, @@ -1377,9 +1426,9 @@ *status = TRANS_ACCEPT_BAD_MALLOC; return -1; } - + memcpy(newciptr->peeraddr,newciptr->addr,newciptr->peeraddrlen); - + *status = 0; return(fd); @@ -1468,7 +1517,7 @@ } #ifndef sun - +#ifndef SCO325 static int TRANS(ISCReopenServer)(XtransConnInfo ciptr, int fd, char *port) @@ -1476,9 +1525,9 @@ #ifdef ISCDEVNODENAME char server_path[64], server_unix_path[64]; #endif - + PRMSG(2,"ISCReopenServer(%s)\n", port, 0,0 ); - + #if !defined(ISCDEVNODENAME) PRMSG(1,"ISCReopenServer: Protocol is not supported by a ISC connection\n", 0,0,0); return 0; @@ -1491,12 +1540,12 @@ PRMSG(1, "ISCReopenServer: failed to fill in addr info\n", 0,0,0); return 0; } - + return 1; #endif /* !ISCDEVNODENAME */ } - +#endif /* !SCO325 */ static int TRANS(SCOReopenServer)(XtransConnInfo ciptr, int fd, char *port) @@ -1505,9 +1554,9 @@ #ifdef SCORNODENAME char serverR_path[64], serverS_path[64]; #endif - + PRMSG(2,"SCOReopenServer(%s)\n", port, 0,0 ); - + #if !defined(SCORNODENAME) PRMSG(1,"SCOReopenServer: Protocol is not supported by a SCO connection\n", 0,0,0); return 0; @@ -1515,12 +1564,13 @@ (void) sprintf(serverR_path, SCORNODENAME, port); (void) sprintf(serverS_path, SCOSNODENAME, port); + ciptr->flags |= TRANS_NOUNLINK; if (TRANS(FillAddrInfo) (ciptr, serverS_path, serverR_path) == 0) { PRMSG(1, "SCOReopenServer: failed to fill in addr info\n", 0,0,0); return 0; } - + return 1; #endif /* SCORNODENAME */ @@ -1736,6 +1786,7 @@ #endif /* SVR4 */ #ifndef sun +#ifndef SCO325 {"isc", #ifdef TRANS_CLIENT TRANS(ISCOpenClient), @@ -1757,6 +1808,7 @@ TRANS(ISCAccept) #endif /* TRANS_SERVER */ }, +#endif /* !SCO325 */ {"sco", #ifdef TRANS_CLIENT @@ -1783,13 +1835,13 @@ }; #define NUMTRANSPORTS (sizeof(LOCALtrans2devtab)/sizeof(LOCALtrans2dev)) - + static char *XLOCAL=NULL; static char *workingXLOCAL=NULL; static char *freeXLOCAL=NULL; -#ifdef sco -#define DEF_XLOCAL "UNIX:SCO:PTS:NAMED:ISC" +#ifdef SCO325 +#define DEF_XLOCAL "SCO:UNIX:PTS" #else #define DEF_XLOCAL "UNIX:PTS:NAMED:ISC:SCO" #endif @@ -1799,7 +1851,7 @@ { PRMSG(3,"LocalInitTransports(%s)\n", protocol, 0,0 ); - + if( strcmp(protocol,"local") && strcmp(protocol,"LOCAL") ) { workingXLOCAL=freeXLOCAL=(char *)xalloc (strlen (protocol) + 1); @@ -1836,17 +1888,17 @@ char *typetocheck; char typebuf[TYPEBUFSIZE]; PRMSG(3,"LocalGetNextTransport()\n", 0,0,0 ); - + while(1) { if( workingXLOCAL == NULL || *workingXLOCAL == '\0' ) return NULL; - + typetocheck=workingXLOCAL; workingXLOCAL=strchr(workingXLOCAL,':'); if(workingXLOCAL && *workingXLOCAL) *workingXLOCAL++='\0'; - + for(i=0;i<NUMTRANSPORTS;i++) { /* @@ -1857,7 +1909,7 @@ for(j=0;j<TYPEBUFSIZE;j++) if (isupper(typebuf[j])) typebuf[j]=tolower(typebuf[j]); - + /* Now, see if they match */ if(!strcmp(LOCALtrans2devtab[i].transname,typebuf)) return &LOCALtrans2devtab[i]; @@ -1916,7 +1968,7 @@ int index; PRMSG(3,"LocalOpenClient()\n", 0,0,0 ); - + /* * Make sure 'host' is really local. If not, we return failure. * The reason we make this check is because a process may advertise @@ -1945,18 +1997,18 @@ * we don't have to do anything special. */ #endif /* X11_t */ - + if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL ) { PRMSG(1,"LocalOpenClient: calloc(1,%d) failed\n", sizeof(struct _XtransConnInfo),0,0 ); return NULL; } - + ciptr->fd = -1; - + TRANS(LocalInitTransports)(protocol); - + index = 0; for(transptr=TRANS(LocalGetNextTransport)(); transptr!=NULL;transptr=TRANS(LocalGetNextTransport)(), index++) @@ -1983,18 +2035,18 @@ if( ciptr->fd >= 0 ) break; } - + TRANS(LocalEndTransports)(); - + if( ciptr->fd < 0 ) { xfree(ciptr); return NULL; } - + ciptr->priv=(char *)transptr; ciptr->index = index; - + return ciptr; } @@ -2009,9 +2061,9 @@ { int i; XtransConnInfo ciptr; - + PRMSG(2,"LocalOpenServer(%d,%s,%s)\n", type, protocol, port); - + #if defined(X11_t) /* * For X11, the port will be in the format xserverN where N is the @@ -2020,14 +2072,14 @@ * the port. This just truncates port to the display portion. */ #endif /* X11_t */ - + if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL ) { PRMSG(1,"LocalOpenServer: calloc(1,%d) failed\n", sizeof(struct _XtransConnInfo),0,0 ); return NULL; } - + for(i=1;i<NUMTRANSPORTS;i++) { if( strcmp(protocol,LOCALtrans2devtab[i].transname) != 0 ) @@ -2053,11 +2105,11 @@ if( ciptr->fd >= 0 ) { ciptr->priv=(char *)&LOCALtrans2devtab[i]; ciptr->index=i; - ciptr->flags=1; + ciptr->flags = 1 | (ciptr->flags & TRANS_KEEPFLAGS); return ciptr; } } - + xfree(ciptr); return NULL; } @@ -2073,16 +2125,16 @@ { XtransConnInfo ciptr; int stat = 0; - + PRMSG(2,"LocalReopenServer(%d,%d,%d)\n", type, index, fd); - + if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL ) { PRMSG(1,"LocalReopenServer: calloc(1,%d) failed\n", sizeof(struct _XtransConnInfo),0,0 ); return NULL; } - + ciptr->fd = fd; switch( type ) @@ -2101,10 +2153,10 @@ if( stat > 0 ) { ciptr->priv=(char *)&LOCALtrans2devtab[index]; ciptr->index=index; - ciptr->flags=1; + ciptr->flags = 1 | (ciptr->flags & TRANS_KEEPFLAGS); return ciptr; } - + xfree(ciptr); return NULL; } @@ -2125,7 +2177,7 @@ { PRMSG(2,"LocalOpenCOTSClient(%s,%s,%s)\n",protocol,host,port); - + return TRANS(LocalOpenClient)(XTRANS_OPEN_COTS_CLIENT, protocol, host, port); } @@ -2163,7 +2215,7 @@ typetocheck = workingXLOCAL; } TRANS(LocalEndTransports)(); - + if (!found) { PRMSG(3,"LocalOpenCOTSServer: disabling %s\n",thistrans->TransName,0,0); thistrans->flags |= TRANS_DISABLED; @@ -2184,7 +2236,7 @@ { PRMSG(2,"LocalOpenCLTSClient(%s,%s,%s)\n",protocol,host,port); - + return TRANS(LocalOpenClient)(XTRANS_OPEN_CLTS_CLIENT, protocol, host, port); } @@ -2199,7 +2251,7 @@ { PRMSG(2,"LocalOpenCLTSServer(%s,%s,%s)\n",protocol,host,port); - + return TRANS(LocalOpenServer)(XTRANS_OPEN_CLTS_SERVER, protocol, host, port); } @@ -2215,14 +2267,14 @@ int index; PRMSG(2,"LocalReopenCOTSServer(%d,%s)\n", fd, port, 0); - + for(index=1;index<NUMTRANSPORTS;index++) { if( strcmp(thistrans->TransName, LOCALtrans2devtab[index].transname) == 0 ) break; } - + if (index >= NUMTRANSPORTS) { return (NULL); @@ -2239,14 +2291,14 @@ int index; PRMSG(2,"LocalReopenCLTSServer(%d,%s)\n", fd, port, 0); - + for(index=1;index<NUMTRANSPORTS;index++) { if( strcmp(thistrans->TransName, LOCALtrans2devtab[index].transname) == 0 ) break; } - + if (index >= NUMTRANSPORTS) { return (NULL); @@ -2265,7 +2317,7 @@ { PRMSG(2,"LocalSetOption(%d,%d,%d)\n",ciptr->fd,option,arg); - + return -1; } @@ -2277,7 +2329,7 @@ { PRMSG(2,"LocalCreateListener(%x->%d,%s)\n",ciptr,ciptr->fd,port); - + return 0; } @@ -2287,11 +2339,11 @@ { XtransConnInfo newciptr; LOCALtrans2dev *transptr; - + PRMSG(2,"LocalAccept(%x->%d)\n", ciptr, ciptr->fd,0); - + transptr=(LOCALtrans2dev *)ciptr->priv; - + if( (newciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo)))==NULL ) { PRMSG(1,"LocalAccept: calloc(1,%d) failed\n", @@ -2299,18 +2351,18 @@ *status = TRANS_ACCEPT_BAD_MALLOC; return NULL; } - + newciptr->fd=transptr->devaccept(ciptr,newciptr,status); - + if( newciptr->fd < 0 ) { xfree(newciptr); return NULL; } - + newciptr->priv=(char *)transptr; newciptr->index = ciptr->index; - + *status = 0; return newciptr; @@ -2326,7 +2378,7 @@ { PRMSG(2,"LocalConnect(%x->%d,%s)\n", ciptr, ciptr->fd, port); - + return 0; } @@ -2351,7 +2403,7 @@ { PRMSG(2,"LocalRead(%d,%x,%d)\n", ciptr->fd, buf, size ); - + return read(ciptr->fd,buf,size); } @@ -2360,7 +2412,7 @@ { PRMSG(2,"LocalWrite(%d,%x,%d)\n", ciptr->fd, buf, size ); - + return write(ciptr->fd,buf,size); } @@ -2369,7 +2421,7 @@ { PRMSG(2,"LocalReadv(%d,%x,%d)\n", ciptr->fd, buf, size ); - + return READV(ciptr,buf,size); } @@ -2378,7 +2430,7 @@ { PRMSG(2,"LocalWritev(%d,%x,%d)\n", ciptr->fd, buf, size ); - + return WRITEV(ciptr,buf,size); } @@ -2387,7 +2439,7 @@ { PRMSG(2,"LocalDisconnect(%x->%d)\n", ciptr, ciptr->fd, 0); - + return 0; } @@ -2398,11 +2450,11 @@ struct sockaddr_un *sockname=(struct sockaddr_un *) ciptr->addr; char path[200]; /* > sizeof sun_path +1 */ int ret; - + PRMSG(2,"LocalClose(%x->%d)\n", ciptr, ciptr->fd ,0); - + ret=close(ciptr->fd); - + if(ciptr->flags && sockname && sockname->sun_family == AF_UNIX @@ -2410,9 +2462,10 @@ { strncpy(path,sockname->sun_path, ciptr->addrlen-sizeof(sockname->sun_family)); - unlink(path); + if (!(ciptr->flags & TRANS_NOUNLINK)) + unlink(path); } - + return ret; } @@ -2423,11 +2476,11 @@ int ret; PRMSG(2,"LocalCloseForCloning(%x->%d)\n", ciptr, ciptr->fd ,0); - + /* Don't unlink path */ ret=close(ciptr->fd); - + return ret; } @@ -2564,7 +2617,7 @@ }; #ifndef sun - +#ifndef SCO325 Xtransport TRANS(ISCFuncs) = { /* Local Interface */ "isc", @@ -2603,6 +2656,7 @@ TRANS(LocalClose), TRANS(LocalCloseForCloning), }; +#endif /* !SCO325 */ Xtransport TRANS(SCOFuncs) = { /* Local Interface */ "sco", Index: xc/lib/xtrans/Xtransos2.c diff -u xc/lib/xtrans/Xtransos2.c:3.6 xc/lib/xtrans/Xtransos2.c:removed --- xc/lib/xtrans/Xtransos2.c:3.6 Sun Jun 20 04:41:22 1999 +++ xc/lib/xtrans/Xtransos2.c Thu Feb 27 12:28:14 2003 @@ -1,886 +0,0 @@ -/* $XFree86: xc/lib/xtrans/Xtransos2.c,v 3.6 1999/06/20 08:41:22 dawes Exp $ */ - -/* - * (c) Copyright 1996 by Sebastien Marineau and Holger Veit - * <marineau@genie.uottawa.ca> - * <Holger.Veit@gmd.de> - * - * 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 - * HOLGER VEIT 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 Sebastien Marineau or Holger Veit shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from Holger Veit or Sebastien Marineau. - * - */ - -/* Implementation of the OS/2 local pipe transport layer */ - -#define INCL_DOSNMPIPES -#define INCL_DOSPROCESS -#define INCL_DOSERRORS -#define INCL_DOSFILEMGR -#undef BYTE -#undef BOOL -#include <os2.h> - -#ifdef XSERV_t -extern HEV hPipeSem; -BOOL init_server_pipes(); -#endif - -/************************************************************************* - * Independent Layer - *************************************************************************/ -#ifdef TRANS_CLIENT - -static XtransConnInfo -TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol, - char *host, char *port) -{ - APIRET rc; - HFILE hfd,hServer; - ULONG action,byteWritten,State; - char pipename[256],clientname[256]; - char server_string[256]; - struct sockaddr *addr_name; - unsigned char pipe_len; - XtransConnInfo ciptr; - static int unique_id=0; - int i,namelen,try; - - PRMSG(2,"Os2OpenClient(%s,%s,%s)\n",protocol,host,port); - - /* test, whether the host is really local, i.e. either - * "os2" or "local" - */ - if (strcmp(protocol,"os2") && strcmp(protocol,"local")) { - PRMSG (1, - "Os2OpenClient: Cannot connect to non-local host %s\n", - host, 0, 0); - return NULL; - } - - /* make the pipename */ - - if (port && *port ) { - if( *port == '/' ) { /* A full pathname */ - (void) sprintf(pipename, "\\PIPE\\X\\%s,", port); - } else { - (void) sprintf(pipename, "%s%s", "\\PIPE\\X\\xf86.", port); - } - } else { - (void) sprintf(pipename, "\\PIPE\\X\\xfree86"); } - - PRMSG(5, "Os2OpenClient: Creating pipe %s\n",pipename, 0,0 ); - - /* make a connection entry */ - if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL ) { - PRMSG(1,"Os2OpenClient: calloc(1,%d) failed\n", - sizeof(struct _XtransConnInfo),0,0 ); - return NULL; - } - - /* open the pipe. Try ten times before giving up at 500ms intervals*/ - try = 0; - do { - rc = DosOpen(pipename,&hServer, &action, 0, - FILE_NORMAL, FILE_OPEN, - OPEN_ACCESS_WRITEONLY | OPEN_SHARE_DENYWRITE, - (PEAOP2)NULL); - if(rc == 0) break; - if (try >=10) { - PRMSG(1,"Os2OpenClient: Open server pipe %s failed, rc=%d\n", - pipename,rc,0 ); - PRMSG(1,"\tProbable causes: either the XServer is not running, or has not started properly,\n", - 0,0,0 ); - PRMSG(1,"\tor the DISPLAY variable is set incorrectly.\n", - 0,0,0 ); - xfree(ciptr); - return NULL; - } - try ++; - DosSleep(500); - } while (rc != 0); - -/* OK, now we are talking to the server. Generate a unique pipe name and pass it to - * the server. Make the pipe and wait for server to connect */ - - sprintf(clientname,"\\PIPE\\X\\%d.%d",getpid(),unique_id++); - - rc = DosCreateNPipe (clientname, &hfd, - NP_NOINHERIT | NP_ACCESS_DUPLEX, - 1 | NP_NOWAIT | NP_TYPE_BYTE | NP_READMODE_BYTE, - 16384, 16384, 0); - if (rc != 0){ - PRMSG(1, "Os2OpenClient: Unable to create pipe %s\n", pipename,0,0 ); - DosClose(hfd); - pipe_len=0; - DosWrite(hServer,&pipe_len,1,&byteWritten); - DosClose(hServer); - xfree(ciptr); - return(NULL); - } - - /* Connect to the pipe. */ - - rc = DosConnectNPipe (hfd); - if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED) - { - PRMSG(1, "Os2OpenClient: Unable to connect to pipe %s\n", pipename,0,0 ); - DosClose (hfd); - DosClose(hServer); - xfree(ciptr); - return (NULL); - } - -/* Now write name to server on hServer */ - server_string[0]=(char) strlen(clientname)+1; - strcpy(&server_string[1],clientname); - rc = DosWrite(hServer,server_string,(ULONG)server_string[0]+1,&byteWritten); - if(rc != 0){ /* Could not write to server pipe? */ - PRMSG(1, "Os2OpenClient: Error writing to server pipe, handle=%d, rc=%d, w=%d\n", - hServer,rc,byteWritten ); - DosClose(hServer); - DosClose(hfd); - xfree(ciptr); - return(NULL); - } - - PRMSG (5, "Os2OpenCLient: Wrote pipename %s to server; len %d written %d \n", - &server_string[1],server_string[0]+1,byteWritten); - - -/* The server will respond by opening the pipe. Wait for that for 30 secs */ - - i=0; - DosSleep(50); /* Give it time to catch up but minimize race condition*/ - rc = DosConnectNPipe(hfd); - while((rc == ERROR_PIPE_NOT_CONNECTED)&&(i++<60)) { - DosSleep(500); - rc = DosConnectNPipe(hfd); - } - - if(rc != 0){ /* Server has not responded! */ - PRMSG(1, "Os2OpenClient: Timeout on wait for server response, handle=%d, rc=%d\n",hServer,rc,0 ); - PRMSG(1, "\tProbable cause: the XServer has exited or crashed while the connection was being established\n",0,0,0 ); - PRMSG(1, "\tor the XServer is too busy to respond.\n",0,0,0 ); - DosClose(hServer); - DosClose(hfd); - xfree(ciptr); - return(NULL); - } - -/* OK, the server has connected! Fill-in the info and return */ - - DosClose(hServer); - -/* Last check: make sure client is connected! */ - - rc = DosQueryNPHState(hfd,&State); - if(rc != 0){ /* Client is not connected! */ - PRMSG(1, "Os2OpenClient: Client pipe does not appear connected. rc=%d, h=%d\n",rc,hfd,0 ); - PRMSG(1, "\tProbable cause: the XServer has just exited.\n",0,0,0 ); - DosClose(hfd); - xfree(ciptr); - return(NULL); - } - - namelen=sizeof(struct sockaddr); - if ((ciptr->addr = (char *) xalloc (namelen)) == NULL) - { - PRMSG (1, "Os2OpenClient: Can't allocate space for the addr\n", - 0, 0, 0); - DosClose(hfd); - xfree(ciptr); - return(NULL); - } - ciptr->addrlen = namelen; - ((struct sockaddr *)ciptr->addr)->sa_family = AF_UNIX; - strcpy(((struct sockaddr *)ciptr->addr)->sa_data, "local"); - - if ((ciptr->peeraddr = (char *) xalloc (namelen)) == NULL) - { - PRMSG (1, "Os2OpenCLient: Can't allocate space for the addr\n", - 0, 0, 0); - DosClose(hfd); - xfree(ciptr->addr); - xfree(ciptr); - return(NULL); - } - ciptr->peeraddrlen = namelen; - ((struct sockaddr *)ciptr->peeraddr)->sa_family = AF_UNIX; - strcpy (((struct sockaddr *)ciptr->peeraddr)->sa_data,"local"); - - PRMSG (5, "Os2OpenCLient: Filled in struct: len %d %d name %s\n", - ciptr->addrlen,ciptr->peeraddrlen,((struct sockaddr *)ciptr->peeraddr)->sa_data); - - - ciptr->index=hfd; - ciptr->family=AF_UNIX; - if((ciptr->fd=_imphandle(hfd))<0){ - PRMSG(1, "Os2OpenClient: Could not import the pipe handle into EMX\n",0,0,0 ); - PRMSG(1, "\tProbable cause: EMX has run out of free file handles.\n",0,0,0 ); - DosClose(hfd); - xfree(ciptr->addr); - xfree(ciptr->peeraddr); - xfree(ciptr); - return(NULL); - } - PRMSG(5, "Os2OpenClient: pipe handle %d EMX handle %d\n",ciptr->index,ciptr->fd,0 ); - fcntl(ciptr->fd,F_SETFL,O_NDELAY); - fcntl(ciptr->fd,F_SETFD,FD_CLOEXEC); - return ciptr; -} -#endif /* TRANS_CLIENT */ - -#ifdef TRANS_SERVER -static XtransConnInfo -TRANS(Os2OpenServer)(Xtransport *thistrans, char *protocol, - char *host, char *port) -{ - APIRET rc; - HFILE hfd; - ULONG action; - char pipename[256]; - struct sockaddr *addr_name; - XtransConnInfo ciptr; - int namelen; - -#ifdef XSERV_t - if (! init_server_pipes()) return(NULL); -#endif - - PRMSG(2,"Os2OpenServer(%s,%s,%s)\n",protocol,host,port); - - if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL ) - { - PRMSG(1,"Os2OpenServer: xcalloc(1,%d) failed\n", - sizeof(struct _XtransConnInfo),0,0 ); - return NULL; - } - - - if (port && *port ) { - if( *port == '/' ) { /* A full pathname */ - (void) sprintf(pipename, "\\PIPE\\X\\%s", port); - } else { - (void) sprintf(pipename, "%s%s", "\\PIPE\\X\\xf86.", port); - } - } else { - (void) sprintf(pipename, "\\PIPE\\X\\xfree86"); - } - - PRMSG(5, "Os2OpenServer: Creating pipe %s\n",pipename, 0,0 ); - - rc = DosCreateNPipe (pipename, &hfd, - NP_NOINHERIT | NP_ACCESS_INBOUND, - 1 | NP_NOWAIT | NP_TYPE_BYTE | NP_READMODE_BYTE, - 0, 8192, 0); - if (rc != 0){ - PRMSG(1, "Os2OpenServer: Unable to create pipe %s, rc=%d\n", pipename,rc,0 ); - PRMSG(1, "\tProbable cause: there is already another XServer running on display :%s\n",port,0,0 ); - DosClose(hfd); - xfree(ciptr); - return(NULL); - } - - /* Connect to the pipe. */ - - rc = DosConnectNPipe (hfd); - if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED) - { - PRMSG(1, "Os2OpenServer: Unable to connect to pipe %s\n", pipename,0,0 ); - DosClose (hfd); - xfree(ciptr); - return (NULL); - } - -/* Pipe is now connected and waiting for client connect */ - -/*** Put in info ***/ - - namelen=sizeof(struct sockaddr); - if ((ciptr->addr = (char *) xalloc (namelen)) == NULL) - { - PRMSG (1, "Os2OpenServer: Can't allocate space for the addr\n", - 0, 0, 0); - DosClose(hfd); - xfree(ciptr); - return(NULL); - } - ciptr->addrlen = namelen; - ((struct sockaddr *)ciptr->addr)->sa_family = AF_UNIX; - strcpy (((struct sockaddr *)ciptr->addr)->sa_data, "local"); - - if ((ciptr->peeraddr = (char *) xalloc (namelen)) == NULL) - { - PRMSG (1, "Os2OpenServer: Can't allocate space for the addr\n", - 0, 0, 0); - DosClose(hfd); - xfree(ciptr->addr); - xfree(ciptr); - return(NULL); - } - - ciptr->peeraddrlen = namelen; - ((struct sockaddr *)ciptr->peeraddr)->sa_family = AF_UNIX; - strcpy(((struct sockaddr *)ciptr->peeraddr)->sa_data,"local"); - - PRMSG (5, "Os2OpenServer: Filled in struct: len %d %d name %s\n", - ciptr->addrlen,ciptr->peeraddrlen,((struct sockaddr *)ciptr->peeraddr)->sa_data); - - ciptr->index=hfd; /* Save this for later use in this unused member of struct */ - ciptr->flags=1; /* Listener */ - ciptr->family=AF_UNIX; - - if((ciptr->fd=_imphandle(hfd))<0){ - DosClose(hfd); - xfree(ciptr->addr); - xfree(ciptr->peeraddr); - xfree(ciptr); - return(NULL); - } - PRMSG(5, "Os2OpenServer: Pipe handle %d EMX handle %d",ciptr->index,ciptr->fd,0 ); - -#ifdef XSERV_t -/* Attach the pipe sem to the pipe. Use handle index as key */ - rc = DosSetNPipeSem(ciptr->fd, (HSEM)hPipeSem, ciptr->fd); - if (rc){ - PRMSG(1, "Os2OpenCOTSServer: Could not attach sem %d to pipe %d, rc=%d\n", - hPipeSem,ciptr->fd,rc); - DosClose(ciptr->fd); - xfree(ciptr->addr); - xfree(ciptr->peeraddr); - xfree(ciptr); - return(NULL); - } -#endif - - fcntl(ciptr->fd,F_SETFL,O_NDELAY); - fcntl(ciptr->fd,F_SETFD,FD_CLOEXEC); - return(ciptr); -} -#endif /* TRANS_SERVER */ - -#ifdef TRANS_CLIENT -static XtransConnInfo -TRANS(Os2OpenCLTSClient)(Xtransport *thistrans, char *protocol, - char *host, char *port) -{ - PRMSG(2,"Os2OpenCLTSClient(%s,%s,%s)\n",protocol,host,port); - return TRANS(Os2OpenClient)(thistrans, protocol, host, port); -} -#endif /* TRANS_CLIENT */ - -#ifdef TRANS_CLIENT -static XtransConnInfo -TRANS(Os2OpenCOTSClient)(Xtransport *thistrans, char *protocol, - char *host, char *port) -{ - PRMSG(2,"Os2OpenCOTSClient(%s,%s,%s)\n",protocol,host,port); - return TRANS(Os2OpenClient)(thistrans, protocol, host, port); -} -#endif /* TRANS_CLIENT */ - - -#ifdef TRANS_SERVER -static XtransConnInfo -TRANS(Os2OpenCLTSServer)(Xtransport *thistrans, char *protocol, - char *host, char *port) -{ - PRMSG(2,"Os2OpenCLTSServer(%s,%s,%s)\n",protocol,host,port); - return TRANS(Os2OpenServer)(thistrans, protocol, host, port); -} -#endif /* TRANS_SERVER */ - - -#ifdef TRANS_SERVER -static XtransConnInfo -TRANS(Os2OpenCOTSServer)(Xtransport *thistrans, char *protocol, - char *host, char *port) -{ - PRMSG(2,"Os2OpenCOTSServer(%s,%s,%s)\n",protocol,host,port); - return TRANS(Os2OpenServer)(thistrans, protocol, host, port); -} -#endif /* TRANS_SERVER */ - - -#ifdef TRANS_REOPEN -static XtransConnInfo -TRANS(Os2ReopenCOTSServer)(Xtransport *thistrans, int fd, char *port) -{ - - XtransConnInfo ciptr; - char addr_name[256]; - int namelen; - - PRMSG(2,"Os2ReopenCOTSServer(%d,%s)\n", fd, port, 0); - - if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL ) - { - PRMSG(1,"Os2ReopenCOTSServer: xcalloc(1,%d) failed\n", - sizeof(struct _XtransConnInfo),0,0 ); - return NULL; - } - - strcpy(addr_name,"local"); - namelen=sizeof(addr_name); - if ((ciptr->addr = (char *) xalloc (namelen)) == NULL) - { - PRMSG (1, "Os2ReopenCOTSServer: Can't allocate space for the addr\n", - 0, 0, 0); - xfree(ciptr); - return(NULL); - } - - ciptr->addrlen = namelen; - memcpy (ciptr->addr, addr_name, ciptr->addrlen); - if ((ciptr->peeraddr = (char *) xalloc (namelen)) == NULL) - { - PRMSG (1, "Os2ReopenCOTSServer: Can't allocate space for the addr\n", - 0, 0, 0); - xfree(ciptr); - return(NULL); - } - - ciptr->peeraddrlen = namelen; - memcpy (ciptr->peeraddr,addr_name, ciptr->addrlen); - - ciptr->fd = fd; - ciptr->family=AF_UNIX; - ciptr->flags=1; - PRMSG(1,"Os2ReopenCOTSServer: Filled-in info for handle %d on port %s.\n", fd, port, 0); - - return(ciptr); -} - -static XtransConnInfo -TRANS(Os2ReopenCLTSServer)(Xtransport *thistrans, int fd, char *port) -{ - PRMSG(2,"Os2ReopenCLTSServer(%d,%s)\n", fd, port, 0); - return TRANS(Os2ReopenCOTSServer)(thistrans, fd, port); -} -#endif - -static -TRANS(Os2SetOption)(XtransConnInfo ciptr, int option, int arg) -{ - PRMSG(2,"Os2SetOption(%d,%d,%d)\n",ciptr->fd,option,arg); - return -1; -} - -#ifdef TRANS_SERVER - -static -TRANS(Os2CreateListener)(XtransConnInfo ciptr, char *port) -{ - PRMSG(2,"Os2CreateListener(%x->%d,%s)\n",ciptr,ciptr->fd,port); - return 0; -} - -static XtransConnInfo -TRANS(Os2Accept)(XtransConnInfo ciptr, int *status) -{ - XtransConnInfo newciptr; - HFILE hClient; - unsigned char length; - ULONG action; - char clientname[256]; - struct sockaddr *addr_name; - int in,namelen; - APIRET rc; - - - PRMSG(2,"Os2Accept(%x->%d)\n", ciptr, ciptr->fd,0); - if( (newciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo)))==NULL ) - { - PRMSG(1,"Os2Accept: xcalloc(1,%d) failed\n", - sizeof(struct _XtransConnInfo),0,0 ); - *status = TRANS_ACCEPT_BAD_MALLOC; - return NULL; - } - -/* Read in length of client pipe name. If fails, then reset server pipe */ - if((in=read(ciptr->fd,&length,1))<=0){ - PRMSG(2,"Os2Accept: Error reading incoming connection, in=%d, error=%d\n", - in,errno,0 ); - *status = TRANS_ACCEPT_MISC_ERROR; - xfree(newciptr); - rc = DosDisConnectNPipe(ciptr->fd); - rc = DosConnectNPipe (ciptr->fd); - if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED) - { - PRMSG(1, "Os2Accept: Unable to reconnect server pipe %d\n", ciptr->fd,0,0 ); - } - return NULL; - } - PRMSG(5, "Os2Accept: Bytes to read for name: %d\n",length,0,0 ); - - -/* Check length for valid length ?? */ - -/* Now read in length bytes from pipe for client pipe name */ - if((in=read(ciptr->fd,clientname,length))<=0){ - PRMSG(2,"Os2Accept: Error reading incoming connection, in=%d, error=%d\n", - in,errno,0 ); - *status = TRANS_ACCEPT_MISC_ERROR; - xfree(newciptr); - rc = DosDisConnectNPipe(ciptr->fd); - rc = DosConnectNPipe (ciptr->fd); - if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED) - { - PRMSG(1, "Os2Accept: Unable to reconnect server pipe %d\n", ciptr->fd,0,0 ); - } - return NULL; - } - clientname[length]='\0'; - PRMSG(5, "Os2Accept: Server name %s length %d\n",clientname,length,0 ); - - -/* Now we have the client pipe name. Open it with DosOpen */ - - rc = DosOpen(clientname,&hClient, &action, 0, - FILE_NORMAL, FILE_OPEN, - OPEN_FLAGS_NOINHERIT | OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYREADWRITE, - (PEAOP2)NULL); - - PRMSG(5, "Os2Accept: Open pipe %s, handle = %d, rc=%d\n",clientname,hClient,rc ); - - if (rc) { - PRMSG(1,"Os2Accept: Open pipe %s to client failed, rc=%d\n", - clientname,rc,0 ); - PRMSG(1, "\tProbable cause: the client has exited or timed-out.\n",0,0,0 ); - xfree(newciptr); - rc = DosDisConnectNPipe(ciptr->fd); - rc = DosConnectNPipe (ciptr->fd); - if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED) - { - PRMSG(1, "Os2Accept: Unable to reconnect server pipe %d\n", ciptr->fd,0,0 ); - } - return NULL; - } - - rc = DosSetNPHState (hClient, NP_NOWAIT | NP_READMODE_BYTE); - if (rc != 0) - { - PRMSG(1,"Os2Accept: Could not set pipe %s to non-blocking mode, rc=%d\n", - hClient,rc,0 ); - xfree(newciptr); - rc = DosDisConnectNPipe(ciptr->fd); - rc = DosConnectNPipe (ciptr->fd); - if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED) - { - PRMSG(1, "Os2Accept: Unable to reconnect server pipe %d\n", ciptr->fd,0,0 ); - } - return NULL; - } - -/* OK, we seem to be well connected to client. Now disconnect server pipe and put again in listen */ - - rc = DosDisConnectNPipe(ciptr->fd); - rc = DosConnectNPipe (ciptr->fd); - PRMSG(5, "Os2Accept: Reconnecting server pipe %d, rc = %d\n",ciptr->fd,rc,0 ); - - if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED) - { - PRMSG(1, "Os2Accept: Unable to reconnect server pipe %d\n", ciptr->fd,0,0 ); - } /* Consider this non-fatal for present connection */ - -/* And finally fill-in info in newciptr */ - - namelen=sizeof(struct sockaddr); - if ((newciptr->addr = (char *) xalloc (namelen)) == NULL) - { - PRMSG (1, "Os2Accept: Can't allocate space for the addr\n", - 0, 0, 0); - DosClose(hClient); - xfree(newciptr); - return(NULL); - } - - newciptr->addrlen = namelen; - ((struct sockaddr *)newciptr->addr)->sa_family = AF_UNIX; - strcpy (((struct sockaddr *)newciptr->addr)->sa_data, "local"); - - if ((newciptr->peeraddr = (char *) xalloc (namelen)) == NULL) - { - PRMSG (1, "Os2Accept: Can't allocate space for the addr\n", - 0, 0, 0); - DosClose(hClient); - xfree(ciptr->addr); - xfree(newciptr); - return(NULL); - } - - newciptr->peeraddrlen = namelen; - ((struct sockaddr *)newciptr->peeraddr)->sa_family = AF_UNIX; - strcpy (((struct sockaddr *)newciptr->peeraddr)->sa_data, "local"); - - PRMSG (5, "Os2Accept: Filled in struct: len %d %d name %s\n", - newciptr->addrlen,newciptr->peeraddrlen,newciptr->peeraddr); - - - newciptr->index=hClient; - newciptr->family=AF_UNIX; - if((newciptr->fd=_imphandle(hClient))<0){ - PRMSG(1,"Os2Accept: Could not import pipe %d into EMX, errno=%d\n", - hClient,errno,0 ); - PRMSG(1, "\tProbable cause: EMX has run out of file handles.\n",0,0,0 ); - DosClose(hClient); - xfree(newciptr->addr); - xfree(newciptr->peeraddr); - xfree(newciptr); - return(NULL); - } - PRMSG(5, "Os2Accept: Pipe handle %d EMX handle %d",newciptr->index,newciptr->fd,0 ); - -#ifdef XSERV_t -/* Attach the pipe sem to the pipe. Use handle index as key */ - rc = DosSetNPipeSem(newciptr->fd, (HSEM)hPipeSem, newciptr->fd); - if (rc){ - PRMSG(1, "Os2OpenCOTSServer: Could not attach sem %d to pipe %d, rc=%d\n", - hPipeSem,newciptr->fd,rc); - DosClose(newciptr->fd); - xfree(newciptr->addr); - xfree(newciptr->peeraddr); - xfree(newciptr); - return(NULL); - } -#endif - - fcntl(ciptr->fd,F_SETFL,O_NDELAY); - fcntl(ciptr->fd,F_SETFD,FD_CLOEXEC); - *status=0; - return newciptr; -} - -#endif /* TRANS_SERVER */ - -#ifdef TRANS_CLIENT - -static -TRANS(Os2Connect)(XtransConnInfo ciptr, char *host, char *port) -{ - PRMSG(2,"Os2Connect(%x->%d,%s)\n", ciptr, ciptr->fd, port); - return 0; -} - -#endif /* TRANS_CLIENT */ - -static int -TRANS(Os2BytesReadable)(XtransConnInfo ciptr, BytesReadable_t *pend ) -{ - ULONG rc, state, nread; - AVAILDATA avail; - char buffer; - - PRMSG(2,"Os2BytesReadable(%x->%d,%x)\n", ciptr, ciptr->fd, pend); - - rc = DosPeekNPipe (ciptr->fd, &buffer, 0, &nread, &avail, &state); - if (rc != 0) - { - errno = EPIPE; - *pend = 0; - return -1; - } - if (state == NP_STATE_CLOSING) - { - errno = EPIPE; - *pend = 0; - return -1; - } - errno = 0; - *pend = avail.cbpipe; - return 0; -} - -static int -TRANS(Os2Read)(XtransConnInfo ciptr, char *buf, int size) -{ - int ret; - APIRET rc; - ULONG ulRead; - PRMSG(2,"Os2Read(%d,%x,%d)\n", ciptr->fd, buf, size ); - errno = 0; - rc = DosRead(ciptr->fd, buf, size, &ulRead); - if (rc == 0){ - ret = ulRead; - } - else if ((rc == 232) || (rc == 231)){ - errno = EAGAIN; - ret = -1; - } - else if (rc == 6){ - errno = EBADF; - ret = -1; - } - else if ((rc == 109) || (rc == 230) || (rc == 233)){ - errno = EPIPE; - ret = -1; - } - else { - PRMSG(2,"Os2Read: Unknown return code from DosRead, fd %d rc=%d\n", ciptr->fd,rc,0 ); - errno = EINVAL; - ret = -1; - } - return (ret); -} - -static int -TRANS(Os2Write)(XtransConnInfo ciptr, char *buf, int size) -{ - int ret; - APIRET rc; - ULONG nWritten; - PRMSG(2,"Os2Write(%d,%x,%d)\n", ciptr->fd, buf, size ); - rc = DosWrite(ciptr->fd, buf, size, &nWritten); - if (rc == 0){ - ret = nWritten; - if(nWritten == 0) { - errno=EAGAIN; - ret = -1; - } - } - else if ((rc == 39) || (rc == 112)){ - errno = EAGAIN; - ret = -1; - } - else if ((rc == 109) || (rc == 230) || (rc == 233)){ - errno = EPIPE; - ret = -1; - } - else if (rc == 6){ - errno=EBADF; - ret = -1; - } - else { - PRMSG(2,"(Os2Write)Unknown return code from DosWrite, fd %d rc=%d\n", ciptr->fd,rc,0 ); - errno = EINVAL; - ret = -1; - } - return (ret); -} - -static int -TRANS(Os2Readv)(XtransConnInfo ciptr, struct iovec *buf, int size) -{ - int ret; - PRMSG(2,"Os2Readv(%d,%x,%d)\n", ciptr->fd, buf, size ); - ret = READV(ciptr,buf,size); - if ((ret <0) && (errno == EINVAL)) errno = EPIPE; - return (ret); -} - -static int -TRANS(Os2Writev)(XtransConnInfo ciptr, struct iovec *buf, int size) -{ - int ret; - PRMSG(2,"Os2Writev(%d,%x,%d)\n", ciptr->fd, buf, size ); - ret = WRITEV(ciptr,buf,size); - if ((ret <0) && (errno == EINVAL)) errno = EPIPE; - if ((ret <0) && (errno == ENOSPC)) errno = EAGAIN; - return (ret); -} - -static int -TRANS(Os2Disconnect)(XtransConnInfo ciptr) -{ - PRMSG(2,"Os2Disconnect(%x->%d)\n", ciptr, ciptr->fd, 0); - return 0; -} - -static int -TRANS(Os2Close)(XtransConnInfo ciptr) -{ - int ret; - PRMSG(2,"Os2Close(%x->%d)\n", ciptr, ciptr->fd ,0); - ret=close(ciptr->fd); - return ret; -} - -static int -TRANS(Os2CloseForCloning)(XtransConnInfo ciptr) -{ - int ret; - - PRMSG(2,"Os2CloseForCloning(%x->%d)\n", ciptr, ciptr->fd ,0); - ret=close(ciptr->fd); - return ret; -} - - -Xtransport TRANS(OS2LocalFuncs) = { - /* Local Interface */ - "local", - TRANS_LOCAL, -#ifdef TRANS_CLIENT - TRANS(Os2OpenCOTSClient), -#endif /* TRANS_CLIENT */ -#ifdef TRANS_SERVER - TRANS(Os2OpenCOTSServer), -#endif /* TRANS_SERVER */ -#ifdef TRANS_CLIENT - TRANS(Os2OpenCLTSClient), -#endif /* TRANS_CLIENT */ -#ifdef TRANS_SERVER - TRANS(Os2OpenCLTSServer), -#endif /* TRANS_SERVER */ -#ifdef TRANS_REOPEN - TRANS(Os2ReopenCOTSServer), - TRANS(Os2ReopenCLTSServer), -#endif - TRANS(Os2SetOption), -#ifdef TRANS_SERVER - TRANS(Os2CreateListener), - NULL, /* ResetListener */ - TRANS(Os2Accept), -#endif /* TRANS_SERVER */ -#ifdef TRANS_CLIENT - TRANS(Os2Connect), -#endif /* TRANS_CLIENT */ - TRANS(Os2BytesReadable), - TRANS(Os2Read), - TRANS(Os2Write), - TRANS(Os2Readv), - TRANS(Os2Writev), - TRANS(Os2Disconnect), - TRANS(Os2Close), - TRANS(Os2CloseForCloning), -}; - -#ifdef XSERV_t -/* This function is used in the server to initialize the semaphore used with pipes */ - -BOOL init_server_pipes() -{ - static BOOL first_time=TRUE; - ULONG rc; - - if(first_time){ - rc = DosCreateEventSem(NULL, &hPipeSem,DC_SEM_SHARED,FALSE); - if (rc){ - PRMSG(1,"Os2OpenListener (init_server_pipes): Could not create pipe semaphore, rc=%d\n", - rc,0,0); - return(FALSE); - } - first_time=FALSE; - } -return(TRUE); -} -#endif /* XSERV_t */ Index: xc/lib/xtrans/Xtranssock.c diff -u xc/lib/xtrans/Xtranssock.c:3.53 xc/lib/xtrans/Xtranssock.c:3.56 --- xc/lib/xtrans/Xtranssock.c:3.53 Fri Dec 14 14:57:06 2001 +++ xc/lib/xtrans/Xtranssock.c Mon Nov 25 20:12:30 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtranssock.c,v 3.53 2001/12/14 19:57:06 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtranssock.c,v 3.56 2002/11/26 01:12:30 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -79,7 +79,7 @@ #include <sys/stat.h> #endif -#if defined(hpux) || defined(__EMX__) || (defined(MOTOROLA) && defined(SYSV)) +#if defined(hpux) || defined(__UNIXOS2__) || (defined(MOTOROLA) && defined(SYSV)) #define NO_TCP_H #endif @@ -128,7 +128,7 @@ #undef SO_DONTLINGER #endif -#if defined(__EMX__) +#if defined(__UNIXOS2__) #if defined(NOT_EMX09A) static int IBMsockInit = 0; #define SocketInitOnce()\ @@ -797,7 +797,7 @@ /* Set a flag to indicate that this connection is a listener */ - ciptr->flags = 1; + ciptr->flags = 1 | (ciptr->flags & TRANS_KEEPFLAGS); return 0; } @@ -1714,11 +1714,11 @@ #if (defined(i386) && defined(SYSV) && !defined(sco)) || (defined(_SEQUENT_) && _SOCKET_VERSION == 1) return ioctl (ciptr->fd, I_NREAD, (char *) pend); #else -#if defined(__EMX__) +#if defined(__UNIXOS2__) return ioctl (ciptr->fd, FIONREAD, (char*) pend, sizeof(int)); #else return ioctl (ciptr->fd, FIONREAD, (char *) pend); -#endif /* __EMX__ */ +#endif /* __UNIXOS2__ */ #endif /* i386 && SYSV || _SEQUENT_ && _SOCKET_VERSION == 1 */ #endif /* WIN32 */ } @@ -1730,7 +1730,7 @@ { PRMSG (2,"SocketRead(%d,%x,%d)\n", ciptr->fd, buf, size); -#if defined(WIN32) || defined(__EMX__) +#if defined(WIN32) || defined(__UNIXOS2__) return recv ((SOCKET)ciptr->fd, buf, size, 0); #else return read (ciptr->fd, buf, size); @@ -1744,7 +1744,7 @@ { PRMSG (2,"SocketWrite(%d,%x,%d)\n", ciptr->fd, buf, size); -#if defined(WIN32) || defined(__EMX__) +#if defined(WIN32) || defined(__UNIXOS2__) return send ((SOCKET)ciptr->fd, buf, size, 0); #else return write (ciptr->fd, buf, size); @@ -1820,7 +1820,8 @@ { strncpy (path, sockname->sun_path, ciptr->addrlen - sizeof (sockname->sun_family)); - unlink (path); + if (!(ciptr->flags & TRANS_NOUNLINK)) + unlink (path); } return ret; Index: xc/lib/xtrans/Xtranstli.c diff -u xc/lib/xtrans/Xtranstli.c:3.10 xc/lib/xtrans/Xtranstli.c:3.11 --- xc/lib/xtrans/Xtranstli.c:3.10 Fri Dec 14 14:57:07 2001 +++ xc/lib/xtrans/Xtranstli.c Sat Dec 14 20:28:33 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtranstli.c,v 3.10 2001/12/14 19:57:07 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtranstli.c,v 3.11 2002/12/15 01:28:33 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -131,7 +131,7 @@ for(i=0;i<NUMTLIFAMILIES;i++) { - if( !strcmp(family,TLItrans2devtab[i].transname) ) + if( !strcmp(family,TLItrans2devtab[i].transname) ) return i; } return -1; @@ -175,9 +175,9 @@ if( (ciptr->addr=(char *)xalloc(netbuf.len)) == NULL ) { - PRMSG(1, "TLIGetAddr: Can't allocate space for the addr\n", + PRMSG(1, "TLIGetAddr: Can't allocate space for the addr\n", 0,0,0); - return -1; + return -1; } ciptr->family=((struct sockaddr *) &sockname)->sa_family; @@ -225,10 +225,10 @@ if( (ciptr->peeraddr=(char *)xalloc(netbuf.len)) == NULL ) { - PRMSG(1, + PRMSG(1, "TLIGetPeerAddr: Can't allocate space for the addr\n", 0,0,0); - return -1; + return -1; } ciptr->peeraddrlen=netbuf.len; @@ -929,6 +929,23 @@ extern int t_errno; PRMSG(1, "TLIAccept() t_accept() failed\n", 0,0,0 ); PRMSG(1, "TLIAccept: %s\n", t_errlist[t_errno], 0,0 ); + if( t_errno == TLOOK ) + { + int evtype = t_look(ciptr->fd); + PRMSG(1, "TLIAccept() t_look() returned %d\n", evtype,0,0 ); + switch( evtype ) + { + case T_DISCONNECT: + if( t_rcvdis(ciptr->fd, NULL) < 0 ) + { + PRMSG(1, "TLIAccept() t_rcvdis() failed\n", 0,0,0 ); + PRMSG(1, "TLIAccept: %s\n", t_errlist[t_errno], 0,0 ); + } + break; + default: + break; + } + } t_free((char *)call,T_CALL); t_close(newciptr->fd); free(newciptr); @@ -1284,7 +1301,7 @@ Xtransport TRANS(TLITCPFuncs) = { /* TLI Interface */ "tcp", - 0, + 0, #ifdef TRANS_CLIENT TRANS(TLIOpenCOTSClient), #endif /* TRANS_CLIENT */ Index: xc/lib/xtrans/Xtransutil.c diff -u xc/lib/xtrans/Xtransutil.c:3.21 xc/lib/xtrans/Xtransutil.c:3.23 --- xc/lib/xtrans/Xtransutil.c:3.21 Fri Dec 14 14:57:07 2001 +++ xc/lib/xtrans/Xtransutil.c Wed Feb 12 10:01:38 2003 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransutil.c,v 3.21 2001/12/14 19:57:07 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransutil.c,v 3.23 2003/02/12 15:01:38 alanh Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -62,12 +62,6 @@ #include <X11/Xthreads.h> #endif -#ifdef __CYGWIN__ -#include <sys/unistd.h> -#define fchown chown -#define fchmod chmod -#endif - #ifdef X11_t /* @@ -503,12 +497,16 @@ if (updateOwner && !updatedOwner) { PRMSG(1, "mkdir: Owner of %s should be set to root\n", path, 0, 0); +#if !defined(__CYGWIN__) sleep(5); +#endif } if (updateMode && !updatedMode) { PRMSG(1, "mkdir: Mode of %s should be set to %04o\n", path, mode, 0); +#if !defined(__CYGWIN__) sleep(5); +#endif } return 0; } Index: xc/lib/xtrans/transport.c diff -u xc/lib/xtrans/transport.c:3.8 xc/lib/xtrans/transport.c:3.9 --- xc/lib/xtrans/transport.c:3.8 Fri Dec 14 14:57:07 2001 +++ xc/lib/xtrans/transport.c Fri May 31 14:45:51 2002 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/transport.c,v 3.8 2001/12/14 19:57:07 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/transport.c,v 3.9 2002/05/31 18:45:51 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -68,9 +68,6 @@ #endif #ifdef LOCALCONN #include "Xtranslcl.c" -#endif -#ifdef OS2PIPECONN -#include "Xtransos2.c" #endif #if defined(TCPCONN) || defined(UNIXCONN) #include "Xtranssock.c" Index: xc/lib/zlib/infblock.c diff -u xc/lib/zlib/infblock.c:1.4 xc/lib/zlib/infblock.c:1.7 --- xc/lib/zlib/infblock.c:1.4 Wed Jan 17 14:43:53 2001 +++ xc/lib/zlib/infblock.c Thu Feb 14 12:46:06 2002 @@ -4,6 +4,7 @@ * Copyright (C) 1995-1998 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $XFree86: xc/lib/zlib/infblock.c,v 1.7 2002/02/14 17:46:06 tsi Exp $ */ #include "zutil.h" #include "infblock.h" @@ -249,10 +250,11 @@ &s->sub.trees.tb, z); if (t != Z_OK) { - ZFREE(z, s->sub.trees.blens); r = t; - if (r == Z_DATA_ERROR) + if (r == Z_DATA_ERROR) { + ZFREE(z, s->sub.trees.blens); s->mode = BAD; + } LEAVE } s->sub.trees.index = 0; @@ -317,14 +319,16 @@ #endif t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), s->sub.trees.blens, &bl, &bd, &tl, &td, z); - ZFREE(z, s->sub.trees.blens); if (t != Z_OK) { - if (t == (uInt)Z_DATA_ERROR) + if (t == (uInt)Z_DATA_ERROR) { + ZFREE(z, s->sub.trees.blens); s->mode = BAD; + } r = t; LEAVE } + ZFREE(z, s->sub.trees.blens); Tracev((stderr, "inflate: trees ok, %d * %d bytes used\n", inflate_hufts, sizeof(inflate_huft))); if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL) Index: xc/lib/zlib/zconf.h diff -u xc/lib/zlib/zconf.h:1.8 xc/lib/zlib/zconf.h:1.9 --- xc/lib/zlib/zconf.h:1.8 Mon Sep 3 16:19:00 2001 +++ xc/lib/zlib/zconf.h Fri May 31 14:45:52 2002 @@ -5,7 +5,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $XFree86: xc/lib/zlib/zconf.h,v 1.8 2001/09/03 20:19:00 alanh Exp $ */ +/* $XFree86: xc/lib/zlib/zconf.h,v 1.9 2002/05/31 18:45:52 dawes Exp $ */ #ifndef _ZCONF_H #define _ZCONF_H @@ -52,7 +52,7 @@ #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) # define WIN32 #endif -#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) || defined(__EMX__) +#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) || defined(__UNIXOS2__) # ifndef __32BIT__ # define __32BIT__ # endif Index: xc/lib/zlib/zutil.h diff -u xc/lib/zlib/zutil.h:1.6 xc/lib/zlib/zutil.h:1.8 --- xc/lib/zlib/zutil.h:1.6 Wed Jan 17 14:43:56 2001 +++ xc/lib/zlib/zutil.h Sun Jun 30 22:25:53 2002 @@ -4,6 +4,7 @@ * Copyright (C) 1995-1998 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $XFree86: xc/lib/zlib/zutil.h,v 1.8 2002/07/01 02:25:53 tsi Exp $ */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is @@ -15,7 +16,7 @@ #include "zlib.h" -#if defined(MSDOS)||defined(VMS)||defined(CRAY)||defined(WIN32)||defined(RISCOS)||defined(__EMX__)||defined(STDC) +#if defined(MSDOS)||defined(VMS)||defined(CRAY)||defined(WIN32)||defined(RISCOS)||defined(__UNIXOS2__)||defined(STDC) # include <stddef.h> # include <errno.h> #else Index: xc/nls/Imakefile diff -u xc/nls/Imakefile:1.9 xc/nls/Imakefile:1.10 --- xc/nls/Imakefile:1.9 Thu Nov 15 19:52:30 2001 +++ xc/nls/Imakefile Fri May 31 14:45:52 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/nls/Imakefile,v 1.9 2001/11/16 00:52:30 dawes Exp $ +XCOMM $XFree86: xc/nls/Imakefile,v 1.10 2002/05/31 18:45:52 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -28,7 +28,6 @@ #endif #ifndef Win32Architecture -#ifndef OS2Architecture #if R63Compat # define LTarget(name) @@\ CppFileTarget(name.l1,name,$(DEFINES),NullParameter) @@\ @@ -51,20 +50,6 @@ @@\ clean:: @@\ RemoveFiles(name.l1 name.l2 name.lt) -#else -# define LTarget(name) @@\ -CppFileTarget(name.lt,name,$(DEFINES),NullParameter) @@\ - @@\ -AllTarget(name.lt) @@\ - MakeDir($(BUILDLIBDIR)/locale) @@\ - RemoveFile($(BUILDLIBDIR)/locale/name) @@\ - cd $(BUILDLIBDIR)/locale && $(LN) $(BUILDLIBTOP)/../$(CURRENT_DIR)/name.lt name @@\ - @@\ -InstallNamedNonExec(name.lt,name,$(XLOCALEDIR)) @@\ - @@\ -clean:: @@\ - RemoveFile(name.lt) -#endif #else # define LTarget(name) @@\ CppFileTarget(name.lt,name,$(DEFINES),NullParameter) @@\ Index: xc/nls/compose.dir diff -u xc/nls/compose.dir:1.20 xc/nls/compose.dir:1.23 --- xc/nls/compose.dir:1.20 Wed Nov 21 17:29:11 2001 +++ xc/nls/compose.dir Mon Dec 9 23:23:51 2002 @@ -4,7 +4,7 @@ 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.20 2001/11/21 22:29:11 dawes Exp $ +XCOMM $XFree86: xc/nls/compose.dir,v 1.23 2002/12/10 04:23:51 dawes Exp $ XCOMM iso8859-1/Compose: C iso8859-1/Compose: af_ZA.ISO8859-1 @@ -61,8 +61,11 @@ iso8859-1/Compose: en_NZ.ISO8859-1 iso8859-1/Compose: en_TT.ISO8859-1 iso8859-1/Compose: en_UK.ISO8859-1 +iso8859-15/Compose: en_UK.ISO8859-15 iso8859-1/Compose: en_US.ISO8859-1 +iso8859-15/Compose: en_US.ISO8859-15 iso8859-1/Compose: en_ZA.ISO8859-1 +iso8859-15/Compose: en_ZA.ISO8859-15 iso8859-3/Compose: eo_XX.ISO8859-3 iso8859-1/Compose: es_AR.ISO8859-1 iso8859-1/Compose: es_BO.ISO8859-1 @@ -247,7 +250,7 @@ en_US.UTF-8/Compose: de_DE.UTF-8 en_US.UTF-8/Compose: de_LI.UTF-8 en_US.UTF-8/Compose: de_LU.UTF-8 -en_US.UTF-8/Compose: el_GR.UTF-8 +el_GR.UTF-8/Compose: el_GR.UTF-8 en_US.UTF-8/Compose: en_AU.UTF-8 en_US.UTF-8/Compose: en_BZ.UTF-8 en_US.UTF-8/Compose: en_CA.UTF-8 Index: xc/nls/locale.alias diff -u xc/nls/locale.alias:1.50 xc/nls/locale.alias:1.62 --- xc/nls/locale.alias:1.50 Wed Dec 19 16:29:40 2001 +++ xc/nls/locale.alias Wed Feb 12 21:52:42 2003 @@ -5,7 +5,7 @@ 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.50 2001/12/19 21:29:40 dawes Exp $ +XCOMM $XFree86: xc/nls/locale.alias,v 1.62 2003/02/13 02:52:42 dawes Exp $ XCOMM POSIX: C @@ -19,6 +19,7 @@ af: af_ZA.ISO8859-1 af_ZA: af_ZA.ISO8859-1 af_ZA.iso88591: af_ZA.ISO8859-1 +am: am_ET.UTF-8 ar: ar_AA.ISO8859-6 ar_AA: ar_AA.ISO8859-6 ar_AA.iso88596: ar_AA.ISO8859-6 @@ -91,12 +92,18 @@ de_BE: de_BE.ISO8859-1 de_BE.iso88591: de_BE.ISO8859-1 de_BE.ISO_8859-1: de_BE.ISO8859-1 +de_BE.ISO-8859-1: de_BE.ISO8859-1 de_BE.iso885915: de_BE.ISO8859-15 +de_BE.ISO_8859-15: de_BE.ISO8859-15 +de_BE.ISO-8859-15: 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 +de_CH.ISO-8859-1: de_CH.ISO8859-1 de_CH.iso885915: de_CH.ISO8859-15 +de_CH.ISO_8859-15: de_CH.ISO8859-15 +de_CH.ISO-8859-15: de_CH.ISO8859-15 de_DE: de_DE.ISO8859-1 de_DE.88591: de_DE.ISO8859-1 de_DE.88591.en: de_DE.ISO8859-1 @@ -104,11 +111,16 @@ 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.ISO-8859-15: de_DE.ISO8859-15 +de_DE.ISO_8859-15: 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.ISO-8859-1: de_LU.ISO8859-1 de_LU.iso885915: de_LU.ISO8859-15 +de_LU.ISO_8859-15: de_LU.ISO8859-15 +de_LU.ISO-8859-15: 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 @@ -134,6 +146,7 @@ en_GB.88591: en_GB.ISO8859-1 en_GB.88591.en: en_GB.ISO8859-1 en_GB.iso88591: en_GB.ISO8859-1 +en_GB.iso885915: en_GB.ISO8859-15 en_GB.ISO-8859-1: en_GB.ISO8859-1 en_GB.ISO_8859-1: en_GB.ISO8859-1 en_UK: en_GB.ISO8859-1 @@ -141,6 +154,7 @@ ENG_GB.8859.in: en_GB.ISO8859-1 en_IE: en_IE.ISO8859-1 en_IE.iso88591: en_IE.ISO8859-1 +en_IE.iso885915: en_IE.ISO8859-15 en_IE@euro: en_IE.ISO8859-15 en_NZ: en_NZ.ISO8859-1 en_NZ.iso88591: en_NZ.ISO8859-1 @@ -148,11 +162,21 @@ en_US.88591: en_US.ISO8859-1 en_US.88591.en: en_US.ISO8859-1 en_US.iso88591: en_US.ISO8859-1 +en_US.iso885915: en_US.ISO8859-15 en_US.ISO-8859-1: en_US.ISO8859-1 en_US.ISO_8859-1: en_US.ISO8859-1 #if defined(SVR4) && defined(sun) en_US.utf8: en_US.UTF-8 #endif +en_ZA: en_ZA.ISO8859-1 +en_ZA.88591: en_ZA.ISO8859-1 +en_ZA.88591.en: en_ZA.ISO8859-1 +en_ZA.iso88591: en_ZA.ISO8859-1 +en_ZA.ISO-8859-1: en_ZA.ISO8859-1 +en_ZA.ISO_8859-1: en_ZA.ISO8859-1 +en_ZA.ISO-8859-15: en_ZA.ISO8859-15 +en_ZA.iso885915: en_ZA.ISO8859-15 +en_ZA.utf8: en_ZA.UTF-8 eo: eo_XX.ISO8859-3 eo_EO: eo_EO.ISO8859-3 eo_EO.ISO8859-3: eo_EO.ISO8859-3 @@ -169,6 +193,8 @@ es_CO.iso88591: es_CO.ISO8859-1 es_CR: es_CR.ISO8859-1 es_CR.iso88591: es_CR.ISO8859-1 +es_DO: es_DO.ISO8859-1 +es_DO.iso88591: es_DO.ISO8859-1 es_EC: es_EC.ISO8859-1 es_EC.iso88591: es_EC.ISO8859-1 es_ES: es_ES.ISO8859-1 @@ -181,6 +207,8 @@ es_ES@euro: es_ES.ISO8859-15 es_GT: es_GT.ISO8859-1 es_GT.iso88591: es_GT.ISO8859-1 +es_HN: es_HN.ISO8859-1 +es_HN.iso88591: es_HN.ISO8859-1 es_MX: es_MX.ISO8859-1 es_MX.iso88591: es_MX.ISO8859-1 es_NI: es_NI.ISO8859-1 @@ -191,6 +219,8 @@ es_PE: es_PE.ISO8859-1 es_PE.iso88591: es_PE.ISO8859-1 es_PE.iso885915: es_PE.ISO8859-15 +es_PR: es_PR.ISO8859-1 +es_PR.iso88591: es_PR.ISO8859-1 es_PY: es_PY.ISO8859-1 es_PY.iso88591: es_PY.ISO8859-1 es_PY.iso885915: es_PY.ISO8859-15 @@ -221,9 +251,10 @@ 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: fa_IR.UTF-8 +fa_IR: fa_IR.UTF-8 fa_IR.isiri3342: fa_IR.ISIRI-3342 +fa_IR.utf8: fa_IR.UTF-8 fi: fi_FI.ISO8859-15 fi_FI: fi_FI.ISO8859-15 fi_FI.88591: fi_FI.ISO8859-1 @@ -233,6 +264,7 @@ fi_FI.ISO_8859-1: fi_FI.ISO8859-1 fi_FI.iso885915: fi_FI.ISO8859-15 fi_FI@euro: fi_FI.ISO8859-15 +fi_FI.UTF-8@euro: fi_FI.UTF-8 fo: fo_FO.ISO8859-1 fo_FO: fo_FO.ISO8859-1 fo_FO.iso88591: fo_FO.ISO8859-1 @@ -417,7 +449,9 @@ lv: lv_LV.ISO8859-13 lv_LV: lv_LV.ISO8859-13 lv_LV.iso88594: lv_LV.ISO8859-4 -lv_LV.iso885913: lt_LT.ISO8859-13 +lv_LV.iso885913: lv_LV.ISO8859-13 +lv_LV.ISO-8859-13: lv_LV.ISO8859-13 +lv_LV.ISO_8859-13: lv_LV.ISO8859-13 mi: mi_NZ.ISO8859-1 mi_NZ: mi_NZ.ISO8859-1 mi_NZ.iso88591: mi_NZ.ISO8859-1 @@ -499,7 +533,11 @@ pp_AN.iso88591: pp_AN.ISO8859-1 pt: pt_PT.ISO8859-1 pt_BR: pt_BR.ISO8859-1 +pt_BR.88591: pt_BR.ISO8859-1 +pt_BR.88591.en: pt_BR.ISO8859-1 pt_BR.iso88591: pt_BR.ISO8859-1 +pt_BR.ISO-8859-1: pt_BR.ISO8859-1 +pt_BR.ISO_8859-1: pt_BR.ISO8859-1 pt_BR.iso885915: pt_BR.ISO8859-15 pt_PT: pt_PT.ISO8859-1 pt_PT.88591: pt_PT.ISO8859-1 @@ -509,6 +547,7 @@ pt_PT.ISO_8859-1: pt_PT.ISO8859-1 pt_PT.iso885915: pt_PT.ISO8859-15 pt_PT@euro: pt_PT.ISO8859-15 +pt_PT.UTF-8@euro: pt_PT.UTF-8 ro: ro_RO.ISO8859-2 ro_RO: ro_RO.ISO8859-2 ro_RO.iso88592: ro_RO.ISO8859-2 @@ -588,8 +627,9 @@ tg: tg_TJ.KOI8-C tg_TJ: tg_TJ.KOI8-C tg_TJ.koi8c: tg_TJ.KOI8-C -th: th_TH.TIS620 -th_TH: th_TH.TIS620 +th: th_TH.ISO8859-11 +th_TH: th_TH.ISO8859-11 +th_TH.ISO-8859-11: th_TH.ISO8859-11 th_TH.tis620: th_TH.TIS620 th_TH.TIS-620: th_TH.TIS620 th_TH.TACTIS: th_TH.TIS620 @@ -600,6 +640,7 @@ tr_TR: tr_TR.ISO8859-9 tr_TR.iso88599: tr_TR.ISO8859-9 tr_TR.ISO-8859-9: tr_TR.ISO8859-9 +tr_TR.utf8: tr_TR.UTF-8 tt: tt_RU.TATAR-CYR tt_RU: tt_RU.TATAR-CYR tt_RU.tatarcyr: tt_RU.TATAR-CYR @@ -635,8 +676,7 @@ yi_US.microsoftcp1255: yi_US.CP1255 yi_US.microsoft-cp1255: yi_US.CP1255 yi_US.MICROSOFT-CP1255: yi_US.CP1255 -zh: zh_CN.eucCN -zh_CN: zh_CN.eucCN +zh_CN: zh_CN.gbk zh_CN.Big5: zh_TW.big5 zh_CN.EUC: zh_CN.eucCN zh_CN.GB2312: zh_CN.eucCN @@ -644,9 +684,14 @@ zh_CN.big5: zh_TW.big5 zh_CN.euc: zh_CN.eucCN zh_CN.gb2312: zh_CN.eucCN -zh_HK: zh_HK.big5 -zh_HK.Big5: zh_HK.big5 +zh_HK: zh_HK.big5hkscs +zh_HK.Big5hkscs: zh_HK.big5hkscs +zh_HK.Big5-hkscs: zh_HK.big5hkscs +zh_HK.Big5_hkscs: zh_HK.big5hkscs zh_HK.Big5HKSCS: zh_HK.big5hkscs +zh_HK.BIG5-HKSCS: zh_HK.big5hkscs +zh_HK.BIG5_HKSCS: zh_HK.big5hkscs +zh_HK.Big5: zh_HK.big5 zh_TW: zh_TW.big5 zh_TW.Big5: zh_TW.big5 zh_TW.EUC: zh_TW.eucTW @@ -723,7 +768,7 @@ swedish.iso88591: sv_SE.ISO8859-1 turkish: tr_TR.ISO8859-9 turkish.iso88599: tr_TR.ISO8859-9 -thai: th_TH.tis620 +thai: th_TH.ISO8859-11 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.33 xc/nls/locale.dir:1.42 --- xc/nls/locale.dir:1.33 Wed Jan 9 11:14:16 2002 +++ xc/nls/locale.dir Tue Jan 14 22:59:46 2003 @@ -1,10 +1,10 @@ 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 This file contains locale database file names XCOMM The first word is the locale database file name and -XCOMM the second word is full locale name. +XCOMM the second word is the full locale name. XCOMM -XCOMM $XFree86: xc/nls/locale.dir,v 1.33 2002/01/09 16:14:16 dawes Exp $ +XCOMM $XFree86: xc/nls/locale.dir,v 1.42 2003/01/15 03:59:46 dawes Exp $ XCOMM C/XLC_LOCALE: C @@ -57,6 +57,7 @@ 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_BE.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 @@ -67,8 +68,11 @@ iso8859-1/XLC_LOCALE: en_NZ.ISO8859-1 iso8859-1/XLC_LOCALE: en_TT.ISO8859-1 iso8859-1/XLC_LOCALE: en_UK.ISO8859-1 +iso8859-15/XLC_LOCALE: en_UK.ISO8859-15 iso8859-1/XLC_LOCALE: en_US.ISO8859-1 +iso8859-15/XLC_LOCALE: en_US.ISO8859-15 iso8859-1/XLC_LOCALE: en_ZA.ISO8859-1 +iso8859-15/XLC_LOCALE: en_ZA.ISO8859-15 iso8859-3/XLC_LOCALE: eo_EO.ISO8859-3 iso8859-3/XLC_LOCALE: eo_XX.ISO8859-3 iso8859-1/XLC_LOCALE: es_AR.ISO8859-1 @@ -199,6 +203,7 @@ tscii-0/XLC_LOCALE: ta_IN.TSCII-0 koi8-c/XLC_LOCALE: tg_TJ.KOI8-C th_TH/XLC_LOCALE: th_TH.TIS620 +iso8859-11/XLC_LOCALE: th_TH.ISO8859-11 iso8859-1/XLC_LOCALE: tl_PH.ISO8859-1 iso8859-9/XLC_LOCALE: tr_TR.ISO8859-9 tatar-cyr/XLC_LOCALE: tt_RU.TATAR-CYR @@ -213,13 +218,18 @@ iso8859-15/XLC_LOCALE: wa_BE.ISO8859-15 microsoft-cp1255/XLC_LOCALE: yi_US.CP1255 zh_CN/XLC_LOCALE: zh_CN.eucCN +zh_CN/XLC_LOCALE: zh_CN.GB2312 zh_CN.gbk/XLC_LOCALE: zh_CN.gbk zh_HK.big5/XLC_LOCALE: zh_HK.big5 +zh_HK.big5hkscs/XLC_LOCALE: zh_HK.big5-hkscs +zh_HK.big5hkscs/XLC_LOCALE: zh_HK.Big5-HKSCS zh_HK.big5hkscs/XLC_LOCALE: zh_HK.big5hkscs +zh_HK.big5hkscs/XLC_LOCALE: zh_HK.Big5HKSCS zh_TW.big5/XLC_LOCALE: zh_TW.big5 zh_TW/XLC_LOCALE: zh_TW.eucTW XCOMM Note: The UTF-8 locales don't work correctly yet. Work in progress. en_US.UTF-8/XLC_LOCALE: af_ZA.UTF-8 +en_US.UTF-8/XLC_LOCALE: am_ET.UTF-8 en_US.UTF-8/XLC_LOCALE: ar_AA.UTF-8 en_US.UTF-8/XLC_LOCALE: ar_BH.UTF-8 en_US.UTF-8/XLC_LOCALE: ar_DZ.UTF-8 @@ -254,6 +264,7 @@ en_US.UTF-8/XLC_LOCALE: de_LU.UTF-8 en_US.UTF-8/XLC_LOCALE: el_GR.UTF-8 en_US.UTF-8/XLC_LOCALE: en_AU.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_BE.UTF-8 en_US.UTF-8/XLC_LOCALE: en_BZ.UTF-8 en_US.UTF-8/XLC_LOCALE: en_CA.UTF-8 en_US.UTF-8/XLC_LOCALE: en_GB.UTF-8 @@ -309,10 +320,10 @@ en_US.UTF-8/XLC_LOCALE: it_CH.UTF-8 en_US.UTF-8/XLC_LOCALE: it_IT.UTF-8 en_US.UTF-8/XLC_LOCALE: iu_CA.UTF-8 -en_US.UTF-8/XLC_LOCALE: ja_JP.UTF-8 +ja_JP.UTF-8/XLC_LOCALE: ja_JP.UTF-8 en_US.UTF-8/XLC_LOCALE: ka_GE.UTF-8 en_US.UTF-8/XLC_LOCALE: kl_GL.UTF-8 -en_US.UTF-8/XLC_LOCALE: ko_KR.UTF-8 +ko_KR.UTF-8/XLC_LOCALE: ko_KR.UTF-8 en_US.UTF-8/XLC_LOCALE: kw_GB.UTF-8 en_US.UTF-8/XLC_LOCALE: lo_LA.UTF-8 en_US.UTF-8/XLC_LOCALE: lt_LT.UTF-8 @@ -346,7 +357,9 @@ en_US.UTF-8/XLC_LOCALE: sv_SE.UTF-8 en_US.UTF-8/XLC_LOCALE: ta_IN.UTF-8 en_US.UTF-8/XLC_LOCALE: tg_TJ.UTF-8 -en_US.UTF-8/XLC_LOCALE: th_TH.UTF-8 +th_TH.UTF-8/XLC_LOCALE: th_TH.UTF-8 +en_US.UTF-8/XLC_LOCALE: ti_ER.UTF-8 +en_US.UTF-8/XLC_LOCALE: ti_ET.UTF-8 en_US.UTF-8/XLC_LOCALE: tl_PH.UTF-8 en_US.UTF-8/XLC_LOCALE: tr_TR.UTF-8 en_US.UTF-8/XLC_LOCALE: tt_RU.UTF-8 @@ -356,7 +369,7 @@ en_US.UTF-8/XLC_LOCALE: wa_BE.UTF-8 en_US.UTF-8/XLC_LOCALE: yi_US.UTF-8 en_US.UTF-8/XLC_LOCALE: zh_CN.UTF-8 -en_US.UTF-8/XLC_LOCALE: zh_TW.UTF-8 +zh_TW.UTF-8/XLC_LOCALE: zh_TW.UTF-8 #ifdef __uxp__ ja.U90/XLC_LOCALE: ja_JP.U90 ja.S90/XLC_LOCALE: ja_JP.S90 Index: xc/nls/Compose/Imakefile diff -u xc/nls/Compose/Imakefile:1.19 xc/nls/Compose/Imakefile:1.21 --- xc/nls/Compose/Imakefile:1.19 Fri Nov 2 18:29:28 2001 +++ xc/nls/Compose/Imakefile Mon Jun 3 18:19:43 2002 @@ -3,10 +3,9 @@ -XCOMM $XFree86: xc/nls/Compose/Imakefile,v 1.19 2001/11/02 23:29:28 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/Imakefile,v 1.21 2002/06/03 22:19:43 dawes Exp $ #ifndef Win32Architecture -#ifndef OS2Architecture # define ComposeTarget(name) @@\ all:: name.ct @@\ MakeDir($(BUILDLIBDIR)/locale/name) @@\ @@ -18,16 +17,6 @@ InstallNamedNonExec(name.ct,Compose,$(XLOCALEDIR)/name) #else # define ComposeTarget(name) @@\ -all:: name.ct @@\ - MakeDir($(BUILDLIBDIR)/locale/name) @@\ - LinkFileSpecial($(BUILDLIBDIR)/locale/name,XLC_LOCALE,$(BUILDLIBTOP)/../../$(CURRENT_DIR)/name.ct) @@\ - @@\ -CppFileTarget(name.ct,name,$(DEFINES),NullParameter) @@\ - @@\ -InstallNamedNonExec(name.ct,Compose,$(XLOCALEDIR)/name) -#endif -#else -# define ComposeTarget(name) @@\ all:: name @@\ MakeDir(Concat($(BUILDLIBDIR:/=\)\locale\,name)) @@\ RemoveFile(Concat($(BUILDLIBDIR:/=\)\locale\,name\Compose)) @@\ @@ -39,6 +28,7 @@ #endif ComposeTarget(armscii-8) +ComposeTarget(el_GR.UTF-8) ComposeTarget(en_US.UTF-8) ComposeTarget(georgian-academy) ComposeTarget(georgian-ps) Index: xc/nls/Compose/el_GR.UTF-8 diff -u /dev/null xc/nls/Compose/el_GR.UTF-8:1.2 --- /dev/null Thu Feb 27 12:28:15 2003 +++ xc/nls/Compose/el_GR.UTF-8 Sun Jun 30 22:25:54 2002 @@ -0,0 +1,1575 @@ +XCOMM +XCOMM $XFree86: xc/nls/Compose/el_GR.UTF-8,v 1.2 2002/07/01 02:25:54 tsi Exp $ +XCOMM +XCOMM UTF-8 compose sequence definitions for the greek keyboard layout. +XCOMM +XCOMM This file is mostly meant to be used along with the xkb/symbols/el +XCOMM symbols definition file. In addition, the dead key definitions in +XCOMM the machine generated part are really only relevant to the +XCOMM "polytonic" variant in that file. +XCOMM +XCOMM The definitions herein cover the following ISO 10646 / Unicode +XCOMM ranges: +XCOMM - Basic Latin (0000-007F) (complete coverage) +XCOMM - Latin-1 Supplement (0080-00FF) (complete coverage) +XCOMM - Greek and Coptic (0370-03FF) (only the big ISO 8859-7 based +XCOMM part at the beginning) +XCOMM - Greek Extended (1F00-1FFF) (complete coverage) +XCOMM - There are also six (6) characters from other ranges. +XCOMM Moreover, the following character sets are completely covered: +XCOMM - ISO 8859-1 +XCOMM - ISO 8859-7 +XCOMM +XCOMM This file consists of four parts. Two of them have been adapted from +XCOMM the iso8859-1/Compose and iso8859-7/Compose files. The other two +XCOMM parts have been created by: +XCOMM Vasilis Vasaitis <vvas@hal.csd.auth.gr> +XCOMM based on the idea and initial implementation by: +XCOMM Alejandros Diamandidis <adia@egnatia.ee.auth.gr> + +XCOMM Part 1 +XCOMM +XCOMM ISO 8859-1 (Latin-1) multi-key definitions extracted and converted +XCOMM from the iso8859-1/Compose file. + +XCOMM Special Character +<Multi_key> <plus> <plus> : "#" numbersign +<Multi_key> <apostrophe> <space> : "'" apostrophe +<Multi_key> <space> <apostrophe> : "'" apostrophe +<Multi_key> <A> <T> : "@" at +<Multi_key> <parenleft> <parenleft> : "[" bracketleft +<Multi_key> <slash> <slash> : "\\" backslash +<Multi_key> <slash> <less> : "\\" backslash +<Multi_key> <less> <slash> : "\\" backslash +<Multi_key> <parenright> <parenright> : "]" bracketright +<Multi_key> <asciicircum> <space> : "^" asciicircum +<Multi_key> <space> <asciicircum> : "^" asciicircum +<Multi_key> <greater> <space> : "^" asciicircum +<Multi_key> <space> <greater> : "^" asciicircum +<Multi_key> <grave> <space> : "`" grave +<Multi_key> <space> <grave> : "`" grave +<Multi_key> <parenleft> <minus> : "{" braceleft +<Multi_key> <minus> <parenleft> : "{" braceleft +<Multi_key> <slash> <asciicircum> : "|" bar +<Multi_key> <asciicircum> <slash> : "|" bar +<Multi_key> <V> <L> : "|" bar +<Multi_key> <L> <V> : "|" bar +<Multi_key> <v> <l> : "|" bar +<Multi_key> <l> <v> : "|" bar +<Multi_key> <parenright> <minus> : "}" braceright +<Multi_key> <minus> <parenright> : "}" braceright +<Multi_key> <asciitilde> <space> : "~" asciitilde +<Multi_key> <space> <asciitilde> : "~" asciitilde +<Multi_key> <minus> <space> : "~" asciitilde +<Multi_key> <space> <minus> : "~" asciitilde +<Multi_key> <exclam> <exclam> : "¡" exclamdown +<Multi_key> <c> <slash> : "¢" cent +<Multi_key> <slash> <c> : "¢" cent +<Multi_key> <C> <slash> : "¢" cent +<Multi_key> <slash> <C> : "¢" cent +<Multi_key> <C> <bar> : "¢" cent +<Multi_key> <bar> <C> : "¢" cent +<Multi_key> <c> <bar> : "¢" cent +<Multi_key> <bar> <c> : "¢" cent +<Multi_key> <l> <minus> : "£" sterling +<Multi_key> <minus> <l> : "£" sterling +<Multi_key> <L> <minus> : "£" sterling +<Multi_key> <minus> <L> : "£" sterling +<Multi_key> <l> <equal> : "£" sterling +<Multi_key> <equal> <l> : "£" sterling +<Multi_key> <L> <equal> : "£" sterling +<Multi_key> <equal> <L> : "£" sterling +<Multi_key> <y> <minus> : "Â¥" yen +<Multi_key> <minus> <y> : "Â¥" yen +<Multi_key> <Y> <minus> : "Â¥" yen +<Multi_key> <minus> <Y> : "Â¥" yen +<Multi_key> <y> <equal> : "Â¥" yen +<Multi_key> <equal> <y> : "Â¥" yen +<Multi_key> <Y> <equal> : "Â¥" yen +<Multi_key> <equal> <Y> : "Â¥" yen +<Multi_key> <s> <o> : "§" section +<Multi_key> <o> <s> : "§" section +<Multi_key> <S> <O> : "§" section +<Multi_key> <O> <S> : "§" section +<Multi_key> <S> <exclam> : "§" section +<Multi_key> <exclam> <S> : "§" section +<Multi_key> <s> <exclam> : "§" section +<Multi_key> <exclam> <s> : "§" section +<Multi_key> <S> <0> : "§" section +<Multi_key> <0> <S> : "§" section +<Multi_key> <s> <0> : "§" section +<Multi_key> <0> <s> : "§" section +<Multi_key> <x> <o> : "¤" currency +<Multi_key> <o> <x> : "¤" currency +<Multi_key> <X> <O> : "¤" currency +<Multi_key> <O> <X> : "¤" currency +<Multi_key> <x> <O> : "¤" currency +<Multi_key> <O> <x> : "¤" currency +<Multi_key> <X> <o> : "¤" currency +<Multi_key> <o> <X> : "¤" currency +<Multi_key> <x> <0> : "¤" currency +<Multi_key> <0> <x> : "¤" currency +<Multi_key> <X> <0> : "¤" currency +<Multi_key> <0> <X> : "¤" currency +<Multi_key> <c> <o> : "©" copyright +<Multi_key> <o> <c> : "©" copyright +<Multi_key> <C> <O> : "©" copyright +<Multi_key> <O> <C> : "©" copyright +<Multi_key> <c> <O> : "©" copyright +<Multi_key> <O> <c> : "©" copyright +<Multi_key> <C> <o> : "©" copyright +<Multi_key> <o> <C> : "©" copyright +<Multi_key> <c> <0> : "©" copyright +<Multi_key> <0> <c> : "©" copyright +<Multi_key> <C> <0> : "©" copyright +<Multi_key> <0> <C> : "©" copyright +<Multi_key> <parenleft> <c> : "©" copyright +<Multi_key> <a> <underscore> : "ª" ordfeminine +<Multi_key> <underscore> <a> : "ª" ordfeminine +<Multi_key> <A> <underscore> : "ª" ordfeminine +<Multi_key> <underscore> <A> : "ª" ordfeminine +<Multi_key> <o> <underscore> : "º" masculine +<Multi_key> <underscore> <o> : "º" masculine +<Multi_key> <O> <underscore> : "º" masculine +<Multi_key> <underscore> <O> : "º" masculine +<Multi_key> <less> <less> : "«" guillemotleft +<Multi_key> <greater> <greater> : "»" guillemotright +<Multi_key> <0> <asciicircum> : "°" degree +<Multi_key> <asciicircum> <0> : "°" degree +<Multi_key> <0> <asterisk> : "°" degree +<Multi_key> <asterisk> <0> : "°" degree +<Multi_key> <plus> <minus> : "±" plusminus +<Multi_key> <minus> <plus> : "±" plusminus +<Multi_key> <slash> <u> : "µ" mu +<Multi_key> <u> <slash> : "µ" mu +<Multi_key> <slash> <U> : "µ" mu +<Multi_key> <U> <slash> : "µ" mu +<Multi_key> <1> <asciicircum> : "¹" onesuperior +<Multi_key> <asciicircum> <1> : "¹" onesuperior +<Multi_key> <S> <1> : "¹" onesuperior +<Multi_key> <1> <S> : "¹" onesuperior +<Multi_key> <s> <1> : "¹" onesuperior +<Multi_key> <1> <s> : "¹" onesuperior +<Multi_key> <2> <asciicircum> : "²" twosuperior +<Multi_key> <asciicircum> <2> : "²" twosuperior +<Multi_key> <S> <2> : "²" twosuperior +<Multi_key> <2> <S> : "²" twosuperior +<Multi_key> <s> <2> : "²" twosuperior +<Multi_key> <2> <s> : "²" twosuperior +<Multi_key> <3> <asciicircum> : "³" threesuperior +<Multi_key> <asciicircum> <3> : "³" threesuperior +<Multi_key> <S> <3> : "³" threesuperior +<Multi_key> <3> <S> : "³" threesuperior +<Multi_key> <s> <3> : "³" threesuperior +<Multi_key> <3> <s> : "³" threesuperior +<Multi_key> <p> <exclam> : "¶" paragraph +<Multi_key> <exclam> <p> : "¶" paragraph +<Multi_key> <P> <exclam> : "¶" paragraph +<Multi_key> <exclam> <P> : "¶" paragraph +<Multi_key> <period> <asciicircum> : "·" periodcentered +<Multi_key> <asciicircum> <period> : "·" periodcentered +<Multi_key> <period> <period> : "·" periodcentered +<Multi_key> <1> <4> : "¼" onequarter +<Multi_key> <1> <2> : "½" onehalf +<Multi_key> <3> <4> : "¾" threequarters +<Multi_key> <question> <question> : "¿" questiondown +<Multi_key> <space> <space> : " " nobreakspace +<Multi_key> <bar> <bar> : "¦" brokenbar +<Multi_key> <exclam> <asciicircum> : "¦" brokenbar +<Multi_key> <asciicircum> <exclam> : "¦" brokenbar +<Multi_key> <V> <B> : "¦" brokenbar +<Multi_key> <B> <V> : "¦" brokenbar +<Multi_key> <v> <b> : "¦" brokenbar +<Multi_key> <b> <v> : "¦" brokenbar +<Multi_key> <minus> <comma> : "¬" notsign +<Multi_key> <comma> <minus> : "¬" notsign +<Multi_key> <minus> <minus> : "­" hyphen +<Multi_key> <R> <O> : "®" registered +<Multi_key> <O> <R> : "®" registered +<Multi_key> <parenleft> <r> : "®" registered +<Multi_key> <minus> <asciicircum> : "¯" macron +<Multi_key> <asciicircum> <minus> : "¯" macron +<Multi_key> <underscore> <asciicircum> : "¯" macron +<Multi_key> <asciicircum> <underscore> : "¯" macron +<Multi_key> <underscore> <underscore> : "¯" macron +<Multi_key> <minus> <colon> : "÷" division +<Multi_key> <colon> <minus> : "÷" division +<Multi_key> <x> <x> : "×" multiply +<Multi_key> <apostrophe> <apostrophe> : "´" acute +<Multi_key> <comma> <comma> : "¸" cedilla +<Multi_key> <quotedbl> <quotedbl> : "¨" diaeresis +XCOMM Accented Alphabet +<Multi_key> <A> <grave> : "À" Agrave +<Multi_key> <grave> <A> : "À" Agrave +<Multi_key> <A> <acute> : "Ã" Aacute +<Multi_key> <acute> <A> : "Ã" Aacute +<Multi_key> <A> <apostrophe> : "Ã" Aacute +<Multi_key> <apostrophe> <A> : "Ã" Aacute +<Multi_key> <A> <asciicircum> : "Â" Acircumflex +<Multi_key> <asciicircum> <A> : "Â" Acircumflex +<Multi_key> <A> <greater> : "Â" Acircumflex +<Multi_key> <greater> <A> : "Â" Acircumflex +<Multi_key> <A> <asciitilde> : "Ã" Atilde +<Multi_key> <asciitilde> <A> : "Ã" Atilde +<Multi_key> <A> <minus> : "Ã" Atilde +<Multi_key> <minus> <A> : "Ã" Atilde +<Multi_key> <A> <quotedbl> : "Ä" Adiaeresis +<Multi_key> <quotedbl> <A> : "Ä" Adiaeresis +<Multi_key> <A> <diaeresis> : "Ä" Adiaeresis +<Multi_key> <diaeresis> <A> : "Ä" Adiaeresis +<Multi_key> <A> <asterisk> : "Ã…" Aring +<Multi_key> <asterisk> <A> : "Ã…" Aring +<Multi_key> <A> <A> : "Ã…" Aring +<Multi_key> <A> <O> : "Ã…" Aring +<Multi_key> <A> <E> : "Æ" AE +<Multi_key> <a> <grave> : "à" agrave +<Multi_key> <grave> <a> : "à" agrave +<Multi_key> <a> <acute> : "á" aacute +<Multi_key> <acute> <a> : "á" aacute +<Multi_key> <a> <apostrophe> : "á" aacute +<Multi_key> <apostrophe> <a> : "á" aacute +<Multi_key> <a> <asciicircum> : "â" acircumflex +<Multi_key> <asciicircum> <a> : "â" acircumflex +<Multi_key> <a> <greater> : "â" acircumflex +<Multi_key> <greater> <a> : "â" acircumflex +<Multi_key> <a> <asciitilde> : "ã" atilde +<Multi_key> <asciitilde> <a> : "ã" atilde +<Multi_key> <a> <minus> : "ã" atilde +<Multi_key> <minus> <a> : "ã" atilde +<Multi_key> <a> <quotedbl> : "ä" adiaeresis +<Multi_key> <quotedbl> <a> : "ä" adiaeresis +<Multi_key> <a> <diaeresis> : "ä" adiaeresis +<Multi_key> <diaeresis> <a> : "ä" adiaeresis +<Multi_key> <a> <asterisk> : "Ã¥" aring +<Multi_key> <asterisk> <a> : "Ã¥" aring +<Multi_key> <a> <a> : "Ã¥" aring +<Multi_key> <a> <o> : "Ã¥" aring +<Multi_key> <a> <e> : "æ" ae +<Multi_key> <acute> <C> : "Ç" Ccedilla +<Multi_key> <acute> <c> : "ç" ccedilla +<Multi_key> <C> <comma> : "Ç" Ccedilla +<Multi_key> <comma> <C> : "Ç" Ccedilla +<Multi_key> <c> <comma> : "ç" ccedilla +<Multi_key> <comma> <c> : "ç" ccedilla +<Multi_key> <minus> <D> : "Ã" ETH +<Multi_key> <D> <minus> : "Ã" ETH +<Multi_key> <minus> <d> : "ð" eth +<Multi_key> <d> <minus> : "ð" eth +<Multi_key> <E> <grave> : "È" Egrave +<Multi_key> <grave> <E> : "È" Egrave +<Multi_key> <E> <acute> : "É" Eacute +<Multi_key> <acute> <E> : "É" Eacute +<Multi_key> <E> <apostrophe> : "É" Eacute +<Multi_key> <apostrophe> <E> : "É" Eacute +<Multi_key> <E> <asciicircum> : "Ê" Ecircumflex +<Multi_key> <asciicircum> <E> : "Ê" Ecircumflex +<Multi_key> <E> <greater> : "Ê" Ecircumflex +<Multi_key> <greater> <E> : "Ê" Ecircumflex +<Multi_key> <E> <quotedbl> : "Ë" Ediaeresis +<Multi_key> <quotedbl> <E> : "Ë" Ediaeresis +<Multi_key> <E> <diaeresis> : "Ë" Ediaeresis +<Multi_key> <diaeresis> <E> : "Ë" Ediaeresis +<Multi_key> <e> <grave> : "è" egrave +<Multi_key> <grave> <e> : "è" egrave +<Multi_key> <e> <acute> : "é" eacute +<Multi_key> <acute> <e> : "é" eacute +<Multi_key> <e> <apostrophe> : "é" eacute +<Multi_key> <apostrophe> <e> : "é" eacute +<Multi_key> <e> <asciicircum> : "ê" ecircumflex +<Multi_key> <asciicircum> <e> : "ê" ecircumflex +<Multi_key> <e> <greater> : "ê" ecircumflex +<Multi_key> <greater> <e> : "ê" ecircumflex +<Multi_key> <e> <quotedbl> : "ë" ediaeresis +<Multi_key> <quotedbl> <e> : "ë" ediaeresis +<Multi_key> <e> <diaeresis> : "ë" ediaeresis +<Multi_key> <diaeresis> <e> : "ë" ediaeresis +<Multi_key> <I> <grave> : "ÃŒ" Igrave +<Multi_key> <grave> <I> : "ÃŒ" Igrave +<Multi_key> <I> <acute> : "Ã" Iacute +<Multi_key> <acute> <I> : "Ã" Iacute +<Multi_key> <I> <apostrophe> : "Ã" Iacute +<Multi_key> <apostrophe> <I> : "Ã" Iacute +<Multi_key> <I> <asciicircum> : "ÃŽ" Icircumflex +<Multi_key> <asciicircum> <I> : "ÃŽ" Icircumflex +<Multi_key> <I> <greater> : "ÃŽ" Icircumflex +<Multi_key> <greater> <I> : "ÃŽ" Icircumflex +<Multi_key> <I> <quotedbl> : "Ã" Idiaeresis +<Multi_key> <quotedbl> <I> : "Ã" Idiaeresis +<Multi_key> <I> <diaeresis> : "Ã" Idiaeresis +<Multi_key> <diaeresis> <I> : "Ã" Idiaeresis +<Multi_key> <i> <grave> : "ì" igrave +<Multi_key> <grave> <i> : "ì" igrave +<Multi_key> <i> <acute> : "í" iacute +<Multi_key> <acute> <i> : "í" iacute +<Multi_key> <i> <apostrophe> : "í" iacute +<Multi_key> <apostrophe> <i> : "í" iacute +<Multi_key> <i> <asciicircum> : "î" icircumflex +<Multi_key> <asciicircum> <i> : "î" icircumflex +<Multi_key> <i> <greater> : "î" icircumflex +<Multi_key> <greater> <i> : "î" icircumflex +<Multi_key> <i> <quotedbl> : "ï" idiaeresis +<Multi_key> <quotedbl> <i> : "ï" idiaeresis +<Multi_key> <i> <diaeresis> : "ï" idiaeresis +<Multi_key> <diaeresis> <i> : "ï" idiaeresis +<Multi_key> <N> <asciitilde> : "Ñ" Ntilde +<Multi_key> <asciitilde> <N> : "Ñ" Ntilde +<Multi_key> <N> <minus> : "Ñ" Ntilde +<Multi_key> <minus> <N> : "Ñ" Ntilde +<Multi_key> <n> <asciitilde> : "ñ" ntilde +<Multi_key> <asciitilde> <n> : "ñ" ntilde +<Multi_key> <n> <minus> : "ñ" ntilde +<Multi_key> <minus> <n> : "ñ" ntilde +<Multi_key> <O> <grave> : "Ã’" Ograve +<Multi_key> <grave> <O> : "Ã’" Ograve +<Multi_key> <O> <acute> : "Ó" Oacute +<Multi_key> <acute> <O> : "Ó" Oacute +<Multi_key> <O> <apostrophe> : "Ó" Oacute +<Multi_key> <apostrophe> <O> : "Ó" Oacute +<Multi_key> <O> <asciicircum> : "Ô" Ocircumflex +<Multi_key> <asciicircum> <O> : "Ô" Ocircumflex +<Multi_key> <O> <greater> : "Ô" Ocircumflex +<Multi_key> <greater> <O> : "Ô" Ocircumflex +<Multi_key> <O> <asciitilde> : "Õ" Otilde +<Multi_key> <asciitilde> <O> : "Õ" Otilde +<Multi_key> <O> <minus> : "Õ" Otilde +<Multi_key> <minus> <O> : "Õ" Otilde +<Multi_key> <O> <quotedbl> : "Ö" Odiaeresis +<Multi_key> <quotedbl> <O> : "Ö" Odiaeresis +<Multi_key> <O> <diaeresis> : "Ö" Odiaeresis +<Multi_key> <diaeresis> <O> : "Ö" Odiaeresis +<Multi_key> <O> <slash> : "Ø" Ooblique +<Multi_key> <slash> <O> : "Ø" Ooblique +<Multi_key> <o> <grave> : "ò" ograve +<Multi_key> <grave> <o> : "ò" ograve +<Multi_key> <o> <acute> : "ó" oacute +<Multi_key> <acute> <o> : "ó" oacute +<Multi_key> <o> <apostrophe> : "ó" oacute +<Multi_key> <apostrophe> <o> : "ó" oacute +<Multi_key> <o> <asciicircum> : "ô" ocircumflex +<Multi_key> <asciicircum> <o> : "ô" ocircumflex +<Multi_key> <o> <greater> : "ô" ocircumflex +<Multi_key> <greater> <o> : "ô" ocircumflex +<Multi_key> <o> <asciitilde> : "õ" otilde +<Multi_key> <asciitilde> <o> : "õ" otilde +<Multi_key> <o> <minus> : "õ" otilde +<Multi_key> <minus> <o> : "õ" otilde +<Multi_key> <o> <quotedbl> : "ö" odiaeresis +<Multi_key> <quotedbl> <o> : "ö" odiaeresis +<Multi_key> <o> <diaeresis> : "ö" odiaeresis +<Multi_key> <diaeresis> <o> : "ö" odiaeresis +<Multi_key> <o> <slash> : "ø" oslash +<Multi_key> <slash> <o> : "ø" oslash +<Multi_key> <U> <grave> : "Ù" Ugrave +<Multi_key> <grave> <U> : "Ù" Ugrave +<Multi_key> <U> <acute> : "Ú" Uacute +<Multi_key> <acute> <U> : "Ú" Uacute +<Multi_key> <U> <apostrophe> : "Ú" Uacute +<Multi_key> <apostrophe> <U> : "Ú" Uacute +<Multi_key> <U> <asciicircum> : "Û" Ucircumflex +<Multi_key> <asciicircum> <U> : "Û" Ucircumflex +<Multi_key> <U> <greater> : "Û" Ucircumflex +<Multi_key> <greater> <U> : "Û" Ucircumflex +<Multi_key> <U> <quotedbl> : "Ãœ" Udiaeresis +<Multi_key> <quotedbl> <U> : "Ãœ" Udiaeresis +<Multi_key> <U> <diaeresis> : "Ãœ" Udiaeresis +<Multi_key> <diaeresis> <U> : "Ãœ" Udiaeresis +<Multi_key> <u> <grave> : "ù" ugrave +<Multi_key> <grave> <u> : "ù" ugrave +<Multi_key> <u> <acute> : "ú" uacute +<Multi_key> <acute> <u> : "ú" uacute +<Multi_key> <u> <apostrophe> : "ú" uacute +<Multi_key> <apostrophe> <u> : "ú" uacute +<Multi_key> <u> <asciicircum> : "û" ucircumflex +<Multi_key> <asciicircum> <u> : "û" ucircumflex +<Multi_key> <u> <greater> : "û" ucircumflex +<Multi_key> <greater> <u> : "û" ucircumflex +<Multi_key> <u> <quotedbl> : "ü" udiaeresis +<Multi_key> <quotedbl> <u> : "ü" udiaeresis +<Multi_key> <u> <diaeresis> : "ü" udiaeresis +<Multi_key> <diaeresis> <u> : "ü" udiaeresis +<Multi_key> <s> <s> : "ß" ssharp +<Multi_key> <T> <H> : "Þ" THORN +<Multi_key> <t> <h> : "þ" thorn +<Multi_key> <Y> <acute> : "Ã" Yacute +<Multi_key> <acute> <Y> : "Ã" Yacute +<Multi_key> <Y> <apostrophe> : "Ã" Yacute +<Multi_key> <apostrophe> <Y> : "Ã" Yacute +<Multi_key> <y> <acute> : "ý" yacute +<Multi_key> <acute> <y> : "ý" yacute +<Multi_key> <y> <apostrophe> : "ý" yacute +<Multi_key> <apostrophe> <y> : "ý" yacute +<Multi_key> <y> <quotedbl> : "ÿ" ydiaeresis +<Multi_key> <quotedbl> <y> : "ÿ" ydiaeresis +<Multi_key> <y> <diaeresis> : "ÿ" ydiaeresis +<Multi_key> <diaeresis> <y> : "ÿ" ydiaeresis + +XCOMM Part 2 +XCOMM +XCOMM Greek Extended multi-key and dead key definitions. These have been +XCOMM machine-generated by a perl script, found at: +XCOMM http://hal.csd.auth.gr/~vvas/i18n/xkb/polytonic-compose.pl + +<Multi_key> <greater> <Greek_alpha> : "á¼€" U1f00 +<dead_horn> <Greek_alpha> : "á¼€" U1f00 +<Multi_key> <less> <Greek_alpha> : "á¼" U1f01 +<dead_ogonek> <Greek_alpha> : "á¼" U1f01 +<Multi_key> <greater> <grave> <Greek_alpha> : "ἂ" U1f02 +<Multi_key> <grave> <greater> <Greek_alpha> : "ἂ" U1f02 +<dead_horn> <dead_grave> <Greek_alpha> : "ἂ" U1f02 +<dead_grave> <dead_horn> <Greek_alpha> : "ἂ" U1f02 +<Multi_key> <less> <grave> <Greek_alpha> : "ἃ" U1f03 +<Multi_key> <grave> <less> <Greek_alpha> : "ἃ" U1f03 +<dead_ogonek> <dead_grave> <Greek_alpha> : "ἃ" U1f03 +<dead_grave> <dead_ogonek> <Greek_alpha> : "ἃ" U1f03 +<Multi_key> <greater> <apostrophe> <Greek_alpha> : "ἄ" U1f04 +<Multi_key> <apostrophe> <greater> <Greek_alpha> : "ἄ" U1f04 +<dead_horn> <dead_acute> <Greek_alpha> : "ἄ" U1f04 +<dead_acute> <dead_horn> <Greek_alpha> : "ἄ" U1f04 +<Multi_key> <less> <apostrophe> <Greek_alpha> : "á¼…" U1f05 +<Multi_key> <apostrophe> <less> <Greek_alpha> : "á¼…" U1f05 +<dead_ogonek> <dead_acute> <Greek_alpha> : "á¼…" U1f05 +<dead_acute> <dead_ogonek> <Greek_alpha> : "á¼…" U1f05 +<Multi_key> <greater> <asciitilde> <Greek_alpha> : "ἆ" U1f06 +<Multi_key> <asciitilde> <greater> <Greek_alpha> : "ἆ" U1f06 +<dead_horn> <dead_tilde> <Greek_alpha> : "ἆ" U1f06 +<dead_tilde> <dead_horn> <Greek_alpha> : "ἆ" U1f06 +<Multi_key> <less> <asciitilde> <Greek_alpha> : "ἇ" U1f07 +<Multi_key> <asciitilde> <less> <Greek_alpha> : "ἇ" U1f07 +<dead_ogonek> <dead_tilde> <Greek_alpha> : "ἇ" U1f07 +<dead_tilde> <dead_ogonek> <Greek_alpha> : "ἇ" U1f07 +<Multi_key> <greater> <Greek_ALPHA> : "Ἀ" U1f08 +<dead_horn> <Greek_ALPHA> : "Ἀ" U1f08 +<Multi_key> <less> <Greek_ALPHA> : "Ἁ" U1f09 +<dead_ogonek> <Greek_ALPHA> : "Ἁ" U1f09 +<Multi_key> <greater> <grave> <Greek_ALPHA> : "Ἂ" U1f0a +<Multi_key> <grave> <greater> <Greek_ALPHA> : "Ἂ" U1f0a +<dead_horn> <dead_grave> <Greek_ALPHA> : "Ἂ" U1f0a +<dead_grave> <dead_horn> <Greek_ALPHA> : "Ἂ" U1f0a +<Multi_key> <less> <grave> <Greek_ALPHA> : "Ἃ" U1f0b +<Multi_key> <grave> <less> <Greek_ALPHA> : "Ἃ" U1f0b +<dead_ogonek> <dead_grave> <Greek_ALPHA> : "Ἃ" U1f0b +<dead_grave> <dead_ogonek> <Greek_ALPHA> : "Ἃ" U1f0b +<Multi_key> <greater> <apostrophe> <Greek_ALPHA> : "Ἄ" U1f0c +<Multi_key> <apostrophe> <greater> <Greek_ALPHA> : "Ἄ" U1f0c +<dead_horn> <dead_acute> <Greek_ALPHA> : "Ἄ" U1f0c +<dead_acute> <dead_horn> <Greek_ALPHA> : "Ἄ" U1f0c +<Multi_key> <less> <apostrophe> <Greek_ALPHA> : "á¼" U1f0d +<Multi_key> <apostrophe> <less> <Greek_ALPHA> : "á¼" U1f0d +<dead_ogonek> <dead_acute> <Greek_ALPHA> : "á¼" U1f0d +<dead_acute> <dead_ogonek> <Greek_ALPHA> : "á¼" U1f0d +<Multi_key> <greater> <asciitilde> <Greek_ALPHA> : "Ἆ" U1f0e +<Multi_key> <asciitilde> <greater> <Greek_ALPHA> : "Ἆ" U1f0e +<dead_horn> <dead_tilde> <Greek_ALPHA> : "Ἆ" U1f0e +<dead_tilde> <dead_horn> <Greek_ALPHA> : "Ἆ" U1f0e +<Multi_key> <less> <asciitilde> <Greek_ALPHA> : "á¼" U1f0f +<Multi_key> <asciitilde> <less> <Greek_ALPHA> : "á¼" U1f0f +<dead_ogonek> <dead_tilde> <Greek_ALPHA> : "á¼" U1f0f +<dead_tilde> <dead_ogonek> <Greek_ALPHA> : "á¼" U1f0f +<Multi_key> <greater> <Greek_epsilon> : "á¼" U1f10 +<dead_horn> <Greek_epsilon> : "á¼" U1f10 +<Multi_key> <less> <Greek_epsilon> : "ἑ" U1f11 +<dead_ogonek> <Greek_epsilon> : "ἑ" U1f11 +<Multi_key> <greater> <grave> <Greek_epsilon> : "á¼’" U1f12 +<Multi_key> <grave> <greater> <Greek_epsilon> : "á¼’" U1f12 +<dead_horn> <dead_grave> <Greek_epsilon> : "á¼’" U1f12 +<dead_grave> <dead_horn> <Greek_epsilon> : "á¼’" U1f12 +<Multi_key> <less> <grave> <Greek_epsilon> : "ἓ" U1f13 +<Multi_key> <grave> <less> <Greek_epsilon> : "ἓ" U1f13 +<dead_ogonek> <dead_grave> <Greek_epsilon> : "ἓ" U1f13 +<dead_grave> <dead_ogonek> <Greek_epsilon> : "ἓ" U1f13 +<Multi_key> <greater> <apostrophe> <Greek_epsilon> : "á¼”" U1f14 +<Multi_key> <apostrophe> <greater> <Greek_epsilon> : "á¼”" U1f14 +<dead_horn> <dead_acute> <Greek_epsilon> : "á¼”" U1f14 +<dead_acute> <dead_horn> <Greek_epsilon> : "á¼”" U1f14 +<Multi_key> <less> <apostrophe> <Greek_epsilon> : "ἕ" U1f15 +<Multi_key> <apostrophe> <less> <Greek_epsilon> : "ἕ" U1f15 +<dead_ogonek> <dead_acute> <Greek_epsilon> : "ἕ" U1f15 +<dead_acute> <dead_ogonek> <Greek_epsilon> : "ἕ" U1f15 +<Multi_key> <greater> <Greek_EPSILON> : "Ἐ" U1f18 +<dead_horn> <Greek_EPSILON> : "Ἐ" U1f18 +<Multi_key> <less> <Greek_EPSILON> : "á¼™" U1f19 +<dead_ogonek> <Greek_EPSILON> : "á¼™" U1f19 +<Multi_key> <greater> <grave> <Greek_EPSILON> : "Ἒ" U1f1a +<Multi_key> <grave> <greater> <Greek_EPSILON> : "Ἒ" U1f1a +<dead_horn> <dead_grave> <Greek_EPSILON> : "Ἒ" U1f1a +<dead_grave> <dead_horn> <Greek_EPSILON> : "Ἒ" U1f1a +<Multi_key> <less> <grave> <Greek_EPSILON> : "á¼›" U1f1b +<Multi_key> <grave> <less> <Greek_EPSILON> : "á¼›" U1f1b +<dead_ogonek> <dead_grave> <Greek_EPSILON> : "á¼›" U1f1b +<dead_grave> <dead_ogonek> <Greek_EPSILON> : "á¼›" U1f1b +<Multi_key> <greater> <apostrophe> <Greek_EPSILON> : "Ἔ" U1f1c +<Multi_key> <apostrophe> <greater> <Greek_EPSILON> : "Ἔ" U1f1c +<dead_horn> <dead_acute> <Greek_EPSILON> : "Ἔ" U1f1c +<dead_acute> <dead_horn> <Greek_EPSILON> : "Ἔ" U1f1c +<Multi_key> <less> <apostrophe> <Greek_EPSILON> : "á¼" U1f1d +<Multi_key> <apostrophe> <less> <Greek_EPSILON> : "á¼" U1f1d +<dead_ogonek> <dead_acute> <Greek_EPSILON> : "á¼" U1f1d +<dead_acute> <dead_ogonek> <Greek_EPSILON> : "á¼" U1f1d +<Multi_key> <greater> <Greek_eta> : "á¼ " U1f20 +<dead_horn> <Greek_eta> : "á¼ " U1f20 +<Multi_key> <less> <Greek_eta> : "ἡ" U1f21 +<dead_ogonek> <Greek_eta> : "ἡ" U1f21 +<Multi_key> <greater> <grave> <Greek_eta> : "á¼¢" U1f22 +<Multi_key> <grave> <greater> <Greek_eta> : "á¼¢" U1f22 +<dead_horn> <dead_grave> <Greek_eta> : "á¼¢" U1f22 +<dead_grave> <dead_horn> <Greek_eta> : "á¼¢" U1f22 +<Multi_key> <less> <grave> <Greek_eta> : "á¼£" U1f23 +<Multi_key> <grave> <less> <Greek_eta> : "á¼£" U1f23 +<dead_ogonek> <dead_grave> <Greek_eta> : "á¼£" U1f23 +<dead_grave> <dead_ogonek> <Greek_eta> : "á¼£" U1f23 +<Multi_key> <greater> <apostrophe> <Greek_eta> : "ἤ" U1f24 +<Multi_key> <apostrophe> <greater> <Greek_eta> : "ἤ" U1f24 +<dead_horn> <dead_acute> <Greek_eta> : "ἤ" U1f24 +<dead_acute> <dead_horn> <Greek_eta> : "ἤ" U1f24 +<Multi_key> <less> <apostrophe> <Greek_eta> : "á¼¥" U1f25 +<Multi_key> <apostrophe> <less> <Greek_eta> : "á¼¥" U1f25 +<dead_ogonek> <dead_acute> <Greek_eta> : "á¼¥" U1f25 +<dead_acute> <dead_ogonek> <Greek_eta> : "á¼¥" U1f25 +<Multi_key> <greater> <asciitilde> <Greek_eta> : "ἦ" U1f26 +<Multi_key> <asciitilde> <greater> <Greek_eta> : "ἦ" U1f26 +<dead_horn> <dead_tilde> <Greek_eta> : "ἦ" U1f26 +<dead_tilde> <dead_horn> <Greek_eta> : "ἦ" U1f26 +<Multi_key> <less> <asciitilde> <Greek_eta> : "ἧ" U1f27 +<Multi_key> <asciitilde> <less> <Greek_eta> : "ἧ" U1f27 +<dead_ogonek> <dead_tilde> <Greek_eta> : "ἧ" U1f27 +<dead_tilde> <dead_ogonek> <Greek_eta> : "ἧ" U1f27 +<Multi_key> <greater> <Greek_ETA> : "Ἠ" U1f28 +<dead_horn> <Greek_ETA> : "Ἠ" U1f28 +<Multi_key> <less> <Greek_ETA> : "Ἡ" U1f29 +<dead_ogonek> <Greek_ETA> : "Ἡ" U1f29 +<Multi_key> <greater> <grave> <Greek_ETA> : "Ἢ" U1f2a +<Multi_key> <grave> <greater> <Greek_ETA> : "Ἢ" U1f2a +<dead_horn> <dead_grave> <Greek_ETA> : "Ἢ" U1f2a +<dead_grave> <dead_horn> <Greek_ETA> : "Ἢ" U1f2a +<Multi_key> <less> <grave> <Greek_ETA> : "Ἣ" U1f2b +<Multi_key> <grave> <less> <Greek_ETA> : "Ἣ" U1f2b +<dead_ogonek> <dead_grave> <Greek_ETA> : "Ἣ" U1f2b +<dead_grave> <dead_ogonek> <Greek_ETA> : "Ἣ" U1f2b +<Multi_key> <greater> <apostrophe> <Greek_ETA> : "Ἤ" U1f2c +<Multi_key> <apostrophe> <greater> <Greek_ETA> : "Ἤ" U1f2c +<dead_horn> <dead_acute> <Greek_ETA> : "Ἤ" U1f2c +<dead_acute> <dead_horn> <Greek_ETA> : "Ἤ" U1f2c +<Multi_key> <less> <apostrophe> <Greek_ETA> : "á¼­" U1f2d +<Multi_key> <apostrophe> <less> <Greek_ETA> : "á¼­" U1f2d +<dead_ogonek> <dead_acute> <Greek_ETA> : "á¼­" U1f2d +<dead_acute> <dead_ogonek> <Greek_ETA> : "á¼­" U1f2d +<Multi_key> <greater> <asciitilde> <Greek_ETA> : "á¼®" U1f2e +<Multi_key> <asciitilde> <greater> <Greek_ETA> : "á¼®" U1f2e +<dead_horn> <dead_tilde> <Greek_ETA> : "á¼®" U1f2e +<dead_tilde> <dead_horn> <Greek_ETA> : "á¼®" U1f2e +<Multi_key> <less> <asciitilde> <Greek_ETA> : "Ἧ" U1f2f +<Multi_key> <asciitilde> <less> <Greek_ETA> : "Ἧ" U1f2f +<dead_ogonek> <dead_tilde> <Greek_ETA> : "Ἧ" U1f2f +<dead_tilde> <dead_ogonek> <Greek_ETA> : "Ἧ" U1f2f +<Multi_key> <greater> <Greek_iota> : "á¼°" U1f30 +<dead_horn> <Greek_iota> : "á¼°" U1f30 +<Multi_key> <less> <Greek_iota> : "á¼±" U1f31 +<dead_ogonek> <Greek_iota> : "á¼±" U1f31 +<Multi_key> <greater> <grave> <Greek_iota> : "á¼²" U1f32 +<Multi_key> <grave> <greater> <Greek_iota> : "á¼²" U1f32 +<dead_horn> <dead_grave> <Greek_iota> : "á¼²" U1f32 +<dead_grave> <dead_horn> <Greek_iota> : "á¼²" U1f32 +<Multi_key> <less> <grave> <Greek_iota> : "á¼³" U1f33 +<Multi_key> <grave> <less> <Greek_iota> : "á¼³" U1f33 +<dead_ogonek> <dead_grave> <Greek_iota> : "á¼³" U1f33 +<dead_grave> <dead_ogonek> <Greek_iota> : "á¼³" U1f33 +<Multi_key> <greater> <apostrophe> <Greek_iota> : "á¼´" U1f34 +<Multi_key> <apostrophe> <greater> <Greek_iota> : "á¼´" U1f34 +<dead_horn> <dead_acute> <Greek_iota> : "á¼´" U1f34 +<dead_acute> <dead_horn> <Greek_iota> : "á¼´" U1f34 +<Multi_key> <less> <apostrophe> <Greek_iota> : "á¼µ" U1f35 +<Multi_key> <apostrophe> <less> <Greek_iota> : "á¼µ" U1f35 +<dead_ogonek> <dead_acute> <Greek_iota> : "á¼µ" U1f35 +<dead_acute> <dead_ogonek> <Greek_iota> : "á¼µ" U1f35 +<Multi_key> <greater> <asciitilde> <Greek_iota> : "ἶ" U1f36 +<Multi_key> <asciitilde> <greater> <Greek_iota> : "ἶ" U1f36 +<dead_horn> <dead_tilde> <Greek_iota> : "ἶ" U1f36 +<dead_tilde> <dead_horn> <Greek_iota> : "ἶ" U1f36 +<Multi_key> <less> <asciitilde> <Greek_iota> : "á¼·" U1f37 +<Multi_key> <asciitilde> <less> <Greek_iota> : "á¼·" U1f37 +<dead_ogonek> <dead_tilde> <Greek_iota> : "á¼·" U1f37 +<dead_tilde> <dead_ogonek> <Greek_iota> : "á¼·" U1f37 +<Multi_key> <greater> <Greek_IOTA> : "Ἰ" U1f38 +<dead_horn> <Greek_IOTA> : "Ἰ" U1f38 +<Multi_key> <less> <Greek_IOTA> : "á¼¹" U1f39 +<dead_ogonek> <Greek_IOTA> : "á¼¹" U1f39 +<Multi_key> <greater> <grave> <Greek_IOTA> : "Ἲ" U1f3a +<Multi_key> <grave> <greater> <Greek_IOTA> : "Ἲ" U1f3a +<dead_horn> <dead_grave> <Greek_IOTA> : "Ἲ" U1f3a +<dead_grave> <dead_horn> <Greek_IOTA> : "Ἲ" U1f3a +<Multi_key> <less> <grave> <Greek_IOTA> : "á¼»" U1f3b +<Multi_key> <grave> <less> <Greek_IOTA> : "á¼»" U1f3b +<dead_ogonek> <dead_grave> <Greek_IOTA> : "á¼»" U1f3b +<dead_grave> <dead_ogonek> <Greek_IOTA> : "á¼»" U1f3b +<Multi_key> <greater> <apostrophe> <Greek_IOTA> : "á¼¼" U1f3c +<Multi_key> <apostrophe> <greater> <Greek_IOTA> : "á¼¼" U1f3c +<dead_horn> <dead_acute> <Greek_IOTA> : "á¼¼" U1f3c +<dead_acute> <dead_horn> <Greek_IOTA> : "á¼¼" U1f3c +<Multi_key> <less> <apostrophe> <Greek_IOTA> : "á¼½" U1f3d +<Multi_key> <apostrophe> <less> <Greek_IOTA> : "á¼½" U1f3d +<dead_ogonek> <dead_acute> <Greek_IOTA> : "á¼½" U1f3d +<dead_acute> <dead_ogonek> <Greek_IOTA> : "á¼½" U1f3d +<Multi_key> <greater> <asciitilde> <Greek_IOTA> : "á¼¾" U1f3e +<Multi_key> <asciitilde> <greater> <Greek_IOTA> : "á¼¾" U1f3e +<dead_horn> <dead_tilde> <Greek_IOTA> : "á¼¾" U1f3e +<dead_tilde> <dead_horn> <Greek_IOTA> : "á¼¾" U1f3e +<Multi_key> <less> <asciitilde> <Greek_IOTA> : "Ἷ" U1f3f +<Multi_key> <asciitilde> <less> <Greek_IOTA> : "Ἷ" U1f3f +<dead_ogonek> <dead_tilde> <Greek_IOTA> : "Ἷ" U1f3f +<dead_tilde> <dead_ogonek> <Greek_IOTA> : "Ἷ" U1f3f +<Multi_key> <greater> <Greek_omicron> : "á½€" U1f40 +<dead_horn> <Greek_omicron> : "á½€" U1f40 +<Multi_key> <less> <Greek_omicron> : "á½" U1f41 +<dead_ogonek> <Greek_omicron> : "á½" U1f41 +<Multi_key> <greater> <grave> <Greek_omicron> : "ὂ" U1f42 +<Multi_key> <grave> <greater> <Greek_omicron> : "ὂ" U1f42 +<dead_horn> <dead_grave> <Greek_omicron> : "ὂ" U1f42 +<dead_grave> <dead_horn> <Greek_omicron> : "ὂ" U1f42 +<Multi_key> <less> <grave> <Greek_omicron> : "ὃ" U1f43 +<Multi_key> <grave> <less> <Greek_omicron> : "ὃ" U1f43 +<dead_ogonek> <dead_grave> <Greek_omicron> : "ὃ" U1f43 +<dead_grave> <dead_ogonek> <Greek_omicron> : "ὃ" U1f43 +<Multi_key> <greater> <apostrophe> <Greek_omicron> : "ὄ" U1f44 +<Multi_key> <apostrophe> <greater> <Greek_omicron> : "ὄ" U1f44 +<dead_horn> <dead_acute> <Greek_omicron> : "ὄ" U1f44 +<dead_acute> <dead_horn> <Greek_omicron> : "ὄ" U1f44 +<Multi_key> <less> <apostrophe> <Greek_omicron> : "á½…" U1f45 +<Multi_key> <apostrophe> <less> <Greek_omicron> : "á½…" U1f45 +<dead_ogonek> <dead_acute> <Greek_omicron> : "á½…" U1f45 +<dead_acute> <dead_ogonek> <Greek_omicron> : "á½…" U1f45 +<Multi_key> <greater> <Greek_OMICRON> : "Ὀ" U1f48 +<dead_horn> <Greek_OMICRON> : "Ὀ" U1f48 +<Multi_key> <less> <Greek_OMICRON> : "Ὁ" U1f49 +<dead_ogonek> <Greek_OMICRON> : "Ὁ" U1f49 +<Multi_key> <greater> <grave> <Greek_OMICRON> : "Ὂ" U1f4a +<Multi_key> <grave> <greater> <Greek_OMICRON> : "Ὂ" U1f4a +<dead_horn> <dead_grave> <Greek_OMICRON> : "Ὂ" U1f4a +<dead_grave> <dead_horn> <Greek_OMICRON> : "Ὂ" U1f4a +<Multi_key> <less> <grave> <Greek_OMICRON> : "Ὃ" U1f4b +<Multi_key> <grave> <less> <Greek_OMICRON> : "Ὃ" U1f4b +<dead_ogonek> <dead_grave> <Greek_OMICRON> : "Ὃ" U1f4b +<dead_grave> <dead_ogonek> <Greek_OMICRON> : "Ὃ" U1f4b +<Multi_key> <greater> <apostrophe> <Greek_OMICRON> : "Ὄ" U1f4c +<Multi_key> <apostrophe> <greater> <Greek_OMICRON> : "Ὄ" U1f4c +<dead_horn> <dead_acute> <Greek_OMICRON> : "Ὄ" U1f4c +<dead_acute> <dead_horn> <Greek_OMICRON> : "Ὄ" U1f4c +<Multi_key> <less> <apostrophe> <Greek_OMICRON> : "á½" U1f4d +<Multi_key> <apostrophe> <less> <Greek_OMICRON> : "á½" U1f4d +<dead_ogonek> <dead_acute> <Greek_OMICRON> : "á½" U1f4d +<dead_acute> <dead_ogonek> <Greek_OMICRON> : "á½" U1f4d +<Multi_key> <greater> <Greek_upsilon> : "á½" U1f50 +<dead_horn> <Greek_upsilon> : "á½" U1f50 +<Multi_key> <less> <Greek_upsilon> : "ὑ" U1f51 +<dead_ogonek> <Greek_upsilon> : "ὑ" U1f51 +<Multi_key> <greater> <grave> <Greek_upsilon> : "á½’" U1f52 +<Multi_key> <grave> <greater> <Greek_upsilon> : "á½’" U1f52 +<dead_horn> <dead_grave> <Greek_upsilon> : "á½’" U1f52 +<dead_grave> <dead_horn> <Greek_upsilon> : "á½’" U1f52 +<Multi_key> <less> <grave> <Greek_upsilon> : "ὓ" U1f53 +<Multi_key> <grave> <less> <Greek_upsilon> : "ὓ" U1f53 +<dead_ogonek> <dead_grave> <Greek_upsilon> : "ὓ" U1f53 +<dead_grave> <dead_ogonek> <Greek_upsilon> : "ὓ" U1f53 +<Multi_key> <greater> <apostrophe> <Greek_upsilon> : "á½”" U1f54 +<Multi_key> <apostrophe> <greater> <Greek_upsilon> : "á½”" U1f54 +<dead_horn> <dead_acute> <Greek_upsilon> : "á½”" U1f54 +<dead_acute> <dead_horn> <Greek_upsilon> : "á½”" U1f54 +<Multi_key> <less> <apostrophe> <Greek_upsilon> : "ὕ" U1f55 +<Multi_key> <apostrophe> <less> <Greek_upsilon> : "ὕ" U1f55 +<dead_ogonek> <dead_acute> <Greek_upsilon> : "ὕ" U1f55 +<dead_acute> <dead_ogonek> <Greek_upsilon> : "ὕ" U1f55 +<Multi_key> <greater> <asciitilde> <Greek_upsilon> : "á½–" U1f56 +<Multi_key> <asciitilde> <greater> <Greek_upsilon> : "á½–" U1f56 +<dead_horn> <dead_tilde> <Greek_upsilon> : "á½–" U1f56 +<dead_tilde> <dead_horn> <Greek_upsilon> : "á½–" U1f56 +<Multi_key> <less> <asciitilde> <Greek_upsilon> : "á½—" U1f57 +<Multi_key> <asciitilde> <less> <Greek_upsilon> : "á½—" U1f57 +<dead_ogonek> <dead_tilde> <Greek_upsilon> : "á½—" U1f57 +<dead_tilde> <dead_ogonek> <Greek_upsilon> : "á½—" U1f57 +<Multi_key> <less> <Greek_UPSILON> : "á½™" U1f59 +<dead_ogonek> <Greek_UPSILON> : "á½™" U1f59 +<Multi_key> <less> <grave> <Greek_UPSILON> : "á½›" U1f5b +<Multi_key> <grave> <less> <Greek_UPSILON> : "á½›" U1f5b +<dead_ogonek> <dead_grave> <Greek_UPSILON> : "á½›" U1f5b +<dead_grave> <dead_ogonek> <Greek_UPSILON> : "á½›" U1f5b +<Multi_key> <less> <apostrophe> <Greek_UPSILON> : "á½" U1f5d +<Multi_key> <apostrophe> <less> <Greek_UPSILON> : "á½" U1f5d +<dead_ogonek> <dead_acute> <Greek_UPSILON> : "á½" U1f5d +<dead_acute> <dead_ogonek> <Greek_UPSILON> : "á½" U1f5d +<Multi_key> <less> <asciitilde> <Greek_UPSILON> : "Ὗ" U1f5f +<Multi_key> <asciitilde> <less> <Greek_UPSILON> : "Ὗ" U1f5f +<dead_ogonek> <dead_tilde> <Greek_UPSILON> : "Ὗ" U1f5f +<dead_tilde> <dead_ogonek> <Greek_UPSILON> : "Ὗ" U1f5f +<Multi_key> <greater> <Greek_omega> : "á½ " U1f60 +<dead_horn> <Greek_omega> : "á½ " U1f60 +<Multi_key> <less> <Greek_omega> : "ὡ" U1f61 +<dead_ogonek> <Greek_omega> : "ὡ" U1f61 +<Multi_key> <greater> <grave> <Greek_omega> : "á½¢" U1f62 +<Multi_key> <grave> <greater> <Greek_omega> : "á½¢" U1f62 +<dead_horn> <dead_grave> <Greek_omega> : "á½¢" U1f62 +<dead_grave> <dead_horn> <Greek_omega> : "á½¢" U1f62 +<Multi_key> <less> <grave> <Greek_omega> : "á½£" U1f63 +<Multi_key> <grave> <less> <Greek_omega> : "á½£" U1f63 +<dead_ogonek> <dead_grave> <Greek_omega> : "á½£" U1f63 +<dead_grave> <dead_ogonek> <Greek_omega> : "á½£" U1f63 +<Multi_key> <greater> <apostrophe> <Greek_omega> : "ὤ" U1f64 +<Multi_key> <apostrophe> <greater> <Greek_omega> : "ὤ" U1f64 +<dead_horn> <dead_acute> <Greek_omega> : "ὤ" U1f64 +<dead_acute> <dead_horn> <Greek_omega> : "ὤ" U1f64 +<Multi_key> <less> <apostrophe> <Greek_omega> : "á½¥" U1f65 +<Multi_key> <apostrophe> <less> <Greek_omega> : "á½¥" U1f65 +<dead_ogonek> <dead_acute> <Greek_omega> : "á½¥" U1f65 +<dead_acute> <dead_ogonek> <Greek_omega> : "á½¥" U1f65 +<Multi_key> <greater> <asciitilde> <Greek_omega> : "ὦ" U1f66 +<Multi_key> <asciitilde> <greater> <Greek_omega> : "ὦ" U1f66 +<dead_horn> <dead_tilde> <Greek_omega> : "ὦ" U1f66 +<dead_tilde> <dead_horn> <Greek_omega> : "ὦ" U1f66 +<Multi_key> <less> <asciitilde> <Greek_omega> : "ὧ" U1f67 +<Multi_key> <asciitilde> <less> <Greek_omega> : "ὧ" U1f67 +<dead_ogonek> <dead_tilde> <Greek_omega> : "ὧ" U1f67 +<dead_tilde> <dead_ogonek> <Greek_omega> : "ὧ" U1f67 +<Multi_key> <greater> <Greek_OMEGA> : "Ὠ" U1f68 +<dead_horn> <Greek_OMEGA> : "Ὠ" U1f68 +<Multi_key> <less> <Greek_OMEGA> : "Ὡ" U1f69 +<dead_ogonek> <Greek_OMEGA> : "Ὡ" U1f69 +<Multi_key> <greater> <grave> <Greek_OMEGA> : "Ὢ" U1f6a +<Multi_key> <grave> <greater> <Greek_OMEGA> : "Ὢ" U1f6a +<dead_horn> <dead_grave> <Greek_OMEGA> : "Ὢ" U1f6a +<dead_grave> <dead_horn> <Greek_OMEGA> : "Ὢ" U1f6a +<Multi_key> <less> <grave> <Greek_OMEGA> : "Ὣ" U1f6b +<Multi_key> <grave> <less> <Greek_OMEGA> : "Ὣ" U1f6b +<dead_ogonek> <dead_grave> <Greek_OMEGA> : "Ὣ" U1f6b +<dead_grave> <dead_ogonek> <Greek_OMEGA> : "Ὣ" U1f6b +<Multi_key> <greater> <apostrophe> <Greek_OMEGA> : "Ὤ" U1f6c +<Multi_key> <apostrophe> <greater> <Greek_OMEGA> : "Ὤ" U1f6c +<dead_horn> <dead_acute> <Greek_OMEGA> : "Ὤ" U1f6c +<dead_acute> <dead_horn> <Greek_OMEGA> : "Ὤ" U1f6c +<Multi_key> <less> <apostrophe> <Greek_OMEGA> : "á½­" U1f6d +<Multi_key> <apostrophe> <less> <Greek_OMEGA> : "á½­" U1f6d +<dead_ogonek> <dead_acute> <Greek_OMEGA> : "á½­" U1f6d +<dead_acute> <dead_ogonek> <Greek_OMEGA> : "á½­" U1f6d +<Multi_key> <greater> <asciitilde> <Greek_OMEGA> : "á½®" U1f6e +<Multi_key> <asciitilde> <greater> <Greek_OMEGA> : "á½®" U1f6e +<dead_horn> <dead_tilde> <Greek_OMEGA> : "á½®" U1f6e +<dead_tilde> <dead_horn> <Greek_OMEGA> : "á½®" U1f6e +<Multi_key> <less> <asciitilde> <Greek_OMEGA> : "Ὧ" U1f6f +<Multi_key> <asciitilde> <less> <Greek_OMEGA> : "Ὧ" U1f6f +<dead_ogonek> <dead_tilde> <Greek_OMEGA> : "Ὧ" U1f6f +<dead_tilde> <dead_ogonek> <Greek_OMEGA> : "Ὧ" U1f6f +<Multi_key> <grave> <Greek_alpha> : "á½°" U1f70 +<dead_grave> <Greek_alpha> : "á½°" U1f70 +<Multi_key> <apostrophe> <Greek_alpha> : "á½±" U1f71 +<dead_acute> <Greek_alpha> : "á½±" U1f71 +<Multi_key> <grave> <Greek_epsilon> : "á½²" U1f72 +<dead_grave> <Greek_epsilon> : "á½²" U1f72 +<Multi_key> <apostrophe> <Greek_epsilon> : "á½³" U1f73 +<dead_acute> <Greek_epsilon> : "á½³" U1f73 +<Multi_key> <grave> <Greek_eta> : "á½´" U1f74 +<dead_grave> <Greek_eta> : "á½´" U1f74 +<Multi_key> <apostrophe> <Greek_eta> : "á½µ" U1f75 +<dead_acute> <Greek_eta> : "á½µ" U1f75 +<Multi_key> <grave> <Greek_iota> : "ὶ" U1f76 +<dead_grave> <Greek_iota> : "ὶ" U1f76 +<Multi_key> <apostrophe> <Greek_iota> : "á½·" U1f77 +<dead_acute> <Greek_iota> : "á½·" U1f77 +<Multi_key> <grave> <Greek_omicron> : "ὸ" U1f78 +<dead_grave> <Greek_omicron> : "ὸ" U1f78 +<Multi_key> <apostrophe> <Greek_omicron> : "á½¹" U1f79 +<dead_acute> <Greek_omicron> : "á½¹" U1f79 +<Multi_key> <grave> <Greek_upsilon> : "ὺ" U1f7a +<dead_grave> <Greek_upsilon> : "ὺ" U1f7a +<Multi_key> <apostrophe> <Greek_upsilon> : "á½»" U1f7b +<dead_acute> <Greek_upsilon> : "á½»" U1f7b +<Multi_key> <grave> <Greek_omega> : "á½¼" U1f7c +<dead_grave> <Greek_omega> : "á½¼" U1f7c +<Multi_key> <apostrophe> <Greek_omega> : "á½½" U1f7d +<dead_acute> <Greek_omega> : "á½½" U1f7d +<Multi_key> <bar> <greater> <Greek_alpha> : "á¾€" U1f80 +<Multi_key> <greater> <bar> <Greek_alpha> : "á¾€" U1f80 +<dead_iota> <dead_horn> <Greek_alpha> : "á¾€" U1f80 +<dead_horn> <dead_iota> <Greek_alpha> : "á¾€" U1f80 +<Multi_key> <bar> <less> <Greek_alpha> : "á¾" U1f81 +<Multi_key> <less> <bar> <Greek_alpha> : "á¾" U1f81 +<dead_iota> <dead_ogonek> <Greek_alpha> : "á¾" U1f81 +<dead_ogonek> <dead_iota> <Greek_alpha> : "á¾" U1f81 +<Multi_key> <bar> <greater> <grave> <Greek_alpha> : "ᾂ" U1f82 +<Multi_key> <bar> <grave> <greater> <Greek_alpha> : "ᾂ" U1f82 +<Multi_key> <greater> <bar> <grave> <Greek_alpha> : "ᾂ" U1f82 +<Multi_key> <greater> <grave> <bar> <Greek_alpha> : "ᾂ" U1f82 +<Multi_key> <grave> <bar> <greater> <Greek_alpha> : "ᾂ" U1f82 +<Multi_key> <grave> <greater> <bar> <Greek_alpha> : "ᾂ" U1f82 +<dead_iota> <dead_horn> <dead_grave> <Greek_alpha> : "ᾂ" U1f82 +<dead_iota> <dead_grave> <dead_horn> <Greek_alpha> : "ᾂ" U1f82 +<dead_horn> <dead_iota> <dead_grave> <Greek_alpha> : "ᾂ" U1f82 +<dead_horn> <dead_grave> <dead_iota> <Greek_alpha> : "ᾂ" U1f82 +<dead_grave> <dead_iota> <dead_horn> <Greek_alpha> : "ᾂ" U1f82 +<dead_grave> <dead_horn> <dead_iota> <Greek_alpha> : "ᾂ" U1f82 +<Multi_key> <bar> <less> <grave> <Greek_alpha> : "ᾃ" U1f83 +<Multi_key> <bar> <grave> <less> <Greek_alpha> : "ᾃ" U1f83 +<Multi_key> <less> <bar> <grave> <Greek_alpha> : "ᾃ" U1f83 +<Multi_key> <less> <grave> <bar> <Greek_alpha> : "ᾃ" U1f83 +<Multi_key> <grave> <bar> <less> <Greek_alpha> : "ᾃ" U1f83 +<Multi_key> <grave> <less> <bar> <Greek_alpha> : "ᾃ" U1f83 +<dead_iota> <dead_ogonek> <dead_grave> <Greek_alpha> : "ᾃ" U1f83 +<dead_iota> <dead_grave> <dead_ogonek> <Greek_alpha> : "ᾃ" U1f83 +<dead_ogonek> <dead_iota> <dead_grave> <Greek_alpha> : "ᾃ" U1f83 +<dead_ogonek> <dead_grave> <dead_iota> <Greek_alpha> : "ᾃ" U1f83 +<dead_grave> <dead_iota> <dead_ogonek> <Greek_alpha> : "ᾃ" U1f83 +<dead_grave> <dead_ogonek> <dead_iota> <Greek_alpha> : "ᾃ" U1f83 +<Multi_key> <bar> <greater> <apostrophe> <Greek_alpha> : "ᾄ" U1f84 +<Multi_key> <bar> <apostrophe> <greater> <Greek_alpha> : "ᾄ" U1f84 +<Multi_key> <greater> <bar> <apostrophe> <Greek_alpha> : "ᾄ" U1f84 +<Multi_key> <greater> <apostrophe> <bar> <Greek_alpha> : "ᾄ" U1f84 +<Multi_key> <apostrophe> <bar> <greater> <Greek_alpha> : "ᾄ" U1f84 +<Multi_key> <apostrophe> <greater> <bar> <Greek_alpha> : "ᾄ" U1f84 +<dead_iota> <dead_horn> <dead_acute> <Greek_alpha> : "ᾄ" U1f84 +<dead_iota> <dead_acute> <dead_horn> <Greek_alpha> : "ᾄ" U1f84 +<dead_horn> <dead_iota> <dead_acute> <Greek_alpha> : "ᾄ" U1f84 +<dead_horn> <dead_acute> <dead_iota> <Greek_alpha> : "ᾄ" U1f84 +<dead_acute> <dead_iota> <dead_horn> <Greek_alpha> : "ᾄ" U1f84 +<dead_acute> <dead_horn> <dead_iota> <Greek_alpha> : "ᾄ" U1f84 +<Multi_key> <bar> <less> <apostrophe> <Greek_alpha> : "á¾…" U1f85 +<Multi_key> <bar> <apostrophe> <less> <Greek_alpha> : "á¾…" U1f85 +<Multi_key> <less> <bar> <apostrophe> <Greek_alpha> : "á¾…" U1f85 +<Multi_key> <less> <apostrophe> <bar> <Greek_alpha> : "á¾…" U1f85 +<Multi_key> <apostrophe> <bar> <less> <Greek_alpha> : "á¾…" U1f85 +<Multi_key> <apostrophe> <less> <bar> <Greek_alpha> : "á¾…" U1f85 +<dead_iota> <dead_ogonek> <dead_acute> <Greek_alpha> : "á¾…" U1f85 +<dead_iota> <dead_acute> <dead_ogonek> <Greek_alpha> : "á¾…" U1f85 +<dead_ogonek> <dead_iota> <dead_acute> <Greek_alpha> : "á¾…" U1f85 +<dead_ogonek> <dead_acute> <dead_iota> <Greek_alpha> : "á¾…" U1f85 +<dead_acute> <dead_iota> <dead_ogonek> <Greek_alpha> : "á¾…" U1f85 +<dead_acute> <dead_ogonek> <dead_iota> <Greek_alpha> : "á¾…" U1f85 +<Multi_key> <bar> <greater> <asciitilde> <Greek_alpha> : "ᾆ" U1f86 +<Multi_key> <bar> <asciitilde> <greater> <Greek_alpha> : "ᾆ" U1f86 +<Multi_key> <greater> <bar> <asciitilde> <Greek_alpha> : "ᾆ" U1f86 +<Multi_key> <greater> <asciitilde> <bar> <Greek_alpha> : "ᾆ" U1f86 +<Multi_key> <asciitilde> <bar> <greater> <Greek_alpha> : "ᾆ" U1f86 +<Multi_key> <asciitilde> <greater> <bar> <Greek_alpha> : "ᾆ" U1f86 +<dead_iota> <dead_horn> <dead_tilde> <Greek_alpha> : "ᾆ" U1f86 +<dead_iota> <dead_tilde> <dead_horn> <Greek_alpha> : "ᾆ" U1f86 +<dead_horn> <dead_iota> <dead_tilde> <Greek_alpha> : "ᾆ" U1f86 +<dead_horn> <dead_tilde> <dead_iota> <Greek_alpha> : "ᾆ" U1f86 +<dead_tilde> <dead_iota> <dead_horn> <Greek_alpha> : "ᾆ" U1f86 +<dead_tilde> <dead_horn> <dead_iota> <Greek_alpha> : "ᾆ" U1f86 +<Multi_key> <bar> <less> <asciitilde> <Greek_alpha> : "ᾇ" U1f87 +<Multi_key> <bar> <asciitilde> <less> <Greek_alpha> : "ᾇ" U1f87 +<Multi_key> <less> <bar> <asciitilde> <Greek_alpha> : "ᾇ" U1f87 +<Multi_key> <less> <asciitilde> <bar> <Greek_alpha> : "ᾇ" U1f87 +<Multi_key> <asciitilde> <bar> <less> <Greek_alpha> : "ᾇ" U1f87 +<Multi_key> <asciitilde> <less> <bar> <Greek_alpha> : "ᾇ" U1f87 +<dead_iota> <dead_ogonek> <dead_tilde> <Greek_alpha> : "ᾇ" U1f87 +<dead_iota> <dead_tilde> <dead_ogonek> <Greek_alpha> : "ᾇ" U1f87 +<dead_ogonek> <dead_iota> <dead_tilde> <Greek_alpha> : "ᾇ" U1f87 +<dead_ogonek> <dead_tilde> <dead_iota> <Greek_alpha> : "ᾇ" U1f87 +<dead_tilde> <dead_iota> <dead_ogonek> <Greek_alpha> : "ᾇ" U1f87 +<dead_tilde> <dead_ogonek> <dead_iota> <Greek_alpha> : "ᾇ" U1f87 +<Multi_key> <bar> <greater> <Greek_ALPHA> : "ᾈ" U1f88 +<Multi_key> <greater> <bar> <Greek_ALPHA> : "ᾈ" U1f88 +<dead_iota> <dead_horn> <Greek_ALPHA> : "ᾈ" U1f88 +<dead_horn> <dead_iota> <Greek_ALPHA> : "ᾈ" U1f88 +<Multi_key> <bar> <less> <Greek_ALPHA> : "ᾉ" U1f89 +<Multi_key> <less> <bar> <Greek_ALPHA> : "ᾉ" U1f89 +<dead_iota> <dead_ogonek> <Greek_ALPHA> : "ᾉ" U1f89 +<dead_ogonek> <dead_iota> <Greek_ALPHA> : "ᾉ" U1f89 +<Multi_key> <bar> <greater> <grave> <Greek_ALPHA> : "ᾊ" U1f8a +<Multi_key> <bar> <grave> <greater> <Greek_ALPHA> : "ᾊ" U1f8a +<Multi_key> <greater> <bar> <grave> <Greek_ALPHA> : "ᾊ" U1f8a +<Multi_key> <greater> <grave> <bar> <Greek_ALPHA> : "ᾊ" U1f8a +<Multi_key> <grave> <bar> <greater> <Greek_ALPHA> : "ᾊ" U1f8a +<Multi_key> <grave> <greater> <bar> <Greek_ALPHA> : "ᾊ" U1f8a +<dead_iota> <dead_horn> <dead_grave> <Greek_ALPHA> : "ᾊ" U1f8a +<dead_iota> <dead_grave> <dead_horn> <Greek_ALPHA> : "ᾊ" U1f8a +<dead_horn> <dead_iota> <dead_grave> <Greek_ALPHA> : "ᾊ" U1f8a +<dead_horn> <dead_grave> <dead_iota> <Greek_ALPHA> : "ᾊ" U1f8a +<dead_grave> <dead_iota> <dead_horn> <Greek_ALPHA> : "ᾊ" U1f8a +<dead_grave> <dead_horn> <dead_iota> <Greek_ALPHA> : "ᾊ" U1f8a +<Multi_key> <bar> <less> <grave> <Greek_ALPHA> : "ᾋ" U1f8b +<Multi_key> <bar> <grave> <less> <Greek_ALPHA> : "ᾋ" U1f8b +<Multi_key> <less> <bar> <grave> <Greek_ALPHA> : "ᾋ" U1f8b +<Multi_key> <less> <grave> <bar> <Greek_ALPHA> : "ᾋ" U1f8b +<Multi_key> <grave> <bar> <less> <Greek_ALPHA> : "ᾋ" U1f8b +<Multi_key> <grave> <less> <bar> <Greek_ALPHA> : "ᾋ" U1f8b +<dead_iota> <dead_ogonek> <dead_grave> <Greek_ALPHA> : "ᾋ" U1f8b +<dead_iota> <dead_grave> <dead_ogonek> <Greek_ALPHA> : "ᾋ" U1f8b +<dead_ogonek> <dead_iota> <dead_grave> <Greek_ALPHA> : "ᾋ" U1f8b +<dead_ogonek> <dead_grave> <dead_iota> <Greek_ALPHA> : "ᾋ" U1f8b +<dead_grave> <dead_iota> <dead_ogonek> <Greek_ALPHA> : "ᾋ" U1f8b +<dead_grave> <dead_ogonek> <dead_iota> <Greek_ALPHA> : "ᾋ" U1f8b +<Multi_key> <bar> <greater> <apostrophe> <Greek_ALPHA> : "ᾌ" U1f8c +<Multi_key> <bar> <apostrophe> <greater> <Greek_ALPHA> : "ᾌ" U1f8c +<Multi_key> <greater> <bar> <apostrophe> <Greek_ALPHA> : "ᾌ" U1f8c +<Multi_key> <greater> <apostrophe> <bar> <Greek_ALPHA> : "ᾌ" U1f8c +<Multi_key> <apostrophe> <bar> <greater> <Greek_ALPHA> : "ᾌ" U1f8c +<Multi_key> <apostrophe> <greater> <bar> <Greek_ALPHA> : "ᾌ" U1f8c +<dead_iota> <dead_horn> <dead_acute> <Greek_ALPHA> : "ᾌ" U1f8c +<dead_iota> <dead_acute> <dead_horn> <Greek_ALPHA> : "ᾌ" U1f8c +<dead_horn> <dead_iota> <dead_acute> <Greek_ALPHA> : "ᾌ" U1f8c +<dead_horn> <dead_acute> <dead_iota> <Greek_ALPHA> : "ᾌ" U1f8c +<dead_acute> <dead_iota> <dead_horn> <Greek_ALPHA> : "ᾌ" U1f8c +<dead_acute> <dead_horn> <dead_iota> <Greek_ALPHA> : "ᾌ" U1f8c +<Multi_key> <bar> <less> <apostrophe> <Greek_ALPHA> : "á¾" U1f8d +<Multi_key> <bar> <apostrophe> <less> <Greek_ALPHA> : "á¾" U1f8d +<Multi_key> <less> <bar> <apostrophe> <Greek_ALPHA> : "á¾" U1f8d +<Multi_key> <less> <apostrophe> <bar> <Greek_ALPHA> : "á¾" U1f8d +<Multi_key> <apostrophe> <bar> <less> <Greek_ALPHA> : "á¾" U1f8d +<Multi_key> <apostrophe> <less> <bar> <Greek_ALPHA> : "á¾" U1f8d +<dead_iota> <dead_ogonek> <dead_acute> <Greek_ALPHA> : "á¾" U1f8d +<dead_iota> <dead_acute> <dead_ogonek> <Greek_ALPHA> : "á¾" U1f8d +<dead_ogonek> <dead_iota> <dead_acute> <Greek_ALPHA> : "á¾" U1f8d +<dead_ogonek> <dead_acute> <dead_iota> <Greek_ALPHA> : "á¾" U1f8d +<dead_acute> <dead_iota> <dead_ogonek> <Greek_ALPHA> : "á¾" U1f8d +<dead_acute> <dead_ogonek> <dead_iota> <Greek_ALPHA> : "á¾" U1f8d +<Multi_key> <bar> <greater> <asciitilde> <Greek_ALPHA> : "ᾎ" U1f8e +<Multi_key> <bar> <asciitilde> <greater> <Greek_ALPHA> : "ᾎ" U1f8e +<Multi_key> <greater> <bar> <asciitilde> <Greek_ALPHA> : "ᾎ" U1f8e +<Multi_key> <greater> <asciitilde> <bar> <Greek_ALPHA> : "ᾎ" U1f8e +<Multi_key> <asciitilde> <bar> <greater> <Greek_ALPHA> : "ᾎ" U1f8e +<Multi_key> <asciitilde> <greater> <bar> <Greek_ALPHA> : "ᾎ" U1f8e +<dead_iota> <dead_horn> <dead_tilde> <Greek_ALPHA> : "ᾎ" U1f8e +<dead_iota> <dead_tilde> <dead_horn> <Greek_ALPHA> : "ᾎ" U1f8e +<dead_horn> <dead_iota> <dead_tilde> <Greek_ALPHA> : "ᾎ" U1f8e +<dead_horn> <dead_tilde> <dead_iota> <Greek_ALPHA> : "ᾎ" U1f8e +<dead_tilde> <dead_iota> <dead_horn> <Greek_ALPHA> : "ᾎ" U1f8e +<dead_tilde> <dead_horn> <dead_iota> <Greek_ALPHA> : "ᾎ" U1f8e +<Multi_key> <bar> <less> <asciitilde> <Greek_ALPHA> : "á¾" U1f8f +<Multi_key> <bar> <asciitilde> <less> <Greek_ALPHA> : "á¾" U1f8f +<Multi_key> <less> <bar> <asciitilde> <Greek_ALPHA> : "á¾" U1f8f +<Multi_key> <less> <asciitilde> <bar> <Greek_ALPHA> : "á¾" U1f8f +<Multi_key> <asciitilde> <bar> <less> <Greek_ALPHA> : "á¾" U1f8f +<Multi_key> <asciitilde> <less> <bar> <Greek_ALPHA> : "á¾" U1f8f +<dead_iota> <dead_ogonek> <dead_tilde> <Greek_ALPHA> : "á¾" U1f8f +<dead_iota> <dead_tilde> <dead_ogonek> <Greek_ALPHA> : "á¾" U1f8f +<dead_ogonek> <dead_iota> <dead_tilde> <Greek_ALPHA> : "á¾" U1f8f +<dead_ogonek> <dead_tilde> <dead_iota> <Greek_ALPHA> : "á¾" U1f8f +<dead_tilde> <dead_iota> <dead_ogonek> <Greek_ALPHA> : "á¾" U1f8f +<dead_tilde> <dead_ogonek> <dead_iota> <Greek_ALPHA> : "á¾" U1f8f +<Multi_key> <bar> <greater> <Greek_eta> : "á¾" U1f90 +<Multi_key> <greater> <bar> <Greek_eta> : "á¾" U1f90 +<dead_iota> <dead_horn> <Greek_eta> : "á¾" U1f90 +<dead_horn> <dead_iota> <Greek_eta> : "á¾" U1f90 +<Multi_key> <bar> <less> <Greek_eta> : "ᾑ" U1f91 +<Multi_key> <less> <bar> <Greek_eta> : "ᾑ" U1f91 +<dead_iota> <dead_ogonek> <Greek_eta> : "ᾑ" U1f91 +<dead_ogonek> <dead_iota> <Greek_eta> : "ᾑ" U1f91 +<Multi_key> <bar> <greater> <grave> <Greek_eta> : "á¾’" U1f92 +<Multi_key> <bar> <grave> <greater> <Greek_eta> : "á¾’" U1f92 +<Multi_key> <greater> <bar> <grave> <Greek_eta> : "á¾’" U1f92 +<Multi_key> <greater> <grave> <bar> <Greek_eta> : "á¾’" U1f92 +<Multi_key> <grave> <bar> <greater> <Greek_eta> : "á¾’" U1f92 +<Multi_key> <grave> <greater> <bar> <Greek_eta> : "á¾’" U1f92 +<dead_iota> <dead_horn> <dead_grave> <Greek_eta> : "á¾’" U1f92 +<dead_iota> <dead_grave> <dead_horn> <Greek_eta> : "á¾’" U1f92 +<dead_horn> <dead_iota> <dead_grave> <Greek_eta> : "á¾’" U1f92 +<dead_horn> <dead_grave> <dead_iota> <Greek_eta> : "á¾’" U1f92 +<dead_grave> <dead_iota> <dead_horn> <Greek_eta> : "á¾’" U1f92 +<dead_grave> <dead_horn> <dead_iota> <Greek_eta> : "á¾’" U1f92 +<Multi_key> <bar> <less> <grave> <Greek_eta> : "ᾓ" U1f93 +<Multi_key> <bar> <grave> <less> <Greek_eta> : "ᾓ" U1f93 +<Multi_key> <less> <bar> <grave> <Greek_eta> : "ᾓ" U1f93 +<Multi_key> <less> <grave> <bar> <Greek_eta> : "ᾓ" U1f93 +<Multi_key> <grave> <bar> <less> <Greek_eta> : "ᾓ" U1f93 +<Multi_key> <grave> <less> <bar> <Greek_eta> : "ᾓ" U1f93 +<dead_iota> <dead_ogonek> <dead_grave> <Greek_eta> : "ᾓ" U1f93 +<dead_iota> <dead_grave> <dead_ogonek> <Greek_eta> : "ᾓ" U1f93 +<dead_ogonek> <dead_iota> <dead_grave> <Greek_eta> : "ᾓ" U1f93 +<dead_ogonek> <dead_grave> <dead_iota> <Greek_eta> : "ᾓ" U1f93 +<dead_grave> <dead_iota> <dead_ogonek> <Greek_eta> : "ᾓ" U1f93 +<dead_grave> <dead_ogonek> <dead_iota> <Greek_eta> : "ᾓ" U1f93 +<Multi_key> <bar> <greater> <apostrophe> <Greek_eta> : "á¾”" U1f94 +<Multi_key> <bar> <apostrophe> <greater> <Greek_eta> : "á¾”" U1f94 +<Multi_key> <greater> <bar> <apostrophe> <Greek_eta> : "á¾”" U1f94 +<Multi_key> <greater> <apostrophe> <bar> <Greek_eta> : "á¾”" U1f94 +<Multi_key> <apostrophe> <bar> <greater> <Greek_eta> : "á¾”" U1f94 +<Multi_key> <apostrophe> <greater> <bar> <Greek_eta> : "á¾”" U1f94 +<dead_iota> <dead_horn> <dead_acute> <Greek_eta> : "á¾”" U1f94 +<dead_iota> <dead_acute> <dead_horn> <Greek_eta> : "á¾”" U1f94 +<dead_horn> <dead_iota> <dead_acute> <Greek_eta> : "á¾”" U1f94 +<dead_horn> <dead_acute> <dead_iota> <Greek_eta> : "á¾”" U1f94 +<dead_acute> <dead_iota> <dead_horn> <Greek_eta> : "á¾”" U1f94 +<dead_acute> <dead_horn> <dead_iota> <Greek_eta> : "á¾”" U1f94 +<Multi_key> <bar> <less> <apostrophe> <Greek_eta> : "ᾕ" U1f95 +<Multi_key> <bar> <apostrophe> <less> <Greek_eta> : "ᾕ" U1f95 +<Multi_key> <less> <bar> <apostrophe> <Greek_eta> : "ᾕ" U1f95 +<Multi_key> <less> <apostrophe> <bar> <Greek_eta> : "ᾕ" U1f95 +<Multi_key> <apostrophe> <bar> <less> <Greek_eta> : "ᾕ" U1f95 +<Multi_key> <apostrophe> <less> <bar> <Greek_eta> : "ᾕ" U1f95 +<dead_iota> <dead_ogonek> <dead_acute> <Greek_eta> : "ᾕ" U1f95 +<dead_iota> <dead_acute> <dead_ogonek> <Greek_eta> : "ᾕ" U1f95 +<dead_ogonek> <dead_iota> <dead_acute> <Greek_eta> : "ᾕ" U1f95 +<dead_ogonek> <dead_acute> <dead_iota> <Greek_eta> : "ᾕ" U1f95 +<dead_acute> <dead_iota> <dead_ogonek> <Greek_eta> : "ᾕ" U1f95 +<dead_acute> <dead_ogonek> <dead_iota> <Greek_eta> : "ᾕ" U1f95 +<Multi_key> <bar> <greater> <asciitilde> <Greek_eta> : "á¾–" U1f96 +<Multi_key> <bar> <asciitilde> <greater> <Greek_eta> : "á¾–" U1f96 +<Multi_key> <greater> <bar> <asciitilde> <Greek_eta> : "á¾–" U1f96 +<Multi_key> <greater> <asciitilde> <bar> <Greek_eta> : "á¾–" U1f96 +<Multi_key> <asciitilde> <bar> <greater> <Greek_eta> : "á¾–" U1f96 +<Multi_key> <asciitilde> <greater> <bar> <Greek_eta> : "á¾–" U1f96 +<dead_iota> <dead_horn> <dead_tilde> <Greek_eta> : "á¾–" U1f96 +<dead_iota> <dead_tilde> <dead_horn> <Greek_eta> : "á¾–" U1f96 +<dead_horn> <dead_iota> <dead_tilde> <Greek_eta> : "á¾–" U1f96 +<dead_horn> <dead_tilde> <dead_iota> <Greek_eta> : "á¾–" U1f96 +<dead_tilde> <dead_iota> <dead_horn> <Greek_eta> : "á¾–" U1f96 +<dead_tilde> <dead_horn> <dead_iota> <Greek_eta> : "á¾–" U1f96 +<Multi_key> <bar> <less> <asciitilde> <Greek_eta> : "á¾—" U1f97 +<Multi_key> <bar> <asciitilde> <less> <Greek_eta> : "á¾—" U1f97 +<Multi_key> <less> <bar> <asciitilde> <Greek_eta> : "á¾—" U1f97 +<Multi_key> <less> <asciitilde> <bar> <Greek_eta> : "á¾—" U1f97 +<Multi_key> <asciitilde> <bar> <less> <Greek_eta> : "á¾—" U1f97 +<Multi_key> <asciitilde> <less> <bar> <Greek_eta> : "á¾—" U1f97 +<dead_iota> <dead_ogonek> <dead_tilde> <Greek_eta> : "á¾—" U1f97 +<dead_iota> <dead_tilde> <dead_ogonek> <Greek_eta> : "á¾—" U1f97 +<dead_ogonek> <dead_iota> <dead_tilde> <Greek_eta> : "á¾—" U1f97 +<dead_ogonek> <dead_tilde> <dead_iota> <Greek_eta> : "á¾—" U1f97 +<dead_tilde> <dead_iota> <dead_ogonek> <Greek_eta> : "á¾—" U1f97 +<dead_tilde> <dead_ogonek> <dead_iota> <Greek_eta> : "á¾—" U1f97 +<Multi_key> <bar> <greater> <Greek_ETA> : "ᾘ" U1f98 +<Multi_key> <greater> <bar> <Greek_ETA> : "ᾘ" U1f98 +<dead_iota> <dead_horn> <Greek_ETA> : "ᾘ" U1f98 +<dead_horn> <dead_iota> <Greek_ETA> : "ᾘ" U1f98 +<Multi_key> <bar> <less> <Greek_ETA> : "á¾™" U1f99 +<Multi_key> <less> <bar> <Greek_ETA> : "á¾™" U1f99 +<dead_iota> <dead_ogonek> <Greek_ETA> : "á¾™" U1f99 +<dead_ogonek> <dead_iota> <Greek_ETA> : "á¾™" U1f99 +<Multi_key> <bar> <greater> <grave> <Greek_ETA> : "ᾚ" U1f9a +<Multi_key> <bar> <grave> <greater> <Greek_ETA> : "ᾚ" U1f9a +<Multi_key> <greater> <bar> <grave> <Greek_ETA> : "ᾚ" U1f9a +<Multi_key> <greater> <grave> <bar> <Greek_ETA> : "ᾚ" U1f9a +<Multi_key> <grave> <bar> <greater> <Greek_ETA> : "ᾚ" U1f9a +<Multi_key> <grave> <greater> <bar> <Greek_ETA> : "ᾚ" U1f9a +<dead_iota> <dead_horn> <dead_grave> <Greek_ETA> : "ᾚ" U1f9a +<dead_iota> <dead_grave> <dead_horn> <Greek_ETA> : "ᾚ" U1f9a +<dead_horn> <dead_iota> <dead_grave> <Greek_ETA> : "ᾚ" U1f9a +<dead_horn> <dead_grave> <dead_iota> <Greek_ETA> : "ᾚ" U1f9a +<dead_grave> <dead_iota> <dead_horn> <Greek_ETA> : "ᾚ" U1f9a +<dead_grave> <dead_horn> <dead_iota> <Greek_ETA> : "ᾚ" U1f9a +<Multi_key> <bar> <less> <grave> <Greek_ETA> : "á¾›" U1f9b +<Multi_key> <bar> <grave> <less> <Greek_ETA> : "á¾›" U1f9b +<Multi_key> <less> <bar> <grave> <Greek_ETA> : "á¾›" U1f9b +<Multi_key> <less> <grave> <bar> <Greek_ETA> : "á¾›" U1f9b +<Multi_key> <grave> <bar> <less> <Greek_ETA> : "á¾›" U1f9b +<Multi_key> <grave> <less> <bar> <Greek_ETA> : "á¾›" U1f9b +<dead_iota> <dead_ogonek> <dead_grave> <Greek_ETA> : "á¾›" U1f9b +<dead_iota> <dead_grave> <dead_ogonek> <Greek_ETA> : "á¾›" U1f9b +<dead_ogonek> <dead_iota> <dead_grave> <Greek_ETA> : "á¾›" U1f9b +<dead_ogonek> <dead_grave> <dead_iota> <Greek_ETA> : "á¾›" U1f9b +<dead_grave> <dead_iota> <dead_ogonek> <Greek_ETA> : "á¾›" U1f9b +<dead_grave> <dead_ogonek> <dead_iota> <Greek_ETA> : "á¾›" U1f9b +<Multi_key> <bar> <greater> <apostrophe> <Greek_ETA> : "ᾜ" U1f9c +<Multi_key> <bar> <apostrophe> <greater> <Greek_ETA> : "ᾜ" U1f9c +<Multi_key> <greater> <bar> <apostrophe> <Greek_ETA> : "ᾜ" U1f9c +<Multi_key> <greater> <apostrophe> <bar> <Greek_ETA> : "ᾜ" U1f9c +<Multi_key> <apostrophe> <bar> <greater> <Greek_ETA> : "ᾜ" U1f9c +<Multi_key> <apostrophe> <greater> <bar> <Greek_ETA> : "ᾜ" U1f9c +<dead_iota> <dead_horn> <dead_acute> <Greek_ETA> : "ᾜ" U1f9c +<dead_iota> <dead_acute> <dead_horn> <Greek_ETA> : "ᾜ" U1f9c +<dead_horn> <dead_iota> <dead_acute> <Greek_ETA> : "ᾜ" U1f9c +<dead_horn> <dead_acute> <dead_iota> <Greek_ETA> : "ᾜ" U1f9c +<dead_acute> <dead_iota> <dead_horn> <Greek_ETA> : "ᾜ" U1f9c +<dead_acute> <dead_horn> <dead_iota> <Greek_ETA> : "ᾜ" U1f9c +<Multi_key> <bar> <less> <apostrophe> <Greek_ETA> : "á¾" U1f9d +<Multi_key> <bar> <apostrophe> <less> <Greek_ETA> : "á¾" U1f9d +<Multi_key> <less> <bar> <apostrophe> <Greek_ETA> : "á¾" U1f9d +<Multi_key> <less> <apostrophe> <bar> <Greek_ETA> : "á¾" U1f9d +<Multi_key> <apostrophe> <bar> <less> <Greek_ETA> : "á¾" U1f9d +<Multi_key> <apostrophe> <less> <bar> <Greek_ETA> : "á¾" U1f9d +<dead_iota> <dead_ogonek> <dead_acute> <Greek_ETA> : "á¾" U1f9d +<dead_iota> <dead_acute> <dead_ogonek> <Greek_ETA> : "á¾" U1f9d +<dead_ogonek> <dead_iota> <dead_acute> <Greek_ETA> : "á¾" U1f9d +<dead_ogonek> <dead_acute> <dead_iota> <Greek_ETA> : "á¾" U1f9d +<dead_acute> <dead_iota> <dead_ogonek> <Greek_ETA> : "á¾" U1f9d +<dead_acute> <dead_ogonek> <dead_iota> <Greek_ETA> : "á¾" U1f9d +<Multi_key> <bar> <greater> <asciitilde> <Greek_ETA> : "ᾞ" U1f9e +<Multi_key> <bar> <asciitilde> <greater> <Greek_ETA> : "ᾞ" U1f9e +<Multi_key> <greater> <bar> <asciitilde> <Greek_ETA> : "ᾞ" U1f9e +<Multi_key> <greater> <asciitilde> <bar> <Greek_ETA> : "ᾞ" U1f9e +<Multi_key> <asciitilde> <bar> <greater> <Greek_ETA> : "ᾞ" U1f9e +<Multi_key> <asciitilde> <greater> <bar> <Greek_ETA> : "ᾞ" U1f9e +<dead_iota> <dead_horn> <dead_tilde> <Greek_ETA> : "ᾞ" U1f9e +<dead_iota> <dead_tilde> <dead_horn> <Greek_ETA> : "ᾞ" U1f9e +<dead_horn> <dead_iota> <dead_tilde> <Greek_ETA> : "ᾞ" U1f9e +<dead_horn> <dead_tilde> <dead_iota> <Greek_ETA> : "ᾞ" U1f9e +<dead_tilde> <dead_iota> <dead_horn> <Greek_ETA> : "ᾞ" U1f9e +<dead_tilde> <dead_horn> <dead_iota> <Greek_ETA> : "ᾞ" U1f9e +<Multi_key> <bar> <less> <asciitilde> <Greek_ETA> : "ᾟ" U1f9f +<Multi_key> <bar> <asciitilde> <less> <Greek_ETA> : "ᾟ" U1f9f +<Multi_key> <less> <bar> <asciitilde> <Greek_ETA> : "ᾟ" U1f9f +<Multi_key> <less> <asciitilde> <bar> <Greek_ETA> : "ᾟ" U1f9f +<Multi_key> <asciitilde> <bar> <less> <Greek_ETA> : "ᾟ" U1f9f +<Multi_key> <asciitilde> <less> <bar> <Greek_ETA> : "ᾟ" U1f9f +<dead_iota> <dead_ogonek> <dead_tilde> <Greek_ETA> : "ᾟ" U1f9f +<dead_iota> <dead_tilde> <dead_ogonek> <Greek_ETA> : "ᾟ" U1f9f +<dead_ogonek> <dead_iota> <dead_tilde> <Greek_ETA> : "ᾟ" U1f9f +<dead_ogonek> <dead_tilde> <dead_iota> <Greek_ETA> : "ᾟ" U1f9f +<dead_tilde> <dead_iota> <dead_ogonek> <Greek_ETA> : "ᾟ" U1f9f +<dead_tilde> <dead_ogonek> <dead_iota> <Greek_ETA> : "ᾟ" U1f9f +<Multi_key> <bar> <greater> <Greek_omega> : "á¾ " U1fa0 +<Multi_key> <greater> <bar> <Greek_omega> : "á¾ " U1fa0 +<dead_iota> <dead_horn> <Greek_omega> : "á¾ " U1fa0 +<dead_horn> <dead_iota> <Greek_omega> : "á¾ " U1fa0 +<Multi_key> <bar> <less> <Greek_omega> : "ᾡ" U1fa1 +<Multi_key> <less> <bar> <Greek_omega> : "ᾡ" U1fa1 +<dead_iota> <dead_ogonek> <Greek_omega> : "ᾡ" U1fa1 +<dead_ogonek> <dead_iota> <Greek_omega> : "ᾡ" U1fa1 +<Multi_key> <bar> <greater> <grave> <Greek_omega> : "á¾¢" U1fa2 +<Multi_key> <bar> <grave> <greater> <Greek_omega> : "á¾¢" U1fa2 +<Multi_key> <greater> <bar> <grave> <Greek_omega> : "á¾¢" U1fa2 +<Multi_key> <greater> <grave> <bar> <Greek_omega> : "á¾¢" U1fa2 +<Multi_key> <grave> <bar> <greater> <Greek_omega> : "á¾¢" U1fa2 +<Multi_key> <grave> <greater> <bar> <Greek_omega> : "á¾¢" U1fa2 +<dead_iota> <dead_horn> <dead_grave> <Greek_omega> : "á¾¢" U1fa2 +<dead_iota> <dead_grave> <dead_horn> <Greek_omega> : "á¾¢" U1fa2 +<dead_horn> <dead_iota> <dead_grave> <Greek_omega> : "á¾¢" U1fa2 +<dead_horn> <dead_grave> <dead_iota> <Greek_omega> : "á¾¢" U1fa2 +<dead_grave> <dead_iota> <dead_horn> <Greek_omega> : "á¾¢" U1fa2 +<dead_grave> <dead_horn> <dead_iota> <Greek_omega> : "á¾¢" U1fa2 +<Multi_key> <bar> <less> <grave> <Greek_omega> : "á¾£" U1fa3 +<Multi_key> <bar> <grave> <less> <Greek_omega> : "á¾£" U1fa3 +<Multi_key> <less> <bar> <grave> <Greek_omega> : "á¾£" U1fa3 +<Multi_key> <less> <grave> <bar> <Greek_omega> : "á¾£" U1fa3 +<Multi_key> <grave> <bar> <less> <Greek_omega> : "á¾£" U1fa3 +<Multi_key> <grave> <less> <bar> <Greek_omega> : "á¾£" U1fa3 +<dead_iota> <dead_ogonek> <dead_grave> <Greek_omega> : "á¾£" U1fa3 +<dead_iota> <dead_grave> <dead_ogonek> <Greek_omega> : "á¾£" U1fa3 +<dead_ogonek> <dead_iota> <dead_grave> <Greek_omega> : "á¾£" U1fa3 +<dead_ogonek> <dead_grave> <dead_iota> <Greek_omega> : "á¾£" U1fa3 +<dead_grave> <dead_iota> <dead_ogonek> <Greek_omega> : "á¾£" U1fa3 +<dead_grave> <dead_ogonek> <dead_iota> <Greek_omega> : "á¾£" U1fa3 +<Multi_key> <bar> <greater> <apostrophe> <Greek_omega> : "ᾤ" U1fa4 +<Multi_key> <bar> <apostrophe> <greater> <Greek_omega> : "ᾤ" U1fa4 +<Multi_key> <greater> <bar> <apostrophe> <Greek_omega> : "ᾤ" U1fa4 +<Multi_key> <greater> <apostrophe> <bar> <Greek_omega> : "ᾤ" U1fa4 +<Multi_key> <apostrophe> <bar> <greater> <Greek_omega> : "ᾤ" U1fa4 +<Multi_key> <apostrophe> <greater> <bar> <Greek_omega> : "ᾤ" U1fa4 +<dead_iota> <dead_horn> <dead_acute> <Greek_omega> : "ᾤ" U1fa4 +<dead_iota> <dead_acute> <dead_horn> <Greek_omega> : "ᾤ" U1fa4 +<dead_horn> <dead_iota> <dead_acute> <Greek_omega> : "ᾤ" U1fa4 +<dead_horn> <dead_acute> <dead_iota> <Greek_omega> : "ᾤ" U1fa4 +<dead_acute> <dead_iota> <dead_horn> <Greek_omega> : "ᾤ" U1fa4 +<dead_acute> <dead_horn> <dead_iota> <Greek_omega> : "ᾤ" U1fa4 +<Multi_key> <bar> <less> <apostrophe> <Greek_omega> : "á¾¥" U1fa5 +<Multi_key> <bar> <apostrophe> <less> <Greek_omega> : "á¾¥" U1fa5 +<Multi_key> <less> <bar> <apostrophe> <Greek_omega> : "á¾¥" U1fa5 +<Multi_key> <less> <apostrophe> <bar> <Greek_omega> : "á¾¥" U1fa5 +<Multi_key> <apostrophe> <bar> <less> <Greek_omega> : "á¾¥" U1fa5 +<Multi_key> <apostrophe> <less> <bar> <Greek_omega> : "á¾¥" U1fa5 +<dead_iota> <dead_ogonek> <dead_acute> <Greek_omega> : "á¾¥" U1fa5 +<dead_iota> <dead_acute> <dead_ogonek> <Greek_omega> : "á¾¥" U1fa5 +<dead_ogonek> <dead_iota> <dead_acute> <Greek_omega> : "á¾¥" U1fa5 +<dead_ogonek> <dead_acute> <dead_iota> <Greek_omega> : "á¾¥" U1fa5 +<dead_acute> <dead_iota> <dead_ogonek> <Greek_omega> : "á¾¥" U1fa5 +<dead_acute> <dead_ogonek> <dead_iota> <Greek_omega> : "á¾¥" U1fa5 +<Multi_key> <bar> <greater> <asciitilde> <Greek_omega> : "ᾦ" U1fa6 +<Multi_key> <bar> <asciitilde> <greater> <Greek_omega> : "ᾦ" U1fa6 +<Multi_key> <greater> <bar> <asciitilde> <Greek_omega> : "ᾦ" U1fa6 +<Multi_key> <greater> <asciitilde> <bar> <Greek_omega> : "ᾦ" U1fa6 +<Multi_key> <asciitilde> <bar> <greater> <Greek_omega> : "ᾦ" U1fa6 +<Multi_key> <asciitilde> <greater> <bar> <Greek_omega> : "ᾦ" U1fa6 +<dead_iota> <dead_horn> <dead_tilde> <Greek_omega> : "ᾦ" U1fa6 +<dead_iota> <dead_tilde> <dead_horn> <Greek_omega> : "ᾦ" U1fa6 +<dead_horn> <dead_iota> <dead_tilde> <Greek_omega> : "ᾦ" U1fa6 +<dead_horn> <dead_tilde> <dead_iota> <Greek_omega> : "ᾦ" U1fa6 +<dead_tilde> <dead_iota> <dead_horn> <Greek_omega> : "ᾦ" U1fa6 +<dead_tilde> <dead_horn> <dead_iota> <Greek_omega> : "ᾦ" U1fa6 +<Multi_key> <bar> <less> <asciitilde> <Greek_omega> : "ᾧ" U1fa7 +<Multi_key> <bar> <asciitilde> <less> <Greek_omega> : "ᾧ" U1fa7 +<Multi_key> <less> <bar> <asciitilde> <Greek_omega> : "ᾧ" U1fa7 +<Multi_key> <less> <asciitilde> <bar> <Greek_omega> : "ᾧ" U1fa7 +<Multi_key> <asciitilde> <bar> <less> <Greek_omega> : "ᾧ" U1fa7 +<Multi_key> <asciitilde> <less> <bar> <Greek_omega> : "ᾧ" U1fa7 +<dead_iota> <dead_ogonek> <dead_tilde> <Greek_omega> : "ᾧ" U1fa7 +<dead_iota> <dead_tilde> <dead_ogonek> <Greek_omega> : "ᾧ" U1fa7 +<dead_ogonek> <dead_iota> <dead_tilde> <Greek_omega> : "ᾧ" U1fa7 +<dead_ogonek> <dead_tilde> <dead_iota> <Greek_omega> : "ᾧ" U1fa7 +<dead_tilde> <dead_iota> <dead_ogonek> <Greek_omega> : "ᾧ" U1fa7 +<dead_tilde> <dead_ogonek> <dead_iota> <Greek_omega> : "ᾧ" U1fa7 +<Multi_key> <bar> <greater> <Greek_OMEGA> : "ᾨ" U1fa8 +<Multi_key> <greater> <bar> <Greek_OMEGA> : "ᾨ" U1fa8 +<dead_iota> <dead_horn> <Greek_OMEGA> : "ᾨ" U1fa8 +<dead_horn> <dead_iota> <Greek_OMEGA> : "ᾨ" U1fa8 +<Multi_key> <bar> <less> <Greek_OMEGA> : "ᾩ" U1fa9 +<Multi_key> <less> <bar> <Greek_OMEGA> : "ᾩ" U1fa9 +<dead_iota> <dead_ogonek> <Greek_OMEGA> : "ᾩ" U1fa9 +<dead_ogonek> <dead_iota> <Greek_OMEGA> : "ᾩ" U1fa9 +<Multi_key> <bar> <greater> <grave> <Greek_OMEGA> : "ᾪ" U1faa +<Multi_key> <bar> <grave> <greater> <Greek_OMEGA> : "ᾪ" U1faa +<Multi_key> <greater> <bar> <grave> <Greek_OMEGA> : "ᾪ" U1faa +<Multi_key> <greater> <grave> <bar> <Greek_OMEGA> : "ᾪ" U1faa +<Multi_key> <grave> <bar> <greater> <Greek_OMEGA> : "ᾪ" U1faa +<Multi_key> <grave> <greater> <bar> <Greek_OMEGA> : "ᾪ" U1faa +<dead_iota> <dead_horn> <dead_grave> <Greek_OMEGA> : "ᾪ" U1faa +<dead_iota> <dead_grave> <dead_horn> <Greek_OMEGA> : "ᾪ" U1faa +<dead_horn> <dead_iota> <dead_grave> <Greek_OMEGA> : "ᾪ" U1faa +<dead_horn> <dead_grave> <dead_iota> <Greek_OMEGA> : "ᾪ" U1faa +<dead_grave> <dead_iota> <dead_horn> <Greek_OMEGA> : "ᾪ" U1faa +<dead_grave> <dead_horn> <dead_iota> <Greek_OMEGA> : "ᾪ" U1faa +<Multi_key> <bar> <less> <grave> <Greek_OMEGA> : "ᾫ" U1fab +<Multi_key> <bar> <grave> <less> <Greek_OMEGA> : "ᾫ" U1fab +<Multi_key> <less> <bar> <grave> <Greek_OMEGA> : "ᾫ" U1fab +<Multi_key> <less> <grave> <bar> <Greek_OMEGA> : "ᾫ" U1fab +<Multi_key> <grave> <bar> <less> <Greek_OMEGA> : "ᾫ" U1fab +<Multi_key> <grave> <less> <bar> <Greek_OMEGA> : "ᾫ" U1fab +<dead_iota> <dead_ogonek> <dead_grave> <Greek_OMEGA> : "ᾫ" U1fab +<dead_iota> <dead_grave> <dead_ogonek> <Greek_OMEGA> : "ᾫ" U1fab +<dead_ogonek> <dead_iota> <dead_grave> <Greek_OMEGA> : "ᾫ" U1fab +<dead_ogonek> <dead_grave> <dead_iota> <Greek_OMEGA> : "ᾫ" U1fab +<dead_grave> <dead_iota> <dead_ogonek> <Greek_OMEGA> : "ᾫ" U1fab +<dead_grave> <dead_ogonek> <dead_iota> <Greek_OMEGA> : "ᾫ" U1fab +<Multi_key> <bar> <greater> <apostrophe> <Greek_OMEGA> : "ᾬ" U1fac +<Multi_key> <bar> <apostrophe> <greater> <Greek_OMEGA> : "ᾬ" U1fac +<Multi_key> <greater> <bar> <apostrophe> <Greek_OMEGA> : "ᾬ" U1fac +<Multi_key> <greater> <apostrophe> <bar> <Greek_OMEGA> : "ᾬ" U1fac +<Multi_key> <apostrophe> <bar> <greater> <Greek_OMEGA> : "ᾬ" U1fac +<Multi_key> <apostrophe> <greater> <bar> <Greek_OMEGA> : "ᾬ" U1fac +<dead_iota> <dead_horn> <dead_acute> <Greek_OMEGA> : "ᾬ" U1fac +<dead_iota> <dead_acute> <dead_horn> <Greek_OMEGA> : "ᾬ" U1fac +<dead_horn> <dead_iota> <dead_acute> <Greek_OMEGA> : "ᾬ" U1fac +<dead_horn> <dead_acute> <dead_iota> <Greek_OMEGA> : "ᾬ" U1fac +<dead_acute> <dead_iota> <dead_horn> <Greek_OMEGA> : "ᾬ" U1fac +<dead_acute> <dead_horn> <dead_iota> <Greek_OMEGA> : "ᾬ" U1fac +<Multi_key> <bar> <less> <apostrophe> <Greek_OMEGA> : "á¾­" U1fad +<Multi_key> <bar> <apostrophe> <less> <Greek_OMEGA> : "á¾­" U1fad +<Multi_key> <less> <bar> <apostrophe> <Greek_OMEGA> : "á¾­" U1fad +<Multi_key> <less> <apostrophe> <bar> <Greek_OMEGA> : "á¾­" U1fad +<Multi_key> <apostrophe> <bar> <less> <Greek_OMEGA> : "á¾­" U1fad +<Multi_key> <apostrophe> <less> <bar> <Greek_OMEGA> : "á¾­" U1fad +<dead_iota> <dead_ogonek> <dead_acute> <Greek_OMEGA> : "á¾­" U1fad +<dead_iota> <dead_acute> <dead_ogonek> <Greek_OMEGA> : "á¾­" U1fad +<dead_ogonek> <dead_iota> <dead_acute> <Greek_OMEGA> : "á¾­" U1fad +<dead_ogonek> <dead_acute> <dead_iota> <Greek_OMEGA> : "á¾­" U1fad +<dead_acute> <dead_iota> <dead_ogonek> <Greek_OMEGA> : "á¾­" U1fad +<dead_acute> <dead_ogonek> <dead_iota> <Greek_OMEGA> : "á¾­" U1fad +<Multi_key> <bar> <greater> <asciitilde> <Greek_OMEGA> : "á¾®" U1fae +<Multi_key> <bar> <asciitilde> <greater> <Greek_OMEGA> : "á¾®" U1fae +<Multi_key> <greater> <bar> <asciitilde> <Greek_OMEGA> : "á¾®" U1fae +<Multi_key> <greater> <asciitilde> <bar> <Greek_OMEGA> : "á¾®" U1fae +<Multi_key> <asciitilde> <bar> <greater> <Greek_OMEGA> : "á¾®" U1fae +<Multi_key> <asciitilde> <greater> <bar> <Greek_OMEGA> : "á¾®" U1fae +<dead_iota> <dead_horn> <dead_tilde> <Greek_OMEGA> : "á¾®" U1fae +<dead_iota> <dead_tilde> <dead_horn> <Greek_OMEGA> : "á¾®" U1fae +<dead_horn> <dead_iota> <dead_tilde> <Greek_OMEGA> : "á¾®" U1fae +<dead_horn> <dead_tilde> <dead_iota> <Greek_OMEGA> : "á¾®" U1fae +<dead_tilde> <dead_iota> <dead_horn> <Greek_OMEGA> : "á¾®" U1fae +<dead_tilde> <dead_horn> <dead_iota> <Greek_OMEGA> : "á¾®" U1fae +<Multi_key> <bar> <less> <asciitilde> <Greek_OMEGA> : "ᾯ" U1faf +<Multi_key> <bar> <asciitilde> <less> <Greek_OMEGA> : "ᾯ" U1faf +<Multi_key> <less> <bar> <asciitilde> <Greek_OMEGA> : "ᾯ" U1faf +<Multi_key> <less> <asciitilde> <bar> <Greek_OMEGA> : "ᾯ" U1faf +<Multi_key> <asciitilde> <bar> <less> <Greek_OMEGA> : "ᾯ" U1faf +<Multi_key> <asciitilde> <less> <bar> <Greek_OMEGA> : "ᾯ" U1faf +<dead_iota> <dead_ogonek> <dead_tilde> <Greek_OMEGA> : "ᾯ" U1faf +<dead_iota> <dead_tilde> <dead_ogonek> <Greek_OMEGA> : "ᾯ" U1faf +<dead_ogonek> <dead_iota> <dead_tilde> <Greek_OMEGA> : "ᾯ" U1faf +<dead_ogonek> <dead_tilde> <dead_iota> <Greek_OMEGA> : "ᾯ" U1faf +<dead_tilde> <dead_iota> <dead_ogonek> <Greek_OMEGA> : "ᾯ" U1faf +<dead_tilde> <dead_ogonek> <dead_iota> <Greek_OMEGA> : "ᾯ" U1faf +<dead_breve> <Greek_alpha> : "á¾°" U1fb0 +<dead_macron> <Greek_alpha> : "á¾±" U1fb1 +<dead_breve> <Greek_ALPHA> : "Ᾰ" U1fb8 +<dead_macron> <Greek_ALPHA> : "á¾¹" U1fb9 +<dead_breve> <Greek_iota> : "á¿" U1fd0 +<dead_macron> <Greek_iota> : "á¿‘" U1fd1 +<dead_breve> <Greek_IOTA> : "Ῐ" U1fd8 +<dead_macron> <Greek_IOTA> : "á¿™" U1fd9 +<dead_breve> <Greek_upsilon> : "á¿ " U1fe0 +<dead_macron> <Greek_upsilon> : "á¿¡" U1fe1 +<dead_breve> <Greek_UPSILON> : "Ῠ" U1fe8 +<dead_macron> <Greek_UPSILON> : "á¿©" U1fe9 +<Multi_key> <grave> <Greek_ALPHA> : "Ὰ" U1fba +<dead_grave> <Greek_ALPHA> : "Ὰ" U1fba +<Multi_key> <apostrophe> <Greek_ALPHA> : "á¾»" U1fbb +<dead_acute> <Greek_ALPHA> : "á¾»" U1fbb +<Multi_key> <grave> <Greek_EPSILON> : "Ὲ" U1fc8 +<dead_grave> <Greek_EPSILON> : "Ὲ" U1fc8 +<Multi_key> <apostrophe> <Greek_EPSILON> : "Έ" U1fc9 +<dead_acute> <Greek_EPSILON> : "Έ" U1fc9 +<Multi_key> <grave> <Greek_ETA> : "á¿Š" U1fca +<dead_grave> <Greek_ETA> : "á¿Š" U1fca +<Multi_key> <apostrophe> <Greek_ETA> : "á¿‹" U1fcb +<dead_acute> <Greek_ETA> : "á¿‹" U1fcb +<Multi_key> <grave> <Greek_IOTA> : "á¿š" U1fda +<dead_grave> <Greek_IOTA> : "á¿š" U1fda +<Multi_key> <apostrophe> <Greek_IOTA> : "á¿›" U1fdb +<dead_acute> <Greek_IOTA> : "á¿›" U1fdb +<Multi_key> <grave> <Greek_UPSILON> : "Ὺ" U1fea +<dead_grave> <Greek_UPSILON> : "Ὺ" U1fea +<Multi_key> <apostrophe> <Greek_UPSILON> : "á¿«" U1feb +<dead_acute> <Greek_UPSILON> : "á¿«" U1feb +<Multi_key> <grave> <Greek_OMICRON> : "Ὸ" U1ff8 +<dead_grave> <Greek_OMICRON> : "Ὸ" U1ff8 +<Multi_key> <apostrophe> <Greek_OMICRON> : "Ό" U1ff9 +<dead_acute> <Greek_OMICRON> : "Ό" U1ff9 +<Multi_key> <grave> <Greek_OMEGA> : "Ὼ" U1ffa +<dead_grave> <Greek_OMEGA> : "Ὼ" U1ffa +<Multi_key> <apostrophe> <Greek_OMEGA> : "á¿»" U1ffb +<dead_acute> <Greek_OMEGA> : "á¿»" U1ffb +<Multi_key> <bar> <grave> <Greek_alpha> : "á¾²" U1fb2 +<Multi_key> <grave> <bar> <Greek_alpha> : "á¾²" U1fb2 +<dead_iota> <dead_grave> <Greek_alpha> : "á¾²" U1fb2 +<dead_grave> <dead_iota> <Greek_alpha> : "á¾²" U1fb2 +<Multi_key> <bar> <Greek_alpha> : "á¾³" U1fb3 +<dead_iota> <Greek_alpha> : "á¾³" U1fb3 +<Multi_key> <bar> <apostrophe> <Greek_alpha> : "á¾´" U1fb4 +<Multi_key> <apostrophe> <bar> <Greek_alpha> : "á¾´" U1fb4 +<dead_iota> <dead_acute> <Greek_alpha> : "á¾´" U1fb4 +<dead_acute> <dead_iota> <Greek_alpha> : "á¾´" U1fb4 +<Multi_key> <asciitilde> <Greek_alpha> : "ᾶ" U1fb6 +<dead_tilde> <Greek_alpha> : "ᾶ" U1fb6 +<Multi_key> <bar> <asciitilde> <Greek_alpha> : "á¾·" U1fb7 +<Multi_key> <asciitilde> <bar> <Greek_alpha> : "á¾·" U1fb7 +<dead_iota> <dead_tilde> <Greek_alpha> : "á¾·" U1fb7 +<dead_tilde> <dead_iota> <Greek_alpha> : "á¾·" U1fb7 +<Multi_key> <bar> <grave> <Greek_eta> : "á¿‚" U1fc2 +<Multi_key> <grave> <bar> <Greek_eta> : "á¿‚" U1fc2 +<dead_iota> <dead_grave> <Greek_eta> : "á¿‚" U1fc2 +<dead_grave> <dead_iota> <Greek_eta> : "á¿‚" U1fc2 +<Multi_key> <bar> <Greek_eta> : "ῃ" U1fc3 +<dead_iota> <Greek_eta> : "ῃ" U1fc3 +<Multi_key> <bar> <apostrophe> <Greek_eta> : "á¿„" U1fc4 +<Multi_key> <apostrophe> <bar> <Greek_eta> : "á¿„" U1fc4 +<dead_iota> <dead_acute> <Greek_eta> : "á¿„" U1fc4 +<dead_acute> <dead_iota> <Greek_eta> : "á¿„" U1fc4 +<Multi_key> <asciitilde> <Greek_eta> : "ῆ" U1fc6 +<dead_tilde> <Greek_eta> : "ῆ" U1fc6 +<Multi_key> <bar> <asciitilde> <Greek_eta> : "ῇ" U1fc7 +<Multi_key> <asciitilde> <bar> <Greek_eta> : "ῇ" U1fc7 +<dead_iota> <dead_tilde> <Greek_eta> : "ῇ" U1fc7 +<dead_tilde> <dead_iota> <Greek_eta> : "ῇ" U1fc7 +<Multi_key> <quotedbl> <grave> <Greek_iota> : "á¿’" U1fd2 +<Multi_key> <grave> <quotedbl> <Greek_iota> : "á¿’" U1fd2 +<dead_diaeresis> <dead_grave> <Greek_iota> : "á¿’" U1fd2 +<dead_grave> <dead_diaeresis> <Greek_iota> : "á¿’" U1fd2 +<Multi_key> <quotedbl> <apostrophe> <Greek_iota> : "á¿“" U1fd3 +<Multi_key> <apostrophe> <quotedbl> <Greek_iota> : "á¿“" U1fd3 +<dead_diaeresis> <dead_acute> <Greek_iota> : "á¿“" U1fd3 +<dead_acute> <dead_diaeresis> <Greek_iota> : "á¿“" U1fd3 +<Multi_key> <asciitilde> <Greek_iota> : "á¿–" U1fd6 +<dead_tilde> <Greek_iota> : "á¿–" U1fd6 +<Multi_key> <quotedbl> <asciitilde> <Greek_iota> : "á¿—" U1fd7 +<Multi_key> <asciitilde> <quotedbl> <Greek_iota> : "á¿—" U1fd7 +<dead_diaeresis> <dead_tilde> <Greek_iota> : "á¿—" U1fd7 +<dead_tilde> <dead_diaeresis> <Greek_iota> : "á¿—" U1fd7 +<Multi_key> <quotedbl> <grave> <Greek_upsilon> : "á¿¢" U1fe2 +<Multi_key> <grave> <quotedbl> <Greek_upsilon> : "á¿¢" U1fe2 +<dead_diaeresis> <dead_grave> <Greek_upsilon> : "á¿¢" U1fe2 +<dead_grave> <dead_diaeresis> <Greek_upsilon> : "á¿¢" U1fe2 +<Multi_key> <quotedbl> <apostrophe> <Greek_upsilon> : "á¿£" U1fe3 +<Multi_key> <apostrophe> <quotedbl> <Greek_upsilon> : "á¿£" U1fe3 +<dead_diaeresis> <dead_acute> <Greek_upsilon> : "á¿£" U1fe3 +<dead_acute> <dead_diaeresis> <Greek_upsilon> : "á¿£" U1fe3 +<Multi_key> <asciitilde> <Greek_upsilon> : "ῦ" U1fe6 +<dead_tilde> <Greek_upsilon> : "ῦ" U1fe6 +<Multi_key> <quotedbl> <asciitilde> <Greek_upsilon> : "ῧ" U1fe7 +<Multi_key> <asciitilde> <quotedbl> <Greek_upsilon> : "ῧ" U1fe7 +<dead_diaeresis> <dead_tilde> <Greek_upsilon> : "ῧ" U1fe7 +<dead_tilde> <dead_diaeresis> <Greek_upsilon> : "ῧ" U1fe7 +<Multi_key> <bar> <grave> <Greek_omega> : "ῲ" U1ff2 +<Multi_key> <grave> <bar> <Greek_omega> : "ῲ" U1ff2 +<dead_iota> <dead_grave> <Greek_omega> : "ῲ" U1ff2 +<dead_grave> <dead_iota> <Greek_omega> : "ῲ" U1ff2 +<Multi_key> <bar> <Greek_omega> : "ῳ" U1ff3 +<dead_iota> <Greek_omega> : "ῳ" U1ff3 +<Multi_key> <bar> <apostrophe> <Greek_omega> : "á¿´" U1ff4 +<Multi_key> <apostrophe> <bar> <Greek_omega> : "á¿´" U1ff4 +<dead_iota> <dead_acute> <Greek_omega> : "á¿´" U1ff4 +<dead_acute> <dead_iota> <Greek_omega> : "á¿´" U1ff4 +<Multi_key> <asciitilde> <Greek_omega> : "ῶ" U1ff6 +<dead_tilde> <Greek_omega> : "ῶ" U1ff6 +<Multi_key> <bar> <asciitilde> <Greek_omega> : "á¿·" U1ff7 +<Multi_key> <asciitilde> <bar> <Greek_omega> : "á¿·" U1ff7 +<dead_iota> <dead_tilde> <Greek_omega> : "á¿·" U1ff7 +<dead_tilde> <dead_iota> <Greek_omega> : "á¿·" U1ff7 +<Multi_key> <bar> <Greek_ALPHA> : "á¾¼" U1fbc +<dead_iota> <Greek_ALPHA> : "á¾¼" U1fbc +<Multi_key> <bar> <Greek_ETA> : "á¿Œ" U1fcc +<dead_iota> <Greek_ETA> : "á¿Œ" U1fcc +<Multi_key> <bar> <Greek_OMEGA> : "ῼ" U1ffc +<dead_iota> <Greek_OMEGA> : "ῼ" U1ffc +<Multi_key> <greater> <Greek_rho> : "ῤ" U1fe4 +<dead_horn> <Greek_rho> : "ῤ" U1fe4 +<Multi_key> <less> <Greek_rho> : "á¿¥" U1fe5 +<dead_ogonek> <Greek_rho> : "á¿¥" U1fe5 +<Multi_key> <less> <Greek_RHO> : "Ῥ" U1fec +<dead_ogonek> <Greek_RHO> : "Ῥ" U1fec +<dead_horn> <dead_grave> <space> : "á¿" U1fcd +<dead_grave> <dead_horn> <space> : "á¿" U1fcd +<dead_horn> <dead_acute> <space> : "á¿Ž" U1fce +<dead_acute> <dead_horn> <space> : "á¿Ž" U1fce +<dead_horn> <dead_tilde> <space> : "á¿" U1fcf +<dead_tilde> <dead_horn> <space> : "á¿" U1fcf +<dead_ogonek> <dead_grave> <space> : "á¿" U1fdd +<dead_grave> <dead_ogonek> <space> : "á¿" U1fdd +<dead_ogonek> <dead_acute> <space> : "á¿ž" U1fde +<dead_acute> <dead_ogonek> <space> : "á¿ž" U1fde +<dead_ogonek> <dead_tilde> <space> : "á¿Ÿ" U1fdf +<dead_tilde> <dead_ogonek> <space> : "á¿Ÿ" U1fdf +<dead_diaeresis> <dead_grave> <space> : "á¿­" U1fed +<dead_grave> <dead_diaeresis> <space> : "á¿­" U1fed +<dead_diaeresis> <dead_acute> <space> : "á¿®" U1fee +<dead_acute> <dead_diaeresis> <space> : "á¿®" U1fee +<dead_diaeresis> <dead_tilde> <space> : "á¿" U1fc1 +<dead_tilde> <dead_diaeresis> <space> : "á¿" U1fc1 +<dead_horn> <space> : "᾿" U1fbf +<dead_horn> <dead_horn> : "᾿" U1fbf +<dead_ogonek> <space> : "῾" U1ffe +<dead_ogonek> <dead_ogonek> : "῾" U1ffe +<dead_grave> <space> : "`" U1fef +<dead_grave> <dead_grave> : "`" U1fef +<dead_acute> <space> : "´" U1ffd +<dead_acute> <dead_acute> : "´" U1ffd +<dead_tilde> <space> : "á¿€" U1fc0 +<dead_tilde> <dead_tilde> : "á¿€" U1fc0 +<dead_horn> <underscore> : "á¾½" U1fbd +<dead_iota> <underscore> : "á¾¾" U1fbe +<dead_diaeresis> <space> : "¨" U00a8 +<dead_diaeresis> <dead_diaeresis> : "¨" U00a8 +<dead_macron> <space> : "¯" U00af +<dead_macron> <dead_macron> : "¯" U00af +<dead_breve> <space> : "˘" U02d8 +<dead_breve> <dead_breve> : "˘" U02d8 +<dead_iota> <space> : "ͺ" U037a +<dead_iota> <dead_iota> : "ͺ" U037a +<Multi_key> <quotedbl> <Greek_IOTA> : "Ϊ" U03aa +<dead_diaeresis> <Greek_IOTA> : "Ϊ" U03aa +<Multi_key> <quotedbl> <Greek_UPSILON> : "Ϋ" U03ab +<dead_diaeresis> <Greek_UPSILON> : "Ϋ" U03ab +<Multi_key> <quotedbl> <Greek_iota> : "ÏŠ" U03ca +<dead_diaeresis> <Greek_iota> : "ÏŠ" U03ca +<Multi_key> <quotedbl> <Greek_upsilon> : "Ï‹" U03cb +<dead_diaeresis> <Greek_upsilon> : "Ï‹" U03cb + +XCOMM Part 3 +XCOMM +XCOMM ISO 8859-7 (Greek) multi-key and dead key definitions extracted and +XCOMM converted from the iso8859-7/Compose file. + +<Multi_key> <Greek_ALPHA> <apostrophe> : "Ά" Greek_ALPHAaccent +<Multi_key> <apostrophe> <Greek_ALPHA> : "Ά" Greek_ALPHAaccent +<Multi_key> <Greek_EPSILON> <apostrophe>: "Έ" Greek_EPSILONaccent +<Multi_key> <apostrophe> <Greek_EPSILON>: "Έ" Greek_EPSILONaccent +<Multi_key> <Greek_ETA> <apostrophe> : "Ή" Greek_ETAaccent +<Multi_key> <apostrophe> <Greek_ETA> : "Ή" Greek_ETAaccent +<Multi_key> <Greek_IOTA> <apostrophe> : "Ί" Greek_IOTAaccent +<Multi_key> <apostrophe> <Greek_IOTA> : "Ί" Greek_IOTAaccent +<Multi_key> <Greek_OMICRON> <apostrophe>: "ÎŒ" Greek_OMICRONaccent +<Multi_key> <apostrophe> <Greek_OMICRON>: "ÎŒ" Greek_OMICRONaccent +<Multi_key> <Greek_UPSILON> <apostrophe>: "ÎŽ" Greek_UPSILONaccent +<Multi_key> <apostrophe> <Greek_UPSILON>: "ÎŽ" Greek_UPSILONaccent +<Multi_key> <Greek_OMEGA> <apostrophe> : "Î" Greek_OMEGAaccent +<Multi_key> <apostrophe> <Greek_OMEGA> : "Î" Greek_OMEGAaccent +<Multi_key> <Greek_IOTA> <quotedbl> : "Ϊ" Greek_IOTAdiaeresis +<Multi_key> <quotedbl> <Greek_IOTA> : "Ϊ" Greek_IOTAdiaeresis +<Multi_key> <Greek_IOTA> <quotedbl> : "Ϊ" Greek_IOTAdieresis +<Multi_key> <quotedbl> <Greek_IOTA> : "Ϊ" Greek_IOTAdieresis +<Multi_key> <Greek_UPSILON> <quotedbl> : "Ϋ" Greek_UPSILONdieresis +<Multi_key> <quotedbl> <Greek_UPSILON> : "Ϋ" Greek_UPSILONdieresis + +<Multi_key> <Greek_alpha> <apostrophe> : "ά" Greek_alphaaccent +<Multi_key> <apostrophe> <Greek_alpha> : "ά" Greek_alphaaccent +<Multi_key> <Greek_epsilon> <apostrophe>: "έ" Greek_epsilonaccent +<Multi_key> <apostrophe> <Greek_epsilon>: "έ" Greek_epsilonaccent +<Multi_key> <Greek_eta> <apostrophe> : "ή" Greek_etaaccent +<Multi_key> <apostrophe> <Greek_eta> : "ή" Greek_etaaccent +<Multi_key> <Greek_iota> <apostrophe> : "ί" Greek_iotaaccent +<Multi_key> <apostrophe> <Greek_iota> : "ί" Greek_iotaaccent +<Multi_key> <Greek_omicron> <apostrophe>: "ÏŒ" Greek_omicronaccent +<Multi_key> <apostrophe> <Greek_omicron>: "ÏŒ" Greek_omicronaccent +<Multi_key> <Greek_upsilon> <apostrophe>: "Ï" Greek_upsilonaccent +<Multi_key> <apostrophe> <Greek_upsilon>: "Ï" Greek_upsilonaccent +<Multi_key> <Greek_omega> <apostrophe> : "ÏŽ" Greek_omegaaccent +<Multi_key> <apostrophe> <Greek_omega> : "ÏŽ" Greek_omegaaccent +<Multi_key> <Greek_iota> <quotedbl> : "ÏŠ" Greek_iotadieresis +<Multi_key> <quotedbl> <Greek_iota> : "ÏŠ" Greek_iotadieresis +<Multi_key> <Greek_upsilon> <quotedbl> : "Ï‹" Greek_upsilondieresis +<Multi_key> <quotedbl> <Greek_upsilon> : "Ï‹" Greek_upsilondieresis + +<Multi_key> <apostrophe> <quotedbl> <Greek_iota> : "Î" Greek_iotaaccentdieresis +<Multi_key> <quotedbl> <apostrophe> <Greek_iota> : "Î" Greek_iotaaccentdieresis +<Multi_key> <apostrophe> <quotedbl> <Greek_upsilon> : "ΰ" Greek_upsilonaccentdieresis +<Multi_key> <quotedbl> <apostrophe> <Greek_upsilon> : "ΰ" Greek_upsilonaccentdieresis +<Multi_key> <apostrophe> <quotedbl> <space> : "Î…" Greek_accentdieresis +<Multi_key> <quotedbl> <apostrophe> <space> : "Î…" Greek_accentdieresis + +<dead_acute> <Greek_alpha> : "ά" Greek_alphaaccent +<dead_acute> <Greek_epsilon> : "έ" Greek_epsilonaccent +<dead_acute> <Greek_eta> : "ή" Greek_etaaccent +<dead_acute> <Greek_iota> : "ί" Greek_iotaaccent +<dead_acute> <Greek_omicron> : "ÏŒ" Greek_omicronaccent +<dead_acute> <Greek_upsilon> : "Ï" Greek_upsilonaccent +<dead_acute> <Greek_omega> : "ÏŽ" Greek_omegaaccent +<dead_acute> <Greek_ALPHA> : "Ά" Greek_ALPHAaccent +<dead_acute> <Greek_EPSILON> : "Έ" Greek_EPSILONaccent +<dead_acute> <Greek_ETA> : "Ή" Greek_ETAaccent +<dead_acute> <Greek_IOTA> : "Ί" Greek_IOTAaccent +<dead_acute> <Greek_OMICRON> : "ÎŒ" Greek_OMICRONaccent +<dead_acute> <Greek_UPSILON> : "ÎŽ" Greek_UPSILONaccent +<dead_acute> <Greek_OMEGA> : "Î" Greek_OMEGAaccent +<dead_acute> <space> : "΄" U0384 +<dead_acute> <dead_acute> : "΄" U0384 +<dead_acute> <period> : "·" periodcentered +<dead_acute> <less> : "«" guillemotleft +<dead_acute> <greater> : "»" guillemotright + +<dead_diaeresis> <Greek_iota> : "ÏŠ" Greek_iotadieresis +<dead_diaeresis> <Greek_upsilon> : "Ï‹" Greek_upsilondieresis +<dead_diaeresis> <Greek_IOTA> : "Ϊ" Greek_IOTAdiaeresis +<dead_diaeresis> <Greek_IOTA> : "Ϊ" Greek_IOTAdieresis +<dead_diaeresis> <Greek_UPSILON> : "Ϋ" Greek_UPSILONdieresis +<dead_diaeresis> <space> : "¨" diaeresis +<dead_diaeresis> <dead_diaeresis> : "¨" diaeresis +<dead_diaeresis> <period> : "·" periodcentered +<dead_diaeresis> <less> : "«" guillemotleft +<dead_diaeresis> <greater> : "»" guillemotright + +<dead_acute> <dead_diaeresis> <Greek_iota> : "Î" Greek_iotaaccentdieresis +<dead_acute> <dead_diaeresis> <Greek_upsilon> : "ΰ" Greek_upsilonaccentdieresis +<dead_acute> <dead_diaeresis> <space> : "Î…" Greek_accentdieresis + +<dead_diaeresis> <dead_acute> <Greek_iota> : "Î" Greek_iotaaccentdieresis +<dead_diaeresis> <dead_acute> <Greek_upsilon> : "ΰ" Greek_upsilonaccentdieresis +<dead_diaeresis> <dead_acute> <space> : "Î…" Greek_accentdieresis + +XCOMM Part 4 +XCOMM +XCOMM Miscellaneous extensions. + +<dead_macron> <space> : "¯" macron +<dead_macron> <dead_macron> : "¯" macron +<dead_breve> <space> : "˘" breve +<dead_breve> <dead_breve> : "˘" breve + +<dead_grave> <underscore> : "`" grave +<dead_acute> <underscore> : "´" acute +<dead_tilde> <underscore> : "~" asciitilde + +<Multi_key> <less> <apostrophe> : "‘" leftsinglequotemark +<Multi_key> <apostrophe> <less> : "‘" leftsinglequotemark +<Multi_key> <greater> <apostrophe> : "’" rightsinglequotemark +<Multi_key> <apostrophe> <greater> : "’" rightsinglequotemark +<Multi_key> <asciitilde> <asciitilde> : "―" Greek_horizbar +<Multi_key> <asciicircum> <asciicircum> : "˘" breve + +<Multi_key> <slash> <slash> : "Í´" U0374 +<Multi_key> <backslash> <backslash> : "͵" U0375 +<Multi_key> <semicolon> <semicolon> : ";" U037e +<Multi_key> <colon> <colon> : "·" U0387 + +<Multi_key> <C> <equal> : "€" EuroSign +<Multi_key> <equal> <C> : "€" EuroSign +<Multi_key> <c> <equal> : "€" EuroSign +<Multi_key> <equal> <c> : "€" EuroSign +<Multi_key> <E> <equal> : "€" EuroSign +<Multi_key> <equal> <E> : "€" EuroSign +<Multi_key> <e> <equal> : "€" EuroSign +<Multi_key> <equal> <e> : "€" EuroSign +<Multi_key> <Greek_EPSILON> <equal> : "€" EuroSign +<Multi_key> <equal> <Greek_EPSILON> : "€" EuroSign +<Multi_key> <Greek_epsilon> <equal> : "€" EuroSign +<Multi_key> <equal> <Greek_epsilon> : "€" EuroSign + +<Multi_key> <Greek_DELTA> <Greek_RHO> : "₯" U20af +<Multi_key> <Greek_DELTA> <Greek_rho> : "₯" U20af +<Multi_key> <Greek_delta> <Greek_RHO> : "₯" U20af +<Multi_key> <Greek_delta> <Greek_rho> : "₯" U20af + +XCOMM End Index: xc/nls/Compose/en_US.UTF-8 diff -u xc/nls/Compose/en_US.UTF-8:1.1 xc/nls/Compose/en_US.UTF-8:1.8 --- xc/nls/Compose/en_US.UTF-8:1.1 Fri Nov 2 18:29:28 2001 +++ xc/nls/Compose/en_US.UTF-8 Mon Feb 24 23:38:32 2003 @@ -1,1076 +1,5541 @@ +XCOMM UTF-8 (Unicode) compose sequence +XCOMM David.Monniaux@ens.fr XCOMM -XCOMM $XFree86: xc/nls/Compose/en_US.UTF-8,v 1.1 2001/11/02 23:29:28 dawes Exp $ -XCOMM -XCOMM latin alphabet -XCOMM -XCOMM abovedot -<dead_abovedot> <b> : "ḃ" U1e03 -<dead_abovedot> <B> : "Ḃ" U1e02 -<dead_abovedot> <c> : "Ä‹" cabovedot -<dead_abovedot> <C> : "ÄŠ" Cabovedot -<dead_abovedot> <d> : "ḋ" U1e0b -<dead_abovedot> <D> : "Ḋ" U1e0a -<dead_abovedot> <e> : "Ä—" eabovedot -<dead_abovedot> <E> : "Ä–" Ebovedot -<dead_abovedot> <f> : "ḟ" U1e1f -<dead_abovedot> <F> : "Ḟ" U1e1e -<dead_abovedot> <g> : "Ä¡" U0121 -<dead_abovedot> <G> : "Ä " U0120 -<dead_abovedot> <I> : "Ä°" Iabovedot -<dead_abovedot> <i> : "ı" idotless -<dead_abovedot> <m> : "á¹" U1e41 -<dead_abovedot> <M> : "á¹€" U1e40 -<dead_abovedot> <p> : "á¹—" U1e57 -<dead_abovedot> <P> : "á¹–" U1e56 -<dead_abovedot> <s> : "ṡ" U1e61 -<dead_abovedot> <S> : "á¹ " U1e60 -<dead_abovedot> <t> : "ṫ" U1e6b -<dead_abovedot> <T> : "Ṫ" U1e6a -<dead_abovedot> <z> : "ż" zabovedot -<dead_abovedot> <Z> : "Å»" Zabovedot -XCOMM those are for facility -<dead_abovedot> <a> : "Ã¥" aring -<dead_abovedot> <A> : "Ã…" Aring -<dead_abovedot> <u> : "ů" uring -<dead_abovedot> <U> : "Å®" Uring -XCOMM abovering -<dead_abovering> <a> : "Ã¥" aring -<dead_abovering> <A> : "Ã…" Aring -<dead_abovering> <u> : "ů" uring -<dead_abovering> <U> : "Å®" Uring -XCOMM for facility -<dead_abovering> <e> : "Ä—" eabovedot -<dead_abovering> <E> : "Ä–" Eabovedot -<dead_abovering> <z> : "ż" zabovedot -<dead_abovering> <Z> : "Å»" Zabovedot -XCOMM acute -<dead_acute> <a> : "á" aacute -<dead_acute> <A> : "Ã" Aacute -<dead_acute> <abreve> : "ắ" U1eaf -<dead_acute> <Abreve> : "Ắ" U1eaf -<dead_acute> <acircumflex> : "ấ" U1ea5 -<dead_acute> <Acircumflex> : "Ấ" U1ea4 -<dead_acute> <c> : "ć" cacute -<dead_acute> <C> : "Ć" Cacute -<dead_acute> <ecircumflex> : "ế" U1ebf -<dead_acute> <Ecircumflex> : "Ế" U1ebe -<dead_acute> <e> : "é" eacute -<dead_acute> <E> : "É" Eacute -<dead_acute> <i> : "í" iacute -<dead_acute> <I> : "Ã" Iacute -<dead_acute> <l> : "ĺ" lacute -<dead_acute> <L> : "Ĺ" Lacute -<dead_acute> <n> : "Å„" nacute -<dead_acute> <N> : "Ń" Nacute -<dead_acute> <ocircumflex> : "ố" U1ed1 -<dead_acute> <Ocircumflex> : "á»" U1ed0 -<dead_acute> <U01a1> : "á»›" U1edb -<dead_acute> <U01a0> : "Ớ" U1eda -<dead_acute> <o> : "ó" oacute -<dead_acute> <O> : "Ó" Oacute -<dead_acute> <dead_acute> <o> : "Å‘" odoubleacute -<dead_acute> <dead_acute> <O> : "Å" Odoubleacute -<dead_acute> <r> : "Å•" racute -<dead_acute> <R> : "Å”" Racute -<dead_acute> <s> : "Å›" sacute -<dead_acute> <S> : "Åš" Sacute -<dead_acute> <U01b0> : "ứ" U1ee9 -<dead_acute> <U01af> : "Ứ" U1ee8 -<dead_acute> <u> : "ú" uacute -<dead_acute> <U> : "Ú" Uacute -<dead_acute> <dead_acute> <u> : "ű" udoubleacute -<dead_acute> <dead_acute> <U> : "Å°" Udoubleacute -<dead_acute> <w> : "ẃ" U1e83 -<dead_acute> <W> : "Ẃ" U1e82 -<dead_acute> <y> : "ý" yacute -<dead_acute> <Y> : "Ã" Yacute -<dead_acute> <z> : "ź" zacute -<dead_acute> <Z> : "Ź" Zacute -XCOMM for facility -<dead_acute> <b> : "ḃ" U1e03 -<dead_acute> <B> : "Ḃ" U1e02 -<dead_acute> <d> : "ḋ" U1e0b -<dead_acute> <D> : "Ḋ" U1e0a -<dead_acute> <f> : "ḟ" U1e1f -<dead_acute> <F> : "Ḟ" U1e1e -<dead_acute> <t> : "ṫ" U1e6b -<dead_acute> <T> : "Ṫ" U1e6a -XCOMM belowdot -<dead_belowdot> <a> : "ạ" U1ea1 -<dead_belowdot> <A> : "Ạ" U1ea0 -<dead_belowdot> <abreve> : "ặ" U1eb7 -<dead_belowdot> <Abreve> : "Ặ" U1eb6 -<dead_belowdot> <acircumflex> : "ậ" U1ead -<dead_belowdot> <Acircumflex> : "Ậ" U1eac -<dead_belowdot> <ecircumflex> : "ệ" U1ec7 -<dead_belowdot> <Ecircumflex> : "Ệ" U1ec6 -<dead_belowdot> <e> : "ẹ" U1eb9 -<dead_belowdot> <E> : "Ẹ" U1eb8 -<dead_belowdot> <i> : "ị" U1ecb -<dead_belowdot> <I> : "Ị" U1eca -<dead_belowdot> <ocircumflex> : "á»™" U1ed9 -<dead_belowdot> <Ocircumflex> : "Ộ" U1ed8 -<dead_belowdot> <U01a1> : "ợ" U1ee3 -<dead_belowdot> <U01a0> : "Ợ" U1ee2 -<dead_belowdot> <o> : "á»" U1ecd -<dead_belowdot> <O> : "Ọ" U1ecc -<dead_belowdot> <U01b0> : "á»±" U1ef1 -<dead_belowdot> <U01af> : "á»°" U1ef0 -<dead_belowdot> <u> : "ụ" U1ee5 -<dead_belowdot> <U> : "Ụ" U1ee4 -<dead_belowdot> <y> : "ỵ" U1ef5 -<dead_belowdot> <Y> : "á»´" U1ef4 -XCOMM those are in fact coma below -<dead_belowdot> <s> : "È™" U0219 -<dead_belowdot> <S> : "Ș" U0218 -<dead_belowdot> <t> : "È›" U021b -<dead_belowdot> <T> : "Èš" U021a -XCOMM breve -<dead_breve> <a> : "ă" abreve -<dead_breve> <A> : "Ä‚" Abreve -<dead_breve> <g> : "ÄŸ" gbreve -<dead_breve> <G> : "Äž" Gbreve -<dead_breve> <u> : "Å­" ubreve -<dead_breve> <U> : "Ŭ" Ubreve -<dead_breve> <dead_acute> <a> : "ắ" U1eaf -<dead_breve> <dead_acute> <A> : "Ắ" U1eae -<dead_breve> <dead_belowdot> <a> : "ặ" U1eb7 -<dead_breve> <dead_belowdot> <A> : "Ặ" U1eb6 -<dead_breve> <dead_grave> <a> : "ằ" U1eb1 -<dead_breve> <dead_grave> <A> : "Ằ" U1eb0 -<dead_breve> <dead_hook> <a> : "ẳ" U1eb3 -<dead_breve> <dead_hook> <A> : "Ẳ" U1eb2 -<dead_breve> <dead_tilde> <a> : "ẵ" U1eb5 -<dead_breve> <dead_tilde> <A> : "Ẵ" U1eb4 -XCOMM caron -<dead_caron> <c> : "Ä" ccaron -<dead_caron> <C> : "ÄŒ" Ccaron -<dead_caron> <d> : "Ä" dcaron -<dead_caron> <D> : "ÄŽ" Dcaron -<dead_caron> <e> : "Ä›" ecaron -<dead_caron> <E> : "Äš" Ecaron -<dead_caron> <g> : "ǧ" U01e7 -<dead_caron> <G> : "Ǧ" U01e6 -<dead_caron> <l> : "ľ" lcaron -<dead_caron> <L> : "Ľ" Lcaron -<dead_caron> <n> : "ň" ncaron -<dead_caron> <N> : "Ň" Ncaron -<dead_caron> <r> : "Å™" rcaron -<dead_caron> <R> : "Ř" Rcaron -<dead_caron> <s> : "Å¡" scaron -<dead_caron> <S> : "Å " Scaron -<dead_caron> <t> : "Å¥" tcaron -<dead_caron> <T> : "Ť" Tcaron -<dead_caron> <u> : "Ç”" U01d4 -<dead_caron> <U> : "Ç“" U01d3 -<dead_caron> <z> : "ž" zcaron -<dead_caron> <Z> : "Ž" Zcaron -XCOMM cedilla -<dead_cedilla> <c> : "ç" ccedilla -<dead_cedilla> <C> : "Ç" Ccedilla -<dead_cedilla> <g> : "Ä£" gcedilla -<dead_cedilla> <G> : "Ä¢" Gcedilla -<dead_cedilla> <k> : "Ä·" kcedilla -<dead_cedilla> <K> : "Ķ" Kcedilla -<dead_cedilla> <l> : "ļ" lcedilla -<dead_cedilla> <L> : "Ä»" Lcedilla -<dead_cedilla> <n> : "ņ" ncedilla -<dead_cedilla> <N> : "Å…" Ncedilla -<dead_cedilla> <r> : "Å—" rcedilla -<dead_cedilla> <R> : "Å–" Rcedilla -<dead_cedilla> <s> : "ÅŸ" scedilla -<dead_cedilla> <S> : "Åž" Scedilla -<dead_cedilla> <t> : "Å£" tcedilla -<dead_cedilla> <T> : "Å¢" Tcedilla -XCOMM circumflex -XCOMM<dead_circumflex> <0> : "°" degree -<dead_circumflex> <0> : "â°" U2070 -<dead_circumflex> <1> : "¹" onesuperior -<dead_circumflex> <2> : "²" twosuperior -<dead_circumflex> <3> : "³" threesuperior -<dead_circumflex> <a> : "â" acircumflex -<dead_circumflex> <A> : "Â" Acircumflex -<dead_circumflex> <c> : "ĉ" ccircumflex -<dead_circumflex> <C> : "Ĉ" Ccircumflex -<dead_circumflex> <e> : "ê" ecircumflex -<dead_circumflex> <E> : "Ê" Ecircumflex -<dead_circumflex> <g> : "Ä" gcircumflex -<dead_circumflex> <G> : "Äœ" Gcircumflex -<dead_circumflex> <h> : "Ä¥" hcircumflex -<dead_circumflex> <H> : "Ĥ" Hcircumflex -<dead_circumflex> <i> : "î" icircumflex -<dead_circumflex> <I> : "ÃŽ" Icircumflex -<dead_circumflex> <j> : "ĵ" jcircumflex -<dead_circumflex> <J> : "Ä´" Jcircumflex -<dead_circumflex> <minus> : "‾" macron -<dead_circumflex> <o> : "ô" ocircumflex -<dead_circumflex> <O> : "Ô" Ocircumflex -<dead_circumflex> <period> : "·" periodcentered -<dead_circumflex> <s> : "Å" scircumflex -<dead_circumflex> <S> : "Åœ" Scircumflex -<dead_circumflex> <u> : "û" ucircumflex -<dead_circumflex> <U> : "Û" Ucircumflex -<dead_circumflex> <w> : "ŵ" U0175 -<dead_circumflex> <W> : "Å´" U0174 -<dead_circumflex> <y> : "Å·" U0177 -<dead_circumflex> <Y> : "Ŷ" U0176 -<dead_circumflex> <z> : "ẑ" U1e91 -<dead_circumflex> <Z> : "áº" U1e90 -<dead_circumflex> <dead_acute> <a> : "ấ" U1ea5 -<dead_circumflex> <dead_acute> <A> : "Ấ" U1ea4 -<dead_circumflex> <dead_belowdot> <a> : "ậ" U1ead -<dead_circumflex> <dead_belowdot> <A> : "Ậ" U1eac -<dead_circumflex> <dead_grave> <a> : "ầ" U1ea7 -<dead_circumflex> <dead_grave> <A> : "Ầ" U1ea6 -<dead_circumflex> <dead_hook> <a> : "ẩ" U1ea9 -<dead_circumflex> <dead_hook> <A> : "Ẩ" U1ea8 -<dead_circumflex> <dead_tilde> <a> : "ẫ" U1eab -<dead_circumflex> <dead_tilde> <A> : "Ẫ" U1eaa -<dead_circumflex> <dead_acute> <e> : "ế" U1ebf -<dead_circumflex> <dead_acute> <E> : "Ế" U1ebe -<dead_circumflex> <dead_belowdot> <e> : "ệ" U1ec7 -<dead_circumflex> <dead_belowdot> <E> : "Ệ" U1ec6 -<dead_circumflex> <dead_grave> <e> : "á»" U1ec1 -<dead_circumflex> <dead_grave> <E> : "Ề" U1ec0 -<dead_circumflex> <dead_hook> <e> : "ể" U1ec3 -<dead_circumflex> <dead_hook> <E> : "Ể" U1ec2 -<dead_circumflex> <dead_tilde> <e> : "á»…" U1ec5 -<dead_circumflex> <dead_tilde> <E> : "Ễ" U1ec4 -<dead_circumflex> <dead_acute> <o> : "ố" U1ed1 -<dead_circumflex> <dead_acute> <O> : "á»" U1ed0 -<dead_circumflex> <dead_belowdot> <o> : "á»™" U1ed9 -<dead_circumflex> <dead_belowdot> <O> : "Ộ" U1ed8 -<dead_circumflex> <dead_grave> <o> : "ồ" U1ed3 -<dead_circumflex> <dead_grave> <O> : "á»’" U1ed2 -<dead_circumflex> <dead_hook> <o> : "ổ" U1ed5 -<dead_circumflex> <dead_hook> <O> : "á»”" U1ed4 -<dead_circumflex> <dead_tilde> <o> : "á»—" U1ed7 -<dead_circumflex> <dead_tilde> <O> : "á»–" U1ed6 -XCOMM diaeresis -<dead_diaeresis> <a> : "ä" adiaeresis -<dead_diaeresis> <A> : "Ä" Adiaeresis -<dead_diaeresis> <e> : "ë" ediaeresis -<dead_diaeresis> <E> : "Ë" Ediaeresis -<dead_diaeresis> <i> : "ï" idiaeresis -<dead_diaeresis> <I> : "Ã" Idiaeresis -<dead_diaeresis> <o> : "ö" odiaeresis -<dead_diaeresis> <O> : "Ö" Odiaeresis -<dead_diaeresis> <u> : "ü" udiaeresis -<dead_diaeresis> <U> : "Ãœ" Udiaeresis -<dead_diaeresis> <w> : "ẅ" U1e85 -<dead_diaeresis> <W> : "Ẅ" U1e84 -<dead_diaeresis> <y> : "ÿ" ydiaeresis -<dead_diaeresis> <Y> : "Ÿ" Ydiaeresis -XCOMM doubleacute -<dead_doubleacute> <o> : "Å‘" odoubleacute -<dead_doubleacute> <O> : "Å" Odoubleacute -<dead_doubleacute> <u> : "ű" udoubleacute -<dead_doubleacute> <U> : "Å°" Udoubleacute -XCOMM grave -<dead_grave> <a> : "à" agrave -<dead_grave> <A> : "À" Agrave -<dead_grave> <abreve> : "ằ" U1eb1 -<dead_grave> <Abreve> : "Ằ" U1eb0 -<dead_grave> <acircumflex> : "ầ" U1ea7 -<dead_grave> <Acircumflex> : "Ầ" U1ea6 -<dead_grave> <ecircumflex> : "á»" U1ec1 -<dead_grave> <Ecircumflex> : "Ề" U1ec0 -<dead_grave> <e> : "è" egrave -<dead_grave> <E> : "È" Egrave -<dead_grave> <i> : "ì" igrave -<dead_grave> <I> : "ÃŒ" Igrave -<dead_grave> <ocircumflex> : "ồ" U1ed3 -<dead_grave> <Ocircumflex> : "á»’" U1ed2 -<dead_grave> <U01a1> : "á»" U1edd -<dead_grave> <U01a0> : "Ờ" U1edc -<dead_grave> <o> : "ò" ograve -<dead_grave> <O> : "Ã’" Ograve -<dead_grave> <U01b0> : "ừ" U1eeb -<dead_grave> <U01af> : "Ừ" U1eea -<dead_grave> <u> : "ù" ugrave -<dead_grave> <U> : "Ù" Ugrave -<dead_grave> <w> : "áº" U1e81 -<dead_grave> <W> : "Ẁ" U1e80 -<dead_grave> <y> : "ỳ" U1ef3 -<dead_grave> <Y> : "Ỳ" U1ef2 -XCOMM hook (?-shaped accent) -<dead_hook> <a> : "ả" U1ea3 -<dead_hook> <A> : "Ả" U1ea2 -<dead_hook> <abreve> : "ẳ" U1eb3 -<dead_hook> <Abreve> : "Ẳ" U1eb2 -<dead_hook> <acircumflex> : "ẩ" U1ea9 -<dead_hook> <Acircumflex> : "Ẩ" U1ea8 -<dead_hook> <ecircumflex> : "ể" U1ec3 -<dead_hook> <Ecircumflex> : "Ể" U1ec2 -<dead_hook> <e> : "ẻ" U1ebb -<dead_hook> <E> : "Ẻ" U1eba -<dead_hook> <i> : "ỉ" U1ec9 -<dead_hook> <I> : "Ỉ" U1ec8 -<dead_hook> <ocircumflex> : "ổ" U1ed5 -<dead_hook> <Ocircumflex> : "á»”" U1ed4 -<dead_hook> <U01a1> : "ở" U1edf -<dead_hook> <U01a0> : "Ở" U1ede -<dead_hook> <o> : "á»" U1ecf -<dead_hook> <O> : "Ỏ" U1ece -<dead_hook> <U01b0> : "á»­" U1eed -<dead_hook> <U01af> : "Ử" U1eec -<dead_hook> <u> : "ủ" U1ee7 -<dead_hook> <U> : "Ủ" U1ee6 -<dead_hook> <y> : "á»·" U1ef7 -<dead_hook> <Y> : "Ỷ" U1ef6 -XCOMM horn -<dead_horn> <o> : "á»›" U01a1 -<dead_horn> <O> : "Ớ" U01a0 -<dead_horn> <u> : "ứ" U01b0 -<dead_horn> <U> : "Ứ" U01af -<dead_horn> <dead_acute> <o> : "á»›" U1edb -<dead_horn> <dead_acute> <O> : "Ớ" U1eda -<dead_horn> <dead_acute> <u> : "ứ" U1ee9 -<dead_horn> <dead_acute> <U> : "Ứ" U1ee8 -<dead_horn> <dead_belowdot> <o> : "ợ" U1ee3 -<dead_horn> <dead_belowdot> <O> : "Ợ" U1ee2 -<dead_horn> <dead_belowdot> <u> : "á»±" U1ef1 -<dead_horn> <dead_belowdot> <U> : "á»°" U1ef0 -<dead_horn> <dead_grave> <o> : "á»" U1edd -<dead_horn> <dead_grave> <O> : "Ờ" U1edc -<dead_horn> <dead_grave> <u> : "ừ" U1eeb -<dead_horn> <dead_grave> <U> : "Ừ" U1eea -<dead_horn> <dead_hook> <o> : "ở" U1edf -<dead_horn> <dead_hook> <O> : "Ở" U1ede -<dead_horn> <dead_hook> <u> : "á»­" U1eed -<dead_horn> <dead_hook> <U> : "Ử" U1eec -<dead_horn> <dead_tilde> <o> : "ỡ" U1ee1 -<dead_horn> <dead_tilde> <O> : "á» " U1ee0 -<dead_horn> <dead_tilde> <u> : "ữ" U1eef -<dead_horn> <dead_tilde> <U> : "á»®" U1eee -XCOMM macron -<dead_macron> <a> : "Ä" amacron -<dead_macron> <A> : "Ä€" Amacron -<dead_macron> <e> : "Ä“" emacron -<dead_macron> <E> : "Ä’" Emacron -<dead_macron> <i> : "Ä«" imacron -<dead_macron> <I> : "Ī" Imacron -<dead_macron> <o> : "Å" omacron -<dead_macron> <O> : "ÅŒ" Omacron -<dead_macron> <u> : "Å«" umacron -<dead_macron> <U> : "Ū" Umacron -XCOMM ogonek -<dead_ogonek> <a> : "Ä…" aogonek -<dead_ogonek> <A> : "Ä„" Aogonek -<dead_ogonek> <e> : "Ä™" eogonek -<dead_ogonek> <E> : "Ę" Eogonek -<dead_ogonek> <i> : "į" iogonek -<dead_ogonek> <I> : "Ä®" Iogonek -<dead_ogonek> <u> : "ų" uogonek -<dead_ogonek> <U> : "Ų" Uogonek -XCOMM tilde -<dead_tilde> <a> : "ã" atilde -<dead_tilde> <A> : "Ã" Atilde -<dead_tilde> <abreve> : "ẵ" U1eb5 -<dead_tilde> <Abreve> : "Ẵ" U1eb4 -<dead_tilde> <acircumflex> : "ẫ" U1eab -<dead_tilde> <Acircumflex> : "Ẫ" U1eaa -<dead_tilde> <ecircumflex> : "á»…" U1ec5 -<dead_tilde> <Ecircumflex> : "Ễ" U1ec4 -<dead_tilde> <e> : "ẽ" U1ebd -<dead_tilde> <E> : "Ẽ" U1ebc -<dead_tilde> <i> : "Ä©" itilde -<dead_tilde> <I> : "Ĩ" Itilde -<dead_tilde> <n> : "ñ" ntilde -<dead_tilde> <N> : "Ñ" Ntilde -<dead_tilde> <ocircumflex> : "á»—" ocircumflextilde -<dead_tilde> <Ocircumflex> : "á»–" Ocircumflextilde -<dead_tilde> <U01a1> : "ỡ" U1ee1 -<dead_tilde> <U01a0> : "á» " U1ee0 -<dead_tilde> <o> : "õ" otilde -<dead_tilde> <O> : "Õ" Otilde -<dead_tilde> <U01b0> : "ữ" U1eef -<dead_tilde> <U01af> : "á»®" U1eee -<dead_tilde> <u> : "Å©" utilde -<dead_tilde> <U> : "Ũ" Utilde -<dead_tilde> <y> : "ỹ" U1ef9 -<dead_tilde> <Y> : "Ỹ" U1ef8 +XCOMM $XFree86: xc/nls/Compose/en_US.UTF-8,v 1.8 2003/02/25 04:38:32 dawes Exp $ -XCOMM -XCOMM greek -XCOMM -<dead_acute> <dead_diaeresis> <Greek_iota> : "Î" Greek_iotaaccentdieresis -<dead_acute> <dead_diaeresis> <Greek_upsilon> : "ΰ" Greek_upsilonaccentdieresis -<dead_acute> <Greek_alpha> : "ά" Greek_alphaaccent -<dead_acute> <Greek_ALPHA> : "Ά" Greek_ALPHAaccent -<dead_acute> <Greek_epsilon> : "έ" Greek_epsilonaccent -<dead_acute> <Greek_EPSILON> : "Έ" Greek_EPSILONaccent -<dead_acute> <Greek_eta> : "ή" Greek_etaaccent -<dead_acute> <Greek_ETA> : "Ή" Greek_ETAaccent -<dead_acute> <Greek_iota> : "ί" Greek_iotaaccent -<dead_acute> <Greek_IOTA> : "Ί" Greek_IOTAaccent -<dead_acute> <Greek_omega> : "ÏŽ" Greek_omegaaccent -<dead_acute> <Greek_OMEGA> : "Î" Greek_OMEGAaccent -<dead_acute> <Greek_omicron> : "ÏŒ" Greek_omicronaccent -<dead_acute> <Greek_OMICRON> : "ÎŒ" Greek_OMICRONaccent -<dead_acute> <Greek_sigma> : "Ï‚" Greek_finalsmallsigma -<dead_acute> <Greek_upsilon> : "Ï" Greek_upsilonaccent -<dead_acute> <Greek_UPSILON> : "ÎŽ" Greek_UPSILONaccent -<dead_circumflex> <Greek_iota> : "Î" Greek_iotaaccentdieresis -<dead_circumflex> <Greek_upsilon> : "ΰ" Greek_upsilonaccentdieresis -<dead_diaeresis> <Greek_iota> : "ÏŠ" Greek_iotadieresis -<dead_diaeresis> <Greek_IOTA> : "Ϊ" Greek_IOTAdieresis -<dead_diaeresis> <Greek_sigma> : "Ï‚" Greek_finalsmallsigma -<dead_diaeresis> <Greek_upsilon> : "Ï‹" Greek_upsilondieresis -<dead_diaeresis> <Greek_UPSILON> : "Ϋ" Greek_UPSILONdieresis +XCOMM Part 1 - Manual definitions -XCOMM -XCOMM cyrillic -XCOMM -<dead_grave> <Cyrillic_ie> : "Ѐ" U0450 -<dead_grave> <Cyrillic_IE> : "Ð" U0400 -<dead_grave> <Cyrillic_i> : "Ñ" U045d -<dead_grave> <Cyrillic_I> : "Ñ" U040d - -<dead_macron> <Cyrillic_che> : "Ò¹" U04b9 -<dead_macron> <Cyrillic_CHE> : "Ò¸" U04b8 -<dead_cedilla> <Cyrillic_che> : "Ò·" U04b7 -<dead_cedilla> <Cyrillic_CHE> : "Ò¶" U04b6 -XCOMM <Multi_key> <Cyrillic_de> <Cyrillic_je> : "Ñ’" Serbian_dje -XCOMM <Multi_key> <Cyrillic_DE> <Cyrillic_JE> : "Ђ" Serbian_DJE -XCOMM <Multi_key> <Cyrillic_el> <Cyrillic_je> : "Ñ™" Cyrillic_lje -XCOMM <Multi_key> <Cyrillic_EL> <Cyrillic_JE> : "Љ" Cyrillic_LJE -<dead_cedilla> <Cyrillic_en> : "Ò£" U04a3 -<dead_cedilla> <Cyrillic_EN> : "Ò¢" U04a2 -XCOMM <Multi_key> <Cyrillic_en> <Cyrillic_je> : "Ñš" Cyrillic_nje -XCOMM <Multi_key> <Cyrillic_EN> <Cyrillic_JE> : "Њ" Cyrillic_NJE -<dead_acute> <Cyrillic_ghe> <apostrophe> : "Ñ“" Macedonia_gje -<dead_acute> <Cyrillic_GHE> <apostrophe> : "Ѓ" Macedonia_GJE -XCOMM <Multi_key> <Cyrillic_ghe> <bar> : "Ò‘" Ukrainian_ghe_with_upturn -XCOMM <Multi_key> <Cyrillic_GHE> <bar> : "Ò" Ukrainian_GHE_WITH_UPTURN -<dead_macron> <Cyrillic_ghe> : "Ò“" U0493 -<dead_macron> <Cyrillic_GHE> : "Ò’" U0492 -XCOMM <Multi_key> <Cyrillic_ha> <apostrophe> : "Ò»" U04bb -XCOMM <Multi_key> <Cyrillic_HA> <apostrophe> : "Òº" U04ba -<dead_cedilla> <Cyrillic_ha> : "Ò³" U04b3 -<dead_cedilla> <Cyrillic_HA> : "Ò²" U04b2 -XCOMM <Multi_key> <Cyrillic_ie> <Cyrillic_ie> : "Ó™" U04d9 -XCOMM <Multi_key> <Cyrillic_IE> <Cyrillic_IE> : "Ó˜" U04d8 -<dead_macron> <Cyrillic_i> : "Ó£" U04e3 -<dead_macron> <Cyrillic_I> : "Ó¢" U04e2 -XCOMM <Multi_key> <Cyrillic_ka> <bar> : "Ò" U049d -XCOMM <Multi_key> <Cyrillic_KA> <bar> : "Òœ" U049c -<dead_cedilla> <Cyrillic_ka> : "Ò›" U049b -<dead_cedilla> <Cyrillic_KA> : "Òš" U049a -XCOMM <Multi_key> <Cyrillic_o> <minus> : "Ó©" U04e9 -XCOMM <Multi_key> <Cyrillic_O> <minus> : "Ó¨" U04e8 -<dead_cedilla> <Cyrillic_sha> : "щ" Cyrillic_shcha -<dead_cedilla> <Cyrillic_SHA> : "Щ" Cyrillic_SHCHA -XCOMM <Multi_key> <Cyrillic_shorti> <Cyrillic_a> : "Ñ" Cyrillic_ya -XCOMM <Multi_key> <Cyrillic_SHORTI> <Cyrillic_A> : "Я" Cyrillic_YA -<dead_diaeresis> <Cyrillic_ie> : "Ñ‘" Cyrillic_io -<dead_diaeresis> <Cyrillic_IE> : "Ð" Cyrillic_IO -XCOMM <Multi_key> <Cyrillic_shorti> <Cyrillic_u> : "ÑŽ" Cyrillic_yu -XCOMM <Multi_key> <Cyrillic_SHORTI> <Cyrillic_U> : "Ю" Cyrillic_YU -XCOMM <Multi_key> <Cyrillic_u> <apostrophe> : "Ò¯" U04af -XCOMM <Multi_key> <Cyrillic_U> <apostrophe> : "Ò®" U04ae -XCOMM <Multi_key> <Cyrillic_u> <bar> : "Ò¯" U04af -XCOMM <Multi_key> <Cyrillic_U> <bar> : "Ò®" U04ae -XCOMM <Multi_key> <Cyrillic_u> <comma> : "Ò±" U04b1 -XCOMM <Multi_key> <Cyrillic_U> <comma> : "Ò°" U04b0 -<dead_macron> <Cyrillic_u> : "Ó¯" U04ef -<dead_macron> <Cyrillic_U> : "Ó®" U04ee -XCOMM <Multi_key> <Cyrillic_u> <slash> : "Ò±" Cyrillic_u_straight_bar -XCOMM <Multi_key> <Cyrillic_U> <slash> : "Ò°" Cyrillic_U_straight_bat -<dead_cedilla> <Cyrillic_zhe> : "Ò—" U0497 -<dead_cedilla> <Cyrillic_ZHE> : "Ò–" U0496 - -XCOMM dead keys producing accents and the like -<dead_abovedot> <space> : "Ë™" abovedot -<dead_abovedot> <dead_abovedot> : "" abovedot -<dead_abovering> <space> : "°" degree -<dead_abovering> <dead_abovering> : "°" ring -<dead_acute> <space> : "'" apostrophe -<dead_acute> <dead_acute> : "´" acute -<dead_caron> <space> : "ˇ" caron -<dead_caron> <dead_caron> : "ˇ" caron -<dead_cedilla> <space> : "¸" cedilla -<dead_cedilla> <dead_cedilla> : "¸" cedilla -<dead_circumflex> <dead_circumflex> : "^" asciicircum -<dead_diaeresis> <space> : "\"" quotedbl -<dead_diaeresis> <dead_diaeresis> : "¨" diaeresis -<dead_doubleacute> <space> : "Ë" doubleacute -<dead_doubleacute> <dead_doubleacute> : "Ë" doubleacute -<dead_grave> <space> : "`" grave -<dead_grave> <dead_grave> : "`" grave -<dead_macron> <space> : "‾" macron -<dead_macron> <dead_macron> : "‾" macron -<dead_ogonek> <space> : "Ë›" ogonek -<dead_ogonek> <dead_ogonek> : "Ë›" ogonek -<dead_tilde> <space> : "~" asciitilde -<dead_tilde> <dead_tilde> : "~" asciitilde - -XCOMM inuit-cree syllabics -<dead_abovedot> <U1403> : "á„" U1404 -<dead_abovedot> <U1405> : "á†" U1406 -<dead_abovedot> <U140a> : "á‹" U140b -<dead_abovedot> <U1431> : "á²" U1432 -<dead_abovedot> <U1433> : "á´" U1434 -<dead_abovedot> <U1438> : "á¹" U1439 -<dead_abovedot> <U144e> : "á‘" U144f -<dead_abovedot> <U1450> : "á‘‘" U1451 -<dead_abovedot> <U1455> : "á‘–" U1456 -<dead_abovedot> <U146d> : "á‘®" U146e -<dead_abovedot> <U146f> : "á‘°" U1470 -<dead_abovedot> <U1472> : "ᑳ" U1473 -<dead_abovedot> <U148b> : "á’Œ" U148c -<dead_abovedot> <U148d> : "á’Ž" U148e -<dead_abovedot> <U1490> : "á’‘" U1491 -<dead_abovedot> <U14a5> : "á’¦" U14a6 -<dead_abovedot> <U14a7> : "á’¨" U14a8 -<dead_abovedot> <U14aa> : "á’«" U14ab -<dead_abovedot> <U14c2> : "ᓃ" U14c3 -<dead_abovedot> <U14c4> : "á“…" U14c5 -<dead_abovedot> <U14c7> : "ᓈ" U14c8 -<dead_abovedot> <U14d5> : "á“–" U14d6 -<dead_abovedot> <U14d7> : "ᓘ" U14d8 -<dead_abovedot> <U14da> : "á“›" U14db -<dead_abovedot> <U14ef> : "á“°" U14f0 -<dead_abovedot> <U14f1> : "ᓲ" U14f2 -<dead_abovedot> <U14f4> : "ᓵ" U14f5 -<dead_abovedot> <U1528> : "ᔩ" U1529 -<dead_abovedot> <U152a> : "ᔫ" U152b -<dead_abovedot> <U152d> : "á”®" U152e -<dead_abovedot> <U1546> : "ᕇ" U1547 -<dead_abovedot> <U1548> : "ᕉ" U1549 -<dead_abovedot> <U154b> : "á•Œ" U154c -<dead_abovedot> <U1555> : "á•–" U1556 -<dead_abovedot> <U1557> : "ᕘ" U1558 -<dead_abovedot> <U1559> : "á•š" U155a -<dead_abovedot> <U1575> : "ᕶ" U1576 -<dead_abovedot> <U1577> : "ᕸ" U1578 -<dead_abovedot> <U1579> : "ᕺ" U157a -<dead_abovedot> <U157f> : "á–€" U1580 -<dead_abovedot> <U1581> : "á–‚" U1582 -<dead_abovedot> <U1583> : "á–„" U1584 -<dead_abovedot> <U158f> : "á–" U1590 -<dead_abovedot> <U1591> : "á–’" U1592 -<dead_abovedot> <U1593> : "á–”" U1594 -<dead_abovedot> <U15a0> : "á–¡" U15a1 -<dead_abovedot> <U15a2> : "á–£" U15a3 -<dead_abovedot> <U15a4> : "á–¥" U15a5 -<dead_abovedot> <U1671> : "ᙲ" U1672 -<dead_abovedot> <U1673> : "á™´" U1674 -<dead_abovedot> <U1675> : "ᙶ" U1676 +XCOMM Spacing versions of dead accents +<dead_tilde> <space> : "~" asciitilde +<dead_tilde> <dead_tilde> : "~" asciitilde +<dead_acute> <space> : "'" apostrophe +<dead_acute> <dead_acute> : "´" acute +<dead_grave> <space> : "`" grave +<dead_grave> <dead_grave> : "`" grave +<dead_circumflex> <space> : "^" asciicircum +<dead_circumflex> <dead_circumflex> : "^" asciicircum +<dead_abovering> <space> : "°" degree +<dead_abovering> <dead_abovering> : "°" degree +<dead_macron> <space> : "¯" macron +<dead_macron> <dead_macron> : "¯" macron +<dead_breve> <space> : "˘" breve +<dead_breve> <dead_breve> : "˘" breve +<dead_abovedot> <space> : "Ë™" abovedot +<dead_abovedot> <dead_abovedot> : "Ë™" abovedot +<dead_diaeresis> <dead_diaeresis> : "¨" diaeresis +<dead_diaeresis> <space> : "¨" diaeresis +<dead_doubleacute> <space> : "Ë" U2dd +<dead_doubleacute> <dead_doubleacute> : "Ë" U2dd +<dead_caron> <space> : "ˇ" caron +<dead_caron> <dead_caron> : "ˇ" caron +<dead_cedilla> <space> : "¸" cedilla +<dead_cedilla> <dead_cedilla> : "¸" cedilla +<dead_ogonek> <dead_space> : "Ë›" ogonek +<dead_ogonek> <dead_ogonek> : "Ë›" ogonek +<dead_iota> <dead_space> : "ͺ" U37a +<dead_iota> <dead_iota> : "ͺ" U37a -XCOMM -XCOMM latin alphabet & misc -XCOMM -<Multi_key> <0> <s> : "§" section -<Multi_key> <0> <S> : "§" section -<Multi_key> <0> <x> : "¤" currency -<Multi_key> <0> <X> : "¤" currency -<Multi_key> <1> <2> : "½" onehalf -<Multi_key> <1> <4> : "¼" onequarter -<Multi_key> <1> <s> : "¹" onesuperior -<Multi_key> <1> <S> : "¹" onesuperior -<Multi_key> <2> <s> : "²" twosuperior -<Multi_key> <2> <S> : "²" twosuperior -<Multi_key> <3> <4> : "¾" threequarters -<Multi_key> <3> <s> : "³" threesuperior -<Multi_key> <3> <S> : "³" threesuperior -<Multi_key> <a> <0> : "Ã¥" aring -<Multi_key> <A> <0> : "Ã…" Aring -<Multi_key> <a> <a> : "Ã¥" aring -<Multi_key> <A> <A> : "Ã…" Aring -<Multi_key> <a> <t> : "@" at -<Multi_key> <A> <T> : "@" at -<Multi_key> <a> <apostrophe> : "á" aacute -<Multi_key> <A> <apostrophe> : "Ã" Aacute -<Multi_key> <a> <asciicircum> : "â" acircumflex -<Multi_key> <A> <asciicircum> : "Â" Acircumflex -<Multi_key> <a> <asciitilde> : "ã" atilde -<Multi_key> <A> <asciitilde> : "Ã" Atilde -<Multi_key> <a> <asterisk> : "Ã¥" aring -<Multi_key> <A> <asterisk> : "Ã…" Aring -<Multi_key> <a> <colon> : "ä" adiaeresis -<Multi_key> <A> <colon> : "Ä" Adiaeresis -<Multi_key> <a> <e> : "æ" ae -<Multi_key> <A> <E> : "Æ" AE -<Multi_key> <a> <grave> : "à" agrave -<Multi_key> <A> <grave> : "À" Agrave -<Multi_key> <a> <greater> : "â" acircumflex -<Multi_key> <A> <greater> : "Â" Acircumflex -<Multi_key> <a> <minus> : "Ä" amacron -<Multi_key> <A> <minus> : "Ä€" Amacron -<Multi_key> <a> <o> : "Ã¥" aring -<Multi_key> <A> <O> : "Ã…" Aring -<Multi_key> <apostrophe> <apostrophe> : "â€" U201d -<Multi_key> <apostrophe> <greater> : "’" U2019 -<Multi_key> <apostrophe> <less> : "‘" U2018 -<Multi_key> <a> <quotedbl> : "ä" adiaeresis -<Multi_key> <A> <quotedbl> : "Ä" Adiaeresis -<Multi_key> <asciicircum> <0> : "°" degree -<Multi_key> <asciicircum> <1> : "¹" onesuperior -<Multi_key> <asciicircum> <2> : "²" twosuperior -<Multi_key> <asciicircum> <3> : "³" threesuperior -<Multi_key> <asciicircum> <exclam> : "¦" brokenbar -<Multi_key> <asciicircum> <minus> : "‾" macron -<Multi_key> <asciicircum> <period> : "·" periodcentered -<Multi_key> <asciicircum> <slash> : "|" bar -<Multi_key> <asciicircum> <underscore> : "‾" macron -<Multi_key> <a> <semicolon> : "Ä…" aogonek -<Multi_key> <A> <semicolon> : "Ä„" Aogonek -<<Multi_key> <bar> <bar> : "¦" brokenbar -<Multi_key> <bar> <c> : "¢" cent -<Multi_key> <bar> <C> : "¢" cent -<Multi_key> <b> <period> : "ḃ" U1e03 -<Multi_key> <B> <period> : "Ḃ" U1e02 -<Multi_key> <b> <v> : "¦" brokenbar -<Multi_key> <B> <V> : "¦" brokenbar -<Multi_key> <c> <apostrophe> : "ć" cacute -<Multi_key> <C> <apostrophe> : "Ć" Cacute -<Multi_key> <c> <asciicircum> : "ĉ" ccircumflex -<Multi_key> <C> <asciicircum> : "Ĉ" Ccircumflex -<Multi_key> <c> <bar> : "¢" cent -<Multi_key> <C> <bar> : "¢" cent -<Multi_key> <c> <comma> : "ç" ccedilla -<Multi_key> <C> <comma> : "Ç" Ccedilla -<Multi_key> <C> <equal> : "€" EuroSign -<Multi_key> <c> <greater> : "ĉ" ccircumflex -<Multi_key> <C> <greater> : "Ĉ" Ccircumflex -<Multi_key> <c> <less> : "Ä" ccaron -<Multi_key> <C> <less> : "ÄŒ" Ccaron -<Multi_key> <c> <o> : "©" copyright -<Multi_key> <c> <O> : "©" copyright -<Multi_key> <C> <o> : "©" copyright -<Multi_key> <C> <O> : "©" copyright -<Multi_key> <colon> <minus> : "÷" division -<Multi_key> <comma> <comma> : "„" U201e -<Multi_key> <comma> <greater> : "‚" U201a -<Multi_key> <comma> <minus> : "¬" notsign -<Multi_key> <comma> <quotedbl> : "„" U201e -<Multi_key> <c> <period> : "Ä‹" cabovedot -<Multi_key> <C> <period> : "ÄŠ" Cabovedot -<Multi_key> <c> <slash> : "¢" cent -<Multi_key> <C> <slash> : "¢" cent -<Multi_key> <d> <h> : "ð" eth -<Multi_key> <D> <H> : "Ã" ETH -<Multi_key> <d> <less> : "Ä" dcaron -<Multi_key> <D> <less> : "ÄŽ" Dcaron -<Multi_key> <d> <minus> : "Ä‘" dstroke -<Multi_key> <D> <minus> : "Ä" Dstroke -<Multi_key> <d> <period> : "ḋ" U1e0b -<Multi_key> <D> <period> : "Ḋ" U1e0a -<Multi_key> <e> <apostrophe> : "é" eacute -<Multi_key> <E> <apostrophe> : "É" Eacute -<Multi_key> <e> <asciicircum> : "ê" ecircumflex -<Multi_key> <E> <asciicircum> : "Ê" Ecircumflex -<Multi_key> <e> <e> : "É™" U0259 -<Multi_key> <E> <E> : "Æ" U018f -<Multi_key> <e> <equal> : "€" EuroSign -<Multi_key> <E> <equal> : "€" EuroSign -<Multi_key> <e> <grave> : "è" egrave -<Multi_key> <E> <grave> : "È" Egrave -<Multi_key> <e> <greater> : "ê" ecircumflex -<Multi_key> <E> <greater> : "Ê" Ecircumflex -<Multi_key> <e> <less> : "Ä›" ecaron -<Multi_key> <E> <less> : "Äš" Ecaron -<Multi_key> <e> <minus> : "Ä“" emacron -<Multi_key> <E> <minus> : "Ä’" Emacron -<Multi_key> <e> <period> : "Ä—" eabovedot -<Multi_key> <E> <period> : "Ä–" Eabovedot -<Multi_key> <equal> <C> : "€" EuroSign -<Multi_key> <equal> <e> : "€" EuroSign -<Multi_key> <equal> <l> : "£" sterling -<Multi_key> <equal> <L> : "£" sterling -<Multi_key> <equal> <y> : "Â¥" yen -<Multi_key> <equal> <Y> : "Â¥" yen -<Multi_key> <e> <quotedbl> : "ë" ediaeresis -<Multi_key> <E> <quotedbl> : "Ë" Ediaeresis -<Multi_key> <e> <semicolon> : "Ä™" eogonek -<Multi_key> <E> <semicolon> : "Ę" Eogonek -<Multi_key> <exclam> <asciicircum> : "¦" brokenbar -<Multi_key> <exclam> <exclam> : "¡" exclamdown -<Multi_key> <exclam> <p> : "¶" paragraph -<Multi_key> <exclam> <P> : "¶" paragraph -<Multi_key> <exclam> <s> : "§" section -<Multi_key> <exclam> <S> : "§" section -<Multi_key> <f> <period> : "ḟ" U1e1f -<Multi_key> <F> <period> : "Ḟ" U1e1e -<Multi_key> <g> <asciicircum> : "Ä" gcircumflex -<Multi_key> <G> <asciicircum> : "Äœ" Gcircumflex -<Multi_key> <g> <comma> : "Ä£" gcedilla -<Multi_key> <G> <comma> : "Ä¢" Gcedilla -<Multi_key> <g> <greater> : "Ä" gcircumflex -<Multi_key> <G> <greater> : "Äœ" Gcircumflex -<Multi_key> <g> <less> : "ǧ" U01e7 -<Multi_key> <G> <less> : "Ǧ" U01e6 -<Multi_key> <g> <parenleft> : "ÄŸ" gbreve -<Multi_key> <G> <parenleft> : "Äž" Gbreve -<Multi_key> <g> <period> : "Ä¡" U0121 -<Multi_key> <G> <period> : "Ä " U0120 -<Multi_key> <grave> <grave> : "“" U201c -<Multi_key> <greater> <apostrophe> : "‚" U201a -<Multi_key> <greater> <greater> : "»" guillemotright -<Multi_key> <greater> <quotedbl> : "„" U201e -<Multi_key> <h> <asciicircum> : "Ä¥" hcircumflex -<Multi_key> <H> <asciicircum> : "Ĥ" Hcircumflex -<Multi_key> <h> <greater> : "Ä¥" hcircumflex -<Multi_key> <H> <greater> : "Ĥ" Hcircumflex -<Multi_key> <h> <minus> : "ħ" hstroke -<Multi_key> <H> <minus> : "Ħ" Hstroke -<Multi_key> <h> <slash> : "ħ" hstroke -<Multi_key> <H> <slash> : "Ħ" Hstroke -<Multi_key> <i> <apostrophe> : "í" iacute -<Multi_key> <I> <apostrophe> : "Ã" Iacute -<Multi_key> <i> <asciicircum> : "î" icircumflex -<Multi_key> <I> <asciicircum> : "ÃŽ" Icircumflex -<Multi_key> <i> <asciitilde> : "Ä©" itilde -<Multi_key> <I> <asciitilde> : "Ĩ" Itilde -<Multi_key> <i> <grave> : "ì" igrave -<Multi_key> <I> <grave> : "ÃŒ" Igrave -<Multi_key> <i> <greater> : "î" icircumflex -<Multi_key> <I> <greater> : "ÃŽ" Icircumflex -<Multi_key> <i> <minus> : "Ä«" imacron -<Multi_key> <I> <minus> : "Ī" Imacron -<Multi_key> <I> <period> : "Ä°" Iabovedot -<Multi_key> <i> <period> : "ı" idotless -<Multi_key> <i> <quotedbl> : "ï" idiaeresis -<Multi_key> <I> <quotedbl> : "Ã" Idiaeresis -<Multi_key> <i> <semicolon> : "į" iogonek -<Multi_key> <I> <semicolon> : "Ä®" Iogonek -<Multi_key> <j> <asciicircum> : "ĵ" jcircumflex -<Multi_key> <J> <asciicircum> : "Ä´" Jcircumflex -<Multi_key> <j> <greater> : "ĵ" jcircumflex -<Multi_key> <J> <greater> : "Ä´" Jcircumflex -<Multi_key> <k> <comma> : "Ä·" kcedilla -<Multi_key> <K> <comma> : "Ķ" Kcedilla -<Multi_key> <k> <k> : "ĸ" kra -<Multi_key> <l> <apostrophe> : "ĺ" lacute -<Multi_key> <L> <apostrophe> : "Ĺ" Lacute -<Multi_key> <l> <comma> : "ļ" lcedilla -<Multi_key> <L> <comma> : "Ä»" Lcedilla -<Multi_key> <l> <equal> : "£" sterling -<Multi_key> <L> <equal> : "£" sterling -<Multi_key> <less> <apostrophe> : "‛" U201b -<Multi_key> <less> <less> : "«" guillemotleft -<Multi_key> <less> <quotedbl> : "‟" U201f -<Multi_key> <less> <slash> : "\\" backslash -<Multi_key> <l> <less> : "ľ" lcaron -<Multi_key> <L> <less> : "Ľ" Lcaron -<Multi_key> <l> <minus> : "£" sterling -<Multi_key> <L> <minus> : "£" sterling -<Multi_key> <l> <slash> : "Å‚" lstroke -<Multi_key> <L> <slash> : "Å" Lstroke -<Multi_key> <l> <v> : "|" bar -<Multi_key> <L> <V> : "|" bar -<Multi_key> <minus> <colon> : "÷" division -<Multi_key> <minus> <comma> : "¬" notsign -<Multi_key> <minus> <l> : "£" sterling -<Multi_key> <minus> <L> : "£" sterling -<Multi_key> <minus> <minus> : "­" hyphen -<Multi_key> <minus> <parenleft> : "{" braceleft -<Multi_key> <minus> <parenright> : "}" braceright -<Multi_key> <minus> <plus> : "∓" U2213 -<Multi_key> <minus> <y> : "Â¥" yen -<Multi_key> <minus> <Y> : "Â¥" yen -<Multi_key> <m> <period> : "á¹" U1e41 -<Multi_key> <M> <period> : "á¹€" U1e40 -<Multi_key> <m> <u> : "µ" mu -<Multi_key> <M> <y> : "µ" mu -<Multi_key> <n> <apostrophe> : "Å„" nacute -<Multi_key> <N> <apostrophe> : "Ń" Nacute -<Multi_key> <n> <asciitilde> : "ñ" ntilde -<Multi_key> <N> <asciitilde> : "Ñ" Ntilde -<Multi_key> <n> <comma> : "ņ" ncedilla -<Multi_key> <N> <comma> : "Å…" Ncedilla -<Multi_key> <n> <g> : "Å‹" eng -<Multi_key> <N> <G> : "ÅŠ" ENG -<Multi_key> <n> <less> : "ň" ncaron -<Multi_key> <N> <less> : "Ň" Ncaron -<Multi_key> <o> <apostrophe> : "ó" oacute -<Multi_key> <O> <apostrophe> : "Ó" Oacute -<Multi_key> <o> <asciicircum> : "ô" ocircumflex -<Multi_key> <O> <asciicircum> : "Ô" Ocircumflex -<Multi_key> <o> <asciitilde> : "õ" otilde -<Multi_key> <O> <asciitilde> : "Õ" Otilde +XCOMM ASCII characters that may be difficult to access +XCOMM on some keyboards. +<Multi_key> <plus> <plus> : "#" numbersign +<Multi_key> <apostrophe> <space> : "'" apostrophe +<Multi_key> <space> <apostrophe> : "'" apostrophe +<Multi_key> <A> <T> : "@" at +<Multi_key> <parenleft> <parenleft> : "[" bracketleft +<Multi_key> <slash> <slash> : "\\" backslash +<Multi_key> <slash> <less> : "\\" backslash +<Multi_key> <less> <slash> : "\\" backslash +<Multi_key> <parenright> <parenright> : "]" bracketright + +<Multi_key> <asciicircum> <space> : "^" asciicircum +<Multi_key> <space> <asciicircum> : "^" asciicircum +<Multi_key> <greater> <space> : "^" asciicircum +<Multi_key> <space> <greater> : "^" asciicircum + +<Multi_key> <grave> <space> : "`" grave +<Multi_key> <space> <grave> : "`" grave + +<Multi_key> <parenleft> <minus> : "{" braceleft +<Multi_key> <minus> <parenleft> : "{" braceleft + +<Multi_key> <slash> <asciicircum> : "|" bar +<Multi_key> <asciicircum> <slash> : "|" bar +<Multi_key> <V> <L> : "|" bar +<Multi_key> <L> <V> : "|" bar +<Multi_key> <v> <l> : "|" bar +<Multi_key> <l> <v> : "|" bar + +<Multi_key> <parenright> <minus> : "}" braceright +<Multi_key> <minus> <parenright> : "}" braceright + +<Multi_key> <asciitilde> <space> : "~" asciitilde +<Multi_key> <space> <asciitilde> : "~" asciitilde +<Multi_key> <minus> <space> : "~" asciitilde +<Multi_key> <space> <minus> : "~" asciitilde + +XCOMM Spaces +<Multi_key> <space> <space> : " " nobreakspace # NO-BREAK SPACE +<Multi_key> <space> <period>: " " U2008 # PUNCTUATION SPACE + <Multi_key> <o> <c> : "©" copyright <Multi_key> <o> <C> : "©" copyright <Multi_key> <O> <c> : "©" copyright <Multi_key> <O> <C> : "©" copyright -<Multi_key> <o> <e> : "Å“" oe -<Multi_key> <O> <E> : "Å’" OE -<Multi_key> <o> <grave> : "ò" ograve -<Multi_key> <O> <grave> : "Ã’" Ograve -<Multi_key> <o> <greater> : "ô" ocircumflex -<Multi_key> <O> <greater> : "Ô" Ocircumflex -<Multi_key> <o> <less> : "Ç’" ocaron -<Multi_key> <O> <less> : "Ç‘" Ocaron -<Multi_key> <o> <minus> : "Å" omacron -<Multi_key> <O> <minus> : "ÅŒ" Omacron -<Multi_key> <o> <quotedbl> : "Å‘" odoubleacute -<Multi_key> <O> <quotedbl> : "Å" Odoubleacute -<Multi_key> <o> <colon> : "ö" odiaeresis -<Multi_key> <O> <colon> : "Ö" Odiaeresis + +<Multi_key> <o> <r> : "®" registered +<Multi_key> <o> <R> : "®" registered +<Multi_key> <O> <r> : "®" registered <Multi_key> <O> <R> : "®" registered -<Multi_key> <o> <slash> : "ø" oslash -<Multi_key> <O> <slash> : "Ø" Ooblique -<Multi_key> <o> <s> : "§" section -<Multi_key> <O> <S> : "§" section -<Multi_key> <o> <underscore> : "á»" U1ecd -<Multi_key> <O> <underscore> : "Ọ" U1ecc -<Multi_key> <o> <x> : "¤" currency -<Multi_key> <o> <X> : "¤" currency -<Multi_key> <O> <x> : "¤" currency -<Multi_key> <O> <X> : "¤" currency -<Multi_key> <parenleft> <c> : "©" copyright -<Multi_key> <parenleft> <C> : "©" copyright -<Multi_key> <parenleft> <minus> : "{" braceleft -<Multi_key> <parenleft> <parenleft> : "[" bracketleft -<Multi_key> <parenleft> <r> : "®" registered -<Multi_key> <parenright> <minus> : "}" braceright -<Multi_key> <parenright> <parenright> : "]" bracketright + <Multi_key> <period> <greater> : "›" U203a <Multi_key> <period> <less> : "‹" U2039 -<Multi_key> <period> <period> : "·" periodcentered +<Multi_key> <period> <period> : "·" U00B7 +<Multi_key> <exclam> <asciicircum> : "¦" brokenbar +<Multi_key> <exclam> <exclam> : "¡" exclamdown <Multi_key> <p> <exclam> : "¶" paragraph <Multi_key> <P> <exclam> : "¶" paragraph <Multi_key> <plus> <minus> : "±" plusminus -<Multi_key> <plus> <plus> : "#" numbersign -<Multi_key> <p> <period> : "á¹—" U1e57 -<Multi_key> <P> <period> : "á¹–" U1e56 <Multi_key> <question> <question> : "¿" questiondown -<Multi_key> <quotedbl> <backslash> : "ã€" U301d -<Multi_key> <quotedbl> <greater> : "â€" U201d -<Multi_key> <quotedbl> <less> : "“" U201c -XCOMM <Multi_key> <quotedbl> <quotedbl> : "" diaeresis -<Multi_key> <quotedbl> <slash> : "〞" U301e -<Multi_key> <r> <apostrophe> : "Å•" racute -<Multi_key> <R> <apostrophe> : "Å”" Racute -<Multi_key> <r> <comma> : "Å—" rcedilla -<Multi_key> <R> <comma> : "Å–" Rcedilla -<Multi_key> <r> <less> : "Å™" rcaron -<Multi_key> <R> <less> : "Ř" Rcaron -<Multi_key> <R> <O> : "®" registered -<Multi_key> <s> <0> : "§" section -<Multi_key> <S> <0> : "§" section -<Multi_key> <s> <apostrophe> : "Å›" sacute -<Multi_key> <S> <apostrophe> : "Åš" Sacute -<Multi_key> <s> <asciicircum> : "Å" scircumflex -<Multi_key> <S> <asciicircum> : "Åœ" Scircumflex -XCOMM comma is used for cedilla, underscore for comma below -<Multi_key> <s> <comma> : "ÅŸ" scedilla -<Multi_key> <S> <comma> : "Åž" Scedilla -<Multi_key> <s> <underscore> : "È™" U0219 -<Multi_key> <S> <underscore> : "Ș" U0218 -<Multi_key> <s> <exclam> : "§" section -<Multi_key> <S> <exclam> : "§" section -<Multi_key> <s> <less> : "Å¡" scaron -<Multi_key> <S> <less> : "Å " Scaron -<Multi_key> <s> <greater> : "Å" scircumflex -<Multi_key> <S> <greater> : "Åœ" Scircumflex -<Multi_key> <slash> <asciicircum> : "|" bar -<Multi_key> <slash> <c> : "¢" cent -<Multi_key> <slash> <C> : "¢" cent -<Multi_key> <slash> <less> : "\\" backslash -<Multi_key> <slash> <l> : "Å‚" lstroke -<Multi_key> <slash> <L> : "Å" Lstroke -<Multi_key> <slash> <o> : "ø" oslash -<Multi_key> <slash> <O> : "Ø" Ooblique -<Multi_key> <slash> <quotedbl> : "〟" U301f -<Multi_key> <slash> <slash> : "\\" backslash -<Multi_key> <s> <o> : "§" section -<Multi_key> <S> <O> : "§" section -<Multi_key> <space> <space> : " " nobreakspace -<Multi_key> <s> <period> : "ṡ" U1e61 -<Multi_key> <S> <period> : "á¹ " U1e60 +<Multi_key> <e> <e> : "Æ" U018f +<Multi_key> <minus> <d> : "Ä‘" dstroke +<Multi_key> <minus> <D> : "Ä" Dstroke <Multi_key> <s> <s> : "ß" ssharp -XCOMM comma is used for cedilla, underscore for comma below -<Multi_key> <t> <comma> : "Å£" tcedilla -<Multi_key> <T> <comma> : "Å¢" Tcedilla -<Multi_key> <t> <underscore> : "È›" U021b -<Multi_key> <T> <underscore> : "Èš" U021a -<Multi_key> <t> <h> : "þ" thorn -<Multi_key> <T> <H> : "Þ" THORN -<Multi_key> <t> <less> : "Å¥" tcaron -<Multi_key> <T> <less> : "Ť" Tcaron -<Multi_key> <t> <m> : "â„¢" trademark -<Multi_key> <T> <M> : "â„¢" trademark -<Multi_key> <t> <minus> : "ŧ" U0167 -<Multi_key> <T> <minus> : "Ŧ" U0166 -<Multi_key> <t> <period> : "ṫ" U1e6b -<Multi_key> <T> <period> : "Ṫ" U1e6a -<Multi_key> <t> <slash> : "ŧ" U0167 -<Multi_key> <T> <slash> : "Ŧ" U0166 -<Multi_key> <u> <apostrophe> : "ú" uacute -<Multi_key> <U> <apostrophe> : "Ú" Uacute -<Multi_key> <u> <asciicircum> : "û" ucircumflex -<Multi_key> <U> <asciicircum> : "Û" Ucircumflex -<Multi_key> <u> <asciitilde> : "Å©" utilde -<Multi_key> <U> <asciitilde> : "Ũ" Utilde -<Multi_key> <u> <asterisk> : "ů" uring -<Multi_key> <U> <asterisk> : "Å®" Uring -<Multi_key> <u> <0> : "ů" uring -<Multi_key> <U> <0> : "Å®" Uring -<Multi_key> <u> <grave> : "ù" ugrave -<Multi_key> <U> <grave> : "Ù" Ugrave -<Multi_key> <u> <greater> : "û" ucircumflex -<Multi_key> <U> <greater> : "Û" Ucircumflex -<Multi_key> <u> <less> : "Ç”" U01d4 -<Multi_key> <U> <less> : "Ç“" U01d3 -<Multi_key> <u> <minus> : "Å«" umacron -<Multi_key> <U> <minus> : "Ū" Umacron -<Multi_key> <underscore> <a> : "ª" ordfeminine -<Multi_key> <underscore> <A> : "ª" ordfeminine -<Multi_key> <underscore> <o> : "º" masculine -<Multi_key> <underscore> <O> : "º" masculine -<Multi_key> <u> <parenleft> : "Å­" ubreve -<Multi_key> <U> <parenleft> : "Ŭ" Ubreve -<Multi_key> <u> <colon> : "ü" udiaeresis -<Multi_key> <U> <colon> : "Ãœ" Udiaeresis -<Multi_key> <u> <quotedbl> : "ű" udoubleacute -<Multi_key> <U> <quotedbl> : "Å°" Udoubleacute -<Multi_key> <u> <semicolon> : "ų" uogonek -<Multi_key> <U> <semicolon> : "Ų" Uogonek -<Multi_key> <w> <asciicircum> : "ŵ" U0175 -<Multi_key> <W> <asciicircum> : "Å´" U0174 -<Multi_key> <w> <colon> : "ẅ" U01e85 -<Multi_key> <W> <colon> : "Ẅ" U01e84 -<Multi_key> <W> <grave> : "áº" U1e81 -<Multi_key> <W> <grave> : "Ẁ" U1e80 -<Multi_key> <w> <greater> : "ŵ" U0175 -<Multi_key> <W> <greater> : "Å´" U0174 -<Multi_key> <w> <quotedbl> : "ẅ" U01e85 -<Multi_key> <W> <quotedbl> : "Ẅ" U01e84 -<Multi_key> <x> <0> : "¤" currency -<Multi_key> <X> <0> : "¤" currency -<Multi_key> <x> <o> : "¤" currency -<Multi_key> <x> <O> : "¤" currency -<Multi_key> <X> <o> : "¤" currency -<Multi_key> <X> <O> : "¤" currency -<Multi_key> <x> <x> : "×" multiply -<Multi_key> <y> <apostrophe> : "ý" yacute -<Multi_key> <Y> <apostrophe> : "Ã" Yacute -<Multi_key> <y> <asciicircum> : "Å·" U0177 -<Multi_key> <Y> <asciicircum> : "Ŷ" U0176 -<Multi_key> <y> <colon> : "ÿ" ydiaeresis -<Multi_key> <Y> <colon> : "Ÿ" Ydiaeresis -<Multi_key> <y> <equal> : "Â¥" yen -<Multi_key> <Y> <equal> : "Â¥" yen -<Multi_key> <y> <grave> : "ỳ" ygrave -<Multi_key> <Y> <grave> : "Ỳ" Ygrave -<Multi_key> <y> <greater> : "Å·" U0177 -<Multi_key> <Y> <greater> : "Ŷ" U0176 -<Multi_key> <y> <minus> : "Â¥" yen -<Multi_key> <Y> <minus> : "Â¥" yen -<Multi_key> <y> <quotedbl> : "ÿ" ydiaeresis -<Multi_key> <Y> <quotedbl> : "Ÿ" Ydiaeresis -<Multi_key> <z> <asciicircum> : "ẑ" U1e91 -<Multi_key> <Z> <asciicircum> : "áº" U1e90 -<Multi_key> <z> <apostrophe> : "ź" zacute -<Multi_key> <Z> <apostrophe> : "Ź" Zacute -<Multi_key> <z> <greater> : "ẑ" U1e91 -<Multi_key> <Z> <greater> : "áº" U1e90 -<Multi_key> <z> <less> : "ž" zcaron -<Multi_key> <Z> <less> : "Ž" Zcaron -<Multi_key> <z> <period> : "ż" zabovedot -<Multi_key> <Z> <period> : "Å»" Zabovedot -XCOMM -XCOMM greek -XCOMM -<Multi_key> <Greek_alpha> <apostrophe> : "ά" Greek_alphaaccent -<Multi_key> <Greek_ALPHA> <apostrophe> : "Ά" Greek_ALPHAaccent -<Multi_key> <Greek_epsilon> <apostrophe>: "έ" Greek_epsilonaccent -<Multi_key> <Greek_EPSILON> <apostrophe>: "Έ" Greek_EPSILONaccent -<Multi_key> <Greek_eta> <apostrophe> : "ή" Greek_etaaccent -<Multi_key> <Greek_ETA> <apostrophe> : "Ή" Greek_ETAaccent -<Multi_key> <Greek_iota> <apostrophe> : "ί" Greek_iotaaccent -<Multi_key> <Greek_IOTA> <apostrophe> : "Ί" Greek_IOTAaccent -<Multi_key> <Greek_iota> <asciicircum> : "Î" Greek_iotaaccentdieresis -<Multi_key> <Greek_iota> <quotedbl> : "ÏŠ" Greek_iotadieresis -<Multi_key> <Greek_IOTA> <quotedbl> : "Ϊ" Greek_IOTAdieresis -<Multi_key> <Greek_omega> <apostrophe> : "ÏŽ" Greek_omegaaccent -<Multi_key> <Greek_OMEGA> <apostrophe> : "Î" Greek_OMEGAaccent -<Multi_key> <Greek_omicron> <apostrophe>: "ÏŒ" Greek_omicronaccent -<Multi_key> <Greek_OMICRON> <apostrophe>: "ÎŒ" Greek_OMICRONaccent -<Multi_key> <Greek_upsilon> <apostrophe>: "Ï" Greek_upsilonaccent -<Multi_key> <Greek_UPSILON> <apostrophe>: "ÎŽ" Greek_UPSILONaccent -<Multi_key> <Greek_upsilon> <asciicircum>: "ΰ" Greek_upsilonaccentdieresis -<Multi_key> <Greek_upsilon> <quotedbl> : "Ï‹" Greek_upsilondieresis -<Multi_key> <Greek_UPSILON> <quotedbl> : "Ϋ" Greek_UPSILONdieresis +<Multi_key> <o> <e> : "Å“" oe +<Multi_key> <O> <E> : "Å’" OE +<Multi_key> <a> <e> : "æ" ae +<Multi_key> <A> <E> : "Æ" AE -XCOMM -XCOMM cyrillic +<Multi_key> <o> <o> : "°" degree # ^0 already taken + +XCOMM Quotation marks +<Multi_key> <quotedbl> <backslash> : "ã€" U301d # REVERSED DOUBLE PRIME QUOTATION MARK +<Multi_key> <quotedbl> <slash> : "〞" U301e # DOUBLE PRIME QUOTATION MARK +<Multi_key> <less> <less> : "«" guillemotleft # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +<Multi_key> <greater> <greater> : "»" guillemotright # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +<Multi_key> <less> <apostrophe> : "‘" U2018 # LEFT SINGLE QUOTATION MARK +<Multi_key> <apostrophe> <less> : "‘" U2018 # LEFT SINGLE QUOTATION MARK +<Multi_key> <greater> <apostrophe> : "’" U2019 # RIGHT SINGLE QUOTATION MARK +<Multi_key> <apostrophe> <greater> : "’" U2019 # RIGHT SINGLE QUOTATION MARK +<Multi_key> <comma> <apostrophe> : "‚" U201a # SINGLE LOW-9 QUOTATION MARK +<Multi_key> <apostrophe> <comma> : "‚" U201a # SINGLE LOW-9 QUOTATION MARK +<Multi_key> <less> <quotedbl> : "“" U201c # LEFT DOUBLE QUOTATION MARK +<Multi_key> <quotedbl> <less> : "“" U201c # LEFT DOUBLE QUOTATION MARK +<Multi_key> <greater> <quotedbl> : "â€" U201d # RIGHT DOUBLE QUOTATION MARK +<Multi_key> <quotedbl> <greater> : "â€" U201d # RIGHT DOUBLE QUOTATION MARK +<Multi_key> <comma> <quotedbl> : "„" U201e # DOUBLE LOW-9 QUOTATION MARK +<Multi_key> <quotedbl> <comma> : "„" U201e # DOUBLE LOW-9 QUOTATION MARK + +XCOMM Per xxx +<Multi_key> <percent> <o> : "‰" U2030 # PER MILLE SIGN + +XCOMM Currencies +<Multi_key> <C> <E> : "â‚ " U20a0 # EURO-CURRENCY SIGN +<Multi_key> <C> <slash> : "â‚¡" U20a1 # COLON SIGN +<Multi_key> <slash> <C> : "â‚¡" U20a1 # COLON SIGN +<Multi_key> <C> <r> : "â‚¢" U20a2 # CRUZEIRO SIGN +<Multi_key> <F> <r> : "â‚£" U20a3 # FRENCH FRANC SIGN +<Multi_key> <L> <equal> : "₤" U20a4 # LIRA SIGN +<Multi_key> <equal> <L> : "₤" U20a4 # LIRA SIGN +<Multi_key> <m> <slash> : "â‚¥" U20a5 # MILL SIGN +<Multi_key> <slash> <m> : "â‚¥" U20a5 # MILL SIGN +<Multi_key> <N> <equal> : "₦" U20a6 # NAIRA SIGN +<Multi_key> <equal> <N> : "₦" U20a6 # NAIRA SIGN +<Multi_key> <P> <t> : "₧" U20a7 # PESETA SIGN +<Multi_key> <R> <s> : "₨" U20a8 # RUPEE SIGN +<Multi_key> <W> <equal> : "â‚©" U20a9 # WON SIGN +<Multi_key> <equal> <W> : "â‚©" U20a9 # WON SIGN +XCOMM "₪" U20aa NEW SHEQEL SIGN +<Multi_key> <d> <minus> : "â‚«" U20ab # DONG SIGN +<Multi_key> <C> <equal> : "€" EuroSign # EURO SIGN +<Multi_key> <equal> <C> : "€" EuroSign # EURO SIGN +<Multi_key> <E> <equal> : "€" EuroSign # EURO SIGN +<Multi_key> <equal> <E> : "€" EuroSign # EURO SIGN + +<Multi_key> <L> <minus> : "£" U00a3 # POUND SIGN +<Multi_key> <minus> <L> : "£" U00a3 # POUND SIGN +<Multi_key> <Y> <equal> : "Â¥" yen +<Multi_key> <equal><Y> : "Â¥" yen + +XCOMM Long S +<Multi_key> <f> <s> : "Å¿" U017f # LONG S +<Multi_key> <f> <S> : "Å¿" U017f # LONG S + +XCOMM Dashes +<Multi_key> <minus> <minus> <period> : "–" U2013 # EN DASH +<Multi_key> <minus> <minus> <minus> : "—" U2014 # EM DASH + +XCOMM Musical alterations +<Multi_key> <numbersign> <b> : "â™­" U266d # MUSIC FLAT SIGN +<Multi_key> <numbersign> <f> : "â™®" U266e # MUSIC NATURAL SIGN +<Multi_key> <numbersign> <numbersign> : "♯" U266f # MUSIC SHARP SIGN + +XCOMM Other symbols +<Multi_key> <s> <o> : "§" section # SECTION SIGN +<Multi_key> <o> <s> : "§" section # SECTION SIGN + +<Multi_key> <o> <x> : "¤" currency +<Multi_key> <x> <o> : "¤" currency + +<Multi_key> <P> <P> : "¶" paragraph # PILCROW SIGN (PARAGRAPH SIGN) + +XCOMM Part 2 + +XCOMM Compose map for Korean Hangul(Choseongul) Conjoining Jamos automatically +XCOMM generated from UnicodeData-2.0.14.txt at +XCOMM ftp://ftp.unicode.org/Public/2.0-Update/UnicodeData-2.0.14.txt +XCOMM by Jungshik Shin <jshin@jshin.net> 2002-10-17 +XCOMM There are some conflicts among sequences, but I left them alone. XCOMM -<Multi_key> <Cyrillic_che> <bar> : "Ò¹" U04b9 -<Multi_key> <Cyrillic_CHE> <bar> : "Ò¸" U04b8 -<Multi_key> <Cyrillic_che> <comma> : "Ò·" U04b7 -<Multi_key> <Cyrillic_CHE> <comma> : "Ò¶" U04b6 -<Multi_key> <Cyrillic_che> <slash> : "Ò¹" 04b9 -<Multi_key> <Cyrillic_CHE> <slash> : "Ò¸" U04b8 -<Multi_key> <Cyrillic_de> <Cyrillic_je> : "Ñ’" Serbian_dje -<Multi_key> <Cyrillic_DE> <Cyrillic_JE> : "Ђ" Serbian_DJE -<Multi_key> <Cyrillic_el> <Cyrillic_je> : "Ñ™" Cyrillic_lje -<Multi_key> <Cyrillic_EL> <Cyrillic_JE> : "Љ" Cyrillic_LJE -<Multi_key> <Cyrillic_en> <comma> : "Ò£" U04a3 -<Multi_key> <Cyrillic_EN> <comma> : "Ò¢" U04a2 -<Multi_key> <Cyrillic_en> <Cyrillic_je> : "Ñš" Cyrillic_nje -<Multi_key> <Cyrillic_EN> <Cyrillic_JE> : "Њ" Cyrillic_NJE -<Multi_key> <Cyrillic_ghe> <Cyrillic_je> : "Ñ“" Macedonia_gje -<Multi_key> <Cyrillic_GHE> <Cyrillic_JE> : "Ѓ" Macedonia_GJE -<Multi_key> <Cyrillic_ghe> <apostrophe> : "Ñ“" Macedonia_gje -<Multi_key> <Cyrillic_GHE> <apostrophe> : "Ѓ" Macedonia_GJE -<Multi_key> <Cyrillic_ghe> <bar> : "Ò‘" Ukrainian_ghe_with_upturn -<Multi_key> <Cyrillic_GHE> <bar> : "Ò" Ukrainian_GHE_WITH_UPTURN -<Multi_key> <Cyrillic_ghe> <minus> : "Ò“" U0493 -<Multi_key> <Cyrillic_GHE> <minus> : "Ò’" U0492 -<Multi_key> <Cyrillic_ha> <apostrophe> : "Ò»" U04bb -<Multi_key> <Cyrillic_HA> <apostrophe> : "Òº" U04ba -<Multi_key> <Cyrillic_ha> <comma> : "Ò³" U04b3 -<Multi_key> <Cyrillic_HA> <comma> : "Ò²" U04b2 -<Multi_key> <Cyrillic_ie> <colon> : "Ñ‘" Cyrillic_io -<Multi_key> <Cyrillic_IE> <colon> : "Ð" Cyrillic_IO -<Multi_key> <Cyrillic_ie> <Cyrillic_ie> : "Ó™" U04d9 -<Multi_key> <Cyrillic_IE> <Cyrillic_IE> : "Ó˜" U04d8 -<Multi_key> <Cyrillic_ie> <grave> : "Ð" U0450 -<Multi_key> <Cyrillic_IE> <grave> : "Ѐ" U0400 -<Multi_key> <Cyrillic_i> <grave> : "Ñ" U045d -<Multi_key> <Cyrillic_I> <grave> : "Ñ" U040d -<Multi_key> <Cyrillic_i> <minus> : "Ó£" U04e3 -<Multi_key> <Cyrillic_I> <minus> : "Ó¢" U04e2 -<Multi_key> <Cyrillic_je> <Cyrillic_a> : "Ñ" Cyrillic_ya -<Multi_key> <Cyrillic_JE> <Cyrillic_A> : "Я" Cyrillic_YA -<Multi_key> <Cyrillic_je> <Cyrillic_o> : "Ñ‘" Cyrillic_io -<Multi_key> <Cyrillic_JE> <Cyrillic_O> : "Ð" Cyrillic_IO -<Multi_key> <Cyrillic_je> <Cyrillic_u> : "ÑŽ" Cyrillic_yu -<Multi_key> <Cyrillic_JE> <Cyrillic_U> : "Ю" Cyrillic_YU -<Multi_key> <Cyrillic_ka> <bar> : "Ò" U049d -<Multi_key> <Cyrillic_KA> <bar> : "Òœ" U049c -<Multi_key> <Cyrillic_ka> <comma> : "Ò›" U049b -<Multi_key> <Cyrillic_KA> <comma> : "Òš" U049a -<Multi_key> <Cyrillic_ka> <slash> : "Ò" U049d -<Multi_key> <Cyrillic_KA> <slash> : "Òœ" U049c -<Multi_key> <Cyrillic_o> <minus> : "Ó©" U04e9 -<Multi_key> <Cyrillic_O> <minus> : "Ó¨" U04e8 -<Multi_key> <Cyrillic_sha> <comma> : "щ" Cyrillic_shcha -<Multi_key> <Cyrillic_SHA> <comma> : "Щ" Cyrillic_SHCHA -<Multi_key> <Cyrillic_shorti> <Cyrillic_a> : "Ñ" Cyrillic_ya -<Multi_key> <Cyrillic_SHORTI> <Cyrillic_A> : "Я" Cyrillic_YA -<Multi_key> <Cyrillic_shorti> <Cyrillic_o> : "Ñ‘" Cyrillic_io -<Multi_key> <Cyrillic_SHORTI> <Cyrillic_O> : "Ð" Cyrillic_IO -<Multi_key> <Cyrillic_shorti> <Cyrillic_u> : "ÑŽ" Cyrillic_yu -<Multi_key> <Cyrillic_SHORTI> <Cyrillic_U> : "Ю" Cyrillic_YU -<Multi_key> <Cyrillic_te> <Cyrillic_es> : "ц" Cyrillic_tse -<Multi_key> <Cyrillic_TE> <Cyrillic_ES> : "Ц" Cyrillic_TSE -<Multi_key> <Cyrillic_u> <apostrophe> : "Ò¯" U04af -<Multi_key> <Cyrillic_U> <apostrophe> : "Ò®" U04ae -<Multi_key> <Cyrillic_u> <bar> : "Ò¯" U04af -<Multi_key> <Cyrillic_U> <bar> : "Ò®" U04ae -<Multi_key> <Cyrillic_u> <comma> : "Ò±" U04b1 -<Multi_key> <Cyrillic_U> <comma> : "Ò°" U04b0 -<Multi_key> <Cyrillic_u> <minus> : "Ó¯" U04ef -<Multi_key> <Cyrillic_U> <minus> : "Ó®" U04ee -<Multi_key> <Cyrillic_u> <slash> : "Ò±" U04b1 -<Multi_key> <Cyrillic_U> <slash> : "Ò°" U04b0 -<Multi_key> <Cyrillic_zhe> <comma> : "Ò—" U0497 -<Multi_key> <Cyrillic_ZHE> <comma> : "Ò–" U0496 -<Multi_key> <U04af> <minus> : "Ò±" U04b1 -<Multi_key> <U04ae> <minus> : "Ò°" U04b0 +XCOMM group 1: cluster jamos made of three basic jamos + + <Multi_key> <U1107> <U1109> <U1100> : "á„¢" U1122 : ᄇᅠ ᄉᅠ ᄀᅠ = ᄢᅠ + <Multi_key> <U1107> <U1109> <U1103> : "á„£" U1123 : ᄇᅠ ᄉᅠ ᄃᅠ = ᄣᅠ + <Multi_key> <U1107> <U1109> <U1107> : "ᄤ" U1124 : ᄇᅠ ᄉᅠ ᄇᅠ = ᄤᅠ + <Multi_key> <U1107> <U1109> <U1109> : "á„¥" U1125 : ᄇᅠ ᄉᅠ ᄉᅠ = ᄥᅠ + <Multi_key> <U1107> <U1109> <U110c> : "ᄦ" U1126 : ᄇᅠ ᄉᅠ ᄌᅠ = ᄦᅠ + <Multi_key> <U1107> <U1107> <U110b> : "ᄬ" U112c : ᄇᅠ ᄇᅠ á„‹á…  = ᄬᅠ + <Multi_key> <U1109> <U1107> <U1100> : "ᄳ" U1133 : ᄉᅠ ᄇᅠ ᄀᅠ = ᄳᅠ + <Multi_key> <U1109> <U1109> <U1109> : "á„´" U1134 : ᄉᅠ ᄉᅠ ᄉᅠ = á„´á…  + <Multi_key> <U1169> <U1161> <U1175> : "á…«" U116b : á…Ÿá…© á…Ÿá…¡ á…Ÿá…µ = á…Ÿá…« + <Multi_key> <U116e> <U1165> <U1175> : "á…°" U1170 : á…Ÿá…® á…Ÿá…¥ á…Ÿá…µ = á…Ÿá…° + <Multi_key> <U116e> <U1165> <U1173> : "ᆋ" U118b : á…Ÿá…® á…Ÿá…¥ á…Ÿá…³ = ᅟᆋ + <Multi_key> <U11a8> <U11ba> <U11a8> : "ᇄ" U11c4 : ᅟᅠᆨ ᅟᅠᆺ ᅟᅠᆨ = ᅟᅠᇄ + <Multi_key> <U11af> <U11a8> <U11ba> : "ᇌ" U11cc : ᅟᅠᆯ ᅟᅠᆨ ᅟᅠᆺ = ᅟᅠᇌ + <Multi_key> <U11af> <U11ae> <U11c2> : "á‡" U11cf : ᅟᅠᆯ ᅟᅠᆮ ᅟᅠᇂ = ᅟᅠᇠ+ <Multi_key> <U11af> <U11b7> <U11a8> : "ᇑ" U11d1 : ᅟᅠᆯ ᅟᅠᆷ ᅟᅠᆨ = ᅟᅠᇑ + <Multi_key> <U11af> <U11b7> <U11ba> : "ᇒ" U11d2 : ᅟᅠᆯ ᅟᅠᆷ ᅟᅠᆺ = ᅟᅠᇒ + <Multi_key> <U11af> <U11b8> <U11ba> : "ᇓ" U11d3 : ᅟᅠᆯ ᅟᅠᆸ ᅟᅠᆺ = ᅟᅠᇓ + <Multi_key> <U11af> <U11b8> <U11c2> : "ᇔ" U11d4 : ᅟᅠᆯ ᅟᅠᆸ ᅟᅠᇂ = ᅟᅠᇔ + <Multi_key> <U11af> <U11b8> <U11bc> : "ᇕ" U11d5 : ᅟᅠᆯ ᅟᅠᆸ ᅟᅠᆼ = ᅟᅠᇕ + <Multi_key> <U11af> <U11ba> <U11ba> : "ᇖ" U11d6 : ᅟᅠᆯ ᅟᅠᆺ ᅟᅠᆺ = ᅟᅠᇖ + <Multi_key> <U11b7> <U11ba> <U11ba> : "ᇞ" U11de : ᅟᅠᆷ ᅟᅠᆺ ᅟᅠᆺ = ᅟᅠᇞ + <Multi_key> <U11bc> <U11a8> <U11a8> : "ᇭ" U11ed : ᅟᅠᆼ ᅟᅠᆨ ᅟᅠᆨ = ᅟᅠᇭ + <Multi_key> <U1100> <U1100> : "á„" U1101 : ᄀᅠ ᄀᅠ = á„á…  + <Multi_key> <U1103> <U1103> : "á„„" U1104 : ᄃᅠ ᄃᅠ = á„„á…  + <Multi_key> <U1107> <U1107> : "ᄈ" U1108 : ᄇᅠ ᄇᅠ = ᄈᅠ + <Multi_key> <U1109> <U1109> : "á„Š" U110a : ᄉᅠ ᄉᅠ = á„Šá…  + <Multi_key> <U110c> <U110c> : "á„" U110d : ᄌᅠ ᄌᅠ = á„á…  + <Multi_key> <U1102> <U1100> : "á„“" U1113 : á„‚á…  ᄀᅠ = á„“á…  + <Multi_key> <U1102> <U1102> : "á„”" U1114 : á„‚á…  á„‚á…  = ᄔᅠ + <Multi_key> <U1102> <U1103> : "á„•" U1115 : á„‚á…  ᄃᅠ = á„•á…  + <Multi_key> <U1102> <U1107> : "á„–" U1116 : á„‚á…  ᄇᅠ = á„–á…  + <Multi_key> <U1103> <U1100> : "á„—" U1117 : ᄃᅠ ᄀᅠ = á„—á…  + <Multi_key> <U1105> <U1102> : "ᄘ" U1118 : á„…á…  á„‚á…  = ᄘᅠ + <Multi_key> <U1105> <U1105> : "á„™" U1119 : á„…á…  á„…á…  = ᄙᅠ + <Multi_key> <U1105> <U1112> : "á„š" U111a : á„…á…  á„’á…  = á„šá…  + <Multi_key> <U1105> <U110b> : "á„›" U111b : á„…á…  á„‹á…  = ᄛᅠ + <Multi_key> <U1106> <U1107> : "á„œ" U111c : ᄆᅠ ᄇᅠ = ᄜᅠ + <Multi_key> <U1106> <U110b> : "á„" U111d : ᄆᅠ á„‹á…  = á„á…  + <Multi_key> <U1107> <U1100> : "á„ž" U111e : ᄇᅠ ᄀᅠ = á„žá…  + <Multi_key> <U1107> <U1102> : "á„Ÿ" U111f : ᄇᅠ á„‚á…  = á„Ÿá…  + <Multi_key> <U1107> <U1103> : "á„ " U1120 : ᄇᅠ ᄃᅠ = á„ á…  + <Multi_key> <U1107> <U1109> : "á„¡" U1121 : ᄇᅠ ᄉᅠ = á„¡á…  + <Multi_key> <U1107> <U110c> : "ᄧ" U1127 : ᄇᅠ ᄌᅠ = ᄧᅠ + <Multi_key> <U1107> <U110e> : "ᄨ" U1128 : ᄇᅠ á„Žá…  = ᄨᅠ + <Multi_key> <U1107> <U1110> : "á„©" U1129 : ᄇᅠ á„á…  = á„©á…  + <Multi_key> <U1107> <U1111> : "ᄪ" U112a : ᄇᅠ á„‘á…  = ᄪᅠ + <Multi_key> <U1107> <U110b> : "á„«" U112b : ᄇᅠ á„‹á…  = á„«á…  + <Multi_key> <U1109> <U1100> : "á„­" U112d : ᄉᅠ ᄀᅠ = á„­á…  + <Multi_key> <U1109> <U1102> : "á„®" U112e : ᄉᅠ á„‚á…  = ᄮᅠ + <Multi_key> <U1109> <U1103> : "ᄯ" U112f : ᄉᅠ ᄃᅠ = ᄯᅠ + <Multi_key> <U1109> <U1105> : "á„°" U1130 : ᄉᅠ á„…á…  = á„°á…  + <Multi_key> <U1109> <U1106> : "ᄱ" U1131 : ᄉᅠ ᄆᅠ = ᄱᅠ + <Multi_key> <U1109> <U1107> : "ᄲ" U1132 : ᄉᅠ ᄇᅠ = ᄲᅠ + <Multi_key> <U1109> <U110b> : "ᄵ" U1135 : ᄉᅠ á„‹á…  = ᄵᅠ + <Multi_key> <U1109> <U110c> : "ᄶ" U1136 : ᄉᅠ ᄌᅠ = ᄶᅠ + <Multi_key> <U1109> <U110e> : "á„·" U1137 : ᄉᅠ á„Žá…  = á„·á…  + <Multi_key> <U1109> <U110f> : "ᄸ" U1138 : ᄉᅠ á„á…  = ᄸᅠ + <Multi_key> <U1109> <U1110> : "ᄹ" U1139 : ᄉᅠ á„á…  = ᄹᅠ + <Multi_key> <U1109> <U1111> : "ᄺ" U113a : ᄉᅠ á„‘á…  = ᄺᅠ + <Multi_key> <U1109> <U1112> : "á„»" U113b : ᄉᅠ á„’á…  = ᄻᅠ + <Multi_key> <U113c> <U113c> : "ᄽ" U113d : ᄼᅠ ᄼᅠ = ᄽᅠ + <Multi_key> <U113e> <U113e> : "á„¿" U113f : ᄾᅠ ᄾᅠ = á„¿á…  + <Multi_key> <U110b> <U1100> : "á…" U1141 : á„‹á…  ᄀᅠ = á…á…  + <Multi_key> <U110b> <U1103> : "á…‚" U1142 : á„‹á…  ᄃᅠ = á…‚á…  + <Multi_key> <U110b> <U1106> : "á…ƒ" U1143 : á„‹á…  ᄆᅠ = ᅃᅠ + <Multi_key> <U110b> <U1107> : "á…„" U1144 : á„‹á…  ᄇᅠ = á…„á…  + <Multi_key> <U110b> <U1109> : "á……" U1145 : á„‹á…  ᄉᅠ = á……á…  + <Multi_key> <U110b> <U1140> : "á…†" U1146 : á„‹á…  ᅀᅠ = ᅆᅠ + <Multi_key> <U110b> <U110b> : "á…‡" U1147 : á„‹á…  á„‹á…  = ᅇᅠ + <Multi_key> <U110b> <U110c> : "á…ˆ" U1148 : á„‹á…  ᄌᅠ = ᅈᅠ + <Multi_key> <U110b> <U110e> : "á…‰" U1149 : á„‹á…  á„Žá…  = ᅉᅠ + <Multi_key> <U110b> <U1110> : "á…Š" U114a : á„‹á…  á„á…  = á…Šá…  + <Multi_key> <U110b> <U1111> : "á…‹" U114b : á„‹á…  á„‘á…  = á…‹á…  + <Multi_key> <U110c> <U110b> : "á…" U114d : ᄌᅠ á„‹á…  = á…á…  + <Multi_key> <U114e> <U114e> : "á…" U114f : á…Žá…  á…Žá…  = á…á…  + <Multi_key> <U1150> <U1150> : "á…‘" U1151 : á…á…  á…á…  = á…‘á…  + <Multi_key> <U110e> <U110f> : "á…’" U1152 : á„Žá…  á„á…  = á…’á…  + <Multi_key> <U110e> <U1112> : "á…“" U1153 : á„Žá…  á„’á…  = á…“á…  + <Multi_key> <U1111> <U1107> : "á…–" U1156 : á„‘á…  ᄇᅠ = á…–á…  + <Multi_key> <U1111> <U110b> : "á…—" U1157 : á„‘á…  á„‹á…  = á…—á…  + <Multi_key> <U1112> <U1112> : "á…˜" U1158 : á„’á…  á„’á…  = ᅘᅠ + <Multi_key> <U1161> <U1175> : "á…¢" U1162 : á…Ÿá…¡ á…Ÿá…µ = á…Ÿá…¢ + <Multi_key> <U1163> <U1175> : "á…¤" U1164 : á…Ÿá…£ á…Ÿá…µ = á…Ÿá…¤ + <Multi_key> <U1165> <U1175> : "á…¦" U1166 : á…Ÿá…¥ á…Ÿá…µ = á…Ÿá…¦ + <Multi_key> <U1167> <U1175> : "á…¨" U1168 : á…Ÿá…§ á…Ÿá…µ = á…Ÿá…¨ + <Multi_key> <U1169> <U1161> : "á…ª" U116a : á…Ÿá…© á…Ÿá…¡ = á…Ÿá…ª + <Multi_key> <U1169> <U1175> : "á…¬" U116c : á…Ÿá…© á…Ÿá…µ = á…Ÿá…¬ + <Multi_key> <U116e> <U1165> : "á…¯" U116f : á…Ÿá…® á…Ÿá…¥ = á…Ÿá…¯ + <Multi_key> <U116e> <U1175> : "á…±" U1171 : á…Ÿá…® á…Ÿá…µ = á…Ÿá…± + <Multi_key> <U1173> <U1175> : "á…´" U1174 : á…Ÿá…³ á…Ÿá…µ = á…Ÿá…´ + <Multi_key> <U1161> <U1169> : "á…¶" U1176 : á…Ÿá…¡ á…Ÿá…© = á…Ÿá…¶ + <Multi_key> <U1161> <U116e> : "á…·" U1177 : á…Ÿá…¡ á…Ÿá…® = á…Ÿá…· + <Multi_key> <U1163> <U1169> : "á…¸" U1178 : á…Ÿá…£ á…Ÿá…© = á…Ÿá…¸ + <Multi_key> <U1163> <U116d> : "á…¹" U1179 : á…Ÿá…£ á…Ÿá…­ = á…Ÿá…¹ + <Multi_key> <U1165> <U1169> : "á…º" U117a : á…Ÿá…¥ á…Ÿá…© = á…Ÿá…º + <Multi_key> <U1165> <U116e> : "á…»" U117b : á…Ÿá…¥ á…Ÿá…® = á…Ÿá…» + <Multi_key> <U1165> <U1173> : "á…¼" U117c : á…Ÿá…¥ á…Ÿá…³ = á…Ÿá…¼ + <Multi_key> <U1167> <U1169> : "á…½" U117d : á…Ÿá…§ á…Ÿá…© = á…Ÿá…½ + <Multi_key> <U1167> <U116e> : "á…¾" U117e : á…Ÿá…§ á…Ÿá…® = á…Ÿá…¾ + <Multi_key> <U1169> <U1165> : "á…¿" U117f : á…Ÿá…© á…Ÿá…¥ = á…Ÿá…¿ + <Multi_key> <U1169> <U1166> : "ᆀ" U1180 : á…Ÿá…© á…Ÿá…¦ = ᅟᆀ + <Multi_key> <U1169> <U1168> : "á†" U1181 : á…Ÿá…© á…Ÿá…¨ = ᅟᆠ+ <Multi_key> <U1169> <U1169> : "ᆂ" U1182 : á…Ÿá…© á…Ÿá…© = ᅟᆂ + <Multi_key> <U1169> <U116e> : "ᆃ" U1183 : á…Ÿá…© á…Ÿá…® = ᅟᆃ + <Multi_key> <U116d> <U1163> : "ᆄ" U1184 : á…Ÿá…­ á…Ÿá…£ = ᅟᆄ + <Multi_key> <U116d> <U1164> : "ᆅ" U1185 : á…Ÿá…­ á…Ÿá…¤ = ᅟᆅ + <Multi_key> <U116d> <U1167> : "ᆆ" U1186 : á…Ÿá…­ á…Ÿá…§ = ᅟᆆ + <Multi_key> <U116d> <U1169> : "ᆇ" U1187 : á…Ÿá…­ á…Ÿá…© = ᅟᆇ + <Multi_key> <U116d> <U1175> : "ᆈ" U1188 : á…Ÿá…­ á…Ÿá…µ = ᅟᆈ + <Multi_key> <U116e> <U1161> : "ᆉ" U1189 : á…Ÿá…® á…Ÿá…¡ = ᅟᆉ + <Multi_key> <U116e> <U1162> : "ᆊ" U118a : á…Ÿá…® á…Ÿá…¢ = ᅟᆊ + <Multi_key> <U116e> <U1168> : "ᆌ" U118c : á…Ÿá…® á…Ÿá…¨ = ᅟᆌ + <Multi_key> <U116e> <U116e> : "á†" U118d : á…Ÿá…® á…Ÿá…® = ᅟᆠ+ <Multi_key> <U1172> <U1161> : "ᆎ" U118e : á…Ÿá…² á…Ÿá…¡ = ᅟᆎ + <Multi_key> <U1172> <U1165> : "á†" U118f : á…Ÿá…² á…Ÿá…¥ = ᅟᆠ+ <Multi_key> <U1172> <U1166> : "á†" U1190 : á…Ÿá…² á…Ÿá…¦ = ᅟᆠ+ <Multi_key> <U1172> <U1167> : "ᆑ" U1191 : á…Ÿá…² á…Ÿá…§ = ᅟᆑ + <Multi_key> <U1172> <U1168> : "ᆒ" U1192 : á…Ÿá…² á…Ÿá…¨ = ᅟᆒ + <Multi_key> <U1172> <U116e> : "ᆓ" U1193 : á…Ÿá…² á…Ÿá…® = ᅟᆓ + <Multi_key> <U1172> <U1175> : "ᆔ" U1194 : á…Ÿá…² á…Ÿá…µ = ᅟᆔ + <Multi_key> <U1173> <U116e> : "ᆕ" U1195 : á…Ÿá…³ á…Ÿá…® = ᅟᆕ + <Multi_key> <U1173> <U1173> : "ᆖ" U1196 : á…Ÿá…³ á…Ÿá…³ = ᅟᆖ + <Multi_key> <U1174> <U116e> : "ᆗ" U1197 : á…Ÿá…´ á…Ÿá…® = ᅟᆗ + <Multi_key> <U1175> <U1161> : "ᆘ" U1198 : á…Ÿá…µ á…Ÿá…¡ = ᅟᆘ + <Multi_key> <U1175> <U1163> : "ᆙ" U1199 : á…Ÿá…µ á…Ÿá…£ = ᅟᆙ + <Multi_key> <U1175> <U1169> : "ᆚ" U119a : á…Ÿá…µ á…Ÿá…© = ᅟᆚ + <Multi_key> <U1175> <U116e> : "ᆛ" U119b : á…Ÿá…µ á…Ÿá…® = ᅟᆛ + <Multi_key> <U1175> <U1173> : "ᆜ" U119c : á…Ÿá…µ á…Ÿá…³ = ᅟᆜ + <Multi_key> <U1175> <U119e> : "á†" U119d : á…Ÿá…µ ᅟᆞ = ᅟᆠ+ <Multi_key> <U119e> <U1165> : "ᆟ" U119f : ᅟᆞ á…Ÿá…¥ = ᅟᆟ + <Multi_key> <U119e> <U116e> : "ᆠ" U11a0 : ᅟᆞ á…Ÿá…® = ᅟᆠ + <Multi_key> <U119e> <U1175> : "ᆡ" U11a1 : ᅟᆞ á…Ÿá…µ = ᅟᆡ + <Multi_key> <U119e> <U119e> : "ᆢ" U11a2 : ᅟᆞ ᅟᆞ = ᅟᆢ + <Multi_key> <U11a8> <U11a8> : "ᆩ" U11a9 : ᅟᅠᆨ ᅟᅠᆨ = ᅟᅠᆩ + <Multi_key> <U11a8> <U11ba> : "ᆪ" U11aa : ᅟᅠᆨ ᅟᅠᆺ = ᅟᅠᆪ + <Multi_key> <U11ab> <U11bd> : "ᆬ" U11ac : ᅟᅠᆫ ᅟᅠᆽ = ᅟᅠᆬ + <Multi_key> <U11ab> <U11c2> : "ᆭ" U11ad : ᅟᅠᆫ ᅟᅠᇂ = ᅟᅠᆭ + <Multi_key> <U11af> <U11a8> : "ᆰ" U11b0 : ᅟᅠᆯ ᅟᅠᆨ = ᅟᅠᆰ + <Multi_key> <U11af> <U11b7> : "ᆱ" U11b1 : ᅟᅠᆯ ᅟᅠᆷ = ᅟᅠᆱ + <Multi_key> <U11af> <U11b8> : "ᆲ" U11b2 : ᅟᅠᆯ ᅟᅠᆸ = ᅟᅠᆲ + <Multi_key> <U11af> <U11ba> : "ᆳ" U11b3 : ᅟᅠᆯ ᅟᅠᆺ = ᅟᅠᆳ + <Multi_key> <U11af> <U11c0> : "ᆴ" U11b4 : ᅟᅠᆯ ᅟᅠᇀ = ᅟᅠᆴ + <Multi_key> <U11af> <U11c1> : "ᆵ" U11b5 : ᅟᅠᆯ ᅟᅠᇠ= ᅟᅠᆵ + <Multi_key> <U11af> <U11c2> : "ᆶ" U11b6 : ᅟᅠᆯ ᅟᅠᇂ = ᅟᅠᆶ + <Multi_key> <U11b8> <U11ba> : "ᆹ" U11b9 : ᅟᅠᆸ ᅟᅠᆺ = ᅟᅠᆹ + <Multi_key> <U11ba> <U11ba> : "ᆻ" U11bb : ᅟᅠᆺ ᅟᅠᆺ = ᅟᅠᆻ + <Multi_key> <U11a8> <U11af> : "ᇃ" U11c3 : ᅟᅠᆨ ᅟᅠᆯ = ᅟᅠᇃ + <Multi_key> <U11ab> <U11a8> : "ᇅ" U11c5 : ᅟᅠᆫ ᅟᅠᆨ = ᅟᅠᇅ + <Multi_key> <U11ab> <U11ae> : "ᇆ" U11c6 : ᅟᅠᆫ ᅟᅠᆮ = ᅟᅠᇆ + <Multi_key> <U11ab> <U11ba> : "ᇇ" U11c7 : ᅟᅠᆫ ᅟᅠᆺ = ᅟᅠᇇ + <Multi_key> <U11ab> <U11eb> : "ᇈ" U11c8 : ᅟᅠᆫ ᅟᅠᇫ = ᅟᅠᇈ + <Multi_key> <U11ab> <U11c0> : "ᇉ" U11c9 : ᅟᅠᆫ ᅟᅠᇀ = ᅟᅠᇉ + <Multi_key> <U11ae> <U11a8> : "ᇊ" U11ca : ᅟᅠᆮ ᅟᅠᆨ = ᅟᅠᇊ + <Multi_key> <U11ae> <U11af> : "ᇋ" U11cb : ᅟᅠᆮ ᅟᅠᆯ = ᅟᅠᇋ + <Multi_key> <U11af> <U11ab> : "á‡" U11cd : ᅟᅠᆯ ᅟᅠᆫ = ᅟᅠᇠ+ <Multi_key> <U11af> <U11ae> : "ᇎ" U11ce : ᅟᅠᆯ ᅟᅠᆮ = ᅟᅠᇎ + <Multi_key> <U11af> <U11af> : "á‡" U11d0 : ᅟᅠᆯ ᅟᅠᆯ = ᅟᅠᇠ+ <Multi_key> <U11af> <U11eb> : "ᇗ" U11d7 : ᅟᅠᆯ ᅟᅠᇫ = ᅟᅠᇗ + <Multi_key> <U11af> <U11bf> : "ᇘ" U11d8 : ᅟᅠᆯ ᅟᅠᆿ = ᅟᅠᇘ + <Multi_key> <U11af> <U11f9> : "ᇙ" U11d9 : ᅟᅠᆯ ᅟᅠᇹ = ᅟᅠᇙ + <Multi_key> <U11b7> <U11a8> : "ᇚ" U11da : ᅟᅠᆷ ᅟᅠᆨ = ᅟᅠᇚ + <Multi_key> <U11b7> <U11af> : "ᇛ" U11db : ᅟᅠᆷ ᅟᅠᆯ = ᅟᅠᇛ + <Multi_key> <U11b7> <U11b8> : "ᇜ" U11dc : ᅟᅠᆷ ᅟᅠᆸ = ᅟᅠᇜ + <Multi_key> <U11b7> <U11ba> : "á‡" U11dd : ᅟᅠᆷ ᅟᅠᆺ = ᅟᅠᇠ+ <Multi_key> <U11b7> <U11eb> : "ᇟ" U11df : ᅟᅠᆷ ᅟᅠᇫ = ᅟᅠᇟ + <Multi_key> <U11b7> <U11be> : "ᇠ" U11e0 : ᅟᅠᆷ ᅟᅠᆾ = ᅟᅠᇠ + <Multi_key> <U11b7> <U11c2> : "ᇡ" U11e1 : ᅟᅠᆷ ᅟᅠᇂ = ᅟᅠᇡ + <Multi_key> <U11b7> <U11bc> : "ᇢ" U11e2 : ᅟᅠᆷ ᅟᅠᆼ = ᅟᅠᇢ + <Multi_key> <U11b8> <U11af> : "ᇣ" U11e3 : ᅟᅠᆸ ᅟᅠᆯ = ᅟᅠᇣ + <Multi_key> <U11b8> <U11c1> : "ᇤ" U11e4 : ᅟᅠᆸ ᅟᅠᇠ= ᅟᅠᇤ + <Multi_key> <U11b8> <U11c2> : "ᇥ" U11e5 : ᅟᅠᆸ ᅟᅠᇂ = ᅟᅠᇥ + <Multi_key> <U11b8> <U11bc> : "ᇦ" U11e6 : ᅟᅠᆸ ᅟᅠᆼ = ᅟᅠᇦ + <Multi_key> <U11ba> <U11a8> : "ᇧ" U11e7 : ᅟᅠᆺ ᅟᅠᆨ = ᅟᅠᇧ + <Multi_key> <U11ba> <U11ae> : "ᇨ" U11e8 : ᅟᅠᆺ ᅟᅠᆮ = ᅟᅠᇨ + <Multi_key> <U11ba> <U11af> : "ᇩ" U11e9 : ᅟᅠᆺ ᅟᅠᆯ = ᅟᅠᇩ + <Multi_key> <U11ba> <U11b8> : "ᇪ" U11ea : ᅟᅠᆺ ᅟᅠᆸ = ᅟᅠᇪ + <Multi_key> <U11bc> <U11a8> : "ᇬ" U11ec : ᅟᅠᆼ ᅟᅠᆨ = ᅟᅠᇬ + <Multi_key> <U11bc> <U11bc> : "ᇮ" U11ee : ᅟᅠᆼ ᅟᅠᆼ = ᅟᅠᇮ + <Multi_key> <U11bc> <U11bf> : "ᇯ" U11ef : ᅟᅠᆼ ᅟᅠᆿ = ᅟᅠᇯ + <Multi_key> <U11f0> <U11ba> : "ᇱ" U11f1 : ᅟᅠᇰ ᅟᅠᆺ = ᅟᅠᇱ + <Multi_key> <U11f0> <U11eb> : "ᇲ" U11f2 : ᅟᅠᇰ ᅟᅠᇫ = ᅟᅠᇲ + <Multi_key> <U11c1> <U11b8> : "ᇳ" U11f3 : ᅟᅠᇠᅟᅠᆸ = ᅟᅠᇳ + <Multi_key> <U11c1> <U11bc> : "ᇴ" U11f4 : ᅟᅠᇠᅟᅠᆼ = ᅟᅠᇴ + <Multi_key> <U11c2> <U11ab> : "ᇵ" U11f5 : ᅟᅠᇂ ᅟᅠᆫ = ᅟᅠᇵ + <Multi_key> <U11c2> <U11af> : "ᇶ" U11f6 : ᅟᅠᇂ ᅟᅠᆯ = ᅟᅠᇶ + <Multi_key> <U11c2> <U11b7> : "ᇷ" U11f7 : ᅟᅠᇂ ᅟᅠᆷ = ᅟᅠᇷ + <Multi_key> <U11c2> <U11b8> : "ᇸ" U11f8 : ᅟᅠᇂ ᅟᅠᆸ = ᅟᅠᇸ + <Multi_key> <U1121> <U1100> : "á„¢" U1122 : á„¡á…  ᄀᅠ = ᄢᅠ + <Multi_key> <U1121> <U1103> : "á„£" U1123 : á„¡á…  ᄃᅠ = ᄣᅠ + <Multi_key> <U1121> <U1107> : "ᄤ" U1124 : á„¡á…  ᄇᅠ = ᄤᅠ + <Multi_key> <U1121> <U1109> : "á„¥" U1125 : á„¡á…  ᄉᅠ = ᄥᅠ + <Multi_key> <U1121> <U110c> : "ᄦ" U1126 : á„¡á…  ᄌᅠ = ᄦᅠ + <Multi_key> <U1108> <U110b> : "ᄬ" U112c : ᄈᅠ á„‹á…  = ᄬᅠ + <Multi_key> <U1132> <U1100> : "ᄳ" U1133 : ᄲᅠ ᄀᅠ = ᄳᅠ + <Multi_key> <U110a> <U1109> : "á„´" U1134 : á„Šá…  ᄉᅠ = á„´á…  + <Multi_key> <U116a> <U1175> : "á…«" U116b : á…Ÿá…ª á…Ÿá…µ = á…Ÿá…« + <Multi_key> <U116f> <U1175> : "á…°" U1170 : á…Ÿá…¯ á…Ÿá…µ = á…Ÿá…° + <Multi_key> <U116f> <U1173> : "ᆋ" U118b : á…Ÿá…¯ á…Ÿá…³ = ᅟᆋ + <Multi_key> <U11aa> <U11a8> : "ᇄ" U11c4 : ᅟᅠᆪ ᅟᅠᆨ = ᅟᅠᇄ + <Multi_key> <U11b0> <U11ba> : "ᇌ" U11cc : ᅟᅠᆰ ᅟᅠᆺ = ᅟᅠᇌ + <Multi_key> <U11ce> <U11c2> : "á‡" U11cf : ᅟᅠᇎ ᅟᅠᇂ = ᅟᅠᇠ+ <Multi_key> <U11b1> <U11a8> : "ᇑ" U11d1 : ᅟᅠᆱ ᅟᅠᆨ = ᅟᅠᇑ + <Multi_key> <U11b1> <U11ba> : "ᇒ" U11d2 : ᅟᅠᆱ ᅟᅠᆺ = ᅟᅠᇒ + <Multi_key> <U11b2> <U11ba> : "ᇓ" U11d3 : ᅟᅠᆲ ᅟᅠᆺ = ᅟᅠᇓ + <Multi_key> <U11b2> <U11c2> : "ᇔ" U11d4 : ᅟᅠᆲ ᅟᅠᇂ = ᅟᅠᇔ + <Multi_key> <U11b2> <U11bc> : "ᇕ" U11d5 : ᅟᅠᆲ ᅟᅠᆼ = ᅟᅠᇕ + <Multi_key> <U11b3> <U11ba> : "ᇖ" U11d6 : ᅟᅠᆳ ᅟᅠᆺ = ᅟᅠᇖ + <Multi_key> <U11dd> <U11ba> : "ᇞ" U11de : ᅟᅠᇠᅟᅠᆺ = ᅟᅠᇞ + <Multi_key> <U11ec> <U11a8> : "ᇭ" U11ed : ᅟᅠᇬ ᅟᅠᆨ = ᅟᅠᇭ + <Multi_key> <U1107> <U112d> : "á„¢" U1122 : ᄇᅠ á„­á…  = ᄢᅠ + <Multi_key> <U1107> <U112f> : "á„£" U1123 : ᄇᅠ ᄯᅠ = ᄣᅠ + <Multi_key> <U1107> <U1132> : "ᄤ" U1124 : ᄇᅠ ᄲᅠ = ᄤᅠ + <Multi_key> <U1107> <U110a> : "á„¥" U1125 : ᄇᅠ á„Šá…  = ᄥᅠ + <Multi_key> <U1107> <U1136> : "ᄦ" U1126 : ᄇᅠ ᄶᅠ = ᄦᅠ + <Multi_key> <U1107> <U112b> : "ᄬ" U112c : ᄇᅠ á„«á…  = ᄬᅠ + <Multi_key> <U1109> <U111e> : "ᄳ" U1133 : ᄉᅠ á„žá…  = ᄳᅠ + <Multi_key> <U1109> <U110a> : "á„´" U1134 : ᄉᅠ á„Šá…  = á„´á…  + <Multi_key> <U1169> <U1162> : "á…«" U116b : á…Ÿá…© á…Ÿá…¢ = á…Ÿá…« + <Multi_key> <U116e> <U1166> : "á…°" U1170 : á…Ÿá…® á…Ÿá…¦ = á…Ÿá…° + <Multi_key> <U116e> <U117c> : "ᆋ" U118b : á…Ÿá…® á…Ÿá…¼ = ᅟᆋ + <Multi_key> <U11a8> <U11e7> : "ᇄ" U11c4 : ᅟᅠᆨ ᅟᅠᇧ = ᅟᅠᇄ + <Multi_key> <U11af> <U11aa> : "ᇌ" U11cc : ᅟᅠᆯ ᅟᅠᆪ = ᅟᅠᇌ + <Multi_key> <U11af> <U11da> : "ᇑ" U11d1 : ᅟᅠᆯ ᅟᅠᇚ = ᅟᅠᇑ + <Multi_key> <U11af> <U11dd> : "ᇒ" U11d2 : ᅟᅠᆯ ᅟᅠᇠ= ᅟᅠᇒ + <Multi_key> <U11af> <U11b9> : "ᇓ" U11d3 : ᅟᅠᆯ ᅟᅠᆹ = ᅟᅠᇓ + <Multi_key> <U11af> <U11e5> : "ᇔ" U11d4 : ᅟᅠᆯ ᅟᅠᇥ = ᅟᅠᇔ + <Multi_key> <U11af> <U11e6> : "ᇕ" U11d5 : ᅟᅠᆯ ᅟᅠᇦ = ᅟᅠᇕ + <Multi_key> <U11af> <U11bb> : "ᇖ" U11d6 : ᅟᅠᆯ ᅟᅠᆻ = ᅟᅠᇖ + <Multi_key> <U11b7> <U11bb> : "ᇞ" U11de : ᅟᅠᆷ ᅟᅠᆻ = ᅟᅠᇞ + <Multi_key> <U11bc> <U11a9> : "ᇭ" U11ed : ᅟᅠᆼ ᅟᅠᆩ = ᅟᅠᇭ +<dead_circumflex> <Multi_key> <underscore> <a> : "ª" U00AA # FEMININE ORDINAL INDICATOR +<Multi_key> <asciicircum> <underscore> <a> : "ª" U00AA # FEMININE ORDINAL INDICATOR +<dead_circumflex> <Multi_key> <underbar> <a> : "ª" U00AA # FEMININE ORDINAL INDICATOR +<Multi_key> <asciicircum> <underbar> <a> : "ª" U00AA # FEMININE ORDINAL INDICATOR +<dead_circumflex> <2> : "²" U00B2 # SUPERSCRIPT TWO +<Multi_key> <asciicircum> <2> : "²" U00B2 # SUPERSCRIPT TWO +<dead_circumflex> <KP_Space> : "²" U00B2 # SUPERSCRIPT TWO +<Multi_key> <asciicircum> <KP_Space> : "²" U00B2 # SUPERSCRIPT TWO +<dead_circumflex> <KP_2> : "²" U00B2 # SUPERSCRIPT TWO +<Multi_key> <asciicircum> <KP_2> : "²" U00B2 # SUPERSCRIPT TWO +<dead_circumflex> <3> : "³" U00B3 # SUPERSCRIPT THREE +<Multi_key> <asciicircum> <3> : "³" U00B3 # SUPERSCRIPT THREE +<dead_circumflex> <KP_3> : "³" U00B3 # SUPERSCRIPT THREE +<Multi_key> <asciicircum> <KP_3> : "³" U00B3 # SUPERSCRIPT THREE +<dead_circumflex> <1> : "¹" U00B9 # SUPERSCRIPT ONE +<Multi_key> <asciicircum> <1> : "¹" U00B9 # SUPERSCRIPT ONE +<dead_circumflex> <KP_1> : "¹" U00B9 # SUPERSCRIPT ONE +<Multi_key> <asciicircum> <KP_1> : "¹" U00B9 # SUPERSCRIPT ONE +<dead_circumflex> <Multi_key> <underscore> <o> : "º" U00BA # MASCULINE ORDINAL INDICATOR +<Multi_key> <asciicircum> <underscore> <o> : "º" U00BA # MASCULINE ORDINAL INDICATOR +<dead_circumflex> <Multi_key> <underbar> <o> : "º" U00BA # MASCULINE ORDINAL INDICATOR +<Multi_key> <asciicircum> <underbar> <o> : "º" U00BA # MASCULINE ORDINAL INDICATOR +<dead_grave> <A> : "À" U00C0 # LATIN CAPITAL LETTER A WITH GRAVE +<Multi_key> <grave> <A> : "À" U00C0 # LATIN CAPITAL LETTER A WITH GRAVE +<combining_grave> <A> : "À" U00C0 # LATIN CAPITAL LETTER A WITH GRAVE +<dead_acute> <A> : "Ã" U00C1 # LATIN CAPITAL LETTER A WITH ACUTE +<Multi_key> <acute> <A> : "Ã" U00C1 # LATIN CAPITAL LETTER A WITH ACUTE +<Multi_key> <apostrophe> <A> : "Ã" U00C1 # LATIN CAPITAL LETTER A WITH ACUTE +<combining_acute> <A> : "Ã" U00C1 # LATIN CAPITAL LETTER A WITH ACUTE +<dead_circumflex> <A> : "Â" U00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX +<Multi_key> <asciicircum> <A> : "Â" U00C2 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX +<dead_tilde> <A> : "Ã" U00C3 # LATIN CAPITAL LETTER A WITH TILDE +<Multi_key> <asciitilde> <A> : "Ã" U00C3 # LATIN CAPITAL LETTER A WITH TILDE +<combining_tilde> <A> : "Ã" U00C3 # LATIN CAPITAL LETTER A WITH TILDE +<dead_diaeresis> <A> : "Ä" U00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS +<Multi_key> <quotedbl> <A> : "Ä" U00C4 # LATIN CAPITAL LETTER A WITH DIAERESIS +<dead_abovering> <A> : "Ã…" U00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE +<Multi_key> <o> <A> : "Ã…" U00C5 # LATIN CAPITAL LETTER A WITH RING ABOVE +<dead_cedilla> <C> : "Ç" U00C7 # LATIN CAPITAL LETTER C WITH CEDILLA +<Multi_key> <comma> <C> : "Ç" U00C7 # LATIN CAPITAL LETTER C WITH CEDILLA +<dead_grave> <E> : "È" U00C8 # LATIN CAPITAL LETTER E WITH GRAVE +<Multi_key> <grave> <E> : "È" U00C8 # LATIN CAPITAL LETTER E WITH GRAVE +<combining_grave> <E> : "È" U00C8 # LATIN CAPITAL LETTER E WITH GRAVE +<dead_acute> <E> : "É" U00C9 # LATIN CAPITAL LETTER E WITH ACUTE +<Multi_key> <acute> <E> : "É" U00C9 # LATIN CAPITAL LETTER E WITH ACUTE +<Multi_key> <apostrophe> <E> : "É" U00C9 # LATIN CAPITAL LETTER E WITH ACUTE +<combining_acute> <E> : "É" U00C9 # LATIN CAPITAL LETTER E WITH ACUTE +<dead_circumflex> <E> : "Ê" U00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX +<Multi_key> <asciicircum> <E> : "Ê" U00CA # LATIN CAPITAL LETTER E WITH CIRCUMFLEX +<dead_diaeresis> <E> : "Ë" U00CB # LATIN CAPITAL LETTER E WITH DIAERESIS +<Multi_key> <quotedbl> <E> : "Ë" U00CB # LATIN CAPITAL LETTER E WITH DIAERESIS +<dead_grave> <I> : "ÃŒ" U00CC # LATIN CAPITAL LETTER I WITH GRAVE +<Multi_key> <grave> <I> : "ÃŒ" U00CC # LATIN CAPITAL LETTER I WITH GRAVE +<combining_grave> <I> : "ÃŒ" U00CC # LATIN CAPITAL LETTER I WITH GRAVE +<dead_acute> <I> : "Ã" U00CD # LATIN CAPITAL LETTER I WITH ACUTE +<Multi_key> <acute> <I> : "Ã" U00CD # LATIN CAPITAL LETTER I WITH ACUTE +<Multi_key> <apostrophe> <I> : "Ã" U00CD # LATIN CAPITAL LETTER I WITH ACUTE +<combining_acute> <I> : "Ã" U00CD # LATIN CAPITAL LETTER I WITH ACUTE +<dead_circumflex> <I> : "ÃŽ" U00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX +<Multi_key> <asciicircum> <I> : "ÃŽ" U00CE # LATIN CAPITAL LETTER I WITH CIRCUMFLEX +<dead_diaeresis> <I> : "Ã" U00CF # LATIN CAPITAL LETTER I WITH DIAERESIS +<Multi_key> <quotedbl> <I> : "Ã" U00CF # LATIN CAPITAL LETTER I WITH DIAERESIS +<dead_tilde> <N> : "Ñ" U00D1 # LATIN CAPITAL LETTER N WITH TILDE +<Multi_key> <asciitilde> <N> : "Ñ" U00D1 # LATIN CAPITAL LETTER N WITH TILDE +<combining_tilde> <N> : "Ñ" U00D1 # LATIN CAPITAL LETTER N WITH TILDE +<dead_grave> <O> : "Ã’" U00D2 # LATIN CAPITAL LETTER O WITH GRAVE +<Multi_key> <grave> <O> : "Ã’" U00D2 # LATIN CAPITAL LETTER O WITH GRAVE +<combining_grave> <O> : "Ã’" U00D2 # LATIN CAPITAL LETTER O WITH GRAVE +<dead_acute> <O> : "Ó" U00D3 # LATIN CAPITAL LETTER O WITH ACUTE +<Multi_key> <acute> <O> : "Ó" U00D3 # LATIN CAPITAL LETTER O WITH ACUTE +<Multi_key> <apostrophe> <O> : "Ó" U00D3 # LATIN CAPITAL LETTER O WITH ACUTE +<combining_acute> <O> : "Ó" U00D3 # LATIN CAPITAL LETTER O WITH ACUTE +<dead_circumflex> <O> : "Ô" U00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX +<Multi_key> <asciicircum> <O> : "Ô" U00D4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX +<dead_tilde> <O> : "Õ" U00D5 # LATIN CAPITAL LETTER O WITH TILDE +<Multi_key> <asciitilde> <O> : "Õ" U00D5 # LATIN CAPITAL LETTER O WITH TILDE +<combining_tilde> <O> : "Õ" U00D5 # LATIN CAPITAL LETTER O WITH TILDE +<dead_diaeresis> <O> : "Ö" U00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS +<Multi_key> <quotedbl> <O> : "Ö" U00D6 # LATIN CAPITAL LETTER O WITH DIAERESIS +<Multi_key> <slash> <O> : "Ø" U00D8 # LATIN CAPITAL LETTER O WITH STROKE +<Multi_key> <KP_Divide> <O> : "Ø" U00D8 # LATIN CAPITAL LETTER O WITH STROKE +<dead_grave> <U> : "Ù" U00D9 # LATIN CAPITAL LETTER U WITH GRAVE +<Multi_key> <grave> <U> : "Ù" U00D9 # LATIN CAPITAL LETTER U WITH GRAVE +<combining_grave> <U> : "Ù" U00D9 # LATIN CAPITAL LETTER U WITH GRAVE +<dead_acute> <U> : "Ú" U00DA # LATIN CAPITAL LETTER U WITH ACUTE +<Multi_key> <acute> <U> : "Ú" U00DA # LATIN CAPITAL LETTER U WITH ACUTE +<Multi_key> <apostrophe> <U> : "Ú" U00DA # LATIN CAPITAL LETTER U WITH ACUTE +<combining_acute> <U> : "Ú" U00DA # LATIN CAPITAL LETTER U WITH ACUTE +<dead_circumflex> <U> : "Û" U00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX +<Multi_key> <asciicircum> <U> : "Û" U00DB # LATIN CAPITAL LETTER U WITH CIRCUMFLEX +<dead_diaeresis> <U> : "Ãœ" U00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +<Multi_key> <quotedbl> <U> : "Ãœ" U00DC # LATIN CAPITAL LETTER U WITH DIAERESIS +<dead_acute> <Y> : "Ã" U00DD # LATIN CAPITAL LETTER Y WITH ACUTE +<Multi_key> <acute> <Y> : "Ã" U00DD # LATIN CAPITAL LETTER Y WITH ACUTE +<Multi_key> <apostrophe> <Y> : "Ã" U00DD # LATIN CAPITAL LETTER Y WITH ACUTE +<combining_acute> <Y> : "Ã" U00DD # LATIN CAPITAL LETTER Y WITH ACUTE +<dead_grave> <a> : "à" U00E0 # LATIN SMALL LETTER A WITH GRAVE +<Multi_key> <grave> <a> : "à" U00E0 # LATIN SMALL LETTER A WITH GRAVE +<combining_grave> <a> : "à" U00E0 # LATIN SMALL LETTER A WITH GRAVE +<dead_acute> <a> : "á" U00E1 # LATIN SMALL LETTER A WITH ACUTE +<Multi_key> <acute> <a> : "á" U00E1 # LATIN SMALL LETTER A WITH ACUTE +<Multi_key> <apostrophe> <a> : "á" U00E1 # LATIN SMALL LETTER A WITH ACUTE +<combining_acute> <a> : "á" U00E1 # LATIN SMALL LETTER A WITH ACUTE +<dead_circumflex> <a> : "â" U00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX +<Multi_key> <asciicircum> <a> : "â" U00E2 # LATIN SMALL LETTER A WITH CIRCUMFLEX +<dead_tilde> <a> : "ã" U00E3 # LATIN SMALL LETTER A WITH TILDE +<Multi_key> <asciitilde> <a> : "ã" U00E3 # LATIN SMALL LETTER A WITH TILDE +<combining_tilde> <a> : "ã" U00E3 # LATIN SMALL LETTER A WITH TILDE +<dead_diaeresis> <a> : "ä" U00E4 # LATIN SMALL LETTER A WITH DIAERESIS +<Multi_key> <quotedbl> <a> : "ä" U00E4 # LATIN SMALL LETTER A WITH DIAERESIS +<dead_abovering> <a> : "Ã¥" U00E5 # LATIN SMALL LETTER A WITH RING ABOVE +<Multi_key> <o> <a> : "Ã¥" U00E5 # LATIN SMALL LETTER A WITH RING ABOVE +<dead_cedilla> <c> : "ç" U00E7 # LATIN SMALL LETTER C WITH CEDILLA +<Multi_key> <comma> <c> : "ç" U00E7 # LATIN SMALL LETTER C WITH CEDILLA +<dead_grave> <e> : "è" U00E8 # LATIN SMALL LETTER E WITH GRAVE +<Multi_key> <grave> <e> : "è" U00E8 # LATIN SMALL LETTER E WITH GRAVE +<combining_grave> <e> : "è" U00E8 # LATIN SMALL LETTER E WITH GRAVE +<dead_acute> <e> : "é" U00E9 # LATIN SMALL LETTER E WITH ACUTE +<Multi_key> <acute> <e> : "é" U00E9 # LATIN SMALL LETTER E WITH ACUTE +<Multi_key> <apostrophe> <e> : "é" U00E9 # LATIN SMALL LETTER E WITH ACUTE +<combining_acute> <e> : "é" U00E9 # LATIN SMALL LETTER E WITH ACUTE +<dead_circumflex> <e> : "ê" U00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX +<Multi_key> <asciicircum> <e> : "ê" U00EA # LATIN SMALL LETTER E WITH CIRCUMFLEX +<dead_diaeresis> <e> : "ë" U00EB # LATIN SMALL LETTER E WITH DIAERESIS +<Multi_key> <quotedbl> <e> : "ë" U00EB # LATIN SMALL LETTER E WITH DIAERESIS +<dead_grave> <i> : "ì" U00EC # LATIN SMALL LETTER I WITH GRAVE +<Multi_key> <grave> <i> : "ì" U00EC # LATIN SMALL LETTER I WITH GRAVE +<combining_grave> <i> : "ì" U00EC # LATIN SMALL LETTER I WITH GRAVE +<dead_acute> <i> : "í" U00ED # LATIN SMALL LETTER I WITH ACUTE +<Multi_key> <acute> <i> : "í" U00ED # LATIN SMALL LETTER I WITH ACUTE +<Multi_key> <apostrophe> <i> : "í" U00ED # LATIN SMALL LETTER I WITH ACUTE +<combining_acute> <i> : "í" U00ED # LATIN SMALL LETTER I WITH ACUTE +<dead_circumflex> <i> : "î" U00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX +<Multi_key> <asciicircum> <i> : "î" U00EE # LATIN SMALL LETTER I WITH CIRCUMFLEX +<dead_diaeresis> <i> : "ï" U00EF # LATIN SMALL LETTER I WITH DIAERESIS +<Multi_key> <quotedbl> <i> : "ï" U00EF # LATIN SMALL LETTER I WITH DIAERESIS +<dead_tilde> <n> : "ñ" U00F1 # LATIN SMALL LETTER N WITH TILDE +<Multi_key> <asciitilde> <n> : "ñ" U00F1 # LATIN SMALL LETTER N WITH TILDE +<combining_tilde> <n> : "ñ" U00F1 # LATIN SMALL LETTER N WITH TILDE +<dead_grave> <o> : "ò" U00F2 # LATIN SMALL LETTER O WITH GRAVE +<Multi_key> <grave> <o> : "ò" U00F2 # LATIN SMALL LETTER O WITH GRAVE +<combining_grave> <o> : "ò" U00F2 # LATIN SMALL LETTER O WITH GRAVE +<dead_acute> <o> : "ó" U00F3 # LATIN SMALL LETTER O WITH ACUTE +<Multi_key> <acute> <o> : "ó" U00F3 # LATIN SMALL LETTER O WITH ACUTE +<Multi_key> <apostrophe> <o> : "ó" U00F3 # LATIN SMALL LETTER O WITH ACUTE +<combining_acute> <o> : "ó" U00F3 # LATIN SMALL LETTER O WITH ACUTE +<dead_circumflex> <o> : "ô" U00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX +<Multi_key> <asciicircum> <o> : "ô" U00F4 # LATIN SMALL LETTER O WITH CIRCUMFLEX +<dead_tilde> <o> : "õ" U00F5 # LATIN SMALL LETTER O WITH TILDE +<Multi_key> <asciitilde> <o> : "õ" U00F5 # LATIN SMALL LETTER O WITH TILDE +<combining_tilde> <o> : "õ" U00F5 # LATIN SMALL LETTER O WITH TILDE +<dead_diaeresis> <o> : "ö" U00F6 # LATIN SMALL LETTER O WITH DIAERESIS +<Multi_key> <quotedbl> <o> : "ö" U00F6 # LATIN SMALL LETTER O WITH DIAERESIS +<Multi_key> <slash> <o> : "ø" U00F8 # LATIN SMALL LETTER O WITH STROKE +<Multi_key> <KP_Divide> <o> : "ø" U00F8 # LATIN SMALL LETTER O WITH STROKE +<dead_grave> <u> : "ù" U00F9 # LATIN SMALL LETTER U WITH GRAVE +<Multi_key> <grave> <u> : "ù" U00F9 # LATIN SMALL LETTER U WITH GRAVE +<combining_grave> <u> : "ù" U00F9 # LATIN SMALL LETTER U WITH GRAVE +<dead_acute> <u> : "ú" U00FA # LATIN SMALL LETTER U WITH ACUTE +<Multi_key> <acute> <u> : "ú" U00FA # LATIN SMALL LETTER U WITH ACUTE +<Multi_key> <apostrophe> <u> : "ú" U00FA # LATIN SMALL LETTER U WITH ACUTE +<combining_acute> <u> : "ú" U00FA # LATIN SMALL LETTER U WITH ACUTE +<dead_circumflex> <u> : "û" U00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX +<Multi_key> <asciicircum> <u> : "û" U00FB # LATIN SMALL LETTER U WITH CIRCUMFLEX +<dead_diaeresis> <u> : "ü" U00FC # LATIN SMALL LETTER U WITH DIAERESIS +<Multi_key> <quotedbl> <u> : "ü" U00FC # LATIN SMALL LETTER U WITH DIAERESIS +<dead_acute> <y> : "ý" U00FD # LATIN SMALL LETTER Y WITH ACUTE +<Multi_key> <acute> <y> : "ý" U00FD # LATIN SMALL LETTER Y WITH ACUTE +<Multi_key> <apostrophe> <y> : "ý" U00FD # LATIN SMALL LETTER Y WITH ACUTE +<combining_acute> <y> : "ý" U00FD # LATIN SMALL LETTER Y WITH ACUTE +<dead_diaeresis> <y> : "ÿ" U00FF # LATIN SMALL LETTER Y WITH DIAERESIS +<Multi_key> <quotedbl> <y> : "ÿ" U00FF # LATIN SMALL LETTER Y WITH DIAERESIS +<dead_macron> <A> : "Ä€" U0100 # LATIN CAPITAL LETTER A WITH MACRON +<Multi_key> <macron> <A> : "Ä€" U0100 # LATIN CAPITAL LETTER A WITH MACRON +<Multi_key> <underscore> <A> : "Ä€" U0100 # LATIN CAPITAL LETTER A WITH MACRON +<dead_macron> <a> : "Ä" U0101 # LATIN SMALL LETTER A WITH MACRON +<Multi_key> <macron> <a> : "Ä" U0101 # LATIN SMALL LETTER A WITH MACRON +<Multi_key> <underscore> <a> : "Ä" U0101 # LATIN SMALL LETTER A WITH MACRON +<dead_breve> <A> : "Ä‚" U0102 # LATIN CAPITAL LETTER A WITH BREVE +<Multi_key> <U> <A> : "Ä‚" U0102 # LATIN CAPITAL LETTER A WITH BREVE +<Multi_key> <b> <A> : "Ä‚" U0102 # LATIN CAPITAL LETTER A WITH BREVE +<dead_breve> <a> : "ă" U0103 # LATIN SMALL LETTER A WITH BREVE +<Multi_key> <U> <a> : "ă" U0103 # LATIN SMALL LETTER A WITH BREVE +<Multi_key> <b> <a> : "ă" U0103 # LATIN SMALL LETTER A WITH BREVE +<dead_ogonek> <A> : "Ä„" U0104 # LATIN CAPITAL LETTER A WITH OGONEK +<Multi_key> <semicolon> <A> : "Ä„" U0104 # LATIN CAPITAL LETTER A WITH OGONEK +<dead_ogonek> <a> : "Ä…" U0105 # LATIN SMALL LETTER A WITH OGONEK +<Multi_key> <semicolon> <a> : "Ä…" U0105 # LATIN SMALL LETTER A WITH OGONEK +<dead_acute> <C> : "Ć" U0106 # LATIN CAPITAL LETTER C WITH ACUTE +<Multi_key> <acute> <C> : "Ć" U0106 # LATIN CAPITAL LETTER C WITH ACUTE +<Multi_key> <apostrophe> <C> : "Ć" U0106 # LATIN CAPITAL LETTER C WITH ACUTE +<combining_acute> <C> : "Ć" U0106 # LATIN CAPITAL LETTER C WITH ACUTE +<dead_acute> <c> : "ć" U0107 # LATIN SMALL LETTER C WITH ACUTE +<Multi_key> <acute> <c> : "ć" U0107 # LATIN SMALL LETTER C WITH ACUTE +<Multi_key> <apostrophe> <c> : "ć" U0107 # LATIN SMALL LETTER C WITH ACUTE +<combining_acute> <c> : "ć" U0107 # LATIN SMALL LETTER C WITH ACUTE +<dead_circumflex> <C> : "Ĉ" U0108 # LATIN CAPITAL LETTER C WITH CIRCUMFLEX +<Multi_key> <asciicircum> <C> : "Ĉ" U0108 # LATIN CAPITAL LETTER C WITH CIRCUMFLEX +<dead_circumflex> <c> : "ĉ" U0109 # LATIN SMALL LETTER C WITH CIRCUMFLEX +<Multi_key> <asciicircum> <c> : "ĉ" U0109 # LATIN SMALL LETTER C WITH CIRCUMFLEX +<dead_abovedot> <C> : "ÄŠ" U010A # LATIN CAPITAL LETTER C WITH DOT ABOVE +<Multi_key> <period> <C> : "ÄŠ" U010A # LATIN CAPITAL LETTER C WITH DOT ABOVE +<dead_abovedot> <c> : "Ä‹" U010B # LATIN SMALL LETTER C WITH DOT ABOVE +<Multi_key> <period> <c> : "Ä‹" U010B # LATIN SMALL LETTER C WITH DOT ABOVE +<dead_caron> <C> : "ÄŒ" U010C # LATIN CAPITAL LETTER C WITH CARON +<Multi_key> <c> <C> : "ÄŒ" U010C # LATIN CAPITAL LETTER C WITH CARON +<dead_caron> <c> : "Ä" U010D # LATIN SMALL LETTER C WITH CARON +<Multi_key> <c> <c> : "Ä" U010D # LATIN SMALL LETTER C WITH CARON +<dead_caron> <D> : "ÄŽ" U010E # LATIN CAPITAL LETTER D WITH CARON +<Multi_key> <c> <D> : "ÄŽ" U010E # LATIN CAPITAL LETTER D WITH CARON +<dead_caron> <d> : "Ä" U010F # LATIN SMALL LETTER D WITH CARON +<Multi_key> <c> <d> : "Ä" U010F # LATIN SMALL LETTER D WITH CARON +<Multi_key> <slash> <D> : "Ä" U0110 # LATIN CAPITAL LETTER D WITH STROKE +<Multi_key> <KP_Divide> <D> : "Ä" U0110 # LATIN CAPITAL LETTER D WITH STROKE +<Multi_key> <slash> <d> : "Ä‘" U0111 # LATIN SMALL LETTER D WITH STROKE +<Multi_key> <KP_Divide> <d> : "Ä‘" U0111 # LATIN SMALL LETTER D WITH STROKE +<dead_macron> <E> : "Ä’" U0112 # LATIN CAPITAL LETTER E WITH MACRON +<Multi_key> <macron> <E> : "Ä’" U0112 # LATIN CAPITAL LETTER E WITH MACRON +<Multi_key> <underscore> <E> : "Ä’" U0112 # LATIN CAPITAL LETTER E WITH MACRON +<dead_macron> <e> : "Ä“" U0113 # LATIN SMALL LETTER E WITH MACRON +<Multi_key> <macron> <e> : "Ä“" U0113 # LATIN SMALL LETTER E WITH MACRON +<Multi_key> <underscore> <e> : "Ä“" U0113 # LATIN SMALL LETTER E WITH MACRON +<dead_breve> <E> : "Ä”" U0114 # LATIN CAPITAL LETTER E WITH BREVE +<Multi_key> <U> <E> : "Ä”" U0114 # LATIN CAPITAL LETTER E WITH BREVE +<Multi_key> <b> <E> : "Ä”" U0114 # LATIN CAPITAL LETTER E WITH BREVE +<dead_breve> <e> : "Ä•" U0115 # LATIN SMALL LETTER E WITH BREVE +<Multi_key> <U> <e> : "Ä•" U0115 # LATIN SMALL LETTER E WITH BREVE +<Multi_key> <b> <e> : "Ä•" U0115 # LATIN SMALL LETTER E WITH BREVE +<dead_abovedot> <E> : "Ä–" U0116 # LATIN CAPITAL LETTER E WITH DOT ABOVE +<Multi_key> <period> <E> : "Ä–" U0116 # LATIN CAPITAL LETTER E WITH DOT ABOVE +<dead_abovedot> <e> : "Ä—" U0117 # LATIN SMALL LETTER E WITH DOT ABOVE +<Multi_key> <period> <e> : "Ä—" U0117 # LATIN SMALL LETTER E WITH DOT ABOVE +<dead_ogonek> <E> : "Ę" U0118 # LATIN CAPITAL LETTER E WITH OGONEK +<Multi_key> <semicolon> <E> : "Ę" U0118 # LATIN CAPITAL LETTER E WITH OGONEK +<dead_ogonek> <e> : "Ä™" U0119 # LATIN SMALL LETTER E WITH OGONEK +<Multi_key> <semicolon> <e> : "Ä™" U0119 # LATIN SMALL LETTER E WITH OGONEK +<dead_caron> <E> : "Äš" U011A # LATIN CAPITAL LETTER E WITH CARON +<Multi_key> <c> <E> : "Äš" U011A # LATIN CAPITAL LETTER E WITH CARON +<dead_caron> <e> : "Ä›" U011B # LATIN SMALL LETTER E WITH CARON +<Multi_key> <c> <e> : "Ä›" U011B # LATIN SMALL LETTER E WITH CARON +<dead_circumflex> <G> : "Äœ" U011C # LATIN CAPITAL LETTER G WITH CIRCUMFLEX +<Multi_key> <asciicircum> <G> : "Äœ" U011C # LATIN CAPITAL LETTER G WITH CIRCUMFLEX +<dead_circumflex> <g> : "Ä" U011D # LATIN SMALL LETTER G WITH CIRCUMFLEX +<Multi_key> <asciicircum> <g> : "Ä" U011D # LATIN SMALL LETTER G WITH CIRCUMFLEX +<dead_breve> <G> : "Äž" U011E # LATIN CAPITAL LETTER G WITH BREVE +<Multi_key> <U> <G> : "Äž" U011E # LATIN CAPITAL LETTER G WITH BREVE +<Multi_key> <b> <G> : "Äž" U011E # LATIN CAPITAL LETTER G WITH BREVE +<dead_breve> <g> : "ÄŸ" U011F # LATIN SMALL LETTER G WITH BREVE +<Multi_key> <U> <g> : "ÄŸ" U011F # LATIN SMALL LETTER G WITH BREVE +<Multi_key> <b> <g> : "ÄŸ" U011F # LATIN SMALL LETTER G WITH BREVE +<dead_abovedot> <G> : "Ä " U0120 # LATIN CAPITAL LETTER G WITH DOT ABOVE +<Multi_key> <period> <G> : "Ä " U0120 # LATIN CAPITAL LETTER G WITH DOT ABOVE +<dead_abovedot> <g> : "Ä¡" U0121 # LATIN SMALL LETTER G WITH DOT ABOVE +<Multi_key> <period> <g> : "Ä¡" U0121 # LATIN SMALL LETTER G WITH DOT ABOVE +<dead_cedilla> <G> : "Ä¢" U0122 # LATIN CAPITAL LETTER G WITH CEDILLA +<Multi_key> <comma> <G> : "Ä¢" U0122 # LATIN CAPITAL LETTER G WITH CEDILLA +<dead_cedilla> <g> : "Ä£" U0123 # LATIN SMALL LETTER G WITH CEDILLA +<Multi_key> <comma> <g> : "Ä£" U0123 # LATIN SMALL LETTER G WITH CEDILLA +<dead_circumflex> <H> : "Ĥ" U0124 # LATIN CAPITAL LETTER H WITH CIRCUMFLEX +<Multi_key> <asciicircum> <H> : "Ĥ" U0124 # LATIN CAPITAL LETTER H WITH CIRCUMFLEX +<dead_circumflex> <h> : "Ä¥" U0125 # LATIN SMALL LETTER H WITH CIRCUMFLEX +<Multi_key> <asciicircum> <h> : "Ä¥" U0125 # LATIN SMALL LETTER H WITH CIRCUMFLEX +<Multi_key> <slash> <H> : "Ħ" U0126 # LATIN CAPITAL LETTER H WITH STROKE +<Multi_key> <KP_Divide> <H> : "Ħ" U0126 # LATIN CAPITAL LETTER H WITH STROKE +<Multi_key> <slash> <h> : "ħ" U0127 # LATIN SMALL LETTER H WITH STROKE +<Multi_key> <KP_Divide> <h> : "ħ" U0127 # LATIN SMALL LETTER H WITH STROKE +<dead_tilde> <I> : "Ĩ" U0128 # LATIN CAPITAL LETTER I WITH TILDE +<Multi_key> <asciitilde> <I> : "Ĩ" U0128 # LATIN CAPITAL LETTER I WITH TILDE +<combining_tilde> <I> : "Ĩ" U0128 # LATIN CAPITAL LETTER I WITH TILDE +<dead_tilde> <i> : "Ä©" U0129 # LATIN SMALL LETTER I WITH TILDE +<Multi_key> <asciitilde> <i> : "Ä©" U0129 # LATIN SMALL LETTER I WITH TILDE +<combining_tilde> <i> : "Ä©" U0129 # LATIN SMALL LETTER I WITH TILDE +<dead_macron> <I> : "Ī" U012A # LATIN CAPITAL LETTER I WITH MACRON +<Multi_key> <macron> <I> : "Ī" U012A # LATIN CAPITAL LETTER I WITH MACRON +<Multi_key> <underscore> <I> : "Ī" U012A # LATIN CAPITAL LETTER I WITH MACRON +<dead_macron> <i> : "Ä«" U012B # LATIN SMALL LETTER I WITH MACRON +<Multi_key> <macron> <i> : "Ä«" U012B # LATIN SMALL LETTER I WITH MACRON +<Multi_key> <underscore> <i> : "Ä«" U012B # LATIN SMALL LETTER I WITH MACRON +<dead_breve> <I> : "Ĭ" U012C # LATIN CAPITAL LETTER I WITH BREVE +<Multi_key> <U> <I> : "Ĭ" U012C # LATIN CAPITAL LETTER I WITH BREVE +<Multi_key> <b> <I> : "Ĭ" U012C # LATIN CAPITAL LETTER I WITH BREVE +<dead_breve> <i> : "Ä­" U012D # LATIN SMALL LETTER I WITH BREVE +<Multi_key> <U> <i> : "Ä­" U012D # LATIN SMALL LETTER I WITH BREVE +<Multi_key> <b> <i> : "Ä­" U012D # LATIN SMALL LETTER I WITH BREVE +<dead_ogonek> <I> : "Ä®" U012E # LATIN CAPITAL LETTER I WITH OGONEK +<Multi_key> <semicolon> <I> : "Ä®" U012E # LATIN CAPITAL LETTER I WITH OGONEK +<dead_ogonek> <i> : "į" U012F # LATIN SMALL LETTER I WITH OGONEK +<Multi_key> <semicolon> <i> : "į" U012F # LATIN SMALL LETTER I WITH OGONEK +<dead_abovedot> <I> : "Ä°" U0130 # LATIN CAPITAL LETTER I WITH DOT ABOVE +<Multi_key> <period> <I> : "Ä°" U0130 # LATIN CAPITAL LETTER I WITH DOT ABOVE +<dead_circumflex> <J> : "Ä´" U0134 # LATIN CAPITAL LETTER J WITH CIRCUMFLEX +<Multi_key> <asciicircum> <J> : "Ä´" U0134 # LATIN CAPITAL LETTER J WITH CIRCUMFLEX +<dead_circumflex> <j> : "ĵ" U0135 # LATIN SMALL LETTER J WITH CIRCUMFLEX +<Multi_key> <asciicircum> <j> : "ĵ" U0135 # LATIN SMALL LETTER J WITH CIRCUMFLEX +<dead_cedilla> <K> : "Ķ" U0136 # LATIN CAPITAL LETTER K WITH CEDILLA +<Multi_key> <comma> <K> : "Ķ" U0136 # LATIN CAPITAL LETTER K WITH CEDILLA +<dead_cedilla> <k> : "Ä·" U0137 # LATIN SMALL LETTER K WITH CEDILLA +<Multi_key> <comma> <k> : "Ä·" U0137 # LATIN SMALL LETTER K WITH CEDILLA +<dead_acute> <L> : "Ĺ" U0139 # LATIN CAPITAL LETTER L WITH ACUTE +<Multi_key> <acute> <L> : "Ĺ" U0139 # LATIN CAPITAL LETTER L WITH ACUTE +<Multi_key> <apostrophe> <L> : "Ĺ" U0139 # LATIN CAPITAL LETTER L WITH ACUTE +<combining_acute> <L> : "Ĺ" U0139 # LATIN CAPITAL LETTER L WITH ACUTE +<dead_acute> <l> : "ĺ" U013A # LATIN SMALL LETTER L WITH ACUTE +<Multi_key> <acute> <l> : "ĺ" U013A # LATIN SMALL LETTER L WITH ACUTE +<Multi_key> <apostrophe> <l> : "ĺ" U013A # LATIN SMALL LETTER L WITH ACUTE +<combining_acute> <l> : "ĺ" U013A # LATIN SMALL LETTER L WITH ACUTE +<dead_cedilla> <L> : "Ä»" U013B # LATIN CAPITAL LETTER L WITH CEDILLA +<Multi_key> <comma> <L> : "Ä»" U013B # LATIN CAPITAL LETTER L WITH CEDILLA +<dead_cedilla> <l> : "ļ" U013C # LATIN SMALL LETTER L WITH CEDILLA +<Multi_key> <comma> <l> : "ļ" U013C # LATIN SMALL LETTER L WITH CEDILLA +<dead_caron> <L> : "Ľ" U013D # LATIN CAPITAL LETTER L WITH CARON +<Multi_key> <c> <L> : "Ľ" U013D # LATIN CAPITAL LETTER L WITH CARON +<dead_caron> <l> : "ľ" U013E # LATIN SMALL LETTER L WITH CARON +<Multi_key> <c> <l> : "ľ" U013E # LATIN SMALL LETTER L WITH CARON +<Multi_key> <slash> <L> : "Å" U0141 # LATIN CAPITAL LETTER L WITH STROKE +<Multi_key> <KP_Divide> <L> : "Å" U0141 # LATIN CAPITAL LETTER L WITH STROKE +<Multi_key> <slash> <l> : "Å‚" U0142 # LATIN SMALL LETTER L WITH STROKE +<Multi_key> <KP_Divide> <l> : "Å‚" U0142 # LATIN SMALL LETTER L WITH STROKE +<dead_acute> <N> : "Ń" U0143 # LATIN CAPITAL LETTER N WITH ACUTE +<Multi_key> <acute> <N> : "Ń" U0143 # LATIN CAPITAL LETTER N WITH ACUTE +<Multi_key> <apostrophe> <N> : "Ń" U0143 # LATIN CAPITAL LETTER N WITH ACUTE +<combining_acute> <N> : "Ń" U0143 # LATIN CAPITAL LETTER N WITH ACUTE +<dead_acute> <n> : "Å„" U0144 # LATIN SMALL LETTER N WITH ACUTE +<Multi_key> <acute> <n> : "Å„" U0144 # LATIN SMALL LETTER N WITH ACUTE +<Multi_key> <apostrophe> <n> : "Å„" U0144 # LATIN SMALL LETTER N WITH ACUTE +<combining_acute> <n> : "Å„" U0144 # LATIN SMALL LETTER N WITH ACUTE +<dead_cedilla> <N> : "Å…" U0145 # LATIN CAPITAL LETTER N WITH CEDILLA +<Multi_key> <comma> <N> : "Å…" U0145 # LATIN CAPITAL LETTER N WITH CEDILLA +<dead_cedilla> <n> : "ņ" U0146 # LATIN SMALL LETTER N WITH CEDILLA +<Multi_key> <comma> <n> : "ņ" U0146 # LATIN SMALL LETTER N WITH CEDILLA +<dead_caron> <N> : "Ň" U0147 # LATIN CAPITAL LETTER N WITH CARON +<Multi_key> <c> <N> : "Ň" U0147 # LATIN CAPITAL LETTER N WITH CARON +<dead_caron> <n> : "ň" U0148 # LATIN SMALL LETTER N WITH CARON +<Multi_key> <c> <n> : "ň" U0148 # LATIN SMALL LETTER N WITH CARON +<dead_macron> <O> : "ÅŒ" U014C # LATIN CAPITAL LETTER O WITH MACRON +<Multi_key> <macron> <O> : "ÅŒ" U014C # LATIN CAPITAL LETTER O WITH MACRON +<Multi_key> <underscore> <O> : "ÅŒ" U014C # LATIN CAPITAL LETTER O WITH MACRON +<dead_macron> <o> : "Å" U014D # LATIN SMALL LETTER O WITH MACRON +<Multi_key> <macron> <o> : "Å" U014D # LATIN SMALL LETTER O WITH MACRON +<Multi_key> <underscore> <o> : "Å" U014D # LATIN SMALL LETTER O WITH MACRON +<dead_breve> <O> : "ÅŽ" U014E # LATIN CAPITAL LETTER O WITH BREVE +<Multi_key> <U> <O> : "ÅŽ" U014E # LATIN CAPITAL LETTER O WITH BREVE +<Multi_key> <b> <O> : "ÅŽ" U014E # LATIN CAPITAL LETTER O WITH BREVE +<dead_breve> <o> : "Å" U014F # LATIN SMALL LETTER O WITH BREVE +<Multi_key> <U> <o> : "Å" U014F # LATIN SMALL LETTER O WITH BREVE +<Multi_key> <b> <o> : "Å" U014F # LATIN SMALL LETTER O WITH BREVE +<dead_doubleacute> <O> : "Å" U0150 # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +<Multi_key> <equal> <O> : "Å" U0150 # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +<dead_doubleacute> <o> : "Å‘" U0151 # LATIN SMALL LETTER O WITH DOUBLE ACUTE +<Multi_key> <equal> <o> : "Å‘" U0151 # LATIN SMALL LETTER O WITH DOUBLE ACUTE +<dead_acute> <R> : "Å”" U0154 # LATIN CAPITAL LETTER R WITH ACUTE +<Multi_key> <acute> <R> : "Å”" U0154 # LATIN CAPITAL LETTER R WITH ACUTE +<Multi_key> <apostrophe> <R> : "Å”" U0154 # LATIN CAPITAL LETTER R WITH ACUTE +<combining_acute> <R> : "Å”" U0154 # LATIN CAPITAL LETTER R WITH ACUTE +<dead_acute> <r> : "Å•" U0155 # LATIN SMALL LETTER R WITH ACUTE +<Multi_key> <acute> <r> : "Å•" U0155 # LATIN SMALL LETTER R WITH ACUTE +<Multi_key> <apostrophe> <r> : "Å•" U0155 # LATIN SMALL LETTER R WITH ACUTE +<combining_acute> <r> : "Å•" U0155 # LATIN SMALL LETTER R WITH ACUTE +<dead_cedilla> <R> : "Å–" U0156 # LATIN CAPITAL LETTER R WITH CEDILLA +<Multi_key> <comma> <R> : "Å–" U0156 # LATIN CAPITAL LETTER R WITH CEDILLA +<dead_cedilla> <r> : "Å—" U0157 # LATIN SMALL LETTER R WITH CEDILLA +<Multi_key> <comma> <r> : "Å—" U0157 # LATIN SMALL LETTER R WITH CEDILLA +<dead_caron> <R> : "Ř" U0158 # LATIN CAPITAL LETTER R WITH CARON +<Multi_key> <c> <R> : "Ř" U0158 # LATIN CAPITAL LETTER R WITH CARON +<dead_caron> <r> : "Å™" U0159 # LATIN SMALL LETTER R WITH CARON +<Multi_key> <c> <r> : "Å™" U0159 # LATIN SMALL LETTER R WITH CARON +<dead_acute> <S> : "Åš" U015A # LATIN CAPITAL LETTER S WITH ACUTE +<Multi_key> <acute> <S> : "Åš" U015A # LATIN CAPITAL LETTER S WITH ACUTE +<Multi_key> <apostrophe> <S> : "Åš" U015A # LATIN CAPITAL LETTER S WITH ACUTE +<combining_acute> <S> : "Åš" U015A # LATIN CAPITAL LETTER S WITH ACUTE +<dead_acute> <s> : "Å›" U015B # LATIN SMALL LETTER S WITH ACUTE +<Multi_key> <acute> <s> : "Å›" U015B # LATIN SMALL LETTER S WITH ACUTE +<Multi_key> <apostrophe> <s> : "Å›" U015B # LATIN SMALL LETTER S WITH ACUTE +<combining_acute> <s> : "Å›" U015B # LATIN SMALL LETTER S WITH ACUTE +<dead_circumflex> <S> : "Åœ" U015C # LATIN CAPITAL LETTER S WITH CIRCUMFLEX +<Multi_key> <asciicircum> <S> : "Åœ" U015C # LATIN CAPITAL LETTER S WITH CIRCUMFLEX +<dead_circumflex> <s> : "Å" U015D # LATIN SMALL LETTER S WITH CIRCUMFLEX +<Multi_key> <asciicircum> <s> : "Å" U015D # LATIN SMALL LETTER S WITH CIRCUMFLEX +<dead_cedilla> <S> : "Åž" U015E # LATIN CAPITAL LETTER S WITH CEDILLA +<Multi_key> <comma> <S> : "Åž" U015E # LATIN CAPITAL LETTER S WITH CEDILLA +<dead_cedilla> <s> : "ÅŸ" U015F # LATIN SMALL LETTER S WITH CEDILLA +<Multi_key> <comma> <s> : "ÅŸ" U015F # LATIN SMALL LETTER S WITH CEDILLA +<dead_caron> <S> : "Å " U0160 # LATIN CAPITAL LETTER S WITH CARON +<Multi_key> <c> <S> : "Å " U0160 # LATIN CAPITAL LETTER S WITH CARON +<dead_caron> <s> : "Å¡" U0161 # LATIN SMALL LETTER S WITH CARON +<Multi_key> <c> <s> : "Å¡" U0161 # LATIN SMALL LETTER S WITH CARON +<dead_cedilla> <T> : "Å¢" U0162 # LATIN CAPITAL LETTER T WITH CEDILLA +<Multi_key> <comma> <T> : "Å¢" U0162 # LATIN CAPITAL LETTER T WITH CEDILLA +<dead_cedilla> <t> : "Å£" U0163 # LATIN SMALL LETTER T WITH CEDILLA +<Multi_key> <comma> <t> : "Å£" U0163 # LATIN SMALL LETTER T WITH CEDILLA +<dead_caron> <T> : "Ť" U0164 # LATIN CAPITAL LETTER T WITH CARON +<Multi_key> <c> <T> : "Ť" U0164 # LATIN CAPITAL LETTER T WITH CARON +<dead_caron> <t> : "Å¥" U0165 # LATIN SMALL LETTER T WITH CARON +<Multi_key> <c> <t> : "Å¥" U0165 # LATIN SMALL LETTER T WITH CARON +<Multi_key> <slash> <T> : "Ŧ" U0166 # LATIN CAPITAL LETTER T WITH STROKE +<Multi_key> <KP_Divide> <T> : "Ŧ" U0166 # LATIN CAPITAL LETTER T WITH STROKE +<Multi_key> <slash> <t> : "ŧ" U0167 # LATIN SMALL LETTER T WITH STROKE +<Multi_key> <KP_Divide> <t> : "ŧ" U0167 # LATIN SMALL LETTER T WITH STROKE +<dead_tilde> <U> : "Ũ" U0168 # LATIN CAPITAL LETTER U WITH TILDE +<Multi_key> <asciitilde> <U> : "Ũ" U0168 # LATIN CAPITAL LETTER U WITH TILDE +<combining_tilde> <U> : "Ũ" U0168 # LATIN CAPITAL LETTER U WITH TILDE +<dead_tilde> <u> : "Å©" U0169 # LATIN SMALL LETTER U WITH TILDE +<Multi_key> <asciitilde> <u> : "Å©" U0169 # LATIN SMALL LETTER U WITH TILDE +<combining_tilde> <u> : "Å©" U0169 # LATIN SMALL LETTER U WITH TILDE +<dead_macron> <U> : "Ū" U016A # LATIN CAPITAL LETTER U WITH MACRON +<Multi_key> <macron> <U> : "Ū" U016A # LATIN CAPITAL LETTER U WITH MACRON +<Multi_key> <underscore> <U> : "Ū" U016A # LATIN CAPITAL LETTER U WITH MACRON +<dead_macron> <u> : "Å«" U016B # LATIN SMALL LETTER U WITH MACRON +<Multi_key> <macron> <u> : "Å«" U016B # LATIN SMALL LETTER U WITH MACRON +<Multi_key> <underscore> <u> : "Å«" U016B # LATIN SMALL LETTER U WITH MACRON +<dead_breve> <U> : "Ŭ" U016C # LATIN CAPITAL LETTER U WITH BREVE +<Multi_key> <U> <U> : "Ŭ" U016C # LATIN CAPITAL LETTER U WITH BREVE +<Multi_key> <b> <U> : "Ŭ" U016C # LATIN CAPITAL LETTER U WITH BREVE +<dead_breve> <u> : "Å­" U016D # LATIN SMALL LETTER U WITH BREVE +<Multi_key> <U> <u> : "Å­" U016D # LATIN SMALL LETTER U WITH BREVE +<Multi_key> <b> <u> : "Å­" U016D # LATIN SMALL LETTER U WITH BREVE +<dead_abovering> <U> : "Å®" U016E # LATIN CAPITAL LETTER U WITH RING ABOVE +<Multi_key> <o> <U> : "Å®" U016E # LATIN CAPITAL LETTER U WITH RING ABOVE +<dead_abovering> <u> : "ů" U016F # LATIN SMALL LETTER U WITH RING ABOVE +<Multi_key> <o> <u> : "ů" U016F # LATIN SMALL LETTER U WITH RING ABOVE +<dead_doubleacute> <U> : "Å°" U0170 # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE +<Multi_key> <equal> <U> : "Å°" U0170 # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE +<dead_doubleacute> <u> : "ű" U0171 # LATIN SMALL LETTER U WITH DOUBLE ACUTE +<Multi_key> <equal> <u> : "ű" U0171 # LATIN SMALL LETTER U WITH DOUBLE ACUTE +<dead_ogonek> <U> : "Ų" U0172 # LATIN CAPITAL LETTER U WITH OGONEK +<Multi_key> <semicolon> <U> : "Ų" U0172 # LATIN CAPITAL LETTER U WITH OGONEK +<dead_ogonek> <u> : "ų" U0173 # LATIN SMALL LETTER U WITH OGONEK +<Multi_key> <semicolon> <u> : "ų" U0173 # LATIN SMALL LETTER U WITH OGONEK +<dead_circumflex> <W> : "Å´" U0174 # LATIN CAPITAL LETTER W WITH CIRCUMFLEX +<Multi_key> <asciicircum> <W> : "Å´" U0174 # LATIN CAPITAL LETTER W WITH CIRCUMFLEX +<dead_circumflex> <w> : "ŵ" U0175 # LATIN SMALL LETTER W WITH CIRCUMFLEX +<Multi_key> <asciicircum> <w> : "ŵ" U0175 # LATIN SMALL LETTER W WITH CIRCUMFLEX +<dead_circumflex> <Y> : "Ŷ" U0176 # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX +<Multi_key> <asciicircum> <Y> : "Ŷ" U0176 # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX +<dead_circumflex> <y> : "Å·" U0177 # LATIN SMALL LETTER Y WITH CIRCUMFLEX +<Multi_key> <asciicircum> <y> : "Å·" U0177 # LATIN SMALL LETTER Y WITH CIRCUMFLEX +<dead_diaeresis> <Y> : "Ÿ" U0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS +<Multi_key> <quotedbl> <Y> : "Ÿ" U0178 # LATIN CAPITAL LETTER Y WITH DIAERESIS +<dead_acute> <Z> : "Ź" U0179 # LATIN CAPITAL LETTER Z WITH ACUTE +<Multi_key> <acute> <Z> : "Ź" U0179 # LATIN CAPITAL LETTER Z WITH ACUTE +<Multi_key> <apostrophe> <Z> : "Ź" U0179 # LATIN CAPITAL LETTER Z WITH ACUTE +<combining_acute> <Z> : "Ź" U0179 # LATIN CAPITAL LETTER Z WITH ACUTE +<dead_acute> <z> : "ź" U017A # LATIN SMALL LETTER Z WITH ACUTE +<Multi_key> <acute> <z> : "ź" U017A # LATIN SMALL LETTER Z WITH ACUTE +<Multi_key> <apostrophe> <z> : "ź" U017A # LATIN SMALL LETTER Z WITH ACUTE +<combining_acute> <z> : "ź" U017A # LATIN SMALL LETTER Z WITH ACUTE +<dead_abovedot> <Z> : "Å»" U017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE +<Multi_key> <period> <Z> : "Å»" U017B # LATIN CAPITAL LETTER Z WITH DOT ABOVE +<dead_abovedot> <z> : "ż" U017C # LATIN SMALL LETTER Z WITH DOT ABOVE +<Multi_key> <period> <z> : "ż" U017C # LATIN SMALL LETTER Z WITH DOT ABOVE +<dead_caron> <Z> : "Ž" U017D # LATIN CAPITAL LETTER Z WITH CARON +<Multi_key> <c> <Z> : "Ž" U017D # LATIN CAPITAL LETTER Z WITH CARON +<dead_caron> <z> : "ž" U017E # LATIN SMALL LETTER Z WITH CARON +<Multi_key> <c> <z> : "ž" U017E # LATIN SMALL LETTER Z WITH CARON +<Multi_key> <slash> <b> : "Æ€" U0180 # LATIN SMALL LETTER B WITH STROKE +<Multi_key> <KP_Divide> <b> : "Æ€" U0180 # LATIN SMALL LETTER B WITH STROKE +<Multi_key> <slash> <I> : "Æ—" U0197 # LATIN CAPITAL LETTER I WITH STROKE +<Multi_key> <KP_Divide> <I> : "Æ—" U0197 # LATIN CAPITAL LETTER I WITH STROKE +<dead_horn> <O> : "Æ " U01A0 # LATIN CAPITAL LETTER O WITH HORN +<Multi_key> <plus> <O> : "Æ " U01A0 # LATIN CAPITAL LETTER O WITH HORN +<dead_horn> <o> : "Æ¡" U01A1 # LATIN SMALL LETTER O WITH HORN +<Multi_key> <plus> <o> : "Æ¡" U01A1 # LATIN SMALL LETTER O WITH HORN +<dead_horn> <U> : "Ư" U01AF # LATIN CAPITAL LETTER U WITH HORN +<Multi_key> <plus> <U> : "Ư" U01AF # LATIN CAPITAL LETTER U WITH HORN +<dead_horn> <u> : "Æ°" U01B0 # LATIN SMALL LETTER U WITH HORN +<Multi_key> <plus> <u> : "Æ°" U01B0 # LATIN SMALL LETTER U WITH HORN +<Multi_key> <slash> <Z> : "Ƶ" U01B5 # LATIN CAPITAL LETTER Z WITH STROKE +<Multi_key> <KP_Divide> <Z> : "Ƶ" U01B5 # LATIN CAPITAL LETTER Z WITH STROKE +<Multi_key> <slash> <z> : "ƶ" U01B6 # LATIN SMALL LETTER Z WITH STROKE +<Multi_key> <KP_Divide> <z> : "ƶ" U01B6 # LATIN SMALL LETTER Z WITH STROKE +<dead_caron> <A> : "Ç" U01CD # LATIN CAPITAL LETTER A WITH CARON +<Multi_key> <c> <A> : "Ç" U01CD # LATIN CAPITAL LETTER A WITH CARON +<dead_caron> <a> : "ÇŽ" U01CE # LATIN SMALL LETTER A WITH CARON +<Multi_key> <c> <a> : "ÇŽ" U01CE # LATIN SMALL LETTER A WITH CARON +<dead_caron> <I> : "Ç" U01CF # LATIN CAPITAL LETTER I WITH CARON +<Multi_key> <c> <I> : "Ç" U01CF # LATIN CAPITAL LETTER I WITH CARON +<dead_caron> <i> : "Ç" U01D0 # LATIN SMALL LETTER I WITH CARON +<Multi_key> <c> <i> : "Ç" U01D0 # LATIN SMALL LETTER I WITH CARON +<dead_caron> <O> : "Ç‘" U01D1 # LATIN CAPITAL LETTER O WITH CARON +<Multi_key> <c> <O> : "Ç‘" U01D1 # LATIN CAPITAL LETTER O WITH CARON +<dead_caron> <o> : "Ç’" U01D2 # LATIN SMALL LETTER O WITH CARON +<Multi_key> <c> <o> : "Ç’" U01D2 # LATIN SMALL LETTER O WITH CARON +<dead_caron> <U> : "Ç“" U01D3 # LATIN CAPITAL LETTER U WITH CARON +<Multi_key> <c> <U> : "Ç“" U01D3 # LATIN CAPITAL LETTER U WITH CARON +<dead_caron> <u> : "Ç”" U01D4 # LATIN SMALL LETTER U WITH CARON +<Multi_key> <c> <u> : "Ç”" U01D4 # LATIN SMALL LETTER U WITH CARON +<dead_macron> <Udiaeresis> : "Ç•" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <macron> <Udiaeresis> : "Ç•" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <Udiaeresis> : "Ç•" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON +<dead_macron> <dead_diaeresis> <U> : "Ç•" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON +<dead_macron> <Multi_key> <quotedbl> <U> : "Ç•" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <macron> <dead_diaeresis> <U> : "Ç•" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <macron> <quotedbl> <U> : "Ç•" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <dead_diaeresis> <U> : "Ç•" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <quotedbl> <U> : "Ç•" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON +<dead_macron> <udiaeresis> : "Ç–" U01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <macron> <udiaeresis> : "Ç–" U01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <udiaeresis> : "Ç–" U01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +<dead_macron> <dead_diaeresis> <u> : "Ç–" U01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +<dead_macron> <Multi_key> <quotedbl> <u> : "Ç–" U01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <macron> <dead_diaeresis> <u> : "Ç–" U01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <macron> <quotedbl> <u> : "Ç–" U01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <dead_diaeresis> <u> : "Ç–" U01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <quotedbl> <u> : "Ç–" U01D6 # LATIN SMALL LETTER U WITH DIAERESIS AND MACRON +<dead_acute> <Udiaeresis> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <Udiaeresis> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <Udiaeresis> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<dead_acute> <dead_diaeresis> <U> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<dead_acute> <Multi_key> <quotedbl> <U> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <dead_diaeresis> <U> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <quotedbl> <U> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <dead_diaeresis> <U> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <quotedbl> <U> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<combining_acute> <Udiaeresis> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<combining_acute> <dead_diaeresis> <U> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<combining_acute> <Multi_key> <quotedbl> <U> : "Ç—" U01D7 # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE +<dead_acute> <udiaeresis> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <udiaeresis> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <udiaeresis> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<dead_acute> <dead_diaeresis> <u> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<dead_acute> <Multi_key> <quotedbl> <u> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <dead_diaeresis> <u> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <quotedbl> <u> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <dead_diaeresis> <u> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <quotedbl> <u> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<combining_acute> <udiaeresis> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<combining_acute> <dead_diaeresis> <u> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<combining_acute> <Multi_key> <quotedbl> <u> : "ǘ" U01D8 # LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE +<dead_caron> <Udiaeresis> : "Ç™" U01D9 # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON +<Multi_key> <c> <Udiaeresis> : "Ç™" U01D9 # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON +<dead_caron> <dead_diaeresis> <U> : "Ç™" U01D9 # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON +<dead_caron> <Multi_key> <quotedbl> <U> : "Ç™" U01D9 # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON +<Multi_key> <c> <dead_diaeresis> <U> : "Ç™" U01D9 # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON +<Multi_key> <c> <quotedbl> <U> : "Ç™" U01D9 # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON +<dead_caron> <udiaeresis> : "Çš" U01DA # LATIN SMALL LETTER U WITH DIAERESIS AND CARON +<Multi_key> <c> <udiaeresis> : "Çš" U01DA # LATIN SMALL LETTER U WITH DIAERESIS AND CARON +<dead_caron> <dead_diaeresis> <u> : "Çš" U01DA # LATIN SMALL LETTER U WITH DIAERESIS AND CARON +<dead_caron> <Multi_key> <quotedbl> <u> : "Çš" U01DA # LATIN SMALL LETTER U WITH DIAERESIS AND CARON +<Multi_key> <c> <dead_diaeresis> <u> : "Çš" U01DA # LATIN SMALL LETTER U WITH DIAERESIS AND CARON +<Multi_key> <c> <quotedbl> <u> : "Çš" U01DA # LATIN SMALL LETTER U WITH DIAERESIS AND CARON +<dead_grave> <Udiaeresis> : "Ç›" U01DB # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE +<Multi_key> <grave> <Udiaeresis> : "Ç›" U01DB # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE +<dead_grave> <dead_diaeresis> <U> : "Ç›" U01DB # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE +<dead_grave> <Multi_key> <quotedbl> <U> : "Ç›" U01DB # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE +<Multi_key> <grave> <dead_diaeresis> <U> : "Ç›" U01DB # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE +<Multi_key> <grave> <quotedbl> <U> : "Ç›" U01DB # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE +<combining_grave> <Udiaeresis> : "Ç›" U01DB # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE +<combining_grave> <dead_diaeresis> <U> : "Ç›" U01DB # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE +<combining_grave> <Multi_key> <quotedbl> <U> : "Ç›" U01DB # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE +<dead_grave> <udiaeresis> : "Çœ" U01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE +<Multi_key> <grave> <udiaeresis> : "Çœ" U01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE +<dead_grave> <dead_diaeresis> <u> : "Çœ" U01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE +<dead_grave> <Multi_key> <quotedbl> <u> : "Çœ" U01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE +<Multi_key> <grave> <dead_diaeresis> <u> : "Çœ" U01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE +<Multi_key> <grave> <quotedbl> <u> : "Çœ" U01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE +<combining_grave> <udiaeresis> : "Çœ" U01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE +<combining_grave> <dead_diaeresis> <u> : "Çœ" U01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE +<combining_grave> <Multi_key> <quotedbl> <u> : "Çœ" U01DC # LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE +<dead_macron> <Adiaeresis> : "Çž" U01DE # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <macron> <Adiaeresis> : "Çž" U01DE # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <Adiaeresis> : "Çž" U01DE # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON +<dead_macron> <dead_diaeresis> <A> : "Çž" U01DE # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON +<dead_macron> <Multi_key> <quotedbl> <A> : "Çž" U01DE # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <macron> <dead_diaeresis> <A> : "Çž" U01DE # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <macron> <quotedbl> <A> : "Çž" U01DE # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <dead_diaeresis> <A> : "Çž" U01DE # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <quotedbl> <A> : "Çž" U01DE # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON +<dead_macron> <adiaeresis> : "ÇŸ" U01DF # LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <macron> <adiaeresis> : "ÇŸ" U01DF # LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <adiaeresis> : "ÇŸ" U01DF # LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +<dead_macron> <dead_diaeresis> <a> : "ÇŸ" U01DF # LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +<dead_macron> <Multi_key> <quotedbl> <a> : "ÇŸ" U01DF # LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <macron> <dead_diaeresis> <a> : "ÇŸ" U01DF # LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <macron> <quotedbl> <a> : "ÇŸ" U01DF # LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <dead_diaeresis> <a> : "ÇŸ" U01DF # LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <quotedbl> <a> : "ÇŸ" U01DF # LATIN SMALL LETTER A WITH DIAERESIS AND MACRON +<dead_macron> <U0226> : "Ç " U01E0 # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <U0226> : "Ç " U01E0 # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <U0226> : "Ç " U01E0 # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON +<dead_macron> <dead_abovedot> <A> : "Ç " U01E0 # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON +<dead_macron> <Multi_key> <period> <A> : "Ç " U01E0 # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <dead_abovedot> <A> : "Ç " U01E0 # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <period> <A> : "Ç " U01E0 # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <dead_abovedot> <A> : "Ç " U01E0 # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <period> <A> : "Ç " U01E0 # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON +<dead_macron> <U0227> : "Ç¡" U01E1 # LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <U0227> : "Ç¡" U01E1 # LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <U0227> : "Ç¡" U01E1 # LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +<dead_macron> <dead_abovedot> <a> : "Ç¡" U01E1 # LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +<dead_macron> <Multi_key> <period> <a> : "Ç¡" U01E1 # LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <dead_abovedot> <a> : "Ç¡" U01E1 # LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <period> <a> : "Ç¡" U01E1 # LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <dead_abovedot> <a> : "Ç¡" U01E1 # LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <period> <a> : "Ç¡" U01E1 # LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON +<dead_macron> <AE> : "Ç¢" U01E2 # LATIN CAPITAL LETTER AE WITH MACRON +<Multi_key> <macron> <AE> : "Ç¢" U01E2 # LATIN CAPITAL LETTER AE WITH MACRON +<Multi_key> <underscore> <AE> : "Ç¢" U01E2 # LATIN CAPITAL LETTER AE WITH MACRON +<dead_macron> <ae> : "Ç£" U01E3 # LATIN SMALL LETTER AE WITH MACRON +<Multi_key> <macron> <ae> : "Ç£" U01E3 # LATIN SMALL LETTER AE WITH MACRON +<Multi_key> <underscore> <ae> : "Ç£" U01E3 # LATIN SMALL LETTER AE WITH MACRON +<Multi_key> <slash> <G> : "Ǥ" U01E4 # LATIN CAPITAL LETTER G WITH STROKE +<Multi_key> <KP_Divide> <G> : "Ǥ" U01E4 # LATIN CAPITAL LETTER G WITH STROKE +<Multi_key> <slash> <g> : "Ç¥" U01E5 # LATIN SMALL LETTER G WITH STROKE +<Multi_key> <KP_Divide> <g> : "Ç¥" U01E5 # LATIN SMALL LETTER G WITH STROKE +<dead_caron> <G> : "Ǧ" U01E6 # LATIN CAPITAL LETTER G WITH CARON +<Multi_key> <c> <G> : "Ǧ" U01E6 # LATIN CAPITAL LETTER G WITH CARON +<dead_caron> <g> : "ǧ" U01E7 # LATIN SMALL LETTER G WITH CARON +<Multi_key> <c> <g> : "ǧ" U01E7 # LATIN SMALL LETTER G WITH CARON +<dead_caron> <K> : "Ǩ" U01E8 # LATIN CAPITAL LETTER K WITH CARON +<Multi_key> <c> <K> : "Ǩ" U01E8 # LATIN CAPITAL LETTER K WITH CARON +<dead_caron> <k> : "Ç©" U01E9 # LATIN SMALL LETTER K WITH CARON +<Multi_key> <c> <k> : "Ç©" U01E9 # LATIN SMALL LETTER K WITH CARON +<dead_ogonek> <O> : "Ǫ" U01EA # LATIN CAPITAL LETTER O WITH OGONEK +<Multi_key> <semicolon> <O> : "Ǫ" U01EA # LATIN CAPITAL LETTER O WITH OGONEK +<dead_ogonek> <o> : "Ç«" U01EB # LATIN SMALL LETTER O WITH OGONEK +<Multi_key> <semicolon> <o> : "Ç«" U01EB # LATIN SMALL LETTER O WITH OGONEK +<dead_macron> <U01ea> : "Ǭ" U01EC # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON +<Multi_key> <macron> <U01ea> : "Ǭ" U01EC # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON +<Multi_key> <underscore> <U01ea> : "Ǭ" U01EC # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON +<dead_macron> <dead_ogonek> <O> : "Ǭ" U01EC # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON +<dead_macron> <Multi_key> <semicolon> <O> : "Ǭ" U01EC # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON +<Multi_key> <macron> <dead_ogonek> <O> : "Ǭ" U01EC # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON +<Multi_key> <macron> <semicolon> <O> : "Ǭ" U01EC # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON +<Multi_key> <underscore> <dead_ogonek> <O> : "Ǭ" U01EC # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON +<Multi_key> <underscore> <semicolon> <O> : "Ǭ" U01EC # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON +<dead_macron> <U01eb> : "Ç­" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON +<Multi_key> <macron> <U01eb> : "Ç­" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON +<Multi_key> <underscore> <U01eb> : "Ç­" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON +<dead_macron> <dead_ogonek> <o> : "Ç­" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON +<dead_macron> <Multi_key> <semicolon> <o> : "Ç­" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON +<Multi_key> <macron> <dead_ogonek> <o> : "Ç­" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON +<Multi_key> <macron> <semicolon> <o> : "Ç­" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON +<Multi_key> <underscore> <dead_ogonek> <o> : "Ç­" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON +<Multi_key> <underscore> <semicolon> <o> : "Ç­" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON +<dead_caron> <U01b7> : "Ç®" U01EE # LATIN CAPITAL LETTER EZH WITH CARON +<Multi_key> <c> <U01b7> : "Ç®" U01EE # LATIN CAPITAL LETTER EZH WITH CARON +<dead_caron> <U0292> : "ǯ" U01EF # LATIN SMALL LETTER EZH WITH CARON +<Multi_key> <c> <U0292> : "ǯ" U01EF # LATIN SMALL LETTER EZH WITH CARON +<dead_caron> <j> : "Ç°" U01F0 # LATIN SMALL LETTER J WITH CARON +<Multi_key> <c> <j> : "Ç°" U01F0 # LATIN SMALL LETTER J WITH CARON +<dead_acute> <G> : "Ç´" U01F4 # LATIN CAPITAL LETTER G WITH ACUTE +<Multi_key> <acute> <G> : "Ç´" U01F4 # LATIN CAPITAL LETTER G WITH ACUTE +<Multi_key> <apostrophe> <G> : "Ç´" U01F4 # LATIN CAPITAL LETTER G WITH ACUTE +<combining_acute> <G> : "Ç´" U01F4 # LATIN CAPITAL LETTER G WITH ACUTE +<dead_acute> <g> : "ǵ" U01F5 # LATIN SMALL LETTER G WITH ACUTE +<Multi_key> <acute> <g> : "ǵ" U01F5 # LATIN SMALL LETTER G WITH ACUTE +<Multi_key> <apostrophe> <g> : "ǵ" U01F5 # LATIN SMALL LETTER G WITH ACUTE +<combining_acute> <g> : "ǵ" U01F5 # LATIN SMALL LETTER G WITH ACUTE +<dead_grave> <N> : "Ǹ" U01F8 # LATIN CAPITAL LETTER N WITH GRAVE +<Multi_key> <grave> <N> : "Ǹ" U01F8 # LATIN CAPITAL LETTER N WITH GRAVE +<combining_grave> <N> : "Ǹ" U01F8 # LATIN CAPITAL LETTER N WITH GRAVE +<dead_grave> <n> : "ǹ" U01F9 # LATIN SMALL LETTER N WITH GRAVE +<Multi_key> <grave> <n> : "ǹ" U01F9 # LATIN SMALL LETTER N WITH GRAVE +<combining_grave> <n> : "ǹ" U01F9 # LATIN SMALL LETTER N WITH GRAVE +<dead_acute> <Aring> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <acute> <Aring> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <apostrophe> <Aring> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<dead_acute> <dead_abovering> <A> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<dead_acute> <Multi_key> <o> <A> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <acute> <dead_abovering> <A> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <acute> <o> <A> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <apostrophe> <dead_abovering> <A> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <apostrophe> <o> <A> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<combining_acute> <Aring> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<combining_acute> <dead_abovering> <A> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<combining_acute> <Multi_key> <o> <A> : "Ǻ" U01FA # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE +<dead_acute> <aring> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <acute> <aring> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <apostrophe> <aring> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<dead_acute> <dead_abovering> <a> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<dead_acute> <Multi_key> <o> <a> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <acute> <dead_abovering> <a> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <acute> <o> <a> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <apostrophe> <dead_abovering> <a> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<Multi_key> <apostrophe> <o> <a> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<combining_acute> <aring> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<combining_acute> <dead_abovering> <a> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<combining_acute> <Multi_key> <o> <a> : "Ç»" U01FB # LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE +<dead_acute> <AE> : "Ǽ" U01FC # LATIN CAPITAL LETTER AE WITH ACUTE +<Multi_key> <acute> <AE> : "Ǽ" U01FC # LATIN CAPITAL LETTER AE WITH ACUTE +<Multi_key> <apostrophe> <AE> : "Ǽ" U01FC # LATIN CAPITAL LETTER AE WITH ACUTE +<combining_acute> <AE> : "Ǽ" U01FC # LATIN CAPITAL LETTER AE WITH ACUTE +<dead_acute> <ae> : "ǽ" U01FD # LATIN SMALL LETTER AE WITH ACUTE +<Multi_key> <acute> <ae> : "ǽ" U01FD # LATIN SMALL LETTER AE WITH ACUTE +<Multi_key> <apostrophe> <ae> : "ǽ" U01FD # LATIN SMALL LETTER AE WITH ACUTE +<combining_acute> <ae> : "ǽ" U01FD # LATIN SMALL LETTER AE WITH ACUTE +<dead_acute> <Ooblique> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<Multi_key> <acute> <Ooblique> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<Multi_key> <apostrophe> <Ooblique> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<dead_acute> <Multi_key> <slash> <O> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<Multi_key> <acute> <slash> <O> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<Multi_key> <apostrophe> <slash> <O> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<dead_acute> <Multi_key> <KP_Divide> <O> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<Multi_key> <acute> <KP_Divide> <O> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<Multi_key> <apostrophe> <KP_Divide> <O> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<combining_acute> <Ooblique> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<combining_acute> <Multi_key> <slash> <O> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<combining_acute> <Multi_key> <KP_Divide> <O> : "Ǿ" U01FE # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE +<dead_acute> <oslash> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<Multi_key> <acute> <oslash> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<Multi_key> <apostrophe> <oslash> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<dead_acute> <Multi_key> <slash> <o> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<Multi_key> <acute> <slash> <o> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<Multi_key> <apostrophe> <slash> <o> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<dead_acute> <Multi_key> <KP_Divide> <o> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<Multi_key> <acute> <KP_Divide> <o> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<Multi_key> <apostrophe> <KP_Divide> <o> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<combining_acute> <oslash> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<combining_acute> <Multi_key> <slash> <o> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<combining_acute> <Multi_key> <KP_Divide> <o> : "Ç¿" U01FF # LATIN SMALL LETTER O WITH STROKE AND ACUTE +<U030f> <A> : "È€" U0200 # LATIN CAPITAL LETTER A WITH DOUBLE GRAVE +<U030f> <a> : "È" U0201 # LATIN SMALL LETTER A WITH DOUBLE GRAVE +<U0311> <A> : "È‚" U0202 # LATIN CAPITAL LETTER A WITH INVERTED BREVE +<U0311> <a> : "ȃ" U0203 # LATIN SMALL LETTER A WITH INVERTED BREVE +<U030f> <E> : "È„" U0204 # LATIN CAPITAL LETTER E WITH DOUBLE GRAVE +<U030f> <e> : "È…" U0205 # LATIN SMALL LETTER E WITH DOUBLE GRAVE +<U0311> <E> : "Ȇ" U0206 # LATIN CAPITAL LETTER E WITH INVERTED BREVE +<U0311> <e> : "ȇ" U0207 # LATIN SMALL LETTER E WITH INVERTED BREVE +<U030f> <I> : "Ȉ" U0208 # LATIN CAPITAL LETTER I WITH DOUBLE GRAVE +<U030f> <i> : "ȉ" U0209 # LATIN SMALL LETTER I WITH DOUBLE GRAVE +<U0311> <I> : "ÈŠ" U020A # LATIN CAPITAL LETTER I WITH INVERTED BREVE +<U0311> <i> : "È‹" U020B # LATIN SMALL LETTER I WITH INVERTED BREVE +<U030f> <O> : "ÈŒ" U020C # LATIN CAPITAL LETTER O WITH DOUBLE GRAVE +<U030f> <o> : "È" U020D # LATIN SMALL LETTER O WITH DOUBLE GRAVE +<U0311> <O> : "ÈŽ" U020E # LATIN CAPITAL LETTER O WITH INVERTED BREVE +<U0311> <o> : "È" U020F # LATIN SMALL LETTER O WITH INVERTED BREVE +<U030f> <R> : "È" U0210 # LATIN CAPITAL LETTER R WITH DOUBLE GRAVE +<U030f> <r> : "È‘" U0211 # LATIN SMALL LETTER R WITH DOUBLE GRAVE +<U0311> <R> : "È’" U0212 # LATIN CAPITAL LETTER R WITH INVERTED BREVE +<U0311> <r> : "È“" U0213 # LATIN SMALL LETTER R WITH INVERTED BREVE +<U030f> <U> : "È”" U0214 # LATIN CAPITAL LETTER U WITH DOUBLE GRAVE +<U030f> <u> : "È•" U0215 # LATIN SMALL LETTER U WITH DOUBLE GRAVE +<U0311> <U> : "È–" U0216 # LATIN CAPITAL LETTER U WITH INVERTED BREVE +<U0311> <u> : "È—" U0217 # LATIN SMALL LETTER U WITH INVERTED BREVE +<U0326> <S> : "Ș" U0218 # LATIN CAPITAL LETTER S WITH COMMA BELOW +<U0326> <s> : "È™" U0219 # LATIN SMALL LETTER S WITH COMMA BELOW +<U0326> <T> : "Èš" U021A # LATIN CAPITAL LETTER T WITH COMMA BELOW +<U0326> <t> : "È›" U021B # LATIN SMALL LETTER T WITH COMMA BELOW +<dead_caron> <H> : "Èž" U021E # LATIN CAPITAL LETTER H WITH CARON +<Multi_key> <c> <H> : "Èž" U021E # LATIN CAPITAL LETTER H WITH CARON +<dead_caron> <h> : "ÈŸ" U021F # LATIN SMALL LETTER H WITH CARON +<Multi_key> <c> <h> : "ÈŸ" U021F # LATIN SMALL LETTER H WITH CARON +<dead_abovedot> <A> : "Ȧ" U0226 # LATIN CAPITAL LETTER A WITH DOT ABOVE +<Multi_key> <period> <A> : "Ȧ" U0226 # LATIN CAPITAL LETTER A WITH DOT ABOVE +<dead_abovedot> <a> : "ȧ" U0227 # LATIN SMALL LETTER A WITH DOT ABOVE +<Multi_key> <period> <a> : "ȧ" U0227 # LATIN SMALL LETTER A WITH DOT ABOVE +<dead_cedilla> <E> : "Ȩ" U0228 # LATIN CAPITAL LETTER E WITH CEDILLA +<Multi_key> <comma> <E> : "Ȩ" U0228 # LATIN CAPITAL LETTER E WITH CEDILLA +<dead_cedilla> <e> : "È©" U0229 # LATIN SMALL LETTER E WITH CEDILLA +<Multi_key> <comma> <e> : "È©" U0229 # LATIN SMALL LETTER E WITH CEDILLA +<dead_macron> <Odiaeresis> : "Ȫ" U022A # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <macron> <Odiaeresis> : "Ȫ" U022A # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <Odiaeresis> : "Ȫ" U022A # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON +<dead_macron> <dead_diaeresis> <O> : "Ȫ" U022A # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON +<dead_macron> <Multi_key> <quotedbl> <O> : "Ȫ" U022A # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <macron> <dead_diaeresis> <O> : "Ȫ" U022A # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <macron> <quotedbl> <O> : "Ȫ" U022A # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <dead_diaeresis> <O> : "Ȫ" U022A # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <quotedbl> <O> : "Ȫ" U022A # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON +<dead_macron> <odiaeresis> : "È«" U022B # LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <macron> <odiaeresis> : "È«" U022B # LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <odiaeresis> : "È«" U022B # LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +<dead_macron> <dead_diaeresis> <o> : "È«" U022B # LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +<dead_macron> <Multi_key> <quotedbl> <o> : "È«" U022B # LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <macron> <dead_diaeresis> <o> : "È«" U022B # LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <macron> <quotedbl> <o> : "È«" U022B # LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <dead_diaeresis> <o> : "È«" U022B # LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +<Multi_key> <underscore> <quotedbl> <o> : "È«" U022B # LATIN SMALL LETTER O WITH DIAERESIS AND MACRON +<dead_macron> <Otilde> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<Multi_key> <macron> <Otilde> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<Multi_key> <underscore> <Otilde> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<dead_macron> <dead_tilde> <O> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<dead_macron> <Multi_key> <asciitilde> <O> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<Multi_key> <macron> <dead_tilde> <O> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<Multi_key> <macron> <asciitilde> <O> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<Multi_key> <underscore> <dead_tilde> <O> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<Multi_key> <underscore> <asciitilde> <O> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<dead_macron> <combining_tilde> <O> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<Multi_key> <macron> <combining_tilde> <O> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<Multi_key> <underscore> <combining_tilde> <O> : "Ȭ" U022C # LATIN CAPITAL LETTER O WITH TILDE AND MACRON +<dead_macron> <otilde> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<Multi_key> <macron> <otilde> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<Multi_key> <underscore> <otilde> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<dead_macron> <dead_tilde> <o> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<dead_macron> <Multi_key> <asciitilde> <o> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<Multi_key> <macron> <dead_tilde> <o> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<Multi_key> <macron> <asciitilde> <o> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<Multi_key> <underscore> <dead_tilde> <o> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<Multi_key> <underscore> <asciitilde> <o> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<dead_macron> <combining_tilde> <o> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<Multi_key> <macron> <combining_tilde> <o> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<Multi_key> <underscore> <combining_tilde> <o> : "È­" U022D # LATIN SMALL LETTER O WITH TILDE AND MACRON +<dead_abovedot> <O> : "È®" U022E # LATIN CAPITAL LETTER O WITH DOT ABOVE +<Multi_key> <period> <O> : "È®" U022E # LATIN CAPITAL LETTER O WITH DOT ABOVE +<dead_abovedot> <o> : "ȯ" U022F # LATIN SMALL LETTER O WITH DOT ABOVE +<Multi_key> <period> <o> : "ȯ" U022F # LATIN SMALL LETTER O WITH DOT ABOVE +<dead_macron> <U022e> : "È°" U0230 # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <U022e> : "È°" U0230 # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <U022e> : "È°" U0230 # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON +<dead_macron> <dead_abovedot> <O> : "È°" U0230 # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON +<dead_macron> <Multi_key> <period> <O> : "È°" U0230 # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <dead_abovedot> <O> : "È°" U0230 # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <period> <O> : "È°" U0230 # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <dead_abovedot> <O> : "È°" U0230 # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <period> <O> : "È°" U0230 # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON +<dead_macron> <U022f> : "ȱ" U0231 # LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <U022f> : "ȱ" U0231 # LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <U022f> : "ȱ" U0231 # LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +<dead_macron> <dead_abovedot> <o> : "ȱ" U0231 # LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +<dead_macron> <Multi_key> <period> <o> : "ȱ" U0231 # LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <dead_abovedot> <o> : "ȱ" U0231 # LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <macron> <period> <o> : "ȱ" U0231 # LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <dead_abovedot> <o> : "ȱ" U0231 # LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +<Multi_key> <underscore> <period> <o> : "ȱ" U0231 # LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON +<dead_macron> <Y> : "Ȳ" U0232 # LATIN CAPITAL LETTER Y WITH MACRON +<Multi_key> <macron> <Y> : "Ȳ" U0232 # LATIN CAPITAL LETTER Y WITH MACRON +<Multi_key> <underscore> <Y> : "Ȳ" U0232 # LATIN CAPITAL LETTER Y WITH MACRON +<dead_macron> <y> : "ȳ" U0233 # LATIN SMALL LETTER Y WITH MACRON +<Multi_key> <macron> <y> : "ȳ" U0233 # LATIN SMALL LETTER Y WITH MACRON +<Multi_key> <underscore> <y> : "ȳ" U0233 # LATIN SMALL LETTER Y WITH MACRON +<Multi_key> <slash> <i> : "ɨ" U0268 # LATIN SMALL LETTER I WITH STROKE +<Multi_key> <KP_Divide> <i> : "ɨ" U0268 # LATIN SMALL LETTER I WITH STROKE +<Multi_key> <slash> <U0294> : "Ê¡" U02A1 # LATIN LETTER GLOTTAL STOP WITH STROKE +<Multi_key> <KP_Divide> <U0294> : "Ê¡" U02A1 # LATIN LETTER GLOTTAL STOP WITH STROKE +<dead_circumflex> <Multi_key> <underscore> <h> : "Ê°" U02B0 # MODIFIER LETTER SMALL H +<Multi_key> <asciicircum> <underscore> <h> : "Ê°" U02B0 # MODIFIER LETTER SMALL H +<dead_circumflex> <Multi_key> <underbar> <h> : "Ê°" U02B0 # MODIFIER LETTER SMALL H +<Multi_key> <asciicircum> <underbar> <h> : "Ê°" U02B0 # MODIFIER LETTER SMALL H +<dead_circumflex> <Multi_key> <underscore> <U0266> : "ʱ" U02B1 # MODIFIER LETTER SMALL H WITH HOOK +<Multi_key> <asciicircum> <underscore> <U0266> : "ʱ" U02B1 # MODIFIER LETTER SMALL H WITH HOOK +<dead_circumflex> <Multi_key> <underbar> <U0266> : "ʱ" U02B1 # MODIFIER LETTER SMALL H WITH HOOK +<Multi_key> <asciicircum> <underbar> <U0266> : "ʱ" U02B1 # MODIFIER LETTER SMALL H WITH HOOK +<dead_circumflex> <Multi_key> <underscore> <j> : "ʲ" U02B2 # MODIFIER LETTER SMALL J +<Multi_key> <asciicircum> <underscore> <j> : "ʲ" U02B2 # MODIFIER LETTER SMALL J +<dead_circumflex> <Multi_key> <underbar> <j> : "ʲ" U02B2 # MODIFIER LETTER SMALL J +<Multi_key> <asciicircum> <underbar> <j> : "ʲ" U02B2 # MODIFIER LETTER SMALL J +<dead_circumflex> <Multi_key> <underscore> <r> : "ʳ" U02B3 # MODIFIER LETTER SMALL R +<Multi_key> <asciicircum> <underscore> <r> : "ʳ" U02B3 # MODIFIER LETTER SMALL R +<dead_circumflex> <Multi_key> <underbar> <r> : "ʳ" U02B3 # MODIFIER LETTER SMALL R +<Multi_key> <asciicircum> <underbar> <r> : "ʳ" U02B3 # MODIFIER LETTER SMALL R +<dead_circumflex> <Multi_key> <underscore> <U0279> : "Ê´" U02B4 # MODIFIER LETTER SMALL TURNED R +<Multi_key> <asciicircum> <underscore> <U0279> : "Ê´" U02B4 # MODIFIER LETTER SMALL TURNED R +<dead_circumflex> <Multi_key> <underbar> <U0279> : "Ê´" U02B4 # MODIFIER LETTER SMALL TURNED R +<Multi_key> <asciicircum> <underbar> <U0279> : "Ê´" U02B4 # MODIFIER LETTER SMALL TURNED R +<dead_circumflex> <Multi_key> <underscore> <U027b> : "ʵ" U02B5 # MODIFIER LETTER SMALL TURNED R WITH HOOK +<Multi_key> <asciicircum> <underscore> <U027b> : "ʵ" U02B5 # MODIFIER LETTER SMALL TURNED R WITH HOOK +<dead_circumflex> <Multi_key> <underbar> <U027b> : "ʵ" U02B5 # MODIFIER LETTER SMALL TURNED R WITH HOOK +<Multi_key> <asciicircum> <underbar> <U027b> : "ʵ" U02B5 # MODIFIER LETTER SMALL TURNED R WITH HOOK +<dead_circumflex> <Multi_key> <underscore> <U0281> : "ʶ" U02B6 # MODIFIER LETTER SMALL CAPITAL INVERTED R +<Multi_key> <asciicircum> <underscore> <U0281> : "ʶ" U02B6 # MODIFIER LETTER SMALL CAPITAL INVERTED R +<dead_circumflex> <Multi_key> <underbar> <U0281> : "ʶ" U02B6 # MODIFIER LETTER SMALL CAPITAL INVERTED R +<Multi_key> <asciicircum> <underbar> <U0281> : "ʶ" U02B6 # MODIFIER LETTER SMALL CAPITAL INVERTED R +<dead_circumflex> <Multi_key> <underscore> <w> : "Ê·" U02B7 # MODIFIER LETTER SMALL W +<Multi_key> <asciicircum> <underscore> <w> : "Ê·" U02B7 # MODIFIER LETTER SMALL W +<dead_circumflex> <Multi_key> <underbar> <w> : "Ê·" U02B7 # MODIFIER LETTER SMALL W +<Multi_key> <asciicircum> <underbar> <w> : "Ê·" U02B7 # MODIFIER LETTER SMALL W +<dead_circumflex> <Multi_key> <underscore> <y> : "ʸ" U02B8 # MODIFIER LETTER SMALL Y +<Multi_key> <asciicircum> <underscore> <y> : "ʸ" U02B8 # MODIFIER LETTER SMALL Y +<dead_circumflex> <Multi_key> <underbar> <y> : "ʸ" U02B8 # MODIFIER LETTER SMALL Y +<Multi_key> <asciicircum> <underbar> <y> : "ʸ" U02B8 # MODIFIER LETTER SMALL Y +<dead_circumflex> <Multi_key> <underscore> <U0263> : "Ë " U02E0 # MODIFIER LETTER SMALL GAMMA +<Multi_key> <asciicircum> <underscore> <U0263> : "Ë " U02E0 # MODIFIER LETTER SMALL GAMMA +<dead_circumflex> <Multi_key> <underbar> <U0263> : "Ë " U02E0 # MODIFIER LETTER SMALL GAMMA +<Multi_key> <asciicircum> <underbar> <U0263> : "Ë " U02E0 # MODIFIER LETTER SMALL GAMMA +<dead_circumflex> <Multi_key> <underscore> <l> : "Ë¡" U02E1 # MODIFIER LETTER SMALL L +<Multi_key> <asciicircum> <underscore> <l> : "Ë¡" U02E1 # MODIFIER LETTER SMALL L +<dead_circumflex> <Multi_key> <underbar> <l> : "Ë¡" U02E1 # MODIFIER LETTER SMALL L +<Multi_key> <asciicircum> <underbar> <l> : "Ë¡" U02E1 # MODIFIER LETTER SMALL L +<dead_circumflex> <Multi_key> <underscore> <s> : "Ë¢" U02E2 # MODIFIER LETTER SMALL S +<Multi_key> <asciicircum> <underscore> <s> : "Ë¢" U02E2 # MODIFIER LETTER SMALL S +<dead_circumflex> <Multi_key> <underbar> <s> : "Ë¢" U02E2 # MODIFIER LETTER SMALL S +<Multi_key> <asciicircum> <underbar> <s> : "Ë¢" U02E2 # MODIFIER LETTER SMALL S +<dead_circumflex> <Multi_key> <underscore> <x> : "Ë£" U02E3 # MODIFIER LETTER SMALL X +<Multi_key> <asciicircum> <underscore> <x> : "Ë£" U02E3 # MODIFIER LETTER SMALL X +<dead_circumflex> <Multi_key> <underbar> <x> : "Ë£" U02E3 # MODIFIER LETTER SMALL X +<Multi_key> <asciicircum> <underbar> <x> : "Ë£" U02E3 # MODIFIER LETTER SMALL X +<dead_circumflex> <Multi_key> <underscore> <U0295> : "ˤ" U02E4 # MODIFIER LETTER SMALL REVERSED GLOTTAL STOP +<Multi_key> <asciicircum> <underscore> <U0295> : "ˤ" U02E4 # MODIFIER LETTER SMALL REVERSED GLOTTAL STOP +<dead_circumflex> <Multi_key> <underbar> <U0295> : "ˤ" U02E4 # MODIFIER LETTER SMALL REVERSED GLOTTAL STOP +<Multi_key> <asciicircum> <underbar> <U0295> : "ˤ" U02E4 # MODIFIER LETTER SMALL REVERSED GLOTTAL STOP +<dead_diaeresis> <acute> : "Í„" U0344 # COMBINING GREEK DIALYTIKA TONOS +<dead_diaeresis> <apostrophe> : "Í„" U0344 # COMBINING GREEK DIALYTIKA TONOS +<Multi_key> <quotedbl> <dead_acute> : "Í„" U0344 # COMBINING GREEK DIALYTIKA TONOS +<Multi_key> <quotedbl> <acute> : "Í„" U0344 # COMBINING GREEK DIALYTIKA TONOS +<Multi_key> <quotedbl> <apostrophe> : "Í„" U0344 # COMBINING GREEK DIALYTIKA TONOS +<Multi_key> <quotedbl> <combining_acute> : "Í„" U0344 # COMBINING GREEK DIALYTIKA TONOS +<Multi_key> <diaeresis> <dead_acute> : "Î…" U0385 # GREEK DIALYTIKA TONOS +<Multi_key> <diaeresis> <acute> : "Î…" U0385 # GREEK DIALYTIKA TONOS +<Multi_key> <diaeresis> <apostrophe> : "Î…" U0385 # GREEK DIALYTIKA TONOS +<Multi_key> <diaeresis> <combining_acute> : "Î…" U0385 # GREEK DIALYTIKA TONOS +<dead_acute> <Greek_ALPHA> : "Ά" U0386 # GREEK CAPITAL LETTER ALPHA WITH TONOS +<Multi_key> <acute> <Greek_ALPHA> : "Ά" U0386 # GREEK CAPITAL LETTER ALPHA WITH TONOS +<Multi_key> <apostrophe> <Greek_ALPHA> : "Ά" U0386 # GREEK CAPITAL LETTER ALPHA WITH TONOS +<combining_acute> <Greek_ALPHA> : "Ά" U0386 # GREEK CAPITAL LETTER ALPHA WITH TONOS +<dead_acute> <Greek_EPSILON> : "Έ" U0388 # GREEK CAPITAL LETTER EPSILON WITH TONOS +<Multi_key> <acute> <Greek_EPSILON> : "Έ" U0388 # GREEK CAPITAL LETTER EPSILON WITH TONOS +<Multi_key> <apostrophe> <Greek_EPSILON> : "Έ" U0388 # GREEK CAPITAL LETTER EPSILON WITH TONOS +<combining_acute> <Greek_EPSILON> : "Έ" U0388 # GREEK CAPITAL LETTER EPSILON WITH TONOS +<dead_acute> <Greek_ETA> : "Ή" U0389 # GREEK CAPITAL LETTER ETA WITH TONOS +<Multi_key> <acute> <Greek_ETA> : "Ή" U0389 # GREEK CAPITAL LETTER ETA WITH TONOS +<Multi_key> <apostrophe> <Greek_ETA> : "Ή" U0389 # GREEK CAPITAL LETTER ETA WITH TONOS +<combining_acute> <Greek_ETA> : "Ή" U0389 # GREEK CAPITAL LETTER ETA WITH TONOS +<dead_acute> <Greek_IOTA> : "Ί" U038A # GREEK CAPITAL LETTER IOTA WITH TONOS +<Multi_key> <acute> <Greek_IOTA> : "Ί" U038A # GREEK CAPITAL LETTER IOTA WITH TONOS +<Multi_key> <apostrophe> <Greek_IOTA> : "Ί" U038A # GREEK CAPITAL LETTER IOTA WITH TONOS +<combining_acute> <Greek_IOTA> : "Ί" U038A # GREEK CAPITAL LETTER IOTA WITH TONOS +<dead_acute> <Greek_OMICRON> : "ÎŒ" U038C # GREEK CAPITAL LETTER OMICRON WITH TONOS +<Multi_key> <acute> <Greek_OMICRON> : "ÎŒ" U038C # GREEK CAPITAL LETTER OMICRON WITH TONOS +<Multi_key> <apostrophe> <Greek_OMICRON> : "ÎŒ" U038C # GREEK CAPITAL LETTER OMICRON WITH TONOS +<combining_acute> <Greek_OMICRON> : "ÎŒ" U038C # GREEK CAPITAL LETTER OMICRON WITH TONOS +<dead_acute> <Greek_UPSILON> : "ÎŽ" U038E # GREEK CAPITAL LETTER UPSILON WITH TONOS +<Multi_key> <acute> <Greek_UPSILON> : "ÎŽ" U038E # GREEK CAPITAL LETTER UPSILON WITH TONOS +<Multi_key> <apostrophe> <Greek_UPSILON> : "ÎŽ" U038E # GREEK CAPITAL LETTER UPSILON WITH TONOS +<combining_acute> <Greek_UPSILON> : "ÎŽ" U038E # GREEK CAPITAL LETTER UPSILON WITH TONOS +<dead_acute> <Greek_OMEGA> : "Î" U038F # GREEK CAPITAL LETTER OMEGA WITH TONOS +<Multi_key> <acute> <Greek_OMEGA> : "Î" U038F # GREEK CAPITAL LETTER OMEGA WITH TONOS +<Multi_key> <apostrophe> <Greek_OMEGA> : "Î" U038F # GREEK CAPITAL LETTER OMEGA WITH TONOS +<combining_acute> <Greek_OMEGA> : "Î" U038F # GREEK CAPITAL LETTER OMEGA WITH TONOS +<dead_acute> <Greek_iotadieresis> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<Multi_key> <acute> <Greek_iotadieresis> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<Multi_key> <apostrophe> <Greek_iotadieresis> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<dead_acute> <dead_diaeresis> <Greek_iota> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<dead_acute> <Multi_key> <quotedbl> <Greek_iota> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<Multi_key> <acute> <dead_diaeresis> <Greek_iota> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<Multi_key> <acute> <quotedbl> <Greek_iota> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<Multi_key> <apostrophe> <dead_diaeresis> <Greek_iota> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<Multi_key> <apostrophe> <quotedbl> <Greek_iota> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<combining_acute> <Greek_iotadieresis> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<combining_acute> <dead_diaeresis> <Greek_iota> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<combining_acute> <Multi_key> <quotedbl> <Greek_iota> : "Î" U0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS +<dead_diaeresis> <Greek_IOTA> : "Ϊ" U03AA # GREEK CAPITAL LETTER IOTA WITH DIALYTIKA +<Multi_key> <quotedbl> <Greek_IOTA> : "Ϊ" U03AA # GREEK CAPITAL LETTER IOTA WITH DIALYTIKA +<dead_diaeresis> <Greek_UPSILON> : "Ϋ" U03AB # GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA +<Multi_key> <quotedbl> <Greek_UPSILON> : "Ϋ" U03AB # GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA +<dead_acute> <Greek_alpha> : "ά" U03AC # GREEK SMALL LETTER ALPHA WITH TONOS +<Multi_key> <acute> <Greek_alpha> : "ά" U03AC # GREEK SMALL LETTER ALPHA WITH TONOS +<Multi_key> <apostrophe> <Greek_alpha> : "ά" U03AC # GREEK SMALL LETTER ALPHA WITH TONOS +<combining_acute> <Greek_alpha> : "ά" U03AC # GREEK SMALL LETTER ALPHA WITH TONOS +<dead_acute> <Greek_epsilon> : "έ" U03AD # GREEK SMALL LETTER EPSILON WITH TONOS +<Multi_key> <acute> <Greek_epsilon> : "έ" U03AD # GREEK SMALL LETTER EPSILON WITH TONOS +<Multi_key> <apostrophe> <Greek_epsilon> : "έ" U03AD # GREEK SMALL LETTER EPSILON WITH TONOS +<combining_acute> <Greek_epsilon> : "έ" U03AD # GREEK SMALL LETTER EPSILON WITH TONOS +<dead_acute> <Greek_eta> : "ή" U03AE # GREEK SMALL LETTER ETA WITH TONOS +<Multi_key> <acute> <Greek_eta> : "ή" U03AE # GREEK SMALL LETTER ETA WITH TONOS +<Multi_key> <apostrophe> <Greek_eta> : "ή" U03AE # GREEK SMALL LETTER ETA WITH TONOS +<combining_acute> <Greek_eta> : "ή" U03AE # GREEK SMALL LETTER ETA WITH TONOS +<dead_acute> <Greek_iota> : "ί" U03AF # GREEK SMALL LETTER IOTA WITH TONOS +<Multi_key> <acute> <Greek_iota> : "ί" U03AF # GREEK SMALL LETTER IOTA WITH TONOS +<Multi_key> <apostrophe> <Greek_iota> : "ί" U03AF # GREEK SMALL LETTER IOTA WITH TONOS +<combining_acute> <Greek_iota> : "ί" U03AF # GREEK SMALL LETTER IOTA WITH TONOS +<dead_acute> <Greek_upsilondieresis> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<Multi_key> <acute> <Greek_upsilondieresis> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<Multi_key> <apostrophe> <Greek_upsilondieresis> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<dead_acute> <dead_diaeresis> <Greek_upsilon> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<dead_acute> <Multi_key> <quotedbl> <Greek_upsilon> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<Multi_key> <acute> <dead_diaeresis> <Greek_upsilon> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<Multi_key> <acute> <quotedbl> <Greek_upsilon> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<Multi_key> <apostrophe> <dead_diaeresis> <Greek_upsilon> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<Multi_key> <apostrophe> <quotedbl> <Greek_upsilon> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<combining_acute> <Greek_upsilondieresis> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<combining_acute> <dead_diaeresis> <Greek_upsilon> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<combining_acute> <Multi_key> <quotedbl> <Greek_upsilon> : "ΰ" U03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS +<dead_diaeresis> <Greek_iota> : "ÏŠ" U03CA # GREEK SMALL LETTER IOTA WITH DIALYTIKA +<Multi_key> <quotedbl> <Greek_iota> : "ÏŠ" U03CA # GREEK SMALL LETTER IOTA WITH DIALYTIKA +<dead_diaeresis> <Greek_upsilon> : "Ï‹" U03CB # GREEK SMALL LETTER UPSILON WITH DIALYTIKA +<Multi_key> <quotedbl> <Greek_upsilon> : "Ï‹" U03CB # GREEK SMALL LETTER UPSILON WITH DIALYTIKA +<dead_acute> <Greek_omicron> : "ÏŒ" U03CC # GREEK SMALL LETTER OMICRON WITH TONOS +<Multi_key> <acute> <Greek_omicron> : "ÏŒ" U03CC # GREEK SMALL LETTER OMICRON WITH TONOS +<Multi_key> <apostrophe> <Greek_omicron> : "ÏŒ" U03CC # GREEK SMALL LETTER OMICRON WITH TONOS +<combining_acute> <Greek_omicron> : "ÏŒ" U03CC # GREEK SMALL LETTER OMICRON WITH TONOS +<dead_acute> <Greek_upsilon> : "Ï" U03CD # GREEK SMALL LETTER UPSILON WITH TONOS +<Multi_key> <acute> <Greek_upsilon> : "Ï" U03CD # GREEK SMALL LETTER UPSILON WITH TONOS +<Multi_key> <apostrophe> <Greek_upsilon> : "Ï" U03CD # GREEK SMALL LETTER UPSILON WITH TONOS +<combining_acute> <Greek_upsilon> : "Ï" U03CD # GREEK SMALL LETTER UPSILON WITH TONOS +<dead_acute> <Greek_omega> : "ÏŽ" U03CE # GREEK SMALL LETTER OMEGA WITH TONOS +<Multi_key> <acute> <Greek_omega> : "ÏŽ" U03CE # GREEK SMALL LETTER OMEGA WITH TONOS +<Multi_key> <apostrophe> <Greek_omega> : "ÏŽ" U03CE # GREEK SMALL LETTER OMEGA WITH TONOS +<combining_acute> <Greek_omega> : "ÏŽ" U03CE # GREEK SMALL LETTER OMEGA WITH TONOS +<Multi_key> <acute> <U03d2> : "Ï“" U03D3 # GREEK UPSILON WITH ACUTE AND HOOK SYMBOL +<Multi_key> <apostrophe> <U03d2> : "Ï“" U03D3 # GREEK UPSILON WITH ACUTE AND HOOK SYMBOL +<Multi_key> <quotedbl> <U03d2> : "Ï”" U03D4 # GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL +<dead_grave> <Cyrillic_IE> : "Ѐ" U0400 # CYRILLIC CAPITAL LETTER IE WITH GRAVE +<Multi_key> <grave> <Cyrillic_IE> : "Ѐ" U0400 # CYRILLIC CAPITAL LETTER IE WITH GRAVE +<combining_grave> <Cyrillic_IE> : "Ѐ" U0400 # CYRILLIC CAPITAL LETTER IE WITH GRAVE +<dead_diaeresis> <Cyrillic_IE> : "Ð" U0401 # CYRILLIC CAPITAL LETTER IO +<Multi_key> <quotedbl> <Cyrillic_IE> : "Ð" U0401 # CYRILLIC CAPITAL LETTER IO +<dead_acute> <Cyrillic_GHE> : "Ѓ" U0403 # CYRILLIC CAPITAL LETTER GJE +<Multi_key> <acute> <Cyrillic_GHE> : "Ѓ" U0403 # CYRILLIC CAPITAL LETTER GJE +<Multi_key> <apostrophe> <Cyrillic_GHE> : "Ѓ" U0403 # CYRILLIC CAPITAL LETTER GJE +<combining_acute> <Cyrillic_GHE> : "Ѓ" U0403 # CYRILLIC CAPITAL LETTER GJE +<dead_diaeresis> <Ukrainian_I> : "Ї" U0407 # CYRILLIC CAPITAL LETTER YI +<Multi_key> <quotedbl> <Ukrainian_I> : "Ї" U0407 # CYRILLIC CAPITAL LETTER YI +<dead_acute> <Cyrillic_KA> : "ÐŒ" U040C # CYRILLIC CAPITAL LETTER KJE +<Multi_key> <acute> <Cyrillic_KA> : "ÐŒ" U040C # CYRILLIC CAPITAL LETTER KJE +<Multi_key> <apostrophe> <Cyrillic_KA> : "ÐŒ" U040C # CYRILLIC CAPITAL LETTER KJE +<combining_acute> <Cyrillic_KA> : "ÐŒ" U040C # CYRILLIC CAPITAL LETTER KJE +<dead_grave> <Cyrillic_I> : "Ð" U040D # CYRILLIC CAPITAL LETTER I WITH GRAVE +<Multi_key> <grave> <Cyrillic_I> : "Ð" U040D # CYRILLIC CAPITAL LETTER I WITH GRAVE +<combining_grave> <Cyrillic_I> : "Ð" U040D # CYRILLIC CAPITAL LETTER I WITH GRAVE +<dead_breve> <Cyrillic_U> : "ÐŽ" U040E # CYRILLIC CAPITAL LETTER SHORT U +<Multi_key> <U> <Cyrillic_U> : "ÐŽ" U040E # CYRILLIC CAPITAL LETTER SHORT U +<Multi_key> <b> <Cyrillic_U> : "ÐŽ" U040E # CYRILLIC CAPITAL LETTER SHORT U +<dead_breve> <Cyrillic_I> : "Й" U0419 # CYRILLIC CAPITAL LETTER SHORT I +<Multi_key> <U> <Cyrillic_I> : "Й" U0419 # CYRILLIC CAPITAL LETTER SHORT I +<Multi_key> <b> <Cyrillic_I> : "Й" U0419 # CYRILLIC CAPITAL LETTER SHORT I +<dead_breve> <Cyrillic_i> : "й" U0439 # CYRILLIC SMALL LETTER SHORT I +<Multi_key> <U> <Cyrillic_i> : "й" U0439 # CYRILLIC SMALL LETTER SHORT I +<Multi_key> <b> <Cyrillic_i> : "й" U0439 # CYRILLIC SMALL LETTER SHORT I +<dead_grave> <Cyrillic_ie> : "Ñ" U0450 # CYRILLIC SMALL LETTER IE WITH GRAVE +<Multi_key> <grave> <Cyrillic_ie> : "Ñ" U0450 # CYRILLIC SMALL LETTER IE WITH GRAVE +<combining_grave> <Cyrillic_ie> : "Ñ" U0450 # CYRILLIC SMALL LETTER IE WITH GRAVE +<dead_diaeresis> <Cyrillic_ie> : "Ñ‘" U0451 # CYRILLIC SMALL LETTER IO +<Multi_key> <quotedbl> <Cyrillic_ie> : "Ñ‘" U0451 # CYRILLIC SMALL LETTER IO +<dead_acute> <Cyrillic_ghe> : "Ñ“" U0453 # CYRILLIC SMALL LETTER GJE +<Multi_key> <acute> <Cyrillic_ghe> : "Ñ“" U0453 # CYRILLIC SMALL LETTER GJE +<Multi_key> <apostrophe> <Cyrillic_ghe> : "Ñ“" U0453 # CYRILLIC SMALL LETTER GJE +<combining_acute> <Cyrillic_ghe> : "Ñ“" U0453 # CYRILLIC SMALL LETTER GJE +<dead_diaeresis> <Ukrainian_i> : "Ñ—" U0457 # CYRILLIC SMALL LETTER YI +<Multi_key> <quotedbl> <Ukrainian_i> : "Ñ—" U0457 # CYRILLIC SMALL LETTER YI +<dead_acute> <Cyrillic_ka> : "Ñœ" U045C # CYRILLIC SMALL LETTER KJE +<Multi_key> <acute> <Cyrillic_ka> : "Ñœ" U045C # CYRILLIC SMALL LETTER KJE +<Multi_key> <apostrophe> <Cyrillic_ka> : "Ñœ" U045C # CYRILLIC SMALL LETTER KJE +<combining_acute> <Cyrillic_ka> : "Ñœ" U045C # CYRILLIC SMALL LETTER KJE +<dead_grave> <Cyrillic_i> : "Ñ" U045D # CYRILLIC SMALL LETTER I WITH GRAVE +<Multi_key> <grave> <Cyrillic_i> : "Ñ" U045D # CYRILLIC SMALL LETTER I WITH GRAVE +<combining_grave> <Cyrillic_i> : "Ñ" U045D # CYRILLIC SMALL LETTER I WITH GRAVE +<dead_breve> <Cyrillic_u> : "Ñž" U045E # CYRILLIC SMALL LETTER SHORT U +<Multi_key> <U> <Cyrillic_u> : "Ñž" U045E # CYRILLIC SMALL LETTER SHORT U +<Multi_key> <b> <Cyrillic_u> : "Ñž" U045E # CYRILLIC SMALL LETTER SHORT U +<U030f> <U0474> : "Ѷ" U0476 # CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT +<U030f> <U0475> : "Ñ·" U0477 # CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT +<Multi_key> <slash> <Cyrillic_GHE> : "Ò’" U0492 # CYRILLIC CAPITAL LETTER GHE WITH STROKE +<Multi_key> <KP_Divide> <Cyrillic_GHE> : "Ò’" U0492 # CYRILLIC CAPITAL LETTER GHE WITH STROKE +<Multi_key> <slash> <Cyrillic_ghe> : "Ò“" U0493 # CYRILLIC SMALL LETTER GHE WITH STROKE +<Multi_key> <KP_Divide> <Cyrillic_ghe> : "Ò“" U0493 # CYRILLIC SMALL LETTER GHE WITH STROKE +<Multi_key> <slash> <Cyrillic_KA> : "Òž" U049E # CYRILLIC CAPITAL LETTER KA WITH STROKE +<Multi_key> <KP_Divide> <Cyrillic_KA> : "Òž" U049E # CYRILLIC CAPITAL LETTER KA WITH STROKE +<Multi_key> <slash> <Cyrillic_ka> : "ÒŸ" U049F # CYRILLIC SMALL LETTER KA WITH STROKE +<Multi_key> <KP_Divide> <Cyrillic_ka> : "ÒŸ" U049F # CYRILLIC SMALL LETTER KA WITH STROKE +<Multi_key> <slash> <U04ae> : "Ò°" U04B0 # CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE +<Multi_key> <KP_Divide> <U04ae> : "Ò°" U04B0 # CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE +<Multi_key> <slash> <U04af> : "Ò±" U04B1 # CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE +<Multi_key> <KP_Divide> <U04af> : "Ò±" U04B1 # CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE +<dead_breve> <Cyrillic_ZHE> : "Ó" U04C1 # CYRILLIC CAPITAL LETTER ZHE WITH BREVE +<Multi_key> <U> <Cyrillic_ZHE> : "Ó" U04C1 # CYRILLIC CAPITAL LETTER ZHE WITH BREVE +<Multi_key> <b> <Cyrillic_ZHE> : "Ó" U04C1 # CYRILLIC CAPITAL LETTER ZHE WITH BREVE +<dead_breve> <Cyrillic_zhe> : "Ó‚" U04C2 # CYRILLIC SMALL LETTER ZHE WITH BREVE +<Multi_key> <U> <Cyrillic_zhe> : "Ó‚" U04C2 # CYRILLIC SMALL LETTER ZHE WITH BREVE +<Multi_key> <b> <Cyrillic_zhe> : "Ó‚" U04C2 # CYRILLIC SMALL LETTER ZHE WITH BREVE +<dead_breve> <Cyrillic_A> : "Ó" U04D0 # CYRILLIC CAPITAL LETTER A WITH BREVE +<Multi_key> <U> <Cyrillic_A> : "Ó" U04D0 # CYRILLIC CAPITAL LETTER A WITH BREVE +<Multi_key> <b> <Cyrillic_A> : "Ó" U04D0 # CYRILLIC CAPITAL LETTER A WITH BREVE +<dead_breve> <Cyrillic_a> : "Ó‘" U04D1 # CYRILLIC SMALL LETTER A WITH BREVE +<Multi_key> <U> <Cyrillic_a> : "Ó‘" U04D1 # CYRILLIC SMALL LETTER A WITH BREVE +<Multi_key> <b> <Cyrillic_a> : "Ó‘" U04D1 # CYRILLIC SMALL LETTER A WITH BREVE +<dead_diaeresis> <Cyrillic_A> : "Ó’" U04D2 # CYRILLIC CAPITAL LETTER A WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_A> : "Ó’" U04D2 # CYRILLIC CAPITAL LETTER A WITH DIAERESIS +<dead_diaeresis> <Cyrillic_a> : "Ó“" U04D3 # CYRILLIC SMALL LETTER A WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_a> : "Ó“" U04D3 # CYRILLIC SMALL LETTER A WITH DIAERESIS +<dead_breve> <Cyrillic_IE> : "Ó–" U04D6 # CYRILLIC CAPITAL LETTER IE WITH BREVE +<Multi_key> <U> <Cyrillic_IE> : "Ó–" U04D6 # CYRILLIC CAPITAL LETTER IE WITH BREVE +<Multi_key> <b> <Cyrillic_IE> : "Ó–" U04D6 # CYRILLIC CAPITAL LETTER IE WITH BREVE +<dead_breve> <Cyrillic_ie> : "Ó—" U04D7 # CYRILLIC SMALL LETTER IE WITH BREVE +<Multi_key> <U> <Cyrillic_ie> : "Ó—" U04D7 # CYRILLIC SMALL LETTER IE WITH BREVE +<Multi_key> <b> <Cyrillic_ie> : "Ó—" U04D7 # CYRILLIC SMALL LETTER IE WITH BREVE +<dead_diaeresis> <U04d8> : "Óš" U04DA # CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS +<Multi_key> <quotedbl> <U04d8> : "Óš" U04DA # CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS +<dead_diaeresis> <U04d9> : "Ó›" U04DB # CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS +<Multi_key> <quotedbl> <U04d9> : "Ó›" U04DB # CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS +<dead_diaeresis> <Cyrillic_ZHE> : "Óœ" U04DC # CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_ZHE> : "Óœ" U04DC # CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS +<dead_diaeresis> <Cyrillic_zhe> : "Ó" U04DD # CYRILLIC SMALL LETTER ZHE WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_zhe> : "Ó" U04DD # CYRILLIC SMALL LETTER ZHE WITH DIAERESIS +<dead_diaeresis> <Cyrillic_ZE> : "Óž" U04DE # CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_ZE> : "Óž" U04DE # CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS +<dead_diaeresis> <Cyrillic_ze> : "ÓŸ" U04DF # CYRILLIC SMALL LETTER ZE WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_ze> : "ÓŸ" U04DF # CYRILLIC SMALL LETTER ZE WITH DIAERESIS +<dead_macron> <Cyrillic_I> : "Ó¢" U04E2 # CYRILLIC CAPITAL LETTER I WITH MACRON +<Multi_key> <macron> <Cyrillic_I> : "Ó¢" U04E2 # CYRILLIC CAPITAL LETTER I WITH MACRON +<Multi_key> <underscore> <Cyrillic_I> : "Ó¢" U04E2 # CYRILLIC CAPITAL LETTER I WITH MACRON +<dead_macron> <Cyrillic_i> : "Ó£" U04E3 # CYRILLIC SMALL LETTER I WITH MACRON +<Multi_key> <macron> <Cyrillic_i> : "Ó£" U04E3 # CYRILLIC SMALL LETTER I WITH MACRON +<Multi_key> <underscore> <Cyrillic_i> : "Ó£" U04E3 # CYRILLIC SMALL LETTER I WITH MACRON +<dead_diaeresis> <Cyrillic_I> : "Ó¤" U04E4 # CYRILLIC CAPITAL LETTER I WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_I> : "Ó¤" U04E4 # CYRILLIC CAPITAL LETTER I WITH DIAERESIS +<dead_diaeresis> <Cyrillic_i> : "Ó¥" U04E5 # CYRILLIC SMALL LETTER I WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_i> : "Ó¥" U04E5 # CYRILLIC SMALL LETTER I WITH DIAERESIS +<dead_diaeresis> <Cyrillic_O> : "Ó¦" U04E6 # CYRILLIC CAPITAL LETTER O WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_O> : "Ó¦" U04E6 # CYRILLIC CAPITAL LETTER O WITH DIAERESIS +<dead_diaeresis> <Cyrillic_o> : "Ó§" U04E7 # CYRILLIC SMALL LETTER O WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_o> : "Ó§" U04E7 # CYRILLIC SMALL LETTER O WITH DIAERESIS +<dead_diaeresis> <U04e8> : "Óª" U04EA # CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS +<Multi_key> <quotedbl> <U04e8> : "Óª" U04EA # CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS +<dead_diaeresis> <U04e9> : "Ó«" U04EB # CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS +<Multi_key> <quotedbl> <U04e9> : "Ó«" U04EB # CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS +<dead_diaeresis> <Cyrillic_E> : "Ó¬" U04EC # CYRILLIC CAPITAL LETTER E WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_E> : "Ó¬" U04EC # CYRILLIC CAPITAL LETTER E WITH DIAERESIS +<dead_diaeresis> <Cyrillic_e> : "Ó­" U04ED # CYRILLIC SMALL LETTER E WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_e> : "Ó­" U04ED # CYRILLIC SMALL LETTER E WITH DIAERESIS +<dead_macron> <Cyrillic_U> : "Ó®" U04EE # CYRILLIC CAPITAL LETTER U WITH MACRON +<Multi_key> <macron> <Cyrillic_U> : "Ó®" U04EE # CYRILLIC CAPITAL LETTER U WITH MACRON +<Multi_key> <underscore> <Cyrillic_U> : "Ó®" U04EE # CYRILLIC CAPITAL LETTER U WITH MACRON +<dead_macron> <Cyrillic_u> : "Ó¯" U04EF # CYRILLIC SMALL LETTER U WITH MACRON +<Multi_key> <macron> <Cyrillic_u> : "Ó¯" U04EF # CYRILLIC SMALL LETTER U WITH MACRON +<Multi_key> <underscore> <Cyrillic_u> : "Ó¯" U04EF # CYRILLIC SMALL LETTER U WITH MACRON +<dead_diaeresis> <Cyrillic_U> : "Ó°" U04F0 # CYRILLIC CAPITAL LETTER U WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_U> : "Ó°" U04F0 # CYRILLIC CAPITAL LETTER U WITH DIAERESIS +<dead_diaeresis> <Cyrillic_u> : "Ó±" U04F1 # CYRILLIC SMALL LETTER U WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_u> : "Ó±" U04F1 # CYRILLIC SMALL LETTER U WITH DIAERESIS +<dead_doubleacute> <Cyrillic_U> : "Ó²" U04F2 # CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE +<Multi_key> <equal> <Cyrillic_U> : "Ó²" U04F2 # CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE +<dead_doubleacute> <Cyrillic_u> : "Ó³" U04F3 # CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE +<Multi_key> <equal> <Cyrillic_u> : "Ó³" U04F3 # CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE +<dead_diaeresis> <Cyrillic_CHE> : "Ó´" U04F4 # CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_CHE> : "Ó´" U04F4 # CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS +<dead_diaeresis> <Cyrillic_che> : "Óµ" U04F5 # CYRILLIC SMALL LETTER CHE WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_che> : "Óµ" U04F5 # CYRILLIC SMALL LETTER CHE WITH DIAERESIS +<dead_diaeresis> <Cyrillic_YERU> : "Ó¸" U04F8 # CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_YERU> : "Ó¸" U04F8 # CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS +<dead_diaeresis> <Cyrillic_yeru> : "Ó¹" U04F9 # CYRILLIC SMALL LETTER YERU WITH DIAERESIS +<Multi_key> <quotedbl> <Cyrillic_yeru> : "Ó¹" U04F9 # CYRILLIC SMALL LETTER YERU WITH DIAERESIS +<Multi_key> <U0653> <Arabic_alef> : "Ø¢" U0622 # ARABIC LETTER ALEF WITH MADDA ABOVE +<Multi_key> <U0654> <Arabic_alef> : "Ø£" U0623 # ARABIC LETTER ALEF WITH HAMZA ABOVE +<Multi_key> <U0654> <Arabic_waw> : "ؤ" U0624 # ARABIC LETTER WAW WITH HAMZA ABOVE +<Multi_key> <U0655> <Arabic_alef> : "Ø¥" U0625 # ARABIC LETTER ALEF WITH HAMZA BELOW +<Multi_key> <U0654> <Arabic_yeh> : "ئ" U0626 # ARABIC LETTER YEH WITH HAMZA ABOVE +<Multi_key> <U0654> <U06d5> : "Û€" U06C0 # ARABIC LETTER HEH WITH YEH ABOVE +<Multi_key> <U0654> <U06c1> : "Û‚" U06C2 # ARABIC LETTER HEH GOAL WITH HAMZA ABOVE +<Multi_key> <U0654> <U06d2> : "Û“" U06D3 # ARABIC LETTER YEH BARREE WITH HAMZA ABOVE +<Multi_key> <U093c> <U0928> : "ऩ" U0929 # DEVANAGARI LETTER NNNA +<Multi_key> <U093c> <U0930> : "ऱ" U0931 # DEVANAGARI LETTER RRA +<Multi_key> <U093c> <U0933> : "ऴ" U0934 # DEVANAGARI LETTER LLLA +<Multi_key> <U093c> <U0915> : "क़" U0958 # DEVANAGARI LETTER QA +<Multi_key> <U093c> <U0916> : "ख़" U0959 # DEVANAGARI LETTER KHHA +<Multi_key> <U093c> <U0917> : "ग़" U095A # DEVANAGARI LETTER GHHA +<Multi_key> <U093c> <U091c> : "ज़" U095B # DEVANAGARI LETTER ZA +<Multi_key> <U093c> <U0921> : "ड़" U095C # DEVANAGARI LETTER DDDHA +<Multi_key> <U093c> <U0922> : "à¥" U095D # DEVANAGARI LETTER RHA +<Multi_key> <U093c> <U092b> : "फ़" U095E # DEVANAGARI LETTER FA +<Multi_key> <U093c> <U092f> : "य़" U095F # DEVANAGARI LETTER YYA +<Multi_key> <U09c7> <U09be> : "ো" U09CB # BENGALI VOWEL SIGN O +<Multi_key> <U09c7> <U09d7> : "ৌ" U09CC # BENGALI VOWEL SIGN AU +<Multi_key> <U09bc> <U09a1> : "ড়" U09DC # BENGALI LETTER RRA +<Multi_key> <U09bc> <U09a2> : "à§" U09DD # BENGALI LETTER RHA +<Multi_key> <U09bc> <U09af> : "য়" U09DF # BENGALI LETTER YYA +<Multi_key> <U0a3c> <U0a32> : "ਲ਼" U0A33 # GURMUKHI LETTER LLA +<Multi_key> <U0a3c> <U0a38> : "ਸ਼" U0A36 # GURMUKHI LETTER SHA +<Multi_key> <U0a3c> <U0a16> : "à©™" U0A59 # GURMUKHI LETTER KHHA +<Multi_key> <U0a3c> <U0a17> : "à©š" U0A5A # GURMUKHI LETTER GHHA +<Multi_key> <U0a3c> <U0a1c> : "à©›" U0A5B # GURMUKHI LETTER ZA +<Multi_key> <U0a3c> <U0a2b> : "à©ž" U0A5E # GURMUKHI LETTER FA +<Multi_key> <U0b47> <U0b56> : "à­ˆ" U0B48 # ORIYA VOWEL SIGN AI +<Multi_key> <U0b47> <U0b3e> : "à­‹" U0B4B # ORIYA VOWEL SIGN O +<Multi_key> <U0b47> <U0b57> : "à­Œ" U0B4C # ORIYA VOWEL SIGN AU +<Multi_key> <U0b3c> <U0b21> : "à­œ" U0B5C # ORIYA LETTER RRA +<Multi_key> <U0b3c> <U0b22> : "à­" U0B5D # ORIYA LETTER RHA +<Multi_key> <U0bd7> <U0b92> : "à®”" U0B94 # TAMIL LETTER AU +<Multi_key> <U0bc6> <U0bbe> : "ொ" U0BCA # TAMIL VOWEL SIGN O +<Multi_key> <U0bc7> <U0bbe> : "ோ" U0BCB # TAMIL VOWEL SIGN OO +<Multi_key> <U0bc6> <U0bd7> : "ௌ" U0BCC # TAMIL VOWEL SIGN AU +<Multi_key> <U0c46> <U0c56> : "ై" U0C48 # TELUGU VOWEL SIGN AI +<Multi_key> <U0cbf> <U0cd5> : "à³€" U0CC0 # KANNADA VOWEL SIGN II +<Multi_key> <U0cc6> <U0cd5> : "ೇ" U0CC7 # KANNADA VOWEL SIGN EE +<Multi_key> <U0cc6> <U0cd6> : "ೈ" U0CC8 # KANNADA VOWEL SIGN AI +<Multi_key> <U0cc6> <U0cc2> : "ೊ" U0CCA # KANNADA VOWEL SIGN O +<Multi_key> <U0cca> <U0cd5> : "ೋ" U0CCB # KANNADA VOWEL SIGN OO +<Multi_key> <U0cc6> <U0cc2> <U0cd5> : "ೋ" U0CCB # KANNADA VOWEL SIGN OO +<Multi_key> <U0d46> <U0d3e> : "ൊ" U0D4A # MALAYALAM VOWEL SIGN O +<Multi_key> <U0d47> <U0d3e> : "ോ" U0D4B # MALAYALAM VOWEL SIGN OO +<Multi_key> <U0d46> <U0d57> : "ൌ" U0D4C # MALAYALAM VOWEL SIGN AU +<Multi_key> <U0dd9> <U0dca> : "à·š" U0DDA # SINHALA VOWEL SIGN DIGA KOMBUVA +<Multi_key> <U0dd9> <U0dcf> : "à·œ" U0DDC # SINHALA VOWEL SIGN KOMBUVA HAA AELA-PILLA +<Multi_key> <U0ddc> <U0dca> : "à·" U0DDD # SINHALA VOWEL SIGN KOMBUVA HAA DIGA AELA-PILLA +<Multi_key> <U0dd9> <U0dcf> <U0dca> : "à·" U0DDD # SINHALA VOWEL SIGN KOMBUVA HAA DIGA AELA-PILLA +<Multi_key> <U0dd9> <U0ddf> : "à·ž" U0DDE # SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA +<Multi_key> <U0fb7> <U0f42> : "གྷ" U0F43 # TIBETAN LETTER GHA +<Multi_key> <U0fb7> <U0f4c> : "à½" U0F4D # TIBETAN LETTER DDHA +<Multi_key> <U0fb7> <U0f51> : "དྷ" U0F52 # TIBETAN LETTER DHA +<Multi_key> <U0fb7> <U0f56> : "བྷ" U0F57 # TIBETAN LETTER BHA +<Multi_key> <U0fb7> <U0f5b> : "ཛྷ" U0F5C # TIBETAN LETTER DZHA +<Multi_key> <U0fb5> <U0f40> : "ཀྵ" U0F69 # TIBETAN LETTER KSSA +<Multi_key> <U0f71> <U0f72> : "ཱི" U0F73 # TIBETAN VOWEL SIGN II +<Multi_key> <U0f71> <U0f74> : "ཱུ" U0F75 # TIBETAN VOWEL SIGN UU +<Multi_key> <U0fb2> <U0f80> : "ྲྀ" U0F76 # TIBETAN VOWEL SIGN VOCALIC R +<Multi_key> <U0fb3> <U0f80> : "ླྀ" U0F78 # TIBETAN VOWEL SIGN VOCALIC L +<Multi_key> <U0f71> <U0f80> : "à¾" U0F81 # TIBETAN VOWEL SIGN REVERSED II +<Multi_key> <U0f92> <U0fb7> : "ྒྷ" U0F93 # TIBETAN SUBJOINED LETTER GHA +<Multi_key> <U0f9c> <U0fb7> : "à¾" U0F9D # TIBETAN SUBJOINED LETTER DDHA +<Multi_key> <U0fa1> <U0fb7> : "ྡྷ" U0FA2 # TIBETAN SUBJOINED LETTER DHA +<Multi_key> <U0fa6> <U0fb7> : "ྦྷ" U0FA7 # TIBETAN SUBJOINED LETTER BHA +<Multi_key> <U0fab> <U0fb7> : "ྫྷ" U0FAC # TIBETAN SUBJOINED LETTER DZHA +<Multi_key> <U0f90> <U0fb5> : "ྐྵ" U0FB9 # TIBETAN SUBJOINED LETTER KSSA +<Multi_key> <U102e> <U1025> : "ဦ" U1026 # MYANMAR LETTER UU +<U0325> <A> : "Ḁ" U1E00 # LATIN CAPITAL LETTER A WITH RING BELOW +<U0325> <a> : "á¸" U1E01 # LATIN SMALL LETTER A WITH RING BELOW +<dead_abovedot> <B> : "Ḃ" U1E02 # LATIN CAPITAL LETTER B WITH DOT ABOVE +<Multi_key> <period> <B> : "Ḃ" U1E02 # LATIN CAPITAL LETTER B WITH DOT ABOVE +<dead_abovedot> <b> : "ḃ" U1E03 # LATIN SMALL LETTER B WITH DOT ABOVE +<Multi_key> <period> <b> : "ḃ" U1E03 # LATIN SMALL LETTER B WITH DOT ABOVE +<dead_belowdot> <B> : "Ḅ" U1E04 # LATIN CAPITAL LETTER B WITH DOT BELOW +<Multi_key> <exclam> <B> : "Ḅ" U1E04 # LATIN CAPITAL LETTER B WITH DOT BELOW +<combining_belowdot> <B> : "Ḅ" U1E04 # LATIN CAPITAL LETTER B WITH DOT BELOW +<dead_belowdot> <b> : "ḅ" U1E05 # LATIN SMALL LETTER B WITH DOT BELOW +<Multi_key> <exclam> <b> : "ḅ" U1E05 # LATIN SMALL LETTER B WITH DOT BELOW +<combining_belowdot> <b> : "ḅ" U1E05 # LATIN SMALL LETTER B WITH DOT BELOW +<U0331> <B> : "Ḇ" U1E06 # LATIN CAPITAL LETTER B WITH LINE BELOW +<U0331> <b> : "ḇ" U1E07 # LATIN SMALL LETTER B WITH LINE BELOW +<dead_acute> <Ccedilla> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <acute> <Ccedilla> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <apostrophe> <Ccedilla> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<dead_acute> <dead_cedilla> <C> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<dead_acute> <Multi_key> <comma> <C> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <acute> <dead_cedilla> <C> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <acute> <comma> <C> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <apostrophe> <dead_cedilla> <C> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <apostrophe> <comma> <C> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<combining_acute> <Ccedilla> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<combining_acute> <dead_cedilla> <C> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<combining_acute> <Multi_key> <comma> <C> : "Ḉ" U1E08 # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE +<dead_acute> <ccedilla> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <acute> <ccedilla> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <apostrophe> <ccedilla> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<dead_acute> <dead_cedilla> <c> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<dead_acute> <Multi_key> <comma> <c> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <acute> <dead_cedilla> <c> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <acute> <comma> <c> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <apostrophe> <dead_cedilla> <c> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<Multi_key> <apostrophe> <comma> <c> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<combining_acute> <ccedilla> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<combining_acute> <dead_cedilla> <c> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<combining_acute> <Multi_key> <comma> <c> : "ḉ" U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE +<dead_abovedot> <D> : "Ḋ" U1E0A # LATIN CAPITAL LETTER D WITH DOT ABOVE +<Multi_key> <period> <D> : "Ḋ" U1E0A # LATIN CAPITAL LETTER D WITH DOT ABOVE +<dead_abovedot> <d> : "ḋ" U1E0B # LATIN SMALL LETTER D WITH DOT ABOVE +<Multi_key> <period> <d> : "ḋ" U1E0B # LATIN SMALL LETTER D WITH DOT ABOVE +<dead_belowdot> <D> : "Ḍ" U1E0C # LATIN CAPITAL LETTER D WITH DOT BELOW +<Multi_key> <exclam> <D> : "Ḍ" U1E0C # LATIN CAPITAL LETTER D WITH DOT BELOW +<combining_belowdot> <D> : "Ḍ" U1E0C # LATIN CAPITAL LETTER D WITH DOT BELOW +<dead_belowdot> <d> : "á¸" U1E0D # LATIN SMALL LETTER D WITH DOT BELOW +<Multi_key> <exclam> <d> : "á¸" U1E0D # LATIN SMALL LETTER D WITH DOT BELOW +<combining_belowdot> <d> : "á¸" U1E0D # LATIN SMALL LETTER D WITH DOT BELOW +<U0331> <D> : "Ḏ" U1E0E # LATIN CAPITAL LETTER D WITH LINE BELOW +<U0331> <d> : "á¸" U1E0F # LATIN SMALL LETTER D WITH LINE BELOW +<dead_cedilla> <D> : "á¸" U1E10 # LATIN CAPITAL LETTER D WITH CEDILLA +<Multi_key> <comma> <D> : "á¸" U1E10 # LATIN CAPITAL LETTER D WITH CEDILLA +<dead_cedilla> <d> : "ḑ" U1E11 # LATIN SMALL LETTER D WITH CEDILLA +<Multi_key> <comma> <d> : "ḑ" U1E11 # LATIN SMALL LETTER D WITH CEDILLA +<U032d> <D> : "Ḓ" U1E12 # LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW +<U032d> <d> : "ḓ" U1E13 # LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW +<dead_grave> <Emacron> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<Multi_key> <grave> <Emacron> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<dead_grave> <dead_macron> <E> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<dead_grave> <Multi_key> <macron> <E> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<dead_grave> <Multi_key> <underscore> <E> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<Multi_key> <grave> <dead_macron> <E> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<Multi_key> <grave> <macron> <E> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<Multi_key> <grave> <underscore> <E> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<combining_grave> <Emacron> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<combining_grave> <dead_macron> <E> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<combining_grave> <Multi_key> <macron> <E> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<combining_grave> <Multi_key> <underscore> <E> : "Ḕ" U1E14 # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE +<dead_grave> <emacron> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<Multi_key> <grave> <emacron> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<dead_grave> <dead_macron> <e> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<dead_grave> <Multi_key> <macron> <e> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<dead_grave> <Multi_key> <underscore> <e> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<Multi_key> <grave> <dead_macron> <e> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<Multi_key> <grave> <macron> <e> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<Multi_key> <grave> <underscore> <e> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<combining_grave> <emacron> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<combining_grave> <dead_macron> <e> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<combining_grave> <Multi_key> <macron> <e> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<combining_grave> <Multi_key> <underscore> <e> : "ḕ" U1E15 # LATIN SMALL LETTER E WITH MACRON AND GRAVE +<dead_acute> <Emacron> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<Multi_key> <acute> <Emacron> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <Emacron> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<dead_acute> <dead_macron> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<dead_acute> <Multi_key> <macron> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<dead_acute> <Multi_key> <underscore> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<Multi_key> <acute> <dead_macron> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<Multi_key> <acute> <macron> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<Multi_key> <acute> <underscore> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <dead_macron> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <macron> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <underscore> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<combining_acute> <Emacron> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<combining_acute> <dead_macron> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<combining_acute> <Multi_key> <macron> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<combining_acute> <Multi_key> <underscore> <E> : "Ḗ" U1E16 # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE +<dead_acute> <emacron> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<Multi_key> <acute> <emacron> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <emacron> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<dead_acute> <dead_macron> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<dead_acute> <Multi_key> <macron> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<dead_acute> <Multi_key> <underscore> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<Multi_key> <acute> <dead_macron> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<Multi_key> <acute> <macron> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<Multi_key> <acute> <underscore> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <dead_macron> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <macron> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <underscore> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<combining_acute> <emacron> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<combining_acute> <dead_macron> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<combining_acute> <Multi_key> <macron> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<combining_acute> <Multi_key> <underscore> <e> : "ḗ" U1E17 # LATIN SMALL LETTER E WITH MACRON AND ACUTE +<U032d> <E> : "Ḙ" U1E18 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW +<U032d> <e> : "ḙ" U1E19 # LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW +<U0330> <E> : "Ḛ" U1E1A # LATIN CAPITAL LETTER E WITH TILDE BELOW +<U0330> <e> : "ḛ" U1E1B # LATIN SMALL LETTER E WITH TILDE BELOW +<dead_breve> <U0228> : "Ḝ" U1E1C # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <U> <U0228> : "Ḝ" U1E1C # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <b> <U0228> : "Ḝ" U1E1C # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE +<dead_breve> <dead_cedilla> <E> : "Ḝ" U1E1C # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE +<dead_breve> <Multi_key> <comma> <E> : "Ḝ" U1E1C # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <U> <dead_cedilla> <E> : "Ḝ" U1E1C # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <U> <comma> <E> : "Ḝ" U1E1C # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <b> <dead_cedilla> <E> : "Ḝ" U1E1C # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <b> <comma> <E> : "Ḝ" U1E1C # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE +<dead_breve> <U0229> : "á¸" U1E1D # LATIN SMALL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <U> <U0229> : "á¸" U1E1D # LATIN SMALL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <b> <U0229> : "á¸" U1E1D # LATIN SMALL LETTER E WITH CEDILLA AND BREVE +<dead_breve> <dead_cedilla> <e> : "á¸" U1E1D # LATIN SMALL LETTER E WITH CEDILLA AND BREVE +<dead_breve> <Multi_key> <comma> <e> : "á¸" U1E1D # LATIN SMALL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <U> <dead_cedilla> <e> : "á¸" U1E1D # LATIN SMALL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <U> <comma> <e> : "á¸" U1E1D # LATIN SMALL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <b> <dead_cedilla> <e> : "á¸" U1E1D # LATIN SMALL LETTER E WITH CEDILLA AND BREVE +<Multi_key> <b> <comma> <e> : "á¸" U1E1D # LATIN SMALL LETTER E WITH CEDILLA AND BREVE +<dead_abovedot> <F> : "Ḟ" U1E1E # LATIN CAPITAL LETTER F WITH DOT ABOVE +<Multi_key> <period> <F> : "Ḟ" U1E1E # LATIN CAPITAL LETTER F WITH DOT ABOVE +<dead_abovedot> <f> : "ḟ" U1E1F # LATIN SMALL LETTER F WITH DOT ABOVE +<Multi_key> <period> <f> : "ḟ" U1E1F # LATIN SMALL LETTER F WITH DOT ABOVE +<dead_macron> <G> : "Ḡ" U1E20 # LATIN CAPITAL LETTER G WITH MACRON +<Multi_key> <macron> <G> : "Ḡ" U1E20 # LATIN CAPITAL LETTER G WITH MACRON +<Multi_key> <underscore> <G> : "Ḡ" U1E20 # LATIN CAPITAL LETTER G WITH MACRON +<dead_macron> <g> : "ḡ" U1E21 # LATIN SMALL LETTER G WITH MACRON +<Multi_key> <macron> <g> : "ḡ" U1E21 # LATIN SMALL LETTER G WITH MACRON +<Multi_key> <underscore> <g> : "ḡ" U1E21 # LATIN SMALL LETTER G WITH MACRON +<dead_abovedot> <H> : "Ḣ" U1E22 # LATIN CAPITAL LETTER H WITH DOT ABOVE +<Multi_key> <period> <H> : "Ḣ" U1E22 # LATIN CAPITAL LETTER H WITH DOT ABOVE +<dead_abovedot> <h> : "ḣ" U1E23 # LATIN SMALL LETTER H WITH DOT ABOVE +<Multi_key> <period> <h> : "ḣ" U1E23 # LATIN SMALL LETTER H WITH DOT ABOVE +<dead_belowdot> <H> : "Ḥ" U1E24 # LATIN CAPITAL LETTER H WITH DOT BELOW +<Multi_key> <exclam> <H> : "Ḥ" U1E24 # LATIN CAPITAL LETTER H WITH DOT BELOW +<combining_belowdot> <H> : "Ḥ" U1E24 # LATIN CAPITAL LETTER H WITH DOT BELOW +<dead_belowdot> <h> : "ḥ" U1E25 # LATIN SMALL LETTER H WITH DOT BELOW +<Multi_key> <exclam> <h> : "ḥ" U1E25 # LATIN SMALL LETTER H WITH DOT BELOW +<combining_belowdot> <h> : "ḥ" U1E25 # LATIN SMALL LETTER H WITH DOT BELOW +<dead_diaeresis> <H> : "Ḧ" U1E26 # LATIN CAPITAL LETTER H WITH DIAERESIS +<Multi_key> <quotedbl> <H> : "Ḧ" U1E26 # LATIN CAPITAL LETTER H WITH DIAERESIS +<dead_diaeresis> <h> : "ḧ" U1E27 # LATIN SMALL LETTER H WITH DIAERESIS +<Multi_key> <quotedbl> <h> : "ḧ" U1E27 # LATIN SMALL LETTER H WITH DIAERESIS +<dead_cedilla> <H> : "Ḩ" U1E28 # LATIN CAPITAL LETTER H WITH CEDILLA +<Multi_key> <comma> <H> : "Ḩ" U1E28 # LATIN CAPITAL LETTER H WITH CEDILLA +<dead_cedilla> <h> : "ḩ" U1E29 # LATIN SMALL LETTER H WITH CEDILLA +<Multi_key> <comma> <h> : "ḩ" U1E29 # LATIN SMALL LETTER H WITH CEDILLA +<U032e> <H> : "Ḫ" U1E2A # LATIN CAPITAL LETTER H WITH BREVE BELOW +<U032e> <h> : "ḫ" U1E2B # LATIN SMALL LETTER H WITH BREVE BELOW +<U0330> <I> : "Ḭ" U1E2C # LATIN CAPITAL LETTER I WITH TILDE BELOW +<U0330> <i> : "ḭ" U1E2D # LATIN SMALL LETTER I WITH TILDE BELOW +<dead_acute> <Idiaeresis> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <Idiaeresis> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <Idiaeresis> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<dead_acute> <dead_diaeresis> <I> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<dead_acute> <Multi_key> <quotedbl> <I> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <dead_diaeresis> <I> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <quotedbl> <I> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <dead_diaeresis> <I> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <quotedbl> <I> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<combining_acute> <Idiaeresis> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<combining_acute> <dead_diaeresis> <I> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<combining_acute> <Multi_key> <quotedbl> <I> : "Ḯ" U1E2E # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE +<dead_acute> <idiaeresis> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <idiaeresis> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <idiaeresis> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<dead_acute> <dead_diaeresis> <i> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<dead_acute> <Multi_key> <quotedbl> <i> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <dead_diaeresis> <i> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <acute> <quotedbl> <i> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <dead_diaeresis> <i> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<Multi_key> <apostrophe> <quotedbl> <i> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<combining_acute> <idiaeresis> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<combining_acute> <dead_diaeresis> <i> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<combining_acute> <Multi_key> <quotedbl> <i> : "ḯ" U1E2F # LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE +<dead_acute> <K> : "Ḱ" U1E30 # LATIN CAPITAL LETTER K WITH ACUTE +<Multi_key> <acute> <K> : "Ḱ" U1E30 # LATIN CAPITAL LETTER K WITH ACUTE +<Multi_key> <apostrophe> <K> : "Ḱ" U1E30 # LATIN CAPITAL LETTER K WITH ACUTE +<combining_acute> <K> : "Ḱ" U1E30 # LATIN CAPITAL LETTER K WITH ACUTE +<dead_acute> <k> : "ḱ" U1E31 # LATIN SMALL LETTER K WITH ACUTE +<Multi_key> <acute> <k> : "ḱ" U1E31 # LATIN SMALL LETTER K WITH ACUTE +<Multi_key> <apostrophe> <k> : "ḱ" U1E31 # LATIN SMALL LETTER K WITH ACUTE +<combining_acute> <k> : "ḱ" U1E31 # LATIN SMALL LETTER K WITH ACUTE +<dead_belowdot> <K> : "Ḳ" U1E32 # LATIN CAPITAL LETTER K WITH DOT BELOW +<Multi_key> <exclam> <K> : "Ḳ" U1E32 # LATIN CAPITAL LETTER K WITH DOT BELOW +<combining_belowdot> <K> : "Ḳ" U1E32 # LATIN CAPITAL LETTER K WITH DOT BELOW +<dead_belowdot> <k> : "ḳ" U1E33 # LATIN SMALL LETTER K WITH DOT BELOW +<Multi_key> <exclam> <k> : "ḳ" U1E33 # LATIN SMALL LETTER K WITH DOT BELOW +<combining_belowdot> <k> : "ḳ" U1E33 # LATIN SMALL LETTER K WITH DOT BELOW +<U0331> <K> : "Ḵ" U1E34 # LATIN CAPITAL LETTER K WITH LINE BELOW +<U0331> <k> : "ḵ" U1E35 # LATIN SMALL LETTER K WITH LINE BELOW +<dead_belowdot> <L> : "Ḷ" U1E36 # LATIN CAPITAL LETTER L WITH DOT BELOW +<Multi_key> <exclam> <L> : "Ḷ" U1E36 # LATIN CAPITAL LETTER L WITH DOT BELOW +<combining_belowdot> <L> : "Ḷ" U1E36 # LATIN CAPITAL LETTER L WITH DOT BELOW +<dead_belowdot> <l> : "ḷ" U1E37 # LATIN SMALL LETTER L WITH DOT BELOW +<Multi_key> <exclam> <l> : "ḷ" U1E37 # LATIN SMALL LETTER L WITH DOT BELOW +<combining_belowdot> <l> : "ḷ" U1E37 # LATIN SMALL LETTER L WITH DOT BELOW +<dead_macron> <U1e36> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <macron> <U1e36> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <U1e36> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<dead_macron> <dead_belowdot> <L> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<dead_macron> <Multi_key> <exclam> <L> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <macron> <dead_belowdot> <L> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <macron> <exclam> <L> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <dead_belowdot> <L> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <exclam> <L> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<dead_macron> <combining_belowdot> <L> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <macron> <combining_belowdot> <L> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <combining_belowdot> <L> : "Ḹ" U1E38 # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON +<dead_macron> <U1e37> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <macron> <U1e37> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <U1e37> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<dead_macron> <dead_belowdot> <l> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<dead_macron> <Multi_key> <exclam> <l> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <macron> <dead_belowdot> <l> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <macron> <exclam> <l> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <dead_belowdot> <l> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <exclam> <l> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<dead_macron> <combining_belowdot> <l> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <macron> <combining_belowdot> <l> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <combining_belowdot> <l> : "ḹ" U1E39 # LATIN SMALL LETTER L WITH DOT BELOW AND MACRON +<U0331> <L> : "Ḻ" U1E3A # LATIN CAPITAL LETTER L WITH LINE BELOW +<U0331> <l> : "ḻ" U1E3B # LATIN SMALL LETTER L WITH LINE BELOW +<U032d> <L> : "Ḽ" U1E3C # LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW +<U032d> <l> : "ḽ" U1E3D # LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW +<dead_acute> <M> : "Ḿ" U1E3E # LATIN CAPITAL LETTER M WITH ACUTE +<Multi_key> <acute> <M> : "Ḿ" U1E3E # LATIN CAPITAL LETTER M WITH ACUTE +<Multi_key> <apostrophe> <M> : "Ḿ" U1E3E # LATIN CAPITAL LETTER M WITH ACUTE +<combining_acute> <M> : "Ḿ" U1E3E # LATIN CAPITAL LETTER M WITH ACUTE +<dead_acute> <m> : "ḿ" U1E3F # LATIN SMALL LETTER M WITH ACUTE +<Multi_key> <acute> <m> : "ḿ" U1E3F # LATIN SMALL LETTER M WITH ACUTE +<Multi_key> <apostrophe> <m> : "ḿ" U1E3F # LATIN SMALL LETTER M WITH ACUTE +<combining_acute> <m> : "ḿ" U1E3F # LATIN SMALL LETTER M WITH ACUTE +<dead_abovedot> <M> : "á¹€" U1E40 # LATIN CAPITAL LETTER M WITH DOT ABOVE +<Multi_key> <period> <M> : "á¹€" U1E40 # LATIN CAPITAL LETTER M WITH DOT ABOVE +<dead_abovedot> <m> : "á¹" U1E41 # LATIN SMALL LETTER M WITH DOT ABOVE +<Multi_key> <period> <m> : "á¹" U1E41 # LATIN SMALL LETTER M WITH DOT ABOVE +<dead_belowdot> <M> : "Ṃ" U1E42 # LATIN CAPITAL LETTER M WITH DOT BELOW +<Multi_key> <exclam> <M> : "Ṃ" U1E42 # LATIN CAPITAL LETTER M WITH DOT BELOW +<combining_belowdot> <M> : "Ṃ" U1E42 # LATIN CAPITAL LETTER M WITH DOT BELOW +<dead_belowdot> <m> : "ṃ" U1E43 # LATIN SMALL LETTER M WITH DOT BELOW +<Multi_key> <exclam> <m> : "ṃ" U1E43 # LATIN SMALL LETTER M WITH DOT BELOW +<combining_belowdot> <m> : "ṃ" U1E43 # LATIN SMALL LETTER M WITH DOT BELOW +<dead_abovedot> <N> : "Ṅ" U1E44 # LATIN CAPITAL LETTER N WITH DOT ABOVE +<Multi_key> <period> <N> : "Ṅ" U1E44 # LATIN CAPITAL LETTER N WITH DOT ABOVE +<dead_abovedot> <n> : "á¹…" U1E45 # LATIN SMALL LETTER N WITH DOT ABOVE +<Multi_key> <period> <n> : "á¹…" U1E45 # LATIN SMALL LETTER N WITH DOT ABOVE +<dead_belowdot> <N> : "Ṇ" U1E46 # LATIN CAPITAL LETTER N WITH DOT BELOW +<Multi_key> <exclam> <N> : "Ṇ" U1E46 # LATIN CAPITAL LETTER N WITH DOT BELOW +<combining_belowdot> <N> : "Ṇ" U1E46 # LATIN CAPITAL LETTER N WITH DOT BELOW +<dead_belowdot> <n> : "ṇ" U1E47 # LATIN SMALL LETTER N WITH DOT BELOW +<Multi_key> <exclam> <n> : "ṇ" U1E47 # LATIN SMALL LETTER N WITH DOT BELOW +<combining_belowdot> <n> : "ṇ" U1E47 # LATIN SMALL LETTER N WITH DOT BELOW +<U0331> <N> : "Ṉ" U1E48 # LATIN CAPITAL LETTER N WITH LINE BELOW +<U0331> <n> : "ṉ" U1E49 # LATIN SMALL LETTER N WITH LINE BELOW +<U032d> <N> : "Ṋ" U1E4A # LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW +<U032d> <n> : "ṋ" U1E4B # LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW +<dead_acute> <Otilde> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<Multi_key> <acute> <Otilde> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <Otilde> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<dead_acute> <dead_tilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<dead_acute> <Multi_key> <asciitilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<Multi_key> <acute> <dead_tilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<Multi_key> <acute> <asciitilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <dead_tilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <asciitilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<dead_acute> <combining_tilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<Multi_key> <acute> <combining_tilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <combining_tilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<combining_acute> <Otilde> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<combining_acute> <dead_tilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<combining_acute> <Multi_key> <asciitilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<combining_acute> <combining_tilde> <O> : "Ṍ" U1E4C # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE +<dead_acute> <otilde> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<Multi_key> <acute> <otilde> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <otilde> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<dead_acute> <dead_tilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<dead_acute> <Multi_key> <asciitilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<Multi_key> <acute> <dead_tilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<Multi_key> <acute> <asciitilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <dead_tilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <asciitilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<dead_acute> <combining_tilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<Multi_key> <acute> <combining_tilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <combining_tilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<combining_acute> <otilde> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<combining_acute> <dead_tilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<combining_acute> <Multi_key> <asciitilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<combining_acute> <combining_tilde> <o> : "á¹" U1E4D # LATIN SMALL LETTER O WITH TILDE AND ACUTE +<dead_diaeresis> <Otilde> : "Ṏ" U1E4E # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS +<Multi_key> <quotedbl> <Otilde> : "Ṏ" U1E4E # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS +<dead_diaeresis> <dead_tilde> <O> : "Ṏ" U1E4E # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS +<dead_diaeresis> <Multi_key> <asciitilde> <O> : "Ṏ" U1E4E # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS +<Multi_key> <quotedbl> <dead_tilde> <O> : "Ṏ" U1E4E # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS +<Multi_key> <quotedbl> <asciitilde> <O> : "Ṏ" U1E4E # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS +<dead_diaeresis> <combining_tilde> <O> : "Ṏ" U1E4E # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS +<Multi_key> <quotedbl> <combining_tilde> <O> : "Ṏ" U1E4E # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS +<dead_diaeresis> <otilde> : "á¹" U1E4F # LATIN SMALL LETTER O WITH TILDE AND DIAERESIS +<Multi_key> <quotedbl> <otilde> : "á¹" U1E4F # LATIN SMALL LETTER O WITH TILDE AND DIAERESIS +<dead_diaeresis> <dead_tilde> <o> : "á¹" U1E4F # LATIN SMALL LETTER O WITH TILDE AND DIAERESIS +<dead_diaeresis> <Multi_key> <asciitilde> <o> : "á¹" U1E4F # LATIN SMALL LETTER O WITH TILDE AND DIAERESIS +<Multi_key> <quotedbl> <dead_tilde> <o> : "á¹" U1E4F # LATIN SMALL LETTER O WITH TILDE AND DIAERESIS +<Multi_key> <quotedbl> <asciitilde> <o> : "á¹" U1E4F # LATIN SMALL LETTER O WITH TILDE AND DIAERESIS +<dead_diaeresis> <combining_tilde> <o> : "á¹" U1E4F # LATIN SMALL LETTER O WITH TILDE AND DIAERESIS +<Multi_key> <quotedbl> <combining_tilde> <o> : "á¹" U1E4F # LATIN SMALL LETTER O WITH TILDE AND DIAERESIS +<dead_grave> <Omacron> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<Multi_key> <grave> <Omacron> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<dead_grave> <dead_macron> <O> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<dead_grave> <Multi_key> <macron> <O> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<dead_grave> <Multi_key> <underscore> <O> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<Multi_key> <grave> <dead_macron> <O> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<Multi_key> <grave> <macron> <O> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<Multi_key> <grave> <underscore> <O> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<combining_grave> <Omacron> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<combining_grave> <dead_macron> <O> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<combining_grave> <Multi_key> <macron> <O> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<combining_grave> <Multi_key> <underscore> <O> : "á¹" U1E50 # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE +<dead_grave> <omacron> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<Multi_key> <grave> <omacron> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<dead_grave> <dead_macron> <o> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<dead_grave> <Multi_key> <macron> <o> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<dead_grave> <Multi_key> <underscore> <o> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<Multi_key> <grave> <dead_macron> <o> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<Multi_key> <grave> <macron> <o> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<Multi_key> <grave> <underscore> <o> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<combining_grave> <omacron> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<combining_grave> <dead_macron> <o> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<combining_grave> <Multi_key> <macron> <o> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<combining_grave> <Multi_key> <underscore> <o> : "ṑ" U1E51 # LATIN SMALL LETTER O WITH MACRON AND GRAVE +<dead_acute> <Omacron> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<Multi_key> <acute> <Omacron> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <Omacron> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<dead_acute> <dead_macron> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<dead_acute> <Multi_key> <macron> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<dead_acute> <Multi_key> <underscore> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<Multi_key> <acute> <dead_macron> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<Multi_key> <acute> <macron> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<Multi_key> <acute> <underscore> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <dead_macron> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <macron> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <underscore> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<combining_acute> <Omacron> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<combining_acute> <dead_macron> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<combining_acute> <Multi_key> <macron> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<combining_acute> <Multi_key> <underscore> <O> : "á¹’" U1E52 # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE +<dead_acute> <omacron> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<Multi_key> <acute> <omacron> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <omacron> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<dead_acute> <dead_macron> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<dead_acute> <Multi_key> <macron> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<dead_acute> <Multi_key> <underscore> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<Multi_key> <acute> <dead_macron> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<Multi_key> <acute> <macron> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<Multi_key> <acute> <underscore> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <dead_macron> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <macron> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<Multi_key> <apostrophe> <underscore> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<combining_acute> <omacron> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<combining_acute> <dead_macron> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<combining_acute> <Multi_key> <macron> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<combining_acute> <Multi_key> <underscore> <o> : "ṓ" U1E53 # LATIN SMALL LETTER O WITH MACRON AND ACUTE +<dead_acute> <P> : "á¹”" U1E54 # LATIN CAPITAL LETTER P WITH ACUTE +<Multi_key> <acute> <P> : "á¹”" U1E54 # LATIN CAPITAL LETTER P WITH ACUTE +<Multi_key> <apostrophe> <P> : "á¹”" U1E54 # LATIN CAPITAL LETTER P WITH ACUTE +<combining_acute> <P> : "á¹”" U1E54 # LATIN CAPITAL LETTER P WITH ACUTE +<dead_acute> <p> : "ṕ" U1E55 # LATIN SMALL LETTER P WITH ACUTE +<Multi_key> <acute> <p> : "ṕ" U1E55 # LATIN SMALL LETTER P WITH ACUTE +<Multi_key> <apostrophe> <p> : "ṕ" U1E55 # LATIN SMALL LETTER P WITH ACUTE +<combining_acute> <p> : "ṕ" U1E55 # LATIN SMALL LETTER P WITH ACUTE +<dead_abovedot> <P> : "á¹–" U1E56 # LATIN CAPITAL LETTER P WITH DOT ABOVE +<Multi_key> <period> <P> : "á¹–" U1E56 # LATIN CAPITAL LETTER P WITH DOT ABOVE +<dead_abovedot> <p> : "á¹—" U1E57 # LATIN SMALL LETTER P WITH DOT ABOVE +<Multi_key> <period> <p> : "á¹—" U1E57 # LATIN SMALL LETTER P WITH DOT ABOVE +<dead_abovedot> <R> : "Ṙ" U1E58 # LATIN CAPITAL LETTER R WITH DOT ABOVE +<Multi_key> <period> <R> : "Ṙ" U1E58 # LATIN CAPITAL LETTER R WITH DOT ABOVE +<dead_abovedot> <r> : "á¹™" U1E59 # LATIN SMALL LETTER R WITH DOT ABOVE +<Multi_key> <period> <r> : "á¹™" U1E59 # LATIN SMALL LETTER R WITH DOT ABOVE +<dead_belowdot> <R> : "Ṛ" U1E5A # LATIN CAPITAL LETTER R WITH DOT BELOW +<Multi_key> <exclam> <R> : "Ṛ" U1E5A # LATIN CAPITAL LETTER R WITH DOT BELOW +<combining_belowdot> <R> : "Ṛ" U1E5A # LATIN CAPITAL LETTER R WITH DOT BELOW +<dead_belowdot> <r> : "á¹›" U1E5B # LATIN SMALL LETTER R WITH DOT BELOW +<Multi_key> <exclam> <r> : "á¹›" U1E5B # LATIN SMALL LETTER R WITH DOT BELOW +<combining_belowdot> <r> : "á¹›" U1E5B # LATIN SMALL LETTER R WITH DOT BELOW +<dead_macron> <U1e5a> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <macron> <U1e5a> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <U1e5a> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<dead_macron> <dead_belowdot> <R> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<dead_macron> <Multi_key> <exclam> <R> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <macron> <dead_belowdot> <R> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <macron> <exclam> <R> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <dead_belowdot> <R> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <exclam> <R> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<dead_macron> <combining_belowdot> <R> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <macron> <combining_belowdot> <R> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <combining_belowdot> <R> : "Ṝ" U1E5C # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON +<dead_macron> <U1e5b> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <macron> <U1e5b> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <U1e5b> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<dead_macron> <dead_belowdot> <r> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<dead_macron> <Multi_key> <exclam> <r> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <macron> <dead_belowdot> <r> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <macron> <exclam> <r> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <dead_belowdot> <r> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <exclam> <r> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<dead_macron> <combining_belowdot> <r> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <macron> <combining_belowdot> <r> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<Multi_key> <underscore> <combining_belowdot> <r> : "á¹" U1E5D # LATIN SMALL LETTER R WITH DOT BELOW AND MACRON +<U0331> <R> : "Ṟ" U1E5E # LATIN CAPITAL LETTER R WITH LINE BELOW +<U0331> <r> : "ṟ" U1E5F # LATIN SMALL LETTER R WITH LINE BELOW +<dead_abovedot> <S> : "á¹ " U1E60 # LATIN CAPITAL LETTER S WITH DOT ABOVE +<Multi_key> <period> <S> : "á¹ " U1E60 # LATIN CAPITAL LETTER S WITH DOT ABOVE +<dead_abovedot> <s> : "ṡ" U1E61 # LATIN SMALL LETTER S WITH DOT ABOVE +<Multi_key> <period> <s> : "ṡ" U1E61 # LATIN SMALL LETTER S WITH DOT ABOVE +<dead_belowdot> <S> : "á¹¢" U1E62 # LATIN CAPITAL LETTER S WITH DOT BELOW +<Multi_key> <exclam> <S> : "á¹¢" U1E62 # LATIN CAPITAL LETTER S WITH DOT BELOW +<combining_belowdot> <S> : "á¹¢" U1E62 # LATIN CAPITAL LETTER S WITH DOT BELOW +<dead_belowdot> <s> : "á¹£" U1E63 # LATIN SMALL LETTER S WITH DOT BELOW +<Multi_key> <exclam> <s> : "á¹£" U1E63 # LATIN SMALL LETTER S WITH DOT BELOW +<combining_belowdot> <s> : "á¹£" U1E63 # LATIN SMALL LETTER S WITH DOT BELOW +<dead_abovedot> <Sacute> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <Sacute> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <dead_acute> <S> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <Multi_key> <acute> <S> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <Multi_key> <apostrophe> <S> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <dead_acute> <S> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <acute> <S> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <apostrophe> <S> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <combining_acute> <S> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <combining_acute> <S> : "Ṥ" U1E64 # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <sacute> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <sacute> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <dead_acute> <s> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <Multi_key> <acute> <s> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <Multi_key> <apostrophe> <s> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <dead_acute> <s> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <acute> <s> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <apostrophe> <s> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <combining_acute> <s> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<Multi_key> <period> <combining_acute> <s> : "á¹¥" U1E65 # LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE +<dead_abovedot> <Scaron> : "Ṧ" U1E66 # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE +<Multi_key> <period> <Scaron> : "Ṧ" U1E66 # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE +<dead_abovedot> <dead_caron> <S> : "Ṧ" U1E66 # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE +<dead_abovedot> <Multi_key> <c> <S> : "Ṧ" U1E66 # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE +<Multi_key> <period> <dead_caron> <S> : "Ṧ" U1E66 # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE +<Multi_key> <period> <c> <S> : "Ṧ" U1E66 # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE +<dead_abovedot> <scaron> : "ṧ" U1E67 # LATIN SMALL LETTER S WITH CARON AND DOT ABOVE +<Multi_key> <period> <scaron> : "ṧ" U1E67 # LATIN SMALL LETTER S WITH CARON AND DOT ABOVE +<dead_abovedot> <dead_caron> <s> : "ṧ" U1E67 # LATIN SMALL LETTER S WITH CARON AND DOT ABOVE +<dead_abovedot> <Multi_key> <c> <s> : "ṧ" U1E67 # LATIN SMALL LETTER S WITH CARON AND DOT ABOVE +<Multi_key> <period> <dead_caron> <s> : "ṧ" U1E67 # LATIN SMALL LETTER S WITH CARON AND DOT ABOVE +<Multi_key> <period> <c> <s> : "ṧ" U1E67 # LATIN SMALL LETTER S WITH CARON AND DOT ABOVE +<dead_abovedot> <U1e62> : "Ṩ" U1E68 # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE +<Multi_key> <period> <U1e62> : "Ṩ" U1E68 # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE +<dead_abovedot> <dead_belowdot> <S> : "Ṩ" U1E68 # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE +<dead_abovedot> <Multi_key> <exclam> <S> : "Ṩ" U1E68 # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE +<Multi_key> <period> <dead_belowdot> <S> : "Ṩ" U1E68 # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE +<Multi_key> <period> <exclam> <S> : "Ṩ" U1E68 # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE +<dead_abovedot> <combining_belowdot> <S> : "Ṩ" U1E68 # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE +<Multi_key> <period> <combining_belowdot> <S> : "Ṩ" U1E68 # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE +<dead_abovedot> <U1e63> : "ṩ" U1E69 # LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE +<Multi_key> <period> <U1e63> : "ṩ" U1E69 # LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE +<dead_abovedot> <dead_belowdot> <s> : "ṩ" U1E69 # LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE +<dead_abovedot> <Multi_key> <exclam> <s> : "ṩ" U1E69 # LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE +<Multi_key> <period> <dead_belowdot> <s> : "ṩ" U1E69 # LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE +<Multi_key> <period> <exclam> <s> : "ṩ" U1E69 # LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE +<dead_abovedot> <combining_belowdot> <s> : "ṩ" U1E69 # LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE +<Multi_key> <period> <combining_belowdot> <s> : "ṩ" U1E69 # LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE +<dead_abovedot> <T> : "Ṫ" U1E6A # LATIN CAPITAL LETTER T WITH DOT ABOVE +<Multi_key> <period> <T> : "Ṫ" U1E6A # LATIN CAPITAL LETTER T WITH DOT ABOVE +<dead_abovedot> <t> : "ṫ" U1E6B # LATIN SMALL LETTER T WITH DOT ABOVE +<Multi_key> <period> <t> : "ṫ" U1E6B # LATIN SMALL LETTER T WITH DOT ABOVE +<dead_belowdot> <T> : "Ṭ" U1E6C # LATIN CAPITAL LETTER T WITH DOT BELOW +<Multi_key> <exclam> <T> : "Ṭ" U1E6C # LATIN CAPITAL LETTER T WITH DOT BELOW +<combining_belowdot> <T> : "Ṭ" U1E6C # LATIN CAPITAL LETTER T WITH DOT BELOW +<dead_belowdot> <t> : "á¹­" U1E6D # LATIN SMALL LETTER T WITH DOT BELOW +<Multi_key> <exclam> <t> : "á¹­" U1E6D # LATIN SMALL LETTER T WITH DOT BELOW +<combining_belowdot> <t> : "á¹­" U1E6D # LATIN SMALL LETTER T WITH DOT BELOW +<U0331> <T> : "á¹®" U1E6E # LATIN CAPITAL LETTER T WITH LINE BELOW +<U0331> <t> : "ṯ" U1E6F # LATIN SMALL LETTER T WITH LINE BELOW +<U032d> <T> : "á¹°" U1E70 # LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW +<U032d> <t> : "á¹±" U1E71 # LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW +<U0324> <U> : "á¹²" U1E72 # LATIN CAPITAL LETTER U WITH DIAERESIS BELOW +<U0324> <u> : "á¹³" U1E73 # LATIN SMALL LETTER U WITH DIAERESIS BELOW +<U0330> <U> : "á¹´" U1E74 # LATIN CAPITAL LETTER U WITH TILDE BELOW +<U0330> <u> : "á¹µ" U1E75 # LATIN SMALL LETTER U WITH TILDE BELOW +<U032d> <U> : "Ṷ" U1E76 # LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW +<U032d> <u> : "á¹·" U1E77 # LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW +<dead_acute> <Utilde> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<Multi_key> <acute> <Utilde> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <Utilde> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<dead_acute> <dead_tilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<dead_acute> <Multi_key> <asciitilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<Multi_key> <acute> <dead_tilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<Multi_key> <acute> <asciitilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <dead_tilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <asciitilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<dead_acute> <combining_tilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<Multi_key> <acute> <combining_tilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <combining_tilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<combining_acute> <Utilde> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<combining_acute> <dead_tilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<combining_acute> <Multi_key> <asciitilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<combining_acute> <combining_tilde> <U> : "Ṹ" U1E78 # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE +<dead_acute> <utilde> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<Multi_key> <acute> <utilde> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <utilde> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<dead_acute> <dead_tilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<dead_acute> <Multi_key> <asciitilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<Multi_key> <acute> <dead_tilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<Multi_key> <acute> <asciitilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <dead_tilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <asciitilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<dead_acute> <combining_tilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<Multi_key> <acute> <combining_tilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<Multi_key> <apostrophe> <combining_tilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<combining_acute> <utilde> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<combining_acute> <dead_tilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<combining_acute> <Multi_key> <asciitilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<combining_acute> <combining_tilde> <u> : "á¹¹" U1E79 # LATIN SMALL LETTER U WITH TILDE AND ACUTE +<dead_diaeresis> <Umacron> : "Ṻ" U1E7A # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS +<Multi_key> <quotedbl> <Umacron> : "Ṻ" U1E7A # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS +<dead_diaeresis> <dead_macron> <U> : "Ṻ" U1E7A # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS +<dead_diaeresis> <Multi_key> <macron> <U> : "Ṻ" U1E7A # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS +<dead_diaeresis> <Multi_key> <underscore> <U> : "Ṻ" U1E7A # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS +<Multi_key> <quotedbl> <dead_macron> <U> : "Ṻ" U1E7A # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS +<Multi_key> <quotedbl> <macron> <U> : "Ṻ" U1E7A # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS +<Multi_key> <quotedbl> <underscore> <U> : "Ṻ" U1E7A # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS +<dead_diaeresis> <umacron> : "á¹»" U1E7B # LATIN SMALL LETTER U WITH MACRON AND DIAERESIS +<Multi_key> <quotedbl> <umacron> : "á¹»" U1E7B # LATIN SMALL LETTER U WITH MACRON AND DIAERESIS +<dead_diaeresis> <dead_macron> <u> : "á¹»" U1E7B # LATIN SMALL LETTER U WITH MACRON AND DIAERESIS +<dead_diaeresis> <Multi_key> <macron> <u> : "á¹»" U1E7B # LATIN SMALL LETTER U WITH MACRON AND DIAERESIS +<dead_diaeresis> <Multi_key> <underscore> <u> : "á¹»" U1E7B # LATIN SMALL LETTER U WITH MACRON AND DIAERESIS +<Multi_key> <quotedbl> <dead_macron> <u> : "á¹»" U1E7B # LATIN SMALL LETTER U WITH MACRON AND DIAERESIS +<Multi_key> <quotedbl> <macron> <u> : "á¹»" U1E7B # LATIN SMALL LETTER U WITH MACRON AND DIAERESIS +<Multi_key> <quotedbl> <underscore> <u> : "á¹»" U1E7B # LATIN SMALL LETTER U WITH MACRON AND DIAERESIS +<dead_tilde> <V> : "á¹¼" U1E7C # LATIN CAPITAL LETTER V WITH TILDE +<Multi_key> <asciitilde> <V> : "á¹¼" U1E7C # LATIN CAPITAL LETTER V WITH TILDE +<combining_tilde> <V> : "á¹¼" U1E7C # LATIN CAPITAL LETTER V WITH TILDE +<dead_tilde> <v> : "á¹½" U1E7D # LATIN SMALL LETTER V WITH TILDE +<Multi_key> <asciitilde> <v> : "á¹½" U1E7D # LATIN SMALL LETTER V WITH TILDE +<combining_tilde> <v> : "á¹½" U1E7D # LATIN SMALL LETTER V WITH TILDE +<dead_belowdot> <V> : "á¹¾" U1E7E # LATIN CAPITAL LETTER V WITH DOT BELOW +<Multi_key> <exclam> <V> : "á¹¾" U1E7E # LATIN CAPITAL LETTER V WITH DOT BELOW +<combining_belowdot> <V> : "á¹¾" U1E7E # LATIN CAPITAL LETTER V WITH DOT BELOW +<dead_belowdot> <v> : "ṿ" U1E7F # LATIN SMALL LETTER V WITH DOT BELOW +<Multi_key> <exclam> <v> : "ṿ" U1E7F # LATIN SMALL LETTER V WITH DOT BELOW +<combining_belowdot> <v> : "ṿ" U1E7F # LATIN SMALL LETTER V WITH DOT BELOW +<dead_grave> <W> : "Ẁ" U1E80 # LATIN CAPITAL LETTER W WITH GRAVE +<Multi_key> <grave> <W> : "Ẁ" U1E80 # LATIN CAPITAL LETTER W WITH GRAVE +<combining_grave> <W> : "Ẁ" U1E80 # LATIN CAPITAL LETTER W WITH GRAVE +<dead_grave> <w> : "áº" U1E81 # LATIN SMALL LETTER W WITH GRAVE +<Multi_key> <grave> <w> : "áº" U1E81 # LATIN SMALL LETTER W WITH GRAVE +<combining_grave> <w> : "áº" U1E81 # LATIN SMALL LETTER W WITH GRAVE +<dead_acute> <W> : "Ẃ" U1E82 # LATIN CAPITAL LETTER W WITH ACUTE +<Multi_key> <acute> <W> : "Ẃ" U1E82 # LATIN CAPITAL LETTER W WITH ACUTE +<Multi_key> <apostrophe> <W> : "Ẃ" U1E82 # LATIN CAPITAL LETTER W WITH ACUTE +<combining_acute> <W> : "Ẃ" U1E82 # LATIN CAPITAL LETTER W WITH ACUTE +<dead_acute> <w> : "ẃ" U1E83 # LATIN SMALL LETTER W WITH ACUTE +<Multi_key> <acute> <w> : "ẃ" U1E83 # LATIN SMALL LETTER W WITH ACUTE +<Multi_key> <apostrophe> <w> : "ẃ" U1E83 # LATIN SMALL LETTER W WITH ACUTE +<combining_acute> <w> : "ẃ" U1E83 # LATIN SMALL LETTER W WITH ACUTE +<dead_diaeresis> <W> : "Ẅ" U1E84 # LATIN CAPITAL LETTER W WITH DIAERESIS +<Multi_key> <quotedbl> <W> : "Ẅ" U1E84 # LATIN CAPITAL LETTER W WITH DIAERESIS +<dead_diaeresis> <w> : "ẅ" U1E85 # LATIN SMALL LETTER W WITH DIAERESIS +<Multi_key> <quotedbl> <w> : "ẅ" U1E85 # LATIN SMALL LETTER W WITH DIAERESIS +<dead_abovedot> <W> : "Ẇ" U1E86 # LATIN CAPITAL LETTER W WITH DOT ABOVE +<Multi_key> <period> <W> : "Ẇ" U1E86 # LATIN CAPITAL LETTER W WITH DOT ABOVE +<dead_abovedot> <w> : "ẇ" U1E87 # LATIN SMALL LETTER W WITH DOT ABOVE +<Multi_key> <period> <w> : "ẇ" U1E87 # LATIN SMALL LETTER W WITH DOT ABOVE +<dead_belowdot> <W> : "Ẉ" U1E88 # LATIN CAPITAL LETTER W WITH DOT BELOW +<Multi_key> <exclam> <W> : "Ẉ" U1E88 # LATIN CAPITAL LETTER W WITH DOT BELOW +<combining_belowdot> <W> : "Ẉ" U1E88 # LATIN CAPITAL LETTER W WITH DOT BELOW +<dead_belowdot> <w> : "ẉ" U1E89 # LATIN SMALL LETTER W WITH DOT BELOW +<Multi_key> <exclam> <w> : "ẉ" U1E89 # LATIN SMALL LETTER W WITH DOT BELOW +<combining_belowdot> <w> : "ẉ" U1E89 # LATIN SMALL LETTER W WITH DOT BELOW +<dead_abovedot> <X> : "Ẋ" U1E8A # LATIN CAPITAL LETTER X WITH DOT ABOVE +<Multi_key> <period> <X> : "Ẋ" U1E8A # LATIN CAPITAL LETTER X WITH DOT ABOVE +<dead_abovedot> <x> : "ẋ" U1E8B # LATIN SMALL LETTER X WITH DOT ABOVE +<Multi_key> <period> <x> : "ẋ" U1E8B # LATIN SMALL LETTER X WITH DOT ABOVE +<dead_diaeresis> <X> : "Ẍ" U1E8C # LATIN CAPITAL LETTER X WITH DIAERESIS +<Multi_key> <quotedbl> <X> : "Ẍ" U1E8C # LATIN CAPITAL LETTER X WITH DIAERESIS +<dead_diaeresis> <x> : "áº" U1E8D # LATIN SMALL LETTER X WITH DIAERESIS +<Multi_key> <quotedbl> <x> : "áº" U1E8D # LATIN SMALL LETTER X WITH DIAERESIS +<dead_abovedot> <Y> : "Ẏ" U1E8E # LATIN CAPITAL LETTER Y WITH DOT ABOVE +<Multi_key> <period> <Y> : "Ẏ" U1E8E # LATIN CAPITAL LETTER Y WITH DOT ABOVE +<dead_abovedot> <y> : "áº" U1E8F # LATIN SMALL LETTER Y WITH DOT ABOVE +<Multi_key> <period> <y> : "áº" U1E8F # LATIN SMALL LETTER Y WITH DOT ABOVE +<dead_circumflex> <Z> : "áº" U1E90 # LATIN CAPITAL LETTER Z WITH CIRCUMFLEX +<Multi_key> <asciicircum> <Z> : "áº" U1E90 # LATIN CAPITAL LETTER Z WITH CIRCUMFLEX +<dead_circumflex> <z> : "ẑ" U1E91 # LATIN SMALL LETTER Z WITH CIRCUMFLEX +<Multi_key> <asciicircum> <z> : "ẑ" U1E91 # LATIN SMALL LETTER Z WITH CIRCUMFLEX +<dead_belowdot> <Z> : "Ẓ" U1E92 # LATIN CAPITAL LETTER Z WITH DOT BELOW +<Multi_key> <exclam> <Z> : "Ẓ" U1E92 # LATIN CAPITAL LETTER Z WITH DOT BELOW +<combining_belowdot> <Z> : "Ẓ" U1E92 # LATIN CAPITAL LETTER Z WITH DOT BELOW +<dead_belowdot> <z> : "ẓ" U1E93 # LATIN SMALL LETTER Z WITH DOT BELOW +<Multi_key> <exclam> <z> : "ẓ" U1E93 # LATIN SMALL LETTER Z WITH DOT BELOW +<combining_belowdot> <z> : "ẓ" U1E93 # LATIN SMALL LETTER Z WITH DOT BELOW +<U0331> <Z> : "Ẕ" U1E94 # LATIN CAPITAL LETTER Z WITH LINE BELOW +<U0331> <z> : "ẕ" U1E95 # LATIN SMALL LETTER Z WITH LINE BELOW +<U0331> <h> : "ẖ" U1E96 # LATIN SMALL LETTER H WITH LINE BELOW +<dead_diaeresis> <t> : "ẗ" U1E97 # LATIN SMALL LETTER T WITH DIAERESIS +<Multi_key> <quotedbl> <t> : "ẗ" U1E97 # LATIN SMALL LETTER T WITH DIAERESIS +<dead_abovering> <w> : "ẘ" U1E98 # LATIN SMALL LETTER W WITH RING ABOVE +<Multi_key> <o> <w> : "ẘ" U1E98 # LATIN SMALL LETTER W WITH RING ABOVE +<dead_abovering> <y> : "ẙ" U1E99 # LATIN SMALL LETTER Y WITH RING ABOVE +<Multi_key> <o> <y> : "ẙ" U1E99 # LATIN SMALL LETTER Y WITH RING ABOVE +<dead_abovedot> <U017f> : "ẛ" U1E9B # LATIN SMALL LETTER LONG S WITH DOT ABOVE +<Multi_key> <period> <U017f> : "ẛ" U1E9B # LATIN SMALL LETTER LONG S WITH DOT ABOVE +<dead_belowdot> <A> : "Ạ" U1EA0 # LATIN CAPITAL LETTER A WITH DOT BELOW +<Multi_key> <exclam> <A> : "Ạ" U1EA0 # LATIN CAPITAL LETTER A WITH DOT BELOW +<combining_belowdot> <A> : "Ạ" U1EA0 # LATIN CAPITAL LETTER A WITH DOT BELOW +<dead_belowdot> <a> : "ạ" U1EA1 # LATIN SMALL LETTER A WITH DOT BELOW +<Multi_key> <exclam> <a> : "ạ" U1EA1 # LATIN SMALL LETTER A WITH DOT BELOW +<combining_belowdot> <a> : "ạ" U1EA1 # LATIN SMALL LETTER A WITH DOT BELOW +<dead_hook> <A> : "Ả" U1EA2 # LATIN CAPITAL LETTER A WITH HOOK ABOVE +<Multi_key> <question> <A> : "Ả" U1EA2 # LATIN CAPITAL LETTER A WITH HOOK ABOVE +<combining_hook> <A> : "Ả" U1EA2 # LATIN CAPITAL LETTER A WITH HOOK ABOVE +<dead_hook> <a> : "ả" U1EA3 # LATIN SMALL LETTER A WITH HOOK ABOVE +<Multi_key> <question> <a> : "ả" U1EA3 # LATIN SMALL LETTER A WITH HOOK ABOVE +<combining_hook> <a> : "ả" U1EA3 # LATIN SMALL LETTER A WITH HOOK ABOVE +<dead_acute> <Acircumflex> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <Acircumflex> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <Acircumflex> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<dead_acute> <dead_circumflex> <A> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<dead_acute> <Multi_key> <asciicircum> <A> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <dead_circumflex> <A> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <asciicircum> <A> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <dead_circumflex> <A> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <asciicircum> <A> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<combining_acute> <Acircumflex> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<combining_acute> <dead_circumflex> <A> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<combining_acute> <Multi_key> <asciicircum> <A> : "Ấ" U1EA4 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE +<dead_acute> <acircumflex> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <acircumflex> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <acircumflex> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<dead_acute> <dead_circumflex> <a> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<dead_acute> <Multi_key> <asciicircum> <a> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <dead_circumflex> <a> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <asciicircum> <a> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <dead_circumflex> <a> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <asciicircum> <a> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<combining_acute> <acircumflex> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<combining_acute> <dead_circumflex> <a> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<combining_acute> <Multi_key> <asciicircum> <a> : "ấ" U1EA5 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE +<dead_grave> <Acircumflex> : "Ầ" U1EA6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <Acircumflex> : "Ầ" U1EA6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +<dead_grave> <dead_circumflex> <A> : "Ầ" U1EA6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +<dead_grave> <Multi_key> <asciicircum> <A> : "Ầ" U1EA6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <dead_circumflex> <A> : "Ầ" U1EA6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <asciicircum> <A> : "Ầ" U1EA6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +<combining_grave> <Acircumflex> : "Ầ" U1EA6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +<combining_grave> <dead_circumflex> <A> : "Ầ" U1EA6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +<combining_grave> <Multi_key> <asciicircum> <A> : "Ầ" U1EA6 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE +<dead_grave> <acircumflex> : "ầ" U1EA7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <acircumflex> : "ầ" U1EA7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +<dead_grave> <dead_circumflex> <a> : "ầ" U1EA7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +<dead_grave> <Multi_key> <asciicircum> <a> : "ầ" U1EA7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <dead_circumflex> <a> : "ầ" U1EA7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <asciicircum> <a> : "ầ" U1EA7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +<combining_grave> <acircumflex> : "ầ" U1EA7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +<combining_grave> <dead_circumflex> <a> : "ầ" U1EA7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +<combining_grave> <Multi_key> <asciicircum> <a> : "ầ" U1EA7 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE +<dead_hook> <Acircumflex> : "Ẩ" U1EA8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <Acircumflex> : "Ẩ" U1EA8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <dead_circumflex> <A> : "Ẩ" U1EA8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <Multi_key> <asciicircum> <A> : "Ẩ" U1EA8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <dead_circumflex> <A> : "Ẩ" U1EA8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <asciicircum> <A> : "Ẩ" U1EA8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <Acircumflex> : "Ẩ" U1EA8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <dead_circumflex> <A> : "Ẩ" U1EA8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <Multi_key> <asciicircum> <A> : "Ẩ" U1EA8 # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <acircumflex> : "ẩ" U1EA9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <acircumflex> : "ẩ" U1EA9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <dead_circumflex> <a> : "ẩ" U1EA9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <Multi_key> <asciicircum> <a> : "ẩ" U1EA9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <dead_circumflex> <a> : "ẩ" U1EA9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <asciicircum> <a> : "ẩ" U1EA9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <acircumflex> : "ẩ" U1EA9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <dead_circumflex> <a> : "ẩ" U1EA9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <Multi_key> <asciicircum> <a> : "ẩ" U1EA9 # LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE +<dead_tilde> <Acircumflex> : "Ẫ" U1EAA # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <Acircumflex> : "Ẫ" U1EAA # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +<dead_tilde> <dead_circumflex> <A> : "Ẫ" U1EAA # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +<dead_tilde> <Multi_key> <asciicircum> <A> : "Ẫ" U1EAA # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <dead_circumflex> <A> : "Ẫ" U1EAA # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <asciicircum> <A> : "Ẫ" U1EAA # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +<combining_tilde> <Acircumflex> : "Ẫ" U1EAA # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +<combining_tilde> <dead_circumflex> <A> : "Ẫ" U1EAA # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +<combining_tilde> <Multi_key> <asciicircum> <A> : "Ẫ" U1EAA # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE +<dead_tilde> <acircumflex> : "ẫ" U1EAB # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <acircumflex> : "ẫ" U1EAB # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +<dead_tilde> <dead_circumflex> <a> : "ẫ" U1EAB # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +<dead_tilde> <Multi_key> <asciicircum> <a> : "ẫ" U1EAB # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <dead_circumflex> <a> : "ẫ" U1EAB # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <asciicircum> <a> : "ẫ" U1EAB # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +<combining_tilde> <acircumflex> : "ẫ" U1EAB # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +<combining_tilde> <dead_circumflex> <a> : "ẫ" U1EAB # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +<combining_tilde> <Multi_key> <asciicircum> <a> : "ẫ" U1EAB # LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE +<dead_circumflex> <U1ea0> : "Ậ" U1EAC # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <U1ea0> : "Ậ" U1EAC # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <dead_belowdot> <A> : "Ậ" U1EAC # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <Multi_key> <exclam> <A> : "Ậ" U1EAC # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <dead_belowdot> <A> : "Ậ" U1EAC # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <exclam> <A> : "Ậ" U1EAC # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <combining_belowdot> <A> : "Ậ" U1EAC # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <combining_belowdot> <A> : "Ậ" U1EAC # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <U1ea1> : "ậ" U1EAD # LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <U1ea1> : "ậ" U1EAD # LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <dead_belowdot> <a> : "ậ" U1EAD # LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <Multi_key> <exclam> <a> : "ậ" U1EAD # LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <dead_belowdot> <a> : "ậ" U1EAD # LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <exclam> <a> : "ậ" U1EAD # LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <combining_belowdot> <a> : "ậ" U1EAD # LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <combining_belowdot> <a> : "ậ" U1EAD # LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW +<dead_acute> <Abreve> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<Multi_key> <acute> <Abreve> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<Multi_key> <apostrophe> <Abreve> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<dead_acute> <dead_breve> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<dead_acute> <Multi_key> <U> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<dead_acute> <Multi_key> <b> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<Multi_key> <acute> <dead_breve> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<Multi_key> <acute> <U> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<Multi_key> <acute> <b> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<Multi_key> <apostrophe> <dead_breve> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<Multi_key> <apostrophe> <U> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<Multi_key> <apostrophe> <b> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<combining_acute> <Abreve> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<combining_acute> <dead_breve> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<combining_acute> <Multi_key> <U> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<combining_acute> <Multi_key> <b> <A> : "Ắ" U1EAE # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE +<dead_acute> <abreve> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<Multi_key> <acute> <abreve> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<Multi_key> <apostrophe> <abreve> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<dead_acute> <dead_breve> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<dead_acute> <Multi_key> <U> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<dead_acute> <Multi_key> <b> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<Multi_key> <acute> <dead_breve> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<Multi_key> <acute> <U> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<Multi_key> <acute> <b> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<Multi_key> <apostrophe> <dead_breve> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<Multi_key> <apostrophe> <U> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<Multi_key> <apostrophe> <b> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<combining_acute> <abreve> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<combining_acute> <dead_breve> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<combining_acute> <Multi_key> <U> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<combining_acute> <Multi_key> <b> <a> : "ắ" U1EAF # LATIN SMALL LETTER A WITH BREVE AND ACUTE +<dead_grave> <Abreve> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<Multi_key> <grave> <Abreve> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<dead_grave> <dead_breve> <A> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<dead_grave> <Multi_key> <U> <A> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<dead_grave> <Multi_key> <b> <A> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<Multi_key> <grave> <dead_breve> <A> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<Multi_key> <grave> <U> <A> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<Multi_key> <grave> <b> <A> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<combining_grave> <Abreve> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<combining_grave> <dead_breve> <A> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<combining_grave> <Multi_key> <U> <A> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<combining_grave> <Multi_key> <b> <A> : "Ằ" U1EB0 # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE +<dead_grave> <abreve> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<Multi_key> <grave> <abreve> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<dead_grave> <dead_breve> <a> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<dead_grave> <Multi_key> <U> <a> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<dead_grave> <Multi_key> <b> <a> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<Multi_key> <grave> <dead_breve> <a> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<Multi_key> <grave> <U> <a> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<Multi_key> <grave> <b> <a> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<combining_grave> <abreve> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<combining_grave> <dead_breve> <a> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<combining_grave> <Multi_key> <U> <a> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<combining_grave> <Multi_key> <b> <a> : "ằ" U1EB1 # LATIN SMALL LETTER A WITH BREVE AND GRAVE +<dead_hook> <Abreve> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<Multi_key> <question> <Abreve> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<dead_hook> <dead_breve> <A> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<dead_hook> <Multi_key> <U> <A> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<dead_hook> <Multi_key> <b> <A> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<Multi_key> <question> <dead_breve> <A> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<Multi_key> <question> <U> <A> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<Multi_key> <question> <b> <A> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<combining_hook> <Abreve> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<combining_hook> <dead_breve> <A> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<combining_hook> <Multi_key> <U> <A> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<combining_hook> <Multi_key> <b> <A> : "Ẳ" U1EB2 # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE +<dead_hook> <abreve> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<Multi_key> <question> <abreve> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<dead_hook> <dead_breve> <a> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<dead_hook> <Multi_key> <U> <a> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<dead_hook> <Multi_key> <b> <a> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<Multi_key> <question> <dead_breve> <a> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<Multi_key> <question> <U> <a> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<Multi_key> <question> <b> <a> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<combining_hook> <abreve> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<combining_hook> <dead_breve> <a> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<combining_hook> <Multi_key> <U> <a> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<combining_hook> <Multi_key> <b> <a> : "ẳ" U1EB3 # LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE +<dead_tilde> <Abreve> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<Multi_key> <asciitilde> <Abreve> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<dead_tilde> <dead_breve> <A> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<dead_tilde> <Multi_key> <U> <A> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<dead_tilde> <Multi_key> <b> <A> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<Multi_key> <asciitilde> <dead_breve> <A> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<Multi_key> <asciitilde> <U> <A> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<Multi_key> <asciitilde> <b> <A> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<combining_tilde> <Abreve> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<combining_tilde> <dead_breve> <A> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<combining_tilde> <Multi_key> <U> <A> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<combining_tilde> <Multi_key> <b> <A> : "Ẵ" U1EB4 # LATIN CAPITAL LETTER A WITH BREVE AND TILDE +<dead_tilde> <abreve> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<Multi_key> <asciitilde> <abreve> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<dead_tilde> <dead_breve> <a> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<dead_tilde> <Multi_key> <U> <a> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<dead_tilde> <Multi_key> <b> <a> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<Multi_key> <asciitilde> <dead_breve> <a> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<Multi_key> <asciitilde> <U> <a> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<Multi_key> <asciitilde> <b> <a> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<combining_tilde> <abreve> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<combining_tilde> <dead_breve> <a> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<combining_tilde> <Multi_key> <U> <a> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<combining_tilde> <Multi_key> <b> <a> : "ẵ" U1EB5 # LATIN SMALL LETTER A WITH BREVE AND TILDE +<dead_breve> <U1ea0> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <U> <U1ea0> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <b> <U1ea0> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<dead_breve> <dead_belowdot> <A> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<dead_breve> <Multi_key> <exclam> <A> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <U> <dead_belowdot> <A> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <U> <exclam> <A> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <b> <dead_belowdot> <A> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <b> <exclam> <A> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<dead_breve> <combining_belowdot> <A> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <U> <combining_belowdot> <A> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <b> <combining_belowdot> <A> : "Ặ" U1EB6 # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW +<dead_breve> <U1ea1> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <U> <U1ea1> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <b> <U1ea1> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<dead_breve> <dead_belowdot> <a> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<dead_breve> <Multi_key> <exclam> <a> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <U> <dead_belowdot> <a> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <U> <exclam> <a> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <b> <dead_belowdot> <a> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <b> <exclam> <a> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<dead_breve> <combining_belowdot> <a> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <U> <combining_belowdot> <a> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<Multi_key> <b> <combining_belowdot> <a> : "ặ" U1EB7 # LATIN SMALL LETTER A WITH BREVE AND DOT BELOW +<dead_belowdot> <E> : "Ẹ" U1EB8 # LATIN CAPITAL LETTER E WITH DOT BELOW +<Multi_key> <exclam> <E> : "Ẹ" U1EB8 # LATIN CAPITAL LETTER E WITH DOT BELOW +<combining_belowdot> <E> : "Ẹ" U1EB8 # LATIN CAPITAL LETTER E WITH DOT BELOW +<dead_belowdot> <e> : "ẹ" U1EB9 # LATIN SMALL LETTER E WITH DOT BELOW +<Multi_key> <exclam> <e> : "ẹ" U1EB9 # LATIN SMALL LETTER E WITH DOT BELOW +<combining_belowdot> <e> : "ẹ" U1EB9 # LATIN SMALL LETTER E WITH DOT BELOW +<dead_hook> <E> : "Ẻ" U1EBA # LATIN CAPITAL LETTER E WITH HOOK ABOVE +<Multi_key> <question> <E> : "Ẻ" U1EBA # LATIN CAPITAL LETTER E WITH HOOK ABOVE +<combining_hook> <E> : "Ẻ" U1EBA # LATIN CAPITAL LETTER E WITH HOOK ABOVE +<dead_hook> <e> : "ẻ" U1EBB # LATIN SMALL LETTER E WITH HOOK ABOVE +<Multi_key> <question> <e> : "ẻ" U1EBB # LATIN SMALL LETTER E WITH HOOK ABOVE +<combining_hook> <e> : "ẻ" U1EBB # LATIN SMALL LETTER E WITH HOOK ABOVE +<dead_tilde> <E> : "Ẽ" U1EBC # LATIN CAPITAL LETTER E WITH TILDE +<Multi_key> <asciitilde> <E> : "Ẽ" U1EBC # LATIN CAPITAL LETTER E WITH TILDE +<combining_tilde> <E> : "Ẽ" U1EBC # LATIN CAPITAL LETTER E WITH TILDE +<dead_tilde> <e> : "ẽ" U1EBD # LATIN SMALL LETTER E WITH TILDE +<Multi_key> <asciitilde> <e> : "ẽ" U1EBD # LATIN SMALL LETTER E WITH TILDE +<combining_tilde> <e> : "ẽ" U1EBD # LATIN SMALL LETTER E WITH TILDE +<dead_acute> <Ecircumflex> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <Ecircumflex> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <Ecircumflex> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<dead_acute> <dead_circumflex> <E> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<dead_acute> <Multi_key> <asciicircum> <E> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <dead_circumflex> <E> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <asciicircum> <E> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <dead_circumflex> <E> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <asciicircum> <E> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<combining_acute> <Ecircumflex> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<combining_acute> <dead_circumflex> <E> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<combining_acute> <Multi_key> <asciicircum> <E> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<dead_acute> <ecircumflex> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <ecircumflex> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <ecircumflex> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<dead_acute> <dead_circumflex> <e> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<dead_acute> <Multi_key> <asciicircum> <e> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <dead_circumflex> <e> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <asciicircum> <e> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <dead_circumflex> <e> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <asciicircum> <e> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<combining_acute> <ecircumflex> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<combining_acute> <dead_circumflex> <e> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<combining_acute> <Multi_key> <asciicircum> <e> : "ế" U1EBF # LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE +<dead_grave> <Ecircumflex> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <Ecircumflex> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +<dead_grave> <dead_circumflex> <E> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +<dead_grave> <Multi_key> <asciicircum> <E> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <dead_circumflex> <E> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <asciicircum> <E> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +<combining_grave> <Ecircumflex> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +<combining_grave> <dead_circumflex> <E> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +<combining_grave> <Multi_key> <asciicircum> <E> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE +<dead_grave> <ecircumflex> : "á»" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <ecircumflex> : "á»" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +<dead_grave> <dead_circumflex> <e> : "á»" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +<dead_grave> <Multi_key> <asciicircum> <e> : "á»" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <dead_circumflex> <e> : "á»" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <asciicircum> <e> : "á»" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +<combining_grave> <ecircumflex> : "á»" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +<combining_grave> <dead_circumflex> <e> : "á»" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +<combining_grave> <Multi_key> <asciicircum> <e> : "á»" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE +<dead_hook> <Ecircumflex> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <Ecircumflex> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <dead_circumflex> <E> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <Multi_key> <asciicircum> <E> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <dead_circumflex> <E> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <asciicircum> <E> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <Ecircumflex> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <dead_circumflex> <E> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <Multi_key> <asciicircum> <E> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <ecircumflex> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <ecircumflex> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <dead_circumflex> <e> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <Multi_key> <asciicircum> <e> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <dead_circumflex> <e> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <asciicircum> <e> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <ecircumflex> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <dead_circumflex> <e> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <Multi_key> <asciicircum> <e> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE +<dead_tilde> <Ecircumflex> : "Ễ" U1EC4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <Ecircumflex> : "Ễ" U1EC4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +<dead_tilde> <dead_circumflex> <E> : "Ễ" U1EC4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +<dead_tilde> <Multi_key> <asciicircum> <E> : "Ễ" U1EC4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <dead_circumflex> <E> : "Ễ" U1EC4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <asciicircum> <E> : "Ễ" U1EC4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +<combining_tilde> <Ecircumflex> : "Ễ" U1EC4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +<combining_tilde> <dead_circumflex> <E> : "Ễ" U1EC4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +<combining_tilde> <Multi_key> <asciicircum> <E> : "Ễ" U1EC4 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE +<dead_tilde> <ecircumflex> : "á»…" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <ecircumflex> : "á»…" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +<dead_tilde> <dead_circumflex> <e> : "á»…" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +<dead_tilde> <Multi_key> <asciicircum> <e> : "á»…" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <dead_circumflex> <e> : "á»…" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <asciicircum> <e> : "á»…" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +<combining_tilde> <ecircumflex> : "á»…" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +<combining_tilde> <dead_circumflex> <e> : "á»…" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +<combining_tilde> <Multi_key> <asciicircum> <e> : "á»…" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE +<dead_circumflex> <U1eb8> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <U1eb8> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <dead_belowdot> <E> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <Multi_key> <exclam> <E> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <dead_belowdot> <E> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <exclam> <E> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <combining_belowdot> <E> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <combining_belowdot> <E> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <U1eb9> : "ệ" U1EC7 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <U1eb9> : "ệ" U1EC7 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <dead_belowdot> <e> : "ệ" U1EC7 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <Multi_key> <exclam> <e> : "ệ" U1EC7 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <dead_belowdot> <e> : "ệ" U1EC7 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <exclam> <e> : "ệ" U1EC7 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <combining_belowdot> <e> : "ệ" U1EC7 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <combining_belowdot> <e> : "ệ" U1EC7 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW +<dead_hook> <I> : "Ỉ" U1EC8 # LATIN CAPITAL LETTER I WITH HOOK ABOVE +<Multi_key> <question> <I> : "Ỉ" U1EC8 # LATIN CAPITAL LETTER I WITH HOOK ABOVE +<combining_hook> <I> : "Ỉ" U1EC8 # LATIN CAPITAL LETTER I WITH HOOK ABOVE +<dead_hook> <i> : "ỉ" U1EC9 # LATIN SMALL LETTER I WITH HOOK ABOVE +<Multi_key> <question> <i> : "ỉ" U1EC9 # LATIN SMALL LETTER I WITH HOOK ABOVE +<combining_hook> <i> : "ỉ" U1EC9 # LATIN SMALL LETTER I WITH HOOK ABOVE +<dead_belowdot> <I> : "Ị" U1ECA # LATIN CAPITAL LETTER I WITH DOT BELOW +<Multi_key> <exclam> <I> : "Ị" U1ECA # LATIN CAPITAL LETTER I WITH DOT BELOW +<combining_belowdot> <I> : "Ị" U1ECA # LATIN CAPITAL LETTER I WITH DOT BELOW +<dead_belowdot> <i> : "ị" U1ECB # LATIN SMALL LETTER I WITH DOT BELOW +<Multi_key> <exclam> <i> : "ị" U1ECB # LATIN SMALL LETTER I WITH DOT BELOW +<combining_belowdot> <i> : "ị" U1ECB # LATIN SMALL LETTER I WITH DOT BELOW +<dead_belowdot> <O> : "Ọ" U1ECC # LATIN CAPITAL LETTER O WITH DOT BELOW +<Multi_key> <exclam> <O> : "Ọ" U1ECC # LATIN CAPITAL LETTER O WITH DOT BELOW +<combining_belowdot> <O> : "Ọ" U1ECC # LATIN CAPITAL LETTER O WITH DOT BELOW +<dead_belowdot> <o> : "á»" U1ECD # LATIN SMALL LETTER O WITH DOT BELOW +<Multi_key> <exclam> <o> : "á»" U1ECD # LATIN SMALL LETTER O WITH DOT BELOW +<combining_belowdot> <o> : "á»" U1ECD # LATIN SMALL LETTER O WITH DOT BELOW +<dead_hook> <O> : "Ỏ" U1ECE # LATIN CAPITAL LETTER O WITH HOOK ABOVE +<Multi_key> <question> <O> : "Ỏ" U1ECE # LATIN CAPITAL LETTER O WITH HOOK ABOVE +<combining_hook> <O> : "Ỏ" U1ECE # LATIN CAPITAL LETTER O WITH HOOK ABOVE +<dead_hook> <o> : "á»" U1ECF # LATIN SMALL LETTER O WITH HOOK ABOVE +<Multi_key> <question> <o> : "á»" U1ECF # LATIN SMALL LETTER O WITH HOOK ABOVE +<combining_hook> <o> : "á»" U1ECF # LATIN SMALL LETTER O WITH HOOK ABOVE +<dead_acute> <Ocircumflex> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <Ocircumflex> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <Ocircumflex> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<dead_acute> <dead_circumflex> <O> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<dead_acute> <Multi_key> <asciicircum> <O> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <dead_circumflex> <O> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <asciicircum> <O> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <dead_circumflex> <O> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <asciicircum> <O> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<combining_acute> <Ocircumflex> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<combining_acute> <dead_circumflex> <O> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<combining_acute> <Multi_key> <asciicircum> <O> : "á»" U1ED0 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE +<dead_acute> <ocircumflex> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <ocircumflex> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <ocircumflex> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<dead_acute> <dead_circumflex> <o> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<dead_acute> <Multi_key> <asciicircum> <o> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <dead_circumflex> <o> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <acute> <asciicircum> <o> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <dead_circumflex> <o> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<Multi_key> <apostrophe> <asciicircum> <o> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<combining_acute> <ocircumflex> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<combining_acute> <dead_circumflex> <o> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<combining_acute> <Multi_key> <asciicircum> <o> : "ố" U1ED1 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE +<dead_grave> <Ocircumflex> : "á»’" U1ED2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <Ocircumflex> : "á»’" U1ED2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +<dead_grave> <dead_circumflex> <O> : "á»’" U1ED2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +<dead_grave> <Multi_key> <asciicircum> <O> : "á»’" U1ED2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <dead_circumflex> <O> : "á»’" U1ED2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <asciicircum> <O> : "á»’" U1ED2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +<combining_grave> <Ocircumflex> : "á»’" U1ED2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +<combining_grave> <dead_circumflex> <O> : "á»’" U1ED2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +<combining_grave> <Multi_key> <asciicircum> <O> : "á»’" U1ED2 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE +<dead_grave> <ocircumflex> : "ồ" U1ED3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <ocircumflex> : "ồ" U1ED3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +<dead_grave> <dead_circumflex> <o> : "ồ" U1ED3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +<dead_grave> <Multi_key> <asciicircum> <o> : "ồ" U1ED3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <dead_circumflex> <o> : "ồ" U1ED3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +<Multi_key> <grave> <asciicircum> <o> : "ồ" U1ED3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +<combining_grave> <ocircumflex> : "ồ" U1ED3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +<combining_grave> <dead_circumflex> <o> : "ồ" U1ED3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +<combining_grave> <Multi_key> <asciicircum> <o> : "ồ" U1ED3 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE +<dead_hook> <Ocircumflex> : "á»”" U1ED4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <Ocircumflex> : "á»”" U1ED4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <dead_circumflex> <O> : "á»”" U1ED4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <Multi_key> <asciicircum> <O> : "á»”" U1ED4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <dead_circumflex> <O> : "á»”" U1ED4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <asciicircum> <O> : "á»”" U1ED4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <Ocircumflex> : "á»”" U1ED4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <dead_circumflex> <O> : "á»”" U1ED4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <Multi_key> <asciicircum> <O> : "á»”" U1ED4 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <ocircumflex> : "ổ" U1ED5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <ocircumflex> : "ổ" U1ED5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <dead_circumflex> <o> : "ổ" U1ED5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<dead_hook> <Multi_key> <asciicircum> <o> : "ổ" U1ED5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <dead_circumflex> <o> : "ổ" U1ED5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<Multi_key> <question> <asciicircum> <o> : "ổ" U1ED5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <ocircumflex> : "ổ" U1ED5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <dead_circumflex> <o> : "ổ" U1ED5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<combining_hook> <Multi_key> <asciicircum> <o> : "ổ" U1ED5 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE +<dead_tilde> <Ocircumflex> : "á»–" U1ED6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <Ocircumflex> : "á»–" U1ED6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +<dead_tilde> <dead_circumflex> <O> : "á»–" U1ED6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +<dead_tilde> <Multi_key> <asciicircum> <O> : "á»–" U1ED6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <dead_circumflex> <O> : "á»–" U1ED6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <asciicircum> <O> : "á»–" U1ED6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +<combining_tilde> <Ocircumflex> : "á»–" U1ED6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +<combining_tilde> <dead_circumflex> <O> : "á»–" U1ED6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +<combining_tilde> <Multi_key> <asciicircum> <O> : "á»–" U1ED6 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE +<dead_tilde> <ocircumflex> : "á»—" U1ED7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <ocircumflex> : "á»—" U1ED7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +<dead_tilde> <dead_circumflex> <o> : "á»—" U1ED7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +<dead_tilde> <Multi_key> <asciicircum> <o> : "á»—" U1ED7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <dead_circumflex> <o> : "á»—" U1ED7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +<Multi_key> <asciitilde> <asciicircum> <o> : "á»—" U1ED7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +<combining_tilde> <ocircumflex> : "á»—" U1ED7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +<combining_tilde> <dead_circumflex> <o> : "á»—" U1ED7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +<combining_tilde> <Multi_key> <asciicircum> <o> : "á»—" U1ED7 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE +<dead_circumflex> <U1ecc> : "Ộ" U1ED8 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <U1ecc> : "Ộ" U1ED8 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <dead_belowdot> <O> : "Ộ" U1ED8 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <Multi_key> <exclam> <O> : "Ộ" U1ED8 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <dead_belowdot> <O> : "Ộ" U1ED8 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <exclam> <O> : "Ộ" U1ED8 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <combining_belowdot> <O> : "Ộ" U1ED8 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <combining_belowdot> <O> : "Ộ" U1ED8 # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <U1ecd> : "á»™" U1ED9 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <U1ecd> : "á»™" U1ED9 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <dead_belowdot> <o> : "á»™" U1ED9 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <Multi_key> <exclam> <o> : "á»™" U1ED9 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <dead_belowdot> <o> : "á»™" U1ED9 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <exclam> <o> : "á»™" U1ED9 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<dead_circumflex> <combining_belowdot> <o> : "á»™" U1ED9 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<Multi_key> <asciicircum> <combining_belowdot> <o> : "á»™" U1ED9 # LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW +<dead_acute> <Ohorn> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<Multi_key> <acute> <Ohorn> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<Multi_key> <apostrophe> <Ohorn> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<dead_acute> <dead_horn> <O> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<dead_acute> <Multi_key> <plus> <O> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<Multi_key> <acute> <dead_horn> <O> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<Multi_key> <acute> <plus> <O> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<Multi_key> <apostrophe> <dead_horn> <O> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<Multi_key> <apostrophe> <plus> <O> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<combining_acute> <Ohorn> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<combining_acute> <dead_horn> <O> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<combining_acute> <Multi_key> <plus> <O> : "Ớ" U1EDA # LATIN CAPITAL LETTER O WITH HORN AND ACUTE +<dead_acute> <ohorn> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<Multi_key> <acute> <ohorn> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<Multi_key> <apostrophe> <ohorn> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<dead_acute> <dead_horn> <o> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<dead_acute> <Multi_key> <plus> <o> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<Multi_key> <acute> <dead_horn> <o> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<Multi_key> <acute> <plus> <o> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<Multi_key> <apostrophe> <dead_horn> <o> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<Multi_key> <apostrophe> <plus> <o> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<combining_acute> <ohorn> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<combining_acute> <dead_horn> <o> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<combining_acute> <Multi_key> <plus> <o> : "á»›" U1EDB # LATIN SMALL LETTER O WITH HORN AND ACUTE +<dead_grave> <Ohorn> : "Ờ" U1EDC # LATIN CAPITAL LETTER O WITH HORN AND GRAVE +<Multi_key> <grave> <Ohorn> : "Ờ" U1EDC # LATIN CAPITAL LETTER O WITH HORN AND GRAVE +<dead_grave> <dead_horn> <O> : "Ờ" U1EDC # LATIN CAPITAL LETTER O WITH HORN AND GRAVE +<dead_grave> <Multi_key> <plus> <O> : "Ờ" U1EDC # LATIN CAPITAL LETTER O WITH HORN AND GRAVE +<Multi_key> <grave> <dead_horn> <O> : "Ờ" U1EDC # LATIN CAPITAL LETTER O WITH HORN AND GRAVE +<Multi_key> <grave> <plus> <O> : "Ờ" U1EDC # LATIN CAPITAL LETTER O WITH HORN AND GRAVE +<combining_grave> <Ohorn> : "Ờ" U1EDC # LATIN CAPITAL LETTER O WITH HORN AND GRAVE +<combining_grave> <dead_horn> <O> : "Ờ" U1EDC # LATIN CAPITAL LETTER O WITH HORN AND GRAVE +<combining_grave> <Multi_key> <plus> <O> : "Ờ" U1EDC # LATIN CAPITAL LETTER O WITH HORN AND GRAVE +<dead_grave> <ohorn> : "á»" U1EDD # LATIN SMALL LETTER O WITH HORN AND GRAVE +<Multi_key> <grave> <ohorn> : "á»" U1EDD # LATIN SMALL LETTER O WITH HORN AND GRAVE +<dead_grave> <dead_horn> <o> : "á»" U1EDD # LATIN SMALL LETTER O WITH HORN AND GRAVE +<dead_grave> <Multi_key> <plus> <o> : "á»" U1EDD # LATIN SMALL LETTER O WITH HORN AND GRAVE +<Multi_key> <grave> <dead_horn> <o> : "á»" U1EDD # LATIN SMALL LETTER O WITH HORN AND GRAVE +<Multi_key> <grave> <plus> <o> : "á»" U1EDD # LATIN SMALL LETTER O WITH HORN AND GRAVE +<combining_grave> <ohorn> : "á»" U1EDD # LATIN SMALL LETTER O WITH HORN AND GRAVE +<combining_grave> <dead_horn> <o> : "á»" U1EDD # LATIN SMALL LETTER O WITH HORN AND GRAVE +<combining_grave> <Multi_key> <plus> <o> : "á»" U1EDD # LATIN SMALL LETTER O WITH HORN AND GRAVE +<dead_hook> <Ohorn> : "Ở" U1EDE # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +<Multi_key> <question> <Ohorn> : "Ở" U1EDE # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +<dead_hook> <dead_horn> <O> : "Ở" U1EDE # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +<dead_hook> <Multi_key> <plus> <O> : "Ở" U1EDE # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +<Multi_key> <question> <dead_horn> <O> : "Ở" U1EDE # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +<Multi_key> <question> <plus> <O> : "Ở" U1EDE # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +<combining_hook> <Ohorn> : "Ở" U1EDE # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +<combining_hook> <dead_horn> <O> : "Ở" U1EDE # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +<combining_hook> <Multi_key> <plus> <O> : "Ở" U1EDE # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE +<dead_hook> <ohorn> : "ở" U1EDF # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +<Multi_key> <question> <ohorn> : "ở" U1EDF # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +<dead_hook> <dead_horn> <o> : "ở" U1EDF # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +<dead_hook> <Multi_key> <plus> <o> : "ở" U1EDF # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +<Multi_key> <question> <dead_horn> <o> : "ở" U1EDF # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +<Multi_key> <question> <plus> <o> : "ở" U1EDF # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +<combining_hook> <ohorn> : "ở" U1EDF # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +<combining_hook> <dead_horn> <o> : "ở" U1EDF # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +<combining_hook> <Multi_key> <plus> <o> : "ở" U1EDF # LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE +<dead_tilde> <Ohorn> : "á» " U1EE0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE +<Multi_key> <asciitilde> <Ohorn> : "á» " U1EE0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE +<dead_tilde> <dead_horn> <O> : "á» " U1EE0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE +<dead_tilde> <Multi_key> <plus> <O> : "á» " U1EE0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE +<Multi_key> <asciitilde> <dead_horn> <O> : "á» " U1EE0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE +<Multi_key> <asciitilde> <plus> <O> : "á» " U1EE0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE +<combining_tilde> <Ohorn> : "á» " U1EE0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE +<combining_tilde> <dead_horn> <O> : "á» " U1EE0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE +<combining_tilde> <Multi_key> <plus> <O> : "á» " U1EE0 # LATIN CAPITAL LETTER O WITH HORN AND TILDE +<dead_tilde> <ohorn> : "ỡ" U1EE1 # LATIN SMALL LETTER O WITH HORN AND TILDE +<Multi_key> <asciitilde> <ohorn> : "ỡ" U1EE1 # LATIN SMALL LETTER O WITH HORN AND TILDE +<dead_tilde> <dead_horn> <o> : "ỡ" U1EE1 # LATIN SMALL LETTER O WITH HORN AND TILDE +<dead_tilde> <Multi_key> <plus> <o> : "ỡ" U1EE1 # LATIN SMALL LETTER O WITH HORN AND TILDE +<Multi_key> <asciitilde> <dead_horn> <o> : "ỡ" U1EE1 # LATIN SMALL LETTER O WITH HORN AND TILDE +<Multi_key> <asciitilde> <plus> <o> : "ỡ" U1EE1 # LATIN SMALL LETTER O WITH HORN AND TILDE +<combining_tilde> <ohorn> : "ỡ" U1EE1 # LATIN SMALL LETTER O WITH HORN AND TILDE +<combining_tilde> <dead_horn> <o> : "ỡ" U1EE1 # LATIN SMALL LETTER O WITH HORN AND TILDE +<combining_tilde> <Multi_key> <plus> <o> : "ỡ" U1EE1 # LATIN SMALL LETTER O WITH HORN AND TILDE +<dead_belowdot> <Ohorn> : "Ợ" U1EE2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +<Multi_key> <exclam> <Ohorn> : "Ợ" U1EE2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +<dead_belowdot> <dead_horn> <O> : "Ợ" U1EE2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +<dead_belowdot> <Multi_key> <plus> <O> : "Ợ" U1EE2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +<Multi_key> <exclam> <dead_horn> <O> : "Ợ" U1EE2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +<Multi_key> <exclam> <plus> <O> : "Ợ" U1EE2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +<combining_belowdot> <Ohorn> : "Ợ" U1EE2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +<combining_belowdot> <dead_horn> <O> : "Ợ" U1EE2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +<combining_belowdot> <Multi_key> <plus> <O> : "Ợ" U1EE2 # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW +<dead_belowdot> <ohorn> : "ợ" U1EE3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW +<Multi_key> <exclam> <ohorn> : "ợ" U1EE3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW +<dead_belowdot> <dead_horn> <o> : "ợ" U1EE3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW +<dead_belowdot> <Multi_key> <plus> <o> : "ợ" U1EE3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW +<Multi_key> <exclam> <dead_horn> <o> : "ợ" U1EE3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW +<Multi_key> <exclam> <plus> <o> : "ợ" U1EE3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW +<combining_belowdot> <ohorn> : "ợ" U1EE3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW +<combining_belowdot> <dead_horn> <o> : "ợ" U1EE3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW +<combining_belowdot> <Multi_key> <plus> <o> : "ợ" U1EE3 # LATIN SMALL LETTER O WITH HORN AND DOT BELOW +<dead_belowdot> <U> : "Ụ" U1EE4 # LATIN CAPITAL LETTER U WITH DOT BELOW +<Multi_key> <exclam> <U> : "Ụ" U1EE4 # LATIN CAPITAL LETTER U WITH DOT BELOW +<combining_belowdot> <U> : "Ụ" U1EE4 # LATIN CAPITAL LETTER U WITH DOT BELOW +<dead_belowdot> <u> : "ụ" U1EE5 # LATIN SMALL LETTER U WITH DOT BELOW +<Multi_key> <exclam> <u> : "ụ" U1EE5 # LATIN SMALL LETTER U WITH DOT BELOW +<combining_belowdot> <u> : "ụ" U1EE5 # LATIN SMALL LETTER U WITH DOT BELOW +<dead_hook> <U> : "Ủ" U1EE6 # LATIN CAPITAL LETTER U WITH HOOK ABOVE +<Multi_key> <question> <U> : "Ủ" U1EE6 # LATIN CAPITAL LETTER U WITH HOOK ABOVE +<combining_hook> <U> : "Ủ" U1EE6 # LATIN CAPITAL LETTER U WITH HOOK ABOVE +<dead_hook> <u> : "ủ" U1EE7 # LATIN SMALL LETTER U WITH HOOK ABOVE +<Multi_key> <question> <u> : "ủ" U1EE7 # LATIN SMALL LETTER U WITH HOOK ABOVE +<combining_hook> <u> : "ủ" U1EE7 # LATIN SMALL LETTER U WITH HOOK ABOVE +<dead_acute> <Uhorn> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<Multi_key> <acute> <Uhorn> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<Multi_key> <apostrophe> <Uhorn> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<dead_acute> <dead_horn> <U> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<dead_acute> <Multi_key> <plus> <U> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<Multi_key> <acute> <dead_horn> <U> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<Multi_key> <acute> <plus> <U> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<Multi_key> <apostrophe> <dead_horn> <U> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<Multi_key> <apostrophe> <plus> <U> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<combining_acute> <Uhorn> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<combining_acute> <dead_horn> <U> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<combining_acute> <Multi_key> <plus> <U> : "Ứ" U1EE8 # LATIN CAPITAL LETTER U WITH HORN AND ACUTE +<dead_acute> <uhorn> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<Multi_key> <acute> <uhorn> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<Multi_key> <apostrophe> <uhorn> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<dead_acute> <dead_horn> <u> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<dead_acute> <Multi_key> <plus> <u> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<Multi_key> <acute> <dead_horn> <u> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<Multi_key> <acute> <plus> <u> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<Multi_key> <apostrophe> <dead_horn> <u> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<Multi_key> <apostrophe> <plus> <u> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<combining_acute> <uhorn> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<combining_acute> <dead_horn> <u> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<combining_acute> <Multi_key> <plus> <u> : "ứ" U1EE9 # LATIN SMALL LETTER U WITH HORN AND ACUTE +<dead_grave> <Uhorn> : "Ừ" U1EEA # LATIN CAPITAL LETTER U WITH HORN AND GRAVE +<Multi_key> <grave> <Uhorn> : "Ừ" U1EEA # LATIN CAPITAL LETTER U WITH HORN AND GRAVE +<dead_grave> <dead_horn> <U> : "Ừ" U1EEA # LATIN CAPITAL LETTER U WITH HORN AND GRAVE +<dead_grave> <Multi_key> <plus> <U> : "Ừ" U1EEA # LATIN CAPITAL LETTER U WITH HORN AND GRAVE +<Multi_key> <grave> <dead_horn> <U> : "Ừ" U1EEA # LATIN CAPITAL LETTER U WITH HORN AND GRAVE +<Multi_key> <grave> <plus> <U> : "Ừ" U1EEA # LATIN CAPITAL LETTER U WITH HORN AND GRAVE +<combining_grave> <Uhorn> : "Ừ" U1EEA # LATIN CAPITAL LETTER U WITH HORN AND GRAVE +<combining_grave> <dead_horn> <U> : "Ừ" U1EEA # LATIN CAPITAL LETTER U WITH HORN AND GRAVE +<combining_grave> <Multi_key> <plus> <U> : "Ừ" U1EEA # LATIN CAPITAL LETTER U WITH HORN AND GRAVE +<dead_grave> <uhorn> : "ừ" U1EEB # LATIN SMALL LETTER U WITH HORN AND GRAVE +<Multi_key> <grave> <uhorn> : "ừ" U1EEB # LATIN SMALL LETTER U WITH HORN AND GRAVE +<dead_grave> <dead_horn> <u> : "ừ" U1EEB # LATIN SMALL LETTER U WITH HORN AND GRAVE +<dead_grave> <Multi_key> <plus> <u> : "ừ" U1EEB # LATIN SMALL LETTER U WITH HORN AND GRAVE +<Multi_key> <grave> <dead_horn> <u> : "ừ" U1EEB # LATIN SMALL LETTER U WITH HORN AND GRAVE +<Multi_key> <grave> <plus> <u> : "ừ" U1EEB # LATIN SMALL LETTER U WITH HORN AND GRAVE +<combining_grave> <uhorn> : "ừ" U1EEB # LATIN SMALL LETTER U WITH HORN AND GRAVE +<combining_grave> <dead_horn> <u> : "ừ" U1EEB # LATIN SMALL LETTER U WITH HORN AND GRAVE +<combining_grave> <Multi_key> <plus> <u> : "ừ" U1EEB # LATIN SMALL LETTER U WITH HORN AND GRAVE +<dead_hook> <Uhorn> : "Ử" U1EEC # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +<Multi_key> <question> <Uhorn> : "Ử" U1EEC # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +<dead_hook> <dead_horn> <U> : "Ử" U1EEC # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +<dead_hook> <Multi_key> <plus> <U> : "Ử" U1EEC # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +<Multi_key> <question> <dead_horn> <U> : "Ử" U1EEC # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +<Multi_key> <question> <plus> <U> : "Ử" U1EEC # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +<combining_hook> <Uhorn> : "Ử" U1EEC # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +<combining_hook> <dead_horn> <U> : "Ử" U1EEC # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +<combining_hook> <Multi_key> <plus> <U> : "Ử" U1EEC # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE +<dead_hook> <uhorn> : "á»­" U1EED # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +<Multi_key> <question> <uhorn> : "á»­" U1EED # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +<dead_hook> <dead_horn> <u> : "á»­" U1EED # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +<dead_hook> <Multi_key> <plus> <u> : "á»­" U1EED # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +<Multi_key> <question> <dead_horn> <u> : "á»­" U1EED # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +<Multi_key> <question> <plus> <u> : "á»­" U1EED # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +<combining_hook> <uhorn> : "á»­" U1EED # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +<combining_hook> <dead_horn> <u> : "á»­" U1EED # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +<combining_hook> <Multi_key> <plus> <u> : "á»­" U1EED # LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE +<dead_tilde> <Uhorn> : "á»®" U1EEE # LATIN CAPITAL LETTER U WITH HORN AND TILDE +<Multi_key> <asciitilde> <Uhorn> : "á»®" U1EEE # LATIN CAPITAL LETTER U WITH HORN AND TILDE +<dead_tilde> <dead_horn> <U> : "á»®" U1EEE # LATIN CAPITAL LETTER U WITH HORN AND TILDE +<dead_tilde> <Multi_key> <plus> <U> : "á»®" U1EEE # LATIN CAPITAL LETTER U WITH HORN AND TILDE +<Multi_key> <asciitilde> <dead_horn> <U> : "á»®" U1EEE # LATIN CAPITAL LETTER U WITH HORN AND TILDE +<Multi_key> <asciitilde> <plus> <U> : "á»®" U1EEE # LATIN CAPITAL LETTER U WITH HORN AND TILDE +<combining_tilde> <Uhorn> : "á»®" U1EEE # LATIN CAPITAL LETTER U WITH HORN AND TILDE +<combining_tilde> <dead_horn> <U> : "á»®" U1EEE # LATIN CAPITAL LETTER U WITH HORN AND TILDE +<combining_tilde> <Multi_key> <plus> <U> : "á»®" U1EEE # LATIN CAPITAL LETTER U WITH HORN AND TILDE +<dead_tilde> <uhorn> : "ữ" U1EEF # LATIN SMALL LETTER U WITH HORN AND TILDE +<Multi_key> <asciitilde> <uhorn> : "ữ" U1EEF # LATIN SMALL LETTER U WITH HORN AND TILDE +<dead_tilde> <dead_horn> <u> : "ữ" U1EEF # LATIN SMALL LETTER U WITH HORN AND TILDE +<dead_tilde> <Multi_key> <plus> <u> : "ữ" U1EEF # LATIN SMALL LETTER U WITH HORN AND TILDE +<Multi_key> <asciitilde> <dead_horn> <u> : "ữ" U1EEF # LATIN SMALL LETTER U WITH HORN AND TILDE +<Multi_key> <asciitilde> <plus> <u> : "ữ" U1EEF # LATIN SMALL LETTER U WITH HORN AND TILDE +<combining_tilde> <uhorn> : "ữ" U1EEF # LATIN SMALL LETTER U WITH HORN AND TILDE +<combining_tilde> <dead_horn> <u> : "ữ" U1EEF # LATIN SMALL LETTER U WITH HORN AND TILDE +<combining_tilde> <Multi_key> <plus> <u> : "ữ" U1EEF # LATIN SMALL LETTER U WITH HORN AND TILDE +<dead_belowdot> <Uhorn> : "á»°" U1EF0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +<Multi_key> <exclam> <Uhorn> : "á»°" U1EF0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +<dead_belowdot> <dead_horn> <U> : "á»°" U1EF0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +<dead_belowdot> <Multi_key> <plus> <U> : "á»°" U1EF0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +<Multi_key> <exclam> <dead_horn> <U> : "á»°" U1EF0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +<Multi_key> <exclam> <plus> <U> : "á»°" U1EF0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +<combining_belowdot> <Uhorn> : "á»°" U1EF0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +<combining_belowdot> <dead_horn> <U> : "á»°" U1EF0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +<combining_belowdot> <Multi_key> <plus> <U> : "á»°" U1EF0 # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW +<dead_belowdot> <uhorn> : "á»±" U1EF1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW +<Multi_key> <exclam> <uhorn> : "á»±" U1EF1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW +<dead_belowdot> <dead_horn> <u> : "á»±" U1EF1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW +<dead_belowdot> <Multi_key> <plus> <u> : "á»±" U1EF1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW +<Multi_key> <exclam> <dead_horn> <u> : "á»±" U1EF1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW +<Multi_key> <exclam> <plus> <u> : "á»±" U1EF1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW +<combining_belowdot> <uhorn> : "á»±" U1EF1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW +<combining_belowdot> <dead_horn> <u> : "á»±" U1EF1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW +<combining_belowdot> <Multi_key> <plus> <u> : "á»±" U1EF1 # LATIN SMALL LETTER U WITH HORN AND DOT BELOW +<dead_grave> <Y> : "Ỳ" U1EF2 # LATIN CAPITAL LETTER Y WITH GRAVE +<Multi_key> <grave> <Y> : "Ỳ" U1EF2 # LATIN CAPITAL LETTER Y WITH GRAVE +<combining_grave> <Y> : "Ỳ" U1EF2 # LATIN CAPITAL LETTER Y WITH GRAVE +<dead_grave> <y> : "ỳ" U1EF3 # LATIN SMALL LETTER Y WITH GRAVE +<Multi_key> <grave> <y> : "ỳ" U1EF3 # LATIN SMALL LETTER Y WITH GRAVE +<combining_grave> <y> : "ỳ" U1EF3 # LATIN SMALL LETTER Y WITH GRAVE +<dead_belowdot> <Y> : "á»´" U1EF4 # LATIN CAPITAL LETTER Y WITH DOT BELOW +<Multi_key> <exclam> <Y> : "á»´" U1EF4 # LATIN CAPITAL LETTER Y WITH DOT BELOW +<combining_belowdot> <Y> : "á»´" U1EF4 # LATIN CAPITAL LETTER Y WITH DOT BELOW +<dead_belowdot> <y> : "ỵ" U1EF5 # LATIN SMALL LETTER Y WITH DOT BELOW +<Multi_key> <exclam> <y> : "ỵ" U1EF5 # LATIN SMALL LETTER Y WITH DOT BELOW +<combining_belowdot> <y> : "ỵ" U1EF5 # LATIN SMALL LETTER Y WITH DOT BELOW +<dead_hook> <Y> : "Ỷ" U1EF6 # LATIN CAPITAL LETTER Y WITH HOOK ABOVE +<Multi_key> <question> <Y> : "Ỷ" U1EF6 # LATIN CAPITAL LETTER Y WITH HOOK ABOVE +<combining_hook> <Y> : "Ỷ" U1EF6 # LATIN CAPITAL LETTER Y WITH HOOK ABOVE +<dead_hook> <y> : "á»·" U1EF7 # LATIN SMALL LETTER Y WITH HOOK ABOVE +<Multi_key> <question> <y> : "á»·" U1EF7 # LATIN SMALL LETTER Y WITH HOOK ABOVE +<combining_hook> <y> : "á»·" U1EF7 # LATIN SMALL LETTER Y WITH HOOK ABOVE +<dead_tilde> <Y> : "Ỹ" U1EF8 # LATIN CAPITAL LETTER Y WITH TILDE +<Multi_key> <asciitilde> <Y> : "Ỹ" U1EF8 # LATIN CAPITAL LETTER Y WITH TILDE +<combining_tilde> <Y> : "Ỹ" U1EF8 # LATIN CAPITAL LETTER Y WITH TILDE +<dead_tilde> <y> : "ỹ" U1EF9 # LATIN SMALL LETTER Y WITH TILDE +<Multi_key> <asciitilde> <y> : "ỹ" U1EF9 # LATIN SMALL LETTER Y WITH TILDE +<combining_tilde> <y> : "ỹ" U1EF9 # LATIN SMALL LETTER Y WITH TILDE +<U0313> <Greek_alpha> : "á¼€" U1F00 # GREEK SMALL LETTER ALPHA WITH PSILI +<Multi_key> <parenright> <Greek_alpha> : "á¼€" U1F00 # GREEK SMALL LETTER ALPHA WITH PSILI +<U0314> <Greek_alpha> : "á¼" U1F01 # GREEK SMALL LETTER ALPHA WITH DASIA +<Multi_key> <parenleft> <Greek_alpha> : "á¼" U1F01 # GREEK SMALL LETTER ALPHA WITH DASIA +<dead_grave> <U1f00> : "ἂ" U1F02 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +<Multi_key> <grave> <U1f00> : "ἂ" U1F02 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_alpha> : "ἂ" U1F02 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_alpha> : "ἂ" U1F02 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_alpha> : "ἂ" U1F02 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_alpha> : "ἂ" U1F02 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +<combining_grave> <U1f00> : "ἂ" U1F02 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_alpha> : "ἂ" U1F02 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_alpha> : "ἂ" U1F02 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA +<dead_grave> <U1f01> : "ἃ" U1F03 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<Multi_key> <grave> <U1f01> : "ἃ" U1F03 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_alpha> : "ἃ" U1F03 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_alpha> : "ἃ" U1F03 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_alpha> : "ἃ" U1F03 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_alpha> : "ἃ" U1F03 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<combining_grave> <U1f01> : "ἃ" U1F03 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_alpha> : "ἃ" U1F03 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_alpha> : "ἃ" U1F03 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA +<dead_acute> <U1f00> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <acute> <U1f00> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f00> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_alpha> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_alpha> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_alpha> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_alpha> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_alpha> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_alpha> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<combining_acute> <U1f00> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_alpha> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_alpha> : "ἄ" U1F04 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA +<dead_acute> <U1f01> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <acute> <U1f01> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f01> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_alpha> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_alpha> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_alpha> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_alpha> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_alpha> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_alpha> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<combining_acute> <U1f01> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_alpha> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_alpha> : "á¼…" U1F05 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA +<U0342> <U1f00> : "ἆ" U1F06 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +<dead_tilde> <U1f00> : "ἆ" U1F06 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U1f00> : "ἆ" U1F06 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +<U0342> <U0313> <Greek_alpha> : "ἆ" U1F06 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +<U0342> <Multi_key> <parenright> <Greek_alpha> : "ἆ" U1F06 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +<dead_tilde> <U0313> <Greek_alpha> : "ἆ" U1F06 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +<dead_tilde> <Multi_key> <parenright> <Greek_alpha> : "ἆ" U1F06 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U0313> <Greek_alpha> : "ἆ" U1F06 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <parenright> <Greek_alpha> : "ἆ" U1F06 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI +<U0342> <U1f01> : "ἇ" U1F07 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f01> : "ἇ" U1F07 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f01> : "ἇ" U1F07 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_alpha> : "ἇ" U1F07 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_alpha> : "ἇ" U1F07 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_alpha> : "ἇ" U1F07 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_alpha> : "ἇ" U1F07 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_alpha> : "ἇ" U1F07 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_alpha> : "ἇ" U1F07 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI +<U0313> <Greek_ALPHA> : "Ἀ" U1F08 # GREEK CAPITAL LETTER ALPHA WITH PSILI +<Multi_key> <parenright> <Greek_ALPHA> : "Ἀ" U1F08 # GREEK CAPITAL LETTER ALPHA WITH PSILI +<U0314> <Greek_ALPHA> : "Ἁ" U1F09 # GREEK CAPITAL LETTER ALPHA WITH DASIA +<Multi_key> <parenleft> <Greek_ALPHA> : "Ἁ" U1F09 # GREEK CAPITAL LETTER ALPHA WITH DASIA +<dead_grave> <U1f08> : "Ἂ" U1F0A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +<Multi_key> <grave> <U1f08> : "Ἂ" U1F0A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_ALPHA> : "Ἂ" U1F0A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_ALPHA> : "Ἂ" U1F0A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_ALPHA> : "Ἂ" U1F0A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_ALPHA> : "Ἂ" U1F0A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +<combining_grave> <U1f08> : "Ἂ" U1F0A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_ALPHA> : "Ἂ" U1F0A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_ALPHA> : "Ἂ" U1F0A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA +<dead_grave> <U1f09> : "Ἃ" U1F0B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<Multi_key> <grave> <U1f09> : "Ἃ" U1F0B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_ALPHA> : "Ἃ" U1F0B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_ALPHA> : "Ἃ" U1F0B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_ALPHA> : "Ἃ" U1F0B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_ALPHA> : "Ἃ" U1F0B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<combining_grave> <U1f09> : "Ἃ" U1F0B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_ALPHA> : "Ἃ" U1F0B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_ALPHA> : "Ἃ" U1F0B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA +<dead_acute> <U1f08> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <acute> <U1f08> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f08> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_ALPHA> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_ALPHA> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_ALPHA> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_ALPHA> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_ALPHA> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_ALPHA> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<combining_acute> <U1f08> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_ALPHA> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_ALPHA> : "Ἄ" U1F0C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA +<dead_acute> <U1f09> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <acute> <U1f09> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f09> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_ALPHA> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_ALPHA> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_ALPHA> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_ALPHA> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_ALPHA> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_ALPHA> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<combining_acute> <U1f09> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_ALPHA> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_ALPHA> : "á¼" U1F0D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA +<U0342> <U1f08> : "Ἆ" U1F0E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +<dead_tilde> <U1f08> : "Ἆ" U1F0E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U1f08> : "Ἆ" U1F0E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +<U0342> <U0313> <Greek_ALPHA> : "Ἆ" U1F0E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +<U0342> <Multi_key> <parenright> <Greek_ALPHA> : "Ἆ" U1F0E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +<dead_tilde> <U0313> <Greek_ALPHA> : "Ἆ" U1F0E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +<dead_tilde> <Multi_key> <parenright> <Greek_ALPHA> : "Ἆ" U1F0E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U0313> <Greek_ALPHA> : "Ἆ" U1F0E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <parenright> <Greek_ALPHA> : "Ἆ" U1F0E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI +<U0342> <U1f09> : "á¼" U1F0F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f09> : "á¼" U1F0F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f09> : "á¼" U1F0F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_ALPHA> : "á¼" U1F0F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_ALPHA> : "á¼" U1F0F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_ALPHA> : "á¼" U1F0F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_ALPHA> : "á¼" U1F0F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_ALPHA> : "á¼" U1F0F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_ALPHA> : "á¼" U1F0F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI +<U0313> <Greek_epsilon> : "á¼" U1F10 # GREEK SMALL LETTER EPSILON WITH PSILI +<Multi_key> <parenright> <Greek_epsilon> : "á¼" U1F10 # GREEK SMALL LETTER EPSILON WITH PSILI +<U0314> <Greek_epsilon> : "ἑ" U1F11 # GREEK SMALL LETTER EPSILON WITH DASIA +<Multi_key> <parenleft> <Greek_epsilon> : "ἑ" U1F11 # GREEK SMALL LETTER EPSILON WITH DASIA +<dead_grave> <U1f10> : "á¼’" U1F12 # GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +<Multi_key> <grave> <U1f10> : "á¼’" U1F12 # GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_epsilon> : "á¼’" U1F12 # GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_epsilon> : "á¼’" U1F12 # GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_epsilon> : "á¼’" U1F12 # GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_epsilon> : "á¼’" U1F12 # GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +<combining_grave> <U1f10> : "á¼’" U1F12 # GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_epsilon> : "á¼’" U1F12 # GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_epsilon> : "á¼’" U1F12 # GREEK SMALL LETTER EPSILON WITH PSILI AND VARIA +<dead_grave> <U1f11> : "ἓ" U1F13 # GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <U1f11> : "ἓ" U1F13 # GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_epsilon> : "ἓ" U1F13 # GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_epsilon> : "ἓ" U1F13 # GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_epsilon> : "ἓ" U1F13 # GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_epsilon> : "ἓ" U1F13 # GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<combining_grave> <U1f11> : "ἓ" U1F13 # GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_epsilon> : "ἓ" U1F13 # GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_epsilon> : "ἓ" U1F13 # GREEK SMALL LETTER EPSILON WITH DASIA AND VARIA +<dead_acute> <U1f10> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <acute> <U1f10> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f10> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_epsilon> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_epsilon> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_epsilon> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_epsilon> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_epsilon> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_epsilon> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<combining_acute> <U1f10> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_epsilon> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_epsilon> : "á¼”" U1F14 # GREEK SMALL LETTER EPSILON WITH PSILI AND OXIA +<dead_acute> <U1f11> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <U1f11> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f11> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_epsilon> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_epsilon> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_epsilon> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_epsilon> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_epsilon> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_epsilon> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<combining_acute> <U1f11> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_epsilon> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_epsilon> : "ἕ" U1F15 # GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA +<U0313> <Greek_EPSILON> : "Ἐ" U1F18 # GREEK CAPITAL LETTER EPSILON WITH PSILI +<Multi_key> <parenright> <Greek_EPSILON> : "Ἐ" U1F18 # GREEK CAPITAL LETTER EPSILON WITH PSILI +<U0314> <Greek_EPSILON> : "á¼™" U1F19 # GREEK CAPITAL LETTER EPSILON WITH DASIA +<Multi_key> <parenleft> <Greek_EPSILON> : "á¼™" U1F19 # GREEK CAPITAL LETTER EPSILON WITH DASIA +<dead_grave> <U1f18> : "Ἒ" U1F1A # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +<Multi_key> <grave> <U1f18> : "Ἒ" U1F1A # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_EPSILON> : "Ἒ" U1F1A # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_EPSILON> : "Ἒ" U1F1A # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_EPSILON> : "Ἒ" U1F1A # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_EPSILON> : "Ἒ" U1F1A # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +<combining_grave> <U1f18> : "Ἒ" U1F1A # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_EPSILON> : "Ἒ" U1F1A # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_EPSILON> : "Ἒ" U1F1A # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA +<dead_grave> <U1f19> : "á¼›" U1F1B # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <U1f19> : "á¼›" U1F1B # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_EPSILON> : "á¼›" U1F1B # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_EPSILON> : "á¼›" U1F1B # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_EPSILON> : "á¼›" U1F1B # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_EPSILON> : "á¼›" U1F1B # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<combining_grave> <U1f19> : "á¼›" U1F1B # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_EPSILON> : "á¼›" U1F1B # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_EPSILON> : "á¼›" U1F1B # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA +<dead_acute> <U1f18> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <acute> <U1f18> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f18> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_EPSILON> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_EPSILON> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_EPSILON> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_EPSILON> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_EPSILON> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_EPSILON> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<combining_acute> <U1f18> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_EPSILON> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_EPSILON> : "Ἔ" U1F1C # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA +<dead_acute> <U1f19> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <U1f19> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f19> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_EPSILON> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_EPSILON> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_EPSILON> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_EPSILON> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_EPSILON> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_EPSILON> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<combining_acute> <U1f19> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_EPSILON> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_EPSILON> : "á¼" U1F1D # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA +<U0313> <Greek_eta> : "á¼ " U1F20 # GREEK SMALL LETTER ETA WITH PSILI +<Multi_key> <parenright> <Greek_eta> : "á¼ " U1F20 # GREEK SMALL LETTER ETA WITH PSILI +<U0314> <Greek_eta> : "ἡ" U1F21 # GREEK SMALL LETTER ETA WITH DASIA +<Multi_key> <parenleft> <Greek_eta> : "ἡ" U1F21 # GREEK SMALL LETTER ETA WITH DASIA +<dead_grave> <U1f20> : "á¼¢" U1F22 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA +<Multi_key> <grave> <U1f20> : "á¼¢" U1F22 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_eta> : "á¼¢" U1F22 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_eta> : "á¼¢" U1F22 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_eta> : "á¼¢" U1F22 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_eta> : "á¼¢" U1F22 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA +<combining_grave> <U1f20> : "á¼¢" U1F22 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_eta> : "á¼¢" U1F22 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_eta> : "á¼¢" U1F22 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA +<dead_grave> <U1f21> : "á¼£" U1F23 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<Multi_key> <grave> <U1f21> : "á¼£" U1F23 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_eta> : "á¼£" U1F23 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_eta> : "á¼£" U1F23 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_eta> : "á¼£" U1F23 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_eta> : "á¼£" U1F23 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<combining_grave> <U1f21> : "á¼£" U1F23 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_eta> : "á¼£" U1F23 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_eta> : "á¼£" U1F23 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA +<dead_acute> <U1f20> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <acute> <U1f20> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f20> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_eta> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_eta> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_eta> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_eta> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_eta> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_eta> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<combining_acute> <U1f20> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_eta> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_eta> : "ἤ" U1F24 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA +<dead_acute> <U1f21> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <acute> <U1f21> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f21> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_eta> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_eta> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_eta> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_eta> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_eta> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_eta> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<combining_acute> <U1f21> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_eta> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_eta> : "á¼¥" U1F25 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA +<U0342> <U1f20> : "ἦ" U1F26 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +<dead_tilde> <U1f20> : "ἦ" U1F26 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U1f20> : "ἦ" U1F26 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +<U0342> <U0313> <Greek_eta> : "ἦ" U1F26 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +<U0342> <Multi_key> <parenright> <Greek_eta> : "ἦ" U1F26 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +<dead_tilde> <U0313> <Greek_eta> : "ἦ" U1F26 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +<dead_tilde> <Multi_key> <parenright> <Greek_eta> : "ἦ" U1F26 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U0313> <Greek_eta> : "ἦ" U1F26 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <parenright> <Greek_eta> : "ἦ" U1F26 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI +<U0342> <U1f21> : "ἧ" U1F27 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f21> : "ἧ" U1F27 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f21> : "ἧ" U1F27 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_eta> : "ἧ" U1F27 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_eta> : "ἧ" U1F27 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_eta> : "ἧ" U1F27 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_eta> : "ἧ" U1F27 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_eta> : "ἧ" U1F27 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_eta> : "ἧ" U1F27 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI +<U0313> <Greek_ETA> : "Ἠ" U1F28 # GREEK CAPITAL LETTER ETA WITH PSILI +<Multi_key> <parenright> <Greek_ETA> : "Ἠ" U1F28 # GREEK CAPITAL LETTER ETA WITH PSILI +<U0314> <Greek_ETA> : "Ἡ" U1F29 # GREEK CAPITAL LETTER ETA WITH DASIA +<Multi_key> <parenleft> <Greek_ETA> : "Ἡ" U1F29 # GREEK CAPITAL LETTER ETA WITH DASIA +<dead_grave> <U1f28> : "Ἢ" U1F2A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +<Multi_key> <grave> <U1f28> : "Ἢ" U1F2A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_ETA> : "Ἢ" U1F2A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_ETA> : "Ἢ" U1F2A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_ETA> : "Ἢ" U1F2A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_ETA> : "Ἢ" U1F2A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +<combining_grave> <U1f28> : "Ἢ" U1F2A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_ETA> : "Ἢ" U1F2A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_ETA> : "Ἢ" U1F2A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA +<dead_grave> <U1f29> : "Ἣ" U1F2B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<Multi_key> <grave> <U1f29> : "Ἣ" U1F2B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_ETA> : "Ἣ" U1F2B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_ETA> : "Ἣ" U1F2B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_ETA> : "Ἣ" U1F2B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_ETA> : "Ἣ" U1F2B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<combining_grave> <U1f29> : "Ἣ" U1F2B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_ETA> : "Ἣ" U1F2B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_ETA> : "Ἣ" U1F2B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA +<dead_acute> <U1f28> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <acute> <U1f28> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f28> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_ETA> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_ETA> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_ETA> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_ETA> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_ETA> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_ETA> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<combining_acute> <U1f28> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_ETA> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_ETA> : "Ἤ" U1F2C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA +<dead_acute> <U1f29> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <acute> <U1f29> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f29> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_ETA> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_ETA> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_ETA> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_ETA> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_ETA> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_ETA> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<combining_acute> <U1f29> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_ETA> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_ETA> : "á¼­" U1F2D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA +<U0342> <U1f28> : "á¼®" U1F2E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +<dead_tilde> <U1f28> : "á¼®" U1F2E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U1f28> : "á¼®" U1F2E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +<U0342> <U0313> <Greek_ETA> : "á¼®" U1F2E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +<U0342> <Multi_key> <parenright> <Greek_ETA> : "á¼®" U1F2E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +<dead_tilde> <U0313> <Greek_ETA> : "á¼®" U1F2E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +<dead_tilde> <Multi_key> <parenright> <Greek_ETA> : "á¼®" U1F2E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U0313> <Greek_ETA> : "á¼®" U1F2E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <parenright> <Greek_ETA> : "á¼®" U1F2E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI +<U0342> <U1f29> : "Ἧ" U1F2F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f29> : "Ἧ" U1F2F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f29> : "Ἧ" U1F2F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_ETA> : "Ἧ" U1F2F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_ETA> : "Ἧ" U1F2F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_ETA> : "Ἧ" U1F2F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_ETA> : "Ἧ" U1F2F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_ETA> : "Ἧ" U1F2F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_ETA> : "Ἧ" U1F2F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI +<U0313> <Greek_iota> : "á¼°" U1F30 # GREEK SMALL LETTER IOTA WITH PSILI +<Multi_key> <parenright> <Greek_iota> : "á¼°" U1F30 # GREEK SMALL LETTER IOTA WITH PSILI +<U0314> <Greek_iota> : "á¼±" U1F31 # GREEK SMALL LETTER IOTA WITH DASIA +<Multi_key> <parenleft> <Greek_iota> : "á¼±" U1F31 # GREEK SMALL LETTER IOTA WITH DASIA +<dead_grave> <U1f30> : "á¼²" U1F32 # GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +<Multi_key> <grave> <U1f30> : "á¼²" U1F32 # GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_iota> : "á¼²" U1F32 # GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_iota> : "á¼²" U1F32 # GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_iota> : "á¼²" U1F32 # GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_iota> : "á¼²" U1F32 # GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +<combining_grave> <U1f30> : "á¼²" U1F32 # GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_iota> : "á¼²" U1F32 # GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_iota> : "á¼²" U1F32 # GREEK SMALL LETTER IOTA WITH PSILI AND VARIA +<dead_grave> <U1f31> : "á¼³" U1F33 # GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<Multi_key> <grave> <U1f31> : "á¼³" U1F33 # GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_iota> : "á¼³" U1F33 # GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_iota> : "á¼³" U1F33 # GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_iota> : "á¼³" U1F33 # GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_iota> : "á¼³" U1F33 # GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<combining_grave> <U1f31> : "á¼³" U1F33 # GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_iota> : "á¼³" U1F33 # GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_iota> : "á¼³" U1F33 # GREEK SMALL LETTER IOTA WITH DASIA AND VARIA +<dead_acute> <U1f30> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <acute> <U1f30> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f30> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_iota> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_iota> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_iota> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_iota> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_iota> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_iota> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<combining_acute> <U1f30> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_iota> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_iota> : "á¼´" U1F34 # GREEK SMALL LETTER IOTA WITH PSILI AND OXIA +<dead_acute> <U1f31> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <acute> <U1f31> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f31> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_iota> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_iota> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_iota> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_iota> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_iota> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_iota> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<combining_acute> <U1f31> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_iota> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_iota> : "á¼µ" U1F35 # GREEK SMALL LETTER IOTA WITH DASIA AND OXIA +<U0342> <U1f30> : "ἶ" U1F36 # GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +<dead_tilde> <U1f30> : "ἶ" U1F36 # GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U1f30> : "ἶ" U1F36 # GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +<U0342> <U0313> <Greek_iota> : "ἶ" U1F36 # GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +<U0342> <Multi_key> <parenright> <Greek_iota> : "ἶ" U1F36 # GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +<dead_tilde> <U0313> <Greek_iota> : "ἶ" U1F36 # GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +<dead_tilde> <Multi_key> <parenright> <Greek_iota> : "ἶ" U1F36 # GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U0313> <Greek_iota> : "ἶ" U1F36 # GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <parenright> <Greek_iota> : "ἶ" U1F36 # GREEK SMALL LETTER IOTA WITH PSILI AND PERISPOMENI +<U0342> <U1f31> : "á¼·" U1F37 # GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f31> : "á¼·" U1F37 # GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f31> : "á¼·" U1F37 # GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_iota> : "á¼·" U1F37 # GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_iota> : "á¼·" U1F37 # GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_iota> : "á¼·" U1F37 # GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_iota> : "á¼·" U1F37 # GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_iota> : "á¼·" U1F37 # GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_iota> : "á¼·" U1F37 # GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI +<U0313> <Greek_IOTA> : "Ἰ" U1F38 # GREEK CAPITAL LETTER IOTA WITH PSILI +<Multi_key> <parenright> <Greek_IOTA> : "Ἰ" U1F38 # GREEK CAPITAL LETTER IOTA WITH PSILI +<U0314> <Greek_IOTA> : "á¼¹" U1F39 # GREEK CAPITAL LETTER IOTA WITH DASIA +<Multi_key> <parenleft> <Greek_IOTA> : "á¼¹" U1F39 # GREEK CAPITAL LETTER IOTA WITH DASIA +<dead_grave> <U1f38> : "Ἲ" U1F3A # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +<Multi_key> <grave> <U1f38> : "Ἲ" U1F3A # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_IOTA> : "Ἲ" U1F3A # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_IOTA> : "Ἲ" U1F3A # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_IOTA> : "Ἲ" U1F3A # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_IOTA> : "Ἲ" U1F3A # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +<combining_grave> <U1f38> : "Ἲ" U1F3A # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_IOTA> : "Ἲ" U1F3A # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_IOTA> : "Ἲ" U1F3A # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA +<dead_grave> <U1f39> : "á¼»" U1F3B # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<Multi_key> <grave> <U1f39> : "á¼»" U1F3B # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_IOTA> : "á¼»" U1F3B # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_IOTA> : "á¼»" U1F3B # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_IOTA> : "á¼»" U1F3B # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_IOTA> : "á¼»" U1F3B # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<combining_grave> <U1f39> : "á¼»" U1F3B # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_IOTA> : "á¼»" U1F3B # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_IOTA> : "á¼»" U1F3B # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA +<dead_acute> <U1f38> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <acute> <U1f38> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f38> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_IOTA> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_IOTA> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_IOTA> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_IOTA> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_IOTA> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_IOTA> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<combining_acute> <U1f38> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_IOTA> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_IOTA> : "á¼¼" U1F3C # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA +<dead_acute> <U1f39> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <acute> <U1f39> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f39> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_IOTA> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_IOTA> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_IOTA> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_IOTA> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_IOTA> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_IOTA> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<combining_acute> <U1f39> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_IOTA> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_IOTA> : "á¼½" U1F3D # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA +<U0342> <U1f38> : "á¼¾" U1F3E # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +<dead_tilde> <U1f38> : "á¼¾" U1F3E # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U1f38> : "á¼¾" U1F3E # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +<U0342> <U0313> <Greek_IOTA> : "á¼¾" U1F3E # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +<U0342> <Multi_key> <parenright> <Greek_IOTA> : "á¼¾" U1F3E # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +<dead_tilde> <U0313> <Greek_IOTA> : "á¼¾" U1F3E # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +<dead_tilde> <Multi_key> <parenright> <Greek_IOTA> : "á¼¾" U1F3E # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U0313> <Greek_IOTA> : "á¼¾" U1F3E # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <parenright> <Greek_IOTA> : "á¼¾" U1F3E # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI +<U0342> <U1f39> : "Ἷ" U1F3F # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f39> : "Ἷ" U1F3F # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f39> : "Ἷ" U1F3F # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_IOTA> : "Ἷ" U1F3F # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_IOTA> : "Ἷ" U1F3F # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_IOTA> : "Ἷ" U1F3F # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_IOTA> : "Ἷ" U1F3F # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_IOTA> : "Ἷ" U1F3F # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_IOTA> : "Ἷ" U1F3F # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI +<U0313> <Greek_omicron> : "á½€" U1F40 # GREEK SMALL LETTER OMICRON WITH PSILI +<Multi_key> <parenright> <Greek_omicron> : "á½€" U1F40 # GREEK SMALL LETTER OMICRON WITH PSILI +<U0314> <Greek_omicron> : "á½" U1F41 # GREEK SMALL LETTER OMICRON WITH DASIA +<Multi_key> <parenleft> <Greek_omicron> : "á½" U1F41 # GREEK SMALL LETTER OMICRON WITH DASIA +<dead_grave> <U1f40> : "ὂ" U1F42 # GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +<Multi_key> <grave> <U1f40> : "ὂ" U1F42 # GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_omicron> : "ὂ" U1F42 # GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_omicron> : "ὂ" U1F42 # GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_omicron> : "ὂ" U1F42 # GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_omicron> : "ὂ" U1F42 # GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +<combining_grave> <U1f40> : "ὂ" U1F42 # GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_omicron> : "ὂ" U1F42 # GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_omicron> : "ὂ" U1F42 # GREEK SMALL LETTER OMICRON WITH PSILI AND VARIA +<dead_grave> <U1f41> : "ὃ" U1F43 # GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<Multi_key> <grave> <U1f41> : "ὃ" U1F43 # GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_omicron> : "ὃ" U1F43 # GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_omicron> : "ὃ" U1F43 # GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_omicron> : "ὃ" U1F43 # GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_omicron> : "ὃ" U1F43 # GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<combining_grave> <U1f41> : "ὃ" U1F43 # GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_omicron> : "ὃ" U1F43 # GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_omicron> : "ὃ" U1F43 # GREEK SMALL LETTER OMICRON WITH DASIA AND VARIA +<dead_acute> <U1f40> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <acute> <U1f40> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f40> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_omicron> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_omicron> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_omicron> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_omicron> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_omicron> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_omicron> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<combining_acute> <U1f40> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_omicron> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_omicron> : "ὄ" U1F44 # GREEK SMALL LETTER OMICRON WITH PSILI AND OXIA +<dead_acute> <U1f41> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <acute> <U1f41> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f41> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_omicron> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_omicron> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_omicron> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_omicron> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_omicron> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_omicron> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<combining_acute> <U1f41> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_omicron> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_omicron> : "á½…" U1F45 # GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA +<U0313> <Greek_OMICRON> : "Ὀ" U1F48 # GREEK CAPITAL LETTER OMICRON WITH PSILI +<Multi_key> <parenright> <Greek_OMICRON> : "Ὀ" U1F48 # GREEK CAPITAL LETTER OMICRON WITH PSILI +<U0314> <Greek_OMICRON> : "Ὁ" U1F49 # GREEK CAPITAL LETTER OMICRON WITH DASIA +<Multi_key> <parenleft> <Greek_OMICRON> : "Ὁ" U1F49 # GREEK CAPITAL LETTER OMICRON WITH DASIA +<dead_grave> <U1f48> : "Ὂ" U1F4A # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +<Multi_key> <grave> <U1f48> : "Ὂ" U1F4A # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_OMICRON> : "Ὂ" U1F4A # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_OMICRON> : "Ὂ" U1F4A # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_OMICRON> : "Ὂ" U1F4A # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_OMICRON> : "Ὂ" U1F4A # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +<combining_grave> <U1f48> : "Ὂ" U1F4A # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_OMICRON> : "Ὂ" U1F4A # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_OMICRON> : "Ὂ" U1F4A # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA +<dead_grave> <U1f49> : "Ὃ" U1F4B # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<Multi_key> <grave> <U1f49> : "Ὃ" U1F4B # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_OMICRON> : "Ὃ" U1F4B # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_OMICRON> : "Ὃ" U1F4B # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_OMICRON> : "Ὃ" U1F4B # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_OMICRON> : "Ὃ" U1F4B # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<combining_grave> <U1f49> : "Ὃ" U1F4B # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_OMICRON> : "Ὃ" U1F4B # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_OMICRON> : "Ὃ" U1F4B # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA +<dead_acute> <U1f48> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <acute> <U1f48> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f48> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_OMICRON> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_OMICRON> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_OMICRON> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_OMICRON> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_OMICRON> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_OMICRON> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<combining_acute> <U1f48> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_OMICRON> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_OMICRON> : "Ὄ" U1F4C # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA +<dead_acute> <U1f49> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <acute> <U1f49> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f49> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_OMICRON> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_OMICRON> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_OMICRON> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_OMICRON> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_OMICRON> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_OMICRON> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<combining_acute> <U1f49> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_OMICRON> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_OMICRON> : "á½" U1F4D # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA +<U0313> <Greek_upsilon> : "á½" U1F50 # GREEK SMALL LETTER UPSILON WITH PSILI +<Multi_key> <parenright> <Greek_upsilon> : "á½" U1F50 # GREEK SMALL LETTER UPSILON WITH PSILI +<U0314> <Greek_upsilon> : "ὑ" U1F51 # GREEK SMALL LETTER UPSILON WITH DASIA +<Multi_key> <parenleft> <Greek_upsilon> : "ὑ" U1F51 # GREEK SMALL LETTER UPSILON WITH DASIA +<dead_grave> <U1f50> : "á½’" U1F52 # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +<Multi_key> <grave> <U1f50> : "á½’" U1F52 # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_upsilon> : "á½’" U1F52 # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_upsilon> : "á½’" U1F52 # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_upsilon> : "á½’" U1F52 # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_upsilon> : "á½’" U1F52 # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +<combining_grave> <U1f50> : "á½’" U1F52 # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_upsilon> : "á½’" U1F52 # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_upsilon> : "á½’" U1F52 # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA +<dead_grave> <U1f51> : "ὓ" U1F53 # GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <U1f51> : "ὓ" U1F53 # GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_upsilon> : "ὓ" U1F53 # GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_upsilon> : "ὓ" U1F53 # GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_upsilon> : "ὓ" U1F53 # GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_upsilon> : "ὓ" U1F53 # GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<combining_grave> <U1f51> : "ὓ" U1F53 # GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_upsilon> : "ὓ" U1F53 # GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_upsilon> : "ὓ" U1F53 # GREEK SMALL LETTER UPSILON WITH DASIA AND VARIA +<dead_acute> <U1f50> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<Multi_key> <acute> <U1f50> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f50> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_upsilon> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_upsilon> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_upsilon> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_upsilon> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_upsilon> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_upsilon> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<combining_acute> <U1f50> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_upsilon> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_upsilon> : "á½”" U1F54 # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA +<dead_acute> <U1f51> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <U1f51> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f51> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_upsilon> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_upsilon> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_upsilon> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_upsilon> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_upsilon> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_upsilon> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<combining_acute> <U1f51> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_upsilon> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_upsilon> : "ὕ" U1F55 # GREEK SMALL LETTER UPSILON WITH DASIA AND OXIA +<U0342> <U1f50> : "á½–" U1F56 # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +<dead_tilde> <U1f50> : "á½–" U1F56 # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U1f50> : "á½–" U1F56 # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +<U0342> <U0313> <Greek_upsilon> : "á½–" U1F56 # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +<U0342> <Multi_key> <parenright> <Greek_upsilon> : "á½–" U1F56 # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +<dead_tilde> <U0313> <Greek_upsilon> : "á½–" U1F56 # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +<dead_tilde> <Multi_key> <parenright> <Greek_upsilon> : "á½–" U1F56 # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U0313> <Greek_upsilon> : "á½–" U1F56 # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <parenright> <Greek_upsilon> : "á½–" U1F56 # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI +<U0342> <U1f51> : "á½—" U1F57 # GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f51> : "á½—" U1F57 # GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f51> : "á½—" U1F57 # GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_upsilon> : "á½—" U1F57 # GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_upsilon> : "á½—" U1F57 # GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_upsilon> : "á½—" U1F57 # GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_upsilon> : "á½—" U1F57 # GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_upsilon> : "á½—" U1F57 # GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_upsilon> : "á½—" U1F57 # GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI +<U0314> <Greek_UPSILON> : "á½™" U1F59 # GREEK CAPITAL LETTER UPSILON WITH DASIA +<Multi_key> <parenleft> <Greek_UPSILON> : "á½™" U1F59 # GREEK CAPITAL LETTER UPSILON WITH DASIA +<dead_grave> <U1f59> : "á½›" U1F5B # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <U1f59> : "á½›" U1F5B # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_UPSILON> : "á½›" U1F5B # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_UPSILON> : "á½›" U1F5B # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_UPSILON> : "á½›" U1F5B # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_UPSILON> : "á½›" U1F5B # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<combining_grave> <U1f59> : "á½›" U1F5B # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_UPSILON> : "á½›" U1F5B # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_UPSILON> : "á½›" U1F5B # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA +<dead_acute> <U1f59> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <U1f59> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f59> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_UPSILON> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_UPSILON> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_UPSILON> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_UPSILON> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_UPSILON> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_UPSILON> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<combining_acute> <U1f59> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_UPSILON> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_UPSILON> : "á½" U1F5D # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA +<U0342> <U1f59> : "Ὗ" U1F5F # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f59> : "Ὗ" U1F5F # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f59> : "Ὗ" U1F5F # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_UPSILON> : "Ὗ" U1F5F # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_UPSILON> : "Ὗ" U1F5F # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_UPSILON> : "Ὗ" U1F5F # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_UPSILON> : "Ὗ" U1F5F # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_UPSILON> : "Ὗ" U1F5F # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_UPSILON> : "Ὗ" U1F5F # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI +<U0313> <Greek_omega> : "á½ " U1F60 # GREEK SMALL LETTER OMEGA WITH PSILI +<Multi_key> <parenright> <Greek_omega> : "á½ " U1F60 # GREEK SMALL LETTER OMEGA WITH PSILI +<U0314> <Greek_omega> : "ὡ" U1F61 # GREEK SMALL LETTER OMEGA WITH DASIA +<Multi_key> <parenleft> <Greek_omega> : "ὡ" U1F61 # GREEK SMALL LETTER OMEGA WITH DASIA +<dead_grave> <U1f60> : "á½¢" U1F62 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +<Multi_key> <grave> <U1f60> : "á½¢" U1F62 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_omega> : "á½¢" U1F62 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_omega> : "á½¢" U1F62 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_omega> : "á½¢" U1F62 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_omega> : "á½¢" U1F62 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +<combining_grave> <U1f60> : "á½¢" U1F62 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_omega> : "á½¢" U1F62 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_omega> : "á½¢" U1F62 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA +<dead_grave> <U1f61> : "á½£" U1F63 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +<Multi_key> <grave> <U1f61> : "á½£" U1F63 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_omega> : "á½£" U1F63 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_omega> : "á½£" U1F63 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_omega> : "á½£" U1F63 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_omega> : "á½£" U1F63 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +<combining_grave> <U1f61> : "á½£" U1F63 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_omega> : "á½£" U1F63 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_omega> : "á½£" U1F63 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA +<dead_acute> <U1f60> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <acute> <U1f60> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f60> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_omega> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_omega> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_omega> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_omega> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_omega> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_omega> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<combining_acute> <U1f60> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_omega> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_omega> : "ὤ" U1F64 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA +<dead_acute> <U1f61> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <acute> <U1f61> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f61> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_omega> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_omega> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_omega> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_omega> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_omega> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_omega> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<combining_acute> <U1f61> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_omega> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_omega> : "á½¥" U1F65 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA +<U0342> <U1f60> : "ὦ" U1F66 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +<dead_tilde> <U1f60> : "ὦ" U1F66 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U1f60> : "ὦ" U1F66 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +<U0342> <U0313> <Greek_omega> : "ὦ" U1F66 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +<U0342> <Multi_key> <parenright> <Greek_omega> : "ὦ" U1F66 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +<dead_tilde> <U0313> <Greek_omega> : "ὦ" U1F66 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +<dead_tilde> <Multi_key> <parenright> <Greek_omega> : "ὦ" U1F66 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U0313> <Greek_omega> : "ὦ" U1F66 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <parenright> <Greek_omega> : "ὦ" U1F66 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI +<U0342> <U1f61> : "ὧ" U1F67 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f61> : "ὧ" U1F67 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f61> : "ὧ" U1F67 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_omega> : "ὧ" U1F67 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_omega> : "ὧ" U1F67 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_omega> : "ὧ" U1F67 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_omega> : "ὧ" U1F67 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_omega> : "ὧ" U1F67 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_omega> : "ὧ" U1F67 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI +<U0313> <Greek_OMEGA> : "Ὠ" U1F68 # GREEK CAPITAL LETTER OMEGA WITH PSILI +<Multi_key> <parenright> <Greek_OMEGA> : "Ὠ" U1F68 # GREEK CAPITAL LETTER OMEGA WITH PSILI +<U0314> <Greek_OMEGA> : "Ὡ" U1F69 # GREEK CAPITAL LETTER OMEGA WITH DASIA +<Multi_key> <parenleft> <Greek_OMEGA> : "Ὡ" U1F69 # GREEK CAPITAL LETTER OMEGA WITH DASIA +<dead_grave> <U1f68> : "Ὢ" U1F6A # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +<Multi_key> <grave> <U1f68> : "Ὢ" U1F6A # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +<dead_grave> <U0313> <Greek_OMEGA> : "Ὢ" U1F6A # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +<dead_grave> <Multi_key> <parenright> <Greek_OMEGA> : "Ὢ" U1F6A # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +<Multi_key> <grave> <U0313> <Greek_OMEGA> : "Ὢ" U1F6A # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +<Multi_key> <grave> <parenright> <Greek_OMEGA> : "Ὢ" U1F6A # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +<combining_grave> <U1f68> : "Ὢ" U1F6A # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +<combining_grave> <U0313> <Greek_OMEGA> : "Ὢ" U1F6A # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +<combining_grave> <Multi_key> <parenright> <Greek_OMEGA> : "Ὢ" U1F6A # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA +<dead_grave> <U1f69> : "Ὣ" U1F6B # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<Multi_key> <grave> <U1f69> : "Ὣ" U1F6B # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<dead_grave> <U0314> <Greek_OMEGA> : "Ὣ" U1F6B # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<dead_grave> <Multi_key> <parenleft> <Greek_OMEGA> : "Ὣ" U1F6B # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<Multi_key> <grave> <U0314> <Greek_OMEGA> : "Ὣ" U1F6B # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<Multi_key> <grave> <parenleft> <Greek_OMEGA> : "Ὣ" U1F6B # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<combining_grave> <U1f69> : "Ὣ" U1F6B # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<combining_grave> <U0314> <Greek_OMEGA> : "Ὣ" U1F6B # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<combining_grave> <Multi_key> <parenleft> <Greek_OMEGA> : "Ὣ" U1F6B # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA +<dead_acute> <U1f68> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <acute> <U1f68> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U1f68> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<dead_acute> <U0313> <Greek_OMEGA> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<dead_acute> <Multi_key> <parenright> <Greek_OMEGA> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <acute> <U0313> <Greek_OMEGA> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <acute> <parenright> <Greek_OMEGA> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <U0313> <Greek_OMEGA> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<Multi_key> <apostrophe> <parenright> <Greek_OMEGA> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<combining_acute> <U1f68> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<combining_acute> <U0313> <Greek_OMEGA> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<combining_acute> <Multi_key> <parenright> <Greek_OMEGA> : "Ὤ" U1F6C # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA +<dead_acute> <U1f69> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <acute> <U1f69> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U1f69> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<dead_acute> <U0314> <Greek_OMEGA> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<dead_acute> <Multi_key> <parenleft> <Greek_OMEGA> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <acute> <U0314> <Greek_OMEGA> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <acute> <parenleft> <Greek_OMEGA> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <U0314> <Greek_OMEGA> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<Multi_key> <apostrophe> <parenleft> <Greek_OMEGA> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<combining_acute> <U1f69> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<combining_acute> <U0314> <Greek_OMEGA> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<combining_acute> <Multi_key> <parenleft> <Greek_OMEGA> : "á½­" U1F6D # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA +<U0342> <U1f68> : "á½®" U1F6E # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +<dead_tilde> <U1f68> : "á½®" U1F6E # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U1f68> : "á½®" U1F6E # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +<U0342> <U0313> <Greek_OMEGA> : "á½®" U1F6E # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +<U0342> <Multi_key> <parenright> <Greek_OMEGA> : "á½®" U1F6E # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +<dead_tilde> <U0313> <Greek_OMEGA> : "á½®" U1F6E # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +<dead_tilde> <Multi_key> <parenright> <Greek_OMEGA> : "á½®" U1F6E # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <U0313> <Greek_OMEGA> : "á½®" U1F6E # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +<Multi_key> <asciitilde> <parenright> <Greek_OMEGA> : "á½®" U1F6E # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI +<U0342> <U1f69> : "Ὧ" U1F6F # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<dead_tilde> <U1f69> : "Ὧ" U1F6F # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U1f69> : "Ὧ" U1F6F # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<U0342> <U0314> <Greek_OMEGA> : "Ὧ" U1F6F # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<U0342> <Multi_key> <parenleft> <Greek_OMEGA> : "Ὧ" U1F6F # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<dead_tilde> <U0314> <Greek_OMEGA> : "Ὧ" U1F6F # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<dead_tilde> <Multi_key> <parenleft> <Greek_OMEGA> : "Ὧ" U1F6F # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <U0314> <Greek_OMEGA> : "Ὧ" U1F6F # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<Multi_key> <asciitilde> <parenleft> <Greek_OMEGA> : "Ὧ" U1F6F # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI +<dead_grave> <Greek_alpha> : "á½°" U1F70 # GREEK SMALL LETTER ALPHA WITH VARIA +<Multi_key> <grave> <Greek_alpha> : "á½°" U1F70 # GREEK SMALL LETTER ALPHA WITH VARIA +<combining_grave> <Greek_alpha> : "á½°" U1F70 # GREEK SMALL LETTER ALPHA WITH VARIA +<dead_grave> <Greek_epsilon> : "á½²" U1F72 # GREEK SMALL LETTER EPSILON WITH VARIA +<Multi_key> <grave> <Greek_epsilon> : "á½²" U1F72 # GREEK SMALL LETTER EPSILON WITH VARIA +<combining_grave> <Greek_epsilon> : "á½²" U1F72 # GREEK SMALL LETTER EPSILON WITH VARIA +<dead_grave> <Greek_eta> : "á½´" U1F74 # GREEK SMALL LETTER ETA WITH VARIA +<Multi_key> <grave> <Greek_eta> : "á½´" U1F74 # GREEK SMALL LETTER ETA WITH VARIA +<combining_grave> <Greek_eta> : "á½´" U1F74 # GREEK SMALL LETTER ETA WITH VARIA +<dead_grave> <Greek_iota> : "ὶ" U1F76 # GREEK SMALL LETTER IOTA WITH VARIA +<Multi_key> <grave> <Greek_iota> : "ὶ" U1F76 # GREEK SMALL LETTER IOTA WITH VARIA +<combining_grave> <Greek_iota> : "ὶ" U1F76 # GREEK SMALL LETTER IOTA WITH VARIA +<dead_grave> <Greek_omicron> : "ὸ" U1F78 # GREEK SMALL LETTER OMICRON WITH VARIA +<Multi_key> <grave> <Greek_omicron> : "ὸ" U1F78 # GREEK SMALL LETTER OMICRON WITH VARIA +<combining_grave> <Greek_omicron> : "ὸ" U1F78 # GREEK SMALL LETTER OMICRON WITH VARIA +<dead_grave> <Greek_upsilon> : "ὺ" U1F7A # GREEK SMALL LETTER UPSILON WITH VARIA +<Multi_key> <grave> <Greek_upsilon> : "ὺ" U1F7A # GREEK SMALL LETTER UPSILON WITH VARIA +<combining_grave> <Greek_upsilon> : "ὺ" U1F7A # GREEK SMALL LETTER UPSILON WITH VARIA +<dead_grave> <Greek_omega> : "á½¼" U1F7C # GREEK SMALL LETTER OMEGA WITH VARIA +<Multi_key> <grave> <Greek_omega> : "á½¼" U1F7C # GREEK SMALL LETTER OMEGA WITH VARIA +<combining_grave> <Greek_omega> : "á½¼" U1F7C # GREEK SMALL LETTER OMEGA WITH VARIA +<dead_iota> <U1f00> : "á¾€" U1F80 # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f00> : "á¾€" U1F80 # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI +<dead_iota> <U0313> <Greek_alpha> : "á¾€" U1F80 # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <parenright> <Greek_alpha> : "á¾€" U1F80 # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0313> <Greek_alpha> : "á¾€" U1F80 # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <parenright> <Greek_alpha> : "á¾€" U1F80 # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI +<dead_iota> <U1f01> : "á¾" U1F81 # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f01> : "á¾" U1F81 # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI +<dead_iota> <U0314> <Greek_alpha> : "á¾" U1F81 # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <parenleft> <Greek_alpha> : "á¾" U1F81 # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0314> <Greek_alpha> : "á¾" U1F81 # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <parenleft> <Greek_alpha> : "á¾" U1F81 # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI +<dead_iota> <U1f02> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f02> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U1f00> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f00> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f00> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f00> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U0313> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenright> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0313> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenright> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0313> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenright> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0313> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenright> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U1f00> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f00> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U0313> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenright> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0313> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenright> <Greek_alpha> : "ᾂ" U1F82 # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <U1f03> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f03> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U1f01> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f01> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f01> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f01> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U0314> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenleft> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0314> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenleft> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0314> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenleft> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0314> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenleft> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U1f01> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f01> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U0314> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenleft> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0314> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenleft> <Greek_alpha> : "ᾃ" U1F83 # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <U1f04> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f04> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U1f00> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f00> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f00> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f00> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f00> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f00> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U0313> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenright> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0313> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenright> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0313> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenright> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0313> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenright> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0313> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenright> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0313> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenright> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U1f00> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f00> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U0313> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenright> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0313> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenright> <Greek_alpha> : "ᾄ" U1F84 # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <U1f05> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f05> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U1f01> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f01> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f01> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f01> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f01> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f01> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U0314> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenleft> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0314> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenleft> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0314> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenleft> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0314> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenleft> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0314> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenleft> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0314> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenleft> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U1f01> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f01> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U0314> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenleft> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0314> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenleft> <Greek_alpha> : "á¾…" U1F85 # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <U1f06> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f06> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U1f00> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U1f00> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f00> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f00> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f00> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f00> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U0313> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenright> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U0313> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenright> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0313> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenright> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0313> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenright> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0313> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenright> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0313> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenright> <Greek_alpha> : "ᾆ" U1F86 # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U1f07> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f07> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U1f01> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U1f01> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f01> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f01> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f01> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f01> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U0314> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenleft> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U0314> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenleft> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0314> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenleft> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0314> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenleft> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0314> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenleft> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0314> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenleft> <Greek_alpha> : "ᾇ" U1F87 # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U1f08> : "ᾈ" U1F88 # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f08> : "ᾈ" U1F88 # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI +<dead_iota> <U0313> <Greek_ALPHA> : "ᾈ" U1F88 # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <parenright> <Greek_ALPHA> : "ᾈ" U1F88 # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0313> <Greek_ALPHA> : "ᾈ" U1F88 # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <parenright> <Greek_ALPHA> : "ᾈ" U1F88 # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI +<dead_iota> <U1f09> : "ᾉ" U1F89 # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f09> : "ᾉ" U1F89 # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI +<dead_iota> <U0314> <Greek_ALPHA> : "ᾉ" U1F89 # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <parenleft> <Greek_ALPHA> : "ᾉ" U1F89 # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0314> <Greek_ALPHA> : "ᾉ" U1F89 # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <parenleft> <Greek_ALPHA> : "ᾉ" U1F89 # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI +<dead_iota> <U1f0a> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f0a> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U1f08> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f08> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f08> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f08> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U0313> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenright> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0313> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenright> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0313> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenright> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0313> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenright> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U1f08> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f08> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U0313> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenright> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0313> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenright> <Greek_ALPHA> : "ᾊ" U1F8A # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <U1f0b> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f0b> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U1f09> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f09> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f09> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f09> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U0314> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenleft> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0314> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenleft> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0314> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenleft> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0314> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenleft> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U1f09> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f09> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U0314> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenleft> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0314> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenleft> <Greek_ALPHA> : "ᾋ" U1F8B # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <U1f0c> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f0c> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U1f08> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f08> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f08> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f08> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f08> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f08> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U0313> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenright> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0313> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenright> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0313> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenright> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0313> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenright> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0313> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenright> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0313> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenright> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U1f08> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f08> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U0313> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenright> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0313> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenright> <Greek_ALPHA> : "ᾌ" U1F8C # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <U1f0d> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f0d> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U1f09> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f09> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f09> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f09> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f09> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f09> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U0314> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenleft> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0314> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenleft> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0314> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenleft> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0314> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenleft> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0314> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenleft> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0314> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenleft> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U1f09> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f09> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U0314> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenleft> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0314> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenleft> <Greek_ALPHA> : "á¾" U1F8D # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <U1f0e> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f0e> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U1f08> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U1f08> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f08> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f08> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f08> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f08> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U0313> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenright> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U0313> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenright> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0313> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenright> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0313> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenright> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0313> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenright> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0313> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenright> <Greek_ALPHA> : "ᾎ" U1F8E # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U1f0f> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f0f> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U1f09> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U1f09> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f09> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f09> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f09> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f09> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U0314> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenleft> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U0314> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenleft> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0314> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenleft> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0314> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenleft> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0314> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenleft> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0314> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenleft> <Greek_ALPHA> : "á¾" U1F8F # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U1f20> : "á¾" U1F90 # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f20> : "á¾" U1F90 # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI +<dead_iota> <U0313> <Greek_eta> : "á¾" U1F90 # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <parenright> <Greek_eta> : "á¾" U1F90 # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0313> <Greek_eta> : "á¾" U1F90 # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <parenright> <Greek_eta> : "á¾" U1F90 # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI +<dead_iota> <U1f21> : "ᾑ" U1F91 # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f21> : "ᾑ" U1F91 # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI +<dead_iota> <U0314> <Greek_eta> : "ᾑ" U1F91 # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <parenleft> <Greek_eta> : "ᾑ" U1F91 # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0314> <Greek_eta> : "ᾑ" U1F91 # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <parenleft> <Greek_eta> : "ᾑ" U1F91 # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI +<dead_iota> <U1f22> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f22> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U1f20> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f20> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f20> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f20> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U0313> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenright> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0313> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenright> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0313> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenright> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0313> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenright> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U1f20> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f20> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U0313> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenright> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0313> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenright> <Greek_eta> : "á¾’" U1F92 # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <U1f23> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f23> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U1f21> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f21> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f21> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f21> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U0314> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenleft> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0314> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenleft> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0314> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenleft> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0314> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenleft> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U1f21> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f21> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U0314> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenleft> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0314> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenleft> <Greek_eta> : "ᾓ" U1F93 # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <U1f24> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f24> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U1f20> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f20> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f20> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f20> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f20> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f20> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U0313> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenright> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0313> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenright> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0313> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenright> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0313> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenright> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0313> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenright> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0313> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenright> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U1f20> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f20> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U0313> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenright> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0313> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenright> <Greek_eta> : "á¾”" U1F94 # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <U1f25> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f25> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U1f21> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f21> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f21> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f21> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f21> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f21> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U0314> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenleft> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0314> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenleft> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0314> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenleft> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0314> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenleft> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0314> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenleft> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0314> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenleft> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U1f21> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f21> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U0314> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenleft> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0314> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenleft> <Greek_eta> : "ᾕ" U1F95 # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <U1f26> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f26> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U1f20> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U1f20> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f20> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f20> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f20> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f20> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U0313> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenright> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U0313> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenright> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0313> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenright> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0313> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenright> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0313> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenright> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0313> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenright> <Greek_eta> : "á¾–" U1F96 # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U1f27> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f27> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U1f21> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U1f21> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f21> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f21> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f21> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f21> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U0314> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenleft> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U0314> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenleft> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0314> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenleft> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0314> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenleft> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0314> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenleft> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0314> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenleft> <Greek_eta> : "á¾—" U1F97 # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U1f28> : "ᾘ" U1F98 # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f28> : "ᾘ" U1F98 # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI +<dead_iota> <U0313> <Greek_ETA> : "ᾘ" U1F98 # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <parenright> <Greek_ETA> : "ᾘ" U1F98 # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0313> <Greek_ETA> : "ᾘ" U1F98 # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <parenright> <Greek_ETA> : "ᾘ" U1F98 # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI +<dead_iota> <U1f29> : "á¾™" U1F99 # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f29> : "á¾™" U1F99 # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI +<dead_iota> <U0314> <Greek_ETA> : "á¾™" U1F99 # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <parenleft> <Greek_ETA> : "á¾™" U1F99 # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0314> <Greek_ETA> : "á¾™" U1F99 # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <parenleft> <Greek_ETA> : "á¾™" U1F99 # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI +<dead_iota> <U1f2a> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f2a> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U1f28> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f28> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f28> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f28> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U0313> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenright> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0313> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenright> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0313> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenright> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0313> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenright> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U1f28> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f28> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U0313> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenright> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0313> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenright> <Greek_ETA> : "ᾚ" U1F9A # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <U1f2b> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f2b> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U1f29> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f29> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f29> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f29> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U0314> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenleft> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0314> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenleft> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0314> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenleft> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0314> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenleft> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U1f29> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f29> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U0314> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenleft> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0314> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenleft> <Greek_ETA> : "á¾›" U1F9B # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <U1f2c> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f2c> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U1f28> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f28> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f28> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f28> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f28> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f28> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U0313> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenright> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0313> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenright> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0313> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenright> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0313> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenright> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0313> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenright> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0313> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenright> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U1f28> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f28> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U0313> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenright> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0313> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenright> <Greek_ETA> : "ᾜ" U1F9C # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <U1f2d> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f2d> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U1f29> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f29> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f29> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f29> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f29> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f29> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U0314> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenleft> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0314> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenleft> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0314> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenleft> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0314> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenleft> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0314> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenleft> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0314> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenleft> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U1f29> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f29> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U0314> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenleft> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0314> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenleft> <Greek_ETA> : "á¾" U1F9D # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <U1f2e> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f2e> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U1f28> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U1f28> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f28> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f28> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f28> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f28> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U0313> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenright> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U0313> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenright> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0313> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenright> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0313> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenright> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0313> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenright> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0313> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenright> <Greek_ETA> : "ᾞ" U1F9E # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U1f2f> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f2f> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U1f29> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U1f29> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f29> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f29> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f29> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f29> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U0314> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenleft> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U0314> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenleft> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0314> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenleft> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0314> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenleft> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0314> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenleft> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0314> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenleft> <Greek_ETA> : "ᾟ" U1F9F # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U1f60> : "á¾ " U1FA0 # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f60> : "á¾ " U1FA0 # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI +<dead_iota> <U0313> <Greek_omega> : "á¾ " U1FA0 # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <parenright> <Greek_omega> : "á¾ " U1FA0 # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0313> <Greek_omega> : "á¾ " U1FA0 # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <parenright> <Greek_omega> : "á¾ " U1FA0 # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI +<dead_iota> <U1f61> : "ᾡ" U1FA1 # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f61> : "ᾡ" U1FA1 # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI +<dead_iota> <U0314> <Greek_omega> : "ᾡ" U1FA1 # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <parenleft> <Greek_omega> : "ᾡ" U1FA1 # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0314> <Greek_omega> : "ᾡ" U1FA1 # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <parenleft> <Greek_omega> : "ᾡ" U1FA1 # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI +<dead_iota> <U1f62> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f62> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U1f60> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f60> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f60> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f60> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U0313> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenright> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0313> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenright> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0313> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenright> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0313> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenright> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U1f60> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f60> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U0313> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenright> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0313> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenright> <Greek_omega> : "á¾¢" U1FA2 # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI +<dead_iota> <U1f63> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f63> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U1f61> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f61> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f61> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f61> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <U0314> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenleft> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0314> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenleft> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0314> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenleft> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0314> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenleft> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U1f61> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f61> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <U0314> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenleft> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0314> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenleft> <Greek_omega> : "á¾£" U1FA3 # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI +<dead_iota> <U1f64> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f64> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U1f60> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f60> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f60> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f60> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f60> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f60> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U0313> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenright> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0313> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenright> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0313> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenright> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0313> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenright> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0313> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenright> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0313> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenright> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U1f60> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f60> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U0313> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenright> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0313> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenright> <Greek_omega> : "ᾤ" U1FA4 # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI +<dead_iota> <U1f65> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f65> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U1f61> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f61> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f61> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f61> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f61> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f61> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <U0314> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenleft> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0314> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenleft> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0314> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenleft> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0314> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenleft> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0314> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenleft> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0314> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenleft> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U1f61> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f61> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <U0314> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenleft> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0314> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenleft> <Greek_omega> : "á¾¥" U1FA5 # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI +<dead_iota> <U1f66> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f66> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U1f60> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U1f60> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f60> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f60> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f60> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f60> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U0313> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenright> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U0313> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenright> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0313> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenright> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0313> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenright> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0313> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenright> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0313> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenright> <Greek_omega> : "ᾦ" U1FA6 # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U1f67> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f67> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U1f61> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U1f61> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f61> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f61> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f61> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f61> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <U0314> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenleft> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <U0314> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenleft> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0314> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenleft> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0314> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenleft> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0314> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenleft> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0314> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenleft> <Greek_omega> : "ᾧ" U1FA7 # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U1f68> : "ᾨ" U1FA8 # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f68> : "ᾨ" U1FA8 # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI +<dead_iota> <U0313> <Greek_OMEGA> : "ᾨ" U1FA8 # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <parenright> <Greek_OMEGA> : "ᾨ" U1FA8 # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0313> <Greek_OMEGA> : "ᾨ" U1FA8 # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <parenright> <Greek_OMEGA> : "ᾨ" U1FA8 # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI +<dead_iota> <U1f69> : "ᾩ" U1FA9 # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f69> : "ᾩ" U1FA9 # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI +<dead_iota> <U0314> <Greek_OMEGA> : "ᾩ" U1FA9 # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <parenleft> <Greek_OMEGA> : "ᾩ" U1FA9 # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0314> <Greek_OMEGA> : "ᾩ" U1FA9 # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <parenleft> <Greek_OMEGA> : "ᾩ" U1FA9 # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI +<dead_iota> <U1f6a> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f6a> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U1f68> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f68> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f68> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f68> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U0313> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenright> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0313> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenright> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0313> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenright> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0313> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenright> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U1f68> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f68> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U0313> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenright> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0313> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenright> <Greek_OMEGA> : "ᾪ" U1FAA # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI +<dead_iota> <U1f6b> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f6b> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U1f69> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U1f69> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U1f69> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U1f69> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <U0314> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <dead_grave> <Multi_key> <parenleft> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <U0314> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <grave> <parenleft> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <U0314> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <parenleft> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <U0314> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <parenleft> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U1f69> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U1f69> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <U0314> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <combining_grave> <Multi_key> <parenleft> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <U0314> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <parenleft> <Greek_OMEGA> : "ᾫ" U1FAB # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI +<dead_iota> <U1f6c> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f6c> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U1f68> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f68> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f68> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f68> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f68> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f68> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U0313> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenright> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0313> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenright> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0313> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenright> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0313> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenright> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0313> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenright> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0313> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenright> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U1f68> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f68> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U0313> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenright> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0313> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenright> <Greek_OMEGA> : "ᾬ" U1FAC # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI +<dead_iota> <U1f6d> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f6d> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U1f69> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U1f69> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U1f69> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U1f69> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U1f69> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U1f69> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <U0314> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <dead_acute> <Multi_key> <parenleft> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <U0314> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <acute> <parenleft> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <U0314> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <parenleft> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <U0314> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <parenleft> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <U0314> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <parenleft> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <U0314> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <parenleft> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U1f69> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U1f69> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <U0314> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <combining_acute> <Multi_key> <parenleft> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <U0314> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <parenleft> <Greek_OMEGA> : "á¾­" U1FAD # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI +<dead_iota> <U1f6e> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f6e> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U1f68> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U1f68> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f68> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f68> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f68> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f68> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U0313> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenright> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U0313> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenright> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0313> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenright> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0313> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenright> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0313> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenright> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0313> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenright> <Greek_OMEGA> : "á¾®" U1FAE # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U1f6f> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U1f6f> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U1f69> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U1f69> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U1f69> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U1f69> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U1f69> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U1f69> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <U0314> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <U0342> <Multi_key> <parenleft> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <U0314> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <dead_tilde> <Multi_key> <parenleft> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <U0314> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <parenleft> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <U0314> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <parenleft> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <U0314> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <parenleft> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <U0314> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <parenleft> <Greek_OMEGA> : "ᾯ" U1FAF # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI +<dead_breve> <Greek_alpha> : "á¾°" U1FB0 # GREEK SMALL LETTER ALPHA WITH VRACHY +<Multi_key> <U> <Greek_alpha> : "á¾°" U1FB0 # GREEK SMALL LETTER ALPHA WITH VRACHY +<Multi_key> <b> <Greek_alpha> : "á¾°" U1FB0 # GREEK SMALL LETTER ALPHA WITH VRACHY +<dead_macron> <Greek_alpha> : "á¾±" U1FB1 # GREEK SMALL LETTER ALPHA WITH MACRON +<Multi_key> <macron> <Greek_alpha> : "á¾±" U1FB1 # GREEK SMALL LETTER ALPHA WITH MACRON +<Multi_key> <underscore> <Greek_alpha> : "á¾±" U1FB1 # GREEK SMALL LETTER ALPHA WITH MACRON +<dead_iota> <U1f70> : "á¾²" U1FB2 # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f70> : "á¾²" U1FB2 # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <Greek_alpha> : "á¾²" U1FB2 # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <Greek_alpha> : "á¾²" U1FB2 # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <Greek_alpha> : "á¾²" U1FB2 # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <Greek_alpha> : "á¾²" U1FB2 # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <Greek_alpha> : "á¾²" U1FB2 # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <Greek_alpha> : "á¾²" U1FB2 # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <Greek_alpha> : "á¾³" U1FB3 # GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI +<Multi_key> <Greek_iota> <Greek_alpha> : "á¾³" U1FB3 # GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI +<dead_iota> <Greek_alphaaccent> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <Greek_alphaaccent> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <Greek_alpha> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <Greek_alpha> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <Greek_alpha> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <Greek_alpha> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <Greek_alpha> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <Greek_alpha> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <Greek_alpha> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <Greek_alpha> : "á¾´" U1FB4 # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI +<U0342> <Greek_alpha> : "ᾶ" U1FB6 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI +<dead_tilde> <Greek_alpha> : "ᾶ" U1FB6 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI +<Multi_key> <asciitilde> <Greek_alpha> : "ᾶ" U1FB6 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI +<dead_iota> <U1fb6> : "á¾·" U1FB7 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1fb6> : "á¾·" U1FB7 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <Greek_alpha> : "á¾·" U1FB7 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <Greek_alpha> : "á¾·" U1FB7 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <Greek_alpha> : "á¾·" U1FB7 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <Greek_alpha> : "á¾·" U1FB7 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <Greek_alpha> : "á¾·" U1FB7 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <Greek_alpha> : "á¾·" U1FB7 # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_breve> <Greek_ALPHA> : "Ᾰ" U1FB8 # GREEK CAPITAL LETTER ALPHA WITH VRACHY +<Multi_key> <U> <Greek_ALPHA> : "Ᾰ" U1FB8 # GREEK CAPITAL LETTER ALPHA WITH VRACHY +<Multi_key> <b> <Greek_ALPHA> : "Ᾰ" U1FB8 # GREEK CAPITAL LETTER ALPHA WITH VRACHY +<dead_macron> <Greek_ALPHA> : "á¾¹" U1FB9 # GREEK CAPITAL LETTER ALPHA WITH MACRON +<Multi_key> <macron> <Greek_ALPHA> : "á¾¹" U1FB9 # GREEK CAPITAL LETTER ALPHA WITH MACRON +<Multi_key> <underscore> <Greek_ALPHA> : "á¾¹" U1FB9 # GREEK CAPITAL LETTER ALPHA WITH MACRON +<dead_grave> <Greek_ALPHA> : "Ὰ" U1FBA # GREEK CAPITAL LETTER ALPHA WITH VARIA +<Multi_key> <grave> <Greek_ALPHA> : "Ὰ" U1FBA # GREEK CAPITAL LETTER ALPHA WITH VARIA +<combining_grave> <Greek_ALPHA> : "Ὰ" U1FBA # GREEK CAPITAL LETTER ALPHA WITH VARIA +<dead_iota> <Greek_ALPHA> : "á¾¼" U1FBC # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI +<Multi_key> <Greek_iota> <Greek_ALPHA> : "á¾¼" U1FBC # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI +<Multi_key> <diaeresis> <U0342> : "á¿" U1FC1 # GREEK DIALYTIKA AND PERISPOMENI +<Multi_key> <diaeresis> <dead_tilde> : "á¿" U1FC1 # GREEK DIALYTIKA AND PERISPOMENI +<Multi_key> <diaeresis> <asciitilde> : "á¿" U1FC1 # GREEK DIALYTIKA AND PERISPOMENI +<dead_iota> <U1f74> : "á¿‚" U1FC2 # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f74> : "á¿‚" U1FC2 # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <Greek_eta> : "á¿‚" U1FC2 # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <Greek_eta> : "á¿‚" U1FC2 # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <Greek_eta> : "á¿‚" U1FC2 # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <Greek_eta> : "á¿‚" U1FC2 # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <Greek_eta> : "á¿‚" U1FC2 # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <Greek_eta> : "á¿‚" U1FC2 # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <Greek_eta> : "ῃ" U1FC3 # GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI +<Multi_key> <Greek_iota> <Greek_eta> : "ῃ" U1FC3 # GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI +<dead_iota> <Greek_etaaccent> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <Greek_etaaccent> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <Greek_eta> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <Greek_eta> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <Greek_eta> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <Greek_eta> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <Greek_eta> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <Greek_eta> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <Greek_eta> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <Greek_eta> : "á¿„" U1FC4 # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI +<U0342> <Greek_eta> : "ῆ" U1FC6 # GREEK SMALL LETTER ETA WITH PERISPOMENI +<dead_tilde> <Greek_eta> : "ῆ" U1FC6 # GREEK SMALL LETTER ETA WITH PERISPOMENI +<Multi_key> <asciitilde> <Greek_eta> : "ῆ" U1FC6 # GREEK SMALL LETTER ETA WITH PERISPOMENI +<dead_iota> <U1fc6> : "ῇ" U1FC7 # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1fc6> : "ῇ" U1FC7 # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <Greek_eta> : "ῇ" U1FC7 # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <Greek_eta> : "ῇ" U1FC7 # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <Greek_eta> : "ῇ" U1FC7 # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <Greek_eta> : "ῇ" U1FC7 # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <Greek_eta> : "ῇ" U1FC7 # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <Greek_eta> : "ῇ" U1FC7 # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_grave> <Greek_EPSILON> : "Ὲ" U1FC8 # GREEK CAPITAL LETTER EPSILON WITH VARIA +<Multi_key> <grave> <Greek_EPSILON> : "Ὲ" U1FC8 # GREEK CAPITAL LETTER EPSILON WITH VARIA +<combining_grave> <Greek_EPSILON> : "Ὲ" U1FC8 # GREEK CAPITAL LETTER EPSILON WITH VARIA +<dead_grave> <Greek_ETA> : "á¿Š" U1FCA # GREEK CAPITAL LETTER ETA WITH VARIA +<Multi_key> <grave> <Greek_ETA> : "á¿Š" U1FCA # GREEK CAPITAL LETTER ETA WITH VARIA +<combining_grave> <Greek_ETA> : "á¿Š" U1FCA # GREEK CAPITAL LETTER ETA WITH VARIA +<dead_iota> <Greek_ETA> : "á¿Œ" U1FCC # GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI +<Multi_key> <Greek_iota> <Greek_ETA> : "á¿Œ" U1FCC # GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI +<Multi_key> <U1fbf> <dead_grave> : "á¿" U1FCD # GREEK PSILI AND VARIA +<Multi_key> <U1fbf> <grave> : "á¿" U1FCD # GREEK PSILI AND VARIA +<Multi_key> <U1fbf> <combining_grave> : "á¿" U1FCD # GREEK PSILI AND VARIA +<Multi_key> <U1fbf> <dead_acute> : "á¿Ž" U1FCE # GREEK PSILI AND OXIA +<Multi_key> <U1fbf> <acute> : "á¿Ž" U1FCE # GREEK PSILI AND OXIA +<Multi_key> <U1fbf> <apostrophe> : "á¿Ž" U1FCE # GREEK PSILI AND OXIA +<Multi_key> <U1fbf> <combining_acute> : "á¿Ž" U1FCE # GREEK PSILI AND OXIA +<Multi_key> <U1fbf> <U0342> : "á¿" U1FCF # GREEK PSILI AND PERISPOMENI +<Multi_key> <U1fbf> <dead_tilde> : "á¿" U1FCF # GREEK PSILI AND PERISPOMENI +<Multi_key> <U1fbf> <asciitilde> : "á¿" U1FCF # GREEK PSILI AND PERISPOMENI +<dead_breve> <Greek_iota> : "á¿" U1FD0 # GREEK SMALL LETTER IOTA WITH VRACHY +<Multi_key> <U> <Greek_iota> : "á¿" U1FD0 # GREEK SMALL LETTER IOTA WITH VRACHY +<Multi_key> <b> <Greek_iota> : "á¿" U1FD0 # GREEK SMALL LETTER IOTA WITH VRACHY +<dead_macron> <Greek_iota> : "á¿‘" U1FD1 # GREEK SMALL LETTER IOTA WITH MACRON +<Multi_key> <macron> <Greek_iota> : "á¿‘" U1FD1 # GREEK SMALL LETTER IOTA WITH MACRON +<Multi_key> <underscore> <Greek_iota> : "á¿‘" U1FD1 # GREEK SMALL LETTER IOTA WITH MACRON +<dead_grave> <Greek_iotadieresis> : "á¿’" U1FD2 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +<Multi_key> <grave> <Greek_iotadieresis> : "á¿’" U1FD2 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +<dead_grave> <dead_diaeresis> <Greek_iota> : "á¿’" U1FD2 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +<dead_grave> <Multi_key> <quotedbl> <Greek_iota> : "á¿’" U1FD2 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +<Multi_key> <grave> <dead_diaeresis> <Greek_iota> : "á¿’" U1FD2 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +<Multi_key> <grave> <quotedbl> <Greek_iota> : "á¿’" U1FD2 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +<combining_grave> <Greek_iotadieresis> : "á¿’" U1FD2 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +<combining_grave> <dead_diaeresis> <Greek_iota> : "á¿’" U1FD2 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +<combining_grave> <Multi_key> <quotedbl> <Greek_iota> : "á¿’" U1FD2 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA +<U0342> <Greek_iota> : "á¿–" U1FD6 # GREEK SMALL LETTER IOTA WITH PERISPOMENI +<dead_tilde> <Greek_iota> : "á¿–" U1FD6 # GREEK SMALL LETTER IOTA WITH PERISPOMENI +<Multi_key> <asciitilde> <Greek_iota> : "á¿–" U1FD6 # GREEK SMALL LETTER IOTA WITH PERISPOMENI +<U0342> <Greek_iotadieresis> : "á¿—" U1FD7 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +<dead_tilde> <Greek_iotadieresis> : "á¿—" U1FD7 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +<Multi_key> <asciitilde> <Greek_iotadieresis> : "á¿—" U1FD7 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +<U0342> <dead_diaeresis> <Greek_iota> : "á¿—" U1FD7 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +<U0342> <Multi_key> <quotedbl> <Greek_iota> : "á¿—" U1FD7 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +<dead_tilde> <dead_diaeresis> <Greek_iota> : "á¿—" U1FD7 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +<dead_tilde> <Multi_key> <quotedbl> <Greek_iota> : "á¿—" U1FD7 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +<Multi_key> <asciitilde> <dead_diaeresis> <Greek_iota> : "á¿—" U1FD7 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +<Multi_key> <asciitilde> <quotedbl> <Greek_iota> : "á¿—" U1FD7 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI +<dead_breve> <Greek_IOTA> : "Ῐ" U1FD8 # GREEK CAPITAL LETTER IOTA WITH VRACHY +<Multi_key> <U> <Greek_IOTA> : "Ῐ" U1FD8 # GREEK CAPITAL LETTER IOTA WITH VRACHY +<Multi_key> <b> <Greek_IOTA> : "Ῐ" U1FD8 # GREEK CAPITAL LETTER IOTA WITH VRACHY +<dead_macron> <Greek_IOTA> : "á¿™" U1FD9 # GREEK CAPITAL LETTER IOTA WITH MACRON +<Multi_key> <macron> <Greek_IOTA> : "á¿™" U1FD9 # GREEK CAPITAL LETTER IOTA WITH MACRON +<Multi_key> <underscore> <Greek_IOTA> : "á¿™" U1FD9 # GREEK CAPITAL LETTER IOTA WITH MACRON +<dead_grave> <Greek_IOTA> : "á¿š" U1FDA # GREEK CAPITAL LETTER IOTA WITH VARIA +<Multi_key> <grave> <Greek_IOTA> : "á¿š" U1FDA # GREEK CAPITAL LETTER IOTA WITH VARIA +<combining_grave> <Greek_IOTA> : "á¿š" U1FDA # GREEK CAPITAL LETTER IOTA WITH VARIA +<Multi_key> <U1ffe> <dead_grave> : "á¿" U1FDD # GREEK DASIA AND VARIA +<Multi_key> <U1ffe> <grave> : "á¿" U1FDD # GREEK DASIA AND VARIA +<Multi_key> <U1ffe> <combining_grave> : "á¿" U1FDD # GREEK DASIA AND VARIA +<Multi_key> <U1ffe> <dead_acute> : "á¿ž" U1FDE # GREEK DASIA AND OXIA +<Multi_key> <U1ffe> <acute> : "á¿ž" U1FDE # GREEK DASIA AND OXIA +<Multi_key> <U1ffe> <apostrophe> : "á¿ž" U1FDE # GREEK DASIA AND OXIA +<Multi_key> <U1ffe> <combining_acute> : "á¿ž" U1FDE # GREEK DASIA AND OXIA +<Multi_key> <U1ffe> <U0342> : "á¿Ÿ" U1FDF # GREEK DASIA AND PERISPOMENI +<Multi_key> <U1ffe> <dead_tilde> : "á¿Ÿ" U1FDF # GREEK DASIA AND PERISPOMENI +<Multi_key> <U1ffe> <asciitilde> : "á¿Ÿ" U1FDF # GREEK DASIA AND PERISPOMENI +<dead_breve> <Greek_upsilon> : "á¿ " U1FE0 # GREEK SMALL LETTER UPSILON WITH VRACHY +<Multi_key> <U> <Greek_upsilon> : "á¿ " U1FE0 # GREEK SMALL LETTER UPSILON WITH VRACHY +<Multi_key> <b> <Greek_upsilon> : "á¿ " U1FE0 # GREEK SMALL LETTER UPSILON WITH VRACHY +<dead_macron> <Greek_upsilon> : "á¿¡" U1FE1 # GREEK SMALL LETTER UPSILON WITH MACRON +<Multi_key> <macron> <Greek_upsilon> : "á¿¡" U1FE1 # GREEK SMALL LETTER UPSILON WITH MACRON +<Multi_key> <underscore> <Greek_upsilon> : "á¿¡" U1FE1 # GREEK SMALL LETTER UPSILON WITH MACRON +<dead_grave> <Greek_upsilondieresis> : "á¿¢" U1FE2 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +<Multi_key> <grave> <Greek_upsilondieresis> : "á¿¢" U1FE2 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +<dead_grave> <dead_diaeresis> <Greek_upsilon> : "á¿¢" U1FE2 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +<dead_grave> <Multi_key> <quotedbl> <Greek_upsilon> : "á¿¢" U1FE2 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +<Multi_key> <grave> <dead_diaeresis> <Greek_upsilon> : "á¿¢" U1FE2 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +<Multi_key> <grave> <quotedbl> <Greek_upsilon> : "á¿¢" U1FE2 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +<combining_grave> <Greek_upsilondieresis> : "á¿¢" U1FE2 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +<combining_grave> <dead_diaeresis> <Greek_upsilon> : "á¿¢" U1FE2 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +<combining_grave> <Multi_key> <quotedbl> <Greek_upsilon> : "á¿¢" U1FE2 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA +<U0313> <Greek_rho> : "ῤ" U1FE4 # GREEK SMALL LETTER RHO WITH PSILI +<Multi_key> <parenright> <Greek_rho> : "ῤ" U1FE4 # GREEK SMALL LETTER RHO WITH PSILI +<U0314> <Greek_rho> : "á¿¥" U1FE5 # GREEK SMALL LETTER RHO WITH DASIA +<Multi_key> <parenleft> <Greek_rho> : "á¿¥" U1FE5 # GREEK SMALL LETTER RHO WITH DASIA +<U0342> <Greek_upsilon> : "ῦ" U1FE6 # GREEK SMALL LETTER UPSILON WITH PERISPOMENI +<dead_tilde> <Greek_upsilon> : "ῦ" U1FE6 # GREEK SMALL LETTER UPSILON WITH PERISPOMENI +<Multi_key> <asciitilde> <Greek_upsilon> : "ῦ" U1FE6 # GREEK SMALL LETTER UPSILON WITH PERISPOMENI +<U0342> <Greek_upsilondieresis> : "ῧ" U1FE7 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +<dead_tilde> <Greek_upsilondieresis> : "ῧ" U1FE7 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +<Multi_key> <asciitilde> <Greek_upsilondieresis> : "ῧ" U1FE7 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +<U0342> <dead_diaeresis> <Greek_upsilon> : "ῧ" U1FE7 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +<U0342> <Multi_key> <quotedbl> <Greek_upsilon> : "ῧ" U1FE7 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +<dead_tilde> <dead_diaeresis> <Greek_upsilon> : "ῧ" U1FE7 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +<dead_tilde> <Multi_key> <quotedbl> <Greek_upsilon> : "ῧ" U1FE7 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +<Multi_key> <asciitilde> <dead_diaeresis> <Greek_upsilon> : "ῧ" U1FE7 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +<Multi_key> <asciitilde> <quotedbl> <Greek_upsilon> : "ῧ" U1FE7 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI +<dead_breve> <Greek_UPSILON> : "Ῠ" U1FE8 # GREEK CAPITAL LETTER UPSILON WITH VRACHY +<Multi_key> <U> <Greek_UPSILON> : "Ῠ" U1FE8 # GREEK CAPITAL LETTER UPSILON WITH VRACHY +<Multi_key> <b> <Greek_UPSILON> : "Ῠ" U1FE8 # GREEK CAPITAL LETTER UPSILON WITH VRACHY +<dead_macron> <Greek_UPSILON> : "á¿©" U1FE9 # GREEK CAPITAL LETTER UPSILON WITH MACRON +<Multi_key> <macron> <Greek_UPSILON> : "á¿©" U1FE9 # GREEK CAPITAL LETTER UPSILON WITH MACRON +<Multi_key> <underscore> <Greek_UPSILON> : "á¿©" U1FE9 # GREEK CAPITAL LETTER UPSILON WITH MACRON +<dead_grave> <Greek_UPSILON> : "Ὺ" U1FEA # GREEK CAPITAL LETTER UPSILON WITH VARIA +<Multi_key> <grave> <Greek_UPSILON> : "Ὺ" U1FEA # GREEK CAPITAL LETTER UPSILON WITH VARIA +<combining_grave> <Greek_UPSILON> : "Ὺ" U1FEA # GREEK CAPITAL LETTER UPSILON WITH VARIA +<U0314> <Greek_RHO> : "Ῥ" U1FEC # GREEK CAPITAL LETTER RHO WITH DASIA +<Multi_key> <parenleft> <Greek_RHO> : "Ῥ" U1FEC # GREEK CAPITAL LETTER RHO WITH DASIA +<Multi_key> <diaeresis> <dead_grave> : "á¿­" U1FED # GREEK DIALYTIKA AND VARIA +<Multi_key> <diaeresis> <grave> : "á¿­" U1FED # GREEK DIALYTIKA AND VARIA +<Multi_key> <diaeresis> <combining_grave> : "á¿­" U1FED # GREEK DIALYTIKA AND VARIA +<dead_iota> <U1f7c> : "ῲ" U1FF2 # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1f7c> : "ῲ" U1FF2 # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <dead_grave> <Greek_omega> : "ῲ" U1FF2 # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <grave> <Greek_omega> : "ῲ" U1FF2 # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_grave> <Greek_omega> : "ῲ" U1FF2 # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <grave> <Greek_omega> : "ῲ" U1FF2 # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <combining_grave> <Greek_omega> : "ῲ" U1FF2 # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_grave> <Greek_omega> : "ῲ" U1FF2 # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI +<dead_iota> <Greek_omega> : "ῳ" U1FF3 # GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI +<Multi_key> <Greek_iota> <Greek_omega> : "ῳ" U1FF3 # GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI +<dead_iota> <Greek_omegaaccent> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <Greek_omegaaccent> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <dead_acute> <Greek_omega> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <acute> <Greek_omega> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <apostrophe> <Greek_omega> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_acute> <Greek_omega> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <acute> <Greek_omega> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <apostrophe> <Greek_omega> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<dead_iota> <combining_acute> <Greek_omega> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <combining_acute> <Greek_omega> : "á¿´" U1FF4 # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI +<U0342> <Greek_omega> : "ῶ" U1FF6 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI +<dead_tilde> <Greek_omega> : "ῶ" U1FF6 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI +<Multi_key> <asciitilde> <Greek_omega> : "ῶ" U1FF6 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI +<dead_iota> <U1ff6> : "á¿·" U1FF7 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U1ff6> : "á¿·" U1FF7 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <U0342> <Greek_omega> : "á¿·" U1FF7 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <dead_tilde> <Greek_omega> : "á¿·" U1FF7 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_iota> <Multi_key> <asciitilde> <Greek_omega> : "á¿·" U1FF7 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <U0342> <Greek_omega> : "á¿·" U1FF7 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <dead_tilde> <Greek_omega> : "á¿·" U1FF7 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI +<Multi_key> <Greek_iota> <asciitilde> <Greek_omega> : "á¿·" U1FF7 # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI +<dead_grave> <Greek_OMICRON> : "Ὸ" U1FF8 # GREEK CAPITAL LETTER OMICRON WITH VARIA +<Multi_key> <grave> <Greek_OMICRON> : "Ὸ" U1FF8 # GREEK CAPITAL LETTER OMICRON WITH VARIA +<combining_grave> <Greek_OMICRON> : "Ὸ" U1FF8 # GREEK CAPITAL LETTER OMICRON WITH VARIA +<dead_grave> <Greek_OMEGA> : "Ὼ" U1FFA # GREEK CAPITAL LETTER OMEGA WITH VARIA +<Multi_key> <grave> <Greek_OMEGA> : "Ὼ" U1FFA # GREEK CAPITAL LETTER OMEGA WITH VARIA +<combining_grave> <Greek_OMEGA> : "Ὼ" U1FFA # GREEK CAPITAL LETTER OMEGA WITH VARIA +<dead_iota> <Greek_OMEGA> : "ῼ" U1FFC # GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI +<Multi_key> <Greek_iota> <Greek_OMEGA> : "ῼ" U1FFC # GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI +<dead_circumflex> <0> : "â°" U2070 # SUPERSCRIPT ZERO +<Multi_key> <asciicircum> <0> : "â°" U2070 # SUPERSCRIPT ZERO +<dead_circumflex> <KP_0> : "â°" U2070 # SUPERSCRIPT ZERO +<Multi_key> <asciicircum> <KP_0> : "â°" U2070 # SUPERSCRIPT ZERO +<dead_circumflex> <Multi_key> <underscore> <i> : "â±" U2071 # SUPERSCRIPT LATIN SMALL LETTER I +<Multi_key> <asciicircum> <underscore> <i> : "â±" U2071 # SUPERSCRIPT LATIN SMALL LETTER I +<dead_circumflex> <Multi_key> <underbar> <i> : "â±" U2071 # SUPERSCRIPT LATIN SMALL LETTER I +<Multi_key> <asciicircum> <underbar> <i> : "â±" U2071 # SUPERSCRIPT LATIN SMALL LETTER I +<dead_circumflex> <4> : "â´" U2074 # SUPERSCRIPT FOUR +<Multi_key> <asciicircum> <4> : "â´" U2074 # SUPERSCRIPT FOUR +<dead_circumflex> <KP_4> : "â´" U2074 # SUPERSCRIPT FOUR +<Multi_key> <asciicircum> <KP_4> : "â´" U2074 # SUPERSCRIPT FOUR +<dead_circumflex> <5> : "âµ" U2075 # SUPERSCRIPT FIVE +<Multi_key> <asciicircum> <5> : "âµ" U2075 # SUPERSCRIPT FIVE +<dead_circumflex> <KP_5> : "âµ" U2075 # SUPERSCRIPT FIVE +<Multi_key> <asciicircum> <KP_5> : "âµ" U2075 # SUPERSCRIPT FIVE +<dead_circumflex> <6> : "â¶" U2076 # SUPERSCRIPT SIX +<Multi_key> <asciicircum> <6> : "â¶" U2076 # SUPERSCRIPT SIX +<dead_circumflex> <KP_6> : "â¶" U2076 # SUPERSCRIPT SIX +<Multi_key> <asciicircum> <KP_6> : "â¶" U2076 # SUPERSCRIPT SIX +<dead_circumflex> <7> : "â·" U2077 # SUPERSCRIPT SEVEN +<Multi_key> <asciicircum> <7> : "â·" U2077 # SUPERSCRIPT SEVEN +<dead_circumflex> <KP_7> : "â·" U2077 # SUPERSCRIPT SEVEN +<Multi_key> <asciicircum> <KP_7> : "â·" U2077 # SUPERSCRIPT SEVEN +<dead_circumflex> <8> : "â¸" U2078 # SUPERSCRIPT EIGHT +<Multi_key> <asciicircum> <8> : "â¸" U2078 # SUPERSCRIPT EIGHT +<dead_circumflex> <KP_8> : "â¸" U2078 # SUPERSCRIPT EIGHT +<Multi_key> <asciicircum> <KP_8> : "â¸" U2078 # SUPERSCRIPT EIGHT +<dead_circumflex> <9> : "â¹" U2079 # SUPERSCRIPT NINE +<Multi_key> <asciicircum> <9> : "â¹" U2079 # SUPERSCRIPT NINE +<dead_circumflex> <KP_9> : "â¹" U2079 # SUPERSCRIPT NINE +<Multi_key> <asciicircum> <KP_9> : "â¹" U2079 # SUPERSCRIPT NINE +<dead_circumflex> <plus> : "âº" U207A # SUPERSCRIPT PLUS SIGN +<Multi_key> <asciicircum> <plus> : "âº" U207A # SUPERSCRIPT PLUS SIGN +<dead_circumflex> <KP_Add> : "âº" U207A # SUPERSCRIPT PLUS SIGN +<Multi_key> <asciicircum> <KP_Add> : "âº" U207A # SUPERSCRIPT PLUS SIGN +<dead_circumflex> <U2212> : "â»" U207B # SUPERSCRIPT MINUS +<Multi_key> <asciicircum> <U2212> : "â»" U207B # SUPERSCRIPT MINUS +<dead_circumflex> <equal> : "â¼" U207C # SUPERSCRIPT EQUALS SIGN +<Multi_key> <asciicircum> <equal> : "â¼" U207C # SUPERSCRIPT EQUALS SIGN +<dead_circumflex> <KP_Equal> : "â¼" U207C # SUPERSCRIPT EQUALS SIGN +<Multi_key> <asciicircum> <KP_Equal> : "â¼" U207C # SUPERSCRIPT EQUALS SIGN +<dead_circumflex> <parenleft> : "â½" U207D # SUPERSCRIPT LEFT PARENTHESIS +<Multi_key> <asciicircum> <parenleft> : "â½" U207D # SUPERSCRIPT LEFT PARENTHESIS +<dead_circumflex> <parenright> : "â¾" U207E # SUPERSCRIPT RIGHT PARENTHESIS +<Multi_key> <asciicircum> <parenright> : "â¾" U207E # SUPERSCRIPT RIGHT PARENTHESIS +<dead_circumflex> <Multi_key> <underscore> <n> : "â¿" U207F # SUPERSCRIPT LATIN SMALL LETTER N +<Multi_key> <asciicircum> <underscore> <n> : "â¿" U207F # SUPERSCRIPT LATIN SMALL LETTER N +<dead_circumflex> <Multi_key> <underbar> <n> : "â¿" U207F # SUPERSCRIPT LATIN SMALL LETTER N +<Multi_key> <asciicircum> <underbar> <n> : "â¿" U207F # SUPERSCRIPT LATIN SMALL LETTER N +<Multi_key> <underscore> <0> : "â‚€" U2080 # SUBSCRIPT ZERO +<Multi_key> <underscore> <KP_0> : "â‚€" U2080 # SUBSCRIPT ZERO +<Multi_key> <underbar> <0> : "â‚€" U2080 # SUBSCRIPT ZERO +<Multi_key> <underbar> <KP_0> : "â‚€" U2080 # SUBSCRIPT ZERO +<Multi_key> <underscore> <1> : "â‚" U2081 # SUBSCRIPT ONE +<Multi_key> <underscore> <KP_1> : "â‚" U2081 # SUBSCRIPT ONE +<Multi_key> <underbar> <1> : "â‚" U2081 # SUBSCRIPT ONE +<Multi_key> <underbar> <KP_1> : "â‚" U2081 # SUBSCRIPT ONE +<Multi_key> <underscore> <2> : "â‚‚" U2082 # SUBSCRIPT TWO +<Multi_key> <underscore> <KP_Space> : "â‚‚" U2082 # SUBSCRIPT TWO +<Multi_key> <underscore> <KP_2> : "â‚‚" U2082 # SUBSCRIPT TWO +<Multi_key> <underbar> <2> : "â‚‚" U2082 # SUBSCRIPT TWO +<Multi_key> <underbar> <KP_Space> : "â‚‚" U2082 # SUBSCRIPT TWO +<Multi_key> <underbar> <KP_2> : "â‚‚" U2082 # SUBSCRIPT TWO +<Multi_key> <underscore> <3> : "₃" U2083 # SUBSCRIPT THREE +<Multi_key> <underscore> <KP_3> : "₃" U2083 # SUBSCRIPT THREE +<Multi_key> <underbar> <3> : "₃" U2083 # SUBSCRIPT THREE +<Multi_key> <underbar> <KP_3> : "₃" U2083 # SUBSCRIPT THREE +<Multi_key> <underscore> <4> : "â‚„" U2084 # SUBSCRIPT FOUR +<Multi_key> <underscore> <KP_4> : "â‚„" U2084 # SUBSCRIPT FOUR +<Multi_key> <underbar> <4> : "â‚„" U2084 # SUBSCRIPT FOUR +<Multi_key> <underbar> <KP_4> : "â‚„" U2084 # SUBSCRIPT FOUR +<Multi_key> <underscore> <5> : "â‚…" U2085 # SUBSCRIPT FIVE +<Multi_key> <underscore> <KP_5> : "â‚…" U2085 # SUBSCRIPT FIVE +<Multi_key> <underbar> <5> : "â‚…" U2085 # SUBSCRIPT FIVE +<Multi_key> <underbar> <KP_5> : "â‚…" U2085 # SUBSCRIPT FIVE +<Multi_key> <underscore> <6> : "₆" U2086 # SUBSCRIPT SIX +<Multi_key> <underscore> <KP_6> : "₆" U2086 # SUBSCRIPT SIX +<Multi_key> <underbar> <6> : "₆" U2086 # SUBSCRIPT SIX +<Multi_key> <underbar> <KP_6> : "₆" U2086 # SUBSCRIPT SIX +<Multi_key> <underscore> <7> : "₇" U2087 # SUBSCRIPT SEVEN +<Multi_key> <underscore> <KP_7> : "₇" U2087 # SUBSCRIPT SEVEN +<Multi_key> <underbar> <7> : "₇" U2087 # SUBSCRIPT SEVEN +<Multi_key> <underbar> <KP_7> : "₇" U2087 # SUBSCRIPT SEVEN +<Multi_key> <underscore> <8> : "₈" U2088 # SUBSCRIPT EIGHT +<Multi_key> <underscore> <KP_8> : "₈" U2088 # SUBSCRIPT EIGHT +<Multi_key> <underbar> <8> : "₈" U2088 # SUBSCRIPT EIGHT +<Multi_key> <underbar> <KP_8> : "₈" U2088 # SUBSCRIPT EIGHT +<Multi_key> <underscore> <9> : "₉" U2089 # SUBSCRIPT NINE +<Multi_key> <underscore> <KP_9> : "₉" U2089 # SUBSCRIPT NINE +<Multi_key> <underbar> <9> : "₉" U2089 # SUBSCRIPT NINE +<Multi_key> <underbar> <KP_9> : "₉" U2089 # SUBSCRIPT NINE +<Multi_key> <underscore> <plus> : "â‚Š" U208A # SUBSCRIPT PLUS SIGN +<Multi_key> <underscore> <KP_Add> : "â‚Š" U208A # SUBSCRIPT PLUS SIGN +<Multi_key> <underbar> <plus> : "â‚Š" U208A # SUBSCRIPT PLUS SIGN +<Multi_key> <underbar> <KP_Add> : "â‚Š" U208A # SUBSCRIPT PLUS SIGN +<Multi_key> <underscore> <U2212> : "â‚‹" U208B # SUBSCRIPT MINUS +<Multi_key> <underbar> <U2212> : "â‚‹" U208B # SUBSCRIPT MINUS +<Multi_key> <underscore> <equal> : "â‚Œ" U208C # SUBSCRIPT EQUALS SIGN +<Multi_key> <underscore> <KP_Equal> : "â‚Œ" U208C # SUBSCRIPT EQUALS SIGN +<Multi_key> <underbar> <equal> : "â‚Œ" U208C # SUBSCRIPT EQUALS SIGN +<Multi_key> <underbar> <KP_Equal> : "â‚Œ" U208C # SUBSCRIPT EQUALS SIGN +<Multi_key> <underscore> <parenleft> : "â‚" U208D # SUBSCRIPT LEFT PARENTHESIS +<Multi_key> <underbar> <parenleft> : "â‚" U208D # SUBSCRIPT LEFT PARENTHESIS +<Multi_key> <underscore> <parenright> : "â‚Ž" U208E # SUBSCRIPT RIGHT PARENTHESIS +<Multi_key> <underbar> <parenright> : "â‚Ž" U208E # SUBSCRIPT RIGHT PARENTHESIS +<dead_circumflex> <Multi_key> <S> <M> : "â„ " U2120 # SERVICE MARK +<Multi_key> <asciicircum> <S> <M> : "â„ " U2120 # SERVICE MARK +<dead_circumflex> <Multi_key> <T> <M> : "â„¢" U2122 # TRADE MARK SIGN +<Multi_key> <asciicircum> <T> <M> : "â„¢" U2122 # TRADE MARK SIGN +<Multi_key> <slash> <leftarrow> : "↚" U219A # LEFTWARDS ARROW WITH STROKE +<Multi_key> <KP_Divide> <leftarrow> : "↚" U219A # LEFTWARDS ARROW WITH STROKE +<Multi_key> <slash> <rightarrow> : "↛" U219B # RIGHTWARDS ARROW WITH STROKE +<Multi_key> <KP_Divide> <rightarrow> : "↛" U219B # RIGHTWARDS ARROW WITH STROKE +<Multi_key> <slash> <U2194> : "↮" U21AE # LEFT RIGHT ARROW WITH STROKE +<Multi_key> <KP_Divide> <U2194> : "↮" U21AE # LEFT RIGHT ARROW WITH STROKE +<Multi_key> <U2203> <U0338> : "∄" U2204 # THERE DOES NOT EXIST +<Multi_key> <U2208> <U0338> : "∉" U2209 # NOT AN ELEMENT OF +<Multi_key> <U220b> <U0338> : "∌" U220C # DOES NOT CONTAIN AS MEMBER +<Multi_key> <U2223> <U0338> : "∤" U2224 # DOES NOT DIVIDE +<Multi_key> <U2225> <U0338> : "∦" U2226 # NOT PARALLEL TO +<Multi_key> <U223c> <U0338> : "â‰" U2241 # NOT TILDE +<Multi_key> <U2243> <U0338> : "≄" U2244 # NOT ASYMPTOTICALLY EQUAL TO +<Multi_key> <approximate> <U0338> : "≇" U2247 # NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO +<Multi_key> <U2248> <U0338> : "≉" U2249 # NOT ALMOST EQUAL TO +<Multi_key> <equal> <U0338> : "≠" U2260 # NOT EQUAL TO +<Multi_key> <KP_Equal> <U0338> : "≠" U2260 # NOT EQUAL TO +<Multi_key> <identical> <U0338> : "≢" U2262 # NOT IDENTICAL TO +<Multi_key> <U224d> <U0338> : "≭" U226D # NOT EQUIVALENT TO +<Multi_key> <less> <U0338> : "≮" U226E # NOT LESS-THAN +<Multi_key> <leftcaret> <U0338> : "≮" U226E # NOT LESS-THAN +<Multi_key> <greater> <U0338> : "≯" U226F # NOT GREATER-THAN +<Multi_key> <rightcaret> <U0338> : "≯" U226F # NOT GREATER-THAN +<Multi_key> <lessthanequal> <U0338> : "≰" U2270 # NEITHER LESS-THAN NOR EQUAL TO +<Multi_key> <greaterthanequal> <U0338> : "≱" U2271 # NEITHER GREATER-THAN NOR EQUAL TO +<Multi_key> <U2272> <U0338> : "≴" U2274 # NEITHER LESS-THAN NOR EQUIVALENT TO +<Multi_key> <U2273> <U0338> : "≵" U2275 # NEITHER GREATER-THAN NOR EQUIVALENT TO +<Multi_key> <U2276> <U0338> : "≸" U2278 # NEITHER LESS-THAN NOR GREATER-THAN +<Multi_key> <U2277> <U0338> : "≹" U2279 # NEITHER GREATER-THAN NOR LESS-THAN +<Multi_key> <U227a> <U0338> : "⊀" U2280 # DOES NOT PRECEDE +<Multi_key> <U227b> <U0338> : "âŠ" U2281 # DOES NOT SUCCEED +<Multi_key> <includedin> <U0338> : "⊄" U2284 # NOT A SUBSET OF +<Multi_key> <leftshoe> <U0338> : "⊄" U2284 # NOT A SUBSET OF +<Multi_key> <includes> <U0338> : "⊅" U2285 # NOT A SUPERSET OF +<Multi_key> <rightshoe> <U0338> : "⊅" U2285 # NOT A SUPERSET OF +<Multi_key> <U2286> <U0338> : "⊈" U2288 # NEITHER A SUBSET OF NOR EQUAL TO +<Multi_key> <U2287> <U0338> : "⊉" U2289 # NEITHER A SUPERSET OF NOR EQUAL TO +<Multi_key> <righttack> <U0338> : "⊬" U22AC # DOES NOT PROVE +<Multi_key> <U22a8> <U0338> : "⊭" U22AD # NOT TRUE +<Multi_key> <U22a9> <U0338> : "⊮" U22AE # DOES NOT FORCE +<Multi_key> <U22ab> <U0338> : "⊯" U22AF # NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE +<Multi_key> <U227c> <U0338> : "â‹ " U22E0 # DOES NOT PRECEDE OR EQUAL +<Multi_key> <U227d> <U0338> : "â‹¡" U22E1 # DOES NOT SUCCEED OR EQUAL +<Multi_key> <U2291> <U0338> : "â‹¢" U22E2 # NOT SQUARE IMAGE OF OR EQUAL TO +<Multi_key> <U2292> <U0338> : "â‹£" U22E3 # NOT SQUARE ORIGINAL OF OR EQUAL TO +<Multi_key> <U22b2> <U0338> : "⋪" U22EA # NOT NORMAL SUBGROUP OF +<Multi_key> <U22b3> <U0338> : "â‹«" U22EB # DOES NOT CONTAIN AS NORMAL SUBGROUP +<Multi_key> <U22b4> <U0338> : "⋬" U22EC # NOT NORMAL SUBGROUP OF OR EQUAL TO +<Multi_key> <U22b5> <U0338> : "â‹­" U22ED # DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL +<Multi_key> <parenleft> <1> <parenright> : "â‘ " U2460 # CIRCLED DIGIT ONE +<Multi_key> <parenleft> <KP_1> <parenright> : "â‘ " U2460 # CIRCLED DIGIT ONE +<Multi_key> <parenleft> <2> <parenright> : "â‘¡" U2461 # CIRCLED DIGIT TWO +<Multi_key> <parenleft> <KP_Space> <parenright> : "â‘¡" U2461 # CIRCLED DIGIT TWO +<Multi_key> <parenleft> <KP_2> <parenright> : "â‘¡" U2461 # CIRCLED DIGIT TWO +<Multi_key> <parenleft> <3> <parenright> : "â‘¢" U2462 # CIRCLED DIGIT THREE +<Multi_key> <parenleft> <KP_3> <parenright> : "â‘¢" U2462 # CIRCLED DIGIT THREE +<Multi_key> <parenleft> <4> <parenright> : "â‘£" U2463 # CIRCLED DIGIT FOUR +<Multi_key> <parenleft> <KP_4> <parenright> : "â‘£" U2463 # CIRCLED DIGIT FOUR +<Multi_key> <parenleft> <5> <parenright> : "⑤" U2464 # CIRCLED DIGIT FIVE +<Multi_key> <parenleft> <KP_5> <parenright> : "⑤" U2464 # CIRCLED DIGIT FIVE +<Multi_key> <parenleft> <6> <parenright> : "â‘¥" U2465 # CIRCLED DIGIT SIX +<Multi_key> <parenleft> <KP_6> <parenright> : "â‘¥" U2465 # CIRCLED DIGIT SIX +<Multi_key> <parenleft> <7> <parenright> : "⑦" U2466 # CIRCLED DIGIT SEVEN +<Multi_key> <parenleft> <KP_7> <parenright> : "⑦" U2466 # CIRCLED DIGIT SEVEN +<Multi_key> <parenleft> <8> <parenright> : "⑧" U2467 # CIRCLED DIGIT EIGHT +<Multi_key> <parenleft> <KP_8> <parenright> : "⑧" U2467 # CIRCLED DIGIT EIGHT +<Multi_key> <parenleft> <9> <parenright> : "⑨" U2468 # CIRCLED DIGIT NINE +<Multi_key> <parenleft> <KP_9> <parenright> : "⑨" U2468 # CIRCLED DIGIT NINE +<Multi_key> <parenleft> <1> <0> <parenright> : "â‘©" U2469 # CIRCLED NUMBER TEN +<Multi_key> <parenleft> <1> <KP_0> <parenright> : "â‘©" U2469 # CIRCLED NUMBER TEN +<Multi_key> <parenleft> <KP_1> <0> <parenright> : "â‘©" U2469 # CIRCLED NUMBER TEN +<Multi_key> <parenleft> <KP_1> <KP_0> <parenright> : "â‘©" U2469 # CIRCLED NUMBER TEN +<Multi_key> <parenleft> <1> <1> <parenright> : "⑪" U246A # CIRCLED NUMBER ELEVEN +<Multi_key> <parenleft> <1> <KP_1> <parenright> : "⑪" U246A # CIRCLED NUMBER ELEVEN +<Multi_key> <parenleft> <KP_1> <1> <parenright> : "⑪" U246A # CIRCLED NUMBER ELEVEN +<Multi_key> <parenleft> <KP_1> <KP_1> <parenright> : "⑪" U246A # CIRCLED NUMBER ELEVEN +<Multi_key> <parenleft> <1> <2> <parenright> : "â‘«" U246B # CIRCLED NUMBER TWELVE +<Multi_key> <parenleft> <1> <KP_Space> <parenright> : "â‘«" U246B # CIRCLED NUMBER TWELVE +<Multi_key> <parenleft> <1> <KP_2> <parenright> : "â‘«" U246B # CIRCLED NUMBER TWELVE +<Multi_key> <parenleft> <KP_1> <2> <parenright> : "â‘«" U246B # CIRCLED NUMBER TWELVE +<Multi_key> <parenleft> <KP_1> <KP_Space> <parenright> : "â‘«" U246B # CIRCLED NUMBER TWELVE +<Multi_key> <parenleft> <KP_1> <KP_2> <parenright> : "â‘«" U246B # CIRCLED NUMBER TWELVE +<Multi_key> <parenleft> <1> <3> <parenright> : "⑬" U246C # CIRCLED NUMBER THIRTEEN +<Multi_key> <parenleft> <1> <KP_3> <parenright> : "⑬" U246C # CIRCLED NUMBER THIRTEEN +<Multi_key> <parenleft> <KP_1> <3> <parenright> : "⑬" U246C # CIRCLED NUMBER THIRTEEN +<Multi_key> <parenleft> <KP_1> <KP_3> <parenright> : "⑬" U246C # CIRCLED NUMBER THIRTEEN +<Multi_key> <parenleft> <1> <4> <parenright> : "â‘­" U246D # CIRCLED NUMBER FOURTEEN +<Multi_key> <parenleft> <1> <KP_4> <parenright> : "â‘­" U246D # CIRCLED NUMBER FOURTEEN +<Multi_key> <parenleft> <KP_1> <4> <parenright> : "â‘­" U246D # CIRCLED NUMBER FOURTEEN +<Multi_key> <parenleft> <KP_1> <KP_4> <parenright> : "â‘­" U246D # CIRCLED NUMBER FOURTEEN +<Multi_key> <parenleft> <1> <5> <parenright> : "â‘®" U246E # CIRCLED NUMBER FIFTEEN +<Multi_key> <parenleft> <1> <KP_5> <parenright> : "â‘®" U246E # CIRCLED NUMBER FIFTEEN +<Multi_key> <parenleft> <KP_1> <5> <parenright> : "â‘®" U246E # CIRCLED NUMBER FIFTEEN +<Multi_key> <parenleft> <KP_1> <KP_5> <parenright> : "â‘®" U246E # CIRCLED NUMBER FIFTEEN +<Multi_key> <parenleft> <1> <6> <parenright> : "⑯" U246F # CIRCLED NUMBER SIXTEEN +<Multi_key> <parenleft> <1> <KP_6> <parenright> : "⑯" U246F # CIRCLED NUMBER SIXTEEN +<Multi_key> <parenleft> <KP_1> <6> <parenright> : "⑯" U246F # CIRCLED NUMBER SIXTEEN +<Multi_key> <parenleft> <KP_1> <KP_6> <parenright> : "⑯" U246F # CIRCLED NUMBER SIXTEEN +<Multi_key> <parenleft> <1> <7> <parenright> : "â‘°" U2470 # CIRCLED NUMBER SEVENTEEN +<Multi_key> <parenleft> <1> <KP_7> <parenright> : "â‘°" U2470 # CIRCLED NUMBER SEVENTEEN +<Multi_key> <parenleft> <KP_1> <7> <parenright> : "â‘°" U2470 # CIRCLED NUMBER SEVENTEEN +<Multi_key> <parenleft> <KP_1> <KP_7> <parenright> : "â‘°" U2470 # CIRCLED NUMBER SEVENTEEN +<Multi_key> <parenleft> <1> <8> <parenright> : "⑱" U2471 # CIRCLED NUMBER EIGHTEEN +<Multi_key> <parenleft> <1> <KP_8> <parenright> : "⑱" U2471 # CIRCLED NUMBER EIGHTEEN +<Multi_key> <parenleft> <KP_1> <8> <parenright> : "⑱" U2471 # CIRCLED NUMBER EIGHTEEN +<Multi_key> <parenleft> <KP_1> <KP_8> <parenright> : "⑱" U2471 # CIRCLED NUMBER EIGHTEEN +<Multi_key> <parenleft> <1> <9> <parenright> : "⑲" U2472 # CIRCLED NUMBER NINETEEN +<Multi_key> <parenleft> <1> <KP_9> <parenright> : "⑲" U2472 # CIRCLED NUMBER NINETEEN +<Multi_key> <parenleft> <KP_1> <9> <parenright> : "⑲" U2472 # CIRCLED NUMBER NINETEEN +<Multi_key> <parenleft> <KP_1> <KP_9> <parenright> : "⑲" U2472 # CIRCLED NUMBER NINETEEN +<Multi_key> <parenleft> <2> <0> <parenright> : "⑳" U2473 # CIRCLED NUMBER TWENTY +<Multi_key> <parenleft> <2> <KP_0> <parenright> : "⑳" U2473 # CIRCLED NUMBER TWENTY +<Multi_key> <parenleft> <KP_Space> <0> <parenright> : "⑳" U2473 # CIRCLED NUMBER TWENTY +<Multi_key> <parenleft> <KP_Space> <KP_0> <parenright> : "⑳" U2473 # CIRCLED NUMBER TWENTY +<Multi_key> <parenleft> <KP_2> <0> <parenright> : "⑳" U2473 # CIRCLED NUMBER TWENTY +<Multi_key> <parenleft> <KP_2> <KP_0> <parenright> : "⑳" U2473 # CIRCLED NUMBER TWENTY +<Multi_key> <parenleft> <A> <parenright> : "â’¶" U24B6 # CIRCLED LATIN CAPITAL LETTER A +<Multi_key> <parenleft> <B> <parenright> : "â’·" U24B7 # CIRCLED LATIN CAPITAL LETTER B +<Multi_key> <parenleft> <C> <parenright> : "â’¸" U24B8 # CIRCLED LATIN CAPITAL LETTER C +<Multi_key> <parenleft> <D> <parenright> : "â’¹" U24B9 # CIRCLED LATIN CAPITAL LETTER D +<Multi_key> <parenleft> <E> <parenright> : "â’º" U24BA # CIRCLED LATIN CAPITAL LETTER E +<Multi_key> <parenleft> <F> <parenright> : "â’»" U24BB # CIRCLED LATIN CAPITAL LETTER F +<Multi_key> <parenleft> <G> <parenright> : "â’¼" U24BC # CIRCLED LATIN CAPITAL LETTER G +<Multi_key> <parenleft> <H> <parenright> : "â’½" U24BD # CIRCLED LATIN CAPITAL LETTER H +<Multi_key> <parenleft> <I> <parenright> : "â’¾" U24BE # CIRCLED LATIN CAPITAL LETTER I +<Multi_key> <parenleft> <J> <parenright> : "â’¿" U24BF # CIRCLED LATIN CAPITAL LETTER J +<Multi_key> <parenleft> <K> <parenright> : "â“€" U24C0 # CIRCLED LATIN CAPITAL LETTER K +<Multi_key> <parenleft> <L> <parenright> : "â“" U24C1 # CIRCLED LATIN CAPITAL LETTER L +<Multi_key> <parenleft> <M> <parenright> : "â“‚" U24C2 # CIRCLED LATIN CAPITAL LETTER M +<Multi_key> <parenleft> <N> <parenright> : "Ⓝ" U24C3 # CIRCLED LATIN CAPITAL LETTER N +<Multi_key> <parenleft> <O> <parenright> : "â“„" U24C4 # CIRCLED LATIN CAPITAL LETTER O +<Multi_key> <parenleft> <P> <parenright> : "â“…" U24C5 # CIRCLED LATIN CAPITAL LETTER P +<Multi_key> <parenleft> <Q> <parenright> : "Ⓠ" U24C6 # CIRCLED LATIN CAPITAL LETTER Q +<Multi_key> <parenleft> <R> <parenright> : "Ⓡ" U24C7 # CIRCLED LATIN CAPITAL LETTER R +<Multi_key> <parenleft> <S> <parenright> : "Ⓢ" U24C8 # CIRCLED LATIN CAPITAL LETTER S +<Multi_key> <parenleft> <T> <parenright> : "Ⓣ" U24C9 # CIRCLED LATIN CAPITAL LETTER T +<Multi_key> <parenleft> <U> <parenright> : "â“Š" U24CA # CIRCLED LATIN CAPITAL LETTER U +<Multi_key> <parenleft> <V> <parenright> : "â“‹" U24CB # CIRCLED LATIN CAPITAL LETTER V +<Multi_key> <parenleft> <W> <parenright> : "â“Œ" U24CC # CIRCLED LATIN CAPITAL LETTER W +<Multi_key> <parenleft> <X> <parenright> : "â“" U24CD # CIRCLED LATIN CAPITAL LETTER X +<Multi_key> <parenleft> <Y> <parenright> : "â“Ž" U24CE # CIRCLED LATIN CAPITAL LETTER Y +<Multi_key> <parenleft> <Z> <parenright> : "â“" U24CF # CIRCLED LATIN CAPITAL LETTER Z +<Multi_key> <parenleft> <a> <parenright> : "â“" U24D0 # CIRCLED LATIN SMALL LETTER A +<Multi_key> <parenleft> <b> <parenright> : "â“‘" U24D1 # CIRCLED LATIN SMALL LETTER B +<Multi_key> <parenleft> <c> <parenright> : "â“’" U24D2 # CIRCLED LATIN SMALL LETTER C +<Multi_key> <parenleft> <d> <parenright> : "â““" U24D3 # CIRCLED LATIN SMALL LETTER D +<Multi_key> <parenleft> <e> <parenright> : "â“”" U24D4 # CIRCLED LATIN SMALL LETTER E +<Multi_key> <parenleft> <f> <parenright> : "â“•" U24D5 # CIRCLED LATIN SMALL LETTER F +<Multi_key> <parenleft> <g> <parenright> : "â“–" U24D6 # CIRCLED LATIN SMALL LETTER G +<Multi_key> <parenleft> <h> <parenright> : "â“—" U24D7 # CIRCLED LATIN SMALL LETTER H +<Multi_key> <parenleft> <i> <parenright> : "ⓘ" U24D8 # CIRCLED LATIN SMALL LETTER I +<Multi_key> <parenleft> <j> <parenright> : "â“™" U24D9 # CIRCLED LATIN SMALL LETTER J +<Multi_key> <parenleft> <k> <parenright> : "â“š" U24DA # CIRCLED LATIN SMALL LETTER K +<Multi_key> <parenleft> <l> <parenright> : "â“›" U24DB # CIRCLED LATIN SMALL LETTER L +<Multi_key> <parenleft> <m> <parenright> : "â“œ" U24DC # CIRCLED LATIN SMALL LETTER M +<Multi_key> <parenleft> <n> <parenright> : "â“" U24DD # CIRCLED LATIN SMALL LETTER N +<Multi_key> <parenleft> <o> <parenright> : "â“ž" U24DE # CIRCLED LATIN SMALL LETTER O +<Multi_key> <parenleft> <p> <parenright> : "â“Ÿ" U24DF # CIRCLED LATIN SMALL LETTER P +<Multi_key> <parenleft> <q> <parenright> : "â“ " U24E0 # CIRCLED LATIN SMALL LETTER Q +<Multi_key> <parenleft> <r> <parenright> : "â“¡" U24E1 # CIRCLED LATIN SMALL LETTER R +<Multi_key> <parenleft> <s> <parenright> : "â“¢" U24E2 # CIRCLED LATIN SMALL LETTER S +<Multi_key> <parenleft> <t> <parenright> : "â“£" U24E3 # CIRCLED LATIN SMALL LETTER T +<Multi_key> <parenleft> <u> <parenright> : "ⓤ" U24E4 # CIRCLED LATIN SMALL LETTER U +<Multi_key> <parenleft> <v> <parenright> : "â“¥" U24E5 # CIRCLED LATIN SMALL LETTER V +<Multi_key> <parenleft> <w> <parenright> : "ⓦ" U24E6 # CIRCLED LATIN SMALL LETTER W +<Multi_key> <parenleft> <x> <parenright> : "ⓧ" U24E7 # CIRCLED LATIN SMALL LETTER X +<Multi_key> <parenleft> <y> <parenright> : "ⓨ" U24E8 # CIRCLED LATIN SMALL LETTER Y +<Multi_key> <parenleft> <z> <parenright> : "â“©" U24E9 # CIRCLED LATIN SMALL LETTER Z +<Multi_key> <parenleft> <0> <parenright> : "⓪" U24EA # CIRCLED DIGIT ZERO +<Multi_key> <parenleft> <KP_0> <parenright> : "⓪" U24EA # CIRCLED DIGIT ZERO +<Multi_key> <U2add> <U0338> : "â«œ" U2ADC # FORKING +<dead_voiced_sound> <U304b> : "ãŒ" U304C # HIRAGANA LETTER GA +<dead_voiced_sound> <U304d> : "ãŽ" U304E # HIRAGANA LETTER GI +<dead_voiced_sound> <U304f> : "ã" U3050 # HIRAGANA LETTER GU +<dead_voiced_sound> <U3051> : "ã’" U3052 # HIRAGANA LETTER GE +<dead_voiced_sound> <U3053> : "ã”" U3054 # HIRAGANA LETTER GO +<dead_voiced_sound> <U3055> : "ã–" U3056 # HIRAGANA LETTER ZA +<dead_voiced_sound> <U3057> : "ã˜" U3058 # HIRAGANA LETTER ZI +<dead_voiced_sound> <U3059> : "ãš" U305A # HIRAGANA LETTER ZU +<dead_voiced_sound> <U305b> : "ãœ" U305C # HIRAGANA LETTER ZE +<dead_voiced_sound> <U305d> : "ãž" U305E # HIRAGANA LETTER ZO +<dead_voiced_sound> <U305f> : "ã " U3060 # HIRAGANA LETTER DA +<dead_voiced_sound> <U3061> : "ã¢" U3062 # HIRAGANA LETTER DI +<dead_voiced_sound> <U3064> : "ã¥" U3065 # HIRAGANA LETTER DU +<dead_voiced_sound> <U3066> : "ã§" U3067 # HIRAGANA LETTER DE +<dead_voiced_sound> <U3068> : "ã©" U3069 # HIRAGANA LETTER DO +<dead_voiced_sound> <U306f> : "ã°" U3070 # HIRAGANA LETTER BA +<dead_semivoiced_sound> <U306f> : "ã±" U3071 # HIRAGANA LETTER PA +<dead_voiced_sound> <U3072> : "ã³" U3073 # HIRAGANA LETTER BI +<dead_semivoiced_sound> <U3072> : "ã´" U3074 # HIRAGANA LETTER PI +<dead_voiced_sound> <U3075> : "ã¶" U3076 # HIRAGANA LETTER BU +<dead_semivoiced_sound> <U3075> : "ã·" U3077 # HIRAGANA LETTER PU +<dead_voiced_sound> <U3078> : "ã¹" U3079 # HIRAGANA LETTER BE +<dead_semivoiced_sound> <U3078> : "ãº" U307A # HIRAGANA LETTER PE +<dead_voiced_sound> <U307b> : "ã¼" U307C # HIRAGANA LETTER BO +<dead_semivoiced_sound> <U307b> : "ã½" U307D # HIRAGANA LETTER PO +<dead_voiced_sound> <U3046> : "ã‚”" U3094 # HIRAGANA LETTER VU +<dead_voiced_sound> <U309d> : "ã‚ž" U309E # HIRAGANA VOICED ITERATION MARK +<dead_voiced_sound> <kana_KA> : "ガ" U30AC # KATAKANA LETTER GA +<dead_voiced_sound> <kana_KI> : "ã‚®" U30AE # KATAKANA LETTER GI +<dead_voiced_sound> <kana_KU> : "ã‚°" U30B0 # KATAKANA LETTER GU +<dead_voiced_sound> <kana_KE> : "ゲ" U30B2 # KATAKANA LETTER GE +<dead_voiced_sound> <kana_KO> : "ã‚´" U30B4 # KATAKANA LETTER GO +<dead_voiced_sound> <kana_SA> : "ザ" U30B6 # KATAKANA LETTER ZA +<dead_voiced_sound> <kana_SHI> : "ジ" U30B8 # KATAKANA LETTER ZI +<dead_voiced_sound> <kana_SU> : "ズ" U30BA # KATAKANA LETTER ZU +<dead_voiced_sound> <kana_SE> : "ゼ" U30BC # KATAKANA LETTER ZE +<dead_voiced_sound> <kana_SO> : "ゾ" U30BE # KATAKANA LETTER ZO +<dead_voiced_sound> <kana_TA> : "ダ" U30C0 # KATAKANA LETTER DA +<dead_voiced_sound> <kana_CHI> : "ヂ" U30C2 # KATAKANA LETTER DI +<dead_voiced_sound> <kana_TSU> : "ヅ" U30C5 # KATAKANA LETTER DU +<dead_voiced_sound> <kana_TE> : "デ" U30C7 # KATAKANA LETTER DE +<dead_voiced_sound> <kana_TO> : "ド" U30C9 # KATAKANA LETTER DO +<dead_voiced_sound> <kana_HA> : "ãƒ" U30D0 # KATAKANA LETTER BA +<dead_semivoiced_sound> <kana_HA> : "パ" U30D1 # KATAKANA LETTER PA +<dead_voiced_sound> <kana_HI> : "ビ" U30D3 # KATAKANA LETTER BI +<dead_semivoiced_sound> <kana_HI> : "ピ" U30D4 # KATAKANA LETTER PI +<dead_voiced_sound> <kana_FU> : "ブ" U30D6 # KATAKANA LETTER BU +<dead_semivoiced_sound> <kana_FU> : "プ" U30D7 # KATAKANA LETTER PU +<dead_voiced_sound> <kana_HE> : "ベ" U30D9 # KATAKANA LETTER BE +<dead_semivoiced_sound> <kana_HE> : "ペ" U30DA # KATAKANA LETTER PE +<dead_voiced_sound> <kana_HO> : "ボ" U30DC # KATAKANA LETTER BO +<dead_semivoiced_sound> <kana_HO> : "ãƒ" U30DD # KATAKANA LETTER PO +<dead_voiced_sound> <kana_U> : "ヴ" U30F4 # KATAKANA LETTER VU +<dead_voiced_sound> <kana_WA> : "ヷ" U30F7 # KATAKANA LETTER VA +<dead_voiced_sound> <U30f0> : "ヸ" U30F8 # KATAKANA LETTER VI +<dead_voiced_sound> <U30f1> : "ヹ" U30F9 # KATAKANA LETTER VE +<dead_voiced_sound> <kana_WO> : "ヺ" U30FA # KATAKANA LETTER VO +<dead_voiced_sound> <U30fd> : "ヾ" U30FE # KATAKANA VOICED ITERATION MARK +<dead_circumflex> <U4e00> : "㆒" U3192 # IDEOGRAPHIC ANNOTATION ONE MARK +<Multi_key> <asciicircum> <U4e00> : "㆒" U3192 # IDEOGRAPHIC ANNOTATION ONE MARK +<dead_circumflex> <U4e8c> : "㆓" U3193 # IDEOGRAPHIC ANNOTATION TWO MARK +<Multi_key> <asciicircum> <U4e8c> : "㆓" U3193 # IDEOGRAPHIC ANNOTATION TWO MARK +<dead_circumflex> <U4e09> : "㆔" U3194 # IDEOGRAPHIC ANNOTATION THREE MARK +<Multi_key> <asciicircum> <U4e09> : "㆔" U3194 # IDEOGRAPHIC ANNOTATION THREE MARK +<dead_circumflex> <U56db> : "㆕" U3195 # IDEOGRAPHIC ANNOTATION FOUR MARK +<Multi_key> <asciicircum> <U56db> : "㆕" U3195 # IDEOGRAPHIC ANNOTATION FOUR MARK +<dead_circumflex> <U4e0a> : "㆖" U3196 # IDEOGRAPHIC ANNOTATION TOP MARK +<Multi_key> <asciicircum> <U4e0a> : "㆖" U3196 # IDEOGRAPHIC ANNOTATION TOP MARK +<dead_circumflex> <U4e2d> : "㆗" U3197 # IDEOGRAPHIC ANNOTATION MIDDLE MARK +<Multi_key> <asciicircum> <U4e2d> : "㆗" U3197 # IDEOGRAPHIC ANNOTATION MIDDLE MARK +<dead_circumflex> <U4e0b> : "㆘" U3198 # IDEOGRAPHIC ANNOTATION BOTTOM MARK +<Multi_key> <asciicircum> <U4e0b> : "㆘" U3198 # IDEOGRAPHIC ANNOTATION BOTTOM MARK +<dead_circumflex> <U7532> : "㆙" U3199 # IDEOGRAPHIC ANNOTATION FIRST MARK +<Multi_key> <asciicircum> <U7532> : "㆙" U3199 # IDEOGRAPHIC ANNOTATION FIRST MARK +<dead_circumflex> <U4e59> : "㆚" U319A # IDEOGRAPHIC ANNOTATION SECOND MARK +<Multi_key> <asciicircum> <U4e59> : "㆚" U319A # IDEOGRAPHIC ANNOTATION SECOND MARK +<dead_circumflex> <U4e19> : "㆛" U319B # IDEOGRAPHIC ANNOTATION THIRD MARK +<Multi_key> <asciicircum> <U4e19> : "㆛" U319B # IDEOGRAPHIC ANNOTATION THIRD MARK +<dead_circumflex> <U4e01> : "㆜" U319C # IDEOGRAPHIC ANNOTATION FOURTH MARK +<Multi_key> <asciicircum> <U4e01> : "㆜" U319C # IDEOGRAPHIC ANNOTATION FOURTH MARK +<dead_circumflex> <U5929> : "ã†" U319D # IDEOGRAPHIC ANNOTATION HEAVEN MARK +<Multi_key> <asciicircum> <U5929> : "ã†" U319D # IDEOGRAPHIC ANNOTATION HEAVEN MARK +<dead_circumflex> <U5730> : "㆞" U319E # IDEOGRAPHIC ANNOTATION EARTH MARK +<Multi_key> <asciicircum> <U5730> : "㆞" U319E # IDEOGRAPHIC ANNOTATION EARTH MARK +<dead_circumflex> <U4eba> : "㆟" U319F # IDEOGRAPHIC ANNOTATION MAN MARK +<Multi_key> <asciicircum> <U4eba> : "㆟" U319F # IDEOGRAPHIC ANNOTATION MAN MARK +<Multi_key> <parenleft> <2> <1> <parenright> : "㉑" U3251 # CIRCLED NUMBER TWENTY ONE +<Multi_key> <parenleft> <2> <KP_1> <parenright> : "㉑" U3251 # CIRCLED NUMBER TWENTY ONE +<Multi_key> <parenleft> <KP_Space> <1> <parenright> : "㉑" U3251 # CIRCLED NUMBER TWENTY ONE +<Multi_key> <parenleft> <KP_Space> <KP_1> <parenright> : "㉑" U3251 # CIRCLED NUMBER TWENTY ONE +<Multi_key> <parenleft> <KP_2> <1> <parenright> : "㉑" U3251 # CIRCLED NUMBER TWENTY ONE +<Multi_key> <parenleft> <KP_2> <KP_1> <parenright> : "㉑" U3251 # CIRCLED NUMBER TWENTY ONE +<Multi_key> <parenleft> <2> <2> <parenright> : "㉒" U3252 # CIRCLED NUMBER TWENTY TWO +<Multi_key> <parenleft> <2> <KP_Space> <parenright> : "㉒" U3252 # CIRCLED NUMBER TWENTY TWO +<Multi_key> <parenleft> <2> <KP_2> <parenright> : "㉒" U3252 # CIRCLED NUMBER TWENTY TWO +<Multi_key> <parenleft> <KP_Space> <2> <parenright> : "㉒" U3252 # CIRCLED NUMBER TWENTY TWO +<Multi_key> <parenleft> <KP_Space> <KP_Space> <parenright> : "㉒" U3252 # CIRCLED NUMBER TWENTY TWO +<Multi_key> <parenleft> <KP_Space> <KP_2> <parenright> : "㉒" U3252 # CIRCLED NUMBER TWENTY TWO +<Multi_key> <parenleft> <KP_2> <2> <parenright> : "㉒" U3252 # CIRCLED NUMBER TWENTY TWO +<Multi_key> <parenleft> <KP_2> <KP_Space> <parenright> : "㉒" U3252 # CIRCLED NUMBER TWENTY TWO +<Multi_key> <parenleft> <KP_2> <KP_2> <parenright> : "㉒" U3252 # CIRCLED NUMBER TWENTY TWO +<Multi_key> <parenleft> <2> <3> <parenright> : "㉓" U3253 # CIRCLED NUMBER TWENTY THREE +<Multi_key> <parenleft> <2> <KP_3> <parenright> : "㉓" U3253 # CIRCLED NUMBER TWENTY THREE +<Multi_key> <parenleft> <KP_Space> <3> <parenright> : "㉓" U3253 # CIRCLED NUMBER TWENTY THREE +<Multi_key> <parenleft> <KP_Space> <KP_3> <parenright> : "㉓" U3253 # CIRCLED NUMBER TWENTY THREE +<Multi_key> <parenleft> <KP_2> <3> <parenright> : "㉓" U3253 # CIRCLED NUMBER TWENTY THREE +<Multi_key> <parenleft> <KP_2> <KP_3> <parenright> : "㉓" U3253 # CIRCLED NUMBER TWENTY THREE +<Multi_key> <parenleft> <2> <4> <parenright> : "㉔" U3254 # CIRCLED NUMBER TWENTY FOUR +<Multi_key> <parenleft> <2> <KP_4> <parenright> : "㉔" U3254 # CIRCLED NUMBER TWENTY FOUR +<Multi_key> <parenleft> <KP_Space> <4> <parenright> : "㉔" U3254 # CIRCLED NUMBER TWENTY FOUR +<Multi_key> <parenleft> <KP_Space> <KP_4> <parenright> : "㉔" U3254 # CIRCLED NUMBER TWENTY FOUR +<Multi_key> <parenleft> <KP_2> <4> <parenright> : "㉔" U3254 # CIRCLED NUMBER TWENTY FOUR +<Multi_key> <parenleft> <KP_2> <KP_4> <parenright> : "㉔" U3254 # CIRCLED NUMBER TWENTY FOUR +<Multi_key> <parenleft> <2> <5> <parenright> : "㉕" U3255 # CIRCLED NUMBER TWENTY FIVE +<Multi_key> <parenleft> <2> <KP_5> <parenright> : "㉕" U3255 # CIRCLED NUMBER TWENTY FIVE +<Multi_key> <parenleft> <KP_Space> <5> <parenright> : "㉕" U3255 # CIRCLED NUMBER TWENTY FIVE +<Multi_key> <parenleft> <KP_Space> <KP_5> <parenright> : "㉕" U3255 # CIRCLED NUMBER TWENTY FIVE +<Multi_key> <parenleft> <KP_2> <5> <parenright> : "㉕" U3255 # CIRCLED NUMBER TWENTY FIVE +<Multi_key> <parenleft> <KP_2> <KP_5> <parenright> : "㉕" U3255 # CIRCLED NUMBER TWENTY FIVE +<Multi_key> <parenleft> <2> <6> <parenright> : "㉖" U3256 # CIRCLED NUMBER TWENTY SIX +<Multi_key> <parenleft> <2> <KP_6> <parenright> : "㉖" U3256 # CIRCLED NUMBER TWENTY SIX +<Multi_key> <parenleft> <KP_Space> <6> <parenright> : "㉖" U3256 # CIRCLED NUMBER TWENTY SIX +<Multi_key> <parenleft> <KP_Space> <KP_6> <parenright> : "㉖" U3256 # CIRCLED NUMBER TWENTY SIX +<Multi_key> <parenleft> <KP_2> <6> <parenright> : "㉖" U3256 # CIRCLED NUMBER TWENTY SIX +<Multi_key> <parenleft> <KP_2> <KP_6> <parenright> : "㉖" U3256 # CIRCLED NUMBER TWENTY SIX +<Multi_key> <parenleft> <2> <7> <parenright> : "㉗" U3257 # CIRCLED NUMBER TWENTY SEVEN +<Multi_key> <parenleft> <2> <KP_7> <parenright> : "㉗" U3257 # CIRCLED NUMBER TWENTY SEVEN +<Multi_key> <parenleft> <KP_Space> <7> <parenright> : "㉗" U3257 # CIRCLED NUMBER TWENTY SEVEN +<Multi_key> <parenleft> <KP_Space> <KP_7> <parenright> : "㉗" U3257 # CIRCLED NUMBER TWENTY SEVEN +<Multi_key> <parenleft> <KP_2> <7> <parenright> : "㉗" U3257 # CIRCLED NUMBER TWENTY SEVEN +<Multi_key> <parenleft> <KP_2> <KP_7> <parenright> : "㉗" U3257 # CIRCLED NUMBER TWENTY SEVEN +<Multi_key> <parenleft> <2> <8> <parenright> : "㉘" U3258 # CIRCLED NUMBER TWENTY EIGHT +<Multi_key> <parenleft> <2> <KP_8> <parenright> : "㉘" U3258 # CIRCLED NUMBER TWENTY EIGHT +<Multi_key> <parenleft> <KP_Space> <8> <parenright> : "㉘" U3258 # CIRCLED NUMBER TWENTY EIGHT +<Multi_key> <parenleft> <KP_Space> <KP_8> <parenright> : "㉘" U3258 # CIRCLED NUMBER TWENTY EIGHT +<Multi_key> <parenleft> <KP_2> <8> <parenright> : "㉘" U3258 # CIRCLED NUMBER TWENTY EIGHT +<Multi_key> <parenleft> <KP_2> <KP_8> <parenright> : "㉘" U3258 # CIRCLED NUMBER TWENTY EIGHT +<Multi_key> <parenleft> <2> <9> <parenright> : "㉙" U3259 # CIRCLED NUMBER TWENTY NINE +<Multi_key> <parenleft> <2> <KP_9> <parenright> : "㉙" U3259 # CIRCLED NUMBER TWENTY NINE +<Multi_key> <parenleft> <KP_Space> <9> <parenright> : "㉙" U3259 # CIRCLED NUMBER TWENTY NINE +<Multi_key> <parenleft> <KP_Space> <KP_9> <parenright> : "㉙" U3259 # CIRCLED NUMBER TWENTY NINE +<Multi_key> <parenleft> <KP_2> <9> <parenright> : "㉙" U3259 # CIRCLED NUMBER TWENTY NINE +<Multi_key> <parenleft> <KP_2> <KP_9> <parenright> : "㉙" U3259 # CIRCLED NUMBER TWENTY NINE +<Multi_key> <parenleft> <3> <0> <parenright> : "㉚" U325A # CIRCLED NUMBER THIRTY +<Multi_key> <parenleft> <3> <KP_0> <parenright> : "㉚" U325A # CIRCLED NUMBER THIRTY +<Multi_key> <parenleft> <KP_3> <0> <parenright> : "㉚" U325A # CIRCLED NUMBER THIRTY +<Multi_key> <parenleft> <KP_3> <KP_0> <parenright> : "㉚" U325A # CIRCLED NUMBER THIRTY +<Multi_key> <parenleft> <3> <1> <parenright> : "㉛" U325B # CIRCLED NUMBER THIRTY ONE +<Multi_key> <parenleft> <3> <KP_1> <parenright> : "㉛" U325B # CIRCLED NUMBER THIRTY ONE +<Multi_key> <parenleft> <KP_3> <1> <parenright> : "㉛" U325B # CIRCLED NUMBER THIRTY ONE +<Multi_key> <parenleft> <KP_3> <KP_1> <parenright> : "㉛" U325B # CIRCLED NUMBER THIRTY ONE +<Multi_key> <parenleft> <3> <2> <parenright> : "㉜" U325C # CIRCLED NUMBER THIRTY TWO +<Multi_key> <parenleft> <3> <KP_Space> <parenright> : "㉜" U325C # CIRCLED NUMBER THIRTY TWO +<Multi_key> <parenleft> <3> <KP_2> <parenright> : "㉜" U325C # CIRCLED NUMBER THIRTY TWO +<Multi_key> <parenleft> <KP_3> <2> <parenright> : "㉜" U325C # CIRCLED NUMBER THIRTY TWO +<Multi_key> <parenleft> <KP_3> <KP_Space> <parenright> : "㉜" U325C # CIRCLED NUMBER THIRTY TWO +<Multi_key> <parenleft> <KP_3> <KP_2> <parenright> : "㉜" U325C # CIRCLED NUMBER THIRTY TWO +<Multi_key> <parenleft> <3> <3> <parenright> : "ã‰" U325D # CIRCLED NUMBER THIRTY THREE +<Multi_key> <parenleft> <3> <KP_3> <parenright> : "ã‰" U325D # CIRCLED NUMBER THIRTY THREE +<Multi_key> <parenleft> <KP_3> <3> <parenright> : "ã‰" U325D # CIRCLED NUMBER THIRTY THREE +<Multi_key> <parenleft> <KP_3> <KP_3> <parenright> : "ã‰" U325D # CIRCLED NUMBER THIRTY THREE +<Multi_key> <parenleft> <3> <4> <parenright> : "㉞" U325E # CIRCLED NUMBER THIRTY FOUR +<Multi_key> <parenleft> <3> <KP_4> <parenright> : "㉞" U325E # CIRCLED NUMBER THIRTY FOUR +<Multi_key> <parenleft> <KP_3> <4> <parenright> : "㉞" U325E # CIRCLED NUMBER THIRTY FOUR +<Multi_key> <parenleft> <KP_3> <KP_4> <parenright> : "㉞" U325E # CIRCLED NUMBER THIRTY FOUR +<Multi_key> <parenleft> <3> <5> <parenright> : "㉟" U325F # CIRCLED NUMBER THIRTY FIVE +<Multi_key> <parenleft> <3> <KP_5> <parenright> : "㉟" U325F # CIRCLED NUMBER THIRTY FIVE +<Multi_key> <parenleft> <KP_3> <5> <parenright> : "㉟" U325F # CIRCLED NUMBER THIRTY FIVE +<Multi_key> <parenleft> <KP_3> <KP_5> <parenright> : "㉟" U325F # CIRCLED NUMBER THIRTY FIVE +<Multi_key> <parenleft> <U1100> <parenright> : "㉠" U3260 # CIRCLED HANGUL KIYEOK +<Multi_key> <parenleft> <U1102> <parenright> : "㉡" U3261 # CIRCLED HANGUL NIEUN +<Multi_key> <parenleft> <U1103> <parenright> : "㉢" U3262 # CIRCLED HANGUL TIKEUT +<Multi_key> <parenleft> <U1105> <parenright> : "㉣" U3263 # CIRCLED HANGUL RIEUL +<Multi_key> <parenleft> <U1106> <parenright> : "㉤" U3264 # CIRCLED HANGUL MIEUM +<Multi_key> <parenleft> <U1107> <parenright> : "㉥" U3265 # CIRCLED HANGUL PIEUP +<Multi_key> <parenleft> <U1109> <parenright> : "㉦" U3266 # CIRCLED HANGUL SIOS +<Multi_key> <parenleft> <U110b> <parenright> : "㉧" U3267 # CIRCLED HANGUL IEUNG +<Multi_key> <parenleft> <U110c> <parenright> : "㉨" U3268 # CIRCLED HANGUL CIEUC +<Multi_key> <parenleft> <U110e> <parenright> : "㉩" U3269 # CIRCLED HANGUL CHIEUCH +<Multi_key> <parenleft> <U110f> <parenright> : "㉪" U326A # CIRCLED HANGUL KHIEUKH +<Multi_key> <parenleft> <U1110> <parenright> : "㉫" U326B # CIRCLED HANGUL THIEUTH +<Multi_key> <parenleft> <U1111> <parenright> : "㉬" U326C # CIRCLED HANGUL PHIEUPH +<Multi_key> <parenleft> <U1112> <parenright> : "㉭" U326D # CIRCLED HANGUL HIEUH +<Multi_key> <parenleft> <U1100> <U1161> <parenright> : "㉮" U326E # CIRCLED HANGUL KIYEOK A +<Multi_key> <parenleft> <U1102> <U1161> <parenright> : "㉯" U326F # CIRCLED HANGUL NIEUN A +<Multi_key> <parenleft> <U1103> <U1161> <parenright> : "㉰" U3270 # CIRCLED HANGUL TIKEUT A +<Multi_key> <parenleft> <U1105> <U1161> <parenright> : "㉱" U3271 # CIRCLED HANGUL RIEUL A +<Multi_key> <parenleft> <U1106> <U1161> <parenright> : "㉲" U3272 # CIRCLED HANGUL MIEUM A +<Multi_key> <parenleft> <U1107> <U1161> <parenright> : "㉳" U3273 # CIRCLED HANGUL PIEUP A +<Multi_key> <parenleft> <U1109> <U1161> <parenright> : "㉴" U3274 # CIRCLED HANGUL SIOS A +<Multi_key> <parenleft> <U110b> <U1161> <parenright> : "㉵" U3275 # CIRCLED HANGUL IEUNG A +<Multi_key> <parenleft> <U110c> <U1161> <parenright> : "㉶" U3276 # CIRCLED HANGUL CIEUC A +<Multi_key> <parenleft> <U110e> <U1161> <parenright> : "㉷" U3277 # CIRCLED HANGUL CHIEUCH A +<Multi_key> <parenleft> <U110f> <U1161> <parenright> : "㉸" U3278 # CIRCLED HANGUL KHIEUKH A +<Multi_key> <parenleft> <U1110> <U1161> <parenright> : "㉹" U3279 # CIRCLED HANGUL THIEUTH A +<Multi_key> <parenleft> <U1111> <U1161> <parenright> : "㉺" U327A # CIRCLED HANGUL PHIEUPH A +<Multi_key> <parenleft> <U1112> <U1161> <parenright> : "㉻" U327B # CIRCLED HANGUL HIEUH A +<Multi_key> <parenleft> <U4e00> <parenright> : "㊀" U3280 # CIRCLED IDEOGRAPH ONE +<Multi_key> <parenleft> <U4e8c> <parenright> : "ãŠ" U3281 # CIRCLED IDEOGRAPH TWO +<Multi_key> <parenleft> <U4e09> <parenright> : "㊂" U3282 # CIRCLED IDEOGRAPH THREE +<Multi_key> <parenleft> <U56db> <parenright> : "㊃" U3283 # CIRCLED IDEOGRAPH FOUR +<Multi_key> <parenleft> <U4e94> <parenright> : "㊄" U3284 # CIRCLED IDEOGRAPH FIVE +<Multi_key> <parenleft> <U516d> <parenright> : "㊅" U3285 # CIRCLED IDEOGRAPH SIX +<Multi_key> <parenleft> <U4e03> <parenright> : "㊆" U3286 # CIRCLED IDEOGRAPH SEVEN +<Multi_key> <parenleft> <U516b> <parenright> : "㊇" U3287 # CIRCLED IDEOGRAPH EIGHT +<Multi_key> <parenleft> <U4e5d> <parenright> : "㊈" U3288 # CIRCLED IDEOGRAPH NINE +<Multi_key> <parenleft> <U5341> <parenright> : "㊉" U3289 # CIRCLED IDEOGRAPH TEN +<Multi_key> <parenleft> <U6708> <parenright> : "㊊" U328A # CIRCLED IDEOGRAPH MOON +<Multi_key> <parenleft> <U706b> <parenright> : "㊋" U328B # CIRCLED IDEOGRAPH FIRE +<Multi_key> <parenleft> <U6c34> <parenright> : "㊌" U328C # CIRCLED IDEOGRAPH WATER +<Multi_key> <parenleft> <U6728> <parenright> : "ãŠ" U328D # CIRCLED IDEOGRAPH WOOD +<Multi_key> <parenleft> <U91d1> <parenright> : "㊎" U328E # CIRCLED IDEOGRAPH METAL +<Multi_key> <parenleft> <U571f> <parenright> : "ãŠ" U328F # CIRCLED IDEOGRAPH EARTH +<Multi_key> <parenleft> <U65e5> <parenright> : "ãŠ" U3290 # CIRCLED IDEOGRAPH SUN +<Multi_key> <parenleft> <U682a> <parenright> : "㊑" U3291 # CIRCLED IDEOGRAPH STOCK +<Multi_key> <parenleft> <U6709> <parenright> : "㊒" U3292 # CIRCLED IDEOGRAPH HAVE +<Multi_key> <parenleft> <U793e> <parenright> : "㊓" U3293 # CIRCLED IDEOGRAPH SOCIETY +<Multi_key> <parenleft> <U540d> <parenright> : "㊔" U3294 # CIRCLED IDEOGRAPH NAME +<Multi_key> <parenleft> <U7279> <parenright> : "㊕" U3295 # CIRCLED IDEOGRAPH SPECIAL +<Multi_key> <parenleft> <U8ca1> <parenright> : "㊖" U3296 # CIRCLED IDEOGRAPH FINANCIAL +<Multi_key> <parenleft> <U795d> <parenright> : "㊗" U3297 # CIRCLED IDEOGRAPH CONGRATULATION +<Multi_key> <parenleft> <U52b4> <parenright> : "㊘" U3298 # CIRCLED IDEOGRAPH LABOR +<Multi_key> <parenleft> <U79d8> <parenright> : "㊙" U3299 # CIRCLED IDEOGRAPH SECRET +<Multi_key> <parenleft> <U7537> <parenright> : "㊚" U329A # CIRCLED IDEOGRAPH MALE +<Multi_key> <parenleft> <U5973> <parenright> : "㊛" U329B # CIRCLED IDEOGRAPH FEMALE +<Multi_key> <parenleft> <U9069> <parenright> : "㊜" U329C # CIRCLED IDEOGRAPH SUITABLE +<Multi_key> <parenleft> <U512a> <parenright> : "ãŠ" U329D # CIRCLED IDEOGRAPH EXCELLENT +<Multi_key> <parenleft> <U5370> <parenright> : "㊞" U329E # CIRCLED IDEOGRAPH PRINT +<Multi_key> <parenleft> <U6ce8> <parenright> : "㊟" U329F # CIRCLED IDEOGRAPH ATTENTION +<Multi_key> <parenleft> <U9805> <parenright> : "㊠" U32A0 # CIRCLED IDEOGRAPH ITEM +<Multi_key> <parenleft> <U4f11> <parenright> : "㊡" U32A1 # CIRCLED IDEOGRAPH REST +<Multi_key> <parenleft> <U5199> <parenright> : "㊢" U32A2 # CIRCLED IDEOGRAPH COPY +<Multi_key> <parenleft> <U6b63> <parenright> : "㊣" U32A3 # CIRCLED IDEOGRAPH CORRECT +<Multi_key> <parenleft> <U4e0a> <parenright> : "㊤" U32A4 # CIRCLED IDEOGRAPH HIGH +<Multi_key> <parenleft> <U4e2d> <parenright> : "㊥" U32A5 # CIRCLED IDEOGRAPH CENTRE +<Multi_key> <parenleft> <U4e0b> <parenright> : "㊦" U32A6 # CIRCLED IDEOGRAPH LOW +<Multi_key> <parenleft> <U5de6> <parenright> : "㊧" U32A7 # CIRCLED IDEOGRAPH LEFT +<Multi_key> <parenleft> <U53f3> <parenright> : "㊨" U32A8 # CIRCLED IDEOGRAPH RIGHT +<Multi_key> <parenleft> <U533b> <parenright> : "㊩" U32A9 # CIRCLED IDEOGRAPH MEDICINE +<Multi_key> <parenleft> <U5b97> <parenright> : "㊪" U32AA # CIRCLED IDEOGRAPH RELIGION +<Multi_key> <parenleft> <U5b66> <parenright> : "㊫" U32AB # CIRCLED IDEOGRAPH STUDY +<Multi_key> <parenleft> <U76e3> <parenright> : "㊬" U32AC # CIRCLED IDEOGRAPH SUPERVISE +<Multi_key> <parenleft> <U4f01> <parenright> : "㊭" U32AD # CIRCLED IDEOGRAPH ENTERPRISE +<Multi_key> <parenleft> <U8cc7> <parenright> : "㊮" U32AE # CIRCLED IDEOGRAPH RESOURCE +<Multi_key> <parenleft> <U5354> <parenright> : "㊯" U32AF # CIRCLED IDEOGRAPH ALLIANCE +<Multi_key> <parenleft> <U591c> <parenright> : "㊰" U32B0 # CIRCLED IDEOGRAPH NIGHT +<Multi_key> <parenleft> <3> <6> <parenright> : "㊱" U32B1 # CIRCLED NUMBER THIRTY SIX +<Multi_key> <parenleft> <3> <KP_6> <parenright> : "㊱" U32B1 # CIRCLED NUMBER THIRTY SIX +<Multi_key> <parenleft> <KP_3> <6> <parenright> : "㊱" U32B1 # CIRCLED NUMBER THIRTY SIX +<Multi_key> <parenleft> <KP_3> <KP_6> <parenright> : "㊱" U32B1 # CIRCLED NUMBER THIRTY SIX +<Multi_key> <parenleft> <3> <7> <parenright> : "㊲" U32B2 # CIRCLED NUMBER THIRTY SEVEN +<Multi_key> <parenleft> <3> <KP_7> <parenright> : "㊲" U32B2 # CIRCLED NUMBER THIRTY SEVEN +<Multi_key> <parenleft> <KP_3> <7> <parenright> : "㊲" U32B2 # CIRCLED NUMBER THIRTY SEVEN +<Multi_key> <parenleft> <KP_3> <KP_7> <parenright> : "㊲" U32B2 # CIRCLED NUMBER THIRTY SEVEN +<Multi_key> <parenleft> <3> <8> <parenright> : "㊳" U32B3 # CIRCLED NUMBER THIRTY EIGHT +<Multi_key> <parenleft> <3> <KP_8> <parenright> : "㊳" U32B3 # CIRCLED NUMBER THIRTY EIGHT +<Multi_key> <parenleft> <KP_3> <8> <parenright> : "㊳" U32B3 # CIRCLED NUMBER THIRTY EIGHT +<Multi_key> <parenleft> <KP_3> <KP_8> <parenright> : "㊳" U32B3 # CIRCLED NUMBER THIRTY EIGHT +<Multi_key> <parenleft> <3> <9> <parenright> : "㊴" U32B4 # CIRCLED NUMBER THIRTY NINE +<Multi_key> <parenleft> <3> <KP_9> <parenright> : "㊴" U32B4 # CIRCLED NUMBER THIRTY NINE +<Multi_key> <parenleft> <KP_3> <9> <parenright> : "㊴" U32B4 # CIRCLED NUMBER THIRTY NINE +<Multi_key> <parenleft> <KP_3> <KP_9> <parenright> : "㊴" U32B4 # CIRCLED NUMBER THIRTY NINE +<Multi_key> <parenleft> <4> <0> <parenright> : "㊵" U32B5 # CIRCLED NUMBER FORTY +<Multi_key> <parenleft> <4> <KP_0> <parenright> : "㊵" U32B5 # CIRCLED NUMBER FORTY +<Multi_key> <parenleft> <KP_4> <0> <parenright> : "㊵" U32B5 # CIRCLED NUMBER FORTY +<Multi_key> <parenleft> <KP_4> <KP_0> <parenright> : "㊵" U32B5 # CIRCLED NUMBER FORTY +<Multi_key> <parenleft> <4> <1> <parenright> : "㊶" U32B6 # CIRCLED NUMBER FORTY ONE +<Multi_key> <parenleft> <4> <KP_1> <parenright> : "㊶" U32B6 # CIRCLED NUMBER FORTY ONE +<Multi_key> <parenleft> <KP_4> <1> <parenright> : "㊶" U32B6 # CIRCLED NUMBER FORTY ONE +<Multi_key> <parenleft> <KP_4> <KP_1> <parenright> : "㊶" U32B6 # CIRCLED NUMBER FORTY ONE +<Multi_key> <parenleft> <4> <2> <parenright> : "㊷" U32B7 # CIRCLED NUMBER FORTY TWO +<Multi_key> <parenleft> <4> <KP_Space> <parenright> : "㊷" U32B7 # CIRCLED NUMBER FORTY TWO +<Multi_key> <parenleft> <4> <KP_2> <parenright> : "㊷" U32B7 # CIRCLED NUMBER FORTY TWO +<Multi_key> <parenleft> <KP_4> <2> <parenright> : "㊷" U32B7 # CIRCLED NUMBER FORTY TWO +<Multi_key> <parenleft> <KP_4> <KP_Space> <parenright> : "㊷" U32B7 # CIRCLED NUMBER FORTY TWO +<Multi_key> <parenleft> <KP_4> <KP_2> <parenright> : "㊷" U32B7 # CIRCLED NUMBER FORTY TWO +<Multi_key> <parenleft> <4> <3> <parenright> : "㊸" U32B8 # CIRCLED NUMBER FORTY THREE +<Multi_key> <parenleft> <4> <KP_3> <parenright> : "㊸" U32B8 # CIRCLED NUMBER FORTY THREE +<Multi_key> <parenleft> <KP_4> <3> <parenright> : "㊸" U32B8 # CIRCLED NUMBER FORTY THREE +<Multi_key> <parenleft> <KP_4> <KP_3> <parenright> : "㊸" U32B8 # CIRCLED NUMBER FORTY THREE +<Multi_key> <parenleft> <4> <4> <parenright> : "㊹" U32B9 # CIRCLED NUMBER FORTY FOUR +<Multi_key> <parenleft> <4> <KP_4> <parenright> : "㊹" U32B9 # CIRCLED NUMBER FORTY FOUR +<Multi_key> <parenleft> <KP_4> <4> <parenright> : "㊹" U32B9 # CIRCLED NUMBER FORTY FOUR +<Multi_key> <parenleft> <KP_4> <KP_4> <parenright> : "㊹" U32B9 # CIRCLED NUMBER FORTY FOUR +<Multi_key> <parenleft> <4> <5> <parenright> : "㊺" U32BA # CIRCLED NUMBER FORTY FIVE +<Multi_key> <parenleft> <4> <KP_5> <parenright> : "㊺" U32BA # CIRCLED NUMBER FORTY FIVE +<Multi_key> <parenleft> <KP_4> <5> <parenright> : "㊺" U32BA # CIRCLED NUMBER FORTY FIVE +<Multi_key> <parenleft> <KP_4> <KP_5> <parenright> : "㊺" U32BA # CIRCLED NUMBER FORTY FIVE +<Multi_key> <parenleft> <4> <6> <parenright> : "㊻" U32BB # CIRCLED NUMBER FORTY SIX +<Multi_key> <parenleft> <4> <KP_6> <parenright> : "㊻" U32BB # CIRCLED NUMBER FORTY SIX +<Multi_key> <parenleft> <KP_4> <6> <parenright> : "㊻" U32BB # CIRCLED NUMBER FORTY SIX +<Multi_key> <parenleft> <KP_4> <KP_6> <parenright> : "㊻" U32BB # CIRCLED NUMBER FORTY SIX +<Multi_key> <parenleft> <4> <7> <parenright> : "㊼" U32BC # CIRCLED NUMBER FORTY SEVEN +<Multi_key> <parenleft> <4> <KP_7> <parenright> : "㊼" U32BC # CIRCLED NUMBER FORTY SEVEN +<Multi_key> <parenleft> <KP_4> <7> <parenright> : "㊼" U32BC # CIRCLED NUMBER FORTY SEVEN +<Multi_key> <parenleft> <KP_4> <KP_7> <parenright> : "㊼" U32BC # CIRCLED NUMBER FORTY SEVEN +<Multi_key> <parenleft> <4> <8> <parenright> : "㊽" U32BD # CIRCLED NUMBER FORTY EIGHT +<Multi_key> <parenleft> <4> <KP_8> <parenright> : "㊽" U32BD # CIRCLED NUMBER FORTY EIGHT +<Multi_key> <parenleft> <KP_4> <8> <parenright> : "㊽" U32BD # CIRCLED NUMBER FORTY EIGHT +<Multi_key> <parenleft> <KP_4> <KP_8> <parenright> : "㊽" U32BD # CIRCLED NUMBER FORTY EIGHT +<Multi_key> <parenleft> <4> <9> <parenright> : "㊾" U32BE # CIRCLED NUMBER FORTY NINE +<Multi_key> <parenleft> <4> <KP_9> <parenright> : "㊾" U32BE # CIRCLED NUMBER FORTY NINE +<Multi_key> <parenleft> <KP_4> <9> <parenright> : "㊾" U32BE # CIRCLED NUMBER FORTY NINE +<Multi_key> <parenleft> <KP_4> <KP_9> <parenright> : "㊾" U32BE # CIRCLED NUMBER FORTY NINE +<Multi_key> <parenleft> <5> <0> <parenright> : "㊿" U32BF # CIRCLED NUMBER FIFTY +<Multi_key> <parenleft> <5> <KP_0> <parenright> : "㊿" U32BF # CIRCLED NUMBER FIFTY +<Multi_key> <parenleft> <KP_5> <0> <parenright> : "㊿" U32BF # CIRCLED NUMBER FIFTY +<Multi_key> <parenleft> <KP_5> <KP_0> <parenright> : "㊿" U32BF # CIRCLED NUMBER FIFTY +<Multi_key> <parenleft> <kana_A> <parenright> : "ã‹" U32D0 # CIRCLED KATAKANA A +<Multi_key> <parenleft> <kana_I> <parenright> : "ã‹‘" U32D1 # CIRCLED KATAKANA I +<Multi_key> <parenleft> <kana_U> <parenright> : "ã‹’" U32D2 # CIRCLED KATAKANA U +<Multi_key> <parenleft> <kana_E> <parenright> : "ã‹“" U32D3 # CIRCLED KATAKANA E +<Multi_key> <parenleft> <kana_O> <parenright> : "ã‹”" U32D4 # CIRCLED KATAKANA O +<Multi_key> <parenleft> <kana_KA> <parenright> : "ã‹•" U32D5 # CIRCLED KATAKANA KA +<Multi_key> <parenleft> <kana_KI> <parenright> : "ã‹–" U32D6 # CIRCLED KATAKANA KI +<Multi_key> <parenleft> <kana_KU> <parenright> : "ã‹—" U32D7 # CIRCLED KATAKANA KU +<Multi_key> <parenleft> <kana_KE> <parenright> : "㋘" U32D8 # CIRCLED KATAKANA KE +<Multi_key> <parenleft> <kana_KO> <parenright> : "ã‹™" U32D9 # CIRCLED KATAKANA KO +<Multi_key> <parenleft> <kana_SA> <parenright> : "ã‹š" U32DA # CIRCLED KATAKANA SA +<Multi_key> <parenleft> <kana_SHI> <parenright> : "ã‹›" U32DB # CIRCLED KATAKANA SI +<Multi_key> <parenleft> <kana_SU> <parenright> : "ã‹œ" U32DC # CIRCLED KATAKANA SU +<Multi_key> <parenleft> <kana_SE> <parenright> : "ã‹" U32DD # CIRCLED KATAKANA SE +<Multi_key> <parenleft> <kana_SO> <parenright> : "ã‹ž" U32DE # CIRCLED KATAKANA SO +<Multi_key> <parenleft> <kana_TA> <parenright> : "ã‹Ÿ" U32DF # CIRCLED KATAKANA TA +<Multi_key> <parenleft> <kana_CHI> <parenright> : "ã‹ " U32E0 # CIRCLED KATAKANA TI +<Multi_key> <parenleft> <kana_TSU> <parenright> : "ã‹¡" U32E1 # CIRCLED KATAKANA TU +<Multi_key> <parenleft> <kana_TE> <parenright> : "ã‹¢" U32E2 # CIRCLED KATAKANA TE +<Multi_key> <parenleft> <kana_TO> <parenright> : "ã‹£" U32E3 # CIRCLED KATAKANA TO +<Multi_key> <parenleft> <kana_NA> <parenright> : "㋤" U32E4 # CIRCLED KATAKANA NA +<Multi_key> <parenleft> <kana_NI> <parenright> : "ã‹¥" U32E5 # CIRCLED KATAKANA NI +<Multi_key> <parenleft> <kana_NU> <parenright> : "㋦" U32E6 # CIRCLED KATAKANA NU +<Multi_key> <parenleft> <kana_NE> <parenright> : "㋧" U32E7 # CIRCLED KATAKANA NE +<Multi_key> <parenleft> <kana_NO> <parenright> : "㋨" U32E8 # CIRCLED KATAKANA NO +<Multi_key> <parenleft> <kana_HA> <parenright> : "ã‹©" U32E9 # CIRCLED KATAKANA HA +<Multi_key> <parenleft> <kana_HI> <parenright> : "㋪" U32EA # CIRCLED KATAKANA HI +<Multi_key> <parenleft> <kana_FU> <parenright> : "ã‹«" U32EB # CIRCLED KATAKANA HU +<Multi_key> <parenleft> <kana_HE> <parenright> : "㋬" U32EC # CIRCLED KATAKANA HE +<Multi_key> <parenleft> <kana_HO> <parenright> : "ã‹­" U32ED # CIRCLED KATAKANA HO +<Multi_key> <parenleft> <kana_MA> <parenright> : "ã‹®" U32EE # CIRCLED KATAKANA MA +<Multi_key> <parenleft> <kana_MI> <parenright> : "㋯" U32EF # CIRCLED KATAKANA MI +<Multi_key> <parenleft> <kana_MU> <parenright> : "ã‹°" U32F0 # CIRCLED KATAKANA MU +<Multi_key> <parenleft> <kana_ME> <parenright> : "㋱" U32F1 # CIRCLED KATAKANA ME +<Multi_key> <parenleft> <kana_MO> <parenright> : "㋲" U32F2 # CIRCLED KATAKANA MO +<Multi_key> <parenleft> <kana_YA> <parenright> : "㋳" U32F3 # CIRCLED KATAKANA YA +<Multi_key> <parenleft> <kana_YU> <parenright> : "ã‹´" U32F4 # CIRCLED KATAKANA YU +<Multi_key> <parenleft> <kana_YO> <parenright> : "㋵" U32F5 # CIRCLED KATAKANA YO +<Multi_key> <parenleft> <kana_RA> <parenright> : "㋶" U32F6 # CIRCLED KATAKANA RA +<Multi_key> <parenleft> <kana_RI> <parenright> : "ã‹·" U32F7 # CIRCLED KATAKANA RI +<Multi_key> <parenleft> <kana_RU> <parenright> : "㋸" U32F8 # CIRCLED KATAKANA RU +<Multi_key> <parenleft> <kana_RE> <parenright> : "㋹" U32F9 # CIRCLED KATAKANA RE +<Multi_key> <parenleft> <kana_RO> <parenright> : "㋺" U32FA # CIRCLED KATAKANA RO +<Multi_key> <parenleft> <kana_WA> <parenright> : "ã‹»" U32FB # CIRCLED KATAKANA WA +<Multi_key> <parenleft> <U30f0> <parenright> : "㋼" U32FC # CIRCLED KATAKANA WI +<Multi_key> <parenleft> <U30f1> <parenright> : "㋽" U32FD # CIRCLED KATAKANA WE +<Multi_key> <parenleft> <kana_WO> <parenright> : "㋾" U32FE # CIRCLED KATAKANA WO +<Multi_key> <U05b4> <hebrew_yod> : "ï¬" UFB1D # HEBREW LETTER YOD WITH HIRIQ +<Multi_key> <U05b7> <U05f2> : "ײַ" UFB1F # HEBREW LIGATURE YIDDISH YOD YOD PATAH +<Multi_key> <U05c1> <hebrew_shin> : "שׁ" UFB2A # HEBREW LETTER SHIN WITH SHIN DOT +<Multi_key> <U05c2> <hebrew_shin> : "שׂ" UFB2B # HEBREW LETTER SHIN WITH SIN DOT +<Multi_key> <U05c1> <Ufb49> : "שּׁ" UFB2C # HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT +<Multi_key> <U05c1> <U05bc> <hebrew_shin> : "שּׁ" UFB2C # HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT +<Multi_key> <U05c2> <Ufb49> : "שּׂ" UFB2D # HEBREW LETTER SHIN WITH DAGESH AND SIN DOT +<Multi_key> <U05c2> <U05bc> <hebrew_shin> : "שּׂ" UFB2D # HEBREW LETTER SHIN WITH DAGESH AND SIN DOT +<Multi_key> <U05b7> <hebrew_aleph> : "אַ" UFB2E # HEBREW LETTER ALEF WITH PATAH +<Multi_key> <U05b8> <hebrew_aleph> : "אָ" UFB2F # HEBREW LETTER ALEF WITH QAMATS +<Multi_key> <U05bc> <hebrew_aleph> : "אּ" UFB30 # HEBREW LETTER ALEF WITH MAPIQ +<Multi_key> <U05bc> <hebrew_bet> : "בּ" UFB31 # HEBREW LETTER BET WITH DAGESH +<Multi_key> <U05bc> <hebrew_beth> : "בּ" UFB31 # HEBREW LETTER BET WITH DAGESH +<Multi_key> <U05bc> <hebrew_gimel> : "גּ" UFB32 # HEBREW LETTER GIMEL WITH DAGESH +<Multi_key> <U05bc> <hebrew_gimmel> : "גּ" UFB32 # HEBREW LETTER GIMEL WITH DAGESH +<Multi_key> <U05bc> <hebrew_dalet> : "דּ" UFB33 # HEBREW LETTER DALET WITH DAGESH +<Multi_key> <U05bc> <hebrew_daleth> : "דּ" UFB33 # HEBREW LETTER DALET WITH DAGESH +<Multi_key> <U05bc> <hebrew_he> : "הּ" UFB34 # HEBREW LETTER HE WITH MAPIQ +<Multi_key> <U05bc> <hebrew_waw> : "וּ" UFB35 # HEBREW LETTER VAV WITH DAGESH +<Multi_key> <U05bc> <hebrew_zain> : "זּ" UFB36 # HEBREW LETTER ZAYIN WITH DAGESH +<Multi_key> <U05bc> <hebrew_zayin> : "זּ" UFB36 # HEBREW LETTER ZAYIN WITH DAGESH +<Multi_key> <U05bc> <hebrew_tet> : "טּ" UFB38 # HEBREW LETTER TET WITH DAGESH +<Multi_key> <U05bc> <hebrew_teth> : "טּ" UFB38 # HEBREW LETTER TET WITH DAGESH +<Multi_key> <U05bc> <hebrew_yod> : "יּ" UFB39 # HEBREW LETTER YOD WITH DAGESH +<Multi_key> <U05bc> <hebrew_finalkaph> : "ךּ" UFB3A # HEBREW LETTER FINAL KAF WITH DAGESH +<Multi_key> <U05bc> <hebrew_kaph> : "כּ" UFB3B # HEBREW LETTER KAF WITH DAGESH +<Multi_key> <U05bc> <hebrew_lamed> : "לּ" UFB3C # HEBREW LETTER LAMED WITH DAGESH +<Multi_key> <U05bc> <hebrew_mem> : "מּ" UFB3E # HEBREW LETTER MEM WITH DAGESH +<Multi_key> <U05bc> <hebrew_nun> : "ï­€" UFB40 # HEBREW LETTER NUN WITH DAGESH +<Multi_key> <U05bc> <hebrew_samech> : "ï­" UFB41 # HEBREW LETTER SAMEKH WITH DAGESH +<Multi_key> <U05bc> <hebrew_samekh> : "ï­" UFB41 # HEBREW LETTER SAMEKH WITH DAGESH +<Multi_key> <U05bc> <hebrew_finalpe> : "ï­ƒ" UFB43 # HEBREW LETTER FINAL PE WITH DAGESH +<Multi_key> <U05bc> <hebrew_pe> : "ï­„" UFB44 # HEBREW LETTER PE WITH DAGESH +<Multi_key> <U05bc> <hebrew_zade> : "ï­†" UFB46 # HEBREW LETTER TSADI WITH DAGESH +<Multi_key> <U05bc> <hebrew_zadi> : "ï­†" UFB46 # HEBREW LETTER TSADI WITH DAGESH +<Multi_key> <U05bc> <hebrew_kuf> : "ï­‡" UFB47 # HEBREW LETTER QOF WITH DAGESH +<Multi_key> <U05bc> <hebrew_qoph> : "ï­‡" UFB47 # HEBREW LETTER QOF WITH DAGESH +<Multi_key> <U05bc> <hebrew_resh> : "ï­ˆ" UFB48 # HEBREW LETTER RESH WITH DAGESH +<Multi_key> <U05bc> <hebrew_shin> : "ï­‰" UFB49 # HEBREW LETTER SHIN WITH DAGESH +<Multi_key> <U05bc> <hebrew_taf> : "ï­Š" UFB4A # HEBREW LETTER TAV WITH DAGESH +<Multi_key> <U05bc> <hebrew_taw> : "ï­Š" UFB4A # HEBREW LETTER TAV WITH DAGESH +<Multi_key> <U05b9> <hebrew_waw> : "ï­‹" UFB4B # HEBREW LETTER VAV WITH HOLAM +<Multi_key> <U05bf> <hebrew_bet> : "ï­Œ" UFB4C # HEBREW LETTER BET WITH RAFE +<Multi_key> <U05bf> <hebrew_beth> : "ï­Œ" UFB4C # HEBREW LETTER BET WITH RAFE +<Multi_key> <U05bf> <hebrew_kaph> : "ï­" UFB4D # HEBREW LETTER KAF WITH RAFE +<Multi_key> <U05bf> <hebrew_pe> : "ï­Ž" UFB4E # HEBREW LETTER PE WITH RAFE +<Multi_key> <U1d157> <U1d165> : "í…ž" U1D15E # MUSICAL SYMBOL HALF NOTE +<Multi_key> <U1d158> <U1d165> : "í…Ÿ" U1D15F # MUSICAL SYMBOL QUARTER NOTE +<Multi_key> <U1d15f> <U1d16e> : "í… " U1D160 # MUSICAL SYMBOL EIGHTH NOTE +<Multi_key> <U1d158> <U1d165> <U1d16e> : "í… " U1D160 # MUSICAL SYMBOL EIGHTH NOTE +<Multi_key> <U1d15f> <U1d16f> : "í…¡" U1D161 # MUSICAL SYMBOL SIXTEENTH NOTE +<Multi_key> <U1d158> <U1d165> <U1d16f> : "í…¡" U1D161 # MUSICAL SYMBOL SIXTEENTH NOTE +<Multi_key> <U1d15f> <U1d170> : "í…¢" U1D162 # MUSICAL SYMBOL THIRTY-SECOND NOTE +<Multi_key> <U1d158> <U1d165> <U1d170> : "í…¢" U1D162 # MUSICAL SYMBOL THIRTY-SECOND NOTE +<Multi_key> <U1d15f> <U1d171> : "í…£" U1D163 # MUSICAL SYMBOL SIXTY-FOURTH NOTE +<Multi_key> <U1d158> <U1d165> <U1d171> : "í…£" U1D163 # MUSICAL SYMBOL SIXTY-FOURTH NOTE +<Multi_key> <U1d15f> <U1d172> : "í…¤" U1D164 # MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE +<Multi_key> <U1d158> <U1d165> <U1d172> : "í…¤" U1D164 # MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE +<Multi_key> <U1d1b9> <U1d165> : "톻" U1D1BB # MUSICAL SYMBOL MINIMA +<Multi_key> <U1d1ba> <U1d165> : "톼" U1D1BC # MUSICAL SYMBOL MINIMA BLACK +<Multi_key> <U1d1bb> <U1d16e> : "톽" U1D1BD # MUSICAL SYMBOL SEMIMINIMA WHITE +<Multi_key> <U1d1b9> <U1d165> <U1d16e> : "톽" U1D1BD # MUSICAL SYMBOL SEMIMINIMA WHITE +<Multi_key> <U1d1bc> <U1d16e> : "톾" U1D1BE # MUSICAL SYMBOL SEMIMINIMA BLACK +<Multi_key> <U1d1ba> <U1d165> <U1d16e> : "톾" U1D1BE # MUSICAL SYMBOL SEMIMINIMA BLACK +<Multi_key> <U1d1bb> <U1d16f> : "톿" U1D1BF # MUSICAL SYMBOL FUSA WHITE +<Multi_key> <U1d1b9> <U1d165> <U1d16f> : "톿" U1D1BF # MUSICAL SYMBOL FUSA WHITE +<Multi_key> <U1d1bc> <U1d16f> : "퇀" U1D1C0 # MUSICAL SYMBOL FUSA BLACK +<Multi_key> <U1d1ba> <U1d165> <U1d16f> : "퇀" U1D1C0 # MUSICAL SYMBOL FUSA BLACK Index: xc/nls/Compose/iso8859-1 diff -u xc/nls/Compose/iso8859-1:1.8 xc/nls/Compose/iso8859-1:1.9 --- xc/nls/Compose/iso8859-1:1.8 Mon Dec 24 12:15:09 2001 +++ xc/nls/Compose/iso8859-1 Wed Oct 9 21:22:28 2002 @@ -3,7 +3,7 @@ XCOMM ISO 8859-1 (Latin1) Compose Sequence XCOMM XCOMM -XCOMM $XFree86: xc/nls/Compose/iso8859-1,v 1.8 2001/12/24 17:15:09 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/iso8859-1,v 1.9 2002/10/10 01:22:28 dawes Exp $ XCOMM XCOMM Sequence Definition XCOMM @@ -383,13 +383,17 @@ XCOMM dead key accent keysyms XCOMM Special Character <dead_circumflex> <slash> : "|" bar -<dead_grave> <space> : "`" grave -<dead_acute> <space> : "'" apostrophe -<dead_diaeresis> <space> : "\250" diaeresis <dead_circumflex> <space> : "^" asciicircum +<dead_circumflex> <dead_circumflex> : "^" asciicircum <dead_tilde> <space> : "~" asciitilde +<dead_tilde> <dead_tilde> : "~" asciitilde <dead_grave> <space> : "`" grave +<dead_grave> <dead_grave> : "`" grave +XCOMM These are for us_intl, that does not have diaeresis, etc <dead_acute> <space> : "'" apostrophe +<dead_acute> <dead_acute> : "\264" acute +<dead_diaeresis> <space> : "\"" quotedbl +<dead_diaeresis> <dead_diaeresis> : "\250" diaeresis <dead_doubleacute> <space> : "\"" quotedbl <dead_abovering> <space> : "\260" degree <dead_abovering> <dead_abovering> : "\260" degree @@ -464,13 +468,6 @@ XCOMM Useful for portuguese language <dead_acute> <C> : "\307" Ccedilla <dead_acute> <c> : "\347" ccedilla -<dead_acute> <dead_acute> : "'" apostrophe -<dead_grave> <dead_grave> : "`" grave -XCOMM These are for us_intl, that does not has diaeresis, etc -<dead_diaeresis> <space> : "\"" quotedbl -<dead_diaeresis> <dead_diaeresis> : "\"" quotedbl -<dead_tilde> <dead_tilde> : "~" asciitilde -<dead_circumflex> <dead_circumflex> : "^" asciicircum XCOMM #ifdef USE_CTRL_SHIFT_T_SEQS XCOMM Ctrl<T> Means <Compose> Index: xc/nls/Compose/iso8859-14 diff -u xc/nls/Compose/iso8859-14:1.4 xc/nls/Compose/iso8859-14:1.5 --- xc/nls/Compose/iso8859-14:1.4 Thu Apr 26 17:09:40 2001 +++ xc/nls/Compose/iso8859-14 Wed Dec 18 19:57:15 2002 @@ -1,12 +1,12 @@ -XCOMM Alastair McKinstry, <amck@maths.tcd.ie> -XCOMM Extensions to allow ISO-8859-14 (Celtic) composing +XCOMM ISO 8859-14 (Latin 8) Compose Sequences XCOMM -XCOMM ISO 8859-14 (Latin-8) Compose Sequence +XCOMM Original version by Alastair McKinstry, <amck@maths.tcd.ie> +XCOMM Fixed and tidied up by Seamus O Ciardhuain <seoc@cnds.ucd.ie> (Dec 2002) XCOMM -XCOMM $XFree86: xc/nls/Compose/iso8859-14,v 1.4 2001/04/26 21:09:40 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/iso8859-14,v 1.5 2002/12/19 00:57:15 dawes Exp $ XCOMM -XCOMM The following is from the Latin-1 definitions -XCOMM Sequence Definition +XCOMM First part is taken from the Latin-1 definitions, +XCOMM i.e. characters the same in 8859-1 and 8859-14. XCOMM XCOMM <Multi_key> Means <Compose> XCOMM Special Character @@ -39,15 +39,6 @@ <Multi_key> <space> <asciitilde> : "~" asciitilde <Multi_key> <minus> <space> : "~" asciitilde <Multi_key> <space> <minus> : "~" asciitilde -<Multi_key> <exclam> <exclam> : "\241" exclamdown -<Multi_key> <c> <slash> : "\242" cent -<Multi_key> <slash> <c> : "\242" cent -<Multi_key> <C> <slash> : "\242" cent -<Multi_key> <slash> <C> : "\242" cent -<Multi_key> <C> <bar> : "\242" cent -<Multi_key> <bar> <C> : "\242" cent -<Multi_key> <c> <bar> : "\242" cent -<Multi_key> <bar> <c> : "\242" cent <Multi_key> <l> <minus> : "\243" sterling <Multi_key> <minus> <l> : "\243" sterling <Multi_key> <L> <minus> : "\243" sterling @@ -56,16 +47,6 @@ <Multi_key> <equal> <l> : "\243" sterling <Multi_key> <L> <equal> : "\243" sterling <Multi_key> <equal> <L> : "\243" sterling -<Multi_key> <C> <equal> : "\244" EuroSign -<Multi_key> <equal> <C> : "\244" EuroSign -<Multi_key> <y> <minus> : "\245" yen -<Multi_key> <minus> <y> : "\245" yen -<Multi_key> <Y> <minus> : "\245" yen -<Multi_key> <minus> <Y> : "\245" yen -<Multi_key> <y> <equal> : "\245" yen -<Multi_key> <equal> <y> : "\245" yen -<Multi_key> <Y> <equal> : "\245" yen -<Multi_key> <equal> <Y> : "\245" yen <Multi_key> <s> <o> : "\247" section <Multi_key> <o> <s> : "\247" section <Multi_key> <S> <O> : "\247" section @@ -90,69 +71,21 @@ <Multi_key> <0> <c> : "\251" copyright <Multi_key> <C> <0> : "\251" copyright <Multi_key> <0> <C> : "\251" copyright -<Multi_key> <a> <underscore> : "\252" ordfeminine -<Multi_key> <underscore> <a> : "\252" ordfeminine -<Multi_key> <A> <underscore> : "\252" ordfeminine -<Multi_key> <underscore> <A> : "\252" ordfeminine -<Multi_key> <o> <underscore> : "\272" masculine -<Multi_key> <underscore> <o> : "\272" masculine -<Multi_key> <O> <underscore> : "\272" masculine -<Multi_key> <underscore> <O> : "\272" masculine -<Multi_key> <less> <less> : "\253" guillemotleft -<Multi_key> <greater> <greater> : "\273" guillemotright -<Multi_key> <0> <asciicircum> : "\260" degree -<Multi_key> <asciicircum> <0> : "\260" degree -<Multi_key> <0> <asterisk> : "\260" degree -<Multi_key> <asterisk> <0> : "\260" degree -<Multi_key> <plus> <minus> : "\261" plusminus -<Multi_key> <minus> <plus> : "\261" plusminus -<Multi_key> <slash> <u> : "\265" mu -<Multi_key> <u> <slash> : "\265" mu -<Multi_key> <slash> <U> : "\265" mu -<Multi_key> <U> <slash> : "\265" mu -<Multi_key> <1> <asciicircum> : "\271" onesuperior -<Multi_key> <asciicircum> <1> : "\271" onesuperior -<Multi_key> <S> <1> : "\271" onesuperior -<Multi_key> <1> <S> : "\271" onesuperior -<Multi_key> <s> <1> : "\271" onesuperior -<Multi_key> <1> <s> : "\271" onesuperior -<Multi_key> <2> <asciicircum> : "\262" twosuperior -<Multi_key> <asciicircum> <2> : "\262" twosuperior -<Multi_key> <S> <2> : "\262" twosuperior -<Multi_key> <2> <S> : "\262" twosuperior -<Multi_key> <s> <2> : "\262" twosuperior -<Multi_key> <2> <s> : "\262" twosuperior -<Multi_key> <3> <asciicircum> : "\263" threesuperior -<Multi_key> <asciicircum> <3> : "\263" threesuperior -<Multi_key> <S> <3> : "\263" threesuperior -<Multi_key> <3> <S> : "\263" threesuperior -<Multi_key> <s> <3> : "\263" threesuperior -<Multi_key> <3> <s> : "\263" threesuperior <Multi_key> <p> <exclam> : "\266" paragraph <Multi_key> <exclam> <p> : "\266" paragraph <Multi_key> <P> <exclam> : "\266" paragraph <Multi_key> <exclam> <P> : "\266" paragraph -<Multi_key> <period> <asciicircum> : "\267" periodcentered -<Multi_key> <asciicircum> <period> : "\267" periodcentered -<Multi_key> <period> <period> : "\267" periodcentered -<Multi_key> <question> <question> : "\277" questiondown <Multi_key> <space> <space> : "\240" nobreakspace -<Multi_key> <minus> <comma> : "\254" notsign -<Multi_key> <comma> <minus> : "\254" notsign <Multi_key> <minus> <minus> : "\255" hyphen <Multi_key> <R> <O> : "\256" registered <Multi_key> <O> <R> : "\256" registered -<Multi_key> <minus> <asciicircum> : "\257" macron -<Multi_key> <asciicircum> <minus> : "\257" macron -<Multi_key> <underscore> <asciicircum> : "\257" macron -<Multi_key> <asciicircum> <underscore> : "\257" macron -<Multi_key> <underscore> <underscore> : "\257" macron -<Multi_key> <minus> <colon> : "\367" division -<Multi_key> <colon> <minus> : "\367" division -<Multi_key> <x> <x> : "\327" multiply -<Multi_key> <apostrophe> <apostrophe> : "\264" acute -<Multi_key> <comma> <comma> : "\270" cedilla -<Multi_key> <quotedbl> <quotedbl> : "\250" diaeresis +<Multi_key> <r> <o> : "\256" registered +<Multi_key> <o> <r> : "\256" registered +<Multi_key> <R> <0> : "\256" registered +<Multi_key> <r> <0> : "\256" registered +<Multi_key> <0> <R> : "\256" registered +<Multi_key> <0> <r> : "\256" registered + XCOMM Accented Alphabet <Multi_key> <A> <grave> : "\300" Agrave <Multi_key> <grave> <A> : "\300" Agrave @@ -200,10 +133,6 @@ <Multi_key> <comma> <C> : "\307" Ccedilla <Multi_key> <c> <comma> : "\347" ccedilla <Multi_key> <comma> <c> : "\347" ccedilla -<Multi_key> <minus> <D> : "\320" ETH -<Multi_key> <D> <minus> : "\320" ETH -<Multi_key> <minus> <d> : "\360" eth -<Multi_key> <d> <minus> : "\360" eth <Multi_key> <E> <grave> : "\310" Egrave <Multi_key> <grave> <E> : "\310" Egrave <Multi_key> <E> <acute> : "\311" Eacute @@ -288,7 +217,6 @@ <Multi_key> <diaeresis> <O> : "\326" Odiaeresis <Multi_key> <O> <slash> : "\330" Ooblique <Multi_key> <slash> <O> : "\330" Ooblique -<Multi_key> <O> <E> : "\274" OE <Multi_key> <o> <grave> : "\362" ograve <Multi_key> <grave> <o> : "\362" ograve <Multi_key> <o> <acute> : "\363" oacute @@ -309,11 +237,6 @@ <Multi_key> <diaeresis> <o> : "\366" odiaeresis <Multi_key> <o> <slash> : "\370" oslash <Multi_key> <slash> <o> : "\370" oslash -<Multi_key> <o> <e> : "\275" oe -<Multi_key> <S> <less> : "\246" Scaron -<Multi_key> <less> <S> : "\246" Scaron -<Multi_key> <s> <less> : "\250" scaron -<Multi_key> <less> <s> : "\250" scaron <Multi_key> <U> <grave> : "\331" Ugrave <Multi_key> <grave> <U> : "\331" Ugrave <Multi_key> <U> <acute> : "\332" Uacute @@ -343,8 +266,6 @@ <Multi_key> <u> <diaeresis> : "\374" udiaeresis <Multi_key> <diaeresis> <u> : "\374" udiaeresis <Multi_key> <s> <s> : "\337" ssharp -<Multi_key> <T> <H> : "\336" THORN -<Multi_key> <t> <h> : "\376" thorn <Multi_key> <Y> <acute> : "\335" Yacute <Multi_key> <acute> <Y> : "\335" Yacute <Multi_key> <Y> <apostrophe> : "\335" Yacute @@ -357,32 +278,18 @@ <Multi_key> <quotedbl> <y> : "\377" ydiaeresis <Multi_key> <y> <diaeresis> : "\377" ydiaeresis <Multi_key> <diaeresis> <y> : "\377" ydiaeresis -<Multi_key> <Z> <less> : "\264" Zcaron -<Multi_key> <less> <Z> : "\264" Zcaron -<Multi_key> <z> <less> : "\270" zcaron -<Multi_key> <less> <z> : "\270" zcaron + XCOMM XCOMM dead key accent keysyms XCOMM Special Character <dead_circumflex> <slash> : "|" bar <dead_grave> <space> : "`" grave <dead_acute> <space> : "'" apostrophe -<dead_diaeresis> <space> : "\250" diaeresis <dead_circumflex> <space> : "^" asciicircum <dead_tilde> <space> : "~" asciitilde <dead_grave> <space> : "`" grave <dead_acute> <space> : "'" apostrophe -<dead_circumflex> <0> : "\260" degree -<dead_circumflex> <1> : "\271" onesuperior -<dead_circumflex> <2> : "\262" twosuperior -<dead_circumflex> <3> : "\263" threesuperior -<dead_circumflex> <period> : "\267" periodcentered -<dead_cedilla> <minus> : "\254" notsign -<dead_circumflex> <minus> : "\257" macron -<dead_circumflex> <underscore> : "\257" macron -<dead_acute> <apostrophe> : "\264" acute -<dead_cedilla> <comma> : "\270" cedilla -<dead_diaeresis> <quotedbl> : "\250" diaeresis + XCOMM Accented Alphabet <dead_grave> <A> : "\300" Agrave <dead_acute> <A> : "\301" Aacute @@ -424,8 +331,6 @@ <dead_circumflex> <o> : "\364" ocircumflex <dead_tilde> <o> : "\365" otilde <dead_diaeresis> <o> : "\366" odiaeresis -<dead_caron> <S> : "\246" Scaron -<dead_caron> <s> : "\250" scaron <dead_grave> <U> : "\331" Ugrave <dead_acute> <U> : "\332" Uacute <dead_circumflex> <U> : "\333" Ucircumflex @@ -437,152 +342,167 @@ <dead_acute> <Y> : "\335" Yacute <dead_acute> <y> : "\375" yacute <dead_diaeresis> <y> : "\377" ydiaeresis -<dead_caron> <Z> : "\264" Zcaron -<dead_caron> <z> : "\270" zcaron -XCOMM The following is Celtic character support -XCOMM + +XCOMM The following is Celtic character support, +XCOMM i.e. the characters in 8859-14 which differ from 8859-1. -<Multi_key> <period> <b> : "¢" bdotabove -<Multi_key> <period> <B> : "¡" Bdotabove -<Multi_key> <period> <c> : "¥" cdotabove -<Multi_key> <period> <C> : "¤" Cdotabove -<Multi_key> <period> <d> : "«" ddotabove -<Multi_key> <period> <D> : "¦" Ddotabove -<Multi_key> <period> <f> : "¯" fdotabove -<Multi_key> <period> <F> : "°" Fdotabove -<Multi_key> <period> <g> : "³" gdotabove -<Multi_key> <period> <G> : "²" Gdotabove -<Multi_key> <period> <m> : "µ" mdotabove -<Multi_key> <period> <M> : "´" Mdotabove -<Multi_key> <period> <p> : "¹" pdotabove -<Multi_key> <period> <P> : "·" Pdotabove -<Multi_key> <period> <s> : "¿" sdotabove -<Multi_key> <period> <S> : "»" Sdotabove -<Multi_key> <period> <t> : "÷" tdotabove -<Multi_key> <period> <T> : "×" Tdotabove -<Multi_key> <b> <period> : "¢" bdotabove -<Multi_key> <B> <period> : "¡" Bdotabove -<Multi_key> <c> <period> : "¥" cdotabove -<Multi_key> <C> <period> : "¤" Cdotabove -<Multi_key> <d> <period> : "«" ddotabove -<Multi_key> <D> <period> : "¦" Ddotabove -<Multi_key> <f> <period> : "¯" fdotabove -<Multi_key> <F> <period> : "°" Fdotabove -<Multi_key> <g> <period> : "³" gdotabove -<Multi_key> <G> <period> : "²" Gdotabove -<Multi_key> <m> <period> : "µ" mdotabove -<Multi_key> <M> <period> : "´" Mdotabove -<Multi_key> <p> <period> : "¹" pdotabove -<Multi_key> <P> <period> : "·" Pdotabove -<Multi_key> <s> <period> : "¿" sdotabove -<Multi_key> <S> <period> : "»" Sdotabove -<Multi_key> <t> <period> : "÷" tdotabove -<Multi_key> <T> <period> : "×" Tdotabove - -<Multi_key> <y> <asciicircum> : "\376" ycircumflex -<Multi_key> <asciicircum> <y> : "\376" ycircumflex -<Multi_key> <Y> <asciicircum> : "\336" Ycircumflex -<Multi_key> <asciicircum> <Y> : "\336" Ycircumflex -<Multi_key> <w> <asciicircum> : "\360" wcircumflex -<Multi_key> <asciicircum> <w> : "\360" wcircumflex -<Multi_key> <W> <asciicircum> : "\320" Wcircumflex -<Multi_key> <asciicircum> <W> : "\320" Wcircumflex +<Multi_key> <period> <b> : "\242" babovedot +<Multi_key> <period> <B> : "\241" Babovedot +<Multi_key> <period> <c> : "\245" cabovedot +<Multi_key> <period> <C> : "\245" Cabovedot +<Multi_key> <period> <d> : "\253" dabovedot +<Multi_key> <period> <D> : "\246" Dabovedot +<Multi_key> <period> <f> : "\261" fabovedot +<Multi_key> <period> <F> : "\260" Fabovedot +<Multi_key> <period> <g> : "\263" gabovedot +<Multi_key> <period> <G> : "\262" Gabovedot +<Multi_key> <period> <m> : "\265" mabovedot +<Multi_key> <period> <M> : "\264" Mabovedot +<Multi_key> <period> <p> : "\271" pabovedot +<Multi_key> <period> <P> : "\267" Pabovedot +<Multi_key> <period> <s> : "\277" sabovedot +<Multi_key> <period> <S> : "\273" Sabovedot +<Multi_key> <period> <t> : "\367" tabovedot +<Multi_key> <period> <T> : "\327" Tabovedot + +<Multi_key> <b> <period> : "\242" babovedot +<Multi_key> <B> <period> : "\241" Babovedot +<Multi_key> <c> <period> : "\245" cabovedot +<Multi_key> <C> <period> : "\245" Cabovedot +<Multi_key> <d> <period> : "\253" dabovedot +<Multi_key> <D> <period> : "\246" Dabovedot +<Multi_key> <f> <period> : "\261" fabovedot +<Multi_key> <F> <period> : "\260" Fabovedot +<Multi_key> <g> <period> : "\263" gabovedot +<Multi_key> <G> <period> : "\262" Gabovedot +<Multi_key> <m> <period> : "\265" mabovedot +<Multi_key> <M> <period> : "\264" Mabovedot +<Multi_key> <p> <period> : "\271" pabovedot +<Multi_key> <P> <period> : "\267" Pabovedot +<Multi_key> <s> <period> : "\277" sabovedot +<Multi_key> <S> <period> : "\273" Sabovedot +<Multi_key> <t> <period> : "\367" tabovedot +<Multi_key> <T> <period> : "\327" Tabovedot + +<Multi_key> <y> <asciicircum> : "\376" ycircumflex +<Multi_key> <asciicircum> <y> : "\376" ycircumflex +<Multi_key> <Y> <asciicircum> : "\336" Ycircumflex +<Multi_key> <asciicircum> <Y> : "\336" Ycircumflex + +<Multi_key> <w> <asciicircum> : "\360" wcircumflex +<Multi_key> <asciicircum> <w> : "\360" wcircumflex +<Multi_key> <W> <asciicircum> : "\320" Wcircumflex +<Multi_key> <asciicircum> <W> : "\320" Wcircumflex <Multi_key> <Y> <quotedbl> : "\257" Ydiaeresis <Multi_key> <quotedbl> <Y> : "\257" Ydiaeresis <Multi_key> <Y> <diaeresis> : "\257" Ydiaeresis <Multi_key> <diaeresis> <Y> : "\257" Ydiaeresis -<Multi_key> <W> <quotedbl> : "½" Wdiaeresis -<Multi_key> <quotedbl> <W> : "½" Wdiaeresis -<Multi_key> <W> <diaeresis> : "½" Wdiaeresis -<Multi_key> <diaeresis> <W> : "½" Wdiaeresis -<Multi_key> <w> <quotedbl> : "¾" wdiaeresis -<Multi_key> <quotedbl> <w> : "¾" wdiaeresis -<Multi_key> <w> <diaeresis> : "¾" wdiaeresis -<Multi_key> <diaeresis> <w> : "¾" wdiaeresis - -<Multi_key> <Y> <grave> : "¬" Ygrave -<Multi_key> <grave> <Y> : "¬" Ygrave -<Multi_key> <y> <grave> : "¼" ygrave -<Multi_key> <grave> <y> : "¼" ygrave -<Multi_key> <W> <grave> : "¨" Wgrave -<Multi_key> <grave> <w> : "¨" Wgrave -<Multi_key> <W> <grave> : "¸" wgrave -<Multi_key> <grave> <w> : "¸" wgrave - - - -<dead_abovedot> <b> : "¢" bdotabove -<dead_abovedot> <B> : "¡" Bdotabove -<dead_abovedot> <c> : "¥" cdotabove -<dead_abovedot> <C> : "¤" Cdotabove -<dead_abovedot> <d> : "«" ddotabove -<dead_abovedot> <D> : "¦" Ddotabove -<dead_abovedot> <f> : "¯" fdotabove -<dead_abovedot> <F> : "°" Fdotabove -<dead_abovedot> <g> : "³" gdotabove -<dead_abovedot> <G> : "²" Gdotabove -<dead_abovedot> <m> : "µ" mdotabove -<dead_abovedot> <M> : "´" Mdotabove -<dead_abovedot> <p> : "¹" pdotabove -<dead_abovedot> <P> : "·" Pdotabove -<dead_abovedot> <s> : "¿" sdotabove -<dead_abovedot> <S> : "»" Sdotabove -<dead_abovedot> <t> : "÷" tdotabove -<dead_abovedot> <T> : "×" Tdotabove - -<dead_circumflex> <y> : "\376" ycircumflex -<dead_circumflex> <Y> : "\336" Ycircumflex -<dead_circumflex> <w> : "\360" wcircumflex -<dead_circumflex> <W> : "\320" Wcircumflex -<dead_circumflex> <b> : "¢" bdotabove -<dead_circumflex> <B> : "¡" Bdotabove -<dead_circumflex> <c> : "¥" cdotabove -<dead_circumflex> <C> : "¤" Cdotabove -<dead_circumflex> <d> : "«" ddotabove -<dead_circumflex> <D> : "¦" Ddotabove -<dead_circumflex> <f> : "¯" fdotabove -<dead_circumflex> <F> : "°" Fdotabove -<dead_circumflex> <g> : "³" gdotabove -<dead_circumflex> <G> : "²" Gdotabove -<dead_circumflex> <m> : "µ" mdotabove -<dead_circumflex> <M> : "´" Mdotabove -<dead_circumflex> <p> : "¹" pdotabove -<dead_circumflex> <P> : "·" Pdotabove -<dead_circumflex> <s> : "¿" sdotabove -<dead_circumflex> <S> : "»" Sdotabove -<dead_circumflex> <t> : "÷" tdotabove -<dead_circumflex> <T> : "×" Tdotabove - -<dead_acute> <w> : "ª" wacute -<dead_acute> <W> : "º" Wacute -<dead_acute> <b> : "¢" bdotabove -<dead_acute> <B> : "¡" Bdotabove -<dead_acute> <c> : "¥" cdotabove -<dead_acute> <C> : "¤" Cdotabove -<dead_acute> <d> : "«" ddotabove -<dead_acute> <D> : "¦" Ddotabove -<dead_acute> <f> : "¯" fdotabove -<dead_acute> <F> : "°" Fdotabove -<dead_acute> <g> : "³" gdotabove -<dead_acute> <G> : "²" Gdotabove -<dead_acute> <m> : "µ" mdotabove -<dead_acute> <M> : "´" Mdotabove -<dead_acute> <p> : "¹" pdotabove -<dead_acute> <P> : "·" Pdotabove -<dead_acute> <s> : "¿" sdotabove -<dead_acute> <S> : "»" Sdotabove -<dead_acute> <t> : "÷" tdotabove -<dead_acute> <T> : "×" Tdotabove + +<Multi_key> <W> <quotedbl> : "\275" Wdiaeresis +<Multi_key> <quotedbl> <W> : "\275" Wdiaeresis +<Multi_key> <W> <diaeresis> : "\275" Wdiaeresis +<Multi_key> <diaeresis> <W> : "\275" Wdiaeresis +<Multi_key> <w> <quotedbl> : "\276" wdiaeresis +<Multi_key> <quotedbl> <w> : "\276" wdiaeresis +<Multi_key> <w> <diaeresis> : "\276" wdiaeresis +<Multi_key> <diaeresis> <w> : "\276" wdiaeresis + +<Multi_key> <Y> <grave> : "\254" Ygrave +<Multi_key> <grave> <Y> : "\254" Ygrave +<Multi_key> <y> <grave> : "\274" ygrave +<Multi_key> <grave> <y> : "\274" ygrave + +<Multi_key> <W> <grave> : "\250" Wgrave +<Multi_key> <grave> <W> : "\250" Wgrave +<Multi_key> <w> <grave> : "\270" wgrave +<Multi_key> <grave> <w> : "\270" wgrave + +<Multi_key> <W> <apostrophe> : "\252" Wacute +<Multi_key> <apostrophe> <W> : "\252" Wacute +<Multi_key> <W> <acute> : "\252" Wacute +<Multi_key> <acute> <W> : "\252" Wacute +<Multi_key> <w> <apostrophe> : "\272" wacute +<Multi_key> <apostrophe> <w> : "\272" wacute +<Multi_key> <w> <acute> : "\272" wacute +<Multi_key> <acute> <w> : "\272" wacute + +<dead_abovedot> <b> : "\242" babovedot +<dead_abovedot> <B> : "\241" Babovedot +<dead_abovedot> <c> : "\245" cabovedot +<dead_abovedot> <C> : "\245" Cabovedot +<dead_abovedot> <d> : "\253" dabovedot +<dead_abovedot> <D> : "\246" Dabovedot +<dead_abovedot> <f> : "\261" fabovedot +<dead_abovedot> <F> : "\260" Fabovedot +<dead_abovedot> <g> : "\263" gabovedot +<dead_abovedot> <G> : "\262" Gabovedot +<dead_abovedot> <m> : "\265" mabovedot +<dead_abovedot> <M> : "\264" Mabovedot +<dead_abovedot> <p> : "\271" pabovedot +<dead_abovedot> <P> : "\267" Pabovedot +<dead_abovedot> <s> : "\277" sabovedot +<dead_abovedot> <S> : "\273" Sabovedot +<dead_abovedot> <t> : "\367" tabovedot +<dead_abovedot> <T> : "\327" Tabovedot + +<dead_circumflex> <b> : "\242" babovedot +<dead_circumflex> <B> : "\241" Babovedot +<dead_circumflex> <c> : "\245" cabovedot +<dead_circumflex> <C> : "\245" Cabovedot +<dead_circumflex> <d> : "\253" dabovedot +<dead_circumflex> <D> : "\246" Dabovedot +<dead_circumflex> <f> : "\261" fabovedot +<dead_circumflex> <F> : "\260" Fabovedot +<dead_circumflex> <g> : "\263" gabovedot +<dead_circumflex> <G> : "\262" Gabovedot +<dead_circumflex> <m> : "\265" mabovedot +<dead_circumflex> <M> : "\264" Mabovedot +<dead_circumflex> <p> : "\271" pabovedot +<dead_circumflex> <P> : "\267" Pabovedot +<dead_circumflex> <s> : "\277" sabovedot +<dead_circumflex> <S> : "\273" Sabovedot +<dead_circumflex> <t> : "\367" tabovedot +<dead_circumflex> <T> : "\327" Tabovedot + +<dead_acute> <b> : "\242" babovedot +<dead_acute> <B> : "\241" Babovedot +<dead_acute> <c> : "\245" cabovedot +<dead_acute> <C> : "\245" Cabovedot +<dead_acute> <d> : "\253" dabovedot +<dead_acute> <D> : "\246" Dabovedot +<dead_acute> <f> : "\261" fabovedot +<dead_acute> <F> : "\260" Fabovedot +<dead_acute> <g> : "\263" gabovedot +<dead_acute> <G> : "\262" Gabovedot +<dead_acute> <m> : "\265" mabovedot +<dead_acute> <M> : "\264" Mabovedot +<dead_acute> <p> : "\271" pabovedot +<dead_acute> <P> : "\267" Pabovedot +<dead_acute> <s> : "\277" sabovedot +<dead_acute> <S> : "\273" Sabovedot +<dead_acute> <t> : "\367" tabovedot +<dead_acute> <T> : "\327" Tabovedot <dead_diaeresis> <Y> : "\257" Ydiaeresis -<dead_diaeresis> <w> : "½" wdiaeresis -<dead_diaeresis> <W> : "¾" Wdiaeresis + +<dead_grave> <Y> : "\254" Ygrave +<dead_grave> <y> : "\274" ygrave + +<dead_circumflex> <y> : "\376" ycircumflex +<dead_circumflex> <Y> : "\336" Ycircumflex + +<dead_circumflex> <w> : "\360" wcircumflex +<dead_circumflex> <W> : "\320" Wcircumflex + +<dead_diaeresis> <w> : "\276" wdiaeresis +<dead_diaeresis> <W> : "\275" Wdiaeresis + +<dead_acute> <w> : "\272" wacute +<dead_acute> <W> : "\252" Wacute -<dead_grave> <Y> : "¬" Ygrave -<dead_grave> <y> : "¼" ygrave -<dead_grave> <w> : "¨" Wgrave -<dead_grave> <w> : "¸" wgrave +<dead_grave> <W> : "\250" Wgrave +<dead_grave> <w> : "\270" wgrave XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-15 diff -u xc/nls/Compose/iso8859-15:1.6 xc/nls/Compose/iso8859-15:1.9 --- xc/nls/Compose/iso8859-15:1.6 Mon Dec 24 12:15:09 2001 +++ xc/nls/Compose/iso8859-15 Mon Dec 16 23:58:42 2002 @@ -2,7 +2,7 @@ XCOMM XCOMM ISO 8859-15 (Latin1) Compose Sequence XCOMM -XCOMM $XFree86: xc/nls/Compose/iso8859-15,v 1.6 2001/12/24 17:15:09 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/iso8859-15,v 1.9 2002/12/17 04:58:42 dawes Exp $ XCOMM XCOMM Sequence Definition XCOMM @@ -155,7 +155,7 @@ <Multi_key> <x> <x> : "\327" multiply <Multi_key> <apostrophe> <apostrophe> : "\264" acute <Multi_key> <comma> <comma> : "\270" cedilla -<Multi_key> <quotedbl> <quotedbl> : "\250" diaeresis +<Multi_key> <quotedbl> <quotedbl> : "\"" quotedbl XCOMM Accented Alphabet <Multi_key> <A> <grave> : "\300" Agrave <Multi_key> <grave> <A> : "\300" Agrave @@ -378,13 +378,18 @@ XCOMM dead key accent keysyms XCOMM Special Character <dead_circumflex> <slash> : "|" bar -<dead_grave> <space> : "`" grave -<dead_acute> <space> : "'" apostrophe -<dead_diaeresis> <space> : "\250" diaeresis <dead_circumflex> <space> : "^" asciicircum +<dead_circumflex> <dead_circumflex> : "^" asciicircum <dead_tilde> <space> : "~" asciitilde +<dead_tilde> <dead_tilde> : "~" asciitilde <dead_grave> <space> : "`" grave +<dead_grave> <dead_grave> : "`" grave +XCOMM These are for us_intl, that does not have diaeresis, etc <dead_acute> <space> : "'" apostrophe +<dead_acute> <dead_acute> : "\264" acute +<dead_diaeresis> <space> : "\"" quotedbl +<dead_diaeresis> <dead_diaeresis> : "\"" quotedbl +<dead_doubleacute> <space> : "\"" quotedbl <dead_circumflex> <0> : "\260" degree <dead_circumflex> <1> : "\271" onesuperior <dead_circumflex> <2> : "\262" twosuperior @@ -395,7 +400,7 @@ <dead_circumflex> <underscore> : "\257" macron <dead_acute> <apostrophe> : "\264" acute <dead_cedilla> <comma> : "\270" cedilla -<dead_diaeresis> <quotedbl> : "\250" diaeresis +<dead_diaeresis> <quotedbl> : "\"" quotedbl XCOMM Accented Alphabet <dead_abovering> <A> : "\305" Aring <dead_grave> <A> : "\300" Agrave @@ -462,7 +467,4 @@ XCOMM Useful for portuguese language <dead_acute> <C> : "\307" Ccedilla <dead_acute> <c> : "\347" ccedilla -<dead_acute> <dead_acute> : "'" apostrophe -<dead_grave> <dead_grave> : "`" grave -<acute> : "'" apostrophe XCOMM End of Sequence Definition Index: xc/nls/XI18N_OBJS/Imakefile diff -u xc/nls/XI18N_OBJS/Imakefile:1.1 xc/nls/XI18N_OBJS/Imakefile:1.7 --- xc/nls/XI18N_OBJS/Imakefile:1.1 Thu Nov 15 19:52:31 2001 +++ xc/nls/XI18N_OBJS/Imakefile Tue Jan 14 22:59:47 2003 @@ -1,5 +1,10 @@ XCOMM $Xorg: Imakefile,v 1.1 2000/12/12 13:00:42 coskrey Exp $ + + + +XCOMM $XFree86: xc/nls/XI18N_OBJS/Imakefile,v 1.7 2003/01/15 03:59:47 dawes Exp $ + #ifndef Win32Architecture # define XI18NTarget(name) @@\ all:: name @@\ @@ -33,6 +38,7 @@ XI18NTarget(iso8859-8) XI18NTarget(iso8859-9) XI18NTarget(iso8859-10) +XI18NTarget(iso8859-11) XI18NTarget(iso8859-13) XI18NTarget(iso8859-14) XI18NTarget(iso8859-15) @@ -53,13 +59,17 @@ XI18NTarget(tscii-0) XI18NTarget(vi_VN.tcvn) XI18NTarget(vi_VN.viscii) -XI18NTarget(zh) +XI18NTarget(zh_CN) XI18NTarget(zh_CN.gbk) XI18NTarget(zh_HK.big5hkscs) XI18NTarget(zh_TW) XI18NTarget(zh_TW.big5) XI18NTarget(th_TH) XI18NTarget(en_US.UTF-8) +XI18NTarget(ja_JP.UTF-8) +XI18NTarget(ko_KR.UTF-8) +XI18NTarget(th_TH.UTF-8) +XI18NTarget(zh_TW.UTF-8) #ifdef UXPArchitecture XI18NTarget(ja.U90) XI18NTarget(ja.S90) Index: xc/nls/XI18N_OBJS/iso8859-11 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-11:1.1 --- /dev/null Thu Feb 27 12:28:19 2003 +++ xc/nls/XI18N_OBJS/iso8859-11 Tue Oct 8 19:31:41 2002 @@ -0,0 +1,9 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-11 locale +# +# $XFree86: xc/nls/XI18N_OBJS/iso8859-11,v 1.1 2002/10/08 23:31:41 dawes Exp $ +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/ja_JP.UTF-8 diff -u /dev/null xc/nls/XI18N_OBJS/ja_JP.UTF-8:1.1 --- /dev/null Thu Feb 27 12:28:19 2003 +++ xc/nls/XI18N_OBJS/ja_JP.UTF-8 Mon Dec 16 22:41:53 2002 @@ -0,0 +1,9 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ja_JP.UTF-8 locale +# +# $XFree86: xc/nls/XI18N_OBJS/ja_JP.UTF-8,v 1.1 2002/12/17 03:41:53 dawes Exp $ +# +XLC common/xlcUTF8Load _XlcUtf8Loader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/ko_KR.UTF-8 diff -u /dev/null xc/nls/XI18N_OBJS/ko_KR.UTF-8:1.1 --- /dev/null Thu Feb 27 12:28:19 2003 +++ xc/nls/XI18N_OBJS/ko_KR.UTF-8 Mon Dec 16 22:41:53 2002 @@ -0,0 +1,9 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ko_KR.UTF-8 locale +# +# $XFree86: xc/nls/XI18N_OBJS/ko_KR.UTF-8,v 1.1 2002/12/17 03:41:53 dawes Exp $ +# +XLC common/xlcUTF8Load _XlcUtf8Loader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/th_TH.UTF-8 diff -u /dev/null xc/nls/XI18N_OBJS/th_TH.UTF-8:1.1 --- /dev/null Thu Feb 27 12:28:19 2003 +++ xc/nls/XI18N_OBJS/th_TH.UTF-8 Tue Oct 8 20:05:23 2002 @@ -0,0 +1,9 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for th_TH.UTF-8 locale +# +# $XFree86: xc/nls/XI18N_OBJS/th_TH.UTF-8,v 1.1 2002/10/09 00:05:23 dawes Exp $ +# +XLC common/xlcUTF8Load _XlcUtf8Loader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/zh diff -u xc/nls/XI18N_OBJS/zh:1.1 xc/nls/XI18N_OBJS/zh:removed --- xc/nls/XI18N_OBJS/zh:1.1 Thu Nov 15 19:52:32 2001 +++ xc/nls/XI18N_OBJS/zh Thu Feb 27 12:28:19 2003 @@ -1,8 +0,0 @@ -# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME -# -# XI18N objects table for zh locale -# -XLC common/xlocale _XlcEucLoader # XLC_open -XLC common/xlibi18n _XlcGenericLoader # XLC_open -XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister -XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/zh_CN diff -u /dev/null xc/nls/XI18N_OBJS/zh_CN:1.1 --- /dev/null Thu Feb 27 12:28:19 2003 +++ xc/nls/XI18N_OBJS/zh_CN Mon Jun 3 18:19:44 2002 @@ -0,0 +1,10 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for zh locale +# +# $XFree86: xc/nls/XI18N_OBJS/zh_CN,v 1.1 2002/06/03 22:19:44 dawes Exp $ +# +XLC common/xlocale _XlcEucLoader # XLC_open +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/zh_TW.UTF-8 diff -u /dev/null xc/nls/XI18N_OBJS/zh_TW.UTF-8:1.1 --- /dev/null Thu Feb 27 12:28:19 2003 +++ xc/nls/XI18N_OBJS/zh_TW.UTF-8 Tue Jan 14 22:59:47 2003 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for zh_TW.UTF-8 locale +# +XLC common/xlcUTF8Load _XlcUtf8Loader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XLC_LOCALE/Imakefile diff -u xc/nls/XLC_LOCALE/Imakefile:1.20 xc/nls/XLC_LOCALE/Imakefile:1.25 --- xc/nls/XLC_LOCALE/Imakefile:1.20 Thu Nov 1 18:35:28 2001 +++ xc/nls/XLC_LOCALE/Imakefile Tue Jan 14 22:59:47 2003 @@ -2,12 +2,11 @@ -XCOMM $XFree86: xc/nls/XLC_LOCALE/Imakefile,v 1.20 2001/11/01 23:35:28 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/Imakefile,v 1.25 2003/01/15 03:59:47 dawes Exp $ WCHAR32 = HasWChar32 #ifndef Win32Architecture -#ifndef OS2Architecture # define LTarget(name) @@\ all:: name.lt @@\ @@\ @@ -20,26 +19,12 @@ @@\ InstallNamedNonExec(name.lt,XLC_LOCALE,$(XLOCALEDIR)/name) #else -XCOMM Why the hell don't make a more intelligent LinkFile? -XCOMM os2.rules defines one for this purpose, maybe put a Unix/Win32 one in Imake.rules # define LTarget(name) @@\ all:: name.lt @@\ @@\ CppFileTarget(name.lt,name,-DWCHAR32=$(WCHAR32),NullParameter) @@\ @@\ all:: name.lt @@\ - MakeDir($(BUILDLIBDIR)/locale/name) @@\ - LinkFileSpecial($(BUILDLIBDIR)/locale/name,XLC_LOCALE,$(BUILDLIBTOP)/../../$(CURRENT_DIR)/name.lt) @@\ - @@\ -InstallNamedNonExec(name.lt,XLC_LOCALE,$(XLOCALEDIR)/name) -#endif -#else -# define LTarget(name) @@\ -all:: name.lt @@\ - @@\ -CppFileTarget(name.lt,name,-DWCHAR32=$(WCHAR32),NullParameter) @@\ - @@\ -all:: name.lt @@\ MakeDir(Concat($(BUILDLIBDIR:/=\)\locale\,name)) @@\ RemoveFile(Concat($(BUILDLIBDIR:/=\)\locale\,name\XLC_LOCALE)) @@\ cd Concat($(BUILDLIBDIR:/=\)\locale\,name) && $(LN) Concat($(BUILDLIBTOP:/=\)\..\..\$(CURRENT_DIR:/=\)\,name.lt) XLC_LOCALE @@\ @@ -49,6 +34,7 @@ LTarget(C) LTarget(armscii-8) +LTarget(en_US.UTF-8) LTarget(georgian-academy) LTarget(georgian-ps) LTarget(ibm-cp1133) @@ -64,6 +50,7 @@ LTarget(iso8859-8) LTarget(iso8859-9) LTarget(iso8859-10) +LTarget(iso8859-11) LTarget(iso8859-13) LTarget(iso8859-14) LTarget(iso8859-15) @@ -71,7 +58,9 @@ LTarget(ja) LTarget(ja.JIS) LTarget(ja.SJIS) +LTarget(ja_JP.UTF-8) LTarget(ko) +LTarget(ko_KR.UTF-8) LTarget(koi8-r) LTarget(koi8-u) LTarget(koi8-c) @@ -81,6 +70,8 @@ LTarget(mulelao-1) LTarget(nokhchi-1) LTarget(tatar-cyr) +LTarget(th_TH) +LTarget(th_TH.UTF-8) LTarget(tscii-0) LTarget(vi_VN.tcvn) LTarget(vi_VN.viscii) @@ -90,8 +81,7 @@ LTarget(zh_HK.big5hkscs) LTarget(zh_TW) LTarget(zh_TW.big5) -LTarget(th_TH) -LTarget(en_US.UTF-8) +LTarget(zh_TW.UTF-8) #ifdef UXPArchitecture LTarget(ja.U90) LTarget(ja.S90) Index: xc/nls/XLC_LOCALE/iso8859-11 diff -u /dev/null xc/nls/XLC_LOCALE/iso8859-11:1.1 --- /dev/null Thu Feb 27 12:28:19 2003 +++ xc/nls/XLC_LOCALE/iso8859-11 Tue Oct 8 19:31:42 2002 @@ -0,0 +1,74 @@ +XCOMM XLocale Database Sample for iso8859-11. +XCOMM +XCOMM Id: xf-cvs20020709-iso8859_11locale.patch,v 1.1 2002/07/09 12:24:01 thep Exp +XCOMM $XFree86: xc/nls/XLC_LOCALE/iso8859-11,v 1.1 2002/10/08 23:31:42 dawes Exp $ + +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET +XCOMM fs0 class +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-11:GL + substitute ISO8859-1:GL + vertical_rotate all + } +} +XCOMM fs1 class +fs1 { + charset { + name ISO8859-11:GR + } + font { + primary ISO8859-11:GR + } +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name ISO8859-11 +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-11:GL; ISO8859-1:GL +} + + +XCOMM cs1 class +cs1 { + side GR:Default + length 1 +#if WCHAR32 + wc_encoding \x30000000 +#else + wc_encoding \x00008080 +#endif + ct_encoding ISO8859-11:GR +} + +END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/ja_JP.UTF-8 diff -u /dev/null xc/nls/XLC_LOCALE/ja_JP.UTF-8:1.1 --- /dev/null Thu Feb 27 12:28:20 2003 +++ xc/nls/XLC_LOCALE/ja_JP.UTF-8 Wed Oct 16 21:12:57 2002 @@ -0,0 +1,150 @@ +XCOMM $XFree86: xc/nls/XLC_LOCALE/ja_JP.UTF-8,v 1.1 2002/10/17 01:12:57 dawes Exp $ +XCOMM + +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET + +on_demand_loading True + +object_name generic + +XCOMM We leave the legacy encodings in for the moment, because we don't +XCOMM have that many ISO10646 fonts yet. +XCOMM fs0 class (7 bit ASCII) +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-1:GL + vertical_rotate all + } +} +XCOMM fs1 class (ISO8859 families) +fs1 { + charset { + name ISO8859-1:GR + } + font { + primary ISO8859-1:GR + } +} + +XCOMM ISO10646-1 is put after iso8859-1 to make usually better-looking +XCOMM iso8859-x fonts are picked up before iso10646-1 fonts. +XCOMM Moreover, some iso10646-1 fonts don't have any glyph at all +XCOMM in ISO8859-X ranges. + +XCOMM fs2 class +fs2 { + charset { + name ISO10646-1 + } + font { + primary ISO10646-1 + } +} + +XCOMM fs3 class (Kanji) +fs3 { + charset { + name JISX0208.1983-0:GL + } + font { + primary JISX0208.1983-0:GL + } +} + +XCOMM fs4 class (Korean Character) +fs4 { + charset { + name KSC5601.1987-0:GL + } + font { + primary KSC5601.1987-0:GL + } +} + +XCOMM fs5 class (Chinese Han Character) +fs5 { + charset { + name GB2312.1980-0:GL + } + font { + primary GB2312.1980-0:GL + } +} +XCOMM fs6 class (Half Kana) +fs6 { + charset { + name JISX0201.1976-0:GR + } + font { + primary JISX0201.1976-0:GR + vertical_rotate all + } +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name UTF-8 +mb_cur_max 6 +state_depend_encoding False + +XCOMM cs0 class +cs0 { + side GL:Default + length 1 + ct_encoding ISO8859-1:GL +} + +XCOMM cs1 class +cs1 { + side GR:Default + length 1 + ct_encoding ISO8859-1:GR +} + +XCOMM cs2 class +cs2 { + side GR + length 2 + ct_encoding JISX0208.1983-0:GL; JISX0208.1983-0:GR; JISX0208.1983-1:GL; JISX0208.1983-1:GR + +} + +XCOMM cs3 class +cs3 { + side GL + length 2 + ct_encoding KSC5601.1987-0:GL; KSC5601.1987-0:GR; KSC5601.1987-1:GL; KSC5601.1987-1:GR + +} + +XCOMM cs4 class +cs4 { + side GR + length 2 + ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR +} + +XCOMM cs5 class +cs5 { + side GR + length 1 + ct_encoding JISX0201.1976-0:GR +} + +XCOMM cs6 class +cs6 { + side none + ct_encoding ISO10646-1 +} + +END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/ko_KR.UTF-8 diff -u /dev/null xc/nls/XLC_LOCALE/ko_KR.UTF-8:1.1 --- /dev/null Thu Feb 27 12:28:20 2003 +++ xc/nls/XLC_LOCALE/ko_KR.UTF-8 Wed Oct 16 21:12:57 2002 @@ -0,0 +1,148 @@ +XCOMM $XFree86: xc/nls/XLC_LOCALE/ko_KR.UTF-8,v 1.1 2002/10/17 01:12:57 dawes Exp $ + +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET + +on_demand_loading True + +object_name generic + +XCOMM We leave the legacy encodings in for the moment, because we don't +XCOMM have that many ISO10646 fonts yet. +XCOMM fs0 class (7 bit ASCII) +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-1:GL + vertical_rotate all + } +} +XCOMM fs1 class (ISO8859 families) +fs1 { + charset { + name ISO8859-1:GR + } + font { + primary ISO8859-1:GR + } +} + +XCOMM ISO10646-1 is put after iso8859-1 to make usually better-looking +XCOMM iso8859-x fonts are picked up before iso10646-1 fonts. +XCOMM Moreover, some iso10646-1 fonts don't have any glyph at all +XCOMM in ISO8859-X ranges. + +XCOMM fs2 class +fs2 { + charset { + name ISO10646-1 + } + font { + primary ISO10646-1 + } +} + + +XCOMM fs3 class (Korean Character) +fs3 { + charset { + name KSC5601.1987-0:GL + } + font { + primary KSC5601.1987-0:GL + } +} +XCOMM fs4 class (Kanji) +fs4 { + charset { + name JISX0208.1983-0:GL + } + font { + primary JISX0208.1983-0:GL + } +} +XCOMM fs5 class (Chinese Han Character) +fs5 { + charset { + name GB2312.1980-0:GL + } + font { + primary GB2312.1980-0:GL + } +} +XCOMM fs6 class (Half Kana) +fs6 { + charset { + name JISX0201.1976-0:GR + } + font { + primary JISX0201.1976-0:GR + vertical_rotate all + } +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name UTF-8 +mb_cur_max 6 +state_depend_encoding False + +XCOMM cs0 class +cs0 { + side GL:Default + length 1 + ct_encoding ISO8859-1:GL +} + +XCOMM cs1 class +cs1 { + side GR:Default + length 1 + ct_encoding ISO8859-1:GR +} + +XCOMM cs2 class +cs2 { + side GL + length 2 + ct_encoding KSC5601.1987-0:GL; KSC5601.1987-0:GR; KSC5601.1987-1:GL; KSC5601.1987-1:GR + +} + +XCOMM cs3 class +cs3 { + side GR + length 2 + ct_encoding JISX0208.1983-0:GL; JISX0208.1983-0:GR; JISX0208.1983-1:GL; JISX0208.1983-1:GR + +} + +XCOMM cs4 class +cs4 { + side GR + length 2 + ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR +} + +XCOMM cs5 class +cs5 { + side GR + length 1 + ct_encoding JISX0201.1976-0:GR +} + +XCOMM cs6 class +cs6 { + side none + ct_encoding ISO10646-1 +} + +END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/th_TH.UTF-8 diff -u /dev/null xc/nls/XLC_LOCALE/th_TH.UTF-8:1.2 --- /dev/null Thu Feb 27 12:28:20 2003 +++ xc/nls/XLC_LOCALE/th_TH.UTF-8 Thu Jan 16 05:01:29 2003 @@ -0,0 +1,75 @@ +XCOMM $XConsortium: th_TH$ +XCOMM XLocale Database Sample for th_TH +XCOMM +XCOMM $XFree86: xc/nls/XLC_LOCALE/th_TH.UTF-8,v 1.2 2003/01/16 10:01:29 eich Exp $ +XCOMM +XCOMM Modified from origial th_TH.TACTIS + +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET +XCOMM fs0 class +fs0 { + charset { + name ISO10646-1 + } + font { + primary ISO10646-1 + } +} +XCOMM We leave the legacy encodings in for the moment, because we don't +XCOMM have that many ISO10646 fonts yet. +XCOMM fs0 class (7 bit ASCII) +fs1 { + charset ISO8859-1:GL + font ISO8859-1:GL +} +XCOMM fs1 class (Thai) +fs2 { + charset TIS620-0:GR + font TIS620-0:GR +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name UTF-8 +mb_cur_max 3 +state_depend_encoding False + + +wc_encoding_mask \x30000000 +wc_shift_bits 7 + + + + + + +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 GR:Default + length 1 + + wc_encoding \x30000000 + ct_encoding TIS620-0:GR +} + +END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/zh_TW.UTF-8 diff -u /dev/null xc/nls/XLC_LOCALE/zh_TW.UTF-8:1.1 --- /dev/null Thu Feb 27 12:28:20 2003 +++ xc/nls/XLC_LOCALE/zh_TW.UTF-8 Tue Jan 14 22:59:47 2003 @@ -0,0 +1,165 @@ +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_TW.UTF-8,v 1.1 2003/01/15 03:59:47 dawes Exp $ +XCOMM XLocale Database Sample for zh_TW.UTF-8 +XCOMM + +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET + +on_demand_loading True + +object_name generic + +XCOMM fs0 class +fs0 { + charset { + name ISO10646-1 + } + font { + primary ISO10646-1 + } +} +XCOMM We leave the legacy encodings in for the moment, because we don't +XCOMM have that many ISO10646 fonts yet. +XCOMM fs1 class (7 bit ASCII) +fs1 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-1:GL + vertical_rotate all + } +} +XCOMM fs2 class (ISO8859 families) +fs2 { + charset { + name ISO8859-1:GR + } + font { + primary ISO8859-1:GR + } +} +XCOMM fs3 class (Chinese Han Character (Traditional)) +fs3 { + charset { + name BIG5-0:GLGR + } + font { + primary BIG5-0:GLGR + substitute BIG5-0:GLGR + } +} +XCOMM fs4 class (Kanji) +fs4 { + charset { + name JISX0208.1983-0:GL + } + font { + primary JISX0208.1983-0:GL + } +} +XCOMM fs5 class (Korean Character) +fs5 { + charset { + name KSC5601.1987-0:GL + } + font { + primary KSC5601.1987-0:GL + } +} +XCOMM fs6 class (Chinese Han Character) +fs6 { + charset { + name GB2312.1980-0:GL + } + font { + primary GB2312.1980-0:GL + } +} +XCOMM fs7 class (Half Kana) +fs7 { + charset { + name JISX0201.1976-0:GR + } + font { + primary JISX0201.1976-0:GR + vertical_rotate all + } +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name UTF-8 +mb_cur_max 6 +state_depend_encoding False + +XCOMM cs0 class +cs0 { + side GL:Default + length 1 + ct_encoding ISO8859-1:GL +} + +XCOMM cs1 class +cs1 { + side GR:Default + length 1 + ct_encoding ISO8859-1:GR +} + +XCOMM cs2 class +cs2 { + side none + length 2 + byte1 \xa1,\xf9 + byte2 \x40,\x7e;\xa1,\xfe + + wc_encoding \x00008000 + ct_encoding BIG5-0:GLGR:\x1b\x25\x2f\x32 + + mb_conversion [\xa140,\xf9fe]->\x2140 + ct_conversion [\x2140,\x79fe]->\xa140 +} +XCOMM cs3 class +cs3 { + side GR + length 2 + ct_encoding JISX0208.1983-0:GL; JISX0208.1983-0:GR; JISX0208.1983-1:GL; JISX0208.1983-1:GR + +} + +XCOMM cs4 class +cs4 { + side GL + length 2 + ct_encoding KSC5601.1987-0:GL; KSC5601.1987-0:GR; KSC5601.1987-1:GL; KSC5601.1987-1:GR + +} + +XCOMM cs5 class +cs5 { + side GR + length 2 + ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR +} + +XCOMM cs6 class +cs6 { + side GR + length 1 + ct_encoding JISX0201.1976-0:GR +} + +XCOMM cs7 class +cs7 { + side none + ct_encoding ISO10646-1 +} + +END XLC_XLOCALE Index: xc/programs/Imakefile diff -u xc/programs/Imakefile:3.49 xc/programs/Imakefile:3.53 --- xc/programs/Imakefile:3.49 Fri Nov 2 18:29:28 2001 +++ xc/programs/Imakefile Tue Nov 19 23:43:50 2002 @@ -2,7 +2,7 @@ -XCOMM $XFree86: xc/programs/Imakefile,v 3.49 2001/11/02 23:29:28 dawes Exp $ +XCOMM $XFree86: xc/programs/Imakefile,v 3.53 2002/11/20 04:43:50 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" @@ -64,6 +64,10 @@ MKCFMSRCDIR = mkcfm #endif +#if (HasFreetype2 || BuildFreetype2Library) && BuildFontEncLib + MKFONTSCALEDIR = mkfontscale +#endif + #if BuildXIElib XIECLIENTDIRS = xieperf #endif @@ -87,11 +91,8 @@ #endif XPMCLIENTDIRS = cxpm sxpm -#if UseFreetype2 - XFTCACHEDIR = xftcache -#endif -#if BuildGLXLibrary && BuildGLULibrary +#if BuildGLXLibrary GLXCLIENTDIRS = glxinfo glxgears #endif @@ -103,6 +104,10 @@ XRANDRDIR = xrandr #endif +#if BuildXcursorgen + XCURSORGENDIR = xcursorgen +#endif + #if BuildServersOnly || !BuildClients SUBDIRS = $(XSSRCDIR) #else @@ -112,8 +117,8 @@ ico listres luit \ $(MAKEPSRESDIR) $(DPSCLIENTDIRS) \ $(MKCFMSRCDIR) \ - mkfontdir oclock $(PROXYMGRSRCDIR) $(RGBSRCDIR) $(RSTARTSRCDIR) \ - showfont \ + mkfontdir $(MKFONTSCALEDIR) oclock $(PROXYMGRSRCDIR) \ + $(RGBSRCDIR) $(RSTARTSRCDIR) showfont \ $(SMPROXYSRCDIR) $(TWMSRCDIR) viewres x11perf xauth xbiff xcalc \ xclipboard xclock \ xcmsdb $(XCONSOLESRCDIR) xditview $(XDMSRCDIR) xdpyinfo \ @@ -127,7 +132,7 @@ $(XTERMSRCDIR) $(XTRAPCLIENTDIRS) $(XVIDTUNESRCDIR) xwd xwininfo xwud \ $(XPMCLIENTDIRS) $(XVINFOSRCDIR) \ $(XSSRCDIR) $(XASSRCDIR) $(LBXPROXYSRCDIR) $(SCRIPTSDIR) \ - $(GLXCLIENTDIRS) $(XFTCACHEDIR) $(XRANDRDIR) + $(GLXCLIENTDIRS) $(XRANDRDIR) $(XCURSORGENDIR) #endif MakeSubdirs($(SUBDIRS)) Index: xc/programs/Xserver/Imakefile diff -u xc/programs/Xserver/Imakefile:3.254 xc/programs/Xserver/Imakefile:3.278 --- xc/programs/Xserver/Imakefile:3.254 Mon Jan 7 15:38:21 2002 +++ xc/programs/Xserver/Imakefile Mon Feb 17 12:06:40 2003 @@ -2,7 +2,7 @@ /* * Server Master Makefile */ -XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.254 2002/01/07 20:38:21 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.278 2003/02/17 17:06:40 dawes Exp $ #ifndef InstallXserverSetUID #define InstallXserverSetUID NO @@ -85,11 +85,10 @@ #else #if DoLoadableServer GLXLIB = GL/glx/ModuleLibraryTargetName(glx) \ - GL/mesa/src/ModuleLibraryTargetName(GLcore) + GL/mesa/GLcore/ModuleLibraryTargetName(GLcore) #else GLXLIB = GL/glx/ModuleLibraryTargetName(glx) \ - GL/mesa/src/X/ModuleLibraryTargetName(GLcoreX) \ - GL/mesa/src/ModuleLibraryTargetName(GLcore) \ + GL/mesa/GLcore/ModuleLibraryTargetName(GLcore) \ $(DRILIB) #endif #endif @@ -111,6 +110,9 @@ #if BuildXKB XKBEXT = xkb/LibraryTargetName(xkb) XKBDIR = xkb +#ifdef XFree86Version + XF86XKBOBJS = xkb/xf86KillSrv.o xkb/xf86VT.o xkb/xf86Private.o +#endif #endif #if BuildLBX LBXEXT = lbx/LibraryTargetName(lbx) \ @@ -198,21 +200,22 @@ RANDRLIB = $(RANDRDIR)/librandr.a #endif #if DoLoadableServer - EXTENSIONS = $(OTHEREXTS) $(RENDERLIB) $(RANDRLIB) + EXTENSIONS = $(OTHEREXTS) $(RANDRLIB) $(RENDERLIB) LOADABLEEXTS = $(PEXLIBS) $(XIEEXT) $(MISCEXT) $(DBEEXT) $(RECORDEXT) \ $(GLXEXT) $(XTRAPEXT) MISCEXT = Xext/LibraryTargetName(ext) OTHEREXTS = Xext/LibraryTargetName(exts) $(XKBEXT) $(XINPUTEXT) \ $(LBXEXT) $(SITEEXTS) #else - EXTENSIONS = $(OTHEREXTS) $(PEXLIBS) $(GLXEXT) $(RENDERLIB) $(RANDRLIB) + EXTENSIONS = $(OTHEREXTS) $(PEXLIBS) $(GLXEXT) $(RANDRLIB) \ + $(RENDERLIB) OTHEREXTS = Xext/LibraryTargetName(ext) $(XKBEXT) $(XINPUTEXT) \ $(XIEEXT) $(LBXEXT) $(DBEEXT) $(RECORDEXT) \ $(SITEEXTS) $(XTRAPEXT) #endif EXTDIRS = Xext $(XKBDIR) $(XIDIR) $(XIEDIR) $(PEXDIR) $(GLXDIR) \ $(LBXDIRS) $(DBEDIR) $(RECORDDIR) $(SITEEXTDIRS) \ - $(RENDERDIR) $(RANDRDIR) $(XTRAPDIR) + $(RANDRDIR) $(RENDERDIR) $(XTRAPDIR) #if BuildLBX || GzipFontCompression ZLIB = GzipLibrary #endif @@ -239,19 +242,19 @@ #else MFB = mfb/LibraryTargetName(mfb) FB = fb/LibraryTargetName(fb) - CFB = cfb/LibraryTargetName(cfb) \ - cfb16/LibraryTargetName(cfb16) \ + CFB = cfb16/LibraryTargetName(cfb16) \ cfb24/LibraryTargetName(cfb24) \ - cfb32/LibraryTargetName(cfb32) + cfb32/LibraryTargetName(cfb32) \ + cfb/LibraryTargetName(cfb) 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 = cfb4/LibraryTargetName(cfb4) \ + cfb/LibraryTargetName(cfb) + CFB16 = cfb16/LibraryTargetName(cfb16) \ + cfb/LibraryTargetName(cfb) + CFB24 = cfb24/LibraryTargetName(cfb24) \ + cfb/LibraryTargetName(cfb) + CFB32 = cfb32/LibraryTargetName(cfb32) \ + cfb/LibraryTargetName(cfb) SHADOW = miext/shadow/LibraryTargetName(shadow) LAYER = miext/layer/LibraryTargetName(layer) #endif @@ -264,11 +267,14 @@ FONTBASE = $(FONTLIBSRC)/fontbase.o \ $(FONTLIBSRC)/LibraryTargetName(fontbase) #if XserverStaticFontLib - FONT = $(FONTLIBSRC)/LibraryTargetName(Xfont) + FONT = $(FONTLIBSRC)/LibraryTargetName(Xfont) $(FREETYPE2LIB) #else FONT = $(LDPRELIB) $(XFONTLIB) #endif - FONTLIBS = $(FONT) $(XPFBLIBS) +#if FontLibSharedFreeType + SERVERFT2 = $(FREETYPE2LIB) +#endif + FONTLIBS = $(FONT) $(XPFBLIBS) $(SERVERFT2) #if UsbMouseSupport #if !HasLibUsb USB = $(XF86OSSRC)/bsd/libusb/LibraryTargetName(usb) @@ -287,7 +293,9 @@ #endif SYSLIBS = $(ZLIB) MathLibrary Krb5Libraries $(DBMLIBS) $(USB) \ $(PAMLIBS) $(EXTRASYSLIBS) +#if !HasCbrt CBRT = mi/LibraryTargetName(cbrt) +#endif STDDIRS = include dix os mi $(XPDDXDIR) $(EXTDIRS) XCOMM @@ -322,7 +330,7 @@ LMFCFBDIR = lmfcfb #endif -#if XdecServer +#if defined(XdecServer) && XdecServer XCOMM XCOMM Digital MIPS based WS server (ultrix 4.2 and beyond) XCOMM @@ -348,7 +356,7 @@ #endif /* XdecServer */ -#if XdecMultiDepthServer +#if defined(XdecMultiDepthServer) && XdecMultiDepthServer XCOMM XCOMM Digital MIPS based WS server (ultrix 4.2 and beyond) XCOMM Supports 8, 12, and 24 bit pixmaps @@ -372,7 +380,7 @@ #endif /* XdecMultiDepthServer */ -#if XsunServer +#if defined(XsunServer) && XsunServer XCOMM XCOMM Sun server XCOMM @@ -381,7 +389,7 @@ SUNDDXDIR = hw/sun #if DoLoadableServer SUNOBJS = hw/sun/sunInit.o hw/sun/sunInitExt.o hw/sun/stubs.o -#elif XF86Server +#elif defined(XF86Server) && XF86Server SUNOBJS = hw/sun/sunInit.o hw/sun/stubs.o #else SUNOBJS = hw/sun/sunInit.o @@ -402,7 +410,7 @@ #endif /* XsunServer */ -#if Xsun24Server +#if defined(Xsun24Server) && Xsun24Server XCOMM XCOMM Sun multiple pixmap depth (8, 12, 24) server XCOMM @@ -417,7 +425,7 @@ $(SUNDDXDIR) $(DEPDIRS) #if DoLoadableServer SUN24OBJS = hw/sun/sunInitMulti.o hw/sun/sunInitExt.o hw/sun/stubs.o -#elif XF86Server +#elif defined(XF86Server) && XF86Server SUN24OBJS = hw/sun/sunInitMulti.o hw/sun/stubs.o #else SUN24OBJS = hw/sun/sunInitMulti.o @@ -431,14 +439,14 @@ #endif /* Xsun24Server */ -#if XsunMonoServer +#if defined(XsunMonoServer) && XsunMonoServer XCOMM XCOMM Sun monochrome server XCOMM MFBDIR = mfb SUNDDXDIR = hw/sun SUNMDIRS = $(STDDIRS) $(MFBDIR) $(SUNDDXDIR) $(DEPDIRS) -#if XF86Server +#if defined(XF86Server) && XF86Server SUNMOBJS = hw/sun/sunInitMono.o hw/sun/sunInExMono.o hw/sun/stubs.o #else SUNMOBJS = hw/sun/sunInitMono.o hw/sun/sunInExMono.o @@ -452,7 +460,7 @@ #endif /* XsunMonoServer */ -#if XsunLynxServer +#if defined(XsunLynxServer) && XsunLynxServer XCOMM XCOMM Sun server for LynxOS microSPARC 2.4.0 XCOMM @@ -470,7 +478,7 @@ #endif /* XsunLynxServer */ -#if XsunLynxMonoServer +#if defined(XsunLynxMonoServer) && XsunLynxMonoServer XCOMM XCOMM Sun monochrome server for LynxOS microSPARC 2.4.0 XCOMM @@ -487,7 +495,7 @@ #endif /* XsunLynxMonoServer */ -#if XhpServer +#if defined(XhpServer) && XhpServer XCOMM XCOMM Hewlett Packard CFB Server XCOMM @@ -516,29 +524,29 @@ XCOMM XCOMM force non-parallel build of XF86 servers to prevent MUTEX overrides XCOMM -#if XF86Server +#if defined(XF86Server) && XF86Server XF86SERVER = XFree86 #endif -#if XnestServer +#if defined(XnestServer) && XnestServer XNEST = Xnest #endif -#if XVirtualFramebufferServer +#if defined(XVirtualFramebufferServer) && XVirtualFramebufferServer XVFB = Xvfb #endif -#if XWinServer && !MakeDllModules +#if defined(XWinServer) && XWinServer && !MakeDllModules XWIN = XWin #endif -#if defined(XF86Server) || \ - defined(XnestServer) || \ - defined(XVirtualFramebufferServer) || \ - (!MakeDllModules && defined(XWinServer)) +#if (defined(XF86Server) && XF86Server) || \ + (defined(XnestServer) && XnestServer) || \ + (defined(XVirtualFramebufferServer) && XVirtualFramebufferServer) || \ + (!MakeDllModules && defined(XWinServer) && XWinServer) MakeMutex($(XF86SERVER) $(XNEST) $(XVFB) $(XWIN)) #endif MakeMutex($(STDDIRS) mfb fb cfb cfb16 cfb24 cfb32) #endif -#if XF86Server +#if defined(XF86Server) && XF86Server XCOMM XCOMM XFree86 Server XCOMM @@ -605,7 +613,7 @@ XF86DDCLIB = $(XF86SRC)/ddc/LibraryTargetName(ddc) #endif #if XF86VBE -XF86VBELIB = $(XF86OSSRC)/vbe/vbe.o +XF86VBELIB = $(XF86SRC)/vbe/LibraryTargetName(vbe) #endif #if XF86RAC XF86RACLIB = $(XF86SRC)/rac/LibraryTargetName(rac) @@ -623,38 +631,40 @@ XF86DRVOBJS = $(XF86SRC)/drivers/drvConf.o XF86DRVLIBS = $(XF86DRIVERLIB) $(XF86RAMDACLIB) $(XF86DDCLIB) $(XF86I2CLIB) \ $(XF86XAALIB) $(XF86VGAHWLIB) $(XF86FBDEVHWLIB) \ - $(XF8_32WIDLIB) $(XF8_32BPPLIB) $(XF86VBELIB) \ + $(XF8_32WIDLIB) $(XF8_32BPPLIB) \ $(XF8_16BPPLIB) $(XF24_32BPPLIB) \ $(XF4BPPLIB) $(XF1BPPLIB) $(XFSHADOWFBLIB) $(AFBLIB) XF86IDRVOBJS = $(XF86SRC)/input/drvConf.o XF86IDRVLIBS = $(XF86IDRIVERLIB) XF86SCANLIB = $(XF86SRC)/scanpci/LibraryTargetName(scanpci) XF86LIBS = $(MEMDEBUGLIB) $(XF86INIT) $(XF86COMLIB) $(XF86RACLIB) \ - $(XF86PARSLIB) $(XF86OSLIB) $(XF86INT10LIB) + $(XF86PARSLIB) $(XF86VBELIB) $(XF86OSLIB) $(XF86INT10LIB) #else XF86LIBS = $(MEMDEBUGLIB) $(XF86INIT) $(XF86COMLIB) \ $(XF86PARSLIB) $(XF86OSLIB) #endif #if DoLoadableServer XF86LOADERLIB = $(XF86SRC)/loader/LibraryTargetName(loader) -XF86MAINLIBS = MiExtLibs PreFbLibsNoFont \ +XF86MAINLIBS = PreFbLibsNoFont \ $(FONTBASE) $(OTHEREXTS) $(XF86COMLIB) \ NoMfbPostFbLibs XF86SERVERSYSLIBS = $(SYSLIBS) $(LIBDL) $(LIBREGEX) +XF86SERVERLIBS = $(XF86DRVLIBS) $(XF86IDRVLIBS) $(XF86LIBS) $(XF86LOADERLIB) \ + $(XF86COMLIB) $(XF86MAINLIBS) $(XF86SCANLIB) $(XF86OSLIB) #else XF86MAINLIBS = MiExtLibs AllFBLibs $(XF86COMLIB) $(MI) XF86SERVERSYSLIBS = $(FONTLIBS) $(SYSLIBS) $(LIBDL) $(LIBREGEX) -#endif -XF86SERVEROBJS = $(XF86DRVOBJS) $(XF86IDRVOBJS) XF86SERVERLIBS = $(XF86DRVLIBS) $(XF86IDRVLIBS) $(XF86LIBS) $(XF86LOADERLIB) \ $(XF86COMLIB) $(XF86MAINLIBS) $(XF86SCANLIB) $(XF86OSLIB) \ $(XF86DDCLIB) +#endif +XF86SERVEROBJS = $(XF86XKBOBJS) $(XF86DRVOBJS) $(XF86IDRVOBJS) #if HasParallelMake MakeMutex($(XF86SERVERSUBDIRS) $(XF86SERVERLIBS) $(XF86SERVERSYSLIBS)) #endif #if ForceServerRemake $(XF86SERVERLIBS) $(XF86SERVERSYSLIBS):: $(XF86SERVERSUBDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif SetUIDServerTarget(XFree86,$(XF86SERVERSUBDIRS),$(XF86SERVEROBJS), \ $(XF86SERVERLIBS),$(XF86SERVERSYSLIBS)) @@ -666,15 +676,18 @@ #endif #endif /* XF86Server */ -#ifdef KDriveXServer +#if defined(KDriveXServer) && KDriveXServer XCOMM XCOMM Tiny X server section XCOMM KDRIVE = hw/kdrive +#if HasTsLib + KDTSLIB = -lts +#endif #ifdef LinuxArchitecture KDOSDIR = $(KDRIVE)/linux - KDOS = $(KDOSDIR)/LibraryTargetName(linux) + KDOS = $(KDOSDIR)/LibraryTargetName(linux) $(KDTSLIB) #endif #ifdef VXWORKS @@ -694,9 +707,9 @@ #define StdKdDirs $(KDRIVE) $(KDOSDIR) $(PSEUDO8DIR) fb $(DEPDIRS) #define StdKdSysLibs $(FONTLIBS) $(SYSLIBS) -#define KdLibs $(KD) $(KDOS) $(PSEUDO8) MiExtLibs $(RENDERLIB) $(RANDRLIB) +#define KdLibs $(KD) $(KDOS) $(PSEUDO8) MiExtLibs $(RANDRLIB) $(RENDERLIB) -#if XfbdevServer +#if defined(XfbdevServer) && XfbdevServer XCOMM XCOMM server with Keith's fbdev driver only XCOMM @@ -716,13 +729,13 @@ #endif #if ForceServerRemake $(FBDEVOBJS) $(XFBDEV) $(FBDEVLIBS) $(FBDEVSYSLIBS):: $(FBDEVDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xfbdev,$(FBDEVDIRS),$(FBDEVOBJS), \ $(FBDEVLIBS),$(FBDEVSYSLIBS)) #endif /* XfbdevServer */ -#if XSavageServer +#if defined(XSavageServer) && XSavageServer XCOMM XCOMM server with Keith's S3 Savage driver XCOMM @@ -742,13 +755,13 @@ #endif #if ForceServerRemake $(SAVAGEOBJS) $(XSAVAGE) $(SAVAGELIBS) $(SAVAGESYSLIBS):: $(SAVAGEDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xsavage,$(SAVAGEDIRS),$(SAVAGEOBJS), \ $(SAVAGELIBS),$(SAVAGESYSLIBS)) #endif /* XSavageServer */ -#if XIgsServer +#if defined(XIgsServer) && XIgsServer XCOMM XCOMM server with Keith's S3 Igs driver XCOMM @@ -768,13 +781,13 @@ #endif #if ForceServerRemake $(IGSOBJS) $(XIGS) $(IGSLIBS) $(IGSSYSLIBS):: $(IGSDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xigs,$(IGSDIRS),$(IGSOBJS), \ $(IGSLIBS),$(IGSSYSLIBS)) #endif /* XIgsServer */ -#if XTridentServer +#if defined(XTridentServer) && XTridentServer XCOMM XCOMM server with Keith's TRIDENT Cyber9525 driver XCOMM @@ -799,13 +812,13 @@ #endif #if ForceServerRemake $(TRIDENTOBJS) $(TRIDENTLIBS) $(TRIDENTSYSLIBS):: $(TRIDENTDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xtrident,$(TRIDENTDIRS),$(TRIDENTOBJS), \ $(TRIDENTLIBS),$(TRIDENTSYSLIBS)) #endif /* XTridentServer */ -#if XchipsServer +#if defined(XchipsServer) && XchipsServer XCOMM XCOMM server with Keith's C&T driver XCOMM @@ -828,13 +841,13 @@ #endif #if ForceServerRemake $(CHIPSOBJS) $(CHIPSLIBS) $(CHIPSSYSLIBS):: $(CHIPSDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xchips,$(CHIPSDIRS),$(CHIPSOBJS), \ $(CHIPSLIBS),$(CHIPSSYSLIBS)) #endif /* XchipsServer */ -#if Xmach64Server +#if defined(Xmach64Server) && Xmach64Server XCOMM XCOMM server with Keith's Mach64 driver (for Mobility 1 machines) XCOMM @@ -857,13 +870,13 @@ #endif #if ForceServerRemake $(MACH64OBJS) $(MACH64LIBS) $(MACH64SYSLIBS):: $(MACH64DIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xmach64,$(MACH64DIRS),$(MACH64OBJS), \ $(MACH64LIBS),$(MACH64SYSLIBS)) #endif /* Xmach64Server */ -#if Xi810Server +#if defined(Xi810Server) && Xi810Server XCOMM XCOMM server with Intel i810 driver XCOMM @@ -887,14 +900,14 @@ #endif #if ForceServerRemake $(I810OBJS) $(I810LIBS) $(I810SYSLIBS):: $(I810DIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xi810,$(I810DIRS),$(I810OBJS), \ $(I810LIBS),$(I810SYSLIBS)) #endif /* Xi810Server */ -#if XSis530Server +#if defined(XSis530Server) && XSis530Server XCOMM XCOMM server with Keith's SiS 530 driver XCOMM @@ -914,13 +927,13 @@ #endif #if ForceServerRemake $(SIS530OBJS) $(SIS530LIBS) $(SIS530SYSLIBS):: $(SIS530DIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xsis530,$(SIS530DIRS),$(SIS530OBJS), \ $(SIS530LIBS),$(SIS530SYSLIBS)) #endif /* XSis530Server */ -#if XTrioServer +#if defined(XTrioServer) && XTrioServer XCOMM XCOMM server with Keith's S3 Trio driver XCOMM @@ -940,13 +953,13 @@ #endif #if ForceServerRemake $(TRIOOBJS) $(TRIOLIBS) $(TRIOSYSLIBS):: $(TRIODIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xtrio,$(TRIODIRS),$(TRIOOBJS), \ $(TRIOLIBS),$(TRIOSYSLIBS)) #endif /* XTrioServer */ -#if XipaqServer +#if defined(XipaqServer) && XipaqServer XCOMM XCOMM server with Alan's HP VGA Out PCMCIA driver & fbdev XCOMM @@ -974,13 +987,13 @@ #endif #if ForceServerRemake $(IPAQOBJS) $(IPAQLIBS) $(IPAQSYSLIBS):: $(IPAQDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xipaq,$(IPAQDIRS),$(IPAQOBJS), \ $(IPAQLIBS),$(IPAQSYSLIBS)) #endif /* XIPAQServer */ -#if XTS300Server +#if defined(XTS300Server) && XTS300Server XCOMM XCOMM server with Keith's S3 Trio and SiS530 driver for the TS300/TS400 XCOMM @@ -1006,13 +1019,13 @@ #endif #if ForceServerRemake $(TS300OBJS) $(TS300LIBS) $(TS300SYSLIBS):: $(TS300DIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xts300,$(TS300DIRS),$(TS300OBJS), \ $(TS300LIBS),$(TS300SYSLIBS)) #endif /* XTS300Server */ -#if XItsyServer +#if defined(XItsyServer) && XItsyServer XCOMM XCOMM server with Keith's FB driver only XCOMM @@ -1031,13 +1044,13 @@ #endif #if ForceServerRemake $(ITSYOBJS) $(ITSYLIBS) $(ITSYSYSLIBS):: $(ITSYDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xitsy,$(ITSYDIRS),$(ITSYOBJS), \ $(ITSYLIBS),$(ITSYSYSLIBS)) #endif /* XItsyServer */ -#if XvesaServer +#if defined(XvesaServer) && XvesaServer XCOMM XCOMM server with vesa driver only based on Keith's server XCOMM @@ -1057,7 +1070,7 @@ #endif #if ForceServerRemake $(VESAOBJS) $(XVESA) $(VESALIBS) $(VESASYSLIBS):: $(VESADIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xvesa,$(VESADIRS),$(VESAOBJS), \ $(VESALIBS),$(VESASYSLIBS)) @@ -1068,7 +1081,7 @@ $(VESADIR) $(PCMCIADIR) $(IPAQDIR) $(MACH64DIR) $(CHIPSDIR) #endif /* KDriveXServer */ -#if XprtServer +#if defined(XprtServer) && XprtServer XCOMM XCOMM Print Server XCOMM @@ -1097,13 +1110,13 @@ #endif #if ForceServerRemake $(XPOBJS) $(XPLIBS) $(XPSYSLIBS):: $(XPSUBDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xprt,$(XPSUBDIRS),$(XPOBJS), \ $(XPLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XPSYSLIBS)) #endif /* XprtServer */ -#if XnestServer +#if defined(XnestServer) && XnestServer XCOMM XCOMM Server with Xlib-based ddx XCOMM @@ -1128,14 +1141,14 @@ #endif #if ForceServerRemake $(XNESTOBJS) $(XNESTLIBS) $(XNESTSYSLIBS):: $(XNESTDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xnest,$(XNESTDIRS),$(XNESTOBJS), \ $(XNESTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XNESTSYSLIBS)) #endif /* XnestServer */ -#if XnonServer +#if defined(XnonServer) && XnonServer XCOMM XCOMM non server, just compile sources for build test XCOMM @@ -1150,7 +1163,7 @@ #endif /* XnonServer */ -#if XVirtualFramebufferServer +#if defined(XVirtualFramebufferServer) && XVirtualFramebufferServer XCOMM XCOMM server with Virtual (malloced) framebuffer XCOMM @@ -1178,27 +1191,39 @@ #endif #if ForceServerRemake $(XVFBOBJS) $(XVFB) $(XVFBLIBS) $(XVFBSYSLIBS):: $(XVFBDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(Xvfb,$(XVFBDIRS),$(XVFBOBJS), \ $(XVFBLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(XVFBSYSLIBS)) #endif /* XVirtualFramebufferServer */ -#if XWinServer +#if defined(XWinServer) && XWinServer XCOMM XCOMM X Server for MS Windows XCOMM FBDIR = fb SHADOWDIR = miext/shadow +#if 0 LAYERDIR = miext/layer +#else +LAYERDIR = +#endif XWINDDXDIR = hw/xwin +XWINPARSERDIR = hw/xfree86/parser +XWINPARSERLIB = $(XWINPARSERDIR)/LibraryTargetName(xf86config) XWINLIB = $(XWINDDXDIR)/LibraryTargetName(Xwin) XWINDIRS = $(STDDIRS) $(FBDIR) $(SHADOWDIR) $(LAYERDIR) $(XWINDDXDIR) \ - $(DEPDIRS) -XWINOBJS = $(XWINDDXDIR)/stubs.o -XWINLIBS = PreFbLibs $(XWINLIB) FbPostFbLibs $(LAYER) $(SHADOW) -XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) -lgdi32 -lddraw + $(DEPDIRS) $(XWINPARSERDIR) +XWINOBJS = $(XWINDDXDIR)/stubs.o $(XWINDDXDIR)/XWin.res +#if 0 +XWINLIBS = PreFbLibs $(XWINLIB) FbPostFbLibs $(LAYER) $(SHADOW) \ + $(XWINPARSERLIB) +#else +XWINLIBS = PreFbLibs $(XWINLIB) FbPostFbLibs $(SHADOW) \ + $(XWINPARSERLIB) +#endif +XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) -lgdi32 /* * These flags cause XWin.exe to be a Windows executable, which @@ -1216,7 +1241,7 @@ #if ForceServerRemake $(XWINOBJS) $(XWINLIB) $(XWINLIBS) $(XWINSYSLIBS):: $(XWINDIRS) - @if [ -f $@ ]; then touch $@; fi + @if [ -f $@ ]; then touch $@ >/dev/null 2>&1 || exit 0; fi #endif ServerTarget(XWin,$(XWINDIRS),$(XWINOBJS), \ @@ -1238,51 +1263,84 @@ VPATH = $(BUILDLIBDIR):$(USRLIBDIR) #endif -#if XDarwinServer +#if defined(XDarwinServer) && XDarwinServer XCOMM XCOMM X Darwin server for Mac OS X / Darwin XCOMM FBDIR = fb +SHADOWDIR = miext/shadow DARWINDDXDIR = hw/darwin -DARWINDIRS = $(STDDIRS) $(FBDIR) $(DARWINDDXDIR) $(DEPDIRS) +DARWINDIRS = $(STDDIRS) $(FBDIR) $(SHADOWDIR) $(DARWINDDXDIR) $(DEPDIRS) DARWINOBJS = $(DARWINDDXDIR)/xfIOKitStartup.o -DARWINLIBS = PreFbLibs $(DARWINDDXDIR)/LibraryTargetName(darwin) FbPostFbLibs +DARWINLIBS = PreFbLibs $(DARWINDDXDIR)/LibraryTargetName(darwin) +DARWINEXTLIBS = MiExtLibs FbPostFbLibs DARWINSYSLIBS = $(FONTLIBS) $(SYSLIBS) -framework IOKit /* * IOKit X server */ SetUIDServerTarget(XDarwin,$(DARWINDIRS),$(DARWINOBJS), \ - $(DARWINLIBS),$(DARWINSYSLIBS)) + $(DARWINLIBS) $(DARWINEXTLIBS),$(DARWINSYSLIBS)) #if DarwinQuartzSupport -/* - * We need the IOKit framework. For Quartz support, we also need - * CoreGraphics in ApplicationServices, HIToolbox in Carbon, CoreAudio - * and Cocoa. - */ +#if GlxUseAqua + +AQUAEXTENSIONS = $(OTHEREXTS) $(PEXLIBS) $(RANDRLIB) $(RENDERLIB) +#if !BuildXinerama +#define AquaPostFbLibs NoMfbBarePostFbLibs $(AQUAEXTENSIONS) +#else +#define AquaPostFbLibs $(AQUAEXTENSIONS) NoMfbBarePostFbLibs $(AQUAEXTENSIONS) +#endif +QUARTZEXTLIBS = MiExtLibs $(FB) AquaPostFbLibs + +#else /* !GlxUseAqua */ + +QUARTZEXTLIBS = $(DARWINEXTLIBS) + +#endif /* GlxUseAqua */ + QUARTZSYSLIBS = -framework ApplicationServices -framework Cocoa \ -framework CoreAudio -framework Carbon -ObjC -QUARTZOBJS = $(DARWINDDXDIR)/bundle/quartzStartup.o +QUARTZOBJS = $(DARWINDDXDIR)/quartz/quartzStartup.o #if NothingOutsideProjectRoot -XDARWINAPPDIR = $(BINDIR)/XDarwin.app/Contents/MacOS +XDARWINAPPDIR = $(BINDIR)/XDarwin.app/Contents #else -XDARWINAPPDIR = /Applications/XDarwin.app/Contents/MacOS +XDARWINAPPDIR = /Applications/XDarwin.app/Contents #endif +AGLBUNDLEDIR = $(XDARWINAPPDIR)/Resources/glxAGL.bundle/Contents/MacOS +MESABUNDLEDIR = $(XDARWINAPPDIR)/Resources/glxMesa.bundle/Contents/MacOS /* * Quartz X server (installed in its application bundle) */ SetUIDServerTarget(XDarwinApp,$(DARWINDIRS),$(QUARTZOBJS), \ - $(DARWINLIBS) $(DARWINDDXDIR)/bundle/LibraryTargetName(XQuartz), \ - $(DARWINSYSLIBS) $(QUARTZSYSLIBS)) + $(DARWINLIBS) $(DARWINDDXDIR)/quartz/LibraryTargetName(XQuartz) \ + $(QUARTZEXTLIBS),$(DARWINSYSLIBS) $(QUARTZSYSLIBS)) install:: - mkdir -p $(DESTDIR)$(XDARWINAPPDIR) - mv $(DESTDIR)$(BINDIR)/XDarwinApp $(DESTDIR)$(XDARWINAPPDIR)/XDarwin + $(MKDIRHIER) $(DESTDIR)$(XDARWINAPPDIR)/MacOS + $(MV) $(DESTDIR)$(BINDIR)/XDarwinApp \ + $(DESTDIR)$(XDARWINAPPDIR)/MacOS/XDarwin -(cd $(DESTDIR)$(BINDIR); $(RM) XDarwinQuartz; \ - $(LN) $(XDARWINAPPDIR)/XDarwin XDarwinQuartz) + $(LN) $(XDARWINAPPDIR)/MacOS/XDarwin XDarwinQuartz) + +/* + * GLX bundles for Quartz (installed in their own bundles inside XDarwin's) + */ +AllTarget(glxAGL) +glxAGL: XDarwinApp + $(CC) -bundle -o glxAGL GL/glx/glxext.o GL/glx/libglx.a \ + GL/aqua/libAquaGLcore.a -framework AGL -framework OpenGL \ + -bundle_loader XDarwinApp +InstallProgram(glxAGL,$(AGLBUNDLEDIR)) + +AllTarget(glxMesa) +glxMesa: XDarwinApp + $(CC) -bundle -o glxMesa GL/glx/glxext.o \ + GL/glx/libglx.a GL/mesa/GLcore/libGLcore.a \ + -bundle_loader XDarwinApp +InstallProgram(glxMesa,$(MESABUNDLEDIR)) #else /* !DarwinQuartzSupport */ @@ -1300,10 +1358,10 @@ $(HPDDXDIR) $(XFREE86DDXDIR) $(XWINDDXDIR) $(DARWINDDXDIR) \ $(XVFBDDXDIR) $(XNESTDDXDIR) SUBDIRS = $(STDDIRS) $(MFBDIR) $(CFBDIRS) $(IPLANDIRS) $(ILBMDIR) $(AFBDIR) \ - $(LMFCFBDIR) $(DDXDIRS) $(FBDIR) $(KDRIVEDIRS) $(MIEXTDIRS) + $(LMFCFBDIR) $(DDXDIRS) $(FBDIR) $(KDRIVEDIRS) $(MIEXTDIRS) \ + $(XWINPARSERDIR) -#if defined(ServerToInstall) && \ - !defined(OS2Architecture) +#if defined(ServerToInstall) && !defined(OS2Architecture) install:: -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) ServerToInstall X) #endif Index: xc/programs/Xserver/XFree86.def diff -u xc/programs/Xserver/XFree86.def:1.3 xc/programs/Xserver/XFree86.def:1.4 --- xc/programs/Xserver/XFree86.def:1.3 Sun Aug 2 03:54:02 1998 +++ xc/programs/Xserver/XFree86.def Fri May 31 14:45:53 2002 @@ -1,5 +1,5 @@ NAME XFree86 NOTWINDOWCOMPAT -DESCRIPTION "X11R6 XFree86 3.9N Xserver EMX09C" +DESCRIPTION "@#XFREE86:4.2.0#@ $XFree86: xc/programs/Xserver/XFree86.def,v 1.4 2002/05/31 18:45:53 dawes Exp $" PROTMODE EXETYPE OS2 Index: xc/programs/Xserver/Xnest.def diff -u xc/programs/Xserver/Xnest.def:3.2 xc/programs/Xserver/Xnest.def:3.3 --- xc/programs/Xserver/Xnest.def:3.2 Thu Oct 17 11:14:04 1996 +++ xc/programs/Xserver/Xnest.def Fri May 31 14:45:53 2002 @@ -1,4 +1,4 @@ NAME Xnest NOTWINDOWCOMPAT -DESCRIPTION "X11R6 XFree86 3.2 Xserver XNEST EMX09C" +DESCRIPTION "@#XFREE86:4.2.0#@ $XFree86: xc/programs/Xserver/Xnest.def,v 3.3 2002/05/31 18:45:53 dawes Exp $" PROTMODE EXETYPE OS2 Index: xc/programs/Xserver/Xserver.man diff -u xc/programs/Xserver/Xserver.man:3.18 xc/programs/Xserver/Xserver.man:3.21 --- xc/programs/Xserver/Xserver.man:3.18 Wed Dec 26 14:14:06 2001 +++ xc/programs/Xserver/Xserver.man Tue Nov 19 18:18:09 2002 @@ -1,15 +1,15 @@ .\" $Xorg: Xserver.man,v 1.4 2001/02/09 02:04:07 xorgcvs Exp $ .\" Copyright 1984 - 1991, 1993, 1994, 1998 The Open Group -.\" +.\" .\" 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. -.\" +.\" .\" 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. @@ -17,12 +17,12 @@ .\" 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.18 2001/12/26 19:14:06 dawes Exp $ +.\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.21 2002/11/19 23:18:09 dawes Exp $ .TH XSERVER 1 __xorgversion__ .SH NAME Xserver \- X Window System display server @@ -35,13 +35,13 @@ 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. +The X server is usually started from the X Display Manager program \fIxdm\fP(1). 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 +\fIxinit\fP(1) 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. @@ -50,20 +50,24 @@ 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. +devices (e.g. \fI/dev/mouse\fP) 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 +Many X servers have device-specific command line options. See the manual +pages for the individual servers for more details; a list of +server-specific manual pages is provided in the SEE ALSO section below. +.PP 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. +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. +NAMES section of the \fIX\fP(__miscmansuffix__) 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 @@ -76,7 +80,7 @@ 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 +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 @@ -85,7 +89,7 @@ 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 +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 @@ -97,6 +101,10 @@ .B \-bs disables backing store support on all screens. .TP 8 +.B \-br +sets the default root window to solid black instead of the standard root weave +pattern. +.TP 8 .B \-c turns off key-click. .TP 8 @@ -109,8 +117,8 @@ Not obeyed by all servers. .TP 8 .B \-co \fIfilename\fP -sets name of RGB color database. The default is <XRoot>/lib/X11/rgb, -where <XRoot> refers to the root of the X11 install tree. +sets name of RGB color database. The default is +\fI__projectroot__/lib/X11/rgb\fP. .ig .TP 8 .B \-config \fIfilename\fP @@ -154,13 +162,10 @@ .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 +disables a transport type. For example, TCP/IP connections can be disabled with -.B \-nolisten tcp +.BR "\-nolisten tcp" . .TP 8 .B \-noreset prevents a server reset when the last client connection is closed. This @@ -229,7 +234,8 @@ This is a no-op for most implementations. .TP 8 .B [+-]xinerama -enable(+) or disable(-) XINERAMA extension. Default is disabled. +enables(+) or disables(-) the XINERAMA extension. The default state is +disabled. .SH SERVER DEPENDENT OPTIONS Some X servers accept the following options: .TP 8 @@ -260,30 +266,36 @@ 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. +.B \-query \fIhostname\fP +enables XDMCP and sends Query packets to the specified +.IR hostname . .TP 8 .B \-broadcast -Enable XDMCP and broadcast BroadcastQuery packets to the network. The +enable XDMCP and broadcasts 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. +.B \-indirect \fIhostname\fP +enables XDMCP and send IndirectQuery packets to the specified +.IR hostname . +.TP 8 +.B \-port \fIport-number\fP +uses the specified \fIport-number\fP for XDMCP packets, instead of the +default. This option must be specified before any \-query, \-broadcast or +\-indirect options. .TP 8 .B \-from \fIlocal-address\fP -Specify the local address to send the XDMCP query from. This -is currently only implemented for direct (\-query) XDMCP queries. +specifies the local address to connect from (useful if the connecting host +has multiple network interfaces). The \fIlocal-address\fP may be expressed +in any form acceptable to the host platform's \fIgethostbyname\fP(3) +implementation. .TP 8 .B \-once -Causes the server to terminate (rather than reset) when the XDMCP session ends. +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 +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 @@ -295,35 +307,43 @@ 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: +X servers that support the XKEYBOARD (a.k.a. \(oqXKB\(cq) extension accept the +following options: .TP 8 -.B \-xkbdir \fIdirectory\fP -base directory for keyboard layout files +.B [+-]kb +enables(+) or disables(-) the XKEYBOARD extension. .TP 8 -.B \-xkbmap \fIfilename\fP -keyboard description to load on startup +.BR [+-]accessx " [ \fItimeout\fP [ \fItimeout_mask\fP [ \fIfeedback\fP [ \fIoptions_mask\fP ] ] ] ]" +enables(+) or disables(-) AccessX key sequences. .TP 8 -.B [+-]accessx -enable(+) or disable(-) AccessX key sequences +.B \-xkbdir \fIdirectory\fP +base directory for keyboard layout files. This option is not available +for setuid X servers (i.e., when the X server's real and effective uids +are different). .TP 8 .B \-ar1 \fImilliseconds\fP -sets the length of time in milliseconds that a key must be depressed before -autorepeat starts +sets the autorepeat delay (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. +sets the autorepeat interval (length of time in milliseconds that should +elapse between autorepeat-generated keystrokes). +.TP 8 +.B \-noloadxkb +disables loading of an XKB keymap description on server startup. +.TP 8 +.B \-xkbdb \fIfilename\fP +uses \fIfilename\fP for default keyboard keymaps. +.TP 8 +.B \-xkbmap \fIfilename\fP +loads keyboard description in \fIfilename\fP on server startup. .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. +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, @@ -469,7 +489,7 @@ .PP .ta 3i 4i .nf -version-1 +version-1 XCOMM Allow reading of application resources, but not writing. property RESOURCE_MANAGER root ar iw @@ -543,13 +563,13 @@ 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. +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. +SUN-DES-1, and MIT-KERBEROS-5. See the \fIXsecurity\fP(__miscmansuffix__) +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 @@ -560,7 +580,7 @@ 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 +file. See \fIxauth\fP(1) 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 @@ -574,7 +594,7 @@ or trailing spaces on any lines. For example: .sp .in +8 -.nf +.nf joesworkstation corporate.company.com star:: @@ -586,20 +606,20 @@ 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 +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\fP(1) 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. +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 +the \fIxauth\fP(1) 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 @@ -635,66 +655,66 @@ by the \fIfont path\fP. .LP The default font path is -"<XRoot>/lib/X11/fonts/misc/, -<XRoot>/lib/X11/fonts/Speedo/, -<XRoot>/lib/X11/fonts/Type1/, -<XRoot>/lib/X11/fonts/75dpi/, -<XRoot>/lib/X11/fonts/100dpi/" . -where <XRoot> refers to the root of the X11 install tree. +__projectroot__/lib/X11/fonts/misc/, +__projectroot__/lib/X11/fonts/Speedo/, +__projectroot__/lib/X11/fonts/Type1/, +__projectroot__/lib/X11/fonts/75dpi/, +__projectroot__/lib/X11/fonts/100dpi/" . .LP -The font path can be set with the \fB\-fp\fP option or by \fIxset(1)\fP +The font path can be set with the \fB\-fp\fP option or by \fIxset\fP(1) after the server has started. .SH FILES .TP 30 -/etc/X\fBn\fP.hosts +.I /etc/X\fBn\fP.hosts Initial access control list for display number \fBn\fP .TP 30 -<XRoot>/lib/X11/fonts/misc, <XRoot>/lib/X11/fonts/75dpi, <XRoot>/lib/X11/fonts/100dpi +.IR __projectroot__/lib/X11/fonts/misc , __projectroot__/lib/X11/fonts/75dpi , __projectroot__/lib/X11/fonts/100dpi Bitmap font directories .TP 30 -<XRoot>/lib/X11/fonts/Speedo, <XRoot>/lib/X11/fonts/Type1 +.IR __projectroot__/lib/X11/fonts/Speedo , __projectroot__/lib/X11/fonts/Type1 Outline font directories -.TP 30 -<XRoot>/lib/X11/fonts/PEX -PEX font directories +.\" .TP 30 +.\" __projectroot__/lib/X11/fonts/PEX +.\" PEX font directories .TP 30 -<XRoot>/lib/X11/rgb.txt +.I __projectroot__/lib/X11/rgb.txt Color database .TP 30 -/tmp/.X11-unix/X\fBn\fP +.I /tmp/.X11-unix/X\fBn\fP Unix domain socket for display number \fBn\fP .TP 30 -/tmp/rcX\fBn\fP +.IR /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 +.I /usr/adm/X\fBn\fPmsgs +Error log file for display number \fBn\fP if run from \fIinit\fP(8) .TP 30 -<XRoot>/lib/X11/xdm/xdm-errors -Default error log file if the server is run from \fIxdm(1)\fP -.LP -Note: <XRoot> refers to the root of the X11 install tree. +.I __projectroot__/lib/X11/xdm/xdm-errors +Default error log file if the server is run from \fIxdm\fP(1) .SH "SEE ALSO" -General information: X(__miscmansuffix__) +General information: \fIX\fP(__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), +Fonts: \fIbdftopcf\fP(1), \fImkfontdir\fP(1), \fIxfs\fP(1), +\FIxlsfonts\fP(1), \fIxfontsel\fP(1), \fIxfd\fP(1), .I "X Logical Font Description Conventions" .PP -Security: Xsecurity(__miscmansuffix__), xauth(1), Xau(1), xdm(1), xhost(1), xfwp(1) +Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1), +\fIxdm\fP(1), \fIxhost\fP(1), \fIxfwp\fP(1) .I "Security Extension Specification" .PP -Starting the server: xdm(1), xinit(1) +Starting the server: \fIxdm(1)\fP, \fIxinit\fP(1) .PP -Controlling the server once started: xset(1), xsetroot(1), xhost(1) +Controlling the server once started: \fIxset\fP(1), \fIxsetroot\fP(1), +\fIxhost\fP(1) .PP -Server-specific man pages: -Xdec(1), XmacII(1), Xsun(1), Xnest(1), Xvfb(1), -XFree86(1), XDarwin(1). +Server-specific man pages: +\fIXdec\fP(1), \fIXmacII\fP(1), \fIXsun\fP(1), \fIXnest\fP(1), +\fIXvfb\fP(1), \fIXFree86\fP(1), \fIXDarwin\fP(1). .PP Server internal documentation: .I "Definition of the Porting Layer for the X v11 Sample Server" Index: xc/programs/Xserver/Xvfb.def diff -u xc/programs/Xserver/Xvfb.def:3.2 xc/programs/Xserver/Xvfb.def:3.3 --- xc/programs/Xserver/Xvfb.def:3.2 Thu Oct 17 11:14:06 1996 +++ xc/programs/Xserver/Xvfb.def Fri May 31 14:45:53 2002 @@ -1,4 +1,4 @@ NAME Xvfb WINDOWCOMPAT -DESCRIPTION "X11R6 XFree86 3.2 Xserver Xvfb EMX09C" +DESCRIPTION "@#XFREE86:4.2.0#@ $XFree86: xc/programs/Xserver/Xvfb.def,v 3.3 2002/05/31 18:45:53 dawes Exp $" PROTMODE EXETYPE OS2 Index: xc/programs/Xserver/GL/Imakefile diff -u xc/programs/Xserver/GL/Imakefile:1.8 xc/programs/Xserver/GL/Imakefile:1.10 --- xc/programs/Xserver/GL/Imakefile:1.8 Mon Apr 23 12:17:07 2001 +++ xc/programs/Xserver/GL/Imakefile Thu Nov 14 16:01:20 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/Imakefile,v 1.8 2001/04/23 16:17:07 tsi Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/Imakefile,v 1.10 2002/11/14 21:01:20 tsi Exp $ #define IHaveModules #include <Server.tmpl> @@ -7,6 +7,8 @@ #if GlxUseSGISI CORE_SUBDIR = /* opengl */ +#elif defined(DarwinArchitecture) && GlxUseAqua + CORE_SUBDIR = aqua mesa #else CORE_SUBDIR = mesa #endif Index: xc/programs/Xserver/GL/aqua/Imakefile diff -u /dev/null xc/programs/Xserver/GL/aqua/Imakefile:1.2 --- /dev/null Thu Feb 27 12:28:21 2003 +++ xc/programs/Xserver/GL/aqua/Imakefile Tue Jan 28 20:11:02 2003 @@ -0,0 +1,28 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/aqua/Imakefile,v 1.2 2003/01/29 01:11:02 torrey Exp $ + +#define IHaveModules +#include <Server.tmpl> + + +LinkSourceFile(compsize.c,$(LIBSRC)/GL/glx) + + SRCS = aquaGlx.c compsize.c + OBJS = aquaGlx.o compsize.o + + INCLUDES = -I. -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ + -I$(LIBSRC)/GL/glx -I$(LIBSRC)/GL/include -I$(SERVERSRC)/fb \ + -I$(SERVERSRC)/mi -I$(SERVERSRC)/include -I$(FONTINCSRC) \ + -I$(SERVERSRC)/render -I$(SERVERSRC)/GL/include \ + -I$(SERVERSRC)/GL/glx -I$(SERVERSRC)/hw/darwin/quartz + + DEFINES = $(GLX_DEFINES) + +#if DoLoadableServer +ModuleObjectRule() +SubdirLibraryRule($(OBJS)) +#else +NormalLibraryTarget(AquaGLcore,$(OBJS)) +NormalLibraryObjectRule() +#endif + +DependTarget() Index: xc/programs/Xserver/GL/aqua/aquaGlx.c diff -u /dev/null xc/programs/Xserver/GL/aqua/aquaGlx.c:1.2 --- /dev/null Thu Feb 27 12:28:21 2003 +++ xc/programs/Xserver/GL/aqua/aquaGlx.c Wed Aug 28 22:22:08 2002 @@ -0,0 +1,1133 @@ +/* + * GLX implementation that uses Apple's OpenGL.framework + */ +/* + * Copyright (c) 2002 Greg Parker. All Rights Reserved. + * + * Portions of this file are copied from xf86glx.c, + * which contains the following copyright: + * + * 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, 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/GL/aqua/aquaGlx.c,v 1.2 2002/08/29 02:22:08 torrey Exp $ */ + + +#include "aquaCommon.h" +#include <AGL/agl.h> +#include "rootlessCommon.h" + +// X11 and X11's glx +#include <miscstruct.h> +#include <windowstr.h> +#include <resource.h> +#include <GL/glxint.h> +#include <GL/glxtokens.h> +#include <scrnintstr.h> +#include <glxserver.h> +#include <glxscreens.h> +#include <glxdrawable.h> +#include <glxcontext.h> +#include <glxext.h> +#include <glxutil.h> +#include <glxscreens.h> +#include <GL/internal/glcore.h> + + +// Write debugging output, or not +#ifdef GLAQUA_DEBUG +#define GLAQUA_DEBUG_MSG ErrorF +#else +#define GLAQUA_DEBUG_MSG(a, ...) +#endif + + +// The following GL functions don't have an EXT suffix in OpenGL.framework. +GLboolean glAreTexturesResidentEXT (GLsizei a, const GLuint *b, GLboolean *c) { + return glAreTexturesResident(a, b, c); +} +void glDeleteTexturesEXT (GLsizei d, const GLuint *e) { + glDeleteTextures(d, e); +} +void glGenTexturesEXT (GLsizei f, GLuint *g) { + glGenTextures(f, g); +} +GLboolean glIsTextureEXT (GLuint h) { + return glIsTexture(h); +} + + +// some prototypes +static Bool glAquaScreenProbe(int screen); +static Bool glAquaInitVisuals(VisualPtr *visualp, DepthPtr *depthp, + int *nvisualp, int *ndepthp, + int *rootDepthp, VisualID *defaultVisp, + unsigned long sizes, int bitsPerRGB); +static void glAquaSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, + void **privates); +static __GLinterface *glAquaCreateContext(__GLimports *imports, + __GLcontextModes *mode, + __GLinterface *shareGC); +static void glAquaCreateBuffer(__GLXdrawablePrivate *glxPriv); +static void glAquaResetExtension(void); + + +/* + * This structure is statically allocated in the __glXScreens[] + * structure. This struct is not used anywhere other than in + * __glXScreenInit to initialize each of the active screens + * (__glXActiveScreens[]). Several of the fields must be initialized by + * the screenProbe routine before they are copied to the active screens + * struct. In particular, the contextCreate, pGlxVisual, numVisuals, + * and numUsableVisuals fields must be initialized. + */ +__GLXscreenInfo __glDDXScreenInfo = { + glAquaScreenProbe, /* Must be generic and handle all screens */ + glAquaCreateContext, /* Substitute screen's createContext routine */ + glAquaCreateBuffer, /* Substitute screen's createBuffer routine */ + NULL, /* Set up pGlxVisual in probe */ + NULL, /* Set up pVisualPriv in probe */ + 0, /* Set up numVisuals in probe */ + 0, /* Set up numUsableVisuals in probe */ + "Vendor String", /* GLXvendor is overwritten by __glXScreenInit */ + "Version String", /* GLXversion is overwritten by __glXScreenInit */ + "Extensions String", /* GLXextensions is overwritten by __glXScreenInit */ + NULL /* WrappedPositionWindow is overwritten */ +}; + +__GLXextensionInfo __glDDXExtensionInfo = { + GL_CORE_AQUA, + glAquaResetExtension, + glAquaInitVisuals, + glAquaSetVisualConfigs +}; + + +// prototypes + +static GLboolean glAquaDestroyContext(__GLcontext *gc); +static GLboolean glAquaLoseCurrent(__GLcontext *gc); +static GLboolean glAquaMakeCurrent(__GLcontext *gc, + __GLdrawablePrivate *oldglPriv); +static GLboolean glAquaShareContext(__GLcontext *gc, __GLcontext *gcShare); +static GLboolean glAquaCopyContext(__GLcontext *dst, const __GLcontext *src, + GLuint mask); +static GLboolean glAquaForceCurrent(__GLcontext *gc); + +/* Drawing surface notification callbacks */ +static GLboolean glAquaNotifyResize(__GLcontext *gc); +static void glAquaNotifyDestroy(__GLcontext *gc); +static void glAquaNotifySwapBuffers(__GLcontext *gc); + +/* Dispatch table override control for external agents like libGLS */ +static struct __GLdispatchStateRec* glAquaDispatchExec(__GLcontext *gc); +static void glAquaBeginDispatchOverride(__GLcontext *gc); +static void glAquaEndDispatchOverride(__GLcontext *gc); + + +static __GLexports glAquaExports = { + glAquaDestroyContext, + glAquaLoseCurrent, + glAquaMakeCurrent, + glAquaShareContext, + glAquaCopyContext, + glAquaForceCurrent, + + glAquaNotifyResize, + glAquaNotifyDestroy, + glAquaNotifySwapBuffers, + + glAquaDispatchExec, + glAquaBeginDispatchOverride, + glAquaEndDispatchOverride +}; + + +typedef struct { + int num_vis; + __GLXvisualConfig *glx_vis; + void **priv; + + // wrapped screen functions + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; +} glAquaScreenRec; + +static glAquaScreenRec glAquaScreens[MAXSCREENS]; + + +// __GLdrawablePrivate->private +typedef struct { + GLboolean (*resize)(__GLdrawableBuffer *buf, GLint x, GLint y, + GLuint width, GLuint height, + __GLdrawablePrivate *glPriv, + GLuint bufferMask); +} GLAquaDrawableRec; + +struct __GLcontextRec { + struct __GLinterfaceRec interface; // required to be first + + AGLContext ctx; + AGLPixelFormat pixelFormat; + BOOL isAttached; // TRUE if ctx is really attached to a window +}; + + +// Context manipulation; return GL_FALSE on failure +static GLboolean glAquaDestroyContext(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("glAquaDestroyContext (ctx 0x%x)\n", gc->ctx); + + if (gc) { + if (gc->ctx) aglDestroyContext(gc->ctx); + if (gc->pixelFormat) aglDestroyPixelFormat(gc->pixelFormat); + free(gc); + } + return GL_TRUE; +} + + +static GLboolean glAquaLoseCurrent(__GLcontext *gc) +{ + // GLAQUA_DEBUG_MSG("glAquaLoseCurrent (ctx 0x%x)\n", gc->ctx); + aglSetCurrentContext(NULL); + __glXLastContext = NULL; // Mesa does this; why? + return GL_TRUE; +} + +// (x, y, w, h) is global coordinates of view or -1 +// glPriv may be NULL +static void attach(__GLcontext *gc, __GLdrawablePrivate *glPriv, + int x, int y, int w, int h) +{ + __GLXdrawablePrivate *glxPriv; + + if (glPriv == NULL) { + // attaching to nothing + GLAQUA_DEBUG_MSG("unattaching\n"); + aglSetDrawable(gc->ctx, NULL); + gc->isAttached = FALSE; + return; + } + + // Note that when resizing, the X11 WindowPtr already has its + // new size and position, but the Aqua window does not. + + glxPriv = (__GLXdrawablePrivate *)glPriv->other; + + if (glxPriv->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) glxPriv->pDraw; + WindowPtr topWin = TopLevelParent(pWin); + RootlessFramePtr pFrame = RootlessFrameForWindow(pWin); + AGLDrawable newPort; + + if (pFrame) { + AquaWindowRec *aquaWinRec = AQUA_WINREC(pFrame->devPrivate); + newPort = (AGLDrawable) aquaWinRec->port; + } else { + newPort = NULL; + } + + if (newPort) { + // fixme won't be a CGrafPtr if currently offscreen or fullscreen + AGLDrawable oldPort = aglGetDrawable(gc->ctx); + // AGLDrawable newPort = GetWindowPort(window); + GLint frame[4] = {x, y, w, h}; // fixme multi-screen? + // frame is now X11-global + frame[0] -= topWin->drawable.x - topWin->borderWidth; + frame[1] -= topWin->drawable.y - topWin->borderWidth; + // frame is now window-local + // GL uses flipped coordinates + frame[1] = topWin->drawable.height + 2*topWin->borderWidth - + frame[1] - frame[3]; + + // GLAQUA_DEBUG_MSG("local size %d %d %d %d\n", + // frame[0], frame[1], frame[2], frame[3]); + + if (oldPort != newPort) { + // fixme retain/release windows + aglSetDrawable(gc->ctx, newPort); + } + aglSetInteger(gc->ctx, AGL_BUFFER_RECT, frame); + aglEnable(gc->ctx, AGL_BUFFER_RECT); + // aglSetInteger(gc->ctx, AGL_SWAP_RECT, frame); + // aglEnable(gc->ctx, AGL_SWAP_RECT); + aglUpdateContext(gc->ctx); + gc->isAttached = TRUE; + GLAQUA_DEBUG_MSG("attached\n"); + } else { + // attach to not-yet-realized window - will really attach later + GLAQUA_DEBUG_MSG("couldn't attach\n"); + aglSetDrawable(gc->ctx, NULL); + gc->isAttached = FALSE; + } + } else { + GLAQUA_DEBUG_MSG("attach: attach to non-window unimplemented\n"); + aglSetDrawable(gc->ctx, NULL); + gc->isAttached = FALSE; + } +} + +// glcore.h: "oldglPriv isn't used anymore, kept for backwards compatibility" +static GLboolean glAquaMakeCurrent(__GLcontext *gc, + __GLdrawablePrivate *oldglPriv) +{ +#if 0 + __GLdrawablePrivate *glPriv = gc->interface.imports.getDrawablePrivate(gc); + GLAQUA_DEBUG_MSG("glAquaMakeCurrent (ctx 0x%x)\n", gc->ctx); + + if (!gc->isAttached) { + attach(gc, glPriv, glPriv->xOrigin, glPriv->yOrigin, glPriv->width, glPriv->height); + } +#endif + return aglSetCurrentContext(gc->ctx); +} + +static GLboolean glAquaShareContext(__GLcontext *gc, __GLcontext *gcShare) +{ + GLAQUA_DEBUG_MSG("glAquaShareContext unimplemented\n"); + + return GL_TRUE; +} + + +static GLboolean glAquaCopyContext(__GLcontext *dst, const __GLcontext *src, + GLuint mask) +{ + GLAQUA_DEBUG_MSG("glAquaCopyContext\n"); + aglCopyContext(src->ctx, dst->ctx, mask); + return GL_TRUE; +} + +static GLboolean glAquaForceCurrent(__GLcontext *gc) +{ + // GLAQUA_DEBUG_MSG("glAquaForceCurrent (ctx 0x%x)\n", gc->ctx); + return aglSetCurrentContext(gc->ctx); +} + +/* Drawing surface notification callbacks */ + +static GLboolean glAquaNotifyResize(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaNotifyResize"); + return GL_TRUE; +} + +static void glAquaNotifyDestroy(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaNotifyDestroy"); +} + +static void glAquaNotifySwapBuffers(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaNotifySwapBuffers"); +} + +/* Dispatch table override control for external agents like libGLS */ +static struct __GLdispatchStateRec* glAquaDispatchExec(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaDispatchExec"); + return NULL; +} + +static void glAquaBeginDispatchOverride(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaBeginDispatchOverride"); +} + +static void glAquaEndDispatchOverride(__GLcontext *gc) +{ + GLAQUA_DEBUG_MSG("unimplemented glAquaEndDispatchOverride"); +} + + +static AGLPixelFormat makeFormat(__GLcontextModes *mode) +{ + int i; + GLint attr[64]; // currently uses max of 30 + AGLPixelFormat result; + + GLAQUA_DEBUG_MSG("makeFormat\n"); + + i = 0; + + // attr [i++] = AGL_ACCELERATED; // require hwaccel - BAD for multiscreen + // attr [i++] = AGL_NO_RECOVERY; // disable fallback renderers - BAD + + if (mode->stereoMode) { + attr[i++] = AGL_STEREO; + } + if (mode->doubleBufferMode) { + attr[i++] = AGL_DOUBLEBUFFER; + } + + if (mode->colorIndexMode) { + attr[i++] = AGL_BUFFER_SIZE; + attr[i++] = mode->indexBits; + } + + if (mode->rgbMode) { + attr[i++] = AGL_RGBA; + attr[i++] = AGL_RED_SIZE; + attr[i++] = mode->redBits; + attr[i++] = AGL_GREEN_SIZE; + attr[i++] = mode->greenBits; + attr[i++] = AGL_BLUE_SIZE; + attr[i++] = mode->blueBits; + attr[i++] = AGL_ALPHA_SIZE; + attr[i++] = mode->alphaBits; + } + + if (mode->haveAccumBuffer) { + attr[i++] = AGL_ACCUM_RED_SIZE; + attr[i++] = mode->accumRedBits; + attr[i++] = AGL_ACCUM_GREEN_SIZE; + attr[i++] = mode->accumGreenBits; + attr[i++] = AGL_ACCUM_BLUE_SIZE; + attr[i++] = mode->accumBlueBits; + attr[i++] = AGL_ACCUM_ALPHA_SIZE; + attr[i++] = mode->accumAlphaBits; + } + if (mode->haveDepthBuffer) { + attr[i++] = AGL_DEPTH_SIZE; + attr[i++] = mode->depthBits; + } + if (mode->haveStencilBuffer) { + attr[i++] = AGL_STENCIL_SIZE; + attr[i++] = mode->stencilBits; + } + + attr[i++] = AGL_AUX_BUFFERS; + attr[i++] = mode->numAuxBuffers; + + attr[i++] = AGL_LEVEL; + attr[i++] = mode->level; + + // mode->pixmapMode ? + + attr[i++] = AGL_NONE; // end of option list + + GLAQUA_DEBUG_MSG("makeFormat almost done\n"); + result = aglChoosePixelFormat(NULL, 0, attr); + GLAQUA_DEBUG_MSG("makeFormat done (0x%x)\n", result); + return result; +} + +static __GLinterface *glAquaCreateContext(__GLimports *imports, + __GLcontextModes *mode, + __GLinterface *shareGC) +{ + __GLcontext *result; + __GLcontext *sharectx = (__GLcontext *)shareGC; + GLint value; + + GLAQUA_DEBUG_MSG("glAquaCreateContext\n"); + + result = (__GLcontext *)malloc(sizeof(__GLcontext)); + if (!result) return NULL; + + result->interface.imports = *imports; + result->interface.exports = glAquaExports; + + result->pixelFormat = makeFormat(mode); + if (!result->pixelFormat) { + free(result); + return NULL; + } + + result->ctx = aglCreateContext(result->pixelFormat, + (sharectx && sharectx->ctx) ? sharectx->ctx : NULL); + + if (!result->ctx) { + aglDestroyPixelFormat(result->pixelFormat); + free(result); + return NULL; + } + + result->isAttached = FALSE; + + // Tell aglSwapBuffers to wait for vertical retrace + value = 1; + aglSetInteger(result->ctx, AGL_SWAP_INTERVAL, &value); + + GLAQUA_DEBUG_MSG("glAquaCreateContext done\n"); + return (__GLinterface *)result; +} + + +Bool +glAquaRealizeWindow(WindowPtr pWin) +{ + // If this window has GL contexts, tell them to reattach + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + glAquaScreenRec *screenPriv = &glAquaScreens[pScreen->myNum]; + __GLXdrawablePrivate *glxPriv; + + GLAQUA_DEBUG_MSG("glAquaRealizeWindow\n"); + + // Allow the window to be created (RootlessRealizeWindow is inside our wrap) + pScreen->RealizeWindow = screenPriv->RealizeWindow; + result = pScreen->RealizeWindow(pWin); + pScreen->RealizeWindow = glAquaRealizeWindow; + + // The Aqua window will already have been created (windows are + // realized from top down) + + // Re-attach this window's GL contexts, if any. + glxPriv = __glXFindDrawablePrivate(pWin->drawable.id); + if (glxPriv) { + __GLXcontext *gx; + __GLcontext *gc; + __GLdrawablePrivate *glPriv = &glxPriv->glPriv; + GLAQUA_DEBUG_MSG("glAquaRealizeWindow is GL drawable!\n"); + + for (gx = glxPriv->glxc; gx != NULL; gx = gx->next) { + gc = (__GLcontext *)gx->gc; + attach(gc, glPriv, glxPriv->xorigin, glxPriv->yorigin, + glxPriv->width, glxPriv->height); + } + } + + return result; +} + +Bool +glAquaUnrealizeWindow(WindowPtr pWin) +{ + // If this window has GL contexts, tell them to unattach + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + glAquaScreenRec *screenPriv = &glAquaScreens[pScreen->myNum]; + __GLXdrawablePrivate *glxPriv; + + GLAQUA_DEBUG_MSG("glAquaUnrealizeWindow\n"); + + // The Aqua window may have already been destroyed (windows + // are unrealized from top down) + + // Unattach this window's GL contexts, if any. + glxPriv = __glXFindDrawablePrivate(pWin->drawable.id); + if (glxPriv) { + __GLXcontext *gx; + __GLcontext *gc; + GLAQUA_DEBUG_MSG("glAquaUnealizeWindow is GL drawable!\n"); + + for (gx = glxPriv->glxc; gx != NULL; gx = gx->next) { + gc = (__GLcontext *)gx->gc; + attach(gc, NULL, 0, 0, 0, 0); + } + } + + pScreen->UnrealizeWindow = screenPriv->UnrealizeWindow; + result = pScreen->UnrealizeWindow(pWin); + pScreen->UnrealizeWindow = glAquaUnrealizeWindow; + + return result; +} + + + + + + +/* + * In the case the driver has no GLX visuals we'll use these. + * [0] = RGB, double buffered + * [1] = RGB, double buffered, stencil, accum + */ +// Originally copied from Mesa + +static int numConfigs = 0; +static __GLXvisualConfig *visualConfigs = NULL; +static void **visualPrivates = NULL; + +#define NUM_FALLBACK_CONFIGS 2 +static __GLXvisualConfig FallbackConfigs[NUM_FALLBACK_CONFIGS] = { + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 0, 0, 0, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 0, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE_EXT, /* visualRating */ + 0, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 0, /* rgba sizes */ + -1, -1, -1, 0, /* rgba masks */ + 16, 16, 16, 0, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE_EXT, /* visualRating */ + 0, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + } +}; + + + +static int count_bits(unsigned int n) +{ + int bits = 0; + + while (n > 0) { + if (n & 1) bits++; + n >>= 1; + } + return bits; +} + + +// Mostly copied from Mesa's xf86glx.c +static Bool init_visuals(int *nvisualp, VisualPtr *visualp, + VisualID *defaultVisp, + int ndepth, DepthPtr pdepth, + int rootDepth) +{ + int numRGBconfigs; + int numCIconfigs; + int numVisuals = *nvisualp; + int numNewVisuals; + int numNewConfigs; + VisualPtr pVisual = *visualp; + VisualPtr pVisualNew = NULL; + VisualID *orig_vid = NULL; + __GLXvisualConfig *glXVisualPtr = NULL; + __GLXvisualConfig *pNewVisualConfigs = NULL; + void **glXVisualPriv; + void **pNewVisualPriv; + int found_default; + int i, j, k; + + GLAQUA_DEBUG_MSG("init_visuals\n"); + + if (numConfigs > 0) + numNewConfigs = numConfigs; + else + numNewConfigs = NUM_FALLBACK_CONFIGS; + + /* Alloc space for the list of new GLX visuals */ + pNewVisualConfigs = (__GLXvisualConfig *) + __glXMalloc(numNewConfigs * sizeof(__GLXvisualConfig)); + if (!pNewVisualConfigs) { + return FALSE; + } + + /* Alloc space for the list of new GLX visual privates */ + pNewVisualPriv = (void **) __glXMalloc(numNewConfigs * sizeof(void *)); + if (!pNewVisualPriv) { + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* + ** If SetVisualConfigs was not called, then use default GLX + ** visual configs. + */ + if (numConfigs == 0) { + memcpy(pNewVisualConfigs, FallbackConfigs, + NUM_FALLBACK_CONFIGS * sizeof(__GLXvisualConfig)); + memset(pNewVisualPriv, 0, NUM_FALLBACK_CONFIGS * sizeof(void *)); + } + else { + /* copy driver's visual config info */ + for (i = 0; i < numConfigs; i++) { + pNewVisualConfigs[i] = visualConfigs[i]; + pNewVisualPriv[i] = visualPrivates[i]; + } + } + + /* Count the number of RGB and CI visual configs */ + numRGBconfigs = 0; + numCIconfigs = 0; + for (i = 0; i < numNewConfigs; i++) { + if (pNewVisualConfigs[i].rgba) + numRGBconfigs++; + else + numCIconfigs++; + } + + /* Count the total number of visuals to compute */ + numNewVisuals = 0; + for (i = 0; i < numVisuals; i++) { + numNewVisuals += + (pVisual[i].class == TrueColor || pVisual[i].class == DirectColor) + ? numRGBconfigs : numCIconfigs; + } + + /* Reset variables for use with the next screen/driver's visual configs */ + visualConfigs = NULL; + numConfigs = 0; + + /* Alloc temp space for the list of orig VisualIDs for each new visual */ + orig_vid = (VisualID *)__glXMalloc(numNewVisuals * sizeof(VisualID)); + if (!orig_vid) { + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisuals */ + glXVisualPtr = (__GLXvisualConfig *)__glXMalloc(numNewVisuals * + sizeof(__GLXvisualConfig)); + if (!glXVisualPtr) { + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the list of glXVisualPrivates */ + glXVisualPriv = (void **)__glXMalloc(numNewVisuals * sizeof(void *)); + if (!glXVisualPriv) { + __glXFree(glXVisualPtr); + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Alloc space for the new list of the X server's visuals */ + pVisualNew = (VisualPtr)__glXMalloc(numNewVisuals * sizeof(VisualRec)); + if (!pVisualNew) { + __glXFree(glXVisualPriv); + __glXFree(glXVisualPtr); + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + return FALSE; + } + + /* Initialize the new visuals */ + found_default = FALSE; + for (i = j = 0; i < numVisuals; i++) { + int is_rgb = (pVisual[i].class == TrueColor || + pVisual[i].class == DirectColor); + + for (k = 0; k < numNewConfigs; k++) { + if (pNewVisualConfigs[k].rgba != is_rgb) + continue; + + /* Initialize the new visual */ + pVisualNew[j] = pVisual[i]; + pVisualNew[j].vid = FakeClientID(0); + + /* Check for the default visual */ + if (!found_default && pVisual[i].vid == *defaultVisp) { + *defaultVisp = pVisualNew[j].vid; + found_default = TRUE; + } + + /* Save the old VisualID */ + orig_vid[j] = pVisual[i].vid; + + /* Initialize the glXVisual */ + glXVisualPtr[j] = pNewVisualConfigs[k]; + glXVisualPtr[j].vid = pVisualNew[j].vid; + + /* + * If the class is -1, then assume the X visual information + * is identical to what GLX needs, and take them from the X + * visual. NOTE: if class != -1, then all other fields MUST + * be initialized. + */ + if (glXVisualPtr[j].class == -1) { + glXVisualPtr[j].class = pVisual[i].class; + glXVisualPtr[j].redSize = count_bits(pVisual[i].redMask); + glXVisualPtr[j].greenSize = count_bits(pVisual[i].greenMask); + glXVisualPtr[j].blueSize = count_bits(pVisual[i].blueMask); + glXVisualPtr[j].alphaSize = glXVisualPtr[j].alphaSize; + glXVisualPtr[j].redMask = pVisual[i].redMask; + glXVisualPtr[j].greenMask = pVisual[i].greenMask; + glXVisualPtr[j].blueMask = pVisual[i].blueMask; + glXVisualPtr[j].alphaMask = glXVisualPtr[j].alphaMask; + glXVisualPtr[j].bufferSize = rootDepth; + } + + /* Save the device-dependent private for this visual */ + glXVisualPriv[j] = pNewVisualPriv[k]; + + j++; + } + } + + assert(j <= numNewVisuals); + + /* Save the GLX visuals in the screen structure */ + glAquaScreens[screenInfo.numScreens-1].num_vis = numNewVisuals; + glAquaScreens[screenInfo.numScreens-1].glx_vis = glXVisualPtr; + glAquaScreens[screenInfo.numScreens-1].priv = glXVisualPriv; + + /* Set up depth's VisualIDs */ + for (i = 0; i < ndepth; i++) { + int numVids = 0; + VisualID *pVids = NULL; + int k, n = 0; + + /* Count the new number of VisualIDs at this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + numVids++; + + /* Allocate a new list of VisualIDs for this depth */ + pVids = (VisualID *)__glXMalloc(numVids * sizeof(VisualID)); + + /* Initialize the new list of VisualIDs for this depth */ + for (j = 0; j < pdepth[i].numVids; j++) + for (k = 0; k < numNewVisuals; k++) + if (pdepth[i].vids[j] == orig_vid[k]) + pVids[n++] = pVisualNew[k].vid; + + /* Update this depth's list of VisualIDs */ + __glXFree(pdepth[i].vids); + pdepth[i].vids = pVids; + pdepth[i].numVids = numVids; + } + + /* Update the X server's visuals */ + *nvisualp = numNewVisuals; + *visualp = pVisualNew; + + /* Free the old list of the X server's visuals */ + __glXFree(pVisual); + + /* Clean up temporary allocations */ + __glXFree(orig_vid); + __glXFree(pNewVisualPriv); + __glXFree(pNewVisualConfigs); + + /* Free the private list created by DDX HW driver */ + if (visualPrivates) + xfree(visualPrivates); + visualPrivates = NULL; + + return TRUE; +} + +// Copied from Mesa +static void glAquaSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, + void **privates) +{ + GLAQUA_DEBUG_MSG("glAquaSetVisualConfigs\n"); + + numConfigs = nconfigs; + visualConfigs = configs; + visualPrivates = privates; +} + +// Copied from Mesa +static Bool glAquaInitVisuals(VisualPtr *visualp, DepthPtr *depthp, + int *nvisualp, int *ndepthp, + int *rootDepthp, VisualID *defaultVisp, + unsigned long sizes, int bitsPerRGB) +{ + GLAQUA_DEBUG_MSG("glAquaInitVisuals\n"); + + /* + * Setup the visuals supported by this particular screen. + */ + return init_visuals(nvisualp, visualp, defaultVisp, + *ndepthp, *depthp, *rootDepthp); +} + + +static void fixup_visuals(int screen) +{ + ScreenPtr pScreen = screenInfo.screens[screen]; + glAquaScreenRec *pScr = &glAquaScreens[screen]; + __GLXvisualConfig *pGLXVis = pScr->glx_vis; + VisualPtr pVis; + int i, j; + + GLAQUA_DEBUG_MSG("fixup_visuals\n"); + + for (i = 0; i < pScr->num_vis; i++, pGLXVis++) { + pVis = pScreen->visuals; + + /* Find a visual that matches the GLX visual's class and size */ + for (j = 0; j < pScreen->numVisuals; j++, pVis++) { + if (pVis->class == pGLXVis->class && + pVis->nplanes == pGLXVis->bufferSize) { + + /* Fixup the masks */ + pGLXVis->redMask = pVis->redMask; + pGLXVis->greenMask = pVis->greenMask; + pGLXVis->blueMask = pVis->blueMask; + + /* Recalc the sizes */ + pGLXVis->redSize = count_bits(pGLXVis->redMask); + pGLXVis->greenSize = count_bits(pGLXVis->greenMask); + pGLXVis->blueSize = count_bits(pGLXVis->blueMask); + } + } + } +} + +static void init_screen_visuals(int screen) +{ + ScreenPtr pScreen = screenInfo.screens[screen]; + __GLXvisualConfig *pGLXVis = glAquaScreens[screen].glx_vis; + // XMesaVisual *pXMesaVisual; + VisualPtr pVis; + int *used; + int i, j; + + GLAQUA_DEBUG_MSG("init_screen_visuals\n"); + + /* Alloc space for the list of XMesa visuals */ + // pXMesaVisual = (XMesaVisual *)__glXMalloc(MESAScreens[screen].num_vis * + // sizeof(XMesaVisual)); + // __glXMemset(pXMesaVisual, 0, + // MESAScreens[screen].num_vis * sizeof(XMesaVisual)); + + used = (int *)__glXMalloc(pScreen->numVisuals * sizeof(int)); + __glXMemset(used, 0, pScreen->numVisuals * sizeof(int)); + + for (i = 0; i < glAquaScreens[screen].num_vis; i++, pGLXVis++) { + pVis = pScreen->visuals; + for (j = 0; j < pScreen->numVisuals; j++, pVis++) { + + if (pVis->class == pGLXVis->class && + pVis->nplanes == pGLXVis->bufferSize && + !used[j]) { + + if (pVis->redMask == pGLXVis->redMask && + pVis->greenMask == pGLXVis->greenMask && + pVis->blueMask == pGLXVis->blueMask) { + + /* Create the XMesa visual */ + /* + pXMesaVisual[i] = + XMesaCreateVisual(pScreen, + pVis, + pGLXVis->rgba, + (pGLXVis->alphaSize > 0), + pGLXVis->doubleBuffer, + pGLXVis->stereo, + GL_TRUE, // ximage_flag + pGLXVis->depthSize, + pGLXVis->stencilSize, + pGLXVis->accumRedSize, + pGLXVis->accumGreenSize, + pGLXVis->accumBlueSize, + pGLXVis->accumAlphaSize, + 0, // numSamples + pGLXVis->level, + pGLXVis->visualRating ); + */ + /* Set the VisualID */ + pGLXVis->vid = pVis->vid; + + /* Mark this visual used */ + used[j] = 1; + break; + } + } + } + } + + __glXFree(used); + + // glAquaScreens[screen].xm_vis = pXMesaVisual; +} + +static Bool glAquaScreenProbe(int screen) +{ + ScreenPtr pScreen; + glAquaScreenRec *screenPriv; + + GLAQUA_DEBUG_MSG("glAquaScreenProbe\n"); + + /* + * Set up the current screen's visuals. + */ + __glDDXScreenInfo.pGlxVisual = glAquaScreens[screen].glx_vis; + __glDDXScreenInfo.pVisualPriv = glAquaScreens[screen].priv; + __glDDXScreenInfo.numVisuals = + __glDDXScreenInfo.numUsableVisuals = glAquaScreens[screen].num_vis; + + /* + * Set the current screen's createContext routine. This could be + * wrapped by a DDX GLX context creation routine. + */ + __glDDXScreenInfo.createContext = glAquaCreateContext; + + /* + * The ordering of the rgb compenents might have been changed by the + * driver after mi initialized them. + */ + fixup_visuals(screen); + + /* + * Find the GLX visuals that are supported by this screen and create + * XMesa's visuals. + */ + init_screen_visuals(screen); + + // Wrap RealizeWindow and UnrealizeWindow on this screen + pScreen = screenInfo.screens[screen]; + screenPriv = &glAquaScreens[screen]; + screenPriv->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = glAquaRealizeWindow; + screenPriv->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = glAquaUnrealizeWindow; + + return TRUE; +} + + +static GLboolean glAquaResizeBuffers(__GLdrawableBuffer *buffer, + GLint x, GLint y, + GLuint width, GLuint height, + __GLdrawablePrivate *glPriv, + GLuint bufferMask) +{ + GLAquaDrawableRec *aquaPriv = (GLAquaDrawableRec *)glPriv->private; + __GLXcontext *gx; + __GLcontext *gc; + __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *)glPriv->other; + + GLAQUA_DEBUG_MSG("glAquaResizeBuffers to (%d %d %d %d)\n", x, y, width, height); + + // update all contexts that point at this drawable (hack?) + for (gx = glxPriv->glxc; gx != NULL; gx = gx->next) { + gc = (__GLcontext *)gx->gc; + attach(gc, glPriv, x, y, width, height); + } + + return aquaPriv->resize(buffer, x, y, width, height, glPriv, bufferMask); +} + + +static GLboolean glAquaSwapBuffers(__GLXdrawablePrivate *glxPriv) +{ + // fixme AGL software renderer will use properties of current QD port (bad) + + // swap buffers on only *one* of the contexts (e.g. the last one) + __GLcontext *gc = (__GLcontext *)glxPriv->glxc->gc; + if (gc && gc->ctx) aglSwapBuffers(gc->ctx); + + return GL_TRUE; +} + +static void glAquaDestroyDrawablePrivate(__GLdrawablePrivate *glPriv) +{ + GLAQUA_DEBUG_MSG("glAquaDestroyDrawablePrivate\n"); + + free(glPriv->private); + glPriv->private = NULL; +} + +static void glAquaCreateBuffer(__GLXdrawablePrivate *glxPriv) +{ + GLAquaDrawableRec *aquaPriv = malloc(sizeof(GLAquaDrawableRec)); + __GLdrawablePrivate *glPriv = &glxPriv->glPriv; + + GLAQUA_DEBUG_MSG("glAquaCreateBuffer\n"); + + // replace swapBuffers (original is never called) + glxPriv->swapBuffers = glAquaSwapBuffers; + + // wrap front buffer resize + aquaPriv->resize = glPriv->frontBuffer.resize; + glPriv->frontBuffer.resize = glAquaResizeBuffers; + + // stash private data + glPriv->private = aquaPriv; + glPriv->freePrivate = glAquaDestroyDrawablePrivate; +} + + +static void glAquaResetExtension(void) +{ + GLAQUA_DEBUG_MSG("glAquaResetExtension\n"); + aglResetLibrary(); +} + + + +// Extra goodies for glx + +GLint __glEvalComputeK(GLenum target) +{ + switch (target) { + case GL_MAP1_VERTEX_4: + case GL_MAP1_COLOR_4: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_4: + case GL_MAP2_COLOR_4: + case GL_MAP2_TEXTURE_COORD_4: + return 4; + case GL_MAP1_VERTEX_3: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_NORMAL: + case GL_MAP2_VERTEX_3: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_NORMAL: + return 3; + case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_2: + return 2; + case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP1_INDEX: + case GL_MAP2_INDEX: + return 1; + default: + return 0; + } +} + +GLuint __glFloorLog2(GLuint val) +{ + int c = 0; + + while (val > 1) { + c++; + val >>= 1; + } + return c; +} Index: xc/programs/Xserver/GL/dri/Imakefile diff -u xc/programs/Xserver/GL/dri/Imakefile:1.6 xc/programs/Xserver/GL/dri/Imakefile:1.7 --- xc/programs/Xserver/GL/dri/Imakefile:1.6 Sat Apr 28 09:55:36 2001 +++ xc/programs/Xserver/GL/dri/Imakefile Tue Feb 11 16:34:04 2003 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/dri/Imakefile,v 1.6 2001/04/28 13:55:36 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/dri/Imakefile,v 1.7 2003/02/11 21:34:04 tsi Exp $ #define IHaveModules #include <Server.tmpl> @@ -11,7 +11,7 @@ SRCS = xf86dri.c dri.c $(MSRC) OBJS = xf86dri.o dri.o $(MOBJ) - INCLUDES = -I$(SERVERSRC)/include -I$(INCLUDESRC) -I $(XINCLUDESRC) \ + INCLUDES = -I$(SERVERSRC)/include -I$(INCLUDESRC) -I$(XINCLUDESRC) \ -I$(EXTINCSRC) \ -I$(XF86OSSRC) -I$(XF86COMSRC) \ -I../include -I../glx -I$(LIBSRC)/GL/include \ Index: xc/programs/Xserver/GL/dri/dri.c diff -u xc/programs/Xserver/GL/dri/dri.c:1.34 xc/programs/Xserver/GL/dri/dri.c:1.38 --- xc/programs/Xserver/GL/dri/dri.c:1.34 Mon Dec 10 14:07:19 2001 +++ xc/programs/Xserver/GL/dri/dri.c Wed Nov 20 13:10:24 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.34 2001/12/10 19:07:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.38 2002/11/20 18:10:24 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -29,7 +29,7 @@ /* * Authors: - * Jens Owen <jens@valinux.com> + * Jens Owen <jens@tungstengraphics.com> * Rickard E. (Rik) Faith <faith@valinux.com> * */ @@ -181,6 +181,9 @@ pDRIPriv->createDummyCtx = pDRIInfo->createDummyCtx; pDRIPriv->createDummyCtxPriv = pDRIInfo->createDummyCtxPriv; + pDRIPriv->grabbedDRILock = FALSE; + pDRIPriv->drmSIGIOHandlerInstalled = FALSE; + if ((err = drmSetBusid(pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString)) < 0) { pDRIPriv->directRenderingSupport = FALSE; pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; @@ -315,6 +318,7 @@ * hardware lock for the X server. */ DRILock(pScreen, 0); + pDRIPriv->grabbedDRILock = TRUE; /* pointers so that we can prevent memory leaks later */ pDRIPriv->hiddenContextStore = NULL; @@ -363,7 +367,8 @@ /* For swap methods of DRI_SERVER_SWAP and DRI_HIDE_X_CONTEXT * setup signal handler for receiving swap requests from kernel */ - if (!drmInstallSIGIOHandler(pDRIPriv->drmFD, DRISwapContext)) { + if (!(pDRIPriv->drmSIGIOHandlerInstalled = + drmInstallSIGIOHandler(pDRIPriv->drmFD, DRISwapContext))) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to setup DRM signal handler\n"); if (pDRIPriv->hiddenContextStore) @@ -383,30 +388,31 @@ /* Wrap DRI support */ if (pDRIInfo->wrap.ValidateTree) { - pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; - pScreen->ValidateTree = pDRIInfo->wrap.ValidateTree; + pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; + pScreen->ValidateTree = pDRIInfo->wrap.ValidateTree; } if (pDRIInfo->wrap.PostValidateTree) { pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; - pScreen->PostValidateTree = pDRIInfo->wrap.PostValidateTree; + pScreen->PostValidateTree = pDRIInfo->wrap.PostValidateTree; } if (pDRIInfo->wrap.WindowExposures) { - pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; - pScreen->WindowExposures = 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; + pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = pDRIInfo->wrap.CopyWindow; } if (pDRIInfo->wrap.ClipNotify) { - pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; - pScreen->ClipNotify = 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; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + pDRIPriv->wrap.AdjustFrame = pScrn->AdjustFrame; + pScrn->AdjustFrame = pDRIInfo->wrap.AdjustFrame; } + pDRIPriv->wrapped = TRUE; DRIDrvMsg(pScreen->myNum, X_INFO, "[DRI] installation complete\n"); @@ -417,18 +423,45 @@ DRICloseScreen(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIInfoPtr pDRIInfo; drmContextPtr reserved; int reserved_count; if (pDRIPriv && pDRIPriv->directRenderingSupport) { - if (pDRIPriv->wrap.AdjustFrame) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - pScrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame; - pDRIPriv->wrap.AdjustFrame = NULL; + pDRIInfo = pDRIPriv->pDriverInfo; + + if (pDRIPriv->wrapped) { + /* Unwrap DRI Functions */ + if (pDRIInfo->wrap.ValidateTree) { + pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; + pDRIPriv->wrap.ValidateTree = NULL; + } + if (pDRIInfo->wrap.PostValidateTree) { + pScreen->PostValidateTree = pDRIPriv->wrap.PostValidateTree; + pDRIPriv->wrap.PostValidateTree = NULL; + } + if (pDRIInfo->wrap.WindowExposures) { + pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; + pDRIPriv->wrap.WindowExposures = NULL; + } + if (pDRIInfo->wrap.CopyWindow) { + pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; + pDRIPriv->wrap.CopyWindow = NULL; + } + if (pDRIInfo->wrap.ClipNotify) { + pScreen->ClipNotify = pDRIPriv->wrap.ClipNotify; + pDRIPriv->wrap.ClipNotify = NULL; + } + if (pDRIInfo->wrap.AdjustFrame) { + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + pScrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame; + pDRIPriv->wrap.AdjustFrame = NULL; + } + pDRIPriv->wrapped = FALSE; } - if (pDRIPriv->pDriverInfo->driverSwapMethod != DRI_KERNEL_SWAP) { + if (pDRIPriv->drmSIGIOHandlerInstalled) { if (!drmRemoveSIGIOHandler(pDRIPriv->drmFD)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to remove DRM signal handler\n"); @@ -459,18 +492,19 @@ reserved_count, reserved_count > 1 ? "s" : ""); } - DRIUnlock(pScreen); + /* Make sure signals get unblocked etc. */ + drmUnlock(pDRIPriv->drmFD, pDRIPriv->myContext); lockRefCount=0; DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] unmapping %d bytes of SAREA 0x%08lx at %p\n", - pDRIPriv->pDriverInfo->SAREASize, + pDRIInfo->SAREASize, pDRIPriv->hSAREA, pDRIPriv->pSAREA); - if (drmUnmap(pDRIPriv->pSAREA, pDRIPriv->pDriverInfo->SAREASize)) { + if (drmUnmap(pDRIPriv->pSAREA, pDRIInfo->SAREASize)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] unable to unmap %d bytes" " of SAREA 0x%08lx at %p\n", - pDRIPriv->pDriverInfo->SAREASize, + pDRIInfo->SAREASize, pDRIPriv->hSAREA, pDRIPriv->pSAREA); } @@ -844,14 +878,26 @@ static void DRITransitionToSharedBuffers(ScreenPtr pScreen) { + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; + DRIClipNotifyAllDrawables( pScreen ); + + if (pDRIInfo->TransitionSingleToMulti3D) + pDRIInfo->TransitionSingleToMulti3D( pScreen ); } static void DRITransitionToPrivateBuffers(ScreenPtr pScreen) { + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; + DRIClipNotifyAllDrawables( pScreen ); + + if (pDRIInfo->TransitionMultiToSingle3D) + pDRIInfo->TransitionMultiToSingle3D( pScreen ); } @@ -861,6 +907,8 @@ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; + DRIClipNotifyAllDrawables( pScreen ); + if (pDRIInfo->TransitionTo3d) pDRIInfo->TransitionTo3d( pScreen ); } @@ -871,6 +919,8 @@ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; + DRIClipNotifyAllDrawables( pScreen ); + if (pDRIInfo->TransitionTo2d) pDRIInfo->TransitionTo2d( pScreen ); } @@ -971,6 +1021,10 @@ pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); if (pDRIDrawablePriv->drawableIndex != -1) { + /* bump stamp to force outstanding 3D requests to resync */ + pDRIPriv->pSAREA->drawableTable[pDRIDrawablePriv->drawableIndex].stamp + = DRIDrawableValidationStamp++; + /* release drawable table entry */ pDRIPriv->DRIDrawables[pDRIDrawablePriv->drawableIndex] = NULL; } @@ -1458,13 +1512,19 @@ pDRIDrawablePriv->drawableIndex); } - pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; + /* call lower wrapped functions */ + if (pDRIPriv && pDRIPriv->wrap.WindowExposures) { - (*pScreen->WindowExposures)(pWin, prgn, bsreg); + /* unwrap */ + pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; - pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; - pScreen->WindowExposures = DRIWindowExposures; + /* call lower layers */ + (*pScreen->WindowExposures)(pWin, prgn, bsreg); + /* rewrap */ + pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; + pScreen->WindowExposures = DRIWindowExposures; + } } @@ -1492,6 +1552,8 @@ ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + if(!pDRIPriv) return; + if(pDRIPriv->nrWindows > 0) { RegionRec reg; @@ -1511,15 +1573,18 @@ REGION_UNINIT(pScreen, ®); } - /* unwrap */ - pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; + /* call lower wrapped functions */ + if(pDRIPriv->wrap.CopyWindow) { + /* unwrap */ + pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; - /* call lower layers */ - (*pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); + /* call lower layers */ + (*pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); - /* rewrap */ - pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; - pScreen->CopyWindow = DRICopyWindow; + /* rewrap */ + pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = DRICopyWindow; + } } static void @@ -1552,7 +1617,7 @@ DRISpinLockTimeout(drmLock *lock, int val, unsigned long timeout /* in mS */) { int count = 10000; -#ifndef __alpha__ +#if !defined(__alpha__) && !defined(__powerpc__) char ret; #else int ret; @@ -1587,6 +1652,8 @@ { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + if(!pDRIPriv) return; + /* Restore the last known 3D context if the X context is hidden */ if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { (*pDRIPriv->pDriverInfo->SwapContext)(pScreen, @@ -1604,7 +1671,7 @@ appropriate, since this should never time out except in the case of client death while the lock is being held. The timeout must be greater than any reasonable rendering time. */ - DRISpinLockTimeout(&pDRIPriv->pSAREA->drawable_lock, 1, 10000); /* 10 secs */ + DRISpinLockTimeout(&pDRIPriv->pSAREA->drawable_lock, 1, 10000); /*10 secs*/ /* Call kernel flush outstanding buffers and relock */ DRILock(pScreen, DRM_LOCK_QUIESCENT|DRM_LOCK_FLUSH_ALL); @@ -1633,7 +1700,10 @@ { ScreenPtr pScreen = pParent->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - int returnValue; + + int returnValue = 1; /* always return 1, not checked by dix/window.c */ + + if(!pDRIPriv) return returnValue; DRIWindowsTouched = FALSE; @@ -1644,15 +1714,18 @@ } #endif - /* unwrap */ - pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; + /* call lower wrapped functions */ + if(pDRIPriv->wrap.ValidateTree) { + /* unwrap */ + pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; - /* call lower layers */ - returnValue = (*pScreen->ValidateTree)(pParent, pChild, kind); + /* call lower layers */ + returnValue = (*pScreen->ValidateTree)(pParent, pChild, kind); - /* rewrap */ - pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; - pScreen->ValidateTree = DRIValidateTree; + /* rewrap */ + pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; + pScreen->ValidateTree = DRIValidateTree; + } return returnValue; } @@ -1668,7 +1741,7 @@ } else { pScreen = pChild->drawable.pScreen; } - pDRIPriv = DRI_SCREEN_PRIV(pScreen); + if(!(pDRIPriv = DRI_SCREEN_PRIV(pScreen))) return; if (pDRIPriv->wrap.PostValidateTree) { /* unwrap */ @@ -1696,6 +1769,8 @@ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv; + if(!pDRIPriv) return; + if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { #ifndef DRI_BROKEN @@ -1709,11 +1784,16 @@ = DRIDrawableValidationStamp++; } + /* call lower wrapped functions */ if(pDRIPriv->wrap.ClipNotify) { + + /* unwrap */ pScreen->ClipNotify = pDRIPriv->wrap.ClipNotify; + /* call lower layers */ (*pScreen->ClipNotify)(pWin, dx, dy); + /* rewrap */ pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; pScreen->ClipNotify = DRIClipNotify; } @@ -1757,6 +1837,7 @@ DRILock(ScreenPtr pScreen, int flags) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + if(!pDRIPriv) return; if (!lockRefCount) DRM_LOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext, flags); @@ -1767,6 +1848,7 @@ DRIUnlock(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + if(!pDRIPriv) return; if (lockRefCount > 0) { lockRefCount--; @@ -1783,17 +1865,17 @@ DRIGetSAREAPrivate(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - if (!pDRIPriv) - return 0; - return (void *)(((char*)pDRIPriv->pSAREA)+sizeof(XF86DRISAREARec)); + 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; + if (!pDRIPriv) return 0; + return pDRIPriv->myContext; } Index: xc/programs/Xserver/GL/dri/dri.h diff -u xc/programs/Xserver/GL/dri/dri.h:1.18 xc/programs/Xserver/GL/dri/dri.h:1.19 --- xc/programs/Xserver/GL/dri/dri.h:1.18 Wed Mar 21 11:21:40 2001 +++ xc/programs/Xserver/GL/dri/dri.h Wed Oct 30 07:52:03 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.19 2002/10/30 12:52:03 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -28,7 +28,7 @@ /* * Authors: - * Jens Owen <jens@precisioninsight.com> + * Jens Owen <jens@tungstengraphics.com> * */ @@ -97,7 +97,12 @@ typedef struct { - /* driver call back functions */ + /* driver call back functions + * + * New fields should be added at the end for backwards compatability. + * Don't forget to bump the version minor number in + * xc/lib/GL/dri/xf86dristr.h + */ Bool (*CreateContext)(ScreenPtr pScreen, VisualPtr visual, drmContext hHWContext, @@ -121,6 +126,7 @@ CARD32 indx); void (*TransitionTo3d)(ScreenPtr pScreen); void (*TransitionTo2d)(ScreenPtr pScreen); + void (*SetDrawableIndex)(WindowPtr pWin, CARD32 indx); Bool (*OpenFullScreen)(ScreenPtr pScreen); Bool (*CloseFullScreen)(ScreenPtr pScreen); @@ -148,6 +154,10 @@ void* devPrivate; Bool createDummyCtx; Bool createDummyCtxPriv; + + /* New with DRI version 4.1.0 */ + void (*TransitionSingleToMulti3D)(ScreenPtr pScreen); + void (*TransitionMultiToSingle3D)(ScreenPtr pScreen); } DRIInfoRec, *DRIInfoPtr; Index: xc/programs/Xserver/GL/dri/dristruct.h diff -u xc/programs/Xserver/GL/dri/dristruct.h:1.10 xc/programs/Xserver/GL/dri/dristruct.h:1.13 --- xc/programs/Xserver/GL/dri/dristruct.h:1.10 Wed Mar 21 11:21:40 2001 +++ xc/programs/Xserver/GL/dri/dristruct.h Wed Nov 20 13:10:24 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.10 2001/03/21 16:21:40 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.13 2002/11/20 18:10:24 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -28,7 +28,7 @@ /* * Authors: - * Jens Owen <jens@precisioninsight.com> + * Jens Owen <jens@tungstengraphics.com> * */ @@ -96,6 +96,9 @@ DRIContextPrivPtr dummyCtxPriv; /* Pointer to dummy context */ Bool createDummyCtx; Bool createDummyCtxPriv; + Bool grabbedDRILock; + Bool drmSIGIOHandlerInstalled; + Bool wrapped; } DRIScreenPrivRec, *DRIScreenPrivPtr; #endif /* DRI_STRUCT_H */ Index: xc/programs/Xserver/GL/dri/sarea.h diff -u xc/programs/Xserver/GL/dri/sarea.h:1.10 xc/programs/Xserver/GL/dri/sarea.h:1.11 --- xc/programs/Xserver/GL/dri/sarea.h:1.10 Thu Oct 4 14:28:20 2001 +++ xc/programs/Xserver/GL/dri/sarea.h Wed Oct 30 07:52:03 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.10 2001/10/04 18:28:20 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,7 @@ /* * Authors: * Kevin E. Martin <kevin@precisioninsight.com> - * Jens Owen <jens@precisioninsight.com> + * Jens Owen <jens@tungstengraphics.com> * Rickard E. (Rik) Faith <faith@valinux.com> * */ Index: xc/programs/Xserver/GL/dri/xf86dri.c diff -u xc/programs/Xserver/GL/dri/xf86dri.c:1.10 xc/programs/Xserver/GL/dri/xf86dri.c:1.12 --- xc/programs/Xserver/GL/dri/xf86dri.c:1.10 Thu Dec 7 15:26:14 2000 +++ xc/programs/Xserver/GL/dri/xf86dri.c Fri Dec 13 20:36:08 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.10 2000/12/07 20:26:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.12 2002/12/14 01:36:08 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -30,7 +30,7 @@ /* * Authors: * Kevin E. Martin <martin@valinux.com> - * Jens Owen <jens@valinux.com> + * Jens Owen <jens@tungstengraphics.com> * Rickard E. (Rik) Faith <faith@valinux.com> * */ @@ -155,6 +155,11 @@ REQUEST(xXF86DRIQueryDirectRenderingCapableReq); REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -184,6 +189,10 @@ REQUEST(xXF86DRIOpenConnectionReq); REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } if (!DRIOpenConnection( screenInfo.screens[stuff->screen], &hSAREA, @@ -221,6 +230,10 @@ REQUEST(xXF86DRIAuthConnectionReq); REQUEST_SIZE_MATCH(xXF86DRIAuthConnectionReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } rep.type = X_Reply; rep.length = 0; @@ -242,6 +255,10 @@ { REQUEST(xXF86DRICloseConnectionReq); REQUEST_SIZE_MATCH(xXF86DRICloseConnectionReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } DRICloseConnection( screenInfo.screens[stuff->screen]); @@ -258,6 +275,10 @@ REQUEST(xXF86DRIGetClientDriverNameReq); REQUEST_SIZE_MATCH(xXF86DRIGetClientDriverNameReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } DRIGetClientDriverName( screenInfo.screens[stuff->screen], (int *)&rep.ddxDriverMajorVersion, @@ -295,6 +316,11 @@ REQUEST(xXF86DRICreateContextReq); REQUEST_SIZE_MATCH(xXF86DRICreateContextReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -329,6 +355,10 @@ { REQUEST(xXF86DRIDestroyContextReq); REQUEST_SIZE_MATCH(xXF86DRIDestroyContextReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } if (!DRIDestroyContext( screenInfo.screens[stuff->screen], stuff->context)) { @@ -348,6 +378,11 @@ REQUEST(xXF86DRICreateDrawableReq); REQUEST_SIZE_MATCH(xXF86DRICreateDrawableReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -378,6 +413,10 @@ REQUEST(xXF86DRIDestroyDrawableReq); DrawablePtr pDrawable; REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable( (Drawable)stuff->drawable, @@ -409,6 +448,11 @@ REQUEST(xXF86DRIGetDrawableInfoReq); REQUEST_SIZE_MATCH(xXF86DRIGetDrawableInfoReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -483,6 +527,11 @@ REQUEST(xXF86DRIGetDeviceInfoReq); REQUEST_SIZE_MATCH(xXF86DRIGetDeviceInfoReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -528,6 +577,11 @@ DrawablePtr pDrawable; REQUEST_SIZE_MATCH(xXF86DRIOpenFullScreenReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -554,6 +608,11 @@ DrawablePtr pDrawable; REQUEST_SIZE_MATCH(xXF86DRICloseFullScreenReq); + if (stuff->screen >= screenInfo.numScreens) { + client->errorValue = stuff->screen; + return BadValue; + } + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; Index: xc/programs/Xserver/GL/glx/glxcmds.c diff -u xc/programs/Xserver/GL/glx/glxcmds.c:1.8 xc/programs/Xserver/GL/glx/glxcmds.c:1.9 --- xc/programs/Xserver/GL/glx/glxcmds.c:1.8 Wed May 2 11:06:05 2001 +++ xc/programs/Xserver/GL/glx/glxcmds.c Fri Dec 13 20:36:09 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.8 2001/05/02 15:06:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.9 2002/12/14 01:36:09 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 @@ -761,7 +761,7 @@ int i, p; screen = req->screen; - if (screen > screenInfo.numScreens) { + if (screen >= screenInfo.numScreens) { /* The client library must send a valid screen number. */ client->errorValue = screen; return BadValue; @@ -1466,7 +1466,7 @@ ClientPtr client = cl->client; xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc; xGLXQueryExtensionsStringReply reply; - GLint screen; + GLuint screen; size_t n, length; const char *ptr; char *buf; @@ -1475,7 +1475,7 @@ /* ** Check if screen exists. */ - if ((screen < 0) || (screen >= screenInfo.numScreens)) { + if (screen >= screenInfo.numScreens) { client->errorValue = screen; return BadValue; } @@ -1511,7 +1511,7 @@ xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc; xGLXQueryServerStringReply reply; int name; - GLint screen; + GLuint screen; size_t n, length; const char *ptr; char *buf; @@ -1521,7 +1521,7 @@ /* ** Check if screen exists. */ - if ((screen < 0) || (screen >= screenInfo.numScreens)) { + if (screen >= screenInfo.numScreens) { client->errorValue = screen; return BadValue; } Index: xc/programs/Xserver/GL/glx/glxcontext.h diff -u xc/programs/Xserver/GL/glx/glxcontext.h:1.3 xc/programs/Xserver/GL/glx/glxcontext.h:1.4 --- xc/programs/Xserver/GL/glx/glxcontext.h:1.3 Wed Mar 21 11:29:36 2001 +++ xc/programs/Xserver/GL/glx/glxcontext.h Fri Feb 22 16:45:07 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcontext.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxcontext.h,v 1.4 2002/02/22 21:45:07 dawes Exp $ */ #ifndef _GLX_context_h_ #define _GLX_context_h_ @@ -38,6 +38,9 @@ */ typedef struct __GLXcontextRec __GLXcontext; + +/* XXX: should be defined somewhere globally */ +#define CAPI #include "GL/internal/glcore.h" Index: xc/programs/Xserver/GL/glx/glxmem.c diff -u xc/programs/Xserver/GL/glx/glxmem.c:1.6 xc/programs/Xserver/GL/glx/glxmem.c:1.7 --- xc/programs/Xserver/GL/glx/glxmem.c:1.6 Wed Oct 31 17:50:27 2001 +++ xc/programs/Xserver/GL/glx/glxmem.c Wed Aug 28 02:41:26 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxmem.c,v 1.6 2001/10/31 22:50:27 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxmem.c,v 1.7 2002/08/28 06:41:26 torrey Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -74,7 +74,7 @@ /* ** Only allocate buffer space for the SGI core. - ** Mesa handles its own buffer allocations. + ** Mesa and Aqua handle their own buffer allocations. */ #if defined(__GL_BUFFER_SIZE_TRACKS_WINDOW) if (__glXCoreType() == GL_CORE_SGI) { Index: xc/programs/Xserver/GL/glx/glxscreens.c diff -u xc/programs/Xserver/GL/glx/glxscreens.c:1.8 xc/programs/Xserver/GL/glx/glxscreens.c:1.10 --- xc/programs/Xserver/GL/glx/glxscreens.c:1.8 Wed Oct 31 17:50:27 2001 +++ xc/programs/Xserver/GL/glx/glxscreens.c Thu Apr 4 09:05:36 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.8 2001/10/31 22:50:27 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.10 2002/04/04 14:05:36 eich Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -47,12 +47,22 @@ #include "glxutil.h" static char GLServerExtensions[] = - "GL_ARB_multitexture " "GL_ARB_imaging " + "GL_ARB_multitexture " + "GL_ARB_texture_border_clamp " + "GL_ARB_texture_cube_map " + "GL_ARB_texture_env_add " + "GL_ARB_texture_env_combine " + "GL_ARB_texture_env_dot3 " + "GL_ARB_transpose_matrix " "GL_EXT_abgr " "GL_EXT_blend_color " "GL_EXT_blend_minmax " "GL_EXT_blend_subtract " + "GL_EXT_texture_env_add " + "GL_EXT_texture_env_combine " + "GL_EXT_texture_env_dot3 " + "GL_EXT_texture_lod_bias " ; /* @@ -309,6 +319,7 @@ __glXFree(__glXActiveScreens[i].GLXvendor); __glXFree(__glXActiveScreens[i].GLXversion); __glXFree(__glXActiveScreens[i].GLXextensions); + __glXFree(__glXActiveScreens[i].GLextensions); } xfree(__glXActiveScreens); __glXActiveScreens = NULL; Index: xc/programs/Xserver/GL/glx/glxscreens.h diff -u xc/programs/Xserver/GL/glx/glxscreens.h:1.4 xc/programs/Xserver/GL/glx/glxscreens.h:1.5 --- xc/programs/Xserver/GL/glx/glxscreens.h:1.4 Wed Mar 21 11:29:37 2001 +++ xc/programs/Xserver/GL/glx/glxscreens.h Fri Feb 22 16:45:07 2002 @@ -1,7 +1,7 @@ #ifndef _GLX_screens_h_ #define _GLX_screens_h_ -/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.h,v 1.4 2001/03/21 16:29:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.h,v 1.5 2002/02/22 21:45:07 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 @@ -37,9 +37,10 @@ ** */ -#include "GL/internal/glcore.h" - +/* XXX: should be defined somewhere globally */ +#define CAPI +#include "GL/internal/glcore.h" /* ** Screen dependent data. These methods are the interface between the DIX Index: xc/programs/Xserver/GL/glx/rensize.c diff -u xc/programs/Xserver/GL/glx/rensize.c:1.4 xc/programs/Xserver/GL/glx/rensize.c:1.5 --- xc/programs/Xserver/GL/glx/rensize.c:1.4 Wed Oct 31 17:50:27 2001 +++ xc/programs/Xserver/GL/glx/rensize.c Fri Feb 22 16:45:07 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.4 2001/10/31 22:50:27 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.5 2002/02/22 21:45:07 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 @@ -301,6 +301,7 @@ case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: + case GL_INTENSITY: elementsPerGroup = 1; break; case GL_LUMINANCE_ALPHA: @@ -412,6 +413,7 @@ case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: + case GL_INTENSITY: elementsPerGroup = 1; break; case GL_LUMINANCE_ALPHA: @@ -581,7 +583,7 @@ skipRows = SWAPL( skipRows ); alignment = SWAPL( alignment ); } - if (target == GL_PROXY_TEXTURE_2D) { + if (target == GL_PROXY_TEXTURE_2D || target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { return 0; } else if (format == GL_STENCIL_INDEX || format == GL_DEPTH_COMPONENT) { return -1; @@ -945,6 +947,7 @@ case GL_PROXY_COLOR_TABLE: case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_PROXY_TEXTURE_CUBE_MAP_ARB: return 0; } Index: xc/programs/Xserver/GL/glx/singlesize.c diff -u xc/programs/Xserver/GL/glx/singlesize.c:1.3 xc/programs/Xserver/GL/glx/singlesize.c:1.4 --- xc/programs/Xserver/GL/glx/singlesize.c:1.3 Wed Mar 21 11:29:37 2001 +++ xc/programs/Xserver/GL/glx/singlesize.c Fri Feb 22 16:45:07 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.4 2002/02/22 21:45:07 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 @@ -63,6 +63,7 @@ case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: + case GL_INTENSITY: elements = 1; break; case GL_LUMINANCE_ALPHA: @@ -149,6 +150,25 @@ return 1; case GL_TEXTURE_ENV_COLOR: return 4; + case GL_TEXTURE_LOD_BIAS_EXT: + return 1; + case GL_COMBINE_RGB_ARB: + case GL_COMBINE_ALPHA_ARB: + case GL_SOURCE0_RGB_ARB: + case GL_SOURCE1_RGB_ARB: + case GL_SOURCE2_RGB_ARB: + case GL_SOURCE0_ALPHA_ARB: + case GL_SOURCE1_ALPHA_ARB: + case GL_SOURCE2_ALPHA_ARB: + case GL_OPERAND0_RGB_ARB: + case GL_OPERAND1_RGB_ARB: + case GL_OPERAND2_RGB_ARB: + case GL_OPERAND0_ALPHA_ARB: + case GL_OPERAND1_ALPHA_ARB: + case GL_OPERAND2_ALPHA_ARB: + case GL_RGB_SCALE_ARB: + case GL_ALPHA_SCALE: + return 1; default: return -1; } @@ -876,6 +896,9 @@ return 1; case GL_RESCALE_NORMAL: return 1; + case GL_MAX_ELEMENTS_INDICES: + case GL_MAX_ELEMENTS_VERTICES: + return 1; case GL_ACTIVE_TEXTURE_ARB: case GL_CLIENT_ACTIVE_TEXTURE_ARB: case GL_MAX_TEXTURE_UNITS_ARB: @@ -884,6 +907,10 @@ case GL_MAX_CONVOLUTION_WIDTH: case GL_MAX_CONVOLUTION_HEIGHT: return 1; + case GL_TEXTURE_CUBE_MAP_ARB: + case GL_TEXTURE_BINDING_CUBE_MAP_ARB: + case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: + return 1; default: return -1; } @@ -955,6 +982,7 @@ case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: + case GL_INTENSITY: elements = 1; break; case GL_LUMINANCE_ALPHA: Index: xc/programs/Xserver/GL/glx/unpack.h diff -u xc/programs/Xserver/GL/glx/unpack.h:1.4 xc/programs/Xserver/GL/glx/unpack.h:1.5 --- xc/programs/Xserver/GL/glx/unpack.h:1.4 Mon Jan 14 17:47:08 2002 +++ xc/programs/Xserver/GL/glx/unpack.h Wed Oct 30 07:52:03 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.4 2002/01/14 22:47:08 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.5 2002/10/30 12:52:03 alanh Exp $ */ #ifndef __GLX_unpack_h__ #define __GLX_unpack_h__ @@ -49,7 +49,7 @@ ** Fetch a double from potentially unaligned memory. */ #ifdef __GLX_ALIGN64 -#define __GLX_MEM_COPY(dst,src,n) memcpy(dst,src,n) +#define __GLX_MEM_COPY(dst,src,n) if (src && dst) memcpy(dst,src,n) #define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8) #else #define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src)) Index: xc/programs/Xserver/GL/include/GL/glx_ansic.h diff -u xc/programs/Xserver/GL/include/GL/glx_ansic.h:1.6 xc/programs/Xserver/GL/include/GL/glx_ansic.h:1.7 --- xc/programs/Xserver/GL/include/GL/glx_ansic.h:1.6 Thu Jan 10 16:51:47 2002 +++ xc/programs/Xserver/GL/include/GL/glx_ansic.h Thu Apr 4 09:05:36 2002 @@ -1,7 +1,7 @@ #ifndef _glx_ansic_h_ #define _glx_ansic_h_ -/* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.6 2002/01/10 21:51:47 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.7 2002/04/04 14:05:36 eich Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -93,7 +93,7 @@ #define __glXMemmove(dest, src, n) memmove(dest, src, n) #define __glXMemcpy(dest, src, n) memcpy(dest, src, n) #define __glXMemset(s, c, n) memset(s, c, n) -#define __glXStrdup(str) strdup(str) +#define __glXStrdup(str) xstrdup(str) #define __glXStrcpy(dest, src) strcpy(dest, src) #define __glXStrncpy(dest, src, n) strncpy(dest, src, n) #define __glXStrcat(dest, src) strcat(dest, src) Index: xc/programs/Xserver/GL/mesa/Imakefile diff -u xc/programs/Xserver/GL/mesa/Imakefile:1.5 xc/programs/Xserver/GL/mesa/Imakefile:1.6 --- xc/programs/Xserver/GL/mesa/Imakefile:1.5 Thu Apr 26 12:54:45 2001 +++ xc/programs/Xserver/GL/mesa/Imakefile Sun Feb 24 19:45:41 2002 @@ -1,11 +1,11 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/Imakefile,v 1.5 2001/04/26 16:54:45 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/Imakefile,v 1.6 2002/02/25 00:45:41 dawes Exp $ #define IHaveModules #include <Server.tmpl> #define IHaveSubdirs - SUBDIRS = src + SUBDIRS = src GLcore DEFINES = $(GLX_DEFINES) MakeSubdirs($(SUBDIRS)) Index: xc/programs/Xserver/GL/mesa/GLcore/GLcore-def.cpp diff -u /dev/null xc/programs/Xserver/GL/mesa/GLcore/GLcore-def.cpp:1.1 --- /dev/null Thu Feb 27 12:28:23 2003 +++ xc/programs/Xserver/GL/mesa/GLcore/GLcore-def.cpp Sun Feb 24 19:45:41 2002 @@ -0,0 +1,1483 @@ +LIBRARY GLcore +VERSION LIBRARY_VERSION +EXPORTS + +_mesa_set_aa_triangle_function +_mesa_Accum +_mesa_ClearAccum +_mesa_alloc_accum_buffer +_mesa_clear_accum_buffer +_mesa_AlphaFunc +_mesa_alpha_test +_mesa_alloc_alpha_buffers +_mesa_clear_alpha_buffers +_mesa_read_alpha_pixels +_mesa_read_alpha_span +_mesa_write_alpha_pixels +_mesa_write_alpha_span +_mesa_write_mono_alpha_pixels +_mesa_write_mono_alpha_span +_mesa_PopAttrib +_mesa_PopClientAttrib +_mesa_PushAttrib +_mesa_PushClientAttrib +_mesa_Bitmap +_mesa_BlendColor +_mesa_BlendEquation +_mesa_BlendFunc +_mesa_BlendFuncSeparateEXT +_mesa_blend_pixels +_mesa_blend_span +_mesa_Clear +_mesa_ClearColor +_mesa_ClearIndex +_mesa_DrawBuffer +_mesa_ReadBuffer +_mesa_ResizeBuffersMESA +_mesa_ClipPlane +_mesa_GetClipPlane +gl_init_clip +gl_update_clipmask +gl_update_userclip +gl_user_cliptest +gl_userclip_point +gl_viewclip_point +_mesa_ColorSubTable +_mesa_ColorTable +_mesa_ColorTableParameterfv +_mesa_ColorTableParameteriv +_mesa_CopyColorSubTable +_mesa_CopyColorTable +_mesa_GetColorTable +_mesa_GetColorTableParameterfv +_mesa_GetColorTableParameteriv +_mesa_free_colortable_data +_mesa_init_colortable +gl_read_config_file +gl_register_config_var +_mesa_Finish +_mesa_Flush +_mesa_create_visual +_mesa_destroy_visual +_mesa_get_dispatch +_mesa_initialize_context +_mesa_initialize_framebuffer +_mesa_initialize_visual +_mesa_swapbuffers +gl_compile_error +gl_context_initialize +gl_copy_context +gl_create_context +gl_create_framebuffer +gl_create_visual +gl_destroy_context +gl_destroy_framebuffer +gl_destroy_visual +gl_error +gl_free_context_data +gl_get_current_context +gl_make_current +gl_make_current2 +gl_problem +gl_warning +_mesa_CopyPixels +_mesa_LockArraysEXT +_mesa_UnlockArraysEXT +gl_alloc_cva_store +gl_cva_compile_cassette +gl_cva_force_precalc +gl_cva_init +gl_free_cva_store +gl_merge_cva +gl_prepare_arrays_cva +gl_rescue_cva +_mesa_ClearDepth +_mesa_DepthFunc +_mesa_DepthMask +_mesa_alloc_depth_buffer +_mesa_clear_depth_buffer +_mesa_depth_test_pixels +_mesa_depth_test_span +_mesa_read_depth_span +_mesa_read_depth_span_float +_mesa_zbuffer_address +glAccum +glActiveTextureARB +glAlphaFunc +glAreTexturesResident +glAreTexturesResidentEXT +glArrayElement +glArrayElementEXT +glBegin +glBindTexture +glBindTextureEXT +glBitmap +glBlendColor +glBlendColorEXT +glBlendEquation +glBlendEquationEXT +glBlendFunc +glBlendFuncSeparateEXT +glBlendFuncSeparateINGR +glCallList +glCallLists +glClear +glClearAccum +glClearColor +glClearDepth +glClearIndex +glClearStencil +glClientActiveTextureARB +glClipPlane +glColor3b +glColor3bv +glColor3d +glColor3dv +glColor3f +glColor3fv +glColor3i +glColor3iv +glColor3s +glColor3sv +glColor3ub +glColor3ubv +glColor3ui +glColor3uiv +glColor3us +glColor3usv +glColor4b +glColor4bv +glColor4d +glColor4dv +glColor4f +glColor4fv +glColor4i +glColor4iv +glColor4s +glColor4sv +glColor4ub +glColor4ubv +glColor4ui +glColor4uiv +glColor4us +glColor4usv +glColorMask +glColorMaterial +glColorPointer +glColorPointerEXT +glColorSubTable +glColorSubTableEXT +glColorTable +glColorTableEXT +glColorTableParameterfv +glColorTableParameterfvSGI +glColorTableParameteriv +glColorTableParameterivSGI +glColorTableSGI +glCombinerInputNV +glCombinerOutputNV +glCombinerParameterfNV +glCombinerParameterfvNV +glCombinerParameteriNV +glCombinerParameterivNV +glCompressedTexImage1DARB +glCompressedTexImage2DARB +glCompressedTexImage3DARB +glCompressedTexSubImage1DARB +glCompressedTexSubImage2DARB +glCompressedTexSubImage3DARB +glConvolutionFilter1D +glConvolutionFilter1DEXT +glConvolutionFilter2D +glConvolutionFilter2DEXT +glConvolutionParameterf +glConvolutionParameterfEXT +glConvolutionParameterfv +glConvolutionParameterfvEXT +glConvolutionParameteri +glConvolutionParameteriEXT +glConvolutionParameteriv +glConvolutionParameterivEXT +glCopyColorSubTable +glCopyColorSubTableEXT +glCopyColorTable +glCopyColorTableSGI +glCopyConvolutionFilter1D +glCopyConvolutionFilter1DEXT +glCopyConvolutionFilter2D +glCopyConvolutionFilter2DEXT +glCopyPixels +glCopyTexImage1D +glCopyTexImage1DEXT +glCopyTexImage2D +glCopyTexImage2DEXT +glCopyTexSubImage1D +glCopyTexSubImage1DEXT +glCopyTexSubImage2D +glCopyTexSubImage2DEXT +glCopyTexSubImage3D +glCopyTexSubImage3DEXT +glCullFace +glCullParameterdvEXT +glCullParameterfvEXT +glDeleteLists +glDeleteTextures +glDeleteTexturesEXT +glDepthFunc +glDepthMask +glDepthRange +glDetailTexFuncSGIS +glDisable +glDisableClientState +glDrawArrays +glDrawArraysEXT +glDrawBuffer +glDrawElements +glDrawPixels +glDrawRangeElements +glDrawRangeElementsEXT +glEdgeFlag +glEdgeFlagPointer +glEdgeFlagPointerEXT +glEdgeFlagv +glEnable +glEnableClientState +glEnd +glEndList +glEvalCoord1d +glEvalCoord1dv +glEvalCoord1f +glEvalCoord1fv +glEvalCoord2d +glEvalCoord2dv +glEvalCoord2f +glEvalCoord2fv +glEvalMesh1 +glEvalMesh2 +glEvalPoint1 +glEvalPoint2 +glFeedbackBuffer +glFinalCombinerInputNV +glFinish +glFlush +glFlushRasterSGIX +glFlushVertexArrayRangeNV +glFogCoordPointerEXT +glFogCoorddEXT +glFogCoorddvEXT +glFogCoordfEXT +glFogCoordfvEXT +glFogf +glFogfv +glFogi +glFogiv +glFragmentColorMaterialSGIX +glFragmentLightModelfSGIX +glFragmentLightModelfvSGIX +glFragmentLightModeliSGIX +glFragmentLightModelivSGIX +glFragmentLightfSGIX +glFragmentLightfvSGIX +glFragmentLightiSGIX +glFragmentLightivSGIX +glFragmentMaterialfSGIX +glFragmentMaterialfvSGIX +glFragmentMaterialiSGIX +glFragmentMaterialivSGIX +glFrameZoomSGIX +glFrontFace +glFrustum +glGenLists +glGenTextures +glGenTexturesEXT +glGetBooleanv +glGetClipPlane +glGetColorTable +glGetColorTableEXT +glGetColorTableParameterfv +glGetColorTableParameterfvEXT +glGetColorTableParameterfvSGI +glGetColorTableParameteriv +glGetColorTableParameterivEXT +glGetColorTableParameterivSGI +glGetColorTableSGI +glGetCombinerInputParameterfvNV +glGetCombinerInputParameterivNV +glGetCombinerOutputParameterfvNV +glGetCombinerOutputParameterivNV +glGetCompressedTexImageARB +glGetConvolutionFilter +glGetConvolutionFilterEXT +glGetConvolutionParameterfv +glGetConvolutionParameterfvEXT +glGetConvolutionParameteriv +glGetConvolutionParameterivEXT +glGetDetailTexFuncSGIS +glGetDoublev +glGetError +glGetFinalCombinerInputParameterfvNV +glGetFinalCombinerInputParameterivNV +glGetFloatv +glGetFragmentLightfvSGIX +glGetFragmentLightivSGIX +glGetFragmentMaterialfvSGIX +glGetFragmentMaterialivSGIX +glGetHistogram +glGetHistogramEXT +glGetHistogramParameterfv +glGetHistogramParameterfvEXT +glGetHistogramParameteriv +glGetHistogramParameterivEXT +glGetInstrumentsSGIX +glGetIntegerv +glGetLightfv +glGetLightiv +glGetListParameterfvSGIX +glGetListParameterivSGIX +glGetMapdv +glGetMapfv +glGetMapiv +glGetMaterialfv +glGetMaterialiv +glGetMinmax +glGetMinmaxEXT +glGetMinmaxParameterfv +glGetMinmaxParameterfvEXT +glGetMinmaxParameteriv +glGetMinmaxParameterivEXT +glGetPixelMapfv +glGetPixelMapuiv +glGetPixelMapusv +glGetPixelTexGenParameterfvSGIS +glGetPixelTexGenParameterivSGIS +glGetPointerv +glGetPointervEXT +glGetPolygonStipple +glGetSeparableFilter +glGetSeparableFilterEXT +glGetSharpenTexFuncSGIS +glGetString +glGetTexEnvfv +glGetTexEnviv +glGetTexFilterFuncSGIS +glGetTexGendv +glGetTexGenfv +glGetTexGeniv +glGetTexImage +glGetTexLevelParameterfv +glGetTexLevelParameteriv +glGetTexParameterfv +glGetTexParameteriv +glHint +glHintPGI +glHistogram +glHistogramEXT +glIndexFuncEXT +glIndexMask +glIndexMaterialEXT +glIndexPointer +glIndexPointerEXT +glIndexd +glIndexdv +glIndexf +glIndexfv +glIndexi +glIndexiv +glIndexs +glIndexsv +glIndexub +glIndexubv +glInitNames +glInstrumentsBufferSGIX +glInterleavedArrays +glIsEnabled +glIsList +glIsTexture +glIsTextureEXT +glLightEnviSGIX +glLightModelf +glLightModelfv +glLightModeli +glLightModeliv +glLightf +glLightfv +glLighti +glLightiv +glLineStipple +glLineWidth +glListBase +glListParameterfSGIX +glListParameterfvSGIX +glListParameteriSGIX +glListParameterivSGIX +glLoadIdentity +glLoadMatrixd +glLoadMatrixf +glLoadName +glLoadTransposeMatrixdARB +glLoadTransposeMatrixfARB +glLockArraysEXT +glLogicOp +glMap1d +glMap1f +glMap2d +glMap2f +glMapGrid1d +glMapGrid1f +glMapGrid2d +glMapGrid2f +glMaterialf +glMaterialfv +glMateriali +glMaterialiv +glMatrixMode +glMinmax +glMinmaxEXT +glMultMatrixd +glMultMatrixf +glMultTransposeMatrixdARB +glMultTransposeMatrixfARB +glMultiTexCoord1dARB +glMultiTexCoord1dvARB +glMultiTexCoord1fARB +glMultiTexCoord1fvARB +glMultiTexCoord1iARB +glMultiTexCoord1ivARB +glMultiTexCoord1sARB +glMultiTexCoord1svARB +glMultiTexCoord2dARB +glMultiTexCoord2dvARB +glMultiTexCoord2fARB +glMultiTexCoord2fvARB +glMultiTexCoord2iARB +glMultiTexCoord2ivARB +glMultiTexCoord2sARB +glMultiTexCoord2svARB +glMultiTexCoord3dARB +glMultiTexCoord3dvARB +glMultiTexCoord3fARB +glMultiTexCoord3fvARB +glMultiTexCoord3iARB +glMultiTexCoord3ivARB +glMultiTexCoord3sARB +glMultiTexCoord3svARB +glMultiTexCoord4dARB +glMultiTexCoord4dvARB +glMultiTexCoord4fARB +glMultiTexCoord4fvARB +glMultiTexCoord4iARB +glMultiTexCoord4ivARB +glMultiTexCoord4sARB +glMultiTexCoord4svARB +glNewList +glNormal3b +glNormal3bv +glNormal3d +glNormal3dv +glNormal3f +glNormal3fv +glNormal3i +glNormal3iv +glNormal3s +glNormal3sv +glNormalPointer +glNormalPointerEXT +glOrtho +glPassThrough +glPixelMapfv +glPixelMapuiv +glPixelMapusv +glPixelStoref +glPixelStorei +glPixelTexGenParameterfSGIS +glPixelTexGenParameterfvSGIS +glPixelTexGenParameteriSGIS +glPixelTexGenParameterivSGIS +glPixelTexGenSGIX +glPixelTransferf +glPixelTransferi +glPixelZoom +glPointParameterfEXT +glPointParameterfSGIS +glPointParameterfvEXT +glPointParameterfvSGIS +glPointSize +glPollInstrumentsSGIX +glPolygonMode +glPolygonOffset +glPolygonOffsetEXT +glPolygonStipple +glPopAttrib +glPopClientAttrib +glPopMatrix +glPopName +glPrioritizeTextures +glPrioritizeTexturesEXT +glPushAttrib +glPushClientAttrib +glPushMatrix +glPushName +glRasterPos2d +glRasterPos2dv +glRasterPos2f +glRasterPos2fv +glRasterPos2i +glRasterPos2iv +glRasterPos2s +glRasterPos2sv +glRasterPos3d +glRasterPos3dv +glRasterPos3f +glRasterPos3fv +glRasterPos3i +glRasterPos3iv +glRasterPos3s +glRasterPos3sv +glRasterPos4d +glRasterPos4dv +glRasterPos4f +glRasterPos4fv +glRasterPos4i +glRasterPos4iv +glRasterPos4s +glRasterPos4sv +glReadBuffer +glReadInstrumentsSGIX +glReadPixels +glRectd +glRectdv +glRectf +glRectfv +glRecti +glRectiv +glRects +glRectsv +glReferencePlaneSGIX +glRenderMode +glResetHistogram +glResetHistogramEXT +glResetMinmax +glResetMinmaxEXT +glResizeBuffersMESA +glRotated +glRotatef +glSampleCoverageARB +glSampleMaskEXT +glSampleMaskSGIS +glSamplePassARB +glSamplePatternEXT +glSamplePatternSGIS +glScaled +glScalef +glScissor +glSelectBuffer +glSeparableFilter2D +glSeparableFilter2DEXT +glShadeModel +glSharpenTexFuncSGIS +glSpriteParameterfSGIX +glSpriteParameterfvSGIX +glSpriteParameteriSGIX +glSpriteParameterivSGIX +glStartInstrumentsSGIX +glStencilFunc +glStencilMask +glStencilOp +glStopInstrumentsSGIX +glTagSampleBufferSGIX +glTbufferMask3DFX +glTexCoord1d +glTexCoord1dv +glTexCoord1f +glTexCoord1fv +glTexCoord1i +glTexCoord1iv +glTexCoord1s +glTexCoord1sv +glTexCoord2d +glTexCoord2dv +glTexCoord2f +glTexCoord2fv +glTexCoord2i +glTexCoord2iv +glTexCoord2s +glTexCoord2sv +glTexCoord3d +glTexCoord3dv +glTexCoord3f +glTexCoord3fv +glTexCoord3i +glTexCoord3iv +glTexCoord3s +glTexCoord3sv +glTexCoord4d +glTexCoord4dv +glTexCoord4f +glTexCoord4fv +glTexCoord4i +glTexCoord4iv +glTexCoord4s +glTexCoord4sv +glTexCoordPointer +glTexCoordPointerEXT +glTexEnvf +glTexEnvfv +glTexEnvi +glTexEnviv +glTexFilterFuncSGIS +glTexGend +glTexGendv +glTexGenf +glTexGenfv +glTexGeni +glTexGeniv +glTexImage1D +glTexImage2D +glTexImage3D +glTexImage3DEXT +glTexImage4DSGIS +glTexParameterf +glTexParameterfv +glTexParameteri +glTexParameteriv +glTexSubImage1D +glTexSubImage1DEXT +glTexSubImage2D +glTexSubImage2DEXT +glTexSubImage3D +glTexSubImage3DEXT +glTexSubImage4DSGIS +glTranslated +glTranslatef +glUnlockArraysEXT +glVertex2d +glVertex2dv +glVertex2f +glVertex2fv +glVertex2i +glVertex2iv +glVertex2s +glVertex2sv +glVertex3d +glVertex3dv +glVertex3f +glVertex3fv +glVertex3i +glVertex3iv +glVertex3s +glVertex3sv +glVertex4d +glVertex4dv +glVertex4f +glVertex4fv +glVertex4i +glVertex4iv +glVertex4s +glVertex4sv +glVertexArrayRangeNV +glVertexPointer +glVertexPointerEXT +glVertexWeightPointerEXT +glVertexWeightfEXT +glVertexWeightfvEXT +glViewport +glWindowPos2dMESA +glWindowPos2dvMESA +glWindowPos2fMESA +glWindowPos2fvMESA +glWindowPos2iMESA +glWindowPos2ivMESA +glWindowPos2sMESA +glWindowPos2svMESA +glWindowPos3dMESA +glWindowPos3dvMESA +glWindowPos3fMESA +glWindowPos3fvMESA +glWindowPos3iMESA +glWindowPos3ivMESA +glWindowPos3sMESA +glWindowPos3svMESA +glWindowPos4dMESA +glWindowPos4dvMESA +glWindowPos4fMESA +glWindowPos4fvMESA +glWindowPos4iMESA +glWindowPos4ivMESA +glWindowPos4sMESA +glWindowPos4svMESA +_mesa_CallList +_mesa_CallLists +_mesa_DeleteLists +_mesa_EndList +_mesa_GenLists +_mesa_IsList +_mesa_ListBase +_mesa_NewList +_mesa_init_dlist_table +gl_compile_cassette +gl_destroy_list +gl_init_lists +gl_save_error +mesa_print_display_list +_mesa_DrawPixels +_mesa_clip_pixelrect +_mesa_Disable +_mesa_DisableClientState +_mesa_Enable +_mesa_EnableClientState +_mesa_IsEnabled +_mesa_set_enable +gl_lookup_enum_by_name +gl_lookup_enum_by_nr +_mesa_EvalCoord1d +_mesa_EvalCoord1dv +_mesa_EvalCoord1f +_mesa_EvalCoord1fv +_mesa_EvalCoord2d +_mesa_EvalCoord2dv +_mesa_EvalCoord2f +_mesa_EvalCoord2fv +_mesa_EvalMesh1 +_mesa_EvalMesh2 +_mesa_EvalPoint1 +_mesa_EvalPoint2 +_mesa_GetMapdv +_mesa_GetMapfv +_mesa_GetMapiv +_mesa_Map1d +_mesa_Map1f +_mesa_Map2d +_mesa_Map2f +_mesa_MapGrid1d +_mesa_MapGrid1f +_mesa_MapGrid2d +_mesa_MapGrid2f +_mesa_evaluator_components +gl_copy_map_points1d +gl_copy_map_points1f +gl_copy_map_points2d +gl_copy_map_points2f +gl_eval_vb +gl_init_eval +gl_extension_is_enabled +gl_extensions_add +gl_extensions_ctr +gl_extensions_disable +gl_extensions_dtr +gl_extensions_enable +gl_extensions_get_string +_mesa_FeedbackBuffer +_mesa_InitNames +_mesa_LoadName +_mesa_PassThrough +_mesa_PopName +_mesa_PushName +_mesa_RenderMode +_mesa_SelectBuffer +gl_feedback_line +gl_feedback_points +gl_feedback_triangle +gl_feedback_vertex +gl_select_line +gl_select_points +gl_select_triangle +gl_update_hitflag +_mesa_Fogf +_mesa_Fogfv +_mesa_Fogi +_mesa_Fogiv +_mesa_fog_ci_pixels +_mesa_fog_rgba_pixels +_mesa_fog_vertices +_mesa_init_fog +_mesa_GetBooleanv +_mesa_GetDoublev +_mesa_GetError +_mesa_GetFloatv +_mesa_GetIntegerv +_mesa_GetPointerv +_mesa_GetString +_glapi_add_entrypoint +_glapi_check_multithread +_glapi_check_table +_glapi_get_context +_glapi_get_dispatch +_glapi_get_dispatch_table_size +_glapi_get_proc_address +_glapi_get_proc_name +_glapi_get_proc_offset +_glapi_get_version +_glapi_set_context +_glapi_set_dispatch +_glapi_noop_enable_warnings +_glthread_GetID +_glthread_GetTSD +_glthread_InitTSD +_glthread_SetTSD +_mesa_DeleteHashTable +_mesa_HashFindFreeKeyBlock +_mesa_HashFirstEntry +_mesa_HashInsert +_mesa_HashLookup +_mesa_HashPrint +_mesa_HashRemove +_mesa_NewHashTable +_mesa_Hint +_mesa_HintPGI +_mesa_try_Hint +_mesa_bytes_per_pixel +_mesa_components_in_format +_mesa_image_address +_mesa_image_row_stride +_mesa_is_legal_format_and_type +_mesa_native_packing +_mesa_pack_bitmap +_mesa_pack_polygon_stipple +_mesa_pack_rgba_span +_mesa_sizeof_packed_type +_mesa_sizeof_type +_mesa_swap2 +_mesa_swap4 +_mesa_unpack_bitmap +_mesa_unpack_depth_span +_mesa_unpack_float_color_span +_mesa_unpack_image +_mesa_unpack_index_span +_mesa_unpack_polygon_stipple +_mesa_unpack_stencil_span +_mesa_unpack_ubyte_color_span +_mesa_ConvolutionFilter1D +_mesa_ConvolutionFilter2D +_mesa_ConvolutionParameterf +_mesa_ConvolutionParameterfv +_mesa_ConvolutionParameteri +_mesa_ConvolutionParameteriv +_mesa_CopyConvolutionFilter1D +_mesa_CopyConvolutionFilter2D +_mesa_GetConvolutionFilter +_mesa_GetConvolutionParameterfv +_mesa_GetConvolutionParameteriv +_mesa_GetHistogram +_mesa_GetHistogramParameterfv +_mesa_GetHistogramParameteriv +_mesa_GetMinmax +_mesa_GetMinmaxParameterfv +_mesa_GetMinmaxParameteriv +_mesa_GetSeparableFilter +_mesa_Histogram +_mesa_Minmax +_mesa_ResetHistogram +_mesa_ResetMinmax +_mesa_SeparableFilter2D +_mesa_update_histogram +_mesa_update_minmax +_mesa_ColorMaterial +_mesa_GetLightfv +_mesa_GetLightiv +_mesa_GetMaterialfv +_mesa_GetMaterialiv +_mesa_LightModelf +_mesa_LightModelfv +_mesa_LightModeli +_mesa_LightModeliv +_mesa_Lightf +_mesa_Lightfv +_mesa_Lighti +_mesa_Lightiv +_mesa_Materialf +_mesa_Materialfv +_mesa_Materiali +_mesa_Materialiv +_mesa_ShadeModel +gl_compute_light_positions +gl_compute_shine_table +gl_compute_spot_exp_table +gl_material_bitmask +gl_update_color_material +gl_update_lighting +gl_update_material +gl_update_normal_transform +_mesa_LineStipple +_mesa_LineWidth +gl_set_line_function +_mesa_LogicOp +_mesa_logicop_ci_pixels +_mesa_logicop_ci_span +_mesa_logicop_rgba_pixels +_mesa_logicop_rgba_span +_mesa_ColorMask +_mesa_IndexMask +_mesa_mask_index_pixels +_mesa_mask_index_span +_mesa_mask_rgba_pixels +_mesa_mask_rgba_span +_mesa_DepthRange +_mesa_Frustum +_mesa_LoadIdentity +_mesa_LoadMatrixd +_mesa_LoadMatrixf +_mesa_LoadTransposeMatrixdARB +_mesa_LoadTransposeMatrixfARB +_mesa_MatrixMode +_mesa_MultMatrixd +_mesa_MultMatrixf +_mesa_MultTransposeMatrixdARB +_mesa_MultTransposeMatrixfARB +_mesa_Ortho +_mesa_PopMatrix +_mesa_PushMatrix +_mesa_Rotated +_mesa_Rotatef +_mesa_Scaled +_mesa_Scalef +_mesa_Translated +_mesa_Translatef +_mesa_Viewport +gl_Viewport +gl_calculate_model_project_matrix +gl_mat_mul_floats +gl_mat_mul_mat +gl_matrix_alloc_inv +gl_matrix_analyze +gl_matrix_copy +gl_matrix_ctr +gl_matrix_dtr +gl_matrix_invert +gl_matrix_mul +gl_matrix_transposed +gl_matrix_transposef +gl_print_matrix +gl_rotation_matrix +_mesa_calloc +_mesa_free +_mesa_malloc +_mesa_bitcount +_mesa_init_math +gl_sqrt +gl_alloc_pb +gl_flush_pb +gl_build_immediate_pipeline +gl_build_precalc_pipeline +gl_pipeline_init +gl_print_active_pipeline +gl_print_pipe_ops +gl_print_pipeline +gl_print_tri_caps +gl_print_vert_flags +gl_reset_cva_vb +gl_run_pipeline +gl_update_pipelines +_mesa_GetPixelMapfv +_mesa_GetPixelMapuiv +_mesa_GetPixelMapusv +_mesa_PixelMapfv +_mesa_PixelMapuiv +_mesa_PixelMapusv +_mesa_PixelStoref +_mesa_PixelStorei +_mesa_PixelTransferf +_mesa_PixelTransferi +_mesa_PixelZoom +_mesa_lookup_rgba +_mesa_map_ci +_mesa_map_ci8_to_rgba +_mesa_map_ci_to_rgba +_mesa_map_ci_to_rgba_ubyte +_mesa_map_rgba +_mesa_map_stencil +_mesa_scale_and_bias_rgba +_mesa_shift_and_offset_ci +_mesa_shift_and_offset_stencil +_mesa_transform_rgba +_mesa_GetPixelTexGenParameterfvSGIS +_mesa_GetPixelTexGenParameterivSGIS +_mesa_PixelTexGenParameterfSGIS +_mesa_PixelTexGenParameterfvSGIS +_mesa_PixelTexGenParameteriSGIS +_mesa_PixelTexGenParameterivSGIS +_mesa_PixelTexGenSGIX +_mesa_pixeltexgen +_mesa_PointParameterfEXT +_mesa_PointParameterfvEXT +_mesa_PointSize +gl_set_point_function +_mesa_CullFace +_mesa_FrontFace +_mesa_GetPolygonStipple +_mesa_PolygonMode +_mesa_PolygonOffset +_mesa_PolygonOffsetEXT +_mesa_PolygonStipple +gl_set_quad_function +_mesa_RasterPos2d +_mesa_RasterPos2dv +_mesa_RasterPos2f +_mesa_RasterPos2fv +_mesa_RasterPos2i +_mesa_RasterPos2iv +_mesa_RasterPos2s +_mesa_RasterPos2sv +_mesa_RasterPos3d +_mesa_RasterPos3dv +_mesa_RasterPos3f +_mesa_RasterPos3fv +_mesa_RasterPos3i +_mesa_RasterPos3iv +_mesa_RasterPos3s +_mesa_RasterPos3sv +_mesa_RasterPos4d +_mesa_RasterPos4dv +_mesa_RasterPos4f +_mesa_RasterPos4fv +_mesa_RasterPos4i +_mesa_RasterPos4iv +_mesa_RasterPos4s +_mesa_RasterPos4sv +_mesa_ReadPixels +_mesa_Rectd +_mesa_Rectdv +_mesa_Rectf +_mesa_Rectfv +_mesa_Recti +_mesa_Rectiv +_mesa_Rects +_mesa_Rectsv +_mesa_Scissor +gl_scissor_pixels +gl_scissor_span +gl_init_shade +gl_shade_rastpos +gl_update_lighting_function +gl_read_index_span +gl_read_rgba_span +gl_write_index_span +gl_write_monocolor_span +gl_write_monoindex_span +gl_write_multitexture_span +gl_write_rgba_span +gl_write_texture_span +gl_clean_color +gl_default_nr_stages +gl_default_pipeline +gl_import_client_data +gl_init_vbxform +gl_update_materials +_mesa_init_exec_table +_mesa_init_no_op_table +gl_print_enable_flags +gl_print_state +gl_update_state +_mesa_ClearStencil +_mesa_StencilFunc +_mesa_StencilMask +_mesa_StencilOp +_mesa_alloc_stencil_buffer +_mesa_clear_stencil_buffer +_mesa_read_stencil_span +_mesa_stencil_and_ztest_pixels +_mesa_stencil_and_ztest_span +_mesa_write_stencil_span +_mesa_CompressedTexImage1DARB +_mesa_CompressedTexImage2DARB +_mesa_CompressedTexImage3DARB +_mesa_CompressedTexSubImage1DARB +_mesa_CompressedTexSubImage2DARB +_mesa_CompressedTexSubImage3DARB +_mesa_CopyTexImage1D +_mesa_CopyTexImage2D +_mesa_CopyTexSubImage1D +_mesa_CopyTexSubImage2D +_mesa_CopyTexSubImage3D +_mesa_GetCompressedTexImageARB +_mesa_GetTexImage +_mesa_TexImage1D +_mesa_TexImage2D +_mesa_TexImage3D +_mesa_TexImage3DEXT +_mesa_TexSubImage1D +_mesa_TexSubImage2D +_mesa_TexSubImage3D +_mesa_alloc_texture_image +_mesa_base_tex_format +_mesa_compressed_image_size +_mesa_free_texture_image +_mesa_get_teximage_from_driver +_mesa_select_tex_image +_mesa_select_tex_object +_mesa_AreTexturesResident +_mesa_BindTexture +_mesa_DeleteTextures +_mesa_GenTextures +_mesa_IsTexture +_mesa_PrioritizeTextures +_mesa_test_texobj_completeness +gl_alloc_texture_object +gl_free_texture_object +_mesa_ActiveTextureARB +_mesa_ClientActiveTextureARB +_mesa_GetTexEnvfv +_mesa_GetTexEnviv +_mesa_GetTexGendv +_mesa_GetTexGenfv +_mesa_GetTexGeniv +_mesa_GetTexLevelParameterfv +_mesa_GetTexLevelParameteriv +_mesa_GetTexParameterfv +_mesa_GetTexParameteriv +_mesa_TexEnvf +_mesa_TexEnvfv +_mesa_TexEnvi +_mesa_TexEnviv +_mesa_TexGend +_mesa_TexGendv +_mesa_TexGenf +_mesa_TexGenfv +_mesa_TexGeni +_mesa_TexGeniv +_mesa_TexParameterf +_mesa_TexParameterfv +_mesa_TexParameteri +_mesa_TexParameteriv +gl_put_texobj_on_dirty_list +gl_remove_texobj_from_dirty_list +gl_update_dirty_texobjs +_mesa_set_texture_sampler +gl_init_texture +gl_texture_pixels +gl_update_texture_unit +gl_init_translate +gl_cull_triangle +gl_set_triangle_function +_mesa_ArrayElement +_mesa_ColorPointer +_mesa_ColorPointerEXT +_mesa_DrawArrays +_mesa_DrawElements +_mesa_DrawRangeElements +_mesa_EdgeFlagPointer +_mesa_EdgeFlagPointerEXT +_mesa_IndexPointer +_mesa_IndexPointerEXT +_mesa_InterleavedArrays +_mesa_NormalPointer +_mesa_NormalPointerEXT +_mesa_TexCoordPointer +_mesa_TexCoordPointerEXT +_mesa_VertexPointer +_mesa_VertexPointerEXT +gl_exec_array_elements +gl_update_client_state +gl_immediate_alloc +gl_immediate_free +gl_vb_create_for_cva +gl_vb_create_for_immediate +gl_vb_free +gl_cull_vb +gl_dont_cull_vb +gl_fast_copy_vb +gl_make_normal_cullmask +gl_purge_vertices +_mesa_Begin +_mesa_Color3b +_mesa_Color3bv +_mesa_Color3d +_mesa_Color3dv +_mesa_Color3f +_mesa_Color3fv +_mesa_Color3i +_mesa_Color3iv +_mesa_Color3s +_mesa_Color3sv +_mesa_Color3ub +_mesa_Color3ubv +_mesa_Color3ui +_mesa_Color3uiv +_mesa_Color3us +_mesa_Color3usv +_mesa_Color4b +_mesa_Color4bv +_mesa_Color4d +_mesa_Color4dv +_mesa_Color4f +_mesa_Color4fv +_mesa_Color4i +_mesa_Color4iv +_mesa_Color4s +_mesa_Color4sv +_mesa_Color4ub +_mesa_Color4ubv +_mesa_Color4ui +_mesa_Color4uiv +_mesa_Color4us +_mesa_Color4usv +_mesa_EdgeFlag +_mesa_EdgeFlagv +_mesa_End +_mesa_Indexd +_mesa_Indexdv +_mesa_Indexf +_mesa_Indexfv +_mesa_Indexi +_mesa_Indexiv +_mesa_Indexs +_mesa_Indexsv +_mesa_Indexub +_mesa_Indexubv +_mesa_MultiTexCoord1dARB +_mesa_MultiTexCoord1dvARB +_mesa_MultiTexCoord1fARB +_mesa_MultiTexCoord1fvARB +_mesa_MultiTexCoord1iARB +_mesa_MultiTexCoord1ivARB +_mesa_MultiTexCoord1sARB +_mesa_MultiTexCoord1svARB +_mesa_MultiTexCoord2dARB +_mesa_MultiTexCoord2dvARB +_mesa_MultiTexCoord2fARB +_mesa_MultiTexCoord2fvARB +_mesa_MultiTexCoord2iARB +_mesa_MultiTexCoord2ivARB +_mesa_MultiTexCoord2sARB +_mesa_MultiTexCoord2svARB +_mesa_MultiTexCoord3dARB +_mesa_MultiTexCoord3dvARB +_mesa_MultiTexCoord3fARB +_mesa_MultiTexCoord3fvARB +_mesa_MultiTexCoord3iARB +_mesa_MultiTexCoord3ivARB +_mesa_MultiTexCoord3sARB +_mesa_MultiTexCoord3svARB +_mesa_MultiTexCoord4dARB +_mesa_MultiTexCoord4dvARB +_mesa_MultiTexCoord4fARB +_mesa_MultiTexCoord4fvARB +_mesa_MultiTexCoord4iARB +_mesa_MultiTexCoord4ivARB +_mesa_MultiTexCoord4sARB +_mesa_MultiTexCoord4svARB +_mesa_Normal3b +_mesa_Normal3bv +_mesa_Normal3d +_mesa_Normal3dv +_mesa_Normal3f +_mesa_Normal3fv +_mesa_Normal3i +_mesa_Normal3iv +_mesa_Normal3s +_mesa_Normal3sv +_mesa_TexCoord1d +_mesa_TexCoord1dv +_mesa_TexCoord1f +_mesa_TexCoord1fv +_mesa_TexCoord1i +_mesa_TexCoord1iv +_mesa_TexCoord1s +_mesa_TexCoord1sv +_mesa_TexCoord2d +_mesa_TexCoord2dv +_mesa_TexCoord2f +_mesa_TexCoord2fv +_mesa_TexCoord2i +_mesa_TexCoord2iv +_mesa_TexCoord2s +_mesa_TexCoord2sv +_mesa_TexCoord3d +_mesa_TexCoord3dv +_mesa_TexCoord3f +_mesa_TexCoord3fv +_mesa_TexCoord3i +_mesa_TexCoord3iv +_mesa_TexCoord3s +_mesa_TexCoord3sv +_mesa_TexCoord4d +_mesa_TexCoord4dv +_mesa_TexCoord4f +_mesa_TexCoord4fv +_mesa_TexCoord4i +_mesa_TexCoord4iv +_mesa_TexCoord4s +_mesa_TexCoord4sv +_mesa_Vertex2d +_mesa_Vertex2dv +_mesa_Vertex2f +_mesa_Vertex2fv +_mesa_Vertex2i +_mesa_Vertex2iv +_mesa_Vertex2s +_mesa_Vertex2sv +_mesa_Vertex3d +_mesa_Vertex3dv +_mesa_Vertex3f +_mesa_Vertex3fv +_mesa_Vertex3i +_mesa_Vertex3iv +_mesa_Vertex3s +_mesa_Vertex3sv +_mesa_Vertex4d +_mesa_Vertex4dv +_mesa_Vertex4f +_mesa_Vertex4fv +_mesa_Vertex4i +_mesa_Vertex4iv +_mesa_Vertex4s +_mesa_Vertex4sv +gl_Begin +gl_End +gl_Vertex2f +gl_render_elts +gl_render_vb_indirect +gl_init_vbrender +gl_reduced_prim_change +gl_render_clipped_line +gl_render_clipped_triangle +gl_render_vb +gl_set_render_vb_function +RESET_IMMEDIATE +gl_compute_orflag +gl_copy_prev_vertices +gl_copy_to_current +gl_execute_cassette +gl_fixup_cassette +gl_fixup_input +gl_flush_vb +gl_internal_flush +gl_maybe_transform_vb +gl_print_cassette +gl_print_cassette_flags +gl_reset_input +gl_reset_vb +gl_texcoord_size +gl_vector1ub_alloc +gl_vector1ub_free +gl_vector1ub_init +gl_vector1ui_alloc +gl_vector1ui_free +gl_vector1ui_init +gl_vector3f_alloc +gl_vector3f_free +gl_vector3f_init +gl_vector3f_print +gl_vector4f_alloc +gl_vector4f_clean_elem +gl_vector4f_free +gl_vector4f_init +gl_vector4f_print +gl_vector4ub_alloc +gl_vector4ub_free +gl_vector4ub_init +gl_init_vertices +_mesa_WindowPos2dMESA +_mesa_WindowPos2dvMESA +_mesa_WindowPos2fMESA +_mesa_WindowPos2fvMESA +_mesa_WindowPos2iMESA +_mesa_WindowPos2ivMESA +_mesa_WindowPos2sMESA +_mesa_WindowPos2svMESA +_mesa_WindowPos3dMESA +_mesa_WindowPos3dvMESA +_mesa_WindowPos3fMESA +_mesa_WindowPos3fvMESA +_mesa_WindowPos3iMESA +_mesa_WindowPos3ivMESA +_mesa_WindowPos3sMESA +_mesa_WindowPos3svMESA +_mesa_WindowPos4dMESA +_mesa_WindowPos4dvMESA +_mesa_WindowPos4fMESA +_mesa_WindowPos4fvMESA +_mesa_WindowPos4iMESA +_mesa_WindowPos4ivMESA +_mesa_WindowPos4sMESA +_mesa_WindowPos4svMESA +gl_init_transformation +gl_project_points +gl_transform_point_sz +gl_transform_vector +gl_write_zoomed_index_span +gl_write_zoomed_rgb_span +gl_write_zoomed_rgba_span +gl_write_zoomed_stencil_span +__glBitmap_size +__glCallLists_size +__glDrawPixels_size +__glFogfv_size +__glFogiv_size +__glLightModelfv_size +__glLightModeliv_size +__glLightfv_size +__glLightiv_size +__glMaterialfv_size +__glMaterialiv_size +__glTexEnvfv_size +__glTexEnviv_size +__glTexGendv_size +__glTexGenfv_size +__glTexGeniv_size +__glTexImage1D_size +__glTexImage2D_size +__glTexParameterfv_size +__glTexParameteriv_size +__MESA_beginDispatchOverride +__MESA_copyContext +__MESA_createBuffer +__MESA_createContext +__MESA_destroyBuffer +__MESA_destroyContext +__MESA_dispatchExec +__MESA_endDispatchOverride +__MESA_forceCurrent +__MESA_initVisuals +__MESA_loseCurrent +__MESA_makeCurrent +__MESA_notifyDestroy +__MESA_notifyResize +__MESA_notifySwapBuffers +__MESA_resetExtension +__MESA_resizeBuffers +__MESA_screenProbe +__MESA_setVisualConfigs +__MESA_shareContext +__MESA_swapBuffers +__glEvalComputeK +__glFloorLog2 +XMesaCreateImage +XMesaDestroyImage +XMesaGetPixel +XMesaPutImageHelper +XMesaCopySubBuffer +XMesaCreateContext +XMesaCreatePixmapBuffer +XMesaCreateVisual +XMesaCreateWindowBuffer +XMesaCreateWindowBuffer2 +XMesaDestroyBuffer +XMesaDestroyContext +XMesaDestroyVisual +XMesaDitherColor +XMesaFindBuffer +XMesaFlush +XMesaForceCurrent +XMesaGarbageCollect +XMesaGetBackBuffer +XMesaGetCurrentBuffer +XMesaGetCurrentContext +XMesaGetCurrentReadBuffer +XMesaGetDepthBuffer +XMesaGetString +XMesaLoseCurrent +XMesaMakeCurrent +XMesaMakeCurrent2 +XMesaReset +XMesaSetFXmode +XMesaSetVisualDisplay +XMesaSwapBuffers +XMesaUnbindContext +xmesa_alloc_back_buffer +xmesa_color_to_pixel +xmesa_update_state +xmesa_get_line_func +xmesa_get_points_func +xmesa_get_triangle_func + +/* $XFree86: xc/programs/Xserver/GL/mesa/GLcore/GLcore-def.cpp,v 1.1 2002/02/25 00:45:41 dawes Exp $ */ Index: xc/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c diff -u /dev/null xc/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c:1.1 --- /dev/null Thu Feb 27 12:28:23 2003 +++ xc/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c Sun Feb 24 19:45:41 2002 @@ -0,0 +1,60 @@ +/* $XFree86: xc/programs/Xserver/GL/mesa/GLcore/GLcoremodule.c,v 1.1 2002/02/25 00:45:41 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. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <kevin@precisioninsight.com> + * + */ + +#include "xf86Module.h" + +static MODULESETUPPROTO(GLcoreSetup); + +static XF86ModuleVersionInfo VersRec = +{ + "GLcore", + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XF86_VERSION_CURRENT, + 1, 0, 0, + ABI_CLASS_EXTENSION, + ABI_EXTENSION_VERSION, + MOD_CLASS_NONE, + {0,0,0,0} +}; + +XF86ModuleData GLcoreModuleData = { &VersRec, GLcoreSetup, NULL }; + +static pointer +GLcoreSetup(pointer module, pointer opts, int *errmaj, int *errmin) +{ + /* Need a non-NULL return value to indicate success */ + return (pointer)1; +} Index: xc/programs/Xserver/GL/mesa/GLcore/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/GLcore/Imakefile:1.4 --- /dev/null Thu Feb 27 12:28:23 2003 +++ xc/programs/Xserver/GL/mesa/GLcore/Imakefile Sat Jun 1 21:21:13 2002 @@ -0,0 +1,69 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/GLcore/Imakefile,v 1.4 2002/06/02 01:21:13 dawes Exp $ + +#if DoLoadableServer +#if !BuildModuleInSubdir +#define IHaveModules +#elif !defined(IHaveModules) +#define IHaveSubdirs +SUBDIRS = module +#endif +#endif + +#include <Server.tmpl> + +#define NeedAllMesaSrc +#define MesaInXServer +#define MesaBuildDir ../src/ +#define MesaACBuildDir ../src/array_cache/ +#define MesaMathBuildDir ../src/math/ +#define MesaSwrastBuildDir ../src/swrast/ +#define MesaSwrastSetupBuildDir ../src/swrast_setup/ +#define MesaTnlBuildDir ../src/tnl/ +#define MesaXBuildDir ../src/X/ + +#include "../../../../../lib/GL/mesa/src/array_cache/Imakefile.inc" +#include "../../../../../lib/GL/mesa/src/swrast/Imakefile.inc" +#include "../../../../../lib/GL/mesa/src/swrast_setup/Imakefile.inc" +#include "../../../../../lib/GL/mesa/src/tnl/Imakefile.inc" +#include "../../../../../lib/GL/mesa/src/math/Imakefile.inc" +#include "../../../../../lib/GL/mesa/src/X/Imakefile.inc" +#include "../../../../../lib/GL/mesa/src/Imakefile.inc" + +#ifdef IHaveModules + MSRCS = GLcoremodule.c + MOBJS = GLcoremodule.o +#endif + + XOBJS = ../src/X/?*.o + + OBJS = $(COREMESAOBJS) $(MOBJS) + + DONES = ../src/DONE ../src/X/DONE ../src/array_cache/DONE \ + ../src/math/DONE ../src/swrast/DONE ../src/swrast_setup/DONE \ + ../src/tnl/DONE + + INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ + -I$(MESASRCDIR)/include -I$(GLXLIBSRC)/include \ + -I$(MESASRCDIR)/src \ + -I$(SERVERSRC)/include + + DEFINES = $(GLX_DEFINES) + +#ifdef IHaveModules +ModuleObjectRule() + +DepLibraryModuleTarget(GLcore, $(DONES) $(OBJS),$(OBJS) $(XOBJS)) +InstallLibraryModule(GLcore,$(MODULEDIR),extensions) + +#else +NormalDepLibraryTarget(GLcore, $(DONES) $(OBJS), $(OBJS) $(XOBJS)) +NormalLibraryObjectRule() +#endif + +InstallDriverSDKLibraryModule(GLcore,$(DRIVERSDKMODULEDIR),extensions) + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + Index: xc/programs/Xserver/GL/mesa/GLcore/module/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/GLcore/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:28:23 2003 +++ xc/programs/Xserver/GL/mesa/GLcore/module/Imakefile Fri May 31 14:12:37 2002 @@ -0,0 +1,53 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/GLcore/module/Imakefile,v 1.1 2002/05/31 18:12:37 dawes Exp $ + +#define IHaveModules +#include <Server.tmpl> + +#define NeedAllMesaSrc +#define MesaInXServer +#define MesaBuildDir ../../src/module/ +#define MesaACBuildDir ../../src/array_cache/module/ +#define MesaMathBuildDir ../../src/math/module/ +#define MesaSwrastBuildDir ../../src/swrast/module/ +#define MesaSwrastSetupBuildDir ../../src/swrast_setup/module/ +#define MesaTnlBuildDir ../../src/tnl/module/ +#define MesaXBuildDir ../../src/X/module/ + +#include "../../../../../../lib/GL/mesa/src/array_cache/Imakefile.inc" +#include "../../../../../../lib/GL/mesa/src/swrast/Imakefile.inc" +#include "../../../../../../lib/GL/mesa/src/swrast_setup/Imakefile.inc" +#include "../../../../../../lib/GL/mesa/src/tnl/Imakefile.inc" +#include "../../../../../../lib/GL/mesa/src/math/Imakefile.inc" +#include "../../../../../../lib/GL/mesa/src/X/Imakefile.inc" +#include "../../../../../../lib/GL/mesa/src/Imakefile.inc" + +#if DoLoadableServer + MSRCS = GLcoremodule.c + MOBJS = GLcoremodule.o +#endif + + XOBJS = ../../src/X/module/?*.o + + OBJS = $(COREMESAOBJS) $(MOBJS) + + DONES = ../../src/module/DONE ../../src/X/module/DONE \ + ../../src/array_cache/module/DONE ../../src/math/module/DONE \ + ../../src/swrast/module/DONE \ + ../../src/swrast_setup/module/DONE ../../src/tnl/module/DONE + + INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ + -I$(MESASRCDIR)/include -I$(GLXLIBSRC)/include \ + -I$(MESASRCDIR)/src \ + -I$(SERVERSRC)/include + + DEFINES = $(GLX_DEFINES) + +ModuleObjectRule() + +DepLibraryModuleTarget(GLcore, $(DONES) $(OBJS),$(OBJS) $(XOBJS)) +InstallLibraryModule(GLcore,$(MODULEDIR),extensions) + +InstallDriverSDKLibraryModule(GLcore,$(DRIVERSDKMODULEDIR),extensions) + +LinkSourceFile(GLcoremodule.c,..) + Index: xc/programs/Xserver/GL/mesa/src/GLcore-def.cpp diff -u xc/programs/Xserver/GL/mesa/src/GLcore-def.cpp:1.1 xc/programs/Xserver/GL/mesa/src/GLcore-def.cpp:removed --- xc/programs/Xserver/GL/mesa/src/GLcore-def.cpp:1.1 Thu Aug 10 13:40:29 2000 +++ xc/programs/Xserver/GL/mesa/src/GLcore-def.cpp Thu Feb 27 12:28:23 2003 @@ -1,1483 +0,0 @@ -LIBRARY GLcore -VERSION LIBRARY_VERSION -EXPORTS - -_mesa_set_aa_triangle_function -_mesa_Accum -_mesa_ClearAccum -_mesa_alloc_accum_buffer -_mesa_clear_accum_buffer -_mesa_AlphaFunc -_mesa_alpha_test -_mesa_alloc_alpha_buffers -_mesa_clear_alpha_buffers -_mesa_read_alpha_pixels -_mesa_read_alpha_span -_mesa_write_alpha_pixels -_mesa_write_alpha_span -_mesa_write_mono_alpha_pixels -_mesa_write_mono_alpha_span -_mesa_PopAttrib -_mesa_PopClientAttrib -_mesa_PushAttrib -_mesa_PushClientAttrib -_mesa_Bitmap -_mesa_BlendColor -_mesa_BlendEquation -_mesa_BlendFunc -_mesa_BlendFuncSeparateEXT -_mesa_blend_pixels -_mesa_blend_span -_mesa_Clear -_mesa_ClearColor -_mesa_ClearIndex -_mesa_DrawBuffer -_mesa_ReadBuffer -_mesa_ResizeBuffersMESA -_mesa_ClipPlane -_mesa_GetClipPlane -gl_init_clip -gl_update_clipmask -gl_update_userclip -gl_user_cliptest -gl_userclip_point -gl_viewclip_point -_mesa_ColorSubTable -_mesa_ColorTable -_mesa_ColorTableParameterfv -_mesa_ColorTableParameteriv -_mesa_CopyColorSubTable -_mesa_CopyColorTable -_mesa_GetColorTable -_mesa_GetColorTableParameterfv -_mesa_GetColorTableParameteriv -_mesa_free_colortable_data -_mesa_init_colortable -gl_read_config_file -gl_register_config_var -_mesa_Finish -_mesa_Flush -_mesa_create_visual -_mesa_destroy_visual -_mesa_get_dispatch -_mesa_initialize_context -_mesa_initialize_framebuffer -_mesa_initialize_visual -_mesa_swapbuffers -gl_compile_error -gl_context_initialize -gl_copy_context -gl_create_context -gl_create_framebuffer -gl_create_visual -gl_destroy_context -gl_destroy_framebuffer -gl_destroy_visual -gl_error -gl_free_context_data -gl_get_current_context -gl_make_current -gl_make_current2 -gl_problem -gl_warning -_mesa_CopyPixels -_mesa_LockArraysEXT -_mesa_UnlockArraysEXT -gl_alloc_cva_store -gl_cva_compile_cassette -gl_cva_force_precalc -gl_cva_init -gl_free_cva_store -gl_merge_cva -gl_prepare_arrays_cva -gl_rescue_cva -_mesa_ClearDepth -_mesa_DepthFunc -_mesa_DepthMask -_mesa_alloc_depth_buffer -_mesa_clear_depth_buffer -_mesa_depth_test_pixels -_mesa_depth_test_span -_mesa_read_depth_span -_mesa_read_depth_span_float -_mesa_zbuffer_address -glAccum -glActiveTextureARB -glAlphaFunc -glAreTexturesResident -glAreTexturesResidentEXT -glArrayElement -glArrayElementEXT -glBegin -glBindTexture -glBindTextureEXT -glBitmap -glBlendColor -glBlendColorEXT -glBlendEquation -glBlendEquationEXT -glBlendFunc -glBlendFuncSeparateEXT -glBlendFuncSeparateINGR -glCallList -glCallLists -glClear -glClearAccum -glClearColor -glClearDepth -glClearIndex -glClearStencil -glClientActiveTextureARB -glClipPlane -glColor3b -glColor3bv -glColor3d -glColor3dv -glColor3f -glColor3fv -glColor3i -glColor3iv -glColor3s -glColor3sv -glColor3ub -glColor3ubv -glColor3ui -glColor3uiv -glColor3us -glColor3usv -glColor4b -glColor4bv -glColor4d -glColor4dv -glColor4f -glColor4fv -glColor4i -glColor4iv -glColor4s -glColor4sv -glColor4ub -glColor4ubv -glColor4ui -glColor4uiv -glColor4us -glColor4usv -glColorMask -glColorMaterial -glColorPointer -glColorPointerEXT -glColorSubTable -glColorSubTableEXT -glColorTable -glColorTableEXT -glColorTableParameterfv -glColorTableParameterfvSGI -glColorTableParameteriv -glColorTableParameterivSGI -glColorTableSGI -glCombinerInputNV -glCombinerOutputNV -glCombinerParameterfNV -glCombinerParameterfvNV -glCombinerParameteriNV -glCombinerParameterivNV -glCompressedTexImage1DARB -glCompressedTexImage2DARB -glCompressedTexImage3DARB -glCompressedTexSubImage1DARB -glCompressedTexSubImage2DARB -glCompressedTexSubImage3DARB -glConvolutionFilter1D -glConvolutionFilter1DEXT -glConvolutionFilter2D -glConvolutionFilter2DEXT -glConvolutionParameterf -glConvolutionParameterfEXT -glConvolutionParameterfv -glConvolutionParameterfvEXT -glConvolutionParameteri -glConvolutionParameteriEXT -glConvolutionParameteriv -glConvolutionParameterivEXT -glCopyColorSubTable -glCopyColorSubTableEXT -glCopyColorTable -glCopyColorTableSGI -glCopyConvolutionFilter1D -glCopyConvolutionFilter1DEXT -glCopyConvolutionFilter2D -glCopyConvolutionFilter2DEXT -glCopyPixels -glCopyTexImage1D -glCopyTexImage1DEXT -glCopyTexImage2D -glCopyTexImage2DEXT -glCopyTexSubImage1D -glCopyTexSubImage1DEXT -glCopyTexSubImage2D -glCopyTexSubImage2DEXT -glCopyTexSubImage3D -glCopyTexSubImage3DEXT -glCullFace -glCullParameterdvEXT -glCullParameterfvEXT -glDeleteLists -glDeleteTextures -glDeleteTexturesEXT -glDepthFunc -glDepthMask -glDepthRange -glDetailTexFuncSGIS -glDisable -glDisableClientState -glDrawArrays -glDrawArraysEXT -glDrawBuffer -glDrawElements -glDrawPixels -glDrawRangeElements -glDrawRangeElementsEXT -glEdgeFlag -glEdgeFlagPointer -glEdgeFlagPointerEXT -glEdgeFlagv -glEnable -glEnableClientState -glEnd -glEndList -glEvalCoord1d -glEvalCoord1dv -glEvalCoord1f -glEvalCoord1fv -glEvalCoord2d -glEvalCoord2dv -glEvalCoord2f -glEvalCoord2fv -glEvalMesh1 -glEvalMesh2 -glEvalPoint1 -glEvalPoint2 -glFeedbackBuffer -glFinalCombinerInputNV -glFinish -glFlush -glFlushRasterSGIX -glFlushVertexArrayRangeNV -glFogCoordPointerEXT -glFogCoorddEXT -glFogCoorddvEXT -glFogCoordfEXT -glFogCoordfvEXT -glFogf -glFogfv -glFogi -glFogiv -glFragmentColorMaterialSGIX -glFragmentLightModelfSGIX -glFragmentLightModelfvSGIX -glFragmentLightModeliSGIX -glFragmentLightModelivSGIX -glFragmentLightfSGIX -glFragmentLightfvSGIX -glFragmentLightiSGIX -glFragmentLightivSGIX -glFragmentMaterialfSGIX -glFragmentMaterialfvSGIX -glFragmentMaterialiSGIX -glFragmentMaterialivSGIX -glFrameZoomSGIX -glFrontFace -glFrustum -glGenLists -glGenTextures -glGenTexturesEXT -glGetBooleanv -glGetClipPlane -glGetColorTable -glGetColorTableEXT -glGetColorTableParameterfv -glGetColorTableParameterfvEXT -glGetColorTableParameterfvSGI -glGetColorTableParameteriv -glGetColorTableParameterivEXT -glGetColorTableParameterivSGI -glGetColorTableSGI -glGetCombinerInputParameterfvNV -glGetCombinerInputParameterivNV -glGetCombinerOutputParameterfvNV -glGetCombinerOutputParameterivNV -glGetCompressedTexImageARB -glGetConvolutionFilter -glGetConvolutionFilterEXT -glGetConvolutionParameterfv -glGetConvolutionParameterfvEXT -glGetConvolutionParameteriv -glGetConvolutionParameterivEXT -glGetDetailTexFuncSGIS -glGetDoublev -glGetError -glGetFinalCombinerInputParameterfvNV -glGetFinalCombinerInputParameterivNV -glGetFloatv -glGetFragmentLightfvSGIX -glGetFragmentLightivSGIX -glGetFragmentMaterialfvSGIX -glGetFragmentMaterialivSGIX -glGetHistogram -glGetHistogramEXT -glGetHistogramParameterfv -glGetHistogramParameterfvEXT -glGetHistogramParameteriv -glGetHistogramParameterivEXT -glGetInstrumentsSGIX -glGetIntegerv -glGetLightfv -glGetLightiv -glGetListParameterfvSGIX -glGetListParameterivSGIX -glGetMapdv -glGetMapfv -glGetMapiv -glGetMaterialfv -glGetMaterialiv -glGetMinmax -glGetMinmaxEXT -glGetMinmaxParameterfv -glGetMinmaxParameterfvEXT -glGetMinmaxParameteriv -glGetMinmaxParameterivEXT -glGetPixelMapfv -glGetPixelMapuiv -glGetPixelMapusv -glGetPixelTexGenParameterfvSGIS -glGetPixelTexGenParameterivSGIS -glGetPointerv -glGetPointervEXT -glGetPolygonStipple -glGetSeparableFilter -glGetSeparableFilterEXT -glGetSharpenTexFuncSGIS -glGetString -glGetTexEnvfv -glGetTexEnviv -glGetTexFilterFuncSGIS -glGetTexGendv -glGetTexGenfv -glGetTexGeniv -glGetTexImage -glGetTexLevelParameterfv -glGetTexLevelParameteriv -glGetTexParameterfv -glGetTexParameteriv -glHint -glHintPGI -glHistogram -glHistogramEXT -glIndexFuncEXT -glIndexMask -glIndexMaterialEXT -glIndexPointer -glIndexPointerEXT -glIndexd -glIndexdv -glIndexf -glIndexfv -glIndexi -glIndexiv -glIndexs -glIndexsv -glIndexub -glIndexubv -glInitNames -glInstrumentsBufferSGIX -glInterleavedArrays -glIsEnabled -glIsList -glIsTexture -glIsTextureEXT -glLightEnviSGIX -glLightModelf -glLightModelfv -glLightModeli -glLightModeliv -glLightf -glLightfv -glLighti -glLightiv -glLineStipple -glLineWidth -glListBase -glListParameterfSGIX -glListParameterfvSGIX -glListParameteriSGIX -glListParameterivSGIX -glLoadIdentity -glLoadMatrixd -glLoadMatrixf -glLoadName -glLoadTransposeMatrixdARB -glLoadTransposeMatrixfARB -glLockArraysEXT -glLogicOp -glMap1d -glMap1f -glMap2d -glMap2f -glMapGrid1d -glMapGrid1f -glMapGrid2d -glMapGrid2f -glMaterialf -glMaterialfv -glMateriali -glMaterialiv -glMatrixMode -glMinmax -glMinmaxEXT -glMultMatrixd -glMultMatrixf -glMultTransposeMatrixdARB -glMultTransposeMatrixfARB -glMultiTexCoord1dARB -glMultiTexCoord1dvARB -glMultiTexCoord1fARB -glMultiTexCoord1fvARB -glMultiTexCoord1iARB -glMultiTexCoord1ivARB -glMultiTexCoord1sARB -glMultiTexCoord1svARB -glMultiTexCoord2dARB -glMultiTexCoord2dvARB -glMultiTexCoord2fARB -glMultiTexCoord2fvARB -glMultiTexCoord2iARB -glMultiTexCoord2ivARB -glMultiTexCoord2sARB -glMultiTexCoord2svARB -glMultiTexCoord3dARB -glMultiTexCoord3dvARB -glMultiTexCoord3fARB -glMultiTexCoord3fvARB -glMultiTexCoord3iARB -glMultiTexCoord3ivARB -glMultiTexCoord3sARB -glMultiTexCoord3svARB -glMultiTexCoord4dARB -glMultiTexCoord4dvARB -glMultiTexCoord4fARB -glMultiTexCoord4fvARB -glMultiTexCoord4iARB -glMultiTexCoord4ivARB -glMultiTexCoord4sARB -glMultiTexCoord4svARB -glNewList -glNormal3b -glNormal3bv -glNormal3d -glNormal3dv -glNormal3f -glNormal3fv -glNormal3i -glNormal3iv -glNormal3s -glNormal3sv -glNormalPointer -glNormalPointerEXT -glOrtho -glPassThrough -glPixelMapfv -glPixelMapuiv -glPixelMapusv -glPixelStoref -glPixelStorei -glPixelTexGenParameterfSGIS -glPixelTexGenParameterfvSGIS -glPixelTexGenParameteriSGIS -glPixelTexGenParameterivSGIS -glPixelTexGenSGIX -glPixelTransferf -glPixelTransferi -glPixelZoom -glPointParameterfEXT -glPointParameterfSGIS -glPointParameterfvEXT -glPointParameterfvSGIS -glPointSize -glPollInstrumentsSGIX -glPolygonMode -glPolygonOffset -glPolygonOffsetEXT -glPolygonStipple -glPopAttrib -glPopClientAttrib -glPopMatrix -glPopName -glPrioritizeTextures -glPrioritizeTexturesEXT -glPushAttrib -glPushClientAttrib -glPushMatrix -glPushName -glRasterPos2d -glRasterPos2dv -glRasterPos2f -glRasterPos2fv -glRasterPos2i -glRasterPos2iv -glRasterPos2s -glRasterPos2sv -glRasterPos3d -glRasterPos3dv -glRasterPos3f -glRasterPos3fv -glRasterPos3i -glRasterPos3iv -glRasterPos3s -glRasterPos3sv -glRasterPos4d -glRasterPos4dv -glRasterPos4f -glRasterPos4fv -glRasterPos4i -glRasterPos4iv -glRasterPos4s -glRasterPos4sv -glReadBuffer -glReadInstrumentsSGIX -glReadPixels -glRectd -glRectdv -glRectf -glRectfv -glRecti -glRectiv -glRects -glRectsv -glReferencePlaneSGIX -glRenderMode -glResetHistogram -glResetHistogramEXT -glResetMinmax -glResetMinmaxEXT -glResizeBuffersMESA -glRotated -glRotatef -glSampleCoverageARB -glSampleMaskEXT -glSampleMaskSGIS -glSamplePassARB -glSamplePatternEXT -glSamplePatternSGIS -glScaled -glScalef -glScissor -glSelectBuffer -glSeparableFilter2D -glSeparableFilter2DEXT -glShadeModel -glSharpenTexFuncSGIS -glSpriteParameterfSGIX -glSpriteParameterfvSGIX -glSpriteParameteriSGIX -glSpriteParameterivSGIX -glStartInstrumentsSGIX -glStencilFunc -glStencilMask -glStencilOp -glStopInstrumentsSGIX -glTagSampleBufferSGIX -glTbufferMask3DFX -glTexCoord1d -glTexCoord1dv -glTexCoord1f -glTexCoord1fv -glTexCoord1i -glTexCoord1iv -glTexCoord1s -glTexCoord1sv -glTexCoord2d -glTexCoord2dv -glTexCoord2f -glTexCoord2fv -glTexCoord2i -glTexCoord2iv -glTexCoord2s -glTexCoord2sv -glTexCoord3d -glTexCoord3dv -glTexCoord3f -glTexCoord3fv -glTexCoord3i -glTexCoord3iv -glTexCoord3s -glTexCoord3sv -glTexCoord4d -glTexCoord4dv -glTexCoord4f -glTexCoord4fv -glTexCoord4i -glTexCoord4iv -glTexCoord4s -glTexCoord4sv -glTexCoordPointer -glTexCoordPointerEXT -glTexEnvf -glTexEnvfv -glTexEnvi -glTexEnviv -glTexFilterFuncSGIS -glTexGend -glTexGendv -glTexGenf -glTexGenfv -glTexGeni -glTexGeniv -glTexImage1D -glTexImage2D -glTexImage3D -glTexImage3DEXT -glTexImage4DSGIS -glTexParameterf -glTexParameterfv -glTexParameteri -glTexParameteriv -glTexSubImage1D -glTexSubImage1DEXT -glTexSubImage2D -glTexSubImage2DEXT -glTexSubImage3D -glTexSubImage3DEXT -glTexSubImage4DSGIS -glTranslated -glTranslatef -glUnlockArraysEXT -glVertex2d -glVertex2dv -glVertex2f -glVertex2fv -glVertex2i -glVertex2iv -glVertex2s -glVertex2sv -glVertex3d -glVertex3dv -glVertex3f -glVertex3fv -glVertex3i -glVertex3iv -glVertex3s -glVertex3sv -glVertex4d -glVertex4dv -glVertex4f -glVertex4fv -glVertex4i -glVertex4iv -glVertex4s -glVertex4sv -glVertexArrayRangeNV -glVertexPointer -glVertexPointerEXT -glVertexWeightPointerEXT -glVertexWeightfEXT -glVertexWeightfvEXT -glViewport -glWindowPos2dMESA -glWindowPos2dvMESA -glWindowPos2fMESA -glWindowPos2fvMESA -glWindowPos2iMESA -glWindowPos2ivMESA -glWindowPos2sMESA -glWindowPos2svMESA -glWindowPos3dMESA -glWindowPos3dvMESA -glWindowPos3fMESA -glWindowPos3fvMESA -glWindowPos3iMESA -glWindowPos3ivMESA -glWindowPos3sMESA -glWindowPos3svMESA -glWindowPos4dMESA -glWindowPos4dvMESA -glWindowPos4fMESA -glWindowPos4fvMESA -glWindowPos4iMESA -glWindowPos4ivMESA -glWindowPos4sMESA -glWindowPos4svMESA -_mesa_CallList -_mesa_CallLists -_mesa_DeleteLists -_mesa_EndList -_mesa_GenLists -_mesa_IsList -_mesa_ListBase -_mesa_NewList -_mesa_init_dlist_table -gl_compile_cassette -gl_destroy_list -gl_init_lists -gl_save_error -mesa_print_display_list -_mesa_DrawPixels -_mesa_clip_pixelrect -_mesa_Disable -_mesa_DisableClientState -_mesa_Enable -_mesa_EnableClientState -_mesa_IsEnabled -_mesa_set_enable -gl_lookup_enum_by_name -gl_lookup_enum_by_nr -_mesa_EvalCoord1d -_mesa_EvalCoord1dv -_mesa_EvalCoord1f -_mesa_EvalCoord1fv -_mesa_EvalCoord2d -_mesa_EvalCoord2dv -_mesa_EvalCoord2f -_mesa_EvalCoord2fv -_mesa_EvalMesh1 -_mesa_EvalMesh2 -_mesa_EvalPoint1 -_mesa_EvalPoint2 -_mesa_GetMapdv -_mesa_GetMapfv -_mesa_GetMapiv -_mesa_Map1d -_mesa_Map1f -_mesa_Map2d -_mesa_Map2f -_mesa_MapGrid1d -_mesa_MapGrid1f -_mesa_MapGrid2d -_mesa_MapGrid2f -_mesa_evaluator_components -gl_copy_map_points1d -gl_copy_map_points1f -gl_copy_map_points2d -gl_copy_map_points2f -gl_eval_vb -gl_init_eval -gl_extension_is_enabled -gl_extensions_add -gl_extensions_ctr -gl_extensions_disable -gl_extensions_dtr -gl_extensions_enable -gl_extensions_get_string -_mesa_FeedbackBuffer -_mesa_InitNames -_mesa_LoadName -_mesa_PassThrough -_mesa_PopName -_mesa_PushName -_mesa_RenderMode -_mesa_SelectBuffer -gl_feedback_line -gl_feedback_points -gl_feedback_triangle -gl_feedback_vertex -gl_select_line -gl_select_points -gl_select_triangle -gl_update_hitflag -_mesa_Fogf -_mesa_Fogfv -_mesa_Fogi -_mesa_Fogiv -_mesa_fog_ci_pixels -_mesa_fog_rgba_pixels -_mesa_fog_vertices -_mesa_init_fog -_mesa_GetBooleanv -_mesa_GetDoublev -_mesa_GetError -_mesa_GetFloatv -_mesa_GetIntegerv -_mesa_GetPointerv -_mesa_GetString -_glapi_add_entrypoint -_glapi_check_multithread -_glapi_check_table -_glapi_get_context -_glapi_get_dispatch -_glapi_get_dispatch_table_size -_glapi_get_proc_address -_glapi_get_proc_name -_glapi_get_proc_offset -_glapi_get_version -_glapi_set_context -_glapi_set_dispatch -_glapi_noop_enable_warnings -_glthread_GetID -_glthread_GetTSD -_glthread_InitTSD -_glthread_SetTSD -_mesa_DeleteHashTable -_mesa_HashFindFreeKeyBlock -_mesa_HashFirstEntry -_mesa_HashInsert -_mesa_HashLookup -_mesa_HashPrint -_mesa_HashRemove -_mesa_NewHashTable -_mesa_Hint -_mesa_HintPGI -_mesa_try_Hint -_mesa_bytes_per_pixel -_mesa_components_in_format -_mesa_image_address -_mesa_image_row_stride -_mesa_is_legal_format_and_type -_mesa_native_packing -_mesa_pack_bitmap -_mesa_pack_polygon_stipple -_mesa_pack_rgba_span -_mesa_sizeof_packed_type -_mesa_sizeof_type -_mesa_swap2 -_mesa_swap4 -_mesa_unpack_bitmap -_mesa_unpack_depth_span -_mesa_unpack_float_color_span -_mesa_unpack_image -_mesa_unpack_index_span -_mesa_unpack_polygon_stipple -_mesa_unpack_stencil_span -_mesa_unpack_ubyte_color_span -_mesa_ConvolutionFilter1D -_mesa_ConvolutionFilter2D -_mesa_ConvolutionParameterf -_mesa_ConvolutionParameterfv -_mesa_ConvolutionParameteri -_mesa_ConvolutionParameteriv -_mesa_CopyConvolutionFilter1D -_mesa_CopyConvolutionFilter2D -_mesa_GetConvolutionFilter -_mesa_GetConvolutionParameterfv -_mesa_GetConvolutionParameteriv -_mesa_GetHistogram -_mesa_GetHistogramParameterfv -_mesa_GetHistogramParameteriv -_mesa_GetMinmax -_mesa_GetMinmaxParameterfv -_mesa_GetMinmaxParameteriv -_mesa_GetSeparableFilter -_mesa_Histogram -_mesa_Minmax -_mesa_ResetHistogram -_mesa_ResetMinmax -_mesa_SeparableFilter2D -_mesa_update_histogram -_mesa_update_minmax -_mesa_ColorMaterial -_mesa_GetLightfv -_mesa_GetLightiv -_mesa_GetMaterialfv -_mesa_GetMaterialiv -_mesa_LightModelf -_mesa_LightModelfv -_mesa_LightModeli -_mesa_LightModeliv -_mesa_Lightf -_mesa_Lightfv -_mesa_Lighti -_mesa_Lightiv -_mesa_Materialf -_mesa_Materialfv -_mesa_Materiali -_mesa_Materialiv -_mesa_ShadeModel -gl_compute_light_positions -gl_compute_shine_table -gl_compute_spot_exp_table -gl_material_bitmask -gl_update_color_material -gl_update_lighting -gl_update_material -gl_update_normal_transform -_mesa_LineStipple -_mesa_LineWidth -gl_set_line_function -_mesa_LogicOp -_mesa_logicop_ci_pixels -_mesa_logicop_ci_span -_mesa_logicop_rgba_pixels -_mesa_logicop_rgba_span -_mesa_ColorMask -_mesa_IndexMask -_mesa_mask_index_pixels -_mesa_mask_index_span -_mesa_mask_rgba_pixels -_mesa_mask_rgba_span -_mesa_DepthRange -_mesa_Frustum -_mesa_LoadIdentity -_mesa_LoadMatrixd -_mesa_LoadMatrixf -_mesa_LoadTransposeMatrixdARB -_mesa_LoadTransposeMatrixfARB -_mesa_MatrixMode -_mesa_MultMatrixd -_mesa_MultMatrixf -_mesa_MultTransposeMatrixdARB -_mesa_MultTransposeMatrixfARB -_mesa_Ortho -_mesa_PopMatrix -_mesa_PushMatrix -_mesa_Rotated -_mesa_Rotatef -_mesa_Scaled -_mesa_Scalef -_mesa_Translated -_mesa_Translatef -_mesa_Viewport -gl_Viewport -gl_calculate_model_project_matrix -gl_mat_mul_floats -gl_mat_mul_mat -gl_matrix_alloc_inv -gl_matrix_analyze -gl_matrix_copy -gl_matrix_ctr -gl_matrix_dtr -gl_matrix_invert -gl_matrix_mul -gl_matrix_transposed -gl_matrix_transposef -gl_print_matrix -gl_rotation_matrix -_mesa_calloc -_mesa_free -_mesa_malloc -_mesa_bitcount -_mesa_init_math -gl_sqrt -gl_alloc_pb -gl_flush_pb -gl_build_immediate_pipeline -gl_build_precalc_pipeline -gl_pipeline_init -gl_print_active_pipeline -gl_print_pipe_ops -gl_print_pipeline -gl_print_tri_caps -gl_print_vert_flags -gl_reset_cva_vb -gl_run_pipeline -gl_update_pipelines -_mesa_GetPixelMapfv -_mesa_GetPixelMapuiv -_mesa_GetPixelMapusv -_mesa_PixelMapfv -_mesa_PixelMapuiv -_mesa_PixelMapusv -_mesa_PixelStoref -_mesa_PixelStorei -_mesa_PixelTransferf -_mesa_PixelTransferi -_mesa_PixelZoom -_mesa_lookup_rgba -_mesa_map_ci -_mesa_map_ci8_to_rgba -_mesa_map_ci_to_rgba -_mesa_map_ci_to_rgba_ubyte -_mesa_map_rgba -_mesa_map_stencil -_mesa_scale_and_bias_rgba -_mesa_shift_and_offset_ci -_mesa_shift_and_offset_stencil -_mesa_transform_rgba -_mesa_GetPixelTexGenParameterfvSGIS -_mesa_GetPixelTexGenParameterivSGIS -_mesa_PixelTexGenParameterfSGIS -_mesa_PixelTexGenParameterfvSGIS -_mesa_PixelTexGenParameteriSGIS -_mesa_PixelTexGenParameterivSGIS -_mesa_PixelTexGenSGIX -_mesa_pixeltexgen -_mesa_PointParameterfEXT -_mesa_PointParameterfvEXT -_mesa_PointSize -gl_set_point_function -_mesa_CullFace -_mesa_FrontFace -_mesa_GetPolygonStipple -_mesa_PolygonMode -_mesa_PolygonOffset -_mesa_PolygonOffsetEXT -_mesa_PolygonStipple -gl_set_quad_function -_mesa_RasterPos2d -_mesa_RasterPos2dv -_mesa_RasterPos2f -_mesa_RasterPos2fv -_mesa_RasterPos2i -_mesa_RasterPos2iv -_mesa_RasterPos2s -_mesa_RasterPos2sv -_mesa_RasterPos3d -_mesa_RasterPos3dv -_mesa_RasterPos3f -_mesa_RasterPos3fv -_mesa_RasterPos3i -_mesa_RasterPos3iv -_mesa_RasterPos3s -_mesa_RasterPos3sv -_mesa_RasterPos4d -_mesa_RasterPos4dv -_mesa_RasterPos4f -_mesa_RasterPos4fv -_mesa_RasterPos4i -_mesa_RasterPos4iv -_mesa_RasterPos4s -_mesa_RasterPos4sv -_mesa_ReadPixels -_mesa_Rectd -_mesa_Rectdv -_mesa_Rectf -_mesa_Rectfv -_mesa_Recti -_mesa_Rectiv -_mesa_Rects -_mesa_Rectsv -_mesa_Scissor -gl_scissor_pixels -gl_scissor_span -gl_init_shade -gl_shade_rastpos -gl_update_lighting_function -gl_read_index_span -gl_read_rgba_span -gl_write_index_span -gl_write_monocolor_span -gl_write_monoindex_span -gl_write_multitexture_span -gl_write_rgba_span -gl_write_texture_span -gl_clean_color -gl_default_nr_stages -gl_default_pipeline -gl_import_client_data -gl_init_vbxform -gl_update_materials -_mesa_init_exec_table -_mesa_init_no_op_table -gl_print_enable_flags -gl_print_state -gl_update_state -_mesa_ClearStencil -_mesa_StencilFunc -_mesa_StencilMask -_mesa_StencilOp -_mesa_alloc_stencil_buffer -_mesa_clear_stencil_buffer -_mesa_read_stencil_span -_mesa_stencil_and_ztest_pixels -_mesa_stencil_and_ztest_span -_mesa_write_stencil_span -_mesa_CompressedTexImage1DARB -_mesa_CompressedTexImage2DARB -_mesa_CompressedTexImage3DARB -_mesa_CompressedTexSubImage1DARB -_mesa_CompressedTexSubImage2DARB -_mesa_CompressedTexSubImage3DARB -_mesa_CopyTexImage1D -_mesa_CopyTexImage2D -_mesa_CopyTexSubImage1D -_mesa_CopyTexSubImage2D -_mesa_CopyTexSubImage3D -_mesa_GetCompressedTexImageARB -_mesa_GetTexImage -_mesa_TexImage1D -_mesa_TexImage2D -_mesa_TexImage3D -_mesa_TexImage3DEXT -_mesa_TexSubImage1D -_mesa_TexSubImage2D -_mesa_TexSubImage3D -_mesa_alloc_texture_image -_mesa_base_tex_format -_mesa_compressed_image_size -_mesa_free_texture_image -_mesa_get_teximage_from_driver -_mesa_select_tex_image -_mesa_select_tex_object -_mesa_AreTexturesResident -_mesa_BindTexture -_mesa_DeleteTextures -_mesa_GenTextures -_mesa_IsTexture -_mesa_PrioritizeTextures -_mesa_test_texobj_completeness -gl_alloc_texture_object -gl_free_texture_object -_mesa_ActiveTextureARB -_mesa_ClientActiveTextureARB -_mesa_GetTexEnvfv -_mesa_GetTexEnviv -_mesa_GetTexGendv -_mesa_GetTexGenfv -_mesa_GetTexGeniv -_mesa_GetTexLevelParameterfv -_mesa_GetTexLevelParameteriv -_mesa_GetTexParameterfv -_mesa_GetTexParameteriv -_mesa_TexEnvf -_mesa_TexEnvfv -_mesa_TexEnvi -_mesa_TexEnviv -_mesa_TexGend -_mesa_TexGendv -_mesa_TexGenf -_mesa_TexGenfv -_mesa_TexGeni -_mesa_TexGeniv -_mesa_TexParameterf -_mesa_TexParameterfv -_mesa_TexParameteri -_mesa_TexParameteriv -gl_put_texobj_on_dirty_list -gl_remove_texobj_from_dirty_list -gl_update_dirty_texobjs -_mesa_set_texture_sampler -gl_init_texture -gl_texture_pixels -gl_update_texture_unit -gl_init_translate -gl_cull_triangle -gl_set_triangle_function -_mesa_ArrayElement -_mesa_ColorPointer -_mesa_ColorPointerEXT -_mesa_DrawArrays -_mesa_DrawElements -_mesa_DrawRangeElements -_mesa_EdgeFlagPointer -_mesa_EdgeFlagPointerEXT -_mesa_IndexPointer -_mesa_IndexPointerEXT -_mesa_InterleavedArrays -_mesa_NormalPointer -_mesa_NormalPointerEXT -_mesa_TexCoordPointer -_mesa_TexCoordPointerEXT -_mesa_VertexPointer -_mesa_VertexPointerEXT -gl_exec_array_elements -gl_update_client_state -gl_immediate_alloc -gl_immediate_free -gl_vb_create_for_cva -gl_vb_create_for_immediate -gl_vb_free -gl_cull_vb -gl_dont_cull_vb -gl_fast_copy_vb -gl_make_normal_cullmask -gl_purge_vertices -_mesa_Begin -_mesa_Color3b -_mesa_Color3bv -_mesa_Color3d -_mesa_Color3dv -_mesa_Color3f -_mesa_Color3fv -_mesa_Color3i -_mesa_Color3iv -_mesa_Color3s -_mesa_Color3sv -_mesa_Color3ub -_mesa_Color3ubv -_mesa_Color3ui -_mesa_Color3uiv -_mesa_Color3us -_mesa_Color3usv -_mesa_Color4b -_mesa_Color4bv -_mesa_Color4d -_mesa_Color4dv -_mesa_Color4f -_mesa_Color4fv -_mesa_Color4i -_mesa_Color4iv -_mesa_Color4s -_mesa_Color4sv -_mesa_Color4ub -_mesa_Color4ubv -_mesa_Color4ui -_mesa_Color4uiv -_mesa_Color4us -_mesa_Color4usv -_mesa_EdgeFlag -_mesa_EdgeFlagv -_mesa_End -_mesa_Indexd -_mesa_Indexdv -_mesa_Indexf -_mesa_Indexfv -_mesa_Indexi -_mesa_Indexiv -_mesa_Indexs -_mesa_Indexsv -_mesa_Indexub -_mesa_Indexubv -_mesa_MultiTexCoord1dARB -_mesa_MultiTexCoord1dvARB -_mesa_MultiTexCoord1fARB -_mesa_MultiTexCoord1fvARB -_mesa_MultiTexCoord1iARB -_mesa_MultiTexCoord1ivARB -_mesa_MultiTexCoord1sARB -_mesa_MultiTexCoord1svARB -_mesa_MultiTexCoord2dARB -_mesa_MultiTexCoord2dvARB -_mesa_MultiTexCoord2fARB -_mesa_MultiTexCoord2fvARB -_mesa_MultiTexCoord2iARB -_mesa_MultiTexCoord2ivARB -_mesa_MultiTexCoord2sARB -_mesa_MultiTexCoord2svARB -_mesa_MultiTexCoord3dARB -_mesa_MultiTexCoord3dvARB -_mesa_MultiTexCoord3fARB -_mesa_MultiTexCoord3fvARB -_mesa_MultiTexCoord3iARB -_mesa_MultiTexCoord3ivARB -_mesa_MultiTexCoord3sARB -_mesa_MultiTexCoord3svARB -_mesa_MultiTexCoord4dARB -_mesa_MultiTexCoord4dvARB -_mesa_MultiTexCoord4fARB -_mesa_MultiTexCoord4fvARB -_mesa_MultiTexCoord4iARB -_mesa_MultiTexCoord4ivARB -_mesa_MultiTexCoord4sARB -_mesa_MultiTexCoord4svARB -_mesa_Normal3b -_mesa_Normal3bv -_mesa_Normal3d -_mesa_Normal3dv -_mesa_Normal3f -_mesa_Normal3fv -_mesa_Normal3i -_mesa_Normal3iv -_mesa_Normal3s -_mesa_Normal3sv -_mesa_TexCoord1d -_mesa_TexCoord1dv -_mesa_TexCoord1f -_mesa_TexCoord1fv -_mesa_TexCoord1i -_mesa_TexCoord1iv -_mesa_TexCoord1s -_mesa_TexCoord1sv -_mesa_TexCoord2d -_mesa_TexCoord2dv -_mesa_TexCoord2f -_mesa_TexCoord2fv -_mesa_TexCoord2i -_mesa_TexCoord2iv -_mesa_TexCoord2s -_mesa_TexCoord2sv -_mesa_TexCoord3d -_mesa_TexCoord3dv -_mesa_TexCoord3f -_mesa_TexCoord3fv -_mesa_TexCoord3i -_mesa_TexCoord3iv -_mesa_TexCoord3s -_mesa_TexCoord3sv -_mesa_TexCoord4d -_mesa_TexCoord4dv -_mesa_TexCoord4f -_mesa_TexCoord4fv -_mesa_TexCoord4i -_mesa_TexCoord4iv -_mesa_TexCoord4s -_mesa_TexCoord4sv -_mesa_Vertex2d -_mesa_Vertex2dv -_mesa_Vertex2f -_mesa_Vertex2fv -_mesa_Vertex2i -_mesa_Vertex2iv -_mesa_Vertex2s -_mesa_Vertex2sv -_mesa_Vertex3d -_mesa_Vertex3dv -_mesa_Vertex3f -_mesa_Vertex3fv -_mesa_Vertex3i -_mesa_Vertex3iv -_mesa_Vertex3s -_mesa_Vertex3sv -_mesa_Vertex4d -_mesa_Vertex4dv -_mesa_Vertex4f -_mesa_Vertex4fv -_mesa_Vertex4i -_mesa_Vertex4iv -_mesa_Vertex4s -_mesa_Vertex4sv -gl_Begin -gl_End -gl_Vertex2f -gl_render_elts -gl_render_vb_indirect -gl_init_vbrender -gl_reduced_prim_change -gl_render_clipped_line -gl_render_clipped_triangle -gl_render_vb -gl_set_render_vb_function -RESET_IMMEDIATE -gl_compute_orflag -gl_copy_prev_vertices -gl_copy_to_current -gl_execute_cassette -gl_fixup_cassette -gl_fixup_input -gl_flush_vb -gl_internal_flush -gl_maybe_transform_vb -gl_print_cassette -gl_print_cassette_flags -gl_reset_input -gl_reset_vb -gl_texcoord_size -gl_vector1ub_alloc -gl_vector1ub_free -gl_vector1ub_init -gl_vector1ui_alloc -gl_vector1ui_free -gl_vector1ui_init -gl_vector3f_alloc -gl_vector3f_free -gl_vector3f_init -gl_vector3f_print -gl_vector4f_alloc -gl_vector4f_clean_elem -gl_vector4f_free -gl_vector4f_init -gl_vector4f_print -gl_vector4ub_alloc -gl_vector4ub_free -gl_vector4ub_init -gl_init_vertices -_mesa_WindowPos2dMESA -_mesa_WindowPos2dvMESA -_mesa_WindowPos2fMESA -_mesa_WindowPos2fvMESA -_mesa_WindowPos2iMESA -_mesa_WindowPos2ivMESA -_mesa_WindowPos2sMESA -_mesa_WindowPos2svMESA -_mesa_WindowPos3dMESA -_mesa_WindowPos3dvMESA -_mesa_WindowPos3fMESA -_mesa_WindowPos3fvMESA -_mesa_WindowPos3iMESA -_mesa_WindowPos3ivMESA -_mesa_WindowPos3sMESA -_mesa_WindowPos3svMESA -_mesa_WindowPos4dMESA -_mesa_WindowPos4dvMESA -_mesa_WindowPos4fMESA -_mesa_WindowPos4fvMESA -_mesa_WindowPos4iMESA -_mesa_WindowPos4ivMESA -_mesa_WindowPos4sMESA -_mesa_WindowPos4svMESA -gl_init_transformation -gl_project_points -gl_transform_point_sz -gl_transform_vector -gl_write_zoomed_index_span -gl_write_zoomed_rgb_span -gl_write_zoomed_rgba_span -gl_write_zoomed_stencil_span -__glBitmap_size -__glCallLists_size -__glDrawPixels_size -__glFogfv_size -__glFogiv_size -__glLightModelfv_size -__glLightModeliv_size -__glLightfv_size -__glLightiv_size -__glMaterialfv_size -__glMaterialiv_size -__glTexEnvfv_size -__glTexEnviv_size -__glTexGendv_size -__glTexGenfv_size -__glTexGeniv_size -__glTexImage1D_size -__glTexImage2D_size -__glTexParameterfv_size -__glTexParameteriv_size -__MESA_beginDispatchOverride -__MESA_copyContext -__MESA_createBuffer -__MESA_createContext -__MESA_destroyBuffer -__MESA_destroyContext -__MESA_dispatchExec -__MESA_endDispatchOverride -__MESA_forceCurrent -__MESA_initVisuals -__MESA_loseCurrent -__MESA_makeCurrent -__MESA_notifyDestroy -__MESA_notifyResize -__MESA_notifySwapBuffers -__MESA_resetExtension -__MESA_resizeBuffers -__MESA_screenProbe -__MESA_setVisualConfigs -__MESA_shareContext -__MESA_swapBuffers -__glEvalComputeK -__glFloorLog2 -XMesaCreateImage -XMesaDestroyImage -XMesaGetPixel -XMesaPutImageHelper -XMesaCopySubBuffer -XMesaCreateContext -XMesaCreatePixmapBuffer -XMesaCreateVisual -XMesaCreateWindowBuffer -XMesaCreateWindowBuffer2 -XMesaDestroyBuffer -XMesaDestroyContext -XMesaDestroyVisual -XMesaDitherColor -XMesaFindBuffer -XMesaFlush -XMesaForceCurrent -XMesaGarbageCollect -XMesaGetBackBuffer -XMesaGetCurrentBuffer -XMesaGetCurrentContext -XMesaGetCurrentReadBuffer -XMesaGetDepthBuffer -XMesaGetString -XMesaLoseCurrent -XMesaMakeCurrent -XMesaMakeCurrent2 -XMesaReset -XMesaSetFXmode -XMesaSetVisualDisplay -XMesaSwapBuffers -XMesaUnbindContext -xmesa_alloc_back_buffer -xmesa_color_to_pixel -xmesa_update_state -xmesa_get_line_func -xmesa_get_points_func -xmesa_get_triangle_func - -/* $XFree86: xc/programs/Xserver/GL/mesa/src/GLcore-def.cpp,v 1.1 2000/08/10 17:40:29 dawes Exp $ */ Index: xc/programs/Xserver/GL/mesa/src/GLcoremodule.c diff -u xc/programs/Xserver/GL/mesa/src/GLcoremodule.c:1.5 xc/programs/Xserver/GL/mesa/src/GLcoremodule.c:removed --- xc/programs/Xserver/GL/mesa/src/GLcoremodule.c:1.5 Tue Feb 22 23:46:55 2000 +++ xc/programs/Xserver/GL/mesa/src/GLcoremodule.c Thu Feb 27 12:28:24 2003 @@ -1,60 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/mesa/src/GLcoremodule.c,v 1.5 2000/02/23 04:46:55 martin 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: - * Kevin E. Martin <kevin@precisioninsight.com> - * - */ - -#include "xf86Module.h" - -static MODULESETUPPROTO(GLcoreSetup); - -static XF86ModuleVersionInfo VersRec = -{ - "GLcore", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XF86_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_EXTENSION, - ABI_EXTENSION_VERSION, - MOD_CLASS_NONE, - {0,0,0,0} -}; - -XF86ModuleData GLcoreModuleData = { &VersRec, GLcoreSetup, NULL }; - -static pointer -GLcoreSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - /* Need a non-NULL return value to indicate success */ - return (pointer)1; -} Index: xc/programs/Xserver/GL/mesa/src/Imakefile diff -u xc/programs/Xserver/GL/mesa/src/Imakefile:1.18 xc/programs/Xserver/GL/mesa/src/Imakefile:1.23 --- xc/programs/Xserver/GL/mesa/src/Imakefile:1.18 Thu Apr 26 12:54:47 2001 +++ xc/programs/Xserver/GL/mesa/src/Imakefile Fri Nov 22 17:56:00 2002 @@ -1,56 +1,52 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.18 2001/04/26 16:54:47 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/Imakefile,v 1.23 2002/11/22 22:56:00 tsi Exp $ +#if DoLoadableServer +#if !BuildModuleInSubdir #define IHaveModules -#include <Server.tmpl> +#elif !defined(IHaveModules) + MODSUBDIR = module +#endif +#endif +#if !defined(IHaveModules) || !BuildModuleInSubdir #define IHaveSubdirs + SUBDIRS = math array_cache swrast swrast_setup tnl X $(MODSUBDIR) +#endif + +#include <Server.tmpl> - SUBDIRS = X #define NeedAllMesaSrc #define NeedToLinkMesaSrc #define MesaBuildDir /**/ - +#if !defined(IHaveModules) || !BuildModuleInSubdir #include "../../../../../lib/GL/mesa/src/Imakefile.inc" - -#if DoLoadableServer - MSRCS = GLcoremodule.c - MOBJS = GLcoremodule.o - - XOBJS = X/?*.o +#else +#include "../../../../../../lib/GL/mesa/src/Imakefile.inc" #endif - SRCS = $(COREMESASRCS) $(MSRCS) - OBJS = $(COREMESAOBJS) $(MOBJS) + SRCS = $(COREMESABASESRCS) + OBJS = $(COREMESABASEOBJS) INCLUDES = -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - -I$(MESASRCDIR)/src -I$(SERVERSRC)/include + -I$(MESASRCDIR)/include -I$(GLXLIBSRC)/include \ + -I$(MESASRCDIR)/src \ + -I$(SERVERSRC)/include DEFINES = $(GLX_DEFINES) - -#if DoLoadableServer - DONES = X/DONE - -#if HasParallelMake -MakeMutex($(SUBDIRS) $(OBJS) $(DONES)) -#endif +#ifdef IHaveModules ModuleObjectRule() - -DepLibraryModuleTarget(GLcore,$(SUBDIRS) $(DONES) $(OBJS),$(OBJS) $(XOBJS)) -InstallLibraryModule(GLcore,$(MODULEDIR),extensions) -ForceSubdirs($(SUBDIRS)) - #else -MakeSubdirs($(SUBDIRS)) -NormalLibraryTarget(GLcore,$(OBJS)) NormalLibraryObjectRule() #endif -DependTarget() +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif -InstallDriverSDKLibraryModule(GLcore,$(DRIVERSDKMODULEDIR),extensions) +SubdirLibraryRule($(OBJS)) -DependSubdirs($(SUBDIRS)) -MakeLintLibSubdirs($(SUBDIRS)) -LintSubdirs($(SUBDIRS)) +DependTarget() + Index: xc/programs/Xserver/GL/mesa/src/X/Imakefile diff -u xc/programs/Xserver/GL/mesa/src/X/Imakefile:1.11 xc/programs/Xserver/GL/mesa/src/X/Imakefile:1.16 --- xc/programs/Xserver/GL/mesa/src/X/Imakefile:1.11 Thu Jan 10 16:51:47 2002 +++ xc/programs/Xserver/GL/mesa/src/X/Imakefile Fri Nov 22 17:56:01 2002 @@ -1,17 +1,31 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.11 2002/01/10 21:51:47 tsi Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.16 2002/11/22 22:56:01 tsi Exp $ +#if DoLoadableServer +#if !BuildModuleInSubdir #define IHaveModules +#elif !defined(IHaveModules) +#define IHaveSubdirs +SUBDIRS = module +#endif +#endif + #include <Server.tmpl> -LinkSourceFile(xmesa1.c,$(MESASRCDIR)/src/X) -LinkSourceFile(xmesa2.c,$(MESASRCDIR)/src/X) -LinkSourceFile(xmesa3.c,$(MESASRCDIR)/src/X) -LinkSourceFile(xmesa4.c,$(MESASRCDIR)/src/X) +#define NeedAllMesaSrc +#define NeedToLinkMesaSrc +#define MesaXBuildDir /**/ +#define MesaInXServer +#if !defined(IHaveModules) || !BuildModuleInSubdir +#include "../../../../../../lib/GL/mesa/src/X/Imakefile.inc" +#else +#include "../../../../../../../lib/GL/mesa/src/X/Imakefile.inc" +#endif + LinkSourceFile(compsize.c,$(LIBSRC)/GL/glx) - DRIVER_SRCS = xmesa1.c xmesa2.c xmesa3.c xmesa4.c - DRIVER_OBJS = xmesa1.o xmesa2.o xmesa3.o xmesa4.o + DRIVER_SRCS = $(XMESA_SRCS) + DRIVER_OBJS = $(XMESA_OBJS) #ifndef XFree86Version @@ -26,24 +40,36 @@ SRCS = $(DRIVER_SRCS) $(GLX_SRCS) OBJS = $(DRIVER_OBJS) $(GLX_OBJS) - INCLUDES = -I. -I$(INCLUDESRC) -I$(XINCLUDESRC) -I$(EXTINCSRC) \ + INCLUDES = -I$(SERVERSRC)/GL/mesa/src/X -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) $(GLXSRV_DEFINES) /*-DUSE_X86_ASM*/ + DEFINES = $(GLX_DEFINES) $(GLXSRV_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/ -#if DoLoadableServer +#ifdef IHaveModules ModuleObjectRule() -SubdirLibraryRule($(OBJS)) #else -NormalLibraryTarget(GLcoreX,$(OBJS)) NormalLibraryObjectRule() #endif +SubdirLibraryRule($(OBJS)) + LintLibraryTarget(dri,$(SRCS)) NormalLintTarget($(SRCS)) DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + +#if defined(IHaveModules) && BuildModuleInSubdir +LinkSourceFile(xf86glx.c,..) +LinkSourceFile(xf86glx_util.c,..) +#endif + Index: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c diff -u xc/programs/Xserver/GL/mesa/src/X/xf86glx.c:1.11 xc/programs/Xserver/GL/mesa/src/X/xf86glx.c:1.18 --- xc/programs/Xserver/GL/mesa/src/X/xf86glx.c:1.11 Wed Oct 31 17:50:27 2001 +++ xc/programs/Xserver/GL/mesa/src/X/xf86glx.c Tue Dec 17 00:03:24 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.11 2001/10/31 22:50:27 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.18 2002/12/17 05:03:24 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -47,8 +47,10 @@ #include <glxext.h> #include <glxutil.h> #include "xf86glxint.h" +#include "context.h" #include "xmesaP.h" #include <GL/xf86glx.h> +#include "context.h" /* * This define is for the glcore.h header file. @@ -122,25 +124,25 @@ for (i = 0; i < pMScr->num_vis; i++) { if (pMScr->glx_vis[i].vid == vid) { + xm_vis = pMScr->xm_vis[i]; break; } } - if (i < pMScr->num_vis) { - xm_vis = pMScr->xm_vis[i]; - } return xm_vis; } /* * In the case the driver has no GLX visuals we'll use these. - * [0] = RGB, double buffered - * [1] = RGB, double buffered, stencil, accum - * [2] = CI, double buffered + * One thing is funny here: the bufferSize field doesn't always include + * the alpha bits. That is, bufferSize may be 24 when we have 8 bits + * of red, green, blue and alpha. If set set bufferSize to 32 we may + * foul-up the visual matching code below (search for bufferSize). */ -#define NUM_FALLBACK_CONFIGS 3 +#define NUM_FALLBACK_CONFIGS 5 static __GLXvisualConfig FallbackConfigs[NUM_FALLBACK_CONFIGS] = { + /* [0] = RGB, double buffered, Z */ { -1, /* vid */ -1, /* class */ @@ -160,6 +162,7 @@ 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ 0 /* transparentIndex */ }, + /* [1] = RGB, double buffered, Z, stencil, accum */ { -1, /* vid */ -1, /* class */ @@ -179,10 +182,51 @@ 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ 0 /* transparentIndex */ }, + /* [2] = RGB+Alpha, double buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 8, /* rgba sizes */ + -1, -1, -1, -1, /* rgba masks */ + 16, 16, 16, 16, /* rgba accum sizes */ + True, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE_EXT, /* visualRating */ + 0, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [3] = RGB+Alpha, single buffered, Z, stencil, accum */ + { + -1, /* vid */ + -1, /* class */ + True, /* rgba */ + -1, -1, -1, 8, /* rgba sizes */ + -1, -1, -1, -1, /* rgba masks */ + 16, 16, 16, 16, /* rgba accum sizes */ + False, /* doubleBuffer */ + False, /* stereo */ + -1, /* bufferSize */ + 16, /* depthSize */ + 8, /* stencilSize */ + 0, /* auxBuffers */ + 0, /* level */ + GLX_NONE_EXT, /* visualRating */ + 0, /* transparentPixel */ + 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ + 0 /* transparentIndex */ + }, + /* [4] = CI, double buffered, Z */ { -1, /* vid */ -1, /* class */ - False, /* color index */ + False, /* rgba? (false = color index) */ -1, -1, -1, 0, /* rgba sizes */ -1, -1, -1, 0, /* rgba masks */ 0, 0, 0, 0, /* rgba accum sizes */ @@ -257,7 +301,6 @@ } } - /* Count the number of RGB and CI visual configs */ numRGBconfigs = 0; numCIconfigs = 0; @@ -589,6 +632,10 @@ } __glXFree(MESAScreens[i].glx_vis); MESAScreens[i].glx_vis = NULL; + __glXFree(MESAScreens[i].private); + MESAScreens[i].private = NULL; + __glXFree(MESAScreens[i].xm_vis); + MESAScreens[i].xm_vis = NULL; MESAScreens[i].num_vis = 0; } __glDDXScreenInfo.pGlxVisual = NULL; @@ -635,13 +682,8 @@ { __MESA_buffer buf = (__MESA_buffer)glPriv->private; - if (buf->xm_buf && buf->xm_buf->xm_context) { - GLcontext *ctx = buf->xm_buf->xm_context->gl_ctx; - XMesaForceCurrent(buf->xm_buf->xm_context); - (*ctx->CurrentDispatch->ResizeBuffersMESA)(); - if (MESA_CC) - XMesaForceCurrent(MESA_CC->xm_ctx); - } + if (buf->xm_buf) + XMesaResizeBuffers(buf->xm_buf); return (*buf->fbresize)(buffer, x, y, width, height, glPriv, bufferMask); } @@ -680,67 +722,71 @@ __GLcontextModes *modes, __GLinterface *shareGC) { - __GLcontext *gl_ctx; - XMesaContext m_share = NULL; - XMesaVisual xm_vis; + __GLcontext *gl_ctx = NULL; + __GLcontext *m_share = NULL; __GLXcontext *glxc = (__GLXcontext *)imports->other; - - gl_ctx = (__GLcontext *)__glXMalloc(sizeof(__GLcontext)); - if (!gl_ctx) - return NULL; - - gl_ctx->iface.imports = *imports; + XMesaVisual xm_vis; - gl_ctx->iface.exports.destroyContext = __MESA_destroyContext; - gl_ctx->iface.exports.loseCurrent = __MESA_loseCurrent; - gl_ctx->iface.exports.makeCurrent = __MESA_makeCurrent; - gl_ctx->iface.exports.shareContext = __MESA_shareContext; - gl_ctx->iface.exports.copyContext = __MESA_copyContext; - gl_ctx->iface.exports.forceCurrent = __MESA_forceCurrent; - gl_ctx->iface.exports.notifyResize = __MESA_notifyResize; - gl_ctx->iface.exports.notifyDestroy = __MESA_notifyDestroy; - gl_ctx->iface.exports.notifySwapBuffers = __MESA_notifySwapBuffers; - gl_ctx->iface.exports.dispatchExec = __MESA_dispatchExec; - gl_ctx->iface.exports.beginDispatchOverride = __MESA_beginDispatchOverride; - gl_ctx->iface.exports.endDispatchOverride = __MESA_endDispatchOverride; + if (shareGC) + m_share = (__GLcontext *)shareGC; - if (shareGC) m_share = ((__GLcontext *)shareGC)->xm_ctx; xm_vis = find_mesa_visual(glxc->pScreen->myNum, glxc->pGlxVisual->vid); if (xm_vis) { - gl_ctx->xm_ctx = XMesaCreateContext(xm_vis, m_share); - } else { - __glXFree(gl_ctx); - gl_ctx = NULL; + XMesaContext xmshare = m_share ? m_share->DriverCtx : 0; + XMesaContext xmctx = XMesaCreateContext(xm_vis, xmshare); + gl_ctx = xmctx ? xmctx->gl_ctx : 0; } + if (!gl_ctx) + return NULL; + + gl_ctx->imports = *imports; + gl_ctx->exports.destroyContext = __MESA_destroyContext; + gl_ctx->exports.loseCurrent = __MESA_loseCurrent; + gl_ctx->exports.makeCurrent = __MESA_makeCurrent; + gl_ctx->exports.shareContext = __MESA_shareContext; + gl_ctx->exports.copyContext = __MESA_copyContext; + gl_ctx->exports.forceCurrent = __MESA_forceCurrent; + gl_ctx->exports.notifyResize = __MESA_notifyResize; + gl_ctx->exports.notifyDestroy = __MESA_notifyDestroy; + gl_ctx->exports.notifySwapBuffers = __MESA_notifySwapBuffers; + gl_ctx->exports.dispatchExec = __MESA_dispatchExec; + gl_ctx->exports.beginDispatchOverride = __MESA_beginDispatchOverride; + gl_ctx->exports.endDispatchOverride = __MESA_endDispatchOverride; + return (__GLinterface *)gl_ctx; } GLboolean __MESA_destroyContext(__GLcontext *gc) { - XMesaDestroyContext(gc->xm_ctx); - __glXFree(gc); + XMesaContext xmesa = (XMesaContext) gc->DriverCtx; + XMesaDestroyContext( xmesa ); return GL_TRUE; } GLboolean __MESA_loseCurrent(__GLcontext *gc) { + XMesaContext xmesa = (XMesaContext) gc->DriverCtx; MESA_CC = NULL; __glXLastContext = NULL; - return XMesaLoseCurrent(gc->xm_ctx); + return XMesaLoseCurrent(xmesa); } -GLboolean __MESA_makeCurrent(__GLcontext *gc, __GLdrawablePrivate *glPriv) +GLboolean __MESA_makeCurrent(__GLcontext *gc, __GLdrawablePrivate *oldglPriv) { + /* We don't use oldglPriv - kept for backwards compatibility */ + __GLdrawablePrivate *glPriv = gc->imports.getDrawablePrivate( gc ); __MESA_buffer buf = (__MESA_buffer)glPriv->private; + XMesaContext xmesa = (XMesaContext) gc->DriverCtx; MESA_CC = gc; - return XMesaMakeCurrent(gc->xm_ctx, buf->xm_buf); + return XMesaMakeCurrent(xmesa, buf->xm_buf); } GLboolean __MESA_shareContext(__GLcontext *gc, __GLcontext *gcShare) { /* NOT_DONE */ + /* XXX I don't see where/how this could ever be called */ ErrorF("__MESA_shareContext\n"); return GL_FALSE; } @@ -748,15 +794,17 @@ GLboolean __MESA_copyContext(__GLcontext *dst, const __GLcontext *src, GLuint mask) { - /* NOT_DONE */ - ErrorF("__MESA_copyContext\n"); - return GL_FALSE; + XMesaContext xm_dst = (XMesaContext) dst->DriverCtx; + const XMesaContext xm_src = (const XMesaContext) src->DriverCtx; + _mesa_copy_context(xm_src->gl_ctx, xm_dst->gl_ctx, mask); + return GL_TRUE; } GLboolean __MESA_forceCurrent(__GLcontext *gc) { + XMesaContext xmesa = (XMesaContext) gc->DriverCtx; MESA_CC = gc; - return XMesaForceCurrent(gc->xm_ctx); + return XMesaForceCurrent(xmesa); } GLboolean __MESA_notifyResize(__GLcontext *gc) Index: xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h diff -u xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h:1.3 xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h:1.4 --- xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h:1.3 Tue Feb 22 23:46:57 2000 +++ xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h Fri Feb 22 16:45:08 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h,v 1.3 2000/02/23 04:46:57 martin Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h,v 1.4 2002/02/22 21:45:08 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -39,10 +39,10 @@ #include <GL/gl.h> #include <GL/xmesa.h> -struct __GLcontextRec { - __GLinterface iface; - XMesaContext xm_ctx; -}; +/* struct __GLcontextRec { */ +/* __GLinterface iface; */ +/* XMesaContext xm_ctx; */ +/* }; */ typedef struct __MESA_screenRec __MESA_screen; struct __MESA_screenRec { @@ -85,8 +85,7 @@ __GLinterface *shareGC); extern GLboolean __MESA_destroyContext(__GLcontext *gc); extern GLboolean __MESA_loseCurrent(__GLcontext *gc); -extern GLboolean __MESA_makeCurrent(__GLcontext *gc, - __GLdrawablePrivate *glPriv); +extern GLboolean __MESA_makeCurrent(__GLcontext *gc, __GLdrawablePrivate *oldglPriv); extern GLboolean __MESA_shareContext(__GLcontext *gc, __GLcontext *gcShare); extern GLboolean __MESA_copyContext(__GLcontext *dst, const __GLcontext *src, GLuint mask); Index: xc/programs/Xserver/GL/mesa/src/X/module/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/X/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:28:24 2003 +++ xc/programs/Xserver/GL/mesa/src/X/module/Imakefile Fri May 31 14:12:38 2002 @@ -0,0 +1,6 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/module/Imakefile,v 1.1 2002/05/31 18:12:38 dawes Exp $ + +#define IHaveModules + +#include "../Imakefile" + Index: xc/programs/Xserver/GL/mesa/src/array_cache/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/array_cache/Imakefile:1.8 --- /dev/null Thu Feb 27 12:28:24 2003 +++ xc/programs/Xserver/GL/mesa/src/array_cache/Imakefile Fri Nov 22 17:56:01 2002 @@ -0,0 +1,54 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/array_cache/Imakefile,v 1.8 2002/11/22 22:56:01 tsi Exp $ + +#if DoLoadableServer +#if !BuildModuleInSubdir +#define IHaveModules +#elif !defined(IHaveModules) +#define IHaveSubdirs +SUBDIRS = module +#endif +#endif + +#include <Server.tmpl> + +#define NeedAllMesaSrc +#define NeedToLinkMesaSrc +#define MesaACBuildDir /**/ +#if !defined(IHaveModules) || !BuildModuleInSubdir +#include "../../../../../../lib/GL/mesa/src/array_cache/Imakefile.inc" +#else +#include "../../../../../../../lib/GL/mesa/src/array_cache/Imakefile.inc" +#endif + + SRCS = $(MESA_AC_SRCS) + OBJS = $(MESA_AC_OBJS) + + INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/array_cache \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/include \ + -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \ + -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) -I$(INCLUDESRC) + + DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/ + +#ifdef IHaveModules +ModuleObjectRule() +#else +NormalLibraryObjectRule() +#endif + +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(dri,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + Index: xc/programs/Xserver/GL/mesa/src/array_cache/module/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/array_cache/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:28:24 2003 +++ xc/programs/Xserver/GL/mesa/src/array_cache/module/Imakefile Fri May 31 14:12:39 2002 @@ -0,0 +1,6 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/array_cache/module/Imakefile,v 1.1 2002/05/31 18:12:39 dawes Exp $ + +#define IHaveModules + +#include "../Imakefile" + Index: xc/programs/Xserver/GL/mesa/src/math/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/math/Imakefile:1.8 --- /dev/null Thu Feb 27 12:28:24 2003 +++ xc/programs/Xserver/GL/mesa/src/math/Imakefile Fri Nov 22 17:56:01 2002 @@ -0,0 +1,53 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/math/Imakefile,v 1.8 2002/11/22 22:56:01 tsi Exp $ + +#if DoLoadableServer +#if !BuildModuleInSubdir +#define IHaveModules +#elif !defined(IHaveModules) +#define IHaveSubdirs +SUBDIRS = module +#endif +#endif + +#include <Server.tmpl> + +#define NeedAllMesaSrc +#define NeedToLinkMesaSrc +#define MesaMathBuildDir /**/ +#if !defined(IHaveModules) || !BuildModuleInSubdir +#include "../../../../../../lib/GL/mesa/src/math/Imakefile.inc" +#else +#include "../../../../../../../lib/GL/mesa/src/math/Imakefile.inc" +#endif + + SRCS = $(MESA_MATH_SRCS) + OBJS = $(MESA_MATH_OBJS) + + INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/include \ + -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \ + -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) -I$(INCLUDESRC) + + DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/ + +#ifdef IHaveModules +ModuleObjectRule() +#else +NormalLibraryObjectRule() +#endif + +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(dri,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + Index: xc/programs/Xserver/GL/mesa/src/math/module/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/math/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:28:24 2003 +++ xc/programs/Xserver/GL/mesa/src/math/module/Imakefile Fri May 31 14:12:40 2002 @@ -0,0 +1,6 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/math/module/Imakefile,v 1.1 2002/05/31 18:12:40 dawes Exp $ + +#define IHaveModules + +#include "../Imakefile" + Index: xc/programs/Xserver/GL/mesa/src/module/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:28:24 2003 +++ xc/programs/Xserver/GL/mesa/src/module/Imakefile Fri May 31 14:12:40 2002 @@ -0,0 +1,6 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/module/Imakefile,v 1.1 2002/05/31 18:12:40 dawes Exp $ + +#define IHaveModules + +#include "../Imakefile" + Index: xc/programs/Xserver/GL/mesa/src/swrast/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/swrast/Imakefile:1.8 --- /dev/null Thu Feb 27 12:28:24 2003 +++ xc/programs/Xserver/GL/mesa/src/swrast/Imakefile Fri Nov 22 17:56:01 2002 @@ -0,0 +1,55 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/swrast/Imakefile,v 1.8 2002/11/22 22:56:01 tsi Exp $ + +#if DoLoadableServer +#if !BuildModuleInSubdir +#define IHaveModules +#elif !defined(IHaveModules) +#define IHaveSubdirs +SUBDIRS = module +#endif +#endif + +#include <Server.tmpl> + +#define NeedAllMesaSrc +#define NeedToLinkMesaSrc +#define MesaSwrastBuildDir /**/ +#if !defined(IHaveModules) || !BuildModuleInSubdir +#include "../../../../../../lib/GL/mesa/src/swrast/Imakefile.inc" +#else +#include "../../../../../../../lib/GL/mesa/src/swrast/Imakefile.inc" +#endif + + + SRCS = $(MESA_SWRAST_SRCS) + OBJS = $(MESA_SWRAST_OBJS) + + INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/swrast \ + -I$(MESASRCDIR)/src/swrast_setup \ + -I$(MESASRCDIR)/include \ + -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \ + -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) -I$(INCLUDESRC) + + DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/ + +#ifdef IHaveModules +ModuleObjectRule() +#else +NormalLibraryObjectRule() +#endif + +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(dri,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + Index: xc/programs/Xserver/GL/mesa/src/swrast/module/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/swrast/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:28:25 2003 +++ xc/programs/Xserver/GL/mesa/src/swrast/module/Imakefile Fri May 31 14:12:40 2002 @@ -0,0 +1,6 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/swrast/module/Imakefile,v 1.1 2002/05/31 18:12:40 dawes Exp $ + +#define IHaveModules + +#include "../Imakefile" + Index: xc/programs/Xserver/GL/mesa/src/swrast_setup/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/swrast_setup/Imakefile:1.8 --- /dev/null Thu Feb 27 12:28:25 2003 +++ xc/programs/Xserver/GL/mesa/src/swrast_setup/Imakefile Fri Nov 22 17:56:01 2002 @@ -0,0 +1,53 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/swrast_setup/Imakefile,v 1.8 2002/11/22 22:56:01 tsi Exp $ + +#if DoLoadableServer +#if !BuildModuleInSubdir +#define IHaveModules +#elif !defined(IHaveModules) +#define IHaveSubdirs +SUBDIRS = module +#endif +#endif + +#include <Server.tmpl> + +#define NeedAllMesaSrc +#define NeedToLinkMesaSrc +#define MesaSwrastSetupBuildDir /**/ +#if !defined(IHaveModules) || !BuildModuleInSubdir +#include "../../../../../../lib/GL/mesa/src/swrast_setup/Imakefile.inc" +#else +#include "../../../../../../../lib/GL/mesa/src/swrast_setup/Imakefile.inc" +#endif + + SRCS = $(MESA_SWR_SETUP_SRCS) + OBJS = $(MESA_SWR_SETUP_OBJS) + + INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/swrast_setup \ + -I$(MESASRCDIR)/include \ + -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \ + -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) -I$(INCLUDESRC) + + DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/ + +#ifdef IHaveModules +ModuleObjectRule() +#else +NormalLibraryObjectRule() +#endif + +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(dri,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + Index: xc/programs/Xserver/GL/mesa/src/swrast_setup/module/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/swrast_setup/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:28:25 2003 +++ xc/programs/Xserver/GL/mesa/src/swrast_setup/module/Imakefile Fri May 31 14:12:41 2002 @@ -0,0 +1,6 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/swrast_setup/module/Imakefile,v 1.1 2002/05/31 18:12:41 dawes Exp $ + +#define IHaveModules + +#include "../Imakefile" + Index: xc/programs/Xserver/GL/mesa/src/tnl/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/tnl/Imakefile:1.8 --- /dev/null Thu Feb 27 12:28:25 2003 +++ xc/programs/Xserver/GL/mesa/src/tnl/Imakefile Fri Nov 22 17:56:02 2002 @@ -0,0 +1,56 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/tnl/Imakefile,v 1.8 2002/11/22 22:56:02 tsi Exp $ + +#if DoLoadableServer +#if !BuildModuleInSubdir +#define IHaveModules +#elif !defined(IHaveModules) +#define IHaveSubdirs +SUBDIRS = module +#endif +#endif + +#include <Server.tmpl> + +#define NeedAllMesaSrc +#define NeedToLinkMesaSrc +#define MesaTnlBuildDir /**/ +#if !defined(IHaveModules) || !BuildModuleInSubdir +#include "../../../../../../lib/GL/mesa/src/tnl/Imakefile.inc" +#else +#include "../../../../../../../lib/GL/mesa/src/tnl/Imakefile.inc" +#endif + + + SRCS = $(MESA_TNL_SRCS) + OBJS = $(MESA_TNL_OBJS) + + INCLUDES = -I$(MESASRCDIR)/src \ + -I$(MESASRCDIR)/src/array_cache \ + -I$(MESASRCDIR)/src/math \ + -I$(MESASRCDIR)/src/tnl \ + -I$(MESASRCDIR)/include \ + -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/GL/glx \ + -I$(LIBSRC)/GL/include \ + -I$(XF86SRC) -I$(INCLUDESRC) + + DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ /*-DUSE_SPARC_ASM*/ + +#ifdef IHaveModules +ModuleObjectRule() +#else +NormalLibraryObjectRule() +#endif + +SubdirLibraryRule($(OBJS)) + +LintLibraryTarget(dri,$(SRCS)) +NormalLintTarget($(SRCS)) + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + Index: xc/programs/Xserver/GL/mesa/src/tnl/module/Imakefile diff -u /dev/null xc/programs/Xserver/GL/mesa/src/tnl/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:28:25 2003 +++ xc/programs/Xserver/GL/mesa/src/tnl/module/Imakefile Fri May 31 14:12:42 2002 @@ -0,0 +1,6 @@ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/tnl/module/Imakefile,v 1.1 2002/05/31 18:12:42 dawes Exp $ + +#define IHaveModules + +#include "../Imakefile" + Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h:1.7 xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h:1.7 Fri Dec 14 14:57:13 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h Mon Sep 16 14:05:28 2002 @@ -46,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h,v 1.7 2001/12/14 19:57:13 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h,v 1.9 2002/09/16 18:05:28 eich Exp $ */ #ifndef MISTRUCT_H #define MISTRUCT_H @@ -66,7 +66,8 @@ /* do the following to pad to 64 bit alignment for alpha and ia64 */ #if defined(__alpha) || defined(__alpha__) || \ defined(ia64) || defined(__ia64__) || \ - defined(__s390x__) + defined(__s390x__) || \ + defined(x86_64) || defined (__x86_64__) ddUSHORT unused0; ddUSHORT unused1; #endif Index: xc/programs/Xserver/PEX5/ospex/osPexFont.c diff -u xc/programs/Xserver/PEX5/ospex/osPexFont.c:3.18 xc/programs/Xserver/PEX5/ospex/osPexFont.c:3.19 --- xc/programs/Xserver/PEX5/ospex/osPexFont.c:3.18 Fri Dec 14 14:57:56 2001 +++ xc/programs/Xserver/PEX5/ospex/osPexFont.c Fri May 31 14:45:53 2002 @@ -46,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ospex/osPexFont.c,v 3.18 2001/12/14 19:57:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ospex/osPexFont.c,v 3.19 2002/05/31 18:45:53 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ @@ -135,7 +135,7 @@ (char *)xalloc((unsigned long)(1+strlen(getenv("PEX_FONTPATH")))); strcpy(font_dir_path, getenv("PEX_FONTPATH")); } else { -#ifndef __EMX__ +#ifndef __UNIXOS2__ font_dir_path = (char *)xalloc((unsigned long)(1+strlen(PEX_DEFAULT_FONTPATH))); strcpy(font_dir_path, PEX_DEFAULT_FONTPATH); Index: xc/programs/Xserver/XTrap/Imakefile diff -u xc/programs/Xserver/XTrap/Imakefile:1.1 xc/programs/Xserver/XTrap/Imakefile:1.2 --- xc/programs/Xserver/XTrap/Imakefile:1.1 Fri Nov 2 18:29:29 2001 +++ xc/programs/Xserver/XTrap/Imakefile Mon Sep 16 21:15:08 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/XTrap/Imakefile,v 1.1 2001/11/02 23:29:29 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/XTrap/Imakefile,v 1.2 2002/09/17 01:15:08 dawes Exp $ #if DoLoadableServer #define IHaveSubdirs @@ -11,7 +11,7 @@ #endif SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o - INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) + INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/Xext NormalLibraryTarget(xtrap,$(OBJS)) LintLibraryTarget(xtrap,$(SRCS)) Index: xc/programs/Xserver/XTrap/xtrapddmi.c diff -u xc/programs/Xserver/XTrap/xtrapddmi.c:1.1 xc/programs/Xserver/XTrap/xtrapddmi.c:1.2 --- xc/programs/Xserver/XTrap/xtrapddmi.c:1.1 Fri Nov 2 18:29:29 2001 +++ xc/programs/Xserver/XTrap/xtrapddmi.c Tue Jan 22 22:31:39 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/XTrap/xtrapddmi.c,v 1.1 2001/11/02 23:29:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XTrap/xtrapddmi.c,v 1.2 2002/01/23 03:31:39 dawes Exp $ */ /***************************************************************************** Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA @@ -38,12 +38,16 @@ * */ +#ifndef EXTMODULE #include <errno.h> #include <X11/Xos.h> #ifdef PC # include "fcntl.h" # include "io.h" # define O_NDELAY 0L +#endif +#else +#include "xf86_ansic.h" #endif #define NEED_REPLIES Index: xc/programs/Xserver/XTrap/xtrapdi.c diff -u xc/programs/Xserver/XTrap/xtrapdi.c:1.2 xc/programs/Xserver/XTrap/xtrapdi.c:1.5 --- xc/programs/Xserver/XTrap/xtrapdi.c:1.2 Wed Nov 7 23:00:12 2001 +++ xc/programs/Xserver/XTrap/xtrapdi.c Wed Sep 18 13:11:47 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.2 2001/11/08 04:00:12 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.5 2002/09/18 17:11:47 tsi Exp $ */ /***************************************************************************** Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH. @@ -47,12 +47,16 @@ /*-----------------* * Include Files * *-----------------*/ -#include <stdio.h> -#include <errno.h> #define NEED_REPLIES #define NEED_EVENTS +#ifndef EXTMODULE +#include <stdio.h> +#include <errno.h> #include <X11/Xos.h> +#else +#include "xf86_ansic.h" +#endif #include <X11/X.h> #include <X11/Xproto.h> #include "input.h" /* Server DevicePtr definitions */ @@ -72,6 +76,12 @@ #include <X11/extensions/xtrapddmi.h> #include <X11/extensions/xtrapproto.h> #include "colormapst.h" +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#include "cursor.h" +#endif + /*----------------------------* * Global Data Declarations * @@ -181,7 +191,7 @@ int XETrapDestroyEnv(pointer value, XID id) { xXTrapReq request; - XETrapEnv *penv = XETenv[(int)value]; + XETrapEnv *penv = XETenv[(long)value]; XETrapReset(&request,penv->client); /* Free any memory malloc'd for a particular client here */ @@ -207,7 +217,7 @@ #endif Xfree(penv); - XETenv[(int)value] = NULL; + XETenv[(long)value] = NULL; return 0; } @@ -227,7 +237,7 @@ */ void XETrapCloseDown(ExtensionEntry *extEntry) { - int i; + long i; for (i=0L; i<MAXCLIENTS; i++) { @@ -490,7 +500,7 @@ penv->protocol = 31; /* default to backwards compatibility */ /* prep for client's departure (for memory dealloc, cleanup) */ AddResource(FakeClientID(client->index),XETrapType, - (pointer)(client->index)); + (pointer)(long)(client->index)); if (XETrapRedirectDevices() == False) { status = XETrapErrorBase + BadDevices; @@ -1542,6 +1552,21 @@ penv->last_input_time = x_event->u.keyButtonPointer.time; /* Copy the event information into our local memory */ (void)memcpy(&(data.u.event),x_event,sizeof(xEvent)); + +#ifdef PANORAMIX + if (!noPanoramiXExtension && + (data.u.event.u.u.type == MotionNotify || + data.u.event.u.u.type == ButtonPress || + data.u.event.u.u.type == ButtonRelease || + data.u.event.u.u.type == KeyPress || + data.u.event.u.u.type == KeyRelease)) { + int scr = XineramaGetCursorScreen(); + data.u.event.u.keyButtonPointer.rootX += + panoramiXdataPtr[scr].x - panoramiXdataPtr[0].x; + data.u.event.u.keyButtonPointer.rootY += + panoramiXdataPtr[scr].y - panoramiXdataPtr[0].y; + } +#endif if (penv->client->swapped) { /* Index: xc/programs/Xserver/XTrap/module/Imakefile diff -u xc/programs/Xserver/XTrap/module/Imakefile:1.1 xc/programs/Xserver/XTrap/module/Imakefile:1.3 --- xc/programs/Xserver/XTrap/module/Imakefile:1.1 Fri Nov 2 18:29:29 2001 +++ xc/programs/Xserver/XTrap/module/Imakefile Mon Sep 16 21:15:09 2002 @@ -1,11 +1,13 @@ -XCOMM $XFree86: xc/programs/Xserver/XTrap/module/Imakefile,v 1.1 2001/11/02 23:29:29 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/XTrap/module/Imakefile,v 1.3 2002/09/17 01:15:09 dawes Exp $ #define IHaveModules #include <Server.tmpl> SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c xf86XTrapModule.c OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o xf86XTrapModule.o - INCLUDES = -I.. -I../../include -I$(EXTINCSRC) -I$(XINCLUDESRC) + INCLUDES = -I.. -I../../include -I$(EXTINCSRC) -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/Xext + DEFINES = -DEXTMODULE LinkSourceFile(xf86XTrapModule.c,..) LinkSourceFile(xtrapddmi.c,..) Index: xc/programs/Xserver/Xext/Imakefile diff -u xc/programs/Xserver/Xext/Imakefile:3.40 xc/programs/Xserver/Xext/Imakefile:3.42 --- xc/programs/Xserver/Xext/Imakefile:3.40 Sun Mar 4 23:51:55 2001 +++ xc/programs/Xserver/Xext/Imakefile Wed Mar 6 16:12:32 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/Xext/Imakefile,v 3.40 2001/03/05 04:51:55 mvojkovi Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xext/Imakefile,v 3.42 2002/03/06 21:12:32 mvojkovi Exp $ #include <Server.tmpl> @@ -41,7 +41,7 @@ VIDMODEOBJS = xf86vmode.o #endif -#if BuildXF86MiscExt +#if BuildXF86MiscExt && XF86Server XF86MISCSRCS = xf86misc.c XF86MISCOBJS = xf86misc.o #endif @@ -64,6 +64,11 @@ XVOBJS = xvmain.o xvdisp.o xvmc.o #endif +#if BuildXResExt + XRESSRCS = xres.c + XRESOBJS = xres.o +#endif + #if BuildAppgroup APPGROUPSRCS = appgroup.c APPGROUPOBJS = appgroup.o @@ -102,14 +107,14 @@ bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \ $(XF86MISCSRCS) $(XF86BIGFSRCS) $(XF86DGASRCS) $(SECURITYSRCS) \ $(APPGROUPSRCS) xprint.c $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \ - $(EVISRCS) $(XVSRCS) $(FONTCACHESRCS) + $(EVISRCS) $(XVSRCS) $(FONTCACHESRCS) $(XRESSRCS) OBJS = shape.o $(SHMOBJS) $(MULTIBUFOBJ) \ mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o $(VIDMODEOBJS) \ $(XF86MISCOBJS) $(XF86BIGFOBJS) $(XF86DGAOBJS) $(SECURITYOBJS) \ $(APPGROUPOBJS) xprint.o $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \ - $(EVIOBJS) $(XVOBJS) $(FONTCACHEOBJS) + $(EVIOBJS) $(XVOBJS) $(FONTCACHEOBJS) $(XRESOBJS) SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) xprint.o \ xtest.o xtest1di.o xtest1dd.o sleepuntil.o $(PNRXOBJS) \ Index: xc/programs/Xserver/Xext/panoramiX.c diff -u xc/programs/Xserver/Xext/panoramiX.c:3.31 xc/programs/Xserver/Xext/panoramiX.c:3.32 --- xc/programs/Xserver/Xext/panoramiX.c:3.31 Sat Oct 27 23:32:51 2001 +++ xc/programs/Xserver/Xext/panoramiX.c Wed Jul 31 20:30:34 2002 @@ -23,7 +23,7 @@ dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.31 2001/10/28 03:32:51 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.32 2002/08/01 00:30:34 mvojkovi Exp $ */ #define NEED_REPLIES #include <stdio.h> @@ -305,7 +305,19 @@ unsigned long mask, GCPtr pGCDst ){ + PanoramiXGCPtr pSrcPriv = + (PanoramiXGCPtr) pGCSrc->devPrivates[PanoramiXGCIndex].ptr; Xinerama_GC_FUNC_PROLOGUE (pGCDst); + + if(mask & GCTileStipXOrigin) + pGCPriv->patOrg.x = pSrcPriv->patOrg.x; + if(mask & GCTileStipYOrigin) + pGCPriv->patOrg.y = pSrcPriv->patOrg.y; + if(mask & GCClipXOrigin) + pGCPriv->clipOrg.x = pSrcPriv->clipOrg.x; + if(mask & GCClipYOrigin) + pGCPriv->clipOrg.y = pSrcPriv->clipOrg.y; + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); Xinerama_GC_FUNC_EPILOGUE (pGCDst); } Index: xc/programs/Xserver/Xext/panoramiXprocs.c diff -u xc/programs/Xserver/Xext/panoramiXprocs.c:3.31 xc/programs/Xserver/Xext/panoramiXprocs.c:3.33 --- xc/programs/Xserver/Xext/panoramiXprocs.c:3.31 Thu Aug 23 09:01:36 2001 +++ xc/programs/Xserver/Xext/panoramiXprocs.c Wed Apr 10 17:38:53 2002 @@ -26,7 +26,7 @@ /* Massively rewritten by Mark Vojkovich <markv@valinux.com> */ -/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.31 2001/08/23 13:01:36 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.33 2002/04/10 21:38:53 mvojkovi Exp $ */ #include <stdio.h> #include "X.h" @@ -231,7 +231,6 @@ if (cmap) *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; result = (*SavedProcVector[X_ChangeWindowAttributes])(client); - if(result != Success) break; } return (result); @@ -2324,7 +2323,6 @@ FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; result = (* SavedProcVector[X_FreeColors])(client); - if(result != Success) break; } return (result); } Index: xc/programs/Xserver/Xext/security.c diff -u xc/programs/Xserver/Xext/security.c:1.10 xc/programs/Xserver/Xext/security.c:1.11 --- xc/programs/Xserver/Xext/security.c:1.10 Fri Dec 14 14:58:50 2001 +++ xc/programs/Xserver/Xext/security.c Fri May 31 14:45:53 2002 @@ -24,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.10 2001/12/14 19:58:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.11 2002/05/31 18:45:53 dawes Exp $ */ #include "dixstruct.h" #include "extnsionst.h" @@ -1358,7 +1358,7 @@ } } /* SecurityFreePropertyAccessList */ -#ifndef __EMX__ +#ifndef __UNIXOS2__ #define SecurityIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') ) #else #define SecurityIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') ) @@ -1640,7 +1640,7 @@ if (!SecurityPolicyFile) return; -#ifndef __EMX__ +#ifndef __UNIXOS2__ f = fopen(SecurityPolicyFile, "r"); #else f = fopen((char*)__XOS2RedirRoot(SecurityPolicyFile), "r"); Index: xc/programs/Xserver/Xext/shm.c diff -u xc/programs/Xserver/Xext/shm.c:3.33 xc/programs/Xserver/Xext/shm.c:3.36 --- xc/programs/Xserver/Xext/shm.c:3.33 Fri Dec 14 14:58:51 2001 +++ xc/programs/Xserver/Xext/shm.c Wed Apr 3 14:51:11 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.33 2001/12/14 19:58:51 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.36 2002/04/03 19:51:11 herrb Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -38,6 +38,7 @@ #include <shm.h> #endif #include <unistd.h> +#include <sys/stat.h> #define NEED_REPLIES #define NEED_EVENTS #include "X.h" @@ -355,7 +356,48 @@ return (client->noClientException); } +/* + * Simulate the access() system call for a shared memory segement, + * using the credentials from the client if available + */ static int +shm_access(ClientPtr client, struct ipc_perm *perm, int readonly) +{ + int uid, gid; + mode_t mask; + + if (LocalClientCred(client, &uid, &gid) != -1) { + + /* User id 0 always gets access */ + if (uid == 0) { + return 0; + } + /* Check the owner */ + if (perm->uid == uid || perm->cuid == uid) { + mask = S_IRUSR; + if (!readonly) { + mask |= S_IWUSR; + } + return (perm->mode & mask) == mask ? 0 : -1; + } + /* Check the group */ + if (perm->gid == gid || perm->cgid == gid) { + mask = S_IRGRP; + if (!readonly) { + mask |= S_IWGRP; + } + return (perm->mode & mask) == mask ? 0 : -1; + } + } + /* Otherwise, check everyone else */ + mask = S_IROTH; + if (!readonly) { + mask |= S_IWOTH; + } + return (perm->mode & mask) == mask ? 0 : -1; +} + +static int ProcShmAttach(client) register ClientPtr client; { @@ -393,6 +435,17 @@ xfree(shmdesc); return BadAccess; } + + /* The attach was performed with root privs. We must + * do manual checking of access rights for the credentials + * of the client */ + + if (shm_access(client, &(buf.shm_perm), stuff->readOnly) == -1) { + shmdt(shmdesc->addr); + xfree(shmdesc); + return BadAccess; + } + shmdesc->shmid = stuff->shmid; shmdesc->refcnt = 1; shmdesc->writable = !stuff->readOnly; Index: xc/programs/Xserver/Xext/xf86misc.c diff -u xc/programs/Xserver/Xext/xf86misc.c:3.35 xc/programs/Xserver/Xext/xf86misc.c:3.37 --- xc/programs/Xserver/Xext/xf86misc.c:3.35 Wed Aug 15 12:25:20 2001 +++ xc/programs/Xserver/Xext/xf86misc.c Tue Nov 19 23:04:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86misc.c,v 3.35 2001/08/15 16:25:20 paulo Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86misc.c,v 3.37 2002/11/20 04:04:58 dawes Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc @@ -42,13 +42,39 @@ #endif static int miscErrorBase; +static int MiscGeneration = 0; +static int MiscClientPrivateIndex; +/* This holds the client's version information */ +typedef struct { + int major; + int minor; +} MiscPrivRec, *MiscPrivPtr; + +#define MPRIV(c) ((c)->devPrivates[MiscClientPrivateIndex].ptr) + static void XF86MiscResetProc( #if NeedFunctionPrototypes ExtensionEntry* /* extEntry */ #endif ); +static void +ClientVersion(ClientPtr client, int *major, int *minor) +{ + MiscPrivPtr pPriv; + + pPriv = MPRIV(client); + if (!pPriv) { + if (major) *major = 0; + if (minor) *minor = 0; + return; + } + + if (major) *major = pPriv->major; + if (minor) *minor = pPriv->minor; +} + static DISPATCH_PROC(ProcXF86MiscDispatch); static DISPATCH_PROC(ProcXF86MiscQueryVersion); static DISPATCH_PROC(ProcXF86MiscGetKbdSettings); @@ -56,6 +82,8 @@ static DISPATCH_PROC(ProcXF86MiscSetKbdSettings); static DISPATCH_PROC(ProcXF86MiscSetMouseSettings); static DISPATCH_PROC(ProcXF86MiscSetGrabKeysState); +static DISPATCH_PROC(ProcXF86MiscSetClientVersion); +static DISPATCH_PROC(ProcXF86MiscGetFilePaths); #ifdef _XF86MISC_SAVER_COMPAT_ static DISPATCH_PROC(ProcXF86MiscGetSaver); static DISPATCH_PROC(ProcXF86MiscSetSaver); @@ -67,6 +95,8 @@ static DISPATCH_PROC(SProcXF86MiscSetKbdSettings); static DISPATCH_PROC(SProcXF86MiscSetMouseSettings); static DISPATCH_PROC(SProcXF86MiscSetGrabKeysState); +static DISPATCH_PROC(SProcXF86MiscSetClientVersion); +static DISPATCH_PROC(SProcXF86MiscGetFilePaths); #ifdef _XF86MISC_SAVER_COMPAT_ static DISPATCH_PROC(SProcXF86MiscGetSaver); static DISPATCH_PROC(SProcXF86MiscSetSaver); @@ -92,6 +122,24 @@ if (!xf86GetModInDevEnabled()) return; + /* + * Allocate a client private index to hold the client's version + * information. + */ + if (MiscGeneration != serverGeneration) { + MiscClientPrivateIndex = AllocateClientPrivateIndex(); + /* + * Allocate 0 length, and use the private to hold a pointer to our + * MiscPrivRec. + */ + if (!AllocateClientPrivate(MiscClientPrivateIndex, 0)) { + ErrorF("XFree86MiscExtensionInit: " + "AllocateClientPrivate failed\n"); + return; + } + MiscGeneration = serverGeneration; + } + if ( (extEntry = AddExtension(XF86MISCNAME, XF86MiscNumberEvents, @@ -293,12 +341,17 @@ { MiscExtReturn ret; pointer mouse; + char *devname = NULL; + int major, minor; + REQUEST(xXF86MiscSetMouseSettingsReq); DEBUG_P("XF86MiscSetMouseSettings"); - REQUEST_SIZE_MATCH(xXF86MiscSetMouseSettingsReq); + REQUEST_AT_LEAST_SIZE(xXF86MiscSetMouseSettingsReq); + ClientVersion(client, &major, &minor); + if (xf86GetVerbosity() > 1) { ErrorF("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", stuff->mousetype, stuff->baudrate, @@ -308,6 +361,7 @@ stuff->resolution, stuff->flags); } + if ((mouse = MiscExtCreateStruct(MISC_POINTER)) == (pointer) 0) return BadAlloc; @@ -320,8 +374,28 @@ MiscExtSetMouseValue(mouse, MISC_MSE_EM3TIMEOUT, stuff->emulate3timeout); MiscExtSetMouseValue(mouse, MISC_MSE_CHORDMIDDLE, stuff->chordmiddle); MiscExtSetMouseValue(mouse, MISC_MSE_FLAGS, stuff->flags); + + if ((major > 0 || minor > 5) && stuff->devnamelen) { + int size = sizeof(xXF86MiscSetMouseSettingsReq) + stuff->devnamelen; + size = (size + 3) >> 2; + if (client->req_len < size) + return BadLength; + if (stuff->devnamelen) { + if (!(devname = xalloc(stuff->devnamelen))) + return BadAlloc; + strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen); + if (xf86GetVerbosity() > 1) + ErrorF("SetMouseSettings - device: %s\n",devname); + MiscExtSetMouseDevice(mouse, devname); + } + } + + ret = MiscExtApply(mouse, MISC_POINTER); - switch ((ret = MiscExtApply(mouse, MISC_POINTER))) { + if (devname) + xfree(devname); + + switch ((ret)) { case MISC_RET_SUCCESS: break; case MISC_RET_BADVAL: return BadValue; case MISC_RET_BADMSEPROTO: return MISCERR(XF86MiscBadMouseProtocol); @@ -411,6 +485,76 @@ } static int +ProcXF86MiscSetClientVersion(ClientPtr client) +{ + REQUEST(xXF86MiscSetClientVersionReq); + + MiscPrivPtr pPriv; + + DEBUG_P("XF86MiscSetClientVersion"); + + REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); + + if ((pPriv = MPRIV(client)) == NULL) { + pPriv = xalloc(sizeof(MiscPrivRec)); + if (!pPriv) + return BadAlloc; + MPRIV(client) = pPriv; + } + ErrorF("SetClientVersion: %i %i\n",stuff->major,stuff->minor); + pPriv->major = stuff->major; + pPriv->minor = stuff->minor; + + return (client->noClientException); +} + +static int +ProcXF86MiscGetFilePaths(client) + register ClientPtr client; +{ + xXF86MiscGetFilePathsReply rep; + const char *configfile; + const char *modulepath; + const char *logfile; + register int n; + + DEBUG_P("XF86MiscGetFilePaths"); + + REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + + if (!MiscExtGetFilePaths(&configfile, &modulepath, &logfile)) + return BadValue; + + rep.configlen = (configfile? strlen(configfile): 0); + rep.modulelen = (modulepath? strlen(modulepath): 0); + rep.loglen = (logfile? strlen(logfile): 0); + rep.length = (SIZEOF(xXF86MiscGetFilePathsReply) - SIZEOF(xGenericReply) + + ((rep.configlen + 3) & ~3) + + ((rep.modulelen + 3) & ~3) + + ((rep.loglen + 3) & ~3) ) >> 2; + + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.configlen, n); + swaps(&rep.modulelen, n); + swaps(&rep.loglen, n); + } + WriteToClient(client, SIZEOF(xXF86MiscGetFilePathsReply), (char *)&rep); + + if (rep.configlen) + WriteToClient(client, rep.configlen, (char *)configfile); + if (rep.modulelen) + WriteToClient(client, rep.modulelen, (char *)modulepath); + if (rep.loglen) + WriteToClient(client, rep.loglen, (char *)logfile); + + return (client->noClientException); +} + +static int ProcXF86MiscDispatch (client) register ClientPtr client; { @@ -429,6 +573,10 @@ return ProcXF86MiscGetMouseSettings(client); case X_XF86MiscGetKbdSettings: return ProcXF86MiscGetKbdSettings(client); + case X_XF86MiscSetClientVersion: + return ProcXF86MiscSetClientVersion(client); + case X_XF86MiscGetFilePaths: + return ProcXF86MiscGetFilePaths(client); default: if (!xf86GetModInDevEnabled()) return miscErrorBase + XF86MiscModInDevDisabled; @@ -553,6 +701,29 @@ } static int +SProcXF86MiscSetClientVersion(ClientPtr client) +{ + register int n; + REQUEST(xXF86MiscSetClientVersionReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); + swaps(&stuff->major, n); + swaps(&stuff->minor, n); + return ProcXF86MiscSetClientVersion(client); +} + +static int +SProcXF86MiscGetFilePaths(client) + ClientPtr client; +{ + register int n; + REQUEST(xXF86MiscGetFilePathsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); + return ProcXF86MiscGetFilePaths(client); +} + +static int SProcXF86MiscDispatch (client) register ClientPtr client; { @@ -571,6 +742,10 @@ return SProcXF86MiscGetMouseSettings(client); case X_XF86MiscGetKbdSettings: return SProcXF86MiscGetKbdSettings(client); + case X_XF86MiscSetClientVersion: + return SProcXF86MiscSetClientVersion(client); + case X_XF86MiscGetFilePaths: + return SProcXF86MiscGetFilePaths(client); default: if (!xf86GetModInDevEnabled()) return miscErrorBase + XF86MiscModInDevDisabled; Index: xc/programs/Xserver/Xext/xf86miscproc.h diff -u xc/programs/Xserver/Xext/xf86miscproc.h:1.3 xc/programs/Xserver/Xext/xf86miscproc.h:1.5 --- xc/programs/Xserver/Xext/xf86miscproc.h:1.3 Wed Aug 15 12:25:20 2001 +++ xc/programs/Xserver/Xext/xf86miscproc.h Tue Nov 19 23:04:58 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86miscproc.h,v 1.3 2001/08/15 16:25:20 paulo Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86miscproc.h,v 1.5 2002/11/20 04:04:58 dawes Exp $ */ /* Prototypes for Pointer/Keyboard functions that the DDX must provide */ @@ -56,6 +56,9 @@ pointer MiscExtCreateStruct(MiscExtStructType mse_or_kbd); void MiscExtDestroyStruct(pointer structure, MiscExtStructType mse_or_kbd); MiscExtReturn MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd); +Bool MiscExtSetMouseDevice(pointer mouse, char* device); +Bool MiscExtGetFilePaths(const char **configfile, const char **modulepath, + const char **logfile); #endif Index: xc/programs/Xserver/Xext/xf86vmode.c diff -u xc/programs/Xserver/Xext/xf86vmode.c:3.53 xc/programs/Xserver/Xext/xf86vmode.c:3.54 --- xc/programs/Xserver/Xext/xf86vmode.c:3.53 Mon Aug 6 16:51:03 2001 +++ xc/programs/Xserver/Xext/xf86vmode.c Sat Dec 21 19:46:51 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.53 2001/08/06 20:51:03 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.54 2002/12/22 00:46:51 dawes Exp $ */ /* @@ -1625,6 +1625,37 @@ } static int +ProcXF86VidModeGetPermissions(ClientPtr client) +{ + xXF86VidModeGetPermissionsReply rep; + int n; + REQUEST(xXF86VidModeGetPermissionsReq); + + if(stuff->screen >= screenInfo.numScreens) + return BadValue; + + REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.permissions = XF86VM_READ_PERMISSION; + if (xf86GetVidModeEnabled() && + (xf86GetVidModeAllowNonLocal() || LocalClient (client))) { + rep.permissions |= XF86VM_WRITE_PERMISSION; + } + if(client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.permissions, n); + } + WriteToClient(client,sizeof(xXF86VidModeGetPermissionsReply),(char*)&rep); + + return (client->noClientException); +} + + +static int ProcXF86VidModeSetClientVersion(ClientPtr client) { REQUEST(xXF86VidModeSetClientVersionReq); @@ -1657,14 +1688,26 @@ return ProcXF86VidModeQueryVersion(client); case X_XF86VidModeGetModeLine: return ProcXF86VidModeGetModeLine(client); - case X_XF86VidModeGetAllModeLines: - return ProcXF86VidModeGetAllModeLines(client); case X_XF86VidModeGetMonitor: return ProcXF86VidModeGetMonitor(client); + case X_XF86VidModeGetAllModeLines: + return ProcXF86VidModeGetAllModeLines(client); case X_XF86VidModeValidateModeLine: return ProcXF86VidModeValidateModeLine(client); case X_XF86VidModeGetViewPort: return ProcXF86VidModeGetViewPort(client); + case X_XF86VidModeGetDotClocks: + return ProcXF86VidModeGetDotClocks(client); + case X_XF86VidModeSetClientVersion: + return ProcXF86VidModeSetClientVersion(client); + case X_XF86VidModeGetGamma: + return ProcXF86VidModeGetGamma(client); + case X_XF86VidModeGetGammaRamp: + return ProcXF86VidModeGetGammaRamp(client); + case X_XF86VidModeGetGammaRampSize: + return ProcXF86VidModeGetGammaRampSize(client); + case X_XF86VidModeGetPermissions: + return ProcXF86VidModeGetPermissions(client); default: if (!xf86GetVidModeEnabled()) return VidModeErrorBase + XF86VidModeExtensionDisabled; @@ -1684,20 +1727,10 @@ return ProcXF86VidModeLockModeSwitch(client); case X_XF86VidModeSetViewPort: return ProcXF86VidModeSetViewPort(client); - case X_XF86VidModeGetDotClocks: - return ProcXF86VidModeGetDotClocks(client); case X_XF86VidModeSetGamma: return ProcXF86VidModeSetGamma(client); - case X_XF86VidModeGetGamma: - 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); + case X_XF86VidModeSetGammaRamp: + return ProcXF86VidModeSetGammaRamp(client); default: return BadRequest; } @@ -2078,7 +2111,16 @@ return ProcXF86VidModeGetGammaRampSize(client); } - +static int +SProcXF86VidModeGetPermissions(ClientPtr client) +{ + int n; + REQUEST(xXF86VidModeGetPermissionsReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); + swaps(&stuff->screen, n); + return ProcXF86VidModeGetPermissions(client); +} static int @@ -2091,14 +2133,26 @@ return SProcXF86VidModeQueryVersion(client); case X_XF86VidModeGetModeLine: return SProcXF86VidModeGetModeLine(client); - case X_XF86VidModeGetAllModeLines: - return SProcXF86VidModeGetAllModeLines(client); case X_XF86VidModeGetMonitor: return SProcXF86VidModeGetMonitor(client); + case X_XF86VidModeGetAllModeLines: + return SProcXF86VidModeGetAllModeLines(client); case X_XF86VidModeGetViewPort: return SProcXF86VidModeGetViewPort(client); case X_XF86VidModeValidateModeLine: return SProcXF86VidModeValidateModeLine(client); + case X_XF86VidModeGetDotClocks: + return SProcXF86VidModeGetDotClocks(client); + case X_XF86VidModeSetClientVersion: + return SProcXF86VidModeSetClientVersion(client); + case X_XF86VidModeGetGamma: + return SProcXF86VidModeGetGamma(client); + case X_XF86VidModeGetGammaRamp: + return SProcXF86VidModeGetGammaRamp(client); + case X_XF86VidModeGetGammaRampSize: + return SProcXF86VidModeGetGammaRampSize(client); + case X_XF86VidModeGetPermissions: + return SProcXF86VidModeGetPermissions(client); default: if (!xf86GetVidModeEnabled()) return VidModeErrorBase + XF86VidModeExtensionDisabled; @@ -2118,20 +2172,10 @@ return SProcXF86VidModeLockModeSwitch(client); case X_XF86VidModeSetViewPort: return SProcXF86VidModeSetViewPort(client); - case X_XF86VidModeGetDotClocks: - return SProcXF86VidModeGetDotClocks(client); case X_XF86VidModeSetGamma: return SProcXF86VidModeSetGamma(client); - case X_XF86VidModeGetGamma: - 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); + case X_XF86VidModeSetGammaRamp: + return SProcXF86VidModeSetGammaRamp(client); default: return BadRequest; } Index: xc/programs/Xserver/Xext/xres.c diff -u /dev/null xc/programs/Xserver/Xext/xres.c:1.5 --- /dev/null Thu Feb 27 12:29:03 2003 +++ xc/programs/Xserver/Xext/xres.c Sun Jun 30 22:25:55 2002 @@ -0,0 +1,335 @@ +/* + Copyright (c) 2002 XFree86 Inc +*/ +/* $XFree86: xc/programs/Xserver/Xext/xres.c,v 1.5 2002/07/01 02:25:55 tsi Exp $ */ + +#define NEED_EVENTS +#define NEED_REPLIES +#include "X.h" +#include "Xproto.h" +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "swaprep.h" +#include "XResproto.h" +#include "pixmapstr.h" + +extern RESTYPE lastResourceType; +extern RESTYPE TypeMask; +extern Atom *ResourceNames; + +static int +ProcXResQueryVersion (ClientPtr client) +{ + REQUEST(xXResQueryVersionReq); + xXResQueryVersionReply rep; + CARD16 client_major, client_minor; /* not used */ + + REQUEST_SIZE_MATCH (xXResQueryVersionReq); + + client_major = stuff->client_major; + client_minor = stuff->client_minor; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.server_major = XRES_MAJOR_VERSION; + rep.server_minor = XRES_MINOR_VERSION; + if (client->swapped) { + int n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.server_major, n); + swaps(&rep.server_minor, n); + } + WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcXResQueryClients (ClientPtr client) +{ + /* REQUEST(xXResQueryClientsReq); */ + xXResQueryClientsReply rep; + int *current_clients; + int i; + + REQUEST_SIZE_MATCH(xXResQueryClientsReq); + + current_clients = ALLOCATE_LOCAL((currentMaxClients - 1) * sizeof(int)); + + rep.num_clients = 0; + for(i = 1; i < currentMaxClients; i++) { + if(clients[i]) { + current_clients[rep.num_clients] = i; + rep.num_clients++; + } + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = rep.num_clients * sz_xXResClient >> 2; + if (client->swapped) { + int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.num_clients, n); + } + WriteToClient (client, sizeof (xXResQueryClientsReply), (char *) &rep); + + if(rep.num_clients) { + xXResClient scratch; + + for(i = 0; i < rep.num_clients; i++) { + scratch.resource_base = clients[current_clients[i]]->clientAsMask; + scratch.resource_mask = RESOURCE_ID_MASK; + + if(client->swapped) { + register int n; + swapl (&scratch.resource_base, n); + swapl (&scratch.resource_mask, n); + } + WriteToClient (client, sz_xXResClient, (char *) &scratch); + } + } + + DEALLOCATE_LOCAL(current_clients); + + return (client->noClientException); +} + + +static void +ResFindAllRes (pointer value, XID id, RESTYPE type, pointer cdata) +{ + int *counts = (int *)cdata; + + counts[(type & TypeMask) - 1]++; +} + +static int +ProcXResQueryClientResources (ClientPtr client) +{ + REQUEST(xXResQueryClientResourcesReq); + xXResQueryClientResourcesReply rep; + int i, clientID; + int *counts; + + REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq); + + clientID = CLIENT_ID(stuff->xid); + + /* we could remove the (clientID == 0) check if we wanted to allow + probing the X-server's resource usage */ + if(!clientID || (clientID >= currentMaxClients) || !clients[clientID]) { + client->errorValue = stuff->xid; + return BadValue; + } + + counts = ALLOCATE_LOCAL((lastResourceType + 1) * sizeof(int)); + + memset(counts, 0, (lastResourceType + 1) * sizeof(int)); + + FindAllClientResources(clients[clientID], ResFindAllRes, counts); + + rep.num_types = 0; + + for(i = 0; i <= lastResourceType; i++) { + if(counts[i]) rep.num_types++; + } + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = rep.num_types * sz_xXResType >> 2; + if (client->swapped) { + int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.num_types, n); + } + WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep); + + if(rep.num_types) { + xXResType scratch; + + for(i = 0; i < lastResourceType; i++) { + if(!counts[i]) continue; + + if(!ResourceNames[i + 1]) { + char buf[40]; + sprintf(buf, "Unregistered resource %i", i + 1); + RegisterResourceName(i + 1, buf); + } + + scratch.resource_type = ResourceNames[i + 1]; + scratch.count = counts[i]; + + if(client->swapped) { + register int n; + swapl (&scratch.resource_type, n); + swapl (&scratch.count, n); + } + WriteToClient (client, sz_xXResType, (char *) &scratch); + } + } + + DEALLOCATE_LOCAL(counts); + + return (client->noClientException); +} + +static void +ResFindPixmaps (pointer value, XID id, pointer cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + PixmapPtr pix = (PixmapPtr)value; + + *bytes += (pix->devKind * pix->drawable.height); +} + +static int +ProcXResQueryClientPixmapBytes (ClientPtr client) +{ + REQUEST(xXResQueryClientPixmapBytesReq); + xXResQueryClientPixmapBytesReply rep; + int clientID; + unsigned long bytes; + + REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq); + + clientID = CLIENT_ID(stuff->xid); + + /* we could remove the (clientID == 0) check if we wanted to allow + probing the X-server's resource usage */ + if(!clientID || (clientID >= currentMaxClients) || !clients[clientID]) { + client->errorValue = stuff->xid; + return BadValue; + } + + bytes = 0; + + FindClientResourcesByType(clients[clientID], RT_PIXMAP, ResFindPixmaps, + (pointer)(&bytes)); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.length = 0; + rep.bytes = bytes; +#ifdef XSERVER64 + rep.bytes_overflow = bytes >> 32; +#else + rep.bytes_overflow = 0; +#endif + if (client->swapped) { + int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.bytes, n); + swapl (&rep.bytes_overflow, n); + } + WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep); + + return (client->noClientException); +} + + +static void +ResResetProc (ExtensionEntry *extEntry) { } + +static int +ProcResDispatch (ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XResQueryVersion: + return ProcXResQueryVersion(client); + case X_XResQueryClients: + return ProcXResQueryClients(client); + case X_XResQueryClientResources: + return ProcXResQueryClientResources(client); + case X_XResQueryClientPixmapBytes: + return ProcXResQueryClientPixmapBytes(client); + default: break; + } + + return BadRequest; +} + +static int +SProcXResQueryVersion (ClientPtr client) +{ + REQUEST(xXResQueryVersionReq); + int n; + + REQUEST_SIZE_MATCH (xXResQueryVersionReq); + swaps(&stuff->client_major,n); + swaps(&stuff->client_minor,n); + return ProcXResQueryVersion(client); +} + +static int +SProcXResQueryClientResources (ClientPtr client) +{ + REQUEST(xXResQueryClientResourcesReq); + int n; + + REQUEST_SIZE_MATCH (xXResQueryClientResourcesReq); + swaps(&stuff->xid,n); + return ProcXResQueryClientResources(client); +} + +static int +SProcXResQueryClientPixmapBytes (ClientPtr client) +{ + REQUEST(xXResQueryClientPixmapBytesReq); + int n; + + REQUEST_SIZE_MATCH (xXResQueryClientPixmapBytesReq); + swaps(&stuff->xid,n); + return ProcXResQueryClientPixmapBytes(client); +} + +static int +SProcResDispatch (ClientPtr client) +{ + REQUEST(xReq); + int n; + + swaps(&stuff->length,n); + + switch (stuff->data) { + case X_XResQueryVersion: + return SProcXResQueryVersion(client); + case X_XResQueryClients: /* nothing to swap */ + return ProcXResQueryClients(client); + case X_XResQueryClientResources: + return SProcXResQueryClientResources(client); + case X_XResQueryClientPixmapBytes: + return SProcXResQueryClientPixmapBytes(client); + default: break; + } + + return BadRequest; +} + +void +ResExtensionInit(void) +{ + ExtensionEntry *extEntry; + + extEntry = AddExtension(XRES_NAME, 0, 0, + ProcResDispatch, SProcResDispatch, + ResResetProc, StandardMinorOpcode); + + RegisterResourceName(RT_NONE, "NONE"); + RegisterResourceName(RT_WINDOW, "WINDOW"); + RegisterResourceName(RT_PIXMAP, "PIXMAP"); + RegisterResourceName(RT_GC, "GC"); + RegisterResourceName(RT_FONT, "FONT"); + RegisterResourceName(RT_CURSOR, "CURSOR"); + RegisterResourceName(RT_COLORMAP, "COLORMAP"); + RegisterResourceName(RT_CMAPENTRY, "COLORMAP ENTRY"); + RegisterResourceName(RT_OTHERCLIENT, "OTHER CLIENT"); + RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); +} Index: xc/programs/Xserver/Xext/extmod/Imakefile diff -u xc/programs/Xserver/Xext/extmod/Imakefile:1.21 xc/programs/Xserver/Xext/extmod/Imakefile:1.22 --- xc/programs/Xserver/Xext/extmod/Imakefile:1.21 Sun Mar 4 23:51:56 2001 +++ xc/programs/Xserver/Xext/extmod/Imakefile Wed Mar 6 16:12:32 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/Xext/extmod/Imakefile,v 1.21 2001/03/05 04:51:56 mvojkovi Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xext/extmod/Imakefile,v 1.22 2002/03/06 21:12:32 mvojkovi Exp $ XCOMM This directory is only entered if DoLoadableServer is set #define IHaveModules @@ -59,6 +59,12 @@ LinkSourceFile(xvmc.c,..) #endif +#if BuildXResExt + XRESSRCS = xres.c + XRESOBJS = xres.o +LinkSourceFile(xres.c,..) +#endif + #if BuildEVI EVISRCS = EVI.c sampleEVI.c EVIOBJS = EVI.o sampleEVI.o @@ -80,13 +86,13 @@ bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \ $(XF86MISCSRCS) $(XF86DGASRCS) \ $(CUPSRCS) $(DPMSSRCS) $(FONTCACHESRCS) \ - $(EVISRCS) $(XVSRCS) $(MODINITSRCS) + $(EVISRCS) $(XVSRCS) $(MODINITSRCS) $(XRESSRCS) MOBJS = $(MODINITOBJS) shape.o $(MULTIBUFOBJ) mitmisc.o \ bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o \ $(VIDMODEOBJS) $(XF86MISCOBJS) $(XF86DGAOBJS) \ $(CUPOBJS) $(DPMSOBJS) $(FONTCACHEOBJS) \ - $(EVIOBJS) $(XVOBJS) + $(EVIOBJS) $(XVOBJS) $(XRESOBJS) DEFINES = -DEXTMODULE $(EXT_DEFINES) Index: xc/programs/Xserver/Xext/extmod/modinit.c diff -u xc/programs/Xserver/Xext/extmod/modinit.c:1.15 xc/programs/Xserver/Xext/extmod/modinit.c:1.16 --- xc/programs/Xserver/Xext/extmod/modinit.c:1.15 Sun Mar 4 23:51:56 2001 +++ xc/programs/Xserver/Xext/extmod/modinit.c Wed Mar 6 16:12:33 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.c,v 1.15 2001/03/05 04:51:56 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.c,v 1.16 2002/03/06 21:12:33 mvojkovi Exp $ */ /* * @@ -134,6 +134,11 @@ #include "XvMC.h" #endif +#ifdef RES +extern void ResExtensionInit(INITARGS); +#include "XResproto.h" +#endif + /* * Array describing extensions to be initialized */ @@ -283,6 +288,15 @@ { XvMCExtensionInit, XvMCName, + NULL, + NULL, + NULL + }, +#endif +#ifdef RES + { + ResExtensionInit, + XRES_NAME, NULL, NULL, NULL Index: xc/programs/Xserver/Xprint/Imakefile diff -u xc/programs/Xserver/Xprint/Imakefile:1.18 xc/programs/Xserver/Xprint/Imakefile:1.19 --- xc/programs/Xserver/Xprint/Imakefile:1.18 Fri Dec 21 16:02:04 2001 +++ xc/programs/Xserver/Xprint/Imakefile Mon Nov 11 12:55:01 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/Imakefile,v 1.18 2001/12/21 21:02:04 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/Imakefile,v 1.19 2002/11/11 17:55:01 alanh Exp $ #include <Server.tmpl> @@ -82,7 +82,7 @@ #endif INCLUDES = -I$(XINCLUDESRC) -I. -I../mfb -I../mi -I../cfb \ - -I../include -I$(TOP)/include \ + -I../include -I$(TOP)/include -I$(LIBSRC) \ -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(XLIBSRC) LINTLIBS = $(TOP)/server/dix/llib-ldix.ln $(TOP)/server/os/llib-los.ln \ Index: xc/programs/Xserver/Xprint/attributes.c diff -u xc/programs/Xserver/Xprint/attributes.c:1.17 xc/programs/Xserver/Xprint/attributes.c:1.18 --- xc/programs/Xserver/Xprint/attributes.c:1.17 Wed Dec 19 16:55:57 2001 +++ xc/programs/Xserver/Xprint/attributes.c Fri May 31 14:45:53 2002 @@ -44,7 +44,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/attributes.c,v 1.17 2001/12/19 21:55:57 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/attributes.c,v 1.18 2002/05/31 18:45:53 dawes Exp $ */ #include <X11/Xproto.h> #include <string.h> @@ -1207,7 +1207,7 @@ defined(__CYGWIN__) || \ (defined(sun) && !defined(SVR4)) || \ (defined(SVR4) && !defined(sun) && !defined(USL)) || \ - defined(__EMX__) || \ + defined(__UNIXOS2__) || \ defined(ISC) || \ defined(Lynx) || \ defined(__QNX__) || \ Index: xc/programs/Xserver/Xprint/pcl/Imakefile diff -u xc/programs/Xserver/Xprint/pcl/Imakefile:1.7 xc/programs/Xserver/Xprint/pcl/Imakefile:1.8 --- xc/programs/Xserver/Xprint/pcl/Imakefile:1.7 Tue Jul 31 20:44:45 2001 +++ xc/programs/Xserver/Xprint/pcl/Imakefile Mon Nov 11 12:55:02 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/pcl/Imakefile,v 1.7 2001/08/01 00:44:45 tsi Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/pcl/Imakefile,v 1.8 2002/11/11 17:55:02 alanh Exp $ #include <Server.tmpl> @@ -33,7 +33,7 @@ DEFINES = -DPSZ=PixelSize $(PCL_DRIVER) -UXFree86LOADER -D_XP_PRINT_SERVER_ - INCLUDES = -I. -I$(XINCLUDESRC) -I.. \ + INCLUDES = -I. -I$(XINCLUDESRC) -I.. -I$(LIBSRC) \ -I../../include -I$(TOP)/include \ -I$(TOP)/include/extensions -I$(TOP)/include/fonts \ -I../../mi -I../../mfb -I../../cfb Index: xc/programs/Xserver/Xprint/pcl/PclInit.c diff -u xc/programs/Xserver/Xprint/pcl/PclInit.c:1.11 xc/programs/Xserver/Xprint/pcl/PclInit.c:1.12 --- xc/programs/Xserver/Xprint/pcl/PclInit.c:1.11 Fri Dec 21 16:02:05 2001 +++ xc/programs/Xserver/Xprint/pcl/PclInit.c Wed Oct 16 17:13:32 2002 @@ -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.11 2001/12/21 21:02:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclInit.c,v 1.12 2002/10/16 21:13:32 dawes Exp $ */ #include <stdio.h> #include <string.h> @@ -292,7 +292,7 @@ static void AllocatePclPrivates(ScreenPtr pScreen) { - static long PclGeneration = -1; + static unsigned long PclGeneration = 0; if((unsigned long) PclGeneration != serverGeneration) { Index: xc/programs/Xserver/Xprint/ps/Imakefile diff -u xc/programs/Xserver/Xprint/ps/Imakefile:1.8 xc/programs/Xserver/Xprint/ps/Imakefile:1.9 --- xc/programs/Xserver/Xprint/ps/Imakefile:1.8 Fri Dec 21 16:02:05 2001 +++ xc/programs/Xserver/Xprint/ps/Imakefile Mon Nov 11 12:55:02 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/ps/Imakefile,v 1.8 2001/12/21 21:02:05 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/ps/Imakefile,v 1.9 2002/11/11 17:55:02 alanh Exp $ #include <Server.tmpl> @@ -21,7 +21,7 @@ DEFINES = -UXFree86LOADER -DXP_PSTEXT -D_XP_PRINT_SERVER_ -DBM_CACHE - INCLUDES = -I. -I../../cfb -I../../mi -I../../mfb \ + INCLUDES = -I. -I../../cfb -I../../mi -I../../mfb -I$(LIBSRC) \ -I$(XINCLUDESRC) -I../../include -I.. -I$(TOP)/include \ -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(FONTLIBSRC)/include Index: xc/programs/Xserver/Xprint/ps/PsInit.c diff -u xc/programs/Xserver/Xprint/ps/PsInit.c:1.12 xc/programs/Xserver/Xprint/ps/PsInit.c:1.13 --- xc/programs/Xserver/Xprint/ps/PsInit.c:1.12 Fri Dec 14 14:59:16 2001 +++ xc/programs/Xserver/Xprint/ps/PsInit.c Wed Oct 16 17:13:33 2002 @@ -73,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsInit.c,v 1.12 2001/12/14 19:59:16 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsInit.c,v 1.13 2002/10/16 21:13:33 dawes Exp $ */ #include <stdio.h> #include <string.h> @@ -228,7 +228,7 @@ static void AllocatePsPrivates(ScreenPtr pScreen) { - static long PsGeneration = -1; + static unsigned long PsGeneration = 0; if((unsigned long)PsGeneration != serverGeneration) { Index: xc/programs/Xserver/Xprint/raster/Imakefile diff -u xc/programs/Xserver/Xprint/raster/Imakefile:1.6 xc/programs/Xserver/Xprint/raster/Imakefile:1.7 --- xc/programs/Xserver/Xprint/raster/Imakefile:1.6 Tue Jul 31 20:44:46 2001 +++ xc/programs/Xserver/Xprint/raster/Imakefile Mon Nov 11 12:55:02 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/raster/Imakefile,v 1.6 2001/08/01 00:44:46 tsi Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/raster/Imakefile,v 1.7 2002/11/11 17:55:02 alanh Exp $ #include <Server.tmpl> @@ -14,7 +14,7 @@ OBJS = $(OBJS1) - INCLUDES = -I. -I$(XINCLUDESRC) -I.. \ + INCLUDES = -I. -I$(XINCLUDESRC) -I.. -I$(LIBSRC) \ -I../../cfb -I../../mfb -I../../mi \ -I../../include -I$(TOP)/include -I$(FONTINCSRC) Index: xc/programs/Xserver/afb/Imakefile diff -u xc/programs/Xserver/afb/Imakefile:3.6 xc/programs/Xserver/afb/Imakefile:3.7 --- xc/programs/Xserver/afb/Imakefile:3.6 Sat Aug 14 06:49:26 1999 +++ xc/programs/Xserver/afb/Imakefile Fri May 31 14:45:54 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/afb/Imakefile,v 3.6 1999/08/14 10:49:26 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/afb/Imakefile,v 3.7 2002/05/31 18:45:54 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.38 94/03/11 18:47:47 dpw Exp $ #define IHaveModules #include <Server.tmpl> @@ -60,9 +60,7 @@ InstallLibraryModule(afb,$(MODULEDIR),.) -#ifndef OS2Architecture DependTarget() -#endif InstallDriverSDKLibraryModule(afb,$(DRIVERSDKMODULEDIR),.) Index: xc/programs/Xserver/cfb/Imakefile diff -u xc/programs/Xserver/cfb/Imakefile:3.26 xc/programs/Xserver/cfb/Imakefile:3.28 --- xc/programs/Xserver/cfb/Imakefile:3.26 Wed Jan 17 17:36:34 2001 +++ xc/programs/Xserver/cfb/Imakefile Fri May 31 12:12:18 2002 @@ -1,279 +1,6 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ +XCOMM $XFree86: xc/programs/Xserver/cfb/Imakefile,v 3.28 2002/05/31 16:12:18 dawes Exp $ - - -XCOMM $XFree86: xc/programs/Xserver/cfb/Imakefile,v 3.26 2001/01/17 22:36:34 dawes Exp $ - -#define IHaveModules -#include <Server.tmpl> - -#ifndef PixelSize #define PixelSize 8 -#endif - -#if PixelSize == 8 -/* cfb8cppl.c MUST come last to avoid confusing makedepend */ -PSZSRCS = cfb8bit.c cfbteblt8.c cfbglrop8.c cfbpush8.c cfbrctstp8.c -PSZOBJS = cfb8bit.o cfbteblt8.o cfbglrop8.o cfbpush8.o cfbrctstp8.o -#ifdef MipsArchitecture -#ifndef ArcArchitecture -#ifndef Mips64Architecture -STIPPLESRC = stipmips.s stipmipste.s -STIPPLEOBJ = stipmips.o stipmipste.o -STIPPLEDEF = -DHAS_STIPPLE_CODE -#endif -#endif -#endif -#ifdef SparcArchitecture -STIPPLESRC = stipsparc.s stipsparcte.s -STIPPLEOBJ = stipsparc.o stipsparcte.o -STIPPLEDEF = -DHAS_STIPPLE_CODE -#endif -#endif - -#if PixelSize == 32 -#ifdef SparcArchitecture -STIPPLESRC = stipsprc32.s stipsprcte32.s -STIPPLEOBJ = stipsprc32.o stipsprcte32.o -STIPPLEDEF = -DHAS_STIPPLE_CODE -#endif -#endif - -#ifdef XFree86Version -#if DoLoadableServer -XFMODSRC = cfbmodule.c -XFMODOBJ = cfbmodule.o -#endif -#endif - -#if !(DoLoadableServer && defined(LinkDirectory)) -CFBCMAP = cfbcmap.o -#endif - -SRCS = cfbgc.c cfbrrop.c cfbwindow.c \ - cfbpntwin.c cfbmskbits.c cfbpixmap.c cfbbitblt.c \ - cfbfillsp.c cfbsetsp.c cfbscrinit.c cfballpriv.c \ - cfbgetsp.c cfbfillrct.c \ - cfbsolidC.c cfbsolidX.c cfbsolidG.c \ - cfbtileoddC.c cfbtileoddG.c cfbtile32C.c cfbtile32G.c \ - cfbcmap.c cfbzerarcC.c cfbzerarcX.c cfbzerarcG.c \ - cfbfillarcC.c cfbfillarcG.c \ - cfbigblt8.c cfbglblt8.c cfbtegblt.c cfbbstore.c \ - cfbbltC.c cfbbltX.c cfbbltO.c cfbbltG.c \ - cfbpolypnt.c \ - cfbbres.c cfbline.c cfbhrzvert.c cfbbresd.c cfbimage.c cfbseg.c \ - cfb8lineCO.c cfb8lineX.c cfb8lineG.c cfb8lineCP.c \ - cfb8segC.c cfb8segX.c cfb8segG.c cfb8segCS.c \ - cfbply1rctC.c cfbply1rctG.c cfbcppl.c $(PSZSRCS) $(XFMODSRC) - -OBJS = cfbgc.o cfbrrop.o cfbwindow.o \ - cfbgetsp.o cfbfillrct.o \ - cfbsolidC.o cfbsolidX.o cfbsolidG.o \ - cfbtileoddC.o cfbtileoddG.o cfbtile32C.o cfbtile32G.o \ - cfbfillsp.o cfbsetsp.o cfbscrinit.o cfballpriv.o \ - cfbpntwin.o cfbmskbits.o cfbpixmap.o \ - $(CFBCMAP) cfbzerarcC.o cfbzerarcX.o cfbzerarcG.o \ - cfbfillarcC.o cfbfillarcG.o \ - cfbigblt8.o cfbglblt8.o cfbtegblt.o cfbbstore.o \ - cfbpolypnt.o \ - cfbbres.o cfbline.o cfbhrzvert.o cfbbresd.o cfbimage.o cfbseg.o \ - cfb8lineCO.o cfb8lineX.o cfb8lineG.o cfb8lineCP.o \ - cfb8segCS.o cfb8segX.o cfb8segG.o cfb8segC.o \ - cfbbitblt.o cfbbltC.o cfbbltX.o cfbbltO.o cfbbltG.o \ - cfbply1rctC.o cfbply1rctG.o cfbcppl.o $(PSZOBJS) $(STIPPLEOBJ) \ - $(XFMODOBJ) - -#ifdef XFree86Version -PLATFORMDEFS = -DXFREE86 -#endif - -#if BuildLowMem - LMDEFINES = -ULOWMEMFTPT -#endif - - INCLUDES = -I. -I../cfb -I../mfb -I../mi -I../include -I$(XINCLUDESRC) \ - -I$(FONTINCSRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext - LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln \ - ../mfb/llib-lmfb.ln ../mi/llib-lmi.ln - DEFINES = $(LMDEFINES) -DPSZ=PixelSize $(PLATFORMDEFS) - -#if PixelSize == 8 -CFBNAME = cfb -#elif PixelSize == 16 -CFBNAME = cfb16 -#elif PixelSize == 24 -CFBNAME = cfb24 -#elif PixelSize == 32 -CFBNAME = cfb32 -#endif - -ModuleObjectRule() -LibraryModuleTarget($(CFBNAME),$(OBJS)) - -LintLibraryTarget($(CFBNAME),$(SRCS)) - -NormalLintTarget($(SRCS)) - -#ifdef LinkDirectory - -LinkSourceFile(cfb.h,LinkDirectory) -LinkSourceFile(cfbmap.h,LinkDirectory) -LinkSourceFile(cfballpriv.c,LinkDirectory) -LinkSourceFile(cfbbitblt.c,LinkDirectory) -LinkSourceFile(cfbblt.c,LinkDirectory) -LinkSourceFile(cfbbres.c,LinkDirectory) -LinkSourceFile(cfbbresd.c,LinkDirectory) -LinkSourceFile(cfbbstore.c,LinkDirectory) -LinkSourceFile(cfbcmap.c,LinkDirectory) -LinkSourceFile(cfbcppl.c,LinkDirectory) -LinkSourceFile(cfbfillarc.c,LinkDirectory) -LinkSourceFile(cfbfillrct.c,LinkDirectory) -LinkSourceFile(cfbfillsp.c,LinkDirectory) -LinkSourceFile(cfbgc.c,LinkDirectory) -LinkSourceFile(cfbgetsp.c,LinkDirectory) -LinkSourceFile(cfbhrzvert.c,LinkDirectory) -LinkSourceFile(cfbimage.c,LinkDirectory) -LinkSourceFile(cfbline.c,LinkDirectory) -LinkSourceFile(cfb8line.c,LinkDirectory) -LinkSourceFile(cfbmskbits.c,LinkDirectory) -LinkSourceFile(cfbmskbits.h,LinkDirectory) -LinkSourceFile(cfbpixmap.c,LinkDirectory) -LinkSourceFile(cfbply1rct.c,LinkDirectory) -LinkSourceFile(cfbpntwin.c,LinkDirectory) -LinkSourceFile(cfbpolypnt.c,LinkDirectory) -LinkSourceFile(cfbrrop.c,LinkDirectory) -LinkSourceFile(cfbrrop.h,LinkDirectory) -LinkSourceFile(cfbscrinit.c,LinkDirectory) -LinkSourceFile(cfbsetsp.c,LinkDirectory) -LinkSourceFile(cfbsolid.c,LinkDirectory) -LinkSourceFile(cfbigblt8.c,LinkDirectory) -LinkSourceFile(cfbglblt8.c,LinkDirectory) -LinkSourceFile(cfbtegblt.c,LinkDirectory) -LinkSourceFile(cfbtileodd.c,LinkDirectory) -LinkSourceFile(cfbtile32.c,LinkDirectory) -LinkSourceFile(cfbwindow.c,LinkDirectory) -LinkSourceFile(cfbzerarc.c,LinkDirectory) -LinkSourceFile(cfb8bit.h,LinkDirectory) -#if PixelSize == 8 -LinkSourceFile(cfb8bit.c,LinkDirectory) -LinkSourceFile(cfb8cppl.c,LinkDirectory) -LinkSourceFile(cfbpush8.c,LinkDirectory) -LinkSourceFile(cfbrctstp8.c,LinkDirectory) -LinkSourceFile(cfbteblt8.c,LinkDirectory) -#ifdef MipsArchitecture -LinkSourceFile(stipmips.s,LinkDirectory) -#endif -#ifdef SparcArchitecture -LinkSourceFile(stipsparc.s,LinkDirectory) -#endif -#endif -#if PixelSize == 32 -#ifdef SparcArchitecture -LinkSourceFile(stipsprc32.s,LinkDirectory) -#endif -#endif -#endif - -ObjectFromSpecialSource(cfbseg,cfbline,-DPOLYSEGMENT) - -ObjectFromSpecialSource(cfbfillarcC,cfbfillarc,-DRROP=GXcopy) -ObjectFromSpecialSource(cfbfillarcG,cfbfillarc,-DRROP=GXset) - -ObjectFromSpecialSource(cfbzerarcC,cfbzerarc,-DRROP=GXcopy) -ObjectFromSpecialSource(cfbzerarcX,cfbzerarc,-DRROP=GXxor) -ObjectFromSpecialSource(cfbzerarcG,cfbzerarc,-DRROP=GXset) - -ObjectFromSpecialSource(cfbbltC,cfbblt,-DMROP=Mcopy) -ObjectFromSpecialSource(cfbbltX,cfbblt,-DMROP=Mxor) -ObjectFromSpecialSource(cfbbltO,cfbblt,-DMROP=Mor) -ObjectFromSpecialSource(cfbbltG,cfbblt,-DMROP=0) - -ObjectFromSpecialSource(cfbsolidC,cfbsolid,-DRROP=GXcopy) -ObjectFromSpecialSource(cfbsolidX,cfbsolid,-DRROP=GXxor) -ObjectFromSpecialSource(cfbsolidG,cfbsolid,-DRROP=GXset) - -ObjectFromSpecialSource(cfbtileoddC,cfbtileodd,-DMROP=Mcopy) -ObjectFromSpecialSource(cfbtileoddG,cfbtileodd,-DMROP=0) - -ObjectFromSpecialSource(cfbtile32C,cfbtile32,-DMROP=Mcopy) -ObjectFromSpecialSource(cfbtile32G,cfbtile32,-DMROP=0) - -ObjectFromSpecialSource(cfb8lineCO,cfb8line,-DRROP=GXcopy) -ObjectFromSpecialSource(cfb8lineCP,cfb8line,-DRROP=GXcopy -DPREVIOUS) -ObjectFromSpecialSource(cfb8lineX,cfb8line,-DRROP=GXxor) -ObjectFromSpecialSource(cfb8lineG,cfb8line,-DRROP=GXset) - -ObjectFromSpecialSource(cfb8segCS,cfb8line,-DRROP=GXcopy -DPOLYSEGMENT -DWIDTH_SHIFT) -ObjectFromSpecialSource(cfb8segC,cfb8line,-DRROP=GXcopy -DPOLYSEGMENT) -ObjectFromSpecialSource(cfb8segX,cfb8line,-DRROP=GXxor -DPOLYSEGMENT) -ObjectFromSpecialSource(cfb8segG,cfb8line,-DRROP=GXset -DPOLYSEGMENT) - -ObjectFromSpecialSource(cfbply1rctC,cfbply1rct,-DRROP=GXcopy) -ObjectFromSpecialSource(cfbply1rctG,cfbply1rct,-DRROP=GXset) - -SpecialCObjectRule(cfbglblt8,$(_NOOP_),$(STIPPLEDEF)) -SpecialCObjectRule(cfbpixmap,$(ICONFIGFILES),$(_NOOP_)) -SpecialCObjectRule(cfbcmap,$(ICONFIGFILES),$(EXT_DEFINES) $(GLX_DEFINES)) - -#if PixelSize == 8 -ObjectFromSpecialSource(cfbglrop8,cfbglblt8,-DGLYPHROP) - -#ifdef MipsArchitecture -stipmipste.s: stipmips.s - $(RM) $@ - $(LN) stipmips.s stipmipste.s -clean:: - $(RM) stipmipste.s - -stipmipste.o: stipmipste.s - $(AS) -o $@ -DTETEXT stipmipste.s -#endif - -#ifdef SparcArchitecture -stipsparcte.s: stipsparc.s - $(RM) $@ - $(LN) stipsparc.s stipsparcte.s -clean:: - $(RM) stipsparcte.s - -stipsparc.o: stipsparc.s - $(CPP) stipsparc.s AsmDefines | $(AS) -o $@ - - -stipsparcte.o: stipsparcte.s - $(CPP) -DTETEXT stipsparcte.s AsmDefines | $(AS) -o $@ - -#endif -#endif - -#if PixelSize == 32 -#ifdef SparcArchitecture -stipsprcte32.s: stipsprc32.s - $(RM) $@ - $(LN) stipsprc32.s stipsprcte32.s -clean:: - $(RM) stipsprcte32.s - -stipsprc32.o: stipsprc32.s - $(CPP) stipsprc32.s AsmDefines | $(AS) -o $@ - - -stipsprcte32.o: stipsprcte32.s - $(CPP) -DTETEXT stipsprcte32.s AsmDefines | $(AS) -o $@ - -#endif -#endif - -InstallLibraryModule($(CFBNAME),$(MODULEDIR),.) - -#ifndef OS2Architecture -DependTarget() -#endif - -InstallDriverSDKLibraryModule($(CFBNAME),$(DRIVERSDKMODULEDIR),.) +#include "Imakefile.inc" -#if PixelSize == 8 -InstallDriverSDKNonExecFile(cfb.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(cfb16.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(cfb24.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(cfb32.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(cfbmap.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(cfbunmap.h,$(DRIVERSDKINCLUDEDIR)) -#endif Index: xc/programs/Xserver/cfb/Imakefile.inc diff -u /dev/null xc/programs/Xserver/cfb/Imakefile.inc:1.4 --- /dev/null Thu Feb 27 12:29:09 2003 +++ xc/programs/Xserver/cfb/Imakefile.inc Fri Nov 22 17:56:02 2002 @@ -0,0 +1,292 @@ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Xserver/cfb/Imakefile.inc,v 1.4 2002/11/22 22:56:02 tsi Exp $ + +#if DoLoadableServer +#if !BuildModuleInSubdir +#define IHaveModules +#elif !defined(IHaveModules) +#define IHaveSubdirs +SUBDIRS = module +#endif +#endif + +#include <Server.tmpl> + +#ifndef PixelSize +#define PixelSize 8 +#endif + +#if PixelSize == 8 +PSZSRCS = cfb8bit.c cfbteblt8.c cfbglrop8.c cfbpush8.c cfbrctstp8.c +PSZOBJS = cfb8bit.o cfbteblt8.o cfbglrop8.o cfbpush8.o cfbrctstp8.o +#ifdef MipsArchitecture +#ifndef ArcArchitecture +#ifndef Mips64Architecture +STIPPLESRC = stipmips.s stipmipste.s +STIPPLEOBJ = stipmips.o stipmipste.o +STIPPLEDEF = -DHAS_STIPPLE_CODE +#endif +#endif +#endif +#ifdef SparcArchitecture +STIPPLESRC = stipsparc.s stipsparcte.s +STIPPLEOBJ = stipsparc.o stipsparcte.o +STIPPLEDEF = -DHAS_STIPPLE_CODE +#endif +#endif + +#if PixelSize == 32 +#ifdef SparcArchitecture +STIPPLESRC = stipsprc32.s stipsprcte32.s +STIPPLEOBJ = stipsprc32.o stipsprcte32.o +STIPPLEDEF = -DHAS_STIPPLE_CODE +#endif +#endif + +#if defined(IHaveModules) +XFMODSRC = cfbmodule.c +XFMODOBJ = cfbmodule.o +#endif + +#if !(defined(IHaveModules) && defined(LinkDirectory)) +CFBCMAP = cfbcmap.o +#endif + +SRCS = cfbgc.c cfbrrop.c cfbwindow.c \ + cfbpntwin.c cfbmskbits.c cfbpixmap.c cfbbitblt.c \ + cfbfillsp.c cfbsetsp.c cfbscrinit.c cfballpriv.c \ + cfbgetsp.c cfbfillrct.c \ + cfbsolidC.c cfbsolidX.c cfbsolidG.c \ + cfbtileoddC.c cfbtileoddG.c cfbtile32C.c cfbtile32G.c \ + cfbcmap.c cfbzerarcC.c cfbzerarcX.c cfbzerarcG.c \ + cfbfillarcC.c cfbfillarcG.c \ + cfbigblt8.c cfbglblt8.c cfbtegblt.c cfbbstore.c \ + cfbbltC.c cfbbltX.c cfbbltO.c cfbbltG.c \ + cfbpolypnt.c \ + cfbbres.c cfbline.c cfbhrzvert.c cfbbresd.c cfbimage.c cfbseg.c \ + cfb8lineCO.c cfb8lineX.c cfb8lineG.c cfb8lineCP.c \ + cfb8segC.c cfb8segX.c cfb8segG.c cfb8segCS.c \ + cfbply1rctC.c cfbply1rctG.c cfbcppl.c $(PSZSRCS) $(XFMODSRC) + +OBJS = cfbgc.o cfbrrop.o cfbwindow.o \ + cfbgetsp.o cfbfillrct.o \ + cfbsolidC.o cfbsolidX.o cfbsolidG.o \ + cfbtileoddC.o cfbtileoddG.o cfbtile32C.o cfbtile32G.o \ + cfbfillsp.o cfbsetsp.o cfbscrinit.o cfballpriv.o \ + cfbpntwin.o cfbmskbits.o cfbpixmap.o \ + $(CFBCMAP) cfbzerarcC.o cfbzerarcX.o cfbzerarcG.o \ + cfbfillarcC.o cfbfillarcG.o \ + cfbigblt8.o cfbglblt8.o cfbtegblt.o cfbbstore.o \ + cfbpolypnt.o \ + cfbbres.o cfbline.o cfbhrzvert.o cfbbresd.o cfbimage.o cfbseg.o \ + cfb8lineCO.o cfb8lineX.o cfb8lineG.o cfb8lineCP.o \ + cfb8segCS.o cfb8segX.o cfb8segG.o cfb8segC.o \ + cfbbitblt.o cfbbltC.o cfbbltX.o cfbbltO.o cfbbltG.o \ + cfbply1rctC.o cfbply1rctG.o cfbcppl.o $(PSZOBJS) $(STIPPLEOBJ) \ + $(XFMODOBJ) + +#ifdef XFree86Version +PLATFORMDEFS = -DXFREE86 +#endif + +#if BuildLowMem + LMDEFINES = -ULOWMEMFTPT +#endif + + INCLUDES = -I$(SERVERSRC)/cfb -I$(SERVERSRC)/mfb -I$(SERVERSRC)/mi \ + -I$(SERVERSRC)/cfb24 -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(FONTINCSRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext + LINTLIBS = $(SERVERSRC)/dix/llib-ldix.ln $(SERVERSRC)/os/llib-los.ln \ + $(SERVERSRC)/mfb/llib-lmfb.ln $(SERVERSRC)/mi/llib-lmi.ln + DEFINES = $(LMDEFINES) -DPSZ=PixelSize $(PLATFORMDEFS) + +#if PixelSize == 8 +CFBNAME = cfb +#elif PixelSize == 16 +CFBNAME = cfb16 +#elif PixelSize == 24 +CFBNAME = cfb24 +#elif PixelSize == 32 +CFBNAME = cfb32 +#endif + +#ifdef IHaveModules +ModuleObjectRule() +LibraryModuleTarget($(CFBNAME),$(OBJS)) +#else +NormalLibraryObjectRule() +NormalLibraryTarget($(CFBNAME),$(OBJS)) +#endif + +LintLibraryTarget($(CFBNAME),$(SRCS)) + +NormalLintTarget($(SRCS)) + +#ifdef LinkDirectory + +LinkSourceFile(cfballpriv.c,LinkDirectory) +LinkSourceFile(cfbbitblt.c,LinkDirectory) +LinkSourceFile(cfbblt.c,LinkDirectory) +LinkSourceFile(cfbbres.c,LinkDirectory) +LinkSourceFile(cfbbresd.c,LinkDirectory) +LinkSourceFile(cfbbstore.c,LinkDirectory) +LinkSourceFile(cfbcmap.c,LinkDirectory) +LinkSourceFile(cfbcppl.c,LinkDirectory) +LinkSourceFile(cfbfillarc.c,LinkDirectory) +LinkSourceFile(cfbfillrct.c,LinkDirectory) +LinkSourceFile(cfbfillsp.c,LinkDirectory) +LinkSourceFile(cfbgc.c,LinkDirectory) +LinkSourceFile(cfbgetsp.c,LinkDirectory) +LinkSourceFile(cfbhrzvert.c,LinkDirectory) +LinkSourceFile(cfbimage.c,LinkDirectory) +LinkSourceFile(cfbline.c,LinkDirectory) +LinkSourceFile(cfb8line.c,LinkDirectory) +LinkSourceFile(cfbmskbits.c,LinkDirectory) +LinkSourceFile(cfbpixmap.c,LinkDirectory) +LinkSourceFile(cfbply1rct.c,LinkDirectory) +LinkSourceFile(cfbpntwin.c,LinkDirectory) +LinkSourceFile(cfbpolypnt.c,LinkDirectory) +LinkSourceFile(cfbrrop.c,LinkDirectory) +LinkSourceFile(cfbscrinit.c,LinkDirectory) +LinkSourceFile(cfbsetsp.c,LinkDirectory) +LinkSourceFile(cfbsolid.c,LinkDirectory) +LinkSourceFile(cfbigblt8.c,LinkDirectory) +LinkSourceFile(cfbglblt8.c,LinkDirectory) +LinkSourceFile(cfbtegblt.c,LinkDirectory) +LinkSourceFile(cfbtileodd.c,LinkDirectory) +LinkSourceFile(cfbtile32.c,LinkDirectory) +LinkSourceFile(cfbwindow.c,LinkDirectory) +LinkSourceFile(cfbzerarc.c,LinkDirectory) +#if PixelSize == 8 +LinkSourceFile(cfb8bit.c,LinkDirectory) +LinkSourceFile(cfbpush8.c,LinkDirectory) +LinkSourceFile(cfbrctstp8.c,LinkDirectory) +LinkSourceFile(cfbteblt8.c,LinkDirectory) +#ifdef MipsArchitecture +LinkSourceFile(stipmips.s,LinkDirectory) +#endif +#ifdef SparcArchitecture +LinkSourceFile(stipsparc.s,LinkDirectory) +#endif +#endif +#if PixelSize == 32 +#ifdef SparcArchitecture +LinkSourceFile(stipsprc32.s,LinkDirectory) +#endif +#endif +#endif + +#if defined(IHaveModules) && BuildModuleInSubdir +LinkSourceFile(cfbmodule.c,..) +#endif + +ObjectFromSpecialSource(cfbseg,cfbline,-DPOLYSEGMENT) + +ObjectFromSpecialSource(cfbfillarcC,cfbfillarc,-DRROP=GXcopy) +ObjectFromSpecialSource(cfbfillarcG,cfbfillarc,-DRROP=GXset) + +ObjectFromSpecialSource(cfbzerarcC,cfbzerarc,-DRROP=GXcopy) +ObjectFromSpecialSource(cfbzerarcX,cfbzerarc,-DRROP=GXxor) +ObjectFromSpecialSource(cfbzerarcG,cfbzerarc,-DRROP=GXset) + +ObjectFromSpecialSource(cfbbltC,cfbblt,-DMROP=Mcopy) +ObjectFromSpecialSource(cfbbltX,cfbblt,-DMROP=Mxor) +ObjectFromSpecialSource(cfbbltO,cfbblt,-DMROP=Mor) +ObjectFromSpecialSource(cfbbltG,cfbblt,-DMROP=0) + +ObjectFromSpecialSource(cfbsolidC,cfbsolid,-DRROP=GXcopy) +ObjectFromSpecialSource(cfbsolidX,cfbsolid,-DRROP=GXxor) +ObjectFromSpecialSource(cfbsolidG,cfbsolid,-DRROP=GXset) + +ObjectFromSpecialSource(cfbtileoddC,cfbtileodd,-DMROP=Mcopy) +ObjectFromSpecialSource(cfbtileoddG,cfbtileodd,-DMROP=0) + +ObjectFromSpecialSource(cfbtile32C,cfbtile32,-DMROP=Mcopy) +ObjectFromSpecialSource(cfbtile32G,cfbtile32,-DMROP=0) + +ObjectFromSpecialSource(cfb8lineCO,cfb8line,-DRROP=GXcopy) +ObjectFromSpecialSource(cfb8lineCP,cfb8line,-DRROP=GXcopy -DPREVIOUS) +ObjectFromSpecialSource(cfb8lineX,cfb8line,-DRROP=GXxor) +ObjectFromSpecialSource(cfb8lineG,cfb8line,-DRROP=GXset) + +ObjectFromSpecialSource(cfb8segCS,cfb8line,-DRROP=GXcopy -DPOLYSEGMENT -DWIDTH_SHIFT) +ObjectFromSpecialSource(cfb8segC,cfb8line,-DRROP=GXcopy -DPOLYSEGMENT) +ObjectFromSpecialSource(cfb8segX,cfb8line,-DRROP=GXxor -DPOLYSEGMENT) +ObjectFromSpecialSource(cfb8segG,cfb8line,-DRROP=GXset -DPOLYSEGMENT) + +ObjectFromSpecialSource(cfbply1rctC,cfbply1rct,-DRROP=GXcopy) +ObjectFromSpecialSource(cfbply1rctG,cfbply1rct,-DRROP=GXset) + +SpecialCObjectRule(cfbglblt8,$(_NOOP_),$(STIPPLEDEF)) +SpecialCObjectRule(cfbpixmap,$(ICONFIGFILES),$(_NOOP_)) +SpecialCObjectRule(cfbcmap,$(ICONFIGFILES),$(EXT_DEFINES) $(GLX_DEFINES)) + +#if PixelSize == 8 +ObjectFromSpecialSource(cfbglrop8,cfbglblt8,-DGLYPHROP) + +#ifdef MipsArchitecture +stipmipste.s: stipmips.s + $(RM) $@ + $(LN) stipmips.s stipmipste.s +clean:: + $(RM) stipmipste.s + +stipmipste.o: stipmipste.s + $(AS) -o $@ -DTETEXT stipmipste.s +#endif + +#ifdef SparcArchitecture +stipsparcte.s: stipsparc.s + $(RM) $@ + $(LN) stipsparc.s stipsparcte.s +clean:: + $(RM) stipsparcte.s + +stipsparc.o: stipsparc.s + $(CPP) stipsparc.s AsmDefines | $(AS) -o $@ - + +stipsparcte.o: stipsparcte.s + $(CPP) -DTETEXT stipsparcte.s AsmDefines | $(AS) -o $@ - +#endif +#endif + +#if PixelSize == 32 +#ifdef SparcArchitecture +stipsprcte32.s: stipsprc32.s + $(RM) $@ + $(LN) stipsprc32.s stipsprcte32.s +clean:: + $(RM) stipsprcte32.s + +stipsprc32.o: stipsprc32.s + $(CPP) stipsprc32.s AsmDefines | $(AS) -o $@ - + +stipsprcte32.o: stipsprcte32.s + $(CPP) -DTETEXT stipsprcte32.s AsmDefines | $(AS) -o $@ - +#endif +#endif + +#ifdef IHaveModules +InstallLibraryModule($(CFBNAME),$(MODULEDIR),.) +#endif + +DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + +InstallDriverSDKLibraryModule($(CFBNAME),$(DRIVERSDKMODULEDIR),.) + +#if PixelSize == 8 +InstallDriverSDKNonExecFile(cfb.h,$(DRIVERSDKINCLUDEDIR)) +InstallDriverSDKNonExecFile(cfb16.h,$(DRIVERSDKINCLUDEDIR)) +InstallDriverSDKNonExecFile(cfb24.h,$(DRIVERSDKINCLUDEDIR)) +InstallDriverSDKNonExecFile(cfb32.h,$(DRIVERSDKINCLUDEDIR)) +InstallDriverSDKNonExecFile(cfbmap.h,$(DRIVERSDKINCLUDEDIR)) +InstallDriverSDKNonExecFile(cfbunmap.h,$(DRIVERSDKINCLUDEDIR)) +#endif Index: xc/programs/Xserver/cfb/cfb8line.c diff -u xc/programs/Xserver/cfb/cfb8line.c:3.17 xc/programs/Xserver/cfb/cfb8line.c:3.18 --- xc/programs/Xserver/cfb/cfb8line.c:3.17 Fri Dec 14 14:59:20 2001 +++ xc/programs/Xserver/cfb/cfb8line.c Wed Sep 18 13:11:47 2002 @@ -25,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium * - * $XFree86: xc/programs/Xserver/cfb/cfb8line.c,v 3.17 2001/12/14 19:59:20 dawes Exp $ + * $XFree86: xc/programs/Xserver/cfb/cfb8line.c,v 3.18 2002/09/18 17:11:47 tsi Exp $ * Jeff Anton'x fixes: cfb8line.c 97/02/07 */ @@ -733,16 +733,19 @@ *addrp = piQxelXor[2]; break; case 1: - *addrp++ = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); - *addrp++ = piQxelXor[1]; - *addrp = piQxelXor[2]; + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; + *addrp = piQxelXor[1]; + addrp++; + *addrp = piQxelXor[2]; break; case 2: - *addrp++ =((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + *addrp = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrp++; *addrp = piQxelXor[2]; break; case 3: - *addrp =((*addrp) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + *addrp = ((*addrp) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); break; } break; @@ -754,12 +757,15 @@ *addrp = ((*addrp) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); break; case 1: - *addrp++ = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); - *addrp++ = piQxelXor[1]; + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; + *addrp = piQxelXor[1]; + addrp++; *addrp = ((*addrp) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); break; case 2: - *addrp++ =((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + *addrp = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrp++; *addrp = ((*addrp) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); break; } @@ -768,12 +774,14 @@ switch(leftIndex){ /* case 2: - *addrp++ = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + *addrp = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrp++; *addrp = ((*addrp) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); break; */ case 1: - *addrp++ = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; *addrp = ((*addrp) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); break; case 0: @@ -788,7 +796,8 @@ } /* else{ - *addrp++ = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; *addrp = ((*addrp) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); } */ @@ -804,16 +813,22 @@ case 0: break; case 1: - *addrp++ = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); - *addrp++ = piQxelXor[1]; - *addrp++ = piQxelXor[2]; + *addrp = ((*addrp) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrp++; + *addrp = piQxelXor[1]; + addrp++; + *addrp = piQxelXor[2]; + addrp++; break; case 2: - *addrp++ = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); - *addrp++ = piQxelXor[2]; + *addrp = ((*addrp) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrp++; + *addrp = piQxelXor[2]; + addrp++; break; case 3: - *addrp++ = ((*addrp) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + *addrp = ((*addrp) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + addrp++; break; } while(nlmiddle--){ @@ -846,20 +861,23 @@ | (piQxelXor[0] & 0xFFFFFF & e3); break; case 1: - *addrp++ = ((*addrp) & (0xFFFFFF | ~(e3<<24))) - | (piQxelXor[0] & 0xFF000000 & (e3<<24)); + *addrp = ((*addrp) & (0xFFFFFF | ~(e3<<24))) + + (piQxelXor[0] & 0xFF000000 & (e3<<24)); + addrp++; *addrp = ((*addrp) & (0xFFFF0000|~(e3 >> 8))) | (piQxelXor[1] & 0xFFFF & (e3 >> 8)); break; case 2: - *addrp++ = ((*addrp) & (0xFFFF|~(e3 << 16))) + *addrp = ((*addrp) & (0xFFFF|~(e3 << 16))) | (piQxelXor[1] & 0xFFFF0000 & (e3 << 16)); + addrp++; *addrp = ((*addrp) & (0xFFFFFF00|~(e3>>16))) | (piQxelXor[2] & 0xFF & (e3 >> 16)); break; case 3: - *addrp++ = ((*addrp) & (0xFF|~(e3<<8))) + *addrp = ((*addrp) & (0xFF|~(e3<<8))) | (piQxelXor[2] & 0xFFFFFF00 & (e3<<8)); + addrp++; break; } } Index: xc/programs/Xserver/cfb/cfbhrzvert.c diff -u xc/programs/Xserver/cfb/cfbhrzvert.c:3.7 xc/programs/Xserver/cfb/cfbhrzvert.c:3.8 --- xc/programs/Xserver/cfb/cfbhrzvert.c:3.7 Fri Dec 14 14:59:23 2001 +++ xc/programs/Xserver/cfb/cfbhrzvert.c Mon Sep 16 14:05:30 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbhrzvert.c,v 3.7 2001/12/14 19:59:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbhrzvert.c,v 3.8 2002/09/16 18:05:30 eich Exp $ */ /*********************************************************** Copyright 1987,1998 The Open Group @@ -104,18 +104,23 @@ case 4: switch(leftIndex){ case 0: - *addrl++ = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); - *addrl++ = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); - *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); break; case 1: - *addrl++ = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); - *addrl++ = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); - *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); break; case 2: - *addrl++ = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF0000); - *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); break; case 3: *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); @@ -125,27 +130,34 @@ case 3: switch(leftIndex){ case 0: - *addrl++ = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); - *addrl++ = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFF); break; case 1: - *addrl++ = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); - *addrl++ = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFF); break; case 2: - *addrl++ = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + addrl++; *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFF); break; } break; case 2: if(leftIndex){ - *addrl++ = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); + addrl++; } else{ - *addrl++ = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; } *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF); break; @@ -161,16 +173,19 @@ case 0: break; case 1: - *addrl++ = ((*addrl) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + *addrl = ((*addrl) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + addrl++; *addrl++ = piQxelXor[1]; *addrl++ = piQxelXor[2]; break; case 2: - *addrl++ = ((*addrl) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + *addrl = ((*addrl) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + addrl++; *addrl++ = piQxelXor[2]; break; case 3: - *addrl++ = ((*addrl) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + *addrl = ((*addrl) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + addrl++; break; } while(nlmiddle--){ @@ -240,36 +255,49 @@ case 0: break; case 1: - *addrl++ = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); - *addrl++ = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); - *addrl++ = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFF000000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + addrl++; break; case 2: - *addrl++ = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF0000); - *addrl++ = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF0000); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + addrl++; break; case 3: - *addrl++ = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); + *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFFFFFF00); + addrl++; break; } while(nlmiddle--){ - *addrl++ = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); - *addrl++ = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); - *addrl++ = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[2], piQxelXor[2]); + addrl++; } switch(rightIndex){ case 0: break; case 1: - *addrl++ = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFFFFFF); + *addrl = DoMaskRRop (*addrl, piQxelAnd[0], piQxelXor[0], 0xFFFFFF); + addrl++; break; case 2: - *addrl++ = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; *addrl = DoMaskRRop (*addrl, piQxelAnd[1], piQxelXor[1], 0xFFFF); break; case 3: - *addrl++ = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); - *addrl++ = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + *addrl = DoRRop (*addrl, piQxelAnd[0], piQxelXor[0]); + addrl++; + *addrl = DoRRop (*addrl, piQxelAnd[1], piQxelXor[1]); + addrl++; *addrl = DoMaskRRop (*addrl, piQxelAnd[2], piQxelXor[2], 0xFF); break; } Index: xc/programs/Xserver/cfb/cfbpntwin.c diff -u xc/programs/Xserver/cfb/cfbpntwin.c:3.6 xc/programs/Xserver/cfb/cfbpntwin.c:3.7 --- xc/programs/Xserver/cfb/cfbpntwin.c:3.6 Fri Dec 14 14:59:24 2001 +++ xc/programs/Xserver/cfb/cfbpntwin.c Mon Sep 16 14:05:31 2002 @@ -45,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbpntwin.c,v 3.6 2001/12/14 19:59:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbpntwin.c,v 3.7 2002/09/16 18:05:31 eich Exp $ */ #include "X.h" @@ -293,7 +293,8 @@ break; case 1: while(h--){ - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; *pdst++ = piQxelArray[1]; *pdst = piQxelArray[2]; pdst -=2; @@ -302,7 +303,8 @@ break; case 2: while(h--){ - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; *pdst-- = piQxelArray[2]; pdst += widthDst; } @@ -321,24 +323,29 @@ while(h--){ *pdst++ = piQxelArray[0]; *pdst++ = piQxelArray[1]; - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; pdst--; pdst += widthDst; } break; case 1: while(h--){ - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; *pdst++ = piQxelArray[1]; - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); pdst--; + pdst--; pdst += widthDst; } break; case 2: while(h--){ - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; pdst += widthDst; } break; @@ -347,12 +354,14 @@ case 2: while(h--){ if(leftIndex){ - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; } else{ *pdst++ = piQxelArray[0]; } - *pdst-- = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); + pdst--; pdst += widthDst; } break; @@ -376,16 +385,19 @@ case 0: break; case 1: - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; *pdst++ = piQxelArray[1]; *pdst++ = piQxelArray[2]; break; case 2: - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; *pdst++ = piQxelArray[2]; break; case 3: - *pdst++ = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); + *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); + pdst++; break; } while(nmiddle--){ @@ -544,7 +556,8 @@ case 1: while(h--){ StepTile - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; *pdst++ = piQxelArray[1]; *pdst = piQxelArray[2]; pdst-=2; @@ -554,7 +567,8 @@ case 2: while(h--){ StepTile - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; *pdst-- = piQxelArray[2]; pdst += widthDst; } @@ -575,7 +589,8 @@ StepTile *pdst++ = piQxelArray[0]; *pdst++ = piQxelArray[1]; - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; pdst--; pdst += widthDst; } @@ -583,18 +598,22 @@ case 1: while(h--){ StepTile - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; *pdst++ = piQxelArray[1]; - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); pdst--; + pdst--; pdst += widthDst; } break; case 2: while(h--){ StepTile - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelArray[2] & 0xFF); + pdst--; pdst += widthDst; } break; @@ -604,12 +623,14 @@ while(h--){ StepTile if(leftIndex){ - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; } else{ *pdst++ = piQxelArray[0]; } - *pdst-- = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelArray[1] & 0xFFFF); + pdst--; pdst += widthDst; } break; @@ -635,16 +656,19 @@ case 0: break; case 1: - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelArray[0] & 0xFF000000); + pdst++; *pdst++ = piQxelArray[1]; *pdst++ = piQxelArray[2]; break; case 2: - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + *pdst = ((*pdst) & 0xFFFF) | (piQxelArray[1] & 0xFFFF0000); + pdst++; *pdst++ = piQxelArray[2]; break; case 3: - *pdst++ = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); + *pdst = ((*pdst) & 0xFF) | (piQxelArray[2] & 0xFFFFFF00); + pdst++; break; } while(nmiddle--){ Index: xc/programs/Xserver/cfb/cfbsolid.c diff -u xc/programs/Xserver/cfb/cfbsolid.c:3.7 xc/programs/Xserver/cfb/cfbsolid.c:3.8 --- xc/programs/Xserver/cfb/cfbsolid.c:3.7 Fri Dec 14 14:59:25 2001 +++ xc/programs/Xserver/cfb/cfbsolid.c Mon Sep 16 14:05:31 2002 @@ -25,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbsolid.c,v 3.7 2001/12/14 19:59:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbsolid.c,v 3.8 2002/09/16 18:05:31 eich Exp $ */ #include "X.h" @@ -210,7 +210,8 @@ case 1: while(h--){ #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; *pdst++ = piQxelXor[1]; *pdst-- = piQxelXor[2]; #endif @@ -244,7 +245,8 @@ case 2: while(h--){ #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; *pdst-- = piQxelXor[2]; #endif #if RROP == GXxor @@ -297,7 +299,8 @@ #if RROP == GXcopy *pdst++ = piQxelXor[0]; *pdst++ = piQxelXor[1]; - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= piQxelXor[0]; @@ -329,9 +332,11 @@ case 1: while(h--){ #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; *pdst++ = piQxelXor[1]; - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[0] & 0xFF000000); @@ -363,8 +368,10 @@ case 2: while(h--){ #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[1] & 0xFFFF0000); @@ -414,8 +421,10 @@ case 2: while(h--){ #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[1] & 0xFFFF0000); @@ -441,8 +450,10 @@ case 1: while(h--){ #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); - *pdst-- = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[0] & 0xFF000000); @@ -469,7 +480,8 @@ while(h--){ #if RROP == GXcopy *pdst++ = piQxelXor[0]; - *pdst-- = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= piQxelXor[0]; @@ -525,7 +537,8 @@ break; case 1: #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; *pdst++ = piQxelXor[1]; *pdst++ = piQxelXor[2]; #endif @@ -555,7 +568,8 @@ break; case 2: #if RROP == GXcopy - *pdst++ = (((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000)); + *pdst = (((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000)); + pdst++; *pdst++ = piQxelXor[2]; #endif #if RROP == GXxor @@ -579,7 +593,8 @@ break; case 3: #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + *pdst = ((*pdst) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + pdst++; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[2] & 0xFFFFFF00); @@ -632,7 +647,8 @@ break; case 1: #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); + *pdst = ((*pdst) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); + pdst++; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[0] & 0xFFFFFF); @@ -644,13 +660,15 @@ *pdst++ |= (piQxelOr[0] & 0xFFFFFF); #endif #if RROP == GXset - *pdst++ = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFFFFFF); + *pdst = DoMaskRRop((*pdst), piQxelAnd[0], piQxelXor[0], 0xFFFFFF); + pdst++; #endif break; case 2: #if RROP == GXcopy *pdst++ = piQxelXor[0]; - *pdst++ = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst++; #endif #if RROP == GXxor *pdst++ ^= piQxelXor[0]; @@ -675,7 +693,8 @@ #if RROP == GXcopy *pdst++ = piQxelXor[0]; *pdst++ = piQxelXor[1]; - *pdst++ = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst++; #endif #if RROP == GXxor *pdst++ ^= piQxelXor[0]; @@ -864,7 +883,8 @@ break; case 1: #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; *pdst++ = piQxelXor[1]; *pdst-- = piQxelXor[2]; #endif @@ -895,7 +915,8 @@ break; case 2: #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; *pdst-- = piQxelXor[2]; #endif #if RROP == GXxor @@ -942,7 +963,8 @@ #if RROP == GXcopy *pdst++ = piQxelXor[0]; *pdst++ = piQxelXor[1]; - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= piQxelXor[0]; @@ -972,9 +994,11 @@ break; case 1: #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; *pdst++ = piQxelXor[1]; - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[0] & 0xFF000000); @@ -1004,8 +1028,10 @@ case 2: /* pdst++;*/ #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); - *pdst-- = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000); + pdst++; + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[1] & 0xFFFF0000); @@ -1031,8 +1057,10 @@ case 2: /* leftIndex + w = 2*/ if(leftIndex){ #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); - *pdst-- = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[0] & 0xFF000000); @@ -1056,7 +1084,8 @@ else{ /*case 2 leftIndex === 0 */ #if RROP == GXcopy *pdst++ = piQxelXor[0]; - *pdst-- = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst--; #endif #if RROP == GXxor *pdst++ ^= piQxelXor[0]; @@ -1104,7 +1133,8 @@ break; case 1: #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + *pdst = ((*pdst) & 0xFFFFFF) | (piQxelXor[0] & 0xFF000000); + pdst++; *pdst++ = piQxelXor[1]; *pdst++ = piQxelXor[2]; #endif @@ -1134,7 +1164,8 @@ break; case 2: #if RROP == GXcopy - *pdst++ = (((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000)); + *pdst = (((*pdst) & 0xFFFF) | (piQxelXor[1] & 0xFFFF0000)); + pdst++; *pdst++ = piQxelXor[2]; #endif #if RROP == GXxor @@ -1158,7 +1189,8 @@ break; case 3: #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + *pdst = ((*pdst) & 0xFF) | (piQxelXor[2] & 0xFFFFFF00); + pdst++; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[2] & 0xFFFFFF00); @@ -1210,7 +1242,8 @@ break; case 1: #if RROP == GXcopy - *pdst++ = ((*pdst) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); + *pdst = ((*pdst) & 0xFF000000) | (piQxelXor[0] & 0xFFFFFF); + pdst++; #endif #if RROP == GXxor *pdst++ ^= (piQxelXor[0] & 0xFFFFFF); @@ -1228,7 +1261,8 @@ case 2: #if RROP == GXcopy *pdst++ = piQxelXor[0]; - *pdst++ = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + *pdst = ((*pdst) & 0xFFFF0000) | (piQxelXor[1] & 0xFFFF); + pdst++; #endif #if RROP == GXxor *pdst++ ^= piQxelXor[0]; @@ -1253,7 +1287,8 @@ #if RROP == GXcopy *pdst++ = piQxelXor[0]; *pdst++ = piQxelXor[1]; - *pdst++ = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + *pdst = ((*pdst) & 0xFFFFFF00) | (piQxelXor[2] & 0xFF); + pdst++; #endif #if RROP == GXxor *pdst++ ^= piQxelXor[0]; Index: xc/programs/Xserver/cfb/module/Imakefile diff -u /dev/null xc/programs/Xserver/cfb/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:29:10 2003 +++ xc/programs/Xserver/cfb/module/Imakefile Fri May 31 11:12:56 2002 @@ -0,0 +1,8 @@ +XCOMM $XFree86: xc/programs/Xserver/cfb/module/Imakefile,v 1.1 2002/05/31 15:12:56 dawes Exp $ + +#define IHaveModules + +#define PixelSize 8 +#define LinkDirectory .. + +#include "../Imakefile.inc" Index: xc/programs/Xserver/cfb16/Imakefile diff -u xc/programs/Xserver/cfb16/Imakefile:1.1.1.2 xc/programs/Xserver/cfb16/Imakefile:1.3 --- xc/programs/Xserver/cfb16/Imakefile:1.1.1.2 Tue Jan 16 17:42:30 2001 +++ xc/programs/Xserver/cfb16/Imakefile Fri May 31 12:12:19 2002 @@ -1,5 +1,10 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Xserver/cfb16/Imakefile,v 1.3 2002/05/31 16:12:19 dawes Exp $ + #define PixelSize 16 #define LinkDirectory ../cfb -#include "../cfb/Imakefile" +#include "../cfb/Imakefile.inc" Index: xc/programs/Xserver/cfb16/module/Imakefile diff -u /dev/null xc/programs/Xserver/cfb16/module/Imakefile:1.2 --- /dev/null Thu Feb 27 12:29:11 2003 +++ xc/programs/Xserver/cfb16/module/Imakefile Sun Jun 30 22:25:56 2002 @@ -0,0 +1,12 @@ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Xserver/cfb16/module/Imakefile,v 1.2 2002/07/01 02:25:56 tsi Exp $ + +#define IHaveModules + +#define PixelSize 16 +#define LinkDirectory ../../cfb + +#include "../../cfb/Imakefile.inc" Index: xc/programs/Xserver/cfb24/Imakefile diff -u xc/programs/Xserver/cfb24/Imakefile:3.0 xc/programs/Xserver/cfb24/Imakefile:3.2 --- xc/programs/Xserver/cfb24/Imakefile:3.0 Sat Jun 29 05:06:07 1996 +++ xc/programs/Xserver/cfb24/Imakefile Fri May 31 12:12:19 2002 @@ -1,5 +1,6 @@ -XCOMM $XFree86: xc/programs/Xserver/cfb24/Imakefile,v 3.0 1996/06/29 09:06:07 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/cfb24/Imakefile,v 3.2 2002/05/31 16:12:19 dawes Exp $ + #define PixelSize 24 #define LinkDirectory ../cfb -#include "../cfb/Imakefile" +#include "../cfb/Imakefile.inc" Index: xc/programs/Xserver/cfb24/module/Imakefile diff -u /dev/null xc/programs/Xserver/cfb24/module/Imakefile:1.2 --- /dev/null Thu Feb 27 12:29:11 2003 +++ xc/programs/Xserver/cfb24/module/Imakefile Sun Jun 30 22:25:57 2002 @@ -0,0 +1,12 @@ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Xserver/cfb24/module/Imakefile,v 1.2 2002/07/01 02:25:57 tsi Exp $ + +#define IHaveModules + +#define PixelSize 24 +#define LinkDirectory ../../cfb + +#include "../../cfb/Imakefile.inc" Index: xc/programs/Xserver/cfb32/Imakefile diff -u xc/programs/Xserver/cfb32/Imakefile:1.1.1.2 xc/programs/Xserver/cfb32/Imakefile:1.3 --- xc/programs/Xserver/cfb32/Imakefile:1.1.1.2 Tue Jan 16 17:42:30 2001 +++ xc/programs/Xserver/cfb32/Imakefile Fri May 31 12:12:19 2002 @@ -1,5 +1,10 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Xserver/cfb32/Imakefile,v 1.3 2002/05/31 16:12:19 dawes Exp $ + #define PixelSize 32 #define LinkDirectory ../cfb -#include "../cfb/Imakefile" +#include "../cfb/Imakefile.inc" Index: xc/programs/Xserver/cfb32/module/Imakefile diff -u /dev/null xc/programs/Xserver/cfb32/module/Imakefile:1.2 --- /dev/null Thu Feb 27 12:29:11 2003 +++ xc/programs/Xserver/cfb32/module/Imakefile Sun Jun 30 22:25:57 2002 @@ -0,0 +1,12 @@ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ + + + +XCOMM $XFree86: xc/programs/Xserver/cfb32/module/Imakefile,v 1.2 2002/07/01 02:25:57 tsi Exp $ + +#define IHaveModules + +#define PixelSize 32 +#define LinkDirectory ../../cfb + +#include "../../cfb/Imakefile.inc" Index: xc/programs/Xserver/dix/Imakefile diff -u xc/programs/Xserver/dix/Imakefile:3.14 xc/programs/Xserver/dix/Imakefile:3.15 --- xc/programs/Xserver/dix/Imakefile:3.14 Tue Jul 31 20:44:47 2001 +++ xc/programs/Xserver/dix/Imakefile Thu Nov 14 16:01:20 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.14 2001/08/01 00:44:47 tsi Exp $ +XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.15 2002/11/14 21:01:20 tsi Exp $ #include <Server.tmpl> @@ -71,8 +71,10 @@ K5DEFS = Krb5Defines #endif +#ifdef DarwinArchitecture #if DarwinQuartzSupport QUARTZ_DEFINES = -DDARWIN_WITH_QUARTZ +#endif #endif SITE_DEFINES = $(SITE_FONT_PATH) $(SITE_RGB_DB) $(SITE_DISPLAY_CLASS) Index: xc/programs/Xserver/dix/atom.c diff -u xc/programs/Xserver/dix/atom.c:3.3 xc/programs/Xserver/dix/atom.c:3.4 --- xc/programs/Xserver/dix/atom.c:3.3 Fri Dec 14 14:59:29 2001 +++ xc/programs/Xserver/dix/atom.c Tue Feb 19 06:09:21 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/atom.c,v 3.3 2001/12/14 19:59:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/atom.c,v 3.4 2002/02/19 11:09:21 alanh Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -68,6 +68,8 @@ static unsigned long tableLength; static NodePtr *nodeTable; +void FreeAtom(NodePtr patom); + Atom MakeAtom(string, len, makeit) char *string; @@ -172,8 +174,7 @@ } void -FreeAtom(patom) - NodePtr patom; +FreeAtom(NodePtr patom) { if(patom->left) FreeAtom(patom->left); Index: xc/programs/Xserver/dix/colormap.c diff -u xc/programs/Xserver/dix/colormap.c:3.8 xc/programs/Xserver/dix/colormap.c:3.10 --- xc/programs/Xserver/dix/colormap.c:3.8 Fri Dec 14 14:59:29 2001 +++ xc/programs/Xserver/dix/colormap.c Sat Apr 13 20:45:54 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.8 2001/12/14 19:59:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.10 2002/04/14 00:45:54 mvojkovi Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -63,6 +63,7 @@ #endif extern XID clientErrorValue; +extern int colormapPrivateCount; static Pixel FindBestPixel( #if NeedFunctionPrototypes @@ -284,7 +285,6 @@ register EntryPtr pent; int i; register Pixel *ppix, **pptr; - extern int colormapPrivateCount; class = pVisual->class; if(!(class & DynamicClass) && (alloc != AllocNone) && (client != SERVER_ID)) @@ -504,10 +504,6 @@ { xEvent xE; -#ifdef PANORAMIX - if(!noPanoramiXExtension && pwin->drawable.pScreen->myNum) - return WT_STOPWALKING; -#endif if (wColormap(pwin) == *pmid) { /* This should be call to DeliverEvent */ @@ -516,7 +512,10 @@ xE.u.colormap.colormap = None; xE.u.colormap.new = TRUE; xE.u.colormap.state = ColormapUninstalled; - DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); +#ifdef PANORAMIX + if(noPanoramiXExtension || !pwin->drawable.pScreen->myNum) +#endif + DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); if (pwin->optional) { pwin->optional->colormap = None; CheckWindowOptionalNeed (pwin); Index: xc/programs/Xserver/dix/cursor.c diff -u xc/programs/Xserver/dix/cursor.c:3.5 xc/programs/Xserver/dix/cursor.c:3.8 --- xc/programs/Xserver/dix/cursor.c:3.5 Fri Dec 14 14:59:30 2001 +++ xc/programs/Xserver/dix/cursor.c Sat Jan 11 21:44:26 2003 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/cursor.c,v 3.5 2001/12/14 19:59:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/cursor.c,v 3.8 2003/01/12 02:44:26 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -80,6 +80,9 @@ return; xfree(bits->source); xfree(bits->mask); +#ifdef ARGB_CURSOR + xfree(bits->argb); +#endif if (bits->refcnt == 0) { register GlyphSharePtr *prev, this; @@ -138,6 +141,15 @@ bits->emptyMask = FALSE; while(n--) if(*(msk++) != 0) return; +#ifdef ARGB_CURSOR + if (bits->argb) + { + CARD32 *argb = bits->argb; + int n = bits->width * bits->height; + while (n--) + if (*argb++ & 0xff000000) return; + } +#endif bits->emptyMask = TRUE; } @@ -146,10 +158,11 @@ * does not copy the src and mask bits */ CursorPtr -AllocCursor(psrcbits, pmaskbits, cm, +AllocCursorARGB(psrcbits, pmaskbits, argb, cm, foreRed, foreGreen, foreBlue, backRed, backGreen, backBlue) unsigned char * psrcbits; /* server-defined padding */ unsigned char * pmaskbits; /* server-defined padding */ + CARD32 * argb; /* no padding */ CursorMetricPtr cm; unsigned foreRed, foreGreen, foreBlue; unsigned backRed, backGreen, backBlue; @@ -169,6 +182,9 @@ bits = (CursorBitsPtr)((char *)pCurs + sizeof(CursorRec)); bits->source = psrcbits; bits->mask = pmaskbits; +#ifdef ARGB_CURSOR + bits->argb = argb; +#endif bits->width = cm->width; bits->height = cm->height; bits->xhot = cm->xhot; @@ -208,6 +224,20 @@ return pCurs; } +CursorPtr +AllocCursor(psrcbits, pmaskbits, cm, + foreRed, foreGreen, foreBlue, backRed, backGreen, backBlue) + unsigned char * psrcbits; /* server-defined padding */ + unsigned char * pmaskbits; /* server-defined padding */ + CursorMetricPtr cm; + unsigned foreRed, foreGreen, foreBlue; + unsigned backRed, backGreen, backBlue; +{ + return AllocCursorARGB (psrcbits, pmaskbits, (CARD32 *) 0, cm, + foreRed, foreGreen, foreBlue, + backRed, backGreen, backBlue); +} + int AllocGlyphCursor(source, sourceChar, mask, maskChar, foreRed, foreGreen, foreBlue, backRed, backGreen, backBlue, @@ -324,6 +354,9 @@ } bits->source = srcbits; bits->mask = mskbits; +#ifdef ARGB_CURSOR + bits->argb = 0; +#endif bits->width = cm.width; bits->height = cm.height; bits->xhot = cm.xhot; Index: xc/programs/Xserver/dix/dispatch.c diff -u xc/programs/Xserver/dix/dispatch.c:3.26 xc/programs/Xserver/dix/dispatch.c:3.29 --- xc/programs/Xserver/dix/dispatch.c:3.26 Fri Dec 14 14:59:30 2001 +++ xc/programs/Xserver/dix/dispatch.c Sat Jan 11 21:44:26 2003 @@ -68,7 +68,7 @@ * * *****************************************************************/ -/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.26 2001/12/14 19:59:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.29 2003/01/12 02:44:26 dawes Exp $ */ #ifdef PANORAMIX_DEBUG #include <stdio.h> @@ -91,7 +91,6 @@ #include "dispatch.h" #include "swaprep.h" #include "swapreq.h" -#include "dixevents.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" @@ -120,16 +119,8 @@ #define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) #define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) -extern WindowPtr *WindowTable; extern xConnSetupPrefix connSetupPrefix; extern char *ConnectionInfo; -extern void ReleaseActiveGrabs(); -extern void NotImplemented(); -extern void SwapConnClientPrefix( -#if NeedFunctionPrototypes - xConnClientPrefix * -#endif -); Selection *CurrentSelections; int NumCurrentSelections; @@ -144,9 +135,6 @@ HWEventQueuePtr checkForInput[2]; extern int connBlockScreenStart; -extern void Swap32Write(), SLHostsExtend(), SQColorsExtend(), WriteSConnectionInfo(); -extern void WriteSConnSetupPrefix(); - static void KillAllClients( #if NeedFunctionPrototypes void @@ -159,10 +147,6 @@ #endif ); -#ifdef LBX -extern unsigned long StandardRequestLength(); -#endif - static int nextFreeClientID; /* always MIN free client ID */ static int nClients; /* number of authorized clients */ @@ -272,11 +256,15 @@ long SmartScheduleTime; ClientPtr SmartLastClient; int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1]; +int SmartScheduleClient(int *clientReady, int nready); #ifdef SMART_DEBUG long SmartLastPrint; #endif +void Dispatch(void); +void InitProcVectors(void); + int SmartScheduleClient (int *clientReady, int nready) { @@ -361,7 +349,7 @@ #define MAJOROP ((xReq *)client->requestBuffer)->reqType void -Dispatch() +Dispatch(void) { register int *clientReady; /* array of request ready clients */ register int result; @@ -3359,7 +3347,6 @@ ProcListHosts(client) register ClientPtr client; { -extern int GetHosts(); xListHostsReply reply; int len, nHosts, result; pointer pdata; @@ -3552,7 +3539,7 @@ } void -InitProcVectors() +InitProcVectors(void) { int i; for (i = 0; i<256; i++) Index: xc/programs/Xserver/dix/dispatch.h diff -u xc/programs/Xserver/dix/dispatch.h:3.2 xc/programs/Xserver/dix/dispatch.h:3.3 --- xc/programs/Xserver/dix/dispatch.h:3.2 Tue Jul 31 20:44:48 2001 +++ xc/programs/Xserver/dix/dispatch.h Tue Feb 19 06:09:21 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/dispatch.h,v 3.2 2001/08/01 00:44:48 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dispatch.h,v 3.3 2002/02/19 11:09:21 alanh Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey <dickey@clark.net> @@ -33,74 +33,13 @@ #ifndef DISPATCH_H #define DISPATCH_H 1 -#ifdef LBX -void IncrementClientCount( -#if NeedFunctionPrototypes - void -#endif -); -#endif - -void CloseDownClient( -#if NeedFunctionPrototypes - ClientPtr client -#endif -); - -void Dispatch( -#if NeedFunctionPrototypes - void -#endif -); - -void InitProcVectors( -#if NeedFunctionPrototypes - void -#endif -); - -ClientPtr NextAvailableClient( -#if NeedFunctionPrototypes - pointer ospriv -#endif -); - -int SendConnSetup( -#if NeedFunctionPrototypes - ClientPtr /* client */, - char * /* reason */ -#endif -); - -void SetInputCheck( -#if NeedFunctionPrototypes - HWEventQueuePtr /* c0 */, - HWEventQueuePtr /* c1 */ -#endif -); - -void ProcessWorkQueue( -#if NeedFunctionPrototypes - void -#endif -); - -void ProcessWorkQueueZombies( -#if NeedFunctionPrototypes - void -#endif -); - DISPATCH_PROC(InitClientPrivates); DISPATCH_PROC(ProcAllocColor); DISPATCH_PROC(ProcAllocColorCells); DISPATCH_PROC(ProcAllocColorPlanes); DISPATCH_PROC(ProcAllocNamedColor); -DISPATCH_PROC(ProcAllowEvents); -DISPATCH_PROC(ProcBadRequest); DISPATCH_PROC(ProcBell); DISPATCH_PROC(ProcChangeAccessControl); -DISPATCH_PROC(ProcChangeActivePointerGrab); DISPATCH_PROC(ProcChangeCloseDownMode); DISPATCH_PROC(ProcChangeGC); DISPATCH_PROC(ProcChangeHosts); @@ -140,7 +79,6 @@ DISPATCH_PROC(ProcGetFontPath); DISPATCH_PROC(ProcGetGeometry); DISPATCH_PROC(ProcGetImage); -DISPATCH_PROC(ProcGetInputFocus); DISPATCH_PROC(ProcGetKeyboardControl); DISPATCH_PROC(ProcGetKeyboardMapping); DISPATCH_PROC(ProcGetModifierMapping); @@ -151,10 +89,6 @@ DISPATCH_PROC(ProcGetScreenSaver); DISPATCH_PROC(ProcGetSelectionOwner); DISPATCH_PROC(ProcGetWindowAttributes); -DISPATCH_PROC(ProcGrabButton); -DISPATCH_PROC(ProcGrabKey); -DISPATCH_PROC(ProcGrabKeyboard); -DISPATCH_PROC(ProcGrabPointer); DISPATCH_PROC(ProcGrabServer); DISPATCH_PROC(ProcImageText16); DISPATCH_PROC(ProcImageText8); @@ -187,17 +121,13 @@ DISPATCH_PROC(ProcQueryExtension); DISPATCH_PROC(ProcQueryFont); DISPATCH_PROC(ProcQueryKeymap); -DISPATCH_PROC(ProcQueryPointer); DISPATCH_PROC(ProcQueryTextExtents); DISPATCH_PROC(ProcQueryTree); -DISPATCH_PROC(ProcRecolorCursor); DISPATCH_PROC(ProcReparentWindow); DISPATCH_PROC(ProcRotateProperties); -DISPATCH_PROC(ProcSendEvent); DISPATCH_PROC(ProcSetClipRectangles); DISPATCH_PROC(ProcSetDashes); DISPATCH_PROC(ProcSetFontPath); -DISPATCH_PROC(ProcSetInputFocus); DISPATCH_PROC(ProcSetModifierMapping); DISPATCH_PROC(ProcSetPointerMapping); DISPATCH_PROC(ProcSetScreenSaver); @@ -205,14 +135,9 @@ DISPATCH_PROC(ProcStoreColors); DISPATCH_PROC(ProcStoreNamedColor); DISPATCH_PROC(ProcTranslateCoords); -DISPATCH_PROC(ProcUngrabButton); -DISPATCH_PROC(ProcUngrabKey); -DISPATCH_PROC(ProcUngrabKeyboard); -DISPATCH_PROC(ProcUngrabPointer); DISPATCH_PROC(ProcUngrabServer); DISPATCH_PROC(ProcUninstallColormap); DISPATCH_PROC(ProcUnmapSubwindows); DISPATCH_PROC(ProcUnmapWindow); -DISPATCH_PROC(ProcWarpPointer); #endif /* DISPATCH_H */ Index: xc/programs/Xserver/dix/dixfonts.c diff -u xc/programs/Xserver/dix/dixfonts.c:3.26 xc/programs/Xserver/dix/dixfonts.c:3.27 --- xc/programs/Xserver/dix/dixfonts.c:3.26 Sat Oct 27 23:33:06 2001 +++ xc/programs/Xserver/dix/dixfonts.c Fri Feb 14 22:47:05 2003 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.26 2001/10/28 03:33:06 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.27 2003/02/15 03:47:05 dawes Exp $ */ /************************************************************************ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -81,8 +81,8 @@ case AllocError: return BadAlloc; case BadFontName: - case BadFontPath: return BadName; + case BadFontPath: case BadFontFormat: /* is there something better? */ case BadCharRange: return BadValue; @@ -1834,7 +1834,7 @@ while (--valid_paths >= 0) FreeFPE(fplist[valid_paths]); xfree(fplist); - return err; + return FontToXError(err); } /* XXX -- do we need to pass error down to each renderer? */ @@ -1849,7 +1849,7 @@ if (npaths == 0) { if (SetDefaultFontPath(defaultFontPath) != Success) - return BadName; + return BadValue; } else { err = SetFontPathElements(npaths, paths, error, FALSE); } Index: xc/programs/Xserver/dix/dixutils.c diff -u xc/programs/Xserver/dix/dixutils.c:3.9 xc/programs/Xserver/dix/dixutils.c:3.13 --- xc/programs/Xserver/dix/dixutils.c:3.9 Fri Dec 14 14:59:31 2001 +++ xc/programs/Xserver/dix/dixutils.c Sat Jan 11 21:44:26 2003 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/dixutils.c,v 3.9 2001/12/14 19:59:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dixutils.c,v 3.13 2003/01/12 02:44:26 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -398,7 +398,7 @@ * procedure to call than to check if there's a procedure */ void -NoopDDA(void* f, ...) +NoopDDA(void) { } @@ -553,7 +553,7 @@ static WorkQueuePtr *workQueueLast = &workQueue; void -ProcessWorkQueue() +ProcessWorkQueue(void) { WorkQueuePtr q, *p; @@ -581,7 +581,7 @@ } void -ProcessWorkQueueZombies() +ProcessWorkQueueZombies(void) { WorkQueuePtr q, *p; Index: xc/programs/Xserver/dix/events.c diff -u xc/programs/Xserver/dix/events.c:3.44 xc/programs/Xserver/dix/events.c:3.46 --- xc/programs/Xserver/dix/events.c:3.44 Sun Dec 16 13:29:45 2001 +++ xc/programs/Xserver/dix/events.c Mon Sep 16 21:15:09 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.44 2001/12/16 18:29:45 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.46 2002/09/17 01:15:09 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -110,8 +110,6 @@ #include "dixgrabs.h" #include "dispatch.h" -extern WindowPtr *WindowTable; - #define EXTENSION_EVENT_BASE 64 #define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */ @@ -220,26 +218,14 @@ #endif ); -void DeliverFocusedEvent(); -int DeliverDeviceEvents(); -void DoFocusEvents(); -Mask EventMaskForClient(); -Bool CheckDeviceGrabs(); -void EnqueueEvent(); - -extern Bool GrabMatchesSecond(); -extern Bool DeletePassiveGrabFromList(); -extern int AddPassiveGrabToList(); - -extern Bool permitOldBugs; -extern Bool Must_have_memory; extern int lastEvent; -#ifdef XINPUT -extern int DeviceMotionNotify, DeviceButtonPress, DeviceKeyPress; -#endif static Mask lastEventMask; +#ifdef XINPUT +extern int DeviceMotionNotify; +#endif + #define CantBeFiltered NoEventMask static Mask filters[128] = { @@ -607,13 +593,6 @@ #endif /* PANORAMIX */ -static Mask -GetNextEventMask() -{ - lastEventMask <<= 1; - return lastEventMask; -} - void SetMaskForEvent(mask, event) Mask mask; @@ -817,10 +796,7 @@ } static void -ConfineCursorToWindow(pWin, generateEvents, confineToScreen) - WindowPtr pWin; - Bool generateEvents; - Bool confineToScreen; +ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen) { ScreenPtr pScreen = pWin->drawable.pScreen; @@ -950,6 +926,18 @@ *px = sprite.hotPhys.x; *py = sprite.hotPhys.y; } + +#ifdef PANORAMIX +int +XineramaGetCursorScreen() +{ + if(!noPanoramiXExtension) { + return sprite.screen->myNum; + } else { + return 0; + } +} +#endif /* PANORAMIX */ #define TIMESLOP (5 * 60 * 1000) /* 5 minutes */ Index: xc/programs/Xserver/dix/extension.c diff -u xc/programs/Xserver/dix/extension.c:3.11 xc/programs/Xserver/dix/extension.c:3.12 --- xc/programs/Xserver/dix/extension.c:3.11 Fri Dec 14 14:59:31 2001 +++ xc/programs/Xserver/dix/extension.c Tue Feb 19 06:09:22 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/extension.c,v 3.11 2001/12/14 19:59:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/extension.c,v 3.12 2002/02/19 11:09:22 alanh Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -79,15 +79,11 @@ static unsigned int NumExtensions = 0; ExtensionEntry * -AddExtension(name, NumEvents, NumErrors, MainProc, - SwappedMainProc, CloseDownProc, MinorOpcodeProc) - char *name; - int NumEvents; - int NumErrors; - int (* MainProc)(); - int (* SwappedMainProc)(); - void (* CloseDownProc)(); - unsigned short (* MinorOpcodeProc)(); +AddExtension(char *name, int NumEvents, int NumErrors, + int (*MainProc)(ClientPtr c1), + int (*SwappedMainProc)(ClientPtr c2), + void (*CloseDownProc)(ExtensionEntry *e), + unsigned short (*MinorOpcodeProc)(ClientPtr c3)) { int i; register ExtensionEntry *ext, **newexts; @@ -186,9 +182,7 @@ } static int -FindExtension(extname, len) - char *extname; - int len; +FindExtension(char *extname, int len) { int i, j; @@ -217,7 +211,7 @@ { int n; - n = FindExtension(extname, strlen(extname)); + n = FindExtension((char*)extname, strlen(extname)); if (n != -1) return extensions[n]; else Index: xc/programs/Xserver/dix/globals.c diff -u xc/programs/Xserver/dix/globals.c:1.9 xc/programs/Xserver/dix/globals.c:1.10 --- xc/programs/Xserver/dix/globals.c:1.9 Fri Dec 14 14:59:32 2001 +++ xc/programs/Xserver/dix/globals.c Tue Oct 8 19:55:18 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.9 2001/12/14 19:59:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.10 2002/10/08 23:55:18 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -126,6 +126,7 @@ every compilation of dix code */ Bool loadableFonts = FALSE; CursorPtr rootCursor; +Bool blackRoot=FALSE; ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */ TimeStamp currentTime; Index: xc/programs/Xserver/dix/grabs.c diff -u xc/programs/Xserver/dix/grabs.c:3.3 xc/programs/Xserver/dix/grabs.c:3.4 --- xc/programs/Xserver/dix/grabs.c:3.3 Fri Dec 14 14:59:32 2001 +++ xc/programs/Xserver/dix/grabs.c Tue Feb 19 06:09:22 2002 @@ -46,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/dix/grabs.c,v 3.3 2001/12/14 19:59:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/grabs.c,v 3.4 2002/02/19 11:09:22 alanh Exp $ */ #include "X.h" #include "misc.h" @@ -56,8 +56,6 @@ #include "inputstr.h" #include "cursorstr.h" #include "dixgrabs.h" - -extern InputInfo inputInfo; #define BITMASK(i) (((Mask)1) << ((i) & 31)) #define MASKIDX(i) ((i) >> 5) Index: xc/programs/Xserver/dix/main.c diff -u xc/programs/Xserver/dix/main.c:3.38 xc/programs/Xserver/dix/main.c:3.40 --- xc/programs/Xserver/dix/main.c:3.38 Fri Dec 14 14:59:32 2001 +++ xc/programs/Xserver/dix/main.c Mon Feb 17 11:55:31 2003 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.38 2001/12/14 19:59:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.40 2003/02/17 16:55:31 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -91,10 +91,10 @@ #include "servermd.h" #include "site.h" #include "dixfont.h" +#include "extnsionst.h" #ifdef PANORAMIX #include "panoramiXsrv.h" #else -#include "extnsionst.h" #include "dixevents.h" /* InitEvents() */ #include "dispatch.h" /* InitProcVectors() */ #endif @@ -105,8 +105,6 @@ #include "dpmsproc.h" #endif -void ddxGiveUp(); - extern int InitClientPrivates( #if NeedFunctionPrototypes ClientPtr /*client*/ @@ -119,19 +117,14 @@ #endif ); -extern char *display; char *ConnectionInfo; xConnSetupPrefix connSetupPrefix; -extern WindowPtr *WindowTable; extern FontPtr defaultFont; extern int screenPrivateCount; -extern void InitProcVectors(); -extern void InitEvents(); -extern void CloseDownEvents(void); -extern void DefineInitialRootWindow(); -extern Bool CreateGCperDepthArray(); +extern void InitProcVectors(void); +extern Bool CreateGCperDepthArray(void); #ifndef PANORAMIX static @@ -146,17 +139,8 @@ static int restart = 0; -/* - * Dummy entry for EventSwapVector[] - */ -/*ARGSUSED*/ void -NotImplemented( -#if NeedFunctionPrototypes - xEvent * from, - xEvent * to -#endif - ) +NotImplemented(xEvent *from, xEvent *to) { FatalError("Not implemented"); } @@ -257,10 +241,7 @@ #endif int -main(argc, argv, envp) - int argc; - char *argv[]; - char *envp[]; +main(int argc, char *argv[], char *envp[]) { int i, j, k, error; char *xauthfile; Index: xc/programs/Xserver/dix/property.c diff -u xc/programs/Xserver/dix/property.c:3.11 xc/programs/Xserver/dix/property.c:3.12 --- xc/programs/Xserver/dix/property.c:3.11 Fri Dec 14 14:59:33 2001 +++ xc/programs/Xserver/dix/property.c Tue Feb 19 06:09:22 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/property.c,v 3.11 2001/12/14 19:59:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/property.c,v 3.12 2002/02/19 11:09:22 alanh Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -66,10 +66,7 @@ #endif #if defined(LBX) || defined(LBX_COMPAT) -int fWriteToClient(client, len, buf) - ClientPtr client; - int len; - char *buf; +int fWriteToClient(ClientPtr client, int len, char *buf) { return WriteToClient(client, len, buf); } Index: xc/programs/Xserver/dix/resource.c diff -u xc/programs/Xserver/dix/resource.c:3.10 xc/programs/Xserver/dix/resource.c:3.12 --- xc/programs/Xserver/dix/resource.c:3.10 Fri Dec 14 14:59:33 2001 +++ xc/programs/Xserver/dix/resource.c Wed Mar 6 16:13:38 2002 @@ -72,7 +72,7 @@ * 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.10 2001/12/14 19:59:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/resource.c,v 3.12 2002/03/06 21:13:38 mvojkovi Exp $ */ #define NEED_EVENTS #include "X.h" @@ -92,7 +92,6 @@ #include "panoramiX.h" #include "panoramiXsrv.h" #endif -extern WindowPtr *WindowTable; #include <assert.h> static void RebuildTable( @@ -101,14 +100,6 @@ #endif ); -#if 0 -/* These should be in a header */ -extern int DeleteWindow(), dixDestroyPixmap(), FreeGC(); -extern int CloseFont(), FreeCursor(); -extern int FreeColormap(), FreeClientPixels(); -extern int OtherClientGone(), DeletePassiveGrab(); -#endif - #define SERVER_MINID 32 #define INITBUCKETS 64 @@ -133,12 +124,23 @@ XID expectID; } ClientResourceRec; -static RESTYPE lastResourceType; +RESTYPE lastResourceType; static RESTYPE lastResourceClass; -static RESTYPE TypeMask; +RESTYPE TypeMask; static DeleteType *DeleteFuncs = (DeleteType *)NULL; +#ifdef XResExtension + +Atom * ResourceNames = NULL; + +void RegisterResourceName (RESTYPE type, char *name) +{ + ResourceNames[type & TypeMask] = MakeAtom(name, strlen(name), TRUE); +} + +#endif + RESTYPE CreateNewResourceType(deleteFunc) DeleteType deleteFunc; @@ -152,6 +154,18 @@ (next + 1) * sizeof(DeleteType)); if (!funcs) return 0; + +#ifdef XResExtension + { + Atom *newnames; + newnames = xrealloc(ResourceNames, (next + 1) * sizeof(Atom)); + if(!newnames) + return 0; + ResourceNames = newnames; + ResourceNames[next] = 0; + } +#endif + lastResourceType = next; DeleteFuncs = funcs; DeleteFuncs[next] = deleteFunc; @@ -205,6 +219,14 @@ DeleteFuncs[RT_CMAPENTRY & TypeMask] = FreeClientPixels; DeleteFuncs[RT_OTHERCLIENT & TypeMask] = OtherClientGone; DeleteFuncs[RT_PASSIVEGRAB & TypeMask] = DeletePassiveGrab; + +#ifdef XResExtension + if(ResourceNames) + xfree(ResourceNames); + ResourceNames = xalloc((lastResourceType + 1) * sizeof(Atom)); + if(!ResourceNames) + return FALSE; +#endif } clientTable[i = client->index].resources = (ResourcePtr *)xalloc(INITBUCKETS*sizeof(ResourcePtr)); @@ -631,6 +653,35 @@ next = resources[i]; /* start over */ } } + } +} + +void +FindAllClientResources( + ClientPtr client, + FindAllRes func, + pointer cdata +){ + register ResourcePtr *resources; + register ResourcePtr this, next; + int i, elements; + register int *eltptr; + + if (!client) + client = serverClient; + + resources = clientTable[client->index].resources; + eltptr = &clientTable[client->index].elements; + for (i = 0; i < clientTable[client->index].buckets; i++) + { + for (this = resources[i]; this; this = next) + { + next = this->next; + elements = *eltptr; + (*func)(this->value, this->id, this->type, cdata); + if (*eltptr != elements) + next = resources[i]; /* start over */ + } } } Index: xc/programs/Xserver/dix/swapreq.c diff -u xc/programs/Xserver/dix/swapreq.c:3.4 xc/programs/Xserver/dix/swapreq.c:3.5 --- xc/programs/Xserver/dix/swapreq.c:3.4 Fri Dec 14 14:59:33 2001 +++ xc/programs/Xserver/dix/swapreq.c Tue Feb 19 06:09:22 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/swapreq.c,v 3.4 2001/12/14 19:59:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/swapreq.c,v 3.5 2002/02/19 11:09:22 alanh Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -56,8 +56,6 @@ #include "dixstruct.h" #include "extnsionst.h" /* for SendEvent */ #include "swapreq.h" - -extern int (* ProcVector[256]) (); /* Thanks to Jack Palevich for testing and subsequently rewriting all this */ Index: xc/programs/Xserver/dix/tables.c diff -u xc/programs/Xserver/dix/tables.c:3.4 xc/programs/Xserver/dix/tables.c:3.5 --- xc/programs/Xserver/dix/tables.c:3.4 Fri Dec 14 14:59:33 2001 +++ xc/programs/Xserver/dix/tables.c Tue Feb 19 06:09:22 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.4 2001/12/14 19:59:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.5 2002/02/19 11:09:22 alanh Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -54,6 +54,7 @@ #include "windowstr.h" #include "extnsionst.h" #include "dixstruct.h" +#include "dixevents.h" #include "dispatch.h" #include "swaprep.h" #include "swapreq.h" Index: xc/programs/Xserver/dix/window.c diff -u xc/programs/Xserver/dix/window.c:3.24 xc/programs/Xserver/dix/window.c:3.32 --- xc/programs/Xserver/dix/window.c:3.24 Fri Dec 14 14:59:34 2001 +++ xc/programs/Xserver/dix/window.c Sat Jan 11 21:44:26 2003 @@ -70,7 +70,7 @@ * * *****************************************************************/ -/* $XFree86: xc/programs/Xserver/dix/window.c,v 3.24 2001/12/14 19:59:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/window.c,v 3.32 2003/01/12 02:44:26 dawes Exp $ */ #include "misc.h" #include "scrnintstr.h" @@ -100,8 +100,6 @@ #include "security.h" #endif -extern Bool permitOldBugs; - #if defined(NEED_SCREEN_REGIONS) #define REGION_PTR(pScreen,pWin) \ register ScreenPtr pScreen = pWin->drawable.pScreen; @@ -126,15 +124,12 @@ ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; -extern WindowPtr *WindowTable; - #if 0 extern void DeleteWindowFromAnyEvents(); extern Mask EventMaskForClient(); extern void WindowHasNewCursor(); extern void RecalculateDeliverableEvents(); #endif -extern int rand(); static Bool TileScreenSaver( #if NeedFunctionPrototypes @@ -325,7 +320,7 @@ pWin->backgroundState = BackgroundPixmap; pGC = GetScratchGC(pScreen->rootDepth, pScreen); if (!pWin->background.pixmap || !pGC) - FatalError("cound not create root tile"); + FatalError("could not create root tile"); { CARD32 attributes[2]; @@ -345,6 +340,9 @@ for (j = len; j > 0; j--) *to++ = *from; + if (blackRoot) + bzero(back, sizeof(back)); + (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1, 0, 0, len, 4, 0, XYBitmap, (char *)back); @@ -3327,15 +3325,19 @@ pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW); - if(pWin2->visibility == VisibilityPartiallyObscured) - return; + if (pWin2) { + if(pWin2->visibility == VisibilityPartiallyObscured) + return; - if(!i) pWin = pWin2; + if(!i) pWin = pWin2; + } } break; case VisibilityPartiallyObscured: - if(Scrnum) - pWin = (WindowPtr)LookupIDByType(win->info[0].id, RT_WINDOW); + if(Scrnum) { + pWin2 = (WindowPtr)LookupIDByType(win->info[0].id, RT_WINDOW); + if (pWin2) pWin = pWin2; + } break; case VisibilityFullyObscured: for(i = 0; i < PanoramiXNumScreens; i++) { @@ -3343,10 +3345,12 @@ pWin2 = (WindowPtr)LookupIDByType(win->info[i].id, RT_WINDOW); - if(pWin2->visibility != VisibilityFullyObscured) - return; + if (pWin2) { + if(pWin2->visibility != VisibilityFullyObscured) + return; - if(!i) pWin = pWin2; + if(!i) pWin = pWin2; + } } break; } @@ -3365,7 +3369,6 @@ #define RANDOM_WIDTH 32 #ifndef NOLOGOHACK -extern int logoScreenSaver; static void DrawLogo( #if NeedFunctionPrototypes WindowPtr /*pWin*/ Index: xc/programs/Xserver/fb/Imakefile diff -u xc/programs/Xserver/fb/Imakefile:1.14 xc/programs/Xserver/fb/Imakefile:1.17 --- xc/programs/Xserver/fb/Imakefile:1.14 Tue Jul 17 11:28:58 2001 +++ xc/programs/Xserver/fb/Imakefile Sat Jun 1 21:21:17 2002 @@ -1,16 +1,24 @@ -XCOMM $XFree86: xc/programs/Xserver/fb/Imakefile,v 1.14 2001/07/17 15:28:58 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/fb/Imakefile,v 1.17 2002/06/02 01:21:17 dawes Exp $ XCOMM XCOMM XCOMM Id: Imakefile,v 1.1 1999/11/02 03:54:44 keithp Exp $ +#if DoLoadableServer +#if !BuildModuleInSubdir #define IHaveModules +#elif !defined(IHaveModules) +#define IHaveSubdirs +SUBDIRS = module +#endif +#endif + #include <Server.tmpl> #ifdef FbNoPixelAddrCode DEFINES=-DFBNOPIXADDR -DFBNO24BIT #endif -#if defined(XFree86Version) && DoLoadableServer +#if defined(IHaveModules) XFMODSRC = fbmodule.c XFMODOBJ = fbmodule.o #endif @@ -42,6 +50,7 @@ fbsolid.c \ fbstipple.c \ fbtile.c \ + fbtrap.c \ fbutil.c \ fbwindow.c \ fb24_32.c \ @@ -75,27 +84,76 @@ fbsolid.o \ fbstipple.o \ fbtile.o \ + fbtrap.o \ fbutil.o \ fbwindow.o \ fb24_32.o \ fbpict.o - INCLUDES = -I. -I../mi -I../include -I$(XINCLUDESRC) \ + INCLUDES = -I$(SERVERSRC)/fb -I$(SERVERSRC)/mi -I$(SERVERSRC)/include \ + -I$(XINCLUDESRC) \ -I$(FONTINCSRC) -I$(XF86SRC)/common $(EXTRAINCLUDES) \ - -I../render -I$(EXTINCSRC) -I$(SERVERSRC)/Xext - LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln \ - ../mi/llib-lmi.ln + -I$(SERVERSRC)/render -I$(EXTINCSRC) -I$(SERVERSRC)/Xext + LINTLIBS = $(SERVERSRC)/dix/llib-ldix.ln $(SERVERSRC)/os/llib-los.ln \ + $(SERVERSRC)/mi/llib-lmi.ln +#ifdef IHaveModules ModuleObjectRule() LibraryModuleTarget(fb,$(OBJS)) +#else +NormalLibraryObjectRule() +NormalLibraryTarget(fb,$(OBJS)) +#endif + LintLibraryTarget(fb,$(SRCS)) NormalLintTarget($(SRCS)) +#ifdef IHaveModules InstallLibraryModule(fb,$(MODULEDIR),.) +#endif -#ifndef OS2Architecture DependTarget() + +#ifdef IHaveSubdirs +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + +#ifdef LinkDirectory +LinkSourceFile(fb24_32.c,LinkDirectory) +LinkSourceFile(fballpriv.c,LinkDirectory) +LinkSourceFile(fbarc.c,LinkDirectory) +LinkSourceFile(fbbits.c,LinkDirectory) +LinkSourceFile(fbblt.c,LinkDirectory) +LinkSourceFile(fbbltone.c,LinkDirectory) +LinkSourceFile(fbbstore.c,LinkDirectory) +LinkSourceFile(fbcmap.c,LinkDirectory) +LinkSourceFile(fbcompose.c,LinkDirectory) +LinkSourceFile(fbcopy.c,LinkDirectory) +LinkSourceFile(fbfill.c,LinkDirectory) +LinkSourceFile(fbfillrect.c,LinkDirectory) +LinkSourceFile(fbfillsp.c,LinkDirectory) +LinkSourceFile(fbgc.c,LinkDirectory) +LinkSourceFile(fbgetsp.c,LinkDirectory) +LinkSourceFile(fbglyph.c,LinkDirectory) +LinkSourceFile(fbimage.c,LinkDirectory) +LinkSourceFile(fbline.c,LinkDirectory) +LinkSourceFile(fbmodule.c,LinkDirectory) +LinkSourceFile(fboverlay.c,LinkDirectory) +LinkSourceFile(fbpict.c,LinkDirectory) +LinkSourceFile(fbpixmap.c,LinkDirectory) +LinkSourceFile(fbpoint.c,LinkDirectory) +LinkSourceFile(fbpush.c,LinkDirectory) +LinkSourceFile(fbscreen.c,LinkDirectory) +LinkSourceFile(fbseg.c,LinkDirectory) +LinkSourceFile(fbsetsp.c,LinkDirectory) +LinkSourceFile(fbsolid.c,LinkDirectory) +LinkSourceFile(fbstipple.c,LinkDirectory) +LinkSourceFile(fbtile.c,LinkDirectory) +LinkSourceFile(fbtrap.c,LinkDirectory) +LinkSourceFile(fbutil.c,LinkDirectory) +LinkSourceFile(fbwindow.c,LinkDirectory) #endif InstallDriverSDKLibraryModule(fb,$(DRIVERSDKMODULEDIR),.) Index: xc/programs/Xserver/fb/fb.h diff -u xc/programs/Xserver/fb/fb.h:1.32 xc/programs/Xserver/fb/fb.h:1.35 --- xc/programs/Xserver/fb/fb.h:1.32 Sat Oct 27 23:33:08 2001 +++ xc/programs/Xserver/fb/fb.h Thu Jan 30 16:46:30 2003 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fb.h,v 1.32 2001/10/28 03:33:08 tsi Exp $ + * $XFree86: xc/programs/Xserver/fb/fb.h,v 1.35 2003/01/30 21:46:30 tsi Exp $ * * Copyright © 1998 Keith Packard * @@ -104,7 +104,8 @@ # if defined(__alpha__) || defined(__alpha) || \ defined(ia64) || defined(__ia64__) || \ defined(__sparc64__) || \ - defined(__s390x__) + defined(__s390x__) || \ + defined(x86_64) || defined (__x86_64__) typedef unsigned long FbBits; # else typedef unsigned long long FbBits; @@ -636,7 +637,7 @@ ((WindowPtr) (pWin))->devPrivates[fbWinPrivateIndex].ptr) #endif -#if 0 +#ifdef __DARWIN__ #define __fbPixOriginX(pPix) ((pPix)->drawable.x) #define __fbPixOriginY(pPix) ((pPix)->drawable.y) #else Index: xc/programs/Xserver/fb/fbarc.c diff -u xc/programs/Xserver/fb/fbarc.c:1.6 xc/programs/Xserver/fb/fbarc.c:1.8 --- xc/programs/Xserver/fb/fbarc.c:1.6 Tue May 29 00:54:08 2001 +++ xc/programs/Xserver/fb/fbarc.c Fri Nov 8 23:59:29 2002 @@ -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/fbarc.c,v 1.6 2001/05/29 04:54:08 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbarc.c,v 1.8 2002/11/09 04:59:29 tsi Exp $ */ #include "fb.h" #include "mizerarc.h" @@ -104,6 +104,8 @@ else miZeroPolyArc(pDrawable, pGC, 1, parcs); } + else + miPolyArc(pDrawable, pGC, 1, parcs); parcs++; } } Index: xc/programs/Xserver/fb/fbbltone.c diff -u xc/programs/Xserver/fb/fbbltone.c:1.12 xc/programs/Xserver/fb/fbbltone.c:1.13 --- xc/programs/Xserver/fb/fbbltone.c:1.12 Sat Oct 27 23:33:08 2001 +++ xc/programs/Xserver/fb/fbbltone.c Fri Feb 22 19:42:07 2002 @@ -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/fbbltone.c,v 1.12 2001/10/28 03:33:08 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbbltone.c,v 1.13 2002/02/23 00:42:07 keithp Exp $ */ #include "fb.h" @@ -505,12 +505,21 @@ #endif #if BITMAP_BIT_ORDER == LSBFirst -#define FbMergeStip24Bits(left, right, new) (((left) >> (new)) | \ - (right) << (FbStip24Len - (new))) + +#define FbMergeStip24Bits(left, right, new) \ + (FbStipLeft (left, new) | FbStipRight ((right), (FbStip24Len - (new)))) + +#define FbMergePartStip24Bits(left, right, llen, rlen) \ + (left | FbStipRight(right, llen)) + #else -#define FbMergeStip24Bits(left, right, new) (((left << new) & \ - ((1 << FbStip24Len) - 1)) | \ - right) + +#define FbMergeStip24Bits(left, right, new) \ + ((FbStipLeft (left, new) & ((1 << FbStip24Len) - 1)) | right) + +#define FbMergePartStip24Bits(left, right, llen, rlen) \ + (FbStipLeft(left, rlen) | right) + #endif #define fbFirstStipBits(len,stip) {\ @@ -521,7 +530,8 @@ stip = FbLeftStipBits(bits, remain); \ bits = *src++; \ __len = (len) - remain; \ - stip |= FbStipRight(FbLeftStipBits(bits, __len), remain); \ + stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \ + remain, __len); \ remain = FB_STIP_UNIT; \ } \ bits = FbStipLeft (bits, __len); \ Index: xc/programs/Xserver/fb/fbcompose.c diff -u xc/programs/Xserver/fb/fbcompose.c:1.13 xc/programs/Xserver/fb/fbcompose.c:1.16 --- xc/programs/Xserver/fb/fbcompose.c:1.13 Sat Oct 27 23:33:08 2001 +++ xc/programs/Xserver/fb/fbcompose.c Wed Nov 6 17:45:35 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbcompose.c,v 1.13 2001/10/28 03:33:08 tsi Exp $ + * $XFree86: xc/programs/Xserver/fb/fbcompose.c,v 1.16 2002/11/06 22:45:35 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -1605,21 +1605,21 @@ CARD32 fbFetch_a8r8g8b8 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; return ((CARD32 *)line)[offset >> 5]; } CARD32 fbFetch_x8r8g8b8 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; return ((CARD32 *)line)[offset >> 5] | 0xff000000; } CARD32 fbFetch_a8b8g8r8 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD32 *)line)[offset >> 5]; return ((pixel & 0xff000000) | @@ -1631,7 +1631,7 @@ CARD32 fbFetch_x8b8g8r8 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD32 *)line)[offset >> 5]; return ((0xff000000) | @@ -1643,7 +1643,7 @@ CARD32 fbFetch_r8g8b8 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); #if IMAGE_BYTE_ORDER == MSBFirst return (0xff000000 | @@ -1661,7 +1661,7 @@ CARD32 fbFetch_b8g8r8 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); #if IMAGE_BYTE_ORDER == MSBFirst return (0xff000000 | @@ -1679,7 +1679,7 @@ CARD32 fbFetch_r5g6b5 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 r,g,b; @@ -1692,7 +1692,7 @@ CARD32 fbFetch_b5g6r5 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 r,g,b; @@ -1705,7 +1705,7 @@ CARD32 fbFetch_a1r5g5b5 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 a,r,g,b; @@ -1719,7 +1719,7 @@ CARD32 fbFetch_x1r5g5b5 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 r,g,b; @@ -1732,7 +1732,7 @@ CARD32 fbFetch_a1b5g5r5 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 a,r,g,b; @@ -1746,7 +1746,7 @@ CARD32 fbFetch_x1b5g5r5 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 r,g,b; @@ -1757,9 +1757,63 @@ } CARD32 +fbFetch_a4r4g4b4 (FbCompositeOperand *op) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD32 pixel = ((CARD16 *) line)[offset >> 4]; + CARD32 a,r,g,b; + + a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16; + r = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12; + g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8; + b = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)); + return (a | r | g | b); +} + +CARD32 +fbFetch_x4r4g4b4 (FbCompositeOperand *op) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD32 pixel = ((CARD16 *) line)[offset >> 4]; + CARD32 r,g,b; + + r = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12; + g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8; + b = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)); + return (0xff000000 | r | g | b); +} + +CARD32 +fbFetch_a4b4g4r4 (FbCompositeOperand *op) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD32 pixel = ((CARD16 *) line)[offset >> 4]; + CARD32 a,r,g,b; + + a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16; + b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12; + g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8; + r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)); + return (a | r | g | b); +} + +CARD32 +fbFetch_x4b4g4r4 (FbCompositeOperand *op) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD32 pixel = ((CARD16 *) line)[offset >> 4]; + CARD32 r,g,b; + + b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12; + g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8; + r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)); + return (0xff000000 | r | g | b); +} + +CARD32 fbFetch_a8 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; return pixel << 24; @@ -1768,7 +1822,7 @@ CARD32 fbFetcha_a8 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; pixel |= pixel << 8; @@ -1779,7 +1833,7 @@ CARD32 fbFetch_r3g3b2 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; CARD32 r,g,b; @@ -1795,7 +1849,7 @@ CARD32 fbFetch_b2g3r3 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; CARD32 r,g,b; @@ -1813,7 +1867,7 @@ CARD32 fbFetch_a2r2g2b2 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; CARD32 a,r,g,b; @@ -1827,7 +1881,7 @@ CARD32 fbFetch_a2b2g2r2 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; CARD32 a,r,g,b; @@ -1841,7 +1895,7 @@ CARD32 fbFetch_c8 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; return op->indexed->rgba[pixel]; @@ -1857,7 +1911,7 @@ CARD32 fbFetch_a4 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = Fetch4(line, offset); pixel |= pixel << 4; @@ -1867,7 +1921,7 @@ CARD32 fbFetcha_a4 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = Fetch4(line, offset); pixel |= pixel << 4; @@ -1879,7 +1933,7 @@ CARD32 fbFetch_r1g2b1 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = Fetch4(line, offset); CARD32 r,g,b; @@ -1892,7 +1946,7 @@ CARD32 fbFetch_b1g2r1 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = Fetch4(line, offset); CARD32 r,g,b; @@ -1905,7 +1959,7 @@ CARD32 fbFetch_a1r1g1b1 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = Fetch4(line, offset); CARD32 a,r,g,b; @@ -1919,7 +1973,7 @@ CARD32 fbFetch_a1b1g1r1 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = Fetch4(line, offset); CARD32 a,r,g,b; @@ -1933,7 +1987,7 @@ CARD32 fbFetch_c4 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = Fetch4(line, offset); return op->indexed->rgba[pixel]; @@ -1942,7 +1996,7 @@ CARD32 fbFetcha_a1 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD32 *)line)[offset >> 5]; CARD32 a; #if BITMAP_BIT_ORDER == MSBFirst @@ -1962,7 +2016,7 @@ CARD32 fbFetch_a1 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD32 *)line)[offset >> 5]; CARD32 a; #if BITMAP_BIT_ORDER == MSBFirst @@ -1980,7 +2034,7 @@ CARD32 fbFetch_g1 (FbCompositeOperand *op) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel = ((CARD32 *)line)[offset >> 5]; CARD32 a; #if BITMAP_BIT_ORDER == MSBFirst @@ -2002,21 +2056,21 @@ void fbStore_a8r8g8b8 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; ((CARD32 *)line)[offset >> 5] = value; } void fbStore_x8r8g8b8 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; ((CARD32 *)line)[offset >> 5] = value & 0xffffff; } void fbStore_a8b8g8r8 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; Splita(value); ((CARD32 *)line)[offset >> 5] = a << 24 | b << 16 | g << 8 | r; } @@ -2024,7 +2078,7 @@ void fbStore_x8b8g8r8 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; Split(value); ((CARD32 *)line)[offset >> 5] = b << 16 | g << 8 | r; } @@ -2032,7 +2086,7 @@ void fbStore_r8g8b8 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Split(value); #if IMAGE_BYTE_ORDER == MSBFirst @@ -2049,7 +2103,7 @@ void fbStore_b8g8r8 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Split(value); #if IMAGE_BYTE_ORDER == MSBFirst @@ -2066,7 +2120,7 @@ void fbStore_r5g6b5 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Split(value); *pixel = (((r << 8) & 0xf800) | @@ -2077,7 +2131,7 @@ void fbStore_b5g6r5 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Split(value); *pixel = (((b << 8) & 0xf800) | @@ -2088,7 +2142,7 @@ void fbStore_a1r5g5b5 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Splita(value); *pixel = (((a << 8) & 0x8000) | @@ -2100,7 +2154,7 @@ void fbStore_x1r5g5b5 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Split(value); *pixel = (((r << 7) & 0x7c00) | @@ -2111,7 +2165,7 @@ void fbStore_a1b5g5r5 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Splita(value); *pixel = (((a << 8) & 0x8000) | @@ -2123,7 +2177,7 @@ void fbStore_x1b5g5r5 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Split(value); *pixel = (((b << 7) & 0x7c00) | @@ -2132,9 +2186,55 @@ } void +fbStore_a4r4g4b4 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); + Splita(value); + *pixel = (((a << 8) & 0xf000) | + ((r << 4) & 0x0f00) | + ((g ) & 0x00f0) | + ((b >> 4) )); +} + +void +fbStore_x4r4g4b4 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); + Split(value); + *pixel = (((r << 4) & 0x0f00) | + ((g ) & 0x00f0) | + ((b >> 4) )); +} + +void +fbStore_a4b4g4r4 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); + Splita(value); + *pixel = (((a << 8) & 0xf000) | + ((b << 4) & 0x0f00) | + ((g ) & 0x00f0) | + ((r >> 4) )); +} + +void +fbStore_x4b4g4r4 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); + Split(value); + *pixel = (((b << 4) & 0x0f00) | + ((g ) & 0x00f0) | + ((r >> 4) )); +} + +void fbStore_a8 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); *pixel = value >> 24; } @@ -2142,7 +2242,7 @@ void fbStore_r3g3b2 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Split(value); *pixel = (((r ) & 0xe0) | @@ -2153,7 +2253,7 @@ void fbStore_b2g3r3 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Split(value); *pixel = (((b ) & 0xe0) | @@ -2164,7 +2264,7 @@ void fbStore_a2r2g2b2 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Splita(value); *pixel = (((a ) & 0xc0) | @@ -2176,7 +2276,7 @@ void fbStore_c8 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); *pixel = miIndexToEnt24(op->indexed,value); } @@ -2184,7 +2284,7 @@ void fbStore_g8 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); *pixel = miIndexToEntY24(op->indexed,value); } @@ -2203,14 +2303,14 @@ void fbStore_a4 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; Store4(line,offset,value>>28); } void fbStore_r1g2b1 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel; Split(value); @@ -2223,7 +2323,7 @@ void fbStore_b1g2r1 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel; Split(value); @@ -2236,7 +2336,7 @@ void fbStore_a1r1g1b1 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel; Splita(value); pixel = (((a >> 4) & 0x8) | @@ -2249,7 +2349,7 @@ void fbStore_a1b1g1r1 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel; Splita(value); pixel = (((a >> 4) & 0x8) | @@ -2262,7 +2362,7 @@ void fbStore_c4 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel; pixel = miIndexToEnt24(op->indexed,value); @@ -2272,7 +2372,7 @@ void fbStore_g4 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 pixel; pixel = miIndexToEntY24(op->indexed,value); @@ -2282,7 +2382,7 @@ void fbStore_a1 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 *pixel = ((CARD32 *) line) + (offset >> 5); CARD32 mask = FbStipMask(offset & 0x1f, 1); @@ -2293,7 +2393,7 @@ void fbStore_g1 (FbCompositeOperand *op, CARD32 value) { - FbBits *line = op->line; CARD32 offset = op->offset; + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; CARD32 *pixel = ((CARD32 *) line) + (offset >> 5); CARD32 mask = FbStipMask(offset & 0x1f, 1); @@ -2324,6 +2424,172 @@ (*op[2].store) (&op[2], value & 0xff000000); } +CARD32 +fbFetch_transform (FbCompositeOperand *op) +{ + PictVector v; + int x, y; + int minx, maxx, miny, maxy; + int n; + BoxRec box; + CARD32 rtot, gtot, btot, atot; + CARD32 xerr, yerr; + CARD32 bits; + + v.vector[0] = IntToxFixed(op->u.transform.x); + v.vector[1] = IntToxFixed(op->u.transform.y); + v.vector[2] = xFixed1; + if (!PictureTransformPoint (op->u.transform.transform, &v)) + return 0; + switch (op->u.transform.filter) { + case PictFilterNearest: + y = xFixedToInt (v.vector[1]) + op->u.transform.top_y; + x = xFixedToInt (v.vector[0]) + op->u.transform.left_x; + if (POINT_IN_REGION (0, op->clip, x, y, &box)) + { + (*op[1].set) (&op[1], x, y); + bits = (*op[1].fetch) (&op[1]); + } + else + bits = 0; + break; + case PictFilterBilinear: + rtot = gtot = btot = atot = 0; + miny = xFixedToInt (v.vector[1]) + op->u.transform.top_y; + maxy = xFixedToInt (xFixedCeil (v.vector[1])) + op->u.transform.top_y; + + minx = xFixedToInt (v.vector[0]) + op->u.transform.left_x; + maxx = xFixedToInt (xFixedCeil (v.vector[0])) + op->u.transform.left_x; + + yerr = xFixed1 - xFixedFrac (v.vector[1]); + for (y = miny; y <= maxy; y++) + { + CARD32 lrtot = 0, lgtot = 0, lbtot = 0, latot = 0; + + xerr = xFixed1 - xFixedFrac (v.vector[0]); + for (x = minx; x <= maxx; x++) + { + if (POINT_IN_REGION (0, op->clip, x, y, &box)) + { + (*op[1].set) (&op[1], x, y); + bits = (*op[1].fetch) (&op[1]); + { + Splita(bits); + lrtot += r * xerr; + lgtot += g * xerr; + lbtot += b * xerr; + latot += a * xerr; + n++; + } + } + xerr = xFixed1 - xerr; + } + rtot += (lrtot >> 10) * yerr; + gtot += (lgtot >> 10) * yerr; + btot += (lbtot >> 10) * yerr; + atot += (latot >> 10) * yerr; + yerr = xFixed1 - yerr; + } + if ((atot >>= 22) > 0xff) atot = 0xff; + if ((rtot >>= 22) > 0xff) rtot = 0xff; + if ((gtot >>= 22) > 0xff) gtot = 0xff; + if ((btot >>= 22) > 0xff) btot = 0xff; + bits = ((atot << 24) | + (rtot << 16) | + (gtot << 8) | + (btot )); + break; + default: + bits = 0; + break; + } + return bits; +} + +CARD32 +fbFetcha_transform (FbCompositeOperand *op) +{ + PictVector v; + int x, y; + int minx, maxx, miny, maxy; + int n; + BoxRec box; + CARD32 rtot, gtot, btot, atot; + CARD32 xerr, yerr; + CARD32 bits; + + v.vector[0] = IntToxFixed(op->u.transform.x); + v.vector[1] = IntToxFixed(op->u.transform.y); + v.vector[2] = xFixed1; + if (!PictureTransformPoint (op->u.transform.transform, &v)) + return 0; + switch (op->u.transform.filter) { + case PictFilterNearest: + y = xFixedToInt (v.vector[1]) + op->u.transform.left_x; + x = xFixedToInt (v.vector[0]) + op->u.transform.top_y; + if (POINT_IN_REGION (0, op->clip, x, y, &box)) + { + (*op[1].set) (&op[1], x, y); + bits = (*op[1].fetcha) (&op[1]); + } + else + bits = 0; + break; + case PictFilterBilinear: + rtot = gtot = btot = atot = 0; + + miny = xFixedToInt (v.vector[1]) + op->u.transform.top_y; + maxy = xFixedToInt (xFixedCeil (v.vector[1])) + op->u.transform.top_y; + + minx = xFixedToInt (v.vector[0]) + op->u.transform.left_x; + maxx = xFixedToInt (xFixedCeil (v.vector[0])) + op->u.transform.left_x; + + yerr = xFixed1 - xFixedFrac (v.vector[1]); + for (y = miny; y <= maxy; y++) + { + CARD32 lrtot = 0, lgtot = 0, lbtot = 0, latot = 0; + xerr = xFixed1 - xFixedFrac (v.vector[0]); + for (x = minx; x <= maxx; x++) + { + if (POINT_IN_REGION (0, op->clip, x, y, &box)) + { + (*op[1].set) (&op[1], x, y); + bits = (*op[1].fetcha) (&op[1]); + { + Splita(bits); + lrtot += r * xerr; + lgtot += g * xerr; + lbtot += b * xerr; + latot += a * xerr; + n++; + } + } + x++; + xerr = xFixed1 - xerr; + } + rtot += (lrtot >> 10) * yerr; + gtot += (lgtot >> 10) * yerr; + btot += (lbtot >> 10) * yerr; + atot += (latot >> 10) * yerr; + y++; + yerr = xFixed1 - yerr; + } + if ((atot >>= 22) > 0xff) atot = 0xff; + if ((rtot >>= 22) > 0xff) rtot = 0xff; + if ((gtot >>= 22) > 0xff) gtot = 0xff; + if ((btot >>= 22) > 0xff) btot = 0xff; + bits = ((atot << 24) | + (rtot << 16) | + (gtot << 8) | + (btot )); + break; + default: + bits = 0; + break; + } + return bits; +} + FbAccessMap fbAccessMap[] = { /* 32bpp formats */ { PICT_a8r8g8b8, fbFetch_a8r8g8b8, fbFetch_a8r8g8b8, fbStore_a8r8g8b8 }, @@ -2343,6 +2609,10 @@ { PICT_x1r5g5b5, fbFetch_x1r5g5b5, fbFetch_x1r5g5b5, fbStore_x1r5g5b5 }, { PICT_a1b5g5r5, fbFetch_a1b5g5r5, fbFetch_a1b5g5r5, fbStore_a1b5g5r5 }, { PICT_x1b5g5r5, fbFetch_x1b5g5r5, fbFetch_x1b5g5r5, fbStore_x1b5g5r5 }, + { PICT_a4r4g4b4, fbFetch_a4r4g4b4, fbFetch_a4r4g4b4, fbStore_a4r4g4b4 }, + { PICT_x4r4g4b4, fbFetch_x4r4g4b4, fbFetch_x4r4g4b4, fbStore_x4r4g4b4 }, + { PICT_a4b4g4r4, fbFetch_a4b4g4r4, fbFetch_a4b4g4r4, fbStore_a4b4g4r4 }, + { PICT_x4b4g4r4, fbFetch_x4b4g4r4, fbFetch_x4b4g4r4, fbStore_x4b4g4r4 }, /* 8bpp formats */ { PICT_a8, fbFetch_a8, fbFetcha_a8, fbStore_a8 }, @@ -2367,60 +2637,177 @@ }; #define NumAccessMap (sizeof fbAccessMap / sizeof fbAccessMap[0]) -Bool -fbBuildOneCompositeOperand (PicturePtr pPict, - FbCompositeOperand *op, - INT16 x, - INT16 y) -{ - int i; - - for (i = 0; i < NumAccessMap; i++) - if (fbAccessMap[i].format == pPict->format) - { - op->fetch = fbAccessMap[i].fetch; - op->fetcha = fbAccessMap[i].fetcha; - op->store = fbAccessMap[i].store; - op->indexed = (miIndexedPtr) pPict->pFormat->indexed; - fbGetDrawable (pPict->pDrawable, op->line, op->stride, op->bpp, - op->xoff, op->yoff); - if (pPict->repeat && pPict->pDrawable->width == 1 && - pPict->pDrawable->height == 1) - { - op->bpp = 0; - op->stride = 0; - } - op->line = op->line + (y + op->yoff) * op->stride; - op->offset = 0; - return TRUE; - } - return FALSE; +static void +fbStepOver (FbCompositeOperand *op) +{ + op->u.drawable.offset += op->u.drawable.bpp; +} + +static void +fbStepDown (FbCompositeOperand *op) +{ + op->u.drawable.line += op->u.drawable.stride; + op->u.drawable.offset = op->u.drawable.start_offset; +} + +static void +fbSet (FbCompositeOperand *op, int x, int y) +{ + op->u.drawable.line = op->u.drawable.top_line + y * op->u.drawable.stride; + op->u.drawable.offset = op->u.drawable.left_offset + x * op->u.drawable.bpp; +} + +static void +fbStepOver_external (FbCompositeOperand *op) +{ + (*op[1].over) (&op[1]); + (*op[2].over) (&op[2]); +} + +static void +fbStepDown_external (FbCompositeOperand *op) +{ + (*op[1].down) (&op[1]); + (*op[2].down) (&op[2]); } +static void +fbSet_external (FbCompositeOperand *op, int x, int y) +{ + (*op[1].set) (&op[1], x, y); + (*op[2].set) (&op[2], + x - op->u.external.alpha_dx, + y - op->u.external.alpha_dy); +} + +static void +fbStepOver_transform (FbCompositeOperand *op) +{ + op->u.transform.x++; +} + +static void +fbStepDown_transform (FbCompositeOperand *op) +{ + op->u.transform.y++; + op->u.transform.x = op->u.transform.start_x; +} + +static void +fbSet_transform (FbCompositeOperand *op, int x, int y) +{ + op->u.transform.x = x - op->u.transform.left_x; + op->u.transform.y = y - op->u.transform.top_y; +} + + Bool fbBuildCompositeOperand (PicturePtr pPict, - FbCompositeOperand op[3], + FbCompositeOperand op[4], INT16 x, - INT16 y) + INT16 y, + Bool transform, + Bool alpha) { - if (pPict->alphaMap) + /* Check for transform */ + if (transform && pPict->transform) + { + if (!fbBuildCompositeOperand (pPict, &op[1], 0, 0, FALSE, alpha)) + return FALSE; + + op->u.transform.top_y = pPict->pDrawable->y; + op->u.transform.left_x = pPict->pDrawable->x; + + op->u.transform.start_x = x - op->u.transform.left_x; + op->u.transform.x = op->u.transform.start_x; + op->u.transform.y = y - op->u.transform.top_y; + op->u.transform.transform = pPict->transform; + op->u.transform.filter = pPict->filter; + + op->fetch = fbFetch_transform; + op->fetcha = fbFetcha_transform; + op->store = 0; + op->over = fbStepOver_transform; + op->down = fbStepDown_transform; + op->set = fbSet_transform; + op->indexed = (miIndexedPtr) pPict->pFormat->index.devPrivate; + op->clip = op[1].clip; + + return TRUE; + } + /* Check for external alpha */ + else if (alpha && pPict->alphaMap) { - if (!fbBuildOneCompositeOperand (pPict, &op[1], x, y)) + if (!fbBuildCompositeOperand (pPict, &op[1], x, y, FALSE, FALSE)) return FALSE; - if (!fbBuildOneCompositeOperand (pPict->alphaMap, &op[2], - x - pPict->alphaOrigin.x, - y - pPict->alphaOrigin.y)) + if (!fbBuildCompositeOperand (pPict->alphaMap, &op[2], + x - pPict->alphaOrigin.x, + y - pPict->alphaOrigin.y, + FALSE, FALSE)) return FALSE; - op[0].fetch = fbFetch_external; - op[0].fetcha = fbFetcha_external; - op[0].store = fbStore_external; - op[2].xoff -= pPict->alphaOrigin.x; - op[2].yoff -= pPict->alphaOrigin.y; + op->u.external.alpha_dx = pPict->alphaOrigin.x; + op->u.external.alpha_dy = pPict->alphaOrigin.y; + + op->fetch = fbFetch_external; + op->fetcha = fbFetcha_external; + op->store = fbStore_external; + op->over = fbStepOver_external; + op->down = fbStepDown_external; + op->set = fbSet_external; + op->indexed = (miIndexedPtr) pPict->pFormat->index.devPrivate; + /* XXX doesn't handle external alpha clips yet */ + op->clip = op[1].clip; + return TRUE; } + /* Build simple operand */ else { - return fbBuildOneCompositeOperand (pPict, &op[0], x, y); + int i; + int xoff, yoff; + + for (i = 0; i < NumAccessMap; i++) + if (fbAccessMap[i].format == pPict->format) + { + FbBits *bits; + FbStride stride; + int bpp; + + op->fetch = fbAccessMap[i].fetch; + op->fetcha = fbAccessMap[i].fetcha; + op->store = fbAccessMap[i].store; + op->over = fbStepOver; + op->down = fbStepDown; + op->set = fbSet; + op->indexed = (miIndexedPtr) pPict->pFormat->index.devPrivate; + op->clip = pPict->pCompositeClip; + + fbGetDrawable (pPict->pDrawable, bits, stride, bpp, + xoff, yoff); + if (pPict->repeat && pPict->pDrawable->width == 1 && + pPict->pDrawable->height == 1) + { + bpp = 0; + stride = 0; + } + /* + * Coordinates of upper left corner of drawable + */ + op->u.drawable.top_line = bits + yoff * stride; + op->u.drawable.left_offset = xoff * bpp; + + /* + * Starting position within drawable + */ + op->u.drawable.start_offset = op->u.drawable.left_offset + x * bpp; + op->u.drawable.line = op->u.drawable.top_line + y * stride; + op->u.drawable.offset = op->u.drawable.start_offset; + + op->u.drawable.stride = stride; + op->u.drawable.bpp = bpp; + return TRUE; + } + return FALSE; } } @@ -2438,16 +2825,16 @@ CARD16 width, CARD16 height) { - FbCompositeOperand src[3],msk[3],dst[3],*pmsk; + FbCompositeOperand src[4],msk[4],dst[4],*pmsk; FbCompositeOperand *srcPict, *srcAlpha; FbCompositeOperand *dstPict, *dstAlpha; FbCompositeOperand *mskPict = 0, *mskAlpha = 0; FbCombineFunc f; int w; - if (!fbBuildCompositeOperand (pSrc, src, xSrc, ySrc)) + if (!fbBuildCompositeOperand (pSrc, src, xSrc, ySrc, TRUE, TRUE)) return; - if (!fbBuildCompositeOperand (pDst, dst, xDst, yDst)) + if (!fbBuildCompositeOperand (pDst, dst, xDst, yDst, FALSE, TRUE)) return; if (pSrc->alphaMap) { @@ -2472,7 +2859,7 @@ f = fbCombineFuncU[op]; if (pMask) { - if (!fbBuildCompositeOperand (pMask, msk, xMask, yMask)) + if (!fbBuildCompositeOperand (pMask, msk, xMask, yMask, TRUE, TRUE)) return; pmsk = msk; if (pMask->componentAlpha) @@ -2494,48 +2881,17 @@ { w = width; - srcPict->offset = (xSrc + srcPict->xoff) * srcPict->bpp; - if (srcAlpha) - srcAlpha->offset = (xSrc + srcAlpha->xoff) * srcAlpha->bpp; - - dstPict->offset = (xDst + dstPict->xoff) * dstPict->bpp; - if (dstAlpha) - dstAlpha->offset = (xDst + dstAlpha->xoff) * dstAlpha->bpp; - - if (pmsk) - { - mskPict->offset = (xMask + mskPict->xoff) * mskPict->bpp; - if (mskAlpha) - mskAlpha->offset = (xMask + mskAlpha->xoff) * mskAlpha->bpp; - } while (w--) { (*f) (src, pmsk, dst); - srcPict->offset += srcPict->bpp; - if (srcAlpha) - srcAlpha->offset += srcAlpha->bpp; - dstPict->offset += dstPict->bpp; - if (dstAlpha) - dstAlpha->offset += dstAlpha->bpp; + (*src->over) (src); + (*dst->over) (dst); if (pmsk) - { - mskPict->offset += mskPict->bpp; - if (mskAlpha) - mskAlpha->offset += mskAlpha->bpp; - } + (*pmsk->over) (pmsk); } - srcPict->line += srcPict->stride; - if (srcAlpha) - srcAlpha->line += srcAlpha->stride; - - dstPict->line += dstPict->stride; - if (dstAlpha) - dstAlpha->line += dstAlpha->stride; + (*src->down) (src); + (*dst->down) (dst); if (pmsk) - { - mskPict->line += mskPict->stride; - if (mskAlpha) - mskAlpha->line += mskAlpha->stride; - } + (*pmsk->down) (pmsk); } } Index: xc/programs/Xserver/fb/fbfill.c diff -u xc/programs/Xserver/fb/fbfill.c:1.4 xc/programs/Xserver/fb/fbfill.c:1.6 --- xc/programs/Xserver/fb/fbfill.c:1.4 Tue May 29 00:54:09 2001 +++ xc/programs/Xserver/fb/fbfill.c Thu Jan 30 19:01:45 2003 @@ -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/fbfill.c,v 1.4 2001/05/29 04:54:09 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbfill.c,v 1.6 2003/01/31 00:01:45 torrey Exp $ */ #include "fb.h" @@ -81,8 +81,8 @@ pPriv->pm, dstBpp, - (pGC->patOrg.x + pDrawable->x), - pGC->patOrg.y + pDrawable->y - y); + (pGC->patOrg.x + pDrawable->x + dstXoff), + pGC->patOrg.y + pDrawable->y + dstYoff - y); } else { @@ -106,9 +106,9 @@ } fbGetStipDrawable (&pStip->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); - fbStipple (dst + y * dstStride, + fbStipple (dst + (y + dstYoff) * dstStride, dstStride, - x * dstBpp, + (x + dstXoff) * dstBpp, dstBpp, width * dstBpp, height, stip, @@ -118,8 +118,8 @@ pPriv->evenStipple, fgand, fgxor, bgand, bgxor, - pGC->patOrg.x + pDrawable->x, - pGC->patOrg.y + pDrawable->y - y); + pGC->patOrg.x + pDrawable->x + dstXoff, + pGC->patOrg.y + pDrawable->y + dstYoff - y); } break; } @@ -146,8 +146,8 @@ pGC->alu, pPriv->pm, dstBpp, - (pGC->patOrg.x + pDrawable->x) * dstBpp, - pGC->patOrg.y + pDrawable->y - y); + (pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp, + pGC->patOrg.y + pDrawable->y + dstYoff - y); break; } } Index: xc/programs/Xserver/fb/fboverlay.c diff -u xc/programs/Xserver/fb/fboverlay.c:1.4 xc/programs/Xserver/fb/fboverlay.c:1.5 --- xc/programs/Xserver/fb/fboverlay.c:1.4 Tue Sep 26 11:57:03 2000 +++ xc/programs/Xserver/fb/fboverlay.c Mon Sep 16 14:05:34 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fboverlay.c,v 1.4 2000/09/26 15:57:03 tsi Exp $ + * $XFree86: xc/programs/Xserver/fb/fboverlay.c,v 1.5 2002/09/16 18:05:34 eich Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -27,7 +27,7 @@ #include "fboverlay.h" int fbOverlayGeneration; -int fbOverlayScreenPrivateIndex; +int fbOverlayScreenPrivateIndex = -1; /* * Replace this if you want something supporting @@ -42,6 +42,12 @@ if (pWin->drawable.class != InputOutput) return TRUE; + +#ifdef FB_SCREEN_PRIVATE + if (pWin->drawable.bitsPerPixel == 32) + pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp; +#endif + for (i = 0; i < pScrPriv->nlayers; i++) { pPixmap = pScrPriv->layer[i].u.run.pixmap; @@ -296,6 +302,30 @@ bpp1); } +static Bool +fb24_32OverlayCreateScreenResources(ScreenPtr pScreen) +{ + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); + int pitch; + Bool retval; + int i; + + if((retval = fbOverlayCreateScreenResources(pScreen))) { + for (i = 0; i < pScrPriv->nlayers; i++) + { + /* fix the screen pixmap */ + PixmapPtr pPix = (PixmapPtr) pScrPriv->layer[i].u.run.pixmap; + if (pPix->drawable.bitsPerPixel == 32) { + pPix->drawable.bitsPerPixel = 24; + pitch = BitmapBytePad(pPix->drawable.width * 24); + pPix->devKind = pitch; + } + } + } + + return retval; +} + Bool fbOverlayFinishScreenInit(ScreenPtr pScreen, pointer pbits1, @@ -315,9 +345,10 @@ DepthPtr depths; int nvisuals; int ndepths; + int bpp = 0, imagebpp = 32; VisualID defaultVisual; FbOverlayScrPrivPtr pScrPriv; - + if (fbOverlayGeneration != serverGeneration) { fbOverlayScreenPrivateIndex = AllocateScreenPrivateIndex (); @@ -327,7 +358,46 @@ pScrPriv = xalloc (sizeof (FbOverlayScrPrivRec)); if (!pScrPriv) return FALSE; - + +#ifdef FB_24_32BIT + if (bpp1 == 32 || bpp2 == 32) + bpp = 32; + else if (bpp1 == 24 || bpp2 == 24) + bpp = 24; + + if (bpp == 24) + { + int f; + + imagebpp = 32; + /* + * Check to see if we're advertising a 24bpp image format, + * in which case windows will use it in preference to a 32 bit + * format. + */ + for (f = 0; f < screenInfo.numPixmapFormats; f++) + { + if (screenInfo.formats[f].bitsPerPixel == 24) + { + imagebpp = 24; + break; + } + } + } +#endif +#ifdef FB_SCREEN_PRIVATE + if (imagebpp == 32) + { + fbGetScreenPrivate(pScreen)->win32bpp = bpp; + fbGetScreenPrivate(pScreen)->pix32bpp = bpp; + } + else + { + fbGetScreenPrivate(pScreen)->win32bpp = 32; + fbGetScreenPrivate(pScreen)->pix32bpp = 32; + } +#endif + if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1, &defaultVisual, ((unsigned long)1<<(bpp1-1)) | ((unsigned long)1<<(bpp2-1)), 8)) @@ -353,7 +423,7 @@ pScrPriv->layer[0].u.init.pbits = pbits1; pScrPriv->layer[0].u.init.width = width1; pScrPriv->layer[0].u.init.depth = depth1; - + pScrPriv->layer[1].u.init.pbits = pbits2; pScrPriv->layer[1].u.init.width = width2; pScrPriv->layer[1].u.init.depth = depth2; @@ -367,5 +437,13 @@ pScreen->WindowExposures = fbOverlayWindowExposures; pScreen->CopyWindow = fbOverlayCopyWindow; pScreen->PaintWindowBorder = fbOverlayPaintWindow; +#ifdef FB_24_32BIT + if (bpp == 24 && imagebpp == 32) + { + pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader; + pScreen->CreateScreenResources = fb24_32OverlayCreateScreenResources; + } +#endif + return TRUE; } Index: xc/programs/Xserver/fb/fboverlay.h diff -u xc/programs/Xserver/fb/fboverlay.h:1.3 xc/programs/Xserver/fb/fboverlay.h:1.5 --- xc/programs/Xserver/fb/fboverlay.h:1.3 Wed Aug 9 13:50:52 2000 +++ xc/programs/Xserver/fb/fboverlay.h Thu Sep 19 09:22:00 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fboverlay.h,v 1.3 2000/08/09 17:50:52 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fboverlay.h,v 1.5 2002/09/19 13:22:00 tsi Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -57,9 +57,9 @@ FbOverlayLayer layer[FB_OVERLAY_MAX]; } FbOverlayScrPrivRec, *FbOverlayScrPrivPtr; -#define fbOverlayGetScrPriv(s) ((FbOverlayScrPrivPtr) \ - (s)->devPrivates[fbOverlayScreenPrivateIndex].ptr) - +#define fbOverlayGetScrPriv(s) \ + ((fbOverlayScreenPrivateIndex != -1) ? \ + (s)->devPrivates[fbOverlayScreenPrivateIndex].ptr : NULL) Bool fbOverlayCreateWindow(WindowPtr pWin); Index: xc/programs/Xserver/fb/fbpict.c diff -u xc/programs/Xserver/fb/fbpict.c:1.12 xc/programs/Xserver/fb/fbpict.c:1.16 --- xc/programs/Xserver/fb/fbpict.c:1.12 Mon Jul 16 01:04:05 2001 +++ xc/programs/Xserver/fb/fbpict.c Fri Dec 13 20:46:02 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbpict.c,v 1.12 2001/07/16 05:04:05 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fbpict.c,v 1.16 2002/12/14 01:46:02 dawes Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -671,7 +671,7 @@ CARD8 *dstLine, *dst; CARD8 *srcLine, *src; FbStride dstStride, srcStride; - CARD8 w; + CARD16 w; CARD8 s, d; CARD16 t; @@ -689,13 +689,17 @@ while (w--) { s = *src++; - if (s != 0xff) + if (s) { - d = *dst; - t = d + s; - s = t | (0 - (t >> 8)); + if (s != 0xff) + { + d = *dst; + t = d + s; + s = t | (0 - (t >> 8)); + } + *dst = s; } - *dst++ = s; + dst++; } } } @@ -736,19 +740,23 @@ while (w--) { s = *src++; - if (s != 0xffffffff) + if (s) { - d = *dst; - if (d) + if (s != 0xffffffff) { - m = FbAdd(s,d,0,t); - n = FbAdd(s,d,8,t); - o = FbAdd(s,d,16,t); - p = FbAdd(s,d,24,t); - s = m|n|o|p; + d = *dst; + if (d) + { + m = FbAdd(s,d,0,t); + n = FbAdd(s,d,8,t); + o = FbAdd(s,d,16,t); + p = FbAdd(s,d,24,t); + s = m|n|o|p; + } } + *dst = s; } - *dst++ = s; + dst++; } } } @@ -820,6 +828,13 @@ fbComposeGetSolid(pSrc, src); + if ((src & 0xff000000) != 0xff000000) + { + fbCompositeGeneral (op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height); + return; + } fbGetStipDrawable (pMask->pDrawable, maskBits, maskStride, maskBpp, maskXoff, maskYoff); fbGetDrawable (pDst->pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); @@ -908,6 +923,7 @@ return; func = fbCompositeGeneral; + if (!pSrc->transform && !(pMask && pMask->transform)) if (!maskAlphaMap && !srcAlphaMap && !dstAlphaMap) switch (op) { case PictOpOver: @@ -1143,6 +1159,7 @@ ps->Composite = fbComposite; ps->Glyphs = miGlyphs; ps->CompositeRects = miCompositeRects; + ps->RasterizeTrapezoid = fbRasterizeTrapezoid; #endif /* RENDER */ Index: xc/programs/Xserver/fb/fbpict.h diff -u xc/programs/Xserver/fb/fbpict.h:1.8 xc/programs/Xserver/fb/fbpict.h:1.11 --- xc/programs/Xserver/fb/fbpict.h:1.8 Thu Aug 16 04:03:25 2001 +++ xc/programs/Xserver/fb/fbpict.h Wed Sep 25 22:56:48 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbpict.h,v 1.8 2001/08/16 08:03:25 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fbpict.h,v 1.11 2002/09/26 02:56:48 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -75,17 +75,43 @@ typedef CARD32 (*FbCompositeFetch)(FbCompositeOperand *op); typedef void (*FbCompositeStore) (FbCompositeOperand *op, CARD32 value); +typedef void (*FbCompositeStep) (FbCompositeOperand *op); +typedef void (*FbCompositeSet) (FbCompositeOperand *op, int x, int y); + struct _FbCompositeOperand { - FbBits *line; - CARD32 offset; - FbStride stride; - int xoff; - int yoff; - int bpp; + union { + struct { + FbBits *top_line; + int left_offset; + + int start_offset; + FbBits *line; + CARD32 offset; + FbStride stride; + int bpp; + } drawable; + struct { + int alpha_dx; + int alpha_dy; + } external; + struct { + int top_y; + int left_x; + int start_x; + int x; + int y; + PictTransformPtr transform; + int filter; + } transform; + } u; FbCompositeFetch fetch; FbCompositeFetch fetcha; FbCompositeStore store; + FbCompositeStep over; + FbCompositeStep down; + FbCompositeSet set; miIndexedPtr indexed; + RegionPtr clip; }; typedef void (*FbCombineFunc) (FbCompositeOperand *src, @@ -279,6 +305,221 @@ FbCompositeOperand *msk, FbCompositeOperand *dst); +CARD8 +fbCombineDisjointOutPart (CARD8 a, CARD8 b); + +CARD8 +fbCombineDisjointInPart (CARD8 a, CARD8 b); + +void +fbCombineDisjointGeneralU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst, + CARD8 combine); + +void +fbCombineDisjointGeneralC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst, + CARD8 combine); + +void +fbCombineDisjointOverU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointOverC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointOverReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointOverReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointInU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointInC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointInReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointInReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointOutU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointOutC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); +void +fbCombineDisjointOutReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointOutReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointAtopU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointAtopC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointAtopReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointAtopReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointXorU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDisjointXorC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +CARD8 +fbCombineConjointOutPart (CARD8 a, CARD8 b); + +CARD8 +fbCombineConjointInPart (CARD8 a, CARD8 b); + + +void +fbCombineConjointGeneralU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst, + CARD8 combine); + +void +fbCombineConjointGeneralC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst, + CARD8 combine); + +void +fbCombineConjointOverU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointOverC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); +void +fbCombineConjointOverReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointOverReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointInU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointInC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointInReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + + +void +fbCombineConjointInReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointOutU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointOutC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointOutReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointOutReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointAtopU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointAtopC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointAtopReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); +void +fbCombineConjointAtopReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointXorU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineConjointXorC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + /* * All fetch functions */ @@ -320,6 +561,18 @@ fbFetch_x1b5g5r5 (FbCompositeOperand *op); CARD32 +fbFetch_a4r4g4b4 (FbCompositeOperand *op); + +CARD32 +fbFetch_x4r4g4b4 (FbCompositeOperand *op); + +CARD32 +fbFetch_a4b4g4r4 (FbCompositeOperand *op); + +CARD32 +fbFetch_x4b4g4r4 (FbCompositeOperand *op); + +CARD32 fbFetch_a8 (FbCompositeOperand *op); CARD32 @@ -338,6 +591,9 @@ fbFetch_a2b2g2r2 (FbCompositeOperand *op); CARD32 +fbFetch_c8 (FbCompositeOperand *op); + +CARD32 fbFetch_a4 (FbCompositeOperand *op); CARD32 @@ -356,11 +612,17 @@ fbFetch_a1b1g1r1 (FbCompositeOperand *op); CARD32 +fbFetch_c4 (FbCompositeOperand *op); + +CARD32 fbFetch_a1 (FbCompositeOperand *op); CARD32 fbFetcha_a1 (FbCompositeOperand *op); +CARD32 +fbFetch_g1 (FbCompositeOperand *op); + void fbStore_a8r8g8b8 (FbCompositeOperand *op, CARD32 value); @@ -398,6 +660,18 @@ fbStore_x1b5g5r5 (FbCompositeOperand *op, CARD32 value); void +fbStore_a4r4g4b4 (FbCompositeOperand *op, CARD32 value); + +void +fbStore_x4r4g4b4 (FbCompositeOperand *op, CARD32 value); + +void +fbStore_a4b4g4r4 (FbCompositeOperand *op, CARD32 value); + +void +fbStore_x4b4g4r4 (FbCompositeOperand *op, CARD32 value); + +void fbStore_a8 (FbCompositeOperand *op, CARD32 value); void @@ -410,6 +684,13 @@ fbStore_a2r2g2b2 (FbCompositeOperand *op, CARD32 value); void +fbStore_c8 (FbCompositeOperand *op, CARD32 value); + +void +fbStore_g8 (FbCompositeOperand *op, CARD32 value); + + +void fbStore_a4 (FbCompositeOperand *op, CARD32 value); void @@ -425,12 +706,27 @@ fbStore_a1b1g1r1 (FbCompositeOperand *op, CARD32 value); void +fbStore_c4 (FbCompositeOperand *op, CARD32 value); + +void +fbStore_g4 (FbCompositeOperand *op, CARD32 value); + +void fbStore_a1 (FbCompositeOperand *op, CARD32 value); +void +fbStore_g1 (FbCompositeOperand *op, CARD32 value); + CARD32 fbFetch_external (FbCompositeOperand *op); CARD32 +fbFetch_transform (FbCompositeOperand *op); + +CARD32 +fbFetcha_transform (FbCompositeOperand *op); + +CARD32 fbFetcha_external (FbCompositeOperand *op); void @@ -446,7 +742,9 @@ fbBuildCompositeOperand (PicturePtr pPict, FbCompositeOperand *op, INT16 x, - INT16 y); + INT16 y, + Bool transform, + Bool alpha); void fbCompositeGeneral (CARD8 op, PicturePtr pSrc, @@ -667,5 +965,12 @@ INT16 yDst, CARD16 width, CARD16 height); + +/* fbtrap.c */ +void +fbRasterizeTrapezoid (PicturePtr alpha, + xTrapezoid *trap, + int x_off, + int y_off); #endif /* _FBPICT_H_ */ Index: xc/programs/Xserver/fb/fbpixmap.c diff -u xc/programs/Xserver/fb/fbpixmap.c:1.10 xc/programs/Xserver/fb/fbpixmap.c:1.11 --- xc/programs/Xserver/fb/fbpixmap.c:1.10 Fri Sep 7 11:15:31 2001 +++ xc/programs/Xserver/fb/fbpixmap.c Mon Sep 16 14:05:34 2002 @@ -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/fbpixmap.c,v 1.10 2001/09/07 15:15:31 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbpixmap.c,v 1.11 2002/09/16 18:05:34 eich Exp $ */ #include "fb.h" #ifdef IN_MODULE @@ -72,6 +72,7 @@ pPixmap->devPrivate.ptr = (void *) ((char *) pPixmap->devPrivate.ptr + paddedWidth); fbInitializeDrawable (&pPixmap->drawable); #endif + return pPixmap; } Index: xc/programs/Xserver/fb/fbtrap.c diff -u /dev/null xc/programs/Xserver/fb/fbtrap.c:1.10 --- /dev/null Thu Feb 27 12:29:15 2003 +++ xc/programs/Xserver/fb/fbtrap.c Thu Sep 26 20:31:24 2002 @@ -0,0 +1,1382 @@ +/* + * $XFree86: xc/programs/Xserver/fb/fbtrap.c,v 1.10 2002/09/27 00:31:24 keithp Exp $ + * + * Copyright © 2000 University of Southern California + * + * 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 University + * of Southern California not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. University of Southern California makes + * no representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * University of Southern California DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE 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. + * + * Author: Carl Worth, USC, Information Sciences Institute */ + +#include "fb.h" + +#ifdef RENDER + +#include "picturestr.h" +#include "mipict.h" +#include "fbpict.h" + +#ifdef DEBUG +#include <stdio.h> +#include <assert.h> + +#define ASSERT(e) assert(e) + +#endif + +#ifndef ASSERT +#define ASSERT(e) +#endif + +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) + +#define MAX_AREA 0x80000000 + +/* + * A RationalPoint is an exact position along one of the trapezoid + * edges represented by an approximate position (x,y) and two error + * terms (ex_dy, ey_dx). The error in X is multiplied by the Y + * dimension of the line while the error in Y is multiplied by the + * X dimension of the line, allowing an exact measurement of the + * distance from (x,y) to the line. + * + * Generally, while walking an edge, one of ex_dy/ey_dx will be zero + * indicating that the position error is held in the other. + */ +typedef struct { + xFixed x; + xFixed ex_dy; + xFixed y; + xFixed ey_dx; +} RationalPoint; + +/* + * Edges are walked both horizontally and vertically + * They are walked vertically to get to a particular row + * of pixels, and then walked horizontally within that row + * to compute pixel coverage. + * + * Edges are always walked from top to bottom and from + * left to right. This means that for lines moving leftwards + * from top to bottom, the left to right walking actually moves + * backwards along the line with respect to the top to bottom + * walking. + */ + +/* + * A RationalRow represents the two positions where + * an edge intersects a row of pixels. This is used + * to walk an edge vertically + */ + +typedef struct { + RationalPoint top; /* intersection at top of row */ + RationalPoint bottom; /* intersection at bottom of row */ + RationalPoint pixel_top; /* intersection at top of pixel */ +} RationalRow; + +/* + * A RationalCol represents the two positions where + * an edge intersects a column of pixels + */ + +typedef struct { + RationalPoint left; /* intersection at left of column */ + RationalPoint right; /* intersection at right of column */ +} RationalCol; + +/* + Here are some thoughts on line walking: + + Conditions: c2.x - c1.x = 1 + r2.y - r1.y = 1 + + A B C D E F G H + c1\ c1 c2 /c2 +r1 r1 |\ \ r1 r1 / r1/| r1 r1 +\-+---+ \-+---+ +-\-+ +\--+ +--/+ +-/-+ +---+-/ +---+-/ + \| | `.c1 | |r1\| | \ | | / | |/ | | .' | |/ +c1\ | |`-.|c2 | \c2 | | | | | | c1/ | c1|,_/|c2 | /c2 + |\ | | `. | |\ | \ | | / | /| | ./ | | /| + +-\-+ +---+-\ +---+-\ +--\+ +/--+ /-+---+ /-+---+ +-/-+ + r2\| r2 r2 r2\ /r2 r2 r2 |/r2 + \c2 c2 c1 c1/ + + Bottom Right Right Bottom Top Top Right Right + +State transitions: + +A -> C, D E -> E, F +B -> A, B F -> G, H +C -> A, B G -> G, H +D -> C, D H -> E, F + +*/ + +/* + * Values for PixelWalk.depart. Top and Bottom can have the same value + * as only one mode is possible given a line of either positive or + * negative slope. These mark the departure edge while walking + * rightwards across columns. + */ + +typedef enum _departure { + DepartTop = 0, /* edge exits top of pixel */ + DepartBottom = 0, /* edge exits bottom of pixel */ + DepartRight = 1 /* edge exits right edge of pixel */ +} Departure; + +/* + * PixelWalk + * + * This structure holds state to walk a single edge down the trapezoid. + * + * The edge is walked twice -- once by rows and once by columns. + * The two intersections of the pixel by the edge are then set + * from either the row or column position, depending on which edge + * is intersected. + * + * Note that for lines moving left, walking by rows moves down the + * line (increasing y) while walking by columns moves up the line + * (decreasing y). + */ +typedef struct { + xFixed dx; + xFixed ey_thresh; + xFixed dy; + xFixed ex_thresh; + + Departure depart; + + /* slope */ + xFixed m; + xFixed em_dx; + xFixed y_correct; + xFixed ey_correct; + + /* Inverse slope. Does this have a standard symbol? */ + xFixed p; + xFixed ep_dy; + xFixed x_correct; + xFixed ex_correct; + + /* Trapezoid bottom, used to limit walking to the last row */ + xFixed bottom; + + /* + * Current edge positions along pixel rows and columns + */ + RationalRow row; + RationalCol col; + + /* + * The three pixel intersection points, copied from the appropriate + * row or column position above + */ + RationalPoint p_pixel_top; + RationalPoint p_trap_top; + RationalPoint p_trap_bottom; +} PixelWalk; + +#if 0 +#ifdef GCC +#define INLINE inline +#endif +#endif + +#ifndef INLINE +#define INLINE +#endif + +/* + * Step 'pt' vertically to 'newy'. + */ +static INLINE void +pixelWalkMovePointToRow (PixelWalk *pw, RationalPoint *pt, xFixed newy) +{ + xFixed_32_32 oex; + xFixed xoff; + + /* X error of old X position and new Y position */ + oex = (xFixed_32_32) pw->dx * (newy - pt->y) - pt->ey_dx + pt->ex_dy; + + /* amount to step X by */ + xoff = oex / pw->dy; + + /* step X */ + pt->x = pt->x + xoff; + + /* set new X error value for new X position and new Y positition */ + pt->ex_dy = oex - (xFixed_32_32) pw->dy * xoff; + + /* set new Y position, set Y error to zero */ + pt->y = newy; + pt->ey_dx = 0; +} + +/* + * Step 'pt' horizontally to 'newx' + */ +static INLINE void +pixelWalkMovePointToCol (PixelWalk *pw, RationalPoint *pt, xFixed newx) +{ + xFixed_32_32 oey; + xFixed yoff; + + /* Special case vertical lines to arbitrary y */ + if (pw->dx == 0) + { + pt->x = newx; + pt->ex_dy = 0; + pt->y = 0; + pt->ey_dx = 0; + } + else + { + /* Y error of old Y position and new X position */ + oey = (xFixed_32_32) pw->dy * (newx - pt->x) - pt->ex_dy + pt->ey_dx; + + /* amount to step Y by */ + yoff = oey / pw->dx; + + /* step Y */ + pt->y = pt->y + yoff; + + /* set new Y error value for new Y position and new X position */ + pt->ey_dx = oey - (xFixed_32_32) pw->dx * yoff; + + /* set new X position, set X error to zero */ + pt->x = newx; + pt->ex_dy = 0; + } +} + +/* + * Step the 'row' element of 'pw' vertically + * (increasing y) by one whole pixel + */ +static INLINE void +pixelWalkStepRow (PixelWalk *pw) +{ + xFixed y_next = xFixedFloor (pw->row.bottom.y) + xFixed1; + + if (y_next > pw->bottom) + y_next = pw->bottom; + + /* pw.row.top.y < pw.row.bottom.y */ + pw->row.top = pw->row.bottom; + + if (y_next - pw->row.bottom.y == xFixed1) + { + pw->row.pixel_top = pw->row.bottom; + pw->row.bottom.y += xFixed1; + pw->row.bottom.x += pw->p; + pw->row.bottom.ex_dy += pw->ep_dy; + if (abs (pw->row.bottom.ex_dy) > pw->ex_thresh) + { + pw->row.bottom.x += pw->x_correct; + pw->row.bottom.ex_dy += pw->ex_correct; + } + } + else + { + pixelWalkMovePointToRow (pw, &pw->row.pixel_top, + xFixedCeil (y_next) - xFixed1); + pixelWalkMovePointToRow (pw, &pw->row.bottom, y_next); + } +} + +/* + * Step the 'col' element of 'pw' horizontally + * (increasing x) by one whole pixel + */ +static INLINE void +pixelWalkStepCol (PixelWalk *pw) +{ + /* pw.col.p1.x < pw.col.p2.x */ + /* + * Copy the current right point into the left point + */ + pw->col.left = pw->col.right; + + /* + * Now incrementally walk across the pixel + */ + pw->col.right.x += xFixed1; + pw->col.right.y += pw->m; + pw->col.right.ey_dx += pw->em_dx; + if (pw->col.right.ey_dx > pw->ey_thresh) + { + pw->col.right.y += pw->y_correct; + pw->col.right.ey_dx += pw->ey_correct; + } +} +/* + * Walk to the nearest edge of the next pixel, filling in both p1 and + * p2 as necessary from either the row or col intersections. + * + * The "next" pixel is defined to be the next pixel intersected by the + * line with pixels visited in raster scan order, (for the benefit of + * cache performance). For lines with positive slope it is easy to + * achieve raster scan order by simply calling StepCol for each pixel + * in a given scanline, then calling StepRow once at the end of each + * scanline. + * + * However, for lines of negative slope where the magnitude of dx is + * greater than dy, a little more work needs to be done. The pixels of + * a particular scanline will be visited by succesive calls to StepCol + * as before. This will effectively step "up" the line as we scan from + * left to right. But, the call to StepRow at the end of the scan line + * will step "down" the line and the column information will be + * invalid at that point. + * + * For now, I fix up the column of all negative slope lines by calling + * MovePointToCol at the end of each scanline. However, this is an + * extremely expensive operation since it involves a 64-bit multiply + * and a 64-bit divide. It would be much better, (at least as long as + * abs(dx) is not much greater than dy), to instead step the col + * backwards as many times as necessary. Or even better, we could + * simply restore col to the position it began at when we started the + * scanline, then simply step it backwards once. That would give a + * performance benefit for lines with slope of any magnitude. + */ + +static INLINE void +pixelWalkNextPixel (PixelWalk *pw) +{ + if (pw->dx < 0) + { + /* + * left moving lines + * + * Check which pixel edge we're departing from + * + * Remember that in this case (dx < 0), the 'row' element of 'pw' + * walks down the line while 'col' walks up + */ + if (pw->depart == DepartTop) + { + /* + * The edge departs the row at this pixel, the + * next time it gets used will be for the next row + * + * Step down one row and then recompute the + * column values to start the next row of + * pixels + */ + pixelWalkStepRow(pw); + /* + * Set column exit pixel + */ + pixelWalkMovePointToCol(pw, &pw->col.right, xFixedFloor(pw->row.bottom.x)); + /* + * This moves the exit pixel to the entry pixel + * and computes the next exit pixel + */ + pixelWalkStepCol(pw); + /* + * The first pixel on the next row will always + * be entered from below, set the lower + * intersection of this edge with that pixel + */ + pw->p_trap_bottom = pw->row.bottom; + } + else /* pw->depart == DepartRight */ + { + /* + * easy case -- just move right one pixel + */ + pixelWalkStepCol(pw); + /* + * Set the lower intersection of the edge with the + * pixel -- that's just where the edge entered + * the pixel from the left + */ + pw->p_trap_bottom = pw->col.left; + } + /* + * Now compute which edge the pixel + * is departing from + */ + if (pw->row.top.x <= pw->col.right.x) + { + /* + * row intersection is left of column intersection, + * that means the edge hits the top of the pixel + * before it hits the right edge + */ + pw->p_trap_top = pw->row.top; + pw->depart = DepartTop; + /* + * Further check to see whether the edge + * leaves the right or top edge of the + * whole pixel + */ + if (pw->row.pixel_top.x <= pw->col.right.x) + pw->p_pixel_top = pw->row.pixel_top; + else + pw->p_pixel_top = pw->col.right; + } + else + { + /* + * Row intersection is right of colum intersection, + * that means the edge hits the right edge of the + * pixel first + */ + pw->p_trap_top = pw->col.right; + pw->p_pixel_top = pw->col.right; + pw->depart = DepartRight; + } + } + else + { + /* + * right moving lines + * + * Check which edge we're departing from + * + * In the dx >= 0 case, the row and col elements both + * walk downwards + */ + if (pw->depart == DepartBottom) + { + /* + * The edge departs the row at this pixel, + * the next time it gets used will be for the + * next row + * + * Step down one row and (maybe) over one + * column to prepare for the next row + */ + if (pw->row.bottom.x == pw->col.right.x) + { + /* + * right through the corner of the pixel, + * adjust the column + */ + pixelWalkStepCol(pw); + } + pixelWalkStepRow(pw); + /* + * Set the upper intersection of the edge with + * the pixel, the first pixel on the next + * row is always entered from the top + */ + pw->p_trap_top = pw->row.top; + pw->p_pixel_top = pw->row.pixel_top; + } + else /* pw->depart == DepartRight */ + { + /* + * Easy case -- move right one + * pixel + */ + pixelWalkStepCol(pw); + /* + * Set the upper intersection of the edge + * with the pixel, that's along the left + * edge of the pixel + */ + pw->p_trap_top = pw->col.left; + pw->p_pixel_top = pw->col.left; + } + /* + * Now compute the exit edge and the + * lower intersection of the edge with the pixel + */ + if (pw->row.bottom.x <= pw->col.right.x) + { + /* + * Hit the place where the edge leaves + * the pixel, the lower intersection is + * where the edge hits the bottom + */ + pw->p_trap_bottom = pw->row.bottom; + pw->depart = DepartBottom; + } + else + { + /* + * The edge goes through the + * next pixel on the row, + * the lower intersection is where the + * edge hits the right side of the pixel + */ + pw->p_trap_bottom = pw->col.right; + pw->depart = DepartRight; + } + } +} + +/* + * Compute the first pixel intersection points + * and the departure type from that pixel + */ +static void +pixelWalkFirstPixel (PixelWalk *pw) +{ + if (pw->dx < 0) + { + if (pw->row.top.x <= pw->col.right.x) + { + /* + * leaving through the top. + * upper position is the upper point of + * the 'row' element + */ + pw->depart = DepartTop; + pw->p_trap_top = pw->row.top; + /* + * further check for pixel top + */ + if (pw->row.pixel_top.x <= pw->col.right.x) + pw->p_pixel_top = pw->row.pixel_top; + else + pw->p_pixel_top = pw->col.right; + } + else + { + /* + * leaving through the right side + * upper position is the right point of + * the 'col' element + */ + pw->depart = DepartRight; + pw->p_trap_top = pw->col.right; + pw->p_pixel_top = pw->col.right; + } + /* + * Now find the lower pixel intersection point + */ + if (pw->row.bottom.x >= pw->col.left.x) + /* + * entering through bottom, + * lower position is the bottom point of + * the 'row' element + */ + pw->p_trap_bottom = pw->row.bottom; + else + /* + * entering through left side, + * lower position is the left point of + * the 'col' element + */ + pw->p_trap_bottom = pw->col.left; + } + else + { + if (pw->row.bottom.x <= pw->col.right.x) + { + /* + * leaving through the bottom (or corner). + * lower position is the lower point of + * the 'row' element + */ + pw->depart = DepartBottom; + pw->p_trap_bottom = pw->row.bottom; + } + else + { + /* + * leaving through the right side + * lower position is the right point of + * the 'col' element + */ + pw->depart = DepartRight; + pw->p_trap_bottom = pw->col.right; + } + /* + * Now find the upper pixel intersection point + */ + if (pw->row.top.x >= pw->col.left.x) + { + /* + * entering through the top (or corner), + * upper position is the top point + * of the 'row' element + */ + pw->p_trap_top = pw->row.top; + /* + * further check for pixel entry + */ + if (pw->row.pixel_top.x >= pw->col.left.x) + pw->p_pixel_top = pw->row.pixel_top; + else + pw->p_pixel_top = pw->col.left; + } + else + { + /* + * entering through the left side, + * upper position is the left point of + * the 'col' element + */ + pw->p_trap_top = pw->col.left; + pw->p_pixel_top = pw->col.left; + } + } +} + +static void +pixelWalkInit (PixelWalk *pw, xLineFixed *line, xFixed top_y, xFixed bottom_y) +{ + xFixed_32_32 dy_inc, dx_inc; + xFixed next_y; + xFixed left_x; + xPointFixed *top, *bot; + + next_y = xFixedFloor (top_y) + xFixed1; + if (next_y > bottom_y) + next_y = bottom_y; + + /* + * Orient lines top down + */ + if (line->p1.y < line->p2.y) + { + top = &line->p1; + bot = &line->p2; + } + else + { + top = &line->p2; + bot = &line->p1; + } + + pw->dx = bot->x - top->x; + pw->ey_thresh = abs(pw->dx >> 1); + pw->dy = bot->y - top->y; + pw->ex_thresh = pw->dy >> 1; + + /* + * Set step values for walking lines + */ + if (pw->dx < 0) + { + pw->x_correct = -1; + pw->ex_correct = pw->dy; + pw->y_correct = -1; + pw->ey_correct = pw->dx; + } + else + { + pw->x_correct = 1; + pw->ex_correct = -pw->dy; + pw->y_correct = 1; + pw->ey_correct = -pw->dx; + } + + pw->bottom = bottom_y; + + /* + * Compute Bresenham values for walking edges incrementally + */ + dy_inc = (xFixed_32_32) xFixed1 * pw->dy; /* > 0 */ + if (pw->dx != 0) + { + pw->m = dy_inc / pw->dx; /* sign(dx) */ + pw->em_dx = dy_inc - (xFixed_32_32) pw->m * pw->dx; /* > 0 */ + } + else + { + /* Vertical line. Setting these to zero prevents us from + having to put any conditions in pixelWalkStepCol. */ + pw->m = 0; + pw->em_dx = 0; + } + + dx_inc = (xFixed_32_32) xFixed1 * (xFixed_32_32) pw->dx; /* sign(dx) */ + pw->p = dx_inc / pw->dy; /* sign(dx) */ + pw->ep_dy = dx_inc - (xFixed_32_32) pw->p * pw->dy; /* sign(dx) */ + + /* + * Initialize 'row' for walking down rows + */ + pw->row.bottom.x = top->x; + pw->row.bottom.ex_dy = 0; + pw->row.bottom.y = top->y; + pw->row.bottom.ey_dx = 0; + + /* + * Initialize 'pixel_top' to be on the line for + * the first step + */ + pw->row.pixel_top = pw->row.bottom; + /* + * Move to the pixel above the 'top_y' coordinate, + * first setting 'bottom' and then using StepRow + * which moves that to 'top' and computes the next 'bottom' + */ + pixelWalkMovePointToRow(pw, &pw->row.bottom, top_y); + pixelWalkStepRow(pw); + + /* + * Initialize 'col' for walking across columns + */ + pw->col.right.x = top->x; + pw->col.right.ex_dy = 0; + pw->col.right.y = top->y; + pw->col.right.ey_dx = 0; + + /* + * First set the column to the left most + * pixel hit by the row + */ + if (pw->dx < 0) + left_x = pw->row.bottom.x; + else + left_x = pw->row.top.x; + + pixelWalkMovePointToCol(pw, &pw->col.right, xFixedFloor (left_x)); + pixelWalkStepCol(pw); + + /* + * Compute first pixel intersections and the + * first departure state + */ + pixelWalkFirstPixel (pw); +} + +#define RoundShift(a,b) (((a) + (1 << ((b) - 1))) >> (b)) +#define MaxAlpha(depth) ((1 << (depth)) - 1) + +#define AreaAlpha(area, depth) (RoundShift (RoundShift (area, depth) * \ + MaxAlpha (depth), \ + (31 - depth))) + +/* + Pixel coverage from the upper-left corner bounded by one horizontal + bottom line (bottom) and one line defined by two points, (x1,y1) and + (x2,y2), which intersect the pixel. y1 must be less than y2. There + are 8 cases yielding the following area calculations: + + A B C D E F G H ++---+ +---+ +-1-+ +1--+ +--1+ +-1-+ +---+ +---+ +| | 1 | | \| | \ | | / | |/ | | 1 | | +1 | |`-.| | 2 | | | | | | 2 | |,_/| | 1 +|\ | | 2 | | | \ | | / | | | 2 | | /| ++-2-+ +---+ +---+ +--2+ +2--+ +---+ +---+ +-2-+ + +A: (1/2 * x2 * (y2 - y1)) +B: (1/2 * x2 * (y2 - y1)) + (bottom - y2) * x2 +C: (1/2 * (x1 + x2) * y2 ) + (bottom - y2) * x2 +D: (1/2 * (x1 + x2) * y2 ) +E: (1/2 * (x1 + x2) * y2 ) +F: (1/2 * x1 * y2 ) +G: (1/2 * x1 * (y2 - y1)) + x1 * y1 +H: (1/2 * (x1 + x2) * (y2 - y1)) + x1 * y1 + +The union of these calculations is valid for all cases. Namely: + + (1/2 * (x1 + x2) * (y2 - y1)) + (bottom - y2) * x2 + x1 * y1 + +An exercise for later would perhaps be to optimize the calculations +for some of the cases above. Specifically, it's possible to eliminate +multiplications by zero in several cases, leaving a maximum of two +multiplies per pixel calculation. (This is even more promising now +that the higher level code actually computes the exact same 8 cases +as part of its pixel walking). + +But, for now, I just want to get something working correctly even if +slower. So, we'll use the non-optimized general equation. + +*/ + +/* 1.16 * 1.16 -> 1.31 */ +#define AREA_MULT(w, h) ( (xFixed_1_31) (((((xFixed_1_16)w)*((xFixed_1_16)h) + 1) >> 1) | (((xFixed_1_16)w)&((xFixed_1_16)h)&0x10000) << 15)) + +/* (1.16 + 1.16) / 2 -> 1.16 */ +#define WIDTH_AVG(x1,x2) (((x1) + (x2) + 1) >> 1) + +#define SubPixelArea(x1, y1, x2, y2, bottom) \ +(xFixed_1_31) ( \ + AREA_MULT((x1), (y1)) \ + + AREA_MULT(WIDTH_AVG((x1), (x2)), (y2) - (y1))\ + + AREA_MULT((x2), (bottom) - (y2)) \ +) + +/* +static xFixed_1_31 +SubPixelArea (xFixed_1_16 x1, + xFixed_1_16 y1, + xFixed_1_16 x2, + xFixed_1_16 y2, + xFixed_1_16 bottom) +{ + xFixed_1_16 x_trap; + xFixed_1_16 h_top, h_trap, h_bot; + xFixed_1_31 area; + + x_trap = WIDTH_AVG(x1,x2); + h_top = y1; + h_trap = (y2 - y1); + h_bot = (bottom - y2); + + area = AREA_MULT(x1, h_top) + + AREA_MULT(x_trap, h_trap) + + AREA_MULT(x2, h_bot); + + return area; +} +*/ + +#define SubPixelAlpha(x1, y1, x2, y2, bottom, depth) \ +( \ + AreaAlpha( \ + SubPixelArea((x1), (y1), (x2), (y2), (bottom)), \ + (depth) \ + ) \ +) + +/* +static int +SubPixelAlpha (xFixed_1_16 x1, + xFixed_1_16 y1, + xFixed_1_16 x2, + xFixed_1_16 y2, + xFixed_1_16 bottom, + int depth) +{ + xFixed_1_31 area; + + area = SubPixelArea(x1, y1, x2, y2, bottom); + + return AreaAlpha(area, depth); +} +*/ + +/* Alpha of a pixel above a given horizontal line */ +#define AlphaAbove(pixel_y, line_y, depth) \ +( \ + AreaAlpha(AREA_MULT((line_y) - (pixel_y), xFixed1), depth) \ +) + +static int +RectAlpha(xFixed pixel_y, xFixed top, xFixed bottom, int depth) +{ + if (depth == 1) + return top == pixel_y ? 1 : 0; + else + return (AlphaAbove (pixel_y, bottom, depth) - + AlphaAbove (pixel_y, top, depth)); +} + + +/* + * Pixel coverage from the left edge bounded by one horizontal lines, + * (top and bottom), as well as one PixelWalk line. + */ +static int +AlphaAboveLeft(RationalPoint *upper, + RationalPoint *lower, + xFixed bottom, + xFixed pixel_x, + xFixed pixel_y, + int depth) +{ + return SubPixelAlpha(upper->x - pixel_x, + upper->y - pixel_y, + lower->x - pixel_x, + lower->y - pixel_y, + bottom - pixel_y, + depth); +} + +/* + Pixel coverage from the left edge bounded by two horizontal lines, + (top and bottom), as well as one line two points, p1 and p2, which + intersect the pixel. The following condition must be true: + + p2.y > p1.y +*/ + +/* + lr + |\ + +--|-\-------+ + | a| b\ | + =======|===\========== top + | c| d \ | + =======|=====\======== bot + | | \ | + +--|-------\-+ + + alpha(d) = alpha(cd) - alpha(c) = alpha(abcd) - alpha(ab) - (alpha(ac) - alpha(c)) + + alpha(d) = pixelalpha(top, bot, right) - pixelalpha(top, bot, left) + + pixelalpha(top, bot, line) = subpixelalpha(bot, line) - subpixelalpha(top, line) +*/ + +static int +PixelAlpha(xFixed pixel_x, + xFixed pixel_y, + xFixed top, + xFixed bottom, + PixelWalk *pw, + int depth) +{ + int alpha; + +#ifdef DEBUG + fprintf(stderr, "alpha (%f, %f) - (%f, %f) = ", + (double) pw->p1.x / (1 << 16), + (double) pw->p1.y / (1 << 16), + (double) pw->p2.x / (1 << 16), + (double) pw->p2.y / (1 << 16)); + fflush(stderr); +#endif + + /* + * Sharp polygons are different, alpha is 1 if the + * area includes the pixel origin, else zero, in + * the above figure, only 'a' has alpha 1 + */ + if (depth == 1) + { + alpha = 0; + if (top == pixel_y && pw->p_pixel_top.x != pixel_x) + alpha = 1; + } + else + { + alpha = (AlphaAboveLeft(&pw->p_pixel_top, &pw->p_trap_bottom, + bottom, pixel_x, pixel_y, depth) + - AlphaAboveLeft(&pw->p_pixel_top, &pw->p_trap_top, + top, pixel_x, pixel_y, depth)); + } + +#ifdef DEBUG + fprintf(stderr, "0x%x => %f\n", + alpha, + (double) alpha / ((1 << depth) -1 )); + fflush(stderr); +#endif + + return alpha; +} + +#define INCREMENT_X_AND_PIXEL \ +{ \ + pixel_x += xFixed1; \ + (*mask.over) (&mask); \ +} + +/* XXX: What do we really want this prototype to look like? Do we want + separate versions for 1, 4, 8, and 16-bit alpha? */ + +#define saturateAdd(t, a, b) (((t) = (a) + (b)), \ + ((CARD8) ((t) | (0 - ((t) >> 8))))) + +#define addAlpha(mask, depth, alpha, temp) (\ + (*(mask)->store) ((mask), (alpha == (1 << depth) - 1) ? \ + 0xff000000 : \ + (saturateAdd (temp, \ + alpha << (8 - depth), \ + (*(mask)->fetch) (mask) >> 24) << 24)) \ +) + +void +fbRasterizeTrapezoid (PicturePtr pMask, + xTrapezoid *pTrap, + int x_off, + int y_off) +{ + xTrapezoid trap = *pTrap; + int alpha, temp; + + FbCompositeOperand mask; + + int depth = pMask->pDrawable->depth; + int max_alpha = (1 << depth) - 1; + int buf_width = pMask->pDrawable->width; + + xFixed x_off_fixed = IntToxFixed(x_off); + xFixed y_off_fixed = IntToxFixed(y_off); + xFixed buf_width_fixed = IntToxFixed(buf_width); + + PixelWalk left, right; + xFixed pixel_x, pixel_y; + xFixed first_right_x; + xFixed y, y_next; + + /* trap.left and trap.right must be non-horizontal */ + if (trap.left.p1.y == trap.left.p2.y + || trap.right.p1.y == trap.right.p2.y) { + return; + } + + trap.top += y_off_fixed; + trap.bottom += y_off_fixed; + trap.left.p1.x += x_off_fixed; + trap.left.p1.y += y_off_fixed; + trap.left.p2.x += x_off_fixed; + trap.left.p2.y += y_off_fixed; + trap.right.p1.x += x_off_fixed; + trap.right.p1.y += y_off_fixed; + trap.right.p2.x += x_off_fixed; + trap.right.p2.y += y_off_fixed; + +#ifdef DEBUG + fprintf(stderr, "(top, bottom) = (%f, %f)\n", + (double) trap.top / (1 << 16), + (double) trap.bottom / (1 << 16)); +#endif + + pixelWalkInit(&left, &trap.left, trap.top, trap.bottom); + pixelWalkInit(&right, &trap.right, trap.top, trap.bottom); + + /* XXX: I'd still like to optimize this loop for top and + bottom. Only the first row intersects top and only the last + row, (which could also be the first row), intersects bottom. So + we could eliminate some unnecessary calculations from all other + rows. Unfortunately, I haven't found an easy way to do it + without bloating the text, (eg. unrolling a couple iterations + of the loop). So, for sake of maintenance, I'm putting off this + optimization at least until this code is more stable.. */ + + if (!fbBuildCompositeOperand (pMask, &mask, 0, xFixedToInt (trap.top), FALSE, FALSE)) + return; + + for (y = trap.top; y < trap.bottom; y = y_next) + { + pixel_y = xFixedFloor (y); + y_next = pixel_y + xFixed1; + if (y_next > trap.bottom) + y_next = trap.bottom; + + ASSERT (left.row.top.y == y); + ASSERT (left.row.bottom.y == y_next); + ASSERT (right.row.top.y == y); + ASSERT (right.row.bottom.y == y_next); + + pixel_x = xFixedFloor(left.col.left.x); + + /* + * Walk pixels on this row that are left of the + * first possibly lit pixel + * + * pixelWalkNextPixel will change .row.top.y + * when the last pixel covered by the edge + * is passed + */ + + first_right_x = xFixedFloor(right.col.left.x); + while (right.row.top.y == y && first_right_x < pixel_x) + { + /* these are empty */ + pixelWalkNextPixel (&right); + /* step over */ + first_right_x += xFixed1; + } + + (*mask.set) (&mask, xFixedToInt (pixel_x), xFixedToInt (y)); + + /* + * Walk pixels on this row intersected by only trap.left + * + */ + while (left.row.top.y == y && pixel_x < first_right_x) + { + alpha = (RectAlpha (pixel_y, y, y_next, depth) + - PixelAlpha(pixel_x, pixel_y, y, y_next, &left, depth)); + + if (alpha > 0) + { + if (0 <= pixel_x && pixel_x < buf_width_fixed) + addAlpha (&mask, depth, alpha, temp); + } + + /* + * Step right + */ + pixelWalkNextPixel(&left); + INCREMENT_X_AND_PIXEL; + } + + /* + * Either pixels are covered by both edges or + * there are fully covered pixels on this row + */ + if (pixel_x == first_right_x) + { + /* + * Now walk the pixels on this row intersected + * by both edges + */ + while (left.row.top.y == y && right.row.top.y == y) + { + alpha = (PixelAlpha(pixel_x, pixel_y, y, y_next, &right, depth) + - PixelAlpha(pixel_x, pixel_y, y, y_next, &left, depth)); + if (alpha > 0) + { + ASSERT (0 <= alpha && alpha <= max_alpha); + if (0 <= pixel_x && pixel_x < buf_width_fixed) + addAlpha (&mask, depth, alpha, temp); + } + pixelWalkNextPixel(&left); + pixelWalkNextPixel(&right); + INCREMENT_X_AND_PIXEL; + } + /* + * If the right edge is now left of the left edge, + * the left edge will end up only partially walked, + * walk it the rest of the way + */ + while (left.row.top.y == y) + pixelWalkNextPixel(&left); + } + else + { + /* + * Fully covered pixels simply saturate + */ + alpha = RectAlpha (pixel_y, y, y_next, depth); + if (alpha == max_alpha) + { + while (pixel_x < first_right_x) + { + if (0 <= pixel_x && pixel_x < buf_width_fixed) + (*mask.store) (&mask, 0xff000000); + INCREMENT_X_AND_PIXEL; + } + } + else + { + while (pixel_x < first_right_x) + { + ASSERT (0 <= alpha && alpha <= max_alpha); + if (0 <= pixel_x && pixel_x < buf_width_fixed) + addAlpha (&mask, depth, alpha, temp); + INCREMENT_X_AND_PIXEL; + } + } + } + + /* + * Finally, pixels intersected only by trap.right + */ + while (right.row.top.y == y) + { + alpha = PixelAlpha(pixel_x, pixel_y, y, y_next, &right, depth); + if (alpha > 0) + { + if (0 <= pixel_x && pixel_x < buf_width_fixed) + addAlpha (&mask, depth, alpha, temp); + } + pixelWalkNextPixel(&right); + INCREMENT_X_AND_PIXEL; + } + } +} + +/* Some notes on walking while keeping track of errors in both dimensions: + +That's really pretty easy. Your bresenham should be walking sub-pixel +coordinates rather than pixel coordinates. Now you can calculate the +sub-pixel Y coordinate for any arbitrary sub-pixel X coordinate (or vice +versa). + + ey: y error term (distance from current Y sub-pixel to line) * dx + ex: x error term (distance from current X sub-pixel to line) * dy + dx: difference of X coordinates for line endpoints + dy: difference of Y coordinates for line endpoints + x: current fixed-point X coordinate + y: current fixed-point Y coordinate + +One of ey or ex will always be zero, depending on whether the distance to +the line was measured horizontally or vertically. + +In moving from x, y to x1, y1: + + (x1 + e1x/dy) - (x + ex/dy) dx + --------------------------- = -- + (y1 + e1y/dx) - (y + ey/dx) dy + + (x1dy + e1x) - (xdy + ex) = (y1dx + e1y) - (ydx + ey) + + dy(x1 - x) + (e1x - ex) = dx(y1-y) + (e1y - ey) + +So, if you know y1 and want to know x1: + + Set e1y to zero and compute the error from x: + + oex = dx(y1 - y) - ey + ex + + Compute the number of whole pixels to get close to the line: + + wx = oex / dy + + Set x1: + + Now compute the e1x: + + e1x = oex - wx * dy + +A similar operation moves to a known y1. Note that this computation (in +general) requires 64 bit arithmetic. I suggest just using the available +64 bit datatype for now, we can optimize the common cases with a few +conditionals. There's some cpp code in fb/fb.h that selects a 64 bit type +for machines that XFree86 builds on; there aren't any machines missing a +64 bit datatype that I know of. +*/ + +/* Here's a large-step Bresenham for jogging my memory. + +void large_bresenham_x_major(x1, y1, x2, y2, x_inc) +{ + int x, y, dx, dy, m; + int em_dx, ey_dx; + + dx = x2 - x1; + dy = y2 - y1; + + m = (x_inc * dy) / dx; + em_dx = (x_inc * dy) - m * dx; + + x = x1; + y = y1; + ey = 0; + + set(x,y); + + while (x < x2) { + x += x_inc; + y += m; + ey_dx += em_dx; + if (ey_dx > dx_2) { + y++; + ey_dx -= dx; + } + set(x,y); + } +} + +*/ + +/* Here are the latest, simplified equations for computing trapezoid + coverage of a pixel: + + alpha_from_area(A) = round(2**depth-1 * A) + + alpha(o) = 2**depth-1 + + alpha(a) = alpha_from_area(area(a)) + + alpha(ab) = alpha_from_area(area(ab)) + + alpha(b) = alpha(ab) - alpha (a) + + alpha(abc) = alpha_from_area(area(abc)) + + alpha(c) = alpha(abc) - alpha(ab) + + alpha(ad) = alpha_from_area(area(ad)) + + alpha (d) = alpha(ad) - alpha (a) + + alpha (abde) = alpha_from_area(area(abde)) + + alpha (de) = alpha (abde) - alpha (ab) + + alpha (e) = alpha (de) - alpha (d) + + alpha (abcdef) = alpha_from_area(area(abcdef)) + + alpha (def) = alpha (abcdef) - alpha (abc) + + alpha (f) = alpha (def) - alpha (de) + + alpha (adg) = alpha_from_area(area(adg)) + + alpha (g) = alpha (adg) - alpha (ad) + + alpha (abdegh) = alpha_from_area(area(abdegh)) + + alpha (gh) = alpha (abdegh) - alpha (abde) + + alpha (h) = alpha (gh) - alpha (g) + + alpha (abcdefghi) = alpha_from_area(area(abcdefghi)) = + alpha_from_area(area(o)) = alpha_from_area(1) = alpha(o) + + alpha (ghi) = alpha (abcdefghi) - alpha (abcdef) + + alpha (i) = alpha (ghi) - alpha (gh) +*/ + +/* Latest thoughts from Keith on implementing area/alpha computations: + +*** 1.16 * 1.16 -> 1.31 *** +#define AREA_MULT(w,h) ((w)&(h) == 0x10000 ? 0x80000000 : (((w)*(h) + 1) >> 1) + +*** (1.16 + 1.16) / 2 -> 1.16 *** +#define WIDTH_AVG(x1,x2) (((x1) + (x2) + 1) >> 1) + +xFixed_1_31 +SubpixelArea (xFixed_1_16 x1, + xFixed_1_16 x2, + xFixed_1_16 y1, + xFixed_1_16 y2, + xFixed_1_16 bottom) + { + xFixed_1_16 x_trap; + xFixed_1_16 h_top, h_trap, h_bot; + xFixed_1_31 area; + + x_trap = WIDTH_AVG(x1,x2); + h_top = y1; + h_trap = (y2 - y1); + h_bot = (bottom - y2); + + area = AREA_MULT(x1, h_top) + + AREA_MULT(x_trap, h_trap) + + AREA_MULT(x2, h_bot); + + return area; + } + +To convert this xFixed_1_31 value to alpha using 32 bit arithmetic: + +int +AreaAlpha (xFixed_1_31 area, int depth) + { + return ((area >> bits) * ((1 << depth) - 1)) >> (31 - depth); + } + +Avoiding the branch bubble in the AREA_MULT could be done with either: + +area = (w * h + 1) >> 1; +area |= ((area - 1) & 0x80000000); + +or + #define AREA_MULT(w,h) ((((w)*(h) + 1) >> 1) | ((w)&(h)&0x10000) << 15) + +depending on your preference, the first takes one less operation but +can't be expressed as a macro; the second takes a large constant which may +require an additional instruction on some processors. The differences +will be swamped by the cost of the multiply. + +*/ + +#endif /* RENDER */ Index: xc/programs/Xserver/fb/fbwindow.c diff -u xc/programs/Xserver/fb/fbwindow.c:1.9 xc/programs/Xserver/fb/fbwindow.c:1.10 --- xc/programs/Xserver/fb/fbwindow.c:1.9 Mon Jul 16 01:05:41 2001 +++ xc/programs/Xserver/fb/fbwindow.c Thu Jan 30 19:01:45 2003 @@ -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/fbwindow.c,v 1.9 2001/07/16 05:05:41 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbwindow.c,v 1.10 2003/01/31 00:01:45 torrey Exp $ */ #include "fb.h" #ifdef IN_MODULE @@ -262,6 +262,8 @@ fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff); tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; + xRot += dstXoff; + yRot += dstYoff; while (n--) { Index: xc/programs/Xserver/fb/module/Imakefile diff -u /dev/null xc/programs/Xserver/fb/module/Imakefile:1.1 --- /dev/null Thu Feb 27 12:29:15 2003 +++ xc/programs/Xserver/fb/module/Imakefile Fri May 31 12:12:17 2002 @@ -0,0 +1,6 @@ +XCOMM $XFree86: xc/programs/Xserver/fb/module/Imakefile,v 1.1 2002/05/31 16:12:17 dawes Exp $ + +#define IHaveModules +#define LinkDirectory .. + +#include "../Imakefile" Index: xc/programs/Xserver/hw/darwin/Imakefile diff -u xc/programs/Xserver/hw/darwin/Imakefile:1.12 xc/programs/Xserver/hw/darwin/Imakefile:1.15 --- xc/programs/Xserver/hw/darwin/Imakefile:1.12 Wed Jan 9 13:07:23 2002 +++ xc/programs/Xserver/hw/darwin/Imakefile Fri Oct 11 20:32:43 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/darwin/Imakefile,v 1.12 2002/01/09 18:07:23 torrey Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/Imakefile,v 1.15 2002/10/12 00:32:43 torrey Exp $ #include <Server.tmpl> #define IHaveSubdirs @@ -6,11 +6,13 @@ LinkSourceFile(XFree86.man,../xfree86) SRCS = darwin.c \ + darwinEvents.c \ darwinKeyboard.c \ xfIOKit.c \ xfIOKitCursor.c OBJS = darwin.o \ + darwinEvents.o \ darwinKeyboard.o \ xfIOKit.o \ xfIOKitCursor.o @@ -19,20 +21,33 @@ -I$(SERVERSRC)/render -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ -I$(SERVERSRC)/os -I$(INCLUDESRC) -I$(FONTINCSRC) +OSNAME = OSName +OSVENDOR = OSVendor +OSNAMEDEF = -DOSNAME='" $(OSNAME)"' -DOSVENDOR='" $(OSVENDOR)"' #if defined(XFree86CustomVersion) CUSTOMVERSION = XFree86CustomVersion -CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' +CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' #endif +#if defined(BuilderString) +BUILDERSTRING = BuilderString +BUILDERMSG = -DBUILDERSTRING='$(BUILDERSTRING)' +#endif #if DarwinQuartzSupport -SUBDIRS = bundle utils +# if HasNSCarbonWindow +SUBDIRS = bundle quartz utils +# else +SUBDIRS = bundle quartz_1.3 utils +# endif QUARTZDEF = -DDARWIN_WITH_QUARTZ #else SUBDIRS = utils #endif -DEFINES = $(CUSTOMVERDEF) $(QUARTZDEF) +DEFINES = $(QUARTZDEF) EXTRAMANDEFS = $(QUARTZDEF) -D__logdir__=$(LOGDIRECTORY) + +SpecialCObjectRule(darwin,$(ICONFIGFILES),$(OSNAMEDEF) $(BUILDERMSG) $(CUSTOMVERDEF)) NormalLibraryObjectRule() NormalLibraryTarget(darwin,$(OBJS)) Index: xc/programs/Xserver/hw/darwin/darwin.c diff -u xc/programs/Xserver/hw/darwin/darwin.c:1.43 xc/programs/Xserver/hw/darwin/darwin.c:1.50 --- xc/programs/Xserver/hw/darwin/darwin.c:1.43 Wed Jan 9 13:01:58 2002 +++ xc/programs/Xserver/hw/darwin/darwin.c Wed Feb 26 04:21:33 2003 @@ -4,7 +4,32 @@ * running with Quartz or the IOKit * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.43 2002/01/09 18:01:58 torrey Exp $ */ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/darwin.c,v 1.50 2003/02/26 09:21:33 dawes Exp $ */ #include "X.h" #include "Xproto.h" @@ -19,6 +44,7 @@ #include "site.h" #include "globals.h" #include "xf86Version.h" +#include "xf86Date.h" #include "dix.h" #include <sys/types.h> @@ -34,23 +60,15 @@ #include "darwin.h" #include "darwinClut8.h" -#include "bundle/quartz.h" +#include "quartz/quartz.h" #include "xfIOKit.h" -// 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 - /* * X server shared global variables */ int darwinScreensFound = 0; int darwinScreenIndex = 0; -DarwinInputRec hid; +io_connect_t darwinParamConnect = 0; int darwinEventFD = -1; Bool quartz = FALSE; int quartzMouseAccelChange = 1; @@ -148,6 +166,7 @@ return TRUE; } + /* * DarwinAddScreen * This is a callback from dix during AddScreen() from InitOutput(). @@ -183,26 +202,25 @@ if (! ret) return FALSE; - bitsPerRGB = dfb->pixelInfo.bitsPerComponent; + bitsPerRGB = dfb->bitsPerComponent; // reset the visual list miClearVisualTypes(); // setup a single visual appropriate for our pixel type - // Note: Darwin kIORGBDirectPixels = X TrueColor, not DirectColor - if (dfb->pixelInfo.pixelType == kIORGBDirectPixels) { + if (dfb->colorType == TrueColor) { if (!miSetVisualTypes( dfb->colorBitsPerPixel, TrueColorMask, - bitsPerRGB, TrueColor )) { + bitsPerRGB, TrueColor )) { return FALSE; } - } else if (dfb->pixelInfo.pixelType == kIOCLUTPixels) { + } else if (dfb->colorType == PseudoColor) { if (!miSetVisualTypes( dfb->colorBitsPerPixel, PseudoColorMask, - bitsPerRGB, PseudoColor )) { + bitsPerRGB, PseudoColor )) { return FALSE; } - } else if (dfb->pixelInfo.pixelType == kIOFixedCLUTPixels) { + } else if (dfb->colorType == StaticColor) { if (!miSetVisualTypes( dfb->colorBitsPerPixel, StaticColorMask, - bitsPerRGB, StaticColor )) { + bitsPerRGB, StaticColor )) { return FALSE; } } else { @@ -237,15 +255,9 @@ visual->offsetRed = bitsPerRGB * 2; visual->offsetGreen = bitsPerRGB; visual->offsetBlue = 0; -#if TRUE visual->redMask = ((1<<bitsPerRGB)-1) << visual->offsetRed; visual->greenMask = ((1<<bitsPerRGB)-1) << visual->offsetGreen; visual->blueMask = ((1<<bitsPerRGB)-1) << visual->offsetBlue; -#else - visual->redMask = dfb->pixelInfo.componentMasks[0]; - visual->greenMask = dfb->pixelInfo.componentMasks[1]; - visual->blueMask = dfb->pixelInfo.componentMasks[2]; -#endif } } } @@ -285,7 +297,7 @@ * to Darwin/x86 in 8-bit mode. */ if( (dfb->colorBitsPerPixel == 8) && - (dfb->pixelInfo.pixelType == kIOFixedCLUTPixels) ) + (dfb->colorType == StaticColor) ) { pmap = miInstalledMaps[pScreen->myNum]; visual = pmap->pVisual; @@ -329,7 +341,7 @@ return; acceleration = ctrl->num / ctrl->den; - kr = IOHIDSetMouseAcceleration( hid.paramConnect, acceleration ); + kr = IOHIDSetMouseAcceleration( darwinParamConnect, acceleration ); if (kr != KERN_SUCCESS) ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr ); } @@ -339,7 +351,6 @@ * DarwinMouseProc * Handle the initialization, etc. of a mouse */ - static int DarwinMouseProc( DeviceIntPtr pPointer, int what ) @@ -380,6 +391,7 @@ return Success; } + /* * DarwinKeybdProc * Callback from X @@ -468,68 +480,8 @@ return NULL; } -/* - * DarwinPressKeycode - * Press or release the given key, specified by NX keycode. - * xe must already have event time and mouse location filled in. - * pressed is KeyPress or KeyRelease. - * keycode is NX keycode without MIN_KEYCODE adjustment. - */ -#define DarwinPressKeycode(xe, pressed, keycode) \ - xe.u.u.type = (pressed); \ - xe.u.u.detail = (keycode) + MIN_KEYCODE; \ - (darwinKeyboard->public.processInputProc)(&(xe), darwinKeyboard, 1); - - -/* - * DarwinPressModifierMask - * Press or release the given modifier key, specified by its mask. - */ -static void DarwinPressModifierMask( - xEvent xe, // must already have time and mouse location filled in - BYTE pressed, // KeyPress or KeyRelease - int mask) // one of NX_*MASK constants -{ - int key = DarwinModifierNXMaskToNXKey(mask); - if (key != -1) { - int keycode = DarwinModifierNXKeyToNXKeycode(key, 0); - if (keycode != 0) { - DarwinPressKeycode(xe, pressed, keycode); - } - } -} - /* - * DarwinUpdateModifiers - * Send events to update the modifier state. - */ -static void DarwinUpdateModifiers( - xEvent xe, // event template with time and mouse position set - int pressed, // KeyPress or KeyRelease - int flags ) // modifier flags that have changed -{ - if (flags & NX_ALPHASHIFTMASK) { - DarwinPressModifierMask(xe, pressed, NX_ALPHASHIFTMASK); - } - if (flags & NX_COMMANDMASK) { - DarwinPressModifierMask(xe, pressed, NX_COMMANDMASK); - } - if (flags & NX_CONTROLMASK) { - DarwinPressModifierMask(xe, pressed, NX_CONTROLMASK); - } - if (flags & NX_ALTERNATEMASK) { - DarwinPressModifierMask(xe, pressed, NX_ALTERNATEMASK); - } - if (flags & NX_SHIFTMASK) { - DarwinPressModifierMask(xe, pressed, NX_SHIFTMASK); - } - if (flags & NX_SECONDARYFNMASK) { - DarwinPressModifierMask(xe, pressed, NX_SECONDARYFNMASK); - } -} - -/* * DarwinParseModifierList * Parse a list of modifier names and return a corresponding modifier mask */ @@ -558,35 +510,6 @@ } /* - * 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. After the mouse button - * is released, the modifier keys are reverted to their actual state, - * which may or may not be pressed at that point. 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 modifierMask) // modifiers used for the fake click -{ - // first fool X into forgetting about the keys - DarwinUpdateModifiers(xe, KeyRelease, modifierMask); - - // push the mouse button - xe.u.u.type = whichEvent; - xe.u.u.detail = whichButton; - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); -} - - -/* =========================================================================== Functions needed to link against device independent X @@ -595,324 +518,6 @@ */ /* - * ProcessInputEvents - * Read and process events from the event pipe until it is empty. - */ -void ProcessInputEvents(void) -{ - xEvent xe; - NXEvent ev; - int r; - struct timeval tv; - struct timezone tz; - - // last known modifier state - static int old_state = 0; - // button number and modifier mask of currently pressed fake button - static int darwinFakeMouseButtonDown = 0; - static int darwinFakeMouseButtonMask = 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)) { - // no event available - break; - } 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)); - - // Shift from global screen coordinates to coordinates relative to - // the origin of the current screen. - xe.u.keyButtonPointer.rootX = ev.location.x - darwinMainScreenX - - dixScreenOrigins[miPointerCurrentScreen()->myNum].x; - xe.u.keyButtonPointer.rootY = ev.location.y - darwinMainScreenY - - dixScreenOrigins[miPointerCurrentScreen()->myNum].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 modifier-clicks - // If both sets of modifiers are pressed, button 2 is clicked. - if (darwinFakeButtons && - (ev.flags & darwinFakeMouse2Mask) == darwinFakeMouse2Mask) - { - DarwinSimulateMouseClick(xe, 2, ButtonPress, - darwinFakeMouse2Mask); - darwinFakeMouseButtonDown = 2; - darwinFakeMouseButtonMask = darwinFakeMouse2Mask; - } - else if (darwinFakeButtons && - (ev.flags & darwinFakeMouse3Mask) == darwinFakeMouse3Mask) - { - DarwinSimulateMouseClick(xe, 3, ButtonPress, - darwinFakeMouse3Mask); - darwinFakeMouseButtonDown = 3; - darwinFakeMouseButtonMask = darwinFakeMouse3Mask; - } - else { - xe.u.u.detail = 1; - xe.u.u.type = ButtonPress; - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); - } - break; - -#ifdef __i386__ - case NX_LMOUSEDOWN: -#else - case NX_LMOUSEUP: -#endif - // If last mousedown was a fake click, don't check for - // mouse modifiers here. The user may have released the - // modifiers before the mouse button. - xe.u.u.type = ButtonRelease; - if (darwinFakeMouseButtonDown) { - xe.u.u.detail = darwinFakeMouseButtonDown; - darwinFakeMouseButtonDown = 0; - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); - - // Bring modifiers back up to date - DarwinUpdateModifiers(xe, KeyPress, - darwinFakeMouseButtonMask & old_state); - darwinFakeMouseButtonMask = 0; - } else { - xe.u.u.detail = 1; - (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; - xe.u.u.type = ButtonPress; - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); -#endif - break; - - case NX_RMOUSEUP: -#if 0 - xe.u.u.detail = 2; - xe.u.u.type = ButtonRelease; - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); -#endif - break; - - case NX_KEYDOWN: - DarwinPressKeycode(xe, KeyPress, ev.data.key.keyCode); - break; - - case NX_KEYUP: - DarwinPressKeycode(xe, KeyRelease, ev.data.key.keyCode); - break; - - 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; - - // Alphalock is toggled rather than held on, - // so we have to press and release it every time. - if (new_on_flags || new_off_flags & NX_ALPHASHIFTMASK) { - DarwinPressKeycode(xe, KeyPress, ev.data.key.keyCode); - } - if (new_off_flags || new_on_flags & NX_ALPHASHIFTMASK) { - DarwinPressKeycode(xe, KeyRelease, ev.data.key.keyCode); - } - 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 < 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 ); - } - } - } - 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; - } - - // 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: - DarwinUpdateModifiers(xe, KeyRelease, - old_state & ~ev.flags); - DarwinUpdateModifiers(xe, KeyPress, - ~old_state & ev.flags); - old_state = ev.flags; - break; - - case kXDarwinShow: - QuartzShow(xe.u.keyButtonPointer.rootX, - xe.u.keyButtonPointer.rootY); - // 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 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; - } - - miPointerAbsoluteCursor( xe.u.keyButtonPointer.rootX, - xe.u.keyButtonPointer.rootY, - xe.u.keyButtonPointer.time ); - } - - miPointerUpdate(); - -} - -/* * InitInput * Register the keyboard and mouse devices */ @@ -923,8 +528,17 @@ darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE); RegisterKeyboardDevice( darwinKeyboard ); + + DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer ); + + if (quartz) { + QuartzInitInput(argc, argv); + } else { + XFIOKitInitInput(argc, argv); + } } + /* * InitOutput * Initialize screenInfo for all actually accessible framebuffers. @@ -1011,6 +625,7 @@ } } + /* * OsVendorFataError */ @@ -1019,6 +634,7 @@ ErrorF( " OsVendorFatalError\n" ); } + /* * OsVendorInit * Initialization of Darwin OS support. @@ -1042,6 +658,7 @@ } } + /* * ddxProcessArgument -- * Process device-dependent command line args. Returns 0 if argument is @@ -1164,9 +781,16 @@ exit(0); } + // XDarwinStartup uses this argument to indicate the IOKit X server + // should be started. Ignore it here. + if ( !strcmp( argv[i], "-iokit" ) ) { + return 1; + } + return 0; } + /* * ddxUseMsg -- * Print out correct use of device dependent commandline options. @@ -1200,6 +824,7 @@ ErrorF("\n"); } + /* * ddxGiveUp -- * Device dependent cleanup. Called by dix before normal server death. @@ -1215,6 +840,7 @@ } } + /* * AbortDDX -- * DDX - specific abort routine. Called by AbortServer(). The attempt is @@ -1230,6 +856,7 @@ */ ddxGiveUp(); } + #ifdef DPMSExtension /* Index: xc/programs/Xserver/hw/darwin/darwin.h diff -u xc/programs/Xserver/hw/darwin/darwin.h:1.10 xc/programs/Xserver/hw/darwin/darwin.h:1.15 --- xc/programs/Xserver/hw/darwin/darwin.h:1.10 Sat Oct 13 23:02:18 2001 +++ xc/programs/Xserver/hw/darwin/darwin.h Mon Dec 9 19:00:38 2002 @@ -1,38 +1,61 @@ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.10 2001/10/14 03:02:18 torrey Exp $ */ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/darwin.h,v 1.15 2002/12/10 00:00:38 torrey Exp $ */ #ifndef _DARWIN_H #define _DARWIN_H -#include <pthread.h> -#include <IOKit/graphics/IOFramebufferShared.h> +#include <IOKit/IOTypes.h> #include "inputstr.h" #include "screenint.h" #include "extensions/XKB.h" -#include "bundle/quartzShared.h" +#include "quartz/quartzShared.h" typedef struct { - io_connect_t fbService; void *framebuffer; int x; int y; int width; int height; int pitch; + int colorType; int bitsPerPixel; int colorBitsPerPixel; - IOPixelInformation pixelInfo; - StdFBShmem_t *cursorShmem; + int bitsPerComponent; } DarwinFramebufferRec, *DarwinFramebufferPtr; -typedef struct { - pthread_t thread; - io_connect_t connect; - io_connect_t paramConnect; -} DarwinInputRec; - void xf86SetRootClip (ScreenPtr pScreen, BOOL enable); +// From darwinEvents.c +Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr); +void DarwinEQEnqueue(const xEvent *e); +void DarwinEQPointerPost(xEvent *e); +void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX); + // From darwinKeyboard.c int DarwinModifierNXKeyToNXKeycode(int key, int side); void DarwinKeyboardInit(DeviceIntPtr pDev); @@ -58,8 +81,26 @@ */ extern int darwinScreenIndex; // index into pScreen.devPrivates extern int darwinScreensFound; -extern DarwinInputRec hid; +extern io_connect_t darwinParamConnect; extern int darwinEventFD; extern Bool quartz; + +/* + * Special ddx events understood by the X server + */ +enum { + kXDarwinUpdateModifiers // update all modifier keys + = LASTEvent+1, // (from X.h list of event names) + kXDarwinUpdateButtons, // update state of mouse buttons 2 and up + kXDarwinScrollWheel, // scroll wheel event + kXDarwinShow, // vt switch to X server; + // recapture screen and restore X drawing + kXDarwinHide, // vt switch away from X server; + // release screen and clip X drawing + kXDarwinSetRootClip, // enable or disable drawing to the X screen + kXDarwinQuit, // kill the X server and release the display + kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer + kXDarwinWritePasteboard // copy X cut buffer onto Mac OS X pasteboard +}; #endif /* _DARWIN_H */ Index: xc/programs/Xserver/hw/darwin/darwinEvents.c diff -u /dev/null xc/programs/Xserver/hw/darwin/darwinEvents.c:1.2 --- /dev/null Thu Feb 27 12:29:15 2003 +++ xc/programs/Xserver/hw/darwin/darwinEvents.c Tue Nov 19 18:01:30 2002 @@ -0,0 +1,438 @@ +/* + * Darwin event queue and event handling + */ +/* +Copyright (c) 2002 Torrey T. Lyons. All Rights Reserved. + +This file is based on mieq.c by Keith Packard, +which contains the following copyright: +Copyright 1990, 1998 The Open Group + +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. + +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. + */ + +#define NEED_EVENTS +#include "X.h" +#include "Xmd.h" +#include "Xproto.h" +#include "misc.h" +#include "windowstr.h" +#include "pixmapstr.h" +#include "inputstr.h" +#include "mi.h" +#include "scrnintstr.h" +#include "mipointer.h" + +#include "darwin.h" +#include "quartz/quartz.h" + +#include <sys/types.h> +#include <sys/uio.h> +#include <unistd.h> +#include <IOKit/hidsystem/IOLLEvent.h> + +/* Fake button press/release for scroll wheel move. */ +#define SCROLLWHEELUPFAKE 4 +#define SCROLLWHEELDOWNFAKE 5 + +#define QUEUE_SIZE 256 + +typedef struct _Event { + xEvent event; + ScreenPtr pScreen; +} EventRec, *EventPtr; + +typedef struct _EventQueue { + HWEventQueueType head, tail; /* long for SetInputCheck */ + CARD32 lastEventTime; /* to avoid time running backwards */ + Bool lastMotion; + EventRec events[QUEUE_SIZE]; /* static allocation for signals */ + DevicePtr pKbd, pPtr; /* device pointer, to get funcs */ + ScreenPtr pEnqueueScreen; /* screen events are being delivered to */ + ScreenPtr pDequeueScreen; /* screen events are being dispatched to */ +} EventQueueRec, *EventQueuePtr; + +static EventQueueRec darwinEventQueue; + + +/* + * DarwinPressModifierMask + * Press or release the given modifier key, specified by its mask. + */ +static void DarwinPressModifierMask( + xEvent *xe, // must already have type, time and mouse location + int mask) // one of NX_*MASK constants +{ + int key = DarwinModifierNXMaskToNXKey(mask); + + if (key != -1) { + int keycode = DarwinModifierNXKeyToNXKeycode(key, 0); + if (keycode != 0) { + xe->u.u.detail = keycode + MIN_KEYCODE; + (*darwinEventQueue.pKbd->processInputProc)(xe, + (DeviceIntPtr)darwinEventQueue.pKbd, 1); + } + } +} + + +/* + * DarwinUpdateModifiers + * Send events to update the modifier state. + */ +static void DarwinUpdateModifiers( + xEvent *xe, // event template with time and mouse position set + int pressed, // KeyPress or KeyRelease + int flags ) // modifier flags that have changed +{ + xe->u.u.type = pressed; + if (flags & NX_ALPHASHIFTMASK) { + DarwinPressModifierMask(xe, NX_ALPHASHIFTMASK); + } + if (flags & NX_COMMANDMASK) { + DarwinPressModifierMask(xe, NX_COMMANDMASK); + } + if (flags & NX_CONTROLMASK) { + DarwinPressModifierMask(xe, NX_CONTROLMASK); + } + if (flags & NX_ALTERNATEMASK) { + DarwinPressModifierMask(xe, NX_ALTERNATEMASK); + } + if (flags & NX_SHIFTMASK) { + DarwinPressModifierMask(xe, NX_SHIFTMASK); + } + if (flags & NX_SECONDARYFNMASK) { + DarwinPressModifierMask(xe, NX_SECONDARYFNMASK); + } +} + + +/* + * 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. After the mouse button + * is released, the modifier keys are reverted to their actual state, + * which may or may not be pressed at that point. 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 modifierMask) // modifiers used for the fake click +{ + // first fool X into forgetting about the keys + DarwinUpdateModifiers(xe, KeyRelease, modifierMask); + + // push the mouse button + xe->u.u.type = ButtonPress; + xe->u.u.detail = whichButton; + (*darwinEventQueue.pPtr->processInputProc) + (xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1); +} + + +Bool +DarwinEQInit( + DevicePtr pKbd, + DevicePtr pPtr) +{ + darwinEventQueue.head = darwinEventQueue.tail = 0; + darwinEventQueue.lastEventTime = GetTimeInMillis (); + darwinEventQueue.pKbd = pKbd; + darwinEventQueue.pPtr = pPtr; + darwinEventQueue.pEnqueueScreen = screenInfo.screens[0]; + darwinEventQueue.pDequeueScreen = darwinEventQueue.pEnqueueScreen; + SetInputCheck (&darwinEventQueue.head, &darwinEventQueue.tail); + return TRUE; +} + + +/* + * DarwinEQEnqueue + * Must be thread safe with ProcessInputEvents. + * DarwinEQEnqueue - called from event gathering thread + * ProcessInputEvents - called from X server thread + * DarwinEQEnqueue should never be called from more than one thread. + */ +void +DarwinEQEnqueue( + const xEvent *e) +{ + HWEventQueueType oldtail, newtail; + + oldtail = darwinEventQueue.tail; + + // mieqEnqueue() collapses successive motion events into one event. + // This is difficult to do in a thread-safe way and rarely useful. + + newtail = oldtail + 1; + if (newtail == QUEUE_SIZE) + newtail = 0; + /* Toss events which come in late */ + if (newtail == darwinEventQueue.head) + return; + + darwinEventQueue.events[oldtail].event = *e; + /* + * Make sure that event times don't go backwards - this + * is "unnecessary", but very useful + */ + if (e->u.keyButtonPointer.time < darwinEventQueue.lastEventTime && + darwinEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000) + { + darwinEventQueue.events[oldtail].event.u.keyButtonPointer.time = + darwinEventQueue.lastEventTime; + } + darwinEventQueue.events[oldtail].pScreen = darwinEventQueue.pEnqueueScreen; + + // Update the tail after the event is prepared + darwinEventQueue.tail = newtail; +} + + +/* + * DarwinEQPointerPost + * Post a pointer event. Used by the mipointer.c routines. + */ +void +DarwinEQPointerPost( + xEvent *e) +{ + (*darwinEventQueue.pPtr->processInputProc) + (e, (DeviceIntPtr)darwinEventQueue.pPtr, 1); +} + + +void +DarwinEQSwitchScreen( + ScreenPtr pScreen, + Bool fromDIX) +{ + darwinEventQueue.pEnqueueScreen = pScreen; + if (fromDIX) + darwinEventQueue.pDequeueScreen = pScreen; +} + + +/* + * ProcessInputEvents + * Read and process events from the event queue until it is empty. + */ +void ProcessInputEvents(void) +{ + EventRec *e; + int x, y; + xEvent xe; + static int old_flags = 0; // last known modifier state + // button number and modifier mask of currently pressed fake button + static int darwinFakeMouseButtonDown = 0; + static int darwinFakeMouseButtonMask = 0; + + // Empty the signaling pipe + x = sizeof(xe); + while (x == sizeof(xe)) { + x = read(darwinEventFD, &xe, sizeof(xe)); + } + + while (darwinEventQueue.head != darwinEventQueue.tail) + { + if (screenIsSaved == SCREEN_SAVER_ON) + SaveScreens (SCREEN_SAVER_OFF, ScreenSaverReset); + + e = &darwinEventQueue.events[darwinEventQueue.head]; + xe = e->event; + + // Shift from global screen coordinates to coordinates relative to + // the origin of the current screen. + xe.u.keyButtonPointer.rootX -= darwinMainScreenX + + dixScreenOrigins[miPointerCurrentScreen()->myNum].x; + xe.u.keyButtonPointer.rootY -= darwinMainScreenY + + dixScreenOrigins[miPointerCurrentScreen()->myNum].y; + + /* + * Assumption - screen switching can only occur on motion events + */ + if (e->pScreen != darwinEventQueue.pDequeueScreen) + { + darwinEventQueue.pDequeueScreen = e->pScreen; + x = xe.u.keyButtonPointer.rootX; + y = xe.u.keyButtonPointer.rootY; + if (darwinEventQueue.head == QUEUE_SIZE - 1) + darwinEventQueue.head = 0; + else + ++darwinEventQueue.head; + NewCurrentScreen (darwinEventQueue.pDequeueScreen, x, y); + } + else + { + if (darwinEventQueue.head == QUEUE_SIZE - 1) + darwinEventQueue.head = 0; + else + ++darwinEventQueue.head; + switch (xe.u.u.type) + { + case KeyPress: + case KeyRelease: + xe.u.u.detail += MIN_KEYCODE; + (*darwinEventQueue.pKbd->processInputProc) + (&xe, (DeviceIntPtr)darwinEventQueue.pKbd, 1); + break; + + case ButtonPress: + miPointerAbsoluteCursor(xe.u.keyButtonPointer.rootX, + xe.u.keyButtonPointer.rootY, + xe.u.keyButtonPointer.time); + if (darwinFakeButtons && xe.u.u.detail == 1) { + // Mimic multi-button mouse with modifier-clicks + // If both sets of modifiers are pressed, + // button 2 is clicked. + if ((old_flags & darwinFakeMouse2Mask) == + darwinFakeMouse2Mask) + { + DarwinSimulateMouseClick(&xe, 2, darwinFakeMouse2Mask); + darwinFakeMouseButtonDown = 2; + darwinFakeMouseButtonMask = darwinFakeMouse2Mask; + break; + } + else if ((old_flags & darwinFakeMouse3Mask) == + darwinFakeMouse3Mask) + { + DarwinSimulateMouseClick(&xe, 3, darwinFakeMouse3Mask); + darwinFakeMouseButtonDown = 3; + darwinFakeMouseButtonMask = darwinFakeMouse3Mask; + break; + } + } + (*darwinEventQueue.pPtr->processInputProc) + (&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1); + break; + + case ButtonRelease: + miPointerAbsoluteCursor(xe.u.keyButtonPointer.rootX, + xe.u.keyButtonPointer.rootY, + xe.u.keyButtonPointer.time); + if (darwinFakeButtons && xe.u.u.detail == 1 && + darwinFakeMouseButtonDown) + { + // If last mousedown was a fake click, don't check for + // mouse modifiers here. The user may have released the + // modifiers before the mouse button. + xe.u.u.detail = darwinFakeMouseButtonDown; + darwinFakeMouseButtonDown = 0; + (*darwinEventQueue.pPtr->processInputProc) + (&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1); + + // Bring modifiers back up to date + DarwinUpdateModifiers(&xe, KeyPress, + darwinFakeMouseButtonMask & old_flags); + darwinFakeMouseButtonMask = 0; + } else { + (*darwinEventQueue.pPtr->processInputProc) + (&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1); + } + break; + + case MotionNotify: + miPointerAbsoluteCursor(xe.u.keyButtonPointer.rootX, + xe.u.keyButtonPointer.rootY, + xe.u.keyButtonPointer.time); + break; + + case kXDarwinUpdateModifiers: + { + // Update modifier state. + // Any amount of modifiers may have changed. + int flags = xe.u.clientMessage.u.l.longs0; + DarwinUpdateModifiers(&xe, KeyRelease, + old_flags & ~flags); + DarwinUpdateModifiers(&xe, KeyPress, + ~old_flags & flags); + old_flags = flags; + break; + } + + case kXDarwinUpdateButtons: + { + long hwDelta = xe.u.clientMessage.u.l.longs0; + long hwButtons = xe.u.clientMessage.u.l.longs1; + 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)) { + xe.u.u.type = ButtonPress; + } else { + xe.u.u.type = ButtonRelease; + } + (*darwinEventQueue.pPtr->processInputProc) + (&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1); + } + } + break; + } + + case kXDarwinScrollWheel: + { + short count = xe.u.clientMessage.u.s.shorts0; + + if (count > 0) { + xe.u.u.detail = SCROLLWHEELUPFAKE; + } else { + xe.u.u.detail = SCROLLWHEELDOWNFAKE; + count = -count; + } + + for (; count; --count) { + xe.u.u.type = ButtonPress; + (*darwinEventQueue.pPtr->processInputProc) + (&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1); + xe.u.u.type = ButtonRelease; + (*darwinEventQueue.pPtr->processInputProc) + (&xe, (DeviceIntPtr)darwinEventQueue.pPtr, 1); + } + break; + } + + default: + if (quartz) { + QuartzProcessEvent(&xe); + } else { + ErrorF("Unknown X event caught: %d\n", xe.u.u.type); + } + } + } + } + + miPointerUpdate(); +} Index: xc/programs/Xserver/hw/darwin/darwinKeyboard.c diff -u xc/programs/Xserver/hw/darwin/darwinKeyboard.c:1.14 xc/programs/Xserver/hw/darwin/darwinKeyboard.c:1.17 --- xc/programs/Xserver/hw/darwin/darwinKeyboard.c:1.14 Wed Dec 5 01:27:43 2001 +++ xc/programs/Xserver/hw/darwin/darwinKeyboard.c Mon Dec 9 19:00:38 2002 @@ -2,16 +2,16 @@ // // Keyboard support for the Darwin X Server // -// By Torrey T. Lyons +// Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved. // // The code to parse the Darwin keymap is derived from dumpkeymap.c -// by Eric Sunshine, which includes the following license: +// by Eric Sunshine, which includes the following copyright: // -//----------------------------------------------------------------------------- -// // Copyright (C) 1999,2000 by Eric Sunshine <sunshine@sunshineco.com> // All rights reserved. // +//----------------------------------------------------------------------------- +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // @@ -36,7 +36,7 @@ // //============================================================================= -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.14 2001/12/05 06:27:43 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.17 2002/12/10 00:00:38 torrey Exp $ */ /* =========================================================================== @@ -67,8 +67,8 @@ #include <architecture/byte_order.h> // For the NXSwap* #include "darwin.h" #include "xfIOKit.h" -#include "bundle/quartzAudio.h" -#include "bundle/quartzShared.h" +#include "quartz/quartzAudio.h" +#include "quartz/quartzShared.h" #define XK_TECHNICAL // needed to get XK_Escape #define XK_PUBLISHING @@ -393,7 +393,7 @@ // find the keyboard interface and handler id size = sizeof( info ) / sizeof( int ); - if (!NXEventSystemInfo( hid.paramConnect, NX_EVS_DEVICE_INFO, + if (!NXEventSystemInfo( darwinParamConnect, NX_EVS_DEVICE_INFO, (NXEventSystemInfoType) info, &size )) { ErrorF("Error reading event status driver info.\n"); return FALSE; @@ -416,9 +416,9 @@ km.charP = inBuffer; km.intP++; while (km.intP+3 < bufferEnd) { - map_interface = *(km.intP++); - map_handler_id = *(km.intP++); - map_size = *(km.intP++); + map_interface = NXSwapBigIntToHost(*(km.intP++)); + map_handler_id = NXSwapBigIntToHost(*(km.intP++)); + map_size = NXSwapBigIntToHost(*(km.intP++)); if (map_interface == interface) { if (map_handler_id == handler_id || hasInterface) { hasMatch = TRUE; @@ -476,7 +476,7 @@ // Open a shared connection to the HID System. // Note that the Event Status Driver is really just a wrapper // for a kIOHIDParamConnectType connection. - assert( hid.paramConnect = NXOpenEventStatus() ); + assert( darwinParamConnect = NXOpenEventStatus() ); if (darwinKeymapFile) { haveKeymap = DarwinReadKeymapFile(&keyMap); @@ -491,9 +491,9 @@ if (!haveKeymap) { // get the Darwin keyboard map - keyMap.size = NXKeyMappingLength( hid.paramConnect ); + keyMap.size = NXKeyMappingLength( darwinParamConnect ); keyMap.mapping = (char*) xalloc( keyMap.size ); - if (!NXGetKeyMapping( hid.paramConnect, &keyMap )) { + if (!NXGetKeyMapping( darwinParamConnect, &keyMap )) { FatalError("Could not get kernel keymapping! Load keymapping from file instead.\n"); } } Index: xc/programs/Xserver/hw/darwin/xfIOKit.c diff -u xc/programs/Xserver/hw/darwin/xfIOKit.c:1.14 xc/programs/Xserver/hw/darwin/xfIOKit.c:1.17 --- xc/programs/Xserver/hw/darwin/xfIOKit.c:1.14 Thu Jan 10 01:59:49 2002 +++ xc/programs/Xserver/hw/darwin/xfIOKit.c Sun Dec 15 01:10:15 2002 @@ -8,9 +8,32 @@ * Significantly rewritten for XFree86 4.0.1 by Torrey Lyons * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.c,v 1.14 2002/01/10 06:59:49 torrey Exp $ */ - -#define NDEBUG 1 +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/xfIOKit.c,v 1.17 2002/12/15 06:10:15 torrey Exp $ */ #include "X.h" #include "Xproto.h" @@ -45,12 +68,17 @@ #include "darwin.h" #include "xfIOKit.h" +// Globals +int xfIOKitScreenIndex = 0; +io_connect_t xfIOKitInputConnect = 0; + +static pthread_t inputThread; static EvGlobals * evg; static mach_port_t masterPort; static mach_port_t notificationPort; static IONotificationPortRef NotificationPortRef; static mach_port_t pmNotificationPort; -static io_iterator_t iter; +static io_iterator_t fbIter; /* @@ -67,7 +95,7 @@ int i; IOColorEntry *newColors; ScreenPtr pScreen = pmap->pScreen; - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); assert( newColors = (IOColorEntry *) xalloc( numEntries*sizeof(IOColorEntry) )); @@ -82,13 +110,14 @@ newColors[i].blue = pdefs[i].blue; } - kr = IOFBSetCLUT( dfb->fbService, 0, numEntries, + kr = IOFBSetCLUT( iokitScreen->fbService, 0, numEntries, kSetCLUTByValue, newColors ); kern_assert( kr ); xfree( newColors ); } + /* * XFIOKitBell * FIXME @@ -101,6 +130,7 @@ { } + /* * XFIOKitGiveUp * Closes the connections to IOKit services @@ -111,14 +141,16 @@ // we must close the HID System first // because it is a client of the framebuffer - NXCloseEventStatus( hid.paramConnect ); - IOServiceClose( hid.connect ); + NXCloseEventStatus( darwinParamConnect ); + IOServiceClose( xfIOKitInputConnect ); for (i = 0; i < screenInfo.numScreens; i++) { - DarwinFramebufferPtr dfb = SCREEN_PRIV(screenInfo.screens[i]); - IOServiceClose( dfb->fbService ); + XFIOKitScreenPtr iokitScreen = + XFIOKIT_SCREEN_PRIV(screenInfo.screens[i]); + IOServiceClose( iokitScreen->fbService ); } } + /* * ClearEvent * Clear an event from the HID System event queue @@ -132,16 +164,17 @@ ep->data.compound.misc.L[1] = 0; } + /* * XFIOKitHIDThread - * Read the HID System event queue and pass to pipe + * Read the HID System event queue, translate it to an X event, + * and queue it for processing. */ 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; @@ -151,19 +184,103 @@ kern_assert(kr); while (evg->LLEHead != evg->LLETail) { + NXEvent ev; + xEvent xe; + char byte = 0; + + // Extract the next event from the kernel queue oldHead = (NXEQElement*)&evg->lleq[evg->LLEHead]; ev_lock(&oldHead->sema); ev = oldHead->event; ClearEvent(&oldHead->event); evg->LLEHead = oldHead->next; ev_unlock(&oldHead->sema); + + memset(&xe, 0, sizeof(xe)); + + // These fields should be filled in for every event + xe.u.keyButtonPointer.rootX = ev.location.x; + xe.u.keyButtonPointer.rootY = ev.location.y; + xe.u.keyButtonPointer.time = GetTimeInMillis(); + + switch( ev.type ) { + case NX_MOUSEMOVED: + xe.u.u.type = MotionNotify; + break; + + case NX_LMOUSEDOWN: + xe.u.u.type = ButtonPress; + xe.u.u.detail = 1; + break; - write(iokitEventWriteFD, &ev, sizeof(ev)); + case NX_LMOUSEUP: + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 1; + break; + + // A newer kernel generates multi-button events with + // NX_SYSDEFINED. Button 2 isn't handled correctly by + // older kernels anyway. Just let NX_SYSDEFINED events + // handle these. +#if 0 + case NX_RMOUSEDOWN: + xe.u.u.type = ButtonPress; + xe.u.u.detail = 2; + break; + + case NX_RMOUSEUP: + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 2; + break; +#endif + + case NX_KEYDOWN: + xe.u.u.type = KeyPress; + xe.u.u.detail = ev.data.key.keyCode; + break; + + case NX_KEYUP: + xe.u.u.type = KeyRelease; + xe.u.u.detail = ev.data.key.keyCode; + break; + + case NX_FLAGSCHANGED: + xe.u.u.type = kXDarwinUpdateModifiers; + xe.u.clientMessage.u.l.longs0 = ev.flags; + break; + + case NX_SYSDEFINED: + if (ev.data.compound.subType == 7) { + xe.u.u.type = kXDarwinUpdateButtons; + xe.u.clientMessage.u.l.longs0 = + ev.data.compound.misc.L[0]; + xe.u.clientMessage.u.l.longs1 = + ev.data.compound.misc.L[1]; + } else { + continue; + } + break; + + case NX_SCROLLWHEELMOVED: + xe.u.u.type = kXDarwinScrollWheel; + xe.u.clientMessage.u.s.shorts0 = + ev.data.scrollWheel.deltaAxis1; + break; + + default: + continue; + } + + DarwinEQEnqueue(&xe); + // signal there is an event ready to handle + write(iokitEventWriteFD, &byte, 1); } } + return NULL; } + /* * XFIOKitPMThread * Handle power state notifications @@ -171,7 +288,7 @@ static void *XFIOKitPMThread(void *arg) { ScreenPtr pScreen = (ScreenPtr)arg; - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); for (;;) { mach_msg_return_t kr; @@ -183,7 +300,7 @@ // display is powering down if (msg.header.msgh_id == 0) { - IOFBAcknowledgePM( dfb->fbService ); + IOFBAcknowledgePM( iokitScreen->fbService ); xf86SetRootClip(pScreen, FALSE); } // display just woke up @@ -194,16 +311,19 @@ return NULL; } + /* * SetupFBandHID * Setup an IOFramebuffer service and connect the HID system to it. */ static Bool SetupFBandHID( int index, - DarwinFramebufferPtr dfb) + DarwinFramebufferPtr dfb, + XFIOKitScreenPtr iokitScreen) { kern_return_t kr; io_service_t service; + io_connect_t fbService; vm_address_t vram; vm_size_t shmemSize; int i; @@ -212,23 +332,26 @@ IODisplayModeID displayMode, *allModes; IOIndex displayDepth; IOFramebufferInformation fbInfo; + IOPixelInformation pixelInfo; StdFBShmem_t *cshmem; // find and open the IOFrameBuffer service - service = IOIteratorNext(iter); + service = IOIteratorNext(fbIter); if (service == 0) return FALSE; kr = IOServiceOpen( service, mach_task_self(), - kIOFBServerConnectType, &dfb->fbService ); + kIOFBServerConnectType, &iokitScreen->fbService ); IOObjectRelease( service ); if (kr != KERN_SUCCESS) { ErrorF("Failed to connect as window server to screen %i.\n", index); return FALSE; } + fbService = iokitScreen->fbService; // create the slice of shared memory containing cursor state data - kr = IOFBCreateSharedCursor( dfb->fbService, kIOFBCurrentShmemVersion, + kr = IOFBCreateSharedCursor( fbService, + kIOFBCurrentShmemVersion, 32, 32 ); if (kr != KERN_SUCCESS) return FALSE; @@ -236,7 +359,7 @@ // Register for power management events for the framebuffer's device kr = IOCreateReceivePort(kOSNotificationMessageID, &pmNotificationPort); kern_assert(kr); - kr = IOConnectSetNotificationPort( dfb->fbService, 0, + kr = IOConnectSetNotificationPort( fbService, 0, pmNotificationPort, 0 ); if (kr != KERN_SUCCESS) { ErrorF("Power management registration failed.\n"); @@ -244,7 +367,8 @@ // SET THE SCREEN PARAMETERS // get the current screen resolution, refresh rate and depth - kr = IOFBGetCurrentDisplayModeAndDepth( dfb->fbService, &displayMode, + kr = IOFBGetCurrentDisplayModeAndDepth( fbService, + &displayMode, &displayDepth ); if (kr != KERN_SUCCESS) return FALSE; @@ -252,7 +376,8 @@ // 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, + kr = IOFBGetDisplayModeInformation( fbService, + displayMode, &modeInfo ); if (kr != KERN_SUCCESS) return FALSE; @@ -266,7 +391,8 @@ // change the pixel depth if desired if (darwinDesiredDepth != -1) { - kr = IOFBGetDisplayModeInformation( dfb->fbService, displayMode, + kr = IOFBGetDisplayModeInformation( fbService, + displayMode, &modeInfo ); if (kr != KERN_SUCCESS) return FALSE; @@ -277,7 +403,7 @@ } displayDepth = darwinDesiredDepth; - kr = IOFBSetDisplayModeAndDepth( dfb->fbService, displayMode, + kr = IOFBSetDisplayModeAndDepth( fbService, displayMode, displayDepth ); if (kr != KERN_SUCCESS) return FALSE; @@ -287,17 +413,17 @@ } else { // get an array of all supported display modes - kr = IOFBGetDisplayModeCount( dfb->fbService, &numModes ); + kr = IOFBGetDisplayModeCount( fbService, &numModes ); if (kr != KERN_SUCCESS) return FALSE; assert(allModes = (IODisplayModeID *) xalloc( numModes * sizeof(IODisplayModeID) )); - kr = IOFBGetDisplayModes( dfb->fbService, numModes, allModes ); + kr = IOFBGetDisplayModes( fbService, numModes, allModes ); if (kr != KERN_SUCCESS) return FALSE; for (i = 0; i < numModes; i++) { - kr = IOFBGetDisplayModeInformation( dfb->fbService, allModes[i], + kr = IOFBGetDisplayModeInformation( fbService, allModes[i], &modeInfo ); if (kr != KERN_SUCCESS) return FALSE; @@ -318,7 +444,7 @@ (darwinDesiredRefresh << 16) == modeInfo.refreshRate)) { displayMode = allModes[i]; displayDepth = darwinDesiredDepth; - kr = IOFBSetDisplayModeAndDepth(dfb->fbService, + kr = IOFBSetDisplayModeAndDepth(fbService, displayMode, displayDepth); if (kr != KERN_SUCCESS) @@ -336,24 +462,24 @@ } } - kr = IOFBGetPixelInformation( dfb->fbService, displayMode, displayDepth, - kIOFBSystemAperture, &dfb->pixelInfo ); + kr = IOFBGetPixelInformation( fbService, displayMode, displayDepth, + kIOFBSystemAperture, &pixelInfo ); if (kr != KERN_SUCCESS) return FALSE; #ifdef __i386__ /* x86 in 8bit mode currently needs fixed color map... */ - if( dfb->pixelInfo.bitsPerComponent == 8 ) { - dfb->pixelInfo.pixelType = kIOFixedCLUTPixels; + if( pixelInfo.bitsPerComponent == 8 ) { + pixelInfo.pixelType = kIOFixedCLUTPixels; } #endif #ifdef OLD_POWERBOOK_G3 - if (dfb->pixelInfo.pixelType == kIOCLUTPixels) - dfb->pixelInfo.pixelType = kIOFixedCLUTPixels; + if (pixelInfo.pixelType == kIOCLUTPixels) + pixelInfo.pixelType = kIOFixedCLUTPixels; #endif - kr = IOFBGetFramebufferInformationForAperture( dfb->fbService, + kr = IOFBGetFramebufferInformationForAperture( fbService, kIOFBSystemAperture, &fbInfo ); if (kr != KERN_SUCCESS) @@ -369,14 +495,14 @@ return FALSE; } - kr = IOConnectMapMemory( dfb->fbService, kIOFBCursorMemory, + kr = IOConnectMapMemory( fbService, kIOFBCursorMemory, mach_task_self(), (vm_address_t *) &cshmem, &shmemSize, kIOMapAnywhere ); if (kr != KERN_SUCCESS) return FALSE; - dfb->cursorShmem = cshmem; + iokitScreen->cursorShmem = cshmem; - kr = IOConnectMapMemory( dfb->fbService, kIOFBSystemAperture, + kr = IOConnectMapMemory( fbService, kIOFBSystemAperture, mach_task_self(), &vram, &shmemSize, kIOMapAnywhere ); if (kr != KERN_SUCCESS) @@ -389,21 +515,32 @@ dfb->height = fbInfo.activeHeight; dfb->pitch = fbInfo.bytesPerRow; dfb->bitsPerPixel = fbInfo.bitsPerPixel; - dfb->colorBitsPerPixel = dfb->pixelInfo.componentCount * - dfb->pixelInfo.bitsPerComponent; + dfb->colorBitsPerPixel = pixelInfo.componentCount * + pixelInfo.bitsPerComponent; + dfb->bitsPerComponent = pixelInfo.bitsPerComponent; + + // Note: Darwin kIORGBDirectPixels = X TrueColor, not DirectColor + if (pixelInfo.pixelType == kIORGBDirectPixels) { + dfb->colorType = TrueColor; + } else if (pixelInfo.pixelType == kIOCLUTPixels) { + dfb->colorType = PseudoColor; + } else if (pixelInfo.pixelType == kIOFixedCLUTPixels) { + dfb->colorType = StaticColor; + } // Inform the HID system that the framebuffer is also connected to it. - kr = IOConnectAddClient( hid.connect, dfb->fbService ); + kr = IOConnectAddClient( xfIOKitInputConnect, fbService ); kern_assert( kr ); // We have to have added at least one screen // before we can enable the cursor. - kr = IOHIDSetCursorEnable(hid.connect, TRUE); + kr = IOHIDSetCursorEnable(xfIOKitInputConnect, TRUE); kern_assert( kr ); return TRUE; } + /* * XFIOKitAddScreen * IOKit specific initialization for each screen. @@ -413,12 +550,17 @@ ScreenPtr pScreen) { DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + XFIOKitScreenPtr iokitScreen; + + // allocate space for private per screen storage + iokitScreen = xalloc(sizeof(XFIOKitScreenRec)); + XFIOKIT_SCREEN_PRIV(pScreen) = iokitScreen; // setup hardware framebuffer - dfb->fbService = 0; - if (! SetupFBandHID(index, dfb)) { - if (dfb->fbService) { - IOServiceClose(dfb->fbService); + iokitScreen->fbService = 0; + if (! SetupFBandHID(index, dfb, iokitScreen)) { + if (iokitScreen->fbService) { + IOServiceClose(iokitScreen->fbService); } return FALSE; } @@ -426,6 +568,7 @@ return TRUE; } + /* * XFIOKitSetupScreen * Finalize IOKit specific initialization of each screen. @@ -443,7 +586,7 @@ } // initialize colormap handling as needed - if (dfb->pixelInfo.pixelType == kIOCLUTPixels) { + if (dfb->colorType == PseudoColor) { pScreen->StoreColors = XFIOKitStoreColors; } @@ -454,26 +597,35 @@ return TRUE; } + /* * XFIOKitInitOutput - * One-time initialization of IOKit support. + * One-time initialization of IOKit output support. */ void XFIOKitInitOutput( int argc, char **argv) { + static unsigned long generation = 0; kern_return_t kr; + io_iterator_t iter; io_service_t service; vm_address_t shmem; vm_size_t shmemSize; - int fd[2]; ErrorF("Display mode: IOKit\n"); + // Allocate private storage for each screen's IOKit specific info + if (generation != serverGeneration) { + xfIOKitScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + kr = IOMasterPort(bootstrap_port, &masterPort); kern_assert( kr ); - // find and open the HID System Service + // Find and open the HID System Service + // Do this now to be sure the Mac OS X window server is not running. kr = IOServiceGetMatchingServices( masterPort, IOServiceMatching( kIOHIDSystemClass ), &iter ); @@ -482,7 +634,7 @@ assert( service = IOIteratorNext( iter ) ); kr = IOServiceOpen( service, mach_task_self(), kIOHIDServerConnectType, - &hid.connect ); + &xfIOKitInputConnect ); if (kr != KERN_SUCCESS) { ErrorF("Failed to connect to the HID System as the window server!\n"); #ifdef DARWIN_WITH_QUARTZ @@ -495,13 +647,12 @@ IOObjectRelease( service ); IOObjectRelease( iter ); - kr = IOHIDCreateSharedMemory( hid.connect, kIOHIDCurrentShmemVersion ); + // Setup the event queue in memory shared by the kernel and X server + kr = IOHIDCreateSharedMemory( xfIOKitInputConnect, + kIOHIDCurrentShmemVersion ); kern_assert( kr ); - kr = IOHIDSetEventsEnable(hid.connect, TRUE); - kern_assert( kr ); - - kr = IOConnectMapMemory( hid.connect, kIOHIDGlobalMemory, + kr = IOConnectMapMemory( xfIOKitInputConnect, kIOHIDGlobalMemory, mach_task_self(), &shmem, &shmemSize, kIOMapAnywhere ); kern_assert( kr ); @@ -514,7 +665,8 @@ notificationPort = IONotificationPortGetMachPort(NotificationPortRef); - kr = IOConnectSetNotificationPort( hid.connect, kIOHIDEventNotification, + kr = IOConnectSetNotificationPort( xfIOKitInputConnect, + kIOHIDEventNotification, notificationPort, 0 ); kern_assert( kr ); @@ -523,19 +675,37 @@ // find number of framebuffers kr = IOServiceGetMatchingServices( masterPort, IOServiceMatching( IOFRAMEBUFFER_CONFORMSTO ), - &iter ); + &fbIter ); kern_assert( kr ); darwinScreensFound = 0; - while ((service = IOIteratorNext(iter))) { + while ((service = IOIteratorNext(fbIter))) { IOObjectRelease( service ); darwinScreensFound++; } - IOIteratorReset(iter); + IOIteratorReset(fbIter); +} + +/* + * XFIOKitInitInput + * One-time initialization of IOKit input support. + */ +void XFIOKitInitInput( + int argc, + char **argv) +{ + kern_return_t kr; + int fd[2]; + + kr = IOHIDSetEventsEnable(xfIOKitInputConnect, TRUE); + kern_assert( kr ); + + // Start event passing thread assert( pipe(fd) == 0 ); darwinEventFD = fd[0]; fcntl(darwinEventFD, F_SETFL, O_NONBLOCK); - pthread_create(&hid.thread, NULL, + pthread_create(&inputThread, NULL, XFIOKitHIDThread, (void *) fd[1]); + } Index: xc/programs/Xserver/hw/darwin/xfIOKit.h diff -u xc/programs/Xserver/hw/darwin/xfIOKit.h:1.6 xc/programs/Xserver/hw/darwin/xfIOKit.h:1.9 --- xc/programs/Xserver/hw/darwin/xfIOKit.h:1.6 Sat Dec 22 00:28:34 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKit.h Sun Dec 15 01:10:15 2002 @@ -3,20 +3,59 @@ IOKit specific functions and definitions */ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.h,v 1.6 2001/12/22 05:28:34 torrey Exp $ */ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/xfIOKit.h,v 1.9 2002/12/15 06:10:15 torrey Exp $ */ #ifndef _XFIOKIT_H #define _XFIOKIT_H +#include <pthread.h> +#include <IOKit/graphics/IOFramebufferShared.h> #include "X11/Xproto.h" #include "screenint.h" #include "darwin.h" +typedef struct { + io_connect_t fbService; + StdFBShmem_t *cursorShmem; +} XFIOKitScreenRec, *XFIOKitScreenPtr; + +#define XFIOKIT_SCREEN_PRIV(pScreen) \ + ((XFIOKitScreenPtr)pScreen->devPrivates[xfIOKitScreenIndex].ptr) + +extern int xfIOKitScreenIndex; // index into pScreen.devPrivates +extern io_connect_t xfIOKitInputConnect; + Bool XFIOKitAddScreen(int index, ScreenPtr pScreen); Bool XFIOKitSetupScreen(int index, ScreenPtr pScreen); Bool XFIOKitInitCursor(ScreenPtr pScreen); void XFIOKitInitOutput(int argc, char **argv); +void XFIOKitInitInput(int argc, char **argv); void XFIOKitGiveUp(void); void XFIOKitBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); -#endif +#endif /* _XFIOKIT_H */ Index: xc/programs/Xserver/hw/darwin/xfIOKitCursor.c diff -u xc/programs/Xserver/hw/darwin/xfIOKitCursor.c:1.3 xc/programs/Xserver/hw/darwin/xfIOKitCursor.c:1.6 --- xc/programs/Xserver/hw/darwin/xfIOKitCursor.c:1.3 Wed Aug 1 01:34:05 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKitCursor.c Mon Dec 9 19:00:39 2002 @@ -32,16 +32,42 @@ * 1.0 by Torrey T. Lyons, October 30, 2000 * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKitCursor.c,v 1.3 2001/08/01 05:34:05 torrey Exp $ */ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/xfIOKitCursor.c,v 1.6 2002/12/10 00:00:39 torrey Exp $ */ #include "scrnintstr.h" #include "cursorstr.h" +#include "mipointrst.h" #include "micmap.h" #define NO_CFPLUGIN #include <IOKit/graphics/IOGraphicsLib.h> #include <IOKit/hidsystem/IOHIDLib.h> #include "darwin.h" -#include "mipointrst.h" +#include "xfIOKit.h" #define DUMP_DARWIN_CURSOR FALSE @@ -417,7 +443,8 @@ { kern_return_t kr; DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - StdFBShmem_t *cshmem = dfb->cursorShmem; + XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); + StdFBShmem_t *cshmem = iokitScreen->cursorShmem; XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); // are we supposed to remove the cursor? @@ -428,7 +455,7 @@ if (!cshmem->cursorShow) { cshmem->cursorShow++; if (cshmem->hardwareCursorActive) { - kr = IOFBSetCursorVisible(dfb->fbService, FALSE); + kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE); kern_assert( kr ); } } @@ -476,7 +503,7 @@ // try to use a hardware cursor if (ScreenPriv->canHWCursor) { - kr = IOFBSetNewCursor(dfb->fbService, 0, 0, 0); + kr = IOFBSetNewCursor(iokitScreen->fbService, 0, 0, 0); // FIXME: this is a fatal error without the kernel cursor kern_assert( kr ); #if 0 @@ -492,7 +519,7 @@ cshmem->cursorShow--; if (!cshmem->cursorShow && ScreenPriv->canHWCursor) { - kr = IOFBSetCursorVisible(dfb->fbService, TRUE); + kr = IOFBSetCursorVisible(iokitScreen->fbService, TRUE); // FIXME: this is a fatal error without the kernel cursor kern_assert( kr ); #if 0 @@ -579,7 +606,7 @@ { kern_return_t kr; - kr = IOHIDSetMouseLocation( hid.connect, x, y ); + kr = IOHIDSetMouseLocation( xfIOKitInputConnect, x, y ); if (kr != KERN_SUCCESS) { ErrorF("Could not set cursor position with kernel return 0x%x.\n", kr); } @@ -590,6 +617,8 @@ XFIOKitCursorOffScreen, XFIOKitCrossScreen, XFIOKitWarpCursor, + DarwinEQPointerPost, + DarwinEQSwitchScreen }; @@ -630,15 +659,15 @@ XFIOKitInitCursor( ScreenPtr pScreen) { - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(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); + if (!iokitScreen->cursorShmem->cursorShow++) { + if (iokitScreen->cursorShmem->hardwareCursorActive) { + kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE); kern_assert( kr ); } } @@ -661,23 +690,23 @@ pScreen->devPrivates[darwinCursorScreenIndex].ptr = (pointer) ScreenPriv; // check if a hardware cursor is supported - if (!dfb->cursorShmem->hardwareCursorCapable) { + if (!iokitScreen->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); + kr = IOFBSetNewCursor(iokitScreen->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); + kr = IOFBSetCursorVisible(iokitScreen->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); + IOFBSetCursorVisible(iokitScreen->fbService, FALSE); } ScreenPriv->cursorMode = 0; Index: xc/programs/Xserver/hw/darwin/xfIOKitStartup.c diff -u xc/programs/Xserver/hw/darwin/xfIOKitStartup.c:1.7 xc/programs/Xserver/hw/darwin/xfIOKitStartup.c:1.12 --- xc/programs/Xserver/hw/darwin/xfIOKitStartup.c:1.7 Sat Dec 22 00:28:34 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKitStartup.c Tue Jan 14 21:34:04 2003 @@ -3,9 +3,39 @@ * Startup code for the IOKit Darwin X Server * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKitStartup.c,v 1.7 2001/12/22 05:28:34 torrey Exp $ */ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/xfIOKitStartup.c,v 1.12 2003/01/15 02:34:04 torrey Exp $ */ + +#include "quartz/quartz.h" +#include "micmap.h" + +void GlxExtensionInit(void); +void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr); -#include "bundle/quartz.h" /* * DarwinHandleGUI @@ -19,6 +49,28 @@ { } + +/* + * DarwinGlxExtensionInit + * Initialize the GLX extension. + * Mesa is linked into the IOKit mode X server so we just call directly. + */ +void DarwinGlxExtensionInit(void) +{ + GlxExtensionInit(); +} + + +/* + * DarwinGlxWrapInitVisuals + */ +void DarwinGlxWrapInitVisuals( + miInitVisualsProcPtr *procPtr) +{ + GlxWrapInitVisuals(procPtr); +} + + // The IOKit X server does not accept any Quartz command line options. int QuartzProcessArgument( int argc, char *argv[], int i ) { @@ -34,6 +86,7 @@ return 0; } + // No Quartz support. All Quartz functions are no-ops. Bool QuartzAddScreen(int index, ScreenPtr pScreen) { @@ -48,24 +101,16 @@ FatalError("QuartzInitOutput called without Quartz support.\n"); } -void QuartzGiveUp(void) { - return; // no message, we are quitting anyway +void QuartzInitInput(int argc, char **argv) { + FatalError("QuartzInitInput 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 QuartzGiveUp(void) { + return; // no message, we are quitting anyway } -void QuartzWritePasteboard(void) { - FatalError("QuartzWritePasteboard called without Quartz support.\n"); +void QuartzProcessEvent(xEvent *xe) { + FatalError("QuartzProcessEvent called without Quartz support.\n"); } void QuartzBell(void) { Index: xc/programs/Xserver/hw/darwin/quartz/Imakefile diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/Imakefile:1.5 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/Imakefile Wed Dec 4 20:07:40 2002 @@ -0,0 +1,102 @@ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/quartz/Imakefile,v 1.5 2002/12/05 01:07:40 torrey Exp $ + +#include <Server.tmpl> + +SRCS = Preferences.m \ + XApplication.m \ + XServer.m \ + XView.m \ + aquaPicture.c \ + aquaWindow.c \ + fullscreen.c \ + quartz.c \ + quartzAudio.c \ + quartzCocoa.m \ + quartzCursor.c \ + quartzPasteboard.c \ + rootlessAquaGlue.c \ + rootlessAquaImp.m \ + rootlessCommon.c \ + rootlessGC.c \ + rootlessScreen.c \ + rootlessValTree.c \ + rootlessWindow.c \ + pseudoramiX.c + +OBJS = Preferences.o \ + XApplication.o \ + XServer.o \ + XView.o \ + aquaPicture.o \ + aquaWindow.o \ + fullscreen.o \ + quartz.o \ + quartzAudio.o \ + quartzCocoa.o \ + quartzCursor.o \ + quartzPasteboard.o \ + rootlessAquaGlue.o \ + rootlessAquaImp.o \ + rootlessCommon.o \ + rootlessGC.o \ + rootlessScreen.o \ + rootlessValTree.o \ + rootlessWindow.o \ + pseudoramiX.o + +INCLUDES = -I. -I$(SERVERSRC)/fb -I$(SERVERSRC)/mi -I$(SERVERSRC)/include \ + -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(SERVERSRC)/render \ + -I$(SERVERSRC)/miext/shadow -I$(EXTINCSRC) -I.. -I$(SERVERSRC)/Xext + +#if defined(XFree86CustomVersion) +CUSTOMVERSION = XFree86CustomVersion +CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' +#endif +#if HasCGMachPort +QUARTZDEFINES = -DHAS_CG_MACH_PORT +#endif + +#if XFree86Devel +PBXBUILDSTYLE = -buildstyle Development +DEBUGDEFINES = -DROOTLESSDEBUG +#else +PBXBUILDSTYLE = -buildstyle Deployment +#endif + +DEFINES = $(CUSTOMVERDEF) -DXBINDIR=$(BINDIR) -DXINITDIR=$(XINITDIR) \ + $(QUARTZDEFINES) $(DEBUGDEFINES) +EXTRAMANDEFS = -D__XBinDir__=$(BINDIR) +#if NothingOutsideProjectRoot +XDARWINROOT = $(BINDIR) +#else +XDARWINROOT = /Applications +#endif + +NormalLibraryObjectRule() +NormalLibraryTarget(XQuartz,$(OBJS)) + +AllTarget(quartzStartup.o) + +AllTarget(XDarwinStartup) +NormalProgramTarget(XDarwinStartup,XDarwinStartup.o, \ + NullParameter,NullParameter, \ + -framework CoreFoundation -framework ApplicationServices) +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) + +InstallManPage(XDarwinStartup,$(MANDIR)) + +clean:: + pbxbuild "clean" -target XDarwin $(PBXBUILDSTYLE) + +DependTarget() + Index: xc/programs/Xserver/hw/darwin/quartz/Preferences.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/Preferences.h:1.2 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/Preferences.h Tue Jan 14 21:34:05 2003 @@ -0,0 +1,107 @@ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.h,v 1.2 2003/01/15 02:34:05 torrey Exp $ */ + +#import <Cocoa/Cocoa.h> + +@interface Preferences : NSObject +{ + IBOutlet NSPanel *window; + IBOutlet id displayField; + IBOutlet id dockSwitchButton; + IBOutlet id fakeButton; + IBOutlet id button2ModifiersMatrix; + IBOutlet id button3ModifiersMatrix; + IBOutlet id switchKeyButton; + IBOutlet id keymapFileField; + IBOutlet id modeMatrix; + IBOutlet id modeWindowButton; + IBOutlet id startupHelpButton; + IBOutlet id systemBeepButton; + IBOutlet id mouseAccelChangeButton; + IBOutlet id useXineramaButton; + IBOutlet id addToPathButton; + IBOutlet id addToPathField; + IBOutlet id useDefaultShellMatrix; + IBOutlet id useOtherShellField; + IBOutlet id depthButton; + + 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)windowWillClose:(NSNotification *)aNotification; + ++ (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)setButton2Mask:(int)newFakeMask; ++ (void)setButton3Mask:(int)newFakeMask; ++ (void)setMouseAccelChange:(BOOL)newMouseAccelChange; ++ (void)setUseQDCursor:(int)newUseQDCursor; ++ (void)setRootless:(BOOL)newRootless; ++ (void)setUseAGL:(BOOL)newUseAGL; ++ (void)setModeWindow:(BOOL)newModeWindow; ++ (void)setStartupHelp:(BOOL)newStartupHelp; ++ (void)setSystemBeep:(BOOL)newSystemBeep; ++ (void)setXinerama:(BOOL)newXinerama; ++ (void)setAddToPath:(BOOL)newAddToPath; ++ (void)setAddToPathString:(NSString*)newAddToPathString; ++ (void)setUseDefaultShell:(BOOL)newUseDefaultShell; ++ (void)setShellString:(NSString*)newShellString; ++ (void)setDepth:(int)newDepth; ++ (void)saveToDisk; + ++ (BOOL)useKeymapFile; ++ (NSString*)keymapFile; ++ (NSString*)switchString; ++ (unsigned int)keyCode; ++ (unsigned int)modifiers; ++ (int)display; ++ (BOOL)dockSwitch; ++ (BOOL)fakeButtons; ++ (int)button2Mask; ++ (int)button3Mask; ++ (BOOL)mouseAccelChange; ++ (int)useQDCursor; ++ (BOOL)rootless; ++ (BOOL)useAGL; ++ (BOOL)modeWindow; ++ (BOOL)startupHelp; ++ (BOOL)systemBeep; ++ (BOOL)xinerama; ++ (BOOL)addToPath; ++ (NSString*)addToPathString; ++ (BOOL)useDefaultShell; ++ (NSString*)shellString; ++ (int)depth; + +@end + +// Possible settings for useQDCursor +enum { + qdCursor_Never, // never use QuickDraw cursor + qdCursor_Not8Bit, // don't try to use QuickDraw with 8-bit depth + qdCursor_Always // always try to use QuickDraw cursor +}; + +// Possible settings for depth +enum { + depth_Current, + depth_8Bit, + depth_15Bit, + depth_24Bit +}; Index: xc/programs/Xserver/hw/darwin/quartz/Preferences.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/Preferences.m:1.2 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/Preferences.m Tue Jan 14 21:34:06 2003 @@ -0,0 +1,530 @@ +// +// Preferences.m +// +// This class keeps track of the user preferences. +// +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.2 2003/01/15 02:34:06 torrey Exp $ */ + +#import "Preferences.h" +#import "quartzCommon.h" +#include <IOKit/hidsystem/IOLLEvent.h> // for modifier masks + +// Macros to build the path name +#ifndef XBINDIR +#define XBINDIR /usr/X11R6/bin +#endif +#define STR(s) #s +#define XSTRPATH(s) STR(s) + + +@implementation Preferences + ++ (void)initialize +{ + // Provide user defaults if needed + NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInt:0], @"Display", + @"YES", @"FakeButtons", + [NSNumber numberWithInt:NX_COMMANDMASK], @"Button2Mask", + [NSNumber numberWithInt:NX_ALTERNATEMASK], @"Button3Mask", + NSLocalizedString(@"USA.keymapping",@""), @"KeymappingFile", + @"YES", @"UseKeymappingFile", + NSLocalizedString(@"Cmd-Opt-a",@""), @"SwitchString", + @"YES", @"UseRootlessMode", + @"YES", @"UseAGLforGLX", + @"YES", @"ShowModePickWindow", + @"YES", @"ShowStartupHelp", + [NSNumber numberWithInt:0], @"SwitchKeyCode", + [NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)], + @"SwitchModifiers", @"NO", @"UseSystemBeep", + @"YES", @"DockSwitch", + @"NO", @"AllowMouseAccelChange", + [NSNumber numberWithInt:qdCursor_Not8Bit], @"UseQDCursor", + @"YES", @"Xinerama", + @"YES", @"AddToPath", + [NSString stringWithCString:XSTRPATH(XBINDIR)], @"AddToPathString", + @"YES", @"UseDefaultShell", + @"/bin/tcsh", @"Shell", + [NSNumber numberWithInt:depth_Current], @"Depth", 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 a modifiers checkbox matrix to match a modifier mask +- (void)resetMatrix:(NSMatrix *)aMatrix withMask:(int)aMask +{ + [aMatrix setState:(aMask & NX_SHIFTMASK) atRow:0 column:0]; + [aMatrix setState:(aMask & NX_CONTROLMASK) atRow:1 column:0]; + [aMatrix setState:(aMask & NX_COMMANDMASK) atRow:2 column:0]; + [aMatrix setState:(aMask & NX_ALTERNATEMASK) atRow:3 column:0]; + [aMatrix setState:(aMask & NX_SECONDARYFNMASK) atRow:4 column:0]; +} + +// Generate a modifiers mask from a modifiers checkbox matrix +- (int)getMaskFromMatrix:(NSMatrix *)aMatrix +{ + int theMask = 0; + + if ([[aMatrix cellAtRow:0 column:0] state]) + theMask |= NX_SHIFTMASK; + if ([[aMatrix cellAtRow:1 column:0] state]) + theMask |= NX_CONTROLMASK; + if ([[aMatrix cellAtRow:2 column:0] state]) + theMask |= NX_COMMANDMASK; + if ([[aMatrix cellAtRow:3 column:0] state]) + theMask |= NX_ALTERNATEMASK; + if ([[aMatrix cellAtRow:4 column:0] state]) + theMask |= NX_SECONDARYFNMASK; + + return theMask; +} + +// Set the window controls to the state in user defaults +- (void)resetWindow +{ + if ([Preferences keymapFile] == nil) + [keymapFileField setStringValue:@" "]; + else + [keymapFileField setStringValue:[Preferences keymapFile]]; + + if ([Preferences switchString] == nil) + [switchKeyButton setTitle:@"--"]; + else + [switchKeyButton setTitle:[Preferences switchString]]; + + [displayField setIntValue:[Preferences display]]; + [dockSwitchButton setIntValue:[Preferences dockSwitch]]; + [fakeButton setIntValue:[Preferences fakeButtons]]; + [self resetMatrix:button2ModifiersMatrix + withMask:[Preferences button2Mask]]; + [self resetMatrix:button3ModifiersMatrix + withMask:[Preferences button3Mask]]; + [modeMatrix setState:[Preferences rootless] atRow:0 column:1]; + [startupHelpButton setIntValue:[Preferences startupHelp]]; + [modeWindowButton setIntValue:[Preferences modeWindow]]; + [systemBeepButton setIntValue:[Preferences systemBeep]]; + [mouseAccelChangeButton setIntValue:[Preferences mouseAccelChange]]; + [useXineramaButton setIntValue:[Preferences xinerama]]; + [addToPathButton setIntValue:[Preferences addToPath]]; + [addToPathField setStringValue:[Preferences addToPathString]]; + [useDefaultShellMatrix setState:![Preferences useDefaultShell] + atRow:1 column:0]; + [useOtherShellField setStringValue:[Preferences shellString]]; + [depthButton selectItemAtIndex:[Preferences depth]]; +} + +- (void)awakeFromNib +{ + [self resetWindow]; +} + +// Preference window delegate +- (void)windowWillClose:(NSNotification *)aNotification +{ + [self resetWindow]; + [self initSwitchKey]; +} + +// 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:YES]; + [Preferences setDisplay:[displayField intValue]]; + [Preferences setDockSwitch:[dockSwitchButton intValue]]; + [Preferences setFakeButtons:[fakeButton intValue]]; + [Preferences setButton2Mask: + [self getMaskFromMatrix:button2ModifiersMatrix]]; + [Preferences setButton3Mask: + [self getMaskFromMatrix:button3ModifiersMatrix]]; + [Preferences setRootless:[[modeMatrix cellAtRow:0 column:1] state]]; + [Preferences setModeWindow:[modeWindowButton intValue]]; + [Preferences setStartupHelp:[startupHelpButton intValue]]; + [Preferences setSystemBeep:[systemBeepButton intValue]]; + [Preferences setMouseAccelChange:[mouseAccelChangeButton intValue]]; + [Preferences setXinerama:[useXineramaButton intValue]]; + [Preferences setAddToPath:[addToPathButton intValue]]; + [Preferences setAddToPathString:[addToPathField stringValue]]; + [Preferences setUseDefaultShell: + [[useDefaultShellMatrix cellAtRow:0 column:0] state]]; + [Preferences setShellString:[useOtherShellField stringValue]]; + [Preferences setDepth:[depthButton indexOfSelectedItem]]; + [Preferences saveToDisk]; + + [window orderOut:nil]; +} + +- (IBAction)setKey:(id)sender +{ + [switchKeyButton setTitle:NSLocalizedString(@"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]]; + [switchKeyButton 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)setButton2Mask:(int)newFakeMask +{ + [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask + forKey:@"Button2Mask"]; + // Update the setting used by the X server thread + darwinFakeMouse2Mask = newFakeMask; +} + ++ (void)setButton3Mask:(int)newFakeMask +{ + [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask + forKey:@"Button3Mask"]; + // Update the setting used by the X server thread + darwinFakeMouse3Mask = newFakeMask; +} + ++ (void)setMouseAccelChange:(BOOL)newMouseAccelChange +{ + [[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange + forKey:@"AllowMouseAccelChange"]; + // Update the setting used by the X server thread + quartzMouseAccelChange = newMouseAccelChange; +} + ++ (void)setUseQDCursor:(int)newUseQDCursor +{ + [[NSUserDefaults standardUserDefaults] setInteger:newUseQDCursor + forKey:@"UseQDCursor"]; +} + ++ (void)setModeWindow:(BOOL)newModeWindow +{ + [[NSUserDefaults standardUserDefaults] setBool:newModeWindow + forKey:@"ShowModePickWindow"]; +} + ++ (void)setRootless:(BOOL)newRootless +{ + [[NSUserDefaults standardUserDefaults] setBool:newRootless + forKey:@"UseRootlessMode"]; +} + ++ (void)setUseAGL:(BOOL)newUseAGL +{ + [[NSUserDefaults standardUserDefaults] setBool:newUseAGL + forKey:@"UseAGLforGLX"]; +} + ++ (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)setXinerama:(BOOL)newXinerama +{ + [[NSUserDefaults standardUserDefaults] setBool:newXinerama + forKey:@"Xinerama"]; +} + ++ (void)setAddToPath:(BOOL)newAddToPath +{ + [[NSUserDefaults standardUserDefaults] setBool:newAddToPath + forKey:@"AddToPath"]; +} + ++ (void)setAddToPathString:(NSString*)newAddToPathString +{ + [[NSUserDefaults standardUserDefaults] setObject:newAddToPathString + forKey:@"AddToPathString"]; +} + ++ (void)setUseDefaultShell:(BOOL)newUseDefaultShell +{ + [[NSUserDefaults standardUserDefaults] setBool:newUseDefaultShell + forKey:@"UseDefaultShell"]; +} + ++ (void)setShellString:(NSString*)newShellString +{ + [[NSUserDefaults standardUserDefaults] setObject:newShellString + forKey:@"Shell"]; +} + ++ (void)setDepth:(int)newDepth +{ + [[NSUserDefaults standardUserDefaults] setInteger:newDepth + forKey:@"Depth"]; +} + ++ (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"]; +} + ++ (int)button2Mask +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Button2Mask"]; +} + ++ (int)button3Mask +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Button3Mask"]; +} + ++ (BOOL)mouseAccelChange +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"AllowMouseAccelChange"]; +} + ++ (int)useQDCursor +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"UseQDCursor"]; +} + ++ (BOOL)rootless +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseRootlessMode"]; +} + ++ (BOOL)useAGL +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseAGLforGLX"]; +} + ++ (BOOL)modeWindow +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"ShowModePickWindow"]; +} + ++ (BOOL)startupHelp +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"ShowStartupHelp"]; +} + ++ (BOOL)systemBeep +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseSystemBeep"]; +} + ++ (BOOL)xinerama +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"Xinerama"]; +} + ++ (BOOL)addToPath +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"AddToPath"]; +} + ++ (NSString*)addToPathString +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"AddToPathString"]; +} + ++ (BOOL)useDefaultShell +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseDefaultShell"]; +} + ++ (NSString*)shellString +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"Shell"]; +} + ++ (int)depth +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Depth"]; +} + + +@end Index: xc/programs/Xserver/hw/darwin/quartz/XApplication.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XApplication.h:1.2 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XApplication.h Fri Oct 11 20:32:45 2002 @@ -0,0 +1,47 @@ +// +// XApplication.h +// +// Created by Andreas Monitzer on January 6, 2001. +// +/* + * Copyright (c) 2001 Andreas Monitzer. 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 THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/XApplication.h,v 1.2 2002/10/12 00:32:45 torrey Exp $ */ + +#import <Cocoa/Cocoa.h> + +#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/quartz/XApplication.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XApplication.m:1.2 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XApplication.m Fri Oct 11 20:32:45 2002 @@ -0,0 +1,47 @@ +// +// XApplication.m +// +// Created by Andreas Monitzer on January 6, 2001. +// +/* + * Copyright (c) 2001 Andreas Monitzer. 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 THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/XApplication.m,v 1.2 2002/10/12 00:32:45 torrey Exp $ */ + +#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/quartz/XCarbonWindow.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XCarbonWindow.h:1.1 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XCarbonWindow.h Wed Mar 27 21:21:18 2002 @@ -0,0 +1,41 @@ +/* + * XCarbonWindow category for Mac OS X rootless X server + * + * Copyright (c) 2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/XCarbonWindow.h,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +#import <AppKit/NSWindow.h> + +@interface NSCarbonWindow : NSWindow + +@end + + +@interface NSCarbonWindow(XCarbonWindow) + +- (void)display; + +@end Index: xc/programs/Xserver/hw/darwin/quartz/XCarbonWindow.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XCarbonWindow.m:1.1 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XCarbonWindow.m Wed Mar 27 21:21:18 2002 @@ -0,0 +1,45 @@ +/* + * XCarbonWindow category for Mac OS X rootless X server + * + * This category extends/replaces the functionality of NSCarbonWindow. + * + * Copyright (c) 2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/XCarbonWindow.m,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +#import "XCarbonWindow.h" + + +@implementation NSCarbonWindow(XCarbonWindow) + +// Unfortunately, NSCarbonWindow does not always respect autoDisplay:NO. +// NSCarbonWindow's display method erases the window content, +// so we override it. +- (void)display +{ + // Don't do anything here. +} + +@end Index: xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.c:1.1 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.c Wed Mar 27 21:21:18 2002 @@ -0,0 +1,165 @@ +/************************************************************** + * + * 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 etc. 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. + * + **************************************************************/ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. 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 + * TORREY T. LYONS 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 Torrey T. Lyons shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in this Software without prior written authorization from + * Torrey T. Lyons. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> +#include <sys/syslimits.h> +#include <ApplicationServices/ApplicationServices.h> + +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, quartzMode = -1; + 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") || + !strcmp(argv[i], "-rootless") || + !strcmp(argv[i], "-fullscreen")) + { + quartzMode = 1; + break; + + } else if (!strcmp(argv[i], "-iokit")) { + quartzMode = 0; + break; + } + } + + if (quartzMode == -1) { +#ifdef HAS_CG_MACH_PORT + // Check if the CoreGraphics window server is running. + // Mike Paquette says this is the fastest way to determine if it is running. + CFMachPortRef cgMachPortRef = CGWindowServerCFMachPort(); + if (cgMachPortRef == NULL) + quartzMode = 0; + else + quartzMode = 1; +#else + // On older systems we assume IOKit mode. + quartzMode = 0; +#endif + } + + if (quartzMode) { + // Launch the X server for the quartz modes + + char quartzPath[PATH_MAX+1]; + int pathLength; + OSStatus theStatus; + CFURLRef appURL; + CFStringRef appPath; + Boolean success; + + // Build the new argument list + newargv = (char **) malloc((argc+2) * sizeof(char *)); + for (j = argc; j; j--) + newargv[j] = argv[j]; + newargv[argc] = "-nostartx"; + newargv[argc+1] = NULL; + + // Use the XDarwinQuartz soft link if it is valid + pathLength = readlink(XPATH(XDarwinQuartz), quartzPath, PATH_MAX); + if (pathLength != -1) { + quartzPath[pathLength] = '\0'; + newargv[0] = quartzPath; + execv(newargv[0], newargv); + } + + // Otherwise query LaunchServices for the location of the XDarwin application + theStatus = LSFindApplicationForInfo(kLSUnknownCreator, + CFSTR("org.xfree86.XDarwin"), + NULL, NULL, &appURL); + if (theStatus) { + fprintf(stderr, "Could not find the XDarwin application. (Error = 0x%lx)\n", theStatus); + fprintf(stderr, "Launch XDarwin once from the Finder.\n"); + return theStatus; + } + + appPath = CFURLCopyFileSystemPath (appURL, kCFURLPOSIXPathStyle); + success = CFStringGetCString(appPath, quartzPath, PATH_MAX, CFStringGetSystemEncoding()); + if (! success) { + fprintf(stderr, "Could not find path to XDarwin application.\n"); + return success; + } + + // Launch the XDarwin application + strncat(quartzPath, "/Contents/MacOS/XDarwin", PATH_MAX); + newargv[0] = quartzPath; + execv(newargv[0], newargv); + fprintf(stderr, "Could not start XDarwin application at %s.\n", newargv[0]); + return errno; + + } else { + + // Build the new argument list + newargv = (char **) malloc((argc+1) * sizeof(char *)); + for (j = argc; j; j--) + newargv[j] = argv[j]; + newargv[0] = "XDarwin"; + newargv[argc] = NULL; + + // Launch the IOKit X server + execvp(newargv[0], newargv); + fprintf(stderr, "Could not start XDarwin IOKit X server.\n"); + return errno; + } +} Index: xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.man diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.man:1.1 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.man Wed Mar 27 21:21:18 2002 @@ -0,0 +1,75 @@ +.\" $XFree86: xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.man,v 1.1 2002/03/28 02:21:18 torrey Exp $ +.TH XDarwinStartup 1 +.SH NAME +XDarwinStartup - Startup program for the XDarwin X window server +.SH SYNOPSIS +.B XDarwinStartup +[\fI-iokit\fP] +[\fI-fullscreen\fP] +[\fI-rootless\fP] +[\fI-quartz\fP] +[\fI-idle\fP] +[\fIoptions\fP] +.SH DESCRIPTION +The \fIXDarwin(1)\fP X window server can be run in a variety of different +modes and is actually two different executables. The IOKit X server, +XDarwin, is used when running from the console. It is most commonly +located in __XBinDir__. The Quartz X server, for running in parallel with +Aqua, is a full-fledged Mac OS X application that can be started from +the Finder. Its application bundle is XDarwin.app, which is typically +located in /Applications. +.I XDarwinStartup +allows easy switching between these X servers and auto-detection of the +appropriate one to use when launching from the command line. +When run without any arguments, +.I XDarwinStartup +will start the Quartz X server if the Core Graphics window server +is currently running. Otherwise it will start the IOKit X server. +.PP +To locate the Quartz X server, +.I XDarwinStartup +will try to read the soft link at __XBinDir__/XDarwinQuartz. +This is typically a soft link to the executable of the XDarwin.app +application. If this fails, +.I XDarwinStartup +will call Launch Services to locate XDarwin.app. +.PP +To start the IOKit X server, +.I XDarwinStartup +will run the XDarwin execuatable, which should be present in the +user's path. +.SH OPTIONS +.I XDarwinStartup +accepts and passes on all options to the X server it +launches. In addition the following options have specific effects: +.TP 8 +.B \-iokit +Launch the IOKit X server. +.TP 8 +.B \-fullscreen +Launch the Quartz X server to run in full screen mode. +.TP 8 +.B \-rootless +Launch the Quartz X server to run in rootless mode. +.TP 8 +.B \-quartz +Launch the Quartz X server. +.TP 8 +.B \-idle +Pause and do nothing. This option is used by XDarwin.app when it is +started from the Finder. +.SH FILES +.TP 30 +__XBinDir__/XDarwin +IOKit mode X server +.TP 30 +/Applications/XDarwin.app +Quartz mode X server +.TP 30 +__XBinDir__/XDarwinQuartz +Soft link to Quartz mode X server executable +.SH SEE ALSO +XDarwin(1) +.SH BUGS +The path to XDarwinQuartz should not be hard coded. + Index: xc/programs/Xserver/hw/darwin/quartz/XServer.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XServer.h:1.8 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XServer.h Wed Jan 22 19:34:26 2003 @@ -0,0 +1,112 @@ +// +// XServer.h +// +/* + * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved. + * Copyright (c) 2002-2003 Torrey T. Lyons. 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 THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/XServer.h,v 1.8 2003/01/23 00:34:26 torrey Exp $ */ + +#define BOOL xBOOL +#include "Xproto.h" +#undef BOOL + +#import <Cocoa/Cocoa.h> + +@interface XServer : NSObject { + // server state + int serverState; + NSRecursiveLock *serverLock; + BOOL serverVisible; + BOOL rootlessMenuBarVisible; + BOOL queueShowServer; + UInt32 mouseState; + Class windowClass; + + // server event queue + BOOL sendServerEvents; + int eventWriteFD; + + // Aqua interface + IBOutlet NSWindow *modeWindow; + IBOutlet NSButton *startupModeButton; + IBOutlet NSButton *startFullScreenButton; + IBOutlet NSButton *startRootlessButton; + IBOutlet NSWindow *helpWindow; + IBOutlet NSButton *startupHelpButton; + IBOutlet NSPanel *switchWindow; +} + +- (id)init; + +- (BOOL)translateEvent:(NSEvent *)anEvent; +- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent; + ++ (void)append:(NSString *)value toEnv:(NSString *)name; + +- (void)startX; +- (void)finishStartX; +- (BOOL)startXClients; +- (void)run; +- (void)toggle; +- (void)showServer:(BOOL)show; +- (void)forceShowServer:(BOOL)show; +- (void)setRootClip:(BOOL)enable; +- (void)readPasteboard; +- (void)writePasteboard; +- (void)quitServer; +- (void)sendXEvent:(xEvent *)xe; +- (void)sendShowHide:(BOOL)show; +- (void)clientProcessDone:(int)clientStatus; + +// Aqua interface actions +- (IBAction)startFullScreen:(id)sender; +- (IBAction)startRootless:(id)sender; +- (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 + +// X server states +enum { + server_NotStarted, + server_Starting, + server_Running, + server_Quitting, + server_Done +}; + Index: xc/programs/Xserver/hw/darwin/quartz/XServer.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XServer.m:1.8 --- /dev/null Thu Feb 27 12:29:19 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XServer.m Wed Jan 22 19:34:26 2003 @@ -0,0 +1,1029 @@ +// +// 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. +// +/* + * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved. + * Copyright (c) 2002-2003 Torrey T. Lyons. 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 THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/XServer.m,v 1.8 2003/01/23 00:34:26 torrey Exp $ */ + +#include "quartzCommon.h" + +#define BOOL xBOOL +#include "X.h" +#include "Xproto.h" +#include "os.h" +#include "darwin.h" +#undef BOOL + +#import "XServer.h" +#import "Preferences.h" + +#include <unistd.h> +#include <stdio.h> +#include <sys/syslimits.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <pwd.h> +#include <signal.h> +#include <fcntl.h> + +// For power management notifications +#import <mach/mach_port.h> +#import <mach/mach_interface.h> +#import <mach/mach_init.h> +#import <IOKit/pwr_mgt/IOPMLib.h> +#import <IOKit/IOMessage.h> + +#define ENQUEUE(xe) \ +{ \ + char byte = 0; \ + DarwinEQEnqueue(xe); \ + /* signal there is an event ready to handle */ \ + write(eventWriteFD, &byte, 1); \ +} + +// Types of shells +enum { + shell_Unknown, + shell_Bourne, + shell_C +}; + +typedef struct { + char *name; + int type; +} shellList_t; + +static shellList_t const shellList[] = { + { "csh", shell_C }, // standard C shell + { "tcsh", shell_C }, // ... needs no introduction + { "sh", shell_Bourne }, // standard Bourne shell + { "zsh", shell_Bourne }, // Z shell + { "bash", shell_Bourne }, // GNU Bourne again shell + { NULL, shell_Unknown } +}; + +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); +extern void QuartzReallySetCursor(); +static void childDone(int sig); +static void powerDidChange(void *x, io_service_t y, natural_t messageType, + void *messageArgument); + +static NSPort *signalPort; +static NSPort *returnPort; +static NSPortMessage *signalMessage; +static pid_t clientPID; +static XServer *oneXServer; +static NSRect aquaMenuBarBox; +static io_connect_t root_port; + + +@implementation XServer + +- (id)init +{ + self = [super init]; + oneXServer = self; + + serverState = server_NotStarted; + serverLock = [[NSRecursiveLock alloc] init]; + clientPID = 0; + sendServerEvents = NO; + serverVisible = NO; + rootlessMenuBarVisible = YES; + queueShowServer = YES; + quartzServerQuitting = NO; + mouseState = 0; + eventWriteFD = quartzEventWriteFD; + windowClass = [NSWindow class]; + + // set up a port to safely send messages to main thread from server thread + signalPort = [[NSPort port] retain]; + returnPort = [[NSPort port] retain]; + signalMessage = [[NSPortMessage alloc] initWithSendPort:signalPort + receivePort:returnPort 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]) { + quartzServerQuitting = YES; + serverState = server_Done; + if (clientPID != 0) + kill(clientPID, SIGINT); + return NSTerminateNow; + } + + // Hide the X server and stop sending it events + [self showServer:NO]; + sendServerEvents = NO; + + if (clientPID != 0 || !quartzStartClients) { + int but; + + but = NSRunAlertPanel(NSLocalizedString(@"Quit X server?",@""), + NSLocalizedString(@"Quitting the X server will terminate any running X Window System programs.",@""), + NSLocalizedString(@"Quit",@""), + NSLocalizedString(@"Cancel",@""), + nil); + + switch (but) { + case NSAlertDefaultReturn: // quit + break; + case NSAlertAlternateReturn: // cancel + if (serverState == server_Running) + sendServerEvents = YES; + return NSTerminateCancel; + } + } + + quartzServerQuitting = YES; + if (clientPID != 0) + kill(clientPID, SIGINT); + + // At this point the X server is either running or starting. + if (serverState == server_Starting) { + // Quit will be queued later when server is running + return NSTerminateLater; + } else if (serverState == server_Running) { + [self quitServer]; + } + + return NSTerminateNow; +} + +// Ensure that everything has quit cleanly +- (void)applicationWillTerminate:(NSNotification *)aNotification +{ + // Make sure the client process has finished + if (clientPID != 0) { + NSLog(@"Waiting on client process..."); + sleep(2); + + // If the client process hasn't finished yet, kill it off + if (clientPID != 0) { + int clientStatus; + NSLog(@"Killing client process..."); + killpg(clientPID, SIGKILL); + waitpid(clientPID, &clientStatus, 0); + } + } + + // Wait until the X server thread quits + [serverLock lock]; +} + +// returns YES when event was handled +- (BOOL)translateEvent:(NSEvent *)anEvent +{ + xEvent xe; + static BOOL mouse1Pressed = NO; + NSEventType type; + unsigned int flags; + + if (!sendServerEvents) { + return NO; + } + + type = [anEvent type]; + flags = [anEvent modifierFlags]; + + if (!quartzRootless) { + // Check for switch keypress + if ((type == NSKeyDown) && (![anEvent isARepeat]) && + ([anEvent keyCode] == [Preferences keyCode])) + { + unsigned int switchFlags = [Preferences modifiers]; + + // Switch if all the switch modifiers are pressed, while none are + // pressed that should not be, except for caps lock. + if (((flags & switchFlags) == switchFlags) && + ((flags & ~(switchFlags | NSAlphaShiftKeyMask)) == 0)) + { + [self toggle]; + return YES; + } + } + + if (!serverVisible) + return NO; + } + + memset(&xe, 0, sizeof(xe)); + + switch (type) { + case NSLeftMouseUp: + [self getMousePosition:&xe fromEvent:anEvent]; + if (quartzRootless && !mouse1Pressed) { + // MouseUp after MouseDown in menu - ignore + return NO; + } + mouse1Pressed = NO; + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 1; + break; + case NSLeftMouseDown: + [self getMousePosition:&xe fromEvent:anEvent]; + if (quartzRootless && + ! ([anEvent window] && + [[anEvent window] isKindOfClass:windowClass])) { + // Click in non X window - ignore + return NO; + } + mouse1Pressed = YES; + xe.u.u.type = ButtonPress; + xe.u.u.detail = 1; + break; + case NSMouseMoved: + case NSLeftMouseDragged: + case NSRightMouseDragged: + case NSOtherMouseDragged: + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = MotionNotify; + break; + case NSSystemDefined: + { + long hwButtons = [anEvent data2]; + + if (![anEvent subtype]==7) + return NO; // we only use multibutton mouse events + if (mouseState == hwButtons) + return NO; // ignore double events + mouseState = hwButtons; + + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = kXDarwinUpdateButtons; + xe.u.clientMessage.u.l.longs0 = [anEvent data1]; + xe.u.clientMessage.u.l.longs1 =[anEvent data2]; + break; + } + case NSScrollWheel: + [self getMousePosition:&xe fromEvent:anEvent]; + xe.u.u.type = kXDarwinScrollWheel; + xe.u.clientMessage.u.s.shorts0 = [anEvent deltaY]; + break; + case NSKeyDown: + case NSKeyUp: + // If the mouse is not on the valid X display area, + // we don't send the X server key events. + if (![self getMousePosition:&xe fromEvent:nil]) + return NO; + if (type == NSKeyDown) + xe.u.u.type = KeyPress; + else + xe.u.u.type = KeyRelease; + xe.u.u.detail = [anEvent keyCode]; + break; + case NSFlagsChanged: + [self getMousePosition:&xe fromEvent:nil]; + xe.u.u.type = kXDarwinUpdateModifiers; + xe.u.clientMessage.u.l.longs0 = flags; + break; + case NSOtherMouseDown: // undocumented MouseDown + case NSOtherMouseUp: // undocumented MouseUp + // Hide these from AppKit to avoid its log messages + return YES; + default: + return NO; + } + + [self sendXEvent:&xe]; + + // Rootless: Send first NSLeftMouseDown to windows and views so window + // ordering can be suppressed. + // Don't pass further events - they (incorrectly?) bring the window + // forward no matter what. + if (quartzRootless && + (type == NSLeftMouseDown || type == NSLeftMouseUp) && + [anEvent clickCount] == 1 && + [[anEvent window] isKindOfClass:windowClass]) + { + return NO; + } + + return YES; +} + +// Return mouse coordinates, inverting y coordinate. +// The coordinates are extracted from an event or the current mouse position. +// For rootless mode, the menu bar is treated as not part of the usable +// X display area and the cursor position is adjusted accordingly. +// Returns YES if the cursor is not in the menu bar. +- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent +{ + NSPoint pt; + + if (anEvent) { + NSWindow *eventWindow = [anEvent window]; + + if (eventWindow) { + pt = [anEvent locationInWindow]; + pt.x += [eventWindow frame].origin.x; + pt.y += [eventWindow frame].origin.y; + } else { + pt = [NSEvent mouseLocation]; + } + } else { + pt = [NSEvent mouseLocation]; + } + + xe->u.keyButtonPointer.rootX = (int)(pt.x); + + if (quartzRootless && NSMouseInRect(pt, aquaMenuBarBox, NO)) { + // mouse in menu bar - tell X11 that it's just below instead + xe->u.keyButtonPointer.rootY = aquaMenuBarHeight; + return NO; + } else { + xe->u.keyButtonPointer.rootY = + NSHeight([[NSScreen mainScreen] frame]) - (int)(pt.y); + return YES; + } +} + +// 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 +{ + // Block SIGPIPE + // SIGPIPE repeatably killed the (rootless) server when closing a + // dozen xterms in rapid succession. Those SIGPIPEs should have been + // sent to the X server thread, which ignores them, but somehow they + // ended up in this thread instead. + { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGPIPE); + // pthread_sigmask not implemented yet + // pthread_sigmask(SIG_BLOCK, &set, NULL); + sigprocmask(SIG_BLOCK, &set, NULL); + } + + if (quartzRootless == -1) { + // The display mode was not set from the command line. + // Show mode pick panel? + if ([Preferences modeWindow]) { + if ([Preferences rootless]) + [startRootlessButton setKeyEquivalent:@"\r"]; + else + [startFullScreenButton setKeyEquivalent:@"\r"]; + [modeWindow makeKeyAndOrderFront:nil]; + } else { + // Otherwise use default mode + quartzRootless = [Preferences rootless]; + [self startX]; + } + } else { + [self startX]; + } +} + +// Start the X server thread and the client process +- (void)startX +{ + NSDictionary *appDictionary; + NSString *appVersion; + + [modeWindow close]; + + // Calculate the height of the menu bar so rootless mode can avoid it + if (quartzRootless) { + aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) - + NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1; + aquaMenuBarBox = + NSMakeRect(0, NSMaxY([[NSScreen mainScreen] visibleFrame]) + 1, + NSWidth([[NSScreen mainScreen] frame]), + aquaMenuBarHeight); + } + + // Write the XDarwin version to the console log + appDictionary = [[NSBundle mainBundle] infoDictionary]; + appVersion = [appDictionary objectForKey:@"CFBundleShortVersionString"]; + if (appVersion) + NSLog(@"\n%@", appVersion); + else + NSLog(@"No version"); + + // Start the X server thread + serverState = server_Starting; + [NSThread detachNewThreadSelector:@selector(run) toTarget:self + withObject:nil]; + + // Start the X clients if started from GUI + if (quartzStartClients) { + [self startXClients]; + } + + if (quartzRootless) { + // There is no help window for rootless; just start + [helpWindow close]; + helpWindow = nil; + } else { + IONotificationPortRef notify; + io_object_t anIterator; + + // Register for system power notifications + root_port = IORegisterForSystemPower(0, ¬ify, powerDidChange, + &anIterator); + if (root_port) { + CFRunLoopAddSource([[NSRunLoop currentRunLoop] getCFRunLoop], + IONotificationPortGetRunLoopSource(notify), + kCFRunLoopDefaultMode); + } else { + NSLog(@"Failed to register for system power notifications."); + } + + // Show the X switch window if not using dock icon switching + if (![Preferences dockSwitch]) + [switchWindow orderFront:nil]; + + if ([Preferences startupHelp]) { + // display the full screen mode help + [helpWindow makeKeyAndOrderFront:nil]; + queueShowServer = NO; + } else { + // start running full screen and make sure X is visible + ShowMenuBar(); + [self closeHelpAndShow:nil]; + } + } +} + +// Finish starting the X server thread +// This includes anything that must be done after the X server is +// ready to process events. +- (void)finishStartX +{ + sendServerEvents = YES; + serverState = server_Running; + + if (quartzRootless) { + [self forceShowServer:[NSApp isActive]]; + } else { + [self forceShowServer:queueShowServer]; + } + + if (quartzServerQuitting) { + [self quitServer]; + [NSApp replyToApplicationShouldTerminate:YES]; + } +} + +// Start the first X clients in a separate process +- (BOOL)startXClients +{ + struct passwd *passwdUser; + NSString *shellPath, *dashShellName, *commandStr, *startXPath; + NSMutableString *safeStartXPath; + NSRange aRange; + NSBundle *thisBundle; + const char *shellPathStr, *newargv[3], *shellNameStr; + int fd[2], outFD, length, shellType, i; + + // Register to catch the signal when the client processs finishes + signal(SIGCHLD, childDone); + + // Get user's password database entry + passwdUser = getpwuid(getuid()); + + // Find the shell to use + if ([Preferences useDefaultShell]) + shellPath = [NSString stringWithCString:passwdUser->pw_shell]; + else + shellPath = [Preferences shellString]; + + dashShellName = [NSString stringWithFormat:@"-%@", + [shellPath lastPathComponent]]; + shellPathStr = [shellPath cString]; + shellNameStr = [[shellPath lastPathComponent] cString]; + + if (access(shellPathStr, X_OK)) { + NSLog(@"Shell %s is not valid!", shellPathStr); + return NO; + } + + // Find the type of shell + for (i = 0; shellList[i].name; i++) { + if (!strcmp(shellNameStr, shellList[i].name)) + break; + } + shellType = shellList[i].type; + + newargv[0] = [dashShellName cString]; + if (shellType == shell_Bourne) { + // Bourne shells need to be told they are interactive to make + // sure they read all their initialization files. + newargv[1] = "-i"; + newargv[2] = NULL; + } else { + newargv[1] = NULL; + } + + // Create a pipe to communicate with the X client process + NSAssert(pipe(fd) == 0, @"Could not create new pipe."); + + // Open a file descriptor for writing to stdout and stderr + outFD = open("/dev/console", O_WRONLY, 0); + if (outFD == -1) { + outFD = open("/dev/null", O_WRONLY, 0); + NSAssert(outFD != -1, @"Could not open shell output."); + } + + // Fork process to start X clients in user's default shell + // Sadly we can't use NSTask because we need to start a login shell. + // Login shells are started by passing "-" as the first character of + // argument 0. NSTask forces argument 0 to be the shell's name. + clientPID = vfork(); + if (clientPID == 0) { + + // Inside the new process: + if (fd[0] != STDIN_FILENO) { + dup2(fd[0], STDIN_FILENO); // Take stdin from pipe + close(fd[0]); + } + close(fd[1]); // Close write end of pipe + if (outFD == STDOUT_FILENO) { // Setup stdout and stderr + dup2(outFD, STDERR_FILENO); + } else if (outFD == STDERR_FILENO) { + dup2(outFD, STDOUT_FILENO); + } else { + dup2(outFD, STDERR_FILENO); + dup2(outFD, STDOUT_FILENO); + close(outFD); + } + + // Setup environment + setenv("HOME", passwdUser->pw_dir, 1); + setenv("SHELL", shellPathStr, 1); + setenv("LOGNAME", passwdUser->pw_name, 1); + setenv("USER", passwdUser->pw_name, 1); + setenv("TERM", "unknown", 1); + if (chdir(passwdUser->pw_dir)) // Change to user's home dir + NSLog(@"Could not change to user's home directory."); + + execv(shellPathStr, (char * const *)newargv); // Start user's shell + + NSLog(@"Could not start X client process with errno = %i.", errno); + _exit(127); + } + + // In parent process: + close(fd[0]); // Close read end of pipe + close(outFD); // Close output file descriptor + + thisBundle = [NSBundle bundleForClass:[self class]]; + startXPath = [thisBundle pathForResource:@"startXClients" ofType:nil]; + if (!startXPath) { + NSLog(@"Could not find startXClients in application bundle!"); + return NO; + } + + // We will run the startXClients script with the path in single quotes + // in case there are problematic characters in the path. We still have + // to worry about there being single quotes in the path. So, replace + // all instances of the ' character in startXPath with '\''. + safeStartXPath = [NSMutableString stringWithString:startXPath]; + aRange = NSMakeRange(0, [safeStartXPath length]); + while (aRange.length) { + aRange = [safeStartXPath rangeOfString:@"'" options:0 range:aRange]; + if (!aRange.length) + break; + [safeStartXPath replaceCharactersInRange:aRange + withString:@"\'\\'\'"]; + aRange.location += 4; + aRange.length = [safeStartXPath length] - aRange.location; + } + + if ([Preferences addToPath]) { + commandStr = [NSString stringWithFormat:@"'%@' :%d %@\n", + safeStartXPath, [Preferences display], + [Preferences addToPathString]]; + } else { + commandStr = [NSString stringWithFormat:@"'%@' :%d\n", + safeStartXPath, [Preferences display]]; + } + + length = [commandStr cStringLength]; + if (write(fd[1], [commandStr cString], length) != length) { + NSLog(@"Write to X client process failed."); + return NO; + } + + // Close the pipe so that shell will terminate when xinit quits + close(fd[1]); + + return YES; +} + +// Run the X server thread +- (void)run +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + [serverLock lock]; + main(argcGlobal, argvGlobal, envpGlobal); + serverVisible = NO; + [pool release]; + [serverLock unlock]; + QuartzMessageMainThread(kQuartzServerDied, nil, 0); +} + +// Full screen mode was picked in the mode pick panel +- (IBAction)startFullScreen:(id)sender +{ + [Preferences setModeWindow:[startupModeButton intValue]]; + [Preferences saveToDisk]; + quartzRootless = FALSE; + [self startX]; +} + +// Rootless mode was picked in the mode pick panel +- (IBAction)startRootless:(id)sender +{ + [Preferences setModeWindow:[startupModeButton intValue]]; + [Preferences saveToDisk]; + quartzRootless = TRUE; + [self startX]; +} + +// Close the help splash screen and show the X server +- (IBAction)closeHelpAndShow:(id)sender +{ + if (sender) { + int helpVal = [startupHelpButton intValue]; + [Preferences setStartupHelp:helpVal]; + [Preferences saveToDisk]; + } + [helpWindow close]; + helpWindow = nil; + + [self forceShowServer:YES]; + [NSApp activateIgnoringOtherApps:YES]; +} + +// Show the X server when sent message from GUI +- (IBAction)showAction:(id)sender +{ + [self forceShowServer:YES]; +} + +// Show or hide the X server or menu bar in rootless mode +- (void)toggle +{ + if (quartzRootless) { +#if 0 + // FIXME: Remove or add option to not dodge menubar + if (rootlessMenuBarVisible) + HideMenuBar(); + else + ShowMenuBar(); + rootlessMenuBarVisible = !rootlessMenuBarVisible; +#endif + } else { + [self showServer:!serverVisible]; + } +} + +// Show or hide the X server on screen +- (void)showServer:(BOOL)show +{ + // Do not show or hide multiple times in a row + if (serverVisible == show) + return; + + if (sendServerEvents) { + [self sendShowHide:show]; + } else if (serverState == server_Starting) { + queueShowServer = show; + } +} + +// Show or hide the X server irregardless of the current state +- (void)forceShowServer:(BOOL)show +{ + serverVisible = !show; + [self showServer:show]; +} + +// Tell the X server to show or hide itself. +// This ignores the current X server visible state. +// +// In full screen mode, the order we do things is important and must be +// preserved between the threads. X drawing operations have to be performed +// in the X server thread. It appears that we have the additional +// constraint that we must hide and show the menu bar in the main thread. +// +// To show the X server: +// 1. Capture the displays. (Main thread) +// 2. Hide the menu bar. (Must be in main thread) +// 3. Send event to X server thread to redraw X screen. +// 4. Redraw the X screen. (Must be in X server thread) +// +// To hide the X server: +// 1. Send event to X server thread to stop drawing. +// 2. Stop drawing to the X screen. (Must be in X server thread) +// 3. Message main thread that drawing is stopped. +// 4. If main thread still wants X server hidden: +// a. Release the displays. (Main thread) +// b. Unhide the menu bar. (Must be in main thread) +// Otherwise we have already queued an event to start drawing again. +// +- (void)sendShowHide:(BOOL)show +{ + xEvent xe; + + [self getMousePosition:&xe fromEvent:nil]; + + if (show) { + if (!quartzRootless) { + QuartzFSCapture(); + HideMenuBar(); + } + xe.u.u.type = kXDarwinShow; + [self sendXEvent:&xe]; + + // the mouse location will have moved; track it + xe.u.u.type = MotionNotify; + [self sendXEvent:&xe]; + + // inform the X server of the current modifier state + xe.u.u.type = kXDarwinUpdateModifiers; + xe.u.clientMessage.u.l.longs0 = [[NSApp currentEvent] modifierFlags]; + [self sendXEvent:&xe]; + + // put the pasteboard into the X cut buffer + [self readPasteboard]; + } else { + // put the X cut buffer on the pasteboard + [self writePasteboard]; + + xe.u.u.type = kXDarwinHide; + [self sendXEvent:&xe]; + } + + serverVisible = show; +} + +// Enable or disable rendering to the X screen +- (void)setRootClip:(BOOL)enable +{ + xEvent xe; + + xe.u.u.type = kXDarwinSetRootClip; + xe.u.clientMessage.u.l.longs0 = enable; + [self sendXEvent:&xe]; +} + +// Tell the X server to read from the pasteboard into the X cut buffer +- (void)readPasteboard +{ + xEvent xe; + + xe.u.u.type = kXDarwinReadPasteboard; + [self sendXEvent:&xe]; +} + +// Tell the X server to write the X cut buffer into the pasteboard +- (void)writePasteboard +{ + xEvent xe; + + xe.u.u.type = kXDarwinWritePasteboard; + [self sendXEvent:&xe]; +} + +- (void)quitServer +{ + xEvent xe; + + xe.u.u.type = kXDarwinQuit; + [self sendXEvent:&xe]; + + // Revert to the Mac OS X arrow cursor. The main thread sets the cursor + // and it won't be responding to future requests to change it. + [[NSCursor arrowCursor] set]; + + serverState = server_Quitting; +} + +- (void)sendXEvent:(xEvent *)xe +{ + // This field should be filled in for every event + xe->u.keyButtonPointer.time = GetTimeInMillis(); + +#if 0 + // FIXME: Really? + if (quartzRootless && + (ev->type == NSLeftMouseDown || ev->type == NSLeftMouseUp || + (ev->type == NSSystemDefined && ev->data.compound.subType == 7))) + { + // mouse button event - send mouseMoved to this position too + // X gets confused if it gets a click that isn't at the last + // reported mouse position. + xEvent moveEvent = *ev; + xe.u.u.type = NSMouseMoved; + [self sendXEvent:&moveEvent]; + } +#endif + + ENQUEUE(xe); +} + +// Handle messages from the X server thread +- (void)handlePortMessage:(NSPortMessage *)portMessage +{ + unsigned msg = [portMessage msgid]; + + switch(msg) { + case kQuartzServerHidden: + // Make sure the X server wasn't queued to be shown again while + // the hide was pending. + if (!quartzRootless && !serverVisible) { + QuartzFSRelease(); + ShowMenuBar(); + } + break; + + case kQuartzServerStarted: + [self finishStartX]; + break; + + case kQuartzServerDied: + sendServerEvents = NO; + serverState = server_Done; + if (!quartzServerQuitting) { + [NSApp terminate:nil]; // quit if we aren't already + } + break; + + case kQuartzCursorUpdate: + QuartzReallySetCursor(); + break; + + case kQuartzPostEvent: + { + const xEvent *xe = [[[portMessage components] lastObject] bytes]; + ENQUEUE(xe); + break; + } + + default: + NSLog(@"Unknown message from server thread."); + } +} + +// Quit the X server when the X client process finishes +- (void)clientProcessDone:(int)clientStatus +{ + if (WIFEXITED(clientStatus)) { + int exitStatus = WEXITSTATUS(clientStatus); + if (exitStatus != 0) + NSLog(@"X client process terminated with status %i.", exitStatus); + } else { + NSLog(@"X client process terminated abnormally."); + } + + if (!quartzServerQuitting) { + [NSApp terminate:nil]; // quit if we aren't already + } +} + +// Called when the user clicks the application icon, +// but not when Cmd-Tab is used. +// Rootless: Don't switch until applicationWillBecomeActive. +- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication + hasVisibleWindows:(BOOL)flag +{ + if ([Preferences dockSwitch] && !quartzRootless) { + [self showServer:YES]; + } + return NO; +} + +- (void)applicationWillResignActive:(NSNotification *)aNotification +{ + [self showServer:NO]; +} + +- (void)applicationWillBecomeActive:(NSNotification *)aNotification +{ + if (quartzRootless) + [self showServer:YES]; +} + +@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, void *data, unsigned length) +{ + if (msg == kQuartzPostEvent) { + NSData *eventData = [NSData dataWithBytes:data length:length]; + NSArray *eventArray = [NSArray arrayWithObject:eventData]; + NSPortMessage *newMessage = + [[NSPortMessage alloc] + initWithSendPort:signalPort + receivePort:returnPort components:eventArray]; + [newMessage setMsgid:msg]; + [newMessage sendBeforeDate:[NSDate distantPast]]; + [newMessage release]; + } else { + [signalMessage setMsgid:msg]; + [signalMessage sendBeforeDate:[NSDate distantPast]]; + } +} + +// Handle SIGCHLD signals +static void childDone(int sig) +{ + int clientStatus; + + if (clientPID == 0) + return; + + // Make sure it was the client task that finished + if (waitpid(clientPID, &clientStatus, WNOHANG) == clientPID) { + if (WIFSTOPPED(clientStatus)) + return; + clientPID = 0; + [oneXServer clientProcessDone:clientStatus]; + } +} + +static void powerDidChange( + void *x, + io_service_t y, + natural_t messageType, + void *messageArgument) +{ + switch (messageType) { + case kIOMessageSystemWillSleep: + if (!quartzRootless) { + [oneXServer setRootClip:FALSE]; + } + IOAllowPowerChange(root_port, (long)messageArgument); + break; + case kIOMessageCanSystemSleep: + IOAllowPowerChange(root_port, (long)messageArgument); + break; + case kIOMessageSystemHasPoweredOn: + if (!quartzRootless) { + [oneXServer setRootClip:TRUE]; + } + break; + } + +} Index: xc/programs/Xserver/hw/darwin/quartz/XView.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XView.h:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XView.h Mon Jul 15 15:58:31 2002 @@ -0,0 +1,42 @@ +/* + * NSView subclass for Mac OS X rootless X server + * + * Copyright (c) 2001 Greg Parker. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/XView.h,v 1.2 2002/07/15 19:58:31 torrey Exp $ */ + +#import <Cocoa/Cocoa.h> + +@interface XView : NSQuickDrawView + +- (BOOL)isFlipped; +- (BOOL)isOpaque; +- (BOOL)acceptsFirstResponder; +- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent; +- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent; + +- (void)mouseDown:(NSEvent *)anEvent; + +@end Index: xc/programs/Xserver/hw/darwin/quartz/XView.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XView.m:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XView.m Mon Jul 15 15:58:31 2002 @@ -0,0 +1,76 @@ +/* + * NSView subclass for Mac OS X rootless X server + * + * Each rootless window contains an instance of this class. + * This class handles events while drawing is handled by Carbon + * code in the rootless Aqua implementation. + * + * Copyright (c) 2001 Greg Parker. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/XView.m,v 1.2 2002/07/15 19:58:31 torrey Exp $ */ + +#import "XView.h" + + +@implementation XView + +- (BOOL)isFlipped +{ + return NO; +} + +- (BOOL)isOpaque +{ + return YES; +} + +- (BOOL)acceptsFirstResponder +{ + return YES; +} + +- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent +{ + return YES; +} + +- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent +{ + return YES; +} + +- (void)mouseDown:(NSEvent *)anEvent +{ + // Only X is allowed to restack windows. + [NSApp preventWindowOrdering]; + if (! [NSApp isActive]) { + [NSApp activateIgnoringOtherApps:YES]; + // FIXME: Interleaving with other apps would be nice, but has issues. + [NSApp arrangeInFront:nil]; + } + [[self nextResponder] mouseDown:anEvent]; +} + +@end Index: xc/programs/Xserver/hw/darwin/quartz/aqua.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/aqua.h:1.3 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/aqua.h Mon Jan 20 00:42:52 2003 @@ -0,0 +1,54 @@ +/* + * Rootless implementation for the Mac OS X Aqua environment + */ +/* + * Copyright (c) 2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/aqua.h,v 1.3 2003/01/20 05:42:52 torrey Exp $ */ + +#ifndef _AQUA_H +#define _AQUA_H + +#include "picturestr.h" + +void AquaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); + +#ifdef RENDER +void +AquaComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, + INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); +#endif /* RENDER */ + + +/* + * AquaAlphaMask + * Bit mask for alpha channel with a particular number of bits per pixel. + * Note that we only care for 32bpp data. Mac OS X uses planar alpha for + * 16bpp. + */ +#define AquaAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0) + +#endif /* _AQUA_H */ Index: xc/programs/Xserver/hw/darwin/quartz/aquaCommon.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/aquaCommon.h:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/aquaCommon.h Wed Aug 28 02:41:26 2002 @@ -0,0 +1,56 @@ +/* + * Common internal definitions and code of the rootless implementation + * for the Mac OS X Aqua environment + */ +/* + * Copyright (c) 2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ + +#ifndef _AQUACOMMON_H +#define _AQUACOMMON_H + +#include "quartzCommon.h" + +#ifdef __OBJC__ +#undef BOOL +#import <Cocoa/Cocoa.h> +#import "XView.h" +#else +typedef struct OpaqueNSWindow NSWindow; +typedef struct OpaqueXView XView; +#endif + + +typedef struct { + NSWindow *window; + XView *view; + GrafPtr port; + CGContextRef context; + GWorldPtr rootGWorld; +} AquaWindowRec; + +#define AQUA_WINREC(rw) ((AquaWindowRec *)rw) + +#endif /* _AQUACOMMON_H */ \ No newline at end of file Index: xc/programs/Xserver/hw/darwin/quartz/aquaPicture.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/aquaPicture.c:1.3 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/aquaPicture.c Fri Sep 27 20:00:03 2002 @@ -0,0 +1,268 @@ +/* + * Support for RENDER extension with rootless Aqua + */ +/* + * Copyright (c) 2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* This file is largely based on fbcompose.c and fbpict.c, which contain + * the following copyright: + * + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + */ + /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/aquaPicture.c,v 1.3 2002/09/28 00:00:03 torrey Exp $ */ + +#ifdef RENDER + +#include "fb.h" +#include "picturestr.h" +#include "mipict.h" +#include "fbpict.h" +#include "aqua.h" + +# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) + + +// Replacement for fbStore_x8r8g8b8 that sets the Aqua alpha channel +void +AquaStore_x8r8g8b8 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + ((CARD32 *)line)[offset >> 5] = (value & 0xffffff) | 0xff000000; +} + + +// Defined in fbcompose.c +extern FbCombineFunc fbCombineFuncU[]; +extern FbCombineFunc fbCombineFuncC[]; + +void +AquaCompositeGeneral( + CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + FbCompositeOperand src[4],msk[4],dst[4],*pmsk; + FbCompositeOperand *srcPict, *srcAlpha; + FbCompositeOperand *dstPict, *dstAlpha; + FbCompositeOperand *mskPict = 0, *mskAlpha = 0; + FbCombineFunc f; + int w; + + if (!fbBuildCompositeOperand (pSrc, src, xSrc, ySrc, TRUE, TRUE)) + return; + if (!fbBuildCompositeOperand (pDst, dst, xDst, yDst, FALSE, TRUE)) + return; + + // Use Aqua operands for on screen picture formats + if (pDst->format == PICT_x8r8g8b8) { + dst[0].store = AquaStore_x8r8g8b8; + } + + if (pSrc->alphaMap) + { + srcPict = &src[1]; + srcAlpha = &src[2]; + } + else + { + srcPict = &src[0]; + srcAlpha = 0; + } + if (pDst->alphaMap) + { + dstPict = &dst[1]; + dstAlpha = &dst[2]; + } + else + { + dstPict = &dst[0]; + dstAlpha = 0; + } + f = fbCombineFuncU[op]; + if (pMask) + { + if (!fbBuildCompositeOperand (pMask, msk, xMask, yMask, TRUE, TRUE)) + return; + pmsk = msk; + if (pMask->componentAlpha) + f = fbCombineFuncC[op]; + if (pMask->alphaMap) + { + mskPict = &msk[1]; + mskAlpha = &msk[2]; + } + else + { + mskPict = &msk[0]; + mskAlpha = 0; + } + } + else + pmsk = 0; + while (height--) + { + w = width; + + while (w--) + { + (*f) (src, pmsk, dst); + (*src->over) (src); + (*dst->over) (dst); + if (pmsk) + (*pmsk->over) (pmsk); + } + (*src->down) (src); + (*dst->down) (dst); + if (pmsk) + (*pmsk->down) (pmsk); + } +} + + +void +AquaComposite( + CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + RegionRec region; + int n; + BoxPtr pbox; + CompositeFunc func; + Bool srcRepeat = pSrc->repeat; + Bool maskRepeat = FALSE; + Bool maskAlphaMap = FALSE; + int x_msk, y_msk, x_src, y_src, x_dst, y_dst; + int w, h, w_this, h_this; + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + if (pMask) + { + xMask += pMask->pDrawable->x; + yMask += pMask->pDrawable->y; + maskRepeat = pMask->repeat; + maskAlphaMap = pMask->alphaMap != 0; + } + + if (!miComputeCompositeRegion (®ion, + pSrc, + pMask, + pDst, + xSrc, + ySrc, + xMask, + yMask, + xDst, + yDst, + width, + height)) + return; + + // To preserve the alpha channel we only use a special, + // non-optimzied compositor. + func = AquaCompositeGeneral; + + n = REGION_NUM_RECTS (®ion); + pbox = REGION_RECTS (®ion); + while (n--) + { + h = pbox->y2 - pbox->y1; + y_src = pbox->y1 - yDst + ySrc; + y_msk = pbox->y1 - yDst + yMask; + y_dst = pbox->y1; + while (h) + { + h_this = h; + w = pbox->x2 - pbox->x1; + x_src = pbox->x1 - xDst + xSrc; + x_msk = pbox->x1 - xDst + xMask; + x_dst = pbox->x1; + if (maskRepeat) + { + y_msk = mod (y_msk, pMask->pDrawable->height); + if (h_this > pMask->pDrawable->height - y_msk) + h_this = pMask->pDrawable->height - y_msk; + } + if (srcRepeat) + { + y_src = mod (y_src, pSrc->pDrawable->height); + if (h_this > pSrc->pDrawable->height - y_src) + h_this = pSrc->pDrawable->height - y_src; + } + while (w) + { + w_this = w; + if (maskRepeat) + { + x_msk = mod (x_msk, pMask->pDrawable->width); + if (w_this > pMask->pDrawable->width - x_msk) + w_this = pMask->pDrawable->width - x_msk; + } + if (srcRepeat) + { + x_src = mod (x_src, pSrc->pDrawable->width); + if (w_this > pSrc->pDrawable->width - x_src) + w_this = pSrc->pDrawable->width - x_src; + } + (*func) (op, pSrc, pMask, pDst, + x_src, y_src, x_msk, y_msk, x_dst, y_dst, + w_this, h_this); + w -= w_this; + x_src += w_this; + x_msk += w_this; + x_dst += w_this; + } + h -= h_this; + y_src += h_this; + y_msk += h_this; + y_dst += h_this; + } + pbox++; + } + REGION_UNINIT (pDst->pDrawable->pScreen, ®ion); +} + +#endif /* RENDER */ Index: xc/programs/Xserver/hw/darwin/quartz/aquaWindow.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/aquaWindow.c:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/aquaWindow.c Thu Jan 30 19:01:45 2003 @@ -0,0 +1,173 @@ +/* + * Specialized window functions for rootless Aqua + */ +/* + * Copyright (c) 2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* Portions of this file are based on fbwindow.c, which contains the + * following copyright: + * + * Copyright © 1998 Keith Packard + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/aquaWindow.c,v 1.2 2003/01/31 00:01:45 torrey Exp $ */ + +#include "fb.h" +#include "aqua.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +/* + * AquaFillRegionTiled + * Fill using a tile while leaving the alpha channel untouched. + * Based on fbfillRegionTiled. + */ +void +AquaFillRegionTiled( + DrawablePtr pDrawable, + RegionPtr pRegion, + PixmapPtr pTile) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbBits *tile; + FbStride tileStride; + int tileBpp; + int tileXoff, tileYoff; /* XXX assumed to be zero */ + int tileWidth, tileHeight; + int n = REGION_NUM_RECTS(pRegion); + BoxPtr pbox = REGION_RECTS(pRegion); + int xRot = pDrawable->x; + int yRot = pDrawable->y; + FbBits planeMask; + +#ifdef PANORAMIX + if(!noPanoramiXExtension) + { + int index = pDrawable->pScreen->myNum; + if(&WindowTable[index]->drawable == pDrawable) + { + xRot -= panoramiXdataPtr[index].x; + yRot -= panoramiXdataPtr[index].y; + } + } +#endif + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, + tileXoff, tileYoff); + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + xRot += dstXoff; + yRot += dstYoff; + planeMask = FB_ALLONES & ~AquaAlphaMask(dstBpp); + + while (n--) + { + fbTile (dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + (pbox->x2 - pbox->x1) * dstBpp, + pbox->y2 - pbox->y1, + tile, + tileStride, + tileWidth * dstBpp, + tileHeight, + GXcopy, + planeMask, + dstBpp, + xRot * dstBpp, + yRot - pbox->y1); + pbox++; + } +} + + +/* + * AquaPaintWindow + * Paint the window while filling in the alpha channel with all on. + * We can't use fbPaintWindow because it zeros the alpha channel. + */ +void +AquaPaintWindow( + WindowPtr pWin, + RegionPtr pRegion, + int what) +{ + switch (what) { + case PW_BACKGROUND: + + switch (pWin->backgroundState) { + case None: + break; + case ParentRelative: + do { + pWin = pWin->parent; + } while (pWin->backgroundState == ParentRelative); + (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, + what); + break; + case BackgroundPixmap: + AquaFillRegionTiled (&pWin->drawable, + pRegion, + pWin->background.pixmap); + break; + case BackgroundPixel: + { + Pixel pixel = pWin->background.pixel | + AquaAlphaMask(pWin->drawable.bitsPerPixel); + fbFillRegionSolid (&pWin->drawable, pRegion, 0, + fbReplicatePixel (pixel, + pWin->drawable.bitsPerPixel)); + break; + } + } + break; + case PW_BORDER: + if (pWin->borderIsPixel) + { + Pixel pixel = pWin->border.pixel | + AquaAlphaMask(pWin->drawable.bitsPerPixel); + fbFillRegionSolid (&pWin->drawable, pRegion, 0, + fbReplicatePixel (pixel, + pWin->drawable.bitsPerPixel)); + } + else + { + WindowPtr pBgWin; + for (pBgWin = pWin; pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + + AquaFillRegionTiled (&pBgWin->drawable, + pRegion, + pWin->border.pixmap); + } + break; + } + fbValidateDrawable (&pWin->drawable); +} Index: xc/programs/Xserver/hw/darwin/quartz/fakeBoxRec.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/fakeBoxRec.h:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/fakeBoxRec.h Wed Mar 27 21:21:18 2002 @@ -0,0 +1,15 @@ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/fakeBoxRec.h,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +#ifndef FAKEBOXREC_H +#define FAKEBOXREC_H + +// This struct is byte-compatible with X11's BoxRec, for use in +// code that can't include X headers. +typedef struct _fakeBox { + short x1; + short y1; + short x2; + short y2; +} fakeBoxRec; + +#endif Index: xc/programs/Xserver/hw/darwin/quartz/fullscreen.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/fullscreen.c:1.3 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/fullscreen.c Mon Dec 9 19:00:39 2002 @@ -0,0 +1,500 @@ +/* + * Screen routines for full screen Quartz mode + * + * Copyright (c) 2002 Torrey T. Lyons. 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 + * TORREY T. LYONS 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 Torrey T. Lyons shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in this Software without prior written authorization from + * Torrey T. Lyons. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/fullscreen.c,v 1.3 2002/12/10 00:00:39 torrey Exp $ */ + +#include "quartzCommon.h" +#include "darwin.h" +#include "colormapst.h" +#include "scrnintstr.h" +#include "micmap.h" +#include "shadow.h" + +// Full screen specific per screen storage structure +typedef struct { + CGDirectDisplayID displayID; + CFDictionaryRef xDisplayMode; + CFDictionaryRef aquaDisplayMode; + CGDirectPaletteRef xPalette; + CGDirectPaletteRef aquaPalette; + unsigned char *framebuffer; + unsigned char *shadowPtr; +} QuartzFSScreenRec, *QuartzFSScreenPtr; + +#define FULLSCREEN_PRIV(pScreen) \ + ((QuartzFSScreenPtr)pScreen->devPrivates[quartzFSScreenIndex].ptr) + +static int quartzFSScreenIndex; +static CGDirectDisplayID *quartzDisplayList = NULL; +static int quartzNumScreens = 0; +static QuartzFSScreenPtr quartzScreens[MAXSCREENS]; + +static int darwinCmapPrivateIndex = -1; +static unsigned long darwinCmapGeneration = 0; + +#define CMAP_PRIV(pCmap) \ + ((CGDirectPaletteRef) (pCmap)->devPrivates[darwinCmapPrivateIndex].ptr) + +/* + ============================================================================= + + Colormap handling + + ============================================================================= +*/ + +/* + * QuartzFSInitCmapPrivates + * Colormap privates may be allocated after the default colormap has + * already been created for some screens. This initialization procedure + * is called for each default colormap that is found. + */ +static Bool +QuartzFSInitCmapPrivates( + ColormapPtr pCmap) +{ + return TRUE; +} + + +/* + * QuartzFSCreateColormap + * This is a callback from X after a new colormap is created. + * We allocate a new CoreGraphics pallete for each colormap. + */ +Bool +QuartzFSCreateColormap( + ColormapPtr pCmap) +{ + CGDirectPaletteRef pallete; + + // Allocate private storage for the hardware dependent colormap info. + if (darwinCmapGeneration != serverGeneration) { + if ((darwinCmapPrivateIndex = + AllocateColormapPrivateIndex(QuartzFSInitCmapPrivates)) < 0) + { + return FALSE; + } + darwinCmapGeneration = serverGeneration; + } + + pallete = CGPaletteCreateDefaultColorPalette(); + if (!pallete) return FALSE; + + CMAP_PRIV(pCmap) = pallete; + return TRUE; +} + + +/* + * QuartzFSDestroyColormap + * This is called by DIX FreeColormap after it has uninstalled a colormap + * and notified all interested parties. We deallocated the corresponding + * CoreGraphics pallete. + */ +void +QuartzFSDestroyColormap( + ColormapPtr pCmap) +{ + CGPaletteRelease( CMAP_PRIV(pCmap) ); +} + + +/* + * QuartzFSInstallColormap + * Set the current CoreGraphics pallete to the pallete corresponding + * to the provided colormap. + */ +void +QuartzFSInstallColormap( + ColormapPtr pCmap) +{ + CGDirectPaletteRef palette = CMAP_PRIV(pCmap); + ScreenPtr pScreen = pCmap->pScreen; + QuartzFSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + + // Inform all interested parties that the map is being changed. + miInstallColormap(pCmap); + + if (quartzServerVisible) + CGDisplaySetPalette(fsDisplayInfo->displayID, palette); + + fsDisplayInfo->xPalette = palette; +} + + +/* + * QuartzFSStoreColors + * This is a callback from X to change the hardware colormap + * when using PsuedoColor in full screen mode. + */ +static void +QuartzFSStoreColors( + ColormapPtr pCmap, + int numEntries, + xColorItem *pdefs) +{ + CGDirectPaletteRef palette = CMAP_PRIV(pCmap); + ScreenPtr pScreen = pCmap->pScreen; + QuartzFSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + CGDeviceColor color; + int i; + + if (! palette) + return; + + for (i = 0; i < numEntries; i++) { + color.red = pdefs[i].red / 65535.0; + color.green = pdefs[i].green / 65535.0; + color.blue = pdefs[i].blue / 65535.0; + CGPaletteSetColorAtIndex(palette, color, pdefs[i].pixel); + } + + // Update hardware colormap + if (quartzServerVisible) + CGDisplaySetPalette(fsDisplayInfo->displayID, palette); +} + + +/* + ============================================================================= + + Screen initialization + + ============================================================================= +*/ + +/* + * QuartzFSDisplayInit + * Full screen specific initialization called from InitOutput. + */ +void QuartzFSDisplayInit(void) +{ + static unsigned long generation = 0; + CGDisplayCount quartzDisplayCount = 0; + + // Allocate private storage for each screen's mode specific info + if (generation != serverGeneration) { + quartzFSScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + + // Find all the CoreGraphics displays + CGGetActiveDisplayList(0, NULL, &quartzDisplayCount); + quartzDisplayList = xalloc(quartzDisplayCount * sizeof(CGDirectDisplayID)); + CGGetActiveDisplayList(quartzDisplayCount, quartzDisplayList, + &quartzDisplayCount); + + darwinScreensFound = quartzDisplayCount; + atexit(QuartzFSRelease); +} + + +/* + * QuartzFSFindDisplayMode + * Find the appropriate display mode to use in full screen mode. + * If display mode is not the same as the current Aqua mode, switch + * to the new mode. + */ +static Bool QuartzFSFindDisplayMode( + QuartzFSScreenPtr fsDisplayInfo) +{ + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + size_t height, width, bpp; + boolean_t exactMatch; + + fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID); + + // If no user options, use current display mode + if (darwinDesiredWidth == 0 && darwinDesiredDepth == -1 && + darwinDesiredRefresh == -1) + { + fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode; + return TRUE; + } + + // If the user has no choice for size, use current + if (darwinDesiredWidth == 0) { + width = CGDisplayPixelsWide(cgID); + height = CGDisplayPixelsHigh(cgID); + } else { + width = darwinDesiredWidth; + height = darwinDesiredHeight; + } + + switch (darwinDesiredDepth) { + case 0: + bpp = 8; + break; + case 1: + bpp = 16; + break; + case 2: + bpp = 32; + break; + default: + bpp = CGDisplayBitsPerPixel(cgID); + } + + if (darwinDesiredRefresh == -1) { + fsDisplayInfo->xDisplayMode = + CGDisplayBestModeForParameters(cgID, bpp, width, height, + &exactMatch); + } else { + fsDisplayInfo->xDisplayMode = + CGDisplayBestModeForParametersAndRefreshRate(cgID, bpp, + width, height, darwinDesiredRefresh, &exactMatch); + } + if (!exactMatch) { + fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode; + return FALSE; + } + + // Switch to the new display mode + CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode); + return TRUE; +} + + +/* + * QuartzFSAddScreen + * Do initialization of each screen for Quartz in full screen mode. + */ +Bool QuartzFSAddScreen( + int index, + ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen); + CGDirectDisplayID cgID = quartzDisplayList[index]; + CGRect bounds; + QuartzFSScreenPtr fsDisplayInfo; + + // Allocate space for private per screen fullscreen specific storage. + fsDisplayInfo = xalloc(sizeof(QuartzFSScreenRec)); + FULLSCREEN_PRIV(pScreen) = fsDisplayInfo; + + displayInfo->displayCount = 1; + displayInfo->displayIDs = xrealloc(displayInfo->displayIDs, + 1 * sizeof(CGDirectDisplayID)); + displayInfo->displayIDs[0] = cgID; + + fsDisplayInfo->displayID = cgID; + fsDisplayInfo->xDisplayMode = 0; + fsDisplayInfo->aquaDisplayMode = 0; + fsDisplayInfo->xPalette = 0; + fsDisplayInfo->aquaPalette = 0; + + // Capture full screen because X doesn't like read-only framebuffer. + // We need to do this before we (potentially) switch the display mode. + CGDisplayCapture(cgID); + + if (! QuartzFSFindDisplayMode(fsDisplayInfo)) { + ErrorF("Could not support specified display mode on screen %i.\n", + index); + xfree(fsDisplayInfo); + return FALSE; + } + + // Don't need to flip y-coordinate as CoreGraphics treats (0, 0) + // as the top left of main screen. + bounds = CGDisplayBounds(cgID); + dfb->x = bounds.origin.x; + dfb->y = bounds.origin.y; + dfb->width = bounds.size.width; + dfb->height = bounds.size.height; + dfb->pitch = CGDisplayBytesPerRow(cgID); + dfb->bitsPerPixel = CGDisplayBitsPerPixel(cgID); + + if (dfb->bitsPerPixel == 8) { + if (CGDisplayCanSetPalette(cgID)) { + dfb->colorType = PseudoColor; + } else { + dfb->colorType = StaticColor; + } + dfb->bitsPerComponent = 8; + dfb->colorBitsPerPixel = 8; + } else { + dfb->colorType = TrueColor; + dfb->bitsPerComponent = CGDisplayBitsPerSample(cgID); + dfb->colorBitsPerPixel = CGDisplaySamplesPerPixel(cgID) * + dfb->bitsPerComponent; + } + + fsDisplayInfo->framebuffer = CGDisplayBaseAddress(cgID); + + // allocate shadow framebuffer + fsDisplayInfo->shadowPtr = shadowAlloc(dfb->width, dfb->height, + dfb->bitsPerPixel); + dfb->framebuffer = fsDisplayInfo->shadowPtr; + + return TRUE; +} + + +/* + * QuartzFSShadowUpdate + * Update the damaged regions of the shadow framebuffer on the display. + */ +static void QuartzFSShadowUpdate(ScreenPtr pScreen, + shadowBufPtr pBuf) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzFSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + RegionPtr damage = &pBuf->damage; + int numBox = REGION_NUM_RECTS(damage); + BoxPtr pBox = REGION_RECTS(damage); + int pitch = dfb->pitch; + int bpp = dfb->bitsPerPixel/8; + + // Don't update if the X server is not visible + if (!quartzServerVisible) + return; + + // Loop through all the damaged boxes + while (numBox--) { + int width, height, offset; + unsigned char *src, *dst; + + width = (pBox->x2 - pBox->x1) * bpp; + height = pBox->y2 - pBox->y1; + offset = (pBox->y1 * pitch) + (pBox->x1 * bpp); + src = fsDisplayInfo->shadowPtr + offset; + dst = fsDisplayInfo->framebuffer + offset; + + while (height--) { + memcpy(dst, src, width); + dst += pitch; + src += pitch; + } + + // Get the next box + pBox++; + } +} + + +/* + * QuartzFSSetupScreen + * Finalize full screen specific setup of each screen. + */ +Bool QuartzFSSetupScreen( + int index, + ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzFSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + + // Initialize shadow framebuffer support + if (! shadowInit(pScreen, QuartzFSShadowUpdate, NULL)) { + ErrorF("Failed to initalize shadow framebuffer for screen %i.\n", + index); + return FALSE; + } + + if (dfb->colorType == PseudoColor) { + // Initialize colormap handling + size_t aquaBpp; + + // If Aqua is using 8 bits we need to keep track of its pallete. + CFNumberGetValue(CFDictionaryGetValue(fsDisplayInfo->aquaDisplayMode, + kCGDisplayBitsPerPixel), kCFNumberLongType, &aquaBpp); + if (aquaBpp <= 8) + fsDisplayInfo->aquaPalette = CGPaletteCreateWithDisplay(cgID); + + pScreen->CreateColormap = QuartzFSCreateColormap; + pScreen->DestroyColormap = QuartzFSDestroyColormap; + pScreen->InstallColormap = QuartzFSInstallColormap; + pScreen->StoreColors = QuartzFSStoreColors; + + } + + quartzScreens[quartzNumScreens++] = fsDisplayInfo; + return TRUE; +} + + +/* + ============================================================================= + + Switching between Aqua and X + + ============================================================================= +*/ + +/* + * QuartzFSCapture + * Capture the screen so we can draw. Called directly from the main thread + * to synchronize with hiding the menubar. + */ +void QuartzFSCapture(void) +{ + int i; + + if (quartzRootless) return; + + for (i = 0; i < quartzNumScreens; i++) { + QuartzFSScreenPtr fsDisplayInfo = quartzScreens[i]; + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + + if (!CGDisplayIsCaptured(cgID)) { + CGDisplayCapture(cgID); + fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID); + if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode) + CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode); + if (fsDisplayInfo->xPalette) + CGDisplaySetPalette(cgID, fsDisplayInfo->xPalette); + } + } +} + + +/* + * QuartzFSRelease + * Release the screen so others can draw. + */ +void QuartzFSRelease(void) +{ + int i; + + if (quartzRootless) return; + + for (i = 0; i < quartzNumScreens; i++) { + QuartzFSScreenPtr fsDisplayInfo = quartzScreens[i]; + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + + if (CGDisplayIsCaptured(cgID)) { + if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode) + CGDisplaySwitchToMode(cgID, fsDisplayInfo->aquaDisplayMode); + if (fsDisplayInfo->aquaPalette) + CGDisplaySetPalette(cgID, fsDisplayInfo->aquaPalette); + CGDisplayRelease(cgID); + } + } +} Index: xc/programs/Xserver/hw/darwin/quartz/fullscreen.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/fullscreen.h:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/fullscreen.h Wed Mar 27 21:21:18 2002 @@ -0,0 +1,33 @@ +/* + * External interface for full screen Quartz mode + * + * Copyright (c) 2002 Torrey T. Lyons. 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 + * TORREY T. LYONS 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 Torrey T. Lyons shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in this Software without prior written authorization from + * Torrey T. Lyons. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/fullscreen.h,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +void QuartzFSDisplayInit(void); +Bool QuartzFSAddScreen(int index, ScreenPtr pScreen); +Bool QuartzFSSetupScreen(int index, ScreenPtr pScreen); Index: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.c:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.c Wed Oct 16 17:13:33 2002 @@ -0,0 +1,420 @@ +/* + * Minimal implementation of PanoramiX/Xinerama + * + * This is used in rootless mode where the underlying window server + * already provides an abstracted view of multiple screens as one + * large screen area. + * + * This code is largely based on panoramiX.c, which contains the + * following copyright notice: + */ +/***************************************************************** +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/hw/darwin/quartz/pseudoramiX.c,v 1.2 2002/10/16 21:13:33 dawes Exp $ */ + +#include "pseudoramiX.h" + +#include "extnsionst.h" +#include "dixstruct.h" +#include "window.h" +#include "panoramiXproto.h" +#include "globals.h" + +extern int ProcPanoramiXQueryVersion (ClientPtr client); + +static void PseudoramiXResetProc(ExtensionEntry *extEntry); + +static int ProcPseudoramiXQueryVersion(ClientPtr client); +static int ProcPseudoramiXGetState(ClientPtr client); +static int ProcPseudoramiXGetScreenCount(ClientPtr client); +static int ProcPseudoramiXGetScreenSize(ClientPtr client); +static int ProcPseudoramiXIsActive(ClientPtr client); +static int ProcPseudoramiXQueryScreens(ClientPtr client); +static int ProcPseudoramiXDispatch(ClientPtr client); + +static int SProcPseudoramiXQueryVersion(ClientPtr client); +static int SProcPseudoramiXGetState(ClientPtr client); +static int SProcPseudoramiXGetScreenCount(ClientPtr client); +static int SProcPseudoramiXGetScreenSize(ClientPtr client); +static int SProcPseudoramiXIsActive(ClientPtr client); +static int SProcPseudoramiXQueryScreens(ClientPtr client); +static int SProcPseudoramiXDispatch(ClientPtr client); + + +typedef struct { + int x; + int y; + int w; + int h; +} PseudoramiXScreenRec; + +static PseudoramiXScreenRec *pseudoramiXScreens = NULL; +static int pseudoramiXScreensAllocated = 0; +static int pseudoramiXNumScreens = 0; +static unsigned long pseudoramiXGeneration = 0; + + +// Add a PseudoramiX screen. +// The rest of the X server will know nothing about this screen. +// Can be called before or after extension init. +// Screens must be re-added once per generation. +void +PseudoramiXAddScreen(int x, int y, int w, int h) +{ + PseudoramiXScreenRec *s; + + if (noPseudoramiXExtension) return; + + if (pseudoramiXNumScreens == pseudoramiXScreensAllocated) { + pseudoramiXScreensAllocated += pseudoramiXScreensAllocated + 1; + pseudoramiXScreens = xrealloc(pseudoramiXScreens, + pseudoramiXScreensAllocated * + sizeof(PseudoramiXScreenRec)); + } + + s = &pseudoramiXScreens[pseudoramiXNumScreens++]; + s->x = x; + s->y = y; + s->w = w; + s->h = h; +} + + +// Initialize PseudoramiX. +// Copied from PanoramiXExtensionInit +void PseudoramiXExtensionInit(int argc, char *argv[]) +{ + Bool success = FALSE; + ExtensionEntry *extEntry; + + if (noPseudoramiXExtension) return; + + if (pseudoramiXNumScreens == 1 || aquaNumScreens == 1) { + // Only one screen - disable Xinerama extension. + noPseudoramiXExtension = TRUE; + return; + } + + // The server must not run the PanoramiX operations. + noPanoramiXExtension = TRUE; + + if (pseudoramiXGeneration != serverGeneration) { + extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, + ProcPseudoramiXDispatch, + SProcPseudoramiXDispatch, + PseudoramiXResetProc, + StandardMinorOpcode); + if (!extEntry) { + ErrorF("PseudoramiXExtensionInit(): AddExtension failed\n"); + } else { + pseudoramiXGeneration = serverGeneration; + success = TRUE; + } + } + + if (!success) { + ErrorF("%s Extension (PseudoramiX) failed to initialize\n", + PANORAMIX_PROTOCOL_NAME); + return; + } +} + + +static void PseudoramiXResetProc(ExtensionEntry *extEntry) +{ + pseudoramiXNumScreens = 0; +} + + +// was PanoramiX +static int ProcPseudoramiXQueryVersion(ClientPtr client) +{ + return ProcPanoramiXQueryVersion(client); +} + + +// was PanoramiX +static int ProcPseudoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + WindowPtr pWin; + xPanoramiXGetStateReply rep; + register int n; + + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + pWin = LookupWindow (stuff->window, client); + if (!pWin) + return BadWindow; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !noPseudoramiXExtension; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.state, n); + } + WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + WindowPtr pWin; + xPanoramiXGetScreenCountReply rep; + register int n; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + pWin = LookupWindow (stuff->window, client); + if (!pWin) + return BadWindow; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.ScreenCount = pseudoramiXNumScreens; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.ScreenCount, n); + } + WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + WindowPtr pWin; + xPanoramiXGetScreenSizeReply rep; + register int n; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + pWin = LookupWindow (stuff->window, client); + if (!pWin) + return BadWindow; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + /* screen dimensions */ + rep.width = pseudoramiXScreens[stuff->screen].w; + // was panoramiXdataPtr[stuff->screen].width; + rep.height = pseudoramiXScreens[stuff->screen].h; + // was panoramiXdataPtr[stuff->screen].height; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.width, n); + swaps (&rep.height, n); + } + WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); + return client->noClientException; +} + + +// was Xinerama +static int ProcPseudoramiXIsActive(ClientPtr client) +{ + /* REQUEST(xXineramaIsActiveReq); */ + xXineramaIsActiveReply rep; + + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !noPseudoramiXExtension; + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.state, n); + } + WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); + return client->noClientException; +} + + +// was Xinerama +static int ProcPseudoramiXQueryScreens(ClientPtr client) +{ + /* REQUEST(xXineramaQueryScreensReq); */ + xXineramaQueryScreensReply rep; + + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens; + rep.length = rep.number * sz_XineramaScreenInfo >> 2; + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.number, n); + } + WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep); + + if (!noPseudoramiXExtension) { + xXineramaScreenInfo scratch; + int i; + + for(i = 0; i < pseudoramiXNumScreens; i++) { + scratch.x_org = pseudoramiXScreens[i].x; + scratch.y_org = pseudoramiXScreens[i].y; + scratch.width = pseudoramiXScreens[i].w; + scratch.height = pseudoramiXScreens[i].h; + + if(client->swapped) { + register int n; + swaps (&scratch.x_org, n); + swaps (&scratch.y_org, n); + swaps (&scratch.width, n); + swaps (&scratch.height, n); + } + WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch); + } + } + + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return ProcPseudoramiXQueryVersion(client); + case X_PanoramiXGetState: + return ProcPseudoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return ProcPseudoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return ProcPseudoramiXGetScreenSize(client); + case X_XineramaIsActive: + return ProcPseudoramiXIsActive(client); + case X_XineramaQueryScreens: + return ProcPseudoramiXQueryScreens(client); + } + return BadRequest; +} + + + +static int +SProcPseudoramiXQueryVersion (ClientPtr client) +{ + REQUEST(xPanoramiXQueryVersionReq); + register int n; + + swaps(&stuff->length,n); + REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); + return ProcPseudoramiXQueryVersion(client); +} + +static int +SProcPseudoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + return ProcPseudoramiXGetState(client); +} + +static int +SProcPseudoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + return ProcPseudoramiXGetScreenCount(client); +} + +static int +SProcPseudoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + return ProcPseudoramiXGetScreenSize(client); +} + + +static int +SProcPseudoramiXIsActive(ClientPtr client) +{ + REQUEST(xXineramaIsActiveReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + return ProcPseudoramiXIsActive(client); +} + + +static int +SProcPseudoramiXQueryScreens(ClientPtr client) +{ + REQUEST(xXineramaQueryScreensReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + return ProcPseudoramiXQueryScreens(client); +} + + +static int +SProcPseudoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return SProcPseudoramiXQueryVersion(client); + case X_PanoramiXGetState: + return SProcPseudoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return SProcPseudoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return SProcPseudoramiXGetScreenSize(client); + case X_XineramaIsActive: + return SProcPseudoramiXIsActive(client); + case X_XineramaQueryScreens: + return SProcPseudoramiXQueryScreens(client); + } + return BadRequest; +} Index: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h Wed Mar 27 21:21:18 2002 @@ -0,0 +1,10 @@ +/* + * Minimal implementation of PanoramiX/Xinerama + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +extern int noPseudoramiXExtension; +extern int aquaNumScreens; + +void PseudoramiXAddScreen(int x, int y, int w, int h); +void PseudoramiXExtensionInit(int argc, char *argv[]); Index: xc/programs/Xserver/hw/darwin/quartz/quartz.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartz.c:1.7 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartz.c Wed Jan 22 19:34:26 2003 @@ -0,0 +1,305 @@ +/************************************************************** + * + * Quartz-specific support for the Darwin X Server + * + **************************************************************/ +/* + * Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons. + * 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartz.c,v 1.7 2003/01/23 00:34:26 torrey Exp $ */ + +#include "quartzCommon.h" +#include "quartz.h" +#include "darwin.h" +#include "quartzAudio.h" +#include "quartzCursor.h" +#include "fullscreen.h" +#include "rootlessAqua.h" +#include "pseudoramiX.h" + +// X headers +#include "scrnintstr.h" +#include "colormapst.h" + +// System headers +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <IOKit/pwr_mgt/IOPMLib.h> + +// Shared global variables for Quartz modes +int quartzEventWriteFD = -1; +int quartzStartClients = 1; +int quartzRootless = -1; +int quartzUseSysBeep = 0; +int quartzUseAGL = 1; +int quartzServerVisible = TRUE; +int quartzServerQuitting = FALSE; +int quartzScreenIndex = 0; +int aquaMenuBarHeight = 0; +int noPseudoramiXExtension = TRUE; +int aquaNumScreens = 0; + + +/* +=========================================================================== + + Screen functions + +=========================================================================== +*/ + +/* + * QuartzAddScreen + * Do mode dependent initialization of each screen for Quartz. + */ +Bool QuartzAddScreen( + int index, + ScreenPtr pScreen) +{ + // allocate space for private per screen Quartz specific storage + QuartzScreenPtr displayInfo = xcalloc(sizeof(QuartzScreenRec), 1); + QUARTZ_PRIV(pScreen) = displayInfo; + + // do full screen or rootless specific initialization + if (quartzRootless) { + return AquaAddScreen(index, pScreen); + } else { + return QuartzFSAddScreen(index, pScreen); + } +} + + +/* + * QuartzSetupScreen + * Finalize mode specific setup of each screen. + */ +Bool QuartzSetupScreen( + int index, + ScreenPtr pScreen) +{ + // do full screen or rootless specific setup + if (quartzRootless) { + if (! AquaSetupScreen(index, pScreen)) + return FALSE; + } else { + if (! QuartzFSSetupScreen(index, pScreen)) + return FALSE; + } + + // setup cursor support + if (! QuartzInitCursor(pScreen)) + return FALSE; + + return TRUE; +} + + +/* + * QuartzInitOutput + * Quartz display initialization. + */ +void QuartzInitOutput( + int argc, + char **argv ) +{ + static unsigned long generation = 0; + + // Allocate private storage for each screen's Quartz specific info + if (generation != serverGeneration) { + quartzScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + + if (serverGeneration == 0) { + QuartzAudioInit(); + } + + if (!RegisterBlockAndWakeupHandlers(QuartzBlockHandler, + QuartzWakeupHandler, + NULL)) + { + FatalError("Could not register block and wakeup handlers."); + } + + if (quartzRootless) { + ErrorF("Display mode: Rootless Quartz\n"); + AquaDisplayInit(); + } else { + ErrorF("Display mode: Full screen Quartz\n"); + QuartzFSDisplayInit(); + } + + // Init PseudoramiX implementation of Xinerama. + // This should be in InitExtensions, but that causes link errors + // for servers that don't link in pseudoramiX.c. + if (!noPseudoramiXExtension) { + PseudoramiXExtensionInit(argc, argv); + } +} + + +/* + * QuartzInitInput + * Inform the main thread the X server is ready to handle events. + */ +void QuartzInitInput( + int argc, + char **argv ) +{ + QuartzMessageMainThread(kQuartzServerStarted, NULL, 0); +} + + +/* + * QuartzShow + * Show the X server on screen. Does nothing if already shown. + * Restore the X clip regions and the X server cursor state. + */ +static void QuartzShow( + int x, // cursor location + int y ) +{ + int i; + + if (!quartzServerVisible) { + quartzServerVisible = TRUE; + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + QuartzResumeXCursor(screenInfo.screens[i], x, y); + if (!quartzRootless) + xf86SetRootClip(screenInfo.screens[i], TRUE); + } + } + } +} + + +/* + * QuartzHide + * Remove the X server display from the screen. Does nothing if already + * hidden. Set X clip regions to prevent drawing, and restore the Aqua + * cursor. + */ +static void QuartzHide(void) +{ + int i; + + if (quartzServerVisible) { + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + QuartzSuspendXCursor(screenInfo.screens[i]); + if (!quartzRootless) + xf86SetRootClip(screenInfo.screens[i], FALSE); + } + } + } + quartzServerVisible = FALSE; + QuartzMessageMainThread(kQuartzServerHidden, NULL, 0); +} + + +/* + * QuartzSetRootClip + * Enable or disable rendering to the X screen. + */ +static void QuartzSetRootClip( + BOOL enable) +{ + int i; + + if (!quartzServerVisible) + return; + + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + xf86SetRootClip(screenInfo.screens[i], enable); + } + } +} + + +/* + * QuartzProcessEvent + * Process Quartz specific events. + */ +void QuartzProcessEvent( + xEvent *xe) +{ + switch (xe->u.u.type) { + + case kXDarwinShow: + QuartzShow(xe->u.keyButtonPointer.rootX, + xe->u.keyButtonPointer.rootY); + break; + + case kXDarwinHide: + QuartzHide(); + break; + + case kXDarwinSetRootClip: + QuartzSetRootClip((BOOL)xe->u.clientMessage.u.l.longs0); + break; + + case kXDarwinQuit: + GiveUp(0); + break; + + case kXDarwinReadPasteboard: + QuartzReadPasteboard(); + break; + + case kXDarwinWritePasteboard: + QuartzWritePasteboard(); + break; + + default: + ErrorF("Unknown application defined event.\n"); + } +} + + +/* + * QuartzGiveUp + * Cleanup before X server shutdown + * Release the screen and restore the Aqua cursor. + */ +void QuartzGiveUp(void) +{ +#if 0 +// Trying to switch cursors when quitting causes deadlock + int i; + + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + QuartzSuspendXCursor(screenInfo.screens[i]); + } + } +#endif + + if (!quartzRootless) + QuartzFSRelease(); +} Index: xc/programs/Xserver/hw/darwin/quartz/quartz.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartz.h:1.4 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartz.h Wed Nov 20 18:51:58 2002 @@ -0,0 +1,50 @@ +/* + * quartz.h + * + * External interface of the Quartz modes seen by the generic, mode + * independent parts of the Darwin X server. + */ +/* + * Copyright (c) 2001-2002 Greg Parker and Torrey T. Lyons. + * 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartz.h,v 1.4 2002/11/20 23:51:58 torrey Exp $ */ + +#ifndef _QUARTZ_H +#define _QUARTZ_H + +#include "screenint.h" +#include "Xproto.h" +#include "quartzPasteboard.h" + +int QuartzProcessArgument(int argc, char *argv[], int i); +void QuartzInitOutput(int argc, char **argv); +void QuartzInitInput(int argc, char **argv); +Bool QuartzAddScreen(int index, ScreenPtr pScreen); +Bool QuartzSetupScreen(int index, ScreenPtr pScreen); +void QuartzGiveUp(void); +void QuartzProcessEvent(xEvent *xe); + +#endif Index: xc/programs/Xserver/hw/darwin/quartz/quartzAudio.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzAudio.c:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzAudio.c Wed Mar 27 21:21:18 2002 @@ -0,0 +1,342 @@ +// +// 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 +// +/* + * Copyright (c) 2001 Greg Parker. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzAudio.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +#include "quartzCommon.h" +#include "quartzAudio.h" + +#include <CoreAudio/CoreAudio.h> +#include <pthread.h> + +#include "inputstr.h" +#include "extensions/XI.h" + +void NSBeep(); + +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<framesPerBuffer + + // Prepare for playback + status = AudioDeviceAddIOProc(outputDevice, QuartzAudioIOProc, &data); + if (status) { + ErrorF("QuartzAudioInit: AddIOProc returned %d\n", status); + return; + } + + // success! + quartzAudioDevice = outputDevice; +} Index: xc/programs/Xserver/hw/darwin/quartz/quartzAudio.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzAudio.h:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzAudio.h Wed Mar 27 21:21:19 2002 @@ -0,0 +1,41 @@ +// +// QuartzAudio.h +// +// X Window bell support using CoreAudio or AppKit. +// Greg Parker gparker@cs.stanford.edu 19 Feb 2001 +/* + * Copyright (c) 2001 Greg Parker. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzAudio.h,v 1.1 2002/03/28 02:21:19 torrey Exp $ */ + +#ifndef _QUARTZAUDIO_H +#define _QUARTZAUDIO_H + +#include "input.h" + +void QuartzAudioInit(void); +void QuartzBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); + +#endif Index: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m:1.3 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m Sun Jan 19 01:52:54 2003 @@ -0,0 +1,198 @@ +/************************************************************** + * + * Quartz-specific support for the Darwin X Server + * that requires Cocoa and Objective-C. + * + * This file is separate from the parts of Quartz support + * that use X include files to avoid symbol collisions. + * + **************************************************************/ +/* + * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker. + * 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzCocoa.m,v 1.3 2003/01/19 06:52:54 torrey Exp $ */ + +#include <Cocoa/Cocoa.h> + +#import "Preferences.h" +#include "quartzCommon.h" +#include "pseudoramiX.h" + +extern void FatalError(const char *, ...); +extern char *display; +extern int noPanoramiXExtension; + + +/* + * QuartzReadPreferences + * Read the user preferences from the Cocoa front end. + */ +void QuartzReadPreferences(void) +{ + char *fileString; + + darwinFakeButtons = [Preferences fakeButtons]; + darwinFakeMouse2Mask = [Preferences button2Mask]; + darwinFakeMouse3Mask = [Preferences button3Mask]; + quartzMouseAccelChange = [Preferences mouseAccelChange]; + quartzUseSysBeep = [Preferences systemBeep]; + + // quartzRootless has already been set + if (quartzRootless) { + // Use PseudoramiX instead of Xinerama + noPanoramiXExtension = TRUE; + noPseudoramiXExtension = ![Preferences xinerama]; + + quartzUseAGL = [Preferences useAGL]; + } else { + noPanoramiXExtension = ![Preferences xinerama]; + noPseudoramiXExtension = TRUE; + + // Full screen can't use AGL for GLX + quartzUseAGL = FALSE; + } + + 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]); + + darwinDesiredDepth = [Preferences depth] - 1; +} + + +/* + * QuartzWriteCocoaPasteboard + * 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]; +} + + +/* + * QuartzReadCocoaPasteboard + * 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; +} + + +/* + * QuartzFSUseQDCursor + * Return whether the screen should use a QuickDraw cursor. + */ +int QuartzFSUseQDCursor( + int depth) // screen depth +{ + switch ([Preferences useQDCursor]) { + case qdCursor_Always: + return TRUE; + case qdCursor_Never: + return FALSE; + case qdCursor_Not8Bit: + if (depth > 8) + return TRUE; + else + return FALSE; + } + return TRUE; +} + + +/* + * QuartzBlockHandler + * Clean out any autoreleased objects. + */ +void QuartzBlockHandler( + void *blockData, + void *pTimeout, + void *pReadmask) +{ + static NSAutoreleasePool *aPool = nil; + + [aPool release]; + aPool = [[NSAutoreleasePool alloc] init]; +} + + +/* + * QuartzWakeupHandler + */ +void QuartzWakeupHandler( + void *blockData, + int result, + void *pReadmask) +{ + // nothing here +} Index: xc/programs/Xserver/hw/darwin/quartz/quartzCommon.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzCommon.h:1.8 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzCommon.h Wed Jan 22 19:34:26 2003 @@ -0,0 +1,98 @@ +/* + * quartzCommon.h + * + * Common definitions used internally by all Quartz modes + * + * This file should be included before any X11 or IOKit headers + * so that it can avoid symbol conflicts. + * + * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker. + * 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzCommon.h,v 1.8 2003/01/23 00:34:26 torrey Exp $ */ + +#ifndef _QUARTZCOMMON_H +#define _QUARTZCOMMON_H + +// QuickDraw in ApplicationServices has the following conflicts with +// the basic X server headers. Use QD_<name> to use the QuickDraw +// definition of any of these symbols, or the normal name for the +// X11 definition. +#define Cursor QD_Cursor +#define WindowPtr QD_WindowPtr +#define Picture QD_Picture +#include <ApplicationServices/ApplicationServices.h> +#undef Cursor +#undef WindowPtr +#undef Picture + +#include "quartzShared.h" + +// Quartz specific per screen storage structure +typedef struct { + // List of CoreGraphics displays that this X11 screen covers. + // This is more than one CG display for video mirroring and + // rootless PseudoramiX mode. + // No CG display will be covered by more than one X11 screen. + int displayCount; + CGDirectDisplayID *displayIDs; +} QuartzScreenRec, *QuartzScreenPtr; + +#define QUARTZ_PRIV(pScreen) \ + ((QuartzScreenPtr)pScreen->devPrivates[quartzScreenIndex].ptr) + +// Data stored at startup for Cocoa front end +extern int quartzEventWriteFD; +extern int quartzStartClients; + +// User preferences used by Quartz modes +extern int quartzRootless; +extern int quartzUseSysBeep; +extern int quartzUseAGL; + +// Other shared data +extern int quartzServerVisible; +extern int quartzServerQuitting; +extern int quartzScreenIndex; +extern int aquaMenuBarHeight; + +void QuartzReadPreferences(void); +void QuartzMessageMainThread(unsigned msg, void *data, unsigned length); +void QuartzFSCapture(void); +void QuartzFSRelease(void); +int QuartzFSUseQDCursor(int depth); +void QuartzBlockHandler(void *blockData, void *pTimeout, void *pReadmask); +void QuartzWakeupHandler(void *blockData, int result, void *pReadmask); + +// Messages that can be sent to the main thread. +enum { + kQuartzServerHidden, + kQuartzServerStarted, + kQuartzServerDied, + kQuartzCursorUpdate, + kQuartzPostEvent +}; + +#endif /* _QUARTZCOMMON_H */ Index: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzCursor.c:1.5 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzCursor.c Wed Jan 22 19:34:26 2003 @@ -0,0 +1,653 @@ +/************************************************************** + * + * Support for using the Quartz Window Manager cursor + * + **************************************************************/ +/* + * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker. + * 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzCursor.c,v 1.5 2003/01/23 00:34:26 torrey Exp $ */ + +#include "quartzCommon.h" +#include "quartzCursor.h" +#include "darwin.h" + +#include <pthread.h> + +#include "mi.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "mipointrst.h" +#include "globals.h" + +// Size of the QuickDraw cursor +#define CURSORWIDTH 16 +#define CURSORHEIGHT 16 + +typedef struct { + int qdCursorMode; + int qdCursorVisible; + int useQDCursor; + QueryBestSizeProcPtr QueryBestSize; + miPointerSpriteFuncPtr spriteFuncs; +} QuartzCursorScreenRec, *QuartzCursorScreenPtr; + +static int darwinCursorScreenIndex = -1; +static unsigned long darwinCursorGeneration = 0; +static CursorPtr quartzLatentCursor = NULL; +static QD_Cursor gQDArrow; // QuickDraw arrow cursor + +// Cursor for the main thread to set (NULL = arrow cursor). +static CCrsrHandle currentCursor = NULL; +static pthread_mutex_t cursorMutex; +static pthread_cond_t cursorCondition; + +#define CURSOR_PRIV(pScreen) \ + ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) + +#define HIDE_QD_CURSOR(pScreen, visible) \ + if (visible) { \ + int ix; \ + for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ + CGDisplayHideCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ + } \ + visible = FALSE; \ + } ((void)0) + +#define SHOW_QD_CURSOR(pScreen, visible) \ + { \ + int ix; \ + for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ + CGDisplayShowCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ + } \ + visible = TRUE; \ + } ((void)0) + +#define CHANGE_QD_CURSOR(cursorH) \ + if (!quartzServerQuitting) { \ + /* Acquire lock and tell the main thread to change cursor */ \ + pthread_mutex_lock(&cursorMutex); \ + currentCursor = (CCrsrHandle) (cursorH); \ + QuartzMessageMainThread(kQuartzCursorUpdate, NULL, 0); \ + \ + /* Wait for the main thread to change the cursor */ \ + pthread_cond_wait(&cursorCondition, &cursorMutex); \ + pthread_mutex_unlock(&cursorMutex); \ + } ((void)0) + + +/* + * MakeQDCursor helpers: CTAB_ENTER, interleave + */ + +// Add a color entry to a ctab +#define CTAB_ENTER(ctab, index, r, g, b) \ + ctab->ctTable[index].value = index; \ + 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; +} + + +/* + * FreeQDCursor + * Destroy a QuickDraw color cursor created with MakeQDCursor(). + * The cursor must not currently be on screen. + */ +static void FreeQDCursor(CCrsrHandle cursHandle) +{ + CCrsrPtr curs; + PixMap *pix; + + HLock((Handle)cursHandle); + curs = *cursHandle; + HLock((Handle)curs->crsrMap); + pix = *curs->crsrMap; + DisposeHandle((Handle)pix->pmTable); + HUnlock((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrData); + HUnlock((Handle)cursHandle); + DisposeHandle((Handle)cursHandle); +} + + +/* +=========================================================================== + + 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) || !ScreenPriv->useQDCursor) + { + if (quartzRootless) { + // rootless can't use a software cursor + return TRUE; + } else { + 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) || !ScreenPriv->useQDCursor) + { + if (quartzRootless) { + return TRUE; + } else { + return (*ScreenPriv->spriteFuncs->UnrealizeCursor) + (pScreen, pCursor); + } + } else { + CCrsrHandle oldCursor = (CCrsrHandle) pCursor->devPriv[pScreen->myNum]; + + if (currentCursor != oldCursor) { + // This should only fail when quitting, in which case we just leak. + FreeQDCursor(oldCursor); + } + pCursor->devPriv[pScreen->myNum] = NULL; + 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); + + quartzLatentCursor = pCursor; + + // Don't touch Mac OS cursor if X is hidden! + if (!quartzServerVisible) + return; + + if (!pCursor) { + // Remove the cursor completely. + HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + if (! ScreenPriv->qdCursorMode) + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + } + else if ((pCursor->bits->height <= CURSORHEIGHT) && + (pCursor->bits->width <= CURSORWIDTH) && ScreenPriv->useQDCursor) + { + // Cursor is small enough to use QuickDraw directly. + if (! ScreenPriv->qdCursorMode) // remove the X cursor + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); + ScreenPriv->qdCursorMode = TRUE; + + CHANGE_QD_CURSOR(pCursor->devPriv[pScreen->myNum]); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + } + else if (quartzRootless) { + // Rootless can't use a software cursor, so we just use Mac OS arrow. + CHANGE_QD_CURSOR(NULL); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + } + else { + // Cursor is too big for QuickDraw. Use X software cursor. + HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + ScreenPriv->qdCursorMode = FALSE; + (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); + } +} + + +/* + * QuartzReallySetCursor + * Set the QuickDraw cursor. Called from the main thread since changing the + * cursor with QuickDraw is not thread safe on dual processor machines. + */ +void +QuartzReallySetCursor() +{ + pthread_mutex_lock(&cursorMutex); + + if (currentCursor) { + SetCCursor(currentCursor); + } else { + SetCursor(&gQDArrow); + } + + pthread_cond_signal(&cursorCondition); + pthread_mutex_unlock(&cursorMutex); +} + + +/* + * 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. + * The input coordinates (x,y) are in pScreen-local X11 coordinates. + * + */ +static void +QuartzWarpCursor( + ScreenPtr pScreen, + int x, + int y) +{ + static 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 (quartzServerVisible) { + CGDisplayErr cgErr; + CGPoint cgPoint; + // Only need to do this for one display. Any display will do. + CGDirectDisplayID cgID = QUARTZ_PRIV(pScreen)->displayIDs[0]; + CGRect cgRect = CGDisplayBounds(cgID); + + // Convert (x,y) to CoreGraphics screen-local CG coordinates. + // This is necessary because the X11 screen and CG screen may not + // coincide. (e.g. X11 screen may be moved to dodge the menu bar) + + // Make point in X11 global coordinates + cgPoint = CGPointMake(x + dixScreenOrigins[pScreen->myNum].x, + y + dixScreenOrigins[pScreen->myNum].y); + // Shift to CoreGraphics global screen coordinates + cgPoint.x += darwinMainScreenX; + cgPoint.y += darwinMainScreenY; + // Shift to CoreGraphics screen-local coordinates + cgPoint.x -= cgRect.origin.x; + cgPoint.y -= cgRect.origin.y; + + cgErr = CGDisplayMoveCursorToPoint(cgID, cgPoint); + if (cgErr != CGDisplayNoErr) { + ErrorF("Could not set cursor position with error code 0x%x.\n", + cgErr); + } + } + + miPointerWarpCursor(pScreen, x, y); + miPointerUpdate(); +} + + +static miPointerScreenFuncRec quartzScreenFuncsRec = { + QuartzCursorOffScreen, + QuartzCrossScreen, + QuartzWarpCursor, + DarwinEQPointerPost, + DarwinEQSwitchScreen +}; + + +/* +=========================================================================== + + 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; + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + + // 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; + + if (!quartzRootless) + ScreenPriv->useQDCursor = QuartzFSUseQDCursor(dfb->colorBitsPerPixel); + else + ScreenPriv->useQDCursor = TRUE; + ScreenPriv->qdCursorMode = TRUE; + ScreenPriv->qdCursorVisible = TRUE; + + // initialize cursor mutex lock + pthread_mutex_init(&cursorMutex, NULL); + + // initialize condition for waiting + pthread_cond_init(&cursorCondition, NULL); + + return TRUE; +} + + +// X server is hiding. Restore the Aqua cursor. +void QuartzSuspendXCursor( + ScreenPtr pScreen ) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + CHANGE_QD_CURSOR(NULL); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); +} + + +// X server is showing. Restore the X cursor. +void QuartzResumeXCursor( + ScreenPtr pScreen, + int x, + int y ) +{ + QuartzSetCursor(pScreen, quartzLatentCursor, x, y); +} Index: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzCursor.h:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzCursor.h Wed Mar 27 21:21:19 2002 @@ -0,0 +1,43 @@ +/* + * quartzCursor.h + * + * External interface for Quartz hardware cursor + */ +/* + * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. + * 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzCursor.h,v 1.1 2002/03/28 02:21:19 torrey Exp $ */ + +#ifndef QUARTZCURSOR_H +#define QUARTZCURSOR_H + +#include "screenint.h" + +Bool QuartzInitCursor(ScreenPtr pScreen); +void QuartzSuspendXCursor(ScreenPtr pScreen); +void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y); + +#endif Index: xc/programs/Xserver/hw/darwin/quartz/quartzPasteboard.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzPasteboard.c:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzPasteboard.c Wed Mar 27 21:21:19 2002 @@ -0,0 +1,150 @@ +/************************************************************** + * quartzPasteboard.c + * + * Aqua pasteboard <-> X cut buffer + * Greg Parker gparker@cs.stanford.edu March 8, 2001 + **************************************************************/ +/* + * Copyright (c) 2001 Greg Parker. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzPasteboard.c,v 1.1 2002/03/28 02:21:19 torrey Exp $ */ + +#include "quartzPasteboard.h" + +#include "Xatom.h" +#include "windowstr.h" +#include "propertyst.h" +#include "scrnintstr.h" +#include "selection.h" +#include "globals.h" + +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/quartz/quartzPasteboard.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzPasteboard.h:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzPasteboard.h Wed Mar 27 21:21:19 2002 @@ -0,0 +1,45 @@ +/* + QuartzPasteboard.h + + Mac OS X pasteboard <-> X cut buffer + Greg Parker gparker@cs.stanford.edu March 8, 2001 +*/ +/* + * Copyright (c) 2001 Greg Parker. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzPasteboard.h,v 1.1 2002/03/28 02:21:19 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/quartz/quartzShared.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzShared.h:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzShared.h Fri Oct 11 20:32:45 2002 @@ -0,0 +1,57 @@ +/* + * quartzShared.h + * + * Shared definitions between the Darwin X Server and the Cocoa front end + * + * This file is included in all parts of the Darwin X Server and must not + * include any types defined in X11 or Mac OS X specific headers. + * Definitions that are internal to the Quartz modes or use Mac OS X + * specific types should be in quartzCommon.h instead of here. + */ +/* + * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. + * 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzShared.h,v 1.2 2002/10/12 00:32:45 torrey Exp $ */ + +#ifndef _QUARTZSHARED_H +#define _QUARTZSHARED_H + +// User preferences used by generic Darwin X server code +extern int quartzMouseAccelChange; +extern int darwinFakeButtons; +extern int darwinFakeMouse2Mask; +extern int darwinFakeMouse3Mask; +extern char *darwinKeymapFile; +extern unsigned int darwinDesiredWidth, darwinDesiredHeight; +extern int darwinDesiredDepth; +extern int darwinDesiredRefresh; + +// location of X11's (0,0) point in global screen coordinates +extern int darwinMainScreenX; +extern int darwinMainScreenY; + +#endif /* _QUARTZSHARED_H */ + Index: xc/programs/Xserver/hw/darwin/quartz/quartzStartup.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/quartzStartup.c:1.3 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/quartzStartup.c Sun Jan 19 01:35:13 2003 @@ -0,0 +1,233 @@ +/************************************************************** + * + * Startup code for the Quartz Darwin X Server + * + **************************************************************/ +/* + * Copyright (c) 2001-2003 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/quartzStartup.c,v 1.3 2003/01/19 06:35:13 torrey Exp $ */ + +#include <fcntl.h> +#include <unistd.h> +#include <CoreFoundation/CoreFoundation.h> +#include "quartzCommon.h" +#include "darwin.h" +#include "opaque.h" +#include "micmap.h" + +int NSApplicationMain(int argc, char *argv[]); + +char **envpGlobal; // argcGlobal and argvGlobal + // are from dix/globals.c + +// GLX bundle function pointers +typedef void (*GlxExtensionInitPtr)(void); +static GlxExtensionInitPtr GlxExtensionInit = NULL; + +typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *); +static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL; + + +/* + * 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 + // and what display mode to use + quartzStartClients = 1; + for (i = 1; i < argc; i++) { + if (!strcmp(argv[i], "-nostartx")) { + quartzStartClients = 0; + } else if (!strcmp( argv[i], "-fullscreen")) { + quartzRootless = 0; + } else if (!strcmp( argv[i], "-rootless")) { + quartzRootless = 1; + } + } + + quartz = TRUE; + main_exit = NSApplicationMain(argc, argv); + exit(main_exit); +} + + +/* + * LoadGlxBundle + * The Quartz mode X server needs to dynamically load the appropriate + * bundle before initializing GLX. + */ +static void LoadGlxBundle(void) +{ + CFBundleRef mainBundle; + CFStringRef bundleName; + CFURLRef bundleURL; + CFBundleRef glxBundle; + + // Get the main bundle for the application + mainBundle = CFBundleGetMainBundle(); + + // Choose the bundle to load + ErrorF("Loading GLX bundle "); + if (quartzUseAGL) { + bundleName = CFSTR("glxAGL.bundle"); + ErrorF("glxAGL.bundle (using Apple's OpenGL)\n"); + } else { + bundleName = CFSTR("glxMesa.bundle"); + ErrorF("glxMesa.bundle (using Mesa)\n"); + } + + // Look for the appropriate GLX bundle in the main bundle by name + bundleURL = CFBundleCopyResourceURL(mainBundle, bundleName, + NULL, NULL); + if (!bundleURL) { + FatalError("Could not find GLX bundle."); + } + + // Make a bundle instance using the URLRef + glxBundle = CFBundleCreate(kCFAllocatorDefault, bundleURL); + + if (!CFBundleLoadExecutable(glxBundle)) { + FatalError("Could not load GLX bundle."); + } + + // Find the GLX init functions + GlxExtensionInit = (void *) CFBundleGetFunctionPointerForName( + glxBundle, CFSTR("GlxExtensionInit")); + + GlxWrapInitVisuals = (void *) CFBundleGetFunctionPointerForName( + glxBundle, CFSTR("GlxWrapInitVisuals")); + + if (!GlxExtensionInit || !GlxWrapInitVisuals) { + FatalError("Could not initialize GLX bundle."); + } + + // Release the CF objects + CFRelease(mainBundle); + CFRelease(bundleURL); +} + + +/* + * DarwinGlxExtensionInit + * Initialize the GLX extension. + */ +void DarwinGlxExtensionInit(void) +{ + if (!GlxExtensionInit) + LoadGlxBundle(); + + GlxExtensionInit(); +} + + +/* + * DarwinGlxWrapInitVisuals + */ +void DarwinGlxWrapInitVisuals( + miInitVisualsProcPtr *procPtr) +{ + if (!GlxWrapInitVisuals) + LoadGlxBundle(); + + GlxWrapInitVisuals(procPtr); +} + + +int QuartzProcessArgument( int argc, char *argv[], int i ) +{ + // fullscreen: CoreGraphics full-screen mode + // rootless: Cocoa rootless mode + // quartz: Default, either fullscreen or rootless + + if ( !strcmp( argv[i], "-fullscreen" ) ) { + ErrorF( "Running full screen 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; + } + + if ( !strcmp( argv[i], "-rootless" ) ) { + ErrorF( "Running rootless inside Mac OS X window server.\n" ); +#ifdef QUARTZ_SAFETY_DELAY + ErrorF( "Quitting in %d seconds if no controller is found.\n", + QUARTZ_SAFETY_DELAY ); +#endif + return 1; + } + + if ( !strcmp( argv[i], "-quartz" ) ) { + 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; + } + + return 0; +} \ No newline at end of file Index: xc/programs/Xserver/hw/darwin/quartz/rootless.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootless.h:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootless.h Wed Aug 28 02:41:26 2002 @@ -0,0 +1,136 @@ +/* + * External interface to generic rootless mode + * + * Greg Parker gparker@cs.stanford.edu March 3, 2001 + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootless.h,v 1.2 2002/08/28 06:41:26 torrey Exp $ */ + +#ifndef _ROOTLESS_H +#define _ROOTLESS_H + +#include "mi.h" +#include "gcstruct.h" + +// RootlessFrameRec +// Describes a single rootless window (aka frame). +// The rootless mode keeps track of window position, and the +// rootless implementation is responsible for the pixmap. +// Multiple screens: all coordinates are SCREEN-LOCAL, not global. + + +typedef struct RootlessFrameRec { + /* Data maintained by rootless mode */ + /* position and size, including window border, in screen coordinates */ + int x; + int y; + unsigned int w; + unsigned int h; + WindowPtr win; /* the top-level window drawn in this frame */ + int isRoot; /* TRUE if this is the root window */ + + /* Data maintained by rootless implementation */ + char *pixelData; + int depth; // color bits per pixel; depth <= bitsPerPixel + int bitsPerPixel; + int bytesPerRow; + + void *devPrivate; /* for caller's use */ +} RootlessFrameRec, *RootlessFramePtr; + + +// Create a new frame. +// pUpper is the window above the new frame, or NULL if the new +// frame will be on top. +// pFrame is completely initialized. devPrivate is NULL +// The pixmap must be valid when this is done. +typedef void (*RootlessCreateFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, RootlessFramePtr pUpper); + +// Destroy a frame. Caller must free any private data and the pixmap. +// All drawing is stopped and all updates are flushed before this is called. +typedef void (*RootlessDestroyFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame); + +// Move a frame on screen. +// The frame changes position and nothing else. +// pFrame and pFrame->win already contain the information about the +// new position. oldX and oldY are the old position. +// All updates are flushed before this is called. +// The pixmap may change during this function. +typedef void (*RootlessMoveFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, int oldX, int oldY); + +// Change frame ordering (aka stacking, layering) +// pFrame->win already has its new siblings. +// pOldNext is the window that was below this one, or NULL if this was +// at the bottom. +// pNewNext is the window that is now below this one, or NULL if this is +// now at the bottom. +typedef void (*RootlessRestackFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, + RootlessFramePtr pOldNext, RootlessFramePtr pNewNext); + +// Change the frame's shape. +// pNewShape is in frame-local coordinates. +// Everything outside pNewShape is no longer part of the frame. +// pNewShape is {0, 0, width, height} for a plain-shaped frame. +typedef void (*RootlessReshapeFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, RegionPtr pNewShape); + +// Flush drawing updates to the screen. +// pDamage contains all changed pixels. +// pDamage is in frame-local coordinates. +// pDamage is clipped to the frame bounds and the frame shape. +typedef void (*RootlessUpdateRegionProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, RegionPtr pDamage); + +// Prepare a window for direct access to its backing buffer. +typedef void (*RootlessStartDrawingProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame); + +// Stop access to a window's backing buffer. +typedef void (*RootlessStopDrawingProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame); + +// Frame is about to resize. +// The frame has its new position and size already. +// postconditions: +// The pixmap MUST point to a pixmap with the new size. +// The pixmap data is undefined. +// The old pixmap may be destroyed here. +typedef void (*RootlessStartResizeFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, unsigned int oldW, unsigned int oldH); + +// Frame is done resizing. +// Destroy the old pixmap if you haven't already. +typedef void (*RootlessFinishResizeFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, unsigned int oldW, unsigned int oldH); + + +// The callback function list. +// Any of these may be NULL. +typedef struct RootlessFrameProcs { + RootlessCreateFrameProc CreateFrame; + RootlessDestroyFrameProc DestroyFrame; + + RootlessMoveFrameProc MoveFrame; + RootlessStartResizeFrameProc StartResizeFrame; + RootlessFinishResizeFrameProc FinishResizeFrame; + RootlessRestackFrameProc RestackFrame; + RootlessReshapeFrameProc ReshapeFrame; + + RootlessUpdateRegionProc UpdateRegion; + + RootlessStartDrawingProc StartDrawing; + RootlessStopDrawingProc StopDrawing; +} RootlessFrameProcs; + +// Initialize rootless mode on the given screen. +Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcs *procs); + +// Return the rootless frame for the given window or NULL if it's not framed +RootlessFramePtr RootlessFrameForWindow(WindowPtr pWin); + +#endif /* _ROOTLESS_H */ Index: xc/programs/Xserver/hw/darwin/quartz/rootlessAqua.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessAqua.h:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessAqua.h Wed Mar 27 21:21:19 2002 @@ -0,0 +1,15 @@ +/* + * Rootless setup for Aqua + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessAqua.h,v 1.1 2002/03/28 02:21:19 torrey Exp $ */ + +#ifndef _ROOTLESSAQUA_H +#define _ROOTLESSAQUA_H + +Bool AquaAddScreen(int index, ScreenPtr pScreen); +Bool AquaSetupScreen(int index, ScreenPtr pScreen); +void AquaDisplayInit(void); + +#endif /* _ROOTLESSAQUA_H */ Index: xc/programs/Xserver/hw/darwin/quartz/rootlessAquaGlue.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessAquaGlue.c:1.5 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessAquaGlue.c Mon Dec 9 19:00:39 2002 @@ -0,0 +1,242 @@ +/* + * Generic rootless to Aqua specific glue code + * + * This code acts as a glue between the generic rootless X server code + * and the Aqua specific implementation, which includes definitions that + * conflict with stardard X types. + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessAquaGlue.c,v 1.5 2002/12/10 00:00:39 torrey Exp $ */ + +#include "quartzCommon.h" +#include "darwin.h" +#include "rootlessAqua.h" +#include "rootlessAquaImp.h" +#include "rootless.h" +#include "aqua.h" + +#include "regionstr.h" +#include "scrnintstr.h" +#include "picturestr.h" +#include "globals.h" // dixScreenOrigins[] + + +///////////////////////////////////////// +// Rootless mode callback glue + +static void +AquaGlueCreateFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + RootlessFramePtr pUpper) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + pFrame->devPrivate = AquaNewWindow(pUpper ? pUpper->devPrivate : NULL, + pFrame->x + sx, pFrame->y + sy, + pFrame->w, pFrame->h, + pFrame->isRoot); +} + + +static void +AquaGlueDestroyFrame(ScreenPtr pScreen, RootlessFramePtr pFrame) +{ + AquaDestroyWindow(pFrame->devPrivate); +} + + +static void +AquaGlueMoveFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + AquaMoveWindow(pFrame->devPrivate, pFrame->x + sx, pFrame->y + sy); +} + + +static void +AquaGlueStartResizeFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + AquaStartResizeWindow(pFrame->devPrivate, + pFrame->x + sx, pFrame->y + sy, pFrame->w, pFrame->h); +} + +static void +AquaGlueFinishResizeFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + AquaFinishResizeWindow(pFrame->devPrivate, + pFrame->x + sx, pFrame->y + sy, + pFrame->w, pFrame->h); +} + + +static void +AquaGlueRestackFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + RootlessFramePtr pOldPrev, + RootlessFramePtr pNewPrev) +{ + AquaRestackWindow(pFrame->devPrivate, + pNewPrev ? pNewPrev->devPrivate : NULL); +} + + +static void +AquaGlueReshapeFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + RegionPtr pNewShape) +{ + BoxRec shapeBox = {0, 0, pFrame->w, pFrame->h}; + + // Don't correct for dixScreenOrigins here. + // pNewShape is in window-local coordinates. + + if (pFrame->isRoot) return; // shouldn't happen; mi or dix covers this + + REGION_INVERSE(pScreen, pNewShape, pNewShape, &shapeBox); + AquaReshapeWindow(pFrame->devPrivate, + (fakeBoxRec *) REGION_RECTS(pNewShape), + REGION_NUM_RECTS(pNewShape)); +} + + +static void +AquaGlueUpdateRegion(ScreenPtr pScreen, RootlessFramePtr pFrame, + RegionPtr pDamage) +{ + AquaUpdateRects(pFrame->devPrivate, + (fakeBoxRec *) REGION_RECTS(pDamage), + REGION_NUM_RECTS(pDamage)); +} + + +static void +AquaGlueStartDrawing(ScreenPtr pScreen, RootlessFramePtr pFrame) +{ + AquaStartDrawing(pFrame->devPrivate, &pFrame->pixelData, + &pFrame->bytesPerRow, &pFrame->depth, + &pFrame->bitsPerPixel); +} + +static void +AquaGlueStopDrawing(ScreenPtr pScreen, RootlessFramePtr pFrame) +{ + AquaStopDrawing(pFrame->devPrivate); +} + + +static RootlessFrameProcs aquaRootlessProcs = { + AquaGlueCreateFrame, + AquaGlueDestroyFrame, + AquaGlueMoveFrame, + AquaGlueStartResizeFrame, + AquaGlueFinishResizeFrame, + AquaGlueRestackFrame, + AquaGlueReshapeFrame, + AquaGlueUpdateRegion, + AquaGlueStartDrawing, + AquaGlueStopDrawing +}; + + +/////////////////////////////////////// +// Rootless mode initialization. +// Exported by rootlessAqua.h + +/* + * AquaDisplayInit + * Find all Aqua screens. + */ +void +AquaDisplayInit(void) +{ + darwinScreensFound = AquaDisplayCount(); +} + + +/* + * AquaAddScreen + * Init the framebuffer and record pixmap parameters for the screen. + */ +Bool +AquaAddScreen(int index, ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen); + CGRect cgRect; + CGDisplayCount numDisplays; + CGDisplayCount allocatedDisplays = 0; + CGDirectDisplayID *displays = NULL; + CGDisplayErr cgErr; + int componentCount; + + dfb->colorType = TrueColor; + AquaScreenInit(index, &dfb->x, &dfb->y, &dfb->width, &dfb->height, + &dfb->pitch, &dfb->bitsPerComponent, + &componentCount, &dfb->bitsPerPixel); + dfb->colorBitsPerPixel = dfb->bitsPerComponent * componentCount; + + // No frame buffer - it's all in window pixmaps. + dfb->framebuffer = NULL; // malloc(dfb.pitch * dfb.height); + + // Get all CoreGraphics displays covered by this X11 display. + cgRect = CGRectMake(dfb->x, dfb->y, dfb->width, dfb->height); + do { + cgErr = CGGetDisplaysWithRect(cgRect, 0, NULL, &numDisplays); + if (cgErr) break; + allocatedDisplays = numDisplays; + displays = xrealloc(displays, + numDisplays * sizeof(CGDirectDisplayID)); + cgErr = CGGetDisplaysWithRect(cgRect, allocatedDisplays, displays, + &numDisplays); + if (cgErr != CGDisplayNoErr) break; + } while (numDisplays > allocatedDisplays); + + if (cgErr != CGDisplayNoErr || numDisplays == 0) { + ErrorF("Could not find CGDirectDisplayID(s) for X11 screen %d: %dx%d @ %d,%d.\n", + index, dfb->width, dfb->height, dfb->x, dfb->y); + return FALSE; + } + + // This X11 screen covers all CoreGraphics displays we just found. + // If there's more than one CG display, then video mirroring is on + // or PseudoramiX is on. + displayInfo->displayCount = allocatedDisplays; + displayInfo->displayIDs = displays; + + return TRUE; +} + + +/* + * AquaSetupScreen + * Setup the screen for rootless access. + */ +Bool +AquaSetupScreen(int index, ScreenPtr pScreen) +{ + // Add Aqua specific replacements for fb screen functions + pScreen->PaintWindowBackground = AquaPaintWindow; + pScreen->PaintWindowBorder = AquaPaintWindow; + +#ifdef RENDER + { + PictureScreenPtr ps = GetPictureScreen(pScreen); + ps->Composite = AquaComposite; + } +#endif /* RENDER */ + + // Initialize generic rootless code + return RootlessInit(pScreen, &aquaRootlessProcs); +} Index: xc/programs/Xserver/hw/darwin/quartz/rootlessAquaImp.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessAquaImp.h:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessAquaImp.h Mon Dec 9 19:00:39 2002 @@ -0,0 +1,39 @@ +/* + * Rootless implementation for Mac OS X Aqua environment + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessAquaImp.h,v 1.2 2002/12/10 00:00:39 torrey Exp $ */ + +#ifndef _ROOTLESSAQUAIMP_H +#define _ROOTLESSAQUAIMP_H + +#include "fakeBoxRec.h" + +int AquaDisplayCount(); + +void AquaScreenInit(int index, int *x, int *y, int *width, int *height, + int *rowBytes, int *bps, int *spp, int *bpp); + +void *AquaNewWindow(void *upperw, int x, int y, int w, int h, int isRoot); + +void AquaDestroyWindow(void *rw); + +void AquaMoveWindow(void *rw, int x, int y); + +void AquaStartResizeWindow(void *rw, int x, int y, int w, int h); + +void AquaFinishResizeWindow(void *rw, int x, int y, int w, int h); + +void AquaUpdateRects(void *rw, fakeBoxRec *rects, int count); + +void AquaRestackWindow(void *rw, void *lowerw); + +void AquaReshapeWindow(void *rw, fakeBoxRec *rects, int count); + +void AquaStartDrawing(void *rw, char **bits, + int *rowBytes, int *depth, int *bpp); + +void AquaStopDrawing(void *rw); + +#endif /* _ROOTLESSAQUAIMP_H */ Index: xc/programs/Xserver/hw/darwin/quartz/rootlessAquaImp.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessAquaImp.m:1.6 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessAquaImp.m Thu Jan 23 19:11:39 2003 @@ -0,0 +1,433 @@ +/* + * Rootless implementation for Mac OS X Aqua environment + */ +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * Copyright (c) 2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/rootlessAquaImp.m,v 1.6 2003/01/24 00:11:39 torrey Exp $ */ + +#include "rootlessAquaImp.h" +#include "fakeBoxRec.h" +#include "quartzCommon.h" +#include "aquaCommon.h" +#include "pseudoramiX.h" +#import <Cocoa/Cocoa.h> +#include <ApplicationServices/ApplicationServices.h> +#import "XView.h" + +extern void ErrorF(const char *, ...); + + +/* + * AquaDisplayCount + * Return the number of displays. + * Multihead note: When rootless mode uses PseudoramiX, the + * X server only sees one screen; only PseudoramiX itself knows + * about all of the screens. + */ +int AquaDisplayCount() +{ + aquaNumScreens = [[NSScreen screens] count]; + + if (noPseudoramiXExtension) { + return aquaNumScreens; + } else { + return 1; // only PseudoramiX knows about the rest + } +} + + +void AquaScreenInit(int index, int *x, int *y, int *width, int *height, + int *rowBytes, int *bps, int *spp, int *bpp) +{ + *spp = 3; + *bps = CGDisplayBitsPerSample(kCGDirectMainDisplay); + *bpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay); + + if (noPseudoramiXExtension) { + NSScreen *screen = [[NSScreen screens] objectAtIndex:index]; + NSRect frame = [screen frame]; + + // set x, y so (0,0) is top left of main screen + *x = NSMinX(frame); + *y = NSHeight([[NSScreen mainScreen] frame]) - NSHeight(frame) - + NSMinY(frame); + + *width = NSWidth(frame); + *height = NSHeight(frame); + *rowBytes = (*width) * (*bpp) / 8; + + // Shift the usable part of main screen down to avoid the menu bar. + if (NSEqualRects(frame, [[NSScreen mainScreen] frame])) { + *y += aquaMenuBarHeight; + *height -= aquaMenuBarHeight; + } + + } else { + int i; + NSRect unionRect = NSMakeRect(0, 0, 0, 0); + NSArray *screens = [NSScreen screens]; + + // Get the union of all screens (minus the menu bar on main screen) + for (i = 0; i < [screens count]; i++) { + NSScreen *screen = [screens objectAtIndex:i]; + NSRect frame = [screen frame]; + frame.origin.y = [[NSScreen mainScreen] frame].size.height - + frame.size.height - frame.origin.y; + if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { + frame.origin.y += aquaMenuBarHeight; + frame.size.height -= aquaMenuBarHeight; + } + unionRect = NSUnionRect(unionRect, frame); + } + + // Use unionRect as the screen size for the X server. + *x = unionRect.origin.x; + *y = unionRect.origin.y; + *width = unionRect.size.width; + *height = unionRect.size.height; + *rowBytes = (*width) * (*bpp) / 8; + + // Tell PseudoramiX about the real screens. + // InitOutput() will move the big screen to (0,0), + // so compensate for that here. + for (i = 0; i < [screens count]; i++) { + NSScreen *screen = [screens objectAtIndex:i]; + NSRect frame = [screen frame]; + int j; + + // Skip this screen if it's a mirrored copy of an earlier screen. + for (j = 0; j < i; j++) { + if (NSEqualRects(frame, [[screens objectAtIndex:j] frame])) { + ErrorF("PseudoramiX screen %d is a mirror of screen %d.\n", + i, j); + break; + } + } + if (j < i) continue; // this screen is a mirrored copy + + frame.origin.y = [[NSScreen mainScreen] frame].size.height - + frame.size.height - frame.origin.y; + + if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { + frame.origin.y += aquaMenuBarHeight; + frame.size.height -= aquaMenuBarHeight; + } + + ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, + (int)frame.size.width, (int)frame.size.height, + (int)frame.origin.x, (int)frame.origin.y); + + frame.origin.x -= unionRect.origin.x; + frame.origin.y -= unionRect.origin.y; + + ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", + i, (int)frame.origin.x, (int)frame.origin.y); + + PseudoramiXAddScreen(frame.origin.x, frame.origin.y, + frame.size.width, frame.size.height); + } + } +} + + +/* + * AquaNewWindow + * Create a new on-screen window. + * Rootless windows must not autodisplay! Autodisplay can cause a deadlock. + * Event thread - autodisplay: locks view hierarchy, then window + * X Server thread - window resize: locks window, then view hierarchy + * Deadlock occurs if each thread gets one lock and waits for the other. +*/ +void *AquaNewWindow(void *upperw, int x, int y, int w, int h, int isRoot) +{ + AquaWindowRec *winRec = (AquaWindowRec *)malloc(sizeof(AquaWindowRec)); + NSRect frame = NSMakeRect(x, NSHeight([[NSScreen mainScreen] frame]) - + y - h, w, h); + NSWindow *theWindow; + XView *theView; + + // Create an NSWindow for the new X11 window + theWindow = [[NSWindow alloc] initWithContentRect:frame + styleMask:NSBorderlessWindowMask + backing:NSBackingStoreBuffered + defer:YES]; + if (!theWindow) return NULL; + + [theWindow setBackgroundColor:[NSColor clearColor]]; // erase transparent + [theWindow setAlphaValue:1.0]; // draw opaque + [theWindow setOpaque:YES]; // changed when window is shaped + + [theWindow useOptimizedDrawing:YES]; // Has no overlapping sub-views + [theWindow setAutodisplay:NO]; // See comment above + [theWindow disableFlushWindow]; // We do all the flushing manually + [theWindow setHasShadow:!isRoot]; // All windows have shadows except root + [theWindow setReleasedWhenClosed:YES]; // Default, but we want to be sure + + theView = [[XView alloc] initWithFrame:frame]; + [theWindow setContentView:theView]; + [theWindow setInitialFirstResponder:theView]; + + if (upperw) { + AquaWindowRec *upperRec = AQUA_WINREC(upperw); + int uppernum = [upperRec->window windowNumber]; + [theWindow orderWindow:NSWindowBelow relativeTo:uppernum]; + } else { + if (!isRoot) { + [theWindow orderFront:nil]; + winRec->port = NULL; + } + } + + [theWindow setAcceptsMouseMovedEvents:YES]; + + winRec->window = theWindow; + winRec->view = theView; + + if (!isRoot) { + winRec->rootGWorld = NULL; + [theView lockFocus]; + // Fill the window with white to make sure alpha channel is set + NSEraseRect(frame); + winRec->port = [theView qdPort]; + winRec->context = [[NSGraphicsContext currentContext] graphicsPort]; + // CreateCGContextForPort(winRec->port, &winRec->context); + [theView unlockFocus]; + } else { + // Allocate the offscreen graphics world for root window drawing + GWorldPtr rootGWorld; + Rect globalRect; + + SetRect(&globalRect, x, y, x+w, y+h); + if (NewGWorld(&rootGWorld, 0, &globalRect, NULL, NULL, 0)) + return NULL; + winRec->rootGWorld = rootGWorld; + } + + return winRec; +} + + +void AquaDestroyWindow(void *rw) +{ + AquaWindowRec *winRec = AQUA_WINREC(rw); + + [winRec->window orderOut:nil]; + [winRec->window close]; + [winRec->view release]; + if (winRec->rootGWorld) { + DisposeGWorld(winRec->rootGWorld); + } + free(rw); +} + + +void AquaMoveWindow(void *rw, int x, int y) +{ + AquaWindowRec *winRec = AQUA_WINREC(rw); + NSPoint topLeft = NSMakePoint(x, NSHeight([[NSScreen mainScreen] frame]) - + y); + + [winRec->window setFrameTopLeftPoint:topLeft]; +} + + +/* + * AquaStartResizeWindow + * Resize the on screen window. + */ +void AquaStartResizeWindow(void *rw, int x, int y, int w, int h) +{ + AquaWindowRec *winRec = AQUA_WINREC(rw); + NSRect frame = NSMakeRect(x, NSHeight([[NSScreen mainScreen] frame]) - + y - h, w, h); + + [winRec->window setFrame:frame display:NO]; +} + + +void AquaFinishResizeWindow(void *rw, int x, int y, int w, int h) +{ + // refresh everything? fixme yes for testing + fakeBoxRec box = {0, 0, w, h}; + AquaUpdateRects(rw, &box, 1); +} + + +/* + * AquaUpdateRects + * Flush rectangular regions from a window's backing buffer + * (or PixMap for the root window) to the screen. + */ +void AquaUpdateRects(void *rw, fakeBoxRec *fakeRects, int count) +{ + AquaWindowRec *winRec = AQUA_WINREC(rw); + fakeBoxRec *rects, *end; + static RgnHandle rgn = NULL; + static RgnHandle box = NULL; + + if (!rgn) rgn = NewRgn(); + if (!box) box = NewRgn(); + + if (winRec->rootGWorld) { + // FIXME: Draw from the root PixMap to the normally + // invisible root window. + } else { + for (rects = fakeRects, end = fakeRects+count; rects < end; rects++) { + Rect qdrect; + qdrect.left = rects->x1; + qdrect.top = rects->y1; + qdrect.right = rects->x2; + qdrect.bottom = rects->y2; + + RectRgn(box, &qdrect); + UnionRgn(rgn, box, rgn); + } + + QDFlushPortBuffer(winRec->port, rgn); + } + + SetEmptyRgn(rgn); + SetEmptyRgn(box); +} + + +/* + * AquaRestackWindow + * Change the window order. Put the window behind upperw or on top if + * upperw is NULL. + */ +void AquaRestackWindow(void *rw, void *upperw) +{ + AquaWindowRec *winRec = AQUA_WINREC(rw); + + if (upperw) { + AquaWindowRec *upperRec = AQUA_WINREC(upperw); + int uppernum = [upperRec->window windowNumber]; + [winRec->window orderWindow:NSWindowBelow relativeTo:uppernum]; + } else { + [winRec->window makeKeyAndOrderFront:nil]; + } +} + + +/* + * AquaReshapeWindow + * Set the shape of a window. The rectangles are the areas that are + * not part of the new shape. + */ +void AquaReshapeWindow(void *rw, fakeBoxRec *fakeRects, int count) +{ + AquaWindowRec *winRec = AQUA_WINREC(rw); + NSRect frame = [winRec->view frame]; + int winHeight = NSHeight(frame); + + [winRec->view lockFocus]; + + // If window is currently shaped we need to undo the previous shape + if (![winRec->window isOpaque]) { + [[NSColor whiteColor] set]; + NSRectFillUsingOperation(frame, NSCompositeDestinationAtop); + } + + if (count > 0) { + fakeBoxRec *rects, *end; + + // Make transparent if window is now shaped. + [winRec->window setOpaque:NO]; + + // Clear the areas outside the window shape + [[NSColor clearColor] set]; + for (rects = fakeRects, end = fakeRects+count; rects < end; rects++) { + int rectHeight = rects->y2 - rects->y1; + NSRectFill( NSMakeRect(rects->x1, + winHeight - rects->y1 - rectHeight, + rects->x2 - rects->x1, rectHeight) ); + } + [[NSGraphicsContext currentContext] flushGraphics]; + + // force update of window shadow + [winRec->window setHasShadow:NO]; + [winRec->window setHasShadow:YES]; + + } else { + fakeBoxRec bounds = {0, 0, NSWidth(frame), winHeight}; + + [winRec->window setOpaque:YES]; + AquaUpdateRects(rw, &bounds, 1); + } + + [winRec->view unlockFocus]; +} + + +/* AquaStartDrawing + * When a window's buffer is not being drawn to, the CoreGraphics + * window server may compress or move it. Call this routine + * to lock down the buffer during direct drawing. It returns + * a pointer to the backing buffer and its depth, etc. + */ +void AquaStartDrawing(void *rw, char **bits, + int *rowBytes, int *depth, int *bpp) +{ + AquaWindowRec *winRec = AQUA_WINREC(rw); + PixMapHandle pix; + + if (! winRec->rootGWorld) { + [winRec->view lockFocus]; + winRec->port = [winRec->view qdPort]; + LockPortBits(winRec->port); + [winRec->view unlockFocus]; + pix = GetPortPixMap(winRec->port); + } else { + pix = GetGWorldPixMap(winRec->rootGWorld); + LockPixels(pix); + } + + *bits = GetPixBaseAddr(pix); + *rowBytes = GetPixRowBytes(pix) & 0x3fff; // fixme is mask needed? + *depth = (**pix).cmpCount * (**pix).cmpSize; // fixme use GetPixDepth(pix)? + *bpp = (**pix).pixelSize; +} + + +/* + * AquaStopDrawing + * When direct access to a window's buffer is no longer needed, this + * routine should be called to allow CoreGraphics to compress or + * move it. + */ +void AquaStopDrawing(void *rw) +{ + AquaWindowRec *winRec = AQUA_WINREC(rw); + + if (! winRec->rootGWorld) { + UnlockPortBits(winRec->port); + } else { + PixMapHandle pix = GetGWorldPixMap(winRec->rootGWorld); + UnlockPixels(pix); + } +} Index: xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.c:1.7 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.c Tue Jan 28 20:11:05 2003 @@ -0,0 +1,384 @@ +/* + * Common rootless definitions and code + */ +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * Copyright (c) 2002-2003 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/rootlessCommon.c,v 1.7 2003/01/29 01:11:05 torrey Exp $ */ + +#include "rootlessCommon.h" + + +RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL}; + + +/* + * TopLevelParent + * Returns the top-level parent of pWindow. + * The root is the top-level parent of itself, even though the root is + * not otherwise considered to be a top-level window. + */ +WindowPtr TopLevelParent(WindowPtr pWindow) +{ + WindowPtr top = pWindow; + + if (IsRoot(pWindow)) return pWindow; // root is top-level parent of itself + while (top && ! IsTopLevel(top)) top = top->parent; + return top; +} + + +/* + * IsFramedWindow + * Returns TRUE if this window is visible inside a frame + * (e.g. it is visible and has a top-level or root parent) + */ +Bool IsFramedWindow(WindowPtr pWin) +{ + WindowPtr top; + + if (! pWin->realized) return FALSE; + top = TopLevelParent(pWin); + return (top && WINREC(top)); +} + + +/* + * RootlessStartDrawing + * Prepare a window for direct access to its backing buffer. + * Each top-level parent has a Pixmap representing its backing buffer, + * which all of its children inherit. + */ +void RootlessStartDrawing(WindowPtr pWindow) +{ + ScreenPtr pScreen = pWindow->drawable.pScreen; + WindowPtr top = TopLevelParent(pWindow); + RootlessWindowRec *winRec; + + if (!top) return; + winRec = WINREC(top); + if (!winRec) return; + + // Make sure the window's top-level parent is prepared for drawing. + if (!winRec->drawing) { + int bw = wBorderWidth(top); + + CallFrameProc(pScreen, StartDrawing, (pScreen, &winRec->frame)); + winRec->pixmap = + GetScratchPixmapHeader(pScreen, winRec->frame.w, winRec->frame.h, + winRec->frame.depth, + winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, + winRec->frame.pixelData); + SetPixmapBaseToScreen(winRec->pixmap, + top->drawable.x - bw, top->drawable.y - bw); + winRec->drawing = TRUE; + } + + winRec->oldPixmap = pScreen->GetWindowPixmap(pWindow); + pScreen->SetWindowPixmap(pWindow, winRec->pixmap); +} + + +/* + * RootlessStopDrawing + * Stop drawing to a window's backing buffer. + */ +void RootlessStopDrawing(WindowPtr pWindow) +{ + WindowPtr top = TopLevelParent(pWindow); + RootlessWindowRec *winRec; + + if (!top) return; + winRec = WINREC(top); + if (!winRec) return; + + if (winRec->drawing) { + ScreenPtr pScreen = pWindow->drawable.pScreen; + CallFrameProc(pScreen, StopDrawing, (pScreen, &winRec->frame)); + FreeScratchPixmapHeader(winRec->pixmap); + pScreen->SetWindowPixmap(pWindow, winRec->oldPixmap); + winRec->pixmap = NULL; + winRec->drawing = FALSE; + } +} + +#if 0 +// NSCarbonWindow Note: Windows no longer need a backing pixmap +// other than the one provided by the implementation. +// This routine is obsolete. + +// Update pWindow's pixmap. +// This needs to be called every time a window moves relative to +// its top-level parent, or the parent's pixmap data is reallocated. +// Three cases: +// * window is top-level with no existing pixmap: make one +// * window is top-level with existing pixmap: update it in place +// * window is descendant of top-level: point to top-level's pixmap +void UpdatePixmap(WindowPtr pWindow) +{ + WindowPtr top = TopLevelParent(pWindow); + RootlessWindowRec *winRec; + ScreenPtr pScreen = pWindow->drawable.pScreen; + PixmapPtr pix; + + RL_DEBUG_MSG("update pixmap (win 0x%x)", pWindow); + + // Don't use IsFramedWindow(); window is unrealized during RealizeWindow(). + + if (! top) { + RL_DEBUG_MSG("no parent\n"); + return; + } + winRec = WINREC(top); + if (!winRec) { + RL_DEBUG_MSG("not framed\n"); + return; + } + + if (pWindow == top) { + // This is the top window. Update its pixmap. + int bw = wBorderWidth(pWindow); + + if (winRec->pixmap == NULL) { + // Allocate a new pixmap. + pix = GetScratchPixmapHeader(pScreen, + winRec->frame.w, winRec->frame.h, + winRec->frame.depth, + winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, + winRec->frame.pixelData); + SetPixmapBaseToScreen(pix, pWindow->drawable.x - bw, + pWindow->drawable.y - bw); + pScreen->SetWindowPixmap(pWindow, pix); + winRec->pixmap = pix; + } else { + // Update existing pixmap. Update in place so we don't have to + // change the children's pixmaps. + int bw = wBorderWidth(top); + + pix = winRec->pixmap; + pScreen->ModifyPixmapHeader(pix, + winRec->frame.w, winRec->frame.h, + winRec->frame.depth, + winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, + winRec->frame.pixelData); + SetPixmapBaseToScreen(pix, top->drawable.x - bw, + top->drawable.y - bw); + } + } else { + // This is not the top window. Point to the parent's pixmap. + pix = winRec->pixmap; + pScreen->SetWindowPixmap(pWindow, pix); + } + + RL_DEBUG_MSG("done\n"); +} +#endif + +#ifdef SHAPE + +// boundingShape = outside border (like borderClip) +// clipShape = inside border (like clipList) +// Both are in window-local coordinates +// We only care about boundingShape (fixme true?) + +// RootlessReallySetShape is used in several places other than SetShape. +// Most importantly, SetShape is often called on unmapped windows, so we +// have to wait until the window is mapped to reshape the frame. +static void RootlessReallySetShape(WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + RegionRec newShape; + + if (IsRoot(pWin)) return; + if (!IsTopLevel(pWin)) return; + if (!winRec) return; + + RootlessStopDrawing(pWin); + + if (wBoundingShape(pWin)) { + // wBoundingShape is relative to *inner* origin of window. + // Translate by borderWidth to get the outside-relative position. + REGION_INIT(pScreen, &newShape, NullBox, 0); + REGION_COPY(pScreen, &newShape, wBoundingShape(pWin)); + REGION_TRANSLATE(pScreen, &newShape, pWin->borderWidth, + pWin->borderWidth); + } else { + newShape.data = NULL; + newShape.extents.x1 = 0; + newShape.extents.y1 = 0; + newShape.extents.x2 = winRec->frame.w; + newShape.extents.y2 = winRec->frame.h; + } + RL_DEBUG_MSG("reshaping..."); + RL_DEBUG_MSG("numrects %d, extents %d %d %d %d ", + REGION_NUM_RECTS(&newShape), + newShape.extents.x1, newShape.extents.y1, + newShape.extents.x2, newShape.extents.y2); + CallFrameProc(pScreen, ReshapeFrame, (pScreen, &winRec->frame, &newShape)); + REGION_UNINIT(pScreen, &newShape); +} + +#endif // SHAPE + + +// pRegion is GLOBAL +void +RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) +{ + RL_DEBUG_MSG("Damaged win 0x%x ", pWindow); + pWindow = TopLevelParent(pWindow); + RL_DEBUG_MSG("parent 0x%x:\n", pWindow); + if (!pWindow) { + RL_DEBUG_MSG("RootlessDamageRegion: window is not framed\n"); + } else if (!WINREC(pWindow)) { + RL_DEBUG_MSG("RootlessDamageRegion: top-level window not a frame\n"); + } else { + REGION_UNION((pWindow)->drawable.pScreen, &WINREC(pWindow)->damage, + &WINREC(pWindow)->damage, (pRegion)); + } + +#ifdef ROOTLESSDEBUG + { + BoxRec *box = REGION_RECTS(pRegion), *end; + int numBox = REGION_NUM_RECTS(pRegion); + + for (end = box+numBox; box < end; box++) { + RL_DEBUG_MSG("Damage rect: %i, %i, %i, %i\n", + box->x1, box->x2, box->y1, box->y2); + } + } +#endif +} + + +// pBox is GLOBAL +void +RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox) +{ + RegionRec region; + + REGION_INIT(pWindow->drawable.pScreen, ®ion, pBox, 1); + RootlessDamageRegion(pWindow, ®ion); +} + + +// (x, y, w, h) is in window-local coordinates. +void +RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) +{ + BoxRec box; + RegionRec region; + + x += pWindow->drawable.x; + y += pWindow->drawable.y; + box.x1 = x; + box.x2 = x + w; + box.y1 = y; + box.y2 = y + h; + REGION_INIT(pWindow->drawable.pScreen, ®ion, &box, 1); + RootlessDamageRegion(pWindow, ®ion); +} + +#ifdef SHAPE + +void +RootlessDamageShape(WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC(pWin); + + // We only care about the shape of top-level framed windows. + if (IsRoot(pWin)) return; + if (!IsTopLevel(pWin)) return; + if (!winRec) return; + + winRec->shapeDamage = TRUE; +} + +#endif // SHAPE + +/* + * RootlessRedisplay + * Stop drawing and redisplay the damaged region of a window. + */ +void +RootlessRedisplay(WindowPtr pWindow) +{ + RootlessWindowRec *winRec = WINREC(pWindow); + ScreenPtr pScreen = pWindow->drawable.pScreen; + +#ifdef SHAPE + if (winRec->shapeDamage) { + // Reshape the window. This will also update the entire window. + RootlessReallySetShape(pWindow); + REGION_EMPTY(pScreen, &winRec->damage); + winRec->shapeDamage = FALSE; + } else +#endif // SHAPE + { + RootlessStopDrawing(pWindow); + if (REGION_NOTEMPTY(pScreen, &winRec->damage)) { + RL_DEBUG_MSG("Redisplay Win 0x%x, %i x %i @ (%i, %i)\n", + pWindow, winRec->frame.w, winRec->frame.h, + winRec->frame.x, winRec->frame.y); + + REGION_INTERSECT(pScreen, &winRec->damage, &winRec->damage, + &pWindow->borderSize); + + // move region to window local coords + REGION_TRANSLATE(pScreen, &winRec->damage, + -winRec->frame.x, -winRec->frame.y); + CallFrameProc(pScreen, UpdateRegion, + (pScreen, &winRec->frame, &winRec->damage)); + REGION_EMPTY(pScreen, &winRec->damage); + } + } +} + + +/* + * RootlessRedisplayScreen + * Walk every window on a screen and redisplay the damaged regions. + */ +void +RootlessRedisplayScreen(ScreenPtr pScreen) +{ + WindowPtr root = WindowTable[pScreen->myNum]; + + if (root) { + WindowPtr win; + + RootlessRedisplay(root); + for (win = root->firstChild; win; win = win->nextSib) { + if (WINREC(win)) { + RootlessRedisplay(win); + } + } + } +} Index: xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.h:1.7 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.h Tue Jan 28 20:11:05 2003 @@ -0,0 +1,260 @@ +/* + * Common internal rootless definitions and code + */ +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * Copyright (c) 2002-2003 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/rootlessCommon.h,v 1.7 2003/01/29 01:11:05 torrey Exp $ */ + +#ifndef _ROOTLESSCOMMON_H +#define _ROOTLESSCOMMON_H + +#include "rootless.h" +#include "fb.h" + +#ifdef RENDER +#include "picturestr.h" +#endif + + +// Debug output, or not. +#ifdef ROOTLESSDEBUG +#define RL_DEBUG_MSG ErrorF +#else +#define RL_DEBUG_MSG(a, ...) +#endif + + +// Global variables +extern int rootlessGCPrivateIndex; +extern int rootlessScreenPrivateIndex; +extern int rootlessWindowPrivateIndex; + + +// RootlessGCRec: private per-gc data +typedef struct { + GCFuncs *originalFuncs; + GCOps *originalOps; +} RootlessGCRec; + + +// RootlessWindowRec: private per-window data +typedef struct RootlessWindowRec { + RootlessFrameRec frame; + RegionRec damage; + unsigned int borderWidth; // needed for MoveWindow(VTOther) (%$#@!!!) + PixmapPtr pixmap; + PixmapPtr oldPixmap; + BOOL drawing; // TRUE if currently drawing +#ifdef SHAPE + BOOL shapeDamage; // TRUE if shape has changed +#endif +} RootlessWindowRec; + + +// RootlessScreenRec: per-screen private data +typedef struct { + ScreenPtr pScreen; + RootlessFrameProcs frameProcs; + + CloseScreenProcPtr CloseScreen; + + CreateWindowProcPtr CreateWindow; + DestroyWindowProcPtr DestroyWindow; + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + MoveWindowProcPtr MoveWindow; + ResizeWindowProcPtr ResizeWindow; + RestackWindowProcPtr RestackWindow; + ChangeBorderWidthProcPtr ChangeBorderWidth; + PositionWindowProcPtr PositionWindow; + ChangeWindowAttributesProcPtr ChangeWindowAttributes; + + CreateGCProcPtr CreateGC; + PaintWindowBackgroundProcPtr PaintWindowBackground; + PaintWindowBorderProcPtr PaintWindowBorder; + CopyWindowProcPtr CopyWindow; + GetImageProcPtr GetImage; + SourceValidateProcPtr SourceValidate; + + MarkOverlappedWindowsProcPtr MarkOverlappedWindows; + ValidateTreeProcPtr ValidateTree; + +#ifdef SHAPE + SetShapeProcPtr SetShape; +#endif + +#ifdef RENDER + CompositeProcPtr Composite; + GlyphsProcPtr Glyphs; +#endif + +} RootlessScreenRec; + + +// "Definition of the Porting Layer for the X11 Sample Server" says +// unwrap and rewrap of screen functions is unnecessary, but +// screen->CreateGC changes after a call to cfbCreateGC. + +#define SCREEN_UNWRAP(screen, fn) \ + screen->fn = SCREENREC(screen)->fn; + +#define SCREEN_WRAP(screen, fn) \ + SCREENREC(screen)->fn = screen->fn; \ + screen->fn = Rootless##fn + + +// Accessors for screen and window privates + +#define SCREENREC(pScreen) \ + ((RootlessScreenRec*)(pScreen)->devPrivates[rootlessScreenPrivateIndex].ptr) + +#define WINREC(pWin) \ + ((RootlessWindowRec *)(pWin)->devPrivates[rootlessWindowPrivateIndex].ptr) + + +// Call a rootless implementation function. +// Many rootless implementation functions are allowed to be NULL. +#define CallFrameProc(pScreen, proc, params) \ + if (SCREENREC(pScreen)->frameProcs.proc) { \ + RL_DEBUG_MSG("calling frame proc " #proc " "); \ + SCREENREC(pScreen)->frameProcs.proc params; \ + } + + +// BoxRec manipulators +// Copied from shadowfb + +#define TRIM_BOX(box, pGC) { \ + BoxPtr extents = &pGC->pCompositeClip->extents;\ + if(box.x1 < extents->x1) box.x1 = extents->x1; \ + if(box.x2 > extents->x2) box.x2 = extents->x2; \ + if(box.y1 < extents->y1) box.y1 = extents->y1; \ + if(box.y2 > extents->y2) box.y2 = extents->y2; \ +} + +#define TRANSLATE_BOX(box, pDraw) { \ + box.x1 += pDraw->x; \ + box.x2 += pDraw->x; \ + box.y1 += pDraw->y; \ + box.y2 += pDraw->y; \ +} + +#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \ + TRANSLATE_BOX(box, pDraw); \ + TRIM_BOX(box, pGC); \ +} + +#define BOX_NOT_EMPTY(box) \ + (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0)) + + +// HUGE_ROOT and NORMAL_ROOT +// We don't want to clip windows to the edge of the screen. +// HUGE_ROOT temporarily makes the root window really big. +// This is needed as a wrapper around any function that calls +// SetWinSize or SetBorderSize which clip a window against its +// parents, including the root. + +extern RegionRec rootlessHugeRoot; + +#define HUGE_ROOT(pWin) \ + { \ + WindowPtr w = pWin; \ + while (w->parent) w = w->parent; \ + saveRoot = w->winSize; \ + w->winSize = rootlessHugeRoot; \ + } + +#define NORMAL_ROOT(pWin) \ + { \ + WindowPtr w = pWin; \ + while (w->parent) w = w->parent; \ + w->winSize = saveRoot; \ + } + + +// Returns TRUE if this window is a top-level window (i.e. child of the root) +// The root is not a top-level window. +#define IsTopLevel(pWin) \ + ((pWin) && (pWin)->parent && !(pWin)->parent->parent) + +// Returns TRUE if this window is a root window +#define IsRoot(pWin) \ + ((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum]) + + +/* + * SetPixmapBaseToScreen + * Move the given pixmap's base address to where pixel (0, 0) + * would be if the pixmap's actual data started at (x, y). + * Can't access the bits before the first word of the drawable's data in + * rootless mode, so make sure our base address is always 32-bit aligned. + */ +#define SetPixmapBaseToScreen(pix, _x, _y) { \ + PixmapPtr _pPix = (PixmapPtr) (pix); \ + _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \ + ((int)(_x) * _pPix->drawable.bitsPerPixel/8 + \ + (int)(_y) * _pPix->devKind); \ + if (_pPix->drawable.bitsPerPixel != FB_UNIT) { \ + unsigned _diff = ((unsigned) _pPix->devPrivate.ptr) & \ + (FB_UNIT / CHAR_BIT - 1); \ + _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \ + _diff; \ + _pPix->drawable.x = _diff / \ + (_pPix->drawable.bitsPerPixel / CHAR_BIT); \ + } \ +} + + +// Returns the top-level parent of pWindow. +// The root is the top-level parent of itself, even though the root is +// not otherwise considered to be a top-level window. +WindowPtr TopLevelParent(WindowPtr pWindow); + +// Returns TRUE if this window is visible inside a frame +// (e.g. it is visible and has a top-level or root parent) +Bool IsFramedWindow(WindowPtr pWin); + +// Prepare a window for direct access to its backing buffer. +void RootlessStartDrawing(WindowPtr pWindow); + +// Finish drawing to a window's backing buffer. +void RootlessStopDrawing(WindowPtr pWindow); + +// Routines that cause regions to get redrawn. +// DamageRegion and DamageRect are in global coordinates. +// DamageBox is in window-local coordinates. +void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion); +void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h); +void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox); +void RootlessRedisplay(WindowPtr pWindow); +void RootlessRedisplayScreen(ScreenPtr pScreen); + +// Window reshape needs to be updated. The reshape also forces complete redraw. +void RootlessDamageShape(WindowPtr pWin); + +#endif // _ROOTLESSCOMMON_H Index: xc/programs/Xserver/hw/darwin/quartz/rootlessGC.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessGC.c:1.4 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessGC.c Mon Jan 27 01:04:59 2003 @@ -0,0 +1,1219 @@ +/* + * Graphics Context support for Mac OS X rootless X server + */ +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * Copyright (c) 2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/rootlessGC.c,v 1.4 2003/01/27 06:04:59 torrey Exp $ */ + +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "dixfontstr.h" +#include "mivalidate.h" +#include "fb.h" + +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include "rootlessCommon.h" +#include "aqua.h" + + +// GC functions +static void RootlessValidateGC(GCPtr pGC, unsigned long changes, + DrawablePtr pDrawable); +static void RootlessChangeGC(GCPtr pGC, unsigned long mask); +static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); +static void RootlessDestroyGC(GCPtr pGC); +static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, + int nrects); +static void RootlessDestroyClip(GCPtr pGC); +static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc); + +GCFuncs rootlessGCFuncs = { + RootlessValidateGC, + RootlessChangeGC, + RootlessCopyGC, + RootlessDestroyGC, + RootlessChangeClip, + RootlessDestroyClip, + RootlessCopyClip, +}; + +// GC operations +static void RootlessFillSpans(); +static void RootlessSetSpans(); +static void RootlessPutImage(); +static RegionPtr RootlessCopyArea(); +static RegionPtr RootlessCopyPlane(); +static void RootlessPolyPoint(); +static void RootlessPolylines(); +static void RootlessPolySegment(); +static void RootlessPolyRectangle(); +static void RootlessPolyArc(); +static void RootlessFillPolygon(); +static void RootlessPolyFillRect(); +static void RootlessPolyFillArc(); +static int RootlessPolyText8(); +static int RootlessPolyText16(); +static void RootlessImageText8(); +static void RootlessImageText16(); +static void RootlessImageGlyphBlt(); +static void RootlessPolyGlyphBlt(); +static void RootlessPushPixels(); + +static GCOps rootlessGCOps = { + RootlessFillSpans, + RootlessSetSpans, + RootlessPutImage, + RootlessCopyArea, + RootlessCopyPlane, + RootlessPolyPoint, + RootlessPolylines, + RootlessPolySegment, + RootlessPolyRectangle, + RootlessPolyArc, + RootlessFillPolygon, + RootlessPolyFillRect, + RootlessPolyFillArc, + RootlessPolyText8, + RootlessPolyText16, + RootlessImageText8, + RootlessImageText16, + RootlessImageGlyphBlt, + RootlessPolyGlyphBlt, + RootlessPushPixels +#ifdef NEED_LINEHELPER + , NULL +#endif +}; + + +Bool +RootlessCreateGC(GCPtr pGC) +{ + RootlessGCRec *gcrec; + RootlessScreenRec *s; + Bool result; + + SCREEN_UNWRAP(pGC->pScreen, CreateGC); + s = (RootlessScreenRec *) pGC->pScreen-> + devPrivates[rootlessScreenPrivateIndex].ptr; + result = s->CreateGC(pGC); + gcrec = (RootlessGCRec *) pGC->devPrivates[rootlessGCPrivateIndex].ptr; + gcrec->originalOps = NULL; // don't wrap ops yet + gcrec->originalFuncs = pGC->funcs; + pGC->funcs = &rootlessGCFuncs; + + SCREEN_WRAP(pGC->pScreen, CreateGC); + return result; +} + + +// GC func wrapping +// ValidateGC wraps gcOps iff dest is viewable. All others just unwrap&call. + +// GCFUN_UNRAP assumes funcs have been wrapped and +// does not assume ops have been wrapped +#define GCFUNC_UNWRAP(pGC) \ + RootlessGCRec *gcrec = (RootlessGCRec *) \ + (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + (pGC)->funcs = gcrec->originalFuncs; \ + if (gcrec->originalOps) { \ + (pGC)->ops = gcrec->originalOps; \ +} + +#define GCFUNC_WRAP(pGC) \ + gcrec->originalFuncs = (pGC)->funcs; \ + (pGC)->funcs = &rootlessGCFuncs; \ + if (gcrec->originalOps) { \ + gcrec->originalOps = (pGC)->ops; \ + (pGC)->ops = &rootlessGCOps; \ +} + + +static void +RootlessValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +{ + GCFUNC_UNWRAP(pGC); + + gcrec->originalOps = NULL; + + if (pDrawable->type == DRAWABLE_WINDOW) + { + int depth = pDrawable->depth; + + // We force a planemask so fb doesn't overwrite the alpha channel. + // Left to its own devices, fb will optimize away the planemask. + changes |= GCPlaneMask; + pDrawable->depth = pDrawable->bitsPerPixel; + pGC->planemask &= ~AquaAlphaMask(pDrawable->bitsPerPixel); + pGC->funcs->ValidateGC(pGC, changes, pDrawable); + pDrawable->depth = depth; + + if (((WindowPtr) pDrawable)->viewable) { + gcrec->originalOps = pGC->ops; + } + } else { + pGC->funcs->ValidateGC(pGC, changes, pDrawable); + } + + GCFUNC_WRAP(pGC); +} + +static void RootlessChangeGC(GCPtr pGC, unsigned long mask) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->ChangeGC(pGC, mask); + GCFUNC_WRAP(pGC); +} + +static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) +{ + GCFUNC_UNWRAP(pGCDst); + pGCDst->funcs->CopyGC(pGCSrc, mask, pGCDst); + GCFUNC_WRAP(pGCDst); +} + +static void RootlessDestroyGC(GCPtr pGC) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->DestroyGC(pGC); + GCFUNC_WRAP(pGC); +} + +static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->ChangeClip(pGC, type, pvalue, nrects); + GCFUNC_WRAP(pGC); +} + +static void RootlessDestroyClip(GCPtr pGC) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->DestroyClip(pGC); + GCFUNC_WRAP(pGC); +} + +static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + GCFUNC_UNWRAP(pgcDst); + pgcDst->funcs->CopyClip(pgcDst, pgcSrc); + GCFUNC_WRAP(pgcDst); +} + + +// GC ops +// We can't use shadowfb because shadowfb assumes one pixmap +// and our root window is a special case. +// So much of this code is copied from shadowfb. + +// assumes both funcs and ops are wrapped +#define GCOP_UNWRAP(pGC) \ + RootlessGCRec *gcrec = (RootlessGCRec *) \ + (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + GCFuncs *saveFuncs = pGC->funcs; \ + (pGC)->funcs = gcrec->originalFuncs; \ + (pGC)->ops = gcrec->originalOps; + +#define GCOP_WRAP(pGC) \ + gcrec->originalOps = (pGC)->ops; \ + (pGC)->funcs = saveFuncs; \ + (pGC)->ops = &rootlessGCOps; + + +static void +RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, + DDXPointPtr pptInit, int *pwidthInit, int sorted) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("fill spans start "); + + if (nInit <= 0) { + pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); + } else { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nInit; + BoxRec box; + + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidthInit++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + + box.y2++; + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill spans end\n"); +} + +static void +RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, + DDXPointPtr pptInit, int *pwidthInit, + int nspans, int sorted) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("set spans start "); + + if (nspans <= 0) { + pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, + nspans, sorted); + } else { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nspans; + BoxRec box; + + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidth++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + + box.y2++; + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, + nspans, sorted); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + GCOP_WRAP(pGC); + RL_DEBUG_MSG("set spans end\n"); +} + +static void +RootlessPutImage(DrawablePtr dst, GCPtr pGC, + int depth, int x, int y, int w, int h, + int leftPad, int format, char *pBits) +{ + BoxRec box; + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("put image start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PutImage(dst, pGC, depth, x,y,w,h, leftPad, format, pBits); + + box.x1 = x + dst->x; + box.x2 = box.x1 + w; + box.y1 = y + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("put image end\n"); +} + +/* changed area is *dest* rect */ +static RegionPtr +RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, + int srcx, int srcy, int w, int h, + int dstx, int dsty) +{ + RegionPtr result; + BoxRec box; + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst); + + if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) { + RootlessStartDrawing((WindowPtr) pSrc); + } + RootlessStartDrawing((WindowPtr) dst); + result = pGC->ops->CopyArea(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty); + + box.x1 = dstx + dst->x; + box.x2 = box.x1 + w; + box.y1 = dsty + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("copy area end\n"); + return result; +} + +/* changed area is *dest* rect */ +static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst, + GCPtr pGC, int srcx, int srcy, + int w, int h, int dstx, int dsty, + unsigned long plane) +{ + RegionPtr result; + BoxRec box; + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("copy plane start "); + + if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) { + RootlessStartDrawing((WindowPtr) pSrc); + } + RootlessStartDrawing((WindowPtr) dst); + result = pGC->ops->CopyPlane(pSrc, dst, pGC, srcx, srcy, w, h, + dstx, dsty, plane); + + box.x1 = dstx + dst->x; + box.x2 = box.x1 + w; + box.y1 = dsty + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("copy plane end\n"); + return result; +} + +// Options for size of changed area: +// 0 = box per point +// 1 = big box around all points +// 2 = accumulate point in 20 pixel radius +#define ROOTLESS_CHANGED_AREA 1 +#define abs(a) ((a) > 0 ? (a) : -(a)) + +/* changed area is box around all points */ +static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("polypoint start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyPoint(dst, pGC, mode, npt, pptInit); + + if (npt > 0) { +#if ROOTLESS_CHANGED_AREA==0 + // box per point + BoxRec box; + + while (npt) { + box.x1 = pptInit->x; + box.y1 = pptInit->y; + box.x2 = box.x1 + 1; + box.y2 = box.y1 + 1; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + npt--; + pptInit++; + } + +#elif ROOTLESS_CHANGED_AREA==1 + // one big box + BoxRec box; + + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) + box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) + box.x2 = pptInit->x; + if(box.y1 > pptInit->y) + box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) + box.y2 = pptInit->y; + } + + box.x2++; + box.y2++; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + +#elif ROOTLESS_CHANGED_AREA==2 + // clever(?) method: accumulate point in 20-pixel radius + BoxRec box; + int firstx, firsty; + + box.x2 = box.x1 = firstx = pptInit->x; + box.y2 = box.y1 = firsty = pptInit->y; + while(--npt) { + pptInit++; + if (abs(pptInit->x - firstx) > 20 || + abs(pptInit->y - firsty) > 20) { + box.x2++; + box.y2++; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + box.x2 = box.x1 = firstx = pptInit->x; + box.y2 = box.y1 = firsty = pptInit->y; + } else { + if (box.x1 > pptInit->x) box.x1 = pptInit->x; + else if (box.x2 < pptInit->x) box.x2 = pptInit->x; + if (box.y1 > pptInit->y) box.y1 = pptInit->y; + else if (box.y2 < pptInit->y) box.y2 = pptInit->y; + } + } + box.x2++; + box.y2++; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); +#endif /* ROOTLESS_CHANGED_AREA */ + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polypoint end\n"); +} + +#undef ROOTLESS_CHANGED_AREA + +/* changed area is box around each line */ +static void RootlessPolylines(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly lines start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->Polylines(dst, pGC, mode, npt, pptInit); + + if (npt > 0) { + BoxRec box; + int extra = pGC->lineWidth >> 1; + + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + + if(npt > 1) { + if(pGC->joinStyle == JoinMiter) + extra = 6 * pGC->lineWidth; + else if(pGC->capStyle == CapProjecting) + extra = pGC->lineWidth; + } + + if(mode == CoordModePrevious) { + int x = box.x1; + int y = box.y1; + + while(--npt) { + pptInit++; + x += pptInit->x; + y += pptInit->y; + if(box.x1 > x) + box.x1 = x; + else if(box.x2 < x) + box.x2 = x; + if(box.y1 > y) + box.y1 = y; + else if(box.y2 < y) + box.y2 = y; + } + } else { + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) + box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) + box.x2 = pptInit->x; + if(box.y1 > pptInit->y) + box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) + box.y2 = pptInit->y; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly lines end\n"); +} + +/* changed area is box around each line segment */ +static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, + int nseg, xSegment *pSeg) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly segment start (win 0x%x)", dst); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolySegment(dst, pGC, nseg, pSeg); + + if (nseg > 0) { + BoxRec box; + int extra = pGC->lineWidth; + + if(pGC->capStyle != CapProjecting) + extra >>= 1; + + if(pSeg->x2 > pSeg->x1) { + box.x1 = pSeg->x1; + box.x2 = pSeg->x2; + } else { + box.x2 = pSeg->x1; + box.x1 = pSeg->x2; + } + + if(pSeg->y2 > pSeg->y1) { + box.y1 = pSeg->y1; + box.y2 = pSeg->y2; + } else { + box.y2 = pSeg->y1; + box.y1 = pSeg->y2; + } + + while(--nseg) { + pSeg++; + if(pSeg->x2 > pSeg->x1) { + if(pSeg->x1 < box.x1) box.x1 = pSeg->x1; + if(pSeg->x2 > box.x2) box.x2 = pSeg->x2; + } else { + if(pSeg->x2 < box.x1) box.x1 = pSeg->x2; + if(pSeg->x1 > box.x2) box.x2 = pSeg->x1; + } + if(pSeg->y2 > pSeg->y1) { + if(pSeg->y1 < box.y1) box.y1 = pSeg->y1; + if(pSeg->y2 > box.y2) box.y2 = pSeg->y2; + } else { + if(pSeg->y2 < box.y1) box.y1 = pSeg->y2; + if(pSeg->y1 > box.y2) box.y2 = pSeg->y1; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly segment end\n"); +} + +/* changed area is box around each line (not entire rects) */ +static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, + int nRects, xRectangle *pRects) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly rectangle start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyRectangle(dst, pGC, nRects, pRects); + + if (nRects > 0) { + BoxRec box; + int offset1, offset2, offset3; + + offset2 = pGC->lineWidth; + if(!offset2) offset2 = 1; + offset1 = offset2 >> 1; + offset3 = offset2 - offset1; + + while(nRects--) { + box.x1 = pRects->x - offset1; + box.y1 = pRects->y - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x + pRects->width - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + pRects->height - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + pRects++; + } + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly rectangle end\n"); +} + + +/* changed area is box around each arc (assumes all arcs are 360 degrees) */ +static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly arc start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyArc(dst, pGC, narcs, parcs); + + if (narcs > 0) { + int extra = pGC->lineWidth >> 1; + BoxRec box; + + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + while(--narcs) { + parcs++; + if(box.x1 > parcs->x) + box.x1 = parcs->x; + if(box.x2 < (parcs->x + parcs->width)) + box.x2 = parcs->x + parcs->width; + if(box.y1 > parcs->y) + box.y1 = parcs->y; + if(box.y2 < (parcs->y + parcs->height)) + box.y2 = parcs->y + parcs->height; + } + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + box.x2++; + box.y2++; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly arc end\n"); +} + + +/* changed area is box around each poly */ +static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, + int shape, int mode, int count, + DDXPointPtr pptInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("fill poly start (win 0x%x, fillStyle 0x%x)", dst, + pGC->fillStyle); + + if (count <= 2) { + pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); + } else { + DDXPointPtr ppt = pptInit; + int i = count; + BoxRec box; + + box.x2 = box.x1 = ppt->x; + box.y2 = box.y1 = ppt->y; + + if(mode != CoordModeOrigin) { + int x = box.x1; + int y = box.y1; + + while(--i) { + ppt++; + x += ppt->x; + y += ppt->y; + if(box.x1 > x) + box.x1 = x; + else if(box.x2 < x) + box.x2 = x; + if(box.y1 > y) + box.y1 = y; + else if(box.y2 < y) + box.y2 = y; + } + } else { + while(--i) { + ppt++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + else if(box.x2 < ppt->x) + box.x2 = ppt->x; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + } + + box.x2++; + box.y2++; + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill poly end\n"); +} + +/* changed area is the rects */ +static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, + int nRectsInit, xRectangle *pRectsInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("fill rect start (win 0x%x, fillStyle 0x%x)", dst, + pGC->fillStyle); + + if (nRectsInit <= 0) { + pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); + } else { + BoxRec box; + xRectangle *pRects = pRectsInit; + int nRects = nRectsInit; + + box.x1 = pRects->x; + box.x2 = box.x1 + pRects->width; + box.y1 = pRects->y; + box.y2 = box.y1 + pRects->height; + + while(--nRects) { + pRects++; + if(box.x1 > pRects->x) + box.x1 = pRects->x; + if(box.x2 < (pRects->x + pRects->width)) + box.x2 = pRects->x + pRects->width; + if(box.y1 > pRects->y) + box.y1 = pRects->y; + if(box.y2 < (pRects->y + pRects->height)) + box.y2 = pRects->y + pRects->height; + } + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill rect end\n"); +} + + +/* changed area is box around each arc (assuming arcs are all 360 degrees) */ +static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC, + int narcs, xArc *parcs) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("fill arc start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyFillArc(dst, pGC, narcs, parcs); + + if (narcs > 0) { + BoxRec box; + + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + while(--narcs) { + parcs++; + if(box.x1 > parcs->x) + box.x1 = parcs->x; + if(box.x2 < (parcs->x + parcs->width)) + box.x2 = parcs->x + parcs->width; + if(box.y1 > parcs->y) + box.y1 = parcs->y; + if(box.y2 < (parcs->y + parcs->height)) + box.y2 = parcs->y + parcs->height; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill arc end\n"); +} + + +static void RootlessImageText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imagetext8 start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->ImageText8(dst, pGC, x, y, count, chars); + + if (count > 0) { + int top, bot, Min, Max; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = dst->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imagetext8 end\n"); +} + +static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) +{ + int width; // the result, sorta + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polytext8 start "); + + RootlessStartDrawing((WindowPtr) dst); + width = pGC->ops->PolyText8(dst, pGC, x, y, count, chars); + width -= x; + + if(width > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polytext8 end\n"); + return (width + x); +} + +static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imagetext16 start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->ImageText16(dst, pGC, x, y, count, chars); + + if (count > 0) { + int top, bot, Min, Max; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = dst->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imagetext16 end\n"); +} + +static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) +{ + int width; // the result, sorta + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polytext16 start "); + + RootlessStartDrawing((WindowPtr) dst); + width = pGC->ops->PolyText16(dst, pGC, x, y, count, chars); + width -= x; + + if (width > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polytext16 end\n"); + return width + x; +} + +static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer unused) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imageglyph start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->ImageGlyphBlt(dst, pGC, x, y, nglyph, ppci, unused); + + if (nglyph > 0) { + int top, bot, width = 0; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + box.x1 = ppci[0]->metrics.leftSideBearing; + if(box.x1 > 0) box.x1 = 0; + box.x2 = ppci[nglyph - 1]->metrics.rightSideBearing - + ppci[nglyph - 1]->metrics.characterWidth; + if(box.x2 < 0) box.x2 = 0; + + box.x2 += dst->x + x; + box.x1 += dst->x + x; + + while(nglyph--) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) + box.x2 += width; + else + box.x1 += width; + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imageglyph end\n"); +} + +static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polyglyph start "); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyGlyphBlt(dst, pGC, x, y, nglyph, ppci, pglyphBase); + + if (nglyph > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + ppci[0]->metrics.leftSideBearing; + box.x2 = dst->x + x + ppci[nglyph - 1]->metrics.rightSideBearing; + + if(nglyph > 1) { + int width = 0; + + while(--nglyph) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polyglyph end\n"); +} + + +/* changed area is in dest */ +static void +RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, + int dx, int dy, int xOrg, int yOrg) +{ + BoxRec box; + GCOP_UNWRAP(pGC); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PushPixels(pGC, pBitMap, dst, dx, dy, xOrg, yOrg); + + box.x1 = xOrg + dst->x; + box.x2 = box.x1 + dx; + box.y1 = yOrg + dst->y; + box.y2 = box.y1 + dy; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("push pixels end\n"); +} Index: xc/programs/Xserver/hw/darwin/quartz/rootlessScreen.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessScreen.c:1.4 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessScreen.c Sun Feb 23 16:48:23 2003 @@ -0,0 +1,455 @@ +/* + * Screen routines for Mac OS X rootless X server + * + * Greg Parker gparker@cs.stanford.edu + * + * February 2001 Created + * March 3, 2001 Restructured as generic rootless mode + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessScreen.c,v 1.4 2003/02/23 21:48:23 torrey Exp $ */ + + +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "propertyst.h" +#include "mivalidate.h" +#include "picturestr.h" + +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include "rootlessCommon.h" +#include "rootlessWindow.h" + +extern int +RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind); +extern Bool +RootlessCreateGC(GCPtr pGC); + +// Initialize globals +int rootlessGCPrivateIndex = -1; +int rootlessScreenPrivateIndex = -1; +int rootlessWindowPrivateIndex = -1; + + +static Bool +RootlessCloseScreen(int i, ScreenPtr pScreen) +{ + RootlessScreenRec *s; + + s = SCREENREC(pScreen); + + // fixme unwrap everything that was wrapped? + pScreen->CloseScreen = s->CloseScreen; + + xfree(s); + return pScreen->CloseScreen(i, pScreen); +} + + +static void +RootlessGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, + unsigned int format, unsigned long planeMask, char *pdstLine) +{ + ScreenPtr pScreen = pDrawable->pScreen; + SCREEN_UNWRAP(pScreen, GetImage); + + if (pDrawable->type == DRAWABLE_WINDOW) { + int x0, y0, x1, y1; + RootlessWindowRec *winRec; + + // Many apps use GetImage to sync with the visible frame buffer + // FIXME: entire screen or just window or all screens? + RootlessRedisplayScreen(pScreen); + + // RedisplayScreen stops drawing, so we need to start it again + RootlessStartDrawing((WindowPtr)pDrawable); + + /* Check that we have some place to read from. */ + winRec = WINREC (TopLevelParent ((WindowPtr) pDrawable)); + if (winRec == NULL) + goto out; + + /* Clip to top-level window bounds. */ + /* FIXME: fbGetImage uses the width parameter to calculate the + stride of the destination pixmap. If w is clipped, the data + returned will be garbage, although we will not crash. */ + + x0 = pDrawable->x + sx; + y0 = pDrawable->y + sy; + x1 = x0 + w; + y1 = y0 + h; + + if (x0 < winRec->frame.x) + x0 = winRec->frame.x; + if (y0 < winRec->frame.y) + y0 = winRec->frame.y; + if (x1 > winRec->frame.x + winRec->frame.w) + x1 = winRec->frame.x + winRec->frame.w; + if (y1 > winRec->frame.y + winRec->frame.h) + y1 = winRec->frame.y + winRec->frame.h; + + sx = x0 - pDrawable->x; + sy = y0 - pDrawable->y; + w = x1 - x0; + h = y1 - y0; + + if (w <= 0 || h <= 0) + goto out; + } + + pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + +out: + SCREEN_WRAP(pScreen, GetImage); +} + + +/* + * RootlessSourceValidate + * CopyArea and CopyPlane use a GC tied to the destination drawable. + * StartDrawing/StopDrawing wrappers won't be called if source is + * a visible window but the destination isn't. So, we call StartDrawing + * here and leave StopDrawing for the block handler. + */ +static void +RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h) +{ + SCREEN_UNWRAP(pDrawable->pScreen, SourceValidate); + if (pDrawable->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr)pDrawable; + RootlessStartDrawing(pWin); + } + if (pDrawable->pScreen->SourceValidate) { + pDrawable->pScreen->SourceValidate(pDrawable, x, y, w, h); + } + SCREEN_WRAP(pDrawable->pScreen, SourceValidate); +} + +#ifdef RENDER + +static void +RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, + INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + WindowPtr srcWin, dstWin, maskWin = NULL; + + if (pMask) { // pMask can be NULL + maskWin = (pMask->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pMask->pDrawable : NULL; + } + srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pSrc->pDrawable : NULL; + dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pDst->pDrawable : NULL; + + // SCREEN_UNWRAP(ps, Composite); + ps->Composite = SCREENREC(pScreen)->Composite; + + if (srcWin && IsFramedWindow(srcWin)) RootlessStartDrawing(srcWin); + if (maskWin && IsFramedWindow(maskWin)) RootlessStartDrawing(maskWin); + if (dstWin && IsFramedWindow(dstWin)) RootlessStartDrawing(dstWin); + + ps->Composite(op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + + if (dstWin && IsFramedWindow(dstWin)) { + RootlessDamageRect(dstWin, xDst, yDst, width, height); + } + + ps->Composite = RootlessComposite; + // SCREEN_WRAP(ps, Composite); +} + + +static void +RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int nlist, GlyphListPtr list, GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + int x, y; + int n; + GlyphPtr glyph; + WindowPtr srcWin, dstWin; + + srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pSrc->pDrawable : NULL; + dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pDst->pDrawable : NULL; + + if (srcWin && IsFramedWindow(srcWin)) RootlessStartDrawing(srcWin); + if (dstWin && IsFramedWindow(dstWin)) RootlessStartDrawing(dstWin); + + //SCREEN_UNWRAP(ps, Glyphs); + ps->Glyphs = SCREENREC(pScreen)->Glyphs; + ps->Glyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + ps->Glyphs = RootlessGlyphs; + //SCREEN_WRAP(ps, Glyphs); + + if (dstWin && IsFramedWindow(dstWin)) { + x = xSrc; + y = ySrc; + while (nlist--) { + x += list->xOff; + y += list->yOff; + n = list->len; + while (n--) { + glyph = *glyphs++; + RootlessDamageRect(dstWin, + x - glyph->info.x, y - glyph->info.y, + glyph->info.width, glyph->info.height); + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; + } + } +} + +#endif // RENDER + + +// RootlessValidateTree +// ValidateTree is modified in two ways: +// * top-level windows don't clip each other +// * windows aren't clipped against root. +// These only matter when validating from the root. +static int +RootlessValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +{ + int result; + RegionRec saveRoot; + ScreenPtr pScreen = pParent->drawable.pScreen; + + SCREEN_UNWRAP(pScreen, ValidateTree); + RL_DEBUG_MSG("VALIDATETREE start "); + + // Use our custom version to validate from root + if (IsRoot(pParent)) { + RL_DEBUG_MSG("custom "); + result = RootlessMiValidateTree(pParent, pChild, kind); + } else { + HUGE_ROOT(pParent); + result = pScreen->ValidateTree(pParent, pChild, kind); + NORMAL_ROOT(pParent); + } + + SCREEN_WRAP(pScreen, ValidateTree); + RL_DEBUG_MSG("VALIDATETREE end\n"); + + return result; +} + + +// RootlessMarkOverlappedWindows +// MarkOverlappedWindows is modified to ignore overlapping +// top-level windows. +static Bool +RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, + WindowPtr *ppLayerWin) +{ + RegionRec saveRoot; + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + SCREEN_UNWRAP(pScreen, MarkOverlappedWindows); + RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS start "); + + HUGE_ROOT(pWin); + if (IsRoot(pWin)) { + // root - mark nothing + RL_DEBUG_MSG("is root not marking "); + result = FALSE; + } + else if (! IsTopLevel(pWin)) { + // not top-level window - mark normally + result = pScreen->MarkOverlappedWindows(pWin, pFirst, ppLayerWin); + } + else { + //top-level window - mark children ONLY - NO overlaps with sibs (?) + // This code copied from miMarkOverlappedWindows() + + register WindowPtr pChild; + Bool anyMarked = FALSE; + void (* MarkWindow)() = pScreen->MarkWindow; + + RL_DEBUG_MSG("is top level! "); + /* single layered systems are easy */ + if (ppLayerWin) *ppLayerWin = pWin; + + if (pWin == pFirst) { + /* Blindly mark pWin and all of its inferiors. This is a slight + * overkill if there are mapped windows that outside pWin's border, + * but it's better than wasting time on RectIn checks. + */ + pChild = pWin; + while (1) { + if (pChild->viewable) { + if (REGION_BROKEN (pScreen, &pChild->winSize)) + SetWinSize (pChild); + if (REGION_BROKEN (pScreen, &pChild->borderSize)) + SetBorderSize (pChild); + (* MarkWindow)(pChild); + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } + anyMarked = TRUE; + pFirst = pFirst->nextSib; + } + if (anyMarked) + (* MarkWindow)(pWin->parent); + result = anyMarked; + } + NORMAL_ROOT(pWin); + SCREEN_WRAP(pScreen, MarkOverlappedWindows); + RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS end\n"); + return result; +} + + +// Flush drawing before blocking on select(). +static void +RootlessBlockHandler(pointer pbdata, OSTimePtr pTimeout, pointer pReadmask) +{ + RootlessRedisplayScreen((ScreenPtr) pbdata); +} + + +static void +RootlessWakeupHandler(pointer data, int i, pointer LastSelectMask) +{ + // nothing here +} + + +static Bool +RootlessAllocatePrivates(ScreenPtr pScreen) +{ + RootlessScreenRec *s; + static unsigned long rootlessGeneration = 0; + + if (rootlessGeneration != serverGeneration) { + rootlessScreenPrivateIndex = AllocateScreenPrivateIndex(); + if (rootlessScreenPrivateIndex == -1) return FALSE; + rootlessGCPrivateIndex = AllocateGCPrivateIndex(); + if (rootlessGCPrivateIndex == -1) return FALSE; + rootlessWindowPrivateIndex = AllocateWindowPrivateIndex(); + if (rootlessWindowPrivateIndex == -1) return FALSE; + rootlessGeneration = serverGeneration; + } + + // no allocation needed for screen privates + if (!AllocateGCPrivate(pScreen, rootlessGCPrivateIndex, + sizeof(RootlessGCRec))) + return FALSE; + if (!AllocateWindowPrivate(pScreen, rootlessWindowPrivateIndex, 0)) + return FALSE; + + s = xalloc(sizeof(RootlessScreenRec)); + if (! s) return FALSE; + SCREENREC(pScreen) = s; + + return TRUE; +} + + +static void +RootlessWrap(ScreenPtr pScreen) +{ + RootlessScreenRec *s = (RootlessScreenRec*) + pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; + +#define WRAP(a) \ + if (pScreen->a) { \ + s->a = pScreen->a; \ + } else { \ + RL_DEBUG_MSG("null screen fn " #a "\n"); \ + s->a = NULL; \ + } \ + pScreen->a = Rootless##a + + WRAP(CloseScreen); + WRAP(CreateGC); + WRAP(PaintWindowBackground); + WRAP(PaintWindowBorder); + WRAP(CopyWindow); + WRAP(GetImage); + WRAP(SourceValidate); + WRAP(CreateWindow); + WRAP(DestroyWindow); + WRAP(RealizeWindow); + WRAP(UnrealizeWindow); + WRAP(MoveWindow); + WRAP(PositionWindow); + WRAP(ResizeWindow); + WRAP(RestackWindow); + WRAP(ChangeBorderWidth); + WRAP(MarkOverlappedWindows); + WRAP(ValidateTree); + WRAP(ChangeWindowAttributes); + +#ifdef SHAPE + WRAP(SetShape); +#endif + +#ifdef RENDER + { + // Composite and Glyphs don't use normal screen wrapping + PictureScreenPtr ps = GetPictureScreen(pScreen); + s->Composite = ps->Composite; + ps->Composite = RootlessComposite; + s->Glyphs = ps->Glyphs; + ps->Glyphs = RootlessGlyphs; + } +#endif + + // WRAP(ClearToBackground); fixme put this back? useful for shaped wins? + // WRAP(RestoreAreas); fixme put this back? + +#undef WRAP +} + + +/* + * RootlessInit + * Rootless wraps lots of stuff and needs a bunch of devPrivates. + */ +Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcs *procs) +{ + RootlessScreenRec *s; + + if (! RootlessAllocatePrivates(pScreen)) return FALSE; + s = (RootlessScreenRec*) + pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; + + s->pScreen = pScreen; + s->frameProcs = *procs; + + RootlessWrap(pScreen); + + if (!RegisterBlockAndWakeupHandlers (RootlessBlockHandler, + RootlessWakeupHandler, + (pointer) pScreen)) + { + return FALSE; + } + + return TRUE; +} Index: xc/programs/Xserver/hw/darwin/quartz/rootlessValTree.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessValTree.c:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessValTree.c Tue Jun 18 15:43:04 2002 @@ -0,0 +1,640 @@ +/* + * Calculate window clip lists for rootless mode + * + * This file is very closely based on mivaltree.c. + */ + /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessValTree.c,v 1.2 2002/06/18 19:43:04 torrey Exp $ */ + +/* + * mivaltree.c -- + * Functions for recalculating window clip lists. Main function + * is miValidateTree. + * + +Copyright 1987, 1988, 1989, 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. + + * + * Copyright 1987, 1988, 1989 by + * Digital Equipment Corporation, Maynard, Massachusetts, + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * 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 Digital not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * DIGITAL 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. + * + ******************************************************************/ + +/* 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. * +* * +*****************************************************************/ + + /* + * Aug '86: Susan Angebranndt -- original code + * July '87: Adam de Boor -- substantially modified and commented + * Summer '89: Joel McCormack -- so fast you wouldn't believe it possible. + * In particular, much improved code for window mapping and + * circulating. + * Bob Scheifler -- avoid miComputeClips for unmapped windows, + * valdata changes + */ +#include "X.h" +#include "scrnintstr.h" +#include "validate.h" +#include "windowstr.h" +#include "mi.h" +#include "regionstr.h" +#include "mivalidate.h" + +#include "globals.h" + +#ifdef SHAPE +/* + * Compute the visibility of a shaped window + */ +int +RootlessShapedWindowIn (pScreen, universe, bounding, rect, x, y) + ScreenPtr pScreen; + RegionPtr universe, bounding; + BoxPtr rect; + register int x, y; +{ + BoxRec box; + register BoxPtr boundBox; + int nbox; + Bool someIn, someOut; + register int t, x1, y1, x2, y2; + + nbox = REGION_NUM_RECTS (bounding); + boundBox = REGION_RECTS (bounding); + someIn = someOut = FALSE; + x1 = rect->x1; + y1 = rect->y1; + x2 = rect->x2; + y2 = rect->y2; + while (nbox--) + { + if ((t = boundBox->x1 + x) < x1) + t = x1; + box.x1 = t; + if ((t = boundBox->y1 + y) < y1) + t = y1; + box.y1 = t; + if ((t = boundBox->x2 + x) > x2) + t = x2; + box.x2 = t; + if ((t = boundBox->y2 + y) > y2) + t = y2; + box.y2 = t; + if (box.x1 > box.x2) + box.x2 = box.x1; + if (box.y1 > box.y2) + box.y2 = box.y1; + switch (RECT_IN_REGION(pScreen, universe, &box)) + { + case rgnIN: + if (someOut) + return rgnPART; + someIn = TRUE; + break; + case rgnOUT: + if (someIn) + return rgnPART; + someOut = TRUE; + break; + default: + return rgnPART; + } + boundBox++; + } + if (someIn) + return rgnIN; + return rgnOUT; +} +#endif + +#define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ + HasBorder(w) && \ + (w)->backgroundState == ParentRelative) + + +/* + *----------------------------------------------------------------------- + * RootlessComputeClips -- + * Recompute the clipList, borderClip, exposed and borderExposed + * regions for pParent and its children. Only viewable windows are + * taken into account. + * + * Results: + * None. + * + * Side Effects: + * clipList, borderClip, exposed and borderExposed are altered. + * A VisibilityNotify event may be generated on the parent window. + * + *----------------------------------------------------------------------- + */ +static void +RootlessComputeClips (pParent, pScreen, universe, kind, exposed) + register WindowPtr pParent; + register ScreenPtr pScreen; + register RegionPtr universe; + VTKind kind; + RegionPtr exposed; /* for intermediate calculations */ +{ + int dx, + dy; + RegionRec childUniverse; + register WindowPtr pChild; + int oldVis, newVis; + BoxRec borderSize; + RegionRec childUnion; + Bool overlap; + RegionPtr borderVisible; + Bool resized; + /* + * Figure out the new visibility of this window. + * The extent of the universe should be the same as the extent of + * the borderSize region. If the window is unobscured, this rectangle + * will be completely inside the universe (the universe will cover it + * completely). If the window is completely obscured, none of the + * universe will cover the rectangle. + */ + borderSize.x1 = pParent->drawable.x - wBorderWidth(pParent); + borderSize.y1 = pParent->drawable.y - wBorderWidth(pParent); + dx = (int) pParent->drawable.x + (int) pParent->drawable.width + wBorderWidth(pParent); + if (dx > 32767) + dx = 32767; + borderSize.x2 = dx; + dy = (int) pParent->drawable.y + (int) pParent->drawable.height + wBorderWidth(pParent); + if (dy > 32767) + dy = 32767; + borderSize.y2 = dy; + + oldVis = pParent->visibility; + switch (RECT_IN_REGION( pScreen, universe, &borderSize)) + { + case rgnIN: + newVis = VisibilityUnobscured; + break; + case rgnPART: + newVis = VisibilityPartiallyObscured; +#ifdef SHAPE + { + RegionPtr pBounding; + + if ((pBounding = wBoundingShape (pParent))) + { + switch (RootlessShapedWindowIn (pScreen, universe, + pBounding, &borderSize, + pParent->drawable.x, + pParent->drawable.y)) + { + case rgnIN: + newVis = VisibilityUnobscured; + break; + case rgnOUT: + newVis = VisibilityFullyObscured; + break; + } + } + } +#endif + break; + default: + newVis = VisibilityFullyObscured; + break; + } + + pParent->visibility = newVis; + if (oldVis != newVis && + ((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) + SendVisibilityNotify(pParent); + + dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; + dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; + + /* + * avoid computations when dealing with simple operations + */ + + switch (kind) { + case VTMap: + case VTStack: + case VTUnmap: + break; + case VTMove: + if ((oldVis == newVis) && + ((oldVis == VisibilityFullyObscured) || + (oldVis == VisibilityUnobscured))) + { + pChild = pParent; + while (1) + { + if (pChild->viewable) + { + if (pChild->visibility != VisibilityFullyObscured) + { + REGION_TRANSLATE( pScreen, &pChild->borderClip, + dx, dy); + REGION_TRANSLATE( pScreen, &pChild->clipList, + dx, dy); + pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pChild, dx, dy); + + } + if (pChild->valdata) + { + REGION_INIT(pScreen, + &pChild->valdata->after.borderExposed, + NullBox, 0); + if (HasParentRelativeBorder(pChild)) + { + REGION_SUBTRACT(pScreen, + &pChild->valdata->after.borderExposed, + &pChild->borderClip, + &pChild->winSize); + } + REGION_INIT( pScreen, &pChild->valdata->after.exposed, + NullBox, 0); + } + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pParent)) + pChild = pChild->parent; + if (pChild == pParent) + break; + pChild = pChild->nextSib; + } + return; + } + /* fall through */ + default: + /* + * To calculate exposures correctly, we have to translate the old + * borderClip and clipList regions to the window's new location so there + * is a correspondence between pieces of the new and old clipping regions. + */ + if (dx || dy) + { + /* + * We translate the old clipList because that will be exposed or copied + * if gravity is right. + */ + REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy); + REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy); + } + break; + case VTBroken: + REGION_EMPTY (pScreen, &pParent->borderClip); + REGION_EMPTY (pScreen, &pParent->clipList); + break; + } + + borderVisible = pParent->valdata->before.borderVisible; + resized = pParent->valdata->before.resized; + REGION_INIT( pScreen, &pParent->valdata->after.borderExposed, NullBox, 0); + REGION_INIT( pScreen, &pParent->valdata->after.exposed, NullBox, 0); + + /* + * Since the borderClip must not be clipped by the children, we do + * the border exposure first... + * + * 'universe' is the window's borderClip. To figure the exposures, remove + * the area that used to be exposed from the new. + * This leaves a region of pieces that weren't exposed before. + */ + + if (HasBorder (pParent)) + { + if (borderVisible) + { + /* + * when the border changes shape, the old visible portions + * of the border will be saved by DIX in borderVisible -- + * use that region and destroy it + */ + REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); + REGION_DESTROY( pScreen, borderVisible); + } + else + { + REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip); + } + if (HasParentRelativeBorder(pParent) && (dx || dy)) { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + universe, + &pParent->winSize); + } else { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + exposed, &pParent->winSize); + } + + REGION_COPY( pScreen, &pParent->borderClip, universe); + + /* + * To get the right clipList for the parent, and to make doubly sure + * that no child overlaps the parent's border, we remove the parent's + * border from the universe before proceeding. + */ + + REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); + } + else + REGION_COPY( pScreen, &pParent->borderClip, universe); + + if ((pChild = pParent->firstChild) && pParent->mapped) + { + REGION_INIT(pScreen, &childUniverse, NullBox, 0); + REGION_INIT(pScreen, &childUnion, NullBox, 0); + if ((pChild->drawable.y < pParent->lastChild->drawable.y) || + ((pChild->drawable.y == pParent->lastChild->drawable.y) && + (pChild->drawable.x < pParent->lastChild->drawable.x))) + { + for (; pChild; pChild = pChild->nextSib) + { + if (pChild->viewable) + REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + } + } + else + { + for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) + { + if (pChild->viewable) + REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + } + } + REGION_VALIDATE( pScreen, &childUnion, &overlap); + + for (pChild = pParent->firstChild; + pChild; + pChild = pChild->nextSib) + { + if (pChild->viewable) { + /* + * If the child is viewable, we want to remove its extents + * from the current universe, but we only re-clip it if + * it's been marked. + */ + if (pChild->valdata) { + /* + * Figure out the new universe from the child's + * perspective and recurse. + */ + REGION_INTERSECT( pScreen, &childUniverse, + universe, + &pChild->borderSize); + RootlessComputeClips (pChild, pScreen, &childUniverse, + kind, exposed); + } + /* + * Once the child has been processed, we remove its extents + * from the current universe, thus denying its space to any + * other sibling. + */ + if (overlap) + REGION_SUBTRACT( pScreen, universe, universe, + &pChild->borderSize); + } + } + if (!overlap) + REGION_SUBTRACT( pScreen, universe, universe, &childUnion); + REGION_UNINIT( pScreen, &childUnion); + REGION_UNINIT( pScreen, &childUniverse); + } /* if any children */ + + /* + * 'universe' now contains the new clipList for the parent window. + * + * To figure the exposure of the window we subtract the old clip from the + * new, just as for the border. + */ + + if (oldVis == VisibilityFullyObscured || + oldVis == VisibilityNotViewable) + { + REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe); + } + else if (newVis != VisibilityFullyObscured && + newVis != VisibilityNotViewable) + { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + universe, &pParent->clipList); + } + + /* + * One last thing: backing storage. We have to try to save what parts of + * the window are about to be obscured. We can just subtract the universe + * from the old clipList and get the areas that were in the old but aren't + * in the new and, hence, are about to be obscured. + */ + if (pParent->backStorage && !resized) + { + REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe); + (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy); + } + + /* HACK ALERT - copying contents of regions, instead of regions */ + { + RegionRec tmp; + + tmp = pParent->clipList; + pParent->clipList = *universe; + *universe = tmp; + } + +#ifdef NOTDEF + REGION_COPY( pScreen, &pParent->clipList, universe); +#endif + + pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; + + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pParent, dx, dy); +} + +static void +RootlessTreeObscured(pParent) + register WindowPtr pParent; +{ + register WindowPtr pChild; + register int oldVis; + + pChild = pParent; + while (1) + { + if (pChild->viewable) + { + oldVis = pChild->visibility; + if (oldVis != (pChild->visibility = VisibilityFullyObscured) && + ((pChild->eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) + SendVisibilityNotify(pChild); + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pParent)) + pChild = pChild->parent; + if (pChild == pParent) + break; + pChild = pChild->nextSib; + } +} + +/* + *----------------------------------------------------------------------- + * RootlessMiValidateTree -- + * Recomputes the clip list for pParent and all its inferiors. + * + * Results: + * Always returns 1. + * + * Side Effects: + * The clipList, borderClip, exposed, and borderExposed regions for + * each marked window are altered. + * + * Notes: + * This routine assumes that all affected windows have been marked + * (valdata created) and their winSize and borderSize regions + * adjusted to correspond to their new positions. The borderClip and + * clipList regions should not have been touched. + * + * The top-most level is treated differently from all lower levels + * because pParent is unchanged. For the top level, we merge the + * regions taken up by the marked children back into the clipList + * for pParent, thus forming a region from which the marked children + * can claim their areas. For lower levels, where the old clipList + * and borderClip are invalid, we can't do this and have to do the + * extra operations done in miComputeClips, but this is much faster + * e.g. when only one child has moved... + * + *----------------------------------------------------------------------- + */ +/* + Quartz version: used for validate from root in rootless mode. + We need to make sure top-level windows don't clip each other, + and that top-level windows aren't clipped to the root window. +*/ +/*ARGSUSED*/ +// fixme this is ugly +// Xprint/ValTree.c doesn't work, but maybe that method can? +int +RootlessMiValidateTree (pRoot, pChild, kind) + WindowPtr pRoot; /* Parent to validate */ + WindowPtr pChild; /* First child of pRoot that was + * affected */ + VTKind kind; /* What kind of configuration caused call */ +{ + RegionRec childClip; /* The new borderClip for the current + * child */ + RegionRec exposed; /* For intermediate calculations */ + register ScreenPtr pScreen; + register WindowPtr pWin; + + pScreen = pRoot->drawable.pScreen; + if (pChild == NullWindow) + pChild = pRoot->firstChild; + + REGION_INIT(pScreen, &childClip, NullBox, 0); + REGION_INIT(pScreen, &exposed, NullBox, 0); + + if (REGION_BROKEN (pScreen, &pRoot->clipList) && + !REGION_BROKEN (pScreen, &pRoot->borderClip)) + { + // fixme this might not work, but hopefully doesn't happen anyway. + kind = VTBroken; + REGION_EMPTY (pScreen, &pRoot->clipList); + ErrorF("ValidateTree: BUSTED!\n"); + } + + /* + * Recursively compute the clips for all children of the root. + * They don't clip against each other or the root itself, so + * childClip is always reset to that child's size. + */ + + for (pWin = pChild; + pWin != NullWindow; + pWin = pWin->nextSib) + { + if (pWin->viewable) { + if (pWin->valdata) { + REGION_COPY( pScreen, &childClip, &pWin->borderSize); + RootlessComputeClips (pWin, pScreen, &childClip, kind, &exposed); + } else if (pWin->visibility == VisibilityNotViewable) { + RootlessTreeObscured(pWin); + } + } else { + if (pWin->valdata) { + REGION_EMPTY( pScreen, &pWin->clipList); + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pWin, 0, 0); + REGION_EMPTY( pScreen, &pWin->borderClip); + pWin->valdata = (ValidatePtr)NULL; + } + } + } + + REGION_UNINIT( pScreen, &childClip); + + /* The root is never clipped by its children, so nothing on the root + is ever exposed by moving or mapping its children. */ + REGION_INIT( pScreen, &pRoot->valdata->after.exposed, NullBox, 0); + REGION_INIT( pScreen, &pRoot->valdata->after.borderExposed, NullBox, 0); + + return 1; +} Index: xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.c:1.13 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.c Tue Jan 28 20:11:05 2003 @@ -0,0 +1,842 @@ +/* + * Rootless window management + */ +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * Copyright (c) 2002 Torrey T. Lyons. 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 + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright + * holders 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/darwin/quartz/rootlessWindow.c,v 1.13 2003/01/29 01:11:05 torrey Exp $ */ + +#include "rootlessCommon.h" +#include "rootlessWindow.h" + +#include "fb.h" + + +/* + * RootlessFrameForWindow + * Returns the rootless frame for the given window, or + * NULL if the the window is not inside a frame. + * Unrealized windows never have a frame. + */ +RootlessFramePtr +RootlessFrameForWindow(WindowPtr pWin) +{ + WindowPtr top = TopLevelParent(pWin); + RootlessWindowRec *winRec; + + if (!top) return NULL; + winRec = WINREC(top); + if (!winRec) return NULL; + return &winRec->frame; +} + + +// RootlessCreateWindow +// For now, don't create a frame until the window is realized. +// Do reset the window size so it's not clipped by the root window. +Bool +RootlessCreateWindow(WindowPtr pWin) +{ + Bool result; + RegionRec saveRoot; + + WINREC(pWin) = NULL; + SCREEN_UNWRAP(pWin->drawable.pScreen, CreateWindow); + if (!IsRoot(pWin)) { + // win/border size set by DIX, not by wrapped CreateWindow, so + // correct it here. + // Don't HUGE_ROOT when pWin is the root! + HUGE_ROOT(pWin); + SetWinSize(pWin); + SetBorderSize(pWin); + } + result = pWin->drawable.pScreen->CreateWindow(pWin); + if (pWin->parent) { + NORMAL_ROOT(pWin); + } + SCREEN_WRAP(pWin->drawable.pScreen, CreateWindow); + return result; +} + + +// RootlessDestroyWindow +// For now, all window destruction takes place in UnrealizeWindow +Bool +RootlessDestroyWindow(WindowPtr pWin) +{ + Bool result; + + SCREEN_UNWRAP(pWin->drawable.pScreen, DestroyWindow); + result = pWin->drawable.pScreen->DestroyWindow(pWin); + SCREEN_WRAP(pWin->drawable.pScreen, DestroyWindow); + return result; +} + + +#ifdef SHAPE + +// RootlessSetShape +// Shape is usually set before the window is mapped, but (for now) we +// don't keep track of frames before they're mapped. So we just record +// that the shape needs to updated later. +void +RootlessSetShape(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + RootlessDamageShape(pWin); + SCREEN_UNWRAP(pScreen, SetShape); + pScreen->SetShape(pWin); + SCREEN_WRAP(pScreen, SetShape); +} + +#endif // SHAPE + + +// Disallow ParentRelative background on top-level windows +// because the root window doesn't really have the right background +// and fb will try to draw on the root instead of on the window. +// ParentRelative prevention is also in PaintWindowBackground/Border() +// so it is no longer really needed here. +Bool +RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask) +{ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("change window attributes start "); + + SCREEN_UNWRAP(pScreen, ChangeWindowAttributes); + result = pScreen->ChangeWindowAttributes(pWin, vmask); + SCREEN_WRAP(pScreen, ChangeWindowAttributes); + + if (WINREC(pWin)) { + // disallow ParentRelative background state + if (pWin->backgroundState == ParentRelative) { + XID pixel = 0; + ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); + } + } + + RL_DEBUG_MSG("change window attributes end\n"); + return result; +} + + +/* RootlessPositionWindow + * This is a hook for when DIX moves or resizes a window. + * Update the frame position now. (x, y) are *inside* position. + * After this, mi and fb are expecting the pixmap to be at the new location. + */ +Bool +RootlessPositionWindow(WindowPtr pWin, int x, int y) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + Bool result; + + RL_DEBUG_MSG("positionwindow start (win 0x%x)\n", pWin); + + if (winRec) { + if (winRec->drawing) { + // Reset frame's pixmap and move it to the new position. + int bw = wBorderWidth(pWin); + + winRec->pixmap->devPrivate.ptr = winRec->frame.pixelData; + SetPixmapBaseToScreen(winRec->pixmap, x - bw, y - bw); + + // Move damaged region to correspond to new window position + if (REGION_NOTEMPTY(pScreen, &winRec->damage)) { + REGION_TRANSLATE(pScreen, &winRec->damage, + x - bw - winRec->frame.x, + y - bw - winRec->frame.y); + } + } + } + + SCREEN_UNWRAP(pScreen, PositionWindow); + result = pScreen->PositionWindow(pWin, x, y); + SCREEN_WRAP(pScreen, PositionWindow); + + RL_DEBUG_MSG("positionwindow end\n"); + return result; +} + + +// RootlessRealizeWindow +// The frame is created here and not in CreateWindow so that windows do +// not eat memory until they are realized. +Bool +RootlessRealizeWindow(WindowPtr pWin) +{ + Bool result = FALSE; + RegionRec saveRoot; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("realizewindow start (win 0x%x) ", pWin); + + if (IsTopLevel(pWin) || IsRoot(pWin)) { + DrawablePtr d = &pWin->drawable; + RootlessWindowRec *winRec = xalloc(sizeof(RootlessWindowRec)); + int bw = wBorderWidth(pWin); + + RL_DEBUG_MSG("Top level window "); + if (! winRec) goto windowcreatebad; + + winRec->frame.isRoot = (pWin == WindowTable[pScreen->myNum]); + winRec->frame.x = d->x - bw; + winRec->frame.y = d->y - bw; + winRec->frame.w = d->width + 2*bw; + winRec->frame.h = d->height + 2*bw; + winRec->frame.win = pWin; + winRec->frame.devPrivate = NULL; + + REGION_INIT(pScreen, &winRec->damage, NullBox, 0); + winRec->borderWidth = bw; + winRec->drawing = FALSE; + + winRec->pixmap = NULL; + + WINREC(pWin) = winRec; + + RL_DEBUG_MSG("creating frame "); + CallFrameProc(pScreen, CreateFrame, + (pScreen, &WINREC(pWin)->frame, + pWin->prevSib ? &WINREC(pWin->prevSib)->frame : NULL)); + if (!winRec->frame.devPrivate) goto windowcreatebad; + + // Disallow ParentRelative background state on top-level windows. + // This might have been set before the window was mapped. + if (pWin->backgroundState == ParentRelative) { + XID pixel = 0; + ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); + } + +#ifdef SHAPE + // Shape is usually set before the window is mapped, but + // (for now) we don't keep track of frames before they're mapped. + winRec->shapeDamage = TRUE; +#endif + } + + if (!IsRoot(pWin)) HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, RealizeWindow); + result = pScreen->RealizeWindow(pWin); + SCREEN_WRAP(pScreen, RealizeWindow); + if (!IsRoot(pWin)) NORMAL_ROOT(pWin); + + RL_DEBUG_MSG("realizewindow end\n"); + return result; + +windowcreatebad: + RL_DEBUG_MSG("window create bad! "); + RL_DEBUG_MSG("realizewindow end\n"); + return NULL; +} + + +Bool +RootlessUnrealizeWindow(WindowPtr pWin) +{ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("unrealizewindow start "); + + if (IsTopLevel(pWin) || IsRoot(pWin)) { + RootlessWindowRec *winRec = WINREC(pWin); + + RootlessRedisplay(pWin); + CallFrameProc(pScreen, DestroyFrame, (pScreen, &winRec->frame)); + + REGION_UNINIT(pScreen, &winRec->damage); + + xfree(winRec); + WINREC(pWin) = NULL; + } + + SCREEN_UNWRAP(pScreen, UnrealizeWindow); + result = pScreen->UnrealizeWindow(pWin); + SCREEN_WRAP(pScreen, UnrealizeWindow); + RL_DEBUG_MSG("unrealizewindow end\n"); + return result; +} + + +void +RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) +{ + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("restackwindow start "); + if (winRec) RL_DEBUG_MSG("restack top level \n"); + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, RestackWindow); + if (pScreen->RestackWindow) pScreen->RestackWindow(pWin, pOldNextSib); + SCREEN_WRAP(pScreen, RestackWindow); + NORMAL_ROOT(pWin); + + if (winRec) { + // fixme simplify the following + + WindowPtr oldNextW, newNextW, oldPrevW, newPrevW; + RootlessFramePtr oldNext, newNext, oldPrev, newPrev; + + oldNextW = pOldNextSib; + while (oldNextW && ! WINREC(oldNextW)) oldNextW = oldNextW->nextSib; + oldNext = oldNextW ? &WINREC(oldNextW)->frame : NULL; + + newNextW = pWin->nextSib; + while (newNextW && ! WINREC(newNextW)) newNextW = newNextW->nextSib; + newNext = newNextW ? &WINREC(newNextW)->frame : NULL; + + oldPrevW= pOldNextSib ? pOldNextSib->prevSib : pWin->parent->lastChild; + while (oldPrevW && ! WINREC(oldPrevW)) oldPrevW = oldPrevW->prevSib; + oldPrev = oldPrevW ? &WINREC(oldPrevW)->frame : NULL; + + newPrevW = pWin->prevSib; + while (newPrevW && ! WINREC(newPrevW)) newPrevW = newPrevW->prevSib; + newPrev = newPrevW ? &WINREC(newPrevW)->frame : NULL; + + if (pWin->prevSib) { + WindowPtr w = pWin->prevSib; + while (w) { + RL_DEBUG_MSG("w 0x%x\n", w); + w = w->parent; + } + } + + CallFrameProc(pScreen, RestackFrame, + (pScreen, &winRec->frame, oldPrev, newPrev)); + } + + RL_DEBUG_MSG("restackwindow end\n"); +} + + +/* + * Specialized window copy procedures + */ + +// Globals needed during window resize and move. +static PixmapPtr gResizeDeathPix = NULL; +static pointer gResizeDeathBits = NULL; +static PixmapPtr gResizeCopyWindowSource = NULL; +static CopyWindowProcPtr gResizeOldCopyWindowProc = NULL; + +// CopyWindow() that doesn't do anything. +// For MoveWindow() of top-level windows. +static void +RootlessNoCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + // some code expects the region to be translated + int dx = ptOldOrg.x - pWin->drawable.x; + int dy = ptOldOrg.y - pWin->drawable.y; + RL_DEBUG_MSG("ROOTLESSNOCOPYWINDOW "); + + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); +} + + +// CopyWindow used during ResizeWindow for gravity moves. +// Cloned from fbCopyWindow +// The original always draws on the root pixmap (which we don't have). +// Instead, draw on the parent window's pixmap. +// Resize version: the old location's pixels are in gResizeCopyWindowSource +static void +RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + // Don't unwrap pScreen->CopyWindow. + // The bogus rewrap with RootlessCopyWindow causes a crash if + // CopyWindow is called again during the same resize. + RL_DEBUG_MSG("resizecopywindowFB start (win 0x%x) ", pWin); + + { + RegionRec rgnDst; + int dx, dy; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + REGION_INIT(pScreen, &rgnDst, NullBox, 0); + REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + RootlessStartDrawing(pWin); + fbCopyRegion (&gResizeCopyWindowSource->drawable, + &pScreen->GetWindowPixmap(pWin)->drawable, + 0, + &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + + // don't update - resize will update everything + REGION_UNINIT(pScreen, &rgnDst); + fbValidateDrawable (&pWin->drawable); + } + + RL_DEBUG_MSG("resizecopywindowFB end\n"); +} + + +/* Update *new* location of window. Old location is redrawn with + * PaintWindowBackground/Border. + * Cloned from fbCopyWindow + * The original always draws on the root pixmap (which we don't have). + * Instead, draw on the parent window's pixmap. + */ +void +RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + SCREEN_UNWRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("copywindowFB start (win 0x%x) ", pWin); + + { + RegionRec rgnDst; + int dx, dy; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + + REGION_INIT(pScreen, &rgnDst, NullBox, 0); + REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + RootlessStartDrawing(pWin); + fbCopyRegion ((DrawablePtr)pWin, (DrawablePtr)pWin, + 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + + // prgnSrc has been translated to dst position + RootlessDamageRegion(pWin, prgnSrc); + REGION_UNINIT(pScreen, &rgnDst); + fbValidateDrawable (&pWin->drawable); + } + + SCREEN_WRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("copywindowFB end\n"); +} + + +/* + * Window resize procedures + */ + +// Prepare to resize a top-level window. +// The old window's pixels are saved and the implementation is told +// to change the window size. +// (x,y,w,h) is outer frame of window (outside border) +static void +StartFrameResize(WindowPtr pWin, Bool gravity, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH, unsigned int oldBW, + int newX, int newY, + unsigned int newW, unsigned int newH, unsigned int newBW) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + + RL_DEBUG_MSG("RESIZE TOPLEVEL WINDOW with gravity %i ", gravity); + RL_DEBUG_MSG("%d %d %d %d %d %d %d %d %d %d ", + oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + + RootlessRedisplay(pWin); + + // Make a copy of the current pixmap and all its data. + // The original will go away when we ask the frame manager to + // allocate the new pixmap. + RootlessStartDrawing(pWin); + gResizeDeathBits = xalloc(winRec->frame.bytesPerRow * winRec->frame.h); + memcpy(gResizeDeathBits, winRec->frame.pixelData, + winRec->frame.bytesPerRow * winRec->frame.h); + gResizeDeathPix = + GetScratchPixmapHeader(pScreen, winRec->frame.w, winRec->frame.h, + winRec->frame.depth, winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, gResizeDeathBits); + SetPixmapBaseToScreen(gResizeDeathPix, oldX, oldY); + RootlessStopDrawing(pWin); + + // Update the window frame's size and location + winRec->frame.x = newX; + winRec->frame.y = newY; + winRec->frame.w = newW; + winRec->frame.h = newH; + winRec->borderWidth = newBW; + + // Move the window on screen and create a new pixmap for it + CallFrameProc(pScreen, StartResizeFrame, + (pScreen, &winRec->frame, oldX, oldY, oldW, oldH)); + RootlessStartDrawing(pWin); + + // Use custom CopyWindow when moving gravity bits around. + // ResizeWindow assumes the old window contents are in the same + // pixmap, but here they're in deathPix instead. + if (gravity) { + gResizeCopyWindowSource = gResizeDeathPix; + gResizeOldCopyWindowProc = pScreen->CopyWindow; + pScreen->CopyWindow = RootlessResizeCopyWindow; + } + + // Copy pixels in intersection from src to dst. + // ResizeWindow assumes these pixels are already present when making + // gravity adjustments. pWin currently has new-sized pixmap but its + // drawable is in the old position. + // fixme border width change! + { + BoxRec rect; + DrawablePtr src = &gResizeDeathPix->drawable; + DrawablePtr dst = &pScreen->GetWindowPixmap(pWin)->drawable; + // These vars are needed because implicit unsigned->signed fails + int oldX2 = (int)(oldX + oldW), newX2 = (int)(newX + newW); + int oldY2 = (int)(oldY + oldH), newY2 = (int)(newY + newH); + + rect.x1 = max(oldX, newX); + rect.y1 = max(oldY, newY); + rect.x2 = min(oldX2, newX2); + rect.y2 = min(oldY2, newY2); + + RL_DEBUG_MSG("Resize copy rect %d %d %d %d ", + rect.x1, rect.y1, rect.x2, rect.y2); + + // rect is the intersection of the old location and new location + if (BOX_NOT_EMPTY(rect)) { + /* The window drawable still has the old frame position, which + means that DST doesn't actually point at the origin of our + physical backing store when adjusted by the drawable.x,y + position. So sneakily adjust it temporarily while copying.. */ + + ((PixmapPtr) dst)->devPrivate.ptr = winRec->frame.pixelData; + SetPixmapBaseToScreen(dst, newX, newY); + + fbCopyWindowProc(src, dst, NULL, &rect, 1, 0, 0, + FALSE, FALSE, 0, 0); + + ((PixmapPtr) dst)->devPrivate.ptr = winRec->frame.pixelData; + SetPixmapBaseToScreen(dst, oldX, oldY); + } + } +} + + +static void +FinishFrameResize(WindowPtr pWin, Bool gravity, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH, unsigned int oldBW, + int newX, int newY, + unsigned int newW, unsigned int newH, unsigned int newBW) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + + CallFrameProc(pScreen, FinishResizeFrame, + (pScreen, &winRec->frame, oldX, oldY, oldW, oldH)); + if (wBoundingShape(pWin)) { + RootlessDamageShape(pWin); + } + + // Destroy temp pixmap + FreeScratchPixmapHeader(gResizeDeathPix); + xfree(gResizeDeathBits); + gResizeDeathPix = gResizeDeathBits = NULL; + + if (gravity) { + pScreen->CopyWindow = gResizeOldCopyWindowProc; + gResizeCopyWindowSource = NULL; + } +} + + +// If kind==VTOther, window border is resizing (and borderWidth is +// already changed!!@#$) This case works like window resize, not move. +void +RootlessMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) +{ + CopyWindowProcPtr oldCopyWindowProc = NULL; + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0, newW = 0, newH = 0, newBW = 0; + + RL_DEBUG_MSG("movewindow start \n"); + + if (winRec) { + if (kind == VTMove) { + oldX = winRec->frame.x; + oldY = winRec->frame.y; + RootlessRedisplay(pWin); + RootlessStartDrawing(pWin); + } else { + RL_DEBUG_MSG("movewindow border resizing "); + oldBW = winRec->borderWidth; + oldX = winRec->frame.x; + oldY = winRec->frame.y; + oldW = winRec->frame.w; + oldH = winRec->frame.h; + newBW = wBorderWidth(pWin); + newX = x; + newY = y; + newW = pWin->drawable.width + 2*newBW; + newH = pWin->drawable.height + 2*newBW; + StartFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, MoveWindow); + if (winRec) { + oldCopyWindowProc = pScreen->CopyWindow; + pScreen->CopyWindow = RootlessNoCopyWindow; + } + pScreen->MoveWindow(pWin, x, y, pSib, kind); + if (winRec) { + pScreen->CopyWindow = oldCopyWindowProc; + } + NORMAL_ROOT(pWin); + SCREEN_WRAP(pScreen, MoveWindow); + + if (winRec) { + if (kind == VTMove) { + winRec->frame.x = x; + winRec->frame.y = y; + RootlessStopDrawing(pWin); + CallFrameProc(pScreen, MoveFrame, + (pScreen, &winRec->frame, oldX, oldY)); + } else { + FinishFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + + RL_DEBUG_MSG("movewindow end\n"); +} + + +// Note: (x, y, w, h) as passed to this procedure don't match +// the frame definition. +// (x,y) is corner of very outer edge, *outside* border +// w,h is width and height *inside* border, *ignoring* border width +// The rect (x, y, w, h) doesn't mean anything. +// (x, y, w+2*bw, h+2*bw) is total rect +// (x+bw, y+bw, w, h) is inner rect + +void +RootlessResizeWindow(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib) +{ + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0, newW = 0, newH = 0, newBW = 0; + + RL_DEBUG_MSG("resizewindow start (win 0x%x) ", pWin); + + if (winRec) { + oldBW = winRec->borderWidth; + oldX = winRec->frame.x; + oldY = winRec->frame.y; + oldW = winRec->frame.w; + oldH = winRec->frame.h; + + newBW = oldBW; + newX = x; + newY = y; + newW = w + 2*newBW; + newH = h + 2*newBW; + + StartFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, ResizeWindow); + pScreen->ResizeWindow(pWin, x, y, w, h, pSib); + SCREEN_WRAP(pScreen, ResizeWindow); + NORMAL_ROOT(pWin); + + if (winRec) { + FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + RL_DEBUG_MSG("resizewindow end\n"); +} + + +/* + * SetPixmapOfAncestors + * Set the Pixmaps on all ParentRelative windows up the ancestor chain. + */ +static void +SetPixmapOfAncestors(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr topWin = TopLevelParent(pWin); + RootlessWindowRec *topWinRec = WINREC(topWin); + + while (pWin->backgroundState == ParentRelative) { + if (pWin == topWin) { + // disallow ParentRelative background state on top level + XID pixel = 0; + ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); + RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin); + break; + } + + pWin = pWin->parent; + pScreen->SetWindowPixmap(pWin, topWinRec->pixmap); + } +} + + +/* + * RootlessPaintWindowBackground + * Paint the window background while filling in the alpha channel with all on. + */ +void +RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) +{ + int oldBackgroundState = 0; + PixUnion oldBackground; + ScreenPtr pScreen = pWin->drawable.pScreen; + + SCREEN_UNWRAP(pScreen, PaintWindowBackground); + RL_DEBUG_MSG("paintwindowbackground start (win 0x%x, framed %i) ", + pWin, IsFramedWindow(pWin)); + + if (IsFramedWindow(pWin)) { + if (IsRoot(pWin)) { + // set root background to magic transparent color + oldBackgroundState = pWin->backgroundState; + oldBackground = pWin->background; + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = 0x00fffffe; + } + RootlessStartDrawing(pWin); + RootlessDamageRegion(pWin, pRegion); + + // For ParentRelative windows, we have to make sure the window + // pixmap is set correctly all the way up the ancestor chain. + if (pWin->backgroundState == ParentRelative) { + SetPixmapOfAncestors(pWin); + } + } + + pScreen->PaintWindowBackground(pWin, pRegion, what); + + if (IsRoot(pWin)) { + pWin->backgroundState = oldBackgroundState; + pWin->background = oldBackground; + } + + SCREEN_WRAP(pScreen, PaintWindowBackground); + RL_DEBUG_MSG("paintwindowbackground end\n"); +} + + +/* + * RootlessPaintWindowBorder + * Paint the window border while filling in the alpha channel with all on. + */ +void +RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) +{ + SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder); + RL_DEBUG_MSG("paintwindowborder start (win 0x%x) ", pWin); + + if (IsFramedWindow(pWin)) { + RootlessStartDrawing(pWin); + RootlessDamageRegion(pWin, pRegion); + + // For ParentRelative windows with tiled borders, we have to make + // sure the window pixmap is set correctly all the way up the + // ancestor chain. + if (!pWin->borderIsPixel && + pWin->backgroundState == ParentRelative) + { + SetPixmapOfAncestors(pWin); + } + } + + pWin->drawable.pScreen->PaintWindowBorder(pWin, pRegion, what); + + SCREEN_WRAP(pWin->drawable.pScreen, PaintWindowBorder); + RL_DEBUG_MSG("paintwindowborder end\n"); +} + + +// fixme untested! +// pWin inside corner stays the same +// pWin->drawable.[xy] stays the same +// frame moves and resizes +void +RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width) +{ + RegionRec saveRoot; + + RL_DEBUG_MSG("change border width "); + if (width != wBorderWidth(pWin)) { + RootlessWindowRec *winRec = WINREC(pWin); + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0; + unsigned int newW = 0, newH = 0, newBW = 0; + + if (winRec) { + oldBW = winRec->borderWidth; + oldX = winRec->frame.x; + oldY = winRec->frame.y; + oldW = winRec->frame.w; + oldH = winRec->frame.h; + + newBW = width; + newX = pWin->drawable.x - newBW; + newY = pWin->drawable.y - newBW; + newW = pWin->drawable.width + 2*newBW; + newH = pWin->drawable.height + 2*newBW; + + StartFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pWin->drawable.pScreen, ChangeBorderWidth); + pWin->drawable.pScreen->ChangeBorderWidth(pWin, width); + SCREEN_WRAP(pWin->drawable.pScreen, ChangeBorderWidth); + NORMAL_ROOT(pWin); + + if (winRec) { + FinishFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + RL_DEBUG_MSG("change border width end\n"); +} Index: xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.h:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.h Tue Apr 2 19:06:32 2002 @@ -0,0 +1,36 @@ +/* + * Rootless window management + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.h,v 1.2 2002/04/03 00:06:32 torrey Exp $ */ + +#ifndef _ROOTLESSWINDOW_H +#define _ROOTLESSWINDOW_H + +#include "rootlessCommon.h" + + +Bool RootlessCreateWindow(WindowPtr pWin); +Bool RootlessDestroyWindow(WindowPtr pWin); + +#ifdef SHAPE +void RootlessSetShape(WindowPtr pWin); +#endif // SHAPE + +Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask); +Bool RootlessPositionWindow(WindowPtr pWin, int x, int y); +Bool RootlessRealizeWindow(WindowPtr pWin); +Bool RootlessUnrealizeWindow(WindowPtr pWin); +void RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib); +void RootlessCopyWindow(WindowPtr pWin,DDXPointRec ptOldOrg,RegionPtr prgnSrc); +void RootlessMoveWindow(WindowPtr pWin,int x,int y,WindowPtr pSib,VTKind kind); +void RootlessResizeWindow(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib); +void RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, + int what); +void RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, + int what); +void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width); + +#endif Index: xc/programs/Xserver/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj:1.11 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj Tue Jan 28 20:11:06 2003 @@ -0,0 +1,1683 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 38; + objects = { + 01279092000747AA0A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + path = XServer.m; + refType = 4; + }; + 0127909600074AF60A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + path = XApplication.m; + refType = 4; + }; + 0127909800074B1A0A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + path = XApplication.h; + refType = 4; + }; + 014C68ED00ED6A9D7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = XView.h; + refType = 4; + }; + 014C68EE00ED6A9D7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = XView.m; + refType = 4; + }; + 014C68F200ED7AD67F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = fakeBoxRec.h; + refType = 4; + }; + 014C68F300EE5AB97F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessCommon.c; + refType = 4; + }; + 014C68F400EE5AB97F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessCommon.h; + refType = 4; + }; + 014C68F700EE678F7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessWindow.c; + refType = 4; + }; + 014C68F800EE678F7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessWindow.h; + refType = 4; + }; + 015698ED003DF345CE6F79C2 = { + isa = PBXFileReference; + path = XDarwin.icns; + refType = 4; + }; + 0157A37D002CF6D7CE6F79C2 = { + children = ( + F533214601A4B45401000001, + 0157A37E002CF6D7CE6F79C2, + F58D65DF018F79B101000001, + F533213D0193CBE001000001, + 43B962E200617B93416877C2, + F5ACD263C5BE031F01000001, + F51BF62E02026E3501000001, + F5ACD25CC5B5E96601000001, + F587E16401924C6901000001, + ); + isa = PBXVariantGroup; + name = Credits.rtf; + path = ""; + refType = 4; + }; + 0157A37E002CF6D7CE6F79C2 = { + isa = PBXFileReference; + name = English; + path = English.lproj/Credits.rtf; + refType = 4; + }; + 015EDCEA004203A8CE6F79C2 = { + isa = PBXFrameworkReference; + name = IOKit.framework; + path = /System/Library/Frameworks/IOKit.framework; + refType = 0; + }; + 017D6F4400E861FB7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessGC.c; + refType = 4; + }; + 017D6F4500E861FB7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessScreen.c; + refType = 4; + }; + 018F40F2003E1902CE6F79C2 = { + children = ( + 018F40F3003E1916CE6F79C2, + 021D6BA9003E1BACCE6F79C2, + 3E74E03600863F047F000001, + F5A94EF10314BAC70100011B, + 018F40F6003E1974CE6F79C2, + ); + isa = PBXGroup; + name = "X Server"; + path = ..; + refType = 4; + }; + 018F40F3003E1916CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = darwin.c; + refType = 4; + }; + 018F40F6003E1974CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = darwinKeyboard.c; + refType = 4; + }; + 018F40F8003E1979CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartz.c; + refType = 4; + }; + 018F40FA003E197ECE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartz.h; + refType = 4; + }; + 018F40FC003E1983CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = xfIOKit.c; + refType = 4; + }; + 018F40FE003E1988CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = xfIOKit.h; + refType = 4; + }; + 018F4100003E19E4CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = xfIOKitCursor.c; + refType = 4; + }; +//010 +//011 +//012 +//013 +//014 +//020 +//021 +//022 +//023 +//024 + 021D6BA9003E1BACCE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = darwin.h; + refType = 4; + }; + 02A1FEA6006D34BE416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = xfIOKitStartup.c; + refType = 4; + }; + 02A1FEA8006D38F0416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzStartup.c; + refType = 4; + }; + 02E03CA000348209CE6F79C2 = { + children = ( + F533214701A4B48301000001, + 02E03CA100348209CE6F79C2, + F58D65E0018F79C001000001, + F533213E0193CBF401000001, + 43B962E300617B93416877C2, + F5ACD268C5BE046401000001, + F51BF62F02026E5C01000001, + F5ACD261C5B5EA2001000001, + F587E16501924C7401000001, + ); + isa = PBXVariantGroup; + name = XDarwinHelp.html; + path = ""; + refType = 4; + }; + 02E03CA100348209CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + name = English; + path = English.lproj/XDarwinHelp.html; + refType = 4; + }; +//020 +//021 +//022 +//023 +//024 +//030 +//031 +//032 +//033 +//034 + 0338412F0083BFE57F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzCursor.h; + refType = 4; + }; +//030 +//031 +//032 +//033 +//034 +//040 +//041 +//042 +//043 +//044 + 04329610000763920A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + path = Preferences.m; + refType = 4; + }; + 04329611000763920A000002 = { + fileEncoding = 30; + isa = PBXFileReference; + path = Preferences.h; + refType = 4; + }; +//040 +//041 +//042 +//043 +//044 +//060 +//061 +//062 +//063 +//064 + 06EB6C3B004099E7CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzShared.h; + refType = 4; + }; +//060 +//061 +//062 +//063 +//064 +//080 +//081 +//082 +//083 +//084 + 080E96DDFE201D6D7F000001 = { + children = ( + 04329610000763920A000002, + 04329611000763920A000002, + 0127909600074AF60A000002, + 0127909800074B1A0A000002, + 01279092000747AA0A000002, + 1C4A3109004D8F24CE6F79C2, + 014C68EE00ED6A9D7F000001, + 014C68ED00ED6A9D7F000001, + ); + isa = PBXGroup; + name = Classes; + refType = 4; + }; + 089C165CFE840E0CC02AAC07 = { + children = ( + F533214301A4B3F001000001, + 089C165DFE840E0CC02AAC07, + F58D65DD018F798F01000001, + F533213A0193CBA201000001, + 43B962E100617B49416877C2, + F5ACD269C5BE049301000001, + F51BF62B02026DDA01000001, + F5ACD262C5B5EA4D01000001, + F587E16101924C2F01000001, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings; + refType = 4; + }; + 089C165DFE840E0CC02AAC07 = { + fileEncoding = 30; + isa = PBXFileReference; + name = English; + path = English.lproj/InfoPlist.strings; + refType = 4; + }; +//080 +//081 +//082 +//083 +//084 +//0A0 +//0A1 +//0A2 +//0A3 +//0A4 + 0A79E19E004499A1CE6F79C2 = { + isa = PBXApplicationReference; + path = XDarwin.app; + refType = 3; + }; + 0A79E19F004499A1CE6F79C2 = { + buildPhases = ( + 0A79E1A0004499A1CE6F79C2, + 0A79E1A1004499A1CE6F79C2, + 0A79E1A2004499A1CE6F79C2, + 0A79E1A3004499A1CE6F79C2, + 0A79E1A4004499A1CE6F79C2, + ); + buildSettings = { + INSTALL_PATH = /; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = XDarwin; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = app; + }; + dependencies = ( + 6EF065C903D4F0CA006877C2, + 6EF065C703D4EE19006877C2, + ); + isa = PBXApplicationTarget; + name = XDarwin; + productInstallPath = /; + productName = XDarwin; + productReference = 0A79E19E004499A1CE6F79C2; + productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> +<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> +<plist version=\"1.0\"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>XDarwin</string> + <key>CFBundleGetInfoString</key> + <string>XDarwin 1.2b4, ©2001-2003 XFree86 Project, Inc.</string> + <key>CFBundleIconFile</key> + <string>XDarwin.icns</string> + <key>CFBundleIdentifier</key> + <string>org.xfree86.XDarwin</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>XDarwin</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>XDarwin 1.2b4</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string></string> + <key>NSHelpFile</key> + <string>XDarwinHelp.html</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>XApplication</string> +</dict> +</plist> +"; + }; + 0A79E1A0004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 0A79E1A1004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + 0A79E1A600449EB2CE6F79C2, + 0A79E1A700449EB2CE6F79C2, + 0A79E1A800449EB2CE6F79C2, + 0A79E1A900449EB2CE6F79C2, + 0A79E1AA00449EB2CE6F79C2, + 1220774500712D2D416877C2, + F54BF6ED017D506E01000001, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 0A79E1A2004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 0A79E1A3004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 0A79E1A4004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 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 = { + }; + }; +//0A0 +//0A1 +//0A2 +//0A3 +//0A4 +//100 +//101 +//102 +//103 +//104 + 1058C7A0FEA54F0111CA2CBB = { + children = ( + F53321400193CCF001000001, + 1BE4F84D0006C9890A000002, + 1058C7A1FEA54F0111CA2CBB, + F53321410193CCF001000001, + 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; + }; +//100 +//101 +//102 +//103 +//104 +//120 +//121 +//122 +//123 +//124 + 1220774300712D2D416877C2 = { + children = ( + F533214501A4B42501000001, + 1220774400712D2D416877C2, + F58D65DE018F79A001000001, + F533213C0193CBC901000001, + 1220774600712D75416877C2, + F5ACD266C5BE03C501000001, + F51BF62D02026E1C01000001, + F5ACD25FC5B5E9AA01000001, + F587E16301924C5E01000001, + ); + isa = PBXVariantGroup; + name = Localizable.strings; + path = ""; + refType = 4; + }; + 1220774400712D2D416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + name = English; + path = English.lproj/Localizable.strings; + refType = 4; + }; + 1220774500712D2D416877C2 = { + fileRef = 1220774300712D2D416877C2; + isa = PBXBuildFile; + settings = { + }; + }; + 1220774600712D75416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/Localizable.strings; + refType = 4; + }; +//120 +//121 +//122 +//123 +//124 +//170 +//171 +//172 +//173 +//174 + 170DFAFF00729A35416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = XDarwinStartup.c; + refType = 4; + }; + 170DFB0000729C86416877C2 = { + children = ( + 018F40FC003E1983CE6F79C2, + 018F40FE003E1988CE6F79C2, + 018F4100003E19E4CE6F79C2, + 02A1FEA6006D34BE416877C2, + ); + isa = PBXGroup; + name = IOKit; + path = ..; + refType = 4; + }; +//170 +//171 +//172 +//173 +//174 +//190 +//191 +//192 +//193 +//194 + 19C28FACFE9D520D11CA2CBB = { + children = ( + 0A79E19E004499A1CE6F79C2, + 6EF7C58703D3BC6D00000104, + 6EF065C603D4EE19006877C2, + ); + isa = PBXGroup; + name = Products; + refType = 4; + }; +//190 +//191 +//192 +//193 +//194 +//1B0 +//1B1 +//1B2 +//1B3 +//1B4 + 1BD8DE4200B8A3567F000001 = { + children = ( + F533214401A4B40F01000001, + 1BD8DE4300B8A3567F000001, + F58D65DC018F794D01000001, + F533213B0193CBB401000001, + 1BD8DE4700B8A3C77F000001, + F5ACD264C5BE035B01000001, + F51BF62C02026E0601000001, + F5ACD25DC5B5E97701000001, + F587E16201924C5301000001, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings.cpp; + path = ""; + refType = 4; + }; + 1BD8DE4300B8A3567F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = English; + path = English.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + 1BD8DE4400B8A38E7F000001 = { + children = ( + F533214801A4B4D701000001, + 1BD8DE4500B8A38E7F000001, + F58D65E1018F79E001000001, + F533213F0193CC2501000001, + 1BD8DE4800B8A4167F000001, + F5ACD267C5BE03FC01000001, + F51BF63002026E8D01000001, + F5ACD260C5B5E9DF01000001, + F587E16601924C9D01000001, + ); + isa = PBXVariantGroup; + name = XDarwinHelp.html.cpp; + path = ""; + refType = 4; + }; + 1BD8DE4500B8A38E7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = English; + path = English.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + 1BD8DE4700B8A3C77F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + 1BD8DE4800B8A4167F000001 = { + fileEncoding = 30; + 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; + }; +//1B0 +//1B1 +//1B2 +//1B3 +//1B4 +//1C0 +//1C1 +//1C2 +//1C3 +//1C4 + 1C4A3109004D8F24CE6F79C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = XServer.h; + refType = 4; + }; +//1C0 +//1C1 +//1C2 +//1C3 +//1C4 +//230 +//231 +//232 +//233 +//234 + 237A34C10076E37E7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzAudio.c; + refType = 4; + }; + 237A34C20076E37E7F000001 = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = NO; + OPTIMIZATION_CFLAGS = "-O0"; + }; + isa = PBXBuildStyle; + name = Development; + }; + 237A34C30076E37E7F000001 = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = YES; + }; + isa = PBXBuildStyle; + name = Deployment; + }; + 237A34C40076F4F07F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzAudio.h; + refType = 4; + }; +//230 +//231 +//232 +//233 +//234 +//290 +//291 +//292 +//293 +//294 + 29B97313FDCFA39411CA2CEA = { + buildStyles = ( + 237A34C20076E37E7F000001, + 237A34C30076E37E7F000001, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + knownRegions = ( + English, + Japanese, + French, + German, + Swedish, + Dutch, + Spanish, + ko, + Portuguese, + ); + mainGroup = 29B97314FDCFA39411CA2CEA; + projectDirPath = ""; + targets = ( + 0A79E19F004499A1CE6F79C2, + 6EF7C58603D3BC6D00000104, + 6EF065C503D4EE19006877C2, + ); + }; + 29B97314FDCFA39411CA2CEA = { + children = ( + 080E96DDFE201D6D7F000001, + 018F40F2003E1902CE6F79C2, + 170DFB0000729C86416877C2, + 43B962CE00617089416877C2, + F5614B3D025112D901000114, + 32FEE13C00E07C3E7F000001, + 29B97315FDCFA39411CA2CEA, + 29B97317FDCFA39411CA2CEA, + 29B97323FDCFA39411CA2CEA, + 19C28FACFE9D520D11CA2CBB, + ); + isa = PBXGroup; + name = "Xmaster-Cocoa"; + path = ""; + refType = 4; + }; + 29B97315FDCFA39411CA2CEA = { + children = ( + 170DFAFF00729A35416877C2, + ); + isa = PBXGroup; + name = "Other Sources"; + path = ""; + refType = 2; + }; + 29B97317FDCFA39411CA2CEA = { + children = ( + 29B97318FDCFA39411CA2CEA, + 089C165CFE840E0CC02AAC07, + 1BD8DE4200B8A3567F000001, + 1220774300712D2D416877C2, + 0157A37D002CF6D7CE6F79C2, + 02E03CA000348209CE6F79C2, + 1BD8DE4400B8A38E7F000001, + 015698ED003DF345CE6F79C2, + F54BF6EA017D500901000001, + F54BF6EC017D506E01000001, + ); + isa = PBXGroup; + name = Resources; + path = ../bundle; + refType = 4; + }; + 29B97318FDCFA39411CA2CEA = { + children = ( + F533214201A4B3CE01000001, + 29B97319FDCFA39411CA2CEA, + F58D65DB018F793801000001, + F53321390193CB6A01000001, + 43B962E000617B49416877C2, + F5ACD265C5BE038601000001, + F51BF62A02026DAF01000001, + F5ACD25EC5B5E98D01000001, + F587E16001924C1D01000001, + ); + 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; + }; +//290 +//291 +//292 +//293 +//294 +//320 +//321 +//322 +//323 +//324 + 32FEE13C00E07C3E7F000001 = { + children = ( + F56CBD0D02EB84A801129B8A, + F56CBD0E02EB84A801129B8A, + F56CBD0F02EBDCFC01129B8A, + 014C68F200ED7AD67F000001, + F5269C2D01D5BC3501000001, + F5269C2E01D5BC3501000001, + 32FEE13E00E07CBE7F000001, + 32FEE13F00E07CBE7F000001, + 32FEE14000E07CBE7F000001, + 32FEE14100E07CBE7F000001, + 32FEE14200E07CBE7F000001, + 014C68F300EE5AB97F000001, + 014C68F400EE5AB97F000001, + 017D6F4400E861FB7F000001, + 017D6F4500E861FB7F000001, + 014C68F700EE678F7F000001, + 014C68F800EE678F7F000001, + 32FEE14900E07D317F000001, + ); + isa = PBXGroup; + name = Rootless; + path = ""; + refType = 4; + }; + 32FEE13E00E07CBE7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootless.h; + refType = 4; + }; + 32FEE13F00E07CBE7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessAqua.h; + refType = 4; + }; + 32FEE14000E07CBE7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessAquaGlue.c; + refType = 4; + }; + 32FEE14100E07CBE7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessAquaImp.h; + refType = 4; + }; + 32FEE14200E07CBE7F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessAquaImp.m; + refType = 4; + }; + 32FEE14900E07D317F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = rootlessValTree.c; + refType = 4; + }; +//320 +//321 +//322 +//323 +//324 +//350 +//351 +//352 +//353 +//354 + 3576829A0077B8F17F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzCursor.c; + refType = 4; + }; +//350 +//351 +//352 +//353 +//354 +//3E0 +//3E1 +//3E2 +//3E3 +//3E4 + 3E74E03600863F047F000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = darwinClut8.h; + refType = 4; + }; +//3E0 +//3E1 +//3E2 +//3E3 +//3E4 +//430 +//431 +//432 +//433 +//434 + 43B962CE00617089416877C2 = { + children = ( + 018F40F8003E1979CE6F79C2, + 018F40FA003E197ECE6F79C2, + 237A34C10076E37E7F000001, + 237A34C40076F4F07F000001, + 3576829A0077B8F17F000001, + 0338412F0083BFE57F000001, + 43B962D000617089416877C2, + 43B962D100617089416877C2, + 43B962CF00617089416877C2, + F5582948015DAD3B01000001, + 06EB6C3B004099E7CE6F79C2, + 02A1FEA8006D38F0416877C2, + ); + isa = PBXGroup; + name = Quartz; + path = ""; + refType = 4; + }; + 43B962CF00617089416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzCocoa.m; + refType = 4; + }; + 43B962D000617089416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzPasteboard.c; + refType = 4; + }; + 43B962D100617089416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzPasteboard.h; + refType = 4; + }; + 43B962E000617B49416877C2 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/MainMenu.nib; + refType = 4; + }; + 43B962E100617B49416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/InfoPlist.strings; + refType = 4; + }; + 43B962E200617B93416877C2 = { + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/Credits.rtf; + refType = 4; + }; + 43B962E300617B93416877C2 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Japanese; + path = Japanese.lproj/XDarwinHelp.html; + refType = 4; + }; +//430 +//431 +//432 +//433 +//434 +//6E0 +//6E1 +//6E2 +//6E3 +//6E4 + 6EF065C003D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C103D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C203D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C303D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C403D4EE19006877C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF065C503D4EE19006877C2 = { + buildPhases = ( + 6EF065C003D4EE19006877C2, + 6EF065C103D4EE19006877C2, + 6EF065C203D4EE19006877C2, + 6EF065C303D4EE19006877C2, + 6EF065C403D4EE19006877C2, + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = glxMesa; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = bundle; + }; + dependencies = ( + ); + isa = PBXBundleTarget; + name = glxMesa; + productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; + productName = glxMesa; + productReference = 6EF065C603D4EE19006877C2; + productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> +<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> +<plist version=\"1.0\"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>glxMesa</string> + <key>CFBundleGetInfoString</key> + <string></string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string></string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>GLX bundle with Mesa</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>0.1</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>0.1</string> +</dict> +</plist> +"; + }; + 6EF065C603D4EE19006877C2 = { + isa = PBXBundleReference; + path = glxMesa.bundle; + refType = 3; + }; + 6EF065C703D4EE19006877C2 = { + isa = PBXTargetDependency; + target = 6EF065C503D4EE19006877C2; + }; + 6EF065C903D4F0CA006877C2 = { + isa = PBXTargetDependency; + target = 6EF7C58603D3BC6D00000104; + }; + 6EF7C58103D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58203D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58303D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58403D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58503D3BC6D00000104 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 6EF7C58603D3BC6D00000104 = { + buildPhases = ( + 6EF7C58103D3BC6D00000104, + 6EF7C58203D3BC6D00000104, + 6EF7C58303D3BC6D00000104, + 6EF7C58403D3BC6D00000104, + 6EF7C58503D3BC6D00000104, + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = glxAGL; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = bundle; + }; + dependencies = ( + ); + isa = PBXBundleTarget; + name = glxAGL; + productName = glxAqua; + productReference = 6EF7C58703D3BC6D00000104; + productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> +<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> +<plist version=\"1.0\"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>glxAGL</string> + <key>CFBundleGetInfoString</key> + <string></string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string></string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>GLX bundle with AGL</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>0.1</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>0.1</string> +</dict> +</plist> +"; + }; + 6EF7C58703D3BC6D00000104 = { + isa = PBXBundleReference; + path = glxAGL.bundle; + refType = 3; + }; +//6E0 +//6E1 +//6E2 +//6E3 +//6E4 +//F50 +//F51 +//F52 +//F53 +//F54 + F51BF62A02026DAF01000001 = { + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/MainMenu.nib; + refType = 4; + }; + F51BF62B02026DDA01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/InfoPlist.strings; + refType = 4; + }; + F51BF62C02026E0601000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F51BF62D02026E1C01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/Localizable.strings; + refType = 4; + }; + F51BF62E02026E3501000001 = { + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/Credits.rtf; + refType = 4; + }; + F51BF62F02026E5C01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/XDarwinHelp.html; + refType = 4; + }; + F51BF63002026E8D01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5269C2D01D5BC3501000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = pseudoramiX.c; + refType = 4; + }; + F5269C2E01D5BC3501000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = pseudoramiX.h; + refType = 4; + }; + F53321390193CB6A01000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/MainMenu.nib; + refType = 4; + }; + F533213A0193CBA201000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = German; + path = German.lproj/InfoPlist.strings; + refType = 4; + }; + F533213B0193CBB401000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = German; + path = German.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F533213C0193CBC901000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = German; + path = German.lproj/Localizable.strings; + refType = 4; + }; + F533213D0193CBE001000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/Credits.rtf; + refType = 4; + }; + F533213E0193CBF401000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = German; + path = German.lproj/XDarwinHelp.html; + refType = 4; + }; + F533213F0193CC2501000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = German; + path = German.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F53321400193CCF001000001 = { + isa = PBXFrameworkReference; + name = ApplicationServices.framework; + path = /System/Library/Frameworks/ApplicationServices.framework; + refType = 0; + }; + F53321410193CCF001000001 = { + isa = PBXFrameworkReference; + name = CoreAudio.framework; + path = /System/Library/Frameworks/CoreAudio.framework; + refType = 0; + }; + F533214201A4B3CE01000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/MainMenu.nib; + refType = 4; + }; + F533214301A4B3F001000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/InfoPlist.strings; + refType = 4; + }; + F533214401A4B40F01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F533214501A4B42501000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/Localizable.strings; + refType = 4; + }; + F533214601A4B45401000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/Credits.rtf; + refType = 4; + }; + F533214701A4B48301000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/XDarwinHelp.html; + refType = 4; + }; + F533214801A4B4D701000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F54BF6EA017D500901000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = startXClients.cpp; + refType = 4; + }; + F54BF6EC017D506E01000001 = { + isa = PBXFileReference; + path = startXClients; + refType = 4; + }; + F54BF6ED017D506E01000001 = { + fileRef = F54BF6EC017D506E01000001; + isa = PBXBuildFile; + settings = { + }; + }; + F5582948015DAD3B01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + path = quartzCommon.h; + refType = 4; + }; + F5614B3B0251124C01000114 = { + fileEncoding = 30; + isa = PBXFileReference; + path = fullscreen.c; + refType = 4; + }; + F5614B3C0251124C01000114 = { + fileEncoding = 30; + isa = PBXFileReference; + path = fullscreen.h; + refType = 4; + }; + F5614B3D025112D901000114 = { + children = ( + F5614B3B0251124C01000114, + F5614B3C0251124C01000114, + ); + isa = PBXGroup; + name = "Full Screen"; + path = ""; + refType = 4; + }; + F56CBD0D02EB84A801129B8A = { + fileEncoding = 30; + isa = PBXFileReference; + path = aqua.h; + refType = 4; + }; + F56CBD0E02EB84A801129B8A = { + fileEncoding = 30; + isa = PBXFileReference; + path = aquaPicture.c; + refType = 4; + }; + F56CBD0F02EBDCFC01129B8A = { + fileEncoding = 30; + isa = PBXFileReference; + path = aquaWindow.c; + refType = 4; + }; + F587E16001924C1D01000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/MainMenu.nib; + refType = 4; + }; + F587E16101924C2F01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/InfoPlist.strings; + refType = 4; + }; + F587E16201924C5301000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F587E16301924C5E01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/Localizable.strings; + refType = 4; + }; + F587E16401924C6901000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/Credits.rtf; + refType = 4; + }; + F587E16501924C7401000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/XDarwinHelp.html; + refType = 4; + }; + F587E16601924C9D01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F58D65DB018F793801000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/MainMenu.nib; + refType = 4; + }; + F58D65DC018F794D01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = French; + path = French.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F58D65DD018F798F01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = French; + path = French.lproj/InfoPlist.strings; + refType = 4; + }; + F58D65DE018F79A001000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = French; + path = French.lproj/Localizable.strings; + refType = 4; + }; + F58D65DF018F79B101000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/Credits.rtf; + refType = 4; + }; + F58D65E0018F79C001000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = French; + path = French.lproj/XDarwinHelp.html; + refType = 4; + }; + F58D65E1018F79E001000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = French; + path = French.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5A94EF10314BAC70100011B = { + fileEncoding = 30; + isa = PBXFileReference; + path = darwinEvents.c; + refType = 4; + }; + F5ACD25CC5B5E96601000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/Credits.rtf; + refType = 4; + }; + F5ACD25DC5B5E97701000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F5ACD25EC5B5E98D01000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/MainMenu.nib; + refType = 4; + }; + F5ACD25FC5B5E9AA01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/Localizable.strings; + refType = 4; + }; + F5ACD260C5B5E9DF01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5ACD261C5B5EA2001000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/XDarwinHelp.html; + refType = 4; + }; + F5ACD262C5B5EA4D01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/InfoPlist.strings; + refType = 4; + }; + F5ACD263C5BE031F01000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/Credits.rtf; + refType = 4; + }; + F5ACD264C5BE035B01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = ko; + path = ko.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F5ACD265C5BE038601000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/MainMenu.nib; + refType = 4; + }; + F5ACD266C5BE03C501000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = ko; + path = ko.lproj/Localizable.strings; + refType = 4; + }; + F5ACD267C5BE03FC01000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = ko; + path = ko.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5ACD268C5BE046401000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = ko; + path = ko.lproj/XDarwinHelp.html; + refType = 4; + }; + F5ACD269C5BE049301000001 = { + fileEncoding = 30; + isa = PBXFileReference; + name = ko; + path = ko.lproj/InfoPlist.strings; + refType = 4; + }; + }; + rootObject = 29B97313FDCFA39411CA2CEA; +} Index: xc/programs/Xserver/hw/darwin/quartz_1.3/Imakefile diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/Imakefile:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/Imakefile Wed Mar 27 21:21:20 2002 @@ -0,0 +1,127 @@ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/Imakefile,v 1.1 2002/03/28 02:21:20 torrey Exp $ + +#include <Server.tmpl> + +LinkSourceFile(Preferences.m,../quartz) +LinkSourceFile(Preferences.h,../quartz) +LinkSourceFile(XApplication.m,../quartz) +LinkSourceFile(XApplication.h,../quartz) +LinkSourceFile(fakeBoxRec.h,../quartz) +LinkSourceFile(fullscreen.c,../quartz) +LinkSourceFile(fullscreen.h,../quartz) +LinkSourceFile(quartz.c,../quartz) +LinkSourceFile(quartz.h,../quartz) +LinkSourceFile(quartzAudio.c,../quartz) +LinkSourceFile(quartzAudio.h,../quartz) +LinkSourceFile(quartzCocoa.m,../quartz) +LinkSourceFile(quartzCommon.h,../quartz) +LinkSourceFile(quartzCursor.c,../quartz) +LinkSourceFile(quartzCursor.h,../quartz) +LinkSourceFile(quartzPasteboard.c,../quartz) +LinkSourceFile(quartzPasteboard.h,../quartz) +LinkSourceFile(quartzShared.h,../quartz) +LinkSourceFile(pseudoramiX.c,../quartz) +LinkSourceFile(pseudoramiX.h,../quartz) +LinkSourceFile(quartzStartup.c,../quartz) +LinkSourceFile(XDarwinStartup.c,../quartz) +LinkSourceFile(XDarwinStartup.man,../quartz) + +SRCS = Preferences.m \ + XApplication.m \ + XServer.m \ + XView.m \ + XWindow.m \ + fullscreen.c \ + quartz.c \ + quartzAudio.c \ + quartzCocoa.m \ + quartzCursor.c \ + quartzPasteboard.c \ + rootlessAquaGlue.c \ + rootlessAquaImp.m \ + rootlessCommon.c \ + rootlessGC.c \ + rootlessScreen.c \ + rootlessValTree.c \ + rootlessWindow.c \ + pseudoramiX.c + +OBJS = Preferences.o \ + XApplication.o \ + XServer.o \ + XView.o \ + XWindow.o \ + fullscreen.o \ + quartz.o \ + quartzAudio.o \ + quartzCocoa.o \ + quartzCursor.o \ + quartzPasteboard.o \ + rootlessAquaGlue.o \ + rootlessAquaImp.o \ + rootlessCommon.o \ + rootlessGC.o \ + rootlessScreen.o \ + rootlessValTree.o \ + rootlessWindow.o \ + pseudoramiX.o + +INCLUDES = -I. -I$(SERVERSRC)/fb -I$(SERVERSRC)/mi -I$(SERVERSRC)/include \ + -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(SERVERSRC)/render \ + -I$(EXTINCSRC) -I.. -I$(SERVERSRC)/Xext + +#if defined(XFree86CustomVersion) +CUSTOMVERSION = XFree86CustomVersion +CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' +#endif +#if HasCGMachPort +QUARTZDEFINES = -DHAS_CG_MACH_PORT +#endif + +#if XFree86Devel +PBXBUILDSTYLE = -buildstyle Development +DEBUGDEFINES = -DROOTLESSDEBUG +#else +PBXBUILDSTYLE = -buildstyle Deployment +#endif + +DEFINES = $(CUSTOMVERDEF) -DXBINDIR=$(BINDIR) -DXINITDIR=$(XINITDIR) \ + $(QUARTZDEFINES) $(DEBUGDEFINES) +EXTRAMANDEFS = -D__XBinDir__=$(BINDIR) +#if NothingOutsideProjectRoot +XDARWINROOT = $(BINDIR) +#else +XDARWINROOT = /Applications +#endif + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) + +NormalLibraryObjectRule() +NormalLibraryTarget(XQuartz,$(OBJS)) + +AllTarget(quartzStartup.o) + +AllTarget(XDarwinStartup) +NormalProgramTarget(XDarwinStartup,XDarwinStartup.o, \ + NullParameter,NullParameter, \ + -framework CoreFoundation -framework ApplicationServices) +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) + +InstallManPage(XDarwinStartup,$(MANDIR)) + +clean:: + pbxbuild "clean" -target XDarwin $(PBXBUILDSTYLE) + +DependTarget() + Index: xc/programs/Xserver/hw/darwin/quartz_1.3/XServer.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/XServer.h:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/XServer.h Wed Jun 19 14:12:02 2002 @@ -0,0 +1,72 @@ +// +// XServer.h +// +// Created by Andreas Monitzer on January 6, 2001. +// +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/XServer.h,v 1.2 2002/06/19 18:12:02 torrey Exp $ */ + +#import <Cocoa/Cocoa.h> + +#include <drivers/event_status_driver.h> // for NXEvent + +@interface XServer : NSObject { + // server state + NSRecursiveLock *serverLock; + NSPort *signalPort; + BOOL serverVisible; + BOOL rootlessMenuBarVisible; + BOOL appQuitting; + UInt32 mouseState; + Class windowClass; + + // server event queue + BOOL sendServerEvents; + int eventWriteFD; + + // Aqua interface + IBOutlet NSWindow *modeWindow; + IBOutlet NSButton *startupModeButton; + IBOutlet NSButton *startFullScreenButton; + IBOutlet NSButton *startRootlessButton; + IBOutlet NSWindow *helpWindow; + IBOutlet NSButton *startupHelpButton; + IBOutlet NSPanel *switchWindow; +} + +- (id)init; + +- (BOOL)translateEvent:(NSEvent *)anEvent; +- (BOOL)getNXMouse:(NXEvent*)ev; + ++ (void)append:(NSString*)value toEnv:(NSString*)name; + +- (void)startX; +- (BOOL)startXClients; +- (void)run; +- (void)toggle; +- (void)show; +- (void)hide; +- (void)killServer; +- (void)readPasteboard; +- (void)writePasteboard; +- (void)sendNXEvent:(NXEvent*)ev; +- (void)sendShowHide:(BOOL)show; + +// Aqua interface actions +- (IBAction)startFullScreen:(id)sender; +- (IBAction)startRootless:(id)sender; +- (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/quartz_1.3/XServer.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/XServer.m:1.2 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/XServer.m Wed Jun 19 14:12:02 2002 @@ -0,0 +1,832 @@ +// +// 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/quartz_1.3/XServer.m,v 1.2 2002/06/19 18:12:02 torrey Exp $ */ + +#import "XServer.h" +#import "Preferences.h" +#import "XWindow.h" +#include "quartzCommon.h" + +#include <unistd.h> +#include <stdio.h> +#include <sys/syslimits.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <pwd.h> +#include <signal.h> +#include <fcntl.h> + +// Types of shells +enum { + shell_Unknown, + shell_Bourne, + shell_C +}; + +typedef struct { + char *name; + int type; +} shellList_t; + +static shellList_t const shellList[] = { + { "csh", shell_C }, // standard C shell + { "tcsh", shell_C }, // ... needs no introduction + { "sh", shell_Bourne }, // standard Bourne shell + { "zsh", shell_Bourne }, // Z shell + { "bash", shell_Bourne }, // GNU Bourne again shell + { NULL, shell_Unknown } +}; + +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 void childDone(int sig); + +static NSPortMessage *signalMessage; +static pid_t clientPID; +static XServer *oneXServer; +static NSRect aquaMenuBarBox; + + +@implementation XServer + +- (id)init +{ + self = [super init]; + oneXServer = self; + + serverLock = [[NSRecursiveLock alloc] init]; + clientPID = 0; + sendServerEvents = NO; + serverVisible = NO; + rootlessMenuBarVisible = YES; + appQuitting = NO; + mouseState = 0; + eventWriteFD = quartzEventWriteFD; + windowClass = [XWindow class]; + + // 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]) { + appQuitting = YES; + if (clientPID != 0) + kill(clientPID, SIGINT); + return NSTerminateNow; + } + + if (clientPID != 0 || !quartzStartClients) { + int but; + + // Hide the X server and stop sending it events + [self hide]; + sendServerEvents = NO; + + but = NSRunAlertPanel(NSLocalizedString(@"Quit X server?",@""), + NSLocalizedString(@"Quitting the X server will terminate any running X Window System programs.",@""), + NSLocalizedString(@"Quit",@""), + NSLocalizedString(@"Cancel",@""), + nil); + + switch (but) { + case NSAlertDefaultReturn: // quit + break; + case NSAlertAlternateReturn: // cancel + sendServerEvents = YES; + return NSTerminateCancel; + } + } + + appQuitting = YES; + if (clientPID != 0) + kill(clientPID, SIGINT); + [self killServer]; + return NSTerminateNow; +} + +// Ensure that everything has quit cleanly +- (void)applicationWillTerminate:(NSNotification *)aNotification +{ + // Make sure the client process has finished + if (clientPID != 0) { + NSLog(@"Waiting on client process..."); + sleep(2); + + // If the client process hasn't finished yet, kill it off + if (clientPID != 0) { + int clientStatus; + NSLog(@"Killing client process..."); + killpg(clientPID, SIGKILL); + waitpid(clientPID, &clientStatus, 0); + } + } + + // Wait until the X server thread quits + [serverLock lock]; +} + +// returns YES when event was handled +- (BOOL)translateEvent:(NSEvent *)anEvent +{ + NXEvent ev; + static BOOL mouse1Pressed = NO; + BOOL onScreen; + + if (!sendServerEvents) { + return NO; + } + + ev.type = [anEvent type]; + ev.flags = [anEvent modifierFlags]; + + if (!quartzRootless) { + // Check for switch keypress + if ((ev.type == NSKeyDown) && (![anEvent isARepeat]) && + ([anEvent keyCode] == [Preferences keyCode])) + { + unsigned int switchFlags = [Preferences modifiers]; + + // Switch if all the switch modifiers are pressed, while none are + // pressed that should not be, except for caps lock. + if (((ev.flags & switchFlags) == switchFlags) && + ((ev.flags & ~(switchFlags | NSAlphaShiftKeyMask)) == 0)) + { + [self toggle]; + return YES; + } + } + + if (!serverVisible) + return NO; + } + + // If the mouse is not on the valid X display area, + // we don't send the X server key events. + onScreen = [self getNXMouse:&ev]; + + switch (ev.type) { + case NSLeftMouseUp: + if (quartzRootless && !mouse1Pressed) { + // MouseUp after MouseDown in menu - ignore + return NO; + } + mouse1Pressed = NO; + break; + case NSLeftMouseDown: + if (quartzRootless && + ! ([anEvent window] && + [[anEvent window] isKindOfClass:windowClass])) { + // Click in non X window - ignore + return NO; + } + mouse1Pressed = YES; + 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: + if (!onScreen) + return NO; + 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]; + + // Rootless: Send first NSLeftMouseDown to windows and views so window + // ordering can be suppressed. + // Don't pass further events - they (incorrectly?) bring the window + // forward no matter what. + if (quartzRootless && + (ev.type == NSLeftMouseDown || ev.type == NSLeftMouseUp) && + [anEvent clickCount] == 1 && + [[anEvent window] isKindOfClass:windowClass]) + { + return NO; + } + + return YES; +} + +// Fill in NXEvent with mouse coordinates, inverting y coordinate. +// For rootless mode, the menu bar is treated as not part of the usable +// X display area and the cursor position is adjusted accordingly. +// Returns YES if the cursor is not in the menu bar. +- (BOOL)getNXMouse:(NXEvent*)ev +{ + NSPoint pt = [NSEvent mouseLocation]; + + ev->location.x = (int)(pt.x); + + if (quartzRootless && NSMouseInRect(pt, aquaMenuBarBox, NO)) { + // mouse in menu bar - tell X11 that it's just below instead + ev->location.y = aquaMenuBarHeight; + return NO; + } else { + ev->location.y = NSHeight([[NSScreen mainScreen] frame]) - (int)(pt.y); + return YES; + } +} + +// 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 +{ + // Block SIGPIPE + // SIGPIPE repeatably killed the (rootless) server when closing a + // dozen xterms in rapid succession. Those SIGPIPEs should have been + // sent to the X server thread, which ignores them, but somehow they + // ended up in this thread instead. + { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGPIPE); + // pthread_sigmask not implemented yet + // pthread_sigmask(SIG_BLOCK, &set, NULL); + sigprocmask(SIG_BLOCK, &set, NULL); + } + + if (quartzRootless == -1) { + // The display mode was not set from the command line. + // Show mode pick panel? + if ([Preferences modeWindow]) { + if ([Preferences rootless]) + [startRootlessButton setKeyEquivalent:@"\r"]; + else + [startFullScreenButton setKeyEquivalent:@"\r"]; + [modeWindow makeKeyAndOrderFront:nil]; + } else { + // Otherwise use default mode + quartzRootless = [Preferences rootless]; + [self startX]; + } + } else { + [self startX]; + } +} + +// Start the X server thread and the client process +- (void)startX +{ + NSDictionary *appDictionary; + NSString *appVersion; + + [modeWindow close]; + + // Calculate the height of the menu bar so rootless mode can avoid it + if (quartzRootless) { + aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) - + NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1; + aquaMenuBarBox = + NSMakeRect(0, NSMaxY([[NSScreen mainScreen] visibleFrame]) + 1, + NSWidth([[NSScreen mainScreen] frame]), + aquaMenuBarHeight); + } + + // Write the XDarwin version to the console log + appDictionary = [[NSBundle mainBundle] infoDictionary]; + appVersion = [appDictionary objectForKey:@"CFBundleShortVersionString"]; + if (appVersion) + NSLog(@"\n%@", appVersion); + else + NSLog(@"No version"); + + // Start the X server thread + [NSThread detachNewThreadSelector:@selector(run) toTarget:self + withObject:nil]; + sendServerEvents = YES; + + // Start the X clients if started from GUI + if (quartzStartClients) { + [self startXClients]; + } + + if (quartzRootless) { + // There is no help window for rootless; just start + [helpWindow close]; + helpWindow = nil; + if ([NSApp isActive]) + [self sendShowHide:YES]; + else + [self sendShowHide:NO]; + } else { + // Show the X switch window if not using dock icon switching + if (![Preferences dockSwitch]) + [switchWindow orderFront:nil]; + + if ([Preferences startupHelp]) { + // display the full screen mode help + [self sendShowHide:NO]; + [helpWindow makeKeyAndOrderFront:nil]; + } else { + // start running full screen and make sure X is visible + ShowMenuBar(); + [self closeHelpAndShow:nil]; + } + } +} + +// Start the first X clients in a separate process +- (BOOL)startXClients +{ + struct passwd *passwdUser; + NSString *shellPath, *dashShellName, *commandStr, *startXPath; + NSMutableString *safeStartXPath; + NSRange aRange; + NSBundle *thisBundle; + const char *shellPathStr, *newargv[3], *shellNameStr; + int fd[2], outFD, length, shellType, i; + + // Register to catch the signal when the client processs finishes + signal(SIGCHLD, childDone); + + // Get user's password database entry + passwdUser = getpwuid(getuid()); + + // Find the shell to use + if ([Preferences useDefaultShell]) + shellPath = [NSString stringWithCString:passwdUser->pw_shell]; + else + shellPath = [Preferences shellString]; + + dashShellName = [NSString stringWithFormat:@"-%@", + [shellPath lastPathComponent]]; + shellPathStr = [shellPath cString]; + shellNameStr = [[shellPath lastPathComponent] cString]; + + if (access(shellPathStr, X_OK)) { + NSLog(@"Shell %s is not valid!", shellPathStr); + return NO; + } + + // Find the type of shell + for (i = 0; shellList[i].name; i++) { + if (!strcmp(shellNameStr, shellList[i].name)) + break; + } + shellType = shellList[i].type; + + newargv[0] = [dashShellName cString]; + if (shellType == shell_Bourne) { + // Bourne shells need to be told they are interactive to make + // sure they read all their initialization files. + newargv[1] = "-i"; + newargv[2] = NULL; + } else { + newargv[1] = NULL; + } + + // Create a pipe to communicate with the X client process + NSAssert(pipe(fd) == 0, @"Could not create new pipe."); + + // Open a file descriptor for writing to stdout and stderr + outFD = open("/dev/console", O_WRONLY, 0); + if (outFD == -1) { + outFD = open("/dev/null", O_WRONLY, 0); + NSAssert(outFD != -1, @"Could not open shell output."); + } + + // Fork process to start X clients in user's default shell + // Sadly we can't use NSTask because we need to start a login shell. + // Login shells are started by passing "-" as the first character of + // argument 0. NSTask forces argument 0 to be the shell's name. + clientPID = vfork(); + if (clientPID == 0) { + + // Inside the new process: + if (fd[0] != STDIN_FILENO) { + dup2(fd[0], STDIN_FILENO); // Take stdin from pipe + close(fd[0]); + } + close(fd[1]); // Close write end of pipe + if (outFD == STDOUT_FILENO) { // Setup stdout and stderr + dup2(outFD, STDERR_FILENO); + } else if (outFD == STDERR_FILENO) { + dup2(outFD, STDOUT_FILENO); + } else { + dup2(outFD, STDERR_FILENO); + dup2(outFD, STDOUT_FILENO); + close(outFD); + } + + // Setup environment + setenv("HOME", passwdUser->pw_dir, 1); + setenv("SHELL", shellPathStr, 1); + setenv("LOGNAME", passwdUser->pw_name, 1); + setenv("USER", passwdUser->pw_name, 1); + setenv("TERM", "unknown", 1); + if (chdir(passwdUser->pw_dir)) // Change to user's home dir + NSLog(@"Could not change to user's home directory."); + + execv(shellPathStr, newargv); // Start user's shell + + NSLog(@"Could not start X client process with errno = %i.", errno); + _exit(127); + } + + // In parent process: + close(fd[0]); // Close read end of pipe + close(outFD); // Close output file descriptor + + thisBundle = [NSBundle bundleForClass:[self class]]; + startXPath = [thisBundle pathForResource:@"startXClients" ofType:nil]; + if (!startXPath) { + NSLog(@"Could not find startXClients in application bundle!"); + return NO; + } + + // We will run the startXClients script with the path in single quotes + // in case there are problematic characters in the path. We still have + // to worry about there being single quotes in the path. So, replace + // all instances of the ' character in startXPath with '\''. + safeStartXPath = [NSMutableString stringWithString:startXPath]; + aRange = NSMakeRange(0, [safeStartXPath length]); + while (aRange.length) { + aRange = [safeStartXPath rangeOfString:@"'" options:0 range:aRange]; + if (!aRange.length) + break; + [safeStartXPath replaceCharactersInRange:aRange + withString:@"\'\\'\'"]; + aRange.location += 4; + aRange.length = [safeStartXPath length] - aRange.location; + } + + if ([Preferences addToPath]) { + commandStr = [NSString stringWithFormat:@"'%@' :%d %@\n", + safeStartXPath, [Preferences display], + [Preferences addToPathString]]; + } else { + commandStr = [NSString stringWithFormat:@"'%@' :%d\n", + safeStartXPath, [Preferences display]]; + } + + length = [commandStr cStringLength]; + if (write(fd[1], [commandStr cString], length) != length) { + NSLog(@"Write to X client process failed."); + return NO; + } + + // Close the pipe so that shell will terminate when xinit quits + close(fd[1]); + + return YES; +} + +// Run the X server thread +- (void)run +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + [serverLock lock]; + main(argcGlobal, argvGlobal, envpGlobal); + serverVisible = NO; + [pool release]; + [serverLock unlock]; + QuartzMessageMainThread(kQuartzServerDied); +} + +// Full screen mode was picked in the mode pick panel +- (IBAction)startFullScreen:(id)sender +{ + [Preferences setModeWindow:[startupModeButton intValue]]; + [Preferences saveToDisk]; + quartzRootless = FALSE; + [self startX]; +} + +// Rootless mode was picked in the mode pick panel +- (IBAction)startRootless:(id)sender +{ + [Preferences setModeWindow:[startupModeButton intValue]]; + [Preferences saveToDisk]; + quartzRootless = TRUE; + [self startX]; +} + +// Close the help splash screen and show the X server +- (IBAction)closeHelpAndShow:(id)sender +{ + if (sender) { + int helpVal = [startupHelpButton intValue]; + [Preferences setStartupHelp:helpVal]; + [Preferences saveToDisk]; + } + [helpWindow close]; + helpWindow = nil; + + serverVisible = YES; + [self sendShowHide:YES]; + [NSApp activateIgnoringOtherApps:YES]; +} + +// Show the X server when sent message from GUI +- (IBAction)showAction:(id)sender +{ + if (sendServerEvents) + [self sendShowHide:YES]; +} + +// Show or hide the X server or menu bar in rootless mode +- (void)toggle +{ + if (quartzRootless) { +#if 0 + // FIXME: Remove or add option to not dodge menubar + if (rootlessMenuBarVisible) + HideMenuBar(); + else + ShowMenuBar(); + rootlessMenuBarVisible = !rootlessMenuBarVisible; +#endif + } else { + if (serverVisible) + [self hide]; + else + [self show]; + } +} + +// Show the X server on screen +- (void)show +{ + if (!serverVisible && sendServerEvents) { + [self sendShowHide:YES]; + } +} + +// Hide the X server from the screen +- (void)hide +{ + if (serverVisible && sendServerEvents) { + [self sendShowHide:NO]; + } +} + +// Kill the X server 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. +// +// In full screen mode, the order we do things is important and must be +// preserved between the threads. X drawing operations have to be performed +// in the X server thread. It appears that we have the additional +// constraint that we must hide and show the menu bar in the main thread. +// +// To show the X server: +// 1. Capture the displays. (Main thread) +// 2. Hide the menu bar. (Must be in main thread) +// 3. Send event to X server thread to redraw X screen. +// 4. Redraw the X screen. (Must be in X server thread) +// +// To hide the X server: +// 1. Send event to X server thread to stop drawing. +// 2. Stop drawing to the X screen. (Must be in X server thread) +// 3. Message main thread that drawing is stopped. +// 4. If main thread still wants X server hidden: +// a. Release the displays. (Main thread) +// b. Unhide the menu bar. (Must be in main thread) +// Otherwise we have already queued an event to start drawing again. +// +- (void)sendShowHide:(BOOL)show +{ + NXEvent ev; + + [self getNXMouse:&ev]; + ev.type = NX_APPDEFINED; + + if (show) { + if (!quartzRootless) { + QuartzFSCapture(); + 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]; + } + + 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 +{ + int bytesWritten; + + if (quartzRootless && + (ev->type == NSLeftMouseDown || ev->type == NSLeftMouseUp || + (ev->type == NSSystemDefined && ev->data.compound.subType == 7))) + { + // mouse button event - send mouseMoved to this position too + // X gets confused if it gets a click that isn't at the last + // reported mouse position. + NXEvent moveEvent = *ev; + moveEvent.type = NSMouseMoved; + [self sendNXEvent:&moveEvent]; + } + + bytesWritten = write(eventWriteFD, ev, sizeof(*ev)); + if (bytesWritten == 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: + // Make sure the X server wasn't queued to be shown again while + // the hide was pending. + if (!quartzRootless && !serverVisible) { + QuartzFSRelease(); + ShowMenuBar(); + } + + // FIXME: This hack is necessary (but not completely effective) + // since Mac OS X 10.0.2 + [NSCursor unhide]; + break; + + case kQuartzServerDied: + sendServerEvents = NO; + if (!appQuitting) { + [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 process finishes +- (void)clientProcessDone:(int)clientStatus +{ + if (WIFEXITED(clientStatus)) { + int exitStatus = WEXITSTATUS(clientStatus); + if (exitStatus != 0) + NSLog(@"X client process terminated with status %i.", exitStatus); + } else { + NSLog(@"X client process 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. +// Rootless: Don't switch until applicationWillBecomeActive. +- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication + hasVisibleWindows:(BOOL)flag +{ + if ([Preferences dockSwitch] && !quartzRootless) { + [self show]; + } + return NO; +} + +- (void)applicationWillResignActive:(NSNotification *)aNotification +{ + [self hide]; +} + +- (void)applicationWillBecomeActive:(NSNotification *)aNotification +{ + if (quartzRootless) + [self show]; +} + +@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]]; +} + +// Handle SIGCHLD signals +static void childDone(int sig) +{ + int clientStatus; + + if (clientPID == 0) + return; + + // Make sure it was the client task that finished + if (waitpid(clientPID, &clientStatus, WNOHANG) == clientPID) { + if (WIFSTOPPED(clientStatus)) + return; + clientPID = 0; + [oneXServer clientProcessDone:clientStatus]; + } +} Index: xc/programs/Xserver/hw/darwin/quartz_1.3/XView.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/XView.h:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/XView.h Wed Mar 27 21:21:20 2002 @@ -0,0 +1,50 @@ +/* + * NSView subclass for Mac OS X rootless X server + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/XView.h,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#import <Cocoa/Cocoa.h> + +#include <drivers/event_status_driver.h> +#include "fakeBoxRec.h" + +@interface XView : NSView +{ + char *mBits; + int mBytesPerRow; + int mBitsPerSample; + int mSamplesPerPixel; + int mBitsPerPixel; + int mDepth; + BOOL mShaped; +} + +- (id)initWithFrame:(NSRect)aRect; +- (void)dealloc; + +- (void)drawRect:(NSRect)aRect; +- (BOOL)isFlipped; +- (BOOL)acceptsFirstResponder; +- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent; +- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent; + +- (void)mouseDown:(NSEvent *)anEvent; + +- (void)setFrameSize:(NSSize)newSize; + +- (void)allocBitsForSize:(NSSize)newSize; +- (char *)bits; +- (void)getBits:(char **)bits + rowBytes:(int *)rowBytes + depth:(int *)depth + bitsPerPixel:(int *)bpp; + +- (void)refreshRects:(fakeBoxRec *)rectList count:(int)count; +- (void)reshapeRects:(fakeBoxRec *)eraseRects count:(int)count; + +- (void)copyToScreen:(fakeBoxRec *)rectList count:(int)count + fromTemp:(BOOL)copyFromTemp; +- (void)copyToShapeBits:(fakeBoxRec *)rectList count:(int)count; +- (void)eraseFromShapeBits:(fakeBoxRec *)rectList count:(int)count; + +@end Index: xc/programs/Xserver/hw/darwin/quartz_1.3/XView.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/XView.m:1.1 --- /dev/null Thu Feb 27 12:29:20 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/XView.m Wed Mar 27 21:21:20 2002 @@ -0,0 +1,330 @@ +/* + * NSView subclass for Mac OS X rootless X server + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/XView.m,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#include <ApplicationServices/ApplicationServices.h> + +#import "XView.h" +#include "fakeBoxRec.h" + +static const void *infobytes(void *info) +{ + return info; +} + + +static unsigned long *shapeBits = NULL; +static int shapeWidth = 0; +static int shapeHeight = 0; + +static void reallocShapeBits(NSSize minSize) +{ + if (shapeWidth < minSize.width || shapeHeight < minSize.height) { + shapeWidth = minSize.width; + shapeHeight = minSize.height; + if (shapeBits) free(shapeBits); + shapeBits = (unsigned long *) malloc(4 * shapeWidth * shapeHeight); + } +} + + +@implementation XView + +- (id)initWithFrame:(NSRect)aRect +{ + self = [super initWithFrame:aRect]; + if (!self) return nil; + + mShaped = NO; + mBitsPerSample = 8; + mSamplesPerPixel = 3; + mDepth = mBitsPerSample * mSamplesPerPixel; + mBitsPerPixel = 32; + mBits = nil; + [self allocBitsForSize:aRect.size]; + + return self; +} + +- (void)dealloc +{ + if (mBits) free(mBits); + [super dealloc]; +} + +- (void)drawRect:(NSRect)aRect +{ + // Never draw here. +} + +- (BOOL)isFlipped +{ + return NO; +} + +- (BOOL)isOpaque +{ + return !mShaped; +} + +- (BOOL)acceptsFirstResponder +{ + return YES; +} + +- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent +{ + return YES; +} + +- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent +{ + return YES; +} + + +- (void)mouseDown:(NSEvent *)anEvent +{ + // Only X is allowed to restack windows. + [NSApp preventWindowOrdering]; + [[self nextResponder] mouseDown:anEvent]; +} + +- (void)mouseUp:(NSEvent *)anEvent +{ + // Bring app to front if necessary + // Don't bring app to front in mouseDown; mousedown-mouseup is too + // long and X gets what looks like a mouse drag. + if (! [NSApp isActive]) { + [NSApp activateIgnoringOtherApps:YES]; + [NSApp arrangeInFront:nil]; // fixme only bring some windows forward? + } + + [[self nextResponder] mouseDown:anEvent]; +} + + +// Reallocate bits. +// setFrame goes through here too. +- (void)setFrameSize:(NSSize)newSize +{ + [self allocBitsForSize:newSize]; + [super setFrameSize:newSize]; +} + +- (void)allocBitsForSize:(NSSize)newSize +{ + if (mBits) free(mBits); + mBytesPerRow = newSize.width * mBitsPerPixel / 8; + mBits = calloc(mBytesPerRow * newSize.height, 1); +} + +- (char *)bits +{ + return mBits; +} + +- (void)getBits:(char **)bits + rowBytes:(int *)rowBytes + depth:(int *)depth + bitsPerPixel:(int *)bpp +{ + *bits = mBits; + *rowBytes = mBytesPerRow; + *depth = mDepth; + *bpp = mBitsPerPixel; +} + +- (void)refreshRects:(fakeBoxRec *)rectList count:(int)count +{ + if (!mShaped) { + [self lockFocus]; + [self copyToScreen:rectList count:count fromTemp:NO]; + } else { + [self copyToShapeBits:rectList count:count]; + [self lockFocus]; + [self copyToScreen:rectList count:count fromTemp:YES]; + } + [[NSGraphicsContext currentContext] flushGraphics]; + [self unlockFocus]; +} + +// eraseRects are OUTSIDE the new shape +- (void)reshapeRects:(fakeBoxRec *)eraseRects count:(int)count +{ + fakeBoxRec bounds = {0, 0, [self frame].size.width, + [self frame].size.height}; + + if (count == 0 && !mShaped) { + [self refreshRects:&bounds count:1]; + } else { + // View is shaped, or used to be shaped. + // Shaped windows never become unshaped. + // (Mac OS X 10.0.4 does not allow transparent windows + // to become opaque.) + + mShaped = YES; + + // Magic. 10.0.4 and 10.1 both require the alpha channel to be + // cleared explicitly. 10.0.4 additionally requires the view to + // be unlocked between this and the drawing code below. + [self lockFocus]; + [[NSColor clearColor] set]; + NSRectFill([self frame]); + [self unlockFocus]; + + // copy everything from X11 to temp + // erase eraseRects from temp + // copy everything from temp to screen + [self lockFocus]; + [self copyToShapeBits:&bounds count:1]; + [self eraseFromShapeBits:eraseRects count:count]; + [self copyToScreen:&bounds count:1 fromTemp:YES]; + [[NSGraphicsContext currentContext] flushGraphics]; + [self unlockFocus]; + } +} + + +- (void)eraseFromShapeBits:(fakeBoxRec *)rectList count:(int)count +{ + unsigned long *dst = NULL; // don't assign yet + int dstWidth = 0; // don't assign yet + fakeBoxRec *r; + fakeBoxRec *end; + + assert(mBitsPerPixel == 32); + reallocShapeBits([self frame].size); + dst = shapeBits; + dstWidth = shapeWidth; + + for (r = rectList, end = rectList + count; r < end; r++) { + unsigned long *dstline = dst + dstWidth*r->y1 + r->x1; + int h = r->y2 - r->y1; + + while (h--) { + unsigned long *dstp = dstline; + int w = r->x2 - r->x1; + + while (w--) { + *dstp++ = 0x00000000; + } + dstline += dstWidth; + } + } +} + +// assumes X11 bits and temp bits are 32-bit +- (void)copyToShapeBits:(fakeBoxRec *)rectList count:(int)count +{ + unsigned long *src = (unsigned long *) mBits; + unsigned long *dst = NULL; // don't assign yet + int srcWidth = mBytesPerRow / 4; + int dstWidth = 0; // don't assign yet + fakeBoxRec *r; + fakeBoxRec *end; + + assert(mBitsPerPixel == 32); + reallocShapeBits([self frame].size); + dst = shapeBits; + dstWidth = shapeWidth; + + for (r = rectList, end = rectList + count; r < end; r++) { + unsigned long *srcline = src + srcWidth*r->y1 + r->x1; + unsigned long *dstline = dst + dstWidth*r->y1 + r->x1; + int h = r->y2 - r->y1; + + while (h--) { + unsigned long *srcp = srcline; + unsigned long *dstp = dstline; + int w = r->x2 - r->x1; + + while (w--) { + *dstp++ = *srcp++ | 0xff000000; + } + srcline += srcWidth; + dstline += dstWidth; + } + } +} + + +// Copy boxes to the screen from the per-window pixmaps where X draws. +// rectList is in local, X-flipped coordinates. +- (void)copyToScreen:(fakeBoxRec *)rectList count:(int)count + fromTemp:(BOOL)copyFromTemp +{ + unsigned char *offsetbits; + fakeBoxRec *r; + fakeBoxRec *end; + NSRect bounds; + char *srcBits; + int bytesPerRow; + int bitsPerPixel; + int bitsPerSample; + CGImageAlphaInfo alpha; + CGContextRef destCtx = (CGContextRef)[[NSGraphicsContext currentContext] + graphicsPort]; + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + // fixme colorspace leaks? + const CGDataProviderDirectAccessCallbacks cb = { + infobytes, NULL, NULL, NULL + }; + + if (copyFromTemp) { + // shapeBits assumed to be 32-bit + srcBits = (char *)shapeBits; + bytesPerRow = 4 * shapeWidth; + bitsPerPixel = 32; + bitsPerSample = 8; + alpha = kCGImageAlphaPremultipliedFirst; // premultiplied ARGB + } else { + srcBits = mBits; + bytesPerRow = mBytesPerRow; + bitsPerPixel = mBitsPerPixel; + bitsPerSample = mBitsPerSample; + alpha = kCGImageAlphaNoneSkipFirst; // xRGB + } + + bounds = [self frame]; + bounds.origin.x = bounds.origin.y = 0; + + for (r = rectList, end = rectList + count; r < end; r++) { + NSRect nsr = {{r->x1, r->y1}, {r->x2-r->x1, r->y2-r->y1}}; + CGRect destRect; + CGDataProviderRef dataProviderRef; + CGImageRef imageRef; + + // Clip to window + // (bounds origin is (0,0) so it can be used in either flip) + // fixme is this necessary with pixmap-per-window? + nsr = NSIntersectionRect(nsr, bounds); + + // Disallow empty rects + if (nsr.size.width <= 0 || nsr.size.height <= 0) continue; + + offsetbits = srcBits + (int)(nsr.origin.y * bytesPerRow + + nsr.origin.x * bitsPerPixel/8); + + // Flip r to Cocoa-flipped + nsr.origin.y = bounds.size.height - nsr.origin.y - nsr.size.height; + destRect = CGRectMake(nsr.origin.x, nsr.origin.y, + nsr.size.width, nsr.size.height); + + dataProviderRef = CGDataProviderCreateDirectAccess(offsetbits, + destRect.size.height * bytesPerRow, &cb); + + imageRef = CGImageCreate(destRect.size.width, destRect.size.height, + bitsPerSample, bitsPerPixel, bytesPerRow, + colorSpace, alpha, dataProviderRef, NULL, + 1, kCGRenderingIntentDefault); + + CGContextDrawImage(destCtx, destRect, imageRef); + CGImageRelease(imageRef); + CGDataProviderRelease(dataProviderRef); + } +} + + +@end Index: xc/programs/Xserver/hw/darwin/quartz_1.3/XWindow.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/XWindow.h:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/XWindow.h Wed Mar 27 21:21:20 2002 @@ -0,0 +1,36 @@ +/* + * NSWindow subclass for Mac OS X rootless X server + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/XWindow.h,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#import <Cocoa/Cocoa.h> +#import "XView.h" + +#include "fakeBoxRec.h" + +@interface XWindow : NSWindow +{ + XView *mView; +} + +- (id)initWithContentRect:(NSRect)aRect + isRoot:(BOOL)isRoot; +- (void)dealloc; + +- (char *)bits; +- (void)getBits:(char **)bits + rowBytes:(int *)rowBytes + depth:(int *)depth + bitsPerPixel:(int *)bpp; + +- (void)refreshRects:(fakeBoxRec *)rectList + count:(int)count; + +- (void)orderWindow:(NSWindowOrderingMode)place + relativeTo:(int)otherWindowNumber; + +- (void)sendEvent:(NSEvent *)anEvent; +- (BOOL)canBecomeMainWindow; +- (BOOL)canBecomeKeyWindow; + +@end Index: xc/programs/Xserver/hw/darwin/quartz_1.3/XWindow.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/XWindow.m:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/XWindow.m Wed Mar 27 21:21:20 2002 @@ -0,0 +1,104 @@ +/* + * NSWindow subclass for Mac OS X rootless X server + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/XWindow.m,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#import "XWindow.h" + + +@implementation XWindow + +// XWindow MUST NOT autodisplay! Autodisplay can cause a deadlock. +// event thread - autodisplay: locks view hierarchy, then window +// X Server thread - window resize: locks window, then view hierarchy +// Deadlock occurs if each thread gets one lock and waits for the other. + +// XWindow MUST defer! Otherwise an assertion fails in +// NSViewHierarchyLock sometimes. + +- (id)initWithContentRect:(NSRect)aRect + isRoot:(BOOL)isRoot +{ + int style; + NSRect viewRect = {{0, 0}, {aRect.size.width, aRect.size.height}}; + style = NSBorderlessWindowMask; + + self = [super initWithContentRect: aRect + styleMask: style + backing: NSBackingStoreBuffered + defer: YES]; + if (! self) return NULL; + + [self setBackgroundColor:[NSColor clearColor]]; // erase transparent + [self setAlphaValue:1.0]; // draw opaque + [self setOpaque:YES]; // changed when window is shaped + + [self useOptimizedDrawing:YES]; // Has no overlapping sub-views + [self setAutodisplay:NO]; // MUST NOT autodisplay! See comment above + [self disableFlushWindow]; // We do all the flushing manually + [self setHasShadow: !isRoot]; // All windows have shadows except root + + // [self setAcceptsMouseMovedEvents:YES]; // MUST be AFTER orderFront? + + mView = [[XView alloc] initWithFrame: viewRect]; + [self setContentView:mView]; + [self setInitialFirstResponder:mView]; + + return self; +} + +- (void)dealloc +{ + [mView release]; + [super dealloc]; +} + +- (char *)bits +{ + return [mView bits]; +} + +- (void)getBits:(char **)bits + rowBytes:(int *)rowBytes + depth:(int *)depth + bitsPerPixel:(int *)bpp +{ + [mView getBits:bits rowBytes:rowBytes depth:depth bitsPerPixel:bpp]; +} + + +// rects are X-flip and LOCAL coords +- (void)refreshRects:(fakeBoxRec *)rectList count:(int)count; +{ + [mView refreshRects:rectList count:count]; +} + + +// Deferred windows don't handle mouse moved events very well. +- (void)orderWindow:(NSWindowOrderingMode)place + relativeTo:(int)otherWindowNumber +{ + [super orderWindow:place relativeTo:otherWindowNumber]; + [self setAcceptsMouseMovedEvents:YES]; +} + +- (void)sendEvent:(NSEvent *)anEvent +{ + [super sendEvent:anEvent]; + [self setAcceptsMouseMovedEvents:YES]; +} + +// XWindow may be frameless, and frameless windows default to +// NO key and NO main. +// update: we *don't* want main or key status after all +- (BOOL)canBecomeMainWindow +{ + return NO; +} + +- (BOOL)canBecomeKeyWindow +{ + return NO; +} + +@end Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootless.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootless.h:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootless.h Wed Mar 27 21:21:20 2002 @@ -0,0 +1,127 @@ +/* + * External interface to generic rootless mode + * + * Greg Parker gparker@cs.stanford.edu March 3, 2001 + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootless.h,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#ifndef _ROOTLESS_H +#define _ROOTLESS_H + +#include "mi.h" +#include "gcstruct.h" + +// RootlessFrameRec +// Describes a single rootless window (aka frame). +// The rootless mode keeps track of window position, and the +// rootless implementation is responsible for the pixmap. +// Multiple screens: all coordinates are SCREEN-LOCAL, not global. + + +typedef struct RootlessFrameRec { + /* Data maintained by rootless mode */ + /* position and size, including window border, in screen coordinates */ + int x; + int y; + unsigned int w; + unsigned int h; + WindowPtr win; /* the top-level window drawn in this frame */ + int isRoot; /* TRUE if this is the root window */ + + /* Data maintained by rootless implementation */ + char *pixelData; + int depth; // color bits per pixel; depth <= bitsPerPixel + int bitsPerPixel; + int bytesPerRow; + + void *devPrivate; /* for caller's use */ +} RootlessFrameRec, *RootlessFramePtr; + + +// Create a new frame. +// pUpper is the window above the new frame, or NULL if the new +// frame will be on top. +// pFrame is completely initialized. devPrivate is NULL +// The pixmap must be valid when this is done. +typedef void (*RootlessCreateFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, RootlessFramePtr pUpper); + +// Destroy a frame. Caller must free any private data and the pixmap. +// All drawing is stopped and all updates are flushed before this is called. +typedef void (*RootlessDestroyFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame); + +// Move a frame on screen. +// The frame changes position and nothing else. +// pFrame and pFrame->win already contain the information about the +// new position. oldX and oldY are the old position. +// All updates are flushed before this is called. +// The pixmap may change during this function. +typedef void (*RootlessMoveFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, int oldX, int oldY); + +// Change frame ordering (aka stacking, layering) +// pFrame->win already has its new siblings. +// pOldNext is the window that was below this one, or NULL if this was +// at the bottom. +// pNewNext is the window that is now below this one, or NULL if this is +// now at the bottom. +typedef void (*RootlessRestackFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, + RootlessFramePtr pOldNext, RootlessFramePtr pNewNext); + +// Flush drawing updates to the screen. +// pDamage contains all changed pixels. +// pDamage is in frame-local coordinates. +// pDamage is clipped to the frame bounds and the frame shape. +typedef void (*RootlessUpdateRegionProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, RegionPtr pDamage); + +// Change the frame's shape. +// pNewShape is in frame-local coordinates. +// Everything outside pNewShape is no longer part of the frame. +// pNewShape is {0, 0, width, height} for a plain-shaped frame. +// fixme can the pixmap change here? +// fixme reimplement shape +typedef void (*RootlessReshapeFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, RegionPtr pNewShape); + +// Frame is about to resize. +// The frame has its new position and size already. +// postconditions: +// The pixmap MUST point to a pixmap with the new size. +// The pixmap data is undefined. +// The old pixmap may be destroyed here. +typedef void (*RootlessStartResizeFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, unsigned int oldW, unsigned int oldH); + +// Frame is done resizing. +// Destroy the old pixmap if you haven't already. +typedef void (*RootlessFinishResizeFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, unsigned int oldW, unsigned int oldH); + + +// The callback function list. +// Any of these may be NULL. +typedef struct RootlessFrameProcs { + RootlessCreateFrameProc CreateFrame; + RootlessDestroyFrameProc DestroyFrame; + + RootlessMoveFrameProc MoveFrame; + RootlessStartResizeFrameProc StartResizeFrame; + RootlessFinishResizeFrameProc FinishResizeFrame; + RootlessRestackFrameProc RestackFrame; + RootlessReshapeFrameProc ReshapeFrame; + + RootlessUpdateRegionProc UpdateRegion; + + // RootlessStartDrawingProc StartDrawing; + // RootlessStopDrawingProc StopDrawing; +} RootlessFrameProcs; + +// Initialize rootless mode on the given screen. +Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcs *procs); + +#endif /* _ROOTLESS_H */ Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAqua.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAqua.h:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAqua.h Wed Mar 27 21:21:20 2002 @@ -0,0 +1,15 @@ +/* + * Rootless setup for Aqua + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAqua.h,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#ifndef _ROOTLESSAQUA_H +#define _ROOTLESSAQUA_H + +Bool AquaAddScreen(int index, ScreenPtr pScreen); +Bool AquaSetupScreen(int index, ScreenPtr pScreen); +void AquaDisplayInit(void); + +#endif /* _ROOTLESSAQUA_H */ Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaGlue.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaGlue.c:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaGlue.c Wed Mar 27 21:21:20 2002 @@ -0,0 +1,226 @@ +/* + * Generic rootless to Aqua specific glue code + * + * This code acts as a glue between the generic rootless X server code + * and the Aqua specific implementation, which includes definitions that + * conflict with stardard X types. + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaGlue.c,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#include "quartzCommon.h" +#include "darwin.h" +#include "rootlessAqua.h" +#include "rootlessAquaImp.h" +#include "rootless.h" + +#include "regionstr.h" +#include "scrnintstr.h" +#include "globals.h" // dixScreenOrigins[] + + +///////////////////////////////////////// +// Rootless mode callback glue + +static void +AquaGlueCreateFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + RootlessFramePtr pUpper) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + pFrame->devPrivate = AquaNewWindow(pUpper ? pUpper->devPrivate : NULL, + pFrame->x + sx, pFrame->y + sy, + pFrame->w, pFrame->h, + pFrame->isRoot); + AquaGetPixmap(pFrame->devPrivate, &pFrame->pixelData, + &pFrame->bytesPerRow, &pFrame->depth, + &pFrame->bitsPerPixel); +} + + +static void +AquaGlueDestroyFrame(ScreenPtr pScreen, RootlessFramePtr pFrame) +{ + AquaDestroyWindow(pFrame->devPrivate); +} + +static void +AquaGlueMoveFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + AquaMoveWindow(pFrame->devPrivate, pFrame->x + sx, pFrame->y + sy); +} + + +static void +AquaGlueStartResizeFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + AquaStartResizeWindow(pFrame->devPrivate, + pFrame->x + sx, pFrame->y + sy, pFrame->w, pFrame->h); + AquaGetPixmap(pFrame->devPrivate, &pFrame->pixelData, + &pFrame->bytesPerRow, &pFrame->depth, + &pFrame->bitsPerPixel); +} + +static void +AquaGlueFinishResizeFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + AquaFinishResizeWindow(pFrame->devPrivate, + pFrame->x + sx, pFrame->y + sy, + pFrame->w, pFrame->h); +} + + +static void +AquaGlueRestackFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + RootlessFramePtr pOldPrev, + RootlessFramePtr pNewPrev) +{ + AquaRestackWindow(pFrame->devPrivate, + pNewPrev ? pNewPrev->devPrivate : NULL); +} + +static void +AquaGlueReshapeFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + RegionPtr pNewShape) +{ + // Don't correct for dixScreenOrigins here. + // pNewShape is in window-local coordinates. + BoxRec shapeBox = {0, 0, pFrame->w, pFrame->h}; + if (pFrame->isRoot) return; // shouldn't happen; mi or dix covers this + + REGION_INVERSE(pScreen, pNewShape, pNewShape, &shapeBox); + AquaReshapeWindow(pFrame->devPrivate, + (fakeBoxRec *) REGION_RECTS(pNewShape), + REGION_NUM_RECTS(pNewShape)); +} + +static void +AquaGlueUpdateRegion(ScreenPtr pScreen, RootlessFramePtr pFrame, + RegionPtr pDamage) +{ + AquaUpdateRects(pFrame->devPrivate, + (fakeBoxRec *) REGION_RECTS(pDamage), + REGION_NUM_RECTS(pDamage)); +} + +#if 0 +static void +AquaGlueStartDrawing(ScreenPtr pScreen, RootlessFramePtr pFrame) +{ + AquaStartDrawing(pFrame->devPrivate, &pFrame->pixelData, + &pFrame->bytesPerRow, &pFrame->depth, + &pFrame->bitsPerPixel); +} + +static void +AquaGlueStopDrawing(ScreenPtr pScreen, RootlessFramePtr pFrame) +{ + AquaStopDrawing(pFrame->devPrivate); +} +#endif + +static RootlessFrameProcs aquaRootlessProcs = { + AquaGlueCreateFrame, + AquaGlueDestroyFrame, + AquaGlueMoveFrame, + AquaGlueStartResizeFrame, + AquaGlueFinishResizeFrame, + AquaGlueRestackFrame, + AquaGlueReshapeFrame, + AquaGlueUpdateRegion +}; + + +/////////////////////////////////////// +// Rootless mode initialization. +// Exported by rootlessAqua.h + +/* + * AquaDisplayInit + * Find all Aqua screens. + */ +void +AquaDisplayInit(void) +{ + darwinScreensFound = AquaDisplayCount(); +} + + +/* + * AquaAddScreen + * Init the framebuffer and record pixmap parameters for the screen. + */ +Bool +AquaAddScreen(int index, ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen); + CGRect cgRect; + CGDisplayCount numDisplays; + CGDisplayCount allocatedDisplays = 0; + CGDirectDisplayID *displays = NULL; + CGDisplayErr cgErr; + + dfb->pixelInfo.pixelType = kIORGBDirectPixels; + AquaScreenInit(index, &dfb->x, &dfb->y, &dfb->width, &dfb->height, + &dfb->pitch, &dfb->pixelInfo.bitsPerComponent, + &dfb->pixelInfo.componentCount, &dfb->bitsPerPixel); + dfb->colorBitsPerPixel = dfb->pixelInfo.bitsPerComponent * + dfb->pixelInfo.componentCount; + + // No frame buffer - it's all in window pixmaps. + dfb->framebuffer = NULL; // malloc(dfb.pitch * dfb.height); + + // Get all CoreGraphics displays covered by this X11 display. + cgRect = CGRectMake(dfb->x, dfb->y, dfb->width, dfb->height); + do { + cgErr = CGGetDisplaysWithRect(cgRect, 0, NULL, &numDisplays); + if (cgErr) break; + allocatedDisplays = numDisplays; + displays = xrealloc(displays, + numDisplays * sizeof(CGDirectDisplayID)); + cgErr = CGGetDisplaysWithRect(cgRect, allocatedDisplays, displays, + &numDisplays); + if (cgErr != CGDisplayNoErr) break; + } while (numDisplays > allocatedDisplays); + + if (cgErr != CGDisplayNoErr || numDisplays == 0) { + ErrorF("Could not find CGDirectDisplayID(s) for X11 screen %d: %dx%d @ %d,%d.\n", + index, dfb->width, dfb->height, dfb->x, dfb->y); + return FALSE; + } + + // This X11 screen covers all CoreGraphics displays we just found. + // If there's more than one CG display, then video mirroring is on + // or PseudoramiX is on. + displayInfo->displayCount = allocatedDisplays; + displayInfo->displayIDs = displays; + + return TRUE; +} + +/* + * AquaSetupScreen + * Setup the screen for rootless access. + */ +Bool +AquaSetupScreen(int index, ScreenPtr pScreen) +{ + return RootlessInit(pScreen, &aquaRootlessProcs); +} Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaImp.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaImp.h:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaImp.h Wed Mar 27 21:21:20 2002 @@ -0,0 +1,38 @@ +/* + * Rootless implementation for Mac OS X Aqua environment + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaImp.h,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#ifndef _ROOTLESSAQUAIMP_H +#define _ROOTLESSAQUAIMP_H + +#include "fakeBoxRec.h" + +int AquaDisplayCount(); + +void AquaScreenInit(int index, int *x, int *y, int *width, int *height, + int *rowBytes, unsigned long *bps, unsigned long *spp, + int *bpp); + +void *AquaNewWindow(void *upperw, int x, int y, int w, int h, int isRoot); + +void AquaDestroyWindow(void *rw); + +void AquaMoveWindow(void *rw, int x, int y); + +void AquaStartResizeWindow(void *rw, int x, int y, int w, int h); + +void AquaFinishResizeWindow(void *rw, int x, int y, int w, int h); + +void AquaUpdateRects(void *rw, fakeBoxRec *rects, int count); + +void AquaRestackWindow(void *rw, void *lowerw); + +void AquaReshapeWindow(void *rw, fakeBoxRec *rects, int count); + +void AquaGetPixmap(void *rw, char **bits, + int *rowBytes, int *depth, int *bpp); + +#endif /* _ROOTLESSAQUAIMP_H */ Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaImp.m diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaImp.m:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaImp.m Wed Mar 27 21:21:20 2002 @@ -0,0 +1,237 @@ +/* + * Rootless implementation for Mac OS X Aqua environment + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessAquaImp.m,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#include "rootlessAquaImp.h" +#include "XWindow.h" +#include "fakeBoxRec.h" +#include "quartzCommon.h" +#include "pseudoramiX.h" + +extern void ErrorF(const char *, ...); + +typedef struct { + XWindow *window; +} AquaWindowRec; + + +#define WINREC(rw) ((AquaWindowRec *)rw) + + +// Multihead note: When rootless mode uses PseudoramiX, the +// X server only sees one screen; only PseudoramiX itself knows +// about all of the screens. + +int AquaDisplayCount() +{ + aquaNumScreens = [[NSScreen screens] count]; + + if (noPseudoramiXExtension) { + return aquaNumScreens; + } else { + return 1; // only PseudoramiX knows about the rest + } +} + +void AquaScreenInit(int index, int *x, int *y, int *width, int *height, + int *rowBytes, unsigned long *bps, unsigned long *spp, + int *bpp) +{ + *bps = 8; + *spp = 3; + *bpp = 32; + + if (noPseudoramiXExtension) { + NSScreen *screen = [[NSScreen screens] objectAtIndex:index]; + NSRect frame = [screen frame]; + + // set x, y so (0,0) is top left of main screen + *x = NSMinX(frame); + *y = NSHeight([[NSScreen mainScreen] frame]) - NSHeight(frame) - + NSMinY(frame); + + *width = NSWidth(frame); + *height = NSHeight(frame); + *rowBytes = (*width) * (*bpp) / 8; + + // Shift the usable part of main screen down to avoid the menu bar. + if (NSEqualRects(frame, [[NSScreen mainScreen] frame])) { + *y += aquaMenuBarHeight; + *height -= aquaMenuBarHeight; + } + + } else { + int i; + NSRect unionRect = NSMakeRect(0, 0, 0, 0); + NSArray *screens = [NSScreen screens]; + + // Get the union of all screens (minus the menu bar on main screen) + for (i = 0; i < [screens count]; i++) { + NSScreen *screen = [screens objectAtIndex:i]; + NSRect frame = [screen frame]; + frame.origin.y = [[NSScreen mainScreen] frame].size.height - + frame.size.height - frame.origin.y; + if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { + frame.origin.y += aquaMenuBarHeight; + frame.size.height -= aquaMenuBarHeight; + } + unionRect = NSUnionRect(unionRect, frame); + } + + // Use unionRect as the screen size for the X server. + *x = unionRect.origin.x; + *y = unionRect.origin.y; + *width = unionRect.size.width; + *height = unionRect.size.height; + *rowBytes = (*width) * (*bpp) / 8; + + // Tell PseudoramiX about the real screens. + // InitOutput() will move the big screen to (0,0), + // so compensate for that here. + for (i = 0; i < [screens count]; i++) { + NSScreen *screen = [screens objectAtIndex:i]; + NSRect frame = [screen frame]; + int j; + + // Skip this screen if it's a mirrored copy of an earlier screen. + for (j = 0; j < i; j++) { + if (NSEqualRects(frame, [[screens objectAtIndex:j] frame])) { + ErrorF("PseudoramiX screen %d is a mirror of screen %d.\n", + i, j); + break; + } + } + if (j < i) continue; // this screen is a mirrored copy + + frame.origin.y = [[NSScreen mainScreen] frame].size.height - + frame.size.height - frame.origin.y; + + if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { + frame.origin.y += aquaMenuBarHeight; + frame.size.height -= aquaMenuBarHeight; + } + + ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, + (int)frame.size.width, (int)frame.size.height, + (int)frame.origin.x, (int)frame.origin.y); + + frame.origin.x -= unionRect.origin.x; + frame.origin.y -= unionRect.origin.y; + + ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", + i, (int)frame.origin.x, (int)frame.origin.y); + + PseudoramiXAddScreen(frame.origin.x, frame.origin.y, + frame.size.width, frame.size.height); + } + } +} + +void *AquaNewWindow(void *upperw, int x, int y, int w, int h, int isRoot) +{ + AquaWindowRec *winRec = (AquaWindowRec *)malloc(sizeof(AquaWindowRec)); + NSRect frame = NSMakeRect(x, NSHeight([[NSScreen mainScreen] frame]) - + y - h, w, h); + + winRec->window = [[XWindow alloc] initWithContentRect:frame isRoot:isRoot]; + + if (upperw) { + AquaWindowRec *upperRec = WINREC(upperw); + int uppernum = [upperRec->window windowNumber]; + [winRec->window orderWindow:NSWindowBelow relativeTo:uppernum]; + } else { + [winRec->window orderFront:nil]; + } + + // fixme hide root for now + if (isRoot) [winRec->window orderOut:nil]; + + return winRec; +} + +void AquaDestroyWindow(void *rw) +{ + AquaWindowRec *winRec = WINREC(rw); + + [winRec->window release]; +} + +void AquaMoveWindow(void *rw, int x, int y) +{ + AquaWindowRec *winRec = WINREC(rw); + NSPoint topLeft = NSMakePoint(x, NSHeight([[NSScreen mainScreen] frame]) - + y); + + [winRec->window setFrameTopLeftPoint:topLeft]; +} + +void AquaStartResizeWindow(void *rw, int x, int y, int w, int h) +{ + AquaWindowRec *winRec = WINREC(rw); + NSRect frame = NSMakeRect(x, NSHeight([[NSScreen mainScreen] frame]) - + y - h, w, h); + + [winRec->window setFrame:frame display:NO]; +} + +void AquaFinishResizeWindow(void *rw, int x, int y, int w, int h) +{ + // refresh everything? fixme yes for testing + fakeBoxRec box = {0, 0, w, h}; + AquaWindowRec *winRec = WINREC(rw); + + [winRec->window refreshRects:&box count:1]; +} + +void AquaUpdateRects(void *rw, fakeBoxRec *rects, int count) +{ + AquaWindowRec *winRec = WINREC(rw); + + [winRec->window refreshRects:rects count:count]; +} + +// fixme is this upperw or lowerw? +void AquaRestackWindow(void *rw, void *upperw) +{ + AquaWindowRec *winRec = WINREC(rw); + + if (upperw) { + AquaWindowRec *upperRec = WINREC(upperw); + int uppernum = [upperRec->window windowNumber]; + [winRec->window orderWindow:NSWindowBelow relativeTo:uppernum]; + } else { + [winRec->window orderFront:nil]; + } + // [winRec->window setAcceptsMouseMovedEvents:YES]; + // fixme prefer to orderFront whenever possible - pass upperw, not lowerw +} + +// rects are the areas not part of the new shape +void AquaReshapeWindow(void *rw, fakeBoxRec *rects, int count) +{ + AquaWindowRec *winRec = WINREC(rw); + + // make transparent if window is now shaped + // transparent windows never go back to opaque + if (count > 0) { + [winRec->window setOpaque:NO]; + } + + [[winRec->window contentView] reshapeRects:rects count:count]; + + if (! [winRec->window isOpaque]) { + // force update of window shadow + [winRec->window setHasShadow:NO]; + [winRec->window setHasShadow:YES]; + } +} + +void AquaGetPixmap(void *rw, char **bits, + int *rowBytes, int *depth, int *bpp) +{ + AquaWindowRec *winRec = WINREC(rw); + + [winRec->window getBits:bits rowBytes:rowBytes depth:depth + bitsPerPixel:bpp]; +} Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessCommon.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessCommon.c:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessCommon.c Wed Mar 27 21:21:20 2002 @@ -0,0 +1,262 @@ +/* + * Common rootless definitions and code + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessCommon.c,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#include "rootlessCommon.h" + + +RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL}; + + +// Returns the top-level parent of pWindow. +// The root is the top-level parent of itself, even though the root is +// not otherwise considered to be a top-level window. +WindowPtr TopLevelParent(WindowPtr pWindow) +{ + WindowPtr top = pWindow; + + if (IsRoot(pWindow)) return pWindow; // root is top-level parent of itself + while (top && ! IsTopLevel(top)) top = top->parent; + return top; +} + + +// Returns TRUE if this window is visible inside a frame +// (e.g. it is visible and has a top-level or root parent) +Bool IsFramedWindow(WindowPtr pWin) +{ + WindowPtr top; + + if (! pWin->realized) return FALSE; + top = TopLevelParent(pWin); + return (top && WINREC(top)); +} + + +// Move the given pixmap's base address to where pixel (0, 0) +// would be if the pixmap's actual data started at (x, y) +void SetPixmapBaseToScreen(PixmapPtr pix, int x, int y) +{ + pix->devPrivate.ptr = (char *)(pix->devPrivate.ptr) - + (pix->drawable.bitsPerPixel/8 * x + y*pix->devKind); +} + + +// Update pWindow's pixmap. +// This needs to be called every time a window moves relative to +// its top-level parent, or the parent's pixmap data is reallocated. +// Three cases: +// * window is top-level with no existing pixmap: make one +// * window is top-level with existing pixmap: update it in place +// * window is descendant of top-level: point to top-level's pixmap +void UpdatePixmap(WindowPtr pWindow) +{ + WindowPtr top = TopLevelParent(pWindow); + RootlessWindowRec *winRec; + ScreenPtr pScreen = pWindow->drawable.pScreen; + PixmapPtr pix; + + RL_DEBUG_MSG("update pixmap (win 0x%x)", pWindow); + + // Don't use IsFramedWindow(); window is unrealized during RealizeWindow(). + + if (! top) { + RL_DEBUG_MSG("no parent\n"); + return; + } + winRec = WINREC(top); + if (!winRec) { + RL_DEBUG_MSG("not framed\n"); + return; + } + + if (pWindow == top) { + // This is the top window. Update its pixmap. + if (winRec->pixmap == NULL) { + // Allocate a new pixmap. + pix = GetScratchPixmapHeader(pScreen, + winRec->frame.w, winRec->frame.h, + winRec->frame.depth, + winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, + winRec->frame.pixelData); + SetPixmapBaseToScreen(pix, winRec->frame.x, winRec->frame.y); + pScreen->SetWindowPixmap(pWindow, pix); + winRec->pixmap = pix; + } else { + // Update existing pixmap. Update in place so we don't have to + // change the children's pixmaps. + pix = winRec->pixmap; + pScreen->ModifyPixmapHeader(pix, + winRec->frame.w, winRec->frame.h, + winRec->frame.depth, + winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, + winRec->frame.pixelData); + SetPixmapBaseToScreen(pix, winRec->frame.x, winRec->frame.y); + } + } else { + // This is not the top window. Point to the parent's pixmap. + pix = winRec->pixmap; + pScreen->SetWindowPixmap(pWindow, pix); + } + + RL_DEBUG_MSG("done\n"); +} + + +#ifdef SHAPE + +// boundingShape = outside border (like borderClip) +// clipShape = inside border (like clipList) +// Both are in window-local coordinates +// We only care about boundingShape (fixme true?) + +// RootlessReallySetShape is used in several places other than SetShape. +// Most importantly, SetShape is often called on unmapped windows, so we +// have to wait until the window is mapped to reshape the frame. +static void RootlessReallySetShape(WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + RegionRec newShape; + + if (IsRoot(pWin)) return; + if (!IsTopLevel(pWin)) return; + if (!winRec) return; + + if (wBoundingShape(pWin)) { + // wBoundingShape is relative to *inner* origin of window. + // Translate by borderWidth to get the outside-relative position. + REGION_INIT(pScreen, &newShape, NullBox, 0); + REGION_COPY(pScreen, &newShape, wBoundingShape(pWin)); + REGION_TRANSLATE(pScreen, &newShape, pWin->borderWidth, + pWin->borderWidth); + } else { + newShape.data = NULL; + newShape.extents.x1 = 0; + newShape.extents.y1 = 0; + newShape.extents.x2 = winRec->frame.w; + newShape.extents.y2 = winRec->frame.h; + } + RL_DEBUG_MSG("reshaping..."); + RL_DEBUG_MSG("numrects %d, extents %d %d %d %d ", + REGION_NUM_RECTS(&newShape), + newShape.extents.x1, newShape.extents.y1, + newShape.extents.x2, newShape.extents.y2); + CallFrameProc(pScreen, ReshapeFrame,(pScreen, &winRec->frame, &newShape)); + REGION_UNINIT(pScreen, &newShape); +} + +#endif // SHAPE + + +// pRegion is GLOBAL +void +RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) +{ + pWindow = TopLevelParent(pWindow); + if (!pWindow) { + RL_DEBUG_MSG("RootlessDamageRegion: window is not framed\n"); + } else if (!WINREC(pWindow)) { + RL_DEBUG_MSG("RootlessDamageRegion: top-level window not a frame\n"); + } else { + REGION_UNION((pWindow)->drawable.pScreen, &WINREC(pWindow)->damage, + &WINREC(pWindow)->damage, (pRegion)); + } +} + + +// pBox is GLOBAL +void +RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox) +{ + RegionRec region; + + REGION_INIT(pWindow->drawable.pScreen, ®ion, pBox, 1); + RootlessDamageRegion(pWindow, ®ion); +} + + +// (x, y, w, h) is in window-local coordinates. +void +RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) +{ + BoxRec box; + RegionRec region; + + x += pWindow->drawable.x; + y += pWindow->drawable.y; + box.x1 = x; + box.x2 = x + w; + box.y1 = y; + box.y2 = y + h; + REGION_INIT(pWindow->drawable.pScreen, ®ion, &box, 1); + RootlessDamageRegion(pWindow, ®ion); +} + +#ifdef SHAPE + +void +RootlessDamageShape(WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC(pWin); + + // We only care about the shape of top-level framed windows. + if (IsRoot(pWin)) return; + if (!IsTopLevel(pWin)) return; + if (!winRec) return; + + winRec->shapeDamage = TRUE; +} + +#endif // SHAPE + +void +RootlessRedisplay(WindowPtr pWindow) +{ + RootlessWindowRec *winRec = WINREC(pWindow); + ScreenPtr pScreen = pWindow->drawable.pScreen; + +#ifdef SHAPE + if (winRec->shapeDamage) { + // Reshape the window. This will also update the entire window. + RootlessReallySetShape(pWindow); + REGION_EMPTY(pScreen, &winRec->damage); + winRec->shapeDamage = FALSE; + } + else +#endif // SHAPE + if (REGION_NOTEMPTY(pScreen, &winRec->damage)) { + REGION_INTERSECT(pScreen, &winRec->damage, &winRec->damage, + &pWindow->borderSize); + + // move region to window local coords + REGION_TRANSLATE(pScreen, &winRec->damage, + -winRec->frame.x, -winRec->frame.y); + CallFrameProc(pScreen, UpdateRegion, + (pScreen, &winRec->frame, &winRec->damage)); + REGION_EMPTY(pScreen, &winRec->damage); + } +} + + +void +RootlessRedisplayScreen(ScreenPtr pScreen) +{ + WindowPtr root = WindowTable[pScreen->myNum]; + + if (root) { + WindowPtr win; + + RootlessRedisplay(root); + for (win = root->firstChild; win; win = win->nextSib) { + if (WINREC(win)) { + RootlessRedisplay(win); + } + } + } +} Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessCommon.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessCommon.h:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessCommon.h Wed Mar 27 21:21:20 2002 @@ -0,0 +1,214 @@ +/* + * Common internal rootless definitions and code + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessCommon.h,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#ifndef _ROOTLESSCOMMON_H +#define _ROOTLESSCOMMON_H + +#include "rootless.h" + +#include "pixmapstr.h" +#include "windowstr.h" + +#ifdef RENDER +#include "picturestr.h" +#endif + + +// Debug output, or not. +#ifdef ROOTLESSDEBUG +#define RL_DEBUG_MSG ErrorF +#else +#define RL_DEBUG_MSG(a, ...) +#endif + + +// Global variables +extern int rootlessGCPrivateIndex; +extern int rootlessScreenPrivateIndex; +extern int rootlessWindowPrivateIndex; + + +// RootlessGCRec: private per-gc data +typedef struct { + GCFuncs *originalFuncs; + GCOps *originalOps; +} RootlessGCRec; + + +// RootlessWindowRec: private per-window data +typedef struct RootlessWindowRec { + RootlessFrameRec frame; + RegionRec damage; + unsigned int borderWidth; // needed for MoveWindow(VTOther) (%$#@!!!) + PixmapPtr pixmap; +#ifdef SHAPE + BOOL shapeDamage; // TRUE if shape has changed +#endif +} RootlessWindowRec; + + +// RootlessScreenRec: per-screen private data +typedef struct { + ScreenPtr pScreen; + RootlessFrameProcs frameProcs; + + CloseScreenProcPtr CloseScreen; + + CreateWindowProcPtr CreateWindow; + DestroyWindowProcPtr DestroyWindow; + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + MoveWindowProcPtr MoveWindow; + ResizeWindowProcPtr ResizeWindow; + RestackWindowProcPtr RestackWindow; + ChangeBorderWidthProcPtr ChangeBorderWidth; + PositionWindowProcPtr PositionWindow; + ChangeWindowAttributesProcPtr ChangeWindowAttributes; + + CreateGCProcPtr CreateGC; + PaintWindowBackgroundProcPtr PaintWindowBackground; + PaintWindowBorderProcPtr PaintWindowBorder; + CopyWindowProcPtr CopyWindow; + GetImageProcPtr GetImage; + + MarkOverlappedWindowsProcPtr MarkOverlappedWindows; + ValidateTreeProcPtr ValidateTree; + +#ifdef SHAPE + SetShapeProcPtr SetShape; +#endif + +#ifdef RENDER + CompositeProcPtr Composite; + GlyphsProcPtr Glyphs; +#endif + +} RootlessScreenRec; + + +// "Definition of the Porting Layer for the X11 Sample Server" says +// unwrap and rewrap of screen functions is unnecessary, but +// screen->CreateGC changes after a call to cfbCreateGC. + +#define SCREEN_UNWRAP(screen, fn) \ + screen->fn = SCREENREC(screen)->fn; + +#define SCREEN_WRAP(screen, fn) \ + SCREENREC(screen)->fn = screen->fn; \ + screen->fn = Rootless##fn + + +// Accessors for screen and window privates + +#define SCREENREC(pScreen) \ + ((RootlessScreenRec*)(pScreen)->devPrivates[rootlessScreenPrivateIndex].ptr) + +#define WINREC(pWin) \ + ((RootlessWindowRec *)(pWin)->devPrivates[rootlessWindowPrivateIndex].ptr) + + +// Call a rootless implementation function. +// Many rootless implementation functions are allowed to be NULL. +#define CallFrameProc(pScreen, proc, params) \ + if (SCREENREC(pScreen)->frameProcs.proc) { \ + RL_DEBUG_MSG("calling frame proc " #proc " "); \ + SCREENREC(pScreen)->frameProcs.proc params; \ + } + + +// BoxRec manipulators +// Copied from shadowfb + +#define TRIM_BOX(box, pGC) { \ + BoxPtr extents = &pGC->pCompositeClip->extents;\ + if(box.x1 < extents->x1) box.x1 = extents->x1; \ + if(box.x2 > extents->x2) box.x2 = extents->x2; \ + if(box.y1 < extents->y1) box.y1 = extents->y1; \ + if(box.y2 > extents->y2) box.y2 = extents->y2; \ +} + +#define TRANSLATE_BOX(box, pDraw) { \ + box.x1 += pDraw->x; \ + box.x2 += pDraw->x; \ + box.y1 += pDraw->y; \ + box.y2 += pDraw->y; \ +} + +#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \ + TRANSLATE_BOX(box, pDraw); \ + TRIM_BOX(box, pGC); \ +} + +#define BOX_NOT_EMPTY(box) \ + (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0)) + + +// HUGE_ROOT and NORMAL_ROOT +// We don't want to clip windows to the edge of the screen. +// HUGE_ROOT temporarily makes the root window really big. +// This is needed as a wrapper around any function that calls +// SetWinSize or SetBorderSize which clip a window against its +// parents, including the root. + +extern RegionRec rootlessHugeRoot; + +#define HUGE_ROOT(pWin) \ + { \ + WindowPtr w = pWin; \ + while (w->parent) w = w->parent; \ + saveRoot = w->winSize; \ + w->winSize = rootlessHugeRoot; \ + } + +#define NORMAL_ROOT(pWin) \ + { \ + WindowPtr w = pWin; \ + while (w->parent) w = w->parent; \ + w->winSize = saveRoot; \ + } + + +// Returns TRUE if this window is a top-level window (i.e. child of the root) +// The root is not a top-level window. +#define IsTopLevel(pWin) \ + ((pWin) && (pWin)->parent && !(pWin)->parent->parent) + +// Returns TRUE if this window is a root window +#define IsRoot(pWin) \ + ((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum]) + +// Returns the top-level parent of pWindow. +// The root is the top-level parent of itself, even though the root is +// not otherwise considered to be a top-level window. +WindowPtr TopLevelParent(WindowPtr pWindow); + +// Returns TRUE if this window is visible inside a frame +// (e.g. it is visible and has a top-level or root parent) +Bool IsFramedWindow(WindowPtr pWin); + +// Move the given pixmap's base address to where pixel (0, 0) +// would be if the pixmap's actual data started at (x, y). +void SetPixmapBaseToScreen(PixmapPtr pix, int x, int y); + +// Update pWindow's pixmap. +// This needs to be called every time a window moves relative to +// its top-level parent, or the parent's pixmap data is reallocated. +void UpdatePixmap(WindowPtr pWindow); + +// Routines that cause regions to get redrawn. +// DamageRegion and DamageRect are in global coordinates. +// DamageBox is in window-local coordinates. +void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion); +void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h); +void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox); +void RootlessRedisplay(WindowPtr pWindow); +void RootlessRedisplayScreen(ScreenPtr pScreen); + +// Window reshape needs to be updated. The reshape also forces complete redraw. +void RootlessDamageShape(WindowPtr pWin); + +#endif // _ROOTLESSCOMMON_H Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessGC.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessGC.c:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessGC.c Wed Mar 27 21:21:20 2002 @@ -0,0 +1,1170 @@ +/* + * Graphics Context support for Mac OS X rootless X server + * + * Greg Parker gparker@cs.stanford.edu + * + * February 2001 Created + * March 3, 2001 Restructured as generic rootless mode + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessGC.c,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "dixfontstr.h" +#include "mivalidate.h" + +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include "rootlessCommon.h" + + +// GC functions +static void RootlessValidateGC(GCPtr pGC, unsigned long changes, + DrawablePtr pDrawable); +static void RootlessChangeGC(GCPtr pGC, unsigned long mask); +static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); +static void RootlessDestroyGC(GCPtr pGC); +static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, + int nrects); +static void RootlessDestroyClip(GCPtr pGC); +static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc); + +GCFuncs rootlessGCFuncs = { + RootlessValidateGC, + RootlessChangeGC, + RootlessCopyGC, + RootlessDestroyGC, + RootlessChangeClip, + RootlessDestroyClip, + RootlessCopyClip, +}; + +// GC operations +static void RootlessFillSpans(); +static void RootlessSetSpans(); +static void RootlessPutImage(); +static RegionPtr RootlessCopyArea(); +static RegionPtr RootlessCopyPlane(); +static void RootlessPolyPoint(); +static void RootlessPolylines(); +static void RootlessPolySegment(); +static void RootlessPolyRectangle(); +static void RootlessPolyArc(); +static void RootlessFillPolygon(); +static void RootlessPolyFillRect(); +static void RootlessPolyFillArc(); +static int RootlessPolyText8(); +static int RootlessPolyText16(); +static void RootlessImageText8(); +static void RootlessImageText16(); +static void RootlessImageGlyphBlt(); +static void RootlessPolyGlyphBlt(); +static void RootlessPushPixels(); + +static GCOps rootlessGCOps = { + RootlessFillSpans, + RootlessSetSpans, + RootlessPutImage, + RootlessCopyArea, + RootlessCopyPlane, + RootlessPolyPoint, + RootlessPolylines, + RootlessPolySegment, + RootlessPolyRectangle, + RootlessPolyArc, + RootlessFillPolygon, + RootlessPolyFillRect, + RootlessPolyFillArc, + RootlessPolyText8, + RootlessPolyText16, + RootlessImageText8, + RootlessImageText16, + RootlessImageGlyphBlt, + RootlessPolyGlyphBlt, + RootlessPushPixels +#ifdef NEED_LINEHELPER + , NULL +#endif +}; + + +Bool +RootlessCreateGC(GCPtr pGC) +{ + RootlessGCRec *gcrec; + RootlessScreenRec *s; + Bool result; + + SCREEN_UNWRAP(pGC->pScreen, CreateGC); + s = (RootlessScreenRec *) pGC->pScreen-> + devPrivates[rootlessScreenPrivateIndex].ptr; + result = s->CreateGC(pGC); + gcrec = (RootlessGCRec *) pGC->devPrivates[rootlessGCPrivateIndex].ptr; + gcrec->originalOps = NULL; // don't wrap ops yet + gcrec->originalFuncs = pGC->funcs; + pGC->funcs = &rootlessGCFuncs; + + SCREEN_WRAP(pGC->pScreen, CreateGC); + return result; +} + + +// GC func wrapping +// ValidateGC wraps gcOps iff dest is viewable. All others just unwrap&call. + +// GCFUN_UNRAP assumes funcs have been wrapped and +// does not assume ops have been wrapped +#define GCFUNC_UNWRAP(pGC) \ + RootlessGCRec *gcrec = (RootlessGCRec *) \ + (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + (pGC)->funcs = gcrec->originalFuncs; \ + if (gcrec->originalOps) { \ + (pGC)->ops = gcrec->originalOps; \ +} + +#define GCFUNC_WRAP(pGC) \ + gcrec->originalFuncs = (pGC)->funcs; \ + (pGC)->funcs = &rootlessGCFuncs; \ + if (gcrec->originalOps) { \ + gcrec->originalOps = (pGC)->ops; \ + (pGC)->ops = &rootlessGCOps; \ +} + + +static void +RootlessValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +{ + GCFUNC_UNWRAP(pGC); + + pGC->funcs->ValidateGC(pGC, changes, pDrawable); + + gcrec->originalOps = NULL; + + if (pDrawable->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) pDrawable; + + if (pWin->viewable) { + gcrec->originalOps = pGC->ops; + } + } + + GCFUNC_WRAP(pGC); +} + +static void RootlessChangeGC(GCPtr pGC, unsigned long mask) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->ChangeGC(pGC, mask); + GCFUNC_WRAP(pGC); +} + +static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) +{ + GCFUNC_UNWRAP(pGCDst); + pGCDst->funcs->CopyGC(pGCSrc, mask, pGCDst); + GCFUNC_WRAP(pGCDst); +} + +static void RootlessDestroyGC(GCPtr pGC) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->DestroyGC(pGC); + GCFUNC_WRAP(pGC); +} + +static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->ChangeClip(pGC, type, pvalue, nrects); + GCFUNC_WRAP(pGC); +} + +static void RootlessDestroyClip(GCPtr pGC) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->DestroyClip(pGC); + GCFUNC_WRAP(pGC); +} + +static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + GCFUNC_UNWRAP(pgcDst); + pgcDst->funcs->CopyClip(pgcDst, pgcSrc); + GCFUNC_WRAP(pgcDst); +} + + +// GC ops +// We can't use shadowfb because shadowfb assumes one pixmap +// and our root window is a special case. +// So much of this code is copied from shadowfb. + +// assumes both funcs and ops are wrapped +#define GCOP_UNWRAP(pGC) \ + RootlessGCRec *gcrec = (RootlessGCRec *) \ + (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + GCFuncs *saveFuncs = pGC->funcs; \ + (pGC)->funcs = gcrec->originalFuncs; \ + (pGC)->ops = gcrec->originalOps; + +#define GCOP_WRAP(pGC) \ + gcrec->originalOps = (pGC)->ops; \ + (pGC)->funcs = saveFuncs; \ + (pGC)->ops = &rootlessGCOps; + + +static void +RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, + DDXPointPtr pptInit, int *pwidthInit, int sorted) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("fill spans start "); + + if (nInit <= 0) { + pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); + } else { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nInit; + BoxRec box; + + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidthInit++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + + box.y2++; + + pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill spans end\n"); +} + +static void +RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, + DDXPointPtr pptInit, int *pwidthInit, + int nspans, int sorted) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("set spans start "); + + if (nspans <= 0) { + pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, + nspans, sorted); + } else { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nspans; + BoxRec box; + + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidth++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + + box.y2++; + + pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, + nspans, sorted); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + GCOP_WRAP(pGC); + RL_DEBUG_MSG("set spans end\n"); +} + +static void +RootlessPutImage(DrawablePtr dst, GCPtr pGC, + int depth, int x, int y, int w, int h, + int leftPad, int format, char *pBits) +{ + BoxRec box; + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("put image start "); + + pGC->ops->PutImage(dst, pGC, depth, x,y,w,h, leftPad, format, pBits); + + box.x1 = x + dst->x; + box.x2 = box.x1 + w; + box.y1 = y + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("put image end\n"); +} + +/* changed area is *dest* rect */ +/* If this code ever goes back go StartDrawing/StopDrawing: + * start and stop dst always + * start and stop src if src->type is DRAWABLE_WINDOW and src is framed + */ +static RegionPtr +RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, + int srcx, int srcy, int w, int h, + int dstx, int dsty) +{ + RegionPtr result; + BoxRec box; + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst); + + result = pGC->ops->CopyArea(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty); + + box.x1 = dstx + dst->x; + box.x2 = box.x1 + w; + box.y1 = dsty + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("copy area end\n"); + return result; +} + +/* changed area is *dest* rect */ +/* If this code ever goes back go StartDrawing/StopDrawing: + * start and stop dst always + * start and stop src if src->type is DRAWABLE_WINDOW and src is framed + */ +static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst, + GCPtr pGC, int srcx, int srcy, + int w, int h, int dstx, int dsty, + unsigned long plane) +{ + RegionPtr result; + BoxRec box; + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("copy plane start "); + + result = pGC->ops->CopyPlane(pSrc, dst, pGC, srcx, srcy, w, h, + dstx, dsty, plane); + + box.x1 = dstx + dst->x; + box.x2 = box.x1 + w; + box.y1 = dsty + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("copy plane end\n"); + return result; +} + +// Options for size of changed area: +// 0 = box per point +// 1 = big box around all points +// 2 = accumulate point in 20 pixel radius +#define ROOTLESS_CHANGED_AREA 1 +#define abs(a) ((a) > 0 ? (a) : -(a)) + +/* changed area is box around all points */ +static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("polypoint start "); + + pGC->ops->PolyPoint(dst, pGC, mode, npt, pptInit); + + if (npt > 0) { +#if ROOTLESS_CHANGED_AREA==0 + // box per point + BoxRec box; + + while (npt) { + box.x1 = pptInit->x; + box.y1 = pptInit->y; + box.x2 = box.x1 + 1; + box.y2 = box.y1 + 1; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + npt--; + pptInit++; + } + +#elif ROOTLESS_CHANGED_AREA==1 + // one big box + BoxRec box; + + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) + box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) + box.x2 = pptInit->x; + if(box.y1 > pptInit->y) + box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) + box.y2 = pptInit->y; + } + + box.x2++; + box.y2++; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + +#elif ROOTLESS_CHANGED_AREA==2 + // clever(?) method: accumulate point in 20-pixel radius + BoxRec box; + int firstx, firsty; + + box.x2 = box.x1 = firstx = pptInit->x; + box.y2 = box.y1 = firsty = pptInit->y; + while(--npt) { + pptInit++; + if (abs(pptInit->x - firstx) > 20 || + abs(pptInit->y - firsty) > 20) { + box.x2++; + box.y2++; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + box.x2 = box.x1 = firstx = pptInit->x; + box.y2 = box.y1 = firsty = pptInit->y; + } else { + if (box.x1 > pptInit->x) box.x1 = pptInit->x; + else if (box.x2 < pptInit->x) box.x2 = pptInit->x; + if (box.y1 > pptInit->y) box.y1 = pptInit->y; + else if (box.y2 < pptInit->y) box.y2 = pptInit->y; + } + } + box.x2++; + box.y2++; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); +#endif /* ROOTLESS_CHANGED_AREA */ + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polypoint end\n"); +} + +#undef ROOTLESS_CHANGED_AREA + +/* changed area is box around each line */ +static void RootlessPolylines(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly lines start "); + + pGC->ops->Polylines(dst, pGC, mode, npt, pptInit); + + if (npt > 0) { + BoxRec box; + int extra = pGC->lineWidth >> 1; + + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + + if(npt > 1) { + if(pGC->joinStyle == JoinMiter) + extra = 6 * pGC->lineWidth; + else if(pGC->capStyle == CapProjecting) + extra = pGC->lineWidth; + } + + if(mode == CoordModePrevious) { + int x = box.x1; + int y = box.y1; + + while(--npt) { + pptInit++; + x += pptInit->x; + y += pptInit->y; + if(box.x1 > x) + box.x1 = x; + else if(box.x2 < x) + box.x2 = x; + if(box.y1 > y) + box.y1 = y; + else if(box.y2 < y) + box.y2 = y; + } + } else { + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) + box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) + box.x2 = pptInit->x; + if(box.y1 > pptInit->y) + box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) + box.y2 = pptInit->y; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly lines end\n"); +} + +/* changed area is box around each line segment */ +static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, + int nseg, xSegment *pSeg) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly segment start (win 0x%x)", dst); + + pGC->ops->PolySegment(dst, pGC, nseg, pSeg); + + if (nseg > 0) { + BoxRec box; + int extra = pGC->lineWidth; + + if(pGC->capStyle != CapProjecting) + extra >>= 1; + + if(pSeg->x2 > pSeg->x1) { + box.x1 = pSeg->x1; + box.x2 = pSeg->x2; + } else { + box.x2 = pSeg->x1; + box.x1 = pSeg->x2; + } + + if(pSeg->y2 > pSeg->y1) { + box.y1 = pSeg->y1; + box.y2 = pSeg->y2; + } else { + box.y2 = pSeg->y1; + box.y1 = pSeg->y2; + } + + while(--nseg) { + pSeg++; + if(pSeg->x2 > pSeg->x1) { + if(pSeg->x1 < box.x1) box.x1 = pSeg->x1; + if(pSeg->x2 > box.x2) box.x2 = pSeg->x2; + } else { + if(pSeg->x2 < box.x1) box.x1 = pSeg->x2; + if(pSeg->x1 > box.x2) box.x2 = pSeg->x1; + } + if(pSeg->y2 > pSeg->y1) { + if(pSeg->y1 < box.y1) box.y1 = pSeg->y1; + if(pSeg->y2 > box.y2) box.y2 = pSeg->y2; + } else { + if(pSeg->y2 < box.y1) box.y1 = pSeg->y2; + if(pSeg->y1 > box.y2) box.y2 = pSeg->y1; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly segment end\n"); +} + +/* changed area is box around each line (not entire rects) */ +static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, + int nRects, xRectangle *pRects) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly rectangle start "); + + pGC->ops->PolyRectangle(dst, pGC, nRects, pRects); + + if (nRects > 0) { + BoxRec box; + int offset1, offset2, offset3; + + offset2 = pGC->lineWidth; + if(!offset2) offset2 = 1; + offset1 = offset2 >> 1; + offset3 = offset2 - offset1; + + while(nRects--) { + box.x1 = pRects->x - offset1; + box.y1 = pRects->y - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x + pRects->width - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + pRects->height - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + pRects++; + } + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly rectangle end\n"); +} + + +/* changed area is box around each arc (assumes all arcs are 360 degrees) */ +static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly arc start "); + + pGC->ops->PolyArc(dst, pGC, narcs, parcs); + + if (narcs > 0) { + int extra = pGC->lineWidth >> 1; + BoxRec box; + + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + while(--narcs) { + parcs++; + if(box.x1 > parcs->x) + box.x1 = parcs->x; + if(box.x2 < (parcs->x + parcs->width)) + box.x2 = parcs->x + parcs->width; + if(box.y1 > parcs->y) + box.y1 = parcs->y; + if(box.y2 < (parcs->y + parcs->height)) + box.y2 = parcs->y + parcs->height; + } + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + box.x2++; + box.y2++; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly arc end\n"); +} + + +/* changed area is box around each poly */ +static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, + int shape, int mode, int count, + DDXPointPtr pptInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("fill poly start "); + + if (count <= 2) { + pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); + } else { + DDXPointPtr ppt = pptInit; + int i = count; + BoxRec box; + + box.x2 = box.x1 = ppt->x; + box.y2 = box.y1 = ppt->y; + + if(mode != CoordModeOrigin) { + int x = box.x1; + int y = box.y1; + + while(--i) { + ppt++; + x += ppt->x; + y += ppt->y; + if(box.x1 > x) + box.x1 = x; + else if(box.x2 < x) + box.x2 = x; + if(box.y1 > y) + box.y1 = y; + else if(box.y2 < y) + box.y2 = y; + } + } else { + while(--i) { + ppt++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + else if(box.x2 < ppt->x) + box.x2 = ppt->x; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + } + + box.x2++; + box.y2++; + + pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill poly end\n"); +} + +/* changed area is the rects */ +static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, + int nRectsInit, xRectangle *pRectsInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("fill rect start (win 0x%x)", dst); + + if (nRectsInit <= 0) { + pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); + } else { + BoxRec box; + xRectangle *pRects = pRectsInit; + int nRects = nRectsInit; + + box.x1 = pRects->x; + box.x2 = box.x1 + pRects->width; + box.y1 = pRects->y; + box.y2 = box.y1 + pRects->height; + + while(--nRects) { + pRects++; + if(box.x1 > pRects->x) + box.x1 = pRects->x; + if(box.x2 < (pRects->x + pRects->width)) + box.x2 = pRects->x + pRects->width; + if(box.y1 > pRects->y) + box.y1 = pRects->y; + if(box.y2 < (pRects->y + pRects->height)) + box.y2 = pRects->y + pRects->height; + } + + /* cfb messes with the pRectsInit so we have to do our + calculations first */ + + pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill rect end\n"); +} + + +/* changed area is box around each arc (assuming arcs are all 360 degrees) */ +static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC, + int narcs, xArc *parcs) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("fill arc start "); + + pGC->ops->PolyFillArc(dst, pGC, narcs, parcs); + + if (narcs > 0) { + BoxRec box; + + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + while(--narcs) { + parcs++; + if(box.x1 > parcs->x) + box.x1 = parcs->x; + if(box.x2 < (parcs->x + parcs->width)) + box.x2 = parcs->x + parcs->width; + if(box.y1 > parcs->y) + box.y1 = parcs->y; + if(box.y2 < (parcs->y + parcs->height)) + box.y2 = parcs->y + parcs->height; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill arc end"); +} + + +static void RootlessImageText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imagetext8 start "); + + pGC->ops->ImageText8(dst, pGC, x, y, count, chars); + + if (count > 0) { + int top, bot, Min, Max; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = dst->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imagetext8 end\n"); +} + +static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) +{ + int width; // the result, sorta + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polytext8 start "); + + width = pGC->ops->PolyText8(dst, pGC, x, y, count, chars); + width -= x; + + if(width > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polytext8 end\n"); + return (width + x); +} + +static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imagetext16 start "); + + pGC->ops->ImageText16(dst, pGC, x, y, count, chars); + + if (count > 0) { + int top, bot, Min, Max; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = dst->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imagetext16 end\n"); +} + +static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) +{ + int width; // the result, sorta + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polytext16 start "); + + width = pGC->ops->PolyText16(dst, pGC, x, y, count, chars); + width -= x; + + if (width > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polytext16 end\n"); + return width + x; +} + +static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer unused) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imageglyph start "); + + pGC->ops->ImageGlyphBlt(dst, pGC, x, y, nglyph, ppci, unused); + + if (nglyph > 0) { + int top, bot, width = 0; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + box.x1 = ppci[0]->metrics.leftSideBearing; + if(box.x1 > 0) box.x1 = 0; + box.x2 = ppci[nglyph - 1]->metrics.rightSideBearing - + ppci[nglyph - 1]->metrics.characterWidth; + if(box.x2 < 0) box.x2 = 0; + + box.x2 += dst->x + x; + box.x1 += dst->x + x; + + while(nglyph--) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) + box.x2 += width; + else + box.x1 += width; + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imageglyph end\n"); +} + +static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polyglyph start "); + + pGC->ops->PolyGlyphBlt(dst, pGC, x, y, nglyph, ppci, pglyphBase); + + if (nglyph > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + ppci[0]->metrics.leftSideBearing; + box.x2 = dst->x + x + ppci[nglyph - 1]->metrics.rightSideBearing; + + if(nglyph > 1) { + int width = 0; + + while(--nglyph) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polyglyph end\n"); +} + + +/* changed area is in dest */ +static void +RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, + int dx, int dy, int xOrg, int yOrg) +{ + BoxRec box; + GCOP_UNWRAP(pGC); + + pGC->ops->PushPixels(pGC, pBitMap, dst, dx, dy, xOrg, yOrg); + + box.x1 = xOrg + dst->x; + box.x2 = box.x1 + dx; + box.y1 = yOrg + dst->y; + box.y2 = box.y1 + dy; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("push pixels end\n"); +} Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessScreen.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessScreen.c:1.2 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessScreen.c Wed Oct 16 17:13:33 2002 @@ -0,0 +1,426 @@ +/* + * Screen routines for Mac OS X rootless X server + * + * Greg Parker gparker@cs.stanford.edu + * + * February 2001 Created + * March 3, 2001 Restructured as generic rootless mode + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessScreen.c,v 1.2 2002/10/16 21:13:33 dawes Exp $ */ + + +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "propertyst.h" +#include "mivalidate.h" +#include "picturestr.h" + +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include "rootlessCommon.h" +#include "rootlessWindow.h" + +extern int +rootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind); +extern Bool +RootlessCreateGC(GCPtr pGC); + +// Initialize globals +int rootlessGCPrivateIndex = -1; +int rootlessScreenPrivateIndex = -1; +int rootlessWindowPrivateIndex = -1; + + +static Bool +RootlessCloseScreen(int i, ScreenPtr pScreen) +{ + RootlessScreenRec *s; + + s = SCREENREC(pScreen); + + // fixme unwrap everything that was wrapped? + pScreen->CloseScreen = s->CloseScreen; + + xfree(s); + return pScreen->CloseScreen(i, pScreen); +} + + +static void +RootlessGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, + unsigned int format, unsigned long planeMask, char *pdstLine) +{ + ScreenPtr pScreen = pDrawable->pScreen; + SCREEN_UNWRAP(pScreen, GetImage); + + if (pDrawable->type == DRAWABLE_WINDOW) { + /* Many apps use GetImage to sync with the visible frame buffer */ + // fixme entire screen or just window or all screens? + RootlessRedisplayScreen(pScreen); + } + + pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + + SCREEN_WRAP(pScreen, GetImage); +} + + +#ifdef RENDER + +static void +RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, + INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + WindowPtr dstWin; + + dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pDst->pDrawable : NULL; + + // SCREEN_UNWRAP(ps, Composite); + ps->Composite = SCREENREC(pScreen)->Composite; + + ps->Composite(op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + + if (dstWin && IsFramedWindow(dstWin)) { + RootlessDamageRect(dstWin, xDst, yDst, width, height); + } + + ps->Composite = RootlessComposite; + // SCREEN_WRAP(ps, Composite); +} + + +static void +RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int nlist, GlyphListPtr list, GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + int x, y; + int n; + GlyphPtr glyph; + WindowPtr dstWin; + + dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pDst->pDrawable : NULL; + + //SCREEN_UNWRAP(ps, Glyphs); + ps->Glyphs = SCREENREC(pScreen)->Glyphs; + ps->Glyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + ps->Glyphs = RootlessGlyphs; + //SCREEN_WRAP(ps, Glyphs); + + if (dstWin && IsFramedWindow(dstWin)) { + x = xSrc; + y = ySrc; + while (nlist--) { + x += list->xOff; + y += list->yOff; + n = list->len; + while (n--) { + glyph = *glyphs++; + RootlessDamageRect(dstWin, + x - glyph->info.x, y - glyph->info.y, + glyph->info.width, glyph->info.height); + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; + } + } +} + +#endif // RENDER + + +// RootlessValidateTree +// ValidateTree is modified in two ways: +// * top-level windows don't clip each other +// * windows aren't clipped against root. +// These only matter when validating from the root. +static int +RootlessValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +{ + int result; + RegionRec saveRoot; + ScreenPtr pScreen = pParent->drawable.pScreen; + + SCREEN_UNWRAP(pScreen, ValidateTree); + RL_DEBUG_MSG("VALIDATETREE start "); + + // Use our custom version to validate from root + if (IsRoot(pParent)) { + RL_DEBUG_MSG("custom "); + result = rootlessMiValidateTree(pParent, pChild, kind); + } else { + HUGE_ROOT(pParent); + result = pScreen->ValidateTree(pParent, pChild, kind); + NORMAL_ROOT(pParent); + } + + SCREEN_WRAP(pScreen, ValidateTree); + RL_DEBUG_MSG("VALIDATETREE end\n"); + + return result; +} + + +// RootlessMarkOverlappedWindows +// MarkOverlappedWindows is modified to ignore overlapping +// top-level windows. +static Bool +RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, + WindowPtr *ppLayerWin) +{ + RegionRec saveRoot; + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + SCREEN_UNWRAP(pScreen, MarkOverlappedWindows); + RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS start "); + + HUGE_ROOT(pWin); + if (IsRoot(pWin)) { + // root - mark nothing + RL_DEBUG_MSG("is root not marking "); + result = FALSE; + } + else if (! IsTopLevel(pWin)) { + // not top-level window - mark normally + result = pScreen->MarkOverlappedWindows(pWin, pFirst, ppLayerWin); + } + else { + //top-level window - mark children ONLY - NO overlaps with sibs (?) + // This code copied from miMarkOverlappedWindows() + + register WindowPtr pChild; + Bool anyMarked = FALSE; + void (* MarkWindow)() = pScreen->MarkWindow; + + RL_DEBUG_MSG("is top level! "); + /* single layered systems are easy */ + if (ppLayerWin) *ppLayerWin = pWin; + + if (pWin == pFirst) { + /* Blindly mark pWin and all of its inferiors. This is a slight + * overkill if there are mapped windows that outside pWin's border, + * but it's better than wasting time on RectIn checks. + */ + pChild = pWin; + while (1) { + if (pChild->viewable) { + if (REGION_BROKEN (pScreen, &pChild->winSize)) + SetWinSize (pChild); + if (REGION_BROKEN (pScreen, &pChild->borderSize)) + SetBorderSize (pChild); + (* MarkWindow)(pChild); + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } + anyMarked = TRUE; + pFirst = pFirst->nextSib; + } + if (anyMarked) + (* MarkWindow)(pWin->parent); + result = anyMarked; + } + NORMAL_ROOT(pWin); + SCREEN_WRAP(pScreen, MarkOverlappedWindows); + RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS end\n"); + return result; +} + + +static void +RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) +{ + int oldBackgroundState = 0; + PixUnion oldBackground; + ScreenPtr pScreen = pWin->drawable.pScreen; + + SCREEN_UNWRAP(pScreen, PaintWindowBackground); + RL_DEBUG_MSG("paintwindowbackground start (win 0x%x) ", pWin); + if (IsFramedWindow(pWin)) { + if (IsRoot(pWin)) { + // set root background to magic transparent color + oldBackgroundState = pWin->backgroundState; + oldBackground = pWin->background; + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = 0x00fffffe; + } + } + + pScreen->PaintWindowBackground(pWin, pRegion, what); + + if (IsFramedWindow(pWin)) { + RootlessDamageRegion(pWin, pRegion); + if (IsRoot(pWin)) { + pWin->backgroundState = oldBackgroundState; + pWin->background = oldBackground; + } + } + SCREEN_WRAP(pScreen, PaintWindowBackground); + RL_DEBUG_MSG("paintwindowbackground end\n"); +} + + +static void +RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) +{ + SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder); + RL_DEBUG_MSG("paintwindowborder start (win 0x%x) ", pWin); + pWin->drawable.pScreen->PaintWindowBorder(pWin, pRegion, what); + if (IsFramedWindow(pWin)) { + RootlessDamageRegion(pWin, pRegion); + } + SCREEN_WRAP(pWin->drawable.pScreen, PaintWindowBorder); + RL_DEBUG_MSG("paintwindowborder end\n"); +} + + +// Flush drawing before blocking on select(). +static void +RootlessBlockHandler(pointer pbdata, OSTimePtr pTimeout, pointer pReadmask) +{ + RootlessRedisplayScreen((ScreenPtr) pbdata); +} + + +static void +RootlessWakeupHandler(pointer data, int i, pointer LastSelectMask) +{ + // nothing here +} + + +static Bool +RootlessAllocatePrivates(ScreenPtr pScreen) +{ + RootlessScreenRec *s; + static unsigned long rootlessGeneration = 0; + + if (rootlessGeneration != serverGeneration) { + rootlessScreenPrivateIndex = AllocateScreenPrivateIndex(); + if (rootlessScreenPrivateIndex == -1) return FALSE; + rootlessGCPrivateIndex = AllocateGCPrivateIndex(); + if (rootlessGCPrivateIndex == -1) return FALSE; + rootlessWindowPrivateIndex = AllocateWindowPrivateIndex(); + if (rootlessWindowPrivateIndex == -1) return FALSE; + rootlessGeneration = serverGeneration; + } + + // no allocation needed for screen privates + if (!AllocateGCPrivate(pScreen, rootlessGCPrivateIndex, + sizeof(RootlessGCRec))) + return FALSE; + if (!AllocateWindowPrivate(pScreen, rootlessWindowPrivateIndex, 0)) + return FALSE; + + s = xalloc(sizeof(RootlessScreenRec)); + if (! s) return FALSE; + SCREENREC(pScreen) = s; + + return TRUE; +} + + +static void +RootlessWrap(ScreenPtr pScreen) +{ + RootlessScreenRec *s = (RootlessScreenRec*) + pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; + +#define WRAP(a) \ + if (pScreen->a) { \ + s->a = pScreen->a; \ + } else { \ + RL_DEBUG_MSG("null screen fn " #a "\n"); \ + s->a = NULL; \ + } \ + pScreen->a = Rootless##a + + WRAP(CloseScreen); + WRAP(CreateGC); + WRAP(PaintWindowBackground); + WRAP(PaintWindowBorder); + WRAP(CopyWindow); + WRAP(GetImage); + WRAP(CreateWindow); + WRAP(DestroyWindow); + WRAP(RealizeWindow); + WRAP(UnrealizeWindow); + WRAP(MoveWindow); + WRAP(PositionWindow); + WRAP(ResizeWindow); + WRAP(RestackWindow); + WRAP(ChangeBorderWidth); + WRAP(MarkOverlappedWindows); + WRAP(ValidateTree); + WRAP(ChangeWindowAttributes); + +#ifdef SHAPE + WRAP(SetShape); +#endif + +#ifdef RENDER + { + // Composite and Glyphs don't use normal screen wrapping + PictureScreenPtr ps = GetPictureScreen(pScreen); + s->Composite = ps->Composite; + ps->Composite = RootlessComposite; + s->Glyphs = ps->Glyphs; + ps->Glyphs = RootlessGlyphs; + } +#endif + + // WRAP(ClearToBackground); fixme put this back? useful for shaped wins? + // WRAP(RestoreAreas); fixme put this back? + +#undef WRAP +} + + +/* + * RootlessInit + * Rootless wraps lots of stuff and needs a bunch of devPrivates. + */ +Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcs *procs) +{ + RootlessScreenRec *s; + + if (! RootlessAllocatePrivates(pScreen)) return FALSE; + s = (RootlessScreenRec*) + pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; + + s->pScreen = pScreen; + s->frameProcs = *procs; + + RootlessWrap(pScreen); + + if (!RegisterBlockAndWakeupHandlers (RootlessBlockHandler, + RootlessWakeupHandler, + (pointer) pScreen)) + { + return FALSE; + } + + return TRUE; +} Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessValTree.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessValTree.c:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessValTree.c Wed Mar 27 21:21:20 2002 @@ -0,0 +1,744 @@ +/* + * Calculate window clip lists for rootless mode + * + * This file is very closely based on mivaltree.c. + */ + /* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessValTree.c,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +/* + * mivaltree.c -- + * Functions for recalculating window clip lists. Main function + * is miValidateTree. + * + +Copyright 1987, 1988, 1989, 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. + + * + * Copyright 1987, 1988, 1989 by + * Digital Equipment Corporation, Maynard, Massachusetts, + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * 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 Digital not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * DIGITAL 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. + * + ******************************************************************/ + +/* 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. * +* * +*****************************************************************/ + + /* + * Aug '86: Susan Angebranndt -- original code + * July '87: Adam de Boor -- substantially modified and commented + * Summer '89: Joel McCormack -- so fast you wouldn't believe it possible. + * In particular, much improved code for window mapping and + * circulating. + * Bob Scheifler -- avoid miComputeClips for unmapped windows, + * valdata changes + */ +#include "X.h" +#include "scrnintstr.h" +#include "validate.h" +#include "windowstr.h" +#include "mi.h" +#include "regionstr.h" +#include "mivalidate.h" + +#include "globals.h" + +#ifdef SHAPE +/* + * Compute the visibility of a shaped window + */ +int +rootlessShapedWindowIn (pScreen, universe, bounding, rect, x, y) + ScreenPtr pScreen; + RegionPtr universe, bounding; + BoxPtr rect; + register int x, y; +{ + BoxRec box; + register BoxPtr boundBox; + int nbox; + Bool someIn, someOut; + register int t, x1, y1, x2, y2; + + nbox = REGION_NUM_RECTS (bounding); + boundBox = REGION_RECTS (bounding); + someIn = someOut = FALSE; + x1 = rect->x1; + y1 = rect->y1; + x2 = rect->x2; + y2 = rect->y2; + while (nbox--) + { + if ((t = boundBox->x1 + x) < x1) + t = x1; + box.x1 = t; + if ((t = boundBox->y1 + y) < y1) + t = y1; + box.y1 = t; + if ((t = boundBox->x2 + x) > x2) + t = x2; + box.x2 = t; + if ((t = boundBox->y2 + y) > y2) + t = y2; + box.y2 = t; + if (box.x1 > box.x2) + box.x2 = box.x1; + if (box.y1 > box.y2) + box.y2 = box.y1; + switch (RECT_IN_REGION(pScreen, universe, &box)) + { + case rgnIN: + if (someOut) + return rgnPART; + someIn = TRUE; + break; + case rgnOUT: + if (someIn) + return rgnPART; + someOut = TRUE; + break; + default: + return rgnPART; + } + boundBox++; + } + if (someIn) + return rgnIN; + return rgnOUT; +} +#endif + +#define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ + HasBorder(w) && \ + (w)->backgroundState == ParentRelative) + + +/* + *----------------------------------------------------------------------- + * miComputeClips -- + * Recompute the clipList, borderClip, exposed and borderExposed + * regions for pParent and its children. Only viewable windows are + * taken into account. + * + * Results: + * None. + * + * Side Effects: + * clipList, borderClip, exposed and borderExposed are altered. + * A VisibilityNotify event may be generated on the parent window. + * + *----------------------------------------------------------------------- + */ +static void +rootlessComputeClips (pParent, pScreen, universe, kind, exposed) + register WindowPtr pParent; + register ScreenPtr pScreen; + register RegionPtr universe; + VTKind kind; + RegionPtr exposed; /* for intermediate calculations */ +{ + int dx, + dy; + RegionRec childUniverse; + register WindowPtr pChild; + int oldVis, newVis; + BoxRec borderSize; + RegionRec childUnion; + Bool overlap; + RegionPtr borderVisible; + Bool resized; + /* + * Figure out the new visibility of this window. + * The extent of the universe should be the same as the extent of + * the borderSize region. If the window is unobscured, this rectangle + * will be completely inside the universe (the universe will cover it + * completely). If the window is completely obscured, none of the + * universe will cover the rectangle. + */ + borderSize.x1 = pParent->drawable.x - wBorderWidth(pParent); + borderSize.y1 = pParent->drawable.y - wBorderWidth(pParent); + dx = (int) pParent->drawable.x + (int) pParent->drawable.width + wBorderWidth(pParent); + if (dx > 32767) + dx = 32767; + borderSize.x2 = dx; + dy = (int) pParent->drawable.y + (int) pParent->drawable.height + wBorderWidth(pParent); + if (dy > 32767) + dy = 32767; + borderSize.y2 = dy; + + oldVis = pParent->visibility; + switch (RECT_IN_REGION( pScreen, universe, &borderSize)) + { + case rgnIN: + newVis = VisibilityUnobscured; + break; + case rgnPART: + newVis = VisibilityPartiallyObscured; +#ifdef SHAPE + { + RegionPtr pBounding; + + if ((pBounding = wBoundingShape (pParent))) + { + switch (rootlessShapedWindowIn (pScreen, universe, + pBounding, &borderSize, + pParent->drawable.x, + pParent->drawable.y)) + { + case rgnIN: + newVis = VisibilityUnobscured; + break; + case rgnOUT: + newVis = VisibilityFullyObscured; + break; + } + } + } +#endif + break; + default: + newVis = VisibilityFullyObscured; + break; + } + + pParent->visibility = newVis; + if (oldVis != newVis && + ((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) + SendVisibilityNotify(pParent); + + dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; + dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; + + /* + * avoid computations when dealing with simple operations + */ + + switch (kind) { + case VTMap: + case VTStack: + case VTUnmap: + break; + case VTMove: + if ((oldVis == newVis) && + ((oldVis == VisibilityFullyObscured) || + (oldVis == VisibilityUnobscured))) + { + pChild = pParent; + while (1) + { + if (pChild->viewable) + { + if (pChild->visibility != VisibilityFullyObscured) + { + REGION_TRANSLATE( pScreen, &pChild->borderClip, + dx, dy); + REGION_TRANSLATE( pScreen, &pChild->clipList, + dx, dy); + pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pChild, dx, dy); + + } + if (pChild->valdata) + { + REGION_INIT(pScreen, + &pChild->valdata->after.borderExposed, + NullBox, 0); + if (HasParentRelativeBorder(pChild)) + { + REGION_SUBTRACT(pScreen, + &pChild->valdata->after.borderExposed, + &pChild->borderClip, + &pChild->winSize); + } + REGION_INIT( pScreen, &pChild->valdata->after.exposed, + NullBox, 0); + } + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pParent)) + pChild = pChild->parent; + if (pChild == pParent) + break; + pChild = pChild->nextSib; + } + return; + } + /* fall through */ + default: + /* + * To calculate exposures correctly, we have to translate the old + * borderClip and clipList regions to the window's new location so there + * is a correspondence between pieces of the new and old clipping regions. + */ + if (dx || dy) + { + /* + * We translate the old clipList because that will be exposed or copied + * if gravity is right. + */ + REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy); + REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy); + } + break; + case VTBroken: + REGION_EMPTY (pScreen, &pParent->borderClip); + REGION_EMPTY (pScreen, &pParent->clipList); + break; + } + + borderVisible = pParent->valdata->before.borderVisible; + resized = pParent->valdata->before.resized; + REGION_INIT( pScreen, &pParent->valdata->after.borderExposed, NullBox, 0); + REGION_INIT( pScreen, &pParent->valdata->after.exposed, NullBox, 0); + + /* + * Since the borderClip must not be clipped by the children, we do + * the border exposure first... + * + * 'universe' is the window's borderClip. To figure the exposures, remove + * the area that used to be exposed from the new. + * This leaves a region of pieces that weren't exposed before. + */ + + if (HasBorder (pParent)) + { + if (borderVisible) + { + /* + * when the border changes shape, the old visible portions + * of the border will be saved by DIX in borderVisible -- + * use that region and destroy it + */ + REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); + REGION_DESTROY( pScreen, borderVisible); + } + else + { + REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip); + } + if (HasParentRelativeBorder(pParent) && (dx || dy)) { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + universe, + &pParent->winSize); + } else { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + exposed, &pParent->winSize); + } + + REGION_COPY( pScreen, &pParent->borderClip, universe); + + /* + * To get the right clipList for the parent, and to make doubly sure + * that no child overlaps the parent's border, we remove the parent's + * border from the universe before proceeding. + */ + + REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); + } + else + REGION_COPY( pScreen, &pParent->borderClip, universe); + + if ((pChild = pParent->firstChild) && pParent->mapped) + { + REGION_INIT(pScreen, &childUniverse, NullBox, 0); + REGION_INIT(pScreen, &childUnion, NullBox, 0); + if ((pChild->drawable.y < pParent->lastChild->drawable.y) || + ((pChild->drawable.y == pParent->lastChild->drawable.y) && + (pChild->drawable.x < pParent->lastChild->drawable.x))) + { + for (; pChild; pChild = pChild->nextSib) + { + if (pChild->viewable) + REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + } + } + else + { + for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) + { + if (pChild->viewable) + REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + } + } + REGION_VALIDATE( pScreen, &childUnion, &overlap); + + for (pChild = pParent->firstChild; + pChild; + pChild = pChild->nextSib) + { + if (pChild->viewable) { + /* + * If the child is viewable, we want to remove its extents + * from the current universe, but we only re-clip it if + * it's been marked. + */ + if (pChild->valdata) { + /* + * Figure out the new universe from the child's + * perspective and recurse. + */ + REGION_INTERSECT( pScreen, &childUniverse, + universe, + &pChild->borderSize); + rootlessComputeClips (pChild, pScreen, &childUniverse, + kind, exposed); + } + /* + * Once the child has been processed, we remove its extents + * from the current universe, thus denying its space to any + * other sibling. + */ + if (overlap) + REGION_SUBTRACT( pScreen, universe, universe, + &pChild->borderSize); + } + } + if (!overlap) + REGION_SUBTRACT( pScreen, universe, universe, &childUnion); + REGION_UNINIT( pScreen, &childUnion); + REGION_UNINIT( pScreen, &childUniverse); + } /* if any children */ + + /* + * 'universe' now contains the new clipList for the parent window. + * + * To figure the exposure of the window we subtract the old clip from the + * new, just as for the border. + */ + + if (oldVis == VisibilityFullyObscured || + oldVis == VisibilityNotViewable) + { + REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe); + } + else if (newVis != VisibilityFullyObscured && + newVis != VisibilityNotViewable) + { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + universe, &pParent->clipList); + } + + /* + * One last thing: backing storage. We have to try to save what parts of + * the window are about to be obscured. We can just subtract the universe + * from the old clipList and get the areas that were in the old but aren't + * in the new and, hence, are about to be obscured. + */ + if (pParent->backStorage && !resized) + { + REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe); + (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy); + } + + /* HACK ALERT - copying contents of regions, instead of regions */ + { + RegionRec tmp; + + tmp = pParent->clipList; + pParent->clipList = *universe; + *universe = tmp; + } + +#ifdef NOTDEF + REGION_COPY( pScreen, &pParent->clipList, universe); +#endif + + pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; + + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pParent, dx, dy); +} + +static void +rootlessTreeObscured(pParent) + register WindowPtr pParent; +{ + register WindowPtr pChild; + register int oldVis; + + pChild = pParent; + while (1) + { + if (pChild->viewable) + { + oldVis = pChild->visibility; + if (oldVis != (pChild->visibility = VisibilityFullyObscured) && + ((pChild->eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) + SendVisibilityNotify(pChild); + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pParent)) + pChild = pChild->parent; + if (pChild == pParent) + break; + pChild = pChild->nextSib; + } +} + +/* + *----------------------------------------------------------------------- + * miValidateTree -- + * Recomputes the clip list for pParent and all its inferiors. + * + * Results: + * Always returns 1. + * + * Side Effects: + * The clipList, borderClip, exposed, and borderExposed regions for + * each marked window are altered. + * + * Notes: + * This routine assumes that all affected windows have been marked + * (valdata created) and their winSize and borderSize regions + * adjusted to correspond to their new positions. The borderClip and + * clipList regions should not have been touched. + * + * The top-most level is treated differently from all lower levels + * because pParent is unchanged. For the top level, we merge the + * regions taken up by the marked children back into the clipList + * for pParent, thus forming a region from which the marked children + * can claim their areas. For lower levels, where the old clipList + * and borderClip are invalid, we can't do this and have to do the + * extra operations done in miComputeClips, but this is much faster + * e.g. when only one child has moved... + * + *----------------------------------------------------------------------- + */ +/* + Quartz version: used for validate from root in rootless mode. + We need to make sure top-level windows don't clip each other, + and that top-level windows aren't clipped to the root window. +*/ +/*ARGSUSED*/ +// fixme this is ugly +// Xprint/ValTree.c doesn't work, but maybe that method can? +int +rootlessMiValidateTree (pRoot, pChild, kind) + WindowPtr pRoot; /* Parent to validate */ + WindowPtr pChild; /* First child of pRoot that was + * affected */ + VTKind kind; /* What kind of configuration caused call */ +{ + RegionRec totalClip; /* Total clipping region available to + * the marked children. pRoot's clipList + * merged with the borderClips of all + * the marked children. */ + RegionRec childClip; /* The new borderClip for the current + * child */ + RegionRec childUnion; /* the space covered by borderSize for + * all marked children */ + RegionRec exposed; /* For intermediate calculations */ + register ScreenPtr pScreen; + register WindowPtr pWin; + Bool overlap; + int viewvals; + Bool forward; + + pScreen = pRoot->drawable.pScreen; + if (pChild == NullWindow) + pChild = pRoot->firstChild; + + REGION_INIT(pScreen, &childClip, NullBox, 0); + REGION_INIT(pScreen, &exposed, NullBox, 0); + + /* + * compute the area of the parent window occupied + * by the marked children + the parent itself. This + * is the area which can be divied up among the marked + * children in their new configuration. + */ + REGION_INIT(pScreen, &totalClip, NullBox, 0); + viewvals = 0; + if (REGION_BROKEN (pScreen, &pRoot->clipList) && + !REGION_BROKEN (pScreen, &pRoot->borderClip)) + { + kind = VTBroken; + /* + * When rebuilding clip lists after out of memory, + * assume everything is busted. + */ + forward = TRUE; + REGION_COPY (pScreen, &totalClip, &pRoot->borderClip); + REGION_INTERSECT (pScreen, &totalClip, &totalClip, &pRoot->winSize); + + for (pWin = pRoot->firstChild; pWin != pChild; pWin = pWin->nextSib) + { + if (pWin->viewable) + REGION_SUBTRACT (pScreen, &totalClip, &totalClip, &pWin->borderSize); + } + for (pWin = pChild; pWin; pWin = pWin->nextSib) + if (pWin->valdata && pWin->viewable) + viewvals++; + + REGION_EMPTY (pScreen, &pRoot->clipList); + ErrorF("ValidateTree: BUSTED!\n"); + } + else + { + if ((pChild->drawable.y < pRoot->lastChild->drawable.y) || + ((pChild->drawable.y == pRoot->lastChild->drawable.y) && + (pChild->drawable.x < pRoot->lastChild->drawable.x))) + { + forward = TRUE; + for (pWin = pChild; pWin; pWin = pWin->nextSib) + { + if (pWin->valdata) + { + REGION_APPEND( pScreen, &totalClip, &pWin->borderClip); + if (pWin->viewable) + viewvals++; + } + } + } + else + { + forward = FALSE; + pWin = pRoot->lastChild; + while (1) + { + if (pWin->valdata) + { + REGION_APPEND( pScreen, &totalClip, &pWin->borderClip); + if (pWin->viewable) + viewvals++; + } + if (pWin == pChild) + break; + pWin = pWin->prevSib; + } + } + REGION_VALIDATE( pScreen, &totalClip, &overlap); + } + + + // calculate childUnion so we can subtract it from totalClip later + REGION_INIT(pScreen, &childUnion, NullBox, 0); + if (kind != VTStack) { + if (forward) + { + for (pWin = pChild; pWin; pWin = pWin->nextSib) + if (pWin->valdata && pWin->viewable) + REGION_APPEND( pScreen, &childUnion, + &pWin->borderSize); + } + else + { + pWin = pRoot->lastChild; + while (1) + { + if (pWin->valdata && pWin->viewable) + REGION_APPEND( pScreen, &childUnion, + &pWin->borderSize); + if (pWin == pChild) + break; + pWin = pWin->prevSib; + } + } + REGION_VALIDATE(pScreen, &childUnion, &overlap); + } + + + /* + * Now go through the children of the root and figure their new + * borderClips from the totalClip, passing that off to miComputeClips + * to handle recursively. Once that's done, we remove the child + * from the totalClip to clip any siblings below it. + */ + + for (pWin = pChild; + pWin != NullWindow; + pWin = pWin->nextSib) + { + if (pWin->viewable) { + if (pWin->valdata) { + REGION_COPY( pScreen, &childClip, &pWin->borderSize); + rootlessComputeClips (pWin, pScreen, &childClip, kind, &exposed); + } else if (pWin->visibility == VisibilityNotViewable) { + rootlessTreeObscured(pWin); + } + } else { + if (pWin->valdata) { + REGION_EMPTY( pScreen, &pWin->clipList); + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pWin, 0, 0); + REGION_EMPTY( pScreen, &pWin->borderClip); + pWin->valdata = (ValidatePtr)NULL; + } + } + } + + REGION_UNINIT( pScreen, &childClip); + + // REGION_SUBTRACT(pScreen, &totalClip, &totalClip, &childUnion); + REGION_UNINIT(pScreen, &childUnion); + + REGION_INIT( pScreen, &pRoot->valdata->after.exposed, NullBox, 0); + REGION_INIT( pScreen, &pRoot->valdata->after.borderExposed, NullBox, 0); + + + REGION_UNINIT( pScreen, &totalClip); + REGION_UNINIT( pScreen, &exposed); + //if (pScreen->ClipNotify) + //(*pScreen->ClipNotify) (pRoot, 0, 0); + return (1); +} Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessWindow.c diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessWindow.c:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessWindow.c Wed Mar 27 21:21:20 2002 @@ -0,0 +1,674 @@ +/* + * Rootless window management + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessWindow.c,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#include "rootlessCommon.h" +#include "rootlessWindow.h" + +#include "fb.h" + + +// RootlessCreateWindow +// For now, don't create a frame until the window is realized. +// Do reset the window size so it's not clipped by the root window. +Bool +RootlessCreateWindow(WindowPtr pWin) +{ + Bool result; + RegionRec saveRoot; + + WINREC(pWin) = NULL; + SCREEN_UNWRAP(pWin->drawable.pScreen, CreateWindow); + if (!IsRoot(pWin)) { + // win/border size set by DIX, not by wrapped CreateWindow, so + // correct it here. + // Don't HUGE_ROOT when pWin is the root! + HUGE_ROOT(pWin); + SetWinSize(pWin); + SetBorderSize(pWin); + } + result = pWin->drawable.pScreen->CreateWindow(pWin); + if (pWin->parent) { + NORMAL_ROOT(pWin); + } + SCREEN_WRAP(pWin->drawable.pScreen, CreateWindow); + return result; +} + + +// RootlessDestroyWindow +// For now, all window destruction takes place in UnrealizeWindow +Bool +RootlessDestroyWindow(WindowPtr pWin) +{ + Bool result; + + SCREEN_UNWRAP(pWin->drawable.pScreen, DestroyWindow); + result = pWin->drawable.pScreen->DestroyWindow(pWin); + SCREEN_WRAP(pWin->drawable.pScreen, DestroyWindow); + return result; +} + + +#ifdef SHAPE + +// RootlessSetShape +// Shape is usually set before the window is mapped, but (for now) we +// don't keep track of frames before they're mapped. So we just record +// that the shape needs to updated later. +void +RootlessSetShape(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + RootlessDamageShape(pWin); + SCREEN_UNWRAP(pScreen, SetShape); + pScreen->SetShape(pWin); + SCREEN_WRAP(pScreen, SetShape); +} + +#endif // SHAPE + + +// Disallow ParentRelative background on top-level windows +// because the root window doesn't really have the right background +// and cfb will try to draw on the root instead of on the window. +// fixme what about fb? +// fixme implement ParentRelative with real transparency? +// ParentRelative prevention is also in RealizeWindow() +Bool +RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask) +{ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("change window attributes start "); + + SCREEN_UNWRAP(pScreen, ChangeWindowAttributes); + result = pScreen->ChangeWindowAttributes(pWin, vmask); + SCREEN_WRAP(pScreen, ChangeWindowAttributes); + + if (WINREC(pWin)) { + // disallow ParentRelative background state + if (pWin->backgroundState == ParentRelative) { + XID pixel = 0; + ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); + } + } + + RL_DEBUG_MSG("change window attributes end\n"); + return result; +} + + +// Update the frame position now. +// (x, y) are *inside* position! +// After this, mi and fb are expecting the pixmap to be at the new location. +Bool +RootlessPositionWindow(WindowPtr pWin, int x, int y) +{ + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + Bool result; + + RL_DEBUG_MSG("positionwindow start\n"); + if (winRec) { + winRec->frame.x = x - pWin->borderWidth; + winRec->frame.y = y - pWin->borderWidth; + } + + UpdatePixmap(pWin); + + SCREEN_UNWRAP(pScreen, PositionWindow); + result = pScreen->PositionWindow(pWin, x, y); + SCREEN_WRAP(pScreen, PositionWindow); + + RL_DEBUG_MSG("positionwindow end\n"); + return result; +} + + +// RootlessRealizeWindow +// The frame is created here and not in CreateWindow. +// fixme change this? probably not - would be faster, but eat more memory +Bool +RootlessRealizeWindow(WindowPtr pWin) +{ + Bool result = FALSE; + RegionRec saveRoot; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("realizewindow start "); + + if (IsTopLevel(pWin) || IsRoot(pWin)) { + DrawablePtr d = &pWin->drawable; + RootlessWindowRec *winRec = xalloc(sizeof(RootlessWindowRec)); + + if (! winRec) goto windowcreatebad; + + winRec->frame.isRoot = (pWin == WindowTable[pScreen->myNum]); + winRec->frame.x = d->x - pWin->borderWidth; + winRec->frame.y = d->y - pWin->borderWidth; + winRec->frame.w = d->width + 2*pWin->borderWidth; + winRec->frame.h = d->height + 2*pWin->borderWidth; + winRec->frame.win = pWin; + winRec->frame.devPrivate = NULL; + + REGION_INIT(pScreen, &winRec->damage, NullBox, 0); + winRec->borderWidth = pWin->borderWidth; + + winRec->pixmap = NULL; + // UpdatePixmap() called below + + WINREC(pWin) = winRec; + + RL_DEBUG_MSG("creating frame "); + CallFrameProc(pScreen, CreateFrame, + (pScreen, &WINREC(pWin)->frame, + pWin->prevSib ? &WINREC(pWin->prevSib)->frame : NULL)); + + // fixme implement ParentRelative with transparency? + // need non-interfering fb first + // Disallow ParentRelative background state + // This might have been set before the window was mapped + if (pWin->backgroundState == ParentRelative) { + XID pixel = 0; + ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); + } + +#ifdef SHAPE + // Shape is usually set before the window is mapped, but + // (for now) we don't keep track of frames before they're mapped. + winRec->shapeDamage = TRUE; +#endif + } + + UpdatePixmap(pWin); + + if (!IsRoot(pWin)) HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, RealizeWindow); + result = pScreen->RealizeWindow(pWin); + SCREEN_WRAP(pScreen, RealizeWindow); + if (!IsRoot(pWin)) NORMAL_ROOT(pWin); + + RL_DEBUG_MSG("realizewindow end\n"); + return result; + +windowcreatebad: + RL_DEBUG_MSG("window create bad! "); + RL_DEBUG_MSG("realizewindow end\n"); + return NULL; +} + + +Bool +RootlessUnrealizeWindow(WindowPtr pWin) +{ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("unrealizewindow start "); + + if (IsTopLevel(pWin) || IsRoot(pWin)) { + RootlessWindowRec *winRec = WINREC(pWin); + + RootlessRedisplay(pWin); + CallFrameProc(pScreen, DestroyFrame, (pScreen, &winRec->frame)); + + REGION_UNINIT(pScreen, &winRec->damage); + + xfree(winRec); + WINREC(pWin) = NULL; + } + + SCREEN_UNWRAP(pScreen, UnrealizeWindow); + result = pScreen->UnrealizeWindow(pWin); + SCREEN_WRAP(pScreen, UnrealizeWindow); + RL_DEBUG_MSG("unrealizewindow end\n"); + return result; +} + + +void +RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) +{ + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("restackwindow start "); + if (winRec) RL_DEBUG_MSG("restack top level \n"); + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, RestackWindow); + if (pScreen->RestackWindow) pScreen->RestackWindow(pWin, pOldNextSib); + SCREEN_WRAP(pScreen, RestackWindow); + NORMAL_ROOT(pWin); + + if (winRec) { + // fixme simplify the following + + WindowPtr oldNextW, newNextW, oldPrevW, newPrevW; + RootlessFramePtr oldNext, newNext, oldPrev, newPrev; + + oldNextW = pOldNextSib; + while (oldNextW && ! WINREC(oldNextW)) oldNextW = oldNextW->nextSib; + oldNext = oldNextW ? &WINREC(oldNextW)->frame : NULL; + + newNextW = pWin->nextSib; + while (newNextW && ! WINREC(newNextW)) newNextW = newNextW->nextSib; + newNext = newNextW ? &WINREC(newNextW)->frame : NULL; + + oldPrevW= pOldNextSib ? pOldNextSib->prevSib : pWin->parent->lastChild; + while (oldPrevW && ! WINREC(oldPrevW)) oldPrevW = oldPrevW->prevSib; + oldPrev = oldPrevW ? &WINREC(oldPrevW)->frame : NULL; + + newPrevW = pWin->prevSib; + while (newPrevW && ! WINREC(newPrevW)) newPrevW = newPrevW->prevSib; + newPrev = newPrevW ? &WINREC(newPrevW)->frame : NULL; + + if (pWin->prevSib) { + WindowPtr w = pWin->prevSib; + while (w) { + RL_DEBUG_MSG("w 0x%x\n", w); + w = w->parent; + } + } + + CallFrameProc(pScreen, RestackFrame, + (pScreen, &winRec->frame, oldPrev, newPrev)); + } + + RL_DEBUG_MSG("restackwindow end\n"); +} + + +/* + * Specialized window copy procedures + */ + +// Globals needed during window resize and move. +static PixmapPtr gResizeDeathPix = NULL; +static pointer gResizeDeathBits = NULL; +static PixmapPtr gResizeCopyWindowSource = NULL; +static CopyWindowProcPtr gResizeOldCopyWindowProc = NULL; + +// CopyWindow() that doesn't do anything. +// For MoveWindow() of top-level windows. +static void +RootlessNoCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + // some code expects the region to be translated + int dx = ptOldOrg.x - pWin->drawable.x; + int dy = ptOldOrg.y - pWin->drawable.y; + RL_DEBUG_MSG("ROOTLESSNOCOPYWINDOW "); + + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); +} + + +// CopyWindow used during ResizeWindow for gravity moves. +// Cloned from fbCopyWindow +// The original always draws on the root pixmap (which we don't have). +// Instead, draw on the parent window's pixmap. +// Resize version: the old location's pixels are in gResizeCopyWindowSource +static void +RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + SCREEN_UNWRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("resizecopywindowFB start (win 0x%x) ", pWin); + + { + RegionRec rgnDst; + int dx, dy; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + REGION_INIT (pScreen, &rgnDst, NullBox, 0); + REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + fbCopyRegion (&gResizeCopyWindowSource->drawable, + &pScreen->GetWindowPixmap(pWin)->drawable, + 0, + &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + + // don't update - resize will update everything + // fixme DO update? + REGION_UNINIT(pScreen, &rgnDst); + fbValidateDrawable (&pWin->drawable); + } + + SCREEN_WRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("resizecopywindowFB end\n"); +} + + +/* Update *new* location of window. Old location is redrawn with + * PaintWindowBackground/Border. + * Cloned from fbCopyWindow + * The original always draws on the root pixmap (which we don't have). + * Instead, draw on the parent window's pixmap. + */ +void +RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + SCREEN_UNWRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("copywindowFB start (win 0x%x) ", pWin); + + { + RegionRec rgnDst; + int dx, dy; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + + REGION_INIT(pScreen, &rgnDst, NullBox, 0); + REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + fbCopyRegion ((DrawablePtr)pWin, (DrawablePtr)pWin, + 0, + &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + + // prgnSrc has been translated to dst position + RootlessDamageRegion(pWin, prgnSrc); + REGION_UNINIT(pScreen, &rgnDst); + fbValidateDrawable (&pWin->drawable); + } + + SCREEN_WRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("copywindowFB end\n"); +} + + +/* + * Window resize procedures + */ + +// Prepare to resize a window. +// The old window's pixels are saved and the implementation is told +// to change the window size. +// (x,y,w,h) is outer frame of window (outside border) +static void +StartFrameResize(WindowPtr pWin, Bool gravity, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH, unsigned int oldBW, + int newX, int newY, + unsigned int newW, unsigned int newH, unsigned int newBW) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + + RL_DEBUG_MSG("RESIZE TOPLEVEL WINDOW "); + RL_DEBUG_MSG("%d %d %d %d %d %d %d %d %d %d ", + oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + + RootlessRedisplay(pWin); + + // Make a copy of the current pixmap and all its data. + // The original will go away when we ask the frame manager to + // allocate the new pixmap. + + gResizeDeathBits = xalloc(winRec->frame.bytesPerRow * winRec->frame.h); + memcpy(gResizeDeathBits, winRec->frame.pixelData, + winRec->frame.bytesPerRow * winRec->frame.h); + gResizeDeathPix = + GetScratchPixmapHeader(pScreen, winRec->frame.w, winRec->frame.h, + winRec->frame.depth, winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, gResizeDeathBits); + SetPixmapBaseToScreen(gResizeDeathPix, winRec->frame.x, winRec->frame.y); + + winRec->frame.x = newX; + winRec->frame.y = newY; + winRec->frame.w = newW; + winRec->frame.h = newH; + winRec->borderWidth = newBW; + + CallFrameProc(pScreen, StartResizeFrame, + (pScreen, &winRec->frame, oldX, oldY, oldW, oldH)); + UpdatePixmap(pWin); + + // Use custom CopyWindow when moving gravity bits around + // ResizeWindow assumes the old window contents are in the same + // pixmap, but here they're in deathPix instead. + if (gravity) { + gResizeCopyWindowSource = gResizeDeathPix; + gResizeOldCopyWindowProc = pScreen->CopyWindow; + pScreen->CopyWindow = RootlessResizeCopyWindow; + } + + // Copy pixels in intersection from src to dst. + // ResizeWindow assumes these pixels are already present when + // making gravity adjustments. + // pWin currently has new-sized pixmap but is in old position + // fixme border width change! + { + RegionRec r; + DrawablePtr src = &gResizeDeathPix->drawable; + DrawablePtr dst = &pScreen->GetWindowPixmap(pWin)->drawable; + // These vars are needed because implicit unsigned->signed fails + int oldX2 = (int)(oldX + oldW), newX2 = (int)(newX + newW); + int oldY2 = (int)(oldY + oldH), newY2 = (int)(newY + newH); + + r.data = NULL; + r.extents.x1 = max(oldX, newX); + r.extents.y1 = max(oldY, newY); + r.extents.x2 = min(oldX2, newX2); + r.extents.y2 = min(oldY2, newY2); + + // r is now intersection of of old location and new location + if (r.extents.x2 > r.extents.x1 && r.extents.y2 > r.extents.y1) { +#if 0 + DDXPointRec srcPt = {r.extents.x1, r.extents.y1}; + // Correct for border width change + // fixme need to correct for border width change + int dx = newX - oldX; + int dy = newY - oldY; + REGION_TRANSLATE(pScreen, &r, dx, dy); +#endif + fbCopyRegion(src, dst, NULL, &r, 0, 0, fbCopyWindowProc, 0, 0); + } + REGION_UNINIT(pScreen, &r); + } +} + + +static void +FinishFrameResize(WindowPtr pWin, Bool gravity, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH, unsigned int oldBW, + int newX, int newY, + unsigned int newW, unsigned int newH, unsigned int newBW) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + + CallFrameProc(pScreen, FinishResizeFrame, + (pScreen, &winRec->frame, oldX, oldY, oldW, oldH)); + if (wBoundingShape(pWin)) { + RootlessDamageShape(pWin); + } + + // Destroy temp pixmap + FreeScratchPixmapHeader(gResizeDeathPix); + xfree(gResizeDeathBits); + gResizeDeathPix = gResizeDeathBits = NULL; + + if (gravity) { + pScreen->CopyWindow = gResizeOldCopyWindowProc; + gResizeCopyWindowSource = NULL; + } +} + + +// If kind==VTOther, window border is resizing (and borderWidth is +// already changed!!@#$) This case works like window resize, not move. +void +RootlessMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) +{ + CopyWindowProcPtr oldCopyWindowProc = NULL; + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0, newW = 0, newH = 0, newBW = 0; + + RL_DEBUG_MSG("movewindow start \n"); + + if (winRec) { + if (kind == VTMove) { + oldX = winRec->frame.x; + oldY = winRec->frame.y; + RootlessRedisplay(pWin); + } else { + RL_DEBUG_MSG("movewindow border resizing "); + oldBW = winRec->borderWidth; + oldX = winRec->frame.x; + oldY = winRec->frame.y; + oldW = winRec->frame.w; + oldH = winRec->frame.h; + newBW = pWin->borderWidth; + newX = x; + newY = y; + newW = pWin->drawable.width + 2*newBW; + newH = pWin->drawable.height + 2*newBW; + StartFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, MoveWindow); + if (winRec) { + oldCopyWindowProc = pScreen->CopyWindow; + pScreen->CopyWindow = RootlessNoCopyWindow; + } + pScreen->MoveWindow(pWin, x, y, pSib, kind); + if (winRec) { + pScreen->CopyWindow = oldCopyWindowProc; + } + NORMAL_ROOT(pWin); + SCREEN_WRAP(pScreen, MoveWindow); + + if (winRec) { + if (kind == VTMove) { + // PositionWindow has already set the new frame position. + CallFrameProc(pScreen, MoveFrame, + (pScreen, &winRec->frame, oldX, oldY)); + } else { + FinishFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + + RL_DEBUG_MSG("movewindow end\n"); +} + + +// Note: (x, y, w, h) as passed to this procedure don't match +// the frame definition. +// (x,y) is corner of very outer edge, *outside* border +// w,h is width and height *inside8 border, *ignoring* border width +// The rect (x, y, w, h) doesn't mean anything. +// (x, y, w+2*bw, h+2*bw) is total rect +// (x+bw, y+bw, w, h) is inner rect + +void +RootlessResizeWindow(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib) +{ + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0, newW = 0, newH = 0, newBW = 0; + + RL_DEBUG_MSG("resizewindow start (win 0x%x) ", pWin); + + if (winRec) { + oldBW = winRec->borderWidth; + oldX = winRec->frame.x; + oldY = winRec->frame.y; + oldW = winRec->frame.w; + oldH = winRec->frame.h; + + newBW = oldBW; + newX = x; + newY = y; + newW = w + 2*newBW; + newH = h + 2*newBW; + + StartFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, ResizeWindow); + pScreen->ResizeWindow(pWin, x, y, w, h, pSib); + SCREEN_WRAP(pScreen, ResizeWindow); + NORMAL_ROOT(pWin); + + if (winRec) { + FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + RL_DEBUG_MSG("resizewindow end\n"); +} + + +// fixme untested! +// pWin inside corner stays the same +// pWin->drawable.[xy] stays the same +// frame moves and resizes +void +RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width) +{ + RegionRec saveRoot; + + RL_DEBUG_MSG("change border width "); + if (width != pWin->borderWidth) { + RootlessWindowRec *winRec = WINREC(pWin); + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0; + unsigned int newW = 0, newH = 0, newBW = 0; + + if (winRec) { + oldBW = winRec->borderWidth; + oldX = winRec->frame.x; + oldY = winRec->frame.y; + oldW = winRec->frame.w; + oldH = winRec->frame.h; + + newBW = width; + newX = pWin->drawable.x - newBW; + newY = pWin->drawable.y - newBW; + newW = pWin->drawable.width + 2*newBW; + newH = pWin->drawable.height + 2*newBW; + + StartFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pWin->drawable.pScreen, ChangeBorderWidth); + pWin->drawable.pScreen->ChangeBorderWidth(pWin, width); + SCREEN_WRAP(pWin->drawable.pScreen, ChangeBorderWidth); + NORMAL_ROOT(pWin); + + if (winRec) { + FinishFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + RL_DEBUG_MSG("change border width end\n"); +} Index: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessWindow.h diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessWindow.h:1.1 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessWindow.h Wed Mar 27 21:21:20 2002 @@ -0,0 +1,32 @@ +/* + * Rootless window management + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz_1.3/rootlessWindow.h,v 1.1 2002/03/28 02:21:20 torrey Exp $ */ + +#ifndef _ROOTLESSWINDOW_H +#define _ROOTLESSWINDOW_H + +#include "rootlessCommon.h" + + +Bool RootlessCreateWindow(WindowPtr pWin); +Bool RootlessDestroyWindow(WindowPtr pWin); + +#ifdef SHAPE +void RootlessSetShape(WindowPtr pWin); +#endif // SHAPE + +Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask); +Bool RootlessPositionWindow(WindowPtr pWin, int x, int y); +Bool RootlessRealizeWindow(WindowPtr pWin); +Bool RootlessUnrealizeWindow(WindowPtr pWin); +void RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib); +void RootlessCopyWindow(WindowPtr pWin,DDXPointRec ptOldOrg,RegionPtr prgnSrc); +void RootlessMoveWindow(WindowPtr pWin,int x,int y,WindowPtr pSib,VTKind kind); +void RootlessResizeWindow(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib); +void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width); + +#endif Index: xc/programs/Xserver/hw/darwin/quartz_1.3/XDarwin.pbproj/project.pbxproj diff -u /dev/null xc/programs/Xserver/hw/darwin/quartz_1.3/XDarwin.pbproj/project.pbxproj:1.2 --- /dev/null Thu Feb 27 12:29:21 2003 +++ xc/programs/Xserver/hw/darwin/quartz_1.3/XDarwin.pbproj/project.pbxproj Thu Mar 28 20:25:11 2002 @@ -0,0 +1,1372 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 32; + objects = { + 01279092000747AA0A000002 = { + isa = PBXFileReference; + path = XServer.m; + refType = 4; + }; + 0127909600074AF60A000002 = { + isa = PBXFileReference; + name = XApplication.m; + path = ../quartz/XApplication.m; + refType = 4; + }; + 0127909800074B1A0A000002 = { + isa = PBXFileReference; + name = XApplication.h; + path = ../quartz/XApplication.h; + refType = 4; + }; + 014C68ED00ED6A9D7F000001 = { + isa = PBXFileReference; + path = XView.h; + refType = 4; + }; + 014C68EE00ED6A9D7F000001 = { + isa = PBXFileReference; + path = XView.m; + refType = 4; + }; + 014C68EF00ED6A9D7F000001 = { + isa = PBXFileReference; + path = XWindow.h; + refType = 4; + }; + 014C68F000ED6A9D7F000001 = { + isa = PBXFileReference; + path = XWindow.m; + refType = 4; + }; + 014C68F200ED7AD67F000001 = { + isa = PBXFileReference; + name = fakeBoxRec.h; + path = ../quartz/fakeBoxRec.h; + refType = 4; + }; + 014C68F300EE5AB97F000001 = { + isa = PBXFileReference; + path = rootlessCommon.c; + refType = 4; + }; + 014C68F400EE5AB97F000001 = { + isa = PBXFileReference; + path = rootlessCommon.h; + refType = 4; + }; + 014C68F700EE678F7F000001 = { + isa = PBXFileReference; + path = rootlessWindow.c; + refType = 4; + }; + 014C68F800EE678F7F000001 = { + isa = PBXFileReference; + path = rootlessWindow.h; + refType = 4; + }; + 015698ED003DF345CE6F79C2 = { + isa = PBXFileReference; + path = XDarwin.icns; + refType = 4; + }; + 0157A37D002CF6D7CE6F79C2 = { + children = ( + F533214601A4B45401000001, + 0157A37E002CF6D7CE6F79C2, + F58D65DF018F79B101000001, + F533213D0193CBE001000001, + 43B962E200617B93416877C2, + F5ACD263C5BE031F01000001, + F51BF62E02026E3501000001, + F5ACD25CC5B5E96601000001, + F587E16401924C6901000001, + ); + isa = PBXVariantGroup; + name = Credits.rtf; + path = ""; + refType = 4; + }; + 0157A37E002CF6D7CE6F79C2 = { + isa = PBXFileReference; + name = English; + path = English.lproj/Credits.rtf; + refType = 4; + }; + 015EDCEA004203A8CE6F79C2 = { + isa = PBXFrameworkReference; + name = IOKit.framework; + path = /System/Library/Frameworks/IOKit.framework; + refType = 0; + }; + 017D6F4400E861FB7F000001 = { + isa = PBXFileReference; + path = rootlessGC.c; + refType = 4; + }; + 017D6F4500E861FB7F000001 = { + isa = PBXFileReference; + path = rootlessScreen.c; + refType = 4; + }; + 018F40F2003E1902CE6F79C2 = { + children = ( + 018F40F3003E1916CE6F79C2, + 021D6BA9003E1BACCE6F79C2, + 3E74E03600863F047F000001, + 018F40F6003E1974CE6F79C2, + ); + isa = PBXGroup; + name = "X Server"; + path = ..; + refType = 4; + }; + 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; + }; +//010 +//011 +//012 +//013 +//014 +//020 +//021 +//022 +//023 +//024 + 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 = ( + F533214701A4B48301000001, + 02E03CA100348209CE6F79C2, + F58D65E0018F79C001000001, + F533213E0193CBF401000001, + 43B962E300617B93416877C2, + F5ACD268C5BE046401000001, + F51BF62F02026E5C01000001, + F5ACD261C5B5EA2001000001, + F587E16501924C7401000001, + ); + isa = PBXVariantGroup; + name = XDarwinHelp.html; + path = ""; + refType = 4; + }; + 02E03CA100348209CE6F79C2 = { + isa = PBXFileReference; + name = English; + path = English.lproj/XDarwinHelp.html; + refType = 4; + }; +//020 +//021 +//022 +//023 +//024 +//030 +//031 +//032 +//033 +//034 + 0338412F0083BFE57F000001 = { + isa = PBXFileReference; + path = quartzCursor.h; + refType = 4; + }; +//030 +//031 +//032 +//033 +//034 +//040 +//041 +//042 +//043 +//044 + 04329610000763920A000002 = { + isa = PBXFileReference; + name = Preferences.m; + path = ../quartz/Preferences.m; + refType = 4; + }; + 04329611000763920A000002 = { + isa = PBXFileReference; + name = Preferences.h; + path = ../quartz/Preferences.h; + refType = 4; + }; +//040 +//041 +//042 +//043 +//044 +//060 +//061 +//062 +//063 +//064 + 06EB6C3B004099E7CE6F79C2 = { + isa = PBXFileReference; + path = quartzShared.h; + refType = 4; + }; +//060 +//061 +//062 +//063 +//064 +//080 +//081 +//082 +//083 +//084 + 080E96DDFE201D6D7F000001 = { + children = ( + 04329610000763920A000002, + 04329611000763920A000002, + 0127909600074AF60A000002, + 0127909800074B1A0A000002, + 01279092000747AA0A000002, + 1C4A3109004D8F24CE6F79C2, + 014C68EE00ED6A9D7F000001, + 014C68ED00ED6A9D7F000001, + 014C68F000ED6A9D7F000001, + 014C68EF00ED6A9D7F000001, + ); + isa = PBXGroup; + name = Classes; + refType = 4; + }; + 089C165CFE840E0CC02AAC07 = { + children = ( + F533214301A4B3F001000001, + 089C165DFE840E0CC02AAC07, + F58D65DD018F798F01000001, + F533213A0193CBA201000001, + 43B962E100617B49416877C2, + F5ACD269C5BE049301000001, + F51BF62B02026DDA01000001, + F5ACD262C5B5EA4D01000001, + F587E16101924C2F01000001, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings; + refType = 4; + }; + 089C165DFE840E0CC02AAC07 = { + isa = PBXFileReference; + name = English; + path = English.lproj/InfoPlist.strings; + refType = 4; + }; +//080 +//081 +//082 +//083 +//084 +//0A0 +//0A1 +//0A2 +//0A3 +//0A4 + 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; + }; + dependencies = ( + ); + isa = PBXApplicationTarget; + name = XDarwin; + productInstallPath = ""; + productName = XDarwin; + productReference = 0A79E19E004499A1CE6F79C2; + productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> +<!DOCTYPE plist SYSTEM \"file://localhost/System/Library/DTDs/PropertyList.dtd\"> +<plist version=\"0.9\"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>XDarwin</string> + <key>CFBundleGetInfoString</key> + <string>XDarwin 1.1, ©2001-2002 XFree86 Project, Inc.</string> + <key>CFBundleIconFile</key> + <string>XDarwin.icns</string> + <key>CFBundleIdentifier</key> + <string>org.xfree86.XDarwin</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>XDarwin</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>XDarwin 1.1</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string></string> + <key>NSHelpFile</key> + <string>XDarwinHelp.html</string> + <key>NSMainNibFile</key> + <string>MainMenu</string> + <key>NSPrincipalClass</key> + <string>XApplication</string> +</dict> +</plist> +"; + shouldUseHeadermap = 0; + }; + 0A79E1A0004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + name = Headers; + }; + 0A79E1A1004499A1CE6F79C2 = { + buildActionMask = 2147483647; + files = ( + 0A79E1A600449EB2CE6F79C2, + 0A79E1A700449EB2CE6F79C2, + 0A79E1A800449EB2CE6F79C2, + 0A79E1A900449EB2CE6F79C2, + 0A79E1AA00449EB2CE6F79C2, + 1220774500712D2D416877C2, + F54BF6ED017D506E01000001, + ); + 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 = { + }; + }; +//0A0 +//0A1 +//0A2 +//0A3 +//0A4 +//100 +//101 +//102 +//103 +//104 + 1058C7A0FEA54F0111CA2CBB = { + children = ( + F53321400193CCF001000001, + 1BE4F84D0006C9890A000002, + 1058C7A1FEA54F0111CA2CBB, + F53321410193CCF001000001, + 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; + }; +//100 +//101 +//102 +//103 +//104 +//120 +//121 +//122 +//123 +//124 + 1220774300712D2D416877C2 = { + children = ( + F533214501A4B42501000001, + 1220774400712D2D416877C2, + F58D65DE018F79A001000001, + F533213C0193CBC901000001, + 1220774600712D75416877C2, + F5ACD266C5BE03C501000001, + F51BF62D02026E1C01000001, + F5ACD25FC5B5E9AA01000001, + F587E16301924C5E01000001, + ); + 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; + }; +//120 +//121 +//122 +//123 +//124 +//170 +//171 +//172 +//173 +//174 + 170DFAFF00729A35416877C2 = { + isa = PBXFileReference; + name = XDarwinStartup.c; + path = ../quartz/XDarwinStartup.c; + refType = 4; + }; + 170DFB0000729C86416877C2 = { + children = ( + 018F40FC003E1983CE6F79C2, + 018F40FE003E1988CE6F79C2, + 018F4100003E19E4CE6F79C2, + 02A1FEA6006D34BE416877C2, + ); + isa = PBXGroup; + name = IOKit; + path = ..; + refType = 4; + }; +//170 +//171 +//172 +//173 +//174 +//190 +//191 +//192 +//193 +//194 + 19C28FACFE9D520D11CA2CBB = { + children = ( + 0A79E19E004499A1CE6F79C2, + ); + isa = PBXGroup; + name = Products; + refType = 4; + }; +//190 +//191 +//192 +//193 +//194 +//1B0 +//1B1 +//1B2 +//1B3 +//1B4 + 1BD8DE4200B8A3567F000001 = { + children = ( + F533214401A4B40F01000001, + 1BD8DE4300B8A3567F000001, + F58D65DC018F794D01000001, + F533213B0193CBB401000001, + 1BD8DE4700B8A3C77F000001, + F5ACD264C5BE035B01000001, + F51BF62C02026E0601000001, + F5ACD25DC5B5E97701000001, + F587E16201924C5301000001, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings.cpp; + path = ""; + refType = 4; + }; + 1BD8DE4300B8A3567F000001 = { + isa = PBXFileReference; + name = English; + path = English.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + 1BD8DE4400B8A38E7F000001 = { + children = ( + F533214801A4B4D701000001, + 1BD8DE4500B8A38E7F000001, + F58D65E1018F79E001000001, + F533213F0193CC2501000001, + 1BD8DE4800B8A4167F000001, + F5ACD267C5BE03FC01000001, + F51BF63002026E8D01000001, + F5ACD260C5B5E9DF01000001, + F587E16601924C9D01000001, + ); + 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; + }; +//1B0 +//1B1 +//1B2 +//1B3 +//1B4 +//1C0 +//1C1 +//1C2 +//1C3 +//1C4 + 1C4A3109004D8F24CE6F79C2 = { + isa = PBXFileReference; + path = XServer.h; + refType = 4; + }; +//1C0 +//1C1 +//1C2 +//1C3 +//1C4 +//230 +//231 +//232 +//233 +//234 + 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; + }; +//230 +//231 +//232 +//233 +//234 +//290 +//291 +//292 +//293 +//294 + 29B97313FDCFA39411CA2CEA = { + buildStyles = ( + 237A34C20076E37E7F000001, + 237A34C30076E37E7F000001, + ); + isa = PBXProject; + knownRegions = ( + English, + Japanese, + French, + German, + Swedish, + Dutch, + Spanish, + ko, + Portuguese, + ); + mainGroup = 29B97314FDCFA39411CA2CEA; + projectDirPath = ""; + targets = ( + 0A79E19F004499A1CE6F79C2, + ); + }; + 29B97314FDCFA39411CA2CEA = { + children = ( + 080E96DDFE201D6D7F000001, + 018F40F2003E1902CE6F79C2, + 170DFB0000729C86416877C2, + 43B962CE00617089416877C2, + F51B53260253F84B01000001, + 32FEE13C00E07C3E7F000001, + 29B97315FDCFA39411CA2CEA, + 29B97317FDCFA39411CA2CEA, + 29B97323FDCFA39411CA2CEA, + 19C28FACFE9D520D11CA2CBB, + ); + isa = PBXGroup; + name = "Xmaster-Cocoa"; + path = ""; + refType = 4; + }; + 29B97315FDCFA39411CA2CEA = { + children = ( + 170DFAFF00729A35416877C2, + ); + isa = PBXGroup; + name = "Other Sources"; + path = ""; + refType = 2; + }; + 29B97317FDCFA39411CA2CEA = { + children = ( + 29B97318FDCFA39411CA2CEA, + 089C165CFE840E0CC02AAC07, + 1BD8DE4200B8A3567F000001, + 1220774300712D2D416877C2, + 0157A37D002CF6D7CE6F79C2, + 02E03CA000348209CE6F79C2, + 1BD8DE4400B8A38E7F000001, + 015698ED003DF345CE6F79C2, + F54BF6EA017D500901000001, + F54BF6EC017D506E01000001, + ); + isa = PBXGroup; + name = Resources; + path = ../bundle; + refType = 4; + }; + 29B97318FDCFA39411CA2CEA = { + children = ( + F533214201A4B3CE01000001, + 29B97319FDCFA39411CA2CEA, + F58D65DB018F793801000001, + F53321390193CB6A01000001, + 43B962E000617B49416877C2, + F5ACD265C5BE038601000001, + F51BF62A02026DAF01000001, + F5ACD25EC5B5E98D01000001, + F587E16001924C1D01000001, + ); + 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; + }; +//290 +//291 +//292 +//293 +//294 +//320 +//321 +//322 +//323 +//324 + 32FEE13C00E07C3E7F000001 = { + children = ( + 014C68F200ED7AD67F000001, + F5269C2D01D5BC3501000001, + F5269C2E01D5BC3501000001, + 32FEE13E00E07CBE7F000001, + 32FEE13F00E07CBE7F000001, + 32FEE14000E07CBE7F000001, + 32FEE14100E07CBE7F000001, + 32FEE14200E07CBE7F000001, + 014C68F300EE5AB97F000001, + 014C68F400EE5AB97F000001, + 017D6F4400E861FB7F000001, + 017D6F4500E861FB7F000001, + 014C68F700EE678F7F000001, + 014C68F800EE678F7F000001, + 32FEE14900E07D317F000001, + ); + isa = PBXGroup; + name = Rootless; + path = ""; + refType = 4; + }; + 32FEE13E00E07CBE7F000001 = { + isa = PBXFileReference; + path = rootless.h; + refType = 4; + }; + 32FEE13F00E07CBE7F000001 = { + isa = PBXFileReference; + path = rootlessAqua.h; + refType = 4; + }; + 32FEE14000E07CBE7F000001 = { + isa = PBXFileReference; + path = rootlessAquaGlue.c; + refType = 4; + }; + 32FEE14100E07CBE7F000001 = { + isa = PBXFileReference; + path = rootlessAquaImp.h; + refType = 4; + }; + 32FEE14200E07CBE7F000001 = { + isa = PBXFileReference; + path = rootlessAquaImp.m; + refType = 4; + }; + 32FEE14900E07D317F000001 = { + isa = PBXFileReference; + path = rootlessValTree.c; + refType = 4; + }; +//320 +//321 +//322 +//323 +//324 +//350 +//351 +//352 +//353 +//354 + 3576829A0077B8F17F000001 = { + isa = PBXFileReference; + path = quartzCursor.c; + refType = 4; + }; +//350 +//351 +//352 +//353 +//354 +//3E0 +//3E1 +//3E2 +//3E3 +//3E4 + 3E74E03600863F047F000001 = { + isa = PBXFileReference; + path = darwinClut8.h; + refType = 4; + }; +//3E0 +//3E1 +//3E2 +//3E3 +//3E4 +//430 +//431 +//432 +//433 +//434 + 43B962CE00617089416877C2 = { + children = ( + 018F40F8003E1979CE6F79C2, + 018F40FA003E197ECE6F79C2, + 237A34C10076E37E7F000001, + 237A34C40076F4F07F000001, + 3576829A0077B8F17F000001, + 0338412F0083BFE57F000001, + 43B962D000617089416877C2, + 43B962D100617089416877C2, + 43B962CF00617089416877C2, + F5582948015DAD3B01000001, + 06EB6C3B004099E7CE6F79C2, + 02A1FEA8006D38F0416877C2, + ); + isa = PBXGroup; + name = Quartz; + path = ../quartz; + 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; + }; +//430 +//431 +//432 +//433 +//434 +//F50 +//F51 +//F52 +//F53 +//F54 + F51B53260253F84B01000001 = { + children = ( + F51B53270253F8B701000001, + F51B53280253F8B701000001, + ); + isa = PBXGroup; + name = "Full Screen"; + path = ../quartz; + refType = 4; + }; + F51B53270253F8B701000001 = { + isa = PBXFileReference; + path = fullscreen.c; + refType = 4; + }; + F51B53280253F8B701000001 = { + isa = PBXFileReference; + path = fullscreen.h; + refType = 4; + }; + F51BF62A02026DAF01000001 = { + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/MainMenu.nib; + refType = 4; + }; + F51BF62B02026DDA01000001 = { + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/InfoPlist.strings; + refType = 4; + }; + F51BF62C02026E0601000001 = { + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F51BF62D02026E1C01000001 = { + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/Localizable.strings; + refType = 4; + }; + F51BF62E02026E3501000001 = { + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/Credits.rtf; + refType = 4; + }; + F51BF62F02026E5C01000001 = { + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/XDarwinHelp.html; + refType = 4; + }; + F51BF63002026E8D01000001 = { + isa = PBXFileReference; + name = Portuguese; + path = Portuguese.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5269C2D01D5BC3501000001 = { + isa = PBXFileReference; + name = pseudoramiX.c; + path = ../quartz/pseudoramiX.c; + refType = 4; + }; + F5269C2E01D5BC3501000001 = { + isa = PBXFileReference; + name = pseudoramiX.h; + path = ../quartz/pseudoramiX.h; + refType = 4; + }; + F53321390193CB6A01000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/MainMenu.nib; + refType = 4; + }; + F533213A0193CBA201000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/InfoPlist.strings; + refType = 4; + }; + F533213B0193CBB401000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F533213C0193CBC901000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/Localizable.strings; + refType = 4; + }; + F533213D0193CBE001000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/Credits.rtf; + refType = 4; + }; + F533213E0193CBF401000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/XDarwinHelp.html; + refType = 4; + }; + F533213F0193CC2501000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F53321400193CCF001000001 = { + isa = PBXFrameworkReference; + name = ApplicationServices.framework; + path = /System/Library/Frameworks/ApplicationServices.framework; + refType = 0; + }; + F53321410193CCF001000001 = { + isa = PBXFrameworkReference; + name = CoreAudio.framework; + path = /System/Library/Frameworks/CoreAudio.framework; + refType = 0; + }; + F533214201A4B3CE01000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/MainMenu.nib; + refType = 4; + }; + F533214301A4B3F001000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/InfoPlist.strings; + refType = 4; + }; + F533214401A4B40F01000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F533214501A4B42501000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/Localizable.strings; + refType = 4; + }; + F533214601A4B45401000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/Credits.rtf; + refType = 4; + }; + F533214701A4B48301000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/XDarwinHelp.html; + refType = 4; + }; + F533214801A4B4D701000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F54BF6EA017D500901000001 = { + isa = PBXFileReference; + path = startXClients.cpp; + refType = 4; + }; + F54BF6EC017D506E01000001 = { + isa = PBXFileReference; + path = startXClients; + refType = 4; + }; + F54BF6ED017D506E01000001 = { + fileRef = F54BF6EC017D506E01000001; + isa = PBXBuildFile; + settings = { + }; + }; + F5582948015DAD3B01000001 = { + isa = PBXFileReference; + path = quartzCommon.h; + refType = 4; + }; + F587E16001924C1D01000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/MainMenu.nib; + refType = 4; + }; + F587E16101924C2F01000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/InfoPlist.strings; + refType = 4; + }; + F587E16201924C5301000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F587E16301924C5E01000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/Localizable.strings; + refType = 4; + }; + F587E16401924C6901000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/Credits.rtf; + refType = 4; + }; + F587E16501924C7401000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/XDarwinHelp.html; + refType = 4; + }; + F587E16601924C9D01000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F58D65DB018F793801000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/MainMenu.nib; + refType = 4; + }; + F58D65DC018F794D01000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F58D65DD018F798F01000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/InfoPlist.strings; + refType = 4; + }; + F58D65DE018F79A001000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/Localizable.strings; + refType = 4; + }; + F58D65DF018F79B101000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/Credits.rtf; + refType = 4; + }; + F58D65E0018F79C001000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/XDarwinHelp.html; + refType = 4; + }; + F58D65E1018F79E001000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5ACD25CC5B5E96601000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/Credits.rtf; + refType = 4; + }; + F5ACD25DC5B5E97701000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F5ACD25EC5B5E98D01000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/MainMenu.nib; + refType = 4; + }; + F5ACD25FC5B5E9AA01000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/Localizable.strings; + refType = 4; + }; + F5ACD260C5B5E9DF01000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5ACD261C5B5EA2001000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/XDarwinHelp.html; + refType = 4; + }; + F5ACD262C5B5EA4D01000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/InfoPlist.strings; + refType = 4; + }; + F5ACD263C5BE031F01000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/Credits.rtf; + refType = 4; + }; + F5ACD264C5BE035B01000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F5ACD265C5BE038601000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/MainMenu.nib; + refType = 4; + }; + F5ACD266C5BE03C501000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/Localizable.strings; + refType = 4; + }; + F5ACD267C5BE03FC01000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5ACD268C5BE046401000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/XDarwinHelp.html; + refType = 4; + }; + F5ACD269C5BE049301000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/InfoPlist.strings; + refType = 4; + }; + }; + rootObject = 29B97313FDCFA39411CA2CEA; +} Index: xc/programs/Xserver/hw/dec/ws/Imakefile diff -u xc/programs/Xserver/hw/dec/ws/Imakefile:1.1.1.3 xc/programs/Xserver/hw/dec/ws/Imakefile:removed --- xc/programs/Xserver/hw/dec/ws/Imakefile:1.1.1.3 Tue Jan 16 17:42:51 2001 +++ xc/programs/Xserver/hw/dec/ws/Imakefile Thu Feb 27 12:29:22 2003 @@ -1,37 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ -#include <Server.tmpl> - -XCOMM -XCOMM Only color frame buffers are currently supported -XCOMM -XCOMM ACC=acc_2da -XCOMM ACC=acc_3d -ACC=acc_none - -#if BuildXInputExt -XISRC = ext_device.c -XIOBJ = ext_device.o -#endif - -SRCS = init.c ws_io.c ws_color.c cfbinit.c $(XISRC) $(ACC).c mdepthinit.c -OFILES = init.o mdepthinit.o sdepthinit.o - -OBJS = ws_io.o ws_color.o cfbinit.o $(XIOBJ) $(ACC).o -INCLUDES = -I../../../mfb -I../../../mi -I../../../include -I$(XINCLUDESRC) \ - -I$(EXTINCSRC) -I$(FONTINCSRC) -LINTLIBS = ../../../dix/llib-ldix.ln ../../../os/llib-los.ln \ - ../../mfb/llib-lmfb.ln ../../mi/llib-lmi.ln - -all:: $(OFILES) - -NormalLibraryObjectRule() -NormalLintTarget($(SRCS)) - -lintlib: - -NormalLibraryTarget(dec,$(OBJS)) - -ObjectFromSpecialSource(sdepthinit,mdepthinit,-DSINGLEDEPTH) - -DependTarget() -InstallManPage(Xdec,$(MANDIR)) Index: xc/programs/Xserver/hw/dec/ws/Xdec.man diff -u xc/programs/Xserver/hw/dec/ws/Xdec.man:1.7 xc/programs/Xserver/hw/dec/ws/Xdec.man:removed --- xc/programs/Xserver/hw/dec/ws/Xdec.man:1.7 Fri Dec 14 14:59:36 2001 +++ xc/programs/Xserver/hw/dec/ws/Xdec.man Thu Feb 27 12:29:22 2003 @@ -1,291 +0,0 @@ -.\" $Xorg: Xdec.man,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ -.\" Copyright 1991 Digital Equipment Corporation -.\" Copyright 1993, 1998 The Open Group -.\" -.\" 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. -.\" -.\" 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 -.\" -.\" $XFree86: xc/programs/Xserver/hw/dec/ws/Xdec.man,v 1.7 2001/12/14 19:59:36 dawes Exp $ -.\" -.\" from The Open Group. -.TH XDEC 1 __xorgversion__ -.SH Name -Xdec \- X server for Digital RISC machines -.SH Syntax -.B Xdec -[ -.I options -] -.SH Description -.NXR "Xdec command to start X server" -.NXR "X server" -.NXR "X Window System" -.NXR "X Window System" "starting the server" -.NXR "Starting the server in the X Window System" -.NXM "Starting the server in the X Window System" -.PP -The -.PN Xdec -command starts the X server. The -.PN Xdec -command supports the following hardware configurations: -.nf - - DECstation 2100 Monochrome or Color Workstations - DECstation 3100 Monochrome or Color Workstations - DECstation 5000/100/200 CX or MX Single or Multiscreen Workstations -.fi -.PP -This server should run on reasonable one -bit or eight bit Ultrix/RISC TURBOchannel displays of any resolution, if -correct device driver support is present. -The server queries the device driver interface to determine if a -suitable display device is installed, and if so, configures the server -appropriately. -.LP -The command that executes the server is specified together with its -command line options in the -.PN /etc/ttys -file or using xdm(1) and, therefore, is automatically run when your system is -started in multiuser mode. -.\"Use the -.\".PN xset -.\".B \-q -.\"command to query the server for the options that are currently set. -Optionally, you can create an -.PN /etc/screens -file containing device-dependent command line -options (separated by spaces) and use it to start the server. -Command line options specified in the -command starting the X server override those specified in the -.PN /etc/screens -file. -.PP -Start the server in bug compatibility mode (with the \fBbc\fP -option) to remain bug-for-bug compatible with previous releases of the server. -.SH Options -In addition to the normal server options described in the \fIXserver(1)\fP -manual page, \fIXdec\fP accepts the following -device-dependent, vendor-specific options. -When the server is run on multiscreen capable platforms, selected -device-dependent options take an optional screen-specification argument. -Omitting the screen-specification argument defines the parameter for all -available screens. -.IP "\fB\-btn\fP \fInum\fP" 20 -Specifies the number of buttons on the pointer device. The default is three -for a mouse device and four for a tablet device. -.IP "\fB\-bp\fP[\fIscreen\fP] \fIcolor\fP" 20 -Sets the color of black pixels for the screen. -The \fIcolor\fP argument can be a named color from the -.PN rgb -database or a number sign (\fC#\fP) followed by a hexidecimal number. -.IP "\fB\-class\fP[\fIscreen\fP] \fIvisual class\fP" 20 -Sets the visual class for the root window of the screen. Possible values -are -.PN StaticGray , -.PN StaticColor , -.PN PseudoColor , -.PN GrayScale , -and -.PN TrueColor . -.\" .PN DirectColor . -.IP "\fB\-dpi\fP[\fIscreen\fP] \fInum\fP" 20 -Sets the dots per inch for the x and y coordinates. -.IP "\fB\-dpix\fP[\fIscreen\fP] \fInum\fP" 20 -Sets the dots per inch for the x coordinates. -.IP "\fB\-dpiy\fP[\fIscreen\fP] \fInum\fP" 20 -Sets the dots per inch for the y coordinates. -.LP -By default on multiscreen systems, the server presumes the -left hand most screen is screen zero, screen one to its right, screen -two yet further to its right, and so on. -The cursor will track from the -right hand edge of screen zero to the left hand edge of screen one, -from the right hand edge of screen one to the left hand edge of screen two. -This arrangement can be modified in various ways, to support -other physical arrangements of monitors. -.IP "\fB\-edge_bottom\fP\fIscr1\fP \fIscr2\fP" 20 -Attaches the bottom edge of the screen specified by \fIscr1\fP to the -screen specified by \fIscr2\fP. -.IP "\fB\-edge_left\fP\fIscr1\fP \fIscr2\fP" 20 -Attaches the left edge of the screen specified by \fIscr1\fP to the -screen specified by \fIscr2\fP. -.IP "\fB\-edge_right\fP\fIscr1\fP \fIscr2\fP" 20 -Attaches the right edge of the screen specified by \fIscr1\fP to the -screen specified by \fIscr2\fP. -.IP "\fB\-edge_top\fP\fIscr1\fP \fIscr2\fP" 20 -Attaches the top edge of the screen specified by \fIscr1\fP to the -screen specified by \fIscr2\fP. -.IP "\fB\-wp\fP[\fIscreen\fP] \fIcolor\fP" 20 -Sets the color of white pixels for the screen. The syntax for \fIcolor\fP -is the same as for the argument to the \fB\-bp\fP option. -.IP "\fB\-tb\fP \fIn\fP" 20 -Opens -.PN /dev/tty0\fIn\fP -\fRfor graphics tablet communications. -.IP "\fB\-pcm\fP \fIn\fP" 20 -\fROpens -.PN /dev/tty0\fIn\fP -\fRfor Protocol Control Module (PCM) communications. -The two free serial ports on the DECstation correspond to -.PN /dev/tty00 -and -.PN /dev/tty01 . -Dial boxes and button boxes must be connected through these two ports. -.SH Restrictions -If options not listed in this reference page are -used, the server may fail. Using invalid options for the X server -in the -.PN /etc/ttys -file may cause the workstation to behave as if the -X server is hung. -.PP -Multiscreen configurations can contain either two- or three-color frame -buffer display devices or monochrome frame buffer display devices. -.PP -Color and monochrome frame buffer display devices -can be installed in the same workstation, however applications -built before X11 release 5 may become confused due to poor initial design -of resource files. -.PP -To connect two screens, two command line options must be -issued. Attaching two screens using only one -.PN -edge_ -argument produces a one-way mouse-travel path. -You can create a wrap-around mouse path by attaching -noncontiguous screen edges. -The -.PN -edge_ -arguments are disabled on single screen systems. -.PP -Nonsensical screen connections are not allowed; the top edge of a -particular screen must be connected with the bottom edge of -another screen, and the right edge of a particular screen -must be connected with the left edge of another screen. -Left and right edges cannot be connected to top or bottom -edges. -.SH Examples -The following example specifies that screen -.PN 0 -has a resolution of -100x100 dots -per inch and screen -.PN 1 -has a resolution of 75x70 dots per inch: -.EX -Xdec -dpi0 100 -dpix1 75 -dpiy1 70 -.EE -.PP -If no screen is specified, the value specified is used -for all screens. If the screen resolution is not specified using -command line options, a default value -based on pixel dimensions and screen size is calculated for -each screen. -.PP -The following example specifies that black pixels on screen -.PN 1 -have the hexadecimal value 3a009e005c0 prefixed with a -number sign (\fC#\fP) and white pixels on screen -.PN 1 -are color "wheat" from the X rgb color database. -.EX -Xdec -bp1 #3a009e005c0 -wp1 wheat -.EE -For monochrome display devices, values of 0 and 1 -are the only valid pixel colors. -.PP -To specify the default visual class -of a root window on a particular screen, append the screen -number (\fC0\fP, \fC1\fP, or \fC2\fP) to the -.PN \-class -command line option. Possible visual classes are: -StaticGray, StaticColor, PseudoColor, GrayScale, and TrueColor. -The following example specifies that the screen -.PN 0 -root window is a TrueColor visual, and the screen -.PN 1 -root window is a PseudoColor visual. -.EX -Xdec -class0 TrueColor -class1 PseudoColor -.EE -.PP -The following example attaches screen -.PN 1 -above screen -.PN 0 -and screen -.PN 2 -to the right of screen -.PN 0 -(an L-shaped configuration): -.EX -Xdec -edge_top0 1 -edge_bottom1 0 -edge_right0 2 -edge_left2 0 -.EE -.PP -The following example is identical to the default state (a -horizontal line) with the addition of a wraparound from -screen -.PN 0 -to screen -.PN 2 : -.EX -Xdec -edge_left0 2 -edge_right0 1 -edge_left1 0 -edge_right1 2 \e --edge_left2 1 -edge_right2 0 -.EE -.SH Files -.PN \&~/.Xdefaults -.br -.PN /etc/ttys -.br -.PN /etc/screens -.SH See Also -X(1X), xdm(1), Xserver(1) -.\"XServer(1X) -.\"bitmap(1X), -.\"keycomp(1X), -.\"dxcalc(1X), -.\"dxcalendar(1X), -.\"dxcardfiler(1X) -.\"dxclock(1X), -.\"dxmail(1X), -.\"dxnotepad(1X), -.\"dxterm(1X), -.\"dxwm(1X), -.\"uwm(1X), -.\"xedit(1X), -.\"xfd(1X), -.\"xhost(1X), -.\"xload(1X), -.\"xmh(1X), -.\"xset(1X), -.\"xsetroot(1X), -.\"xwininfo(1X) -.br -\fIX Window System: The Complete Reference to Xlib, X Protocol, -ICCCM, XLFD,\fP by Robert W. Scheifler and James Gettys, -Second Edition, Digital Press, 1990 -.br -"X Window System Toolkit: The Complete Programmer's Guide -and Specification, by Paul J. Asente and Ralph R. Swick, -Digital Press, 1990 -.br -\fIOSF/MOTIF Programmer's Guide and OSF/MOTIF Reference -Guide,\fP Open Software Foundation, Prentice-Hall, 1990 Index: xc/programs/Xserver/hw/dec/ws/acc_2da.c diff -u xc/programs/Xserver/hw/dec/ws/acc_2da.c:1.2 xc/programs/Xserver/hw/dec/ws/acc_2da.c:removed --- xc/programs/Xserver/hw/dec/ws/acc_2da.c:1.2 Fri Dec 14 14:59:36 2001 +++ xc/programs/Xserver/hw/dec/ws/acc_2da.c Thu Feb 27 12:29:22 2003 @@ -1,72 +0,0 @@ -/* $Xorg: acc_2da.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ -/*********************************************************** - -Copyright 1991, 1998 The Open Group - -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. - -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. - - -Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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 <stdio.h> -#include <sys/types.h> -#include <sys/file.h> -#include <sys/time.h> -#include <sys/tty.h> -#include <errno.h> -#include <sys/devio.h> - -#include "X.h" -#include "Xproto.h" - -#include "scrnintstr.h" -#include "servermd.h" - -#include "input.h" -#include <sys/workstation.h> -#include "ws.h" - -Bool pxInitProc(); - -wsAcceleratorTypes types[] = { - {"PMAG-CA ", pxInitProc }, -}; - -int num_accelerator_types = sizeof (types) / sizeof (wsAcceleratorTypes); Index: xc/programs/Xserver/hw/dec/ws/acc_3d.c diff -u xc/programs/Xserver/hw/dec/ws/acc_3d.c:1.2 xc/programs/Xserver/hw/dec/ws/acc_3d.c:removed --- xc/programs/Xserver/hw/dec/ws/acc_3d.c:1.2 Fri Dec 14 14:59:37 2001 +++ xc/programs/Xserver/hw/dec/ws/acc_3d.c Thu Feb 27 12:29:22 2003 @@ -1,74 +0,0 @@ -/* $Xorg: acc_3d.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ -/*********************************************************** - -Copyright 1991, 1998 The Open Group - -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. - -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. - - -Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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 <stdio.h> -#include <sys/types.h> -#include <sys/file.h> -#include <sys/time.h> -#include <sys/tty.h> -#include <errno.h> -#include <sys/devio.h> - -#include "X.h" -#include "Xproto.h" - -#include "scrnintstr.h" -#include "servermd.h" - -#include "input.h" -#include <sys/workstation.h> -#include "ws.h" - -Bool pxInitProc(); - -wsAcceleratorTypes types[] = { - {"PMAG-DA ", pxInitProc }, - {"PMAG-FA ", pxInitProc }, - {"PMAG-CA ", pxInitProc }, -}; - -int num_accelerator_types = sizeof (types) / sizeof (wsAcceleratorTypes); Index: xc/programs/Xserver/hw/dec/ws/acc_none.c diff -u xc/programs/Xserver/hw/dec/ws/acc_none.c:1.2 xc/programs/Xserver/hw/dec/ws/acc_none.c:removed --- xc/programs/Xserver/hw/dec/ws/acc_none.c:1.2 Fri Dec 14 14:59:37 2001 +++ xc/programs/Xserver/hw/dec/ws/acc_none.c Thu Feb 27 12:29:22 2003 @@ -1,78 +0,0 @@ -/* $Xorg: acc_none.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ -/*********************************************************** - -Copyright 1991, 1998 The Open Group - -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. - -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. - - -Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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 <stdio.h> -#include <sys/types.h> -#include <sys/file.h> -#include <sys/time.h> -#include <sys/tty.h> -#include <errno.h> -#include <sys/devio.h> - -#include "X.h" -#include "Xproto.h" - -#include "scrnintstr.h" -#include "servermd.h" - -#include "input.h" -#include <sys/workstation.h> -#include "ws.h" - -Bool pxInitProc(); -#ifdef XV -Bool ropInitProc(); -#endif - -wsAcceleratorTypes types[] = { -#ifdef XV - {"PMAG-JA ", ropInitProc}, -#endif - {"", NULL}, -}; - -int num_accelerator_types = sizeof (types) / sizeof (wsAcceleratorTypes); Index: xc/programs/Xserver/hw/dec/ws/cfbinit.c diff -u xc/programs/Xserver/hw/dec/ws/cfbinit.c:1.6 xc/programs/Xserver/hw/dec/ws/cfbinit.c:removed --- xc/programs/Xserver/hw/dec/ws/cfbinit.c:1.6 Fri Dec 14 14:59:37 2001 +++ xc/programs/Xserver/hw/dec/ws/cfbinit.c Thu Feb 27 12:29:22 2003 @@ -1,491 +0,0 @@ -/* $Xorg: cfbinit.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ -/*********************************************************** - -Copyright 1991, 1998 The Open Group - -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. - -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. - - -Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -******************************************************************/ -/* - Todo. - ----- - **** Fix plane mask handling. The screen devprivate should have - a hardware specific planemask setting proc. For now, since - pmax is the only machine with a plane mask, so keep it global - for now. -*/ - -#include <stdio.h> -#include <sys/types.h> -#include <sys/file.h> -#include <sys/time.h> -#include <sys/tty.h> -#include <errno.h> -#include <sys/devio.h> - - -#include "misc.h" -#include "X.h" -#include "scrnintstr.h" -#include "pixmap.h" -#include "input.h" -#include "cursorstr.h" -#include "regionstr.h" -#include "resource.h" -#include "dixstruct.h" - -#include <sys/workstation.h> -#include <sys/inputdevice.h> -#include "ws.h" - -#include "mfb.h" -#include "mibstore.h" - -extern int wsScreenPrivateIndex; -extern CARD32 lastEventTime; -extern int defaultColorVisualClass; -void wsQueryBestSize(); -Bool wsRealizeCursor(); -Bool wsUnrealizeCursor(); -Bool wsDisplayCursor(); -void wsRecolorCursor(); -void wsCursorControl(); -Bool wsSetCursorPosition(); -void wsCursorLimits(); -void wsConstrainCursor(); -void wsPointerNonInterestBox(); -void wsChangeKeyboardControl(); -void wsChangePointerControl(); -void wsClick(); - -extern ws_event_queue *queue; -#undef VSYNCFIXED -#ifdef VSYNCFIXED -#define CURRENT_TIME queue->time -#else -#define CURRENT_TIME GetTimeInMillis() -#endif - -extern int wsScreenInit(); -extern void miRecolorCursor(); -extern void NewCurrentScreen(); -extern int wsFd; -extern ws_screen_descriptor screenDesc[]; -static ws_depth_descriptor depthDesc[MAXSCREENS]; -static mapped[MAXSCREENS]; -char *planemask_addr; - -/* - * XXX this needs to get fixed to accept a screen!!! jmg - */ -unsigned int -cfbpmaxSetPlaneMask(planemask, pScreen) - unsigned int planemask; - ScreenPtr *pScreen; -{ - static unsigned int currentmask = ~0; - unsigned int result = currentmask; - if(planemask_addr == 0) - { - currentmask = planemask; - } - else - { - *planemask_addr = currentmask = planemask; - - } - return result; -} - - -void -wsQueryBestSize16(class, pwidth, pheight, pScr) - int class; - unsigned short *pwidth; - unsigned short *pheight; - ScreenPtr pScr; -{ - unsigned width, test; - - if (*pwidth > 0) - { - switch(class) - { - case CursorShape: - *pwidth = 16; - *pheight = 16; - break; - default: - mfbQueryBestSize(class, pwidth, pheight, pScr); - break; - } - } -} - - -void -wsQueryBestSize64(class, pwidth, pheight, pScr) - int class; - unsigned short *pwidth; - unsigned short *pheight; - ScreenPtr pScr; -{ - unsigned width, test; - - if (*pwidth > 0) - { - switch(class) - { - case CursorShape: - *pwidth = 64; - *pheight = 64; - break; - default: - mfbQueryBestSize(class, pwidth, pheight, pScr); - break; - } - } -} - -Bool -wsScreenClose(index, pScreen) - int index; - ScreenPtr pScreen; -{ - wsScreenPrivate *wsp = (wsScreenPrivate *) - pScreen->devPrivates[wsScreenPrivateIndex].ptr; - - pScreen->CloseScreen = wsp->CloseScreen; - Xfree(wsp); - return (*pScreen->CloseScreen) (index, pScreen); -} - - -static void -colorNameToColor( pname, pred, pgreen, pblue) - char * pname; - unsigned short * pred; - unsigned short * pgreen; - unsigned short * pblue; -{ - if ( *pname == '#') - { - pname++; /* skip over # */ - sscanf( pname, "%2x", pred); - *pred <<= 8; - - pname += 2; - sscanf( pname, "%2x", pgreen); - *pgreen <<= 8; - - pname += 2; - sscanf( pname, "%2x", pblue); - *pblue <<= 8; - } - else /* named color */ - { - OsLookupColor( 0 /*"screen", not used*/, pname, strlen( pname), - pred, pgreen, pblue); - } -} - -#ifndef LOWMEMFTPT -extern Bool mfbScreenInit (), mcfbScreenInit(), cfbScreenInit(); -#else -extern Bool mcfbScreenInit(), cfbScreenInit(); -#endif /* ifndef LOWMEMFTPT */ -extern Bool cfb16ScreenInit(), cfb32ScreenInit(); - -Bool -fbInitProc(index, pScreen, argc, argv) - int index; - ScreenPtr pScreen; - int argc; - char **argv; -{ - int dpix, dpiy, i; - static int mapOnce = FALSE; - wsScreenPrivate *wsp; - int depthIndex; - Bool (*screenInit)(); - ws_depth_descriptor *dd; - ws_visual_descriptor vd; - static ws_map_control mc; - VisualPtr pVisual; - ColormapPtr pCmap; -#ifdef __alpha - Pixel blackPixel, whitePixel; -#endif -/* for initializing color map entries */ - unsigned short blackred = 0x0000; - unsigned short blackgreen = 0x0000; - unsigned short blackblue = 0x0000; - - unsigned short whitered = 0xffff; - unsigned short whitegreen = 0xffff; - unsigned short whiteblue = 0xffff; - - lastEventTime = CURRENT_TIME; - - wsp = (wsScreenPrivate *) Xalloc(sizeof(wsScreenPrivate)); - wsp->pInstalledMap = NOMAPYET; - pScreen->devPrivates[wsScreenPrivateIndex].ptr = (pointer) wsp; - - wsp->screenDesc = &screenDesc[index]; - wsp->args = &screenArgs[index]; - - /* since driver does not support unmap (yet), only map screen once */ - if (! mapped[index]) { - depthDesc[index].screen = screenDesc[index].screen; - depthIndex = -1; - for (i = 0; i < wsp->screenDesc->allowed_depths; i++) - { - extern int forceDepth; - - depthDesc[index].which_depth = i; - if (ioctl(wsFd, GET_DEPTH_INFO, &depthDesc[index]) == -1) { - ErrorF("GET_DEPTH_INFO failed"); - exit (1); - } - if (forceDepth) - depthDesc[index].depth = forceDepth; - switch (depthDesc[index].bits_per_pixel) { - case 1: - case 8: - case 16: - case 32: - break; - default: - continue; - } - depthIndex = i; - } - if (depthIndex == -1) return FALSE; - - mc.screen = screenDesc[index].screen; - mc.which_depth = depthIndex; - mc.map_unmap = MAP_SCREEN; - if (ioctl(wsFd, MAP_SCREEN_AT_DEPTH, &mc) == -1) { - ErrorF("MAP_SCREEN_AT_DEPTH failed"); - free ((char *) wsp); - return FALSE; - } - /* - * reget the depth desc. It now contains the user-mapped bitmap - * addr. - */ - if (ioctl(wsFd, GET_DEPTH_INFO, &depthDesc[index]) == -1) - { - ErrorF("GET_DEPTH_INFO failed"); - return FALSE; - } - if (forceDepth) - depthDesc[index].depth = forceDepth; - mapped[index] = TRUE; - } - - /* ws routines knows how to initialize many functions, so call init. */ - if (wsScreenInit(index, pScreen, argc, argv) == -1) - return FALSE; - - dd = &depthDesc[index]; - - if (index > 0) - wsCursorControl(index, CURSOR_OFF); - wsScreens[index] = pScreen; - -/* - * this is really dumb. The driver has the screen geometry in mm. - * The screen wants it stored as mm, but the damn interface passes - * inches. mm => inches => mm. What a waste. Should we change cfbscrinit.c? - * -jmg. - */ - - if (screenArgs[index].flags & ARG_DPIX) - dpix = screenArgs[index].dpix; - else - dpix = (wsp->screenDesc->width * 254 + - wsp->screenDesc->monitor_type.mm_width * 5) / - (wsp->screenDesc->monitor_type.mm_width * 10); - - if (screenArgs[index].flags & ARG_DPIY) - dpiy = screenArgs[index].dpiy; - else - dpiy = (wsp->screenDesc->height * 254 + - wsp->screenDesc->monitor_type.mm_height * 5) / - (wsp->screenDesc->monitor_type.mm_height * 10); - - vd.screen = screenDesc[index].screen; - vd.which_visual = 0; /* jmg ? */ - if (ioctl(wsFd, GET_VISUAL_INFO, &vd) == -1) - { - ErrorF("GET_VISUAL_INFO failed"); - return FALSE; - } - - defaultColorVisualClass = vd.screen_class; - if(screenArgs[index].flags & ARG_CLASS) - defaultColorVisualClass = screenArgs[index].class; - - /* Might want to make this table driven - jmg */ - - switch (dd->bits_per_pixel) - { -#ifndef LOWMEMFTPT - case 1: - screenInit = mfbScreenInit; - break; -#else - case 1: -#endif /* ifndef LOWMEMFTPT */ - case 8: - case 16: - case 32: - screenInit = mcfbScreenInit; - break; - } - if (dd->depth == 1) - { - pScreen->blackPixel = 0; - pScreen->whitePixel = 1; - if(screenArgs[index].flags & ARG_BLACKVALUE) - if((i = atoi(screenArgs[index].blackValue)) == 0 || i == 1) - pScreen->blackPixel = i; - else - wsPixelError(index); - - if(screenArgs[index].flags & ARG_WHITEVALUE) - if((i = atoi(screenArgs[index].whiteValue)) == 0 || i == 1) - pScreen->whitePixel = i; - else - wsPixelError(index); - } - else - { - if(screenArgs[index].flags & ARG_BLACKVALUE) - colorNameToColor(screenArgs[index].blackValue, &blackred, - &blackgreen, &blackblue); - - if(screenArgs[index].flags & ARG_WHITEVALUE) - colorNameToColor(screenArgs[index].whiteValue, &whitered, - &whitegreen, &whiteblue); - - } - -#ifdef ultrix -#define FB_BITS dd->pixmap -#else -#define FB_BITS dd->plane_mask -#endif - - if (!(*screenInit) (pScreen, FB_BITS, - dd->fb_width, dd->fb_height, - dpix, dpiy, dd->fb_width, dd->bits_per_pixel, dd->depth)) - { - return FALSE; - } - - miInitializeBackingStore(pScreen); - - if (dd->depth == 1) - { -#ifndef LOWMEMFTPT - mfbCreateDefColormap(pScreen); -#else - cfbCreateDefColormap(pScreen); -#endif /* ifndef LOWMEMFTPT */ - } - else - { - /* copy of cfbCreateDefColormap, except variable colors */ - for (pVisual = pScreen->visuals; - pVisual->vid != pScreen->rootVisual; - pVisual++) - ; - - if (CreateColormap(pScreen->defColormap, pScreen, pVisual, &pCmap, - (pVisual->class & DynamicClass) ? AllocNone : AllocAll, - 0) - != Success) - return FALSE; -#ifndef __alpha - if ((AllocColor(pCmap, &whitered, &whitegreen, &whiteblue, - &(pScreen->whitePixel), 0) != Success) || - (AllocColor(pCmap, &blackred, &blackgreen, &blackblue, - &(pScreen->blackPixel), 0) != Success)) - { - return FALSE; - } -#else - /* - * It could be argued that this is unnecessary because the DEC - * is little-endian and you get what you need, but it does - * eliminate a warning from the compiler. - */ - whitePixel = blackPixel = 0; - if ((AllocColor(pCmap, &whitered, &whitegreen, &whiteblue, - &whitePixel, 0) != Success) || - (AllocColor(pCmap, &blackred, &blackgreen, &blackblue, - &blackPixel, 0) != Success)) - { - return FALSE; - } - else - { - pScreen->whitePixel = whitePixel; - pScreen->blackPixel = blackPixel; - } -#endif - (*pScreen->InstallColormap)(pCmap); - } - planemask_addr = dd->plane_mask; - - /* Wrap screen close routine to avoid memory leak */ - wsp->CloseScreen = pScreen->CloseScreen; - pScreen->CloseScreen = wsScreenClose; - - if(wsp->screenDesc->cursor_width == 64) - pScreen->QueryBestSize = wsQueryBestSize64; - else - pScreen->QueryBestSize = wsQueryBestSize16; - return TRUE; -} Index: xc/programs/Xserver/hw/dec/ws/ext_device.c diff -u xc/programs/Xserver/hw/dec/ws/ext_device.c:1.2 xc/programs/Xserver/hw/dec/ws/ext_device.c:removed --- xc/programs/Xserver/hw/dec/ws/ext_device.c:1.2 Fri Dec 14 14:59:37 2001 +++ xc/programs/Xserver/hw/dec/ws/ext_device.c Thu Feb 27 12:29:22 2003 @@ -1,532 +0,0 @@ -/*********************************************************** - -Copyright 1990, 1998 The Open Group - -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. - -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. - - -Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -******************************************************************/ - -/* - * This file holds the hook routines for adding extension input devices. - * - * Jeffrey Hsu, Digital Equipment Corporation, - * - */ - -/* $Xorg: ext_device.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ - -#ifdef XINPUT - -#include <stdio.h> -#include <sys/types.h> -#include <sys/file.h> -#include <sys/time.h> -#include <sys/tty.h> -#include <sys/devio.h> - -#include "misc.h" -#include "X.h" -#define NEED_EVENTS -#include "Xproto.h" -#include "scrnintstr.h" -#include "pixmap.h" -#include "input.h" -#include "cursorstr.h" -#include "regionstr.h" -#include "resource.h" -#include "dixstruct.h" -#include <sys/workstation.h> -#include <sys/inputdevice.h> -#include <sys/wsdevice.h> -#include "ws.h" - -#include <sys/tablet.h> -#include <sys/pcm.h> -#include <sys/termio.h> - -#include "XI.h" /* for Absolute and Relative #define */ -#include "XIproto.h" /* for deviceKeyButtonPointer */ - -/* XXX copied from ws_io.c, get it into some header file somewhere */ -#define MOTION_BUFFER_SIZE 100 -extern int wsGetMotionEvents(); - -extern Bool commandLinePairMatch(); /* secret function */ - -extern int DeviceButtonPress, DeviceButtonRelease, DeviceButtonRelease, - DeviceMotionNotify, ProximityIn, ProximityOut, DeviceValuator; - -static DevicePtr wsTablet, wsButtonBox, wsDialBox; - -static void wsButtonBoxControl(), wsDialBoxControl(); -static int wsButtonBoxProc(), wsDialBoxProc(), wsTabletProc(); - -int tbFd; /* tablet file descriptor */ -int pcmFd; - -/* return TRUE if recognized device type */ -Bool -ExtProcessInputEvents(x, e) -xEvent *x; -ws_event *e; -{ - - /* - * X Input Extension events can have more than one event structure per - * device event - */ - xEvent eventarray[3]; /* make this 3 until some device needs more */ - deviceValuator *vev; - deviceValuator valuatorevent; - int eventcount; - - deviceKeyButtonPointer *inputEv = (deviceKeyButtonPointer *) x; - tablet_event *tabev = (tablet_event *) e; - dial_event *dialev = (dial_event *) e; - - switch (e->device_type) { - case STABLET_DEVICE: - switch (e->type) { - case BUTTON_DOWN_TYPE: - x->u.u.type = DeviceButtonPress; - break; - case BUTTON_UP_TYPE: - x->u.u.type = DeviceButtonRelease; - break; - case MOTION_TYPE: - x->u.u.type = DeviceMotionNotify; - break; - case PROXIMITY_IN: - x->u.u.type = ProximityIn; - break; - case PROXIMITY_OUT: - x->u.u.type = ProximityOut; - break; - default: - printf("Unknown tablet event = %d\n", e->type); - return(TRUE); - } - vev = (deviceValuator *) &eventarray[1]; - vev->type = DeviceValuator; - vev->num_valuators = 2; - vev->first_valuator = 0; - vev->valuator0 = tabev->axis_data[0]; - vev->valuator1 = tabev->axis_data[1]; - vev->device_state = e->e.pointer.buttons; - vev->deviceid = e->device; - eventcount = 2; - inputEv->deviceid = e->device | MORE_EVENTS; - eventarray[0] = *x; - (*wsTablet->processInputProc) (eventarray, wsTablet, eventcount); - break; - case BUTTONBOX_DEVICE: - switch (e->type) { - case BUTTON_DOWN_TYPE: - x->u.u.type = DeviceButtonPress; - break; - case BUTTON_UP_TYPE: - x->u.u.type = DeviceButtonRelease; - break; - default: - printf("Unknown button box event = %d\n", e->type); - return(TRUE); - } - (*wsButtonBox->processInputProc) (x, wsButtonBox, 1); - break; - case KNOBBOX_DEVICE: - switch (e->type) { - case MOTION_TYPE: - x->u.u.type = DeviceMotionNotify; - break; - default: - printf("Unknown dial box event = %d\n", e->type); - return(TRUE); - } - - vev = (deviceValuator *) &eventarray[1]; - vev->type = DeviceValuator; - vev->num_valuators = 6; - vev->first_valuator = 0; - vev->valuator0 = dialev->axis_data[0]; - vev->valuator1 = dialev->axis_data[1]; - vev->valuator2 = dialev->axis_data[2]; - vev->valuator3 = dialev->axis_data[3]; - vev->valuator4 = dialev->axis_data[4]; - vev->valuator5 = dialev->axis_data[5]; - vev->device_state = e->e.pointer.buttons; - vev->deviceid = e->device; - - vev = (deviceValuator *) &eventarray[2]; - vev->type = DeviceValuator; - vev->num_valuators = 2; - vev->first_valuator = 6; - vev->valuator0 = dialev->axis_data[6]; - vev->valuator1 = dialev->axis_data[7]; - vev->device_state = e->e.pointer.buttons; - vev->deviceid = e->device; - - eventcount = 3; - inputEv->deviceid = e->device; - eventarray[0] = *x; - (*wsDialBox->processInputProc) (eventarray, wsDialBox, eventcount); - break; - default: - return FALSE; - } - return TRUE; -} - -int -ExtddxProcessArgument (argc, argv, i) -register int argc; -register char *argv[]; -register int i; -{ - - int argind=i; - int skip = 0; - - if (strcmp(argv[argind], "-tb") == 0) { - if (++argind < argc) { - /* defer processing to InitInput */ - /* should think up cleaner solution XXX */ - skip = 2; - } - else return 0; - } else if (strcmp(argv[argind], "-pcm") == 0) { - if (++argind < argc) { - /* defer processing to InitInput */ - /* should think up cleaner solution XXX */ - skip = 2; - } - else return 0; - } - - return skip; - -} - -void -ExtddxUseMsg() -{ - ErrorF("-tb <tty number n> open /dev/tty0n for tablet\n"); - ErrorF("-pcm <tty number n> open /dev/tty0n for pcm\n"); -} - -void -ExtInitInput(argc, argv) -{ - - DevicePtr t; - char *tabletline, buf[256], *pcmline; - int linenumber; - int i; - struct termio termio; - - if (commandLinePairMatch( argc, argv, "-tb", &tabletline)) { - sscanf(tabletline, "%d", &linenumber); - sprintf(buf, "/dev/tty0%d", linenumber); - if ((tbFd = open(buf, O_RDWR, 0)) < 0) { - Error("couldn't open device"); - return; - } - - if (ioctl(tbFd, TCGETA, &termio) < 0) { - Error("TCGETA"); - return; - } - - /* someday I will do this in the line discpline open XXX */ - termio.c_cflag = (B4800 | PARENB | PARODD | CREAD | CS8); - termio.c_iflag &= ~ISTRIP; - - if (ioctl(tbFd, TCSETA, &termio) < 0) { - Error("TCSETA"); - return; - } - - i = TABLDISC; - if (ioctl(tbFd, TIOCSETD, &i) < 0) { - Error("couldn't set line discipline"); - return; - } - - i = 0; - if (ioctl(tbFd, BIOSTYPE, &i) < 0) { - Error("couldn't set line discipline"); - return; - } - - t = AddInputDevice(wsTabletProc, TRUE); - - RegisterOtherDevice(t); - - } - - if (commandLinePairMatch( argc, argv, "-pcm", &pcmline)) { - sscanf(pcmline, "%d", &linenumber); - sprintf(buf, "/dev/tty0%d", linenumber); - if ((pcmFd = open(buf, O_RDWR, 0)) < 0) { - Error("couldn't open device"); - return; - } - - if (ioctl(pcmFd, TCGETA, &termio) < 0) { - Error("TCGETA"); - return; - } - - /* someday I will do this in the line discpline open XXX */ - termio.c_cflag = (B9600 | CREAD | CS8 | CLOCAL); - termio.c_iflag &= ~ISTRIP; - termio.c_iflag |= IXOFF; - - if (ioctl(pcmFd, TCSETA, &termio) < 0) { - Error("TCSETA"); - return; - } - - i = PCMDISC; - if (ioctl(pcmFd, TIOCSETD, &i) < 0) { - Error("couldn't set line discipline"); - return; - } - - t = AddInputDevice(wsButtonBoxProc, TRUE); - RegisterOtherDevice(t); - - t = AddInputDevice(wsDialBoxProc, TRUE); - RegisterOtherDevice(t); - } - -} - -void -ExtInitOutput(screenInfo, argc, argv) -ScreenInfo *screenInfo; -int argc; -char **argv; -{ -/* nothing to do yet */ -} - -static void -wsButtonBoxControl(device, ctrl) -DevicePtr device; -LedCtrl *ctrl; -{ - int mask = ctrl->led_values; - - if (ioctl(pcmFd, PIOSETLED, &mask) < 0) { - Error("wsButtonBoxControl"); - } -} - -static int -wsButtonBoxProc(pDev, onoff, argc, argv) -DevicePtr pDev; -int onoff, argc; -char *argv[]; -{ - BYTE map[33]; - - int i; - Atom typeatom; - - switch (onoff) - { - case DEVICE_INIT: - wsButtonBox = pDev; - for (i=1; i<=32; i++) - map[i] = i; - InitButtonClassDeviceStruct(pDev, 32, map); - InitLedFeedbackClassDeviceStruct(pDev, wsButtonBoxControl); - InitFocusClassDeviceStruct(pDev); - typeatom = MakeAtom("BUTTONBOX", 9, FALSE); - AssignTypeAndName(pDev, typeatom, "BUTTONBOX"); - break; - case DEVICE_ON: - pDev->on = TRUE; - break; - case DEVICE_OFF: - pDev->on = FALSE; - break; - case DEVICE_CLOSE: - if (pcmFd) { - close(pcmFd); - pcmFd = 0; - } - break; - } - return Success; -} - -static void -wsDialBoxControl(device, ctrl) -DevicePtr device; -PtrCtrl *ctrl; -{ - struct dial_control control; - - control.smoothing = ctrl->num / ctrl->den; - control.threshold = ctrl->threshold; - - /* - InitPtrFeedbackClassDeviceStruct should not call the control - routine for extension devices with defaultPointerControl values, - which may be wrong, don't think there is a fix, so live w/ it - */ - - /* hardware should not freak out when given a threshold of 0 - and a smoothing factor of 0 */ - if (!control.smoothing) - control.smoothing = 1; - if (!control.threshold) - control.threshold = 1; - - if (ioctl(pcmFd, PIOSETKNOB, &control) < 0) { - Error("wsDialBoxControl"); - } -} - -static int -wsDialBoxProc(pDev, onoff, argc, argv) -DevicePtr pDev; -int onoff, argc; -char *argv[]; -{ - Atom typeatom; - - switch (onoff) - { - case DEVICE_INIT: - wsDialBox = pDev; - InitValuatorClassDeviceStruct(pDev, 8, wsGetMotionEvents, - MOTION_BUFFER_SIZE, Relative); - InitValuatorAxisStruct(pDev, 0, -32768, 32767, 1); - InitValuatorAxisStruct(pDev, 1, -32768, 32767, 1); - InitValuatorAxisStruct(pDev, 2, -32768, 32767, 1); - InitValuatorAxisStruct(pDev, 3, -32768, 32767, 1); - InitValuatorAxisStruct(pDev, 4, -32768, 32767, 1); - InitValuatorAxisStruct(pDev, 5, -32768, 32767, 1); - InitValuatorAxisStruct(pDev, 6, -32768, 32767, 1); - InitValuatorAxisStruct(pDev, 7, -32768, 32767, 1); - InitPtrFeedbackClassDeviceStruct(pDev, wsDialBoxControl); - InitFocusClassDeviceStruct(pDev); - typeatom = MakeAtom("KNOB_BOX", 8, FALSE); - AssignTypeAndName(pDev, typeatom, "KNOB_BOX"); - break; - case DEVICE_ON: - pDev->on = TRUE; - break; - case DEVICE_OFF: - pDev->on = FALSE; - break; - case DEVICE_CLOSE: - if (pcmFd) { - close(pcmFd); - pcmFd = 0; - } - break; - } - return Success; -} - -static int -wsTabletProc(pDev, onoff, argc, argv) -DevicePtr pDev; -int onoff, argc; -char *argv[]; -{ - - BYTE map[5]; - Atom typeatom; - - switch (onoff) - { - case DEVICE_INIT: - wsTablet = pDev; - map[1] = 1; - map[2] = 2; - map[3] = 3; - map[4] = 4; - /* InitPointerDeviceStruct( - pDev, map, 4, wsGetMotionEvents, - wsChangeTabletControl, MOTION_BUFFER_SIZE); */ - InitButtonClassDeviceStruct(pDev, 4, map); - InitValuatorClassDeviceStruct(pDev, 2, wsGetMotionEvents, - MOTION_BUFFER_SIZE, Absolute); - InitValuatorAxisStruct(pDev, 0, 0, 2199, 7874); - InitValuatorAxisStruct(pDev, 1, 0, 2199, 7874); - /* 200 * 39.37 XXX */ -/* InitPtrFeedbackClassDeviceStruct(pDev, wsTabletControl); */ - InitProximityClassDeviceStruct(pDev); - InitFocusClassDeviceStruct(pDev); - typeatom = MakeAtom("TABLET", 6, FALSE); - AssignTypeAndName(pDev, typeatom, "TABLET"); - break; - case DEVICE_ON: - pDev->on = TRUE; -/* only need to select off mouse file descriptor */ -/* AddEnabledDevice(tbFd); */ - break; - case DEVICE_OFF: - pDev->on = FALSE; -/* RemoveEnabledDevice(tbFd); */ - break; - case DEVICE_CLOSE: - close(tbFd); - break; - } - return Success; -} - -#ifdef notdef -void -wsChangeTabletControl(device, ctrl) - DevicePtr device; - TabletCtrl *ctrl; -{ -/* XXX */ -} -#endif -#endif Index: xc/programs/Xserver/hw/dec/ws/init.c diff -u xc/programs/Xserver/hw/dec/ws/init.c:1.2 xc/programs/Xserver/hw/dec/ws/init.c:removed --- xc/programs/Xserver/hw/dec/ws/init.c:1.2 Fri Dec 14 14:59:37 2001 +++ xc/programs/Xserver/hw/dec/ws/init.c Thu Feb 27 12:29:22 2003 @@ -1,310 +0,0 @@ -/*********************************************************** - -Copyright 1991, 1998 The Open Group - -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. - -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. - - -Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -******************************************************************/ - -/* $Xorg: init.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ - -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/file.h> -#include <sys/time.h> -#include <sys/tty.h> -#include <errno.h> -#include <sys/devio.h> - -#include "X.h" - -#include "scrnintstr.h" -#include "servermd.h" - -#include "input.h" -/* XXX */ -#include <sys/workstation.h> -#ifdef __alpha -#include <machine/hal_sysinfo.h> -#endif -#include <sys/inputdevice.h> -#include "ws.h" - -extern int wsMouseProc(); -extern int wsKeybdProc(); -extern void wsClick(); -extern void wsChangePointerControl(); -extern void mcfbFillInMissingPixmapDepths(); - -extern KeybdCtrl defaultKeyboardControl; -ws_event_queue *queue; - -static int NumFormats; -static int bitsPerDepth[33]; - -Bool fbInitProc(); -extern int num_accelerator_types; - -extern wsAcceleratorTypes types[]; - -ws_screen_descriptor screenDesc[MAXSCREENS]; - -Bool -commandLineMatch( argc, argv, pat, pmatch) - int argc; /* may NOT be changed */ - char * argv[]; /* may NOT be changed */ - char * pat; -{ - int ic; - - for ( ic=0; ic<argc; ic++) - if ( strcmp( argv[ic], pat) == 0) - return TRUE; - return FALSE; -} - -Bool -commandLinePairMatch( argc, argv, pat, pmatch) - int argc; /* may NOT be changed */ - char * argv[]; /* may NOT be changed */ - char * pat; - char ** pmatch; /* RETURN */ -{ - register int ic; - - for ( ic=0; ic<argc; ic++) - if ( strcmp( argv[ic], pat) == 0) { - *pmatch = argv[ ic+1]; - return TRUE; - } - return FALSE; -} - -ws_descriptor wsinfo; -int wsFd; -int ws_cpu; -int forceDepth; - -int wsScreenPrivateIndex; -/* the following filth is forced by a broken dix interface */ - -#ifndef PRINT_ONLY_SERVER -void -InitOutput(screenInfo, argc, argv) - ScreenInfo *screenInfo; - int argc; - char **argv; -{ - int i, j; - int si = 0; - static int inited = FALSE; - - if (!inited) { - char *forceD; - ws_keyboard_control control; - struct stat statbuf; - inited = TRUE; - if (!stat("/dev/ws0", &statbuf)) { - if ((wsFd = open("/dev/ws0", O_RDWR, 0)) < 0) { - ErrorF("couldn't open device /dev/ws0\n"); - exit (1); - } - } else { - if ((wsFd = open("/dev/mouse", O_RDWR, 0)) < 0) { - ErrorF("couldn't open device /dev/mouse\n"); - exit (1); - } - } - if (ioctl (wsFd, GET_WORKSTATION_INFO, &wsinfo) != 0) { - FatalError("GET_WORKSTATION_INFO failed, errno %d (%s)\n", - errno, strerror(errno)); - } - control.device_number = wsinfo.console_keyboard; - if (ioctl(wsFd, GET_KEYBOARD_CONTROL, &control) == -1) { - FatalError("GET_KEYBOARD_CONTROL failed, errno %d (%s)\n", - errno, strerror(errno)); - } - memmove(defaultKeyboardControl.autoRepeats, control.autorepeats, 32); - - /* turn off cursors on additional screens initially */ -/* - * jmg - have to do a lot of other stuff here dealing with visuals - * and depths - */ - /* - * deal with arguments. Note we don't bother until we've successfully - * opened the device. - */ - - if (commandLinePairMatch( argc, argv, "-forceDepth", &forceD)) - sscanf ( forceD, "%d", &forceDepth); - } - for (i = 1; i <= 32; i++) - bitsPerDepth[i] = 0; - - for (i = 0; i < wsinfo.num_screens_exist; i++) - { - ws_screen_descriptor screeninfo; - ws_depth_descriptor depthinfo; - - screeninfo.screen = i; - ioctl (wsFd, GET_SCREEN_INFO, &screeninfo); - for (j = 0; j < screeninfo.allowed_depths; j++) - { - depthinfo.screen = i; - depthinfo.which_depth = j; - ioctl (wsFd, GET_DEPTH_INFO, &depthinfo); - if (forceDepth) - depthinfo.depth = forceDepth; - if (bitsPerDepth[depthinfo.depth] && - bitsPerDepth[depthinfo.depth] != depthinfo.bits_per_pixel) - { - FatalError ("Screens with mismatching bpp for depth %d\n", - depthinfo.depth); - } - bitsPerDepth[depthinfo.depth] = depthinfo.bits_per_pixel; - } - } - if (!bitsPerDepth[1]) - bitsPerDepth[1] = 1; - - mcfbFillInMissingPixmapDepths(bitsPerDepth); - - NumFormats = 0; - for (i = 1; i <= 32; i++) - { - if (j = bitsPerDepth[i]) { - if (NumFormats >= MAXFORMATS) - FatalError ("MAXFORMATS is too small for this machine\n"); - screenInfo->formats[NumFormats].depth = i; - screenInfo->formats[NumFormats].bitsPerPixel = j; - screenInfo->formats[NumFormats].scanlinePad = BITMAP_SCANLINE_PAD; - NumFormats++; - } - } - - screenInfo->imageByteOrder = IMAGE_BYTE_ORDER; - screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; - screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; - screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; - screenInfo->numPixmapFormats = NumFormats; - - wsScreenPrivateIndex = AllocateScreenPrivateIndex(); -#ifdef __alpha - if (getsysinfo(GSI_CPU, (caddr_t)&ws_cpu, sizeof(ws_cpu), 0, 0) == -1) { - fprintf(stderr,"INIT: cannot get cputype.\n"); - exit(1); - } -#else - ws_cpu = wsinfo.cpu; -#endif - for(i = 0; i < wsinfo.num_screens_exist; i++) { - int j, DECaccelerator = FALSE; - screenDesc[si].screen = i; - if (ioctl(wsFd, GET_SCREEN_INFO, &screenDesc[si]) == -1) { - FatalError("GET_SCREEN_INFO failed, errno %d (%s)\n", - errno, strerror(errno)); - } - if (si >= MAXSCREENS) { - ErrorF ("Server configured for %d screens, can't configure screen %d\n", MAXSCREENS, si); - break; - } - for (j = 0; j < num_accelerator_types; j++) { - if (strcmp (screenDesc[si].moduleID, types[j].moduleID) == 0) { - DECaccelerator = TRUE; - break; - } - } - if(DECaccelerator) - j = AddScreen(types[j].createProc, argc, argv); - else - j = AddScreen(fbInitProc, argc, argv); - /* - * AddScreen either returns -1 (error) or # of screens installed - * (current index). screenDesc[] is exactly parallel to - * screenInfo.screens[] since the initProc() arg will be called - * with AddScreen's index, which in turn gets used for screenDesc[]. - */ - if (j == -1) { - ErrorF("Could not AddScreen, ID = %s\n", - screenDesc[si].moduleID); - } else - si = j+1; - } -#ifdef XINPUT - ExtInitOutput(screenInfo, argc, argv); -#endif -} - - - -void -InitInput(argc, argv) - int argc; - char *argv[]; -{ - DevicePtr p, k; - static int inited = FALSE; - - p = AddInputDevice(wsMouseProc, TRUE); - - k = AddInputDevice(wsKeybdProc, TRUE); - - RegisterPointerDevice(p); - RegisterKeyboardDevice(k); - -#ifdef XINPUT - ExtInitInput(argc, argv); -#endif - - if (!inited) { - inited = TRUE; - if (ioctl(wsFd, GET_AND_MAP_EVENT_QUEUE, &queue) == -1) { - FatalError("GET_AND_MAP_EVENT_QUEUE failed, errno %d (%s)\n", - errno, strerror(errno)); - } - } - SetTimeSinceLastInputEvent (); -} -#endif /* PRINT_ONLY_SERVER */ - Index: xc/programs/Xserver/hw/dec/ws/keynames.h diff -u xc/programs/Xserver/hw/dec/ws/keynames.h:1.2 xc/programs/Xserver/hw/dec/ws/keynames.h:removed --- xc/programs/Xserver/hw/dec/ws/keynames.h:1.2 Fri Dec 14 14:59:37 2001 +++ xc/programs/Xserver/hw/dec/ws/keynames.h Thu Feb 27 12:29:22 2003 @@ -1,168 +0,0 @@ -/* $Xorg: keynames.h,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ -/*********************************************************** - -Copyright 1991, 1998 The Open Group - -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. - -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. - - -Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -******************************************************************/ -/* Keycodes for lk201 and lk401 keyboards used by code in ws_io.c - that loads default keysym values from a file. -*/ - -#define MIN_LK201_KEY 86 -#define MAX_LK201_KEY 251 -#define LK201_GLYPHS_PER_KEY 2 - -/* the keys themselves */ - -#define KEY_F1 86 -#define KEY_F2 87 -#define KEY_F3 88 -#define KEY_F4 89 -#define KEY_F5 90 -#define KEY_F6 100 -#define KEY_F7 101 -#define KEY_F8 102 -#define KEY_F9 103 -#define KEY_F10 104 -#define KEY_F11 113 -#define KEY_F12 114 -#define KEY_F13 115 -#define KEY_F14 116 -#define KEY_HELP 124 -#define KEY_MENU 125 -#define KEY_F17 128 -#define KEY_F18 129 -#define KEY_F19 130 -#define KEY_F20 131 -#define KEY_FIND 138 -#define KEY_INSERT_HERE 139 -#define KEY_REMOVE 140 -#define KEY_SELECT 141 -#define KEY_PREV_SCREEN 142 -#define KEY_NEXT_SCREEN 143 -#define KEY_KP_0 146 /* key pad */ -#define KEY_KP_PERIOD 148 /* key pad */ -#define KEY_KP_ENTER 149 /* key pad */ -#define KEY_KP_1 150 /* key pad */ -#define KEY_KP_2 151 /* key pad */ -#define KEY_KP_3 152 /* key pad */ -#define KEY_KP_4 153 /* key pad */ -#define KEY_KP_5 154 /* key pad */ -#define KEY_KP_6 155 /* key pad */ -#define KEY_KP_COMMA 156 /* key pad */ -#define KEY_KP_7 157 /* key pad */ -#define KEY_KP_8 158 /* key pad */ -#define KEY_KP_9 159 /* key pad */ -#define KEY_KP_HYPHEN 160 -#define KEY_KP_PF1 161 -#define KEY_KP_PF2 162 -#define KEY_KP_PF3 163 -#define KEY_KP_PF4 164 -#define KEY_LEFT 167 -#define KEY_RIGHT 168 -#define KEY_DOWN 169 -#define KEY_UP 170 -#define KEY_SHIFT_R 171 /* LK401 */ -#define KEY_ALT_L 172 /* LK401 */ -#define KEY_COMPOSE_R 173 /* LK401 */ -#define KEY_SHIFT 174 -#define KEY_SHIFT_L 174 -#define KEY_CTRL 175 -#define KEY_LOCK 176 -#define KEY_COMPOSE 177 -#define KEY_APPLE 177 -#define KEY_META 177 -#define KEY_ALT_R 178 /* LK401 */ -#define KEY_DELETE 188 -#define KEY_RETURN 189 -#define KEY_TAB 190 -#define KEY_TILDE 191 -#define KEY_TR_1 192 /* Top Row */ -#define KEY_Q 193 -#define KEY_A 194 -#define KEY_Z 195 -#define KEY_TR_2 197 -#define KEY_W 198 -#define KEY_S 199 -#define KEY_X 200 -#define KEY_LANGLE_RANGLE 201 /* xxx */ -#define KEY_TR_3 203 -#define KEY_E 204 -#define KEY_D 205 -#define KEY_C 206 -#define KEY_TR_4 208 -#define KEY_R 209 -#define KEY_F 210 -#define KEY_V 211 -#define KEY_SPACE 212 -#define KEY_TR_5 214 -#define KEY_T 215 -#define KEY_G 216 -#define KEY_B 217 -#define KEY_TR_6 219 -#define KEY_Y 220 -#define KEY_H 221 -#define KEY_N 222 -#define KEY_TR_7 224 -#define KEY_U 225 -#define KEY_J 226 -#define KEY_M 227 -#define KEY_TR_8 229 -#define KEY_I 230 -#define KEY_K 231 -#define KEY_COMMA 232 /* xxx */ -#define KEY_TR_9 234 -#define KEY_O 235 -#define KEY_L 236 -#define KEY_PERIOD 237 /* xxx */ -#define KEY_TR_0 239 -#define KEY_P 240 -#define KEY_SEMICOLON 242 /* xxx */ -#define KEY_QMARK 243 -#define KEY_PLUS 245 /* xxx */ -#define KEY_RBRACE 246 -#define KEY_VBAR 247 /* xxx */ -#define KEY_UBAR 249 /* xxx */ -#define KEY_LBRACE 250 -#define KEY_QUOTE 251 Index: xc/programs/Xserver/hw/dec/ws/mdepthinit.c diff -u xc/programs/Xserver/hw/dec/ws/mdepthinit.c:1.7 xc/programs/Xserver/hw/dec/ws/mdepthinit.c:removed --- xc/programs/Xserver/hw/dec/ws/mdepthinit.c:1.7 Fri Dec 14 14:59:37 2001 +++ xc/programs/Xserver/hw/dec/ws/mdepthinit.c Thu Feb 27 12:29:22 2003 @@ -1,274 +0,0 @@ -/* $Xorg: mdepthinit.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ -/* - -Copyright 1992, 1998 The Open Group - -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. - -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/dec/ws/mdepthinit.c,v 1.7 2001/12/14 19:59:37 dawes Exp $ */ - -#include "X.h" -#include "Xmd.h" -#include "servermd.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "resource.h" -#include "colormap.h" -#include "colormapst.h" -#include "mi.h" -#include "mistruct.h" -#include "dix.h" -#include "gcstruct.h" -#include "mibstore.h" - -extern int defaultColorVisualClass; - -#ifndef SINGLEDEPTH - -Bool -mcfbCreateGC(pGC) - GCPtr pGC; -{ - switch (BitsPerPixel(pGC->depth)) { - case 1: - return mfbCreateGC (pGC); - case 8: - return cfbCreateGC (pGC); - case 16: - return cfb16CreateGC (pGC); - case 32: - return cfb32CreateGC (pGC); - } - return FALSE; -} - -void -mcfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart) - DrawablePtr pDrawable; /* drawable from which to get bits */ - int wMax; /* largest value of all *pwidths */ - register DDXPointPtr ppt; /* points to start copying from */ - int *pwidth; /* list of number of bits to copy */ - int nspans; /* number of scanlines to copy */ - char *pdstStart; /* where to put the bits */ -{ - switch (BitsPerPixel(pDrawable->depth)) { - case 1: - mfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); - break; - case 8: - cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); - break; - case 16: - cfb16GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); - break; - case 32: - cfb32GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); - break; - } - return; -} - -void -mcfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine) - DrawablePtr pDrawable; - int sx, sy, w, h; - unsigned int format; - unsigned long planeMask; - char *pdstLine; -{ - switch (BitsPerPixel(pDrawable->depth)) - { - case 1: - mfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); - break; - case 8: - cfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); - break; - case 16: - cfb16GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); - break; - case 32: - cfb32GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); - break; - } -} - -Bool -mcfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp, depth) - register ScreenPtr pScreen; - pointer pbits; /* pointer to screen bitmap */ - int xsize, ysize; /* in pixels */ - int dpix, dpiy; /* dots per inch */ - int width; /* pixel width of frame buffer */ - int depth; /* depth of root */ - int bpp; /* bits per pixel of root */ -{ - extern int cfbWindowPrivateIndex; - extern int cfbGCPrivateIndex; - - switch (bpp) { -#ifdef LOWMEMFTPT - case 1: -#endif - case 8: - cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width); - break; - case 16: - cfb16SetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width); - break; - case 32: - cfb32SetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width); - break; - default: - return FALSE; - } - pScreen->CreateGC = mcfbCreateGC; - pScreen->GetImage = mcfbGetImage; - pScreen->GetSpans = mcfbGetSpans; - return TRUE; -} - -extern int cfb16ScreenPrivateIndex, cfb32ScreenPrivateIndex; - -Bool -mcfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp, depth) - register ScreenPtr pScreen; - pointer pbits; /* pointer to screen bitmap */ - int xsize, ysize; /* in pixels */ - int dpix, dpiy; /* dots per inch */ - int width; /* pixel width of frame buffer */ -{ - int i; - pointer oldDevPrivate; - VisualPtr visuals; - int nvisuals; - DepthPtr depths; - int ndepths; - VisualID defaultVisual; - int rootdepth; - extern BSFuncRec cfbBSFuncRec, cfb16BSFuncRec, cfb32BSFuncRec; - extern Bool cfbCloseScreen(), cfb16CloseScreen(), cfb32CloseScreen(); - - rootdepth = depth; - if (!cfbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &rootdepth, &defaultVisual, 1 << (bpp - 1), 8)) - return FALSE; - rootdepth = depth; - oldDevPrivate = pScreen->devPrivate; - if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, - rootdepth, ndepths, depths, - defaultVisual, nvisuals, visuals)) - return FALSE; - switch(bpp) - { -#ifdef LOWMEMFTPT - case 1: -#endif - case 8: - pScreen->CloseScreen = cfbCloseScreen; - pScreen->BackingStoreFuncs = cfbBSFuncRec; - break; - case 16: - pScreen->CloseScreen = cfb16CloseScreen; - pScreen->devPrivates[cfb16ScreenPrivateIndex].ptr = pScreen->devPrivate; - pScreen->devPrivate = oldDevPrivate; - pScreen->BackingStoreFuncs = cfb16BSFuncRec; - break; - case 32: - pScreen->CloseScreen = cfb32CloseScreen; - pScreen->devPrivates[cfb32ScreenPrivateIndex].ptr = pScreen->devPrivate; - pScreen->devPrivate = oldDevPrivate; - pScreen->BackingStoreFuncs = cfb32BSFuncRec; - break; - } - return TRUE; -} - - -/* dts * (inch/dot) * (25.4 mm / inch) = mm */ - -Bool -mcfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp, depth) - register ScreenPtr pScreen; - pointer pbits; /* pointer to screen bitmap */ - int xsize, ysize; /* in pixels */ - int dpix, dpiy; /* dots per inch */ - int width; /* pixel width of frame buffer */ -{ - if (!mcfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp, depth)) - return FALSE; - return mcfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp, depth); -} - -void -mcfbFillInMissingPixmapDepths(bitsPerDepth) - int *bitsPerDepth; -{ - int i, j; - - j = 0; - for (i = 1; i <= 32; i++) - { - if (bitsPerDepth[i]) - j |= 1 << (bitsPerDepth[i] - 1); - } - if (!(j & (1 << 3))) - bitsPerDepth[4] = 8; - if (!(j & (1 << 7))) - bitsPerDepth[8] = 8; - if (!(j & (1 << 15))) - bitsPerDepth[12] = 32; - if (!(j & (1 << 23))) - bitsPerDepth[24] = 32; - if (!(j & (1 << 31))) - bitsPerDepth[32] = 32; -} - -#else /* SINGLEDEPTH */ - -/* stuff for 8-bit only server */ - -Bool -mcfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp, depth) - register ScreenPtr pScreen; - pointer pbits; /* pointer to screen bitmap */ - int xsize, ysize; /* in pixels */ - int dpix, dpiy; /* dots per inch */ - int width; /* pixel width of frame buffer */ -{ - return cfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, - width, bpp, depth); -} - -void -mcfbFillInMissingPixmapDepths(bitsPerDepth) - int *bitsPerDepth; -{ - /* This does something useful in the multidepth case. We don't - * do anything in the single depth case, but we still have to provide - * the function for linking. - */ -} - -#endif /* SINGLEDEPTH */ Index: xc/programs/Xserver/hw/dec/ws/ws.h diff -u xc/programs/Xserver/hw/dec/ws/ws.h:1.5 xc/programs/Xserver/hw/dec/ws/ws.h:removed --- xc/programs/Xserver/hw/dec/ws/ws.h:1.5 Fri Dec 14 14:59:37 2001 +++ xc/programs/Xserver/hw/dec/ws/ws.h Thu Feb 27 12:29:22 2003 @@ -1,167 +0,0 @@ -/************************************************************************ -Copyright 1991, 1998 The Open Group - -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. - -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. - - -Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -******************************************************************/ -/* $Xorg: ws.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ - -#ifndef NO_DEC_VALUE_ADDED -#define SCREENW6 640 -#define SCREENW8 800 -#define SCREENW10 1024 -#define SCREENW12 1280 - -#define SCREENH6 480 -#define SCREENH8 600 -#define SCREENH10 768 -#define SCREENH12 1024 - - -#define DEF_SCREEN_WIDTH 1024; -#define DEF_SCREEN_HEIGHT 768; -#endif - -#define NOMAPYET (ColormapPtr) 1 - -#define ARG_DPIX (1 << 0) -#define ARG_DPIY (1 << 1) -#define ARG_DPI (1 << 2) -#define ARG_BLACKVALUE (1 << 3) -#define ARG_WHITEVALUE (1 << 4) -#define ARG_CLASS (1 << 5) -#define ARG_EDGE_L (1 << 6) -#define ARG_EDGE_R (1 << 7) -#define ARG_EDGE_T (1 << 8) -#define ARG_EDGE_B (1 << 9) -#define ARG_MONITOR (1 << 10) -#define ARG_DEPTH (1 << 11) -#ifndef NO_DEC_VALUE_ADDED -#define ARG_TXXORFIX (1 << 12) /* for TX */ -#define ARG_TXBANKSW (1 << 13) /* for TX */ -#define ARG_TXRVISUAL (1 << 14) /* for TX */ -#define ARG_SCREEN (1 << 15) /* */ -#define ARG_VSYNC (1 << 16) /* */ -#endif - -typedef struct { - int flags; - int dpix; - int dpiy; - int dpi; - int class; - char *blackValue; - char *whiteValue; - int edge_left; - int edge_right; - int edge_top; - int edge_bottom; - ws_monitor monitor; - int depth; -#ifndef NO_DEC_VALUE_ADDED - int txXorFix; /* for TX */ - int txBankSwitch; /* for TX */ - int txRootDepth; /* for TX */ - int txRootClass; /* for TX */ - int screenHeight; /* */ - int screenWidth; /* */ - int screenVsync; -#endif -} ScreenArgsRec; - -typedef struct { - unsigned int currentmask; /* saved plane mask */ - BoxPtr cursorConstraint; - ws_screen_descriptor *screenDesc; - ColormapPtr pInstalledMap; - ScreenArgsRec *args; - Bool (*CloseScreen)(); -#ifndef NO_DEC_VALUE_ADDED - void (*CursorControl)(); -#endif -} wsScreenPrivate; - -typedef struct { - char *moduleID; /* graphic module ID */ - Bool (*createProc)(); /* create procedure for this hardware type */ -} wsAcceleratorTypes; - -extern void wsStoreColors(); -extern void wsInstallColormap(); -extern void wsUninstallColormap(); -extern int wsListInstalledColormaps(); -extern int wsScreenPrivateIndex; -extern Bool wsSaveScreen(); -extern int dpix, dpiy, dpi; -#ifndef NO_DEC_VALUE_ADDED -extern void wsMakeScreenOnly(); -extern void wsInputOutputFinish(); -extern int wsRemapPhysToLogScreens; -extern void wsEnableScreen(); -extern void wsDisableScreen(); -extern int wsPhysScreenNum(); -extern void wsRegisterAbortProc(); -extern void wsRegisterGiveUpProc(); -extern wsScreenPrivate * wsAllocScreenInfo(); -extern int wsDisabledScreens[]; -extern int wsOnlyScreen; -extern int wsPhysToLogScreens[]; -extern int screenHeight, screenWidth; -#endif - -extern ScreenArgsRec screenArgs[]; - -extern ScreenPtr wsScreens[]; -extern int class; -extern int forceDepth; -extern int fdPM; /* this is the file descriptor for screen so - can do IOCTL to colormap */ -extern int ws_cpu; - -#ifndef NO_DEC_VALUE_ADDED -#define WSP_PTR(pScr) \ - ((wsScreenPrivate*)(pScr)->devPrivates[wsScreenPrivateIndex].ptr) -#define WS_SCREEN(pScr) (WSP_PTR(pScr)->screenDesc->screen) -#define wspCursorControl(psn, control) \ - if (psn >= 0) (*WSP_PTR(wsScreens[psn])->CursorControl)(psn, control) -#endif - Index: xc/programs/Xserver/hw/dec/ws/ws_color.c diff -u xc/programs/Xserver/hw/dec/ws/ws_color.c:1.5 xc/programs/Xserver/hw/dec/ws/ws_color.c:removed --- xc/programs/Xserver/hw/dec/ws/ws_color.c:1.5 Fri Dec 14 14:59:37 2001 +++ xc/programs/Xserver/hw/dec/ws/ws_color.c Thu Feb 27 12:29:22 2003 @@ -1,216 +0,0 @@ -/*********************************************************** - -Copyright 1991, 1998 The Open Group - -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. - -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. - - -Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -******************************************************************/ -/* $Xorg: ws_color.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ - -/* - * ws_color.c - device specific color routines, stored in screen - * - * Author: Jim Gettys - * Digital Equipment Corporation - * Cambridge Research Laboratory - * Date: Sat January 24 1990 - */ - -#include <stdio.h> -#include <sys/types.h> -#include <sys/file.h> -#include <sys/time.h> -#include <sys/tty.h> -#include <errno.h> -#include <sys/devio.h> -#include "X.h" /* required for DoRed ... */ -#include "Xproto.h" /* required for xColorItem */ - -#include "misc.h" /* required for colormapst.h */ -#include "resource.h" -#include "scrnintstr.h" -#include "colormapst.h" -/* XXX */ -#include <sys/workstation.h> - -#include "ws.h" - - - -/* these next two are DIX routines */ -extern int TellLostMap(); -extern int TellGainedMap(); - -extern int wsFd; -extern ws_screen_descriptor screenDesc[]; - -void -wsStoreColors(pmap, ndef, pdefs) - ColormapPtr pmap; - int ndef; - xColorItem *pdefs; -{ - xColorItem directDefs[256]; - ws_color_cell cell; - ws_color_map_data cd; - wsScreenPrivate *pPrivScreen = (wsScreenPrivate *) - pmap->pScreen->devPrivates[wsScreenPrivateIndex].ptr; - if (pmap != pPrivScreen->pInstalledMap) return; - - if ((pmap->pVisual->class | DynamicClass) == DirectColor) - { - ndef = cfbExpandDirectColors (pmap, ndef, pdefs, directDefs); - pdefs = directDefs; - } - cd.screen = screenDesc[pmap->pScreen->myNum].screen; - cd.map = 0; /* only one... */ - cd.start = 0; - cd.ncells = ndef; - /* - * we will be evil, and note that the server and driver use the same - * structure. - */ - cd.cells = (ws_color_cell *)pdefs; - if (ioctl(wsFd, WRITE_COLOR_MAP, &cd) == -1) { - ErrorF("error writing color map\n"); - return; - } -} - -#define _DUPRGB(C,V) ( (( (C) << (V)->offsetRed ) & (V)->redMask )\ - |(( (C) << (V)->offsetGreen ) & (V)->greenMask)\ - |(( (C) << (V)->offsetBlue ) & (V)->blueMask ) ) - -void -wsInstallColormap(pcmap) - ColormapPtr pcmap; -{ - int entries = pcmap->pVisual->ColormapEntries; - Pixel * ppix; - xrgb * prgb; - xColorItem *defs; - int i,j; - wsScreenPrivate *pPrivScreen = (wsScreenPrivate *) - pcmap->pScreen->devPrivates[wsScreenPrivateIndex].ptr; - - if (pcmap == pPrivScreen->pInstalledMap) return; - if ( pPrivScreen->pInstalledMap != NOMAPYET) - WalkTree( pcmap->pScreen, TellLostMap, - &pPrivScreen->pInstalledMap->mid); - - pPrivScreen->pInstalledMap = pcmap; - - /* if Turbochannel mfb (2 entry StaticGray), do not store any colors */ - if ((int) pcmap->devPriv != 2) { - - /* If we have an 8 entry TrueColor map, then get all 256 pixel - values so we can fake a TrueColor visual with an undecomposed - hardware colormap (ie. devPriv == 0). - */ - if (pcmap->devPriv == 0 && pcmap->class == TrueColor && entries == 8) { - entries = 256; - } - - ppix = (Pixel *)ALLOCATE_LOCAL( entries * sizeof(Pixel)); - prgb = (xrgb *)ALLOCATE_LOCAL( entries * sizeof(xrgb)); - defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem)); - - /* devPriv == 1 means decomposed hardware colormap */ - if (((int) pcmap->devPriv == 1 - && ((pcmap->class | DynamicClass) == DirectColor)) && - (pcmap->pScreen->rootDepth == 12)) - for( i = 0; i < entries; i++) - ppix[i] = _DUPRGB( i, pcmap->pVisual); - else - for ( i=0; i<entries; i++) ppix[i] = i; - - QueryColors( pcmap, entries, ppix, prgb); - - for ( i=0; i<entries; i++) { /* convert xrgbs to xColorItems */ - defs[i].pixel = ppix[i] & 0xff; /* change pixel to index */ - defs[i].red = prgb[i].red; - defs[i].green = prgb[i].green; - defs[i].blue = prgb[i].blue; - defs[i].flags = DoRed|DoGreen|DoBlue; - } - - wsStoreColors( pcmap, entries, defs); - - DEALLOCATE_LOCAL(ppix); - DEALLOCATE_LOCAL(prgb); - DEALLOCATE_LOCAL(defs); - } - WalkTree(pcmap->pScreen, TellGainedMap, &pcmap->mid); -} - - -void -wsUninstallColormap(pcmap) - ColormapPtr pcmap; -{ - /* Replace installed colormap with default colormap */ - - ColormapPtr defColormap; - wsScreenPrivate *pPrivScreen = (wsScreenPrivate *) - pcmap->pScreen->devPrivates[wsScreenPrivateIndex].ptr; - - if ( pcmap != pPrivScreen->pInstalledMap) return; - - defColormap = (ColormapPtr) LookupIDByType( pcmap->pScreen->defColormap, - RT_COLORMAP); - - if (defColormap == pPrivScreen->pInstalledMap) return; - - (*pcmap->pScreen->InstallColormap) (defColormap); -} - -int -wsListInstalledColormaps( pscr, pcmaps) - ScreenPtr pscr; - Colormap * pcmaps; -{ - wsScreenPrivate *pPrivScreen = (wsScreenPrivate *) - pscr->devPrivates[wsScreenPrivateIndex].ptr; - *pcmaps = pPrivScreen->pInstalledMap->mid; - return 1; -} - Index: xc/programs/Xserver/hw/dec/ws/ws_io.c diff -u xc/programs/Xserver/hw/dec/ws/ws_io.c:1.5 xc/programs/Xserver/hw/dec/ws/ws_io.c:removed --- xc/programs/Xserver/hw/dec/ws/ws_io.c:1.5 Fri Dec 14 14:59:38 2001 +++ xc/programs/Xserver/hw/dec/ws/ws_io.c Thu Feb 27 12:29:22 2003 @@ -1,1611 +0,0 @@ -/*********************************************************** - -Copyright 1991, 1998 The Open Group - -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. - -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. - - -Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -******************************************************************/ - -/* $Xorg: ws_io.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ - -#include <stdio.h> -#include <sys/types.h> -#include <sys/file.h> -#include <sys/time.h> -#include <sys/tty.h> -#include <sys/stat.h> -#include <errno.h> -#include <sys/devio.h> -#define NEED_EVENTS -#include "misc.h" -#include "X.h" -#include "Xproto.h" -#include "scrnintstr.h" -#include "pixmap.h" -#include "inputstr.h" -#include "cursorstr.h" -#include "regionstr.h" -#include "resource.h" -#include "dixstruct.h" -#include "servermd.h" -#include <sys/workstation.h> -#include <sys/inputdevice.h> -#include <sys/wsdevice.h> -#include "ws.h" -#include "keynames.h" -#ifdef XKB -#include "XKBsrv.h" -#ifdef __alpha -#include <alpha/hal_sysinfo.h> /* for GSI_KEYBOARD */ -#endif -#endif - -#include "mi.h" - -#define MOTION_BUFFER_SIZE 100 - -extern ws_descriptor wsinfo; -void wsCursorControl(); -static Bool wsDisplayCursor(); -static Bool wsSetCursorPosition(); - -extern ws_screen_descriptor screenDesc[]; -extern int wsFd; -int rememberedScreen; -static int shiftLock; -static short lockLed; -ScreenPtr wsScreens[MAXSCREENS]; -ScreenArgsRec screenArgs[MAXSCREENS]; -static DevicePtr wsPointer; -static DevicePtr wsKeyboard; -char *blackValue, *whiteValue; -extern ws_event_queue *queue; -CARD32 lastEventTime; -int wsNumButtons = -1; -static Bool cursorConfined = FALSE; - -#define MAX_LED 3 /* only 3 LED's can be set by user; Lock LED - is controlled by server */ - -#define VSYNCFIXED -#ifdef VSYNCFIXED -#define CURRENT_TIME queue->time -#else -#define CURRENT_TIME GetTimeInMillis() -#endif - -#define NoSuchClass -1 - -static int -ParseClass(className) - char * className; -{ - static char *names[] = { - "StaticGray", - "GrayScale", - "StaticColor", - "PseudoColor", - "TrueColor"}; - /* - * only the ones we support and must be in order from X.h, since - * return value depends on index into array. - */ - int i; - for (i = 0; i < sizeof(names)/sizeof(char *); i++) - { - if (strcmp(names[i], className) == 0) - return i; - } - return NoSuchClass; -} - -/* SaveScreen does blanking, so no need to worry about the interval timer */ - -Bool -wsSaveScreen(pScreen, on) - ScreenPtr pScreen; - int on; -{ - ws_video_control vc; - vc.screen = screenDesc[pScreen->myNum].screen; - - if (on == SCREEN_SAVER_FORCER) { - lastEventTime = CURRENT_TIME; - } else if (on == SCREEN_SAVER_ON) { - vc.control = SCREEN_OFF; - if (ioctl(wsFd, VIDEO_ON_OFF, &vc) < 0) - ErrorF("VIDEO_ON_OFF: failed to turn screen off.\n"); - } else { - vc.control = SCREEN_ON; - if (ioctl(wsFd, VIDEO_ON_OFF, &vc) < 0) - ErrorF("VIDEO_ON_OFF: failed to turn screen on.\n"); - } - return TRUE; -} - - -wsPixelError(index) -int index; -{ - ErrorF("Only 0 through 255 are acceptable pixels for device %d\n", index); -} - -void -wsClick(click) - int click; -{ - ws_keyboard_control control; - control.device_number = wsinfo.console_keyboard; - control.flags = WSKBKeyClickPercent; - control.click = click; - if (ioctl (wsFd, SET_KEYBOARD_CONTROL, &control) == -1) - printf ("couldn't set click\n"); - return; -} - -static void -wsChangeKeyboardControl(device, ctrl) - DeviceIntPtr device; - KeybdCtrl *ctrl; -{ - int i; - ws_keyboard_control control; - control.device_number = wsinfo.console_keyboard; - control.flags = 0; - - /* - * even though some of these are not implemented on the lk201/lk401, - * we should pass these to the driver, as other hardware may not - * lose so badly. The new driver does do auto-repeat and up down - * properly, however. - */ - control.flags |= WSKBKeyClickPercent| WSKBBellPercent | WSKBBellPitch | - WSKBBellDuration | WSKBAutoRepeatMode | WSKBAutoRepeats | WSKBLed; - control.click = ctrl->click; - control.bell = ctrl->bell; - control.bell_pitch = ctrl->bell_pitch; - control.bell_duration = ctrl->bell_duration; - control.auto_repeat = ctrl->autoRepeat; - control.leds = ctrl->leds; - /* - * XXX a crock, but to have a byte interface would have implied the - * driver did alot more work at interrupt time, so we made it 32 bits wide. - */ - memmove(control.autorepeats, ctrl->autoRepeats, 32); -#ifdef notdef - /* LEDs */ - for (i=1; i<=MAX_LED; i++) - ChangeLED(i, (ctrl->leds & (1 << (i-1)))); -#endif - if (ioctl (wsFd, SET_KEYBOARD_CONTROL, &control) == -1) - ErrorF ("couldn't set global autorepeat\n"); - return; - -} - -static void -wsBell(loud, pDevice, ctrl, fbclass) - int loud; - DeviceIntPtr pDevice; - pointer ctrl; - int fbclass; -{ - ws_keyboard_control control; - control.device_number = wsinfo.console_keyboard; - control.flags = WSKBBellPercent; - control.bell = loud; - ioctl(wsFd, SET_KEYBOARD_CONTROL, &control); - - ioctl(wsFd, RING_KEYBOARD_BELL, &wsinfo.console_keyboard); -} - -/* - * These serve protocol requests, setting/getting acceleration and threshold. - * X10 analog is "SetMouseCharacteristics". - */ -void -wsChangePointerControl(device, ctrl) - DeviceIntPtr device; - PtrCtrl *ctrl; -{ - ws_pointer_control pc; - pc.device_number = wsinfo.console_pointer; - pc.numerator = ctrl->num; - pc.denominator = ctrl->den; - pc.threshold = ctrl->threshold; - if (ioctl (wsFd, SET_POINTER_CONTROL, &pc) == -1) { - ErrorF ("error setting mouse properties\n"); - } -} - -int -wsGetMotionEvents(pDevice, buff, start, stop, pScr) - DeviceIntPtr pDevice; - xTimecoord *buff; - unsigned long start, stop; - ScreenPtr pScr; -{ - register int i; /* Number of events left to process in ring */ - ws_motion_buffer *mb = queue->mb; - register ws_motion_history *mh = mb->motion; /*Beginning of ring storage*/ - int count; /* Number of events that match conditions */ - CARD32 temptime; - - /* Loop through entire ring buffer. Technically, the driver may not have - actually queued this many motion events, but since they are initialized - to time 0 the non-events shouldn't match. If the mouse isn't moved for - 25 days after startup this could be a problem...but who cares? */ - count = 0; - for (i = mb->size; i != 0; i--) { - temptime = mh->time; - if (start <= temptime && temptime <= stop) { - buff[count].time = temptime; - buff[count].x = mh->axis[0]; - buff[count].y = mh->axis[1]; - if (temptime == mh->time) count++; /* paranoid */ - } - mh = (ws_motion_history *) ((char*)mh + mb->entry_size); - } - return count; -} - -int -wsMouseProc(pDev, onoff, argc, argv) - DevicePtr pDev; - int onoff, argc; - char *argv[]; -{ - int i, numButtons; - BYTE map[6]; - ws_hardware_type wht; - - switch (onoff) - { - case DEVICE_INIT: - wht.device_number = wsinfo.console_pointer; - ioctl(wsFd, GET_DEVICE_TYPE, &wht); - wsPointer = pDev; - pDev->devicePrivate = (pointer) &queue; - map[1] = 1; /* worst case is 5 buttons - jmg */ - map[2] = 2; - map[3] = 3; - map[4] = 4; - map[5] = 5; - if(wsNumButtons == -1) { -#ifndef VSXXX - numButtons = wht.buttons; /* believe the Kernel :-) */ -#else - if(wht.hardware_type == VSXXX) - numButtons = 3; - else - numButtons = 4; -#endif - } - else - numButtons = wsNumButtons; - InitPointerDeviceStruct( - wsPointer, map, numButtons, wsGetMotionEvents, - wsChangePointerControl, MOTION_BUFFER_SIZE); - SetInputCheck((HWEventQueuePtr)&queue->head, - (HWEventQueuePtr)&queue->tail); - break; - case DEVICE_ON: - pDev->on = TRUE; - AddEnabledDevice(wsFd); - break; - case DEVICE_OFF: - pDev->on = FALSE; - RemoveEnabledDevice(wsFd); - break; - case DEVICE_CLOSE: - break; - } - return Success; -} - -/* since this driver does up/down autorepeat right, any key can be a modifier*/ -/*ARGSUSED*/ -Bool -LegalModifier(key, pDev) - unsigned int key; - DevicePtr pDev; -{ - return TRUE; -} - -#ifdef XKB -static char *languages[] = { - "danish", /* 30 Dansk */ - "german", /* 32 Deutsch */ - "swiss_german", /* 34 Deutsch(Schweiz) */ - "us", /* 36 English(American) */ - "uk", /* 38 English(British/Irish) */ - "spanish", /* 3a Espanol */ - "french", /* 3c Francais */ - "canadian_french", /* 3e Francais(Canadien) */ - "swiss_french", /* 40 Francais(SuisseRomande) */ - "italian", /* 42 Italiano */ - "dutch", /* 44 Nederlands */ - "norwegian", /* 46 Norsk */ - "portuguese", /* 48 Portugues */ - "finnish", /* 4a Suomi */ - "swedish", /* 4c Svenska */ - "flemish" /* 4e Vlaams */ -}; - -#define ENGLISH_AMERICAN 3 /* languages[3] = us, hardcoded fallback */ -#endif /* XKB */ - -int -wsKeybdProc(pDev, onoff, argc, argv) - DevicePtr pDev; - int onoff, argc; - char *argv[]; -{ - KeySymsRec keySyms; - CARD8 modMap[MAP_LENGTH]; - - switch (onoff) - { - case DEVICE_INIT: -/* Note that keyclick is off by default. The QDSS MIT server sets it - to 20 */ - wsKeyboard = pDev; - GetKeyboardMappings( &keySyms, modMap); -#if defined(XKB) && defined(__alpha) - if (!noXkbExtension) - { - XkbComponentNamesRec names; - char keyboard[8]; - char lang[4]; - char keymapname[80]; - unsigned int langindex; - char *p; - int i; - - /* Set the default keymap based on the console's language - * environment variable. - */ - lang[0] = '\0'; - if (-1 == getsysinfo(GSI_PROM_ENV, lang, sizeof(lang), 0, - "language")) - lang[0] = '\0'; - - /* Find the class of keyboard being used. - */ - keyboard[0] = '\0'; - if (-1 == getsysinfo(GSI_KEYBOARD, keyboard, sizeof(keyboard), - 0, NULL)) - keyboard[0] = '\0'; - - /* Now put together the keymap name: digital/lang(kbtype) - * Eventually, we'll consult a file to find the keymap - * name based on the keyboard class and language, and all - * the code below will be a fallback in case nothing was - * found in the file. For now, just rely on the fallback - * code. - * - * All of our keymap names start with "digital/", so ... - */ - keymapname[0] = '\0'; - strcat(keymapname, "digital/"); - - /* Next you tack on the language. If we don't understand - * what getsysinfo returned, use the fallback. - */ - langindex = ((unsigned)lang[0] - MIN_LANG_CODE) / 2; - if (langindex >= sizeof(languages) / sizeof(char *)) - langindex = ENGLISH_AMERICAN; - strcat(keymapname, languages[langindex]); - - /* Lastly you append the keyboard type. Convert it to lower - * case first. Funky special case: for non-us keyboards, - * change "lk443" to "lk444". (Why not just name the - * keymap files consistently?) - */ - - i = strlen(keymapname); - keymapname[i++] = '('; - for (p = keyboard; *p; p++) { - keymapname[i++] = tolower(*p); - } - if (!strcmp("LK443", keyboard) && - langindex != ENGLISH_AMERICAN) { - keymapname[i-1] = '4'; - } - keymapname[i++] = ')'; - keymapname[i++] = '\0'; -#ifdef DEBUG - ErrorF("keymap name is %s\n", keymapname); -#endif - names.keymap= keymapname; - - /* the chosen keymap file specifies all of these */ - - names.keycodes= NULL; - names.types= NULL; - names.compat= NULL; - names.symbols= NULL; - names.geometry= NULL; - XkbInitKeyboardDeviceStruct((DeviceIntPtr)wsKeyboard, - &names, &keySyms, modMap, wsBell, - wsChangeKeyboardControl); - } - else -#endif /* XKB */ - InitKeyboardDeviceStruct( - wsKeyboard, &keySyms, modMap, wsBell, - wsChangeKeyboardControl); - - /* Free the key sym mapping space allocated by GetKeyboardMappings. */ - Xfree(keySyms.map); - break; - case DEVICE_ON: - pDev->on = TRUE; - AddEnabledDevice(wsFd); - break; - case DEVICE_OFF: - pDev->on = FALSE; - RemoveEnabledDevice(wsFd); - break; - case DEVICE_CLOSE: - break; - } - return Success; -} -extern int screenIsSaved; -static CursorPtr currentCursor; - - -/* The code below is for backward compatibility with DEC R3 servers. - * Load the keyboard map pointed to by the file "/usr/lib/X11/keymap_default" - */ - -#define FileNameLength 256 -#define MaxLineLength 256 - - -KeySym *LoadKeymap(); - -/* - * Load the default keymap file. - */ - -int GetDefaultMap(ks) - KeySymsPtr ks; -{ - char keymap_name[FileNameLength]; - KeySym *keymap_pointer; - int keymap_width; - int keymap_loaded = FALSE; - - if (GetKeymapName (keymap_name)==TRUE) { - if ((keymap_pointer = LoadKeymap (keymap_name, MIN_LK201_KEY, - MAX_LK201_KEY, &keymap_width)) !=NULL) { - ks->minKeyCode = MIN_LK201_KEY; - ks->maxKeyCode = MAX_LK201_KEY; - ks->mapWidth = keymap_width; - ks->map = keymap_pointer; - keymap_loaded=TRUE; - } - } - return (keymap_loaded); -} - - -/* - * Check for keymap type file "/usr/lib/X11/keymap_default" - */ - -int GetKeymapName (name_return) - char *name_return; -{ - char *filename = "/usr/lib/X11/keymap_default"; - int fd; - int len; - - if ((fd = open(filename, O_RDONLY)) == -1) - return (FALSE); - len = strlen(filename); - strcpy(name_return, filename); - name_return[len] = '\0'; - return (TRUE); -} - - -#define EndLine(c) (((c)=='!' || (c) =='\n' || (c) == '\0') ? TRUE : FALSE ) - -/* - * load the keymap file into keysym table - */ - -KeySym *LoadKeymap(keymap_name, minkc, maxkc, return_ks_per_kc) - char *keymap_name; - KeyCode minkc; - KeyCode maxkc; - int *return_ks_per_kc; -{ - FILE *fp; - KeySym *keymap = NULL; - char line[MaxLineLength]; - - if ((fp=fopen (keymap_name, "r")) == NULL) - return ( (KeySym *) NULL); - - while (fgets (line, MaxLineLength, fp) != NULL) { - if (AddLineToKeymap (line, &keymap, minkc, maxkc, return_ks_per_kc) - ==FALSE) { - fclose (fp); - if (keymap != NULL) Xfree (keymap); - return ( (KeySym *)NULL); - } - } - fclose (fp); - return ( keymap ); -} - - -/* - * decode keycode, and keysyms from line, allocate keymap first time round. - */ - -int AddLineToKeymap (line, keymap, minkc, maxkc, return_ncols) - char *line; - KeySym **keymap; - KeyCode minkc; - KeyCode maxkc; - int *return_ncols; -{ - int pos; - KeyCode kc; - KeySym *offset; - KeySym ks; - int ncols; - int col; - int map_size; - int i; - - if (isspace(line[0]) || line[0] == '!' || line[0] == '\n' || line[0] == '\0') - return (TRUE); /* ignore blank lines and comments */ - - if ( *keymap ==NULL) { - pos=0; - if ((kc=GetToken (line, &pos)) == -1) return (FALSE); - ncols=0; - while (GetToken (line, &pos) != -1) - ncols++; - if (ncols < 2) ncols = 2; - (*return_ncols) = ncols; - map_size = (maxkc-minkc+1) * ncols; - (*keymap) = (KeySym *) Xalloc ( map_size * sizeof (KeySym)); - for (i = 0; i < map_size; i++) - (*keymap)[i] = NoSymbol; - - } - pos = 0; - if ((kc=GetToken (line, &pos)) == -1) return (FALSE); - if ( kc < minkc || kc > maxkc ) return (FALSE); - offset = (*keymap) + (kc-minkc)* (*return_ncols); - col=0; - while (col < (*return_ncols) && ((ks=GetToken (line, &pos)) != -1)) { - *(offset + col) = ks; - col+=1; - } - return (TRUE); -} - -/* - * return hex value of next item on line (current position held in 'pos') - */ - -int GetToken (line, pos) - char *line; - int *pos; -{ - int start; - - if (EndLine(line[*pos]) == TRUE) return (-1); - while (isspace(line[*pos]) || EndLine(line[*pos])) { - if (EndLine(line[*pos]) == TRUE) - return (-1); - (*pos)++; - } - start = *pos; - while (!isspace (line[*pos]) && !EndLine (line[*pos])) { - (*pos)++; - } - return (StringToHex(&line[start], (*pos)-start)); -} - - -/* - * convert null terminated hexadecimal string to integer - * return 'value', or '-1' on error - */ - -int StringToHex (str,nbytes) - char *str; - int nbytes; -{ - int i; - int digit; - int scale = 1; - long value = 0; - - for (i=nbytes-1;i>=0;i--) { - if (!isxdigit(str[i])) return (-1); - if (isdigit(str[i])) - digit=str[i]-'0'; - else - digit=toupper(str[i])-'A'+10; - value+=(digit*scale); - scale*=16; - } - return(value); -} - -#undef EndLine -#undef MaxLineLength -#undef FileNameLength - - -Bool GetKeyboardMappings(pKeySyms, pModMap) - KeySymsPtr pKeySyms; - CARD8 *pModMap; -{ - int i; - ws_keyboard_definition def; - KeySym *map; - KeySym rawsyms[256]; /* more than we'll ever need! */ - unsigned char rawcodes[256]; /* more than we'll ever need! */ - ws_keycode_modifiers mods[32]; /* more than we'll ever need! */ - ws_keysyms_and_modifiers km; - int min_keycode = 256, max_keycode = 0; - - def.device_number = wsinfo.console_keyboard; - if (ioctl (wsFd, GET_KEYBOARD_DEFINITION, &def) == -1) { - ErrorF ("error getting keyboard definition\n"); - } - lockLed = def.lock_key_led; - - /* If it exists, load special keysym map from file instead of driver. - This is for backward compatibility with the i18n stuff from the - DEC R3 servers. - */ - if (GetDefaultMap(pKeySyms) == TRUE) { - for (i = 0; i < MAP_LENGTH; i++) - pModMap[i] = NoSymbol; /* make sure it is restored */ - pModMap[ KEY_LOCK ] = LockMask; - pModMap[ KEY_SHIFT ] = ShiftMask; - pModMap[ KEY_SHIFT_R ] = ShiftMask; - pModMap[ KEY_CTRL ] = ControlMask; - pModMap[ KEY_COMPOSE ] = Mod1Mask; - pModMap[ KEY_COMPOSE_R ] = Mod1Mask; - pModMap[ KEY_ALT_L ] = Mod2Mask; - pModMap[ KEY_ALT_R ] = Mod2Mask; - return (TRUE); - } - - km.device_number = wsinfo.console_keyboard; - km.modifiers = mods; - *((KeySym **)(&km.keysyms)) = rawsyms; /* XXX bad type in inputdevice.h */ - km.keycodes = rawcodes; - if (ioctl (wsFd, GET_KEYSYMS_AND_MODIFIERS, &km) == -1) { - ErrorF ("error getting keysyms and modifiers\n"); - } - -#define KEYCODE(i) ((i) >> 24)) - for (i = 0; i < def.keysyms_present; i++) { - if (rawcodes[i] > max_keycode) max_keycode = rawcodes[i]; - if (rawcodes[i] < min_keycode) min_keycode = rawcodes[i]; - } - - map = (KeySym *)Xalloc(sizeof(KeySym) * - (MAP_LENGTH * def.keysyms_per_keycode)); - if (!map) - return FALSE; - - for (i = 0; i < MAP_LENGTH; i++) - pModMap[i] = NoSymbol; /* make sure it is restored */ - - /* first set up modifier keys */ - for (i = 0; i < def.modifier_keycode_count; i++) - pModMap[mods[i].keycode] = mods[i].modbits; - - /* initialize the keysym array */ - for (i = 0; i < (MAP_LENGTH * def.keysyms_per_keycode); i++) - map[i] = NoSymbol; - pKeySyms->minKeyCode = min_keycode; - pKeySyms->maxKeyCode = max_keycode; - pKeySyms->mapWidth = def.keysyms_per_keycode; - pKeySyms->map = map; -#define INDEX(in) ((in - min_keycode) * def.keysyms_per_keycode) - for (i = 0; i < def.keysyms_present; i++) { - register int j; - for (j = 0; j < def.keysyms_per_keycode; j++) { - if (map[INDEX(rawcodes[i]) + j] == NoSymbol) { - map[INDEX(rawcodes[i]) + j] = rawsyms[i]; - break; - } - } - } -#undef INDEX - return TRUE; -} - - -void -SetLockLED (on) - Bool on; -{ - ws_keyboard_control kc; - kc.flags = WSKBLed; - kc.device_number = wsinfo.console_keyboard; - if (ioctl (wsFd, GET_KEYBOARD_CONTROL, &kc) == -1) { - ErrorF ("error getting keyboard control\n"); - } - if(on) - kc.leds |= 1 << (lockLed -1); - else - kc.leds &= ~(1 << (lockLed -1)); - kc.flags = WSKBLed; - if (ioctl (wsFd, SET_KEYBOARD_CONTROL, &kc) == -1) { - ErrorF ("error setting keyboard control\n"); - } -} - -/* - * The driver has been set up to put events in the queue that are identical - * in shape to the events that the DDX layer has to deliver to ProcessInput - * in DIX. - */ -void -ProcessInputEvents() -{ - xEvent x; - register ws_event *e; - ws_event etmp; - int screen; - DeviceIntPtr dev = (DeviceIntPtr) wsKeyboard; - - e = &etmp; - while (queue->head != queue->tail) { - /* The events should be popped off the queue before they - * are processed. This bug surfaced because XKB indirectly - * turned ProcessInputEvents into a recursive routine. - */ - memmove(&etmp, -#ifdef __alpha - (caddr_t)(queue->events) + queue->event_size * queue->head, -#else - (int)(queue->events) + queue->event_size * queue->head, -#endif - queue->event_size); - - if (queue->head >= queue->size - 1) - queue->head = 0; - else - ++queue->head; - - if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens(SCREEN_SAVER_OFF, ScreenSaverReset); - if(e->screen != rememberedScreen) - { - ScreenPtr pScreen; - int x, y; - - if (cursorConfined) - { - /* OS doesn't work right -- we have to confine here */ - GetSpritePosition (&x, &y); - pScreen = wsScreens[rememberedScreen]; - (void) wsSetCursorPosition (pScreen, x, y, FALSE); - wsCursorControl(e->screen, CURSOR_OFF); - wsCursorControl(rememberedScreen, CURSOR_ON); - if (currentCursor) - wsDisplayCursor(pScreen, currentCursor); - } - else - { - /* assumption -- this is a motion event */ - wsCursorControl(rememberedScreen, CURSOR_OFF); - wsCursorControl(e->screen, CURSOR_ON); - rememberedScreen = e->screen; - pScreen = wsScreens[e->screen]; - if (currentCursor) - wsDisplayCursor (pScreen, currentCursor); - x = e->e.key.x; - y = e->e.key.y; - NewCurrentScreen(pScreen, x, y); - } - continue; - } - - x.u.keyButtonPointer.rootX = e->e.key.x; - x.u.keyButtonPointer.rootY = e->e.key.y; - x.u.keyButtonPointer.time = lastEventTime = e->time; - x.u.u.detail = e->e.key.key; - - switch (e->device_type) { - case KEYBOARD_DEVICE: - switch (e->type) { - case BUTTON_DOWN_TYPE: - x.u.u.type = KeyPress; -#ifdef XKB - if (noXkbExtension) -#endif - { - /* if key is a lock modifier then ... */ - if (dev->key->modifierMap[e->e.key.key] & LockMask){ - if (shiftLock) { - x.u.u.type = KeyRelease; - SetLockLED (FALSE); - shiftLock = FALSE; - } else { - x.u.u.type = KeyPress; - SetLockLED (TRUE); - shiftLock = TRUE; - } - } - } - (*wsKeyboard->processInputProc) (&x, dev, 1); - break; - case BUTTON_UP_TYPE: -#ifdef XKB - if (noXkbExtension) -#endif - { - /* if key is a lock modifier then ignore */ - if (dev->key->modifierMap[e->e.key.key] & LockMask) - break; - } - x.u.u.type = KeyRelease; - (*wsKeyboard->processInputProc) (&x, dev, 1); - break; - default: /* hopefully BUTTON_RAW_TYPE */ - break; - } - break; - case MOUSE_DEVICE: - /* someday tablet will be handled differently than a mouse */ - case TABLET_DEVICE: - switch (e->type) { - case BUTTON_DOWN_TYPE: - x.u.u.type = ButtonPress; - break; - case BUTTON_UP_TYPE: - x.u.u.type = ButtonRelease; - break; - case MOTION_TYPE: - x.u.u.type = MotionNotify; - break; - default: -#ifdef DEBUG - printf("Unknown mouse or tablet event = %d\n", - e->type); -#endif - continue; - } - (*wsPointer->processInputProc) - (&x, (DeviceIntPtr) wsPointer, 1); - break; - /* new input devices go here (or are ignored) */ - default: -#ifdef XINPUT - if (!ExtProcessInputEvents(&x, e)) -# ifdef DEBUG - printf("Unknown device type = %d\n",e->device_type); -# else - ; /* do nothing */ -# endif -#else -# ifdef DEBUG - printf("Unknown device type = %d\n",e->device_type); -# endif -#endif - break; - } - } -} - -CARD32 -GetTimeInMillis() -{ - struct timeval tp; -#ifdef VSYNCFIXED - if (queue) - return queue->time; -#endif - gettimeofday(&tp, 0); - return(tp.tv_sec * 1000) + (tp.tv_usec / 1000); -} - -TimeSinceLastInputEvent() -{ - if (lastEventTime == 0) - lastEventTime = CURRENT_TIME; - return CURRENT_TIME - lastEventTime; -} - -SetTimeSinceLastInputEvent () -{ - lastEventTime = CURRENT_TIME; -} - -/* - * set the bounds in the device for this particular cursor - */ -static void -wsConstrainCursor( pScr, pBox) - ScreenPtr pScr; - BoxPtr pBox; -{ - ws_pointer_box wsbox; - wsbox.screen = screenDesc[pScr->myNum].screen; - wsbox.enable = PointerConfinedToScreen(); - cursorConfined = wsbox.enable; - wsbox.device_number = wsinfo.console_pointer; - wsbox.box.bottom = pBox->y2; - wsbox.box.right = pBox->x2; - wsbox.box.top = pBox->y1; - wsbox.box.left = pBox->x1; - - if (ioctl(wsFd, SET_POINTER_BOX, &wsbox) == -1) - ErrorF("SET_POINTER_BOX: failed to set pointer box.\n"); -} - -static Bool -wsSetCursorPosition( pScr, newx, newy, generateEvent) - ScreenPtr pScr; - unsigned int newx; - unsigned int newy; - Bool generateEvent; -{ - ws_pointer_position pos; - xEvent motion; - - pos.screen = screenDesc[pScr->myNum].screen; - pos.device_number = wsinfo.console_pointer; - pos.x = newx; - pos.y = newy; - - /* if this is on a different screen, then we need to switch... */ - if (pos.screen != rememberedScreen) { - wsCursorControl(rememberedScreen, CURSOR_OFF); - wsCursorControl(pos.screen, CURSOR_ON); - rememberedScreen = pos.screen; - } - if (ioctl (wsFd, SET_POINTER_POSITION, &pos) == -1) { - ErrorF ("error warping cursor\n"); - return FALSE; - } - - if (generateEvent) { - if (queue->head != queue->tail) - ProcessInputEvents (); - motion.u.keyButtonPointer.rootX = newx; - motion.u.keyButtonPointer.rootY = newy; - motion.u.keyButtonPointer.time = currentTime.milliseconds; - motion.u.u.type = MotionNotify; - (wsPointer->processInputProc)(&motion, (DeviceIntPtr) wsPointer, 1); - } - return TRUE; -} - -static Bool -wsDisplayCursor( pScr, pCurs) - ScreenPtr pScr; - CursorPtr pCurs; -{ - ws_cursor_data cd; - ws_cursor_color cc; -#ifdef __alpha - unsigned int sourcebits[1024], maskbits[1024]; - unsigned char *pSrc, *pDst; - int i; - int widthBytesLineSrc, widthBytesLineDest; -#endif - cd.screen = screenDesc[pScr->myNum].screen; - cd.width = pCurs->bits->width; - cd.height = pCurs->bits->height; - cd.x_hot = pCurs->bits->xhot; - cd.y_hot = pCurs->bits->yhot; -#ifdef __alpha - /* - * convert from an image padded on 8-byte boundaries to an - * image padded on 4-byte boundaries for the hardware - */ - widthBytesLineSrc = BitmapBytePad (pCurs->bits->width); - widthBytesLineDest = BitmapBytePadProto (pCurs->bits->width); - - pSrc = (unsigned char*) pCurs->bits->source; - pDst = (unsigned char*) sourcebits; - for (i = 0; i < pCurs->bits->height; - i++, pSrc += widthBytesLineSrc, pDst += widthBytesLineDest) - memmove((void*) pDst, (void*)pSrc, widthBytesLineDest); - cd.cursor = sourcebits; - pSrc = (unsigned char*) pCurs->bits->mask; - pDst = (unsigned char*) maskbits; - for (i = 0; i < pCurs->bits->height; - i++, pSrc += widthBytesLineSrc, pDst += widthBytesLineDest) - memmove((void*) pDst, (void*)pSrc, widthBytesLineDest); - cd.mask = maskbits; -#else - cd.cursor = (unsigned int *) pCurs->bits->source; - cd.mask = (unsigned int *) pCurs->bits->mask; -#endif - if ( ioctl( wsFd, LOAD_CURSOR, &cd) == -1) { - ErrorF( "error loading bits of new cursor\n"); - return FALSE; - } - cc.screen = screenDesc[pScr->myNum].screen; - cc.background.red = pCurs->backRed; - cc.background.green = pCurs->backGreen; - cc.background.blue = pCurs->backBlue; - cc.foreground.red = pCurs->foreRed; - cc.foreground.green = pCurs->foreGreen; - cc.foreground.blue = pCurs->foreBlue; - if ( ioctl(wsFd, RECOLOR_CURSOR, &cc) == -1) { - ErrorF( "error writing colors of new cursor\n"); - return FALSE; - } - currentCursor = pCurs; - return (TRUE); -} - -void -wsCursorControl(screen, control) - int screen; - int control; -{ - ws_cursor_control cc; - cc.screen = screenDesc[screen].screen; - cc.control = control; - if (ioctl(wsFd, CURSOR_ON_OFF, &cc) == -1) { - ErrorF( "error enabling/disabling cursor\n"); - } - return; -} -static void -wsRecolorCursor (pScr, pCurs, displayed) - ScreenPtr pScr; - CursorPtr pCurs; - Bool displayed; -{ - ws_cursor_color cc; - if (!displayed) - return; - cc.screen = screenDesc[pScr->myNum].screen; - cc.background.red = pCurs->backRed; - cc.background.green = pCurs->backGreen; - cc.background.blue = pCurs->backBlue; - cc.foreground.red = pCurs->foreRed; - cc.foreground.green = pCurs->foreGreen; - cc.foreground.blue = pCurs->foreBlue; - if ( ioctl(wsFd, RECOLOR_CURSOR, &cc) == -1) { - ErrorF( "error writing colors of new cursor\n"); - } -} - -static Bool -wsRealizeCursor( pScr, pCurs) - ScreenPtr pScr; - CursorPtr pCurs; /* The new driver makes this easy */ -{ - return TRUE; -} - -static Bool -wsUnrealizeCursor( pScr, pCurs) - ScreenPtr pScr; - CursorPtr pCurs; -{ - if (pCurs == currentCursor) - currentCursor = 0; - return TRUE; -} - -static void -wsCursorLimits( pScr, pCurs, pHotBox, pPhysBox) - ScreenPtr pScr; - CursorPtr pCurs; - BoxPtr pHotBox; - BoxPtr pPhysBox; /* return value */ -{ - wsScreenPrivate *wsp = (wsScreenPrivate *) - pScr->devPrivates[wsScreenPrivateIndex].ptr; - pPhysBox->x1 = max( pHotBox->x1, 0); - pPhysBox->y1 = max( pHotBox->y1, 0); - pPhysBox->x2 = min( pHotBox->x2, wsp->screenDesc->width - 1); - pPhysBox->y2 = min( pHotBox->y2, wsp->screenDesc->height - 1); -} - -void -wsPointerNonInterestBox( pScr, pBox) - ScreenPtr pScr; - BoxPtr pBox; -{ - ws_pointer_box wsbox; - wsbox.screen = screenDesc[pScr->myNum].screen; - wsbox.device_number = wsinfo.console_pointer; - wsbox.enable = TRUE; - wsbox.box.top = pBox->x1; - wsbox.box.bottom = pBox->x2; - wsbox.box.left = pBox->y1; - wsbox.box.right = pBox->y2;; - if (ioctl(wsFd, SET_ESCAPE_BOX, wsbox) == -1) - ErrorF("SET_ESCAPE_BOX: failed to set non interest box.\n"); -} -/* - * DDX - specific abort routine. Called by AbortServer(). - */ -void -AbortDDX() -{ -} - -/* Called by GiveUp(). */ -void -ddxGiveUp() -{ -} - -int -ArgMatch(arg, template, screen) - char *arg; - char *template; - int *screen; -{ - int tlen = strlen(template); - char next = *(arg + tlen); - if(strncmp(arg, template, tlen) == 0) { - if(tlen == strlen(arg)) { - /* exact match - applies to all screens */ - *screen = -1; - return TRUE; - } - if(isdigit(next)) { - /* parse off screen number */ - *screen = atoi(arg + tlen); - if(*screen < MAXSCREENS) - return TRUE; - else - return FALSE; - } - else - /* non-digit stuff at end of arg. not ours. */ - return FALSE; - } - else - return FALSE; -} - - -int -ddxProcessArgument (argc, argv, i) - register int argc; - register char *argv[]; - register int i; -{ - int argind=i; - int skip; - static int Once=0; - void ddxUseMsg(); - int screen; - - skip = 0; - if (!Once) { - blackValue = NULL; - whiteValue = NULL; - Once = 1; - } - if (ArgMatch( argv[argind], "-dpix", &screen)) { - if (++argind < argc) { - if(screen == -1) { - for(i = 0; i < MAXSCREENS; i++) { - screenArgs[i].flags |= ARG_DPIX; - screenArgs[i].dpix = atoi(argv[argind]); - } - } - else { - screenArgs[screen].flags |= ARG_DPIX; - screenArgs[screen].dpix = atoi(argv[argind]); - } - skip = 2; - } - else return 0; /* failed to parse */ - } - else if (ArgMatch( argv[argind], "-dpiy", &screen)) { - if (++argind < argc) { - if(screen == -1) { - for(i = 0; i < MAXSCREENS; i++) { - screenArgs[i].flags |= ARG_DPIY; - screenArgs[i].dpiy = atoi(argv[argind]); - } - } - else { - screenArgs[screen].flags |= ARG_DPIY; - screenArgs[screen].dpiy = atoi(argv[argind]); - } - skip = 2; - } - else return 0; - } - else if (ArgMatch( argv[argind], "-dpi", &screen)) { - if (++argind < argc) { - if(screen == -1) { - for(i = 0; i < MAXSCREENS; i++) { - screenArgs[i].flags |= (ARG_DPI | ARG_DPIX | ARG_DPIY) ; - screenArgs[i].dpi = screenArgs[i].dpix = - screenArgs[i].dpiy = atoi(argv[argind]); - } - } - else { - screenArgs[screen].flags |= (ARG_DPI | ARG_DPIX | ARG_DPIY); - screenArgs[screen].dpi = screenArgs[screen].dpix = - screenArgs[screen].dpiy = atoi(argv[argind]); - } - skip = 2; - } - else return 0; - } - else if(ArgMatch( argv[argind], "-bp", &screen)) { - if (++argind < argc) { - if(screen == -1) { - for(i = 0; i < MAXSCREENS; i++) { - screenArgs[i].flags |= ARG_BLACKVALUE; - screenArgs[i].blackValue = argv[argind]; - } - } - else { - screenArgs[screen].flags |= ARG_BLACKVALUE; - screenArgs[screen].blackValue = argv[argind]; - } - skip = 2; - } - else return 0; - } - else if (ArgMatch( argv[argind], "-wp", &screen)) { - if (++argind < argc) { - if(screen == -1) { - for(i = 0; i < MAXSCREENS; i++) { - screenArgs[i].flags |= ARG_WHITEVALUE; - screenArgs[i].whiteValue = argv[argind]; - } - } - else { - screenArgs[screen].flags |= ARG_WHITEVALUE; - screenArgs[screen].whiteValue = argv[argind]; - } - skip = 2; - } - else return 0; - } - else if (ArgMatch(argv[argind], "-class", &screen)) { - if(++argind < argc) { - int class = ParseClass(argv[argind]); - if (class == NoSuchClass) - return 0; - if(screen == -1) { - for(i = 0; i < MAXSCREENS; i++) { - screenArgs[i].flags |= ARG_CLASS; - screenArgs[i].class = class; - } - } - else { - screenArgs[screen].flags |= ARG_CLASS; - screenArgs[screen].class = class; - } - skip = 2; - } - else return 0; - } - else if (ArgMatch(argv[argind], "-edge_left", &screen)) { - if(++argind < argc) { - if(screen == -1) { - return 0; - } - else { - screenArgs[screen].flags |= ARG_EDGE_L; - screenArgs[screen].edge_left = atoi(argv[argind]); - } - skip = 2; - } - else return 0; - } - else if (ArgMatch(argv[argind], "-edge_right", &screen)) { - if(++argind < argc) { - if(screen == -1) { - return 0; - } - else { - screenArgs[screen].flags |= ARG_EDGE_R; - screenArgs[screen].edge_right = atoi(argv[argind]); - } - skip = 2; - } - else return 0; - } - else if (ArgMatch(argv[argind], "-edge_top", &screen)) { - if(++argind < argc) { - if(screen == -1) { - return 0; - } - else { - screenArgs[screen].flags |= ARG_EDGE_T; - screenArgs[screen].edge_top = atoi(argv[argind]); - } - skip = 2; - } - else return 0; - } - else if (ArgMatch(argv[argind], "-edge_bottom", &screen)) { - if(++argind < argc) { - if(screen == -1) { - return 0; - } - else { - screenArgs[screen].flags |= ARG_EDGE_B; - screenArgs[screen].edge_bottom = atoi(argv[argind]); - } - skip = 2; - } - else return 0; - } - - else if (ArgMatch(argv[argind], "-monitor", &screen)) { - if(++argind + 4 < argc) { - if(strlen(argv[argind]) == 5) { - strcpy(screenArgs[screen].monitor.type, argv[argind++]); - screenArgs[screen].monitor.mm_width = atoi(argv[argind++]); - screenArgs[screen].monitor.mm_height = atoi(argv[argind++]); - screenArgs[screen].monitor.color_or_mono =atoi(argv[argind++]); - screenArgs[screen].monitor.phosphor_type =atoi(argv[argind++]); - screenArgs[screen].flags |= ARG_MONITOR; - skip = 6; - } - else return 0; - } - else return 0; - } - else if (strcmp( argv[argind], "-btn") == 0) - { - if (++argind < argc) - { - wsNumButtons = atoi(argv[argind]); - skip = 2; - if(wsNumButtons < 1 || wsNumButtons > 5) - return 0; - } - else return 0; - } - else if (strcmp( argv[argind], "-forceDepth") == 0) - { - if (++argind < argc) { - forceDepth = atoi (argv[argind]); - skip = 2; - } - } - -#ifdef XINPUT - else - skip = ExtddxProcessArgument(argc, argv, argind); -#endif - - return skip; -} - -initEdgeAttachments(index) - int index; -{ - ws_edge_connection wec; - ScreenArgsRec *args = &screenArgs[index]; - int mask = args->flags; - wec.screen = index; - if(mask & ARG_EDGE_L) - wec.adj_screens.left = args->edge_left; - else - wec.adj_screens.left = index - 1; - if(mask & ARG_EDGE_R) - wec.adj_screens.right = args->edge_right; - else - if(index + 1 < wsinfo.num_screens_exist) - wec.adj_screens.right = index + 1; - else - wec.adj_screens.right = -1; - if(mask & ARG_EDGE_T) - wec.adj_screens.top = args->edge_top; - else - wec.adj_screens.top = -1; - if(mask & ARG_EDGE_B) - wec.adj_screens.bottom = args->edge_bottom; - else - wec.adj_screens.bottom = -1; - if (ioctl(wsFd, SET_EDGE_CONNECTION, &wec) == -1) - ErrorF("SET_EDGE_CONNECTION, failed to set edge attachment.\n"); - -} - -#define ARGFILE "/etc/screens" - -void getFileArguments() -{ - FILE *f = fopen(ARGFILE, "r"); - if(f) { - struct stat stats; - if(stat(ARGFILE, &stats) == 0) { - int i, argcount = 0, skip; - char *ptr, *buf = (char *)Xalloc(stats.st_size); - char **arguments; - while(EOF != fscanf(f, "%s", buf)) argcount++; - arguments = (char **) Xalloc(argcount * sizeof(char *)); - rewind(f); - for(ptr = buf, i = 0; i < argcount; i++) { - arguments[i] = ptr; - fscanf(f, "%s", ptr); - ptr += strlen(arguments[i]) + 1; - } - fclose(f); - for(i = 0; i < argcount; i++) - if(skip = ddxProcessArgument(argcount, arguments, i)) - i += (skip - 1); - Xfree(arguments); - Xfree(buf); - } - } -} - - -void -ddxUseMsg() -{ - ErrorF ("\n"); - ErrorF ("\n"); - ErrorF ("Device Dependent Usage\n"); - ErrorF ("Note - most ddx arguments can take an optional screen number ``s''\n"); - ErrorF ("\n"); - ErrorF ("-btn <n> Number of buttons on pointer device\n"); - ErrorF ("-dpix[s] <n> Dots per inch, x coordinate\n"); - ErrorF ("-dpiy[s] <n> Dots per inch, y coordinate\n"); - ErrorF ("-dpi[s] <n> Dots per inch, x and y coordinates\n"); - ErrorF (" (overrides -dpix and -dpiy above)\n"); - ErrorF ("-bp[s] #XXX color for BlackPixel for screen\n"); - ErrorF ("-wp[s] #XXX color for WhitePixel for screen\n"); - ErrorF ("-class[s] <classname> type of Visual for root window\n"); - ErrorF (" one of StaticGray, StaticColor, PseudoColor,\n"); - ErrorF (" GrayScale, or even TrueColor!\n"); - ErrorF ("-edge_left<s1> <s2> Attach left edge of screen s1 to screen s2\n"); - ErrorF ("-edge_right<s1> <s2> Attach right edge of screen s1 to screen s2\n"); - ErrorF ("-edge_top<s1> <s2> Attach top edge of screen s1 to screen s2\n"); - ErrorF ("-edge_bottom<s1> <s2> Attach bottom edge of screen s1 to screen s2\n"); - -#ifdef XINPUT - ExtddxUseMsg(); -#endif -} - -/* ARGSUSED */ -int wsScreenInit(index, pScreen, argc, argv) - int index; - register ScreenPtr pScreen; - int argc; - char **argv; -{ - - pScreen->SaveScreen = wsSaveScreen; - pScreen->RealizeCursor = wsRealizeCursor; - pScreen->UnrealizeCursor = wsUnrealizeCursor; - pScreen->DisplayCursor = wsDisplayCursor; - pScreen->SetCursorPosition = wsSetCursorPosition; - pScreen->CursorLimits = wsCursorLimits; - pScreen->PointerNonInterestBox = wsPointerNonInterestBox; - pScreen->ConstrainCursor = wsConstrainCursor; - pScreen->RecolorCursor = wsRecolorCursor; - pScreen->StoreColors = wsStoreColors; - pScreen->InstallColormap = wsInstallColormap; - pScreen->UninstallColormap = wsUninstallColormap; - pScreen->ListInstalledColormaps = wsListInstalledColormaps; - - initEdgeAttachments(index); - if(screenArgs[index].flags & ARG_MONITOR) { - ws_monitor_type wmt; - wmt.screen = index; - wmt.monitor_type = screenArgs[index].monitor; - if (ioctl(wsFd, SET_MONITOR_TYPE, &wmt) == -1) - ErrorF("SET_MONITOR_TYPE, failed to set monitor type.\n"); - } - wsSaveScreen(pScreen, SCREEN_SAVER_OFF); - return index; -} - -#ifdef DPMSExtension -extern CARD16 DPMSPowerLevel; - -void DPMSSet(level) - int level; -{ - ws_power_mgt pwr; - int i; - - for (i = 0; i < screenInfo.numVideoScreens; i++) - { - pwr.screen = WS_SCREEN(screenInfo.screens[i]); - pwr.state = 1; - pwr.level = level; - ioctl(wsFd, SET_POWER_LEVEL, &pwr); - } - DPMSPowerLevel = level; -} - -int DPMSGet(level) - int* level; -{ - ws_power_mgt pwr; - int i; - - for (i = 0; i < screenInfo.numVideoScreens; i++) - { - if (ioctl(wsFd, GET_POWER_LEVEL, &pwr) != DPMS_NOT_SUPPORTED) - return (CARD16)pwr.level; - } - return (CARD16)-1; -} - -Bool DPMSSupported() -{ - ws_power_mgt pwr; - int i; - int supported = 0; - - /* for the purposes of this extension, we will say that we support - DPMS if any of the screens support it, and leave it to the driver - to decide on a screen by screen basis. */ - - for (i = 0; i < screenInfo.numVideoScreens; i++) - { - supported = ioctl(wsFd, GET_POWER_LEVEL, &pwr); - if (supported != DPMS_NOT_SUPPORTED) - return TRUE; - } - return FALSE; /* didn't see any that work! */ -} -#endif Index: xc/programs/Xserver/hw/hp/Imakefile diff -u xc/programs/Xserver/hw/hp/Imakefile:1.1.1.5 xc/programs/Xserver/hw/hp/Imakefile:removed --- xc/programs/Xserver/hw/hp/Imakefile:1.1.1.5 Tue Jan 16 17:42:56 2001 +++ xc/programs/Xserver/hw/hp/Imakefile Thu Feb 27 12:29:23 2003 @@ -1,45 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ -#include <Server.tmpl> - -#define IHaveSubdirs - -SUBDIRS=ngle input - -SRCS = \ - ddx_info.c \ - hpCursorUtils.c \ - hpInit.c - -OBJS = \ - ddx_info.o \ - hpCursorUtils.o \ - hpInit.o \ - ngle/ngle.o \ - input/libhp.a - -LOBJS = \ - ddx_info.ln \ - hpCursorUtils.ln \ - hpInit.ln - -DEFINES = $(ANSI_DEFINES) -DOSMAJORVERSION=OSMajorVersion - -LIB_DEFINES = -DLIBDIR=\"$(LIBDIR)\" - -INCLUDES = -I. -I./include -I./input -I../../mfb -I../../cfb -I../../mi \ - -I../../include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(FONTINCSRC) - -LINTLIBS = ../../dix/llib-ldix.ln ../../os/4.2bsd/llib-los.ln \ - ../mfb/llib-lmfb.ln ../mi/llib-lmi.ln ../cfb/llib-lcfb.ln - -all:: - -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) - -NormalLibraryObjectRule() -NormalRelocatableTarget(hp,$(OBJS)) -SpecialCObjectRule(hpInit,$(ICONFIGFILES),$(LIB_DEFINES)) -DependTarget() -InstallManPage(Xhp,$(MANDIR)) - Index: xc/programs/Xserver/hw/hp/Xhp.man diff -u xc/programs/Xserver/hw/hp/Xhp.man:1.7 xc/programs/Xserver/hw/hp/Xhp.man:removed --- xc/programs/Xserver/hw/hp/Xhp.man:1.7 Fri Dec 14 14:59:39 2001 +++ xc/programs/Xserver/hw/hp/Xhp.man Thu Feb 27 12:29:23 2003 @@ -1,143 +0,0 @@ -.\" $Xorg: Xhp.man,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ -.\" Copyright 1994 Hewlett-Packard Company -.\" Copyright 1994, 1998 The Open Group -.\" -.\" 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. -.\" -.\" 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 -.\" dealing in this Software without prior written authorization from the -.\" The Open Group. -.\" -.\" HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS SOFWARE, -.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -.\" AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable -.\" for errors contained herein or direct, indirect, special, incidental or -.\" consequential damages in connection with the furnishing, performance, or -.\" use of this material. -.\" -.\" $XFree86: xc/programs/Xserver/hw/hp/Xhp.man,v 1.7 2001/12/14 19:59:39 dawes Exp $ -.\" -.TH Xhp 1 __xorgversion__ -.SH NAME -Xhp \- cfb-based X window system server for Hewlett-Packard workstations -.SH SYNOPSIS -.PP -This cfb-based X server implementation is contributed by Hewlett-Packard -as a sample implementation for HP workstations. Its performance on HP -workstations will be inferior to the product X servers available from -Hewlett-Packard. Not all graphics display devices available from -Hewlett-Packard are supported by this implementation. -.PP -.SH "SUPPORTED GRAPHICS DEVICES" -.PP -Please refer to the HP catalog or to the apropriate data sheets -for the displays. The data that follows relates the use of the -product names with their official HP product numbers. -.PP -The following graphics display devices are supported by this implementation: -.sp -.TP -.I HPA4070A -This graphics device, known as "HCRX", is a 1280x1024 color device that has -8 planes. -.TP -.I HPA4071A -This graphics device, known as "HCRX24", is a 1280x1024 color device that has -24 planes. It is optionally available with a hardware accelerator, in which -case the product number is HPA4071A_Z. -.TP -.I HPA1659A -This graphics device, known as "CRX", is a 1280x1024 color device that has -8 planes. -.TP -.I HPA1439A -This graphics device, known as "CRX24", is a 1280x1024 color device that has -24 planes. It is optionally available with a hardware accelerator. -.TP -.I HPA1924A -This graphics device, known as "GRX" is a 1280x1024 grayscale device that has -8 planes. -.TP -.I HPA2269A -This graphics device, known as "Dual CRX" is a 1280x1024 color device that has -8 planes. It implements support for two displays on a single graphics card. -.TP -.I HP710C -This graphics device is the internal graphics support optionally available on -the HP9000s710 SPU. It supports 1280x1024 color displays and has 8 planes. -.TP -.I HP710G -This graphics device is the internal graphics support optionally available on -the HP9000s710 SPU. It supports 1280x1024 grayscale displays and has 8 planes. -.TP -.I HP710L -This graphics device is the internal graphics support optionally available on -the HP9000s710 SPU. It supports 1024x768 color displays and has 8 planes. -.TP -.I HP712 -This graphics device is the internal graphics support available on -the HP9000s712 SPU. It supports 640x480, 1024x768 or 1280x1024 color displays -and has 8 planes. -.PP -.SH "MULTIPLE SCREEN SUPPORT" -.PP -This Xhp X11 sample server supports multiple physical screens connected to a -single X server. To use this feature, you must have an SPU that allows -the installation of a second graphics display card. The file -$(LIBDIR)/X*screens is read by the X11 server -to determine information about the system screen configuration. -You must modify this file to add information for the second graphics display. -.sp -$(LIBDIR) is /usr/X11R6/lib/X11 by default. -.sp -For a complete description of the X*screens file, refer to the HP-UX manuals, -or view the sample file in $(LIBDIR). -.SH "24 PLANE SUPPORT FOR HCRX24 AND CRX24" -.PP -This Xhp X11 sample server supports two modes for the HCRX24 and CRX24 display -hardware: 8 plane and 24 plane, with 8 plane being the default. -To run the server in 24 plane mode, you must add a depth parameter to -the X*screens file. For example: -.sp -/dev/crt depth 24 -.sp -.PP -In depth 24 mode, the default visual type is DirectColor. -.PP -.SH "KEYMAP FILE" -.PP -This Xhp server loads a keymap that is appropriate for the attached keyboard -from the XHPKeymaps file, which resides in $(LIBDIR). The XHPKeymaps file -supplied with this Xhp server is a minimal file that supports US English, -French, Spanish, German, and Japanese JIS keyboards. If you have some other -keyboard, the appropriate keymap may not be contained in the XHPKeymaps file. -In this case, if you have access to the Hewlett-Packard product X server, you -can copy its keymap file (found in /usr/lib/X11/XHPKeymaps) to $(LIBDIR). -.SH "FAST SCROLLING OPTION" -.PP -Since scrolling speed is especially slow on this server compared -to HP's product server, we have supplied fast scrolling support, -using a .o to link into the server. Using HP's fast scrolling -is optional. To enable the fast scrolling, set the token -"HPFastScrolling" to TRUE in the config/hp.cf file. If you want -to use the CFB scrolling module, simply remove the define in -config/hp.cf, remake the Makefiles, and recompile. -.SH TRADEMARKS -.PP -X Window System is a trademark of The Open Group, Inc. Index: xc/programs/Xserver/hw/hp/ddx_info.c diff -u xc/programs/Xserver/hw/hp/ddx_info.c:1.1.1.5 xc/programs/Xserver/hw/hp/ddx_info.c:removed --- xc/programs/Xserver/hw/hp/ddx_info.c:1.1.1.5 Tue Jan 16 17:42:56 2001 +++ xc/programs/Xserver/hw/hp/ddx_info.c Thu Feb 27 12:29:23 2003 @@ -1,169 +0,0 @@ -/* $Xorg: ddx_info.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * - * RESTRICTED RIGHTS LEGEND - * Use, duplication, or disclosure by the U.S. Government is subject to - * restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in - * Technical Data and Computer Software clause in DFARS 252.227-7013. - * - * Hewlett-Packard Company - * 3000 Hanover Street - * Palo Alto, CA 94304 U.S.A. - * - * Rights for non-DOD U.S. Government Departments and Agencies are as set - * forth in FAR 52.227-19(c)(1,2). - * - *************************************************************************/ - - -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/framebuf.h> -#include <fcntl.h> - -#include <X.h> -#include <Xproto.h> -#include <scrnintstr.h> -#include <pixmapstr.h> -#include <resource.h> -#include <misc.h> -#include <mi.h> -#include <servermd.h> -#include <windowstr.h> -#include <colormap.h> - -#include "hppriv.h" - -#if defined(__hp9000s700) || defined(__hp9000s300) -/* Until <graphics.h> (s400) and <framebuf.h> (s700) are updated, - * define graphics IDs returned by ioctl(GCDESCRIBE). On both - * platforms, this ID equals the upper 4 bytes of the STI ROM ID. - * - * (s400 won't support 24-plane color (Rattler); that's handled below). - */ -/* Until <framebuf.h> (s700) is updated */ -# ifndef S9000_ID_A1659A /* CRX (8-plane Color) */ -# define S9000_ID_A1659A 0x26D1482A -# endif -# ifndef S9000_ID_A1924A /* GRX (Gray Scale) */ -# define S9000_ID_A1924A 0x26D1488C -# endif -# ifndef S9000_ID_A1439A /* CRX+ (24-plane Color */ -# define S9000_ID_A1439A 0x26D148EE -# endif -# ifndef S9000_ID_TIMBER /* Bushmaster (710) Graphics */ -# define S9000_ID_TIMBER 0x27F12392 -# endif -# ifndef S9000_ID_TOMCAT /* 2-headed ELK; sorry, no P/N yet */ -# define S9000_ID_TOMCAT 0x27FCCB6D -# endif -# ifndef S9000_ID_ARTIST /* Artist 712/715 mother board graphics */ -# define S9000_ID_ARTIST 0x2B4DED6D -# endif -# ifndef S9000_ID_HCRX /* Hyperdrive A4071A */ -# define S9000_ID_HCRX 0x2BCB015A -# endif -#endif - -/* Declare the external initialization functions */ - -extern Bool ngleScreenInit(); - - - /* --------------------- ddx_driver_info -------------------------- */ - /* This is an inital entry point into the hpux ddx drivers. This - procedure is called to determine if ddx driver support exists - for a given display and configuration. The display and - configuration are defined by the hp private structure passed - into this routine. A null pointer is returned if no ddx driver - support is available. If a ddx driver does exist to support the - given configuration, then a pointer to the driver's initialization - routine, which is later called by InitOutput(), routine is - returned. - */ - -Bool (*ddx_driver_info( php))() - hpPrivPtr php; -{ - struct stat statInfo; - int result; - crt_frame_buffer_t desc; - char *map_origin = NULL; - Bool (*return_value)(); - - - /* Stat the file descriptor to see if the device file exists: */ - if((result = stat( php->StandardDevice, &statInfo)) < 0) - { - return(NULL); - } - - /* Stat the file descriptor to see if the device exists: */ - if(!( statInfo.st_mode & S_IFCHR)) - { - return(NULL); - } - - /* Let's open the device: */ - if(( php->StandardFd = open(php->StandardDevice, O_RDWR)) < 0) - { - return(NULL); - } - - /* Map the device: */ - if( ioctl( php->StandardFd, GCMAP, &map_origin) < 0) - { - close(php->StandardFd); - return(NULL); - } - - /* Does the kernel know what's out there?: */ - if( ioctl( php->StandardFd, GCDESCRIBE, &desc) < 0) - { - ioctl(php->StandardFd, GCUNMAP, &map_origin ); - close(php->StandardFd ); - return(NULL); - } - - /* Let's give the driver a chance to look at the device: */ - switch(desc.crt_id) - { - /* Devices supported on s700 */ -#ifdef S9000_ID_A1924A - case S9000_ID_A1924A: /* GRX (8-plane Gray Scale) */ -#endif - case S9000_ID_A1659A: /* CRX (8-plane Color) */ -#ifdef S9000_ID_TOMCAT - case S9000_ID_TOMCAT: /* 2-Headed CRX */ -#endif -#ifdef S9000_ID_TIMBER - case S9000_ID_TIMBER: /* Bushmaster (710) Graphics */ -#endif - case S9000_ID_A1439A: /* CRX24 (24-plane Color) */ -#ifdef S9000_ID_ARTIST - case S9000_ID_ARTIST: /* 712 (8-plane Color) Graphics */ -#endif -#ifdef S9000_ID_HCRX - case S9000_ID_HCRX: /* Hyperdrive (8 or 24 plane) */ -#endif - - return_value = ngleScreenInit; - break; - - default: - return_value = NULL; - break; - } - - /* We've got our info, so lets close things down so the driver can - * re-open them: - */ - ioctl(php->StandardFd, GCUNMAP, &map_origin); - close(php->StandardFd ); - - return(return_value); -} Index: xc/programs/Xserver/hw/hp/hpCursorUtils.c diff -u xc/programs/Xserver/hw/hp/hpCursorUtils.c:1.2 xc/programs/Xserver/hw/hp/hpCursorUtils.c:removed --- xc/programs/Xserver/hw/hp/hpCursorUtils.c:1.2 Fri Dec 14 14:59:39 2001 +++ xc/programs/Xserver/hw/hp/hpCursorUtils.c Thu Feb 27 12:29:23 2003 @@ -1,149 +0,0 @@ -/* $Xorg: hpCursorUtils.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * - * RESTRICTED RIGHTS LEGEND - * Use, duplication, or disclosure by the U.S. Government is subject to - * restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in - * Technical Data and Computer Software clause in DFARS 252.227-7013. - * - * Hewlett-Packard Company - * 3000 Hanover Street - * Palo Alto, CA 94304 U.S.A. - * - * Rights for non-DOD U.S. Government Departments and Agencies are as set - * forth in FAR 52.227-19(c)(1,2). - * - *************************************************************************/ - -/*'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -Copyright 1988 by Hewlett-Packard Company -Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, - Massachusetts - -Permission to use, copy, modify, and distribute this software -and its documentation for any purpose and without fee is hereby -granted, 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 names of -Hewlett-Packard or Digital not be used in advertising or -publicity pertaining to distribution of the software without specific, -written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - - -Copyright 1987, 1988, 1998 The Open Group - -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. - -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. - -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''*/ - - -#include "hpext.h" -#include "hildef.h" -#include "scrnintstr.h" -#include "cursorstr.h" -#include "regionstr.h" -#include "inputstr.h" -#include "opaque.h" -#include "hppriv.h" - -extern int hpActiveScreen; /* Stacked mode, >1 head */ -extern WindowPtr *WindowTable; /* Defined by DIX */ - -static CursorPtr currentCursors[MAXSCREENS]; - -void hpBlottoCursors() -{ - int j; - for (j = MAXSCREENS; j--; ) currentCursors[j] = NULL; -} - -/************************************************************ - * hpCursorLimits - * Return a box within which the given cursor may move on the given - * screen. We assume that the HotBox is actually on the given screen, - * since dix knows that size. - * - * Results: - * A box for the hot spot corner of the cursor. - ************************************************************/ - -void -hpCursorLimits( pScreen, pCursor, pHotBox, pResultBox) -ScreenPtr pScreen; /* Screen on which limits are desired */ -CursorPtr pCursor; /* Cursor whose limits are desired */ -BoxPtr pHotBox; /* Limits for pCursor's hot point */ -BoxPtr pResultBox; /* RETURN: limits for hot spot */ -{ - *pResultBox = *pHotBox; - pResultBox->x2 = min(pResultBox->x2,pScreen->width); - pResultBox->y2 = min(pResultBox->y2,pScreen->height); -} - -/************************************************************ - * - * hpSetCursorPosition - * - * This routine is called from DIX when the X11 sprite/cursor is warped. - * - ************************************************************/ - -Bool -hpSetCursorPosition(pScreen, xhot, yhot, generateEvent) -ScreenPtr pScreen; -short xhot; -short yhot; -Bool generateEvent; -{ - HPInputDevice *InDev; /* Input device structure */ - hpPrivPtr php; /* XOS private structure */ - - php = (hpPrivPtr) pScreen->devPrivate; - - /* Must Update the Input Driver's Variables: */ - InDev = GET_HPINPUTDEVICE((DeviceIntPtr)LookupPointerDevice()); - InDev->pScreen = pScreen; - InDev->coords[0] = xhot; - InDev->coords[1] = yhot; - - /* Do the move now */ - (*php->MoveMouse)(pScreen, xhot, yhot, 0); - - if (generateEvent) - { - queue_motion_event(InDev); /* Enqueue motion event, in x_hil.c */ - isItTimeToYield++; /* Insures client get the event! */ - } - - return(TRUE); - -} /* hpSetCursorPosition() */ Index: xc/programs/Xserver/hw/hp/hpInit.c diff -u xc/programs/Xserver/hw/hp/hpInit.c:1.3 xc/programs/Xserver/hw/hp/hpInit.c:removed --- xc/programs/Xserver/hw/hp/hpInit.c:1.3 Wed Jan 17 17:36:46 2001 +++ xc/programs/Xserver/hw/hp/hpInit.c Thu Feb 27 12:29:23 2003 @@ -1,804 +0,0 @@ -/* $Xorg: hpInit.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * - * RESTRICTED RIGHTS LEGEND - * Use, duplication, or disclosure by the U.S. Government is subject to - * restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in - * Technical Data and Computer Software clause in DFARS 252.227-7013. - * - * Hewlett-Packard Company - * 3000 Hanover Street - * Palo Alto, CA 94304 U.S.A. - * - * Rights for non-DOD U.S. Government Departments and Agencies are as set - * forth in FAR 52.227-19(c)(1,2). - * - *************************************************************************/ - -#include "X.h" -#include "Xproto.h" -#include <servermd.h> - -#include "screenint.h" -#include "input.h" -#include "cursor.h" -#include "misc.h" -#include "windowstr.h" -#include "scrnintstr.h" - -#include "screentab.h" -#include "gcstruct.h" -#include "errno.h" - -#include <stdio.h> -#include <ctype.h> -#include <signal.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/sysmacros.h> - -#include "hppriv.h" -#include "XHPproto.h" - -#ifndef LIBDIR -#if OSMAJORVERSION >= 10 -#define LIBDIR "/etc/X11" -#else -#define LIBDIR "/usr/lib/X11" -#endif -#endif - -extern char *display; /* display number as a string */ -extern unsigned char *get_display_address(); - -extern void Xfree(); - -extern char *getenv(); /* for reading SB_DISPLAY_ADDR env var */ -extern long strtol(); - -static void ParseXnScreensFile(); -static void ResetFields(); -static void FirstTimeInitialization( ); -static int ParseNextScreen( ); -static char yygetc(); -static void ReadToNextWhiteSpace(); -static void SyntaxError(); -void Exit(); - -static int NumScreens; /* number of screens found */ - -PixmapFormatRec formats[] = { - 1, 1, BITMAP_SCANLINE_PAD, /* 1-bit deep for all */ - 8, 8, BITMAP_SCANLINE_PAD, /* 8-bit deep for most color displays */ - 24, 32, BITMAP_SCANLINE_PAD, /* 24-bit deep display */ -}; -#define NUMFORMATS (sizeof formats)/(sizeof formats[0]) -#define NUM_DEPTHS 16 - -static hpPrivPtr AllocateDataStructures(); - -int LineNumber = 1; - - -/* - * parameters defining the reserved word return values - */ -#define DEPTH 1 -#define DRIVERNAME 2 -#define DOUBLEBUFFER 3 -#define MONITORSIZE 4 - -/* - * parameters defining the return status from GetToken(). - */ -#define END_OF_LINE 1 -#define ID 2 -#define INTEGER 3 -#define RESERVED_WORD 4 - -/* - * reserved word table for parsing X*screens file - */ -static struct token { - char name[16]; - int rvalue; -} tks [] = { - "depth", DEPTH, - "drivername", DRIVERNAME, - "doublebuffer", DOUBLEBUFFER, - "monitorsize", MONITORSIZE, - "", NULL, -}; - -/************************************************************ - * InitOutput -- - * This routine is called from main() during the server - * startup initialization, and when the server is to be reset. - * The routine does the device dependent initialization for - * all of the screens this server is configured to support. - * - * Results: - * The array of ScreenRec pointers referenced by - * pScreenInfo->screen are allocated and initialized. - * The X*screens file is parsed and checked for - * validity with reference to the particular screen - * hardware. - * - ************************************************************/ - -extern int hpActiveScreen; /* active screen ndx (Zaphod), in x_hil.c */ - -Bool (*ddx_driver_info())(); -Bool (*ddxScreenInitPointer[MAXSCREENS])(); - -void -InitOutput(pScreenInfo, argc, argv) - ScreenInfo *pScreenInfo; - int argc; - char **argv; -{ - int i; - - static int firstTime = 1; - - /* Reset some cursor stuff to avoid massive confusion at server - * reset time. - */ - hpActiveScreen = 0; - hpBlottoCursors(); - - FirstTimeInitialization( pScreenInfo, argc, argv); - - /************************* - Set up signal handling - **/ - OsSignal (SIGPIPE, SIG_IGN); - OsSignal (SIGHUP, AutoResetServer); - OsSignal (SIGINT, GiveUp); - OsSignal (SIGTERM, GiveUp); -} - -hpPrivPtr hpPrivates[MAXSCREENS]; -int hpNumScreens; - -/************************************************************ - * FirstTimeInitialization - * - * This routine handles the first time initialization - * duties. - * - ************************************************************/ - -static void -FirstTimeInitialization( pScreenInfo, argc, argv) -ScreenInfo *pScreenInfo; -int argc; -char **argv; -{ - int i; - - ParseXnScreensFile( pScreenInfo ); - - /* - * Add check of device independent screen conditions -kam 9/13 - */ - - if(hpNumScreens > MAXSCREENS) - { - ErrorF("Number of screens requested exceeds allowable limit of %d screens.\n", MAXSCREENS); - ErrorF("Please reduce the number of requested screens in your "); - ErrorF("'%s/X%sscreens' file.\n", LIBDIR, display); - ErrorF("Server exiting...\n"); - Exit(UNABLE_TO_INITIALIZE_THE_DISPLAY); - } - - for(i = 0; i < hpNumScreens; i++) - { - ddxScreenInitPointer[i] = ddx_driver_info(hpPrivates[i]); - } - - - pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; - pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; - pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; - pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; - pScreenInfo->numPixmapFormats = NUMFORMATS; - - - - for ( i = 0; i < NUMFORMATS; i++) - { - pScreenInfo->formats[i] = formats[i]; - } - - /* - * call the AddScreen function in dix/main.c - * This routine will fiddle with the pixmap formats, and - * then call ngleScreenInit to initialize the screen. - * - * WARNING: AddScreen has a bogosity(!) in that it uses the - * value of pScreenInfo.numScreens to determine which - * &pScreenInfo.screen[ i ] to pass to ngleScreenInit. - * Therefore the value of pScreenInfo.numScreens is manipulated - * here as a work around. ( Do we really HAVE TO call AddScreen? ). - */ - - do - { - if (-1 == AddScreen(ddxScreenInitPointer[pScreenInfo->numScreens], - argc,argv)) - FatalError("Could not add screen.\n"); - - } while ( pScreenInfo->numScreens != hpNumScreens ); - - return; -} - - -/************************************************************ - * ParseXnscreensFile - * - * This routine parses the X*screens file. - * where * refers to the display number of this server. - * - * 1) If no X*screens file exists, just set up the defaults - * and return. - * 2) Each non-comment line in the X*screens file gives a - * definition for a screen. - * - * - ************************************************************/ - -static void -ParseXnScreensFile( pScreenInfo ) -ScreenInfo * pScreenInfo; -{ - int fd; - int i; - char filename[MAX_PATH_NAME]; - FILE *str; - int status; - hpPrivPtr phpPriv; - int index; - - hpNumScreens = 0; - - phpPriv = AllocateDataStructures(); - hpPrivates[hpNumScreens] = phpPriv; - - sprintf( filename, "%s/X%sscreens", LIBDIR, display ); - str = fopen( filename, "r"); - if (str == NULL) FatalError("Cannot open the %s file.\n", filename); - - status = ParseNextScreen( phpPriv, filename, str ); - /* - * if status is -1, then the ParseNextScreen routine - * could not find ANY useful information in the - * Xnscreens file, so just setup the default - */ - if ( status == -1 ) - FatalError( - "No valid information exists in your %s/Xnscreens file.\n", LIBDIR); - /* - * - */ - for (;;) - { - phpPriv = AllocateDataStructures (); - hpNumScreens++; - status = ParseNextScreen( phpPriv, filename, str ); - /* - * status of 1 indicates end of file. - */ - if ( ( status == 1 ) || ( status == -1 ) ) - { - Xfree(phpPriv); - break; - } - hpPrivates[hpNumScreens] = phpPriv; - } - - fclose( str ); -} - -/************************************************************ - * ParseNextScreen - * - * This routine is responsible for parsing one line of the - * X*screens file. It loops until it can return valid - * information from one line of the X*screens file, or - * until EOF is encountered. The actual parsing of a - * line in the file is performed here. If a syntax error - * is encountered, the routine throws away the line, and - * tries to parse the next line. - * - * RETURNED VALUES: 0 if valid value filled out in *pScrPriv - * 1 if EOF encountered - * -1 if no valid entries (at all) found - * - * EXTERNAL VARIABLES: - * display - set in main.c, points to string giving - * display number for this server. - ************************************************************/ - -static -ParseNextScreen( phpPriv, filename, str ) -hpPrivPtr phpPriv; -char * filename; -FILE * str; -{ - int i; - int status; - char string[MAX_PATH_NAME]; - int Error = 0; - - /* - * loop until we get a valid screen line, or until - * EOF is seen. - */ - while ( 1 ) - { - ResetFields( phpPriv ); - /* - * first field must be a "/dev/crt" type field. - * read until we get an IDENTIFIER - */ - for (;;) - { - status = GetToken( str, filename, &i, string, MAX_PATH_NAME ); - if (status == -1 ) - return( -1 ); - if ( status != ID ) - { - if ( status == END_OF_LINE ) - continue; - else - { - SyntaxError( str, filename ); - Error = 1; - } - } - break; - } - if ( Error ) - { - Error = 0; - continue; - } - /* - * Hokay, we have an IDENTIFIER. This *should* - * be a device, however it is not checked for validity - * here. - */ - - strncpy( phpPriv->StandardDevice, string, MAX_PATH_NAME ); - phpPriv->LineNumber = LineNumber; - /* - * now parse for reserved words until we see an - * IDENTIFIER or END_OF_LINE - */ - while ( 1 ) - { - status = GetToken( str, filename, &i, string, MAX_PATH_NAME ); - switch( status ) - { - case -1: - return( 1 ); - case END_OF_LINE: - return( 0 ); - break; - - case RESERVED_WORD: - switch( i ) - { - case MONITORSIZE: - if ( GetANumber( str, filename, &i ) == -1 ) - { - Error = 1; - break; - } - phpPriv->MonitorDiagonal = i; - break; - case DEPTH: - if ( GetANumber (str, filename, &i ) == -1 ) - { - Error = 1; - break; - } - phpPriv->depth = i; - break; - } - /* - * end of switch on result from GetToken - */ - break; - - default: - FatalError( "An error occurred while processing %s/X*screens.", - LIBDIR); - } - if ( Error ) - break; - } - /* - * OK, now we either have satisfactorily parsed - * the primary screen device AND we have a valid secondary - * screen device, OR we have an error. - */ - if ( Error ) - { - Error = 0; - continue; - } - } -} - -/************************************************************ - * AllocateDataStructures - * - * Allocate the hp private data structures - ************************************************************/ - -static hpPrivPtr -AllocateDataStructures() -{ - hpPrivPtr phpPriv; - - phpPriv = (hpPrivPtr) Xcalloc( sizeof( hpPriv )); - - if ( phpPriv == NULL ) - { - FatalError("Cannot allocate enough memory for internal use--sorry"); - } - - return( phpPriv ); -} - -/************************************************************ - * GetANumber - * - ************************************************************/ - -int -GetANumber( str, filename, pInt ) -FILE * str; -char * filename; -int * pInt; -{ - int status; - int i; - char string[MAX_PATH_NAME]; - - status = GetToken( str, filename, &i, string, MAX_PATH_NAME ); - if (status == -1 ) - { - SyntaxError( str, filename ); - return( -1 ); /* kam 9/13 */ - } - if ( status != INTEGER ) - { - SyntaxError( str, filename ); - return( -1 ); /* kam 9/13 */ - } - *pInt = i; - return( 0 ); -} - -/************************************************************ - * GetToken - * This routine scans the X*screens file as given - * by fd for the next token. - * - * RETURNED VALUES: - * INTEGER if an integer is seen - * ID if an identifier is seen - * STRING if a device pathname is seen - * -1 if EOF is seen - * - * strptr used to fill pathname when STRING returned - * iptr used to fill id number when ID returned - * iptr used to fill integer when INTEGER returned - * - * - ************************************************************/ -int -GetToken( FileStream, FileName, iptr, strptr, MaxStrLen ) -FILE * FileStream; -char * FileName; -int * iptr; -char * strptr; -int MaxStrLen; -{ - char c; - int i; - char nextid[MAX_PATH_NAME]; - struct token *t; - char *cp; - - for (;;) { - c = yygetc( FileStream ); - if (c == '\n') - return( END_OF_LINE ); - if ( isspace( c )) - continue; - if (c == EOF) - return(-1); - if (isdigit(c)) - { - i = 1; - nextid[0] = c; - while ( isdigit( c = yygetc( FileStream ) ) - || ( c == 'x') || (c == 'X' )) - nextid[i++] = c; - nextid[i] = 0; - *iptr = atoi( nextid ); - ungetc( c, FileStream ); - if ( c == '\n' ) - LineNumber--; - return( INTEGER ); - } - else if ( ! isspace ( c )) - { - nextid[0] = c; - for (i = 1; i < MaxStrLen; i++) - { - if ( !isspace( c = yygetc( FileStream ))) - { - nextid[i] = c; - } - else - { - ungetc(c, FileStream); - if ( c == '\n' ) - LineNumber--; - nextid[i] = 0; - /* - * search for the identifier - * in the reserved word table. - */ - for (t = tks; t->rvalue; t++) - { - if ( strcmp(nextid, t->name) == 0 ) { - *iptr = t->rvalue; - return( RESERVED_WORD ); - } - } - strncpy( strptr, nextid, MaxStrLen ); - return( ID ); - } - } - /* - * error, string is too long - */ -ErrorF( "String is too long in file %s on line %d. Ignoring the line...\n", - FileName, LineNumber ); - ReadToNextWhiteSpace( FileStream); - return( GetToken( FileStream, FileName, iptr, strptr, MaxStrLen )); - - } - else - { -ErrorF( "Syntax error in file %s on line %d. Ignoring the line...\n", - FileName, LineNumber ); - ReadToNextWhiteSpace( FileStream); - return( GetToken( FileStream, FileName, iptr, strptr, MaxStrLen )); - } - } -} -/************************************************************ - * ResetFields - * This routine clears out fields in the hpPriv structure. - * This makes sure that any previous settings are cleared if we hit - * a syntax error. - * - ************************************************************/ - -static void -ResetFields( phpPriv ) -hpPrivPtr phpPriv; -{ - phpPriv->StandardDevice[0] = 0; - phpPriv->StandardDriver[0] = 0; - phpPriv->StandardNumDepths = 0; - phpPriv->StandardDoubleBuffer = 0; - phpPriv->StandardDoubleBufferDepth = 0; - - phpPriv->MonitorDiagonal = 0; - phpPriv->depth = 8; - -} -/************************************************************ - * SyntaxError - * This routine reports a syntax error regarding the - * X*screens file, and then skips over the rest of the - * current line. - * - ************************************************************/ - -static void -SyntaxError( FileStream, filename ) -FILE * FileStream; -char * filename; -{ - int i; - char Dummy[MAX_PATH_NAME]; - int status; - - ErrorF( "Syntax error in file %s on line %d. Ignoring the line...\n", - filename, LineNumber ); - do { - status = GetToken( FileStream, filename, &i, Dummy, MAX_PATH_NAME ); - if ( status == -1 ) - return; - } while ( status != END_OF_LINE ); -} - -/************************************************************ - * ReadToNextWhiteSpace - * This routine reads characters from the Xnscreens file - * until the next whitespace character is reached. - * Retain an end of line for parsing purposes if one - * is encounterd. - * - ************************************************************/ - -static void -ReadToNextWhiteSpace( FileStream ) -FILE * FileStream; -{ - char c; - - while (( c = yygetc( FileStream )) != EOF ) - { - if ( (c == ' ' ) || ( c == '\t') ) - return; - if ( c == '\n' ) - { - ungetc(c, FileStream); - LineNumber--; - return; - } - } -} - -/************************************************************ - * yygetc - * This routine reads characters from the Xnscreens file. - * The routine skips over comments ( begin with a # and go to - * the end of the line ). - * - * RETURNED VALUES: returns the next character in the file. - * - * SIDE EFFECTS: LineNumber is updated - ************************************************************/ -static char -yygetc( FileStream ) -FILE *FileStream; -{ - char c; - - if ((c = fgetc( FileStream )) == EOF) - return((char)EOF); - if (c == '\n') { - LineNumber++; - return(c); - } - else if ( c == '#' ) - { - while ( c == '#' ) - { - while (( c = fgetc( FileStream )) != EOF) - { - if (c != '\n') - continue; - else - { - LineNumber++; - return( c ); - } - } - } - } - return(c); -} - -/**************************************** -* ddxUseMsg() -* -* Called my usemsg from os/utils/c -* -*****************************************/ - -void ddxUseMsg() -{ - /* Right now, let's just do nothing */ -} - -void Exit (code) - int code; -{ - exit (code); -} - -void AbortDDX () -{ -} - -/***************************************************** - The main exit point for the server. - - throws us here when the user [Shift][CTRL][Reset]s. - - also come here upon kill -1 or kill -2 to the server -***/ -void ddxGiveUp() /* Called by GiveUp() */ -{ - /* soft reset the ITE by writing ESC-g to standard error */ - write(2, "\033g", 2); -} - -int -ddxProcessArgument (argc, argv, i) - int argc; - char *argv[]; - int i; - -{ - return(0); -} - - -/************************************************************** - * - * ErrorLine(phpPriv) - * - * This routine prints out a message that an error occurred on a - * particular line in the Xnscreens file. It does not print the - * error message, just the line number and the screen file name. - * - * Parameters: - * - * A pointer to an hpPrivRec - * - * Return Value: - * None. - * - ***************************************************************/ - -void -ErrorLine(phpPriv) - -hpPrivPtr phpPriv; - -{ - - ErrorF("Error in line %d of your %s/X%sscreens file.\n", - phpPriv->LineNumber, LIBDIR, display); - return; - -} - -#ifdef DPMSExtension -/************************************************************** - * DPMSSet(), DPMSGet(), DPMSSupported() - * - * stubs - * - ***************************************************************/ - -void DPMSSet (level) - int level; -{ -} - -int DPMSGet (level) - int* level; -{ - return -1; -} - -Bool DPMSSupported () -{ - return FALSE; -} -#endif Index: xc/programs/Xserver/hw/hp/include/XHPproto.h diff -u xc/programs/Xserver/hw/hp/include/XHPproto.h:1.1.1.3 xc/programs/Xserver/hw/hp/include/XHPproto.h:removed --- xc/programs/Xserver/hw/hp/include/XHPproto.h:1.1.1.3 Tue Jan 16 17:42:57 2001 +++ xc/programs/Xserver/hw/hp/include/XHPproto.h Thu Feb 27 12:29:23 2003 @@ -1,216 +0,0 @@ -/* $Xorg: XHPproto.h,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - - HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - - *************************************************************************/ -#ifndef XHPPROTO_H -#define XHPPROTO_H - -/* Definitions for HP extensions used by the server and C bindings*/ - -#ifndef XMD_H -#include "Xmd.h" -#endif - -/* detailed device information */ - -#define NO_DEVICE 0x00 -#define HP_ITF_KBD 0x01 -#define PC101_KBD 0x02 -#define IBM3270_KBD 0x03 -#define LK201_KBD 0x04 -#define LK401_KBD 0x05 -#define UNIX_KBD 0x06 -#define SUN3_KBD 0x07 -#define SUN4_KBD 0x08 - -#define HP_HIL 0x40 -#define PS2 0x80 -#define SERIAL 0xC0 - -#define ALLWINDOWS -1 - -#define STDEVENTS -1 -#define EXTEVENTS 0 -#define CORE_EVENTS 64 - -#define REPEAT_30 0 -#define REPEAT_60 1 - -#define OFF (0L << 0) -#define ON (1L << 0) -#define RELATIVE (0L << 1) -#define ABSOLUTE (1L << 1) -#define SYSTEM_EVENTS (0L << 2) -#define DEVICE_EVENTS (1L << 2) - -/* HP devices */ - -#define XPOINTER 0 -#define XKEYBOARD 1 -#define XOTHER 2 - -#define NUM_DEV_TYPES 19 - -#if defined(__hp9000s300) || defined(__hp9000s700) -#define MAX_POSITIONS 7 -#define MAX_LOGICAL_DEVS 9 -#else -#define MAX_POSITIONS 28 -#define MAX_LOGICAL_DEVS 30 -#endif - -#define NULL_DEVICE 0 -#define MOUSE 1 -#define TABLET 2 -#define KEYBOARD 3 -#define QUADRATURE 4 -#define TOUCHSCREEN 5 -#define TOUCHPAD 6 -#define BUTTONBOX 7 -#define BARCODE 8 -#define ONE_KNOB 9 -#define TRACKBALL 10 -#define KEYPAD 11 -#define NINE_KNOB 12 -#define ID_MODULE 13 -#define VCD_8_DIALBOX 14 -#define MMII_1812_TABLET 15 -#define SS_SPACEBALL 16 -#define APOLLO_LPFK 17 -#define MMII_1201_TABLET 18 - -#define DVKeyClickPercent (1L<<0) -#define DVBellPercent (1L<<1) -#define DVBellPitch (1L<<2) -#define DVBellDuration (1L<<3) -#define DVLed (1L<<4) -#define DVLedMode (1L<<5) -#define DVKey (1L<<6) -#define DVAutoRepeatMode (1L<<7) -#define DVAccelNum (1L<<8) -#define DVAccelDenom (1L<<9) -#define DVThreshold (1L<<10) - -/* - * Display modes, needed by both server and clients. - * - * - */ - -#define OVERLAY_MODE 0x1 -#define IMAGE_MODE 0x2 -#define STACKED_MODE 0x3 -#define STACKED_MODE_FIRST_SCREEN 0x3 -#define STACKED_MODE_SECOND_SCREEN 0x33 -#define COMBINED_MODE 0x4 - -#define XHPOVERLAY_MODE OVERLAY_MODE -#define XHPIMAGE_MODE IMAGE_MODE -#define XHPSTACKED_SCREENS_MODE STACKED_MODE -#define XHPCOMBINED_MODE COMBINED_MODE - -/* - * Server exit error codes - * - */ -#define NORMAL_TERMINATION 0 -#define UNABLE_TO_INITIALIZE_THE_DISPLAY 1 -#define INCORRECT_SB_DISPLAY_ADDR_ENVIRONMENT_VAR 2 -#define INCORRECT_GRM_SIZE_ENVIRONMENT_VAR 3 -#define UNABLE_TO_STARTUP_OR_CONNECT_TO_THE_GRM 4 -#define DISPLAY_TYPE_UNKNOWN_TO_SERVER 5 -#define DOUBLE_BUFFERING_NOT_SUPPORTED 6 -#define DOUBLE_BUFFERING_HARDWARE_NOT_PRESENT 7 -#define CANNOT_SUPPORT_DEPTHS_OPTION_ON_THIS_DISPLAY 8 -#define UNSUPPORTED_DEPTH_SPECIFIED 9 -#define HARDWARE_AT_THIS_DEPTH_NOT_PRESENT 10 -#define DUPLICATE_DEVICE_ENTRY_IN_FILE 11 -#define CANNOT_GET_DRIVER_INFO 12 -#define COMBINED_MODE_NOT_STACKED_SCREENS_MODE 13 -#define TWO_TIMES_COMBINED_MODE 14 -#define SECONDARY_DIFFERENT_FROM_PRIMARY 15 - - - /* Vendor Release Numbering scheme. - * The new scheme is needed so that clients can better tell what - * server they are running against. - * Format of the Vendor Release Number: - * aabbppp - * aa : MIT release. Currently 5: Release 5 of X11 - * bb : An HP major release number. Increments at each major - * release of the server. - * ppp: Server patch level. Starts at 0, increments every - * release of a patched server. - * - * Numbers to update and when: - * VR_MIT_RELEASE : For example, X11 R5, this number is 5. - * VR_HP_RELEASE : What we used to use for Vendor Release - * Numbers. When a "new" server is release, increment - * this number, create a new constant that can be used by - * libraries and zero out HP_PATCH_LEVEL. - * VR_HP_PATCH_LEVEL : When a patch server is released, increment - * this number and leave the others the same. - * - * Notes: - * It is important that HP_VENDOR_RELEASE_NUMBER always increase - * when it changes. - */ - - - /* Server major release numbers: */ -#define NEXTTRACK_SERVER 0 /* HP-UX 6.2 */ -#define MERGE_SERVER 1 /* HP-UX 6.5 */ -#define REL_70_SERVER 2 /* HP-UX 7.0 */ -#define REL_701_SERVER 3 /* HP-UX 7.05 */ -#define REL_80_SERVER 4 /* HP-UX 8.0 */ -#define REL_807_SERVER 5 /* HP-UX 8.07 (IF2) */ -#define REL_90_SERVER 6 /* HP-UX 9.0 R5 */ -#define REL_903_SERVER 7 /* HP-UX 9.03 R5 */ -#define REL_905_SERVER 8 /* HP-UX 9.05 R5 */ -#define REL_100_SERVER 9 /* HP-UX 10.0 R5 */ - - -#define VR_MIT_RELEASE 5 -#ifdef hpV4 -#define VR_HP_RELEASE REL_100_SERVER -#else -#define VR_HP_RELEASE REL_905_SERVER -#endif /* hpV4 */ -#define VR_HP_PATCH_LEVEL 0 - -#define HP_VRN(mit_release, hp_release, hp_patch_level) \ - ( (mit_release * 100000) + (hp_release * 1000) + (hp_patch_level) ) - -#define HP_VENDOR_RELEASE_NUMBER \ - HP_VRN(VR_MIT_RELEASE, VR_HP_RELEASE, VR_HP_PATCH_LEVEL) - - - /* And now, some constants that can be used by libraries to check - * the release (for example, with a call to CheckHpExtInit()): - * Note: - * From here (9.0) on out, you (library writers) should be using - * these constants. - */ -#define VREL_90_SERVER HP_VRN(5, REL_90_SERVER, 0) /* HP-UX 9.0 R5 */ -#define VREL_903_SERVER HP_VRN(5, REL_903_SERVER, 0) /* HP-UX 9.03 R5 */ - -#endif Index: xc/programs/Xserver/hw/hp/include/hppriv.h diff -u xc/programs/Xserver/hw/hp/include/hppriv.h:1.2 xc/programs/Xserver/hw/hp/include/hppriv.h:removed --- xc/programs/Xserver/hw/hp/include/hppriv.h:1.2 Fri Dec 14 14:59:39 2001 +++ xc/programs/Xserver/hw/hp/include/hppriv.h Thu Feb 27 12:29:23 2003 @@ -1,115 +0,0 @@ -/* $Xorg: hppriv.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * - * RESTRICTED RIGHTS LEGEND - * Use, duplication, or disclosure by the U.S. Government is subject to - * restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in - * Technical Data and Computer Software clause in DFARS 252.227-7013. - * - * Hewlett-Packard Company - * 3000 Hanover Street - * Palo Alto, CA 94304 U.S.A. - * - * Rights for non-DOD U.S. Government Departments and Agencies are as set - * forth in FAR 52.227-19(c)(1,2). - * - *************************************************************************/ - -/* - -Copyright 1987, 1988, 1998 The Open Group - -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. - -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. - - -Copyright 1988 by Hewlett-Packard Company -Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, - Massachusetts - -Permission to use, copy, modify, and distribute this software -and its documentation for any purpose and without fee is hereby -granted, 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 names of -Hewlett-Packard or Digital not be used in advertising or -publicity pertaining to distribution of the software without specific, -written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -*/ - - -/* - * Number of depths that we can possible have on our hardware per - * screen in the foreseeable future - */ - -#ifndef MAX_PATH_NAME -#define MAX_PATH_NAME 256 -#endif /* MAX_PATH_NAME */ - -#define MAX_DRIVER_NAME 32 -#define MAX_DEPTHS 16 - - -/* private field for XOS displays */ -typedef struct _hpPriv { - - /* Start up information from X*screens file */ - char StandardDevice[MAX_PATH_NAME]; - char StandardDriver[MAX_DRIVER_NAME]; - int StandardFd; - int StandardNumDepths; - int StandardDepths[ MAX_DEPTHS ]; - Bool StandardDoubleBuffer; - int StandardDoubleBufferDepth; - int LineNumber; - int MonitorDiagonal; /* in units of .001 inches */ - int depth; /* Device depth. Defaults to 8, */ - /* can be set via Xnscreens file */ - - /* Hooks for the input driver to communicate with the output driver */ - void (*MoveMouse)(); - void (*CursorOff)(); - void (*ChangeScreen)(); - Bool isSaved; -} hpPriv; - -typedef hpPriv *hpPrivPtr; Index: xc/programs/Xserver/hw/hp/input/Imakefile diff -u xc/programs/Xserver/hw/hp/input/Imakefile:1.1.1.5 xc/programs/Xserver/hw/hp/input/Imakefile:removed --- xc/programs/Xserver/hw/hp/input/Imakefile:1.1.1.5 Tue Jan 16 17:42:58 2001 +++ xc/programs/Xserver/hw/hp/input/Imakefile Thu Feb 27 12:29:23 2003 @@ -1,69 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ -#include <Server.tmpl> - -#define IHaveSubdirs - -SUBDIRS=drivers - -SRCS1 = \ - hpKeyMap.c \ - x_hil.c \ - x_hilinit.c \ - xtest1imp.c \ - getkeysym.c - - -SRCS2 = \ - cr16.s \ - get_tv.c - - -NONHILOBJS = \ - hpKeyMap.o \ - xtest1imp.o \ - getkeysym.o - - -NONHILOBJS2 = \ - cr16.o \ - get_tv.o - - -SRCS = $(SRCS1) $(SRCS2) - - -HILOBJS = \ - x_hil.o \ - x_hilinit.o - -OBJS = $(NONHILOBJS) $(NONHILOBJS2) $(HILOBJS) - -LOBJS = \ - hpKeyMap.ln \ - x_hil.ln \ - x_hilinit.ln \ - xtest1imp.ln \ - getkeysym.ln - - DEFINES = ExtensionOSDefines -DOSMAJORVERSION=OSMajorVersion - LIB_DEFINES = -DLIBDIR=\"$(LIBDIR)\" - INCLUDES = -I. -I.. -I../include -I../../../include -I./X11 \ - -I../../../cfb -I../../../mfb -I../../../mi \ - -I$(XINCLUDESRC) -I$(EXTINCSRC) -I./drivers - LINTLIBS = ../../../dix/llib-ldix.ln ../../../os/hpux/llib-los.ln - -all:: - -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) - -NormalLibraryObjectRule() -NormalLibraryTarget(hp,$(OBJS)) - -SpecialCObjectRule(x_hilinit,$(ICONFIGFILES),$(LIB_DEFINES)) -SpecialCObjectRule(x_hil,$(ICONFIGFILES),$(LIB_DEFINES)) -SpecialCObjectRule(getkeysym,$(ICONFIGFILES),$(LIB_DEFINES)) -DependTarget() - -LintLibraryTarget(hp,$(SRCS1)) -NormalLintTarget($(SRCS1)) Index: xc/programs/Xserver/hw/hp/input/cr16.s diff -u xc/programs/Xserver/hw/hp/input/cr16.s:3.1 xc/programs/Xserver/hw/hp/input/cr16.s:removed --- xc/programs/Xserver/hw/hp/input/cr16.s:3.1 Wed Jan 17 17:36:47 2001 +++ xc/programs/Xserver/hw/hp/input/cr16.s Thu Feb 27 12:29:23 2003 @@ -1,12 +0,0 @@ -; $Xorg: cr16.s,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ - .SPACE $TEXT$ - .SUBSPA $CODE$ - .export cr16 - .PROC - .CALLINFO - .ENTRY -cr16 - bv (%rp) - mfctl 16,%ret0 - .EXIT - .PROCEND Index: xc/programs/Xserver/hw/hp/input/get_tv.c diff -u xc/programs/Xserver/hw/hp/input/get_tv.c:1.1.1.2 xc/programs/Xserver/hw/hp/input/get_tv.c:removed --- xc/programs/Xserver/hw/hp/input/get_tv.c:1.1.1.2 Tue Jan 16 17:42:59 2001 +++ xc/programs/Xserver/hw/hp/input/get_tv.c Thu Feb 27 12:29:23 2003 @@ -1,199 +0,0 @@ -/* $Xorg: get_tv.c,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ - -/* - -Copyright (c) 1986, 1987 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -/* - * An alternative to gettimeofday(2) that is about 50 times faster - * if used frequently. HP-PA specific. - * Dave Holt, GSY Performance, dah@cup.hp.com - */ - -#include <time.h> -#include <assert.h> - -#ifdef NOTDEFINED /* The following is not currently used. But - * I will leave it for possible future use. - * --kam 4/22/92 - */ - -#ifdef DEBUG -#include <stdio.h> -#else /* Not DEBUG. Don't bother with printf's. */ -#define printf(s, a) -#endif /* DEBUG */ - -#define MILLION 1000000 -#define BUNCH 8192 /* must be < 32767 */ - -unsigned int cr16(); /* in cr16.s (assembly code) */ -static struct timeval slow_get_tv(); -void *malloc(); -static set_tix2usec(); - -/* This initial value for last_tv forces initialization of tix2usec[]. */ -static struct timeval last_tv = {0, 2000000}; -static unsigned int last_tix; - -/* - * tix2usec[BUNCH] is a table built by set_tix2usec() which converts - * from CR16 ticks to microseconds: - * microseconds = tix2usec[ticks >> shift] - */ -static unsigned short *tix2usec; -static int shift; - -struct timeval get_tv() /* the fast path */ -{ - unsigned int tix, delta_tix; - long delta_usec; - - tix = cr16(); - delta_tix = tix - last_tix; - last_tix = tix; - if (delta_tix < BUNCH) { /* we can use the array */ - delta_usec = tix2usec[delta_tix >> shift]; - last_tv.tv_usec += delta_usec; - if (last_tv.tv_usec < MILLION) { - return(last_tv); - } - } - return(slow_get_tv()); -} - -static struct timeval slow_get_tv() /* the slow path */ -{ - struct timezone tz; - static int first_time = 1; - - if (first_time) { - set_tix2usec(); - first_time = 0; - } - last_tix = cr16(); - gettimeofday(&last_tv, &tz); - return(last_tv); -} - -/* - * set_tix2usec() builds it by observing gettimeofday and CR16 over a - * reasonable period (~50ms). - */ -static set_tix2usec() -{ - struct timeval tv1, tv2; - struct timezone tz; - int i, tix_per_entry, delta_us; - unsigned int tix1, tix2, cr16(), delta_tix; - double tix_per_usec, usec_per_tix; - - /* make sure the code is in memory before we time it */ - tix1 = cr16(); - gettimeofday(&tv1, &tz); - - do { - tix1 = cr16(); - gettimeofday(&tv1, &tz); - do { - tix2 = cr16(); - gettimeofday(&tv2, &tz); - delta_us = (tv2.tv_sec - tv1.tv_sec) * MILLION + - (tv2.tv_usec - tv1.tv_usec); - delta_tix = tix2 - tix1; - } while (delta_us < 50000); /* loop for at least 50ms */ - } while (tv2.tv_sec - tv1.tv_sec > 2); /* retry if delta is too big */ - - tix_per_usec = 1.0 * delta_tix / delta_us; - usec_per_tix = 1 / tix_per_usec; - - /* Table should convert at least 10ms deltas. */ - tix_per_entry = tix_per_usec * 10000 / BUNCH; - for (shift = 0; - (1 << shift) < tix_per_entry; - shift++) { - } - - tix2usec = (unsigned short *) malloc(BUNCH * sizeof(unsigned short)); - assert(tix2usec != NULL); - - for (i = 0; i < BUNCH; i++) { - tix2usec[i] = i * (1 << shift) * usec_per_tix; - } - - printf("tix_per_usec = %lf\n", tix_per_usec); - printf("shift = %d\n", shift); -} - -#endif /* NOTDEFINED */ - - -void -calibrate_cr16(TicksPerMilli) - -unsigned long *TicksPerMilli; - -{ - - struct timeval start, end; - register unsigned long cr_start, cr_end; - unsigned long total_ticks = 0, total_millis = 0; - int i, j; - - for(i = 0; i < 6; i++) - { - cr_start = cr16(); - gettimeofday(&start, NULL); - - /* waste some time */ - for(j=0; j< 200000; j++) - ; - cr_end = cr16(); - gettimeofday(&end, NULL); - - if(start.tv_usec > end.tv_usec) - { - end.tv_usec += 1000000; - end.tv_sec--; - } - - /* if we have a rollover during all of this, toss this one. */ - - if(cr_end < cr_start) - { - i--; - } - else - { - total_millis += (end.tv_sec - start.tv_sec) * 1000 + - (end.tv_usec - start.tv_usec) / 1000; - total_ticks += cr_end - cr_start; - } - } - - *TicksPerMilli = total_ticks/total_millis; - -} Index: xc/programs/Xserver/hw/hp/input/getkeysym.c diff -u xc/programs/Xserver/hw/hp/input/getkeysym.c:1.1.1.4 xc/programs/Xserver/hw/hp/input/getkeysym.c:removed --- xc/programs/Xserver/hw/hp/input/getkeysym.c:1.1.1.4 Tue Jan 16 17:43:00 2001 +++ xc/programs/Xserver/hw/hp/input/getkeysym.c Thu Feb 27 12:29:23 2003 @@ -1,428 +0,0 @@ -/* $Xorg: getkeysym.c,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ -/* - -Copyright (c) 1986, 1987 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -#ifndef LIBDIR -#if OSMAJORVERSION >= 10 -#define LIBDIR "/etc/X11" -#else -#define LIBDIR "/usr/lib/X11" -#endif -#endif - -#include <stdio.h> -#include <X11/XHPlib.h> - -/*#include <X11/keysym.h>*/ /* gets sucked in by XHPlib.h */ - -#define SUCCESS 0 - -extern char *malloc(); - -static FILE *keysym_file = NULL; -static int num_headers = 0; -static struct XHP_keymap_header *header_data = NULL; -static int read_kd_name_table(); -static int read_modmap_table(); - -#if 0 /* Not used any more */ - -/* GetKeySyms() gets a key sym table from a file. - * This routine was copied and modified from XHPSetKeyboardMapping() in - * lib/Xhp/XHPSetKbd.c. - - * The routine accepts two arguments: a keyboard id (specifying which - * keymap is to be loaded) and a pointer to a keysym array to be filled in. - * If the keyboard id is in the file, that keysym table is copied into the - * keysym array. Otherwise, an error is returned and nothing is copied. - - * The routine returns zero if it succeeds. Otherwise, it returns a - * non-zero value specifying the type of error that occurred. The - * keyboard ID value (-2) is a special value used to specify a non-HP - * keyboard. The keyboard ID value (-1) is used to identify HP keyboards - * that are not supported by X (i.e. Arabic, Hebrew, Turkish, ...). - - * The first time it is called, the routine opens the file - * "/usr/lib/X11/Xkeymaps", reading a header of the keysym tables it - * contains. The header contains a magic value for identification, and - * the ID, size, and offset of each keysym table in the file. - */ - -Status GetKeySyms(kbd_id, keysyms) - KEYBOARD_ID kbd_id; - KeySym *keysyms; -{ - char magic[MAGIC_SIZE]; - int header_size; - int index; - int n, return_code = SUCCESS; - char *name; - char filename[512]; - - /* If this is the first time this routine has been called, then open - * the keysym file, read the header, and verify the magic and read in - * the keysym table. - */ - - /* get the correct keymapfile name -- use environment variable if it is - * set else use default. If name starts with '/' it describes full path - * name, else it is relative to the default directory. - */ - - if ( ( name = (char *)getenv("XHPKEYMAPFILE") ) == NULL ) - name = DEF_FILENAME; - - if (name[0] != '/') - { - sprintf(filename, "%s/%s",LIBDIR,name); - } - else - strcpy(filename, name); - - if ((keysym_file = fopen(filename,"r")) == NULL) - return(XHPKB_NOKEYFILE); - - /* Read and verify the magic number */ - - fread(magic,MAGIC_SIZE,1,keysym_file); - if ((strcmp(magic,VERIFY_MAGIC)) != 0) - { return_code = XHPKB_BADMAGIC; goto done; } - - /* Next read in the header size - it is in the next 4 bytes. - * Then read in the header table, which is found in the next - * header-size bytes of the file. - */ - - fread(&header_size,4,1,keysym_file); - if (!(header_data = (struct XHP_keymap_header *)malloc(header_size))) - { return_code = XHPKB_NOMEM; goto done; } - fread(header_data,header_size,1,keysym_file); - - num_headers = header_size / sizeof(struct XHP_keymap_header); - - /* Verify that a valid keyboard ID has been passed in. While you're - * at it, position the header_data pointer to the correct record. - */ - - for (index = 0; index < num_headers; index++) - { - if (kbd_id == header_data[index].kbd) - break; - } - - if (index >= num_headers) /* It's an illegal keyboard ID */ - { return_code = XHPKB_BADKBID; goto done; } - - /* Copy the keysym table from the file into the keysyms array */ - - fseek(keysym_file, header_data[index].offset, 0); - fread((char *)keysyms, header_data[index].size, 1, keysym_file); - -done: - free((char *)header_data); - fclose(keysym_file); - return(return_code); -} -#endif - - - /* This next stuff supersedes the above stuff. It provides support for - * keydevice names and modmap names. - * Most of this code was taken from lib/Xhp/tools/cdkeymap.c (probably - * not called that anymore). - */ - -static char *kd_name_heap = NULL, *modmap_name_heap = NULL; -static int kd_names = 0, num_modmaps = 0, - num_keydevice_names = 0; -static HPKKeyDeviceInfo *keydevice_name_table = NULL; -static HPKModMap *modmap_table = NULL; - - - /* - * input: - * file_name: If not NULL, try and open "/usr/lib/X11/<file_name>". - * Notes: - * Sequence: - * if (!HPKsetup()) error_occured - * piddle with keymaps (other routines in here) - * HPKclean_up(); - * You MUST call HPKclean_up() after calling HPKsetup() (no matter - * what HPKclean_up() returns). It resets state variables. - */ -int HPKsetup(file_name) char *file_name; -{ - char magic[MAGIC_SIZE]; - int header_size; - char *name; - char filename[512]; - - /* If this is the first time this routine has been called, then open - * the keysym file, read the header, and verify the magic and read in - * the keysym table. - */ - - /* get the correct keymapfile name -- use environment variable if it is - * set else use default. If name starts with '/' it describes full path - * name, else it is relative to the default directory. - */ - if (file_name) name = file_name; - else - if (NULL == (name = (char *)getenv("XHPKEYMAPFILE"))) - name = DEF_FILENAME; - - if (name[0] != '/') - { - sprintf(filename, "%s/%s",LIBDIR,name); - } - else strcpy(filename, name); - - if (NULL == (keysym_file = fopen(filename,"r"))) - return False; - - /* Read and verify the magic number */ - - fread(magic,MAGIC_SIZE,1,keysym_file); - if ((strcmp(magic,VERIFY_MAGIC)) != 0) return False; - - /* Next read in the header size - it is in the next 4 bytes. - * Then read in the header table, which is found in the next - * header-size bytes of the file. - */ - - fread(&header_size,4,1,keysym_file); - if (!(header_data = (struct XHP_keymap_header *)malloc(header_size))) - return False; - fread(header_data,header_size,1,keysym_file); - - num_headers = header_size / sizeof(struct XHP_keymap_header); - - read_kd_name_table(); - read_modmap_table(); - - return True; -} - - -/* ******************************************************************** */ -/* ************************* Lookup Routines ************************** */ -/* ******************************************************************** */ - - - /* Returns: - * NULL : id not found - * ptr : pointer into the header table - */ -static struct XHP_keymap_header *HPKlookup_kd_id(kd_id) -{ - int n; - struct XHP_keymap_header *ptr; - - for (n = num_headers, ptr = header_data; n--; ptr++) - if (kd_id == ptr->kbd) return ptr; - - return NULL; -} - - /* Returns: - * NULL : id not found - * ptr : pointer into name table - */ -HPKKeyDeviceInfo *HPKlookup_kd_by_id(kd_id) -{ - int n; - HPKKeyDeviceInfo *ptr; - - for (n = num_keydevice_names, ptr = keydevice_name_table; n--; ptr++) - if (kd_id == ptr->keydevice_id) return ptr; - - return NULL; -} - - /* Returns: - * NULL : modmap not found - * ptr : pointer into name table - */ -HPKModMap *HPKlookup_modmap(modmap_name) char *modmap_name; -{ - int n; - HPKModMap *ptr; - - for (n = num_modmaps, ptr = modmap_table; n--; ptr++) - if (0 == strcmp(modmap_name, ptr->modmap_name)) return ptr; - - return NULL; -} - - /* Returns: - * NULL : id not found - * ptr : pointer into name table - */ -HPKKeyDeviceInfo *HPKlookup_kd_by_name(kd_name) char *kd_name; -{ - int n; - HPKKeyDeviceInfo *ptr; - - for (n = num_keydevice_names, ptr = keydevice_name_table; n--; ptr++) - if (0 == strcmp(kd_name, ptr->name)) return ptr; - - return NULL; -} - - -/* ******************************************************************** */ -/* *************************** Read Tables **************************** */ -/* ******************************************************************** */ - -static int read_kd_name_table() -{ - int a,b,c,d,e,f, n, z, kd_id; - HPKKeyDeviceInfo *kptr; - struct XHP_keymap_header *ptr; - - if (!(ptr = HPKlookup_kd_id(HPK_KEYDEVICE_NAME_TABLE_ID))) return False; - - fseek(keysym_file, ptr->offset, 0); - - fread((char *)&num_keydevice_names, sizeof(int), 1, keysym_file); - n = num_keydevice_names; - - fread((char *)&z, sizeof(int), 1, keysym_file); /* size of names table */ - - if (!(kd_name_heap = malloc(z)) || - !(keydevice_name_table = - (HPKKeyDeviceInfo *)malloc(n*sizeof(HPKKeyDeviceInfo)))) - { - num_keydevice_names = 0; - return False; - } - - fread(kd_name_heap, z, 1, keysym_file); /* read the names */ - - for (kptr = keydevice_name_table; n--; kptr++) /* read the name table */ - { - fread((char *)&a, sizeof(int), 1, keysym_file); /* kd name offset */ - fread((char *)&b, sizeof(int), 1, keysym_file); /* key device id */ - fread((char *)&c, sizeof(int), 1, keysym_file); /* modmap name offset */ - fread((char *)&d, sizeof(int), 1, keysym_file); /* min keycode */ - fread((char *)&e, sizeof(int), 1, keysym_file); /* max keycode */ - fread((char *)&f, sizeof(int), 1, keysym_file); /* columns */ - - kptr->name = kd_name_heap + a; - kptr->keydevice_id = b; - kptr->modmap_name = kd_name_heap + c; - kptr->min_keycode = d; - kptr->max_keycode = e; - kptr->columns = f; - } - - return True; -} - -static int read_modmap_table() -{ - int n, a, z; - HPKModMap *mptr; - struct XHP_keymap_header *ptr; - - if (!(ptr = HPKlookup_kd_id(HPK_MODMAP_TABLE_ID))) return False; - - fseek(keysym_file, ptr->offset, 0); - fread((char *)&num_modmaps, sizeof(int), 1, keysym_file); - - fread((char *)&z, sizeof(int), 1, keysym_file); /* name table size */ - - if (!(modmap_name_heap = malloc(z)) || - !(modmap_table = (HPKModMap *)malloc(num_modmaps*sizeof(HPKModMap)))) - - { - num_modmaps = 0; - return False; - } - - fread(modmap_name_heap, z,1, keysym_file); /* read the name table */ - - n = num_modmaps; - for (mptr = modmap_table; n--; mptr++) /* read & build the table */ - { - fread((char *)&a, sizeof(int), 1, keysym_file); /* modmap name offset */ - fread((char *)mptr->modmap, MODMAP_SIZE,1, keysym_file); /* modmap */ - - mptr->modmap_name = modmap_name_heap + a; - } - - return True; -} - - - /* Read a keytable. - * Input: - * kd_id: id of the keytable to read. - * keysyms: pointer to an area big enough to hold the keytable. - * Returns: - * TRUE: everything went as expected. - * FALSE: couldn't find id. - */ -int HPKread_keymap(kd_id, keysyms) KeySym *keysyms; -{ - struct XHP_keymap_header *ptr; - - if (!(ptr = HPKlookup_kd_id(kd_id))) return False; - - fseek(keysym_file, ptr->offset, 0); - - fread((char *)keysyms, ptr->size, 1, keysym_file); - - return True; -} - - -/* ******************************************************************** */ -/* ***************************** Clean Up ***************************** */ -/* ******************************************************************** */ - -void HPKclean_up() -{ - if (keysym_file) fclose(keysym_file); - keysym_file = NULL; - - if (header_data) free((char *)header_data); - header_data = NULL; - - if (kd_name_heap) free((char *)kd_name_heap); - kd_name_heap = NULL; - if (keydevice_name_table) free((char *)keydevice_name_table); - keydevice_name_table = NULL; - - if (modmap_name_heap) free((char *)modmap_name_heap); - modmap_name_heap = NULL; - if (modmap_table) free((char *)modmap_table); - modmap_table = NULL; - - - num_headers = kd_names = num_modmaps = num_keydevice_names = 0; -} Index: xc/programs/Xserver/hw/hp/input/hildef.h diff -u xc/programs/Xserver/hw/hp/input/hildef.h:1.2 xc/programs/Xserver/hw/hp/input/hildef.h:removed --- xc/programs/Xserver/hw/hp/input/hildef.h:1.2 Fri Dec 14 14:59:40 2001 +++ xc/programs/Xserver/hw/hp/input/hildef.h Thu Feb 27 12:29:23 2003 @@ -1,232 +0,0 @@ -#ifndef HILDEF_H -#define HILDEF_H -/* $Xorg: hildef.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ -/* - -Copyright 1988, 1998 The Open Group - -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. - -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. - - -Copyright 1988 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this software -and its documentation for any purpose and without fee is hereby -granted, 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 -Hewlett-Packard not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ -/* -** File: hildefs.h -** -** defines for hil devices to the X environment. -** -*/ - -#include "x_serialdrv.h" -#include "sys/param.h" -#include "X.h" -#include "scrnintstr.h" -#include "misc.h" -#include "dixstruct.h" - -/***************************************************************/ -/* KEEP THE FOLLOWING IN SYNC WITH THE DIX DEFINITION */ -/***************************************************************/ - -#define MAXNAMLEN 255 -#define READ_SIZ 2000 /* leave room for partial packets*/ -#define BUF_SIZ 2048 /* size of static buffer to use */ - -# define MAX_X_NAMELEN 64 -# define MAX_AXES 8 -# define ILLEGAL -1 -# define UP_MASK 1 << 0 -# define HIL_POLL_HDR_BITS 0xE3 -# define MOTION_MASK 0x0F -# define KEY_DATA_MASK 0x70 -# define SET1_KEY_MASK 1 << 6 -# define PROXIMITY_IN 0x8e -# define PROXIMITY_OUT 0x8f -# define BUTTON_BASE 0x80 -# define BUTTON_1_OFFSET 0x7e - - -#define VERTICAL 0 -#define HORIZONTAL 1 -#define MATRIX 2 - -#define NOWRAP 0 -#define WRAP 1 -#define DEFAULT 2 -#define SAMESCREEN 3 -#define CHANGE_BY_TWO 4 - -# define CHORDING_OFF 0 -# define CHORDING_ON 1 -# define CHORDING_DEFAULT 2 - -# define LATCHING_OFF 0 -# define LATCHING_ON 1 - -# define SCREEN_CHANGE_DEFAULT 255 - -# define IS_SERIAL_DEVICE 0x40 -# define OPEN_THIS_DEVICE 0x20 -# define SECOND_LOGICAL_DEVICE 0x10 -# define MERGED_DEVICE 0x08 - -# define DATA_SIZE_BITS 0x07 - -#define HIL_ABSOLUTE 0x40 /* Device has absolute positioning data */ -#define HIL_16_BITS 0x20 /* Device has position data 16 bit accuracy */ -#define HIL_IOB 0x10 /* Device has I/O description byte */ -#define HIL_NUM_AXES 0x03 /* Number of axes supported */ - -#define HAS_LEDS 0xf0 /* Device has leds */ -#define HILIOB_PAA 0x80 /* Device supports prompt and acknowledge */ -#define HILIOB_NPA 0x70 /* Number of prompts & acknowledges supported */ -#define HILIOB_PIO 0x08 /* Device supports Proximity In/Out */ -#define HILIOB_BUTTONS 0x07 /* Number of buttons on device */ - -#define HILPRH_KEYSET 0x60 /* Keycode set bits */ -#define HILPRH_KEYSET1 0x40 /* Keycode set 1 data */ - -#define NLOCK 3 -#define CAPSCODE 0x37 -#define KBSIZE 32 /* bytes to hold 256 bits (1 per key/button */ -#define ExpectUpKey(d,code) (d->kb_exp_up[code>>3] |= (1<<(code & 7))) -#define DontExpectUpKey(d,code) (d->kb_exp_up[code>>3] &= ~(1<<(code & 7))) -#define DeviceHasLeds(d) (d->iob & HILIOB_NPA) -#define KeyHasLed(dev,d,cd) ((dev->key->modifierMap[cd] & d->led[0]) || \ -(dev->key->modifierMap[cd] & d->led[1]) || \ -(dev->key->modifierMap[cd] & d->led[2]) || \ -(dev->key->modifierMap[cd] & d->led[3])) - -#define UpIsExpected(d,code) (d->kb_exp_up[code>>3] & (1<<(code & 7))) -#define KeyIsIgnored(d,code) (d->kb_ignore[code>>3] & (1<<(code & 7))) -#define IgnoreKey(d,code) (d->kb_ignore[code>>3] |= (1<<(code & 7))) -#define UnignoreKey(d,code) (d->kb_ignore[code>>3] &= ~(1<<(code & 7))) - -#define KeyDownEvent(ev) (ev->u.u.type==KeyPress | ev->u.u.type==DeviceKeyPress) -#define ButtonDownEvent(ev) (ev->u.u.type==ButtonPress | \ - ev->u.u.type==DeviceButtonPress) -#define KeyUpEvent(ev) (ev->u.u.type==KeyRelease | \ - ev->u.u.type==DeviceKeyRelease) - -#define ITF_KATAKANA 0xdd -#define ITF_JAPANESE 0xc2 -#define PS2_HIL_JIS 0xc1 -#define PS2_DIN_JIS "PS2_DIN_JIS" -#define IsLockKey(dev,code) (dev->key->modifierMap[code] & LockMask ? \ - LockMapIndex : 0) -#define IsMod2Key(dev,code) (dev->key->modifierMap[code] & Mod2Mask ? \ - Mod2MapIndex : 0) -#define IsJapaneseEnv(pHP) (pHP->id == ITF_KATAKANA || \ - pHP->id == ITF_JAPANESE || \ - pHP->id == PS2_HIL_JIS || \ - !strcmp(pHP->d.keymap_name, PS2_DIN_JIS)) - -#define IsToggleKey(dev,pHP,code) (IsLockKey(dev,code)) - -/* This is the Kana Lock solution that APPO initially wanted. -#define IsToggleKey(dev,pHP,code) (IsLockKey(dev,code) || \ - (IsJapaneseEnv(pHP) && IsMod2Key(dev,code))) -*/ - -#define KeyIsDown(dev, code) (dev->key && \ - (dev->key->down[code >> 3] & (1 << (code & 7)))) -#define KeyIsRepeating(dev, code) (dev->kbdfeed && \ - (dev->kbdfeed->ctrl.autoRepeats[code >> 3] & (1 << (code & 7)))) - -typedef struct _DeviceClients *DeviceClientsPtr; - -typedef struct _DeviceClients { - DeviceClientsPtr next; - ClientPtr client; /* which client wants this device */ - XID resource; /* id for putting into resource manager */ - int mode; - int count; /* # of open requests for this client */ -} DeviceClients; - -typedef struct _indevices { - u_char id; /* device HIL id */ - u_char iob; /* I/O descriptor Byte */ - float scaleX; /* Tablet scaling */ - float scaleY; /* Tablet scaling */ - DeviceClientsPtr clients; /* clients using device */ - ScreenPtr pScreen; /* Screen pointer is on */ - int coords[MAX_AXES];/* current coords of device */ - Atom x_atom; /* atom for x type */ - u_int button_state; /* device button state */ - int change_xmax; - int change_ymax; - int change_ymin; - int change_xmin; - short change_amt; - short id_detail; - u_char dev_type; /* HIL device type */ - u_char sent_button; /* flag for button sent */ - u_char ignoremask; /* for button emulation */ - u_char savebutton; /* saved button */ - char x_type; /* MOUSE or KEYBOARD */ - u_char mode; /* abs or rel movement */ - u_char use; /* device use */ - u_char pad2; /* reserved */ - u_char hpflags; /* hp-specific feature flags */ - u_char led[NLOCK+1]; - u_char kb_exp_up[KBSIZE]; - u_char kb_ignore[KBSIZE]; - char entry[MAX_NM]; - char driver_name[MAX_NM]; /* filled in by X server */ - int *dpmotionBuf; - int *dheadmotionBuf; - HPInputDeviceHeader d; - SerialProcs s; -} HPInputDevice; - - -struct dev_info { - unsigned int timestamp; - unsigned char poll_hdr; - unsigned char dev_data[36]; - HPInputDevice *hil_dev; -}; - -#endif Index: xc/programs/Xserver/hw/hp/input/hpKeyMap.c diff -u xc/programs/Xserver/hw/hp/input/hpKeyMap.c:3.4 xc/programs/Xserver/hw/hp/input/hpKeyMap.c:removed --- xc/programs/Xserver/hw/hp/input/hpKeyMap.c:3.4 Fri Dec 14 14:59:40 2001 +++ xc/programs/Xserver/hw/hp/input/hpKeyMap.c Thu Feb 27 12:29:23 2003 @@ -1,873 +0,0 @@ -/* $Xorg: hpKeyMap.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ -/* - -Copyright 1986, 1987, 1998 The Open Group - -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. - -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. - - -Copyright 1986, 1987 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett-Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -#include "Xmd.h" -#define XK_KATAKANA -#include "keysym.h" -#include "X.h" /* MUST come after above includes */ -#include "input.h" -#include "HPkeysym.h" -#include "ap_keysym.h" - -#include <XHPlib.h> /* for keymap ids */ - -#define MIN_KEYCODE 8 -/* This file was composed from the X10 hil_keymap.h by - * Jack Palevich, HP-Labs - */ - -static int try_and_load_maps(); - - /* A keymap filled with NoSymbol is all (1) columns. - * This will be used when the keyboard is unknown and is not in a - * reconized family. - * Notes: - * I know NoSymbol is 0 and won't ever change so I can sleeze and let - * the compiler initialize the table. - */ -static KeySym null_keymap[1 * 0x80]; - - -#if defined(__hpux) || defined(__hp_osf) -static KeySym USASCIIMap[4*0x82] = { - /* code values in comments at line end are actual value reported on HIL. - REMEMBER, there is an offset of MIN_KEYCODE+2 applied to this table! - The PS2 keyboard table begins at offset 0, the 46021A table begins with - the third row. */ - /* Extend Char Right -- a.k.a. Kanji? */ - XK_Control_R, NoSymbol, NoSymbol, NoSymbol, /* 0x00 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x01 */ - XK_Meta_R, NoSymbol, NoSymbol, NoSymbol, /* 0x02 */ - XK_Meta_L, NoSymbol, NoSymbol, NoSymbol, /* 0x03 */ - XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /* 0x4 */ - XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 0x5 */ - XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 0x6 */ - XK_Break, XK_Reset, NoSymbol, NoSymbol, /* 0x7 */ - XK_KP_4, NoSymbol, NoSymbol, NoSymbol, /* 0x8 */ - XK_KP_8, NoSymbol, NoSymbol, NoSymbol, /* 0x9 */ - XK_KP_5, NoSymbol, NoSymbol, NoSymbol, /* 0xa */ - XK_KP_9, NoSymbol, NoSymbol, NoSymbol, /* 0xb */ - XK_KP_6, NoSymbol, NoSymbol, NoSymbol, /* 0xc */ - XK_KP_7, NoSymbol, NoSymbol, NoSymbol, /* 0xd */ - XK_KP_Separator, NoSymbol, NoSymbol, NoSymbol, /* 0xe */ - XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 0xf */ - XK_KP_1, NoSymbol, NoSymbol, NoSymbol, /* 0x10 */ - XK_KP_Divide, NoSymbol, NoSymbol, NoSymbol, /* 0x11 */ - XK_KP_2, NoSymbol, NoSymbol, NoSymbol, /* 0x12 */ - XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /* 0x13 */ - XK_KP_3, NoSymbol, NoSymbol, NoSymbol, /* 0x14 */ - XK_KP_Multiply, NoSymbol, NoSymbol, NoSymbol, /* 0x15 */ - XK_KP_0, NoSymbol, NoSymbol, NoSymbol, /* 0x16 */ - XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 0x17 */ - XK_B, NoSymbol, XK_block, NoSymbol, /* 0x18 */ - XK_V, NoSymbol, XK_section, NoSymbol, /* 0x19 */ - XK_C, NoSymbol, XK_ccedilla, XK_Ccedilla, /* 0x1a */ - XK_X, NoSymbol, XK_scaron, XK_Scaron, /* 0x1b */ - XK_Z, NoSymbol, XK_paragraph, NoSymbol, /* 0x1c */ -/* Was Kanji Left.... */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x1d */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x1e */ - XK_Escape, XK_Delete, NoSymbol, NoSymbol, /* 0x1f */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x20 */ - XK_F10, XK_KP_F2, NoSymbol, NoSymbol, /* 0x21 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x22 */ - XK_F11, XK_KP_F3, NoSymbol, NoSymbol, /* 0x23 */ - XK_KP_Decimal, NoSymbol, NoSymbol, NoSymbol, /* 0x24 */ - XK_F9, XK_KP_F1, NoSymbol, NoSymbol, /* 0x25 */ - XK_KP_Tab, XK_KP_BackTab, NoSymbol, NoSymbol, /* 0x26 */ - XK_F12, XK_KP_F4, NoSymbol, NoSymbol, /* 0x27 */ - XK_H, NoSymbol, XK_yen, NoSymbol, /* 0x28 */ - XK_G, NoSymbol, XK_currency, NoSymbol, /* 0x29 */ - XK_F, NoSymbol, XK_guilder, NoSymbol, /* 0x2a */ - XK_D, NoSymbol, XK_eth, XK_Eth, /* 0x2b */ - XK_S, NoSymbol, XK_ssharp, NoSymbol, /* 0x2c */ - XK_A, NoSymbol, XK_aring, XK_Aring, /* 0x2d */ - XK_Mode_switch, NoSymbol, NoSymbol, XK_Mode_switch, /* 0x2e */ - XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 0x2f */ - XK_U, NoSymbol, XK_mute_diaeresis,NoSymbol, /* 0x30 */ - XK_Y, NoSymbol, XK_mute_asciicircum,NoSymbol, /* 0x31 */ - XK_T, NoSymbol, XK_mute_grave, NoSymbol, /* 0x32 */ - XK_R, NoSymbol, XK_mute_acute, NoSymbol, /* 0x33 */ - XK_E, NoSymbol, XK_ae, XK_AE, /* 0x34 */ - XK_W, NoSymbol, XK_asciitilde, NoSymbol, /* 0x35 */ - XK_Q, NoSymbol, XK_periodcentered, NoSymbol, /* 0x36 */ - XK_Tab, XK_BackTab, NoSymbol, NoSymbol, /* 0x37 */ - XK_7, XK_ampersand, XK_backslash, NoSymbol, /* 0x38 */ - XK_6, XK_asciicircum, XK_asciicircum, NoSymbol, /* 0x39 */ - XK_5, XK_percent, XK_onehalf, NoSymbol, /* 0x3a */ - XK_4, XK_dollar, XK_onequarter, XK_threequarters, /* 0x3b */ - XK_3, XK_numbersign, XK_numbersign, NoSymbol, /* 0x3c */ - XK_2, XK_at, XK_at, NoSymbol, /* 0x3d */ - XK_1, XK_exclam, XK_exclamdown, NoSymbol, /* 0x3e */ - XK_quoteleft, XK_asciitilde, XK_guillemotleft,XK_guillemotright,/* 0x3f */ -/* Was Mouse-L */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x40 */ -/* Was Mouse-M */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x41 */ -/* Was Mouse-R */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x42 */ -/* Was 4 button puck */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x43 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x44 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x45 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x46 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x47 */ - XK_Menu, NoSymbol, NoSymbol, NoSymbol, /* 0x48 */ - XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 0x49 */ - XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 0x4a */ - XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 0x4b */ - XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 0x4c */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x4d */ -/* Was 'Stop' */ - XK_Cancel, NoSymbol, NoSymbol, NoSymbol, /* 0x4e */ -/* Was 'Enter' */ - XK_Execute, XK_Print, NoSymbol, NoSymbol, /* 0x4f */ - XK_System, XK_User, NoSymbol, NoSymbol, /* 0x50 */ - XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 0x51 */ - XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 0x52 */ - XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 0x53 */ - XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 0x54 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x55 */ - XK_ClearLine, NoSymbol, NoSymbol, NoSymbol, /* 0x56 */ -/* Was 'Clear Display' */ - XK_Clear, NoSymbol, NoSymbol, NoSymbol, /* 0x57 */ - XK_8, XK_asterisk, XK_bracketleft, XK_braceleft, /* 0x58 */ - XK_9, XK_parenleft, XK_bracketright,XK_braceright, /* 0x59 */ - XK_0, XK_parenright, XK_questiondown,NoSymbol, /* 0x5a */ - XK_minus, XK_underscore, XK_longminus, XK_macron, /* 0x5b */ - XK_equal, XK_plus, XK_plusminus, NoSymbol, /* 0x5c */ - XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 0x5d */ - XK_InsertLine, NoSymbol, NoSymbol, NoSymbol, /* 0x5e */ - XK_DeleteLine, NoSymbol, NoSymbol, NoSymbol, /* 0x5f */ - - XK_I, NoSymbol, XK_mute_asciitilde,NoSymbol, /* 0x60 */ - XK_O, NoSymbol, XK_oslash, XK_Ooblique, /* 0x61 */ - XK_P, NoSymbol, XK_thorn, XK_Thorn, /* 0x62 */ - XK_bracketleft, XK_braceleft, XK_degree, NoSymbol, /* 0x63 */ - XK_bracketright, XK_braceright, XK_brokenbar, NoSymbol, /* 0x64 */ - XK_backslash, XK_bar, XK_mu, NoSymbol, /* 0x65 */ - - /* HP special might also be Insert */ - XK_InsertChar, NoSymbol, NoSymbol, NoSymbol, /* 0x66 */ - XK_DeleteChar, NoSymbol, NoSymbol, NoSymbol, /* 0x67 */ - XK_J, NoSymbol, XK_dollar, NoSymbol, /* 0x68 */ - XK_K, NoSymbol, XK_cent, NoSymbol, /* 0x69 */ - XK_L, NoSymbol, XK_sterling, NoSymbol, /* 0x6a */ - XK_semicolon, XK_colon, XK_lira, NoSymbol, /* 0x6b */ - XK_quoteright, XK_quotedbl, XK_quoteleft, XK_quoteright, /* 0x6c */ - XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 0x6d */ - XK_Home, NoSymbol, NoSymbol, NoSymbol, /* 0x6e */ - /* Prev */ - XK_Prior, NoSymbol, NoSymbol, NoSymbol, /* 0x6f */ - - XK_M, NoSymbol, XK_masculine, NoSymbol, /* 0x70 */ - XK_comma, XK_less, XK_less, NoSymbol, /* 0x71 */ - XK_period, XK_greater, XK_greater, NoSymbol, /* 0x72 */ - XK_slash, XK_question, XK_underscore, NoSymbol, /* 0x73 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x74 */ - XK_Select, NoSymbol, NoSymbol, NoSymbol, /* 0x75 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x76 */ - XK_Next, NoSymbol, NoSymbol, NoSymbol, /* 0x77 */ - XK_N, NoSymbol, XK_ordfeminine, NoSymbol, /* 0x78 */ - /* "Space the final frontier..." */ - XK_space, NoSymbol, NoSymbol, NoSymbol, /* 0x79 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x7a */ - /* Kanji Right */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x7b */ - - XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 0x7c */ - XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 0x7d */ - XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 0x7e */ - XK_Right, NoSymbol, NoSymbol, NoSymbol /* 0x7f */ -}; - - - - /* This routine converts a hil keyboard id to the X keyboard id used to - * look up the keyboard in the /usr/lib/X11/XHPKeymaps file. - * Notes: - * Modified from libXhp XHPGetHILandCvt(). - * We used to just do some math to get the extended keyboard id but we - * got some signals crossed with the NLIO guys and some of the - * keyboards got misplaced in XHPKeymaps so we now have a look up - * table. For the PS2 keyboards, we still use math. - * See the manual on using hp-hil devices with HP-UX for the keyboard - * nationality codes; they are the low order 6 bits of the device - * id; 0x1f is United States, so we'll subtract from 0x1f to give - * the U.S. a keyId of zero; The PS2 keyboards have hil ids E0-FF. - * 6 bits == a max of 64 different keyboards. 32 extended and 32 PS2. - * George says to use 7 bits: HIL ids in the range A0-FF. - * A0-BF Compressed keyboard. Not used (yet). - * C0-DF Extended (ITF) keyboard - * E0-FF Standard keyboard. We change to be the PS2. - * Map extended keyboards to key ids 0-31. The unsupported keyboards - * are the ones with hard coded numbers. - * The apollo keyboards are 33-40 (I don't want to talk about it and - * hind sight is 20/20). - * Map PS2 keyboards to key ids 60-91. - * WARNING - * ONLY call this for HIL keyed devices. For other stuff (such as - * serial keyboards), use the named lookups. - * Input: - * hil_id: - * Returns: - * X keyboard id. - * If the hil_id is not a supported keyboard, return unsupported id. - * If the hil_id is not a keyboard, return KB_NULL. - */ -int hil_to_kbd_id(hil_id) int hil_id; -{ - int kbd_id; - static short int key_tab[] = { - 31, /* HIL=00h Undefined keyboard */ - 30, /* HIL=01h Undefined keyboard */ - KB_Japanese, /* HIL=02h */ - KB_Swiss_French, /* HIL=03h */ - 29, /* HIL=04h No keysym support for Portugues */ - 28, /* HIL=05h No keysym support for Arabic */ - 27, /* HIL=06h No keysym support for Hebrew */ - KB_Canada_English, /* HIL=07h */ - 26, /* HIL=08h No keysym support for Turkish */ - 25, /* HIL=09h No keysym support for Greek */ - 24, /* HIL=0Ah No keysym support for Thai */ - KB_Italian, /* HIL=0Bh */ - KB_Korean, /* HIL=0Ch */ - KB_Dutch, /* HIL=0Dh */ - KB_Swedish, /* HIL=0Eh */ - KB_German, /* HIL=0Fh */ - KB_S_Chinese, /* HIL=10h */ - KB_T_Chinese, /* HIL=11h */ - KB_Swiss_French2, /* HIL=12h */ - KB_Euro_Spanish, /* HIL=13h */ - KB_Swiss_German2, /* HIL=14h */ - KB_Belgian, /* HIL=15h */ - KB_Finnish, /* HIL=16h */ - KB_UK_English, /* HIL=17h */ - KB_Canada_French, /* HIL=18h */ - KB_Swiss_German, /* HIL=19h */ - KB_Norwegian, /* HIL=1Ah */ - KB_French, /* HIL=1Bh */ - KB_Danish, /* HIL=1Ch */ - KB_Katakana, /* HIL=1Dh */ - KB_Latin_Spanish, /* HIL=1Eh */ - KB_US_English, /* HIL=1Fh */ - }; - - if (hil_id == 0x30) return KB_BUTTON_BOX; - - if (hil_id == 0x5c) return KB_US_English; /* Barcode reader */ - - if (0xE0 <= hil_id && hil_id <= 0xFF) /* PS2 keyboard: 0xE0 - 0xFF */ - return (91 - (hil_id - 0xE0)); /* 60 - 91 */ - - if (0xC0 <= hil_id && hil_id <= 0xDF) /* ITF keyboard: 0xC0 - 0xDF */ - return key_tab[hil_id & 0x1f]; /* 0 - 31 */ - - /* Something unknown or not yet supported (such as a nonkbd device (like - * the ID module)). - */ - return KB_NULL; -} - -#endif /* __hpux */ - -#if __apollo -#include "ap_keysym.h" /* for the apXK_ keysyms */ - -static KeySym Apollo_NorthAmericanMap[] = { - - /* code values in comments at line end are actual value reported on HIL. - REMEMBER, there is an offset of MIN_KEYCODE applied to this table! */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x00 */ - XK_Select, XK_Insert, NoSymbol, NoSymbol, /* 0x01 */ - apXK_LineDel, NoSymbol, NoSymbol, NoSymbol, /* 0x02 */ - apXK_CharDel, NoSymbol, NoSymbol, NoSymbol, /* 0x03 */ - XK_F10, NoSymbol, NoSymbol, NoSymbol, /* 0x04 */ - XK_F1, NoSymbol, NoSymbol, NoSymbol, /* 0x05 */ - XK_F2, NoSymbol, NoSymbol, NoSymbol, /* 0x06 */ - XK_F3, NoSymbol, NoSymbol, NoSymbol, /* 0x07 */ - XK_F4, NoSymbol, NoSymbol, NoSymbol, /* 0x08 */ - XK_F5, NoSymbol, NoSymbol, NoSymbol, /* 0x09 */ - XK_F6, NoSymbol, NoSymbol, NoSymbol, /* 0x0a */ - XK_F7, NoSymbol, NoSymbol, NoSymbol, /* 0x0b */ - XK_F8, NoSymbol, NoSymbol, NoSymbol, /* 0x0c */ - XK_F9, NoSymbol, NoSymbol, NoSymbol, /* 0x0d */ - XK_Redo, NoSymbol, NoSymbol, NoSymbol, /* 0x0e */ - apXK_Read, NoSymbol, NoSymbol, NoSymbol, /* 0x0f */ - apXK_Edit, apXK_Save, NoSymbol, NoSymbol, /* 0x10 */ - apXK_Exit, XK_Cancel, NoSymbol, NoSymbol, /* 0x11 */ - XK_Pause, XK_Help, NoSymbol, NoSymbol, /* 0x12 */ - apXK_Copy, apXK_Cut, NoSymbol, NoSymbol, /* 0x13 */ - apXK_Paste, XK_Undo, NoSymbol, NoSymbol, /* 0x14 */ - apXK_Grow, apXK_Move, NoSymbol, NoSymbol, /* 0x15 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x16 */ - XK_Escape, NoSymbol, NoSymbol, NoSymbol, /* 0x17 */ - XK_1, XK_exclam, NoSymbol, NoSymbol, /* 0x18 */ - XK_2, XK_at, NoSymbol, NoSymbol, /* 0x19 */ - XK_3, XK_numbersign, NoSymbol, NoSymbol, /* 0x1a */ - XK_4, XK_dollar, NoSymbol, NoSymbol, /* 0x1b */ - XK_5, XK_percent, NoSymbol, NoSymbol, /* 0x1c */ - XK_6, XK_asciicircum, NoSymbol, NoSymbol, /* 0x1d */ - XK_7, XK_ampersand, NoSymbol, NoSymbol, /* 0x1e */ - XK_8, XK_asterisk, NoSymbol, NoSymbol, /* 0x1f */ - XK_9, XK_parenleft, NoSymbol, NoSymbol, /* 0x20 */ - XK_0, XK_parenright, NoSymbol, NoSymbol, /* 0x21 */ - XK_minus, XK_underscore, NoSymbol, NoSymbol, /* 0x22 */ - XK_equal, XK_plus, NoSymbol, NoSymbol, /* 0x23 */ - XK_quoteleft, XK_asciitilde, NoSymbol, NoSymbol, /* 0x24 */ - XK_BackSpace, NoSymbol, NoSymbol, NoSymbol, /* 0x25 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x26 */ - apXK_LeftBar, NoSymbol, NoSymbol, NoSymbol, /* 0x27 */ - apXK_Cmd, apXK_Shell, NoSymbol, NoSymbol, /* 0x28 */ - apXK_RightBar, NoSymbol, NoSymbol, NoSymbol, /* 0x29 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x2a */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x2b */ - XK_Tab, NoSymbol, NoSymbol, NoSymbol, /* 0x2c */ - XK_Q, NoSymbol, NoSymbol, NoSymbol, /* 0x2d */ - XK_W, NoSymbol, NoSymbol, NoSymbol, /* 0x2e */ - XK_E, NoSymbol, NoSymbol, NoSymbol, /* 0x2f */ - XK_R, NoSymbol, NoSymbol, NoSymbol, /* 0x30 */ - XK_T, NoSymbol, NoSymbol, NoSymbol, /* 0x31 */ - XK_Y, NoSymbol, NoSymbol, NoSymbol, /* 0x32 */ - XK_U, NoSymbol, NoSymbol, NoSymbol, /* 0x33 */ - XK_I, NoSymbol, NoSymbol, NoSymbol, /* 0x34 */ - XK_O, NoSymbol, NoSymbol, NoSymbol, /* 0x35 */ - XK_P, NoSymbol, NoSymbol, NoSymbol, /* 0x36 */ - XK_bracketleft, XK_braceleft, NoSymbol, NoSymbol, /* 0x37 */ - XK_bracketright, XK_braceright, NoSymbol, NoSymbol, /* 0x38 */ - XK_Mode_switch, NoSymbol, NoSymbol, NoSymbol, /* 0x39 */ - XK_Delete, NoSymbol, NoSymbol, NoSymbol, /* 0x3a */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x3b */ - XK_KP_7, NoSymbol, NoSymbol, NoSymbol, /* 0x3c */ - XK_KP_8, NoSymbol, NoSymbol, NoSymbol, /* 0x3d */ - XK_KP_9, NoSymbol, NoSymbol, NoSymbol, /* 0x3e */ - XK_KP_Add, NoSymbol, NoSymbol, NoSymbol, /* 0x3f */ - apXK_LeftBox, NoSymbol, NoSymbol, NoSymbol, /* 0x40 */ - XK_Up, NoSymbol, NoSymbol, NoSymbol, /* 0x41 */ - apXK_RightBox, NoSymbol, NoSymbol, NoSymbol, /* 0x42 */ - XK_Control_L, NoSymbol, NoSymbol, NoSymbol, /* 0x43 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x44 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x45 */ - XK_A, NoSymbol, NoSymbol, NoSymbol, /* 0x46 */ - XK_S, NoSymbol, NoSymbol, NoSymbol, /* 0x47 */ - XK_D, NoSymbol, NoSymbol, NoSymbol, /* 0x48 */ - XK_F, NoSymbol, NoSymbol, NoSymbol, /* 0x49 */ - XK_G, NoSymbol, NoSymbol, NoSymbol, /* 0x4a */ - XK_H, NoSymbol, NoSymbol, NoSymbol, /* 0x4b */ - XK_J, NoSymbol, NoSymbol, NoSymbol, /* 0x4c */ - XK_K, NoSymbol, NoSymbol, NoSymbol, /* 0x4d */ - XK_L, NoSymbol, NoSymbol, NoSymbol, /* 0x4e */ - XK_semicolon, XK_colon, NoSymbol, NoSymbol, /* 0x4f */ - XK_quoteright, XK_quotedbl, NoSymbol, NoSymbol, /* 0x50 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x51 */ - XK_Return, NoSymbol, NoSymbol, NoSymbol, /* 0x52 */ - XK_backslash, XK_bar, NoSymbol, NoSymbol, /* 0x53 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x54 */ - XK_KP_4, NoSymbol, NoSymbol, NoSymbol, /* 0x55 */ - XK_KP_5, NoSymbol, NoSymbol, NoSymbol, /* 0x56 */ - XK_KP_6, NoSymbol, NoSymbol, NoSymbol, /* 0x57 */ - XK_KP_Subtract, NoSymbol, NoSymbol, NoSymbol, /* 0x58 */ - XK_Left, NoSymbol, NoSymbol, NoSymbol, /* 0x59 */ - XK_Next, NoSymbol, NoSymbol, NoSymbol, /* 0x5a */ - XK_Right, NoSymbol, NoSymbol, NoSymbol, /* 0x5b */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x5c */ - apXK_Repeat, NoSymbol, NoSymbol, NoSymbol, /* 0x5d */ - XK_Shift_L, NoSymbol, NoSymbol, NoSymbol, /* 0x5e */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x5f */ - XK_Z, NoSymbol, NoSymbol, NoSymbol, /* 0x60 */ - XK_X, NoSymbol, NoSymbol, NoSymbol, /* 0x61 */ - XK_C, NoSymbol, NoSymbol, NoSymbol, /* 0x62 */ - XK_V, NoSymbol, NoSymbol, NoSymbol, /* 0x63 */ - XK_B, NoSymbol, NoSymbol, NoSymbol, /* 0x64 */ - XK_N, NoSymbol, NoSymbol, NoSymbol, /* 0x65 */ - XK_M, NoSymbol, NoSymbol, NoSymbol, /* 0x66 */ - XK_comma, XK_less, NoSymbol, NoSymbol, /* 0x67 */ - XK_period, XK_greater, NoSymbol, NoSymbol, /* 0x68 */ - XK_slash, XK_question, NoSymbol, NoSymbol, /* 0x69 */ - XK_Shift_R, NoSymbol, NoSymbol, NoSymbol, /* 0x6a */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x6b */ - apXK_Pop, NoSymbol, NoSymbol, NoSymbol, /* 0x6c */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x6d */ - XK_KP_1, NoSymbol, NoSymbol, NoSymbol, /* 0x6e */ - XK_KP_2, NoSymbol, NoSymbol, NoSymbol, /* 0x6f */ - XK_KP_3, NoSymbol, NoSymbol, NoSymbol, /* 0x70 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x71 */ - apXK_UpBox, NoSymbol, NoSymbol, NoSymbol, /* 0x72 */ - XK_Down, NoSymbol, NoSymbol, NoSymbol, /* 0x73 */ - apXK_DownBox, NoSymbol, NoSymbol, NoSymbol, /* 0x74 */ - XK_Alt_L, NoSymbol, NoSymbol, NoSymbol, /* 0x75 */ - XK_space, NoSymbol, NoSymbol, NoSymbol, /* 0x76 */ - XK_Alt_R, NoSymbol, NoSymbol, NoSymbol, /* 0x77 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x78 */ - XK_KP_0, NoSymbol, NoSymbol, NoSymbol, /* 0x79 */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x7a */ - XK_KP_Decimal, NoSymbol, NoSymbol, NoSymbol, /* 0x7b */ - XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, /* 0x7c */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x7d */ - XK_Caps_Lock, NoSymbol, NoSymbol, NoSymbol, /* 0x7e */ - NoSymbol, NoSymbol, NoSymbol, NoSymbol, /* 0x7f */ -}; -#endif /* __apollo */ - -static KeySym LPFKMap[] = { - XK_exclam, NoSymbol, NoSymbol, NoSymbol, /* 0x21 */ - XK_quotedbl, NoSymbol, NoSymbol, NoSymbol, /* 0x22 */ - XK_numbersign, NoSymbol, NoSymbol, NoSymbol, /* 0x23 */ - XK_dollar, NoSymbol, NoSymbol, NoSymbol, /* 0x24 */ - XK_percent, NoSymbol, NoSymbol, NoSymbol, /* 0x25 */ - XK_ampersand, NoSymbol, NoSymbol, NoSymbol, /* 0x26 */ - XK_quoteright, NoSymbol, NoSymbol, NoSymbol, /* 0x27 */ - XK_parenleft, NoSymbol, NoSymbol, NoSymbol, /* 0x28 */ - XK_parenright, NoSymbol, NoSymbol, NoSymbol, /* 0x29 */ - XK_asterisk, NoSymbol, NoSymbol, NoSymbol, /* 0x2a */ - XK_plus, NoSymbol, NoSymbol, NoSymbol, /* 0x2b */ - XK_comma, NoSymbol, NoSymbol, NoSymbol, /* 0x2c */ - XK_minus, NoSymbol, NoSymbol, NoSymbol, /* 0x2d */ - XK_period, NoSymbol, NoSymbol, NoSymbol, /* 0x2e */ - XK_slash, NoSymbol, NoSymbol, NoSymbol, /* 0x2f */ - XK_0, NoSymbol, NoSymbol, NoSymbol, /* 0x30 */ - XK_1, NoSymbol, NoSymbol, NoSymbol, /* 0x31 */ - XK_2, NoSymbol, NoSymbol, NoSymbol, /* 0x32 */ - XK_3, NoSymbol, NoSymbol, NoSymbol, /* 0x33 */ - XK_4, NoSymbol, NoSymbol, NoSymbol, /* 0x34 */ - XK_5, NoSymbol, NoSymbol, NoSymbol, /* 0x35 */ - XK_6, NoSymbol, NoSymbol, NoSymbol, /* 0x36 */ - XK_7, NoSymbol, NoSymbol, NoSymbol, /* 0x37 */ - XK_8, NoSymbol, NoSymbol, NoSymbol, /* 0x38 */ - XK_9, NoSymbol, NoSymbol, NoSymbol, /* 0x39 */ - XK_colon, NoSymbol, NoSymbol, NoSymbol, /* 0x3a */ - XK_semicolon, NoSymbol, NoSymbol, NoSymbol, /* 0x3b */ - XK_less, NoSymbol, NoSymbol, NoSymbol, /* 0x3c */ - XK_equal, NoSymbol, NoSymbol, NoSymbol, /* 0x3d */ - XK_greater, NoSymbol, NoSymbol, NoSymbol, /* 0x3e */ - XK_question, NoSymbol, NoSymbol, NoSymbol, /* 0x3f */ - XK_at, NoSymbol, NoSymbol, NoSymbol, /* 0x40 */ -}; - -KeySymsRec LPFKKeySyms = {LPFKMap, 0x21, 0x40, 4}; - - /* This structure has ONE default KeySymsRec per keyboard family per OS - * that is used in case we can't look up the correct one. - * Notes: - * All key maps SHOULD start at MIN_KEYCODE (aka 0) except HP-UX, - * where the exteneded keyboard keymaps start at 2 (because the - * extended keyboards didn't generate keycodes 0 and 1). The PS2 - * keyboards generate keycodes starting at 0 so they need a - * different MIN_KEYCODE. - * These default keymaps are overwritten so they should contain at - * least enough entries so that the largest keytable will fit. In - * most cases this means that last entry is 0x7f and the keymap size - * is max-entries x width == 0x80 x 4. - */ -static KeySymsRec DefaultKeySyms[] = { - /* map name minKeyCode maxKC width */ -#if defined(__hpux) || defined(__hp_osf) - &USASCIIMap[8], (MIN_KEYCODE + 0x02), (MIN_KEYCODE + 0x7F), 4, - USASCIIMap, (MIN_KEYCODE), (MIN_KEYCODE + 0x7F), 4, - null_keymap, (MIN_KEYCODE), (MIN_KEYCODE + 0x7F), 1, -#endif - -#if __apollo - Apollo_NorthAmericanMap, (MIN_KEYCODE), (MIN_KEYCODE + 0x7F), 4, -#endif -}; - - /* Convert a X keyboard ID into a family. - * Input: X keyboard ID - * Returns: - * 0 (ITF) - * 1 (PS2) - * 2 (null or unknown device) - * 0 Apollo - */ -static int kbd_family(key_id) -{ - int n; - -#if defined(__hpux) || defined(__hp_osf) - if ( 0 <= key_id && key_id <= 31) n = 0; /* ITF keyboard */ - else - if (60 <= key_id && key_id <= 91) n = 1; /* PS2 keyboard */ - else n = 2; /* KB_NULL */ -#endif - -#if __apollo - n = 0; -#endif - - return n; -} - - /* This routine is called to get a pointer to a KeySymRec so you can - * overwrite the key table with the correct one for the keyboard - * connected to the system. - */ -KeySymsRec *hpKeySyms(key_id) -{ - return &DefaultKeySyms[kbd_family(key_id)]; -} - - /* This routine is called if the load-keytable-from-file routine fails - * and you need a default KeySymRec. I need this for HP-UX 'cause the - * extended and PS2 keyboards have different min keycodes and I want to - * use the US Ascii keymap as the default. - */ -KeySymsRec *hpDefaultKeySyms(key_id) -{ - return hpKeySyms(key_id); -} - - -/* ******************************************************************** */ -/* ************************* Modifier Tables ************************** */ -/* ******************************************************************** */ - -#define cT (ControlMask) -#define sH (ShiftMask) -#define lK (LockMask) -#define mT (Mod1Mask) - - /* A modmap with no modifiers. To be used with null_keymap */ -static CARD8 null_modmap[MAP_LENGTH]; - - - /* Shift table values up by 8. This offset is necessary to reserve - * codes for mouse buttons. Note last 8 entries of table are - * commented out to preserve length of table. - * Note: '#define MIN_KEYCODE 8' is above - */ - -#if defined(__hpux) || defined(__hp_osf) - - /* This table is for the HP hil extended keyboards. - * For the PS2 keyboards, the only difference is keycode 0. I used to - * use the same table for both keyboard types (since keycode 0 can't - * be generated by the extended keyboard) but that caused problems - * with xmodmap. - */ -static CARD8 hil_modmap[MAP_LENGTH] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, mT, mT, sH, sH, cT, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00-0f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10-1f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, mT, lK,/* 20-2f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 30-3f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 40-4f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 50-5f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60-6f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 70-7f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80-8f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90-9f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* a0-af */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* b0-bf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* c0-cf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* d0-df */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* e0-ef */ - 0, 0, 0, 0, 0, 0, 0, 0,/*0, 0, 0, 0, 0, 0, 0, 0, /* f0-ff */ -}; - - /* Same table as the hil_modmap but for PS2 keyboards. Only - * difference is keycode 0 is a control key. - */ -static CARD8 PS2_modmap[MAP_LENGTH] = { - 0, 0, 0, 0, 0, 0, 0, 0, - cT, 0, mT, mT, sH, sH, cT, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00-0f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10-1f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, mT, lK,/* 20-2f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 30-3f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 40-4f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 50-5f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60-6f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 70-7f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80-8f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90-9f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* a0-af */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* b0-bf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* c0-cf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* d0-df */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* e0-ef */ - 0, 0, 0, 0, 0, 0, 0, 0,/*0, 0, 0, 0, 0, 0, 0, 0, /* f0-ff */ -}; - -#endif - -#ifdef __apollo - - /* This table is for the Apollo NA and MN keyboards. */ -static CARD8 apollo_modmap[MAP_LENGTH] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00-0f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10-1f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 20-2f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, mT, 0, 0, 0, 0, 0, 0, /* 30-3f */ - 0, 0, 0, cT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 40-4f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, sH, 0, /* 50-5f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, sH, 0, 0, 0, 0, 0, /* 60-6f */ - 0, 0, 0, 0, 0, mT, 0, mT, 0, 0, 0, 0, 0, 0, lK, 0, /* 70-7f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80-8f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90-9f */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* a0-af */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* b0-bf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* c0-cf */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* d0-df */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* e0-ef */ - 0, 0, 0, 0, 0, 0, 0, 0,/*0, 0, 0, 0, 0, 0, 0, 0, /* f0-ff */ -}; -#endif - - /* This routine returns the modifier map to be used with the keymap that - * has keyboard/(X id) kbd_id. - * Note: This is easy because each OS we support now only has one or - * two mod maps for all keyboards it supports. - */ -CARD8 *hpModMap(kbd_id) -{ -#if defined(__hpux) || defined(__hp_osf) - switch (kbd_family(kbd_id)) - { - case 0: return hil_modmap; /* Extended keyboard */ - case 1: return PS2_modmap; /* PS2 keyboard */ - case 2: return null_modmap; /* button box */ - } -#endif - -#ifdef __apollo - return apollo_modmap; -#endif -} - - -/* ******************************************************************** */ -/* ********************************* ********************************* */ -/* ******************************************************************** */ - - /* Routines in getkeysym.c */ -extern HPKKeyDeviceInfo *HPKlookup_kd_by_id(), *HPKlookup_kd_by_name(); -extern HPKModMap *HPKlookup_modmap(); - - - /* Empty space that can be filled in when I read keyboard info from a - * file. I don't think I can just overwrite (eg) the null_maps - * because if they change keyboards, recycle and then I can't find a - * map, the default won't work anymore. - */ -static KeySym tmp_keymap[8 * 256]; /* biggest keymap */ -static CARD8 tmp_modmap[MAP_LENGTH]; - -static void maparoo(kptr, keysyms_rec, complain, modmap, default_modmap) - KeySymsRec *keysyms_rec; - HPKKeyDeviceInfo *kptr; - CARD8 **modmap, *default_modmap; -{ - CARD8 *the_modmap; - HPKModMap *mptr; - - keysyms_rec->map = tmp_keymap; - keysyms_rec->minKeyCode = kptr->min_keycode; - keysyms_rec->maxKeyCode = kptr->max_keycode; - keysyms_rec->mapWidth = kptr->columns; - - if (mptr = HPKlookup_modmap(kptr->modmap_name)) - { - memcpy(tmp_modmap, mptr->modmap, MAP_LENGTH); - the_modmap = tmp_modmap; - } - else - { - if (complain) - ErrorF("Could not find modmap \"%s\"- using default (NULL map).\n", - kptr->modmap_name); - the_modmap = default_modmap; - } - *modmap = the_modmap; -} - - /* - * Input: - * keydevice_id: The keydevice ID. On HP-UX, this is the output of - * hil_to_kbd_id(). - * keysyms_rec: Pointer to a KeySymsRec to fill in. - * modmap: Pointer to a pointer to a modmap. - * Output: - * keysyms_rec: FIlled in. - * modmap: points to a modmap to use with the keysyms_rec. - * Returns: - * TRUE : everything went as expected - * FALSE: Something went screwie, using default maps. - * Notes: - * Don't complain if can't load maps for the button box. - */ -int HPKget_maps_by_id(keydevice_id, keysyms_rec, modmap) - KeySymsRec *keysyms_rec; CARD8 **modmap; -{ - CARD8 *the_modmap; - HPKKeyDeviceInfo *kptr; - HPKModMap *mptr; - - *keysyms_rec = *hpDefaultKeySyms(keydevice_id); - *modmap = hpModMap(keydevice_id); - - if (keydevice_id == KB_NULL) return TRUE; - - if (!HPKsetup((char *)NULL)) - { - opps: - if (keydevice_id != KB_BUTTON_BOX) - ErrorF("Unable to load keymaps - using defaults.\n"); - } - else - { - if (!HPKread_keymap(keydevice_id, tmp_keymap)) goto opps; - - if (kptr = HPKlookup_kd_by_id(keydevice_id)) - maparoo(kptr, keysyms_rec, False, modmap, hpModMap(keydevice_id)); - } - - HPKclean_up(); - - return TRUE; -} - - -extern char *getenv(); - - /* - * Input: - * keymap_file: Name of the file that contains keymaps. If NULL, - * only look in /usr/lib/X11/XHPKeymaps (the - * default) (can be overridden, see HPKsetup()). This - * can be filled in by the device driver if it (for some - * reason) doesn't want to use the default. - * keymap_name: Name of the keymap to load. Sometime like - * "button-box". - * keysyms_rec: Pointer to a KeySymsRec to fill in. - * modmap: Pointer to a pointer to a modmap. - * Output: - * keysyms_rec: FIlled in. - * modmap: points to a modmap to use with the keysyms_rec. - * Returns: - * TRUE : everything went as expected - * FALSE: Something went screwie, using null maps. - * Notes: - * There are four possible keymap files: - * - /usr/lib/X11/XHPKeymaps. This is the system default. It is - * supposed to remain untouched so that it can be overwritten by - * the system updates. - * - A file specified by the environment variable XHPKEYMAPFILE. - * This overrides XHPKeymaps. - * - A file specified by the device driver. For example, if a - * company writes a driver for xyz keyboard, they can ship a - * keymap without having to have the user modify XHPKeymaps. - * - /usr/lib/X11/XHPKeymaps.usr. This is the users "personal" - * keymap file. If they want to make changes to keymaps in - * XHPKeymaps, they should put the changed keymaps in - * XHPKeymaps.usr and leave XHPKeymaps unchanged. - * Here is the order in which keymap files are tried: - * If XHPKEYMAPFILE exists, use this load order: - * - The file specified by XHPKEYMAPFILE. - * - The user modifiable keymap file (XHPKeymaps.usr). - * - The drivers keymap file (if not NULL). - * If XHPKEYMAPFILE doesn't exist, use this order: - * - The user modifiable keymap file (XHPKeymaps.usr). - * - The drivers keymap file (if not NULL). - * - The default (system) keymap (/usr/lib/X11/XHPKeymaps). - */ -#define KEYMAP_ENV_VAR "XHPKEYMAPFILE" -#define USERS_KEYMAP "XHPKeymaps.usr" -int HPKget_kb_info_by_name(keymap_file, keymap_name, keysyms_rec, modmap) - char *keymap_file, *keymap_name; KeySymsRec *keysyms_rec; CARD8 **modmap; -{ - if (getenv(KEYMAP_ENV_VAR)) - { - if (try_and_load_maps((char *)NULL, keymap_name, keysyms_rec, modmap) || - try_and_load_maps(USERS_KEYMAP, keymap_name, keysyms_rec, modmap) || - (keymap_file && - try_and_load_maps(keymap_file, keymap_name, keysyms_rec, modmap))) - return TRUE; - } - else - { - if (try_and_load_maps(USERS_KEYMAP, keymap_name, keysyms_rec, modmap) || - (keymap_file && - try_and_load_maps(keymap_file, keymap_name, keysyms_rec, modmap)) || - try_and_load_maps((char *)NULL, keymap_name, keysyms_rec, modmap)) - return TRUE; - } - - ErrorF("Unable to load keymap \"%s\" - using defaults (NULL maps).\n", - keymap_name); - *keysyms_rec = *hpDefaultKeySyms(KB_NULL); - *modmap = hpModMap(KB_NULL); - - return FALSE; -} - -static int try_and_load_maps(keymap_file, keymap_name, keysyms_rec, modmap) - char *keymap_file, *keymap_name; KeySymsRec *keysyms_rec; CARD8 **modmap; -{ - HPKKeyDeviceInfo *kptr; - int all_OK = TRUE; - - if (!HPKsetup(keymap_file)) all_OK = FALSE; - else - { - if (!(kptr = HPKlookup_kd_by_name(keymap_name)) || - !HPKread_keymap(kptr->keydevice_id, tmp_keymap)) - all_OK = FALSE; - else - maparoo(kptr, keysyms_rec, True, modmap, null_modmap); - } - - HPKclean_up(); - - return all_OK; -} Index: xc/programs/Xserver/hw/hp/input/hpext.h diff -u xc/programs/Xserver/hw/hp/input/hpext.h:1.1.1.4 xc/programs/Xserver/hw/hp/input/hpext.h:removed --- xc/programs/Xserver/hw/hp/input/hpext.h:1.1.1.4 Tue Jan 16 17:43:02 2001 +++ xc/programs/Xserver/hw/hp/input/hpext.h Thu Feb 27 12:29:23 2003 @@ -1,881 +0,0 @@ -/* $Xorg: hpext.h,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ - -/* - -Copyright (c) 1986, 1987 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -#ifndef HPEXT_H -#define HPEXT_H - -#define NEED_EVENTS -#define NEED_REPLIES -#include "Xproto.h" -#include "X.h" -#include "XHPproto.h" /* server version definitions */ -#ifdef XINPUT -#include "XIproto.h" -#endif /* XINPUT */ - -/* Definitions for HP extensions used by the server and Xlib */ - -/********************************************************* - * - * number of hp events, errors, and extension name. - * - */ - -#define HPEVENTS 12 -#define HPERRORS 3 -#define CLIENT_REQ 1 -#define HPNAME "HPExtension" -#define MIN_EVENT_REQUEST 1 -#define MAX_EVENT_REQUEST 11 - -/********************************************************* - * - * Protocol request constants - * - */ - -#define X_GetHpKeyboardId 1 /* DO NOT CHANGE THIS LINE! */ -#define X_HPListInputDevices 2 -#define X_HPSetInputDevice 3 -#define X_HPGetExtEventMask 4 -#define X_HPGetDeviceFocus 5 -#define X_HPGetClipList 6 -#define X_HPGrabDevice 7 -#define X_HPSetDeviceFocus 8 -#define X_HPUnGrabDevice 9 -#define X_HPSelectExtensionEvent 10 -#define X_HPGetCurrentDeviceMask 11 -#define X_HPEnableReset 12 -#define X_HPDisableReset 13 -#define X_HPGetDeviceMotionEvents 14 -#define X_HPGrabDeviceButton 15 -#define X_HPUngrabDeviceButton 16 -#define X_HPGrabDeviceKey 17 -#define X_HPUngrabDeviceKey 18 -#define X_HPDeviceAutoRepeatOn 19 -#define X_HPDeviceAutoRepeatOff 20 -#define X_HPPrompt 21 -#define X_HPAcknowledge 22 -#define X_HPRegisterWindow 23 -#define X_HPUnRegisterWindow 24 -#define X_HPSynchronizeColorRange 25 -#define X_HPGetServerMode 26 -#define X_HPGetDeviceKeyMapping 27 -#define X_HPChangeDeviceKeyMapping 28 -#define X_HPGetDeviceModifierMapping 29 -#define X_HPSetDeviceModifierMapping 30 -#define X_HPGetDeviceControl 31 -#define X_HPChangeDeviceControl 32 -#define X_HPGetWindowCursor 33 -#define X_HPGrabReset 34 -#define X_HPSendDdxDriverMsg 35 -#define X_HPGetClipLists 36 -#define X_HPSSChange 37 /* Screen saver change */ - -#define sz_xHPListInputDevicesReq 4 -#define sz_xHPListInputDevicesReply 32 -#define sz_xHPSetInputDeviceReq 12 -#define sz_xHPSetInputDeviceReply 32 -#define sz_xHPGetExtEventMaskReq 8 -#define sz_xHPGetExtEventMaskReply 32 -#define sz_xHPGetDeviceFocusReq 8 -#define sz_xHPGetDeviceFocusReply 32 -#define sz_xHPGetClipListReq 16 -#define sz_xHPGetClipListReply 32 -#define sz_xHPGrabDeviceReq 24 -#define sz_xHPGrabDeviceReply 32 -#define sz_xHPSetDeviceFocusReq 20 -#define sz_xHPUnGrabDeviceReq 12 -#define sz_xHPSelectExtensionEventReq 16 -#define sz_xHPGetCurrentDeviceMaskReq 12 -#define sz_xHPGetCurrentDeviceMaskReply 32 -#define sz_xHPEnableResetReq 4 -#define sz_xHPDisableResetReq 4 -#define sz_xHPGetDeviceMotionEventsReq 20 -#define sz_xHPGetDeviceMotionEventsReply 32 -#define sz_xHPGrabDeviceButtonReq 24 -#define sz_xHPUngrabDeviceButtonReq 16 -#define sz_xHPGrabDeviceKeyReq 20 -#define sz_xHPUngrabDeviceKeyReq 16 -#define sz_xHPDeviceAutoRepeatOnReq 12 -#define sz_xHPDeviceAutoRepeatOffReq 8 -#define sz_xHPPromptReq 12 -#define sz_xHPAcknowledgeReq 12 -#define sz_xHPRegisterWindowReq 16 -#define sz_xHPRegisterWindowReply 152 -#define sz_xHPSynchronizeColorRangeReq 16 -#define sz_xHPGetServerModeReq 8 -#define sz_xHPGetServerModeReply 32 -#define sz_xHPGetDeviceKeyMappingReq 12 -#define sz_xHPGetDeviceKeyMappingReply 32 -#define sz_xHPChangeDeviceKeyMappingReq 12 -#define sz_xHPGetDeviceModifierMappingReq 8 -#define sz_xHPGetDeviceModifierMappingReply 32 -#define sz_xHPSetDeviceModifierMappingReq 12 -#define sz_xHPSetDeviceModifierMappingReply 32 -#define sz_xHPGetDeviceControlReq 8 -#define sz_xHPGetDeviceControlReply 64 -#define sz_xHPChangeDeviceControlReq 12 -#define sz_xHPGetWindowCursorReq 8 -#define sz_xHPGetWindowCursorReply 32 -#define sz_xHPGrabResetReq 4 -#define sz_xHPGrabResetReply 32 -#define sz_xHPSendDdxDriverMsgReq 16 -#define sz_xHPSendDdxDriverMsgReply 32 -#define sz_xHPGetClipListsReq 16 -#define sz_xHPGetClipListsReply 32 - -#define GET_HPINPUTDEVICE(pDev) \ - ((HPInputDevice *) ((pDev)->public.devicePrivate)) - -struct dev_select_info - { - Mask mask; - long type; - }; - -/********************************************************* - * - * Protocol request and reply structures. - * - */ - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* always X_HPListInputDevices */ - CARD16 length; -} xHPListInputDevicesReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPListInputDevices */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 ndevices B32; - CARD32 t_axes B32; - CARD32 data02 B32; - CARD32 data03 B32; - CARD32 data04 B32; - CARD32 data05 B32; - } xHPListInputDevicesReply; - - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* always X_HPSetInputDevice */ - CARD16 length; - XID deviceid; - CARD32 mode; -} xHPSetInputDeviceReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPSetInputDevice */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 data01 B32; - CARD32 data02 B32; - CARD32 data03 B32; - CARD32 data04 B32; - CARD32 data05 B32; - } xHPSetInputDeviceReply; - - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* always X_HPGetExtEventMask */ - CARD16 length; - CARD32 evconst; -} xHPGetExtEventMaskReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGetExtEventMask */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 mask B32; - CARD32 evtype B32; - CARD32 data01 B32; - CARD32 data02 B32; - CARD32 data03 B32; - CARD32 data04 B32; - } xHPGetExtEventMaskReply; - -typedef struct { - CARD8 reqType; /* always HpeqCode */ - CARD8 hpReqType; /* always X_HPGetCurrentDeviceMask */ - CARD16 length; - Window window B32; - XID deviceid; -} xHPGetCurrentDeviceMaskReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGetCurrentDeviceMask */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 mask B32; - CARD32 data01 B32; - CARD32 data02 B32; - CARD32 data03 B32; - CARD32 data04 B32; - CARD32 data05 B32; - } xHPGetCurrentDeviceMaskReply; - - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* always X_HPGetDeviceFocus */ - CARD16 length; - XID deviceid; -} xHPGetDeviceFocusReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGetDeviceFocus */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 focus B32; - Window revertTo B32; - CARD32 data01 B32; - CARD32 data02 B32; - CARD32 data03 B32; - } xHPGetDeviceFocusReply; - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* always X_HPSetDeviceFocus */ - CARD16 length; - Window focus B32; - XID deviceid; - Time time B32; - CARD8 revertTo; - CARD8 pad00; - CARD16 pad01; -} xHPSetDeviceFocusReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPGrabDevice */ - CARD16 length B16; - Window grabWindow B32; - Time time B32; - XID deviceid; - CARD32 eventMask B32; - BOOL ownerEvents; - CARD8 pad00; - CARD16 pad01 B16; -} xHPGrabDeviceReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGrabDevice */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - CARD32 status; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; - } xHPGrabDeviceReply; - - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPUnGrabDevice */ - CARD16 length B16; - Time time B32; - XID deviceid; -} xHPUnGrabDeviceReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPSelectExtensionEvent */ - CARD16 length B16; - Window window B32; - CARD32 extensionMask B32; - XID deviceid; -} xHPSelectExtensionEventReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPEnableReset */ - CARD16 length B16; -} xHPEnableResetReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPDisableReset */ - CARD16 length B16; -} xHPDisableResetReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPGetDeviceMotionEvents*/ - CARD16 length B16; - Window window B32; - Time start B32; - Time stop B32; - XID deviceid; -} xHPGetDeviceMotionEventsReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGetDeviceMotionEvents */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 nEvents B32; - INT16 axes B16; - CARD16 pad2 B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xHPGetDeviceMotionEventsReply; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPGrabDeviceButton */ - CARD16 length B16; - Window grabWindow B32; - XID deviceid; - CARD32 eventMask; - CARD16 modifiers B16; - BOOL ownerEvents; - CARD8 button; - BYTE pointerMode, keyboardMode; - CARD8 pad1, pad2; -} xHPGrabDeviceButtonReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPUngrabDeviceButton */ - CARD16 length B16; - Window grabWindow B32; - XID deviceid; - CARD16 modifiers B16; - CARD8 button; - CARD8 pad1; -} xHPUngrabDeviceButtonReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPGrabDeviceKey */ - CARD16 length B16; - Window grabWindow B32; - XID deviceid; - CARD16 modifiers B16; - BOOL ownerEvents; - CARD8 key; - BYTE pointerMode, keyboardMode; - BYTE pad1, pad2; -} xHPGrabDeviceKeyReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPUngrabDeviceKey */ - CARD16 length B16; - Window grabWindow B32; - XID deviceid; - CARD16 modifiers B16; - CARD8 key; - CARD8 pad1; -} xHPUngrabDeviceKeyReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPDeviceAutoRepeatOn */ - CARD16 length B16; - XID deviceid; - INT32 rate; -} xHPDeviceAutoRepeatOnReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPDeviceAutoRepeatOff */ - CARD16 length B16; - XID deviceid; -} xHPDeviceAutoRepeatOffReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPPrompt */ - CARD16 length B16; - XID deviceid; - CARD8 prompt; - CARD8 pad1, pad2, pad3; -} xHPPromptReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPAcknowledge */ - CARD16 length B16; - XID deviceid; - CARD8 ack; - CARD8 pad1, pad2, pad3; -} xHPAcknowledgeReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPGetServerMode */ - CARD16 length B16; - CARD32 screen B32; -} xHPGetServerModeReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGetServerMode */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 mode B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xHPGetServerModeReply; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPGetDeviceKeyMapping */ - CARD16 length B16; - XID deviceid; - KeyCode firstKeyCode; - CARD8 count; - CARD16 pad1 B16; -} xHPGetDeviceKeyMappingReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGetDeviceKeyMapping */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD8 keySymsPerKeyCode; - CARD8 pad0; - CARD16 pad1 B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xHPGetDeviceKeyMappingReply; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPChangeDeviceKeyMapping */ - CARD16 length B16; - XID deviceid; - CARD8 keyCodes; - KeyCode firstKeyCode; - CARD8 keySymsPerKeyCode; - CARD8 pad1; -} xHPChangeDeviceKeyMappingReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPGetDeviceModifierMapping */ - CARD16 length B16; - XID deviceid; -} xHPGetDeviceModifierMappingReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGetDeviceModifierMapping */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD8 numKeyPerModifier; - CARD8 pad0; - CARD16 pad1 B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xHPGetDeviceModifierMappingReply; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPSetDeviceModifierMapping */ - CARD16 length B16; - CARD8 numKeyPerModifier; - CARD8 pad1; - CARD16 pad2 B16; - XID deviceid; -} xHPSetDeviceModifierMappingReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPSetDeviceModifierMapping */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD8 success; - CARD8 pad0; - CARD16 pad1 B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xHPSetDeviceModifierMappingReply; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPGetDeviceControl */ - CARD16 length B16; - XID deviceid; -} xHPGetDeviceControlReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGetDeviceControl */ - CARD16 sequenceNumber B16; - CARD32 length B32; - BOOL globalAutoRepeat; - CARD8 keyClickPercent; - CARD8 bellPercent; - CARD8 pad0; - CARD32 ledMask B32; - CARD16 bellPitch B16; - CARD16 bellDuration B16; - CARD16 accelNumerator B16; - CARD16 accelDenominator B16; - CARD16 threshold B16; - CARD16 pad1 B16; - CARD32 pad2 B32; - BYTE map[32]; /* bit masks start here */ -} xHPGetDeviceControlReply; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_HPChangeDeviceControl */ - CARD16 length B16; - XID deviceid; - CARD32 mask B32; -} xHPChangeDeviceControlReq; - -typedef struct { - CARD8 reqType; - CARD8 hpReqType; /* always X_GetWindowCursor */ - CARD16 length B16; - Window window B32; -} xHPGetWindowCursorReq; - -typedef struct { - CARD8 repType; /* X_Reply */ - CARD8 hpRepType; /* always X_HPGetWindowCursor */ - CARD16 sequenceNumber B16; - CARD32 length B32; - Cursor cursor B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xHPGetWindowCursorReply; - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* always X_HPGetClipList */ - CARD16 length; - CARD32 wid; /* window id */ - CARD32 gcid; /* graphics context id */ - CARD32 format; /* clip list format */ -} xHPGetClipListReq; - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - INT16 x B16; /* x origin of window */ - INT16 y B16; /* y origin of window */ - CARD16 width B16; /* width of window */ - CARD16 height B16; /* height of window */ - CARD32 count B32; /* number of clipping rectanges */ - CARD32 data03 B32; - CARD32 data04 B32; - CARD32 data05 B32; - } xHPGetClipListReply; - -/* - * X_HPRegisterWindow request/reply structures... - */ - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* X_HPRegisterWindow or X_HPUnReg... */ - CARD16 length; - CARD32 wid; /* window id */ - CARD32 accelid; /* accelerated id */ - CARD32 flags; /* flags */ -} xHPRegisterWindowReq; - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - INT32 error B32; /* error status */ - CARD32 flags B32; /* flags */ - BYTE path[80]; /* length must >= cfbPrivScreen->path */ - CARD32 depth B32; /* depth of window */ - INT32 w_class B32; /* window GRM_ID class */ - INT32 w_screen B32; /* window GRM_ID screen */ - INT32 w_window B32; /* window GRM_ID window */ - BYTE w_name[40]; /* window GRM_ID name */ - } xHPRegisterWindowReply; - -/* - * X_HPSynchronizeColorRange Request structure (no reply) - */ - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* X_HPRegisterWindow or X_HPUnReg... */ - CARD16 length; - CARD32 cmap; /* Colormap ID of interest */ - CARD32 start; /* Starting pixel if changes to cmap */ - CARD32 ncolors; /* number of pixels changed */ -} xHPSynchronizeColorRangeReq; - -/* - * X_HPSendDdxDriverMsg Request structure (possible reply) - */ - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* X_HPRegisterWindow or X_HPUnReg... */ - CARD16 length; - Window window; /* window of interest */ - INT32 nMsgBytes; /* Number of bytes in message */ - INT32 needReply; /* whether or not a reply is forthcoming */ -} xHPSendDdxDriverMsgReq; - -typedef struct { - CARD8 type; - CARD8 pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - INT32 nRepBytes; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - } xHPSendDdxDriverMsgReply; - -/* - * XHPGetClipLists request (not to be confused with XHPGetClipList. - * This extension gets multiple clip lists) - */ - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* always X_HPGetClipLists */ - CARD16 length; - CARD32 wid; /* window id */ - CARD32 gcid; /* graphics context id */ - CARD32 nClipLists; /* number of clip lists requested */ -/* To be followed by 'nClipLists' CARD32 format longwords: */ -} xHPGetClipListsReq; - - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - INT16 x B16; /* x origin of window */ - INT16 y B16; /* y origin of window */ - CARD16 width B16; /* width of window */ - CARD16 height B16; /* height of window */ - CARD32 count B32; /* number of clip lists */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -/* To be followed by 'count' xHPGetClipListsReplyData structures: */ -} xHPGetClipListsReply; - -typedef struct { - CARD16 count B16; /* number of clip boxes */ - CARD16 size B16; /* size of each clip box in bytes */ -/* To be followed by 'count * size' bytes: */ -} xHPGetClipListsReplyData; - - -/* X_HPGrabReset Request structure */ - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* X_HPGrabReset */ - CARD16 length; -} xHPGrabResetReq; - -typedef struct { - CARD8 repType; /* always HpReqCode */ - CARD8 hpRepType; /* X_HPGrabReset */ - CARD16 sequenceNumber B16; - CARD32 length B32; - Atom evtype B32; /* event type to expect */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - } xHPGrabResetReply; - -/* X_HPSSChange Request structures - * Notes: - * The sz_x numbers are sizeof(struct) padded to the to 4 bytes. This to - * make the X packets work correctly. - */ - -typedef struct { - CARD8 reqType; /* always HpReqCode */ - CARD8 hpReqType; /* X_HPSSChange */ - CARD16 length; - CARD32 flags; /* stuff */ - CARD32 wid; /* just in case */ -} xHPSSChangeReq; - -#define sz_xHPSSChangeReq 12 - -typedef struct { - CARD8 repType; /* always HpReqCode */ - CARD8 hpRepType; /* X_HPSSChange */ - CARD16 sequenceNumber B16; - CARD32 length B32; - Atom evtype B32; /* event type to expect */ - CARD32 flags B32; /* */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - } xHPSSChangeReply; - -#define sz_xHPSSChangeReply 32 - -/********************************************************** - * - * extension events. - * - */ - -typedef struct - { - INT16 ax_num; - INT16 ax_val; - } XHPaxis_data; - -typedef struct - { - BYTE type; - BYTE count; - CARD16 sequencenumber B16; - XID deviceid; - CARD32 pad00 B32; - CARD32 pad01 B32; - CARD32 pad02 B32; - CARD32 pad03 B32; - CARD32 pad04 B32; - CARD32 pad05 B32; - } xAnyExtensionEvent; - -typedef struct - { - BYTE type; - BYTE ext_type; - CARD16 sequencenumber B16; - XID deviceid; - INT16 axes_count B16; - CARD16 pad00 B16; - XHPaxis_data data[4]; - CARD32 pad01 B32; - } xHPExtensionEvent; - -typedef struct - { - xEvent b; - xAnyExtensionEvent x; - } xAnyEvent; - -typedef struct - { - xEvent b; -#ifdef XINPUT - deviceValuator x; -#else - xHPExtensionEvent x; -#endif /* XINPUT */ - } xHPEvent; - -typedef struct - { - BYTE type; - BYTE pad00; - CARD16 sequencenumber B16; - INT16 detail B16; - BYTE mode; /* really XMode */ - BYTE pad1; - XID deviceid; - Window window B32; - CARD32 pad01 B32; - CARD32 pad02 B32; - CARD32 pad03 B32; - CARD32 pad04 B32; - } xHPdevicefocus; - -typedef struct - { - BYTE type; - BYTE pad00; - CARD16 sequencenumber B16; - CARD8 request; - KeyCode firstKeyCode; - CARD8 count; - BYTE pad1; - XID deviceid; - CARD32 pad01 B32; - CARD32 pad02 B32; - CARD32 pad03 B32; - CARD32 pad04 B32; - CARD32 pad05 B32; - } xHPDeviceMappingEvent; - -typedef struct - { - BYTE type; - BYTE deviceid; - BYTE map[30]; - } xHPDeviceKeymapEvent; - -#endif Index: xc/programs/Xserver/hw/hp/input/hpkeys.h diff -u xc/programs/Xserver/hw/hp/input/hpkeys.h:1.2 xc/programs/Xserver/hw/hp/input/hpkeys.h:removed --- xc/programs/Xserver/hw/hp/input/hpkeys.h:1.2 Fri Dec 14 14:59:40 2001 +++ xc/programs/Xserver/hw/hp/input/hpkeys.h Thu Feb 27 12:29:23 2003 @@ -1,255 +0,0 @@ -#ifndef HPKEYS_H -#define HPKEYS_H -/* $Xorg: hpkeys.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ -/* - -Copyright 1986, 1987, 1998 The Open Group - -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. - -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. - - -Copyright 1986, 1987 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett-Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -/*********************************************************************** - * - * file: hpkeys.h - * - * contains key definitions and other static information used by x_hil.c - * - */ - -#define DOWN 0 -#define LEFT 1 -#define RIGHT 2 -#define UP 3 - -#ifdef __apollo -u_char cursor_down = 0x7b; -u_char cursor_left = 0x61; -u_char cursor_right = 0x63; -u_char cursor_up = 0x49; -u_char button_1 = 0x44; -u_char button_2 = 0x45; -u_char button_3 = 0x46; -u_char button_4 = 0x47; -u_char button_5 = 0x5d; -u_char button_6 = 0x00; -u_char button_7 = 0x00; -u_char button_8 = 0x00; -#else -u_char cursor_down = 0x1a; -u_char cursor_left = 0x18; -u_char cursor_right = 0x1c; -u_char cursor_up = 0x12; -u_char button_1 = 0x1d; -u_char button_2 = 0x19; -u_char button_3 = 0x1b; -u_char button_4 = 0x1f; -u_char button_5 = 0x15; -u_char button_6 = 0x00; -u_char button_7 = 0x00; -u_char button_8 = 0x00; -#endif - -u_short pointer_move = 10; -u_short pointer_mod1_amt = 1; -u_short pointer_mod2_amt = 40; -u_short pointer_mod3_amt = 5; -u_char pointer_amt_mods[3] = {0xff,0xff,0xff}; -u_char pointer_key_mods[3] = {0xff,0xff,0xff}; -u_char borrow_mode_mods[3] = {0x43,0x5e,0xff}; -#ifdef __apollo -u_char borrow_mode = 0x15; -u_char reset_mods[3] = {0x43,0x5e,0xff}; -u_char reset = 0x19; -#endif -#if defined(__hpux) || defined(__hp_osf) -u_char reset_mods[3] = {0x06,0x05,0xff}; -u_char reset = 0x0f; -#endif -u_char screen_change_amt = SCREEN_CHANGE_DEFAULT; -u_char ptr_button_map[] = {0,1,2,3,4,5,6,7,8}; -u_char button_latching = LATCHING_OFF; -u_char button_chording = CHORDING_DEFAULT; -u_char screen_orientation = HORIZONTAL; -u_char screen_row_wrap = DEFAULT; -u_char screen_col_wrap = DEFAULT; -u_int tablet_xorigin = 0; -u_int tablet_yorigin = 0; -u_int tablet_width = 0; -u_int tablet_height = 0; -u_char isotropic_scaling = 0; - -u_char ascii_to_code [128][7] = { - {0x0c,0x0a,0x7a,0x7b,0x0b,0x0d,0}, /* cntl - @ */ - {0x0c,0x5a,0x5b,0x0d,0,0,0}, /* cntl - a */ - {0x0c,0x30,0x31,0x0d,0,0,0}, /* cntl - b */ - {0x0c,0x34,0x35,0x0d,0,0,0}, /* cntl - c */ - {0x0c,0x56,0x57,0x0d,0,0,0}, /* cntl - d */ - {0x0c,0x68,0x69,0x0d,0,0,0}, /* cntl - e */ - {0x0c,0x54,0x55,0x0d,0,0,0}, /* cntl - f */ - {0x0c,0x52,0x53,0x0d,0,0,0}, /* cntl - g */ - {0x0c,0x50,0x51,0x0d,0,0,0}, /* cntl - h */ - {0x0c,0xc0,0xc1,0x0d,0,0,0}, /* cntl - i */ - {0x0c,0xd0,0xd1,0x0d,0,0,0}, /* cntl - j */ - {0x0c,0xd2,0xd3,0x0d,0,0,0}, /* cntl - k */ - {0x0c,0xd4,0xd5,0x0d,0,0,0}, /* cntl - l */ - {0x0c,0xe0,0xe1,0x0d,0,0,0}, /* cntl - m */ - {0x0c,0xf0,0xf1,0x0d,0,0,0}, /* cntl - n */ - {0x0c,0xc2,0xc3,0x0d,0,0,0}, /* cntl - o */ - {0x0c,0xc4,0xc5,0x0d,0,0,0}, /* cntl - p */ - {0x0c,0x6c,0x6d,0x0d,0,0,0}, /* cntl - q */ - {0x0c,0x66,0x67,0x0d,0,0,0}, /* cntl - r */ - {0x0c,0x58,0x59,0x0d,0,0,0}, /* cntl - s */ - {0x0c,0x64,0x65,0x0d,0,0,0}, /* cntl - t */ - {0x0c,0x60,0x61,0x0d,0,0,0}, /* cntl - u */ - {0x0c,0x32,0x33,0x0d,0,0,0}, /* cntl - v */ - {0x0c,0x6a,0x6b,0x0d,0,0,0}, /* cntl - w */ - {0x0c,0x36,0x37,0x0d,0,0,0}, /* cntl - x */ - {0x0c,0x62,0x63,0x0d,0,0,0}, /* cntl - y */ - {0x0c,0x38,0x39,0x0d,0,0,0}, /* cntl - z */ - {0x0c,0xc6,0xc7,0x0d,0,0,0}, /* cntl - [ */ - {0x0c,0xca,0xcb,0x0d,0,0,0}, /* cntl - \ */ - {0x0c,0xc8,0xc9,0x0d,0,0,0}, /* cntl - ] */ - {0x0c,0x0a,0x72,0x73,0x0b,0x0d,0}, /* cntl - ^ */ - {0x0c,0x0a,0xb6,0xb7,0x0b,0x0d,0}, /* cntl - _ */ - {0xf2,0xf3,0,0,0,0,0}, /* space */ - {0x0a,0x7c,0x7d,0x0b,0,0,0}, /* ! */ - {0x0a,0xd8,0xd9,0x0b,0,0,0}, /* " */ - {0x0a,0x78,0x79,0x0b,0,0,0}, /* # */ - {0x0a,0x76,0x77,0x0b,0,0,0}, /* $ */ - {0x0a,0x74,0x75,0x0b,0,0,0}, /* % */ - {0x0a,0x70,0x71,0x0b,0,0,0}, /* & */ - {0xd8,0xd9,0,0,0,0,0}, /* ' */ - {0x0a,0xb2,0xb3,0x0b,0,0,0}, /* ( */ - {0x0a,0xb4,0xb5,0x0b,0,0,0}, /* ) */ - {0x0a,0xb0,0xb1,0x0b,0,0,0}, /* * */ - {0x0a,0xb8,0xb9,0x0b,0,0,0}, /* + */ - {0xe2,0xe3,0,0,0,0,0}, /* , */ - {0xb6,0xb7,0,0,0,0,0}, /* - */ - {0xe4,0xe5,0,0,0,0,0}, /* . */ - {0xe6,0xe7,0,0,0,0,0}, /* / */ - {0xb4,0xb5,0,0,0,0,0}, /* 0 */ - {0x7c,0x7d,0,0,0,0,0}, /* 1 */ - {0x7a,0x7b,0,0,0,0,0}, /* 2 */ - {0x78,0x79,0,0,0,0,0}, /* 3 */ - {0x76,0x77,0,0,0,0,0}, /* 4 */ - {0x74,0x75,0,0,0,0,0}, /* 5 */ - {0x72,0x73,0,0,0,0,0}, /* 6 */ - {0x70,0x71,0,0,0,0,0}, /* 7 */ - {0xb0,0xb1,0,0,0,0,0}, /* 8 */ - {0xb2,0xb3,0,0,0,0,0}, /* 9 */ - {0x0a,0xd6,0xd7,0x0b,0,0,0}, /* : */ - {0xd6,0xd7,0,0,0,0,0}, /* ; */ - {0x0a,0xe2,0xe3,0x0b,0,0,0}, /* < */ - {0xb8,0xb9,0,0,0,0,0}, /* = */ - {0x0a,0xe4,0xe5,0x0b,0,0,0}, /* > */ - {0x0a,0xe6,0xe7,0x0b,0,0,0}, /* ? */ - {0x0a,0x7a,0x7b,0x0b,0,0,0}, /* @ */ - {0x0a,0x5a,0x5b,0x0b,0,0,0}, /* A */ - {0x0a,0x30,0x31,0x0b,0,0,0}, /* B */ - {0x0a,0x34,0x35,0x0b,0,0,0}, /* C */ - {0x0a,0x56,0x57,0x0b,0,0,0}, /* D */ - {0x0a,0x68,0x69,0x0b,0,0,0}, /* E */ - {0x0a,0x54,0x55,0x0b,0,0,0}, /* F */ - {0x0a,0x52,0x53,0x0b,0,0,0}, /* G */ - {0x0a,0x50,0x51,0x0b,0,0,0}, /* H */ - {0x0a,0xc0,0xc1,0x0b,0,0,0}, /* I */ - {0x0a,0xd0,0xd1,0x0b,0,0,0}, /* J */ - {0x0a,0xd2,0xd3,0x0b,0,0,0}, /* K */ - {0x0a,0xd4,0xd5,0x0b,0,0,0}, /* L */ - {0x0a,0xe0,0xe1,0x0b,0,0,0}, /* M */ - {0x0a,0xf0,0xf1,0x0b,0,0,0}, /* N */ - {0x0a,0xc2,0xc3,0x0b,0,0,0}, /* O */ - {0x0a,0xc4,0xc5,0x0b,0,0,0}, /* P */ - {0x0a,0x6c,0x6d,0x0b,0,0,0}, /* Q */ - {0x0a,0x66,0x67,0x0b,0,0,0}, /* R */ - {0x0a,0x58,0x59,0x0b,0,0,0}, /* S */ - {0x0a,0x64,0x65,0x0b,0,0,0}, /* T */ - {0x0a,0x60,0x61,0x0b,0,0,0}, /* U */ - {0x0a,0x32,0x33,0x0b,0,0,0}, /* V */ - {0x0a,0x6a,0x6b,0x0b,0,0,0}, /* W */ - {0x0a,0x36,0x37,0x0b,0,0,0}, /* X */ - {0x0a,0x62,0x63,0x0b,0,0,0}, /* Y */ - {0x0a,0x38,0x39,0x0b,0,0,0}, /* Z */ - {0xc6,0xc7,0,0,0,0,0}, /* [ */ - {0xca,0xcb,0,0,0,0,0}, /* \ */ - {0xc8,0xc9,0,0,0,0,0}, /* ] */ - {0x0a,0x72,0x73,0x0b,0,0,0}, /* ^ */ - {0x0a,0xb6,0xb7,0x0b,0,0,0}, /* _ */ - {0x7e,0x7f,0,0,0,0,0}, /* ` */ - {0x5a,0x5b,0,0,0,0,0}, /* a */ - {0x30,0x31,0,0,0,0,0}, /* b */ - {0x34,0x35,0,0,0,0,0}, /* c */ - {0x56,0x57,0,0,0,0,0}, /* d */ - {0x68,0x69,0,0,0,0,0}, /* e */ - {0x54,0x55,0,0,0,0,0}, /* f */ - {0x52,0x53,0,0,0,0,0}, /* g */ - {0x50,0x51,0,0,0,0,0}, /* h */ - {0xc0,0xc1,0,0,0,0,0}, /* i */ - {0xd0,0xd1,0,0,0,0,0}, /* j */ - {0xd2,0xd3,0,0,0,0,0}, /* k */ - {0xd4,0xd5,0,0,0,0,0}, /* l */ - {0xe0,0xe1,0,0,0,0,0}, /* m */ - {0xf0,0xf1,0,0,0,0,0}, /* n */ - {0xc2,0xc3,0,0,0,0,0}, /* o */ - {0xc4,0xc5,0,0,0,0,0}, /* p */ - {0x6c,0x6d,0,0,0,0,0}, /* q */ - {0x66,0x67,0,0,0,0,0}, /* r */ - {0x58,0x59,0,0,0,0,0}, /* s */ - {0x64,0x65,0,0,0,0,0}, /* t */ - {0x60,0x61,0,0,0,0,0}, /* u */ - {0x32,0x33,0,0,0,0,0}, /* v */ - {0x6a,0x6b,0,0,0,0,0}, /* w */ - {0x36,0x37,0,0,0,0,0}, /* x */ - {0x62,0x63,0,0,0,0,0}, /* y */ - {0x38,0x39,0,0,0,0,0}, /* z */ - {0x0a,0xc6,0xc7,0x0b,0,0,0}, /* { */ - {0x0a,0xca,0xcb,0x0b,0,0,0}, /* | */ - {0x0a,0xc6,0xc9,0x0b,0,0,0}, /* } */ - {0x0a,0x7e,0x7f,0x0b,0,0,0}, /* ~ */ - {0x0a,0x3e,0x3f,0x0b,0,0,0}}; /* delete */ -#endif Index: xc/programs/Xserver/hw/hp/input/screentab.h diff -u xc/programs/Xserver/hw/hp/input/screentab.h:1.2 xc/programs/Xserver/hw/hp/input/screentab.h:removed --- xc/programs/Xserver/hw/hp/input/screentab.h:1.2 Fri Dec 14 14:59:40 2001 +++ xc/programs/Xserver/hw/hp/input/screentab.h Thu Feb 27 12:29:23 2003 @@ -1,77 +0,0 @@ -/* $Xorg: screentab.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ -/* - -Copyright 1988, 1998 The Open Group - -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. - -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. - - -Copyright 1988 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this software -and its documentation for any purpose and without fee is hereby -granted, 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 -Hewlett-Packard not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ -/* - * Header file which declares structures to initialize and close - * each type of screen supported by the X server. - * - */ - -typedef struct { - char *productNumber; - char *productNickname; - Bool (*InfoScreen)(); - Bool (*InitScreen)(); - Bool (*CloseScreen)(); - } ScreenTableRec; - -typedef ScreenTableRec ScreenTable[]; - -typedef struct { - int position; - int left; - int right; - } MultiScreenRec; - -extern ScreenTable screenTable; - -extern MultiScreenRec multiScreenTable[]; Index: xc/programs/Xserver/hw/hp/input/x_hil.c diff -u xc/programs/Xserver/hw/hp/input/x_hil.c:3.3 xc/programs/Xserver/hw/hp/input/x_hil.c:removed --- xc/programs/Xserver/hw/hp/input/x_hil.c:3.3 Fri Dec 14 14:59:40 2001 +++ xc/programs/Xserver/hw/hp/input/x_hil.c Thu Feb 27 12:29:24 2003 @@ -1,1695 +0,0 @@ -/* $Xorg: x_hil.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ - -/******************************************************************* -** -** ********************************************************* -** * -** * File: ddx/hp/hp/x_hil.c -** * -** * Contents: Input event procedures for the -** * X/Starbase Merged Server -** * -** * Created: 4/28/88 -** * -** * Last Change: 12/05/88 -** * -** * Last Release: IC2 -** * -** * Revision: A.01.00 -** * -** * Author: --gms -** * -** * Copyright: (c) 1988 Hewlett-Packard Company -** * -** ********************************************************* -** -********************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hil.c,v 3.3 2001/12/14 19:59:40 dawes Exp $ */ - -/* - -Copyright 1988, 1998 The Open Group - -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. - -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. - - -Copyright 1988 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this software -and its documentation for any purpose and without fee is hereby -granted, 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 -Hewlett-Packard not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -#define NEED_EVENTS -#include "X.h" -#include "XI.h" -#include "Xproto.h" -#include "Xpoll.h" -#include "hildef.h" -#include "XHPproto.h" -#include "x_hil.h" -#include "x_serialdrv.h" -#include "hpkeys.h" -#include "windowstr.h" -#include "inputstr.h" -#include "hppriv.h" -#include <sys/times.h> -#include <sys/hilioctl.h> -#ifdef XKB -#include "XKBsrv.h" -extern Bool noXkbExtension; -#endif -#ifdef XINPUT -#include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ -#endif - -#define FIRST_EXTENSION_EVENT 64 -#define MIN_KEYCODE 8 - -#define ENQUEUE_EVENT(ev) \ - {if (xE.b.u.u.type != 0) /* at least 1 motion event */ \ - {ev = allocate_event();/* get current queue pointer*/ \ - *ev = xE; /* copy from global struct */ \ - xE = zxE;}} /* mark it as processed */ - -#ifdef XTESTEXT1 -/* - * defined in xtestext1di.c - */ -extern int on_steal_input; -extern int exclusive_steal; -#endif /* XTESTEXT1 */ - -/****************************************************************** - * - * Externs and variables referenced from other files. - * - */ - -extern char *mflg; -xEvent *format_ev(); -xHPEvent xE, zxE; - -#ifdef XINPUT -extern int DeviceMotionNotify; -extern int DeviceKeyPress; -extern int DeviceKeyRelease; -extern int DeviceButtonPress; -extern int DeviceButtonRelease; -extern int DeviceValuator; -extern int ProximityIn; -extern int ProximityOut; -#endif /* XINPUT */ -extern int axes_changed; -extern int keyboard_click; -extern int screenIsSaved; -extern int x_axis, y_axis; -extern int max_input_fd; -extern HPInputDevice l_devs[MAX_LOGICAL_DEVS]; -extern HPInputDevice *hpKeyboard; -extern HPInputDevice *hpPointer; -extern HPInputDevice *hptablet_extension; -extern WindowPtr *WindowTable; -extern InputInfo inputInfo; -extern DeviceIntPtr screen_change_dev; -extern DeviceIntPtr tablet_extension_device; - -extern unsigned tablet_xorg; -extern unsigned tablet_yorg; -extern unsigned tablet_xlimit; -extern unsigned tablet_ylimit; -extern u_int tablet_width; - -static Bool in_tablet_extension = FALSE; -static BoxRec LimitTheCursor; - - -u_char pointer_amt_bits[3]; -u_char ptr_mods, mv_mods, rs_mods, bw_mods; -Bool screen_was_changed = FALSE; -Bool reset_enabled = TRUE; -int hpActiveScreen = 0; /* active screen ndx (Zaphod) */ -int queue_events_free = MAX_EVENTS; -int pending_index; -int pending_bytes; -float acceleration; -int threshold; -struct x11EventQueue *events_queue; /* pointer to events queue. */ -xHPEvent *allocate_event(); -struct dev_info hil_info; /* holds hil_data */ - -/****************************************************************** - * - * Variables global to this file. - * - */ - -static DeviceIntPtr find_deviceintrec(); -static int process_inputs(); -static void process_serial_data(); -static check_subset_and_scale(); -static move_sprite(); -static send_motion(); -static send_button(); -static move_mouse(); -static u_char last_direction; -static u_char last_key; -static int k_down_flag[4]; -static int k_down_incx[4]; -static int k_down_incy[4]; - -/**************************************************************************** - * - * Process all available data from the input devices and put it on the server's - * internal events queue. When this routine is invoked, that queue is empty - * since the server empties it each time through its main dispatch loop. - * - * The server's internal queue can hold 256 events. If the server is busy for - * a long time, it is possible for the queue to fill up. In that case we - * can return with unread data, or data that is left in a global buffer. - * This routine must be prepared to handle such leftover data. - * - * After handling leftovers, this routine finds a file descriptor with data - * ready to be read and calls process_inputs to handle it. - * - */ - -CheckInput (blockData, result, pReadmask) - pointer blockData; - int result; - pointer pReadmask; - { - fd_set* LastSelectMask = (fd_set*)pReadmask; - fd_set mask, checkmask; - extern fd_set EnabledDevices; - int i; - int checkfd = max_input_fd; /* max fd valid for input*/ - int checkword = checkfd >> 5; /* max valid word of mask*/ - - if (result <= 0) - return; - XFD_ANDSET(&mask, LastSelectMask, &EnabledDevices); - if (!XFD_ANYSET(&mask)) - return; - - FD_ZERO(&checkmask); - - FD_SET(checkfd, &checkmask); /* corresponding mask */ - - for (i=checkword; i>=0; i--) /* for all mask words */ - { - while (mask.fds_bits[i] && - checkmask.fds_bits[i]) /* while input available*/ - { - if (mask.fds_bits[i] & checkmask.fds_bits[i]) /* current fd valid */ - { - mask.fds_bits[i] &= ~checkmask.fds_bits[i]; - process_inputs(checkfd); /* process its input */ - } - checkfd--; - checkmask.fds_bits[i] = checkmask.fds_bits[i] >> 1; - } - if (i>0) - { - checkfd = (i-1) * 32 + 31; - FD_SET(checkfd, &checkmask); /* corresponding mask */ - } - } - } - -/**************************************************************************** - * - * Find the device data structure that matches the file descriptor from which - * data will be read. Read up to 2000 bytes (HIL driver buffer is only 512) - * from that file descriptor. From the data read, get 1 HIL data packet. - * That packet may contain up to 8 keycodes and 1 motion event. In the case - * of a barcode reader in ASCII mode, each keycode may generate up to 6 - * X input events. The worst case is therefore 49 X events from 1 HIL data - * packet. - * - */ - -static int process_inputs (file_ds) - int file_ds; /* file_ds to read from */ - { - int i; - u_char *hil_ptr; - HPInputDevice *indevice = NULL; - DeviceIntPtr dev; - xHPEvent *xHP; - Bool done = FALSE; - - for (i=0; i<MAX_LOGICAL_DEVS; i++) - { - if (file_ds == l_devs[i].d.file_ds) - { - indevice = &(l_devs[i]); - break; - } - } - - dev = find_deviceintrec(indevice); - - while (!done) /* data yet to be processed */ - { - if (queue_events_free <= MAXHILEVENTS) /* no room on server queue */ - return; - hil_ptr = (unsigned char *) &hil_info;/* place to copy packet to*/ - done = get_serial_event (hil_ptr); - process_serial_data (dev, hil_info.hil_dev, &(hil_info)); - } - if (xE.b.u.u.type != 0) /* at least 1 motion event */ - { - xHP = allocate_event(); /* get current queue pointer*/ - *xHP = xE; /* copy from global struct */ - xE = zxE; /* mark it as processed */ - } - } - -/*************************************************************************** - * - * Given the HP device structure, find the DIX device structure that - * logically corresponds to it. There is a one-to-one correspondence, - * expect when the keyboard is also the X pointer, a tablet is subsetted, - * or an input device is merged with the X pointer or X keyboard. - * - * Callers: process_inputs(), read_shmhil(). - * - */ - -static -DeviceIntPtr find_deviceintrec (indevice) - HPInputDevice *indevice; - { - PtrFeedbackPtr p; - DeviceIntPtr dev = NULL; - - if (indevice != NULL) - { - hil_info.hil_dev = indevice; /* input device struct ptr */ - if (hptablet_extension && - indevice->d.file_ds==hptablet_extension->d.file_ds && - in_tablet_extension) - { - hil_info.hil_dev = hptablet_extension; - dev = tablet_extension_device; - } - else if (indevice==hpKeyboard || (indevice->x_type==KEYBOARD && - (indevice->hpflags & MERGED_DEVICE))) - dev = inputInfo.keyboard; - else if (indevice==hpPointer || (indevice->x_type==MOUSE && - (indevice->hpflags & MERGED_DEVICE))) - dev = inputInfo.pointer; -#ifdef XINPUT - else{ - for (dev = inputInfo.devices; - dev && ((HPInputDevice *)dev->public.devicePrivate != indevice); - dev = dev->next) - ; - if (!dev) - FatalError ("X server couldn't find current input device - Aborting.\n"); - } - - p = dev->ptrfeed; - if (p != NULL) - { - threshold = p->ctrl.threshold; - acceleration = (float) p->ctrl.num / (float) p->ctrl.den; - } -#endif /* XINPUT */ - if (acceleration == 0) - acceleration = 1; - } - else - FatalError ("X server couldn't find current input device - Aborting.\n"); - return (dev); - } - -/**************************************************************************** - * - * process the serial data packet and generate X input events as needed. - * - */ - -static u_int s_code[2]; - -static void process_serial_data (dev, phys, info) - DeviceIntPtr dev; - HPInputDevice *phys; - struct dev_info *info; - { - xEvent *ev; - u_int *hil_code; - u_char type, kcode; - - while (pending_index < pending_bytes ) - { - if (info->poll_hdr & MOTION_DATA) - { - handle_motion_event (dev, phys, info); - if (pending_index >= pending_bytes) - return; - } - - hil_code = s_code; - - if (phys->hpflags & DATA_IS_8_BITS) - *hil_code = (info->dev_data)[pending_index++]; - else if (phys->hpflags & DATA_IS_16_BITS) - { - *hil_code = ((info->dev_data)[pending_index+1] << 8) | - (info->dev_data)[pending_index]; - pending_index += 2; - } - else if (phys->hpflags & DATA_IS_32_BITS) - { - *hil_code = ((info->dev_data)[pending_index+3] << 24) | - (info->dev_data)[pending_index+2] << 16 | - (info->dev_data)[pending_index+1] << 8 | - (info->dev_data)[pending_index]; - pending_index += 4; - } - else - { - pending_index = pending_bytes; - return; - } - - if (info->poll_hdr & KEY_DATA) - { - /* Check to see if this is a "down" keycode for a key that is - already down. If so, and autorepeat has been disabled for - this key, ignore the key and return. - */ - - kcode = (u_char) (*hil_code >> 1); /* same code up & down */ - kcode += MIN_KEYCODE; /* avoid mouse codes. */ - - if (*hil_code & UP_MASK) - if (dev==inputInfo.keyboard || dev==inputInfo.pointer) - type = KeyRelease; - else - type = DeviceKeyRelease; - else - { - if (KeyIsDown(dev,kcode) && !KeyIsRepeating(dev,kcode)) - return; - if (dev==inputInfo.keyboard || dev==inputInfo.pointer) - type = KeyPress; - else - type = DeviceKeyPress; - } - - ev= format_ev (dev, type, kcode, info->timestamp, phys, NULL); - parse_keycode (dev, phys, ev); - } - else if (info->poll_hdr & BUTTON_DATA) - { - - if (dev==inputInfo.pointer) - type = (*hil_code & UP_MASK) ? ButtonRelease : ButtonPress; - else - type = (*hil_code & UP_MASK) ? DeviceButtonRelease - : DeviceButtonPress; - - ev= format_ev (dev, type,(*hil_code >>1) + 1,info->timestamp,phys,NULL); -#ifdef XTESTEXT1 - { - extern int on_steal_input; /* steal input mode is on. */ - extern int exclusive_steal; - - if (on_steal_input) - XTestStealKeyData(ev->u.u.detail, ev->u.u.type, MOUSE, - phys->coords[0], phys->coords[1]); - - if (exclusive_steal) - deallocate_event(ev); - } -#endif /* XTESTEXT1 */ - } -#ifdef XINPUT - else if (info->poll_hdr & PROXIMITY_DATA) - { - /* proximity HIL codes cause a different event type. - However, proximity is not reported for devices being - used as the X pointer, unless they have no buttons - (like a touchscreen), in which case the proximity is - treated as button 1. - */ - if (dev!=inputInfo.pointer) - { - type = (*hil_code & UP_MASK) ? ProximityOut : ProximityIn; - ev= format_ev (dev, type, 0, info->timestamp, phys, NULL); - return; - } - else if (phys->d.num_buttons == 0) - { - type = (*hil_code & UP_MASK) ? ButtonRelease : ButtonPress; - ev= format_ev (dev, type, 1, info->timestamp, phys, NULL); - } - else - return; /* proximity not reported for X pointer */ - } -#endif /* XINPUT */ - else - { - pending_index = pending_bytes; - return; - } - } - } - -/******************************************************************* - * - * handle_motion_event() - * - */ - -handle_motion_event (dev, phys, info) - DeviceIntPtr dev; - HPInputDevice *phys; - struct dev_info *info; - { - int i, type, bytes_coord; - int tmp, coords[MAX_AXES]; - char *sdata; - u_char *udata; - HPInputDevice *log; - - if (dev==inputInfo.pointer) - { - type = MotionNotify; - log = hpPointer; - } - else - { - type = DeviceMotionNotify; - log = phys; - } - if (phys->hpflags & DATA_IS_32_BITS) - bytes_coord = 4; - else if (phys->hpflags & DATA_IS_16_BITS) - bytes_coord = 2; - else - bytes_coord = 1; - - pending_index += phys->d.ax_num * bytes_coord; - - if (phys->hpflags & ABSOLUTE_DATA) /* absolute device */ - { - udata = info->dev_data; - for (i=0; i < (u_char) phys->d.ax_num; i++, udata+=bytes_coord) - if (bytes_coord == 1) - coords[i] = *udata; - else if (bytes_coord == 2) - coords[i] = *udata | *(udata+1) << 8; - else - coords[i] = *udata | (*(udata+1) << 8) | (*(udata+2) << 16) | - (*(udata+3) << 24); - - if (!check_subset_and_scale (&dev, phys, &log, coords)) - return; - } - else - { - sdata = (char *) info->dev_data; - for (i=0; i < (u_char) phys->d.ax_num; i++, sdata+=bytes_coord) - if (bytes_coord == 1) - coords[i] = *sdata; - else if (bytes_coord == 2) - coords[i] = *(sdata+1) << 8 | (*sdata & 0x0ff); - else - coords[i] = (*(sdata+3) << 24) | ((*(sdata+2) << 16) & 0x0ff)| - ((*(sdata+1) << 8) & 0xff) | (*sdata & 0x0ff); - } - - if (phys==hpPointer && axes_changed) - { - tmp = coords[0]; - coords[0] = coords[x_axis]; - if (y_axis==0) - coords[1] = tmp; - else - coords[1] = coords[y_axis]; - } - process_motion (dev, phys, log, coords, info->timestamp); - (void) format_ev (dev, type, 0, info->timestamp, log, &xE); - } - -/******************************************************************* - * - * check_subset_and_scale() - * all we care about is the x and y coordinates. - * - */ - -static -check_subset_and_scale (dev, phys, log, c) - DeviceIntPtr *dev; - HPInputDevice *phys; - HPInputDevice **log; - int c[]; - { - extern u_char screen_change_amt; - int i, n_axes = phys->d.ax_num; - - if (tablet_width && hptablet_extension) - if (c[0]< tablet_xorg || c[0] > tablet_xlimit || - c[1]> tablet_yorg || c[1] < tablet_ylimit) - { - in_tablet_extension = TRUE; - *dev = tablet_extension_device; - *log = hptablet_extension; - } - else - { - in_tablet_extension = FALSE; - } - - if (*log == hpPointer) - { - if (*dev == screen_change_dev) - c[0] = (float) (c[0]-tablet_xorg) * phys->scaleX-screen_change_amt; - else - c[0] = (float) (c[0]-tablet_xorg) * phys->scaleX; - c[1] = (*log)->pScreen->height - - ((float) (c[1]-tablet_ylimit) * phys->scaleY); - } - else - { - if (*dev == screen_change_dev) - c[0] -= screen_change_amt; - c[1] = phys->d.max_y - c[1]; /* Y-coord reversed.*/ - } - if (c[0]==(*log)->coords[0] && c[1]==(*log)->coords[1]) - return (FALSE); - for (i=0; i<n_axes; i++) - c[i] -= (*log)->coords[i]; - return (TRUE); - } - -/**************************************************************************** - * - * parse_keycode (dev, phys, ev, x_type) - * Parse keycode information. - * Buttons from a three-button mouse also end up here. - * - */ - -#define FIX_LED_CTRL(dev, d, ev, index, led) \ - {if (KeyUpEvent(ev) && dev->key->modifierKeyCount[index] <= 1) { \ - d.leds &= ~led; \ - dev->kbdfeed->ctrl.leds &= ~led; } \ - else { \ - d.leds |= led; \ - dev->kbdfeed->ctrl.leds |= led; }} - -int parse_keycode (dev, phys, ev) - DeviceIntPtr dev; - HPInputDevice *phys; - xEvent *ev; - { -#ifdef XTESTEXT1 - extern u_char xtest_command_key; /* defined in xtestext1dd.c */ -#endif /* XTESTEXT1 */ - u_char down_mods; - u_char key = ev->u.u.detail; - - if (hpPointer->x_type == KEYBOARD) - if (hpKeyboard->hpflags & SECOND_LOGICAL_DEVICE && - ((ev->u.keyButtonPointer.pad1==inputInfo.keyboard->id || - ev->u.keyButtonPointer.pad1==inputInfo.pointer->id ) && - move_sprite (dev, hpPointer, ev))) - return; - else - if (ev->u.keyButtonPointer.pad1==inputInfo.pointer->id && - (move_sprite (dev, hpPointer, ev))) - return; - - /* allow reset only from the X system keyboard, - and only if reset is enabled. */ - - if (key==reset && reset_enabled) - if ((hpKeyboard->hpflags & SECOND_LOGICAL_DEVICE && - (ev->u.keyButtonPointer.pad1==inputInfo.keyboard->id || - ev->u.keyButtonPointer.pad1==inputInfo.pointer->id)) || - ev->u.keyButtonPointer.pad1==inputInfo.keyboard->id) - { - get_down_modifiers (inputInfo.keyboard, &down_mods); - if ((rs_mods & down_mods) == rs_mods) - GiveUp(0); - } - - /* Special case handling for toggling keys. These are keys - that are bound to one of the X modifiers, and have been - made into toggling keys. This currently only includes Caps Lock. - If a key is pressed that is bound to a toggling key, - turn on the appropriate LED and treat the key as a toggle. - */ - -#ifdef XKB - if (noXkbExtension) { -#endif - - if (IsToggleKey(dev, phys, key)) /* toggling key pressed */ - { - if (KeyIsIgnored(phys,key)) - { - if (KeyDownEvent(ev)) - UnignoreKey(phys,key); - ExpectUpKey(phys,key); /* for handling autorepeat */ - deallocate_event (ev); - return; - } - else if (KeyDownEvent(ev)) - { - if (UpIsExpected(phys,key)) /* key is autorepeating */ - { - deallocate_event (ev); - return; - } - IgnoreKey(phys,key); - } - else if (KeyUpEvent(ev)) - DontExpectUpKey(phys,key); - - if (DeviceHasLeds(phys)) - { - int led, index; - HPKeyboardFeedbackControl d; - - copy_kbd_ctrl_params (&d, &dev->kbdfeed->ctrl); - if (index = IsLockKey(dev, key)) - FIX_LED_CTRL(dev, d, ev, index, CAPSLOCK_LED); - - (*(phys->s.write)) (phys->d.file_ds, _XChangeFeedbackControl, &d); - } - } -#ifdef XKB - } -#endif - -#ifdef XTESTEXT1 - if (on_steal_input) - { - XTestStealKeyData(key, ev->u.u.type, phys->x_type, - ev->u.keyButtonPointer.rootX, ev->u.keyButtonPointer.rootY); - if (exclusive_steal) - { - if (key != xtest_command_key) - deallocate_event (ev); - } - else if (key == xtest_command_key) - deallocate_event (ev); - } -#endif /* XTESTEXT1 */ - } - -/************************************************************************ - * - * This routine checks to see if the key should be interpreted as a - * sprite movement or a button. - * - */ - -static move_sprite (dev, phys, ev) - DeviceIntPtr dev; - HPInputDevice *phys; - xEvent *ev; - { - u_char down_mods; - u_char key = ev->u.u.detail; - u_char type = ev->u.u.type; - int inc; - Bool motion_mods; - - get_down_modifiers (dev, &down_mods); - if (down_mods & (~ptr_mods & ~mv_mods)) - motion_mods = FALSE; - else if ((down_mods & ptr_mods) == ptr_mods) - motion_mods = TRUE; - else - motion_mods = FALSE; - - if (!(down_mods & mv_mods)) - inc = pointer_move; - else if ((down_mods & mv_mods) == pointer_amt_bits[0]) - inc = pointer_mod1_amt; - else if ((down_mods & mv_mods) == pointer_amt_bits[1]) - inc = pointer_mod2_amt; - else if ((down_mods & mv_mods) == pointer_amt_bits[2]) - inc = pointer_mod3_amt; - else - motion_mods = FALSE; - - k_down_incy[DOWN] = inc; - k_down_incx[RIGHT] = inc; - k_down_incy[UP] = inc * -1; - k_down_incx[LEFT] = inc * -1; - - if (key==cursor_down && type==KeyPress && motion_mods) - return (send_motion (phys, ev, 0, inc, DOWN)); - else if (key==cursor_down && type==KeyRelease) - { - k_down_flag[DOWN] = 0; - return (1); - } - else if (key==cursor_left && type==KeyPress && motion_mods) - return (send_motion (phys, ev, inc * -1, 0, LEFT)); - else if (key==cursor_left && type==KeyRelease) - { - k_down_flag[LEFT] = 0; - return (1); - } - else if (key==cursor_right && type==KeyPress && motion_mods) - return (send_motion (phys, ev, inc, 0, RIGHT)); - else if (key==cursor_right && type==KeyRelease) - { - k_down_flag[RIGHT] = 0; - return (1); - } - else if (key==cursor_up && type==KeyPress && motion_mods) - return (send_motion (phys, ev, 0, inc * -1, UP)); - else if (key==cursor_up && type==KeyRelease) - { - k_down_flag[UP] = 0; - return (1); - } - else - { - if (type==KeyPress) - type = ButtonPress; - if (type==KeyRelease) - type = ButtonRelease; - - if (key == button_1) - return (send_button (ev, type, 1)); - else if (key == button_2) - return (send_button (ev, type, 2)); - else if (key == button_3) - return (send_button (ev, type, 3)); - else if (key == button_4) - return (send_button (ev, type, 4)); - else if (key == button_5) - return (send_button (ev, type, 5)); - else if (key == button_6) - return (send_button (ev, type, 6)); - else if (key == button_7) - return (send_button (ev, type, 7)); - else if (key == button_8) - return (send_button (ev, type, 8)); - } - return (0); - } - -/**************************************************************************** - * - * Send motion information from the keyboard, when it is the pointer device. - * - */ - -static send_motion (phys, ev, x, y, which) - HPInputDevice *phys; - xEvent *ev; - int x, y, which; - { - int coords[MAX_AXES]; - unsigned int time; - int i; - - for (i=0; i<4; i++) - if (i != which && k_down_flag[i] != 0) - { - x += k_down_incx[i]; - y += k_down_incy[i]; - } - coords[0] = x; - coords[1] = y; - k_down_flag[which] = 1; - time = ev->u.keyButtonPointer.time; - deallocate_event(ev); - process_motion (inputInfo.pointer, phys, hpPointer, coords, time); - ev = format_ev (inputInfo.pointer, MotionNotify, 0, time, hpPointer, &xE); - return (1); - } - -/**************************************************************************** - * - * Send button information from the keyboard, when it is the pointer device. - * - */ - -static send_button (ev, direction, bcode) - xEvent *ev; - u_char direction, bcode; - { - - if (bcode == last_key && direction == last_direction) - deallocate_event(ev); - else - { - ev->u.u.type = direction; - ev->u.u.detail = bcode; - last_key = bcode; - last_direction = direction; -#ifdef XTESTEXT1 - if (on_steal_input) - XTestStealKeyData(ev->u.u.detail, ev->u.u.type, MOUSE, - ev->u.keyButtonPointer.rootX, ev->u.keyButtonPointer.rootY); -#endif /* XTESTEXT1 */ - } - - return (1); - } - -/**************************************************************************** - * - * process_motion (hil_info) - * - * This function may also be called from x_threebut.c and x_tablet.c. - * It requires the motion passed to be a relative amount. - * dev_hp and dev are the logical devices, phys is the actual device. - * - */ - -#define DEF_ACCELERATION 1 -#define EDGE_L 1 << 0 -#define EDGE_R 1 << 1 -#define EDGE_T 1 << 2 -#define EDGE_B 1 << 3 - -/* - * Use the change_xmax and change_amt from the physical device. - * This is needed for the case where an absolute device like a tablet - * has its input merged with a relative device like a mouse. - * - */ - -#define OffRightEdge(log, phys) (log->coords[0] > (phys->change_xmax + \ - (int) phys->change_amt) ? EDGE_R : 0) -#define OffLeftEdge(log, phys) (log->coords[0] < (phys->change_xmin - \ - (int) phys->change_amt) ? EDGE_L : 0) -#define OffTopEdge(log, phys) (log->coords[1] < (phys->change_ymin - \ - (int) phys->change_amt) ? EDGE_T : 0) -#define OffBottomEdge(log, phys) (log->coords[1] > (phys->change_ymax + \ - (int) phys->change_amt) ? EDGE_B : 0) - -process_motion (dev, phys, log, c, timestamp) - DeviceIntPtr dev; - HPInputDevice *phys, *log; - int c[]; - unsigned int timestamp; - { - int i; - unsigned int state = 0; - extern int playback_on; - ScreenPtr newScreen = log->pScreen; - - /* Compute x,y taking care of desired threshold and acceleration - * No acceleration if we're playing back a recorded test script. - * No acceleration for absolute pointing devices. - * No acceleration if we're using the default (1) acceleration. - */ - - if (!playback_on) - { - if (!(phys->hpflags & ABSOLUTE_DATA) && - (acceleration != DEF_ACCELERATION)) - { - for (i=0; i < (u_char) log->d.ax_num; i++) - if ( (c[i] - threshold) > 0) - c[i] = threshold + (c[i] - threshold) * acceleration; - else if ( (c[i] + threshold) < 0) - c[i] = (c[i] + threshold) * acceleration - threshold; - } - } - - /* - * If this is the pointer or a device whose input is merged - * with the pointer, accumulate the motion and maintain a current position. - * If this is a relative device, save the current movement. - */ - - if (log == hpPointer || (phys->hpflags & ABSOLUTE_DATA)) - for (i=0; i< (int) log->d.ax_num; i++) - log->coords[i] = log->coords[i] + c[i]; - else - for (i=0; i< (u_char) log->d.ax_num; i++) - log->coords[i] = c[i]; - - /* - * Change the screen if we have more than one screen, - * and the screen change device has gone off one of the edges, - * and the device is not grabbed and confined. - */ - - if ( screenInfo.numScreens > 1 && - dev->id == screen_change_dev->id && - (!dev->grab || !dev->grab->confineTo)) - { - if ((state=OffRightEdge(log,phys)) || (state=OffLeftEdge(log,phys)) || - (state = OffTopEdge(log,phys)) || (state = OffBottomEdge(log,phys))) - { - if (!screen_was_changed) - change_the_screen (dev, phys, log, state, &newScreen); - } - else - /* - * Needed for the case where a tablet is the X pointer device. - * Once we change screens, we want to avoid immediately changing - * back. We change when we enter the screen change area and - * do not change again until after we have left it. - */ - screen_was_changed = FALSE; - } - if (phys == hptablet_extension && phys->clients == NULL) - return; - /* - * Clip the cursor to stay within the bound of screen. - */ - if (log == hpPointer) - { - log->coords[0] = - max( LimitTheCursor.x1, min( LimitTheCursor.x2,log->coords[0])); - log->coords[1] = - max( LimitTheCursor.y1, min( LimitTheCursor.y2,log->coords[1])); - } - move_mouse (log, timestamp); - } - -/**************************************************************************** - * - * change_the_screen() - * We have more than one screen, and the screen_change_device has been moved - * off one of the edges. Change to another screen. - * - */ - -#define INCREMENT_SCREEN_BY_ONE(p,l) (screenInfo.screens[(p->myNum+1) % \ - screenInfo.numScreens]) - -#define DECREMENT_SCREEN_BY_ONE(p,l) (p->myNum != 0 ? \ - screenInfo.screens[p->myNum-1] : \ - screenInfo.screens[screenInfo.numScreens - 1]) - -#define INCREMENT_SCREEN_BY_TWO(p,l) (screenInfo.screens[(p->myNum+2) % \ - screenInfo.numScreens]) - -#define DECREMENT_SCREEN_BY_TWO(p,l) (p->myNum > 1 ? \ - screenInfo.screens[p->myNum-2] : \ - screenInfo.screens[p->myNum + screenInfo.numScreens - 2]) - -change_the_screen (dev, phys, log, state, newScreen) - DeviceIntPtr dev; - HPInputDevice *phys, *log; /* logical device */ - unsigned int state; - ScreenPtr *newScreen; - { - ScreenPtr oldScreen = log->pScreen; - - if (screen_col_wrap == DEFAULT) - { - if (screen_orientation == VERTICAL) - screen_col_wrap = WRAP; - else - screen_col_wrap = NOWRAP; - } - - if (screen_row_wrap == DEFAULT) - { - if (screen_orientation == HORIZONTAL) - screen_row_wrap = WRAP; - else - screen_row_wrap = NOWRAP; - } - - - switch (state) - { - case EDGE_L: - if (screen_row_wrap == NOWRAP && - (screen_orientation == VERTICAL || - (oldScreen->myNum == 0 || - (oldScreen->myNum == 2 && screen_orientation == MATRIX )))) - return; - - if (screen_orientation == VERTICAL) - { - if (screen_row_wrap == CHANGE_BY_TWO) - { - *newScreen = DECREMENT_SCREEN_BY_TWO(oldScreen,log); - } - } - else if (screen_orientation == HORIZONTAL) - { - *newScreen = DECREMENT_SCREEN_BY_ONE(oldScreen,log); - } - else /* MATRIX */ - { - if (oldScreen->myNum % 2) - { - *newScreen = DECREMENT_SCREEN_BY_ONE(oldScreen,log); - } - else if (screen_row_wrap == WRAP) - { - if (!(screenInfo.numScreens == 3 && oldScreen->myNum == 2)) - { - *newScreen = INCREMENT_SCREEN_BY_ONE(oldScreen,log); - } - } - else - break; - } - - if (!(phys->hpflags & ABSOLUTE_DATA)) - log->coords[0] += (oldScreen->width - log->change_xmin); - break; - case EDGE_R: - if (screen_row_wrap == NOWRAP && - (screen_orientation == VERTICAL || - (oldScreen->myNum == (screenInfo.numScreens-1) || - (oldScreen->myNum == 1 && screen_orientation == MATRIX )))) - return; - - if (screen_orientation == VERTICAL) - { - if (screen_row_wrap == CHANGE_BY_TWO) - { - *newScreen = INCREMENT_SCREEN_BY_TWO(oldScreen,log); - } - } - else if (screen_orientation == HORIZONTAL) - { - *newScreen = INCREMENT_SCREEN_BY_ONE(oldScreen,log); - } - else /* MATRIX */ - { - if (oldScreen->myNum % 2) - { - if (screen_row_wrap == WRAP) - { - *newScreen = DECREMENT_SCREEN_BY_ONE(oldScreen,log); - } - else - break; - } - else if (!(screenInfo.numScreens == 3 && oldScreen->myNum == 2)) - { - *newScreen = INCREMENT_SCREEN_BY_ONE(oldScreen,log); - } - else if (screen_row_wrap != WRAP) - break; - } - - if (!(phys->hpflags & ABSOLUTE_DATA)) - log->coords[0] -= (oldScreen->width); - break; - case EDGE_T: - if (screen_col_wrap == NOWRAP && - (screen_orientation == HORIZONTAL || - (oldScreen->myNum == (screenInfo.numScreens-1) || - (oldScreen->myNum == 2 && screen_orientation == MATRIX )))) - return; - - if (screen_orientation == HORIZONTAL) - { - if (screen_col_wrap == CHANGE_BY_TWO) - { - *newScreen = INCREMENT_SCREEN_BY_TWO(oldScreen,log); - } - } - else if (screen_orientation == VERTICAL) - { - *newScreen = INCREMENT_SCREEN_BY_ONE(oldScreen,log); - } - else /* MATRIX */ - { - if (oldScreen->myNum >= 2) - { - if (screen_col_wrap == WRAP) - { - *newScreen = DECREMENT_SCREEN_BY_TWO(oldScreen,log); - } - else - break; - } - else if (!(screenInfo.numScreens == 3 && oldScreen->myNum == 1)) - { - *newScreen = INCREMENT_SCREEN_BY_TWO(oldScreen,log); - } - else if (screen_col_wrap != WRAP) - break; - } - - if (!(phys->hpflags & ABSOLUTE_DATA)) - log->coords[1] += (oldScreen->height); - break; - case EDGE_B: - if (screen_col_wrap == NOWRAP && - (screen_orientation == HORIZONTAL || - (oldScreen->myNum == 0 || - (oldScreen->myNum == 1 && screen_orientation == MATRIX)))) - return; - - if (screen_orientation == HORIZONTAL) - { - if (screen_col_wrap == CHANGE_BY_TWO) - { - *newScreen = DECREMENT_SCREEN_BY_TWO(oldScreen,log); - } - } - else if (screen_orientation == VERTICAL) - { - *newScreen = DECREMENT_SCREEN_BY_ONE(oldScreen,log); - } - else /* MATRIX */ - { - if (oldScreen->myNum >= 2) - { - *newScreen = DECREMENT_SCREEN_BY_TWO(oldScreen,log); - } - else if (screen_col_wrap == WRAP) - { - if (! (screenInfo.numScreens == 3 && oldScreen->myNum == 1)) - { - *newScreen = INCREMENT_SCREEN_BY_TWO(oldScreen,log); - } - } - else - break; - } - - if (!(phys->hpflags & ABSOLUTE_DATA)) - log->coords[1] -= (oldScreen->height); - break; - } - - hpMoveCursorToNewScreen(*newScreen, log); - } - -/**************************************************************************** - * - * hpMoveCursorToNewScreen() - * Turn the cursor off on the old screen. - * Call the display driver ChangeScreen routine. - * This routine is also called from the display driver SetCursorPosition - * routine. - * - */ - -#include <stdio.h> - -hpMoveCursorToNewScreen(newScreen, InDev) - ScreenPtr newScreen; - HPInputDevice *InDev; - { - WindowPtr pRootWin; - int tx, ty; - hpPrivPtr php = (hpPrivPtr) InDev->pScreen->devPrivate; - - php->CursorOff (InDev->pScreen); - set_scale_and_screen_change (inputInfo.pointer, InDev, newScreen); - (*((hpPrivPtr)(newScreen->devPrivate))->ChangeScreen) (newScreen); - InDev->pScreen = newScreen; - if (InDev == hptablet_extension) - { - tx = InDev->coords[0] < tablet_xorg ? 0 : newScreen->width; - ty = (float) InDev->coords[1] * InDev->scaleY; - NewCurrentScreen(newScreen, tx, ty); - } - else - NewCurrentScreen(newScreen, InDev->coords[0], InDev->coords[1]); - hpActiveScreen = newScreen->myNum; - screen_was_changed = TRUE; - - if (inputInfo.pointer->grab && inputInfo.pointer->grab->cursor) - newScreen->DisplayCursor(newScreen,inputInfo.pointer->grab->cursor); - else if (!(pRootWin = WindowTable[newScreen->myNum])) - newScreen->DisplayCursor(newScreen,(CursorPtr) NULL); - else - newScreen->DisplayCursor(newScreen,pRootWin->optional->cursor); - } - -/**************************************************************************** - * - * move_mouse () - * move the sprite, if the device is the pointer. - * Also move it if some other device is sending MotionNotify events. - * In any case, send a motion event to dix. - * - * This routine may also be called from xtest1dd.c - * - */ - -static -move_mouse (log, event_time) - HPInputDevice *log; /* logical device */ - int event_time; /* event timestamp */ - { - int i; - int axes = log->d.ax_num; - - if (log == hpPointer) - (*log->pScreen->SetCursorPosition) (log->pScreen, log->coords[0], log->coords[1], FALSE); - - *log->dpmotionBuf++ = event_time; - for (i=0; i<axes; i++) - *log->dpmotionBuf++ = log->coords[i]; - - if((log->dheadmotionBuf + 100 * (axes+1)) == log->dpmotionBuf) - log->dpmotionBuf = log->dheadmotionBuf; - } - -/************************************************************************** - * - * Called by: hpMouseProc during device initialization, process_motion - * whenever we change screens. - * - * This routine sets the scaling factor to be used for absolute pointing - * devices like graphics tablets. Input from these devices is scaled to - * the screen size. If we have a multi-screen environment, the scaling - * factor must be changed whenever the screen changes. - * - * This routine also sets the margin at the screen edge that will be used - * to change screens. For tablets, this is initially 0, allowing the - * entire tablet surface to be used by the application. If a tablet is - * the X pointer and a multi-screen environment is being used, the - * screen_change_amt variable should be initialized to some value (like 30) - * to define a area at the tablet edges that will cause the screen to change. - * - * Tablet subsetting adds more complications. The user can define a subset - * area that used as the X pointer, while the remainder of the tablet surface - * is treated as a second logical device. It is this second logical device - * that controls screen changes. - * - */ -set_scale_and_screen_change (dev,d,newScreen) - DeviceIntPtr dev; - HPInputDevice *d; - ScreenPtr newScreen; - { - int tmp, res_mm; - - /* Absolute device: graphics tablet or touchscreen */ - - if (d->hpflags & ABSOLUTE_DATA) - { - res_mm = d->d.resolution / 1000; - - /* Tablet subsetting enabled and this is the pointer region. - This is called only during initialization, since when - we change screens, the device is the second logical device. */ - - if (tablet_width && dev->id == inputInfo.pointer->id) - { - tablet_xorg = tablet_xorigin * res_mm; - tablet_xlimit = tablet_xorg + tablet_width * res_mm; - tmp = d->d.max_y - (tablet_yorigin * res_mm); - tablet_yorg = tmp > 0 ? tmp : 0; - tmp = tablet_yorg - (tablet_height * res_mm); - if (tmp > 0) - tablet_ylimit = tmp; - else - { - tablet_ylimit = 0; - tablet_height = tablet_yorg / res_mm; - if (!tablet_height) - tablet_height = 1; - } - d->scaleX = ((float) newScreen->width) / - ((float)tablet_width * res_mm ); - d->scaleY = ((float) newScreen->height) / - ((float)tablet_height * res_mm ); - d->change_xmin = 0; - d->change_xmax = newScreen->width; - d->change_amt = 0; - } - else - - /* This code is called if we are initializing the second logical - device, or if tablet subsetting is not enabled. It is also - called when we are changing screens with a tablet as the X - pointer device. - - */ - { - /* - Set scale for the case where the tablet is the X pointer. - The scale is also returned to clients via XHPListInputDevices. - */ - d->scaleX = ((float) (newScreen->width+2*screen_change_amt)) / - ((float)d->d.max_x); - d->scaleY = ((float)newScreen->height) / - ((float)d->d.max_y); - if (tablet_width) - { - /* If this is the second logical device, we must also - change the scale of the X pointer. Since input from - absolute extension devices is not scaled, the - screen change amounts units are tablet counts. - */ - hpPointer->scaleX = ((float) newScreen->width) / - ((float)tablet_width * res_mm ); - hpPointer->scaleY = ((float) newScreen->height) / - ((float)tablet_height * res_mm ); - d->change_xmin = res_mm * screen_change_amt; - d->change_xmax = d->d.max_x - d->change_xmin; - d->change_ymin = res_mm * screen_change_amt; - d->change_ymax = d->d.max_y - d->change_xmin; - d->change_amt = 0; - } - else - /* The tablet is the X pointer. Screen change units - are in pixels, since the input will be scaled. - */ - { - d->change_xmin = 1; - d->change_xmax = newScreen->width - 2; - d->change_ymin = 1; - d->change_ymax = newScreen->height - 2; - d->change_amt = 0; - } - } - } - else - - /* This code is called when a relative device is initialized, - and when we are changing screens with a relative device. - These devices (mice, trackballs, dialboxes, spaceballs) - cause us to change screens by generating values that are - beyond the edge of the screen. - */ - - { - d->change_xmin = 0; - d->change_xmax = newScreen->width; - d->change_ymin = 0; - d->change_ymax = newScreen->height; - d->change_amt = screen_change_amt; - } - } - -/**************************************************************************** - * - * queue_motion_event () - * This is a convenience routine for xosSetCursorPosition. - * It is used to artifically generate a motion event when WarpPointer - * request is made. - * - */ - -queue_motion_event (dev_p) - HPInputDevice *dev_p; - { - int i; - int axes = dev_p->d.ax_num; - extern TimeStamp currentTime; - int ev_time = currentTime.milliseconds; - - *dev_p->dpmotionBuf++ = ev_time; - for (i=0; i<axes; i++) - *dev_p->dpmotionBuf++ = dev_p->coords[i]; - - if((dev_p->dheadmotionBuf + 100 * (axes+1)) == dev_p->dpmotionBuf) - dev_p->dpmotionBuf = dev_p->dheadmotionBuf; - - (void) format_ev (inputInfo.pointer, MotionNotify, 0, ev_time, dev_p, NULL); - xE.b.u.u.type = 0; - } - -/**************************************************************************** - * - * format_ev ( ) - * format one or more key, button, motion or proximity xEvents. - * This routine assumes devices have less than 6 axes, or report only - * one axis per event. - */ - -#define AXES_PER_EVENT 6 - -xEvent * -format_ev (dev, type, detail, event_time, log, event) - DeviceIntPtr dev; - u_char type; - u_char detail; - unsigned int event_time; - HPInputDevice *log; - xHPEvent *event; - { - int first_val = 0, val_data = 0; - int i, j; - int n_axes = log->d.ax_num; - INT32 *ip; - xEvent *ret = NULL; - Bool compressing = FALSE; - - if (log->hpflags & NON_CONTIGUOUS_DATA) - for (j=0; j < (u_char) log->d.ax_num; j++) - if (log->coords[j]!=0) - { - first_val = j; - val_data = log->coords[j]; - break; - } - - for (i=0; (i==0 || i<n_axes); i+=AXES_PER_EVENT) - { - if (event==NULL) - { - ENQUEUE_EVENT(event); - event = allocate_event(); - } - else if ((event->b.u.keyButtonPointer.pad1 & 0x7f) != dev->id || - ((log->hpflags & NON_CONTIGUOUS_DATA) && - event->x.first_valuator != first_val)) - { - ENQUEUE_EVENT(event); - event = &xE; - } - else - compressing = TRUE; - if (!ret) - ret = (xEvent *) event; - - event->b.u.u.type = type; - event->b.u.u.detail = detail; - event->b.u.keyButtonPointer.time = event_time; - event->b.u.keyButtonPointer.rootX = hpPointer->coords[0]; - event->b.u.keyButtonPointer.rootY = hpPointer->coords[1]; - event->b.u.keyButtonPointer.pad1 = dev->id; -#ifdef XINPUT - if (type >= FIRST_EXTENSION_EVENT) - { - event->b.u.keyButtonPointer.pad1 |= MORE_EVENTS; - event->x.type = DeviceValuator; - event->x.deviceid = dev->id; - - if (log->hpflags & NON_CONTIGUOUS_DATA) - { - event->x.num_valuators = 1; - event->x.first_valuator = first_val; - if (compressing && !(log->hpflags & ABSOLUTE_DATA)) - event->x.valuator0 += val_data; - else - event->x.valuator0 = val_data; - return (ret); - } - else - { - event->x.num_valuators = - log->d.ax_num < AXES_PER_EVENT ? - log->d.ax_num : i==0 ? AXES_PER_EVENT: - log->d.ax_num - AXES_PER_EVENT; - - event->x.first_valuator = i; - ip = &event->x.valuator0; - for (j=i; j<i+6; j++) - if ( j < (u_char) log->d.ax_num) - if (compressing && - !(log->hpflags & ABSOLUTE_DATA)) - *ip++ += log->coords[j]; - else - *ip++ = log->coords[j]; - else - *ip++ = 0; - event = NULL; - } - } -#endif /* XINPUT */ - } - - return (ret); - } - -/******************************************************************** - * - * ProcessInputEvents() - * This routine is invoked from the dispatcher to route events. - * It invokes the dix routines to do this. - * - */ - -void ProcessInputEvents() - { - int id, i; - INT32 *ip; - int count; - xHPEvent *event; - DeviceIntPtr dev; - Bool checkedscreensave = FALSE; - - while ( events_queue->head != events_queue->tail) - { - if (!checkedscreensave) - { - if (screenIsSaved==SCREEN_SAVER_ON) - SaveScreens (SCREEN_SAVER_OFF, ScreenSaverReset); - checkedscreensave = TRUE; - } - event = &((events_queue->events)[(events_queue->head)]); - - switch (event->b.u.u.type) - { - case KeyPress: - if (keyboard_click) - { - KeybdCtrl ctrl; - dev = (DeviceIntPtr) LookupKeyboardDevice (); - ctrl.click = dev->kbdfeed->ctrl.click; - ctrl.bell = 0; - hpBell(0, dev, &ctrl, 0); - } - case KeyRelease: - dev = (DeviceIntPtr) LookupKeyboardDevice (); - (*dev->public.processInputProc) ((xEventPtr) event, dev, 1); - break; - case ButtonPress: - case ButtonRelease: - case MotionNotify: - dev = (DeviceIntPtr) LookupPointerDevice (); - (*dev->public.processInputProc) ((xEventPtr) event, dev, 1); - break; - default: - #ifdef XINPUT - id = event->b.u.keyButtonPointer.pad1 & DEVICE_BITS; - if (!(event->b.u.keyButtonPointer.pad1 & MORE_EVENTS)) - count=1; - else - count=2; - dev = LookupDeviceIntRec (id); - if (dev == NULL) - break; - if (event->b.u.u.type == DeviceKeyPress) - { - if (dev->kbdfeed && dev->kbdfeed->ctrl.click) - { - KeybdCtrl ctrl; - ctrl.click = dev->kbdfeed->ctrl.click; - ctrl.bell = 0; - hpBell(0, dev, &ctrl, 0); - } - } - else if (event->b.u.u.type == DeviceMotionNotify) - { - ip = &event->x.valuator0; - for (i=0; i < (u_char) event->x.num_valuators; i++) - dev->valuator->axisVal[i] = *(ip+i); - } - (*dev->public.processInputProc) ((xEventPtr) event, dev, count); -#endif /* XINPUT */ - break; - } - - if (events_queue->head == WR_EVENTS) - events_queue->head = 0; - else - events_queue->head++; - - } - queue_events_free = WR_EVENTS; - } - -Bool -get_serial_event (hil_ptr) - struct dev_info *hil_ptr; /* holds hil_data */ - { - HPInputDevice *d = hil_ptr->hil_dev; - int status; - - hil_ptr->timestamp = GetTimeInMillis(); - hil_ptr->poll_hdr = 0; - pending_index=0; - pending_bytes=0; - bzero (hil_ptr->dev_data, 36); - status = (*(d->s.read)) - (d->d.file_ds, hil_ptr->dev_data, &hil_ptr->poll_hdr, &pending_bytes); - if (status==READ_SUCCESS) - return(FALSE); - else - return(TRUE); - } - -/************************************************************ - * hpConstrainCursor - * - * This function simply sets the box to which the cursor - * is limited. - * - * A single BoxRec is used for recording the cursor limits, - * instead of one per screen. This is ok because DIX will - * call this routine to establish new limits anytime the - * cursor leaves one screen for another. - * - ************************************************************/ - -void -hpConstrainCursor (pScreen,pBox) -ScreenPtr pScreen; /* Screen to which it should be constrained */ -BoxPtr pBox; /* Box in which... */ -{ - HPInputDevice *d; - - LimitTheCursor = *pBox; - d = GET_HPINPUTDEVICE (inputInfo.pointer); - if (d->pScreen !=pScreen) - hpMoveCursorToNewScreen(pScreen, d); -} Index: xc/programs/Xserver/hw/hp/input/x_hil.h diff -u xc/programs/Xserver/hw/hp/input/x_hil.h:1.2 xc/programs/Xserver/hw/hp/input/x_hil.h:removed --- xc/programs/Xserver/hw/hp/input/x_hil.h:1.2 Fri Dec 14 14:59:41 2001 +++ xc/programs/Xserver/hw/hp/input/x_hil.h Thu Feb 27 12:29:24 2003 @@ -1,97 +0,0 @@ -#ifndef X_HIL_H -#define X_HIL_H -/* $Xorg: x_hil.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ -/* - -Copyright 1988, 1998 The Open Group - -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. - -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. - - -Copyright 1988 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this software -and its documentation for any purpose and without fee is hereby -granted, 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 -Hewlett-Packard not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ -#include "hpext.h" - -/* MAXHILEVENTS is the maximum number of X events that can - be put on the events queue as the result of reading a - single HIL data packet. The HIL definition is that - a packet may contain one motion event and up to 8 bytes - of key data. If the key device is a barcode reader in - ASCII mode, we translate each ASCII code into up to 6 - keycodes. The maximum number of X events that can be - generated from a single HIL packet is therefore 49. - - MAX_EVENTS is the size of the server's internal queue of - input events. X input is a two-step process, with the - first step consisting of reading input events from the - device and putting them on this internal queue. Later - in the dispatch loop, that queue is emptied and all the - events are routed by DIX to the appropriate clients. - - The size of the event queue is not as large as the - theoretical maximum, but motion events are compressed - into a single event until a key or button is seen. - - The worst at all reasonable case is alternating key and - motion data, which would result in less than 50 events. - A more reasonable guess is 20 events per device. - Our queue size therefore allows for the worst case on - 5 - 10 devices simultaneously. -*/ - -#define MAXHILEVENTS 49 -#define MOTION_BUFFER_SIZE 100 -#define MAX_EVENTS 256 -#define WR_EVENTS MAX_EVENTS-1 - -struct x11EventQueue - { - xHPEvent *events; - int size; - int head; - int tail; - }; - -#endif Index: xc/programs/Xserver/hw/hp/input/x_hilinit.c diff -u xc/programs/Xserver/hw/hp/input/x_hilinit.c:3.5 xc/programs/Xserver/hw/hp/input/x_hilinit.c:removed --- xc/programs/Xserver/hw/hp/input/x_hilinit.c:3.5 Fri Dec 14 14:59:41 2001 +++ xc/programs/Xserver/hw/hp/input/x_hilinit.c Thu Feb 27 12:29:24 2003 @@ -1,2389 +0,0 @@ -/* $Xorg: x_hilinit.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ -/* - -Copyright 1988, 1998 The Open Group - -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. - -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. - - -Copyright 1988 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this software -and its documentation for any purpose and without fee is hereby -granted, 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 -Hewlett-Packard not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ -/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hilinit.c,v 3.5 2001/12/14 19:59:41 dawes Exp $ */ - -#define NEED_EVENTS -#define NITEMS(array) (sizeof(array)/sizeof(array[0])) -#define BEEPER_DEVICE "/dev/rhil" -#define UNINITIALIZED 1 -#define EXPLICIT 0x80 -#define XEXTENSION 3 -#define XPTR_USE (1 << XPOINTER) -#define XKBD_USE (1 << XKEYBOARD) -#define XOTH_USE (1 << XOTHER) -#define XEXT_USE (1 << XEXTENSION) -#define DIN_KBD_DRVR "hp7lc2k.sl" -#define DIN_KBD_INIT "hp7lc2k_Init" -#define DIN_KBD_PATH "/dev/ps2kbd" -#define DIN_MOUSE_DRVR "hp7lc2m.sl" -#define DIN_MOUSE_INIT "hp7lc2m_Init" -#define DIN_MOUSE_PATH "/dev/ps2mouse" - -#ifndef LIBDIR -#if OSMAJORVERSION >= 10 -#define LIBDIR "/etc/X11" -#else -#define LIBDIR "/usr/lib/X11" -#endif -#define DRVRLIBDIR "/usr/lib/X11/extensions" -#endif - -#ifndef DRVRLIBDIR -#define DRVRLIBDIR LIBDIR/**/"/extensions" -#endif - -#include <stdio.h> -#include <errno.h> -#include <dl.h> -#include <sys/fcntl.h> -#include "ps2io.h" - -#include "X.h" -#include "Xproto.h" -#include "hildef.h" -#include "XHPproto.h" /* extension constants */ -#include "XHPlib.h" /* DEFAULT_DIRECTORY */ -#include "x_hilinit.h" -#include "x_hil.h" -#include "x_serialdrv.h" -#include "inputstr.h" -#include "../../../os/osdep.h" - -#ifdef XINPUT -#include "XI.h" -#include "XIproto.h" -#include "XIstubs.h" -#else -#define Relative 0 -#define Absolute 1 -#endif /* XINPUT */ - -#include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ - -#ifdef XKB -#undef IsKeypadKey -#include <X11/extensions/XKB.h> -#include <X11/extensions/XKBstr.h> -#include <X11/extensions/XKBsrv.h> -#endif - -/****************************************************************** - * - * Externs and global variables that may be referenced by other files. - * - */ - -char *mflg="TRUE"; -HPInputDevice *hpKeyboard; -HPInputDevice *hpPointer; -HPInputDevice *hptablet_extension; - -#ifdef XINPUT -extern int BadDevice; -extern int BadMode; -extern int IReqCode; -extern int DeviceKeyPress; -extern int DeviceKeyRelease; -extern int DeviceButtonPress; -extern int DeviceButtonRelease; -extern int DeviceMotionNotify; -XID hp_device_ids[MAX_DEVICES]; -XID x_device_ids[MAX_DEVICES]; -#endif /* XINPUT */ - -extern u_char mv_mods, ptr_mods, rs_mods, bw_mods; -extern u_char pointer_amt_bits[]; -extern char *display; /* display number as a string */ -extern int queue_events_free; -extern struct x11EventQueue *events_queue; -extern InputInfo inputInfo; - -int hpddxScreenPrivIndex; -u_char identity_map[256]; -int axes_changed = FALSE; -int keyboard_click; -int allocated_dev_names = FALSE; -int x_axis, y_axis; - -int otherndx; -int max_input_fd; -unsigned char xhp_kbdid; -unsigned tablet_xlimit; -unsigned tablet_ylimit; -unsigned tablet_xorg; -unsigned tablet_yorg; - -HPInputDevice l_devs[MAX_DEVICES]; -DeviceIntPtr tablet_extension_device; -DeviceIntPtr screen_change_dev; - -int HPType; - -/****************************************************************** - * - * Variables that are global to this file only. - * - */ - -static DevicePtr hpAddInputDevice(); -static void RecordOpenRequest(); -static void SetInputDevice(); -static void mask_from_kcodes(); - -void ProcessOtherEvent(); - -static xHPEvent events_array[MAX_EVENTS]; /* input event buffer*/ -static struct x11EventQueue ev_queue; - -recalculate_x_name () {} - -void hpBell(percent, dev, ctrl, foo) - int percent, foo; - DeviceIntPtr dev; - KeybdCtrl *ctrl; -{ - HPKeyboardFeedbackControl dc; - HPInputDevice *d = GET_HPINPUTDEVICE ((DeviceIntPtr) dev); - - dc.class = KbdFeedbackClass; - dc.bell_pitch = ctrl->bell_pitch; - dc.bell_duration = ctrl->bell_duration; - - dc.bell_percent = percent; - if (!percent) - dc.click = ctrl->click; - else - dc.click = 0; - (*(d->s.write)) (d->d.file_ds, _XBell, &dc); -} - -/**************************************************************************** - * - * Procedures to control Integer and String feedbacks. - * These are not used by currently supported devices, but serial input devices - * could use them. - */ - -static hpChangeIntegerControl(pDevice, ctrl) - DevicePtr pDevice; - IntegerCtrl *ctrl; - { - HPIntegerFeedbackControl dc; - HPInputDevice *d = GET_HPINPUTDEVICE ((DeviceIntPtr) pDevice); - - dc.class = IntegerFeedbackClass; - dc.resolution = ctrl->resolution; - dc.max_value = ctrl->max_value; - dc.integer_displayed = ctrl->integer_displayed; - (*(d->s.write)) (d->d.file_ds, _XChangeFeedbackControl, &dc); - } - -static hpChangeStringControl(pDevice, ctrl) - DevicePtr pDevice; - StringCtrl *ctrl; - { - HPStringFeedbackControl dc; - HPInputDevice *d = GET_HPINPUTDEVICE ((DeviceIntPtr) pDevice); - - dc.class = StringFeedbackClass; - dc.max_symbols = ctrl->max_symbols; - dc.num_symbols_supported = ctrl->num_symbols_supported; - dc.num_symbols_displayed = ctrl->num_symbols_displayed; - dc.symbols_supported = (int *) ctrl->symbols_supported; - dc.symbols_displayed = (int *) ctrl->symbols_displayed; - (*(d->s.write)) (d->d.file_ds, _XChangeFeedbackControl, &dc); - } - -static hpChangeBellControl(pDevice, ctrl) - DevicePtr pDevice; - BellCtrl *ctrl; - { - HPBellFeedbackControl dc; - HPInputDevice *d = GET_HPINPUTDEVICE ((DeviceIntPtr) pDevice); - - dc.class = BellFeedbackClass; - dc.percent = ctrl->percent; - dc.pitch = ctrl->pitch; - dc.duration = ctrl->duration; - (*(d->s.write)) (d->d.file_ds, _XChangeFeedbackControl, &dc); - } - -/**************************************************************************** - * - * Change acceleration & threshold. - * The DIX routine that handles the ChangePointerControl request has - * already validity checked the values and copied them into the - * DeviceIntRec. This routine just copies them into fields that are - * the same no matter what kind of device we're dealing with. - * - */ - -static hpChangePointerControl(pDevice, ctrl) - DevicePtr pDevice; - PtrCtrl *ctrl; - { - HPInputDevice *d; - HPPointerFeedbackControl dc; -#ifdef XINPUT - PtrFeedbackPtr b; - - /* Set the default initial acceleration to 1 if this isn't the X pointer */ - - if ((DeviceIntPtr) pDevice != inputInfo.pointer && !pDevice->on) - { - ctrl->num = 1; - ctrl->den = 1; - } - - b = ((DeviceIntPtr) pDevice)->ptrfeed; - - b->ctrl = *ctrl; -#else - extern int threshold; - extern float acceleration; - - threshold = ctrl->threshold; - acceleration = (float) ctrl->num / (float) ctrl->den; - if (acceleration <= 0) - acceleration = 1; -#endif /* XINPUT */ - - d = GET_HPINPUTDEVICE ((DeviceIntPtr) pDevice); - dc.class = PtrFeedbackClass; - dc.num = ctrl->num; - dc.den = ctrl->den; - dc.threshold = ctrl->threshold; - (*(d->s.write)) (d->d.file_ds, _XChangeFeedbackControl, &dc); - } - -/**************************************************************************** - * - * The members of the ledCtrl structure have the following values: - * - * mask: 1 bit per LED. - * value: if mask set, turn it on or off. - * - */ - -static hpChangeLedControl(pDevice, ctrl) - DevicePtr pDevice; - LedCtrl *ctrl; - { - HPInputDevice *d; - HPLedFeedbackControl dc; - - d = GET_HPINPUTDEVICE ((DeviceIntPtr) pDevice); - dc.class = LedFeedbackClass; - dc.led_values = ctrl->led_values; - dc.led_mask = ctrl->led_mask; - (*(d->s.write)) (d->d.file_ds, _XChangeFeedbackControl, &dc); - } - -/**************************************************************************** - * - * The members of the keybdCtrl structure have the following values: - * - * click: 0(off) - 100 (loud); -1 => default; - * bell: 0(off) - 100 (loud); -1 => default; - * bell_pitch: Pitch of the bell in Hz;-1 => default; - * bell_duration: in miliseconds; -1 => default; - * - * keyboard_click is checked whenever a key is pressed, in x_hil.c. - */ - -static hpChangeKeyboardControl(pDevice, ctrl) - DevicePtr pDevice; - KeybdCtrl *ctrl; - { - HPInputDevice *d; - HPKeyboardFeedbackControl dc; - - if (inputInfo.keyboard && - ((DeviceIntPtr) pDevice)->id==inputInfo.keyboard->id) - keyboard_click = (int)((double)(ctrl->click) * 15.0 / 100.0); - - d = GET_HPINPUTDEVICE ((DeviceIntPtr) pDevice); - copy_kbd_ctrl_params (&dc, ctrl); - (*(d->s.write)) (d->d.file_ds, _XChangeFeedbackControl, &dc); - } - -copy_kbd_ctrl_params (dctrl, ctrl) - HPKeyboardFeedbackControl *dctrl; - KeybdCtrl *ctrl; - { - dctrl->class = KbdFeedbackClass; - dctrl->click = ctrl->click; - dctrl->bell_percent = ctrl->bell; - dctrl->bell_pitch = ctrl->bell_pitch; - dctrl->bell_duration = ctrl->bell_duration; - dctrl->autoRepeat = ctrl->autoRepeat; - memmove(dctrl->autoRepeats, ctrl->autoRepeats, 32); - dctrl->leds = ctrl->leds; - } - -/**************************************************************************** - * - * hpGetDeviceMotionEvents. - * - */ -static int hpGetDeviceMotionEvents (dev, coords, start, stop, pScreen) - DeviceIntPtr dev; - CARD32 start, stop; - xTimecoord *coords; - ScreenPtr pScreen; - { - HPInputDevice *pHP = (HPInputDevice *) dev->public.devicePrivate; - int i, evcount = 0; - int size = pHP->d.ax_num + 1; - int *first, *last, *curr; - int *buffp = (int *) coords; - int *pmBuf = pHP->dpmotionBuf; - int *hmBuf = pHP->dheadmotionBuf; - - if (pmBuf == hmBuf) - { - if (*pmBuf == 0) /* no events yet */ - { - return 0; - } - else - last = hmBuf + (99 * size); - } - else - last = pmBuf-size; - - if (*pmBuf == 0) /* haven't wrapped yet */ - first = hmBuf; - else - first = pmBuf; - - if (start > *last) /* start time > last time */ - return 0; - else - { - curr = first; - while (*curr < start) - { - curr += size; - if (curr == hmBuf+(100*size)) - curr = hmBuf; - if (curr == first) - return 0; - } - while (*curr <= stop && *curr != 0) - { - if (dev == inputInfo.pointer) /*X pointer is 16 bits/axis */ - { - *buffp++ = *curr++; /* copy the time */ - *buffp++ = *curr << 16 | *(curr+1); /* copy data for 2 axes */ - curr += 2; - } - else /* other devices are 32 bits */ - for (i=0; i<size; i++) - *buffp++ = *curr++; - evcount++; - if (curr == hmBuf+(100*size)) - curr = hmBuf; - if (curr == first) - break; - } - } - return (evcount); - } - -/**************************************************************************** - * - * NOTE: The first parameter passed to this routine is really a DeviceIntPtr. - * The declaration used here works because the first element of the - * structure pointed to by the DeviceIntPtr is a DeviceRec. - * - */ - -#define DIN_MINKEYCODE 16 -unsigned char DIN_AUTOREPEATS[] = -{0xff,0xff,0xff,0xf3,0xfb,0xff,0xff,0xff, - 0xfb,0xff,0xff,0xff,0xf9,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; - -#define HIL_MINKEYCODE 8 -#define HIL_MINKEYCODE2 10 -unsigned char HIL_AUTOREPEATS[] = -{0x00,0x82,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; - -extern Bool noXkbExtension; - -static Bool hpDeviceProc(pDev, onoff) - DevicePtr pDev; - int onoff; - { - KeySymsRec *key_syms, keysym_rec; - CARD8 *the_modmap; - DeviceIntPtr dev = (DeviceIntPtr) pDev; - HPInputDevice *pHP = (HPInputDevice *) pDev->devicePrivate; - HPInputDeviceHeader *pd = &pHP->d; - int i, j; - int mbufsiz =(pHP->d. ax_num * sizeof(int) + sizeof(Time)) * - MOTION_BUFFER_SIZE; - unsigned char *ptrf; - HPStrF *ptrs; - char *x_basename(); -#ifdef XINPUT - char *strchr(); -#endif /* XINPUT */ - - switch (onoff) - { - case DEVICE_INIT: - pDev->on = FALSE; - pHP->pScreen = screenInfo.screens[0]; - AssignTypeAndName (pDev, pHP->x_atom, x_basename(pd->x_name)); - - if (pd->num_keys > 0) - { - if (!HPKget_kb_info_by_name(pd->keymap_file, - pd->keymap_name, &keysym_rec, &the_modmap)) - FatalError ("Can't find a keymap in the %s/XHPKeymaps file for device %s.\n", - LIBDIR, pd->x_name); - key_syms = &keysym_rec; - if (dev->id == inputInfo.keyboard->id) - { - KeyCode tmp; - extern KeyCode xtest_command_key; /* see xtestext1dd.c */ - - -#ifdef XKB - if (noXkbExtension) { -#endif - InitKeyboardDeviceStruct(pDev, key_syms, the_modmap, - (BellProcPtr) hpBell, - (KbdCtrlProcPtr) hpChangeKeyboardControl); -#ifdef XKB - } else { - XkbComponentNamesRec names; - - names.keymap = NULL; - names.types = "types/complete"; - names.compat = "compat/complete"; - if ((pHP->id_detail & PS2_KEYBD) == PS2_KEYBD) { - names.keycodes = "keycodes/hp"; - names.symbols = "symbols/us(pc101)"; - names.geometry = "geometry/hp"; - } else { - names.keycodes = "keycodes/hp(hil)"; - names.symbols = "symbols/hp/us(hil)"; - names.geometry = "geometry/hp(hil)"; - }; - XkbInitKeyboardDeviceStruct((DeviceIntPtr) pDev, &names, - key_syms, the_modmap, (BellProcPtr) hpBell, - (KbdCtrlProcPtr) hpChangeKeyboardControl); - } -#endif - - - get_pointerkeys(); - fix_modifierkeys(); - if ((tmp=HPKeySymToKeyCode (dev, XK_F9))) - xtest_command_key = tmp; - - } -#ifdef XINPUT - else - { - InitKeyClassDeviceStruct (dev, key_syms, the_modmap); - InitKbdFeedbackClassDeviceStruct (dev, - (BellProcPtr) hpBell, - (KbdCtrlProcPtr) hpChangeKeyboardControl); - InitFocusClassDeviceStruct (dev); - } - if (dev->key->curKeySyms.minKeyCode==DIN_MINKEYCODE) - memmove(dev->kbdfeed->ctrl.autoRepeats, DIN_AUTOREPEATS, 32); - else if (dev->key->curKeySyms.minKeyCode==HIL_MINKEYCODE || - dev->key->curKeySyms.minKeyCode==HIL_MINKEYCODE2) - memmove(dev->kbdfeed->ctrl.autoRepeats, HIL_AUTOREPEATS, 32); - } - - for (j=0, ptrf=pd->feedbacks; j<pd->num_fdbk; j++,ptrf++) - if (*ptrf == IntegerFeedbackClass) - InitIntegerFeedbackClassDeviceStruct ( dev, - (IntegerCtrlProcPtr) hpChangeIntegerControl); - else if (*ptrf == BellFeedbackClass) - InitBellFeedbackClassDeviceStruct ( dev, - (BellProcPtr) hpBell, - (BellCtrlProcPtr) hpChangeBellControl); - else if (*ptrf == KbdFeedbackClass) - InitKbdFeedbackClassDeviceStruct( dev, - (BellProcPtr) hpBell, - (KbdCtrlProcPtr) hpChangeKeyboardControl); - else if (*ptrf == PtrFeedbackClass) - InitPtrFeedbackClassDeviceStruct( dev, - (PtrCtrlProcPtr) hpChangePointerControl); - for (j=0, ptrf=pd->ledf; j<pd->num_ledf; j++,ptrf++) - InitLedFeedbackClassDeviceStruct ( dev, - (LedCtrlProcPtr) hpChangeLedControl); - for (j=0, ptrs=pd->strf; j<pd->num_strf; j++, ptrs++) - InitStringFeedbackClassDeviceStruct ( dev, - (StringCtrlProcPtr) hpChangeStringControl, - ptrs->max_symbols, - ptrs->num_symbols_supported, - (KeySym *) ptrs->symbols_supported); -#endif /* XINPUT */ - - if (pd->ax_num) - { - if (dev->id == inputInfo.pointer->id) - { - if (pHP->dev_type == NULL_DEVICE) - { - pHP->coords[0] = pHP->pScreen->width; - pHP->coords[1] = pHP->pScreen->height; - } - else - { - pHP->coords[0] = pHP->pScreen->width / 2; - pHP->coords[1] = pHP->pScreen->height / 2; - } - InitPointerDeviceStruct (pDev, ptr_button_map, - (pd->num_buttons ? pd->num_buttons : 3), - hpGetDeviceMotionEvents, - (PtrCtrlProcPtr) hpChangePointerControl, - MOTION_BUFFER_SIZE); - } -#ifdef XINPUT - else - { - InitFocusClassDeviceStruct (dev); - if (pHP->iob & HILIOB_PIO) - InitProximityClassDeviceStruct (dev); - InitValuatorClassDeviceStruct (dev, pd->ax_num, - hpGetDeviceMotionEvents, 100, - (pHP->hpflags & ABSOLUTE_DATA)?1:0); - InitPtrFeedbackClassDeviceStruct (dev, - (PtrCtrlProcPtr) hpChangePointerControl); - } - InitValuatorAxisStruct (dev, 0, 0, (u_int) pd->max_x, - (u_int) pd->resolution, 0, (u_int) pd->resolution); - if (pd->ax_num > 1) - InitValuatorAxisStruct (dev, 1, 0, (u_int) pd->max_y, - (u_int) pd->resolution, 0, (u_int) pd->resolution); - if (dev->id != inputInfo.pointer->id) - for (i=2; i < (u_char) pd->ax_num; i++) - InitValuatorAxisStruct (dev, i, 0, (u_int) pd->max_x, - (u_int) pd->resolution, 0, (u_int) pd->resolution); - - pHP->dpmotionBuf = (int *) Xalloc (mbufsiz); - memset (pHP->dpmotionBuf, 0, mbufsiz); - pHP->dheadmotionBuf = pHP->dpmotionBuf; - } - - if (pd->num_buttons && dev->id != inputInfo.pointer->id) - InitButtonClassDeviceStruct(dev, pd->num_buttons, identity_map); -#endif /* XINPUT */ - break; - case DEVICE_ON: - pDev->on = TRUE; - if (pHP != NULL) - { - if (pHP->dev_type != NULL_DEVICE) - AddEnabledDevice (pd->file_ds); - if (pd->ax_num) - set_scale_and_screen_change (dev, pHP, pHP->pScreen); - } - break; - case DEVICE_OFF: - pDev->on = FALSE; - if (dev->button) { - memset(dev->button->down, 0, DOWN_LENGTH); - dev->button->state = 0; - dev->button->buttonsDown = 0; - pHP->button_state = 0; - } - if (dev->key) { - memset(dev->key->down, 0, DOWN_LENGTH); - dev->key->state = 0; - dev->key->prev_state = 0; - } - if (dev->id != inputInfo.pointer->id && - pd->file_ds == hpPointer->d.file_ds) - break; - if (pHP != NULL && pd->file_ds>= 0) - { - RemoveEnabledDevice(pd->file_ds); - close_device (pHP); - } - break; - case DEVICE_CLOSE: - if ( pHP != NULL && pd->file_ds >= 0) - { - RemoveEnabledDevice (pd->file_ds); - close_device (pHP); - } -#ifdef XINPUT - if (pHP->dheadmotionBuf) - { - Xfree (pHP->dheadmotionBuf); - pHP->dheadmotionBuf = NULL; - pHP->dpmotionBuf = NULL; - } -#endif /* XINPUT */ - break; - } - return(Success); - } - -/**************************************************************************** - * - * InitInput -- - * Initialize pointer and keyboard devices. - * - */ - -void InitInput(argc, argv) - int argc; - char **argv; - { - int i, j; - DeviceIntPtr x_init_device(); - int CheckInput(); - - mflg = (char *)getenv("XHPPRINTDEBUGMSG"); - max_input_fd = 0; - x_axis = 0; - y_axis = 1; - axes_changed = FALSE; - hpPointer = NULL; - hpKeyboard = NULL; - hptablet_extension = NULL; - tablet_width = 0; - otherndx = 2; - for (i=0; i<256; i++) - identity_map[i]=i; - - RegisterBlockAndWakeupHandlers ((BlockHandlerProcPtr) NoopDDA, - (WakeupHandlerProcPtr) CheckInput, (pointer) NULL); - get_pointerkeys(); - for (i=0; i<MAX_LOGICAL_DEVS; i++) - clear_device_private(&l_devs[i]); - init_dynamic_devs (l_devs); /* load input drivers. */ - - if (hpPointer->x_type == KEYBOARD) - { - hpPointer->d.num_buttons = 8; - hpPointer->d.ax_num = 2; - } - - init_events_queue ( &ev_queue); - /* - * Now initialize the devices as far as X is concerned. - */ - - for (i=0, j=0; i<MAX_DEVICES && j < MAX_LOGICAL_DEVS; j++) - { - if (l_devs[j].id == 1 || /* inaccessible device*/ - (l_devs[j].dev_type == NULL_DEVICE && - !(l_devs[j].hpflags & OPEN_THIS_DEVICE))) - continue; - if (l_devs[j].d.file_ds != -1) - (void) x_init_device (&l_devs[j], TRUE); - else - (void) x_init_device (&l_devs[j], FALSE); - i++; - } - } - -HPInputDevice *next_device_private() - { - int i; - HPInputDevice *d = l_devs; - - for (i=0; i<MAX_DEVICES; i++, d++) - if (d->id == 1) - return d; - - for (i=0,--d; i<MAX_DEVICES; i++, d--) - if (d->d.file_ds <= 1 && d->driver_name[0] == '\0') - return d; - - return NULL; - } - -/*********************************************************** - * - * Set up the tablet for subsetting. - * - */ -fix_tablet_subsetting() - { - int i; - HPInputDevice *d; - - if (hpPointer->d.x_name != NULL && !strstr (hpPointer->d.x_name, "TABLET")) - { - for (i=MAX_LOGICAL_DEVS-1; i>=0; i--) - if (l_devs[i].d.x_name != NULL && - strstr(l_devs[i].d.x_name, "TABLET")) - break; - if (i>=0) - { - if (hpPointer->hpflags & SECOND_LOGICAL_DEVICE) - { - hpPointer->hpflags &= ~SECOND_LOGICAL_DEVICE; - hpPointer->d.file_ds = -1; - } - else - close_device(hpPointer); - hpPointer = &l_devs[i]; - open_device(hpPointer); - } - else - return; - } - if (d = next_device_private()) - { - *d = *hpPointer; /* will also be an extension device */ - d->hpflags |= SECOND_LOGICAL_DEVICE; - } - } - -/*********************************************************** - * - * Perform X initialization for the device. - * - */ - -DeviceIntPtr -x_init_device (dev, start_it) - HPInputDevice *dev; - Bool start_it; - { - DevicePtr pXDev; - - pXDev = hpAddInputDevice(hpDeviceProc, start_it, dev); - if (dev==hpKeyboard) - { - RegisterKeyboardDevice(pXDev); - if (dev->dev_type == KEYBOARD) - xhp_kbdid = dev->id - 0xA0; - } - if (dev==hpPointer) - { - RegisterPointerDevice(pXDev); - if (dev->x_type == KEYBOARD) - InitKbdFeedbackClassDeviceStruct ((DeviceIntPtr) pXDev, - (BellProcPtr) hpBell, - (KbdCtrlProcPtr) hpChangeKeyboardControl); - screen_change_dev = (DeviceIntPtr) pXDev; - if (screen_change_amt == SCREEN_CHANGE_DEFAULT) - if (dev->hpflags & ABSOLUTE_DATA) - screen_change_amt = 0; - else - screen_change_amt = 30; - } -#ifdef XINPUT - if (dev != hpPointer && dev != hpKeyboard) - { - RegisterOtherDevice(pXDev); - if (tablet_width && dev->d.file_ds==hpPointer->d.file_ds) - { - tablet_extension_device = (DeviceIntPtr) pXDev; - hptablet_extension = dev; - screen_change_dev = tablet_extension_device; - } - } -#endif /* XINPUT */ - - return ((DeviceIntPtr) pXDev); - } - -/*********************************************************************** - * - * Initialize default input devices. - * If this machine supports HIL, use the last keyboard and mouse. - * If none are present, use the last key and pointer device. - * - */ - -clear_device_private(d) - HPInputDevice *d; - { - - memset(d, 0, sizeof(HPInputDevice)); - d->id = UNINITIALIZED; - d->d.keymap_name = ""; - d->d.file_ds = -1; - d->driver_name[0] = '\0'; - d->d.path[0] = '\0'; - d->d.file_ds = HP_VENDOR_RELEASE_NUMBER; - d->d.button_chording = 0; - if (button_chording == CHORDING_ON) - { - d->d.button_chording = 100; - d->d.reserved[0] = button_latching; - } - } - -/**************************************************************************** - * - * open_device opens one of the input devices. - * The path is filled in by device_files(), or is the default. - * If the open fails, it may be because the keyboard and pointer - * are the same device, and the device is already open. - * - */ - -open_device (d) - HPInputDevice *d; - { - - d->led[NLOCK] = LockMask; - d->d.reserved[0] = 0; - d->d.reserved[2] = 0; - d->d.file_ds = HP_VENDOR_RELEASE_NUMBER; - if (button_chording == CHORDING_ON) - { - d->d.button_chording = 100; - d->d.reserved[0] = button_latching; - } - if ((*(d->s.configure)) (&d->d) != INIT_SUCCESS) - return(-1); - init_device_private (d, FALSE); - return (d->d.file_ds); - } - -/* ******************************************************************** */ -/* ************************* Parse X*devices ************************** */ -/* ******************************************************************** */ - -static struct _X_devices - { - char *x_name; - int dev_type; - } X_devices[] = {{XI_KEYBOARD, KEYBOARD}, - {"NULL", NULL_DEVICE}}; - -static char *h_position[] = -{ - "FIRST", - "SECOND", - "THIRD", - "FOURTH", - "FIFTH", - "SIXTH", - "SEVENTH" - }; - -static void uppercase(str) char *str; /* convert str to upper case */ - { for (; *str; str++) *str = toupper(*str); } - - -/* - * Formats: - * |#comment - * | #comment - * |word [#comment] - * | word [#comment] - * |word word [#comment] - * |word word word [#comment] - * |word word word word [#comment] - */ - -static int is_null_needed(null_needed, keyboard_is_pointer) - Bool *null_needed; - int *keyboard_is_pointer; - { - FILE *fp; - int i, parms, ipos, itype, use_as; - char fname[256], buf[256], pos[256], x_name[256], use[256]; - - sprintf(fname, "%s/X%sdevices",LIBDIR, display); - fp = fopen (fname, "r"); - if (fp == NULL) - return; - while (fgets(buf,MAXNAMLEN+1,fp) != NULL) - { - buf[strlen(buf)-1] = pos[0] = x_name[0] = use[0] = '\0'; - - parms = sscanf(buf, "%s%s%s", pos, x_name, use); - if (parms != 3 || pos[0] == '#' || x_name[0] == '#' || use[0] == '#') - continue; /* blank or comment, skip it */ - /* or not the syntax we want */ - - /* Parse lines with 3 parameters, such as: - * first keyboard pointer - * first null keyboard - * first null pointer - */ - - uppercase(pos); - for (i=0; i<NITEMS(h_position); i++) - if (0 == strcmp(h_position[i], pos)) - { - ipos = i + 1; /* h_position[0] = "FIRST" == 1 */ - break; - } - if (i >= 7) /* failed, skip this entry */ - continue; - - uppercase(x_name); - for (i=0; i<NITEMS(X_devices); i++) - if (0 == strcmp(X_devices[i].x_name,x_name)) - { - itype = X_devices[i].dev_type; - break; - } - if (i == NITEMS(devices)) /* failed, skip this entry */ - continue; - - uppercase(use); - if (0 == strcmp(use, "POINTER")) use_as = XPTR_USE; - else if (0 == strcmp(use, "KEYBOARD")) use_as = XKBD_USE; - else if (0 == strcmp(use, "OTHER")) use_as = XOTH_USE; - else - continue; - - if (itype == NULL_DEVICE && use_as == XKBD_USE) - *null_needed = TRUE; - if (itype == NULL_DEVICE && use_as == XPTR_USE) - *null_needed = TRUE; - if (itype == KEYBOARD && use_as == XPTR_USE) - *keyboard_is_pointer = TRUE; - } - fclose(fp); - } - -/******************************************************************** - * - * check_for_duplicates(). - * - * Check to see if a device that is already open has been specified. - * - */ - -static Bool check_for_duplicates(d) - HPInputDevice *d; - { - int i; - HPInputDevice *tmp; - - for (i=0,tmp=l_devs; i<NITEMS(l_devs); i++,tmp++) - if (strcmp(tmp->d.path, d->d.path)==0 && tmp->d.file_ds >= 0 && - tmp->d.file_ds != HP_VENDOR_RELEASE_NUMBER) - { - if (strcmp(d->entry, DIN_KBD_INIT)==0 && (d->use & XPTR_USE)) - { - *d = *tmp; - tmp->hpflags |= SECOND_LOGICAL_DEVICE; - hpPointer = d; - hpPointer->use = XPTR_USE; - return FALSE; - } - d->d.path[0] = '\0'; - d->driver_name[0] = '\0'; - d->entry[0] = '\0'; - d->use = 0; - return FALSE; - } - return TRUE; - } - -/******************************************************************** - * - * - * - * - */ - -get_next_device(fd, d) - FILE *fd; - HPInputDevice *d; - { - int len; - char buf[256], key[256], var[64]; - char *fgets(); - char pos[MAXNAMLEN+1]; - int parms; - - if (d->driver_name[0] != '\0') - return TRUE; - d->entry[0]='\0'; - while (fgets(buf,MAXNAMLEN+1,fd) != NULL) - { - buf[strlen(buf)-1] = '\0'; - pos[0] = '\0'; - - if ((sscanf(buf,"%s",pos) == EOF) || pos[0] == '#') - continue; /* blank or comment, skip it */ - - uppercase(pos); - if (strcmp (pos,"BEGIN_DEVICE_DESCRIPTION") != 0) - continue; - - while (fgets(buf,256,fd) != NULL) { - if (((parms = sscanf(buf,"%s%s",key,var)) == EOF) || key[0] == '#') - continue; /* blank or comment, skip it */ - - uppercase(key); - if (parms == 1 && strcmp (key,"END_DEVICE_DESCRIPTION")==0) - return (check_for_duplicates(d)); - - if (strcmp(key,"PATH") == 0) - strcpy(d->d.path, var); - else if (strcmp(key,"NAME") == 0) { - sprintf(d->driver_name, "%s/%s", DRVRLIBDIR, var); - if (*d->entry == '\0') { - len = strcspn (var,"."); - strncpy (d->entry, var, len); - d->entry[len] = '\0'; - strcat (d->entry, "_Init"); - } - } - else if (strcmp(key,"ENTRYPOINT") == 0) - strcpy(d->entry, var); - else if (strcmp(key,"USE") == 0) { - uppercase(var); - if (!strcmp(var,"POINTER")) - d->use = EXPLICIT | XPTR_USE; - else if (!strcmp(var,"KEYBOARD")) - d->use = EXPLICIT | XKBD_USE; - else if (!strcmp(var,"OTHER")) - d->use = XOTH_USE; - else /* assume used as extension device */ - d->use = XEXT_USE; - } - } - } - return FALSE; -} - -/******************************************************************** - * - * get_codes() - * Used to assign codes to keys used to move the pointer. - * Also to assign numbers to the amount to move the pointer. - * This routine uses the index into the file to determine the keycode. - * The down keycode is (index * 2), the up keycode is that plus 1. - * If the type is NUMBER, the key string is assumed to be an ascii - * representation of a number. - * This is used as the increment to move the pointer. - * - */ - -static get_codes (key, code, type, makeupper) - char *key; - int *code; - int type; - Bool makeupper; - { - int i; - - if (makeupper) - for (i=0; i<strlen(key); i++) - *(key+i) = toupper(*(key+i)); - - if (type == UCHAR_NUMBER || type == USHORT_NUMBER || type == UINT_NUMBER) - { - *code = atoi (key); - return (0); - } - else if (type == STRING) - for (i=0; i<MAX_STRINGS; i++) - if (strcmp (key, strings[i].string) == 0) - { - *code = strings[i].value; - return (0); - } - for (i=0; *keyset1[i].keystr; i++) - if (strcmp (key, keyset1[i].keystr) == 0) - break; - if (!inputInfo.keyboard) - return(0); - *code = HPKeySymToKeyCode(inputInfo.keyboard, keyset1[i].sym); - if (*code) - return(0); - return (-1); - } - -int -HPKeySymToKeyCode (dev, sym) - DeviceIntPtr dev; - KeySym sym; -{ - int i; - register KeySym *syms; - KeySymsPtr rec; - - rec = &dev->key->curKeySyms; - syms = rec->map; - for (i=0; i<rec->maxKeyCode - rec->minKeyCode + 1; i++) - { - if (*syms == sym) - return (i + rec->minKeyCode); - syms += rec->mapWidth; - } - return(0); -} - -/******************************************************************** - * - * get_vars() - * get the address of variables to contain keycodes for pointer functions. - * - */ - -static get_vars (func, codevar, index) - char *func; - u_char **codevar; - int *index; - { - int i; - - for (i=0; i<strlen(func); i++) - *(func+i) = toupper(*(func+i)); - - for (i=0; i<MAX_POINTER_FUNCS; i++) - if (strcmp (func, pointerfunc[i].name) == 0) - { - *codevar = pointerfunc[i].code; - *index = i; - return (0); - } - return (-1); - } - -/******************************************************************** - * - * get_pointerkeys(). - * This routine provides the ability to configure keyboard keys to - * move the pointer and act like buttons on the pointer device. - * The file processed is the X*pointerkeys file, which consists - * of pairs. The form is: - * - * function key, modifier, or value - * - * Look at the pointerfunc table in x_hilinit.h to understand this code. - * There are 3 types of assignment done: - * 1). keys - have both a down and an up code to assign. - * 2). modifiers - are a bit position in a mask. - * 3). values - are a single integer number. - * Possible errors: - * 1). only 1 of the pair was specified. - * 2). an invalid function was specified. - * 3). an invalid key or modifier was specified. - */ - -get_pointerkeys() - { - char fname[MAXNAMLEN+1]; - FILE *fp; - int len; - int cret; - int vret; - int ret2; - int index; - char buf[MAXNAMLEN+1]; - char function[MAXNAMLEN+1]; - char key[MAXNAMLEN+1]; - char *fgets(); - int code; - union - { - u_char *cptr; - u_short *sptr; - u_int *iptr; - } codevar; - - button_3 = 0; - if (inputInfo.keyboard) { - get_codes ("KEYPAD_2", &code, KEY, FALSE); - cursor_down = (unsigned char) code; - get_codes ("KEYPAD_5", &code, KEY, FALSE); - cursor_up = (unsigned char) code; - get_codes ("KEYPAD_1", &code, KEY, FALSE); - cursor_left = (unsigned char) code; - get_codes ("KEYPAD_3", &code, KEY, FALSE); - cursor_right = (unsigned char) code; - get_codes ("KEYPAD_*", &code, KEY, FALSE); - button_1 = (unsigned char) code; - get_codes ("KEYPAD_/", &code, KEY, FALSE); - button_2 = (unsigned char) code; - get_codes ("KEYPAD_+", &code, KEY, FALSE); - button_3 = (unsigned char) code; - get_codes ("KEYPAD_-", &code, KEY, FALSE); - button_4 = (unsigned char) code; - get_codes ("KEYPAD_7", &code, KEY, FALSE); - button_5 = (unsigned char) code; - } - sprintf(fname, "%s/X%spointerkeys",LIBDIR, display); - fp = fopen ( fname, "r"); - if (fp == NULL) - return; - - while (fgets(buf,MAXNAMLEN+1,fp) != NULL) - { - ret2 = sscanf (buf,"%s%s",function,key); - - /* comments begin with a '#'. Skip them. */ - - if (function[0] == '#') /* comment, skip it */ - continue; - - if (ret2 == 2) /* error if < 2 items */ - { - vret = get_vars (function, &codevar, &index); - if (vret < 0) /* invalid function */ - { - ErrorF ("Bad function \"%s\" skipped in X*pointerkeys file.\n", - function); - continue; /* error - skip this one*/ - } - cret = get_codes (key, &code, pointerfunc[index].type, TRUE); - if (cret < 0 && /* not a key or modifier*/ - pointerfunc[index].type == KEY) /* but must be */ - { - ErrorF ("Bad key name \"%s\" skipped in X*pointerkeys file.\n", - key); - continue; /* error - skip this one*/ - } - - if (pointerfunc[index].type==MODIFIER) /* modifier - compute bit*/ - *codevar.cptr = code - 8; - else if (pointerfunc[index].type==UINT_NUMBER) - *codevar.iptr = code; /* code for 16-bit number */ - else if (pointerfunc[index].type==USHORT_NUMBER) - *codevar.sptr = code; /* code for 16-bit number */ - else - *codevar.cptr = code; /* code for 8-bit key */ - } - else - { - len = strlen(buf) - 1; /* fgets adds a newline */ - buf[len] = '\0'; - if (len > 0) - ErrorF ("Bad entry \"%s\" skipped in X*pointerkeys file.\n", - buf); - } - } - - fclose (fp); - } - -/**************************************************************************** - * - * hpAddInputDevice(deviceProc, autoStart, pHP) - * create an X input device, then assign pHP to it's devicePrivate field. - * - */ - -static DevicePtr hpAddInputDevice(deviceProc, autoStart, pHP) - DeviceProc deviceProc; - Bool autoStart; - HPInputDevice *pHP; - { - DevicePtr pXDev; - int id; - - if ((pXDev = AddInputDevice(deviceProc, autoStart)) == NULL) - FatalError ("Too many input devices - X server terminating!\n"); -#ifdef XINPUT - id = ((DeviceIntPtr) pXDev)->id; - if (pHP == hpPointer) - { - hp_device_ids[id] = XPOINTER; - x_device_ids[XPOINTER] = id; - } - else if (pHP == hpKeyboard) - { - hp_device_ids[id] = XKEYBOARD; - x_device_ids[XKEYBOARD] = id; - } - else - { - hp_device_ids[id] = otherndx; - x_device_ids[otherndx++] = id; - } -#endif /* XINPUT */ - pXDev->devicePrivate = (pointer) pHP; - return pXDev; - } - -/**************************************************************************** - * - * We allow any keycode to be specified as a modifer, Even one that can't - * be generated by our keyboard. - * - */ - -LegalModifier(key, dev) - unsigned int key; - DevicePtr dev; - { - return TRUE; - } - -/**************************************************************************** - * - * close_device closes one of the input devices. - * - */ - -close_device(d) - HPInputDevice *d; - { - int i, tmp_fd = d->d.file_ds; - - (*(d->s.close)) (d->d.file_ds); - d->d.file_ds = -1; - if (tmp_fd == max_input_fd) - { - max_input_fd = 0; - for (i=0; i<MAX_LOGICAL_DEVS; i++) - if (l_devs[i].d.file_ds != HP_VENDOR_RELEASE_NUMBER && - l_devs[i].d.file_ds > max_input_fd) - max_input_fd = l_devs[i].d.file_ds; - } - } - -/***************************** - * - * init_events_queue (queue) - * - */ - -init_events_queue(queue) - struct x11EventQueue *queue; - { - queue->events = events_array; - queue->head = 0; - queue->tail = 0; - queue->size = MAX_EVENTS; - events_queue = queue; - } - -/***************************************************************** - * - * allocate_event () - * allocates the next available event to the caller and increments - * the tail pointer of the events queue; sets queue_events_free as needed. - * - */ - -xHPEvent *allocate_event () - { - xHPEvent *event; - - event = &( (events_queue->events)[events_queue->tail]); - - if ( events_queue->tail == WR_EVENTS) - events_queue->tail = 0; - else (events_queue->tail)++; - - queue_events_free--; - if (queue_events_free == 0) - ErrorF ("Server Internal events queue is full!!!\n"); - return (event); - } - -deallocate_event (ev) - xHPEvent *ev; - { - xHPEvent *tmp, *tail, *last, *first; - - tail = &( (events_queue->events)[events_queue->tail]); - last = &( (events_queue->events)[WR_EVENTS]); - first = &( (events_queue->events)[0]); - - for (tmp=ev; tmp!=tail; tmp++) - if (tmp==last) - { - *tmp = *first; - tmp = first-1; - } - else - *tmp = *(tmp+1); - - if (events_queue->tail == 0) - events_queue->tail = WR_EVENTS; - else - events_queue->tail--; - queue_events_free++; - } - - -#ifdef XINPUT -void -AddOtherInputDevices () - { - int i; - HPInputDevice *hp, *tmphp; - DeviceIntPtr dev; - Bool found; - - for (i=0, hp=l_devs; i<MAX_LOGICAL_DEVS; hp++,i++) - { - found = FALSE; - for (dev=inputInfo.devices; dev; dev=dev->next) - { - tmphp = GET_HPINPUTDEVICE (dev); - if (hp == tmphp) - { - found = TRUE; - break; - } - } - for (dev=inputInfo.off_devices; found==FALSE && dev; dev=dev->next) - { - tmphp = GET_HPINPUTDEVICE (dev); - if (hp == tmphp) - { - found = TRUE; - break; - } - } - if (found == FALSE && hp->d.x_name != NULL && - (strcmp (hp->d.path,"/dev/null") != 0)) - { - dev = x_init_device (hp, TRUE); - dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success); - } - } - } - -int -ChangeKeyboardDevice (old_dev, new_dev) - DeviceIntPtr old_dev; - DeviceIntPtr new_dev; - { - CARD8 tmp; - HPInputDevice *old = GET_HPINPUTDEVICE (old_dev); - HPInputDevice *new = GET_HPINPUTDEVICE (new_dev); - - if (old->hpflags & OPEN_THIS_DEVICE) - old->hpflags &= ~OPEN_THIS_DEVICE; - tmp = hp_device_ids[new_dev->id]; - hp_device_ids[new_dev->id] = XKEYBOARD; - hp_device_ids[old_dev->id] = tmp; - x_device_ids[XKEYBOARD] = new_dev->id; - x_device_ids[tmp] = old_dev->id; - hpKeyboard = new; - return (Success); - } - -int -#if NeedFunctionPrototypes -ChangePointerDevice ( - DeviceIntPtr old_dev, - DeviceIntPtr new_dev, - unsigned char x, - unsigned char y) -#else -ChangePointerDevice (old_dev, new_dev, x, y) - DeviceIntPtr old_dev; - DeviceIntPtr new_dev; - unsigned char x,y; -#endif - { - XID tmp; - HPInputDevice *old = GET_HPINPUTDEVICE (old_dev); - HPInputDevice *new = GET_HPINPUTDEVICE (new_dev); - - if (new_dev == tablet_extension_device) - return (BadDevice); - x_axis = x; - y_axis = y; - if (x_axis != 0 || y_axis != 1) - axes_changed = TRUE; - else - axes_changed = FALSE; - - new->coords[0] = old->coords[0]; - new->coords[1] = old->coords[1]; - - if (old->hpflags & OPEN_THIS_DEVICE) - old->hpflags &= ~OPEN_THIS_DEVICE; - - screen_change_dev = new_dev; - tmp = hp_device_ids[new_dev->id]; - hp_device_ids[new_dev->id] = XPOINTER; - hp_device_ids[old_dev->id] = tmp; - x_device_ids[XPOINTER] = new_dev->id; - x_device_ids[tmp] = old_dev->id; - hpPointer = new; - InitFocusClassDeviceStruct(old_dev); - return (Success); - } - -/**************************************************************************** - * - * Turn on a non-standard device. - * - */ - -void -OpenInputDevice (dev, client, status) - DeviceIntPtr dev; - ClientPtr client; - int *status; - { - int mode; - HPInputDevice *d; - DeviceClientsPtr tmp; - - if (*status != Success) /* kludge - if not Success, */ - mode = (*status >> 8); /* called from HPSetInputDevice */ - else /* mode hidden in 2nd byte */ - mode = DEVICE_EVENTS | ON; - - *status = Success; - - d = GET_HPINPUTDEVICE (dev); - if (d->d.file_ds == -1) /* device not yet open */ - { - if (open_device (d) < 0) /* couldn't open device */ - { - *status = BadDevice; - return; - } - } - else - { - for (tmp = (DeviceClientsPtr) d->clients; tmp!=NULL; tmp=tmp->next) - if (tmp->mode != mode) - { - *status = BadMode; - return; - } - } - SetInputDevice (d, mode); - - dev->startup = 1; - RecordOpenRequest (client, d, dev->id, mode); - } - -/*********************************************************************** - * - * Record a successful request from a client to open an input device. - * - */ - -static void -RecordOpenRequest (client, d, id, token) - register ClientPtr client; - HPInputDevice *d; - CARD8 id; - int token; - { - DeviceClientsPtr tmp; - DeviceClientsPtr new_client; - - if (d->clients != NULL) - { - for (tmp = (DeviceClientsPtr) d->clients; tmp!=NULL; tmp=tmp->next) - if (tmp->client == client) - { - tmp->count++; - return; - } - else if (tmp->next == NULL) - break; - - new_client = (DeviceClients *) Xalloc(sizeof(DeviceClients)); - tmp->next = new_client; - } - else - { - new_client = (DeviceClients *) Xalloc(sizeof(DeviceClients)); - d->clients = new_client; - } - - memset ((char *) new_client, 0, sizeof (DeviceClients)); - new_client->resource = FakeClientID(client->index); - new_client->client = client; - new_client->next = NULL; - new_client->count = 1; - new_client->mode = token; - - AddResource(new_client->resource, HPType, (pointer) id); - } - - -/*********************************************************************** - * - * Turn off a device because a client died. - * Also called when a client closes a device. - * - */ - -int HPShutDownDevice (deviceid, clientid) - CARD8 deviceid; - int clientid; - { - DeviceIntPtr dev = NULL; - DeviceClientsPtr tmp; - DeviceClientsPtr save; - HPInputDevice *d; - - if (deviceid == inputInfo.pointer->id) - d = hpPointer; - else if (deviceid == inputInfo.keyboard->id) - d = hpKeyboard; - else - { - dev = LookupDeviceIntRec(deviceid); - if (dev == NULL) - return; - d = GET_HPINPUTDEVICE (dev); - } - - if (d->clients != NULL) - { - tmp = (DeviceClientsPtr) d->clients; - if (tmp->resource == clientid) - { - d->clients = tmp->next; - Xfree (tmp); - } - else - for (save=tmp,tmp=tmp->next; tmp!=NULL; save=tmp, tmp=tmp->next) - { - if (tmp->resource == clientid) - { - save->next = tmp->next; - Xfree (tmp); - } - } - if (dev && d->clients == NULL) - { - if (!(d->hpflags & MERGED_DEVICE) || - (d->hpflags & SECOND_LOGICAL_DEVICE)) - DisableDevice(dev); - } - } - } - -/**************************************************************************** - * - * Turn off an extension device. - * This code does not allow the keyboard or pointer to be turned off. - * - */ - -void -CloseInputDevice (dev, client) - DeviceIntPtr dev; - ClientPtr client; - { - HPInputDevice *d; - DeviceClientsPtr tmp; - - d = GET_HPINPUTDEVICE (dev); - - for (tmp= (DeviceClientsPtr) d->clients; tmp!=NULL; tmp=tmp->next) - if (tmp->client == client) - { - tmp->count--; - if (tmp->count == 0) - { - FreeResource(tmp->resource, RT_NONE); - return; - } - } - } - -/**************************************************************************** - * - * Change the state of a non-standard device. - * Modes are: - * ON - turn the device on. - * OFF - turn the device off. - * SYSTEM_EVENTS - report the standard input events. - * DEVICE_EVENTS - report the extension input events. - * - */ - -static void -SetInputDevice (d, mode) - HPInputDevice *d; - int mode; - { - - if ((mode & DEVICE_EVENTS) == DEVICE_EVENTS) - d->hpflags &= ~MERGED_DEVICE; - else - { - mode |= ABSOLUTE; - d->hpflags |= MERGED_DEVICE; - } - - if ((mode & ABSOLUTE) == ABSOLUTE) - { - d->coords[0] = hpPointer->coords[0]; - d->coords[1] = hpPointer->coords[1]; - d->hpflags |= ABSOLUTE_DATA; - } - else - { - d->coords[0] = 0; - d->coords[1] = 0; - if (!(d->d.flags & ABSOLUTE_DATA)) - d->hpflags &= ~ABSOLUTE_DATA; - } - } - -/**************************************************************************** - * - * Change the mode of an extension device. - * This is for devices such as graphics tablets that can report either - * relative or absolute motion. - * We currently do not support this. - * - */ - -int -SetDeviceMode (client, dev, mode) - register ClientPtr client; - DeviceIntPtr dev; - int mode; - { - HPInputDevice *d; - - d = GET_HPINPUTDEVICE (dev); - if (d->dev_type == NULL_DEVICE) - return Success; - if ((*(d->s.write)) (d->d.file_ds, _XSetDeviceMode, &mode)==WRITE_SUCCESS) - return Success; - return BadMatch; - } - -/**************************************************************************** - * - * Set the value of valuators on an extension device. - * This is needed for some devices that can report both - * relative and absolute motion. Some may require that the - * initial values be set when switching modes. - * We currently do not support this. - * - */ - -int -SetDeviceValuators (client, dev, valuators, first_valuator, num_valuators) - register ClientPtr client; - DeviceIntPtr dev; - int *valuators; - int first_valuator; - int num_valuators; - { - int i; - HPInputDevice *d; - HPResolutionControl ctrl; - - d = GET_HPINPUTDEVICE (dev); - for (i=first_valuator; i<num_valuators; i++) - if (i>=0 && i < dev->valuator->numAxes) - dev->valuator->axisVal[i] = *(valuators+i); - if (d->dev_type == NULL_DEVICE) - return Success; - ctrl.first_valuator = first_valuator; - ctrl.num_valuators = num_valuators; - ctrl.resolutions = valuators; - if ((*(d->s.write)) (d->d.file_ds, _XSetDeviceValuators, &ctrl)==WRITE_SUCCESS) - return Success; - return BadMatch; - } - -/**************************************************************************** - * - * Change the resolution of valuators on an extension device. - * This is needed for some devices that have multiple resolutions. - * We currently do not support this. - * - */ - -int -ChangeDeviceControl (client, dev, control) - register ClientPtr client; - DeviceIntPtr dev; - xDeviceCtl *control; - { - HPInputDevice *d; - xDeviceResolutionCtl *dctrl = (xDeviceResolutionCtl *) control; - HPResolutionControl c; - - d = GET_HPINPUTDEVICE (dev); - if (d->dev_type == NULL_DEVICE) - return Success; - c.first_valuator = dctrl->first_valuator; - c.num_valuators = dctrl->num_valuators; - c.resolutions = (int *) (dctrl+1); - if ((*(d->s.write)) (d->d.file_ds, _XChangeDeviceControl, &c)==WRITE_SUCCESS) - return Success; - return BadMatch; - } -#endif /* XINPUT */ - -#define LEFT_SHIFT_CODE 0x05 -#define RIGHT_SHIFT_CODE 0x04 -#define LEFT_MOD1_CODE 0x03 -#define RIGHT_MOD1_CODE 0x02 -#define RIGHT_CONTROL_CODE 0x00 -#define LEFT_CONTROL_CODE 0x06 - -#define LEFT_SHIFT_BIT 0x20 -#define RIGHT_SHIFT_BIT 0x10 -#define LEFT_MOD1_BIT 0x08 -#define RIGHT_MOD1_BIT 0x04 -#define RIGHT_CONTROL_BIT 0x01 -#define LEFT_CONTROL_BIT 0x40 -#define MAX_KEY_MODS 3 - -fix_modifierkeys() - { - u_char tmp[3]; - - tmp[1] = 0xff; - tmp[2] = 0xff; - tmp[0] = pointer_amt_mods[0]; - mask_from_kcodes (tmp, &pointer_amt_bits[0]); - tmp[0] = pointer_amt_mods[1]; - mask_from_kcodes (tmp, &pointer_amt_bits[1]); - tmp[0] = pointer_amt_mods[2]; - mask_from_kcodes (tmp, &pointer_amt_bits[2]); - - mask_from_kcodes (pointer_key_mods, &ptr_mods); - mask_from_kcodes (pointer_amt_mods, &mv_mods); - mask_from_kcodes (reset_mods, &rs_mods); - mask_from_kcodes (borrow_mode_mods, &bw_mods); - mv_mods &= ~ptr_mods; - } - -static void -mask_from_kcodes (src, dst) - u_char *src; - u_char *dst; - { - int i; - HPInputDevice *d; - - d = GET_HPINPUTDEVICE (inputInfo.keyboard); - for (i=0; i<MAX_KEY_MODS; i++, src++) - if (*src != 0xff) - *dst |= inputInfo.keyboard->key->modifierMap[(*src+8)]; - return; - } - -get_down_modifiers(dev, down_mods) - DeviceIntPtr dev; - unsigned char *down_mods; - { - u_char *kptr = dev->key->down; - HPInputDevice *d; - - *down_mods = dev->key->state; /* get X modifier bits */ - } - -/***************************************************************************** - * - * Dynamically load drivers to support input devices. - * - */ - -#define DYNAMIC_DEVICE 0xffff -#define HIL_DRIVER "hil_driver.sl" -#define HILDRVR_ENTRY "hil_driver_Init" -FILE *fp; - -init_dynamic_devs(devs) - HPInputDevice *devs; -{ - int i, keyboard_is_pointer = FALSE; - HPInputDevice *d; - Bool (*driverInit)() = NULL, null_needed = FALSE; - char fname[MAXNAMLEN]; - - /* - * Check the X*devices file for NULL device specifications. If they are - * specified, we need to load the HIL driver to support them. - * - */ - - is_null_needed(&null_needed, &keyboard_is_pointer); - - /* - * See if we can access a DIN mouse and keyboard. If so, we need to load - * a driver to support them. The DIN devices will be used as the X pointer - * and keyboard unless some other device is explicitly specified. - * - */ - - find_din_kbd_use(keyboard_is_pointer); - find_din_mouse_use(&keyboard_is_pointer); - - /* - * Check to see if this machine supports HIL devices. - * If so, load the driver and call it to process the X0devices file - * for old-style syntax. - */ - - sprintf(fname, "%s/X%sdevices",LIBDIR, display); - if (((fp = fopen(BEEPER_DEVICE,"r")) != NULL) || null_needed) { - fclose (fp); - d = next_device_private(); - sprintf(d->driver_name, "%s/%s",DRVRLIBDIR,HIL_DRIVER); - sprintf(d->d.path,"X*devices:Recycle:%s",fname); - strcpy (d->entry, HILDRVR_ENTRY); - - load_and_init_dev (d, &driverInit, TRUE); - - /* - * The request to recycle the HIL input device state does not return - * a valid input device. It is normally reused, but not if there are - * no HIL input devices attached. Clear it to make sure it is treated - * as uninitialized. - */ - - clear_device_private(d); - - if (d->d.reserved[3] && (!hpPointer || hpPointer->dev_type != KEYBOARD)) - keyboard_is_pointer = TRUE; - - for (i=0; i<MAX_DEVICES; i++) { - sprintf(d->d.path,"X*devices:"); - if (load_and_init_dev (d, &driverInit, FALSE)) - break; - if (!(d=next_device_private())) - break; - } - } - - /* - * Now process the X*devices configuration file for new-style entries. - * These specify dynamically loaded input device drivers. - * If the system doesn't support HIL devices, get_next_device will - * return any explicitly specified dynamically loaded input devices. - */ - - fp = fopen ( fname, "r"); - if (fp) { - if (d=next_device_private()) { - while (get_next_device (fp,d)) { - driverInit = NULL; - load_and_init_dev (d, &driverInit, TRUE); - if (!(d=next_device_private())) - break; - } - } - fclose(fp); - } - - if (!hpPointer) - FatalError ("Couldn't open X pointer device! Is one attached?\n"); - if (!hpKeyboard) - FatalError ("Couldn't open X keyboard! Is one attached?\n"); - if (tablet_width) - fix_tablet_subsetting(); -} - -/***************************************************************************** - * - * Initialize the input device private structure. - * - */ - -char *x_basename (name) - char *name; - { - int i; - char *nptr = strchr (name, '_'); - char *ordinal[] = {"FIRST", "SECOND", "THIRD", "FOURTH", - "FIFTH", "SIXTH", "SEVENTH"}; - - if (!nptr) - return (name); - - for (i=0; i<7; i++) - if (!strncmp(name, ordinal[i], strlen(ordinal[i]))) - return(++nptr); - return (name); - } - -close_default_device (thisDev, otherDev) - HPInputDevice *thisDev, *otherDev; - { - int i, fd; - - if (otherDev && (otherDev->d.file_ds != thisDev->d.file_ds)) - { - thisDev->s.close(thisDev->d.file_ds); - for (i=0, fd=thisDev->d.file_ds; i<MAX_DEVICES; i++) - if (l_devs[i].d.file_ds == fd) - l_devs[i].d.file_ds = -1; - } - else - { - thisDev->id = UNINITIALIZED; - thisDev->driver_name[0] = '\0'; - thisDev->d.x_name = NULL; - } - thisDev->d.file_ds = -1; - } - -init_device_private (d, close) - HPInputDevice *d; - Bool close; - { - int j, fd; - HPInputDeviceHeader *dh = &(d->d); - char *nptr; - - if (dh->file_ds == HP_VENDOR_RELEASE_NUMBER) - { - clear_device_private (d); - return; - } - nptr = x_basename (dh->x_name); - d->x_atom = MakeAtom (nptr, strlen(nptr),0); - if (!d->x_atom) - d->x_atom = MakeAtom(nptr, strlen(nptr),1); - dh->resolution *= 100; - if (dh->num_keys) - d->x_type = KEYBOARD; - else if (dh->ax_num) - d->x_type = MOUSE; - else - d->x_type = XOTHER; - if (dh->num_ledf) - d->iob |= HAS_LEDS; - if (dh->flags & REPORTS_PROXIMITY) - d->iob = HILIOB_PIO; - d->hpflags = dh->flags & ~REPORTS_PROXIMITY; - if (dh->file_ds >= 0) - d->hpflags |= OPEN_THIS_DEVICE; - d->hpflags |= (dh->flags & DATA_SIZE_BITS); - d->id_detail = SERIAL; - d->dev_type = DYNAMIC_DEVICE; - d->id = 0; - if (d->d.reserved[0] & HP_HIL) { - d->id_detail = d->d.reserved[0]; - d->id = d->d.min_kcode; - d->iob = d->d.max_kcode; - d->dev_type = d->d.reserved[1]; - d->use = d->d.reserved[2]; - } - if (hpPointer && ((d->use & XPTR_USE) && !(d->use & EXPLICIT))) - d->use &= ~XPTR_USE; - if (hpKeyboard && ((d->use & XKBD_USE) && !(d->use & EXPLICIT))) - d->use &= ~XKBD_USE; - if (!d->use) - d->use = XEXT_USE; - - if (d->use & XPTR_USE) - { - if (hpPointer) - close_default_device (hpPointer, hpKeyboard); - hpPointer = d; - } - if (d->use & XKBD_USE) - { - HPInputDevice *d2; - if (d->use & XPTR_USE && (d2=next_device_private())) - { - *d2 = *d; - d->use = XKBD_USE; - d->hpflags |= SECOND_LOGICAL_DEVICE; - hpPointer = d2; - hpPointer->use = XPTR_USE; - } - if (hpKeyboard) - close_default_device (hpKeyboard, hpPointer); - hpKeyboard = d; - if (dh->reset) - { - reset = dh->reset; - rs_mods = dh->reset_mods; - } - } - if ((d->use & XEXT_USE) && close) - { - d->s.close(dh->file_ds); - dh->file_ds = -1; - } - if (d->use & XOTH_USE) - d->hpflags |= MERGED_DEVICE; - if (dh->file_ds > max_input_fd) - max_input_fd = dh->file_ds; -} - -/****************************************************************************** - * - * shl_driver_load() is passed the path of a shared library to load, and the - * name of an entry point to find. It loads the library and returns the - * entry point address. - */ - -Bool (*shl_driver_load( driver_path, driver_init ))() -char *driver_path, *driver_init; -{ - /* - * pfrb = pointer to a function returning a Bool - */ - typedef Bool (*pfrb)(); - - shl_t ldr_module_id; - long ldr_module_entry=0; - int ret_val; - char *dummy_handle = NULL; -#define ALL_SHLIBS_HANDLE &dummy_handle - - /********************************************************************** - * - * If the driver entrypoint is already visible within the current program, - * skip the load and return the address of the routine we already have - * loaded. - * - */ - - ret_val = shl_findsym((shl_t *) PROG_HANDLE, driver_init, - TYPE_PROCEDURE, &ldr_module_entry ); - if ( ! ret_val ) { - return( (pfrb) ldr_module_entry ); - } - - /* - * If the driver entrypoint is already visible within a shared library we - * are already accessing, skip the load and return the address. - */ - ret_val = shl_findsym((shl_t *) ALL_SHLIBS_HANDLE, driver_init, - TYPE_PROCEDURE, &ldr_module_entry ); - if ( ! ret_val ) { - return( (pfrb) ldr_module_entry ); - } - - - /********************************************************************** - * - * Load driver into the current VA space. - */ - ldr_module_id = shl_load( driver_path, (BIND_DEFERRED | BIND_VERBOSE), 0L ); - - if ( ldr_module_id == NULL ) - FatalError ("X server failed to load shared library %s, errno is %d\n", - driver_path,errno); - - - /********************************************************************** - * - * Use the module ID to find the address of the requested entry point. - */ - - ret_val = shl_findsym( &ldr_module_id, driver_init, TYPE_PROCEDURE, - &ldr_module_entry ); - if (ret_val && driver_init != NULL) - FatalError ("X server couldn't find entry point '%s' in library %s\n", - driver_init, driver_path); - - return( (pfrb) ldr_module_entry ); -} - -/*********************************************************************** - * - * din_mouse_present - * - */ - -static Bool -din_mouse_present() - { - int fd; - struct ps2_4 statbuf, idbuf; - - fd = open("/dev/ps2mouse", O_RDWR); - if (fd < 0) - return FALSE; - ioctl (fd, PS2_PORTSTAT, &statbuf); - ioctl (fd, PS2_IDENT, &idbuf); - close (fd); - if (statbuf.b[0] != PS2_MOUSE || idbuf.b[0] != 0) - return FALSE; - return TRUE; - } - -/*********************************************************************** - * - * find_din_mouse_use - * - */ - -find_din_mouse_use(keyboard_is_pointer) - int *keyboard_is_pointer; - { - HPInputDevice *d; - Bool (*driverInit)() = NULL; - - if (!din_mouse_present()) /* no DIN mouse attached */ - { - if (!hpPointer || /* no HIL pointer device */ - (hpPointer->dev_type != MOUSE && /* or it's not a motion device*/ - !(hpPointer->use & EXPLICIT))) /* and not explicitly named */ - *keyboard_is_pointer = TRUE; - return; - } - - if (!(d=next_device_private())) /* too many devices */ - return; - - if ((hpPointer && hpPointer->use & EXPLICIT) || *keyboard_is_pointer) - d->use = XEXT_USE; /* explicit ptr specified */ - else - d->use = XPTR_USE; - - sprintf(d->driver_name, "%s/%s", DRVRLIBDIR, DIN_MOUSE_DRVR); - strcpy (d->entry, DIN_MOUSE_INIT); - strcpy (d->d.path, DIN_MOUSE_PATH); - - load_and_init_dev (d, &driverInit, TRUE); - d->id_detail = PS2; - } - -/*********************************************************************** - * - * din_kbd_present - * - */ - -static Bool -din_kbd_present() - { - int fd; - struct ps2_4 statbuf, idbuf; - - fd = open("/dev/ps2kbd", O_RDWR); - if (fd < 0) - return FALSE; - ioctl (fd, PS2_PORTSTAT, &statbuf); - ioctl (fd, PS2_IDENT, &idbuf); - close (fd); - if (statbuf.b[0]!=PS2_KEYBD && - idbuf.b[0]!=0xab && idbuf.b[1]!=0x83) /* no DIN kbd*/ - return FALSE; - return TRUE; - } - -/*********************************************************************** - * - * find_din_kbd_use - * - */ - -find_din_kbd_use(keyboard_is_pointer) - int keyboard_is_pointer; - { - Bool (*driverInit)() = NULL; - HPInputDevice *d; - - if (!din_kbd_present()) /* no DIN kbd */ - return; - - if (!(d=next_device_private())) /* too many devices */ - return; - - if (hpKeyboard && hpKeyboard->use & EXPLICIT) /* kbd explicitly spec'd */ - d->use = XEXT_USE; - else - d->use = XKBD_USE; - - if (keyboard_is_pointer) - d->use |= XPTR_USE; - - sprintf(d->driver_name, "%s/%s", DRVRLIBDIR, DIN_KBD_DRVR); - strcpy (d->entry, DIN_KBD_INIT); - strcpy (d->d.path, DIN_KBD_PATH); - - load_and_init_dev (d, &driverInit, TRUE); - d->id_detail = PS2 | PC101_KBD; - } - -/*********************************************************************** - * - * load_and_init_dev - * - */ - -load_and_init_dev (d, driverInit, fatal) - HPInputDevice *d; - Bool (**driverInit)(); - Bool fatal; - { - int ret_val; - void *(*foo)(); - - if (! *driverInit) - *driverInit = shl_driver_load(d->driver_name, d->entry, &foo, "x"); - ret_val = (**driverInit)(&(d->s)); /* Initialize driver. */ - if (ret_val!=INIT_SUCCESS) - FatalError ("Couldn't initialize input device driver %s\n", - d->driver_name); - if ((*(d->s.configure)) (&(d->d))!=INIT_SUCCESS) - if (fatal) - FatalError ("Couldn't configure input device driver %s\n", - d->driver_name); - else - { - clear_device_private (d); - return 1; - } - init_device_private (d, TRUE); - return 0; - } Index: xc/programs/Xserver/hw/hp/input/x_hilinit.h diff -u xc/programs/Xserver/hw/hp/input/x_hilinit.h:1.2 xc/programs/Xserver/hw/hp/input/x_hilinit.h:removed --- xc/programs/Xserver/hw/hp/input/x_hilinit.h:1.2 Fri Dec 14 14:59:41 2001 +++ xc/programs/Xserver/hw/hp/input/x_hilinit.h Thu Feb 27 12:29:24 2003 @@ -1,464 +0,0 @@ -#ifndef X_HILINIT_H -#define X_HILINIT_H -/* $Xorg: x_hilinit.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ -/* - -Copyright 1986, 1987, 1998 The Open Group - -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. - -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. - - -Copyright 1986, 1987 by Hewlett-Packard Company - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett-Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -/************************************************************************** - * - * file: x_hilinit.h - * - * contains key definitions and other static information used by x_hilinit.c - * - */ - -#define STARTUP 0 -#define MAX_STRINGS (sizeof (strings) / sizeof (struct str_table)) -#define MAX_DEV_TYPES (sizeof (devices) / sizeof (struct dev_table)) -#define MAX_POINTER_FUNCS (sizeof (pointerfunc) / sizeof (struct pointerfunc)) -#define QUAD_INDEX 8 /* index of quad entry in dev_table */ -#define NINE_KNOB_ID 0x61 -#define KEY 0 -#define UCHAR_NUMBER 1 -#define STRING 2 -#define MODIFIER 3 -#define USHORT_NUMBER 4 -#define UINT_NUMBER 5 - -#include "keysym.h" -#include "HPkeysym.h" -#include "ap_keysym.h" - -struct opendevs - { - int type; - int pos; - int use; - char path[MAXNAMLEN+1]; - char name[MAXNAMLEN+1]; - char entry[MAXNAMLEN+1]; - }; - -struct dev_table - { - int lowid; - int highid; - int dev_type; - int x_type; - char *name; - unsigned char num_keys; - unsigned char min_kcode; - unsigned char max_kcode; - }; - -struct dev_table devices[] = - {{0x00,0x1f,KEYPAD,KEYBOARD,"KEYPAD",0,0,0}, - {0x2f,0x2f,APOLLO_LPFK,KEYBOARD,"LPFK-BUTTONBOX",33,64,32}, - {0x30,0x33,BUTTONBOX,KEYBOARD,"BUTTONBOX",32,10,41}, - {0x34,0x34,ID_MODULE,XOTHER,"ID_MODULE",0,0,0}, - {0x35,0x3f,BUTTONBOX,KEYBOARD,"BUTTONBOX",32,10,41}, - {0x5c,0x5f,BARCODE,KEYBOARD,"BARCODE",109,10,135}, - {0x60,0x60,ONE_KNOB,MOUSE,"ONE_KNOB",0,0,0}, - {0x61,0x61,NINE_KNOB,MOUSE,"NINE_KNOB",0,0,0}, - {0x62,0x67,QUADRATURE,MOUSE,"QUADRATURE",0,0,0}, - {0x68,0x6b,MOUSE,MOUSE,"MOUSE",0,0,0}, - {0x6c,0x6f,TRACKBALL,MOUSE,"TRACKBALL",0,0,0}, - {0x70,0x70,VCD_8_DIALBOX,MOUSE,"KNOB_BOX",0,0,0}, - {0x71,0x71,SS_SPACEBALL,MOUSE,"SPACEBALL",0,0,0}, - {0x88,0x8b,TOUCHPAD,MOUSE,"TOUCHPAD",0,0,0}, - {0x8c,0x8f,TOUCHSCREEN,MOUSE,"TOUCHSCREEN",0,0,0}, - {0x90,0x97,TABLET,MOUSE,"TABLET",0,0,0}, - {0x98,0x98,MMII_1812_TABLET,MOUSE,"MMII-TABLET",0,0,0}, - {0x99,0x99,MMII_1201_TABLET,MOUSE,"MMII-TABLET",0,0,0}, - {0xA0,0xBF,KEYBOARD,KEYBOARD,"KEYBOARD",93,10,135}, - {0xC0,0xDF,KEYBOARD,KEYBOARD,"KEYBOARD",109,10,135}, - {0xE0,0xFF,KEYBOARD,KEYBOARD,"KEYBOARD",87,10,135}, - {0x00,0x00,NULL_DEVICE,NULL_DEVICE,"NULL",0,0,0}}; - -char *position[] = - { - "FIRST", - "SECOND", - "THIRD", - "FOURTH", - "FIFTH", - "SIXTH", - "SEVENTH" - }; - -char *suffix[] = -#if defined(__hp9000s300) || defined(__hp9000s700) || defined(__hp_osf) - {"1","2","3","4","5","6","7"}; -#else - {"0.1","0.2","0.3","0.4","0.5","0.6","0.7", - "1.1","1.2","1.3","1.4","1.5","1.6","1.7", - "2.1","2.2","2.3","2.4","2.5","2.6","2.7", - "3.1","3.2","3.3","3.4","3.5","3.6","3.7"}; -#endif /* __hp9000s300 or __hp9000s700 */ - -extern u_char cursor_down; -extern u_char cursor_left; -extern u_char cursor_right; -extern u_char cursor_up; -extern u_char button_1; -extern u_char button_2; -extern u_char button_3; -extern u_char button_4; -extern u_char button_5; -extern u_char button_6; -extern u_char button_7; -extern u_char button_8; - -extern u_char pointer_key_mods[3]; -extern u_char pointer_amt_mods[3]; -extern u_char reset_mods[3]; -extern u_char borrow_mode_mods[3]; -extern u_short pointer_move; -extern u_short pointer_mod1_amt; -extern u_short pointer_mod2_amt; -extern u_short pointer_mod3_amt; -extern u_char borrow_mode; -extern u_char reset; -extern u_char screen_change_amt; -extern u_char button_chording; -extern u_char button_latching; -extern u_char ptr_button_map[]; -extern u_char isotropic_scaling; -extern u_char screen_orientation; -extern u_char screen_row_wrap; -extern u_char screen_col_wrap; -extern u_int tablet_xorigin; -extern u_int tablet_yorigin; -extern u_int tablet_width; -extern u_int tablet_height; - -struct pointerfunc - { - char *name; - u_char *code; - int type; - }; - -struct pointerfunc pointerfunc [] = - {{"POINTER_LEFT_KEY", &cursor_left, KEY}, - {"POINTER_RIGHT_KEY", &cursor_right, KEY}, - {"POINTER_UP_KEY", &cursor_up, KEY}, - {"POINTER_DOWN_KEY", &cursor_down, KEY}, - {"POINTER_KEY_MOD1", &pointer_key_mods[0], MODIFIER}, - {"POINTER_KEY_MOD2", &pointer_key_mods[1], MODIFIER}, - {"POINTER_KEY_MOD3", &pointer_key_mods[2], MODIFIER}, - {"POINTER_BUTTON1_KEY", &button_1, KEY}, - {"POINTER_BUTTON2_KEY", &button_2, KEY}, - {"POINTER_BUTTON3_KEY", &button_3, KEY}, - {"POINTER_BUTTON4_KEY", &button_4, KEY}, - {"POINTER_BUTTON5_KEY", &button_5, KEY}, - {"POINTER_BUTTON6_KEY", &button_6, KEY}, - {"POINTER_BUTTON7_KEY", &button_7, KEY}, - {"POINTER_BUTTON8_KEY", &button_8, KEY}, - {"POINTER_MOVE", (u_char *) &pointer_move, USHORT_NUMBER}, - {"POINTER_MOD1_AMT", (u_char *) &pointer_mod1_amt, USHORT_NUMBER}, - {"POINTER_MOD2_AMT", (u_char *) &pointer_mod2_amt, USHORT_NUMBER}, - {"POINTER_MOD3_AMT", (u_char *) &pointer_mod3_amt, USHORT_NUMBER}, -#ifdef __apollo - {"BORROW_MODE_KEY", &borrow_mode, KEY}, - {"BORROW_MODE_MOD1_KEY", &borrow_mode_mods[0], MODIFIER}, - {"BORROW_MODE_MOD2_KEY", &borrow_mode_mods[1], MODIFIER}, -#endif /* __apollo */ - {"RESET", &reset, KEY}, - {"RESET_MOD1", &reset_mods[0], MODIFIER}, - {"RESET_MOD2", &reset_mods[1], MODIFIER}, - {"RESET_MOD3", &reset_mods[2], MODIFIER}, - {"POINTER_AMT_MOD1", &pointer_amt_mods[0], MODIFIER}, - {"POINTER_AMT_MOD2", &pointer_amt_mods[1], MODIFIER}, - {"POINTER_AMT_MOD3", &pointer_amt_mods[2], MODIFIER}, - {"BUTTON_1_VALUE", &ptr_button_map[1], UCHAR_NUMBER}, - {"BUTTON_2_VALUE", &ptr_button_map[2], UCHAR_NUMBER}, - {"BUTTON_3_VALUE", &ptr_button_map[3], UCHAR_NUMBER}, - {"BUTTON_4_VALUE", &ptr_button_map[4], UCHAR_NUMBER}, - {"BUTTON_5_VALUE", &ptr_button_map[5], UCHAR_NUMBER}, - {"BUTTON_6_VALUE", &ptr_button_map[6], UCHAR_NUMBER}, - {"BUTTON_7_VALUE", &ptr_button_map[7], UCHAR_NUMBER}, - {"BUTTON_8_VALUE", &ptr_button_map[8], UCHAR_NUMBER}, - {"SCREEN_CHANGE_AMT", &screen_change_amt, UCHAR_NUMBER}, - {"BUTTON_CHORDING", &button_chording, STRING}, - {"BUTTON_LATCHING", &button_latching, STRING}, - {"TABLET_SUBSET_XORIGIN", (u_char *) &tablet_xorigin, UINT_NUMBER}, - {"TABLET_SUBSET_YORIGIN", (u_char *) &tablet_yorigin, UINT_NUMBER}, - {"TABLET_SUBSET_WIDTH", (u_char *) &tablet_width, UINT_NUMBER}, - {"TABLET_SUBSET_HEIGHT", (u_char *) &tablet_height, UINT_NUMBER}, - {"ISOTROPIC_SCALING", &isotropic_scaling, STRING}, - {"SCREEN_ORIENTATION", &screen_orientation, STRING}, - {"SCREEN_ROW_WRAP", &screen_row_wrap, STRING}, - {"SCREEN_COL_WRAP", &screen_col_wrap, STRING}}; - -struct str_table - { - char *string; - u_char value; - } strings [] = { - {"OFF",CHORDING_OFF}, - {"ON",CHORDING_ON}, - {"DEFAULT",CHORDING_DEFAULT}, - {"WRAP",WRAP}, - {"NOWRAP",NOWRAP}, - {"SAMESCREEN",SAMESCREEN}, - {"CHANGE_BY_TWO",CHANGE_BY_TWO}, - {"VERTICAL",VERTICAL}, - {"HORIZONTAL",HORIZONTAL}, - {"MATRIX",MATRIX}}; - -struct _keyset1 { - char *keystr; - KeySym sym; - } keyset1[] = { - {"ALT_L", XK_Alt_L}, - {"ALT_R", XK_Alt_R}, - {"LEFT_CONTROL", XK_Control_L}, - {"RIGHT_CONTROL", XK_Control_R}, - {"RIGHT_EXTEND", XK_Meta_R}, - {"LEFT_EXTEND", XK_Meta_L}, - {"RIGHT_SHIFT", XK_Shift_R}, - {"LEFT_SHIFT", XK_Shift_L}, - {"CONTROL", XK_Control_L}, - {"KEYPAD_4", XK_KP_4}, - {"KEYPAD_8", XK_KP_8}, - {"KEYPAD_5", XK_KP_5}, - {"KEYPAD_9", XK_KP_9}, - {"KEYPAD_6", XK_KP_6}, - {"KEYPAD_7", XK_KP_7}, - {"KEYPAD_COMMA", XK_KP_Separator}, - {"KEYPAD_ENTER", XK_KP_Enter}, - {"KEYPAD_1", XK_KP_1}, - {"KEYPAD_/", XK_KP_Divide}, - {"KEYPAD_2", XK_KP_2}, - {"KEYPAD_+", XK_KP_Add}, - {"KEYPAD_3", XK_KP_3}, - {"KEYPAD_*", XK_KP_Multiply}, - {"KEYPAD_0", XK_KP_0}, - {"KEYPAD_-", XK_KP_Subtract}, - {"BLANK_F10", XK_F10}, - {"BLANK_F11", XK_F11}, - {"KEYPAD_PERIOD", XK_KP_Decimal}, - {"BLANK_F9", XK_F9}, - {"KEYPAD_TAB", XK_KP_Tab}, - {"BLANK_F12", XK_F12}, - {"`", XK_quoteleft}, - {"STOP", XK_Cancel}, - {"ENTER", XK_Execute}, - {"CLEAR_LINE", XK_ClearLine}, - {"CLEAR_DISPLAY", XK_Clear}, - {"-", XK_minus}, - {"=", XK_equal}, - {"INSERT_LINE", XK_InsertLine}, - {"DELETE_LINE", XK_DeleteLine}, - {"[", XK_bracketleft}, - {"]", XK_bracketright}, - {"\\", XK_backslash}, - {"INSERT_CHAR", XK_InsertChar}, - {"DELETE_CHAR", XK_DeleteChar}, - {";", XK_semicolon}, - {"'", XK_quoteright}, - {"HOME_CURSOR", XK_Home}, - {"PREV", XK_Prior}, - {",", XK_comma}, - {".", XK_period}, - {"/", XK_slash}, - {"SPACE_BAR", XK_space}, - {".", XK_period}, - {"CURSOR_LEFT", XK_Left}, - {"CURSOR_DOWN", XK_Down}, - {"CURSOR_UP", XK_Up}, - {"CURSOR_RIGHT", XK_Right}, - {"CONTROL_R", XK_Control_R}, - {"META_R", XK_Meta_R}, - {"META_L", XK_Meta_L}, - {"SHIFT_R", XK_Shift_R}, - {"SHIFT_L", XK_Shift_L}, - {"CONTROL_L", XK_Control_L}, - {"BREAK", XK_Break}, - {"KP_4", XK_KP_4}, - {"KP_8", XK_KP_8}, - {"KP_5", XK_KP_5}, - {"KP_9", XK_KP_9}, - {"KP_6", XK_KP_6}, - {"KP_7", XK_KP_7}, - {"KP_SEPARATOR", XK_KP_Separator}, - {"KP_ENTER", XK_KP_Enter}, - {"KP_1", XK_KP_1}, - {"KP_DIVIDE", XK_KP_Divide}, - {"KP_2", XK_KP_2}, - {"KP_ADD", XK_KP_Add}, - {"KP_3", XK_KP_3}, - {"KP_MULTIPLY", XK_KP_Multiply}, - {"KP_0", XK_KP_0}, - {"KP_SUBTRACT", XK_KP_Subtract}, - {"B", XK_B}, - {"V", XK_V}, - {"C", XK_C}, - {"X", XK_X}, - {"Z", XK_Z}, - {"ESCAPE", XK_Escape}, - {"F10", XK_F10}, - {"F11", XK_F11}, - {"KP_DECIMAL", XK_KP_Decimal}, - {"F9", XK_F9}, - {"KP_TAB", XK_KP_Tab}, - {"F12", XK_F12}, - {"H", XK_H}, - {"G", XK_G}, - {"F", XK_F}, - {"D", XK_D}, - {"S", XK_S}, - {"A", XK_A}, - {"NOSYMBOL", 0}, - {"CAPS_LOCK", XK_Caps_Lock}, - {"U", XK_U}, - {"Y", XK_Y}, - {"T", XK_T}, - {"R", XK_R}, - {"E", XK_E}, - {"W", XK_W}, - {"Q", XK_Q}, - {"TAB", XK_Tab}, - {"7", XK_7}, - {"6", XK_6}, - {"5", XK_5}, - {"4", XK_4}, - {"3", XK_3}, - {"2", XK_2}, - {"1", XK_1}, - {"QUOTELEFT", XK_quoteleft}, - {"MENU", XK_Menu}, - {"F4", XK_F4}, - {"F3", XK_F3}, - {"F2", XK_F2}, - {"F1", XK_F1}, - {"CANCEL", XK_Cancel}, - {"EXECUTE", XK_Execute}, - {"SYSTEM", XK_System}, - {"F5", XK_F5}, - {"F6", XK_F6}, - {"F7", XK_F7}, - {"F8", XK_F8}, - {"CLEARLINE", XK_ClearLine}, - {"CLEAR", XK_Clear}, - {"8", XK_8}, - {"9", XK_9}, - {"0", XK_0}, - {"MINUS", XK_minus}, - {"EQUAL", XK_equal}, - {"BACKSPACE", XK_BackSpace}, - {"INSERTLINE", XK_InsertLine}, - {"DELETELINE", XK_DeleteLine}, - {"I", XK_I}, - {"O", XK_O}, - {"P", XK_P}, - {"BRACKETLEFT", XK_bracketleft}, - {"BRACKETRIGHT", XK_bracketright}, - {"BACKSLASH", XK_backslash}, - {"INSERTCHAR", XK_InsertChar}, - {"DELETECHAR", XK_DeleteChar}, - {"J", XK_J}, - {"K", XK_K}, - {"L", XK_L}, - {"SEMICOLON", XK_semicolon}, - {"QUOTERIGHT", XK_quoteright}, - {"RETURN", XK_Return}, - {"HOME", XK_Home}, - {"PRIOR", XK_Prior}, - {"M", XK_M}, - {"COMMA", XK_comma}, - {"PERIOD", XK_period}, - {"SLASH", XK_slash}, - {"SELECT", XK_Select}, - {"NEXT", XK_Next}, - {"N", XK_N}, - {"SPACE", XK_space}, - {"LEFT", XK_Left}, - {"DOWN", XK_Down}, - {"UP", XK_Up}, - {"RIGHT", XK_Right}, - {"GRAVE", XK_grave}, - {"NUMBERSIGN", XK_numbersign}, - {"KANJI", XK_Kanji}, - {"GUILLEMOTLEFT", XK_guillemotleft}, - {"EACUTE", XK_eacute}, - {"PRINT", XK_Print}, - {"ASCIICIRCUM", XK_asciicircum}, - {"SCROLL_LOCK", XK_Scroll_Lock}, - {"CEDILLA", XK_cedilla}, - {"NUM_LOCK", XK_Num_Lock}, -#ifdef __apollo - {"APCHARDEL", apXK_CharDel}, - {"REDO", XK_Redo}, - {"APREAD", apXK_Read}, - {"APEDIT", apXK_Edit}, - {"APEXIT", apXK_Exit}, - {"PAUSE", XK_Pause}, - {"APCOPY", apXK_Copy}, - {"APPASTE", apXK_Paste}, - {"APGROW", apXK_Grow}, - {"APLEFTBAR", apXK_LeftBar}, - {"APCMD", apXK_Cmd}, - {"APRIGHTBAR", apXK_RightBar}, - {"DELETE", XK_Delete}, - {"APLEFTBOX", apXK_LeftBox}, - {"APRIGHTBOX", apXK_RightBox}, - {"APOSTROPHE", XK_apostrophe}, - {"APREPEAT", apXK_Repeat}, - {"APPOP", apXK_Pop}, - {"APUPBOX", apXK_UpBox}, - {"APDOWNBOX", apXK_DownBox}, -#endif /* __apollo */ - {"", 0}}; - -#endif /* X_HILINIT_H */ Index: xc/programs/Xserver/hw/hp/input/x_serialdrv.h diff -u xc/programs/Xserver/hw/hp/input/x_serialdrv.h:1.1.1.3 xc/programs/Xserver/hw/hp/input/x_serialdrv.h:removed --- xc/programs/Xserver/hw/hp/input/x_serialdrv.h:1.1.1.3 Tue Jan 16 17:43:06 2001 +++ xc/programs/Xserver/hw/hp/input/x_serialdrv.h Thu Feb 27 12:29:24 2003 @@ -1,185 +0,0 @@ -/* $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. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Hewlett-Packard not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -HEWLETT-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. - -********************************************************/ - -/*************************************************************************** - * - * Constants and structs for dynamically loaded serial input device drivers. - * - */ - -#ifndef _X_SERIALDRV_H_ -#define _X_SERIALDRV_H_ -#include <dl.h> - -#define X_KEYMAP_NAME "/etc/kbdlang" -#define MIN_KEYCODE 8 -#define MAX_NM 64 -#define DATA_IS_8_BITS 0x01 -#define DATA_IS_16_BITS 0x02 -#define DATA_IS_32_BITS 0x04 -#define REPORTS_PROXIMITY 0x08 -#define ABSOLUTE_DATA 0x040 -#define NON_CONTIGUOUS_DATA 0x080 -#define FALSE 0 -#define TRUE 1 -#define KEY_DATA 0x01 -#define BUTTON_DATA 0x02 -#define PROXIMITY_DATA 0x04 -#define MOTION_DATA 0x08 -#define INIT_SUCCESS 0 -#define INIT_FAILURE 1 -#define READ_SUCCESS 0 -#define READ_FAILURE 1 -#define WRITE_SUCCESS 0 -#define WRITE_FAILURE 1 -#define CLOSE_SUCCESS 0 -#define IN_PROXIMITY 0 -#define OUT_OF_PROXIMITY 1 - -#define SCROLLLOCK_LED (1 << 0) -#define NUMLOCK_LED (1 << 1) -#define CAPSLOCK_LED (1 << 2) - -#define _XSetDeviceMode 0 -#define _XSetDeviceValuators 1 -#define _XChangeDeviceControl 2 -#define _XChangeFeedbackControl 3 -#define _XChangeKeyboardControl 4 -#define _XChangePointerControl 5 -#define _XBell 6 - -typedef struct { - int class; - int bell_percent; -} HPBell; - -typedef struct { - int class; - int led_mask; - int led_values; -} HPLedFeedbackControl; - -typedef struct { - int class; - int click; - int bell_percent; - int bell_pitch; - int bell_duration; - int autoRepeat; - unsigned char autoRepeats[32]; - int leds; -} HPKeyboardFeedbackControl; - -typedef struct { - int class; - int num; - int den; - int threshold; -} HPPointerFeedbackControl; - -typedef struct { - int class; - int resolution; - int min_value; - int max_value; - int integer_displayed; -} HPIntegerFeedbackControl; - -typedef struct { - int max_symbols; - int num_symbols_supported; - int *symbols_supported; -} HPStrF; - -typedef struct { - int class; - int max_symbols; - int num_symbols_supported; - int num_symbols_displayed; - int *symbols_supported; - int *symbols_displayed; -} HPStringFeedbackControl; - -typedef struct { - int class; - int percent; - int pitch; - int duration; -} HPBellFeedbackControl; - -typedef struct { - int *valuators; - int first_valuator; - int num_valuators; -} HPValuatorControl; - -typedef struct { - int *resolutions; - int first_valuator; - int num_valuators; -} HPResolutionControl; - -typedef int (*pfrb)(); -typedef int (*ConfigureProc)(); -typedef int (*InitProc)(); -typedef int (*ReadProc)(); -typedef int (*WriteProc)(); -typedef int (*CloseProc)(); - -typedef struct _SerialProcs - { - ConfigureProc configure; /* filled in by driver */ - ReadProc read; /* filled in by driver */ - WriteProc write; /* filled in by driver */ - CloseProc close; /* filled in by driver */ - } SerialProcs; - -typedef struct _HPInputDeviceHeader - { - char path[MAX_NM]; /* device path - filled in by X server */ - char *x_name; /* device name */ - char *keymap_name; /* keymap name, if device has keys */ - char *keymap_file; /* keymap file, if device has keys */ - int resolution; /* resolution in counts/cm */ - int max_x; /* maximum x value in counts */ - int max_y; /* maximum y value in counts */ - int file_ds; /* file descriptor */ - int num_fdbk; /* length of list that follows */ - u_char *feedbacks; /* kbd, ptr, bell, and integer feedbacks*/ - int num_ledf; /* length of list that follows */ - u_char *ledf; /* led feedbacks */ - int num_strf; /* length of list that follows */ - HPStrF *strf; /* string feedbacks */ - u_char flags; /* device characteristics */ - u_char ax_num; /* number of axes */ - u_char num_buttons; /* number of buttons */ - u_char num_keys; /* number of keys */ - u_char min_kcode; /* minimum keycode */ - u_char max_kcode; /* maximum keycode */ - u_char reset; /* keycode to cause X server reset */ - u_char reset_mods; /* mask of modifiers for server reset */ - u_char button_chording;/* interval (ms) if chording enabled */ - u_char reserved[8]; /* reserved for future use */ - }HPInputDeviceHeader; -#endif /* _X_SERIALDRV_H_ */ Index: xc/programs/Xserver/hw/hp/input/xtest1imp.c diff -u xc/programs/Xserver/hw/hp/input/xtest1imp.c:1.2 xc/programs/Xserver/hw/hp/input/xtest1imp.c:removed --- xc/programs/Xserver/hw/hp/input/xtest1imp.c:1.2 Fri Dec 14 14:59:41 2001 +++ xc/programs/Xserver/hw/hp/input/xtest1imp.c Thu Feb 27 12:29:24 2003 @@ -1,285 +0,0 @@ -/* $Xorg: xtest1imp.c,v 1.4 2001/02/09 02:04:43 xorgcvs Exp $ */ -/* - * File: xtest1dd.c - * - * This file contains the device dependent parts of the input - * synthesis extension. - */ - -/* - - -Copyright 1986, 1987, 1988, 1998 The Open Group - -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. - -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. - - -Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett-Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -Hewlett-Packard makes no representations about the -suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -/*************************************************************** - * include files - ***************************************************************/ - -#define NEED_EVENTS -#define NEED_REPLIES - -#include <stdio.h> -#include "X.h" -#include "Xproto.h" -#include "inputstr.h" -#include "scrnintstr.h" -#define XTestSERVER_SIDE -#include "xtestext1.h" -/* - * the following include files are specific to HP's implementation - * of the extension. Your implementation may vary. - */ -#include "hildef.h" -#include "hpext.h" -#include "XHPproto.h" - -/* - * The following externs are specific to HP's implementation - * of the extension. Your implementation may vary. - */ -extern ScreenInfo screenInfo; -extern InputInfo inputInfo; -extern HPInputDevice *hpPointer, *hpKeyboard; - -/****************************************************************************** - * - * XTestGetPointerPos - * - * Return the position of the mouse. - * - */ -void -XTestGetPointerPos(fmousex, fmousey) - short *fmousex, *fmousey; - { - *fmousex = hpPointer->coords[0]; - *fmousey = hpPointer->coords[1]; - } - -/****************************************************************************** - * - * XTestJumpPointer - * - * Tell the server to move the mouse. - * - * This is implementation-dependent. Your implementation may vary. - */ -void -XTestJumpPointer(jx, jy, dev_type) -/* - * the x and y position to move the mouse to - */ -int jx; -int jy; -/* - * which device is supposed to move (ignored) - */ -int dev_type; -{ - int xdiff, screensize; - ScreenPtr pScreen = hpPointer->pScreen; - xEvent *format_ev(), *ev; - extern xHPEvent xE; - int coords[MAX_AXES]; - - /* - * move the mouse. - * The kludge below is an attempt to make it possible to - * test stacked screens mode. Xtm records absolute screen - * positions, so we have trouble knowing whether or not the - * screen changed. We make an arbitrary assumption here that - * if we moved more than 500 pixels in the x direction that - * we must have wrapped from one screen to another. This is - * a fairly safe assumption unless someone set the mouse - * acceleration to some unreasonably large number. - * - * In any case, translate the absolute postions into a relative - * move from the current pointer position, and pass that - * relative move to process_motion. - */ - xdiff = jx - hpPointer->coords[0]; - if (abs(xdiff) > 500 && screenInfo.numScreens > 1) - { - if (xdiff > 0) - { - if (pScreen->myNum != 0) - screensize = screenInfo.screens[pScreen->myNum-1]->width; - else - screensize = screenInfo.screens[screenInfo.numScreens-1]->width; - xdiff -= screensize; - } - else - xdiff += pScreen->width; - } - coords[0] = xdiff; - coords[1] = jy - hpPointer->coords[1]; - process_motion (inputInfo.pointer, hpPointer, hpPointer, coords); - ev = format_ev (inputInfo.pointer, MotionNotify, 0, GetTimeInMillis(), hpPointer, NULL); - ProcessInputEvents(); -} - -/****************************************************************************** - * - * XTestGenerateEvent - * - * Send a key/button input action to the server to be processed. - * - * This is implementation-dependent. Your implementation may vary. - */ -void -XTestGenerateEvent(dev_type, keycode, keystate, mousex, mousey) -/* - * which device supposedly performed the action - */ -int dev_type; -/* - * which key/button moved - */ -int keycode; -/* - * whether the key/button was up or down - */ -int keystate; -/* - * the x and y position of the locator when the action happenned - */ -int mousex; -int mousey; -{ - DeviceIntPtr dev; - HPInputDevice *tmp_ptr; - xEvent *format_ev(), *ev; - - /* - * the server expects to have the x and y position of the locator - * when the action happened placed in hpPointer. - */ - if (dev_type == MOUSE) - { - dev = inputInfo.pointer; - hpPointer->coords[0] = mousex; - hpPointer->coords[1] = mousey; - tmp_ptr = hpPointer; - } - else - { - dev = inputInfo.keyboard; - hpPointer->coords[0] = mousex; - hpPointer->coords[1] = mousey; - tmp_ptr = hpKeyboard; - } - /* - * convert the keystate back into server-dependent state values - */ - if (keycode < 8 ) - { - /* - * if keycode < 8, this is really a button. - */ - if (keystate == XTestKEY_UP) - { - keystate = ButtonRelease; - } - else - { - keystate = ButtonPress; - } - } - else - { - if (keystate == XTestKEY_UP) - { - keystate = KeyRelease; - } - else - { - keystate = KeyPress; - } - } - /* - * Tell the server to process all of the events in its input queue. - * This makes sure that there is room in the server's input queue - * for a key/button input event. - */ - ProcessInputEvents(); - /* - * put a key/button input action into the servers input event queue - */ - ev = format_ev (dev, keystate, keycode, GetTimeInMillis(), tmp_ptr, NULL); - /* - * Tell the server to process all of the events in its input queue. - * This makes sure that key/button event we just put in the queue - * is processed immediately. - */ - ProcessInputEvents(); -} - -/****************************************************************************** - * - * check_for_motion_steal - * - * Called from xosMoveMouse. - */ - -check_for_motion_steal (hotX, hotY) - register int hotX, hotY; - { -#ifdef XTESTEXT1 - extern int on_steal_input; /* defined in xtestext1di.c */ - extern short xtest_mousex; /* defined in xtestext1di.c */ - extern short xtest_mousey; /* defined in xtestext1di.c */ - - if ((on_steal_input) && - ((hotX != xtest_mousex) || (hotY != xtest_mousey))) /* mouse moved */ - { - XTestStealMotionData((hotX - xtest_mousex), - (hotY - xtest_mousey), - MOUSE, - xtest_mousex, - xtest_mousey); - } -#endif /* XTESTEXT1 */ - } - Index: xc/programs/Xserver/hw/hp/input/X11/XHPlib.h diff -u xc/programs/Xserver/hw/hp/input/X11/XHPlib.h:1.1.1.4 xc/programs/Xserver/hw/hp/input/X11/XHPlib.h:removed --- xc/programs/Xserver/hw/hp/input/X11/XHPlib.h:1.1.1.4 Tue Jan 16 17:43:07 2001 +++ xc/programs/Xserver/hw/hp/input/X11/XHPlib.h Thu Feb 27 12:29:24 2003 @@ -1,757 +0,0 @@ -/* $Xorg: XHPlib.h,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ */ -/************************************************************ -Copyright (c) 1992 by Hewlett-Packard Company, Palo Alto, California. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Hewlett-Packard not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -HEWLETT-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. - -********************************************************/ - -#ifndef XHPLIB_H -#define XHPLIB_H - -/* Definitions used by Xlib and the client */ - -#include "XHPproto.h" - -#ifndef _XLIB_H_ -#include <X11/Xlib.h> -#endif -#ifndef _XUTIL_H_ -#include <X11/Xutil.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define GENERAL_PROMPT 0 -#define PROMPT_1 1 -#define PROMPT_2 2 -#define PROMPT_3 3 -#define PROMPT_4 4 -#define PROMPT_5 5 -#define PROMPT_6 6 -#define PROMPT_7 7 - -#define GENERAL_ACKNOWLEDGE 0 -#define ACKNOWLEDGE_1 1 -#define ACKNOWLEDGE_2 2 -#define ACKNOWLEDGE_3 3 -#define ACKNOWLEDGE_4 4 -#define ACKNOWLEDGE_5 5 -#define ACKNOWLEDGE_6 6 -#define ACKNOWLEDGE_7 7 - -#define HPDeviceKeyPressreq 1 -#define HPDeviceKeyReleasereq 2 -#define HPDeviceButtonPressreq 3 -#define HPDeviceButtonReleasereq 4 -#define HPDeviceMotionNotifyreq 5 -#define HPDeviceFocusInreq 6 -#define HPDeviceFocusOutreq 7 -#define HPProximityInreq 8 -#define HPProximityOutreq 9 -#define HPDeviceKeymapNotifyreq 10 -#define HPDeviceMappingNotifyreq 11 - -extern int HPDeviceKeyPress; -extern int HPDeviceKeyRelease; -extern int HPDeviceButtonPress; -extern int HPDeviceButtonRelease; -extern int HPDeviceMotionNotify; -extern int HPDeviceFocusIn; -extern int HPDeviceFocusOut; -extern int HPProximityIn; -extern int HPProximityOut; -extern int HPDeviceKeymapNotify; -extern int HPDeviceMappingNotify; - -typedef int (*PtrFuncInt) (); - -typedef unsigned long XHPFilterId; - -/* structure used to split events queue between drivers and client */ - -typedef struct _XHProutines *_XHPrtnptr; - -typedef struct _XHProutines - { - Display *display; - XHPFilterId id; - Window window; - Mask std_filtermask; - Mask std_clientmask; - Mask ext_filtermask[MAX_LOGICAL_DEVS]; - Mask ext_clientmask[MAX_LOGICAL_DEVS]; - int (*callback) (); - int state_info; - _XHPrtnptr next; - } XHProutines; - -typedef struct - { - XKeyEvent ev; - XID deviceid; - } XHPDeviceKeyEvent; - -/*************************************************************** - * - * The location of the X pointer is reported in the coordinate - * fields of the ev member. The location of the device - * is determined from the previous DeviceMotionNotify event. - * - */ - -typedef struct { - XButtonEvent ev; - XID deviceid; - } XHPDeviceButtonEvent; - -/*************************************************************** - * - * The ax_num and ax_val fields contain the data reported by the - * device. The values may be absolute or relative. Any axis - * whose value changes will be reported. - * - */ - -typedef struct - { - int ax_num; - int ax_val; - } XHPAxis_data; - -/**************************************************************************** - * - * Bug fix for alignment problem on s700/ s800. - * - * XHPDeviceMotionEvent embeds an XMotionEvent struct. The XMotionEvent - * struct contains a char followed by an int. 68k CPUs add one byte of - * padding to align the int on a 16-bit boundary. PA-RISC CPUs add three - * bytes of padding to align the int on a 32-bit boudary. The result is - * that XMotionEvent structs are 58 bytes on 68k CPUs and 60 bytes on - * PA-RISC CPUs. - * - * The size is critical because the XHPScreen_events routine assumes that all - * HP input extension events contain a device id in bytes 60 - 63. - * - * The right way to fix this would be to define a 60-byte - * array and make it a union with the ev field, but this would break existing - * clients that reference this field. - * - * Instead we will ifdef the struct to make the padding come out right. - * A side effect of this is that on machines with 32-bit alignment, there's - * only room for 3 elements in the data array field, since the total XEvent - * size is 96 bytes. This is probably ok, since no HP input devices report more - * than 3 axes of motion. We will leave the s300 definition at 4 elements, - * since it was originally defined that way. We will also put in code to - * cause a compiler error for undefined machines. - * - * Mea culpa, ---gms - */ - -typedef struct - { -#if defined(__hp9000s300) || defined(__apollo) /* 68k aligns to 16 bits */ - XMotionEvent ev; - char pad; - unsigned char axes_count; - XID deviceid; - XHPAxis_data data[4]; -#else -#if defined(__hp9000s800) || defined(__hp9000s700) /* 32-bit alignment */ - XMotionEvent ev; - XID deviceid; - XHPAxis_data data[3]; - unsigned char axes_count; -#else -#if defined(__hp_osf) && defined(__mc68000) - XMotionEvent ev; - char pad; - unsigned char axes_count; - XID deviceid; - XHPAxis_data data[4]; -#else -#if defined(__hp_osf) && defined(__pa_risc) - XMotionEvent ev; - XID deviceid; - XHPAxis_data data[3]; - unsigned char axes_count; -#else -This is a bogus line to force a compiler error on undefined machines - gms. -#endif -#endif -#endif -#endif - } XHPDeviceMotionEvent; - -typedef struct - { - XFocusChangeEvent ev; - char pad[32]; - XID deviceid; - char pad1[2]; - } XHPDeviceFocusChangeEvent; - -typedef struct - { - XMappingEvent ev; - char pad[28]; - XID deviceid; - char pad1[2]; - } XHPDeviceMappingEvent; - -typedef struct - { - int type; /* ProximityIn or ProximityOut */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - Window window; /* window of event */ - Window root; /* root window that the event occured on */ - Window subwindow; /* child window */ - Time time; /* milliseconds */ - int x, y; /* pointer x, y coordinates in event window */ - int x_root, y_root; /* coordinates relative to root */ - unsigned int state; /* key or button mask */ - Bool same_screen; /* same screen flag */ - char pad[4]; - XID deviceid; - char pad1[2]; - } XHPProximityNotifyEvent; -typedef XHPProximityNotifyEvent XHPProximityInEvent; -typedef XHPProximityNotifyEvent XHPProximityOutEvent; - -/* generated on EnterWindow and FocusIn when KeyMapState selected */ -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - Window window; - char key_vector[32]; - char pad[8]; - XID deviceid; -} XHPDeviceKeymapEvent; - -typedef struct - { - char pad[60]; - XID deviceid; - } XHP_AnyEvent; - -typedef struct - { - unsigned int resolution; - unsigned short min_val; - unsigned short max_val; - } XHPaxis_info; - -typedef struct - { - XID x_id; - char *name; - XHPaxis_info *axes; - unsigned short type; - unsigned short min_keycode; - unsigned short max_keycode; - unsigned char hil_id; - unsigned char mode; - unsigned char num_axes; - unsigned char num_buttons; - unsigned char num_keys; - unsigned char io_byte; - unsigned short detailed_id; - unsigned char pad[6]; - } XHPDeviceList; - -typedef struct { - int key_click_percent; - int bell_percent; - int bell_pitch; - int bell_duration; - int led; - int led_mode; - int key; - int auto_repeat_mode; /* On, Off, Default */ - int accelNumerator; - int accelDenominator; - int threshold; -} XHPDeviceControl; - -/* Data structure for XHPGetDeviceControl */ - -typedef struct { - int key_click_percent; - int bell_percent; - unsigned int bell_pitch, bell_duration; - unsigned long led_mask; - int global_auto_repeat; - int accelNumerator; - int accelDenominator; - int threshold; - char auto_repeats[32]; -} XHPDeviceState; - -typedef struct { - Time time; - unsigned short *data; -} XHPTimeCoord; - - -/* This structure is used to pass Nlio ioctl style commands - * to the Nlio server */ - -#define XNHPNlioctl "HPNlioctl" - -typedef struct { - int cmd; - XPointer arg; - int ret; -} XhpNlioCmd; - -/* These are the structures used for the XHPNlioctl call */ - -typedef struct { - int flags; - KeySym invoke_nlio; - KeySym terminate_nlio; - KeySym set_alternate; - KeySym unset_alternate; -} K16_state; - -/* These are the commands for the XHPNlioctl call */ -#include <sys/ioctl.h> -#define K16_FOCUS_IN _IO('X', 100) -#define K16_FOCUS_OUT _IO('X', 101) - -#define K16_EXEC_PROC 1 -#define K16_KILL_PROC 2 -#define K16_GET_STATEKEYS 3 -#define K16_SET_STATEKEYS 4 -#define K16_ALT_ON 5 -#define K16_NLIO_ON 6 -#define K16_IS_PROC 7 -#define K16_GET_ENCODING 8 -#define K16_SET_ENCODING 9 - -#define K16_NLIOSTATE 1 -#define K16_ALTSTATE 2 - - /* The following block of defines are required for XHPSetKeyboardMapping, - * the server and other things that use XHPKeymaps. - */ -#ifdef hpV4 -#define DEF_DIRECTORY "/etc/X11/" -#else -#define DEF_DIRECTORY "/usr/lib/X11/" -#endif /* hpV4 */ - -#define SHL_DIRECTORY "/usr/lib/X11/" -#define DEF_FILENAME "XHPKeymaps" - -#define VERIFY_MAGIC "HPKeyMap Rev 1.0" -#define MAGIC_SIZE 20 /* sizeof(VERIFY_MAGIC) + some slop */ - -struct XHP_keymap_header { - int kbd; - int offset; - int size; -}; - -#define HPK_KEYDEVICE_NAME_TABLE_ID 19998 -#define HPK_MODMAP_TABLE_ID 19999 -#define HPK_FIRST_RESERVED_ID 20000 - -typedef struct -{ - int keydevice_id, min_keycode, max_keycode, columns; - char *name, *modmap_name; -} HPKKeyDeviceInfo; - -#define MODMAP_SIZE 256 /* aka MAP_LENGTH in server/include/input.h */ - -typedef struct -{ - char *modmap_name; - CARD8 modmap[MODMAP_SIZE]; -} HPKModMap; - - -/* Error values returned by XHPSetKeyboardMapping */ - -#define XHPKB_NOKEYFILE 1 -#define XHPKB_BADMAGIC 2 -#define XHPKB_BADKBID 3 -#define XHPKB_NONHPINPUTDEV 4 -#define XHPKB_NOMEM 5 - -/* In the following list, several of the constants have duplicate names. - The duplicate names were added to provide a consistent name for the - tokens (i.e. each name represents a language). The original version - mixed country names and language names. */ - -#define KB_US_English 0 /* For use with HP46021A */ -#define KB_Latin_Spanish 1 /* For use with HP46021AM */ -#define KB_Katakana 2 /* For use with HP46021AJ */ -#define KB_Danish 3 /* For use with HP46021AY */ -#define KB_French 4 /* For use with HP46021AF */ -#define KB_Norwegian 5 /* For use with HP46021AN */ -#define KB_Swiss_German 6 /* For use with HP46020AP - : HIL-ID(lower 5 bits)=19h */ -#define KB_Canada_French 7 /* For use with HP46021AC */ -#define KB_UK_English 8 /* For use with HP46021AU */ -#define KB_Finnish 9 /* For use with HP46021AX */ -#define KB_Belgian 10 /* For use with HP46021AW */ -#define KB_Swiss_German2 11 /* For use with HP46021AP */ -#define KB_Euro_Spanish 12 /* For use with HP46021AE */ -#define KB_Swiss_French2 13 /* For use with HP46021AQ */ -#define KB_T_Chinese 14 /* Trad. Chinese (ROC): For HP46021W#ZAA */ -#define KB_S_Chinese 15 /* Simp. Chinese (PROC): For HP40621W#ZAC */ -#define KB_German 16 /* For use with HP46021AD */ -#define KB_Swedish 17 /* For use with HP46021AS */ -#define KB_Dutch 18 /* For use with HP46021AH */ -#define KB_Korean 19 /* Korean: For HP40621W#ZAB */ -#define KB_Italian 20 /* For use with HP46021AZ */ -#define KB_Canada_English 21 /* For use with HP46021AL */ -#define KB_Swiss_French 22 /* For use with HP46020AQ - : HIL-ID(lower 5 bits)=03h */ -#define KB_Japanese 23 /* For use with HP46021W#ZAL */ - - /* ITF ethereal keyboards */ -#define KB_Hebrew 100 /* Hebrew Keymap - NO KEYBOARD */ -#define KB_Cyrillic 101 /* Cyrillic Keymap - NO KEYBOARD */ -#define KB_Czech 102 /* Czech Keymap - NO KEYBOARD */ -#define KB_Hungarian 103 /* Hungarian Keymap - NO KEYBOARD */ -#define KB_SerboCroatian 104 /* SerboCroatian Keymap - NO KEYBOARD */ -#define KB_Polish 105 /* Polish Keymap - NO KEYBOARD */ -#define KB_Romanian 106 /* Romanian Keymap - NO KEYBOARD */ -#define KB_Rumanian 106 /* alternate spelling */ -#define KB_Turkish 107 /* Turkey Keymap - NO KEYBOARD */ -#define KB_Greek 108 /* Greek Keymap - NO KEYBOARD */ -#define KB_Arabic 109 /* Arabic Keymap - NO KEYBOARD */ - - - /* PS2 ethereal keyboards (which may never exist) */ -#define KB_PS2_Hebrew 150 /* Hebrew Keymap - NO KEYBOARD */ -#define KB_PS2_Cyrillic 151 /* Cyrillic Keymap - NO KEYBOARD */ -#define KB_PS2_Czech 152 /* Czech Keymap - NO KEYBOARD */ -#define KB_PS2_Hungarian 153 /* Hungarian Keymap - NO KEYBOARD */ -#define KB_PS2_SerboCroatian 154 /* SerboCroatian Keymap - NO KEYBOARD */ -#define KB_PS2_Polish 155 /* Polish Keymap - NO KEYBOARD */ -#define KB_PS2_Romanian 156 /* Romanian Keymap - NO KEYBOARD */ -#define KB_PS2_Rumanian 156 /* alternate spelling */ -#define KB_PS2_Turkish 157 /* Turkey Keymap - NO KEYBOARD */ -#define KB_PS2_Greek 158 /* Greek Keymap - NO KEYBOARD */ -#define KB_PS2_Arabic 159 /* Arabic Keymap - NO KEYBOARD */ - -/* ******************** HP hil PS2 keyboards *************** */ - -#define KB_PS2_US_English 60 -#define KB_PS2_Latin_Spanish 61 -#define KB_PS2_Katakana 62 -#define KB_PS2_Danish 63 -#define KB_PS2_French 64 -#define KB_PS2_Norwegian 65 -#define KB_PS2_Swiss_German 66 -#define KB_PS2_Canada_French 67 -#define KB_PS2_UK_English 68 -#define KB_PS2_Finnish 69 -#define KB_PS2_Belgian 70 -#define KB_PS2_Swiss_German2 71 -#define KB_PS2_Euro_Spanish 72 -#define KB_PS2_Swiss_French2 73 -#define KB_PS2_T_Chinese 74 -#define KB_PS2_S_Chinese 75 -#define KB_PS2_German 76 -#define KB_PS2_Swedish 77 -#define KB_PS2_Dutch 78 -#define KB_PS2_Korean 79 -#define KB_PS2_Italian 80 -#define KB_PS2_Canada_English 84 -#define KB_PS2_Swiss_French 88 -#define KB_PS2_Japanese 89 -#define KB_JIS_Japanese 90 - -#define KB_NULL 201 /* Device that needs a null keymap, modmap */ -#define KB_BUTTON_BOX 202 /* HP button box(es) */ -#define KB_BARCODE_WAND 203 /* HP barcode reader */ - -#define KB_HPUNSUPP -1 /* For unsupported HP keyboards */ -#define KB_NONHP -2 /* For non-HP keyboards (for internal use) */ - -typedef int KEYBOARD_ID; - -/* Function definitions for clients. */ - -Status XHPSetKeyboardMapping(); - -/* End of entries required for XHPSetKeyboardMapping. */ - -typedef struct { - unsigned char * iso7to8; - unsigned char * iso8to7; - char ** mute8to7; - unsigned int mutekey; -} _XHP_transptrs; - -#define _XHP_ISO7To8(status,index) \ - ((_XHP_transptrs *) ((status)->compose_ptr)) -> iso7to8 [index] - -#define _XHP_ISO8To7(status,index) \ - ((_XHP_transptrs *) ((status)->compose_ptr)) -> iso8to7 [index] - -#define _XHP_MUTE8To7(status,index) \ - ((_XHP_transptrs *) ((status)->compose_ptr)) -> mute8to7[index-128] - -#define XHPInputInit(dpy,status) XHPNlioctl(dpy,status,K16_EXEC_PROC) - -#define XHPSetKbdMapInit(dpy,kbd,frc,status) \ - { \ - XHPNlioctl(dpy,status,K16_KILL_PROC); \ - XHPSetKeyboardMapping(dpy,kbd,frc); \ - XHPNlioctl(dpy,status,K16_EXEC_PROC); \ - } - -/* These are the tags in the compose structure for the different convert - * routines - */ - -#define _XHP_INP_NLIO 0x81000000 -#define _XHP_INP_ROM8 0x82000000 -#define _XHP_INP_7SUB 0x84000000 - -/* Function definitions for client programs */ - -PtrFuncInt XHPSetErrorHandler(); -XFontStruct *XHPGet16bitMixedFontStruct(); - -extern PtrFuncInt XHPGetEurasianCvt( - Display *dpy) ; -extern int XGetHpKeyboardId( - register Display *dpy, - unsigned char *kbd_id) ; -extern int XHPAcknowledge( - register Display *dpy, - XID device, - int ack) ; -extern int XHPDeviceAutoRepeatOff( - register Display *dpy, - XID device) ; -extern int XHPDeviceAutoRepeatOn( - register Display *dpy, - XID device, - int rate) ; -extern int XHPChangeDeviceControl( - register Display *dpy, - XID deviceid, - unsigned long mask, - XHPDeviceControl *vlist) ; -extern int XHPChangeDeviceKeyMapping( - register Display *dpy, - XID deviceid, - int first, - int syms_per_code, - KeySym *keysyms, - int count) ; -extern int XHPDisableReset( - register Display *dpy ); -extern int XHPDisableReset( - register Display *dpy ); -extern int XHPFreeDeviceList( - XHPDeviceList *list) ; -extern XHPTimeCoord * XHPGetDeviceMotionEvents( - register Display *dpy, - XID deviceid, - Window window, - Time start, - Time stop, - int *nEvents) ; -extern KeySym * XHPGetDeviceKeyMapping( - register Display *dpy, - XID deviceid, - KeyCode first, - int keycount, - int *syms_per_code) ; -extern XModifierKeymap * XHPGetDeviceModifierMapping( - register Display *dpy, - XID deviceid) ; -extern int XHPGetServerMode( - register Display *dpy, - register int screen) ; -extern int XHPGrabDeviceButton( - register Display *dpy, - XID device, - unsigned int button, - unsigned int modifiers, - Window grab_window, - Bool owner_events, - unsigned int event_mask, - int pointer_mode, - int keyboard_mode) ; -extern int XHPGrabDeviceKey( - register Display *dpy, - XID device, - unsigned int key, - unsigned int modifiers, - Window grab_window, - Bool owner_events, - int pointer_mode, - int keyboard_mode) ; -extern int XHPGrabReset( - register Display *dpy, - Atom *type) ; -extern int XHPGrabDevice( - register Display *dpy, - XID id, - Window window, - Bool ownerEvents, - int pointer_mode, - int device_mode, - Time time) ; -extern int XHPGetCurrentDeviceMask( - register Display *dpy, - Window w, - XID device, - Mask *mask) ; -extern int XHPGetExtEventMask( - register Display *dpy, - long evconst, - int *type, - Mask *mask) ; -extern int XHPGetDeviceFocus( - register Display *dpy, - XID deviceid, - Window *focus, - int *revert_to) ; -extern int XHPGetDeviceControl( - register Display *dpy, - XID deviceid, - XHPDeviceState *values) ; -extern XHPDeviceList * XHPListInputDevices( - register Display *dpy, - int *ndevices) ; -extern int XHPPrompt( - register Display *dpy, - XID device, - int prompt) ; -extern XHPFilterId XHPRegisterEventFilter( - register Display *dpy, - Window window, - int device, - Mask mask, - int (*routine)(), - int state_info) ; -extern int XHPSetInputDevice( - register Display *dpy, - register XID id, - register int mode) ; -extern int XHPSelectExtensionEvent( - register Display *dpy, - Window w, - XID device, - Mask mask) ; -extern int XHPUngrabDevice( - register Display *dpy, - XID device, - Time time) ; -extern int XHPUngrabDeviceButton( - register Display *dpy, - XID device, - unsigned int button, - unsigned int modifiers, - Window grab_window) ; -extern int XHPUngrabDeviceKey( - register Display *dpy, - XID device, - unsigned int key, - unsigned int modifiers, - Window grab_window) ; -extern int XHPSetDeviceFocus( - register Display *dpy, - XID deviceid, - Window focus, - int revert_to, - Time time) ; -extern int XHPSetDeviceModifierMapping( - register Display *dpy, - XID deviceid, - XModifierKeymap *modmap) ; -extern Cursor XHPGetWindowCursor( - register Display *dpy, - Window window) ; -extern int XHPConvertLookup( - register XKeyEvent *event, - char *buffer, - int nbytes, - KeySym *keysym, - XComposeStatus *status, - int (*convert_routine)()) ; -extern int input_isolatin1( - KeySym keysym, - int modifiers, - char *buffer_return, - int bytes_buffer, - XComposeStatus *status_in_out) ; -extern KEYBOARD_ID XHPGetKeyboardID( - Display *dpy) ; -extern void XHPUpdateKIDList( - Display *dpy, - KEYBOARD_ID kbd_id) ; -extern KEYBOARD_ID XHPGetCvtLang( - Display *dpy) ; -extern KEYBOARD_ID XHPGetHILandCvt( - Display *dpy) ; -extern int _XHPInitKbdState( - Display *dpy) ; -extern int _XHP_alt_on( - Display *dpy) ; -extern void _XHP_GetAltKeys( - Display *dpy, - K16_state *state) ; -extern void _XHP_SetAltKeys( - Display *dpy, - K16_state *state) ; -extern int _XHPIgnoreLang( - int value) ; -extern int XHPInputRoman8( - Display *display, - KeySym *keysym, - int modifiers, - unsigned char *buffer_return, - int bytes_buffer, - register XComposeStatus *status_in_out) ; -extern int XHPInputLatin1( - Display *display, - register KeySym *keysym, - int modifiers, - unsigned char *buffer_return, - int bytes_buffer, - register XComposeStatus *status_in_out) ; -extern int XHPInputISO8859_8( - Display *display, - KeySym *keysym, - unsigned int modifiers, - char *buffer_return, - int bytes_buffer, - XComposeStatus *status_in_out) ; -#ifdef __cplusplus -} /* Close scope of 'extern "C"' declaration that encloses file */ -#endif /* __cplusplus */ -#endif /* XHPLIB_H */ Index: xc/programs/Xserver/hw/hp/input/drivers/Imakefile diff -u xc/programs/Xserver/hw/hp/input/drivers/Imakefile:3.3 xc/programs/Xserver/hw/hp/input/drivers/Imakefile:removed --- xc/programs/Xserver/hw/hp/input/drivers/Imakefile:3.3 Wed Jan 17 17:36:48 2001 +++ xc/programs/Xserver/hw/hp/input/drivers/Imakefile Thu Feb 27 12:29:24 2003 @@ -1,36 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ - -#include <Server.tmpl> - -.c.o: - $(RM) $@ - $(CC) -c $(CFLAGS) $(PICFLAGS) $*.c - -DRVRLIBDIR = $(LIBDIR)/extensions -PICFLAGS = PositionIndependentCFlags -SRCS = hp7lc2k.c hp7lc2m.c hil_driver.c -INCLUDES = -I. -I.. -I../../../../../../include \ - -I../../../../../../include/extensions - -#define DriverTarget(name) @@\ -AllTarget(name.sl) @@\ - @@\ -name.sl: name.o @@\ - $(RM) $@~ @@\ - $(LD) -o $@~ -b name.o @@\ - chmod a-w $@~ @@\ - $(RM) $@ @@\ - $(MV) $@~ $@ @@\ - @@\ -InstallTarget(install,name.sl,$(INSTPGMFLAGS),$(DRVRLIBDIR)) @@\ -InstallTarget(install,XHPKeymaps,$(INSTPGMFLAGS),$(LIBDIR)) @@\ -InstallTarget(install,X0screens,$(INSTPGMFLAGS),$(LIBDIR)) @@\ - @@\ -clean:: @@\ - $(RM) name.sl - -DriverTarget(hp7lc2k) -DriverTarget(hp7lc2m) -DriverTarget(hil_driver) - -DependTarget() Index: xc/programs/Xserver/hw/hp/input/drivers/X0screens diff -u xc/programs/Xserver/hw/hp/input/drivers/X0screens:1.1.1.2 xc/programs/Xserver/hw/hp/input/drivers/X0screens:removed --- xc/programs/Xserver/hw/hp/input/drivers/X0screens:1.1.1.2 Tue Jan 16 17:43:07 2001 +++ xc/programs/Xserver/hw/hp/input/drivers/X0screens Thu Feb 27 12:29:24 2003 @@ -1,3 +0,0 @@ -# $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.1 xc/programs/Xserver/hw/hp/input/drivers/hil_driver.c:removed --- xc/programs/Xserver/hw/hp/input/drivers/hil_driver.c:3.1 Wed Jan 17 17:36:48 2001 +++ xc/programs/Xserver/hw/hp/input/drivers/hil_driver.c Thu Feb 27 12:29:24 2003 @@ -1,3584 +0,0 @@ -/* $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 - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Hewlett-Packard not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -HEWLETT-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. - -********************************************************/ -/* -cc -DTEST -g hil_driver.c -Aa -D_HPUX_SOURCE -I.. -I/usr/include/X11R5/X11 -I/usr/include/X11R5/X11/extensions - -cc +z -c -O hil_driver.c -Aa -D_HPUX_SOURCE -I.. -I/usr/include/X11R5/X11 -I/usr/include/X11R5/X11/extensions -ld -b hil_driver.o -o hil_driver.sl -cp hil_driver.sl /usr/lib/X11/extensions - -In /etc/X11/X0devices: - first NULL keyboard - Begin_Device_Description - name hil_driver.sl - use keyboard - path keyboard - End_Device_Description - - Begin_Device_Description - name hil_driver.sl - use pointer - path mouse - End_Device_Description - - */ - -static char what[] = "@(#)hil_driver : HIL device driver for X v1.0"; -#define WHAT (&what[4]) - -#include <stdio.h> -#include <string.h> -#include <fcntl.h> -#include <sys/hilioctl.h> -#include "x_serialdrv.h" -#include "X.h" -#include "XI.h" - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -#define XOTHER 2 /* not defined in XI.h */ -#define XEXTENSION 3 /* not defined in XI.h */ - -#define XPTR_USE (1<<XPOINTER) -#define XKBD_USE (1<<XKEYBOARD) -#define XOTH_USE (1<<XOTHER) -#define XEXT_USE (1<<XEXTENSION) -#define EXPLICIT 0x80 - - -/* ******************************************************************** */ -/* ******************* Misc Routines and Constants ******************** */ -/* ******************************************************************** */ - -static int imin(a,b) register int a,b; { return (a < b) ? a : b; } -static int imax(a,b) register int a,b; { return (a > b) ? a : b; } - -static void uppercase(str) char *str; /* convert str to upper case */ - { for (; *str; str++) *str = toupper(*str); } - -#define NITEMS(array) (sizeof(array)/sizeof(array[0])) - -static int remap[] = {0,1,4,5,2,3,6,7,8,9,10,11,12,13,14,15}; - -static char *h_position[] = -{ - "FIRST", - "SECOND", - "THIRD", - "FOURTH", - "FIFTH", - "SIXTH", - "SEVENTH", - "EIGHTH", - "NINTH", - "TENTH", - "ELEVENTH", - "TWELFTH", - "THIRTEENTH", - "FOURTEENTH", - "FIFTEENTH", - "SIXTEENTH", - "SEVENTEENTH", - "EIGHTEENTH", - "NINETEENTH", - "TWENTIETH", - "LAST" -}; - -/* ******************************************************************** */ -/* ************************** HIL Constants *************************** */ -/* ******************************************************************** */ - -typedef struct -{ - int hil_id_low, hil_id_high; - char *X_name; - int dev_type, x_type; - int (*read_device)(); - int reverse_y_axes; - int (*write_device)(); -} HIL_DeviceType; - -#define NULL_DEVICE 0 -#define MOUSE 1 -#define TABLET 2 -#define KEYBOARD 3 -#define QUADRATURE 4 -#define TOUCHSCREEN 5 -#define TOUCHPAD 6 -#define BUTTONBOX 7 -#define BARCODE 8 -#define ONE_KNOB 9 -#define TRACKBALL 10 -#define KEYPAD 11 -#define NINE_KNOB 12 -#define ID_MODULE 13 - -#ifdef DEBUG -#define ONE_AXIS 14 -#define NO_IOB_REL 15 -#define ERROR_DEVICE 16 -#define NO_AXES 17 -#define THREE_AXES 18 -#define XI_ONE_AXIS "ONE_AXIS" -#define XI_NO_IOB_REL "NO_IOB_REL" -#define XI_ERROR_DEVICE "ERROR_DEVICE" -#define XI_NO_AXES "NO_AXES" -#define XI_THREE_AXES "THREE_AXES" -#endif /* DEBUG */ - - -#define NINE_KNOB_ID 0x61 -#define QUAD_ID 0x62 /* one of the quadrature ids */ - -static int - read_keyboard(), read_nothing(), read_mouse(), read_barcode(), - write_keyboard(), write_nothing(); - - /* Notes: - * Only support button boxes with HIL ids of 0x30. Ignore the - * rest of them because I don't think they exist. - */ -static HIL_DeviceType devices[] = -{ - { /* !!!??? */ /* This MUST remain the first device in this list! */ - -1,-1, "NULL", NULL_DEVICE, XOTHER, - read_nothing, FALSE, write_nothing, - }, - { - 0x30,0x30, XI_BUTTONBOX, BUTTONBOX, KEYBOARD, - read_keyboard, TRUE, write_keyboard, - }, - { - 0x34,0x34, XI_ID_MODULE, ID_MODULE, KEYBOARD, - read_nothing, FALSE, write_nothing, - }, - { - 0x5c,0x5f, XI_BARCODE, BARCODE, KEYBOARD, - read_barcode, FALSE, write_nothing, - }, - { - 0x60,0x60, XI_ONE_KNOB, ONE_KNOB, MOUSE, - read_mouse, FALSE, write_nothing, - }, - { - 0x61,0x61, XI_NINE_KNOB, NINE_KNOB, MOUSE, - read_mouse, FALSE, write_nothing, - }, - { - 0x62,0x67, XI_QUADRATURE, QUADRATURE, MOUSE, - read_mouse, TRUE, write_nothing, - }, - { - 0x68,0x6b, XI_MOUSE, MOUSE, MOUSE, - read_mouse, TRUE, write_nothing, - }, - { - 0x6c,0x6f, XI_TRACKBALL, TRACKBALL, MOUSE, - read_mouse, TRUE, write_nothing, - }, -#ifdef DEBUG - { - 0x70,0x70, XI_ONE_AXIS, ONE_AXIS, MOUSE, - read_mouse, TRUE, write_nothing, - }, - { - 0x71,0x71, XI_NO_IOB_REL, NO_IOB_REL, MOUSE, - read_mouse, TRUE, write_nothing, - }, - { - 0x72,0x72, XI_MOUSE, MOUSE, MOUSE, - read_mouse, TRUE, write_nothing, - }, - { - 0x73,0x73, XI_ERROR_DEVICE, ERROR_DEVICE, MOUSE, - read_mouse, TRUE, write_nothing, - }, - { - 0x74,0x74, XI_NO_AXES, NO_AXES, MOUSE, - read_mouse, TRUE, write_nothing, - }, - { - 0x75,0x75, XI_THREE_AXES, THREE_AXES, MOUSE, - read_mouse, TRUE, write_nothing, - }, -#endif /* DEBUG */ - { - 0x8c,0x8f, XI_TOUCHSCREEN, TOUCHSCREEN, MOUSE, - read_mouse, FALSE, write_nothing, - }, - { - 0x90,0x97, XI_TABLET, TABLET, MOUSE, - read_mouse, FALSE, write_nothing, - }, - { - 0xC0,0xDF, XI_KEYBOARD, KEYBOARD, KEYBOARD, - read_keyboard, FALSE, write_keyboard, - }, -}; - - - /* HIL Poll Header bits: */ -#define KEY_DATA_MASK 0x70 -#define MOTION_MASK 0x0F /* !!!??? 0x3??? */ -#define MOTION_Y 0x02 /* Axes Y reporting */ -#define MOTION_XY 0x02 /* Axes X and Y reporting */ -#define MOTION_XYZ 0x03 /* Axes X, Y and Z reporting */ - -#define KEY_DOWN(key) ((key) & ~1) -#define KEY_UP(key) ((key) | 1) -#define KEY_IS_DOWN(key) (0 == ((key) & 1)) /* down is even */ -#define KEY_IS_UP(key) !KEY_IS_DOWN(key) - -#define BUTTON_BASE 0x80 /* buttons are keys 0x80 - 0x8D */ -#define BUTTON_MAX 0x8D /* buttons are keys 0x80 - 0x8D */ -#define BUTTON_DOWN(button) KEY_DOWN(button) /* same as keys */ -#define BUTTON_UP(button) KEY_UP(button) /* same as keys */ -#define BUTTON_IS_DOWN(button) KEY_IS_DOWN(button) /* same as keys */ -#define BUTTON_IS_UP(button) KEY_IS_UP(button) /* same as keys */ -#define NEXT_BUTTON(button) (BUTTON_DOWN(button) + 2) -#define REDUCE_BUTTON(button) ((button) / 2) -#define EXPAND_BUTTON(button) ((button) * 2) -#define HIL_TO_BUTTON(hil,type,buttons) ((type==TABLET && buttons==4) ? \ - remap[((hil) - BUTTON_BASE)] : ((hil) - BUTTON_BASE)) -#define PROXIMITY_IN 0x0E /* Actually 0x8E */ -#define PROXIMITY_OUT 0x0F /* Actually 0x8F */ -#define BUTTON_BIT(button) (1 << REDUCE_BUTTON(button)) -#define BUTTON_IS_LATCHED(d,button) (d->kb_latched & (BUTTON_BIT(button))) -#define BUTTON_IS_IGNORED(d,button) (d->kb_ignore & (BUTTON_BIT(button))) -#define IGNORE_BUTTON(d,button) (d->kb_ignore |= (BUTTON_BIT(button))) -#define UNIGNORE_BUTTON(d,button) (d->kb_ignore &= ~(BUTTON_BIT(button))) - - -#define HIL_ABSOLUTE 0x40 /* Device has absolute positioning data */ -#define HIL_16_BITS 0x20 /* Device has position data 16 bit accuracy */ -#define HIL_IOB 0x10 /* Device has I/O description byte */ -#define HIL_NUM_AXES 0x03 /* Number of axes supported */ - -#define HAS_LEDS 0xf0 /* Device has leds */ -#define HILIOB_PAA 0x80 /* Device supports prompt and acknowledge */ -#define HILIOB_NPA 0x70 /* Number of prompts & acknowledges supported */ -#define HILIOB_PIO 0x08 /* Device supports Proximity In/Out */ -#define HILIOB_BUTTONS 0x07 /* Number of buttons on device */ -#define HP_HIL 0x40 -#define HP_ITF_KBD 0x01 -#define PC101_KBD 0x02 - - -/* ******************************************************************** */ -/* ****************** Convert HIL ID to Keymap Name ******************* */ -/* ******************************************************************** */ - - /* - * Notes: - * See the manual on using hp-hil devices with HP-UX for the keyboard - * nationality codes; they are the low order 6 bits of the device - * id; 0x1f is United States, so we'll subtract from 0x1f to give - * the U.S. a keyId of zero; The PS2 keyboards have hil ids E0-FF. - * 6 bits == a max of 64 different keyboards. 32 extended and 32 PS2. - * George says to use 7 bits: HIL ids in the range A0-FF. - * A0-BF Compressed keyboard. Not used (yet). - * C0-DF Extended (ITF) keyboard - */ -static char *hil_id_to_keymap(hil_id, might_be_PS2) int hil_id, might_be_PS2; -{ - static char *base_table[] = - { - "31", /* HIL=00h Undefined keyboard */ - "HIL_JIS", /* HIL=01h Undefined keyboard */ - "Japanese", /* HIL=02h */ - "Swiss_French", /* HIL=03h */ - "29", /* HIL=04h No keysym support for Portugues */ - "28", /* HIL=05h No keysym support for Arabic */ - "27", /* HIL=06h No keysym support for Hebrew */ - "Canada_English", /* HIL=07h */ - "26", /* HIL=08h No keysym support for Turkish */ - "25", /* HIL=09h No keysym support for Greek */ - "24", /* HIL=0Ah No keysym support for Thai */ - "Italian", /* HIL=0Bh */ - "Korean", /* HIL=0Ch */ - "Dutch", /* HIL=0Dh */ - "Swedish", /* HIL=0Eh */ - "German", /* HIL=0Fh */ - "S_Chinese", /* HIL=10h */ - "T_Chinese", /* HIL=11h */ - "Swiss_French2", /* HIL=12h */ - "Euro_Spanish", /* HIL=13h */ - "Swiss_German2", /* HIL=14h */ - "Belgian", /* HIL=15h */ - "Finnish", /* HIL=16h */ - "UK_English", /* HIL=17h */ - "Canada_French", /* HIL=18h */ - "Swiss_German", /* HIL=19h */ - "Norwegian", /* HIL=1Ah */ - "French", /* HIL=1Bh */ - "Danish", /* HIL=1Ch */ - "Katakana", /* HIL=1Dh */ - "Latin_Spanish", /* HIL=1Eh */ - "US_English", /* HIL=1Fh */ - }; - - if (hil_id == 0x30) return "HP46086A_Button_Box"; - - if (hil_id == 0x5c) return "ITF_US_English"; /* Barcode reader */ - - if (hil_id == 0x34) return "ITF_US_English"; /* ID Module */ - - if (0xC0 <= hil_id && hil_id <= 0xDF) /* Keyboard: 0xC0 - 0xDF */ - { - static char buf[32]; - - if (might_be_PS2) strcpy(buf, "PS2_"); - else strcpy(buf, "ITF_"); - strcat(buf, base_table[hil_id & 0x1f]); /* 0 - 31 */ - return buf; - } - - /* A device that is not a key device, is unknown or not yet supported - * (such as a nonkbd device (like the ID module)) or Standard or - * Compressed keyboards. - */ - return ""; -} - -/* ******************************************************************** */ -/* ************************ General HIL stuff ************************* */ -/* ******************************************************************** */ - -#define MAX_HIL_BUTTONS 7 - -typedef struct -{ - /* Stuff for all devices */ - HIL_DeviceType *device; - char - long_name[50], /* eg FIRST_KEYBOARD, SECOND_POINTER, etc */ - keymap[30], /* "" or the keymap name */ - file_name[100]; /* "/dev/hil1", "/tmp/foo", etc */ - int - fd, /* File descriptor */ - hil_id, use_as, - data_size, /* DATA_IS_16_BITS, etc */ - num_axes, /* number of axes (motion only) */ - error; /* for device specific error handling */ - unsigned char - *ptr; /* for whatever */ - - /* Motion device specific stuff */ - int - res_x, res_y, /* counts / meter for x and y axis */ - max_x, max_y, /* maximum x and y value */ - latching_enabled, /* 0 if not enabled */ - latching_on, /* 0 if not on */ - chording_interval, /* 0 if not chording */ - /* Button chording state variables*/ - chorded_button_up, - ignore_button1, ignore_button2; - char - kb_latched, - kb_ignore, - ignored_buttons, /* bit 1 for ignore_button1, etc */ - button_down[MAX_HIL_BUTTONS]; /* TRUE if button n is down */ - - unsigned char - device_exists, /* TRUE if device exists and is openable */ - flags, /* device characteristics */ - iob, /* I/O descriptor Byte */ - num_buttons, /* count of physical buttons */ - num_keys, /* number of keys */ - num_leds; /* number of leds */ -} HIL_Device; - - - /* - * Notes: - * The nine knob box has the same HIL id as the quadrature port. - * The nine knob box is 3 HIL devices, each with 3 axes of motion. - */ -static int stat_device(ptr, fd) HIL_Device *ptr; -{ - unsigned char describe[32]; - int i, id, num_axes; - - memset(ptr, 0, sizeof(HIL_Device)); /* */ - - if (-1 == ioctl(fd, HILID, describe)) /* hopefully the NULL device */ - return FALSE; - - id = describe[0]; -#if 0 - printf("fd is %d errno is %d id is %x\n", fd, errno, id); /* */ -#endif - - num_axes = (describe[1] & HIL_NUM_AXES); - if (id == NINE_KNOB_ID && num_axes != 3) id = QUAD_ID; - - for (i = 0; i < NITEMS(devices); i++) - { - HIL_DeviceType *device = &devices[i]; - int iob; - - if (id < device->hil_id_low || device->hil_id_high < id) continue; - - ptr->device = device; - - ptr->hil_id = id; - ptr->flags = describe[1]; - ptr->num_axes = num_axes; - - ptr->data_size = DATA_IS_8_BITS; - - iob = 0; - - /* If # of axes (of motion) indicate it is a positional device then - * gather resolution. - * If 16 bits of information are reported, resolution is in - * counts/cm. In this case, convert to counts/meter. - */ - if (num_axes) - { - int lo_resol = describe[2], hi_resol = describe[3]; - - ptr->res_x = ptr->res_y = ((hi_resol << 8) + lo_resol); - - if (ptr->flags & HIL_16_BITS) - { - ptr->data_size = DATA_IS_16_BITS; - ptr->res_x = ptr->res_y = (ptr->res_x * 100); - } - - /* If it is an absolute device, gather size */ - if (ptr->flags & HIL_ABSOLUTE) - { - switch(num_axes) - { - case 2: - ptr->max_y = (int)describe[6] | ((int)describe[7] << 8); - /* FALLTHOUGH */ - case 1: - ptr->max_x = (int)describe[4] | ((int)describe[5] << 8); - } - iob = describe[4 + 2 * num_axes]; - } - else - { - if (ptr->flags & HIL_IOB) iob = describe[4]; - } - } - else /* Not a motion device */ - { - if (ptr->flags & HIL_IOB) iob = describe[2]; - ptr->res_x = ptr->res_y = 0; - } - - ptr->iob = iob; - - if (iob & HILIOB_BUTTONS) - { - ptr->num_buttons = (iob & HILIOB_BUTTONS); - } - - if (iob & HAS_LEDS) - ptr->num_leds = imax(1, ((iob & HILIOB_NPA) >> 4)); - - strcpy(ptr->keymap, hil_id_to_keymap(id, (3 == ptr->num_leds))); - - break; - } - return TRUE; -} - -static int open_device(name) char *name; -{ - return open(name, O_RDWR | O_NDELAY); -} - -static char hil_file_base_name[256] = "/dev/hil"; - -static int hil_open(n) /* n in (1,7) */ -{ - char name[128]; - - sprintf(name, "%s%d", hil_file_base_name, n); - return open_device(name); -} - - /* hil1 .. hil7 + a bunch of XOTHER devices */ -#define MAX_HIL_DEVICES 20 -static HIL_Device loop_device_list[MAX_HIL_DEVICES]; - -static HIL_Device *next_device(reset) -{ - static int z; - - if (reset) { z = 0; return NULL; } - if (z == MAX_HIL_DEVICES) return NULL; - return &loop_device_list[z++]; -} - - /* Figure out the long name of all the devices on the loop. This is for - * the list devices extension. - * Format: - * nth_name - * where: - * nth is 0 .. 6 for FIRST, SECOND, ... SEVENTH - * name is KEYBOARD, MOUSE, BARCODE, etc - * Notes: - * Do this after catalog_loop(). - */ -static void make_name(long_name, nth, x_name) char *long_name, *x_name; -{ - strcat(strcat(strcpy(long_name, h_position[nth]), "_"), x_name); -} - -static void name_loop() -{ - int nth, hil, i; - - for (hil = 0; hil < NITEMS(loop_device_list); hil++) - { - HIL_Device *ptr = &loop_device_list[hil]; - - nth = 0; - if (ptr->device_exists) - { - for (i = 0; i < hil; i++) - if ( loop_device_list[i].device_exists && - (loop_device_list[i].device->dev_type == ptr->device->dev_type)) - { - nth++; - } - make_name(ptr->long_name, nth, ptr->device->X_name); - } - } -} - - /* The HIL loop is cataloged every time configure() is called. This is - * because I can't tell if the loop has changed. This is probably - * only a problem for people using the HP Input Extension - somebody - * writing a client using the extension might be pluging and unpluging - * devices and running their client. If I didn't catalog, they would - * have to restart the X server. Note that changing one of the core - * devices (while X is running) or moving it around the loop is likely - * to hose X. - * If a device is open, assume it is OK (ie don't recatalog it). - * This should be quick - only have to open(), read(small amount of - * data), close() and look at data. - */ -static void catalog_loop() -{ - HIL_Device *ptr; - int fd, id, hil, i; - - ptr = loop_device_list; - for (hil = 1; hil <= 7; hil++, ptr++) - { - if (ptr->device_exists && ptr->fd != -1) continue; - - fd = hil_open(hil); - if (fd == -1) continue; /* Couldn't open that device */ - - if (stat_device(ptr, fd)) - { - sprintf(ptr->file_name, "%s%d", hil_file_base_name, hil); - ptr->fd = -1; - ptr->device_exists = TRUE; - } - close(fd); - } -} - - /* - * Input: - * path: Device file name. Eg "/dev/hil8" - * null_device: TRUE if this is the null device, ie if path is - * "/dev/null" ie "first NULL keyboard" - * use_as: XKEYBOARD, XPOINTER or XOTHER - * Notes: - * Always need to stat the device because stat_device() resets things. - */ -static HIL_Device *add_device(path, null_device, use_as) char *path; -{ - HIL_Device *ptr, *qtr; - int fd, n, device_exists; - - ptr = NULL; - for (n = 7; n < NITEMS(loop_device_list); n++) - { - qtr = &loop_device_list[n]; - device_exists = qtr->device_exists; - if (!device_exists || (device_exists && qtr->fd == -1)) - { - ptr = qtr; - break; - } - } - - if (!ptr) return NULL; /* no open slots */ - - if (-1 == (fd = open_device(path))) return NULL; - if (!stat_device(ptr, fd) && !null_device) - { - close(fd); - return NULL; - } - ptr->fd = fd; - ptr->device_exists = TRUE; - ptr->use_as |= use_as; - strcpy(ptr->file_name, path); - - return ptr; -} - -static HIL_Device *find_null_device(use_as) /* and open it */ -{ - HIL_Device *ptr = &loop_device_list[0]; - int hil, fd; - - for (hil = 0; hil < NITEMS(loop_device_list); hil++, ptr++) - if (ptr->device_exists && ptr->device->dev_type == NULL_DEVICE) - { - ptr->use_as |= use_as; - if (ptr->fd == -1 && (fd = open_device("/dev/null")) != -1) - ptr->fd = fd; - return ptr; - } - return NULL; -} - - /* Input: - * type: KEYBOARD, BARCODE, MOUSE, etc - * which: 1 ... 7 for FIRST, SECOND ... Find the nth device of type. - * Notes: - * If which is out of range (ie, bigger than last device of type), the - * last device of type is used. - */ -static HIL_Device *find_device_by_type(type, which, use_as, x, in_use) /* and open it */ -{ - HIL_Device *savptr = NULL, *ptr = &loop_device_list[0]; - int hil, savhil, fd, find_type; - - for (hil = 0; hil < NITEMS(loop_device_list); hil++, ptr++) - { - int count = 0; - - if (!ptr->device_exists) - continue; - if (x) - find_type = ptr->device->x_type; - else - find_type = ptr->device->dev_type; - - if (find_type == type) - { - count++; - if (!in_use && ptr->use_as) - continue; - savptr = ptr; - savhil = hil + 1; - if (count == which) break; - } - } - - /* Opening the device for the first time? */ - if (savptr && savptr->fd == -1 && (fd = open_device(savptr->file_name)) != -1) - { - savptr->fd = fd; - savptr->use_as = use_as; - return savptr; - } - - /* Opening the device for the nth time? */ - if (savptr && savptr->fd != -1) - { - savptr->use_as |= use_as; - return savptr; - } - - return NULL; -} - -static HIL_Device *use_device_n(n, use_as) /* n in [1,7] */ -{ - HIL_Device *ptr = &loop_device_list[n - 1]; - int fd; - - if (ptr->device_exists && ptr->fd == -1 && (fd = hil_open(n)) != -1) - { - ptr->fd = fd; - ptr->use_as |= use_as; - return ptr; - } - return NULL; -} - -static HIL_Device *find_device_by_fd(fd) -{ - HIL_Device *ptr = loop_device_list; - int hil; - - for (hil = NITEMS(loop_device_list); hil--; ptr++) - if (ptr->fd == fd) return ptr; - - return NULL; -} - -static HIL_Device *find_device_by_use(use_as) -{ - HIL_Device *ptr = loop_device_list; - int hil; - - for (hil = NITEMS(loop_device_list); hil--; ptr++) - if (ptr->use_as & use_as) return ptr; - - return NULL; -} - -/************************************************************************** - * - * This routine is called by the X server to close an input device. - * - */ -static int close_device(fd) int fd; -{ - HIL_Device *ptr; - int i; - - if (!(ptr = find_device_by_fd(fd))) /* !!! I hope this never happens! */ - return CLOSE_SUCCESS; - - close(fd); - ptr->fd = -1; - - return CLOSE_SUCCESS; -} - -/* ******************************************************************** */ -/* ************************* Read HIL Devices ************************* */ -/* ******************************************************************** */ - -typedef struct -{ - unsigned char len; - unsigned char timestamp[4]; - unsigned char poll_hdr; - unsigned char data[20]; -} HilPacket; - -#define MAX_PACKET_SIZE sizeof(HilPacket) /* bytes */ - -#define BUFFER_SIZE 600 /* Must be bigger than a (single) HIL packet */ -#define MAX_RETRIES 10 - -static unsigned char hil_buffer[BUFFER_SIZE]; -static int data_start, bytes_left; - -static int read_hil(fd, force_read) -{ - if (fd == -1) return bytes_left; /* buffer check */ - if (!force_read && bytes_left) return TRUE; /* got data in buffer */ - - /* buffer empty or not enough data in buffer */ - { - int n; - - if (bytes_left == 0) data_start = 0; - - n = read(fd, hil_buffer + data_start + bytes_left, - BUFFER_SIZE - bytes_left); - /* !!! error check */ - bytes_left += n; - } - - return bytes_left; -} - - /* Read (at least) enough data to fill a packet. - * Returns: - * 0 : No can do. - * n : packet size - */ -static int read_packet(fd) -{ - int packet_size; - - read_hil(fd,FALSE); - if (bytes_left == 0) return 0; /* no packet available */ - - packet_size = hil_buffer[data_start]; -/* if (packet_size > MAX_PACKET_SIZE) ??? -/* error check size!!! */ - if (packet_size <= bytes_left) return packet_size; - - if (fd == -1) return 0; - - /* Don't have a complete packet */ - { - int i; - - if (BUFFER_SIZE < (data_start + packet_size)) - { /* packet won't fit in buffer */ - memcpy(hil_buffer, hil_buffer + data_start, bytes_left); - data_start = 0; - } - for (i = MAX_RETRIES; i--; ) - { - if (!read_hil(fd, TRUE)) return 0; /* !!!??? */ - if (packet_size <= bytes_left) /* got (at least) the complete packet */ - return packet_size; - /* !!! sleep??? */ - } - } - /* !!! big bad errors! */ - return 0; -} - -static HilPacket a_packet; -static int packet_waiting = FALSE; - -static void pop_packet() { packet_waiting = FALSE; } - -static void *get_packet(fd) -{ - if (!packet_waiting) - { - int packet_size; - - if (!(packet_size = read_packet(fd))) return NULL; -/* !!! ick - two data copies */ - memcpy(&a_packet, hil_buffer + data_start, packet_size); - data_start += packet_size; bytes_left -= packet_size; - packet_waiting = TRUE; - } - return &a_packet; -} - - /* Look though the buffered HIL packets looking for a button down. If a - * button down is found, all the packets before it are thrown away. - * This is used for button chording. Motion devices can send different - * kinds of events in a single packet and there can be many motion - * events between button presses (even if the user is trying to hold - * still) - the tablet is especially bad in this reguard. - * Notes: - * This routine has its fingers in too many things. It has to know - * too much about HIL packets. - * Input: - * device : The motion device that has buffered data. - * b1, b2: Buttons to look for. - * button : Pointer to int to be filled in if a button is found. - * Output: - * button - * The current packet is the button if TRUE returned, else unknown. - * Returns: - * TRUE : If a button down is found. - */ -static int look_for_button(device, b1, b2, button) - HIL_Device *device; - int b1, b2, *button; -{ - int poll_hdr, b, z, n, save_data_start, save_bytes_left; - - save_data_start = data_start; - save_bytes_left = bytes_left; - - n = 1 + (device->data_size == DATA_IS_16_BITS); - - while (TRUE) - { - if (!get_packet(-1)) break; /* incomplete packet */ - pop_packet(); - - poll_hdr = a_packet.poll_hdr; - if (0 == (poll_hdr & KEY_DATA_MASK)) continue; /* not a button */ - - z = 0; - if (poll_hdr & MOTION_MASK) /* motion AND key data in one packet */ - { - if (poll_hdr & MOTION_XYZ) z += n; /* X axes */ - if (poll_hdr & MOTION_Y) z += n; /* Y axes */ - if ((poll_hdr & MOTION_XYZ) == MOTION_XYZ) z += n; /* Z axes */ - } - - b = HIL_TO_BUTTON(a_packet.data[z], device->device->dev_type, - device->num_buttons); - if (BUTTON_IS_UP(b)) break; - if (BUTTON_MAX < a_packet.data[z]) break; /* probably proximity */ - - b = REDUCE_BUTTON(b); -#if 1 - *button = b; - if (b == b1 || b == b2) - return TRUE; -#else - if (b == b1 || b == b2) - { - *button = b; - return TRUE; - } -#endif - - break; /* wrong button, bail */ - } - - /* No button down in buffer, restore buffer */ - data_start = save_data_start; - bytes_left = save_bytes_left; - - return FALSE; -} - - -/* ******************************************************************** */ -/* ****************** General HIL Turn Things On/Off ****************** */ -/* ******************************************************************** */ - - /* Turn on or off LEDs. - * Input: - * fd : File descriptor of the HIL device. - * led: LED to turn on or off: - * 0 : general prompt. - * 1 : LED 1. - * etc - * on : TRUE if turn on the LED. - */ - int - led_on[] = { HILP, HILP1, HILP2, HILP3, HILP4, HILP5, HILP6, HILP7 }, - led_off[] = { HILA, HILA1, HILA2, HILA3, HILA4, HILA5, HILA6, HILA7 }; -static void set_LED(fd, led, on) -{ - - if (0 <= led && led <= 7) - if (on) ioctl(fd, led_on [led], (char *)NULL); - else ioctl(fd, led_off[led], (char *)NULL); -} - - /* HILER1 == Key repeat every 1/30 sec - * HILER2 == Key repeat every 1/60 sec - */ -static void set_autorepeat(fd, mode) -{ - switch (mode) - { - case AutoRepeatModeOff: - ioctl(fd, HILDKR, (char *)NULL); - break; - case AutoRepeatModeOn: - case AutoRepeatModeDefault: - ioctl(fd, HILER2, (char *)NULL); - break; - default: - ioctl(fd, HILER1, (char *)NULL); - break; - } -} - -/* ******************************************************************** */ -/* ************************* Button Chording ************************** */ -/* ******************************************************************** */ - -/* Button chording can allow a N button device generate 2N-1 buttons. - * Buttons are numbered 0,1, ... - * Simultaneously pressing buttons A and B (where A in [1,N) and B == A+1), - * generates button N+A. - * Only a total of 5 buttons are supported. This is because of motion - * events and other things that George knows more about. - * If the device has 4 buttons, only buttons 0 and 1 can chord. - * If the device has 5 or more buttons, no chording is possible. Because of - * the max number of buttons. - * Only chord adjacent buttons ie don't chord buttons 0 and 3. My guess is - * this is historical and with 5 buttons, you don't need all those - * chordings. - * Algorithm: - * if num_buttons > 4, no chording, done. - * if num_buttons <= 3, Z = [0,2] - * if num_buttons == 4, Z = [0,1] - * Button in Z is pressed. X = button. - * Wait E seconds (E is passed in). Don't just wait for the device to - * send data within E seconds. This is in case the device sends (for - * example) motion data before the other button. - * Look though the data to see if there is a button (Y): - * No: Send button X. - * Yes: - * If new button (Y) is (X+1 or X-1) and Y != 3: - * Yes: - * Send button (N - 1) + (X + Y + 1)/2. - * (N - 1) because buttons start at zero. - * Discard the motion events between the buttons. - * No: - * Send X, and process the other data "normally". - * Notes: - * The hard part is keeping track of the ups and downs and keeping things - * in sync. - * If the chording interval is long, it is possible for the buffer in the - * HIL device (or kernel) to overflow while waiting. Too bad. - */ - -#define MAX_X_BUTTONS 5 -#define MAX_BUTTONS_FOR_CHORDING 4 - - /* Process a button, chording if chording turned on. - * Input: - * button : reduced button. - * Returns: - * TRUE : Button chorded - */ -static int chord_button(device, button, - chorded_button, ignore_button1, ignore_button2) - HIL_Device *device; - int *chorded_button, *ignore_button1, *ignore_button2; -{ - int x,y,ret, max_b; - - if (!device->chording_interval) return FALSE; - - max_b = 3; - if (3 < device->num_buttons) max_b = 1; - - x = REDUCE_BUTTON(button); - if ( - BUTTON_IS_DOWN(button) && - device->chording_interval && - 0 <= x && x <= max_b) - { - int x1; - struct timeval timeout; - - timeout.tv_sec = 0; - timeout.tv_usec = device->chording_interval * 1000; - select(0, (int *)NULL, (int *)NULL, (int *)NULL, &timeout); - - /* No response in allotted time */ - if (!read_hil(device->fd, FALSE)) return 0; - - if (3 == (x1 = x + 1)) x1 = 100; - /* No button => not a chording combination */ - ret = look_for_button(device, x - 1, x1, &y); -#if 1 - if (device->latching_enabled) - { - if (!ret && - (x == 0 && look_for_button(device, 100,2,&y)) || - (x == 2 && look_for_button(device, 100,0,&y))) - { - device->latching_on = ~device->latching_on; - if (device->latching_on) - device->kb_latched = 0xff; - else - device->kb_latched = 0; - *chorded_button = -1; - pop_packet(); - *ignore_button1 = BUTTON_UP(EXPAND_BUTTON(x)); - *ignore_button2 = BUTTON_UP(EXPAND_BUTTON(y)); - return TRUE; - } - } - - if (!ret) return FALSE; -#else - if (!ret) return FALSE; -#endif - *chorded_button = EXPAND_BUTTON(device->num_buttons - 1 + (x + y + 1)/2); - pop_packet(); - *ignore_button1 = BUTTON_UP(EXPAND_BUTTON(x)); - *ignore_button2 = BUTTON_UP(EXPAND_BUTTON(y)); - return TRUE; - } - return FALSE; /* Not a chording button */ -} - -/* ******************************************************************** */ -/* **************************** Read Mouse **************************** */ -/* ******************************************************************** */ - -static int find_button_down(), ignore_check(), error_check_button(); -static void set_button_down(); - -static int get_data(data, two_bytes) unsigned char *data; -{ - int z; - - z = data[0]; - if (two_bytes) z |= (data[1] << 8); - - return z; -} - -static void put_data(z, data, two_bytes) unsigned char *data; -{ - data[0] = z; /* the lower byte */ - if (two_bytes) data[1] = (z >> 8); -} - -#define APPEND_DATA(type, z) \ - *data_type |= (type); \ - put_data((z), &data[num_bytes], two_bytes); \ - num_bytes += step; \ - *pending = num_bytes; - - - /* Read from a motion device: motion and button presses. - * Mouse, Nine Knob box, Tablet. - * Handles absolute devices, 1 and 2 byte data. - * Notes: - * Mice need to have the Y axes motion data negated so the sprite - * moves when the mouse moves up. Tablets and the nine knob box - * don't. - * I really hate having to keep so much state information for chording - * but I think I have to: If you chord two buttons and then - * repeatedly press one while keeping the other pressed, you need a - * lot of state info to keep track. - * Can only chord one button pair at a time. This means that holding - * down the middle button, then pressing the buttons to the right - * and left of it (while holding down the middle button) will only - * chord one of the pairs. - * Motion devices can generate a LOT of motion data quickly. For - * example, if the X server takes a long time to render something - * (like a wide dashed line) and you are moving the mouse around, - * the HIL buffer (in the kernel) can overflow and data will be - * lost. This is more-or-less OK (can't do anything about it) - * except in the case where a button was down (before the overflow) - * and then went up after the overflow. In this case, a button up - * will never be generated. To check for this, when there is a - * button down, check to see if the button is already down and if it - * is, generate ups for all down buttons. The server sends - * extraneous ups to clients but I hope that doesn't cause problems - * because it is quite painful to track chording in this case. - */ -static int read_mouse(mouse, data, data_type, pending) - HIL_Device *mouse; - unsigned char *data, *data_type; - int *pending; -{ - int poll_hdr, num_bytes, two_bytes, step; - - if (!get_packet(mouse->fd)) - { - *pending = 0; - return READ_FAILURE; - } - - two_bytes = (mouse->data_size == DATA_IS_16_BITS); - step = 1 + two_bytes; - num_bytes = 0; - - if (mouse->error) /* Buffer overflow, sending button ups */ - { - int button; - - button = find_button_down(mouse, -1); - if (button == -1) /* No downs left */ - { - mouse->error = FALSE; - - *pending = 0; - return READ_SUCCESS; - } - - set_button_down(mouse, button, FALSE); - button = BUTTON_UP(button); - APPEND_DATA(BUTTON_DATA, button); - return READ_SUCCESS; - } - - poll_hdr = a_packet.poll_hdr; - - if (poll_hdr & MOTION_MASK) /* mouse movement */ - { - int motion; - - *data_type |= MOTION_DATA; - - if (poll_hdr & MOTION_XYZ) /* X axes */ - { - motion = get_data(&a_packet.data[num_bytes], two_bytes); - put_data(motion, &data[num_bytes], two_bytes); - num_bytes += step; - } - if (poll_hdr & MOTION_Y) /* Y axes */ - { - motion = get_data(&a_packet.data[num_bytes], two_bytes); - - if (mouse->device->reverse_y_axes) motion = -motion; - - put_data(motion, &data[num_bytes], two_bytes); - num_bytes += step; - } - if ((poll_hdr & MOTION_XYZ) == MOTION_XYZ) /* Z axes */ - { - motion = get_data(&a_packet.data[num_bytes], two_bytes); - put_data(motion, &data[num_bytes], two_bytes); - num_bytes += step; - } - } - - if (poll_hdr & KEY_DATA_MASK) /* button press */ - { - int button; - - pop_packet(); - - button = HIL_TO_BUTTON(a_packet.data[num_bytes], mouse->device->dev_type, - mouse->num_buttons); - - if (button == PROXIMITY_IN || button == PROXIMITY_OUT) - { - *data_type |= PROXIMITY_DATA; - - put_data( - ((button == PROXIMITY_IN) ? IN_PROXIMITY : OUT_OF_PROXIMITY), - &data[num_bytes], two_bytes); - num_bytes += step; - } - else /* Must? be a "regular" button */ - { - if (1) /*!error_check_button(mouse, button))*/ - { - if (mouse->chorded_button_up) /* Button chord in progress */ - { - if (BUTTON_IS_UP(button)) - { - button = ignore_check(mouse, button, mouse->ignore_button1, 0x1); - button = ignore_check(mouse, button, mouse->ignore_button2, 0x2); - if (0x3 == mouse->ignored_buttons) - { - button = mouse->chorded_button_up; - mouse->chorded_button_up = 0; /* turn off chord */ - } - } - } - else /* not chording */ - if (chord_button(mouse, button, &button, - &mouse->ignore_button1, &mouse->ignore_button2)) - { - if (button == -1) - { - mouse->chorded_button_up = -1; - num_bytes = 0; - } - else - mouse->chorded_button_up = BUTTON_UP(button); - mouse->ignored_buttons = 0; - set_button_down(mouse, mouse->ignore_button1, TRUE); - set_button_down(mouse, mouse->ignore_button2, TRUE); - } - - if (mouse->num_buttons==2 && button>=0 && button <=15) - button = remap[button]; - - if (button != -1 && !BUTTON_IS_IGNORED(mouse, button)) - { - APPEND_DATA(BUTTON_DATA, button); - set_button_down(mouse, button, BUTTON_IS_DOWN(button)); - } - } - - if (button != -1) - { - if (BUTTON_IS_LATCHED(mouse, button)) - if (BUTTON_IS_IGNORED(mouse, button)) - { - if (BUTTON_IS_DOWN(button)) - UNIGNORE_BUTTON(mouse, button); - } - else if (BUTTON_IS_DOWN(button)) - IGNORE_BUTTON(mouse, button); - } - } - } - - pop_packet(); - - *pending = num_bytes; /* might be zero in case of chording or error */ - return READ_SUCCESS; -} - -static int ignore_check(mouse, button, ignore_button, ignored_button_bit) - HIL_Device *mouse; - int button, ignore_button, ignored_button_bit; -{ - if (button == ignore_button) - { - if (0 == (mouse->ignored_buttons & ignored_button_bit)) - { - mouse->ignored_buttons |= ignored_button_bit; - set_button_down(mouse, button, FALSE); - return -1; /* ignore this button */ - } - } - return button; -} - -static void set_button_down(mouse, button, state) HIL_Device *mouse; -{ - mouse->button_down[REDUCE_BUTTON(button)] = state; -} - -static int find_button_down(mouse, button) HIL_Device *mouse; -{ - int b, z; - - if (-1 != button) - { - b = REDUCE_BUTTON(button); - z = mouse->button_down[b]; - } - else - for (b = 0; b < MAX_HIL_BUTTONS; b++) - if (z = mouse->button_down[b]) break; - - if (z) return EXPAND_BUTTON(b); - - return -1; -} - - /* Notes: - * If there is an error (because there is a down for a button that is - * already down), turn off that button so I don't send two ups (got - * a down so will get an up). - * Turn off chording. - * Trying not to send extraneous ups when chording is just too painful - * to worry about. The client will just have to live with extra - * ups. - */ -static int error_check_button(mouse, button) HIL_Device *mouse; -{ - if (BUTTON_IS_DOWN(button)) /* error check */ - { - if (-1 != find_button_down(mouse,button)) - { - mouse->error = TRUE; - mouse->chorded_button_up = 0; /* turn off chording */ - set_button_down(mouse, button, FALSE); - return TRUE; - } - } - return FALSE; /* no problem */ -} - -/* ******************************************************************** */ -/* ***************************** Nothing ****************************** */ -/* ******************************************************************** */ - -static int read_nothing(device, data, data_type, pending) - HIL_Device *device; - unsigned char *data, *data_type; - int *pending; -{ - *pending = 0; - return READ_FAILURE; -} - -static int write_nothing(device, request, data) - HIL_Device *device; - int request; - char *data; -{ - return WRITE_FAILURE; -} - -/* ******************************************************************** */ -/* ************************** Read Keyboard *************************** */ -/* ******************************************************************** */ - -#define REPEAT_CURSOR 0x02 - -#define ARROW_LEFT 0xf8 -#define ARROW_DOWN 0xfa -#define ARROW_UP 0xfc -#define ARROW_RIGHT 0xfe - -static int last_key; /* for arrow auto repeat */ - -static int read_keyboard(keyboard, data, data_type, pending) - HIL_Device *keyboard; - unsigned char *data, *data_type; - int *pending; -{ - if (get_packet(keyboard->fd)) - { - int poll_hdr = a_packet.poll_hdr; - - pop_packet(); - - if (poll_hdr & KEY_DATA_MASK) /* button press */ - { - int key; - - key = a_packet.data[0]; - - if (key == REPEAT_CURSOR) key = last_key; - if (KEY_IS_DOWN(key)) last_key = key; - - *pending = 1; - *data_type = KEY_DATA; - *data = key; - - return READ_SUCCESS; - } - } - - *pending = 0; - return READ_FAILURE; -} - -/* ******************************************************************** */ -/* *************************** Bell/Beeper **************************** */ -/* ******************************************************************** */ - -static unsigned char bell_data[4]; - -static int bell_percent, bell_pitch, bell_duration, beeper_fd = -1; - -#define BEEPER_DEVICE "/dev/rhil" - -static void close_beeper() -{ - if (beeper_fd != -1) close(beeper_fd); - beeper_fd = -1; -} - -static void open_beeper() -{ - if (beeper_fd > 0) - close_beeper(); - if ((beeper_fd = open(BEEPER_DEVICE,O_RDWR)) < 0) - ; /* Don't complain, because we might be on a non-HIL machine */ - /* and be using this driver to support NULL input devices */ -#if 0 - fprintf(stderr, "Unable to open beeper device \"%s\".\n",BEEPER_DEVICE); -#endif -} - -/* -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; File: beeper.c -; SCCS: %A% %G% %U% -; Description: Access Gator/Bobcat beeper -; Author: Andreas Paepcke, HPLabs/ATL -; Created: 2-Aug-85 -; Modified: Thu Oct 15 12:53:00 1987 (Don Bennett) bennett@hpldpb -; George and Craig -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -*/ - -/* - We offer three voices and a noise source. Each sound is controllable - in pitch, volume and duration. Pitch goes from 0 to 1023, volume - goes from 0 to 15, duration is between 0 and 255 10msec intervals. A - duration of 0 turns the voice on continuously. A volume of 0 turns - it off. - - The manufacturing specs give details on the programming interface. - Here is a summary: - - The beeper is accessed through ioctl calls. The request argument is - either "Send data to beeper" or "Read voice values from beeper". The - argument is a pointer to a 4 byte buffer. These four bytes are - defined here. - - R0-R3: Register address field. In the order R2, R1, R0: - - 0 0 0: Voice 1 frequency - 0 0 1: Voice 1 attenuation - 0 1 0: Voice 2 frequency - 0 1 1: Voice 2 attenuation - 1 0 0: Voice 3 frequency - 1 0 1: Voice 3 attenuation - 1 1 0: Noise control - 1 1 1: Noise attentuation - - F0-F9: 10 bits pitch - A0-A3: Attenuation - D0-D7: Duration in 10msec's - - The placement of data in the buffer is a bit screwy: - - Byte 0 (Frequency 1): 1 R2 R1 R0 F3 F2 F1 F0 LSB - Byte 1 (Frequency 2): 0 0 F9 F8 F7 F6 F5 F4 - Byte 2 (Attenuator) : 1 R2 R1 R0 A3 A2 A1 A0 - Byte 3 (Duration) : D7 D6 D5 D4 D3 D2 D1 D0 - - The volume is inversely proportional to the attenuation. In order to - provide rising numbers for rising loudness to the user, we expect a - volume and modify to get the attenuation. The same goes for the - pitch. In order to calculate frequency of the pitch, use: - - 83333/(1023-pitch) - - It is possible at any time to request the time any voice has left to - run. This is done by: - - F4: Read voice1 timer - F5: Read voice2 timer - F6: Read voice3 timer - F7: Read voice4 timer (noise) - - Noise is generated using a shift register. The following controls are - possible for noise: - - - Attenuation - - Duration - - Periodic or white noise - - 3 shift rates or output of voice 4 as shift rate - - Bytes 0 and 1 of the data buffer must both have identical contents to - control the noise. Attenuation and duration are as in the other - voices. Bytes 0 and 1 should look like this: - - 1 R2 R1 R0 0 FB NF1 NF0 LSB - - R2, R1 and R0 must be 1, 1 and 0. If FB is 0, periodic noise is - generated. If FB is 1, white noise is produced. - - NF1 and NF2 control the shift rate of the noise generator: - - NF1 NF2 Shift Rate - -------------------------- - 0 0 M/64 - 0 1 M/128 - 1 0 M/256 - 1 1 Uses tone generator 3 output - - M is related to the clock rate. - - The voice start routines return 0 if all is well, -1 if we had trouble - accessing the device file for the beeper and -2 if given parameters - were out of range. -*/ - -#define ALL_OK 0 -#define ACCESS_PROBLEM -1 -#define BAD_RANGE -2 - -#define VOICE1_FREQ_REG 0x80 /* Top nibbles for byte0 for all voices: */ -#define VOICE2_FREQ_REG 0xA0 -#define VOICE3_FREQ_REG 0xC0 -#define NOISE_FREQ_REG 0xE0 - -#define VOICE1_VOL_REG 0x90 /* Top nibbles for byte2 for all voices: */ -#define VOICE2_VOL_REG 0xB0 -#define VOICE3_VOL_REG 0xD0 -#define NOISE_VOL_REG 0xF0 - -#define MIN_VOICE 1 /* Legal ranges for parms from user: */ -#define MAX_VOICE 3 -#define MIN_PITCH 0 -#define MAX_PITCH 1023 -#define MIN_DURATION 0 -#define MAX_DURATION 255 -#define MIN_VOLUME 0 -#define MAX_VOLUME 15 -#define MIN_TYPE 0 -#define MAX_TYPE 1 -#define MIN_RATE 0 -#define MAX_RATE 3 - -static void set_bell_attributes(volume, pitch, duration) -{ - int attenuation, loud; - - /* Map input range of 0 - 100 to hardware attenuation range of 15 - - * 0 we use a temp variable (loud) because of C's penchant for - * strange orders of evaluation ie to force the multiply before the - * divide. - */ - volume = imin(volume,100); - loud = volume * MAX_VOLUME; - attenuation = (char) MAX_VOLUME - loud / 100; - - duration = duration / 10; - pitch = (pitch == 0) ? 1023 : (83333 / pitch); - pitch = imax(imin(pitch, 1023), 0); - - bell_data[0] = (VOICE1_FREQ_REG | (pitch & 0x0f)); - bell_data[1] = (0x03f & (pitch >> 4)); - bell_data[2] = (VOICE1_VOL_REG | attenuation); - bell_data[3] = imax(duration, 1); -} - - - /* We formerly used all three voices to get a reasonably loud volume. - * However, s700 audio hardware support tries to emulate the EFTSBP - * ioctl, and has only one voice. The result is that distinct beeps - * (usually two) are heard if the duration is 100ms or less. To avoid - * this, we will use only one voice. - */ -static void ding(click, percent) -{ - int pitch; - unsigned char buffer[4]; - - if (beeper_fd < 0) return; - if (!click) - { - ioctl(beeper_fd, EFTSBP, bell_data); - return; - } - - click = (int)((double)(percent) * 15.0 / 100.0); - - click = MAX_VOLUME - click; - pitch = MAX_PITCH - 800; - buffer[0] = VOICE2_FREQ_REG | (pitch & 0x0000000f); - buffer[2] = VOICE2_VOL_REG | (percent & 0x0000000f); - /* The high 6 bits of the pitch go into byte 1: */ - buffer[1] = 0x0000003f & (pitch >> 4); - buffer[3] = 1; - ioctl(beeper_fd,EFTSBP,buffer); - return; -} - -/* ******************************************************************** */ -/* ************************** Write Keyboard ************************** */ -/* ******************************************************************** */ - -/* !!!!!!!!!!!!!!! - * keyclick - in server or here? - * if key autorepeats but autorepeat is turned off for that key, don't click - * ie down == last key && autorepeat on for key && keyclick on => click - * only click for downs - */ - -static int write_keyboard(keyboard,request,data) - HIL_Device *keyboard; - int request; - char *data; -{ - int fd = keyboard->fd; - -/*fprintf(stderr,"write keyboard, request is %d\n",request); /* */ - switch (request) - { - case _XChangeFeedbackControl: - { - HPKeyboardFeedbackControl *kctrl = (HPKeyboardFeedbackControl *)data; - - if (kctrl->class == KbdFeedbackClass) - { - int mask = kctrl->leds; - - if (keyboard->device->reverse_y_axes) /* its a button box */ - { - set_LED(fd, 0, mask & 1); - } - else /* a keyboard */ - { - set_LED(fd, 1, mask & SCROLLLOCK_LED); - set_LED(fd, 2, mask & NUMLOCK_LED); - set_LED(fd, 3, mask & CAPSLOCK_LED); - } - - set_autorepeat(fd, kctrl->autoRepeat); - - set_bell_attributes( - kctrl->bell_percent, kctrl->bell_pitch, kctrl->bell_duration); - - return WRITE_SUCCESS; - } - break; - } - case _XBell: - { - HPKeyboardFeedbackControl *kctrl = (HPKeyboardFeedbackControl *)data; - - if (kctrl->click) - ding(TRUE, kctrl->click); - else - ding(FALSE, kctrl->bell_percent); - return WRITE_SUCCESS; - } - case _XSetDeviceValuators: - case _XChangeDeviceControl: - case _XSetDeviceMode: - default: - break; - } - return WRITE_FAILURE; -} - -/* ******************************************************************** */ -/* ************************** BarCode Reader ************************** */ -/* ******************************************************************** */ - -static unsigned char ascii_to_code[128][7] = -{ - {0x0c,0x0a,0x7a,0x7b,0x0b,0x0d,0}, /* 0x00 : cntl - @ */ - {0x0c,0x5a,0x5b,0x0d,0,0,0}, /* 0x01 : cntl - a */ - {0x0c,0x30,0x31,0x0d,0,0,0}, /* 0x02 : cntl - b */ - {0x0c,0x34,0x35,0x0d,0,0,0}, /* 0x03 : cntl - c */ - {0x0c,0x56,0x57,0x0d,0,0,0}, /* 0x04 : cntl - d */ - {0x0c,0x68,0x69,0x0d,0,0,0}, /* 0x05 : cntl - e */ - {0x0c,0x54,0x55,0x0d,0,0,0}, /* 0x06 : cntl - f */ - {0x0c,0x52,0x53,0x0d,0,0,0}, /* 0x07 : cntl - g */ - {0x0c,0x50,0x51,0x0d,0,0,0}, /* 0x08 : cntl - h */ - {0x0c,0xc0,0xc1,0x0d,0,0,0}, /* 0x09 : cntl - i */ - {0x0c,0xd0,0xd1,0x0d,0,0,0}, /* 0x0a : cntl - j */ - {0x0c,0xd2,0xd3,0x0d,0,0,0}, /* 0x0b : cntl - k */ - {0x0c,0xd4,0xd5,0x0d,0,0,0}, /* 0x0c : cntl - l */ - {0x0c,0xe0,0xe1,0x0d,0,0,0}, /* 0x0d : cntl - m */ - {0x0c,0xf0,0xf1,0x0d,0,0,0}, /* 0x0e : cntl - n */ - {0x0c,0xc2,0xc3,0x0d,0,0,0}, /* 0x0f : cntl - o */ - {0x0c,0xc4,0xc5,0x0d,0,0,0}, /* 0x10 : cntl - p */ - {0x0c,0x6c,0x6d,0x0d,0,0,0}, /* 0x11 : cntl - q */ - {0x0c,0x66,0x67,0x0d,0,0,0}, /* 0x12 : cntl - r */ - {0x0c,0x58,0x59,0x0d,0,0,0}, /* 0x13 : cntl - s */ - {0x0c,0x64,0x65,0x0d,0,0,0}, /* 0x14 : cntl - t */ - {0x0c,0x60,0x61,0x0d,0,0,0}, /* 0x15 : cntl - u */ - {0x0c,0x32,0x33,0x0d,0,0,0}, /* 0x16 : cntl - v */ - {0x0c,0x6a,0x6b,0x0d,0,0,0}, /* 0x17 : cntl - w */ - {0x0c,0x36,0x37,0x0d,0,0,0}, /* 0x18 : cntl - x */ - {0x0c,0x62,0x63,0x0d,0,0,0}, /* 0x19 : cntl - y */ - {0x0c,0x38,0x39,0x0d,0,0,0}, /* 0x1a : cntl - z */ - {0x0c,0xc6,0xc7,0x0d,0,0,0}, /* 0x1b : cntl - [ */ - {0x0c,0xca,0xcb,0x0d,0,0,0}, /* 0x1c : cntl - \ */ - {0x0c,0xc8,0xc9,0x0d,0,0,0}, /* 0x1d : cntl - ] */ - {0x0c,0x0a,0x72,0x73,0x0b,0x0d,0}, /* 0x1e : cntl - ^ */ - {0x0c,0x0a,0xb6,0xb7,0x0b,0x0d,0}, /* 0x1f : cntl - _ */ - {0xf2,0xf3,0,0,0,0,0}, /* 0x20 : space */ - {0x0a,0x7c,0x7d,0x0b,0,0,0}, /* 0x21 : ! */ - {0x0a,0xd8,0xd9,0x0b,0,0,0}, /* 0x22 : " */ - {0x0a,0x78,0x79,0x0b,0,0,0}, /* 0x23 : # */ - {0x0a,0x76,0x77,0x0b,0,0,0}, /* 0x24 : $ */ - {0x0a,0x74,0x75,0x0b,0,0,0}, /* 0x25 : % */ - {0x0a,0x70,0x71,0x0b,0,0,0}, /* 0x26 : & */ - {0xd8,0xd9,0,0,0,0,0}, /* 0x27 : ' */ - {0x0a,0xb2,0xb3,0x0b,0,0,0}, /* 0x28 : ( */ - {0x0a,0xb4,0xb5,0x0b,0,0,0}, /* 0x29 : ) */ - {0x0a,0xb0,0xb1,0x0b,0,0,0}, /* 0x2a : * */ - {0x0a,0xb8,0xb9,0x0b,0,0,0}, /* 0x2b : + */ - {0xe2,0xe3,0,0,0,0,0}, /* 0x2c : , */ - {0xb6,0xb7,0,0,0,0,0}, /* 0x2d : - */ - {0xe4,0xe5,0,0,0,0,0}, /* 0x2e : . */ - {0xe6,0xe7,0,0,0,0,0}, /* 0x2f : / */ - {0xb4,0xb5,0,0,0,0,0}, /* 0x30 : 0 */ - {0x7c,0x7d,0,0,0,0,0}, /* 0x31 : 1 */ - {0x7a,0x7b,0,0,0,0,0}, /* 0x32 : 2 */ - {0x78,0x79,0,0,0,0,0}, /* 0x33 : 3 */ - {0x76,0x77,0,0,0,0,0}, /* 0x34 : 4 */ - {0x74,0x75,0,0,0,0,0}, /* 0x35 : 5 */ - {0x72,0x73,0,0,0,0,0}, /* 0x36 : 6 */ - {0x70,0x71,0,0,0,0,0}, /* 0x37 : 7 */ - {0xb0,0xb1,0,0,0,0,0}, /* 0x38 : 8 */ - {0xb2,0xb3,0,0,0,0,0}, /* 0x39 : 9 */ - {0x0a,0xd6,0xd7,0x0b,0,0,0}, /* 0x3a : : */ - {0xd6,0xd7,0,0,0,0,0}, /* 0x3b : ; */ - {0x0a,0xe2,0xe3,0x0b,0,0,0}, /* 0x3c : < */ - {0xb8,0xb9,0,0,0,0,0}, /* 0x3d : = */ - {0x0a,0xe4,0xe5,0x0b,0,0,0}, /* 0x3e : > */ - {0x0a,0xe6,0xe7,0x0b,0,0,0}, /* 0x3f : ? */ - {0x0a,0x7a,0x7b,0x0b,0,0,0}, /* 0x40 : @ */ - {0x0a,0x5a,0x5b,0x0b,0,0,0}, /* 0x41 : A */ - {0x0a,0x30,0x31,0x0b,0,0,0}, /* 0x42 : B */ - {0x0a,0x34,0x35,0x0b,0,0,0}, /* 0x43 : C */ - {0x0a,0x56,0x57,0x0b,0,0,0}, /* 0x44 : D */ - {0x0a,0x68,0x69,0x0b,0,0,0}, /* 0x45 : E */ - {0x0a,0x54,0x55,0x0b,0,0,0}, /* 0x46 : F */ - {0x0a,0x52,0x53,0x0b,0,0,0}, /* 0x47 : G */ - {0x0a,0x50,0x51,0x0b,0,0,0}, /* 0x48 : H */ - {0x0a,0xc0,0xc1,0x0b,0,0,0}, /* 0x49 : I */ - {0x0a,0xd0,0xd1,0x0b,0,0,0}, /* 0x4a : J */ - {0x0a,0xd2,0xd3,0x0b,0,0,0}, /* 0x4b : K */ - {0x0a,0xd4,0xd5,0x0b,0,0,0}, /* 0x4c : L */ - {0x0a,0xe0,0xe1,0x0b,0,0,0}, /* 0x4d : M */ - {0x0a,0xf0,0xf1,0x0b,0,0,0}, /* 0x4e : N */ - {0x0a,0xc2,0xc3,0x0b,0,0,0}, /* 0x4f : O */ - {0x0a,0xc4,0xc5,0x0b,0,0,0}, /* 0x50 : P */ - {0x0a,0x6c,0x6d,0x0b,0,0,0}, /* 0x51 : Q */ - {0x0a,0x66,0x67,0x0b,0,0,0}, /* 0x52 : R */ - {0x0a,0x58,0x59,0x0b,0,0,0}, /* 0x53 : S */ - {0x0a,0x64,0x65,0x0b,0,0,0}, /* 0x54 : T */ - {0x0a,0x60,0x61,0x0b,0,0,0}, /* 0x55 : U */ - {0x0a,0x32,0x33,0x0b,0,0,0}, /* 0x56 : V */ - {0x0a,0x6a,0x6b,0x0b,0,0,0}, /* 0x57 : W */ - {0x0a,0x36,0x37,0x0b,0,0,0}, /* 0x58 : X */ - {0x0a,0x62,0x63,0x0b,0,0,0}, /* 0x59 : Y */ - {0x0a,0x38,0x39,0x0b,0,0,0}, /* 0x5a : Z */ - {0xc6,0xc7,0,0,0,0,0}, /* 0x5b : [ */ - {0xca,0xcb,0,0,0,0,0}, /* 0x5c : \ */ - {0xc8,0xc9,0,0,0,0,0}, /* 0x5d : ] */ - {0x0a,0x72,0x73,0x0b,0,0,0}, /* 0x5e : ^ */ - {0x0a,0xb6,0xb7,0x0b,0,0,0}, /* 0x5f : _ */ - {0x7e,0x7f,0,0,0,0,0}, /* 0x60 : ` */ - {0x5a,0x5b,0,0,0,0,0}, /* 0x61 : a */ - {0x30,0x31,0,0,0,0,0}, /* 0x62 : b */ - {0x34,0x35,0,0,0,0,0}, /* 0x63 : c */ - {0x56,0x57,0,0,0,0,0}, /* 0x64 : d */ - {0x68,0x69,0,0,0,0,0}, /* 0x65 : e */ - {0x54,0x55,0,0,0,0,0}, /* 0x66 : f */ - {0x52,0x53,0,0,0,0,0}, /* 0x67 : g */ - {0x50,0x51,0,0,0,0,0}, /* 0x68 : h */ - {0xc0,0xc1,0,0,0,0,0}, /* 0x69 : i */ - {0xd0,0xd1,0,0,0,0,0}, /* 0x6a : j */ - {0xd2,0xd3,0,0,0,0,0}, /* 0x6b : k */ - {0xd4,0xd5,0,0,0,0,0}, /* 0x6c : l */ - {0xe0,0xe1,0,0,0,0,0}, /* 0x6d : m */ - {0xf0,0xf1,0,0,0,0,0}, /* 0x6e : n */ - {0xc2,0xc3,0,0,0,0,0}, /* 0x6f : o */ - {0xc4,0xc5,0,0,0,0,0}, /* 0x70 : p */ - {0x6c,0x6d,0,0,0,0,0}, /* 0x71 : q */ - {0x66,0x67,0,0,0,0,0}, /* 0x72 : r */ - {0x58,0x59,0,0,0,0,0}, /* 0x73 : s */ - {0x64,0x65,0,0,0,0,0}, /* 0x74 : t */ - {0x60,0x61,0,0,0,0,0}, /* 0x75 : u */ - {0x32,0x33,0,0,0,0,0}, /* 0x76 : v */ - {0x6a,0x6b,0,0,0,0,0}, /* 0x77 : w */ - {0x36,0x37,0,0,0,0,0}, /* 0x78 : x */ - {0x62,0x63,0,0,0,0,0}, /* 0x79 : y */ - {0x38,0x39,0,0,0,0,0}, /* 0x7a : z */ - {0x0a,0xc6,0xc7,0x0b,0,0,0}, /* 0x7b : { */ - {0x0a,0xca,0xcb,0x0b,0,0,0}, /* 0x7c : | */ - {0x0a,0xc6,0xc9,0x0b,0,0,0}, /* 0x7d : } */ - {0x0a,0x7e,0x7f,0x0b,0,0,0}, /* 0x7e : ~ */ - {0x0a,0x3e,0x3f,0x0b,0,0,0}, /* 0x7f : delete */ -}; - - -static int read_barcode(device, data, data_type, pending) - HIL_Device *device; - unsigned char *data, *data_type; - int *pending; -{ - unsigned char *ptr; - - ptr = device->ptr; - - if (ptr) /* In the middle of process data */ - { - if (!*ptr) - { - device->ptr = NULL; - return READ_SUCCESS; - } - - *pending = 1; - *data_type = KEY_DATA; - *data = *ptr++; - - device->ptr = ptr; - - return READ_SUCCESS; - } - - if (get_packet(device->fd)) - { - int poll_hdr = a_packet.poll_hdr; - - pop_packet(); - - if (poll_hdr & KEY_DATA_MASK) - { - device->ptr = ascii_to_code[a_packet.data[0]]; - return read_barcode(device, data, data_type, pending); - } - } - - *pending = 0; - return READ_FAILURE; -} - -/* ******************************************************************** */ -/* ************************* Parse X*devices ************************** */ -/* ******************************************************************** */ - -/* - X*devices: - position device_name X_use - eg: - first keyboard keyboard - first mouse pointer - first tablet other - - path X_use - eg: - /dev/hil3 keyboard - /tmp/foo pointer - /dev/hil7 other - - path hil_path - Use path instead of "/dev/hil". - */ - - - -static int parse_1_parm(use, use_as) char *use; int *use_as; -{ - if (0 == strcmp(use, "POINTER")) *use_as = XPTR_USE; - else if (0 == strcmp(use, "KEYBOARD")) *use_as = XKBD_USE; - else if (0 == strcmp(use, "OTHER")) *use_as = XOTH_USE; - else - { - fprintf(stderr, - "Bad device use \"%s\" in X*devices file, entry skipped.\n", use); - return FALSE; - } - return TRUE; -} - -/*********************************************************************** - * - * This routine is invoked when two parameters are specified. - * Either they are a device path and intended use, or a device loop path. - */ - -static int parse_2_parms(dev, use, use_as) - char *dev, *use; - int *use_as; - { - uppercase(use); - - if (0 == strcmp (use,"HIL_PATH")) - { - strcpy (hil_file_base_name,dev); - return FALSE; /* Fake out configure() */ - } - - return parse_1_parm(use, use_as); - } - - /* Parse lines with 3 parameters, such as: - * first keyboard keyboard - * Params are a position, a device type, and its intended use. - * Input: - * pos : first param - * x_name : second param - * use : third param - * ipos : - * itype : dev_type - * use_as : Pointer to int, filled in with what third parm is. - * Returns: - */ -static int parse_three_parms(pos, x_name, use, ipos, itype, use_as) - char *pos, *x_name, *use; - int *ipos, *itype, *use_as; -{ - int i; - - uppercase(pos); - uppercase(use); - - for (i=0; i<NITEMS(h_position); i++) - if (0 == strcmp(h_position[i], pos)) - { - *ipos = i + 1; /* h_position[0] = "FIRST" == 1 */ - break; - } - - if (i >= 7) /* failed, skip this entry */ - { - fprintf(stderr, - "Bad ordinal \"%s\" in X*devices file, entry skipped.\n", - pos); - return FALSE; - } - - uppercase(x_name); - - for (i=0; i<NITEMS(devices); i++) - if (0 == strcmp(devices[i].X_name,x_name)) - { - *itype = devices[i].dev_type; - break; - } - - if (i == NITEMS(devices)) /* failed, skip this entry */ - { - fprintf(stderr, - "Bad device type \"%s\" in X*devices file, entry skipped.\n", - x_name); - return FALSE; - } - - return parse_1_parm(use, use_as); -} - - /* - * Formats: - * |#comment - * | #comment - * |word [#comment] - * | word [#comment] - * |word word [#comment] - * |word word word [#comment] - * |word word word word [#comment] - */ -static int process_path(path, itype, ipos, parm1, use_as) - char *path, *parm1; - int *ipos, *itype, *use_as; -{ - int parms; - char parm2[256], parm3[256]; - - parm1[0] = parm2[0] = parm3[0] = '\0'; - - parms = sscanf(path, "%s%s%s", parm1, parm2, parm3); - - if (*parm1 == '#') return FALSE; /* comment line */ - else if (*parm2 == '#') parms = 1; /* error */ - else if (*parm3 == '#') parms = 2; - - if (2 == parms) /* device name specified */ - return parse_2_parms (parm1, parm2, use_as); - if (3 == parms) - return parse_three_parms (parm1, parm2, parm3, ipos, itype, use_as); - - fprintf(stderr, - "Bad line in X*devices file, entry skipped:\n %s", path); - - return FALSE; -} - -#define MAX_X0devices 20 -typedef struct -{ - int live, dev_type, position, use_as, a_path; - char path[256]; -} X0Device; - -static void set_X0device(ptr, type, position, use_as, path) - X0Device *ptr; char *path; -{ - ptr->live = TRUE; - ptr->dev_type = type; - ptr->position = position; - ptr->use_as |= use_as; - if (use_as == XKBD_USE || use_as == XPTR_USE) - ptr->use_as |= EXPLICIT; - if (type == -1) /* 2 params, ie got a path */ - { - ptr->a_path = TRUE; - strcpy(ptr->path, path); - } -} - -static void pick_default_device(live, type, use_as, x, in_use) -{ - - if (live) return; /* device specified, no need to pick a default */ - /* return last device of type */ - find_device_by_type(type, 100, use_as, x, in_use); - /* else no default */ -} - -static HIL_Device *do_path(path, use_as) char *path; -{ /* "/dev/hil3 keyboard" or "/tmp/keys keyboard" */ - int nth, len; - - len = strlen(hil_file_base_name); - - /* if "/dev/hilx", use existing loop stuff */ - nth = path[len] - '0'; /* '1' => 0x1 */ - if ( - (len + 1) == strlen(path) && - (0 == strncmp(path, hil_file_base_name, len)) && - (1 <= nth && nth <= 7)) - { - return use_device_n(nth, use_as); - } - /* "/tmp/keys" or "/dev/HIL" or "/dev/hil8" */ - return add_device(path, FALSE, use_as); -} - -#define RECYCLE_CMD "X*devices:Recycle" - -static int process_X0devices(d) HPInputDeviceHeader *d; -{ - FILE *fptr; - char *path; - int n, use_as; - X0Device X0devices[MAX_X0devices], *ptr; - - path = d->path + sizeof(RECYCLE_CMD); - memset(X0devices, 0, sizeof(X0devices)); - memset(loop_device_list, 0, sizeof(loop_device_list)); - - if (fptr = fopen(path, "r")) - { - char buf[256], word[256], *keyword; - int num_X0devices = 2, ignoring, itype, ipos; - - buf[0] = '\0'; - ignoring = FALSE; keyword = "BEGIN_DEVICE_DESCRIPTION"; - - while (fgets(buf, 250, fptr)) - { - if (*buf == '#' || *buf == '\n') continue; /* quick speed ups */ - - if (1 == sscanf(buf, "%s", word)) - { - uppercase(word); - if (0 == strcmp(keyword, word)) - { - keyword = ignoring ? - "BEGIN_DEVICE_DESCRIPTION" : "END_DEVICE_DESCRIPTION"; - ignoring = !ignoring; - continue; - } - } - - itype = -1; - if (ignoring || !process_path(buf, &itype, &ipos, word, &use_as)) - continue; - - switch(use_as) - { - case XKBD_USE: n = XKEYBOARD; break; - case XPTR_USE: n = XPOINTER; break; - case XOTH_USE: - if (MAX_X0devices == num_X0devices) - { - fprintf(stderr, "Too many \"other\" devices in X*devices\n"); - continue; - } - n = num_X0devices++; - break; - } - set_X0device(&X0devices[n], itype, ipos, use_as, word); - } - - fclose(fptr); - } - - catalog_loop(); - - for (n = MAX_X0devices, ptr = X0devices; n--; ptr++) - { - if (!ptr->live) continue; - if (ptr->a_path) do_path(ptr->path, ptr->use_as); - else - { - if (ptr->dev_type == NULL_DEVICE) - { - HIL_Device *device; - - if (find_null_device(ptr->use_as) == NULL) - if (device = add_device("/dev/null", TRUE, ptr->use_as)) - device->device = &devices[0]; - } - else - find_device_by_type(ptr->dev_type, ptr->position, ptr->use_as, FALSE, TRUE); - } - } - - pick_default_device(X0devices[XKEYBOARD].live, KEYBOARD, XKBD_USE, FALSE, FALSE); - if (!find_device_by_use(XKBD_USE)) /* still no keyboard */ - pick_default_device(FALSE, KEYBOARD, XKBD_USE, TRUE, FALSE); - if (!find_device_by_use(XKBD_USE)) /* still no keyboard */ - pick_default_device(X0devices[XKEYBOARD].live, KEYBOARD, XKBD_USE, FALSE, TRUE); - if (!find_device_by_use(XKBD_USE)) /* still no keyboard */ - pick_default_device(FALSE, KEYBOARD, XKBD_USE, TRUE, TRUE); - - pick_default_device(X0devices[XPOINTER].live, MOUSE, XPTR_USE, FALSE, FALSE); - if (!find_device_by_use(XPTR_USE)) /* still no pointer */ - pick_default_device(FALSE, MOUSE, XPTR_USE, TRUE, FALSE); - if (!find_device_by_use(XPTR_USE)) /* still no pointer */ - pick_default_device(X0devices[XPOINTER].live, MOUSE, XPTR_USE, FALSE, TRUE); - if (!find_device_by_use(XPTR_USE)) /* still no pointer */ - pick_default_device(FALSE, MOUSE, XPTR_USE, TRUE, TRUE); - if (!find_device_by_use(XPTR_USE)) /* still no pointer */ - { /* use X keyboard (if it exists) */ - HIL_Device *device; - if ((device = find_device_by_use(XKBD_USE)) && - device->device->dev_type != NULL_DEVICE) - device->use_as |= XPTR_USE; - } - - name_loop(); - - if (X0devices[XPOINTER].position == 1 && /* position is "FIRST" */ - X0devices[XPOINTER].dev_type == KEYBOARD) /* type is KEYBOARD */ - d->reserved[3] = 1; - - return TRUE; -} - -/* ******************************************************************** */ -/* ************************ X Server Interface ************************ */ -/* ******************************************************************** */ - -#define PARSE_KEYWORD "X*devices:" - - /* - * Notes: - * The "path" is passed in unchanged from X0devices. I overload this: - * <device_name> - * <device_name>:<keymap_name> - * you_pick - * you_pick:<keymap_name> - */ -static int configure(d) HPInputDeviceHeader *d; -{ - HIL_Device *ptr; - - if (0 == strncmp(d->path, RECYCLE_CMD, sizeof(RECYCLE_CMD) - 1)) - { - open_beeper(); - process_X0devices(d); - next_device(TRUE); - - return INIT_SUCCESS; - } - else if (0 == strcmp(d->path, PARSE_KEYWORD)) - { - while ((ptr = next_device(FALSE)) && !ptr->device_exists) ; - if (!ptr) return INIT_FAILURE; - strcpy(d->path,ptr->file_name); - } - else - { - char *path, dev_path[255]; - int i, fd, ipos, itype, use_as; - - catalog_loop(); - - ptr = do_path(d->path, XEXT_USE); - - if (!ptr) return INIT_FAILURE; - - ptr->use_as &= ~EXPLICIT; - - name_loop(); - -#ifdef VERBOSE -printf("Configure: %d \"%s\" %s %d %s\n", - ptr->fd, path, ptr->keymap, d->button_chording, ptr->long_name); /* */ -#endif /* VERBOSE */ - } - - d->min_kcode = (ptr->hil_id == QUAD_ID ? NINE_KNOB_ID : ptr->hil_id); - d->max_kcode = ptr->iob; - ptr->latching_enabled = d->reserved[0]; - d->reserved[0] = HP_HIL; - d->reserved[1] = ptr->device->dev_type; - if (ptr->use_as & XKBD_USE || ptr->use_as & XPTR_USE) - ptr->use_as &= (XKBD_USE | XPTR_USE | EXPLICIT); - d->reserved[2] = ptr->use_as; - d->x_name = ptr->long_name; - d->file_ds = ptr->fd; - switch (ptr->device->x_type) - { - case KEYBOARD: - if (ptr->iob & HILIOB_NPA) - d->reserved[0] |= PC101_KBD; - else - d->reserved[0] |= HP_ITF_KBD; - set_autorepeat(ptr->fd, AutoRepeatModeOn); - - d->keymap_name = ptr->keymap; - d->flags = DATA_IS_8_BITS; - d->num_keys = 1; - - d->num_ledf = 1; /* number of led feedbacks */ - d->ledf = &ptr->num_leds; /* number of leds */ - - d->reset = 0xf; /* Reset keycode on HIL keyboards*/ - d->reset_mods = (ShiftMask | ControlMask); /* Shift Control */ - - break; - case MOUSE: - d->keymap_name = ptr->keymap; - d->flags = ptr->data_size; - if (ptr->flags & HIL_ABSOLUTE) - d->flags |= (ABSOLUTE_DATA | REPORTS_PROXIMITY); - d->num_keys = 0; - d->ax_num = ptr->num_axes; - - ptr->error = 0; - ptr->chorded_button_up = 0; - - { - int buttons = ptr->num_buttons; - - if (1 < buttons && buttons <= MAX_BUTTONS_FOR_CHORDING)/* we can chord*/ - { - if (buttons==2 && d->button_chording==0) - d->button_chording=100; - ptr->chording_interval = d->button_chording; - if (d->button_chording) buttons = (2 * buttons - 1); - } - if (MAX_X_BUTTONS < buttons) buttons = MAX_X_BUTTONS; - d->num_buttons = buttons; - } - - d->num_keys = 0; /* no keys */ - d->resolution = ptr->res_x / 100; /* resolution in counts/cm */ - d->max_x = ptr->max_x; /* maximum x value in counts */ - d->max_y = ptr->max_y; /* maximum y value in counts */ - - break; - case XOTHER: /* !!!??? the NULL device */ - d->ax_num = 2; - d->max_x = d->max_y = 1000; -/* d->res_x = d->res_y = 1000; /* */ - d->resolution = 10; - d->num_keys = 1; - d->num_buttons = 3; - d->min_kcode = 0xd5; - d->keymap_name = "ITF_US_English"; - break; - default: return INIT_FAILURE; - } - - return INIT_SUCCESS; -} - -/************************************************************************** - * - * This routine is called by the X server to read from the device driver. - * - */ - -static int read_device(fd, data, data_type, pending) - int fd, *pending; - unsigned char *data, *data_type; -{ - HIL_Device *device; - - device = find_device_by_fd(fd); - -/*fprintf(stderr,"read_device(%d)\n", fd); /* */ - - if (device) - return device->device->read_device(device, data, data_type, pending); - - *pending = 0; - return READ_FAILURE; -} - -/************************************************************************** - * - * This routine is called by the X server to write to the device driver. - * - */ - -static int write_to_device(fd, request, data) - int fd, request; - char *data; -{ - HIL_Device *device; - - device = find_device_by_fd(fd); - -/*fprintf(stderr,"write_device(%d)\n", fd); /* */ - - if (device) return device->device->write_device(device, request, data); - - return WRITE_FAILURE; -} - -/************************************************************************** - * - * This routine is called by the X server to initialize the device driver. - * - */ - -int hil_driver_Init(serialproc) SerialProcs *serialproc; -{ - serialproc->configure = configure; - serialproc->read = read_device; - serialproc->write = write_to_device; - serialproc->close = close_device; - - return INIT_SUCCESS; -} - -#ifdef TEST - -/* ******************************************************************** */ -/* ***************************** TESTing ****************************** */ -/* ******************************************************************** */ - -void read_dump(device) HIL_Device *device; -{ - unsigned char data[20], data_type = 0; - int pending; - - if (!device) return; - - while (READ_SUCCESS == read_device(device->fd, &data, &data_type, &pending)) - { - int i; - -if (pending == 0) continue; - printf("%d %d ", device->fd, pending); - if (data_type & MOTION_DATA) printf("Motion "); - if (data_type & PROXIMITY_DATA) printf("Proximity "); - if (data_type & BUTTON_DATA) printf("Button "); - if (data_type & KEY_DATA) printf("Key "); - printf(": "); - switch (device->data_size) - { - case DATA_IS_8_BITS: - for (i = 0; i < pending; i++) printf("%x ", data[i]); - break; - case DATA_IS_16_BITS: - for (i = 0; i < pending; i += 2) - printf("%x ", get_data(data + i, TRUE)); - break; - default: - printf("read_dump(): Unknown data size: %d", device->data_size); - break; - } - printf("\n"); - data_type = 0; - } -} - -main() -{ - HPInputDeviceHeader d; - HIL_Device *keyboard = NULL, *mouse = NULL; - int s; - -#if 1 - strcpy(d.path,"X*devices:Recycle:/etc/X11/X0devices"); - configure(&d); - strcpy(d.path,"X*devices:"); - while(INIT_SUCCESS == configure(&d)) - { - if (d.file_ds != -1) - { - HIL_Device *ptr; - - ptr = find_device_by_fd(d.file_ds); - switch (ptr->device->x_type) - { - case KEYBOARD: keyboard = ptr; break; - case MOUSE: mouse = ptr; break; - } - } - strcpy(d.path,"X*devices:"); - } -#else - strcpy(d.path,"second keyboard keyboard"); /* */ -/* strcpy(d.path,"third keyboard keyboard"); /* */ -/* strcpy(d.path,"last keyboard keyboard"); /* */ -/* strcpy(d.path,"/dev/hil4 keyboard"); /* */ - s = configure(&d); - if (s == INIT_SUCCESS) keyboard = find_device_by_fd(d.file_ds); - else fprintf(stderr,"Couldn't find a keyboard\n"); - - strcpy(d.path,"first mouse pointer"); - d.button_chording = 100; - s = configure(&d); - if (s == INIT_SUCCESS) mouse = find_device_by_fd(d.file_ds); - else fprintf(stderr,"Couldn't find a mouse\n"); -#endif - - while (1) - { - read_dump(keyboard); - read_dump(mouse); - } -} - -#endif /* TEST */ -#ifdef DEBUG -#include <signal.h> -#include <stdio.h> -#include <fcntl.h> -#include <errno.h> -#include <sys/termio.h> -#include <sys/ptyio.h> -#include <sys/hilioctl.h> -#include "HilCmds.h" -#include "HilData.h" - -#define max( a, b ) (( a > b ) ? a : b ) -#define min( a, b ) (( a > b ) ? b : a ) - -int BaseFiledescriptor = 99; -int MaxOpen; -int SelectMask; -void SignalHandler(); -void CloseAllHilDevices(); -void HandshakeDevice(); -#define HOSTBUFFERSIZE 1024 -char Hostname[ HOSTBUFFERSIZE ]; -#define PTY_DIR "/tmp/" -#define NUM_DEVS 9 - -/* - * the following strings are returned by the HIL driver - * describing the associated HIL device in reponse to - * an HILID ioctl - */ -unsigned char three_axes[11] = - { 0x75,0x13,0x61,0x0F,0x03, 0, 0, 0, 0, 0, 0 }; -unsigned char no_axes[11] = - { 0x74,0x00, 0x0b, 0, 0, 0, 0, 0, 0, 0, 0 }; -unsigned char error_device[11] = - { 0x73,0x00, 0x0f, 0, 0, 0, 0, 0, 0, 0, 0 }; -unsigned char no_iob_rel[11] = - { 0x71,0x01, 0x90, 0x01, 0, 0, 0, 0, 0, 0, 0 }; -unsigned char one_axis[11] = - { 0x70,0x41, 0x90, 0x01, 0x03, 0x04, 0x03, 0, 0, 0, 0 }; -unsigned char pc_keyboard[11] = - { 0xde,0x10, 0x30, 0, 0, 0, 0, 0, 0, 0, 0 }; -unsigned char us_keyboard[11] = - { 0xdf, 0,0xc2, 0, 0, 0, 0, 0, 0, 0, 0 }; -unsigned char asize_tablet[11] = - { 0x93,0x72,0x90,0x01,0x80,0x2e,0xd4,0x21,0x0c, 0, 0 }; -unsigned char bsize_tablet[11] = - { 0x94,0x72,0x90,0x01,0x90,0x43,0xd4,0x2e,0x0b, 0, 0 }; -unsigned char three_button_mouse[11] = - { 0x72,0x12,0xC2,0x1E,0x03,0x43, 0, 0, 0, 0, 0 }; -unsigned char two_button_mouse[11] = - { 0x68,0x12,0xC2,0x1E,0x02,0x43, 0, 0, 0, 0, 0 }; -unsigned char buttonbox[11]= - { 0x30,0x10,0x80,0x1E,0x00, 0, 0, 0, 0, 0, 0 }; -unsigned char id_module[11]= - { 0x34,0x10,0x00,0x00,0x00, 0, 0, 0, 0, 0, 0 }; -unsigned char nineknobbox[11] = - { 0x61,0x13,0x61,0x0F,0x00, 0, 0, 0, 0, 0, 0 }; -unsigned char oneknobbox[11] = - { 0x60,0x11,0x61,0x0F,0x00, 0, 0, 0, 0, 0, 0 }; -unsigned char barcode[11] = - { 0x5c,0,0x80, 0, 0, 0, 0, 0, 0, 0, 0 }; -unsigned char quadrature[11] = - { 0x61,0x12,0x61,0x0f,0x03,0x43, 0, 0, 0, 0, 0 }; -unsigned char touchscreen[11] = - { 0x8c,0x52,0x0a,0x01,0x38,0,0x2a,0,0x08, 0, 0 }; -unsigned char bogus[11]= - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - -struct HilDeviceInfo { - int id; - char * name; - unsigned char * pHilIdString; - unsigned char num_keys; - unsigned char min_kcode; - unsigned char max_kcode; -}; -struct HilDeviceInfo DeviceTable[] = { - { X_BUTTONBOX, "BUTTONBOX", buttonbox, 32,8,39 }, - { X_ID_MODULE, "ID_MODULE", id_module, 0,0,0 }, - { X_BARCODE, "BARCODE", barcode, 109,8,135 }, - { X_NO_AXES, "NO_AXES", no_axes, 0,0,0 }, - { X_THREE_AXES, "THREE_AXES", three_axes, 0,0,0 }, - { X_ONE_AXIS, "ONE_AXIS", one_axis, 0,0,0 }, - { X_NO_IOB_REL, "NO_IOB_REL", no_iob_rel, 0,0,0 }, - { X_ERROR_DEVICE,"ERROR_DEVICE", error_device, 0,0,0 }, - { X_ONE_KNOB, "ONE_KNOB", oneknobbox, 0,0,0 }, - { X_NINE_KNOB, "NINE_KNOB", nineknobbox, 0,0,0 }, - { X_QUADRATURE, "QUADRATURE", quadrature, 0,0,0 }, - { X_MOUSE_2B, "MOUSE", two_button_mouse, 0,0,0 }, - { X_MOUSE_3B, "MOUSE", three_button_mouse, 0,0,0 }, - { X_TOUCHSCREEN, "TOUCHSCREEN", touchscreen, 0,0,0 }, - { X_TABLET_ASIZE,"TABLET_ASIZE", asize_tablet, 0,0,0 }, - { X_TABLET_BSIZE,"TABLET_BSIZE", bsize_tablet, 0,0,0 }, - { X_KB_US, "KEYBOARD", us_keyboard,109,8,135 }, - { X_KB_PC, "KEYBOARD", pc_keyboard,109,8,135 }, - { 0x00, "NULL", bogus, 0,0,0 } -}; - -struct HilLoopInfo { -#define MAXNAMLEN 1024 - char PtyName[MAXNAMLEN]; /* device name to link the pty to */ - char SlaveName[MAXNAMLEN]; /* pty slave name */ - int Pty; /* fd of master side of device pty */ - int PtyMask; /* select mask for same */ - int PtyCount; /* number of bytes written to pty */ - struct HilDeviceInfo *pHilDeviceInfo; - struct HilCommandLog *pNext; - struct HilCommandLog *pLast; -} hil[NUM_DEVS]; - -struct HilCommandLog { - int Command; - struct HilCommandLog *pNext; -}; - -unsigned char tcget_info[17] = - { 0,0,0,0,0x09,0x67,0,0,0,0x7f,0x1c,0x23,0x40,0x04,0,0,0 }; - -/*********************************************************** - * - * Main entry point. This program will fork into two processes. - * The first is a test program that will invoke the entry points - * provided by this input device driver. The second is a daemon - * that will handle ioctls from the driver. - * - * Functionality to be tested: - * - * driver initialization entry point - * - * - touch test - * - * configuration entry point - * - * - default configuration with no X*devices specification - * - only a non-keyboard key device - * - only a keyboard - * - keyboard and mouse - * - non-keyboard key device and mouse - * - keyboard and non-mouse pointer - * - multiple keyboards and mouse - * - multiple key devices and mouse - * - keyboard and multiple pointing devices - * - multiple key devices and multiple pointing devices - * - maximum number of input devices - * - configuration with an X0devices file - * - non-default keyboard device - * - non-default pointer device - * - null keyboard and null pointer - * - null keyboard and mouse - * - keyboard and null mouse - * - specify "other" devices - * - specify non-default ordinal - * - specify invalid ordinal - * - specify invalid device - * - specify invalid use - * - specify too many input devices - * - specify too many input parameters - * - specify not enough input parameters - * - * read entry point - * - * - read keyboard data - * - read buttonbox data - * - read barcode data - * - read mouse motion/button data - * - read tablet motion/button data - * - read nine-knob motion data - * - button chording - * - * write entry point - * - * - turn on LEDS - * - turn autorepeat on/off - * - turn keyclick on/off - * - sound the bell - * - * close entry point - * - * - touch test - * - ***********************************************************/ -main(argc,argv) - char *argv[]; - int argc; - { - int i, pid; - - for (i=0; i<NUM_TEST_CASES; i++) - { - if ((pid = fork()) == 0) /* This is the child process */ -#if 0 - if (argc > 1) -#endif - { - do_child_process(i); - exit(0); - } - else - { - usleep(50000, 0, NULL); - do_parent_process(i); - waitpid (pid, NULL, 0); - } - } - } - -/*********************************************************** - * do_child_process - * - * This is the process that handles ioctls from the driver. - * It sets up an array of input devices that will be listed - * by the driver. How they are used will be determined by - * the information in the X*devices file. - * - */ - -do_child_process(i) - int i; - { - - signal( SIGINT, SignalHandler ); - signal( SIGHUP, SignalHandler ); - signal( SIGTERM, SignalHandler ); - gethostname( Hostname, HOSTBUFFERSIZE ); - - SetupHILDevices (tc[i].devs); - - /* - * loop, servicing the ptys when they so indicate via the select mask. - */ - - for ( ;; ) - { - int j, ret; - int ExceptionMask = SelectMask; - - ret = select( MaxOpen + 1, NULL, NULL, &ExceptionMask, 0 ); - - /* - * if the pty's emulating the HIL devices need - * to be serviced, then handshake them. - */ - if ( ExceptionMask ) - { - for ( j = 0; j < 32; j++ ) - { - if ( ExceptionMask & 1 ) - HandshakeDevice( j - BaseFiledescriptor ); - ExceptionMask >>= 1; - } - } - } - } - -/*********************************************************** - * do_parent_process - * - * This is the parent process. It performs the following functions: - * - Set up the X0devices file to read from the daemon ptys - * - Invoke the driver initialiation and device initialization routines. - * - Invoke the read routines to read data from the test input devices. - */ - -struct mydata - { - int valid; - int type; - } ; - -#define TPSENDD _IOW('Z', 1, struct mydata) -#define TPSTOPIT _IO('Z', 2) - -do_parent_process(i) - int i; - { - int status, fd, count; - char buffer[128]; - SerialProcs s; - HPInputDeviceHeader d[10], *dptr = d; - HIL_Device *lptr; - HPKeyboardFeedbackControl kctl; - char TruncHost[1024]; - - gethostname( Hostname, HOSTBUFFERSIZE ); - strcpy (TruncHost, Hostname); - strtok (TruncHost, "."); - - for (count=0; count<9; count++) - { - d[count].path[0]='\0'; - d[count].button_chording = 100; - } - fd = creat("./X0devices.test", 0777); - sprintf (buffer,"/tmp/%s:hil hil_path\n",TruncHost); - write (fd, buffer,strlen(buffer)); - if (strlen(tc[i].devices_file)) - write (fd, tc[i].devices_file, strlen(tc[i].devices_file)); - else - { - sprintf (buffer,"/tmp/%s:hil7 other\n",TruncHost); - write (fd, buffer,strlen(buffer)); - } - close(fd); - - if ((status = hil_driver_Init(&s)) != INIT_SUCCESS) - { - printf("Driver initialization failure: %x\n",status); - CloseAllHilDevices(); - exit(1); - } - - strcpy(d[0].path,"X*devices:Recycle:./X0devices.foobar"); - status = (*(s.configure)) (d); - for (lptr=loop_device_list,count=0; count<10; count++,lptr++) - if (lptr->fd > 0) - (*(s.close)) (lptr->fd); - fd = creat("./X0devices.empty", 0777); - close(fd); - strcpy(d[0].path,"X*devices:Recycle:./X0devices.empty"); - status = (*(s.configure)) (d); - for (lptr=loop_device_list,count=0; count<10; count++,lptr++) - if (lptr->fd > 0) - (*(s.close)) (lptr->fd); - test_configure_entry_point(&s, d, i); - for (dptr=d,i=0; i<10; i++,dptr++) - { - unsigned char device_type = dptr->min_kcode; - if (dptr->file_ds > 0 || *dptr->path=='\0') - continue; - if (device_type == X_NINE_KNOB) - dptr->button_chording = 0; - if ((status = (*(s.configure)) (dptr)) != INIT_SUCCESS) - { - printf("Device '%s' initialization failure status: %x\n", - dptr->path, status); - CloseAllHilDevices(); - exit(1); - } - } - for (dptr=d,i=0; i<10; i++,dptr++) - { - if (dptr->file_ds <= 0 || *dptr->path=='\0') - continue; - if (strcmp(dptr->x_name, "FIRST_NULL")!=0) - test_read_entry_point(&s, dptr); - if (i==0) - {fd = beeper_fd; beeper_fd=-1;} - test_write_entry_point(&s, dptr); - if (i==0) - beeper_fd = fd; - if (strcmp(dptr->x_name, "FIRST_NULL")!=0) - test_read_entry_point(&s, dptr); - } - for (dptr=d,i=0; i<10; i++,dptr++) - if (dptr->file_ds > 0) - ioctl(dptr->file_ds, TPSTOPIT, buffer); /* terminate child */ - for (dptr=d,i=0; i<10; i++,dptr++) - { - if (dptr->file_ds <= 0) - continue; - if ((status = (*(s.close)) (dptr->file_ds)) != CLOSE_SUCCESS) - { - printf("Device '%s' close failure status: %x\n",dptr->path, status); - CloseAllHilDevices(); - exit(1); - } - } - close_beeper(); - close_beeper(); - } - -/*********************************************************** - * test_configure_entry_point - * - * Test the configure() entry point of the HIL device driver. - */ - -test_configure_entry_point(s, dptr, i) - SerialProcs *s; - HPInputDeviceHeader *dptr; - { - int fail, status; - ExpectedData *expected = tc[i].expect; - - strcpy(dptr->path,"X*devices:Recycle:./X0devices.test"); - if ((status = (*(s->configure)) (dptr)) != INIT_SUCCESS) - { - printf("Device '%s' initialization failure status: %x\n", - dptr->path, status); - CloseAllHilDevices(); - exit(1); - } - strcpy(dptr->path,"X*devices:"); - fail=0; - while ((status = (*(s->configure)) (dptr)) == INIT_SUCCESS) - { - if (strcmp (dptr->x_name, expected->name)!=0 || - dptr->file_ds != expected->fd || - dptr->reserved[2] != expected->use) - { - printf ("expected data did not match\n"); - printf ("a=%s e=%s a=%d e=%d a=%d e=%d\n", - dptr->x_name, expected->name, - dptr->file_ds, expected->fd, dptr->reserved[2], expected->use); -#ifdef VERBOSE - printf("Found: %s, fd: %d, use as: %d, path: %s\n", - dptr->x_name, dptr->file_ds, dptr->reserved[2], dptr->path); -#endif /* VERBOSE */ - fail++; - } -#ifdef VERBOSE - else - printf("Found: %s, fd: %d, use as: %d, path: %s\n", - dptr->x_name, dptr->file_ds, dptr->reserved[2], dptr->path); -#endif /* VERBOSE */ - expected++; - dptr++; - strcpy(dptr->path,"X*devices:"); - } - *dptr->path = '\0'; - if (fail==0) - { - printf("Test case %d succeeded:\n%s\n",i,tc[i].message); - } - else - printf("Test case %d failed: \n%s\n",i,tc[i].message); - } - -/*********************************************************** - * find_valid_data - * - * Validate the data returned by the read routine. - */ - -struct valid *find_valid_data(device_type) - { - struct valid *v = NULL; - - for (v=all_valid; (v->id != 0 && v->id != device_type); v++) - ; - return v; - } - -/*********************************************************** - * test_read_entry_point - * - * Test the read() entry point of the HIL device driver. - */ - -test_read_entry_point(s, d) - SerialProcs *s; - HPInputDeviceHeader *d; - { - int i, size, ndx, ret, status, nbytes=0, count=0, mask; - unsigned char buf[128]; - unsigned char data_type=0, device_type = d->min_kcode; - struct valid *v = find_valid_data(device_type); - - generate_test_data (d->file_ds, FALSE, device_type); - status = (*(s->read)) (d->file_ds, buf, &data_type, &nbytes); - if (status != READ_FAILURE) - if (device_type == X_KB_US || device_type == X_BUTTONBOX) - printf("No READ_FAILURE w/bogus data for device %s\n",d->x_name); - else if (nbytes != 0) - printf("No READ_FAILURE w/bogus data for device %s\n",d->x_name); - (*(s->close)) (d->file_ds); - status = (*(s->read)) (d->file_ds, buf, &data_type, &nbytes); - (*(s->configure)) (d); - generate_test_data (d->file_ds, TRUE, device_type); - mask = 1 << d->file_ds; - ndx = 0; - while ((ret = usleep (1000, (d->file_ds + 1), &mask)) > 0) - while ((ret = (*(s->read)) (d->file_ds, buf, &data_type, &nbytes))==READ_SUCCESS) - { - if (nbytes == 0) - continue; - size = v->size ? v->size : v->vdata[ndx++]; - - if (!(data_type & v->dtype) || nbytes != size || - !validate_data (buf, &v->vdata[ndx], nbytes)) - { - printf("Invalid data: type = %x (%x), size = %d (%d) data = ", - data_type, v->dtype, nbytes, size); - for (i=0; i<nbytes; i++) - printf ("%x (%x) ", buf[i], v->vdata[ndx+i]); - printf ("\n"); - } -#ifdef VERBOSE - else - printf("data matched\n"); -#endif /* VERBOSE */ - count++; - ndx += nbytes; - data_type = nbytes = buf[0] = 0; - } - } - -/*********************************************************** - * validate_data - * - * Validate the data returned by the read routine. - */ - -validate_data (actual, expected, size) - unsigned char *actual, *expected; - { - int i; - - for (i=0; i<size; i++) - if (*actual != *expected) - return 0; - return 1; - } - -/*********************************************************** - * generate_test_data - * - * Cause the child process to generate test data. - */ - -generate_test_data (fd, valid, data_type) - char data_type; - { - - struct mydata foo; - - foo.type = data_type; - foo.valid = valid; - - ioctl(fd, TPSENDD, &foo); - usleep(50000, 0, NULL); - } - - -/*********************************************************** - * test_write_entry_point - * - * Test the write() entry point of the HIL device driver. - */ - -test_write_entry_point(s, dptr) - SerialProcs *s; - HPInputDeviceHeader *dptr; - { - int status; - HPKeyboardFeedbackControl kctl; - HPPointerFeedbackControl pctl; - HPBell bctl; - HPValuatorControl vctl; - HPResolutionControl rctl; - - /* Test XChangeFeedbackControl */ - - kctl.class = 0xff; - kctl.bell_percent = 100; - kctl.bell_pitch = 0; - kctl.bell_duration = 400; - kctl.leds = -1; - kctl.autoRepeat = AutoRepeatModeOff; - status = (*(s->write)) (dptr->file_ds, _XChangeFeedbackControl, &kctl); - kctl.class = KbdFeedbackClass; - - kctl.class = KbdFeedbackClass; - kctl.click = 100; - status = (*(s->write)) (dptr->file_ds, _XChangeFeedbackControl, &kctl); - kctl.bell_pitch = 100; - kctl.autoRepeat = AutoRepeatModeDefault; - kctl.leds = 0; - status = (*(s->write)) (dptr->file_ds, _XChangeFeedbackControl, &kctl); - kctl.autoRepeat = AutoRepeatModeOn; - status = (*(s->write)) (dptr->file_ds, _XChangeFeedbackControl, &kctl); - kctl.autoRepeat = -2; - status = (*(s->write)) (dptr->file_ds, _XChangeFeedbackControl, &kctl); - - /* Test XBell */ - - bctl.class = BellFeedbackClass; - bctl.bell_percent = 100; - status = (*(s->write)) (dptr->file_ds, _XBell, &bctl); - kctl.click = 0; - status = (*(s->write)) (dptr->file_ds, _XBell, &kctl); - - /* Test XSetDeviceValuators */ - - vctl.first_valuator = 0; - vctl.num_valuators = 0; - vctl.valuators = NULL; - status = (*(s->write)) (dptr->file_ds, _XSetDeviceValuators, &vctl); - - /* Test XChangeDeviceControl */ - - rctl.first_valuator = 0; - rctl.num_valuators = 0; - rctl.resolutions = NULL; - status = (*(s->write)) (dptr->file_ds, _XChangeDeviceControl, &rctl); - - /* Test XSetDeviceMode */ - - status = (*(s->write)) (dptr->file_ds, _XSetDeviceMode, Absolute); - status = (*(s->write)) (dptr->file_ds, _XSetDeviceMode, Relative); - (*(s->close)) (dptr->file_ds); - status = (*(s->write)) (dptr->file_ds, _XSetDeviceMode, Relative); - (*(s->configure)) (dptr); - - status = (*(s->write)) (dptr->file_ds, -1, &kctl); - } - -/*********************************************************** - * GetPty - * - * Search through all of the ptys looking for one that - * can be opened on the master side. Return when one - * is successfully opened. - * - * On the master side, ptys have names in the range - * /dev/ptyp0 ... /dev/ptyvf. The last digit varies from - * 0 ... f, and the last alphabetic character varies from - * p ... v. Therefore, there are 16 * 7 = 112 ptys. - * - * The names on the slave side are the same as the master - * side, except that they are /dev/tty rather than /dev/pty. - ***********************************************************/ - -#define NUMPTYS 112 - -int -GetPty(SlaveName) -char * SlaveName; -{ - int NextPty = 0; - char MasterName[50]; - int Fd; - - for (NextPty=0; NextPty<NUMPTYS; NextPty++) - { - sprintf (SlaveName,"/dev/pty/tty%c%x",NextPty/16+'p',NextPty%16); - sprintf (MasterName,"/dev/ptym/pty%c%x",NextPty/16+'p',NextPty%16); - if (( Fd = open(MasterName,O_RDWR | O_NDELAY )) != -1) - { - SelectMask |= 1 << Fd; - MaxOpen = max( MaxOpen, Fd ); - BaseFiledescriptor = min( BaseFiledescriptor, Fd ); - return (Fd); - } - } - printf( "GetPty: cannot open any of the pty's.\n"); - exit( 1 ); -} - - -/*********************************************************** - * SetupDevice - * - * This routine finds an available pty, then links - * the pty symbolically to an X0devices name in /tmp. - * - * The name is created in /tmp, using the hostname and the number - * of the HIL device being emulated. - ***********************************************************/ - -void -SetupDevice( hilnum ) -int hilnum; -{ - int rc; - struct request_info iostuff; - char TruncHost[1024]; - - strcpy (TruncHost, Hostname); - strtok (TruncHost, "."); - sprintf( hil[hilnum].PtyName, "%s%s:hil%d", PTY_DIR, TruncHost, hilnum+1 ); - /* - * Find an available pty - */ - hil[hilnum].Pty = GetPty (hil[hilnum].SlaveName); - - /* Trap ioctls on pty. These are HILID, HILDKR and HILER1 */ - - rc = 1; /* Trap ioctls on pty */ - if ( ioctl( hil[hilnum].Pty, TIOCTRAP, &rc) == -1) - { - perror( "SetupDevice: couldn't TIOCTRP pty"); - exit( 1 ); - } - - rc = 1; /* Disable termio processing */ - if ( ioctl( hil[hilnum].Pty, TIOCTTY, &rc) == -1) - { - perror( "SetupDevice: couldn't TIOCTTY pty"); - exit( 1 ); - } - - /* - * block client signals while the ioctl is being handled - */ - if (ioctl( hil[hilnum].Pty, TIOCSIGMODE, TIOCSIGBLOCK) == -1) - { - perror( "SetupDevice: couldn't TIOCSIGBLOCK pty"); - exit( 1 ); - } - /* - * clean up any old symlinks and link to our pty - */ - unlink( hil[hilnum].PtyName); - if ( symlink (hil[hilnum].SlaveName, hil[hilnum].PtyName )) - { - perror( "SetupDevice: couldn't link pty"); - printf( "SetupDevice: ln %s %s\n", - hil[hilnum].SlaveName, hil[hilnum].PtyName); - exit( 1 ); - } -} - -struct HilDeviceInfo * FindHilInfo(); - -/*********************************************************** - * FindHilInfo - * - * Search the HIL device information table for - * information about the given device type. - * - ***********************************************************/ -struct HilDeviceInfo * -FindHilInfo( Type ) -unsigned char Type; -{ - struct HilDeviceInfo * pInfo = DeviceTable; - - while ( pInfo->id != 0 ) - { - if ( pInfo->id == Type ) - return( pInfo ); - pInfo++; - } - printf( "Hil.c: FindHilInfo: requested type %x not in DeviceTable.\n", Type); - exit( 1 ); -} - -/*********************************************************** - * SetupHILDevices - * - * Loop through the array that defines the - * HIL devices to be emulated. For each device, - * obtain a pty to use to emulate the device. - * Then associate a HIL device information table entry with - * the HIL loop position. - * - ***********************************************************/ - -SetupHILDevices( LoopDefinitionArray ) -unsigned char LoopDefinitionArray[]; -{ - int i; - int Type; - for ( i = 0; i < NUM_DEVS; i++ ) - { - Type = LoopDefinitionArray[i]; - if ( Type == 0 ) - break; - SetupDevice( i ); - hil[i].pHilDeviceInfo = FindHilInfo( Type ); - } -} - -/*********************************************************** - * LogHilCommand - * - * Log the command for the particular device. - * This log can later be scanned to see if a particular - * command was sent by the server. - * - * The log is kept in a singly linked list. The - * initial pointer to the list is indexed by the hil number, - * so as to keep the logs for the devices distinct. - * - ***********************************************************/ - -LogHilCommand( hilnum, Command ) -int hilnum; -int Command; -{ - if ( hil[ hilnum ].pLast == NULL ) - { - hil[ hilnum ].pLast = ( struct HilCommandLog * ) - malloc( sizeof( struct HilCommandLog )); - hil[ hilnum ].pLast->pNext = 0; - hil[ hilnum ].pLast->Command = Command; - - hil[ hilnum ].pNext = hil[ hilnum ].pLast; - } - else - { - struct HilCommandLog * pTemp; - - pTemp = hil[ hilnum ].pLast; - hil[ hilnum ].pLast = ( struct HilCommandLog * ) - malloc( sizeof( struct HilCommandLog )); - hil[ hilnum ].pLast->Command = Command; - hil[ hilnum ].pLast->pNext = 0; - pTemp->pNext = hil[ hilnum ].pLast; - } -} - -/************************************************************* - * PrintHilCommand - * - * This function prints the mnemonic for an HIL command - * or the several standard PTY commands. - * - *************************************************************/ - -void -PrintHilCommand( hilnum, cmd ) -int hilnum; -int cmd; -{ - struct _hilCommands *hp; - - for ( hp = hilArray; hp->HilCommand; hp++ ) - { - if ( hp->HilCommand == cmd ) - { - printf("hil: %d command: 0x%4X %s\n", - hilnum, cmd, hp->HilCommandName ); - break; - } - } - if ( hp->HilCommand == 0 ) - printf("hil: %d command: 0x%4X %s\n", hilnum, cmd, "UNKNOWN" ); - -} - -/*********************************************************** - * HandShakeDevice - * - * Handle an ioctl request from the driver. - * Use ioctl to send back the correct data. - * - ***********************************************************/ - -struct mydata foo; - -void -HandshakeDevice( hilnum ) -int hilnum; -{ - struct request_info iostuff; - unsigned char * pIdInfo; - /* - * find out what the HIL request is - */ - ioctl (hil[hilnum].Pty, TIOCREQGET, &iostuff); - - /*PrintHilCommand( hilnum, iostuff.request ); */ - LogHilCommand( hilnum, iostuff.request ); - - switch( iostuff.request ) - { - case HILID: - - if (iostuff.argset == 0 ) - { - printf( "HandshakeDevice: argset is zero on HILID.\n"); - exit( 1 ); - } - - if (hil[hilnum].pHilDeviceInfo->id == X_ERROR_DEVICE) - iostuff.return_value = -1; - pIdInfo = hil[ hilnum ].pHilDeviceInfo->pHilIdString; - ioctl (hil[hilnum].Pty, iostuff.argset, pIdInfo ); - - - break; - case TCGETA: - - if (iostuff.argset == 0 ) - { - printf( "HandshakeDevice: argset is zero on TCGETA.\n"); - exit( 1 ); - } - - ioctl (hil[hilnum].Pty, iostuff.argset, tcget_info ); - break; - case TIOCOPEN: - case TIOCCLOSE: - case HILER1: - case HILER2: - case HILDKR: - case HILP: - case HILP1: - case HILP2: - case HILP3: - case HILP4: - case HILP5: - case HILP6: - case HILP7: - case HILA: - case HILA1: - case HILA2: - case HILA3: - case HILA4: - case HILA5: - case HILA6: - case HILA7: - break; - case TPSENDD: - ioctl (hil[hilnum].Pty, iostuff.argget, &foo); - send_test_data (hil[hilnum].Pty, foo.valid, foo.type); - break; - case TPSTOPIT: - CloseAllHilDevices(); - exit(1); - break; - default: - printf( "HandshakeDevice: default command %x.\n",iostuff.request); - } - if (ioctl (hil[hilnum].Pty, TIOCREQSET, &iostuff) < 0 ) - { - perror( "HandshakeDevice: error on TIOCREQSET" ); - printf( "HandshakeDevice: errno %d\n", errno); - exit( 1 ); - } -} - -/*********************************************************** - * CloseAllHilDevices - * - * This routine closes all the opened HIL devices - ***********************************************************/ - -void -CloseAllHilDevices() -{ - int i; - - for ( i = 0; i < NUM_DEVS; i++ ) - if ( hil[ i ].Pty ) - { - close( hil[ i ].Pty ); - hil[ i ].Pty = 0; - unlink( hil[ i ].PtyName); - } -} - -/************************************************************* - * SignalHandler - * - * Handle receipt of a signal. In current use, this generally - * means that this process has been hit by kfork. Kfork - * sends SIGTERM by default. - * - * ACTION: try to shut down the server, if it is connected, - * by sending control-shift-reset. Then close all the pty's, - * unlink them, shutdown and close the sockets, and exit - * gracefully. - *************************************************************/ - -void -SignalHandler() -{ - CloseAllHilDevices(); - exit( 0 ); -} - -/* - * int usleep(unsigned long microseconds, int nfds, int *readmask) - * This is a microsecond "sleep" routine. It uses the select(2) system - * call to delay for the desired number of micro-seconds. - * - * Arguments: - * unsigned long microseconds Number of microseconds to pause. - * - * Return value: - * int 0 on successful completion, -1 otherwise. - * - * Side effects: - * Program pause based upon argument value. - * - * Calls: - * select(2). - */ -int -usleep(microseconds, nfds, readmask) -register unsigned long microseconds; -register int nfds, *readmask; - -{ - register unsigned int seconds, usec; - int writefds, exceptfds; - struct timeval timer; - - writefds = exceptfds = 0; - - /* Convert to values select() understands */ - seconds = microseconds / (unsigned long)1000000; - usec = microseconds % (unsigned long)1000000; - - timer.tv_sec = seconds; - timer.tv_usec = usec; - - return (select(nfds, readmask, &writefds, &exceptfds, &timer)); -} - -send_test_data (pty, valid, type) - unsigned char type; - { - switch (type) - { - case X_KB_US: - if (valid) - write(pty, valid_key_data, sizeof(valid_key_data)); - else - write(pty, bogus_key_data, sizeof(bogus_key_data)); - break; - case X_MOUSE_3B: - if (valid) - write(pty, valid_mouse_data, sizeof(valid_mouse_data)); - else - write(pty, bogus_mouse_data, sizeof(bogus_mouse_data)); - break; - case X_MOUSE_2B: - if (valid) - write(pty, valid_mouse_data2, sizeof(valid_mouse_data2)); - else - write(pty, bogus_mouse_data2, sizeof(bogus_mouse_data2)); - break; - case X_TABLET_ASIZE: - case X_TABLET_BSIZE: - if (valid) - write(pty, valid_tablet_data, sizeof(valid_tablet_data)); - else - write(pty, bogus_tablet_data, sizeof(bogus_tablet_data)); - break; - case X_QUADRATURE: - if (valid) - write(pty, valid_quad_data, sizeof(valid_quad_data)); - else - write(pty, bogus_quad_data, sizeof(bogus_quad_data)); - break; - case X_TOUCHSCREEN: - if (valid) - write(pty, valid_mouse_data, sizeof(valid_mouse_data)); - else - write(pty, bogus_mouse_data, sizeof(bogus_mouse_data)); - break; - case X_BARCODE: - if (valid) - write(pty, valid_barcode_data, sizeof(valid_barcode_data)); - else - write(pty, bogus_barcode_data, sizeof(bogus_barcode_data)); - break; - case X_NINE_KNOB: - if (valid) - write(pty, valid_9knob_data, sizeof(valid_9knob_data)); - else - write(pty, bogus_9knob_data, sizeof(bogus_9knob_data)); - break; - case X_ONE_KNOB: - if (valid) - write(pty, valid_1knob_data, sizeof(valid_1knob_data)); - else - write(pty, bogus_1knob_data, sizeof(bogus_1knob_data)); - break; - case X_ONE_AXIS: - if (valid) - write(pty, valid_one_axes_data, sizeof(valid_one_axes_data)); - else - write(pty, bogus_one_axes_data, sizeof(bogus_one_axes_data)); - break; - case X_NO_AXES: - if (valid) - write(pty, valid_no_axes_data, sizeof(valid_no_axes_data)); - else - write(pty, bogus_no_axes_data, sizeof(bogus_no_axes_data)); - break; - case X_THREE_AXES: - if (valid) - write(pty, valid_three_axes_data, sizeof(valid_three_axes_data)); - else - write(pty, bogus_three_axes_data, sizeof(bogus_three_axes_data)); - break; - } - } -#endif /* DEBUG */ Index: xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c diff -u xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c:3.2 xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c:removed --- xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c:3.2 Wed Jan 17 17:36:48 2001 +++ xc/programs/Xserver/hw/hp/input/drivers/hp7lc2k.c Thu Feb 27 12:29:24 2003 @@ -1,406 +0,0 @@ -/* $Xorg: hp7lc2k.c,v 1.3 2000/08/17 19:48:26 cpqbld Exp $ */ -/************************************************************ - -Copyright (c) 1993 by Hewlett-Packard Company, Palo Alto, California - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Hewlett-Packard not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -HEWLETT-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 <stdio.h> -#include <errno.h> -#include <fcntl.h> -#include "ps2io.h" -#include <X11/X.h> -#include <X11/extensions/XI.h> -#include "x_serialdrv.h" - -/************************************************************************** - * - * hp7lc2k.c - X server input device driver. - * - * This driver provides support for PS2 keyboards attached to an HP9000700LC2 - * via the internal mini-DIN interface. - * - * The HP-UX 9.03 operating system is required by this driver. - * - * If another device is used as the X keyboard, the PS2 keyboard attached to - * the mini-DIN interface can be accessed via the X input device extension - * by adding the following lines to the /usr/lib/X11/X0devices file: - * - * Begin_Device_Description - * Name hp7lc2k.sl # PS2 DIN keyboard via mini-DIN interface - * Use Extension # access via input extension - * Path /dev/ps2kbd # use device special file /dev/ps2kbd - * End_Device_Description - * - * For documentation on using serial input devices with X, please refer - * to the manual "Using the X Window System", Chapter 3 "Preliminary - * Configuration", in the section titled "Using Special Input Devices". - * - * Sample entries for the /usr/lib/X11/X*devices file can be found in - * /etc/newconfig/X0devices. - * - */ - -#define BUFRSIZ 2048 -#define READSIZ 2000 - -static int hp7lc2k_left=READSIZ, hp7lc2k_datacnt=0; -static unsigned char hp7lc2k_buf[BUFRSIZ]; -static unsigned char *hp7lc2k_data_ptr = hp7lc2k_buf; -typedef struct ps2_4 ps2_buffer_t; - -/************************************************************************** - * - * Configure the PS/2 keyboard. Use scancode set 3, Turn indicator LEDs - * off, set all keys to typematic make/break, and set autorepeat to ~30/sec - * and delay to 250 mSec. - */ - -static int -keybd_configure ( - int fd) - { - ps2_buffer_t kbdbuf; - - /* use scancode set 3 */ - - kbdbuf.b[0] = SCANCODE_3; - ioctl (fd, PS2_SCANCODE, &kbdbuf); - - /* turn LEDs off */ - - kbdbuf.b[0] = 0; - ioctl (fd, PS2_INDICATORS, &kbdbuf); - - /* set all keys to typematic and make/break */ - - ioctl (fd, PS2_ALL_TMAT_MKBRK, &kbdbuf); - - /* set the autorepeat rate to the maximum (~30/sec) and the delay to the - minimum (250ms) */ - - kbdbuf.b[0] = 0x00; - ioctl (fd, PS2_RATEDELAY, &kbdbuf); - - } /* end keybd_configure() */ - -/************************************************************************** - * - * This routine is called by the X server to open and configure the device. - * It is passed a pointer to an HPDeviceHeader struct (defined in - * x_serialdrv.h). That struct points to the path name of the device file - * to which the input device is connected. The path is specified in the - * X*devices configuration file described above. - * - * This routine must open the device file and configure the serial port. - * It must initialize fields in the HPInputDeviceHeader struct including - * the device file descriptor, name by which the device will be known to - * X, the number of keys, buttons, and axes on the device, the keymap name - * and file, if the device has keys, and a flags field that specifies the - * size of the data returned by the device. See the serial input device - * specification described above for more details. - * - */ - -static int -hp7lc2kconfigure ( - HPInputDeviceHeader *d) - { - int ret; - ps2_buffer_t kbdbuf; - static unsigned char num_leds=3; - static char hp7lc2k_namebuf[128]; - FILE *fp; - - d->file_ds = open (d->path, O_RDWR | O_NDELAY);/* non-block read */ - if (d->file_ds < 0) - return(INIT_FAILURE); - - keybd_configure (d->file_ds); - - /* get the keyboard nationality, or default to US_English */ - - d->keymap_name = "PS2_DIN_US_English"; /* default keymap name */ - fp = fopen (X_KEYMAP_NAME, "r"); /* defined by x_serialdrv.h */ - if (fp && fscanf (fp, "%s", hp7lc2k_namebuf)) - d->keymap_name = hp7lc2k_namebuf;/* international keymap name */ - fclose(fp); - - d->x_name = "PS2_DIN_KEYBOARD"; /* device name for X server*/ - d->keymap_file = ""; /* keymap file for X server*/ - d->flags = DATA_IS_16_BITS; /* size of data for device */ - d->num_keys = 101; /* tell server we have keys*/ - d->min_kcode = 0; /* server gets from keymap */ - d->max_kcode = 0; /* server gets from keymap */ - d->num_ledf = 1; /* number of led feedbacks */ - d->ledf = &num_leds; /* number of leds */ - d->reset = 107; /* X server reset keycode */ - d->reset_mods = ShiftMask | ControlMask; /* X server reset modifiers*/ - - return (INIT_SUCCESS); - } - -/************************************************************************** - * - * Get more data and crunch the buffer if we're getting near the end. - * - */ - -static int get_more_data( - int fd) - { - int count; - - /* If we don't already have at least 1 byte of data, - * we need to read some. If we're getting near the end - * of the buffer, copy the leftover data to the beginning - * of the buffer. - */ - - if (hp7lc2k_data_ptr - hp7lc2k_buf > hp7lc2k_datacnt) - { - bcopy (hp7lc2k_data_ptr, hp7lc2k_buf, hp7lc2k_datacnt); - hp7lc2k_data_ptr = hp7lc2k_buf; - hp7lc2k_left = READSIZ - hp7lc2k_datacnt; - } - count = read (fd, hp7lc2k_data_ptr + hp7lc2k_datacnt, hp7lc2k_left); - - if (count >0) - { - hp7lc2k_datacnt += count; - hp7lc2k_left -= count; - } - - if (hp7lc2k_datacnt < 1) - return(READ_FAILURE); - - return(READ_SUCCESS); - } - -/************************************************************************** - * - * This entry point is called when the X server detects that there is data - * available to be read from the device. This routine will be called - * repeatedly until it returns READ_FAILURE. It is expected to return - * one "event" for each successful call. An "event" is one key press or - * release, one button press or release, one change in axis data, or one - * change of proximity state. One change in axis data can be reported - * along with a button or proximity change. - * - */ - -static int -hp7lc2kread ( - int fd, unsigned char *data, unsigned char *data_type, int *pending) - { - struct timeval timeout; - unsigned short code, keycode; - int count; - - get_more_data(fd); - if (hp7lc2k_datacnt < 1) - return(READ_FAILURE); - - /* PS2 keyboards return 1-byte scancode for keypresses, and a 1 byte - * constant followed by that same scancode for keyreleases. - * The X server expects key releases to have the value of the - * key press + 1, so we must multiply key codes by 2, and add 1 to the - * key releases. - * - * The minimum key code returned by the kernel is 7, but the minimum - * expected by the keymap is 16. Since the X server will also add 8 to - * the keycode after dividing by 2, to avoid the codes reserved by X for - * mouse buttons, we must add 1 before multiplying. - */ - - if (*hp7lc2k_data_ptr == 0xF0) { /* this is a key release */ - if (hp7lc2k_datacnt == 1){ /* code hasn't arrived */ - timeout.tv_sec = 0; - timeout.tv_usec = 25000; /* wait interval */ - select(0, (int *)NULL, (int *)NULL, (int *)NULL, &timeout); - get_more_data(fd); - if (hp7lc2k_datacnt < 1) - return(READ_FAILURE); - } - code = *(hp7lc2k_data_ptr+1); /* keycode is second byte */ - keycode = (code + 1) * 2 + 1; /* add 1, double it, add 1 */ - hp7lc2k_datacnt-=2; - hp7lc2k_data_ptr+=2; - } - else { - code = *hp7lc2k_data_ptr; - keycode = (code + 1) * 2; /* add 1, double it */ - hp7lc2k_datacnt-=1; - hp7lc2k_data_ptr+=1; - } - - if (code == 0xAA) { /* keyboard has reset itself */ - keybd_configure (fd); /* reconfigure the keyboard */ - hp7lc2k_datacnt=0; /* reset the data count */ - hp7lc2k_data_ptr = hp7lc2k_buf; /* reset the data pointer */ - return(READ_FAILURE); - } - *data++ = keycode; - *data = keycode >> 8; - *data_type = KEY_DATA; /* tell X it's key data */ - *pending = 2; /* two bytes are returned */ - return(READ_SUCCESS); - } - -/************************************************************************** - * - * This routine is called by the X server to write to the keyboard. - * It is called when an X request is made that causes a write to an input - * device. - * - * See the file x_serialdrv.h for the format of the data for each request. - * - * The only one we will support is _XChangeFeedbackControl, which is used - * to turn on LEDs. - * - */ - -static int -hp7lc2kwrite ( - int fd, int request, char *data) - { - int i; - HPKeyboardFeedbackControl *ctrl; - ps2_buffer_t kbdbuf; - - switch (request) - { - case _XChangeFeedbackControl: - ctrl = (HPKeyboardFeedbackControl *) data; - - if (ctrl->class != KbdFeedbackClass) - return(WRITE_FAILURE); - kbdbuf.b[0] = 0; - if (ctrl->leds & SCROLLLOCK_LED) { - kbdbuf.b[0] |= SCROLL_LED; - } - if (ctrl->leds & NUMLOCK_LED) { - kbdbuf.b[0] |= NUM_LED; - } - if (ctrl->leds & CAPSLOCK_LED) { - kbdbuf.b[0] |= CAPS_LED; - } - ioctl (fd, PS2_INDICATORS, &kbdbuf); - - if (ctrl->autoRepeat == AutoRepeatModeOff) - ioctl (fd, PS2_ALL_MKBRK, &kbdbuf); - else - ioctl (fd, PS2_ALL_TMAT_MKBRK, &kbdbuf); - break; - case _XSetDeviceValuators: - case _XChangeDeviceControl: - case _XSetDeviceMode: - default: - return(WRITE_FAILURE); - break; - } - return(WRITE_SUCCESS); - } - -/************************************************************************** - * - * This routine is called by the X server to close an input device. - * - */ - -static int -hp7lc2kclose ( - int fd) - { - close (fd); - return (CLOSE_SUCCESS); - } - -/************************************************************************** - * - * This routine is called to initialize the entry point vector for this - * serial input device driver. - * - */ - -int -hp7lc2k_Init( - SerialProcs *serialproc) - { - serialproc->configure = hp7lc2kconfigure;/* routine to init device */ - serialproc->read = hp7lc2kread; /* routine to read from dev */ - serialproc->write = hp7lc2kwrite; /* routine to write to dev */ - serialproc->close = hp7lc2kclose; /* routine to close device */ - return INIT_SUCCESS; /* indicate success */ - } - -#ifdef DEBUG -main() - { - int fd; - - makedata(); /* make the test data */ - fd = open ("data", O_RDWR); - process_test_data(fd); - close(fd); - } - -/* The PS2 keyboard returns one byte per key press and two bytes per key release. - * The keycode is the same in each case. - * - * Byte 0: - * scancode for key press, 0xF0 for key release. - * Byte 1: - * scancode for key release. - */ - -makedata () - { - int i, fd; - unsigned char buf[3]; - - fd = creat("data", 0777); - for (i=7; i<256; i++) - { - buf[0]=i; - buf[1]=0xF0; - buf[2]=i; - write (fd,buf,3); - } - close(fd); - } - -process_test_data(fd) - { - unsigned char data[32], data_type; - int pending; - - hp7lc2kread (fd, data, &data_type, &pending); - while (pending > 0) - { - printf ("%d bytes returned, type is %x, data is %x %x\n", pending, data_type, - data[0], data[1]); - pending = 0; - data[0] = data[1] = 0; - hp7lc2kread (fd, data, &data_type, &pending); - } - } -#endif /* DEBUG */ Index: xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c diff -u xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c:3.2 xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c:removed --- xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c:3.2 Wed Jan 17 17:36:48 2001 +++ xc/programs/Xserver/hw/hp/input/drivers/hp7lc2m.c Thu Feb 27 12:29:24 2003 @@ -1,934 +0,0 @@ -/* $Xorg: hp7lc2m.c,v 1.3 2000/08/17 19:48:26 cpqbld Exp $ */ -/************************************************************ - -Copyright (c) 1992 by Hewlett-Packard Company, Palo Alto, California - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Hewlett-Packard not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -HEWLETT-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 <stdio.h> -#include <errno.h> -#include <fcntl.h> -#include "ps2io.h" -#include <X11/extensions/XI.h> -#include "x_serialdrv.h" - -/************************************************************************** - * - * hp7lc2m.c - X server input device driver. - * - * This driver provides support for PS2 mice attached to an HP9000700LC2 - * via the internal mini-DIN interface. - * - * The HP-UX 9.03 operating system is required by this driver. - * - * If another device is used as the X pointer, the PS2 mouse attached to - * the mini-DIN interface can be accessed via the X input device extension - * by adding the following lines to the /usr/lib/X11/X0devices file: - * - * Begin_Device_Description - * Name hp7lc2m.sl # PS2 DIN keyboard via mini-DIN interface - * Use Extension # access via input extension - * Path /dev/ps2mouse # use device special file /dev/ps2mouse - * End_Device_Description - * - * For documentation on using serial input devices with X, please refer - * to the manual "Using the X Window System", Chapter 3 "Preliminary - * Configuration", in the section titled "Using Special Input Devices". - * - * Sample entries for the /usr/lib/X11/X*devices file can be found in - * /etc/newconfig/X0devices. - * - */ - -#define BUFRSIZ 2048 -#define READSIZ 2000 -#define PKT_SIZ 3 -#define BUTTON1_AND_2 0x05 -#define BUTTON2_AND_3 0x06 -#define BUTTON1_AND_3 0x03 -#define BUTTON_BITS 0x07 -#define ONE_BUTTON_DOWN -1 -#define ILLEGAL_COMBO -2 - -static int hp7lc2m_left=READSIZ, hp7lc2m_datacnt=0; -static unsigned char hp7lc2m_buf[BUFRSIZ]; -static unsigned char *hp7lc2m_data_ptr = hp7lc2m_buf; -static unsigned int hp7lc2m_buttonmask; -static unsigned int hp7lc2m_chording_button = 0; -static unsigned int hp7lc2m_chording_interval = 0; -static int process_button(), do_button_chording(), get_more_data(), check_combo (); -typedef struct ps2_4 ps2_buffer_t; - -/************************************************************************** - * - * This routine is called by the X server to open and configure the device. - * It is passed a pointer to an HPDeviceHeader struct (defined in - * x_serialdrv.h). That struct points to the path name of the device file - * to which the input device is connected. The path is specified in the - * X*devices configuration file described above. - * - * This routine must open the device file and configure the serial port. - * It must initialize fields in the HPInputDeviceHeader struct including - * the device file descriptor, name by which the device will be known to - * X, the number of keys, buttons, and axes on the device, the keymap name - * and file, if the device has keys, and a flags field that specifies the - * size of the data returned by the device. See the serial input device - * specification described above for more details. - * - */ - -static int -hp7lc2mconfigure ( - HPInputDeviceHeader *d) - { - int ret; - ps2_buffer_t mousebuf; - - d->file_ds = open (d->path, O_RDWR | O_NDELAY);/* non-block read */ - if (d->file_ds < 0) - return(INIT_FAILURE); - - if (d->button_chording) - hp7lc2m_chording_interval = d->button_chording; - - /* set the sample rate to 100 reports/second max */ - - ioctl (d->file_ds, PS2_DISABLE); - ioctl (d->file_ds, PS2_RESET); - mousebuf.b[0] = SAMPLE_60; - ioctl (d->file_ds, PS2_SAMPLERATE, &mousebuf); - - /* put the mouse into stream mode */ - - mousebuf.b[0] = 0; - ioctl (d->file_ds, PS2_STREAMMODE, &mousebuf); - - /* set the mouse resolution to 8 counts/mm */ - - mousebuf.b[0] = RES_4; - ioctl (d->file_ds, PS2_RESOLUTION, &mousebuf); - ioctl (d->file_ds, PS2_ENABLE); - - d->x_name = "PS2_DIN_MOUSE"; /* device name for X server*/ - d->flags = DATA_IS_8_BITS; /* size of data for device */ - d->ax_num = 2; /* two axes of motion */ - if (d->button_chording) - d->num_buttons = 5; /* emulate 5 buttons */ - else - d->num_buttons = 3; /* support 3 buttons */ - d->num_keys =0; /* no keys */ - d->resolution = 80; /* resolution in counts/cm */ - d->max_x = 255; /* maximum x value in counts */ - d->max_y = 255; /* maximum y value in counts */ - - return (INIT_SUCCESS); - } - -/************************************************************************** - * - * This entry point is called when the X server detects that there is data - * available to be read from the device. This routine will be called - * repeatedly until it returns READ_FAILURE. It is expected to return - * one "event" for each successful call. An "event" is one key press or - * release, one button press or release, one change in axis data, or one - * change of proximity state. One change in axis data can be reported - * along with a button or proximity change. - * - */ - -static int -hp7lc2mread ( - int fd, unsigned char *data, unsigned char *data_type, int *pending) - { - int button, data_read=0; - unsigned int buttonmask; - int count, x, y; - - /* If we don't already have at least PKT_SIZ bytes of data, - * we need to read some. If we're getting near the end - * of the buffer, copy the leftover data to the beginning - * of the buffer. - */ - - if (hp7lc2m_datacnt < PKT_SIZ && (get_more_data (fd) == READ_FAILURE)) - return(READ_FAILURE); - - /* The PS2 mouse returns PKT_SIZ bytes for each movement of the mouse or - * button press or release. The format of the bytes is as follows: - * - * Byte 0: - * Bit 7 Y data overflow (1 = overflow) - * Bit 6 X data overflow (1 = overflow) - * Bit 5 Y data sign (1 = negative) - * Bit 4 X data sign (1 = negative) - * Bit 3 Not used (always 1) - * Bit 2 Center button (1 = depressed) - * Bit 1 Right button (1 = depressed) - * Bit 0 Left button (1 = depressed) - * Byte 1: - * X coordinate data byte (2's compliment) - * Byte 2: - * Y coordinate data byte (2's compliment) - */ - - x = (int) hp7lc2m_data_ptr[1]; - y = -((int) hp7lc2m_data_ptr[2]); - - if (x!=0 || y != 0) { - *data_type |= MOTION_DATA; - data[0] = x; - data[1] = y; - data_read = 2; - hp7lc2m_data_ptr[1] = 0; /* clear motion for reprocessing case */ - hp7lc2m_data_ptr[2] = 0; /* clear data for reprocessing case */ - } - - /* Check to see if a button has changed state */ - buttonmask = (u_char) (hp7lc2m_data_ptr[0] & BUTTON_BITS); - if (buttonmask != hp7lc2m_buttonmask) { - if (hp7lc2m_chording_interval) { - if ((button = do_button_chording(fd, &buttonmask))>=0) { - *data_type |= BUTTON_DATA; - data[data_read++] = button; - } - } - else { - button = process_button(buttonmask); - *data_type |= BUTTON_DATA; - data[data_read++] = button; - } - } - if (hp7lc2m_buttonmask == buttonmask) /* no leftover buttons */ - { - hp7lc2m_datacnt -= PKT_SIZ; - hp7lc2m_data_ptr += PKT_SIZ; - } - *pending += data_read; - return(READ_SUCCESS); - } - -/************************************************************************** - * - * Process a button from the current data packet. - * - */ - -#define hp7lc2_BUTTON1 0x01 -#define hp7lc2_BUTTON2 0x04 -#define hp7lc2_BUTTON3 0x02 -#define NUM_BUTTONS 3 - -static int process_button( - unsigned int buttonmask) - { - int i, button, bit, down, up; - - button = 1; - up = ~buttonmask & hp7lc2m_buttonmask; - for (i=0; i<NUM_BUTTONS; i++) - { - bit = (1 << i); - if (bit & up) - { - switch (bit) - { - case hp7lc2_BUTTON3: - button += 2; - case hp7lc2_BUTTON2: - button += 2; - break; - } - hp7lc2m_buttonmask = (hp7lc2m_buttonmask & ~bit); - return(button); - } - } - - down = buttonmask & ~hp7lc2m_buttonmask; - button = 0; - for (i=0; i<NUM_BUTTONS; i++) - { - bit = (1 << i); - if (bit & down) - { - switch (bit) - { - case hp7lc2_BUTTON3: - button += 2; - case hp7lc2_BUTTON2: - button += 2; - break; - } - hp7lc2m_buttonmask = (hp7lc2m_buttonmask | bit); - return(button); - } - } - } - -/************************************************************************** - * - * Get more data and crunch the buffer if we're getting near the end. - * - */ - -static int get_more_data( - int fd) - { - int count; - - if (hp7lc2m_data_ptr - hp7lc2m_buf > hp7lc2m_datacnt) - { - bcopy (hp7lc2m_data_ptr, hp7lc2m_buf, hp7lc2m_datacnt); - hp7lc2m_data_ptr = hp7lc2m_buf; - hp7lc2m_left = READSIZ - hp7lc2m_datacnt; - } - count = read (fd, hp7lc2m_data_ptr + hp7lc2m_datacnt, hp7lc2m_left); - - if (count >0) - { - hp7lc2m_datacnt += count; - hp7lc2m_left -= count; - } - - if (hp7lc2m_datacnt < PKT_SIZ) - return(READ_FAILURE); - - return(READ_SUCCESS); - } - -/************************************************************************** - * - * Handle button chording. - * - */ - -#define BUTTON1_DOWN 0 -#define BUTTON1_UP 1 -#define BUTTON2_DOWN 2 -#define BUTTON2_UP 3 -#define BUTTON3_DOWN 4 -#define BUTTON3_UP 5 -#define BUTTON4_DOWN 6 -#define BUTTON4_UP 7 -#define BUTTON5_DOWN 8 -#define BUTTON5_UP 9 - -int ignore1, ignore2, ignorecnt; - -static int do_button_chording( - int fd, - unsigned int *buttonmask) - { - int button, ret; - unsigned char *tptr; - unsigned int tmask; - struct timeval timeout; - - if (hp7lc2m_chording_button) /* waiting for chorded button up */ - { - button = process_button(*buttonmask); /* process one button */ - if (button % 2) /* odd number means button up */ - if (button == ignore1) /* up transition of chorded pair */ - { - ignore1= -1; ignorecnt--; /* dont ignore it next time */ - if (ignorecnt == 0) /* done ignoring buttons */ - { - button = hp7lc2m_chording_button; /* send chorded up */ - hp7lc2m_chording_button = 0; /* clear saved button */ - return(button); /* return chorded button */ - } - else - return(-1); /* we ignored this one */ - } - else if (button == ignore2) /* other button of chorded pair */ - { - ignore2= -1; ignorecnt--;/* dont ignore it next time */ - if (ignorecnt == 0) /* done ignoring buttons */ - { - button = hp7lc2m_chording_button; /* send chorded up */ - hp7lc2m_chording_button = 0; /* clear saved button */ - return(button); /* return chorded button */ - } - else - return(-1); /* we ignored this one */ - } - else - return(button); /* not a button to ignore */ - else - return(button); /* button down - dont ignore */ - } - else if (hp7lc2m_buttonmask==0) /* check if chording necessary */ - { - ret = check_combo (*buttonmask); - if (ret == ILLEGAL_COMBO) /* illegal combination */ - return (process_button(*buttonmask)); /* process a button */ - else if (ret != ONE_BUTTON_DOWN)/* we already chorded */ - return (ret); /* return chorded button */ - - timeout.tv_sec = 0; - timeout.tv_usec = hp7lc2m_chording_interval * 1000; /* wait interval */ - select(0, (int *)NULL, (int *)NULL, (int *)NULL, &timeout); - get_more_data(fd); - - for (tptr=hp7lc2m_data_ptr+PKT_SIZ; - tptr<hp7lc2m_data_ptr+hp7lc2m_datacnt; - tptr +=PKT_SIZ) - { -#ifdef DEBUG - if (tptr > (hp7lc2m_data_ptr + (3 * PKT_SIZ))) - break; -#endif - tmask = (u_char) (*tptr & BUTTON_BITS); - if (tmask != *buttonmask) /* a button changed */ - { - if (!(tmask & *buttonmask)) /* a button went up */ - return (process_button(*buttonmask)); - if ((ret = check_combo (tmask)) > 0) - { - if (tmask == hp7lc2m_buttonmask) - *buttonmask = hp7lc2m_buttonmask; - hp7lc2m_datacnt -= (tptr - hp7lc2m_data_ptr); - hp7lc2m_data_ptr = tptr; - return (ret); - } - else - return (process_button(*buttonmask)); - } - } - return (process_button(*buttonmask)); - } - else /* can't chord - button already down */ - { - return (process_button(*buttonmask)); - } - } - -/************************************************************************** - * - * Check to see if the current data packet indicates more than one button - * is down. If so, it is either a valid chording combingation or an - * illegal chording combination. If valid, remember which buttons we - * need to ignore the first time they go up. If invalid, we won't do - * button chording. If only one button is down, we need more data. - */ - -static int check_combo ( - int buttonmask) - { - if ((buttonmask & BUTTON1_AND_3) == BUTTON1_AND_3) /* illegal combo */ - return (ILLEGAL_COMBO); - else if ((buttonmask & BUTTON1_AND_2) == BUTTON1_AND_2) - { - process_button(buttonmask); /* eat one button */ - process_button(buttonmask); /* eat the other button */ - hp7lc2m_chording_button = BUTTON4_UP; /* save for up transition */ - ignore1 = BUTTON1_UP; /* ignore each button up */ - ignore2 = BUTTON2_UP; - ignorecnt = 2; - return (BUTTON4_DOWN); /* send the chorded down */ - } - else if ((buttonmask & BUTTON2_AND_3) == BUTTON2_AND_3) - { - process_button(buttonmask); - process_button(buttonmask); - hp7lc2m_chording_button = BUTTON5_UP; - ignore2 = BUTTON2_UP; - ignore1 = BUTTON3_UP; - ignorecnt = 2; - return (BUTTON5_DOWN); - } - else - return (ONE_BUTTON_DOWN); /* only one button - need more data */ - } - -/************************************************************************** - * - * This routine is called by the X server to write to the mouse. - * It is called when an X request is made that causes a write to an - * input device. No requests are supported here. - * - * See the file x_serialdrv.h for the format of the data for each request. - * - */ - -static int -hp7lc2mwrite ( - int fd, int request, char *data) - { - int i; - HPPointerFeedbackControl *ctrl; - ps2_buffer_t mousebuf; - - switch (request) - { - case _XChangeFeedbackControl: - ctrl = (HPPointerFeedbackControl *) data; - - if (ctrl->class != PtrFeedbackClass) - return(WRITE_FAILURE); - break; - case _XSetDeviceValuators: - case _XChangeDeviceControl: - case _XSetDeviceMode: - default: - return(WRITE_FAILURE); - break; - } - return(WRITE_SUCCESS); - } - -/************************************************************************** - * - * This routine is called by the X server to close an input device. - * - */ - -static int -hp7lc2mclose ( - int fd) - { - close (fd); - return (CLOSE_SUCCESS); - } - -/************************************************************************** - * - * This routine is called to initialize the entry point vector for this - * serial input device driver. - * - */ - -int -hp7lc2m_Init( - SerialProcs *serialproc) - { - serialproc->configure = hp7lc2mconfigure;/* routine to init device */ - serialproc->read = hp7lc2mread; /* routine to read from dev */ - serialproc->write = hp7lc2mwrite; /* routine to write to dev */ - serialproc->close = hp7lc2mclose; /* routine to close device */ - return INIT_SUCCESS; /* indicate success */ - } - -#ifdef DEBUG -char expected_button1[]= { -0,1,0,2,1,3,0,2,3,1,0,2,1,3,0,4,5,1,0,4,1,5,0,4,2,1,5,3, /* test case 1 */ -4,5,4,2,5,3,4,2,3,5,4,2,5,3,4,2,3,5,4,0,2,5,1,3, /* test case 2 */ -2,3,2,0,1,0,1,0,1,4,5,4,5,3,0,4,1,5, /* test case 3 */ -0,4,1,5,0,4,1,5,2,3,0,4,1,5, /* test case 4 */ -0,2,1,3,0,2,1,3,4,5, /* test case 5 */ -4,2,5,3,4,2,5,3, /* test case 6 */ -0,4,2,1,5,3,0,4,2,5,1,4,3,0,2,5,1,4,3,0,2,1,5,3,0,4,1,5, /* test case 7 */ -2,3,0,1,4,2,5,3,0,1,4,2,5,3, - -0,2,3,1,4,2,3,5,0,4,5,1,0,4,2,3,5,1,0,2,1,3,4,2,5,3,0,4, /* miscellaneous */ -2,1,5,3,0,2,1,4,3,0,1,5,2,3,4,2,0,1,0,1,0,1,5,3,0,1,4,2, -5,3,0,1,4,2,5,3,2,3,0,4,1,5,4,5,0,2,1,3,4,5,0,1,2,3}; - -char expected_button2[]= { -0,1,6,7,6,7,6,7,0,4,5,1,0,4,1,5,0,4,2,1,5,3, /* test case 1 */ -4,5,8,9,8,9,8,9,8,9,4,0,2,5,1,3, /* test case 2 */ -2,3,6,0,1,0,1,4,5,4,5,7,0,4,1,5, /* test case 3 */ -0,4,1,5,0,4,1,5,2,3,0,4,1,5, /* test case 4 */ -6,7,6,7,4,5, /* test case 5 */ -8,9,8,9, /* test case 6 */ -0,4,2,1,5,3,0,4,2,5,1,4,3,0,2,5,1,4,3,0,2,1,5,3,0,4,1,5, /* test case 7 */ -2,3,0,1,8,9,0,1,8,9, - -6,7,8,9,0,4,5,1,0,4,2,3,5,1,6,7,8,9,0,4,2,1,5,3,6,4,7,0,/* miscellaneous */ -1,5,2,3,8,0,1,0,1,0,1,9,0,1,8,9,0,1,8,9,2,3,0,4,1,5,4,5,6,7,4,5,0,1,2,3}; - -char testdata[][3] = { - /* Case 1: left button goes down */ - /* remains down */ - /* goes up */ - /* becomes chorded */ - /* becomes non-chordable */ -{0x08,1,1}, /* no buttons down */ -{0x08,1,1}, /* no buttons down */ -{0x09,1,1}, /* left button down 0 0 */ -{0x09,1,1}, /* left button down */ -{0x08,1,1}, /* no buttons down 1 1 */ - -{0x09,1,1}, /* left button down 0 */ -{0x09,1,1}, /* left button down */ -{0x0d,1,1}, /* left and center 2 6 */ -{0x0d,1,1}, /* left and center */ -{0x08,1,1}, /* no buttons down 1 */ - /* 3 7 */ -{0x09,1,1}, /* left button down 0 */ -{0x0d,1,1}, /* left and center 2 6 */ -{0x09,1,1}, /* left button down 3 */ -{0x08,1,1}, /* no buttons down 1 7 */ -{0x09,1,1}, /* left button down 0 */ -{0x0d,1,1}, /* left and center 2 6 */ -{0x0c,1,1}, /* center button down 1 */ -{0x08,1,1}, /* no buttons down 3 7 */ -{0x09,1,1}, /* left button down 0 */ -{0x0b,1,1}, /* left and right 4 0 */ - /* 4 */ -{0x09,1,1}, /* left button down 5 5 */ -{0x08,1,1}, /* no buttons down 1 1 */ -{0x09,1,1}, /* left button down 0 */ -{0x0b,1,1}, /* left and right 4 0 */ - /* 4 */ -{0x0a,1,1}, /* right button down 1 1 */ -{0x08,1,1}, /* no buttons down 5 5 */ -{0x09,1,1}, /* left button down 0 */ -{0x0f,1,1}, /* all buttons 4 0 */ - /* 2 4 */ - /* 2 */ -{0x0e,1,1}, /* right and center 1 1 */ -{0x08,1,1}, /* no buttons down 5 5 */ - /* 3 3 */ - - - /* Case 2: right button goes down */ - /* remains down */ - /* goes up */ - /* becomes chorded */ - /* becomes non-chordable */ -{0x08,1,1}, /* no buttons down */ -{0x08,1,1}, /* no buttons down */ -{0x0a,1,1}, /* right button down 4 4 */ -{0x0a,1,1}, /* right button down */ -{0x08,1,1}, /* no buttons down 5 5 */ -{0x0a,1,1}, /* right button down 4 */ -{0x0e,1,1}, /* right and center 2 8 */ -{0x0e,1,1}, /* right and center */ -{0x08,1,1}, /* no buttons down 5 */ - /* 3 9 */ -{0x0a,1,1}, /* right button down 4 */ -{0x0e,1,1}, /* right and center 2 8 */ -{0x0a,1,1}, /* right button down 3 */ -{0x08,1,1}, /* no buttons down 5 9 */ -{0x0a,1,1}, /* right button down 4 */ -{0x0e,1,1}, /* right and center 2 8 */ -{0x0c,1,1}, /* center button down 5 */ -{0x08,1,1}, /* no buttons down 3 9 */ -{0x0a,1,1}, /* right button down 4 */ -{0x0e,1,1}, /* right and center 2 8 */ -{0x0a,1,1}, /* right button down 3 */ -{0x08,1,1}, /* no buttons down 5 9 */ -{0x0a,1,1}, /* right button down 4 */ -{0x0f,1,1}, /* all buttons 0 4 */ - /* 2 0 */ - /* 2 */ -{0x0d,1,1}, /* left and center 5 5 */ -{0x08,1,1}, /* no buttons down 1 1 */ - /* 3 3 */ - - - /* Case 3: center button goes down */ - /* remains down */ - /* goes up */ - /* becomes chorded */ - /* becomes non-chordable */ -{0x0c,1,1}, /* center button down 2 2 */ -{0x0c,1,1}, /* center button down */ -{0x08,1,1}, /* no buttons down 3 3 */ -{0x0c,1,1}, /* center button down 2 */ -{0x0d,1,1}, /* left and center 0 6 */ -{0x0d,1,1}, /* left and center */ -{0x0c,1,1}, /* center button down 1 */ -{0x0d,1,1}, /* left and center 0 0 */ -{0x0c,1,1}, /* center button down 1 1 */ -{0x0d,1,1}, /* left and center 0 0 */ -{0x0e,1,1}, /* right and center 1 1 */ - /* 4 4 */ -{0x0c,1,1}, /* center button down 5 5 */ -{0x0e,1,1}, /* right and center 4 4 */ -{0x08,1,1}, /* no buttons down 5 5 */ - /* 3 3 */ -{0x0b,1,1}, /* left and right 4 4 */ - /* 0 0 */ -{0x08,1,1}, /* no buttons down 5 5 */ - /* 1 1 */ - - /* Case 4: left and right go down */ -{0x0b,1,1}, /* left and right 0 0 */ - /* 4 4 */ -{0x08,1,1}, /* no buttons down 1 1 */ - /* 5 5 */ -{0x0b,1,1}, /* left and right 0 0 */ - /* 4 4 */ -{0x0c,1,1}, /* center button down 1 1 */ - /* 5 5 */ - /* 2 2 */ -{0x0b,1,1}, /* left and right 3 3 */ - /* 0 0 */ - /* 4 4 */ -{0x08,1,1}, /* no buttons down 1 1 */ - /* 5 5 */ - - /* Case 5: left and center go down */ -{0x08,1,1}, /* no buttons down */ -{0x0d,1,1}, /* left and center 0 */ - /* 2 6 */ -{0x08,1,1}, /* no buttons down 1 7 */ - /* 3 */ -{0x0d,1,1}, /* left and center 0 6 */ - /* 2 */ -{0x0a,1,1}, /* right button down 1 7 */ - /* 3 4 */ - /* 4 */ -{0x08,1,1}, /* no buttons down 5 5 */ - - - - /* Case 6: right and center go down */ -{0x0e,1,1}, /* right and center 4 */ - /* 2 8 */ -{0x08,1,1}, /* no buttons down 5 9 */ - /* 3 */ -{0x0e,1,1}, /* right and center 4 8 */ - /* 2 */ -{0x08,1,1}, /* no buttons down 5 9 */ - /* 3 */ -{0x08,1,1}, /* no buttons down */ - - - /* Case 7: all buttons go down */ -{0x0f,1,1}, /* all buttons 0 0 */ - /* 4 4 */ - /* 2 2 */ -{0x0f,1,1}, /* all buttons */ -{0x08,1,1}, /* no buttons down 1 1 */ - /* 5 5 */ - /* 3 3 */ -{0x0f,1,1}, /* all buttons 0 0 */ - /* 4 4 */ - /* 2 2 */ -{0x0d,1,1}, /* left and center 5 5 */ -{0x0e,1,1}, /* right and center 1 1 */ - /* 4 4 */ -{0x0b,1,1}, /* left and right 3 3 */ - /* 0 0 */ -{0x0f,1,1}, /* all buttons 2 2 */ -{0x0d,1,1}, /* left and center 5 5 */ -{0x0e,1,1}, /* right and center 1 1 */ - /* 4 4 */ -{0x0b,1,1}, /* left and right 3 3 */ - /* 0 0 */ -{0x0f,1,1}, /* all buttons 2 2 */ -{0x0c,1,1}, /* center button down 1 1 */ - /* 5 5 */ -{0x0b,1,1}, /* left and right 3 3 */ - /* 0 0 */ - /* 4 4 */ -{0x0c,1,1}, /* center button down 1 1 */ - /* 5 5 */ - /* 2 2 */ -{0x08,1,1}, /* no buttons down 3 3 */ -{0x09,1,1}, /* left button down 0 */ -{0x0e,1,1}, /* right and center 1 0 */ - /* 4 1 */ - /* 2 8 */ -{0x09,1,1}, /* left button down 5 */ - /* 3 9 */ - /* 0 0 */ -{0x0e,1,1}, /* right and center 1 1 */ - /* 4 */ - /* 2 8 */ -{0x08,1,1}, /* no buttons down 5 */ - /* 3 9 */ - - - /* Case 8: miscellaneous tests */ -{0x09,1,1}, /* left button down 0 */ -{0x0d,1,1}, /* left and center 2 6 */ -{0x09,1,1}, /* left button down 3 */ -{0x08,1,1}, /* no buttons down 1 7 */ - -{0x0a,1,1}, /* right button down 4 */ -{0x0a,1,1}, /* right button down */ -{0x0e,1,1}, /* right and center 2 8 */ -{0x0a,1,1}, /* right button down 3 */ -{0x08,1,1}, /* no buttons down 5 9 */ - -{0x09,1,1}, /* left button down 0 0 */ -{0x0b,1,1}, /* left and right 4 4 */ -{0x09,1,1}, /* left button down 5 5 */ -{0x08,1,1}, /* no buttons down 1 1 */ - -{0x09,1,1}, /* left button down 0 0 */ -{0x0b,1,1}, /* left and right 4 4 */ -{0x0f,1,1}, /* all buttons 2 2 */ -{0x0b,1,1}, /* left and right 3 3 */ -{0x09,1,1}, /* left button down 5 5 */ -{0x08,1,1}, /* no buttons down 1 1 */ - -{0x09,1,1}, /* left button down 0 */ -{0x09,1,1}, /* left button down */ -{0x09,1,1}, /* left button down */ -{0x0d,1,1}, /* left and center 2 6 */ -{0x0d,1,1}, /* left and center */ -{0x08,1,1}, /* no buttons down 1 7 */ - /* 3 */ - -{0x0e,1,1}, /* right and center 4 8 */ - /* 2 */ -{0x08,1,1}, /* no buttons down 5 9 */ - /* 3 */ - -{0x0f,1,1}, /* all buttons 0 0 */ - /* 4 4 */ - /* 2 2 */ -{0x08,1,1}, /* no buttons down 1 1 */ - /* 5 5 */ - /* 3 3 */ - -{0x0d,1,1}, /* left and center 0 */ - /* 2 6 */ -{0x0e,1,1}, /* right and center 1 */ - /* 4 4 */ -{0x0b,1,1}, /* left and right 3 7 */ - /* 0 0 */ -{0x08,1,1}, /* no buttons down 1 1 */ - /* 5 5 */ -{0x0c,1,1}, /* center button down 2 2 */ -{0x08,1,1}, /* no buttons down 3 3 */ - -{0x0e,1,1}, /* right and center 4 8 */ - /* 2 */ -{0x0f,1,1}, /* all buttons 0 0 */ -{0x0e,1,1}, /* right and center 1 1 */ -{0x0f,1,1}, /* all buttons 0 0 */ -{0x0e,1,1}, /* right and center 1 1 */ -{0x0f,1,1}, /* all buttons 0 0 */ -{0x08,1,1}, /* no buttons down 1 1 */ - /* 5 9 */ - /* 3 */ - -{0x09,1,1}, /* left button down 0 0 */ -{0x0e,1,1}, /* center, right down 1 1 */ - /* 4 8 */ - /* 2 */ -{0x09,1,1}, /* left button down 5 9 */ - /* 3 0 */ - /* 0 */ -{0x0e,1,1}, /* center, right down 1 1 */ - /* 4 8 */ - /* 2 */ -{0x08,1,1}, /* no buttons down 5 9 */ - /* 3 */ - -{0x0c,1,1}, /* center button down 2 2 */ -{0x0b,1,1}, /* left and right 3 0 */ - /* 0 4 */ - /* 4 3 */ -{0x08,1,1}, /* no buttons down 1 1 */ - /* 5 5 */ -{0x0a,1,1}, /* right button down 4 */ -{0x0d,1,1}, /* left and center 5 6 */ - /* 0 */ - /* 2 */ -{0x08,1,1}, /* no buttons down 1 7 */ - /* 3 */ -{0x0a,1,1}, /* right button down 4 */ -{0x0a,1,1}, /* right button down */ -{0x0a,1,1}, /* right button down */ -{0x0a,1,1}, /* right button down 4 */ -{0x0a,1,1}, /* right button down */ -{0x08,1,1}, /* no buttons down 5 5 */ -{0x09,1,1}, /* left button down 0 */ -{0x09,1,1}, /* left button down */ -{0x09,1,1}, /* left button down */ -{0x09,1,1}, /* left button down 0 */ -{0x09,1,1}, /* left button down */ -{0x08,1,1}, /* no buttons down 1 1 */ -{0x0c,1,1}, /* center button down 2 */ -{0x0c,1,1}, /* center button down */ -{0x0c,1,1}, /* center button down */ -{0x0c,1,1}, /* center button down 2 */ -{0x0c,1,1}, /* center button down */ -{0x08,1,1}, /* no buttons down 3 3 */ - -{0x00,1,1}}; /* terminate data */ - -main () - { - int fd; - - makedata(); /* make the test data */ - fd = open ("data", O_RDWR); - printf("Test case 1: no button chording\n"); - process_test_data(fd, expected_button1); - close(fd); - fd = open ("data", O_RDWR); - hp7lc2m_chording_interval = 100; - printf("Test case 2: button chording enabled\n"); - process_test_data(fd, expected_button2); - close(fd); - } - -process_test_data (fd, expected) - int fd; - char *expected; - { - int pending=0, ndx=0; - unsigned char buf[128], data_type=0; - - buf[2] = 0; - while (hp7lc2mread (fd, buf, &data_type, &pending) == READ_SUCCESS) - { - if (data_type & MOTION_DATA) - ndx = 2; - if (data_type & BUTTON_DATA) - { - if (buf[ndx] != *expected) - printf ("Expected button %d received %d.\n", - *expected,buf[ndx]); - expected++; - } - data_type = 0; - buf[2]=0; - pending=0; - ndx = 0; - }; - } - -/* The PS2 mouse returns PKT_SIZ bytes for each movement of the mouse or - * button press or release. The format of the bytes is as follows: - * - * Byte 0: - * Bit 7 Y data overflow (1 = overflow) - * Bit 6 X data overflow (1 = overflow) - * Bit 5 Y data sign (1 = negative) - * Bit 4 X data sign (1 = negative) - * Bit 3 Not used (always 1) - * Bit 2 Center button (1 = depressed) - * Bit 1 Right button (1 = depressed) - * Bit 0 Left button (1 = depressed) - * Byte 1: - * X coordinate data byte (2's compliment) - * Byte 2: - * Y coordinate data byte (2's compliment) - */ - -makedata () - { - int i, fd; - - fd = creat("data", 0777); - while (testdata[i][0] != 0) - write (fd, testdata[i++], 3); - close(fd); - } -#endif /* DEBUG */ Index: xc/programs/Xserver/hw/hp/input/drivers/ps2io.h diff -u xc/programs/Xserver/hw/hp/input/drivers/ps2io.h:3.5 xc/programs/Xserver/hw/hp/input/drivers/ps2io.h:removed --- xc/programs/Xserver/hw/hp/input/drivers/ps2io.h:3.5 Wed Jan 17 17:36:48 2001 +++ xc/programs/Xserver/hw/hp/input/drivers/ps2io.h Thu Feb 27 12:29:24 2003 @@ -1,113 +0,0 @@ -/* $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 - -#ifndef _SYS_STDSYMS_INCLUDED -#ifdef _KERNEL_BUILD -# include "../h/stdsyms.h" -#else /* ! _KERNEL_BUILD */ -# include <sys/stdsyms.h> -#endif /* _KERNEL_BUILD */ -#endif /* _SYS_STDSYMS_INCLUDED */ - -#ifdef _KERNEL_BUILD -# include "../h/ioctl.h" -#else /* ! _KERNEL_BUILD */ -# include <sys/ioctl.h> -#endif /* _KERNEL_BUILD */ - -struct ps2_4 { - unsigned char b[4]; -}; - -/* - * Device ioctl() command defines - */ - -#define PS2_INDICATORS _IOW('P', 0x01, struct ps2_4) -#define PS2_IDENT _IOR('P', 0x02, struct ps2_4) -#define PS2_SCANCODE _IOWR('P', 0x03, struct ps2_4) -#define PS2_ENABLE _IO('P', 0x04) -#define PS2_DISABLE _IO('P', 0x05) -#define PS2_STREAMMODE _IO('P', 0x06) -#define PS2_SAMPLERATE _IOW('P', 0x07, struct ps2_4) -#define PS2_RESET _IOR('P', 0x08, struct ps2_4) -#define PS2_RESOLUTION _IOW('P', 0x09, struct ps2_4) -#define PS2_ALL_TMAT _IO('P', 0x0A) -#define PS2_ALL_MKBRK _IO('P', 0x0B) -#define PS2_ALL_TMAT_MKBRK _IO('P', 0x0C) -#define PS2_ALL_MK _IO('P', 0x0D) -#define PS2_KEY_MKBRK _IOW('P', 0x0E, struct ps2_4) -#define PS2_KEY_MAKE _IOW('P', 0x0F, struct ps2_4) -#define PS2_KEY_TMAT _IOW('P', 0x10, struct ps2_4) -#define PS2_RATEDELAY _IOW('P', 0x11, struct ps2_4) - -#define PS2_PORTSTAT _IOR('P', 0x12, struct ps2_4) -#define PS2_TEST _IOW('P', 0x13, char) -#define PS2_SETDEFAULT _IO('P', 0x14) -#define PS2_PROMPTMODE _IO('P', 0x15) -#define PS2_REPORT _IOR('P', 0x16, struct ps2_4) -#define PS2_STATUS _IOR('P', 0x17, struct ps2_4) -#define PS2_2TO1_SCALING _IO('P', 0x18) -#define PS2_1TO1_SCALING _IO('P', 0x19) - -#define PS2FAKE _IOW('P',0x0F,char) /* fake a character */ - -/* -#define _IOR('P',0x ,) - */ - -/* Values for PS2_PORTSTAT first return byte */ - -#define PS2_NONE 0 -#define PS2_MOUSE 1 -#define PS2_KEYBD 2 -#define PS2_UNKNOWN 3 - -/* Bit mask values for ps2 devices */ - -#define PS2_NONE_BIT 0x0001 -#define PS2_MOUSE_BIT 0x0002 -#define PS2_KEYBD_BIT 0x0004 -#define PS2_UNKNOWN_BIT 0x0008 - -/* Bit mask values for PS2_PORTSTAT second return byte */ - -#define INTERFACE_HAS_ITE 0x01 -#define PORT_HAS_FIRST_KEYBD 0x02 -#define PORT_HAS_FIRST_MOUSE 0x04 - -/* values for PS2_SCANCODE */ - -#define GET_SCANCODE 0x00 -#define SCANCODE_1 0x01 -#define SCANCODE_2 0x02 -#define SCANCODE_3 0x03 - -/* values for PS2_SAMPLERATE */ - -#define SAMPLE_10 0x0A -#define SAMPLE_20 0x14 -#define SAMPLE_40 0x28 -#define SAMPLE_60 0x3C -#define SAMPLE_80 0x50 -#define SAMPLE_100 0x64 -#define SAMPLE_200 0xC8 - -/* values for PS2_INDICATORS */ - -#define CAPS_LED 0x01 -#define NUM_LED 0x02 -#define SCROLL_LED 0x04 - -/* values for PS2_RESOLUTION */ -/* (RES_3 is te default) Resolution in counts/mm */ - /* 200 DPI 320 DPI */ - /*--------- ------- */ -#define RES_1 0x00 /* 1 1 */ -#define RES_2 0x01 /* 2 3 */ -#define RES_3 0x02 /* 4 6 */ -#define RES_4 0x03 /* 8 12 */ - -#endif /* _SYS_PS2IO_INCLUDED */ Index: xc/programs/Xserver/hw/hp/ngle/Imakefile diff -u xc/programs/Xserver/hw/hp/ngle/Imakefile:1.1.1.4 xc/programs/Xserver/hw/hp/ngle/Imakefile:removed --- xc/programs/Xserver/hw/hp/ngle/Imakefile:1.1.1.4 Tue Jan 16 17:43:11 2001 +++ xc/programs/Xserver/hw/hp/ngle/Imakefile Thu Feb 27 12:29:24 2003 @@ -1,46 +0,0 @@ -/* $Xorg: Imakefile,v 1.4 2000/08/18 11:07:45 xorgcvs Exp $ */ -#include <Server.tmpl> - -ORIG_SRCS = nglescreen.c \ - nglecolormap.c \ - nglecursor.c \ - nglenoop.c \ - hyperScrn.c - -ORIG_OBJS = nglescreen.o \ - nglecolormap.o \ - nglecursor.o \ - nglenoop.o \ - hyperScrn.o - -#ifdef HPFastScrolling -SCROLLING_SRC = nglecopy.c \ - ngleblt.c - -SCROLLING_OBJ = nglecopy.o \ - ngleblt.o \ - ngledoblt.o - -FAST_SCROLLING_DEFINES = -DHP_FAST_SCROLLING -#endif - -SRCS = $(ORIG_SRCS) $(SCROLLING_SRC) - -OBJS = $(ORIG_OBJS) $(SCROLLING_OBJ) - -DEFINES = $(FAST_SCROLLING_DEFINES) ExtensionOSDefines - -INCLUDES = -I. -I.. -I../include -I../../../mfb -I../../../cfb -I../../../mi \ - -I../../../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - -I$(FONTINCSRC) - -LINTLIBS = ../../../dix/llib-ldix.ln ../../../os/4.2bsd/llib-los.ln \ - ../../mfb/llib-lmfb.ln ../../mi/llib-lmi.ln ../../cfb/llib-lcfb.ln - -NormalLibraryObjectRule() - -NormalRelocatableTarget(ngle,$(OBJS)) - -LinkFile(ngledoblt.o,ngledoblt.o.8.07) - -DependTarget() Index: xc/programs/Xserver/hw/hp/ngle/dregs.h diff -u xc/programs/Xserver/hw/hp/ngle/dregs.h:1.1.1.4 xc/programs/Xserver/hw/hp/ngle/dregs.h:removed --- xc/programs/Xserver/hw/hp/ngle/dregs.h:1.1.1.4 Tue Jan 16 17:43:11 2001 +++ xc/programs/Xserver/hw/hp/ngle/dregs.h Thu Feb 27 12:29:25 2003 @@ -1,123 +0,0 @@ -/* $Xorg: dregs.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - - HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - - *************************************************************************/ - -typedef union { - long int lheight; - long int ly; - struct { - short int x; - short int y; - } xy; - struct { - short int width; - short int height; - } wh; - unsigned long int all; - struct { - unsigned short int high; - unsigned short int low; - } w; - struct { - char b0; - char b1; - char b2; - char b3; - } b; -} dreg_cplx_t; - - -typedef volatile struct { - long int pad1[70]; - unsigned long int reg1; - long int pad2[193]; - unsigned long int reg28; - long int pad24[23]; - unsigned long int reg2; - long int pad3[7]; - unsigned long int reg3; - long int pad4[63]; - unsigned long int reg22; - long int pad5[7]; - unsigned long int reg23; - long int pad6[15]; - unsigned long int reg4; - long int pad7[39]; - unsigned long int reg5; - long int pad8[87]; - dreg_cplx_t reg6; - dreg_cplx_t reg7; - dreg_cplx_t reg24; - long int pad9[5]; - unsigned long int reg8; - long int pad10[72]; - dreg_cplx_t reg37; - long int pad13[47]; - dreg_cplx_t reg9; - long int pad10a[62]; - dreg_cplx_t reg25; - long int pad11[23871]; - unsigned long int reg10; - unsigned long int reg11; - long int pad12[1]; - unsigned long int reg12; - unsigned long int reg35; - unsigned long int reg36; - unsigned long int reg13; - dreg_cplx_t reg14; - long int pad15[499704]; - dreg_cplx_t reg15; - dreg_cplx_t reg16; - dreg_cplx_t reg34; - long int pad17[61]; - dreg_cplx_t reg17; - dreg_cplx_t reg18; - long int pad18[4]; - unsigned long int reg26; - long int pad19[57]; - dreg_cplx_t reg19; - long int pad20[1]; - dreg_cplx_t reg20; - long int pad21[3]; - dreg_cplx_t reg21; - long int pad22[59]; - dreg_cplx_t reg27; - long int pad23[16189]; - dreg_cplx_t reg29; - unsigned long int reg30; - unsigned long int reg31; - long int pad25[5]; - unsigned long int reg38; - unsigned long int reg41; - unsigned long int reg42; - unsigned long int reg43; - unsigned long int reg44; - unsigned long int reg45; - long int pad26[1]; - unsigned long int reg32; - unsigned long int reg33; - long int pad27[55]; - unsigned long int reg39; - long int pad28[3]; - unsigned long int reg40; -} ngle_dregs_t; Index: xc/programs/Xserver/hw/hp/ngle/hyperScrn.c diff -u xc/programs/Xserver/hw/hp/ngle/hyperScrn.c:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/hyperScrn.c:removed --- xc/programs/Xserver/hw/hp/ngle/hyperScrn.c:1.1.1.2 Tue Jan 16 17:43:11 2001 +++ xc/programs/Xserver/hw/hp/ngle/hyperScrn.c Thu Feb 27 12:29:25 2003 @@ -1,266 +0,0 @@ -/* $Xorg: hyperScrn.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - - * - *************************************************************************/ - -/****************************************************************************** - * - * This file contains various global variables and routines concerning - * the Screen structure. This includes the ngleScreenInit routine. - * - ******************************************************************************/ - - -#include "ngle.h" - -Bool hyperResetPlanes( - NgleScreenPrivPtr pScreenPriv, - Card32 serverState); - -static void hyperUndoITE( - NgleScreenPrivPtr pScreenPriv); - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: hyperResetPlanes - * - * Description: - * - * This routine implements pNgleScreenInit->InitPlanes and - * pScreenPriv->ngleResetPlanes. It resets the image, overlay - * and attribute planes to a known state. This includes doing - * what is necessary to counteract what the ITE has done as well - * as supporting friendly boot operation. - * - * Assumptions: - * - * - default colormap has already been initialized and installed - * - fast-locking has been initialized. - * - * Does not assume a lock is in effect. - * - ******************************************************************************/ - -Bool hyperResetPlanes( - NgleScreenPrivPtr pScreenPriv, - Card32 serverState) -{ - NgleHdwPtr pDregs = (NgleHdwPtr) pScreenPriv->pDregs; - Card32 controlPlaneReg; - Card32 planeEnableMask; - - - NGLE_LOCK(pScreenPriv); - - if (IS_24_DEVICE(pScreenPriv)) - if (pScreenPriv->devDepth == 24) - controlPlaneReg = 0x04000F00; - else - controlPlaneReg = 0x00000F00; /* 0x00000800 should be enought, but lets clear all 4 bits */ - else - controlPlaneReg = 0x00000F00; /* 0x00000100 should be enought, but lets clear all 4 bits */ - - switch(serverState) - { - case SERVER_INIT: - /************************************************** - ** Need to clear screen - **************************************************/ - if (IS_24_DEVICE(pScreenPriv)) - ngleDepth24_ClearImagePlanes(pScreenPriv); - else - ngleDepth8_ClearImagePlanes(pScreenPriv); - - /* Paint attribute planes for default case. - * On Hyperdrive, this means all windows using overlay cmap 0. - */ - ngleResetAttrPlanes(pScreenPriv, controlPlaneReg); - - /* Clear overlay planes: - * - * If on Hyperdrive and doing Friendly Boot, we want a smooth - * transition when VUE starts up. There are 3 cases to worry - * about: 1) If only the friendly boot slate is visible on the - * screen and ITE console messages are not, then we need to clear - * the text planes so that the ITE messages don't flash on screen. - * This will create a smooth transition when the vuelogin window - * appears. 2) If only ITE console messages are visible and the - * friendly boot slate is not, then we need to clear the planes - * containing the slate. 3) If both the friendly boot slate and - * ITE console messages are visible, then we don't need to bother - * clearing any of the overlay planes. - * - * Side note: The above is correct if the default visual is in - * the overlays. If the default visual is in the image planes, - * then clear all of the overlay planes to prevent color flashing - * of slate which will happen when smooth cmap is installed in - * overlays. - * - * STI uses the upper 5 overlay planes for the friendly boot slate - * and the lower 3 overlay planes for ITE console messages. These - * planes are enabled/disabled via the FDR register on Marathon. - */ - - if ( pScreenPriv->myNum == 0 && pScreenPriv->devDepth == 8 ) - { /* isDefaultVisualInOverlays == TRUE */ - SETUP_HW(pDregs); /* Wait for hw to be ready */ - planeEnableMask = NGLE_READ32(pDregs->reg32); - - if ((planeEnableMask & 0xffff0000) == 0xf8f80000) - { - /* only slate is visible so need to clear text planes */ - ngleClearOverlayPlanes(pScreenPriv, 0x7, 0); - } - else if ((planeEnableMask & 0xffff0000) == 0x07070000) - { - /* only text is visible so need to clear slate planes */ - ngleClearOverlayPlanes(pScreenPriv, 0xf8, 0); - } - /* else if ((planeEnableMask & 0xffff0000) == 0xffff0000) */ - /* both slate and text are visible so clear isn't necessary */ - } - else - { - /* Not in friendly boot mode and/or default visual is - * in image planes so clear all overlay planes - */ - ngleClearOverlayPlanes(pScreenPriv, 0xff, 255); - } - - /************************************************** - ** Also need to counteract ITE settings - **************************************************/ - hyperUndoITE(pScreenPriv); - break; - - case SERVER_EXIT: - /************************************************** - ** Need to clear screen - **************************************************/ - if (IS_24_DEVICE(pScreenPriv)) - ngleDepth24_ClearImagePlanes(pScreenPriv); - else - ngleDepth8_ClearImagePlanes(pScreenPriv); - ngleResetAttrPlanes(pScreenPriv, controlPlaneReg); - ngleClearOverlayPlanes(pScreenPriv, 0xff, 0); - break; - - case SERVER_RECOVERY: - /************************************************** - ** Need to counteract ITE settings - **************************************************/ - hyperUndoITE(pScreenPriv); - - /************************************************** - * Reset attribute planes to known state - **************************************************/ - ngleResetAttrPlanes(pScreenPriv, controlPlaneReg); - break; - } - - NGLE_UNLOCK(pScreenPriv); - - return(TRUE); - -} /* hyperResetPlanes */ - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: hyperUndoITE - * - * Description: - * - * This local routine counteracts what the ITE has done on - * Hyperdrive. - * - * STI uses the upper 5 overlay planes for the friendly boot slate - * and the lower 3 overlay planes for ITE console messages. These - * planes are enabled/disabled via the FDR register on Marathon. - * - * ITE has set transparency enable mask to a non-zero - * value. Make sure that it's set to zero. Method is per - * Curtis McAllister. - * - * Before clearing the transparency, write zeroes to the overlay - * planes (to avoid flashing display of colors that are no longer - * transparent). - * - * Assumptions: - * - * Assumes fast-locking has been initialized. - * Does not assume a lock is in effect. - * - ******************************************************************************/ - -static void hyperUndoITE( - NgleScreenPrivPtr pScreenPriv) -{ - NgleHdwPtr pDregs; - Int32 nFreeFifoSlots = 0; - Card32 fbAddr; - - pDregs = (NgleHdwPtr) pScreenPriv->pDregs; - - NGLE_LOCK(pScreenPriv); - - - /********************************************** - * Display enable all overlay planes - **********************************************/ - - /* - * On Hyperdrive, plane enable done via FDR register on Marathon. - * Enable all planes (image and overlay). - */ - GET_FIFO_SLOTS(nFreeFifoSlots,1); - NGLE_WRITE32(pDregs->reg32,0xffffffff); - - - /********************************************** - * Write overlay transparency mask so only entry 255 is transparent - **********************************************/ - - /* Hardware setup for full-depth write to "magic" location */ - GET_FIFO_SLOTS(nFreeFifoSlots, 7); - NGLE_QUICK_SET_DST_BM_ACCESS( - BA(IndexedDcd, Otc04, Ots08, AddrLong, - BAJustPoint(0), BINovly, BAIndexBase(0))); - NGLE_QUICK_SET_IMAGE_BITMAP_OP( - IBOvals(RopSrc, MaskAddrOffset(0), - BitmapExtent08, StaticReg(FALSE), - DataDynamic, MaskOtc, BGx(FALSE), FGx(FALSE))); - - /* Now prepare to write to the "magic" location */ - fbAddr = (Card32) NGLE_LONG_FB_ADDRESS(0, 1532, 0); - NGLE_BINC_SET_DSTADDR(fbAddr); - NGLE_REALLY_SET_IMAGE_PLANEMASK(0xffffff); - NGLE_BINC_SET_DSTMASK(~0UL); - - /* Finally, write a zero to clear the mask */ - NGLE_BINC_WRITE32(0); - - NGLE_UNLOCK(pScreenPriv); - -} /* hyperUndoITE */ Index: xc/programs/Xserver/hw/hp/ngle/ngle.h diff -u xc/programs/Xserver/hw/hp/ngle/ngle.h:1.1.1.4 xc/programs/Xserver/hw/hp/ngle/ngle.h:removed --- xc/programs/Xserver/hw/hp/ngle/ngle.h:1.1.1.4 Tue Jan 16 17:43:12 2001 +++ xc/programs/Xserver/hw/hp/ngle/ngle.h Thu Feb 27 12:29:25 2003 @@ -1,121 +0,0 @@ -/* $Xorg: ngle.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - * - *************************************************************************/ - -#ifndef NGLE_H -#define NGLE_H - -/* Rummor has it that NDEBUG is defined by default in X build environment. - * It is used to activate assert statements (see /usr/include/assert.h). - * Compiling with the preprocessor option -DNDEBUG (see cpp(1)), or with - * the preprocessor control statement #define NDEBUG ahead of the - * #include <assert.h> statement, stops assertions from being compiled - * into the program. - */ - -#include <unistd.h> /* keys off _[POSIX|HPUX|XOPEN]_SOURCE */ -#include <stdlib.h> /* For prototype of getenv() */ -#include <stdio.h> -#include <errno.h> -#include <assert.h> /* For assert() statements */ -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/sysmacros.h> -#include <sys/framebuf.h> -#include <fcntl.h> - -#include "X.h" -#include "Xproto.h" - -#include "scrnintstr.h" -#include "cursorstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "colormapst.h" -#include "resource.h" -#include "opaque.h" - -/* included for the mi private structure */ -#include "mibstorest.h" - -#ifndef Card32 -#define Card32 unsigned int -#endif -#ifndef Int32 -#define Int32 int -#endif - -#ifndef Card16 -#define Card16 unsigned short -#endif -#ifndef Int16 -#define Int16 short -#endif - -#ifndef Card8 -#define Card8 unsigned char -#endif -#ifndef Int8 -#define Int8 char -#endif - -#include "ngleextern.h" -#include "dregs.h" -#include "ngledevrom.h" -#include "nglehdw.h" -#include "nglecursor.h" -#include "nglecopy.h" -#include "nglecolormap.h" -#include "nglenoop.h" -#include "hppriv.h" -#include "nglescreen.h" - - -# ifndef S9000_ID_TIMBER /* Bushmaster (710) Graphics */ -# define S9000_ID_TIMBER 0x27F12392 -# endif - -# ifndef S9000_ID_TOMCAT /* 2-headed ELK */ -# define S9000_ID_TOMCAT 0x27FCCB6D -# endif - -# ifndef CRX24_OVERLAY_PLANES /* Overlay planes on CRX24 */ -# define CRX24_OVERLAY_PLANES 0x920825AA -# endif - -# ifndef S9000_ID_ARTIST /* Artist (Gecko/712 & 715) Graphics */ -# define S9000_ID_ARTIST 0x2B4DED6D -# endif - -# ifndef S9000_ID_HCRX /* hyperdrive Graphics */ -# define S9000_ID_HCRX 0x2BCB015A -# endif - -#define hpGivingUp (dispatchException & DE_TERMINATE) - -#define MAX_BITS_PER_RGB 8 /* The maximum number of bits that any - of the DACs have on our hardware. */ - -#endif /* NGLE_H */ Index: xc/programs/Xserver/hw/hp/ngle/ngleblt.c diff -u xc/programs/Xserver/hw/hp/ngle/ngleblt.c:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/ngleblt.c:removed --- xc/programs/Xserver/hw/hp/ngle/ngleblt.c:1.1.1.2 Tue Jan 16 17:43:12 2001 +++ xc/programs/Xserver/hw/hp/ngle/ngleblt.c Thu Feb 27 12:29:25 2003 @@ -1,96 +0,0 @@ -/* $Xorg: ngleblt.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/* -**************************************************************************** -** DDX WINDOW ROUTINES -** -** (c) Copyright Hewlett-Packard Company, 1992. - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. -** -**************************************************************************** -*/ - -#include "ngle.h" - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleBitBlt - * - * Description: - * - * This is HP's version of the cfbDoBitBltCopy() routine. This enables - * fast scrolling. - * - ******************************************************************************/ -void ngleBitBlt ( - - DrawablePtr pSrcDraw, - DrawablePtr pDstDraw, - int alu, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long planeMask) -{ - BoxPtr pbox; - int nbox; - NgleScreenPrivPtr pScreenPriv; - NgleHdwPtr pDregs; - - /* get pointers so HP's private structures */ - pScreenPriv = NGLE_SCREEN_PRIV(pDstDraw->pScreen); - pDregs = (NgleHdwPtr) pScreenPriv->pDregs; - - - /* get a pointer and count of the boxes */ - pbox = REGION_RECTS(prgnDst); - nbox = REGION_NUM_RECTS(prgnDst); - - /* call the hardware blt routine for each box, but first set up the - * hardware - */ - SETUP_COPYAREA(pDregs); - - if (pScreenPriv->devDepth == 24) - /* do the if statement at this level for performance reasons */ - { - while (nbox--) - { - ngleDepth24_CopyAreaFromToScreen(pSrcDraw, pDstDraw, - pptSrc->x, pptSrc->y, pbox, alu, planeMask); - - pbox++; - pptSrc++; - } - } - else - { - while (nbox--) - { - ngleDepth8_CopyAreaFromToScreen(pSrcDraw, pDstDraw, - pptSrc->x, pptSrc->y, pbox, alu, planeMask); - - pbox++; - pptSrc++; - } - } - - /* Now restore the hardware state so the CFB driver can use it */ - SETUP_FB(pDregs, pScreenPriv->deviceID,pScreenPriv->devDepth); -} Index: xc/programs/Xserver/hw/hp/ngle/nglecolormap.c diff -u xc/programs/Xserver/hw/hp/ngle/nglecolormap.c:1.3 xc/programs/Xserver/hw/hp/ngle/nglecolormap.c:removed --- xc/programs/Xserver/hw/hp/ngle/nglecolormap.c:1.3 Wed Jan 17 17:36:49 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglecolormap.c Thu Feb 27 12:29:25 2003 @@ -1,795 +0,0 @@ -/* $Xorg: nglecolormap.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - * - *************************************************************************/ - -/****************************************************************************** - * - * DDX entry points relating to color for NGLE driver: - * - * ngleLoadCursorColormap() - * ngleCreateDefColormap() - * ngleCreateColormap() - * ngleInstallColormap() - * ngleStoreColors() - * ngleListInstalledColormaps() - * ngleUninstallColormap() - * ngleDestroyColormap() - * - ******************************************************************************/ - -#include "ngle.h" - -extern NgleLutBltCtl setNgleLutBltCtl( - Card32 deviceID, - Int32 devDepth, - Card32 offsetWithinLut, - Card32 length); /* #entries to update */ - -extern NgleLutBltCtl setHyperLutBltCtl( - Card32 deviceID, - Int32 devDepth, - Card32 offsetWithinLut, - Card32 length); /* #entries to update */ - -/* Gray Scale support: calculate intensity from rgb using NTSC weights */ -#define CALCULATE_GRAYSCALE_INTENSITY(intensity, red8, grn8, blu8) \ -{ \ - intensity = (Card8) \ - ( (float) ((red8) & 0xff) * 0.30 \ - + (float) ((grn8) & 0xff) * 0.59 \ - + (float) ((blu8) & 0xff) * 0.11 \ - ); \ - intensity &= 0xff; \ -} - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleLoadCursorColormap() - * - * Description: - * - * This routine is called by ngleDisplayCursor and ngleRecolorCursor - * to load into the NGLE hardware the 2-entry colormap for cursors. - * - * This procedure is internal to the NGLE driver: it is not - * called from outside the driver, neither directly nor indirectly - * through a procedure table. - * - ******************************************************************************/ - -void ngleLoadCursorColormap( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - NgleHdwPtr pDregs = pScreenPriv->pDregs; - Card32 color; - Card8 intensity; - - - /* Set up for drawing to the off-screen colormap table */ - START_CURSOR_COLORMAP_ACCESS(pDregs); - - /* X11 stores each R/G/B of a color in unsigned shorts (16 bits). - * Scale to 8 bits and place in lower 24 bits of color. - */ - if (pScreenPriv->isGrayScale) - { - CALCULATE_GRAYSCALE_INTENSITY(intensity, - (pCursor->backRed >> 8), - (pCursor->backGreen >> 8), - (pCursor->backBlue >> 8)); - /* Replicate intensity to red, green, and blue */ - color = (Card32) - ( (intensity << 16) - | (intensity << 8) - | intensity - ); - WRITE_CURSOR_COLOR(pDregs,color); - - CALCULATE_GRAYSCALE_INTENSITY(intensity, - (pCursor->foreRed >> 8), - (pCursor->foreGreen >> 8), - (pCursor->foreBlue >> 8)); - /* Replicate intensity to red, green, and blue */ - color = (Card32) - ( (intensity << 16) - | (intensity << 8) - | intensity - ); - WRITE_CURSOR_COLOR(pDregs,color); - } - else - { - color = ( ((Card32) (pCursor->backRed & 0xff00) << 8) - | (Card32) (pCursor->backGreen & 0xff00) - | (Card32) (pCursor->backBlue >> 8) - ); - WRITE_CURSOR_COLOR(pDregs,color); - - color = ( ((Card32) (pCursor->foreRed & 0xff00) << 8) - | (Card32) (pCursor->foreGreen & 0xff00) - | (Card32) (pCursor->foreBlue >> 8)); - WRITE_CURSOR_COLOR(pDregs,color); - } - - FINISH_CURSOR_COLORMAP_ACCESS(pDregs,pScreenPriv->deviceID, - pScreenPriv->devDepth); - -} /* ngleLoadCursorColormap() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleCreateDefColormap - * - * Description: Create a default colormap for the given screen's root window. - * - * Called by: DDX procedure ngleScreenInit - * - * Creates default colormap, initializes all of its entries, - * installs it into hardware, then points pScreen->defColormap to it. - * - ******************************************************************************/ - -Bool -ngleCreateDefColormap( - ScreenPtr pScreen) -{ - VisualPtr pVisual; - ColormapPtr pColormap; - unsigned short red_zero = 0, red_ones = ~0; - unsigned short green_zero = 0, green_ones = ~0; - unsigned short blue_zero = 0, blue_ones = ~0; - - /* Scan the table of visuals for this screen, looking for the - * rootVisual. - */ - for (pVisual = pScreen->visuals; - pVisual->vid != pScreen->rootVisual; - pVisual++) - ; - - /* Create a colormap, not allocating (reserving) any entries. */ - if (CreateColormap (pScreen->defColormap, pScreen, pVisual, - &pColormap, AllocNone, 0) != Success) - { - return FALSE; - } - - /* Reserve entries for black and white */ - if (AllocColor (pColormap, &red_zero, &green_zero, &blue_zero, - &(pScreen->blackPixel), 0) - || AllocColor(pColormap, &red_ones, &green_ones, &blue_ones, - &(pScreen->whitePixel), 0)) - { - FatalError("Unable to reserve black and white pixels.\n"); - } - - /* Install initialized colormap as default into hardware. */ - ngleInstallColormap(pColormap); - - return(TRUE); -} /* ngleCreateDefColormap() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleCreateColormap() - * - * Description: Perform device-specific initialization of new colormap. - * - * Entry: pmap points to the colormap in question - * - * Return Value: None - * - * Called by: DIX CreateColormap - * - ******************************************************************************/ - -Bool -ngleCreateColormap( - ColormapPtr pmap) -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pmap->pScreen); - xColorItem localColor; - int i; - VisualPtr pVisual = pmap->pVisual; - - localColor.flags = DoRed | DoGreen | DoBlue; - - if (pVisual->class == DirectColor ) - { - for (i = 0; i < pVisual->ColormapEntries; i++) - { - localColor.pixel = i << pVisual->offsetBlue - | i << pVisual->offsetGreen - | i << pVisual->offsetRed; - - localColor.red = pmap->red[i].co.local.red = i << 8; - localColor.green = pmap->green[i].co.local.green = i << 8; - localColor.blue = pmap->blue[i].co.local.blue = i << 8; - - ngleStoreColors(pmap, 1, &localColor); - } - } - else if (pVisual->class == PseudoColor ) - { - if (pScreenPriv->isGrayScale) - { - for(i = 0; i < pVisual->ColormapEntries; i++) - { - localColor.pixel = i; - localColor.red = pmap->red[i].co.local.red = i << 8; - localColor.green = pmap->red[i].co.local.green = i << 8; - localColor.blue = pmap->red[i].co.local.blue = i << 8; - - ngleStoreColors(pmap, 1, &localColor); - } - } - else - { - for(i = 0; i < pVisual->ColormapEntries; i++) - { - localColor.pixel = i; - localColor.red = pmap->red[i].co.local.red = (i & 0x7) << 13; - localColor.green = pmap->red[i].co.local.green = (i & 0x38) << 10; - localColor.blue = pmap->red[i].co.local.blue = (i & 0xc0) << 8; - - ngleStoreColors(pmap, 1, &localColor); - } - } - } - else - { - ErrorF("ngleCreateColormap: Unsupported visual type\n"); - } - - return(TRUE); -} /* ngleCreateColormap() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleInstallColormap() - * - * Description: Install given colormap into hardware. - * - * Results: - * None - * - * Side Effects: - * All clients requesting ColormapNotify are notified - * Colormap is installed into NGLE hardware - * - ******************************************************************************/ - -void ngleInstallColormap( - ColormapPtr cmap) -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(cmap->pScreen); - NgleHdwPtr pDregs = pScreenPriv->pDregs; - unsigned int i; - Card32 color; - int nColormapEntries = cmap->pVisual->ColormapEntries; - Card8 intensity; - unsigned short red, green, blue; - - - /* We do not need to install if this is the current map. - * it's already installed. - */ - if (cmap == pScreenPriv->installedMap) - return; - - - /* If uninstalling an explicitly installed map, tell everybody */ - if (pScreenPriv->installedMap) - { - WalkTree(pScreenPriv->installedMap->pScreen, TellLostMap, - (char *) &(pScreenPriv->installedMap->mid)); - } - - /* setup colormap hardware */ - START_IMAGE_COLORMAP_ACCESS(pDregs); - - /* Load each colormap entry into shadow RAM */ - - if (cmap->pVisual->class == DirectColor) - { - for (i=0; i < nColormapEntries; i++) - { - if (cmap->red[i].fShared) - red = cmap->red[i].co.shco.red->color; - else - red = cmap->red[i].co.local.red; - - if (cmap->green[i].fShared) - green = cmap->green[i].co.shco.green->color; - else - green = cmap->green[i].co.local.green; - - if (cmap->blue[i].fShared) - blue = cmap->blue[i].co.shco.blue->color; - else - blue = cmap->blue[i].co.local.blue; - - if (!pScreenPriv->isGrayScale) - { - color = ( ((Card32) (red & 0xff00) << 8) - | (Card32) (green & 0xff00) - | ((Card32) (blue & 0xff00) >> 8) - ); - } - else - { /* Gray Scale */ - CALCULATE_GRAYSCALE_INTENSITY(intensity, - (red >> 8), - (green >> 8), - (blue >> 8)); - color = intensity | (intensity << 8) | (intensity << 16); - } - - pScreenPriv->hwColors[i] = color; - - WRITE_IMAGE_COLOR(pDregs,i,color); - } - } - else /* PseudoColor */ - { - for (i=0; i < nColormapEntries; i++) - { - if (cmap->red[i].fShared) - { - red = cmap->red[i].co.shco.red->color; - green = cmap->red[i].co.shco.green->color; - blue = cmap->red[i].co.shco.blue->color; - } - else if (cmap->red[i].refcnt != 0) - { - red = cmap->red[i].co.local.red; - green = cmap->red[i].co.local.green; - blue = cmap->red[i].co.local.blue; - } - else - { - /* take it apart, so it can be put together again */ - red = (pScreenPriv->hwColors[i] & 0xff0000) >> 8; - green = (pScreenPriv->hwColors[i] & 0x00ff00); - blue = (pScreenPriv->hwColors[i] & 0x0000ff) << 8; - } - - if (!pScreenPriv->isGrayScale) - { - color = ( ((Card32) (red & 0xff00) << 8) - | (Card32) (green & 0xff00) - | ((Card32) (blue & 0xff00) >> 8) - ); - } - else - { /* Gray Scale */ - CALCULATE_GRAYSCALE_INTENSITY(intensity, - (red >> 8), - (green >> 8), - (blue >> 8)); - color = intensity | (intensity << 8) | (intensity << 16); - } - - pScreenPriv->hwColors[i] = color; - - WRITE_IMAGE_COLOR(pDregs,i,color); - } - } - - if (pScreenPriv->deviceID == S9000_ID_HCRX) - { - NgleLutBltCtl lutBltCtl; - - lutBltCtl = setHyperLutBltCtl(pScreenPriv->deviceID, - pScreenPriv->devDepth, - 0, /* Offset w/i LUT */ - 256); /* Load entire LUT */ - NGLE_BINC_SET_SRCADDR((Card32) - NGLE_LONG_FB_ADDRESS(0, 0x100, 0)); /* 0x100 is same as used in - * WRITE_IMAGE_COLOR() */ - START_COLORMAPLOAD(lutBltCtl.all); - SETUP_FB(pDregs, pScreenPriv->deviceID, pScreenPriv->devDepth); - } - else - { - /* cleanup colormap hardware */ - FINISH_IMAGE_COLORMAP_ACCESS(pDregs,pScreenPriv->deviceID, - pScreenPriv->devDepth); - } - - pScreenPriv->installedMap = cmap; - WalkTree(cmap->pScreen, TellGainedMap, (char *) &(cmap->mid)); - -} /* ngleInstallColormap() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleStoreColors() - * - * Description: Sets the pixels in pdefs into the specified map. - * - * If the colormap being updated has been loaded into the - * NGLE hardware, update there as well. - * - * Results: - * None - * - * Parameters: - * Colors in xColorItem *pDefs are Card16's (not Card8s); - * Must be shifted right 8 before loading into 8 bit DAC. - * - * Side Effects: - * Hardware updated if colormap loaded. - * - * Note on Gray Scale: - * Intensity calculation of using a RGB weighting of (.3,.59,.11) - * is the NTSC weighting formula. - * - ******************************************************************************/ - -void -ngleStoreColors( - ColormapPtr pmap, - int ndef, - xColorItem *pdefs) -{ - Card32 index; - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pmap->pScreen); - short intensity; /* gray scale */ - NgleHdwPtr pDregs = pScreenPriv->pDregs; - Card32 color; - VisualPtr pVisual = pmap->pVisual; - int i; - - - /* We do not need to update HW if this is not the current map. - */ - if (pmap != pScreenPriv->installedMap) - return; - - /* setup colormap hardware */ - START_IMAGE_COLORMAP_ACCESS(pDregs); - - if (pVisual->class == DirectColor) - { - for (i = 0; i < ndef; i++) - { - if ((pdefs+i)->flags & DoRed) - { - index = ((pdefs+i)->pixel & pVisual->redMask) - >> pVisual->offsetRed; - color = pScreenPriv->hwColors[index]; - color = ((((pdefs+i)->red) << 8) & 0xff0000) | (color & 0xffff); - pScreenPriv->hwColors[index] = color; - - WRITE_IMAGE_COLOR(pDregs, index, color); - } - if ((pdefs+i)->flags & DoGreen) - { - index = ((pdefs+i)->pixel & pVisual->greenMask) - >> pVisual->offsetGreen; - color = pScreenPriv->hwColors[index]; - color = (((pdefs+i)->green) & 0xff00) | (color & 0xff00ff); - pScreenPriv->hwColors[index] = color; - - WRITE_IMAGE_COLOR(pDregs, index, color); - } - if ((pdefs+i)->flags & DoBlue) - { - index = ((pdefs+i)->pixel & pVisual->blueMask) - >> pVisual->offsetBlue; - color = pScreenPriv->hwColors[index]; - color = ((((pdefs+i)->blue) >> 8) & 0xff) | (color & 0xffff00); - pScreenPriv->hwColors[index] = color; - - WRITE_IMAGE_COLOR(pDregs, index, color); - } - } - } - else /* PseudoColor */ - { - while (ndef--) - { - index = pdefs->pixel&0xff; - - if (!pScreenPriv->isGrayScale) - { - color = pScreenPriv->hwColors[index]; - - if( pdefs->flags & DoRed) - { - color = (((pdefs->red) << 8) & 0xff0000) | (color & 0xffff); - } - if( pdefs->flags & DoGreen) - { - color = ((pdefs->green) & 0xff00) | (color & 0xff00ff); - } - if( pdefs->flags & DoBlue) - { - color = (((pdefs->blue) >> 8) & 0xff) | (color & 0xffff00); - } - } - else - { /* Gray Scale */ - if ((pdefs->flags & DoRed) - || (pdefs->flags & DoGreen) - || (pdefs->flags & DoBlue)) - { - CALCULATE_GRAYSCALE_INTENSITY(intensity, - ((pdefs->red) >> 8), - ((pdefs->green) >> 8), - ((pdefs->blue) >> 8)); - - color = intensity | (intensity << 8) | (intensity << 16); - } - } - - pScreenPriv->hwColors[index] = color; - - WRITE_IMAGE_COLOR(pDregs,index,color); - - pdefs++; - } - } - - if (pScreenPriv->deviceID == S9000_ID_HCRX) - { - NgleLutBltCtl lutBltCtl; - - lutBltCtl = setHyperLutBltCtl(pScreenPriv->deviceID, - pScreenPriv->devDepth, - 0, /* Offset w/i LUT */ - 256); /* Load entire LUT */ - NGLE_BINC_SET_SRCADDR((Card32) - NGLE_LONG_FB_ADDRESS(0, 0x100, 0)); /* 0x100 is same as used in - * WRITE_IMAGE_COLOR() */ - START_COLORMAPLOAD(lutBltCtl.all); - SETUP_FB(pDregs, pScreenPriv->deviceID, pScreenPriv->devDepth); - } - else - { - /* cleanup colormap hardware */ - FINISH_IMAGE_COLORMAP_ACCESS(pDregs,pScreenPriv->deviceID, - pScreenPriv->devDepth); - } - -} /* ngleStoreColors() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleListInstalledColormaps() - * - * Description: Fills in the list with the IDs of the installed maps. - * - * Results: - * Returns the number of IDs in the list - * - * Side Effects: - * None - * - ******************************************************************************/ - -int -ngleListInstalledColormaps( - ScreenPtr pScreen, - Colormap *pCmapList) -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - - *pCmapList = pScreenPriv->installedMap->mid; - return (1); -} /* ngleListInstalledColormaps() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleUninstallColormap() - * - * Description: If given colormap installed, uninstall it. - * If the colormap's visual is the default (root) visual, - * take care that _some_ colormap is installed: - * if cmap is default colormap, leave installed, - * else install default colormap. - * Caveat: - * It is possible to receive a request to uninstall a colormap that - * is not installed. In this case, ngleUninstallColormap will mark - * the colormap as uninstalled and return correctly. - * - * Results: - * None - * - * Side Effects: - * All clients requesting ColormapNotify are notified - * - ******************************************************************************/ - -void -ngleUninstallColormap( ColormapPtr cmap) -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(cmap->pScreen); - - if (cmap == pScreenPriv->installedMap) - { - Colormap defMapID = cmap->pScreen->defColormap; - - /* Don't uninstall default colormap */ - if (cmap->mid != defMapID) - { - ColormapPtr defMap = - (ColormapPtr) LookupIDByType(defMapID, RT_COLORMAP); - - if (defMap) - ngleInstallColormap(defMap); - else - ErrorF("ngleUninstallColormap: ", - "Can't find default colormap\n"); - } - } -} /* ngleUninstallColormap() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleDestroyColormap() - * - * Description: Perform device-specific operations to destroy a colormap. - * - * Entry: pmap points to the colormap of interest. - * - * Return Value: none - * - * Called by: DIX DestroyColormap routine - * - ******************************************************************************/ - -void -ngleDestroyColormap( - ColormapPtr pmap -) -{ - return; -} /* ngleDestroyColormap */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleResolvePseudoColor() - * - * Description: Normalize colors to device. - * - ******************************************************************************/ - -void -ngleResolvePseudoColor( - Card16 *pRed, - Card16 *pGreen, - Card16 *pBlue, - VisualPtr pVisual) -{ - unsigned short mask; - unsigned short bits = pVisual->bitsPerRGBValue; - unsigned short mult = 0xffff / ((1 << bits) - 1); - unsigned short round = (1 << ( 16 - pVisual->bitsPerRGBValue))/ 2; - - - /* - * Now we need to figure out how many bits/rgb this visual - * (hardware) has and then normalize the request value to that. - */ - - mask = ((1 << bits) - 1) << (MAX_BITS_PER_RGB - bits); - *pRed = ((*pRed) - (*pRed >> pVisual->bitsPerRGBValue)) + round; - *pGreen = ((*pGreen) - (*pGreen >> pVisual->bitsPerRGBValue)) + round; - *pBlue = ((*pBlue) - (*pBlue >> pVisual->bitsPerRGBValue)) + round; - - *pRed = mult * ((((*pRed) >> MAX_BITS_PER_RGB ) & mask) >> - (MAX_BITS_PER_RGB - bits)); - *pGreen = mult * ((((*pGreen) >> MAX_BITS_PER_RGB ) & mask) >> - (MAX_BITS_PER_RGB - bits)); - *pBlue = mult * ((((*pBlue) >> MAX_BITS_PER_RGB ) & mask) >> - (MAX_BITS_PER_RGB - bits)); - - return; - -} /* ngleResolvePseudoColor() */ - - -NgleLutBltCtl setNgleLutBltCtl( - Card32 deviceID, - Int32 devDepth, - Card32 offsetWithinLut, - Card32 length) /* #entries to update */ -{ - NgleLutBltCtl lutBltCtl; - - /* set enable, zero reserved fields */ - lutBltCtl.all = 0x80000000; - - lutBltCtl.fields.length = length; - - if (deviceID == S9000_ID_A1439A) /* CRX24 */ - { - if (devDepth == 8) - { - lutBltCtl.fields.lutType = NGLE_CMAP_OVERLAY_TYPE; - lutBltCtl.fields.lutOffset = 0; - } - else - { - lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE; - lutBltCtl.fields.lutOffset = 0 * 256; - } - } - else if (deviceID == S9000_ID_ARTIST) - { - lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE; - lutBltCtl.fields.lutOffset = 0 * 256; - } - else - { - lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE; - lutBltCtl.fields.lutOffset = 0; - } - - /* Offset points to start of LUT. Adjust for within LUT */ - lutBltCtl.fields.lutOffset += offsetWithinLut; - - return(lutBltCtl); - -} /* setNgleLutBltCtl() */ - -NgleLutBltCtl setHyperLutBltCtl( - Card32 deviceID, - Int32 devDepth, - Card32 offsetWithinLut, - Card32 length) /* #entries to update */ -{ - NgleLutBltCtl lutBltCtl; - - /* set enable, zero reserved fields */ - lutBltCtl.all = 0x80000000; - - lutBltCtl.fields.length = length; - lutBltCtl.fields.lutType = HYPER_CMAP_TYPE; - - /* Expect lutIndex to be 0 or 1 for image cmaps, 2 or 3 for overlay cmaps*/ - if (devDepth == 8) - lutBltCtl.fields.lutOffset = 2 * 256; - else - lutBltCtl.fields.lutOffset = 0 * 256; - - /* Offset points to start of LUT. Adjust for within LUT */ - lutBltCtl.fields.lutOffset += offsetWithinLut; - - return(lutBltCtl); - -} /* setHyperLutBltCtl() */ Index: xc/programs/Xserver/hw/hp/ngle/nglecolormap.h diff -u xc/programs/Xserver/hw/hp/ngle/nglecolormap.h:1.1.1.3 xc/programs/Xserver/hw/hp/ngle/nglecolormap.h:removed --- xc/programs/Xserver/hw/hp/ngle/nglecolormap.h:1.1.1.3 Tue Jan 16 17:43:13 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglecolormap.h Thu Feb 27 12:29:25 2003 @@ -1,84 +0,0 @@ -/* $Xorg: nglecolormap.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - * - *************************************************************************/ - -/****************************************************************************** - * - * Defines shared structure NgleDisplayRec as well as - * DDX-specific entry points relating to color for NGLE driver. - * - ******************************************************************************/ - -#ifndef NGLECOLORMAP_H -#define NGLECOLORMAP_H - -#define HYPER_CMAP_TYPE 0 -#define NGLE_CMAP_INDEXED0_TYPE 0 -#define NGLE_CMAP_OVERLAY_TYPE 3 - -/* Typedef of LUT (Colormap) BLT Control Register */ -typedef union -{ /* Note assumption that fields are packed left-to-right */ - unsigned long all; - struct - { - unsigned enable : 1; - unsigned waitBlank : 1; - unsigned reserved1 : 4; - unsigned lutOffset : 10; /* Within destination LUT */ - unsigned lutType : 2; /* Cursor, image, overlay */ - unsigned reserved2 : 4; - unsigned length : 10; - } fields; -} NgleLutBltCtl; - -extern void ngleInstallColormap( - ColormapPtr pColormap); - -extern void ngleUninstallColormap( - ColormapPtr pColormap); - -extern int ngleListInstalledColormaps( - ScreenPtr pScreen, - Colormap *pCmapList); - -extern void ngleStoreColors( - ColormapPtr pCmap, - int ndef, - xColorItem *pdefs); - -extern Bool ngleCreateColormap( - ColormapPtr pCmap); - -extern void ngleDestroyColormap( - ColormapPtr pCmap); - -extern void ngleResolvePseudoColor( - Card16 *pRed, - Card16 *pGreen, - Card16 *pBlue, - VisualPtr pVisual); - - -#endif /* NGLECOLORMAP_H */ Index: xc/programs/Xserver/hw/hp/ngle/nglecopy.c diff -u xc/programs/Xserver/hw/hp/ngle/nglecopy.c:1.1.1.3 xc/programs/Xserver/hw/hp/ngle/nglecopy.c:removed --- xc/programs/Xserver/hw/hp/ngle/nglecopy.c:1.1.1.3 Tue Jan 16 17:43:13 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglecopy.c Thu Feb 27 12:29:25 2003 @@ -1,154 +0,0 @@ -/* $Xorg: nglecopy.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/* -**************************************************************************** -** DDX WINDOW ROUTINES -** -** (c) Copyright Hewlett-Packard Company, 1992. -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. -** -**************************************************************************** -*/ - -#include "ngle.h" - -/* Extern decalarations for CFB routines */ -/* Depth 8 CFB functions */ -extern int cfbDoBitbltGeneral(); -extern int cfbDoBitbltCopy(); -extern int cfbDoBitbltXor(); -extern int cfbDoBitbltOr(); -extern RegionPtr cfbBitBlt(); - -/* Depth 24 CFB functions */ -extern int cfb32DoBitbltGeneral(); -extern int cfb32DoBitbltCopy(); -extern int cfb32DoBitbltXor(); -extern int cfb32DoBitbltOr(); -extern RegionPtr cfb32BitBlt(); - -/* Ngle routines */ - -extern int ngleBitBlt(); - -/*************************************************************************** - * - * ngleCopyArea8() - * - * This routine is a replacement for cfbCopyArea(), to allow us to - * call our own block move routine when we are in the scrolling - * case. - * - *************************************************************************** - */ - -RegionPtr ngleCopyArea8(pSrcDrawable, pDstDrawable, - pGC, srcx, srcy, width, height, dstx, dsty) - register DrawablePtr pSrcDrawable; - register DrawablePtr pDstDrawable; - GC *pGC; - int srcx, srcy; - int width, height; - int dstx, dsty; -{ - int (*doBitBlt) (); - - doBitBlt = cfbDoBitbltCopy; - - if (( pSrcDrawable == pDstDrawable) && - (pSrcDrawable->type == DRAWABLE_WINDOW) && - (pDstDrawable->type == DRAWABLE_WINDOW)) - { - doBitBlt = ngleBitBlt; - } - - if (pGC->alu != GXcopy || (pGC->planemask & 0xff) != 0xff) - { - doBitBlt = cfbDoBitbltGeneral; - if ((pGC->planemask & 0xff) == 0xff) - { - switch (pGC->alu) { - case GXxor: - doBitBlt = cfbDoBitbltXor; - break; - case GXor: - doBitBlt = cfbDoBitbltOr; - break; - } - } - } - - return cfbBitBlt (pSrcDrawable, pDstDrawable, - pGC, srcx, srcy, width, height, dstx, dsty, doBitBlt, 0); -} - - -/*************************************************************************** - * - * ngleCopyArea24() - * - * This routine is a replacement for cfb32CopyArea(), to allow us to - * call our own block move routine when we are in the scrolling - * case. - * - *************************************************************************** - */ - -#ifndef LOWMEMFTPT - -RegionPtr ngleCopyArea24(pSrcDrawable, pDstDrawable, - pGC, srcx, srcy, width, height, dstx, dsty) - register DrawablePtr pSrcDrawable; - register DrawablePtr pDstDrawable; - GC *pGC; - int srcx, srcy; - int width, height; - int dstx, dsty; -{ - int (*doBitBlt) (); - - doBitBlt = cfb32DoBitbltCopy; - - if (( pSrcDrawable == pDstDrawable) && - (pSrcDrawable->type == DRAWABLE_WINDOW) && - (pDstDrawable->type == DRAWABLE_WINDOW)) - { - doBitBlt = ngleBitBlt; - } - - if (pGC->alu != GXcopy || (pGC->planemask & 0xffffffff) != 0xffffffff) - { - doBitBlt = cfb32DoBitbltGeneral; - if ((pGC->planemask & 0xffffffff) == 0xffffffff) - { - switch (pGC->alu) { - case GXxor: - doBitBlt = cfb32DoBitbltXor; - break; - case GXor: - doBitBlt = cfb32DoBitbltOr; - break; - } - } - } - - return cfb32BitBlt (pSrcDrawable, pDstDrawable, - pGC, srcx, srcy, width, height, dstx, dsty, doBitBlt, 0); -} - -#endif /* ifndef LOWMEMFTPT */ Index: xc/programs/Xserver/hw/hp/ngle/nglecopy.h diff -u xc/programs/Xserver/hw/hp/ngle/nglecopy.h:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/nglecopy.h:removed --- xc/programs/Xserver/hw/hp/ngle/nglecopy.h:1.1.1.2 Tue Jan 16 17:43:14 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglecopy.h Thu Feb 27 12:29:25 2003 @@ -1,39 +0,0 @@ -/* $Xorg: nglecopy.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - * - *************************************************************************/ - -#ifndef NGLECOPY -#define NGLECOPY - -/* - ****************************************************************************** - ** - ** Extern declarations - ** - ****************************************************************************** - */ - -extern RegionPtr ngleCopyArea8(); -extern RegionPtr ngleCopyArea24(); - -#endif /* NGLECOPY */ Index: xc/programs/Xserver/hw/hp/ngle/nglecursor.c diff -u xc/programs/Xserver/hw/hp/ngle/nglecursor.c:1.1.1.4 xc/programs/Xserver/hw/hp/ngle/nglecursor.c:removed --- xc/programs/Xserver/hw/hp/ngle/nglecursor.c:1.1.1.4 Tue Jan 16 17:43:14 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglecursor.c Thu Feb 27 12:29:25 2003 @@ -1,1037 +0,0 @@ -/* $Xorg: nglecursor.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - * - *************************************************************************/ - -/****************************************************************************** - * - * This file contains various procedures that implement cursor - * functionality (for both sprites and echoes). - * - ******************************************************************************/ - -#include "ngle.h" - -extern WindowPtr *WindowTable; -extern int hpActiveScreen; /* input driver global */ - -/* Defined in nglecolormap.c: */ -extern void ngleLoadCursorColormap( - ScreenPtr pScreen, - CursorPtr pCursor); - - - -/****************************************************************************** - * - * NGLE DDX Procedure: hyperInitSprite() - * - * Description: - * - * This routine is called at ScreenInit() time to initialize various - * cursor/sprite structures and the NGLE sprite code. - * - ******************************************************************************/ - -Bool hyperInitSprite( - ScreenPtr pScreen) -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - hpPrivPtr php = (hpPrivPtr)pScreen->devPrivate; - NgleHdwPtr pDregs = pScreenPriv->pDregs; - Int32 nScanlinesToZero; - Int32 curaddr; - Int32 nFreeFifoSlots = 0; - - NGLE_LOCK(pScreenPriv); - - /* Initialize the pScreen Cursor Procedure Pointers: */ - pScreen->PointerNonInterestBox = ngleNoop; - pScreen->CursorLimits = hpCursorLimits; - pScreen->ConstrainCursor = hpConstrainCursor; - pScreen->DisplayCursor = hyperDisplayCursor; - pScreen->SetCursorPosition = hpSetCursorPosition; - pScreen->RealizeCursor = ngleNoopTrue; - pScreen->UnrealizeCursor = ngleNoopTrue; - pScreen->RecolorCursor = ngleRecolorCursor; - - - /* Initialize the Cursor Procedure Pointers: */ - php->MoveMouse = ngleMoveSprite; - php->ChangeScreen = ngleChangeScreen; - php->CursorOff = ngleDisableSprite; - - /* Initialize the pScreenPriv->sprite Structure: */ - pScreenPriv->sprite.visible = FALSE; - pScreenPriv->sprite.x = (pScreenPriv->screenWidth >> 1); - pScreenPriv->sprite.y = (pScreenPriv->screenHeight >> 1); - pScreenPriv->sprite.width = 0; - pScreenPriv->sprite.height = 0; - pScreenPriv->sprite.pCursor = NULL; - pScreenPriv->sprite.firstCallTo_DisplayCursor = TRUE; - pScreenPriv->sprite.nTopPadLines = 0; - pScreenPriv->sprite.moveOnVBlank = FALSE; - - /* Zero out cursor mask and data: - * Each load of cursor data/mask will write minimum necessary - * to overwrite previous cursor. - */ - /* Zero out 64 bits (2 longs) in each mask scanline */ - nScanlinesToZero = NGLE_MAX_SPRITE_SIZE; - - /* to protect against VID bus data loss */ - SETUP_HW(pDregs); - - GET_FIFO_SLOTS(nFreeFifoSlots,2); - HYPER_GET_VID_BUS_ACCESS; - - /* Write to mask area */ - HYPER_SET_CURSOR_ADDRESS(0); - do - { - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - HYPER_WRITE_CURSOR_DATA(0); - HYPER_WRITE_CURSOR_DATA(0); - } while (--nScanlinesToZero); - - /* Zero out 64 bits (2 longs) in each data scanline */ - nScanlinesToZero = NGLE_MAX_SPRITE_SIZE; - GET_FIFO_SLOTS(nFreeFifoSlots, 1); - HYPER_SET_CURSOR_ADDRESS(HYPER_CURSOR_DATA_BIT); - do - { - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - HYPER_WRITE_CURSOR_DATA(0); - HYPER_WRITE_CURSOR_DATA(0); - } while (--nScanlinesToZero); - - NGLE_UNLOCK(pScreenPriv); - - return(TRUE); - -} /* hyperInitSprite() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleInitSprite() - * - * Description: - * - * This routine is called at ScreenInit() time to initialize various - * cursor/sprite structures and the NGLE sprite code. - * - ******************************************************************************/ - -Bool ngleInitSprite(pScreen) - - - ScreenPtr pScreen; -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - hpPrivPtr php = (hpPrivPtr)pScreen->devPrivate; - NgleHdwPtr pDregs = pScreenPriv->pDregs; - NgleDevRomDataPtr pDevRomData = pScreenPriv->pDevRomData; - Int32 nScanlinesToZero; - - - /* Initialize the pScreen Cursor Procedure Pointers: */ - pScreen->PointerNonInterestBox = ngleNoop; - pScreen->CursorLimits = hpCursorLimits; - pScreen->ConstrainCursor = hpConstrainCursor; - pScreen->SetCursorPosition = hpSetCursorPosition; - pScreen->DisplayCursor = ngleDisplayCursor; - pScreen->RealizeCursor = ngleNoopTrue; - pScreen->UnrealizeCursor = ngleNoopTrue; - pScreen->RecolorCursor = ngleRecolorCursor; - - - /* Initialize the HP private Cursor Procedure Pointers: */ - php->MoveMouse = ngleMoveSprite; - php->ChangeScreen = ngleChangeScreen; - php->CursorOff = ngleDisableSprite; - - /* Initialize the pScreenPriv->sprite Structure: */ - pScreenPriv->sprite.visible = FALSE; - pScreenPriv->sprite.x = (pScreenPriv->screenWidth >> 1); - pScreenPriv->sprite.y = (pScreenPriv->screenHeight >> 1); - pScreenPriv->sprite.width = 0; - pScreenPriv->sprite.height = 0; - pScreenPriv->sprite.pCursor = NULL; - pScreenPriv->sprite.firstCallTo_DisplayCursor = TRUE; - pScreenPriv->sprite.nTopPadLines = 0; - pScreenPriv->sprite.moveOnVBlank = FALSE; - GET_CURSOR_SPECS(pDregs,pScreenPriv); - pScreenPriv->sprite.pipelineDelay = pDevRomData->cursor_pipeline_delay; - pScreenPriv->sprite.videoInterleave = pDevRomData->video_interleaves; - if (pScreenPriv->deviceID == S9000_ID_A1439A) - { - pScreenPriv->sprite.pipelineDelay--; - } - - /* Zero out 64 bits (2 longs) in each scanline */ - START_CURSOR_MASK_ACCESS(pDregs); - nScanlinesToZero = NGLE_MAX_SPRITE_SIZE; - do - { - WRITE_CURSOR_BITS(pDregs,0,0); - } while (--nScanlinesToZero); - - /* Zero out 64 bits (2 longs) in each scanline */ - START_CURSOR_DATA_ACCESS(pDregs); - nScanlinesToZero = NGLE_MAX_SPRITE_SIZE; - do - { - WRITE_CURSOR_BITS(pDregs,0,0); - } while (--nScanlinesToZero); - - SETUP_FB(pDregs,pScreenPriv->deviceID,pScreenPriv->devDepth); - - return(TRUE); - -} /* ngleInitSprite() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleUninitSprite() - * - * Description: - * - * This routine is called at CloseScreen() time to free various - * cursor/sprite structures and shutdown the NGLE sprite code. - * - ******************************************************************************/ - -Bool ngleUninitSprite(pScreen) - - ScreenPtr pScreen; -{ - hpPrivPtr php; - - php = (hpPrivPtr)pScreen->devPrivate; - php->MoveMouse = ngleNoop; - php->CursorOff = ngleNoop; - php->ChangeScreen = ngleNoop; - - return(TRUE); - -} /* ngleUninitSprite() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleDisableSprite() - * - * Description: - * - * This routine is called from the input driver to disable - * a screen's sprite (make it invisible) when the cursor/sprite moves - * to another screen when the server is in a multi-headed configuration. - * The sprite is re-enabled for a screen by a call to DisplayCursor(). - * - ******************************************************************************/ - -void ngleDisableSprite(pScreen) - - ScreenPtr pScreen; -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - - - if (pScreenPriv->sprite.visible) - { - pScreenPriv->sprite.visible == FALSE; - DISABLE_CURSOR(pScreenPriv); - } - -} /* ngleDisableSprite() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleChangeScreen() - * - * Description: - * - * This routine is intended to handle changing the current screen. - * pScreen points to new screen. - * - ******************************************************************************/ - -void ngleChangeScreen(pScreen) - - ScreenPtr pScreen; -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - WindowPtr pRootWindow = WindowTable[pScreen->myNum]; - - if (pScreenPriv->sprite.pCursor == NULL) - { - /* This should only occur once and only for screens 1 and above. - * Reason: server calls DisplayCursor during initialization, - * but before rootwindow (and default cursor) have been defined. - * So DisplayCursor exited at very top - before firstCall is set false. - */ - - /* Do load and enable cursor. */ - (*pScreen->DisplayCursor)(pScreen, pRootWindow->optional->cursor); - } - -} /* ngleChangeScreen() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleDisplayCursor() - * - * Description: - * - * This routine is called by DIX (and the input driver) - * whenever the sprite/cursor is changed 1) from one "cursor" (i.e. image - * and mask bits, foreground and background color) to another 2) from one - * screen to another. This routine downloads the cursor image/mask and - * foreground and background colors to the hardware cursor. - * - ******************************************************************************/ - -Bool ngleDisplayCursor(pScreen, pCursor) - - ScreenPtr pScreen; - CursorPtr pCursor; -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - hpPrivPtr php = (hpPrivPtr)pScreen->devPrivate; - WindowPtr pRootWindow; - NgleHdwPtr pDregs; - Card32 *pSrc; - Int32 nScanlines; /* loop variable */ - Int32 heightPlus1; - Int32 sourceIncrement; - Int32 nScanlinesToZeroPlus1; - Int32 nOffscreenScanlines = 0; - Int32 x0, y0; /* Sprite origin (not hotspot) */ - Int32 xHi, /* For cursor positioning */ - xLo; - Int32 i; - Card32 srcMask; - Card32 cursorXYValue = 0; - int nTopPadLines = 0; - int nBotPadLines = 0; - Int32 hbp_times_vi; - - - - /* - *************************************************************************** - ** We are called during initialization as a side effect of doing a change - ** screens to insure screen 0 is on top. At that time, there is no root - ** window so we should just abort and wait for a call that has a cursor - ** to display. - ** - ** After the first time this routine is called (i.e. after the "side effect" - ** call), if pCursor is NULL it means that the input driver is - ** changing screens and wants this screen to use the same "cursor" (i.e. - ** image and mask bits, etc.) as the last time that the sprite was on - ** this screen. However, the second time that pScreen->DisplayCursor is - ** called, pCursor is NULL, but since there wasn't a previous cursor, - ** the driver should use the Root Window's cursor (which is the side - ** effect that the input driver and/or DIX wants to acheive). - *************************************************************************** - */ - if (!(pRootWindow = WindowTable[pScreen->myNum])) - return(TRUE); - - if (pScreenPriv->sprite.firstCallTo_DisplayCursor) - { - pScreenPriv->sprite.firstCallTo_DisplayCursor = FALSE; - - if (pCursor == NULL) - pCursor = pRootWindow->optional->cursor; - } - - /* Now if the cursor is still null, abort because we are using the - * same cursor as before: - */ - if (pCursor == NULL) - return(FALSE); - - /* Check for a valid sized cursor: */ - if ((pCursor->bits->width > NGLE_MAX_SPRITE_SIZE) || - (pCursor->bits->height > NGLE_MAX_SPRITE_SIZE)) - return(FALSE); /* Cursor is TOO big */ - - if (pScreenPriv->sprite.visible == TRUE) - { - /**** Before loading the new image, mask, and colors into the hardware - **** cursor, turn it off so we don't get flicker: - ****/ - DISABLE_CURSOR(pScreenPriv); - } - - if ( (pScreenPriv->deviceID == S9000_ID_TIMBER) - || (pScreenPriv->deviceID == S9000_ID_A1439A)) - { - int nPadLines = NGLE_MAX_SPRITE_SIZE - pCursor->bits->height; - if (nPadLines >= NTOPLINES_FOR_TIMBER) - { - nPadLines -= NTOPLINES_FOR_TIMBER; - /* Split extra lines between top and bottom */ - nBotPadLines = nPadLines/2; - nTopPadLines = NTOPLINES_FOR_TIMBER + nPadLines - nBotPadLines; - } - else - { - nTopPadLines = nPadLines; - } - } - else - { /* ELK */ - nTopPadLines = 0; - nBotPadLines = NGLE_MAX_SPRITE_SIZE - pCursor->bits->height; - } - - /* Calculate cursor origin (not hotspot) and number of scanlines not - * actually displayed, including any padding scanlines at top. - */ - x0 = pScreenPriv->sprite.x - pCursor->bits->xhot; - y0 = pScreenPriv->sprite.y - - (pCursor->bits->yhot + nTopPadLines); - - /* If y0 is less than zero, some scanlines of cursor won't be displayed. - * This fudge factor will be used at cursor enable time. - */ - if (y0 < 0) - { - nOffscreenScanlines = - y0; - y0 = 0; - } - - pDregs = pScreenPriv->pDregs; - - /* If cursor has changed, write the image, mask, and cursor colormap - * to the hardware cursor: - */ - if ((pCursor != pScreenPriv->sprite.pCursor) - ||(pCursor->bits != pScreenPriv->sprite.pCursor->bits)) - { - pScreenPriv->sprite.pCursor = pCursor; - heightPlus1 = pCursor->bits->height + 1; - - if (pCursor->bits->width <= 32) - { - /* Form left justified mask of meaningful bits in cursor - * data and mask. Reason: old cursor may be larger and - * needs to be zeroed out, not left unchanged. - */ - srcMask = 0xffffffffUL << (32 - pCursor->bits->width); - - /* write cursor mask to HW */ - START_CURSOR_MASK_ACCESS(pDregs); - pSrc = (Card32 *) pCursor->bits->mask; - - nScanlines = nTopPadLines + 1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,0,0); - } - - nScanlines = heightPlus1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,(*pSrc++ & srcMask),0); - } - - nScanlines = nBotPadLines + 1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,0,0); - } - - /* write cursor data to HW */ - START_CURSOR_DATA_ACCESS(pDregs); - pSrc = (Card32 *) pCursor->bits->source; - - nScanlines = nTopPadLines + 1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,0,0); - } - - nScanlines = heightPlus1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,(*pSrc++ & srcMask),0); - } - - nScanlines = nBotPadLines + 1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,0,0); - } - } - else - { /* Width == 64 */ - - /* Form left justified mask of meaningful bits - * second word in cursor data and mask. - */ - srcMask = 0xffffffffUL << (64 - pCursor->bits->width); - - /* write cursor mask to HW */ - START_CURSOR_MASK_ACCESS(pDregs); - pSrc = (Card32 *) pCursor->bits->mask; - - nScanlines = nTopPadLines + 1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,0,0); - } - - nScanlines = heightPlus1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,(*pSrc++),(*pSrc++ & srcMask)); - } - - nScanlines = nBotPadLines + 1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,0,0); - } - - /* write cursor data to HW */ - START_CURSOR_DATA_ACCESS(pDregs); - pSrc = (Card32 *) pCursor->bits->source; - - nScanlines = nTopPadLines + 1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,0,0); - } - - nScanlines = heightPlus1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,(*pSrc++),(*pSrc++ & srcMask)); - } - - nScanlines = nBotPadLines + 1; - while (--nScanlines) - { - WRITE_CURSOR_BITS(pDregs,0,0); - } - } - - SETUP_FB(pDregs,pScreenPriv->deviceID,pScreenPriv->devDepth); - - /* Load the correct colors into the hardware cursor: */ - ngleLoadCursorColormap(pScreen, pCursor); - } - - /* Load cursor position into NGLE: - * X11 hotspot hasn't changed position, but NGLE stores - * origin of cursor, and relative distance between hotspot - * and origin may have changed. - */ - - /* Update cursor X/Y position register, which contains - * all cursor position information except the number - * of scanlines hidden. - */ - if (pScreenPriv->deviceID != S9000_ID_ARTIST) - { - xHi = (x0 / pScreenPriv->sprite.videoInterleave) - + pScreenPriv->sprite.horizBackPorch - - pScreenPriv->sprite.pipelineDelay; - xLo = x0 % pScreenPriv->sprite.videoInterleave; - } - else - { - hbp_times_vi = (pScreenPriv->sprite.horizBackPorch * - pScreenPriv->sprite.videoInterleave); - xHi = ((x0 + hbp_times_vi) / pScreenPriv->sprite.videoInterleave) - - pScreenPriv->sprite.pipelineDelay; - xLo = (x0 + hbp_times_vi) % pScreenPriv->sprite.videoInterleave; - } - - /* if y0 < 0, y0 has already been set to 0 above */ - cursorXYValue = - ( (xHi << 19) - | (xLo << 16) - | (pScreenPriv->sprite.maxYLine - y0) - ); - - /* Update values maintained in pScreenPriv->sprite */ - pScreenPriv->sprite.visible = TRUE; - pScreenPriv->sprite.width = pCursor->bits->width; - pScreenPriv->sprite.height = pCursor->bits->height; - pScreenPriv->sprite.nTopPadLines = nTopPadLines; - - /* ENABLE_CURSOR macro uses value of sprite.moveOnVBlank - * in deciding whether to wait for vertical blank before moving - * cursor. - */ - switch (pScreenPriv->moveCursorOnVBlank) - { - case CURSOR_AT_VBLANK_ALWAYS: - pScreenPriv->sprite.moveOnVBlank = TRUE; - break; - - case CURSOR_AT_VBLANK_NEVER: - pScreenPriv->sprite.moveOnVBlank = FALSE; - break; - - case CURSOR_AT_VBLANK_DRIVEROPTION: - if (( (pScreenPriv->deviceID == S9000_ID_TIMBER) - || (pScreenPriv->deviceID == S9000_ID_A1439A) - ) - && (nTopPadLines < NTOPLINES_FOR_TIMBER)) - { - pScreenPriv->sprite.moveOnVBlank = TRUE; - } - else - { - pScreenPriv->sprite.moveOnVBlank = FALSE; - } - break; - } - - /**** Now, that we have loaded the correct bits into the hardware - **** cursor, turn it back on: - ****/ - - /* If cursor is at top of screen, hotspot may be displayed - * but origin is at (y<0). NGLE hardware stores this value - * in same register as cursor enable bit, so pass as parameter. - */ - ENABLE_CURSOR(pScreenPriv, cursorXYValue, nOffscreenScanlines); - - return(TRUE); - -} /* ngleDisplayCursor() */ - - -/****************************************************************************** - * - * NGLE DDX Procedure: hyperDisplayCursor() - * - * Description: - * - * This routine is called by DIX (and the input driver?) - * whenever the sprite/cursor is changed 1) from one "cursor" (i.e. image - * and mask bits, foreground and background color) to another 2) from one - * screen to another. This routine downloads the cursor image/mask and - * foreground and background colors to the hardware cursor. - * - * Cloned from ngleDisplayCursor to use new hyperdrive cursor model and - * to avoid ugly bug workarounds in ngle code. - * - ******************************************************************************/ - -Bool hyperDisplayCursor( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - NgleScreenPrivPtr pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - WindowPtr pRootWindow; - NgleHdwPtr pDregs = pScreenPriv->pDregs; - Card32 *pSrcStart; - Card32 *pSrc; - Int32 nScanlines; /* loop variable */ - Int32 heightPlus1; - Int32 sourceIncrement; - Int32 x0, y0; /* Sprite origin (not hotspot) */ - Int32 i; - Int32 curaddr; - Card32 srcMask; - Int32 nFreeFifoSlots = 0; - Card32 cursorXYValue = 0; - int nBotPadLines = 0; - - - /* - *************************************************************************** - ** We are called during initialization as a side effect of doing a change - ** screens to insure screen 0 is on top. At that time, there is no root - ** window so we should just abort and wait for a call that has a cursor - ** to display. - ** - ** After the first time this routine is called (i.e. after the side effect - ** call), if pCursor is NULL it means that the Corvallis input driver is - ** changing screens and wants this screen to use the same "cursor" (i.e. - ** image and mask bits, etc.) as the last time that the sprite was on - ** this screen. However, the second time that pScreen->DisplayCursor is - ** called, pCursor is NULL, but since there wasn't a previous cursor, - ** the driver should use the Root Window's cursor (which is the side - ** effect that the input driver and/or DIX wants to acheive). - *************************************************************************** - */ - if (!(pRootWindow = WindowTable[pScreen->myNum])) - return(TRUE); - - if (pScreenPriv->sprite.firstCallTo_DisplayCursor) - { - pScreenPriv->sprite.firstCallTo_DisplayCursor = FALSE; - - if (pCursor == NULL) - pCursor = pRootWindow->optional->cursor; - } - - /* Now if the cursor is still null, abort because we are using the - * same cursor as before: - */ - - if (pCursor == NULL) - return(FALSE); - - /* Check for a valid sized cursor: (hyper same as ngle) */ - if ((pCursor->bits->width > NGLE_MAX_SPRITE_SIZE) || - (pCursor->bits->height > NGLE_MAX_SPRITE_SIZE)) - return(FALSE); /* Cursor is TOO big */ - - /* Lock the device: */ - NGLE_LOCK(pScreenPriv); - - /* to protect against VID bus data loss */ - SETUP_HW(pDregs); - - GET_FIFO_SLOTS(nFreeFifoSlots,2); - HYPER_GET_VID_BUS_ACCESS; - if (pScreenPriv->sprite.visible == TRUE) - { - /**** Before loading the new image, mask, and colors into the hardware - **** cursor, turn it off so we don't get flicker: - ****/ - /* Accessing asynchronous register: no need to check FIFO */ - HYPER_DISABLE_CURSOR(pScreenPriv); - - } - - /* Calculate cursor origin (not hotspot) and number of scanlines not - * actually displayed. - */ - - x0 = pScreenPriv->sprite.x - pCursor->bits->xhot; - y0 = pScreenPriv->sprite.y - - (pCursor->bits->yhot); - nBotPadLines = NGLE_MAX_SPRITE_SIZE - pCursor->bits->height; - - /* If cursor has changed, write the image, mask, and cursor colormap - * to the hardware cursor: - */ - if ((pCursor != pScreenPriv->sprite.pCursor) - ||(pCursor->bits != pScreenPriv->sprite.pCursor->bits)) - { - - pScreenPriv->sprite.pCursor = pCursor; - - heightPlus1 = pCursor->bits->height + 1; - - /* Start out writing the mask */ - pSrcStart = (Card32 *) pCursor->bits->mask; - curaddr = 0; /* Mask Area */ - - /**** Write the image and mask to the hardware cursor: ****/ - for (i = 0; i < 2; i++) - { - /* Source is long-aligned: */ - assert((Card32) pSrcStart == ((Card32)(pSrcStart) >> 2) << 2); - - /* Like all pixmaps created by NGLE DDX, each scanline - * of the source and mask pixmaps are padded on the right - * to a long-word boundary. For a NGLE sprite, this means - * the scanline is either 32 or 64 bits. - * - * Padding is NOT necessarily 0! - */ - - if (pCursor->bits->width <= 32) - { - pSrc = pSrcStart; - - /* Form left justified mask of meaningful bits in cursor - * data and mask. Alas, masking is performed on CPU - * on source data rather than using the ELK mask - * register. Reason: old cursor may be larger and - * needs to be zeroed out, not left unchanged. - */ - srcMask = 0xffffffffUL << (32 - pCursor->bits->width); - - /* Ngle cares whether old cursor was small enough that */ - /* we dont have to zero all 64 bits. Hyperdrive */ - /* its a dont-care since you can either write the 0 or */ - /* write the new address. */ - - nScanlines = heightPlus1; - GET_FIFO_SLOTS(nFreeFifoSlots, 1); - HYPER_SET_CURSOR_ADDRESS(curaddr); - while (--nScanlines) - { - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - HYPER_WRITE_CURSOR_DATA((*pSrc++ & srcMask)); - HYPER_WRITE_CURSOR_DATA(0); - } - nScanlines = nBotPadLines + 1; - while (--nScanlines) - { - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - HYPER_WRITE_CURSOR_DATA(0); - HYPER_WRITE_CURSOR_DATA(0); - } - } - else - { /* Width == 64 */ - - /* Form left justified mask of meaningful bits - * second word in cursor data and mask. - */ - srcMask = 0xffffffffUL << (64 - pCursor->bits->width); - - /* Destination bitmap address already set to (0,0) */ - pSrc = pSrcStart; - - nScanlines = heightPlus1; - GET_FIFO_SLOTS(nFreeFifoSlots, 1); - HYPER_SET_CURSOR_ADDRESS(curaddr); - while (--nScanlines) - { - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - HYPER_WRITE_CURSOR_DATA(*pSrc++); - HYPER_WRITE_CURSOR_DATA((*pSrc++ & srcMask)); - } - nScanlines = nBotPadLines + 1; - while (--nScanlines) - { - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - HYPER_WRITE_CURSOR_DATA(0); - HYPER_WRITE_CURSOR_DATA(0); - } - } - /* Now do the data */ - pSrcStart = (Card32 *) pCursor->bits->source; - curaddr = HYPER_CURSOR_DATA_BIT; - } - - /* Load the correct colors into the hardware cursor: */ - ngleLoadCursorColormap(pScreen, pCursor); - } - - /* Load cursor position into NGLE: - * X11 hotspot hasn't changed position, but NGLE stores - * origin of cursor, and relative distance between hotspot - * and origin may have changed. - */ - - /* if y0 < 0, y0 has already been set to 0 above */ - cursorXYValue = HYPER_CURSOR_XY(x0,y0); - - /* Update values maintained in pScreenPriv->sprite */ - pScreenPriv->sprite.visible = TRUE; - pScreenPriv->sprite.width = pCursor->bits->width; - pScreenPriv->sprite.height = pCursor->bits->height; - - /**** Now, that we have loaded the correct bits into the hardware - **** cursor, turn it back on: - ****/ - - /* If cursor is at top of screen, hotspot may be displayed - * but origin is at (y<0). NGLE hardware stores this value - * in same register as cursor enable bit, so pass as parameter. - */ - HYPER_ENABLE_CURSOR(pScreenPriv, cursorXYValue); - - NGLE_UNLOCK(pScreenPriv); - - return(TRUE); - -} /* hyperDisplayCursor() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleRecolorCursor() - * - * Description: - * - * This routine is called from DIX whenever a color(s) for a "cursor" - * (i.e. image and mask bits, foreground and background color) change. - * Since this routine may be called for a "cursor" that isn't the - * current "sprite", care must be excercised before changing the colors - * in the hardware cursor. - * - ******************************************************************************/ - -void ngleRecolorCursor(pScreen, pCursor, displayed) - - ScreenPtr pScreen; - CursorPtr pCursor; - Bool displayed; -{ - /* Since DisplayCursor updates the cursor foreground and background - * colors before displaying it, we only need to re-load the - * cursor colormap if the cursor changing colors is already being - * displayed. - */ - - if (displayed) - ngleLoadCursorColormap(pScreen, pCursor); - -} /* ngleRecolorCursor() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleMoveSprite() - * - * Description: - * - * This routine is called from the input driver whenever the - * pointer device (e.g. mouse) is moved. - * - ******************************************************************************/ - -void ngleMoveSprite(pScreen, xhot, yhot, forceit) - - ScreenPtr pScreen; - Int16 xhot,yhot; - Bool forceit; -{ - NgleScreenPrivPtr pScreenPriv; - CursorBitsPtr pCursorBits; - Int32 x0, y0; - Int32 nOffscreenScanlines = 0; - Int32 hbp_times_vi, /* For cursor positioning */ - xHi, - xLo; - Card32 cursorXYValue = 0; - NgleHdwPtr pDregs; - Int32 nFreeFifoSlots = 0; - -#ifdef XTESTEXT1 - extern Int32 on_steal_input; /* Defined in xtestext1di.c */ - - if (on_steal_input) - check_for_motion_steal(xhot, yhot); /* XTM */ -#endif /* XTESTEXT1 */ - - pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - pDregs = pScreenPriv->pDregs; - - /* Only move if cursor defined and position changed. - * - * (Cursor should be defined before this procedure called, - * but one case may occur on multi-headed server when changing - * cursor to new screen) - */ - if ((pScreenPriv->sprite.pCursor != NULL) - && ((xhot != pScreenPriv->sprite.x) || (yhot != pScreenPriv->sprite.y))) - { - /* Define local pointer to cursor xhot and yhot offsets */ - pCursorBits = pScreenPriv->sprite.pCursor->bits; - - pScreenPriv->sprite.x = xhot; - pScreenPriv->sprite.y = yhot; - - if (pScreenPriv->sprite.visible) - { - /* Calculate cursor origin */ - x0 = xhot - pCursorBits->xhot; - /* Not all cursors start at first scan line of cursor BINs - * (to work around hardware problem w/ghosting and tearing - * on Biff/Mojave-based graphics cards). Number of padding - * padding lines is set when cursor loaded. - */ - y0 = yhot - pCursorBits->yhot - pScreenPriv->sprite.nTopPadLines; - - if (pScreenPriv->deviceID == S9000_ID_HCRX) - { /* ie NGLE_II_HW_CURSOR */ - cursorXYValue = HYPER_CURSOR_XY(x0,y0); - assert(pScreenPriv->sprite.visible == TRUE); - - /* This test is an optimization for thunder */ - if (HYPER_ACCEL_BUSY_DODGER_IDLE) - { - if (HYPER_ACCEL_BUSY_DODGER_IDLE) - { - /* FIFO slot not required for this write */ - HYPER_CPC(pScreenPriv, cursorXYValue); - } - else - { - HYPER_FIFO_CP(pScreenPriv, cursorXYValue); - } - } - else - { - HYPER_FIFO_CP(pScreenPriv, cursorXYValue); - } - } - else - { - /* Calculate number of scanlines not displayed - * because cursor is partly off the top of the screen. - * (X11 requires hotspot to remain on-screen, - * but not the sprite origin). - */ - if (y0 < 0) - { - nOffscreenScanlines = - y0; - y0 = 0; - } - - /* Update cursor X/Y position register, which contains - * all cursor position information except the number - * of scanlines hidden. - */ - hbp_times_vi = (pScreenPriv->sprite.horizBackPorch * - pScreenPriv->sprite.videoInterleave); - xHi = ((x0 + hbp_times_vi) / pScreenPriv->sprite.videoInterleave) - - pScreenPriv->sprite.pipelineDelay; - if (pScreenPriv->deviceID != S9000_ID_ARTIST) - xLo = x0 % pScreenPriv->sprite.videoInterleave; - else - xLo = (x0 + hbp_times_vi) % pScreenPriv->sprite.videoInterleave; - - /* if y0 < 0, y0 has already been set to 0 above */ - cursorXYValue = - ( (xHi << 19) - | (xLo << 16) - | (pScreenPriv->sprite.maxYLine - y0) - ); - - /* Now update number of cursor scan lines hidden. - * It's in same register as the enable cursor bit, and this macro - * also enables cursor, but this position cursor routine is only - * called if cursor is visible. - */ - ENABLE_CURSOR(pScreenPriv, cursorXYValue, nOffscreenScanlines); - } - } - } -} /* ngleMoveSprite() */ Index: xc/programs/Xserver/hw/hp/ngle/nglecursor.h diff -u xc/programs/Xserver/hw/hp/ngle/nglecursor.h:1.1.1.3 xc/programs/Xserver/hw/hp/ngle/nglecursor.h:removed --- xc/programs/Xserver/hw/hp/ngle/nglecursor.h:1.1.1.3 Tue Jan 16 17:43:15 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglecursor.h Thu Feb 27 12:29:25 2003 @@ -1,143 +0,0 @@ -/* $Xorg: nglecursor.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - * - *************************************************************************/ - -/****************************************************************************** - * - * This file contains various macros, typedefs and extern declarations - * concerning cursors (both sprites and echoes). - * - ******************************************************************************/ - -#ifndef NGLECURSOR_H -#define NGLECURSOR_H - - -/* The following is the maximum width/height supported by the NGLE cursor - * hardware: - */ -#define NGLE_MAX_SPRITE_SIZE 64 - - -/* - ****************************************************************************** - ** - ** NGLE DDX Driver's Sprite Structure: - ** - ****************************************************************************** - */ -typedef struct _NgleSpriteRec -{ - /* The sprite's state - visible or not visible */ - Int32 visible; - - /* Location of the sprite's hotspot relative to the screen's origin: */ - Int32 x; - Int32 y; - - /* Pointer to currently installed cursor struct: */ - CursorPtr pCursor; - - /* See the comment fairly early on in ngleDisplayCursor: */ - Int32 firstCallTo_DisplayCursor; - - /* Hardware values that affect cursor positioning. - * Read in at X11 startup. - */ - Card32 horizBackPorch; - Card32 maxYLine; - Card32 pipelineDelay; - Card32 videoInterleave; - - /* Value of hardware register value written at cursor enable */ - Card32 enabledCursorXYValue; - - /* Save current cursor width and height. When new cursor requested, - * old cursor's structures (pointed to by pCursor above) may already - * have been de-allocated. Used to minimize scanlines that must be written. - */ - Int32 height; - Int32 width; - - /* Cursor Y position adjustment */ - Int32 nTopPadLines; - - /* Value related to nTopPadLines: should cursor only be moved - * while vertical blank is in progress? - * - * Set in ngleDisplayCursor() and used in ENABLE_CURSOR macro. - */ - Bool moveOnVBlank; - -} NgleSpriteRec, *NgleSpritePtr; - - -/* - ****************************************************************************** - ** - ** Macros to Access the NGLE DDX Driver's Sprite Structure: - ** - ****************************************************************************** - */ - -#define NGLE_SPRITE_FROM_SCREEN(pScreen)\ - (NGLE_SCREEN_PRIV(pScreen)->pSprite) - -#define NGLE_SPRITE_FROM_SCREEN_PRIV(pScreenPriv)\ - ((pScreenPriv)->pSprite) - - -/* - ****************************************************************************** - ** - ** NGLE DDX Driver's Cursor Internally-Visible Extern Declarations: - ** - ****************************************************************************** - */ -extern Bool ngleInitSprite(); -extern Bool hyperInitSprite(); -extern Bool ngleUninitSprite(); - -extern void ngleDisableSprite(); -extern void ngleChangeScreen(); - -extern Bool ngleDisplayCursor(); -extern Bool hyperDisplayCursor(); -extern void ngleRecolorCursor(); - -extern Bool ngleSetCursorPosition(); -extern void ngleMoveSprite(); - -/* Shared HP routines for the cursor: */ -extern void hpCursorLimits(); -extern void hpConstrainCursor(); -extern Bool hpSetCursorPosition(); - - -/* The number of scanlines that must be left blank in order to end the - * ghosting/tearing problem has been empirically determined to be 12. - */ -#define NTOPLINES_FOR_TIMBER 12 - -#endif /* NGLECURSOR_H */ Index: xc/programs/Xserver/hw/hp/ngle/ngledevrom.h diff -u xc/programs/Xserver/hw/hp/ngle/ngledevrom.h:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/ngledevrom.h:removed --- xc/programs/Xserver/hw/hp/ngle/ngledevrom.h:1.1.1.2 Tue Jan 16 17:43:15 2001 +++ xc/programs/Xserver/hw/hp/ngle/ngledevrom.h Thu Feb 27 12:29:25 2003 @@ -1,79 +0,0 @@ -/* $Xorg: ngledevrom.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - * - *************************************************************************/ - -/****************************************************************************** - * - * This header file contains the structure definition - * of this device-dependent ROM area, after values have - * been packed (actual ROM is only 1-byte wide, so each - * long only contains a byte of data). - * - ******************************************************************************/ - - -#ifndef DEVDEPROM_H -#define DEVDEPROM_H - -/* On HP-UX ioctl(fildes, GCDESCRIBE returns pointer to device-dependent - * ROM area in crt_region[1] - */ -#define NGLEDEVDEPROM_CRT_REGION 1 - - -typedef char rom_byte_t; -typedef short rom_short_t; -typedef long rom_long_t; -typedef void *rom_addr_t; - -typedef struct { - rom_long_t video_config_reg; - rom_long_t misc_video_start; - rom_long_t horiz_timing_fmt; - rom_long_t serr_timing_fmt; - rom_long_t vert_timing_fmt; - rom_long_t horiz_state; - rom_long_t vert_state; - rom_long_t vtg_state_elements; - rom_long_t pipeline_delay; - rom_long_t misc_video_end; - } video_setup_t; - -typedef struct { - rom_short_t sizeof_ngle_data; - rom_short_t x_size_visible; /* visible screen dim in pixels */ - rom_short_t y_size_visible; - - rom_short_t pad2[15]; - - rom_short_t cursor_pipeline_delay; - rom_short_t video_interleaves; - - rom_long_t pad3[11]; - - } ngle_rom_t; - -typedef ngle_rom_t NgleDevRomDataRec; -typedef ngle_rom_t *NgleDevRomDataPtr; -#endif /* DEVDEPROM_H */ Index: xc/programs/Xserver/hw/hp/ngle/ngleextern.h diff -u xc/programs/Xserver/hw/hp/ngle/ngleextern.h:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/ngleextern.h:removed --- xc/programs/Xserver/hw/hp/ngle/ngleextern.h:1.1.1.2 Tue Jan 16 17:43:16 2001 +++ xc/programs/Xserver/hw/hp/ngle/ngleextern.h Thu Feb 27 12:29:25 2003 @@ -1,46 +0,0 @@ -/* $Xorg: ngleextern.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - * - *************************************************************************/ - -/****************************************************************************** - * - * This file contains globally-visible extern declarations for the - * NGLE DDX Driver. - * - ******************************************************************************/ - -#ifndef NGLEEXTERN -#define NGLEEXTERN - - -/* - ****************************************************************************** - ** - ** Extern declarations: - ** - ****************************************************************************** - */ -extern Bool ngleScreenInit(); - -#endif /* NGLEEXTERN */ Index: xc/programs/Xserver/hw/hp/ngle/nglehdw.h diff -u xc/programs/Xserver/hw/hp/ngle/nglehdw.h:1.1.1.4 xc/programs/Xserver/hw/hp/ngle/nglehdw.h:removed --- xc/programs/Xserver/hw/hp/ngle/nglehdw.h:1.1.1.4 Tue Jan 16 17:43:16 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglehdw.h Thu Feb 27 12:29:25 2003 @@ -1,523 +0,0 @@ -/* $Xorg: nglehdw.h,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - * - *************************************************************************/ - - -#ifndef NGLEHDW_H /*[ NGLEHDW_H */ -#define NGLEHDW_H - -/* Define pointer to NGLE registers */ -#ifndef DREGS_PTR -#define DREGS_PTR pDregs -#endif - -#define NGLE_LOCK(pScreenPriv) -#define NGLE_UNLOCK(pScreenPriv) - -#define NGLE_READ32(source) ((long)(source)) -#define NGLE_WRITE32(dest, data) ((dest) = (long)(data)) - -typedef ngle_dregs_t NgleHdwRec; -typedef ngle_dregs_t *NgleHdwPtr; - -#define SETUP_HW(pDregs) \ -{ \ - char stat; \ - volatile char * pstat = &((pDregs)->reg15.b.b0); \ - do { \ - stat = *pstat; \ - if (!stat) \ - stat = *pstat; \ - } while(stat); \ -} - -#define SETUP_FB(pDregs, ID, depth) \ -{ \ - SETUP_HW(pDregs); \ - switch (ID) \ - { \ - case S9000_ID_ARTIST: \ - case S9000_ID_A1659A: \ - (pDregs)->reg10 = 0x13601000; \ - break; \ - case S9000_ID_A1439A: \ - if (depth == 24) \ - (pDregs)->reg10 = 0xBBA0A000; \ - else /* depth = 8 */ \ - (pDregs)->reg10 = 0x13601000; \ - break; \ - case S9000_ID_HCRX: \ - if (depth == 24) \ - (pDregs)->reg10 = 0xBBA0A000; \ - else /* depth = 8 */ \ - (pDregs)->reg10 = 0x13602000; \ - break; \ - case S9000_ID_TIMBER: \ - case CRX24_OVERLAY_PLANES: \ - (pDregs)->reg10 = 0x13602000; \ - break; \ - } \ - (pDregs)->reg14.all = 0x83000300; \ - SETUP_HW(pDregs); \ - (pDregs)->reg16.b.b1 = 1; \ -} - -#ifdef HPUX_ANSIC_ACKNOWLEDGES_VOLATILE_STRUCTURE /* [ */ -#define GET_FIFO_SLOTS( cnt, numslots) \ -{ \ - while (cnt < numslots) \ - { \ - cnt = DREGS_PTR->reg34.all; \ - } \ - cnt -= numslots; \ -} -#else /* Compiler does not treat pDregs as volatile ][ use local volatile */ -#define GET_FIFO_SLOTS( cnt, numslots) \ -{ \ - volatile unsigned long * pHwFifoFreeCnt = &(DREGS_PTR->reg34.all); \ - while (cnt < numslots) \ - { \ - cnt = *pHwFifoFreeCnt; \ - } \ - cnt -= numslots; \ -} -#endif /* Use local volatile ] */ - -#define START_CURSOR_COLORMAP_ACCESS(pDregs) { \ - SETUP_HW(pDregs); \ - (pDregs)->reg10 = 0xBBE0F000; \ - (pDregs)->reg14.all = 0x03000300; \ - (pDregs)->reg13 = ~0; \ - (pDregs)->reg3 = 0; \ - (pDregs)->reg4 = 0; \ - (pDregs)->reg4 = 0; \ - } - -#define WRITE_CURSOR_COLOR(pDregs,color) { \ - (pDregs)->reg4 = (color); \ - } - -#define FINISH_CURSOR_COLORMAP_ACCESS(pDregs,ID,depth) { \ - (pDregs)->reg2 = 0; \ - if (ID == S9000_ID_ARTIST) \ - (pDregs)->reg26 = 0x80008004; \ - else \ - (pDregs)->reg1 = 0x80008004; \ - SETUP_FB(pDregs,ID,depth); \ - } - -#define START_IMAGE_COLORMAP_ACCESS(pDregs) { \ - SETUP_HW(pDregs); \ - (pDregs)->reg10 = 0xBBE0F000; \ - (pDregs)->reg14.all = 0x03000300; \ - (pDregs)->reg13 = ~0; \ - } - -#define WRITE_IMAGE_COLOR(pDregs, index, color) { \ - SETUP_HW(pDregs); \ - (pDregs)->reg3 = ((0x100+index) << 2); \ - (pDregs)->reg4 = (color); \ - } - -#define FINISH_IMAGE_COLORMAP_ACCESS(pDregs, ID, depth) { \ - (pDregs)->reg2 = 0x400; \ - if (depth == 24) \ - (pDregs)->reg1 = 0x83000100; \ - else /* depth = 8 */ \ - { \ - if (ID == S9000_ID_ARTIST) \ - (pDregs)->reg26 = 0x80000100; \ - else \ - (pDregs)->reg1 = 0x80000100; \ - } \ - SETUP_FB(pDregs, ID, depth); \ - } - -#define GET_CURSOR_SPECS(pDregs,pScreenPriv) { \ - Card32 activeLinesHi, activeLinesLo; \ - \ - if ((pScreenPriv)->deviceID != S9000_ID_ARTIST) \ - (pScreenPriv)->sprite.horizBackPorch = (pDregs)->reg19.b.b1; \ - else \ - (pScreenPriv)->sprite.horizBackPorch = (pDregs)->reg19.b.b1 + \ - (pDregs)->reg19.b.b2 + \ - 2; \ - activeLinesLo = (pDregs)->reg20.b.b0; \ - activeLinesHi = ((pDregs)->reg21.b.b2) & 0xf; \ - (pScreenPriv)->sprite.maxYLine = ((activeLinesHi << 8) \ - |(activeLinesLo & 0xff)); \ - } - -#define START_CURSOR_MASK_ACCESS(pDregs) { \ - SETUP_HW(pDregs); \ - (pDregs)->reg14.all = 0x00000300; \ - (pDregs)->reg13 = ~0; \ - (pDregs)->reg11 = 0x28A07000; \ - (pDregs)->reg3 = 0; \ - } - -#define START_CURSOR_DATA_ACCESS(pDregs) { \ - SETUP_HW(pDregs); \ - (pDregs)->reg14.all = 0x00000300; \ - (pDregs)->reg11 = 0x28A06000; \ - (pDregs)->reg3 = 0; \ - } - -#define WRITE_CURSOR_BITS(pDregs,word1,word2) { \ - SETUP_HW(pDregs); \ - (pDregs)->reg4 = (word1); \ - (pDregs)->reg5 = (word2); \ - } - -#define ENABLE_CURSOR(pScreenPriv, cursorXYValue, nOffscreenScanlines) { \ - (pScreenPriv)->sprite.enabledCursorXYValue = (cursorXYValue);\ - if ((pScreenPriv)->sprite.moveOnVBlank) { \ - while (((pScreenPriv)->pDregs->reg21.all) & 0x00040000); \ - while (!(((pScreenPriv)->pDregs->reg21.all) \ - & 0x00040000)); \ - } \ - SETUP_HW(pScreenPriv->pDregs); \ - (pScreenPriv)->pDregs->reg17.all = (cursorXYValue); \ - (pScreenPriv)->pDregs->reg18.all = \ - (0x80 | nOffscreenScanlines); \ - } - -#define DISABLE_CURSOR(pScreenPriv) { \ - volatile unsigned long *pDregsCursorXY = \ - &((pScreenPriv)->pDregs->reg17.all); \ - long enabledCursorValue = \ - (pScreenPriv)->sprite.enabledCursorXYValue; \ - \ - SETUP_HW((pScreenPriv)->pDregs); \ - if ((pScreenPriv)->deviceID != S9000_ID_ARTIST) \ - *pDregsCursorXY = (enabledCursorValue & 0xe007ffff); \ - else \ - (pScreenPriv)->pDregs->reg18.all = \ - (enabledCursorValue & 0x0000003f); \ - } - -#define GET_ROMTABLE_INDEX(romTableIdx) { \ - (romTableIdx) = pDregs->reg16.b.b3 - 1; \ - } - -#define SETUP_RAMDAC(pDregs) { \ - volatile Card32 *pAuxControlSpace; \ - \ - pAuxControlSpace = (Card32 *) (((Card32) pDregs) + 0x1000); \ - SETUP_HW(pDregs); \ - *(pAuxControlSpace + (0x20>>2)) = 0x04000000; \ - *(pAuxControlSpace + (0x28>>2)) = 0xff000000; \ - } - -#define CRX24_SETUP_RAMDAC(pDregs) { \ - volatile Card32 *pAuxControlSpace; \ - \ - pAuxControlSpace = (Card32 *) (((Card32) pDregs) + 0x1000); \ - SETUP_HW(pDregs); \ - *(pAuxControlSpace) = 0x04000000; \ - *(pAuxControlSpace+1) = 0x02000000; \ - *(pAuxControlSpace+2) = 0xff000000; \ - *(pAuxControlSpace) = 0x05000000; \ - *(pAuxControlSpace+1) = 0x02000000; \ - *(pAuxControlSpace+2) = 0x03000000; \ - } - -#define HCRX_SETUP_RAMDAC(pDregs) { \ - NGLE_WRITE32(pDregs->reg32,0xffffffff); \ - } - -#define CRX24_SET_OVLY_MASK(pDregs) { \ - SETUP_HW(pDregs); \ - (pDregs)->reg11 = 0x13a02000; \ - (pDregs)->reg14.all = 0x03000300; \ - (pDregs)->reg3 = 0x000017f0; \ - (pDregs)->reg13 = 0xffffffff; \ - (pDregs)->reg22 = (long) (~0UL); \ - (pDregs)->reg23 = 0x0; \ - } - - -#define ENABLE_DISPLAY(pDregs) { \ - volatile Card32 *pAuxControlSpace; \ - \ - pAuxControlSpace = (Card32 *)(((Card32)(pDregs)) + 0x1000); \ - SETUP_HW(pDregs); \ - *(pAuxControlSpace + (0x30>>2)) = 0x06000000; \ - *(pAuxControlSpace + (0x38>>2)) = 0x43000000; \ - } - -#define DISABLE_DISPLAY(pDregs) { \ - volatile Card32 *pAuxControlSpace; \ - \ - pAuxControlSpace = (Card32 *)(((Card32)(pDregs)) + 0x1000); \ - SETUP_HW(pDregs); \ - *(pAuxControlSpace + (0x30>>2)) = 0x06000000; \ - *(pAuxControlSpace + (0x38>>2)) = 0x03000000; \ - } - -#define CRX24_ENABLE_DISPLAY(pDregs) { \ - volatile Card32 *pAuxControlSpace; \ - \ - pAuxControlSpace = (Card32 *)(((Card32)(pDregs)) + 0x1000); \ - SETUP_HW(pDregs); \ - *pAuxControlSpace = 0x01000000; \ - *(pAuxControlSpace+1) = 0x02000000; \ - *(pAuxControlSpace+2) = 0x10000000; \ - } - -#define CRX24_DISABLE_DISPLAY(pDregs) { \ - volatile Card32 *pAuxControlSpace; \ - \ - pAuxControlSpace = (Card32 *)(((Card32)(pDregs)) + 0x1000); \ - SETUP_HW(pDregs); \ - *pAuxControlSpace = 0x01000000; \ - *(pAuxControlSpace+1) = 0x02000000; \ - *(pAuxControlSpace+2) = 0x30000000; \ - } - -#define ARTIST_ENABLE_DISPLAY(pDregs) { \ - volatile unsigned long *pDregsMiscVideo = \ - &((pDregs)->reg21.all); \ - volatile unsigned long *pDregsMiscCtl = \ - &((pDregs)->reg27.all); \ - \ - SETUP_HW(pDregs); \ - (pDregs)->reg21.all = *pDregsMiscVideo | 0x0A000000; \ - (pDregs)->reg27.all = *pDregsMiscCtl | 0x00800000; \ - } - -#define ARTIST_DISABLE_DISPLAY(pDregs) { \ - volatile unsigned long *pDregsMiscVideo = \ - &((pDregs)->reg21.all); \ - volatile unsigned long *pDregsMiscCtl = \ - &((pDregs)->reg27.all); \ - \ - SETUP_HW(pDregs); \ - (pDregs)->reg21.all = *pDregsMiscVideo & ~0x0A000000; \ - (pDregs)->reg27.all = *pDregsMiscCtl & ~0x00800000; \ - } - -#define HYPER_CONFIG_PLANES_24 0x00000100 -#define IS_24_DEVICE(pScreenPriv) \ - (pScreenPriv->deviceSpecificConfig & HYPER_CONFIG_PLANES_24) - -#define IS_888_DEVICE(pScreenPriv) (!(IS_24_DEVICE(pScreenPriv))) - -#define HYPER_CURSOR_DATA_BIT 0x80 -#define HYPER_CURSOR_ENABLE_BIT 0x80000000 - -#define HYPER_SET_CURSOR_ADDRESS(value) \ - NGLE_WRITE32(DREGS_PTR->reg30, (value)) - -#define HYPER_WRITE_CURSOR_DATA(value) \ - NGLE_WRITE32(DREGS_PTR->reg31, (value)) - -#define HYPER_CURSOR_XY(x,y) \ - (((x<0)?(((-x & 0xfff) | 0x1000)<<16):((x & 0xfff)<<16)) | \ - ((y<0)?((-y & 0xfff) | 0x1000):(y & 0x1fff))); - -#define HYPER_ENABLE_CURSOR(pScreenPriv, hypCursorXYValue) \ -{ \ - /* Only called if cursor is visible */ \ - assert(pScreenPriv->sprite.visible == TRUE); \ - \ - /* Save value written for use by disable cursor */\ - pScreenPriv->sprite.enabledCursorXYValue = (hypCursorXYValue);\ - NGLE_WRITE32(pScreenPriv->pDregs->reg29.all, (hypCursorXYValue) | \ - HYPER_CURSOR_ENABLE_BIT); \ - \ -} - -#define HYPER_DISABLE_CURSOR(pScreenPriv) \ -{ \ - long enabledCursorValue = pScreenPriv->sprite.enabledCursorXYValue; \ - \ - NGLE_WRITE32(pScreenPriv->pDregs->reg29.all, (enabledCursorValue & \ - ~(HYPER_CURSOR_ENABLE_BIT))); \ -} - -/* Macros for controlling cursor position, used in ngleMoveSprite() */ -#define HYPER_ACCEL_BUSY_DODGER_IDLE \ - ((NGLE_READ32(DREGS_PTR->reg15.all) & 0xc001000) == 0x00010000) - - /* not FIFO paced */ -#define HYPER_CPC(pScreenPriv,bifCursorXYValue) \ - pScreenPriv->sprite.enabledCursorXYValue = (bifCursorXYValue); \ - NGLE_WRITE32(DREGS_PTR->reg17.all, \ - (bifCursorXYValue) | HYPER_CURSOR_ENABLE_BIT); - - /* FIFO paced */ -#define HYPER_FIFO_CP(pScreenPriv,hypCursorXYValue) \ - GET_FIFO_SLOTS(nFreeFifoSlots,2); \ - HYPER_GET_VID_BUS_ACCESS; \ - HYPER_ENABLE_CURSOR(pScreenPriv, hypCursorXYValue); - -#define HYPER_GET_VID_BUS_ACCESS \ - NGLE_WRITE32(DREGS_PTR->reg28,0); - -#define HYPER_ENABLE_DISPLAY(pDregs) \ -{ \ - volatile unsigned long *pDregsHypMiscVideo = \ - &((pDregs)->reg33); \ - \ - SETUP_HW(pDregs); \ - (pDregs)->reg33 = *pDregsHypMiscVideo | 0x0A000000; \ -} - -#define HYPER_DISABLE_DISPLAY(pDregs) \ -{ \ - volatile unsigned long *pDregsHypMiscVideo = \ - &((pDregs)->reg33); \ - \ - SETUP_HW(pDregs); \ - (pDregs)->reg33 = *pDregsHypMiscVideo & ~0x0A000000; \ -} - -/* define the various BufferNumber used by SETUP_ATTR_ACCESS */ -#define BUFF0_CMAP0 0x00001e02 -#define BUFF1_CMAP0 0x02001e02 -#define BUFF1_CMAP3 0x0c001e02 -#define ARTIST_CMAP0 0x00000102 -#define HYPER_CMAP8 0x00000100 -#define HYPER_CMAP24 0x00000800 - -#define SETUP_ATTR_ACCESS(pDregs,BufferNumber) { \ - SETUP_HW(pDregs); \ - (pDregs)->reg11 = 0x2EA0D000; \ - (pDregs)->reg14.all = 0x23000302; \ - (pDregs)->reg12 = (BufferNumber); \ - (pDregs)->reg8 = 0xffffffff; \ - } - -#define SET_ATTR_SIZE(pDregs,Width,Height) { \ - (pDregs)->reg6.all = 0; \ - (pDregs)->reg9.all = (Card32)(((Width)<<16)|(Height)); \ - (pDregs)->reg6.all = 0x05000000; \ - (pDregs)->reg9.all = 0x00040001; \ - } - -#define FINISH_ATTR_ACCESS(pDregs) { \ - SETUP_HW(pDregs); \ - (pDregs)->reg12 = 0; \ - } - -#define SETUP_COPYAREA(pDregs) \ - (pDregs)->reg16.b.b1 = 0; - -#define IndexedDcd 0 /* Pixel data is indexed (pseudo) color */ -#define Otc04 2 /* Pixels in each longword transfer (4) */ -#define Otc32 5 /* Pixels in each longword transfer (32) */ -#define Ots08 3 /* Each pixel is size (8)d transfer (1) */ -#define OtsIndirect 6 /* Each bit goes through FG/BG color(8) */ -#define AddrLong 5 /* FB address is Long aligned (pixel) */ -#define BINovly 0x2 /* 8 bit overlay */ -#define BINapp0I 0x0 /* Application Buffer 0, Indexed */ -#define BINapp1I 0x1 /* Application Buffer 1, Indexed */ -#define BINapp0F8 0xa /* Application Buffer 0, Fractional 8-8-8 */ -#define BINattr 0xd /* Attribute Bitmap */ -#define RopSrc 0x3 -#define BitmapExtent08 3 /* Each write hits ( 8) bits in depth */ -#define BitmapExtent32 5 /* Each write hits (32) bits in depth */ -#define DataDynamic 0 /* Data register reloaded by direct access */ -#define MaskDynamic 1 /* Mask register reloaded by direct access */ -#define MaskOtc 0 /* Mask contains Object Count valid bits */ - -#define MaskAddrOffset(offset) (offset) -#define StaticReg(en) (en) -#define BGx(en) (en) -#define FGx(en) (en) - -#define BAJustPoint(offset) (offset) -#define BAIndexBase(base) (base) -#define BA(F,C,S,A,J,B,I) \ - (((F)<<31)|((C)<<27)|((S)<<24)|((A)<<21)|((J)<<16)|((B)<<12)|(I)) - -#define IBOvals(R,M,X,S,D,L,B,F) \ - (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F)) - -#define NGLE_QUICK_SET_IMAGE_BITMAP_OP(val) \ - NGLE_WRITE32(DREGS_PTR->reg14.all, val) - -#define NGLE_QUICK_SET_DST_BM_ACCESS(val) \ - NGLE_WRITE32(DREGS_PTR->reg11, val) - -#define NGLE_QUICK_SET_CTL_PLN_REG(val) \ - NGLE_WRITE32(DREGS_PTR->reg12, val) - -#define NGLE_REALLY_SET_IMAGE_PLANEMASK(plnmsk32) \ - NGLE_WRITE32(DREGS_PTR->reg13, plnmsk32) - -#define NGLE_REALLY_SET_IMAGE_FG_COLOR(fg32) \ - NGLE_WRITE32(DREGS_PTR->reg35,fg32) - -#define NGLE_LONG_FB_ADDRESS(fbaddrbase, x, y) (void *) ( \ - (unsigned long) (fbaddrbase) + \ - ( \ - (unsigned int) ( (y) << 13 ) | \ - (unsigned int) ( (x) << 2 ) \ - ) \ - ) - -#define NGLE_BINC_SET_DSTADDR(addr) \ - NGLE_WRITE32(DREGS_PTR->reg3, (addr)) - -#define NGLE_BINC_SET_SRCADDR(addr) \ - NGLE_WRITE32(DREGS_PTR->reg2, (addr)) - -#define NGLE_BINC_SET_DSTMASK(mask) \ - NGLE_WRITE32(DREGS_PTR->reg22, (mask)) - -#define NGLE_BINC_WRITE32(data32) \ - NGLE_WRITE32(DREGS_PTR->reg23, (data32)) - -#define NGLE_MFGP_REGISTER_TYPE dreg_cplx_t -#define NGLE_MFGP_REGISTER_TYPE_ASLONG(ngleMfgpReg) ngleMfgpReg.all - -#define NGLE_SET_TRANSFERDATA(trandata32) \ - NGLE_WRITE32(DREGS_PTR->reg8, (trandata32)) - -#define HYPER_SET_LENXY_START_FAST_RECFILL(value) \ - NGLE_WRITE32(DREGS_PTR->reg37.all, (value)) - -#define NGLE_SET_LENXY_START_RECFILL(lenxy32) \ - NGLE_WRITE32(DREGS_PTR->reg9.all, (lenxy32)) - -#define SET_LENXY_START_RECFILL(lenxy32) \ - NGLE_SET_LENXY_START_RECFILL(NGLE_MFGP_REGISTER_TYPE_ASLONG(lenxy32)) - -#define NGLE_SET_SCOREBOARD_OVERRIDE(data32) -/* - NGLE_WRITE32(DREGS_PTR->bifSBO, data32) -*/ -#define NGLE_SET_DSTXY(xy32) \ - NGLE_WRITE32(DREGS_PTR->reg6.all, (xy32)) - -#define PACK_2CARD16(dest32, highcard16, lowcard16) \ - dest32.w.high = (highcard16); \ - dest32.w.low = (lowcard16); - -#define START_COLORMAPLOAD(cmapBltCtlData32) \ - NGLE_WRITE32(pDregs->reg38, (cmapBltCtlData32)) - -#endif /* NGLEHDW_H ]*/ Index: xc/programs/Xserver/hw/hp/ngle/nglenoop.c diff -u xc/programs/Xserver/hw/hp/ngle/nglenoop.c:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/nglenoop.c:removed --- xc/programs/Xserver/hw/hp/ngle/nglenoop.c:1.1.1.2 Tue Jan 16 17:43:17 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglenoop.c Thu Feb 27 12:29:25 2003 @@ -1,68 +0,0 @@ -/* $Xorg: nglenoop.c,v 1.3 2000/08/17 19:48:27 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - - * - *************************************************************************/ - -/* This file contains stub procedures that do nothing or very little. */ - -#ifndef MISC_H -#include "misc.h" -#endif /* MISC_H */ -#include "nglenoop.h" - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleNoop() - * - * Description: - * - * This routine does nothing. It is useful for stubbing out a procedure - * pointer for a procedure that doesn't return anything. - * - ******************************************************************************/ - -void ngleNoop() -{ -} /* ngleNoop() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleNoopTrue() - * - * Description: - * - * This routine just returns TRUE. It is useful for stubbing out a - * procedure pointer for a procedure that returns a boolean value - * where that value should be returned as TRUE. - * - ******************************************************************************/ - -Bool ngleNoopTrue() -{ - return(TRUE); -} /* ngleNoopTrue() */ Index: xc/programs/Xserver/hw/hp/ngle/nglenoop.h diff -u xc/programs/Xserver/hw/hp/ngle/nglenoop.h:1.1.1.2 xc/programs/Xserver/hw/hp/ngle/nglenoop.h:removed --- xc/programs/Xserver/hw/hp/ngle/nglenoop.h:1.1.1.2 Tue Jan 16 17:43:17 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglenoop.h Thu Feb 27 12:29:25 2003 @@ -1,36 +0,0 @@ -/* $Xorg: nglenoop.h,v 1.3 2000/08/17 19:48:28 cpqbld Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - - * - *************************************************************************/ - - -/* - ****************************************************************************** - ** - ** Extern declarations for Sprite Noop/stub procedures: - ** - ****************************************************************************** - */ - -extern void ngleNoop(); -extern Bool ngleNoopTrue(); Index: xc/programs/Xserver/hw/hp/ngle/nglescreen.c diff -u xc/programs/Xserver/hw/hp/ngle/nglescreen.c:1.4 xc/programs/Xserver/hw/hp/ngle/nglescreen.c:removed --- xc/programs/Xserver/hw/hp/ngle/nglescreen.c:1.4 Wed Jan 17 17:36:49 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglescreen.c Thu Feb 27 12:29:25 2003 @@ -1,2095 +0,0 @@ -/* $Xorg: nglescreen.c,v 1.3 2000/08/17 19:48:28 cpqbld Exp $ */ -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - - * - *************************************************************************/ - -/* $XFree86: xc/programs/Xserver/hw/hp/ngle/nglescreen.c,v 1.4 2001/01/17 22:36:49 dawes Exp $ */ - -/****************************************************************************** - * - * This file contains various global variables and routines concerning - * the Screen structure. This includes the ngleScreenInit routine. - * - ******************************************************************************/ - - -#include "ngle.h" - -#define DEFAULT_CRX_MONITOR_DIAGONAL 19 /* inches */ -#define LOWRES_CRX_MONITOR_DIAGONAL 16 /* inches */ - -#define HYPERBOWL_MODE_FOR_8_OVER_88_LUT0_NO_TRANSPARENCIES 4 -#define HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE 8 -#define HYPERBOWL_MODE01_8_24_LUT0_OPAQUE_LUT1_OPAQUE 10 -#define HYPERBOWL_MODE2_8_24 15 - -/* Can this graphics device be an ITE console? - * Most all NGLE graphics devices can be. - * The sole exception at this point (May'91) is the right-head of - * the Dual CRX card; only the left head can be an ITE console. - * - * The answer to this question is used to determine - * whether to issue ioctl(GCON) at startup and ioctl(GCTERM) - * at server exit (only should be done if ITE may be present). - * - * Answer is encoded in bit 2 of device file's minor number. - * - */ -#define IS_NOT_FIRST_HEAD_ON_THIS_SGC_SLOT(devMinorNumber) \ - (devMinorNumber & 0x00000004) - - - -/****************************************************************************** - * - * Extern and Forward Declarations: - * - ******************************************************************************/ - -extern double sqrt(double); -extern int monitorResolution; -extern int cfbScreenPrivateIndex; -extern int cfb32ScreenPrivateIndex; - -#ifdef HP_FAST_SCROLLING -/* The following are the extern declarations for the GCOps tables that - * CFB sets up and uses. If CFB changes the GCOps tables it uses, or - * adds any, this driver will also have to mirror those changes. - */ -extern GCOps cfbTEOps1Rect; -extern GCOps cfbNonTEOps1Rect; -extern GCOps cfbTEOps; -extern GCOps cfbNonTEOps; - -extern GCOps cfb32TEOps1Rect; -extern GCOps cfb32NonTEOps1Rect; -extern GCOps cfb32TEOps; -extern GCOps cfb32NonTEOps; -#endif - - -extern Bool (*ddxScreenInitPointer[])(); -extern hpPrivPtr hpPrivates[MAXSCREENS]; -extern Bool hyperResetPlanes(); - -Int32 ngleScreenPrivIndex = 0; - -/* FORWARD (procedures defined below in this file) */ - -static void hyperSetupPlanes( - NgleScreenPrivPtr pScreenPriv); - -static void rattlerSetupPlanes( - NgleScreenPrivPtr pScreenPriv); - -static void ngleSetupAttrPlanes( - NgleScreenPrivPtr pScreenPriv, - Card32 BufferNumber); - -static void elkSetupPlanes( - NgleScreenPrivPtr pScreenPriv); - -static Bool ngleClearScreen( - ScreenPtr pScreen); - -static Bool ngleSaveScreen( - ScreenPtr pScreen, - Bool on); - -static void ngleBlankOrUnblankScreen( - NgleScreenPrivPtr pScreenPriv, - Bool doBlank); - -static Bool ngleCloseScreen(); - -static void nglePolyPaintAttr( - NgleScreenPrivPtr pScreenPriv, - Card32 ctlPlaneReg, - Int32 nBoxes, - BoxPtr pBoxes); - -/* OWN */ - -static Card32 ngleScreenPrivGeneration = 0; -static Card32 cfbDualHeadBug = 0; -static Int32 cfbFirstIndex = 0; - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: duplicateDeviceFileInScreensFile() - * - * Description: check if device file number of this screen has already - * been opened by this server. - * - * The least significant bit is masked before checking for duplicates - * because: - * - This bit is used to distingish overlay from image plane sets. - * (Odd == overlay, by the way). - * - ******************************************************************************/ - -static Bool duplicateDeviceFileInScreensFile( - int myIndex, - int myMajorAndMinorDeviceNumber, - int *duplicateLine) -{ - int i; - hpPrivPtr php; - struct stat statInfo; - - if (myIndex == 0) - { - return(FALSE); - } - else - { - for (i = 0; i < myIndex; i++) - { - - if (ddxScreenInitPointer[i] && (i != myIndex)) /* DDX screen */ - { - php = hpPrivates[i]; - if(stat(php->StandardDevice,&statInfo) < 0) continue; - - if ((statInfo.st_rdev & 0xfffffffe) - == (myMajorAndMinorDeviceNumber & 0xfffffffe)) - { - *duplicateLine = (hpPrivates[myIndex])->LineNumber; - return (TRUE); - } - } - } - return(FALSE); - } -} /* duplicateDeviceFileInScreensFile() */ - - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: calculateDPI - * - * Description: Returns the value to use for dpi for this monitor. - * - ****************************************************************************** - */ - -static int calculateDPI( - int xsize, int ysize, - int diagonal_length) -{ - static int old_diagonal_length = 0; - int dpi = 0; - double f_diagonal_length = 1.0; - double f_num_diagonal_pix; - - f_num_diagonal_pix = sqrt((double)((xsize * xsize + ysize * ysize))); - - if (diagonal_length < 0) - { - FatalError("Incorrect monitor size specified in your /user/lib/X11/Xnscreens file.\n"); - } - if (diagonal_length == 0) - /* either first time (use default value) OR subsequent call - (use old value) */ - { - if (!(old_diagonal_length)) - /* first time */ - { - diagonal_length = DEFAULT_CRX_MONITOR_DIAGONAL; - } - else - /* second or subsequent use */ - { - diagonal_length = old_diagonal_length; - } - } - if(monitorResolution != 0) - dpi = monitorResolution; - else - if ((diagonal_length > 0) && (diagonal_length <= 100)) - /* assume it's inches -- subtract 1 inch */ - { - dpi = (int)(f_num_diagonal_pix / (((double)diagonal_length) - 1.0)); - /* along the diagonal */ - } - else if ((diagonal_length > 100) && (diagonal_length <= 1000)) - { - /* assume it's millimeters -- subtract 25.4 mm */ - - f_diagonal_length = (double)(diagonal_length - 25.4); - - dpi = (int)((f_num_diagonal_pix / f_diagonal_length) * 25.4); - - } - else - { - FatalError("Incorrect monitor size specified in your /user/lib/X11/Xnscreens file.\n"); - } - - old_diagonal_length = diagonal_length; - return(dpi); -} /* calculateDPI */ - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: ngleGetDeviceRomData() - * - * Description: Return pointer to in-memory structure holding - * ELK device-dependent ROM values. - * - ******************************************************************************/ - -static NgleDevRomDataPtr ngleGetDeviceRomData( - NgleScreenPrivPtr pScreenPriv) -{ - crt_frame_buffer_t gcDescribe; - Card32 *pBytePerLongDevDepData;/* data byte == LSB */ - Card32 *pRomTable; - NgleDevRomDataPtr pPackedDevRomData; - Int32 sizePackedDevRomData = sizeof(NgleDevRomDataRec); - Card8 *pCard8; - Int32 i; - Card8 *mapOrigin = (Card8 *) NULL; - Int32 fildes = pScreenPriv->fildes; - NgleHdwPtr pDregs = pScreenPriv->pDregs; - Int32 romTableIdx; - - - /* Allocate space for packed structure */ - pPackedDevRomData = (NgleDevRomDataPtr) Xcalloc(sizePackedDevRomData); - - /* Get information about the device from the kernel: */ - if (ioctl(fildes, GCDESCRIBE, &gcDescribe) == -1) - { - /* 3rd parm is dontcare on s700, ptr to 0 on s400 */ - ioctl(fildes, GCUNMAP, &mapOrigin); - close(fildes); - FatalError("File %s: unable to get kernel description of display.\n", - __FILE__); - } - - SETUP_HW(pDregs); - - if (pScreenPriv->deviceID == S9000_ID_ARTIST) - { - pPackedDevRomData->cursor_pipeline_delay = 4; - pPackedDevRomData->video_interleaves = 4; - } - else - { - /* Get pointer to unpacked byte/long data in ROM */ - pBytePerLongDevDepData = (Card32 *) - gcDescribe.crt_region[NGLEDEVDEPROM_CRT_REGION]; - - /* Tomcat supports several resolutions: 1280x1024, 1024x768, 640x480. - * This code reads the index into a device dependent ROM array - * containing the device's currently selected resolution. - */ - if (pScreenPriv->deviceID == S9000_ID_TOMCAT) - { - /* jump to the correct ROM table */ - GET_ROMTABLE_INDEX(romTableIdx); - while (romTableIdx > 0) - { - pCard8 = (Card8 *) pPackedDevRomData; - pRomTable = pBytePerLongDevDepData; - /* Pack every fourth byte from ROM into structure */ - for (i = 0; i < sizePackedDevRomData; i++) - { - *pCard8++ = (Card8) (*pRomTable++); - } - - pBytePerLongDevDepData = (Card32 *) - ((Card8 *) pBytePerLongDevDepData + - pPackedDevRomData->sizeof_ngle_data); - - romTableIdx--; - } - } - - pCard8 = (Card8 *) pPackedDevRomData; - - /* Pack every fourth byte from ROM into structure */ - for (i = 0; i < sizePackedDevRomData; i++) - { - *pCard8++ = (Card8) (*pBytePerLongDevDepData++); - } - } - - SETUP_FB(pDregs,pScreenPriv->deviceID,pScreenPriv->devDepth); - - return(pPackedDevRomData); -} /* ngleGetDeviceRomData() */ - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: stringContainsString - * - * Description: Does string in parm1 contain string in parm2? - * - * Limitations: - * Case-sensitive - * - ******************************************************************************/ - -static Bool stringContainsString( - char *pString, - char *pSubString) -{ - char *pCurPos = pString; - int len = strlen(pSubString); - - while (pCurPos = (char *) strchr(pCurPos, pSubString[0])) - { - if (bcmp(pCurPos, pSubString, len) == 0) - return(TRUE); - else - pCurPos++; - } - return(FALSE); -} /* stringContainsString */ - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: firstScreenOpenedOnThisSgcSlot() - * - * Description: - * - * Given the possibility of 2 heads on a Dual CRX being controlled - * by a single X server, is this screen the first screen on this - * SGC slot to be opened? - * - * Assumption: - * Procedure is actually used to determined whether this screen - * will be the LAST to CLOSE. This is valid assumption because - * Server closes devices in reverse order in which they were - * opened (first device opened is last device closed). - * - * So to restate: X server first opens device at index 0 and increments - * index. It closes highest numbered indexed device first and decrements, - * closing device at index 0 last. - * - * Limitations: - * Does NOT check for identical minor numbers (i.e, same device is - * listed more than once in X*screens file). - * - ******************************************************************************/ - -static Bool firstScreenOpenedOnThisSgcSlot( - Int32 index, /* IN Current screen index */ - dev_t devMinorNumber) /* IN of current device */ -{ - int i; - hpPrivPtr php; - struct stat statInfo; - - if (index == 0) - { - return(TRUE); - } - else - { - for (i = 0; i < index; i++) - { - - if (ddxScreenInitPointer[i] && (i != index)) /* DDX screen */ - { - php = hpPrivates[i]; - if(stat(php->StandardDevice,&statInfo) < 0) continue; - - /* Dual CRX convention: use bit 2 to indicate which head. - * And don't bother checking bit 0 and bit 1, which - * should always be zero for Dual CRX. - */ - if ((statInfo.st_rdev&0xfffffff8)==(devMinorNumber&0xfffffff8)) - { - return (FALSE); - } - } - } - return(TRUE); - } -} /* firstScreenOpenedOnThisSgcSlot */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleScreenInit() - * - * Description: - * - * This routine implements pScreen->ScreenInit for the NGLE DDX Driver. - * - ******************************************************************************/ - -Bool ngleScreenInit( - Int32 index, - ScreenPtr pScreen, - Int32 argc, - char **argv) -{ - - NgleScreenPrivPtr pScreenPriv; - NgleHdwPtr pDregs; - struct stat statInfo; - hpPrivPtr php; - int duplicateLine; - int fildes; - unsigned char *mapOrigin; - Card8 *fbaddr; - crt_frame_buffer_t gcDescribe; - char *grayscaleEnvar = (char *) 0; - char *moveCursorEnvar = (char *) 0; - int monitorDiagonal = DEFAULT_CRX_MONITOR_DIAGONAL; - int dpi; - NgleDevRomDataPtr pDevRomData; - VisualPtr pVisuals; - int i; - - - /* - ************************************************************************** - ** - ** Allocate and Start Initializing the pScreenPriv Structure: - ** - ************************************************************************** - */ - - /* Allocate the private index for screen. */ - if (ngleScreenPrivGeneration != serverGeneration) - { - if ((ngleScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) - return(FALSE); - ngleScreenPrivGeneration = serverGeneration; - } - - /* Allocate the screen private structure (pScreenPriv), zero it (just - * in case), point pScreen to it, and point it towards pScreen): - */ - if (!(pScreenPriv = (NgleScreenPrivPtr) Xalloc(sizeof(NgleScreenPrivRec)))) - return(FALSE); - bzero((char *) pScreenPriv, sizeof(NgleScreenPrivRec)); - pScreen->devPrivates[ngleScreenPrivIndex].ptr = (pointer) pScreenPriv; - - /* Initialize the HP Private Structure: */ - php = (hpPrivPtr) hpPrivates[pScreen->myNum]; - pScreen->devPrivate = (pointer) php; - - pScreenPriv->pScreen = pScreen; - pScreenPriv->myNum = index; - - - /* - ************************************************************************** - ** - ** Open, Map, Init and Get Information about the Device: - ** - ** Obtain values for these pScreenPriv fields via ioctl() calls: - ** - fildes (from open of device file) - ** - deviceID (from ioctl(GCDESCRIBE.crt_id) - ** - pDregs (from ioctl(GCDESCRIBE.crt_control_base) - ** - fbaddr (from ioctl(GCDESCRIBE.crt_frame_base) - ** - ************************************************************************** - */ - - /* Stat the file descriptor to see if the device exists: */ - if(stat(php->StandardDevice, &statInfo) < 0) - { - char errorString[80]; - - FatalError("Unable to stat() device file \"%s\"!\n", php->StandardDevice); - } - - /* Check for duplicate entries for the same device file */ - if (duplicateDeviceFileInScreensFile(index, statInfo.st_rdev, - &duplicateLine)) - { - ErrorLine(php); - ErrorF("Duplicate device entry in line %d.\n", duplicateLine); - FatalError("Cannot continue...\n"); - } - - /* Open the device file: */ - if((fildes = open(php->StandardDevice, O_RDWR)) == -1) - { - FatalError("Unable to open() device file \"%s\"!\n", php->StandardDevice); - } - pScreenPriv->fildes = fildes; - - mapOrigin = (Card8 *) NULL; - - /* Map the framebuffer. - * - * Note that a given process can call GCMAP for the same SGC slot - * more than once without error (can occur with server mapping - * both heads of a DualCRX). - */ - if (ioctl(fildes, GCMAP, &mapOrigin) == -1) - { - close(fildes); - FatalError("Unable to map graphics display into user space!\n"); - } - - /* Get information about the device from the kernel: */ - if (ioctl(fildes, GCDESCRIBE, &gcDescribe) == -1) - { - ioctl(fildes, GCUNMAP, &mapOrigin); - close(fildes); - FatalError("Unable to get kernel description of display!\n"); - } - - /* Reject any device not in the NGLE family */ - if ( (gcDescribe.crt_id != S9000_ID_A1659A) /* CRX */ - && (gcDescribe.crt_id != S9000_ID_ELM) /* GRX */ - && (gcDescribe.crt_id != S9000_ID_TIMBER) /* 710 Any */ - && (gcDescribe.crt_id != S9000_ID_TOMCAT) /* Dual CRX */ - && (gcDescribe.crt_id != S9000_ID_A1439A) /* CRX24 */ - && (gcDescribe.crt_id != S9000_ID_ARTIST) /* Artist */ - && (gcDescribe.crt_id != S9000_ID_HCRX) /* Hyperdrive */ - ) - { - ioctl(fildes, GCUNMAP, &mapOrigin); - close(fildes); - FatalError( - "Graphics device has a unrecognized graphics crt_id of 0x%08x!\n", - gcDescribe.crt_id); - } - - /* Get some values from the gcDescribe structure: - * gcDescribe.crt_id: - * on s700, will equal 4 most significant bytes of graphics ID - * stored in Standard Text Interface ROM - * (offsets 0x0013, 0x0017, 0x001b, 0x001f of STI ROM). - * gcDescribe.crt_control_base: - * on all hpux systems, will point to start of control register - * space, skipping over 1MB of ROM space. - * gcDescribe.crt_frame_base: - * on all hpux systems, will point to start of framebuffer, - * offset 16MB from start of NGLE address space. - * - * For 2-headed devices such as Dual CRX, these pDregs and fbaddr - * settings will be overridden in the device-specific processing - * below (addresses of 2nd "right" head returned as crt_regions). - */ - pScreenPriv->deviceID = gcDescribe.crt_id; - pScreenPriv->pDregs = pDregs - = (NgleHdwPtr) gcDescribe.crt_control_base; - pScreenPriv->fbaddr = (pointer) gcDescribe.crt_frame_base; - pScreenPriv->devWidth = gcDescribe.crt_total_x; - pScreenPriv->screenWidth = gcDescribe.crt_x; - pScreenPriv->screenHeight = gcDescribe.crt_y; - - for (i=0; i < CRT_MAX_REGIONS; i++) - { - pScreenPriv->crt_region[i] = gcDescribe.crt_region[i]; - } - - /* Set the device frame buffer depth. The default depth is set to - * 8, but can be changed by setting the depth parameter in the - * Xnscreens file. Currently, we only support depth 24 on CRX24 & HCRX24, - * and depth 8 on the remaining displays. - */ - - if ((pScreenPriv->deviceID == S9000_ID_A1439A) || - (pScreenPriv->deviceID == S9000_ID_HCRX)) - pScreenPriv->devDepth = php->depth; - else - pScreenPriv->devDepth = 8; - - if (pScreenPriv->deviceID == S9000_ID_TOMCAT) - { - /* If second "right" device, grab addresses of frame buffer - * and control space from crt_regions rather than the - * typical crt_frame_base and crt_control_base. - * - * Convention: bit 2 (third least significant bit) of - * device file's minor number == 1 indicates right device. - */ - if (IS_NOT_FIRST_HEAD_ON_THIS_SGC_SLOT(statInfo.st_rdev)) - { - pScreenPriv->pDregs - = pDregs - = (NgleHdwPtr) gcDescribe.crt_region[3]; - pScreenPriv->fbaddr - = (pointer) gcDescribe.crt_region[2]; - } - } - - - /* Graphics devices will typically call ioctl(CGUNMAP) at screen close. - * - * Exception: the second device on a Tomcat (Dual CRX), - * where "second" means that the other head on the same Dual CRX - * appears before it in the X*screens file. - * - * Set typical value here and allow overriding in device-specific - * processing below. - */ - pScreenPriv->lastDeviceOnThisSgcToClose = TRUE; - - - /* - ************************************************************************** - ** - ** Device Dependent Initializations - ** - ************************************************************************** - */ - - pScreenPriv->pDevRomData = ngleGetDeviceRomData(pScreenPriv); - - /* Device-specific settings */ - switch (pScreenPriv->deviceID) - { - case S9000_ID_ELM: /* A1924 Gray-Scale GRX */ - - pScreenPriv->isGrayScale = TRUE; - - /* Since A1924 is a grayscale CRX and the grayscale variable - * has just been set, set device ID - * to that of CRX so that the rest of the driver may - * appropriately consider this to be a CRX. - */ - pScreenPriv->deviceID = S9000_ID_A1659A; - break; - - case S9000_ID_HCRX: /* Hyperdrive */ - /* Hyperdrive doesn't use STI ROM info so don't bother reading it */ - pScreenPriv->pDevRomData = NULL; /* #### strange #### */ - NGLE_LOCK(pScreenPriv); - { - CARD32 *sti_rom_address; - CARD32 temp; - /* - * In order to read the Hyperdrive configuration bits, we need to - * read the STI ROM. But, the STI ROM is not always mapped into - * the STI ROM space. Sometimes the STI ROM is mapped into the - * BOOT ROM space. To find the true STI ROM space, we need to - * look at the crt_region array in the gcDescribe structure. - * The STI ROM address will either be in entry 0 or entry 1. - * If entry 0 is mapped into the same space as the control space, - * then this is the true STI ROM space. If entry 0 is in another - * space, then entry 1 has the true STI ROM space. The space bits - * of the address are the upper 6 bits of the address. For example, - * if the address is 0xf4100000, then the space is 0xf4000000. - */ - if (((CARD32) pScreenPriv->pDregs & 0xfc000000) == - ((CARD32) pScreenPriv->crt_region[0] & 0xfc000000)) - { - sti_rom_address = (CARD32 *) pScreenPriv->crt_region[0]; - } - else - { - sti_rom_address = (CARD32 *) pScreenPriv->crt_region[1]; - } - - /* - * Ok, grab the configuration bits from the hardware. These bits - * come from Dodger and are added to any data read from the STI ROM. - * When reading the STI ROM, we need to avoid a potential race - * condition by doing a couple of things. We first need to read - * some unbuffered register like BIFF status. Next we need to wait - * for Dodger to go not busy. Then we can safely read the STI ROM. - */ - temp = NGLE_READ32(pDregs->reg15.all); - SETUP_HW(pDregs); - pScreenPriv->deviceSpecificConfig = *sti_rom_address; - } - NGLE_UNLOCK(pScreenPriv); - - pScreenPriv->isGrayScale = FALSE; /* No grayscale version */ - break; - - case S9000_ID_ARTIST: /* Artist */ - case S9000_ID_A1439A: /* CRX24 */ - case S9000_ID_A1659A: /* CRX */ - - pScreenPriv->isGrayScale = FALSE; /* No grayscale version */ - break; - - case S9000_ID_TIMBER: /* HP9000/710 Graphics */ - /* There are 3 configurations, all with the - * same Graphics ID: - * - 1280x1024 Color - * - 1280x1024 Grayscale - * - 1024x768 Color. - * The difference in color resolutions is handled simply - * by using the width/height values in gcDescribe. - * Color vs. Grayscale is handled by placing the - * word "GRAYSCALE" in the crt_name returned in gcDescribe - * for grayscale Timber graphics devices. - */ - /* Be color unless grayscale indicated in crt_name - */ - if ( stringContainsString(gcDescribe.crt_name, "GRAYSCALE") - || stringContainsString(gcDescribe.crt_name, "Grayscale") - || stringContainsString(gcDescribe.crt_name, "grayscale")) - { - pScreenPriv->isGrayScale = TRUE; - } - else - { - pScreenPriv->isGrayScale = FALSE; - } - break; - - case S9000_ID_TOMCAT: /* Dual CRX */ - - pScreenPriv->isGrayScale = FALSE; - - /* If not the head first appearing in X*screens file: - * - set variable so ioctl(GCUNMAP) is not called at exit. - * - Initialize related screen pointers for this 2nd - * screen AND for related screen opened earlier. - */ - if (!firstScreenOpenedOnThisSgcSlot( - index, statInfo.st_rdev)) - { - pScreenPriv->lastDeviceOnThisSgcToClose = FALSE; - } - - /* Dual CRX supports several resolutions: 1280x1024, 1024x768, 640x480. - * This code reads the BIFF scratch register to get the index into a - * device dependent ROM array containing the device's currently - * selected resolution. - */ - pScreenPriv->screenWidth = pScreenPriv->pDevRomData->x_size_visible ; - pScreenPriv->screenHeight = pScreenPriv->pDevRomData->y_size_visible; - - /* Since Tomcat is a 2-headed CRX and all Tomcat-specific - * processing has just been completed, set the device ID - * to that of CRX so that the rest of the driver may - * appropriately consider this to be a CRX. - */ - pScreenPriv->deviceID = S9000_ID_A1659A; - break; - - default: - FatalError("Undefined device id!\n"); - break; - } /* switch (pScreenPriv->deviceID) */ - - - /* - ************************************************************************** - ** - ** Perform ioctl() initialization of graphics device. - ** - ************************************************************************** - */ - - ioctl(fildes, GCSTATIC_CMAP, &mapOrigin); - - - /************************************************************************** - ** - ** Set up the Ngle hardware in a byte-per-pixel mode. - ** - ************************************************************************** - */ - - SETUP_FB(pDregs,pScreenPriv->deviceID,pScreenPriv->devDepth); - - - /************************************************************************** - ** - ** Set up screen dimensions. These values are needed to pass - ** to cfbScreenInit(). - ** - ************************************************************************** - */ - - /* Use the hp procedure to define the screen width and height, - * using the screen's diagonal, which defaults to 19" for CRX - * but may be overridden in the X*screens file "monitorsize <n>" - * parameter (in which case php->MonitorDiagonal is non-zero). - */ - if (php->MonitorDiagonal != 0) - monitorDiagonal = php->MonitorDiagonal; - else - { /* A 1024x768 CRX (with same ID) may be offered. - * It will use 16" monitor. The following rule assumes - * that higher resolution versions will use 19" monitor - * (Currently the case with CRX and CRX24). - */ - if (pScreenPriv->screenWidth <= 1024) - { - monitorDiagonal = LOWRES_CRX_MONITOR_DIAGONAL; /* 16 inches */ - } - else - { - monitorDiagonal = DEFAULT_CRX_MONITOR_DIAGONAL; /* 19 inches */ - } - } - - dpi = calculateDPI( pScreenPriv->screenWidth, pScreenPriv->screenHeight, - monitorDiagonal); - - -#ifdef HP_FAST_SCROLLING - /* - ************************************************************************** - ** - ** Change the CFB GCOpts tables to use our CopyArea routine - ** instead of the CFB version. Do this before calling and - ** CFB initialization code. - ** - ** Note: If in the future, CFB adds / deletes / changes GCOpts - ** tables, respective changes will have to be made in this - ** code also. - ** - ************************************************************************** - */ - - cfbTEOps1Rect.CopyArea = ngleCopyArea8; - cfbNonTEOps1Rect.CopyArea = ngleCopyArea8; - cfbTEOps.CopyArea = ngleCopyArea8; - cfbNonTEOps.CopyArea = ngleCopyArea8; - -#ifndef LOWMEMFTPT - cfb32TEOps1Rect.CopyArea = ngleCopyArea24; - cfb32NonTEOps1Rect.CopyArea = ngleCopyArea24; - cfb32TEOps.CopyArea = ngleCopyArea24; - cfb32NonTEOps.CopyArea = ngleCopyArea24; -#endif /* ifndef LOWMEMFTPT */ -#endif - - - /* - ************************************************************************** - ** - ** 11. Call pNgleScreenInit->InitMiscConfig to perform - ** device-dependent configuration and initialization - ** that does not change the hardware state. - ** - ** FIRST READ-ONLY ACCESS TO HARDWARE BY SERVER - ** (not counting indirect access via kernel ioctl calls) - ************************************************************************** - */ - if (pScreenPriv->deviceID == S9000_ID_HCRX) - { - Card32 hyperbowl; - Int32 nFreeFifoSlots = 0; - - /* Initialize Hyperbowl registers */ - GET_FIFO_SLOTS(nFreeFifoSlots, 7); - if (IS_24_DEVICE(pScreenPriv)) - { - if (pScreenPriv->devDepth == 24) - hyperbowl = HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE; - else - hyperbowl = HYPERBOWL_MODE01_8_24_LUT0_OPAQUE_LUT1_OPAQUE; - - /* First write to Hyperbowl must happen twice (bug) */ - NGLE_WRITE32(pDregs->reg40, hyperbowl); - NGLE_WRITE32(pDregs->reg40, hyperbowl); - - NGLE_WRITE32(pDregs->reg39, HYPERBOWL_MODE2_8_24); - - NGLE_WRITE32(pDregs->reg42, 0x014c0148); /* Set lut 0 to be the direct color */ - NGLE_WRITE32(pDregs->reg43, 0x404c4048); - NGLE_WRITE32(pDregs->reg44, 0x034c0348); - NGLE_WRITE32(pDregs->reg45, 0x444c4448); - } - else - { - hyperbowl = HYPERBOWL_MODE_FOR_8_OVER_88_LUT0_NO_TRANSPARENCIES; - - /* First write to Hyperbowl must happen twice (bug) */ - NGLE_WRITE32(pDregs->reg40, hyperbowl); - NGLE_WRITE32(pDregs->reg40, hyperbowl); - - NGLE_WRITE32(pDregs->reg42, 0); - NGLE_WRITE32(pDregs->reg43, 0); - NGLE_WRITE32(pDregs->reg44, 0); - NGLE_WRITE32(pDregs->reg45, 0x444c4048); - } - } - - - /* - ************************************************************************** - ** - ** Call CFB routines to begin setting up of screen and - ** visual default values. - ** - ** Call cfbScreenInit() to set up default pScreen values, but - ** first call cfbSetVisualTypes to only support a subset of the - ** possible visuals. - ** - ************************************************************************** - */ - -#ifndef LOWMEMFTPT - if (pScreenPriv->devDepth == 8) -#endif /* ifndef LOWMEMFTPT */ - /* only support PseudoColor */ - { - cfbSetVisualTypes (8, 1<<PseudoColor, 8); - - cfbScreenInit(pScreen, pScreenPriv->fbaddr, pScreenPriv->screenWidth, - pScreenPriv->screenHeight, dpi, dpi, - pScreenPriv->devWidth); - } - -#ifndef LOWMEMFTPT - else /* depth = 24 */ - /* only support Directcolor */ - { - cfbSetVisualTypes (24, 1<<DirectColor, 8); - - cfb32ScreenInit(pScreen, pScreenPriv->fbaddr, pScreenPriv->screenWidth, - pScreenPriv->screenHeight, dpi, dpi, - pScreenPriv->devWidth); - } - -#endif /* ifndef LOWMEMFTPT */ - - miInitializeBackingStore(pScreen); - - /* - * The following section of code is to correct a bug in the MIT-provided - * visual initialization code. CFB assumes that for a depth 24 display, - * all hardware writes the bits to the frame buffer in the blue - green - - * red order. For HP's Ngle family of depth 24 displays, we write - * them in RGB order, not GBR order. To correct this problem, I will - * change the affected values of the visual records to the correct - * values. - */ - - pVisuals = pScreen->visuals; - for (i = 1; i <= pScreen->numVisuals ; i++ ) - { - if ((pVisuals->class == DirectColor) && (pVisuals->nplanes == 24)) - { - /* correct the RGB masks and offsets that were set by */ - /* cfbScreenInit(). */ - pVisuals->redMask = 0xff0000; - pVisuals->greenMask = 0xff00; - pVisuals->blueMask = 0xff; - pVisuals->offsetRed = 16; - pVisuals->offsetGreen = 8; - pVisuals->offsetBlue = 0; - } - pVisuals++; - } - - - /* - * This section of code is to correct a bug in the CFB - * implementation of dual head support. - */ - - if (cfbDualHeadBug != serverGeneration) - { -#ifndef LOWMEMFTPT - if (pScreenPriv->devDepth == 8) -#endif /* ifndef LOWMEMFTPT */ - cfbFirstIndex = cfbScreenPrivateIndex; -#ifndef LOWMEMFTPT - else - cfbFirstIndex = cfb32ScreenPrivateIndex; -#endif /* ifndef LOWMEMFTPT */ - - cfbDualHeadBug = serverGeneration; - } - else - { -#ifndef LOWMEMFTPT - if (pScreenPriv->devDepth == 8) -#endif /* ifndef LOWMEMFTPT */ - pScreen->devPrivates[cfbFirstIndex].ptr = - pScreen->devPrivates[cfbScreenPrivateIndex].ptr; -#ifndef LOWMEMFTPT - else - pScreen->devPrivates[cfbFirstIndex].ptr = - pScreen->devPrivates[cfb32ScreenPrivateIndex].ptr; -#endif /* ifndef LOWMEMFTPT */ - -#ifndef LOWMEMFTPT - cfbScreenPrivateIndex = cfb32ScreenPrivateIndex = cfbFirstIndex; -#else - cfbScreenPrivateIndex = cfbFirstIndex; -#endif /* ifndef LOWMEMFTPT */ - } - - - /* - ************************************************************************** - ** - ** Fill in Many of the pScreen Procedure Pointers and Values: - ** - ************************************************************************** - */ - - /**** Random screen procedures: ****/ - pScreenPriv->CloseScreen = pScreen->CloseScreen; - pScreen->CloseScreen = ngleCloseScreen; - pScreen->SaveScreen = ngleSaveScreen; - - /**** Colormap Procedures: ****/ - pScreen->CreateColormap = ngleCreateColormap; - pScreen->DestroyColormap = ngleDestroyColormap; - pScreen->InstallColormap = ngleInstallColormap; - pScreen->UninstallColormap = ngleUninstallColormap; - pScreen->ListInstalledColormaps = ngleListInstalledColormaps; - pScreen->StoreColors = ngleStoreColors; - pScreen->ResolveColor = ngleResolvePseudoColor; - - - /* - ************************************************************************** - ** - ** Set White and Black Pixel. - ** - ************************************************************************** - */ - - /* Set the pixel index for the default black pixel and white pixel. - * Used to be always 0 and 1, respectively, but with gray scale - * default colormap ramping from 1 to 255, it made sense to make - * 255 the white pixel. - */ - pScreen->blackPixel = 0; - pScreen->whitePixel = 1; - if (pScreenPriv->isGrayScale) - { - pScreen->whitePixel = 255; - } - else if (pScreenPriv->devDepth == 24) - { - pScreen->blackPixel = 0x000000; - pScreen->whitePixel = 0xffffff; - } - - - /* - ************************************************************************** - ** - ** Fill in Many Parts of the Screen Private Structure that - ** haven't been filled in yet: - ** - ************************************************************************** - */ - - /* Allow user to override driver control over whether - * cursors are moved only during vertical blank. - */ - pScreenPriv->moveCursorOnVBlank = CURSOR_AT_VBLANK_DRIVEROPTION; - - moveCursorEnvar = getenv("HPGCRX_MOVE_CURSOR_ON_VBLANK"); - if ( (strcmp(moveCursorEnvar, "FALSE") == 0) - || (strcmp(moveCursorEnvar, "False") == 0) - || (strcmp(moveCursorEnvar, "false") == 0) - || (strcmp(moveCursorEnvar, "0") == 0)) - { - pScreenPriv->moveCursorOnVBlank = CURSOR_AT_VBLANK_NEVER; - } - else - { - if ( (strcmp(moveCursorEnvar,"TRUE") == 0) - || (strcmp(moveCursorEnvar,"True") == 0) - || (strcmp(moveCursorEnvar,"true") == 0) - || (strcmp(moveCursorEnvar,"1") == 0)) - { - pScreenPriv->moveCursorOnVBlank = CURSOR_AT_VBLANK_ALWAYS; - } - } - - - /* - ************************************************************************** - ** - ** Initialize the Colormap Structures and Code: - ** - ** Causes default colormap to be loaded into hardware, - ** so must follow general hardware setup. - ** - ************************************************************************** - */ - - pScreen->defColormap = (Colormap) FakeClientID(0); - ngleCreateDefColormap(pScreen); - - - /* - ************************************************************************** - ** - ** Initialize the Cursor (Sprite and Echo) Structures, Code, - ** and pScreen procedure pointers for cursors: - ** - ************************************************************************** - */ - - if (pScreenPriv->deviceID == S9000_ID_HCRX) - { - hyperInitSprite(pScreen); - } - else - { - ngleInitSprite(pScreen); - } - - /* - ************************************************************************** - ** - ** 20. Call hyperResetPlanes() to initialize the image, - ** overlay and attribute planes. This includes doing what is - ** necessary to counteract what the ITE has done - ** - ************************************************************************** - */ - - if (pScreenPriv->deviceID == S9000_ID_HCRX) - { - hyperResetPlanes(pScreenPriv, SERVER_INIT); - } - - /* Initialize the non HCRX image planes. */ - - /* On CRX24, ITE has set up overlay planes to be 3-plane - * device. Set up overlays to be 8 planes and write all - * pixels to transparent. Then set up the framebuffer colormap - * to use all 8 bits. - * - * On CRX, set up the framebuffer colormap to use - * all 8 bits. - */ - - else if (pScreenPriv->deviceID == S9000_ID_A1439A) /* CRX24 */ - { - rattlerSetupPlanes(pScreenPriv); - } - else if ((pScreenPriv->deviceID == S9000_ID_A1659A) || /* CRX or GRX */ - (pScreenPriv->deviceID == S9000_ID_ARTIST) /* Artist */ - ) - { - elkSetupPlanes(pScreenPriv); - } - - /* Clear attribute planes on non HCRX devices. - */ - if ((pScreenPriv->deviceID == S9000_ID_A1659A) || /* CRX or GRX */ - (pScreenPriv->deviceID == S9000_ID_A1439A) || /* CRX24 */ - (pScreenPriv->deviceID == S9000_ID_ARTIST) /* Artist */ - ) - { - if (pScreenPriv->devDepth == 24) - ngleSetupAttrPlanes(pScreenPriv, BUFF1_CMAP3); - else /* depth = 8 */ - if (pScreenPriv->deviceID == S9000_ID_ARTIST) - ngleSetupAttrPlanes(pScreenPriv, ARTIST_CMAP0); - else - ngleSetupAttrPlanes(pScreenPriv, BUFF1_CMAP0); - } - - /* - ************************************************************************** - ** - ** Initialize screen saver: - ** - ************************************************************************** - */ - - /* Make sure video blank enable is turned off. Could happen in - * rare case: kill -9 of blanked X server (ngleCloseScreen - * code not executed). - */ - ngleBlankOrUnblankScreen(pScreenPriv, SCREEN_SAVER_OFF); - - - /* - ************************************************************************** - ** - ** Put the Ngle hardware into a byte-per-pixel state: - ** - ************************************************************************** - */ - - SETUP_FB(pDregs,pScreenPriv->deviceID,pScreenPriv->devDepth); - - - /* - ************************************************************************** - ** - ** If we got to here, ngleScreenInit() was successful and we - ** should return TRUE: - ** - ************************************************************************** - */ - return(TRUE); - -} /* ngleScreenInit() */ - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: elkSetupPlanes - * - ******************************************************************************/ - -static void elkSetupPlanes( - NgleScreenPrivPtr pScreenPriv) -{ - NgleHdwPtr pDregs; - - pDregs = (NgleHdwPtr) pScreenPriv->pDregs; - - /********************************************** - * Write RAMDAC pixel read mask register so all overlay - * planes are display-enabled. (CRX uses Bt458 pixel - * read mask register). - **********************************************/ - SETUP_RAMDAC(pDregs); - - SETUP_FB(pDregs, pScreenPriv->deviceID, pScreenPriv->devDepth); - -} /* elkSetupPlanes() */ - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: rattlerSetupPlanes - * - ******************************************************************************/ - -static void rattlerSetupPlanes( - NgleScreenPrivPtr pScreenPriv) -{ - NgleHdwPtr pDregs; - Int32 x, y; - Card32 *bits; - - pDregs = (NgleHdwPtr) pScreenPriv->pDregs; - - /********************************************** - * Write RAMDAC pixel read mask register so all overlay - * planes are display-enabled. (CRX24 uses Bt462 pixel - * read mask register for overlay planes, not image planes). - **********************************************/ - CRX24_SETUP_RAMDAC(pDregs); - - SETUP_FB(pDregs, CRX24_OVERLAY_PLANES, pScreenPriv->devDepth); - - for (y=0; y < pScreenPriv->screenHeight; y++) - { - bits = (Card32 *) ((char *)pScreenPriv->fbaddr + y * - pScreenPriv->devWidth); - x = pScreenPriv->screenWidth >> 2; - do - { - *bits++ = 0xffffffff; - } while (x--); - } - - CRX24_SET_OVLY_MASK(pDregs); - SETUP_FB(pDregs,pScreenPriv->deviceID,pScreenPriv->devDepth); - -} /* rattlerSetupPlanes() */ - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: hyperSetupPlanes - * - ******************************************************************************/ - -static void hyperSetupPlanes( - NgleScreenPrivPtr pScreenPriv) -{ - NgleHdwPtr pDregs; - Int32 x, y; - Card32 *bits; - - pDregs = (NgleHdwPtr) pScreenPriv->pDregs; - - /************************************************** - ** Need to clear screen - **************************************************/ -/* - if (IS_24_DEVICE(pScreenPriv)) - ngleDepth24_ClearImagePlanes(pScreenPriv); - else - ngleDepth8_ClearImagePlanes(pScreenPriv); - -*/ - /********************************************** - * Write RAMDAC pixel read mask register so all overlay - * planes are display-enabled. (CRX24 uses Bt462 pixel - * read mask register for overlay planes, not image planes). - **********************************************/ - HCRX_SETUP_RAMDAC(pDregs); - - - SETUP_FB(pDregs, S9000_ID_HCRX, pScreenPriv->devDepth); - - for (y=0; y < pScreenPriv->screenHeight; y++) - { - bits = (Card32 *) ((char *)pScreenPriv->fbaddr + y * - pScreenPriv->devWidth); - x = pScreenPriv->screenWidth >> 2; - do - { - *bits++ = 0xffffffff; - } while (x--); - } - - CRX24_SET_OVLY_MASK(pDregs); - SETUP_FB(pDregs,pScreenPriv->deviceID,pScreenPriv->devDepth); - -} /* hyperSetupPlanes() */ - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: ngleSetupAttrPlanes - * - ******************************************************************************/ - -static void ngleSetupAttrPlanes( - NgleScreenPrivPtr pScreenPriv, - Card32 BufferNumber) -{ - NgleHdwPtr pDregs = pScreenPriv->pDregs; - - SETUP_ATTR_ACCESS(pDregs, BufferNumber); - - SET_ATTR_SIZE(pDregs, pScreenPriv->screenWidth, pScreenPriv->screenHeight); - - FINISH_ATTR_ACCESS(pDregs); - - SETUP_FB(pDregs, pScreenPriv->deviceID, pScreenPriv->devDepth); - -} /* ngleSetupAttrPlanes() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleClearScreen() - * - * Description: - * - * This local routine clears the screen to all zeroes. - * (this is not speed-critical routine - used only at server exit) - * Slow but thorough technique: clear both application buffers - * and for Ratter, overlay planes as well. - * - ******************************************************************************/ - -static Bool ngleClearScreen( - ScreenPtr pScreen) -{ - NgleScreenPrivPtr pScreenPriv; - Int32 x, y; - Card32 *bits; - - pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - - if (pScreenPriv->devDepth == 24) /* depth 24 - need different writes */ - { - for(y=0; y<pScreenPriv->screenHeight; y++) - { - bits = (Card32 *)((char *)pScreenPriv->fbaddr + - (y * pScreenPriv->devWidth * 4)); - x = pScreenPriv->screenWidth; - do { - *bits++ = 0; - } while(--x); - } - } - else /* depth 8 */ - { - for(y=0; y<pScreenPriv->screenHeight; y++) - { - bits = (Card32 *)((char *)pScreenPriv->fbaddr + y * pScreenPriv->devWidth); - x = pScreenPriv->screenWidth >> 2; - do { - *bits++ = 0; - } while(--x); - } - } - - /* Clear attribute planes on Hyperdrive, Artist, CRX, CRX24 and GRX devices. - */ - if ((pScreenPriv->deviceID == S9000_ID_A1659A) || /* CRX or GRX */ - (pScreenPriv->deviceID == S9000_ID_A1439A) || /* CRX24 */ - (pScreenPriv->deviceID == S9000_ID_ARTIST) || /* Artist */ - (pScreenPriv->deviceID == S9000_ID_HCRX) /* Hyperdrive */ - ) - { - ngleSetupAttrPlanes(pScreenPriv, BUFF0_CMAP0); - } -} /* ngleClearScreen() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleBlankOrUnblankScreen - * - * Description: - * - * This routine is intended to be called by pScreen->SaveScreen - * (a DDX entry point), as well as at server entry and exit. - * - * Video for pScreen is turned on or off, depending on 2nd parameter. - * - ******************************************************************************/ - -static void ngleBlankOrUnblankScreen( - NgleScreenPrivPtr pScreenPriv, - Bool blankOrUnblank) -{ - NgleHdwPtr pDregs = pScreenPriv->pDregs; - - - if (blankOrUnblank == SCREEN_SAVER_ON) - { - /* Turn on screen blanking (i.e. blank the screen) */ - - /* Disable cursor */ - ngleDisableSprite(pScreenPriv->pScreen); - - /* Disable image display by enabling display of - * color 0 of the cursor. Action accomplished - * by writing commands to AUX interface. Since - * CRX24 and CRX/Timber/Tomcat use different - * Brooktree DAC parts, the commands written vary. - */ - if (pScreenPriv->deviceID == S9000_ID_A1439A) - { /* CRX24 */ - - CRX24_DISABLE_DISPLAY(pDregs); - } - else if (pScreenPriv->deviceID == S9000_ID_ARTIST) - { - ARTIST_DISABLE_DISPLAY(pDregs); - } - else if (pScreenPriv->deviceID == S9000_ID_HCRX) - { - HYPER_DISABLE_DISPLAY(pDregs); - } - else - { /* CRX and like elk */ - DISABLE_DISPLAY(pDregs); - } - } - else /* if (blankOrUnblank == SCREEN_SAVER_OFF) */ - { /* Turn off screen blanking */ - - /* If the cursor is on this screen, display it. - * An HP input procedure (hp/hp/x_hil.c:process_motion()) - * maintains a variable indicating which screen has the cursor. - */ - extern int hpActiveScreen; /* active screen index in x_hil.c */ - if (pScreenPriv->myNum == hpActiveScreen) - { - if (pScreenPriv->deviceID == S9000_ID_HCRX) - { - hyperDisplayCursor(pScreenPriv->pScreen, - pScreenPriv->sprite.pCursor); - } - else - { - ngleDisplayCursor(pScreenPriv->pScreen, - pScreenPriv->sprite.pCursor); - } - } - - /* Enable image display by disabling display of - * color 0 of the cursor. - */ - if (pScreenPriv->deviceID == S9000_ID_A1439A) - { /* CRX24 */ - CRX24_ENABLE_DISPLAY(pDregs); - } - else if (pScreenPriv->deviceID == S9000_ID_ARTIST) - { - ARTIST_ENABLE_DISPLAY(pDregs); - } - else if (pScreenPriv->deviceID == S9000_ID_HCRX) - { - HYPER_ENABLE_DISPLAY(pDregs); - } - else - { /* CRX and like elk */ - ENABLE_DISPLAY(pDregs); - } - } - - SETUP_FB(pDregs,pScreenPriv->deviceID,pScreenPriv->devDepth); - -} /* ngleBlankOrUnblankScreen() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleSaveScreen() - * - * Description: - * - * This routine is intended to implement pScreen->SaveScreen, - * a DDX entry point. Video for pScreen is turned on or off, - * depending on parameter "on". - * - * A lower-level procedure is called to actually perform - * the blanking or unblanking. - * - ******************************************************************************/ - -static Bool ngleSaveScreen( - ScreenPtr pScreen, - Bool on) -{ - hpPrivPtr php; - NgleScreenPrivPtr pScreenPriv; - - - pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - php = (hpPrivPtr)pScreen->devPrivate; - - if (on == SCREEN_SAVER_ON) - { /* Blank screen */ - - if (php->isSaved) return(TRUE); - php->isSaved = TRUE; - - ngleBlankOrUnblankScreen(pScreenPriv, SCREEN_SAVER_ON); - } - else - { /* Uninstall the screen saver: */ - - if (!php->isSaved) return(TRUE); - php->isSaved = FALSE; - - ngleBlankOrUnblankScreen(pScreenPriv, SCREEN_SAVER_OFF); - } - - return(TRUE); - -} /* ngleSaveScreen() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleCloseScreen() - * - * Description: - * - * This routine implements pScreen->CloseScreen for the NGLE DDX Driver. - * - ******************************************************************************/ - -static Bool ngleCloseScreen(index, pScreen) - - Int32 index; /* Screen index */ - ScreenPtr pScreen; /* Pointer to screen */ -{ - NgleScreenPrivPtr pScreenPriv; - hpPrivPtr php; - Card8 *mapOrigin; - Int32 retVal; - - - pScreenPriv = NGLE_SCREEN_PRIV(pScreen); - php = (hpPrivPtr)pScreen->devPrivate; - - /* If exiting rather than just resetting, remove cursor and clear */ - if (hpGivingUp) - { - (*php->CursorOff)(pScreen); - if (pScreenPriv->deviceID == S9000_ID_HCRX) - { - hyperResetPlanes(pScreenPriv, SERVER_EXIT); - } - else - { - ngleClearScreen(pScreen); - } - } - - /* Turn off screen saver (if on) */ - ngleSaveScreen(pScreen, SCREEN_SAVER_OFF); - - /* Allow ITE to change the colormap */ - ioctl(pScreenPriv->fildes, GCVARIABLE_CMAP, &mapOrigin); - - /* Use new and improved ITE soft reset which is almost - * finished but doesn't have a header file yet - * - * Only issue at server exit, not server recycle. - * - * For multi-headed device (Tomcat), only issue if left head - * (which is only head that can be an ITE console on Tomcat). - */ -#define GCTERM _IOWR('G',20,int) - if ((hpGivingUp) && - (!IS_NOT_FIRST_HEAD_ON_THIS_SGC_SLOT(pScreenPriv->dev_sc))) - { - int garbage=0; - ioctl(pScreenPriv->fildes, GCTERM, &garbage); - } - - - /* Release NGLE control space */ - mapOrigin = (Card8 *) 0; - - /* If a multi-headed device, only unmap framebuffer if - * last device on the SGC card to close. - */ - if (pScreenPriv->lastDeviceOnThisSgcToClose) - { - if (ioctl(pScreenPriv->fildes, GCUNMAP, &mapOrigin) < 0) - return(FALSE); - } - - /* Free data structures */ - ngleUninitSprite(pScreen); - Xfree(hpPrivates[index]); - - close(pScreenPriv->fildes); - - /* Free NGLE private structure */ - pScreen->CloseScreen = pScreenPriv->CloseScreen; - Xfree(pScreenPriv); - - return (*pScreen->CloseScreen)(index, pScreen); - -} /* ngleCloseScreen() */ - - -/****************************************************************************** - * - * And now for some new routines to handle HCRX8 and HCRX24 - * - ******************************************************************************/ - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleDepth8_ClearImagePlanes() - * - * Description: - * - * This routine clears the image planes for depth 8 devices. - * - * Assumptions: - * Assumptions fast-locking has been initialized. - * Does not assume a lock is in effect. - * - ******************************************************************************/ - -void ngleDepth8_ClearImagePlanes( - NgleScreenPrivPtr pScreenPriv) -{ - NgleHdwPtr pDregs; - NGLE_MFGP_REGISTER_TYPE packedLenXY; - NGLE_MFGP_REGISTER_TYPE packedDstXY; - Int32 nFreeFifoSlots = 0; - - pDregs = (NgleHdwPtr) pScreenPriv->pDregs; - - NGLE_LOCK(pScreenPriv); - - /* Common Hardware setup */ - GET_FIFO_SLOTS(nFreeFifoSlots, 5); - - /* Re-use dstX/Y and transfer data for multiple recfills. */ - NGLE_SET_SCOREBOARD_OVERRIDE(0x30003); - NGLE_SET_TRANSFERDATA(0xffffffff); /* Write foreground color */ - - NGLE_REALLY_SET_IMAGE_FG_COLOR(0); - NGLE_REALLY_SET_IMAGE_PLANEMASK(0xff); - - PACK_2CARD16(packedDstXY, 0, 0); - PACK_2CARD16(packedLenXY, pScreenPriv->screenWidth, - pScreenPriv->screenHeight); - NGLE_SET_DSTXY(NGLE_MFGP_REGISTER_TYPE_ASLONG(packedDstXY)); - - /* Device-specific image buffer clear */ - switch(pScreenPriv->deviceID) - { - case S9000_ID_ARTIST: - /* Write zeroes to buffer */ - GET_FIFO_SLOTS(nFreeFifoSlots, 3); - NGLE_QUICK_SET_IMAGE_BITMAP_OP( - IBOvals(RopSrc, MaskAddrOffset(0), - BitmapExtent08, StaticReg(FALSE), - DataDynamic, MaskOtc, BGx(FALSE), FGx(FALSE))); - NGLE_QUICK_SET_DST_BM_ACCESS( - BA( IndexedDcd, Otc32, OtsIndirect, AddrLong, - BAJustPoint(0), BINapp0I, BAIndexBase(0))); - SET_LENXY_START_RECFILL(packedLenXY); - break; - - case S9000_ID_A1659A: /* ELK_DEVICE_ID */ - /* Write zeroes to buffer 0 */ - GET_FIFO_SLOTS(nFreeFifoSlots, 3); - NGLE_QUICK_SET_IMAGE_BITMAP_OP( - IBOvals(RopSrc, MaskAddrOffset(0), - BitmapExtent08, StaticReg(FALSE), - DataDynamic, MaskOtc, BGx(FALSE), FGx(FALSE))); - NGLE_QUICK_SET_DST_BM_ACCESS( - BA( IndexedDcd, Otc32, OtsIndirect, AddrLong, - BAJustPoint(0), BINapp0I, BAIndexBase(0))); - SET_LENXY_START_RECFILL(packedLenXY); - - /* Write zeroes to buffer 1 */ - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - NGLE_QUICK_SET_DST_BM_ACCESS( - BA( IndexedDcd, Otc32, OtsIndirect, AddrLong, - BAJustPoint(0), BINapp1I, BAIndexBase(0))); - SET_LENXY_START_RECFILL(packedLenXY); - break; - - case S9000_ID_HCRX: - /* Write zeroes to buffer 0 */ - GET_FIFO_SLOTS(nFreeFifoSlots, 3); - NGLE_QUICK_SET_IMAGE_BITMAP_OP(IBOvals(RopSrc, MaskAddrOffset(0), - BitmapExtent08, StaticReg(FALSE), - MaskDynamic, MaskOtc, - BGx(TRUE), FGx(FALSE))); - NGLE_QUICK_SET_DST_BM_ACCESS( - BA( IndexedDcd, Otc32, OtsIndirect, AddrLong, - BAJustPoint(0), BINapp0I, BAIndexBase(0))); - HYPER_SET_LENXY_START_FAST_RECFILL(packedLenXY.all); - - /* Write zeroes to buffer 1 */ - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - NGLE_QUICK_SET_DST_BM_ACCESS( - BA( IndexedDcd, Otc32, OtsIndirect, AddrLong, - BAJustPoint(0), BINapp1I, BAIndexBase(0))); - HYPER_SET_LENXY_START_FAST_RECFILL(packedLenXY.all); - break; - - /* There is no default */ - } /* Device-specific image buffer clear */ - - NGLE_UNLOCK(pScreenPriv); - -} /* ngleDepth8_ClearImagePlanes() */ - - - -/****************************************************************************** - * - * NGLE DDX Utility Procedure: ngleDepth24_ClearImagePlanes - * - * Description: - * - * This routine clears all 24 image planes to zeroes. - * - * Assumptions: - * Assumptions fast-locking has been initialized. - * Does not assume a lock is in effect. - * - ******************************************************************************/ - -void ngleDepth24_ClearImagePlanes( - NgleScreenPrivPtr pScreenPriv) -{ - NgleHdwPtr pDregs; - NGLE_MFGP_REGISTER_TYPE packedLenXY; - NGLE_MFGP_REGISTER_TYPE packedDstXY; - Int32 nFreeFifoSlots = 0; - - pDregs = (NgleHdwPtr) pScreenPriv->pDregs; - - NGLE_LOCK(pScreenPriv); - - /* Hardware setup */ - GET_FIFO_SLOTS(nFreeFifoSlots, 8); - NGLE_QUICK_SET_DST_BM_ACCESS( - BA(IndexedDcd, Otc32, OtsIndirect, AddrLong, - BAJustPoint(0), BINapp0F8, BAIndexBase(0))); - NGLE_SET_SCOREBOARD_OVERRIDE(0); - NGLE_SET_TRANSFERDATA(0xffffffff); /* Write foreground color */ - - NGLE_REALLY_SET_IMAGE_FG_COLOR(0); /* load with zero */ - NGLE_REALLY_SET_IMAGE_PLANEMASK(0xffffff); - - PACK_2CARD16(packedDstXY, 0, 0); - PACK_2CARD16(packedLenXY, pScreenPriv->screenWidth, - pScreenPriv->screenHeight); - NGLE_SET_DSTXY(NGLE_MFGP_REGISTER_TYPE_ASLONG(packedDstXY)); - - /* Write zeroes to all 24 planes of image buffer */ - NGLE_QUICK_SET_IMAGE_BITMAP_OP(IBOvals(RopSrc, MaskAddrOffset(0), - BitmapExtent32, StaticReg(FALSE), - DataDynamic, MaskOtc, BGx(FALSE), FGx(FALSE))); - SET_LENXY_START_RECFILL(packedLenXY); - - NGLE_UNLOCK(pScreenPriv); - -} /* ngleDepth24_ClearImagePlanes */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleClearOverlayPlanes() - * - * Description: - * - * This routine "clears" the overlay planes to the pased in value. - * - * Assumptions: - * Assumptions fast-locking has been initialized. - * Does not assume a lock is in effect. - * - ******************************************************************************/ - -void ngleClearOverlayPlanes( - NgleScreenPrivPtr pScreenPriv, - Card32 planeMask, - Card32 planeData) -{ - NgleHdwPtr pDregs; - NGLE_MFGP_REGISTER_TYPE packedLenXY; - NGLE_MFGP_REGISTER_TYPE packedDstXY; - Int32 nFreeFifoSlots = 0; - - pDregs = (NgleHdwPtr) pScreenPriv->pDregs; - - NGLE_LOCK(pScreenPriv); - - /* Hardware setup */ - GET_FIFO_SLOTS(nFreeFifoSlots, 8); - NGLE_QUICK_SET_DST_BM_ACCESS( - BA( IndexedDcd, Otc32, OtsIndirect, AddrLong, - BAJustPoint(0), BINovly, BAIndexBase(0))); - NGLE_SET_SCOREBOARD_OVERRIDE(0); - NGLE_SET_TRANSFERDATA(0xffffffff); /* Write foreground color */ - - NGLE_REALLY_SET_IMAGE_FG_COLOR(planeData); /* fill with input data value */ - NGLE_REALLY_SET_IMAGE_PLANEMASK(planeMask); - - PACK_2CARD16(packedDstXY, 0, 0); - PACK_2CARD16(packedLenXY, pScreenPriv->screenWidth, - pScreenPriv->screenHeight); - NGLE_SET_DSTXY(NGLE_MFGP_REGISTER_TYPE_ASLONG(packedDstXY)); - - /* Write zeroes to overlay planes. */ - NGLE_QUICK_SET_IMAGE_BITMAP_OP( - IBOvals(RopSrc, MaskAddrOffset(0), - BitmapExtent08, StaticReg(FALSE), - DataDynamic, MaskOtc, BGx(FALSE), FGx(FALSE))); - SET_LENXY_START_RECFILL(packedLenXY); - - NGLE_UNLOCK(pScreenPriv); - -} /* ngleClearOverlayPlanes() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: ngleResetAttrPlanes() - * - * Description: - * - * This routine resets the attribute planes to an initial state. - * - * Assumptions: - * Assumptions fast-locking has been initialized. - * Does not assume a lock is in effect. - * - ******************************************************************************/ - -void ngleResetAttrPlanes( - NgleScreenPrivPtr pScreenPriv, - Card32 controlPlaneReg) -{ - BoxRec box; - - - box.x1 = 0; - box.y1 = 0; - box.x2 = pScreenPriv->screenWidth; - box.y2 = pScreenPriv->screenHeight; - nglePolyPaintAttr(pScreenPriv, controlPlaneReg, 1, &box); - -} /* ngleResetAttrPlanes() */ - - - -/****************************************************************************** - * - * NGLE DDX Procedure: nglePolyPaintAttr() - * - * Description: - * - * This routine is called by other NGLE DDX driver routines to perform - * a series of solid color, rectangle fills of the attribute plane(s). - * - * Useful comments about attribute painting: - * - * The Control Plane Register (CPR) is the equivalent of - * foreground and background pixel registers for the attribute - * planes. - * - * The most significant byte (CFC: Control Foreground Color) - * determines what's written if the foreground color is written - * to the attribute planes. - * - * The next most significant byte (CBC: Control Background - * Color) determines what's written if a zero is written. - * - * The third byte (CPM: Control Plane Mask Byte) indicates - * which group of planes is active. - * - * Control Bitmap Operation (CBO) determines whether foreground - * or background color is transparent or opaque. Here, we - * choose opaque for foreground and background (the latter is a - * don't-care). - * - * The ctlPlaneReg parameter which is passed into this routine - * represents the value to be loaded into the CPR. The CPR - * value is device specific, as each device has its own - * particular mapping of bits in the CPR fields to the devices - * attribute planes. But, the CPR register appears at the same - * address in each of the devices control register space. - * Therefore, each device can use this common routine to paint - * attribute planes. - * - ******************************************************************************/ - -static void nglePolyPaintAttr( - NgleScreenPrivPtr pScreenPriv, - Card32 ctlPlaneReg, - Int32 nBoxes, - BoxPtr pBoxes) -{ - Int32 nFreeFifoSlots = 0; -/*## For now, treat as 32-bit integers so that we don't have to unpack: ##*/ -/*## Int16 *pBox;##*/ - Int32 *pBox; - NgleHdwPtr pDregs; - NGLE_MFGP_REGISTER_TYPE packedDstXY; - NGLE_MFGP_REGISTER_TYPE packedLenXY; - - - /* Return early if there's nothing to do: */ - if (nBoxes <= 0) - return; - - pDregs = pScreenPriv->pDregs; - NGLE_LOCK(pScreenPriv); - - - /* - ************************************************************************** - ** - ** Paint the Boxes in the Attribute Planes: - ** - ************************************************************************** - */ - - GET_FIFO_SLOTS(nFreeFifoSlots, 4); - NGLE_QUICK_SET_DST_BM_ACCESS(BA(IndexedDcd, Otc32, OtsIndirect, - AddrLong, BAJustPoint(0), - BINattr, BAIndexBase(0))); - NGLE_QUICK_SET_CTL_PLN_REG(ctlPlaneReg); - NGLE_SET_TRANSFERDATA(0xffffffff); - - /* Loop on boxes: */ - pBox = (Int32 *) pBoxes; - NGLE_QUICK_SET_IMAGE_BITMAP_OP(IBOvals(RopSrc, MaskAddrOffset(0), - BitmapExtent08, StaticReg(TRUE), - DataDynamic, MaskOtc, - BGx(TRUE), FGx(FALSE))); - do - { - packedDstXY.all = *pBox++; - packedLenXY.all = (*pBox++) - packedDstXY.all; - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - NGLE_SET_DSTXY(NGLE_MFGP_REGISTER_TYPE_ASLONG(packedDstXY)); - SET_LENXY_START_RECFILL(packedLenXY); - } while (--nBoxes > 0); - - - /* - ************************************************************************** - ** - ** In order to work around an ELK hardware problem (Buffy doesn't - ** always flush it's buffers when writing to the attribute - ** planes), at least 4 pixels must be written to the attribute - ** planes starting at (X == 1280) and (Y != to the last Y written - ** by BIF): - ** - ************************************************************************** - */ - - if (pScreenPriv->deviceID == S9000_ID_A1659A) /* ELK_DEVICE_ID */ - { - /*## NOTE: This may cause problems on a 2K-wide device: ##*/ - if (packedLenXY.xy.y > 0) - { - /* It's safe to use scanline zero: */ - PACK_2CARD16(packedDstXY, 1280, 0); - } - else - { - /* Must generate a safe scanline: */ - if (packedDstXY.xy.y > 0) - { - PACK_2CARD16(packedDstXY, 1280, 0); - } - else - { - PACK_2CARD16(packedDstXY, 1280, 1); - } - } - - GET_FIFO_SLOTS(nFreeFifoSlots, 2); - NGLE_SET_DSTXY(NGLE_MFGP_REGISTER_TYPE_ASLONG(packedDstXY)); - PACK_2CARD16(packedLenXY, 4, 1); - SET_LENXY_START_RECFILL(packedLenXY); - } /* ELK Hardware Kludge */ - - - /**** Finally, set the Control Plane Register back to zero: ****/ - GET_FIFO_SLOTS(nFreeFifoSlots, 1); - NGLE_QUICK_SET_CTL_PLN_REG(0); - - NGLE_UNLOCK(pScreenPriv); - -} /* nglePolyPaintAttr() */ Index: xc/programs/Xserver/hw/hp/ngle/nglescreen.h diff -u xc/programs/Xserver/hw/hp/ngle/nglescreen.h:1.3 xc/programs/Xserver/hw/hp/ngle/nglescreen.h:removed --- xc/programs/Xserver/hw/hp/ngle/nglescreen.h:1.3 Wed Jan 17 17:36:49 2001 +++ xc/programs/Xserver/hw/hp/ngle/nglescreen.h Thu Feb 27 12:29:26 2003 @@ -1,138 +0,0 @@ -/* $Xorg: nglescreen.h,v 1.3 2000/08/17 19:48:28 cpqbld Exp $ */ - -/************************************************************************* - * - * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. - * -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Hewlett Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD -TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. Hewlett-Packard shall not be liable for errors -contained herein or direct, indirect, special, incidental or -consequential damages in connection with the furnishing, -performance, or use of this material. - - * - *************************************************************************/ - -/* $XFree86: xc/programs/Xserver/hw/hp/ngle/nglescreen.h,v 1.3 2001/01/17 22:36:49 dawes Exp $ */ - -/****************************************************************************** - * - * This file contains various macros, typedefs and extern declarations - * concerning the Screen structure. - * - ******************************************************************************/ - -#ifndef NGLESCREEN -#define NGLESCREEN - - -/* - ****************************************************************************** - ** - ** NGLE DDX Driver's Screen Private Structure: - ** - ****************************************************************************** - */ - -typedef struct _NgleScreenPrivRec -{ - /**** High-Level information about the screen/device: ****/ - ScreenPtr pScreen; /* Pointer to DIX structure */ - Int32 myNum; /* The number of this screen */ - Int32 fildes; /* Unix fildes of device file */ - dev_t dev_sc; /* Device file's minor number */ - - Card32 deviceID; /* Is this an Elk or Rattler */ - NgleHdwPtr pDregs; /* Pointer to the hardware */ - pointer fbaddr; /* Pointer to the framebuffer */ - char *crt_region[CRT_MAX_REGIONS]; /* Other regions - * associated with frame buffer - * that might be mapped in. - * Obtained from GCDESCRIBE. - */ - NgleDevRomDataPtr pDevRomData; /* Pointer to the ROM */ - Bool isGrayScale; /* GRX (Not color device) */ - - /**** Device sizes: ****/ - Int32 devWidth; /* Raw width, for addr calc's */ - Int32 devDepth; /* Depth of device # of planes */ - Int32 screenWidth; /* Visible resolution: width */ - Int32 screenHeight; /* Visible resolution: height */ - - /**** X11 sprite information: ****/ - NgleSpriteRec sprite; - - /**** Installed-in-Hardware Colormap Information: ****/ - ColormapPtr installedMap; /* ptr to DIX colormap - * currently installed */ - Card32 hwColors[256]; /* Copy of installed map */ - - /**** Miscellaneous information: ****/ - /* Allow user to require that cursor updates wait for vertical blanking - */ - Int32 moveCursorOnVBlank; - - /* Added for X server controlling both heads of Tomcat (2-headed ELK): - * on server exit, only unmap the framebuffer and control space - * if the "last" head on the Tomcat for this server. - */ - Bool lastDeviceOnThisSgcToClose; - - /* Hyperdrive (and probably other future devices) has configuration bits */ - /* to tell frame buffer depth (8:88 or 8:24) and accelerator present - */ - unsigned Int32 deviceSpecificConfig; - - /* - * Pointers to various functions returned from cfbScreenInit(), - * used for wrapper routines. - */ - CloseScreenProcPtr CloseScreen; - CreateGCProcPtr CreateGC; - -} NgleScreenPrivRec, *NgleScreenPrivPtr; - - -/* - ****************************************************************************** - ** - ** Macros to Access the NGLE DDX Driver's Screen Private Structure: - ** - ****************************************************************************** - */ - -extern Int32 ngleScreenPrivIndex; -#define NGLE_SCREEN_PRIV(pScreen)\ - ((NgleScreenPrivPtr) ((pScreen)->devPrivates[ngleScreenPrivIndex].ptr)) - - -/* - ****************************************************************************** - ** - ** Values for pScreenPriv->moveCursorOnVBlank: - ** Should cursor be moved only during vertical blank? - ** - ****************************************************************************** - */ -#define CURSOR_AT_VBLANK_ALWAYS 1 -#define CURSOR_AT_VBLANK_DRIVEROPTION 0 -#define CURSOR_AT_VBLANK_NEVER -1 - -/* Server state values used by hyperResetPlanes() */ -#define SERVER_INIT 1 -#define SERVER_EXIT 2 -#define SERVER_RECOVERY 3 - - -#endif /* NGLESCREEN */ Index: xc/programs/Xserver/hw/kdrive/Xkdrive.man diff -u xc/programs/Xserver/hw/kdrive/Xkdrive.man:1.4 xc/programs/Xserver/hw/kdrive/Xkdrive.man:1.5 --- xc/programs/Xserver/hw/kdrive/Xkdrive.man:1.4 Sat Jan 27 13:20:40 2001 +++ xc/programs/Xserver/hw/kdrive/Xkdrive.man Thu Feb 14 11:08:05 2002 @@ -1,4 +1,4 @@ -.\" $XFree86: xc/programs/Xserver/hw/kdrive/Xkdrive.man,v 1.4 2001/01/27 18:20:40 dawes Exp $ +.\" $XFree86: xc/programs/Xserver/hw/kdrive/Xkdrive.man,v 1.5 2002/02/14 16:08:05 keithp Exp $ .\" .TH Xkdrive 1 __vendorversion__ .SH NAME @@ -44,32 +44,32 @@ .B Xkdrive servers accept the following options: .TP 8 -.B -screen \fIwidth\fBx\fIheight\fR[\fBx\fIdepth\fR]\fB -use a screen of the specified size. +.B -card \fIpcmcia\fP +use pcmcia card as additional screen. .TP 8 -.B -zaphod -disable switching screens by moving the pointer accross a screen boundary. -.TP 8 -.B -3button -disable emulation of a middle mouse button by chording. -.TP 8 -.B -2button -enable emulation of a middle mouse button by chording. -.TP 8 .B -dumb disable hardware acceleration. .TP 8 +.B -origin \fIX\fP,\fIY\fP +Locates the next screen in the Xinerama virtual screen. +.TP 8 +.B -screen \fIwidth\fBx\fIheight\fR[\fBx\fIdepth\fR[\fBx\fIfreq\fR]]\fR[\fB@\fIrotation\fR]\fB +use a screen of the specified \fIwidth\fP, \fIheight\fP, screen \fIdepth\fP, \fIfrequency\fP, and \fIrotation\fP (0, 90, 180 and 270 are legal values). +.TP 8 .B -softCursor disable the hardware cursor. .TP 8 -.B -card \fIcard\fB -not documented. -.TP 8 .B -videoTest -not documented. +start the server, pause momentarily, and exit. .TP 8 -.B -standalone -not documented. +.B -zaphod +disable switching screens by moving the pointer across a screen boundary. +.TP 8 +.B -2button +enable emulation of a middle mouse button by chording. +.TP 8 +.B -3button +disable emulation of a middle mouse button by chording. .SH SEE ALSO X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1), Xvesa(1), Xfbdev(1). .SH AUTHORS Index: xc/programs/Xserver/hw/kdrive/kdrive.c diff -u xc/programs/Xserver/hw/kdrive/kdrive.c:1.22 xc/programs/Xserver/hw/kdrive/kdrive.c:1.29 --- xc/programs/Xserver/hw/kdrive/kdrive.c:1.22 Mon Oct 29 11:34:56 2001 +++ xc/programs/Xserver/hw/kdrive/kdrive.c Thu Oct 31 13:29:50 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.22 2001/10/29 16:34:56 tsi Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.29 2002/10/31 18:29:50 keithp Exp $ * * Copyright © 1999 Keith Packard * @@ -28,6 +28,9 @@ #endif #include <mivalidate.h> #include <dixstruct.h> +#ifdef RANDR +#include <randrstr.h> +#endif #ifdef XV #include "kxv.h" @@ -49,6 +52,8 @@ Bool kdEmulateMiddleButton; Bool kdDisableZaphod; Bool kdEnabled; +int kdSubpixelOrder; +int kdVirtualTerminal = -1; Bool kdSwitchPending; DDXPointRec kdOrigin; @@ -327,6 +332,19 @@ void ddxUseMsg() { + ErrorF("\nTinyX Device Dependent Usage:\n"); + ErrorF("-card pcmcia Use PCMCIA card as additional screen\n"); + ErrorF("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][@ROTATION][X][Y][xDEPTH/BPP{,DEPTH/BPP}[xFREQ]] Specify screen characteristics\n"); + ErrorF("-zaphod Disable cursor screen switching\n"); + ErrorF("-2button Emulate 3 button mouse\n"); + ErrorF("-3button Disable 3 button mouse emulation\n"); + ErrorF("-dumb Disable hardware acceleration\n"); + ErrorF("-softCursor Force software cursor\n"); + ErrorF("-videoTest Start the server, pause momentarily and exit\n"); + ErrorF("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n"); + ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n"); + ErrorF("vtxx Use virtual terminal xx instead of the next available\n"); + ErrorF("\n"); } void @@ -352,6 +370,28 @@ return cur; } +Rotation +KdAddRotation (Rotation a, Rotation b) +{ + Rotation rotate = (a & RR_Rotate_All) * (b & RR_Rotate_All); + Rotation reflect = (a & RR_Reflect_All) ^ (b & RR_Reflect_All); + + if (rotate > RR_Rotate_270) + rotate /= (RR_Rotate_270 * RR_Rotate_90); + return reflect | rotate; +} + +Rotation +KdSubRotation (Rotation a, Rotation b) +{ + Rotation rotate = (a & RR_Rotate_All) * 16 / (b & RR_Rotate_All); + Rotation reflect = (a & RR_Reflect_All) ^ (b & RR_Reflect_All); + + if (rotate > RR_Rotate_270) + rotate /= (RR_Rotate_270 * RR_Rotate_90); + return reflect | rotate; +} + void KdParseScreen (KdScreenInfo *screen, char *arg) @@ -366,11 +406,12 @@ screen->dumb = kdDumbDriver; screen->softCursor = kdSoftCursor; screen->origin = kdOrigin; - screen->rotation = 0; + screen->randr = RR_Rotate_0; screen->width = 0; screen->height = 0; screen->width_mm = 0; screen->height_mm = 0; + screen->subpixel_order = kdSubpixelOrder; screen->rate = 0; for (fb = 0; fb < KD_MAX_FB; fb++) screen->fb[fb].depth = 0; @@ -381,7 +422,7 @@ for (i = 0; i < 2; i++) { - arg = KdParseFindNext (arg, "x/@", save, &delim); + arg = KdParseFindNext (arg, "x/@XY", save, &delim); if (!save[0]) return; @@ -390,7 +431,7 @@ if (delim == '/') { - arg = KdParseFindNext (arg, "x@", save, &delim); + arg = KdParseFindNext (arg, "x@XY", save, &delim); if (!save[0]) return; mm = atoi(save); @@ -406,7 +447,7 @@ screen->height = pixels; screen->height_mm = mm; } - if (delim != 'x' && delim != '@') + if (delim != 'x' && delim != '@' && delim != 'X' && delim != 'Y') return; } @@ -414,25 +455,37 @@ kdOrigin.y = 0; kdDumbDriver = FALSE; kdSoftCursor = FALSE; - + kdSubpixelOrder = SubPixelUnknown; + if (delim == '@') { - arg = KdParseFindNext (arg, "x", save, &delim); + arg = KdParseFindNext (arg, "xXY", save, &delim); if (save[0]) { - screen->rotation = atoi (save); - if (screen->rotation < 45) - screen->rotation = 0; - else if (screen->rotation < 135) - screen->rotation = 90; - else if (screen->rotation < 225) - screen->rotation = 180; - else if (screen->rotation < 315) - screen->rotation = 270; + int rotate = atoi (save); + if (rotate < 45) + screen->randr = RR_Rotate_0; + else if (rotate < 135) + screen->randr = RR_Rotate_90; + else if (rotate < 225) + screen->randr = RR_Rotate_180; + else if (rotate < 315) + screen->randr = RR_Rotate_270; else - screen->rotation = 0; + screen->randr = RR_Rotate_0; } } + if (delim == 'X') + { + arg = KdParseFindNext (arg, "xY", save, &delim); + screen->randr |= RR_Reflect_X; + } + + if (delim == 'Y') + { + arg = KdParseFindNext (arg, "xY", save, &delim); + screen->randr |= RR_Reflect_Y; + } fb = 0; while (fb < KD_MAX_FB) @@ -571,6 +624,23 @@ } } +void +KdParseRgba (char *rgba) +{ + if (!strcmp (rgba, "rgb")) + kdSubpixelOrder = SubPixelHorizontalRGB; + else if (!strcmp (rgba, "bgr")) + kdSubpixelOrder = SubPixelHorizontalBGR; + else if (!strcmp (rgba, "vrgb")) + kdSubpixelOrder = SubPixelVerticalRGB; + else if (!strcmp (rgba, "vbgr")) + kdSubpixelOrder = SubPixelVerticalBGR; + else if (!strcmp (rgba, "none")) + kdSubpixelOrder = SubPixelNone; + else + kdSubpixelOrder = SubPixelUnknown; +} + int KdProcessArgument (int argc, char **argv, int i) { @@ -595,8 +665,11 @@ InitCard (0); card = KdCardInfoLast (); } - screen = KdScreenInfoAdd (card); - KdParseScreen (screen, argv[i+1]); + if (card) { + screen = KdScreenInfoAdd (card); + KdParseScreen (screen, argv[i+1]); + } else + ErrorF("No matching card found!\n"); } else UseMsg (); @@ -632,8 +705,6 @@ kdVideoTest = TRUE; return 1; } - if (!strcmp (argv[i], "-standalone")) - return 1; if (!strcmp (argv[i], "-origin")) { if ((i+1) < argc) @@ -661,6 +732,19 @@ UseMsg (); return 2; } + if (!strcmp (argv[i], "-rgba")) + { + if ((i+1) < argc) + KdParseRgba (argv[i+1]); + else + UseMsg (); + return 2; + } + if (!strncmp (argv[i], "vt", 2) && + sscanf (argv[i], "vt%2d", &kdVirtualTerminal) == 1) + { + return 1; + } #ifdef PSEUDO8 return p8ProcessArgument (argc, argv, i); #else @@ -815,6 +899,63 @@ return fbCreateWindow (pWin); } +void +KdSetSubpixelOrder (ScreenPtr pScreen, Rotation randr) +{ + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + int subpixel_order = screen->subpixel_order; + Rotation subpixel_dir; + int i; + + static struct { + int subpixel_order; + Rotation direction; + } orders[] = { + { SubPixelHorizontalRGB, RR_Rotate_0 }, + { SubPixelHorizontalBGR, RR_Rotate_180 }, + { SubPixelVerticalRGB, RR_Rotate_270 }, + { SubPixelVerticalBGR, RR_Rotate_90 }, + }; + + static struct { + int bit; + int normal; + int reflect; + } reflects[] = { + { RR_Reflect_X, SubPixelHorizontalRGB, SubPixelHorizontalBGR }, + { RR_Reflect_X, SubPixelHorizontalBGR, SubPixelHorizontalRGB }, + { RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalBGR }, + { RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalRGB }, + }; + + /* map subpixel to direction */ + for (i = 0; i < 4; i++) + if (orders[i].subpixel_order == subpixel_order) + break; + if (i < 4) + { + subpixel_dir = KdAddRotation (randr & RR_Rotate_All, orders[i].direction); + + /* map back to subpixel order */ + for (i = 0; i < 4; i++) + if (orders[i].direction & subpixel_dir) + { + subpixel_order = orders[i].subpixel_order; + break; + } + /* reflect */ + for (i = 0; i < 4; i++) + if ((randr & reflects[i].bit) && + reflects[i].normal == subpixel_order) + { + subpixel_order = reflects[i].reflect; + break; + } + } + PictureSetSubpixelOrder (pScreen, subpixel_order); +} + /* Pass through AddScreen, which doesn't take any closure */ static KdScreenInfo *kdCurrentScreen; @@ -986,6 +1127,8 @@ return FALSE; } + KdSetSubpixelOrder (pScreen, screen->randr); + /* * Enable the hardware */ @@ -1159,7 +1302,8 @@ if (!kdCardInfo) { InitCard (0); - card = KdCardInfoLast (); + if (!(card = KdCardInfoLast ())) + FatalError("No matching cards found!\n"); screen = KdScreenInfoAdd (card); KdParseScreen (screen, 0); } Index: xc/programs/Xserver/hw/kdrive/kdrive.h diff -u xc/programs/Xserver/hw/kdrive/kdrive.h:1.21 xc/programs/Xserver/hw/kdrive/kdrive.h:1.29 --- xc/programs/Xserver/hw/kdrive/kdrive.h:1.21 Fri Oct 12 02:33:07 2001 +++ xc/programs/Xserver/hw/kdrive/kdrive.h Wed Nov 13 11:37:39 2002 @@ -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.21 2001/10/12 06:33:07 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.h,v 1.29 2002/11/13 16:37:39 keithp Exp $ */ #include <stdio.h> #include "X.h" @@ -42,6 +42,7 @@ #include "fb.h" #include "fboverlay.h" #include "shadow.h" +#include "randrstr.h" extern WindowPtr *WindowTable; @@ -97,17 +98,21 @@ void *closure; } KdFrameBuffer; +#define RR_Rotate_All (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270) +#define RR_Reflect_All (RR_Reflect_X|RR_Reflect_Y) + typedef struct _KdScreenInfo { struct _KdScreenInfo *next; KdCardInfo *card; ScreenPtr pScreen; void *driver; - int rotation; + Rotation randr; /* rotation and reflection */ int width; int height; int rate; int width_mm; int height_mm; + int subpixel_order; Bool dumb; Bool softCursor; int mynum; @@ -198,10 +203,21 @@ xEvent heldEvent; unsigned char buttonState; int emulationDx, emulationDy; + int inputType; } KdMouseInfo; extern KdMouseInfo *kdMouseInfo; +#ifdef TOUCHSCREEN +/* + * HACK! Send absolute events when touch screen is current, + * else send relative events. Used to drive pointers on + * alternate screens with the touch screen + */ +extern int KdTsCurScreen; +extern int KdTsPhyScreen; +#endif + KdMouseInfo *KdMouseInfoAdd (void); void KdParseMouse (char *); @@ -303,6 +319,7 @@ extern Bool kdSwitchPending; extern Bool kdEmulateMiddleButton; extern Bool kdDisableZaphod; +extern int kdVirtualTerminal; extern KdOsFuncs *kdOsFuncs; #define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \ @@ -512,6 +529,12 @@ void KdProcessSwitch (void); +Rotation +KdAddRotation (Rotation a, Rotation b); + +Rotation +KdSubRotation (Rotation a, Rotation b); + void KdParseScreen (KdScreenInfo *screen, char *arg); @@ -560,6 +583,9 @@ KdInitOutput (ScreenInfo *pScreenInfo, int argc, char **argv); +void +KdSetSubpixelOrder (ScreenPtr pScreen, Rotation randr); + /* kinfo.c */ KdCardInfo * KdCardInfoAdd (KdCardFuncs *funcs, @@ -590,6 +616,11 @@ KdRegisterFd (int type, int fd, void (*read) (int fd, void *closure), void *closure); void +KdRegisterFdEnableDisable (int fd, + int (*enable) (int fd, void *closure), + void (*disable) (int fd, void *closure)); + +void KdUnregisterFds (int type, Bool do_close); #ifdef TOUCHSCREEN @@ -624,6 +655,9 @@ KdSetMouseMatrix (KdMouseMatrix *matrix); void +KdComputeMouseMatrix (KdMouseMatrix *matrix, Rotation randr, int width, int height); + +void KdBlockHandler (int screen, pointer blockData, pointer timeout, @@ -686,6 +720,21 @@ Bool (*usable) (KdScreenInfo *), Bool (*supported) (KdScreenInfo *, const KdMonitorTiming *)); + +#ifdef RANDR +Bool +KdRandRGetInfo (ScreenPtr pScreen, + int randr, + Bool (*supported) (ScreenPtr pScreen, + const KdMonitorTiming *)); + +const KdMonitorTiming * +KdRandRGetTiming (ScreenPtr pScreen, + Bool (*supported) (ScreenPtr pScreen, + const KdMonitorTiming *), + int rate, + RRScreenSizePtr pSize); +#endif /* kpict.c */ void Index: xc/programs/Xserver/hw/kdrive/kinput.c diff -u xc/programs/Xserver/hw/kdrive/kinput.c:1.23 xc/programs/Xserver/hw/kdrive/kinput.c:1.30 --- xc/programs/Xserver/hw/kdrive/kinput.c:1.23 Fri Jan 18 11:25:19 2002 +++ xc/programs/Xserver/hw/kdrive/kinput.c Wed Nov 13 11:37:39 2002 @@ -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.23 2002/01/18 16:25:19 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.30 2002/11/13 16:37:39 keithp Exp $ */ #include "kdrive.h" #include "inputstr.h" @@ -80,7 +80,7 @@ int type; int fd; void (*read) (int fd, void *closure); - void (*enable) (int fd, void *closure); + int (*enable) (int fd, void *closure); void (*disable) (int fd, void *closure); void *closure; } KdInputFd; @@ -215,7 +215,7 @@ void KdRegisterFdEnableDisable (int fd, - void (*enable) (int fd, void *closure), + int (*enable) (int fd, void *closure), void (*disable) (int fd, void *closure)) { int i; @@ -274,9 +274,9 @@ kdInputEnabled = TRUE; for (i = 0; i < kdNumInputFds; i++) { - KdAddFd (kdInputFds[i].fd); if (kdInputFds[i].enable) - (*kdInputFds[i].enable) (kdInputFds[i].fd, kdInputFds[i].closure); + kdInputFds[i].fd = (*kdInputFds[i].enable) (kdInputFds[i].fd, kdInputFds[i].closure); + KdAddFd (kdInputFds[i].fd); } /* reset screen saver */ @@ -309,12 +309,12 @@ case DEVICE_ON: pDev->on = TRUE; pKdPointer = pDevice; - if (kdMouseFuncs) - (*kdMouseFuncs->Init) (); #ifdef TOUCHSCREEN if (kdTsFuncs) (*kdTsFuncs->Init) (); #endif + if (kdMouseFuncs) + (*kdMouseFuncs->Init) (); break; case DEVICE_OFF: case DEVICE_CLOSE: @@ -325,7 +325,7 @@ if (kdMouseFuncs) (*kdMouseFuncs->Fini) (); #ifdef TOUCHSCREEN - if (kdTsFuncs >= 0) + if (kdTsFuncs) (*kdTsFuncs->Fini) (); #endif } @@ -369,6 +369,45 @@ kdMouseMatrix = *matrix; } +void +KdComputeMouseMatrix (KdMouseMatrix *m, Rotation randr, int width, int height) +{ + int x_dir = 1, y_dir = 1; + int i, j; + int size[2]; + + size[0] = width; size[1] = height; + if (randr & RR_Reflect_X) + x_dir = -1; + if (randr & RR_Reflect_Y) + y_dir = -1; + switch (randr & (RR_Rotate_All)) { + case RR_Rotate_0: + m->matrix[0][0] = x_dir; m->matrix[0][1] = 0; + m->matrix[1][0] = 0; m->matrix[1][1] = y_dir; + break; + case RR_Rotate_90: + m->matrix[0][0] = 0; m->matrix[0][1] = -x_dir; + m->matrix[1][0] = y_dir; m->matrix[1][1] = 0; + break; + case RR_Rotate_180: + m->matrix[0][0] = -x_dir; m->matrix[0][1] = 0; + m->matrix[1][0] = 0; m->matrix[1][1] = -y_dir; + break; + case RR_Rotate_270: + m->matrix[0][0] = 0; m->matrix[0][1] = x_dir; + m->matrix[1][0] = -y_dir; m->matrix[1][1] = 0; + break; + } + for (i = 0; i < 2; i++) + { + m->matrix[i][2] = 0; + for (j = 0 ; j < 2; j++) + if (m->matrix[i][j] < 0) + m->matrix[i][2] = size[j] - 1; + } +} + static void KdKbdCtrl (DeviceIntPtr pDevice, KeybdCtrl *ctrl) { @@ -1538,7 +1577,8 @@ #ifdef TOUCHSCREEN /* HACK! */ -extern int TsScreen; +int KdTsCurScreen; /* current event screen */ +int KdTsPhyScreen = -1; /* screen associated with touch screen */ #endif static void @@ -1546,7 +1586,7 @@ { KdBlockSigio (); #ifdef TOUCHSCREEN - TsScreen = pScreen->myNum; + KdTsCurScreen = pScreen->myNum; #endif miPointerWarpCursor (pScreen, x, y); KdUnblockSigio (); Index: xc/programs/Xserver/hw/kdrive/kmode.c diff -u xc/programs/Xserver/hw/kdrive/kmode.c:1.6 xc/programs/Xserver/hw/kdrive/kmode.c:1.8 --- xc/programs/Xserver/hw/kdrive/kmode.c:1.6 Thu Mar 29 21:15:20 2001 +++ xc/programs/Xserver/hw/kdrive/kmode.c Fri Oct 18 02:08:10 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/kmode.c,v 1.6 2001/03/30 02:15:20 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/kmode.c,v 1.8 2002/10/18 06:08:10 keithp Exp $ * * Copyright 1999 SuSE, Inc. * @@ -30,12 +30,12 @@ /* FP BP BLANK POLARITY */ /* Other VESA modes */ { 640, 350, 85, 31500, /* VESA */ - 32, 96, 192, KdSyncPositive, /* 37.861 */ - 32, 60, 95, KdSyncNegative, /* 85.080 */ + 32, 96, 192, KdSyncPositive, /* 26.413 */ + 32, 60, 95, KdSyncNegative, /* 59.354 */ }, - { 640, 400, 85, 31500, /* VESA */ - 32, 96, 192, KdSyncNegative, /* 37.861 */ - 1, 41, 45, KdSyncPositive, /* 85.080 */ + { 640, 400, 60, 31500, /* VESA */ + 32, 96, 192, KdSyncNegative, /* 26.413 */ + 1, 41, 45, KdSyncPositive, /* 59.354 */ }, { 720, 400, 85, 35500, /* VESA */ 36, 108, 216, KdSyncNegative, /* 37.927 */ @@ -321,3 +321,64 @@ } return TRUE; } + +#ifdef RANDR +Bool +KdRandRGetInfo (ScreenPtr pScreen, + int randr, + Bool (*supported) (ScreenPtr pScreen, + const KdMonitorTiming *)) +{ + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + int i; + const KdMonitorTiming *t; + + for (i = 0, t = kdMonitorTimings; i < NUM_MONITOR_TIMINGS; i++, t++) + { + if ((*supported) (pScreen, t)) + { + RRScreenSizePtr pSize; + + pSize = RRRegisterSize (pScreen, + t->horizontal, + t->vertical, + screen->width_mm, + screen->height_mm); + if (!pSize) + return FALSE; + if (!RRRegisterRate (pScreen, pSize, t->rate)) + return FALSE; + if (t->horizontal == screen->width && + t->vertical == screen->height && + t->rate == screen->rate) + RRSetCurrentConfig (pScreen, randr, t->rate, pSize); + } + } + + return TRUE; +} + +const KdMonitorTiming * +KdRandRGetTiming (ScreenPtr pScreen, + Bool (*supported) (ScreenPtr pScreen, + const KdMonitorTiming *), + int rate, + RRScreenSizePtr pSize) +{ + KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; + int i; + const KdMonitorTiming *t; + + for (i = 0, t = kdMonitorTimings; i < NUM_MONITOR_TIMINGS; i++, t++) + { + if (t->horizontal == pSize->width && + t->vertical == pSize->height && + t->rate == rate && + (*supported) (pScreen, t)) + return t; + } + return 0; +} +#endif Index: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c diff -u xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c:1.28 xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c:1.32 --- xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c:1.28 Tue Jul 24 15:06:03 2001 +++ xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c Tue Nov 5 00:28:05 2002 @@ -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.28 2001/07/24 19:06:03 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.c,v 1.32 2002/11/05 05:28:05 keithp Exp $ */ #include "fbdev.h" @@ -186,7 +186,7 @@ break; } screen->rate = 72; - scrpriv->rotation = screen->rotation; + scrpriv->randr = screen->randr; #ifdef FAKE24_ON_16 if (screen->fb[0].depth == 24 && screen->fb[0].bitsPerPixel == 24 && @@ -348,43 +348,36 @@ int kind; KdMouseMatrix m; - switch (scrpriv->rotation) { - case 0: - pScreen->width = screen->width; - pScreen->height = screen->height; - pScreen->mmWidth = screen->width_mm; - pScreen->mmHeight = screen->height_mm; - scrpriv->shadow = FALSE; - m.matrix[0][0] = 1; m.matrix[0][1] = 0; m.matrix[0][2] = 0; - m.matrix[1][0] = 0; m.matrix[1][1] = 1; m.matrix[1][2] = 0; - break; - case 90: - pScreen->width = screen->height; - pScreen->height = screen->width; - pScreen->mmWidth = screen->height_mm; - pScreen->mmHeight = screen->width_mm; +#ifdef FAKE24_ON_16 + if (fake24) + { + scrpriv->randr = RR_Rotate_0; scrpriv->shadow = TRUE; - m.matrix[0][0] = 0; m.matrix[0][1] = -1; m.matrix[0][2] = screen->height - 1; - m.matrix[1][0] = 1; m.matrix[1][1] = 0; m.matrix[1][2] = 0; - break; - case 180: + } + else +#endif /* FAKE24_ON_16 */ + { + if (scrpriv->randr != RR_Rotate_0) + scrpriv->shadow = TRUE; + else + scrpriv->shadow = FALSE; + } + + KdComputeMouseMatrix (&m, scrpriv->randr, screen->width, screen->height); + + if (m.matrix[0][0]) + { pScreen->width = screen->width; pScreen->height = screen->height; pScreen->mmWidth = screen->width_mm; pScreen->mmHeight = screen->height_mm; - scrpriv->shadow = TRUE; - m.matrix[0][0] = -1; m.matrix[0][1] = 0; m.matrix[0][2] = screen->width - 1; - m.matrix[1][0] = 0; m.matrix[1][1] = -1; m.matrix[1][2] = screen->height - 1; - break; - case 270: + } + else + { pScreen->width = screen->height; pScreen->height = screen->width; pScreen->mmWidth = screen->height_mm; pScreen->mmHeight = screen->width_mm; - scrpriv->shadow = TRUE; - m.matrix[0][0] = 0; m.matrix[0][1] = 1; m.matrix[0][2] = 0; - m.matrix[1][0] = -1; m.matrix[1][1] = 0; m.matrix[1][2] = screen->width - 1; - break; } KdSetMouseMatrix (&m); @@ -400,7 +393,7 @@ else #endif /* FAKE24_ON_16 */ { - if (scrpriv->rotation) + if (scrpriv->randr) update = shadowUpdateRotatePacked; else update = shadowUpdatePacked; @@ -417,8 +410,9 @@ update = 0; window = 0; } + return LayerCreate (pScreen, kind, screen->fb[0].depth, - pPixmap, update, window, scrpriv->rotation, 0); + pPixmap, update, window, scrpriv->randr, 0); } @@ -430,14 +424,11 @@ FbdevPriv *priv = pScreenPriv->card->driver; KdScreenInfo *screen = pScreenPriv->screen; FbdevScrPriv *scrpriv = screen->driver; - RRVisualGroupPtr pVisualGroup; - RRGroupOfVisualGroupPtr pGroupOfVisualGroup; RRScreenSizePtr pSize; - Rotation rotateKind; - int rotation; + Rotation randr; int n; - *rotations = RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270; + *rotations = RR_Rotate_All|RR_Reflect_All; for (n = 0; n < pScreen->numDepths; n++) if (pScreen->allowedDepths[n].numVids) @@ -445,64 +436,15 @@ if (n == pScreen->numDepths) return FALSE; - pVisualGroup = RRCreateVisualGroup (pScreen); - if (!pVisualGroup) - return FALSE; - if (!RRAddDepthToVisualGroup (pScreen, - pVisualGroup, - &pScreen->allowedDepths[n])) - { - RRDestroyVisualGroup (pScreen, pVisualGroup); - return FALSE; - } - - pVisualGroup = RRRegisterVisualGroup (pScreen, pVisualGroup); - if (!pVisualGroup) - return FALSE; - - pGroupOfVisualGroup = RRCreateGroupOfVisualGroup (pScreen); - - if (!RRAddVisualGroupToGroupOfVisualGroup (pScreen, - pGroupOfVisualGroup, - pVisualGroup)) - { - RRDestroyGroupOfVisualGroup (pScreen, pGroupOfVisualGroup); - /* pVisualGroup left until screen closed */ - return FALSE; - } - - pGroupOfVisualGroup = RRRegisterGroupOfVisualGroup (pScreen, pGroupOfVisualGroup); - if (!pGroupOfVisualGroup) - return FALSE; - pSize = RRRegisterSize (pScreen, screen->width, screen->height, screen->width_mm, - screen->height_mm, - pGroupOfVisualGroup); + screen->height_mm); - rotation = scrpriv->rotation - screen->rotation; - if (rotation < 0) - rotation += 360; - - switch (rotation) - { - case 0: - rotateKind = RR_Rotate_0; - break; - case 90: - rotateKind = RR_Rotate_90; - break; - case 180: - rotateKind = RR_Rotate_180; - break; - case 270: - rotateKind = RR_Rotate_270; - break; - } - - RRSetCurrentConfig (pScreen, rotateKind, pSize, pVisualGroup); + randr = KdSubRotation (scrpriv->randr, screen->randr); + + RRSetCurrentConfig (pScreen, randr, 0, pSize); return TRUE; } @@ -531,43 +473,28 @@ } fbdevRandRSetConfig (ScreenPtr pScreen, - Rotation rotateKind, - RRScreenSizePtr pSize, - RRVisualGroupPtr pVisualGroup) + Rotation randr, + int rate, + RRScreenSizePtr pSize) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; FbdevPriv *priv = pScreenPriv->card->driver; FbdevScrPriv *scrpriv = screen->driver; - int rotation; + int rotate; + int reflect; Bool wasEnabled = pScreenPriv->enabled; /* * The only thing that can change is rotation */ - switch (rotateKind) - { - case RR_Rotate_0: - rotation = screen->rotation; - break; - case RR_Rotate_90: - rotation = screen->rotation + 90; - break; - case RR_Rotate_180: - rotation = screen->rotation + 180; - break; - case RR_Rotate_270: - rotation = screen->rotation + 270; - break; - } - if (rotation >= 360) - rotation -= 360; + randr = KdAddRotation (randr, screen->randr); - if (scrpriv->rotation != rotation) + if (scrpriv->randr != randr) { LayerPtr pNewLayer; int kind; - int oldrotation = scrpriv->rotation; + int oldrandr = scrpriv->randr; int oldshadow = scrpriv->shadow; int oldwidth = pScreen->width; int oldheight = pScreen->height; @@ -576,18 +503,18 @@ if (wasEnabled) KdDisableScreen (pScreen); - scrpriv->rotation = rotation; + scrpriv->randr = randr; pNewLayer = fbdevLayerCreate (pScreen); if (!pNewLayer) { scrpriv->shadow = oldshadow; - scrpriv->rotation = oldrotation; + scrpriv->randr = oldrandr; } if (WalkTree (pScreen, fbdevLayerAdd, (pointer) pNewLayer) == WT_STOPWALKING) { WalkTree (pScreen, fbdevLayerRemove, (pointer) pNewLayer); LayerDestroy (pScreen, pNewLayer); - scrpriv->rotation = oldrotation; + scrpriv->randr = oldrandr; scrpriv->shadow = oldshadow; pScreen->width = oldwidth; pScreen->height = oldheight; @@ -598,6 +525,7 @@ WalkTree (pScreen, fbdevLayerRemove, (pointer) scrpriv->pLayer); LayerDestroy (pScreen, scrpriv->pLayer); scrpriv->pLayer = pNewLayer; + KdSetSubpixelOrder (pScreen, scrpriv->randr); if (wasEnabled) KdEnableScreen (pScreen); } @@ -653,10 +581,6 @@ } } -#ifdef TOUCHSCREEN -int TsFbdev = -1; -#endif - Bool fbdevInitScreen (ScreenPtr pScreen) { @@ -667,7 +591,7 @@ ShadowWindowProc window; #ifdef TOUCHSCREEN - TsFbdev = pScreen->myNum; + KdTsPhyScreen = pScreen->myNum; #endif pScreen->CreateColormap = fbdevCreateColormap; Index: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.h diff -u xc/programs/Xserver/hw/kdrive/fbdev/fbdev.h:1.11 xc/programs/Xserver/hw/kdrive/fbdev/fbdev.h:1.12 --- xc/programs/Xserver/hw/kdrive/fbdev/fbdev.h:1.11 Sun Jun 3 17:52:45 2001 +++ xc/programs/Xserver/hw/kdrive/fbdev/fbdev.h Thu Oct 3 18:08:53 2002 @@ -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.h,v 1.11 2001/06/03 21:52:45 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/fbdev/fbdev.h,v 1.12 2002/10/03 22:08:53 keithp Exp $ */ #ifndef _FBDEV_H_ #define _FBDEV_H_ @@ -48,7 +48,7 @@ } FbdevPriv; typedef struct _fbdevScrPriv { - int rotation; + Rotation randr; Bool shadow; LayerPtr pLayer; } FbdevScrPriv; Index: xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c diff -u xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c:1.2 xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c:1.3 --- xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c:1.2 Mon Dec 10 11:34:20 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c Wed Oct 30 07:52:06 2002 @@ -60,13 +60,13 @@ -/* $XFree86: xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c,v 1.2 2001/12/10 16:34:20 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/i810/i810_cursor.c,v 1.3 2002/10/30 12:52:06 alanh Exp $ */ /* i810_cursor.c: KDrive hardware cursor routines for the i810 chipset */ /* * Authors: - * Keith Whitwell <keithw@precisioninsight.com> + * Keith Whitwell <keith@tungstengraphics.com> * Pontus Lidman <pontus.lidman@nokia.com> * */ Index: xc/programs/Xserver/hw/kdrive/i810/i810_reg.h diff -u xc/programs/Xserver/hw/kdrive/i810/i810_reg.h:1.1 xc/programs/Xserver/hw/kdrive/i810/i810_reg.h:1.2 --- xc/programs/Xserver/hw/kdrive/i810/i810_reg.h:1.1 Thu Mar 29 21:18:41 2001 +++ xc/programs/Xserver/hw/kdrive/i810/i810_reg.h Wed Oct 30 07:52:06 2002 @@ -57,11 +57,11 @@ 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 $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/i810/i810_reg.h,v 1.2 2002/10/30 12:52:06 alanh Exp $ */ /* * Authors: - * Keith Whitwell <keithw@precisioninsight.com> + * Keith Whitwell <keith@tungstengraphics.com> * Pontus Lidman <pontus.lidman@nokia.com> * * based on the i740 driver by Index: xc/programs/Xserver/hw/kdrive/ipaq/ipaq.c diff -u xc/programs/Xserver/hw/kdrive/ipaq/ipaq.c:1.3 xc/programs/Xserver/hw/kdrive/ipaq/ipaq.c:1.4 --- xc/programs/Xserver/hw/kdrive/ipaq/ipaq.c:1.3 Fri Oct 12 02:33:09 2001 +++ xc/programs/Xserver/hw/kdrive/ipaq/ipaq.c Mon Oct 14 14:01:41 2002 @@ -22,7 +22,7 @@ * Adapted from ts300.c by Alan Hourihane <alanh@fairlite.demon.co.uk> * For the Compaq IPAQ handheld, with the HP VGA Out Card (F1252A). */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/ipaq/ipaq.c,v 1.3 2001/10/12 06:33:09 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/ipaq/ipaq.c,v 1.4 2002/10/14 18:01:41 keithp Exp $ */ #include "pcmcia.h" @@ -58,28 +58,5 @@ int ddxProcessArgument (int argc, char **argv, int i) { - int ret; - - if (!strcmp (argv[i], "-listmodes")) - { - int j = 0, bpp = 0; - ErrorF("Valid modes are....\n\n"); - - for (bpp = 8; bpp < 24; bpp += 8) { - while (pcmciaDefaultModes[j].Width != 0) { - if ((pcmciaDefaultModes[j].Width * - pcmciaDefaultModes[j].Height * bpp/8) <= 512 * 1024) { - ErrorF("%dx%dx%dx%d\n", - pcmciaDefaultModes[j].Width, - pcmciaDefaultModes[j].Height, - bpp, - pcmciaDefaultModes[j].Refresh); - } - j++; - } - j = 0; - } - exit(1); - } return KdProcessArgument (argc, argv, i); } Index: xc/programs/Xserver/hw/kdrive/linux/Imakefile diff -u xc/programs/Xserver/hw/kdrive/linux/Imakefile:1.8 xc/programs/Xserver/hw/kdrive/linux/Imakefile:1.9 --- xc/programs/Xserver/hw/kdrive/linux/Imakefile:1.8 Fri Oct 12 02:33:09 2001 +++ xc/programs/Xserver/hw/kdrive/linux/Imakefile Fri Nov 1 17:27:49 2002 @@ -1,11 +1,16 @@ XCOMM $XConsortium: Imakefile /main/10 1996/12/02 10:20:33 lehors $ -XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/linux/Imakefile,v 1.8 2001/10/12 06:33:09 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/linux/Imakefile,v 1.9 2002/11/01 22:27:49 keithp Exp $ KDRIVE=.. #include "../Kdrive.tmpl" #if TouchScreen +#if HasTsLib +TSSRCS = tslib.c +TSOBJS = tslib.o +#else TSSRCS = ts.c TSOBJS = ts.o +#endif #endif SRCS = keyboard.c linux.c mouse.c ps2.c bus.c ms.c agp.c $(TSSRCS) Index: xc/programs/Xserver/hw/kdrive/linux/agp.c diff -u xc/programs/Xserver/hw/kdrive/linux/agp.c:1.1 xc/programs/Xserver/hw/kdrive/linux/agp.c:1.2 --- xc/programs/Xserver/hw/kdrive/linux/agp.c:1.1 Thu Mar 29 21:18:41 2001 +++ xc/programs/Xserver/hw/kdrive/linux/agp.c Thu Dec 12 13:29:05 2002 @@ -35,7 +35,7 @@ */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/linux/agp.c,v 1.1 2001/03/30 02:18:41 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/linux/agp.c,v 1.2 2002/12/12 18:29:05 eich Exp $ */ /* * Author: Pontus Lidman <pontus.lidman@nokia.com> (adaption to KDrive) and others @@ -120,9 +120,16 @@ 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) { + /* Per Dave Jones, every effort will be made to keep the + * agpgart interface backwards compatible, so allow all + * future versions. + */ + if ( +#if (AGPGART_MAJOR_VERSION > 0) /* quiet compiler */ + agpinf.version.major < AGPGART_MAJOR_VERSION || +#endif + (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", Index: xc/programs/Xserver/hw/kdrive/linux/linux.c diff -u xc/programs/Xserver/hw/kdrive/linux/linux.c:1.7 xc/programs/Xserver/hw/kdrive/linux/linux.c:1.8 --- xc/programs/Xserver/hw/kdrive/linux/linux.c:1.7 Thu Nov 8 04:33:51 2001 +++ xc/programs/Xserver/hw/kdrive/linux/linux.c Tue Oct 8 17:27:55 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/linux/linux.c,v 1.7 2001/11/08 09:33:51 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/linux/linux.c,v 1.8 2002/10/08 21:27:55 keithp Exp $ * * Copyright © 1999 Keith Packard * @@ -75,16 +75,21 @@ FatalError("LinuxInit: Server must be suid root\n"); } - if ((fd = open("/dev/tty0",O_WRONLY,0)) < 0) + if (kdVirtualTerminal >= 0) + vtno = kdVirtualTerminal; + else { - FatalError( - "LinuxInit: Cannot open /dev/tty0 (%s)\n", - strerror(errno)); - } - if ((ioctl(fd, VT_OPENQRY, &vtno) < 0) || - (vtno == -1)) - { - FatalError("xf86OpenConsole: Cannot find a free VT\n"); + if ((fd = open("/dev/tty0",O_WRONLY,0)) < 0) + { + FatalError( + "LinuxInit: Cannot open /dev/tty0 (%s)\n", + strerror(errno)); + } + if ((ioctl(fd, VT_OPENQRY, &vtno) < 0) || + (vtno == -1)) + { + FatalError("xf86OpenConsole: Cannot find a free VT\n"); + } } close(fd); Index: xc/programs/Xserver/hw/kdrive/linux/mouse.c diff -u xc/programs/Xserver/hw/kdrive/linux/mouse.c:1.5 xc/programs/Xserver/hw/kdrive/linux/mouse.c:1.6 --- xc/programs/Xserver/hw/kdrive/linux/mouse.c:1.5 Thu Dec 20 11:47:30 2001 +++ xc/programs/Xserver/hw/kdrive/linux/mouse.c Fri Aug 2 12:11:35 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/linux/mouse.c,v 1.5 2001/12/20 16:47:30 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/linux/mouse.c,v 1.6 2002/08/02 16:11:35 keithp Exp $ * * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. * @@ -912,6 +912,8 @@ { next = mi->next; prot = mi->prot; + if (mi->inputType) + continue; if (!mi->name) { for (i = 0; i < NUM_DEFAULT_MOUSE; i++) @@ -938,6 +940,7 @@ km->i_prot = 0; km->tty = isatty (fd); mi->driver = km; + mi->inputType = MouseInputType; MouseFirstProtocol (km, mi->prot); if (KdRegisterFd (MouseInputType, fd, MouseRead, (void *) mi)) n++; @@ -945,8 +948,6 @@ else close (fd); } - else - KdMouseInfoDispose (mi); } } @@ -958,10 +959,11 @@ KdUnregisterFds (MouseInputType, TRUE); for (mi = kdMouseInfo; mi; mi = mi->next) { - if (mi->driver) + if (mi->inputType == MouseInputType) { xfree (mi->driver); mi->driver = 0; + mi->inputType = 0; } } } Index: xc/programs/Xserver/hw/kdrive/linux/ps2.c diff -u xc/programs/Xserver/hw/kdrive/linux/ps2.c:1.6 xc/programs/Xserver/hw/kdrive/linux/ps2.c:1.7 --- xc/programs/Xserver/hw/kdrive/linux/ps2.c:1.6 Fri Oct 12 02:33:10 2001 +++ xc/programs/Xserver/hw/kdrive/linux/ps2.c Fri Aug 2 12:11:35 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/linux/ps2.c,v 1.6 2001/10/12 06:33:10 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/linux/ps2.c,v 1.7 2002/08/02 16:11:35 keithp Exp $ * * Copyright © 1999 Keith Packard * @@ -62,7 +62,7 @@ char *Ps2Names[] = { "/dev/psaux", - "/dev/mouse", +/* "/dev/mouse", */ "/dev/input/mice", }; Index: xc/programs/Xserver/hw/kdrive/linux/ts.c diff -u xc/programs/Xserver/hw/kdrive/linux/ts.c:1.6 xc/programs/Xserver/hw/kdrive/linux/ts.c:1.10 --- xc/programs/Xserver/hw/kdrive/linux/ts.c:1.6 Thu Dec 6 21:19:04 2001 +++ xc/programs/Xserver/hw/kdrive/linux/ts.c Tue Nov 12 17:20:42 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/linux/ts.c,v 1.6 2001/12/07 02:19:04 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/linux/ts.c,v 1.10 2002/11/12 22:20:42 keithp Exp $ * * Derived from ps2.c by Jim Gettys * @@ -46,8 +46,6 @@ #endif static long lastx = 0, lasty = 0; -int TsScreen; -extern int TsFbdev; int TsReadBytes (int fd, char *buf, int len, int min) @@ -103,7 +101,7 @@ * touch screen, if it is we send absolute coordinates. If not, * then we send delta's so that we can track the entire vga screen. */ - if (TsScreen == TsFbdev) { + if (KdTsCurScreen == KdTsPhyScreen) { flags = KD_BUTTON_1; x = event.x; y = event.y; @@ -154,6 +152,8 @@ for (mi = kdMouseInfo; mi; mi = next) { next = mi->next; + if (mi->inputType) + continue; if (!mi->name) { for (i = 0; i < NUM_TS_NAMES; i++) @@ -170,19 +170,37 @@ fd = open (mi->name, 0); if (fd >= 0) { - mi->driver = (void *) fd; - if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi)) - n++; + struct h3600_ts_calibration cal; + /* + * Check to see if this is a touch screen + */ + if (ioctl (fd, TS_GET_CAL, &cal) != -1) + { + mi->driver = (void *) fd; + mi->inputType = TsInputType; + if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi)) + n++; + } + else + close (fd); } - else - KdMouseInfoDispose (mi); } } void TsFini (void) { + KdMouseInfo *mi; + KdUnregisterFds (TsInputType, TRUE); + for (mi = kdMouseInfo; mi; mi = mi->next) + { + if (mi->inputType == TsInputType) + { + mi->driver = 0; + mi->inputType = 0; + } + } } KdMouseFuncs TsFuncs = { Index: xc/programs/Xserver/hw/kdrive/linux/tslib.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/linux/tslib.c:1.2 --- /dev/null Thu Feb 27 12:29:31 2003 +++ xc/programs/Xserver/hw/kdrive/linux/tslib.c Tue Nov 5 00:28:06 2002 @@ -0,0 +1,185 @@ +/* + * $XFree86: xc/programs/Xserver/hw/kdrive/linux/tslib.c,v 1.2 2002/11/05 05:28:06 keithp Exp $ + * TSLIB based touchscreen driver for TinyX + * Derived from ts.c by Keith Packard + * Derived from ps2.c by Jim Gettys + * + * Copyright © 1999 Keith Packard + * Copyright © 2000 Compaq Computer Corporation + * Copyright © 2002 MontaVista Software 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 or Compaq not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard and Compaq makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD AND COMPAQ DISCLAIM 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. + * + * 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 Michael Taht or MontaVista not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Michael Taht and Montavista make no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * MICHAEL TAHT AND MONTAVISTA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, + * IN NO EVENT SHALL EITHER 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. + */ + + +#define NEED_EVENTS +#include "X.h" +#include "Xproto.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "kdrive.h" +#include "Xpoll.h" +#include <sys/ioctl.h> +#include <tslib.h> + +static long lastx = 0, lasty = 0; +static struct tsdev *tsDev = NULL; + +void +TsRead (int tsPort, void *closure) +{ + KdMouseInfo *mi = closure; + int fd = (int) mi->driver; + struct ts_sample event; + int n; + long pressure; + long x, y; + unsigned long flags; + unsigned long buttons; + + n = ts_read(tsDev, &event, 1); + if (n == 1) + { + if (event.pressure) + { + /* + * HACK ATTACK. (static global variables used !) + * Here we test for the touch screen driver actually being on the + * touch screen, if it is we send absolute coordinates. If not, + * then we send delta's so that we can track the entire vga screen. + */ + if (KdTsCurScreen == KdTsPhyScreen) { + flags = KD_BUTTON_1; + x = event.x; + y = event.y; + } else { + flags = /* KD_BUTTON_1 |*/ KD_MOUSE_DELTA; + if ((lastx == 0) || (lasty == 0)) { + x = 0; + y = 0; + } else { + x = event.x - lastx; + y = event.y - lasty; + } + lastx = event.x; + lasty = event.y; + } + } else { + flags = KD_MOUSE_DELTA; + x = 0; + y = 0; + lastx = 0; + lasty = 0; + } + KdEnqueueMouseEvent (mi, flags, x, y); + } +} + +static char *TsNames[] = { + "/dev/ts", + "/dev/touchscreen/0", +}; + +#define NUM_TS_NAMES (sizeof (TsNames) / sizeof (TsNames[0])) + +int TsInputType; + +int +TslibInit (void) +{ + int i; + KdMouseInfo *mi, *next; + int fd= 0; + int n = 0; + + if (!TsInputType) + TsInputType = KdAllocInputType (); + + for (mi = kdMouseInfo; mi; mi = next) + { + next = mi->next; + if (mi->inputType) + continue; + + if (!mi->name) + { + for (i = 0; i < NUM_TS_NAMES; i++) + { + if(!(tsDev = ts_open(TsNames[i],0))) continue; + ts_config(tsDev); + fd=ts_fd(tsDev); + if (fd >= 0) + { + mi->name = KdSaveString (TsNames[i]); + break; + } + } + } + + if (fd > 0 && tsDev != 0) + { + mi->driver = (void *) fd; + mi->inputType = TsInputType; + if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi)) + n++; + } + else + if (fd > 0) close(fd); + } +} + +void +TslibFini (void) +{ + KdMouseInfo *mi; + + KdUnregisterFds (TsInputType, TRUE); + for (mi = kdMouseInfo; mi; mi = mi->next) + { + if (mi->inputType == TsInputType) + { + if(mi->driver) ts_close(tsDev); + mi->driver = 0; + mi->inputType = 0; + } + } +} + +KdMouseFuncs TsFuncs = { + TslibInit, + TslibFini +}; Index: xc/programs/Xserver/hw/kdrive/mach64/mach64.c diff -u xc/programs/Xserver/hw/kdrive/mach64/mach64.c:1.8 xc/programs/Xserver/hw/kdrive/mach64/mach64.c:1.11 --- xc/programs/Xserver/hw/kdrive/mach64/mach64.c:1.8 Tue Jul 24 17:26:17 2001 +++ xc/programs/Xserver/hw/kdrive/mach64/mach64.c Fri Oct 18 02:31:17 2002 @@ -19,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/mach64/mach64.c,v 1.8 2001/07/24 21:26:17 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/mach64/mach64.c,v 1.11 2002/10/18 06:31:17 keithp Exp $ */ #include "mach64.h" #include <sys/io.h> @@ -123,14 +123,14 @@ #ifdef RANDR mach64RandRSetConfig (ScreenPtr pScreen, Rotation rotation, - RRScreenSizePtr pSize, - RRVisualGroupPtr pVisualGroup) + int rate, + RRScreenSizePtr pSize) { KdScreenPriv(pScreen); KdCheckSync (pScreen); - if (!vesaRandRSetConfig (pScreen, rotation, pSize, pVisualGroup)) + if (!vesaRandRSetConfig (pScreen, rotation, rate, pSize)) return FALSE; return TRUE; Index: xc/programs/Xserver/hw/kdrive/mach64/mach64stub.c diff -u xc/programs/Xserver/hw/kdrive/mach64/mach64stub.c:1.2 xc/programs/Xserver/hw/kdrive/mach64/mach64stub.c:1.4 --- xc/programs/Xserver/hw/kdrive/mach64/mach64stub.c:1.2 Fri Oct 12 02:33:10 2001 +++ xc/programs/Xserver/hw/kdrive/mach64/mach64stub.c Tue Oct 8 17:25:35 2002 @@ -22,7 +22,7 @@ * * Author: Keith Packard, SuSE, Inc. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/mach64/mach64stub.c,v 1.2 2001/10/12 06:33:10 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/mach64/mach64stub.c,v 1.4 2002/10/08 21:25:35 keithp Exp $ */ #include "mach64.h" @@ -32,6 +32,10 @@ KdCardAttr attr; if (LinuxFindPci (0x1002, 0x4c4d, 0, &attr)) + KdCardInfoAdd (&mach64Funcs, &attr, 0); + else if (LinuxFindPci (0x1002, 0x4c49, 0, &attr)) + KdCardInfoAdd (&mach64Funcs, &attr, 0); + else if (LinuxFindPci (0x1002, 0x4c46, 0, &attr)) KdCardInfoAdd (&mach64Funcs, &attr, 0); } Index: xc/programs/Xserver/hw/kdrive/mach64/mach64video.c diff -u xc/programs/Xserver/hw/kdrive/mach64/mach64video.c:1.7 xc/programs/Xserver/hw/kdrive/mach64/mach64video.c:1.9 --- xc/programs/Xserver/hw/kdrive/mach64/mach64video.c:1.7 Thu Aug 9 05:08:55 2001 +++ xc/programs/Xserver/hw/kdrive/mach64/mach64video.c Fri Oct 18 02:00:29 2002 @@ -19,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/mach64/mach64video.c,v 1.7 2001/08/09 09:08:55 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/mach64/mach64video.c,v 1.9 2002/10/18 06:00:29 keithp Exp $ */ #include "mach64.h" #include "Xv.h" @@ -148,7 +148,7 @@ static void mach64CopyPackedData(KdScreenInfo *screen, unsigned char *buf, - int rotate, + int randr, int srcPitch, int dstPitch, int srcW, @@ -168,24 +168,24 @@ int srcDown, srcRight, srcNext; int p; - switch (rotate) { - case 0: + switch (randr & RR_Rotate_All) { + case RR_Rotate_0: src = buf; srcDown = srcPitch; srcRight = 2; break; - case 90: - src = src + (srcH - 1) * 2; + case RR_Rotate_90: + src = buf + (srcH - 1) * 2; srcDown = -2; srcRight = srcPitch; break; - case 180: - src = src + srcPitch * (srcH - 1) + (srcW - 1) * 2; + case RR_Rotate_180: + src = buf + srcPitch * (srcH - 1) + (srcW - 1) * 2; srcDown = -srcPitch; srcRight = -2; break; - case 270: - src = src + srcPitch * (srcW - 1); + case RR_Rotate_270: + src = buf + srcPitch * (srcW - 1); srcDown = 2; srcRight = -srcPitch; break; @@ -219,7 +219,7 @@ static void mach64CopyPlanarData(KdScreenInfo *screen, unsigned char *buf, - int rotate, + int randr, int srcPitch, int srcPitch2, int dstPitch, /* of chroma */ @@ -246,15 +246,15 @@ src1 = buf; src2 = src1 + height * srcPitch; src3 = src2 + (height >> 1) * srcPitch2; - switch (rotate) { - case 0: + switch (randr & RR_Rotate_All) { + case RR_Rotate_0: srcDown = srcPitch; srcDown2 = srcPitch2; srcRight = 2; srcRight2 = 1; srcNext = 1; break; - case 90: + case RR_Rotate_90: src1 = src1 + srcH - 1; src2 = src2 + (srcH >> 1) - 1; src3 = src3 + (srcH >> 1) - 1; @@ -264,7 +264,7 @@ srcRight2 = srcPitch2; srcNext = srcPitch; break; - case 180: + case RR_Rotate_180: src1 = src1 + srcPitch * (srcH - 1) + (srcW - 1); src2 = src2 + srcPitch2 * ((srcH >> 1) - 1) + ((srcW >> 1) - 1); src3 = src3 + srcPitch2 * ((srcH >> 1) - 1) + ((srcW >> 1) - 1); @@ -274,7 +274,7 @@ srcRight2 = -1; srcNext = -1; break; - case 270: + case RR_Rotate_270: src1 = src1 + srcPitch * (srcW - 1); src2 = src2 + srcPitch2 * ((srcW >> 1) - 1); src3 = src3 + srcPitch2 * ((srcW >> 1) - 1); @@ -505,7 +505,7 @@ int xscaleInt, xscaleFract, yscaleInt, yscaleFract; int xscaleIntUV = 0, xscaleFractUV = 0; int yscaleIntUV = 0, yscaleFractUV = 0; - int rotate = mach64s->vesa.rotate; + int randr = mach64s->vesa.randr; int HORZ_INC, VERT_INC; CARD32 SCALER_IN; CARD32 OVERLAY_SCALE_CNTL; @@ -622,7 +622,7 @@ Reg *reg = mach64c->reg; MediaReg *media = mach64c->media_reg; INT32 x1, x2, y1, y2; - int rotate = mach64s->vesa.rotate; + int randr = mach64s->vesa.randr; int srcPitch, srcPitch2, dstPitch; int top, left, npixels, nlines, size; BoxRec dstBox; @@ -651,29 +651,27 @@ if (!media) return BadAlloc; - switch (rotate) { - case 0: - case 180: + if (randr & (RR_Rotate_0|RR_Rotate_180)) + { dst_width = width; dst_height = height; rot_src_w = src_w; rot_src_h = src_h; rot_drw_w = drw_w; rot_drw_h = drw_h; - break; - case 90: - case 270: + } + else + { dst_width = height; dst_height = width; rot_src_w = src_h; rot_src_h = src_w; rot_drw_w = drw_h; rot_drw_h = drw_w; - break; } - switch (rotate) { - case 0: + switch (randr & RR_Rotate_All) { + case RR_Rotate_0: dst_x1 = dstBox.x1; dst_y1 = dstBox.y1; dst_x2 = dstBox.x2; @@ -683,7 +681,7 @@ rot_x2 = x2; rot_y2 = y2; break; - case 90: + case RR_Rotate_90: dst_x1 = dstBox.y1; dst_y1 = screen->height - dstBox.x2; dst_x2 = dstBox.y2; @@ -694,7 +692,7 @@ rot_x2 = y2; rot_y2 = (src_w << 16) - x1; break; - case 180: + case RR_Rotate_180: dst_x1 = screen->width - dstBox.x2; dst_y1 = screen->height - dstBox.y2; dst_x2 = screen->width - dstBox.x1; @@ -704,7 +702,7 @@ rot_x2 = (src_w << 16) - x1; rot_y2 = (src_h << 16) - y1; break; - case 270: + case RR_Rotate_270: dst_x1 = screen->width - dstBox.y2; dst_y1 = dstBox.x1; dst_x2 = screen->width - dstBox.y1; @@ -764,7 +762,7 @@ case FOURCC_I420: top &= ~1; nlines = ((((rot_y2 + 0xffff) >> 16) + 1) & ~1) - top; - mach64CopyPlanarData(screen, buf, rotate, + mach64CopyPlanarData(screen, buf, randr, srcPitch, srcPitch2, dstPitch, rot_src_w, rot_src_h, height, top, left, nlines, npixels, id); @@ -773,7 +771,7 @@ case FOURCC_YUY2: default: nlines = ((rot_y2 + 0xffff) >> 16) - top; - mach64CopyPackedData(screen, buf, rotate, + mach64CopyPackedData(screen, buf, randr, srcPitch, dstPitch, rot_src_w, rot_src_h, top, left, nlines, Index: xc/programs/Xserver/hw/kdrive/pcmcia/Imakefile diff -u xc/programs/Xserver/hw/kdrive/pcmcia/Imakefile:1.1 xc/programs/Xserver/hw/kdrive/pcmcia/Imakefile:1.2 --- xc/programs/Xserver/hw/kdrive/pcmcia/Imakefile:1.1 Wed May 23 04:56:08 2001 +++ xc/programs/Xserver/hw/kdrive/pcmcia/Imakefile Mon Oct 14 14:01:41 2002 @@ -1,10 +1,10 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/pcmcia/Imakefile,v 1.1 2001/05/23 08:56:08 alanh Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/pcmcia/Imakefile,v 1.2 2002/10/14 18:01:41 keithp Exp $ KDRIVE=.. #include "../Kdrive.tmpl" -SRCS = pcmcia.c pcmciacurs.c pcmciastub.c pcmciashadow.c +SRCS = pcmcia.c pcmciacurs.c pcmciastub.c pcmciashadow.c pcmciarotate.c -OBJS = pcmcia.o pcmciacurs.o pcmciastub.o pcmciashadow.o +OBJS = pcmcia.o pcmciacurs.o pcmciastub.o pcmciashadow.o pcmciarotate.o INCLUDES = -I. $(KDINCS) -I$(KDRIVE)/fbdev Index: xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.c diff -u xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.c:1.5 xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.c:1.7 --- xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.c:1.5 Fri Jul 20 15:35:30 2001 +++ xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.c Fri Oct 18 02:08:10 2002 @@ -27,7 +27,7 @@ * * Tested running under a Compaq IPAQ Pocket PC running Linux */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.c,v 1.5 2001/07/20 19:35:30 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.c,v 1.7 2002/10/18 06:08:10 keithp Exp $ */ #include "pcmcia.h" #define extern @@ -40,8 +40,6 @@ #define CLK_K(a,b) (((b) >> 6) & 3) #define CLK_FREQ(a,b) (((CLK_N(a,b) + 8) * CLOCK) / ((CLK_M(a,b)+2) << CLK_K(a,b))) -#include "modes.h" - extern void tridentUpdatePacked (ScreenPtr pScreen, shadowBufPtr pBuf); @@ -49,6 +47,12 @@ cirrusUpdatePacked (ScreenPtr pScreen, shadowBufPtr pBuf); +static Bool +tridentSetCLK(int clock, CARD8 *a, CARD8 *b); + +static Bool +CirrusFindClock(int freq, int *num_out, int *den_out); + Bool pcmciaCardInit (KdCardInfo *card) { @@ -102,12 +106,65 @@ } Bool +pcmciaModeSupported (KdScreenInfo *screen, + const KdMonitorTiming *t) +{ + KdCardInfo *card = screen->card; + pcmciaCardInfo *pcmciac = (pcmciaCardInfo *) card->driver; + + if (pcmciac->HP) + { + CARD8 a, b; + if (!tridentSetCLK (t->clock, &a, &b)) + return FALSE; + } + else + { + int a, b; + if (!CirrusFindClock (t->clock, &a, &b)) + return FALSE; + } + + /* width must be a multiple of 16 */ + if (t->horizontal & 0xf) + return FALSE; + return TRUE; +} + +Bool +pcmciaModeUsable (KdScreenInfo *screen) +{ + KdCardInfo *card = screen->card; + pcmciaCardInfo *pcmciac = (pcmciaCardInfo *) card->driver; + int screen_size; + int pixel_width; + int byte_width; + int fb; + + if (screen->fb[0].depth == 8) + screen->fb[0].bitsPerPixel = 8; + else if (screen->fb[0].depth == 15 || screen->fb[0].depth == 16) + screen->fb[0].bitsPerPixel = 16; + else + return FALSE; + + screen_size = 0; + screen->fb[0].pixelStride = screen->width; + screen->fb[0].byteStride = screen->width * (screen->fb[0].bitsPerPixel >>3); + screen->fb[0].frameBuffer = pcmciac->fb; + screen_size = screen->fb[0].byteStride * screen->height; + + return screen_size <= pcmciac->memory; +} + +Bool pcmciaScreenInit (KdScreenInfo *screen) { pcmciaCardInfo *pcmciac = screen->card->driver; pcmciaScreenInfo *pcmcias; int screen_size, memory; int i; + const KdMonitorTiming *t; pcmcias = (pcmciaScreenInfo *) xalloc (sizeof (pcmciaScreenInfo)); if (!pcmcias) @@ -117,64 +174,50 @@ /* if (!pcmciac->cop) */ screen->dumb = TRUE; - /* default to 8bpp */ - if (!screen->fb[0].depth) + if (screen->fb[0].depth < 8) screen->fb[0].depth = 8; + + /* default to 16bpp */ + if (!screen->fb[0].depth) + screen->fb[0].depth = 16; /* default to 60Hz refresh */ - if (!screen->rate) + if (!screen->width || !screen->height) + { + screen->width = 640; + screen->height = 400; screen->rate = 60; - - i = 0; - pcmcias->Mode = -1; - while (pcmciaDefaultModes[i].Width != 0) { - if ( (screen->width == pcmciaDefaultModes[i].Width) && - (screen->height == pcmciaDefaultModes[i].Height) && - (screen->rate == pcmciaDefaultModes[i].Refresh) ) { - pcmcias->Mode = i; - break; - } - i++; } - if ( pcmcias->Mode == -1 ) { - ErrorF("PCMCIA: no matching vesa mode for screen selection, aborting.\n"); - ErrorF("PCMCIA: use -listmodes to check for supported list of modes.\n"); - return FALSE; /* end of list */ + pcmciac->memory = 512 * 1024; + if (pcmciac->HP && !screen->softCursor && screen->fb[0].depth == 8) + { + /* ack, bail on the HW cursor for everything -- no ARGB falback */ + pcmcias->cursor_base = 0; +#if 0 + /* Let's do hw cursor for the HP card, only in 8bit mode though */ + pcmcias->cursor_base = pcmcias->screen + pcmciac->memory - 4096; + pcmciac->memory -= 4096; +#endif } - pcmcias->rotation = screen->rotation; - - memory = 512 * 1024; pcmcias->screen = pcmciac->fb; + screen->driver = pcmcias; - if (pcmciac->HP && !screen->softCursor && screen->fb[0].depth == 8) { - /* Let's do hw cursor for the HP card, only in 8bit mode though */ - pcmcias->cursor_base = pcmcias->screen + memory - 4096; - memory -= 4096; - } + t = KdFindMode (screen, pcmciaModeSupported); + + screen->rate = t->rate; + screen->width = t->horizontal; + screen->height = t->vertical; - if (screen->fb[0].depth == 4) { - ErrorF("PCMCIA: depth 4 isn't supported.\n"); - return FALSE; /* screen->fb[0].bitsPerPixel = 4; need fb to support it*/ - } else - if (screen->fb[0].depth == 8) - screen->fb[0].bitsPerPixel = 8; - else - if (screen->fb[0].depth == 15 || - screen->fb[0].depth == 16) - screen->fb[0].bitsPerPixel = 16; + pcmcias->randr = screen->randr; - if ( (screen->width * screen->height * - (screen->fb[0].bitsPerPixel / 8)) > memory) { - ErrorF("PCMCIA: Not enough memory for resolution requested, aborting.\n"); + if (!KdTuneMode (screen, pcmciaModeUsable, pcmciaModeSupported)) + { + xfree (pcmcias); return FALSE; } - screen->fb[0].pixelStride = screen->width; - screen->fb[0].byteStride = screen->width * (screen->fb[0].bitsPerPixel >>3); - - screen->fb[0].frameBuffer = pcmciac->fb; switch (screen->fb[0].depth) { case 4: screen->fb[0].visuals = ((1 << StaticGray) | @@ -208,9 +251,6 @@ screen->fb[0].redMask = 0xf800; break; } - screen_size = screen->fb[0].byteStride * screen->height; - - screen->driver = pcmcias; return TRUE; } @@ -265,108 +305,21 @@ pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; ShadowUpdateProc update; ShadowWindowProc window; - KdMouseMatrix m; PixmapPtr pPixmap; int kind; - switch (pcmcias->rotation) { - case 0: - pScreen->width = screen->width; - pScreen->height = screen->height; - pScreen->mmWidth = screen->width_mm; - pScreen->mmHeight = screen->height_mm; - m.matrix[0][0] = 1; m.matrix[0][1] = 0; m.matrix[0][2] = 0; - m.matrix[1][0] = 0; m.matrix[1][1] = 1; m.matrix[1][2] = 0; - break; - case 90: - pScreen->width = screen->height; - pScreen->height = screen->width; - pScreen->mmWidth = screen->height_mm; - pScreen->mmHeight = screen->width_mm; - m.matrix[0][0] = 0; m.matrix[0][1] = -1; m.matrix[0][2] = screen->height - 1; - m.matrix[1][0] = 1; m.matrix[1][1] = 0; m.matrix[1][2] = 0; - break; - case 180: - pScreen->width = screen->width; - pScreen->height = screen->height; - pScreen->mmWidth = screen->width_mm; - pScreen->mmHeight = screen->height_mm; - m.matrix[0][0] = -1; m.matrix[0][1] = 0; m.matrix[0][2] = screen->width - 1; - m.matrix[1][0] = 0; m.matrix[1][1] = -1; m.matrix[1][2] = screen->height - 1; - break; - case 270: - pScreen->width = screen->height; - pScreen->height = screen->width; - pScreen->mmWidth = screen->height_mm; - pScreen->mmHeight = screen->width_mm; - m.matrix[0][0] = 0; m.matrix[0][1] = 1; m.matrix[0][2] = 0; - m.matrix[1][0] = -1; m.matrix[1][1] = 0; m.matrix[1][2] = screen->width - 1; - break; - } - KdSetMouseMatrix (&m); - if (pcmciac->HP) { window = tridentWindowLinear; - switch (pcmcias->rotation) { - case 0: - update = tridentUpdatePacked; - break; - case 90: - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - update = shadowUpdateRotate8_90; break; - case 16: - update = shadowUpdateRotate16_90; break; - } - break; - case 180: - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - update = shadowUpdateRotate8_180; break; - case 16: - update = shadowUpdateRotate16_180; break; - } - break; - case 270: - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - update = shadowUpdateRotate8_270; break; - case 16: - update = shadowUpdateRotate16_270; break; - } - break; - } + if (pcmcias->randr == RR_Rotate_0) + update = tridentUpdatePacked; + else + update = pcmciaUpdateRotatePacked; } else { window = cirrusWindowWindowed; - switch (pcmcias->rotation) { - case 0: - update = cirrusUpdatePacked; - break; - case 90: - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - update = shadowUpdateRotate8_90; break; - case 16: - update = shadowUpdateRotate16_90; break; - } - break; - case 180: - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - update = shadowUpdateRotate8_180; break; - case 16: - update = shadowUpdateRotate16_180; break; - } - break; - case 270: - switch (pScreenPriv->screen->fb[0].bitsPerPixel) { - case 8: - update = shadowUpdateRotate8_270; break; - case 16: - update = shadowUpdateRotate16_270; break; - } - break; - } + if (pcmcias->randr == RR_Rotate_0) + update = cirrusUpdatePacked; + else + update = pcmciaUpdateRotatePacked; } if (!update) @@ -376,93 +329,71 @@ pPixmap = 0; return LayerCreate (pScreen, kind, screen->fb[0].depth, - pPixmap, update, window, pcmcias->rotation, 0); + pPixmap, update, window, pcmcias->randr, 0); } -#ifdef RANDR -Bool -pcmciaRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) +void +pcmciaConfigureScreen (ScreenPtr pScreen) { KdScreenPriv(pScreen); - pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - KdScreenInfo *screen = pScreenPriv->screen; - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; - RRVisualGroupPtr pVisualGroup; - RRGroupOfVisualGroupPtr pGroupOfVisualGroup; - RRScreenSizePtr pSize; - Rotation rotateKind; - int rotation; - int n; - - *rotations = RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270; - - for (n = 0; n < pScreen->numDepths; n++) - if (pScreen->allowedDepths[n].numVids) - break; - if (n == pScreen->numDepths) - return FALSE; + KdScreenInfo *screen = pScreenPriv->screen; + FbdevPriv *priv = pScreenPriv->card->driver; + pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) screen->driver; + KdMouseMatrix m; + + KdComputeMouseMatrix (&m, pcmcias->randr, + screen->width, screen->height); - pVisualGroup = RRCreateVisualGroup (pScreen); - if (!pVisualGroup) - return FALSE; - if (!RRAddDepthToVisualGroup (pScreen, - pVisualGroup, - &pScreen->allowedDepths[n])) + if (m.matrix[0][0]) { - RRDestroyVisualGroup (pScreen, pVisualGroup); - return FALSE; + pScreen->width = screen->width; + pScreen->height = screen->height; + pScreen->mmWidth = screen->width_mm; + pScreen->mmHeight = screen->height_mm; } - - pVisualGroup = RRRegisterVisualGroup (pScreen, pVisualGroup); - if (!pVisualGroup) - return FALSE; - - pGroupOfVisualGroup = RRCreateGroupOfVisualGroup (pScreen); - - if (!RRAddVisualGroupToGroupOfVisualGroup (pScreen, - pGroupOfVisualGroup, - pVisualGroup)) + else { - RRDestroyGroupOfVisualGroup (pScreen, pGroupOfVisualGroup); - /* pVisualGroup left until screen closed */ - return FALSE; + pScreen->width = screen->height; + pScreen->height = screen->width; + pScreen->mmWidth = screen->height_mm; + pScreen->mmHeight = screen->width_mm; } + KdSetMouseMatrix (&m); +} - pGroupOfVisualGroup = RRRegisterGroupOfVisualGroup (pScreen, pGroupOfVisualGroup); - if (!pGroupOfVisualGroup) - return FALSE; +#ifdef RANDR + +Bool +pcmciaRandRSupported (ScreenPtr pScreen, + const KdMonitorTiming *t) +{ + KdScreenPriv(pScreen); + pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; + KdScreenInfo *screen = pScreenPriv->screen; + int screen_size; + int byteStride; - pSize = RRRegisterSize (pScreen, - screen->width, - screen->height, - screen->width_mm, - screen->height_mm, - pGroupOfVisualGroup); - - rotation = pcmcias->rotation - screen->rotation; - if (rotation < 0) - rotation += 360; + /* Make sure the clock is supported */ + if (!pcmciaModeSupported (screen, t)) + return FALSE; + /* Check for sufficient memory */ + byteStride = screen->width * (screen->fb[0].bitsPerPixel >>3); + screen_size = byteStride * screen->height; - switch (rotation) - { - case 0: - rotateKind = RR_Rotate_0; - break; - case 90: - rotateKind = RR_Rotate_90; - break; - case 180: - rotateKind = RR_Rotate_180; - break; - case 270: - rotateKind = RR_Rotate_270; - break; - } + return screen_size <= pcmciac->memory; +} - RRSetCurrentConfig (pScreen, rotateKind, pSize, pVisualGroup); +Bool +pcmciaRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) +{ + KdScreenPriv(pScreen); + pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; + + *rotations = (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270| + RR_Reflect_X|RR_Reflect_Y); - return TRUE; - } + return KdRandRGetInfo (pScreen, pcmcias->randr, pcmciaRandRSupported); +} int pcmciaLayerAdd (WindowPtr pWin, pointer value) @@ -488,73 +419,62 @@ } pcmciaRandRSetConfig (ScreenPtr pScreen, - Rotation rotateKind, - RRScreenSizePtr pSize, - RRVisualGroupPtr pVisualGroup) + Rotation randr, + int rate, + RRScreenSizePtr pSize) { KdScreenPriv(pScreen); - KdScreenInfo *screen = pScreenPriv->screen; - FbdevPriv *priv = pScreenPriv->card->driver; - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; - int rotation; - Bool wasEnabled = pScreenPriv->enabled; + KdScreenInfo *screen = pScreenPriv->screen; + FbdevPriv *priv = pScreenPriv->card->driver; + pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; + Bool wasEnabled = pScreenPriv->enabled; + int newwidth, newheight; + LayerPtr pNewLayer; + int kind; + int oldrandr = pcmcias->randr; + PixmapPtr pPixmap; + const KdMonitorTiming *t; + + randr = KdAddRotation (screen->randr, randr); + + t = KdRandRGetTiming (pScreen, pcmciaRandRSupported, rate, pSize); + + if (wasEnabled) + KdDisableScreen (pScreen); + + screen->rate = t->rate; + screen->width = t->horizontal; + screen->height = t->vertical; - /* - * The only thing that can change is rotation - */ - switch (rotateKind) - { - case RR_Rotate_0: - rotation = screen->rotation; - break; - case RR_Rotate_90: - rotation = screen->rotation + 90; - break; - case RR_Rotate_180: - rotation = screen->rotation + 180; - break; - case RR_Rotate_270: - rotation = screen->rotation + 270; - break; - } - if (rotation >= 360) - rotation -= 360; + pcmcias->randr = randr; + pcmciaConfigureScreen (pScreen); - if (pcmcias->rotation != rotation) + pNewLayer = pcmciaLayerCreate (pScreen); + + if (!pNewLayer) { - LayerPtr pNewLayer; - int kind; - int oldrotation = pcmcias->rotation; - int oldwidth = pScreen->width; - int oldheight = pScreen->height; - PixmapPtr pPixmap; - + pcmcias->randr = oldrandr; + pcmciaConfigureScreen (pScreen); if (wasEnabled) - KdDisableScreen (pScreen); + KdEnableScreen (pScreen); + return FALSE; + } - pcmcias->rotation = rotation; - pNewLayer = pcmciaLayerCreate (pScreen); - if (!pNewLayer) - { - pcmcias->rotation = oldrotation; - } - if (WalkTree (pScreen, pcmciaLayerAdd, (pointer) pNewLayer) == WT_STOPWALKING) - { - WalkTree (pScreen, pcmciaLayerRemove, (pointer) pNewLayer); - LayerDestroy (pScreen, pNewLayer); - pcmcias->rotation = oldrotation; - pScreen->width = oldwidth; - pScreen->height = oldheight; - if (wasEnabled) - KdEnableScreen (pScreen); - return FALSE; - } - WalkTree (pScreen, pcmciaLayerRemove, (pointer) pcmcias->pLayer); - LayerDestroy (pScreen, pcmcias->pLayer); - pcmcias->pLayer = pNewLayer; + if (WalkTree (pScreen, pcmciaLayerAdd, (pointer) pNewLayer) == WT_STOPWALKING) + { + WalkTree (pScreen, pcmciaLayerRemove, (pointer) pNewLayer); + LayerDestroy (pScreen, pNewLayer); + pcmcias->randr = oldrandr; + pcmciaConfigureScreen (pScreen); if (wasEnabled) KdEnableScreen (pScreen); + return FALSE; } + WalkTree (pScreen, pcmciaLayerRemove, (pointer) pcmcias->pLayer); + LayerDestroy (pScreen, pcmcias->pLayer); + pcmcias->pLayer = pNewLayer; + if (wasEnabled) + KdEnableScreen (pScreen); return TRUE; } @@ -584,6 +504,9 @@ return FALSE; if (!LayerFinishInit (pScreen)) return FALSE; + + pcmciaConfigureScreen (pScreen); + pcmcias->pLayer = pcmciaLayerCreate (pScreen); if (!pcmcias->pLayer) return FALSE; @@ -657,50 +580,47 @@ #define CLOCKVAL(n, d) \ (VCOVAL(n, d) >> ((d) & 1)) -int CirrusFindClock(freq, max_clock, num_out, den_out) - int freq; - int max_clock; - int *num_out; - int *den_out; -{ - int n; - int num = 0, den = 0; - int mindiff; - - /* - * If max_clock is greater than the MAX_VCO default, ignore - * MAX_VCO. On the other hand, if MAX_VCO is higher than max_clock, - * make use of the higher MAX_VCO value. - */ - if (MAX_VCO > max_clock) - max_clock = MAX_VCO; - - mindiff = freq; - for (n = 0x10; n < 0x7f; n++) { - int d; - for (d = 0x14; d < 0x3f; d++) { - int c, diff; - /* Avoid combinations that can be unstable. */ - if ((VCOVAL(n, d) < MIN_VCO) || (VCOVAL(n, d) > max_clock)) - continue; - c = CLOCKVAL(n, d); - diff = abs(c - freq); - if (diff < mindiff) { - mindiff = diff; - num = n; - den = d; - } - } +static Bool +CirrusFindClock(int freq, int *num_out, int *den_out) +{ + int n; + int num = 0, den = 0; + int mindiff; + + /* + * If max_clock is greater than the MAX_VCO default, ignore + * MAX_VCO. On the other hand, if MAX_VCO is higher than max_clock, + * make use of the higher MAX_VCO value. + */ + + mindiff = freq; + for (n = 0x10; n < 0x7f; n++) { + int d; + for (d = 0x14; d < 0x3f; d++) { + int c, diff; + /* Avoid combinations that can be unstable. */ + if ((VCOVAL(n, d) < MIN_VCO) || (VCOVAL(n, d) > MAX_VCO)) + continue; + c = CLOCKVAL(n, d); + diff = abs(c - freq); + if (diff < mindiff) { + mindiff = diff; + num = n; + den = d; + } } + } + if (n == 0x80) + return FALSE; - *num_out = num; - *den_out = den; + *num_out = num; + *den_out = den; - return 0; + return TRUE; } -void +static Bool tridentSetCLK(int clock, CARD8 *a, CARD8 *b) { int powerup[4] = { 1,2,4,8 }; @@ -736,55 +656,76 @@ ErrorF ("ffreq %d clock %d\n", s, clock); #endif if (s == 0) - { - FatalError("Unable to set programmable clock.\n" - "Frequency %d is not a valid clock.\n" - "Please modify XF86Config for a new clock.\n", - freq); - } + return FALSE; /* N is first 7bits, first M bit is 8th bit */ *a = ((1 & q) << 7) | p; /* first 4bits are rest of M, 1bit for K value */ *b = (((q & 0xFE) >> 1) | (r << 4)); + return TRUE; } Bool pcmciaEnable (ScreenPtr pScreen) { KdScreenPriv(pScreen); + KdScreenInfo *screen = pScreenPriv->screen; pcmciaCardInfo *pcmciac = pScreenPriv->card->driver; - pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) pScreenPriv->screen->driver; + pcmciaScreenInfo *pcmcias = (pcmciaScreenInfo *) screen->driver; int i,j; unsigned char Sequencer[6]; unsigned char CRTC[31]; unsigned char Graphics[9]; unsigned char Attribute[21]; unsigned char MiscOutReg; - pcmciaDisplayModeRec mode = pcmciaDefaultModes[pcmcias->Mode]; + const KdMonitorTiming *t; + int hactive, hblank, hfp, hbp; + int vactive, vblank, vfp, vbp; + + int h_active; + int h_total; + int h_display_end; + int h_sync_start; + int h_sync_end; + int h_skew = 0; + + int v_active; + int v_total; + int v_sync_start; + int v_sync_end; + int v_skew = 0; + t = KdFindMode (screen, pcmciaModeSupported); + + hactive = t->horizontal; + hfp = t->hfp; + hbp = t->hbp; + hblank = t->hblank; + + h_active = hactive; + h_sync_start = hactive + hfp; + h_sync_end = hactive + hblank - hbp; + h_total = hactive + hblank; + + vactive = t->vertical; + vfp = t->vfp; + vbp = t->vbp; + vblank = t->vblank; + + v_active = vactive; + v_sync_start = vactive + vfp; + v_sync_end = vactive + vblank - vbp; + v_total = vactive + vblank; + /* * compute correct Hsync & Vsync polarity */ - if ((mode.Flags & (V_PHSYNC | V_NHSYNC)) - && (mode.Flags & (V_PVSYNC | V_NVSYNC))) - { - MiscOutReg = 0x23; - if (mode.Flags & V_NHSYNC) MiscOutReg |= 0x40; - if (mode.Flags & V_NVSYNC) MiscOutReg |= 0x80; - } - else - { - int VDisplay = mode.VDisplay; - if (VDisplay < 400) - MiscOutReg = 0xA3; /* +hsync -vsync */ - else if (VDisplay < 480) - MiscOutReg = 0x63; /* -hsync +vsync */ - else if (VDisplay < 768) - MiscOutReg = 0xE3; /* -hsync -vsync */ - else - MiscOutReg = 0x23; /* +hsync +vsync */ - } + + MiscOutReg = 0x23; + if (t->hpol == KdSyncNegative) + MiscOutReg |= 0x40; + if (t->vpol == KdSyncNegative) + MiscOutReg |= 0x80; /* * Time Sequencer @@ -805,36 +746,37 @@ /* * CRTC Controller */ - CRTC[0] = (mode.HTotal >> 3) - 5; - CRTC[1] = (mode.HDisplay >> 3) - 1; - CRTC[2] = ((min(mode.HSyncStart,mode.HDisplay)) >> 3) - 1; - CRTC[3] = ((((min(mode.HSyncEnd,mode.HTotal)) >> 3) - 1) & 0x1F) | 0x80; - i = (((mode.HSkew << 2) + 0x10) & ~0x1F); + CRTC[0] = ((h_total) >> 3) - 5; + CRTC[1] = (hactive >> 3) - 1; + CRTC[2] = ((min(h_sync_start,h_active)) >> 3) - 1; + CRTC[3] = ((((min(h_sync_end,h_total)) >> 3) - 1) & 0x1F) | 0x80; + i = (((h_skew << 2) + 0x10) & ~0x1F); if (i < 0x80) CRTC[3] |= i; - CRTC[4] = (mode.HSyncStart >> 3); - CRTC[5] = (((((min(mode.HSyncEnd,mode.HTotal)) >> 3) - 1) & 0x20) << 2) - | (((mode.HSyncEnd >> 3)) & 0x1F); - CRTC[6] = (mode.VTotal - 2) & 0xFF; - CRTC[7] = (((mode.VTotal - 2) & 0x100) >> 8) - | (((mode.VDisplay - 1) & 0x100) >> 7) - | ((mode.VSyncStart & 0x100) >> 6) - | ((((min(mode.VSyncStart,mode.VDisplay)) - 1) & 0x100) >> 5) + CRTC[4] = (h_sync_start >> 3); + CRTC[5] = (((((min(h_sync_end,h_total)) >> 3) - 1) & 0x20) << 2) + | (((h_sync_end >> 3)) & 0x1F); + + CRTC[6] = (v_total - 2) & 0xFF; + CRTC[7] = (((v_total - 2) & 0x100) >> 8) + | (((v_active - 1) & 0x100) >> 7) + | ((v_sync_start & 0x100) >> 6) + | ((((min(v_sync_start,v_active)) - 1) & 0x100) >> 5) | 0x10 - | (((mode.VTotal - 2) & 0x200) >> 4) - | (((mode.VDisplay - 1) & 0x200) >> 3) - | ((mode.VSyncStart & 0x200) >> 2); + | (((v_total - 2) & 0x200) >> 4) + | (((v_active - 1) & 0x200) >> 3) + | ((v_sync_start & 0x200) >> 2); CRTC[8] = 0x00; - CRTC[9] = ((((min(mode.VSyncStart,mode.VDisplay))-1) & 0x200) >> 4) | 0x40; + CRTC[9] = ((((min(v_sync_start,v_active))-1) & 0x200) >> 4) | 0x40; CRTC[10] = 0x00; CRTC[11] = 0x00; CRTC[12] = 0x00; CRTC[13] = 0x00; CRTC[14] = 0x00; CRTC[15] = 0x00; - CRTC[16] = mode.VSyncStart & 0xFF; - CRTC[17] = (mode.VSyncEnd & 0x0F) | 0x20; - CRTC[18] = (mode.VDisplay - 1) & 0xFF; + CRTC[16] = v_sync_start & 0xFF; + CRTC[17] = (v_sync_end & 0x0F) | 0x20; + CRTC[18] = (v_active - 1) & 0xFF; if (pScreenPriv->screen->fb[0].depth == 4) CRTC[19] = pScreenPriv->screen->fb[0].pixelStride >> 4; else @@ -845,8 +787,8 @@ pScreenPriv->screen->fb[0].depth == 15) CRTC[19] = pScreenPriv->screen->fb[0].pixelStride >> 2; CRTC[20] = 0x00; - CRTC[21] = ((min(mode.VSyncStart,mode.VDisplay)) - 1) & 0xFF; - CRTC[22] = ((min(mode.VSyncEnd,mode.VDisplay)) - 1) & 0xFF; + CRTC[21] = ((min(v_sync_end,v_active)) - 1) & 0xFF; + CRTC[22] = ((min(v_sync_end,v_active)) - 1) & 0xFF; if (pScreenPriv->screen->fb[0].depth < 8) CRTC[23] = 0xE3; else @@ -854,8 +796,10 @@ CRTC[24] = 0xFF; CRTC[25] = 0x00; CRTC[26] = 0x00; +#if 0 if (!pcmciac->HP) if (mode.Flags & V_INTERLACE) CRTC[26] |= 0x01; +#endif if (pcmciac->HP) CRTC[27] = 0x00; else @@ -863,8 +807,10 @@ CRTC[28] = 0x00; CRTC[29] = 0x00; CRTC[30] = 0x80; +#if 0 if (pcmciac->HP) if (mode.Flags & V_INTERLACE) CRTC[30] |= 0x04; +#endif { int nExtBits = 0; @@ -872,20 +818,20 @@ CARD32 ExtBitMask = ((1 << nExtBits) - 1) << 6; CRTC[3] = (CRTC[3] & ~0x1F) - | ((((min(mode.HSyncEnd,mode.HTotal)) >> 3) - 1) & 0x1F); + | ((((min(h_sync_end,h_total)) >> 3) - 1) & 0x1F); CRTC[5] = (CRTC[5] & ~0x80) - | (((((min(mode.HSyncEnd,mode.HTotal)) >> 3) - 1) & 0x20) << 2); - ExtBits = (((min(mode.HSyncEnd,mode.HTotal)) >> 3) - 1) & ExtBitMask; + | (((((min(h_sync_end,h_total)) >> 3) - 1) & 0x20) << 2); + ExtBits = (((min(h_sync_end,h_total)) >> 3) - 1) & ExtBitMask; /* First the horizontal case */ - if ((((min(mode.HSyncEnd,mode.HTotal)) >> 3) == (mode.HTotal >> 3))) + if ((((min(h_sync_end,h_total)) >> 3) == (h_total >> 3))) { int i = (CRTC[3] & 0x1F) | ((CRTC[5] & 0x80) >> 2) | ExtBits; - if ((i-- > ((((min(mode.HSyncStart,mode.HDisplay)) >> 3) - 1) + if ((i-- > ((((min(h_sync_start,h_active)) >> 3) - 1) & (0x3F | ExtBitMask))) - && ((min(mode.HSyncEnd,mode.HTotal)) == mode.HTotal)) + && ((min(h_sync_end,h_total)) == h_total)) i = 0; CRTC[3] = (CRTC[3] & ~0x1F) | (i & 0x1F); CRTC[5] = (CRTC[5] & ~0x80) | ((i << 2) & 0x80); @@ -898,11 +844,11 @@ /* If width is not known nBits should be 0. In this * case BitMask is set to 0 so we can check for it. */ CARD32 BitMask = 0; - int VBlankStart = ((min(mode.VSyncStart,mode.VDisplay)) - 1) & 0xFF; - CRTC[22] = ((min(mode.VSyncEnd,mode.VTotal)) - 1) & 0xFF; - ExtBits = ((min(mode.VSyncEnd,mode.VTotal)) - 1) & ExtBitMask; + int VBlankStart = ((min(v_sync_start,v_active)) - 1) & 0xFF; + CRTC[22] = ((min(v_sync_end,v_total)) - 1) & 0xFF; + ExtBits = ((min(v_sync_end,v_total)) - 1) & ExtBitMask; - if ((min(mode.VSyncEnd,mode.VTotal)) == mode.VTotal) + if ((min(v_sync_end,v_total)) == v_total) /* Null top overscan */ { int i = CRTC[22] | ExtBits; @@ -1090,7 +1036,7 @@ /* Set the Clock */ if (pcmciac->HP) { CARD8 a,b; - int clock = mode.Clock; + int clock = t->clock; if (pScreenPriv->screen->fb[0].bitsPerPixel == 16) clock *= 2; tridentSetCLK(clock, &a, &b); @@ -1099,11 +1045,11 @@ } else { int num, den; unsigned char tmp; - int clock = mode.Clock; + int clock = t->clock; if (pScreenPriv->screen->fb[0].bitsPerPixel == 16) clock *= 2; - CirrusFindClock(clock, MAX_VCO, &num, &den); + CirrusFindClock(clock, &num, &den); tmp = pcmciaReadIndex(pcmciac, 0x3c4, 0x0d); pcmciaWriteIndex(pcmciac, 0x3c4, 0x0d, (tmp & 0x80) | num); @@ -1112,19 +1058,19 @@ } pcmciaWriteReg(pcmciac, 0x3c2, MiscOutReg | 0x08); -#if 0 /* for debugging */ +#if 1 for (i=1;i<0x3f;i++) - ErrorF("0x%x, ",pcmciaReadIndex(pcmciac, 0x3c4, i)); + ErrorF("0x3c4:%02x: 0x%x\n",i,pcmciaReadIndex(pcmciac, 0x3c4, i)); ErrorF("\n"); for (i=0;i<0x3f;i++) - ErrorF("0x%x, ",pcmciaReadIndex(pcmciac, 0x3ce, i)); + ErrorF("0x3ce:%02x: 0x%x\n",i,pcmciaReadIndex(pcmciac, 0x3ce, i)); ErrorF("\n"); for (i=0;i<0x3f;i++) - ErrorF("0x%x, ",pcmciaReadIndex(pcmciac, 0x3d4, i)); + ErrorF("0x3d4:%02x: 0x%x\n",i,pcmciaReadIndex(pcmciac, 0x3d4, i)); #endif return TRUE; Index: xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.h diff -u xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.h:1.2 xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.h:1.3 --- xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.h:1.2 Wed Jun 20 17:53:31 2001 +++ xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.h Mon Oct 14 14:01:41 2002 @@ -21,7 +21,7 @@ * * Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk> */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.h,v 1.2 2001/06/20 21:53:31 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/pcmcia/pcmcia.h,v 1.3 2002/10/14 18:01:41 keithp Exp $ */ #ifndef _PCMCIA_H_ #define _PCMCIA_H_ @@ -167,6 +167,7 @@ typedef struct _pcmciaCardInfo { CARD8 *fb; Bool HP; + CARD32 memory; CARD8 *cop_base; Cop *cop; CARD32 *window; @@ -189,12 +190,11 @@ #define PCMCIA_CURSOR_HEIGHT 64 typedef struct _pcmciaScreenInfo { - int Mode; CARD8 *cursor_base; CARD8 *screen; CARD8 *off_screen; int off_screen_size; - int rotation; + int randr; LayerPtr pLayer; pcmciaCursor cursor; } pcmciaScreenInfo; @@ -240,6 +240,10 @@ void pcmciaRecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdef); + +void +pcmciaUpdateRotatePacked (ScreenPtr pScreen, + shadowBufPtr pBuf); typedef struct _pcmciaDisplayModeRec { int Width; Index: xc/programs/Xserver/hw/kdrive/pcmcia/pcmciarotate.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/pcmcia/pcmciarotate.c:1.1 --- /dev/null Thu Feb 27 12:29:31 2003 +++ xc/programs/Xserver/hw/kdrive/pcmcia/pcmciarotate.c Sun Oct 13 15:35:56 2002 @@ -0,0 +1,332 @@ +/* + * $XFree86: xc/programs/Xserver/hw/kdrive/pcmcia/pcmciarotate.c,v 1.1 2002/10/13 19:35:56 keithp Exp $ + * + * Copyright © 2001 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 "X.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "font.h" +#include "dixfontstr.h" +#include "fontstruct.h" +#include "mi.h" +#include "regionstr.h" +#include "globals.h" +#include "gcstruct.h" +#include "shadow.h" +#include "fb.h" + +/* + * These indicate which way the source (shadow) is scanned when + * walking the screen in a particular direction + */ + +#define LEFT_TO_RIGHT 1 +#define RIGHT_TO_LEFT -1 +#define TOP_TO_BOTTOM 2 +#define BOTTOM_TO_TOP -2 + +typedef CARD16 PcBits; +typedef INT32 PcStride; + +#define PC_SHIFT 4 +#define PC_UNIT (1 << PC_SHIFT) +#define PC_HALFUNIT (1 << (PC_SHIFT-1)) +#define PC_MASK (PC_UNIT - 1) +#define PC_ALLONES ((PcBits) -1) + +#define PcScrRight(x,b) FbScrRight(x,b) +#define PcScrLeft(x,b) FbScrLeft(x,b) +#define PcBitsMask(x,w) (PcScrRight(PC_ALLONES,(x) & PC_MASK) & \ + PcScrLeft(PC_ALLONES,(PC_UNIT - ((x) + (w))) & PC_MASK)) + +#define pcGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ + PixmapPtr _pPix; \ + if ((pDrawable)->type != DRAWABLE_PIXMAP) \ + _pPix = fbGetWindowPixmap(pDrawable); \ + else \ + _pPix = (PixmapPtr) (pDrawable); \ + (pointer) = (PcBits *) _pPix->devPrivate.ptr; \ + (stride) = ((int) _pPix->devKind) / sizeof (PcBits); \ + (bpp) = _pPix->drawable.bitsPerPixel; \ + (xoff) = 0; \ + (yoff) = 0; \ +} + +void +pcmciaUpdateRotatePacked (ScreenPtr pScreen, + shadowBufPtr pBuf) +{ + RegionPtr damage = &pBuf->damage; + PixmapPtr pShadow = pBuf->pPixmap; + int nbox = REGION_NUM_RECTS (damage); + BoxPtr pbox = REGION_RECTS (damage); + PcBits *shaBits; + PcStride shaStride; + int shaBpp; + int shaXoff, shaYoff; + int box_x1, box_x2, box_y1, box_y2; + int sha_x1, sha_y1; + int scr_x1, scr_x2, scr_y1, scr_y2, scr_w, scr_h; + int scr_x, scr_y; + int w; + int pixelsPerBits; + int pixelsMask; + PcStride shaStepOverY, shaStepDownY, shaStepOverX, shaStepDownX; + PcBits *shaLine, *sha; + int shaHeight = pShadow->drawable.height; + int shaWidth = pShadow->drawable.width; + PcBits shaMask; + int shaFirstShift, shaShift; + int o_x_dir; + int o_y_dir; + int x_dir; + int y_dir; + + pcGetDrawable (&pShadow->drawable, shaBits, shaStride, shaBpp, shaXoff, shaYoff); + pixelsPerBits = (sizeof (PcBits) * 8) / shaBpp; + pixelsMask = ~(pixelsPerBits - 1); + shaMask = PcBitsMask (PC_UNIT-shaBpp, shaBpp); + /* + * Compute rotation related constants to walk the shadow + */ + o_x_dir = LEFT_TO_RIGHT; + o_y_dir = TOP_TO_BOTTOM; + if (pBuf->randr & SHADOW_REFLECT_X) + o_x_dir = -o_x_dir; + if (pBuf->randr & SHADOW_REFLECT_Y) + o_y_dir = -o_y_dir; + switch (pBuf->randr & (SHADOW_ROTATE_ALL)) { + case SHADOW_ROTATE_0: /* upper left shadow -> upper left screen */ + default: + x_dir = o_x_dir; + y_dir = o_y_dir; + break; + case SHADOW_ROTATE_90: /* upper right shadow -> upper left screen */ + x_dir = o_y_dir; + y_dir = -o_x_dir; + break; + case SHADOW_ROTATE_180: /* lower right shadow -> upper left screen */ + x_dir = -o_x_dir; + y_dir = -o_y_dir; + break; + case SHADOW_ROTATE_270: /* lower left shadow -> upper left screen */ + x_dir = -o_y_dir; + y_dir = o_x_dir; + break; + } + switch (x_dir) { + case LEFT_TO_RIGHT: + shaStepOverX = shaBpp; + shaStepOverY = 0; + break; + case TOP_TO_BOTTOM: + shaStepOverX = 0; + shaStepOverY = shaStride; + break; + case RIGHT_TO_LEFT: + shaStepOverX = -shaBpp; + shaStepOverY = 0; + break; + case BOTTOM_TO_TOP: + shaStepOverX = 0; + shaStepOverY = -shaStride; + break; + } + switch (y_dir) { + case TOP_TO_BOTTOM: + shaStepDownX = 0; + shaStepDownY = shaStride; + break; + case RIGHT_TO_LEFT: + shaStepDownX = -shaBpp; + shaStepDownY = 0; + break; + case BOTTOM_TO_TOP: + shaStepDownX = 0; + shaStepDownY = -shaStride; + break; + case LEFT_TO_RIGHT: + shaStepDownX = shaBpp; + shaStepDownY = 0; + break; + } + + while (nbox--) + { + box_x1 = pbox->x1; + box_y1 = pbox->y1; + box_x2 = pbox->x2; + box_y2 = pbox->y2; + pbox++; + + /* + * Compute screen and shadow locations for this box + */ + switch (x_dir) { + case LEFT_TO_RIGHT: + scr_x1 = box_x1 & pixelsMask; + scr_x2 = (box_x2 + pixelsPerBits - 1) & pixelsMask; + + sha_x1 = scr_x1; + break; + case TOP_TO_BOTTOM: + scr_x1 = box_y1 & pixelsMask; + scr_x2 = (box_y2 + pixelsPerBits - 1) & pixelsMask; + + sha_y1 = scr_x1; + break; + case RIGHT_TO_LEFT: + scr_x1 = (shaWidth - box_x2) & pixelsMask; + scr_x2 = (shaWidth - box_x1 + pixelsPerBits - 1) & pixelsMask; + + sha_x1 = (shaWidth - scr_x1 - 1); + break; + case BOTTOM_TO_TOP: + scr_x1 = (shaHeight - box_y2) & pixelsMask; + scr_x2 = (shaHeight - box_y1 + pixelsPerBits - 1) & pixelsMask; + + sha_y1 = (shaHeight - scr_x1 - 1); + break; + } + switch (y_dir) { + case TOP_TO_BOTTOM: + scr_y1 = box_y1; + scr_y2 = box_y2; + + sha_y1 = scr_y1; + break; + case RIGHT_TO_LEFT: + scr_y1 = (shaWidth - box_x2); + scr_y2 = (shaWidth - box_x1); + + sha_x1 = box_x2 - 1; + break; + case BOTTOM_TO_TOP: + scr_y1 = shaHeight - box_y2; + scr_y2 = shaHeight - box_y1; + + sha_y1 = box_y2 - 1; + break; + case LEFT_TO_RIGHT: + scr_y1 = box_x1; + scr_y2 = box_x2; + + sha_x1 = box_x1; + break; + } + scr_w = ((scr_x2 - scr_x1) * shaBpp) >> PC_SHIFT; + scr_h = scr_y2 - scr_y1; + scr_y = scr_y1; + + /* shift amount for first pixel on screen */ + shaFirstShift = PC_UNIT - ((sha_x1 * shaBpp) & PC_MASK) - shaBpp; + + /* pointer to shadow data first placed on screen */ + shaLine = (shaBits + + sha_y1 * shaStride + + ((sha_x1 * shaBpp) >> PC_SHIFT)); + + /* + * Copy the bits, always write across the physical frame buffer + * to take advantage of write combining. + */ + while (scr_h--) + { + int p; + PcBits bits; + PcBits *win; + int i; + CARD32 winSize; + + sha = shaLine; + shaShift = shaFirstShift; + w = scr_w; + scr_x = scr_x1 * shaBpp >> PC_SHIFT; + + while (w) + { + /* + * Map some of this line + */ + win = (PcBits *) (*pBuf->window) (pScreen, + scr_y, + scr_x << 1, + SHADOW_WINDOW_WRITE, + &winSize, + pBuf->closure); + i = (winSize >> 1); + if (i > w) + i = w; + w -= i; + scr_x += i; + /* + * Copy the portion of the line mapped + */ + while (i--) + { + bits = 0; + p = pixelsPerBits; + /* + * Build one word of output from multiple inputs + * + * Note that for 90/270 rotations, this will walk + * down the shadow hitting each scanline once. + * This is probably not very efficient. + */ + while (p--) + { + bits = PcScrLeft(bits, shaBpp); + bits |= PcScrRight (*sha, shaShift) & shaMask; + + shaShift -= shaStepOverX; + if (shaShift >= PC_UNIT) + { + shaShift -= PC_UNIT; + sha--; + } + else if (shaShift < 0) + { + shaShift += PC_UNIT; + sha++; + } + sha += shaStepOverY; + } + *win++ = bits; + } + } + scr_y++; + shaFirstShift -= shaStepDownX; + if (shaFirstShift >= PC_UNIT) + { + shaFirstShift -= PC_UNIT; + shaLine--; + } + else if (shaFirstShift < 0) + { + shaFirstShift += PC_UNIT; + shaLine++; + } + shaLine += shaStepDownY; + } + } +} Index: xc/programs/Xserver/hw/kdrive/vesa/vbe.c diff -u xc/programs/Xserver/hw/kdrive/vesa/vbe.c:1.10 xc/programs/Xserver/hw/kdrive/vesa/vbe.c:1.11 --- xc/programs/Xserver/hw/kdrive/vesa/vbe.c:1.10 Wed Sep 5 03:12:42 2001 +++ xc/programs/Xserver/hw/kdrive/vesa/vbe.c Tue Oct 8 17:27:18 2002 @@ -19,7 +19,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vbe.c,v 1.10 2001/09/05 07:12:42 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vbe.c,v 1.11 2002/10/08 21:27:18 keithp Exp $ */ #include "vesa.h" @@ -210,7 +210,7 @@ if (code < 0) return -1; - mode = (mode & 0xffff) | 0x8000; + mode = (mode & 0xffff) &~ 0x8000; if (linear) mode |= 0x4000; Index: xc/programs/Xserver/hw/kdrive/vesa/vesa.c diff -u xc/programs/Xserver/hw/kdrive/vesa/vesa.c:1.18 xc/programs/Xserver/hw/kdrive/vesa/vesa.c:1.21 --- xc/programs/Xserver/hw/kdrive/vesa/vesa.c:1.18 Fri Sep 14 15:25:17 2001 +++ xc/programs/Xserver/hw/kdrive/vesa/vesa.c Mon Oct 14 14:01:42 2002 @@ -19,7 +19,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.c,v 1.18 2001/09/14 19:25:17 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.c,v 1.21 2002/10/14 18:01:42 keithp Exp $ */ #include "vesa.h" #ifdef RANDR @@ -401,7 +401,7 @@ vesaReportMode (&pscr->mode); } - pscr->rotate = screen->rotation; + pscr->randr = screen->randr; pscr->shadow = vesa_shadow; pscr->origDepth = screen->fb[0].depth; pscr->layerKind = LAYER_FB; @@ -409,6 +409,7 @@ /* * Compute visual support for the selected depth */ + switch (pscr->mode.MemoryModel) { case MEMORY_DIRECT: /* TrueColor or DirectColor */ @@ -748,50 +749,31 @@ if (pscr->mapping == VESA_PLANAR || pscr->mapping == VESA_MONO) { pscr->shadow = TRUE; - pscr->rotate = 0; - m.matrix[0][0] = 1; m.matrix[0][1] = 0; m.matrix[0][2] = 0; - m.matrix[1][0] = 0; m.matrix[1][1] = 1; m.matrix[1][2] = 0; + pscr->randr = RR_Rotate_0; } - else switch (pscr->rotate) { - case 0: - pScreen->width = pscr->mode.XResolution; - pScreen->height = pscr->mode.YResolution; - pScreen->mmWidth = screen->width_mm; - pScreen->mmHeight = screen->height_mm; - if (pscr->mapping == VESA_WINDOWED) - pscr->shadow = TRUE; - else - pscr->shadow = vesa_shadow; - m.matrix[0][0] = 1; m.matrix[0][1] = 0; m.matrix[0][2] = 0; - m.matrix[1][0] = 0; m.matrix[1][1] = 1; m.matrix[1][2] = 0; - break; - case 90: - pScreen->width = pscr->mode.YResolution; - pScreen->height = pscr->mode.XResolution; - pScreen->mmWidth = screen->height_mm; - pScreen->mmHeight = screen->width_mm; + else if (pscr->mapping == VESA_WINDOWED) pscr->shadow = TRUE; - m.matrix[0][0] = 0; m.matrix[0][1] = -1; m.matrix[0][2] = pscr->mode.YResolution - 1; - m.matrix[1][0] = 1; m.matrix[1][1] = 0; m.matrix[1][2] = 0; - break; - case 180: + else if (pscr->randr != RR_Rotate_0) + pscr->shadow = TRUE; + else + pscr->shadow = vesa_shadow; + + KdComputeMouseMatrix (&m, pscr->randr, + pscr->mode.XResolution, pscr->mode.YResolution); + + if (m.matrix[0][0]) + { pScreen->width = pscr->mode.XResolution; pScreen->height = pscr->mode.YResolution; pScreen->mmWidth = screen->width_mm; pScreen->mmHeight = screen->height_mm; - pscr->shadow = TRUE; - m.matrix[0][0] = -1; m.matrix[0][1] = 0; m.matrix[0][2] = pscr->mode.XResolution - 1; - m.matrix[1][0] = 0; m.matrix[1][1] = -1; m.matrix[1][2] = pscr->mode.YResolution - 1; - break; - case 270: + } + else + { pScreen->width = pscr->mode.YResolution; pScreen->height = pscr->mode.XResolution; pScreen->mmWidth = screen->height_mm; pScreen->mmHeight = screen->width_mm; - pscr->shadow = TRUE; - m.matrix[0][0] = 0; m.matrix[0][1] = 1; m.matrix[0][2] = 0; - m.matrix[1][0] = -1; m.matrix[1][1] = 0; m.matrix[1][2] = pscr->mode.XResolution - 1; - break; } KdSetMouseMatrix (&m); } @@ -811,7 +793,7 @@ if (pscr->shadow) { - if (pscr->rotate) + if (pscr->randr != RR_Rotate_0) update = shadowUpdateRotatePacked; else update = shadowUpdatePacked; @@ -855,7 +837,7 @@ pScreen->width, pScreen->height, screen->fb[0].depth); return LayerCreate (pScreen, kind, screen->fb[0].depth, - pPixmap, update, window, pscr->rotate, 0); + pPixmap, update, window, pscr->randr, 0); } Bool @@ -929,7 +911,7 @@ ErrorF ("\tStatic color bpp %d depth %d\n", bpp, depth); } - pscr->rotate = 0; + pscr->randr = RR_Rotate_0; break; default: return 0; @@ -941,7 +923,8 @@ case 32: break; default: - pscr->rotate = 0; + pscr->randr = RR_Rotate_0; + break; } screen->width = pscr->mode.XResolution; @@ -1010,11 +993,10 @@ VesaScreenPrivPtr pscr = pScreenPriv->screen->driver; int nmode; int n; - RRVisualGroupPtr pVisualGroup; - RRGroupOfVisualGroupPtr pGroupOfVisualGroup; RRScreenSizePtr pSize; - *rotations = RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270; + *rotations = (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270| + RR_Reflect_X|RR_Reflect_Y); /* * Get mode information from BIOS -- every time in case * something changes, like an external monitor is plugged in @@ -1026,46 +1008,6 @@ xfree (priv->modes); priv->modes = modes; priv->nmode = nmode; - /* - * XXX Create a single set of visual sets that has all of the visuals - * for the root depth - */ - for (n = 0; n < pScreen->numDepths; n++) - if (pScreen->allowedDepths[n].numVids) - break; - if (n == pScreen->numDepths) - return FALSE; - - pVisualGroup = RRCreateVisualGroup (pScreen); - if (!pVisualGroup) - return FALSE; - - if (!RRAddDepthToVisualGroup (pScreen, - pVisualGroup, - &pScreen->allowedDepths[n])) - { - RRDestroyVisualGroup (pScreen, pVisualGroup); - return FALSE; - } - pVisualGroup = RRRegisterVisualGroup (pScreen, pVisualGroup); - if (!pVisualGroup) - return FALSE; - - pGroupOfVisualGroup = RRCreateGroupOfVisualGroup (pScreen); - - if (!RRAddVisualGroupToGroupOfVisualGroup (pScreen, - pGroupOfVisualGroup, - pVisualGroup)) - { - RRDestroyGroupOfVisualGroup (pScreen, pGroupOfVisualGroup); - /* pVisualGroup left until screen closed */ - return FALSE; - } - - pGroupOfVisualGroup = RRRegisterGroupOfVisualGroup (pScreen, pGroupOfVisualGroup); - if (!pGroupOfVisualGroup) - return FALSE; - for (n = 0; n < nmode; n++) { mode = &priv->modes[n]; @@ -1086,7 +1028,7 @@ mode->BlueFieldPosition == pscr->mode.BlueFieldPosition) { int width, height, width_mm, height_mm; - if (screen->rotation == 0 || screen->rotation == 180) + if (screen->randr & (RR_Rotate_0|RR_Rotate_180)) { width = mode->XResolution; height = mode->YResolution; @@ -1102,23 +1044,12 @@ } pSize = RRRegisterSize (pScreen, width, height, - width_mm, height_mm, - pGroupOfVisualGroup); + width_mm, height_mm); if (mode->XResolution == screen->width && mode->YResolution == screen->height) { - int rotate = pscr->rotate - screen->rotation; - int rot; - if (rotate < 0) - rotate += 360; - switch (rotate) { - case 0: rot = RR_Rotate_0; break; - case 90: rot = RR_Rotate_90; break; - case 180: rot = RR_Rotate_180; break; - case 270: rot = RR_Rotate_270; break; - } - RRSetCurrentConfig (pScreen, rot, pSize, - pVisualGroup); + int randr = KdSubRotation (pscr->randr, screen->randr); + RRSetCurrentConfig (pScreen, randr, 0, pSize); } } } @@ -1151,9 +1082,9 @@ Bool vesaRandRSetConfig (ScreenPtr pScreen, - Rotation rotation, - RRScreenSizePtr pSize, - RRVisualGroupPtr pVisualGroup) + Rotation randr, + int rate, + RRScreenSizePtr pSize) { KdScreenPriv(pScreen); VesaModePtr mode; @@ -1171,7 +1102,7 @@ LayerPtr pNewLayer; int newwidth, newheight; - if (screen->rotation == 0 || screen->rotation == 180) + if (screen->randr & (RR_Rotate_0|RR_Rotate_180)) { newwidth = pSize->width; newheight = pSize->height; @@ -1227,17 +1158,8 @@ */ pscr->mode = *mode; - switch (rotation) { - case RR_Rotate_0: pscr->rotate = 0; break; - case RR_Rotate_90: pscr->rotate = 90; break; - case RR_Rotate_180: pscr->rotate = 180; break; - case RR_Rotate_270: pscr->rotate = 270; break; - } - - pscr->rotate += screen->rotation; - if (pscr->rotate >= 360) - pscr->rotate -= 360; - + pscr->randr = KdAddRotation (screen->randr, randr); + /* * Can't rotate some formats */ @@ -1247,7 +1169,7 @@ case 32: break; default: - if (pscr->rotate) + if (pscr->randr) goto bail2; break; } @@ -1300,6 +1222,8 @@ pscr->pLayer = pNewLayer; + /* set the subpixel order */ + KdSetSubpixelOrder (pScreen, pscr->randr); if (wasEnabled) KdEnableScreen (pScreen); Index: xc/programs/Xserver/hw/kdrive/vesa/vesa.h diff -u xc/programs/Xserver/hw/kdrive/vesa/vesa.h:1.12 xc/programs/Xserver/hw/kdrive/vesa/vesa.h:1.14 --- xc/programs/Xserver/hw/kdrive/vesa/vesa.h:1.12 Wed Sep 5 03:12:42 2001 +++ xc/programs/Xserver/hw/kdrive/vesa/vesa.h Thu Oct 3 18:08:53 2002 @@ -19,7 +19,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.h,v 1.12 2001/09/05 07:12:42 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vesa.h,v 1.14 2002/10/03 22:08:53 keithp Exp $ */ #ifndef _VESA_H_ #define _VESA_H_ @@ -95,7 +95,7 @@ typedef struct _VesaScreenPriv { VesaModeRec mode; Bool shadow; - int rotate; + Rotation randr; int mapping; int origDepth; int layerKind; @@ -165,4 +165,4 @@ int vesaProcessArgument (int argc, char **argv, int i); -#endif _VESA_H_ +#endif /* _VESA_H_ */ Index: xc/programs/Xserver/hw/kdrive/vesa/vm86.c diff -u xc/programs/Xserver/hw/kdrive/vesa/vm86.c:1.1 xc/programs/Xserver/hw/kdrive/vesa/vm86.c:1.3 --- xc/programs/Xserver/hw/kdrive/vesa/vm86.c:1.1 Thu Oct 19 20:19:51 2000 +++ xc/programs/Xserver/hw/kdrive/vesa/vm86.c Tue Jun 4 18:19:58 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vm86.c,v 1.1 2000/10/20 00:19:51 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/vesa/vm86.c,v 1.3 2002/06/04 22:19:58 dawes Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -372,13 +372,12 @@ if(pref_rep) { if(pref_66) { regs->ecx--; - if(regs->ecx != 0) { + if(regs->ecx != 0) goto again; - } else { - SET_16(regs->ecx, regs->ecx - 1); - if(regs->ecx & 0xFFFF != 0) - goto again; - } + } else { + SET_16(regs->ecx, regs->ecx - 1); + if(regs->ecx & 0xFFFF != 0) + goto again; } } INC_IP(1); @@ -431,13 +430,12 @@ if(pref_rep) { if(pref_66) { regs->ecx--; - if(regs->ecx != 0) { + if(regs->ecx != 0) + goto again; + } else { + SET_16(regs->ecx, regs->ecx - 1); + if(regs->ecx & 0xFFFF != 0) goto again; - } else { - SET_16(regs->ecx, regs->ecx - 1); - if(regs->ecx & 0xFFFF != 0) - goto again; - } } } INC_IP(1); Index: xc/programs/Xserver/hw/sun/kbd_mode.c diff -u xc/programs/Xserver/hw/sun/kbd_mode.c:3.10 xc/programs/Xserver/hw/sun/kbd_mode.c:3.11 --- xc/programs/Xserver/hw/sun/kbd_mode.c:3.10 Sat Oct 27 23:33:10 2001 +++ xc/programs/Xserver/hw/sun/kbd_mode.c Wed Oct 23 12:23:36 2002 @@ -27,7 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.c,v 3.10 2001/10/28 03:33:10 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.c,v 3.11 2002/10/23 16:23:36 tsi Exp $ */ /* static char sccsid[] = "@(#)kbd_mode.c 7.1 87/04/13"; @@ -62,6 +62,7 @@ #endif #endif #include <stdio.h> +#include <stdlib.h> #include <unistd.h> static void die(), usage(); Index: xc/programs/Xserver/hw/sun/sunFbs.c diff -u xc/programs/Xserver/hw/sun/sunFbs.c:1.5 xc/programs/Xserver/hw/sun/sunFbs.c:1.7 --- xc/programs/Xserver/hw/sun/sunFbs.c:1.5 Fri Dec 14 14:59:43 2001 +++ xc/programs/Xserver/hw/sun/sunFbs.c Thu Dec 5 19:28:50 2002 @@ -67,7 +67,7 @@ * express or implied warranty. */ -/* $XFree86: xc/programs/Xserver/hw/sun/sunFbs.c,v 1.5 2001/12/14 19:59:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunFbs.c,v 1.7 2002/12/06 00:28:50 tsi Exp $ */ /****************************************************************/ /* Modified from sunCG4C.c for X11R3 by Tom Jarmolowski */ @@ -104,7 +104,7 @@ mapsize = ((int) len + pagemask) & ~pagemask; addr = 0; -#if !defined(__bsdi__) && !defined(_MAP_NEW) +#if !defined(__bsdi__) && !defined(_MAP_NEW) && !defined(__NetBSD__) && !defined(__OpenBSD__) if ((addr = (caddr_t) valloc (mapsize)) == NULL) { Error ("Couldn't allocate frame buffer memory"); (void) close (fd); @@ -112,6 +112,7 @@ } #endif +#if !defined(__NetBSD__) && !defined(__OpenBSD__) /* * try and make it private first, that way once we get it, an * interloper, e.g. another server, can't get this frame buffer, @@ -121,6 +122,7 @@ mapsize, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, off)) == -1) +#endif mapaddr = (pointer) mmap (addr, mapsize, PROT_READ | PROT_WRITE, MAP_SHARED, Index: xc/programs/Xserver/hw/sun/sunInit.c diff -u xc/programs/Xserver/hw/sun/sunInit.c:3.11 xc/programs/Xserver/hw/sun/sunInit.c:3.12 --- xc/programs/Xserver/hw/sun/sunInit.c:3.11 Fri Aug 17 18:08:11 2001 +++ xc/programs/Xserver/hw/sun/sunInit.c Thu Dec 5 21:11:44 2002 @@ -15,7 +15,7 @@ * * */ -/* $XFree86: xc/programs/Xserver/hw/sun/sunInit.c,v 3.11 2001/08/17 22:08:11 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/sun/sunInit.c,v 3.12 2002/12/06 02:11:44 tsi Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -342,17 +342,22 @@ Error("unable to get frame buffer attributes"); (void) close(sunFbs[screen].fd); sunFbs[screen].fd = -1; - ret = FALSE; + return FALSE; } } if (ret) { devFbUsed = TRUE; - if (fbattr) + if (fbattr) { + if (fbattr->fbtype.fb_type >= XFBTYPE_LASTPLUSONE) { + ErrorF ("%s is an unknown framebuffer type\n", device); + (void) close(sunFbs[screen].fd); + sunFbs[screen].fd = -1; + return FALSE; + } sunFbs[screen].info = fbattr->fbtype; + } sunFbs[screen].fbPriv = (pointer) fbattr; - if (fbattr && - fbattr->fbtype.fb_type < XFBTYPE_LASTPLUSONE && - !sunFbData[fbattr->fbtype.fb_type].init) { + if (fbattr && !sunFbData[fbattr->fbtype.fb_type].init) { int _i; ret = FALSE; for (_i = 0; _i < FB_ATTR_NEMUTYPES; _i++) { Index: xc/programs/Xserver/hw/vfb/InitOutput.c diff -u xc/programs/Xserver/hw/vfb/InitOutput.c:3.20 xc/programs/Xserver/hw/vfb/InitOutput.c:3.22 --- xc/programs/Xserver/hw/vfb/InitOutput.c:3.20 Fri Dec 14 14:59:45 2001 +++ xc/programs/Xserver/hw/vfb/InitOutput.c Tue Jan 14 21:34:07 2003 @@ -26,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/hw/vfb/InitOutput.c,v 3.20 2001/12/14 19:59:45 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/vfb/InitOutput.c,v 3.22 2003/01/15 02:34:07 torrey Exp $ */ #if defined(WIN32) #include <X11/Xwinsock.h> @@ -113,6 +113,7 @@ static fbMemType fbmemtype = NORMAL_MEMORY_FB; static char needswap = 0; static int lastScreen = -1; +static Bool Render = TRUE; #define swapcopy16(_dst, _src) \ if (needswap) { CARD16 _s = _src; cpswaps(_s, _dst); } \ @@ -223,6 +224,22 @@ DarwinHandleGUI(int argc, char *argv[]) { } + +void GlxExtensionInit(); +void GlxWrapInitVisuals(void *procPtr); + +void +DarwinGlxExtensionInit() +{ + GlxExtensionInit(); +} + +void +DarwinGlxWrapInitVisuals( + void *procPtr) +{ + GlxWrapInitVisuals(procPtr); +} #endif void @@ -240,6 +257,10 @@ { ErrorF("-screen scrn WxHxD set screen's width, height, depth\n"); ErrorF("-pixdepths list-of-int support given pixmap depths\n"); +#ifdef RENDER + ErrorF("+/-render turn on/of RENDER extension support" + "(default on)\n"); +#endif ErrorF("-linebias n adjust thin line pixelization\n"); ErrorF("-blackpixel n pixel value for black\n"); ErrorF("-whitepixel n pixel value for white\n"); @@ -311,6 +332,18 @@ return ret; } + if (strcmp (argv[i], "+render") == 0) /* +render */ + { + Render = TRUE; + return 1; + } + + if (strcmp (argv[i], "-render") == 0) /* -render */ + { + Render = FALSE; + return 1; + } + if (strcmp (argv[i], "-blackpixel") == 0) /* -blackpixel n */ { Pixel pix; @@ -910,7 +943,7 @@ ret = fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, dpix, dpiy, pvfb->paddedWidth,pvfb->bitsPerPixel); #ifdef RENDER - if (ret) + if (ret && Render) fbPictureInit (pScreen, 0, 0); #endif break; @@ -976,6 +1009,10 @@ { vfbPixmapDepths[vfbScreens[i].depth] = TRUE; } + + /* for RENDER we need 32bpp */ + if (Render) + vfbPixmapDepths[32] = TRUE; for (i = 1; i <= 32; i++) {